aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CREDITS8
-rw-r--r--Documentation/ABI/testing/sysfs-block37
-rw-r--r--Documentation/DocBook/kernel-hacking.tmpl4
-rw-r--r--Documentation/RCU/rculist_nulls.txt7
-rw-r--r--Documentation/arm/memory.txt2
-rw-r--r--Documentation/connector/cn_test.c4
-rw-r--r--Documentation/connector/ucon.c2
-rw-r--r--Documentation/filesystems/sysfs.txt3
-rw-r--r--Documentation/ioctl/ioctl-number.txt1
-rw-r--r--Documentation/kernel-parameters.txt4
-rw-r--r--Documentation/laptops/thinkpad-acpi.txt127
-rw-r--r--Documentation/lguest/lguest.c721
-rw-r--r--Documentation/lockdep-design.txt6
-rw-r--r--Documentation/networking/6pack.txt2
-rw-r--r--Documentation/sound/alsa/Procfile.txt5
-rw-r--r--Documentation/sysrq.txt7
-rw-r--r--Documentation/video4linux/CARDLIST.em28xx2
-rw-r--r--Documentation/video4linux/gspca.txt32
-rw-r--r--MAINTAINERS2778
-rw-r--r--Makefile2
-rw-r--r--arch/alpha/include/asm/tlb.h4
-rw-r--r--arch/arm/boot/compressed/misc.c1
-rw-r--r--arch/arm/common/clkdev.c1
-rw-r--r--arch/arm/configs/mx27_defconfig270
-rw-r--r--arch/arm/configs/mx3_defconfig151
-rw-r--r--arch/arm/configs/omap3_evm_defconfig2
-rw-r--r--arch/arm/configs/u300_defconfig18
-rw-r--r--arch/arm/include/asm/atomic.h2
-rw-r--r--arch/arm/include/asm/tlb.h4
-rw-r--r--arch/arm/kernel/entry-common.S2
-rw-r--r--arch/arm/kernel/signal.c4
-rw-r--r--arch/arm/mach-at91/include/mach/at_hdmac.h102
-rw-r--r--arch/arm/mach-davinci/board-dm355-evm.c1
-rw-r--r--arch/arm/mach-davinci/board-dm355-leopard.c1
-rw-r--r--arch/arm/mach-davinci/board-dm644x-evm.c1
-rw-r--r--arch/arm/mach-davinci/board-dm646x-evm.c1
-rw-r--r--arch/arm/mach-davinci/board-sffsdr.c1
-rw-r--r--arch/arm/mach-ep93xx/dma-m2p.c1
-rw-r--r--arch/arm/mach-ep93xx/include/mach/ts72xx.h3
-rw-r--r--arch/arm/mach-ep93xx/ts72xx.c18
-rw-r--r--arch/arm/mach-kirkwood/mpp.h2
-rw-r--r--arch/arm/mach-ks8695/include/mach/hardware.h5
-rw-r--r--arch/arm/mach-ks8695/include/mach/timex.h5
-rw-r--r--arch/arm/mach-ks8695/pci.c3
-rw-r--r--arch/arm/mach-mx3/Kconfig8
-rw-r--r--arch/arm/mach-mx3/Makefile1
-rw-r--r--arch/arm/mach-mx3/armadillo5x0.c63
-rw-r--r--arch/arm/mach-mx3/devices.c1
-rw-r--r--arch/arm/mach-mx3/pcm037.c183
-rw-r--r--arch/arm/mach-mx3/pcm037.h11
-rw-r--r--arch/arm/mach-mx3/pcm037_eet.c204
-rw-r--r--arch/arm/mach-omap1/mcbsp.c1
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c5
-rw-r--r--arch/arm/mach-omap2/mcbsp.c1
-rw-r--r--arch/arm/mach-omap2/usb-musb.c21
-rw-r--r--arch/arm/mach-pxa/em-x270.c4
-rw-r--r--arch/arm/mach-pxa/include/mach/mfp-pxa300.h6
-rw-r--r--arch/arm/mach-pxa/palmld.c4
-rw-r--r--arch/arm/mach-pxa/palmt5.c4
-rw-r--r--arch/arm/mach-pxa/palmtx.c4
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c2
-rw-r--r--arch/arm/mach-pxa/treo680.c2
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa300.c2
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa320.c2
-rw-r--r--arch/arm/mach-realview/core.c3
-rw-r--r--arch/arm/mach-s3c2410/include/mach/gpio-core.h2
-rw-r--r--arch/arm/mach-u300/core.c4
-rw-r--r--arch/arm/mach-versatile/core.c3
-rw-r--r--arch/arm/plat-mxc/include/mach/iomux-mx3.h2
-rw-r--r--arch/arm/plat-pxa/gpio.c9
-rw-r--r--arch/arm/plat-s3c24xx/pwm.c4
-rw-r--r--arch/arm/plat-s3c64xx/pm.c2
-rw-r--r--arch/arm/plat-s3c64xx/s3c6400-clock.c4
-rw-r--r--arch/arm/plat-stmp3xxx/pinmux.c1
-rw-r--r--arch/avr32/include/asm/pgalloc.h2
-rw-r--r--arch/blackfin/include/asm/context.S7
-rw-r--r--arch/blackfin/include/asm/cpu.h1
-rw-r--r--arch/blackfin/include/asm/hardirq.h3
-rw-r--r--arch/blackfin/include/asm/processor.h21
-rw-r--r--arch/blackfin/kernel/bfin_dma_5xx.c29
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c6
-rw-r--r--arch/blackfin/kernel/cplb-nompu/cplbinit.c23
-rw-r--r--arch/blackfin/kernel/process.c14
-rw-r--r--arch/blackfin/kernel/setup.c44
-rw-r--r--arch/blackfin/kernel/traps.c9
-rw-r--r--arch/blackfin/lib/lshrdi3.c16
-rw-r--r--arch/blackfin/mach-bf518/boards/ezbrd.c2
-rw-r--r--arch/blackfin/mach-bf518/include/mach/anomaly.h2
-rw-r--r--arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h2
-rw-r--r--arch/blackfin/mach-bf527/boards/cm_bf527.c2
-rw-r--r--arch/blackfin/mach-bf527/boards/ezbrd.c2
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c2
-rw-r--r--arch/blackfin/mach-bf527/include/mach/anomaly.h4
-rw-r--r--arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h2
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c2
-rw-r--r--arch/blackfin/mach-bf533/include/mach/anomaly.h1
-rw-r--r--arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h2
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c4
-rw-r--r--arch/blackfin/mach-bf537/include/mach/anomaly.h2
-rw-r--r--arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h2
-rw-r--r--arch/blackfin/mach-bf538/include/mach/anomaly.h2
-rw-r--r--arch/blackfin/mach-bf538/include/mach/bfin_serial_5xx.h2
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c2
-rw-r--r--arch/blackfin/mach-bf548/include/mach/anomaly.h2
-rw-r--r--arch/blackfin/mach-bf561/include/mach/anomaly.h1
-rw-r--r--arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h2
-rw-r--r--arch/blackfin/mach-bf561/include/mach/mem_map.h23
-rw-r--r--arch/blackfin/mach-common/entry.S12
-rw-r--r--arch/blackfin/mach-common/smp.c10
-rw-r--r--arch/cris/include/asm/pgalloc.h2
-rw-r--r--arch/frv/include/asm/pgalloc.h4
-rw-r--r--arch/frv/include/asm/pgtable.h2
-rw-r--r--arch/ia64/Makefile5
-rw-r--r--arch/ia64/include/asm/bitops.h2
-rw-r--r--arch/ia64/include/asm/pgalloc.h6
-rw-r--r--arch/ia64/include/asm/pgtable.h1
-rw-r--r--arch/ia64/include/asm/tlb.h12
-rw-r--r--arch/ia64/kernel/ia64_ksyms.c4
-rw-r--r--arch/ia64/kernel/iosapic.c4
-rw-r--r--arch/ia64/kernel/pci-dma.c5
-rw-r--r--arch/ia64/kernel/topology.c6
-rw-r--r--arch/ia64/kvm/mmio.c6
-rw-r--r--arch/ia64/kvm/vcpu.c6
-rw-r--r--arch/ia64/kvm/vcpu.h13
-rw-r--r--arch/m32r/include/asm/pgalloc.h4
-rw-r--r--arch/m68k/include/asm/motorola_pgalloc.h6
-rw-r--r--arch/m68k/include/asm/sun3_pgalloc.h4
-rw-r--r--arch/microblaze/Makefile35
-rw-r--r--arch/microblaze/include/asm/io.h1
-rw-r--r--arch/microblaze/include/asm/pgalloc.h4
-rw-r--r--arch/microblaze/include/asm/pgtable.h6
-rw-r--r--arch/microblaze/include/asm/prom.h23
-rw-r--r--arch/microblaze/include/asm/tlb.h2
-rw-r--r--arch/microblaze/include/asm/uaccess.h2
-rw-r--r--arch/microblaze/kernel/Makefile2
-rw-r--r--arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c2
-rw-r--r--arch/microblaze/kernel/cpu/cpuinfo-static.c2
-rw-r--r--arch/microblaze/kernel/cpu/cpuinfo.c2
-rw-r--r--arch/microblaze/kernel/head.S17
-rw-r--r--arch/microblaze/kernel/hw_exception_handler.S109
-rw-r--r--arch/microblaze/kernel/module.c19
-rw-r--r--arch/microblaze/kernel/setup.c8
-rw-r--r--arch/microblaze/kernel/sys_microblaze.c99
-rw-r--r--arch/microblaze/kernel/syscall_table.S2
-rw-r--r--arch/microblaze/mm/fault.c15
-rw-r--r--arch/mips/alchemy/mtx-1/platform.c14
-rw-r--r--arch/mips/ar7/Makefile1
-rw-r--r--arch/mips/ar7/clock.c13
-rw-r--r--arch/mips/ar7/memory.c2
-rw-r--r--arch/mips/ar7/platform.c10
-rw-r--r--arch/mips/ar7/prom.c2
-rw-r--r--arch/mips/ar7/setup.c1
-rw-r--r--arch/mips/cavium-octeon/smp.c4
-rw-r--r--arch/mips/dec/ecc-berr.c2
-rw-r--r--arch/mips/dec/int-handler.S2
-rw-r--r--arch/mips/dec/ioasic-irq.c2
-rw-r--r--arch/mips/dec/kn01-berr.c2
-rw-r--r--arch/mips/dec/kn02-irq.c2
-rw-r--r--arch/mips/dec/kn02xa-berr.c2
-rw-r--r--arch/mips/dec/prom/call_o32.S2
-rw-r--r--arch/mips/dec/prom/console.c2
-rw-r--r--arch/mips/dec/time.c2
-rw-r--r--arch/mips/emma/common/Makefile3
-rw-r--r--arch/mips/emma/common/prom.c3
-rw-r--r--arch/mips/emma/markeins/Makefile3
-rw-r--r--arch/mips/emma/markeins/irq.c3
-rw-r--r--arch/mips/emma/markeins/led.c3
-rw-r--r--arch/mips/emma/markeins/platform.c3
-rw-r--r--arch/mips/emma/markeins/setup.c3
-rw-r--r--arch/mips/fw/lib/call_o32.S2
-rw-r--r--arch/mips/include/asm/emma/emma2rh.h3
-rw-r--r--arch/mips/include/asm/emma/markeins.h3
-rw-r--r--arch/mips/include/asm/gic.h2
-rw-r--r--arch/mips/include/asm/pgalloc.h15
-rw-r--r--arch/mips/include/asm/pmc-sierra/msp71xx/war.h2
-rw-r--r--arch/mips/include/asm/processor.h5
-rw-r--r--arch/mips/include/asm/unistd.h15
-rw-r--r--arch/mips/jazz/jazzdma.c2
-rw-r--r--arch/mips/kernel/head.S3
-rw-r--r--arch/mips/kernel/irq_txx9.c2
-rw-r--r--arch/mips/kernel/module.c12
-rw-r--r--arch/mips/kernel/proc.c2
-rw-r--r--arch/mips/kernel/process.c4
-rw-r--r--arch/mips/kernel/scall32-o32.S1
-rw-r--r--arch/mips/kernel/scall64-64.S1
-rw-r--r--arch/mips/kernel/scall64-n32.S1
-rw-r--r--arch/mips/kernel/scall64-o32.S1
-rw-r--r--arch/mips/kernel/smtc.c13
-rw-r--r--arch/mips/kernel/stacktrace.c2
-rw-r--r--arch/mips/kernel/vpe.c49
-rw-r--r--arch/mips/mipssim/sim_time.c12
-rw-r--r--arch/mips/mm/c-octeon.c4
-rw-r--r--arch/mips/mm/extable.c6
-rw-r--r--arch/mips/mm/fault.c1
-rw-r--r--arch/mips/mti-malta/malta-int.c2
-rw-r--r--arch/mips/nxp/pnx8550/common/time.c2
-rw-r--r--arch/mips/pci/fixup-emma2rh.c3
-rw-r--r--arch/mips/pci/fixup-sb1250.c2
-rw-r--r--arch/mips/pci/ops-emma2rh.c3
-rw-r--r--arch/mips/pci/pci-emma2rh.c3
-rw-r--r--arch/mips/pci/pci-tx4927.c2
-rw-r--r--arch/mips/pci/pci-tx4938.c2
-rw-r--r--arch/mips/pci/pci-tx4939.c2
-rw-r--r--arch/mips/pci/pcie-octeon.c31
-rw-r--r--arch/mips/pmc-sierra/msp71xx/gpio.c2
-rw-r--r--arch/mips/pmc-sierra/msp71xx/gpio_extended.c2
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c12
-rw-r--r--arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c2
-rw-r--r--arch/mips/sibyte/swarm/swarm-i2c.c2
-rw-r--r--arch/mips/txx9/generic/mem_tx4927.c2
-rw-r--r--arch/mips/txx9/generic/setup.c2
-rw-r--r--arch/mips/txx9/rbtx4939/setup.c2
-rw-r--r--arch/mn10300/include/asm/pci.h1
-rw-r--r--arch/mn10300/include/asm/pgalloc.h2
-rw-r--r--arch/mn10300/kernel/vmlinux.lds.S2
-rw-r--r--arch/parisc/include/asm/tlb.h4
-rw-r--r--arch/parisc/kernel/entry.S2
-rw-r--r--arch/parisc/kernel/module.c50
-rw-r--r--arch/powerpc/boot/dts/mpc8377_rdb.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8378_rdb.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8379_rdb.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8569mds.dts4
-rw-r--r--arch/powerpc/configs/83xx/asp8347_defconfig106
-rw-r--r--arch/powerpc/configs/83xx/kmeter1_defconfig176
-rw-r--r--arch/powerpc/configs/83xx/mpc8313_rdb_defconfig168
-rw-r--r--arch/powerpc/configs/83xx/mpc8315_rdb_defconfig168
-rw-r--r--arch/powerpc/configs/83xx/mpc832x_mds_defconfig111
-rw-r--r--arch/powerpc/configs/83xx/mpc832x_rdb_defconfig120
-rw-r--r--arch/powerpc/configs/83xx/mpc834x_itx_defconfig114
-rw-r--r--arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig114
-rw-r--r--arch/powerpc/configs/83xx/mpc834x_mds_defconfig104
-rw-r--r--arch/powerpc/configs/83xx/mpc836x_mds_defconfig111
-rw-r--r--arch/powerpc/configs/83xx/mpc836x_rdk_defconfig104
-rw-r--r--arch/powerpc/configs/83xx/mpc837x_mds_defconfig110
-rw-r--r--arch/powerpc/configs/83xx/mpc837x_rdb_defconfig162
-rw-r--r--arch/powerpc/configs/83xx/sbc834x_defconfig103
-rw-r--r--arch/powerpc/configs/85xx/ksi8560_defconfig93
-rw-r--r--arch/powerpc/configs/85xx/mpc8540_ads_defconfig91
-rw-r--r--arch/powerpc/configs/85xx/mpc8560_ads_defconfig99
-rw-r--r--arch/powerpc/configs/85xx/mpc85xx_cds_defconfig99
-rw-r--r--arch/powerpc/configs/85xx/sbc8548_defconfig96
-rw-r--r--arch/powerpc/configs/85xx/sbc8560_defconfig91
-rw-r--r--arch/powerpc/configs/85xx/socrates_defconfig165
-rw-r--r--arch/powerpc/configs/85xx/stx_gp3_defconfig119
-rw-r--r--arch/powerpc/configs/85xx/tqm8540_defconfig100
-rw-r--r--arch/powerpc/configs/85xx/tqm8541_defconfig101
-rw-r--r--arch/powerpc/configs/85xx/tqm8548_defconfig100
-rw-r--r--arch/powerpc/configs/85xx/tqm8555_defconfig101
-rw-r--r--arch/powerpc/configs/85xx/tqm8560_defconfig101
-rw-r--r--arch/powerpc/configs/85xx/xes_mpc85xx_defconfig118
-rw-r--r--arch/powerpc/configs/86xx/gef_ppc9a_defconfig521
-rw-r--r--arch/powerpc/configs/86xx/gef_sbc310_defconfig216
-rw-r--r--arch/powerpc/configs/86xx/gef_sbc610_defconfig130
-rw-r--r--arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig118
-rw-r--r--arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig186
-rw-r--r--arch/powerpc/configs/86xx/sbc8641d_defconfig112
-rw-r--r--arch/powerpc/configs/adder875_defconfig97
-rw-r--r--arch/powerpc/configs/c2k_defconfig121
-rw-r--r--arch/powerpc/configs/ep8248e_defconfig97
-rw-r--r--arch/powerpc/configs/ep88xc_defconfig91
-rw-r--r--arch/powerpc/configs/linkstation_defconfig116
-rw-r--r--arch/powerpc/configs/mgcoge_defconfig97
-rw-r--r--arch/powerpc/configs/mgsuvd_defconfig89
-rw-r--r--arch/powerpc/configs/mpc7448_hpc2_defconfig103
-rw-r--r--arch/powerpc/configs/mpc8272_ads_defconfig104
-rw-r--r--arch/powerpc/configs/mpc83xx_defconfig162
-rw-r--r--arch/powerpc/configs/mpc85xx_defconfig193
-rw-r--r--arch/powerpc/configs/mpc85xx_smp_defconfig193
-rw-r--r--arch/powerpc/configs/mpc866_ads_defconfig92
-rw-r--r--arch/powerpc/configs/mpc86xx_defconfig186
-rw-r--r--arch/powerpc/configs/mpc885_ads_defconfig91
-rw-r--r--arch/powerpc/configs/pq2fads_defconfig110
-rw-r--r--arch/powerpc/configs/prpmc2800_defconfig158
-rw-r--r--arch/powerpc/configs/storcenter_defconfig108
-rw-r--r--arch/powerpc/include/asm/kvm_host.h2
-rw-r--r--arch/powerpc/include/asm/pgalloc-32.h2
-rw-r--r--arch/powerpc/include/asm/pgalloc-64.h4
-rw-r--r--arch/powerpc/include/asm/pgalloc.h6
-rw-r--r--arch/powerpc/kernel/dma.c6
-rw-r--r--arch/powerpc/kernel/mpc7450-pmu.c3
-rw-r--r--arch/powerpc/kernel/perf_counter.c8
-rw-r--r--arch/powerpc/kernel/power4-pmu.c3
-rw-r--r--arch/powerpc/kernel/power5+-pmu.c5
-rw-r--r--arch/powerpc/kernel/power5-pmu.c3
-rw-r--r--arch/powerpc/kernel/power6-pmu.c3
-rw-r--r--arch/powerpc/kernel/power7-pmu.c3
-rw-r--r--arch/powerpc/kernel/ppc970-pmu.c5
-rw-r--r--arch/powerpc/mm/hugetlbpage.c4
-rw-r--r--arch/powerpc/mm/mmu_context_nohash.c1
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c13
-rw-r--r--arch/s390/include/asm/tlb.h9
-rw-r--r--arch/s390/kernel/early.c7
-rw-r--r--arch/s390/kernel/smp.c7
-rw-r--r--arch/s390/kernel/vdso64/clock_gettime.S11
-rw-r--r--arch/s390/kvm/interrupt.c2
-rw-r--r--arch/s390/kvm/sigp.c7
-rw-r--r--arch/s390/power/swsusp.c36
-rw-r--r--arch/s390/power/swsusp_asm64.S35
-rw-r--r--arch/sh/boards/board-ap325rxa.c2
-rw-r--r--arch/sh/boards/mach-migor/setup.c2
-rw-r--r--arch/sh/include/asm/pgalloc.h10
-rw-r--r--arch/sh/include/asm/tlb.h6
-rw-r--r--arch/sh/kernel/cpu/sh2/setup-sh7619.c2
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-mxg.c2
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-sh7201.c2
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-sh7203.c2
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-sh7206.c2
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7705.c2
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh770x.c2
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7710.c2
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7720.c2
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh4-202.c2
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh7750.c2
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh7760.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7343.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7366.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7722.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7723.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7724.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7763.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7770.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7780.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7785.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7786.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-shx3.c2
-rw-r--r--arch/sh/kernel/cpu/sh5/setup-sh5.c2
-rw-r--r--arch/sparc/include/asm/pgalloc_32.h8
-rw-r--r--arch/sparc/include/asm/tlb_64.h6
-rw-r--r--arch/um/include/asm/pgalloc.h4
-rw-r--r--arch/um/include/asm/tlb.h6
-rw-r--r--arch/x86/Kconfig2
-rw-r--r--arch/x86/boot/compressed/Makefile2
-rw-r--r--arch/x86/include/asm/efi.h5
-rw-r--r--arch/x86/include/asm/irqflags.h8
-rw-r--r--arch/x86/include/asm/lguest.h3
-rw-r--r--arch/x86/include/asm/lguest_hcall.h18
-rw-r--r--arch/x86/include/asm/pgalloc.h25
-rw-r--r--arch/x86/include/asm/pgtable.h12
-rw-r--r--arch/x86/include/asm/uaccess.h4
-rw-r--r--arch/x86/include/asm/uaccess_64.h10
-rw-r--r--arch/x86/include/asm/uv/uv_bau.h2
-rw-r--r--arch/x86/include/asm/uv/uv_hub.h9
-rw-r--r--arch/x86/kernel/apic/io_apic.c3
-rw-r--r--arch/x86/kernel/apic/x2apic_cluster.c10
-rw-r--r--arch/x86/kernel/apic/x2apic_phys.c10
-rw-r--r--arch/x86/kernel/apic/x2apic_uv_x.c42
-rw-r--r--arch/x86/kernel/apm_32.c2
-rw-r--r--arch/x86/kernel/cpu/Makefile4
-rw-r--r--arch/x86/kernel/cpu/amd.c9
-rw-r--r--arch/x86/kernel/cpu/common.c48
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c25
-rw-r--r--arch/x86/kernel/cpu/mcheck/therm_throt.c23
-rw-r--r--arch/x86/kernel/cpu/perf_counter.c281
-rw-r--r--arch/x86/kernel/efi.c4
-rw-r--r--arch/x86/kernel/efi_64.c6
-rw-r--r--arch/x86/kernel/head_32.S6
-rw-r--r--arch/x86/kernel/irqinit.c2
-rw-r--r--arch/x86/kernel/mfgpt_32.c2
-rw-r--r--arch/x86/kernel/reboot.c50
-rw-r--r--arch/x86/kernel/setup.c13
-rw-r--r--arch/x86/kernel/tlb_uv.c1
-rw-r--r--arch/x86/kernel/tsc.c29
-rw-r--r--arch/x86/kernel/vmi_32.c2
-rw-r--r--arch/x86/kernel/vmlinux.lds.S147
-rw-r--r--arch/x86/kvm/i8254.c3
-rw-r--r--arch/x86/kvm/mmu.c48
-rw-r--r--arch/x86/kvm/svm.c6
-rw-r--r--arch/x86/kvm/vmx.c6
-rw-r--r--arch/x86/kvm/x86.c44
-rw-r--r--arch/x86/lguest/boot.c509
-rw-r--r--arch/x86/lguest/i386_head.S112
-rw-r--r--arch/x86/lib/msr.c26
-rw-r--r--arch/x86/mm/highmem_32.c1
-rw-r--r--arch/x86/mm/init_64.c2
-rw-r--r--arch/x86/mm/pageattr.c39
-rw-r--r--arch/x86/mm/pat.c3
-rw-r--r--arch/x86/mm/pgtable.c7
-rw-r--r--arch/x86/mm/srat_64.c6
-rw-r--r--arch/x86/xen/Makefile4
-rw-r--r--arch/x86/xen/enlighten.c22
-rw-r--r--arch/xtensa/include/asm/tlb.h2
-rw-r--r--block/Kconfig11
-rw-r--r--block/blk-core.c19
-rw-r--r--block/blk-integrity.c1
-rw-r--r--block/blk-settings.c84
-rw-r--r--block/blk-sysfs.c11
-rw-r--r--block/elevator.c13
-rw-r--r--crypto/async_tx/async_xor.c2
-rw-r--r--drivers/acpi/acpi_memhotplug.c34
-rw-r--r--drivers/acpi/acpica/acobject.h1
-rw-r--r--drivers/acpi/acpica/dsopcode.c24
-rw-r--r--drivers/acpi/acpica/exfldio.c6
-rw-r--r--drivers/acpi/osl.c25
-rw-r--r--drivers/acpi/sleep.c8
-rw-r--r--drivers/acpi/system.c2
-rw-r--r--drivers/ata/ahci.c83
-rw-r--r--drivers/ata/ata_piix.c3
-rw-r--r--drivers/ata/libata-core.c33
-rw-r--r--drivers/ata/libata-eh.c2
-rw-r--r--drivers/ata/pata_at91.c84
-rw-r--r--drivers/ata/pata_atiixp.c19
-rw-r--r--drivers/ata/pata_octeon_cf.c3
-rw-r--r--drivers/ata/pata_pcmcia.c1
-rw-r--r--drivers/ata/sata_mv.c2
-rw-r--r--drivers/ata/sata_nv.c8
-rw-r--r--drivers/ata/sata_sil.c2
-rw-r--r--drivers/base/firmware_class.c1
-rw-r--r--drivers/base/platform.c3
-rw-r--r--drivers/base/sys.c2
-rw-r--r--drivers/block/ataflop.c2
-rw-r--r--drivers/block/mg_disk.c101
-rw-r--r--drivers/block/virtio_blk.c7
-rw-r--r--drivers/block/z2ram.c2
-rw-r--r--drivers/char/agp/parisc-agp.c2
-rw-r--r--drivers/char/hvc_console.c2
-rw-r--r--drivers/char/n_tty.c1
-rw-r--r--drivers/char/nozomi.c4
-rw-r--r--drivers/char/pcmcia/ipwireless/tty.c4
-rw-r--r--drivers/char/pty.c2
-rw-r--r--drivers/char/specialix.c24
-rw-r--r--drivers/char/sysrq.c8
-rw-r--r--drivers/char/tty_buffer.c13
-rw-r--r--drivers/char/tty_ldisc.c152
-rw-r--r--drivers/char/vc_screen.c4
-rw-r--r--drivers/char/vr41xx_giu.c0
-rw-r--r--drivers/connector/cn_queue.c2
-rw-r--r--drivers/connector/connector.c4
-rw-r--r--drivers/cpufreq/cpufreq.c27
-rw-r--r--drivers/cpufreq/cpufreq_conservative.c6
-rw-r--r--drivers/dma/Kconfig12
-rw-r--r--drivers/dma/Makefile1
-rw-r--r--drivers/dma/at_hdmac.c1213
-rw-r--r--drivers/dma/at_hdmac_regs.h353
-rw-r--r--drivers/dma/dmatest.c21
-rw-r--r--drivers/dma/fsldma.c17
-rw-r--r--drivers/dma/fsldma.h1
-rw-r--r--drivers/dma/mv_xor.c2
-rw-r--r--drivers/edac/amd64_edac.c9
-rw-r--r--drivers/edac/x38_edac.c2
-rw-r--r--drivers/gpu/drm/drm_crtc.c2
-rw-r--r--drivers/gpu/drm/drm_crtc_helper.c6
-rw-r--r--drivers/gpu/drm/drm_irq.c2
-rw-r--r--drivers/gpu/drm/drm_modes.c2
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c15
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h4
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c4
-rw-r--r--drivers/gpu/drm/i915/i915_gem_debugfs.c2
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c239
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h45
-rw-r--r--drivers/gpu/drm/i915/i915_suspend.c2
-rw-r--r--drivers/gpu/drm/i915/intel_bios.c40
-rw-r--r--drivers/gpu/drm/i915/intel_bios.h45
-rw-r--r--drivers/gpu/drm/i915/intel_crt.c12
-rw-r--r--drivers/gpu/drm/i915/intel_display.c759
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c216
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h3
-rw-r--r--drivers/gpu/drm/i915/intel_hdmi.c64
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c12
-rw-r--r--drivers/gpu/drm/i915/intel_sdvo.c254
-rw-r--r--drivers/gpu/drm/i915/intel_tv.c22
-rw-r--r--drivers/gpu/drm/radeon/Makefile3
-rw-r--r--drivers/gpu/drm/radeon/atombios_crtc.c293
-rw-r--r--drivers/gpu/drm/radeon/r100.c773
-rw-r--r--drivers/gpu/drm/radeon/r300.c78
-rw-r--r--drivers/gpu/drm/radeon/r300_reg.h4
-rw-r--r--drivers/gpu/drm/radeon/r500_reg.h2
-rw-r--r--drivers/gpu/drm/radeon/r520.c22
-rw-r--r--drivers/gpu/drm/radeon/r600.c5
-rw-r--r--drivers/gpu/drm/radeon/r600_cp.c22
-rw-r--r--drivers/gpu/drm/radeon/radeon.h87
-rw-r--r--drivers/gpu/drm/radeon/radeon_asic.h32
-rw-r--r--drivers/gpu/drm/radeon/radeon_atombios.c9
-rw-r--r--drivers/gpu/drm/radeon/radeon_benchmark.c4
-rw-r--r--drivers/gpu/drm/radeon/radeon_cs.c8
-rw-r--r--drivers/gpu/drm/radeon/radeon_cursor.c9
-rw-r--r--drivers/gpu/drm/radeon/radeon_device.c61
-rw-r--r--drivers/gpu/drm/radeon/radeon_display.c74
-rw-r--r--drivers/gpu/drm/radeon/radeon_drv.c21
-rw-r--r--drivers/gpu/drm/radeon/radeon_drv.h1
-rw-r--r--drivers/gpu/drm/radeon/radeon_encoders.c359
-rw-r--r--drivers/gpu/drm/radeon/radeon_fb.c70
-rw-r--r--drivers/gpu/drm/radeon/radeon_fence.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_gart.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_gem.c45
-rw-r--r--drivers/gpu/drm/radeon/radeon_kms.c4
-rw-r--r--drivers/gpu/drm/radeon/radeon_legacy_crtc.c687
-rw-r--r--drivers/gpu/drm/radeon/radeon_legacy_encoders.c188
-rw-r--r--drivers/gpu/drm/radeon/radeon_mode.h51
-rw-r--r--drivers/gpu/drm/radeon/radeon_object.c158
-rw-r--r--drivers/gpu/drm/radeon/radeon_ring.c15
-rw-r--r--drivers/gpu/drm/radeon/radeon_share.h39
-rw-r--r--drivers/gpu/drm/radeon/radeon_test.c209
-rw-r--r--drivers/gpu/drm/radeon/radeon_ttm.c24
-rw-r--r--drivers/gpu/drm/radeon/rs400.c30
-rw-r--r--drivers/gpu/drm/radeon/rs600.c7
-rw-r--r--drivers/gpu/drm/radeon/rs690.c479
-rw-r--r--drivers/gpu/drm/radeon/rs690r.h99
-rw-r--r--drivers/gpu/drm/radeon/rv515.c799
-rw-r--r--drivers/gpu/drm/radeon/rv515r.h170
-rw-r--r--drivers/gpu/drm/radeon/rv770.c2
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c70
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo_util.c69
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo_vm.c3
-rw-r--r--drivers/gpu/drm/ttm/ttm_tt.c25
-rw-r--r--drivers/hid/hid-core.c6
-rw-r--r--drivers/hid/usbhid/hiddev.c4
-rw-r--r--drivers/hwmon/asus_atk0110.c6
-rw-r--r--drivers/hwmon/smsc47m1.c11
-rw-r--r--drivers/i2c/busses/i2c-omap.c42
-rw-r--r--drivers/i2c/busses/i2c-s3c2410.c5
-rw-r--r--drivers/i2c/busses/i2c-sh_mobile.c2
-rw-r--r--drivers/i2c/chips/tsl2550.c17
-rw-r--r--drivers/ide/ide-disk.c1
-rw-r--r--drivers/ide/ide-tape.c1
-rw-r--r--drivers/input/evdev.c3
-rw-r--r--drivers/input/joydev.c2
-rw-r--r--drivers/input/joystick/xpad.c26
-rw-r--r--drivers/input/keyboard/atkbd.c32
-rw-r--r--drivers/input/keyboard/matrix_keypad.c18
-rw-r--r--drivers/input/misc/pcspkr.c8
-rw-r--r--drivers/input/misc/wistron_btns.c25
-rw-r--r--drivers/input/serio/hp_sdc_mlc.c2
-rw-r--r--drivers/input/serio/i8042-x86ia64io.h8
-rw-r--r--drivers/isdn/gigaset/interface.c2
-rw-r--r--drivers/isdn/mISDN/l1oip_core.c6
-rw-r--r--drivers/lguest/core.c119
-rw-r--r--drivers/lguest/hypercalls.c145
-rw-r--r--drivers/lguest/interrupts_and_traps.c288
-rw-r--r--drivers/lguest/lg.h32
-rw-r--r--drivers/lguest/lguest_device.c160
-rw-r--r--drivers/lguest/lguest_user.c232
-rw-r--r--drivers/lguest/page_tables.c489
-rw-r--r--drivers/lguest/segments.c106
-rw-r--r--drivers/lguest/x86/core.c374
-rw-r--r--drivers/lguest/x86/switcher_32.S22
-rw-r--r--drivers/md/dm-crypt.c2
-rw-r--r--drivers/md/dm-delay.c4
-rw-r--r--drivers/md/dm-linear.c2
-rw-r--r--drivers/md/dm-mpath.c2
-rw-r--r--drivers/md/dm-raid1.c3
-rw-r--r--drivers/md/dm-stripe.c7
-rw-r--r--drivers/md/dm-table.c15
-rw-r--r--drivers/md/dm.c10
-rw-r--r--drivers/md/dm.h1
-rw-r--r--drivers/md/linear.c2
-rw-r--r--drivers/md/md.c176
-rw-r--r--drivers/md/md.h12
-rw-r--r--drivers/md/multipath.c5
-rw-r--r--drivers/md/raid0.c1
-rw-r--r--drivers/md/raid1.c7
-rw-r--r--drivers/md/raid10.c4
-rw-r--r--drivers/md/raid5.c85
-rw-r--r--drivers/media/dvb/b2c2/flexcop-fe-tuner.c67
-rw-r--r--drivers/media/dvb/frontends/af9013.c25
-rw-r--r--drivers/media/video/bt8xx/bttv-cards.c92
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c1
-rw-r--r--drivers/media/video/bt8xx/bttv.h1
-rw-r--r--drivers/media/video/cx23885/cx23885-417.c4
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c134
-rw-r--r--drivers/media/video/em28xx/em28xx-core.c22
-rw-r--r--drivers/media/video/em28xx/em28xx-dvb.c62
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c16
-rw-r--r--drivers/media/video/em28xx/em28xx.h31
-rw-r--r--drivers/media/video/gspca/Kconfig16
-rw-r--r--drivers/media/video/gspca/Makefile2
-rw-r--r--drivers/media/video/gspca/conex.c2
-rw-r--r--drivers/media/video/gspca/gspca.c73
-rw-r--r--drivers/media/video/gspca/gspca.h9
-rw-r--r--drivers/media/video/gspca/m5602/m5602_s5k4aa.c6
-rw-r--r--drivers/media/video/gspca/mars.c2
-rw-r--r--drivers/media/video/gspca/sn9c20x.c2434
-rw-r--r--drivers/media/video/gspca/sonixj.c4
-rw-r--r--drivers/media/video/gspca/spca500.c2
-rw-r--r--drivers/media/video/gspca/stk014.c2
-rw-r--r--drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c16
-rw-r--r--drivers/media/video/gspca/sunplus.c2
-rw-r--r--drivers/media/video/gspca/zc3xx.c2
-rw-r--r--drivers/media/video/mt9v011.c69
-rw-r--r--drivers/mfd/twl4030-irq.c55
-rw-r--r--drivers/misc/cb710/sgbuf2.c4
-rw-r--r--drivers/misc/eeprom/at25.c4
-rw-r--r--drivers/mmc/host/cb710-mmc.c6
-rw-r--r--drivers/mmc/host/imxmmc.c2
-rw-r--r--drivers/mmc/host/mvsdio.c4
-rw-r--r--drivers/mmc/host/pxamci.c4
-rw-r--r--drivers/mmc/host/sdhci-of.c10
-rw-r--r--drivers/mmc/host/sdhci.c15
-rw-r--r--drivers/mmc/host/sdhci.h1
-rw-r--r--drivers/mtd/maps/Kconfig7
-rw-r--r--drivers/mtd/maps/Makefile1
-rw-r--r--drivers/mtd/maps/sbc8240.c250
-rw-r--r--drivers/mtd/mtd_blkdevs.c6
-rw-r--r--drivers/mtd/mtdblock.c16
-rw-r--r--drivers/mtd/mtdcore.c7
-rw-r--r--drivers/mtd/onenand/omap2.c3
-rw-r--r--drivers/mtd/ubi/eba.c1
-rw-r--r--drivers/mtd/ubi/gluebi.c1
-rw-r--r--drivers/mtd/ubi/scan.c15
-rw-r--r--drivers/net/3c515.c4
-rw-r--r--drivers/net/3c59x.c10
-rw-r--r--drivers/net/Kconfig7
-rw-r--r--drivers/net/Makefile1
-rw-r--r--drivers/net/arm/Kconfig8
-rw-r--r--drivers/net/arm/Makefile1
-rw-r--r--drivers/net/arm/at91_ether.c3
-rw-r--r--drivers/net/arm/w90p910_ether.c1105
-rw-r--r--drivers/net/at1700.c2
-rw-r--r--drivers/net/atl1c/atl1c.h8
-rw-r--r--drivers/net/atl1c/atl1c_main.c2
-rw-r--r--drivers/net/benet/be_main.c8
-rw-r--r--drivers/net/bnx2x_link.c3
-rw-r--r--drivers/net/bonding/bond_main.c12
-rw-r--r--drivers/net/can/dev.c8
-rw-r--r--drivers/net/can/sja1000/sja1000.c1
-rw-r--r--drivers/net/cnic.c23
-rw-r--r--drivers/net/e100.c3
-rw-r--r--drivers/net/eepro.c2
-rw-r--r--drivers/net/eexpress.c6
-rw-r--r--drivers/net/ehea/ehea.h2
-rw-r--r--drivers/net/ehea/ehea_main.c3
-rw-r--r--drivers/net/fealnx.c3
-rw-r--r--drivers/net/fs_enet/fs_enet-main.c20
-rw-r--r--drivers/net/gianfar.c24
-rw-r--r--drivers/net/gianfar_ethtool.c10
-rw-r--r--drivers/net/hamradio/6pack.c2
-rw-r--r--drivers/net/ibm_newemac/rgmii.c7
-rw-r--r--drivers/net/igbvf/vf.c4
-rw-r--r--drivers/net/ixgbe/ixgbe.h3
-rw-r--r--drivers/net/ixgbe/ixgbe_82598.c67
-rw-r--r--drivers/net/ixgbe/ixgbe_dcb_nl.c30
-rw-r--r--drivers/net/ixgbe/ixgbe_ethtool.c11
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c77
-rw-r--r--drivers/net/ixgbe/ixgbe_type.h8
-rw-r--r--drivers/net/jazzsonic.c1
-rw-r--r--drivers/net/ks8851.c1322
-rw-r--r--drivers/net/ks8851.h296
-rw-r--r--drivers/net/macsonic.c15
-rw-r--r--drivers/net/mlx4/en_ethtool.c2
-rw-r--r--drivers/net/mlx4/en_tx.c1
-rw-r--r--drivers/net/netxen/netxen_nic.h3
-rw-r--r--drivers/net/netxen/netxen_nic_ctx.c13
-rw-r--r--drivers/net/netxen/netxen_nic_hw.c9
-rw-r--r--drivers/net/netxen/netxen_nic_init.c12
-rw-r--r--drivers/net/netxen/netxen_nic_main.c73
-rw-r--r--drivers/net/pcmcia/3c589_cs.c21
-rw-r--r--drivers/net/pcnet32.c30
-rw-r--r--drivers/net/phy/mdio-gpio.c77
-rw-r--r--drivers/net/ppp_generic.c34
-rw-r--r--drivers/net/pppoe.c1
-rw-r--r--drivers/net/pppol2tp.c1
-rw-r--r--drivers/net/r8169.c13
-rw-r--r--drivers/net/s6gmac.c2
-rw-r--r--drivers/net/sc92031.c1
-rw-r--r--drivers/net/skge.c4
-rw-r--r--drivers/net/sky2.c37
-rw-r--r--drivers/net/sky2.h1
-rw-r--r--drivers/net/smc91x.h3
-rw-r--r--drivers/net/tokenring/ibmtr.c2
-rw-r--r--drivers/net/tulip/de4x5.c6
-rw-r--r--drivers/net/ucc_geth.c23
-rw-r--r--drivers/net/usb/Kconfig8
-rw-r--r--drivers/net/usb/Makefile1
-rw-r--r--drivers/net/usb/cdc-phonet.c461
-rw-r--r--drivers/net/usb/cdc_eem.c2
-rw-r--r--drivers/net/wireless/airo.c13
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/ani.c12
-rw-r--r--drivers/net/wireless/ath/ath9k/eeprom.c4
-rw-r--r--drivers/net/wireless/ath/regd.c17
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debugfs.c12
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.c12
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c17
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c11
-rw-r--r--drivers/net/wireless/iwmc3200wifi/commands.c1
-rw-r--r--drivers/net/wireless/iwmc3200wifi/netdev.c8
-rw-r--r--drivers/net/wireless/libertas/11d.c2
-rw-r--r--drivers/net/wireless/libertas/assoc.c18
-rw-r--r--drivers/net/wireless/libertas/cmd.c8
-rw-r--r--drivers/net/wireless/libertas/defs.h2
-rw-r--r--drivers/net/wireless/libertas/scan.c3
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c6
-rw-r--r--drivers/net/wireless/p54/p54spi.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c4
-rw-r--r--drivers/net/wireless/rtl818x/rtl8187_leds.c3
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c2
-rw-r--r--drivers/of/of_mdio.c42
-rw-r--r--drivers/parisc/ccio-dma.c1
-rw-r--r--drivers/parisc/dino.c2
-rw-r--r--drivers/parisc/eisa_eeprom.c2
-rw-r--r--drivers/parisc/hppb.c9
-rw-r--r--drivers/parisc/lba_pci.c2
-rw-r--r--drivers/parisc/pdc_stable.c2
-rw-r--r--drivers/pci/hotplug/sgi_hotplug.c7
-rw-r--r--drivers/pci/intel-iommu.c25
-rw-r--r--drivers/pci/setup-res.c4
-rw-r--r--drivers/platform/x86/Kconfig25
-rw-r--r--drivers/platform/x86/acer-wmi.c2
-rw-r--r--drivers/platform/x86/eeepc-laptop.c9
-rw-r--r--drivers/platform/x86/hp-wmi.c12
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c390
-rw-r--r--drivers/power/Kconfig7
-rw-r--r--drivers/power/Makefile1
-rw-r--r--drivers/power/ds2782_battery.c330
-rw-r--r--drivers/power/olpc_battery.c26
-rw-r--r--drivers/rtc/rtc-cmos.c23
-rw-r--r--drivers/s390/crypto/ap_bus.c9
-rw-r--r--drivers/s390/scsi/zfcp_erp.c68
-rw-r--r--drivers/s390/scsi/zfcp_fc.c8
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c56
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c25
-rw-r--r--drivers/s390/scsi/zfcp_sysfs.c7
-rw-r--r--drivers/scsi/libfc/fc_exch.c23
-rw-r--r--drivers/scsi/libiscsi.c4
-rw-r--r--drivers/scsi/libsas/sas_expander.c147
-rw-r--r--drivers/scsi/libsas/sas_port.c19
-rw-r--r--drivers/scsi/qla4xxx/ql4_dbg.c15
-rw-r--r--drivers/scsi/qla4xxx/ql4_def.h9
-rw-r--r--drivers/scsi/qla4xxx/ql4_fw.h7
-rw-r--r--drivers/scsi/qla4xxx/ql4_iocb.c133
-rw-r--r--drivers/scsi/qla4xxx/ql4_isr.c145
-rw-r--r--drivers/scsi/qla4xxx/ql4_mbx.c10
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c40
-rw-r--r--drivers/scsi/qla4xxx/ql4_version.h2
-rw-r--r--drivers/scsi/scsi_transport_iscsi.c4
-rw-r--r--drivers/scsi/sd.c20
-rw-r--r--drivers/serial/atmel_serial.c2
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_cpm2.c2
-rw-r--r--drivers/serial/s3c2400.c8
-rw-r--r--drivers/serial/s3c2410.c8
-rw-r--r--drivers/serial/s3c2412.c8
-rw-r--r--drivers/serial/s3c2440.c8
-rw-r--r--drivers/serial/s3c24a0.c8
-rw-r--r--drivers/serial/s3c6400.c8
-rw-r--r--drivers/serial/serial_ks8695.c2
-rw-r--r--drivers/spi/omap2_mcspi.c32
-rw-r--r--drivers/staging/Kconfig2
-rw-r--r--drivers/staging/Makefile1
-rw-r--r--drivers/staging/android/lowmemorykiller.c8
-rw-r--r--drivers/staging/b3dfg/Kconfig1
-rw-r--r--drivers/staging/heci/Kconfig1
-rw-r--r--drivers/staging/rspiusb/rspiusb.c2
-rw-r--r--drivers/staging/rt2860/rt_linux.h13
-rw-r--r--drivers/staging/rt2870/2870_main_dev.c67
-rw-r--r--drivers/staging/rt2870/common/2870_rtmp_init.c33
-rw-r--r--drivers/staging/rt2870/common/rtusb_io.c3
-rw-r--r--drivers/staging/rt2870/rt2870.h9
-rw-r--r--drivers/staging/rtl8192su/ieee80211.h2
-rw-r--r--drivers/staging/rtl8192su/ieee80211/ieee80211.h2
-rw-r--r--drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c3
-rw-r--r--drivers/staging/rtl8192su/r8192U_core.c2
-rw-r--r--drivers/staging/serqt_usb2/serqt_usb2.c20
-rw-r--r--drivers/staging/uc2322/Kconfig10
-rw-r--r--drivers/staging/uc2322/Makefile1
-rw-r--r--drivers/staging/uc2322/TODO7
-rw-r--r--drivers/staging/uc2322/aten2011.c2430
-rw-r--r--drivers/staging/udlfb/udlfb.c1
-rw-r--r--drivers/usb/class/cdc-acm.c12
-rw-r--r--drivers/usb/class/cdc-acm.h2
-rw-r--r--drivers/usb/core/config.c48
-rw-r--r--drivers/usb/core/devio.c10
-rw-r--r--drivers/usb/host/ehci-hcd.c3
-rw-r--r--drivers/usb/host/ehci-orion.c2
-rw-r--r--drivers/usb/host/ehci-q.c15
-rw-r--r--drivers/usb/host/ehci-sched.c1
-rw-r--r--drivers/usb/host/ohci-omap.c1
-rw-r--r--drivers/usb/host/xhci-dbg.c199
-rw-r--r--drivers/usb/host/xhci-hcd.c290
-rw-r--r--drivers/usb/host/xhci-mem.c300
-rw-r--r--drivers/usb/host/xhci-pci.c1
-rw-r--r--drivers/usb/host/xhci-ring.c305
-rw-r--r--drivers/usb/host/xhci.h148
-rw-r--r--drivers/usb/misc/Kconfig2
-rw-r--r--drivers/usb/musb/Kconfig1
-rw-r--r--drivers/usb/musb/musb_core.c3
-rw-r--r--drivers/usb/musb/musb_gadget_ep0.c2
-rw-r--r--drivers/usb/musb/musb_regs.h1
-rw-r--r--drivers/usb/serial/cp210x.c3
-rw-r--r--drivers/usb/serial/ftdi_sio.c4
-rw-r--r--drivers/usb/serial/ftdi_sio.h21
-rw-r--r--drivers/usb/serial/mos7720.c2
-rw-r--r--drivers/usb/serial/mos7840.c9
-rw-r--r--drivers/usb/serial/option.c133
-rw-r--r--drivers/usb/serial/pl2303.c1
-rw-r--r--drivers/usb/serial/pl2303.h4
-rw-r--r--drivers/usb/serial/ti_usb_3410_5052.c4
-rw-r--r--drivers/usb/serial/usb-serial.c36
-rw-r--r--drivers/usb/storage/transport.c2
-rw-r--r--drivers/usb/storage/unusual_devs.h7
-rw-r--r--drivers/video/backlight/jornada720_bl.c2
-rw-r--r--drivers/video/backlight/pwm_bl.c2
-rw-r--r--drivers/video/console/fbcon.c6
-rw-r--r--drivers/video/console/fbcon_rotate.h2
-rw-r--r--drivers/video/console/sticore.c9
-rw-r--r--drivers/video/fbmon.c4
-rw-r--r--drivers/video/mx3fb.c86
-rw-r--r--drivers/video/s3c-fb.c4
-rw-r--r--drivers/video/via/hw.c4
-rw-r--r--drivers/video/via/lcd.c15
-rw-r--r--drivers/video/via/viafbdev.c101
-rw-r--r--drivers/video/via/viafbdev.h3
-rw-r--r--drivers/virtio/virtio_pci.c240
-rw-r--r--drivers/w1/masters/omap_hdq.c1
-rw-r--r--drivers/watchdog/coh901327_wdt.c11
-rw-r--r--drivers/watchdog/ep93xx_wdt.c1
-rw-r--r--drivers/watchdog/ks8695_wdt.c4
-rw-r--r--fs/9p/vfs_addr.c2
-rw-r--r--fs/Kconfig27
-rw-r--r--fs/binfmt_flat.c17
-rw-r--r--fs/block_dev.c10
-rw-r--r--fs/btrfs/async-thread.c4
-rw-r--r--fs/btrfs/ctree.c121
-rw-r--r--fs/btrfs/ctree.h27
-rw-r--r--fs/btrfs/disk-io.c15
-rw-r--r--fs/btrfs/extent-tree.c530
-rw-r--r--fs/btrfs/free-space-cache.c1058
-rw-r--r--fs/btrfs/free-space-cache.h8
-rw-r--r--fs/btrfs/inode.c5
-rw-r--r--fs/btrfs/print-tree.c6
-rw-r--r--fs/btrfs/relocation.c12
-rw-r--r--fs/btrfs/transaction.c56
-rw-r--r--fs/btrfs/transaction.h1
-rw-r--r--fs/btrfs/tree-log.c2
-rw-r--r--fs/btrfs/volumes.c46
-rw-r--r--fs/btrfs/zlib.c6
-rw-r--r--fs/cifs/CHANGES7
-rw-r--r--fs/cifs/README25
-rw-r--r--fs/cifs/cifs_debug.c8
-rw-r--r--fs/cifs/cifs_dfs_ref.c12
-rw-r--r--fs/cifs/cifs_unicode.c2
-rw-r--r--fs/cifs/cifsfs.c4
-rw-r--r--fs/cifs/cifsglob.h2
-rw-r--r--fs/cifs/cifssmb.c5
-rw-r--r--fs/cifs/connect.c64
-rw-r--r--fs/cifs/inode.c9
-rw-r--r--fs/compat_ioctl.c1
-rw-r--r--fs/ecryptfs/keystore.c13
-rw-r--r--fs/ext3/dir.c3
-rw-r--r--fs/ext3/inode.c32
-rw-r--r--fs/gfs2/aops.c39
-rw-r--r--fs/gfs2/glock.c138
-rw-r--r--fs/gfs2/glock.h3
-rw-r--r--fs/gfs2/glops.c21
-rw-r--r--fs/gfs2/incore.h2
-rw-r--r--fs/gfs2/rgrp.c23
-rw-r--r--fs/gfs2/super.c40
-rw-r--r--fs/gfs2/super.h4
-rw-r--r--fs/inode.c40
-rw-r--r--fs/jbd/journal.c26
-rw-r--r--fs/jbd/transaction.c68
-rw-r--r--fs/jffs2/file.c2
-rw-r--r--fs/jfs/acl.c4
-rw-r--r--fs/namespace.c3
-rw-r--r--fs/nfs/client.c18
-rw-r--r--fs/nfs/dir.c2
-rw-r--r--fs/nfs/direct.c20
-rw-r--r--fs/nfs/nfs4_fs.h6
-rw-r--r--fs/nfs/nfs4proc.c40
-rw-r--r--fs/nfs/nfs4state.c2
-rw-r--r--fs/nfs/read.c6
-rw-r--r--fs/nfs/write.c6
-rw-r--r--fs/nilfs2/Kconfig25
-rw-r--r--fs/nilfs2/mdt.c4
-rw-r--r--fs/nilfs2/segment.c16
-rw-r--r--fs/notify/Kconfig12
-rw-r--r--fs/notify/dnotify/Kconfig2
-rw-r--r--fs/notify/fsnotify.c4
-rw-r--r--fs/notify/inotify/Kconfig2
-rw-r--r--fs/notify/inotify/inotify_user.c109
-rw-r--r--fs/notify/notification.c19
-rw-r--r--fs/ocfs2/alloc.c47
-rw-r--r--fs/ocfs2/aops.c69
-rw-r--r--fs/ocfs2/dcache.c35
-rw-r--r--fs/ocfs2/dcache.h3
-rw-r--r--fs/ocfs2/dlm/dlmast.c1
-rw-r--r--fs/ocfs2/dlm/dlmrecovery.c2
-rw-r--r--fs/ocfs2/file.c5
-rw-r--r--fs/ocfs2/journal.c8
-rw-r--r--fs/ocfs2/journal.h19
-rw-r--r--fs/ocfs2/ocfs2.h22
-rw-r--r--fs/ocfs2/quota.h1
-rw-r--r--fs/ocfs2/quota_global.c134
-rw-r--r--fs/ocfs2/quota_local.c110
-rw-r--r--fs/ocfs2/stack_o2cb.c3
-rw-r--r--fs/ocfs2/super.c30
-rw-r--r--fs/ocfs2/xattr.c3
-rw-r--r--fs/pipe.c4
-rw-r--r--fs/proc/base.c27
-rw-r--r--fs/proc/task_mmu.c1
-rw-r--r--fs/proc/task_nommu.c1
-rw-r--r--fs/quota/dquot.c7
-rw-r--r--fs/ramfs/file-nommu.c1
-rw-r--r--fs/sysfs/dir.c2
-rw-r--r--fs/udf/super.c12
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.c8
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.c4
-rw-r--r--fs/xfs/xfs_attr.c8
-rw-r--r--fs/xfs/xfs_bmap.c2
-rw-r--r--fs/xfs/xfs_btree.c4
-rw-r--r--fs/xfs/xfs_da_btree.c6
-rw-r--r--fs/xfs/xfs_dir2.c2
-rw-r--r--fs/xfs/xfs_fsops.c20
-rw-r--r--fs/xfs/xfs_iget.c142
-rw-r--r--fs/xfs/xfs_inode.c10
-rw-r--r--fs/xfs/xfs_inode.h17
-rw-r--r--fs/xfs/xfs_log.c2
-rw-r--r--fs/xfs/xfs_vnodeops.c4
-rw-r--r--include/acpi/acpiosxf.h4
-rw-r--r--include/asm-generic/4level-fixup.h4
-rw-r--r--include/asm-generic/pgtable-nopmd.h2
-rw-r--r--include/asm-generic/pgtable-nopud.h2
-rw-r--r--include/asm-generic/tlb.h12
-rw-r--r--include/asm-generic/vmlinux.lds.h19
-rw-r--r--include/drm/drm_pciids.h10
-rw-r--r--include/drm/radeon_drm.h23
-rw-r--r--include/drm/ttm/ttm_bo_driver.h20
-rw-r--r--include/drm/ttm/ttm_module.h2
-rw-r--r--include/linux/blkdev.h1
-rw-r--r--include/linux/cb710.h29
-rw-r--r--include/linux/cgroup.h28
-rw-r--r--include/linux/clocksource.h14
-rw-r--r--include/linux/decompress/generic.h32
-rw-r--r--include/linux/device-mapper.h4
-rw-r--r--include/linux/ext3_fs.h2
-rw-r--r--include/linux/flex_array.h47
-rw-r--r--include/linux/fs.h4
-rw-r--r--include/linux/fsnotify_backend.h2
-rw-r--r--include/linux/ftrace_event.h12
-rw-r--r--include/linux/inetdevice.h2
-rw-r--r--include/linux/input/matrix_keypad.h13
-rw-r--r--include/linux/interrupt.h28
-rw-r--r--include/linux/iocontext.h2
-rw-r--r--include/linux/kvm_host.h1
-rw-r--r--include/linux/lguest.h39
-rw-r--r--include/linux/lguest_launcher.h18
-rw-r--r--include/linux/libata.h1
-rw-r--r--include/linux/mtd/mtd.h2
-rw-r--r--include/linux/mtd/partitions.h2
-rw-r--r--include/linux/nfs_fs.h5
-rw-r--r--include/linux/nodemask.h28
-rw-r--r--include/linux/of_mdio.h3
-rw-r--r--include/linux/perf_counter.h74
-rw-r--r--include/linux/pps.h2
-rw-r--r--include/linux/rfkill.h2
-rw-r--r--include/linux/scatterlist.h2
-rw-r--r--include/linux/sched.h3
-rw-r--r--include/linux/tty.h1
-rw-r--r--include/linux/tty_ldisc.h2
-rw-r--r--include/linux/uio.h17
-rw-r--r--include/linux/videodev2.h1
-rw-r--r--include/linux/virtio_blk.h6
-rw-r--r--include/linux/virtio_config.h3
-rw-r--r--include/linux/virtio_net.h6
-rw-r--r--include/linux/virtio_ring.h12
-rw-r--r--include/linux/wait.h9
-rw-r--r--include/media/v4l2-chip-ident.h12
-rw-r--r--include/net/bluetooth/rfcomm.h12
-rw-r--r--include/net/cfg80211.h5
-rw-r--r--include/net/rose.h2
-rw-r--r--include/net/sock.h32
-rw-r--r--include/net/tcp.h5
-rw-r--r--include/trace/ftrace.h183
-rw-r--r--init/Kconfig13
-rw-r--r--kernel/cgroup.c151
-rw-r--r--kernel/fork.c30
-rw-r--r--kernel/freezer.c7
-rw-r--r--kernel/futex.c28
-rw-r--r--kernel/futex_compat.c6
-rw-r--r--kernel/irq/internals.h3
-rw-r--r--kernel/irq/manage.c72
-rw-r--r--kernel/irq/migration.c2
-rw-r--r--kernel/irq/numa_migrate.c4
-rw-r--r--kernel/kexec.c2
-rw-r--r--kernel/kprobes.c2
-rw-r--r--kernel/kthread.c10
-rw-r--r--kernel/lockdep_proc.c3
-rw-r--r--kernel/module.c3
-rw-r--r--kernel/panic.c1
-rw-r--r--kernel/perf_counter.c840
-rw-r--r--kernel/posix-cpu-timers.c7
-rw-r--r--kernel/posix-timers.c7
-rw-r--r--kernel/profile.c5
-rw-r--r--kernel/rtmutex.c4
-rw-r--r--kernel/sched.c4
-rw-r--r--kernel/sched_cpupri.c15
-rw-r--r--kernel/sched_fair.c42
-rw-r--r--kernel/signal.c25
-rw-r--r--kernel/smp.c2
-rw-r--r--kernel/softirq.c64
-rw-r--r--kernel/time/clocksource.c2
-rw-r--r--kernel/timer.c2
-rw-r--r--kernel/trace/blktrace.c12
-rw-r--r--kernel/trace/ftrace.c19
-rw-r--r--kernel/trace/ring_buffer.c15
-rw-r--r--kernel/trace/trace.c13
-rw-r--r--kernel/trace/trace.h4
-rw-r--r--kernel/trace/trace_event_profile.c2
-rw-r--r--kernel/trace/trace_events.c4
-rw-r--r--kernel/trace/trace_events_filter.c20
-rw-r--r--kernel/trace/trace_functions_graph.c11
-rw-r--r--kernel/trace/trace_printk.c2
-rw-r--r--kernel/trace/trace_stack.c7
-rw-r--r--kernel/trace/trace_stat.c34
-rw-r--r--kernel/wait.c5
-rw-r--r--lib/Makefile2
-rw-r--r--lib/atomic64.c11
-rw-r--r--lib/decompress_bunzip2.c24
-rw-r--r--lib/decompress_inflate.c10
-rw-r--r--lib/decompress_unlzma.c23
-rw-r--r--lib/dynamic_debug.c2
-rw-r--r--lib/flex_array.c267
-rw-r--r--lib/scatterlist.c16
-rw-r--r--mm/hugetlb.c2
-rw-r--r--mm/kmemleak.c4
-rw-r--r--mm/memcontrol.c23
-rw-r--r--mm/memory.c11
-rw-r--r--mm/mempolicy.c84
-rw-r--r--mm/mempool.c4
-rw-r--r--mm/page_alloc.c21
-rw-r--r--mm/swapfile.c4
-rw-r--r--net/9p/client.c13
-rw-r--r--net/bluetooth/rfcomm/core.c27
-rw-r--r--net/bluetooth/rfcomm/sock.c2
-rw-r--r--net/bridge/br_if.c2
-rw-r--r--net/can/bcm.c4
-rw-r--r--net/can/raw.c4
-rw-r--r--net/core/dev.c23
-rw-r--r--net/core/net_namespace.c2
-rw-r--r--net/core/sock.c22
-rw-r--r--net/dccp/proto.c4
-rw-r--r--net/ipv4/arp.c4
-rw-r--r--net/ipv4/tcp_ipv4.c3
-rw-r--r--net/ipv4/tcp_output.c2
-rw-r--r--net/ipv6/tcp_ipv6.c3
-rw-r--r--net/irda/irttp.c1
-rw-r--r--net/mac80211/Kconfig1
-rw-r--r--net/mac80211/mesh_pathtbl.c11
-rw-r--r--net/mac80211/mlme.c2
-rw-r--r--net/mac80211/pm.c24
-rw-r--r--net/mac80211/rx.c12
-rw-r--r--net/mac80211/tx.c2
-rw-r--r--net/netfilter/nf_conntrack_core.c21
-rw-r--r--net/netfilter/xt_osf.c5
-rw-r--r--net/netlabel/netlabel_kapi.c2
-rw-r--r--net/rfkill/core.c31
-rw-r--r--net/rose/af_rose.c18
-rw-r--r--net/rose/rose_route.c23
-rw-r--r--net/socket.c2
-rw-r--r--net/wireless/nl80211.c5
-rw-r--r--net/wireless/reg.c9
-rw-r--r--net/wireless/reg.h3
-rw-r--r--net/wireless/scan.c7
-rwxr-xr-xscripts/get_maintainer.pl42
-rw-r--r--scripts/kconfig/lxdialog/util.c2
-rw-r--r--scripts/kconfig/mconf.c2
-rw-r--r--scripts/markup_oops.pl5
-rw-r--r--scripts/package/builddeb2
-rwxr-xr-xscripts/recordmcount.pl12
-rw-r--r--security/selinux/hooks.c3
-rw-r--r--sound/aoa/core/gpio-pmf.c4
-rw-r--r--sound/core/pcm_lib.c36
-rw-r--r--sound/core/seq/Makefile7
-rw-r--r--sound/isa/gus/gus_pcm.c4
-rw-r--r--sound/oss/aedsp16.c9
-rw-r--r--sound/oss/mpu401.c2
-rw-r--r--sound/pci/ca0106/ca0106_main.c4
-rw-r--r--sound/pci/ctxfi/ctamixer.c14
-rw-r--r--sound/pci/ctxfi/ctdaio.c4
-rw-r--r--sound/pci/ctxfi/ctsrc.c7
-rw-r--r--sound/pci/hda/hda_codec.c8
-rw-r--r--sound/pci/hda/hda_codec.h2
-rw-r--r--sound/pci/hda/hda_eld.c4
-rw-r--r--sound/pci/hda/hda_intel.c103
-rw-r--r--sound/pci/hda/patch_analog.c2
-rw-r--r--sound/pci/hda/patch_realtek.c61
-rw-r--r--sound/pci/hda/patch_sigmatel.c20
-rw-r--r--sound/soc/codecs/tlv320aic3x.c11
-rw-r--r--sound/soc/fsl/efika-audio-fabric.c2
-rw-r--r--sound/soc/fsl/pcm030-audio-fabric.c2
-rw-r--r--sound/usb/Kconfig1
-rw-r--r--sound/usb/caiaq/audio.c1
-rw-r--r--sound/usb/caiaq/device.c8
-rw-r--r--sound/usb/caiaq/device.h1
-rw-r--r--sound/usb/usbmixer.c25
-rw-r--r--tools/perf/Documentation/perf-examples.txt225
-rw-r--r--tools/perf/Documentation/perf-record.txt60
-rw-r--r--tools/perf/Documentation/perf-report.txt15
-rw-r--r--tools/perf/Documentation/perf-stat.txt2
-rw-r--r--tools/perf/Documentation/perf-top.txt112
-rw-r--r--tools/perf/Makefile40
-rw-r--r--tools/perf/builtin-annotate.c24
-rw-r--r--tools/perf/builtin-list.c3
-rw-r--r--tools/perf/builtin-record.c121
-rw-r--r--tools/perf/builtin-report.c392
-rw-r--r--tools/perf/builtin-stat.c5
-rw-r--r--tools/perf/builtin-top.c559
-rw-r--r--tools/perf/perf.c77
-rw-r--r--tools/perf/perf.h8
-rw-r--r--tools/perf/util/cache.h1
-rw-r--r--tools/perf/util/callchain.c32
-rw-r--r--tools/perf/util/callchain.h8
-rw-r--r--tools/perf/util/header.c5
-rw-r--r--tools/perf/util/header.h2
-rw-r--r--tools/perf/util/include/linux/kernel.h8
-rw-r--r--tools/perf/util/parse-events.c216
-rw-r--r--tools/perf/util/parse-events.h6
-rw-r--r--tools/perf/util/quote.c2
-rw-r--r--tools/perf/util/string.h3
-rw-r--r--tools/perf/util/strlist.c20
-rw-r--r--tools/perf/util/strlist.h11
-rw-r--r--tools/perf/util/symbol.c268
-rw-r--r--tools/perf/util/symbol.h27
-rw-r--r--tools/perf/util/util.h2
-rw-r--r--virt/kvm/ioapic.c10
-rw-r--r--virt/kvm/irq_comm.c4
1119 files changed, 33267 insertions, 16813 deletions
diff --git a/CREDITS b/CREDITS
index 2b88fb37ad5..1a41bf4addd 100644
--- a/CREDITS
+++ b/CREDITS
@@ -1856,7 +1856,7 @@ E: rfkoenig@immd4.informatik.uni-erlangen.de
1856D: The Linux Support Team Erlangen 1856D: The Linux Support Team Erlangen
1857 1857
1858N: Andreas Koensgen 1858N: Andreas Koensgen
1859E: ajk@iehk.rwth-aachen.de 1859E: ajk@comnets.uni-bremen.de
1860D: 6pack driver for AX.25 1860D: 6pack driver for AX.25
1861 1861
1862N: Harald Koerfgen 1862N: Harald Koerfgen
@@ -2006,6 +2006,9 @@ E: paul@laufernet.com
2006D: Soundblaster driver fixes, ISAPnP quirk 2006D: Soundblaster driver fixes, ISAPnP quirk
2007S: California, USA 2007S: California, USA
2008 2008
2009N: Jonathan Layes
2010D: ARPD support
2011
2009N: Tom Lees 2012N: Tom Lees
2010E: tom@lpsg.demon.co.uk 2013E: tom@lpsg.demon.co.uk
2011W: http://www.lpsg.demon.co.uk/ 2014W: http://www.lpsg.demon.co.uk/
@@ -3802,6 +3805,9 @@ S: van Bronckhorststraat 12
3802S: 2612 XV Delft 3805S: 2612 XV Delft
3803S: The Netherlands 3806S: The Netherlands
3804 3807
3808N: Thomas Woller
3809D: CS461x Cirrus Logic sound driver
3810
3805N: David Woodhouse 3811N: David Woodhouse
3806E: dwmw2@infradead.org 3812E: dwmw2@infradead.org
3807D: JFFS2 file system, Memory Technology Device subsystem, 3813D: JFFS2 file system, Memory Technology Device subsystem,
diff --git a/Documentation/ABI/testing/sysfs-block b/Documentation/ABI/testing/sysfs-block
index cbbd3e06994..5f3bedaf8e3 100644
--- a/Documentation/ABI/testing/sysfs-block
+++ b/Documentation/ABI/testing/sysfs-block
@@ -94,28 +94,37 @@ What: /sys/block/<disk>/queue/physical_block_size
94Date: May 2009 94Date: May 2009
95Contact: Martin K. Petersen <martin.petersen@oracle.com> 95Contact: Martin K. Petersen <martin.petersen@oracle.com>
96Description: 96Description:
97 This is the smallest unit the storage device can write 97 This is the smallest unit a physical storage device can
98 without resorting to read-modify-write operation. It is 98 write atomically. It is usually the same as the logical
99 usually the same as the logical block size but may be 99 block size but may be bigger. One example is SATA
100 bigger. One example is SATA drives with 4KB sectors 100 drives with 4KB sectors that expose a 512-byte logical
101 that expose a 512-byte logical block size to the 101 block size to the operating system. For stacked block
102 operating system. 102 devices the physical_block_size variable contains the
103 maximum physical_block_size of the component devices.
103 104
104What: /sys/block/<disk>/queue/minimum_io_size 105What: /sys/block/<disk>/queue/minimum_io_size
105Date: April 2009 106Date: April 2009
106Contact: Martin K. Petersen <martin.petersen@oracle.com> 107Contact: Martin K. Petersen <martin.petersen@oracle.com>
107Description: 108Description:
108 Storage devices may report a preferred minimum I/O size, 109 Storage devices may report a granularity or preferred
109 which is the smallest request the device can perform 110 minimum I/O size which is the smallest request the
110 without incurring a read-modify-write penalty. For disk 111 device can perform without incurring a performance
111 drives this is often the physical block size. For RAID 112 penalty. For disk drives this is often the physical
112 arrays it is often the stripe chunk size. 113 block size. For RAID arrays it is often the stripe
114 chunk size. A properly aligned multiple of
115 minimum_io_size is the preferred request size for
116 workloads where a high number of I/O operations is
117 desired.
113 118
114What: /sys/block/<disk>/queue/optimal_io_size 119What: /sys/block/<disk>/queue/optimal_io_size
115Date: April 2009 120Date: April 2009
116Contact: Martin K. Petersen <martin.petersen@oracle.com> 121Contact: Martin K. Petersen <martin.petersen@oracle.com>
117Description: 122Description:
118 Storage devices may report an optimal I/O size, which is 123 Storage devices may report an optimal I/O size, which is
119 the device's preferred unit of receiving I/O. This is 124 the device's preferred unit for sustained I/O. This is
120 rarely reported for disk drives. For RAID devices it is 125 rarely reported for disk drives. For RAID arrays it is
121 usually the stripe width or the internal block size. 126 usually the stripe width or the internal track size. A
127 properly aligned multiple of optimal_io_size is the
128 preferred request size for workloads where sustained
129 throughput is desired. If no optimal I/O size is
130 reported this file contains 0.
diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl
index a50d6cd5857..992e67e6be7 100644
--- a/Documentation/DocBook/kernel-hacking.tmpl
+++ b/Documentation/DocBook/kernel-hacking.tmpl
@@ -449,8 +449,8 @@ printk(KERN_INFO "i = %u\n", i);
449 </para> 449 </para>
450 450
451 <programlisting> 451 <programlisting>
452__u32 ipaddress; 452__be32 ipaddress;
453printk(KERN_INFO "my ip: %d.%d.%d.%d\n", NIPQUAD(ipaddress)); 453printk(KERN_INFO "my ip: %pI4\n", &amp;ipaddress);
454 </programlisting> 454 </programlisting>
455 455
456 <para> 456 <para>
diff --git a/Documentation/RCU/rculist_nulls.txt b/Documentation/RCU/rculist_nulls.txt
index 93cb28d05dc..18f9651ff23 100644
--- a/Documentation/RCU/rculist_nulls.txt
+++ b/Documentation/RCU/rculist_nulls.txt
@@ -83,11 +83,12 @@ not detect it missed following items in original chain.
83obj = kmem_cache_alloc(...); 83obj = kmem_cache_alloc(...);
84lock_chain(); // typically a spin_lock() 84lock_chain(); // typically a spin_lock()
85obj->key = key; 85obj->key = key;
86atomic_inc(&obj->refcnt);
87/* 86/*
88 * we need to make sure obj->key is updated before obj->next 87 * we need to make sure obj->key is updated before obj->next
88 * or obj->refcnt
89 */ 89 */
90smp_wmb(); 90smp_wmb();
91atomic_set(&obj->refcnt, 1);
91hlist_add_head_rcu(&obj->obj_node, list); 92hlist_add_head_rcu(&obj->obj_node, list);
92unlock_chain(); // typically a spin_unlock() 93unlock_chain(); // typically a spin_unlock()
93 94
@@ -159,6 +160,10 @@ out:
159obj = kmem_cache_alloc(cachep); 160obj = kmem_cache_alloc(cachep);
160lock_chain(); // typically a spin_lock() 161lock_chain(); // typically a spin_lock()
161obj->key = key; 162obj->key = key;
163/*
164 * changes to obj->key must be visible before refcnt one
165 */
166smp_wmb();
162atomic_set(&obj->refcnt, 1); 167atomic_set(&obj->refcnt, 1);
163/* 168/*
164 * insert obj in RCU way (readers might be traversing chain) 169 * insert obj in RCU way (readers might be traversing chain)
diff --git a/Documentation/arm/memory.txt b/Documentation/arm/memory.txt
index 43cb1004d35..9d58c7c5edd 100644
--- a/Documentation/arm/memory.txt
+++ b/Documentation/arm/memory.txt
@@ -21,6 +21,8 @@ ffff8000 ffffffff copy_user_page / clear_user_page use.
21 For SA11xx and Xscale, this is used to 21 For SA11xx and Xscale, this is used to
22 setup a minicache mapping. 22 setup a minicache mapping.
23 23
24ffff4000 ffffffff cache aliasing on ARMv6 and later CPUs.
25
24ffff1000 ffff7fff Reserved. 26ffff1000 ffff7fff Reserved.
25 Platforms must not use this address range. 27 Platforms must not use this address range.
26 28
diff --git a/Documentation/connector/cn_test.c b/Documentation/connector/cn_test.c
index f688eba8770..6a5be5d5c8e 100644
--- a/Documentation/connector/cn_test.c
+++ b/Documentation/connector/cn_test.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * cn_test.c 2 * cn_test.c
3 * 3 *
4 * 2004-2005 Copyright (c) Evgeniy Polyakov <johnpol@2ka.mipt.ru> 4 * 2004+ Copyright (c) Evgeniy Polyakov <zbr@ioremap.net>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
@@ -194,5 +194,5 @@ module_init(cn_test_init);
194module_exit(cn_test_fini); 194module_exit(cn_test_fini);
195 195
196MODULE_LICENSE("GPL"); 196MODULE_LICENSE("GPL");
197MODULE_AUTHOR("Evgeniy Polyakov <johnpol@2ka.mipt.ru>"); 197MODULE_AUTHOR("Evgeniy Polyakov <zbr@ioremap.net>");
198MODULE_DESCRIPTION("Connector's test module"); 198MODULE_DESCRIPTION("Connector's test module");
diff --git a/Documentation/connector/ucon.c b/Documentation/connector/ucon.c
index d738cde2a8d..c5092ad0ce4 100644
--- a/Documentation/connector/ucon.c
+++ b/Documentation/connector/ucon.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * ucon.c 2 * ucon.c
3 * 3 *
4 * Copyright (c) 2004+ Evgeniy Polyakov <johnpol@2ka.mipt.ru> 4 * Copyright (c) 2004+ Evgeniy Polyakov <zbr@ioremap.net>
5 * 5 *
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt
index 7e81e37c0b1..b245d524d56 100644
--- a/Documentation/filesystems/sysfs.txt
+++ b/Documentation/filesystems/sysfs.txt
@@ -23,7 +23,8 @@ interface.
23Using sysfs 23Using sysfs
24~~~~~~~~~~~ 24~~~~~~~~~~~
25 25
26sysfs is always compiled in. You can access it by doing: 26sysfs is always compiled in if CONFIG_SYSFS is defined. You can access
27it by doing:
27 28
28 mount -t sysfs sysfs /sys 29 mount -t sysfs sysfs /sys
29 30
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index 7bb0d934b6d..dbea4f95fc8 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -139,6 +139,7 @@ Code Seq# Include File Comments
139'm' all linux/synclink.h conflict! 139'm' all linux/synclink.h conflict!
140'm' 00-1F net/irda/irmod.h conflict! 140'm' 00-1F net/irda/irmod.h conflict!
141'n' 00-7F linux/ncp_fs.h 141'n' 00-7F linux/ncp_fs.h
142'n' 80-8F linux/nilfs2_fs.h NILFS2
142'n' E0-FF video/matrox.h matroxfb 143'n' E0-FF video/matrox.h matroxfb
143'o' 00-1F fs/ocfs2/ocfs2_fs.h OCFS2 144'o' 00-1F fs/ocfs2/ocfs2_fs.h OCFS2
144'o' 00-03 include/mtd/ubi-user.h conflict! (OCFS2 and UBI overlaps) 145'o' 00-03 include/mtd/ubi-user.h conflict! (OCFS2 and UBI overlaps)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index dd1a6d4bb74..7936b801fe6 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1115,6 +1115,10 @@ and is between 256 and 4096 characters. It is defined in the file
1115 libata.dma=4 Compact Flash DMA only 1115 libata.dma=4 Compact Flash DMA only
1116 Combinations also work, so libata.dma=3 enables DMA 1116 Combinations also work, so libata.dma=3 enables DMA
1117 for disks and CDROMs, but not CFs. 1117 for disks and CDROMs, but not CFs.
1118
1119 libata.ignore_hpa= [LIBATA] Ignore HPA limit
1120 libata.ignore_hpa=0 keep BIOS limits (default)
1121 libata.ignore_hpa=1 ignore limits, using full disk
1118 1122
1119 libata.noacpi [LIBATA] Disables use of ACPI in libata suspend/resume 1123 libata.noacpi [LIBATA] Disables use of ACPI in libata suspend/resume
1120 when set. 1124 when set.
diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt
index f2296ecedb8..e2ddcdeb61b 100644
--- a/Documentation/laptops/thinkpad-acpi.txt
+++ b/Documentation/laptops/thinkpad-acpi.txt
@@ -36,8 +36,6 @@ detailed description):
36 - Bluetooth enable and disable 36 - Bluetooth enable and disable
37 - video output switching, expansion control 37 - video output switching, expansion control
38 - ThinkLight on and off 38 - ThinkLight on and off
39 - limited docking and undocking
40 - UltraBay eject
41 - CMOS/UCMS control 39 - CMOS/UCMS control
42 - LED control 40 - LED control
43 - ACPI sounds 41 - ACPI sounds
@@ -729,131 +727,6 @@ cannot be read or if it is unknown, thinkpad-acpi will report it as "off".
729It is impossible to know if the status returned through sysfs is valid. 727It is impossible to know if the status returned through sysfs is valid.
730 728
731 729
732Docking / undocking -- /proc/acpi/ibm/dock
733------------------------------------------
734
735Docking and undocking (e.g. with the X4 UltraBase) requires some
736actions to be taken by the operating system to safely make or break
737the electrical connections with the dock.
738
739The docking feature of this driver generates the following ACPI events:
740
741 ibm/dock GDCK 00000003 00000001 -- eject request
742 ibm/dock GDCK 00000003 00000002 -- undocked
743 ibm/dock GDCK 00000000 00000003 -- docked
744
745NOTE: These events will only be generated if the laptop was docked
746when originally booted. This is due to the current lack of support for
747hot plugging of devices in the Linux ACPI framework. If the laptop was
748booted while not in the dock, the following message is shown in the
749logs:
750
751 Mar 17 01:42:34 aero kernel: thinkpad_acpi: dock device not present
752
753In this case, no dock-related events are generated but the dock and
754undock commands described below still work. They can be executed
755manually or triggered by Fn key combinations (see the example acpid
756configuration files included in the driver tarball package available
757on the web site).
758
759When the eject request button on the dock is pressed, the first event
760above is generated. The handler for this event should issue the
761following command:
762
763 echo undock > /proc/acpi/ibm/dock
764
765After the LED on the dock goes off, it is safe to eject the laptop.
766Note: if you pressed this key by mistake, go ahead and eject the
767laptop, then dock it back in. Otherwise, the dock may not function as
768expected.
769
770When the laptop is docked, the third event above is generated. The
771handler for this event should issue the following command to fully
772enable the dock:
773
774 echo dock > /proc/acpi/ibm/dock
775
776The contents of the /proc/acpi/ibm/dock file shows the current status
777of the dock, as provided by the ACPI framework.
778
779The docking support in this driver does not take care of enabling or
780disabling any other devices you may have attached to the dock. For
781example, a CD drive plugged into the UltraBase needs to be disabled or
782enabled separately. See the provided example acpid configuration files
783for how this can be accomplished.
784
785There is no support yet for PCI devices that may be attached to a
786docking station, e.g. in the ThinkPad Dock II. The driver currently
787does not recognize, enable or disable such devices. This means that
788the only docking stations currently supported are the X-series
789UltraBase docks and "dumb" port replicators like the Mini Dock (the
790latter don't need any ACPI support, actually).
791
792
793UltraBay eject -- /proc/acpi/ibm/bay
794------------------------------------
795
796Inserting or ejecting an UltraBay device requires some actions to be
797taken by the operating system to safely make or break the electrical
798connections with the device.
799
800This feature generates the following ACPI events:
801
802 ibm/bay MSTR 00000003 00000000 -- eject request
803 ibm/bay MSTR 00000001 00000000 -- eject lever inserted
804
805NOTE: These events will only be generated if the UltraBay was present
806when the laptop was originally booted (on the X series, the UltraBay
807is in the dock, so it may not be present if the laptop was undocked).
808This is due to the current lack of support for hot plugging of devices
809in the Linux ACPI framework. If the laptop was booted without the
810UltraBay, the following message is shown in the logs:
811
812 Mar 17 01:42:34 aero kernel: thinkpad_acpi: bay device not present
813
814In this case, no bay-related events are generated but the eject
815command described below still works. It can be executed manually or
816triggered by a hot key combination.
817
818Sliding the eject lever generates the first event shown above. The
819handler for this event should take whatever actions are necessary to
820shut down the device in the UltraBay (e.g. call idectl), then issue
821the following command:
822
823 echo eject > /proc/acpi/ibm/bay
824
825After the LED on the UltraBay goes off, it is safe to pull out the
826device.
827
828When the eject lever is inserted, the second event above is
829generated. The handler for this event should take whatever actions are
830necessary to enable the UltraBay device (e.g. call idectl).
831
832The contents of the /proc/acpi/ibm/bay file shows the current status
833of the UltraBay, as provided by the ACPI framework.
834
835EXPERIMENTAL warm eject support on the 600e/x, A22p and A3x (To use
836this feature, you need to supply the experimental=1 parameter when
837loading the module):
838
839These models do not have a button near the UltraBay device to request
840a hot eject but rather require the laptop to be put to sleep
841(suspend-to-ram) before the bay device is ejected or inserted).
842The sequence of steps to eject the device is as follows:
843
844 echo eject > /proc/acpi/ibm/bay
845 put the ThinkPad to sleep
846 remove the drive
847 resume from sleep
848 cat /proc/acpi/ibm/bay should show that the drive was removed
849
850On the A3x, both the UltraBay 2000 and UltraBay Plus devices are
851supported. Use "eject2" instead of "eject" for the second bay.
852
853Note: the UltraBay eject support on the 600e/x, A22p and A3x is
854EXPERIMENTAL and may not work as expected. USE WITH CAUTION!
855
856
857CMOS/UCMS control 730CMOS/UCMS control
858----------------- 731-----------------
859 732
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c
index 9ebcd6ef361..950cde6d6e5 100644
--- a/Documentation/lguest/lguest.c
+++ b/Documentation/lguest/lguest.c
@@ -1,7 +1,9 @@
1/*P:100 This is the Launcher code, a simple program which lays out the 1/*P:100
2 * "physical" memory for the new Guest by mapping the kernel image and 2 * This is the Launcher code, a simple program which lays out the "physical"
3 * the virtual devices, then opens /dev/lguest to tell the kernel 3 * memory for the new Guest by mapping the kernel image and the virtual
4 * about the Guest and control it. :*/ 4 * devices, then opens /dev/lguest to tell the kernel about the Guest and
5 * control it.
6:*/
5#define _LARGEFILE64_SOURCE 7#define _LARGEFILE64_SOURCE
6#define _GNU_SOURCE 8#define _GNU_SOURCE
7#include <stdio.h> 9#include <stdio.h>
@@ -46,13 +48,15 @@
46#include "linux/virtio_rng.h" 48#include "linux/virtio_rng.h"
47#include "linux/virtio_ring.h" 49#include "linux/virtio_ring.h"
48#include "asm/bootparam.h" 50#include "asm/bootparam.h"
49/*L:110 We can ignore the 39 include files we need for this program, but I do 51/*L:110
50 * want to draw attention to the use of kernel-style types. 52 * We can ignore the 42 include files we need for this program, but I do want
53 * to draw attention to the use of kernel-style types.
51 * 54 *
52 * As Linus said, "C is a Spartan language, and so should your naming be." I 55 * As Linus said, "C is a Spartan language, and so should your naming be." I
53 * like these abbreviations, so we define them here. Note that u64 is always 56 * like these abbreviations, so we define them here. Note that u64 is always
54 * unsigned long long, which works on all Linux systems: this means that we can 57 * unsigned long long, which works on all Linux systems: this means that we can
55 * use %llu in printf for any u64. */ 58 * use %llu in printf for any u64.
59 */
56typedef unsigned long long u64; 60typedef unsigned long long u64;
57typedef uint32_t u32; 61typedef uint32_t u32;
58typedef uint16_t u16; 62typedef uint16_t u16;
@@ -69,8 +73,10 @@ typedef uint8_t u8;
69/* This will occupy 3 pages: it must be a power of 2. */ 73/* This will occupy 3 pages: it must be a power of 2. */
70#define VIRTQUEUE_NUM 256 74#define VIRTQUEUE_NUM 256
71 75
72/*L:120 verbose is both a global flag and a macro. The C preprocessor allows 76/*L:120
73 * this, and although I wouldn't recommend it, it works quite nicely here. */ 77 * verbose is both a global flag and a macro. The C preprocessor allows
78 * this, and although I wouldn't recommend it, it works quite nicely here.
79 */
74static bool verbose; 80static bool verbose;
75#define verbose(args...) \ 81#define verbose(args...) \
76 do { if (verbose) printf(args); } while(0) 82 do { if (verbose) printf(args); } while(0)
@@ -87,8 +93,7 @@ static int lguest_fd;
87static unsigned int __thread cpu_id; 93static unsigned int __thread cpu_id;
88 94
89/* This is our list of devices. */ 95/* This is our list of devices. */
90struct device_list 96struct device_list {
91{
92 /* Counter to assign interrupt numbers. */ 97 /* Counter to assign interrupt numbers. */
93 unsigned int next_irq; 98 unsigned int next_irq;
94 99
@@ -100,8 +105,7 @@ struct device_list
100 105
101 /* A single linked list of devices. */ 106 /* A single linked list of devices. */
102 struct device *dev; 107 struct device *dev;
103 /* And a pointer to the last device for easy append and also for 108 /* And a pointer to the last device for easy append. */
104 * configuration appending. */
105 struct device *lastdev; 109 struct device *lastdev;
106}; 110};
107 111
@@ -109,8 +113,7 @@ struct device_list
109static struct device_list devices; 113static struct device_list devices;
110 114
111/* The device structure describes a single device. */ 115/* The device structure describes a single device. */
112struct device 116struct device {
113{
114 /* The linked-list pointer. */ 117 /* The linked-list pointer. */
115 struct device *next; 118 struct device *next;
116 119
@@ -135,8 +138,7 @@ struct device
135}; 138};
136 139
137/* The virtqueue structure describes a queue attached to a device. */ 140/* The virtqueue structure describes a queue attached to a device. */
138struct virtqueue 141struct virtqueue {
139{
140 struct virtqueue *next; 142 struct virtqueue *next;
141 143
142 /* Which device owns me. */ 144 /* Which device owns me. */
@@ -168,20 +170,24 @@ static char **main_args;
168/* The original tty settings to restore on exit. */ 170/* The original tty settings to restore on exit. */
169static struct termios orig_term; 171static struct termios orig_term;
170 172
171/* We have to be careful with barriers: our devices are all run in separate 173/*
174 * We have to be careful with barriers: our devices are all run in separate
172 * threads and so we need to make sure that changes visible to the Guest happen 175 * threads and so we need to make sure that changes visible to the Guest happen
173 * in precise order. */ 176 * in precise order.
177 */
174#define wmb() __asm__ __volatile__("" : : : "memory") 178#define wmb() __asm__ __volatile__("" : : : "memory")
175#define mb() __asm__ __volatile__("" : : : "memory") 179#define mb() __asm__ __volatile__("" : : : "memory")
176 180
177/* Convert an iovec element to the given type. 181/*
182 * Convert an iovec element to the given type.
178 * 183 *
179 * This is a fairly ugly trick: we need to know the size of the type and 184 * This is a fairly ugly trick: we need to know the size of the type and
180 * alignment requirement to check the pointer is kosher. It's also nice to 185 * alignment requirement to check the pointer is kosher. It's also nice to
181 * have the name of the type in case we report failure. 186 * have the name of the type in case we report failure.
182 * 187 *
183 * Typing those three things all the time is cumbersome and error prone, so we 188 * Typing those three things all the time is cumbersome and error prone, so we
184 * have a macro which sets them all up and passes to the real function. */ 189 * have a macro which sets them all up and passes to the real function.
190 */
185#define convert(iov, type) \ 191#define convert(iov, type) \
186 ((type *)_convert((iov), sizeof(type), __alignof__(type), #type)) 192 ((type *)_convert((iov), sizeof(type), __alignof__(type), #type))
187 193
@@ -198,8 +204,10 @@ static void *_convert(struct iovec *iov, size_t size, size_t align,
198/* Wrapper for the last available index. Makes it easier to change. */ 204/* Wrapper for the last available index. Makes it easier to change. */
199#define lg_last_avail(vq) ((vq)->last_avail_idx) 205#define lg_last_avail(vq) ((vq)->last_avail_idx)
200 206
201/* The virtio configuration space is defined to be little-endian. x86 is 207/*
202 * little-endian too, but it's nice to be explicit so we have these helpers. */ 208 * The virtio configuration space is defined to be little-endian. x86 is
209 * little-endian too, but it's nice to be explicit so we have these helpers.
210 */
203#define cpu_to_le16(v16) (v16) 211#define cpu_to_le16(v16) (v16)
204#define cpu_to_le32(v32) (v32) 212#define cpu_to_le32(v32) (v32)
205#define cpu_to_le64(v64) (v64) 213#define cpu_to_le64(v64) (v64)
@@ -241,11 +249,12 @@ static u8 *get_feature_bits(struct device *dev)
241 + dev->num_vq * sizeof(struct lguest_vqconfig); 249 + dev->num_vq * sizeof(struct lguest_vqconfig);
242} 250}
243 251
244/*L:100 The Launcher code itself takes us out into userspace, that scary place 252/*L:100
245 * where pointers run wild and free! Unfortunately, like most userspace 253 * The Launcher code itself takes us out into userspace, that scary place where
246 * programs, it's quite boring (which is why everyone likes to hack on the 254 * pointers run wild and free! Unfortunately, like most userspace programs,
247 * kernel!). Perhaps if you make up an Lguest Drinking Game at this point, it 255 * it's quite boring (which is why everyone likes to hack on the kernel!).
248 * will get you through this section. Or, maybe not. 256 * Perhaps if you make up an Lguest Drinking Game at this point, it will get
257 * you through this section. Or, maybe not.
249 * 258 *
250 * The Launcher sets up a big chunk of memory to be the Guest's "physical" 259 * The Launcher sets up a big chunk of memory to be the Guest's "physical"
251 * memory and stores it in "guest_base". In other words, Guest physical == 260 * memory and stores it in "guest_base". In other words, Guest physical ==
@@ -253,7 +262,8 @@ static u8 *get_feature_bits(struct device *dev)
253 * 262 *
254 * This can be tough to get your head around, but usually it just means that we 263 * This can be tough to get your head around, but usually it just means that we
255 * use these trivial conversion functions when the Guest gives us it's 264 * use these trivial conversion functions when the Guest gives us it's
256 * "physical" addresses: */ 265 * "physical" addresses:
266 */
257static void *from_guest_phys(unsigned long addr) 267static void *from_guest_phys(unsigned long addr)
258{ 268{
259 return guest_base + addr; 269 return guest_base + addr;
@@ -268,7 +278,8 @@ static unsigned long to_guest_phys(const void *addr)
268 * Loading the Kernel. 278 * Loading the Kernel.
269 * 279 *
270 * We start with couple of simple helper routines. open_or_die() avoids 280 * We start with couple of simple helper routines. open_or_die() avoids
271 * error-checking code cluttering the callers: */ 281 * error-checking code cluttering the callers:
282 */
272static int open_or_die(const char *name, int flags) 283static int open_or_die(const char *name, int flags)
273{ 284{
274 int fd = open(name, flags); 285 int fd = open(name, flags);
@@ -283,12 +294,19 @@ static void *map_zeroed_pages(unsigned int num)
283 int fd = open_or_die("/dev/zero", O_RDONLY); 294 int fd = open_or_die("/dev/zero", O_RDONLY);
284 void *addr; 295 void *addr;
285 296
286 /* We use a private mapping (ie. if we write to the page, it will be 297 /*
287 * copied). */ 298 * We use a private mapping (ie. if we write to the page, it will be
299 * copied).
300 */
288 addr = mmap(NULL, getpagesize() * num, 301 addr = mmap(NULL, getpagesize() * num,
289 PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, fd, 0); 302 PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, fd, 0);
290 if (addr == MAP_FAILED) 303 if (addr == MAP_FAILED)
291 err(1, "Mmaping %u pages of /dev/zero", num); 304 err(1, "Mmaping %u pages of /dev/zero", num);
305
306 /*
307 * One neat mmap feature is that you can close the fd, and it
308 * stays mapped.
309 */
292 close(fd); 310 close(fd);
293 311
294 return addr; 312 return addr;
@@ -305,20 +323,24 @@ static void *get_pages(unsigned int num)
305 return addr; 323 return addr;
306} 324}
307 325
308/* This routine is used to load the kernel or initrd. It tries mmap, but if 326/*
327 * This routine is used to load the kernel or initrd. It tries mmap, but if
309 * that fails (Plan 9's kernel file isn't nicely aligned on page boundaries), 328 * that fails (Plan 9's kernel file isn't nicely aligned on page boundaries),
310 * it falls back to reading the memory in. */ 329 * it falls back to reading the memory in.
330 */
311static void map_at(int fd, void *addr, unsigned long offset, unsigned long len) 331static void map_at(int fd, void *addr, unsigned long offset, unsigned long len)
312{ 332{
313 ssize_t r; 333 ssize_t r;
314 334
315 /* We map writable even though for some segments are marked read-only. 335 /*
336 * We map writable even though for some segments are marked read-only.
316 * The kernel really wants to be writable: it patches its own 337 * The kernel really wants to be writable: it patches its own
317 * instructions. 338 * instructions.
318 * 339 *
319 * MAP_PRIVATE means that the page won't be copied until a write is 340 * MAP_PRIVATE means that the page won't be copied until a write is
320 * done to it. This allows us to share untouched memory between 341 * done to it. This allows us to share untouched memory between
321 * Guests. */ 342 * Guests.
343 */
322 if (mmap(addr, len, PROT_READ|PROT_WRITE|PROT_EXEC, 344 if (mmap(addr, len, PROT_READ|PROT_WRITE|PROT_EXEC,
323 MAP_FIXED|MAP_PRIVATE, fd, offset) != MAP_FAILED) 345 MAP_FIXED|MAP_PRIVATE, fd, offset) != MAP_FAILED)
324 return; 346 return;
@@ -329,7 +351,8 @@ static void map_at(int fd, void *addr, unsigned long offset, unsigned long len)
329 err(1, "Reading offset %lu len %lu gave %zi", offset, len, r); 351 err(1, "Reading offset %lu len %lu gave %zi", offset, len, r);
330} 352}
331 353
332/* This routine takes an open vmlinux image, which is in ELF, and maps it into 354/*
355 * This routine takes an open vmlinux image, which is in ELF, and maps it into
333 * the Guest memory. ELF = Embedded Linking Format, which is the format used 356 * the Guest memory. ELF = Embedded Linking Format, which is the format used
334 * by all modern binaries on Linux including the kernel. 357 * by all modern binaries on Linux including the kernel.
335 * 358 *
@@ -337,23 +360,28 @@ static void map_at(int fd, void *addr, unsigned long offset, unsigned long len)
337 * address. We use the physical address; the Guest will map itself to the 360 * address. We use the physical address; the Guest will map itself to the
338 * virtual address. 361 * virtual address.
339 * 362 *
340 * We return the starting address. */ 363 * We return the starting address.
364 */
341static unsigned long map_elf(int elf_fd, const Elf32_Ehdr *ehdr) 365static unsigned long map_elf(int elf_fd, const Elf32_Ehdr *ehdr)
342{ 366{
343 Elf32_Phdr phdr[ehdr->e_phnum]; 367 Elf32_Phdr phdr[ehdr->e_phnum];
344 unsigned int i; 368 unsigned int i;
345 369
346 /* Sanity checks on the main ELF header: an x86 executable with a 370 /*
347 * reasonable number of correctly-sized program headers. */ 371 * Sanity checks on the main ELF header: an x86 executable with a
372 * reasonable number of correctly-sized program headers.
373 */
348 if (ehdr->e_type != ET_EXEC 374 if (ehdr->e_type != ET_EXEC
349 || ehdr->e_machine != EM_386 375 || ehdr->e_machine != EM_386
350 || ehdr->e_phentsize != sizeof(Elf32_Phdr) 376 || ehdr->e_phentsize != sizeof(Elf32_Phdr)
351 || ehdr->e_phnum < 1 || ehdr->e_phnum > 65536U/sizeof(Elf32_Phdr)) 377 || ehdr->e_phnum < 1 || ehdr->e_phnum > 65536U/sizeof(Elf32_Phdr))
352 errx(1, "Malformed elf header"); 378 errx(1, "Malformed elf header");
353 379
354 /* An ELF executable contains an ELF header and a number of "program" 380 /*
381 * An ELF executable contains an ELF header and a number of "program"
355 * headers which indicate which parts ("segments") of the program to 382 * headers which indicate which parts ("segments") of the program to
356 * load where. */ 383 * load where.
384 */
357 385
358 /* We read in all the program headers at once: */ 386 /* We read in all the program headers at once: */
359 if (lseek(elf_fd, ehdr->e_phoff, SEEK_SET) < 0) 387 if (lseek(elf_fd, ehdr->e_phoff, SEEK_SET) < 0)
@@ -361,8 +389,10 @@ static unsigned long map_elf(int elf_fd, const Elf32_Ehdr *ehdr)
361 if (read(elf_fd, phdr, sizeof(phdr)) != sizeof(phdr)) 389 if (read(elf_fd, phdr, sizeof(phdr)) != sizeof(phdr))
362 err(1, "Reading program headers"); 390 err(1, "Reading program headers");
363 391
364 /* Try all the headers: there are usually only three. A read-only one, 392 /*
365 * a read-write one, and a "note" section which we don't load. */ 393 * Try all the headers: there are usually only three. A read-only one,
394 * a read-write one, and a "note" section which we don't load.
395 */
366 for (i = 0; i < ehdr->e_phnum; i++) { 396 for (i = 0; i < ehdr->e_phnum; i++) {
367 /* If this isn't a loadable segment, we ignore it */ 397 /* If this isn't a loadable segment, we ignore it */
368 if (phdr[i].p_type != PT_LOAD) 398 if (phdr[i].p_type != PT_LOAD)
@@ -380,13 +410,15 @@ static unsigned long map_elf(int elf_fd, const Elf32_Ehdr *ehdr)
380 return ehdr->e_entry; 410 return ehdr->e_entry;
381} 411}
382 412
383/*L:150 A bzImage, unlike an ELF file, is not meant to be loaded. You're 413/*L:150
384 * supposed to jump into it and it will unpack itself. We used to have to 414 * A bzImage, unlike an ELF file, is not meant to be loaded. You're supposed
385 * perform some hairy magic because the unpacking code scared me. 415 * to jump into it and it will unpack itself. We used to have to perform some
416 * hairy magic because the unpacking code scared me.
386 * 417 *
387 * Fortunately, Jeremy Fitzhardinge convinced me it wasn't that hard and wrote 418 * Fortunately, Jeremy Fitzhardinge convinced me it wasn't that hard and wrote
388 * a small patch to jump over the tricky bits in the Guest, so now we just read 419 * a small patch to jump over the tricky bits in the Guest, so now we just read
389 * the funky header so we know where in the file to load, and away we go! */ 420 * the funky header so we know where in the file to load, and away we go!
421 */
390static unsigned long load_bzimage(int fd) 422static unsigned long load_bzimage(int fd)
391{ 423{
392 struct boot_params boot; 424 struct boot_params boot;
@@ -394,8 +426,10 @@ static unsigned long load_bzimage(int fd)
394 /* Modern bzImages get loaded at 1M. */ 426 /* Modern bzImages get loaded at 1M. */
395 void *p = from_guest_phys(0x100000); 427 void *p = from_guest_phys(0x100000);
396 428
397 /* Go back to the start of the file and read the header. It should be 429 /*
398 * a Linux boot header (see Documentation/x86/i386/boot.txt) */ 430 * Go back to the start of the file and read the header. It should be
431 * a Linux boot header (see Documentation/x86/i386/boot.txt)
432 */
399 lseek(fd, 0, SEEK_SET); 433 lseek(fd, 0, SEEK_SET);
400 read(fd, &boot, sizeof(boot)); 434 read(fd, &boot, sizeof(boot));
401 435
@@ -414,9 +448,11 @@ static unsigned long load_bzimage(int fd)
414 return boot.hdr.code32_start; 448 return boot.hdr.code32_start;
415} 449}
416 450
417/*L:140 Loading the kernel is easy when it's a "vmlinux", but most kernels 451/*L:140
452 * Loading the kernel is easy when it's a "vmlinux", but most kernels
418 * come wrapped up in the self-decompressing "bzImage" format. With a little 453 * come wrapped up in the self-decompressing "bzImage" format. With a little
419 * work, we can load those, too. */ 454 * work, we can load those, too.
455 */
420static unsigned long load_kernel(int fd) 456static unsigned long load_kernel(int fd)
421{ 457{
422 Elf32_Ehdr hdr; 458 Elf32_Ehdr hdr;
@@ -433,24 +469,28 @@ static unsigned long load_kernel(int fd)
433 return load_bzimage(fd); 469 return load_bzimage(fd);
434} 470}
435 471
436/* This is a trivial little helper to align pages. Andi Kleen hated it because 472/*
473 * This is a trivial little helper to align pages. Andi Kleen hated it because
437 * it calls getpagesize() twice: "it's dumb code." 474 * it calls getpagesize() twice: "it's dumb code."
438 * 475 *
439 * Kernel guys get really het up about optimization, even when it's not 476 * Kernel guys get really het up about optimization, even when it's not
440 * necessary. I leave this code as a reaction against that. */ 477 * necessary. I leave this code as a reaction against that.
478 */
441static inline unsigned long page_align(unsigned long addr) 479static inline unsigned long page_align(unsigned long addr)
442{ 480{
443 /* Add upwards and truncate downwards. */ 481 /* Add upwards and truncate downwards. */
444 return ((addr + getpagesize()-1) & ~(getpagesize()-1)); 482 return ((addr + getpagesize()-1) & ~(getpagesize()-1));
445} 483}
446 484
447/*L:180 An "initial ram disk" is a disk image loaded into memory along with 485/*L:180
448 * the kernel which the kernel can use to boot from without needing any 486 * An "initial ram disk" is a disk image loaded into memory along with the
449 * drivers. Most distributions now use this as standard: the initrd contains 487 * kernel which the kernel can use to boot from without needing any drivers.
450 * the code to load the appropriate driver modules for the current machine. 488 * Most distributions now use this as standard: the initrd contains the code to
489 * load the appropriate driver modules for the current machine.
451 * 490 *
452 * Importantly, James Morris works for RedHat, and Fedora uses initrds for its 491 * Importantly, James Morris works for RedHat, and Fedora uses initrds for its
453 * kernels. He sent me this (and tells me when I break it). */ 492 * kernels. He sent me this (and tells me when I break it).
493 */
454static unsigned long load_initrd(const char *name, unsigned long mem) 494static unsigned long load_initrd(const char *name, unsigned long mem)
455{ 495{
456 int ifd; 496 int ifd;
@@ -462,12 +502,16 @@ static unsigned long load_initrd(const char *name, unsigned long mem)
462 if (fstat(ifd, &st) < 0) 502 if (fstat(ifd, &st) < 0)
463 err(1, "fstat() on initrd '%s'", name); 503 err(1, "fstat() on initrd '%s'", name);
464 504
465 /* We map the initrd at the top of memory, but mmap wants it to be 505 /*
466 * page-aligned, so we round the size up for that. */ 506 * We map the initrd at the top of memory, but mmap wants it to be
507 * page-aligned, so we round the size up for that.
508 */
467 len = page_align(st.st_size); 509 len = page_align(st.st_size);
468 map_at(ifd, from_guest_phys(mem - len), 0, st.st_size); 510 map_at(ifd, from_guest_phys(mem - len), 0, st.st_size);
469 /* Once a file is mapped, you can close the file descriptor. It's a 511 /*
470 * little odd, but quite useful. */ 512 * Once a file is mapped, you can close the file descriptor. It's a
513 * little odd, but quite useful.
514 */
471 close(ifd); 515 close(ifd);
472 verbose("mapped initrd %s size=%lu @ %p\n", name, len, (void*)mem-len); 516 verbose("mapped initrd %s size=%lu @ %p\n", name, len, (void*)mem-len);
473 517
@@ -476,8 +520,10 @@ static unsigned long load_initrd(const char *name, unsigned long mem)
476} 520}
477/*:*/ 521/*:*/
478 522
479/* Simple routine to roll all the commandline arguments together with spaces 523/*
480 * between them. */ 524 * Simple routine to roll all the commandline arguments together with spaces
525 * between them.
526 */
481static void concat(char *dst, char *args[]) 527static void concat(char *dst, char *args[])
482{ 528{
483 unsigned int i, len = 0; 529 unsigned int i, len = 0;
@@ -494,10 +540,12 @@ static void concat(char *dst, char *args[])
494 dst[len] = '\0'; 540 dst[len] = '\0';
495} 541}
496 542
497/*L:185 This is where we actually tell the kernel to initialize the Guest. We 543/*L:185
544 * This is where we actually tell the kernel to initialize the Guest. We
498 * saw the arguments it expects when we looked at initialize() in lguest_user.c: 545 * saw the arguments it expects when we looked at initialize() in lguest_user.c:
499 * the base of Guest "physical" memory, the top physical page to allow and the 546 * the base of Guest "physical" memory, the top physical page to allow and the
500 * entry point for the Guest. */ 547 * entry point for the Guest.
548 */
501static void tell_kernel(unsigned long start) 549static void tell_kernel(unsigned long start)
502{ 550{
503 unsigned long args[] = { LHREQ_INITIALIZE, 551 unsigned long args[] = { LHREQ_INITIALIZE,
@@ -511,7 +559,7 @@ static void tell_kernel(unsigned long start)
511} 559}
512/*:*/ 560/*:*/
513 561
514/* 562/*L:200
515 * Device Handling. 563 * Device Handling.
516 * 564 *
517 * When the Guest gives us a buffer, it sends an array of addresses and sizes. 565 * When the Guest gives us a buffer, it sends an array of addresses and sizes.
@@ -522,20 +570,26 @@ static void tell_kernel(unsigned long start)
522static void *_check_pointer(unsigned long addr, unsigned int size, 570static void *_check_pointer(unsigned long addr, unsigned int size,
523 unsigned int line) 571 unsigned int line)
524{ 572{
525 /* We have to separately check addr and addr+size, because size could 573 /*
526 * be huge and addr + size might wrap around. */ 574 * We have to separately check addr and addr+size, because size could
575 * be huge and addr + size might wrap around.
576 */
527 if (addr >= guest_limit || addr + size >= guest_limit) 577 if (addr >= guest_limit || addr + size >= guest_limit)
528 errx(1, "%s:%i: Invalid address %#lx", __FILE__, line, addr); 578 errx(1, "%s:%i: Invalid address %#lx", __FILE__, line, addr);
529 /* We return a pointer for the caller's convenience, now we know it's 579 /*
530 * safe to use. */ 580 * We return a pointer for the caller's convenience, now we know it's
581 * safe to use.
582 */
531 return from_guest_phys(addr); 583 return from_guest_phys(addr);
532} 584}
533/* A macro which transparently hands the line number to the real function. */ 585/* A macro which transparently hands the line number to the real function. */
534#define check_pointer(addr,size) _check_pointer(addr, size, __LINE__) 586#define check_pointer(addr,size) _check_pointer(addr, size, __LINE__)
535 587
536/* Each buffer in the virtqueues is actually a chain of descriptors. This 588/*
589 * Each buffer in the virtqueues is actually a chain of descriptors. This
537 * function returns the next descriptor in the chain, or vq->vring.num if we're 590 * function returns the next descriptor in the chain, or vq->vring.num if we're
538 * at the end. */ 591 * at the end.
592 */
539static unsigned next_desc(struct vring_desc *desc, 593static unsigned next_desc(struct vring_desc *desc,
540 unsigned int i, unsigned int max) 594 unsigned int i, unsigned int max)
541{ 595{
@@ -556,7 +610,10 @@ static unsigned next_desc(struct vring_desc *desc,
556 return next; 610 return next;
557} 611}
558 612
559/* This actually sends the interrupt for this virtqueue */ 613/*
614 * This actually sends the interrupt for this virtqueue, if we've used a
615 * buffer.
616 */
560static void trigger_irq(struct virtqueue *vq) 617static void trigger_irq(struct virtqueue *vq)
561{ 618{
562 unsigned long buf[] = { LHREQ_IRQ, vq->config.irq }; 619 unsigned long buf[] = { LHREQ_IRQ, vq->config.irq };
@@ -576,12 +633,14 @@ static void trigger_irq(struct virtqueue *vq)
576 err(1, "Triggering irq %i", vq->config.irq); 633 err(1, "Triggering irq %i", vq->config.irq);
577} 634}
578 635
579/* This looks in the virtqueue and for the first available buffer, and converts 636/*
637 * This looks in the virtqueue for the first available buffer, and converts
580 * it to an iovec for convenient access. Since descriptors consist of some 638 * it to an iovec for convenient access. Since descriptors consist of some
581 * number of output then some number of input descriptors, it's actually two 639 * number of output then some number of input descriptors, it's actually two
582 * iovecs, but we pack them into one and note how many of each there were. 640 * iovecs, but we pack them into one and note how many of each there were.
583 * 641 *
584 * This function returns the descriptor number found. */ 642 * This function waits if necessary, and returns the descriptor number found.
643 */
585static unsigned wait_for_vq_desc(struct virtqueue *vq, 644static unsigned wait_for_vq_desc(struct virtqueue *vq,
586 struct iovec iov[], 645 struct iovec iov[],
587 unsigned int *out_num, unsigned int *in_num) 646 unsigned int *out_num, unsigned int *in_num)
@@ -590,17 +649,23 @@ static unsigned wait_for_vq_desc(struct virtqueue *vq,
590 struct vring_desc *desc; 649 struct vring_desc *desc;
591 u16 last_avail = lg_last_avail(vq); 650 u16 last_avail = lg_last_avail(vq);
592 651
652 /* There's nothing available? */
593 while (last_avail == vq->vring.avail->idx) { 653 while (last_avail == vq->vring.avail->idx) {
594 u64 event; 654 u64 event;
595 655
596 /* OK, tell Guest about progress up to now. */ 656 /*
657 * Since we're about to sleep, now is a good time to tell the
658 * Guest about what we've used up to now.
659 */
597 trigger_irq(vq); 660 trigger_irq(vq);
598 661
599 /* OK, now we need to know about added descriptors. */ 662 /* OK, now we need to know about added descriptors. */
600 vq->vring.used->flags &= ~VRING_USED_F_NO_NOTIFY; 663 vq->vring.used->flags &= ~VRING_USED_F_NO_NOTIFY;
601 664
602 /* They could have slipped one in as we were doing that: make 665 /*
603 * sure it's written, then check again. */ 666 * They could have slipped one in as we were doing that: make
667 * sure it's written, then check again.
668 */
604 mb(); 669 mb();
605 if (last_avail != vq->vring.avail->idx) { 670 if (last_avail != vq->vring.avail->idx) {
606 vq->vring.used->flags |= VRING_USED_F_NO_NOTIFY; 671 vq->vring.used->flags |= VRING_USED_F_NO_NOTIFY;
@@ -620,8 +685,10 @@ static unsigned wait_for_vq_desc(struct virtqueue *vq,
620 errx(1, "Guest moved used index from %u to %u", 685 errx(1, "Guest moved used index from %u to %u",
621 last_avail, vq->vring.avail->idx); 686 last_avail, vq->vring.avail->idx);
622 687
623 /* Grab the next descriptor number they're advertising, and increment 688 /*
624 * the index we've seen. */ 689 * Grab the next descriptor number they're advertising, and increment
690 * the index we've seen.
691 */
625 head = vq->vring.avail->ring[last_avail % vq->vring.num]; 692 head = vq->vring.avail->ring[last_avail % vq->vring.num];
626 lg_last_avail(vq)++; 693 lg_last_avail(vq)++;
627 694
@@ -636,8 +703,10 @@ static unsigned wait_for_vq_desc(struct virtqueue *vq,
636 desc = vq->vring.desc; 703 desc = vq->vring.desc;
637 i = head; 704 i = head;
638 705
639 /* If this is an indirect entry, then this buffer contains a descriptor 706 /*
640 * table which we handle as if it's any normal descriptor chain. */ 707 * If this is an indirect entry, then this buffer contains a descriptor
708 * table which we handle as if it's any normal descriptor chain.
709 */
641 if (desc[i].flags & VRING_DESC_F_INDIRECT) { 710 if (desc[i].flags & VRING_DESC_F_INDIRECT) {
642 if (desc[i].len % sizeof(struct vring_desc)) 711 if (desc[i].len % sizeof(struct vring_desc))
643 errx(1, "Invalid size for indirect buffer table"); 712 errx(1, "Invalid size for indirect buffer table");
@@ -656,8 +725,10 @@ static unsigned wait_for_vq_desc(struct virtqueue *vq,
656 if (desc[i].flags & VRING_DESC_F_WRITE) 725 if (desc[i].flags & VRING_DESC_F_WRITE)
657 (*in_num)++; 726 (*in_num)++;
658 else { 727 else {
659 /* If it's an output descriptor, they're all supposed 728 /*
660 * to come before any input descriptors. */ 729 * If it's an output descriptor, they're all supposed
730 * to come before any input descriptors.
731 */
661 if (*in_num) 732 if (*in_num)
662 errx(1, "Descriptor has out after in"); 733 errx(1, "Descriptor has out after in");
663 (*out_num)++; 734 (*out_num)++;
@@ -671,14 +742,19 @@ static unsigned wait_for_vq_desc(struct virtqueue *vq,
671 return head; 742 return head;
672} 743}
673 744
674/* After we've used one of their buffers, we tell them about it. We'll then 745/*
675 * want to send them an interrupt, using trigger_irq(). */ 746 * After we've used one of their buffers, we tell the Guest about it. Sometime
747 * later we'll want to send them an interrupt using trigger_irq(); note that
748 * wait_for_vq_desc() does that for us if it has to wait.
749 */
676static void add_used(struct virtqueue *vq, unsigned int head, int len) 750static void add_used(struct virtqueue *vq, unsigned int head, int len)
677{ 751{
678 struct vring_used_elem *used; 752 struct vring_used_elem *used;
679 753
680 /* The virtqueue contains a ring of used buffers. Get a pointer to the 754 /*
681 * next entry in that used ring. */ 755 * The virtqueue contains a ring of used buffers. Get a pointer to the
756 * next entry in that used ring.
757 */
682 used = &vq->vring.used->ring[vq->vring.used->idx % vq->vring.num]; 758 used = &vq->vring.used->ring[vq->vring.used->idx % vq->vring.num];
683 used->id = head; 759 used->id = head;
684 used->len = len; 760 used->len = len;
@@ -698,9 +774,9 @@ static void add_used_and_trigger(struct virtqueue *vq, unsigned head, int len)
698/* 774/*
699 * The Console 775 * The Console
700 * 776 *
701 * We associate some data with the console for our exit hack. */ 777 * We associate some data with the console for our exit hack.
702struct console_abort 778 */
703{ 779struct console_abort {
704 /* How many times have they hit ^C? */ 780 /* How many times have they hit ^C? */
705 int count; 781 int count;
706 /* When did they start? */ 782 /* When did they start? */
@@ -715,30 +791,35 @@ static void console_input(struct virtqueue *vq)
715 struct console_abort *abort = vq->dev->priv; 791 struct console_abort *abort = vq->dev->priv;
716 struct iovec iov[vq->vring.num]; 792 struct iovec iov[vq->vring.num];
717 793
718 /* Make sure there's a descriptor waiting. */ 794 /* Make sure there's a descriptor available. */
719 head = wait_for_vq_desc(vq, iov, &out_num, &in_num); 795 head = wait_for_vq_desc(vq, iov, &out_num, &in_num);
720 if (out_num) 796 if (out_num)
721 errx(1, "Output buffers in console in queue?"); 797 errx(1, "Output buffers in console in queue?");
722 798
723 /* Read it in. */ 799 /* Read into it. This is where we usually wait. */
724 len = readv(STDIN_FILENO, iov, in_num); 800 len = readv(STDIN_FILENO, iov, in_num);
725 if (len <= 0) { 801 if (len <= 0) {
726 /* Ran out of input? */ 802 /* Ran out of input? */
727 warnx("Failed to get console input, ignoring console."); 803 warnx("Failed to get console input, ignoring console.");
728 /* For simplicity, dying threads kill the whole Launcher. So 804 /*
729 * just nap here. */ 805 * For simplicity, dying threads kill the whole Launcher. So
806 * just nap here.
807 */
730 for (;;) 808 for (;;)
731 pause(); 809 pause();
732 } 810 }
733 811
812 /* Tell the Guest we used a buffer. */
734 add_used_and_trigger(vq, head, len); 813 add_used_and_trigger(vq, head, len);
735 814
736 /* Three ^C within one second? Exit. 815 /*
816 * Three ^C within one second? Exit.
737 * 817 *
738 * This is such a hack, but works surprisingly well. Each ^C has to 818 * This is such a hack, but works surprisingly well. Each ^C has to
739 * be in a buffer by itself, so they can't be too fast. But we check 819 * be in a buffer by itself, so they can't be too fast. But we check
740 * that we get three within about a second, so they can't be too 820 * that we get three within about a second, so they can't be too
741 * slow. */ 821 * slow.
822 */
742 if (len != 1 || ((char *)iov[0].iov_base)[0] != 3) { 823 if (len != 1 || ((char *)iov[0].iov_base)[0] != 3) {
743 abort->count = 0; 824 abort->count = 0;
744 return; 825 return;
@@ -763,15 +844,23 @@ static void console_output(struct virtqueue *vq)
763 unsigned int head, out, in; 844 unsigned int head, out, in;
764 struct iovec iov[vq->vring.num]; 845 struct iovec iov[vq->vring.num];
765 846
847 /* We usually wait in here, for the Guest to give us something. */
766 head = wait_for_vq_desc(vq, iov, &out, &in); 848 head = wait_for_vq_desc(vq, iov, &out, &in);
767 if (in) 849 if (in)
768 errx(1, "Input buffers in console output queue?"); 850 errx(1, "Input buffers in console output queue?");
851
852 /* writev can return a partial write, so we loop here. */
769 while (!iov_empty(iov, out)) { 853 while (!iov_empty(iov, out)) {
770 int len = writev(STDOUT_FILENO, iov, out); 854 int len = writev(STDOUT_FILENO, iov, out);
771 if (len <= 0) 855 if (len <= 0)
772 err(1, "Write to stdout gave %i", len); 856 err(1, "Write to stdout gave %i", len);
773 iov_consume(iov, out, len); 857 iov_consume(iov, out, len);
774 } 858 }
859
860 /*
861 * We're finished with that buffer: if we're going to sleep,
862 * wait_for_vq_desc() will prod the Guest with an interrupt.
863 */
775 add_used(vq, head, 0); 864 add_used(vq, head, 0);
776} 865}
777 866
@@ -791,15 +880,30 @@ static void net_output(struct virtqueue *vq)
791 unsigned int head, out, in; 880 unsigned int head, out, in;
792 struct iovec iov[vq->vring.num]; 881 struct iovec iov[vq->vring.num];
793 882
883 /* We usually wait in here for the Guest to give us a packet. */
794 head = wait_for_vq_desc(vq, iov, &out, &in); 884 head = wait_for_vq_desc(vq, iov, &out, &in);
795 if (in) 885 if (in)
796 errx(1, "Input buffers in net output queue?"); 886 errx(1, "Input buffers in net output queue?");
887 /*
888 * Send the whole thing through to /dev/net/tun. It expects the exact
889 * same format: what a coincidence!
890 */
797 if (writev(net_info->tunfd, iov, out) < 0) 891 if (writev(net_info->tunfd, iov, out) < 0)
798 errx(1, "Write to tun failed?"); 892 errx(1, "Write to tun failed?");
893
894 /*
895 * Done with that one; wait_for_vq_desc() will send the interrupt if
896 * all packets are processed.
897 */
799 add_used(vq, head, 0); 898 add_used(vq, head, 0);
800} 899}
801 900
802/* Will reading from this file descriptor block? */ 901/*
902 * Handling network input is a bit trickier, because I've tried to optimize it.
903 *
904 * First we have a helper routine which tells is if from this file descriptor
905 * (ie. the /dev/net/tun device) will block:
906 */
803static bool will_block(int fd) 907static bool will_block(int fd)
804{ 908{
805 fd_set fdset; 909 fd_set fdset;
@@ -809,8 +913,11 @@ static bool will_block(int fd)
809 return select(fd+1, &fdset, NULL, NULL, &zero) != 1; 913 return select(fd+1, &fdset, NULL, NULL, &zero) != 1;
810} 914}
811 915
812/* This is where we handle packets coming in from the tun device to our 916/*
813 * Guest. */ 917 * This handles packets coming in from the tun device to our Guest. Like all
918 * service routines, it gets called again as soon as it returns, so you don't
919 * see a while(1) loop here.
920 */
814static void net_input(struct virtqueue *vq) 921static void net_input(struct virtqueue *vq)
815{ 922{
816 int len; 923 int len;
@@ -818,21 +925,38 @@ static void net_input(struct virtqueue *vq)
818 struct iovec iov[vq->vring.num]; 925 struct iovec iov[vq->vring.num];
819 struct net_info *net_info = vq->dev->priv; 926 struct net_info *net_info = vq->dev->priv;
820 927
928 /*
929 * Get a descriptor to write an incoming packet into. This will also
930 * send an interrupt if they're out of descriptors.
931 */
821 head = wait_for_vq_desc(vq, iov, &out, &in); 932 head = wait_for_vq_desc(vq, iov, &out, &in);
822 if (out) 933 if (out)
823 errx(1, "Output buffers in net input queue?"); 934 errx(1, "Output buffers in net input queue?");
824 935
825 /* Deliver interrupt now, since we're about to sleep. */ 936 /*
937 * If it looks like we'll block reading from the tun device, send them
938 * an interrupt.
939 */
826 if (vq->pending_used && will_block(net_info->tunfd)) 940 if (vq->pending_used && will_block(net_info->tunfd))
827 trigger_irq(vq); 941 trigger_irq(vq);
828 942
943 /*
944 * Read in the packet. This is where we normally wait (when there's no
945 * incoming network traffic).
946 */
829 len = readv(net_info->tunfd, iov, in); 947 len = readv(net_info->tunfd, iov, in);
830 if (len <= 0) 948 if (len <= 0)
831 err(1, "Failed to read from tun."); 949 err(1, "Failed to read from tun.");
950
951 /*
952 * Mark that packet buffer as used, but don't interrupt here. We want
953 * to wait until we've done as much work as we can.
954 */
832 add_used(vq, head, len); 955 add_used(vq, head, len);
833} 956}
957/*:*/
834 958
835/* This is the helper to create threads. */ 959/* This is the helper to create threads: run the service routine in a loop. */
836static int do_thread(void *_vq) 960static int do_thread(void *_vq)
837{ 961{
838 struct virtqueue *vq = _vq; 962 struct virtqueue *vq = _vq;
@@ -842,8 +966,10 @@ static int do_thread(void *_vq)
842 return 0; 966 return 0;
843} 967}
844 968
845/* When a child dies, we kill our entire process group with SIGTERM. This 969/*
846 * also has the side effect that the shell restores the console for us! */ 970 * When a child dies, we kill our entire process group with SIGTERM. This
971 * also has the side effect that the shell restores the console for us!
972 */
847static void kill_launcher(int signal) 973static void kill_launcher(int signal)
848{ 974{
849 kill(0, SIGTERM); 975 kill(0, SIGTERM);
@@ -878,11 +1004,15 @@ static void reset_device(struct device *dev)
878 signal(SIGCHLD, (void *)kill_launcher); 1004 signal(SIGCHLD, (void *)kill_launcher);
879} 1005}
880 1006
1007/*L:216
1008 * This actually creates the thread which services the virtqueue for a device.
1009 */
881static void create_thread(struct virtqueue *vq) 1010static void create_thread(struct virtqueue *vq)
882{ 1011{
883 /* Create stack for thread and run it. Since stack grows 1012 /*
884 * upwards, we point the stack pointer to the end of this 1013 * Create stack for thread. Since the stack grows upwards, we point
885 * region. */ 1014 * the stack pointer to the end of this region.
1015 */
886 char *stack = malloc(32768); 1016 char *stack = malloc(32768);
887 unsigned long args[] = { LHREQ_EVENTFD, 1017 unsigned long args[] = { LHREQ_EVENTFD,
888 vq->config.pfn*getpagesize(), 0 }; 1018 vq->config.pfn*getpagesize(), 0 };
@@ -893,17 +1023,22 @@ static void create_thread(struct virtqueue *vq)
893 err(1, "Creating eventfd"); 1023 err(1, "Creating eventfd");
894 args[2] = vq->eventfd; 1024 args[2] = vq->eventfd;
895 1025
896 /* Attach an eventfd to this virtqueue: it will go off 1026 /*
897 * when the Guest does an LHCALL_NOTIFY for this vq. */ 1027 * Attach an eventfd to this virtqueue: it will go off when the Guest
1028 * does an LHCALL_NOTIFY for this vq.
1029 */
898 if (write(lguest_fd, &args, sizeof(args)) != 0) 1030 if (write(lguest_fd, &args, sizeof(args)) != 0)
899 err(1, "Attaching eventfd"); 1031 err(1, "Attaching eventfd");
900 1032
901 /* CLONE_VM: because it has to access the Guest memory, and 1033 /*
902 * SIGCHLD so we get a signal if it dies. */ 1034 * CLONE_VM: because it has to access the Guest memory, and SIGCHLD so
1035 * we get a signal if it dies.
1036 */
903 vq->thread = clone(do_thread, stack + 32768, CLONE_VM | SIGCHLD, vq); 1037 vq->thread = clone(do_thread, stack + 32768, CLONE_VM | SIGCHLD, vq);
904 if (vq->thread == (pid_t)-1) 1038 if (vq->thread == (pid_t)-1)
905 err(1, "Creating clone"); 1039 err(1, "Creating clone");
906 /* We close our local copy, now the child has it. */ 1040
1041 /* We close our local copy now the child has it. */
907 close(vq->eventfd); 1042 close(vq->eventfd);
908} 1043}
909 1044
@@ -955,7 +1090,10 @@ static void update_device_status(struct device *dev)
955 } 1090 }
956} 1091}
957 1092
958/* This is the generic routine we call when the Guest uses LHCALL_NOTIFY. */ 1093/*L:215
1094 * This is the generic routine we call when the Guest uses LHCALL_NOTIFY. In
1095 * particular, it's used to notify us of device status changes during boot.
1096 */
959static void handle_output(unsigned long addr) 1097static void handle_output(unsigned long addr)
960{ 1098{
961 struct device *i; 1099 struct device *i;
@@ -964,25 +1102,42 @@ static void handle_output(unsigned long addr)
964 for (i = devices.dev; i; i = i->next) { 1102 for (i = devices.dev; i; i = i->next) {
965 struct virtqueue *vq; 1103 struct virtqueue *vq;
966 1104
967 /* Notifications to device descriptors update device status. */ 1105 /*
1106 * Notifications to device descriptors mean they updated the
1107 * device status.
1108 */
968 if (from_guest_phys(addr) == i->desc) { 1109 if (from_guest_phys(addr) == i->desc) {
969 update_device_status(i); 1110 update_device_status(i);
970 return; 1111 return;
971 } 1112 }
972 1113
973 /* Devices *can* be used before status is set to DRIVER_OK. */ 1114 /*
1115 * Devices *can* be used before status is set to DRIVER_OK.
1116 * The original plan was that they would never do this: they
1117 * would always finish setting up their status bits before
1118 * actually touching the virtqueues. In practice, we allowed
1119 * them to, and they do (eg. the disk probes for partition
1120 * tables as part of initialization).
1121 *
1122 * If we see this, we start the device: once it's running, we
1123 * expect the device to catch all the notifications.
1124 */
974 for (vq = i->vq; vq; vq = vq->next) { 1125 for (vq = i->vq; vq; vq = vq->next) {
975 if (addr != vq->config.pfn*getpagesize()) 1126 if (addr != vq->config.pfn*getpagesize())
976 continue; 1127 continue;
977 if (i->running) 1128 if (i->running)
978 errx(1, "Notification on running %s", i->name); 1129 errx(1, "Notification on running %s", i->name);
1130 /* This just calls create_thread() for each virtqueue */
979 start_device(i); 1131 start_device(i);
980 return; 1132 return;
981 } 1133 }
982 } 1134 }
983 1135
984 /* Early console write is done using notify on a nul-terminated string 1136 /*
985 * in Guest memory. */ 1137 * Early console write is done using notify on a nul-terminated string
1138 * in Guest memory. It's also great for hacking debugging messages
1139 * into a Guest.
1140 */
986 if (addr >= guest_limit) 1141 if (addr >= guest_limit)
987 errx(1, "Bad NOTIFY %#lx", addr); 1142 errx(1, "Bad NOTIFY %#lx", addr);
988 1143
@@ -998,10 +1153,12 @@ static void handle_output(unsigned long addr)
998 * routines to allocate and manage them. 1153 * routines to allocate and manage them.
999 */ 1154 */
1000 1155
1001/* The layout of the device page is a "struct lguest_device_desc" followed by a 1156/*
1157 * The layout of the device page is a "struct lguest_device_desc" followed by a
1002 * number of virtqueue descriptors, then two sets of feature bits, then an 1158 * number of virtqueue descriptors, then two sets of feature bits, then an
1003 * array of configuration bytes. This routine returns the configuration 1159 * array of configuration bytes. This routine returns the configuration
1004 * pointer. */ 1160 * pointer.
1161 */
1005static u8 *device_config(const struct device *dev) 1162static u8 *device_config(const struct device *dev)
1006{ 1163{
1007 return (void *)(dev->desc + 1) 1164 return (void *)(dev->desc + 1)
@@ -1009,9 +1166,11 @@ static u8 *device_config(const struct device *dev)
1009 + dev->feature_len * 2; 1166 + dev->feature_len * 2;
1010} 1167}
1011 1168
1012/* This routine allocates a new "struct lguest_device_desc" from descriptor 1169/*
1170 * This routine allocates a new "struct lguest_device_desc" from descriptor
1013 * table page just above the Guest's normal memory. It returns a pointer to 1171 * table page just above the Guest's normal memory. It returns a pointer to
1014 * that descriptor. */ 1172 * that descriptor.
1173 */
1015static struct lguest_device_desc *new_dev_desc(u16 type) 1174static struct lguest_device_desc *new_dev_desc(u16 type)
1016{ 1175{
1017 struct lguest_device_desc d = { .type = type }; 1176 struct lguest_device_desc d = { .type = type };
@@ -1032,8 +1191,10 @@ static struct lguest_device_desc *new_dev_desc(u16 type)
1032 return memcpy(p, &d, sizeof(d)); 1191 return memcpy(p, &d, sizeof(d));
1033} 1192}
1034 1193
1035/* Each device descriptor is followed by the description of its virtqueues. We 1194/*
1036 * specify how many descriptors the virtqueue is to have. */ 1195 * Each device descriptor is followed by the description of its virtqueues. We
1196 * specify how many descriptors the virtqueue is to have.
1197 */
1037static void add_virtqueue(struct device *dev, unsigned int num_descs, 1198static void add_virtqueue(struct device *dev, unsigned int num_descs,
1038 void (*service)(struct virtqueue *)) 1199 void (*service)(struct virtqueue *))
1039{ 1200{
@@ -1050,6 +1211,11 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs,
1050 vq->next = NULL; 1211 vq->next = NULL;
1051 vq->last_avail_idx = 0; 1212 vq->last_avail_idx = 0;
1052 vq->dev = dev; 1213 vq->dev = dev;
1214
1215 /*
1216 * This is the routine the service thread will run, and its Process ID
1217 * once it's running.
1218 */
1053 vq->service = service; 1219 vq->service = service;
1054 vq->thread = (pid_t)-1; 1220 vq->thread = (pid_t)-1;
1055 1221
@@ -1061,10 +1227,12 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs,
1061 /* Initialize the vring. */ 1227 /* Initialize the vring. */
1062 vring_init(&vq->vring, num_descs, p, LGUEST_VRING_ALIGN); 1228 vring_init(&vq->vring, num_descs, p, LGUEST_VRING_ALIGN);
1063 1229
1064 /* Append virtqueue to this device's descriptor. We use 1230 /*
1231 * Append virtqueue to this device's descriptor. We use
1065 * device_config() to get the end of the device's current virtqueues; 1232 * device_config() to get the end of the device's current virtqueues;
1066 * we check that we haven't added any config or feature information 1233 * we check that we haven't added any config or feature information
1067 * yet, otherwise we'd be overwriting them. */ 1234 * yet, otherwise we'd be overwriting them.
1235 */
1068 assert(dev->desc->config_len == 0 && dev->desc->feature_len == 0); 1236 assert(dev->desc->config_len == 0 && dev->desc->feature_len == 0);
1069 memcpy(device_config(dev), &vq->config, sizeof(vq->config)); 1237 memcpy(device_config(dev), &vq->config, sizeof(vq->config));
1070 dev->num_vq++; 1238 dev->num_vq++;
@@ -1072,14 +1240,18 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs,
1072 1240
1073 verbose("Virtqueue page %#lx\n", to_guest_phys(p)); 1241 verbose("Virtqueue page %#lx\n", to_guest_phys(p));
1074 1242
1075 /* Add to tail of list, so dev->vq is first vq, dev->vq->next is 1243 /*
1076 * second. */ 1244 * Add to tail of list, so dev->vq is first vq, dev->vq->next is
1245 * second.
1246 */
1077 for (i = &dev->vq; *i; i = &(*i)->next); 1247 for (i = &dev->vq; *i; i = &(*i)->next);
1078 *i = vq; 1248 *i = vq;
1079} 1249}
1080 1250
1081/* The first half of the feature bitmask is for us to advertise features. The 1251/*
1082 * second half is for the Guest to accept features. */ 1252 * The first half of the feature bitmask is for us to advertise features. The
1253 * second half is for the Guest to accept features.
1254 */
1083static void add_feature(struct device *dev, unsigned bit) 1255static void add_feature(struct device *dev, unsigned bit)
1084{ 1256{
1085 u8 *features = get_feature_bits(dev); 1257 u8 *features = get_feature_bits(dev);
@@ -1093,9 +1265,11 @@ static void add_feature(struct device *dev, unsigned bit)
1093 features[bit / CHAR_BIT] |= (1 << (bit % CHAR_BIT)); 1265 features[bit / CHAR_BIT] |= (1 << (bit % CHAR_BIT));
1094} 1266}
1095 1267
1096/* This routine sets the configuration fields for an existing device's 1268/*
1269 * This routine sets the configuration fields for an existing device's
1097 * descriptor. It only works for the last device, but that's OK because that's 1270 * descriptor. It only works for the last device, but that's OK because that's
1098 * how we use it. */ 1271 * how we use it.
1272 */
1099static void set_config(struct device *dev, unsigned len, const void *conf) 1273static void set_config(struct device *dev, unsigned len, const void *conf)
1100{ 1274{
1101 /* Check we haven't overflowed our single page. */ 1275 /* Check we haven't overflowed our single page. */
@@ -1105,12 +1279,18 @@ static void set_config(struct device *dev, unsigned len, const void *conf)
1105 /* Copy in the config information, and store the length. */ 1279 /* Copy in the config information, and store the length. */
1106 memcpy(device_config(dev), conf, len); 1280 memcpy(device_config(dev), conf, len);
1107 dev->desc->config_len = len; 1281 dev->desc->config_len = len;
1282
1283 /* Size must fit in config_len field (8 bits)! */
1284 assert(dev->desc->config_len == len);
1108} 1285}
1109 1286
1110/* This routine does all the creation and setup of a new device, including 1287/*
1111 * calling new_dev_desc() to allocate the descriptor and device memory. 1288 * This routine does all the creation and setup of a new device, including
1289 * calling new_dev_desc() to allocate the descriptor and device memory. We
1290 * don't actually start the service threads until later.
1112 * 1291 *
1113 * See what I mean about userspace being boring? */ 1292 * See what I mean about userspace being boring?
1293 */
1114static struct device *new_device(const char *name, u16 type) 1294static struct device *new_device(const char *name, u16 type)
1115{ 1295{
1116 struct device *dev = malloc(sizeof(*dev)); 1296 struct device *dev = malloc(sizeof(*dev));
@@ -1123,10 +1303,12 @@ static struct device *new_device(const char *name, u16 type)
1123 dev->num_vq = 0; 1303 dev->num_vq = 0;
1124 dev->running = false; 1304 dev->running = false;
1125 1305
1126 /* Append to device list. Prepending to a single-linked list is 1306 /*
1307 * Append to device list. Prepending to a single-linked list is
1127 * easier, but the user expects the devices to be arranged on the bus 1308 * easier, but the user expects the devices to be arranged on the bus
1128 * in command-line order. The first network device on the command line 1309 * in command-line order. The first network device on the command line
1129 * is eth0, the first block device /dev/vda, etc. */ 1310 * is eth0, the first block device /dev/vda, etc.
1311 */
1130 if (devices.lastdev) 1312 if (devices.lastdev)
1131 devices.lastdev->next = dev; 1313 devices.lastdev->next = dev;
1132 else 1314 else
@@ -1136,8 +1318,10 @@ static struct device *new_device(const char *name, u16 type)
1136 return dev; 1318 return dev;
1137} 1319}
1138 1320
1139/* Our first setup routine is the console. It's a fairly simple device, but 1321/*
1140 * UNIX tty handling makes it uglier than it could be. */ 1322 * Our first setup routine is the console. It's a fairly simple device, but
1323 * UNIX tty handling makes it uglier than it could be.
1324 */
1141static void setup_console(void) 1325static void setup_console(void)
1142{ 1326{
1143 struct device *dev; 1327 struct device *dev;
@@ -1145,8 +1329,10 @@ static void setup_console(void)
1145 /* If we can save the initial standard input settings... */ 1329 /* If we can save the initial standard input settings... */
1146 if (tcgetattr(STDIN_FILENO, &orig_term) == 0) { 1330 if (tcgetattr(STDIN_FILENO, &orig_term) == 0) {
1147 struct termios term = orig_term; 1331 struct termios term = orig_term;
1148 /* Then we turn off echo, line buffering and ^C etc. We want a 1332 /*
1149 * raw input stream to the Guest. */ 1333 * Then we turn off echo, line buffering and ^C etc: We want a
1334 * raw input stream to the Guest.
1335 */
1150 term.c_lflag &= ~(ISIG|ICANON|ECHO); 1336 term.c_lflag &= ~(ISIG|ICANON|ECHO);
1151 tcsetattr(STDIN_FILENO, TCSANOW, &term); 1337 tcsetattr(STDIN_FILENO, TCSANOW, &term);
1152 } 1338 }
@@ -1157,10 +1343,12 @@ static void setup_console(void)
1157 dev->priv = malloc(sizeof(struct console_abort)); 1343 dev->priv = malloc(sizeof(struct console_abort));
1158 ((struct console_abort *)dev->priv)->count = 0; 1344 ((struct console_abort *)dev->priv)->count = 0;
1159 1345
1160 /* The console needs two virtqueues: the input then the output. When 1346 /*
1347 * The console needs two virtqueues: the input then the output. When
1161 * they put something the input queue, we make sure we're listening to 1348 * they put something the input queue, we make sure we're listening to
1162 * stdin. When they put something in the output queue, we write it to 1349 * stdin. When they put something in the output queue, we write it to
1163 * stdout. */ 1350 * stdout.
1351 */
1164 add_virtqueue(dev, VIRTQUEUE_NUM, console_input); 1352 add_virtqueue(dev, VIRTQUEUE_NUM, console_input);
1165 add_virtqueue(dev, VIRTQUEUE_NUM, console_output); 1353 add_virtqueue(dev, VIRTQUEUE_NUM, console_output);
1166 1354
@@ -1168,7 +1356,8 @@ static void setup_console(void)
1168} 1356}
1169/*:*/ 1357/*:*/
1170 1358
1171/*M:010 Inter-guest networking is an interesting area. Simplest is to have a 1359/*M:010
1360 * Inter-guest networking is an interesting area. Simplest is to have a
1172 * --sharenet=<name> option which opens or creates a named pipe. This can be 1361 * --sharenet=<name> option which opens or creates a named pipe. This can be
1173 * used to send packets to another guest in a 1:1 manner. 1362 * used to send packets to another guest in a 1:1 manner.
1174 * 1363 *
@@ -1182,7 +1371,8 @@ static void setup_console(void)
1182 * multiple inter-guest channels behind one interface, although it would 1371 * multiple inter-guest channels behind one interface, although it would
1183 * require some manner of hotplugging new virtio channels. 1372 * require some manner of hotplugging new virtio channels.
1184 * 1373 *
1185 * Finally, we could implement a virtio network switch in the kernel. :*/ 1374 * Finally, we could implement a virtio network switch in the kernel.
1375:*/
1186 1376
1187static u32 str2ip(const char *ipaddr) 1377static u32 str2ip(const char *ipaddr)
1188{ 1378{
@@ -1207,11 +1397,13 @@ static void str2mac(const char *macaddr, unsigned char mac[6])
1207 mac[5] = m[5]; 1397 mac[5] = m[5];
1208} 1398}
1209 1399
1210/* This code is "adapted" from libbridge: it attaches the Host end of the 1400/*
1401 * This code is "adapted" from libbridge: it attaches the Host end of the
1211 * network device to the bridge device specified by the command line. 1402 * network device to the bridge device specified by the command line.
1212 * 1403 *
1213 * This is yet another James Morris contribution (I'm an IP-level guy, so I 1404 * This is yet another James Morris contribution (I'm an IP-level guy, so I
1214 * dislike bridging), and I just try not to break it. */ 1405 * dislike bridging), and I just try not to break it.
1406 */
1215static void add_to_bridge(int fd, const char *if_name, const char *br_name) 1407static void add_to_bridge(int fd, const char *if_name, const char *br_name)
1216{ 1408{
1217 int ifidx; 1409 int ifidx;
@@ -1231,9 +1423,11 @@ static void add_to_bridge(int fd, const char *if_name, const char *br_name)
1231 err(1, "can't add %s to bridge %s", if_name, br_name); 1423 err(1, "can't add %s to bridge %s", if_name, br_name);
1232} 1424}
1233 1425
1234/* This sets up the Host end of the network device with an IP address, brings 1426/*
1427 * This sets up the Host end of the network device with an IP address, brings
1235 * it up so packets will flow, the copies the MAC address into the hwaddr 1428 * it up so packets will flow, the copies the MAC address into the hwaddr
1236 * pointer. */ 1429 * pointer.
1430 */
1237static void configure_device(int fd, const char *tapif, u32 ipaddr) 1431static void configure_device(int fd, const char *tapif, u32 ipaddr)
1238{ 1432{
1239 struct ifreq ifr; 1433 struct ifreq ifr;
@@ -1260,10 +1454,12 @@ static int get_tun_device(char tapif[IFNAMSIZ])
1260 /* Start with this zeroed. Messy but sure. */ 1454 /* Start with this zeroed. Messy but sure. */
1261 memset(&ifr, 0, sizeof(ifr)); 1455 memset(&ifr, 0, sizeof(ifr));
1262 1456
1263 /* We open the /dev/net/tun device and tell it we want a tap device. A 1457 /*
1458 * We open the /dev/net/tun device and tell it we want a tap device. A
1264 * tap device is like a tun device, only somehow different. To tell 1459 * tap device is like a tun device, only somehow different. To tell
1265 * the truth, I completely blundered my way through this code, but it 1460 * the truth, I completely blundered my way through this code, but it
1266 * works now! */ 1461 * works now!
1462 */
1267 netfd = open_or_die("/dev/net/tun", O_RDWR); 1463 netfd = open_or_die("/dev/net/tun", O_RDWR);
1268 ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_VNET_HDR; 1464 ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_VNET_HDR;
1269 strcpy(ifr.ifr_name, "tap%d"); 1465 strcpy(ifr.ifr_name, "tap%d");
@@ -1274,18 +1470,22 @@ static int get_tun_device(char tapif[IFNAMSIZ])
1274 TUN_F_CSUM|TUN_F_TSO4|TUN_F_TSO6|TUN_F_TSO_ECN) != 0) 1470 TUN_F_CSUM|TUN_F_TSO4|TUN_F_TSO6|TUN_F_TSO_ECN) != 0)
1275 err(1, "Could not set features for tun device"); 1471 err(1, "Could not set features for tun device");
1276 1472
1277 /* We don't need checksums calculated for packets coming in this 1473 /*
1278 * device: trust us! */ 1474 * We don't need checksums calculated for packets coming in this
1475 * device: trust us!
1476 */
1279 ioctl(netfd, TUNSETNOCSUM, 1); 1477 ioctl(netfd, TUNSETNOCSUM, 1);
1280 1478
1281 memcpy(tapif, ifr.ifr_name, IFNAMSIZ); 1479 memcpy(tapif, ifr.ifr_name, IFNAMSIZ);
1282 return netfd; 1480 return netfd;
1283} 1481}
1284 1482
1285/*L:195 Our network is a Host<->Guest network. This can either use bridging or 1483/*L:195
1484 * Our network is a Host<->Guest network. This can either use bridging or
1286 * routing, but the principle is the same: it uses the "tun" device to inject 1485 * routing, but the principle is the same: it uses the "tun" device to inject
1287 * packets into the Host as if they came in from a normal network card. We 1486 * packets into the Host as if they came in from a normal network card. We
1288 * just shunt packets between the Guest and the tun device. */ 1487 * just shunt packets between the Guest and the tun device.
1488 */
1289static void setup_tun_net(char *arg) 1489static void setup_tun_net(char *arg)
1290{ 1490{
1291 struct device *dev; 1491 struct device *dev;
@@ -1302,13 +1502,14 @@ static void setup_tun_net(char *arg)
1302 dev = new_device("net", VIRTIO_ID_NET); 1502 dev = new_device("net", VIRTIO_ID_NET);
1303 dev->priv = net_info; 1503 dev->priv = net_info;
1304 1504
1305 /* Network devices need a receive and a send queue, just like 1505 /* Network devices need a recv and a send queue, just like console. */
1306 * console. */
1307 add_virtqueue(dev, VIRTQUEUE_NUM, net_input); 1506 add_virtqueue(dev, VIRTQUEUE_NUM, net_input);
1308 add_virtqueue(dev, VIRTQUEUE_NUM, net_output); 1507 add_virtqueue(dev, VIRTQUEUE_NUM, net_output);
1309 1508
1310 /* We need a socket to perform the magic network ioctls to bring up the 1509 /*
1311 * tap interface, connect to the bridge etc. Any socket will do! */ 1510 * We need a socket to perform the magic network ioctls to bring up the
1511 * tap interface, connect to the bridge etc. Any socket will do!
1512 */
1312 ipfd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); 1513 ipfd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);
1313 if (ipfd < 0) 1514 if (ipfd < 0)
1314 err(1, "opening IP socket"); 1515 err(1, "opening IP socket");
@@ -1362,39 +1563,31 @@ static void setup_tun_net(char *arg)
1362 verbose("device %u: tun %s: %s\n", 1563 verbose("device %u: tun %s: %s\n",
1363 devices.device_num, tapif, arg); 1564 devices.device_num, tapif, arg);
1364} 1565}
1365 1566/*:*/
1366/* Our block (disk) device should be really simple: the Guest asks for a block
1367 * number and we read or write that position in the file. Unfortunately, that
1368 * was amazingly slow: the Guest waits until the read is finished before
1369 * running anything else, even if it could have been doing useful work.
1370 *
1371 * We could use async I/O, except it's reputed to suck so hard that characters
1372 * actually go missing from your code when you try to use it.
1373 *
1374 * So we farm the I/O out to thread, and communicate with it via a pipe. */
1375 1567
1376/* This hangs off device->priv. */ 1568/* This hangs off device->priv. */
1377struct vblk_info 1569struct vblk_info {
1378{
1379 /* The size of the file. */ 1570 /* The size of the file. */
1380 off64_t len; 1571 off64_t len;
1381 1572
1382 /* The file descriptor for the file. */ 1573 /* The file descriptor for the file. */
1383 int fd; 1574 int fd;
1384 1575
1385 /* IO thread listens on this file descriptor [0]. */
1386 int workpipe[2];
1387
1388 /* IO thread writes to this file descriptor to mark it done, then
1389 * Launcher triggers interrupt to Guest. */
1390 int done_fd;
1391}; 1576};
1392 1577
1393/*L:210 1578/*L:210
1394 * The Disk 1579 * The Disk
1395 * 1580 *
1396 * Remember that the block device is handled by a separate I/O thread. We head 1581 * The disk only has one virtqueue, so it only has one thread. It is really
1397 * straight into the core of that thread here: 1582 * simple: the Guest asks for a block number and we read or write that position
1583 * in the file.
1584 *
1585 * Before we serviced each virtqueue in a separate thread, that was unacceptably
1586 * slow: the Guest waits until the read is finished before running anything
1587 * else, even if it could have been doing useful work.
1588 *
1589 * We could have used async I/O, except it's reputed to suck so hard that
1590 * characters actually go missing from your code when you try to use it.
1398 */ 1591 */
1399static void blk_request(struct virtqueue *vq) 1592static void blk_request(struct virtqueue *vq)
1400{ 1593{
@@ -1406,47 +1599,64 @@ static void blk_request(struct virtqueue *vq)
1406 struct iovec iov[vq->vring.num]; 1599 struct iovec iov[vq->vring.num];
1407 off64_t off; 1600 off64_t off;
1408 1601
1409 /* Get the next request. */ 1602 /*
1603 * Get the next request, where we normally wait. It triggers the
1604 * interrupt to acknowledge previously serviced requests (if any).
1605 */
1410 head = wait_for_vq_desc(vq, iov, &out_num, &in_num); 1606 head = wait_for_vq_desc(vq, iov, &out_num, &in_num);
1411 1607
1412 /* Every block request should contain at least one output buffer 1608 /*
1609 * Every block request should contain at least one output buffer
1413 * (detailing the location on disk and the type of request) and one 1610 * (detailing the location on disk and the type of request) and one
1414 * input buffer (to hold the result). */ 1611 * input buffer (to hold the result).
1612 */
1415 if (out_num == 0 || in_num == 0) 1613 if (out_num == 0 || in_num == 0)
1416 errx(1, "Bad virtblk cmd %u out=%u in=%u", 1614 errx(1, "Bad virtblk cmd %u out=%u in=%u",
1417 head, out_num, in_num); 1615 head, out_num, in_num);
1418 1616
1419 out = convert(&iov[0], struct virtio_blk_outhdr); 1617 out = convert(&iov[0], struct virtio_blk_outhdr);
1420 in = convert(&iov[out_num+in_num-1], u8); 1618 in = convert(&iov[out_num+in_num-1], u8);
1619 /*
1620 * For historical reasons, block operations are expressed in 512 byte
1621 * "sectors".
1622 */
1421 off = out->sector * 512; 1623 off = out->sector * 512;
1422 1624
1423 /* The block device implements "barriers", where the Guest indicates 1625 /*
1626 * The block device implements "barriers", where the Guest indicates
1424 * that it wants all previous writes to occur before this write. We 1627 * that it wants all previous writes to occur before this write. We
1425 * don't have a way of asking our kernel to do a barrier, so we just 1628 * don't have a way of asking our kernel to do a barrier, so we just
1426 * synchronize all the data in the file. Pretty poor, no? */ 1629 * synchronize all the data in the file. Pretty poor, no?
1630 */
1427 if (out->type & VIRTIO_BLK_T_BARRIER) 1631 if (out->type & VIRTIO_BLK_T_BARRIER)
1428 fdatasync(vblk->fd); 1632 fdatasync(vblk->fd);
1429 1633
1430 /* In general the virtio block driver is allowed to try SCSI commands. 1634 /*
1431 * It'd be nice if we supported eject, for example, but we don't. */ 1635 * In general the virtio block driver is allowed to try SCSI commands.
1636 * It'd be nice if we supported eject, for example, but we don't.
1637 */
1432 if (out->type & VIRTIO_BLK_T_SCSI_CMD) { 1638 if (out->type & VIRTIO_BLK_T_SCSI_CMD) {
1433 fprintf(stderr, "Scsi commands unsupported\n"); 1639 fprintf(stderr, "Scsi commands unsupported\n");
1434 *in = VIRTIO_BLK_S_UNSUPP; 1640 *in = VIRTIO_BLK_S_UNSUPP;
1435 wlen = sizeof(*in); 1641 wlen = sizeof(*in);
1436 } else if (out->type & VIRTIO_BLK_T_OUT) { 1642 } else if (out->type & VIRTIO_BLK_T_OUT) {
1437 /* Write */ 1643 /*
1438 1644 * Write
1439 /* Move to the right location in the block file. This can fail 1645 *
1440 * if they try to write past end. */ 1646 * Move to the right location in the block file. This can fail
1647 * if they try to write past end.
1648 */
1441 if (lseek64(vblk->fd, off, SEEK_SET) != off) 1649 if (lseek64(vblk->fd, off, SEEK_SET) != off)
1442 err(1, "Bad seek to sector %llu", out->sector); 1650 err(1, "Bad seek to sector %llu", out->sector);
1443 1651
1444 ret = writev(vblk->fd, iov+1, out_num-1); 1652 ret = writev(vblk->fd, iov+1, out_num-1);
1445 verbose("WRITE to sector %llu: %i\n", out->sector, ret); 1653 verbose("WRITE to sector %llu: %i\n", out->sector, ret);
1446 1654
1447 /* Grr... Now we know how long the descriptor they sent was, we 1655 /*
1656 * Grr... Now we know how long the descriptor they sent was, we
1448 * make sure they didn't try to write over the end of the block 1657 * make sure they didn't try to write over the end of the block
1449 * file (possibly extending it). */ 1658 * file (possibly extending it).
1659 */
1450 if (ret > 0 && off + ret > vblk->len) { 1660 if (ret > 0 && off + ret > vblk->len) {
1451 /* Trim it back to the correct length */ 1661 /* Trim it back to the correct length */
1452 ftruncate64(vblk->fd, vblk->len); 1662 ftruncate64(vblk->fd, vblk->len);
@@ -1456,10 +1666,12 @@ static void blk_request(struct virtqueue *vq)
1456 wlen = sizeof(*in); 1666 wlen = sizeof(*in);
1457 *in = (ret >= 0 ? VIRTIO_BLK_S_OK : VIRTIO_BLK_S_IOERR); 1667 *in = (ret >= 0 ? VIRTIO_BLK_S_OK : VIRTIO_BLK_S_IOERR);
1458 } else { 1668 } else {
1459 /* Read */ 1669 /*
1460 1670 * Read
1461 /* Move to the right location in the block file. This can fail 1671 *
1462 * if they try to read past end. */ 1672 * Move to the right location in the block file. This can fail
1673 * if they try to read past end.
1674 */
1463 if (lseek64(vblk->fd, off, SEEK_SET) != off) 1675 if (lseek64(vblk->fd, off, SEEK_SET) != off)
1464 err(1, "Bad seek to sector %llu", out->sector); 1676 err(1, "Bad seek to sector %llu", out->sector);
1465 1677
@@ -1474,13 +1686,16 @@ static void blk_request(struct virtqueue *vq)
1474 } 1686 }
1475 } 1687 }
1476 1688
1477 /* OK, so we noted that it was pretty poor to use an fdatasync as a 1689 /*
1690 * OK, so we noted that it was pretty poor to use an fdatasync as a
1478 * barrier. But Christoph Hellwig points out that we need a sync 1691 * barrier. But Christoph Hellwig points out that we need a sync
1479 * *afterwards* as well: "Barriers specify no reordering to the front 1692 * *afterwards* as well: "Barriers specify no reordering to the front
1480 * or the back." And Jens Axboe confirmed it, so here we are: */ 1693 * or the back." And Jens Axboe confirmed it, so here we are:
1694 */
1481 if (out->type & VIRTIO_BLK_T_BARRIER) 1695 if (out->type & VIRTIO_BLK_T_BARRIER)
1482 fdatasync(vblk->fd); 1696 fdatasync(vblk->fd);
1483 1697
1698 /* Finished that request. */
1484 add_used(vq, head, wlen); 1699 add_used(vq, head, wlen);
1485} 1700}
1486 1701
@@ -1491,7 +1706,7 @@ static void setup_block_file(const char *filename)
1491 struct vblk_info *vblk; 1706 struct vblk_info *vblk;
1492 struct virtio_blk_config conf; 1707 struct virtio_blk_config conf;
1493 1708
1494 /* The device responds to return from I/O thread. */ 1709 /* Creat the device. */
1495 dev = new_device("block", VIRTIO_ID_BLOCK); 1710 dev = new_device("block", VIRTIO_ID_BLOCK);
1496 1711
1497 /* The device has one virtqueue, where the Guest places requests. */ 1712 /* The device has one virtqueue, where the Guest places requests. */
@@ -1510,27 +1725,32 @@ static void setup_block_file(const char *filename)
1510 /* Tell Guest how many sectors this device has. */ 1725 /* Tell Guest how many sectors this device has. */
1511 conf.capacity = cpu_to_le64(vblk->len / 512); 1726 conf.capacity = cpu_to_le64(vblk->len / 512);
1512 1727
1513 /* Tell Guest not to put in too many descriptors at once: two are used 1728 /*
1514 * for the in and out elements. */ 1729 * Tell Guest not to put in too many descriptors at once: two are used
1730 * for the in and out elements.
1731 */
1515 add_feature(dev, VIRTIO_BLK_F_SEG_MAX); 1732 add_feature(dev, VIRTIO_BLK_F_SEG_MAX);
1516 conf.seg_max = cpu_to_le32(VIRTQUEUE_NUM - 2); 1733 conf.seg_max = cpu_to_le32(VIRTQUEUE_NUM - 2);
1517 1734
1518 set_config(dev, sizeof(conf), &conf); 1735 /* Don't try to put whole struct: we have 8 bit limit. */
1736 set_config(dev, offsetof(struct virtio_blk_config, geometry), &conf);
1519 1737
1520 verbose("device %u: virtblock %llu sectors\n", 1738 verbose("device %u: virtblock %llu sectors\n",
1521 ++devices.device_num, le64_to_cpu(conf.capacity)); 1739 ++devices.device_num, le64_to_cpu(conf.capacity));
1522} 1740}
1523 1741
1524struct rng_info { 1742/*L:211
1525 int rfd; 1743 * Our random number generator device reads from /dev/random into the Guest's
1526};
1527
1528/* Our random number generator device reads from /dev/random into the Guest's
1529 * input buffers. The usual case is that the Guest doesn't want random numbers 1744 * input buffers. The usual case is that the Guest doesn't want random numbers
1530 * and so has no buffers although /dev/random is still readable, whereas 1745 * and so has no buffers although /dev/random is still readable, whereas
1531 * console is the reverse. 1746 * console is the reverse.
1532 * 1747 *
1533 * The same logic applies, however. */ 1748 * The same logic applies, however.
1749 */
1750struct rng_info {
1751 int rfd;
1752};
1753
1534static void rng_input(struct virtqueue *vq) 1754static void rng_input(struct virtqueue *vq)
1535{ 1755{
1536 int len; 1756 int len;
@@ -1543,9 +1763,10 @@ static void rng_input(struct virtqueue *vq)
1543 if (out_num) 1763 if (out_num)
1544 errx(1, "Output buffers in rng?"); 1764 errx(1, "Output buffers in rng?");
1545 1765
1546 /* This is why we convert to iovecs: the readv() call uses them, and so 1766 /*
1547 * it reads straight into the Guest's buffer. We loop to make sure we 1767 * Just like the console write, we loop to cover the whole iovec.
1548 * fill it. */ 1768 * In this case, short reads actually happen quite a bit.
1769 */
1549 while (!iov_empty(iov, in_num)) { 1770 while (!iov_empty(iov, in_num)) {
1550 len = readv(rng_info->rfd, iov, in_num); 1771 len = readv(rng_info->rfd, iov, in_num);
1551 if (len <= 0) 1772 if (len <= 0)
@@ -1558,15 +1779,18 @@ static void rng_input(struct virtqueue *vq)
1558 add_used(vq, head, totlen); 1779 add_used(vq, head, totlen);
1559} 1780}
1560 1781
1561/* And this creates a "hardware" random number device for the Guest. */ 1782/*L:199
1783 * This creates a "hardware" random number device for the Guest.
1784 */
1562static void setup_rng(void) 1785static void setup_rng(void)
1563{ 1786{
1564 struct device *dev; 1787 struct device *dev;
1565 struct rng_info *rng_info = malloc(sizeof(*rng_info)); 1788 struct rng_info *rng_info = malloc(sizeof(*rng_info));
1566 1789
1790 /* Our device's privat info simply contains the /dev/random fd. */
1567 rng_info->rfd = open_or_die("/dev/random", O_RDONLY); 1791 rng_info->rfd = open_or_die("/dev/random", O_RDONLY);
1568 1792
1569 /* The device responds to return from I/O thread. */ 1793 /* Create the new device. */
1570 dev = new_device("rng", VIRTIO_ID_RNG); 1794 dev = new_device("rng", VIRTIO_ID_RNG);
1571 dev->priv = rng_info; 1795 dev->priv = rng_info;
1572 1796
@@ -1582,8 +1806,10 @@ static void __attribute__((noreturn)) restart_guest(void)
1582{ 1806{
1583 unsigned int i; 1807 unsigned int i;
1584 1808
1585 /* Since we don't track all open fds, we simply close everything beyond 1809 /*
1586 * stderr. */ 1810 * Since we don't track all open fds, we simply close everything beyond
1811 * stderr.
1812 */
1587 for (i = 3; i < FD_SETSIZE; i++) 1813 for (i = 3; i < FD_SETSIZE; i++)
1588 close(i); 1814 close(i);
1589 1815
@@ -1594,8 +1820,10 @@ static void __attribute__((noreturn)) restart_guest(void)
1594 err(1, "Could not exec %s", main_args[0]); 1820 err(1, "Could not exec %s", main_args[0]);
1595} 1821}
1596 1822
1597/*L:220 Finally we reach the core of the Launcher which runs the Guest, serves 1823/*L:220
1598 * its input and output, and finally, lays it to rest. */ 1824 * Finally we reach the core of the Launcher which runs the Guest, serves
1825 * its input and output, and finally, lays it to rest.
1826 */
1599static void __attribute__((noreturn)) run_guest(void) 1827static void __attribute__((noreturn)) run_guest(void)
1600{ 1828{
1601 for (;;) { 1829 for (;;) {
@@ -1630,7 +1858,7 @@ static void __attribute__((noreturn)) run_guest(void)
1630 * 1858 *
1631 * Are you ready? Take a deep breath and join me in the core of the Host, in 1859 * Are you ready? Take a deep breath and join me in the core of the Host, in
1632 * "make Host". 1860 * "make Host".
1633 :*/ 1861:*/
1634 1862
1635static struct option opts[] = { 1863static struct option opts[] = {
1636 { "verbose", 0, NULL, 'v' }, 1864 { "verbose", 0, NULL, 'v' },
@@ -1651,8 +1879,7 @@ static void usage(void)
1651/*L:105 The main routine is where the real work begins: */ 1879/*L:105 The main routine is where the real work begins: */
1652int main(int argc, char *argv[]) 1880int main(int argc, char *argv[])
1653{ 1881{
1654 /* Memory, top-level pagetable, code startpoint and size of the 1882 /* Memory, code startpoint and size of the (optional) initrd. */
1655 * (optional) initrd. */
1656 unsigned long mem = 0, start, initrd_size = 0; 1883 unsigned long mem = 0, start, initrd_size = 0;
1657 /* Two temporaries. */ 1884 /* Two temporaries. */
1658 int i, c; 1885 int i, c;
@@ -1664,24 +1891,32 @@ int main(int argc, char *argv[])
1664 /* Save the args: we "reboot" by execing ourselves again. */ 1891 /* Save the args: we "reboot" by execing ourselves again. */
1665 main_args = argv; 1892 main_args = argv;
1666 1893
1667 /* First we initialize the device list. We keep a pointer to the last 1894 /*
1895 * First we initialize the device list. We keep a pointer to the last
1668 * device, and the next interrupt number to use for devices (1: 1896 * device, and the next interrupt number to use for devices (1:
1669 * remember that 0 is used by the timer). */ 1897 * remember that 0 is used by the timer).
1898 */
1670 devices.lastdev = NULL; 1899 devices.lastdev = NULL;
1671 devices.next_irq = 1; 1900 devices.next_irq = 1;
1672 1901
1902 /* We're CPU 0. In fact, that's the only CPU possible right now. */
1673 cpu_id = 0; 1903 cpu_id = 0;
1674 /* We need to know how much memory so we can set up the device 1904
1905 /*
1906 * We need to know how much memory so we can set up the device
1675 * descriptor and memory pages for the devices as we parse the command 1907 * descriptor and memory pages for the devices as we parse the command
1676 * line. So we quickly look through the arguments to find the amount 1908 * line. So we quickly look through the arguments to find the amount
1677 * of memory now. */ 1909 * of memory now.
1910 */
1678 for (i = 1; i < argc; i++) { 1911 for (i = 1; i < argc; i++) {
1679 if (argv[i][0] != '-') { 1912 if (argv[i][0] != '-') {
1680 mem = atoi(argv[i]) * 1024 * 1024; 1913 mem = atoi(argv[i]) * 1024 * 1024;
1681 /* We start by mapping anonymous pages over all of 1914 /*
1915 * We start by mapping anonymous pages over all of
1682 * guest-physical memory range. This fills it with 0, 1916 * guest-physical memory range. This fills it with 0,
1683 * and ensures that the Guest won't be killed when it 1917 * and ensures that the Guest won't be killed when it
1684 * tries to access it. */ 1918 * tries to access it.
1919 */
1685 guest_base = map_zeroed_pages(mem / getpagesize() 1920 guest_base = map_zeroed_pages(mem / getpagesize()
1686 + DEVICE_PAGES); 1921 + DEVICE_PAGES);
1687 guest_limit = mem; 1922 guest_limit = mem;
@@ -1714,8 +1949,10 @@ int main(int argc, char *argv[])
1714 usage(); 1949 usage();
1715 } 1950 }
1716 } 1951 }
1717 /* After the other arguments we expect memory and kernel image name, 1952 /*
1718 * followed by command line arguments for the kernel. */ 1953 * After the other arguments we expect memory and kernel image name,
1954 * followed by command line arguments for the kernel.
1955 */
1719 if (optind + 2 > argc) 1956 if (optind + 2 > argc)
1720 usage(); 1957 usage();
1721 1958
@@ -1733,20 +1970,26 @@ int main(int argc, char *argv[])
1733 /* Map the initrd image if requested (at top of physical memory) */ 1970 /* Map the initrd image if requested (at top of physical memory) */
1734 if (initrd_name) { 1971 if (initrd_name) {
1735 initrd_size = load_initrd(initrd_name, mem); 1972 initrd_size = load_initrd(initrd_name, mem);
1736 /* These are the location in the Linux boot header where the 1973 /*
1737 * start and size of the initrd are expected to be found. */ 1974 * These are the location in the Linux boot header where the
1975 * start and size of the initrd are expected to be found.
1976 */
1738 boot->hdr.ramdisk_image = mem - initrd_size; 1977 boot->hdr.ramdisk_image = mem - initrd_size;
1739 boot->hdr.ramdisk_size = initrd_size; 1978 boot->hdr.ramdisk_size = initrd_size;
1740 /* The bootloader type 0xFF means "unknown"; that's OK. */ 1979 /* The bootloader type 0xFF means "unknown"; that's OK. */
1741 boot->hdr.type_of_loader = 0xFF; 1980 boot->hdr.type_of_loader = 0xFF;
1742 } 1981 }
1743 1982
1744 /* The Linux boot header contains an "E820" memory map: ours is a 1983 /*
1745 * simple, single region. */ 1984 * The Linux boot header contains an "E820" memory map: ours is a
1985 * simple, single region.
1986 */
1746 boot->e820_entries = 1; 1987 boot->e820_entries = 1;
1747 boot->e820_map[0] = ((struct e820entry) { 0, mem, E820_RAM }); 1988 boot->e820_map[0] = ((struct e820entry) { 0, mem, E820_RAM });
1748 /* The boot header contains a command line pointer: we put the command 1989 /*
1749 * line after the boot header. */ 1990 * The boot header contains a command line pointer: we put the command
1991 * line after the boot header.
1992 */
1750 boot->hdr.cmd_line_ptr = to_guest_phys(boot + 1); 1993 boot->hdr.cmd_line_ptr = to_guest_phys(boot + 1);
1751 /* We use a simple helper to copy the arguments separated by spaces. */ 1994 /* We use a simple helper to copy the arguments separated by spaces. */
1752 concat((char *)(boot + 1), argv+optind+2); 1995 concat((char *)(boot + 1), argv+optind+2);
@@ -1760,11 +2003,13 @@ int main(int argc, char *argv[])
1760 /* Tell the entry path not to try to reload segment registers. */ 2003 /* Tell the entry path not to try to reload segment registers. */
1761 boot->hdr.loadflags |= KEEP_SEGMENTS; 2004 boot->hdr.loadflags |= KEEP_SEGMENTS;
1762 2005
1763 /* We tell the kernel to initialize the Guest: this returns the open 2006 /*
1764 * /dev/lguest file descriptor. */ 2007 * We tell the kernel to initialize the Guest: this returns the open
2008 * /dev/lguest file descriptor.
2009 */
1765 tell_kernel(start); 2010 tell_kernel(start);
1766 2011
1767 /* Ensure that we terminate if a child dies. */ 2012 /* Ensure that we terminate if a device-servicing child dies. */
1768 signal(SIGCHLD, kill_launcher); 2013 signal(SIGCHLD, kill_launcher);
1769 2014
1770 /* If we exit via err(), this kills all the threads, restores tty. */ 2015 /* If we exit via err(), this kills all the threads, restores tty. */
diff --git a/Documentation/lockdep-design.txt b/Documentation/lockdep-design.txt
index e20d913d591..abf768c681e 100644
--- a/Documentation/lockdep-design.txt
+++ b/Documentation/lockdep-design.txt
@@ -30,9 +30,9 @@ State
30The validator tracks lock-class usage history into 4n + 1 separate state bits: 30The validator tracks lock-class usage history into 4n + 1 separate state bits:
31 31
32- 'ever held in STATE context' 32- 'ever held in STATE context'
33- 'ever head as readlock in STATE context' 33- 'ever held as readlock in STATE context'
34- 'ever head with STATE enabled' 34- 'ever held with STATE enabled'
35- 'ever head as readlock with STATE enabled' 35- 'ever held as readlock with STATE enabled'
36 36
37Where STATE can be either one of (kernel/lockdep_states.h) 37Where STATE can be either one of (kernel/lockdep_states.h)
38 - hardirq 38 - hardirq
diff --git a/Documentation/networking/6pack.txt b/Documentation/networking/6pack.txt
index d0777a1200e..8f339428fdf 100644
--- a/Documentation/networking/6pack.txt
+++ b/Documentation/networking/6pack.txt
@@ -1,7 +1,7 @@
1This is the 6pack-mini-HOWTO, written by 1This is the 6pack-mini-HOWTO, written by
2 2
3Andreas Könsgen DG3KQ 3Andreas Könsgen DG3KQ
4Internet: ajk@iehk.rwth-aachen.de 4Internet: ajk@comnets.uni-bremen.de
5AMPR-net: dg3kq@db0pra.ampr.org 5AMPR-net: dg3kq@db0pra.ampr.org
6AX.25: dg3kq@db0ach.#nrw.deu.eu 6AX.25: dg3kq@db0ach.#nrw.deu.eu
7 7
diff --git a/Documentation/sound/alsa/Procfile.txt b/Documentation/sound/alsa/Procfile.txt
index 381908d8ca4..719a819f8cc 100644
--- a/Documentation/sound/alsa/Procfile.txt
+++ b/Documentation/sound/alsa/Procfile.txt
@@ -101,6 +101,8 @@ card*/pcm*/xrun_debug
101 bit 0 = Enable XRUN/jiffies debug messages 101 bit 0 = Enable XRUN/jiffies debug messages
102 bit 1 = Show stack trace at XRUN / jiffies check 102 bit 1 = Show stack trace at XRUN / jiffies check
103 bit 2 = Enable additional jiffies check 103 bit 2 = Enable additional jiffies check
104 bit 3 = Log hwptr update at each period interrupt
105 bit 4 = Log hwptr update at each snd_pcm_update_hw_ptr()
104 106
105 When the bit 0 is set, the driver will show the messages to 107 When the bit 0 is set, the driver will show the messages to
106 kernel log when an xrun is detected. The debug message is 108 kernel log when an xrun is detected. The debug message is
@@ -117,6 +119,9 @@ card*/pcm*/xrun_debug
117 buggy) hardware that doesn't give smooth pointer updates. 119 buggy) hardware that doesn't give smooth pointer updates.
118 This feature is enabled via the bit 2. 120 This feature is enabled via the bit 2.
119 121
122 Bits 3 and 4 are for logging the hwptr records. Note that
123 these will give flood of kernel messages.
124
120card*/pcm*/sub*/info 125card*/pcm*/sub*/info
121 The general information of this PCM sub-stream. 126 The general information of this PCM sub-stream.
122 127
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt
index cf42b820ff9..d56a0177542 100644
--- a/Documentation/sysrq.txt
+++ b/Documentation/sysrq.txt
@@ -66,7 +66,8 @@ On all - write a character to /proc/sysrq-trigger. e.g.:
66'b' - Will immediately reboot the system without syncing or unmounting 66'b' - Will immediately reboot the system without syncing or unmounting
67 your disks. 67 your disks.
68 68
69'c' - Will perform a kexec reboot in order to take a crashdump. 69'c' - Will perform a system crash by a NULL pointer dereference.
70 A crashdump will be taken if configured.
70 71
71'd' - Shows all locks that are held. 72'd' - Shows all locks that are held.
72 73
@@ -141,8 +142,8 @@ useful when you want to exit a program that will not let you switch consoles.
141re'B'oot is good when you're unable to shut down. But you should also 'S'ync 142re'B'oot is good when you're unable to shut down. But you should also 'S'ync
142and 'U'mount first. 143and 'U'mount first.
143 144
144'C'rashdump can be used to manually trigger a crashdump when the system is hung. 145'C'rash can be used to manually trigger a crashdump when the system is hung.
145The kernel needs to have been built with CONFIG_KEXEC enabled. 146Note that this just triggers a crash if there is no dump mechanism available.
146 147
147'S'ync is great when your system is locked up, it allows you to sync your 148'S'ync is great when your system is locked up, it allows you to sync your
148disks and will certainly lessen the chance of data loss and fscking. Note 149disks and will certainly lessen the chance of data loss and fscking. Note
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
index 014d255231f..68c236c0184 100644
--- a/Documentation/video4linux/CARDLIST.em28xx
+++ b/Documentation/video4linux/CARDLIST.em28xx
@@ -20,7 +20,7 @@
20 19 -> EM2860/SAA711X Reference Design (em2860) 20 19 -> EM2860/SAA711X Reference Design (em2860)
21 20 -> AMD ATI TV Wonder HD 600 (em2880) [0438:b002] 21 20 -> AMD ATI TV Wonder HD 600 (em2880) [0438:b002]
22 21 -> eMPIA Technology, Inc. GrabBeeX+ Video Encoder (em2800) [eb1a:2801] 22 21 -> eMPIA Technology, Inc. GrabBeeX+ Video Encoder (em2800) [eb1a:2801]
23 22 -> Unknown EM2750/EM2751 webcam grabber (em2750) [eb1a:2750,eb1a:2751] 23 22 -> EM2710/EM2750/EM2751 webcam grabber (em2750) [eb1a:2750,eb1a:2751]
24 23 -> Huaqi DLCW-130 (em2750) 24 23 -> Huaqi DLCW-130 (em2750)
25 24 -> D-Link DUB-T210 TV Tuner (em2820/em2840) [2001:f112] 25 24 -> D-Link DUB-T210 TV Tuner (em2820/em2840) [2001:f112]
26 25 -> Gadmei UTV310 (em2820/em2840) 26 25 -> Gadmei UTV310 (em2820/em2840)
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt
index 2bcf78896e2..573f95b5880 100644
--- a/Documentation/video4linux/gspca.txt
+++ b/Documentation/video4linux/gspca.txt
@@ -44,7 +44,9 @@ zc3xx 0458:7007 Genius VideoCam V2
44zc3xx 0458:700c Genius VideoCam V3 44zc3xx 0458:700c Genius VideoCam V3
45zc3xx 0458:700f Genius VideoCam Web V2 45zc3xx 0458:700f Genius VideoCam Web V2
46sonixj 0458:7025 Genius Eye 311Q 46sonixj 0458:7025 Genius Eye 311Q
47sn9c20x 0458:7029 Genius Look 320s
47sonixj 0458:702e Genius Slim 310 NB 48sonixj 0458:702e Genius Slim 310 NB
49sn9c20x 045e:00f4 LifeCam VX-6000 (SN9C20x + OV9650)
48sonixj 045e:00f5 MicroSoft VX3000 50sonixj 045e:00f5 MicroSoft VX3000
49sonixj 045e:00f7 MicroSoft VX1000 51sonixj 045e:00f7 MicroSoft VX1000
50ov519 045e:028c Micro$oft xbox cam 52ov519 045e:028c Micro$oft xbox cam
@@ -282,6 +284,28 @@ sonixj 0c45:613a Microdia Sonix PC Camera
282sonixj 0c45:613b Surfer SN-206 284sonixj 0c45:613b Surfer SN-206
283sonixj 0c45:613c Sonix Pccam168 285sonixj 0c45:613c Sonix Pccam168
284sonixj 0c45:6143 Sonix Pccam168 286sonixj 0c45:6143 Sonix Pccam168
287sn9c20x 0c45:6240 PC Camera (SN9C201 + MT9M001)
288sn9c20x 0c45:6242 PC Camera (SN9C201 + MT9M111)
289sn9c20x 0c45:6248 PC Camera (SN9C201 + OV9655)
290sn9c20x 0c45:624e PC Camera (SN9C201 + SOI968)
291sn9c20x 0c45:624f PC Camera (SN9C201 + OV9650)
292sn9c20x 0c45:6251 PC Camera (SN9C201 + OV9650)
293sn9c20x 0c45:6253 PC Camera (SN9C201 + OV9650)
294sn9c20x 0c45:6260 PC Camera (SN9C201 + OV7670)
295sn9c20x 0c45:6270 PC Camera (SN9C201 + MT9V011/MT9V111/MT9V112)
296sn9c20x 0c45:627b PC Camera (SN9C201 + OV7660)
297sn9c20x 0c45:627c PC Camera (SN9C201 + HV7131R)
298sn9c20x 0c45:627f PC Camera (SN9C201 + OV9650)
299sn9c20x 0c45:6280 PC Camera (SN9C202 + MT9M001)
300sn9c20x 0c45:6282 PC Camera (SN9C202 + MT9M111)
301sn9c20x 0c45:6288 PC Camera (SN9C202 + OV9655)
302sn9c20x 0c45:628e PC Camera (SN9C202 + SOI968)
303sn9c20x 0c45:628f PC Camera (SN9C202 + OV9650)
304sn9c20x 0c45:62a0 PC Camera (SN9C202 + OV7670)
305sn9c20x 0c45:62b0 PC Camera (SN9C202 + MT9V011/MT9V111/MT9V112)
306sn9c20x 0c45:62b3 PC Camera (SN9C202 + OV9655)
307sn9c20x 0c45:62bb PC Camera (SN9C202 + OV7660)
308sn9c20x 0c45:62bc PC Camera (SN9C202 + HV7131R)
285sunplus 0d64:0303 Sunplus FashionCam DXG 309sunplus 0d64:0303 Sunplus FashionCam DXG
286etoms 102c:6151 Qcam Sangha CIF 310etoms 102c:6151 Qcam Sangha CIF
287etoms 102c:6251 Qcam xxxxxx VGA 311etoms 102c:6251 Qcam xxxxxx VGA
@@ -290,6 +314,7 @@ spca561 10fd:7e50 FlyCam Usb 100
290zc3xx 10fd:8050 Typhoon Webshot II USB 300k 314zc3xx 10fd:8050 Typhoon Webshot II USB 300k
291ov534 1415:2000 Sony HD Eye for PS3 (SLEH 00201) 315ov534 1415:2000 Sony HD Eye for PS3 (SLEH 00201)
292pac207 145f:013a Trust WB-1300N 316pac207 145f:013a Trust WB-1300N
317sn9c20x 145f:013d Trust WB-3600R
293vc032x 15b8:6001 HP 2.0 Megapixel 318vc032x 15b8:6001 HP 2.0 Megapixel
294vc032x 15b8:6002 HP 2.0 Megapixel rz406aa 319vc032x 15b8:6002 HP 2.0 Megapixel rz406aa
295spca501 1776:501c Arowana 300K CMOS Camera 320spca501 1776:501c Arowana 300K CMOS Camera
@@ -300,4 +325,11 @@ spca500 2899:012c Toptro Industrial
300spca508 8086:0110 Intel Easy PC Camera 325spca508 8086:0110 Intel Easy PC Camera
301spca500 8086:0630 Intel Pocket PC Camera 326spca500 8086:0630 Intel Pocket PC Camera
302spca506 99fa:8988 Grandtec V.cap 327spca506 99fa:8988 Grandtec V.cap
328sn9c20x a168:0610 Dino-Lite Digital Microscope (SN9C201 + HV7131R)
329sn9c20x a168:0611 Dino-Lite Digital Microscope (SN9C201 + HV7131R)
330sn9c20x a168:0613 Dino-Lite Digital Microscope (SN9C201 + HV7131R)
331sn9c20x a168:0618 Dino-Lite Digital Microscope (SN9C201 + HV7131R)
332sn9c20x a168:0614 Dino-Lite Digital Microscope (SN9C201 + MT9M111)
333sn9c20x a168:0615 Dino-Lite Digital Microscope (SN9C201 + MT9M111)
334sn9c20x a168:0617 Dino-Lite Digital Microscope (SN9C201 + MT9M111)
303spca561 abcd:cdee Petcam 335spca561 abcd:cdee Petcam
diff --git a/MAINTAINERS b/MAINTAINERS
index 18c3f0c41c9..b1114cfac6b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -73,8 +73,8 @@ Note: For the hard of thinking, this list is meant to remain in alphabetical
73order. If you could add yourselves to it in alphabetical order that would be 73order. If you could add yourselves to it in alphabetical order that would be
74so much easier [Ed] 74so much easier [Ed]
75 75
76P: Person 76P: Person (obsolete)
77M: Mail patches to 77M: Mail patches to: FullName <address@domain>
78L: Mailing list that is relevant to this area 78L: Mailing list that is relevant to this area
79W: Web-page with status/info 79W: Web-page with status/info
80T: SCM tree type and location. Type is one of: git, hg, quilt, stgit. 80T: SCM tree type and location. Type is one of: git, hg, quilt, stgit.
@@ -104,88 +104,74 @@ X: Files and directories that are NOT maintained, same rules as F:
104 matches all files in and below net excluding net/ipv6/ 104 matches all files in and below net excluding net/ipv6/
105 105
1063C505 NETWORK DRIVER 1063C505 NETWORK DRIVER
107P: Philip Blundell 107M: Philip Blundell <philb@gnu.org>
108M: philb@gnu.org
109L: netdev@vger.kernel.org 108L: netdev@vger.kernel.org
110S: Maintained 109S: Maintained
111F: drivers/net/3c505* 110F: drivers/net/3c505*
112 111
1133C59X NETWORK DRIVER 1123C59X NETWORK DRIVER
114P: Steffen Klassert 113M: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
115M: klassert@mathematik.tu-chemnitz.de
116L: netdev@vger.kernel.org 114L: netdev@vger.kernel.org
117S: Maintained 115S: Maintained
118F: Documentation/networking/vortex.txt 116F: Documentation/networking/vortex.txt
119F: drivers/net/3c59x.c 117F: drivers/net/3c59x.c
120 118
1213CR990 NETWORK DRIVER 1193CR990 NETWORK DRIVER
122P: David Dillow 120M: David Dillow <dave@thedillows.org>
123M: dave@thedillows.org
124L: netdev@vger.kernel.org 121L: netdev@vger.kernel.org
125S: Maintained 122S: Maintained
126F: drivers/net/typhoon* 123F: drivers/net/typhoon*
127 124
1283W-9XXX SATA-RAID CONTROLLER DRIVER 1253W-9XXX SATA-RAID CONTROLLER DRIVER
129P: Adam Radford 126M: Adam Radford <linuxraid@amcc.com>
130M: linuxraid@amcc.com
131L: linux-scsi@vger.kernel.org 127L: linux-scsi@vger.kernel.org
132W: http://www.amcc.com 128W: http://www.amcc.com
133S: Supported 129S: Supported
134F: drivers/scsi/3w-9xxx* 130F: drivers/scsi/3w-9xxx*
135 131
1363W-XXXX ATA-RAID CONTROLLER DRIVER 1323W-XXXX ATA-RAID CONTROLLER DRIVER
137P: Adam Radford 133M: Adam Radford <linuxraid@amcc.com>
138M: linuxraid@amcc.com
139L: linux-scsi@vger.kernel.org 134L: linux-scsi@vger.kernel.org
140W: http://www.amcc.com 135W: http://www.amcc.com
141S: Supported 136S: Supported
142F: drivers/scsi/3w-xxxx* 137F: drivers/scsi/3w-xxxx*
143 138
14453C700 AND 53C700-66 SCSI DRIVER 13953C700 AND 53C700-66 SCSI DRIVER
145P: James E.J. Bottomley 140M: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
146M: James.Bottomley@HansenPartnership.com
147L: linux-scsi@vger.kernel.org 141L: linux-scsi@vger.kernel.org
148S: Maintained 142S: Maintained
149F: drivers/scsi/53c700* 143F: drivers/scsi/53c700*
150 144
1516PACK NETWORK DRIVER FOR AX.25 1456PACK NETWORK DRIVER FOR AX.25
152P: Andreas Koensgen 146M: Andreas Koensgen <ajk@comnets.uni-bremen.de>
153M: ajk@iehk.rwth-aachen.de
154L: linux-hams@vger.kernel.org 147L: linux-hams@vger.kernel.org
155S: Maintained 148S: Maintained
156F: drivers/net/hamradio/6pack.c 149F: drivers/net/hamradio/6pack.c
157 150
1588169 10/100/1000 GIGABIT ETHERNET DRIVER 1518169 10/100/1000 GIGABIT ETHERNET DRIVER
159P: Francois Romieu 152M: Francois Romieu <romieu@fr.zoreil.com>
160M: romieu@fr.zoreil.com
161L: netdev@vger.kernel.org 153L: netdev@vger.kernel.org
162S: Maintained 154S: Maintained
163F: drivers/net/r8169.c 155F: drivers/net/r8169.c
164 156
1658250/16?50 (AND CLONE UARTS) SERIAL DRIVER 1578250/16?50 (AND CLONE UARTS) SERIAL DRIVER
166P: Alan Cox
167M: alan@lxorguk.ukuu.org.uk
168L: linux-serial@vger.kernel.org 158L: linux-serial@vger.kernel.org
169W: http://serial.sourceforge.net 159W: http://serial.sourceforge.net
170S: Odd Fixes 160S: Orphan
171F: drivers/serial/8250* 161F: drivers/serial/8250*
172F: include/linux/serial_8250.h 162F: include/linux/serial_8250.h
173 163
1748390 NETWORK DRIVERS [WD80x3/SMC-ELITE, SMC-ULTRA, NE2000, 3C503, etc.] 1648390 NETWORK DRIVERS [WD80x3/SMC-ELITE, SMC-ULTRA, NE2000, 3C503, etc.]
175P: Paul Gortmaker 165M: Paul Gortmaker <p_gortmaker@yahoo.com>
176M: p_gortmaker@yahoo.com
177L: netdev@vger.kernel.org 166L: netdev@vger.kernel.org
178S: Maintained 167S: Maintained
179F: drivers/net/*8390* 168F: drivers/net/*8390*
180F: drivers/net/ax88796.c 169F: drivers/net/ax88796.c
181 170
1829P FILE SYSTEM 1719P FILE SYSTEM
183P: Eric Van Hensbergen 172M: Eric Van Hensbergen <ericvh@gmail.com>
184M: ericvh@gmail.com 173M: Ron Minnich <rminnich@sandia.gov>
185P: Ron Minnich 174M: Latchesar Ionkov <lucho@ionkov.net>
186M: rminnich@sandia.gov
187P: Latchesar Ionkov
188M: lucho@ionkov.net
189L: v9fs-developer@lists.sourceforge.net 175L: v9fs-developer@lists.sourceforge.net
190W: http://swik.net/v9fs 176W: http://swik.net/v9fs
191T: git git://git.kernel.org/pub/scm/linux/kernel/ericvh/v9fs.git 177T: git git://git.kernel.org/pub/scm/linux/kernel/ericvh/v9fs.git
@@ -194,15 +180,13 @@ F: Documentation/filesystems/9p.txt
194F: fs/9p/ 180F: fs/9p/
195 181
196A2232 SERIAL BOARD DRIVER 182A2232 SERIAL BOARD DRIVER
197P: Enver Haase 183M: Enver Haase <A2232@gmx.net>
198M: A2232@gmx.net
199L: linux-m68k@lists.linux-m68k.org 184L: linux-m68k@lists.linux-m68k.org
200S: Maintained 185S: Maintained
201F: drivers/char/ser_a2232* 186F: drivers/char/ser_a2232*
202 187
203AACRAID SCSI RAID DRIVER 188AACRAID SCSI RAID DRIVER
204P: Adaptec OEM Raid Solutions 189M: Adaptec OEM Raid Solutions <aacraid@adaptec.com>
205M: aacraid@adaptec.com
206L: linux-scsi@vger.kernel.org 190L: linux-scsi@vger.kernel.org
207W: http://www.adaptec.com/ 191W: http://www.adaptec.com/
208S: Supported 192S: Supported
@@ -210,44 +194,38 @@ F: Documentation/scsi/aacraid.txt
210F: drivers/scsi/aacraid/ 194F: drivers/scsi/aacraid/
211 195
212ABIT UGURU 1,2 HARDWARE MONITOR DRIVER 196ABIT UGURU 1,2 HARDWARE MONITOR DRIVER
213P: Hans de Goede 197M: Hans de Goede <j.w.r.degoede@hhs.nl>
214M: j.w.r.degoede@hhs.nl
215L: lm-sensors@lm-sensors.org 198L: lm-sensors@lm-sensors.org
216S: Maintained 199S: Maintained
217F: drivers/hwmon/abituguru.c 200F: drivers/hwmon/abituguru.c
218 201
219ABIT UGURU 3 HARDWARE MONITOR DRIVER 202ABIT UGURU 3 HARDWARE MONITOR DRIVER
220P: Alistair John Strachan 203M: Alistair John Strachan <alistair@devzero.co.uk>
221M: alistair@devzero.co.uk
222L: lm-sensors@lm-sensors.org 204L: lm-sensors@lm-sensors.org
223S: Maintained 205S: Maintained
224F: drivers/hwmon/abituguru3.c 206F: drivers/hwmon/abituguru3.c
225 207
226ACENIC DRIVER 208ACENIC DRIVER
227P: Jes Sorensen 209M: Jes Sorensen <jes@trained-monkey.org>
228M: jes@trained-monkey.org
229L: linux-acenic@sunsite.dk 210L: linux-acenic@sunsite.dk
230S: Maintained 211S: Maintained
231F: drivers/net/acenic* 212F: drivers/net/acenic*
232 213
233ACER ASPIRE ONE TEMPERATURE AND FAN DRIVER 214ACER ASPIRE ONE TEMPERATURE AND FAN DRIVER
234P: Peter Feuerer 215M: Peter Feuerer <peter@piie.net>
235M: peter@piie.net 216W: http://piie.net/?section=acerhdf
236W: http://piie.net/?section=acerhdf 217S: Maintained
237S: Maintained 218F: drivers/platform/x86/acerhdf.c
238F: drivers/platform/x86/acerhdf.c
239 219
240ACER WMI LAPTOP EXTRAS 220ACER WMI LAPTOP EXTRAS
241P: Carlos Corbacho 221M: Carlos Corbacho <carlos@strangeworlds.co.uk>
242M: carlos@strangeworlds.co.uk
243L: aceracpi@googlegroups.com (subscribers-only) 222L: aceracpi@googlegroups.com (subscribers-only)
244W: http://code.google.com/p/aceracpi 223W: http://code.google.com/p/aceracpi
245S: Maintained 224S: Maintained
246F: drivers/platform/x86/acer-wmi.c 225F: drivers/platform/x86/acer-wmi.c
247 226
248ACPI 227ACPI
249P: Len Brown 228M: Len Brown <lenb@kernel.org>
250M: lenb@kernel.org
251L: linux-acpi@vger.kernel.org 229L: linux-acpi@vger.kernel.org
252W: http://www.lesswatts.org/projects/acpi/ 230W: http://www.lesswatts.org/projects/acpi/
253T: git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git 231T: git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git
@@ -257,8 +235,7 @@ F: drivers/pnp/pnpacpi/
257F: include/linux/acpi.h 235F: include/linux/acpi.h
258 236
259ACPI BATTERY DRIVERS 237ACPI BATTERY DRIVERS
260P: Alexey Starikovskiy 238M: Alexey Starikovskiy <astarikovskiy@suse.de>
261M: astarikovskiy@suse.de
262L: linux-acpi@vger.kernel.org 239L: linux-acpi@vger.kernel.org
263W: http://www.lesswatts.org/projects/acpi/ 240W: http://www.lesswatts.org/projects/acpi/
264S: Supported 241S: Supported
@@ -266,80 +243,69 @@ F: drivers/acpi/battery.c
266F: drivers/acpi/*sbs* 243F: drivers/acpi/*sbs*
267 244
268ACPI EC DRIVER 245ACPI EC DRIVER
269P: Alexey Starikovskiy 246M: Alexey Starikovskiy <astarikovskiy@suse.de>
270M: astarikovskiy@suse.de
271L: linux-acpi@vger.kernel.org 247L: linux-acpi@vger.kernel.org
272W: http://www.lesswatts.org/projects/acpi/ 248W: http://www.lesswatts.org/projects/acpi/
273S: Supported 249S: Supported
274F: drivers/acpi/ec.c 250F: drivers/acpi/ec.c
275 251
276ACPI FAN DRIVER 252ACPI FAN DRIVER
277P: Zhang Rui 253M: Zhang Rui <rui.zhang@intel.com>
278M: rui.zhang@intel.com
279L: linux-acpi@vger.kernel.org 254L: linux-acpi@vger.kernel.org
280W: http://www.lesswatts.org/projects/acpi/ 255W: http://www.lesswatts.org/projects/acpi/
281S: Supported 256S: Supported
282F: drivers/acpi/fan.c 257F: drivers/acpi/fan.c
283 258
284ACPI PCI HOTPLUG DRIVER 259ACPI PCI HOTPLUG DRIVER
285P: Kristen Carlson Accardi 260M: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
286M: kristen.c.accardi@intel.com
287L: linux-pci@vger.kernel.org 261L: linux-pci@vger.kernel.org
288S: Supported 262S: Supported
289F: drivers/pci/hotplug/acpi* 263F: drivers/pci/hotplug/acpi*
290 264
291ACPI THERMAL DRIVER 265ACPI THERMAL DRIVER
292P: Zhang Rui 266M: Zhang Rui <rui.zhang@intel.com>
293M: rui.zhang@intel.com
294L: linux-acpi@vger.kernel.org 267L: linux-acpi@vger.kernel.org
295W: http://www.lesswatts.org/projects/acpi/ 268W: http://www.lesswatts.org/projects/acpi/
296S: Supported 269S: Supported
297F: drivers/acpi/*thermal* 270F: drivers/acpi/*thermal*
298 271
299ACPI VIDEO DRIVER 272ACPI VIDEO DRIVER
300P: Zhang Rui 273M: Zhang Rui <rui.zhang@intel.com>
301M: rui.zhang@intel.com
302L: linux-acpi@vger.kernel.org 274L: linux-acpi@vger.kernel.org
303W: http://www.lesswatts.org/projects/acpi/ 275W: http://www.lesswatts.org/projects/acpi/
304S: Supported 276S: Supported
305F: drivers/acpi/video.c 277F: drivers/acpi/video.c
306 278
307ACPI WMI DRIVER 279ACPI WMI DRIVER
308P: Carlos Corbacho 280M: Carlos Corbacho <carlos@strangeworlds.co.uk>
309M: carlos@strangeworlds.co.uk
310L: linux-acpi@vger.kernel.org 281L: linux-acpi@vger.kernel.org
311W: http://www.lesswatts.org/projects/acpi/ 282W: http://www.lesswatts.org/projects/acpi/
312S: Maintained 283S: Maintained
313F: drivers/platform/x86/wmi.c 284F: drivers/platform/x86/wmi.c
314 285
315AD1889 ALSA SOUND DRIVER 286AD1889 ALSA SOUND DRIVER
316P: Kyle McMartin 287M: Kyle McMartin <kyle@mcmartin.ca>
317M: kyle@mcmartin.ca 288M: Thibaut Varene <T-Bone@parisc-linux.org>
318P: Thibaut Varene
319M: T-Bone@parisc-linux.org
320W: http://wiki.parisc-linux.org/AD1889 289W: http://wiki.parisc-linux.org/AD1889
321L: linux-parisc@vger.kernel.org 290L: linux-parisc@vger.kernel.org
322S: Maintained 291S: Maintained
323F: sound/pci/ad1889.* 292F: sound/pci/ad1889.*
324 293
325ADM1025 HARDWARE MONITOR DRIVER 294ADM1025 HARDWARE MONITOR DRIVER
326P: Jean Delvare 295M: Jean Delvare <khali@linux-fr.org>
327M: khali@linux-fr.org
328L: lm-sensors@lm-sensors.org 296L: lm-sensors@lm-sensors.org
329S: Maintained 297S: Maintained
330F: Documentation/hwmon/adm1025 298F: Documentation/hwmon/adm1025
331F: drivers/hwmon/adm1025.c 299F: drivers/hwmon/adm1025.c
332 300
333ADM1029 HARDWARE MONITOR DRIVER 301ADM1029 HARDWARE MONITOR DRIVER
334P: Corentin Labbe 302M: Corentin Labbe <corentin.labbe@geomatys.fr>
335M: corentin.labbe@geomatys.fr
336L: lm-sensors@lm-sensors.org 303L: lm-sensors@lm-sensors.org
337S: Maintained 304S: Maintained
338F: drivers/hwmon/adm1029.c 305F: drivers/hwmon/adm1029.c
339 306
340ADM8211 WIRELESS DRIVER 307ADM8211 WIRELESS DRIVER
341P: Michael Wu 308M: Michael Wu <flamingice@sourmilk.net>
342M: flamingice@sourmilk.net
343L: linux-wireless@vger.kernel.org 309L: linux-wireless@vger.kernel.org
344W: http://linuxwireless.org/ 310W: http://linuxwireless.org/
345T: git git://git.kernel.org/pub/scm/linux/kernel/git/mwu/mac80211-drivers.git 311T: git git://git.kernel.org/pub/scm/linux/kernel/git/mwu/mac80211-drivers.git
@@ -347,35 +313,30 @@ S: Maintained
347F: drivers/net/wireless/adm8211.* 313F: drivers/net/wireless/adm8211.*
348 314
349ADT746X FAN DRIVER 315ADT746X FAN DRIVER
350P: Colin Leroy 316M: Colin Leroy <colin@colino.net>
351M: colin@colino.net
352S: Maintained 317S: Maintained
353F: drivers/macintosh/therm_adt746x.c 318F: drivers/macintosh/therm_adt746x.c
354 319
355ADVANSYS SCSI DRIVER 320ADVANSYS SCSI DRIVER
356P: Matthew Wilcox 321M: Matthew Wilcox <matthew@wil.cx>
357M: matthew@wil.cx
358L: linux-scsi@vger.kernel.org 322L: linux-scsi@vger.kernel.org
359S: Maintained 323S: Maintained
360F: Documentation/scsi/advansys.txt 324F: Documentation/scsi/advansys.txt
361F: drivers/scsi/advansys.c 325F: drivers/scsi/advansys.c
362 326
363AEDSP16 DRIVER 327AEDSP16 DRIVER
364P: Riccardo Facchetti 328M: Riccardo Facchetti <fizban@tin.it>
365M: fizban@tin.it
366S: Maintained 329S: Maintained
367F: sound/oss/aedsp16.c 330F: sound/oss/aedsp16.c
368 331
369AFFS FILE SYSTEM 332AFFS FILE SYSTEM
370P: Roman Zippel 333M: Roman Zippel <zippel@linux-m68k.org>
371M: zippel@linux-m68k.org
372S: Maintained 334S: Maintained
373F: Documentation/filesystems/affs.txt 335F: Documentation/filesystems/affs.txt
374F: fs/affs/ 336F: fs/affs/
375 337
376AFS FILESYSTEM & AF_RXRPC SOCKET DOMAIN 338AFS FILESYSTEM & AF_RXRPC SOCKET DOMAIN
377P: David Howells 339M: David Howells <dhowells@redhat.com>
378M: dhowells@redhat.com
379L: linux-afs@lists.infradead.org 340L: linux-afs@lists.infradead.org
380S: Supported 341S: Supported
381F: fs/afs/ 342F: fs/afs/
@@ -383,40 +344,35 @@ F: include/net/af_rxrpc.h
383F: net/rxrpc/af_rxrpc.c 344F: net/rxrpc/af_rxrpc.c
384 345
385AGPGART DRIVER 346AGPGART DRIVER
386P: David Airlie 347M: David Airlie <airlied@linux.ie>
387M: airlied@linux.ie
388T: git git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git 348T: git git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git
389S: Maintained 349S: Maintained
390F: drivers/char/agp/ 350F: drivers/char/agp/
391F: include/linux/agp* 351F: include/linux/agp*
392 352
393AHA152X SCSI DRIVER 353AHA152X SCSI DRIVER
394P: Juergen E. Fischer 354M: "Juergen E. Fischer" <fischer@norbit.de>
395M: fischer@norbit.de
396L: linux-scsi@vger.kernel.org 355L: linux-scsi@vger.kernel.org
397S: Maintained 356S: Maintained
398F: drivers/scsi/aha152x* 357F: drivers/scsi/aha152x*
399F: drivers/scsi/pcmcia/aha152x* 358F: drivers/scsi/pcmcia/aha152x*
400 359
401AIC7XXX / AIC79XX SCSI DRIVER 360AIC7XXX / AIC79XX SCSI DRIVER
402P: Hannes Reinecke 361M: Hannes Reinecke <hare@suse.de>
403M: hare@suse.de
404L: linux-scsi@vger.kernel.org 362L: linux-scsi@vger.kernel.org
405S: Maintained 363S: Maintained
406F: drivers/scsi/aic7xxx/ 364F: drivers/scsi/aic7xxx/
407F: drivers/scsi/aic7xxx_old/ 365F: drivers/scsi/aic7xxx_old/
408 366
409AIO 367AIO
410P: Benjamin LaHaise 368M: Benjamin LaHaise <bcrl@kvack.org>
411M: bcrl@kvack.org
412L: linux-aio@kvack.org 369L: linux-aio@kvack.org
413S: Supported 370S: Supported
414F: fs/aio.c 371F: fs/aio.c
415F: include/linux/*aio*.h 372F: include/linux/*aio*.h
416 373
417ALCATEL SPEEDTOUCH USB DRIVER 374ALCATEL SPEEDTOUCH USB DRIVER
418P: Duncan Sands 375M: Duncan Sands <duncan.sands@free.fr>
419M: duncan.sands@free.fr
420L: linux-usb@vger.kernel.org 376L: linux-usb@vger.kernel.org
421W: http://www.linux-usb.org/SpeedTouch/ 377W: http://www.linux-usb.org/SpeedTouch/
422S: Maintained 378S: Maintained
@@ -424,32 +380,27 @@ F: drivers/usb/atm/speedtch.c
424F: drivers/usb/atm/usbatm.c 380F: drivers/usb/atm/usbatm.c
425 381
426ALCHEMY AU1XX0 MMC DRIVER 382ALCHEMY AU1XX0 MMC DRIVER
427P: Manuel Lauss 383M: Manuel Lauss <manuel.lauss@gmail.com>
428M: manuel.lauss@gmail.com
429S: Maintained 384S: Maintained
430F: drivers/mmc/host/au1xmmc.c 385F: drivers/mmc/host/au1xmmc.c
431 386
432ALI1563 I2C DRIVER 387ALI1563 I2C DRIVER
433P: Rudolf Marek 388M: Rudolf Marek <r.marek@assembler.cz>
434M: r.marek@assembler.cz
435L: linux-i2c@vger.kernel.org 389L: linux-i2c@vger.kernel.org
436S: Maintained 390S: Maintained
437F: Documentation/i2c/busses/i2c-ali1563 391F: Documentation/i2c/busses/i2c-ali1563
438F: drivers/i2c/busses/i2c-ali1563.c 392F: drivers/i2c/busses/i2c-ali1563.c
439 393
440ALPHA PORT 394ALPHA PORT
441P: Richard Henderson 395M: Richard Henderson <rth@twiddle.net>
442M: rth@twiddle.net
443S: Odd Fixes for 2.4; Maintained for 2.6. 396S: Odd Fixes for 2.4; Maintained for 2.6.
444P: Ivan Kokshaysky 397M: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
445M: ink@jurassic.park.msu.ru
446S: Maintained for 2.4; PCI support for 2.6. 398S: Maintained for 2.4; PCI support for 2.6.
447L: linux-alpha@vger.kernel.org 399L: linux-alpha@vger.kernel.org
448F: arch/alpha/ 400F: arch/alpha/
449 401
450AMD GEODE CS5536 USB DEVICE CONTROLLER DRIVER 402AMD GEODE CS5536 USB DEVICE CONTROLLER DRIVER
451P: Thomas Dahlmann 403M: Thomas Dahlmann <dahlmann.thomas@arcor.de>
452M: dahlmann.thomas@arcor.de
453L: linux-geode@lists.infradead.org (moderated for non-subscribers) 404L: linux-geode@lists.infradead.org (moderated for non-subscribers)
454S: Supported 405S: Supported
455F: drivers/usb/gadget/amd5536udc.* 406F: drivers/usb/gadget/amd5536udc.*
@@ -466,8 +417,7 @@ F: drivers/video/geode/
466F: arch/x86/include/asm/geode.h 417F: arch/x86/include/asm/geode.h
467 418
468AMD IOMMU (AMD-VI) 419AMD IOMMU (AMD-VI)
469P: Joerg Roedel 420M: Joerg Roedel <joerg.roedel@amd.com>
470M: joerg.roedel@amd.com
471L: iommu@lists.linux-foundation.org 421L: iommu@lists.linux-foundation.org
472T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu.git 422T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu.git
473S: Supported 423S: Supported
@@ -475,40 +425,33 @@ F: arch/x86/kernel/amd_iommu*.c
475F: arch/x86/include/asm/amd_iommu*.h 425F: arch/x86/include/asm/amd_iommu*.h
476 426
477AMD MICROCODE UPDATE SUPPORT 427AMD MICROCODE UPDATE SUPPORT
478P: Andreas Herrmann 428M: Andreas Herrmann <andreas.herrmann3@amd.com>
479M: andreas.herrmann3@amd.com
480L: amd64-microcode@amd64.org 429L: amd64-microcode@amd64.org
481S: Supported 430S: Supported
482F: arch/x86/kernel/microcode_amd.c 431F: arch/x86/kernel/microcode_amd.c
483 432
484AMS (Apple Motion Sensor) DRIVER 433AMS (Apple Motion Sensor) DRIVER
485P: Stelian Pop 434M: Stelian Pop <stelian@popies.net>
486M: stelian@popies.net 435M: Michael Hanselmann <linux-kernel@hansmi.ch>
487P: Michael Hanselmann
488M: linux-kernel@hansmi.ch
489S: Supported 436S: Supported
490F: drivers/hwmon/ams/ 437F: drivers/hwmon/ams/
491 438
492AMSO1100 RNIC DRIVER 439AMSO1100 RNIC DRIVER
493P: Tom Tucker 440M: Tom Tucker <tom@opengridcomputing.com>
494M: tom@opengridcomputing.com 441M: Steve Wise <swise@opengridcomputing.com>
495P: Steve Wise
496M: swise@opengridcomputing.com
497L: general@lists.openfabrics.org 442L: general@lists.openfabrics.org
498S: Maintained 443S: Maintained
499F: drivers/infiniband/hw/amso1100/ 444F: drivers/infiniband/hw/amso1100/
500 445
501AOA (Apple Onboard Audio) ALSA DRIVER 446AOA (Apple Onboard Audio) ALSA DRIVER
502P: Johannes Berg 447M: Johannes Berg <johannes@sipsolutions.net>
503M: johannes@sipsolutions.net
504L: linuxppc-dev@ozlabs.org 448L: linuxppc-dev@ozlabs.org
505L: alsa-devel@alsa-project.org (moderated for non-subscribers) 449L: alsa-devel@alsa-project.org (moderated for non-subscribers)
506S: Maintained 450S: Maintained
507F: sound/aoa/ 451F: sound/aoa/
508 452
509APM DRIVER 453APM DRIVER
510P: Stephen Rothwell 454M: Stephen Rothwell <sfr@canb.auug.org.au>
511M: sfr@canb.auug.org.au
512L: linux-laptop@vger.kernel.org 455L: linux-laptop@vger.kernel.org
513W: http://www.canb.auug.org.au/~sfr/ 456W: http://www.canb.auug.org.au/~sfr/
514S: Supported 457S: Supported
@@ -516,51 +459,44 @@ F: arch/x86/kernel/apm_32.c
516F: include/linux/apm_bios.h 459F: include/linux/apm_bios.h
517 460
518APPLE BCM5974 MULTITOUCH DRIVER 461APPLE BCM5974 MULTITOUCH DRIVER
519P: Henrik Rydberg 462M: Henrik Rydberg <rydberg@euromail.se>
520M: rydberg@euromail.se
521L: linux-input@vger.kernel.org 463L: linux-input@vger.kernel.org
522S: Maintained 464S: Maintained
523F: drivers/input/mouse/bcm5974.c 465F: drivers/input/mouse/bcm5974.c
524 466
525APPLE SMC DRIVER 467APPLE SMC DRIVER
526P: Nicolas Boichat 468M: Nicolas Boichat <nicolas@boichat.ch>
527M: nicolas@boichat.ch
528L: mactel-linux-devel@lists.sourceforge.net 469L: mactel-linux-devel@lists.sourceforge.net
529S: Maintained 470S: Maintained
530F: drivers/hwmon/applesmc.c 471F: drivers/hwmon/applesmc.c
531 472
532APPLETALK NETWORK LAYER 473APPLETALK NETWORK LAYER
533P: Arnaldo Carvalho de Melo 474M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
534M: acme@ghostprotocols.net
535S: Maintained 475S: Maintained
536F: drivers/net/appletalk/ 476F: drivers/net/appletalk/
537F: net/appletalk/ 477F: net/appletalk/
538 478
539APPLETOUCH TOUCHPAD DRIVER 479APPLETOUCH TOUCHPAD DRIVER
540P: Johannes Berg 480M: Johannes Berg <johannes@sipsolutions.net>
541M: johannes@sipsolutions.net
542L: linux-input@vger.kernel.org 481L: linux-input@vger.kernel.org
543S: Maintained 482S: Maintained
544F: Documentation/input/appletouch.txt 483F: Documentation/input/appletouch.txt
545F: drivers/input/mouse/appletouch.c 484F: drivers/input/mouse/appletouch.c
546 485
547ARC FRAMEBUFFER DRIVER 486ARC FRAMEBUFFER DRIVER
548P: Jaya Kumar 487M: Jaya Kumar <jayalk@intworks.biz>
549M: jayalk@intworks.biz
550S: Maintained 488S: Maintained
551F: drivers/video/arcfb.c 489F: drivers/video/arcfb.c
552F: drivers/video/fb_defio.c 490F: drivers/video/fb_defio.c
553 491
554ARM MFM AND FLOPPY DRIVERS 492ARM MFM AND FLOPPY DRIVERS
555P: Ian Molton 493M: Ian Molton <spyro@f2s.com>
556M: spyro@f2s.com
557S: Maintained 494S: Maintained
558F: arch/arm/lib/floppydma.S 495F: arch/arm/lib/floppydma.S
559F: arch/arm/include/asm/floppy.h 496F: arch/arm/include/asm/floppy.h
560 497
561ARM PORT 498ARM PORT
562P: Russell King 499M: Russell King <linux@arm.linux.org.uk>
563M: linux@arm.linux.org.uk
564L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 500L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
565W: http://www.arm.linux.org.uk/ 501W: http://www.arm.linux.org.uk/
566S: Maintained 502S: Maintained
@@ -571,79 +507,67 @@ S: Orphan
571F: drivers/mmc/host/mmci.* 507F: drivers/mmc/host/mmci.*
572 508
573ARM/ADI ROADRUNNER MACHINE SUPPORT 509ARM/ADI ROADRUNNER MACHINE SUPPORT
574P: Lennert Buytenhek 510M: Lennert Buytenhek <kernel@wantstofly.org>
575M: kernel@wantstofly.org
576L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 511L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
577S: Maintained 512S: Maintained
578F: arch/arm/mach-ixp23xx/ 513F: arch/arm/mach-ixp23xx/
579F: arch/arm/mach-ixp23xx/include/mach/ 514F: arch/arm/mach-ixp23xx/include/mach/
580 515
581ARM/ADS SPHERE MACHINE SUPPORT 516ARM/ADS SPHERE MACHINE SUPPORT
582P: Lennert Buytenhek 517M: Lennert Buytenhek <kernel@wantstofly.org>
583M: kernel@wantstofly.org
584L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 518L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
585S: Maintained 519S: Maintained
586 520
587ARM/AFEB9260 MACHINE SUPPORT 521ARM/AFEB9260 MACHINE SUPPORT
588P: Sergey Lapin 522M: Sergey Lapin <slapin@ossfans.org>
589M: slapin@ossfans.org
590L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 523L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
591S: Maintained 524S: Maintained
592 525
593ARM/AJECO 1ARM MACHINE SUPPORT 526ARM/AJECO 1ARM MACHINE SUPPORT
594P: Lennert Buytenhek 527M: Lennert Buytenhek <kernel@wantstofly.org>
595M: kernel@wantstofly.org
596L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 528L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
597S: Maintained 529S: Maintained
598 530
599ARM/ATMEL AT91RM9200 ARM ARCHITECTURE 531ARM/ATMEL AT91RM9200 ARM ARCHITECTURE
600P: Andrew Victor 532M: Andrew Victor <linux@maxim.org.za>
601M: linux@maxim.org.za
602L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 533L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
603W: http://maxim.org.za/at91_26.html 534W: http://maxim.org.za/at91_26.html
604S: Maintained 535S: Maintained
605 536
606ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE 537ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE
607P: Lennert Buytenhek 538M: Lennert Buytenhek <kernel@wantstofly.org>
608M: kernel@wantstofly.org
609L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 539L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
610S: Maintained 540S: Maintained
611 541
612ARM/CIRRUS LOGIC EDB9315A MACHINE SUPPORT 542ARM/CIRRUS LOGIC EDB9315A MACHINE SUPPORT
613P: Lennert Buytenhek 543M: Lennert Buytenhek <kernel@wantstofly.org>
614M: kernel@wantstofly.org
615L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 544L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
616S: Maintained 545S: Maintained
617 546
618ARM/CLKDEV SUPPORT 547ARM/CLKDEV SUPPORT
619P: Russell King 548M: Russell King <linux@arm.linux.org.uk>
620M: linux@arm.linux.org.uk
621L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 549L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
622F: arch/arm/common/clkdev.c 550F: arch/arm/common/clkdev.c
623F: arch/arm/include/asm/clkdev.h 551F: arch/arm/include/asm/clkdev.h
624 552
625ARM/COMPULAB CM-X270/EM-X270 and CM-X300 MACHINE SUPPORT 553ARM/COMPULAB CM-X270/EM-X270 and CM-X300 MACHINE SUPPORT
626P: Mike Rapoport 554M: Mike Rapoport <mike@compulab.co.il>
627M: mike@compulab.co.il
628L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 555L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
629S: Maintained 556S: Maintained
630 557
631ARM/CORGI MACHINE SUPPORT 558ARM/CORGI MACHINE SUPPORT
632P: Richard Purdie 559M: Richard Purdie <rpurdie@rpsys.net>
633M: rpurdie@rpsys.net
634S: Maintained 560S: Maintained
635 561
636ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE 562ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE
637P: Paulius Zaleckas 563M: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
638M: paulius.zaleckas@teltonika.lt
639L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 564L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
640T: git git://gitorious.org/linux-gemini/mainline.git 565T: git git://gitorious.org/linux-gemini/mainline.git
641S: Maintained 566S: Maintained
642F: arch/arm/mach-gemini/ 567F: arch/arm/mach-gemini/
643 568
644ARM/EBSA110 MACHINE SUPPORT 569ARM/EBSA110 MACHINE SUPPORT
645P: Russell King 570M: Russell King <linux@arm.linux.org.uk>
646M: linux@arm.linux.org.uk
647L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 571L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
648W: http://www.arm.linux.org.uk/ 572W: http://www.arm.linux.org.uk/
649S: Maintained 573S: Maintained
@@ -651,12 +575,9 @@ F: arch/arm/mach-ebsa110/
651F: drivers/net/arm/am79c961a.* 575F: drivers/net/arm/am79c961a.*
652 576
653ARM/EZX SMARTPHONES (A780, A910, A1200, E680, ROKR E2 and ROKR E6) 577ARM/EZX SMARTPHONES (A780, A910, A1200, E680, ROKR E2 and ROKR E6)
654P: Daniel Ribeiro 578M: Daniel Ribeiro <drwyrm@gmail.com>
655M: drwyrm@gmail.com 579M: Stefan Schmidt <stefan@openezx.org>
656P: Stefan Schmidt 580M: Harald Welte <laforge@openezx.org>
657M: stefan@openezx.org
658P: Harald Welte
659M: laforge@openezx.org
660L: openezx-devel@lists.openezx.org (subscribers-only) 581L: openezx-devel@lists.openezx.org (subscribers-only)
661W: http://www.openezx.org/ 582W: http://www.openezx.org/
662S: Maintained 583S: Maintained
@@ -664,15 +585,13 @@ T: topgit git://git.openezx.org/openezx.git
664F: arch/arm/mach-pxa/ezx.c 585F: arch/arm/mach-pxa/ezx.c
665 586
666ARM/FARADAY FA526 PORT 587ARM/FARADAY FA526 PORT
667P: Paulius Zaleckas 588M: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
668M: paulius.zaleckas@teltonika.lt
669L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 589L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
670S: Maintained 590S: Maintained
671F: arch/arm/mm/*-fa* 591F: arch/arm/mm/*-fa*
672 592
673ARM/FOOTBRIDGE ARCHITECTURE 593ARM/FOOTBRIDGE ARCHITECTURE
674P: Russell King 594M: Russell King <linux@arm.linux.org.uk>
675M: linux@arm.linux.org.uk
676L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 595L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
677W: http://www.arm.linux.org.uk/ 596W: http://www.arm.linux.org.uk/
678S: Maintained 597S: Maintained
@@ -680,175 +599,146 @@ F: arch/arm/include/asm/hardware/dec21285.h
680F: arch/arm/mach-footbridge/ 599F: arch/arm/mach-footbridge/
681 600
682ARM/FREESCALE IMX / MXC ARM ARCHITECTURE 601ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
683P: Sascha Hauer 602M: Sascha Hauer <kernel@pengutronix.de>
684M: kernel@pengutronix.de
685L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 603L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
686S: Maintained 604S: Maintained
687 605
688ARM/GLOMATION GESBC9312SX MACHINE SUPPORT 606ARM/GLOMATION GESBC9312SX MACHINE SUPPORT
689P: Lennert Buytenhek 607M: Lennert Buytenhek <kernel@wantstofly.org>
690M: kernel@wantstofly.org
691L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 608L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
692S: Maintained 609S: Maintained
693 610
694ARM/GUMSTIX MACHINE SUPPORT 611ARM/GUMSTIX MACHINE SUPPORT
695P: Steve Sakoman 612M: Steve Sakoman <sakoman@gmail.com>
696M: sakoman@gmail.com
697L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 613L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
698S: Maintained 614S: Maintained
699 615
700ARM/H4700 (HP IPAQ HX4700) MACHINE SUPPORT 616ARM/H4700 (HP IPAQ HX4700) MACHINE SUPPORT
701P: Philipp Zabel 617M: Philipp Zabel <philipp.zabel@gmail.com>
702M: philipp.zabel@gmail.com
703S: Maintained 618S: Maintained
704F: arch/arm/mach-pxa/hx4700.c 619F: arch/arm/mach-pxa/hx4700.c
705F: arch/arm/mach-pxa/include/mach/hx4700.h 620F: arch/arm/mach-pxa/include/mach/hx4700.h
706 621
707ARM/HP JORNADA 7XX MACHINE SUPPORT 622ARM/HP JORNADA 7XX MACHINE SUPPORT
708P: Kristoffer Ericson 623M: Kristoffer Ericson <kristoffer.ericson@gmail.com>
709M: kristoffer.ericson@gmail.com
710W: www.jlime.com 624W: www.jlime.com
711S: Maintained 625S: Maintained
626T: git git://git.kernel.org/pub/scm/linux/kernel/git/kristoffer/linux-hpc.git
627F: arch/arm/mach-sa1100/jornada720.c
628F: arch/arm/mach-sa1100/include/mach/jornada720.h
712 629
713ARM/INTEL IOP32X ARM ARCHITECTURE 630ARM/INTEL IOP32X ARM ARCHITECTURE
714P: Lennert Buytenhek 631M: Lennert Buytenhek <kernel@wantstofly.org>
715M: kernel@wantstofly.org 632M: Dan Williams <dan.j.williams@intel.com>
716P: Dan Williams
717M: dan.j.williams@intel.com
718L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 633L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
719S: Supported 634S: Supported
720 635
721ARM/INTEL IOP33X ARM ARCHITECTURE 636ARM/INTEL IOP33X ARM ARCHITECTURE
722P: Dan Williams 637M: Dan Williams <dan.j.williams@intel.com>
723M: dan.j.williams@intel.com
724L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 638L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
725S: Supported 639S: Supported
726 640
727ARM/INTEL IOP13XX ARM ARCHITECTURE 641ARM/INTEL IOP13XX ARM ARCHITECTURE
728P: Lennert Buytenhek 642M: Lennert Buytenhek <kernel@wantstofly.org>
729M: kernel@wantstofly.org 643M: Dan Williams <dan.j.williams@intel.com>
730P: Dan Williams
731M: dan.j.williams@intel.com
732L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 644L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
733S: Supported 645S: Supported
734 646
735ARM/INTEL IQ81342EX MACHINE SUPPORT 647ARM/INTEL IQ81342EX MACHINE SUPPORT
736P: Lennert Buytenhek 648M: Lennert Buytenhek <kernel@wantstofly.org>
737M: kernel@wantstofly.org 649M: Dan Williams <dan.j.williams@intel.com>
738P: Dan Williams
739M: dan.j.williams@intel.com
740L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 650L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
741S: Supported 651S: Supported
742 652
743ARM/INTEL IXP2000 ARM ARCHITECTURE 653ARM/INTEL IXP2000 ARM ARCHITECTURE
744P: Lennert Buytenhek 654M: Lennert Buytenhek <kernel@wantstofly.org>
745M: kernel@wantstofly.org
746L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 655L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
747S: Maintained 656S: Maintained
748 657
749ARM/INTEL IXDP2850 MACHINE SUPPORT 658ARM/INTEL IXDP2850 MACHINE SUPPORT
750P: Lennert Buytenhek 659M: Lennert Buytenhek <kernel@wantstofly.org>
751M: kernel@wantstofly.org
752L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 660L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
753S: Maintained 661S: Maintained
754 662
755ARM/INTEL IXP23XX ARM ARCHITECTURE 663ARM/INTEL IXP23XX ARM ARCHITECTURE
756P: Lennert Buytenhek 664M: Lennert Buytenhek <kernel@wantstofly.org>
757M: kernel@wantstofly.org
758L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 665L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
759S: Maintained 666S: Maintained
760 667
761ARM/INTEL XSC3 (MANZANO) ARM CORE 668ARM/INTEL XSC3 (MANZANO) ARM CORE
762P: Lennert Buytenhek 669M: Lennert Buytenhek <kernel@wantstofly.org>
763M: kernel@wantstofly.org 670M: Dan Williams <dan.j.williams@intel.com>
764P: Dan Williams
765M: dan.j.williams@intel.com
766L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 671L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
767S: Supported 672S: Supported
768 673
769ARM/IP FABRICS DOUBLE ESPRESSO MACHINE SUPPORT 674ARM/IP FABRICS DOUBLE ESPRESSO MACHINE SUPPORT
770P: Lennert Buytenhek 675M: Lennert Buytenhek <kernel@wantstofly.org>
771M: kernel@wantstofly.org
772L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 676L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
773S: Maintained 677S: Maintained
774 678
775ARM/LOGICPD PXA270 MACHINE SUPPORT 679ARM/LOGICPD PXA270 MACHINE SUPPORT
776P: Lennert Buytenhek 680M: Lennert Buytenhek <kernel@wantstofly.org>
777M: kernel@wantstofly.org
778L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 681L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
779S: Maintained 682S: Maintained
780 683
781ARM/MAGICIAN MACHINE SUPPORT 684ARM/MAGICIAN MACHINE SUPPORT
782P: Philipp Zabel 685M: Philipp Zabel <philipp.zabel@gmail.com>
783M: philipp.zabel@gmail.com
784S: Maintained 686S: Maintained
785 687
786ARM/MIOA701 MACHINE SUPPORT 688ARM/MIOA701 MACHINE SUPPORT
787P: Robert Jarzmik 689M: Robert Jarzmik <robert.jarzmik@free.fr>
788M: robert.jarzmik@free.fr
789L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 690L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
790F: arch/arm/mach-pxa/mioa701.c 691F: arch/arm/mach-pxa/mioa701.c
791S: Maintained 692S: Maintained
792 693
793ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT 694ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
794P: Michael Petchkovsky 695M: Michael Petchkovsky <mkpetch@internode.on.net>
795M: mkpetch@internode.on.net
796S: Maintained 696S: Maintained
797 697
798ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT 698ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT
799P: Nelson Castillo 699M: Nelson Castillo <arhuaco@freaks-unidos.net>
800M: arhuaco@freaks-unidos.net
801L: openmoko-kernel@lists.openmoko.org (subscribers-only) 700L: openmoko-kernel@lists.openmoko.org (subscribers-only)
802W: http://wiki.openmoko.org/wiki/Neo_FreeRunner 701W: http://wiki.openmoko.org/wiki/Neo_FreeRunner
803S: Supported 702S: Supported
804 703
805ARM/TOSA MACHINE SUPPORT 704ARM/TOSA MACHINE SUPPORT
806P: Dmitry Eremin-Solenikov 705M: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
807M: dbaryshkov@gmail.com 706M: Dirk Opfer <dirk@opfer-online.de>
808P: Dirk Opfer
809M: dirk@opfer-online.de
810S: Maintained 707S: Maintained
811 708
812ARM/PALMTX,PALMT5,PALMLD,PALMTE2 SUPPORT 709ARM/PALMTX,PALMT5,PALMLD,PALMTE2 SUPPORT
813P: Marek Vasut 710M: Marek Vasut <marek.vasut@gmail.com>
814M: marek.vasut@gmail.com
815W: http://hackndev.com 711W: http://hackndev.com
816S: Maintained 712S: Maintained
817 713
818ARM/PALM TREO 680 SUPPORT 714ARM/PALM TREO 680 SUPPORT
819P: Tomas Cech 715M: Tomas Cech <sleep_walker@suse.cz>
820M: sleep_walker@suse.cz
821W: http://hackndev.com 716W: http://hackndev.com
822S: Maintained 717S: Maintained
823 718
824ARM/PALMZ72 SUPPORT 719ARM/PALMZ72 SUPPORT
825P: Sergey Lapin 720M: Sergey Lapin <slapin@ossfans.org>
826M: slapin@ossfans.org
827W: http://hackndev.com 721W: http://hackndev.com
828S: Maintained 722S: Maintained
829 723
830ARM/PLEB SUPPORT 724ARM/PLEB SUPPORT
831P: Peter Chubb 725M: Peter Chubb <pleb@gelato.unsw.edu.au>
832M: pleb@gelato.unsw.edu.au
833W: http://www.disy.cse.unsw.edu.au/Hardware/PLEB 726W: http://www.disy.cse.unsw.edu.au/Hardware/PLEB
834S: Maintained 727S: Maintained
835 728
836ARM/PT DIGITAL BOARD PORT 729ARM/PT DIGITAL BOARD PORT
837P: Stefan Eletzhofer 730M: Stefan Eletzhofer <stefan.eletzhofer@eletztrick.de>
838M: stefan.eletzhofer@eletztrick.de
839L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 731L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
840W: http://www.arm.linux.org.uk/ 732W: http://www.arm.linux.org.uk/
841S: Maintained 733S: Maintained
842 734
843ARM/RADISYS ENP2611 MACHINE SUPPORT 735ARM/RADISYS ENP2611 MACHINE SUPPORT
844P: Lennert Buytenhek 736M: Lennert Buytenhek <kernel@wantstofly.org>
845M: kernel@wantstofly.org
846L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 737L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
847S: Maintained 738S: Maintained
848 739
849ARM/RISCPC ARCHITECTURE 740ARM/RISCPC ARCHITECTURE
850P: Russell King 741M: Russell King <linux@arm.linux.org.uk>
851M: linux@arm.linux.org.uk
852L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 742L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
853W: http://www.arm.linux.org.uk/ 743W: http://www.arm.linux.org.uk/
854S: Maintained 744S: Maintained
@@ -862,14 +752,12 @@ F: drivers/net/arm/ether*
862F: drivers/scsi/arm/ 752F: drivers/scsi/arm/
863 753
864ARM/SHARK MACHINE SUPPORT 754ARM/SHARK MACHINE SUPPORT
865P: Alexander Schulz 755M: Alexander Schulz <alex@shark-linux.de>
866M: alex@shark-linux.de
867W: http://www.shark-linux.de/shark.html 756W: http://www.shark-linux.de/shark.html
868S: Maintained 757S: Maintained
869 758
870ARM/SAMSUNG ARM ARCHITECTURES 759ARM/SAMSUNG ARM ARCHITECTURES
871P: Ben Dooks 760M: Ben Dooks <ben-linux@fluff.org>
872M: ben-linux@fluff.org
873L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 761L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
874W: http://www.fluff.org/ben/linux/ 762W: http://www.fluff.org/ben/linux/
875S: Maintained 763S: Maintained
@@ -877,91 +765,73 @@ F: arch/arm/plat-s3c/
877F: arch/arm/plat-s3c24xx/ 765F: arch/arm/plat-s3c24xx/
878 766
879ARM/S3C2410 ARM ARCHITECTURE 767ARM/S3C2410 ARM ARCHITECTURE
880P: Ben Dooks 768M: Ben Dooks <ben-linux@fluff.org>
881M: ben-linux@fluff.org
882L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 769L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
883W: http://www.fluff.org/ben/linux/ 770W: http://www.fluff.org/ben/linux/
884S: Maintained 771S: Maintained
885F: arch/arm/mach-s3c2410/ 772F: arch/arm/mach-s3c2410/
886 773
887ARM/S3C2440 ARM ARCHITECTURE 774ARM/S3C2440 ARM ARCHITECTURE
888P: Ben Dooks 775M: Ben Dooks <ben-linux@fluff.org>
889M: ben-linux@fluff.org
890L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 776L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
891W: http://www.fluff.org/ben/linux/ 777W: http://www.fluff.org/ben/linux/
892S: Maintained 778S: Maintained
893F: arch/arm/mach-s3c2440/ 779F: arch/arm/mach-s3c2440/
894 780
895ARM/S3C2442 ARM ARCHITECTURE 781ARM/S3C2442 ARM ARCHITECTURE
896P: Ben Dooks 782M: Ben Dooks <ben-linux@fluff.org>
897M: ben-linux@fluff.org
898L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 783L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
899W: http://www.fluff.org/ben/linux/ 784W: http://www.fluff.org/ben/linux/
900S: Maintained 785S: Maintained
901F: arch/arm/mach-s3c2442/ 786F: arch/arm/mach-s3c2442/
902 787
903ARM/S3C2443 ARM ARCHITECTURE 788ARM/S3C2443 ARM ARCHITECTURE
904P: Ben Dooks 789M: Ben Dooks <ben-linux@fluff.org>
905M: ben-linux@fluff.org
906L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 790L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
907W: http://www.fluff.org/ben/linux/ 791W: http://www.fluff.org/ben/linux/
908S: Maintained 792S: Maintained
909F: arch/arm/mach-s3c2443/ 793F: arch/arm/mach-s3c2443/
910 794
911ARM/S3C6400 ARM ARCHITECTURE 795ARM/S3C6400 ARM ARCHITECTURE
912P: Ben Dooks 796M: Ben Dooks <ben-linux@fluff.org>
913M: ben-linux@fluff.org
914L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 797L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
915W: http://www.fluff.org/ben/linux/ 798W: http://www.fluff.org/ben/linux/
916S: Maintained 799S: Maintained
917F: arch/arm/mach-s3c6400/ 800F: arch/arm/mach-s3c6400/
918 801
919ARM/S3C6410 ARM ARCHITECTURE 802ARM/S3C6410 ARM ARCHITECTURE
920P: Ben Dooks 803M: Ben Dooks <ben-linux@fluff.org>
921M: ben-linux@fluff.org
922L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 804L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
923W: http://www.fluff.org/ben/linux/ 805W: http://www.fluff.org/ben/linux/
924S: Maintained 806S: Maintained
925F: arch/arm/mach-s3c6410/ 807F: arch/arm/mach-s3c6410/
926 808
927ARM/TECHNOLOGIC SYSTEMS TS7250 MACHINE SUPPORT 809ARM/TECHNOLOGIC SYSTEMS TS7250 MACHINE SUPPORT
928P: Lennert Buytenhek 810M: Lennert Buytenhek <kernel@wantstofly.org>
929M: kernel@wantstofly.org
930L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 811L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
931S: Maintained 812S: Maintained
932 813
933ARM/THECUS N2100 MACHINE SUPPORT 814ARM/THECUS N2100 MACHINE SUPPORT
934P: Lennert Buytenhek 815M: Lennert Buytenhek <kernel@wantstofly.org>
935M: kernel@wantstofly.org
936L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 816L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
937S: Maintained 817S: Maintained
938 818
939ARM/NUVOTON W90X900 ARM ARCHITECTURE 819ARM/NUVOTON W90X900 ARM ARCHITECTURE
940P: Wan ZongShun 820M: Wan ZongShun <mcuos.com@gmail.com>
941M: mcuos.com@gmail.com
942L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 821L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
943W: http://www.mcuos.com 822W: http://www.mcuos.com
944S: Maintained 823S: Maintained
945 824
946ARM/VFP SUPPORT 825ARM/VFP SUPPORT
947P: Russell King 826M: Russell King <linux@arm.linux.org.uk>
948M: linux@arm.linux.org.uk
949L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 827L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
950W: http://www.arm.linux.org.uk/ 828W: http://www.arm.linux.org.uk/
951S: Maintained 829S: Maintained
952F: arch/arm/vfp/ 830F: arch/arm/vfp/
953 831
954ARPD SUPPORT
955P: Jonathan Layes
956L: netdev@vger.kernel.org
957S: Maintained
958F: net/ipv4/arp.c
959
960ASUS ACPI EXTRAS DRIVER 832ASUS ACPI EXTRAS DRIVER
961P: Corentin Chary 833M: Corentin Chary <corentincj@iksaif.net>
962M: corentincj@iksaif.net 834M: Karol Kozimor <sziwan@users.sourceforge.net>
963P: Karol Kozimor
964M: sziwan@users.sourceforge.net
965L: acpi4asus-user@lists.sourceforge.net 835L: acpi4asus-user@lists.sourceforge.net
966W: http://acpi4asus.sf.net 836W: http://acpi4asus.sf.net
967S: Maintained 837S: Maintained
@@ -969,25 +839,21 @@ F: arch/x86/kernel/acpi/boot.c
969F: drivers/platform/x86/asus_acpi.c 839F: drivers/platform/x86/asus_acpi.c
970 840
971ASUS ASB100 HARDWARE MONITOR DRIVER 841ASUS ASB100 HARDWARE MONITOR DRIVER
972P: Mark M. Hoffman 842M: "Mark M. Hoffman" <mhoffman@lightlink.com>
973M: mhoffman@lightlink.com
974L: lm-sensors@lm-sensors.org 843L: lm-sensors@lm-sensors.org
975S: Maintained 844S: Maintained
976F: drivers/hwmon/asb100.c 845F: drivers/hwmon/asb100.c
977 846
978ASUS LAPTOP EXTRAS DRIVER 847ASUS LAPTOP EXTRAS DRIVER
979P: Corentin Chary 848M: Corentin Chary <corentincj@iksaif.net>
980M: corentincj@iksaif.net
981L: acpi4asus-user@lists.sourceforge.net 849L: acpi4asus-user@lists.sourceforge.net
982W: http://acpi4asus.sf.net 850W: http://acpi4asus.sf.net
983S: Maintained 851S: Maintained
984F: drivers/platform/x86/asus-laptop.c 852F: drivers/platform/x86/asus-laptop.c
985 853
986ASYNCHRONOUS TRANSFERS/TRANSFORMS (IOAT) API 854ASYNCHRONOUS TRANSFERS/TRANSFORMS (IOAT) API
987P: Dan Williams 855M: Dan Williams <dan.j.williams@intel.com>
988M: dan.j.williams@intel.com 856M: Maciej Sosnowski <maciej.sosnowski@intel.com>
989P: Maciej Sosnowski
990M: maciej.sosnowski@intel.com
991W: http://sourceforge.net/projects/xscaleiop 857W: http://sourceforge.net/projects/xscaleiop
992S: Supported 858S: Supported
993F: Documentation/crypto/async-tx-api.txt 859F: Documentation/crypto/async-tx-api.txt
@@ -997,64 +863,49 @@ F: include/linux/dmaengine.h
997F: include/linux/async_tx.h 863F: include/linux/async_tx.h
998 864
999ATA OVER ETHERNET (AOE) DRIVER 865ATA OVER ETHERNET (AOE) DRIVER
1000P: Ed L. Cashin 866M: "Ed L. Cashin" <ecashin@coraid.com>
1001M: ecashin@coraid.com
1002W: http://www.coraid.com/support/linux 867W: http://www.coraid.com/support/linux
1003S: Supported 868S: Supported
1004F: Documentation/aoe/ 869F: Documentation/aoe/
1005F: drivers/block/aoe/ 870F: drivers/block/aoe/
1006 871
1007ATHEROS ATH5K WIRELESS DRIVER 872ATHEROS ATH5K WIRELESS DRIVER
1008P: Jiri Slaby 873M: Jiri Slaby <jirislaby@gmail.com>
1009M: jirislaby@gmail.com 874M: Nick Kossifidis <mickflemm@gmail.com>
1010P: Nick Kossifidis 875M: "Luis R. Rodriguez" <lrodriguez@atheros.com>
1011M: mickflemm@gmail.com 876M: Bob Copeland <me@bobcopeland.com>
1012P: Luis R. Rodriguez
1013M: lrodriguez@atheros.com
1014P: Bob Copeland
1015M: me@bobcopeland.com
1016L: linux-wireless@vger.kernel.org 877L: linux-wireless@vger.kernel.org
1017L: ath5k-devel@lists.ath5k.org 878L: ath5k-devel@lists.ath5k.org
1018S: Maintained 879S: Maintained
1019F: drivers/net/wireless/ath/ath5k/ 880F: drivers/net/wireless/ath/ath5k/
1020 881
1021ATHEROS ATH9K WIRELESS DRIVER 882ATHEROS ATH9K WIRELESS DRIVER
1022P: Luis R. Rodriguez 883M: "Luis R. Rodriguez" <lrodriguez@atheros.com>
1023M: lrodriguez@atheros.com 884M: Jouni Malinen <jmalinen@atheros.com>
1024P: Jouni Malinen 885M: Sujith Manoharan <Sujith.Manoharan@atheros.com>
1025M: jmalinen@atheros.com 886M: Vasanthakumar Thiagarajan <vasanth@atheros.com>
1026P: Sujith Manoharan 887M: Senthil Balasubramanian <senthilkumar@atheros.com>
1027M: Sujith.Manoharan@atheros.com
1028P: Vasanthakumar Thiagarajan
1029M: vasanth@atheros.com
1030P: Senthil Balasubramanian
1031M: senthilkumar@atheros.com
1032L: linux-wireless@vger.kernel.org 888L: linux-wireless@vger.kernel.org
1033L: ath9k-devel@lists.ath9k.org 889L: ath9k-devel@lists.ath9k.org
1034S: Supported 890S: Supported
1035F: drivers/net/wireless/ath/ath9k/ 891F: drivers/net/wireless/ath/ath9k/
1036 892
1037ATHEROS AR9170 WIRELESS DRIVER 893ATHEROS AR9170 WIRELESS DRIVER
1038P: Christian Lamparter 894M: Christian Lamparter <chunkeey@web.de>
1039M: chunkeey@web.de
1040L: linux-wireless@vger.kernel.org 895L: linux-wireless@vger.kernel.org
1041W: http://wireless.kernel.org/en/users/Drivers/ar9170 896W: http://wireless.kernel.org/en/users/Drivers/ar9170
1042S: Maintained 897S: Maintained
1043F: drivers/net/wireless/ath/ar9170/ 898F: drivers/net/wireless/ath/ar9170/
1044 899
1045ATI_REMOTE2 DRIVER 900ATI_REMOTE2 DRIVER
1046P: Ville Syrjala 901M: Ville Syrjala <syrjala@sci.fi>
1047M: syrjala@sci.fi
1048S: Maintained 902S: Maintained
1049F: drivers/input/misc/ati_remote2.c 903F: drivers/input/misc/ati_remote2.c
1050 904
1051ATLX ETHERNET DRIVERS 905ATLX ETHERNET DRIVERS
1052P: Jay Cliburn 906M: Jay Cliburn <jcliburn@gmail.com>
1053M: jcliburn@gmail.com 907M: Chris Snook <csnook@redhat.com>
1054P: Chris Snook 908M: Jie Yang <jie.yang@atheros.com>
1055M: csnook@redhat.com
1056P: Jie Yang
1057M: jie.yang@atheros.com
1058L: atl1-devel@lists.sourceforge.net 909L: atl1-devel@lists.sourceforge.net
1059W: http://sourceforge.net/projects/atl1 910W: http://sourceforge.net/projects/atl1
1060W: http://atl1.sourceforge.net 911W: http://atl1.sourceforge.net
@@ -1062,8 +913,7 @@ S: Maintained
1062F: drivers/net/atlx/ 913F: drivers/net/atlx/
1063 914
1064ATM 915ATM
1065P: Chas Williams 916M: Chas Williams <chas@cmf.nrl.navy.mil>
1066M: chas@cmf.nrl.navy.mil
1067L: linux-atm-general@lists.sourceforge.net (subscribers-only) 917L: linux-atm-general@lists.sourceforge.net (subscribers-only)
1068L: netdev@vger.kernel.org 918L: netdev@vger.kernel.org
1069W: http://linux-atm.sourceforge.net 919W: http://linux-atm.sourceforge.net
@@ -1072,8 +922,7 @@ F: drivers/atm/
1072F: include/linux/atm* 922F: include/linux/atm*
1073 923
1074ATMEL AT91 MCI DRIVER 924ATMEL AT91 MCI DRIVER
1075P: Nicolas Ferre 925M: Nicolas Ferre <nicolas.ferre@atmel.com>
1076M: nicolas.ferre@atmel.com
1077L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 926L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
1078W: http://www.atmel.com/products/AT91/ 927W: http://www.atmel.com/products/AT91/
1079W: http://www.at91.com/ 928W: http://www.at91.com/
@@ -1081,49 +930,42 @@ S: Maintained
1081F: drivers/mmc/host/at91_mci.c 930F: drivers/mmc/host/at91_mci.c
1082 931
1083ATMEL AT91 / AT32 MCI DRIVER 932ATMEL AT91 / AT32 MCI DRIVER
1084P: Nicolas Ferre 933M: Nicolas Ferre <nicolas.ferre@atmel.com>
1085M: nicolas.ferre@atmel.com
1086S: Maintained 934S: Maintained
1087F: drivers/mmc/host/atmel-mci.c 935F: drivers/mmc/host/atmel-mci.c
1088F: drivers/mmc/host/atmel-mci-regs.h 936F: drivers/mmc/host/atmel-mci-regs.h
1089 937
1090ATMEL AT91 / AT32 SERIAL DRIVER 938ATMEL AT91 / AT32 SERIAL DRIVER
1091P: Haavard Skinnemoen 939M: Haavard Skinnemoen <hskinnemoen@atmel.com>
1092M: hskinnemoen@atmel.com
1093S: Supported 940S: Supported
1094F: drivers/serial/atmel_serial.c 941F: drivers/serial/atmel_serial.c
1095 942
1096ATMEL LCDFB DRIVER 943ATMEL LCDFB DRIVER
1097P: Nicolas Ferre 944M: Nicolas Ferre <nicolas.ferre@atmel.com>
1098M: nicolas.ferre@atmel.com
1099L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers) 945L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers)
1100S: Maintained 946S: Maintained
1101F: drivers/video/atmel_lcdfb.c 947F: drivers/video/atmel_lcdfb.c
1102F: include/video/atmel_lcdc.h 948F: include/video/atmel_lcdc.h
1103 949
1104ATMEL MACB ETHERNET DRIVER 950ATMEL MACB ETHERNET DRIVER
1105P: Haavard Skinnemoen 951M: Haavard Skinnemoen <hskinnemoen@atmel.com>
1106M: hskinnemoen@atmel.com
1107S: Supported 952S: Supported
1108F: drivers/net/macb.* 953F: drivers/net/macb.*
1109 954
1110ATMEL SPI DRIVER 955ATMEL SPI DRIVER
1111P: Haavard Skinnemoen 956M: Haavard Skinnemoen <hskinnemoen@atmel.com>
1112M: hskinnemoen@atmel.com
1113S: Supported 957S: Supported
1114F: drivers/spi/atmel_spi.* 958F: drivers/spi/atmel_spi.*
1115 959
1116ATMEL USBA UDC DRIVER 960ATMEL USBA UDC DRIVER
1117P: Haavard Skinnemoen 961M: Haavard Skinnemoen <hskinnemoen@atmel.com>
1118M: hskinnemoen@atmel.com
1119L: kernel@avr32linux.org 962L: kernel@avr32linux.org
1120W: http://avr32linux.org/twiki/bin/view/Main/AtmelUsbDeviceDriver 963W: http://avr32linux.org/twiki/bin/view/Main/AtmelUsbDeviceDriver
1121S: Supported 964S: Supported
1122F: drivers/usb/gadget/atmel_usba_udc.* 965F: drivers/usb/gadget/atmel_usba_udc.*
1123 966
1124ATMEL WIRELESS DRIVER 967ATMEL WIRELESS DRIVER
1125P: Simon Kelley 968M: Simon Kelley <simon@thekelleys.org.uk>
1126M: simon@thekelleys.org.uk
1127L: linux-wireless@vger.kernel.org 969L: linux-wireless@vger.kernel.org
1128W: http://www.thekelleys.org.uk/atmel 970W: http://www.thekelleys.org.uk/atmel
1129W: http://atmelwlandriver.sourceforge.net/ 971W: http://atmelwlandriver.sourceforge.net/
@@ -1131,10 +973,8 @@ S: Maintained
1131F: drivers/net/wireless/atmel* 973F: drivers/net/wireless/atmel*
1132 974
1133AUDIT SUBSYSTEM 975AUDIT SUBSYSTEM
1134P: Al Viro 976M: Al Viro <viro@zeniv.linux.org.uk>
1135M: viro@zeniv.linux.org.uk 977M: Eric Paris <eparis@redhat.com>
1136P: Eric Paris
1137M: eparis@redhat.com
1138L: linux-audit@redhat.com (subscribers-only) 978L: linux-audit@redhat.com (subscribers-only)
1139W: http://people.redhat.com/sgrubb/audit/ 979W: http://people.redhat.com/sgrubb/audit/
1140T: git git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current.git 980T: git git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current.git
@@ -1143,8 +983,7 @@ F: include/linux/audit.h
1143F: kernel/audit* 983F: kernel/audit*
1144 984
1145AUXILIARY DISPLAY DRIVERS 985AUXILIARY DISPLAY DRIVERS
1146P: Miguel Ojeda Sandonis 986M: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
1147M: miguel.ojeda.sandonis@gmail.com
1148W: http://miguelojeda.es/auxdisplay.htm 987W: http://miguelojeda.es/auxdisplay.htm
1149W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm 988W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
1150S: Maintained 989S: Maintained
@@ -1152,8 +991,7 @@ F: drivers/auxdisplay/
1152F: include/linux/cfag12864b.h 991F: include/linux/cfag12864b.h
1153 992
1154AVR32 ARCHITECTURE 993AVR32 ARCHITECTURE
1155P: Haavard Skinnemoen 994M: Haavard Skinnemoen <hskinnemoen@atmel.com>
1156M: hskinnemoen@atmel.com
1157W: http://www.atmel.com/products/AVR32/ 995W: http://www.atmel.com/products/AVR32/
1158W: http://avr32linux.org/ 996W: http://avr32linux.org/
1159W: http://avrfreaks.net/ 997W: http://avrfreaks.net/
@@ -1161,14 +999,12 @@ S: Supported
1161F: arch/avr32/ 999F: arch/avr32/
1162 1000
1163AVR32/AT32AP MACHINE SUPPORT 1001AVR32/AT32AP MACHINE SUPPORT
1164P: Haavard Skinnemoen 1002M: Haavard Skinnemoen <hskinnemoen@atmel.com>
1165M: hskinnemoen@atmel.com
1166S: Supported 1003S: Supported
1167F: arch/avr32/mach-at32ap/ 1004F: arch/avr32/mach-at32ap/
1168 1005
1169AX.25 NETWORK LAYER 1006AX.25 NETWORK LAYER
1170P: Ralf Baechle 1007M: Ralf Baechle <ralf@linux-mips.org>
1171M: ralf@linux-mips.org
1172L: linux-hams@vger.kernel.org 1008L: linux-hams@vger.kernel.org
1173W: http://www.linux-ax25.org/ 1009W: http://www.linux-ax25.org/
1174S: Maintained 1010S: Maintained
@@ -1177,128 +1013,110 @@ F: include/net/ax25.h
1177F: net/ax25/ 1013F: net/ax25/
1178 1014
1179B43 WIRELESS DRIVER 1015B43 WIRELESS DRIVER
1180P: Michael Buesch 1016M: Michael Buesch <mb@bu3sch.de>
1181M: mb@bu3sch.de 1017M: Stefano Brivio <stefano.brivio@polimi.it>
1182P: Stefano Brivio
1183M: stefano.brivio@polimi.it
1184L: linux-wireless@vger.kernel.org 1018L: linux-wireless@vger.kernel.org
1185W: http://linuxwireless.org/en/users/Drivers/b43 1019W: http://linuxwireless.org/en/users/Drivers/b43
1186S: Maintained 1020S: Maintained
1187F: drivers/net/wireless/b43/ 1021F: drivers/net/wireless/b43/
1188 1022
1189B43LEGACY WIRELESS DRIVER 1023B43LEGACY WIRELESS DRIVER
1190P: Larry Finger 1024M: Larry Finger <Larry.Finger@lwfinger.net>
1191M: Larry.Finger@lwfinger.net 1025M: Stefano Brivio <stefano.brivio@polimi.it>
1192P: Stefano Brivio
1193M: stefano.brivio@polimi.it
1194L: linux-wireless@vger.kernel.org 1026L: linux-wireless@vger.kernel.org
1195W: http://linuxwireless.org/en/users/Drivers/b43 1027W: http://linuxwireless.org/en/users/Drivers/b43
1196S: Maintained 1028S: Maintained
1197F: drivers/net/wireless/b43legacy/ 1029F: drivers/net/wireless/b43legacy/
1198 1030
1199BACKLIGHT CLASS/SUBSYSTEM 1031BACKLIGHT CLASS/SUBSYSTEM
1200P: Richard Purdie 1032M: Richard Purdie <rpurdie@rpsys.net>
1201M: rpurdie@rpsys.net
1202S: Maintained 1033S: Maintained
1203F: drivers/video/backlight/ 1034F: drivers/video/backlight/
1204F: include/linux/backlight.h 1035F: include/linux/backlight.h
1205 1036
1206BAYCOM/HDLCDRV DRIVERS FOR AX.25 1037BAYCOM/HDLCDRV DRIVERS FOR AX.25
1207P: Thomas Sailer 1038M: Thomas Sailer <t.sailer@alumni.ethz.ch>
1208M: t.sailer@alumni.ethz.ch
1209L: linux-hams@vger.kernel.org 1039L: linux-hams@vger.kernel.org
1210W: http://www.baycom.org/~tom/ham/ham.html 1040W: http://www.baycom.org/~tom/ham/ham.html
1211S: Maintained 1041S: Maintained
1212F: drivers/net/hamradio/baycom* 1042F: drivers/net/hamradio/baycom*
1213 1043
1214BEFS FILE SYSTEM 1044BEFS FILE SYSTEM
1215P: Sergey S. Kostyliov 1045M: "Sergey S. Kostyliov" <rathamahata@php4.ru>
1216M: rathamahata@php4.ru
1217S: Maintained 1046S: Maintained
1218F: Documentation/filesystems/befs.txt 1047F: Documentation/filesystems/befs.txt
1219F: fs/befs/ 1048F: fs/befs/
1220 1049
1221BFS FILE SYSTEM 1050BFS FILE SYSTEM
1222P: Tigran A. Aivazian 1051M: "Tigran A. Aivazian" <tigran@aivazian.fsnet.co.uk>
1223M: tigran@aivazian.fsnet.co.uk
1224S: Maintained 1052S: Maintained
1225F: Documentation/filesystems/bfs.txt 1053F: Documentation/filesystems/bfs.txt
1226F: fs/bfs/ 1054F: fs/bfs/
1227F: include/linux/bfs_fs.h 1055F: include/linux/bfs_fs.h
1228 1056
1229BLACKFIN ARCHITECTURE 1057BLACKFIN ARCHITECTURE
1230P: Mike Frysinger 1058M: Mike Frysinger <vapier@gentoo.org>
1231M: vapier@gentoo.org
1232L: uclinux-dist-devel@blackfin.uclinux.org 1059L: uclinux-dist-devel@blackfin.uclinux.org
1233W: http://blackfin.uclinux.org 1060W: http://blackfin.uclinux.org
1234S: Supported 1061S: Supported
1235F: arch/blackfin/ 1062F: arch/blackfin/
1236 1063
1237BLACKFIN EMAC DRIVER 1064BLACKFIN EMAC DRIVER
1238P: Michael Hennerich 1065M: Michael Hennerich <michael.hennerich@analog.com>
1239M: michael.hennerich@analog.com
1240L: uclinux-dist-devel@blackfin.uclinux.org 1066L: uclinux-dist-devel@blackfin.uclinux.org
1241W: http://blackfin.uclinux.org 1067W: http://blackfin.uclinux.org
1242S: Supported 1068S: Supported
1243F: drivers/net/bfin_mac.* 1069F: drivers/net/bfin_mac.*
1244 1070
1245BLACKFIN RTC DRIVER 1071BLACKFIN RTC DRIVER
1246P: Mike Frysinger 1072M: Mike Frysinger <vapier.adi@gmail.com>
1247M: vapier.adi@gmail.com
1248L: uclinux-dist-devel@blackfin.uclinux.org 1073L: uclinux-dist-devel@blackfin.uclinux.org
1249W: http://blackfin.uclinux.org 1074W: http://blackfin.uclinux.org
1250S: Supported 1075S: Supported
1251F: drivers/rtc/rtc-bfin.c 1076F: drivers/rtc/rtc-bfin.c
1252 1077
1253BLACKFIN SERIAL DRIVER 1078BLACKFIN SERIAL DRIVER
1254P: Sonic Zhang 1079M: Sonic Zhang <sonic.zhang@analog.com>
1255M: sonic.zhang@analog.com
1256L: uclinux-dist-devel@blackfin.uclinux.org 1080L: uclinux-dist-devel@blackfin.uclinux.org
1257W: http://blackfin.uclinux.org 1081W: http://blackfin.uclinux.org
1258S: Supported 1082S: Supported
1259F: drivers/serial/bfin_5xx.c 1083F: drivers/serial/bfin_5xx.c
1260 1084
1261BLACKFIN WATCHDOG DRIVER 1085BLACKFIN WATCHDOG DRIVER
1262P: Mike Frysinger 1086M: Mike Frysinger <vapier.adi@gmail.com>
1263M: vapier.adi@gmail.com
1264L: uclinux-dist-devel@blackfin.uclinux.org 1087L: uclinux-dist-devel@blackfin.uclinux.org
1265W: http://blackfin.uclinux.org 1088W: http://blackfin.uclinux.org
1266S: Supported 1089S: Supported
1267F: drivers/watchdog/bfin_wdt.c 1090F: drivers/watchdog/bfin_wdt.c
1268 1091
1269BLACKFIN I2C TWI DRIVER 1092BLACKFIN I2C TWI DRIVER
1270P: Sonic Zhang 1093M: Sonic Zhang <sonic.zhang@analog.com>
1271M: sonic.zhang@analog.com
1272L: uclinux-dist-devel@blackfin.uclinux.org 1094L: uclinux-dist-devel@blackfin.uclinux.org
1273W: http://blackfin.uclinux.org/ 1095W: http://blackfin.uclinux.org/
1274S: Supported 1096S: Supported
1275F: drivers/i2c/busses/i2c-bfin-twi.c 1097F: drivers/i2c/busses/i2c-bfin-twi.c
1276 1098
1277BLOCK LAYER 1099BLOCK LAYER
1278P: Jens Axboe 1100M: Jens Axboe <axboe@kernel.dk>
1279M: axboe@kernel.dk
1280T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git 1101T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git
1281S: Maintained 1102S: Maintained
1282F: block/ 1103F: block/
1283 1104
1284BLOCK2MTD DRIVER 1105BLOCK2MTD DRIVER
1285P: Joern Engel 1106M: Joern Engel <joern@lazybastard.org>
1286M: joern@lazybastard.org
1287L: linux-mtd@lists.infradead.org 1107L: linux-mtd@lists.infradead.org
1288S: Maintained 1108S: Maintained
1289F: drivers/mtd/devices/block2mtd.c 1109F: drivers/mtd/devices/block2mtd.c
1290 1110
1291BLUETOOTH DRIVERS 1111BLUETOOTH DRIVERS
1292P: Marcel Holtmann 1112M: Marcel Holtmann <marcel@holtmann.org>
1293M: marcel@holtmann.org
1294L: linux-bluetooth@vger.kernel.org 1113L: linux-bluetooth@vger.kernel.org
1295W: http://www.bluez.org/ 1114W: http://www.bluez.org/
1296S: Maintained 1115S: Maintained
1297F: drivers/bluetooth/ 1116F: drivers/bluetooth/
1298 1117
1299BLUETOOTH SUBSYSTEM 1118BLUETOOTH SUBSYSTEM
1300P: Marcel Holtmann 1119M: Marcel Holtmann <marcel@holtmann.org>
1301M: marcel@holtmann.org
1302L: linux-bluetooth@vger.kernel.org 1120L: linux-bluetooth@vger.kernel.org
1303W: http://www.bluez.org/ 1121W: http://www.bluez.org/
1304T: git git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6.git 1122T: git git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6.git
@@ -1307,8 +1125,7 @@ F: net/bluetooth/
1307F: include/net/bluetooth/ 1125F: include/net/bluetooth/
1308 1126
1309BONDING DRIVER 1127BONDING DRIVER
1310P: Jay Vosburgh 1128M: Jay Vosburgh <fubar@us.ibm.com>
1311M: fubar@us.ibm.com
1312L: bonding-devel@lists.sourceforge.net 1129L: bonding-devel@lists.sourceforge.net
1313W: http://sourceforge.net/projects/bonding/ 1130W: http://sourceforge.net/projects/bonding/
1314S: Supported 1131S: Supported
@@ -1316,54 +1133,46 @@ F: drivers/net/bonding/
1316F: include/linux/if_bonding.h 1133F: include/linux/if_bonding.h
1317 1134
1318BROADCOM B44 10/100 ETHERNET DRIVER 1135BROADCOM B44 10/100 ETHERNET DRIVER
1319P: Gary Zambrano 1136M: Gary Zambrano <zambrano@broadcom.com>
1320M: zambrano@broadcom.com
1321L: netdev@vger.kernel.org 1137L: netdev@vger.kernel.org
1322S: Supported 1138S: Supported
1323F: drivers/net/b44.* 1139F: drivers/net/b44.*
1324 1140
1325BROADCOM BNX2 GIGABIT ETHERNET DRIVER 1141BROADCOM BNX2 GIGABIT ETHERNET DRIVER
1326P: Michael Chan 1142M: Michael Chan <mchan@broadcom.com>
1327M: mchan@broadcom.com
1328L: netdev@vger.kernel.org 1143L: netdev@vger.kernel.org
1329S: Supported 1144S: Supported
1330F: drivers/net/bnx2.* 1145F: drivers/net/bnx2.*
1331F: drivers/net/bnx2_* 1146F: drivers/net/bnx2_*
1332 1147
1333BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER 1148BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER
1334P: Eilon Greenstein 1149M: Eilon Greenstein <eilong@broadcom.com>
1335M: eilong@broadcom.com
1336L: netdev@vger.kernel.org 1150L: netdev@vger.kernel.org
1337S: Supported 1151S: Supported
1338F: drivers/net/bnx2x* 1152F: drivers/net/bnx2x*
1339 1153
1340BROADCOM TG3 GIGABIT ETHERNET DRIVER 1154BROADCOM TG3 GIGABIT ETHERNET DRIVER
1341P: Matt Carlson 1155M: Matt Carlson <mcarlson@broadcom.com>
1342M: mcarlson@broadcom.com 1156M: Michael Chan <mchan@broadcom.com>
1343P: Michael Chan
1344M: mchan@broadcom.com
1345L: netdev@vger.kernel.org 1157L: netdev@vger.kernel.org
1346S: Supported 1158S: Supported
1347F: drivers/net/tg3.* 1159F: drivers/net/tg3.*
1348 1160
1349BSG (block layer generic sg v4 driver) 1161BSG (block layer generic sg v4 driver)
1350P: FUJITA Tomonori 1162M: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
1351M: fujita.tomonori@lab.ntt.co.jp
1352L: linux-scsi@vger.kernel.org 1163L: linux-scsi@vger.kernel.org
1353S: Supported 1164S: Supported
1354F: block/bsg.c 1165F: block/bsg.c
1355F: include/linux/bsg.h 1166F: include/linux/bsg.h
1356 1167
1357BT8XXGPIO DRIVER 1168BT8XXGPIO DRIVER
1358P: Michael Buesch 1169M: Michael Buesch <mb@bu3sch.de>
1359M: mb@bu3sch.de
1360W: http://bu3sch.de/btgpio.php 1170W: http://bu3sch.de/btgpio.php
1361S: Maintained 1171S: Maintained
1362F: drivers/gpio/bt8xxgpio.c 1172F: drivers/gpio/bt8xxgpio.c
1363 1173
1364BTRFS FILE SYSTEM 1174BTRFS FILE SYSTEM
1365P: Chris Mason 1175M: Chris Mason <chris.mason@oracle.com>
1366M: chris.mason@oracle.com
1367L: linux-btrfs@vger.kernel.org 1176L: linux-btrfs@vger.kernel.org
1368W: http://btrfs.wiki.kernel.org/ 1177W: http://btrfs.wiki.kernel.org/
1369T: git git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git 1178T: git git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git
@@ -1372,8 +1181,7 @@ F: Documentation/filesystems/btrfs.txt
1372F: fs/btrfs/ 1181F: fs/btrfs/
1373 1182
1374BTTV VIDEO4LINUX DRIVER 1183BTTV VIDEO4LINUX DRIVER
1375P: Mauro Carvalho Chehab 1184M: Mauro Carvalho Chehab <mchehab@infradead.org>
1376M: mchehab@infradead.org
1377L: linux-media@vger.kernel.org 1185L: linux-media@vger.kernel.org
1378W: http://linuxtv.org 1186W: http://linuxtv.org
1379T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 1187T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
@@ -1382,16 +1190,14 @@ F: Documentation/video4linux/bttv/
1382F: drivers/media/video/bt8xx/bttv* 1190F: drivers/media/video/bt8xx/bttv*
1383 1191
1384CACHEFILES: FS-CACHE BACKEND FOR CACHING ON MOUNTED FILESYSTEMS 1192CACHEFILES: FS-CACHE BACKEND FOR CACHING ON MOUNTED FILESYSTEMS
1385P: David Howells 1193M: David Howells <dhowells@redhat.com>
1386M: dhowells@redhat.com
1387L: linux-cachefs@redhat.com 1194L: linux-cachefs@redhat.com
1388S: Supported 1195S: Supported
1389F: Documentation/filesystems/caching/cachefiles.txt 1196F: Documentation/filesystems/caching/cachefiles.txt
1390F: fs/cachefiles/ 1197F: fs/cachefiles/
1391 1198
1392CAFE CMOS INTEGRATED CAMERA CONTROLLER DRIVER 1199CAFE CMOS INTEGRATED CAMERA CONTROLLER DRIVER
1393P: Jonathan Corbet 1200M: Jonathan Corbet <corbet@lwn.net>
1394M: corbet@lwn.net
1395L: linux-media@vger.kernel.org 1201L: linux-media@vger.kernel.org
1396T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 1202T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
1397S: Maintained 1203S: Maintained
@@ -1399,10 +1205,8 @@ F: Documentation/video4linux/cafe_ccic
1399F: drivers/media/video/cafe_ccic* 1205F: drivers/media/video/cafe_ccic*
1400 1206
1401CALGARY x86-64 IOMMU 1207CALGARY x86-64 IOMMU
1402P: Muli Ben-Yehuda 1208M: Muli Ben-Yehuda <muli@il.ibm.com>
1403M: muli@il.ibm.com 1209M: "Jon D. Mason" <jdmason@kudzu.us>
1404P: Jon D. Mason
1405M: jdmason@kudzu.us
1406L: discuss@x86-64.org 1210L: discuss@x86-64.org
1407S: Maintained 1211S: Maintained
1408F: arch/x86/kernel/pci-calgary_64.c 1212F: arch/x86/kernel/pci-calgary_64.c
@@ -1411,10 +1215,8 @@ F: arch/x86/include/asm/calgary.h
1411F: arch/x86/include/asm/tce.h 1215F: arch/x86/include/asm/tce.h
1412 1216
1413CAN NETWORK LAYER 1217CAN NETWORK LAYER
1414P: Urs Thuermann 1218M: Urs Thuermann <urs.thuermann@volkswagen.de>
1415M: urs.thuermann@volkswagen.de 1219M: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
1416P: Oliver Hartkopp
1417M: oliver.hartkopp@volkswagen.de
1418L: socketcan-core@lists.berlios.de (subscribers-only) 1220L: socketcan-core@lists.berlios.de (subscribers-only)
1419W: http://developer.berlios.de/projects/socketcan/ 1221W: http://developer.berlios.de/projects/socketcan/
1420S: Maintained 1222S: Maintained
@@ -1423,15 +1225,13 @@ F: include/linux/can/
1423F: include/linux/can.h 1225F: include/linux/can.h
1424 1226
1425CAN NETWORK DRIVERS 1227CAN NETWORK DRIVERS
1426P: Wolfgang Grandegger 1228M: Wolfgang Grandegger <wg@grandegger.com>
1427M: wg@grandegger.com
1428L: socketcan-core@lists.berlios.de (subscribers-only) 1229L: socketcan-core@lists.berlios.de (subscribers-only)
1429W: http://developer.berlios.de/projects/socketcan/ 1230W: http://developer.berlios.de/projects/socketcan/
1430S: Maintained 1231S: Maintained
1431 1232
1432CELL BROADBAND ENGINE ARCHITECTURE 1233CELL BROADBAND ENGINE ARCHITECTURE
1433P: Arnd Bergmann 1234M: Arnd Bergmann <arnd@arndb.de>
1434M: arnd@arndb.de
1435L: linuxppc-dev@ozlabs.org 1235L: linuxppc-dev@ozlabs.org
1436L: cbe-oss-dev@ozlabs.org 1236L: cbe-oss-dev@ozlabs.org
1437W: http://www.ibm.com/developerworks/power/cell/ 1237W: http://www.ibm.com/developerworks/power/cell/
@@ -1442,8 +1242,7 @@ F: arch/powerpc/oprofile/*cell*
1442F: arch/powerpc/platforms/cell/ 1242F: arch/powerpc/platforms/cell/
1443 1243
1444CERTIFIED WIRELESS USB (WUSB) SUBSYSTEM: 1244CERTIFIED WIRELESS USB (WUSB) SUBSYSTEM:
1445P: David Vrabel 1245M: David Vrabel <david.vrabel@csr.com>
1446M: david.vrabel@csr.com
1447L: linux-usb@vger.kernel.org 1246L: linux-usb@vger.kernel.org
1448S: Supported 1247S: Supported
1449F: Documentation/usb/WUSB-Design-overview.txt 1248F: Documentation/usb/WUSB-Design-overview.txt
@@ -1452,8 +1251,7 @@ F: drivers/usb/wusbcore/
1452F: include/linux/usb/wusb* 1251F: include/linux/usb/wusb*
1453 1252
1454CFAG12864B LCD DRIVER 1253CFAG12864B LCD DRIVER
1455P: Miguel Ojeda Sandonis 1254M: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
1456M: miguel.ojeda.sandonis@gmail.com
1457W: http://miguelojeda.es/auxdisplay.htm 1255W: http://miguelojeda.es/auxdisplay.htm
1458W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm 1256W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
1459S: Maintained 1257S: Maintained
@@ -1461,8 +1259,7 @@ F: drivers/auxdisplay/cfag12864b.c
1461F: include/linux/cfag12864b.h 1259F: include/linux/cfag12864b.h
1462 1260
1463CFAG12864BFB LCD FRAMEBUFFER DRIVER 1261CFAG12864BFB LCD FRAMEBUFFER DRIVER
1464P: Miguel Ojeda Sandonis 1262M: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
1465M: miguel.ojeda.sandonis@gmail.com
1466W: http://miguelojeda.es/auxdisplay.htm 1263W: http://miguelojeda.es/auxdisplay.htm
1467W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm 1264W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
1468S: Maintained 1265S: Maintained
@@ -1470,8 +1267,7 @@ F: drivers/auxdisplay/cfag12864bfb.c
1470F: include/linux/cfag12864b.h 1267F: include/linux/cfag12864b.h
1471 1268
1472CFG80211 and NL80211 1269CFG80211 and NL80211
1473P: Johannes Berg 1270M: Johannes Berg <johannes@sipsolutions.net>
1474M: johannes@sipsolutions.net
1475L: linux-wireless@vger.kernel.org 1271L: linux-wireless@vger.kernel.org
1476S: Maintained 1272S: Maintained
1477F: include/linux/nl80211.h 1273F: include/linux/nl80211.h
@@ -1480,66 +1276,47 @@ F: net/wireless/*
1480X: net/wireless/wext* 1276X: net/wireless/wext*
1481 1277
1482CHECKPATCH 1278CHECKPATCH
1483P: Andy Whitcroft 1279M: Andy Whitcroft <apw@canonical.com>
1484M: apw@canonical.com
1485S: Supported 1280S: Supported
1486F: scripts/checkpatch.pl 1281F: scripts/checkpatch.pl
1487 1282
1488CISCO 10G ETHERNET DRIVER 1283CISCO 10G ETHERNET DRIVER
1489P: Scott Feldman 1284M: Scott Feldman <scofeldm@cisco.com>
1490M: scofeldm@cisco.com 1285M: Joe Eykholt <jeykholt@cisco.com>
1491P: Joe Eykholt
1492M: jeykholt@cisco.com
1493S: Supported 1286S: Supported
1494F: drivers/net/enic/ 1287F: drivers/net/enic/
1495 1288
1496CIRRUS LOGIC EP93XX ETHERNET DRIVER 1289CIRRUS LOGIC EP93XX ETHERNET DRIVER
1497P: Lennert Buytenhek 1290M: Lennert Buytenhek <kernel@wantstofly.org>
1498M: kernel@wantstofly.org
1499L: netdev@vger.kernel.org 1291L: netdev@vger.kernel.org
1500S: Maintained 1292S: Maintained
1501F: drivers/net/arm/ep93xx_eth.c 1293F: drivers/net/arm/ep93xx_eth.c
1502 1294
1503CIRRUS LOGIC EP93XX OHCI USB HOST DRIVER 1295CIRRUS LOGIC EP93XX OHCI USB HOST DRIVER
1504P: Lennert Buytenhek 1296M: Lennert Buytenhek <kernel@wantstofly.org>
1505M: kernel@wantstofly.org
1506L: linux-usb@vger.kernel.org 1297L: linux-usb@vger.kernel.org
1507S: Maintained 1298S: Maintained
1508F: drivers/usb/host/ohci-ep93xx.c 1299F: drivers/usb/host/ohci-ep93xx.c
1509 1300
1510CIRRUS LOGIC CS4270 SOUND DRIVER 1301CIRRUS LOGIC CS4270 SOUND DRIVER
1511P: Timur Tabi 1302M: Timur Tabi <timur@freescale.com>
1512M: timur@freescale.com
1513L: alsa-devel@alsa-project.org (moderated for non-subscribers) 1303L: alsa-devel@alsa-project.org (moderated for non-subscribers)
1514S: Supported 1304S: Supported
1515F: sound/soc/codecs/cs4270* 1305F: sound/soc/codecs/cs4270*
1516 1306
1517CIRRUS LOGIC CS4280/CS461x SOUNDDRIVER
1518P: Cirrus Logic Corporation (kernel 2.2 driver)
1519M: Cirrus Logic Corporation, Thomas Woller <twoller@crystal.cirrus.com>
1520P: Nils Faerber (port to kernel 2.4)
1521M: Nils Faerber <nils@kernelconcepts.de>
1522S: Maintained
1523F: Documentation/input/cs461x.txt
1524F: sound/pci/cs46xx/
1525
1526CLK API 1307CLK API
1527P: Russell King 1308M: Russell King <linux@arm.linux.org.uk>
1528M: linux@arm.linux.org.uk
1529F: include/linux/clk.h 1309F: include/linux/clk.h
1530 1310
1531CISCO FCOE HBA DRIVER 1311CISCO FCOE HBA DRIVER
1532P: Abhijeet Joglekar 1312M: Abhijeet Joglekar <abjoglek@cisco.com>
1533M: abjoglek@cisco.com 1313M: Joe Eykholt <jeykholt@cisco.com>
1534P: Joe Eykholt
1535M: jeykholt@cisco.com
1536L: linux-scsi@vger.kernel.org 1314L: linux-scsi@vger.kernel.org
1537S: Supported 1315S: Supported
1538F: drivers/scsi/fnic/ 1316F: drivers/scsi/fnic/
1539 1317
1540CODA FILE SYSTEM 1318CODA FILE SYSTEM
1541P: Jan Harkes 1319M: Jan Harkes <jaharkes@cs.cmu.edu>
1542M: jaharkes@cs.cmu.edu
1543M: coda@cs.cmu.edu 1320M: coda@cs.cmu.edu
1544L: codalist@coda.cs.cmu.edu 1321L: codalist@coda.cs.cmu.edu
1545W: http://www.coda.cs.cmu.edu/ 1322W: http://www.coda.cs.cmu.edu/
@@ -1549,8 +1326,7 @@ F: fs/coda/
1549F: include/linux/coda*.h 1326F: include/linux/coda*.h
1550 1327
1551COMMON INTERNET FILE SYSTEM (CIFS) 1328COMMON INTERNET FILE SYSTEM (CIFS)
1552P: Steve French 1329M: Steve French <sfrench@samba.org>
1553M: sfrench@samba.org
1554L: linux-cifs-client@lists.samba.org 1330L: linux-cifs-client@lists.samba.org
1555L: samba-technical@lists.samba.org 1331L: samba-technical@lists.samba.org
1556W: http://linux-cifs.samba.org/ 1332W: http://linux-cifs.samba.org/
@@ -1560,63 +1336,57 @@ F: Documentation/filesystems/cifs.txt
1560F: fs/cifs/ 1336F: fs/cifs/
1561 1337
1562COMPACTPCI HOTPLUG CORE 1338COMPACTPCI HOTPLUG CORE
1563P: Scott Murray 1339M: Scott Murray <scott@spiteful.org>
1564M: scottm@somanetworks.com
1565M: scott@spiteful.org
1566L: linux-pci@vger.kernel.org 1340L: linux-pci@vger.kernel.org
1567S: Supported 1341S: Maintained
1568F: drivers/pci/hotplug/cpci_hotplug* 1342F: drivers/pci/hotplug/cpci_hotplug*
1569 1343
1570COMPACTPCI HOTPLUG ZIATECH ZT5550 DRIVER 1344COMPACTPCI HOTPLUG ZIATECH ZT5550 DRIVER
1571P: Scott Murray 1345M: Scott Murray <scott@spiteful.org>
1572M: scottm@somanetworks.com
1573M: scott@spiteful.org
1574L: linux-pci@vger.kernel.org 1346L: linux-pci@vger.kernel.org
1575S: Supported 1347S: Maintained
1576F: drivers/pci/hotplug/cpcihp_zt5550.* 1348F: drivers/pci/hotplug/cpcihp_zt5550.*
1577 1349
1578COMPACTPCI HOTPLUG GENERIC DRIVER 1350COMPACTPCI HOTPLUG GENERIC DRIVER
1579P: Scott Murray 1351M: Scott Murray <scott@spiteful.org>
1580M: scottm@somanetworks.com
1581M: scott@spiteful.org
1582L: linux-pci@vger.kernel.org 1352L: linux-pci@vger.kernel.org
1583S: Supported 1353S: Maintained
1584F: drivers/pci/hotplug/cpcihp_generic.c 1354F: drivers/pci/hotplug/cpcihp_generic.c
1585 1355
1586COMPAL LAPTOP SUPPORT 1356COMPAL LAPTOP SUPPORT
1587P: Cezary Jackiewicz 1357M: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
1588M: cezary.jackiewicz@gmail.com
1589S: Maintained 1358S: Maintained
1590F: drivers/platform/x86/compal-laptop.c 1359F: drivers/platform/x86/compal-laptop.c
1591 1360
1592COMPUTONE INTELLIPORT MULTIPORT CARD 1361COMPUTONE INTELLIPORT MULTIPORT CARD
1593P: Michael H. Warfield 1362M: "Michael H. Warfield" <mhw@wittsend.com>
1594M: mhw@wittsend.com
1595W: http://www.wittsend.com/computone.html 1363W: http://www.wittsend.com/computone.html
1596S: Maintained 1364S: Maintained
1597F: Documentation/serial/computone.txt 1365F: Documentation/serial/computone.txt
1598F: drivers/char/ip2/ 1366F: drivers/char/ip2/
1599 1367
1600CONEXANT ACCESSRUNNER USB DRIVER 1368CONEXANT ACCESSRUNNER USB DRIVER
1601P: Simon Arlott 1369M: Simon Arlott <cxacru@fire.lp0.eu>
1602M: cxacru@fire.lp0.eu
1603L: accessrunner-general@lists.sourceforge.net 1370L: accessrunner-general@lists.sourceforge.net
1604W: http://accessrunner.sourceforge.net/ 1371W: http://accessrunner.sourceforge.net/
1605S: Maintained 1372S: Maintained
1606F: drivers/usb/atm/cxacru.c 1373F: drivers/usb/atm/cxacru.c
1607 1374
1608CONFIGFS 1375CONFIGFS
1609P: Joel Becker 1376M: Joel Becker <joel.becker@oracle.com>
1610M: joel.becker@oracle.com
1611S: Supported 1377S: Supported
1612F: fs/configfs/ 1378F: fs/configfs/
1613F: include/linux/configfs.h 1379F: include/linux/configfs.h
1614 1380
1381CONNECTOR
1382M: Evgeniy Polyakov <zbr@ioremap.net>
1383L: netdev@vger.kernel.org
1384S: Maintained
1385F: drivers/connector/
1386
1615CONTROL GROUPS (CGROUPS) 1387CONTROL GROUPS (CGROUPS)
1616P: Paul Menage 1388M: Paul Menage <menage@google.com>
1617M: menage@google.com 1389M: Li Zefan <lizf@cn.fujitsu.com>
1618P: Li Zefan
1619M: lizf@cn.fujitsu.com
1620L: containers@lists.linux-foundation.org 1390L: containers@lists.linux-foundation.org
1621S: Maintained 1391S: Maintained
1622F: include/linux/cgroup* 1392F: include/linux/cgroup*
@@ -1624,30 +1394,26 @@ F: kernel/cgroup*
1624F: mm/*cgroup* 1394F: mm/*cgroup*
1625 1395
1626CORETEMP HARDWARE MONITORING DRIVER 1396CORETEMP HARDWARE MONITORING DRIVER
1627P: Rudolf Marek 1397M: Rudolf Marek <r.marek@assembler.cz>
1628M: r.marek@assembler.cz
1629L: lm-sensors@lm-sensors.org 1398L: lm-sensors@lm-sensors.org
1630S: Maintained 1399S: Maintained
1631F: Documentation/hwmon/coretemp 1400F: Documentation/hwmon/coretemp
1632F: drivers/hwmon/coretemp.c 1401F: drivers/hwmon/coretemp.c
1633 1402
1634COSA/SRP SYNC SERIAL DRIVER 1403COSA/SRP SYNC SERIAL DRIVER
1635P: Jan "Yenya" Kasprzak 1404M: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
1636M: kas@fi.muni.cz
1637W: http://www.fi.muni.cz/~kas/cosa/ 1405W: http://www.fi.muni.cz/~kas/cosa/
1638S: Maintained 1406S: Maintained
1639F: drivers/net/wan/cosa* 1407F: drivers/net/wan/cosa*
1640 1408
1641CPMAC ETHERNET DRIVER 1409CPMAC ETHERNET DRIVER
1642P: Florian Fainelli 1410M: Florian Fainelli <florian@openwrt.org>
1643M: florian@openwrt.org
1644L: netdev@vger.kernel.org 1411L: netdev@vger.kernel.org
1645S: Maintained 1412S: Maintained
1646F: drivers/net/cpmac.c 1413F: drivers/net/cpmac.c
1647 1414
1648CPU FREQUENCY DRIVERS 1415CPU FREQUENCY DRIVERS
1649P: Dave Jones 1416M: Dave Jones <davej@redhat.com>
1650M: davej@redhat.com
1651L: cpufreq@vger.kernel.org 1417L: cpufreq@vger.kernel.org
1652W: http://www.codemonkey.org.uk/projects/cpufreq/ 1418W: http://www.codemonkey.org.uk/projects/cpufreq/
1653T: git git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq.git 1419T: git git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq.git
@@ -1657,15 +1423,13 @@ F: drivers/cpufreq/
1657F: include/linux/cpufreq.h 1423F: include/linux/cpufreq.h
1658 1424
1659CPUID/MSR DRIVER 1425CPUID/MSR DRIVER
1660P: H. Peter Anvin 1426M: "H. Peter Anvin" <hpa@zytor.com>
1661M: hpa@zytor.com
1662S: Maintained 1427S: Maintained
1663F: arch/x86/kernel/cpuid.c 1428F: arch/x86/kernel/cpuid.c
1664F: arch/x86/kernel/msr.c 1429F: arch/x86/kernel/msr.c
1665 1430
1666CPUSETS 1431CPUSETS
1667P: Paul Menage 1432M: Paul Menage <menage@google.com>
1668M: menage@google.com
1669W: http://www.bullopensource.org/cpuset/ 1433W: http://www.bullopensource.org/cpuset/
1670W: http://oss.sgi.com/projects/cpusets/ 1434W: http://oss.sgi.com/projects/cpusets/
1671S: Supported 1435S: Supported
@@ -1680,20 +1444,16 @@ F: Documentation/filesystems/cramfs.txt
1680F: fs/cramfs/ 1444F: fs/cramfs/
1681 1445
1682CRIS PORT 1446CRIS PORT
1683P: Mikael Starvik 1447M: Mikael Starvik <starvik@axis.com>
1684M: starvik@axis.com 1448M: Jesper Nilsson <jesper.nilsson@axis.com>
1685P: Jesper Nilsson
1686M: jesper.nilsson@axis.com
1687L: linux-cris-kernel@axis.com 1449L: linux-cris-kernel@axis.com
1688W: http://developer.axis.com 1450W: http://developer.axis.com
1689S: Maintained 1451S: Maintained
1690F: arch/cris/ 1452F: arch/cris/
1691 1453
1692CRYPTO API 1454CRYPTO API
1693P: Herbert Xu 1455M: Herbert Xu <herbert@gondor.apana.org.au>
1694M: herbert@gondor.apana.org.au 1456M: "David S. Miller" <davem@davemloft.net>
1695P: David S. Miller
1696M: davem@davemloft.net
1697L: linux-crypto@vger.kernel.org 1457L: linux-crypto@vger.kernel.org
1698T: git git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git 1458T: git git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git
1699S: Maintained 1459S: Maintained
@@ -1704,58 +1464,50 @@ F: drivers/crypto/
1704F: include/crypto/ 1464F: include/crypto/
1705 1465
1706CRYPTOGRAPHIC RANDOM NUMBER GENERATOR 1466CRYPTOGRAPHIC RANDOM NUMBER GENERATOR
1707P: Neil Horman 1467M: Neil Horman <nhorman@tuxdriver.com>
1708M: nhorman@tuxdriver.com
1709L: linux-crypto@vger.kernel.org 1468L: linux-crypto@vger.kernel.org
1710S: Maintained 1469S: Maintained
1711 1470
1712CS5535 Audio ALSA driver 1471CS5535 Audio ALSA driver
1713P: Jaya Kumar 1472M: Jaya Kumar <jayakumar.alsa@gmail.com>
1714M: jayakumar.alsa@gmail.com
1715S: Maintained 1473S: Maintained
1716F: sound/pci/cs5535audio/ 1474F: sound/pci/cs5535audio/
1717 1475
1718CX18 VIDEO4LINUX DRIVER 1476CX18 VIDEO4LINUX DRIVER
1719P: Hans Verkuil 1477M: Hans Verkuil <hverkuil@xs4all.nl>
1720M: hverkuil@xs4all.nl 1478M: Andy Walls <awalls@radix.net>
1721P: Andy Walls
1722M: awalls@radix.net
1723L: ivtv-devel@ivtvdriver.org 1479L: ivtv-devel@ivtvdriver.org
1724L: ivtv-users@ivtvdriver.org
1725L: linux-media@vger.kernel.org 1480L: linux-media@vger.kernel.org
1726T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 1481T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
1727W: http://linuxtv.org 1482W: http://linuxtv.org
1483W: http://www.ivtvdriver.org/index.php/Cx18
1728S: Maintained 1484S: Maintained
1729F: Documentation/video4linux/cx18.txt 1485F: Documentation/video4linux/cx18.txt
1730F: drivers/media/video/cx18/ 1486F: drivers/media/video/cx18/
1731 1487
1732CXGB3 ETHERNET DRIVER (CXGB3) 1488CXGB3 ETHERNET DRIVER (CXGB3)
1733P: Divy Le Ray 1489M: Divy Le Ray <divy@chelsio.com>
1734M: divy@chelsio.com
1735L: netdev@vger.kernel.org 1490L: netdev@vger.kernel.org
1736W: http://www.chelsio.com 1491W: http://www.chelsio.com
1737S: Supported 1492S: Supported
1738F: drivers/net/cxgb3/ 1493F: drivers/net/cxgb3/
1739 1494
1740CXGB3 IWARP RNIC DRIVER (IW_CXGB3) 1495CXGB3 IWARP RNIC DRIVER (IW_CXGB3)
1741P: Steve Wise 1496M: Steve Wise <swise@chelsio.com>
1742M: swise@chelsio.com
1743L: general@lists.openfabrics.org 1497L: general@lists.openfabrics.org
1744W: http://www.openfabrics.org 1498W: http://www.openfabrics.org
1745S: Supported 1499S: Supported
1746F: drivers/infiniband/hw/cxgb3/ 1500F: drivers/infiniband/hw/cxgb3/
1747 1501
1748CYBERPRO FB DRIVER 1502CYBERPRO FB DRIVER
1749P: Russell King 1503M: Russell King <linux@arm.linux.org.uk>
1750M: linux@arm.linux.org.uk
1751L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 1504L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
1752W: http://www.arm.linux.org.uk/ 1505W: http://www.arm.linux.org.uk/
1753S: Maintained 1506S: Maintained
1754F: drivers/video/cyber2000fb.* 1507F: drivers/video/cyber2000fb.*
1755 1508
1756CYCLADES 2X SYNC CARD DRIVER 1509CYCLADES 2X SYNC CARD DRIVER
1757P: Arnaldo Carvalho de Melo 1510M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
1758M: acme@ghostprotocols.net
1759W: http://oops.ghostprotocols.net:81/blog 1511W: http://oops.ghostprotocols.net:81/blog
1760S: Maintained 1512S: Maintained
1761F: drivers/net/wan/cycx* 1513F: drivers/net/wan/cycx*
@@ -1772,8 +1524,7 @@ S: Orphan
1772F: drivers/net/wan/pc300* 1524F: drivers/net/wan/pc300*
1773 1525
1774DAMA SLAVE for AX.25 1526DAMA SLAVE for AX.25
1775P: Joerg Reuter 1527M: Joerg Reuter <jreuter@yaina.de>
1776M: jreuter@yaina.de
1777W: http://yaina.de/jreuter/ 1528W: http://yaina.de/jreuter/
1778W: http://www.qsl.net/dl1bke/ 1529W: http://www.qsl.net/dl1bke/
1779L: linux-hams@vger.kernel.org 1530L: linux-hams@vger.kernel.org
@@ -1787,29 +1538,23 @@ F: net/ax25/ax25_timer.c
1787F: net/ax25/sysctl_net_ax25.c 1538F: net/ax25/sysctl_net_ax25.c
1788 1539
1789DAVICOM FAST ETHERNET (DMFE) NETWORK DRIVER 1540DAVICOM FAST ETHERNET (DMFE) NETWORK DRIVER
1790P: Tobias Ringstrom 1541M: Tobias Ringstrom <tori@unhappy.mine.nu>
1791M: tori@unhappy.mine.nu
1792L: netdev@vger.kernel.org 1542L: netdev@vger.kernel.org
1793S: Maintained 1543S: Maintained
1794F: Documentation/networking/dmfe.txt 1544F: Documentation/networking/dmfe.txt
1795F: drivers/net/tulip/dmfe.c 1545F: drivers/net/tulip/dmfe.c
1796 1546
1797DC390/AM53C974 SCSI driver 1547DC390/AM53C974 SCSI driver
1798P: Kurt Garloff 1548M: Kurt Garloff <garloff@suse.de>
1799M: garloff@suse.de
1800W: http://www.garloff.de/kurt/linux/dc390/ 1549W: http://www.garloff.de/kurt/linux/dc390/
1801P: Guennadi Liakhovetski 1550M: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
1802M: g.liakhovetski@gmx.de
1803S: Maintained 1551S: Maintained
1804F: drivers/scsi/tmscsim.* 1552F: drivers/scsi/tmscsim.*
1805 1553
1806DC395x SCSI driver 1554DC395x SCSI driver
1807P: Oliver Neukum 1555M: Oliver Neukum <oliver@neukum.name>
1808M: oliver@neukum.name 1556M: Ali Akcaagac <aliakc@web.de>
1809P: Ali Akcaagac 1557M: Jamie Lenehan <lenehan@twibble.org>
1810M: aliakc@web.de
1811P: Jamie Lenehan
1812M: lenehan@twibble.org
1813W: http://twibble.org/dist/dc395x/ 1558W: http://twibble.org/dist/dc395x/
1814L: dc395x@twibble.org 1559L: dc395x@twibble.org
1815L: http://lists.twibble.org/mailman/listinfo/dc395x/ 1560L: http://lists.twibble.org/mailman/listinfo/dc395x/
@@ -1818,8 +1563,7 @@ F: Documentation/scsi/dc395x.txt
1818F: drivers/scsi/dc395x.* 1563F: drivers/scsi/dc395x.*
1819 1564
1820DCCP PROTOCOL 1565DCCP PROTOCOL
1821P: Arnaldo Carvalho de Melo 1566M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
1822M: acme@ghostprotocols.net
1823L: dccp@vger.kernel.org 1567L: dccp@vger.kernel.org
1824W: http://linux-net.osdl.org/index.php/DCCP 1568W: http://linux-net.osdl.org/index.php/DCCP
1825S: Maintained 1569S: Maintained
@@ -1828,8 +1572,7 @@ F: include/linux/tfrc.h
1828F: net/dccp/ 1572F: net/dccp/
1829 1573
1830DECnet NETWORK LAYER 1574DECnet NETWORK LAYER
1831P: Christine Caulfield 1575M: Christine Caulfield <christine.caulfield@googlemail.com>
1832M: christine.caulfield@googlemail.com
1833W: http://linux-decnet.sourceforge.net 1576W: http://linux-decnet.sourceforge.net
1834L: linux-decnet-user@lists.sourceforge.net 1577L: linux-decnet-user@lists.sourceforge.net
1835S: Maintained 1578S: Maintained
@@ -1837,40 +1580,34 @@ F: Documentation/networking/decnet.txt
1837F: net/decnet/ 1580F: net/decnet/
1838 1581
1839DEFXX FDDI NETWORK DRIVER 1582DEFXX FDDI NETWORK DRIVER
1840P: Maciej W. Rozycki 1583M: "Maciej W. Rozycki" <macro@linux-mips.org>
1841M: macro@linux-mips.org
1842S: Maintained 1584S: Maintained
1843F: drivers/net/defxx.* 1585F: drivers/net/defxx.*
1844 1586
1845DELL LAPTOP DRIVER 1587DELL LAPTOP DRIVER
1846P: Matthew Garrett 1588M: Matthew Garrett <mjg59@srcf.ucam.org>
1847M: mjg59@srcf.ucam.org
1848S: Maintained 1589S: Maintained
1849F: drivers/platform/x86/dell-laptop.c 1590F: drivers/platform/x86/dell-laptop.c
1850 1591
1851DELL LAPTOP SMM DRIVER 1592DELL LAPTOP SMM DRIVER
1852P: Massimo Dal Zotto 1593M: Massimo Dal Zotto <dz@debian.org>
1853M: dz@debian.org
1854W: http://www.debian.org/~dz/i8k/ 1594W: http://www.debian.org/~dz/i8k/
1855S: Maintained 1595S: Maintained
1856F: drivers/char/i8k.c 1596F: drivers/char/i8k.c
1857F: include/linux/i8k.h 1597F: include/linux/i8k.h
1858 1598
1859DELL SYSTEMS MANAGEMENT BASE DRIVER (dcdbas) 1599DELL SYSTEMS MANAGEMENT BASE DRIVER (dcdbas)
1860P: Doug Warzecha 1600M: Doug Warzecha <Douglas_Warzecha@dell.com>
1861M: Douglas_Warzecha@dell.com
1862S: Maintained 1601S: Maintained
1863F: Documentation/dcdbas.txt 1602F: Documentation/dcdbas.txt
1864F: drivers/firmware/dcdbas.* 1603F: drivers/firmware/dcdbas.*
1865 1604
1866DELL WMI EXTRAS DRIVER 1605DELL WMI EXTRAS DRIVER
1867P: Matthew Garrett 1606M: Matthew Garrett <mjg59@srcf.ucam.org>
1868M: mjg59@srcf.ucam.org
1869S: Maintained 1607S: Maintained
1870 1608
1871DEVICE NUMBER REGISTRY 1609DEVICE NUMBER REGISTRY
1872P: Torben Mathiasen 1610M: Torben Mathiasen <device@lanana.org>
1873M: device@lanana.org
1874W: http://lanana.org/docs/device-list/index.html 1611W: http://lanana.org/docs/device-list/index.html
1875S: Maintained 1612S: Maintained
1876 1613
@@ -1885,8 +1622,7 @@ F: include/linux/device-mapper.h
1885F: include/linux/dm-*.h 1622F: include/linux/dm-*.h
1886 1623
1887DIGI INTL. EPCA DRIVER 1624DIGI INTL. EPCA DRIVER
1888P: Digi International, Inc 1625M: "Digi International, Inc" <Eng.Linux@digi.com>
1889M: Eng.Linux@digi.com
1890L: Eng.Linux@digi.com 1626L: Eng.Linux@digi.com
1891W: http://www.digi.com 1627W: http://www.digi.com
1892S: Orphan 1628S: Orphan
@@ -1895,34 +1631,29 @@ F: drivers/char/epca*
1895F: drivers/char/digi* 1631F: drivers/char/digi*
1896 1632
1897DIRECTORY NOTIFICATION (DNOTIFY) 1633DIRECTORY NOTIFICATION (DNOTIFY)
1898P: Eric Paris 1634M: Eric Paris <eparis@parisplace.org>
1899M: eparis@parisplace.org
1900S: Maintained 1635S: Maintained
1901F: Documentation/filesystems/dnotify.txt 1636F: Documentation/filesystems/dnotify.txt
1902F: fs/notify/dnotify/ 1637F: fs/notify/dnotify/
1903F: include/linux/dnotify.h 1638F: include/linux/dnotify.h
1904 1639
1905DISK GEOMETRY AND PARTITION HANDLING 1640DISK GEOMETRY AND PARTITION HANDLING
1906P: Andries Brouwer 1641M: Andries Brouwer <aeb@cwi.nl>
1907M: aeb@cwi.nl
1908W: http://www.win.tue.nl/~aeb/linux/Large-Disk.html 1642W: http://www.win.tue.nl/~aeb/linux/Large-Disk.html
1909W: http://www.win.tue.nl/~aeb/linux/zip/zip-1.html 1643W: http://www.win.tue.nl/~aeb/linux/zip/zip-1.html
1910W: http://www.win.tue.nl/~aeb/partitions/partition_types-1.html 1644W: http://www.win.tue.nl/~aeb/partitions/partition_types-1.html
1911S: Maintained 1645S: Maintained
1912 1646
1913DISKQUOTA 1647DISKQUOTA
1914P: Jan Kara 1648M: Jan Kara <jack@suse.cz>
1915M: jack@suse.cz
1916S: Maintained 1649S: Maintained
1917F: Documentation/filesystems/quota.txt 1650F: Documentation/filesystems/quota.txt
1918F: fs/quota/ 1651F: fs/quota/
1919F: include/linux/quota*.h 1652F: include/linux/quota*.h
1920 1653
1921DISTRIBUTED LOCK MANAGER (DLM) 1654DISTRIBUTED LOCK MANAGER (DLM)
1922P: Christine Caulfield 1655M: Christine Caulfield <ccaulfie@redhat.com>
1923M: ccaulfie@redhat.com 1656M: David Teigland <teigland@redhat.com>
1924P: David Teigland
1925M: teigland@redhat.com
1926L: cluster-devel@redhat.com 1657L: cluster-devel@redhat.com
1927W: http://sources.redhat.com/cluster/ 1658W: http://sources.redhat.com/cluster/
1928T: git git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm.git 1659T: git git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm.git
@@ -1930,52 +1661,44 @@ S: Supported
1930F: fs/dlm/ 1661F: fs/dlm/
1931 1662
1932DMA GENERIC OFFLOAD ENGINE SUBSYSTEM 1663DMA GENERIC OFFLOAD ENGINE SUBSYSTEM
1933P: Maciej Sosnowski 1664M: Maciej Sosnowski <maciej.sosnowski@intel.com>
1934M: maciej.sosnowski@intel.com 1665M: Dan Williams <dan.j.williams@intel.com>
1935P: Dan Williams
1936M: dan.j.williams@intel.com
1937S: Supported 1666S: Supported
1938F: drivers/dma/ 1667F: drivers/dma/
1939F: include/linux/dma* 1668F: include/linux/dma*
1940 1669
1941DME1737 HARDWARE MONITOR DRIVER 1670DME1737 HARDWARE MONITOR DRIVER
1942P: Juerg Haefliger 1671M: Juerg Haefliger <juergh@gmail.com>
1943M: juergh@gmail.com
1944L: lm-sensors@lm-sensors.org 1672L: lm-sensors@lm-sensors.org
1945S: Maintained 1673S: Maintained
1946F: Documentation/hwmon/dme1737 1674F: Documentation/hwmon/dme1737
1947F: drivers/hwmon/dme1737.c 1675F: drivers/hwmon/dme1737.c
1948 1676
1949DOCBOOK FOR DOCUMENTATION 1677DOCBOOK FOR DOCUMENTATION
1950P: Randy Dunlap 1678M: Randy Dunlap <rdunlap@xenotime.net>
1951M: rdunlap@xenotime.net
1952S: Maintained 1679S: Maintained
1953 1680
1954DOCKING STATION DRIVER 1681DOCKING STATION DRIVER
1955P: Shaohua Li 1682M: Shaohua Li <shaohua.li@intel.com>
1956M: shaohua.li@intel.com
1957L: linux-acpi@vger.kernel.org 1683L: linux-acpi@vger.kernel.org
1958S: Supported 1684S: Supported
1959F: drivers/acpi/dock.c 1685F: drivers/acpi/dock.c
1960 1686
1961DOCUMENTATION 1687DOCUMENTATION
1962P: Randy Dunlap 1688M: Randy Dunlap <rdunlap@xenotime.net>
1963M: rdunlap@xenotime.net
1964L: linux-doc@vger.kernel.org 1689L: linux-doc@vger.kernel.org
1965S: Maintained 1690S: Maintained
1966F: Documentation/ 1691F: Documentation/
1967 1692
1968DOUBLETALK DRIVER 1693DOUBLETALK DRIVER
1969P: James R. Van Zandt 1694M: "James R. Van Zandt" <jrv@vanzandt.mv.com>
1970M: jrv@vanzandt.mv.com
1971L: blinux-list@redhat.com 1695L: blinux-list@redhat.com
1972S: Maintained 1696S: Maintained
1973F: drivers/char/dtlk.c 1697F: drivers/char/dtlk.c
1974F: include/linux/dtlk.h 1698F: include/linux/dtlk.h
1975 1699
1976DPT_I2O SCSI RAID DRIVER 1700DPT_I2O SCSI RAID DRIVER
1977P: Adaptec OEM Raid Solutions 1701M: Adaptec OEM Raid Solutions <aacraid@adaptec.com>
1978M: aacraid@adaptec.com
1979L: linux-scsi@vger.kernel.org 1702L: linux-scsi@vger.kernel.org
1980W: http://www.adaptec.com/ 1703W: http://www.adaptec.com/
1981S: Maintained 1704S: Maintained
@@ -1983,8 +1706,7 @@ F: drivers/scsi/dpt*
1983F: drivers/scsi/dpt/ 1706F: drivers/scsi/dpt/
1984 1707
1985DRIVER CORE, KOBJECTS, AND SYSFS 1708DRIVER CORE, KOBJECTS, AND SYSFS
1986P: Greg Kroah-Hartman 1709M: Greg Kroah-Hartman <gregkh@suse.de>
1987M: gregkh@suse.de
1988T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ 1710T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
1989S: Supported 1711S: Supported
1990F: Documentation/kobject.txt 1712F: Documentation/kobject.txt
@@ -1994,52 +1716,45 @@ F: include/linux/kobj*
1994F: lib/kobj* 1716F: lib/kobj*
1995 1717
1996DRM DRIVERS 1718DRM DRIVERS
1997P: David Airlie 1719M: David Airlie <airlied@linux.ie>
1998M: airlied@linux.ie
1999L: dri-devel@lists.sourceforge.net 1720L: dri-devel@lists.sourceforge.net
2000T: git git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git 1721T: git git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git
2001S: Maintained 1722S: Maintained
2002F: drivers/gpu/drm/ 1723F: drivers/gpu/drm/
2003 1724
2004DSCC4 DRIVER 1725DSCC4 DRIVER
2005P: Francois Romieu 1726M: Francois Romieu <romieu@fr.zoreil.com>
2006M: romieu@fr.zoreil.com
2007L: netdev@vger.kernel.org 1727L: netdev@vger.kernel.org
2008S: Maintained 1728S: Maintained
2009F: drivers/net/wan/dscc4.c 1729F: drivers/net/wan/dscc4.c
2010 1730
2011DZ DECSTATION DZ11 SERIAL DRIVER 1731DZ DECSTATION DZ11 SERIAL DRIVER
2012P: Maciej W. Rozycki 1732M: "Maciej W. Rozycki" <macro@linux-mips.org>
2013M: macro@linux-mips.org
2014S: Maintained 1733S: Maintained
2015F: drivers/serial/dz.* 1734F: drivers/serial/dz.*
2016 1735
2017EATA-DMA SCSI DRIVER 1736EATA-DMA SCSI DRIVER
2018P: Michael Neuffer 1737M: Michael Neuffer <mike@i-Connect.Net>
2019M: mike@i-Connect.Net
2020L: linux-eata@i-connect.net 1738L: linux-eata@i-connect.net
2021L: linux-scsi@vger.kernel.org 1739L: linux-scsi@vger.kernel.org
2022S: Maintained 1740S: Maintained
2023F: drivers/scsi/eata* 1741F: drivers/scsi/eata*
2024 1742
2025EATA ISA/EISA/PCI SCSI DRIVER 1743EATA ISA/EISA/PCI SCSI DRIVER
2026P: Dario Ballabio 1744M: Dario Ballabio <ballabio_dario@emc.com>
2027M: ballabio_dario@emc.com
2028L: linux-scsi@vger.kernel.org 1745L: linux-scsi@vger.kernel.org
2029S: Maintained 1746S: Maintained
2030F: drivers/scsi/eata.c 1747F: drivers/scsi/eata.c
2031 1748
2032EATA-PIO SCSI DRIVER 1749EATA-PIO SCSI DRIVER
2033P: Michael Neuffer 1750M: Michael Neuffer <mike@i-Connect.Net>
2034M: mike@i-Connect.Net
2035L: linux-eata@i-connect.net 1751L: linux-eata@i-connect.net
2036L: linux-scsi@vger.kernel.org 1752L: linux-scsi@vger.kernel.org
2037S: Maintained 1753S: Maintained
2038F: drivers/scsi/eata_pio.* 1754F: drivers/scsi/eata_pio.*
2039 1755
2040EBTABLES 1756EBTABLES
2041P: Bart De Schuymer 1757M: Bart De Schuymer <bart.de.schuymer@pandora.be>
2042M: bart.de.schuymer@pandora.be
2043L: ebtables-user@lists.sourceforge.net 1758L: ebtables-user@lists.sourceforge.net
2044L: ebtables-devel@lists.sourceforge.net 1759L: ebtables-devel@lists.sourceforge.net
2045W: http://ebtables.sourceforge.net/ 1760W: http://ebtables.sourceforge.net/
@@ -2048,10 +1763,8 @@ F: include/linux/netfilter_bridge/ebt_*.h
2048F: net/bridge/netfilter/ebt*.c 1763F: net/bridge/netfilter/ebt*.c
2049 1764
2050ECRYPT FILE SYSTEM 1765ECRYPT FILE SYSTEM
2051P: Tyler Hicks 1766M: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
2052M: tyhicks@linux.vnet.ibm.com 1767M: Dustin Kirkland <kirkland@canonical.com>
2053P: Dustin Kirkland
2054M: kirkland@canonical.com
2055L: ecryptfs-devel@lists.launchpad.net 1768L: ecryptfs-devel@lists.launchpad.net
2056W: https://launchpad.net/ecryptfs 1769W: https://launchpad.net/ecryptfs
2057S: Supported 1770S: Supported
@@ -2059,8 +1772,7 @@ F: Documentation/filesystems/ecryptfs.txt
2059F: fs/ecryptfs/ 1772F: fs/ecryptfs/
2060 1773
2061EDAC-CORE 1774EDAC-CORE
2062P: Doug Thompson 1775M: Doug Thompson <dougthompson@xmission.com>
2063M: dougthompson@xmission.com
2064L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) 1776L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
2065W: bluesmoke.sourceforge.net 1777W: bluesmoke.sourceforge.net
2066S: Supported 1778S: Supported
@@ -2069,94 +1781,80 @@ F: drivers/edac/edac_*
2069F: include/linux/edac.h 1781F: include/linux/edac.h
2070 1782
2071EDAC-AMD64 1783EDAC-AMD64
2072P: Doug Thompson 1784M: Doug Thompson <dougthompson@xmission.com>
2073M: dougthompson@xmission.com 1785M: Borislav Petkov <borislav.petkov@amd.com>
2074P: Borislav Petkov
2075M: borislav.petkov@amd.com
2076L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) 1786L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
2077W: bluesmoke.sourceforge.net 1787W: bluesmoke.sourceforge.net
2078S: Supported 1788S: Supported
2079F: drivers/edac/amd64_edac* 1789F: drivers/edac/amd64_edac*
2080 1790
2081EDAC-E752X 1791EDAC-E752X
2082P: Mark Gross 1792M: Mark Gross <mark.gross@intel.com>
2083M: mark.gross@intel.com 1793M: Doug Thompson <dougthompson@xmission.com>
2084P: Doug Thompson
2085M: dougthompson@xmission.com
2086L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) 1794L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
2087W: bluesmoke.sourceforge.net 1795W: bluesmoke.sourceforge.net
2088S: Maintained 1796S: Maintained
2089F: drivers/edac/e752x_edac.c 1797F: drivers/edac/e752x_edac.c
2090 1798
2091EDAC-E7XXX 1799EDAC-E7XXX
2092P: Doug Thompson 1800M: Doug Thompson <dougthompson@xmission.com>
2093M: dougthompson@xmission.com
2094L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) 1801L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
2095W: bluesmoke.sourceforge.net 1802W: bluesmoke.sourceforge.net
2096S: Maintained 1803S: Maintained
2097F: drivers/edac/e7xxx_edac.c 1804F: drivers/edac/e7xxx_edac.c
2098 1805
2099EDAC-I82443BXGX 1806EDAC-I82443BXGX
2100P: Tim Small 1807M: Tim Small <tim@buttersideup.com>
2101M: tim@buttersideup.com
2102L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) 1808L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
2103W: bluesmoke.sourceforge.net 1809W: bluesmoke.sourceforge.net
2104S: Maintained 1810S: Maintained
2105F: drivers/edac/i82443bxgx_edac.c 1811F: drivers/edac/i82443bxgx_edac.c
2106 1812
2107EDAC-I3000 1813EDAC-I3000
2108P: Jason Uhlenkott 1814M: Jason Uhlenkott <juhlenko@akamai.com>
2109M: juhlenko@akamai.com
2110L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) 1815L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
2111W: bluesmoke.sourceforge.net 1816W: bluesmoke.sourceforge.net
2112S: Maintained 1817S: Maintained
2113F: drivers/edac/i3000_edac.c 1818F: drivers/edac/i3000_edac.c
2114 1819
2115EDAC-I5000 1820EDAC-I5000
2116P: Doug Thompson 1821M: Doug Thompson <dougthompson@xmission.com>
2117M: dougthompson@xmission.com
2118L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) 1822L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
2119W: bluesmoke.sourceforge.net 1823W: bluesmoke.sourceforge.net
2120S: Maintained 1824S: Maintained
2121F: drivers/edac/i5000_edac.c 1825F: drivers/edac/i5000_edac.c
2122 1826
2123EDAC-I5400 1827EDAC-I5400
2124P: Mauro Carvalho Chehab 1828M: Mauro Carvalho Chehab <mchehab@redhat.com>
2125M: mchehab@redhat.com
2126L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) 1829L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
2127W: bluesmoke.sourceforge.net 1830W: bluesmoke.sourceforge.net
2128S: Maintained 1831S: Maintained
2129F: drivers/edac/i5400_edac.c 1832F: drivers/edac/i5400_edac.c
2130 1833
2131EDAC-I82975X 1834EDAC-I82975X
2132P: Ranganathan Desikan 1835M: Ranganathan Desikan <ravi@jetztechnologies.com>
2133M: ravi@jetztechnologies.com 1836M: "Arvind R." <arvind@jetztechnologies.com>
2134P: Arvind R.
2135M: arvind@jetztechnologies.com
2136L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) 1837L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
2137W: bluesmoke.sourceforge.net 1838W: bluesmoke.sourceforge.net
2138S: Maintained 1839S: Maintained
2139F: drivers/edac/i82975x_edac.c 1840F: drivers/edac/i82975x_edac.c
2140 1841
2141EDAC-PASEMI 1842EDAC-PASEMI
2142P: Egor Martovetsky 1843M: Egor Martovetsky <egor@pasemi.com>
2143M: egor@pasemi.com
2144L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) 1844L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
2145W: bluesmoke.sourceforge.net 1845W: bluesmoke.sourceforge.net
2146S: Maintained 1846S: Maintained
2147F: drivers/edac/pasemi_edac.c 1847F: drivers/edac/pasemi_edac.c
2148 1848
2149EDAC-R82600 1849EDAC-R82600
2150P: Tim Small 1850M: Tim Small <tim@buttersideup.com>
2151M: tim@buttersideup.com
2152L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) 1851L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
2153W: bluesmoke.sourceforge.net 1852W: bluesmoke.sourceforge.net
2154S: Maintained 1853S: Maintained
2155F: drivers/edac/r82600_edac.c 1854F: drivers/edac/r82600_edac.c
2156 1855
2157EEEPC LAPTOP EXTRAS DRIVER 1856EEEPC LAPTOP EXTRAS DRIVER
2158P: Corentin Chary 1857M: Corentin Chary <corentincj@iksaif.net>
2159M: corentincj@iksaif.net
2160L: acpi4asus-user@lists.sourceforge.net 1858L: acpi4asus-user@lists.sourceforge.net
2161W: http://acpi4asus.sf.net 1859W: http://acpi4asus.sf.net
2162S: Maintained 1860S: Maintained
@@ -2168,66 +1866,54 @@ S: Orphan
2168F: fs/efs/ 1866F: fs/efs/
2169 1867
2170EHCA (IBM GX bus InfiniBand adapter) DRIVER 1868EHCA (IBM GX bus InfiniBand adapter) DRIVER
2171P: Hoang-Nam Nguyen 1869M: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
2172M: hnguyen@de.ibm.com 1870M: Christoph Raisch <raisch@de.ibm.com>
2173P: Christoph Raisch
2174M: raisch@de.ibm.com
2175L: general@lists.openfabrics.org 1871L: general@lists.openfabrics.org
2176S: Supported 1872S: Supported
2177F: drivers/infiniband/hw/ehca/ 1873F: drivers/infiniband/hw/ehca/
2178 1874
2179EMBEDDED LINUX 1875EMBEDDED LINUX
2180P: Paul Gortmaker 1876M: Paul Gortmaker <paul.gortmaker@windriver.com>
2181M: paul.gortmaker@windriver.com 1877M: Matt Mackall <mpm@selenic.com>
2182P: Matt Mackall 1878M: David Woodhouse <dwmw2@infradead.org>
2183M: mpm@selenic.com
2184P: David Woodhouse
2185M: dwmw2@infradead.org
2186L: linux-embedded@vger.kernel.org 1879L: linux-embedded@vger.kernel.org
2187S: Maintained 1880S: Maintained
2188 1881
2189EMULEX LPFC FC SCSI DRIVER 1882EMULEX LPFC FC SCSI DRIVER
2190P: James Smart 1883M: James Smart <james.smart@emulex.com>
2191M: james.smart@emulex.com
2192L: linux-scsi@vger.kernel.org 1884L: linux-scsi@vger.kernel.org
2193W: http://sourceforge.net/projects/lpfcxxxx 1885W: http://sourceforge.net/projects/lpfcxxxx
2194S: Supported 1886S: Supported
2195F: drivers/scsi/lpfc/ 1887F: drivers/scsi/lpfc/
2196 1888
2197ENE CB710 FLASH CARD READER DRIVER 1889ENE CB710 FLASH CARD READER DRIVER
2198P: Michał Mirosław 1890M: Michał Mirosław <mirq-linux@rere.qmqm.pl>
2199M: mirq-linux@rere.qmqm.pl
2200L: linux-kernel@vger.kernel.org
2201S: Maintained 1891S: Maintained
2202F: drivers/misc/cb710/ 1892F: drivers/misc/cb710/
2203F: drivers/mmc/host/cb710-mmc.* 1893F: drivers/mmc/host/cb710-mmc.*
2204F: include/linux/cb710.h 1894F: include/linux/cb710.h
2205 1895
2206EPSON 1355 FRAMEBUFFER DRIVER 1896EPSON 1355 FRAMEBUFFER DRIVER
2207P: Christopher Hoover 1897M: Christopher Hoover <ch@murgatroid.com>
2208M: ch@murgatroid.com 1898M: Christopher Hoover <ch@hpl.hp.com>
2209P: Christopher Hoover
2210M: ch@hpl.hp.com
2211S: Maintained 1899S: Maintained
2212F: drivers/video/epson1355fb.c 1900F: drivers/video/epson1355fb.c
2213 1901
2214EPSON S1D13XXX FRAMEBUFFER DRIVER 1902EPSON S1D13XXX FRAMEBUFFER DRIVER
2215P: Kristoffer Ericson 1903M: Kristoffer Ericson <kristoffer.ericson@gmail.com>
2216M: kristoffer.ericson@gmail.com
2217S: Maintained 1904S: Maintained
1905T: git git://git.kernel.org/pub/scm/linux/kernel/git/kristoffer/linux-hpc.git
2218F: drivers/video/s1d13xxxfb.c 1906F: drivers/video/s1d13xxxfb.c
2219F: include/video/s1d13xxxfb.h 1907F: include/video/s1d13xxxfb.h
2220 1908
2221ETHEREXPRESS-16 NETWORK DRIVER 1909ETHEREXPRESS-16 NETWORK DRIVER
2222P: Philip Blundell 1910M: Philip Blundell <philb@gnu.org>
2223M: philb@gnu.org
2224L: netdev@vger.kernel.org 1911L: netdev@vger.kernel.org
2225S: Maintained 1912S: Maintained
2226F: drivers/net/eexpress.* 1913F: drivers/net/eexpress.*
2227 1914
2228ETHERNET BRIDGE 1915ETHERNET BRIDGE
2229P: Stephen Hemminger 1916M: Stephen Hemminger <shemminger@linux-foundation.org>
2230M: shemminger@linux-foundation.org
2231L: bridge@lists.linux-foundation.org 1917L: bridge@lists.linux-foundation.org
2232W: http://www.linux-foundation.org/en/Net:Bridge 1918W: http://www.linux-foundation.org/en/Net:Bridge
2233S: Maintained 1919S: Maintained
@@ -2235,8 +1921,7 @@ F: include/linux/netfilter_bridge/
2235F: net/bridge/ 1921F: net/bridge/
2236 1922
2237ETHERTEAM 16I DRIVER 1923ETHERTEAM 16I DRIVER
2238P: Mika Kuoppala 1924M: Mika Kuoppala <miku@iki.fi>
2239M: miku@iki.fi
2240S: Maintained 1925S: Maintained
2241F: drivers/net/eth16i.c 1926F: drivers/net/eth16i.c
2242 1927
@@ -2248,12 +1933,9 @@ F: fs/ext2/
2248F: include/linux/ext2* 1933F: include/linux/ext2*
2249 1934
2250EXT3 FILE SYSTEM 1935EXT3 FILE SYSTEM
2251P: Stephen Tweedie 1936M: Stephen Tweedie <sct@redhat.com>
2252M: sct@redhat.com 1937M: Andrew Morton <akpm@linux-foundation.org>
2253P: Andrew Morton 1938M: Andreas Dilger <adilger@sun.com>
2254M: akpm@linux-foundation.org
2255P: Andreas Dilger
2256M: adilger@sun.com
2257L: linux-ext4@vger.kernel.org 1939L: linux-ext4@vger.kernel.org
2258S: Maintained 1940S: Maintained
2259F: Documentation/filesystems/ext3.txt 1941F: Documentation/filesystems/ext3.txt
@@ -2261,10 +1943,8 @@ F: fs/ext3/
2261F: include/linux/ext3* 1943F: include/linux/ext3*
2262 1944
2263EXT4 FILE SYSTEM 1945EXT4 FILE SYSTEM
2264P: Theodore Ts'o 1946M: "Theodore Ts'o" <tytso@mit.edu>
2265M: tytso@mit.edu 1947M: Andreas Dilger <adilger@sun.com>
2266P: Andreas Dilger
2267M: adilger@sun.com
2268L: linux-ext4@vger.kernel.org 1948L: linux-ext4@vger.kernel.org
2269W: http://ext4.wiki.kernel.org 1949W: http://ext4.wiki.kernel.org
2270S: Maintained 1950S: Maintained
@@ -2272,30 +1952,26 @@ F: Documentation/filesystems/ext4.txt
2272F: fs/ext4/ 1952F: fs/ext4/
2273 1953
2274F71805F HARDWARE MONITORING DRIVER 1954F71805F HARDWARE MONITORING DRIVER
2275P: Jean Delvare 1955M: Jean Delvare <khali@linux-fr.org>
2276M: khali@linux-fr.org
2277L: lm-sensors@lm-sensors.org 1956L: lm-sensors@lm-sensors.org
2278S: Maintained 1957S: Maintained
2279F: Documentation/hwmon/f71805f 1958F: Documentation/hwmon/f71805f
2280F: drivers/hwmon/f71805f.c 1959F: drivers/hwmon/f71805f.c
2281 1960
2282FARSYNC SYNCHRONOUS DRIVER 1961FARSYNC SYNCHRONOUS DRIVER
2283P: Kevin Curtis 1962M: Kevin Curtis <kevin.curtis@farsite.co.uk>
2284M: kevin.curtis@farsite.co.uk
2285W: http://www.farsite.co.uk/ 1963W: http://www.farsite.co.uk/
2286S: Supported 1964S: Supported
2287F: drivers/net/wan/farsync.* 1965F: drivers/net/wan/farsync.*
2288 1966
2289FAULT INJECTION SUPPORT 1967FAULT INJECTION SUPPORT
2290P: Akinobu Mita 1968M: Akinobu Mita <akinobu.mita@gmail.com>
2291M: akinobu.mita@gmail.com
2292S: Supported 1969S: Supported
2293F: Documentation/fault-injection/ 1970F: Documentation/fault-injection/
2294F: lib/fault-inject.c 1971F: lib/fault-inject.c
2295 1972
2296FILE LOCKING (flock() and fcntl()/lockf()) 1973FILE LOCKING (flock() and fcntl()/lockf())
2297P: Matthew Wilcox 1974M: Matthew Wilcox <matthew@wil.cx>
2298M: matthew@wil.cx
2299L: linux-fsdevel@vger.kernel.org 1975L: linux-fsdevel@vger.kernel.org
2300S: Maintained 1976S: Maintained
2301F: include/linux/fcntl.h 1977F: include/linux/fcntl.h
@@ -2304,25 +1980,21 @@ F: fs/fcntl.c
2304F: fs/locks.c 1980F: fs/locks.c
2305 1981
2306FILESYSTEMS (VFS and infrastructure) 1982FILESYSTEMS (VFS and infrastructure)
2307P: Alexander Viro 1983M: Alexander Viro <viro@zeniv.linux.org.uk>
2308M: viro@zeniv.linux.org.uk
2309L: linux-fsdevel@vger.kernel.org 1984L: linux-fsdevel@vger.kernel.org
2310S: Maintained 1985S: Maintained
2311F: fs/* 1986F: fs/*
2312 1987
2313FINTEK F75375S HARDWARE MONITOR AND FAN CONTROLLER DRIVER 1988FINTEK F75375S HARDWARE MONITOR AND FAN CONTROLLER DRIVER
2314P: Riku Voipio 1989M: Riku Voipio <riku.vipio@iki.fi>
2315M: riku.vipio@iki.fi
2316L: lm-sensors@lm-sensors.org 1990L: lm-sensors@lm-sensors.org
2317S: Maintained 1991S: Maintained
2318F: drivers/hwmon/f75375s.c 1992F: drivers/hwmon/f75375s.c
2319F: include/linux/f75375s.h 1993F: include/linux/f75375s.h
2320 1994
2321FIREWIRE SUBSYSTEM 1995FIREWIRE SUBSYSTEM
2322P: Kristian Hoegsberg 1996M: Kristian Hoegsberg <krh@redhat.com>
2323M: krh@redhat.com 1997M: Stefan Richter <stefanr@s5r6.in-berlin.de>
2324P: Stefan Richter
2325M: stefanr@s5r6.in-berlin.de
2326L: linux1394-devel@lists.sourceforge.net 1998L: linux1394-devel@lists.sourceforge.net
2327W: http://www.linux1394.org/ 1999W: http://www.linux1394.org/
2328T: git git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git 2000T: git git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git
@@ -2337,15 +2009,13 @@ F: drivers/base/firmware*.c
2337F: include/linux/firmware.h 2009F: include/linux/firmware.h
2338 2010
2339FPU EMULATOR 2011FPU EMULATOR
2340P: Bill Metzenthen 2012M: Bill Metzenthen <billm@melbpc.org.au>
2341M: billm@melbpc.org.au
2342W: http://floatingpoint.sourceforge.net/emulator/index.html 2013W: http://floatingpoint.sourceforge.net/emulator/index.html
2343S: Maintained 2014S: Maintained
2344F: arch/x86/math-emu/ 2015F: arch/x86/math-emu/
2345 2016
2346FRAME RELAY DLCI/FRAD (Sangoma drivers too) 2017FRAME RELAY DLCI/FRAD (Sangoma drivers too)
2347P: Mike McLagan 2018M: Mike McLagan <mike.mclagan@linux.org>
2348M: mike.mclagan@linux.org
2349L: netdev@vger.kernel.org 2019L: netdev@vger.kernel.org
2350S: Maintained 2020S: Maintained
2351F: drivers/net/wan/dlci.c 2021F: drivers/net/wan/dlci.c
@@ -2360,25 +2030,21 @@ F: drivers/video/fb*
2360F: include/linux/fb.h 2030F: include/linux/fb.h
2361 2031
2362FREESCALE DMA DRIVER 2032FREESCALE DMA DRIVER
2363P: Li Yang 2033M: Li Yang <leoli@freescale.com>
2364M: leoli@freescale.com 2034M: Zhang Wei <zw@zh-kernel.org>
2365P: Zhang Wei
2366M: zw@zh-kernel.org
2367L: linuxppc-dev@ozlabs.org 2035L: linuxppc-dev@ozlabs.org
2368S: Maintained 2036S: Maintained
2369F: drivers/dma/fsldma.* 2037F: drivers/dma/fsldma.*
2370 2038
2371FREESCALE I2C CPM DRIVER 2039FREESCALE I2C CPM DRIVER
2372P: Jochen Friedrich 2040M: Jochen Friedrich <jochen@scram.de>
2373M: jochen@scram.de
2374L: linuxppc-dev@ozlabs.org 2041L: linuxppc-dev@ozlabs.org
2375L: linux-i2c@vger.kernel.org 2042L: linux-i2c@vger.kernel.org
2376S: Maintained 2043S: Maintained
2377F: drivers/i2c/busses/i2c-cpm.c 2044F: drivers/i2c/busses/i2c-cpm.c
2378 2045
2379FREESCALE IMX / MXC FRAMEBUFFER DRIVER 2046FREESCALE IMX / MXC FRAMEBUFFER DRIVER
2380P: Sascha Hauer 2047M: Sascha Hauer <kernel@pengutronix.de>
2381M: kernel@pengutronix.de
2382L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers) 2048L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers)
2383L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 2049L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
2384S: Maintained 2050S: Maintained
@@ -2386,10 +2052,8 @@ F: arch/arm/plat-mxc/include/mach/imxfb.h
2386F: drivers/video/imxfb.c 2052F: drivers/video/imxfb.c
2387 2053
2388FREESCALE SOC FS_ENET DRIVER 2054FREESCALE SOC FS_ENET DRIVER
2389P: Pantelis Antoniou 2055M: Pantelis Antoniou <pantelis.antoniou@gmail.com>
2390M: pantelis.antoniou@gmail.com 2056M: Vitaly Bordug <vbordug@ru.mvista.com>
2391P: Vitaly Bordug
2392M: vbordug@ru.mvista.com
2393L: linuxppc-dev@ozlabs.org 2057L: linuxppc-dev@ozlabs.org
2394L: netdev@vger.kernel.org 2058L: netdev@vger.kernel.org
2395S: Maintained 2059S: Maintained
@@ -2397,39 +2061,34 @@ F: drivers/net/fs_enet/
2397F: include/linux/fs_enet_pd.h 2061F: include/linux/fs_enet_pd.h
2398 2062
2399FREESCALE QUICC ENGINE LIBRARY 2063FREESCALE QUICC ENGINE LIBRARY
2400P: Timur Tabi 2064M: Timur Tabi <timur@freescale.com>
2401M: timur@freescale.com
2402L: linuxppc-dev@ozlabs.org 2065L: linuxppc-dev@ozlabs.org
2403S: Supported 2066S: Supported
2404F: arch/powerpc/sysdev/qe_lib/ 2067F: arch/powerpc/sysdev/qe_lib/
2405F: arch/powerpc/include/asm/*qe.h 2068F: arch/powerpc/include/asm/*qe.h
2406 2069
2407FREESCALE HIGHSPEED USB DEVICE DRIVER 2070FREESCALE HIGHSPEED USB DEVICE DRIVER
2408P: Li Yang 2071M: Li Yang <leoli@freescale.com>
2409M: leoli@freescale.com
2410L: linux-usb@vger.kernel.org 2072L: linux-usb@vger.kernel.org
2411L: linuxppc-dev@ozlabs.org 2073L: linuxppc-dev@ozlabs.org
2412S: Maintained 2074S: Maintained
2413F: drivers/usb/gadget/fsl_usb2_udc.c 2075F: drivers/usb/gadget/fsl_usb2_udc.c
2414 2076
2415FREESCALE QUICC ENGINE UCC ETHERNET DRIVER 2077FREESCALE QUICC ENGINE UCC ETHERNET DRIVER
2416P: Li Yang 2078M: Li Yang <leoli@freescale.com>
2417M: leoli@freescale.com
2418L: netdev@vger.kernel.org 2079L: netdev@vger.kernel.org
2419L: linuxppc-dev@ozlabs.org 2080L: linuxppc-dev@ozlabs.org
2420S: Maintained 2081S: Maintained
2421F: drivers/net/ucc_geth* 2082F: drivers/net/ucc_geth*
2422 2083
2423FREESCALE QUICC ENGINE UCC UART DRIVER 2084FREESCALE QUICC ENGINE UCC UART DRIVER
2424P: Timur Tabi 2085M: Timur Tabi <timur@freescale.com>
2425M: timur@freescale.com
2426L: linuxppc-dev@ozlabs.org 2086L: linuxppc-dev@ozlabs.org
2427S: Supported 2087S: Supported
2428F: drivers/serial/ucc_uart.c 2088F: drivers/serial/ucc_uart.c
2429 2089
2430FREESCALE SOC SOUND DRIVERS 2090FREESCALE SOC SOUND DRIVERS
2431P: Timur Tabi 2091M: Timur Tabi <timur@freescale.com>
2432M: timur@freescale.com
2433L: alsa-devel@alsa-project.org (moderated for non-subscribers) 2092L: alsa-devel@alsa-project.org (moderated for non-subscribers)
2434L: linuxppc-dev@ozlabs.org 2093L: linuxppc-dev@ozlabs.org
2435S: Supported 2094S: Supported
@@ -2437,17 +2096,14 @@ F: sound/soc/fsl/fsl*
2437F: sound/soc/fsl/mpc8610_hpcd.c 2096F: sound/soc/fsl/mpc8610_hpcd.c
2438 2097
2439FREEVXFS FILESYSTEM 2098FREEVXFS FILESYSTEM
2440P: Christoph Hellwig 2099M: Christoph Hellwig <hch@infradead.org>
2441M: hch@infradead.org
2442W: ftp://ftp.openlinux.org/pub/people/hch/vxfs 2100W: ftp://ftp.openlinux.org/pub/people/hch/vxfs
2443S: Maintained 2101S: Maintained
2444F: fs/freevxfs/ 2102F: fs/freevxfs/
2445 2103
2446FREEZER 2104FREEZER
2447P: Pavel Machek 2105M: Pavel Machek <pavel@ucw.cz>
2448M: pavel@ucw.cz 2106M: "Rafael J. Wysocki" <rjw@sisk.pl>
2449P: Rafael J. Wysocki
2450M: rjw@sisk.pl
2451L: linux-pm@lists.linux-foundation.org 2107L: linux-pm@lists.linux-foundation.org
2452S: Supported 2108S: Supported
2453F: Documentation/power/freezing-of-tasks.txt 2109F: Documentation/power/freezing-of-tasks.txt
@@ -2455,8 +2111,7 @@ F: include/linux/freezer.h
2455F: kernel/freezer.c 2111F: kernel/freezer.c
2456 2112
2457FS-CACHE: LOCAL CACHING FOR NETWORK FILESYSTEMS 2113FS-CACHE: LOCAL CACHING FOR NETWORK FILESYSTEMS
2458P: David Howells 2114M: David Howells <dhowells@redhat.com>
2459M: dhowells@redhat.com
2460L: linux-cachefs@redhat.com 2115L: linux-cachefs@redhat.com
2461S: Supported 2116S: Supported
2462F: Documentation/filesystems/caching/ 2117F: Documentation/filesystems/caching/
@@ -2464,8 +2119,7 @@ F: fs/fscache/
2464F: include/linux/fscache*.h 2119F: include/linux/fscache*.h
2465 2120
2466FTRACE 2121FTRACE
2467P: Steven Rostedt 2122M: Steven Rostedt <rostedt@goodmis.org>
2468M: rostedt@goodmis.org
2469S: Maintained 2123S: Maintained
2470F: Documentation/trace/ftrace.txt 2124F: Documentation/trace/ftrace.txt
2471F: arch/*/*/*/ftrace.h 2125F: arch/*/*/*/ftrace.h
@@ -2474,21 +2128,18 @@ F: include/*/ftrace.h
2474F: kernel/trace/ 2128F: kernel/trace/
2475 2129
2476FUJITSU FR-V (FRV) PORT 2130FUJITSU FR-V (FRV) PORT
2477P: David Howells 2131M: David Howells <dhowells@redhat.com>
2478M: dhowells@redhat.com
2479S: Maintained 2132S: Maintained
2480F: arch/frv/ 2133F: arch/frv/
2481 2134
2482FUJITSU LAPTOP EXTRAS 2135FUJITSU LAPTOP EXTRAS
2483P: Jonathan Woithe 2136M: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
2484M: jwoithe@physics.adelaide.edu.au
2485L: linux-acpi@vger.kernel.org 2137L: linux-acpi@vger.kernel.org
2486S: Maintained 2138S: Maintained
2487F: drivers/platform/x86/fujitsu-laptop.c 2139F: drivers/platform/x86/fujitsu-laptop.c
2488 2140
2489FUSE: FILESYSTEM IN USERSPACE 2141FUSE: FILESYSTEM IN USERSPACE
2490P: Miklos Szeredi 2142M: Miklos Szeredi <miklos@szeredi.hu>
2491M: miklos@szeredi.hu
2492L: fuse-devel@lists.sourceforge.net 2143L: fuse-devel@lists.sourceforge.net
2493W: http://fuse.sourceforge.net/ 2144W: http://fuse.sourceforge.net/
2494S: Maintained 2145S: Maintained
@@ -2496,30 +2147,26 @@ F: fs/fuse/
2496F: include/linux/fuse.h 2147F: include/linux/fuse.h
2497 2148
2498FUTURE DOMAIN TMC-16x0 SCSI DRIVER (16-bit) 2149FUTURE DOMAIN TMC-16x0 SCSI DRIVER (16-bit)
2499P: Rik Faith 2150M: Rik Faith <faith@cs.unc.edu>
2500M: faith@cs.unc.edu
2501L: linux-scsi@vger.kernel.org 2151L: linux-scsi@vger.kernel.org
2502S: Odd Fixes (e.g., new signatures) 2152S: Odd Fixes (e.g., new signatures)
2503F: drivers/scsi/fdomain.* 2153F: drivers/scsi/fdomain.*
2504 2154
2505GDT SCSI DISK ARRAY CONTROLLER DRIVER 2155GDT SCSI DISK ARRAY CONTROLLER DRIVER
2506P: Achim Leubner 2156M: Achim Leubner <achim_leubner@adaptec.com>
2507M: achim_leubner@adaptec.com
2508L: linux-scsi@vger.kernel.org 2157L: linux-scsi@vger.kernel.org
2509W: http://www.icp-vortex.com/ 2158W: http://www.icp-vortex.com/
2510S: Supported 2159S: Supported
2511F: drivers/scsi/gdt* 2160F: drivers/scsi/gdt*
2512 2161
2513GENERIC GPIO I2C DRIVER 2162GENERIC GPIO I2C DRIVER
2514P: Haavard Skinnemoen 2163M: Haavard Skinnemoen <hskinnemoen@atmel.com>
2515M: hskinnemoen@atmel.com
2516S: Supported 2164S: Supported
2517F: drivers/i2c/busses/i2c-gpio.c 2165F: drivers/i2c/busses/i2c-gpio.c
2518F: include/linux/i2c-gpio.h 2166F: include/linux/i2c-gpio.h
2519 2167
2520GENERIC HDLC (WAN) DRIVERS 2168GENERIC HDLC (WAN) DRIVERS
2521P: Krzysztof Halasa 2169M: Krzysztof Halasa <khc@pm.waw.pl>
2522M: khc@pm.waw.pl
2523W: http://www.kernel.org/pub/linux/utils/net/hdlc/ 2170W: http://www.kernel.org/pub/linux/utils/net/hdlc/
2524S: Maintained 2171S: Maintained
2525F: drivers/net/wan/c101.c 2172F: drivers/net/wan/c101.c
@@ -2531,16 +2178,14 @@ F: drivers/net/wan/pci200syn.c
2531F: drivers/net/wan/wanxl* 2178F: drivers/net/wan/wanxl*
2532 2179
2533GENERIC INCLUDE/ASM HEADER FILES 2180GENERIC INCLUDE/ASM HEADER FILES
2534P: Arnd Bergmann 2181M: Arnd Bergmann <arnd@arndb.de>
2535M: arnd@arndb.de
2536L: linux-arch@vger.kernel.org 2182L: linux-arch@vger.kernel.org
2537T: git git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git 2183T: git git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git
2538S: Maintained 2184S: Maintained
2539F: include/asm-generic 2185F: include/asm-generic
2540 2186
2541GFS2 FILE SYSTEM 2187GFS2 FILE SYSTEM
2542P: Steven Whitehouse 2188M: Steven Whitehouse <swhiteho@redhat.com>
2543M: swhiteho@redhat.com
2544L: cluster-devel@redhat.com 2189L: cluster-devel@redhat.com
2545W: http://sources.redhat.com/cluster/ 2190W: http://sources.redhat.com/cluster/
2546T: git git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes.git 2191T: git git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes.git
@@ -2551,10 +2196,8 @@ F: fs/gfs2/
2551F: include/linux/gfs2_ondisk.h 2196F: include/linux/gfs2_ondisk.h
2552 2197
2553GIGASET ISDN DRIVERS 2198GIGASET ISDN DRIVERS
2554P: Hansjoerg Lipp 2199M: Hansjoerg Lipp <hjlipp@web.de>
2555M: hjlipp@web.de 2200M: Tilman Schmidt <tilman@imap.cc>
2556P: Tilman Schmidt
2557M: tilman@imap.cc
2558L: gigaset307x-common@lists.sourceforge.net 2201L: gigaset307x-common@lists.sourceforge.net
2559W: http://gigaset307x.sourceforge.net/ 2202W: http://gigaset307x.sourceforge.net/
2560S: Maintained 2203S: Maintained
@@ -2563,8 +2206,7 @@ F: drivers/isdn/gigaset/
2563F: include/linux/gigaset_dev.h 2206F: include/linux/gigaset_dev.h
2564 2207
2565HARD DRIVE ACTIVE PROTECTION SYSTEM (HDAPS) DRIVER 2208HARD DRIVE ACTIVE PROTECTION SYSTEM (HDAPS) DRIVER
2566P: Frank Seidel 2209M: Frank Seidel <frank@f-seidel.de>
2567M: frank@f-seidel.de
2568L: lm-sensors@lm-sensors.org 2210L: lm-sensors@lm-sensors.org
2569W: http://www.kernel.org/pub/linux/kernel/people/fseidel/hdaps/ 2211W: http://www.kernel.org/pub/linux/kernel/people/fseidel/hdaps/
2570S: Maintained 2212S: Maintained
@@ -2576,40 +2218,35 @@ S: Odd Fixes
2576F: drivers/char/hvc_* 2218F: drivers/char/hvc_*
2577 2219
2578GSPCA FINEPIX SUBDRIVER 2220GSPCA FINEPIX SUBDRIVER
2579P: Frank Zago 2221M: Frank Zago <frank@zago.net>
2580M: frank@zago.net
2581L: linux-media@vger.kernel.org 2222L: linux-media@vger.kernel.org
2582T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 2223T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
2583S: Maintained 2224S: Maintained
2584F: drivers/media/video/gspca/finepix.c 2225F: drivers/media/video/gspca/finepix.c
2585 2226
2586GSPCA M5602 SUBDRIVER 2227GSPCA M5602 SUBDRIVER
2587P: Erik Andren 2228M: Erik Andren <erik.andren@gmail.com>
2588M: erik.andren@gmail.com
2589L: linux-media@vger.kernel.org 2229L: linux-media@vger.kernel.org
2590T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 2230T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
2591S: Maintained 2231S: Maintained
2592F: drivers/media/video/gspca/m5602/ 2232F: drivers/media/video/gspca/m5602/
2593 2233
2594GSPCA PAC207 SONIXB SUBDRIVER 2234GSPCA PAC207 SONIXB SUBDRIVER
2595P: Hans de Goede 2235M: Hans de Goede <hdegoede@redhat.com>
2596M: hdegoede@redhat.com
2597L: linux-media@vger.kernel.org 2236L: linux-media@vger.kernel.org
2598T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 2237T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
2599S: Maintained 2238S: Maintained
2600F: drivers/media/video/gspca/pac207.c 2239F: drivers/media/video/gspca/pac207.c
2601 2240
2602GSPCA T613 SUBDRIVER 2241GSPCA T613 SUBDRIVER
2603P: Leandro Costantino 2242M: Leandro Costantino <lcostantino@gmail.com>
2604M: lcostantino@gmail.com
2605L: linux-media@vger.kernel.org 2243L: linux-media@vger.kernel.org
2606T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 2244T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
2607S: Maintained 2245S: Maintained
2608F: drivers/media/video/gspca/t613.c 2246F: drivers/media/video/gspca/t613.c
2609 2247
2610GSPCA USB WEBCAM DRIVER 2248GSPCA USB WEBCAM DRIVER
2611P: Jean-Francois Moine 2249M: Jean-Francois Moine <moinejf@free.fr>
2612M: moinejf@free.fr
2613W: http://moinejf.free.fr 2250W: http://moinejf.free.fr
2614L: linux-media@vger.kernel.org 2251L: linux-media@vger.kernel.org
2615T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 2252T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
@@ -2629,31 +2266,27 @@ F: drivers/char/hw_random/
2629F: include/linux/hw_random.h 2266F: include/linux/hw_random.h
2630 2267
2631HARMONY SOUND DRIVER 2268HARMONY SOUND DRIVER
2632P: Kyle McMartin 2269M: Kyle McMartin <kyle@mcmartin.ca>
2633M: kyle@mcmartin.ca
2634L: linux-parisc@vger.kernel.org 2270L: linux-parisc@vger.kernel.org
2635S: Maintained 2271S: Maintained
2636F: sound/parisc/harmony.* 2272F: sound/parisc/harmony.*
2637 2273
2638HAYES ESP SERIAL DRIVER 2274HAYES ESP SERIAL DRIVER
2639P: Andrew J. Robinson 2275M: "Andrew J. Robinson" <arobinso@nyx.net>
2640M: arobinso@nyx.net
2641W: http://www.nyx.net/~arobinso 2276W: http://www.nyx.net/~arobinso
2642S: Maintained 2277S: Maintained
2643F: Documentation/serial/hayes-esp.txt 2278F: Documentation/serial/hayes-esp.txt
2644F: drivers/char/esp.c 2279F: drivers/char/esp.c
2645 2280
2646HEWLETT-PACKARD SMART2 RAID DRIVER 2281HEWLETT-PACKARD SMART2 RAID DRIVER
2647P: Chirag Kantharia 2282M: Chirag Kantharia <chirag.kantharia@hp.com>
2648M: chirag.kantharia@hp.com
2649L: iss_storagedev@hp.com 2283L: iss_storagedev@hp.com
2650S: Maintained 2284S: Maintained
2651F: Documentation/blockdev/cpqarray.txt 2285F: Documentation/blockdev/cpqarray.txt
2652F: drivers/block/cpqarray.* 2286F: drivers/block/cpqarray.*
2653 2287
2654HEWLETT-PACKARD SMART CISS RAID DRIVER (cciss) 2288HEWLETT-PACKARD SMART CISS RAID DRIVER (cciss)
2655P: Mike Miller 2289M: Mike Miller <mike.miller@hp.com>
2656M: mike.miller@hp.com
2657L: iss_storagedev@hp.com 2290L: iss_storagedev@hp.com
2658S: Supported 2291S: Supported
2659F: Documentation/blockdev/cciss.txt 2292F: Documentation/blockdev/cciss.txt
@@ -2661,25 +2294,21 @@ F: drivers/block/cciss*
2661F: include/linux/cciss_ioctl.h 2294F: include/linux/cciss_ioctl.h
2662 2295
2663HFS FILESYSTEM 2296HFS FILESYSTEM
2664P: Roman Zippel 2297M: Roman Zippel <zippel@linux-m68k.org>
2665M: zippel@linux-m68k.org
2666S: Maintained 2298S: Maintained
2667F: Documentation/filesystems/hfs.txt 2299F: Documentation/filesystems/hfs.txt
2668F: fs/hfs/ 2300F: fs/hfs/
2669 2301
2670HGA FRAMEBUFFER DRIVER 2302HGA FRAMEBUFFER DRIVER
2671P: Ferenc Bakonyi 2303M: Ferenc Bakonyi <fero@drama.obuda.kando.hu>
2672M: fero@drama.obuda.kando.hu
2673L: linux-nvidia@lists.surfsouth.com 2304L: linux-nvidia@lists.surfsouth.com
2674W: http://drama.obuda.kando.hu/~fero/cgi-bin/hgafb.shtml 2305W: http://drama.obuda.kando.hu/~fero/cgi-bin/hgafb.shtml
2675S: Maintained 2306S: Maintained
2676F: drivers/video/hgafb.c 2307F: drivers/video/hgafb.c
2677 2308
2678HIBERNATION (aka Software Suspend, aka swsusp) 2309HIBERNATION (aka Software Suspend, aka swsusp)
2679P: Pavel Machek 2310M: Pavel Machek <pavel@ucw.cz>
2680M: pavel@ucw.cz 2311M: "Rafael J. Wysocki" <rjw@sisk.pl>
2681P: Rafael J. Wysocki
2682M: rjw@sisk.pl
2683L: linux-pm@lists.linux-foundation.org 2312L: linux-pm@lists.linux-foundation.org
2684S: Supported 2313S: Supported
2685F: arch/x86/power/ 2314F: arch/x86/power/
@@ -2691,8 +2320,7 @@ F: include/linux/pm.h
2691F: arch/*/include/asm/suspend*.h 2320F: arch/*/include/asm/suspend*.h
2692 2321
2693HID CORE LAYER 2322HID CORE LAYER
2694P: Jiri Kosina 2323M: Jiri Kosina <jkosina@suse.cz>
2695M: jkosina@suse.cz
2696L: linux-input@vger.kernel.org 2324L: linux-input@vger.kernel.org
2697T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git 2325T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git
2698S: Maintained 2326S: Maintained
@@ -2700,16 +2328,14 @@ F: drivers/hid/
2700F: include/linux/hid* 2328F: include/linux/hid*
2701 2329
2702HIGH-RESOLUTION TIMERS, CLOCKEVENTS, DYNTICKS 2330HIGH-RESOLUTION TIMERS, CLOCKEVENTS, DYNTICKS
2703P: Thomas Gleixner 2331M: Thomas Gleixner <tglx@linutronix.de>
2704M: tglx@linutronix.de
2705S: Maintained 2332S: Maintained
2706F: Documentation/timers/ 2333F: Documentation/timers/
2707F: kernel/hrtimer.c 2334F: kernel/hrtimer.c
2708F: include/linux/hrtimer.h 2335F: include/linux/hrtimer.h
2709 2336
2710HIGH-SPEED SCC DRIVER FOR AX.25 2337HIGH-SPEED SCC DRIVER FOR AX.25
2711P: Klaus Kudielka 2338M: Klaus Kudielka <klaus.kudielka@ieee.org>
2712M: klaus.kudielka@ieee.org
2713L: linux-hams@vger.kernel.org 2339L: linux-hams@vger.kernel.org
2714W: http://www.nt.tuwien.ac.at/~kkudielk/Linux/ 2340W: http://www.nt.tuwien.ac.at/~kkudielk/Linux/
2715S: Maintained 2341S: Maintained
@@ -2717,16 +2343,14 @@ F: drivers/net/hamradio/dmascc.c
2717F: drivers/net/hamradio/scc.c 2343F: drivers/net/hamradio/scc.c
2718 2344
2719HIGHPOINT ROCKETRAID 3xxx RAID DRIVER 2345HIGHPOINT ROCKETRAID 3xxx RAID DRIVER
2720P: HighPoint Linux Team 2346M: HighPoint Linux Team <linux@highpoint-tech.com>
2721M: linux@highpoint-tech.com
2722W: http://www.highpoint-tech.com 2347W: http://www.highpoint-tech.com
2723S: Supported 2348S: Supported
2724F: Documentation/scsi/hptiop.txt 2349F: Documentation/scsi/hptiop.txt
2725F: drivers/scsi/hptiop.c 2350F: drivers/scsi/hptiop.c
2726 2351
2727HIPPI 2352HIPPI
2728P: Jes Sorensen 2353M: Jes Sorensen <jes@trained-monkey.org>
2729M: jes@trained-monkey.org
2730L: linux-hippi@sunsite.dk 2354L: linux-hippi@sunsite.dk
2731S: Maintained 2355S: Maintained
2732F: include/linux/hippidevice.h 2356F: include/linux/hippidevice.h
@@ -2734,8 +2358,7 @@ F: include/linux/if_hippi.h
2734F: net/802/hippi.c 2358F: net/802/hippi.c
2735 2359
2736HOST AP DRIVER 2360HOST AP DRIVER
2737P: Jouni Malinen 2361M: Jouni Malinen <j@w1.fi>
2738M: j@w1.fi
2739L: hostap@shmoo.com (subscribers-only) 2362L: hostap@shmoo.com (subscribers-only)
2740L: linux-wireless@vger.kernel.org 2363L: linux-wireless@vger.kernel.org
2741W: http://hostap.epitest.fi/ 2364W: http://hostap.epitest.fi/
@@ -2743,82 +2366,69 @@ S: Maintained
2743F: drivers/net/wireless/hostap/ 2366F: drivers/net/wireless/hostap/
2744 2367
2745HP COMPAQ TC1100 TABLET WMI EXTRAS DRIVER 2368HP COMPAQ TC1100 TABLET WMI EXTRAS DRIVER
2746P: Carlos Corbacho 2369M: Carlos Corbacho <carlos@strangeworlds.co.uk>
2747M: carlos@strangeworlds.co.uk
2748S: Odd Fixes 2370S: Odd Fixes
2749F: drivers/platform/x86/tc1100-wmi.c 2371F: drivers/platform/x86/tc1100-wmi.c
2750 2372
2751HP100: Driver for HP 10/100 Mbit/s Voice Grade Network Adapter Series 2373HP100: Driver for HP 10/100 Mbit/s Voice Grade Network Adapter Series
2752P: Jaroslav Kysela 2374M: Jaroslav Kysela <perex@perex.cz>
2753M: perex@perex.cz
2754S: Maintained 2375S: Maintained
2755F: drivers/net/hp100.* 2376F: drivers/net/hp100.*
2756 2377
2757HPET: High Precision Event Timers driver 2378HPET: High Precision Event Timers driver
2758P: Clemens Ladisch 2379M: Clemens Ladisch <clemens@ladisch.de>
2759M: clemens@ladisch.de
2760S: Maintained 2380S: Maintained
2761F: Documentation/timers/hpet.txt 2381F: Documentation/timers/hpet.txt
2762F: drivers/char/hpet.c 2382F: drivers/char/hpet.c
2763F: include/linux/hpet.h 2383F: include/linux/hpet.h
2764 2384
2765HPET: i386 2385HPET: i386
2766P: Venkatesh Pallipadi (Venki) 2386M: "Venkatesh Pallipadi (Venki)" <venkatesh.pallipadi@intel.com>
2767M: venkatesh.pallipadi@intel.com
2768S: Maintained 2387S: Maintained
2769F: arch/x86/kernel/hpet.c 2388F: arch/x86/kernel/hpet.c
2770F: arch/x86/include/asm/hpet.h 2389F: arch/x86/include/asm/hpet.h
2771 2390
2772HPET: x86_64 2391HPET: x86_64
2773P: Vojtech Pavlik 2392M: Vojtech Pavlik <vojtech@suse.cz>
2774M: vojtech@suse.cz
2775S: Maintained 2393S: Maintained
2776 2394
2777HPET: ACPI 2395HPET: ACPI
2778P: Bob Picco 2396M: Bob Picco <bob.picco@hp.com>
2779M: bob.picco@hp.com
2780S: Maintained 2397S: Maintained
2781F: drivers/char/hpet.c 2398F: drivers/char/hpet.c
2782 2399
2783HPFS FILESYSTEM 2400HPFS FILESYSTEM
2784P: Mikulas Patocka 2401M: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
2785M: mikulas@artax.karlin.mff.cuni.cz
2786W: http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/index-e.cgi 2402W: http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/index-e.cgi
2787S: Maintained 2403S: Maintained
2788F: fs/hpfs/ 2404F: fs/hpfs/
2789 2405
2790HSO 3G MODEM DRIVER 2406HSO 3G MODEM DRIVER
2791P: Jan Dumon 2407M: Jan Dumon <j.dumon@option.com>
2792M: j.dumon@option.com
2793W: http://www.pharscape.org 2408W: http://www.pharscape.org
2794S: Maintained 2409S: Maintained
2795F: drivers/net/usb/hso.c 2410F: drivers/net/usb/hso.c
2796 2411
2797HTCPEN TOUCHSCREEN DRIVER 2412HTCPEN TOUCHSCREEN DRIVER
2798P: Pau Oliva Fora 2413M: Pau Oliva Fora <pof@eslack.org>
2799M: pof@eslack.org
2800L: linux-input@vger.kernel.org 2414L: linux-input@vger.kernel.org
2801S: Maintained 2415S: Maintained
2802F: drivers/input/touchscreen/htcpen.c 2416F: drivers/input/touchscreen/htcpen.c
2803 2417
2804HUGETLB FILESYSTEM 2418HUGETLB FILESYSTEM
2805P: William Irwin 2419M: William Irwin <wli@holomorphy.com>
2806M: wli@holomorphy.com
2807S: Maintained 2420S: Maintained
2808F: fs/hugetlbfs/ 2421F: fs/hugetlbfs/
2809 2422
2810I2C/SMBUS STUB DRIVER 2423I2C/SMBUS STUB DRIVER
2811P: Mark M. Hoffman 2424M: "Mark M. Hoffman" <mhoffman@lightlink.com>
2812M: mhoffman@lightlink.com
2813L: linux-i2c@vger.kernel.org 2425L: linux-i2c@vger.kernel.org
2814S: Maintained 2426S: Maintained
2815F: drivers/i2c/busses/i2c-stub.c 2427F: drivers/i2c/busses/i2c-stub.c
2816 2428
2817I2C SUBSYSTEM 2429I2C SUBSYSTEM
2818P: Jean Delvare (PC drivers, core) 2430M: "Jean Delvare (PC drivers, core)" <khali@linux-fr.org>
2819M: khali@linux-fr.org 2431M: "Ben Dooks (embedded platforms)" <ben-linux@fluff.org>
2820P: Ben Dooks (embedded platforms)
2821M: ben-linux@fluff.org
2822L: linux-i2c@vger.kernel.org 2432L: linux-i2c@vger.kernel.org
2823W: http://i2c.wiki.kernel.org/ 2433W: http://i2c.wiki.kernel.org/
2824T: quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-i2c/ 2434T: quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-i2c/
@@ -2830,30 +2440,25 @@ F: include/linux/i2c-dev.h
2830F: include/linux/i2c-id.h 2440F: include/linux/i2c-id.h
2831 2441
2832I2C-TINY-USB DRIVER 2442I2C-TINY-USB DRIVER
2833P: Till Harbaum 2443M: Till Harbaum <till@harbaum.org>
2834M: till@harbaum.org
2835L: linux-i2c@vger.kernel.org 2444L: linux-i2c@vger.kernel.org
2836W: http://www.harbaum.org/till/i2c_tiny_usb 2445W: http://www.harbaum.org/till/i2c_tiny_usb
2837S: Maintained 2446S: Maintained
2838F: drivers/i2c/busses/i2c-tiny-usb.c 2447F: drivers/i2c/busses/i2c-tiny-usb.c
2839 2448
2840i386 BOOT CODE 2449i386 BOOT CODE
2841P: H. Peter Anvin 2450M: "H. Peter Anvin" <hpa@zytor.com>
2842M: hpa@zytor.com
2843S: Maintained 2451S: Maintained
2844F: arch/x86/boot/ 2452F: arch/x86/boot/
2845 2453
2846i386 SETUP CODE / CPU ERRATA WORKAROUNDS 2454i386 SETUP CODE / CPU ERRATA WORKAROUNDS
2847P: H. Peter Anvin 2455M: "H. Peter Anvin" <hpa@zytor.com>
2848M: hpa@zytor.com
2849T: git git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup.git 2456T: git git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup.git
2850S: Maintained 2457S: Maintained
2851 2458
2852IA64 (Itanium) PLATFORM 2459IA64 (Itanium) PLATFORM
2853P: Tony Luck 2460M: Tony Luck <tony.luck@intel.com>
2854P: Fenghua Yu 2461M: Fenghua Yu <fenghua.yu@intel.com>
2855M: tony.luck@intel.com
2856M: fenghua.yu@intel.com
2857L: linux-ia64@vger.kernel.org 2462L: linux-ia64@vger.kernel.org
2858W: http://www.ia64-linux.org/ 2463W: http://www.ia64-linux.org/
2859T: git git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6.git 2464T: git git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6.git
@@ -2861,29 +2466,25 @@ S: Maintained
2861F: arch/ia64/ 2466F: arch/ia64/
2862 2467
2863IBM MCA SCSI SUBSYSTEM DRIVER 2468IBM MCA SCSI SUBSYSTEM DRIVER
2864P: Michael Lang 2469M: Michael Lang <langa2@kph.uni-mainz.de>
2865M: langa2@kph.uni-mainz.de
2866W: http://www.uni-mainz.de/~langm000/linux.html 2470W: http://www.uni-mainz.de/~langm000/linux.html
2867S: Maintained 2471S: Maintained
2868F: drivers/scsi/ibmmca.c 2472F: drivers/scsi/ibmmca.c
2869 2473
2870IBM Power Linux RAID adapter 2474IBM Power Linux RAID adapter
2871P: Brian King 2475M: Brian King <brking@us.ibm.com>
2872M: brking@us.ibm.com
2873S: Supported 2476S: Supported
2874F: drivers/scsi/ipr.* 2477F: drivers/scsi/ipr.*
2875 2478
2876IBM ServeRAID RAID DRIVER 2479IBM ServeRAID RAID DRIVER
2877P: Jack Hammer 2480P: Jack Hammer
2878P: Dave Jeffery 2481M: Dave Jeffery <ipslinux@adaptec.com>
2879M: ipslinux@adaptec.com
2880W: http://www.developer.ibm.com/welcome/netfinity/serveraid.html 2482W: http://www.developer.ibm.com/welcome/netfinity/serveraid.html
2881S: Supported 2483S: Supported
2882F: drivers/scsi/ips.* 2484F: drivers/scsi/ips.*
2883 2485
2884IDE SUBSYSTEM 2486IDE SUBSYSTEM
2885P: David S. Miller 2487M: "David S. Miller" <davem@davemloft.net>
2886M: davem@davemloft.net
2887L: linux-ide@vger.kernel.org 2488L: linux-ide@vger.kernel.org
2888T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6.git 2489T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6.git
2889S: Maintained 2490S: Maintained
@@ -2892,25 +2493,21 @@ F: drivers/ide/
2892F: include/linux/ide.h 2493F: include/linux/ide.h
2893 2494
2894IDE/ATAPI DRIVERS 2495IDE/ATAPI DRIVERS
2895P: Borislav Petkov 2496M: Borislav Petkov <petkovbb@gmail.com>
2896M: petkovbb@gmail.com
2897L: linux-ide@vger.kernel.org 2497L: linux-ide@vger.kernel.org
2898S: Maintained 2498S: Maintained
2899F: Documentation/cdrom/ide-cd 2499F: Documentation/cdrom/ide-cd
2900F: drivers/ide/ide-cd* 2500F: drivers/ide/ide-cd*
2901 2501
2902IDLE-I7300 2502IDLE-I7300
2903P: Andy Henroid 2503M: Andy Henroid <andrew.d.henroid@intel.com>
2904M: andrew.d.henroid@intel.com
2905L: linux-pm@lists.linux-foundation.org 2504L: linux-pm@lists.linux-foundation.org
2906S: Supported 2505S: Supported
2907F: drivers/idle/i7300_idle.c 2506F: drivers/idle/i7300_idle.c
2908 2507
2909IEEE 1394 SUBSYSTEM 2508IEEE 1394 SUBSYSTEM
2910P: Ben Collins 2509M: Ben Collins <ben.collins@ubuntu.com>
2911M: ben.collins@ubuntu.com 2510M: Stefan Richter <stefanr@s5r6.in-berlin.de>
2912P: Stefan Richter
2913M: stefanr@s5r6.in-berlin.de
2914L: linux1394-devel@lists.sourceforge.net 2511L: linux1394-devel@lists.sourceforge.net
2915W: http://www.linux1394.org/ 2512W: http://www.linux1394.org/
2916T: git git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git 2513T: git git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git
@@ -2918,19 +2515,15 @@ S: Maintained
2918F: drivers/ieee1394/ 2515F: drivers/ieee1394/
2919 2516
2920IEEE 1394 RAW I/O DRIVER 2517IEEE 1394 RAW I/O DRIVER
2921P: Dan Dennedy 2518M: Dan Dennedy <dan@dennedy.org>
2922M: dan@dennedy.org 2519M: Stefan Richter <stefanr@s5r6.in-berlin.de>
2923P: Stefan Richter
2924M: stefanr@s5r6.in-berlin.de
2925L: linux1394-devel@lists.sourceforge.net 2520L: linux1394-devel@lists.sourceforge.net
2926S: Maintained 2521S: Maintained
2927F: drivers/ieee1394/raw1394* 2522F: drivers/ieee1394/raw1394*
2928 2523
2929IEEE 802.15.4 SUBSYSTEM 2524IEEE 802.15.4 SUBSYSTEM
2930P: Dmitry Eremin-Solenikov 2525M: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
2931M: dbaryshkov@gmail.com 2526M: Sergey Lapin <slapin@ossfans.org>
2932P: Sergey Lapin
2933M: slapin@ossfans.org
2934L: linux-zigbee-devel@lists.sourceforge.net (moderated for non-subscribers) 2527L: linux-zigbee-devel@lists.sourceforge.net (moderated for non-subscribers)
2935W: http://apps.sourceforge.net/trac/linux-zigbee 2528W: http://apps.sourceforge.net/trac/linux-zigbee
2936T: git git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.git 2529T: git git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.git
@@ -2939,8 +2532,7 @@ F: net/ieee802154/
2939F: drivers/ieee802154/ 2532F: drivers/ieee802154/
2940 2533
2941INTEGRITY MEASUREMENT ARCHITECTURE (IMA) 2534INTEGRITY MEASUREMENT ARCHITECTURE (IMA)
2942P: Mimi Zohar 2535M: Mimi Zohar <zohar@us.ibm.com>
2943M: zohar@us.ibm.com
2944S: Supported 2536S: Supported
2945F: security/integrity/ima/ 2537F: security/integrity/ima/
2946 2538
@@ -2950,12 +2542,9 @@ S: Orphan
2950F: drivers/video/imsttfb.c 2542F: drivers/video/imsttfb.c
2951 2543
2952INFINIBAND SUBSYSTEM 2544INFINIBAND SUBSYSTEM
2953P: Roland Dreier 2545M: Roland Dreier <rolandd@cisco.com>
2954M: rolandd@cisco.com 2546M: Sean Hefty <sean.hefty@intel.com>
2955P: Sean Hefty 2547M: Hal Rosenstock <hal.rosenstock@gmail.com>
2956M: sean.hefty@intel.com
2957P: Hal Rosenstock
2958M: hal.rosenstock@gmail.com
2959L: general@lists.openfabrics.org (moderated for non-subscribers) 2548L: general@lists.openfabrics.org (moderated for non-subscribers)
2960W: http://www.openib.org/ 2549W: http://www.openib.org/
2961T: git git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 2550T: git git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git
@@ -2965,65 +2554,55 @@ F: drivers/infiniband/
2965F: include/linux/if_infiniband.h 2554F: include/linux/if_infiniband.h
2966 2555
2967INOTIFY 2556INOTIFY
2968P: John McCutchan 2557M: John McCutchan <john@johnmccutchan.com>
2969M: john@johnmccutchan.com 2558M: Robert Love <rlove@rlove.org>
2970P: Robert Love 2559M: Eric Paris <eparis@parisplace.org>
2971M: rlove@rlove.org
2972P: Eric Paris
2973M: eparis@parisplace.org
2974S: Maintained 2560S: Maintained
2975F: Documentation/filesystems/inotify.txt 2561F: Documentation/filesystems/inotify.txt
2976F: fs/notify/inotify/ 2562F: fs/notify/inotify/
2977F: include/linux/inotify.h 2563F: include/linux/inotify.h
2978 2564
2979INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS 2565INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS
2980P: Dmitry Torokhov 2566M: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2981M: dmitry.torokhov@gmail.com 2567M: Dmitry Torokhov <dtor@mail.ru>
2982M: dtor@mail.ru
2983L: linux-input@vger.kernel.org 2568L: linux-input@vger.kernel.org
2984T: git git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git 2569T: git git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git
2985S: Maintained 2570S: Maintained
2986F: drivers/input/ 2571F: drivers/input/
2987 2572
2988INTEL FRAMEBUFFER DRIVER (excluding 810 and 815) 2573INTEL FRAMEBUFFER DRIVER (excluding 810 and 815)
2989P: Sylvain Meyer 2574M: Sylvain Meyer <sylvain.meyer@worldonline.fr>
2990M: sylvain.meyer@worldonline.fr
2991L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers) 2575L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers)
2992S: Maintained 2576S: Maintained
2993F: Documentation/fb/intelfb.txt 2577F: Documentation/fb/intelfb.txt
2994F: drivers/video/intelfb/ 2578F: drivers/video/intelfb/
2995 2579
2996INTEL 810/815 FRAMEBUFFER DRIVER 2580INTEL 810/815 FRAMEBUFFER DRIVER
2997P: Antonino Daplas 2581M: Antonino Daplas <adaplas@gmail.com>
2998M: adaplas@gmail.com
2999L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers) 2582L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers)
3000S: Maintained 2583S: Maintained
3001F: drivers/video/i810/ 2584F: drivers/video/i810/
3002 2585
3003INTEL MENLOW THERMAL DRIVER 2586INTEL MENLOW THERMAL DRIVER
3004P: Sujith Thomas 2587M: Sujith Thomas <sujith.thomas@intel.com>
3005M: sujith.thomas@intel.com
3006L: linux-acpi@vger.kernel.org 2588L: linux-acpi@vger.kernel.org
3007W: http://www.lesswatts.org/projects/acpi/ 2589W: http://www.lesswatts.org/projects/acpi/
3008S: Supported 2590S: Supported
3009F: drivers/platform/x86/intel_menlow.c 2591F: drivers/platform/x86/intel_menlow.c
3010 2592
3011INTEL IA32 MICROCODE UPDATE SUPPORT 2593INTEL IA32 MICROCODE UPDATE SUPPORT
3012P: Tigran Aivazian 2594M: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
3013M: tigran@aivazian.fsnet.co.uk
3014S: Maintained 2595S: Maintained
3015F: arch/x86/kernel/microcode_core.c 2596F: arch/x86/kernel/microcode_core.c
3016F: arch/x86/kernel/microcode_intel.c 2597F: arch/x86/kernel/microcode_intel.c
3017 2598
3018INTEL I/OAT DMA DRIVER 2599INTEL I/OAT DMA DRIVER
3019P: Maciej Sosnowski 2600M: Maciej Sosnowski <maciej.sosnowski@intel.com>
3020M: maciej.sosnowski@intel.com
3021S: Supported 2601S: Supported
3022F: drivers/dma/ioat* 2602F: drivers/dma/ioat*
3023 2603
3024INTEL IOMMU (VT-d) 2604INTEL IOMMU (VT-d)
3025P: David Woodhouse 2605M: David Woodhouse <dwmw2@infradead.org>
3026M: dwmw2@infradead.org
3027L: iommu@lists.linux-foundation.org 2606L: iommu@lists.linux-foundation.org
3028T: git git://git.infradead.org/iommu-2.6.git 2607T: git git://git.infradead.org/iommu-2.6.git
3029S: Supported 2608S: Supported
@@ -3031,14 +2610,12 @@ F: drivers/pci/intel-iommu.c
3031F: include/linux/intel-iommu.h 2610F: include/linux/intel-iommu.h
3032 2611
3033INTEL IOP-ADMA DMA DRIVER 2612INTEL IOP-ADMA DMA DRIVER
3034P: Dan Williams 2613M: Dan Williams <dan.j.williams@intel.com>
3035M: dan.j.williams@intel.com
3036S: Supported 2614S: Supported
3037F: drivers/dma/iop-adma.c 2615F: drivers/dma/iop-adma.c
3038 2616
3039INTEL IXP4XX QMGR, NPE, ETHERNET and HSS SUPPORT 2617INTEL IXP4XX QMGR, NPE, ETHERNET and HSS SUPPORT
3040P: Krzysztof Halasa 2618M: Krzysztof Halasa <khc@pm.waw.pl>
3041M: khc@pm.waw.pl
3042S: Maintained 2619S: Maintained
3043F: arch/arm/mach-ixp4xx/include/mach/qmgr.h 2620F: arch/arm/mach-ixp4xx/include/mach/qmgr.h
3044F: arch/arm/mach-ixp4xx/include/mach/npe.h 2621F: arch/arm/mach-ixp4xx/include/mach/npe.h
@@ -3048,29 +2625,22 @@ F: drivers/net/arm/ixp4xx_eth.c
3048F: drivers/net/wan/ixp4xx_hss.c 2625F: drivers/net/wan/ixp4xx_hss.c
3049 2626
3050INTEL IXP4XX RANDOM NUMBER GENERATOR SUPPORT 2627INTEL IXP4XX RANDOM NUMBER GENERATOR SUPPORT
3051P: Deepak Saxena 2628M: Deepak Saxena <dsaxena@plexity.net>
3052M: dsaxena@plexity.net
3053S: Maintained 2629S: Maintained
3054F: drivers/char/hw_random/ixp4xx-rng.c 2630F: drivers/char/hw_random/ixp4xx-rng.c
3055 2631
3056INTEL IXP2000 ETHERNET DRIVER 2632INTEL IXP2000 ETHERNET DRIVER
3057P: Lennert Buytenhek 2633M: Lennert Buytenhek <kernel@wantstofly.org>
3058M: kernel@wantstofly.org
3059L: netdev@vger.kernel.org 2634L: netdev@vger.kernel.org
3060S: Maintained 2635S: Maintained
3061F: drivers/net/ixp2000/ 2636F: drivers/net/ixp2000/
3062 2637
3063INTEL ETHERNET DRIVERS (e100/e1000/e1000e/igb/ixgb/ixgbe) 2638INTEL ETHERNET DRIVERS (e100/e1000/e1000e/igb/ixgb/ixgbe)
3064P: Jeff Kirsher 2639M: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
3065M: jeffrey.t.kirsher@intel.com 2640M: Jesse Brandeburg <jesse.brandeburg@intel.com>
3066P: Jesse Brandeburg 2641M: Bruce Allan <bruce.w.allan@intel.com>
3067M: jesse.brandeburg@intel.com 2642M: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
3068P: Bruce Allan 2643M: John Ronciak <john.ronciak@intel.com>
3069M: bruce.w.allan@intel.com
3070P: PJ Waskiewicz
3071M: peter.p.waskiewicz.jr@intel.com
3072P: John Ronciak
3073M: john.ronciak@intel.com
3074L: e1000-devel@lists.sourceforge.net 2644L: e1000-devel@lists.sourceforge.net
3075W: http://e1000.sourceforge.net/ 2645W: http://e1000.sourceforge.net/
3076S: Supported 2646S: Supported
@@ -3082,12 +2652,9 @@ F: drivers/net/ixgb/
3082F: drivers/net/ixgbe/ 2652F: drivers/net/ixgbe/
3083 2653
3084INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT 2654INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT
3085P: Zhu Yi 2655M: Zhu Yi <yi.zhu@intel.com>
3086M: yi.zhu@intel.com 2656M: James Ketrenos <jketreno@linux.intel.com>
3087P: James Ketrenos 2657M: Reinette Chatre <reinette.chatre@intel.com>
3088M: jketreno@linux.intel.com
3089P: Reinette Chatre
3090M: reinette.chatre@intel.com
3091L: linux-wireless@vger.kernel.org 2658L: linux-wireless@vger.kernel.org
3092L: ipw2100-devel@lists.sourceforge.net 2659L: ipw2100-devel@lists.sourceforge.net
3093W: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel 2660W: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
@@ -3097,12 +2664,9 @@ F: Documentation/networking/README.ipw2100
3097F: drivers/net/wireless/ipw2x00/ipw2100.* 2664F: drivers/net/wireless/ipw2x00/ipw2100.*
3098 2665
3099INTEL PRO/WIRELESS 2915ABG NETWORK CONNECTION SUPPORT 2666INTEL PRO/WIRELESS 2915ABG NETWORK CONNECTION SUPPORT
3100P: Zhu Yi 2667M: Zhu Yi <yi.zhu@intel.com>
3101M: yi.zhu@intel.com 2668M: James Ketrenos <jketreno@linux.intel.com>
3102P: James Ketrenos 2669M: Reinette Chatre <reinette.chatre@intel.com>
3103M: jketreno@linux.intel.com
3104P: Reinette Chatre
3105M: reinette.chatre@intel.com
3106L: linux-wireless@vger.kernel.org 2670L: linux-wireless@vger.kernel.org
3107L: ipw2100-devel@lists.sourceforge.net 2671L: ipw2100-devel@lists.sourceforge.net
3108W: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel 2672W: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
@@ -3112,8 +2676,7 @@ F: Documentation/networking/README.ipw2200
3112F: drivers/net/wireless/ipw2x00/ipw2200.* 2676F: drivers/net/wireless/ipw2x00/ipw2200.*
3113 2677
3114INTEL WIRELESS WIMAX CONNECTION 2400 2678INTEL WIRELESS WIMAX CONNECTION 2400
3115P: Inaky Perez-Gonzalez 2679M: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
3116M: inaky.perez-gonzalez@intel.com
3117M: linux-wimax@intel.com 2680M: linux-wimax@intel.com
3118L: wimax@linuxwimax.org 2681L: wimax@linuxwimax.org
3119S: Supported 2682S: Supported
@@ -3123,10 +2686,8 @@ F: drivers/net/wimax/i2400m/
3123F: include/linux/wimax/i2400m.h 2686F: include/linux/wimax/i2400m.h
3124 2687
3125INTEL WIRELESS WIFI LINK (iwlwifi) 2688INTEL WIRELESS WIFI LINK (iwlwifi)
3126P: Zhu Yi 2689M: Zhu Yi <yi.zhu@intel.com>
3127M: yi.zhu@intel.com 2690M: Reinette Chatre <reinette.chatre@intel.com>
3128P: Reinette Chatre
3129M: reinette.chatre@intel.com
3130L: linux-wireless@vger.kernel.org 2691L: linux-wireless@vger.kernel.org
3131L: ipw3945-devel@lists.sourceforge.net 2692L: ipw3945-devel@lists.sourceforge.net
3132W: http://intellinuxwireless.org 2693W: http://intellinuxwireless.org
@@ -3135,47 +2696,39 @@ S: Supported
3135F: drivers/net/wireless/iwlwifi/ 2696F: drivers/net/wireless/iwlwifi/
3136 2697
3137IOC3 ETHERNET DRIVER 2698IOC3 ETHERNET DRIVER
3138P: Ralf Baechle 2699M: Ralf Baechle <ralf@linux-mips.org>
3139M: ralf@linux-mips.org
3140L: linux-mips@linux-mips.org 2700L: linux-mips@linux-mips.org
3141S: Maintained 2701S: Maintained
3142F: drivers/net/ioc3-eth.c 2702F: drivers/net/ioc3-eth.c
3143 2703
3144IOC3 SERIAL DRIVER 2704IOC3 SERIAL DRIVER
3145P: Pat Gefre 2705M: Pat Gefre <pfg@sgi.com>
3146M: pfg@sgi.com
3147L: linux-mips@linux-mips.org 2706L: linux-mips@linux-mips.org
3148S: Maintained 2707S: Maintained
3149F: drivers/serial/ioc3_serial.c 2708F: drivers/serial/ioc3_serial.c
3150 2709
3151IP MASQUERADING 2710IP MASQUERADING
3152P: Juanjo Ciarlante 2711M: Juanjo Ciarlante <jjciarla@raiz.uncu.edu.ar>
3153M: jjciarla@raiz.uncu.edu.ar
3154S: Maintained 2712S: Maintained
3155F: net/ipv4/netfilter/ipt_MASQUERADE.c 2713F: net/ipv4/netfilter/ipt_MASQUERADE.c
3156 2714
3157IP1000A 10/100/1000 GIGABIT ETHERNET DRIVER 2715IP1000A 10/100/1000 GIGABIT ETHERNET DRIVER
3158P: Francois Romieu 2716M: Francois Romieu <romieu@fr.zoreil.com>
3159M: romieu@fr.zoreil.com 2717M: Sorbica Shieh <sorbica@icplus.com.tw>
3160P: Sorbica Shieh 2718M: Jesse Huang <jesse@icplus.com.tw>
3161M: sorbica@icplus.com.tw
3162P: Jesse Huang
3163M: jesse@icplus.com.tw
3164L: netdev@vger.kernel.org 2719L: netdev@vger.kernel.org
3165S: Maintained 2720S: Maintained
3166F: drivers/net/ipg.c 2721F: drivers/net/ipg.c
3167 2722
3168IPATH DRIVER 2723IPATH DRIVER
3169P: Ralph Campbell 2724M: Ralph Campbell <infinipath@qlogic.com>
3170M: infinipath@qlogic.com
3171L: general@lists.openfabrics.org 2725L: general@lists.openfabrics.org
3172T: git git://git.qlogic.com/ipath-linux-2.6 2726T: git git://git.qlogic.com/ipath-linux-2.6
3173S: Supported 2727S: Supported
3174F: drivers/infiniband/hw/ipath/ 2728F: drivers/infiniband/hw/ipath/
3175 2729
3176IPMI SUBSYSTEM 2730IPMI SUBSYSTEM
3177P: Corey Minyard 2731M: Corey Minyard <minyard@acm.org>
3178M: minyard@acm.org
3179L: openipmi-developer@lists.sourceforge.net 2732L: openipmi-developer@lists.sourceforge.net
3180W: http://openipmi.sourceforge.net/ 2733W: http://openipmi.sourceforge.net/
3181S: Supported 2734S: Supported
@@ -3184,20 +2737,16 @@ F: drivers/char/ipmi/
3184F: include/linux/ipmi* 2737F: include/linux/ipmi*
3185 2738
3186IPS SCSI RAID DRIVER 2739IPS SCSI RAID DRIVER
3187P: Adaptec OEM Raid Solutions 2740M: Adaptec OEM Raid Solutions <aacraid@adaptec.com>
3188M: aacraid@adaptec.com
3189L: linux-scsi@vger.kernel.org 2741L: linux-scsi@vger.kernel.org
3190W: http://www.adaptec.com/ 2742W: http://www.adaptec.com/
3191S: Maintained 2743S: Maintained
3192F: drivers/scsi/ips* 2744F: drivers/scsi/ips*
3193 2745
3194IPVS 2746IPVS
3195P: Wensong Zhang 2747M: Wensong Zhang <wensong@linux-vs.org>
3196M: wensong@linux-vs.org 2748M: Simon Horman <horms@verge.net.au>
3197P: Simon Horman 2749M: Julian Anastasov <ja@ssi.bg>
3198M: horms@verge.net.au
3199P: Julian Anastasov
3200M: ja@ssi.bg
3201L: netdev@vger.kernel.org 2750L: netdev@vger.kernel.org
3202L: lvs-devel@vger.kernel.org 2751L: lvs-devel@vger.kernel.org
3203S: Maintained 2752S: Maintained
@@ -3205,17 +2754,14 @@ F: Documentation/networking/ipvs-sysctl.txt
3205F: net/netfilter/ipvs/ 2754F: net/netfilter/ipvs/
3206 2755
3207IPWIRELESS DRIVER 2756IPWIRELESS DRIVER
3208P: Jiri Kosina 2757M: Jiri Kosina <jkosina@suse.cz>
3209M: jkosina@suse.cz 2758M: David Sterba <dsterba@suse.cz>
3210P: David Sterba
3211M: dsterba@suse.cz
3212S: Maintained 2759S: Maintained
3213T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/ipwireless_cs.git 2760T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/ipwireless_cs.git
3214F: drivers/char/pcmcia/ipwireless/ 2761F: drivers/char/pcmcia/ipwireless/
3215 2762
3216IPX NETWORK LAYER 2763IPX NETWORK LAYER
3217P: Arnaldo Carvalho de Melo 2764M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
3218M: acme@ghostprotocols.net
3219L: netdev@vger.kernel.org 2765L: netdev@vger.kernel.org
3220S: Maintained 2766S: Maintained
3221F: include/linux/ipx.h 2767F: include/linux/ipx.h
@@ -3223,8 +2769,7 @@ F: include/net/ipx.h
3223F: net/ipx/ 2769F: net/ipx/
3224 2770
3225IRDA SUBSYSTEM 2771IRDA SUBSYSTEM
3226P: Samuel Ortiz 2772M: Samuel Ortiz <samuel@sortiz.org>
3227M: samuel@sortiz.org
3228L: irda-users@lists.sourceforge.net (subscribers-only) 2773L: irda-users@lists.sourceforge.net (subscribers-only)
3229W: http://irda.sourceforge.net/ 2774W: http://irda.sourceforge.net/
3230S: Maintained 2775S: Maintained
@@ -3235,16 +2780,14 @@ F: include/net/irda/
3235F: net/irda/ 2780F: net/irda/
3236 2781
3237ISAPNP 2782ISAPNP
3238P: Jaroslav Kysela 2783M: Jaroslav Kysela <perex@perex.cz>
3239M: perex@perex.cz
3240S: Maintained 2784S: Maintained
3241F: Documentation/isapnp.txt 2785F: Documentation/isapnp.txt
3242F: drivers/pnp/isapnp/ 2786F: drivers/pnp/isapnp/
3243F: include/linux/isapnp.h 2787F: include/linux/isapnp.h
3244 2788
3245ISCSI 2789ISCSI
3246P: Mike Christie 2790M: Mike Christie <michaelc@cs.wisc.edu>
3247M: michaelc@cs.wisc.edu
3248L: open-iscsi@googlegroups.com 2791L: open-iscsi@googlegroups.com
3249W: www.open-iscsi.org 2792W: www.open-iscsi.org
3250T: git git://git.kernel.org/pub/scm/linux/kernel/git/mnc/linux-2.6-iscsi.git 2793T: git git://git.kernel.org/pub/scm/linux/kernel/git/mnc/linux-2.6-iscsi.git
@@ -3253,8 +2796,7 @@ F: drivers/scsi/*iscsi*
3253F: include/scsi/*iscsi* 2796F: include/scsi/*iscsi*
3254 2797
3255ISDN SUBSYSTEM 2798ISDN SUBSYSTEM
3256P: Karsten Keil 2799M: Karsten Keil <isdn@linux-pingi.de>
3257M: isdn@linux-pingi.de
3258L: isdn4linux@listserv.isdn4linux.de (subscribers-only) 2800L: isdn4linux@listserv.isdn4linux.de (subscribers-only)
3259W: http://www.isdn4linux.de 2801W: http://www.isdn4linux.de
3260T: git git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/isdn-2.6.git 2802T: git git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/isdn-2.6.git
@@ -3265,18 +2807,15 @@ F: include/linux/isdn.h
3265F: include/linux/isdn/ 2807F: include/linux/isdn/
3266 2808
3267ISDN SUBSYSTEM (Eicon active card driver) 2809ISDN SUBSYSTEM (Eicon active card driver)
3268P: Armin Schindler 2810M: Armin Schindler <mac@melware.de>
3269M: mac@melware.de
3270L: isdn4linux@listserv.isdn4linux.de (subscribers-only) 2811L: isdn4linux@listserv.isdn4linux.de (subscribers-only)
3271W: http://www.melware.de 2812W: http://www.melware.de
3272S: Maintained 2813S: Maintained
3273F: drivers/isdn/hardware/eicon/ 2814F: drivers/isdn/hardware/eicon/
3274 2815
3275IVTV VIDEO4LINUX DRIVER 2816IVTV VIDEO4LINUX DRIVER
3276P: Hans Verkuil 2817M: Hans Verkuil <hverkuil@xs4all.nl>
3277M: hverkuil@xs4all.nl
3278L: ivtv-devel@ivtvdriver.org 2818L: ivtv-devel@ivtvdriver.org
3279L: ivtv-users@ivtvdriver.org
3280L: linux-media@vger.kernel.org 2819L: linux-media@vger.kernel.org
3281T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 2820T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
3282W: http://www.ivtvdriver.org 2821W: http://www.ivtvdriver.org
@@ -3286,8 +2825,7 @@ F: drivers/media/video/ivtv/
3286F: include/linux/ivtv* 2825F: include/linux/ivtv*
3287 2826
3288JFS FILESYSTEM 2827JFS FILESYSTEM
3289P: Dave Kleikamp 2828M: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
3290M: shaggy@linux.vnet.ibm.com
3291L: jfs-discussion@lists.sourceforge.net 2829L: jfs-discussion@lists.sourceforge.net
3292W: http://jfs.sourceforge.net/ 2830W: http://jfs.sourceforge.net/
3293T: git git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6.git 2831T: git git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6.git
@@ -3296,15 +2834,13 @@ F: Documentation/filesystems/jfs.txt
3296F: fs/jfs/ 2834F: fs/jfs/
3297 2835
3298JME NETWORK DRIVER 2836JME NETWORK DRIVER
3299P: Guo-Fu Tseng 2837M: Guo-Fu Tseng <cooldavid@cooldavid.org>
3300M: cooldavid@cooldavid.org
3301L: netdev@vger.kernel.org 2838L: netdev@vger.kernel.org
3302S: Maintained 2839S: Maintained
3303F: drivers/net/jme.* 2840F: drivers/net/jme.*
3304 2841
3305JOURNALLING FLASH FILE SYSTEM V2 (JFFS2) 2842JOURNALLING FLASH FILE SYSTEM V2 (JFFS2)
3306P: David Woodhouse 2843M: David Woodhouse <dwmw2@infradead.org>
3307M: dwmw2@infradead.org
3308L: linux-mtd@lists.infradead.org 2844L: linux-mtd@lists.infradead.org
3309W: http://www.linux-mtd.infradead.org/doc/jffs2.html 2845W: http://www.linux-mtd.infradead.org/doc/jffs2.html
3310S: Maintained 2846S: Maintained
@@ -3312,10 +2848,8 @@ F: fs/jffs2/
3312F: include/linux/jffs2.h 2848F: include/linux/jffs2.h
3313 2849
3314JOURNALLING LAYER FOR BLOCK DEVICES (JBD) 2850JOURNALLING LAYER FOR BLOCK DEVICES (JBD)
3315P: Stephen Tweedie 2851M: Stephen Tweedie <sct@redhat.com>
3316M: sct@redhat.com 2852M: Andrew Morton <akpm@linux-foundation.org>
3317P: Andrew Morton
3318M: akpm@linux-foundation.org
3319L: linux-ext4@vger.kernel.org 2853L: linux-ext4@vger.kernel.org
3320S: Maintained 2854S: Maintained
3321F: fs/jbd*/ 2855F: fs/jbd*/
@@ -3323,48 +2857,41 @@ F: include/linux/ext*jbd*.h
3323F: include/linux/jbd*.h 2857F: include/linux/jbd*.h
3324 2858
3325K8TEMP HARDWARE MONITORING DRIVER 2859K8TEMP HARDWARE MONITORING DRIVER
3326P: Rudolf Marek 2860M: Rudolf Marek <r.marek@assembler.cz>
3327M: r.marek@assembler.cz
3328L: lm-sensors@lm-sensors.org 2861L: lm-sensors@lm-sensors.org
3329S: Maintained 2862S: Maintained
3330F: Documentation/hwmon/k8temp 2863F: Documentation/hwmon/k8temp
3331F: drivers/hwmon/k8temp.c 2864F: drivers/hwmon/k8temp.c
3332 2865
3333KCONFIG 2866KCONFIG
3334P: Roman Zippel 2867M: Roman Zippel <zippel@linux-m68k.org>
3335M: zippel@linux-m68k.org
3336L: linux-kbuild@vger.kernel.org 2868L: linux-kbuild@vger.kernel.org
3337S: Maintained 2869S: Maintained
3338F: Documentation/kbuild/kconfig-language.txt 2870F: Documentation/kbuild/kconfig-language.txt
3339F: scripts/kconfig/ 2871F: scripts/kconfig/
3340 2872
3341KDUMP 2873KDUMP
3342P: Vivek Goyal 2874M: Vivek Goyal <vgoyal@redhat.com>
3343M: vgoyal@redhat.com 2875M: Haren Myneni <hbabu@us.ibm.com>
3344P: Haren Myneni
3345M: hbabu@us.ibm.com
3346L: kexec@lists.infradead.org 2876L: kexec@lists.infradead.org
3347W: http://lse.sourceforge.net/kdump/ 2877W: http://lse.sourceforge.net/kdump/
3348S: Maintained 2878S: Maintained
3349F: Documentation/kdump/ 2879F: Documentation/kdump/
3350 2880
3351KERNEL AUTOMOUNTER (AUTOFS) 2881KERNEL AUTOMOUNTER (AUTOFS)
3352P: H. Peter Anvin 2882M: "H. Peter Anvin" <hpa@zytor.com>
3353M: hpa@zytor.com
3354L: autofs@linux.kernel.org 2883L: autofs@linux.kernel.org
3355S: Odd Fixes 2884S: Odd Fixes
3356F: fs/autofs/ 2885F: fs/autofs/
3357 2886
3358KERNEL AUTOMOUNTER v4 (AUTOFS4) 2887KERNEL AUTOMOUNTER v4 (AUTOFS4)
3359P: Ian Kent 2888M: Ian Kent <raven@themaw.net>
3360M: raven@themaw.net
3361L: autofs@linux.kernel.org 2889L: autofs@linux.kernel.org
3362S: Maintained 2890S: Maintained
3363F: fs/autofs4/ 2891F: fs/autofs4/
3364 2892
3365KERNEL BUILD 2893KERNEL BUILD
3366P: Sam Ravnborg 2894M: Sam Ravnborg <sam@ravnborg.org>
3367M: sam@ravnborg.org
3368T: git git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next.git 2895T: git git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next.git
3369T: git git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes.git 2896T: git git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes.git
3370L: linux-kbuild@vger.kernel.org 2897L: linux-kbuild@vger.kernel.org
@@ -3374,16 +2901,13 @@ F: Makefile
3374F: scripts/Makefile.* 2901F: scripts/Makefile.*
3375 2902
3376KERNEL JANITORS 2903KERNEL JANITORS
3377P: Several
3378L: kernel-janitors@vger.kernel.org 2904L: kernel-janitors@vger.kernel.org
3379W: http://www.kerneljanitors.org/ 2905W: http://www.kerneljanitors.org/
3380S: Maintained 2906S: Odd fixes
3381 2907
3382KERNEL NFSD, SUNRPC, AND LOCKD SERVERS 2908KERNEL NFSD, SUNRPC, AND LOCKD SERVERS
3383P: J. Bruce Fields 2909M: "J. Bruce Fields" <bfields@fieldses.org>
3384M: bfields@fieldses.org 2910M: Neil Brown <neilb@suse.de>
3385P: Neil Brown
3386M: neilb@suse.de
3387L: linux-nfs@vger.kernel.org 2911L: linux-nfs@vger.kernel.org
3388W: http://nfs.sourceforge.net/ 2912W: http://nfs.sourceforge.net/
3389S: Supported 2913S: Supported
@@ -3396,8 +2920,7 @@ F: include/linux/lockd/
3396F: include/linux/sunrpc/ 2920F: include/linux/sunrpc/
3397 2921
3398KERNEL VIRTUAL MACHINE (KVM) 2922KERNEL VIRTUAL MACHINE (KVM)
3399P: Avi Kivity 2923M: Avi Kivity <avi@redhat.com>
3400M: avi@redhat.com
3401L: kvm@vger.kernel.org 2924L: kvm@vger.kernel.org
3402W: http://kvm.qumranet.com 2925W: http://kvm.qumranet.com
3403S: Supported 2926S: Supported
@@ -3408,8 +2931,7 @@ F: include/linux/kvm*
3408F: virt/kvm/ 2931F: virt/kvm/
3409 2932
3410KERNEL VIRTUAL MACHINE (KVM) FOR AMD-V 2933KERNEL VIRTUAL MACHINE (KVM) FOR AMD-V
3411P: Joerg Roedel 2934M: Joerg Roedel <joerg.roedel@amd.com>
3412M: joerg.roedel@amd.com
3413L: kvm@vger.kernel.org 2935L: kvm@vger.kernel.org
3414W: http://kvm.qumranet.com 2936W: http://kvm.qumranet.com
3415S: Supported 2937S: Supported
@@ -3418,8 +2940,7 @@ F: arch/x86/kvm/kvm_svm.h
3418F: arch/x86/kvm/svm.c 2940F: arch/x86/kvm/svm.c
3419 2941
3420KERNEL VIRTUAL MACHINE (KVM) FOR POWERPC 2942KERNEL VIRTUAL MACHINE (KVM) FOR POWERPC
3421P: Hollis Blanchard 2943M: Hollis Blanchard <hollisb@us.ibm.com>
3422M: hollisb@us.ibm.com
3423L: kvm-ppc@vger.kernel.org 2944L: kvm-ppc@vger.kernel.org
3424W: http://kvm.qumranet.com 2945W: http://kvm.qumranet.com
3425S: Supported 2946S: Supported
@@ -3427,8 +2948,7 @@ F: arch/powerpc/include/asm/kvm*
3427F: arch/powerpc/kvm/ 2948F: arch/powerpc/kvm/
3428 2949
3429KERNEL VIRTUAL MACHINE For Itanium (KVM/IA64) 2950KERNEL VIRTUAL MACHINE For Itanium (KVM/IA64)
3430P: Xiantao Zhang 2951M: Xiantao Zhang <xiantao.zhang@intel.com>
3431M: xiantao.zhang@intel.com
3432L: kvm-ia64@vger.kernel.org 2952L: kvm-ia64@vger.kernel.org
3433W: http://kvm.qumranet.com 2953W: http://kvm.qumranet.com
3434S: Supported 2954S: Supported
@@ -3437,10 +2957,8 @@ F: arch/ia64/include/asm/kvm*
3437F: arch/ia64/kvm/ 2957F: arch/ia64/kvm/
3438 2958
3439KERNEL VIRTUAL MACHINE for s390 (KVM/s390) 2959KERNEL VIRTUAL MACHINE for s390 (KVM/s390)
3440P: Carsten Otte 2960M: Carsten Otte <cotte@de.ibm.com>
3441M: cotte@de.ibm.com 2961M: Christian Borntraeger <borntraeger@de.ibm.com>
3442P: Christian Borntraeger
3443M: borntraeger@de.ibm.com
3444M: linux390@de.ibm.com 2962M: linux390@de.ibm.com
3445L: linux-s390@vger.kernel.org 2963L: linux-s390@vger.kernel.org
3446W: http://www.ibm.com/developerworks/linux/linux390/ 2964W: http://www.ibm.com/developerworks/linux/linux390/
@@ -3450,8 +2968,7 @@ F: arch/s390/include/asm/kvm*
3450F: arch/s390/kvm/ 2968F: arch/s390/kvm/
3451 2969
3452KEXEC 2970KEXEC
3453P: Eric Biederman 2971M: Eric Biederman <ebiederm@xmission.com>
3454M: ebiederm@xmission.com
3455W: http://ftp.kernel.org/pub/linux/kernel/people/horms/kexec-tools/ 2972W: http://ftp.kernel.org/pub/linux/kernel/people/horms/kexec-tools/
3456L: kexec@lists.infradead.org 2973L: kexec@lists.infradead.org
3457S: Maintained 2974S: Maintained
@@ -3459,8 +2976,7 @@ F: include/linux/kexec.h
3459F: kernel/kexec.c 2976F: kernel/kexec.c
3460 2977
3461KGDB 2978KGDB
3462P: Jason Wessel 2979M: Jason Wessel <jason.wessel@windriver.com>
3463M: jason.wessel@windriver.com
3464L: kgdb-bugreport@lists.sourceforge.net 2980L: kgdb-bugreport@lists.sourceforge.net
3465S: Maintained 2981S: Maintained
3466F: Documentation/DocBook/kgdb.tmpl 2982F: Documentation/DocBook/kgdb.tmpl
@@ -3470,17 +2986,13 @@ F: include/linux/kgdb.h
3470F: kernel/kgdb.c 2986F: kernel/kgdb.c
3471 2987
3472KMEMCHECK 2988KMEMCHECK
3473P: Vegard Nossum 2989M: Vegard Nossum <vegardno@ifi.uio.no>
3474M: vegardno@ifi.uio.no
3475P Pekka Enberg 2990P Pekka Enberg
3476M: penberg@cs.helsinki.fi 2991M: penberg@cs.helsinki.fi
3477L: linux-kernel@vger.kernel.org
3478S: Maintained 2992S: Maintained
3479 2993
3480KMEMLEAK 2994KMEMLEAK
3481P: Catalin Marinas 2995M: Catalin Marinas <catalin.marinas@arm.com>
3482M: catalin.marinas@arm.com
3483L: linux-kernel@vger.kernel.org
3484S: Maintained 2996S: Maintained
3485F: Documentation/kmemleak.txt 2997F: Documentation/kmemleak.txt
3486F: include/linux/kmemleak.h 2998F: include/linux/kmemleak.h
@@ -3488,30 +3000,24 @@ F: mm/kmemleak.c
3488F: mm/kmemleak-test.c 3000F: mm/kmemleak-test.c
3489 3001
3490KMEMTRACE 3002KMEMTRACE
3491P: Eduard - Gabriel Munteanu 3003M: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
3492M: eduard.munteanu@linux360.ro
3493S: Maintained 3004S: Maintained
3494F: Documentation/trace/kmemtrace.txt 3005F: Documentation/trace/kmemtrace.txt
3495F: include/linux/kmemtrace.h 3006F: include/linux/kmemtrace.h
3496F: kernel/trace/kmemtrace.c 3007F: kernel/trace/kmemtrace.c
3497 3008
3498KPROBES 3009KPROBES
3499P: Ananth N Mavinakayanahalli 3010M: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
3500M: ananth@in.ibm.com 3011M: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
3501P: Anil S Keshavamurthy 3012M: "David S. Miller" <davem@davemloft.net>
3502M: anil.s.keshavamurthy@intel.com 3013M: Masami Hiramatsu <mhiramat@redhat.com>
3503P: David S. Miller
3504M: davem@davemloft.net
3505P: Masami Hiramatsu
3506M: mhiramat@redhat.com
3507S: Maintained 3014S: Maintained
3508F: Documentation/kprobes.txt 3015F: Documentation/kprobes.txt
3509F: include/linux/kprobes.h 3016F: include/linux/kprobes.h
3510F: kernel/kprobes.c 3017F: kernel/kprobes.c
3511 3018
3512KS0108 LCD CONTROLLER DRIVER 3019KS0108 LCD CONTROLLER DRIVER
3513P: Miguel Ojeda Sandonis 3020M: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
3514M: miguel.ojeda.sandonis@gmail.com
3515W: http://miguelojeda.es/auxdisplay.htm 3021W: http://miguelojeda.es/auxdisplay.htm
3516W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm 3022W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
3517S: Maintained 3023S: Maintained
@@ -3527,31 +3033,27 @@ F: include/*/lapb.h
3527F: net/lapb/ 3033F: net/lapb/
3528 3034
3529LASI 53c700 driver for PARISC 3035LASI 53c700 driver for PARISC
3530P: James E.J. Bottomley 3036M: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
3531M: James.Bottomley@HansenPartnership.com
3532L: linux-scsi@vger.kernel.org 3037L: linux-scsi@vger.kernel.org
3533S: Maintained 3038S: Maintained
3534F: Documentation/scsi/53c700.txt 3039F: Documentation/scsi/53c700.txt
3535F: drivers/scsi/53c700* 3040F: drivers/scsi/53c700*
3536 3041
3537LED SUBSYSTEM 3042LED SUBSYSTEM
3538P: Richard Purdie 3043M: Richard Purdie <rpurdie@rpsys.net>
3539M: rpurdie@rpsys.net
3540S: Maintained 3044S: Maintained
3541F: drivers/leds/ 3045F: drivers/leds/
3542F: include/linux/leds.h 3046F: include/linux/leds.h
3543 3047
3544LEGO USB Tower driver 3048LEGO USB Tower driver
3545P: Juergen Stuber 3049M: Juergen Stuber <starblue@users.sourceforge.net>
3546M: starblue@users.sourceforge.net
3547L: legousb-devel@lists.sourceforge.net 3050L: legousb-devel@lists.sourceforge.net
3548W: http://legousb.sourceforge.net/ 3051W: http://legousb.sourceforge.net/
3549S: Maintained 3052S: Maintained
3550F: drivers/usb/misc/legousbtower.c 3053F: drivers/usb/misc/legousbtower.c
3551 3054
3552LGUEST 3055LGUEST
3553P: Rusty Russell 3056M: Rusty Russell <rusty@rustcorp.com.au>
3554M: rusty@rustcorp.com.au
3555L: lguest@ozlabs.org 3057L: lguest@ozlabs.org
3556W: http://lguest.ozlabs.org/ 3058W: http://lguest.ozlabs.org/
3557S: Maintained 3059S: Maintained
@@ -3562,119 +3064,100 @@ F: include/linux/lguest*.h
3562F: arch/x86/include/asm/lguest*.h 3064F: arch/x86/include/asm/lguest*.h
3563 3065
3564LINUX FOR IBM pSERIES (RS/6000) 3066LINUX FOR IBM pSERIES (RS/6000)
3565P: Paul Mackerras 3067M: Paul Mackerras <paulus@au.ibm.com>
3566M: paulus@au.ibm.com
3567W: http://www.ibm.com/linux/ltc/projects/ppc 3068W: http://www.ibm.com/linux/ltc/projects/ppc
3568S: Supported 3069S: Supported
3569 3070
3570LINUX FOR POWERPC (32-BIT AND 64-BIT) 3071LINUX FOR POWERPC (32-BIT AND 64-BIT)
3571P: Benjamin Herrenschmidt 3072M: Benjamin Herrenschmidt <benh@kernel.crashing.org>
3572M: benh@kernel.crashing.org 3073M: Paul Mackerras <paulus@samba.org>
3573P: Paul Mackerras
3574M: paulus@samba.org
3575W: http://www.penguinppc.org/ 3074W: http://www.penguinppc.org/
3576L: linuxppc-dev@ozlabs.org 3075L: linuxppc-dev@ozlabs.org
3577T: git git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git 3076T: git git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
3578S: Supported 3077S: Supported
3579 3078
3580LINUX FOR POWER MACINTOSH 3079LINUX FOR POWER MACINTOSH
3581P: Benjamin Herrenschmidt 3080M: Benjamin Herrenschmidt <benh@kernel.crashing.org>
3582M: benh@kernel.crashing.org
3583W: http://www.penguinppc.org/ 3081W: http://www.penguinppc.org/
3584L: linuxppc-dev@ozlabs.org 3082L: linuxppc-dev@ozlabs.org
3585S: Maintained 3083S: Maintained
3586 3084
3587LINUX FOR POWERPC EMBEDDED MPC5XXX 3085LINUX FOR POWERPC EMBEDDED MPC5XXX
3588P: Grant Likely 3086M: Grant Likely <grant.likely@secretlab.ca>
3589M: grant.likely@secretlab.ca
3590L: linuxppc-dev@ozlabs.org 3087L: linuxppc-dev@ozlabs.org
3591T: git git://git.secretlab.ca/git/linux-2.6.git 3088T: git git://git.secretlab.ca/git/linux-2.6.git
3592S: Maintained 3089S: Maintained
3593 3090
3594LINUX FOR POWERPC EMBEDDED PPC4XX 3091LINUX FOR POWERPC EMBEDDED PPC4XX
3595P: Josh Boyer 3092M: Josh Boyer <jwboyer@linux.vnet.ibm.com>
3596M: jwboyer@linux.vnet.ibm.com 3093M: Matt Porter <mporter@kernel.crashing.org>
3597P: Matt Porter
3598M: mporter@kernel.crashing.org
3599W: http://www.penguinppc.org/ 3094W: http://www.penguinppc.org/
3600L: linuxppc-dev@ozlabs.org 3095L: linuxppc-dev@ozlabs.org
3601T: git git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git 3096T: git git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git
3602S: Maintained 3097S: Maintained
3603 3098
3604LINUX FOR POWERPC EMBEDDED XILINX VIRTEX 3099LINUX FOR POWERPC EMBEDDED XILINX VIRTEX
3605P: Grant Likely 3100M: Grant Likely <grant.likely@secretlab.ca>
3606M: grant.likely@secretlab.ca
3607W: http://wiki.secretlab.ca/index.php/Linux_on_Xilinx_Virtex 3101W: http://wiki.secretlab.ca/index.php/Linux_on_Xilinx_Virtex
3608L: linuxppc-dev@ozlabs.org 3102L: linuxppc-dev@ozlabs.org
3609T: git git://git.secretlab.ca/git/linux-2.6.git 3103T: git git://git.secretlab.ca/git/linux-2.6.git
3610S: Maintained 3104S: Maintained
3611 3105
3612LINUX FOR POWERPC EMBEDDED PPC8XX 3106LINUX FOR POWERPC EMBEDDED PPC8XX
3613P: Vitaly Bordug 3107M: Vitaly Bordug <vitb@kernel.crashing.org>
3614M: vitb@kernel.crashing.org 3108M: Marcelo Tosatti <marcelo@kvack.org>
3615P: Marcelo Tosatti
3616M: marcelo@kvack.org
3617W: http://www.penguinppc.org/ 3109W: http://www.penguinppc.org/
3618L: linuxppc-dev@ozlabs.org 3110L: linuxppc-dev@ozlabs.org
3619S: Maintained 3111S: Maintained
3620 3112
3621LINUX FOR POWERPC EMBEDDED PPC83XX AND PPC85XX 3113LINUX FOR POWERPC EMBEDDED PPC83XX AND PPC85XX
3622P: Kumar Gala 3114M: Kumar Gala <galak@kernel.crashing.org>
3623M: galak@kernel.crashing.org
3624W: http://www.penguinppc.org/ 3115W: http://www.penguinppc.org/
3625L: linuxppc-dev@ozlabs.org 3116L: linuxppc-dev@ozlabs.org
3626S: Maintained 3117S: Maintained
3627 3118
3628LINUX FOR POWERPC PA SEMI PWRFICIENT 3119LINUX FOR POWERPC PA SEMI PWRFICIENT
3629P: Olof Johansson 3120M: Olof Johansson <olof@lixom.net>
3630M: olof@lixom.net
3631W: http://www.pasemi.com/ 3121W: http://www.pasemi.com/
3632L: linuxppc-dev@ozlabs.org 3122L: linuxppc-dev@ozlabs.org
3633S: Supported 3123S: Supported
3634 3124
3635LINUX SECURITY MODULE (LSM) FRAMEWORK 3125LINUX SECURITY MODULE (LSM) FRAMEWORK
3636P: Chris Wright 3126M: Chris Wright <chrisw@sous-sol.org>
3637M: chrisw@sous-sol.org
3638L: linux-security-module@vger.kernel.org 3127L: linux-security-module@vger.kernel.org
3639T: git git://git.kernel.org/pub/scm/linux/kernel/git/chrisw/lsm-2.6.git 3128T: git git://git.kernel.org/pub/scm/linux/kernel/git/chrisw/lsm-2.6.git
3640S: Supported 3129S: Supported
3641 3130
3642LLC (802.2) 3131LLC (802.2)
3643P: Arnaldo Carvalho de Melo 3132M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
3644M: acme@ghostprotocols.net
3645S: Maintained 3133S: Maintained
3646F: include/linux/llc.h 3134F: include/linux/llc.h
3647F: include/net/llc* 3135F: include/net/llc*
3648F: net/llc/ 3136F: net/llc/
3649 3137
3650LIS3LV02D ACCELEROMETER DRIVER 3138LIS3LV02D ACCELEROMETER DRIVER
3651P: Eric Piel 3139M: Eric Piel <eric.piel@tremplin-utc.net>
3652M: eric.piel@tremplin-utc.net
3653S: Maintained 3140S: Maintained
3654F: Documentation/hwmon/lis3lv02d 3141F: Documentation/hwmon/lis3lv02d
3655F: drivers/hwmon/lis3lv02d.* 3142F: drivers/hwmon/lis3lv02d.*
3656 3143
3657LM83 HARDWARE MONITOR DRIVER 3144LM83 HARDWARE MONITOR DRIVER
3658P: Jean Delvare 3145M: Jean Delvare <khali@linux-fr.org>
3659M: khali@linux-fr.org
3660L: lm-sensors@lm-sensors.org 3146L: lm-sensors@lm-sensors.org
3661S: Maintained 3147S: Maintained
3662F: Documentation/hwmon/lm83 3148F: Documentation/hwmon/lm83
3663F: drivers/hwmon/lm83.c 3149F: drivers/hwmon/lm83.c
3664 3150
3665LM90 HARDWARE MONITOR DRIVER 3151LM90 HARDWARE MONITOR DRIVER
3666P: Jean Delvare 3152M: Jean Delvare <khali@linux-fr.org>
3667M: khali@linux-fr.org
3668L: lm-sensors@lm-sensors.org 3153L: lm-sensors@lm-sensors.org
3669S: Maintained 3154S: Maintained
3670F: Documentation/hwmon/lm90 3155F: Documentation/hwmon/lm90
3671F: drivers/hwmon/lm90.c 3156F: drivers/hwmon/lm90.c
3672 3157
3673LOCKDEP AND LOCKSTAT 3158LOCKDEP AND LOCKSTAT
3674P: Peter Zijlstra 3159M: Peter Zijlstra <peterz@infradead.org>
3675M: peterz@infradead.org 3160M: Ingo Molnar <mingo@redhat.com>
3676P: Ingo Molnar
3677M: mingo@redhat.com
3678T: git git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-lockdep.git 3161T: git git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-lockdep.git
3679S: Maintained 3162S: Maintained
3680F: Documentation/lockdep*.txt 3163F: Documentation/lockdep*.txt
@@ -3683,8 +3166,7 @@ F: include/linux/lockdep.h
3683F: kernel/lockdep* 3166F: kernel/lockdep*
3684 3167
3685LOGICAL DISK MANAGER SUPPORT (LDM, Windows 2000/XP/Vista Dynamic Disks) 3168LOGICAL DISK MANAGER SUPPORT (LDM, Windows 2000/XP/Vista Dynamic Disks)
3686P: Richard Russon (FlatCap) 3169M: "Richard Russon (FlatCap)" <ldm@flatcap.org>
3687M: ldm@flatcap.org
3688L: linux-ntfs-dev@lists.sourceforge.net 3170L: linux-ntfs-dev@lists.sourceforge.net
3689W: http://www.linux-ntfs.org/content/view/19/37/ 3171W: http://www.linux-ntfs.org/content/view/19/37/
3690S: Maintained 3172S: Maintained
@@ -3692,8 +3174,7 @@ F: Documentation/ldm.txt
3692F: fs/partitions/ldm.* 3174F: fs/partitions/ldm.*
3693 3175
3694LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) 3176LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
3695P: Eric Moore 3177M: Eric Moore <Eric.Moore@lsi.com>
3696M: Eric.Moore@lsi.com
3697M: support@lsi.com 3178M: support@lsi.com
3698L: DL-MPTFusionLinux@lsi.com 3179L: DL-MPTFusionLinux@lsi.com
3699L: linux-scsi@vger.kernel.org 3180L: linux-scsi@vger.kernel.org
@@ -3702,25 +3183,21 @@ S: Supported
3702F: drivers/message/fusion/ 3183F: drivers/message/fusion/
3703 3184
3704LSILOGIC/SYMBIOS/NCR 53C8XX and 53C1010 PCI-SCSI drivers 3185LSILOGIC/SYMBIOS/NCR 53C8XX and 53C1010 PCI-SCSI drivers
3705P: Matthew Wilcox 3186M: Matthew Wilcox <matthew@wil.cx>
3706M: matthew@wil.cx
3707L: linux-scsi@vger.kernel.org 3187L: linux-scsi@vger.kernel.org
3708S: Maintained 3188S: Maintained
3709F: drivers/scsi/sym53c8xx_2/ 3189F: drivers/scsi/sym53c8xx_2/
3710 3190
3711LTP (Linux Test Project) 3191LTP (Linux Test Project)
3712P: Subrata Modak 3192M: Subrata Modak <subrata@linux.vnet.ibm.com>
3713M: subrata@linux.vnet.ibm.com 3193M: Mike Frysinger <vapier@gentoo.org>
3714P: Mike Frysinger
3715M: vapier@gentoo.org
3716L: ltp-list@lists.sourceforge.net (subscribers-only) 3194L: ltp-list@lists.sourceforge.net (subscribers-only)
3717W: http://ltp.sourceforge.net/ 3195W: http://ltp.sourceforge.net/
3718T: git git://git.kernel.org/pub/scm/linux/kernel/git/galak/ltp.git 3196T: git git://git.kernel.org/pub/scm/linux/kernel/git/galak/ltp.git
3719S: Maintained 3197S: Maintained
3720 3198
3721M32R ARCHITECTURE 3199M32R ARCHITECTURE
3722P: Hirokazu Takata 3200M: Hirokazu Takata <takata@linux-m32r.org>
3723M: takata@linux-m32r.org
3724L: linux-m32r@ml.linux-m32r.org 3201L: linux-m32r@ml.linux-m32r.org
3725L: linux-m32r-ja@ml.linux-m32r.org (in Japanese) 3202L: linux-m32r-ja@ml.linux-m32r.org (in Japanese)
3726W: http://www.linux-m32r.org/ 3203W: http://www.linux-m32r.org/
@@ -3728,10 +3205,8 @@ S: Maintained
3728F: arch/m32r/ 3205F: arch/m32r/
3729 3206
3730M68K ARCHITECTURE 3207M68K ARCHITECTURE
3731P: Geert Uytterhoeven 3208M: Geert Uytterhoeven <geert@linux-m68k.org>
3732M: geert@linux-m68k.org 3209M: Roman Zippel <zippel@linux-m68k.org>
3733P: Roman Zippel
3734M: zippel@linux-m68k.org
3735L: linux-m68k@lists.linux-m68k.org 3210L: linux-m68k@lists.linux-m68k.org
3736W: http://www.linux-m68k.org/ 3211W: http://www.linux-m68k.org/
3737T: git git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git 3212T: git git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git
@@ -3740,23 +3215,20 @@ F: arch/m68k/
3740F: drivers/zorro/ 3215F: drivers/zorro/
3741 3216
3742M68K ON APPLE MACINTOSH 3217M68K ON APPLE MACINTOSH
3743P: Joshua Thompson 3218M: Joshua Thompson <funaho@jurai.org>
3744M: funaho@jurai.org
3745W: http://www.mac.linux-m68k.org/ 3219W: http://www.mac.linux-m68k.org/
3746L: linux-m68k@lists.linux-m68k.org 3220L: linux-m68k@lists.linux-m68k.org
3747S: Maintained 3221S: Maintained
3748F: arch/m68k/mac/ 3222F: arch/m68k/mac/
3749 3223
3750M68K ON HP9000/300 3224M68K ON HP9000/300
3751P: Philip Blundell 3225M: Philip Blundell <philb@gnu.org>
3752M: philb@gnu.org
3753W: http://www.tazenda.demon.co.uk/phil/linux-hp 3226W: http://www.tazenda.demon.co.uk/phil/linux-hp
3754S: Maintained 3227S: Maintained
3755F: arch/m68k/hp300/ 3228F: arch/m68k/hp300/
3756 3229
3757MAC80211 3230MAC80211
3758P: Johannes Berg 3231M: Johannes Berg <johannes@sipsolutions.net>
3759M: johannes@sipsolutions.net
3760L: linux-wireless@vger.kernel.org 3232L: linux-wireless@vger.kernel.org
3761W: http://linuxwireless.org/ 3233W: http://linuxwireless.org/
3762T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git 3234T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git
@@ -3766,10 +3238,8 @@ F: include/net/mac80211.h
3766F: net/mac80211/ 3238F: net/mac80211/
3767 3239
3768MAC80211 PID RATE CONTROL 3240MAC80211 PID RATE CONTROL
3769P: Stefano Brivio 3241M: Stefano Brivio <stefano.brivio@polimi.it>
3770M: stefano.brivio@polimi.it 3242M: Mattias Nissler <mattias.nissler@gmx.de>
3771P: Mattias Nissler
3772M: mattias.nissler@gmx.de
3773L: linux-wireless@vger.kernel.org 3243L: linux-wireless@vger.kernel.org
3774W: http://linuxwireless.org/en/developers/Documentation/mac80211/RateControl/PID 3244W: http://linuxwireless.org/en/developers/Documentation/mac80211/RateControl/PID
3775T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git 3245T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git
@@ -3777,67 +3247,57 @@ S: Maintained
3777F: net/mac80211/rc80211_pid* 3247F: net/mac80211/rc80211_pid*
3778 3248
3779MACVLAN DRIVER 3249MACVLAN DRIVER
3780P: Patrick McHardy 3250M: Patrick McHardy <kaber@trash.net>
3781M: kaber@trash.net
3782L: netdev@vger.kernel.org 3251L: netdev@vger.kernel.org
3783S: Maintained 3252S: Maintained
3784F: drivers/net/macvlan.c 3253F: drivers/net/macvlan.c
3785F: include/linux/if_macvlan.h 3254F: include/linux/if_macvlan.h
3786 3255
3787MAN-PAGES: MANUAL PAGES FOR LINUX -- Sections 2, 3, 4, 5, and 7 3256MAN-PAGES: MANUAL PAGES FOR LINUX -- Sections 2, 3, 4, 5, and 7
3788P: Michael Kerrisk 3257M: Michael Kerrisk <mtk.manpages@gmail.com>
3789M: mtk.manpages@gmail.com
3790W: http://www.kernel.org/doc/man-pages 3258W: http://www.kernel.org/doc/man-pages
3791L: linux-man@vger.kernel.org 3259L: linux-man@vger.kernel.org
3792S: Maintained 3260S: Maintained
3793 3261
3794MARVELL LIBERTAS WIRELESS DRIVER 3262MARVELL LIBERTAS WIRELESS DRIVER
3795P: Dan Williams 3263M: Dan Williams <dcbw@redhat.com>
3796M: dcbw@redhat.com
3797L: libertas-dev@lists.infradead.org 3264L: libertas-dev@lists.infradead.org
3798S: Maintained 3265S: Maintained
3799F: drivers/net/wireless/libertas/ 3266F: drivers/net/wireless/libertas/
3800 3267
3801MARVELL MV643XX ETHERNET DRIVER 3268MARVELL MV643XX ETHERNET DRIVER
3802P: Lennert Buytenhek 3269M: Lennert Buytenhek <buytenh@marvell.com>
3803M: buytenh@marvell.com
3804L: netdev@vger.kernel.org 3270L: netdev@vger.kernel.org
3805S: Supported 3271S: Supported
3806F: drivers/net/mv643xx_eth.* 3272F: drivers/net/mv643xx_eth.*
3807F: include/linux/mv643xx.h 3273F: include/linux/mv643xx.h
3808 3274
3809MARVELL SOC MMC/SD/SDIO CONTROLLER DRIVER 3275MARVELL SOC MMC/SD/SDIO CONTROLLER DRIVER
3810P: Nicolas Pitre 3276M: Nicolas Pitre <nico@cam.org>
3811M: nico@cam.org
3812S: Maintained 3277S: Maintained
3813 3278
3814MARVELL YUKON / SYSKONNECT DRIVER 3279MARVELL YUKON / SYSKONNECT DRIVER
3815P: Mirko Lindner 3280M: Mirko Lindner <mlindner@syskonnect.de>
3816M: mlindner@syskonnect.de 3281M: Ralph Roesler <rroesler@syskonnect.de>
3817P: Ralph Roesler
3818M: rroesler@syskonnect.de
3819W: http://www.syskonnect.com 3282W: http://www.syskonnect.com
3820S: Supported 3283S: Supported
3821 3284
3822MATROX FRAMEBUFFER DRIVER 3285MATROX FRAMEBUFFER DRIVER
3823P: Petr Vandrovec 3286M: Petr Vandrovec <vandrove@vc.cvut.cz>
3824M: vandrove@vc.cvut.cz
3825L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers) 3287L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers)
3826S: Maintained 3288S: Maintained
3827F: drivers/video/matrox/matroxfb_* 3289F: drivers/video/matrox/matroxfb_*
3828F: include/linux/matroxfb.h 3290F: include/linux/matroxfb.h
3829 3291
3830MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER 3292MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER
3831P: Hans J. Koch 3293M: "Hans J. Koch" <hjk@linutronix.de>
3832M: hjk@linutronix.de
3833L: lm-sensors@lm-sensors.org 3294L: lm-sensors@lm-sensors.org
3834S: Maintained 3295S: Maintained
3835F: Documentation/hwmon/max6650 3296F: Documentation/hwmon/max6650
3836F: drivers/hwmon/max6650.c 3297F: drivers/hwmon/max6650.c
3837 3298
3838MEDIA INPUT INFRASTRUCTURE (V4L/DVB) 3299MEDIA INPUT INFRASTRUCTURE (V4L/DVB)
3839P: Mauro Carvalho Chehab 3300M: Mauro Carvalho Chehab <mchehab@infradead.org>
3840M: mchehab@infradead.org
3841P: LinuxTV.org Project 3301P: LinuxTV.org Project
3842L: linux-media@vger.kernel.org 3302L: linux-media@vger.kernel.org
3843W: http://linuxtv.org 3303W: http://linuxtv.org
@@ -3851,8 +3311,7 @@ F: include/linux/dvb/
3851F: include/linux/videodev*.h 3311F: include/linux/videodev*.h
3852 3312
3853MEGARAID SCSI DRIVERS 3313MEGARAID SCSI DRIVERS
3854P: Neela Syam Kolli 3314M: Neela Syam Kolli <megaraidlinux@lsi.com>
3855M: megaraidlinux@lsi.com
3856L: linux-scsi@vger.kernel.org 3315L: linux-scsi@vger.kernel.org
3857W: http://megaraid.lsilogic.com 3316W: http://megaraid.lsilogic.com
3858S: Maintained 3317S: Maintained
@@ -3868,19 +3327,15 @@ F: include/linux/mm.h
3868F: mm/ 3327F: mm/
3869 3328
3870MEMORY RESOURCE CONTROLLER 3329MEMORY RESOURCE CONTROLLER
3871P: Balbir Singh 3330M: Balbir Singh <balbir@linux.vnet.ibm.com>
3872M: balbir@linux.vnet.ibm.com 3331M: Pavel Emelyanov <xemul@openvz.org>
3873P: Pavel Emelyanov 3332M: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
3874M: xemul@openvz.org
3875P: KAMEZAWA Hiroyuki
3876M: kamezawa.hiroyu@jp.fujitsu.com
3877L: linux-mm@kvack.org 3333L: linux-mm@kvack.org
3878S: Maintained 3334S: Maintained
3879F: mm/memcontrol.c 3335F: mm/memcontrol.c
3880 3336
3881MEMORY TECHNOLOGY DEVICES (MTD) 3337MEMORY TECHNOLOGY DEVICES (MTD)
3882P: David Woodhouse 3338M: David Woodhouse <dwmw2@infradead.org>
3883M: dwmw2@infradead.org
3884W: http://www.linux-mtd.infradead.org/ 3339W: http://www.linux-mtd.infradead.org/
3885L: linux-mtd@lists.infradead.org 3340L: linux-mtd@lists.infradead.org
3886T: git git://git.infradead.org/mtd-2.6.git 3341T: git git://git.infradead.org/mtd-2.6.git
@@ -3890,8 +3345,7 @@ F: include/linux/mtd/
3890F: include/mtd/ 3345F: include/mtd/
3891 3346
3892MICROBLAZE ARCHITECTURE 3347MICROBLAZE ARCHITECTURE
3893P: Michal Simek 3348M: Michal Simek <monstr@monstr.eu>
3894M: monstr@monstr.eu
3895L: microblaze-uclinux@itee.uq.edu.au 3349L: microblaze-uclinux@itee.uq.edu.au
3896W: http://www.monstr.eu/fdt/ 3350W: http://www.monstr.eu/fdt/
3897T: git git://git.monstr.eu/linux-2.6-microblaze.git 3351T: git git://git.monstr.eu/linux-2.6-microblaze.git
@@ -3899,14 +3353,12 @@ S: Supported
3899F: arch/microblaze/ 3353F: arch/microblaze/
3900 3354
3901MICROTEK X6 SCANNER 3355MICROTEK X6 SCANNER
3902P: Oliver Neukum 3356M: Oliver Neukum <oliver@neukum.name>
3903M: oliver@neukum.name
3904S: Maintained 3357S: Maintained
3905F: drivers/usb/image/microtek.* 3358F: drivers/usb/image/microtek.*
3906 3359
3907MIPS 3360MIPS
3908P: Ralf Baechle 3361M: Ralf Baechle <ralf@linux-mips.org>
3909M: ralf@linux-mips.org
3910W: http://www.linux-mips.org/ 3362W: http://www.linux-mips.org/
3911L: linux-mips@linux-mips.org 3363L: linux-mips@linux-mips.org
3912T: git git://git.linux-mips.org/pub/scm/linux.git 3364T: git git://git.linux-mips.org/pub/scm/linux.git
@@ -3915,8 +3367,7 @@ F: Documentation/mips/
3915F: arch/mips/ 3367F: arch/mips/
3916 3368
3917MISCELLANEOUS MCA-SUPPORT 3369MISCELLANEOUS MCA-SUPPORT
3918P: James Bottomley 3370M: James Bottomley <James.Bottomley@HansenPartnership.com>
3919M: James.Bottomley@HansenPartnership.com
3920S: Maintained 3371S: Maintained
3921F: Documentation/ia64/mca.txt 3372F: Documentation/ia64/mca.txt
3922F: Documentation/mca.txt 3373F: Documentation/mca.txt
@@ -3924,15 +3375,13 @@ F: drivers/mca/
3924F: include/linux/mca* 3375F: include/linux/mca*
3925 3376
3926MODULE SUPPORT 3377MODULE SUPPORT
3927P: Rusty Russell 3378M: Rusty Russell <rusty@rustcorp.com.au>
3928M: rusty@rustcorp.com.au
3929S: Maintained 3379S: Maintained
3930F: include/linux/module.h 3380F: include/linux/module.h
3931F: kernel/module.c 3381F: kernel/module.c
3932 3382
3933MOTION EYE VAIO PICTUREBOOK CAMERA DRIVER 3383MOTION EYE VAIO PICTUREBOOK CAMERA DRIVER
3934P: Stelian Pop 3384M: Stelian Pop <stelian@popies.net>
3935M: stelian@popies.net
3936W: http://popies.net/meye/ 3385W: http://popies.net/meye/
3937S: Maintained 3386S: Maintained
3938F: Documentation/video4linux/meye.txt 3387F: Documentation/video4linux/meye.txt
@@ -3940,135 +3389,111 @@ F: drivers/media/video/meye.*
3940F: include/linux/meye.h 3389F: include/linux/meye.h
3941 3390
3942MOTOROLA IMX MMC/SD HOST CONTROLLER INTERFACE DRIVER 3391MOTOROLA IMX MMC/SD HOST CONTROLLER INTERFACE DRIVER
3943P: Pavel Pisa 3392M: Pavel Pisa <ppisa@pikron.com>
3944M: ppisa@pikron.com
3945L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 3393L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
3946S: Maintained 3394S: Maintained
3947F: drivers/mmc/host/imxmmc.* 3395F: drivers/mmc/host/imxmmc.*
3948 3396
3949MOUSE AND MISC DEVICES [GENERAL] 3397MOUSE AND MISC DEVICES [GENERAL]
3950P: Alessandro Rubini 3398M: Alessandro Rubini <rubini@ipvvis.unipv.it>
3951M: rubini@ipvvis.unipv.it
3952S: Maintained 3399S: Maintained
3953F: drivers/input/mouse/ 3400F: drivers/input/mouse/
3954F: include/linux/gpio_mouse.h 3401F: include/linux/gpio_mouse.h
3955 3402
3956MOXA SMARTIO/INDUSTIO/INTELLIO SERIAL CARD 3403MOXA SMARTIO/INDUSTIO/INTELLIO SERIAL CARD
3957P: Jiri Slaby 3404M: Jiri Slaby <jirislaby@gmail.com>
3958M: jirislaby@gmail.com
3959S: Maintained 3405S: Maintained
3960F: Documentation/serial/moxa-smartio 3406F: Documentation/serial/moxa-smartio
3961F: drivers/char/mxser.* 3407F: drivers/char/mxser.*
3962 3408
3963MSI LAPTOP SUPPORT 3409MSI LAPTOP SUPPORT
3964P: Lennart Poettering 3410M: Lennart Poettering <mzxreary@0pointer.de>
3965M: mzxreary@0pointer.de
3966W: https://tango.0pointer.de/mailman/listinfo/s270-linux 3411W: https://tango.0pointer.de/mailman/listinfo/s270-linux
3967W: http://0pointer.de/lennart/tchibo.html 3412W: http://0pointer.de/lennart/tchibo.html
3968S: Maintained 3413S: Maintained
3969F: drivers/platform/x86/msi-laptop.c 3414F: drivers/platform/x86/msi-laptop.c
3970 3415
3971MULTIFUNCTION DEVICES (MFD) 3416MULTIFUNCTION DEVICES (MFD)
3972P: Samuel Ortiz 3417M: Samuel Ortiz <sameo@linux.intel.com>
3973M: sameo@linux.intel.com
3974T: git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6.git 3418T: git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6.git
3975S: Supported 3419S: Supported
3976F: drivers/mfd/ 3420F: drivers/mfd/
3977 3421
3978MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM 3422MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM
3979P: Pierre Ossman 3423S: Orphan
3980M: pierre@ossman.eu
3981S: Maintained
3982F: drivers/mmc/ 3424F: drivers/mmc/
3983F: include/linux/mmc/ 3425F: include/linux/mmc/
3984 3426
3985MULTIMEDIA CARD (MMC) ETC. OVER SPI 3427MULTIMEDIA CARD (MMC) ETC. OVER SPI
3986P: David Brownell 3428M: David Brownell <dbrownell@users.sourceforge.net>
3987M: dbrownell@users.sourceforge.net
3988S: Odd Fixes 3429S: Odd Fixes
3989F: drivers/mmc/host/mmc_spi.c 3430F: drivers/mmc/host/mmc_spi.c
3990F: include/linux/spi/mmc_spi.h 3431F: include/linux/spi/mmc_spi.h
3991 3432
3992MULTISOUND SOUND DRIVER 3433MULTISOUND SOUND DRIVER
3993P: Andrew Veliath 3434M: Andrew Veliath <andrewtv@usa.net>
3994M: andrewtv@usa.net
3995S: Maintained 3435S: Maintained
3996F: Documentation/sound/oss/MultiSound 3436F: Documentation/sound/oss/MultiSound
3997F: sound/oss/msnd* 3437F: sound/oss/msnd*
3998 3438
3999MULTITECH MULTIPORT CARD (ISICOM) 3439MULTITECH MULTIPORT CARD (ISICOM)
4000P: Jiri Slaby 3440M: Jiri Slaby <jirislaby@gmail.com>
4001M: jirislaby@gmail.com
4002S: Maintained 3441S: Maintained
4003F: drivers/char/isicom.c 3442F: drivers/char/isicom.c
4004F: include/linux/isicom.h 3443F: include/linux/isicom.h
4005 3444
4006MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER 3445MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER
4007P: Felipe Balbi 3446M: Felipe Balbi <felipe.balbi@nokia.com>
4008M: felipe.balbi@nokia.com
4009L: linux-usb@vger.kernel.org 3447L: linux-usb@vger.kernel.org
4010T: git git://gitorious.org/musb/mainline.git 3448T: git git://gitorious.org/musb/mainline.git
4011S: Maintained 3449S: Maintained
4012F: drivers/usb/musb/ 3450F: drivers/usb/musb/
4013 3451
4014MYRICOM MYRI-10G 10GbE DRIVER (MYRI10GE) 3452MYRICOM MYRI-10G 10GbE DRIVER (MYRI10GE)
4015P: Andrew Gallatin 3453M: Andrew Gallatin <gallatin@myri.com>
4016M: gallatin@myri.com 3454M: Brice Goglin <brice@myri.com>
4017P: Brice Goglin
4018M: brice@myri.com
4019L: netdev@vger.kernel.org 3455L: netdev@vger.kernel.org
4020W: http://www.myri.com/scs/download-Myri10GE.html 3456W: http://www.myri.com/scs/download-Myri10GE.html
4021S: Supported 3457S: Supported
4022F: drivers/net/myri10ge/ 3458F: drivers/net/myri10ge/
4023 3459
4024NATSEMI ETHERNET DRIVER (DP8381x) 3460NATSEMI ETHERNET DRIVER (DP8381x)
4025P: Tim Hockin 3461M: Tim Hockin <thockin@hockin.org>
4026M: thockin@hockin.org
4027S: Maintained 3462S: Maintained
4028F: drivers/net/natsemi.c 3463F: drivers/net/natsemi.c
4029 3464
4030NCP FILESYSTEM 3465NCP FILESYSTEM
4031P: Petr Vandrovec 3466M: Petr Vandrovec <vandrove@vc.cvut.cz>
4032M: vandrove@vc.cvut.cz
4033L: linware@sh.cvut.cz 3467L: linware@sh.cvut.cz
4034S: Maintained 3468S: Maintained
4035F: fs/ncpfs/ 3469F: fs/ncpfs/
4036 3470
4037NCR DUAL 700 SCSI DRIVER (MICROCHANNEL) 3471NCR DUAL 700 SCSI DRIVER (MICROCHANNEL)
4038P: James E.J. Bottomley 3472M: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
4039M: James.Bottomley@HansenPartnership.com
4040L: linux-scsi@vger.kernel.org 3473L: linux-scsi@vger.kernel.org
4041S: Maintained 3474S: Maintained
4042F: drivers/scsi/NCR_D700.* 3475F: drivers/scsi/NCR_D700.*
4043 3476
4044NETEFFECT IWARP RNIC DRIVER (IW_NES) 3477NETEFFECT IWARP RNIC DRIVER (IW_NES)
4045P: Faisal Latif 3478M: Faisal Latif <faisal.latif@intel.com>
4046M: faisal.latif@intel.com 3479M: Chien Tung <chien.tin.tung@intel.com>
4047P: Chien Tung
4048M: chien.tin.tung@intel.com
4049L: general@lists.openfabrics.org 3480L: general@lists.openfabrics.org
4050W: http://www.neteffect.com 3481W: http://www.neteffect.com
4051S: Supported 3482S: Supported
4052F: drivers/infiniband/hw/nes/ 3483F: drivers/infiniband/hw/nes/
4053 3484
4054NETEM NETWORK EMULATOR 3485NETEM NETWORK EMULATOR
4055P: Stephen Hemminger 3486M: Stephen Hemminger <shemminger@linux-foundation.org>
4056M: shemminger@linux-foundation.org
4057L: netem@lists.linux-foundation.org 3487L: netem@lists.linux-foundation.org
4058S: Maintained 3488S: Maintained
4059F: net/sched/sch_netem.c 3489F: net/sched/sch_netem.c
4060 3490
4061NETERION (S2IO) 10GbE DRIVER (xframe/vxge) 3491NETERION (S2IO) 10GbE DRIVER (xframe/vxge)
4062P: Ramkrishna Vepa 3492M: Ramkrishna Vepa <ram.vepa@neterion.com>
4063M: ram.vepa@neterion.com 3493M: Rastapur Santosh <santosh.rastapur@neterion.com>
4064P: Rastapur Santosh 3494M: Sivakumar Subramani <sivakumar.subramani@neterion.com>
4065M: santosh.rastapur@neterion.com 3495M: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
4066P: Sivakumar Subramani 3496M: Anil Murthy <anil.murthy@neterion.com>
4067M: sivakumar.subramani@neterion.com
4068P: Sreenivasa Honnur
4069M: sreenivasa.honnur@neterion.com
4070P: Anil Murthy
4071M: anil.murthy@neterion.com
4072L: netdev@vger.kernel.org 3497L: netdev@vger.kernel.org
4073W: http://trac.neterion.com/cgi-bin/trac.cgi/wiki/Linux?Anonymous 3498W: http://trac.neterion.com/cgi-bin/trac.cgi/wiki/Linux?Anonymous
4074W: http://trac.neterion.com/cgi-bin/trac.cgi/wiki/X3100Linux?Anonymous 3499W: http://trac.neterion.com/cgi-bin/trac.cgi/wiki/X3100Linux?Anonymous
@@ -4082,13 +3507,13 @@ P: Marc Boucher
4082P: James Morris 3507P: James Morris
4083P: Harald Welte 3508P: Harald Welte
4084P: Jozsef Kadlecsik 3509P: Jozsef Kadlecsik
4085P: Patrick McHardy 3510M: Patrick McHardy <kaber@trash.net>
4086M: kaber@trash.net
4087L: netfilter-devel@vger.kernel.org 3511L: netfilter-devel@vger.kernel.org
4088L: netfilter@vger.kernel.org 3512L: netfilter@vger.kernel.org
4089L: coreteam@netfilter.org 3513L: coreteam@netfilter.org
4090W: http://www.netfilter.org/ 3514W: http://www.netfilter.org/
4091W: http://www.iptables.org/ 3515W: http://www.iptables.org/
3516T: git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6.git
4092S: Supported 3517S: Supported
4093F: include/linux/netfilter* 3518F: include/linux/netfilter*
4094F: include/linux/netfilter/ 3519F: include/linux/netfilter/
@@ -4098,8 +3523,7 @@ F: net/*/netfilter/
4098F: net/netfilter/ 3523F: net/netfilter/
4099 3524
4100NETLABEL 3525NETLABEL
4101P: Paul Moore 3526M: Paul Moore <paul.moore@hp.com>
4102M: paul.moore@hp.com
4103W: http://netlabel.sf.net 3527W: http://netlabel.sf.net
4104L: netdev@vger.kernel.org 3528L: netdev@vger.kernel.org
4105S: Supported 3529S: Supported
@@ -4108,8 +3532,7 @@ F: include/net/netlabel.h
4108F: net/netlabel/ 3532F: net/netlabel/
4109 3533
4110NETROM NETWORK LAYER 3534NETROM NETWORK LAYER
4111P: Ralf Baechle 3535M: Ralf Baechle <ralf@linux-mips.org>
4112M: ralf@linux-mips.org
4113L: linux-hams@vger.kernel.org 3536L: linux-hams@vger.kernel.org
4114W: http://www.linux-ax25.org/ 3537W: http://www.linux-ax25.org/
4115S: Maintained 3538S: Maintained
@@ -4118,16 +3541,14 @@ F: include/net/netrom.h
4118F: net/netrom/ 3541F: net/netrom/
4119 3542
4120NETWORK BLOCK DEVICE (NBD) 3543NETWORK BLOCK DEVICE (NBD)
4121P: Paul Clements 3544M: Paul Clements <Paul.Clements@steeleye.com>
4122M: Paul.Clements@steeleye.com
4123S: Maintained 3545S: Maintained
4124F: Documentation/blockdev/nbd.txt 3546F: Documentation/blockdev/nbd.txt
4125F: drivers/block/nbd.c 3547F: drivers/block/nbd.c
4126F: include/linux/nbd.h 3548F: include/linux/nbd.h
4127 3549
4128NETWORKING [GENERAL] 3550NETWORKING [GENERAL]
4129P: David S. Miller 3551M: "David S. Miller" <davem@davemloft.net>
4130M: davem@davemloft.net
4131L: netdev@vger.kernel.org 3552L: netdev@vger.kernel.org
4132W: http://www.linuxfoundation.org/en/Net 3553W: http://www.linuxfoundation.org/en/Net
4133T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git 3554T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git
@@ -4136,18 +3557,12 @@ F: net/
4136F: include/net/ 3557F: include/net/
4137 3558
4138NETWORKING [IPv4/IPv6] 3559NETWORKING [IPv4/IPv6]
4139P: David S. Miller 3560M: "David S. Miller" <davem@davemloft.net>
4140M: davem@davemloft.net 3561M: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
4141P: Alexey Kuznetsov 3562M: "Pekka Savola (ipv6)" <pekkas@netcore.fi>
4142M: kuznet@ms2.inr.ac.ru 3563M: James Morris <jmorris@namei.org>
4143P: Pekka Savola (ipv6) 3564M: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
4144M: pekkas@netcore.fi 3565M: Patrick McHardy <kaber@trash.net>
4145P: James Morris
4146M: jmorris@namei.org
4147P: Hideaki YOSHIFUJI
4148M: yoshfuji@linux-ipv6.org
4149P: Patrick McHardy
4150M: kaber@trash.net
4151L: netdev@vger.kernel.org 3566L: netdev@vger.kernel.org
4152T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git 3567T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git
4153S: Maintained 3568S: Maintained
@@ -4156,14 +3571,12 @@ F: net/ipv6/
4156F: include/net/ip* 3571F: include/net/ip*
4157 3572
4158NETWORKING [LABELED] (NetLabel, CIPSO, Labeled IPsec, SECMARK) 3573NETWORKING [LABELED] (NetLabel, CIPSO, Labeled IPsec, SECMARK)
4159P: Paul Moore 3574M: Paul Moore <paul.moore@hp.com>
4160M: paul.moore@hp.com
4161L: netdev@vger.kernel.org 3575L: netdev@vger.kernel.org
4162S: Maintained 3576S: Maintained
4163 3577
4164NETWORKING [WIRELESS] 3578NETWORKING [WIRELESS]
4165P: John W. Linville 3579M: "John W. Linville" <linville@tuxdriver.com>
4166M: linville@tuxdriver.com
4167L: linux-wireless@vger.kernel.org 3580L: linux-wireless@vger.kernel.org
4168T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git 3581T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git
4169S: Maintained 3582S: Maintained
@@ -4179,16 +3592,14 @@ S: Odd Fixes
4179F: drivers/net/ 3592F: drivers/net/
4180 3593
4181NETXEN (1/10) GbE SUPPORT 3594NETXEN (1/10) GbE SUPPORT
4182P: Dhananjay Phadke 3595M: Dhananjay Phadke <dhananjay@netxen.com>
4183M: dhananjay@netxen.com
4184L: netdev@vger.kernel.org 3596L: netdev@vger.kernel.org
4185W: http://www.netxen.com 3597W: http://www.netxen.com
4186S: Supported 3598S: Supported
4187F: drivers/net/netxen/ 3599F: drivers/net/netxen/
4188 3600
4189NFS, SUNRPC, AND LOCKD CLIENTS 3601NFS, SUNRPC, AND LOCKD CLIENTS
4190P: Trond Myklebust 3602M: Trond Myklebust <Trond.Myklebust@netapp.com>
4191M: Trond.Myklebust@netapp.com
4192L: linux-nfs@vger.kernel.org 3603L: linux-nfs@vger.kernel.org
4193W: http://client.linux-nfs.org 3604W: http://client.linux-nfs.org
4194T: git git://git.linux-nfs.org/pub/linux/nfs-2.6.git 3605T: git git://git.linux-nfs.org/pub/linux/nfs-2.6.git
@@ -4202,17 +3613,14 @@ F: include/linux/nfs*
4202F: include/linux/sunrpc/ 3613F: include/linux/sunrpc/
4203 3614
4204NI5010 NETWORK DRIVER 3615NI5010 NETWORK DRIVER
4205P: Jan-Pascal van Best 3616M: Jan-Pascal van Best <janpascal@vanbest.org>
4206M: janpascal@vanbest.org 3617M: Andreas Mohr <andi@lisas.de>
4207P: Andreas Mohr
4208M: andi@lisas.de
4209L: netdev@vger.kernel.org 3618L: netdev@vger.kernel.org
4210S: Maintained 3619S: Maintained
4211F: drivers/net/ni5010.* 3620F: drivers/net/ni5010.*
4212 3621
4213NILFS2 FILESYSTEM 3622NILFS2 FILESYSTEM
4214P: KONISHI Ryusuke 3623M: KONISHI Ryusuke <konishi.ryusuke@lab.ntt.co.jp>
4215M: konishi.ryusuke@lab.ntt.co.jp
4216L: users@nilfs.org 3624L: users@nilfs.org
4217W: http://www.nilfs.org/en/ 3625W: http://www.nilfs.org/en/
4218S: Supported 3626S: Supported
@@ -4221,26 +3629,22 @@ F: fs/nilfs2/
4221F: include/linux/nilfs2_fs.h 3629F: include/linux/nilfs2_fs.h
4222 3630
4223NINJA SCSI-3 / NINJA SCSI-32Bi (16bit/CardBus) PCMCIA SCSI HOST ADAPTER DRIVER 3631NINJA SCSI-3 / NINJA SCSI-32Bi (16bit/CardBus) PCMCIA SCSI HOST ADAPTER DRIVER
4224P: YOKOTA Hiroshi 3632M: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
4225M: yokota@netlab.is.tsukuba.ac.jp
4226W: http://www.netlab.is.tsukuba.ac.jp/~yokota/izumi/ninja/ 3633W: http://www.netlab.is.tsukuba.ac.jp/~yokota/izumi/ninja/
4227S: Maintained 3634S: Maintained
4228F: Documentation/scsi/NinjaSCSI.txt 3635F: Documentation/scsi/NinjaSCSI.txt
4229F: drivers/scsi/pcmcia/nsp_* 3636F: drivers/scsi/pcmcia/nsp_*
4230 3637
4231NINJA SCSI-32Bi/UDE PCI/CARDBUS SCSI HOST ADAPTER DRIVER 3638NINJA SCSI-32Bi/UDE PCI/CARDBUS SCSI HOST ADAPTER DRIVER
4232P: GOTO Masanori 3639M: GOTO Masanori <gotom@debian.or.jp>
4233M: gotom@debian.or.jp 3640M: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
4234P: YOKOTA Hiroshi
4235M: yokota@netlab.is.tsukuba.ac.jp
4236W: http://www.netlab.is.tsukuba.ac.jp/~yokota/izumi/ninja/ 3641W: http://www.netlab.is.tsukuba.ac.jp/~yokota/izumi/ninja/
4237S: Maintained 3642S: Maintained
4238F: Documentation/scsi/NinjaSCSI.txt 3643F: Documentation/scsi/NinjaSCSI.txt
4239F: drivers/scsi/nsp32* 3644F: drivers/scsi/nsp32*
4240 3645
4241NTFS FILESYSTEM 3646NTFS FILESYSTEM
4242P: Anton Altaparmakov 3647M: Anton Altaparmakov <aia21@cantab.net>
4243M: aia21@cantab.net
4244L: linux-ntfs-dev@lists.sourceforge.net 3648L: linux-ntfs-dev@lists.sourceforge.net
4245W: http://www.linux-ntfs.org/ 3649W: http://www.linux-ntfs.org/
4246T: git git://git.kernel.org/pub/scm/linux/kernel/git/aia21/ntfs-2.6.git 3650T: git git://git.kernel.org/pub/scm/linux/kernel/git/aia21/ntfs-2.6.git
@@ -4249,16 +3653,14 @@ F: Documentation/filesystems/ntfs.txt
4249F: fs/ntfs/ 3653F: fs/ntfs/
4250 3654
4251NVIDIA (rivafb and nvidiafb) FRAMEBUFFER DRIVER 3655NVIDIA (rivafb and nvidiafb) FRAMEBUFFER DRIVER
4252P: Antonino Daplas 3656M: Antonino Daplas <adaplas@gmail.com>
4253M: adaplas@gmail.com
4254L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers) 3657L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers)
4255S: Maintained 3658S: Maintained
4256F: drivers/video/riva/ 3659F: drivers/video/riva/
4257F: drivers/video/nvidia/ 3660F: drivers/video/nvidia/
4258 3661
4259OMAP SUPPORT 3662OMAP SUPPORT
4260P: Tony Lindgren <tony@atomide.com> 3663M: "Tony Lindgren <tony@atomide.com>" <tony@atomide.com>
4261M: tony@atomide.com
4262L: linux-omap@vger.kernel.org 3664L: linux-omap@vger.kernel.org
4263W: http://www.muru.com/linux/omap/ 3665W: http://www.muru.com/linux/omap/
4264W: http://linux.omap.com/ 3666W: http://linux.omap.com/
@@ -4267,98 +3669,83 @@ S: Maintained
4267F: arch/arm/*omap* 3669F: arch/arm/*omap*
4268 3670
4269OMAP CLOCK FRAMEWORK SUPPORT 3671OMAP CLOCK FRAMEWORK SUPPORT
4270P: Paul Walmsley 3672M: Paul Walmsley <paul@pwsan.com>
4271M: paul@pwsan.com
4272L: linux-omap@vger.kernel.org 3673L: linux-omap@vger.kernel.org
4273S: Maintained 3674S: Maintained
4274F: arch/arm/*omap*/*clock* 3675F: arch/arm/*omap*/*clock*
4275 3676
4276OMAP POWER MANAGEMENT SUPPORT 3677OMAP POWER MANAGEMENT SUPPORT
4277P: Kevin Hilman 3678M: Kevin Hilman <khilman@deeprootsystems.com>
4278M: khilman@deeprootsystems.com
4279L: linux-omap@vger.kernel.org 3679L: linux-omap@vger.kernel.org
4280S: Maintained 3680S: Maintained
4281F: arch/arm/*omap*/*pm* 3681F: arch/arm/*omap*/*pm*
4282 3682
4283OMAP AUDIO SUPPORT 3683OMAP AUDIO SUPPORT
4284P: Jarkko Nikula 3684M: Jarkko Nikula <jhnikula@gmail.com>
4285M: jhnikula@gmail.com
4286L: alsa-devel@alsa-project.org (subscribers-only) 3685L: alsa-devel@alsa-project.org (subscribers-only)
4287L: linux-omap@vger.kernel.org 3686L: linux-omap@vger.kernel.org
4288S: Maintained 3687S: Maintained
4289F: sound/soc/omap/ 3688F: sound/soc/omap/
4290 3689
4291OMAP FRAMEBUFFER SUPPORT 3690OMAP FRAMEBUFFER SUPPORT
4292P: Imre Deak 3691M: Imre Deak <imre.deak@nokia.com>
4293M: imre.deak@nokia.com
4294L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers) 3692L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers)
4295L: linux-omap@vger.kernel.org 3693L: linux-omap@vger.kernel.org
4296S: Maintained 3694S: Maintained
4297F: drivers/video/omap/ 3695F: drivers/video/omap/
4298 3696
4299OMAP MMC SUPPORT 3697OMAP MMC SUPPORT
4300P: Jarkko Lavinen 3698M: Jarkko Lavinen <jarkko.lavinen@nokia.com>
4301M: jarkko.lavinen@nokia.com
4302L: linux-kernel@vger.kernel.org
4303L: linux-omap@vger.kernel.org 3699L: linux-omap@vger.kernel.org
4304S: Maintained 3700S: Maintained
4305F: drivers/mmc/host/*omap* 3701F: drivers/mmc/host/*omap*
4306 3702
4307OMAP RANDOM NUMBER GENERATOR SUPPORT 3703OMAP RANDOM NUMBER GENERATOR SUPPORT
4308P: Deepak Saxena 3704M: Deepak Saxena <dsaxena@plexity.net>
4309M: dsaxena@plexity.net
4310S: Maintained 3705S: Maintained
4311F: drivers/char/hw_random/omap-rng.c 3706F: drivers/char/hw_random/omap-rng.c
4312 3707
4313OMAP USB SUPPORT 3708OMAP USB SUPPORT
4314P: Felipe Balbi 3709M: Felipe Balbi <felipe.balbi@nokia.com>
4315M: felipe.balbi@nokia.com 3710M: David Brownell <dbrownell@users.sourceforge.net>
4316P: David Brownell
4317M: dbrownell@users.sourceforge.net
4318L: linux-usb@vger.kernel.org 3711L: linux-usb@vger.kernel.org
4319L: linux-omap@vger.kernel.org 3712L: linux-omap@vger.kernel.org
4320S: Maintained 3713S: Maintained
4321 3714
4322OMFS FILESYSTEM 3715OMFS FILESYSTEM
4323P: Bob Copeland 3716M: Bob Copeland <me@bobcopeland.com>
4324M: me@bobcopeland.com
4325L: linux-karma-devel@lists.sourceforge.net 3717L: linux-karma-devel@lists.sourceforge.net
4326S: Maintained 3718S: Maintained
4327F: Documentation/filesystems/omfs.txt 3719F: Documentation/filesystems/omfs.txt
4328F: fs/omfs/ 3720F: fs/omfs/
4329 3721
4330OMNIKEY CARDMAN 4000 DRIVER 3722OMNIKEY CARDMAN 4000 DRIVER
4331P: Harald Welte 3723M: Harald Welte <laforge@gnumonks.org>
4332M: laforge@gnumonks.org
4333S: Maintained 3724S: Maintained
4334F: drivers/char/pcmcia/cm4000_cs.c 3725F: drivers/char/pcmcia/cm4000_cs.c
4335F: include/linux/cm4000_cs.h 3726F: include/linux/cm4000_cs.h
4336 3727
4337OMNIKEY CARDMAN 4040 DRIVER 3728OMNIKEY CARDMAN 4040 DRIVER
4338P: Harald Welte 3729M: Harald Welte <laforge@gnumonks.org>
4339M: laforge@gnumonks.org
4340S: Maintained 3730S: Maintained
4341F: drivers/char/pcmcia/cm4040_cs.* 3731F: drivers/char/pcmcia/cm4040_cs.*
4342 3732
4343OMNIVISION OV7670 SENSOR DRIVER 3733OMNIVISION OV7670 SENSOR DRIVER
4344P: Jonathan Corbet 3734M: Jonathan Corbet <corbet@lwn.net>
4345M: corbet@lwn.net
4346L: linux-media@vger.kernel.org 3735L: linux-media@vger.kernel.org
4347T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 3736T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
4348S: Maintained 3737S: Maintained
4349F: drivers/media/video/ov7670.c 3738F: drivers/media/video/ov7670.c
4350 3739
4351ONENAND FLASH DRIVER 3740ONENAND FLASH DRIVER
4352P: Kyungmin Park 3741M: Kyungmin Park <kyungmin.park@samsung.com>
4353M: kyungmin.park@samsung.com
4354L: linux-mtd@lists.infradead.org 3742L: linux-mtd@lists.infradead.org
4355S: Maintained 3743S: Maintained
4356F: drivers/mtd/onenand/ 3744F: drivers/mtd/onenand/
4357F: include/linux/mtd/onenand*.h 3745F: include/linux/mtd/onenand*.h
4358 3746
4359ONSTREAM SCSI TAPE DRIVER 3747ONSTREAM SCSI TAPE DRIVER
4360P: Willem Riede 3748M: Willem Riede <osst@riede.org>
4361M: osst@riede.org
4362L: osst-users@lists.sourceforge.net 3749L: osst-users@lists.sourceforge.net
4363L: linux-scsi@vger.kernel.org 3750L: linux-scsi@vger.kernel.org
4364S: Maintained 3751S: Maintained
@@ -4366,16 +3753,14 @@ F: drivers/scsi/osst*
4366F: drivers/scsi/st* 3753F: drivers/scsi/st*
4367 3754
4368OPENCORES I2C BUS DRIVER 3755OPENCORES I2C BUS DRIVER
4369P: Peter Korsgaard 3756M: Peter Korsgaard <jacmet@sunsite.dk>
4370M: jacmet@sunsite.dk
4371L: linux-i2c@vger.kernel.org 3757L: linux-i2c@vger.kernel.org
4372S: Maintained 3758S: Maintained
4373F: Documentation/i2c/busses/i2c-ocores 3759F: Documentation/i2c/busses/i2c-ocores
4374F: drivers/i2c/busses/i2c-ocores.c 3760F: drivers/i2c/busses/i2c-ocores.c
4375 3761
4376OPROFILE 3762OPROFILE
4377P: Robert Richter 3763M: Robert Richter <robert.richter@amd.com>
4378M: robert.richter@amd.com
4379L: oprofile-list@lists.sf.net 3764L: oprofile-list@lists.sf.net
4380S: Maintained 3765S: Maintained
4381F: arch/*/oprofile/ 3766F: arch/*/oprofile/
@@ -4383,10 +3768,8 @@ F: drivers/oprofile/
4383F: include/linux/oprofile.h 3768F: include/linux/oprofile.h
4384 3769
4385ORACLE CLUSTER FILESYSTEM 2 (OCFS2) 3770ORACLE CLUSTER FILESYSTEM 2 (OCFS2)
4386P: Mark Fasheh 3771M: Mark Fasheh <mfasheh@suse.com>
4387M: mfasheh@suse.com 3772M: Joel Becker <joel.becker@oracle.com>
4388P: Joel Becker
4389M: joel.becker@oracle.com
4390L: ocfs2-devel@oss.oracle.com (moderated for non-subscribers) 3773L: ocfs2-devel@oss.oracle.com (moderated for non-subscribers)
4391W: http://oss.oracle.com/projects/ocfs2/ 3774W: http://oss.oracle.com/projects/ocfs2/
4392T: git git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2.git 3775T: git git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2.git
@@ -4396,10 +3779,8 @@ F: Documentation/filesystems/dlmfs.txt
4396F: fs/ocfs2/ 3779F: fs/ocfs2/
4397 3780
4398ORINOCO DRIVER 3781ORINOCO DRIVER
4399P: Pavel Roskin 3782M: Pavel Roskin <proski@gnu.org>
4400M: proski@gnu.org 3783M: David Gibson <hermes@gibson.dropbear.id.au>
4401P: David Gibson
4402M: hermes@gibson.dropbear.id.au
4403L: linux-wireless@vger.kernel.org 3784L: linux-wireless@vger.kernel.org
4404L: orinoco-users@lists.sourceforge.net 3785L: orinoco-users@lists.sourceforge.net
4405L: orinoco-devel@lists.sourceforge.net 3786L: orinoco-devel@lists.sourceforge.net
@@ -4408,10 +3789,8 @@ S: Maintained
4408F: drivers/net/wireless/orinoco/ 3789F: drivers/net/wireless/orinoco/
4409 3790
4410OSD LIBRARY and FILESYSTEM 3791OSD LIBRARY and FILESYSTEM
4411P: Boaz Harrosh 3792M: Boaz Harrosh <bharrosh@panasas.com>
4412M: bharrosh@panasas.com 3793M: Benny Halevy <bhalevy@panasas.com>
4413P: Benny Halevy
4414M: bhalevy@panasas.com
4415L: osd-dev@open-osd.org 3794L: osd-dev@open-osd.org
4416W: http://open-osd.org 3795W: http://open-osd.org
4417T: git git://git.open-osd.org/open-osd.git 3796T: git git://git.open-osd.org/open-osd.git
@@ -4421,8 +3800,7 @@ F: drivers/include/scsi/osd_*
4421F: fs/exofs/ 3800F: fs/exofs/
4422 3801
4423P54 WIRELESS DRIVER 3802P54 WIRELESS DRIVER
4424P: Michael Wu 3803M: Michael Wu <flamingice@sourmilk.net>
4425M: flamingice@sourmilk.net
4426L: linux-wireless@vger.kernel.org 3804L: linux-wireless@vger.kernel.org
4427W: http://prism54.org 3805W: http://prism54.org
4428T: git git://git.kernel.org/pub/scm/linux/kernel/git/mwu/mac80211-drivers.git 3806T: git git://git.kernel.org/pub/scm/linux/kernel/git/mwu/mac80211-drivers.git
@@ -4430,30 +3808,25 @@ S: Maintained
4430F: drivers/net/wireless/p54/ 3808F: drivers/net/wireless/p54/
4431 3809
4432PA SEMI ETHERNET DRIVER 3810PA SEMI ETHERNET DRIVER
4433P: Olof Johansson 3811M: Olof Johansson <olof@lixom.net>
4434M: olof@lixom.net
4435L: netdev@vger.kernel.org 3812L: netdev@vger.kernel.org
4436S: Maintained 3813S: Maintained
4437F: drivers/net/pasemi_mac.* 3814F: drivers/net/pasemi_mac.*
4438 3815
4439PA SEMI SMBUS DRIVER 3816PA SEMI SMBUS DRIVER
4440P: Olof Johansson 3817M: Olof Johansson <olof@lixom.net>
4441M: olof@lixom.net
4442L: linux-i2c@vger.kernel.org 3818L: linux-i2c@vger.kernel.org
4443S: Maintained 3819S: Maintained
4444F: drivers/i2c/busses/i2c-pasemi.c 3820F: drivers/i2c/busses/i2c-pasemi.c
4445 3821
4446PANASONIC LAPTOP ACPI EXTRAS DRIVER 3822PANASONIC LAPTOP ACPI EXTRAS DRIVER
4447P: Harald Welte 3823M: Harald Welte <laforge@gnumonks.org>
4448M: laforge@gnumonks.org
4449S: Maintained 3824S: Maintained
4450F: drivers/platform/x86/panasonic-laptop.c 3825F: drivers/platform/x86/panasonic-laptop.c
4451 3826
4452PANASONIC MN10300/AM33 PORT 3827PANASONIC MN10300/AM33 PORT
4453P: David Howells 3828M: David Howells <dhowells@redhat.com>
4454M: dhowells@redhat.com 3829M: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
4455P: Koichi Yasutake
4456M: yasutake.koichi@jp.panasonic.com
4457L: linux-am33-list@redhat.com (moderated for non-subscribers) 3830L: linux-am33-list@redhat.com (moderated for non-subscribers)
4458W: ftp://ftp.redhat.com/pub/redhat/gnupro/AM33/ 3831W: ftp://ftp.redhat.com/pub/redhat/gnupro/AM33/
4459S: Maintained 3832S: Maintained
@@ -4469,14 +3842,10 @@ F: drivers/char/ppdev.c
4469F: include/linux/ppdev.h 3842F: include/linux/ppdev.h
4470 3843
4471PARAVIRT_OPS INTERFACE 3844PARAVIRT_OPS INTERFACE
4472P: Jeremy Fitzhardinge 3845M: Jeremy Fitzhardinge <jeremy@xensource.com>
4473M: jeremy@xensource.com 3846M: Chris Wright <chrisw@sous-sol.org>
4474P: Chris Wright 3847M: Alok Kataria <akataria@vmware.com>
4475M: chrisw@sous-sol.org 3848M: Rusty Russell <rusty@rustcorp.com.au>
4476P: Alok Kataria
4477M: akataria@vmware.com
4478P: Rusty Russell
4479M: rusty@rustcorp.com.au
4480L: virtualization@lists.osdl.org 3849L: virtualization@lists.osdl.org
4481S: Supported 3850S: Supported
4482F: Documentation/ia64/paravirt_ops.txt 3851F: Documentation/ia64/paravirt_ops.txt
@@ -4484,8 +3853,7 @@ F: arch/*/kernel/paravirt*
4484F: arch/*/include/asm/paravirt.h 3853F: arch/*/include/asm/paravirt.h
4485 3854
4486PARIDE DRIVERS FOR PARALLEL PORT IDE DEVICES 3855PARIDE DRIVERS FOR PARALLEL PORT IDE DEVICES
4487P: Tim Waugh 3856M: Tim Waugh <tim@cyberelk.net>
4488M: tim@cyberelk.net
4489L: linux-parport@lists.infradead.org (subscribers-only) 3857L: linux-parport@lists.infradead.org (subscribers-only)
4490W: http://www.torque.net/linux-pp.html 3858W: http://www.torque.net/linux-pp.html
4491S: Maintained 3859S: Maintained
@@ -4493,10 +3861,8 @@ F: Documentation/blockdev/paride.txt
4493F: drivers/block/paride/ 3861F: drivers/block/paride/
4494 3862
4495PARISC ARCHITECTURE 3863PARISC ARCHITECTURE
4496P: Kyle McMartin 3864M: Kyle McMartin <kyle@mcmartin.ca>
4497M: kyle@mcmartin.ca 3865M: Helge Deller <deller@gmx.de>
4498P: Helge Deller
4499M: deller@gmx.de
4500L: linux-parisc@vger.kernel.org 3866L: linux-parisc@vger.kernel.org
4501W: http://www.parisc-linux.org/ 3867W: http://www.parisc-linux.org/
4502T: git git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6.git 3868T: git git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6.git
@@ -4505,37 +3871,32 @@ F: arch/parisc/
4505F: drivers/parisc/ 3871F: drivers/parisc/
4506 3872
4507PC87360 HARDWARE MONITORING DRIVER 3873PC87360 HARDWARE MONITORING DRIVER
4508P: Jim Cromie 3874M: Jim Cromie <jim.cromie@gmail.com>
4509M: jim.cromie@gmail.com
4510L: lm-sensors@lm-sensors.org 3875L: lm-sensors@lm-sensors.org
4511S: Maintained 3876S: Maintained
4512F: Documentation/hwmon/pc87360 3877F: Documentation/hwmon/pc87360
4513F: drivers/hwmon/pc87360.c 3878F: drivers/hwmon/pc87360.c
4514 3879
4515PC8736x GPIO DRIVER 3880PC8736x GPIO DRIVER
4516P: Jim Cromie 3881M: Jim Cromie <jim.cromie@gmail.com>
4517M: jim.cromie@gmail.com
4518S: Maintained 3882S: Maintained
4519F: drivers/char/pc8736x_gpio.c 3883F: drivers/char/pc8736x_gpio.c
4520 3884
4521PCA9532 LED DRIVER 3885PCA9532 LED DRIVER
4522P: Riku Voipio 3886M: Riku Voipio <riku.voipio@iki.fi>
4523M: riku.voipio@iki.fi
4524S: Maintained 3887S: Maintained
4525F: drivers/leds/leds-pca9532.c 3888F: drivers/leds/leds-pca9532.c
4526F: include/linux/leds-pca9532.h 3889F: include/linux/leds-pca9532.h
4527 3890
4528PCI ERROR RECOVERY 3891PCI ERROR RECOVERY
4529P: Linas Vepstas 3892M: Linas Vepstas <linas@austin.ibm.com>
4530M: linas@austin.ibm.com
4531L: linux-pci@vger.kernel.org 3893L: linux-pci@vger.kernel.org
4532S: Supported 3894S: Supported
4533F: Documentation/PCI/pci-error-recovery.txt 3895F: Documentation/PCI/pci-error-recovery.txt
4534F: Documentation/powerpc/eeh-pci-error-recovery.txt 3896F: Documentation/powerpc/eeh-pci-error-recovery.txt
4535 3897
4536PCI SUBSYSTEM 3898PCI SUBSYSTEM
4537P: Jesse Barnes 3899M: Jesse Barnes <jbarnes@virtuousgeek.org>
4538M: jbarnes@virtuousgeek.org
4539L: linux-pci@vger.kernel.org 3900L: linux-pci@vger.kernel.org
4540T: git git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6.git 3901T: git git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6.git
4541S: Supported 3902S: Supported
@@ -4544,8 +3905,7 @@ F: drivers/pci/
4544F: include/linux/pci* 3905F: include/linux/pci*
4545 3906
4546PCIE HOTPLUG DRIVER 3907PCIE HOTPLUG DRIVER
4547P: Kristen Carlson Accardi 3908M: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
4548M: kristen.c.accardi@intel.com
4549L: linux-pci@vger.kernel.org 3909L: linux-pci@vger.kernel.org
4550S: Supported 3910S: Supported
4551F: drivers/pci/pcie/ 3911F: drivers/pci/pcie/
@@ -4561,121 +3921,103 @@ F: drivers/pcmcia/
4561F: include/pcmcia/ 3921F: include/pcmcia/
4562 3922
4563PCNET32 NETWORK DRIVER 3923PCNET32 NETWORK DRIVER
4564P: Don Fry 3924M: Don Fry <pcnet32@verizon.net>
4565M: pcnet32@verizon.net
4566L: netdev@vger.kernel.org 3925L: netdev@vger.kernel.org
4567S: Maintained 3926S: Maintained
4568F: drivers/net/pcnet32.c 3927F: drivers/net/pcnet32.c
4569 3928
4570PER-TASK DELAY ACCOUNTING 3929PER-TASK DELAY ACCOUNTING
4571P: Balbir Singh 3930M: Balbir Singh <balbir@linux.vnet.ibm.com>
4572M: balbir@linux.vnet.ibm.com
4573S: Maintained 3931S: Maintained
4574F: include/linux/delayacct.h 3932F: include/linux/delayacct.h
4575F: kernel/delayacct.c 3933F: kernel/delayacct.c
4576 3934
4577PERFORMANCE COUNTER SUBSYSTEM 3935PERFORMANCE COUNTER SUBSYSTEM
4578P: Peter Zijlstra 3936M: Peter Zijlstra <a.p.zijlstra@chello.nl>
4579M: a.p.zijlstra@chello.nl 3937M: Paul Mackerras <paulus@samba.org>
4580P: Paul Mackerras 3938M: Ingo Molnar <mingo@elte.hu>
4581M: paulus@samba.org
4582P: Ingo Molnar
4583M: mingo@elte.hu
4584L: linux-kernel@vger.kernel.org
4585S: Supported 3939S: Supported
4586 3940
4587PERSONALITY HANDLING 3941PERSONALITY HANDLING
4588P: Christoph Hellwig 3942M: Christoph Hellwig <hch@infradead.org>
4589M: hch@infradead.org
4590L: linux-abi-devel@lists.sourceforge.net 3943L: linux-abi-devel@lists.sourceforge.net
4591S: Maintained 3944S: Maintained
4592F: include/linux/personality.h 3945F: include/linux/personality.h
4593 3946
4594PHRAM MTD DRIVER 3947PHRAM MTD DRIVER
4595P: Joern Engel 3948M: Joern Engel <joern@lazybastard.org>
4596M: joern@lazybastard.org
4597L: linux-mtd@lists.infradead.org 3949L: linux-mtd@lists.infradead.org
4598S: Maintained 3950S: Maintained
4599F: drivers/mtd/devices/phram.c 3951F: drivers/mtd/devices/phram.c
4600 3952
4601PKTCDVD DRIVER 3953PKTCDVD DRIVER
4602P: Peter Osterlund 3954M: Peter Osterlund <petero2@telia.com>
4603M: petero2@telia.com
4604S: Maintained 3955S: Maintained
4605F: drivers/block/pktcdvd.c 3956F: drivers/block/pktcdvd.c
4606F: include/linux/pktcdvd.h 3957F: include/linux/pktcdvd.h
4607 3958
4608POSIX CLOCKS and TIMERS 3959POSIX CLOCKS and TIMERS
4609P: Thomas Gleixner 3960M: Thomas Gleixner <tglx@linutronix.de>
4610M: tglx@linutronix.de
4611S: Supported 3961S: Supported
4612F: fs/timerfd.c 3962F: fs/timerfd.c
4613F: include/linux/timer* 3963F: include/linux/timer*
4614F: kernel/*timer* 3964F: kernel/*timer*
4615 3965
4616POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS 3966POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS
4617P: Anton Vorontsov 3967M: Anton Vorontsov <cbou@mail.ru>
4618M: cbou@mail.ru 3968M: David Woodhouse <dwmw2@infradead.org>
4619P: David Woodhouse
4620M: dwmw2@infradead.org
4621T: git git://git.infradead.org/battery-2.6.git 3969T: git git://git.infradead.org/battery-2.6.git
4622S: Maintained 3970S: Maintained
4623F: include/linux/power_supply.h 3971F: include/linux/power_supply.h
4624F: drivers/power/power_supply* 3972F: drivers/power/power_supply*
4625 3973
4626PNP SUPPORT 3974PNP SUPPORT
4627P: Adam Belay 3975M: Adam Belay <abelay@mit.edu>
4628M: abelay@mit.edu 3976M: Bjorn Helgaas <bjorn.helgaas@hp.com>
4629P: Bjorn Helgaas
4630M: bjorn.helgaas@hp.com
4631S: Maintained 3977S: Maintained
4632F: drivers/pnp/ 3978F: drivers/pnp/
4633 3979
4634PNXxxxx I2C DRIVER 3980PNXxxxx I2C DRIVER
4635P: Vitaly Wool 3981M: Vitaly Wool <vitalywool@gmail.com>
4636M: vitalywool@gmail.com
4637L: linux-i2c@vger.kernel.org 3982L: linux-i2c@vger.kernel.org
4638S: Maintained 3983S: Maintained
4639F: drivers/i2c/busses/i2c-pnx.c 3984F: drivers/i2c/busses/i2c-pnx.c
4640 3985
4641PPP PROTOCOL DRIVERS AND COMPRESSORS 3986PPP PROTOCOL DRIVERS AND COMPRESSORS
4642P: Paul Mackerras 3987M: Paul Mackerras <paulus@samba.org>
4643M: paulus@samba.org
4644L: linux-ppp@vger.kernel.org 3988L: linux-ppp@vger.kernel.org
4645S: Maintained 3989S: Maintained
4646F: drivers/net/ppp_* 3990F: drivers/net/ppp_*
4647 3991
4648PPP OVER ATM (RFC 2364) 3992PPP OVER ATM (RFC 2364)
4649P: Mitchell Blank Jr 3993M: Mitchell Blank Jr <mitch@sfgoth.com>
4650M: mitch@sfgoth.com
4651S: Maintained 3994S: Maintained
4652F: net/atm/pppoatm.c 3995F: net/atm/pppoatm.c
4653F: include/linux/atmppp.h 3996F: include/linux/atmppp.h
4654 3997
4655PPP OVER ETHERNET 3998PPP OVER ETHERNET
4656P: Michal Ostrowski 3999M: Michal Ostrowski <mostrows@earthlink.net>
4657M: mostrows@earthlink.net
4658S: Maintained 4000S: Maintained
4659F: drivers/net/pppoe.c 4001F: drivers/net/pppoe.c
4660F: drivers/net/pppox.c 4002F: drivers/net/pppox.c
4661 4003
4662PPP OVER L2TP 4004PPP OVER L2TP
4663P: James Chapman 4005M: James Chapman <jchapman@katalix.com>
4664M: jchapman@katalix.com
4665S: Maintained 4006S: Maintained
4666F: drivers/net/pppol2tp.c 4007F: drivers/net/pppol2tp.c
4667F: include/linux/if_pppol2tp.h 4008F: include/linux/if_pppol2tp.h
4668 4009
4669PPS SUPPORT 4010PPS SUPPORT
4670P: Rodolfo Giometti 4011M: Rodolfo Giometti <giometti@enneenne.com>
4671M: giometti@enneenne.com
4672W: http://wiki.enneenne.com/index.php/LinuxPPS_support 4012W: http://wiki.enneenne.com/index.php/LinuxPPS_support
4673L: linuxpps@ml.enneenne.com (subscribers-only) 4013L: linuxpps@ml.enneenne.com (subscribers-only)
4674S: Maintained 4014S: Maintained
4015F: Documentation/pps/
4016F: drivers/pps/
4017F: include/linux/pps*.h
4675 4018
4676PREEMPTIBLE KERNEL 4019PREEMPTIBLE KERNEL
4677P: Robert Love 4020M: Robert Love <rml@tech9.net>
4678M: rml@tech9.net
4679L: kpreempt-tech@lists.sourceforge.net 4021L: kpreempt-tech@lists.sourceforge.net
4680W: ftp://ftp.kernel.org/pub/linux/kernel/people/rml/preempt-kernel 4022W: ftp://ftp.kernel.org/pub/linux/kernel/people/rml/preempt-kernel
4681S: Supported 4023S: Supported
@@ -4683,37 +4025,32 @@ F: Documentation/preempt-locking.txt
4683F: include/linux/preempt.h 4025F: include/linux/preempt.h
4684 4026
4685PRISM54 WIRELESS DRIVER 4027PRISM54 WIRELESS DRIVER
4686P: Luis R. Rodriguez 4028M: "Luis R. Rodriguez" <mcgrof@gmail.com>
4687M: mcgrof@gmail.com
4688L: linux-wireless@vger.kernel.org 4029L: linux-wireless@vger.kernel.org
4689W: http://prism54.org 4030W: http://prism54.org
4690S: Maintained 4031S: Maintained
4691F: drivers/net/wireless/prism54/ 4032F: drivers/net/wireless/prism54/
4692 4033
4693PROMISE DC4030 CACHING DISK CONTROLLER DRIVER 4034PROMISE DC4030 CACHING DISK CONTROLLER DRIVER
4694P: Peter Denison 4035M: Peter Denison <promise@pnd-pc.demon.co.uk>
4695M: promise@pnd-pc.demon.co.uk
4696W: http://www.pnd-pc.demon.co.uk/promise/ 4036W: http://www.pnd-pc.demon.co.uk/promise/
4697S: Maintained 4037S: Maintained
4698 4038
4699PROMISE SATA TX2/TX4 CONTROLLER LIBATA DRIVER 4039PROMISE SATA TX2/TX4 CONTROLLER LIBATA DRIVER
4700P: Mikael Pettersson 4040M: Mikael Pettersson <mikpe@it.uu.se>
4701M: mikpe@it.uu.se
4702L: linux-ide@vger.kernel.org 4041L: linux-ide@vger.kernel.org
4703S: Maintained 4042S: Maintained
4704F: drivers/ata/sata_promise.* 4043F: drivers/ata/sata_promise.*
4705 4044
4706PS3 NETWORK SUPPORT 4045PS3 NETWORK SUPPORT
4707P: Geoff Levand 4046M: Geoff Levand <geoffrey.levand@am.sony.com>
4708M: geoffrey.levand@am.sony.com
4709L: netdev@vger.kernel.org 4047L: netdev@vger.kernel.org
4710L: cbe-oss-dev@ozlabs.org 4048L: cbe-oss-dev@ozlabs.org
4711S: Supported 4049S: Supported
4712F: drivers/net/ps3_gelic_net.* 4050F: drivers/net/ps3_gelic_net.*
4713 4051
4714PS3 PLATFORM SUPPORT 4052PS3 PLATFORM SUPPORT
4715P: Geoff Levand 4053M: Geoff Levand <geoffrey.levand@am.sony.com>
4716M: geoffrey.levand@am.sony.com
4717L: linuxppc-dev@ozlabs.org 4054L: linuxppc-dev@ozlabs.org
4718L: cbe-oss-dev@ozlabs.org 4055L: cbe-oss-dev@ozlabs.org
4719S: Supported 4056S: Supported
@@ -4728,16 +4065,13 @@ F: drivers/usb/host/*ps3.c
4728F: sound/ppc/snd_ps3* 4065F: sound/ppc/snd_ps3*
4729 4066
4730PS3VRAM DRIVER 4067PS3VRAM DRIVER
4731P: Jim Paris 4068M: Jim Paris <jim@jtan.com>
4732M: jim@jtan.com
4733L: cbe-oss-dev@ozlabs.org 4069L: cbe-oss-dev@ozlabs.org
4734S: Maintained 4070S: Maintained
4735 4071
4736PTRACE SUPPORT 4072PTRACE SUPPORT
4737P: Roland McGrath 4073M: Roland McGrath <roland@redhat.com>
4738M: roland@redhat.com 4074M: Oleg Nesterov <oleg@redhat.com>
4739P: Oleg Nesterov
4740M: oleg@redhat.com
4741S: Maintained 4075S: Maintained
4742F: include/asm-generic/syscall.h 4076F: include/asm-generic/syscall.h
4743F: include/linux/ptrace.h 4077F: include/linux/ptrace.h
@@ -4746,8 +4080,7 @@ F: include/linux/tracehook.h
4746F: kernel/ptrace.c 4080F: kernel/ptrace.c
4747 4081
4748PVRUSB2 VIDEO4LINUX DRIVER 4082PVRUSB2 VIDEO4LINUX DRIVER
4749P: Mike Isely 4083M: Mike Isely <isely@pobox.com>
4750M: isely@pobox.com
4751L: pvrusb2@isely.net (subscribers-only) 4084L: pvrusb2@isely.net (subscribers-only)
4752L: linux-media@vger.kernel.org 4085L: linux-media@vger.kernel.org
4753W: http://www.isely.net/pvrusb2/ 4086W: http://www.isely.net/pvrusb2/
@@ -4757,10 +4090,8 @@ F: Documentation/video4linux/README.pvrusb2
4757F: drivers/media/video/pvrusb2/ 4090F: drivers/media/video/pvrusb2/
4758 4091
4759PXA2xx/PXA3xx SUPPORT 4092PXA2xx/PXA3xx SUPPORT
4760P: Eric Miao 4093M: Eric Miao <eric.y.miao@gmail.com>
4761M: eric.y.miao@gmail.com 4094M: Russell King <linux@arm.linux.org.uk>
4762P: Russell King
4763M: linux@arm.linux.org.uk
4764L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 4095L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
4765S: Maintained 4096S: Maintained
4766F: arch/arm/mach-pxa/ 4097F: arch/arm/mach-pxa/
@@ -4772,17 +4103,14 @@ F: sound/arm/pxa*
4772F: sound/soc/pxa 4103F: sound/soc/pxa
4773 4104
4774PXA168 SUPPORT 4105PXA168 SUPPORT
4775P: Eric Miao 4106M: Eric Miao <eric.y.miao@gmail.com>
4776M: eric.y.miao@gmail.com 4107M: Jason Chagas <jason.chagas@marvell.com>
4777P: Jason Chagas
4778M: jason.chagas@marvell.com
4779L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 4108L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
4780T: git git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6.git 4109T: git git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6.git
4781S: Maintained 4110S: Maintained
4782 4111
4783PXA910 SUPPORT 4112PXA910 SUPPORT
4784P: Eric Miao 4113M: Eric Miao <eric.y.miao@gmail.com>
4785M: eric.y.miao@gmail.com
4786L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 4114L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
4787T: git git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6.git 4115T: git git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6.git
4788S: Maintained 4116S: Maintained
@@ -4791,13 +4119,12 @@ PXA MMCI DRIVER
4791S: Orphan 4119S: Orphan
4792 4120
4793PXA RTC DRIVER 4121PXA RTC DRIVER
4794P: Robert Jarzmik 4122M: Robert Jarzmik <robert.jarzmik@free.fr>
4795M: robert.jarzmik@free.fr
4796L: rtc-linux@googlegroups.com 4123L: rtc-linux@googlegroups.com
4797S: Maintained 4124S: Maintained
4798 4125
4799QLOGIC QLA2XXX FC-SCSI DRIVER 4126QLOGIC QLA2XXX FC-SCSI DRIVER
4800P: Andrew Vasquez 4127M: Andrew Vasquez <andrew.vasquez@qlogic.com>
4801M: linux-driver@qlogic.com 4128M: linux-driver@qlogic.com
4802L: linux-scsi@vger.kernel.org 4129L: linux-scsi@vger.kernel.org
4803S: Supported 4130S: Supported
@@ -4805,7 +4132,7 @@ F: Documentation/scsi/LICENSE.qla2xxx
4805F: drivers/scsi/qla2xxx/ 4132F: drivers/scsi/qla2xxx/
4806 4133
4807QLOGIC QLA3XXX NETWORK DRIVER 4134QLOGIC QLA3XXX NETWORK DRIVER
4808P: Ron Mercer 4135M: Ron Mercer <ron.mercer@qlogic.com>
4809M: linux-driver@qlogic.com 4136M: linux-driver@qlogic.com
4810L: netdev@vger.kernel.org 4137L: netdev@vger.kernel.org
4811S: Supported 4138S: Supported
@@ -4813,16 +4140,14 @@ F: Documentation/networking/LICENSE.qla3xxx
4813F: drivers/net/qla3xxx.* 4140F: drivers/net/qla3xxx.*
4814 4141
4815QLOGIC QLGE 10Gb ETHERNET DRIVER 4142QLOGIC QLGE 10Gb ETHERNET DRIVER
4816P: Ron Mercer 4143M: Ron Mercer <ron.mercer@qlogic.com>
4817M: linux-driver@qlogic.com 4144M: linux-driver@qlogic.com
4818M: ron.mercer@qlogic.com
4819L: netdev@vger.kernel.org 4145L: netdev@vger.kernel.org
4820S: Supported 4146S: Supported
4821F: drivers/net/qlge/ 4147F: drivers/net/qlge/
4822 4148
4823QNX4 FILESYSTEM 4149QNX4 FILESYSTEM
4824P: Anders Larsen 4150M: Anders Larsen <al@alarsen.net>
4825M: al@alarsen.net
4826W: http://www.alarsen.net/linux/qnx4fs/ 4151W: http://www.alarsen.net/linux/qnx4fs/
4827S: Maintained 4152S: Maintained
4828F: fs/qnx4/ 4153F: fs/qnx4/
@@ -4830,16 +4155,14 @@ F: include/linux/qnx4_fs.h
4830F: include/linux/qnxtypes.h 4155F: include/linux/qnxtypes.h
4831 4156
4832RADEON FRAMEBUFFER DISPLAY DRIVER 4157RADEON FRAMEBUFFER DISPLAY DRIVER
4833P: Benjamin Herrenschmidt 4158M: Benjamin Herrenschmidt <benh@kernel.crashing.org>
4834M: benh@kernel.crashing.org
4835L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers) 4159L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers)
4836S: Maintained 4160S: Maintained
4837F: drivers/video/aty/radeon* 4161F: drivers/video/aty/radeon*
4838F: include/linux/radeonfb.h 4162F: include/linux/radeonfb.h
4839 4163
4840RAGE128 FRAMEBUFFER DISPLAY DRIVER 4164RAGE128 FRAMEBUFFER DISPLAY DRIVER
4841P: Paul Mackerras 4165M: Paul Mackerras <paulus@samba.org>
4842M: paulus@samba.org
4843L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers) 4166L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers)
4844S: Maintained 4167S: Maintained
4845F: drivers/video/aty/aty128fb.c 4168F: drivers/video/aty/aty128fb.c
@@ -4854,64 +4177,53 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git
4854F: drivers/net/wireless/rt2x00/ 4177F: drivers/net/wireless/rt2x00/
4855 4178
4856RAMDISK RAM BLOCK DEVICE DRIVER 4179RAMDISK RAM BLOCK DEVICE DRIVER
4857P: Nick Piggin 4180M: Nick Piggin <npiggin@suse.de>
4858M: npiggin@suse.de
4859S: Maintained 4181S: Maintained
4860F: Documentation/blockdev/ramdisk.txt 4182F: Documentation/blockdev/ramdisk.txt
4861F: drivers/block/brd.c 4183F: drivers/block/brd.c
4862 4184
4863RANDOM NUMBER DRIVER 4185RANDOM NUMBER DRIVER
4864P: Matt Mackall 4186M: Matt Mackall <mpm@selenic.com>
4865M: mpm@selenic.com
4866S: Maintained 4187S: Maintained
4867F: drivers/char/random.c 4188F: drivers/char/random.c
4868 4189
4869RAPIDIO SUBSYSTEM 4190RAPIDIO SUBSYSTEM
4870P: Matt Porter 4191M: Matt Porter <mporter@kernel.crashing.org>
4871M: mporter@kernel.crashing.org
4872S: Maintained 4192S: Maintained
4873F: drivers/rapidio/ 4193F: drivers/rapidio/
4874 4194
4875RAYLINK/WEBGEAR 802.11 WIRELESS LAN DRIVER 4195RAYLINK/WEBGEAR 802.11 WIRELESS LAN DRIVER
4876P: Corey Thomas 4196M: Corey Thomas <coreythomas@charter.net>
4877M: coreythomas@charter.net
4878L: linux-wireless@vger.kernel.org 4197L: linux-wireless@vger.kernel.org
4879S: Maintained 4198S: Maintained
4880F: drivers/net/wireless/ray* 4199F: drivers/net/wireless/ray*
4881 4200
4882RCUTORTURE MODULE 4201RCUTORTURE MODULE
4883P: Josh Triplett 4202M: Josh Triplett <josh@freedesktop.org>
4884M: josh@freedesktop.org 4203M: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
4885P: Paul E. McKenney
4886M: paulmck@linux.vnet.ibm.com
4887S: Maintained 4204S: Maintained
4888F: Documentation/RCU/torture.txt 4205F: Documentation/RCU/torture.txt
4889F: kernel/rcutorture.c 4206F: kernel/rcutorture.c
4890 4207
4891RDC R-321X SoC 4208RDC R-321X SoC
4892P: Florian Fainelli 4209M: Florian Fainelli <florian@openwrt.org>
4893M: florian@openwrt.org
4894S: Maintained 4210S: Maintained
4895 4211
4896RDC R6040 FAST ETHERNET DRIVER 4212RDC R6040 FAST ETHERNET DRIVER
4897P: Florian Fainelli 4213M: Florian Fainelli <florian@openwrt.org>
4898M: florian@openwrt.org
4899L: netdev@vger.kernel.org 4214L: netdev@vger.kernel.org
4900S: Maintained 4215S: Maintained
4901F: drivers/net/r6040.c 4216F: drivers/net/r6040.c
4902 4217
4903RDS - RELIABLE DATAGRAM SOCKETS 4218RDS - RELIABLE DATAGRAM SOCKETS
4904P: Andy Grover 4219M: Andy Grover <andy.grover@oracle.com>
4905M: andy.grover@oracle.com
4906L: rds-devel@oss.oracle.com (moderated for non-subscribers) 4220L: rds-devel@oss.oracle.com (moderated for non-subscribers)
4907S: Supported 4221S: Supported
4908F: net/rds/ 4222F: net/rds/
4909 4223
4910READ-COPY UPDATE (RCU) 4224READ-COPY UPDATE (RCU)
4911P: Dipankar Sarma 4225M: Dipankar Sarma <dipankar@in.ibm.com>
4912M: dipankar@in.ibm.com 4226M: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
4913P: Paul E. McKenney
4914M: paulmck@linux.vnet.ibm.com
4915W: http://www.rdrop.com/users/paulmck/rclock/ 4227W: http://www.rdrop.com/users/paulmck/rclock/
4916S: Supported 4228S: Supported
4917F: Documentation/RCU/rcu.txt 4229F: Documentation/RCU/rcu.txt
@@ -4921,16 +4233,14 @@ F: include/linux/srcu.h
4921F: kernel/rcupdate.c 4233F: kernel/rcupdate.c
4922 4234
4923REAL TIME CLOCK DRIVER 4235REAL TIME CLOCK DRIVER
4924P: Paul Gortmaker 4236M: Paul Gortmaker <p_gortmaker@yahoo.com>
4925M: p_gortmaker@yahoo.com
4926S: Maintained 4237S: Maintained
4927F: Documentation/rtc.txt 4238F: Documentation/rtc.txt
4928F: drivers/rtc/ 4239F: drivers/rtc/
4929F: include/linux/rtc.h 4240F: include/linux/rtc.h
4930 4241
4931REAL TIME CLOCK (RTC) SUBSYSTEM 4242REAL TIME CLOCK (RTC) SUBSYSTEM
4932P: Alessandro Zummo 4243M: Alessandro Zummo <a.zummo@towertech.it>
4933M: a.zummo@towertech.it
4934L: rtc-linux@googlegroups.com 4244L: rtc-linux@googlegroups.com
4935S: Maintained 4245S: Maintained
4936F: Documentation/rtc.txt 4246F: Documentation/rtc.txt
@@ -4943,8 +4253,7 @@ S: Supported
4943F: fs/reiserfs/ 4253F: fs/reiserfs/
4944 4254
4945RFKILL 4255RFKILL
4946P: Johannes Berg 4256M: Johannes Berg <johannes@sipsolutions.net>
4947M: johannes@sipsolutions.net
4948L: linux-wireless@vger.kernel.org 4257L: linux-wireless@vger.kernel.org
4949S: Maintained 4258S: Maintained
4950F Documentation/rfkill.txt 4259F Documentation/rfkill.txt
@@ -4963,8 +4272,7 @@ F: Documentation/serial/rocket.txt
4963F: drivers/char/rocket* 4272F: drivers/char/rocket*
4964 4273
4965ROSE NETWORK LAYER 4274ROSE NETWORK LAYER
4966P: Ralf Baechle 4275M: Ralf Baechle <ralf@linux-mips.org>
4967M: ralf@linux-mips.org
4968L: linux-hams@vger.kernel.org 4276L: linux-hams@vger.kernel.org
4969W: http://www.linux-ax25.org/ 4277W: http://www.linux-ax25.org/
4970S: Maintained 4278S: Maintained
@@ -4973,8 +4281,7 @@ F: include/net/rose.h
4973F: net/rose/ 4281F: net/rose/
4974 4282
4975RTL8180 WIRELESS DRIVER 4283RTL8180 WIRELESS DRIVER
4976P: John W. Linville 4284M: "John W. Linville" <linville@tuxdriver.com>
4977M: linville@tuxdriver.com
4978L: linux-wireless@vger.kernel.org 4285L: linux-wireless@vger.kernel.org
4979W: http://linuxwireless.org/ 4286W: http://linuxwireless.org/
4980T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git 4287T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
@@ -4982,12 +4289,9 @@ S: Maintained
4982F: drivers/net/wireless/rtl818* 4289F: drivers/net/wireless/rtl818*
4983 4290
4984RTL8187 WIRELESS DRIVER 4291RTL8187 WIRELESS DRIVER
4985P: Herton Ronaldo Krzesinski 4292M: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
4986M: herton@mandriva.com.br 4293M: Hin-Tak Leung <htl10@users.sourceforge.net>
4987P: Hin-Tak Leung 4294M: Larry Finger <Larry.Finger@lwfinger.net>
4988M: htl10@users.sourceforge.net
4989P: Larry Finger
4990M: Larry.Finger@lwfinger.net
4991L: linux-wireless@vger.kernel.org 4295L: linux-wireless@vger.kernel.org
4992W: http://linuxwireless.org/ 4296W: http://linuxwireless.org/
4993T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git 4297T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
@@ -4995,17 +4299,14 @@ S: Maintained
4995F: drivers/net/wireless/rtl818x/rtl8187* 4299F: drivers/net/wireless/rtl818x/rtl8187*
4996 4300
4997S3 SAVAGE FRAMEBUFFER DRIVER 4301S3 SAVAGE FRAMEBUFFER DRIVER
4998P: Antonino Daplas 4302M: Antonino Daplas <adaplas@gmail.com>
4999M: adaplas@gmail.com
5000L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers) 4303L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers)
5001S: Maintained 4304S: Maintained
5002F: drivers/video/savage/ 4305F: drivers/video/savage/
5003 4306
5004S390 4307S390
5005P: Martin Schwidefsky 4308M: Martin Schwidefsky <schwidefsky@de.ibm.com>
5006M: schwidefsky@de.ibm.com 4309M: Heiko Carstens <heiko.carstens@de.ibm.com>
5007P: Heiko Carstens
5008M: heiko.carstens@de.ibm.com
5009M: linux390@de.ibm.com 4310M: linux390@de.ibm.com
5010L: linux-s390@vger.kernel.org 4311L: linux-s390@vger.kernel.org
5011W: http://www.ibm.com/developerworks/linux/linux390/ 4312W: http://www.ibm.com/developerworks/linux/linux390/
@@ -5013,10 +4314,8 @@ S: Supported
5013F: arch/s390/ 4314F: arch/s390/
5014 4315
5015S390 NETWORK DRIVERS 4316S390 NETWORK DRIVERS
5016P: Ursula Braun 4317M: Ursula Braun <ursula.braun@de.ibm.com>
5017M: ursula.braun@de.ibm.com 4318M: Frank Blaschka <blaschka@linux.vnet.ibm.com>
5018P: Frank Blaschka
5019M: blaschka@linux.vnet.ibm.com
5020M: linux390@de.ibm.com 4319M: linux390@de.ibm.com
5021L: linux-s390@vger.kernel.org 4320L: linux-s390@vger.kernel.org
5022W: http://www.ibm.com/developerworks/linux/linux390/ 4321W: http://www.ibm.com/developerworks/linux/linux390/
@@ -5024,20 +4323,16 @@ S: Supported
5024F: drivers/s390/net/ 4323F: drivers/s390/net/
5025 4324
5026S390 ZCRYPT DRIVER 4325S390 ZCRYPT DRIVER
5027P: Felix Beck 4326M: Felix Beck <felix.beck@de.ibm.com>
5028M: felix.beck@de.ibm.com 4327M: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
5029P: Ralph Wuerthner
5030M: ralph.wuerthner@de.ibm.com
5031M: linux390@de.ibm.com 4328M: linux390@de.ibm.com
5032L: linux-s390@vger.kernel.org 4329L: linux-s390@vger.kernel.org
5033S: Supported 4330S: Supported
5034F: drivers/s390/crypto/ 4331F: drivers/s390/crypto/
5035 4332
5036S390 ZFCP DRIVER 4333S390 ZFCP DRIVER
5037P: Christof Schmitt 4334M: Christof Schmitt <christof.schmitt@de.ibm.com>
5038M: christof.schmitt@de.ibm.com 4335M: Martin Peschke <mp3@de.ibm.com>
5039P: Martin Peschke
5040M: mp3@de.ibm.com
5041M: linux390@de.ibm.com 4336M: linux390@de.ibm.com
5042L: linux-s390@vger.kernel.org 4337L: linux-s390@vger.kernel.org
5043W: http://www.ibm.com/developerworks/linux/linux390/ 4338W: http://www.ibm.com/developerworks/linux/linux390/
@@ -5046,8 +4341,7 @@ F: Documentation/s390/zfcpdump.txt
5046F: drivers/s390/scsi/zfcp_* 4341F: drivers/s390/scsi/zfcp_*
5047 4342
5048S390 IUCV NETWORK LAYER 4343S390 IUCV NETWORK LAYER
5049P: Ursula Braun 4344M: Ursula Braun <ursula.braun@de.ibm.com>
5050M: ursula.braun@de.ibm.com
5051M: linux390@de.ibm.com 4345M: linux390@de.ibm.com
5052L: linux-s390@vger.kernel.org 4346L: linux-s390@vger.kernel.org
5053W: http://www.ibm.com/developerworks/linux/linux390/ 4347W: http://www.ibm.com/developerworks/linux/linux390/
@@ -5057,15 +4351,13 @@ F: include/net/iucv/
5057F: net/iucv/ 4351F: net/iucv/
5058 4352
5059S3C24XX SD/MMC Driver 4353S3C24XX SD/MMC Driver
5060P: Ben Dooks 4354M: Ben Dooks <ben-linux@fluff.org>
5061M: ben-linux@fluff.org
5062L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 4355L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
5063S: Supported 4356S: Supported
5064F: drivers/mmc/host/s3cmci.* 4357F: drivers/mmc/host/s3cmci.*
5065 4358
5066SAA7146 VIDEO4LINUX-2 DRIVER 4359SAA7146 VIDEO4LINUX-2 DRIVER
5067P: Michael Hunold 4360M: Michael Hunold <michael@mihu.de>
5068M: michael@mihu.de
5069L: linux-media@vger.kernel.org 4361L: linux-media@vger.kernel.org
5070T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 4362T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
5071W: http://www.mihu.de/linux/saa7146 4363W: http://www.mihu.de/linux/saa7146
@@ -5075,31 +4367,26 @@ F: drivers/media/video/*7146*
5075F: include/media/*7146* 4367F: include/media/*7146*
5076 4368
5077SC1200 WDT DRIVER 4369SC1200 WDT DRIVER
5078P: Zwane Mwaikambo 4370M: Zwane Mwaikambo <zwane@arm.linux.org.uk>
5079M: zwane@arm.linux.org.uk
5080S: Maintained 4371S: Maintained
5081F: drivers/watchdog/sc1200wdt.c 4372F: drivers/watchdog/sc1200wdt.c
5082 4373
5083SCHEDULER 4374SCHEDULER
5084P: Ingo Molnar 4375M: Ingo Molnar <mingo@elte.hu>
5085M: mingo@elte.hu 4376M: Peter Zijlstra <peterz@infradead.org>
5086P: Peter Zijlstra
5087M: peterz@infradead.org
5088S: Maintained 4377S: Maintained
5089F: kernel/sched* 4378F: kernel/sched*
5090F: include/linux/sched.h 4379F: include/linux/sched.h
5091 4380
5092SCSI CDROM DRIVER 4381SCSI CDROM DRIVER
5093P: Jens Axboe 4382M: Jens Axboe <axboe@kernel.dk>
5094M: axboe@kernel.dk
5095L: linux-scsi@vger.kernel.org 4383L: linux-scsi@vger.kernel.org
5096W: http://www.kernel.dk 4384W: http://www.kernel.dk
5097S: Maintained 4385S: Maintained
5098F: drivers/scsi/sr* 4386F: drivers/scsi/sr*
5099 4387
5100SCSI SG DRIVER 4388SCSI SG DRIVER
5101P: Doug Gilbert 4389M: Doug Gilbert <dgilbert@interlog.com>
5102M: dgilbert@interlog.com
5103L: linux-scsi@vger.kernel.org 4390L: linux-scsi@vger.kernel.org
5104W: http://www.torque.net/sg 4391W: http://www.torque.net/sg
5105S: Maintained 4392S: Maintained
@@ -5107,8 +4394,7 @@ F: drivers/scsi/sg.c
5107F: include/scsi/sg.h 4394F: include/scsi/sg.h
5108 4395
5109SCSI SUBSYSTEM 4396SCSI SUBSYSTEM
5110P: James E.J. Bottomley 4397M: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
5111M: James.Bottomley@HansenPartnership.com
5112L: linux-scsi@vger.kernel.org 4398L: linux-scsi@vger.kernel.org
5113T: git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git 4399T: git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git
5114T: git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git 4400T: git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git
@@ -5118,18 +4404,15 @@ F: drivers/scsi/
5118F: include/scsi/ 4404F: include/scsi/
5119 4405
5120SCSI TAPE DRIVER 4406SCSI TAPE DRIVER
5121P: Kai Mäkisara 4407M: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
5122M: Kai.Makisara@kolumbus.fi
5123L: linux-scsi@vger.kernel.org 4408L: linux-scsi@vger.kernel.org
5124S: Maintained 4409S: Maintained
5125F: Documentation/scsi/st.txt 4410F: Documentation/scsi/st.txt
5126F: drivers/scsi/st* 4411F: drivers/scsi/st*
5127 4412
5128SCTP PROTOCOL 4413SCTP PROTOCOL
5129P: Vlad Yasevich 4414M: Vlad Yasevich <vladislav.yasevich@hp.com>
5130M: vladislav.yasevich@hp.com 4415M: Sridhar Samudrala <sri@us.ibm.com>
5131P: Sridhar Samudrala
5132M: sri@us.ibm.com
5133L: linux-sctp@vger.kernel.org 4416L: linux-sctp@vger.kernel.org
5134W: http://lksctp.sourceforge.net 4417W: http://lksctp.sourceforge.net
5135S: Supported 4418S: Supported
@@ -5139,8 +4422,7 @@ F: include/net/sctp/
5139F: net/sctp/ 4422F: net/sctp/
5140 4423
5141SCx200 CPU SUPPORT 4424SCx200 CPU SUPPORT
5142P: Jim Cromie 4425M: Jim Cromie <jim.cromie@gmail.com>
5143M: jim.cromie@gmail.com
5144S: Odd Fixes 4426S: Odd Fixes
5145F: Documentation/i2c/busses/scx200_acb 4427F: Documentation/i2c/busses/scx200_acb
5146F: arch/x86/kernel/scx200_32.c 4428F: arch/x86/kernel/scx200_32.c
@@ -5150,49 +4432,42 @@ F: drivers/mtd/maps/scx200_docflash.c
5150F: include/linux/scx200.h 4432F: include/linux/scx200.h
5151 4433
5152SCx200 GPIO DRIVER 4434SCx200 GPIO DRIVER
5153P: Jim Cromie 4435M: Jim Cromie <jim.cromie@gmail.com>
5154M: jim.cromie@gmail.com
5155S: Maintained 4436S: Maintained
5156F: drivers/char/scx200_gpio.c 4437F: drivers/char/scx200_gpio.c
5157F: include/linux/scx200_gpio.h 4438F: include/linux/scx200_gpio.h
5158 4439
5159SCx200 HRT CLOCKSOURCE DRIVER 4440SCx200 HRT CLOCKSOURCE DRIVER
5160P: Jim Cromie 4441M: Jim Cromie <jim.cromie@gmail.com>
5161M: jim.cromie@gmail.com
5162S: Maintained 4442S: Maintained
5163F: drivers/clocksource/scx200_hrt.c 4443F: drivers/clocksource/scx200_hrt.c
5164 4444
5165SDRICOH_CS MMC/SD HOST CONTROLLER INTERFACE DRIVER 4445SDRICOH_CS MMC/SD HOST CONTROLLER INTERFACE DRIVER
5166P: Sascha Sommer 4446M: Sascha Sommer <saschasommer@freenet.de>
5167M: saschasommer@freenet.de
5168L: sdricohcs-devel@lists.sourceforge.net (subscribers-only) 4447L: sdricohcs-devel@lists.sourceforge.net (subscribers-only)
5169S: Maintained 4448S: Maintained
5170F: drivers/mmc/host/sdricoh_cs.c 4449F: drivers/mmc/host/sdricoh_cs.c
5171 4450
5172SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) DRIVER 4451SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) DRIVER
5173P: Pierre Ossman 4452M: Pierre Ossman <pierre@ossman.eu>
5174M: pierre@ossman.eu
5175L: sdhci-devel@lists.ossman.eu 4453L: sdhci-devel@lists.ossman.eu
5176S: Maintained 4454S: Maintained
5177 4455
5178SECURE DIGITAL HOST CONTROLLER INTERFACE, OPEN FIRMWARE BINDINGS (SDHCI-OF) 4456SECURE DIGITAL HOST CONTROLLER INTERFACE, OPEN FIRMWARE BINDINGS (SDHCI-OF)
5179P: Anton Vorontsov 4457M: Anton Vorontsov <avorontsov@ru.mvista.com>
5180M: avorontsov@ru.mvista.com
5181L: linuxppc-dev@ozlabs.org 4458L: linuxppc-dev@ozlabs.org
5182L: sdhci-devel@lists.ossman.eu 4459L: sdhci-devel@lists.ossman.eu
5183S: Maintained 4460S: Maintained
5184F: drivers/mmc/host/sdhci.* 4461F: drivers/mmc/host/sdhci.*
5185 4462
5186SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) SAMSUNG DRIVER 4463SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) SAMSUNG DRIVER
5187P: Ben Dooks 4464M: Ben Dooks <ben-linux@fluff.org>
5188M: ben-linux@fluff.org
5189L: sdhci-devel@lists.ossman.eu 4465L: sdhci-devel@lists.ossman.eu
5190S: Maintained 4466S: Maintained
5191F: drivers/mmc/host/sdhci-s3c.c 4467F: drivers/mmc/host/sdhci-s3c.c
5192 4468
5193SECURITY SUBSYSTEM 4469SECURITY SUBSYSTEM
5194P: James Morris 4470M: James Morris <jmorris@namei.org>
5195M: jmorris@namei.org
5196L: linux-security-module@vger.kernel.org (suggested Cc:) 4471L: linux-security-module@vger.kernel.org (suggested Cc:)
5197T: git git://www.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6.git 4472T: git git://www.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6.git
5198W: http://security.wiki.kernel.org/ 4473W: http://security.wiki.kernel.org/
@@ -5200,17 +4475,13 @@ S: Supported
5200F: security/ 4475F: security/
5201 4476
5202SECURITY CONTACT 4477SECURITY CONTACT
5203P: Security Officers 4478M: Security Officers <security@kernel.org>
5204M: security@kernel.org
5205S: Supported 4479S: Supported
5206 4480
5207SELINUX SECURITY MODULE 4481SELINUX SECURITY MODULE
5208P: Stephen Smalley 4482M: Stephen Smalley <sds@tycho.nsa.gov>
5209M: sds@tycho.nsa.gov 4483M: James Morris <jmorris@namei.org>
5210P: James Morris 4484M: Eric Paris <eparis@parisplace.org>
5211M: jmorris@namei.org
5212P: Eric Paris
5213M: eparis@parisplace.org
5214L: selinux@tycho.nsa.gov (subscribers-only, general discussion) 4485L: selinux@tycho.nsa.gov (subscribers-only, general discussion)
5215W: http://selinuxproject.org 4486W: http://selinuxproject.org
5216T: git git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6.git 4487T: git git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6.git
@@ -5219,15 +4490,13 @@ F: include/linux/selinux*
5219F: security/selinux/ 4490F: security/selinux/
5220 4491
5221SENSABLE PHANTOM 4492SENSABLE PHANTOM
5222P: Jiri Slaby 4493M: Jiri Slaby <jirislaby@gmail.com>
5223M: jirislaby@gmail.com
5224S: Maintained 4494S: Maintained
5225F: drivers/misc/phantom.c 4495F: drivers/misc/phantom.c
5226F: include/linux/phantom.h 4496F: include/linux/phantom.h
5227 4497
5228SERIAL ATA (SATA) SUBSYSTEM 4498SERIAL ATA (SATA) SUBSYSTEM
5229P: Jeff Garzik 4499M: Jeff Garzik <jgarzik@pobox.com>
5230M: jgarzik@pobox.com
5231L: linux-ide@vger.kernel.org 4500L: linux-ide@vger.kernel.org
5232T: git git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git 4501T: git git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
5233S: Supported 4502S: Supported
@@ -5236,10 +4505,8 @@ F: include/linux/ata.h
5236F: include/linux/libata.h 4505F: include/linux/libata.h
5237 4506
5238SERVER ENGINES 10Gbps NIC - BladeEngine 2 DRIVER 4507SERVER ENGINES 10Gbps NIC - BladeEngine 2 DRIVER
5239P: Sathya Perla 4508M: Sathya Perla <sathyap@serverengines.com>
5240M: sathyap@serverengines.com 4509M: Subbu Seetharaman <subbus@serverengines.com>
5241P: Subbu Seetharaman
5242M: subbus@serverengines.com
5243L: netdev@vger.kernel.org 4510L: netdev@vger.kernel.org
5244W: http://www.serverengines.com 4511W: http://www.serverengines.com
5245S: Supported 4512S: Supported
@@ -5248,20 +4515,17 @@ F: drivers/net/benet/
5248SFC NETWORK DRIVER 4515SFC NETWORK DRIVER
5249P: Steve Hodgson 4516P: Steve Hodgson
5250P: Ben Hutchings 4517P: Ben Hutchings
5251P: Robert Stonehouse 4518M: Robert Stonehouse <linux-net-drivers@solarflare.com>
5252M: linux-net-drivers@solarflare.com
5253S: Supported 4519S: Supported
5254F: drivers/net/sfc/ 4520F: drivers/net/sfc/
5255 4521
5256SGI GRU DRIVER 4522SGI GRU DRIVER
5257P: Jack Steiner 4523M: Jack Steiner <steiner@sgi.com>
5258M: steiner@sgi.com
5259S: Maintained 4524S: Maintained
5260F: drivers/misc/sgi-gru/ 4525F: drivers/misc/sgi-gru/
5261 4526
5262SGI SN-IA64 (Altix) SERIAL CONSOLE DRIVER 4527SGI SN-IA64 (Altix) SERIAL CONSOLE DRIVER
5263P: Pat Gefre 4528M: Pat Gefre <pfg@sgi.com>
5264M: pfg@sgi.com
5265L: linux-ia64@vger.kernel.org 4529L: linux-ia64@vger.kernel.org
5266S: Supported 4530S: Supported
5267F: Documentation/ia64/serial.txt 4531F: Documentation/ia64/serial.txt
@@ -5269,22 +4533,19 @@ F: drivers/serial/ioc?_serial.c
5269F: include/linux/ioc?.h 4533F: include/linux/ioc?.h
5270 4534
5271SGI VISUAL WORKSTATION 320 AND 540 4535SGI VISUAL WORKSTATION 320 AND 540
5272P: Andrey Panin 4536M: Andrey Panin <pazke@donpac.ru>
5273M: pazke@donpac.ru
5274L: linux-visws-devel@lists.sf.net 4537L: linux-visws-devel@lists.sf.net
5275W: http://linux-visws.sf.net 4538W: http://linux-visws.sf.net
5276S: Maintained for 2.6. 4539S: Maintained for 2.6.
5277F: Documentation/sgi-visws.txt 4540F: Documentation/sgi-visws.txt
5278 4541
5279SGI XP/XPC/XPNET DRIVER 4542SGI XP/XPC/XPNET DRIVER
5280P: Robin Holt 4543M: Robin Holt <holt@sgi.com>
5281M: holt@sgi.com
5282S: Maintained 4544S: Maintained
5283F: drivers/misc/sgi-xp/ 4545F: drivers/misc/sgi-xp/
5284 4546
5285SHARP LH SUPPORT (LH7952X & LH7A40X) 4547SHARP LH SUPPORT (LH7952X & LH7A40X)
5286P: Marc Singer 4548M: Marc Singer <elf@buici.com>
5287M: elf@buici.com
5288W: http://projects.buici.com/arm 4549W: http://projects.buici.com/arm
5289L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 4550L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
5290S: Maintained 4551S: Maintained
@@ -5295,23 +4556,20 @@ F: drivers/usb/gadget/lh7a40*
5295F: drivers/usb/host/ohci-lh7a40* 4556F: drivers/usb/host/ohci-lh7a40*
5296 4557
5297SHPC HOTPLUG DRIVER 4558SHPC HOTPLUG DRIVER
5298P: Kristen Carlson Accardi 4559M: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
5299M: kristen.c.accardi@intel.com
5300L: linux-pci@vger.kernel.org 4560L: linux-pci@vger.kernel.org
5301S: Supported 4561S: Supported
5302F: drivers/pci/hotplug/shpchp* 4562F: drivers/pci/hotplug/shpchp*
5303 4563
5304SIMTEC EB110ATX (Chalice CATS) 4564SIMTEC EB110ATX (Chalice CATS)
5305P: Ben Dooks 4565P: Ben Dooks
5306P: Vincent Sanders 4566M: Vincent Sanders <support@simtec.co.uk>
5307M: support@simtec.co.uk
5308W: http://www.simtec.co.uk/products/EB110ATX/ 4567W: http://www.simtec.co.uk/products/EB110ATX/
5309S: Supported 4568S: Supported
5310 4569
5311SIMTEC EB2410ITX (BAST) 4570SIMTEC EB2410ITX (BAST)
5312P: Ben Dooks 4571P: Ben Dooks
5313P: Vincent Sanders 4572M: Vincent Sanders <support@simtec.co.uk>
5314M: support@simtec.co.uk
5315W: http://www.simtec.co.uk/products/EB2410ITX/ 4573W: http://www.simtec.co.uk/products/EB2410ITX/
5316S: Supported 4574S: Supported
5317F: arch/arm/mach-s3c2410/ 4575F: arch/arm/mach-s3c2410/
@@ -5319,31 +4577,27 @@ F: drivers/*/*s3c2410*
5319F: drivers/*/*/*s3c2410* 4577F: drivers/*/*/*s3c2410*
5320 4578
5321SIS 190 ETHERNET DRIVER 4579SIS 190 ETHERNET DRIVER
5322P: Francois Romieu 4580M: Francois Romieu <romieu@fr.zoreil.com>
5323M: romieu@fr.zoreil.com
5324L: netdev@vger.kernel.org 4581L: netdev@vger.kernel.org
5325S: Maintained 4582S: Maintained
5326F: drivers/net/sis190.c 4583F: drivers/net/sis190.c
5327 4584
5328SIS 900/7016 FAST ETHERNET DRIVER 4585SIS 900/7016 FAST ETHERNET DRIVER
5329P: Daniele Venzano 4586M: Daniele Venzano <venza@brownhat.org>
5330M: venza@brownhat.org
5331W: http://www.brownhat.org/sis900.html 4587W: http://www.brownhat.org/sis900.html
5332L: netdev@vger.kernel.org 4588L: netdev@vger.kernel.org
5333S: Maintained 4589S: Maintained
5334F: drivers/net/sis900.* 4590F: drivers/net/sis900.*
5335 4591
5336SIS 96X I2C/SMBUS DRIVER 4592SIS 96X I2C/SMBUS DRIVER
5337P: Mark M. Hoffman 4593M: "Mark M. Hoffman" <mhoffman@lightlink.com>
5338M: mhoffman@lightlink.com
5339L: linux-i2c@vger.kernel.org 4594L: linux-i2c@vger.kernel.org
5340S: Maintained 4595S: Maintained
5341F: Documentation/i2c/busses/i2c-sis96x 4596F: Documentation/i2c/busses/i2c-sis96x
5342F: drivers/i2c/busses/i2c-sis96x.c 4597F: drivers/i2c/busses/i2c-sis96x.c
5343 4598
5344SIS FRAMEBUFFER DRIVER 4599SIS FRAMEBUFFER DRIVER
5345P: Thomas Winischhofer 4600M: Thomas Winischhofer <thomas@winischhofer.net>
5346M: thomas@winischhofer.net
5347W: http://www.winischhofer.net/linuxsisvga.shtml 4601W: http://www.winischhofer.net/linuxsisvga.shtml
5348S: Maintained 4602S: Maintained
5349F: Documentation/fb/sisfb.txt 4603F: Documentation/fb/sisfb.txt
@@ -5351,70 +4605,59 @@ F: drivers/video/sis/
5351F: include/video/sisfb.h 4605F: include/video/sisfb.h
5352 4606
5353SIS USB2VGA DRIVER 4607SIS USB2VGA DRIVER
5354P: Thomas Winischhofer 4608M: Thomas Winischhofer <thomas@winischhofer.net>
5355M: thomas@winischhofer.net
5356W: http://www.winischhofer.at/linuxsisusbvga.shtml 4609W: http://www.winischhofer.at/linuxsisusbvga.shtml
5357S: Maintained 4610S: Maintained
5358F: drivers/usb/misc/sisusbvga/ 4611F: drivers/usb/misc/sisusbvga/
5359 4612
5360SKGE, SKY2 10/100/1000 GIGABIT ETHERNET DRIVERS 4613SKGE, SKY2 10/100/1000 GIGABIT ETHERNET DRIVERS
5361P: Stephen Hemminger 4614M: Stephen Hemminger <shemminger@linux-foundation.org>
5362M: shemminger@linux-foundation.org
5363L: netdev@vger.kernel.org 4615L: netdev@vger.kernel.org
5364S: Maintained 4616S: Maintained
5365F: drivers/net/skge.* 4617F: drivers/net/skge.*
5366F: drivers/net/sky2.* 4618F: drivers/net/sky2.*
5367 4619
5368SLAB ALLOCATOR 4620SLAB ALLOCATOR
5369P: Christoph Lameter 4621M: Christoph Lameter <cl@linux-foundation.org>
5370M: cl@linux-foundation.org 4622M: Pekka Enberg <penberg@cs.helsinki.fi>
5371P: Pekka Enberg 4623M: Matt Mackall <mpm@selenic.com>
5372M: penberg@cs.helsinki.fi
5373P: Matt Mackall
5374M: mpm@selenic.com
5375L: linux-mm@kvack.org 4624L: linux-mm@kvack.org
5376S: Maintained 4625S: Maintained
5377F: include/linux/sl?b*.h 4626F: include/linux/sl?b*.h
5378F: mm/sl?b.c 4627F: mm/sl?b.c
5379 4628
5380SMC91x ETHERNET DRIVER 4629SMC91x ETHERNET DRIVER
5381P: Nicolas Pitre 4630M: Nicolas Pitre <nico@cam.org>
5382M: nico@cam.org
5383S: Maintained 4631S: Maintained
5384F: drivers/net/smc91x.* 4632F: drivers/net/smc91x.*
5385 4633
5386SMSC47B397 HARDWARE MONITOR DRIVER 4634SMSC47B397 HARDWARE MONITOR DRIVER
5387P: Mark M. Hoffman 4635M: "Mark M. Hoffman" <mhoffman@lightlink.com>
5388M: mhoffman@lightlink.com
5389L: lm-sensors@lm-sensors.org 4636L: lm-sensors@lm-sensors.org
5390S: Maintained 4637S: Maintained
5391F: Documentation/hwmon/smsc47b397 4638F: Documentation/hwmon/smsc47b397
5392F: drivers/hwmon/smsc47b397.c 4639F: drivers/hwmon/smsc47b397.c
5393 4640
5394SMSC911x ETHERNET DRIVER 4641SMSC911x ETHERNET DRIVER
5395P: Steve Glendinning 4642M: Steve Glendinning <steve.glendinning@smsc.com>
5396M: steve.glendinning@smsc.com
5397L: netdev@vger.kernel.org 4643L: netdev@vger.kernel.org
5398S: Supported 4644S: Supported
5399F: include/linux/smsc911x.h 4645F: include/linux/smsc911x.h
5400F: drivers/net/smsc911x.* 4646F: drivers/net/smsc911x.*
5401 4647
5402SMSC9420 PCI ETHERNET DRIVER 4648SMSC9420 PCI ETHERNET DRIVER
5403P: Steve Glendinning 4649M: Steve Glendinning <steve.glendinning@smsc.com>
5404M: steve.glendinning@smsc.com
5405L: netdev@vger.kernel.org 4650L: netdev@vger.kernel.org
5406S: Supported 4651S: Supported
5407F: drivers/net/smsc9420.* 4652F: drivers/net/smsc9420.*
5408 4653
5409SMX UIO Interface 4654SMX UIO Interface
5410P: Ben Nizette 4655M: Ben Nizette <bn@niasdigital.com>
5411M: bn@niasdigital.com
5412S: Maintained 4656S: Maintained
5413F: drivers/uio/uio_smx.c 4657F: drivers/uio/uio_smx.c
5414 4658
5415SN-IA64 (Itanium) SUB-PLATFORM 4659SN-IA64 (Itanium) SUB-PLATFORM
5416P: Jes Sorensen 4660M: Jes Sorensen <jes@sgi.com>
5417M: jes@sgi.com
5418L: linux-altix@sgi.com 4661L: linux-altix@sgi.com
5419L: linux-ia64@vger.kernel.org 4662L: linux-ia64@vger.kernel.org
5420W: http://www.sgi.com/altix 4663W: http://www.sgi.com/altix
@@ -5422,8 +4665,7 @@ S: Maintained
5422F: arch/ia64/sn/ 4665F: arch/ia64/sn/
5423 4666
5424SOC-CAMERA V4L2 SUBSYSTEM 4667SOC-CAMERA V4L2 SUBSYSTEM
5425P: Guennadi Liakhovetski 4668M: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
5426M: g.liakhovetski@gmx.de
5427L: linux-media@vger.kernel.org 4669L: linux-media@vger.kernel.org
5428T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 4670T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
5429S: Maintained 4671S: Maintained
@@ -5431,37 +4673,32 @@ F: include/media/v4l2*
5431F: drivers/media/video/v4l2* 4673F: drivers/media/video/v4l2*
5432 4674
5433SOEKRIS NET48XX LED SUPPORT 4675SOEKRIS NET48XX LED SUPPORT
5434P: Chris Boot 4676M: Chris Boot <bootc@bootc.net>
5435M: bootc@bootc.net
5436S: Maintained 4677S: Maintained
5437F: drivers/leds/leds-net48xx.c 4678F: drivers/leds/leds-net48xx.c
5438 4679
5439SOFTWARE RAID (Multiple Disks) SUPPORT 4680SOFTWARE RAID (Multiple Disks) SUPPORT
5440P: Neil Brown 4681M: Neil Brown <neilb@suse.de>
5441M: neilb@suse.de
5442L: linux-raid@vger.kernel.org 4682L: linux-raid@vger.kernel.org
5443S: Supported 4683S: Supported
5444F: drivers/md/ 4684F: drivers/md/
5445F: include/linux/raid/ 4685F: include/linux/raid/
5446 4686
5447SONIC NETWORK DRIVER 4687SONIC NETWORK DRIVER
5448P: Thomas Bogendoerfer 4688M: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
5449M: tsbogend@alpha.franken.de
5450L: netdev@vger.kernel.org 4689L: netdev@vger.kernel.org
5451S: Maintained 4690S: Maintained
5452F: drivers/net/sonic.* 4691F: drivers/net/sonic.*
5453 4692
5454SONICS SILICON BACKPLANE DRIVER (SSB) 4693SONICS SILICON BACKPLANE DRIVER (SSB)
5455P: Michael Buesch 4694M: Michael Buesch <mb@bu3sch.de>
5456M: mb@bu3sch.de
5457L: netdev@vger.kernel.org 4695L: netdev@vger.kernel.org
5458S: Maintained 4696S: Maintained
5459F: drivers/ssb/ 4697F: drivers/ssb/
5460F: include/linux/ssb/ 4698F: include/linux/ssb/
5461 4699
5462SONY VAIO CONTROL DEVICE DRIVER 4700SONY VAIO CONTROL DEVICE DRIVER
5463P: Mattia Dongili 4701M: Mattia Dongili <malattia@linux.it>
5464M: malattia@linux.it
5465L: linux-acpi@vger.kernel.org 4702L: linux-acpi@vger.kernel.org
5466W: http://www.linux.it/~malattia/wiki/index.php/Sony_drivers 4703W: http://www.linux.it/~malattia/wiki/index.php/Sony_drivers
5467S: Maintained 4704S: Maintained
@@ -5471,17 +4708,14 @@ F: drivers/platform/x86/sony-laptop.c
5471F: include/linux/sony-laptop.h 4708F: include/linux/sony-laptop.h
5472 4709
5473SONY MEMORYSTICK CARD SUPPORT 4710SONY MEMORYSTICK CARD SUPPORT
5474P: Alex Dubov 4711M: Alex Dubov <oakad@yahoo.com>
5475M: oakad@yahoo.com
5476W: http://tifmxx.berlios.de/ 4712W: http://tifmxx.berlios.de/
5477S: Maintained 4713S: Maintained
5478F: drivers/memstick/host/tifm_ms.c 4714F: drivers/memstick/host/tifm_ms.c
5479 4715
5480SOUND 4716SOUND
5481P: Jaroslav Kysela 4717M: Jaroslav Kysela <perex@perex.cz>
5482M: perex@perex.cz 4718M: Takashi Iwai <tiwai@suse.de>
5483P: Takashi Iwai
5484M: tiwai@suse.de
5485L: alsa-devel@alsa-project.org (moderated for non-subscribers) 4719L: alsa-devel@alsa-project.org (moderated for non-subscribers)
5486W: http://www.alsa-project.org/ 4720W: http://www.alsa-project.org/
5487T: git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git 4721T: git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
@@ -5492,10 +4726,8 @@ F: include/sound/
5492F: sound/ 4726F: sound/
5493 4727
5494SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC) 4728SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC)
5495P: Liam Girdwood 4729M: Liam Girdwood <lrg@slimlogic.co.uk>
5496M: lrg@slimlogic.co.uk 4730M: Mark Brown <broonie@opensource.wolfsonmicro.com>
5497P: Mark Brown
5498M: broonie@opensource.wolfsonmicro.com
5499T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git 4731T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git
5500L: alsa-devel@alsa-project.org (moderated for non-subscribers) 4732L: alsa-devel@alsa-project.org (moderated for non-subscribers)
5501W: http://alsa-project.org/main/index.php/ASoC 4733W: http://alsa-project.org/main/index.php/ASoC
@@ -5504,8 +4736,7 @@ F: sound/soc/
5504F: include/sound/soc* 4736F: include/sound/soc*
5505 4737
5506SPARC + UltraSPARC (sparc/sparc64) 4738SPARC + UltraSPARC (sparc/sparc64)
5507P: David S. Miller 4739M: "David S. Miller" <davem@davemloft.net>
5508M: davem@davemloft.net
5509L: sparclinux@vger.kernel.org 4740L: sparclinux@vger.kernel.org
5510T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6.git 4741T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6.git
5511T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6.git 4742T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6.git
@@ -5513,15 +4744,13 @@ S: Maintained
5513F: arch/sparc/ 4744F: arch/sparc/
5514 4745
5515SPECIALIX IO8+ MULTIPORT SERIAL CARD DRIVER 4746SPECIALIX IO8+ MULTIPORT SERIAL CARD DRIVER
5516P: Roger Wolff 4747M: Roger Wolff <R.E.Wolff@BitWizard.nl>
5517M: R.E.Wolff@BitWizard.nl
5518S: Supported 4748S: Supported
5519F: Documentation/serial/specialix.txt 4749F: Documentation/serial/specialix.txt
5520F: drivers/char/specialix* 4750F: drivers/char/specialix*
5521 4751
5522SPI SUBSYSTEM 4752SPI SUBSYSTEM
5523P: David Brownell 4753M: David Brownell <dbrownell@users.sourceforge.net>
5524M: dbrownell@users.sourceforge.net
5525L: spi-devel-general@lists.sourceforge.net 4754L: spi-devel-general@lists.sourceforge.net
5526S: Maintained 4755S: Maintained
5527F: Documentation/spi/ 4756F: Documentation/spi/
@@ -5529,18 +4758,15 @@ F: drivers/spi/
5529F: include/linux/spi/ 4758F: include/linux/spi/
5530 4759
5531SPIDERNET NETWORK DRIVER for CELL 4760SPIDERNET NETWORK DRIVER for CELL
5532P: Ishizaki Kou 4761M: Ishizaki Kou <kou.ishizaki@toshiba.co.jp>
5533M: kou.ishizaki@toshiba.co.jp 4762M: Jens Osterkamp <jens@de.ibm.com>
5534P: Jens Osterkamp
5535M: jens@de.ibm.com
5536L: netdev@vger.kernel.org 4763L: netdev@vger.kernel.org
5537S: Supported 4764S: Supported
5538F: Documentation/networking/spider_net.txt 4765F: Documentation/networking/spider_net.txt
5539F: drivers/net/spider_net* 4766F: drivers/net/spider_net*
5540 4767
5541SPU FILE SYSTEM 4768SPU FILE SYSTEM
5542P: Jeremy Kerr 4769M: Jeremy Kerr <jk@ozlabs.org>
5543M: jk@ozlabs.org
5544L: linuxppc-dev@ozlabs.org 4770L: linuxppc-dev@ozlabs.org
5545L: cbe-oss-dev@ozlabs.org 4771L: cbe-oss-dev@ozlabs.org
5546W: http://www.ibm.com/developerworks/power/cell/ 4772W: http://www.ibm.com/developerworks/power/cell/
@@ -5549,8 +4775,7 @@ F: Documentation/filesystems/spufs.txt
5549F: arch/powerpc/platforms/cell/spufs/ 4775F: arch/powerpc/platforms/cell/spufs/
5550 4776
5551SQUASHFS FILE SYSTEM 4777SQUASHFS FILE SYSTEM
5552P: Phillip Lougher 4778M: Phillip Lougher <phillip@lougher.demon.co.uk>
5553M: phillip@lougher.demon.co.uk
5554L: squashfs-devel@lists.sourceforge.net (subscribers-only) 4779L: squashfs-devel@lists.sourceforge.net (subscribers-only)
5555W: http://squashfs.org.uk 4780W: http://squashfs.org.uk
5556S: Maintained 4781S: Maintained
@@ -5558,49 +4783,41 @@ F: Documentation/filesystems/squashfs.txt
5558F: fs/squashfs/ 4783F: fs/squashfs/
5559 4784
5560SRM (Alpha) environment access 4785SRM (Alpha) environment access
5561P: Jan-Benedict Glaw 4786M: Jan-Benedict Glaw <jbglaw@lug-owl.de>
5562M: jbglaw@lug-owl.de
5563S: Maintained 4787S: Maintained
5564F: arch/alpha/kernel/srm_env.c 4788F: arch/alpha/kernel/srm_env.c
5565 4789
5566STABLE BRANCH 4790STABLE BRANCH
5567P: Greg Kroah-Hartman 4791M: Greg Kroah-Hartman <greg@kroah.com>
5568M: greg@kroah.com 4792M: Chris Wright <chrisw@sous-sol.org>
5569P: Chris Wright
5570M: chrisw@sous-sol.org
5571L: stable@kernel.org 4793L: stable@kernel.org
5572S: Maintained 4794S: Maintained
5573 4795
5574STAGING SUBSYSTEM 4796STAGING SUBSYSTEM
5575P: Greg Kroah-Hartman 4797M: Greg Kroah-Hartman <gregkh@suse.de>
5576M: gregkh@suse.de
5577T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ 4798T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
5578L: devel@driverdev.osuosl.org 4799L: devel@driverdev.osuosl.org
5579S: Maintained 4800S: Maintained
5580F: drivers/staging/ 4801F: drivers/staging/
5581 4802
5582STARFIRE/DURALAN NETWORK DRIVER 4803STARFIRE/DURALAN NETWORK DRIVER
5583P: Ion Badulescu 4804M: Ion Badulescu <ionut@badula.org>
5584M: ionut@badula.org
5585S: Odd Fixes 4805S: Odd Fixes
5586F: drivers/net/starfire* 4806F: drivers/net/starfire*
5587 4807
5588STARMODE RADIO IP (STRIP) PROTOCOL DRIVER 4808STARMODE RADIO IP (STRIP) PROTOCOL DRIVER
5589W: http://mosquitonet.Stanford.EDU/strip.html
5590S: Orphan 4809S: Orphan
5591F: drivers/net/wireless/strip.c 4810F: drivers/net/wireless/strip.c
5592F: include/linux/if_strip.h 4811F: include/linux/if_strip.h
5593 4812
5594STRADIS MPEG-2 DECODER DRIVER 4813STRADIS MPEG-2 DECODER DRIVER
5595P: Nathan Laredo 4814M: Nathan Laredo <laredo@gnu.org>
5596M: laredo@gnu.org
5597W: http://www.stradis.com/ 4815W: http://www.stradis.com/
5598S: Maintained 4816S: Maintained
5599F: drivers/media/video/stradis.c 4817F: drivers/media/video/stradis.c
5600 4818
5601SUN3/3X 4819SUN3/3X
5602P: Sam Creasey 4820M: Sam Creasey <sammy@sammy.net>
5603M: sammy@sammy.net
5604W: http://sammy.net/sun3/ 4821W: http://sammy.net/sun3/
5605S: Maintained 4822S: Maintained
5606F: arch/m68k/kernel/*sun3* 4823F: arch/m68k/kernel/*sun3*
@@ -5608,8 +4825,7 @@ F: arch/m68k/sun3*/
5608F: arch/m68k/include/asm/sun3* 4825F: arch/m68k/include/asm/sun3*
5609 4826
5610SUPERH 4827SUPERH
5611P: Paul Mundt 4828M: Paul Mundt <lethal@linux-sh.org>
5612M: lethal@linux-sh.org
5613L: linux-sh@vger.kernel.org 4829L: linux-sh@vger.kernel.org
5614W: http://www.linux-sh.org 4830W: http://www.linux-sh.org
5615T: git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.git 4831T: git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.git
@@ -5619,12 +4835,9 @@ F: arch/sh/
5619F: drivers/sh/ 4835F: drivers/sh/
5620 4836
5621SUSPEND TO RAM 4837SUSPEND TO RAM
5622P: Len Brown 4838M: Len Brown <len.brown@intel.com>
5623M: len.brown@intel.com 4839M: Pavel Machek <pavel@ucw.cz>
5624P: Pavel Machek 4840M: "Rafael J. Wysocki" <rjw@sisk.pl>
5625M: pavel@ucw.cz
5626P: Rafael J. Wysocki
5627M: rjw@sisk.pl
5628L: linux-pm@lists.linux-foundation.org 4841L: linux-pm@lists.linux-foundation.org
5629S: Supported 4842S: Supported
5630F: Documentation/power/ 4843F: Documentation/power/
@@ -5636,32 +4849,28 @@ F: include/linux/freezer.h
5636F: include/linux/pm.h 4849F: include/linux/pm.h
5637 4850
5638SVGA HANDLING 4851SVGA HANDLING
5639P: Martin Mares 4852M: Martin Mares <mj@ucw.cz>
5640M: mj@ucw.cz
5641L: linux-video@atrey.karlin.mff.cuni.cz 4853L: linux-video@atrey.karlin.mff.cuni.cz
5642S: Maintained 4854S: Maintained
5643F: Documentation/svga.txt 4855F: Documentation/svga.txt
5644F: arch/x86/boot/video* 4856F: arch/x86/boot/video*
5645 4857
5646SYSV FILESYSTEM 4858SYSV FILESYSTEM
5647P: Christoph Hellwig 4859M: Christoph Hellwig <hch@infradead.org>
5648M: hch@infradead.org
5649S: Maintained 4860S: Maintained
5650F: Documentation/filesystems/sysv-fs.txt 4861F: Documentation/filesystems/sysv-fs.txt
5651F: fs/sysv/ 4862F: fs/sysv/
5652F: include/linux/sysv_fs.h 4863F: include/linux/sysv_fs.h
5653 4864
5654TASKSTATS STATISTICS INTERFACE 4865TASKSTATS STATISTICS INTERFACE
5655P: Balbir Singh 4866M: Balbir Singh <balbir@linux.vnet.ibm.com>
5656M: balbir@linux.vnet.ibm.com
5657S: Maintained 4867S: Maintained
5658F: Documentation/accounting/taskstats* 4868F: Documentation/accounting/taskstats*
5659F: include/linux/taskstats* 4869F: include/linux/taskstats*
5660F: kernel/taskstats.c 4870F: kernel/taskstats.c
5661 4871
5662TC CLASSIFIER 4872TC CLASSIFIER
5663P: Jamal Hadi Salim 4873M: Jamal Hadi Salim <hadi@cyberus.ca>
5664M: hadi@cyberus.ca
5665L: netdev@vger.kernel.org 4874L: netdev@vger.kernel.org
5666S: Maintained 4875S: Maintained
5667F: include/linux/pkt_cls.h 4876F: include/linux/pkt_cls.h
@@ -5669,38 +4878,31 @@ F: include/net/pkt_cls.h
5669F: net/sched/ 4878F: net/sched/
5670 4879
5671TCP LOW PRIORITY MODULE 4880TCP LOW PRIORITY MODULE
5672P: Wong Hoi Sing, Edison 4881M: "Wong Hoi Sing, Edison" <hswong3i@gmail.com>
5673M: hswong3i@gmail.com 4882M: "Hung Hing Lun, Mike" <hlhung3i@gmail.com>
5674P: Hung Hing Lun, Mike
5675M: hlhung3i@gmail.com
5676W: http://tcp-lp-mod.sourceforge.net/ 4883W: http://tcp-lp-mod.sourceforge.net/
5677S: Maintained 4884S: Maintained
5678F: net/ipv4/tcp_lp.c 4885F: net/ipv4/tcp_lp.c
5679 4886
5680TEHUTI ETHERNET DRIVER 4887TEHUTI ETHERNET DRIVER
5681P: Alexander Indenbaum 4888M: Alexander Indenbaum <baum@tehutinetworks.net>
5682M: baum@tehutinetworks.net 4889M: Andy Gospodarek <andy@greyhouse.net>
5683P: Andy Gospodarek
5684M: andy@greyhouse.net
5685L: netdev@vger.kernel.org 4890L: netdev@vger.kernel.org
5686S: Supported 4891S: Supported
5687F: drivers/net/tehuti* 4892F: drivers/net/tehuti*
5688 4893
5689Telecom Clock Driver for MCPL0010 4894Telecom Clock Driver for MCPL0010
5690P: Mark Gross 4895M: Mark Gross <mark.gross@intel.com>
5691M: mark.gross@intel.com
5692S: Supported 4896S: Supported
5693F: drivers/char/tlclk.c 4897F: drivers/char/tlclk.c
5694 4898
5695TENSILICA XTENSA PORT (xtensa) 4899TENSILICA XTENSA PORT (xtensa)
5696P: Chris Zankel 4900M: Chris Zankel <chris@zankel.net>
5697M: chris@zankel.net
5698S: Maintained 4901S: Maintained
5699F: arch/xtensa/ 4902F: arch/xtensa/
5700 4903
5701THINKPAD ACPI EXTRAS DRIVER 4904THINKPAD ACPI EXTRAS DRIVER
5702P: Henrique de Moraes Holschuh 4905M: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
5703M: ibm-acpi@hmh.eng.br
5704L: ibm-acpi-devel@lists.sourceforge.net 4906L: ibm-acpi-devel@lists.sourceforge.net
5705W: http://ibm-acpi.sourceforge.net 4907W: http://ibm-acpi.sourceforge.net
5706W: http://thinkwiki.org/wiki/Ibm-acpi 4908W: http://thinkwiki.org/wiki/Ibm-acpi
@@ -5709,27 +4911,22 @@ S: Maintained
5709F: drivers/platform/x86/thinkpad_acpi.c 4911F: drivers/platform/x86/thinkpad_acpi.c
5710 4912
5711TI FLASH MEDIA INTERFACE DRIVER 4913TI FLASH MEDIA INTERFACE DRIVER
5712P: Alex Dubov 4914M: Alex Dubov <oakad@yahoo.com>
5713M: oakad@yahoo.com
5714S: Maintained 4915S: Maintained
5715F: drivers/misc/tifm* 4916F: drivers/misc/tifm*
5716F: drivers/mmc/host/tifm_sd.c 4917F: drivers/mmc/host/tifm_sd.c
5717F: include/linux/tifm.h 4918F: include/linux/tifm.h
5718 4919
5719TI TWL4030 SERIES SOC CODEC DRIVER 4920TI TWL4030 SERIES SOC CODEC DRIVER
5720P: Peter Ujfalusi 4921M: Peter Ujfalusi <peter.ujfalusi@nokia.com>
5721M: peter.ujfalusi@nokia.com
5722L: alsa-devel@alsa-project.org (moderated for non-subscribers) 4922L: alsa-devel@alsa-project.org (moderated for non-subscribers)
5723S: Maintained 4923S: Maintained
5724F: sound/soc/codecs/twl4030* 4924F: sound/soc/codecs/twl4030*
5725 4925
5726TIPC NETWORK LAYER 4926TIPC NETWORK LAYER
5727P: Per Liden 4927M: Per Liden <per.liden@ericsson.com>
5728M: per.liden@ericsson.com 4928M: Jon Maloy <jon.maloy@ericsson.com>
5729P: Jon Maloy 4929M: Allan Stephens <allan.stephens@windriver.com>
5730M: jon.maloy@ericsson.com
5731P: Allan Stephens
5732M: allan.stephens@windriver.com
5733L: tipc-discussion@lists.sourceforge.net 4930L: tipc-discussion@lists.sourceforge.net
5734W: http://tipc.sourceforge.net/ 4931W: http://tipc.sourceforge.net/
5735W: http://tipc.cslab.ericsson.net/ 4932W: http://tipc.cslab.ericsson.net/
@@ -5740,8 +4937,7 @@ F: include/net/tipc/
5740F: net/tipc/ 4937F: net/tipc/
5741 4938
5742TLAN NETWORK DRIVER 4939TLAN NETWORK DRIVER
5743P: Samuel Chessman 4940M: Samuel Chessman <chessman@tux.org>
5744M: chessman@tux.org
5745L: tlan-devel@lists.sourceforge.net (subscribers-only) 4941L: tlan-devel@lists.sourceforge.net (subscribers-only)
5746W: http://sourceforge.net/projects/tlan/ 4942W: http://sourceforge.net/projects/tlan/
5747S: Maintained 4943S: Maintained
@@ -5749,10 +4945,8 @@ F: Documentation/networking/tlan.txt
5749F: drivers/net/tlan.* 4945F: drivers/net/tlan.*
5750 4946
5751TOMOYO SECURITY MODULE 4947TOMOYO SECURITY MODULE
5752P: Kentaro Takeda 4948M: Kentaro Takeda <takedakn@nttdata.co.jp>
5753M: takedakn@nttdata.co.jp 4949M: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
5754P: Tetsuo Handa
5755M: penguin-kernel@I-love.SAKURA.ne.jp
5756L: tomoyo-users-en@lists.sourceforge.jp (subscribers-only, for developers and users in English) 4950L: tomoyo-users-en@lists.sourceforge.jp (subscribers-only, for developers and users in English)
5757L: tomoyo-dev@lists.sourceforge.jp (subscribers-only, for developers in Japanese) 4951L: tomoyo-dev@lists.sourceforge.jp (subscribers-only, for developers in Japanese)
5758L: tomoyo-users@lists.sourceforge.jp (subscribers-only, for users in Japanese) 4952L: tomoyo-users@lists.sourceforge.jp (subscribers-only, for users in Japanese)
@@ -5766,8 +4960,7 @@ S: Orphan
5766F: drivers/platform/x86/toshiba_acpi.c 4960F: drivers/platform/x86/toshiba_acpi.c
5767 4961
5768TOSHIBA SMM DRIVER 4962TOSHIBA SMM DRIVER
5769P: Jonathan Buzzard 4963M: Jonathan Buzzard <jonathan@buzzard.org.uk>
5770M: jonathan@buzzard.org.uk
5771L: tlinux-users@tce.toshiba-dme.co.jp 4964L: tlinux-users@tce.toshiba-dme.co.jp
5772W: http://www.buzzard.org.uk/toshiba/ 4965W: http://www.buzzard.org.uk/toshiba/
5773S: Maintained 4966S: Maintained
@@ -5775,43 +4968,36 @@ F: drivers/char/toshiba.c
5775F: include/linux/toshiba.h 4968F: include/linux/toshiba.h
5776 4969
5777TMIO MMC DRIVER 4970TMIO MMC DRIVER
5778P: Ian Molton 4971M: Ian Molton <ian@mnementh.co.uk>
5779M: ian@mnementh.co.uk
5780S: Maintained 4972S: Maintained
5781F: drivers/mmc/host/tmio_mmc.* 4973F: drivers/mmc/host/tmio_mmc.*
5782 4974
5783TMPFS (SHMEM FILESYSTEM) 4975TMPFS (SHMEM FILESYSTEM)
5784P: Hugh Dickins 4976M: Hugh Dickins <hugh.dickins@tiscali.co.uk>
5785M: hugh.dickins@tiscali.co.uk
5786L: linux-mm@kvack.org 4977L: linux-mm@kvack.org
5787S: Maintained 4978S: Maintained
5788F: include/linux/shmem_fs.h 4979F: include/linux/shmem_fs.h
5789F: mm/shmem.c 4980F: mm/shmem.c
5790 4981
5791TPM DEVICE DRIVER 4982TPM DEVICE DRIVER
5792P: Debora Velarde 4983M: Debora Velarde <debora@linux.vnet.ibm.com>
5793M: debora@linux.vnet.ibm.com 4984M: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
5794P: Rajiv Andrade
5795M: srajiv@linux.vnet.ibm.com
5796W: http://tpmdd.sourceforge.net 4985W: http://tpmdd.sourceforge.net
5797P: Marcel Selhorst 4986M: Marcel Selhorst <m.selhorst@sirrix.com>
5798M: m.selhorst@sirrix.com
5799W: http://www.sirrix.com 4987W: http://www.sirrix.com
5800L: tpmdd-devel@lists.sourceforge.net (moderated for non-subscribers) 4988L: tpmdd-devel@lists.sourceforge.net (moderated for non-subscribers)
5801S: Maintained 4989S: Maintained
5802F: drivers/char/tpm/ 4990F: drivers/char/tpm/
5803 4991
5804TRIVIAL PATCHES 4992TRIVIAL PATCHES
5805P: Jiri Kosina 4993M: Jiri Kosina <trivial@kernel.org>
5806M: trivial@kernel.org
5807T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial.git 4994T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial.git
5808S: Maintained 4995S: Maintained
5809 4996
5810TTY LAYER 4997TTY LAYER
5811P: Alan Cox 4998M: Greg Kroah-Hartman <gregkh@suse.de>
5812M: alan@lxorguk.ukuu.org.uk
5813S: Maintained 4999S: Maintained
5814T: stgit http://zeniv.linux.org.uk/~alan/ttydev/ 5000T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
5815F: drivers/char/tty_* 5001F: drivers/char/tty_*
5816F: drivers/serial/serial_core.c 5002F: drivers/serial/serial_core.c
5817F: include/linux/serial_core.h 5003F: include/linux/serial_core.h
@@ -5819,17 +5005,14 @@ F: include/linux/serial.h
5819F: include/linux/tty.h 5005F: include/linux/tty.h
5820 5006
5821TULIP NETWORK DRIVERS 5007TULIP NETWORK DRIVERS
5822P: Grant Grundler 5008M: Grant Grundler <grundler@parisc-linux.org>
5823M: grundler@parisc-linux.org 5009M: Kyle McMartin <kyle@mcmartin.ca>
5824P: Kyle McMartin
5825M: kyle@mcmartin.ca
5826L: netdev@vger.kernel.org 5010L: netdev@vger.kernel.org
5827S: Maintained 5011S: Maintained
5828F: drivers/net/tulip/ 5012F: drivers/net/tulip/
5829 5013
5830TUN/TAP driver 5014TUN/TAP driver
5831P: Maxim Krasnyansky 5015M: Maxim Krasnyansky <maxk@qualcomm.com>
5832M: maxk@qualcomm.com
5833L: vtun@office.satix.net 5016L: vtun@office.satix.net
5834W: http://vtun.sourceforge.net/tun 5017W: http://vtun.sourceforge.net/tun
5835S: Maintained 5018S: Maintained
@@ -5837,24 +5020,20 @@ F: Documentation/networking/tuntap.txt
5837F: arch/um/os-Linux/drivers/ 5020F: arch/um/os-Linux/drivers/
5838 5021
5839TURBOCHANNEL SUBSYSTEM 5022TURBOCHANNEL SUBSYSTEM
5840P: Maciej W. Rozycki 5023M: "Maciej W. Rozycki" <macro@linux-mips.org>
5841M: macro@linux-mips.org
5842S: Maintained 5024S: Maintained
5843F: drivers/tc/ 5025F: drivers/tc/
5844F: include/linux/tc.h 5026F: include/linux/tc.h
5845 5027
5846U14-34F SCSI DRIVER 5028U14-34F SCSI DRIVER
5847P: Dario Ballabio 5029M: Dario Ballabio <ballabio_dario@emc.com>
5848M: ballabio_dario@emc.com
5849L: linux-scsi@vger.kernel.org 5030L: linux-scsi@vger.kernel.org
5850S: Maintained 5031S: Maintained
5851F: drivers/scsi/u14-34f.c 5032F: drivers/scsi/u14-34f.c
5852 5033
5853UBI FILE SYSTEM (UBIFS) 5034UBI FILE SYSTEM (UBIFS)
5854P: Artem Bityutskiy 5035M: Artem Bityutskiy <dedekind@infradead.org>
5855M: dedekind@infradead.org 5036M: Adrian Hunter <adrian.hunter@nokia.com>
5856P: Adrian Hunter
5857M: adrian.hunter@nokia.com
5858L: linux-mtd@lists.infradead.org 5037L: linux-mtd@lists.infradead.org
5859T: git git://git.infradead.org/ubifs-2.6.git 5038T: git git://git.infradead.org/ubifs-2.6.git
5860W: http://www.linux-mtd.infradead.org/doc/ubifs.html 5039W: http://www.linux-mtd.infradead.org/doc/ubifs.html
@@ -5863,37 +5042,32 @@ F: Documentation/filesystems/ubifs.txt
5863F: fs/ubifs/ 5042F: fs/ubifs/
5864 5043
5865UCLINUX (AND M68KNOMMU) 5044UCLINUX (AND M68KNOMMU)
5866P: Greg Ungerer 5045M: Greg Ungerer <gerg@uclinux.org>
5867M: gerg@uclinux.org
5868W: http://www.uclinux.org/ 5046W: http://www.uclinux.org/
5869L: uclinux-dev@uclinux.org (subscribers-only) 5047L: uclinux-dev@uclinux.org (subscribers-only)
5870S: Maintained 5048S: Maintained
5871F: arch/m68knommu/ 5049F: arch/m68knommu/
5872 5050
5873UCLINUX FOR RENESAS H8/300 (H8300) 5051UCLINUX FOR RENESAS H8/300 (H8300)
5874P: Yoshinori Sato 5052M: Yoshinori Sato <ysato@users.sourceforge.jp>
5875M: ysato@users.sourceforge.jp
5876W: http://uclinux-h8.sourceforge.jp/ 5053W: http://uclinux-h8.sourceforge.jp/
5877S: Supported 5054S: Supported
5878 5055
5879UDF FILESYSTEM 5056UDF FILESYSTEM
5880P: Jan Kara 5057M: Jan Kara <jack@suse.cz>
5881M: jack@suse.cz
5882W: http://linux-udf.sourceforge.net 5058W: http://linux-udf.sourceforge.net
5883S: Maintained 5059S: Maintained
5884F: Documentation/filesystems/udf.txt 5060F: Documentation/filesystems/udf.txt
5885F: fs/udf/ 5061F: fs/udf/
5886 5062
5887UFS FILESYSTEM 5063UFS FILESYSTEM
5888P: Evgeniy Dushistov 5064M: Evgeniy Dushistov <dushistov@mail.ru>
5889M: dushistov@mail.ru
5890S: Maintained 5065S: Maintained
5891F: Documentation/filesystems/ufs.txt 5066F: Documentation/filesystems/ufs.txt
5892F: fs/ufs/ 5067F: fs/ufs/
5893 5068
5894ULTRA-WIDEBAND (UWB) SUBSYSTEM: 5069ULTRA-WIDEBAND (UWB) SUBSYSTEM:
5895P: David Vrabel 5070M: David Vrabel <david.vrabel@csr.com>
5896M: david.vrabel@csr.com
5897L: linux-usb@vger.kernel.org 5071L: linux-usb@vger.kernel.org
5898S: Supported 5072S: Supported
5899F: drivers/uwb/* 5073F: drivers/uwb/*
@@ -5901,8 +5075,7 @@ F: include/linux/uwb.h
5901F: include/linux/uwb/ 5075F: include/linux/uwb/
5902 5076
5903UNIFORM CDROM DRIVER 5077UNIFORM CDROM DRIVER
5904P: Jens Axboe 5078M: Jens Axboe <axboe@kernel.dk>
5905M: axboe@kernel.dk
5906W: http://www.kernel.dk 5079W: http://www.kernel.dk
5907S: Maintained 5080S: Maintained
5908F: Documentation/cdrom/ 5081F: Documentation/cdrom/
@@ -5910,8 +5083,7 @@ F: drivers/cdrom/cdrom.c
5910F: include/linux/cdrom.h 5083F: include/linux/cdrom.h
5911 5084
5912UNSORTED BLOCK IMAGES (UBI) 5085UNSORTED BLOCK IMAGES (UBI)
5913P: Artem Bityutskiy 5086M: Artem Bityutskiy <dedekind@infradead.org>
5914M: dedekind@infradead.org
5915W: http://www.linux-mtd.infradead.org/ 5087W: http://www.linux-mtd.infradead.org/
5916L: linux-mtd@lists.infradead.org 5088L: linux-mtd@lists.infradead.org
5917T: git git://git.infradead.org/ubi-2.6.git 5089T: git git://git.infradead.org/ubi-2.6.git
@@ -5921,23 +5093,20 @@ F: include/linux/mtd/ubi.h
5921F: include/mtd/ubi-user.h 5093F: include/mtd/ubi-user.h
5922 5094
5923USB ACM DRIVER 5095USB ACM DRIVER
5924P: Oliver Neukum 5096M: Oliver Neukum <oliver@neukum.name>
5925M: oliver@neukum.name
5926L: linux-usb@vger.kernel.org 5097L: linux-usb@vger.kernel.org
5927S: Maintained 5098S: Maintained
5928F: Documentation/usb/acm.txt 5099F: Documentation/usb/acm.txt
5929F: drivers/usb/class/cdc-acm.* 5100F: drivers/usb/class/cdc-acm.*
5930 5101
5931USB BLOCK DRIVER (UB ub) 5102USB BLOCK DRIVER (UB ub)
5932P: Pete Zaitcev 5103M: Pete Zaitcev <zaitcev@redhat.com>
5933M: zaitcev@redhat.com
5934L: linux-usb@vger.kernel.org 5104L: linux-usb@vger.kernel.org
5935S: Supported 5105S: Supported
5936F: drivers/block/ub.c 5106F: drivers/block/ub.c
5937 5107
5938USB CDC ETHERNET DRIVER 5108USB CDC ETHERNET DRIVER
5939P: Greg Kroah-Hartman 5109M: Greg Kroah-Hartman <greg@kroah.com>
5940M: greg@kroah.com
5941L: linux-usb@vger.kernel.org 5110L: linux-usb@vger.kernel.org
5942S: Maintained 5111S: Maintained
5943W: http://www.kroah.com/linux-usb/ 5112W: http://www.kroah.com/linux-usb/
@@ -5945,39 +5114,34 @@ F: drivers/net/usb/cdc_*.c
5945F: include/linux/usb/cdc.h 5114F: include/linux/usb/cdc.h
5946 5115
5947USB CYPRESS C67X00 DRIVER 5116USB CYPRESS C67X00 DRIVER
5948P: Peter Korsgaard 5117M: Peter Korsgaard <jacmet@sunsite.dk>
5949M: jacmet@sunsite.dk
5950L: linux-usb@vger.kernel.org 5118L: linux-usb@vger.kernel.org
5951S: Maintained 5119S: Maintained
5952F: drivers/usb/c67x00/ 5120F: drivers/usb/c67x00/
5953 5121
5954USB DAVICOM DM9601 DRIVER 5122USB DAVICOM DM9601 DRIVER
5955P: Peter Korsgaard 5123M: Peter Korsgaard <jacmet@sunsite.dk>
5956M: jacmet@sunsite.dk
5957L: netdev@vger.kernel.org 5124L: netdev@vger.kernel.org
5958W: http://www.linux-usb.org/usbnet 5125W: http://www.linux-usb.org/usbnet
5959S: Maintained 5126S: Maintained
5960F: drivers/net/usb/dm9601.c 5127F: drivers/net/usb/dm9601.c
5961 5128
5962USB DIAMOND RIO500 DRIVER 5129USB DIAMOND RIO500 DRIVER
5963P: Cesar Miquel 5130M: Cesar Miquel <miquel@df.uba.ar>
5964M: miquel@df.uba.ar
5965L: rio500-users@lists.sourceforge.net 5131L: rio500-users@lists.sourceforge.net
5966W: http://rio500.sourceforge.net 5132W: http://rio500.sourceforge.net
5967S: Maintained 5133S: Maintained
5968F: drivers/usb/misc/rio500* 5134F: drivers/usb/misc/rio500*
5969 5135
5970USB EHCI DRIVER 5136USB EHCI DRIVER
5971P: David Brownell 5137M: David Brownell <dbrownell@users.sourceforge.net>
5972M: dbrownell@users.sourceforge.net
5973L: linux-usb@vger.kernel.org 5138L: linux-usb@vger.kernel.org
5974S: Odd Fixes 5139S: Odd Fixes
5975F: Documentation/usb/ehci.txt 5140F: Documentation/usb/ehci.txt
5976F: drivers/usb/host/ehci* 5141F: drivers/usb/host/ehci*
5977 5142
5978USB ET61X[12]51 DRIVER 5143USB ET61X[12]51 DRIVER
5979P: Luca Risolia 5144M: Luca Risolia <luca.risolia@studio.unibo.it>
5980M: luca.risolia@studio.unibo.it
5981L: linux-usb@vger.kernel.org 5145L: linux-usb@vger.kernel.org
5982L: linux-media@vger.kernel.org 5146L: linux-media@vger.kernel.org
5983T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 5147T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
@@ -5986,8 +5150,7 @@ S: Maintained
5986F: drivers/media/video/et61x251/ 5150F: drivers/media/video/et61x251/
5987 5151
5988USB GADGET/PERIPHERAL SUBSYSTEM 5152USB GADGET/PERIPHERAL SUBSYSTEM
5989P: David Brownell 5153M: David Brownell <dbrownell@users.sourceforge.net>
5990M: dbrownell@users.sourceforge.net
5991L: linux-usb@vger.kernel.org 5154L: linux-usb@vger.kernel.org
5992W: http://www.linux-usb.org/gadget 5155W: http://www.linux-usb.org/gadget
5993S: Maintained 5156S: Maintained
@@ -5995,8 +5158,7 @@ F: drivers/usb/gadget/
5995F: include/linux/usb/gadget* 5158F: include/linux/usb/gadget*
5996 5159
5997USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REMOTE CONTROLS, ...) 5160USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REMOTE CONTROLS, ...)
5998P: Jiri Kosina 5161M: Jiri Kosina <jkosina@suse.cz>
5999M: jkosina@suse.cz
6000L: linux-usb@vger.kernel.org 5162L: linux-usb@vger.kernel.org
6001T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git 5163T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git
6002S: Maintained 5164S: Maintained
@@ -6004,23 +5166,20 @@ F: Documentation/usb/hiddev.txt
6004F: drivers/hid/usbhid/ 5166F: drivers/hid/usbhid/
6005 5167
6006USB ISP116X DRIVER 5168USB ISP116X DRIVER
6007P: Olav Kongas 5169M: Olav Kongas <ok@artecdesign.ee>
6008M: ok@artecdesign.ee
6009L: linux-usb@vger.kernel.org 5170L: linux-usb@vger.kernel.org
6010S: Maintained 5171S: Maintained
6011F: drivers/usb/host/isp116x* 5172F: drivers/usb/host/isp116x*
6012F: include/linux/usb/isp116x.h 5173F: include/linux/usb/isp116x.h
6013 5174
6014USB KAWASAKI LSI DRIVER 5175USB KAWASAKI LSI DRIVER
6015P: Oliver Neukum 5176M: Oliver Neukum <oliver@neukum.name>
6016M: oliver@neukum.name
6017L: linux-usb@vger.kernel.org 5177L: linux-usb@vger.kernel.org
6018S: Maintained 5178S: Maintained
6019F: drivers/usb/serial/kl5kusb105.* 5179F: drivers/usb/serial/kl5kusb105.*
6020 5180
6021USB MASS STORAGE DRIVER 5181USB MASS STORAGE DRIVER
6022P: Matthew Dharm 5182M: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
6023M: mdharm-usb@one-eyed-alien.net
6024L: linux-usb@vger.kernel.org 5183L: linux-usb@vger.kernel.org
6025L: usb-storage@lists.one-eyed-alien.net 5184L: usb-storage@lists.one-eyed-alien.net
6026S: Maintained 5185S: Maintained
@@ -6028,31 +5187,27 @@ W: http://www.one-eyed-alien.net/~mdharm/linux-usb/
6028F: drivers/usb/storage/ 5187F: drivers/usb/storage/
6029 5188
6030USB OHCI DRIVER 5189USB OHCI DRIVER
6031P: David Brownell 5190M: David Brownell <dbrownell@users.sourceforge.net>
6032M: dbrownell@users.sourceforge.net
6033L: linux-usb@vger.kernel.org 5191L: linux-usb@vger.kernel.org
6034S: Odd Fixes 5192S: Odd Fixes
6035F: Documentation/usb/ohci.txt 5193F: Documentation/usb/ohci.txt
6036F: drivers/usb/host/ohci* 5194F: drivers/usb/host/ohci*
6037 5195
6038USB OPTION-CARD DRIVER 5196USB OPTION-CARD DRIVER
6039P: Matthias Urlichs 5197M: Matthias Urlichs <smurf@smurf.noris.de>
6040M: smurf@smurf.noris.de
6041L: linux-usb@vger.kernel.org 5198L: linux-usb@vger.kernel.org
6042S: Maintained 5199S: Maintained
6043F: drivers/usb/serial/option.c 5200F: drivers/usb/serial/option.c
6044 5201
6045USB OV511 DRIVER 5202USB OV511 DRIVER
6046P: Mark McClelland 5203M: Mark McClelland <mmcclell@bigfoot.com>
6047M: mmcclell@bigfoot.com
6048L: linux-usb@vger.kernel.org 5204L: linux-usb@vger.kernel.org
6049W: http://alpha.dyndns.org/ov511/ 5205W: http://alpha.dyndns.org/ov511/
6050S: Maintained 5206S: Maintained
6051F: drivers/media/video/ov511.* 5207F: drivers/media/video/ov511.*
6052 5208
6053USB PEGASUS DRIVER 5209USB PEGASUS DRIVER
6054P: Petko Manolov 5210M: Petko Manolov <petkan@users.sourceforge.net>
6055M: petkan@users.sourceforge.net
6056L: linux-usb@vger.kernel.org 5211L: linux-usb@vger.kernel.org
6057L: netdev@vger.kernel.org 5212L: netdev@vger.kernel.org
6058W: http://pegasus2.sourceforge.net/ 5213W: http://pegasus2.sourceforge.net/
@@ -6060,15 +5215,13 @@ S: Maintained
6060F: drivers/net/usb/pegasus.* 5215F: drivers/net/usb/pegasus.*
6061 5216
6062USB PRINTER DRIVER (usblp) 5217USB PRINTER DRIVER (usblp)
6063P: Pete Zaitcev 5218M: Pete Zaitcev <zaitcev@redhat.com>
6064M: zaitcev@redhat.com
6065L: linux-usb@vger.kernel.org 5219L: linux-usb@vger.kernel.org
6066S: Supported 5220S: Supported
6067F: drivers/usb/class/usblp.c 5221F: drivers/usb/class/usblp.c
6068 5222
6069USB RTL8150 DRIVER 5223USB RTL8150 DRIVER
6070P: Petko Manolov 5224M: Petko Manolov <petkan@users.sourceforge.net>
6071M: petkan@users.sourceforge.net
6072L: linux-usb@vger.kernel.org 5225L: linux-usb@vger.kernel.org
6073L: netdev@vger.kernel.org 5226L: netdev@vger.kernel.org
6074W: http://pegasus2.sourceforge.net/ 5227W: http://pegasus2.sourceforge.net/
@@ -6076,8 +5229,7 @@ S: Maintained
6076F: drivers/net/usb/rtl8150.c 5229F: drivers/net/usb/rtl8150.c
6077 5230
6078USB SE401 DRIVER 5231USB SE401 DRIVER
6079P: Jeroen Vreeken 5232M: Jeroen Vreeken <pe1rxq@amsat.org>
6080M: pe1rxq@amsat.org
6081L: linux-usb@vger.kernel.org 5233L: linux-usb@vger.kernel.org
6082W: http://www.chello.nl/~j.vreeken/se401/ 5234W: http://www.chello.nl/~j.vreeken/se401/
6083S: Maintained 5235S: Maintained
@@ -6085,15 +5237,13 @@ F: Documentation/video4linux/se401.txt
6085F: drivers/media/video/se401.* 5237F: drivers/media/video/se401.*
6086 5238
6087USB SERIAL BELKIN F5U103 DRIVER 5239USB SERIAL BELKIN F5U103 DRIVER
6088P: William Greathouse 5240M: William Greathouse <wgreathouse@smva.com>
6089M: wgreathouse@smva.com
6090L: linux-usb@vger.kernel.org 5241L: linux-usb@vger.kernel.org
6091S: Maintained 5242S: Maintained
6092F: drivers/usb/serial/belkin_sa.* 5243F: drivers/usb/serial/belkin_sa.*
6093 5244
6094USB SERIAL CYPRESS M8 DRIVER 5245USB SERIAL CYPRESS M8 DRIVER
6095P: Lonnie Mendez 5246M: Lonnie Mendez <dignome@gmail.com>
6096M: dignome@gmail.com
6097L: linux-usb@vger.kernel.org 5247L: linux-usb@vger.kernel.org
6098S: Maintained 5248S: Maintained
6099W: http://geocities.com/i0xox0i 5249W: http://geocities.com/i0xox0i
@@ -6101,23 +5251,20 @@ W: http://firstlight.net/cvs
6101F: drivers/usb/serial/cypress_m8.* 5251F: drivers/usb/serial/cypress_m8.*
6102 5252
6103USB SERIAL CYBERJACK DRIVER 5253USB SERIAL CYBERJACK DRIVER
6104P: Matthias Bruestle and Harald Welte 5254M: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
6105M: support@reiner-sct.com
6106W: http://www.reiner-sct.de/support/treiber_cyberjack.php 5255W: http://www.reiner-sct.de/support/treiber_cyberjack.php
6107S: Maintained 5256S: Maintained
6108F: drivers/usb/serial/cyberjack.c 5257F: drivers/usb/serial/cyberjack.c
6109 5258
6110USB SERIAL DIGI ACCELEPORT DRIVER 5259USB SERIAL DIGI ACCELEPORT DRIVER
6111P: Peter Berger and Al Borchers 5260M: Peter Berger <pberger@brimson.com>
6112M: pberger@brimson.com 5261M: Al Borchers <alborchers@steinerpoint.com>
6113M: alborchers@steinerpoint.com
6114L: linux-usb@vger.kernel.org 5262L: linux-usb@vger.kernel.org
6115S: Maintained 5263S: Maintained
6116F: drivers/usb/serial/digi_acceleport.c 5264F: drivers/usb/serial/digi_acceleport.c
6117 5265
6118USB SERIAL DRIVER 5266USB SERIAL DRIVER
6119P: Greg Kroah-Hartman 5267M: Greg Kroah-Hartman <gregkh@suse.de>
6120M: gregkh@suse.de
6121L: linux-usb@vger.kernel.org 5268L: linux-usb@vger.kernel.org
6122S: Supported 5269S: Supported
6123F: Documentation/usb/usb-serial.txt 5270F: Documentation/usb/usb-serial.txt
@@ -6126,38 +5273,33 @@ F: drivers/usb/serial/usb-serial.c
6126F: include/linux/usb/serial.h 5273F: include/linux/usb/serial.h
6127 5274
6128USB SERIAL EMPEG EMPEG-CAR MARK I/II DRIVER 5275USB SERIAL EMPEG EMPEG-CAR MARK I/II DRIVER
6129P: Gary Brubaker 5276M: Gary Brubaker <xavyer@ix.netcom.com>
6130M: xavyer@ix.netcom.com
6131L: linux-usb@vger.kernel.org 5277L: linux-usb@vger.kernel.org
6132S: Maintained 5278S: Maintained
6133F: drivers/usb/serial/empeg.c 5279F: drivers/usb/serial/empeg.c
6134 5280
6135USB SERIAL KEYSPAN DRIVER 5281USB SERIAL KEYSPAN DRIVER
6136P: Greg Kroah-Hartman 5282M: Greg Kroah-Hartman <greg@kroah.com>
6137M: greg@kroah.com
6138L: linux-usb@vger.kernel.org 5283L: linux-usb@vger.kernel.org
6139W: http://www.kroah.com/linux/ 5284W: http://www.kroah.com/linux/
6140S: Maintained 5285S: Maintained
6141F: drivers/usb/serial/*keyspan* 5286F: drivers/usb/serial/*keyspan*
6142 5287
6143USB SERIAL WHITEHEAT DRIVER 5288USB SERIAL WHITEHEAT DRIVER
6144P: Support Department 5289M: Support Department <support@connecttech.com>
6145M: support@connecttech.com
6146L: linux-usb@vger.kernel.org 5290L: linux-usb@vger.kernel.org
6147W: http://www.connecttech.com 5291W: http://www.connecttech.com
6148S: Supported 5292S: Supported
6149F: drivers/usb/serial/whiteheat* 5293F: drivers/usb/serial/whiteheat*
6150 5294
6151USB SMSC95XX ETHERNET DRIVER 5295USB SMSC95XX ETHERNET DRIVER
6152P: Steve Glendinning 5296M: Steve Glendinning <steve.glendinning@smsc.com>
6153M: steve.glendinning@smsc.com
6154L: netdev@vger.kernel.org 5297L: netdev@vger.kernel.org
6155S: Supported 5298S: Supported
6156F: drivers/net/usb/smsc95xx.* 5299F: drivers/net/usb/smsc95xx.*
6157 5300
6158USB SN9C1xx DRIVER 5301USB SN9C1xx DRIVER
6159P: Luca Risolia 5302M: Luca Risolia <luca.risolia@studio.unibo.it>
6160M: luca.risolia@studio.unibo.it
6161L: linux-usb@vger.kernel.org 5303L: linux-usb@vger.kernel.org
6162L: linux-media@vger.kernel.org 5304L: linux-media@vger.kernel.org
6163T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 5305T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
@@ -6167,8 +5309,7 @@ F: Documentation/video4linux/sn9c102.txt
6167F: drivers/media/video/sn9c102/ 5309F: drivers/media/video/sn9c102/
6168 5310
6169USB SUBSYSTEM 5311USB SUBSYSTEM
6170P: Greg Kroah-Hartman 5312M: Greg Kroah-Hartman <gregkh@suse.de>
6171M: gregkh@suse.de
6172L: linux-usb@vger.kernel.org 5313L: linux-usb@vger.kernel.org
6173W: http://www.linux-usb.org 5314W: http://www.linux-usb.org
6174T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ 5315T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
@@ -6180,15 +5321,13 @@ F: include/linux/usb.h
6180F: include/linux/usb/ 5321F: include/linux/usb/
6181 5322
6182USB UHCI DRIVER 5323USB UHCI DRIVER
6183P: Alan Stern 5324M: Alan Stern <stern@rowland.harvard.edu>
6184M: stern@rowland.harvard.edu
6185L: linux-usb@vger.kernel.org 5325L: linux-usb@vger.kernel.org
6186S: Maintained 5326S: Maintained
6187F: drivers/usb/host/uhci* 5327F: drivers/usb/host/uhci*
6188 5328
6189USB "USBNET" DRIVER FRAMEWORK 5329USB "USBNET" DRIVER FRAMEWORK
6190P: David Brownell 5330M: David Brownell <dbrownell@users.sourceforge.net>
6191M: dbrownell@users.sourceforge.net
6192L: netdev@vger.kernel.org 5331L: netdev@vger.kernel.org
6193W: http://www.linux-usb.org/usbnet 5332W: http://www.linux-usb.org/usbnet
6194S: Maintained 5333S: Maintained
@@ -6196,8 +5335,7 @@ F: drivers/net/usb/usbnet.c
6196F: include/linux/usb/usbnet.h 5335F: include/linux/usb/usbnet.h
6197 5336
6198USB VIDEO CLASS 5337USB VIDEO CLASS
6199P: Laurent Pinchart 5338M: Laurent Pinchart <laurent.pinchart@skynet.be>
6200M: laurent.pinchart@skynet.be
6201L: linux-uvc-devel@lists.berlios.de (subscribers-only) 5339L: linux-uvc-devel@lists.berlios.de (subscribers-only)
6202L: linux-media@vger.kernel.org 5340L: linux-media@vger.kernel.org
6203T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 5341T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
@@ -6206,8 +5344,7 @@ S: Maintained
6206F: drivers/media/video/uvc/ 5344F: drivers/media/video/uvc/
6207 5345
6208USB W996[87]CF DRIVER 5346USB W996[87]CF DRIVER
6209P: Luca Risolia 5347M: Luca Risolia <luca.risolia@studio.unibo.it>
6210M: luca.risolia@studio.unibo.it
6211L: linux-usb@vger.kernel.org 5348L: linux-usb@vger.kernel.org
6212L: linux-media@vger.kernel.org 5349L: linux-media@vger.kernel.org
6213T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 5350T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
@@ -6217,21 +5354,18 @@ F: Documentation/video4linux/w9968cf.txt
6217F: drivers/media/video/w996* 5354F: drivers/media/video/w996*
6218 5355
6219USB WIRELESS RNDIS DRIVER (rndis_wlan) 5356USB WIRELESS RNDIS DRIVER (rndis_wlan)
6220P: Jussi Kivilinna 5357M: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
6221M: jussi.kivilinna@mbnet.fi
6222L: linux-wireless@vger.kernel.org 5358L: linux-wireless@vger.kernel.org
6223S: Maintained 5359S: Maintained
6224F: drivers/net/wireless/rndis_wlan.c 5360F: drivers/net/wireless/rndis_wlan.c
6225 5361
6226USB XHCI DRIVER 5362USB XHCI DRIVER
6227P: Sarah Sharp 5363M: Sarah Sharp <sarah.a.sharp@intel.com>
6228M: sarah.a.sharp@intel.com
6229L: linux-usb@vger.kernel.org 5364L: linux-usb@vger.kernel.org
6230S: Supported 5365S: Supported
6231 5366
6232USB ZC0301 DRIVER 5367USB ZC0301 DRIVER
6233P: Luca Risolia 5368M: Luca Risolia <luca.risolia@studio.unibo.it>
6234M: luca.risolia@studio.unibo.it
6235L: linux-usb@vger.kernel.org 5369L: linux-usb@vger.kernel.org
6236L: linux-media@vger.kernel.org 5370L: linux-media@vger.kernel.org
6237T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 5371T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
@@ -6241,16 +5375,14 @@ F: Documentation/video4linux/zc0301.txt
6241F: drivers/media/video/zc0301/ 5375F: drivers/media/video/zc0301/
6242 5376
6243USB ZD1201 DRIVER 5377USB ZD1201 DRIVER
6244P: Jeroen Vreeken 5378M: Jeroen Vreeken <pe1rxq@amsat.org>
6245M: pe1rxq@amsat.org
6246L: linux-usb@vger.kernel.org 5379L: linux-usb@vger.kernel.org
6247W: http://linux-lc100020.sourceforge.net 5380W: http://linux-lc100020.sourceforge.net
6248S: Maintained 5381S: Maintained
6249F: drivers/net/wireless/zd1201.* 5382F: drivers/net/wireless/zd1201.*
6250 5383
6251USB ZR364XX DRIVER 5384USB ZR364XX DRIVER
6252P: Antoine Jacquet 5385M: Antoine Jacquet <royale@zerezo.com>
6253M: royale@zerezo.com
6254L: linux-usb@vger.kernel.org 5386L: linux-usb@vger.kernel.org
6255L: linux-media@vger.kernel.org 5387L: linux-media@vger.kernel.org
6256T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 5388T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
@@ -6260,8 +5392,7 @@ F: Documentation/video4linux/zr364xx.txt
6260F: drivers/media/video/zr364xx.c 5392F: drivers/media/video/zr364xx.c
6261 5393
6262USER-MODE LINUX (UML) 5394USER-MODE LINUX (UML)
6263P: Jeff Dike 5395M: Jeff Dike <jdike@addtoit.com>
6264M: jdike@addtoit.com
6265L: user-mode-linux-devel@lists.sourceforge.net 5396L: user-mode-linux-devel@lists.sourceforge.net
6266L: user-mode-linux-user@lists.sourceforge.net 5397L: user-mode-linux-user@lists.sourceforge.net
6267W: http://user-mode-linux.sourceforge.net 5398W: http://user-mode-linux.sourceforge.net
@@ -6272,26 +5403,22 @@ F: fs/hostfs/
6272F: fs/hppfs/ 5403F: fs/hppfs/
6273 5404
6274USERSPACE I/O (UIO) 5405USERSPACE I/O (UIO)
6275P: Hans J. Koch 5406M: "Hans J. Koch" <hjk@linutronix.de>
6276M: hjk@linutronix.de 5407M: Greg Kroah-Hartman <gregkh@suse.de>
6277P: Greg Kroah-Hartman
6278M: gregkh@suse.de
6279S: Maintained 5408S: Maintained
6280F: Documentation/DocBook/uio-howto.tmpl 5409F: Documentation/DocBook/uio-howto.tmpl
6281F: drivers/uio/ 5410F: drivers/uio/
6282F: include/linux/uio*.h 5411F: include/linux/uio*.h
6283 5412
6284UTIL-LINUX-NG PACKAGE 5413UTIL-LINUX-NG PACKAGE
6285P: Karel Zak 5414M: Karel Zak <kzak@redhat.com>
6286M: kzak@redhat.com
6287L: util-linux-ng@vger.kernel.org 5415L: util-linux-ng@vger.kernel.org
6288W: http://kernel.org/~kzak/util-linux-ng/ 5416W: http://kernel.org/~kzak/util-linux-ng/
6289T: git git://git.kernel.org/pub/scm/utils/util-linux-ng/util-linux-ng.git 5417T: git git://git.kernel.org/pub/scm/utils/util-linux-ng/util-linux-ng.git
6290S: Maintained 5418S: Maintained
6291 5419
6292UVESAFB DRIVER 5420UVESAFB DRIVER
6293P: Michal Januszewski 5421M: Michal Januszewski <spock@gentoo.org>
6294M: spock@gentoo.org
6295L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers) 5422L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers)
6296W: http://dev.gentoo.org/~spock/projects/uvesafb/ 5423W: http://dev.gentoo.org/~spock/projects/uvesafb/
6297S: Maintained 5424S: Maintained
@@ -6299,53 +5426,44 @@ F: Documentation/fb/uvesafb.txt
6299F: drivers/video/uvesafb.* 5426F: drivers/video/uvesafb.*
6300 5427
6301VFAT/FAT/MSDOS FILESYSTEM 5428VFAT/FAT/MSDOS FILESYSTEM
6302P: OGAWA Hirofumi 5429M: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
6303M: hirofumi@mail.parknet.co.jp
6304S: Maintained 5430S: Maintained
6305F: Documentation/filesystems/vfat.txt 5431F: Documentation/filesystems/vfat.txt
6306F: fs/fat/ 5432F: fs/fat/
6307 5433
6308VIA RHINE NETWORK DRIVER 5434VIA RHINE NETWORK DRIVER
6309P: Roger Luethi 5435M: Roger Luethi <rl@hellgate.ch>
6310M: rl@hellgate.ch
6311S: Maintained 5436S: Maintained
6312F: drivers/net/via-rhine.c 5437F: drivers/net/via-rhine.c
6313 5438
6314VIAPRO SMBUS DRIVER 5439VIAPRO SMBUS DRIVER
6315P: Jean Delvare 5440M: Jean Delvare <khali@linux-fr.org>
6316M: khali@linux-fr.org
6317L: linux-i2c@vger.kernel.org 5441L: linux-i2c@vger.kernel.org
6318S: Maintained 5442S: Maintained
6319F: Documentation/i2c/busses/i2c-viapro 5443F: Documentation/i2c/busses/i2c-viapro
6320F: drivers/i2c/busses/i2c-viapro.c 5444F: drivers/i2c/busses/i2c-viapro.c
6321 5445
6322VIA SD/MMC CARD CONTROLLER DRIVER 5446VIA SD/MMC CARD CONTROLLER DRIVER
6323P: Joseph Chan 5447M: Joseph Chan <JosephChan@via.com.tw>
6324M: JosephChan@via.com.tw 5448M: Harald Welte <HaraldWelte@viatech.com>
6325P: Harald Welte
6326M: HaraldWelte@viatech.com
6327S: Maintained 5449S: Maintained
6328F: drivers/mmc/host/via-sdmmc.c 5450F: drivers/mmc/host/via-sdmmc.c
6329 5451
6330VIA UNICHROME(PRO)/CHROME9 FRAMEBUFFER DRIVER 5452VIA UNICHROME(PRO)/CHROME9 FRAMEBUFFER DRIVER
6331P: Joseph Chan 5453M: Joseph Chan <JosephChan@via.com.tw>
6332M: JosephChan@via.com.tw 5454M: Scott Fang <ScottFang@viatech.com.cn>
6333P: Scott Fang
6334M: ScottFang@viatech.com.cn
6335L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers) 5455L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers)
6336S: Maintained 5456S: Maintained
6337F: drivers/video/via/ 5457F: drivers/video/via/
6338 5458
6339VIA VELOCITY NETWORK DRIVER 5459VIA VELOCITY NETWORK DRIVER
6340P: Francois Romieu 5460M: Francois Romieu <romieu@fr.zoreil.com>
6341M: romieu@fr.zoreil.com
6342L: netdev@vger.kernel.org 5461L: netdev@vger.kernel.org
6343S: Maintained 5462S: Maintained
6344F: drivers/net/via-velocity.* 5463F: drivers/net/via-velocity.*
6345 5464
6346VLAN (802.1Q) 5465VLAN (802.1Q)
6347P: Patrick McHardy 5466M: Patrick McHardy <kaber@trash.net>
6348M: kaber@trash.net
6349L: netdev@vger.kernel.org 5467L: netdev@vger.kernel.org
6350S: Maintained 5468S: Maintained
6351F: drivers/net/macvlan.c 5469F: drivers/net/macvlan.c
@@ -6353,18 +5471,15 @@ F: include/linux/if_*vlan.h
6353F: net/8021q/ 5471F: net/8021q/
6354 5472
6355VLYNQ BUS 5473VLYNQ BUS
6356P: Florian Fainelli 5474M: Florian Fainelli <florian@openwrt.org>
6357M: florian@openwrt.org
6358L: openwrt-devel@lists.openwrt.org 5475L: openwrt-devel@lists.openwrt.org
6359S: Maintained 5476S: Maintained
6360F: drivers/vlynq/vlynq.c 5477F: drivers/vlynq/vlynq.c
6361F: include/linux/vlynq.h 5478F: include/linux/vlynq.h
6362 5479
6363VOLTAGE AND CURRENT REGULATOR FRAMEWORK 5480VOLTAGE AND CURRENT REGULATOR FRAMEWORK
6364P: Liam Girdwood 5481M: Liam Girdwood <lrg@slimlogic.co.uk>
6365M: lrg@slimlogic.co.uk 5482M: Mark Brown <broonie@opensource.wolfsonmicro.com>
6366P: Mark Brown
6367M: broonie@opensource.wolfsonmicro.com
6368W: http://opensource.wolfsonmicro.com/node/15 5483W: http://opensource.wolfsonmicro.com/node/15
6369W: http://www.slimlogic.co.uk/?p=48 5484W: http://www.slimlogic.co.uk/?p=48
6370T: git git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6.git 5485T: git git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6.git
@@ -6373,52 +5488,45 @@ F: drivers/regulator/
6373F: include/linux/regulator/ 5488F: include/linux/regulator/
6374 5489
6375VT1211 HARDWARE MONITOR DRIVER 5490VT1211 HARDWARE MONITOR DRIVER
6376P: Juerg Haefliger 5491M: Juerg Haefliger <juergh@gmail.com>
6377M: juergh@gmail.com
6378L: lm-sensors@lm-sensors.org 5492L: lm-sensors@lm-sensors.org
6379S: Maintained 5493S: Maintained
6380F: Documentation/hwmon/vt1211 5494F: Documentation/hwmon/vt1211
6381F: drivers/hwmon/vt1211.c 5495F: drivers/hwmon/vt1211.c
6382 5496
6383VT8231 HARDWARE MONITOR DRIVER 5497VT8231 HARDWARE MONITOR DRIVER
6384P: Roger Lucas 5498M: Roger Lucas <vt8231@hiddenengine.co.uk>
6385M: vt8231@hiddenengine.co.uk
6386L: lm-sensors@lm-sensors.org 5499L: lm-sensors@lm-sensors.org
6387S: Maintained 5500S: Maintained
6388F: drivers/hwmon/vt8231.c 5501F: drivers/hwmon/vt8231.c
6389 5502
6390W1 DALLAS'S 1-WIRE BUS 5503W1 DALLAS'S 1-WIRE BUS
6391P: Evgeniy Polyakov 5504M: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
6392M: johnpol@2ka.mipt.ru
6393S: Maintained 5505S: Maintained
6394F: Documentation/w1/ 5506F: Documentation/w1/
6395F: drivers/w1/ 5507F: drivers/w1/
6396 5508
6397W83791D HARDWARE MONITORING DRIVER 5509W83791D HARDWARE MONITORING DRIVER
6398P: Marc Hulsman 5510M: Marc Hulsman <m.hulsman@tudelft.nl>
6399M: m.hulsman@tudelft.nl
6400L: lm-sensors@lm-sensors.org 5511L: lm-sensors@lm-sensors.org
6401S: Maintained 5512S: Maintained
6402F: Documentation/hwmon/w83791d 5513F: Documentation/hwmon/w83791d
6403F: drivers/hwmon/w83791d.c 5514F: drivers/hwmon/w83791d.c
6404 5515
6405W83793 HARDWARE MONITORING DRIVER 5516W83793 HARDWARE MONITORING DRIVER
6406P: Rudolf Marek 5517M: Rudolf Marek <r.marek@assembler.cz>
6407M: r.marek@assembler.cz
6408L: lm-sensors@lm-sensors.org 5518L: lm-sensors@lm-sensors.org
6409S: Maintained 5519S: Maintained
6410F: Documentation/hwmon/w83793 5520F: Documentation/hwmon/w83793
6411F: drivers/hwmon/w83793.c 5521F: drivers/hwmon/w83793.c
6412 5522
6413W83L51xD SD/MMC CARD INTERFACE DRIVER 5523W83L51xD SD/MMC CARD INTERFACE DRIVER
6414P: Pierre Ossman 5524M: Pierre Ossman <pierre@ossman.eu>
6415M: pierre@ossman.eu
6416S: Maintained 5525S: Maintained
6417F: drivers/mmc/host/wbsd.* 5526F: drivers/mmc/host/wbsd.*
6418 5527
6419WATCHDOG DEVICE DRIVERS 5528WATCHDOG DEVICE DRIVERS
6420P: Wim Van Sebroeck 5529M: Wim Van Sebroeck <wim@iguana.be>
6421M: wim@iguana.be
6422T: git git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git 5530T: git git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
6423S: Maintained 5531S: Maintained
6424F: Documentation/watchdog/ 5532F: Documentation/watchdog/
@@ -6426,8 +5534,7 @@ F: drivers/watchdog/
6426F: include/linux/watchdog.h 5534F: include/linux/watchdog.h
6427 5535
6428WAVELAN NETWORK DRIVER & WIRELESS EXTENSIONS 5536WAVELAN NETWORK DRIVER & WIRELESS EXTENSIONS
6429P: Jean Tourrilhes 5537M: Jean Tourrilhes <jt@hpl.hp.com>
6430M: jt@hpl.hp.com
6431L: linux-wireless@vger.kernel.org 5538L: linux-wireless@vger.kernel.org
6432W: http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/ 5539W: http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/
6433S: Maintained 5540S: Maintained
@@ -6435,46 +5542,39 @@ F: Documentation/networking/wavelan.txt
6435F: drivers/net/wireless/wavelan* 5542F: drivers/net/wireless/wavelan*
6436 5543
6437WD7000 SCSI DRIVER 5544WD7000 SCSI DRIVER
6438P: Miroslav Zagorac 5545M: Miroslav Zagorac <zaga@fly.cc.fer.hr>
6439M: zaga@fly.cc.fer.hr
6440L: linux-scsi@vger.kernel.org 5546L: linux-scsi@vger.kernel.org
6441S: Maintained 5547S: Maintained
6442F: drivers/scsi/wd7000.c 5548F: drivers/scsi/wd7000.c
6443 5549
6444WIMAX STACK 5550WIMAX STACK
6445P: Inaky Perez-Gonzalez 5551M: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
6446M: inaky.perez-gonzalez@intel.com
6447M: linux-wimax@intel.com 5552M: linux-wimax@intel.com
6448L: wimax@linuxwimax.org 5553L: wimax@linuxwimax.org
6449S: Supported 5554S: Supported
6450W: http://linuxwimax.org 5555W: http://linuxwimax.org
6451 5556
6452WIMEDIA LLC PROTOCOL (WLP) SUBSYSTEM 5557WIMEDIA LLC PROTOCOL (WLP) SUBSYSTEM
6453P: David Vrabel 5558M: David Vrabel <david.vrabel@csr.com>
6454M: david.vrabel@csr.com
6455S: Maintained 5559S: Maintained
6456F: include/linux/wlp.h 5560F: include/linux/wlp.h
6457F: drivers/uwb/wlp/ 5561F: drivers/uwb/wlp/
6458 5562
6459WISTRON LAPTOP BUTTON DRIVER 5563WISTRON LAPTOP BUTTON DRIVER
6460P: Miloslav Trmac 5564M: Miloslav Trmac <mitr@volny.cz>
6461M: mitr@volny.cz
6462S: Maintained 5565S: Maintained
6463F: drivers/input/misc/wistron_btns.c 5566F: drivers/input/misc/wistron_btns.c
6464 5567
6465WL3501 WIRELESS PCMCIA CARD DRIVER 5568WL3501 WIRELESS PCMCIA CARD DRIVER
6466P: Arnaldo Carvalho de Melo 5569M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
6467M: acme@ghostprotocols.net
6468L: linux-wireless@vger.kernel.org 5570L: linux-wireless@vger.kernel.org
6469W: http://oops.ghostprotocols.net:81/blog 5571W: http://oops.ghostprotocols.net:81/blog
6470S: Maintained 5572S: Maintained
6471F: drivers/net/wireless/wl3501* 5573F: drivers/net/wireless/wl3501*
6472 5574
6473WM97XX TOUCHSCREEN DRIVERS 5575WM97XX TOUCHSCREEN DRIVERS
6474P: Mark Brown 5576M: Mark Brown <broonie@opensource.wolfsonmicro.com>
6475M: broonie@opensource.wolfsonmicro.com 5577M: Liam Girdwood <lrg@slimlogic.co.uk>
6476P: Liam Girdwood
6477M: lrg@slimlogic.co.uk
6478L: linux-input@vger.kernel.org 5578L: linux-input@vger.kernel.org
6479T: git git://opensource.wolfsonmicro.com/linux-2.6-touch 5579T: git git://opensource.wolfsonmicro.com/linux-2.6-touch
6480W: http://opensource.wolfsonmicro.com/node/7 5580W: http://opensource.wolfsonmicro.com/node/7
@@ -6483,8 +5583,7 @@ F: drivers/input/touchscreen/*wm97*
6483F: include/linux/wm97xx.h 5583F: include/linux/wm97xx.h
6484 5584
6485X.25 NETWORK LAYER 5585X.25 NETWORK LAYER
6486P: Henner Eisen 5586M: Henner Eisen <eis@baty.hanse.de>
6487M: eis@baty.hanse.de
6488L: linux-x25@vger.kernel.org 5587L: linux-x25@vger.kernel.org
6489S: Maintained 5588S: Maintained
6490F: Documentation/networking/x25* 5589F: Documentation/networking/x25*
@@ -6492,12 +5591,9 @@ F: include/net/x25*
6492F: net/x25/ 5591F: net/x25/
6493 5592
6494X86 ARCHITECTURE (32-BIT AND 64-BIT) 5593X86 ARCHITECTURE (32-BIT AND 64-BIT)
6495P: Thomas Gleixner 5594M: Thomas Gleixner <tglx@linutronix.de>
6496M: tglx@linutronix.de 5595M: Ingo Molnar <mingo@redhat.com>
6497P: Ingo Molnar 5596M: "H. Peter Anvin" <hpa@zytor.com>
6498M: mingo@redhat.com
6499P: H. Peter Anvin
6500M: hpa@zytor.com
6501M: x86@kernel.org 5597M: x86@kernel.org
6502T: git git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git 5598T: git git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git
6503S: Maintained 5599S: Maintained
@@ -6505,10 +5601,8 @@ F: Documentation/x86/
6505F: arch/x86/ 5601F: arch/x86/
6506 5602
6507XEN HYPERVISOR INTERFACE 5603XEN HYPERVISOR INTERFACE
6508P: Jeremy Fitzhardinge 5604M: Jeremy Fitzhardinge <jeremy@xensource.com>
6509M: jeremy@xensource.com 5605M: Chris Wright <chrisw@sous-sol.org>
6510P: Chris Wright
6511M: chrisw@sous-sol.org
6512L: virtualization@lists.osdl.org 5606L: virtualization@lists.osdl.org
6513L: xen-devel@lists.xensource.com 5607L: xen-devel@lists.xensource.com
6514S: Supported 5608S: Supported
@@ -6520,8 +5614,7 @@ F: include/xen/
6520 5614
6521XFS FILESYSTEM 5615XFS FILESYSTEM
6522P: Silicon Graphics Inc 5616P: Silicon Graphics Inc
6523P: Felix Blyakher 5617M: Felix Blyakher <felixb@sgi.com>
6524M: felixb@sgi.com
6525M: xfs-masters@oss.sgi.com 5618M: xfs-masters@oss.sgi.com
6526L: xfs@oss.sgi.com 5619L: xfs@oss.sgi.com
6527W: http://oss.sgi.com/projects/xfs 5620W: http://oss.sgi.com/projects/xfs
@@ -6531,38 +5624,33 @@ F: Documentation/filesystems/xfs.txt
6531F: fs/xfs/ 5624F: fs/xfs/
6532 5625
6533XILINX SYSTEMACE DRIVER 5626XILINX SYSTEMACE DRIVER
6534P: Grant Likely 5627M: Grant Likely <grant.likely@secretlab.ca>
6535M: grant.likely@secretlab.ca
6536W: http://www.secretlab.ca/ 5628W: http://www.secretlab.ca/
6537S: Maintained 5629S: Maintained
6538F: drivers/block/xsysace.c 5630F: drivers/block/xsysace.c
6539 5631
6540XILINX UARTLITE SERIAL DRIVER 5632XILINX UARTLITE SERIAL DRIVER
6541P: Peter Korsgaard 5633M: Peter Korsgaard <jacmet@sunsite.dk>
6542M: jacmet@sunsite.dk
6543L: linux-serial@vger.kernel.org 5634L: linux-serial@vger.kernel.org
6544S: Maintained 5635S: Maintained
6545F: drivers/serial/uartlite.c 5636F: drivers/serial/uartlite.c
6546 5637
6547YAM DRIVER FOR AX.25 5638YAM DRIVER FOR AX.25
6548P: Jean-Paul Roubelat 5639M: Jean-Paul Roubelat <jpr@f6fbb.org>
6549M: jpr@f6fbb.org
6550L: linux-hams@vger.kernel.org 5640L: linux-hams@vger.kernel.org
6551S: Maintained 5641S: Maintained
6552F: drivers/net/hamradio/yam* 5642F: drivers/net/hamradio/yam*
6553F: include/linux/yam.h 5643F: include/linux/yam.h
6554 5644
6555YEALINK PHONE DRIVER 5645YEALINK PHONE DRIVER
6556P: Henk Vergonet 5646M: Henk Vergonet <Henk.Vergonet@gmail.com>
6557M: Henk.Vergonet@gmail.com
6558L: usbb2k-api-dev@nongnu.org 5647L: usbb2k-api-dev@nongnu.org
6559S: Maintained 5648S: Maintained
6560F: Documentation/input/yealink.txt 5649F: Documentation/input/yealink.txt
6561F: drivers/input/misc/yealink.* 5650F: drivers/input/misc/yealink.*
6562 5651
6563Z8530 DRIVER FOR AX.25 5652Z8530 DRIVER FOR AX.25
6564P: Joerg Reuter 5653M: Joerg Reuter <jreuter@yaina.de>
6565M: jreuter@yaina.de
6566W: http://yaina.de/jreuter/ 5654W: http://yaina.de/jreuter/
6567W: http://www.qsl.net/dl1bke/ 5655W: http://www.qsl.net/dl1bke/
6568L: linux-hams@vger.kernel.org 5656L: linux-hams@vger.kernel.org
@@ -6572,10 +5660,8 @@ F: drivers/net/hamradio/*scc.c
6572F: drivers/net/hamradio/z8530.h 5660F: drivers/net/hamradio/z8530.h
6573 5661
6574ZD1211RW WIRELESS DRIVER 5662ZD1211RW WIRELESS DRIVER
6575P: Daniel Drake 5663M: Daniel Drake <dsd@gentoo.org>
6576M: dsd@gentoo.org 5664M: Ulrich Kunitz <kune@deine-taler.de>
6577P: Ulrich Kunitz
6578M: kune@deine-taler.de
6579W: http://zd1211.ath.cx/wiki/DriverRewrite 5665W: http://zd1211.ath.cx/wiki/DriverRewrite
6580L: linux-wireless@vger.kernel.org 5666L: linux-wireless@vger.kernel.org
6581L: zd1211-devs@lists.sourceforge.net (subscribers-only) 5667L: zd1211-devs@lists.sourceforge.net (subscribers-only)
@@ -6591,14 +5677,12 @@ S: Odd Fixes
6591F: drivers/media/video/zoran/ 5677F: drivers/media/video/zoran/
6592 5678
6593ZS DECSTATION Z85C30 SERIAL DRIVER 5679ZS DECSTATION Z85C30 SERIAL DRIVER
6594P: Maciej W. Rozycki 5680M: "Maciej W. Rozycki" <macro@linux-mips.org>
6595M: macro@linux-mips.org
6596S: Maintained 5681S: Maintained
6597F: drivers/serial/zs.* 5682F: drivers/serial/zs.*
6598 5683
6599THE REST 5684THE REST
6600P: Linus Torvalds 5685M: Linus Torvalds <torvalds@linux-foundation.org>
6601M: torvalds@linux-foundation.org
6602L: linux-kernel@vger.kernel.org 5686L: linux-kernel@vger.kernel.org
6603T: git git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 5687T: git git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
6604S: Buried alive in reporters 5688S: Buried alive in reporters
diff --git a/Makefile b/Makefile
index 79957b33877..abcfa85f8f8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 2 1VERSION = 2
2PATCHLEVEL = 6 2PATCHLEVEL = 6
3SUBLEVEL = 31 3SUBLEVEL = 31
4EXTRAVERSION = -rc3 4EXTRAVERSION = -rc6
5NAME = Man-Eating Seals of Antiquity 5NAME = Man-Eating Seals of Antiquity
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
diff --git a/arch/alpha/include/asm/tlb.h b/arch/alpha/include/asm/tlb.h
index c13636575fb..42866759f3f 100644
--- a/arch/alpha/include/asm/tlb.h
+++ b/arch/alpha/include/asm/tlb.h
@@ -9,7 +9,7 @@
9 9
10#include <asm-generic/tlb.h> 10#include <asm-generic/tlb.h>
11 11
12#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, pte) 12#define __pte_free_tlb(tlb, pte, address) pte_free((tlb)->mm, pte)
13#define __pmd_free_tlb(tlb, pmd) pmd_free((tlb)->mm, pmd) 13#define __pmd_free_tlb(tlb, pmd, address) pmd_free((tlb)->mm, pmd)
14 14
15#endif 15#endif
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index 9e6e512f011..17153b54613 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -29,7 +29,6 @@ unsigned int __machine_arch_type;
29 29
30static void putstr(const char *ptr); 30static void putstr(const char *ptr);
31 31
32#include <linux/compiler.h>
33#include <mach/uncompress.h> 32#include <mach/uncompress.h>
34 33
35#ifdef CONFIG_DEBUG_ICEDCC 34#ifdef CONFIG_DEBUG_ICEDCC
diff --git a/arch/arm/common/clkdev.c b/arch/arm/common/clkdev.c
index f37afd9422f..aae5bc01acc 100644
--- a/arch/arm/common/clkdev.c
+++ b/arch/arm/common/clkdev.c
@@ -17,6 +17,7 @@
17#include <linux/err.h> 17#include <linux/err.h>
18#include <linux/string.h> 18#include <linux/string.h>
19#include <linux/mutex.h> 19#include <linux/mutex.h>
20#include <linux/clk.h>
20 21
21#include <asm/clkdev.h> 22#include <asm/clkdev.h>
22#include <mach/clkdev.h> 23#include <mach/clkdev.h>
diff --git a/arch/arm/configs/mx27_defconfig b/arch/arm/configs/mx27_defconfig
index 083516cd0d7..75263a83741 100644
--- a/arch/arm/configs/mx27_defconfig
+++ b/arch/arm/configs/mx27_defconfig
@@ -1,15 +1,15 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc1 3# Linux kernel version: 2.6.31-rc4
4# Wed Apr 8 10:18:06 2009 4# Fri Jul 24 16:08:06 2009
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_HAVE_PWM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 8CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y 9CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y 10CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y 11CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_MMU=y 12CONFIG_MMU=y
12# CONFIG_NO_IOPORT is not set
13CONFIG_GENERIC_HARDIRQS=y 13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y 14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_HAVE_LATENCYTOP_SUPPORT=y 15CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -18,14 +18,13 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
18CONFIG_HARDIRQS_SW_RESEND=y 18CONFIG_HARDIRQS_SW_RESEND=y
19CONFIG_GENERIC_IRQ_PROBE=y 19CONFIG_GENERIC_IRQ_PROBE=y
20CONFIG_RWSEM_GENERIC_SPINLOCK=y 20CONFIG_RWSEM_GENERIC_SPINLOCK=y
21# CONFIG_ARCH_HAS_ILOG2_U32 is not set
22# CONFIG_ARCH_HAS_ILOG2_U64 is not set
23CONFIG_GENERIC_HWEIGHT=y 21CONFIG_GENERIC_HWEIGHT=y
24CONFIG_GENERIC_CALIBRATE_DELAY=y 22CONFIG_GENERIC_CALIBRATE_DELAY=y
25CONFIG_ARCH_MTD_XIP=y 23CONFIG_ARCH_MTD_XIP=y
26CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 24CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
27CONFIG_VECTORS_BASE=0xffff0000 25CONFIG_VECTORS_BASE=0xffff0000
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27CONFIG_CONSTRUCTORS=y
29 28
30# 29#
31# General setup 30# General setup
@@ -85,7 +84,12 @@ CONFIG_TIMERFD=y
85CONFIG_EVENTFD=y 84CONFIG_EVENTFD=y
86CONFIG_SHMEM=y 85CONFIG_SHMEM=y
87CONFIG_AIO=y 86CONFIG_AIO=y
87
88#
89# Performance Counters
90#
88CONFIG_VM_EVENT_COUNTERS=y 91CONFIG_VM_EVENT_COUNTERS=y
92# CONFIG_STRIP_ASM_SYMS is not set
89# CONFIG_COMPAT_BRK is not set 93# CONFIG_COMPAT_BRK is not set
90CONFIG_SLAB=y 94CONFIG_SLAB=y
91# CONFIG_SLUB is not set 95# CONFIG_SLUB is not set
@@ -99,6 +103,12 @@ CONFIG_KPROBES=y
99CONFIG_KRETPROBES=y 103CONFIG_KRETPROBES=y
100CONFIG_HAVE_KPROBES=y 104CONFIG_HAVE_KPROBES=y
101CONFIG_HAVE_KRETPROBES=y 105CONFIG_HAVE_KRETPROBES=y
106CONFIG_HAVE_CLK=y
107
108#
109# GCOV-based kernel profiling
110#
111# CONFIG_GCOV_KERNEL is not set
102# CONFIG_SLOW_WORK is not set 112# CONFIG_SLOW_WORK is not set
103CONFIG_HAVE_GENERIC_DMA_COHERENT=y 113CONFIG_HAVE_GENERIC_DMA_COHERENT=y
104CONFIG_SLABINFO=y 114CONFIG_SLABINFO=y
@@ -111,7 +121,7 @@ CONFIG_MODULE_UNLOAD=y
111# CONFIG_MODVERSIONS is not set 121# CONFIG_MODVERSIONS is not set
112# CONFIG_MODULE_SRCVERSION_ALL is not set 122# CONFIG_MODULE_SRCVERSION_ALL is not set
113CONFIG_BLOCK=y 123CONFIG_BLOCK=y
114# CONFIG_LBD is not set 124CONFIG_LBDAF=y
115# CONFIG_BLK_DEV_BSG is not set 125# CONFIG_BLK_DEV_BSG is not set
116# CONFIG_BLK_DEV_INTEGRITY is not set 126# CONFIG_BLK_DEV_INTEGRITY is not set
117 127
@@ -138,13 +148,14 @@ CONFIG_FREEZER=y
138# CONFIG_ARCH_VERSATILE is not set 148# CONFIG_ARCH_VERSATILE is not set
139# CONFIG_ARCH_AT91 is not set 149# CONFIG_ARCH_AT91 is not set
140# CONFIG_ARCH_CLPS711X is not set 150# CONFIG_ARCH_CLPS711X is not set
151# CONFIG_ARCH_GEMINI is not set
141# CONFIG_ARCH_EBSA110 is not set 152# CONFIG_ARCH_EBSA110 is not set
142# CONFIG_ARCH_EP93XX is not set 153# CONFIG_ARCH_EP93XX is not set
143# CONFIG_ARCH_GEMINI is not set
144# CONFIG_ARCH_FOOTBRIDGE is not set 154# CONFIG_ARCH_FOOTBRIDGE is not set
155CONFIG_ARCH_MXC=y
156# CONFIG_ARCH_STMP3XXX is not set
145# CONFIG_ARCH_NETX is not set 157# CONFIG_ARCH_NETX is not set
146# CONFIG_ARCH_H720X is not set 158# CONFIG_ARCH_H720X is not set
147# CONFIG_ARCH_IMX is not set
148# CONFIG_ARCH_IOP13XX is not set 159# CONFIG_ARCH_IOP13XX is not set
149# CONFIG_ARCH_IOP32X is not set 160# CONFIG_ARCH_IOP32X is not set
150# CONFIG_ARCH_IOP33X is not set 161# CONFIG_ARCH_IOP33X is not set
@@ -153,25 +164,25 @@ CONFIG_FREEZER=y
153# CONFIG_ARCH_IXP4XX is not set 164# CONFIG_ARCH_IXP4XX is not set
154# CONFIG_ARCH_L7200 is not set 165# CONFIG_ARCH_L7200 is not set
155# CONFIG_ARCH_KIRKWOOD is not set 166# CONFIG_ARCH_KIRKWOOD is not set
156# CONFIG_ARCH_KS8695 is not set
157# CONFIG_ARCH_NS9XXX is not set
158# CONFIG_ARCH_LOKI is not set 167# CONFIG_ARCH_LOKI is not set
159# CONFIG_ARCH_MV78XX0 is not set 168# CONFIG_ARCH_MV78XX0 is not set
160CONFIG_ARCH_MXC=y
161# CONFIG_ARCH_ORION5X is not set 169# CONFIG_ARCH_ORION5X is not set
170# CONFIG_ARCH_MMP is not set
171# CONFIG_ARCH_KS8695 is not set
172# CONFIG_ARCH_NS9XXX is not set
173# CONFIG_ARCH_W90X900 is not set
162# CONFIG_ARCH_PNX4008 is not set 174# CONFIG_ARCH_PNX4008 is not set
163# CONFIG_ARCH_PXA is not set 175# CONFIG_ARCH_PXA is not set
164# CONFIG_ARCH_MMP is not set 176# CONFIG_ARCH_MSM is not set
165# CONFIG_ARCH_RPC is not set 177# CONFIG_ARCH_RPC is not set
166# CONFIG_ARCH_SA1100 is not set 178# CONFIG_ARCH_SA1100 is not set
167# CONFIG_ARCH_S3C2410 is not set 179# CONFIG_ARCH_S3C2410 is not set
168# CONFIG_ARCH_S3C64XX is not set 180# CONFIG_ARCH_S3C64XX is not set
169# CONFIG_ARCH_SHARK is not set 181# CONFIG_ARCH_SHARK is not set
170# CONFIG_ARCH_LH7A40X is not set 182# CONFIG_ARCH_LH7A40X is not set
183# CONFIG_ARCH_U300 is not set
171# CONFIG_ARCH_DAVINCI is not set 184# CONFIG_ARCH_DAVINCI is not set
172# CONFIG_ARCH_OMAP is not set 185# CONFIG_ARCH_OMAP is not set
173# CONFIG_ARCH_MSM is not set
174# CONFIG_ARCH_W90X900 is not set
175 186
176# 187#
177# Freescale MXC Implementations 188# Freescale MXC Implementations
@@ -188,6 +199,8 @@ CONFIG_MACH_MX27=y
188CONFIG_MACH_MX27ADS=y 199CONFIG_MACH_MX27ADS=y
189CONFIG_MACH_PCM038=y 200CONFIG_MACH_PCM038=y
190CONFIG_MACH_PCM970_BASEBOARD=y 201CONFIG_MACH_PCM970_BASEBOARD=y
202CONFIG_MACH_MX27_3DS=y
203CONFIG_MACH_MX27LITE=y
191CONFIG_MXC_IRQ_PRIOR=y 204CONFIG_MXC_IRQ_PRIOR=y
192CONFIG_MXC_PWM=y 205CONFIG_MXC_PWM=y
193 206
@@ -213,7 +226,6 @@ CONFIG_ARM_THUMB=y
213# CONFIG_CPU_DCACHE_DISABLE is not set 226# CONFIG_CPU_DCACHE_DISABLE is not set
214# CONFIG_CPU_DCACHE_WRITETHROUGH is not set 227# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
215# CONFIG_CPU_CACHE_ROUND_ROBIN is not set 228# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
216# CONFIG_OUTER_CACHE is not set
217CONFIG_COMMON_CLKDEV=y 229CONFIG_COMMON_CLKDEV=y
218 230
219# 231#
@@ -238,7 +250,6 @@ CONFIG_PREEMPT=y
238CONFIG_HZ=100 250CONFIG_HZ=100
239CONFIG_AEABI=y 251CONFIG_AEABI=y
240CONFIG_OABI_COMPAT=y 252CONFIG_OABI_COMPAT=y
241CONFIG_ARCH_FLATMEM_HAS_HOLES=y
242# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set 253# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
243# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set 254# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
244# CONFIG_HIGHMEM is not set 255# CONFIG_HIGHMEM is not set
@@ -253,10 +264,11 @@ CONFIG_SPLIT_PTLOCK_CPUS=4096
253# CONFIG_PHYS_ADDR_T_64BIT is not set 264# CONFIG_PHYS_ADDR_T_64BIT is not set
254CONFIG_ZONE_DMA_FLAG=0 265CONFIG_ZONE_DMA_FLAG=0
255CONFIG_VIRT_TO_BUS=y 266CONFIG_VIRT_TO_BUS=y
256CONFIG_UNEVICTABLE_LRU=y
257CONFIG_HAVE_MLOCK=y 267CONFIG_HAVE_MLOCK=y
258CONFIG_HAVE_MLOCKED_PAGE_BIT=y 268CONFIG_HAVE_MLOCKED_PAGE_BIT=y
269CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
259CONFIG_ALIGNMENT_TRAP=y 270CONFIG_ALIGNMENT_TRAP=y
271# CONFIG_UACCESS_WITH_MEMCPY is not set
260 272
261# 273#
262# Boot options 274# Boot options
@@ -361,6 +373,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
361# CONFIG_ECONET is not set 373# CONFIG_ECONET is not set
362# CONFIG_WAN_ROUTER is not set 374# CONFIG_WAN_ROUTER is not set
363# CONFIG_PHONET is not set 375# CONFIG_PHONET is not set
376# CONFIG_IEEE802154 is not set
364# CONFIG_NET_SCHED is not set 377# CONFIG_NET_SCHED is not set
365# CONFIG_DCB is not set 378# CONFIG_DCB is not set
366 379
@@ -474,7 +487,16 @@ CONFIG_MTD_PHYSMAP=y
474# CONFIG_MTD_DOC2000 is not set 487# CONFIG_MTD_DOC2000 is not set
475# CONFIG_MTD_DOC2001 is not set 488# CONFIG_MTD_DOC2001 is not set
476# CONFIG_MTD_DOC2001PLUS is not set 489# CONFIG_MTD_DOC2001PLUS is not set
477# CONFIG_MTD_NAND is not set 490CONFIG_MTD_NAND=y
491# CONFIG_MTD_NAND_VERIFY_WRITE is not set
492# CONFIG_MTD_NAND_ECC_SMC is not set
493# CONFIG_MTD_NAND_MUSEUM_IDS is not set
494# CONFIG_MTD_NAND_GPIO is not set
495CONFIG_MTD_NAND_IDS=y
496# CONFIG_MTD_NAND_DISKONCHIP is not set
497# CONFIG_MTD_NAND_NANDSIM is not set
498# CONFIG_MTD_NAND_PLATFORM is not set
499CONFIG_MTD_NAND_MXC=y
478# CONFIG_MTD_ONENAND is not set 500# CONFIG_MTD_ONENAND is not set
479 501
480# 502#
@@ -485,7 +507,15 @@ CONFIG_MTD_PHYSMAP=y
485# 507#
486# UBI - Unsorted block images 508# UBI - Unsorted block images
487# 509#
488# CONFIG_MTD_UBI is not set 510CONFIG_MTD_UBI=y
511CONFIG_MTD_UBI_WL_THRESHOLD=4096
512CONFIG_MTD_UBI_BEB_RESERVE=1
513# CONFIG_MTD_UBI_GLUEBI is not set
514
515#
516# UBI debugging options
517#
518# CONFIG_MTD_UBI_DEBUG is not set
489# CONFIG_PARPORT is not set 519# CONFIG_PARPORT is not set
490CONFIG_BLK_DEV=y 520CONFIG_BLK_DEV=y
491# CONFIG_BLK_DEV_COW_COMMON is not set 521# CONFIG_BLK_DEV_COW_COMMON is not set
@@ -494,7 +524,21 @@ CONFIG_BLK_DEV=y
494# CONFIG_BLK_DEV_RAM is not set 524# CONFIG_BLK_DEV_RAM is not set
495# CONFIG_CDROM_PKTCDVD is not set 525# CONFIG_CDROM_PKTCDVD is not set
496# CONFIG_ATA_OVER_ETH is not set 526# CONFIG_ATA_OVER_ETH is not set
497# CONFIG_MISC_DEVICES is not set 527# CONFIG_MG_DISK is not set
528CONFIG_MISC_DEVICES=y
529# CONFIG_ICS932S401 is not set
530# CONFIG_ENCLOSURE_SERVICES is not set
531# CONFIG_ISL29003 is not set
532# CONFIG_C2PORT is not set
533
534#
535# EEPROM support
536#
537CONFIG_EEPROM_AT24=y
538# CONFIG_EEPROM_AT25 is not set
539# CONFIG_EEPROM_LEGACY is not set
540# CONFIG_EEPROM_MAX6875 is not set
541# CONFIG_EEPROM_93CX6 is not set
498CONFIG_HAVE_IDE=y 542CONFIG_HAVE_IDE=y
499# CONFIG_IDE is not set 543# CONFIG_IDE is not set
500 544
@@ -508,7 +552,6 @@ CONFIG_HAVE_IDE=y
508# CONFIG_ATA is not set 552# CONFIG_ATA is not set
509# CONFIG_MD is not set 553# CONFIG_MD is not set
510CONFIG_NETDEVICES=y 554CONFIG_NETDEVICES=y
511CONFIG_COMPAT_NET_DEV_OPS=y
512# CONFIG_DUMMY is not set 555# CONFIG_DUMMY is not set
513# CONFIG_BONDING is not set 556# CONFIG_BONDING is not set
514# CONFIG_MACVLAN is not set 557# CONFIG_MACVLAN is not set
@@ -534,6 +577,8 @@ CONFIG_NET_ETHERNET=y
534# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 577# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
535# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 578# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
536# CONFIG_B44 is not set 579# CONFIG_B44 is not set
580# CONFIG_KS8842 is not set
581# CONFIG_KS8851 is not set
537CONFIG_FEC=y 582CONFIG_FEC=y
538# CONFIG_FEC2 is not set 583# CONFIG_FEC2 is not set
539# CONFIG_NETDEV_1000 is not set 584# CONFIG_NETDEV_1000 is not set
@@ -580,6 +625,11 @@ CONFIG_INPUT_EVDEV=y
580# CONFIG_INPUT_TABLET is not set 625# CONFIG_INPUT_TABLET is not set
581CONFIG_INPUT_TOUCHSCREEN=y 626CONFIG_INPUT_TOUCHSCREEN=y
582# CONFIG_TOUCHSCREEN_ADS7846 is not set 627# CONFIG_TOUCHSCREEN_ADS7846 is not set
628# CONFIG_TOUCHSCREEN_AD7877 is not set
629# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
630# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
631# CONFIG_TOUCHSCREEN_AD7879 is not set
632# CONFIG_TOUCHSCREEN_EETI is not set
583# CONFIG_TOUCHSCREEN_FUJITSU is not set 633# CONFIG_TOUCHSCREEN_FUJITSU is not set
584# CONFIG_TOUCHSCREEN_GUNZE is not set 634# CONFIG_TOUCHSCREEN_GUNZE is not set
585# CONFIG_TOUCHSCREEN_ELO is not set 635# CONFIG_TOUCHSCREEN_ELO is not set
@@ -592,6 +642,7 @@ CONFIG_INPUT_TOUCHSCREEN=y
592# CONFIG_TOUCHSCREEN_TOUCHWIN is not set 642# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
593# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set 643# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
594# CONFIG_TOUCHSCREEN_TSC2007 is not set 644# CONFIG_TOUCHSCREEN_TSC2007 is not set
645# CONFIG_TOUCHSCREEN_W90X900 is not set
595# CONFIG_INPUT_MISC is not set 646# CONFIG_INPUT_MISC is not set
596 647
597# 648#
@@ -644,6 +695,7 @@ CONFIG_I2C_HELPER_AUTO=y
644# 695#
645# I2C system bus drivers (mostly embedded / system-on-chip) 696# I2C system bus drivers (mostly embedded / system-on-chip)
646# 697#
698# CONFIG_I2C_DESIGNWARE is not set
647# CONFIG_I2C_GPIO is not set 699# CONFIG_I2C_GPIO is not set
648CONFIG_I2C_IMX=y 700CONFIG_I2C_IMX=y
649# CONFIG_I2C_OCORES is not set 701# CONFIG_I2C_OCORES is not set
@@ -668,7 +720,6 @@ CONFIG_I2C_IMX=y
668# CONFIG_SENSORS_PCF8574 is not set 720# CONFIG_SENSORS_PCF8574 is not set
669# CONFIG_PCF8575 is not set 721# CONFIG_PCF8575 is not set
670# CONFIG_SENSORS_PCA9539 is not set 722# CONFIG_SENSORS_PCA9539 is not set
671# CONFIG_SENSORS_MAX6875 is not set
672# CONFIG_SENSORS_TSL2550 is not set 723# CONFIG_SENSORS_TSL2550 is not set
673# CONFIG_I2C_DEBUG_CORE is not set 724# CONFIG_I2C_DEBUG_CORE is not set
674# CONFIG_I2C_DEBUG_ALGO is not set 725# CONFIG_I2C_DEBUG_ALGO is not set
@@ -719,6 +770,7 @@ CONFIG_W1=y
719# 770#
720# CONFIG_W1_MASTER_DS2482 is not set 771# CONFIG_W1_MASTER_DS2482 is not set
721CONFIG_W1_MASTER_MXC=y 772CONFIG_W1_MASTER_MXC=y
773# CONFIG_W1_MASTER_DS1WM is not set
722# CONFIG_W1_MASTER_GPIO is not set 774# CONFIG_W1_MASTER_GPIO is not set
723 775
724# 776#
@@ -753,54 +805,16 @@ CONFIG_SSB_POSSIBLE=y
753# CONFIG_TPS65010 is not set 805# CONFIG_TPS65010 is not set
754# CONFIG_TWL4030_CORE is not set 806# CONFIG_TWL4030_CORE is not set
755# CONFIG_MFD_TMIO is not set 807# CONFIG_MFD_TMIO is not set
808# CONFIG_MFD_T7L66XB is not set
809# CONFIG_MFD_TC6387XB is not set
756# CONFIG_MFD_TC6393XB is not set 810# CONFIG_MFD_TC6393XB is not set
757# CONFIG_PMIC_DA903X is not set 811# CONFIG_PMIC_DA903X is not set
758# CONFIG_MFD_WM8400 is not set 812# CONFIG_MFD_WM8400 is not set
759# CONFIG_MFD_WM8350_I2C is not set 813# CONFIG_MFD_WM8350_I2C is not set
760# CONFIG_MFD_PCF50633 is not set 814# CONFIG_MFD_PCF50633 is not set
761 815# CONFIG_AB3100_CORE is not set
762# 816# CONFIG_EZX_PCAP is not set
763# Multimedia devices 817# CONFIG_MEDIA_SUPPORT is not set
764#
765
766#
767# Multimedia core support
768#
769CONFIG_VIDEO_DEV=y
770CONFIG_VIDEO_V4L2_COMMON=y
771CONFIG_VIDEO_ALLOW_V4L1=y
772CONFIG_VIDEO_V4L1_COMPAT=y
773# CONFIG_DVB_CORE is not set
774CONFIG_VIDEO_MEDIA=y
775
776#
777# Multimedia drivers
778#
779# CONFIG_MEDIA_ATTACH is not set
780CONFIG_MEDIA_TUNER=y
781# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
782CONFIG_MEDIA_TUNER_SIMPLE=y
783CONFIG_MEDIA_TUNER_TDA8290=y
784CONFIG_MEDIA_TUNER_TDA9887=y
785CONFIG_MEDIA_TUNER_TEA5761=y
786CONFIG_MEDIA_TUNER_TEA5767=y
787CONFIG_MEDIA_TUNER_MT20XX=y
788CONFIG_MEDIA_TUNER_XC2028=y
789CONFIG_MEDIA_TUNER_XC5000=y
790CONFIG_MEDIA_TUNER_MC44S803=y
791CONFIG_VIDEO_V4L2=y
792CONFIG_VIDEO_V4L1=y
793CONFIG_VIDEO_CAPTURE_DRIVERS=y
794# CONFIG_VIDEO_ADV_DEBUG is not set
795# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
796CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
797# CONFIG_VIDEO_VIVI is not set
798# CONFIG_VIDEO_CPIA is not set
799# CONFIG_VIDEO_SAA5246A is not set
800# CONFIG_VIDEO_SAA5249 is not set
801# CONFIG_SOC_CAMERA is not set
802# CONFIG_RADIO_ADAPTERS is not set
803# CONFIG_DAB is not set
804 818
805# 819#
806# Graphics support 820# Graphics support
@@ -917,6 +931,7 @@ CONFIG_RTC_DRV_PCF8563=y
917# CONFIG_RTC_DRV_S35390A is not set 931# CONFIG_RTC_DRV_S35390A is not set
918# CONFIG_RTC_DRV_FM3130 is not set 932# CONFIG_RTC_DRV_FM3130 is not set
919# CONFIG_RTC_DRV_RX8581 is not set 933# CONFIG_RTC_DRV_RX8581 is not set
934# CONFIG_RTC_DRV_RX8025 is not set
920 935
921# 936#
922# SPI RTC drivers 937# SPI RTC drivers
@@ -962,12 +977,15 @@ CONFIG_RTC_DRV_PCF8563=y
962# CONFIG_REISERFS_FS is not set 977# CONFIG_REISERFS_FS is not set
963# CONFIG_JFS_FS is not set 978# CONFIG_JFS_FS is not set
964# CONFIG_FS_POSIX_ACL is not set 979# CONFIG_FS_POSIX_ACL is not set
965CONFIG_FILE_LOCKING=y
966# CONFIG_XFS_FS is not set 980# CONFIG_XFS_FS is not set
981# CONFIG_GFS2_FS is not set
967# CONFIG_OCFS2_FS is not set 982# CONFIG_OCFS2_FS is not set
968# CONFIG_BTRFS_FS is not set 983# CONFIG_BTRFS_FS is not set
984CONFIG_FILE_LOCKING=y
985CONFIG_FSNOTIFY=y
969# CONFIG_DNOTIFY is not set 986# CONFIG_DNOTIFY is not set
970# CONFIG_INOTIFY is not set 987# CONFIG_INOTIFY is not set
988CONFIG_INOTIFY_USER=y
971# CONFIG_QUOTA is not set 989# CONFIG_QUOTA is not set
972# CONFIG_AUTOFS_FS is not set 990# CONFIG_AUTOFS_FS is not set
973# CONFIG_AUTOFS4_FS is not set 991# CONFIG_AUTOFS4_FS is not set
@@ -1021,6 +1039,12 @@ CONFIG_JFFS2_ZLIB=y
1021# CONFIG_JFFS2_LZO is not set 1039# CONFIG_JFFS2_LZO is not set
1022CONFIG_JFFS2_RTIME=y 1040CONFIG_JFFS2_RTIME=y
1023# CONFIG_JFFS2_RUBIN is not set 1041# CONFIG_JFFS2_RUBIN is not set
1042CONFIG_UBIFS_FS=y
1043# CONFIG_UBIFS_FS_XATTR is not set
1044# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
1045CONFIG_UBIFS_FS_LZO=y
1046CONFIG_UBIFS_FS_ZLIB=y
1047# CONFIG_UBIFS_FS_DEBUG is not set
1024# CONFIG_CRAMFS is not set 1048# CONFIG_CRAMFS is not set
1025# CONFIG_SQUASHFS is not set 1049# CONFIG_SQUASHFS is not set
1026# CONFIG_VXFS_FS is not set 1050# CONFIG_VXFS_FS is not set
@@ -1119,25 +1143,11 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
1119CONFIG_NOP_TRACER=y 1143CONFIG_NOP_TRACER=y
1120CONFIG_HAVE_FUNCTION_TRACER=y 1144CONFIG_HAVE_FUNCTION_TRACER=y
1121CONFIG_RING_BUFFER=y 1145CONFIG_RING_BUFFER=y
1146CONFIG_EVENT_TRACING=y
1147CONFIG_CONTEXT_SWITCH_TRACER=y
1122CONFIG_TRACING=y 1148CONFIG_TRACING=y
1123CONFIG_TRACING_SUPPORT=y 1149CONFIG_TRACING_SUPPORT=y
1124 1150# CONFIG_FTRACE is not set
1125#
1126# Tracers
1127#
1128# CONFIG_FUNCTION_TRACER is not set
1129# CONFIG_IRQSOFF_TRACER is not set
1130# CONFIG_PREEMPT_TRACER is not set
1131# CONFIG_SCHED_TRACER is not set
1132# CONFIG_CONTEXT_SWITCH_TRACER is not set
1133# CONFIG_EVENT_TRACER is not set
1134# CONFIG_BOOT_TRACER is not set
1135# CONFIG_TRACE_BRANCH_PROFILING is not set
1136# CONFIG_STACK_TRACER is not set
1137# CONFIG_KMEMTRACE is not set
1138# CONFIG_WORKQUEUE_TRACER is not set
1139# CONFIG_BLK_DEV_IO_TRACE is not set
1140# CONFIG_FTRACE_STARTUP_TEST is not set
1141# CONFIG_DYNAMIC_DEBUG is not set 1151# CONFIG_DYNAMIC_DEBUG is not set
1142# CONFIG_SAMPLES is not set 1152# CONFIG_SAMPLES is not set
1143CONFIG_HAVE_ARCH_KGDB=y 1153CONFIG_HAVE_ARCH_KGDB=y
@@ -1151,16 +1161,104 @@ CONFIG_ARM_UNWIND=y
1151# CONFIG_SECURITY is not set 1161# CONFIG_SECURITY is not set
1152# CONFIG_SECURITYFS is not set 1162# CONFIG_SECURITYFS is not set
1153# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1163# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1154# CONFIG_CRYPTO is not set 1164CONFIG_CRYPTO=y
1165
1166#
1167# Crypto core or helper
1168#
1169# CONFIG_CRYPTO_FIPS is not set
1170CONFIG_CRYPTO_ALGAPI=y
1171CONFIG_CRYPTO_ALGAPI2=y
1172# CONFIG_CRYPTO_MANAGER is not set
1173# CONFIG_CRYPTO_MANAGER2 is not set
1174# CONFIG_CRYPTO_GF128MUL is not set
1175# CONFIG_CRYPTO_NULL is not set
1176# CONFIG_CRYPTO_CRYPTD is not set
1177# CONFIG_CRYPTO_AUTHENC is not set
1178# CONFIG_CRYPTO_TEST is not set
1179
1180#
1181# Authenticated Encryption with Associated Data
1182#
1183# CONFIG_CRYPTO_CCM is not set
1184# CONFIG_CRYPTO_GCM is not set
1185# CONFIG_CRYPTO_SEQIV is not set
1186
1187#
1188# Block modes
1189#
1190# CONFIG_CRYPTO_CBC is not set
1191# CONFIG_CRYPTO_CTR is not set
1192# CONFIG_CRYPTO_CTS is not set
1193# CONFIG_CRYPTO_ECB is not set
1194# CONFIG_CRYPTO_LRW is not set
1195# CONFIG_CRYPTO_PCBC is not set
1196# CONFIG_CRYPTO_XTS is not set
1197
1198#
1199# Hash modes
1200#
1201# CONFIG_CRYPTO_HMAC is not set
1202# CONFIG_CRYPTO_XCBC is not set
1203
1204#
1205# Digest
1206#
1207# CONFIG_CRYPTO_CRC32C is not set
1208# CONFIG_CRYPTO_MD4 is not set
1209# CONFIG_CRYPTO_MD5 is not set
1210# CONFIG_CRYPTO_MICHAEL_MIC is not set
1211# CONFIG_CRYPTO_RMD128 is not set
1212# CONFIG_CRYPTO_RMD160 is not set
1213# CONFIG_CRYPTO_RMD256 is not set
1214# CONFIG_CRYPTO_RMD320 is not set
1215# CONFIG_CRYPTO_SHA1 is not set
1216# CONFIG_CRYPTO_SHA256 is not set
1217# CONFIG_CRYPTO_SHA512 is not set
1218# CONFIG_CRYPTO_TGR192 is not set
1219# CONFIG_CRYPTO_WP512 is not set
1220
1221#
1222# Ciphers
1223#
1224# CONFIG_CRYPTO_AES is not set
1225# CONFIG_CRYPTO_ANUBIS is not set
1226# CONFIG_CRYPTO_ARC4 is not set
1227# CONFIG_CRYPTO_BLOWFISH is not set
1228# CONFIG_CRYPTO_CAMELLIA is not set
1229# CONFIG_CRYPTO_CAST5 is not set
1230# CONFIG_CRYPTO_CAST6 is not set
1231# CONFIG_CRYPTO_DES is not set
1232# CONFIG_CRYPTO_FCRYPT is not set
1233# CONFIG_CRYPTO_KHAZAD is not set
1234# CONFIG_CRYPTO_SALSA20 is not set
1235# CONFIG_CRYPTO_SEED is not set
1236# CONFIG_CRYPTO_SERPENT is not set
1237# CONFIG_CRYPTO_TEA is not set
1238# CONFIG_CRYPTO_TWOFISH is not set
1239
1240#
1241# Compression
1242#
1243CONFIG_CRYPTO_DEFLATE=y
1244# CONFIG_CRYPTO_ZLIB is not set
1245CONFIG_CRYPTO_LZO=y
1246
1247#
1248# Random Number Generation
1249#
1250# CONFIG_CRYPTO_ANSI_CPRNG is not set
1251CONFIG_CRYPTO_HW=y
1155CONFIG_BINARY_PRINTF=y 1252CONFIG_BINARY_PRINTF=y
1156 1253
1157# 1254#
1158# Library routines 1255# Library routines
1159# 1256#
1160CONFIG_BITREVERSE=y 1257CONFIG_BITREVERSE=y
1258CONFIG_RATIONAL=y
1161CONFIG_GENERIC_FIND_LAST_BIT=y 1259CONFIG_GENERIC_FIND_LAST_BIT=y
1162# CONFIG_CRC_CCITT is not set 1260# CONFIG_CRC_CCITT is not set
1163# CONFIG_CRC16 is not set 1261CONFIG_CRC16=y
1164# CONFIG_CRC_T10DIF is not set 1262# CONFIG_CRC_T10DIF is not set
1165# CONFIG_CRC_ITU_T is not set 1263# CONFIG_CRC_ITU_T is not set
1166CONFIG_CRC32=y 1264CONFIG_CRC32=y
@@ -1168,6 +1266,8 @@ CONFIG_CRC32=y
1168# CONFIG_LIBCRC32C is not set 1266# CONFIG_LIBCRC32C is not set
1169CONFIG_ZLIB_INFLATE=y 1267CONFIG_ZLIB_INFLATE=y
1170CONFIG_ZLIB_DEFLATE=y 1268CONFIG_ZLIB_DEFLATE=y
1269CONFIG_LZO_COMPRESS=y
1270CONFIG_LZO_DECOMPRESS=y
1171CONFIG_HAS_IOMEM=y 1271CONFIG_HAS_IOMEM=y
1172CONFIG_HAS_IOPORT=y 1272CONFIG_HAS_IOPORT=y
1173CONFIG_HAS_DMA=y 1273CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/mx3_defconfig b/arch/arm/configs/mx3_defconfig
index 20ada526f6d..a4f9a2a8149 100644
--- a/arch/arm/configs/mx3_defconfig
+++ b/arch/arm/configs/mx3_defconfig
@@ -1,15 +1,15 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc1 3# Linux kernel version: 2.6.31-rc4
4# Wed Apr 8 11:06:37 2009 4# Tue Jul 28 14:11:34 2009
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_HAVE_PWM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 8CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y 9CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y 10CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y 11CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_MMU=y 12CONFIG_MMU=y
12# CONFIG_NO_IOPORT is not set
13CONFIG_GENERIC_HARDIRQS=y 13CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y 14CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_HAVE_LATENCYTOP_SUPPORT=y 15CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -18,14 +18,13 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
18CONFIG_HARDIRQS_SW_RESEND=y 18CONFIG_HARDIRQS_SW_RESEND=y
19CONFIG_GENERIC_IRQ_PROBE=y 19CONFIG_GENERIC_IRQ_PROBE=y
20CONFIG_RWSEM_GENERIC_SPINLOCK=y 20CONFIG_RWSEM_GENERIC_SPINLOCK=y
21# CONFIG_ARCH_HAS_ILOG2_U32 is not set
22# CONFIG_ARCH_HAS_ILOG2_U64 is not set
23CONFIG_GENERIC_HWEIGHT=y 21CONFIG_GENERIC_HWEIGHT=y
24CONFIG_GENERIC_CALIBRATE_DELAY=y 22CONFIG_GENERIC_CALIBRATE_DELAY=y
25CONFIG_ARCH_MTD_XIP=y 23CONFIG_ARCH_MTD_XIP=y
26CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 24CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
27CONFIG_VECTORS_BASE=0xffff0000 25CONFIG_VECTORS_BASE=0xffff0000
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 26CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
27CONFIG_CONSTRUCTORS=y
29 28
30# 29#
31# General setup 30# General setup
@@ -86,7 +85,12 @@ CONFIG_TIMERFD=y
86CONFIG_EVENTFD=y 85CONFIG_EVENTFD=y
87CONFIG_SHMEM=y 86CONFIG_SHMEM=y
88CONFIG_AIO=y 87CONFIG_AIO=y
88
89#
90# Performance Counters
91#
89CONFIG_VM_EVENT_COUNTERS=y 92CONFIG_VM_EVENT_COUNTERS=y
93# CONFIG_STRIP_ASM_SYMS is not set
90CONFIG_COMPAT_BRK=y 94CONFIG_COMPAT_BRK=y
91CONFIG_SLAB=y 95CONFIG_SLAB=y
92# CONFIG_SLUB is not set 96# CONFIG_SLUB is not set
@@ -97,6 +101,11 @@ CONFIG_HAVE_OPROFILE=y
97# CONFIG_KPROBES is not set 101# CONFIG_KPROBES is not set
98CONFIG_HAVE_KPROBES=y 102CONFIG_HAVE_KPROBES=y
99CONFIG_HAVE_KRETPROBES=y 103CONFIG_HAVE_KRETPROBES=y
104CONFIG_HAVE_CLK=y
105
106#
107# GCOV-based kernel profiling
108#
100# CONFIG_SLOW_WORK is not set 109# CONFIG_SLOW_WORK is not set
101CONFIG_HAVE_GENERIC_DMA_COHERENT=y 110CONFIG_HAVE_GENERIC_DMA_COHERENT=y
102CONFIG_SLABINFO=y 111CONFIG_SLABINFO=y
@@ -109,7 +118,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
109CONFIG_MODVERSIONS=y 118CONFIG_MODVERSIONS=y
110# CONFIG_MODULE_SRCVERSION_ALL is not set 119# CONFIG_MODULE_SRCVERSION_ALL is not set
111CONFIG_BLOCK=y 120CONFIG_BLOCK=y
112# CONFIG_LBD is not set 121CONFIG_LBDAF=y
113# CONFIG_BLK_DEV_BSG is not set 122# CONFIG_BLK_DEV_BSG is not set
114# CONFIG_BLK_DEV_INTEGRITY is not set 123# CONFIG_BLK_DEV_INTEGRITY is not set
115 124
@@ -136,13 +145,14 @@ CONFIG_FREEZER=y
136# CONFIG_ARCH_VERSATILE is not set 145# CONFIG_ARCH_VERSATILE is not set
137# CONFIG_ARCH_AT91 is not set 146# CONFIG_ARCH_AT91 is not set
138# CONFIG_ARCH_CLPS711X is not set 147# CONFIG_ARCH_CLPS711X is not set
148# CONFIG_ARCH_GEMINI is not set
139# CONFIG_ARCH_EBSA110 is not set 149# CONFIG_ARCH_EBSA110 is not set
140# CONFIG_ARCH_EP93XX is not set 150# CONFIG_ARCH_EP93XX is not set
141# CONFIG_ARCH_GEMINI is not set
142# CONFIG_ARCH_FOOTBRIDGE is not set 151# CONFIG_ARCH_FOOTBRIDGE is not set
152CONFIG_ARCH_MXC=y
153# CONFIG_ARCH_STMP3XXX is not set
143# CONFIG_ARCH_NETX is not set 154# CONFIG_ARCH_NETX is not set
144# CONFIG_ARCH_H720X is not set 155# CONFIG_ARCH_H720X is not set
145# CONFIG_ARCH_IMX is not set
146# CONFIG_ARCH_IOP13XX is not set 156# CONFIG_ARCH_IOP13XX is not set
147# CONFIG_ARCH_IOP32X is not set 157# CONFIG_ARCH_IOP32X is not set
148# CONFIG_ARCH_IOP33X is not set 158# CONFIG_ARCH_IOP33X is not set
@@ -151,25 +161,25 @@ CONFIG_FREEZER=y
151# CONFIG_ARCH_IXP4XX is not set 161# CONFIG_ARCH_IXP4XX is not set
152# CONFIG_ARCH_L7200 is not set 162# CONFIG_ARCH_L7200 is not set
153# CONFIG_ARCH_KIRKWOOD is not set 163# CONFIG_ARCH_KIRKWOOD is not set
154# CONFIG_ARCH_KS8695 is not set
155# CONFIG_ARCH_NS9XXX is not set
156# CONFIG_ARCH_LOKI is not set 164# CONFIG_ARCH_LOKI is not set
157# CONFIG_ARCH_MV78XX0 is not set 165# CONFIG_ARCH_MV78XX0 is not set
158CONFIG_ARCH_MXC=y
159# CONFIG_ARCH_ORION5X is not set 166# CONFIG_ARCH_ORION5X is not set
167# CONFIG_ARCH_MMP is not set
168# CONFIG_ARCH_KS8695 is not set
169# CONFIG_ARCH_NS9XXX is not set
170# CONFIG_ARCH_W90X900 is not set
160# CONFIG_ARCH_PNX4008 is not set 171# CONFIG_ARCH_PNX4008 is not set
161# CONFIG_ARCH_PXA is not set 172# CONFIG_ARCH_PXA is not set
162# CONFIG_ARCH_MMP is not set 173# CONFIG_ARCH_MSM is not set
163# CONFIG_ARCH_RPC is not set 174# CONFIG_ARCH_RPC is not set
164# CONFIG_ARCH_SA1100 is not set 175# CONFIG_ARCH_SA1100 is not set
165# CONFIG_ARCH_S3C2410 is not set 176# CONFIG_ARCH_S3C2410 is not set
166# CONFIG_ARCH_S3C64XX is not set 177# CONFIG_ARCH_S3C64XX is not set
167# CONFIG_ARCH_SHARK is not set 178# CONFIG_ARCH_SHARK is not set
168# CONFIG_ARCH_LH7A40X is not set 179# CONFIG_ARCH_LH7A40X is not set
180# CONFIG_ARCH_U300 is not set
169# CONFIG_ARCH_DAVINCI is not set 181# CONFIG_ARCH_DAVINCI is not set
170# CONFIG_ARCH_OMAP is not set 182# CONFIG_ARCH_OMAP is not set
171# CONFIG_ARCH_MSM is not set
172# CONFIG_ARCH_W90X900 is not set
173 183
174# 184#
175# Freescale MXC Implementations 185# Freescale MXC Implementations
@@ -178,6 +188,7 @@ CONFIG_ARCH_MXC=y
178# CONFIG_ARCH_MX2 is not set 188# CONFIG_ARCH_MX2 is not set
179CONFIG_ARCH_MX3=y 189CONFIG_ARCH_MX3=y
180CONFIG_ARCH_MX31=y 190CONFIG_ARCH_MX31=y
191CONFIG_ARCH_MX35=y
181 192
182# 193#
183# MX3 platforms: 194# MX3 platforms:
@@ -185,12 +196,19 @@ CONFIG_ARCH_MX31=y
185CONFIG_MACH_MX31ADS=y 196CONFIG_MACH_MX31ADS=y
186CONFIG_MACH_MX31ADS_WM1133_EV1=y 197CONFIG_MACH_MX31ADS_WM1133_EV1=y
187CONFIG_MACH_PCM037=y 198CONFIG_MACH_PCM037=y
199CONFIG_MACH_PCM037_EET=y
188CONFIG_MACH_MX31LITE=y 200CONFIG_MACH_MX31LITE=y
189CONFIG_MACH_MX31_3DS=y 201CONFIG_MACH_MX31_3DS=y
190CONFIG_MACH_MX31MOBOARD=y 202CONFIG_MACH_MX31MOBOARD=y
203CONFIG_MACH_MX31LILLY=y
191CONFIG_MACH_QONG=y 204CONFIG_MACH_QONG=y
205CONFIG_MACH_PCM043=y
206CONFIG_MACH_ARMADILLO5X0=y
207CONFIG_MACH_MX35_3DS=y
192CONFIG_MXC_IRQ_PRIOR=y 208CONFIG_MXC_IRQ_PRIOR=y
193CONFIG_MXC_PWM=y 209CONFIG_MXC_PWM=y
210CONFIG_ARCH_HAS_RNGA=y
211CONFIG_ARCH_MXC_IOMUX_V3=y
194 212
195# 213#
196# Processor Type 214# Processor Type
@@ -218,6 +236,7 @@ CONFIG_ARM_THUMB=y
218# CONFIG_CPU_BPREDICT_DISABLE is not set 236# CONFIG_CPU_BPREDICT_DISABLE is not set
219CONFIG_OUTER_CACHE=y 237CONFIG_OUTER_CACHE=y
220CONFIG_CACHE_L2X0=y 238CONFIG_CACHE_L2X0=y
239# CONFIG_ARM_ERRATA_411920 is not set
221CONFIG_COMMON_CLKDEV=y 240CONFIG_COMMON_CLKDEV=y
222 241
223# 242#
@@ -242,7 +261,6 @@ CONFIG_PREEMPT=y
242CONFIG_HZ=100 261CONFIG_HZ=100
243CONFIG_AEABI=y 262CONFIG_AEABI=y
244CONFIG_OABI_COMPAT=y 263CONFIG_OABI_COMPAT=y
245CONFIG_ARCH_FLATMEM_HAS_HOLES=y
246# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set 264# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
247# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set 265# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
248# CONFIG_HIGHMEM is not set 266# CONFIG_HIGHMEM is not set
@@ -257,10 +275,11 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
257# CONFIG_PHYS_ADDR_T_64BIT is not set 275# CONFIG_PHYS_ADDR_T_64BIT is not set
258CONFIG_ZONE_DMA_FLAG=0 276CONFIG_ZONE_DMA_FLAG=0
259CONFIG_VIRT_TO_BUS=y 277CONFIG_VIRT_TO_BUS=y
260CONFIG_UNEVICTABLE_LRU=y
261CONFIG_HAVE_MLOCK=y 278CONFIG_HAVE_MLOCK=y
262CONFIG_HAVE_MLOCKED_PAGE_BIT=y 279CONFIG_HAVE_MLOCKED_PAGE_BIT=y
280CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
263CONFIG_ALIGNMENT_TRAP=y 281CONFIG_ALIGNMENT_TRAP=y
282# CONFIG_UACCESS_WITH_MEMCPY is not set
264 283
265# 284#
266# Boot options 285# Boot options
@@ -362,6 +381,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
362# CONFIG_ECONET is not set 381# CONFIG_ECONET is not set
363# CONFIG_WAN_ROUTER is not set 382# CONFIG_WAN_ROUTER is not set
364# CONFIG_PHONET is not set 383# CONFIG_PHONET is not set
384# CONFIG_IEEE802154 is not set
365# CONFIG_NET_SCHED is not set 385# CONFIG_NET_SCHED is not set
366# CONFIG_DCB is not set 386# CONFIG_DCB is not set
367 387
@@ -465,7 +485,16 @@ CONFIG_MTD_PHYSMAP=y
465# CONFIG_MTD_DOC2000 is not set 485# CONFIG_MTD_DOC2000 is not set
466# CONFIG_MTD_DOC2001 is not set 486# CONFIG_MTD_DOC2001 is not set
467# CONFIG_MTD_DOC2001PLUS is not set 487# CONFIG_MTD_DOC2001PLUS is not set
468# CONFIG_MTD_NAND is not set 488CONFIG_MTD_NAND=y
489# CONFIG_MTD_NAND_VERIFY_WRITE is not set
490# CONFIG_MTD_NAND_ECC_SMC is not set
491# CONFIG_MTD_NAND_MUSEUM_IDS is not set
492# CONFIG_MTD_NAND_GPIO is not set
493CONFIG_MTD_NAND_IDS=y
494# CONFIG_MTD_NAND_DISKONCHIP is not set
495# CONFIG_MTD_NAND_NANDSIM is not set
496# CONFIG_MTD_NAND_PLATFORM is not set
497CONFIG_MTD_NAND_MXC=y
469# CONFIG_MTD_ONENAND is not set 498# CONFIG_MTD_ONENAND is not set
470 499
471# 500#
@@ -476,10 +505,30 @@ CONFIG_MTD_PHYSMAP=y
476# 505#
477# UBI - Unsorted block images 506# UBI - Unsorted block images
478# 507#
479# CONFIG_MTD_UBI is not set 508CONFIG_MTD_UBI=y
509CONFIG_MTD_UBI_WL_THRESHOLD=4096
510CONFIG_MTD_UBI_BEB_RESERVE=1
511# CONFIG_MTD_UBI_GLUEBI is not set
512
513#
514# UBI debugging options
515#
516# CONFIG_MTD_UBI_DEBUG is not set
480# CONFIG_PARPORT is not set 517# CONFIG_PARPORT is not set
481# CONFIG_BLK_DEV is not set 518# CONFIG_BLK_DEV is not set
482# CONFIG_MISC_DEVICES is not set 519CONFIG_MISC_DEVICES=y
520# CONFIG_ICS932S401 is not set
521# CONFIG_ENCLOSURE_SERVICES is not set
522# CONFIG_ISL29003 is not set
523# CONFIG_C2PORT is not set
524
525#
526# EEPROM support
527#
528CONFIG_EEPROM_AT24=y
529# CONFIG_EEPROM_LEGACY is not set
530# CONFIG_EEPROM_MAX6875 is not set
531# CONFIG_EEPROM_93CX6 is not set
483CONFIG_HAVE_IDE=y 532CONFIG_HAVE_IDE=y
484# CONFIG_IDE is not set 533# CONFIG_IDE is not set
485 534
@@ -493,7 +542,6 @@ CONFIG_HAVE_IDE=y
493# CONFIG_ATA is not set 542# CONFIG_ATA is not set
494# CONFIG_MD is not set 543# CONFIG_MD is not set
495CONFIG_NETDEVICES=y 544CONFIG_NETDEVICES=y
496CONFIG_COMPAT_NET_DEV_OPS=y
497# CONFIG_DUMMY is not set 545# CONFIG_DUMMY is not set
498# CONFIG_BONDING is not set 546# CONFIG_BONDING is not set
499# CONFIG_MACVLAN is not set 547# CONFIG_MACVLAN is not set
@@ -528,7 +576,7 @@ CONFIG_MII=y
528# CONFIG_ETHOC is not set 576# CONFIG_ETHOC is not set
529# CONFIG_SMC911X is not set 577# CONFIG_SMC911X is not set
530CONFIG_SMSC911X=y 578CONFIG_SMSC911X=y
531# CONFIG_DNET is not set 579CONFIG_DNET=y
532# CONFIG_IBM_NEW_EMAC_ZMII is not set 580# CONFIG_IBM_NEW_EMAC_ZMII is not set
533# CONFIG_IBM_NEW_EMAC_RGMII is not set 581# CONFIG_IBM_NEW_EMAC_RGMII is not set
534# CONFIG_IBM_NEW_EMAC_TAH is not set 582# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -537,8 +585,10 @@ CONFIG_SMSC911X=y
537# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 585# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
538# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 586# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
539# CONFIG_B44 is not set 587# CONFIG_B44 is not set
540CONFIG_CS89x0=y 588# CONFIG_CS89x0 is not set
541CONFIG_CS89x0_NONISA_IRQ=y 589# CONFIG_KS8842 is not set
590CONFIG_FEC=y
591# CONFIG_FEC2 is not set
542# CONFIG_NETDEV_1000 is not set 592# CONFIG_NETDEV_1000 is not set
543# CONFIG_NETDEV_10000 is not set 593# CONFIG_NETDEV_10000 is not set
544 594
@@ -609,6 +659,7 @@ CONFIG_I2C_HELPER_AUTO=y
609# 659#
610# I2C system bus drivers (mostly embedded / system-on-chip) 660# I2C system bus drivers (mostly embedded / system-on-chip)
611# 661#
662# CONFIG_I2C_DESIGNWARE is not set
612# CONFIG_I2C_GPIO is not set 663# CONFIG_I2C_GPIO is not set
613CONFIG_I2C_IMX=y 664CONFIG_I2C_IMX=y
614# CONFIG_I2C_OCORES is not set 665# CONFIG_I2C_OCORES is not set
@@ -633,7 +684,6 @@ CONFIG_I2C_IMX=y
633# CONFIG_SENSORS_PCF8574 is not set 684# CONFIG_SENSORS_PCF8574 is not set
634# CONFIG_PCF8575 is not set 685# CONFIG_PCF8575 is not set
635# CONFIG_SENSORS_PCA9539 is not set 686# CONFIG_SENSORS_PCA9539 is not set
636# CONFIG_SENSORS_MAX6875 is not set
637# CONFIG_SENSORS_TSL2550 is not set 687# CONFIG_SENSORS_TSL2550 is not set
638# CONFIG_I2C_DEBUG_CORE is not set 688# CONFIG_I2C_DEBUG_CORE is not set
639# CONFIG_I2C_DEBUG_ALGO is not set 689# CONFIG_I2C_DEBUG_ALGO is not set
@@ -669,6 +719,7 @@ CONFIG_W1=y
669# 719#
670# CONFIG_W1_MASTER_DS2482 is not set 720# CONFIG_W1_MASTER_DS2482 is not set
671CONFIG_W1_MASTER_MXC=y 721CONFIG_W1_MASTER_MXC=y
722# CONFIG_W1_MASTER_DS1WM is not set
672# CONFIG_W1_MASTER_GPIO is not set 723# CONFIG_W1_MASTER_GPIO is not set
673 724
674# 725#
@@ -703,6 +754,8 @@ CONFIG_SSB_POSSIBLE=y
703# CONFIG_TPS65010 is not set 754# CONFIG_TPS65010 is not set
704# CONFIG_TWL4030_CORE is not set 755# CONFIG_TWL4030_CORE is not set
705# CONFIG_MFD_TMIO is not set 756# CONFIG_MFD_TMIO is not set
757# CONFIG_MFD_T7L66XB is not set
758# CONFIG_MFD_TC6387XB is not set
706# CONFIG_MFD_TC6393XB is not set 759# CONFIG_MFD_TC6393XB is not set
707# CONFIG_PMIC_DA903X is not set 760# CONFIG_PMIC_DA903X is not set
708# CONFIG_MFD_WM8400 is not set 761# CONFIG_MFD_WM8400 is not set
@@ -711,10 +764,8 @@ CONFIG_MFD_WM8350_CONFIG_MODE_0=y
711CONFIG_MFD_WM8352_CONFIG_MODE_0=y 764CONFIG_MFD_WM8352_CONFIG_MODE_0=y
712CONFIG_MFD_WM8350_I2C=y 765CONFIG_MFD_WM8350_I2C=y
713# CONFIG_MFD_PCF50633 is not set 766# CONFIG_MFD_PCF50633 is not set
714 767# CONFIG_AB3100_CORE is not set
715# 768CONFIG_MEDIA_SUPPORT=y
716# Multimedia devices
717#
718 769
719# 770#
720# Multimedia core support 771# Multimedia core support
@@ -758,8 +809,10 @@ CONFIG_SOC_CAMERA_MT9T031=y
758CONFIG_SOC_CAMERA_MT9V022=y 809CONFIG_SOC_CAMERA_MT9V022=y
759CONFIG_SOC_CAMERA_TW9910=y 810CONFIG_SOC_CAMERA_TW9910=y
760# CONFIG_SOC_CAMERA_PLATFORM is not set 811# CONFIG_SOC_CAMERA_PLATFORM is not set
761# CONFIG_SOC_CAMERA_OV772X is not set 812CONFIG_SOC_CAMERA_OV772X=y
813CONFIG_MX3_VIDEO=y
762CONFIG_VIDEO_MX3=y 814CONFIG_VIDEO_MX3=y
815# CONFIG_VIDEO_SH_MOBILE_CEU is not set
763# CONFIG_RADIO_ADAPTERS is not set 816# CONFIG_RADIO_ADAPTERS is not set
764# CONFIG_DAB is not set 817# CONFIG_DAB is not set
765 818
@@ -847,8 +900,11 @@ CONFIG_REGULATOR=y
847# CONFIG_REGULATOR_DEBUG is not set 900# CONFIG_REGULATOR_DEBUG is not set
848# CONFIG_REGULATOR_FIXED_VOLTAGE is not set 901# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
849# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set 902# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
903# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
850# CONFIG_REGULATOR_BQ24022 is not set 904# CONFIG_REGULATOR_BQ24022 is not set
905# CONFIG_REGULATOR_MAX1586 is not set
851CONFIG_REGULATOR_WM8350=y 906CONFIG_REGULATOR_WM8350=y
907# CONFIG_REGULATOR_LP3971 is not set
852# CONFIG_UIO is not set 908# CONFIG_UIO is not set
853# CONFIG_STAGING is not set 909# CONFIG_STAGING is not set
854 910
@@ -861,10 +917,12 @@ CONFIG_REGULATOR_WM8350=y
861# CONFIG_REISERFS_FS is not set 917# CONFIG_REISERFS_FS is not set
862# CONFIG_JFS_FS is not set 918# CONFIG_JFS_FS is not set
863# CONFIG_FS_POSIX_ACL is not set 919# CONFIG_FS_POSIX_ACL is not set
864CONFIG_FILE_LOCKING=y
865# CONFIG_XFS_FS is not set 920# CONFIG_XFS_FS is not set
921# CONFIG_GFS2_FS is not set
866# CONFIG_OCFS2_FS is not set 922# CONFIG_OCFS2_FS is not set
867# CONFIG_BTRFS_FS is not set 923# CONFIG_BTRFS_FS is not set
924CONFIG_FILE_LOCKING=y
925CONFIG_FSNOTIFY=y
868# CONFIG_DNOTIFY is not set 926# CONFIG_DNOTIFY is not set
869CONFIG_INOTIFY=y 927CONFIG_INOTIFY=y
870CONFIG_INOTIFY_USER=y 928CONFIG_INOTIFY_USER=y
@@ -921,6 +979,12 @@ CONFIG_JFFS2_ZLIB=y
921# CONFIG_JFFS2_LZO is not set 979# CONFIG_JFFS2_LZO is not set
922CONFIG_JFFS2_RTIME=y 980CONFIG_JFFS2_RTIME=y
923# CONFIG_JFFS2_RUBIN is not set 981# CONFIG_JFFS2_RUBIN is not set
982CONFIG_UBIFS_FS=y
983# CONFIG_UBIFS_FS_XATTR is not set
984# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
985CONFIG_UBIFS_FS_LZO=y
986CONFIG_UBIFS_FS_ZLIB=y
987# CONFIG_UBIFS_FS_DEBUG is not set
924# CONFIG_CRAMFS is not set 988# CONFIG_CRAMFS is not set
925# CONFIG_SQUASHFS is not set 989# CONFIG_SQUASHFS is not set
926# CONFIG_VXFS_FS is not set 990# CONFIG_VXFS_FS is not set
@@ -937,6 +1001,7 @@ CONFIG_NFS_FS=y
937CONFIG_NFS_V3=y 1001CONFIG_NFS_V3=y
938# CONFIG_NFS_V3_ACL is not set 1002# CONFIG_NFS_V3_ACL is not set
939CONFIG_NFS_V4=y 1003CONFIG_NFS_V4=y
1004# CONFIG_NFS_V4_1 is not set
940CONFIG_ROOT_NFS=y 1005CONFIG_ROOT_NFS=y
941# CONFIG_NFSD is not set 1006# CONFIG_NFSD is not set
942CONFIG_LOCKD=y 1007CONFIG_LOCKD=y
@@ -979,22 +1044,7 @@ CONFIG_FRAME_WARN=1024
979CONFIG_SYSCTL_SYSCALL_CHECK=y 1044CONFIG_SYSCTL_SYSCALL_CHECK=y
980CONFIG_HAVE_FUNCTION_TRACER=y 1045CONFIG_HAVE_FUNCTION_TRACER=y
981CONFIG_TRACING_SUPPORT=y 1046CONFIG_TRACING_SUPPORT=y
982 1047# CONFIG_FTRACE is not set
983#
984# Tracers
985#
986# CONFIG_FUNCTION_TRACER is not set
987# CONFIG_IRQSOFF_TRACER is not set
988# CONFIG_PREEMPT_TRACER is not set
989# CONFIG_SCHED_TRACER is not set
990# CONFIG_CONTEXT_SWITCH_TRACER is not set
991# CONFIG_EVENT_TRACER is not set
992# CONFIG_BOOT_TRACER is not set
993# CONFIG_TRACE_BRANCH_PROFILING is not set
994# CONFIG_STACK_TRACER is not set
995# CONFIG_KMEMTRACE is not set
996# CONFIG_WORKQUEUE_TRACER is not set
997# CONFIG_BLK_DEV_IO_TRACE is not set
998# CONFIG_SAMPLES is not set 1048# CONFIG_SAMPLES is not set
999CONFIG_HAVE_ARCH_KGDB=y 1049CONFIG_HAVE_ARCH_KGDB=y
1000CONFIG_ARM_UNWIND=y 1050CONFIG_ARM_UNWIND=y
@@ -1094,9 +1144,9 @@ CONFIG_CRYPTO_DES=y
1094# 1144#
1095# Compression 1145# Compression
1096# 1146#
1097# CONFIG_CRYPTO_DEFLATE is not set 1147CONFIG_CRYPTO_DEFLATE=y
1098# CONFIG_CRYPTO_ZLIB is not set 1148# CONFIG_CRYPTO_ZLIB is not set
1099# CONFIG_CRYPTO_LZO is not set 1149CONFIG_CRYPTO_LZO=y
1100 1150
1101# 1151#
1102# Random Number Generation 1152# Random Number Generation
@@ -1109,9 +1159,10 @@ CONFIG_CRYPTO_HW=y
1109# Library routines 1159# Library routines
1110# 1160#
1111CONFIG_BITREVERSE=y 1161CONFIG_BITREVERSE=y
1162CONFIG_RATIONAL=y
1112CONFIG_GENERIC_FIND_LAST_BIT=y 1163CONFIG_GENERIC_FIND_LAST_BIT=y
1113# CONFIG_CRC_CCITT is not set 1164# CONFIG_CRC_CCITT is not set
1114# CONFIG_CRC16 is not set 1165CONFIG_CRC16=y
1115# CONFIG_CRC_T10DIF is not set 1166# CONFIG_CRC_T10DIF is not set
1116# CONFIG_CRC_ITU_T is not set 1167# CONFIG_CRC_ITU_T is not set
1117CONFIG_CRC32=y 1168CONFIG_CRC32=y
@@ -1119,6 +1170,8 @@ CONFIG_CRC32=y
1119# CONFIG_LIBCRC32C is not set 1170# CONFIG_LIBCRC32C is not set
1120CONFIG_ZLIB_INFLATE=y 1171CONFIG_ZLIB_INFLATE=y
1121CONFIG_ZLIB_DEFLATE=y 1172CONFIG_ZLIB_DEFLATE=y
1173CONFIG_LZO_COMPRESS=y
1174CONFIG_LZO_DECOMPRESS=y
1122CONFIG_HAS_IOMEM=y 1175CONFIG_HAS_IOMEM=y
1123CONFIG_HAS_IOPORT=y 1176CONFIG_HAS_IOPORT=y
1124CONFIG_HAS_DMA=y 1177CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/omap3_evm_defconfig b/arch/arm/configs/omap3_evm_defconfig
index 28be17fbc15..d5ff4776cd0 100644
--- a/arch/arm/configs/omap3_evm_defconfig
+++ b/arch/arm/configs/omap3_evm_defconfig
@@ -1107,7 +1107,7 @@ CONFIG_USB_ZERO=m
1107CONFIG_USB_OTG_UTILS=y 1107CONFIG_USB_OTG_UTILS=y
1108# CONFIG_USB_GPIO_VBUS is not set 1108# CONFIG_USB_GPIO_VBUS is not set
1109# CONFIG_ISP1301_OMAP is not set 1109# CONFIG_ISP1301_OMAP is not set
1110CONFIG_TWL4030_USB=y 1110# CONFIG_TWL4030_USB is not set
1111# CONFIG_NOP_USB_XCEIV is not set 1111# CONFIG_NOP_USB_XCEIV is not set
1112CONFIG_MMC=y 1112CONFIG_MMC=y
1113# CONFIG_MMC_DEBUG is not set 1113# CONFIG_MMC_DEBUG is not set
diff --git a/arch/arm/configs/u300_defconfig b/arch/arm/configs/u300_defconfig
index 4762d900129..7d61ae6e75d 100644
--- a/arch/arm/configs/u300_defconfig
+++ b/arch/arm/configs/u300_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.31-rc1 3# Linux kernel version: 2.6.31-rc3
4# Thu Jul 2 00:16:59 2009 4# Thu Jul 16 23:36:10 2009
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -9,7 +9,6 @@ CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y 9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y 10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_MMU=y 11CONFIG_MMU=y
12CONFIG_HAVE_TCM=y
13CONFIG_GENERIC_HARDIRQS=y 12CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y 13CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_HAVE_LATENCYTOP_SUPPORT=y 14CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -113,7 +112,7 @@ CONFIG_MODULE_UNLOAD=y
113# CONFIG_MODVERSIONS is not set 112# CONFIG_MODVERSIONS is not set
114# CONFIG_MODULE_SRCVERSION_ALL is not set 113# CONFIG_MODULE_SRCVERSION_ALL is not set
115CONFIG_BLOCK=y 114CONFIG_BLOCK=y
116CONFIG_LBDAF=y 115# CONFIG_LBDAF is not set
117# CONFIG_BLK_DEV_BSG is not set 116# CONFIG_BLK_DEV_BSG is not set
118# CONFIG_BLK_DEV_INTEGRITY is not set 117# CONFIG_BLK_DEV_INTEGRITY is not set
119 118
@@ -542,13 +541,14 @@ CONFIG_INPUT_EVDEV=y
542# 541#
543CONFIG_INPUT_KEYBOARD=y 542CONFIG_INPUT_KEYBOARD=y
544# CONFIG_KEYBOARD_ATKBD is not set 543# CONFIG_KEYBOARD_ATKBD is not set
545# CONFIG_KEYBOARD_SUNKBD is not set
546# CONFIG_KEYBOARD_LKKBD is not set 544# CONFIG_KEYBOARD_LKKBD is not set
547# CONFIG_KEYBOARD_XTKBD is not set 545# CONFIG_KEYBOARD_GPIO is not set
546# CONFIG_KEYBOARD_MATRIX is not set
547# CONFIG_KEYBOARD_LM8323 is not set
548# CONFIG_KEYBOARD_NEWTON is not set 548# CONFIG_KEYBOARD_NEWTON is not set
549# CONFIG_KEYBOARD_STOWAWAY is not set 549# CONFIG_KEYBOARD_STOWAWAY is not set
550# CONFIG_KEYBOARD_LM8323 is not set 550# CONFIG_KEYBOARD_SUNKBD is not set
551# CONFIG_KEYBOARD_GPIO is not set 551# CONFIG_KEYBOARD_XTKBD is not set
552# CONFIG_INPUT_MOUSE is not set 552# CONFIG_INPUT_MOUSE is not set
553# CONFIG_INPUT_JOYSTICK is not set 553# CONFIG_INPUT_JOYSTICK is not set
554# CONFIG_INPUT_TABLET is not set 554# CONFIG_INPUT_TABLET is not set
@@ -911,7 +911,6 @@ CONFIG_REGULATOR=y
911# CONFIG_JFS_FS is not set 911# CONFIG_JFS_FS is not set
912# CONFIG_FS_POSIX_ACL is not set 912# CONFIG_FS_POSIX_ACL is not set
913# CONFIG_XFS_FS is not set 913# CONFIG_XFS_FS is not set
914# CONFIG_GFS2_FS is not set
915# CONFIG_OCFS2_FS is not set 914# CONFIG_OCFS2_FS is not set
916# CONFIG_BTRFS_FS is not set 915# CONFIG_BTRFS_FS is not set
917CONFIG_FILE_LOCKING=y 916CONFIG_FILE_LOCKING=y
@@ -1122,7 +1121,6 @@ CONFIG_GENERIC_FIND_LAST_BIT=y
1122# CONFIG_CRC32 is not set 1121# CONFIG_CRC32 is not set
1123# CONFIG_CRC7 is not set 1122# CONFIG_CRC7 is not set
1124# CONFIG_LIBCRC32C is not set 1123# CONFIG_LIBCRC32C is not set
1125CONFIG_GENERIC_ALLOCATOR=y
1126CONFIG_HAS_IOMEM=y 1124CONFIG_HAS_IOMEM=y
1127CONFIG_HAS_IOPORT=y 1125CONFIG_HAS_IOPORT=y
1128CONFIG_HAS_DMA=y 1126CONFIG_HAS_DMA=y
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
index 9e07fe50702..9ed2377fe8e 100644
--- a/arch/arm/include/asm/atomic.h
+++ b/arch/arm/include/asm/atomic.h
@@ -159,8 +159,6 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
159 159
160#else /* ARM_ARCH_6 */ 160#else /* ARM_ARCH_6 */
161 161
162#include <asm/system.h>
163
164#ifdef CONFIG_SMP 162#ifdef CONFIG_SMP
165#error SMP not supported on pre-ARMv6 CPUs 163#error SMP not supported on pre-ARMv6 CPUs
166#endif 164#endif
diff --git a/arch/arm/include/asm/tlb.h b/arch/arm/include/asm/tlb.h
index 321c83e43a1..f41a6f57cd1 100644
--- a/arch/arm/include/asm/tlb.h
+++ b/arch/arm/include/asm/tlb.h
@@ -102,8 +102,8 @@ tlb_end_vma(struct mmu_gather *tlb, struct vm_area_struct *vma)
102} 102}
103 103
104#define tlb_remove_page(tlb,page) free_page_and_swap_cache(page) 104#define tlb_remove_page(tlb,page) free_page_and_swap_cache(page)
105#define pte_free_tlb(tlb, ptep) pte_free((tlb)->mm, ptep) 105#define pte_free_tlb(tlb, ptep, addr) pte_free((tlb)->mm, ptep)
106#define pmd_free_tlb(tlb, pmdp) pmd_free((tlb)->mm, pmdp) 106#define pmd_free_tlb(tlb, pmdp, addr) pmd_free((tlb)->mm, pmdp)
107 107
108#define tlb_migrate_finish(mm) do { } while (0) 108#define tlb_migrate_finish(mm) do { } while (0)
109 109
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 366e5097a41..8c3de1a350b 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -148,7 +148,7 @@ trace:
148 sub r0, r0, #MCOUNT_INSN_SIZE 148 sub r0, r0, #MCOUNT_INSN_SIZE
149 mov lr, pc 149 mov lr, pc
150 mov pc, r2 150 mov pc, r2
151 mov lr, r1 @ restore lr 151 ldr lr, [fp, #-4] @ restore lr
152 ldmia sp!, {r0-r3, pc} 152 ldmia sp!, {r0-r3, pc}
153 153
154#endif /* CONFIG_DYNAMIC_FTRACE */ 154#endif /* CONFIG_DYNAMIC_FTRACE */
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index 93bb4247b7e..f6bc5d44278 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -133,7 +133,7 @@ sys_sigaction(int sig, const struct old_sigaction __user *act,
133} 133}
134 134
135#ifdef CONFIG_CRUNCH 135#ifdef CONFIG_CRUNCH
136static int preserve_crunch_context(struct crunch_sigframe *frame) 136static int preserve_crunch_context(struct crunch_sigframe __user *frame)
137{ 137{
138 char kbuf[sizeof(*frame) + 8]; 138 char kbuf[sizeof(*frame) + 8];
139 struct crunch_sigframe *kframe; 139 struct crunch_sigframe *kframe;
@@ -146,7 +146,7 @@ static int preserve_crunch_context(struct crunch_sigframe *frame)
146 return __copy_to_user(frame, kframe, sizeof(*frame)); 146 return __copy_to_user(frame, kframe, sizeof(*frame));
147} 147}
148 148
149static int restore_crunch_context(struct crunch_sigframe *frame) 149static int restore_crunch_context(struct crunch_sigframe __user *frame)
150{ 150{
151 char kbuf[sizeof(*frame) + 8]; 151 char kbuf[sizeof(*frame) + 8];
152 struct crunch_sigframe *kframe; 152 struct crunch_sigframe *kframe;
diff --git a/arch/arm/mach-at91/include/mach/at_hdmac.h b/arch/arm/mach-at91/include/mach/at_hdmac.h
new file mode 100644
index 00000000000..187cb58345c
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at_hdmac.h
@@ -0,0 +1,102 @@
1/*
2 * Header file for the Atmel AHB DMA Controller driver
3 *
4 * Copyright (C) 2008 Atmel Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 */
11#ifndef AT_HDMAC_H
12#define AT_HDMAC_H
13
14#include <linux/dmaengine.h>
15
16/**
17 * struct at_dma_platform_data - Controller configuration parameters
18 * @nr_channels: Number of channels supported by hardware (max 8)
19 * @cap_mask: dma_capability flags supported by the platform
20 */
21struct at_dma_platform_data {
22 unsigned int nr_channels;
23 dma_cap_mask_t cap_mask;
24};
25
26/**
27 * enum at_dma_slave_width - DMA slave register access width.
28 * @AT_DMA_SLAVE_WIDTH_8BIT: Do 8-bit slave register accesses
29 * @AT_DMA_SLAVE_WIDTH_16BIT: Do 16-bit slave register accesses
30 * @AT_DMA_SLAVE_WIDTH_32BIT: Do 32-bit slave register accesses
31 */
32enum at_dma_slave_width {
33 AT_DMA_SLAVE_WIDTH_8BIT = 0,
34 AT_DMA_SLAVE_WIDTH_16BIT,
35 AT_DMA_SLAVE_WIDTH_32BIT,
36};
37
38/**
39 * struct at_dma_slave - Controller-specific information about a slave
40 * @dma_dev: required DMA master device
41 * @tx_reg: physical address of data register used for
42 * memory-to-peripheral transfers
43 * @rx_reg: physical address of data register used for
44 * peripheral-to-memory transfers
45 * @reg_width: peripheral register width
46 * @cfg: Platform-specific initializer for the CFG register
47 * @ctrla: Platform-specific initializer for the CTRLA register
48 */
49struct at_dma_slave {
50 struct device *dma_dev;
51 dma_addr_t tx_reg;
52 dma_addr_t rx_reg;
53 enum at_dma_slave_width reg_width;
54 u32 cfg;
55 u32 ctrla;
56};
57
58
59/* Platform-configurable bits in CFG */
60#define ATC_SRC_PER(h) (0xFU & (h)) /* Channel src rq associated with periph handshaking ifc h */
61#define ATC_DST_PER(h) ((0xFU & (h)) << 4) /* Channel dst rq associated with periph handshaking ifc h */
62#define ATC_SRC_REP (0x1 << 8) /* Source Replay Mod */
63#define ATC_SRC_H2SEL (0x1 << 9) /* Source Handshaking Mod */
64#define ATC_SRC_H2SEL_SW (0x0 << 9)
65#define ATC_SRC_H2SEL_HW (0x1 << 9)
66#define ATC_DST_REP (0x1 << 12) /* Destination Replay Mod */
67#define ATC_DST_H2SEL (0x1 << 13) /* Destination Handshaking Mod */
68#define ATC_DST_H2SEL_SW (0x0 << 13)
69#define ATC_DST_H2SEL_HW (0x1 << 13)
70#define ATC_SOD (0x1 << 16) /* Stop On Done */
71#define ATC_LOCK_IF (0x1 << 20) /* Interface Lock */
72#define ATC_LOCK_B (0x1 << 21) /* AHB Bus Lock */
73#define ATC_LOCK_IF_L (0x1 << 22) /* Master Interface Arbiter Lock */
74#define ATC_LOCK_IF_L_CHUNK (0x0 << 22)
75#define ATC_LOCK_IF_L_BUFFER (0x1 << 22)
76#define ATC_AHB_PROT_MASK (0x7 << 24) /* AHB Protection */
77#define ATC_FIFOCFG_MASK (0x3 << 28) /* FIFO Request Configuration */
78#define ATC_FIFOCFG_LARGESTBURST (0x0 << 28)
79#define ATC_FIFOCFG_HALFFIFO (0x1 << 28)
80#define ATC_FIFOCFG_ENOUGHSPACE (0x2 << 28)
81
82/* Platform-configurable bits in CTRLA */
83#define ATC_SCSIZE_MASK (0x7 << 16) /* Source Chunk Transfer Size */
84#define ATC_SCSIZE_1 (0x0 << 16)
85#define ATC_SCSIZE_4 (0x1 << 16)
86#define ATC_SCSIZE_8 (0x2 << 16)
87#define ATC_SCSIZE_16 (0x3 << 16)
88#define ATC_SCSIZE_32 (0x4 << 16)
89#define ATC_SCSIZE_64 (0x5 << 16)
90#define ATC_SCSIZE_128 (0x6 << 16)
91#define ATC_SCSIZE_256 (0x7 << 16)
92#define ATC_DCSIZE_MASK (0x7 << 20) /* Destination Chunk Transfer Size */
93#define ATC_DCSIZE_1 (0x0 << 20)
94#define ATC_DCSIZE_4 (0x1 << 20)
95#define ATC_DCSIZE_8 (0x2 << 20)
96#define ATC_DCSIZE_16 (0x3 << 20)
97#define ATC_DCSIZE_32 (0x4 << 20)
98#define ATC_DCSIZE_64 (0x5 << 20)
99#define ATC_DCSIZE_128 (0x6 << 20)
100#define ATC_DCSIZE_256 (0x7 << 20)
101
102#endif /* AT_HDMAC_H */
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
index 5ac2f565d86..d6ab64ccd49 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -37,7 +37,6 @@
37#include <mach/serial.h> 37#include <mach/serial.h>
38#include <mach/nand.h> 38#include <mach/nand.h>
39#include <mach/mmc.h> 39#include <mach/mmc.h>
40#include <mach/common.h>
41 40
42#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000 41#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000
43#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 42#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c
index 28c9008df4f..84ad5d161a8 100644
--- a/arch/arm/mach-davinci/board-dm355-leopard.c
+++ b/arch/arm/mach-davinci/board-dm355-leopard.c
@@ -36,7 +36,6 @@
36#include <mach/serial.h> 36#include <mach/serial.h>
37#include <mach/nand.h> 37#include <mach/nand.h>
38#include <mach/mmc.h> 38#include <mach/mmc.h>
39#include <mach/common.h>
40 39
41#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000 40#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000
42#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 41#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index d9d40450bdc..56c8cd01de9 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -45,7 +45,6 @@
45#include <mach/nand.h> 45#include <mach/nand.h>
46#include <mach/mmc.h> 46#include <mach/mmc.h>
47#include <mach/emac.h> 47#include <mach/emac.h>
48#include <mach/common.h>
49 48
50#define DM644X_EVM_PHY_MASK (0x2) 49#define DM644X_EVM_PHY_MASK (0x2)
51#define DM644X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ 50#define DM644X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
index e17de635262..8657e72debc 100644
--- a/arch/arm/mach-davinci/board-dm646x-evm.c
+++ b/arch/arm/mach-davinci/board-dm646x-evm.c
@@ -47,7 +47,6 @@
47#include <mach/i2c.h> 47#include <mach/i2c.h>
48#include <mach/mmc.h> 48#include <mach/mmc.h>
49#include <mach/emac.h> 49#include <mach/emac.h>
50#include <mach/common.h>
51 50
52#define DM646X_EVM_PHY_MASK (0x2) 51#define DM646X_EVM_PHY_MASK (0x2)
53#define DM646X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ 52#define DM646X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */
diff --git a/arch/arm/mach-davinci/board-sffsdr.c b/arch/arm/mach-davinci/board-sffsdr.c
index 748a8e48541..7acdfd8ac07 100644
--- a/arch/arm/mach-davinci/board-sffsdr.c
+++ b/arch/arm/mach-davinci/board-sffsdr.c
@@ -52,7 +52,6 @@
52#include <mach/serial.h> 52#include <mach/serial.h>
53#include <mach/psc.h> 53#include <mach/psc.h>
54#include <mach/mux.h> 54#include <mach/mux.h>
55#include <mach/common.h>
56 55
57#define SFFSDR_PHY_MASK (0x2) 56#define SFFSDR_PHY_MASK (0x2)
58#define SFFSDR_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ 57#define SFFSDR_MDIO_FREQUENCY (2200000) /* PHY bus frequency */
diff --git a/arch/arm/mach-ep93xx/dma-m2p.c b/arch/arm/mach-ep93xx/dma-m2p.c
index a2df5bb7dff..dbcac9c40a2 100644
--- a/arch/arm/mach-ep93xx/dma-m2p.c
+++ b/arch/arm/mach-ep93xx/dma-m2p.c
@@ -33,6 +33,7 @@
33#include <linux/err.h> 33#include <linux/err.h>
34#include <linux/interrupt.h> 34#include <linux/interrupt.h>
35#include <linux/module.h> 35#include <linux/module.h>
36#include <linux/io.h>
36 37
37#include <mach/dma.h> 38#include <mach/dma.h>
38#include <mach/hardware.h> 39#include <mach/hardware.h>
diff --git a/arch/arm/mach-ep93xx/include/mach/ts72xx.h b/arch/arm/mach-ep93xx/include/mach/ts72xx.h
index 34ddec081c4..411734422c1 100644
--- a/arch/arm/mach-ep93xx/include/mach/ts72xx.h
+++ b/arch/arm/mach-ep93xx/include/mach/ts72xx.h
@@ -41,9 +41,6 @@
41#define TS72XX_OPTIONS2_TS9420_BOOT 0x02 41#define TS72XX_OPTIONS2_TS9420_BOOT 0x02
42 42
43 43
44#define TS72XX_NOR_PHYS_BASE 0x60000000
45#define TS72XX_NOR2_PHYS_BASE 0x62000000
46
47#define TS72XX_NAND1_DATA_PHYS_BASE 0x60000000 44#define TS72XX_NAND1_DATA_PHYS_BASE 0x60000000
48#define TS72XX_NAND2_DATA_PHYS_BASE 0x70000000 45#define TS72XX_NAND2_DATA_PHYS_BASE 0x70000000
49#define TS72XX_NAND_DATA_VIRT_BASE 0xfebfc000 46#define TS72XX_NAND_DATA_VIRT_BASE 0xfebfc000
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index 7ee024d3482..aaf1371412a 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -112,13 +112,16 @@ static void __init ts72xx_map_io(void)
112 } 112 }
113} 113}
114 114
115/*************************************************************************
116 * NOR flash (TS-7200 only)
117 *************************************************************************/
115static struct physmap_flash_data ts72xx_flash_data = { 118static struct physmap_flash_data ts72xx_flash_data = {
116 .width = 1, 119 .width = 2,
117}; 120};
118 121
119static struct resource ts72xx_flash_resource = { 122static struct resource ts72xx_flash_resource = {
120 .start = TS72XX_NOR_PHYS_BASE, 123 .start = EP93XX_CS6_PHYS_BASE,
121 .end = TS72XX_NOR_PHYS_BASE + SZ_16M - 1, 124 .end = EP93XX_CS6_PHYS_BASE + SZ_16M - 1,
122 .flags = IORESOURCE_MEM, 125 .flags = IORESOURCE_MEM,
123}; 126};
124 127
@@ -132,6 +135,12 @@ static struct platform_device ts72xx_flash = {
132 .resource = &ts72xx_flash_resource, 135 .resource = &ts72xx_flash_resource,
133}; 136};
134 137
138static void __init ts72xx_register_flash(void)
139{
140 if (board_is_ts7200())
141 platform_device_register(&ts72xx_flash);
142}
143
135static unsigned char ts72xx_rtc_readbyte(unsigned long addr) 144static unsigned char ts72xx_rtc_readbyte(unsigned long addr)
136{ 145{
137 __raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE); 146 __raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE);
@@ -165,8 +174,7 @@ static struct ep93xx_eth_data ts72xx_eth_data = {
165static void __init ts72xx_init_machine(void) 174static void __init ts72xx_init_machine(void)
166{ 175{
167 ep93xx_init_devices(); 176 ep93xx_init_devices();
168 if (board_is_ts7200()) 177 ts72xx_register_flash();
169 platform_device_register(&ts72xx_flash);
170 platform_device_register(&ts72xx_rtc_device); 178 platform_device_register(&ts72xx_rtc_device);
171 179
172 ep93xx_register_eth(&ts72xx_eth_data, 1); 180 ep93xx_register_eth(&ts72xx_eth_data, 1);
diff --git a/arch/arm/mach-kirkwood/mpp.h b/arch/arm/mach-kirkwood/mpp.h
index e021a80c2ca..bc74278ed31 100644
--- a/arch/arm/mach-kirkwood/mpp.h
+++ b/arch/arm/mach-kirkwood/mpp.h
@@ -289,7 +289,7 @@
289 289
290#define MPP48_GPIO MPP( 48, 0x0, 1, 1, 0, 0, 0, 1 ) 290#define MPP48_GPIO MPP( 48, 0x0, 1, 1, 0, 0, 0, 1 )
291#define MPP48_TSMP12 MPP( 48, 0x1, 1, 1, 0, 0, 0, 1 ) 291#define MPP48_TSMP12 MPP( 48, 0x1, 1, 1, 0, 0, 0, 1 )
292#define MPP48_TDM_DTX MPP( 48. 0x2, 0, 1, 0, 0, 0, 1 ) 292#define MPP48_TDM_DTX MPP( 48, 0x2, 0, 1, 0, 0, 0, 1 )
293 293
294#define MPP49_GPIO MPP( 49, 0x0, 1, 1, 0, 0, 0, 1 ) 294#define MPP49_GPIO MPP( 49, 0x0, 1, 1, 0, 0, 0, 1 )
295#define MPP49_TSMP9 MPP( 49, 0x1, 1, 1, 0, 0, 0, 1 ) 295#define MPP49_TSMP9 MPP( 49, 0x1, 1, 1, 0, 0, 0, 1 )
diff --git a/arch/arm/mach-ks8695/include/mach/hardware.h b/arch/arm/mach-ks8695/include/mach/hardware.h
index 1d640d075b7..e0f911d9e02 100644
--- a/arch/arm/mach-ks8695/include/mach/hardware.h
+++ b/arch/arm/mach-ks8695/include/mach/hardware.h
@@ -17,6 +17,11 @@
17#include <asm/sizes.h> 17#include <asm/sizes.h>
18 18
19/* 19/*
20 * Clocks are derived from MCLK, which is 25Mhz
21 */
22#define KS8695_CLOCK_RATE 25000000
23
24/*
20 * Physical RAM address. 25 * Physical RAM address.
21 */ 26 */
22#define KS8695_SDRAM_PA 0x00000000 27#define KS8695_SDRAM_PA 0x00000000
diff --git a/arch/arm/mach-ks8695/include/mach/timex.h b/arch/arm/mach-ks8695/include/mach/timex.h
index 4682e350369..10f716371bd 100644
--- a/arch/arm/mach-ks8695/include/mach/timex.h
+++ b/arch/arm/mach-ks8695/include/mach/timex.h
@@ -14,7 +14,8 @@
14#ifndef __ASM_ARCH_TIMEX_H 14#ifndef __ASM_ARCH_TIMEX_H
15#define __ASM_ARCH_TIMEX_H 15#define __ASM_ARCH_TIMEX_H
16 16
17/* timers are derived from MCLK, which is 25MHz */ 17#include <mach/hardware.h>
18#define CLOCK_TICK_RATE 25000000 18
19#define CLOCK_TICK_RATE KS8695_CLOCK_RATE
19 20
20#endif 21#endif
diff --git a/arch/arm/mach-ks8695/pci.c b/arch/arm/mach-ks8695/pci.c
index f5ebcc0fcab..78499667eb7 100644
--- a/arch/arm/mach-ks8695/pci.c
+++ b/arch/arm/mach-ks8695/pci.c
@@ -245,6 +245,9 @@ static int ks8695_pci_fault(unsigned long addr, unsigned int fsr, struct pt_regs
245 245
246static void __init ks8695_pci_preinit(void) 246static void __init ks8695_pci_preinit(void)
247{ 247{
248 /* make software reset to avoid freeze if PCI bus was messed up */
249 __raw_writel(0x80000000, KS8695_PCI_VA + KS8695_PBCS);
250
248 /* stage 1 initialization, subid, subdevice = 0x0001 */ 251 /* stage 1 initialization, subid, subdevice = 0x0001 */
249 __raw_writel(0x00010001, KS8695_PCI_VA + KS8695_CRCSID); 252 __raw_writel(0x00010001, KS8695_PCI_VA + KS8695_CRCSID);
250 253
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index 17a21a291e2..851f2458bf6 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -36,6 +36,14 @@ config MACH_PCM037
36 Include support for Phytec pcm037 platform. This includes 36 Include support for Phytec pcm037 platform. This includes
37 specific configurations for the board and its peripherals. 37 specific configurations for the board and its peripherals.
38 38
39config MACH_PCM037_EET
40 bool "Support pcm037 EET board extensions"
41 depends on MACH_PCM037
42 help
43 Add support for PCM037 EET baseboard extensions. If you are using the
44 OLED display with EET, use "video=mx3fb:CMEL-OLED" kernel
45 command-line parameter.
46
39config MACH_MX31LITE 47config MACH_MX31LITE
40 bool "Support MX31 LITEKIT (LogicPD)" 48 bool "Support MX31 LITEKIT (LogicPD)"
41 select ARCH_MX31 49 select ARCH_MX31
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile
index 0322696bd11..6b9775471be 100644
--- a/arch/arm/mach-mx3/Makefile
+++ b/arch/arm/mach-mx3/Makefile
@@ -11,6 +11,7 @@ obj-$(CONFIG_MACH_MX31ADS) += mx31ads.o
11obj-$(CONFIG_MACH_MX31LILLY) += mx31lilly.o mx31lilly-db.o 11obj-$(CONFIG_MACH_MX31LILLY) += mx31lilly.o mx31lilly-db.o
12obj-$(CONFIG_MACH_MX31LITE) += mx31lite.o 12obj-$(CONFIG_MACH_MX31LITE) += mx31lite.o
13obj-$(CONFIG_MACH_PCM037) += pcm037.o 13obj-$(CONFIG_MACH_PCM037) += pcm037.o
14obj-$(CONFIG_MACH_PCM037_EET) += pcm037_eet.o
14obj-$(CONFIG_MACH_MX31_3DS) += mx31pdk.o 15obj-$(CONFIG_MACH_MX31_3DS) += mx31pdk.o
15obj-$(CONFIG_MACH_MX31MOBOARD) += mx31moboard.o mx31moboard-devboard.o \ 16obj-$(CONFIG_MACH_MX31MOBOARD) += mx31moboard.o mx31moboard-devboard.o \
16 mx31moboard-marxbot.o 17 mx31moboard-marxbot.o
diff --git a/arch/arm/mach-mx3/armadillo5x0.c b/arch/arm/mach-mx3/armadillo5x0.c
index 541181090b3..ee331fd6b1b 100644
--- a/arch/arm/mach-mx3/armadillo5x0.c
+++ b/arch/arm/mach-mx3/armadillo5x0.c
@@ -31,6 +31,8 @@
31#include <linux/smsc911x.h> 31#include <linux/smsc911x.h>
32#include <linux/interrupt.h> 32#include <linux/interrupt.h>
33#include <linux/irq.h> 33#include <linux/irq.h>
34#include <linux/mtd/physmap.h>
35#include <linux/io.h>
34 36
35#include <mach/hardware.h> 37#include <mach/hardware.h>
36#include <asm/mach-types.h> 38#include <asm/mach-types.h>
@@ -46,8 +48,10 @@
46#include <mach/mmc.h> 48#include <mach/mmc.h>
47#include <mach/ipu.h> 49#include <mach/ipu.h>
48#include <mach/mx3fb.h> 50#include <mach/mx3fb.h>
51#include <mach/mxc_nand.h>
49 52
50#include "devices.h" 53#include "devices.h"
54#include "crm_regs.h"
51 55
52static int armadillo5x0_pins[] = { 56static int armadillo5x0_pins[] = {
53 /* UART1 */ 57 /* UART1 */
@@ -93,7 +97,56 @@ static int armadillo5x0_pins[] = {
93 MX31_PIN_FPSHIFT__FPSHIFT, 97 MX31_PIN_FPSHIFT__FPSHIFT,
94 MX31_PIN_DRDY0__DRDY0, 98 MX31_PIN_DRDY0__DRDY0,
95 IOMUX_MODE(MX31_PIN_LCS1, IOMUX_CONFIG_GPIO), /*ADV7125_PSAVE*/ 99 IOMUX_MODE(MX31_PIN_LCS1, IOMUX_CONFIG_GPIO), /*ADV7125_PSAVE*/
100};
96 101
102/*
103 * NAND Flash
104 */
105static struct mxc_nand_platform_data armadillo5x0_nand_flash_pdata = {
106 .width = 1,
107 .hw_ecc = 1,
108};
109
110/*
111 * MTD NOR Flash
112 */
113static struct mtd_partition armadillo5x0_nor_flash_partitions[] = {
114 {
115 .name = "nor.bootloader",
116 .offset = 0x00000000,
117 .size = 4*32*1024,
118 }, {
119 .name = "nor.kernel",
120 .offset = MTDPART_OFS_APPEND,
121 .size = 16*128*1024,
122 }, {
123 .name = "nor.userland",
124 .offset = MTDPART_OFS_APPEND,
125 .size = 110*128*1024,
126 }, {
127 .name = "nor.config",
128 .offset = MTDPART_OFS_APPEND,
129 .size = 1*128*1024,
130 },
131};
132
133static struct physmap_flash_data armadillo5x0_nor_flash_pdata = {
134 .width = 2,
135 .parts = armadillo5x0_nor_flash_partitions,
136 .nr_parts = ARRAY_SIZE(armadillo5x0_nor_flash_partitions),
137};
138
139static struct resource armadillo5x0_nor_flash_resource = {
140 .flags = IORESOURCE_MEM,
141 .start = CS0_BASE_ADDR,
142 .end = CS0_BASE_ADDR + SZ_64M - 1,
143};
144
145static struct platform_device armadillo5x0_nor_flash = {
146 .name = "physmap-flash",
147 .id = -1,
148 .num_resources = 1,
149 .resource = &armadillo5x0_nor_flash_resource,
97}; 150};
98 151
99/* 152/*
@@ -272,6 +325,16 @@ static void __init armadillo5x0_init(void)
272 /* Register FB */ 325 /* Register FB */
273 mxc_register_device(&mx3_ipu, &mx3_ipu_data); 326 mxc_register_device(&mx3_ipu, &mx3_ipu_data);
274 mxc_register_device(&mx3_fb, &mx3fb_pdata); 327 mxc_register_device(&mx3_fb, &mx3fb_pdata);
328
329 /* Register NOR Flash */
330 mxc_register_device(&armadillo5x0_nor_flash,
331 &armadillo5x0_nor_flash_pdata);
332
333 /* Register NAND Flash */
334 mxc_register_device(&mxc_nand_device, &armadillo5x0_nand_flash_pdata);
335
336 /* set NAND page size to 2k if not configured via boot mode pins */
337 __raw_writel(__raw_readl(MXC_CCM_RCSR) | (1 << 30), MXC_CCM_RCSR);
275} 338}
276 339
277static void __init armadillo5x0_timer_init(void) 340static void __init armadillo5x0_timer_init(void)
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c
index d927eddcad4..9e87e08fb12 100644
--- a/arch/arm/mach-mx3/devices.c
+++ b/arch/arm/mach-mx3/devices.c
@@ -22,7 +22,6 @@
22#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/serial.h> 23#include <linux/serial.h>
24#include <linux/gpio.h> 24#include <linux/gpio.h>
25#include <linux/dma-mapping.h>
26#include <mach/hardware.h> 25#include <mach/hardware.h>
27#include <mach/irqs.h> 26#include <mach/irqs.h>
28#include <mach/common.h> 27#include <mach/common.h>
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c
index c6f61a1f06c..840cfda341d 100644
--- a/arch/arm/mach-mx3/pcm037.c
+++ b/arch/arm/mach-mx3/pcm037.c
@@ -18,7 +18,7 @@
18 18
19#include <linux/types.h> 19#include <linux/types.h>
20#include <linux/init.h> 20#include <linux/init.h>
21 21#include <linux/dma-mapping.h>
22#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/mtd/physmap.h> 23#include <linux/mtd/physmap.h>
24#include <linux/mtd/plat-ram.h> 24#include <linux/mtd/plat-ram.h>
@@ -33,29 +33,67 @@
33#include <linux/irq.h> 33#include <linux/irq.h>
34#include <linux/fsl_devices.h> 34#include <linux/fsl_devices.h>
35 35
36#include <mach/hardware.h> 36#include <media/soc_camera.h>
37
37#include <asm/mach-types.h> 38#include <asm/mach-types.h>
38#include <asm/mach/arch.h> 39#include <asm/mach/arch.h>
39#include <asm/mach/time.h> 40#include <asm/mach/time.h>
40#include <asm/mach/map.h> 41#include <asm/mach/map.h>
42#include <mach/board-pcm037.h>
41#include <mach/common.h> 43#include <mach/common.h>
44#include <mach/hardware.h>
45#include <mach/i2c.h>
42#include <mach/imx-uart.h> 46#include <mach/imx-uart.h>
43#include <mach/iomux-mx3.h> 47#include <mach/iomux-mx3.h>
44#include <mach/ipu.h> 48#include <mach/ipu.h>
45#include <mach/board-pcm037.h> 49#include <mach/mmc.h>
50#include <mach/mx3_camera.h>
46#include <mach/mx3fb.h> 51#include <mach/mx3fb.h>
47#include <mach/mxc_nand.h> 52#include <mach/mxc_nand.h>
48#include <mach/mmc.h>
49#ifdef CONFIG_I2C_IMX
50#include <mach/i2c.h>
51#endif
52 53
53#include "devices.h" 54#include "devices.h"
55#include "pcm037.h"
56
57static enum pcm037_board_variant pcm037_instance = PCM037_PCM970;
58
59static int __init pcm037_variant_setup(char *str)
60{
61 if (!strcmp("eet", str))
62 pcm037_instance = PCM037_EET;
63 else if (strcmp("pcm970", str))
64 pr_warning("Unknown pcm037 baseboard variant %s\n", str);
65
66 return 1;
67}
68
69/* Supported values: "pcm970" (default) and "eet" */
70__setup("pcm037_variant=", pcm037_variant_setup);
71
72enum pcm037_board_variant pcm037_variant(void)
73{
74 return pcm037_instance;
75}
76
77/* UART1 with RTS/CTS handshake signals */
78static unsigned int pcm037_uart1_handshake_pins[] = {
79 MX31_PIN_CTS1__CTS1,
80 MX31_PIN_RTS1__RTS1,
81 MX31_PIN_TXD1__TXD1,
82 MX31_PIN_RXD1__RXD1,
83};
84
85/* UART1 without RTS/CTS handshake signals */
86static unsigned int pcm037_uart1_pins[] = {
87 MX31_PIN_TXD1__TXD1,
88 MX31_PIN_RXD1__RXD1,
89};
54 90
55static unsigned int pcm037_pins[] = { 91static unsigned int pcm037_pins[] = {
56 /* I2C */ 92 /* I2C */
57 MX31_PIN_CSPI2_MOSI__SCL, 93 MX31_PIN_CSPI2_MOSI__SCL,
58 MX31_PIN_CSPI2_MISO__SDA, 94 MX31_PIN_CSPI2_MISO__SDA,
95 MX31_PIN_CSPI2_SS2__I2C3_SDA,
96 MX31_PIN_CSPI2_SCLK__I2C3_SCL,
59 /* SDHC1 */ 97 /* SDHC1 */
60 MX31_PIN_SD1_DATA3__SD1_DATA3, 98 MX31_PIN_SD1_DATA3__SD1_DATA3,
61 MX31_PIN_SD1_DATA2__SD1_DATA2, 99 MX31_PIN_SD1_DATA2__SD1_DATA2,
@@ -73,11 +111,6 @@ static unsigned int pcm037_pins[] = {
73 MX31_PIN_CSPI1_SS0__SS0, 111 MX31_PIN_CSPI1_SS0__SS0,
74 MX31_PIN_CSPI1_SS1__SS1, 112 MX31_PIN_CSPI1_SS1__SS1,
75 MX31_PIN_CSPI1_SS2__SS2, 113 MX31_PIN_CSPI1_SS2__SS2,
76 /* UART1 */
77 MX31_PIN_CTS1__CTS1,
78 MX31_PIN_RTS1__RTS1,
79 MX31_PIN_TXD1__TXD1,
80 MX31_PIN_RXD1__RXD1,
81 /* UART2 */ 114 /* UART2 */
82 MX31_PIN_TXD2__TXD2, 115 MX31_PIN_TXD2__TXD2,
83 MX31_PIN_RXD2__RXD2, 116 MX31_PIN_RXD2__RXD2,
@@ -120,6 +153,22 @@ static unsigned int pcm037_pins[] = {
120 MX31_PIN_D3_SPL__D3_SPL, 153 MX31_PIN_D3_SPL__D3_SPL,
121 MX31_PIN_D3_CLS__D3_CLS, 154 MX31_PIN_D3_CLS__D3_CLS,
122 MX31_PIN_LCS0__GPI03_23, 155 MX31_PIN_LCS0__GPI03_23,
156 /* CSI */
157 IOMUX_MODE(MX31_PIN_CSI_D5, IOMUX_CONFIG_GPIO),
158 MX31_PIN_CSI_D6__CSI_D6,
159 MX31_PIN_CSI_D7__CSI_D7,
160 MX31_PIN_CSI_D8__CSI_D8,
161 MX31_PIN_CSI_D9__CSI_D9,
162 MX31_PIN_CSI_D10__CSI_D10,
163 MX31_PIN_CSI_D11__CSI_D11,
164 MX31_PIN_CSI_D12__CSI_D12,
165 MX31_PIN_CSI_D13__CSI_D13,
166 MX31_PIN_CSI_D14__CSI_D14,
167 MX31_PIN_CSI_D15__CSI_D15,
168 MX31_PIN_CSI_HSYNC__CSI_HSYNC,
169 MX31_PIN_CSI_MCLK__CSI_MCLK,
170 MX31_PIN_CSI_PIXCLK__CSI_PIXCLK,
171 MX31_PIN_CSI_VSYNC__CSI_VSYNC,
123}; 172};
124 173
125static struct physmap_flash_data pcm037_flash_data = { 174static struct physmap_flash_data pcm037_flash_data = {
@@ -250,19 +299,43 @@ static struct mxc_nand_platform_data pcm037_nand_board_info = {
250 .hw_ecc = 1, 299 .hw_ecc = 1,
251}; 300};
252 301
253#ifdef CONFIG_I2C_IMX
254static struct imxi2c_platform_data pcm037_i2c_1_data = { 302static struct imxi2c_platform_data pcm037_i2c_1_data = {
255 .bitrate = 100000, 303 .bitrate = 100000,
256}; 304};
257 305
306static struct imxi2c_platform_data pcm037_i2c_2_data = {
307 .bitrate = 20000,
308};
309
258static struct at24_platform_data board_eeprom = { 310static struct at24_platform_data board_eeprom = {
259 .byte_len = 4096, 311 .byte_len = 4096,
260 .page_size = 32, 312 .page_size = 32,
261 .flags = AT24_FLAG_ADDR16, 313 .flags = AT24_FLAG_ADDR16,
262}; 314};
263 315
316static int pcm037_camera_power(struct device *dev, int on)
317{
318 /* disable or enable the camera in X7 or X8 PCM970 connector */
319 gpio_set_value(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), !on);
320 return 0;
321}
322
323static struct i2c_board_info pcm037_i2c_2_devices[] = {
324 {
325 I2C_BOARD_INFO("mt9t031", 0x5d),
326 },
327};
328
329static struct soc_camera_link iclink = {
330 .bus_id = 0, /* Must match with the camera ID */
331 .power = pcm037_camera_power,
332 .board_info = &pcm037_i2c_2_devices[0],
333 .i2c_adapter_id = 2,
334 .module_name = "mt9t031",
335};
336
264static struct i2c_board_info pcm037_i2c_devices[] = { 337static struct i2c_board_info pcm037_i2c_devices[] = {
265 { 338 {
266 I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */ 339 I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */
267 .platform_data = &board_eeprom, 340 .platform_data = &board_eeprom,
268 }, { 341 }, {
@@ -270,7 +343,14 @@ static struct i2c_board_info pcm037_i2c_devices[] = {
270 .type = "pcf8563", 343 .type = "pcf8563",
271 } 344 }
272}; 345};
273#endif 346
347static struct platform_device pcm037_camera = {
348 .name = "soc-camera-pdrv",
349 .id = 0,
350 .dev = {
351 .platform_data = &iclink,
352 },
353};
274 354
275/* Not connected by default */ 355/* Not connected by default */
276#ifdef PCM970_SDHC_RW_SWITCH 356#ifdef PCM970_SDHC_RW_SWITCH
@@ -334,9 +414,41 @@ static struct imxmmc_platform_data sdhc_pdata = {
334 .exit = pcm970_sdhc1_exit, 414 .exit = pcm970_sdhc1_exit,
335}; 415};
336 416
417struct mx3_camera_pdata camera_pdata = {
418 .dma_dev = &mx3_ipu.dev,
419 .flags = MX3_CAMERA_DATAWIDTH_8 | MX3_CAMERA_DATAWIDTH_10,
420 .mclk_10khz = 2000,
421};
422
423static int __init pcm037_camera_alloc_dma(const size_t buf_size)
424{
425 dma_addr_t dma_handle;
426 void *buf;
427 int dma;
428
429 if (buf_size < 2 * 1024 * 1024)
430 return -EINVAL;
431
432 buf = dma_alloc_coherent(NULL, buf_size, &dma_handle, GFP_KERNEL);
433 if (!buf) {
434 pr_err("%s: cannot allocate camera buffer-memory\n", __func__);
435 return -ENOMEM;
436 }
437
438 memset(buf, 0, buf_size);
439
440 dma = dma_declare_coherent_memory(&mx3_camera.dev,
441 dma_handle, dma_handle, buf_size,
442 DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
443
444 /* The way we call dma_declare_coherent_memory only a malloc can fail */
445 return dma & DMA_MEMORY_MAP ? 0 : -ENOMEM;
446}
447
337static struct platform_device *devices[] __initdata = { 448static struct platform_device *devices[] __initdata = {
338 &pcm037_flash, 449 &pcm037_flash,
339 &pcm037_sram_device, 450 &pcm037_sram_device,
451 &pcm037_camera,
340}; 452};
341 453
342static struct ipu_platform_data mx3_ipu_data = { 454static struct ipu_platform_data mx3_ipu_data = {
@@ -377,6 +489,22 @@ static const struct fb_videomode fb_modedb[] = {
377 .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_OE_ACT_HIGH, 489 .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_OE_ACT_HIGH,
378 .vmode = FB_VMODE_NONINTERLACED, 490 .vmode = FB_VMODE_NONINTERLACED,
379 .flag = 0, 491 .flag = 0,
492 }, {
493 /* 240x320 @ 60 Hz */
494 .name = "CMEL-OLED",
495 .refresh = 60,
496 .xres = 240,
497 .yres = 320,
498 .pixclock = 185925,
499 .left_margin = 9,
500 .right_margin = 16,
501 .upper_margin = 7,
502 .lower_margin = 9,
503 .hsync_len = 1,
504 .vsync_len = 1,
505 .sync = FB_SYNC_OE_ACT_HIGH | FB_SYNC_CLK_INVERT,
506 .vmode = FB_VMODE_NONINTERLACED,
507 .flag = 0,
380 }, 508 },
381}; 509};
382 510
@@ -397,6 +525,14 @@ static void __init mxc_board_init(void)
397 mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins), 525 mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins),
398 "pcm037"); 526 "pcm037");
399 527
528 if (pcm037_variant() == PCM037_EET)
529 mxc_iomux_setup_multiple_pins(pcm037_uart1_pins,
530 ARRAY_SIZE(pcm037_uart1_pins), "pcm037_uart1");
531 else
532 mxc_iomux_setup_multiple_pins(pcm037_uart1_handshake_pins,
533 ARRAY_SIZE(pcm037_uart1_handshake_pins),
534 "pcm037_uart1");
535
400 platform_add_devices(devices, ARRAY_SIZE(devices)); 536 platform_add_devices(devices, ARRAY_SIZE(devices));
401 537
402 mxc_register_device(&mxc_uart_device0, &uart_pdata); 538 mxc_register_device(&mxc_uart_device0, &uart_pdata);
@@ -415,18 +551,30 @@ static void __init mxc_board_init(void)
415 } 551 }
416 552
417 553
418#ifdef CONFIG_I2C_IMX 554 /* I2C adapters and devices */
419 i2c_register_board_info(1, pcm037_i2c_devices, 555 i2c_register_board_info(1, pcm037_i2c_devices,
420 ARRAY_SIZE(pcm037_i2c_devices)); 556 ARRAY_SIZE(pcm037_i2c_devices));
421 557
422 mxc_register_device(&mxc_i2c_device1, &pcm037_i2c_1_data); 558 mxc_register_device(&mxc_i2c_device1, &pcm037_i2c_1_data);
423#endif 559 mxc_register_device(&mxc_i2c_device2, &pcm037_i2c_2_data);
560
424 mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); 561 mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info);
425 mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); 562 mxc_register_device(&mxcsdhc_device0, &sdhc_pdata);
426 mxc_register_device(&mx3_ipu, &mx3_ipu_data); 563 mxc_register_device(&mx3_ipu, &mx3_ipu_data);
427 mxc_register_device(&mx3_fb, &mx3fb_pdata); 564 mxc_register_device(&mx3_fb, &mx3fb_pdata);
428 if (!gpio_usbotg_hs_activate()) 565 if (!gpio_usbotg_hs_activate())
429 mxc_register_device(&mxc_otg_udc_device, &usb_pdata); 566 mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
567
568 /* CSI */
569 /* Camera power: default - off */
570 ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), "mt9t031-power");
571 if (!ret)
572 gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), 1);
573 else
574 iclink.power = NULL;
575
576 if (!pcm037_camera_alloc_dma(4 * 1024 * 1024))
577 mxc_register_device(&mx3_camera, &camera_pdata);
430} 578}
431 579
432static void __init pcm037_timer_init(void) 580static void __init pcm037_timer_init(void)
@@ -448,4 +596,3 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037")
448 .init_machine = mxc_board_init, 596 .init_machine = mxc_board_init,
449 .timer = &pcm037_timer, 597 .timer = &pcm037_timer,
450MACHINE_END 598MACHINE_END
451
diff --git a/arch/arm/mach-mx3/pcm037.h b/arch/arm/mach-mx3/pcm037.h
new file mode 100644
index 00000000000..d6929721a5f
--- /dev/null
+++ b/arch/arm/mach-mx3/pcm037.h
@@ -0,0 +1,11 @@
1#ifndef __PCM037_H__
2#define __PCM037_H__
3
4enum pcm037_board_variant {
5 PCM037_PCM970,
6 PCM037_EET,
7};
8
9extern enum pcm037_board_variant pcm037_variant(void);
10
11#endif
diff --git a/arch/arm/mach-mx3/pcm037_eet.c b/arch/arm/mach-mx3/pcm037_eet.c
new file mode 100644
index 00000000000..fe52fb1bb8b
--- /dev/null
+++ b/arch/arm/mach-mx3/pcm037_eet.c
@@ -0,0 +1,204 @@
1/*
2 * Copyright (C) 2009
3 * Guennadi Liakhovetski, DENX Software Engineering, <lg@denx.de>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9#include <linux/gpio.h>
10#include <linux/gpio_keys.h>
11#include <linux/input.h>
12#include <linux/platform_device.h>
13#include <linux/spi/spi.h>
14
15#include <mach/common.h>
16#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
17#include <mach/spi.h>
18#endif
19#include <mach/iomux-mx3.h>
20
21#include <asm/mach-types.h>
22
23#include "pcm037.h"
24#include "devices.h"
25
26static unsigned int pcm037_eet_pins[] = {
27 /* SPI #1 */
28 MX31_PIN_CSPI1_MISO__MISO,
29 MX31_PIN_CSPI1_MOSI__MOSI,
30 MX31_PIN_CSPI1_SCLK__SCLK,
31 MX31_PIN_CSPI1_SPI_RDY__SPI_RDY,
32 MX31_PIN_CSPI1_SS0__SS0,
33 MX31_PIN_CSPI1_SS1__SS1,
34 MX31_PIN_CSPI1_SS2__SS2,
35
36 /* Reserve and hardwire GPIO 57 high - S6E63D6 chipselect */
37 IOMUX_MODE(MX31_PIN_KEY_COL7, IOMUX_CONFIG_GPIO),
38 /* GPIO keys */
39 IOMUX_MODE(MX31_PIN_GPIO1_0, IOMUX_CONFIG_GPIO), /* 0 */
40 IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO), /* 1 */
41 IOMUX_MODE(MX31_PIN_GPIO1_2, IOMUX_CONFIG_GPIO), /* 2 */
42 IOMUX_MODE(MX31_PIN_GPIO1_3, IOMUX_CONFIG_GPIO), /* 3 */
43 IOMUX_MODE(MX31_PIN_SVEN0, IOMUX_CONFIG_GPIO), /* 32 */
44 IOMUX_MODE(MX31_PIN_STX0, IOMUX_CONFIG_GPIO), /* 33 */
45 IOMUX_MODE(MX31_PIN_SRX0, IOMUX_CONFIG_GPIO), /* 34 */
46 IOMUX_MODE(MX31_PIN_SIMPD0, IOMUX_CONFIG_GPIO), /* 35 */
47 IOMUX_MODE(MX31_PIN_RTS1, IOMUX_CONFIG_GPIO), /* 38 */
48 IOMUX_MODE(MX31_PIN_CTS1, IOMUX_CONFIG_GPIO), /* 39 */
49 IOMUX_MODE(MX31_PIN_KEY_ROW4, IOMUX_CONFIG_GPIO), /* 50 */
50 IOMUX_MODE(MX31_PIN_KEY_ROW5, IOMUX_CONFIG_GPIO), /* 51 */
51 IOMUX_MODE(MX31_PIN_KEY_ROW6, IOMUX_CONFIG_GPIO), /* 52 */
52 IOMUX_MODE(MX31_PIN_KEY_ROW7, IOMUX_CONFIG_GPIO), /* 53 */
53
54 /* LEDs */
55 IOMUX_MODE(MX31_PIN_DTR_DTE1, IOMUX_CONFIG_GPIO), /* 44 */
56 IOMUX_MODE(MX31_PIN_DSR_DTE1, IOMUX_CONFIG_GPIO), /* 45 */
57 IOMUX_MODE(MX31_PIN_KEY_COL5, IOMUX_CONFIG_GPIO), /* 55 */
58 IOMUX_MODE(MX31_PIN_KEY_COL6, IOMUX_CONFIG_GPIO), /* 56 */
59};
60
61/* SPI */
62static struct spi_board_info pcm037_spi_dev[] = {
63 {
64 .modalias = "dac124s085",
65 .max_speed_hz = 400000,
66 .bus_num = 0,
67 .chip_select = 0, /* Index in pcm037_spi1_cs[] */
68 .mode = SPI_CPHA,
69 },
70};
71
72/* Platform Data for MXC CSPI */
73#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
74static int pcm037_spi1_cs[] = {MXC_SPI_CS(1), IOMUX_TO_GPIO(MX31_PIN_KEY_COL7)};
75
76struct spi_imx_master pcm037_spi1_master = {
77 .chipselect = pcm037_spi1_cs,
78 .num_chipselect = ARRAY_SIZE(pcm037_spi1_cs),
79};
80#endif
81
82/* GPIO-keys input device */
83static struct gpio_keys_button pcm037_gpio_keys[] = {
84 {
85 .type = EV_KEY,
86 .code = KEY_L,
87 .gpio = 0,
88 .desc = "Wheel Manual",
89 .wakeup = 0,
90 }, {
91 .type = EV_KEY,
92 .code = KEY_A,
93 .gpio = 1,
94 .desc = "Wheel AF",
95 .wakeup = 0,
96 }, {
97 .type = EV_KEY,
98 .code = KEY_V,
99 .gpio = 2,
100 .desc = "Wheel View",
101 .wakeup = 0,
102 }, {
103 .type = EV_KEY,
104 .code = KEY_M,
105 .gpio = 3,
106 .desc = "Wheel Menu",
107 .wakeup = 0,
108 }, {
109 .type = EV_KEY,
110 .code = KEY_UP,
111 .gpio = 32,
112 .desc = "Nav Pad Up",
113 .wakeup = 0,
114 }, {
115 .type = EV_KEY,
116 .code = KEY_RIGHT,
117 .gpio = 33,
118 .desc = "Nav Pad Right",
119 .wakeup = 0,
120 }, {
121 .type = EV_KEY,
122 .code = KEY_DOWN,
123 .gpio = 34,
124 .desc = "Nav Pad Down",
125 .wakeup = 0,
126 }, {
127 .type = EV_KEY,
128 .code = KEY_LEFT,
129 .gpio = 35,
130 .desc = "Nav Pad Left",
131 .wakeup = 0,
132 }, {
133 .type = EV_KEY,
134 .code = KEY_ENTER,
135 .gpio = 38,
136 .desc = "Nav Pad Ok",
137 .wakeup = 0,
138 }, {
139 .type = EV_KEY,
140 .code = KEY_O,
141 .gpio = 39,
142 .desc = "Wheel Off",
143 .wakeup = 0,
144 }, {
145 .type = EV_KEY,
146 .code = BTN_FORWARD,
147 .gpio = 50,
148 .desc = "Focus Forward",
149 .wakeup = 0,
150 }, {
151 .type = EV_KEY,
152 .code = BTN_BACK,
153 .gpio = 51,
154 .desc = "Focus Backward",
155 .wakeup = 0,
156 }, {
157 .type = EV_KEY,
158 .code = BTN_MIDDLE,
159 .gpio = 52,
160 .desc = "Release Half",
161 .wakeup = 0,
162 }, {
163 .type = EV_KEY,
164 .code = BTN_EXTRA,
165 .gpio = 53,
166 .desc = "Release Full",
167 .wakeup = 0,
168 },
169};
170
171static struct gpio_keys_platform_data pcm037_gpio_keys_platform_data = {
172 .buttons = pcm037_gpio_keys,
173 .nbuttons = ARRAY_SIZE(pcm037_gpio_keys),
174 .rep = 0, /* No auto-repeat */
175};
176
177static struct platform_device pcm037_gpio_keys_device = {
178 .name = "gpio-keys",
179 .id = -1,
180 .dev = {
181 .platform_data = &pcm037_gpio_keys_platform_data,
182 },
183};
184
185static int eet_init_devices(void)
186{
187 if (!machine_is_pcm037() || pcm037_variant() != PCM037_EET)
188 return 0;
189
190 mxc_iomux_setup_multiple_pins(pcm037_eet_pins,
191 ARRAY_SIZE(pcm037_eet_pins), "pcm037_eet");
192
193 /* SPI */
194 spi_register_board_info(pcm037_spi_dev, ARRAY_SIZE(pcm037_spi_dev));
195#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
196 mxc_register_device(&mxc_spi_device0, &pcm037_spi1_master);
197#endif
198
199 platform_device_register(&pcm037_gpio_keys_device);
200
201 return 0;
202}
203
204late_initcall(eet_init_devices);
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
index a2d7814896b..505d98cfe50 100644
--- a/arch/arm/mach-omap1/mcbsp.c
+++ b/arch/arm/mach-omap1/mcbsp.c
@@ -19,7 +19,6 @@
19 19
20#include <mach/irqs.h> 20#include <mach/irqs.h>
21#include <mach/dma.h> 21#include <mach/dma.h>
22#include <mach/irqs.h>
23#include <mach/mux.h> 22#include <mach/mux.h>
24#include <mach/cpu.h> 23#include <mach/cpu.h>
25#include <mach/mcbsp.h> 24#include <mach/mcbsp.h>
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index d3cc145814d..cf3dd771a67 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -25,6 +25,7 @@
25#include <linux/spi/spi.h> 25#include <linux/spi/spi.h>
26#include <linux/spi/ads7846.h> 26#include <linux/spi/ads7846.h>
27#include <linux/i2c/twl4030.h> 27#include <linux/i2c/twl4030.h>
28#include <linux/usb/otg.h>
28 29
29#include <mach/hardware.h> 30#include <mach/hardware.h>
30#include <asm/mach-types.h> 31#include <asm/mach-types.h>
@@ -307,6 +308,10 @@ static void __init omap3_evm_init(void)
307 ARRAY_SIZE(omap3evm_spi_board_info)); 308 ARRAY_SIZE(omap3evm_spi_board_info));
308 309
309 omap_serial_init(); 310 omap_serial_init();
311#ifdef CONFIG_NOP_USB_XCEIV
312 /* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
313 usb_nop_xceiv_register();
314#endif
310 usb_musb_init(); 315 usb_musb_init();
311 ads7846_dev_init(); 316 ads7846_dev_init();
312} 317}
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index a5c0f0435cd..99b6e154631 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -19,7 +19,6 @@
19 19
20#include <mach/irqs.h> 20#include <mach/irqs.h>
21#include <mach/dma.h> 21#include <mach/dma.h>
22#include <mach/irqs.h>
23#include <mach/mux.h> 22#include <mach/mux.h>
24#include <mach/cpu.h> 23#include <mach/cpu.h>
25#include <mach/mcbsp.h> 24#include <mach/mcbsp.h>
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index d85296dc896..739e59e8025 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -155,20 +155,6 @@ static struct platform_device musb_device = {
155 .resource = musb_resources, 155 .resource = musb_resources,
156}; 156};
157 157
158#ifdef CONFIG_NOP_USB_XCEIV
159static u64 nop_xceiv_dmamask = DMA_BIT_MASK(32);
160
161static struct platform_device nop_xceiv_device = {
162 .name = "nop_usb_xceiv",
163 .id = -1,
164 .dev = {
165 .dma_mask = &nop_xceiv_dmamask,
166 .coherent_dma_mask = DMA_BIT_MASK(32),
167 .platform_data = NULL,
168 },
169};
170#endif
171
172void __init usb_musb_init(void) 158void __init usb_musb_init(void)
173{ 159{
174 if (cpu_is_omap243x()) 160 if (cpu_is_omap243x())
@@ -183,13 +169,6 @@ void __init usb_musb_init(void)
183 */ 169 */
184 musb_plat.clock = "ick"; 170 musb_plat.clock = "ick";
185 171
186#ifdef CONFIG_NOP_USB_XCEIV
187 if (platform_device_register(&nop_xceiv_device) < 0) {
188 printk(KERN_ERR "Unable to register NOP-XCEIV device\n");
189 return;
190 }
191#endif
192
193 if (platform_device_register(&musb_device) < 0) { 172 if (platform_device_register(&musb_device) < 0) {
194 printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n"); 173 printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
195 return; 174 return;
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index 63b10d9bb1d..9cd09465a0e 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -1141,12 +1141,16 @@ struct power_supply_info em_x270_psy_info = {
1141 1141
1142static void em_x270_battery_low(void) 1142static void em_x270_battery_low(void)
1143{ 1143{
1144#if defined(CONFIG_APM_EMULATION)
1144 apm_queue_event(APM_LOW_BATTERY); 1145 apm_queue_event(APM_LOW_BATTERY);
1146#endif
1145} 1147}
1146 1148
1147static void em_x270_battery_critical(void) 1149static void em_x270_battery_critical(void)
1148{ 1150{
1151#if defined(CONFIG_APM_EMULATION)
1149 apm_queue_event(APM_CRITICAL_SUSPEND); 1152 apm_queue_event(APM_CRITICAL_SUSPEND);
1153#endif
1150} 1154}
1151 1155
1152struct da9030_battery_info em_x270_batterty_info = { 1156struct da9030_battery_info em_x270_batterty_info = {
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa300.h b/arch/arm/mach-pxa/include/mach/mfp-pxa300.h
index ae8441192ef..7139e0dc26d 100644
--- a/arch/arm/mach-pxa/include/mach/mfp-pxa300.h
+++ b/arch/arm/mach-pxa/include/mach/mfp-pxa300.h
@@ -567,9 +567,9 @@
567#define GPIO37_ULPI_DATA_OUT_7 MFP_CFG(GPIO37, AF3) 567#define GPIO37_ULPI_DATA_OUT_7 MFP_CFG(GPIO37, AF3)
568#define GPIO33_ULPI_OTG_INTR MFP_CFG(GPIO33, AF1) 568#define GPIO33_ULPI_OTG_INTR MFP_CFG(GPIO33, AF1)
569 569
570#define ULPI_DIR MFP_CFG_DRV(ULPI_DIR, MFP_AF0, MFP_DS01X) 570#define ULPI_DIR MFP_CFG_DRV(ULPI_DIR, AF0, DS01X)
571#define ULPI_NXT MFP_CFG_DRV(ULPI_NXT, MFP_AF0, MFP_DS01X) 571#define ULPI_NXT MFP_CFG_DRV(ULPI_NXT, AF0, DS01X)
572#define ULPI_STP MFP_CFG_DRV(ULPI_STP, MFP_AF0, MFP_DS01X) 572#define ULPI_STP MFP_CFG_DRV(ULPI_STP, AF0, DS01X)
573#endif /* CONFIG_CPU_PXA310 */ 573#endif /* CONFIG_CPU_PXA310 */
574 574
575#endif /* __ASM_ARCH_MFP_PXA300_H */ 575#endif /* __ASM_ARCH_MFP_PXA300_H */
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
index ed70f281dd0..169fcc18154 100644
--- a/arch/arm/mach-pxa/palmld.c
+++ b/arch/arm/mach-pxa/palmld.c
@@ -128,6 +128,10 @@ static unsigned long palmld_pin_config[] __initdata = {
128 GPIO38_GPIO, /* wifi ready */ 128 GPIO38_GPIO, /* wifi ready */
129 GPIO81_GPIO, /* wifi reset */ 129 GPIO81_GPIO, /* wifi reset */
130 130
131 /* FFUART */
132 GPIO34_FFUART_RXD,
133 GPIO39_FFUART_TXD,
134
131 /* HDD */ 135 /* HDD */
132 GPIO98_GPIO, /* HDD reset */ 136 GPIO98_GPIO, /* HDD reset */
133 GPIO115_GPIO, /* HDD power */ 137 GPIO115_GPIO, /* HDD power */
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
index aae64a12a73..33f726ff55e 100644
--- a/arch/arm/mach-pxa/palmt5.c
+++ b/arch/arm/mach-pxa/palmt5.c
@@ -111,6 +111,10 @@ static unsigned long palmt5_pin_config[] __initdata = {
111 /* PWM */ 111 /* PWM */
112 GPIO16_PWM0_OUT, 112 GPIO16_PWM0_OUT,
113 113
114 /* FFUART */
115 GPIO34_FFUART_RXD,
116 GPIO39_FFUART_TXD,
117
114 /* MISC */ 118 /* MISC */
115 GPIO10_GPIO, /* hotsync button */ 119 GPIO10_GPIO, /* hotsync button */
116 GPIO90_GPIO, /* power detect */ 120 GPIO90_GPIO, /* power detect */
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
index 6c15d84bde5..83d02087958 100644
--- a/arch/arm/mach-pxa/palmtx.c
+++ b/arch/arm/mach-pxa/palmtx.c
@@ -127,6 +127,10 @@ static unsigned long palmtx_pin_config[] __initdata = {
127 GPIO76_LCD_PCLK, 127 GPIO76_LCD_PCLK,
128 GPIO77_LCD_BIAS, 128 GPIO77_LCD_BIAS,
129 129
130 /* FFUART */
131 GPIO34_FFUART_RXD,
132 GPIO39_FFUART_TXD,
133
130 /* MISC. */ 134 /* MISC. */
131 GPIO10_GPIO, /* hotsync button */ 135 GPIO10_GPIO, /* hotsync button */
132 GPIO12_GPIO, /* power detect */ 136 GPIO12_GPIO, /* power detect */
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 6f678d93bf4..09b7b1a10ca 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -250,7 +250,7 @@ static DEFINE_PXA3_CKEN(pxa3xx_mmc2, MMC2, 19500000, 0);
250static struct clk_lookup pxa3xx_clkregs[] = { 250static struct clk_lookup pxa3xx_clkregs[] = {
251 INIT_CLKREG(&clk_pxa3xx_pout, NULL, "CLK_POUT"), 251 INIT_CLKREG(&clk_pxa3xx_pout, NULL, "CLK_POUT"),
252 /* Power I2C clock is always on */ 252 /* Power I2C clock is always on */
253 INIT_CLKREG(&clk_dummy, "pxa2xx-i2c.1", NULL), 253 INIT_CLKREG(&clk_dummy, "pxa3xx-pwri2c.1", NULL),
254 INIT_CLKREG(&clk_pxa3xx_lcd, "pxa2xx-fb", NULL), 254 INIT_CLKREG(&clk_pxa3xx_lcd, "pxa2xx-fb", NULL),
255 INIT_CLKREG(&clk_pxa3xx_camera, NULL, "CAMCLK"), 255 INIT_CLKREG(&clk_pxa3xx_camera, NULL, "CAMCLK"),
256 INIT_CLKREG(&clk_pxa3xx_ac97, NULL, "AC97CLK"), 256 INIT_CLKREG(&clk_pxa3xx_ac97, NULL, "AC97CLK"),
diff --git a/arch/arm/mach-pxa/treo680.c b/arch/arm/mach-pxa/treo680.c
index a06f19edebb..753ec4df17b 100644
--- a/arch/arm/mach-pxa/treo680.c
+++ b/arch/arm/mach-pxa/treo680.c
@@ -409,7 +409,7 @@ err1:
409 409
410static void treo680_irda_shutdown(struct device *dev) 410static void treo680_irda_shutdown(struct device *dev)
411{ 411{
412 gpio_free(GPIO_NR_TREO680_AMP_EN); 412 gpio_free(GPIO_NR_TREO680_IR_EN);
413} 413}
414 414
415static struct pxaficp_platform_data treo680_ficp_info = { 415static struct pxaficp_platform_data treo680_ficp_info = {
diff --git a/arch/arm/mach-pxa/zylonite_pxa300.c b/arch/arm/mach-pxa/zylonite_pxa300.c
index cefd1c0a854..84095440a87 100644
--- a/arch/arm/mach-pxa/zylonite_pxa300.c
+++ b/arch/arm/mach-pxa/zylonite_pxa300.c
@@ -197,10 +197,12 @@ static void __init zylonite_detect_lcd_panel(void)
197 for (i = 0; i < NUM_LCD_DETECT_PINS; i++) { 197 for (i = 0; i < NUM_LCD_DETECT_PINS; i++) {
198 id = id << 1; 198 id = id << 1;
199 gpio = mfp_to_gpio(lcd_detect_pins[i]); 199 gpio = mfp_to_gpio(lcd_detect_pins[i]);
200 gpio_request(gpio, "LCD_ID_PINS");
200 gpio_direction_input(gpio); 201 gpio_direction_input(gpio);
201 202
202 if (gpio_get_value(gpio)) 203 if (gpio_get_value(gpio))
203 id = id | 0x1; 204 id = id | 0x1;
205 gpio_free(gpio);
204 } 206 }
205 207
206 /* lcd id, flush out bit 1 */ 208 /* lcd id, flush out bit 1 */
diff --git a/arch/arm/mach-pxa/zylonite_pxa320.c b/arch/arm/mach-pxa/zylonite_pxa320.c
index cc5a2283360..60d08f23f5e 100644
--- a/arch/arm/mach-pxa/zylonite_pxa320.c
+++ b/arch/arm/mach-pxa/zylonite_pxa320.c
@@ -176,10 +176,12 @@ static void __init zylonite_detect_lcd_panel(void)
176 for (i = 0; i < NUM_LCD_DETECT_PINS; i++) { 176 for (i = 0; i < NUM_LCD_DETECT_PINS; i++) {
177 id = id << 1; 177 id = id << 1;
178 gpio = mfp_to_gpio(lcd_detect_pins[i]); 178 gpio = mfp_to_gpio(lcd_detect_pins[i]);
179 gpio_request(gpio, "LCD_ID_PINS");
179 gpio_direction_input(gpio); 180 gpio_direction_input(gpio);
180 181
181 if (gpio_get_value(gpio)) 182 if (gpio_get_value(gpio))
182 id = id | 0x1; 183 id = id | 0x1;
184 gpio_free(gpio);
183 } 185 }
184 186
185 /* lcd id, flush out bit 1 */ 187 /* lcd id, flush out bit 1 */
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index 9ea9c05093c..facbd49eec6 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -208,8 +208,7 @@ struct platform_device realview_i2c_device = {
208 208
209static struct i2c_board_info realview_i2c_board_info[] = { 209static struct i2c_board_info realview_i2c_board_info[] = {
210 { 210 {
211 I2C_BOARD_INFO("rtc-ds1307", 0xd0 >> 1), 211 I2C_BOARD_INFO("ds1338", 0xd0 >> 1),
212 .type = "ds1338",
213 }, 212 },
214}; 213};
215 214
diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-core.h b/arch/arm/mach-s3c2410/include/mach/gpio-core.h
index 8fe192081d3..f8b879a7973 100644
--- a/arch/arm/mach-s3c2410/include/mach/gpio-core.h
+++ b/arch/arm/mach-s3c2410/include/mach/gpio-core.h
@@ -28,7 +28,7 @@ static inline struct s3c_gpio_chip *s3c_gpiolib_getchip(unsigned int pin)
28 return NULL; 28 return NULL;
29 29
30 chip = &s3c24xx_gpios[pin/32]; 30 chip = &s3c24xx_gpios[pin/32];
31 return (S3C2410_GPIO_OFFSET(pin) > chip->chip.ngpio) ? chip : NULL; 31 return (S3C2410_GPIO_OFFSET(pin) < chip->chip.ngpio) ? chip : NULL;
32} 32}
33 33
34#endif /* __ASM_ARCH_GPIO_CORE_H */ 34#endif /* __ASM_ARCH_GPIO_CORE_H */
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index 89b3ccf35e1..7936085dd75 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -455,8 +455,8 @@ void __init u300_init_irq(void)
455 for (i = 0; i < NR_IRQS; i++) 455 for (i = 0; i < NR_IRQS; i++)
456 set_bit(i, (unsigned long *) &mask[0]); 456 set_bit(i, (unsigned long *) &mask[0]);
457 u300_enable_intcon_clock(); 457 u300_enable_intcon_clock();
458 vic_init((void __iomem *) U300_INTCON0_VBASE, 0, mask[0], 0); 458 vic_init((void __iomem *) U300_INTCON0_VBASE, 0, mask[0], mask[0]);
459 vic_init((void __iomem *) U300_INTCON1_VBASE, 32, mask[1], 0); 459 vic_init((void __iomem *) U300_INTCON1_VBASE, 32, mask[1], mask[1]);
460} 460}
461 461
462 462
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 69214fc8bd1..31093af7d05 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -342,8 +342,7 @@ static struct platform_device versatile_i2c_device = {
342 342
343static struct i2c_board_info versatile_i2c_board_info[] = { 343static struct i2c_board_info versatile_i2c_board_info[] = {
344 { 344 {
345 I2C_BOARD_INFO("rtc-ds1307", 0xd0 >> 1), 345 I2C_BOARD_INFO("ds1338", 0xd0 >> 1),
346 .type = "ds1338",
347 }, 346 },
348}; 347};
349 348
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx3.h b/arch/arm/plat-mxc/include/mach/iomux-mx3.h
index 27f8d1b2bc6..2eb182f7387 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mx3.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-mx3.h
@@ -602,6 +602,8 @@ enum iomux_pins {
602#define MX31_PIN_I2C_DAT__SDA IOMUX_MODE(MX31_PIN_I2C_DAT, IOMUX_CONFIG_FUNC) 602#define MX31_PIN_I2C_DAT__SDA IOMUX_MODE(MX31_PIN_I2C_DAT, IOMUX_CONFIG_FUNC)
603#define MX31_PIN_DCD_DTE1__I2C2_SDA IOMUX_MODE(MX31_PIN_DCD_DTE1, IOMUX_CONFIG_ALT2) 603#define MX31_PIN_DCD_DTE1__I2C2_SDA IOMUX_MODE(MX31_PIN_DCD_DTE1, IOMUX_CONFIG_ALT2)
604#define MX31_PIN_RI_DTE1__I2C2_SCL IOMUX_MODE(MX31_PIN_RI_DTE1, IOMUX_CONFIG_ALT2) 604#define MX31_PIN_RI_DTE1__I2C2_SCL IOMUX_MODE(MX31_PIN_RI_DTE1, IOMUX_CONFIG_ALT2)
605#define MX31_PIN_CSPI2_SS2__I2C3_SDA IOMUX_MODE(MX31_PIN_CSPI2_SS2, IOMUX_CONFIG_ALT1)
606#define MX31_PIN_CSPI2_SCLK__I2C3_SCL IOMUX_MODE(MX31_PIN_CSPI2_SCLK, IOMUX_CONFIG_ALT1)
605#define MX31_PIN_CSI_D4__CSI_D4 IOMUX_MODE(MX31_PIN_CSI_D4, IOMUX_CONFIG_FUNC) 607#define MX31_PIN_CSI_D4__CSI_D4 IOMUX_MODE(MX31_PIN_CSI_D4, IOMUX_CONFIG_FUNC)
606#define MX31_PIN_CSI_D5__CSI_D5 IOMUX_MODE(MX31_PIN_CSI_D5, IOMUX_CONFIG_FUNC) 608#define MX31_PIN_CSI_D5__CSI_D5 IOMUX_MODE(MX31_PIN_CSI_D5, IOMUX_CONFIG_FUNC)
607#define MX31_PIN_CSI_D6__CSI_D6 IOMUX_MODE(MX31_PIN_CSI_D6, IOMUX_CONFIG_FUNC) 609#define MX31_PIN_CSI_D6__CSI_D6 IOMUX_MODE(MX31_PIN_CSI_D6, IOMUX_CONFIG_FUNC)
diff --git a/arch/arm/plat-pxa/gpio.c b/arch/arm/plat-pxa/gpio.c
index abc79d44aca..98548c6903a 100644
--- a/arch/arm/plat-pxa/gpio.c
+++ b/arch/arm/plat-pxa/gpio.c
@@ -16,7 +16,7 @@
16#include <linux/irq.h> 16#include <linux/irq.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/sysdev.h> 18#include <linux/sysdev.h>
19#include <linux/bootmem.h> 19#include <linux/slab.h>
20 20
21#include <mach/gpio.h> 21#include <mach/gpio.h>
22 22
@@ -112,17 +112,12 @@ static int __init pxa_init_gpio_chip(int gpio_end)
112 int i, gpio, nbanks = gpio_to_bank(gpio_end) + 1; 112 int i, gpio, nbanks = gpio_to_bank(gpio_end) + 1;
113 struct pxa_gpio_chip *chips; 113 struct pxa_gpio_chip *chips;
114 114
115 /* this is early, we have to use bootmem allocator, and we really 115 chips = kzalloc(nbanks * sizeof(struct pxa_gpio_chip), GFP_KERNEL);
116 * want this to be allocated dynamically for different 'gpio_end'
117 */
118 chips = alloc_bootmem_low(nbanks * sizeof(struct pxa_gpio_chip));
119 if (chips == NULL) { 116 if (chips == NULL) {
120 pr_err("%s: failed to allocate GPIO chips\n", __func__); 117 pr_err("%s: failed to allocate GPIO chips\n", __func__);
121 return -ENOMEM; 118 return -ENOMEM;
122 } 119 }
123 120
124 memset(chips, 0, nbanks * sizeof(struct pxa_gpio_chip));
125
126 for (i = 0, gpio = 0; i < nbanks; i++, gpio += 32) { 121 for (i = 0, gpio = 0; i < nbanks; i++, gpio += 32) {
127 struct gpio_chip *c = &chips[i].chip; 122 struct gpio_chip *c = &chips[i].chip;
128 123
diff --git a/arch/arm/plat-s3c24xx/pwm.c b/arch/arm/plat-s3c24xx/pwm.c
index 0120b760315..82a6d4de02a 100644
--- a/arch/arm/plat-s3c24xx/pwm.c
+++ b/arch/arm/plat-s3c24xx/pwm.c
@@ -246,6 +246,10 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
246 246
247 tcmp = duty_ns / tin_ns; 247 tcmp = duty_ns / tin_ns;
248 tcmp = tcnt - tcmp; 248 tcmp = tcnt - tcmp;
249 /* the pwm hw only checks the compare register after a decrement,
250 so the pin never toggles if tcmp = tcnt */
251 if (tcmp == tcnt)
252 tcmp--;
249 253
250 pwm_dbg(pwm, "tin_ns=%lu, tcmp=%ld/%lu\n", tin_ns, tcmp, tcnt); 254 pwm_dbg(pwm, "tin_ns=%lu, tcmp=%ld/%lu\n", tin_ns, tcmp, tcnt);
251 255
diff --git a/arch/arm/plat-s3c64xx/pm.c b/arch/arm/plat-s3c64xx/pm.c
index 07a6516a4f3..47632fc7eb6 100644
--- a/arch/arm/plat-s3c64xx/pm.c
+++ b/arch/arm/plat-s3c64xx/pm.c
@@ -117,8 +117,6 @@ void s3c_pm_save_core(void)
117 * this. 117 * this.
118 */ 118 */
119 119
120#include <plat/regs-gpio.h>
121
122static void s3c64xx_cpu_suspend(void) 120static void s3c64xx_cpu_suspend(void)
123{ 121{
124 unsigned long tmp; 122 unsigned long tmp;
diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c
index 1debc1f9f98..febac1950d8 100644
--- a/arch/arm/plat-s3c64xx/s3c6400-clock.c
+++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c
@@ -153,7 +153,7 @@ static unsigned long s3c64xx_clk_arm_round_rate(struct clk *clk,
153 u32 div; 153 u32 div;
154 154
155 if (parent < rate) 155 if (parent < rate)
156 return rate; 156 return parent;
157 157
158 div = (parent / rate) - 1; 158 div = (parent / rate) - 1;
159 if (div > armclk_mask) 159 if (div > armclk_mask)
@@ -175,7 +175,7 @@ static int s3c64xx_clk_arm_set_rate(struct clk *clk, unsigned long rate)
175 div = clk_get_rate(clk->parent) / rate; 175 div = clk_get_rate(clk->parent) / rate;
176 176
177 val = __raw_readl(S3C_CLK_DIV0); 177 val = __raw_readl(S3C_CLK_DIV0);
178 val &= armclk_mask; 178 val &= ~armclk_mask;
179 val |= (div - 1); 179 val |= (div - 1);
180 __raw_writel(val, S3C_CLK_DIV0); 180 __raw_writel(val, S3C_CLK_DIV0);
181 181
diff --git a/arch/arm/plat-stmp3xxx/pinmux.c b/arch/arm/plat-stmp3xxx/pinmux.c
index d4120038220..6d6b1a468ed 100644
--- a/arch/arm/plat-stmp3xxx/pinmux.c
+++ b/arch/arm/plat-stmp3xxx/pinmux.c
@@ -22,7 +22,6 @@
22#include <linux/sysdev.h> 22#include <linux/sysdev.h>
23#include <linux/string.h> 23#include <linux/string.h>
24#include <linux/bitops.h> 24#include <linux/bitops.h>
25#include <linux/sysdev.h>
26#include <linux/irq.h> 25#include <linux/irq.h>
27 26
28#include <mach/hardware.h> 27#include <mach/hardware.h>
diff --git a/arch/avr32/include/asm/pgalloc.h b/arch/avr32/include/asm/pgalloc.h
index 64082132394..92ecd8446ef 100644
--- a/arch/avr32/include/asm/pgalloc.h
+++ b/arch/avr32/include/asm/pgalloc.h
@@ -83,7 +83,7 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
83 quicklist_free_page(QUICK_PT, NULL, pte); 83 quicklist_free_page(QUICK_PT, NULL, pte);
84} 84}
85 85
86#define __pte_free_tlb(tlb,pte) \ 86#define __pte_free_tlb(tlb,pte,addr) \
87do { \ 87do { \
88 pgtable_page_dtor(pte); \ 88 pgtable_page_dtor(pte); \
89 tlb_remove_page((tlb), pte); \ 89 tlb_remove_page((tlb), pte); \
diff --git a/arch/blackfin/include/asm/context.S b/arch/blackfin/include/asm/context.S
index 16561ab18b3..f8a664f022b 100644
--- a/arch/blackfin/include/asm/context.S
+++ b/arch/blackfin/include/asm/context.S
@@ -223,9 +223,10 @@
223 [--sp] = RETN; 223 [--sp] = RETN;
224 [--sp] = RETE; 224 [--sp] = RETE;
225 [--sp] = SEQSTAT; 225 [--sp] = SEQSTAT;
226#ifdef CONFIG_KGDB 226#ifdef CONFIG_DEBUG_KERNEL
227 r1.l = lo(IPEND); 227 p1.l = lo(IPEND);
228 r1.h = hi(IPEND); 228 p1.h = hi(IPEND);
229 r1 = [p1];
229 [--sp] = r1; 230 [--sp] = r1;
230#else 231#else
231 [--sp] = r0; /* Skip IPEND as well. */ 232 [--sp] = r0; /* Skip IPEND as well. */
diff --git a/arch/blackfin/include/asm/cpu.h b/arch/blackfin/include/asm/cpu.h
index 565b8136855..fadfa82f93b 100644
--- a/arch/blackfin/include/asm/cpu.h
+++ b/arch/blackfin/include/asm/cpu.h
@@ -32,7 +32,6 @@ struct blackfin_cpudata {
32 struct task_struct *idle; 32 struct task_struct *idle;
33 unsigned int imemctl; 33 unsigned int imemctl;
34 unsigned int dmemctl; 34 unsigned int dmemctl;
35 unsigned long loops_per_jiffy;
36 unsigned long dcache_invld_count; 35 unsigned long dcache_invld_count;
37 unsigned long icache_invld_count; 36 unsigned long icache_invld_count;
38}; 37};
diff --git a/arch/blackfin/include/asm/hardirq.h b/arch/blackfin/include/asm/hardirq.h
index cbd52f86bb9..0b78b873df5 100644
--- a/arch/blackfin/include/asm/hardirq.h
+++ b/arch/blackfin/include/asm/hardirq.h
@@ -6,6 +6,9 @@
6extern void ack_bad_irq(unsigned int irq); 6extern void ack_bad_irq(unsigned int irq);
7#define ack_bad_irq ack_bad_irq 7#define ack_bad_irq ack_bad_irq
8 8
9/* Define until common code gets sane defaults */
10#define HARDIRQ_BITS 9
11
9#include <asm-generic/hardirq.h> 12#include <asm-generic/hardirq.h>
10 13
11#endif 14#endif
diff --git a/arch/blackfin/include/asm/processor.h b/arch/blackfin/include/asm/processor.h
index d0be99be830..a36ad8dac06 100644
--- a/arch/blackfin/include/asm/processor.h
+++ b/arch/blackfin/include/asm/processor.h
@@ -105,23 +105,16 @@ static inline uint32_t __pure bfin_revid(void)
105 /* Always use CHIPID, to work around ANOMALY_05000234 */ 105 /* Always use CHIPID, to work around ANOMALY_05000234 */
106 uint32_t revid = (bfin_read_CHIPID() & CHIPID_VERSION) >> 28; 106 uint32_t revid = (bfin_read_CHIPID() & CHIPID_VERSION) >> 28;
107 107
108#ifdef CONFIG_BF52x 108#ifdef _BOOTROM_GET_DXE_ADDRESS_TWI
109 /* ANOMALY_05000357 109 /*
110 * ANOMALY_05000364
110 * Incorrect Revision Number in DSPID Register 111 * Incorrect Revision Number in DSPID Register
111 */ 112 */
112 if (revid == 0) 113 if (ANOMALY_05000364 &&
113 switch (bfin_read16(_BOOTROM_GET_DXE_ADDRESS_TWI)) { 114 bfin_read16(_BOOTROM_GET_DXE_ADDRESS_TWI) == 0x2796)
114 case 0x0010: 115 revid = 1;
115 revid = 0;
116 break;
117 case 0x2796:
118 revid = 1;
119 break;
120 default:
121 revid = 0xFFFF;
122 break;
123 }
124#endif 116#endif
117
125 return revid; 118 return revid;
126} 119}
127 120
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c
index e0bf8cc0690..9f9b8281665 100644
--- a/arch/blackfin/kernel/bfin_dma_5xx.c
+++ b/arch/blackfin/kernel/bfin_dma_5xx.c
@@ -253,32 +253,31 @@ void __init early_dma_memcpy(void *pdst, const void *psrc, size_t size)
253 BUG_ON(src % 4); 253 BUG_ON(src % 4);
254 BUG_ON(size % 4); 254 BUG_ON(size % 4);
255 255
256 /* Force a sync in case a previous config reset on this channel
257 * occurred. This is needed so subsequent writes to DMA registers
258 * are not spuriously lost/corrupted.
259 */
260 __builtin_bfin_ssync();
261
262 src_ch = 0; 256 src_ch = 0;
263 /* Find an avalible memDMA channel */ 257 /* Find an avalible memDMA channel */
264 while (1) { 258 while (1) {
265 if (!src_ch || src_ch == (struct dma_register *)MDMA_S1_NEXT_DESC_PTR) { 259 if (src_ch == (struct dma_register *)MDMA_S0_NEXT_DESC_PTR) {
266 dst_ch = (struct dma_register *)MDMA_D0_NEXT_DESC_PTR;
267 src_ch = (struct dma_register *)MDMA_S0_NEXT_DESC_PTR;
268 } else {
269 dst_ch = (struct dma_register *)MDMA_D1_NEXT_DESC_PTR; 260 dst_ch = (struct dma_register *)MDMA_D1_NEXT_DESC_PTR;
270 src_ch = (struct dma_register *)MDMA_S1_NEXT_DESC_PTR; 261 src_ch = (struct dma_register *)MDMA_S1_NEXT_DESC_PTR;
262 } else {
263 dst_ch = (struct dma_register *)MDMA_D0_NEXT_DESC_PTR;
264 src_ch = (struct dma_register *)MDMA_S0_NEXT_DESC_PTR;
271 } 265 }
272 266
273 if (!bfin_read16(&src_ch->cfg)) { 267 if (!bfin_read16(&src_ch->cfg))
268 break;
269 else if (bfin_read16(&dst_ch->irq_status) & DMA_DONE) {
270 bfin_write16(&src_ch->cfg, 0);
274 break; 271 break;
275 } else {
276 if (bfin_read16(&src_ch->irq_status) & DMA_DONE)
277 bfin_write16(&src_ch->cfg, 0);
278 } 272 }
279
280 } 273 }
281 274
275 /* Force a sync in case a previous config reset on this channel
276 * occurred. This is needed so subsequent writes to DMA registers
277 * are not spuriously lost/corrupted.
278 */
279 __builtin_bfin_ssync();
280
282 /* Destination */ 281 /* Destination */
283 bfin_write32(&dst_ch->start_addr, dst); 282 bfin_write32(&dst_ch->start_addr, dst);
284 bfin_write16(&dst_ch->x_count, size >> 2); 283 bfin_write16(&dst_ch->x_count, size >> 2);
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index beffa00a93c..6b944627137 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -686,14 +686,12 @@ void bfin_gpio_pm_hibernate_restore(void)
686 *port_fer[bank] = gpio_bank_saved[bank].fer; 686 *port_fer[bank] = gpio_bank_saved[bank].fer;
687#endif 687#endif
688 gpio_array[bank]->inen = gpio_bank_saved[bank].inen; 688 gpio_array[bank]->inen = gpio_bank_saved[bank].inen;
689 gpio_array[bank]->data_set = gpio_bank_saved[bank].data
690 & gpio_bank_saved[bank].dir;
689 gpio_array[bank]->dir = gpio_bank_saved[bank].dir; 691 gpio_array[bank]->dir = gpio_bank_saved[bank].dir;
690 gpio_array[bank]->polar = gpio_bank_saved[bank].polar; 692 gpio_array[bank]->polar = gpio_bank_saved[bank].polar;
691 gpio_array[bank]->edge = gpio_bank_saved[bank].edge; 693 gpio_array[bank]->edge = gpio_bank_saved[bank].edge;
692 gpio_array[bank]->both = gpio_bank_saved[bank].both; 694 gpio_array[bank]->both = gpio_bank_saved[bank].both;
693
694 gpio_array[bank]->data_set = gpio_bank_saved[bank].data
695 | gpio_bank_saved[bank].dir;
696
697 gpio_array[bank]->maska = gpio_bank_saved[bank].maska; 695 gpio_array[bank]->maska = gpio_bank_saved[bank].maska;
698 } 696 }
699 AWA_DUMMY_READ(maska); 697 AWA_DUMMY_READ(maska);
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbinit.c b/arch/blackfin/kernel/cplb-nompu/cplbinit.c
index d6c067782e6..685f160a5a3 100644
--- a/arch/blackfin/kernel/cplb-nompu/cplbinit.c
+++ b/arch/blackfin/kernel/cplb-nompu/cplbinit.c
@@ -72,13 +72,24 @@ void __init generate_cplb_tables_cpu(unsigned int cpu)
72 } 72 }
73 73
74 /* Cover L1 memory. One 4M area for code and data each is enough. */ 74 /* Cover L1 memory. One 4M area for code and data each is enough. */
75 if (L1_DATA_A_LENGTH || L1_DATA_B_LENGTH) { 75 if (cpu == 0) {
76 d_tbl[i_d].addr = L1_DATA_A_START; 76 if (L1_DATA_A_LENGTH || L1_DATA_B_LENGTH) {
77 d_tbl[i_d++].data = L1_DMEMORY | PAGE_SIZE_4MB; 77 d_tbl[i_d].addr = L1_DATA_A_START;
78 d_tbl[i_d++].data = L1_DMEMORY | PAGE_SIZE_4MB;
79 }
80 i_tbl[i_i].addr = L1_CODE_START;
81 i_tbl[i_i++].data = L1_IMEMORY | PAGE_SIZE_4MB;
78 } 82 }
79 i_tbl[i_i].addr = L1_CODE_START; 83#ifdef CONFIG_SMP
80 i_tbl[i_i++].data = L1_IMEMORY | PAGE_SIZE_4MB; 84 else {
81 85 if (L1_DATA_A_LENGTH || L1_DATA_B_LENGTH) {
86 d_tbl[i_d].addr = COREB_L1_DATA_A_START;
87 d_tbl[i_d++].data = L1_DMEMORY | PAGE_SIZE_4MB;
88 }
89 i_tbl[i_i].addr = COREB_L1_CODE_START;
90 i_tbl[i_i++].data = L1_IMEMORY | PAGE_SIZE_4MB;
91 }
92#endif
82 first_switched_dcplb = i_d; 93 first_switched_dcplb = i_d;
83 first_switched_icplb = i_i; 94 first_switched_icplb = i_i;
84 95
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index 79cad0ac589..9da36bab7cc 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -361,7 +361,7 @@ static inline
361int in_mem_const(unsigned long addr, unsigned long size, 361int in_mem_const(unsigned long addr, unsigned long size,
362 unsigned long const_addr, unsigned long const_size) 362 unsigned long const_addr, unsigned long const_size)
363{ 363{
364 return in_mem_const_off(addr, 0, size, const_addr, const_size); 364 return in_mem_const_off(addr, size, 0, const_addr, const_size);
365} 365}
366#define IN_ASYNC(bnum, bctlnum) \ 366#define IN_ASYNC(bnum, bctlnum) \
367({ \ 367({ \
@@ -390,13 +390,13 @@ int bfin_mem_access_type(unsigned long addr, unsigned long size)
390 if (in_mem_const(addr, size, L1_DATA_B_START, L1_DATA_B_LENGTH)) 390 if (in_mem_const(addr, size, L1_DATA_B_START, L1_DATA_B_LENGTH))
391 return cpu == 0 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA; 391 return cpu == 0 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA;
392#ifdef COREB_L1_CODE_START 392#ifdef COREB_L1_CODE_START
393 if (in_mem_const(addr, size, COREB_L1_CODE_START, L1_CODE_LENGTH)) 393 if (in_mem_const(addr, size, COREB_L1_CODE_START, COREB_L1_CODE_LENGTH))
394 return cpu == 1 ? BFIN_MEM_ACCESS_ITEST : BFIN_MEM_ACCESS_IDMA; 394 return cpu == 1 ? BFIN_MEM_ACCESS_ITEST : BFIN_MEM_ACCESS_IDMA;
395 if (in_mem_const(addr, size, COREB_L1_SCRATCH_START, L1_SCRATCH_LENGTH)) 395 if (in_mem_const(addr, size, COREB_L1_SCRATCH_START, L1_SCRATCH_LENGTH))
396 return cpu == 1 ? BFIN_MEM_ACCESS_CORE_ONLY : -EFAULT; 396 return cpu == 1 ? BFIN_MEM_ACCESS_CORE_ONLY : -EFAULT;
397 if (in_mem_const(addr, size, COREB_L1_DATA_A_START, L1_DATA_A_LENGTH)) 397 if (in_mem_const(addr, size, COREB_L1_DATA_A_START, COREB_L1_DATA_A_LENGTH))
398 return cpu == 1 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA; 398 return cpu == 1 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA;
399 if (in_mem_const(addr, size, COREB_L1_DATA_B_START, L1_DATA_B_LENGTH)) 399 if (in_mem_const(addr, size, COREB_L1_DATA_B_START, COREB_L1_DATA_B_LENGTH))
400 return cpu == 1 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA; 400 return cpu == 1 ? BFIN_MEM_ACCESS_CORE : BFIN_MEM_ACCESS_IDMA;
401#endif 401#endif
402 if (in_mem_const(addr, size, L2_START, L2_LENGTH)) 402 if (in_mem_const(addr, size, L2_START, L2_LENGTH))
@@ -472,13 +472,13 @@ int _access_ok(unsigned long addr, unsigned long size)
472 if (in_mem_const_off(addr, size, _ebss_b_l1 - _sdata_b_l1, L1_DATA_B_START, L1_DATA_B_LENGTH)) 472 if (in_mem_const_off(addr, size, _ebss_b_l1 - _sdata_b_l1, L1_DATA_B_START, L1_DATA_B_LENGTH))
473 return 1; 473 return 1;
474#ifdef COREB_L1_CODE_START 474#ifdef COREB_L1_CODE_START
475 if (in_mem_const(addr, size, COREB_L1_CODE_START, L1_CODE_LENGTH)) 475 if (in_mem_const(addr, size, COREB_L1_CODE_START, COREB_L1_CODE_LENGTH))
476 return 1; 476 return 1;
477 if (in_mem_const(addr, size, COREB_L1_SCRATCH_START, L1_SCRATCH_LENGTH)) 477 if (in_mem_const(addr, size, COREB_L1_SCRATCH_START, L1_SCRATCH_LENGTH))
478 return 1; 478 return 1;
479 if (in_mem_const(addr, size, COREB_L1_DATA_A_START, L1_DATA_A_LENGTH)) 479 if (in_mem_const(addr, size, COREB_L1_DATA_A_START, COREB_L1_DATA_A_LENGTH))
480 return 1; 480 return 1;
481 if (in_mem_const(addr, size, COREB_L1_DATA_B_START, L1_DATA_B_LENGTH)) 481 if (in_mem_const(addr, size, COREB_L1_DATA_B_START, COREB_L1_DATA_B_LENGTH))
482 return 1; 482 return 1;
483#endif 483#endif
484 if (in_mem_const_off(addr, size, _ebss_l2 - _stext_l2, L2_START, L2_LENGTH)) 484 if (in_mem_const_off(addr, size, _ebss_l2 - _stext_l2, L2_START, L2_LENGTH))
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index 6136c33e919..6225edae488 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -168,7 +168,6 @@ void __cpuinit bfin_setup_cpudata(unsigned int cpu)
168 struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu); 168 struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu);
169 169
170 cpudata->idle = current; 170 cpudata->idle = current;
171 cpudata->loops_per_jiffy = loops_per_jiffy;
172 cpudata->imemctl = bfin_read_IMEM_CONTROL(); 171 cpudata->imemctl = bfin_read_IMEM_CONTROL();
173 cpudata->dmemctl = bfin_read_DMEM_CONTROL(); 172 cpudata->dmemctl = bfin_read_DMEM_CONTROL();
174} 173}
@@ -568,17 +567,23 @@ static __init void memory_setup(void)
568# endif /* ANOMALY_05000263 */ 567# endif /* ANOMALY_05000263 */
569# endif /* CONFIG_ROMFS_FS */ 568# endif /* CONFIG_ROMFS_FS */
570 569
571 memory_end -= mtd_size; 570 /* Since the default MTD_UCLINUX has no magic number, we just blindly
572 571 * read 8 past the end of the kernel's image, and look at it.
573 if (mtd_size == 0) { 572 * When no image is attached, mtd_size is set to a random number
574 console_init(); 573 * Do some basic sanity checks before operating on things
575 panic("Don't boot kernel without rootfs attached."); 574 */
575 if (mtd_size == 0 || memory_end <= mtd_size) {
576 pr_emerg("Could not find valid ram mtd attached.\n");
577 } else {
578 memory_end -= mtd_size;
579
580 /* Relocate MTD image to the top of memory after the uncached memory area */
581 uclinux_ram_map.phys = memory_mtd_start = memory_end;
582 uclinux_ram_map.size = mtd_size;
583 pr_info("Found mtd parition at 0x%p, (len=0x%lx), moving to 0x%p\n",
584 _end, mtd_size, (void *)memory_mtd_start);
585 dma_memcpy((void *)uclinux_ram_map.phys, _end, uclinux_ram_map.size);
576 } 586 }
577
578 /* Relocate MTD image to the top of memory after the uncached memory area */
579 uclinux_ram_map.phys = memory_mtd_start = memory_end;
580 uclinux_ram_map.size = mtd_size;
581 dma_memcpy((void *)uclinux_ram_map.phys, _end, uclinux_ram_map.size);
582#endif /* CONFIG_MTD_UCLINUX */ 587#endif /* CONFIG_MTD_UCLINUX */
583 588
584#if (defined(CONFIG_BFIN_EXTMEM_ICACHEABLE) && ANOMALY_05000263) 589#if (defined(CONFIG_BFIN_EXTMEM_ICACHEABLE) && ANOMALY_05000263)
@@ -868,13 +873,6 @@ void __init setup_arch(char **cmdline_p)
868 else 873 else
869 printk(KERN_CONT "and Disabled\n"); 874 printk(KERN_CONT "and Disabled\n");
870 875
871#if defined(CONFIG_CHR_DEV_FLASH) || defined(CONFIG_BLK_DEV_FLASH)
872 /* we need to initialize the Flashrom device here since we might
873 * do things with flash early on in the boot
874 */
875 flash_probe();
876#endif
877
878 printk(KERN_INFO "Boot Mode: %i\n", bfin_read_SYSCR() & 0xF); 876 printk(KERN_INFO "Boot Mode: %i\n", bfin_read_SYSCR() & 0xF);
879 877
880 /* Newer parts mirror SWRST bits in SYSCR */ 878 /* Newer parts mirror SWRST bits in SYSCR */
@@ -938,10 +936,6 @@ void __init setup_arch(char **cmdline_p)
938 CPU, bfin_revid()); 936 CPU, bfin_revid());
939 } 937 }
940 938
941 /* We can't run on BF548-0.1 due to ANOMALY 05000448 */
942 if (bfin_cpuid() == 0x27de && bfin_revid() == 1)
943 panic("You can't run on this processor due to 05000448");
944
945 printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n"); 939 printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n");
946 940
947 printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n", 941 printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n",
@@ -1164,9 +1158,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
1164 sclk/1000000, sclk%1000000); 1158 sclk/1000000, sclk%1000000);
1165 seq_printf(m, "bogomips\t: %lu.%02lu\n" 1159 seq_printf(m, "bogomips\t: %lu.%02lu\n"
1166 "Calibration\t: %lu loops\n", 1160 "Calibration\t: %lu loops\n",
1167 (cpudata->loops_per_jiffy * HZ) / 500000, 1161 (loops_per_jiffy * HZ) / 500000,
1168 ((cpudata->loops_per_jiffy * HZ) / 5000) % 100, 1162 ((loops_per_jiffy * HZ) / 5000) % 100,
1169 (cpudata->loops_per_jiffy * HZ)); 1163 (loops_per_jiffy * HZ));
1170 1164
1171 /* Check Cache configutation */ 1165 /* Check Cache configutation */
1172 switch (cpudata->dmemctl & (1 << DMC0_P | 1 << DMC1_P)) { 1166 switch (cpudata->dmemctl & (1 << DMC0_P | 1 << DMC1_P)) {
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index 8a1caf2bb5b..bf2b2d1f8ae 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -570,11 +570,12 @@ asmlinkage void trap_c(struct pt_regs *fp)
570 if (kernel_mode_regs(fp) || (current && !current->mm)) { 570 if (kernel_mode_regs(fp) || (current && !current->mm)) {
571 console_verbose(); 571 console_verbose();
572 oops_in_progress = 1; 572 oops_in_progress = 1;
573 if (strerror)
574 verbose_printk(strerror);
575 } 573 }
576 574
577 if (sig != SIGTRAP) { 575 if (sig != SIGTRAP) {
576 if (strerror)
577 verbose_printk(strerror);
578
578 dump_bfin_process(fp); 579 dump_bfin_process(fp);
579 dump_bfin_mem(fp); 580 dump_bfin_mem(fp);
580 show_regs(fp); 581 show_regs(fp);
@@ -619,7 +620,9 @@ asmlinkage void trap_c(struct pt_regs *fp)
619 force_sig_info(sig, &info, current); 620 force_sig_info(sig, &info, current);
620 } 621 }
621 622
622 if (ANOMALY_05000461 && trapnr == VEC_HWERR && !access_ok(VERIFY_READ, fp->pc, 8)) 623 if ((ANOMALY_05000461 && trapnr == VEC_HWERR && !access_ok(VERIFY_READ, fp->pc, 8)) ||
624 (ANOMALY_05000281 && trapnr == VEC_HWERR) ||
625 (ANOMALY_05000189 && (trapnr == VEC_CPLB_I_VL || trapnr == VEC_CPLB_VL)))
623 fp->pc = SAFE_USER_INSTRUCTION; 626 fp->pc = SAFE_USER_INSTRUCTION;
624 627
625 traps_done: 628 traps_done:
diff --git a/arch/blackfin/lib/lshrdi3.c b/arch/blackfin/lib/lshrdi3.c
index 84b9c559222..e57bf6fbdf3 100644
--- a/arch/blackfin/lib/lshrdi3.c
+++ b/arch/blackfin/lib/lshrdi3.c
@@ -27,21 +27,7 @@
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */ 28 */
29 29
30#define BITS_PER_UNIT 8 30#include "gcclib.h"
31
32typedef int SItype __attribute__ ((mode(SI)));
33typedef unsigned int USItype __attribute__ ((mode(SI)));
34typedef int DItype __attribute__ ((mode(DI)));
35typedef int word_type __attribute__ ((mode(__word__)));
36
37struct DIstruct {
38 SItype high, low;
39};
40
41typedef union {
42 struct DIstruct s;
43 DItype ll;
44} DIunion;
45 31
46#ifdef CONFIG_ARITHMETIC_OPS_L1 32#ifdef CONFIG_ARITHMETIC_OPS_L1
47DItype __lshrdi3(DItype u, word_type b)__attribute__((l1_text)); 33DItype __lshrdi3(DItype u, word_type b)__attribute__((l1_text));
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c
index d9791106be9..809be268e42 100644
--- a/arch/blackfin/mach-bf518/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf518/boards/ezbrd.c
@@ -534,7 +534,7 @@ static struct platform_device i2c_bfin_twi_device = {
534#endif 534#endif
535 535
536static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 536static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
537#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) 537#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
538 { 538 {
539 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 539 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
540 }, 540 },
diff --git a/arch/blackfin/mach-bf518/include/mach/anomaly.h b/arch/blackfin/mach-bf518/include/mach/anomaly.h
index 426e064062a..753ed810e1c 100644
--- a/arch/blackfin/mach-bf518/include/mach/anomaly.h
+++ b/arch/blackfin/mach-bf518/include/mach/anomaly.h
@@ -82,6 +82,7 @@
82#define ANOMALY_05000179 (0) 82#define ANOMALY_05000179 (0)
83#define ANOMALY_05000182 (0) 83#define ANOMALY_05000182 (0)
84#define ANOMALY_05000183 (0) 84#define ANOMALY_05000183 (0)
85#define ANOMALY_05000189 (0)
85#define ANOMALY_05000198 (0) 86#define ANOMALY_05000198 (0)
86#define ANOMALY_05000202 (0) 87#define ANOMALY_05000202 (0)
87#define ANOMALY_05000215 (0) 88#define ANOMALY_05000215 (0)
@@ -117,6 +118,7 @@
117#define ANOMALY_05000357 (0) 118#define ANOMALY_05000357 (0)
118#define ANOMALY_05000362 (1) 119#define ANOMALY_05000362 (1)
119#define ANOMALY_05000363 (0) 120#define ANOMALY_05000363 (0)
121#define ANOMALY_05000364 (0)
120#define ANOMALY_05000371 (0) 122#define ANOMALY_05000371 (0)
121#define ANOMALY_05000380 (0) 123#define ANOMALY_05000380 (0)
122#define ANOMALY_05000386 (0) 124#define ANOMALY_05000386 (0)
diff --git a/arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h
index 0fb2ce5d840..dbade93395e 100644
--- a/arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf518/include/mach/bfin_serial_5xx.h
@@ -53,7 +53,7 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin)) 56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) 57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) 58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) 59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index f4867ce0c61..b09484f538f 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -793,7 +793,7 @@ static struct platform_device i2c_bfin_twi_device = {
793#endif 793#endif
794 794
795static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 795static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
796#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) 796#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
797 { 797 {
798 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 798 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
799 .type = "pcf8574_lcd", 799 .type = "pcf8574_lcd",
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c
index b2f30f06b73..2ad68cd10ae 100644
--- a/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -591,7 +591,7 @@ static struct platform_device i2c_bfin_twi_device = {
591#endif 591#endif
592 592
593static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 593static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
594#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) 594#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
595 { 595 {
596 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 596 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
597 }, 597 },
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 799a1d1fa89..75e563d3f9d 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -858,7 +858,7 @@ static struct platform_device i2c_bfin_twi_device = {
858#endif 858#endif
859 859
860static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 860static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
861#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) 861#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
862 { 862 {
863 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 863 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
864 }, 864 },
diff --git a/arch/blackfin/mach-bf527/include/mach/anomaly.h b/arch/blackfin/mach-bf527/include/mach/anomaly.h
index 0d63f740616..c438ca89d8c 100644
--- a/arch/blackfin/mach-bf527/include/mach/anomaly.h
+++ b/arch/blackfin/mach-bf527/include/mach/anomaly.h
@@ -176,6 +176,8 @@
176#define ANOMALY_05000443 (1) 176#define ANOMALY_05000443 (1)
177/* The WURESET Bit in the SYSCR Register is not Functional */ 177/* The WURESET Bit in the SYSCR Register is not Functional */
178#define ANOMALY_05000445 (1) 178#define ANOMALY_05000445 (1)
179/* USB DMA Short Packet Data Corruption */
180#define ANOMALY_05000450 (1)
179/* BCODE_QUICKBOOT, BCODE_ALLBOOT, and BCODE_FULLBOOT Settings in SYSCR Register Not Functional */ 181/* BCODE_QUICKBOOT, BCODE_ALLBOOT, and BCODE_FULLBOOT Settings in SYSCR Register Not Functional */
180#define ANOMALY_05000451 (1) 182#define ANOMALY_05000451 (1)
181/* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */ 183/* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */
@@ -201,6 +203,7 @@
201#define ANOMALY_05000179 (0) 203#define ANOMALY_05000179 (0)
202#define ANOMALY_05000182 (0) 204#define ANOMALY_05000182 (0)
203#define ANOMALY_05000183 (0) 205#define ANOMALY_05000183 (0)
206#define ANOMALY_05000189 (0)
204#define ANOMALY_05000198 (0) 207#define ANOMALY_05000198 (0)
205#define ANOMALY_05000202 (0) 208#define ANOMALY_05000202 (0)
206#define ANOMALY_05000215 (0) 209#define ANOMALY_05000215 (0)
@@ -238,6 +241,5 @@
238#define ANOMALY_05000412 (0) 241#define ANOMALY_05000412 (0)
239#define ANOMALY_05000447 (0) 242#define ANOMALY_05000447 (0)
240#define ANOMALY_05000448 (0) 243#define ANOMALY_05000448 (0)
241#define ANOMALY_05000450 (0)
242 244
243#endif 245#endif
diff --git a/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h
index a625659dd67..ebd6cebc1fb 100644
--- a/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h
@@ -53,7 +53,7 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin)) 56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) 57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) 58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) 59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index a68ade8a3ca..3d743ccaff6 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -453,7 +453,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
453 .irq = 39, 453 .irq = 39,
454 }, 454 },
455#endif 455#endif
456#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) 456#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
457 { 457 {
458 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 458 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
459 }, 459 },
diff --git a/arch/blackfin/mach-bf533/include/mach/anomaly.h b/arch/blackfin/mach-bf533/include/mach/anomaly.h
index 70a0ad69c61..cd83db2fb1a 100644
--- a/arch/blackfin/mach-bf533/include/mach/anomaly.h
+++ b/arch/blackfin/mach-bf533/include/mach/anomaly.h
@@ -335,6 +335,7 @@
335#define ANOMALY_05000323 (0) 335#define ANOMALY_05000323 (0)
336#define ANOMALY_05000353 (1) 336#define ANOMALY_05000353 (1)
337#define ANOMALY_05000362 (1) 337#define ANOMALY_05000362 (1)
338#define ANOMALY_05000364 (0)
338#define ANOMALY_05000380 (0) 339#define ANOMALY_05000380 (0)
339#define ANOMALY_05000386 (1) 340#define ANOMALY_05000386 (1)
340#define ANOMALY_05000389 (0) 341#define ANOMALY_05000389 (0)
diff --git a/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h
index a3789d7ccf8..4062e24e759 100644
--- a/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h
@@ -53,7 +53,7 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin)) 56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) 57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) 58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) 59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index c1f76dd2c4e..bd656907b8c 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -1313,10 +1313,10 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1313#if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) 1313#if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE)
1314 { 1314 {
1315 I2C_BOARD_INFO("ad7142_joystick", 0x2C), 1315 I2C_BOARD_INFO("ad7142_joystick", 0x2C),
1316 .irq = IRQ_PF5, 1316 .irq = IRQ_PG5,
1317 }, 1317 },
1318#endif 1318#endif
1319#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) 1319#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
1320 { 1320 {
1321 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 1321 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
1322 }, 1322 },
diff --git a/arch/blackfin/mach-bf537/include/mach/anomaly.h b/arch/blackfin/mach-bf537/include/mach/anomaly.h
index 57c128cc3b6..e66aa131f51 100644
--- a/arch/blackfin/mach-bf537/include/mach/anomaly.h
+++ b/arch/blackfin/mach-bf537/include/mach/anomaly.h
@@ -167,6 +167,7 @@
167#define ANOMALY_05000179 (0) 167#define ANOMALY_05000179 (0)
168#define ANOMALY_05000182 (0) 168#define ANOMALY_05000182 (0)
169#define ANOMALY_05000183 (0) 169#define ANOMALY_05000183 (0)
170#define ANOMALY_05000189 (0)
170#define ANOMALY_05000198 (0) 171#define ANOMALY_05000198 (0)
171#define ANOMALY_05000202 (0) 172#define ANOMALY_05000202 (0)
172#define ANOMALY_05000215 (0) 173#define ANOMALY_05000215 (0)
@@ -186,6 +187,7 @@
186#define ANOMALY_05000353 (1) 187#define ANOMALY_05000353 (1)
187#define ANOMALY_05000362 (1) 188#define ANOMALY_05000362 (1)
188#define ANOMALY_05000363 (0) 189#define ANOMALY_05000363 (0)
190#define ANOMALY_05000364 (0)
189#define ANOMALY_05000380 (0) 191#define ANOMALY_05000380 (0)
190#define ANOMALY_05000386 (1) 192#define ANOMALY_05000386 (1)
191#define ANOMALY_05000389 (0) 193#define ANOMALY_05000389 (0)
diff --git a/arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h
index b86662fb9de..e95d54f9af6 100644
--- a/arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h
@@ -53,7 +53,7 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin)) 56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) 57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) 58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) 59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
diff --git a/arch/blackfin/mach-bf538/include/mach/anomaly.h b/arch/blackfin/mach-bf538/include/mach/anomaly.h
index c97acdf85cd..451cf8a82a4 100644
--- a/arch/blackfin/mach-bf538/include/mach/anomaly.h
+++ b/arch/blackfin/mach-bf538/include/mach/anomaly.h
@@ -137,6 +137,7 @@
137#define ANOMALY_05000158 (0) 137#define ANOMALY_05000158 (0)
138#define ANOMALY_05000171 (0) 138#define ANOMALY_05000171 (0)
139#define ANOMALY_05000182 (0) 139#define ANOMALY_05000182 (0)
140#define ANOMALY_05000189 (0)
140#define ANOMALY_05000198 (0) 141#define ANOMALY_05000198 (0)
141#define ANOMALY_05000202 (0) 142#define ANOMALY_05000202 (0)
142#define ANOMALY_05000215 (0) 143#define ANOMALY_05000215 (0)
@@ -160,6 +161,7 @@
160#define ANOMALY_05000353 (1) 161#define ANOMALY_05000353 (1)
161#define ANOMALY_05000362 (1) 162#define ANOMALY_05000362 (1)
162#define ANOMALY_05000363 (0) 163#define ANOMALY_05000363 (0)
164#define ANOMALY_05000364 (0)
163#define ANOMALY_05000380 (0) 165#define ANOMALY_05000380 (0)
164#define ANOMALY_05000386 (1) 166#define ANOMALY_05000386 (1)
165#define ANOMALY_05000389 (0) 167#define ANOMALY_05000389 (0)
diff --git a/arch/blackfin/mach-bf538/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf538/include/mach/bfin_serial_5xx.h
index c536551eb4b..999f239fe1a 100644
--- a/arch/blackfin/mach-bf538/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf538/include/mach/bfin_serial_5xx.h
@@ -53,7 +53,7 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin)) 56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) 57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) 58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) 59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index 81f5b95cc36..dc0dd9b2bce 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -864,7 +864,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
864 864
865#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ 865#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
866static struct i2c_board_info __initdata bfin_i2c_board_info1[] = { 866static struct i2c_board_info __initdata bfin_i2c_board_info1[] = {
867#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) 867#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
868 { 868 {
869 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 869 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
870 }, 870 },
diff --git a/arch/blackfin/mach-bf548/include/mach/anomaly.h b/arch/blackfin/mach-bf548/include/mach/anomaly.h
index 18a4cd24f67..cd040fe0bc5 100644
--- a/arch/blackfin/mach-bf548/include/mach/anomaly.h
+++ b/arch/blackfin/mach-bf548/include/mach/anomaly.h
@@ -195,6 +195,7 @@
195#define ANOMALY_05000179 (0) 195#define ANOMALY_05000179 (0)
196#define ANOMALY_05000182 (0) 196#define ANOMALY_05000182 (0)
197#define ANOMALY_05000183 (0) 197#define ANOMALY_05000183 (0)
198#define ANOMALY_05000189 (0)
198#define ANOMALY_05000198 (0) 199#define ANOMALY_05000198 (0)
199#define ANOMALY_05000202 (0) 200#define ANOMALY_05000202 (0)
200#define ANOMALY_05000215 (0) 201#define ANOMALY_05000215 (0)
@@ -226,6 +227,7 @@
226#define ANOMALY_05000323 (0) 227#define ANOMALY_05000323 (0)
227#define ANOMALY_05000362 (1) 228#define ANOMALY_05000362 (1)
228#define ANOMALY_05000363 (0) 229#define ANOMALY_05000363 (0)
230#define ANOMALY_05000364 (0)
229#define ANOMALY_05000380 (0) 231#define ANOMALY_05000380 (0)
230#define ANOMALY_05000400 (0) 232#define ANOMALY_05000400 (0)
231#define ANOMALY_05000412 (0) 233#define ANOMALY_05000412 (0)
diff --git a/arch/blackfin/mach-bf561/include/mach/anomaly.h b/arch/blackfin/mach-bf561/include/mach/anomaly.h
index 94b8e277f09..a5312b2d267 100644
--- a/arch/blackfin/mach-bf561/include/mach/anomaly.h
+++ b/arch/blackfin/mach-bf561/include/mach/anomaly.h
@@ -288,6 +288,7 @@
288#define ANOMALY_05000273 (0) 288#define ANOMALY_05000273 (0)
289#define ANOMALY_05000311 (0) 289#define ANOMALY_05000311 (0)
290#define ANOMALY_05000353 (1) 290#define ANOMALY_05000353 (1)
291#define ANOMALY_05000364 (0)
291#define ANOMALY_05000380 (0) 292#define ANOMALY_05000380 (0)
292#define ANOMALY_05000386 (1) 293#define ANOMALY_05000386 (1)
293#define ANOMALY_05000389 (0) 294#define ANOMALY_05000389 (0)
diff --git a/arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h b/arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h
index a1b50878553..fd5e8878b8c 100644
--- a/arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h
+++ b/arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h
@@ -53,7 +53,7 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) (!gpio_get_value(x->cts_pin)) 56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1) 57#define UART_DISABLE_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0) 58#define UART_ENABLE_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) 59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
diff --git a/arch/blackfin/mach-bf561/include/mach/mem_map.h b/arch/blackfin/mach-bf561/include/mach/mem_map.h
index a63e15c86d9..5b96ea549a0 100644
--- a/arch/blackfin/mach-bf561/include/mach/mem_map.h
+++ b/arch/blackfin/mach-bf561/include/mach/mem_map.h
@@ -37,7 +37,6 @@
37 37
38/* Memory Map for ADSP-BF561 processors */ 38/* Memory Map for ADSP-BF561 processors */
39 39
40#ifdef CONFIG_BF561
41#define COREA_L1_CODE_START 0xFFA00000 40#define COREA_L1_CODE_START 0xFFA00000
42#define COREA_L1_DATA_A_START 0xFF800000 41#define COREA_L1_DATA_A_START 0xFF800000
43#define COREA_L1_DATA_B_START 0xFF900000 42#define COREA_L1_DATA_B_START 0xFF900000
@@ -74,6 +73,28 @@
74#define BFIN_DCACHESIZE (0*1024) 73#define BFIN_DCACHESIZE (0*1024)
75#define BFIN_DSUPBANKS 0 74#define BFIN_DSUPBANKS 0
76#endif /*CONFIG_BFIN_DCACHE*/ 75#endif /*CONFIG_BFIN_DCACHE*/
76
77/*
78 * If we are in SMP mode, then the cache settings of Core B will match
79 * the settings of Core A. If we aren't, then we assume Core B is not
80 * using any cache. This allows the rest of the kernel to work with
81 * the core in either mode as we are only loading user code into it and
82 * it is the user's problem to make sure they aren't doing something
83 * stupid there.
84 *
85 * Note that we treat the L1 code region as a contiguous blob to make
86 * the rest of the kernel simpler. Easier to check one region than a
87 * bunch of small ones. Again, possible misbehavior here is the fault
88 * of the user -- don't try to use memory that doesn't exist.
89 */
90#ifdef CONFIG_SMP
91# define COREB_L1_CODE_LENGTH L1_CODE_LENGTH
92# define COREB_L1_DATA_A_LENGTH L1_DATA_A_LENGTH
93# define COREB_L1_DATA_B_LENGTH L1_DATA_B_LENGTH
94#else
95# define COREB_L1_CODE_LENGTH 0x14000
96# define COREB_L1_DATA_A_LENGTH 0x8000
97# define COREB_L1_DATA_B_LENGTH 0x8000
77#endif 98#endif
78 99
79/* Level 2 Memory */ 100/* Level 2 Memory */
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index 5a4e7c7fd92..fb1795d5be2 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -218,7 +218,7 @@ ENTRY(_ex_single_step)
218 /* Single stepping only a single instruction, so clear the trace 218 /* Single stepping only a single instruction, so clear the trace
219 * bit here. */ 219 * bit here. */
220 r7 = syscfg; 220 r7 = syscfg;
221 bitclr (r7, 0); 221 bitclr (r7, SYSCFG_SSSTEP_P);
222 syscfg = R7; 222 syscfg = R7;
223 jump _ex_trap_c; 223 jump _ex_trap_c;
224 224
@@ -251,7 +251,7 @@ ENTRY(_ex_single_step)
251 if !cc jump _bfin_return_from_exception; 251 if !cc jump _bfin_return_from_exception;
252 252
253 r7 = syscfg; 253 r7 = syscfg;
254 bitclr (r7, 0); 254 bitclr (r7, SYSCFG_SSSTEP_P); /* Turn off single step */
255 syscfg = R7; 255 syscfg = R7;
256 256
257 /* Fall through to _bfin_return_from_exception. */ 257 /* Fall through to _bfin_return_from_exception. */
@@ -342,9 +342,11 @@ ENTRY(_ex_trap_c)
342 r6 = retx; 342 r6 = retx;
343 [p5 + PDA_RETX] = r6; 343 [p5 + PDA_RETX] = r6;
344#endif 344#endif
345 /* Save the state of single stepping */
345 r6 = SYSCFG; 346 r6 = SYSCFG;
346 [p5 + PDA_SYSCFG] = r6; 347 [p5 + PDA_SYSCFG] = r6;
347 BITCLR(r6, 0); 348 /* Clear it while we handle the exception in IRQ5 mode */
349 BITCLR(r6, SYSCFG_SSSTEP_P);
348 SYSCFG = r6; 350 SYSCFG = r6;
349 351
350 /* Disable all interrupts, but make sure level 5 is enabled so 352 /* Disable all interrupts, but make sure level 5 is enabled so
@@ -367,7 +369,7 @@ ENDPROC(_ex_trap_c)
367 * exception. This is a unrecoverable event, so crash. 369 * exception. This is a unrecoverable event, so crash.
368 * Note: this cannot be ENTRY() as we jump here with "if cc jump" ... 370 * Note: this cannot be ENTRY() as we jump here with "if cc jump" ...
369 */ 371 */
370_double_fault: 372ENTRY(_double_fault)
371 /* Turn caches & protection off, to ensure we don't get any more 373 /* Turn caches & protection off, to ensure we don't get any more
372 * double exceptions 374 * double exceptions
373 */ 375 */
@@ -872,7 +874,7 @@ ENTRY(_ret_from_exception)
872 raise 15; /* raise evt15 to do signal or reschedule */ 874 raise 15; /* raise evt15 to do signal or reschedule */
8734: 8754:
874 r0 = syscfg; 876 r0 = syscfg;
875 bitclr(r0, 0); 877 bitclr(r0, SYSCFG_SSSTEP_P); /* Turn off single step */
876 syscfg = r0; 878 syscfg = r0;
8775: 8795:
878 rts; 880 rts;
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c
index 61840059dfa..349ee3f5466 100644
--- a/arch/blackfin/mach-common/smp.c
+++ b/arch/blackfin/mach-common/smp.c
@@ -211,6 +211,8 @@ int smp_call_function(void (*func)(void *info), void *info, int wait)
211 return 0; 211 return 0;
212 212
213 msg = kmalloc(sizeof(*msg), GFP_ATOMIC); 213 msg = kmalloc(sizeof(*msg), GFP_ATOMIC);
214 if (!msg)
215 return -ENOMEM;
214 INIT_LIST_HEAD(&msg->list); 216 INIT_LIST_HEAD(&msg->list);
215 msg->call_struct.func = func; 217 msg->call_struct.func = func;
216 msg->call_struct.info = info; 218 msg->call_struct.info = info;
@@ -252,6 +254,8 @@ int smp_call_function_single(int cpuid, void (*func) (void *info), void *info,
252 cpu_set(cpu, callmap); 254 cpu_set(cpu, callmap);
253 255
254 msg = kmalloc(sizeof(*msg), GFP_ATOMIC); 256 msg = kmalloc(sizeof(*msg), GFP_ATOMIC);
257 if (!msg)
258 return -ENOMEM;
255 INIT_LIST_HEAD(&msg->list); 259 INIT_LIST_HEAD(&msg->list);
256 msg->call_struct.func = func; 260 msg->call_struct.func = func;
257 msg->call_struct.info = info; 261 msg->call_struct.info = info;
@@ -287,6 +291,8 @@ void smp_send_reschedule(int cpu)
287 return; 291 return;
288 292
289 msg = kmalloc(sizeof(*msg), GFP_ATOMIC); 293 msg = kmalloc(sizeof(*msg), GFP_ATOMIC);
294 if (!msg)
295 return;
290 memset(msg, 0, sizeof(msg)); 296 memset(msg, 0, sizeof(msg));
291 INIT_LIST_HEAD(&msg->list); 297 INIT_LIST_HEAD(&msg->list);
292 msg->type = BFIN_IPI_RESCHEDULE; 298 msg->type = BFIN_IPI_RESCHEDULE;
@@ -314,6 +320,8 @@ void smp_send_stop(void)
314 return; 320 return;
315 321
316 msg = kmalloc(sizeof(*msg), GFP_ATOMIC); 322 msg = kmalloc(sizeof(*msg), GFP_ATOMIC);
323 if (!msg)
324 return;
317 memset(msg, 0, sizeof(msg)); 325 memset(msg, 0, sizeof(msg));
318 INIT_LIST_HEAD(&msg->list); 326 INIT_LIST_HEAD(&msg->list);
319 msg->type = BFIN_IPI_CPU_STOP; 327 msg->type = BFIN_IPI_CPU_STOP;
@@ -450,7 +458,7 @@ void __init smp_cpus_done(unsigned int max_cpus)
450 unsigned int cpu; 458 unsigned int cpu;
451 459
452 for_each_online_cpu(cpu) 460 for_each_online_cpu(cpu)
453 bogosum += per_cpu(cpu_data, cpu).loops_per_jiffy; 461 bogosum += loops_per_jiffy;
454 462
455 printk(KERN_INFO "SMP: Total of %d processors activated " 463 printk(KERN_INFO "SMP: Total of %d processors activated "
456 "(%lu.%02lu BogoMIPS).\n", 464 "(%lu.%02lu BogoMIPS).\n",
diff --git a/arch/cris/include/asm/pgalloc.h b/arch/cris/include/asm/pgalloc.h
index a1ba761d057..6da975db112 100644
--- a/arch/cris/include/asm/pgalloc.h
+++ b/arch/cris/include/asm/pgalloc.h
@@ -47,7 +47,7 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
47 __free_page(pte); 47 __free_page(pte);
48} 48}
49 49
50#define __pte_free_tlb(tlb,pte) \ 50#define __pte_free_tlb(tlb,pte,address) \
51do { \ 51do { \
52 pgtable_page_dtor(pte); \ 52 pgtable_page_dtor(pte); \
53 tlb_remove_page((tlb), pte); \ 53 tlb_remove_page((tlb), pte); \
diff --git a/arch/frv/include/asm/pgalloc.h b/arch/frv/include/asm/pgalloc.h
index 971e6addb00..416d19a632f 100644
--- a/arch/frv/include/asm/pgalloc.h
+++ b/arch/frv/include/asm/pgalloc.h
@@ -49,7 +49,7 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
49 __free_page(pte); 49 __free_page(pte);
50} 50}
51 51
52#define __pte_free_tlb(tlb,pte) \ 52#define __pte_free_tlb(tlb,pte,address) \
53do { \ 53do { \
54 pgtable_page_dtor(pte); \ 54 pgtable_page_dtor(pte); \
55 tlb_remove_page((tlb),(pte)); \ 55 tlb_remove_page((tlb),(pte)); \
@@ -62,7 +62,7 @@ do { \
62 */ 62 */
63#define pmd_alloc_one(mm, addr) ({ BUG(); ((pmd_t *) 2); }) 63#define pmd_alloc_one(mm, addr) ({ BUG(); ((pmd_t *) 2); })
64#define pmd_free(mm, x) do { } while (0) 64#define pmd_free(mm, x) do { } while (0)
65#define __pmd_free_tlb(tlb,x) do { } while (0) 65#define __pmd_free_tlb(tlb,x,a) do { } while (0)
66 66
67#endif /* CONFIG_MMU */ 67#endif /* CONFIG_MMU */
68 68
diff --git a/arch/frv/include/asm/pgtable.h b/arch/frv/include/asm/pgtable.h
index 33233011b1c..22c60692b55 100644
--- a/arch/frv/include/asm/pgtable.h
+++ b/arch/frv/include/asm/pgtable.h
@@ -225,7 +225,7 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
225 */ 225 */
226#define pud_alloc_one(mm, address) NULL 226#define pud_alloc_one(mm, address) NULL
227#define pud_free(mm, x) do { } while (0) 227#define pud_free(mm, x) do { } while (0)
228#define __pud_free_tlb(tlb, x) do { } while (0) 228#define __pud_free_tlb(tlb, x, address) do { } while (0)
229 229
230/* 230/*
231 * The "pud_xxx()" functions here are trivial for a folded two-level 231 * The "pud_xxx()" functions here are trivial for a folded two-level
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile
index 58a7e46affd..e7cbaa02cd0 100644
--- a/arch/ia64/Makefile
+++ b/arch/ia64/Makefile
@@ -41,11 +41,6 @@ $(error Sorry, you need a newer version of the assember, one that is built from
41 ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz) 41 ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz)
42endif 42endif
43 43
44ifeq ($(call cc-version),0304)
45 cflags-$(CONFIG_ITANIUM) += -mtune=merced
46 cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley
47endif
48
49KBUILD_CFLAGS += $(cflags-y) 44KBUILD_CFLAGS += $(cflags-y)
50head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o 45head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o
51 46
diff --git a/arch/ia64/include/asm/bitops.h b/arch/ia64/include/asm/bitops.h
index e2ca8003733..57a2787bc9f 100644
--- a/arch/ia64/include/asm/bitops.h
+++ b/arch/ia64/include/asm/bitops.h
@@ -286,7 +286,7 @@ __test_and_clear_bit(int nr, volatile void * addr)
286{ 286{
287 __u32 *p = (__u32 *) addr + (nr >> 5); 287 __u32 *p = (__u32 *) addr + (nr >> 5);
288 __u32 m = 1 << (nr & 31); 288 __u32 m = 1 << (nr & 31);
289 int oldbitset = *p & m; 289 int oldbitset = (*p & m) != 0;
290 290
291 *p &= ~m; 291 *p &= ~m;
292 return oldbitset; 292 return oldbitset;
diff --git a/arch/ia64/include/asm/pgalloc.h b/arch/ia64/include/asm/pgalloc.h
index b9ac1a6fc21..96a8d927db2 100644
--- a/arch/ia64/include/asm/pgalloc.h
+++ b/arch/ia64/include/asm/pgalloc.h
@@ -48,7 +48,7 @@ static inline void pud_free(struct mm_struct *mm, pud_t *pud)
48{ 48{
49 quicklist_free(0, NULL, pud); 49 quicklist_free(0, NULL, pud);
50} 50}
51#define __pud_free_tlb(tlb, pud) pud_free((tlb)->mm, pud) 51#define __pud_free_tlb(tlb, pud, address) pud_free((tlb)->mm, pud)
52#endif /* CONFIG_PGTABLE_4 */ 52#endif /* CONFIG_PGTABLE_4 */
53 53
54static inline void 54static inline void
@@ -67,7 +67,7 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
67 quicklist_free(0, NULL, pmd); 67 quicklist_free(0, NULL, pmd);
68} 68}
69 69
70#define __pmd_free_tlb(tlb, pmd) pmd_free((tlb)->mm, pmd) 70#define __pmd_free_tlb(tlb, pmd, address) pmd_free((tlb)->mm, pmd)
71 71
72static inline void 72static inline void
73pmd_populate(struct mm_struct *mm, pmd_t * pmd_entry, pgtable_t pte) 73pmd_populate(struct mm_struct *mm, pmd_t * pmd_entry, pgtable_t pte)
@@ -117,6 +117,6 @@ static inline void check_pgt_cache(void)
117 quicklist_trim(0, NULL, 25, 16); 117 quicklist_trim(0, NULL, 25, 16);
118} 118}
119 119
120#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, pte) 120#define __pte_free_tlb(tlb, pte, address) pte_free((tlb)->mm, pte)
121 121
122#endif /* _ASM_IA64_PGALLOC_H */ 122#endif /* _ASM_IA64_PGALLOC_H */
diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h
index 0a9cc73d35c..8840a690d1e 100644
--- a/arch/ia64/include/asm/pgtable.h
+++ b/arch/ia64/include/asm/pgtable.h
@@ -155,7 +155,6 @@
155#include <linux/bitops.h> 155#include <linux/bitops.h>
156#include <asm/cacheflush.h> 156#include <asm/cacheflush.h>
157#include <asm/mmu_context.h> 157#include <asm/mmu_context.h>
158#include <asm/processor.h>
159 158
160/* 159/*
161 * Next come the mappings that determine how mmap() protection bits 160 * Next come the mappings that determine how mmap() protection bits
diff --git a/arch/ia64/include/asm/tlb.h b/arch/ia64/include/asm/tlb.h
index 20d8a39680c..85d965cb19a 100644
--- a/arch/ia64/include/asm/tlb.h
+++ b/arch/ia64/include/asm/tlb.h
@@ -236,22 +236,22 @@ do { \
236 __tlb_remove_tlb_entry(tlb, ptep, addr); \ 236 __tlb_remove_tlb_entry(tlb, ptep, addr); \
237} while (0) 237} while (0)
238 238
239#define pte_free_tlb(tlb, ptep) \ 239#define pte_free_tlb(tlb, ptep, address) \
240do { \ 240do { \
241 tlb->need_flush = 1; \ 241 tlb->need_flush = 1; \
242 __pte_free_tlb(tlb, ptep); \ 242 __pte_free_tlb(tlb, ptep, address); \
243} while (0) 243} while (0)
244 244
245#define pmd_free_tlb(tlb, ptep) \ 245#define pmd_free_tlb(tlb, ptep, address) \
246do { \ 246do { \
247 tlb->need_flush = 1; \ 247 tlb->need_flush = 1; \
248 __pmd_free_tlb(tlb, ptep); \ 248 __pmd_free_tlb(tlb, ptep, address); \
249} while (0) 249} while (0)
250 250
251#define pud_free_tlb(tlb, pudp) \ 251#define pud_free_tlb(tlb, pudp, address) \
252do { \ 252do { \
253 tlb->need_flush = 1; \ 253 tlb->need_flush = 1; \
254 __pud_free_tlb(tlb, pudp); \ 254 __pud_free_tlb(tlb, pudp, address); \
255} while (0) 255} while (0)
256 256
257#endif /* _ASM_IA64_TLB_H */ 257#endif /* _ASM_IA64_TLB_H */
diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c
index 2d311864e35..8ebccb589e1 100644
--- a/arch/ia64/kernel/ia64_ksyms.c
+++ b/arch/ia64/kernel/ia64_ksyms.c
@@ -21,6 +21,7 @@ EXPORT_SYMBOL(csum_ipv6_magic);
21 21
22#include <asm/page.h> 22#include <asm/page.h>
23EXPORT_SYMBOL(clear_page); 23EXPORT_SYMBOL(clear_page);
24EXPORT_SYMBOL(copy_page);
24 25
25#ifdef CONFIG_VIRTUAL_MEM_MAP 26#ifdef CONFIG_VIRTUAL_MEM_MAP
26#include <linux/bootmem.h> 27#include <linux/bootmem.h>
@@ -60,9 +61,6 @@ EXPORT_SYMBOL(__udivdi3);
60EXPORT_SYMBOL(__moddi3); 61EXPORT_SYMBOL(__moddi3);
61EXPORT_SYMBOL(__umoddi3); 62EXPORT_SYMBOL(__umoddi3);
62 63
63#include <asm/page.h>
64EXPORT_SYMBOL(copy_page);
65
66#if defined(CONFIG_MD_RAID456) || defined(CONFIG_MD_RAID456_MODULE) 64#if defined(CONFIG_MD_RAID456) || defined(CONFIG_MD_RAID456_MODULE)
67extern void xor_ia64_2(void); 65extern void xor_ia64_2(void);
68extern void xor_ia64_3(void); 66extern void xor_ia64_3(void);
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index c48b03f2b61..dab4d393908 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -1072,6 +1072,10 @@ iosapic_init (unsigned long phys_addr, unsigned int gsi_base)
1072 } 1072 }
1073 1073
1074 addr = ioremap(phys_addr, 0); 1074 addr = ioremap(phys_addr, 0);
1075 if (addr == NULL) {
1076 spin_unlock_irqrestore(&iosapic_lock, flags);
1077 return -ENOMEM;
1078 }
1075 ver = iosapic_version(addr); 1079 ver = iosapic_version(addr);
1076 if ((err = iosapic_check_gsi_range(gsi_base, ver))) { 1080 if ((err = iosapic_check_gsi_range(gsi_base, ver))) {
1077 iounmap(addr); 1081 iounmap(addr);
diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c
index 05695962fe4..f6b1ff0aea7 100644
--- a/arch/ia64/kernel/pci-dma.c
+++ b/arch/ia64/kernel/pci-dma.c
@@ -69,11 +69,6 @@ iommu_dma_init(void)
69 69
70int iommu_dma_supported(struct device *dev, u64 mask) 70int iommu_dma_supported(struct device *dev, u64 mask)
71{ 71{
72 struct dma_map_ops *ops = platform_dma_get_ops(dev);
73
74 if (ops->dma_supported)
75 return ops->dma_supported(dev, mask);
76
77 /* Copied from i386. Doesn't make much sense, because it will 72 /* Copied from i386. Doesn't make much sense, because it will
78 only work for pci_alloc_coherent. 73 only work for pci_alloc_coherent.
79 The caller just has to use GFP_DMA in this case. */ 74 The caller just has to use GFP_DMA in this case. */
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c
index bc80dff1df7..8f060352e12 100644
--- a/arch/ia64/kernel/topology.c
+++ b/arch/ia64/kernel/topology.c
@@ -372,6 +372,10 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
372 retval = kobject_init_and_add(&all_cpu_cache_info[cpu].kobj, 372 retval = kobject_init_and_add(&all_cpu_cache_info[cpu].kobj,
373 &cache_ktype_percpu_entry, &sys_dev->kobj, 373 &cache_ktype_percpu_entry, &sys_dev->kobj,
374 "%s", "cache"); 374 "%s", "cache");
375 if (unlikely(retval < 0)) {
376 cpu_cache_sysfs_exit(cpu);
377 return retval;
378 }
375 379
376 for (i = 0; i < all_cpu_cache_info[cpu].num_cache_leaves; i++) { 380 for (i = 0; i < all_cpu_cache_info[cpu].num_cache_leaves; i++) {
377 this_object = LEAF_KOBJECT_PTR(cpu,i); 381 this_object = LEAF_KOBJECT_PTR(cpu,i);
@@ -385,7 +389,7 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
385 } 389 }
386 kobject_put(&all_cpu_cache_info[cpu].kobj); 390 kobject_put(&all_cpu_cache_info[cpu].kobj);
387 cpu_cache_sysfs_exit(cpu); 391 cpu_cache_sysfs_exit(cpu);
388 break; 392 return retval;
389 } 393 }
390 kobject_uevent(&(this_object->kobj), KOBJ_ADD); 394 kobject_uevent(&(this_object->kobj), KOBJ_ADD);
391 } 395 }
diff --git a/arch/ia64/kvm/mmio.c b/arch/ia64/kvm/mmio.c
index 21f63fffc37..9bf55afd08d 100644
--- a/arch/ia64/kvm/mmio.c
+++ b/arch/ia64/kvm/mmio.c
@@ -247,7 +247,8 @@ void emulate_io_inst(struct kvm_vcpu *vcpu, u64 padr, u64 ma)
247 vcpu_get_fpreg(vcpu, inst.M9.f2, &v); 247 vcpu_get_fpreg(vcpu, inst.M9.f2, &v);
248 /* Write high word. FIXME: this is a kludge! */ 248 /* Write high word. FIXME: this is a kludge! */
249 v.u.bits[1] &= 0x3ffff; 249 v.u.bits[1] &= 0x3ffff;
250 mmio_access(vcpu, padr + 8, &v.u.bits[1], 8, ma, IOREQ_WRITE); 250 mmio_access(vcpu, padr + 8, (u64 *)&v.u.bits[1], 8,
251 ma, IOREQ_WRITE);
251 data = v.u.bits[0]; 252 data = v.u.bits[0];
252 size = 3; 253 size = 3;
253 } else if (inst.M10.major == 7 && inst.M10.x6 == 0x3B) { 254 } else if (inst.M10.major == 7 && inst.M10.x6 == 0x3B) {
@@ -265,7 +266,8 @@ void emulate_io_inst(struct kvm_vcpu *vcpu, u64 padr, u64 ma)
265 266
266 /* Write high word.FIXME: this is a kludge! */ 267 /* Write high word.FIXME: this is a kludge! */
267 v.u.bits[1] &= 0x3ffff; 268 v.u.bits[1] &= 0x3ffff;
268 mmio_access(vcpu, padr + 8, &v.u.bits[1], 8, ma, IOREQ_WRITE); 269 mmio_access(vcpu, padr + 8, (u64 *)&v.u.bits[1],
270 8, ma, IOREQ_WRITE);
269 data = v.u.bits[0]; 271 data = v.u.bits[0];
270 size = 3; 272 size = 3;
271 } else if (inst.M10.major == 7 && inst.M10.x6 == 0x31) { 273 } else if (inst.M10.major == 7 && inst.M10.x6 == 0x31) {
diff --git a/arch/ia64/kvm/vcpu.c b/arch/ia64/kvm/vcpu.c
index 46b02cbcc87..cc406d064a0 100644
--- a/arch/ia64/kvm/vcpu.c
+++ b/arch/ia64/kvm/vcpu.c
@@ -461,7 +461,7 @@ void setreg(unsigned long regnum, unsigned long val,
461u64 vcpu_get_gr(struct kvm_vcpu *vcpu, unsigned long reg) 461u64 vcpu_get_gr(struct kvm_vcpu *vcpu, unsigned long reg)
462{ 462{
463 struct kvm_pt_regs *regs = vcpu_regs(vcpu); 463 struct kvm_pt_regs *regs = vcpu_regs(vcpu);
464 u64 val; 464 unsigned long val;
465 465
466 if (!reg) 466 if (!reg)
467 return 0; 467 return 0;
@@ -469,7 +469,7 @@ u64 vcpu_get_gr(struct kvm_vcpu *vcpu, unsigned long reg)
469 return val; 469 return val;
470} 470}
471 471
472void vcpu_set_gr(struct kvm_vcpu *vcpu, u64 reg, u64 value, int nat) 472void vcpu_set_gr(struct kvm_vcpu *vcpu, unsigned long reg, u64 value, int nat)
473{ 473{
474 struct kvm_pt_regs *regs = vcpu_regs(vcpu); 474 struct kvm_pt_regs *regs = vcpu_regs(vcpu);
475 long sof = (regs->cr_ifs) & 0x7f; 475 long sof = (regs->cr_ifs) & 0x7f;
@@ -1072,7 +1072,7 @@ void kvm_ttag(struct kvm_vcpu *vcpu, INST64 inst)
1072 vcpu_set_gr(vcpu, inst.M46.r1, tag, 0); 1072 vcpu_set_gr(vcpu, inst.M46.r1, tag, 0);
1073} 1073}
1074 1074
1075int vcpu_tpa(struct kvm_vcpu *vcpu, u64 vadr, u64 *padr) 1075int vcpu_tpa(struct kvm_vcpu *vcpu, u64 vadr, unsigned long *padr)
1076{ 1076{
1077 struct thash_data *data; 1077 struct thash_data *data;
1078 union ia64_isr visr, pt_isr; 1078 union ia64_isr visr, pt_isr;
diff --git a/arch/ia64/kvm/vcpu.h b/arch/ia64/kvm/vcpu.h
index 042af92ced8..360724d3ae6 100644
--- a/arch/ia64/kvm/vcpu.h
+++ b/arch/ia64/kvm/vcpu.h
@@ -686,14 +686,15 @@ static inline int highest_inservice_irq(struct kvm_vcpu *vcpu)
686 return highest_bits((int *)&(VMX(vcpu, insvc[0]))); 686 return highest_bits((int *)&(VMX(vcpu, insvc[0])));
687} 687}
688 688
689extern void vcpu_get_fpreg(struct kvm_vcpu *vcpu, u64 reg, 689extern void vcpu_get_fpreg(struct kvm_vcpu *vcpu, unsigned long reg,
690 struct ia64_fpreg *val); 690 struct ia64_fpreg *val);
691extern void vcpu_set_fpreg(struct kvm_vcpu *vcpu, u64 reg, 691extern void vcpu_set_fpreg(struct kvm_vcpu *vcpu, unsigned long reg,
692 struct ia64_fpreg *val); 692 struct ia64_fpreg *val);
693extern u64 vcpu_get_gr(struct kvm_vcpu *vcpu, u64 reg); 693extern u64 vcpu_get_gr(struct kvm_vcpu *vcpu, unsigned long reg);
694extern void vcpu_set_gr(struct kvm_vcpu *vcpu, u64 reg, u64 val, int nat); 694extern void vcpu_set_gr(struct kvm_vcpu *vcpu, unsigned long reg,
695extern u64 vcpu_get_psr(struct kvm_vcpu *vcpu); 695 u64 val, int nat);
696extern void vcpu_set_psr(struct kvm_vcpu *vcpu, u64 val); 696extern unsigned long vcpu_get_psr(struct kvm_vcpu *vcpu);
697extern void vcpu_set_psr(struct kvm_vcpu *vcpu, unsigned long val);
697extern u64 vcpu_thash(struct kvm_vcpu *vcpu, u64 vadr); 698extern u64 vcpu_thash(struct kvm_vcpu *vcpu, u64 vadr);
698extern void vcpu_bsw0(struct kvm_vcpu *vcpu); 699extern void vcpu_bsw0(struct kvm_vcpu *vcpu);
699extern void thash_vhpt_insert(struct kvm_vcpu *v, u64 pte, 700extern void thash_vhpt_insert(struct kvm_vcpu *v, u64 pte,
diff --git a/arch/m32r/include/asm/pgalloc.h b/arch/m32r/include/asm/pgalloc.h
index f11a2b909cd..0fc73619897 100644
--- a/arch/m32r/include/asm/pgalloc.h
+++ b/arch/m32r/include/asm/pgalloc.h
@@ -58,7 +58,7 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
58 __free_page(pte); 58 __free_page(pte);
59} 59}
60 60
61#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, (pte)) 61#define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, (pte))
62 62
63/* 63/*
64 * allocating and freeing a pmd is trivial: the 1-entry pmd is 64 * allocating and freeing a pmd is trivial: the 1-entry pmd is
@@ -68,7 +68,7 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
68 68
69#define pmd_alloc_one(mm, addr) ({ BUG(); ((pmd_t *)2); }) 69#define pmd_alloc_one(mm, addr) ({ BUG(); ((pmd_t *)2); })
70#define pmd_free(mm, x) do { } while (0) 70#define pmd_free(mm, x) do { } while (0)
71#define __pmd_free_tlb(tlb, x) do { } while (0) 71#define __pmd_free_tlb(tlb, x, addr) do { } while (0)
72#define pgd_populate(mm, pmd, pte) BUG() 72#define pgd_populate(mm, pmd, pte) BUG()
73 73
74#define check_pgt_cache() do { } while (0) 74#define check_pgt_cache() do { } while (0)
diff --git a/arch/m68k/include/asm/motorola_pgalloc.h b/arch/m68k/include/asm/motorola_pgalloc.h
index d08bf6261df..15ee4c74a9f 100644
--- a/arch/m68k/include/asm/motorola_pgalloc.h
+++ b/arch/m68k/include/asm/motorola_pgalloc.h
@@ -54,7 +54,8 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t page)
54 __free_page(page); 54 __free_page(page);
55} 55}
56 56
57static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t page) 57static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t page,
58 unsigned long address)
58{ 59{
59 pgtable_page_dtor(page); 60 pgtable_page_dtor(page);
60 cache_page(kmap(page)); 61 cache_page(kmap(page));
@@ -73,7 +74,8 @@ static inline int pmd_free(struct mm_struct *mm, pmd_t *pmd)
73 return free_pointer_table(pmd); 74 return free_pointer_table(pmd);
74} 75}
75 76
76static inline int __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) 77static inline int __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd,
78 unsigned long address)
77{ 79{
78 return free_pointer_table(pmd); 80 return free_pointer_table(pmd);
79} 81}
diff --git a/arch/m68k/include/asm/sun3_pgalloc.h b/arch/m68k/include/asm/sun3_pgalloc.h
index d4c83f14381..48d80d5a666 100644
--- a/arch/m68k/include/asm/sun3_pgalloc.h
+++ b/arch/m68k/include/asm/sun3_pgalloc.h
@@ -32,7 +32,7 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t page)
32 __free_page(page); 32 __free_page(page);
33} 33}
34 34
35#define __pte_free_tlb(tlb,pte) \ 35#define __pte_free_tlb(tlb,pte,addr) \
36do { \ 36do { \
37 pgtable_page_dtor(pte); \ 37 pgtable_page_dtor(pte); \
38 tlb_remove_page((tlb), pte); \ 38 tlb_remove_page((tlb), pte); \
@@ -80,7 +80,7 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t page
80 * inside the pgd, so has no extra memory associated with it. 80 * inside the pgd, so has no extra memory associated with it.
81 */ 81 */
82#define pmd_free(mm, x) do { } while (0) 82#define pmd_free(mm, x) do { } while (0)
83#define __pmd_free_tlb(tlb, x) do { } while (0) 83#define __pmd_free_tlb(tlb, x, addr) do { } while (0)
84 84
85static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) 85static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
86{ 86{
diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile
index d0bcf80a113..8439598d465 100644
--- a/arch/microblaze/Makefile
+++ b/arch/microblaze/Makefile
@@ -6,14 +6,16 @@ endif
6 6
7# What CPU vesion are we building for, and crack it open 7# What CPU vesion are we building for, and crack it open
8# as major.minor.rev 8# as major.minor.rev
9CPU_VER=$(subst ",,$(CONFIG_XILINX_MICROBLAZE0_HW_VER) ) 9CPU_VER := $(shell echo $(CONFIG_XILINX_MICROBLAZE0_HW_VER))
10CPU_MAJOR=$(shell echo $(CPU_VER) | cut -d '.' -f 1) 10CPU_MAJOR := $(shell echo $(CPU_VER) | cut -d '.' -f 1)
11CPU_MINOR=$(shell echo $(CPU_VER) | cut -d '.' -f 2) 11CPU_MINOR := $(shell echo $(CPU_VER) | cut -d '.' -f 2)
12CPU_REV=$(shell echo $(CPU_VER) | cut -d '.' -f 3) 12CPU_REV := $(shell echo $(CPU_VER) | cut -d '.' -f 3)
13 13
14export CPU_VER CPU_MAJOR CPU_MINOR CPU_REV 14export CPU_VER CPU_MAJOR CPU_MINOR CPU_REV
15 15
16# Use cpu-related CONFIG_ vars to set compile options. 16# Use cpu-related CONFIG_ vars to set compile options.
17# The various CONFIG_XILINX cpu features options are integers 0/1/2...
18# rather than bools y/n
17 19
18# Work out HW multipler support. This is icky. 20# Work out HW multipler support. This is icky.
19# 1. Spartan2 has no HW multiplers. 21# 1. Spartan2 has no HW multiplers.
@@ -34,30 +36,29 @@ CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare
34 36
35CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) 37CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER))
36 38
37# The various CONFIG_XILINX cpu features options are integers 0/1/2...
38# rather than bools y/n
39
40# r31 holds current when in kernel mode 39# r31 holds current when in kernel mode
41CFLAGS_KERNEL += -ffixed-r31 $(CPUFLAGS-1) $(CPUFLAGS-2) 40KBUILD_KERNEL += -ffixed-r31 $(CPUFLAGS-1) $(CPUFLAGS-2)
42 41
43LDFLAGS := 42LDFLAGS :=
44LDFLAGS_vmlinux := 43LDFLAGS_vmlinux :=
45LDFLAGS_BLOB := --format binary --oformat elf32-microblaze
46 44
47LIBGCC := $(shell $(CC) $(CFLAGS_KERNEL) -print-libgcc-file-name) 45LIBGCC := $(shell $(CC) $(KBUILD_KERNEL) -print-libgcc-file-name)
48 46
49head-y := arch/microblaze/kernel/head.o 47head-y := arch/microblaze/kernel/head.o
50libs-y += arch/microblaze/lib/ $(LIBGCC) 48libs-y += arch/microblaze/lib/
51core-y += arch/microblaze/kernel/ arch/microblaze/mm/ \ 49libs-y += $(LIBGCC)
52 arch/microblaze/platform/ 50core-y += arch/microblaze/kernel/
51core-y += arch/microblaze/mm/
52core-y += arch/microblaze/platform/
53 53
54boot := arch/$(ARCH)/boot 54boot := arch/microblaze/boot
55 55
56# defines filename extension depending memory management type 56# defines filename extension depending memory management type
57ifeq ($(CONFIG_MMU),) 57ifeq ($(CONFIG_MMU),)
58MMUEXT := -nommu 58MMU := -nommu
59endif 59endif
60export MMUEXT 60
61export MMU
61 62
62all: linux.bin 63all: linux.bin
63 64
diff --git a/arch/microblaze/include/asm/io.h b/arch/microblaze/include/asm/io.h
index 5c173424d07..7c3ec13b44d 100644
--- a/arch/microblaze/include/asm/io.h
+++ b/arch/microblaze/include/asm/io.h
@@ -14,7 +14,6 @@
14#include <asm/byteorder.h> 14#include <asm/byteorder.h>
15#include <asm/page.h> 15#include <asm/page.h>
16#include <linux/types.h> 16#include <linux/types.h>
17#include <asm/byteorder.h>
18#include <linux/mm.h> /* Get struct page {...} */ 17#include <linux/mm.h> /* Get struct page {...} */
19 18
20 19
diff --git a/arch/microblaze/include/asm/pgalloc.h b/arch/microblaze/include/asm/pgalloc.h
index 59a757e46ba..b0131da1387 100644
--- a/arch/microblaze/include/asm/pgalloc.h
+++ b/arch/microblaze/include/asm/pgalloc.h
@@ -180,7 +180,7 @@ extern inline void pte_free(struct mm_struct *mm, struct page *ptepage)
180 __free_page(ptepage); 180 __free_page(ptepage);
181} 181}
182 182
183#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, (pte)) 183#define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, (pte))
184 184
185#define pmd_populate(mm, pmd, pte) (pmd_val(*(pmd)) = page_address(pte)) 185#define pmd_populate(mm, pmd, pte) (pmd_val(*(pmd)) = page_address(pte))
186 186
@@ -193,7 +193,7 @@ extern inline void pte_free(struct mm_struct *mm, struct page *ptepage)
193 */ 193 */
194#define pmd_alloc_one(mm, address) ({ BUG(); ((pmd_t *)2); }) 194#define pmd_alloc_one(mm, address) ({ BUG(); ((pmd_t *)2); })
195/*#define pmd_free(mm, x) do { } while (0)*/ 195/*#define pmd_free(mm, x) do { } while (0)*/
196#define __pmd_free_tlb(tlb, x) do { } while (0) 196#define __pmd_free_tlb(tlb, x, addr) do { } while (0)
197#define pgd_populate(mm, pmd, pte) BUG() 197#define pgd_populate(mm, pmd, pte) BUG()
198 198
199extern int do_check_pgt_cache(int, int); 199extern int do_check_pgt_cache(int, int);
diff --git a/arch/microblaze/include/asm/pgtable.h b/arch/microblaze/include/asm/pgtable.h
index 4c57a586a98..cc3a4dfc3ea 100644
--- a/arch/microblaze/include/asm/pgtable.h
+++ b/arch/microblaze/include/asm/pgtable.h
@@ -185,6 +185,7 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
185 185
186/* Definitions for MicroBlaze. */ 186/* Definitions for MicroBlaze. */
187#define _PAGE_GUARDED 0x001 /* G: page is guarded from prefetch */ 187#define _PAGE_GUARDED 0x001 /* G: page is guarded from prefetch */
188#define _PAGE_FILE 0x001 /* when !present: nonlinear file mapping */
188#define _PAGE_PRESENT 0x002 /* software: PTE contains a translation */ 189#define _PAGE_PRESENT 0x002 /* software: PTE contains a translation */
189#define _PAGE_NO_CACHE 0x004 /* I: caching is inhibited */ 190#define _PAGE_NO_CACHE 0x004 /* I: caching is inhibited */
190#define _PAGE_WRITETHRU 0x008 /* W: caching is write-through */ 191#define _PAGE_WRITETHRU 0x008 /* W: caching is write-through */
@@ -320,8 +321,7 @@ static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; }
320static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_EXEC; } 321static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_EXEC; }
321static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } 322static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
322static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } 323static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
323/* FIXME */ 324static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; }
324static inline int pte_file(pte_t pte) { return 0; }
325 325
326static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; } 326static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; }
327static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; } 327static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; }
@@ -488,7 +488,7 @@ static inline pmd_t *pmd_offset(pgd_t *dir, unsigned long address)
488/* Encode and decode a nonlinear file mapping entry */ 488/* Encode and decode a nonlinear file mapping entry */
489#define PTE_FILE_MAX_BITS 29 489#define PTE_FILE_MAX_BITS 29
490#define pte_to_pgoff(pte) (pte_val(pte) >> 3) 490#define pte_to_pgoff(pte) (pte_val(pte) >> 3)
491#define pgoff_to_pte(off) ((pte_t) { ((off) << 3) }) 491#define pgoff_to_pte(off) ((pte_t) { ((off) << 3) | _PAGE_FILE })
492 492
493extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; 493extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
494 494
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 20f7b3a926e..37e6f305a68 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -16,6 +16,18 @@
16#define _ASM_MICROBLAZE_PROM_H 16#define _ASM_MICROBLAZE_PROM_H
17#ifdef __KERNEL__ 17#ifdef __KERNEL__
18 18
19/* Definitions used by the flattened device tree */
20#define OF_DT_HEADER 0xd00dfeed /* marker */
21#define OF_DT_BEGIN_NODE 0x1 /* Start of node, full name */
22#define OF_DT_END_NODE 0x2 /* End node */
23#define OF_DT_PROP 0x3 /* Property: name off, size, content */
24#define OF_DT_NOP 0x4 /* nop */
25#define OF_DT_END 0x9
26
27#define OF_DT_VERSION 0x10
28
29#ifndef __ASSEMBLY__
30
19#include <linux/types.h> 31#include <linux/types.h>
20#include <linux/proc_fs.h> 32#include <linux/proc_fs.h>
21#include <linux/platform_device.h> 33#include <linux/platform_device.h>
@@ -29,16 +41,6 @@
29#define of_prop_cmp(s1, s2) strcmp((s1), (s2)) 41#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
30#define of_node_cmp(s1, s2) strcasecmp((s1), (s2)) 42#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
31 43
32/* Definitions used by the flattened device tree */
33#define OF_DT_HEADER 0xd00dfeed /* marker */
34#define OF_DT_BEGIN_NODE 0x1 /* Start of node, full name */
35#define OF_DT_END_NODE 0x2 /* End node */
36#define OF_DT_PROP 0x3 /* Property: name off, size, content */
37#define OF_DT_NOP 0x4 /* nop */
38#define OF_DT_END 0x9
39
40#define OF_DT_VERSION 0x10
41
42/* 44/*
43 * This is what gets passed to the kernel by prom_init or kexec 45 * This is what gets passed to the kernel by prom_init or kexec
44 * 46 *
@@ -309,5 +311,6 @@ extern void __iomem *of_iomap(struct device_node *device, int index);
309 */ 311 */
310#include <linux/of.h> 312#include <linux/of.h>
311 313
314#endif /* __ASSEMBLY__ */
312#endif /* __KERNEL__ */ 315#endif /* __KERNEL__ */
313#endif /* _ASM_MICROBLAZE_PROM_H */ 316#endif /* _ASM_MICROBLAZE_PROM_H */
diff --git a/arch/microblaze/include/asm/tlb.h b/arch/microblaze/include/asm/tlb.h
index c472d280113..e8abd4a0349 100644
--- a/arch/microblaze/include/asm/tlb.h
+++ b/arch/microblaze/include/asm/tlb.h
@@ -11,7 +11,7 @@
11#ifndef _ASM_MICROBLAZE_TLB_H 11#ifndef _ASM_MICROBLAZE_TLB_H
12#define _ASM_MICROBLAZE_TLB_H 12#define _ASM_MICROBLAZE_TLB_H
13 13
14#define tlb_flush(tlb) do {} while (0) 14#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
15 15
16#include <asm-generic/tlb.h> 16#include <asm-generic/tlb.h>
17 17
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h
index 65adad61e7e..5431b4631a7 100644
--- a/arch/microblaze/include/asm/uaccess.h
+++ b/arch/microblaze/include/asm/uaccess.h
@@ -189,7 +189,7 @@ extern long strnlen_user(const char *src, long count);
189 189
190#define __put_user(x, ptr) \ 190#define __put_user(x, ptr) \
191({ \ 191({ \
192 __typeof__(*(ptr)) __gu_val = x; \ 192 __typeof__(*(ptr)) volatile __gu_val = (x); \
193 long __gu_err = 0; \ 193 long __gu_err = 0; \
194 switch (sizeof(__gu_val)) { \ 194 switch (sizeof(__gu_val)) { \
195 case 1: \ 195 case 1: \
diff --git a/arch/microblaze/kernel/Makefile b/arch/microblaze/kernel/Makefile
index f4a5e19a20e..d487729683d 100644
--- a/arch/microblaze/kernel/Makefile
+++ b/arch/microblaze/kernel/Makefile
@@ -17,4 +17,4 @@ obj-$(CONFIG_HEART_BEAT) += heartbeat.o
17obj-$(CONFIG_MODULES) += microblaze_ksyms.o module.o 17obj-$(CONFIG_MODULES) += microblaze_ksyms.o module.o
18obj-$(CONFIG_MMU) += misc.o 18obj-$(CONFIG_MMU) += misc.o
19 19
20obj-y += entry$(MMUEXT).o 20obj-y += entry$(MMU).o
diff --git a/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c b/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c
index 153f57c57b6..c259786e7fa 100644
--- a/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c
+++ b/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c
@@ -22,7 +22,7 @@
22 22
23#define CI(c, p) { ci->c = PVR_##p(pvr); } 23#define CI(c, p) { ci->c = PVR_##p(pvr); }
24#define err_printk(x) \ 24#define err_printk(x) \
25 early_printk("ERROR: Microblaze " x " - different for PVR and DTS\n"); 25 early_printk("ERROR: Microblaze " x "-different for PVR and DTS\n");
26 26
27void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu) 27void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu)
28{ 28{
diff --git a/arch/microblaze/kernel/cpu/cpuinfo-static.c b/arch/microblaze/kernel/cpu/cpuinfo-static.c
index 450ca6bb828..adb448f93d5 100644
--- a/arch/microblaze/kernel/cpu/cpuinfo-static.c
+++ b/arch/microblaze/kernel/cpu/cpuinfo-static.c
@@ -18,7 +18,7 @@ static const char family_string[] = CONFIG_XILINX_MICROBLAZE0_FAMILY;
18static const char cpu_ver_string[] = CONFIG_XILINX_MICROBLAZE0_HW_VER; 18static const char cpu_ver_string[] = CONFIG_XILINX_MICROBLAZE0_HW_VER;
19 19
20#define err_printk(x) \ 20#define err_printk(x) \
21 early_printk("ERROR: Microblaze " x "- different for kernel and DTS\n"); 21 early_printk("ERROR: Microblaze " x "-different for kernel and DTS\n");
22 22
23void __init set_cpuinfo_static(struct cpuinfo *ci, struct device_node *cpu) 23void __init set_cpuinfo_static(struct cpuinfo *ci, struct device_node *cpu)
24{ 24{
diff --git a/arch/microblaze/kernel/cpu/cpuinfo.c b/arch/microblaze/kernel/cpu/cpuinfo.c
index a10bea119b9..c411c6757de 100644
--- a/arch/microblaze/kernel/cpu/cpuinfo.c
+++ b/arch/microblaze/kernel/cpu/cpuinfo.c
@@ -26,6 +26,8 @@ const struct cpu_ver_key cpu_ver_lookup[] = {
26 {"7.10.b", 0x09}, 26 {"7.10.b", 0x09},
27 {"7.10.c", 0x0a}, 27 {"7.10.c", 0x0a},
28 {"7.10.d", 0x0b}, 28 {"7.10.d", 0x0b},
29 {"7.20.a", 0x0c},
30 {"7.20.b", 0x0d},
29 /* FIXME There is no keycode defined in MBV for these versions */ 31 /* FIXME There is no keycode defined in MBV for these versions */
30 {"2.10.a", 0x10}, 32 {"2.10.a", 0x10},
31 {"3.00.a", 0x20}, 33 {"3.00.a", 0x20},
diff --git a/arch/microblaze/kernel/head.S b/arch/microblaze/kernel/head.S
index e568d6ec621..e41c6ce2a7b 100644
--- a/arch/microblaze/kernel/head.S
+++ b/arch/microblaze/kernel/head.S
@@ -31,6 +31,7 @@
31#include <linux/linkage.h> 31#include <linux/linkage.h>
32#include <asm/thread_info.h> 32#include <asm/thread_info.h>
33#include <asm/page.h> 33#include <asm/page.h>
34#include <asm/prom.h> /* for OF_DT_HEADER */
34 35
35#ifdef CONFIG_MMU 36#ifdef CONFIG_MMU
36#include <asm/setup.h> /* COMMAND_LINE_SIZE */ 37#include <asm/setup.h> /* COMMAND_LINE_SIZE */
@@ -54,11 +55,19 @@ ENTRY(_start)
54 andi r1, r1, ~2 55 andi r1, r1, ~2
55 mts rmsr, r1 56 mts rmsr, r1
56 57
57/* save fdt to kernel location */ 58/* r7 may point to an FDT, or there may be one linked in.
58/* r7 stores pointer to fdt blob */ 59 if it's in r7, we've got to save it away ASAP.
59 beqi r7, no_fdt_arg 60 We ensure r7 points to a valid FDT, just in case the bootloader
61 is broken or non-existent */
62 beqi r7, no_fdt_arg /* NULL pointer? don't copy */
63 lw r11, r0, r7 /* Does r7 point to a */
64 rsubi r11, r11, OF_DT_HEADER /* valid FDT? */
65 beqi r11, _prepare_copy_fdt
66 or r7, r0, r0 /* clear R7 when not valid DTB */
67 bnei r11, no_fdt_arg /* No - get out of here */
68_prepare_copy_fdt:
60 or r11, r0, r0 /* incremment */ 69 or r11, r0, r0 /* incremment */
61 ori r4, r0, TOPHYS(_fdt_start) /* save bram context */ 70 ori r4, r0, TOPHYS(_fdt_start)
62 ori r3, r0, (0x4000 - 4) 71 ori r3, r0, (0x4000 - 4)
63_copy_fdt: 72_copy_fdt:
64 lw r12, r7, r11 /* r12 = r7 + r11 */ 73 lw r12, r7, r11 /* r12 = r7 + r11 */
diff --git a/arch/microblaze/kernel/hw_exception_handler.S b/arch/microblaze/kernel/hw_exception_handler.S
index 9d591cd74fc..3288c973767 100644
--- a/arch/microblaze/kernel/hw_exception_handler.S
+++ b/arch/microblaze/kernel/hw_exception_handler.S
@@ -74,6 +74,7 @@
74 74
75#include <asm/mmu.h> 75#include <asm/mmu.h>
76#include <asm/pgtable.h> 76#include <asm/pgtable.h>
77#include <asm/signal.h>
77#include <asm/asm-offsets.h> 78#include <asm/asm-offsets.h>
78 79
79/* Helpful Macros */ 80/* Helpful Macros */
@@ -428,19 +429,9 @@ handle_unaligned_ex:
428 mfs r17, rbtr; /* ESR[DS] set - return address in BTR */ 429 mfs r17, rbtr; /* ESR[DS] set - return address in BTR */
429 nop 430 nop
430_no_delayslot: 431_no_delayslot:
431#endif 432 /* jump to high level unaligned handler */
432 433 RESTORE_STATE;
433#ifdef CONFIG_MMU 434 bri unaligned_data_trap
434 /* Check if unaligned address is last on a 4k page */
435 andi r5, r4, 0xffc
436 xori r5, r5, 0xffc
437 bnei r5, _unaligned_ex2
438 _unaligned_ex1:
439 RESTORE_STATE;
440/* Another page must be accessed or physical address not in page table */
441 bri unaligned_data_trap
442
443 _unaligned_ex2:
444#endif 435#endif
445 andi r6, r3, 0x3E0; /* Mask and extract the register operand */ 436 andi r6, r3, 0x3E0; /* Mask and extract the register operand */
446 srl r6, r6; /* r6 >> 5 */ 437 srl r6, r6; /* r6 >> 5 */
@@ -450,45 +441,6 @@ _no_delayslot:
450 srl r6, r6; 441 srl r6, r6;
451 /* Store the register operand in a temporary location */ 442 /* Store the register operand in a temporary location */
452 sbi r6, r0, TOPHYS(ex_reg_op); 443 sbi r6, r0, TOPHYS(ex_reg_op);
453#ifdef CONFIG_MMU
454 /* Get physical address */
455 /* If we are faulting a kernel address, we have to use the
456 * kernel page tables.
457 */
458 ori r5, r0, CONFIG_KERNEL_START
459 cmpu r5, r4, r5
460 bgti r5, _unaligned_ex3
461 ori r5, r0, swapper_pg_dir
462 bri _unaligned_ex4
463
464 /* Get the PGD for the current thread. */
465_unaligned_ex3: /* user thread */
466 addi r5 ,CURRENT_TASK, TOPHYS(0); /* get current task address */
467 lwi r5, r5, TASK_THREAD + PGDIR
468_unaligned_ex4:
469 tophys(r5,r5)
470 BSRLI(r6,r4,20) /* Create L1 (pgdir/pmd) address */
471 andi r6, r6, 0xffc
472/* Assume pgdir aligned on 4K boundary, no need for "andi r5,r5,0xfffff003" */
473 or r5, r5, r6
474 lwi r6, r5, 0 /* Get L1 entry */
475 andi r5, r6, 0xfffff000 /* Extract L2 (pte) base address. */
476 beqi r5, _unaligned_ex1 /* Bail if no table */
477
478 tophys(r5,r5)
479 BSRLI(r6,r4,10) /* Compute PTE address */
480 andi r6, r6, 0xffc
481 andi r5, r5, 0xfffff003
482 or r5, r5, r6
483 lwi r5, r5, 0 /* Get Linux PTE */
484
485 andi r6, r5, _PAGE_PRESENT
486 beqi r6, _unaligned_ex1 /* Bail if no page */
487
488 andi r5, r5, 0xfffff000 /* Extract RPN */
489 andi r4, r4, 0x00000fff /* Extract offset */
490 or r4, r4, r5 /* Create physical address */
491#endif /* CONFIG_MMU */
492 444
493 andi r6, r3, 0x400; /* Extract ESR[S] */ 445 andi r6, r3, 0x400; /* Extract ESR[S] */
494 bnei r6, ex_sw; 446 bnei r6, ex_sw;
@@ -959,15 +911,15 @@ _unaligned_data_exception:
959 andi r6, r3, 0x800; /* Extract ESR[W] - delay slot */ 911 andi r6, r3, 0x800; /* Extract ESR[W] - delay slot */
960ex_lw_vm: 912ex_lw_vm:
961 beqid r6, ex_lhw_vm; 913 beqid r6, ex_lhw_vm;
962 lbui r5, r4, 0; /* Exception address in r4 - delay slot */ 914load1: lbui r5, r4, 0; /* Exception address in r4 - delay slot */
963/* Load a word, byte-by-byte from destination address and save it in tmp space*/ 915/* Load a word, byte-by-byte from destination address and save it in tmp space*/
964 la r6, r0, ex_tmp_data_loc_0; 916 la r6, r0, ex_tmp_data_loc_0;
965 sbi r5, r6, 0; 917 sbi r5, r6, 0;
966 lbui r5, r4, 1; 918load2: lbui r5, r4, 1;
967 sbi r5, r6, 1; 919 sbi r5, r6, 1;
968 lbui r5, r4, 2; 920load3: lbui r5, r4, 2;
969 sbi r5, r6, 2; 921 sbi r5, r6, 2;
970 lbui r5, r4, 3; 922load4: lbui r5, r4, 3;
971 sbi r5, r6, 3; 923 sbi r5, r6, 3;
972 brid ex_lw_tail_vm; 924 brid ex_lw_tail_vm;
973/* Get the destination register value into r3 - delay slot */ 925/* Get the destination register value into r3 - delay slot */
@@ -977,7 +929,7 @@ ex_lhw_vm:
977 * save it in tmp space */ 929 * save it in tmp space */
978 la r6, r0, ex_tmp_data_loc_0; 930 la r6, r0, ex_tmp_data_loc_0;
979 sbi r5, r6, 0; 931 sbi r5, r6, 0;
980 lbui r5, r4, 1; 932load5: lbui r5, r4, 1;
981 sbi r5, r6, 1; 933 sbi r5, r6, 1;
982 lhui r3, r6, 0; /* Get the destination register value into r3 */ 934 lhui r3, r6, 0; /* Get the destination register value into r3 */
983ex_lw_tail_vm: 935ex_lw_tail_vm:
@@ -996,22 +948,53 @@ ex_sw_tail_vm:
996 swi r3, r5, 0; /* Get the word - delay slot */ 948 swi r3, r5, 0; /* Get the word - delay slot */
997 /* Store the word, byte-by-byte into destination address */ 949 /* Store the word, byte-by-byte into destination address */
998 lbui r3, r5, 0; 950 lbui r3, r5, 0;
999 sbi r3, r4, 0; 951store1: sbi r3, r4, 0;
1000 lbui r3, r5, 1; 952 lbui r3, r5, 1;
1001 sbi r3, r4, 1; 953store2: sbi r3, r4, 1;
1002 lbui r3, r5, 2; 954 lbui r3, r5, 2;
1003 sbi r3, r4, 2; 955store3: sbi r3, r4, 2;
1004 lbui r3, r5, 3; 956 lbui r3, r5, 3;
1005 brid ret_from_exc; 957 brid ret_from_exc;
1006 sbi r3, r4, 3; /* Delay slot */ 958store4: sbi r3, r4, 3; /* Delay slot */
1007ex_shw_vm: 959ex_shw_vm:
1008 /* Store the lower half-word, byte-by-byte into destination address */ 960 /* Store the lower half-word, byte-by-byte into destination address */
1009 lbui r3, r5, 2; 961 lbui r3, r5, 2;
1010 sbi r3, r4, 0; 962store5: sbi r3, r4, 0;
1011 lbui r3, r5, 3; 963 lbui r3, r5, 3;
1012 brid ret_from_exc; 964 brid ret_from_exc;
1013 sbi r3, r4, 1; /* Delay slot */ 965store6: sbi r3, r4, 1; /* Delay slot */
1014ex_sw_end_vm: /* Exception handling of store word, ends. */ 966ex_sw_end_vm: /* Exception handling of store word, ends. */
967
968/* We have to prevent cases that get/put_user macros get unaligned pointer
969 * to bad page area. We have to find out which origin instruction caused it
970 * and called fixup for that origin instruction not instruction in unaligned
971 * handler */
972ex_unaligned_fixup:
973 ori r5, r7, 0 /* setup pointer to pt_regs */
974 lwi r6, r7, PT_PC; /* faulting address is one instruction above */
975 addik r6, r6, -4 /* for finding proper fixup */
976 swi r6, r7, PT_PC; /* a save back it to PT_PC */
977 addik r7, r0, SIGSEGV
978 /* call bad_page_fault for finding aligned fixup, fixup address is saved
979 * in PT_PC which is used as return address from exception */
980 la r15, r0, ret_from_exc-8 /* setup return address */
981 brid bad_page_fault
982 nop
983
984/* We prevent all load/store because it could failed any attempt to access */
985.section __ex_table,"a";
986 .word load1,ex_unaligned_fixup;
987 .word load2,ex_unaligned_fixup;
988 .word load3,ex_unaligned_fixup;
989 .word load4,ex_unaligned_fixup;
990 .word load5,ex_unaligned_fixup;
991 .word store1,ex_unaligned_fixup;
992 .word store2,ex_unaligned_fixup;
993 .word store3,ex_unaligned_fixup;
994 .word store4,ex_unaligned_fixup;
995 .word store5,ex_unaligned_fixup;
996 .word store6,ex_unaligned_fixup;
997.previous;
1015.end _unaligned_data_exception 998.end _unaligned_data_exception
1016#endif /* CONFIG_MMU */ 999#endif /* CONFIG_MMU */
1017 1000
diff --git a/arch/microblaze/kernel/module.c b/arch/microblaze/kernel/module.c
index 51414171326..5a45b1adfef 100644
--- a/arch/microblaze/kernel/module.c
+++ b/arch/microblaze/kernel/module.c
@@ -57,7 +57,6 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
57 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; 57 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr;
58 Elf32_Sym *sym; 58 Elf32_Sym *sym;
59 unsigned long int *location; 59 unsigned long int *location;
60 unsigned long int locoffs;
61 unsigned long int value; 60 unsigned long int value;
62#if __GNUC__ < 4 61#if __GNUC__ < 4
63 unsigned long int old_value; 62 unsigned long int old_value;
@@ -113,10 +112,12 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
113 break; 112 break;
114 113
115 case R_MICROBLAZE_64_PCREL: 114 case R_MICROBLAZE_64_PCREL:
116 locoffs = (location[0] & 0xFFFF) << 16 | 115#if __GNUC__ < 4
116 old_value = (location[0] & 0xFFFF) << 16 |
117 (location[1] & 0xFFFF); 117 (location[1] & 0xFFFF);
118 value -= (unsigned long int)(location) + 4 + 118 value -= old_value;
119 locoffs; 119#endif
120 value -= (unsigned long int)(location) + 4;
120 location[0] = (location[0] & 0xFFFF0000) | 121 location[0] = (location[0] & 0xFFFF0000) |
121 (value >> 16); 122 (value >> 16);
122 location[1] = (location[1] & 0xFFFF0000) | 123 location[1] = (location[1] & 0xFFFF0000) |
@@ -125,6 +126,14 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
125 value); 126 value);
126 break; 127 break;
127 128
129 case R_MICROBLAZE_32_PCREL_LO:
130 pr_debug("R_MICROBLAZE_32_PCREL_LO\n");
131 break;
132
133 case R_MICROBLAZE_64_NONE:
134 pr_debug("R_MICROBLAZE_NONE\n");
135 break;
136
128 case R_MICROBLAZE_NONE: 137 case R_MICROBLAZE_NONE:
129 pr_debug("R_MICROBLAZE_NONE\n"); 138 pr_debug("R_MICROBLAZE_NONE\n");
130 break; 139 break;
@@ -133,7 +142,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
133 printk(KERN_ERR "module %s: " 142 printk(KERN_ERR "module %s: "
134 "Unknown relocation: %u\n", 143 "Unknown relocation: %u\n",
135 module->name, 144 module->name,
136 ELF32_R_TYPE(rela->r_info)); 145 ELF32_R_TYPE(rela[i].r_info));
137 return -ENOEXEC; 146 return -ENOEXEC;
138 } 147 }
139 } 148 }
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c
index 8709bea0960..2a97bf513b6 100644
--- a/arch/microblaze/kernel/setup.c
+++ b/arch/microblaze/kernel/setup.c
@@ -138,8 +138,12 @@ void __init machine_early_init(const char *cmdline, unsigned int ram,
138 setup_early_printk(NULL); 138 setup_early_printk(NULL);
139#endif 139#endif
140 140
141 early_printk("Ramdisk addr 0x%08x, FDT 0x%08x\n", ram, fdt); 141 early_printk("Ramdisk addr 0x%08x, ", ram);
142 printk(KERN_NOTICE "Found FDT at 0x%08x\n", fdt); 142 if (fdt)
143 early_printk("FDT at 0x%08x\n", fdt);
144 else
145 early_printk("Compiled-in FDT at 0x%08x\n",
146 (unsigned int)_fdt_start);
143 147
144#ifdef CONFIG_MTD_UCLINUX 148#ifdef CONFIG_MTD_UCLINUX
145 early_printk("Found romfs @ 0x%08x (0x%08x)\n", 149 early_printk("Found romfs @ 0x%08x (0x%08x)\n",
diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c
index e000bce09b2..b96f1682bb2 100644
--- a/arch/microblaze/kernel/sys_microblaze.c
+++ b/arch/microblaze/kernel/sys_microblaze.c
@@ -33,105 +33,6 @@
33#include <linux/unistd.h> 33#include <linux/unistd.h>
34 34
35#include <asm/syscalls.h> 35#include <asm/syscalls.h>
36/*
37 * sys_ipc() is the de-multiplexer for the SysV IPC calls..
38 *
39 * This is really horribly ugly. This will be remove with new toolchain.
40 */
41asmlinkage long
42sys_ipc(uint call, int first, int second, int third, void *ptr, long fifth)
43{
44 int version, ret;
45
46 version = call >> 16; /* hack for backward compatibility */
47 call &= 0xffff;
48
49 ret = -EINVAL;
50 switch (call) {
51 case SEMOP:
52 ret = sys_semop(first, (struct sembuf *)ptr, second);
53 break;
54 case SEMGET:
55 ret = sys_semget(first, second, third);
56 break;
57 case SEMCTL:
58 {
59 union semun fourth;
60
61 if (!ptr)
62 break;
63 ret = (access_ok(VERIFY_READ, ptr, sizeof(long)) ? 0 : -EFAULT)
64 || (get_user(fourth.__pad, (void **)ptr)) ;
65 if (ret)
66 break;
67 ret = sys_semctl(first, second, third, fourth);
68 break;
69 }
70 case MSGSND:
71 ret = sys_msgsnd(first, (struct msgbuf *) ptr, second, third);
72 break;
73 case MSGRCV:
74 switch (version) {
75 case 0: {
76 struct ipc_kludge tmp;
77
78 if (!ptr)
79 break;
80 ret = (access_ok(VERIFY_READ, ptr, sizeof(tmp))
81 ? 0 : -EFAULT) || copy_from_user(&tmp,
82 (struct ipc_kludge *) ptr, sizeof(tmp));
83 if (ret)
84 break;
85 ret = sys_msgrcv(first, tmp.msgp, second, tmp.msgtyp,
86 third);
87 break;
88 }
89 default:
90 ret = sys_msgrcv(first, (struct msgbuf *) ptr,
91 second, fifth, third);
92 break;
93 }
94 break;
95 case MSGGET:
96 ret = sys_msgget((key_t) first, second);
97 break;
98 case MSGCTL:
99 ret = sys_msgctl(first, second, (struct msqid_ds *) ptr);
100 break;
101 case SHMAT:
102 switch (version) {
103 default: {
104 ulong raddr;
105 ret = access_ok(VERIFY_WRITE, (ulong *) third,
106 sizeof(ulong)) ? 0 : -EFAULT;
107 if (ret)
108 break;
109 ret = do_shmat(first, (char *) ptr, second, &raddr);
110 if (ret)
111 break;
112 ret = put_user(raddr, (ulong *) third);
113 break;
114 }
115 case 1: /* iBCS2 emulator entry point */
116 if (!segment_eq(get_fs(), get_ds()))
117 break;
118 ret = do_shmat(first, (char *) ptr, second,
119 (ulong *) third);
120 break;
121 }
122 break;
123 case SHMDT:
124 ret = sys_shmdt((char *)ptr);
125 break;
126 case SHMGET:
127 ret = sys_shmget(first, second, third);
128 break;
129 case SHMCTL:
130 ret = sys_shmctl(first, second, (struct shmid_ds *) ptr);
131 break;
132 }
133 return ret;
134}
135 36
136asmlinkage long microblaze_vfork(struct pt_regs *regs) 37asmlinkage long microblaze_vfork(struct pt_regs *regs)
137{ 38{
diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S
index 31b32a6c5f4..216db817beb 100644
--- a/arch/microblaze/kernel/syscall_table.S
+++ b/arch/microblaze/kernel/syscall_table.S
@@ -121,7 +121,7 @@ ENTRY(sys_call_table)
121 .long sys_wait4 121 .long sys_wait4
122 .long sys_swapoff /* 115 */ 122 .long sys_swapoff /* 115 */
123 .long sys_sysinfo 123 .long sys_sysinfo
124 .long sys_ipc 124 .long sys_ni_syscall /* old sys_ipc */
125 .long sys_fsync 125 .long sys_fsync
126 .long sys_ni_syscall /* sys_sigreturn_wrapper */ 126 .long sys_ni_syscall /* sys_sigreturn_wrapper */
127 .long sys_clone /* 120 */ 127 .long sys_clone /* 120 */
diff --git a/arch/microblaze/mm/fault.c b/arch/microblaze/mm/fault.c
index 956607a63f4..d9d249a66ff 100644
--- a/arch/microblaze/mm/fault.c
+++ b/arch/microblaze/mm/fault.c
@@ -69,7 +69,7 @@ static int store_updates_sp(struct pt_regs *regs)
69 * It is called from do_page_fault above and from some of the procedures 69 * It is called from do_page_fault above and from some of the procedures
70 * in traps.c. 70 * in traps.c.
71 */ 71 */
72static void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig) 72void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig)
73{ 73{
74 const struct exception_table_entry *fixup; 74 const struct exception_table_entry *fixup;
75/* MS: no context */ 75/* MS: no context */
@@ -122,15 +122,10 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
122 } 122 }
123#endif /* CONFIG_KGDB */ 123#endif /* CONFIG_KGDB */
124 124
125 if (in_atomic() || mm == NULL) { 125 if (in_atomic() || !mm) {
126 /* FIXME */ 126 if (kernel_mode(regs))
127 if (kernel_mode(regs)) { 127 goto bad_area_nosemaphore;
128 printk(KERN_EMERG 128
129 "Page fault in kernel mode - Oooou!!! pid %d\n",
130 current->pid);
131 _exception(SIGSEGV, regs, code, address);
132 return;
133 }
134 /* in_atomic() in user mode is really bad, 129 /* in_atomic() in user mode is really bad,
135 as is current->mm == NULL. */ 130 as is current->mm == NULL. */
136 printk(KERN_EMERG "Page fault in user mode with " 131 printk(KERN_EMERG "Page fault in user mode with "
diff --git a/arch/mips/alchemy/mtx-1/platform.c b/arch/mips/alchemy/mtx-1/platform.c
index 8b5914d1241..e30e42add69 100644
--- a/arch/mips/alchemy/mtx-1/platform.c
+++ b/arch/mips/alchemy/mtx-1/platform.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * MTX-1 platform devices registration 2 * MTX-1 platform devices registration
3 * 3 *
4 * Copyright (C) 2007, Florian Fainelli <florian@openwrt.org> 4 * Copyright (C) 2007-2009, Florian Fainelli <florian@openwrt.org>
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
@@ -142,7 +142,17 @@ static struct __initdata platform_device * mtx1_devs[] = {
142 142
143static int __init mtx1_register_devices(void) 143static int __init mtx1_register_devices(void)
144{ 144{
145 gpio_direction_input(207); 145 int rc;
146
147 rc = gpio_request(mtx1_gpio_button[0].gpio,
148 mtx1_gpio_button[0].desc);
149 if (rc < 0) {
150 printk(KERN_INFO "mtx1: failed to request %d\n",
151 mtx1_gpio_button[0].gpio);
152 goto out;
153 }
154 gpio_direction_input(mtx1_gpio_button[0].gpio);
155out:
146 return platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs)); 156 return platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs));
147} 157}
148 158
diff --git a/arch/mips/ar7/Makefile b/arch/mips/ar7/Makefile
index 7435e44b396..26bc5da1899 100644
--- a/arch/mips/ar7/Makefile
+++ b/arch/mips/ar7/Makefile
@@ -8,3 +8,4 @@ obj-y := \
8 platform.o \ 8 platform.o \
9 gpio.o \ 9 gpio.o \
10 clock.o 10 clock.o
11EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/ar7/clock.c b/arch/mips/ar7/clock.c
index 27dc6663f2f..cc65c8eb391 100644
--- a/arch/mips/ar7/clock.c
+++ b/arch/mips/ar7/clock.c
@@ -264,19 +264,6 @@ static void __init tnetd7300_init_clocks(void)
264 iounmap(bootcr); 264 iounmap(bootcr);
265} 265}
266 266
267static int tnetd7200_get_clock(int base, struct tnetd7200_clock *clock,
268 u32 *bootcr, u32 bus_clock)
269{
270 int divisor = ((readl(&clock->prediv) & 0x1f) + 1) *
271 ((readl(&clock->postdiv) & 0x1f) + 1);
272
273 if (*bootcr & BOOT_PLL_BYPASS)
274 return base / divisor;
275
276 return base * ((readl(&clock->mul) & 0xf) + 1) / divisor;
277}
278
279
280static void tnetd7200_set_clock(int base, struct tnetd7200_clock *clock, 267static void tnetd7200_set_clock(int base, struct tnetd7200_clock *clock,
281 int prediv, int postdiv, int postdiv2, int mul, u32 frequency) 268 int prediv, int postdiv, int postdiv2, int mul, u32 frequency)
282{ 269{
diff --git a/arch/mips/ar7/memory.c b/arch/mips/ar7/memory.c
index 46fed44825a..696c723dc6d 100644
--- a/arch/mips/ar7/memory.c
+++ b/arch/mips/ar7/memory.c
@@ -52,7 +52,7 @@ static int __init memsize(void)
52 size <<= 1; 52 size <<= 1;
53 } while (size < (64 << 20)); 53 } while (size < (64 << 20));
54 54
55 writel(tmpaddr, &addr); 55 writel((u32)tmpaddr, &addr);
56 56
57 return size; 57 return size;
58} 58}
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c
index 54224496178..2ecab615593 100644
--- a/arch/mips/ar7/platform.c
+++ b/arch/mips/ar7/platform.c
@@ -28,7 +28,6 @@
28#include <linux/serial_8250.h> 28#include <linux/serial_8250.h>
29#include <linux/ioport.h> 29#include <linux/ioport.h>
30#include <linux/io.h> 30#include <linux/io.h>
31#include <linux/version.h>
32#include <linux/vlynq.h> 31#include <linux/vlynq.h>
33#include <linux/leds.h> 32#include <linux/leds.h>
34#include <linux/string.h> 33#include <linux/string.h>
@@ -243,13 +242,13 @@ static struct platform_device physmap_flash = {
243 .num_resources = 1, 242 .num_resources = 1,
244}; 243};
245 244
246static u64 cpmac_dma_mask = DMA_32BIT_MASK; 245static u64 cpmac_dma_mask = DMA_BIT_MASK(32);
247static struct platform_device cpmac_low = { 246static struct platform_device cpmac_low = {
248 .id = 0, 247 .id = 0,
249 .name = "cpmac", 248 .name = "cpmac",
250 .dev = { 249 .dev = {
251 .dma_mask = &cpmac_dma_mask, 250 .dma_mask = &cpmac_dma_mask,
252 .coherent_dma_mask = DMA_32BIT_MASK, 251 .coherent_dma_mask = DMA_BIT_MASK(32),
253 .platform_data = &cpmac_low_data, 252 .platform_data = &cpmac_low_data,
254 }, 253 },
255 .resource = cpmac_low_res, 254 .resource = cpmac_low_res,
@@ -261,7 +260,7 @@ static struct platform_device cpmac_high = {
261 .name = "cpmac", 260 .name = "cpmac",
262 .dev = { 261 .dev = {
263 .dma_mask = &cpmac_dma_mask, 262 .dma_mask = &cpmac_dma_mask,
264 .coherent_dma_mask = DMA_32BIT_MASK, 263 .coherent_dma_mask = DMA_BIT_MASK(32),
265 .platform_data = &cpmac_high_data, 264 .platform_data = &cpmac_high_data,
266 }, 265 },
267 .resource = cpmac_high_res, 266 .resource = cpmac_high_res,
@@ -481,6 +480,7 @@ static void __init detect_leds(void)
481static int __init ar7_register_devices(void) 480static int __init ar7_register_devices(void)
482{ 481{
483 int res; 482 int res;
483#ifdef CONFIG_SERIAL_8250
484 static struct uart_port uart_port[2]; 484 static struct uart_port uart_port[2];
485 485
486 memset(uart_port, 0, sizeof(struct uart_port) * 2); 486 memset(uart_port, 0, sizeof(struct uart_port) * 2);
@@ -512,7 +512,7 @@ static int __init ar7_register_devices(void)
512 if (res) 512 if (res)
513 return res; 513 return res;
514 } 514 }
515 515#endif /* CONFIG_SERIAL_8250 */
516 res = platform_device_register(&physmap_flash); 516 res = platform_device_register(&physmap_flash);
517 if (res) 517 if (res)
518 return res; 518 return res;
diff --git a/arch/mips/ar7/prom.c b/arch/mips/ar7/prom.c
index a320bceb2f9..5ad6f1db656 100644
--- a/arch/mips/ar7/prom.c
+++ b/arch/mips/ar7/prom.c
@@ -144,7 +144,7 @@ static char * __init lookup_psp_var_map(u8 num)
144{ 144{
145 int i; 145 int i;
146 146
147 for (i = 0; i < sizeof(psp_var_map); i++) 147 for (i = 0; i < ARRAY_SIZE(psp_var_map); i++)
148 if (psp_var_map[i].num == num) 148 if (psp_var_map[i].num == num)
149 return psp_var_map[i].value; 149 return psp_var_map[i].value;
150 150
diff --git a/arch/mips/ar7/setup.c b/arch/mips/ar7/setup.c
index 6ebb5f16d96..39f6b5b9646 100644
--- a/arch/mips/ar7/setup.c
+++ b/arch/mips/ar7/setup.c
@@ -15,7 +15,6 @@
15 * with this program; if not, write to the Free Software Foundation, Inc., 15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. 16 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
17 */ 17 */
18#include <linux/version.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/ioport.h> 19#include <linux/ioport.h>
21#include <linux/pm.h> 20#include <linux/pm.h>
diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c
index 0b891a9c625..32d51a31dc4 100644
--- a/arch/mips/cavium-octeon/smp.c
+++ b/arch/mips/cavium-octeon/smp.c
@@ -194,11 +194,11 @@ static void octeon_init_secondary(void)
194void octeon_prepare_cpus(unsigned int max_cpus) 194void octeon_prepare_cpus(unsigned int max_cpus)
195{ 195{
196 cvmx_write_csr(CVMX_CIU_MBOX_CLRX(cvmx_get_core_num()), 0xffffffff); 196 cvmx_write_csr(CVMX_CIU_MBOX_CLRX(cvmx_get_core_num()), 0xffffffff);
197 if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt, IRQF_SHARED, 197 if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt, IRQF_DISABLED,
198 "mailbox0", mailbox_interrupt)) { 198 "mailbox0", mailbox_interrupt)) {
199 panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n"); 199 panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n");
200 } 200 }
201 if (request_irq(OCTEON_IRQ_MBOX1, mailbox_interrupt, IRQF_SHARED, 201 if (request_irq(OCTEON_IRQ_MBOX1, mailbox_interrupt, IRQF_DISABLED,
202 "mailbox1", mailbox_interrupt)) { 202 "mailbox1", mailbox_interrupt)) {
203 panic("Cannot request_irq(OCTEON_IRQ_MBOX1)\n"); 203 panic("Cannot request_irq(OCTEON_IRQ_MBOX1)\n");
204 } 204 }
diff --git a/arch/mips/dec/ecc-berr.c b/arch/mips/dec/ecc-berr.c
index 6a17c9b508e..7abce661b90 100644
--- a/arch/mips/dec/ecc-berr.c
+++ b/arch/mips/dec/ecc-berr.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/mips/dec/ecc-berr.c
3 *
4 * Bus error event handling code for systems equipped with ECC 2 * Bus error event handling code for systems equipped with ECC
5 * handling logic, i.e. DECstation/DECsystem 5000/200 (KN02), 3 * handling logic, i.e. DECstation/DECsystem 5000/200 (KN02),
6 * 5000/240 (KN03), 5000/260 (KN05) and DECsystem 5900 (KN03), 4 * 5000/240 (KN03), 5000/260 (KN05) and DECsystem 5900 (KN03),
diff --git a/arch/mips/dec/int-handler.S b/arch/mips/dec/int-handler.S
index 00cecdcc75f..82c85281878 100644
--- a/arch/mips/dec/int-handler.S
+++ b/arch/mips/dec/int-handler.S
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/mips/dec/int-handler.S
3 *
4 * Copyright (C) 1995, 1996, 1997 Paul M. Antoine and Harald Koerfgen 2 * Copyright (C) 1995, 1996, 1997 Paul M. Antoine and Harald Koerfgen
5 * Copyright (C) 2000, 2001, 2002, 2003, 2005 Maciej W. Rozycki 3 * Copyright (C) 2000, 2001, 2002, 2003, 2005 Maciej W. Rozycki
6 * 4 *
diff --git a/arch/mips/dec/ioasic-irq.c b/arch/mips/dec/ioasic-irq.c
index 3acb133668d..cb41954fc32 100644
--- a/arch/mips/dec/ioasic-irq.c
+++ b/arch/mips/dec/ioasic-irq.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/mips/dec/ioasic-irq.c
3 *
4 * DEC I/O ASIC interrupts. 2 * DEC I/O ASIC interrupts.
5 * 3 *
6 * Copyright (c) 2002, 2003 Maciej W. Rozycki 4 * Copyright (c) 2002, 2003 Maciej W. Rozycki
diff --git a/arch/mips/dec/kn01-berr.c b/arch/mips/dec/kn01-berr.c
index d3b8002bf1e..b0dc6d53edd 100644
--- a/arch/mips/dec/kn01-berr.c
+++ b/arch/mips/dec/kn01-berr.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/mips/dec/kn01-berr.c
3 *
4 * Bus error event handling code for DECstation/DECsystem 3100 2 * Bus error event handling code for DECstation/DECsystem 3100
5 * and 2100 (KN01) systems equipped with parity error detection 3 * and 2100 (KN01) systems equipped with parity error detection
6 * logic. 4 * logic.
diff --git a/arch/mips/dec/kn02-irq.c b/arch/mips/dec/kn02-irq.c
index 02439dc0ba8..ed90a8deabc 100644
--- a/arch/mips/dec/kn02-irq.c
+++ b/arch/mips/dec/kn02-irq.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/mips/dec/kn02-irq.c
3 *
4 * DECstation 5000/200 (KN02) Control and Status Register 2 * DECstation 5000/200 (KN02) Control and Status Register
5 * interrupts. 3 * interrupts.
6 * 4 *
diff --git a/arch/mips/dec/kn02xa-berr.c b/arch/mips/dec/kn02xa-berr.c
index 5f04545c360..07ca5405d48 100644
--- a/arch/mips/dec/kn02xa-berr.c
+++ b/arch/mips/dec/kn02xa-berr.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/mips/dec/kn02xa-berr.c
3 *
4 * Bus error event handling code for 5000-series systems equipped 2 * Bus error event handling code for 5000-series systems equipped
5 * with parity error detection logic, i.e. DECstation/DECsystem 3 * with parity error detection logic, i.e. DECstation/DECsystem
6 * 5000/120, /125, /133 (KN02-BA), 5000/150 (KN04-BA) and Personal 4 * 5000/120, /125, /133 (KN02-BA), 5000/150 (KN04-BA) and Personal
diff --git a/arch/mips/dec/prom/call_o32.S b/arch/mips/dec/prom/call_o32.S
index e523454bda3..8c8498159e4 100644
--- a/arch/mips/dec/prom/call_o32.S
+++ b/arch/mips/dec/prom/call_o32.S
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/mips/dec/prom/call_o32.S
3 *
4 * O32 interface for the 64 (or N32) ABI. 2 * O32 interface for the 64 (or N32) ABI.
5 * 3 *
6 * Copyright (C) 2002 Maciej W. Rozycki 4 * Copyright (C) 2002 Maciej W. Rozycki
diff --git a/arch/mips/dec/prom/console.c b/arch/mips/dec/prom/console.c
index 078e1a12421..caa6e047caf 100644
--- a/arch/mips/dec/prom/console.c
+++ b/arch/mips/dec/prom/console.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/mips/dec/prom/console.c
3 *
4 * DECstation PROM-based early console support. 2 * DECstation PROM-based early console support.
5 * 3 *
6 * Copyright (C) 2004, 2007 Maciej W. Rozycki 4 * Copyright (C) 2004, 2007 Maciej W. Rozycki
diff --git a/arch/mips/dec/time.c b/arch/mips/dec/time.c
index 1359c03ded5..463136e6685 100644
--- a/arch/mips/dec/time.c
+++ b/arch/mips/dec/time.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/mips/dec/time.c
3 *
4 * Copyright (C) 1991, 1992, 1995 Linus Torvalds 2 * Copyright (C) 1991, 1992, 1995 Linus Torvalds
5 * Copyright (C) 2000, 2003 Maciej W. Rozycki 3 * Copyright (C) 2000, 2003 Maciej W. Rozycki
6 * 4 *
diff --git a/arch/mips/emma/common/Makefile b/arch/mips/emma/common/Makefile
index c392d28c1ef..f27d84d1904 100644
--- a/arch/mips/emma/common/Makefile
+++ b/arch/mips/emma/common/Makefile
@@ -1,7 +1,4 @@
1# 1#
2# arch/mips/emma2rh/common/Makefile
3# Makefile for the common code of NEC EMMA2RH based board.
4#
5# Copyright (C) NEC Electronics Corporation 2005-2006 2# Copyright (C) NEC Electronics Corporation 2005-2006
6# 3#
7# This program is free software; you can redistribute it and/or modify 4# This program is free software; you can redistribute it and/or modify
diff --git a/arch/mips/emma/common/prom.c b/arch/mips/emma/common/prom.c
index 120f53fbdb4..708f0876140 100644
--- a/arch/mips/emma/common/prom.c
+++ b/arch/mips/emma/common/prom.c
@@ -1,7 +1,4 @@
1/* 1/*
2 * arch/mips/emma2rh/common/prom.c
3 * This file is prom file.
4 *
5 * Copyright (C) NEC Electronics Corporation 2004-2006 2 * Copyright (C) NEC Electronics Corporation 2004-2006
6 * 3 *
7 * This file is based on the arch/mips/ddb5xxx/common/prom.c 4 * This file is based on the arch/mips/ddb5xxx/common/prom.c
diff --git a/arch/mips/emma/markeins/Makefile b/arch/mips/emma/markeins/Makefile
index 16e0017ba91..f8ba2508fa2 100644
--- a/arch/mips/emma/markeins/Makefile
+++ b/arch/mips/emma/markeins/Makefile
@@ -1,7 +1,4 @@
1# 1#
2# arch/mips/emma2rh/markeins/Makefile
3# Makefile for the common code of NEC EMMA2RH based board.
4#
5# Copyright (C) NEC Electronics Corporation 2005-2006 2# Copyright (C) NEC Electronics Corporation 2005-2006
6# 3#
7# This program is free software; you can redistribute it and/or modify 4# This program is free software; you can redistribute it and/or modify
diff --git a/arch/mips/emma/markeins/irq.c b/arch/mips/emma/markeins/irq.c
index 43828ae796e..9504b7ee0b7 100644
--- a/arch/mips/emma/markeins/irq.c
+++ b/arch/mips/emma/markeins/irq.c
@@ -1,7 +1,4 @@
1/* 1/*
2 * arch/mips/emma2rh/markeins/irq.c
3 * This file defines the irq handler for EMMA2RH.
4 *
5 * Copyright (C) NEC Electronics Corporation 2004-2006 2 * Copyright (C) NEC Electronics Corporation 2004-2006
6 * 3 *
7 * This file is based on the arch/mips/ddb5xxx/ddb5477/irq.c 4 * This file is based on the arch/mips/ddb5xxx/ddb5477/irq.c
diff --git a/arch/mips/emma/markeins/led.c b/arch/mips/emma/markeins/led.c
index 377a181b656..49755896857 100644
--- a/arch/mips/emma/markeins/led.c
+++ b/arch/mips/emma/markeins/led.c
@@ -1,7 +1,4 @@
1/* 1/*
2 * arch/mips/emma2rh/markeins/led.c
3 * This file defines the led display for Mark-eins.
4 *
5 * Copyright (C) NEC Electronics Corporation 2004-2006 2 * Copyright (C) NEC Electronics Corporation 2004-2006
6 * 3 *
7 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
diff --git a/arch/mips/emma/markeins/platform.c b/arch/mips/emma/markeins/platform.c
index 80ae12ef87d..b05b08b92a3 100644
--- a/arch/mips/emma/markeins/platform.c
+++ b/arch/mips/emma/markeins/platform.c
@@ -1,7 +1,4 @@
1/* 1/*
2 * arch/mips/emma2rh/markeins/platofrm.c
3 * This file sets up platform devices for EMMA2RH Mark-eins.
4 *
5 * Copyright(C) MontaVista Software Inc, 2006 2 * Copyright(C) MontaVista Software Inc, 2006
6 * 3 *
7 * Author: dmitry pervushin <dpervushin@ru.mvista.com> 4 * Author: dmitry pervushin <dpervushin@ru.mvista.com>
diff --git a/arch/mips/emma/markeins/setup.c b/arch/mips/emma/markeins/setup.c
index 67f45650008..335dc8c1a1b 100644
--- a/arch/mips/emma/markeins/setup.c
+++ b/arch/mips/emma/markeins/setup.c
@@ -1,7 +1,4 @@
1/* 1/*
2 * arch/mips/emma2rh/markeins/setup.c
3 * This file is setup for EMMA2RH Mark-eins.
4 *
5 * Copyright (C) NEC Electronics Corporation 2004-2006 2 * Copyright (C) NEC Electronics Corporation 2004-2006
6 * 3 *
7 * This file is based on the arch/mips/ddb5xxx/ddb5477/setup.c. 4 * This file is based on the arch/mips/ddb5xxx/ddb5477/setup.c.
diff --git a/arch/mips/fw/lib/call_o32.S b/arch/mips/fw/lib/call_o32.S
index bdf7d1d4081..e0a68713b3c 100644
--- a/arch/mips/fw/lib/call_o32.S
+++ b/arch/mips/fw/lib/call_o32.S
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/mips/dec/prom/call_o32.S
3 *
4 * O32 interface for the 64 (or N32) ABI. 2 * O32 interface for the 64 (or N32) ABI.
5 * 3 *
6 * Copyright (C) 2002 Maciej W. Rozycki 4 * Copyright (C) 2002 Maciej W. Rozycki
diff --git a/arch/mips/include/asm/emma/emma2rh.h b/arch/mips/include/asm/emma/emma2rh.h
index 30aea91de62..2afb2fe11b3 100644
--- a/arch/mips/include/asm/emma/emma2rh.h
+++ b/arch/mips/include/asm/emma/emma2rh.h
@@ -1,7 +1,4 @@
1/* 1/*
2 * arch/mips/include/asm/emma/emma2rh.h
3 * This file is EMMA2RH common header.
4 *
5 * Copyright (C) NEC Electronics Corporation 2005-2006 2 * Copyright (C) NEC Electronics Corporation 2005-2006
6 * 3 *
7 * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h 4 * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h
diff --git a/arch/mips/include/asm/emma/markeins.h b/arch/mips/include/asm/emma/markeins.h
index 973b0628490..2618bf23024 100644
--- a/arch/mips/include/asm/emma/markeins.h
+++ b/arch/mips/include/asm/emma/markeins.h
@@ -1,7 +1,4 @@
1/* 1/*
2 * include/asm-mips/emma2rh/markeins.h
3 * This file is EMMA2RH board depended header.
4 *
5 * Copyright (C) NEC Electronics Corporation 2005-2006 2 * Copyright (C) NEC Electronics Corporation 2005-2006
6 * 3 *
7 * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h 4 * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h
diff --git a/arch/mips/include/asm/gic.h b/arch/mips/include/asm/gic.h
index 10292e37c1f..a8f57341f12 100644
--- a/arch/mips/include/asm/gic.h
+++ b/arch/mips/include/asm/gic.h
@@ -20,7 +20,7 @@
20#define GIC_TRIG_EDGE 1 20#define GIC_TRIG_EDGE 1
21#define GIC_TRIG_LEVEL 0 21#define GIC_TRIG_LEVEL 0
22 22
23#if CONFIG_SMP 23#ifdef CONFIG_SMP
24#define GIC_NUM_INTRS (24 + NR_CPUS * 2) 24#define GIC_NUM_INTRS (24 + NR_CPUS * 2)
25#else 25#else
26#define GIC_NUM_INTRS 32 26#define GIC_NUM_INTRS 32
diff --git a/arch/mips/include/asm/pgalloc.h b/arch/mips/include/asm/pgalloc.h
index 1275831dda2..3738f4b48cb 100644
--- a/arch/mips/include/asm/pgalloc.h
+++ b/arch/mips/include/asm/pgalloc.h
@@ -98,23 +98,12 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
98 __free_pages(pte, PTE_ORDER); 98 __free_pages(pte, PTE_ORDER);
99} 99}
100 100
101#define __pte_free_tlb(tlb,pte) \ 101#define __pte_free_tlb(tlb,pte,address) \
102do { \ 102do { \
103 pgtable_page_dtor(pte); \ 103 pgtable_page_dtor(pte); \
104 tlb_remove_page((tlb), pte); \ 104 tlb_remove_page((tlb), pte); \
105} while (0) 105} while (0)
106 106
107#ifdef CONFIG_32BIT
108
109/*
110 * allocating and freeing a pmd is trivial: the 1-entry pmd is
111 * inside the pgd, so has no extra memory associated with it.
112 */
113#define pmd_free(mm, x) do { } while (0)
114#define __pmd_free_tlb(tlb, x) do { } while (0)
115
116#endif
117
118#ifdef CONFIG_64BIT 107#ifdef CONFIG_64BIT
119 108
120static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) 109static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
@@ -132,7 +121,7 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
132 free_pages((unsigned long)pmd, PMD_ORDER); 121 free_pages((unsigned long)pmd, PMD_ORDER);
133} 122}
134 123
135#define __pmd_free_tlb(tlb, x) pmd_free((tlb)->mm, x) 124#define __pmd_free_tlb(tlb, x, addr) pmd_free((tlb)->mm, x)
136 125
137#endif 126#endif
138 127
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/war.h b/arch/mips/include/asm/pmc-sierra/msp71xx/war.h
index 0bf48fc1892..9e2ee429c52 100644
--- a/arch/mips/include/asm/pmc-sierra/msp71xx/war.h
+++ b/arch/mips/include/asm/pmc-sierra/msp71xx/war.h
@@ -23,6 +23,8 @@
23#if defined(CONFIG_PMC_MSP7120_EVAL) || defined(CONFIG_PMC_MSP7120_GW) || \ 23#if defined(CONFIG_PMC_MSP7120_EVAL) || defined(CONFIG_PMC_MSP7120_GW) || \
24 defined(CONFIG_PMC_MSP7120_FPGA) 24 defined(CONFIG_PMC_MSP7120_FPGA)
25#define MIPS34K_MISSED_ITLB_WAR 1 25#define MIPS34K_MISSED_ITLB_WAR 1
26#else
27#define MIPS34K_MISSED_ITLB_WAR 0
26#endif 28#endif
27 29
28#endif /* __ASM_MIPS_PMC_SIERRA_WAR_H */ 30#endif /* __ASM_MIPS_PMC_SIERRA_WAR_H */
diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h
index 0f926aa0cb4..087a8884ef0 100644
--- a/arch/mips/include/asm/processor.h
+++ b/arch/mips/include/asm/processor.h
@@ -311,8 +311,9 @@ extern void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long
311 311
312unsigned long get_wchan(struct task_struct *p); 312unsigned long get_wchan(struct task_struct *p);
313 313
314#define __KSTK_TOS(tsk) ((unsigned long)task_stack_page(tsk) + THREAD_SIZE - 32) 314#define __KSTK_TOS(tsk) ((unsigned long)task_stack_page(tsk) + \
315#define task_pt_regs(tsk) ((struct pt_regs *)__KSTK_TOS(tsk) - 1) 315 THREAD_SIZE - 32 - sizeof(struct pt_regs))
316#define task_pt_regs(tsk) ((struct pt_regs *)__KSTK_TOS(tsk))
316#define KSTK_EIP(tsk) (task_pt_regs(tsk)->cp0_epc) 317#define KSTK_EIP(tsk) (task_pt_regs(tsk)->cp0_epc)
317#define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[29]) 318#define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[29])
318#define KSTK_STATUS(tsk) (task_pt_regs(tsk)->cp0_status) 319#define KSTK_STATUS(tsk) (task_pt_regs(tsk)->cp0_status)
diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h
index b70c49fdda2..e753a777949 100644
--- a/arch/mips/include/asm/unistd.h
+++ b/arch/mips/include/asm/unistd.h
@@ -354,16 +354,17 @@
354#define __NR_pwritev (__NR_Linux + 331) 354#define __NR_pwritev (__NR_Linux + 331)
355#define __NR_rt_tgsigqueueinfo (__NR_Linux + 332) 355#define __NR_rt_tgsigqueueinfo (__NR_Linux + 332)
356#define __NR_perf_counter_open (__NR_Linux + 333) 356#define __NR_perf_counter_open (__NR_Linux + 333)
357#define __NR_accept4 (__NR_Linux + 334)
357 358
358/* 359/*
359 * Offset of the last Linux o32 flavoured syscall 360 * Offset of the last Linux o32 flavoured syscall
360 */ 361 */
361#define __NR_Linux_syscalls 333 362#define __NR_Linux_syscalls 334
362 363
363#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ 364#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
364 365
365#define __NR_O32_Linux 4000 366#define __NR_O32_Linux 4000
366#define __NR_O32_Linux_syscalls 333 367#define __NR_O32_Linux_syscalls 334
367 368
368#if _MIPS_SIM == _MIPS_SIM_ABI64 369#if _MIPS_SIM == _MIPS_SIM_ABI64
369 370
@@ -664,16 +665,17 @@
664#define __NR_pwritev (__NR_Linux + 290) 665#define __NR_pwritev (__NR_Linux + 290)
665#define __NR_rt_tgsigqueueinfo (__NR_Linux + 291) 666#define __NR_rt_tgsigqueueinfo (__NR_Linux + 291)
666#define __NR_perf_counter_open (__NR_Linux + 292) 667#define __NR_perf_counter_open (__NR_Linux + 292)
668#define __NR_accept4 (__NR_Linux + 293)
667 669
668/* 670/*
669 * Offset of the last Linux 64-bit flavoured syscall 671 * Offset of the last Linux 64-bit flavoured syscall
670 */ 672 */
671#define __NR_Linux_syscalls 292 673#define __NR_Linux_syscalls 293
672 674
673#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ 675#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
674 676
675#define __NR_64_Linux 5000 677#define __NR_64_Linux 5000
676#define __NR_64_Linux_syscalls 292 678#define __NR_64_Linux_syscalls 293
677 679
678#if _MIPS_SIM == _MIPS_SIM_NABI32 680#if _MIPS_SIM == _MIPS_SIM_NABI32
679 681
@@ -978,16 +980,17 @@
978#define __NR_pwritev (__NR_Linux + 294) 980#define __NR_pwritev (__NR_Linux + 294)
979#define __NR_rt_tgsigqueueinfo (__NR_Linux + 295) 981#define __NR_rt_tgsigqueueinfo (__NR_Linux + 295)
980#define __NR_perf_counter_open (__NR_Linux + 296) 982#define __NR_perf_counter_open (__NR_Linux + 296)
983#define __NR_accept4 (__NR_Linux + 297)
981 984
982/* 985/*
983 * Offset of the last N32 flavoured syscall 986 * Offset of the last N32 flavoured syscall
984 */ 987 */
985#define __NR_Linux_syscalls 296 988#define __NR_Linux_syscalls 297
986 989
987#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ 990#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
988 991
989#define __NR_N32_Linux 6000 992#define __NR_N32_Linux 6000
990#define __NR_N32_Linux_syscalls 296 993#define __NR_N32_Linux_syscalls 297
991 994
992#ifdef __KERNEL__ 995#ifdef __KERNEL__
993 996
diff --git a/arch/mips/jazz/jazzdma.c b/arch/mips/jazz/jazzdma.c
index f0fd636723b..0d64d0f4641 100644
--- a/arch/mips/jazz/jazzdma.c
+++ b/arch/mips/jazz/jazzdma.c
@@ -190,7 +190,7 @@ int vdma_free(unsigned long laddr)
190 return -1; 190 return -1;
191 } 191 }
192 192
193 while (pgtbl[i].owner == laddr && i < VDMA_PGTBL_ENTRIES) { 193 while (i < VDMA_PGTBL_ENTRIES && pgtbl[i].owner == laddr) {
194 pgtbl[i].owner = VDMA_PAGE_EMPTY; 194 pgtbl[i].owner = VDMA_PAGE_EMPTY;
195 i++; 195 i++;
196 } 196 }
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
index 492a0a8d70f..531ce7b1612 100644
--- a/arch/mips/kernel/head.S
+++ b/arch/mips/kernel/head.S
@@ -188,7 +188,8 @@ NESTED(kernel_entry, 16, sp) # kernel entry point
188 188
189 MTC0 zero, CP0_CONTEXT # clear context register 189 MTC0 zero, CP0_CONTEXT # clear context register
190 PTR_LA $28, init_thread_union 190 PTR_LA $28, init_thread_union
191 PTR_LI sp, _THREAD_SIZE - 32 191 /* Set the SP after an empty pt_regs. */
192 PTR_LI sp, _THREAD_SIZE - 32 - PT_SIZE
192 PTR_ADDU sp, $28 193 PTR_ADDU sp, $28
193 set_saved_sp sp, t0, t1 194 set_saved_sp sp, t0, t1
194 PTR_SUBU sp, 4 * SZREG # init stack pointer 195 PTR_SUBU sp, 4 * SZREG # init stack pointer
diff --git a/arch/mips/kernel/irq_txx9.c b/arch/mips/kernel/irq_txx9.c
index a4d1462c27f..9b78029bea7 100644
--- a/arch/mips/kernel/irq_txx9.c
+++ b/arch/mips/kernel/irq_txx9.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/mips/kernel/irq_txx9.c
3 *
4 * Based on linux/arch/mips/jmr3927/rbhma3100/irq.c, 2 * Based on linux/arch/mips/jmr3927/rbhma3100/irq.c,
5 * linux/arch/mips/tx4927/common/tx4927_irq.c, 3 * linux/arch/mips/tx4927/common/tx4927_irq.c,
6 * linux/arch/mips/tx4938/common/irq.c 4 * linux/arch/mips/tx4938/common/irq.c
diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c
index 3e9100dcc12..6f51dda87fc 100644
--- a/arch/mips/kernel/module.c
+++ b/arch/mips/kernel/module.c
@@ -98,7 +98,8 @@ static int apply_r_mips_32_rela(struct module *me, u32 *location, Elf_Addr v)
98static int apply_r_mips_26_rel(struct module *me, u32 *location, Elf_Addr v) 98static int apply_r_mips_26_rel(struct module *me, u32 *location, Elf_Addr v)
99{ 99{
100 if (v % 4) { 100 if (v % 4) {
101 printk(KERN_ERR "module %s: dangerous relocation\n", me->name); 101 pr_err("module %s: dangerous R_MIPS_26 REL relocation\n",
102 me->name);
102 return -ENOEXEC; 103 return -ENOEXEC;
103 } 104 }
104 105
@@ -118,7 +119,8 @@ static int apply_r_mips_26_rel(struct module *me, u32 *location, Elf_Addr v)
118static int apply_r_mips_26_rela(struct module *me, u32 *location, Elf_Addr v) 119static int apply_r_mips_26_rela(struct module *me, u32 *location, Elf_Addr v)
119{ 120{
120 if (v % 4) { 121 if (v % 4) {
121 printk(KERN_ERR "module %s: dangerous relocation\n", me->name); 122 pr_err("module %s: dangerous R_MIPS_26 RELArelocation\n",
123 me->name);
122 return -ENOEXEC; 124 return -ENOEXEC;
123 } 125 }
124 126
@@ -222,7 +224,7 @@ static int apply_r_mips_lo16_rel(struct module *me, u32 *location, Elf_Addr v)
222 return 0; 224 return 0;
223 225
224out_danger: 226out_danger:
225 printk(KERN_ERR "module %s: dangerous " "relocation\n", me->name); 227 pr_err("module %s: dangerous R_MIPS_LO16 REL relocation\n", me->name);
226 228
227 return -ENOEXEC; 229 return -ENOEXEC;
228} 230}
@@ -301,7 +303,7 @@ int apply_relocate(Elf_Shdr *sechdrs, const char *strtab,
301 /* This is the symbol it is referring to */ 303 /* This is the symbol it is referring to */
302 sym = (Elf_Sym *)sechdrs[symindex].sh_addr 304 sym = (Elf_Sym *)sechdrs[symindex].sh_addr
303 + ELF_MIPS_R_SYM(rel[i]); 305 + ELF_MIPS_R_SYM(rel[i]);
304 if (!sym->st_value) { 306 if (IS_ERR_VALUE(sym->st_value)) {
305 /* Ignore unresolved weak symbol */ 307 /* Ignore unresolved weak symbol */
306 if (ELF_ST_BIND(sym->st_info) == STB_WEAK) 308 if (ELF_ST_BIND(sym->st_info) == STB_WEAK)
307 continue; 309 continue;
@@ -341,7 +343,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,
341 /* This is the symbol it is referring to */ 343 /* This is the symbol it is referring to */
342 sym = (Elf_Sym *)sechdrs[symindex].sh_addr 344 sym = (Elf_Sym *)sechdrs[symindex].sh_addr
343 + ELF_MIPS_R_SYM(rel[i]); 345 + ELF_MIPS_R_SYM(rel[i]);
344 if (!sym->st_value) { 346 if (IS_ERR_VALUE(sym->st_value)) {
345 /* Ignore unresolved weak symbol */ 347 /* Ignore unresolved weak symbol */
346 if (ELF_ST_BIND(sym->st_info) == STB_WEAK) 348 if (ELF_ST_BIND(sym->st_info) == STB_WEAK)
347 continue; 349 continue;
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
index e0a4ac18fa0..26109c4d517 100644
--- a/arch/mips/kernel/proc.c
+++ b/arch/mips/kernel/proc.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/mips/kernel/proc.c
3 *
4 * Copyright (C) 1995, 1996, 2001 Ralf Baechle 2 * Copyright (C) 1995, 1996, 2001 Ralf Baechle
5 * Copyright (C) 2001, 2004 MIPS Technologies, Inc. 3 * Copyright (C) 2001, 2004 MIPS Technologies, Inc.
6 * Copyright (C) 2004 Maciej W. Rozycki 4 * Copyright (C) 2004 Maciej W. Rozycki
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index c09d681b718..f3d73e1831c 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -115,7 +115,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
115{ 115{
116 struct thread_info *ti = task_thread_info(p); 116 struct thread_info *ti = task_thread_info(p);
117 struct pt_regs *childregs; 117 struct pt_regs *childregs;
118 long childksp; 118 unsigned long childksp;
119 p->set_child_tid = p->clear_child_tid = NULL; 119 p->set_child_tid = p->clear_child_tid = NULL;
120 120
121 childksp = (unsigned long)task_stack_page(p) + THREAD_SIZE - 32; 121 childksp = (unsigned long)task_stack_page(p) + THREAD_SIZE - 32;
@@ -132,6 +132,8 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
132 132
133 /* set up new TSS. */ 133 /* set up new TSS. */
134 childregs = (struct pt_regs *) childksp - 1; 134 childregs = (struct pt_regs *) childksp - 1;
135 /* Put the stack after the struct pt_regs. */
136 childksp = (unsigned long) childregs;
135 *childregs = *regs; 137 *childregs = *regs;
136 childregs->regs[7] = 0; /* Clear error flag */ 138 childregs->regs[7] = 0; /* Clear error flag */
137 139
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index 20a86e08fd5..b5708212353 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -654,6 +654,7 @@ einval: li v0, -ENOSYS
654 sys sys_pwritev 6 654 sys sys_pwritev 6
655 sys sys_rt_tgsigqueueinfo 4 655 sys sys_rt_tgsigqueueinfo 4
656 sys sys_perf_counter_open 5 656 sys sys_perf_counter_open 5
657 sys sys_accept4 4
657 .endm 658 .endm
658 659
659 /* We pre-compute the number of _instruction_ bytes needed to 660 /* We pre-compute the number of _instruction_ bytes needed to
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
index b046130d4c5..3d866f24e06 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -491,4 +491,5 @@ sys_call_table:
491 PTR sys_pwritev /* 5390 */ 491 PTR sys_pwritev /* 5390 */
492 PTR sys_rt_tgsigqueueinfo 492 PTR sys_rt_tgsigqueueinfo
493 PTR sys_perf_counter_open 493 PTR sys_perf_counter_open
494 PTR sys_accept4
494 .size sys_call_table,.-sys_call_table 495 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index 15874f9812c..e855b118a07 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -417,4 +417,5 @@ EXPORT(sysn32_call_table)
417 PTR sys_pwritev 417 PTR sys_pwritev
418 PTR compat_sys_rt_tgsigqueueinfo /* 5295 */ 418 PTR compat_sys_rt_tgsigqueueinfo /* 5295 */
419 PTR sys_perf_counter_open 419 PTR sys_perf_counter_open
420 PTR sys_accept4
420 .size sysn32_call_table,.-sysn32_call_table 421 .size sysn32_call_table,.-sysn32_call_table
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 781e0f1e953..0c49f1a660b 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -537,4 +537,5 @@ sys_call_table:
537 PTR compat_sys_pwritev 537 PTR compat_sys_pwritev
538 PTR compat_sys_rt_tgsigqueueinfo 538 PTR compat_sys_rt_tgsigqueueinfo
539 PTR sys_perf_counter_open 539 PTR sys_perf_counter_open
540 PTR sys_accept4
540 .size sys_call_table,.-sys_call_table 541 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index 8a0626cbb10..c16bb6d6c25 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -465,11 +465,8 @@ void smtc_prepare_cpus(int cpus)
465 smtc_configure_tlb(); 465 smtc_configure_tlb();
466 466
467 for (tc = 0, vpe = 0 ; (vpe < nvpe) && (tc < ntc) ; vpe++) { 467 for (tc = 0, vpe = 0 ; (vpe < nvpe) && (tc < ntc) ; vpe++) {
468 /* 468 if (tcpervpe[vpe] == 0)
469 * Set the MVP bits. 469 continue;
470 */
471 settc(tc);
472 write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() | VPECONF0_MVP);
473 if (vpe != 0) 470 if (vpe != 0)
474 printk(", "); 471 printk(", ");
475 printk("VPE %d: TC", vpe); 472 printk("VPE %d: TC", vpe);
@@ -488,6 +485,12 @@ void smtc_prepare_cpus(int cpus)
488 } 485 }
489 if (vpe != 0) { 486 if (vpe != 0) {
490 /* 487 /*
488 * Allow this VPE to control others.
489 */
490 write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() |
491 VPECONF0_MVP);
492
493 /*
491 * Clear any stale software interrupts from VPE's Cause 494 * Clear any stale software interrupts from VPE's Cause
492 */ 495 */
493 write_vpe_c0_cause(0); 496 write_vpe_c0_cause(0);
diff --git a/arch/mips/kernel/stacktrace.c b/arch/mips/kernel/stacktrace.c
index 58f5cd76c8c..d52ff77baf3 100644
--- a/arch/mips/kernel/stacktrace.c
+++ b/arch/mips/kernel/stacktrace.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/mips/kernel/stacktrace.c
3 *
4 * Stack trace management functions 2 * Stack trace management functions
5 * 3 *
6 * Copyright (C) 2006 Atsushi Nemoto <anemo@mba.ocn.ne.jp> 4 * Copyright (C) 2006 Atsushi Nemoto <anemo@mba.ocn.ne.jp>
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c
index 07b9ec2c6e3..9a1ab7e87fd 100644
--- a/arch/mips/kernel/vpe.c
+++ b/arch/mips/kernel/vpe.c
@@ -73,7 +73,7 @@ static int major;
73static const int minor = 1; /* fixed for now */ 73static const int minor = 1; /* fixed for now */
74 74
75#ifdef CONFIG_MIPS_APSP_KSPD 75#ifdef CONFIG_MIPS_APSP_KSPD
76 static struct kspd_notifications kspd_events; 76static struct kspd_notifications kspd_events;
77static int kspd_events_reqd = 0; 77static int kspd_events_reqd = 0;
78#endif 78#endif
79 79
@@ -155,10 +155,9 @@ struct {
155}; 155};
156 156
157static void release_progmem(void *ptr); 157static void release_progmem(void *ptr);
158extern void save_gp_address(unsigned int secbase, unsigned int rel);
159 158
160/* get the vpe associated with this minor */ 159/* get the vpe associated with this minor */
161struct vpe *get_vpe(int minor) 160static struct vpe *get_vpe(int minor)
162{ 161{
163 struct vpe *v; 162 struct vpe *v;
164 163
@@ -174,7 +173,7 @@ struct vpe *get_vpe(int minor)
174} 173}
175 174
176/* get the vpe associated with this minor */ 175/* get the vpe associated with this minor */
177struct tc *get_tc(int index) 176static struct tc *get_tc(int index)
178{ 177{
179 struct tc *t; 178 struct tc *t;
180 179
@@ -186,20 +185,8 @@ struct tc *get_tc(int index)
186 return NULL; 185 return NULL;
187} 186}
188 187
189struct tc *get_tc_unused(void)
190{
191 struct tc *t;
192
193 list_for_each_entry(t, &vpecontrol.tc_list, list) {
194 if (t->state == TC_STATE_UNUSED)
195 return t;
196 }
197
198 return NULL;
199}
200
201/* allocate a vpe and associate it with this minor (or index) */ 188/* allocate a vpe and associate it with this minor (or index) */
202struct vpe *alloc_vpe(int minor) 189static struct vpe *alloc_vpe(int minor)
203{ 190{
204 struct vpe *v; 191 struct vpe *v;
205 192
@@ -216,7 +203,7 @@ struct vpe *alloc_vpe(int minor)
216} 203}
217 204
218/* allocate a tc. At startup only tc0 is running, all other can be halted. */ 205/* allocate a tc. At startup only tc0 is running, all other can be halted. */
219struct tc *alloc_tc(int index) 206static struct tc *alloc_tc(int index)
220{ 207{
221 struct tc *tc; 208 struct tc *tc;
222 209
@@ -232,7 +219,7 @@ out:
232} 219}
233 220
234/* clean up and free everything */ 221/* clean up and free everything */
235void release_vpe(struct vpe *v) 222static void release_vpe(struct vpe *v)
236{ 223{
237 list_del(&v->list); 224 list_del(&v->list);
238 if (v->load_addr) 225 if (v->load_addr)
@@ -240,7 +227,7 @@ void release_vpe(struct vpe *v)
240 kfree(v); 227 kfree(v);
241} 228}
242 229
243void dump_mtregs(void) 230static void dump_mtregs(void)
244{ 231{
245 unsigned long val; 232 unsigned long val;
246 233
@@ -327,7 +314,8 @@ static void layout_sections(struct module *mod, const Elf_Ehdr * hdr,
327 || (s->sh_flags & masks[m][1]) 314 || (s->sh_flags & masks[m][1])
328 || s->sh_entsize != ~0UL) 315 || s->sh_entsize != ~0UL)
329 continue; 316 continue;
330 s->sh_entsize = get_offset(&mod->core_size, s); 317 s->sh_entsize =
318 get_offset((unsigned long *)&mod->core_size, s);
331 } 319 }
332 320
333 if (m == 0) 321 if (m == 0)
@@ -461,16 +449,15 @@ static int apply_r_mips_lo16(struct module *me, uint32_t *location,
461{ 449{
462 unsigned long insnlo = *location; 450 unsigned long insnlo = *location;
463 Elf32_Addr val, vallo; 451 Elf32_Addr val, vallo;
452 struct mips_hi16 *l, *next;
464 453
465 /* Sign extend the addend we extract from the lo insn. */ 454 /* Sign extend the addend we extract from the lo insn. */
466 vallo = ((insnlo & 0xffff) ^ 0x8000) - 0x8000; 455 vallo = ((insnlo & 0xffff) ^ 0x8000) - 0x8000;
467 456
468 if (mips_hi16_list != NULL) { 457 if (mips_hi16_list != NULL) {
469 struct mips_hi16 *l;
470 458
471 l = mips_hi16_list; 459 l = mips_hi16_list;
472 while (l != NULL) { 460 while (l != NULL) {
473 struct mips_hi16 *next;
474 unsigned long insn; 461 unsigned long insn;
475 462
476 /* 463 /*
@@ -480,7 +467,7 @@ static int apply_r_mips_lo16(struct module *me, uint32_t *location,
480 printk(KERN_DEBUG "VPE loader: " 467 printk(KERN_DEBUG "VPE loader: "
481 "apply_r_mips_lo16/hi16: \t" 468 "apply_r_mips_lo16/hi16: \t"
482 "inconsistent value information\n"); 469 "inconsistent value information\n");
483 return -ENOEXEC; 470 goto out_free;
484 } 471 }
485 472
486 /* 473 /*
@@ -518,6 +505,16 @@ static int apply_r_mips_lo16(struct module *me, uint32_t *location,
518 *location = insnlo; 505 *location = insnlo;
519 506
520 return 0; 507 return 0;
508
509out_free:
510 while (l != NULL) {
511 next = l->next;
512 kfree(l);
513 l = next;
514 }
515 mips_hi16_list = NULL;
516
517 return -ENOEXEC;
521} 518}
522 519
523static int (*reloc_handlers[]) (struct module *me, uint32_t *location, 520static int (*reloc_handlers[]) (struct module *me, uint32_t *location,
@@ -541,7 +538,7 @@ static char *rstrs[] = {
541 [R_MIPS_PC16] = "MIPS_PC16" 538 [R_MIPS_PC16] = "MIPS_PC16"
542}; 539};
543 540
544int apply_relocations(Elf32_Shdr *sechdrs, 541static int apply_relocations(Elf32_Shdr *sechdrs,
545 const char *strtab, 542 const char *strtab,
546 unsigned int symindex, 543 unsigned int symindex,
547 unsigned int relsec, 544 unsigned int relsec,
@@ -586,7 +583,7 @@ int apply_relocations(Elf32_Shdr *sechdrs,
586 return 0; 583 return 0;
587} 584}
588 585
589void save_gp_address(unsigned int secbase, unsigned int rel) 586static inline void save_gp_address(unsigned int secbase, unsigned int rel)
590{ 587{
591 gp_addr = secbase + rel; 588 gp_addr = secbase + rel;
592 gp_offs = gp_addr - (secbase & 0xffff0000); 589 gp_offs = gp_addr - (secbase & 0xffff0000);
diff --git a/arch/mips/mipssim/sim_time.c b/arch/mips/mipssim/sim_time.c
index 0cea932f124..5492c42f765 100644
--- a/arch/mips/mipssim/sim_time.c
+++ b/arch/mips/mipssim/sim_time.c
@@ -89,13 +89,13 @@ unsigned __cpuinit get_c0_compare_int(void)
89 if (cpu_has_veic) { 89 if (cpu_has_veic) {
90 set_vi_handler(MSC01E_INT_CPUCTR, mips_timer_dispatch); 90 set_vi_handler(MSC01E_INT_CPUCTR, mips_timer_dispatch);
91 mips_cpu_timer_irq = MSC01E_INT_BASE + MSC01E_INT_CPUCTR; 91 mips_cpu_timer_irq = MSC01E_INT_BASE + MSC01E_INT_CPUCTR;
92 } else { 92
93#endif 93 return mips_cpu_timer_irq;
94 {
95 if (cpu_has_vint)
96 set_vi_handler(cp0_compare_irq, mips_timer_dispatch);
97 mips_cpu_timer_irq = MIPS_CPU_IRQ_BASE + cp0_compare_irq;
98 } 94 }
95#endif
96 if (cpu_has_vint)
97 set_vi_handler(cp0_compare_irq, mips_timer_dispatch);
98 mips_cpu_timer_irq = MIPS_CPU_IRQ_BASE + cp0_compare_irq;
99 99
100 return mips_cpu_timer_irq; 100 return mips_cpu_timer_irq;
101} 101}
diff --git a/arch/mips/mm/c-octeon.c b/arch/mips/mm/c-octeon.c
index b165cdcb281..10ab69f7183 100644
--- a/arch/mips/mm/c-octeon.c
+++ b/arch/mips/mm/c-octeon.c
@@ -289,7 +289,7 @@ static void cache_parity_error_octeon(int non_recoverable)
289} 289}
290 290
291/** 291/**
292 * Called when the the exception is not recoverable 292 * Called when the the exception is recoverable
293 */ 293 */
294 294
295asmlinkage void cache_parity_error_octeon_recoverable(void) 295asmlinkage void cache_parity_error_octeon_recoverable(void)
@@ -298,7 +298,7 @@ asmlinkage void cache_parity_error_octeon_recoverable(void)
298} 298}
299 299
300/** 300/**
301 * Called when the the exception is recoverable 301 * Called when the the exception is not recoverable
302 */ 302 */
303 303
304asmlinkage void cache_parity_error_octeon_non_recoverable(void) 304asmlinkage void cache_parity_error_octeon_non_recoverable(void)
diff --git a/arch/mips/mm/extable.c b/arch/mips/mm/extable.c
index 297fb9f390d..9d25d2ba4b9 100644
--- a/arch/mips/mm/extable.c
+++ b/arch/mips/mm/extable.c
@@ -1,5 +1,9 @@
1/* 1/*
2 * linux/arch/mips/mm/extable.c 2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1997, 99, 2001 - 2004 Ralf Baechle <ralf@linux-mips.org>
3 */ 7 */
4#include <linux/module.h> 8#include <linux/module.h>
5#include <linux/spinlock.h> 9#include <linux/spinlock.h>
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c
index 6751ce9ede9..f956ecbb813 100644
--- a/arch/mips/mm/fault.c
+++ b/arch/mips/mm/fault.c
@@ -171,6 +171,7 @@ out_of_memory:
171 * We ran out of memory, call the OOM killer, and return the userspace 171 * We ran out of memory, call the OOM killer, and return the userspace
172 * (which will retry the fault, or kill us if we got oom-killed). 172 * (which will retry the fault, or kill us if we got oom-killed).
173 */ 173 */
174 up_read(&mm->mmap_sem);
174 pagefault_out_of_memory(); 175 pagefault_out_of_memory();
175 return; 176 return;
176 177
diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c
index a8756f82c31..3e0a9b35ba5 100644
--- a/arch/mips/mti-malta/malta-int.c
+++ b/arch/mips/mti-malta/malta-int.c
@@ -331,6 +331,7 @@ static struct irqaction irq_call = {
331 .flags = IRQF_DISABLED|IRQF_PERCPU, 331 .flags = IRQF_DISABLED|IRQF_PERCPU,
332 .name = "IPI_call" 332 .name = "IPI_call"
333}; 333};
334#endif /* CONFIG_MIPS_MT_SMP */
334 335
335static int gic_resched_int_base; 336static int gic_resched_int_base;
336static int gic_call_int_base; 337static int gic_call_int_base;
@@ -346,7 +347,6 @@ unsigned int plat_ipi_resched_int_xlate(unsigned int cpu)
346{ 347{
347 return GIC_RESCHED_INT(cpu); 348 return GIC_RESCHED_INT(cpu);
348} 349}
349#endif /* CONFIG_MIPS_MT_SMP */
350 350
351static struct irqaction i8259irq = { 351static struct irqaction i8259irq = {
352 .handler = no_action, 352 .handler = no_action,
diff --git a/arch/mips/nxp/pnx8550/common/time.c b/arch/mips/nxp/pnx8550/common/time.c
index 8df43e9e4d9..18b19278487 100644
--- a/arch/mips/nxp/pnx8550/common/time.c
+++ b/arch/mips/nxp/pnx8550/common/time.c
@@ -138,7 +138,7 @@ __init void plat_time_init(void)
138 * HZ timer interrupts per second. 138 * HZ timer interrupts per second.
139 */ 139 */
140 mips_hpt_frequency = 27UL * ((1000000UL * n)/(m * pow2p)); 140 mips_hpt_frequency = 27UL * ((1000000UL * n)/(m * pow2p));
141 cpj = (mips_hpt_frequency + HZ / 2) / HZ; 141 cpj = DIV_ROUND_CLOSEST(mips_hpt_frequency, HZ);
142 write_c0_count(0); 142 write_c0_count(0);
143 timer_ack(); 143 timer_ack();
144 144
diff --git a/arch/mips/pci/fixup-emma2rh.c b/arch/mips/pci/fixup-emma2rh.c
index fba5aad00d5..0d9ccf4dfc5 100644
--- a/arch/mips/pci/fixup-emma2rh.c
+++ b/arch/mips/pci/fixup-emma2rh.c
@@ -1,7 +1,4 @@
1/* 1/*
2 * arch/mips/pci/fixup-emma2rh.c
3 * This file defines the PCI configration.
4 *
5 * Copyright (C) NEC Electronics Corporation 2004-2006 2 * Copyright (C) NEC Electronics Corporation 2004-2006
6 * 3 *
7 * This file is based on the arch/mips/ddb5xxx/ddb5477/pci.c 4 * This file is based on the arch/mips/ddb5xxx/ddb5477/pci.c
diff --git a/arch/mips/pci/fixup-sb1250.c b/arch/mips/pci/fixup-sb1250.c
index 0ad39e53f7b..f0bb9146e6c 100644
--- a/arch/mips/pci/fixup-sb1250.c
+++ b/arch/mips/pci/fixup-sb1250.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/mips/pci/fixup-sb1250.c
3 *
4 * Copyright (C) 2004, 2006 MIPS Technologies, Inc. All rights reserved. 2 * Copyright (C) 2004, 2006 MIPS Technologies, Inc. All rights reserved.
5 * Author: Maciej W. Rozycki <macro@mips.com> 3 * Author: Maciej W. Rozycki <macro@mips.com>
6 * 4 *
diff --git a/arch/mips/pci/ops-emma2rh.c b/arch/mips/pci/ops-emma2rh.c
index 5947a70b0b7..710aef5c070 100644
--- a/arch/mips/pci/ops-emma2rh.c
+++ b/arch/mips/pci/ops-emma2rh.c
@@ -1,7 +1,4 @@
1/* 1/*
2 * arch/mips/pci/ops-emma2rh.c
3 * This file defines the PCI operation for EMMA2RH.
4 *
5 * Copyright (C) NEC Electronics Corporation 2004-2006 2 * Copyright (C) NEC Electronics Corporation 2004-2006
6 * 3 *
7 * This file is based on the arch/mips/pci/ops-vr41xx.c 4 * This file is based on the arch/mips/pci/ops-vr41xx.c
diff --git a/arch/mips/pci/pci-emma2rh.c b/arch/mips/pci/pci-emma2rh.c
index 2df4190232c..773e34ff4d1 100644
--- a/arch/mips/pci/pci-emma2rh.c
+++ b/arch/mips/pci/pci-emma2rh.c
@@ -1,7 +1,4 @@
1/* 1/*
2 * arch/mips/pci/pci-emma2rh.c
3 * This file defines the PCI configration.
4 *
5 * Copyright (C) NEC Electronics Corporation 2004-2006 2 * Copyright (C) NEC Electronics Corporation 2004-2006
6 * 3 *
7 * This file is based on the arch/mips/ddb5xxx/ddb5477/pci.c 4 * This file is based on the arch/mips/ddb5xxx/ddb5477/pci.c
diff --git a/arch/mips/pci/pci-tx4927.c b/arch/mips/pci/pci-tx4927.c
index aaa90059679..a5807406a7f 100644
--- a/arch/mips/pci/pci-tx4927.c
+++ b/arch/mips/pci/pci-tx4927.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/mips/pci/pci-tx4927.c
3 *
4 * Based on linux/arch/mips/txx9/rbtx4938/setup.c, 2 * Based on linux/arch/mips/txx9/rbtx4938/setup.c,
5 * and RBTX49xx patch from CELF patch archive. 3 * and RBTX49xx patch from CELF patch archive.
6 * 4 *
diff --git a/arch/mips/pci/pci-tx4938.c b/arch/mips/pci/pci-tx4938.c
index 1ea257bc3b8..20e45f30b2e 100644
--- a/arch/mips/pci/pci-tx4938.c
+++ b/arch/mips/pci/pci-tx4938.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/mips/pci/pci-tx4938.c
3 *
4 * Based on linux/arch/mips/txx9/rbtx4938/setup.c, 2 * Based on linux/arch/mips/txx9/rbtx4938/setup.c,
5 * and RBTX49xx patch from CELF patch archive. 3 * and RBTX49xx patch from CELF patch archive.
6 * 4 *
diff --git a/arch/mips/pci/pci-tx4939.c b/arch/mips/pci/pci-tx4939.c
index 5fecf1cdc32..9ef840693ba 100644
--- a/arch/mips/pci/pci-tx4939.c
+++ b/arch/mips/pci/pci-tx4939.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/mips/pci/pci-tx4939.c
3 *
4 * Based on linux/arch/mips/txx9/rbtx4939/setup.c, 2 * Based on linux/arch/mips/txx9/rbtx4939/setup.c,
5 * and RBTX49xx patch from CELF patch archive. 3 * and RBTX49xx patch from CELF patch archive.
6 * 4 *
diff --git a/arch/mips/pci/pcie-octeon.c b/arch/mips/pci/pcie-octeon.c
index 75262247f3e..6aa5c542d52 100644
--- a/arch/mips/pci/pcie-octeon.c
+++ b/arch/mips/pci/pcie-octeon.c
@@ -1040,19 +1040,29 @@ static inline int octeon_pcie_read_config(int pcie_port, struct pci_bus *bus,
1040 int bus_number = bus->number; 1040 int bus_number = bus->number;
1041 1041
1042 /* 1042 /*
1043 * We need to force the bus number to be zero on the root 1043 * For the top level bus make sure our hardware bus number
1044 * bus. Linux numbers the 2nd root bus to start after all 1044 * matches the software one.
1045 * buses on root 0.
1046 */ 1045 */
1047 if (bus->parent == NULL) 1046 if (bus->parent == NULL) {
1048 bus_number = 0; 1047 union cvmx_pciercx_cfg006 pciercx_cfg006;
1048 pciercx_cfg006.u32 = cvmx_pcie_cfgx_read(pcie_port,
1049 CVMX_PCIERCX_CFG006(pcie_port));
1050 if (pciercx_cfg006.s.pbnum != bus_number) {
1051 pciercx_cfg006.s.pbnum = bus_number;
1052 pciercx_cfg006.s.sbnum = bus_number;
1053 pciercx_cfg006.s.subbnum = bus_number;
1054 cvmx_pcie_cfgx_write(pcie_port,
1055 CVMX_PCIERCX_CFG006(pcie_port),
1056 pciercx_cfg006.u32);
1057 }
1058 }
1049 1059
1050 /* 1060 /*
1051 * PCIe only has a single device connected to Octeon. It is 1061 * PCIe only has a single device connected to Octeon. It is
1052 * always device ID 0. Don't bother doing reads for other 1062 * always device ID 0. Don't bother doing reads for other
1053 * device IDs on the first segment. 1063 * device IDs on the first segment.
1054 */ 1064 */
1055 if ((bus_number == 0) && (devfn >> 3 != 0)) 1065 if ((bus->parent == NULL) && (devfn >> 3 != 0))
1056 return PCIBIOS_FUNC_NOT_SUPPORTED; 1066 return PCIBIOS_FUNC_NOT_SUPPORTED;
1057 1067
1058 /* 1068 /*
@@ -1070,7 +1080,7 @@ static inline int octeon_pcie_read_config(int pcie_port, struct pci_bus *bus,
1070 * bridge only respondes to device ID 0, function 1080 * bridge only respondes to device ID 0, function
1071 * 0-1 1081 * 0-1
1072 */ 1082 */
1073 if ((bus_number == 0) && (devfn >= 2)) 1083 if ((bus->parent == NULL) && (devfn >= 2))
1074 return PCIBIOS_FUNC_NOT_SUPPORTED; 1084 return PCIBIOS_FUNC_NOT_SUPPORTED;
1075 /* 1085 /*
1076 * The PCI-X slots are device ID 2,3. Choose one of 1086 * The PCI-X slots are device ID 2,3. Choose one of
@@ -1167,13 +1177,6 @@ static inline int octeon_pcie_write_config(int pcie_port, struct pci_bus *bus,
1167 int size, u32 val) 1177 int size, u32 val)
1168{ 1178{
1169 int bus_number = bus->number; 1179 int bus_number = bus->number;
1170 /*
1171 * We need to force the bus number to be zero on the root
1172 * bus. Linux numbers the 2nd root bus to start after all
1173 * busses on root 0.
1174 */
1175 if (bus->parent == NULL)
1176 bus_number = 0;
1177 1180
1178 switch (size) { 1181 switch (size) {
1179 case 4: 1182 case 4:
diff --git a/arch/mips/pmc-sierra/msp71xx/gpio.c b/arch/mips/pmc-sierra/msp71xx/gpio.c
index 69848c5813e..aaccbe52438 100644
--- a/arch/mips/pmc-sierra/msp71xx/gpio.c
+++ b/arch/mips/pmc-sierra/msp71xx/gpio.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * @file /arch/mips/pmc-sierra/msp71xx/gpio.c
3 *
4 * Generic PMC MSP71xx GPIO handling. These base gpio are controlled by two 2 * Generic PMC MSP71xx GPIO handling. These base gpio are controlled by two
5 * types of registers. The data register sets the output level when in output 3 * types of registers. The data register sets the output level when in output
6 * mode and when in input mode will contain the value at the input. The config 4 * mode and when in input mode will contain the value at the input. The config
diff --git a/arch/mips/pmc-sierra/msp71xx/gpio_extended.c b/arch/mips/pmc-sierra/msp71xx/gpio_extended.c
index fc6dbc6cf1c..2a99f360fae 100644
--- a/arch/mips/pmc-sierra/msp71xx/gpio_extended.c
+++ b/arch/mips/pmc-sierra/msp71xx/gpio_extended.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * @file /arch/mips/pmc-sierra/msp71xx/gpio_extended.c
3 *
4 * Generic PMC MSP71xx EXTENDED (EXD) GPIO handling. The extended gpio is 2 * Generic PMC MSP71xx EXTENDED (EXD) GPIO handling. The extended gpio is
5 * a set of hardware registers that have no need for explicit locking as 3 * a set of hardware registers that have no need for explicit locking as
6 * it is handled by unique method of writing individual set/clr bits. 4 * it is handled by unique method of writing individual set/clr bits.
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c b/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c
index f5f1b8d2bb9..61f39023234 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c
@@ -45,13 +45,6 @@ static inline void mask_msp_slp_irq(unsigned int irq)
45 */ 45 */
46static inline void ack_msp_slp_irq(unsigned int irq) 46static inline void ack_msp_slp_irq(unsigned int irq)
47{ 47{
48 mask_slp_irq(irq);
49
50 /*
51 * only really necessary for 18, 16-14 and sometimes 3:0 (since
52 * these can be edge sensitive) but it doesn't hurt for the others.
53 */
54
55 /* check for PER interrupt range */ 48 /* check for PER interrupt range */
56 if (irq < MSP_PER_INTBASE) 49 if (irq < MSP_PER_INTBASE)
57 *SLP_INT_STS_REG = (1 << (irq - MSP_SLP_INTBASE)); 50 *SLP_INT_STS_REG = (1 << (irq - MSP_SLP_INTBASE));
@@ -62,8 +55,7 @@ static inline void ack_msp_slp_irq(unsigned int irq)
62static struct irq_chip msp_slp_irq_controller = { 55static struct irq_chip msp_slp_irq_controller = {
63 .name = "MSP_SLP", 56 .name = "MSP_SLP",
64 .ack = ack_msp_slp_irq, 57 .ack = ack_msp_slp_irq,
65 .mask = ack_msp_slp_irq, 58 .mask = mask_msp_slp_irq,
66 .mask_ack = ack_msp_slp_irq,
67 .unmask = unmask_msp_slp_irq, 59 .unmask = unmask_msp_slp_irq,
68}; 60};
69 61
@@ -79,7 +71,7 @@ void __init msp_slp_irq_init(void)
79 71
80 /* initialize all the IRQ descriptors */ 72 /* initialize all the IRQ descriptors */
81 for (i = MSP_SLP_INTBASE; i < MSP_PER_INTBASE + 32; i++) 73 for (i = MSP_SLP_INTBASE; i < MSP_PER_INTBASE + 32; i++)
82 set_irq_chip_and_handler(i, &msp_slp_irq_controller 74 set_irq_chip_and_handler(i, &msp_slp_irq_controller,
83 handle_level_irq); 75 handle_level_irq);
84} 76}
85 77
diff --git a/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c b/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c
index caf5e9a0acc..fc990cb3194 100644
--- a/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c
+++ b/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c
3 *
4 * Copyright (C) 2003 PMC-Sierra Inc. 2 * Copyright (C) 2003 PMC-Sierra Inc.
5 * Author: Manish Lachwani (lachwani@pmc-sierra.com) 3 * Author: Manish Lachwani (lachwani@pmc-sierra.com)
6 * 4 *
diff --git a/arch/mips/sibyte/swarm/swarm-i2c.c b/arch/mips/sibyte/swarm/swarm-i2c.c
index 4282ac9d01d..062505054d4 100644
--- a/arch/mips/sibyte/swarm/swarm-i2c.c
+++ b/arch/mips/sibyte/swarm/swarm-i2c.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/mips/sibyte/swarm/swarm-i2c.c
3 *
4 * Broadcom BCM91250A (SWARM), etc. I2C platform setup. 2 * Broadcom BCM91250A (SWARM), etc. I2C platform setup.
5 * 3 *
6 * Copyright (c) 2008 Maciej W. Rozycki 4 * Copyright (c) 2008 Maciej W. Rozycki
diff --git a/arch/mips/txx9/generic/mem_tx4927.c b/arch/mips/txx9/generic/mem_tx4927.c
index ef6ea6e9787..70f9626f822 100644
--- a/arch/mips/txx9/generic/mem_tx4927.c
+++ b/arch/mips/txx9/generic/mem_tx4927.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/mips/txx9/generic/mem_tx4927.c
3 *
4 * common tx4927 memory interface 2 * common tx4927 memory interface
5 * 3 *
6 * Author: MontaVista Software, Inc. 4 * Author: MontaVista Software, Inc.
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index 3b7d77d61ce..a205e2ba8e7 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/mips/txx9/generic/setup.c
3 *
4 * Based on linux/arch/mips/txx9/rbtx4938/setup.c, 2 * Based on linux/arch/mips/txx9/rbtx4938/setup.c,
5 * and RBTX49xx patch from CELF patch archive. 3 * and RBTX49xx patch from CELF patch archive.
6 * 4 *
diff --git a/arch/mips/txx9/rbtx4939/setup.c b/arch/mips/txx9/rbtx4939/setup.c
index c033ffe71cd..b0c241ecf60 100644
--- a/arch/mips/txx9/rbtx4939/setup.c
+++ b/arch/mips/txx9/rbtx4939/setup.c
@@ -512,10 +512,10 @@ static void __init rbtx4939_setup(void)
512 rbtx4939_ebusc_setup(); 512 rbtx4939_ebusc_setup();
513 /* always enable ATA0 */ 513 /* always enable ATA0 */
514 txx9_set64(&tx4939_ccfgptr->pcfg, TX4939_PCFG_ATA0MODE); 514 txx9_set64(&tx4939_ccfgptr->pcfg, TX4939_PCFG_ATA0MODE);
515 rbtx4939_update_ioc_pen();
516 if (txx9_master_clock == 0) 515 if (txx9_master_clock == 0)
517 txx9_master_clock = 20000000; 516 txx9_master_clock = 20000000;
518 tx4939_setup(); 517 tx4939_setup();
518 rbtx4939_update_ioc_pen();
519#ifdef HAVE_RBTX4939_IOSWAB 519#ifdef HAVE_RBTX4939_IOSWAB
520 ioswabw = rbtx4939_ioswabw; 520 ioswabw = rbtx4939_ioswabw;
521 __mem_ioswabw = rbtx4939_mem_ioswabw; 521 __mem_ioswabw = rbtx4939_mem_ioswabw;
diff --git a/arch/mn10300/include/asm/pci.h b/arch/mn10300/include/asm/pci.h
index 35d2ed6396f..19aecc90f7a 100644
--- a/arch/mn10300/include/asm/pci.h
+++ b/arch/mn10300/include/asm/pci.h
@@ -59,7 +59,6 @@ void pcibios_penalize_isa_irq(int irq);
59#include <linux/slab.h> 59#include <linux/slab.h>
60#include <asm/scatterlist.h> 60#include <asm/scatterlist.h>
61#include <linux/string.h> 61#include <linux/string.h>
62#include <linux/mm.h>
63#include <asm/io.h> 62#include <asm/io.h>
64 63
65struct pci_dev; 64struct pci_dev;
diff --git a/arch/mn10300/include/asm/pgalloc.h b/arch/mn10300/include/asm/pgalloc.h
index ec057e1bd4c..a19f11327cd 100644
--- a/arch/mn10300/include/asm/pgalloc.h
+++ b/arch/mn10300/include/asm/pgalloc.h
@@ -51,6 +51,6 @@ static inline void pte_free(struct mm_struct *mm, struct page *pte)
51} 51}
52 52
53 53
54#define __pte_free_tlb(tlb, pte) tlb_remove_page((tlb), (pte)) 54#define __pte_free_tlb(tlb, pte, addr) tlb_remove_page((tlb), (pte))
55 55
56#endif /* _ASM_PGALLOC_H */ 56#endif /* _ASM_PGALLOC_H */
diff --git a/arch/mn10300/kernel/vmlinux.lds.S b/arch/mn10300/kernel/vmlinux.lds.S
index c96ba3da95a..f4aa0793465 100644
--- a/arch/mn10300/kernel/vmlinux.lds.S
+++ b/arch/mn10300/kernel/vmlinux.lds.S
@@ -107,7 +107,7 @@ SECTIONS
107 __init_end = .; 107 __init_end = .;
108 /* freed after init ends here */ 108 /* freed after init ends here */
109 109
110 BSS(4) 110 BSS_SECTION(0, PAGE_SIZE, 4)
111 111
112 _end = . ; 112 _end = . ;
113 113
diff --git a/arch/parisc/include/asm/tlb.h b/arch/parisc/include/asm/tlb.h
index 383b1db310e..07924903989 100644
--- a/arch/parisc/include/asm/tlb.h
+++ b/arch/parisc/include/asm/tlb.h
@@ -21,7 +21,7 @@ do { if (!(tlb)->fullmm) \
21 21
22#include <asm-generic/tlb.h> 22#include <asm-generic/tlb.h>
23 23
24#define __pmd_free_tlb(tlb, pmd) pmd_free((tlb)->mm, pmd) 24#define __pmd_free_tlb(tlb, pmd, addr) pmd_free((tlb)->mm, pmd)
25#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, pte) 25#define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, pte)
26 26
27#endif 27#endif
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
index ae3e70cd1e1..e552e547cb9 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -553,7 +553,7 @@
553 * on most of those machines only handles cache transactions. 553 * on most of those machines only handles cache transactions.
554 */ 554 */
555 extrd,u,*= \pte,_PAGE_NO_CACHE_BIT+32,1,%r0 555 extrd,u,*= \pte,_PAGE_NO_CACHE_BIT+32,1,%r0
556 depi 1,12,1,\prot 556 depdi 1,12,1,\prot
557 557
558 /* Drop prot bits and convert to page addr for iitlbt and idtlbt */ 558 /* Drop prot bits and convert to page addr for iitlbt and idtlbt */
559 convert_for_tlb_insert20 \pte 559 convert_for_tlb_insert20 \pte
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
index ef5caf2e6ed..61ee0eec4e6 100644
--- a/arch/parisc/kernel/module.c
+++ b/arch/parisc/kernel/module.c
@@ -86,8 +86,12 @@
86 * the bottom of the table, which has a maximum signed displacement of 86 * the bottom of the table, which has a maximum signed displacement of
87 * 0x3fff; however, since we're only going forward, this becomes 87 * 0x3fff; however, since we're only going forward, this becomes
88 * 0x1fff, and thus, since each GOT entry is 8 bytes long we can have 88 * 0x1fff, and thus, since each GOT entry is 8 bytes long we can have
89 * at most 1023 entries */ 89 * at most 1023 entries.
90#define MAX_GOTS 1023 90 * To overcome this 14bit displacement with some kernel modules, we'll
91 * use instead the unusal 16bit displacement method (see reassemble_16a)
92 * which gives us a maximum positive displacement of 0x7fff, and as such
93 * allows us to allocate up to 4095 GOT entries. */
94#define MAX_GOTS 4095
91 95
92/* three functions to determine where in the module core 96/* three functions to determine where in the module core
93 * or init pieces the location is */ 97 * or init pieces the location is */
@@ -145,12 +149,40 @@ struct stub_entry {
145/* The reassemble_* functions prepare an immediate value for 149/* The reassemble_* functions prepare an immediate value for
146 insertion into an opcode. pa-risc uses all sorts of weird bitfields 150 insertion into an opcode. pa-risc uses all sorts of weird bitfields
147 in the instruction to hold the value. */ 151 in the instruction to hold the value. */
152static inline int sign_unext(int x, int len)
153{
154 int len_ones;
155
156 len_ones = (1 << len) - 1;
157 return x & len_ones;
158}
159
160static inline int low_sign_unext(int x, int len)
161{
162 int sign, temp;
163
164 sign = (x >> (len-1)) & 1;
165 temp = sign_unext(x, len-1);
166 return (temp << 1) | sign;
167}
168
148static inline int reassemble_14(int as14) 169static inline int reassemble_14(int as14)
149{ 170{
150 return (((as14 & 0x1fff) << 1) | 171 return (((as14 & 0x1fff) << 1) |
151 ((as14 & 0x2000) >> 13)); 172 ((as14 & 0x2000) >> 13));
152} 173}
153 174
175static inline int reassemble_16a(int as16)
176{
177 int s, t;
178
179 /* Unusual 16-bit encoding, for wide mode only. */
180 t = (as16 << 1) & 0xffff;
181 s = (as16 & 0x8000);
182 return (t ^ s ^ (s >> 1)) | (s >> 15);
183}
184
185
154static inline int reassemble_17(int as17) 186static inline int reassemble_17(int as17)
155{ 187{
156 return (((as17 & 0x10000) >> 16) | 188 return (((as17 & 0x10000) >> 16) |
@@ -407,6 +439,7 @@ static Elf_Addr get_stub(struct module *me, unsigned long value, long addend,
407 enum elf_stub_type stub_type, Elf_Addr loc0, unsigned int targetsec) 439 enum elf_stub_type stub_type, Elf_Addr loc0, unsigned int targetsec)
408{ 440{
409 struct stub_entry *stub; 441 struct stub_entry *stub;
442 int __maybe_unused d;
410 443
411 /* initialize stub_offset to point in front of the section */ 444 /* initialize stub_offset to point in front of the section */
412 if (!me->arch.section[targetsec].stub_offset) { 445 if (!me->arch.section[targetsec].stub_offset) {
@@ -460,12 +493,19 @@ static Elf_Addr get_stub(struct module *me, unsigned long value, long addend,
460 */ 493 */
461 switch (stub_type) { 494 switch (stub_type) {
462 case ELF_STUB_GOT: 495 case ELF_STUB_GOT:
463 stub->insns[0] = 0x537b0000; /* ldd 0(%dp),%dp */ 496 d = get_got(me, value, addend);
497 if (d <= 15) {
498 /* Format 5 */
499 stub->insns[0] = 0x0f6010db; /* ldd 0(%dp),%dp */
500 stub->insns[0] |= low_sign_unext(d, 5) << 16;
501 } else {
502 /* Format 3 */
503 stub->insns[0] = 0x537b0000; /* ldd 0(%dp),%dp */
504 stub->insns[0] |= reassemble_16a(d);
505 }
464 stub->insns[1] = 0x53610020; /* ldd 10(%dp),%r1 */ 506 stub->insns[1] = 0x53610020; /* ldd 10(%dp),%r1 */
465 stub->insns[2] = 0xe820d000; /* bve (%r1) */ 507 stub->insns[2] = 0xe820d000; /* bve (%r1) */
466 stub->insns[3] = 0x537b0030; /* ldd 18(%dp),%dp */ 508 stub->insns[3] = 0x537b0030; /* ldd 18(%dp),%dp */
467
468 stub->insns[0] |= reassemble_14(get_got(me, value, addend) & 0x3fff);
469 break; 509 break;
470 case ELF_STUB_MILLI: 510 case ELF_STUB_MILLI:
471 stub->insns[0] = 0x20200000; /* ldil 0,%r1 */ 511 stub->insns[0] = 0x20200000; /* ldil 0,%r1 */
diff --git a/arch/powerpc/boot/dts/mpc8377_rdb.dts b/arch/powerpc/boot/dts/mpc8377_rdb.dts
index 224b4f0704b..4f06dbc0d27 100644
--- a/arch/powerpc/boot/dts/mpc8377_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8377_rdb.dts
@@ -410,7 +410,7 @@
410 bus-range = <0 0>; 410 bus-range = <0 0>;
411 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000 411 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
412 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000 412 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
413 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>; 413 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>;
414 sleep = <&pmc 0x00010000>; 414 sleep = <&pmc 0x00010000>;
415 clock-frequency = <66666666>; 415 clock-frequency = <66666666>;
416 #interrupt-cells = <1>; 416 #interrupt-cells = <1>;
diff --git a/arch/powerpc/boot/dts/mpc8378_rdb.dts b/arch/powerpc/boot/dts/mpc8378_rdb.dts
index 474ea2fa3f8..aabf3437cad 100644
--- a/arch/powerpc/boot/dts/mpc8378_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8378_rdb.dts
@@ -394,7 +394,7 @@
394 bus-range = <0 0>; 394 bus-range = <0 0>;
395 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000 395 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
396 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000 396 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
397 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>; 397 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>;
398 sleep = <&pmc 0x00010000>; 398 sleep = <&pmc 0x00010000>;
399 clock-frequency = <66666666>; 399 clock-frequency = <66666666>;
400 #interrupt-cells = <1>; 400 #interrupt-cells = <1>;
diff --git a/arch/powerpc/boot/dts/mpc8379_rdb.dts b/arch/powerpc/boot/dts/mpc8379_rdb.dts
index d4838af8d37..9b1da864d89 100644
--- a/arch/powerpc/boot/dts/mpc8379_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8379_rdb.dts
@@ -424,7 +424,7 @@
424 bus-range = <0x0 0x0>; 424 bus-range = <0x0 0x0>;
425 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000 425 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
426 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000 426 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
427 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>; 427 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>;
428 sleep = <&pmc 0x00010000>; 428 sleep = <&pmc 0x00010000>;
429 clock-frequency = <66666666>; 429 clock-frequency = <66666666>;
430 #interrupt-cells = <1>; 430 #interrupt-cells = <1>;
diff --git a/arch/powerpc/boot/dts/mpc8569mds.dts b/arch/powerpc/boot/dts/mpc8569mds.dts
index a680165292f..9e4ce99e161 100644
--- a/arch/powerpc/boot/dts/mpc8569mds.dts
+++ b/arch/powerpc/boot/dts/mpc8569mds.dts
@@ -501,6 +501,10 @@
501 reg = <0x6>; 501 reg = <0x6>;
502 device_type = "ethernet-phy"; 502 device_type = "ethernet-phy";
503 }; 503 };
504 tbi-phy@11 {
505 reg = <0x11>;
506 device_type = "tbi-phy";
507 };
504 }; 508 };
505 mdio@3520 { 509 mdio@3520 {
506 #address-cells = <1>; 510 #address-cells = <1>;
diff --git a/arch/powerpc/configs/83xx/asp8347_defconfig b/arch/powerpc/configs/83xx/asp8347_defconfig
index 27893971377..a2df0635b6d 100644
--- a/arch/powerpc/configs/83xx/asp8347_defconfig
+++ b/arch/powerpc/configs/83xx/asp8347_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:05 2009 4# Wed Jul 29 23:32:02 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19CONFIG_FSL_EMB_PERFMON=y 20CONFIG_FSL_EMB_PERFMON=y
20# CONFIG_ALTIVEC is not set 21# CONFIG_ALTIVEC is not set
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24# CONFIG_SMP is not set 26# CONFIG_SMP is not set
25CONFIG_PPC32=y 27CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32 28CONFIG_WORD_SIZE=32
@@ -31,15 +33,16 @@ CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y 33CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y 34CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y 35CONFIG_GENERIC_HARDIRQS=y
36CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y 38CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y 39CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y 40CONFIG_HAVE_LATENCYTOP_SUPPORT=y
41CONFIG_TRACE_IRQFLAGS_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y 42CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y 43CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y 44CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y 45CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y 46CONFIG_GENERIC_FIND_NEXT_BIT=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
45CONFIG_PPC=y 48CONFIG_PPC=y
@@ -53,6 +56,7 @@ CONFIG_PPC_UDBG_16550=y
53# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
56# CONFIG_DEFAULT_UIMAGE is not set 60# CONFIG_DEFAULT_UIMAGE is not set
57CONFIG_REDBOOT=y 61CONFIG_REDBOOT=y
58CONFIG_ARCH_SUSPEND_POSSIBLE=y 62CONFIG_ARCH_SUSPEND_POSSIBLE=y
@@ -60,6 +64,7 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y
60# CONFIG_PPC_DCR_MMIO is not set 64# CONFIG_PPC_DCR_MMIO is not set
61CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 65CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
62CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 66CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
67CONFIG_CONSTRUCTORS=y
63 68
64# 69#
65# General setup 70# General setup
@@ -108,7 +113,6 @@ CONFIG_ANON_INODES=y
108CONFIG_EMBEDDED=y 113CONFIG_EMBEDDED=y
109CONFIG_SYSCTL_SYSCALL=y 114CONFIG_SYSCTL_SYSCALL=y
110# CONFIG_KALLSYMS is not set 115# CONFIG_KALLSYMS is not set
111# CONFIG_STRIP_ASM_SYMS is not set
112CONFIG_HOTPLUG=y 116CONFIG_HOTPLUG=y
113CONFIG_PRINTK=y 117CONFIG_PRINTK=y
114CONFIG_BUG=y 118CONFIG_BUG=y
@@ -121,9 +125,16 @@ CONFIG_TIMERFD=y
121CONFIG_EVENTFD=y 125CONFIG_EVENTFD=y
122CONFIG_SHMEM=y 126CONFIG_SHMEM=y
123CONFIG_AIO=y 127CONFIG_AIO=y
128CONFIG_HAVE_PERF_COUNTERS=y
129
130#
131# Performance Counters
132#
133# CONFIG_PERF_COUNTERS is not set
124CONFIG_VM_EVENT_COUNTERS=y 134CONFIG_VM_EVENT_COUNTERS=y
125CONFIG_PCI_QUIRKS=y 135CONFIG_PCI_QUIRKS=y
126CONFIG_SLUB_DEBUG=y 136CONFIG_SLUB_DEBUG=y
137# CONFIG_STRIP_ASM_SYMS is not set
127CONFIG_COMPAT_BRK=y 138CONFIG_COMPAT_BRK=y
128# CONFIG_SLAB is not set 139# CONFIG_SLAB is not set
129CONFIG_SLUB=y 140CONFIG_SLUB=y
@@ -136,6 +147,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
136CONFIG_HAVE_KPROBES=y 147CONFIG_HAVE_KPROBES=y
137CONFIG_HAVE_KRETPROBES=y 148CONFIG_HAVE_KRETPROBES=y
138CONFIG_HAVE_ARCH_TRACEHOOK=y 149CONFIG_HAVE_ARCH_TRACEHOOK=y
150
151#
152# GCOV-based kernel profiling
153#
139# CONFIG_SLOW_WORK is not set 154# CONFIG_SLOW_WORK is not set
140# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 155# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
141CONFIG_SLABINFO=y 156CONFIG_SLABINFO=y
@@ -148,7 +163,7 @@ CONFIG_MODULE_UNLOAD=y
148# CONFIG_MODVERSIONS is not set 163# CONFIG_MODVERSIONS is not set
149# CONFIG_MODULE_SRCVERSION_ALL is not set 164# CONFIG_MODULE_SRCVERSION_ALL is not set
150CONFIG_BLOCK=y 165CONFIG_BLOCK=y
151# CONFIG_LBD is not set 166CONFIG_LBDAF=y
152# CONFIG_BLK_DEV_BSG is not set 167# CONFIG_BLK_DEV_BSG is not set
153# CONFIG_BLK_DEV_INTEGRITY is not set 168# CONFIG_BLK_DEV_INTEGRITY is not set
154 169
@@ -190,6 +205,7 @@ CONFIG_PPC_83xx=y
190# CONFIG_MPC837x_RDB is not set 205# CONFIG_MPC837x_RDB is not set
191# CONFIG_SBC834x is not set 206# CONFIG_SBC834x is not set
192CONFIG_ASP834x=y 207CONFIG_ASP834x=y
208# CONFIG_KMETER1 is not set
193CONFIG_PPC_MPC834x=y 209CONFIG_PPC_MPC834x=y
194# CONFIG_PPC_86xx is not set 210# CONFIG_PPC_86xx is not set
195# CONFIG_EMBEDDED6xx is not set 211# CONFIG_EMBEDDED6xx is not set
@@ -235,6 +251,7 @@ CONFIG_BINFMT_ELF=y
235# CONFIG_HAVE_AOUT is not set 251# CONFIG_HAVE_AOUT is not set
236# CONFIG_BINFMT_MISC is not set 252# CONFIG_BINFMT_MISC is not set
237# CONFIG_IOMMU_HELPER is not set 253# CONFIG_IOMMU_HELPER is not set
254# CONFIG_SWIOTLB is not set
238CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 255CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
239CONFIG_ARCH_HAS_WALK_MEMORY=y 256CONFIG_ARCH_HAS_WALK_MEMORY=y
240CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 257CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -255,9 +272,9 @@ CONFIG_MIGRATION=y
255CONFIG_ZONE_DMA_FLAG=1 272CONFIG_ZONE_DMA_FLAG=1
256CONFIG_BOUNCE=y 273CONFIG_BOUNCE=y
257CONFIG_VIRT_TO_BUS=y 274CONFIG_VIRT_TO_BUS=y
258CONFIG_UNEVICTABLE_LRU=y
259CONFIG_HAVE_MLOCK=y 275CONFIG_HAVE_MLOCK=y
260CONFIG_HAVE_MLOCKED_PAGE_BIT=y 276CONFIG_HAVE_MLOCKED_PAGE_BIT=y
277CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
261CONFIG_PPC_4K_PAGES=y 278CONFIG_PPC_4K_PAGES=y
262# CONFIG_PPC_16K_PAGES is not set 279# CONFIG_PPC_16K_PAGES is not set
263# CONFIG_PPC_64K_PAGES is not set 280# CONFIG_PPC_64K_PAGES is not set
@@ -366,6 +383,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
366# CONFIG_ECONET is not set 383# CONFIG_ECONET is not set
367# CONFIG_WAN_ROUTER is not set 384# CONFIG_WAN_ROUTER is not set
368# CONFIG_PHONET is not set 385# CONFIG_PHONET is not set
386# CONFIG_IEEE802154 is not set
369# CONFIG_NET_SCHED is not set 387# CONFIG_NET_SCHED is not set
370# CONFIG_DCB is not set 388# CONFIG_DCB is not set
371 389
@@ -383,7 +401,11 @@ CONFIG_WIRELESS=y
383CONFIG_WIRELESS_OLD_REGULATORY=y 401CONFIG_WIRELESS_OLD_REGULATORY=y
384# CONFIG_WIRELESS_EXT is not set 402# CONFIG_WIRELESS_EXT is not set
385# CONFIG_LIB80211 is not set 403# CONFIG_LIB80211 is not set
386# CONFIG_MAC80211 is not set 404
405#
406# CFG80211 needs to be enabled for MAC80211
407#
408CONFIG_MAC80211_DEFAULT_PS_VALUE=0
387# CONFIG_WIMAX is not set 409# CONFIG_WIMAX is not set
388# CONFIG_RFKILL is not set 410# CONFIG_RFKILL is not set
389# CONFIG_NET_9P is not set 411# CONFIG_NET_9P is not set
@@ -490,6 +512,7 @@ CONFIG_MTD_PHYSMAP_OF=y
490# CONFIG_MTD_UBI is not set 512# CONFIG_MTD_UBI is not set
491CONFIG_OF_DEVICE=y 513CONFIG_OF_DEVICE=y
492CONFIG_OF_I2C=y 514CONFIG_OF_I2C=y
515CONFIG_OF_MDIO=y
493# CONFIG_PARPORT is not set 516# CONFIG_PARPORT is not set
494CONFIG_BLK_DEV=y 517CONFIG_BLK_DEV=y
495# CONFIG_BLK_DEV_FD is not set 518# CONFIG_BLK_DEV_FD is not set
@@ -525,7 +548,9 @@ CONFIG_MISC_DEVICES=y
525# 548#
526# CONFIG_EEPROM_AT24 is not set 549# CONFIG_EEPROM_AT24 is not set
527# CONFIG_EEPROM_LEGACY is not set 550# CONFIG_EEPROM_LEGACY is not set
551# CONFIG_EEPROM_MAX6875 is not set
528# CONFIG_EEPROM_93CX6 is not set 552# CONFIG_EEPROM_93CX6 is not set
553# CONFIG_CB710_CORE is not set
529CONFIG_HAVE_IDE=y 554CONFIG_HAVE_IDE=y
530# CONFIG_IDE is not set 555# CONFIG_IDE is not set
531 556
@@ -545,14 +570,17 @@ CONFIG_HAVE_IDE=y
545# 570#
546 571
547# 572#
548# Enable only one of the two stacks, unless you know what you are doing 573# You can enable one or both FireWire driver stacks.
574#
575
576#
577# See the help texts for more information.
549# 578#
550# CONFIG_FIREWIRE is not set 579# CONFIG_FIREWIRE is not set
551# CONFIG_IEEE1394 is not set 580# CONFIG_IEEE1394 is not set
552# CONFIG_I2O is not set 581# CONFIG_I2O is not set
553# CONFIG_MACINTOSH_DRIVERS is not set 582# CONFIG_MACINTOSH_DRIVERS is not set
554CONFIG_NETDEVICES=y 583CONFIG_NETDEVICES=y
555CONFIG_COMPAT_NET_DEV_OPS=y
556# CONFIG_DUMMY is not set 584# CONFIG_DUMMY is not set
557# CONFIG_BONDING is not set 585# CONFIG_BONDING is not set
558# CONFIG_MACVLAN is not set 586# CONFIG_MACVLAN is not set
@@ -599,6 +627,7 @@ CONFIG_MII=y
599# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 627# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
600# CONFIG_NET_PCI is not set 628# CONFIG_NET_PCI is not set
601# CONFIG_B44 is not set 629# CONFIG_B44 is not set
630# CONFIG_KS8842 is not set
602# CONFIG_ATL2 is not set 631# CONFIG_ATL2 is not set
603CONFIG_NETDEV_1000=y 632CONFIG_NETDEV_1000=y
604# CONFIG_ACENIC is not set 633# CONFIG_ACENIC is not set
@@ -618,8 +647,10 @@ CONFIG_NETDEV_1000=y
618# CONFIG_VIA_VELOCITY is not set 647# CONFIG_VIA_VELOCITY is not set
619# CONFIG_TIGON3 is not set 648# CONFIG_TIGON3 is not set
620# CONFIG_BNX2 is not set 649# CONFIG_BNX2 is not set
650# CONFIG_CNIC is not set
621CONFIG_FSL_PQ_MDIO=y 651CONFIG_FSL_PQ_MDIO=y
622CONFIG_GIANFAR=y 652CONFIG_GIANFAR=y
653# CONFIG_MV643XX_ETH is not set
623# CONFIG_QLA3XXX is not set 654# CONFIG_QLA3XXX is not set
624# CONFIG_ATL1 is not set 655# CONFIG_ATL1 is not set
625# CONFIG_ATL1E is not set 656# CONFIG_ATL1E is not set
@@ -786,13 +817,17 @@ CONFIG_I2C_MPC=y
786# CONFIG_SENSORS_PCF8574 is not set 817# CONFIG_SENSORS_PCF8574 is not set
787# CONFIG_PCF8575 is not set 818# CONFIG_PCF8575 is not set
788# CONFIG_SENSORS_PCA9539 is not set 819# CONFIG_SENSORS_PCA9539 is not set
789# CONFIG_SENSORS_MAX6875 is not set
790# CONFIG_SENSORS_TSL2550 is not set 820# CONFIG_SENSORS_TSL2550 is not set
791# CONFIG_I2C_DEBUG_CORE is not set 821# CONFIG_I2C_DEBUG_CORE is not set
792# CONFIG_I2C_DEBUG_ALGO is not set 822# CONFIG_I2C_DEBUG_ALGO is not set
793# CONFIG_I2C_DEBUG_BUS is not set 823# CONFIG_I2C_DEBUG_BUS is not set
794# CONFIG_I2C_DEBUG_CHIP is not set 824# CONFIG_I2C_DEBUG_CHIP is not set
795# CONFIG_SPI is not set 825# CONFIG_SPI is not set
826
827#
828# PPS support
829#
830# CONFIG_PPS is not set
796CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 831CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
797# CONFIG_GPIOLIB is not set 832# CONFIG_GPIOLIB is not set
798# CONFIG_W1 is not set 833# CONFIG_W1 is not set
@@ -847,6 +882,7 @@ CONFIG_HWMON=y
847# CONFIG_SENSORS_SMSC47B397 is not set 882# CONFIG_SENSORS_SMSC47B397 is not set
848# CONFIG_SENSORS_ADS7828 is not set 883# CONFIG_SENSORS_ADS7828 is not set
849# CONFIG_SENSORS_THMC50 is not set 884# CONFIG_SENSORS_THMC50 is not set
885# CONFIG_SENSORS_TMP401 is not set
850# CONFIG_SENSORS_VIA686A is not set 886# CONFIG_SENSORS_VIA686A is not set
851# CONFIG_SENSORS_VT1211 is not set 887# CONFIG_SENSORS_VT1211 is not set
852# CONFIG_SENSORS_VT8231 is not set 888# CONFIG_SENSORS_VT8231 is not set
@@ -900,24 +936,9 @@ CONFIG_SSB_POSSIBLE=y
900# CONFIG_MFD_WM8400 is not set 936# CONFIG_MFD_WM8400 is not set
901# CONFIG_MFD_WM8350_I2C is not set 937# CONFIG_MFD_WM8350_I2C is not set
902# CONFIG_MFD_PCF50633 is not set 938# CONFIG_MFD_PCF50633 is not set
939# CONFIG_AB3100_CORE is not set
903# CONFIG_REGULATOR is not set 940# CONFIG_REGULATOR is not set
904 941# CONFIG_MEDIA_SUPPORT is not set
905#
906# Multimedia devices
907#
908
909#
910# Multimedia core support
911#
912# CONFIG_VIDEO_DEV is not set
913# CONFIG_DVB_CORE is not set
914# CONFIG_VIDEO_MEDIA is not set
915
916#
917# Multimedia drivers
918#
919CONFIG_DAB=y
920# CONFIG_USB_DABUSB is not set
921 942
922# 943#
923# Graphics support 944# Graphics support
@@ -960,6 +981,7 @@ CONFIG_USB_MON=y
960# USB Host Controller Drivers 981# USB Host Controller Drivers
961# 982#
962# CONFIG_USB_C67X00_HCD is not set 983# CONFIG_USB_C67X00_HCD is not set
984# CONFIG_USB_XHCI_HCD is not set
963CONFIG_USB_EHCI_HCD=y 985CONFIG_USB_EHCI_HCD=y
964CONFIG_USB_EHCI_ROOT_HUB_TT=y 986CONFIG_USB_EHCI_ROOT_HUB_TT=y
965# CONFIG_USB_EHCI_TT_NEWSCHED is not set 987# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1069,6 +1091,7 @@ CONFIG_RTC_DRV_DS1374=y
1069# CONFIG_RTC_DRV_S35390A is not set 1091# CONFIG_RTC_DRV_S35390A is not set
1070# CONFIG_RTC_DRV_FM3130 is not set 1092# CONFIG_RTC_DRV_FM3130 is not set
1071# CONFIG_RTC_DRV_RX8581 is not set 1093# CONFIG_RTC_DRV_RX8581 is not set
1094# CONFIG_RTC_DRV_RX8025 is not set
1072 1095
1073# 1096#
1074# SPI RTC drivers 1097# SPI RTC drivers
@@ -1096,6 +1119,10 @@ CONFIG_RTC_DRV_DS1374=y
1096# CONFIG_DMADEVICES is not set 1119# CONFIG_DMADEVICES is not set
1097# CONFIG_AUXDISPLAY is not set 1120# CONFIG_AUXDISPLAY is not set
1098# CONFIG_UIO is not set 1121# CONFIG_UIO is not set
1122
1123#
1124# TI VLYNQ
1125#
1099# CONFIG_STAGING is not set 1126# CONFIG_STAGING is not set
1100 1127
1101# 1128#
@@ -1115,10 +1142,12 @@ CONFIG_FS_MBCACHE=y
1115# CONFIG_REISERFS_FS is not set 1142# CONFIG_REISERFS_FS is not set
1116# CONFIG_JFS_FS is not set 1143# CONFIG_JFS_FS is not set
1117# CONFIG_FS_POSIX_ACL is not set 1144# CONFIG_FS_POSIX_ACL is not set
1118CONFIG_FILE_LOCKING=y
1119# CONFIG_XFS_FS is not set 1145# CONFIG_XFS_FS is not set
1146# CONFIG_GFS2_FS is not set
1120# CONFIG_OCFS2_FS is not set 1147# CONFIG_OCFS2_FS is not set
1121# CONFIG_BTRFS_FS is not set 1148# CONFIG_BTRFS_FS is not set
1149CONFIG_FILE_LOCKING=y
1150CONFIG_FSNOTIFY=y
1122CONFIG_DNOTIFY=y 1151CONFIG_DNOTIFY=y
1123CONFIG_INOTIFY=y 1152CONFIG_INOTIFY=y
1124CONFIG_INOTIFY_USER=y 1153CONFIG_INOTIFY_USER=y
@@ -1192,6 +1221,7 @@ CONFIG_NFS_FS=y
1192CONFIG_NFS_V3=y 1221CONFIG_NFS_V3=y
1193# CONFIG_NFS_V3_ACL is not set 1222# CONFIG_NFS_V3_ACL is not set
1194CONFIG_NFS_V4=y 1223CONFIG_NFS_V4=y
1224# CONFIG_NFS_V4_1 is not set
1195CONFIG_ROOT_NFS=y 1225CONFIG_ROOT_NFS=y
1196# CONFIG_NFSD is not set 1226# CONFIG_NFSD is not set
1197CONFIG_LOCKD=y 1227CONFIG_LOCKD=y
@@ -1287,6 +1317,7 @@ CONFIG_HAS_IOPORT=y
1287CONFIG_HAS_DMA=y 1317CONFIG_HAS_DMA=y
1288CONFIG_HAVE_LMB=y 1318CONFIG_HAVE_LMB=y
1289CONFIG_NLATTR=y 1319CONFIG_NLATTR=y
1320CONFIG_GENERIC_ATOMIC64=y
1290 1321
1291# 1322#
1292# Kernel hacking 1323# Kernel hacking
@@ -1312,22 +1343,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1312CONFIG_HAVE_DYNAMIC_FTRACE=y 1343CONFIG_HAVE_DYNAMIC_FTRACE=y
1313CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1344CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1314CONFIG_TRACING_SUPPORT=y 1345CONFIG_TRACING_SUPPORT=y
1315 1346# CONFIG_FTRACE is not set
1316#
1317# Tracers
1318#
1319# CONFIG_FUNCTION_TRACER is not set
1320# CONFIG_SCHED_TRACER is not set
1321# CONFIG_CONTEXT_SWITCH_TRACER is not set
1322# CONFIG_EVENT_TRACER is not set
1323# CONFIG_BOOT_TRACER is not set
1324# CONFIG_TRACE_BRANCH_PROFILING is not set
1325# CONFIG_STACK_TRACER is not set
1326# CONFIG_KMEMTRACE is not set
1327# CONFIG_WORKQUEUE_TRACER is not set
1328# CONFIG_BLK_DEV_IO_TRACE is not set
1329# CONFIG_SAMPLES is not set 1347# CONFIG_SAMPLES is not set
1330CONFIG_HAVE_ARCH_KGDB=y 1348CONFIG_HAVE_ARCH_KGDB=y
1349# CONFIG_PPC_DISABLE_WERROR is not set
1350CONFIG_PPC_WERROR=y
1331CONFIG_PRINT_STACK_DEPTH=64 1351CONFIG_PRINT_STACK_DEPTH=64
1332# CONFIG_IRQSTACKS is not set 1352# CONFIG_IRQSTACKS is not set
1333# CONFIG_BOOTX_TEXT is not set 1353# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/83xx/kmeter1_defconfig b/arch/powerpc/configs/83xx/kmeter1_defconfig
index bf0853f29f3..93ebd443a18 100644
--- a/arch/powerpc/configs/83xx/kmeter1_defconfig
+++ b/arch/powerpc/configs/83xx/kmeter1_defconfig
@@ -1,25 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.31-rc4
4# Fri Apr 3 10:34:33 2009 4# Wed Jul 29 23:32:03 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
17CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
18# CONFIG_FSL_EMB_PERFMON is not set 20# CONFIG_FSL_EMB_PERFMON is not set
19# CONFIG_ALTIVEC is not set 21# CONFIG_ALTIVEC is not set
20CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
21CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
22# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
23# CONFIG_SMP is not set 26# CONFIG_SMP is not set
24CONFIG_PPC32=y 27CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32 28CONFIG_WORD_SIZE=32
@@ -30,21 +33,22 @@ CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y 33CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y 34CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 35CONFIG_GENERIC_HARDIRQS=y
36CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 38CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y 39CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_HAVE_LATENCYTOP_SUPPORT=y 40CONFIG_HAVE_LATENCYTOP_SUPPORT=y
41CONFIG_TRACE_IRQFLAGS_SUPPORT=y
37CONFIG_LOCKDEP_SUPPORT=y 42CONFIG_LOCKDEP_SUPPORT=y
38CONFIG_RWSEM_XCHGADD_ALGORITHM=y 43CONFIG_RWSEM_XCHGADD_ALGORITHM=y
39CONFIG_ARCH_HAS_ILOG2_U32=y 44CONFIG_ARCH_HAS_ILOG2_U32=y
40CONFIG_GENERIC_HWEIGHT=y 45CONFIG_GENERIC_HWEIGHT=y
41CONFIG_GENERIC_CALIBRATE_DELAY=y
42CONFIG_GENERIC_FIND_NEXT_BIT=y 46CONFIG_GENERIC_FIND_NEXT_BIT=y
43# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
44CONFIG_PPC=y 48CONFIG_PPC=y
45CONFIG_EARLY_PRINTK=y 49CONFIG_EARLY_PRINTK=y
46CONFIG_GENERIC_NVRAM=y 50CONFIG_GENERIC_NVRAM=y
47CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 51CONFIG_SCHED_OMIT_FRAME_POINTER=y
48CONFIG_ARCH_MAY_HAVE_PC_FDC=y 52CONFIG_ARCH_MAY_HAVE_PC_FDC=y
49CONFIG_PPC_OF=y 53CONFIG_PPC_OF=y
50CONFIG_OF=y 54CONFIG_OF=y
@@ -52,11 +56,14 @@ CONFIG_PPC_UDBG_16550=y
52# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
53CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
54CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
55CONFIG_DEFAULT_UIMAGE=y 60CONFIG_DEFAULT_UIMAGE=y
56CONFIG_ARCH_SUSPEND_POSSIBLE=y 61CONFIG_ARCH_SUSPEND_POSSIBLE=y
57# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
58# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
59CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
60 67
61# 68#
62# General setup 69# General setup
@@ -71,19 +78,30 @@ CONFIG_LOCALVERSION_AUTO=y
71CONFIG_SYSVIPC=y 78CONFIG_SYSVIPC=y
72CONFIG_SYSVIPC_SYSCTL=y 79CONFIG_SYSVIPC_SYSCTL=y
73CONFIG_POSIX_MQUEUE=y 80CONFIG_POSIX_MQUEUE=y
81CONFIG_POSIX_MQUEUE_SYSCTL=y
74# CONFIG_BSD_PROCESS_ACCT is not set 82# CONFIG_BSD_PROCESS_ACCT is not set
75# CONFIG_TASKSTATS is not set 83# CONFIG_TASKSTATS is not set
76# CONFIG_AUDIT is not set 84# CONFIG_AUDIT is not set
85
86#
87# RCU Subsystem
88#
89CONFIG_CLASSIC_RCU=y
90# CONFIG_TREE_RCU is not set
91# CONFIG_PREEMPT_RCU is not set
92# CONFIG_TREE_RCU_TRACE is not set
93# CONFIG_PREEMPT_RCU_TRACE is not set
77# CONFIG_IKCONFIG is not set 94# CONFIG_IKCONFIG is not set
78CONFIG_LOG_BUF_SHIFT=14 95CONFIG_LOG_BUF_SHIFT=14
79# CONFIG_CGROUPS is not set
80# CONFIG_GROUP_SCHED is not set 96# CONFIG_GROUP_SCHED is not set
97# CONFIG_CGROUPS is not set
81# CONFIG_SYSFS_DEPRECATED_V2 is not set 98# CONFIG_SYSFS_DEPRECATED_V2 is not set
82# CONFIG_RELAY is not set 99# CONFIG_RELAY is not set
83# CONFIG_NAMESPACES is not set 100# CONFIG_NAMESPACES is not set
84# CONFIG_BLK_DEV_INITRD is not set 101# CONFIG_BLK_DEV_INITRD is not set
85CONFIG_CC_OPTIMIZE_FOR_SIZE=y 102CONFIG_CC_OPTIMIZE_FOR_SIZE=y
86CONFIG_SYSCTL=y 103CONFIG_SYSCTL=y
104CONFIG_ANON_INODES=y
87CONFIG_EMBEDDED=y 105CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 106CONFIG_SYSCTL_SYSCALL=y
89CONFIG_KALLSYMS=y 107CONFIG_KALLSYMS=y
@@ -93,17 +111,23 @@ CONFIG_KALLSYMS_ALL=y
93CONFIG_PRINTK=y 111CONFIG_PRINTK=y
94CONFIG_BUG=y 112CONFIG_BUG=y
95CONFIG_ELF_CORE=y 113CONFIG_ELF_CORE=y
96CONFIG_COMPAT_BRK=y
97CONFIG_BASE_FULL=y 114CONFIG_BASE_FULL=y
98CONFIG_FUTEX=y 115CONFIG_FUTEX=y
99CONFIG_ANON_INODES=y
100CONFIG_EPOLL=y 116CONFIG_EPOLL=y
101CONFIG_SIGNALFD=y 117CONFIG_SIGNALFD=y
102CONFIG_TIMERFD=y 118CONFIG_TIMERFD=y
103CONFIG_EVENTFD=y 119CONFIG_EVENTFD=y
104CONFIG_SHMEM=y 120CONFIG_SHMEM=y
105CONFIG_AIO=y 121CONFIG_AIO=y
122CONFIG_HAVE_PERF_COUNTERS=y
123
124#
125# Performance Counters
126#
127# CONFIG_PERF_COUNTERS is not set
106CONFIG_VM_EVENT_COUNTERS=y 128CONFIG_VM_EVENT_COUNTERS=y
129# CONFIG_STRIP_ASM_SYMS is not set
130CONFIG_COMPAT_BRK=y
107CONFIG_SLAB=y 131CONFIG_SLAB=y
108# CONFIG_SLUB is not set 132# CONFIG_SLUB is not set
109# CONFIG_SLOB is not set 133# CONFIG_SLOB is not set
@@ -116,10 +140,15 @@ CONFIG_HAVE_IOREMAP_PROT=y
116CONFIG_HAVE_KPROBES=y 140CONFIG_HAVE_KPROBES=y
117CONFIG_HAVE_KRETPROBES=y 141CONFIG_HAVE_KRETPROBES=y
118CONFIG_HAVE_ARCH_TRACEHOOK=y 142CONFIG_HAVE_ARCH_TRACEHOOK=y
143
144#
145# GCOV-based kernel profiling
146#
147# CONFIG_GCOV_KERNEL is not set
148# CONFIG_SLOW_WORK is not set
119# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 149# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
120CONFIG_SLABINFO=y 150CONFIG_SLABINFO=y
121CONFIG_RT_MUTEXES=y 151CONFIG_RT_MUTEXES=y
122# CONFIG_TINY_SHMEM is not set
123CONFIG_BASE_SMALL=0 152CONFIG_BASE_SMALL=0
124CONFIG_MODULES=y 153CONFIG_MODULES=y
125# CONFIG_MODULE_FORCE_LOAD is not set 154# CONFIG_MODULE_FORCE_LOAD is not set
@@ -127,11 +156,8 @@ CONFIG_MODULE_UNLOAD=y
127# CONFIG_MODULE_FORCE_UNLOAD is not set 156# CONFIG_MODULE_FORCE_UNLOAD is not set
128# CONFIG_MODVERSIONS is not set 157# CONFIG_MODVERSIONS is not set
129# CONFIG_MODULE_SRCVERSION_ALL is not set 158# CONFIG_MODULE_SRCVERSION_ALL is not set
130CONFIG_KMOD=y
131CONFIG_BLOCK=y 159CONFIG_BLOCK=y
132# CONFIG_LBD is not set 160CONFIG_LBDAF=y
133# CONFIG_BLK_DEV_IO_TRACE is not set
134# CONFIG_LSF is not set
135# CONFIG_BLK_DEV_BSG is not set 161# CONFIG_BLK_DEV_BSG is not set
136# CONFIG_BLK_DEV_INTEGRITY is not set 162# CONFIG_BLK_DEV_INTEGRITY is not set
137 163
@@ -147,14 +173,11 @@ CONFIG_IOSCHED_NOOP=y
147# CONFIG_DEFAULT_CFQ is not set 173# CONFIG_DEFAULT_CFQ is not set
148CONFIG_DEFAULT_NOOP=y 174CONFIG_DEFAULT_NOOP=y
149CONFIG_DEFAULT_IOSCHED="noop" 175CONFIG_DEFAULT_IOSCHED="noop"
150CONFIG_CLASSIC_RCU=y
151# CONFIG_FREEZER is not set 176# CONFIG_FREEZER is not set
152 177
153# 178#
154# Platform support 179# Platform support
155# 180#
156CONFIG_PPC_MULTIPLATFORM=y
157CONFIG_CLASSIC32=y
158# CONFIG_PPC_CHRP is not set 181# CONFIG_PPC_CHRP is not set
159# CONFIG_MPC5121_ADS is not set 182# CONFIG_MPC5121_ADS is not set
160# CONFIG_MPC5121_GENERIC is not set 183# CONFIG_MPC5121_GENERIC is not set
@@ -179,6 +202,8 @@ CONFIG_PPC_83xx=y
179CONFIG_KMETER1=y 202CONFIG_KMETER1=y
180# CONFIG_PPC_86xx is not set 203# CONFIG_PPC_86xx is not set
181# CONFIG_EMBEDDED6xx is not set 204# CONFIG_EMBEDDED6xx is not set
205# CONFIG_AMIGAONE is not set
206CONFIG_PPC_OF_BOOT_TRAMPOLINE=y
182CONFIG_IPIC=y 207CONFIG_IPIC=y
183# CONFIG_MPIC is not set 208# CONFIG_MPIC is not set
184# CONFIG_MPIC_WEIRD is not set 209# CONFIG_MPIC_WEIRD is not set
@@ -194,6 +219,8 @@ CONFIG_IPIC=y
194CONFIG_QUICC_ENGINE=y 219CONFIG_QUICC_ENGINE=y
195# CONFIG_QE_GPIO is not set 220# CONFIG_QE_GPIO is not set
196# CONFIG_FSL_ULI1575 is not set 221# CONFIG_FSL_ULI1575 is not set
222# CONFIG_SIMPLE_GPIO is not set
223# CONFIG_MCU_MPC8349EMITX is not set
197 224
198# 225#
199# Kernel options 226# Kernel options
@@ -212,16 +239,17 @@ CONFIG_SCHED_HRTICK=y
212# CONFIG_PREEMPT_NONE is not set 239# CONFIG_PREEMPT_NONE is not set
213# CONFIG_PREEMPT_VOLUNTARY is not set 240# CONFIG_PREEMPT_VOLUNTARY is not set
214CONFIG_PREEMPT=y 241CONFIG_PREEMPT=y
215# CONFIG_PREEMPT_RCU is not set
216CONFIG_BINFMT_ELF=y 242CONFIG_BINFMT_ELF=y
217# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 243# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
218# CONFIG_HAVE_AOUT is not set 244# CONFIG_HAVE_AOUT is not set
219# CONFIG_BINFMT_MISC is not set 245# CONFIG_BINFMT_MISC is not set
220# CONFIG_IOMMU_HELPER is not set 246# CONFIG_IOMMU_HELPER is not set
247# CONFIG_SWIOTLB is not set
221CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 248CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
222CONFIG_ARCH_HAS_WALK_MEMORY=y 249CONFIG_ARCH_HAS_WALK_MEMORY=y
223CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 250CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
224# CONFIG_KEXEC is not set 251# CONFIG_KEXEC is not set
252# CONFIG_CRASH_DUMP is not set
225CONFIG_ARCH_FLATMEM_ENABLE=y 253CONFIG_ARCH_FLATMEM_ENABLE=y
226CONFIG_ARCH_POPULATES_NODE_MAP=y 254CONFIG_ARCH_POPULATES_NODE_MAP=y
227CONFIG_SELECT_MEMORY_MODEL=y 255CONFIG_SELECT_MEMORY_MODEL=y
@@ -233,12 +261,17 @@ CONFIG_FLAT_NODE_MEM_MAP=y
233CONFIG_PAGEFLAGS_EXTENDED=y 261CONFIG_PAGEFLAGS_EXTENDED=y
234CONFIG_SPLIT_PTLOCK_CPUS=4 262CONFIG_SPLIT_PTLOCK_CPUS=4
235CONFIG_MIGRATION=y 263CONFIG_MIGRATION=y
236# CONFIG_RESOURCES_64BIT is not set
237# CONFIG_PHYS_ADDR_T_64BIT is not set 264# CONFIG_PHYS_ADDR_T_64BIT is not set
238CONFIG_ZONE_DMA_FLAG=1 265CONFIG_ZONE_DMA_FLAG=1
239CONFIG_BOUNCE=y 266CONFIG_BOUNCE=y
240CONFIG_VIRT_TO_BUS=y 267CONFIG_VIRT_TO_BUS=y
241CONFIG_UNEVICTABLE_LRU=y 268CONFIG_HAVE_MLOCK=y
269CONFIG_HAVE_MLOCKED_PAGE_BIT=y
270CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
271CONFIG_PPC_4K_PAGES=y
272# CONFIG_PPC_16K_PAGES is not set
273# CONFIG_PPC_64K_PAGES is not set
274# CONFIG_PPC_256K_PAGES is not set
242CONFIG_FORCE_MAX_ZONEORDER=11 275CONFIG_FORCE_MAX_ZONEORDER=11
243CONFIG_PROC_DEVICETREE=y 276CONFIG_PROC_DEVICETREE=y
244# CONFIG_CMDLINE_BOOL is not set 277# CONFIG_CMDLINE_BOOL is not set
@@ -331,7 +364,10 @@ CONFIG_LLC=m
331# CONFIG_LAPB is not set 364# CONFIG_LAPB is not set
332# CONFIG_ECONET is not set 365# CONFIG_ECONET is not set
333# CONFIG_WAN_ROUTER is not set 366# CONFIG_WAN_ROUTER is not set
367# CONFIG_PHONET is not set
368# CONFIG_IEEE802154 is not set
334# CONFIG_NET_SCHED is not set 369# CONFIG_NET_SCHED is not set
370# CONFIG_DCB is not set
335 371
336# 372#
337# Network testing 373# Network testing
@@ -342,8 +378,8 @@ CONFIG_LLC=m
342# CONFIG_IRDA is not set 378# CONFIG_IRDA is not set
343# CONFIG_BT is not set 379# CONFIG_BT is not set
344# CONFIG_AF_RXRPC is not set 380# CONFIG_AF_RXRPC is not set
345# CONFIG_PHONET is not set
346# CONFIG_WIRELESS is not set 381# CONFIG_WIRELESS is not set
382# CONFIG_WIMAX is not set
347# CONFIG_RFKILL is not set 383# CONFIG_RFKILL is not set
348# CONFIG_NET_9P is not set 384# CONFIG_NET_9P is not set
349 385
@@ -362,6 +398,7 @@ CONFIG_MTD=y
362# CONFIG_MTD_DEBUG is not set 398# CONFIG_MTD_DEBUG is not set
363CONFIG_MTD_CONCAT=y 399CONFIG_MTD_CONCAT=y
364CONFIG_MTD_PARTITIONS=y 400CONFIG_MTD_PARTITIONS=y
401# CONFIG_MTD_TESTS is not set
365# CONFIG_MTD_REDBOOT_PARTS is not set 402# CONFIG_MTD_REDBOOT_PARTS is not set
366CONFIG_MTD_CMDLINE_PARTS=y 403CONFIG_MTD_CMDLINE_PARTS=y
367CONFIG_MTD_OF_PARTS=y 404CONFIG_MTD_OF_PARTS=y
@@ -431,6 +468,11 @@ CONFIG_MTD_PHRAM=y
431# CONFIG_MTD_ONENAND is not set 468# CONFIG_MTD_ONENAND is not set
432 469
433# 470#
471# LPDDR flash memory drivers
472#
473# CONFIG_MTD_LPDDR is not set
474
475#
434# UBI - Unsorted block images 476# UBI - Unsorted block images
435# 477#
436CONFIG_MTD_UBI=y 478CONFIG_MTD_UBI=y
@@ -445,7 +487,6 @@ CONFIG_MTD_UBI_DEBUG=y
445# CONFIG_MTD_UBI_DEBUG_MSG is not set 487# CONFIG_MTD_UBI_DEBUG_MSG is not set
446# CONFIG_MTD_UBI_DEBUG_PARANOID is not set 488# CONFIG_MTD_UBI_DEBUG_PARANOID is not set
447# CONFIG_MTD_UBI_DEBUG_DISABLE_BGT is not set 489# CONFIG_MTD_UBI_DEBUG_DISABLE_BGT is not set
448# CONFIG_MTD_UBI_DEBUG_USERSPACE_IO is not set
449# CONFIG_MTD_UBI_DEBUG_EMULATE_BITFLIPS is not set 490# CONFIG_MTD_UBI_DEBUG_EMULATE_BITFLIPS is not set
450# CONFIG_MTD_UBI_DEBUG_EMULATE_WRITE_FAILURES is not set 491# CONFIG_MTD_UBI_DEBUG_EMULATE_WRITE_FAILURES is not set
451# CONFIG_MTD_UBI_DEBUG_EMULATE_ERASE_FAILURES is not set 492# CONFIG_MTD_UBI_DEBUG_EMULATE_ERASE_FAILURES is not set
@@ -459,6 +500,7 @@ CONFIG_MTD_UBI_DEBUG=y
459# CONFIG_MTD_UBI_DEBUG_MSG_IO is not set 500# CONFIG_MTD_UBI_DEBUG_MSG_IO is not set
460CONFIG_OF_DEVICE=y 501CONFIG_OF_DEVICE=y
461CONFIG_OF_I2C=y 502CONFIG_OF_I2C=y
503CONFIG_OF_MDIO=y
462# CONFIG_PARPORT is not set 504# CONFIG_PARPORT is not set
463CONFIG_BLK_DEV=y 505CONFIG_BLK_DEV=y
464# CONFIG_BLK_DEV_FD is not set 506# CONFIG_BLK_DEV_FD is not set
@@ -505,10 +547,15 @@ CONFIG_MARVELL_PHY=y
505# CONFIG_BROADCOM_PHY is not set 547# CONFIG_BROADCOM_PHY is not set
506# CONFIG_ICPLUS_PHY is not set 548# CONFIG_ICPLUS_PHY is not set
507# CONFIG_REALTEK_PHY is not set 549# CONFIG_REALTEK_PHY is not set
550# CONFIG_NATIONAL_PHY is not set
551# CONFIG_STE10XP is not set
552# CONFIG_LSI_ET1011C_PHY is not set
508# CONFIG_FIXED_PHY is not set 553# CONFIG_FIXED_PHY is not set
509# CONFIG_MDIO_BITBANG is not set 554# CONFIG_MDIO_BITBANG is not set
510CONFIG_NET_ETHERNET=y 555CONFIG_NET_ETHERNET=y
511CONFIG_MII=y 556CONFIG_MII=y
557# CONFIG_ETHOC is not set
558# CONFIG_DNET is not set
512# CONFIG_IBM_NEW_EMAC_ZMII is not set 559# CONFIG_IBM_NEW_EMAC_ZMII is not set
513# CONFIG_IBM_NEW_EMAC_RGMII is not set 560# CONFIG_IBM_NEW_EMAC_RGMII is not set
514# CONFIG_IBM_NEW_EMAC_TAH is not set 561# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -517,11 +564,12 @@ CONFIG_MII=y
517# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 564# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
518# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 565# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
519# CONFIG_B44 is not set 566# CONFIG_B44 is not set
567# CONFIG_KS8842 is not set
520CONFIG_NETDEV_1000=y 568CONFIG_NETDEV_1000=y
569CONFIG_FSL_PQ_MDIO=y
521# CONFIG_GIANFAR is not set 570# CONFIG_GIANFAR is not set
522CONFIG_UCC_GETH=y 571CONFIG_UCC_GETH=y
523# CONFIG_UGETH_MAGIC_PACKET is not set 572# CONFIG_UGETH_MAGIC_PACKET is not set
524# CONFIG_UGETH_FILTERING is not set
525# CONFIG_UGETH_TX_ON_DEMAND is not set 573# CONFIG_UGETH_TX_ON_DEMAND is not set
526# CONFIG_MV643XX_ETH is not set 574# CONFIG_MV643XX_ETH is not set
527# CONFIG_NETDEV_10000 is not set 575# CONFIG_NETDEV_10000 is not set
@@ -531,7 +579,10 @@ CONFIG_UCC_GETH=y
531# 579#
532# CONFIG_WLAN_PRE80211 is not set 580# CONFIG_WLAN_PRE80211 is not set
533# CONFIG_WLAN_80211 is not set 581# CONFIG_WLAN_80211 is not set
534# CONFIG_IWLWIFI_LEDS is not set 582
583#
584# Enable WiMAX (Networking options) to see the WiMAX drivers
585#
535CONFIG_WAN=y 586CONFIG_WAN=y
536CONFIG_HDLC=y 587CONFIG_HDLC=y
537# CONFIG_HDLC_RAW is not set 588# CONFIG_HDLC_RAW is not set
@@ -543,8 +594,6 @@ CONFIG_HDLC=y
543# 594#
544# X.25/LAPB support is disabled 595# X.25/LAPB support is disabled
545# 596#
546CONFIG_HDLC_KM=y
547CONFIG_FS_UCC_HDLC=y
548# CONFIG_DLCI is not set 597# CONFIG_DLCI is not set
549CONFIG_PPP=y 598CONFIG_PPP=y
550CONFIG_PPP_MULTILINK=y 599CONFIG_PPP_MULTILINK=y
@@ -600,16 +649,18 @@ CONFIG_SERIAL_CORE_CONSOLE=y
600# CONFIG_SERIAL_OF_PLATFORM is not set 649# CONFIG_SERIAL_OF_PLATFORM is not set
601# CONFIG_SERIAL_QE is not set 650# CONFIG_SERIAL_QE is not set
602CONFIG_UNIX98_PTYS=y 651CONFIG_UNIX98_PTYS=y
652# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
603CONFIG_LEGACY_PTYS=y 653CONFIG_LEGACY_PTYS=y
604CONFIG_LEGACY_PTY_COUNT=256 654CONFIG_LEGACY_PTY_COUNT=256
655# CONFIG_HVC_UDBG is not set
605# CONFIG_IPMI_HANDLER is not set 656# CONFIG_IPMI_HANDLER is not set
606CONFIG_HW_RANDOM=y 657CONFIG_HW_RANDOM=y
658# CONFIG_HW_RANDOM_TIMERIOMEM is not set
607# CONFIG_NVRAM is not set 659# CONFIG_NVRAM is not set
608# CONFIG_GEN_RTC is not set 660# CONFIG_GEN_RTC is not set
609# CONFIG_R3964 is not set 661# CONFIG_R3964 is not set
610# CONFIG_RAW_DRIVER is not set 662# CONFIG_RAW_DRIVER is not set
611# CONFIG_TCG_TPM is not set 663# CONFIG_TCG_TPM is not set
612CONFIG_BOOTCOUNT=y
613CONFIG_I2C=y 664CONFIG_I2C=y
614CONFIG_I2C_BOARDINFO=y 665CONFIG_I2C_BOARDINFO=y
615CONFIG_I2C_CHARDEV=y 666CONFIG_I2C_CHARDEV=y
@@ -642,20 +693,20 @@ CONFIG_I2C_MPC=y
642# Miscellaneous I2C Chip support 693# Miscellaneous I2C Chip support
643# 694#
644# CONFIG_DS1682 is not set 695# CONFIG_DS1682 is not set
645# CONFIG_AT24 is not set
646# CONFIG_SENSORS_EEPROM is not set
647# CONFIG_SENSORS_PCF8574 is not set 696# CONFIG_SENSORS_PCF8574 is not set
648# CONFIG_PCF8575 is not set 697# CONFIG_PCF8575 is not set
649# CONFIG_SENSORS_PCA9539 is not set 698# CONFIG_SENSORS_PCA9539 is not set
650# CONFIG_SENSORS_PCF8591 is not set
651# CONFIG_SENSORS_MAX6875 is not set
652# CONFIG_SENSORS_TSL2550 is not set 699# CONFIG_SENSORS_TSL2550 is not set
653# CONFIG_MCU_MPC8349EMITX is not set
654# CONFIG_I2C_DEBUG_CORE is not set 700# CONFIG_I2C_DEBUG_CORE is not set
655# CONFIG_I2C_DEBUG_ALGO is not set 701# CONFIG_I2C_DEBUG_ALGO is not set
656# CONFIG_I2C_DEBUG_BUS is not set 702# CONFIG_I2C_DEBUG_BUS is not set
657# CONFIG_I2C_DEBUG_CHIP is not set 703# CONFIG_I2C_DEBUG_CHIP is not set
658# CONFIG_SPI is not set 704# CONFIG_SPI is not set
705
706#
707# PPS support
708#
709# CONFIG_PPS is not set
659CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 710CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
660# CONFIG_GPIOLIB is not set 711# CONFIG_GPIOLIB is not set
661# CONFIG_W1 is not set 712# CONFIG_W1 is not set
@@ -677,27 +728,15 @@ CONFIG_SSB_POSSIBLE=y
677# CONFIG_MFD_CORE is not set 728# CONFIG_MFD_CORE is not set
678# CONFIG_MFD_SM501 is not set 729# CONFIG_MFD_SM501 is not set
679# CONFIG_HTC_PASIC3 is not set 730# CONFIG_HTC_PASIC3 is not set
731# CONFIG_TWL4030_CORE is not set
680# CONFIG_MFD_TMIO is not set 732# CONFIG_MFD_TMIO is not set
681# CONFIG_PMIC_DA903X is not set 733# CONFIG_PMIC_DA903X is not set
682# CONFIG_MFD_WM8400 is not set 734# CONFIG_MFD_WM8400 is not set
683# CONFIG_MFD_WM8350_I2C is not set 735# CONFIG_MFD_WM8350_I2C is not set
736# CONFIG_MFD_PCF50633 is not set
737# CONFIG_AB3100_CORE is not set
684# CONFIG_REGULATOR is not set 738# CONFIG_REGULATOR is not set
685 739# CONFIG_MEDIA_SUPPORT is not set
686#
687# Multimedia devices
688#
689
690#
691# Multimedia core support
692#
693# CONFIG_VIDEO_DEV is not set
694# CONFIG_DVB_CORE is not set
695# CONFIG_VIDEO_MEDIA is not set
696
697#
698# Multimedia drivers
699#
700# CONFIG_DAB is not set
701 740
702# 741#
703# Graphics support 742# Graphics support
@@ -720,11 +759,16 @@ CONFIG_SSB_POSSIBLE=y
720# CONFIG_EDAC is not set 759# CONFIG_EDAC is not set
721# CONFIG_RTC_CLASS is not set 760# CONFIG_RTC_CLASS is not set
722# CONFIG_DMADEVICES is not set 761# CONFIG_DMADEVICES is not set
762# CONFIG_AUXDISPLAY is not set
723CONFIG_UIO=y 763CONFIG_UIO=y
724# CONFIG_UIO_PDRV is not set 764# CONFIG_UIO_PDRV is not set
725# CONFIG_UIO_PDRV_GENIRQ is not set 765# CONFIG_UIO_PDRV_GENIRQ is not set
726# CONFIG_UIO_SMX is not set 766# CONFIG_UIO_SMX is not set
727# CONFIG_UIO_SERCOS3 is not set 767# CONFIG_UIO_SERCOS3 is not set
768
769#
770# TI VLYNQ
771#
728# CONFIG_STAGING is not set 772# CONFIG_STAGING is not set
729 773
730# 774#
@@ -736,9 +780,12 @@ CONFIG_UIO=y
736# CONFIG_REISERFS_FS is not set 780# CONFIG_REISERFS_FS is not set
737# CONFIG_JFS_FS is not set 781# CONFIG_JFS_FS is not set
738# CONFIG_FS_POSIX_ACL is not set 782# CONFIG_FS_POSIX_ACL is not set
739CONFIG_FILE_LOCKING=y
740# CONFIG_XFS_FS is not set 783# CONFIG_XFS_FS is not set
784# CONFIG_GFS2_FS is not set
741# CONFIG_OCFS2_FS is not set 785# CONFIG_OCFS2_FS is not set
786# CONFIG_BTRFS_FS is not set
787CONFIG_FILE_LOCKING=y
788CONFIG_FSNOTIFY=y
742# CONFIG_DNOTIFY is not set 789# CONFIG_DNOTIFY is not set
743CONFIG_INOTIFY=y 790CONFIG_INOTIFY=y
744CONFIG_INOTIFY_USER=y 791CONFIG_INOTIFY_USER=y
@@ -748,6 +795,11 @@ CONFIG_INOTIFY_USER=y
748# CONFIG_FUSE_FS is not set 795# CONFIG_FUSE_FS is not set
749 796
750# 797#
798# Caches
799#
800# CONFIG_FSCACHE is not set
801
802#
751# CD-ROM/DVD Filesystems 803# CD-ROM/DVD Filesystems
752# 804#
753# CONFIG_ISO9660_FS is not set 805# CONFIG_ISO9660_FS is not set
@@ -772,10 +824,7 @@ CONFIG_TMPFS=y
772# CONFIG_TMPFS_POSIX_ACL is not set 824# CONFIG_TMPFS_POSIX_ACL is not set
773# CONFIG_HUGETLB_PAGE is not set 825# CONFIG_HUGETLB_PAGE is not set
774# CONFIG_CONFIGFS_FS is not set 826# CONFIG_CONFIGFS_FS is not set
775 827CONFIG_MISC_FILESYSTEMS=y
776#
777# Miscellaneous filesystems
778#
779# CONFIG_ADFS_FS is not set 828# CONFIG_ADFS_FS is not set
780# CONFIG_AFFS_FS is not set 829# CONFIG_AFFS_FS is not set
781# CONFIG_HFS_FS is not set 830# CONFIG_HFS_FS is not set
@@ -796,6 +845,7 @@ CONFIG_JFFS2_RTIME=y
796# CONFIG_JFFS2_RUBIN is not set 845# CONFIG_JFFS2_RUBIN is not set
797# CONFIG_UBIFS_FS is not set 846# CONFIG_UBIFS_FS is not set
798# CONFIG_CRAMFS is not set 847# CONFIG_CRAMFS is not set
848# CONFIG_SQUASHFS is not set
799# CONFIG_VXFS_FS is not set 849# CONFIG_VXFS_FS is not set
800# CONFIG_MINIX_FS is not set 850# CONFIG_MINIX_FS is not set
801# CONFIG_OMFS_FS is not set 851# CONFIG_OMFS_FS is not set
@@ -804,6 +854,7 @@ CONFIG_JFFS2_RTIME=y
804# CONFIG_ROMFS_FS is not set 854# CONFIG_ROMFS_FS is not set
805# CONFIG_SYSV_FS is not set 855# CONFIG_SYSV_FS is not set
806# CONFIG_UFS_FS is not set 856# CONFIG_UFS_FS is not set
857# CONFIG_NILFS2_FS is not set
807CONFIG_NETWORK_FILESYSTEMS=y 858CONFIG_NETWORK_FILESYSTEMS=y
808CONFIG_NFS_FS=y 859CONFIG_NFS_FS=y
809CONFIG_NFS_V3=y 860CONFIG_NFS_V3=y
@@ -815,7 +866,6 @@ CONFIG_LOCKD=y
815CONFIG_LOCKD_V4=y 866CONFIG_LOCKD_V4=y
816CONFIG_NFS_COMMON=y 867CONFIG_NFS_COMMON=y
817CONFIG_SUNRPC=y 868CONFIG_SUNRPC=y
818# CONFIG_SUNRPC_REGISTER_V4 is not set
819# CONFIG_RPCSEC_GSS_KRB5 is not set 869# CONFIG_RPCSEC_GSS_KRB5 is not set
820# CONFIG_RPCSEC_GSS_SPKM3 is not set 870# CONFIG_RPCSEC_GSS_SPKM3 is not set
821# CONFIG_SMB_FS is not set 871# CONFIG_SMB_FS is not set
@@ -845,11 +895,13 @@ CONFIG_PARTITION_ADVANCED=y
845# CONFIG_DLM is not set 895# CONFIG_DLM is not set
846CONFIG_UCC_FAST=y 896CONFIG_UCC_FAST=y
847CONFIG_UCC=y 897CONFIG_UCC=y
898# CONFIG_BINARY_PRINTF is not set
848 899
849# 900#
850# Library routines 901# Library routines
851# 902#
852CONFIG_BITREVERSE=y 903CONFIG_BITREVERSE=y
904CONFIG_GENERIC_FIND_LAST_BIT=y
853# CONFIG_CRC_CCITT is not set 905# CONFIG_CRC_CCITT is not set
854# CONFIG_CRC16 is not set 906# CONFIG_CRC16 is not set
855# CONFIG_CRC_T10DIF is not set 907# CONFIG_CRC_T10DIF is not set
@@ -859,11 +911,12 @@ CONFIG_CRC32=y
859# CONFIG_LIBCRC32C is not set 911# CONFIG_LIBCRC32C is not set
860CONFIG_ZLIB_INFLATE=y 912CONFIG_ZLIB_INFLATE=y
861CONFIG_ZLIB_DEFLATE=y 913CONFIG_ZLIB_DEFLATE=y
862CONFIG_PLIST=y
863CONFIG_HAS_IOMEM=y 914CONFIG_HAS_IOMEM=y
864CONFIG_HAS_IOPORT=y 915CONFIG_HAS_IOPORT=y
865CONFIG_HAS_DMA=y 916CONFIG_HAS_DMA=y
866CONFIG_HAVE_LMB=y 917CONFIG_HAVE_LMB=y
918CONFIG_NLATTR=y
919CONFIG_GENERIC_ATOMIC64=y
867 920
868# 921#
869# Kernel hacking 922# Kernel hacking
@@ -883,13 +936,18 @@ CONFIG_DEBUG_FS=y
883# CONFIG_LATENCYTOP is not set 936# CONFIG_LATENCYTOP is not set
884CONFIG_SYSCTL_SYSCALL_CHECK=y 937CONFIG_SYSCTL_SYSCALL_CHECK=y
885CONFIG_HAVE_FUNCTION_TRACER=y 938CONFIG_HAVE_FUNCTION_TRACER=y
886 939CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
887# 940CONFIG_HAVE_DYNAMIC_FTRACE=y
888# Tracers 941CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
889# 942CONFIG_TRACING_SUPPORT=y
890# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 943# CONFIG_FTRACE is not set
944# CONFIG_DYNAMIC_DEBUG is not set
891# CONFIG_SAMPLES is not set 945# CONFIG_SAMPLES is not set
892CONFIG_HAVE_ARCH_KGDB=y 946CONFIG_HAVE_ARCH_KGDB=y
947# CONFIG_PPC_DISABLE_WERROR is not set
948CONFIG_PPC_WERROR=y
949CONFIG_PRINT_STACK_DEPTH=64
950# CONFIG_PPC_EMULATED_STATS is not set
893# CONFIG_IRQSTACKS is not set 951# CONFIG_IRQSTACKS is not set
894# CONFIG_VIRQ_DEBUG is not set 952# CONFIG_VIRQ_DEBUG is not set
895# CONFIG_BOOTX_TEXT is not set 953# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
index c5c0fe71a43..ff33a7db2ea 100644
--- a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:06 2009 4# Wed Jul 29 23:32:04 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_FSL_EMB_PERFMON is not set 20# CONFIG_FSL_EMB_PERFMON is not set
20# CONFIG_ALTIVEC is not set 21# CONFIG_ALTIVEC is not set
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24# CONFIG_SMP is not set 26# CONFIG_SMP is not set
25CONFIG_PPC32=y 27CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32 28CONFIG_WORD_SIZE=32
@@ -31,15 +33,16 @@ CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y 33CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y 34CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y 35CONFIG_GENERIC_HARDIRQS=y
36CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y 38CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y 39CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y 40CONFIG_HAVE_LATENCYTOP_SUPPORT=y
41CONFIG_TRACE_IRQFLAGS_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y 42CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y 43CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y 44CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y 45CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y 46CONFIG_GENERIC_FIND_NEXT_BIT=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
45CONFIG_PPC=y 48CONFIG_PPC=y
@@ -53,12 +56,14 @@ CONFIG_PPC_UDBG_16550=y
53# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
56CONFIG_DEFAULT_UIMAGE=y 60CONFIG_DEFAULT_UIMAGE=y
57CONFIG_ARCH_SUSPEND_POSSIBLE=y 61CONFIG_ARCH_SUSPEND_POSSIBLE=y
58# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
59# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
60CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
61CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
62 67
63# 68#
64# General setup 69# General setup
@@ -107,7 +112,6 @@ CONFIG_ANON_INODES=y
107CONFIG_EMBEDDED=y 112CONFIG_EMBEDDED=y
108CONFIG_SYSCTL_SYSCALL=y 113CONFIG_SYSCTL_SYSCALL=y
109# CONFIG_KALLSYMS is not set 114# CONFIG_KALLSYMS is not set
110# CONFIG_STRIP_ASM_SYMS is not set
111CONFIG_HOTPLUG=y 115CONFIG_HOTPLUG=y
112CONFIG_PRINTK=y 116CONFIG_PRINTK=y
113CONFIG_BUG=y 117CONFIG_BUG=y
@@ -120,9 +124,16 @@ CONFIG_TIMERFD=y
120CONFIG_EVENTFD=y 124CONFIG_EVENTFD=y
121CONFIG_SHMEM=y 125CONFIG_SHMEM=y
122CONFIG_AIO=y 126CONFIG_AIO=y
127CONFIG_HAVE_PERF_COUNTERS=y
128
129#
130# Performance Counters
131#
132# CONFIG_PERF_COUNTERS is not set
123CONFIG_VM_EVENT_COUNTERS=y 133CONFIG_VM_EVENT_COUNTERS=y
124CONFIG_PCI_QUIRKS=y 134CONFIG_PCI_QUIRKS=y
125CONFIG_SLUB_DEBUG=y 135CONFIG_SLUB_DEBUG=y
136# CONFIG_STRIP_ASM_SYMS is not set
126CONFIG_COMPAT_BRK=y 137CONFIG_COMPAT_BRK=y
127# CONFIG_SLAB is not set 138# CONFIG_SLAB is not set
128CONFIG_SLUB=y 139CONFIG_SLUB=y
@@ -135,6 +146,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
135CONFIG_HAVE_KPROBES=y 146CONFIG_HAVE_KPROBES=y
136CONFIG_HAVE_KRETPROBES=y 147CONFIG_HAVE_KRETPROBES=y
137CONFIG_HAVE_ARCH_TRACEHOOK=y 148CONFIG_HAVE_ARCH_TRACEHOOK=y
149
150#
151# GCOV-based kernel profiling
152#
138# CONFIG_SLOW_WORK is not set 153# CONFIG_SLOW_WORK is not set
139# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 154# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
140CONFIG_SLABINFO=y 155CONFIG_SLABINFO=y
@@ -147,7 +162,7 @@ CONFIG_MODULE_UNLOAD=y
147# CONFIG_MODVERSIONS is not set 162# CONFIG_MODVERSIONS is not set
148# CONFIG_MODULE_SRCVERSION_ALL is not set 163# CONFIG_MODULE_SRCVERSION_ALL is not set
149CONFIG_BLOCK=y 164CONFIG_BLOCK=y
150# CONFIG_LBD is not set 165CONFIG_LBDAF=y
151# CONFIG_BLK_DEV_BSG is not set 166# CONFIG_BLK_DEV_BSG is not set
152# CONFIG_BLK_DEV_INTEGRITY is not set 167# CONFIG_BLK_DEV_INTEGRITY is not set
153 168
@@ -189,6 +204,7 @@ CONFIG_MPC831x_RDB=y
189# CONFIG_MPC837x_RDB is not set 204# CONFIG_MPC837x_RDB is not set
190# CONFIG_SBC834x is not set 205# CONFIG_SBC834x is not set
191# CONFIG_ASP834x is not set 206# CONFIG_ASP834x is not set
207# CONFIG_KMETER1 is not set
192CONFIG_PPC_MPC831x=y 208CONFIG_PPC_MPC831x=y
193# CONFIG_PPC_86xx is not set 209# CONFIG_PPC_86xx is not set
194# CONFIG_EMBEDDED6xx is not set 210# CONFIG_EMBEDDED6xx is not set
@@ -234,6 +250,7 @@ CONFIG_BINFMT_ELF=y
234# CONFIG_HAVE_AOUT is not set 250# CONFIG_HAVE_AOUT is not set
235# CONFIG_BINFMT_MISC is not set 251# CONFIG_BINFMT_MISC is not set
236# CONFIG_IOMMU_HELPER is not set 252# CONFIG_IOMMU_HELPER is not set
253# CONFIG_SWIOTLB is not set
237CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 254CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
238CONFIG_ARCH_HAS_WALK_MEMORY=y 255CONFIG_ARCH_HAS_WALK_MEMORY=y
239CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 256CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -254,9 +271,9 @@ CONFIG_MIGRATION=y
254CONFIG_ZONE_DMA_FLAG=1 271CONFIG_ZONE_DMA_FLAG=1
255CONFIG_BOUNCE=y 272CONFIG_BOUNCE=y
256CONFIG_VIRT_TO_BUS=y 273CONFIG_VIRT_TO_BUS=y
257CONFIG_UNEVICTABLE_LRU=y
258CONFIG_HAVE_MLOCK=y 274CONFIG_HAVE_MLOCK=y
259CONFIG_HAVE_MLOCKED_PAGE_BIT=y 275CONFIG_HAVE_MLOCKED_PAGE_BIT=y
276CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
260CONFIG_PPC_4K_PAGES=y 277CONFIG_PPC_4K_PAGES=y
261# CONFIG_PPC_16K_PAGES is not set 278# CONFIG_PPC_16K_PAGES is not set
262# CONFIG_PPC_64K_PAGES is not set 279# CONFIG_PPC_64K_PAGES is not set
@@ -366,6 +383,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
366# CONFIG_ECONET is not set 383# CONFIG_ECONET is not set
367# CONFIG_WAN_ROUTER is not set 384# CONFIG_WAN_ROUTER is not set
368# CONFIG_PHONET is not set 385# CONFIG_PHONET is not set
386# CONFIG_IEEE802154 is not set
369# CONFIG_NET_SCHED is not set 387# CONFIG_NET_SCHED is not set
370# CONFIG_DCB is not set 388# CONFIG_DCB is not set
371 389
@@ -383,7 +401,11 @@ CONFIG_WIRELESS=y
383CONFIG_WIRELESS_OLD_REGULATORY=y 401CONFIG_WIRELESS_OLD_REGULATORY=y
384# CONFIG_WIRELESS_EXT is not set 402# CONFIG_WIRELESS_EXT is not set
385# CONFIG_LIB80211 is not set 403# CONFIG_LIB80211 is not set
386# CONFIG_MAC80211 is not set 404
405#
406# CFG80211 needs to be enabled for MAC80211
407#
408CONFIG_MAC80211_DEFAULT_PS_VALUE=0
387# CONFIG_WIMAX is not set 409# CONFIG_WIMAX is not set
388# CONFIG_RFKILL is not set 410# CONFIG_RFKILL is not set
389# CONFIG_NET_9P is not set 411# CONFIG_NET_9P is not set
@@ -503,6 +525,7 @@ CONFIG_MTD_NAND_FSL_ELBC=y
503CONFIG_OF_DEVICE=y 525CONFIG_OF_DEVICE=y
504CONFIG_OF_I2C=y 526CONFIG_OF_I2C=y
505CONFIG_OF_SPI=y 527CONFIG_OF_SPI=y
528CONFIG_OF_MDIO=y
506# CONFIG_PARPORT is not set 529# CONFIG_PARPORT is not set
507CONFIG_BLK_DEV=y 530CONFIG_BLK_DEV=y
508# CONFIG_BLK_DEV_FD is not set 531# CONFIG_BLK_DEV_FD is not set
@@ -539,7 +562,9 @@ CONFIG_MISC_DEVICES=y
539# CONFIG_EEPROM_AT24 is not set 562# CONFIG_EEPROM_AT24 is not set
540# CONFIG_EEPROM_AT25 is not set 563# CONFIG_EEPROM_AT25 is not set
541# CONFIG_EEPROM_LEGACY is not set 564# CONFIG_EEPROM_LEGACY is not set
565# CONFIG_EEPROM_MAX6875 is not set
542# CONFIG_EEPROM_93CX6 is not set 566# CONFIG_EEPROM_93CX6 is not set
567# CONFIG_CB710_CORE is not set
543CONFIG_HAVE_IDE=y 568CONFIG_HAVE_IDE=y
544# CONFIG_IDE is not set 569# CONFIG_IDE is not set
545 570
@@ -562,10 +587,6 @@ CONFIG_SCSI_PROC_FS=y
562# CONFIG_BLK_DEV_SR is not set 587# CONFIG_BLK_DEV_SR is not set
563CONFIG_CHR_DEV_SG=y 588CONFIG_CHR_DEV_SG=y
564# CONFIG_CHR_DEV_SCH is not set 589# CONFIG_CHR_DEV_SCH is not set
565
566#
567# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
568#
569# CONFIG_SCSI_MULTI_LUN is not set 590# CONFIG_SCSI_MULTI_LUN is not set
570# CONFIG_SCSI_CONSTANTS is not set 591# CONFIG_SCSI_CONSTANTS is not set
571# CONFIG_SCSI_LOGGING is not set 592# CONFIG_SCSI_LOGGING is not set
@@ -583,6 +604,7 @@ CONFIG_SCSI_SPI_ATTRS=y
583CONFIG_SCSI_LOWLEVEL=y 604CONFIG_SCSI_LOWLEVEL=y
584# CONFIG_ISCSI_TCP is not set 605# CONFIG_ISCSI_TCP is not set
585# CONFIG_SCSI_CXGB3_ISCSI is not set 606# CONFIG_SCSI_CXGB3_ISCSI is not set
607# CONFIG_SCSI_BNX2_ISCSI is not set
586# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 608# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
587# CONFIG_SCSI_3W_9XXX is not set 609# CONFIG_SCSI_3W_9XXX is not set
588# CONFIG_SCSI_ACARD is not set 610# CONFIG_SCSI_ACARD is not set
@@ -591,6 +613,7 @@ CONFIG_SCSI_LOWLEVEL=y
591# CONFIG_SCSI_AIC7XXX_OLD is not set 613# CONFIG_SCSI_AIC7XXX_OLD is not set
592# CONFIG_SCSI_AIC79XX is not set 614# CONFIG_SCSI_AIC79XX is not set
593# CONFIG_SCSI_AIC94XX is not set 615# CONFIG_SCSI_AIC94XX is not set
616# CONFIG_SCSI_MVSAS is not set
594# CONFIG_SCSI_DPT_I2O is not set 617# CONFIG_SCSI_DPT_I2O is not set
595# CONFIG_SCSI_ADVANSYS is not set 618# CONFIG_SCSI_ADVANSYS is not set
596# CONFIG_SCSI_ARCMSR is not set 619# CONFIG_SCSI_ARCMSR is not set
@@ -610,7 +633,6 @@ CONFIG_SCSI_LOWLEVEL=y
610# CONFIG_SCSI_IPS is not set 633# CONFIG_SCSI_IPS is not set
611# CONFIG_SCSI_INITIO is not set 634# CONFIG_SCSI_INITIO is not set
612# CONFIG_SCSI_INIA100 is not set 635# CONFIG_SCSI_INIA100 is not set
613# CONFIG_SCSI_MVSAS is not set
614# CONFIG_SCSI_STEX is not set 636# CONFIG_SCSI_STEX is not set
615# CONFIG_SCSI_SYM53C8XX_2 is not set 637# CONFIG_SCSI_SYM53C8XX_2 is not set
616# CONFIG_SCSI_QLOGIC_1280 is not set 638# CONFIG_SCSI_QLOGIC_1280 is not set
@@ -643,14 +665,17 @@ CONFIG_MD_RAID1=y
643# 665#
644 666
645# 667#
646# Enable only one of the two stacks, unless you know what you are doing 668# You can enable one or both FireWire driver stacks.
669#
670
671#
672# See the help texts for more information.
647# 673#
648# CONFIG_FIREWIRE is not set 674# CONFIG_FIREWIRE is not set
649# CONFIG_IEEE1394 is not set 675# CONFIG_IEEE1394 is not set
650# CONFIG_I2O is not set 676# CONFIG_I2O is not set
651# CONFIG_MACINTOSH_DRIVERS is not set 677# CONFIG_MACINTOSH_DRIVERS is not set
652CONFIG_NETDEVICES=y 678CONFIG_NETDEVICES=y
653CONFIG_COMPAT_NET_DEV_OPS=y
654# CONFIG_DUMMY is not set 679# CONFIG_DUMMY is not set
655# CONFIG_BONDING is not set 680# CONFIG_BONDING is not set
656# CONFIG_MACVLAN is not set 681# CONFIG_MACVLAN is not set
@@ -714,6 +739,8 @@ CONFIG_E100=y
714# CONFIG_SMSC9420 is not set 739# CONFIG_SMSC9420 is not set
715# CONFIG_SUNDANCE is not set 740# CONFIG_SUNDANCE is not set
716# CONFIG_TLAN is not set 741# CONFIG_TLAN is not set
742# CONFIG_KS8842 is not set
743# CONFIG_KS8851 is not set
717# CONFIG_VIA_RHINE is not set 744# CONFIG_VIA_RHINE is not set
718# CONFIG_SC92031 is not set 745# CONFIG_SC92031 is not set
719# CONFIG_ATL2 is not set 746# CONFIG_ATL2 is not set
@@ -735,8 +762,10 @@ CONFIG_NETDEV_1000=y
735# CONFIG_VIA_VELOCITY is not set 762# CONFIG_VIA_VELOCITY is not set
736# CONFIG_TIGON3 is not set 763# CONFIG_TIGON3 is not set
737# CONFIG_BNX2 is not set 764# CONFIG_BNX2 is not set
765# CONFIG_CNIC is not set
738CONFIG_FSL_PQ_MDIO=y 766CONFIG_FSL_PQ_MDIO=y
739CONFIG_GIANFAR=y 767CONFIG_GIANFAR=y
768# CONFIG_MV643XX_ETH is not set
740# CONFIG_QLA3XXX is not set 769# CONFIG_QLA3XXX is not set
741# CONFIG_ATL1 is not set 770# CONFIG_ATL1 is not set
742# CONFIG_ATL1E is not set 771# CONFIG_ATL1E is not set
@@ -924,7 +953,6 @@ CONFIG_I2C_MPC=y
924# CONFIG_SENSORS_PCF8574 is not set 953# CONFIG_SENSORS_PCF8574 is not set
925# CONFIG_PCF8575 is not set 954# CONFIG_PCF8575 is not set
926# CONFIG_SENSORS_PCA9539 is not set 955# CONFIG_SENSORS_PCA9539 is not set
927# CONFIG_SENSORS_MAX6875 is not set
928# CONFIG_SENSORS_TSL2550 is not set 956# CONFIG_SENSORS_TSL2550 is not set
929# CONFIG_I2C_DEBUG_CORE is not set 957# CONFIG_I2C_DEBUG_CORE is not set
930# CONFIG_I2C_DEBUG_ALGO is not set 958# CONFIG_I2C_DEBUG_ALGO is not set
@@ -938,13 +966,18 @@ CONFIG_SPI_MASTER=y
938# SPI Master Controller Drivers 966# SPI Master Controller Drivers
939# 967#
940CONFIG_SPI_BITBANG=y 968CONFIG_SPI_BITBANG=y
941CONFIG_SPI_MPC83xx=y 969# CONFIG_SPI_MPC8xxx is not set
942 970
943# 971#
944# SPI Protocol Masters 972# SPI Protocol Masters
945# 973#
946# CONFIG_SPI_SPIDEV is not set 974# CONFIG_SPI_SPIDEV is not set
947# CONFIG_SPI_TLE62X0 is not set 975# CONFIG_SPI_TLE62X0 is not set
976
977#
978# PPS support
979#
980# CONFIG_PPS is not set
948CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 981CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
949# CONFIG_GPIOLIB is not set 982# CONFIG_GPIOLIB is not set
950# CONFIG_W1 is not set 983# CONFIG_W1 is not set
@@ -1002,6 +1035,7 @@ CONFIG_HWMON=y
1002# CONFIG_SENSORS_SMSC47B397 is not set 1035# CONFIG_SENSORS_SMSC47B397 is not set
1003# CONFIG_SENSORS_ADS7828 is not set 1036# CONFIG_SENSORS_ADS7828 is not set
1004# CONFIG_SENSORS_THMC50 is not set 1037# CONFIG_SENSORS_THMC50 is not set
1038# CONFIG_SENSORS_TMP401 is not set
1005# CONFIG_SENSORS_VIA686A is not set 1039# CONFIG_SENSORS_VIA686A is not set
1006# CONFIG_SENSORS_VT1211 is not set 1040# CONFIG_SENSORS_VT1211 is not set
1007# CONFIG_SENSORS_VT8231 is not set 1041# CONFIG_SENSORS_VT8231 is not set
@@ -1056,24 +1090,10 @@ CONFIG_SSB_POSSIBLE=y
1056# CONFIG_MFD_WM8400 is not set 1090# CONFIG_MFD_WM8400 is not set
1057# CONFIG_MFD_WM8350_I2C is not set 1091# CONFIG_MFD_WM8350_I2C is not set
1058# CONFIG_MFD_PCF50633 is not set 1092# CONFIG_MFD_PCF50633 is not set
1093# CONFIG_AB3100_CORE is not set
1094# CONFIG_EZX_PCAP is not set
1059# CONFIG_REGULATOR is not set 1095# CONFIG_REGULATOR is not set
1060 1096# CONFIG_MEDIA_SUPPORT is not set
1061#
1062# Multimedia devices
1063#
1064
1065#
1066# Multimedia core support
1067#
1068# CONFIG_VIDEO_DEV is not set
1069# CONFIG_DVB_CORE is not set
1070# CONFIG_VIDEO_MEDIA is not set
1071
1072#
1073# Multimedia drivers
1074#
1075CONFIG_DAB=y
1076# CONFIG_USB_DABUSB is not set
1077 1097
1078# 1098#
1079# Graphics support 1099# Graphics support
@@ -1135,6 +1155,7 @@ CONFIG_USB_MON=y
1135# USB Host Controller Drivers 1155# USB Host Controller Drivers
1136# 1156#
1137# CONFIG_USB_C67X00_HCD is not set 1157# CONFIG_USB_C67X00_HCD is not set
1158# CONFIG_USB_XHCI_HCD is not set
1138CONFIG_USB_EHCI_HCD=y 1159CONFIG_USB_EHCI_HCD=y
1139CONFIG_USB_EHCI_ROOT_HUB_TT=y 1160CONFIG_USB_EHCI_ROOT_HUB_TT=y
1140# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1161# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1144,9 +1165,9 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y
1144# CONFIG_USB_ISP116X_HCD is not set 1165# CONFIG_USB_ISP116X_HCD is not set
1145# CONFIG_USB_ISP1760_HCD is not set 1166# CONFIG_USB_ISP1760_HCD is not set
1146CONFIG_USB_OHCI_HCD=y 1167CONFIG_USB_OHCI_HCD=y
1147CONFIG_USB_OHCI_HCD_PPC_OF=y
1148CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1168CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1149# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set 1169# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
1170CONFIG_USB_OHCI_HCD_PPC_OF=y
1150CONFIG_USB_OHCI_HCD_PCI=y 1171CONFIG_USB_OHCI_HCD_PCI=y
1151CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y 1172CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1152CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y 1173CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
@@ -1235,8 +1256,9 @@ CONFIG_USB_GADGET_SELECTED=y
1235# CONFIG_USB_GADGET_OMAP is not set 1256# CONFIG_USB_GADGET_OMAP is not set
1236# CONFIG_USB_GADGET_PXA25X is not set 1257# CONFIG_USB_GADGET_PXA25X is not set
1237# CONFIG_USB_GADGET_PXA27X is not set 1258# CONFIG_USB_GADGET_PXA27X is not set
1238# CONFIG_USB_GADGET_S3C2410 is not set 1259# CONFIG_USB_GADGET_S3C_HSOTG is not set
1239# CONFIG_USB_GADGET_IMX is not set 1260# CONFIG_USB_GADGET_IMX is not set
1261# CONFIG_USB_GADGET_S3C2410 is not set
1240# CONFIG_USB_GADGET_M66592 is not set 1262# CONFIG_USB_GADGET_M66592 is not set
1241# CONFIG_USB_GADGET_AMD5536UDC is not set 1263# CONFIG_USB_GADGET_AMD5536UDC is not set
1242# CONFIG_USB_GADGET_FSL_QE is not set 1264# CONFIG_USB_GADGET_FSL_QE is not set
@@ -1244,9 +1266,11 @@ CONFIG_USB_GADGET_SELECTED=y
1244CONFIG_USB_GADGET_NET2280=y 1266CONFIG_USB_GADGET_NET2280=y
1245CONFIG_USB_NET2280=y 1267CONFIG_USB_NET2280=y
1246# CONFIG_USB_GADGET_GOKU is not set 1268# CONFIG_USB_GADGET_GOKU is not set
1269# CONFIG_USB_GADGET_LANGWELL is not set
1247# CONFIG_USB_GADGET_DUMMY_HCD is not set 1270# CONFIG_USB_GADGET_DUMMY_HCD is not set
1248CONFIG_USB_GADGET_DUALSPEED=y 1271CONFIG_USB_GADGET_DUALSPEED=y
1249# CONFIG_USB_ZERO is not set 1272# CONFIG_USB_ZERO is not set
1273# CONFIG_USB_AUDIO is not set
1250CONFIG_USB_ETH=y 1274CONFIG_USB_ETH=y
1251CONFIG_USB_ETH_RNDIS=y 1275CONFIG_USB_ETH_RNDIS=y
1252# CONFIG_USB_GADGETFS is not set 1276# CONFIG_USB_GADGETFS is not set
@@ -1298,6 +1322,7 @@ CONFIG_RTC_DRV_DS1307=y
1298# CONFIG_RTC_DRV_S35390A is not set 1322# CONFIG_RTC_DRV_S35390A is not set
1299# CONFIG_RTC_DRV_FM3130 is not set 1323# CONFIG_RTC_DRV_FM3130 is not set
1300# CONFIG_RTC_DRV_RX8581 is not set 1324# CONFIG_RTC_DRV_RX8581 is not set
1325# CONFIG_RTC_DRV_RX8025 is not set
1301 1326
1302# 1327#
1303# SPI RTC drivers 1328# SPI RTC drivers
@@ -1332,6 +1357,10 @@ CONFIG_RTC_DRV_DS1307=y
1332# CONFIG_DMADEVICES is not set 1357# CONFIG_DMADEVICES is not set
1333# CONFIG_AUXDISPLAY is not set 1358# CONFIG_AUXDISPLAY is not set
1334# CONFIG_UIO is not set 1359# CONFIG_UIO is not set
1360
1361#
1362# TI VLYNQ
1363#
1335# CONFIG_STAGING is not set 1364# CONFIG_STAGING is not set
1336 1365
1337# 1366#
@@ -1351,10 +1380,12 @@ CONFIG_FS_MBCACHE=y
1351# CONFIG_REISERFS_FS is not set 1380# CONFIG_REISERFS_FS is not set
1352# CONFIG_JFS_FS is not set 1381# CONFIG_JFS_FS is not set
1353# CONFIG_FS_POSIX_ACL is not set 1382# CONFIG_FS_POSIX_ACL is not set
1354CONFIG_FILE_LOCKING=y
1355# CONFIG_XFS_FS is not set 1383# CONFIG_XFS_FS is not set
1384# CONFIG_GFS2_FS is not set
1356# CONFIG_OCFS2_FS is not set 1385# CONFIG_OCFS2_FS is not set
1357# CONFIG_BTRFS_FS is not set 1386# CONFIG_BTRFS_FS is not set
1387CONFIG_FILE_LOCKING=y
1388CONFIG_FSNOTIFY=y
1358CONFIG_DNOTIFY=y 1389CONFIG_DNOTIFY=y
1359CONFIG_INOTIFY=y 1390CONFIG_INOTIFY=y
1360CONFIG_INOTIFY_USER=y 1391CONFIG_INOTIFY_USER=y
@@ -1428,6 +1459,7 @@ CONFIG_NFS_FS=y
1428CONFIG_NFS_V3=y 1459CONFIG_NFS_V3=y
1429# CONFIG_NFS_V3_ACL is not set 1460# CONFIG_NFS_V3_ACL is not set
1430CONFIG_NFS_V4=y 1461CONFIG_NFS_V4=y
1462# CONFIG_NFS_V4_1 is not set
1431CONFIG_ROOT_NFS=y 1463CONFIG_ROOT_NFS=y
1432# CONFIG_NFSD is not set 1464# CONFIG_NFSD is not set
1433CONFIG_LOCKD=y 1465CONFIG_LOCKD=y
@@ -1464,7 +1496,46 @@ CONFIG_MSDOS_PARTITION=y
1464# CONFIG_KARMA_PARTITION is not set 1496# CONFIG_KARMA_PARTITION is not set
1465# CONFIG_EFI_PARTITION is not set 1497# CONFIG_EFI_PARTITION is not set
1466# CONFIG_SYSV68_PARTITION is not set 1498# CONFIG_SYSV68_PARTITION is not set
1467# CONFIG_NLS is not set 1499CONFIG_NLS=y
1500CONFIG_NLS_DEFAULT="iso8859-1"
1501# CONFIG_NLS_CODEPAGE_437 is not set
1502# CONFIG_NLS_CODEPAGE_737 is not set
1503# CONFIG_NLS_CODEPAGE_775 is not set
1504# CONFIG_NLS_CODEPAGE_850 is not set
1505# CONFIG_NLS_CODEPAGE_852 is not set
1506# CONFIG_NLS_CODEPAGE_855 is not set
1507# CONFIG_NLS_CODEPAGE_857 is not set
1508# CONFIG_NLS_CODEPAGE_860 is not set
1509# CONFIG_NLS_CODEPAGE_861 is not set
1510# CONFIG_NLS_CODEPAGE_862 is not set
1511# CONFIG_NLS_CODEPAGE_863 is not set
1512# CONFIG_NLS_CODEPAGE_864 is not set
1513# CONFIG_NLS_CODEPAGE_865 is not set
1514# CONFIG_NLS_CODEPAGE_866 is not set
1515# CONFIG_NLS_CODEPAGE_869 is not set
1516# CONFIG_NLS_CODEPAGE_936 is not set
1517# CONFIG_NLS_CODEPAGE_950 is not set
1518# CONFIG_NLS_CODEPAGE_932 is not set
1519# CONFIG_NLS_CODEPAGE_949 is not set
1520# CONFIG_NLS_CODEPAGE_874 is not set
1521# CONFIG_NLS_ISO8859_8 is not set
1522# CONFIG_NLS_CODEPAGE_1250 is not set
1523# CONFIG_NLS_CODEPAGE_1251 is not set
1524# CONFIG_NLS_ASCII is not set
1525# CONFIG_NLS_ISO8859_1 is not set
1526# CONFIG_NLS_ISO8859_2 is not set
1527# CONFIG_NLS_ISO8859_3 is not set
1528# CONFIG_NLS_ISO8859_4 is not set
1529# CONFIG_NLS_ISO8859_5 is not set
1530# CONFIG_NLS_ISO8859_6 is not set
1531# CONFIG_NLS_ISO8859_7 is not set
1532# CONFIG_NLS_ISO8859_9 is not set
1533# CONFIG_NLS_ISO8859_13 is not set
1534# CONFIG_NLS_ISO8859_14 is not set
1535# CONFIG_NLS_ISO8859_15 is not set
1536# CONFIG_NLS_KOI8_R is not set
1537# CONFIG_NLS_KOI8_U is not set
1538# CONFIG_NLS_UTF8 is not set
1468# CONFIG_DLM is not set 1539# CONFIG_DLM is not set
1469# CONFIG_BINARY_PRINTF is not set 1540# CONFIG_BINARY_PRINTF is not set
1470 1541
@@ -1488,6 +1559,7 @@ CONFIG_HAS_IOPORT=y
1488CONFIG_HAS_DMA=y 1559CONFIG_HAS_DMA=y
1489CONFIG_HAVE_LMB=y 1560CONFIG_HAVE_LMB=y
1490CONFIG_NLATTR=y 1561CONFIG_NLATTR=y
1562CONFIG_GENERIC_ATOMIC64=y
1491 1563
1492# 1564#
1493# Kernel hacking 1565# Kernel hacking
@@ -1518,6 +1590,9 @@ CONFIG_SCHED_DEBUG=y
1518# CONFIG_RT_MUTEX_TESTER is not set 1590# CONFIG_RT_MUTEX_TESTER is not set
1519# CONFIG_DEBUG_SPINLOCK is not set 1591# CONFIG_DEBUG_SPINLOCK is not set
1520# CONFIG_DEBUG_MUTEXES is not set 1592# CONFIG_DEBUG_MUTEXES is not set
1593# CONFIG_DEBUG_LOCK_ALLOC is not set
1594# CONFIG_PROVE_LOCKING is not set
1595# CONFIG_LOCK_STAT is not set
1521# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1596# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1522# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1597# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1523# CONFIG_DEBUG_KOBJECT is not set 1598# CONFIG_DEBUG_KOBJECT is not set
@@ -1529,7 +1604,6 @@ CONFIG_SCHED_DEBUG=y
1529# CONFIG_DEBUG_LIST is not set 1604# CONFIG_DEBUG_LIST is not set
1530# CONFIG_DEBUG_SG is not set 1605# CONFIG_DEBUG_SG is not set
1531# CONFIG_DEBUG_NOTIFIERS is not set 1606# CONFIG_DEBUG_NOTIFIERS is not set
1532# CONFIG_BOOT_PRINTK_DELAY is not set
1533# CONFIG_RCU_TORTURE_TEST is not set 1607# CONFIG_RCU_TORTURE_TEST is not set
1534# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1608# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1535# CONFIG_BACKTRACE_SELF_TEST is not set 1609# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1543,16 +1617,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1543CONFIG_HAVE_DYNAMIC_FTRACE=y 1617CONFIG_HAVE_DYNAMIC_FTRACE=y
1544CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1618CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1545CONFIG_TRACING_SUPPORT=y 1619CONFIG_TRACING_SUPPORT=y
1546 1620CONFIG_FTRACE=y
1547#
1548# Tracers
1549#
1550# CONFIG_FUNCTION_TRACER is not set 1621# CONFIG_FUNCTION_TRACER is not set
1622# CONFIG_IRQSOFF_TRACER is not set
1551# CONFIG_SCHED_TRACER is not set 1623# CONFIG_SCHED_TRACER is not set
1552# CONFIG_CONTEXT_SWITCH_TRACER is not set 1624# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1553# CONFIG_EVENT_TRACER is not set
1554# CONFIG_BOOT_TRACER is not set 1625# CONFIG_BOOT_TRACER is not set
1555# CONFIG_TRACE_BRANCH_PROFILING is not set 1626CONFIG_BRANCH_PROFILE_NONE=y
1627# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1628# CONFIG_PROFILE_ALL_BRANCHES is not set
1556# CONFIG_STACK_TRACER is not set 1629# CONFIG_STACK_TRACER is not set
1557# CONFIG_KMEMTRACE is not set 1630# CONFIG_KMEMTRACE is not set
1558# CONFIG_WORKQUEUE_TRACER is not set 1631# CONFIG_WORKQUEUE_TRACER is not set
@@ -1560,6 +1633,9 @@ CONFIG_TRACING_SUPPORT=y
1560# CONFIG_SAMPLES is not set 1633# CONFIG_SAMPLES is not set
1561CONFIG_HAVE_ARCH_KGDB=y 1634CONFIG_HAVE_ARCH_KGDB=y
1562# CONFIG_KGDB is not set 1635# CONFIG_KGDB is not set
1636# CONFIG_KMEMCHECK is not set
1637# CONFIG_PPC_DISABLE_WERROR is not set
1638CONFIG_PPC_WERROR=y
1563CONFIG_PRINT_STACK_DEPTH=64 1639CONFIG_PRINT_STACK_DEPTH=64
1564# CONFIG_DEBUG_STACKOVERFLOW is not set 1640# CONFIG_DEBUG_STACKOVERFLOW is not set
1565# CONFIG_DEBUG_STACK_USAGE is not set 1641# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
index af4952feba3..76237d46670 100644
--- a/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:06 2009 4# Wed Jul 29 23:32:05 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_FSL_EMB_PERFMON is not set 20# CONFIG_FSL_EMB_PERFMON is not set
20# CONFIG_ALTIVEC is not set 21# CONFIG_ALTIVEC is not set
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24# CONFIG_SMP is not set 26# CONFIG_SMP is not set
25CONFIG_PPC32=y 27CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32 28CONFIG_WORD_SIZE=32
@@ -31,15 +33,16 @@ CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y 33CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y 34CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y 35CONFIG_GENERIC_HARDIRQS=y
36CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y 38CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y 39CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y 40CONFIG_HAVE_LATENCYTOP_SUPPORT=y
41CONFIG_TRACE_IRQFLAGS_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y 42CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y 43CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y 44CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y 45CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y 46CONFIG_GENERIC_FIND_NEXT_BIT=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
45CONFIG_PPC=y 48CONFIG_PPC=y
@@ -53,12 +56,14 @@ CONFIG_PPC_UDBG_16550=y
53# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
56CONFIG_DEFAULT_UIMAGE=y 60CONFIG_DEFAULT_UIMAGE=y
57CONFIG_ARCH_SUSPEND_POSSIBLE=y 61CONFIG_ARCH_SUSPEND_POSSIBLE=y
58# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
59# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
60CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
61CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
62 67
63# 68#
64# General setup 69# General setup
@@ -107,7 +112,6 @@ CONFIG_ANON_INODES=y
107CONFIG_EMBEDDED=y 112CONFIG_EMBEDDED=y
108CONFIG_SYSCTL_SYSCALL=y 113CONFIG_SYSCTL_SYSCALL=y
109# CONFIG_KALLSYMS is not set 114# CONFIG_KALLSYMS is not set
110# CONFIG_STRIP_ASM_SYMS is not set
111CONFIG_HOTPLUG=y 115CONFIG_HOTPLUG=y
112CONFIG_PRINTK=y 116CONFIG_PRINTK=y
113CONFIG_BUG=y 117CONFIG_BUG=y
@@ -120,9 +124,16 @@ CONFIG_TIMERFD=y
120CONFIG_EVENTFD=y 124CONFIG_EVENTFD=y
121CONFIG_SHMEM=y 125CONFIG_SHMEM=y
122CONFIG_AIO=y 126CONFIG_AIO=y
127CONFIG_HAVE_PERF_COUNTERS=y
128
129#
130# Performance Counters
131#
132# CONFIG_PERF_COUNTERS is not set
123CONFIG_VM_EVENT_COUNTERS=y 133CONFIG_VM_EVENT_COUNTERS=y
124CONFIG_PCI_QUIRKS=y 134CONFIG_PCI_QUIRKS=y
125CONFIG_SLUB_DEBUG=y 135CONFIG_SLUB_DEBUG=y
136# CONFIG_STRIP_ASM_SYMS is not set
126CONFIG_COMPAT_BRK=y 137CONFIG_COMPAT_BRK=y
127# CONFIG_SLAB is not set 138# CONFIG_SLAB is not set
128CONFIG_SLUB=y 139CONFIG_SLUB=y
@@ -135,6 +146,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
135CONFIG_HAVE_KPROBES=y 146CONFIG_HAVE_KPROBES=y
136CONFIG_HAVE_KRETPROBES=y 147CONFIG_HAVE_KRETPROBES=y
137CONFIG_HAVE_ARCH_TRACEHOOK=y 148CONFIG_HAVE_ARCH_TRACEHOOK=y
149
150#
151# GCOV-based kernel profiling
152#
138# CONFIG_SLOW_WORK is not set 153# CONFIG_SLOW_WORK is not set
139# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 154# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
140CONFIG_SLABINFO=y 155CONFIG_SLABINFO=y
@@ -147,7 +162,7 @@ CONFIG_MODULE_UNLOAD=y
147# CONFIG_MODVERSIONS is not set 162# CONFIG_MODVERSIONS is not set
148# CONFIG_MODULE_SRCVERSION_ALL is not set 163# CONFIG_MODULE_SRCVERSION_ALL is not set
149CONFIG_BLOCK=y 164CONFIG_BLOCK=y
150# CONFIG_LBD is not set 165CONFIG_LBDAF=y
151# CONFIG_BLK_DEV_BSG is not set 166# CONFIG_BLK_DEV_BSG is not set
152# CONFIG_BLK_DEV_INTEGRITY is not set 167# CONFIG_BLK_DEV_INTEGRITY is not set
153 168
@@ -189,6 +204,7 @@ CONFIG_MPC831x_RDB=y
189# CONFIG_MPC837x_RDB is not set 204# CONFIG_MPC837x_RDB is not set
190# CONFIG_SBC834x is not set 205# CONFIG_SBC834x is not set
191# CONFIG_ASP834x is not set 206# CONFIG_ASP834x is not set
207# CONFIG_KMETER1 is not set
192CONFIG_PPC_MPC831x=y 208CONFIG_PPC_MPC831x=y
193# CONFIG_PPC_86xx is not set 209# CONFIG_PPC_86xx is not set
194# CONFIG_EMBEDDED6xx is not set 210# CONFIG_EMBEDDED6xx is not set
@@ -234,6 +250,7 @@ CONFIG_BINFMT_ELF=y
234# CONFIG_HAVE_AOUT is not set 250# CONFIG_HAVE_AOUT is not set
235# CONFIG_BINFMT_MISC is not set 251# CONFIG_BINFMT_MISC is not set
236# CONFIG_IOMMU_HELPER is not set 252# CONFIG_IOMMU_HELPER is not set
253# CONFIG_SWIOTLB is not set
237CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 254CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
238CONFIG_ARCH_HAS_WALK_MEMORY=y 255CONFIG_ARCH_HAS_WALK_MEMORY=y
239CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 256CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -254,9 +271,9 @@ CONFIG_MIGRATION=y
254CONFIG_ZONE_DMA_FLAG=1 271CONFIG_ZONE_DMA_FLAG=1
255CONFIG_BOUNCE=y 272CONFIG_BOUNCE=y
256CONFIG_VIRT_TO_BUS=y 273CONFIG_VIRT_TO_BUS=y
257CONFIG_UNEVICTABLE_LRU=y
258CONFIG_HAVE_MLOCK=y 274CONFIG_HAVE_MLOCK=y
259CONFIG_HAVE_MLOCKED_PAGE_BIT=y 275CONFIG_HAVE_MLOCKED_PAGE_BIT=y
276CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
260CONFIG_PPC_4K_PAGES=y 277CONFIG_PPC_4K_PAGES=y
261# CONFIG_PPC_16K_PAGES is not set 278# CONFIG_PPC_16K_PAGES is not set
262# CONFIG_PPC_64K_PAGES is not set 279# CONFIG_PPC_64K_PAGES is not set
@@ -366,6 +383,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
366# CONFIG_ECONET is not set 383# CONFIG_ECONET is not set
367# CONFIG_WAN_ROUTER is not set 384# CONFIG_WAN_ROUTER is not set
368# CONFIG_PHONET is not set 385# CONFIG_PHONET is not set
386# CONFIG_IEEE802154 is not set
369# CONFIG_NET_SCHED is not set 387# CONFIG_NET_SCHED is not set
370# CONFIG_DCB is not set 388# CONFIG_DCB is not set
371 389
@@ -383,7 +401,11 @@ CONFIG_WIRELESS=y
383CONFIG_WIRELESS_OLD_REGULATORY=y 401CONFIG_WIRELESS_OLD_REGULATORY=y
384# CONFIG_WIRELESS_EXT is not set 402# CONFIG_WIRELESS_EXT is not set
385# CONFIG_LIB80211 is not set 403# CONFIG_LIB80211 is not set
386# CONFIG_MAC80211 is not set 404
405#
406# CFG80211 needs to be enabled for MAC80211
407#
408CONFIG_MAC80211_DEFAULT_PS_VALUE=0
387# CONFIG_WIMAX is not set 409# CONFIG_WIMAX is not set
388# CONFIG_RFKILL is not set 410# CONFIG_RFKILL is not set
389# CONFIG_NET_9P is not set 411# CONFIG_NET_9P is not set
@@ -503,6 +525,7 @@ CONFIG_MTD_NAND_IDS=y
503CONFIG_OF_DEVICE=y 525CONFIG_OF_DEVICE=y
504CONFIG_OF_I2C=y 526CONFIG_OF_I2C=y
505CONFIG_OF_SPI=y 527CONFIG_OF_SPI=y
528CONFIG_OF_MDIO=y
506# CONFIG_PARPORT is not set 529# CONFIG_PARPORT is not set
507CONFIG_BLK_DEV=y 530CONFIG_BLK_DEV=y
508# CONFIG_BLK_DEV_FD is not set 531# CONFIG_BLK_DEV_FD is not set
@@ -539,7 +562,9 @@ CONFIG_MISC_DEVICES=y
539# CONFIG_EEPROM_AT24 is not set 562# CONFIG_EEPROM_AT24 is not set
540# CONFIG_EEPROM_AT25 is not set 563# CONFIG_EEPROM_AT25 is not set
541# CONFIG_EEPROM_LEGACY is not set 564# CONFIG_EEPROM_LEGACY is not set
565# CONFIG_EEPROM_MAX6875 is not set
542# CONFIG_EEPROM_93CX6 is not set 566# CONFIG_EEPROM_93CX6 is not set
567# CONFIG_CB710_CORE is not set
543CONFIG_HAVE_IDE=y 568CONFIG_HAVE_IDE=y
544# CONFIG_IDE is not set 569# CONFIG_IDE is not set
545 570
@@ -562,10 +587,6 @@ CONFIG_SCSI_PROC_FS=y
562# CONFIG_BLK_DEV_SR is not set 587# CONFIG_BLK_DEV_SR is not set
563CONFIG_CHR_DEV_SG=y 588CONFIG_CHR_DEV_SG=y
564# CONFIG_CHR_DEV_SCH is not set 589# CONFIG_CHR_DEV_SCH is not set
565
566#
567# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
568#
569# CONFIG_SCSI_MULTI_LUN is not set 590# CONFIG_SCSI_MULTI_LUN is not set
570# CONFIG_SCSI_CONSTANTS is not set 591# CONFIG_SCSI_CONSTANTS is not set
571# CONFIG_SCSI_LOGGING is not set 592# CONFIG_SCSI_LOGGING is not set
@@ -583,6 +604,7 @@ CONFIG_SCSI_SPI_ATTRS=y
583CONFIG_SCSI_LOWLEVEL=y 604CONFIG_SCSI_LOWLEVEL=y
584# CONFIG_ISCSI_TCP is not set 605# CONFIG_ISCSI_TCP is not set
585# CONFIG_SCSI_CXGB3_ISCSI is not set 606# CONFIG_SCSI_CXGB3_ISCSI is not set
607# CONFIG_SCSI_BNX2_ISCSI is not set
586# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 608# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
587# CONFIG_SCSI_3W_9XXX is not set 609# CONFIG_SCSI_3W_9XXX is not set
588# CONFIG_SCSI_ACARD is not set 610# CONFIG_SCSI_ACARD is not set
@@ -591,6 +613,7 @@ CONFIG_SCSI_LOWLEVEL=y
591# CONFIG_SCSI_AIC7XXX_OLD is not set 613# CONFIG_SCSI_AIC7XXX_OLD is not set
592# CONFIG_SCSI_AIC79XX is not set 614# CONFIG_SCSI_AIC79XX is not set
593# CONFIG_SCSI_AIC94XX is not set 615# CONFIG_SCSI_AIC94XX is not set
616# CONFIG_SCSI_MVSAS is not set
594# CONFIG_SCSI_DPT_I2O is not set 617# CONFIG_SCSI_DPT_I2O is not set
595# CONFIG_SCSI_ADVANSYS is not set 618# CONFIG_SCSI_ADVANSYS is not set
596# CONFIG_SCSI_ARCMSR is not set 619# CONFIG_SCSI_ARCMSR is not set
@@ -610,7 +633,6 @@ CONFIG_SCSI_LOWLEVEL=y
610# CONFIG_SCSI_IPS is not set 633# CONFIG_SCSI_IPS is not set
611# CONFIG_SCSI_INITIO is not set 634# CONFIG_SCSI_INITIO is not set
612# CONFIG_SCSI_INIA100 is not set 635# CONFIG_SCSI_INIA100 is not set
613# CONFIG_SCSI_MVSAS is not set
614# CONFIG_SCSI_STEX is not set 636# CONFIG_SCSI_STEX is not set
615# CONFIG_SCSI_SYM53C8XX_2 is not set 637# CONFIG_SCSI_SYM53C8XX_2 is not set
616# CONFIG_SCSI_IPR is not set 638# CONFIG_SCSI_IPR is not set
@@ -704,14 +726,17 @@ CONFIG_MD_RAID1=y
704# 726#
705 727
706# 728#
707# Enable only one of the two stacks, unless you know what you are doing 729# You can enable one or both FireWire driver stacks.
730#
731
732#
733# See the help texts for more information.
708# 734#
709# CONFIG_FIREWIRE is not set 735# CONFIG_FIREWIRE is not set
710# CONFIG_IEEE1394 is not set 736# CONFIG_IEEE1394 is not set
711# CONFIG_I2O is not set 737# CONFIG_I2O is not set
712# CONFIG_MACINTOSH_DRIVERS is not set 738# CONFIG_MACINTOSH_DRIVERS is not set
713CONFIG_NETDEVICES=y 739CONFIG_NETDEVICES=y
714CONFIG_COMPAT_NET_DEV_OPS=y
715# CONFIG_DUMMY is not set 740# CONFIG_DUMMY is not set
716# CONFIG_BONDING is not set 741# CONFIG_BONDING is not set
717# CONFIG_MACVLAN is not set 742# CONFIG_MACVLAN is not set
@@ -775,6 +800,8 @@ CONFIG_E100=y
775# CONFIG_SMSC9420 is not set 800# CONFIG_SMSC9420 is not set
776# CONFIG_SUNDANCE is not set 801# CONFIG_SUNDANCE is not set
777# CONFIG_TLAN is not set 802# CONFIG_TLAN is not set
803# CONFIG_KS8842 is not set
804# CONFIG_KS8851 is not set
778# CONFIG_VIA_RHINE is not set 805# CONFIG_VIA_RHINE is not set
779# CONFIG_SC92031 is not set 806# CONFIG_SC92031 is not set
780# CONFIG_ATL2 is not set 807# CONFIG_ATL2 is not set
@@ -796,8 +823,10 @@ CONFIG_NETDEV_1000=y
796# CONFIG_VIA_VELOCITY is not set 823# CONFIG_VIA_VELOCITY is not set
797# CONFIG_TIGON3 is not set 824# CONFIG_TIGON3 is not set
798# CONFIG_BNX2 is not set 825# CONFIG_BNX2 is not set
826# CONFIG_CNIC is not set
799CONFIG_FSL_PQ_MDIO=y 827CONFIG_FSL_PQ_MDIO=y
800CONFIG_GIANFAR=y 828CONFIG_GIANFAR=y
829# CONFIG_MV643XX_ETH is not set
801# CONFIG_QLA3XXX is not set 830# CONFIG_QLA3XXX is not set
802# CONFIG_ATL1 is not set 831# CONFIG_ATL1 is not set
803# CONFIG_ATL1E is not set 832# CONFIG_ATL1E is not set
@@ -985,7 +1014,6 @@ CONFIG_I2C_MPC=y
985# CONFIG_SENSORS_PCF8574 is not set 1014# CONFIG_SENSORS_PCF8574 is not set
986# CONFIG_PCF8575 is not set 1015# CONFIG_PCF8575 is not set
987# CONFIG_SENSORS_PCA9539 is not set 1016# CONFIG_SENSORS_PCA9539 is not set
988# CONFIG_SENSORS_MAX6875 is not set
989# CONFIG_SENSORS_TSL2550 is not set 1017# CONFIG_SENSORS_TSL2550 is not set
990# CONFIG_I2C_DEBUG_CORE is not set 1018# CONFIG_I2C_DEBUG_CORE is not set
991# CONFIG_I2C_DEBUG_ALGO is not set 1019# CONFIG_I2C_DEBUG_ALGO is not set
@@ -999,13 +1027,18 @@ CONFIG_SPI_MASTER=y
999# SPI Master Controller Drivers 1027# SPI Master Controller Drivers
1000# 1028#
1001CONFIG_SPI_BITBANG=y 1029CONFIG_SPI_BITBANG=y
1002CONFIG_SPI_MPC83xx=y 1030# CONFIG_SPI_MPC8xxx is not set
1003 1031
1004# 1032#
1005# SPI Protocol Masters 1033# SPI Protocol Masters
1006# 1034#
1007# CONFIG_SPI_SPIDEV is not set 1035# CONFIG_SPI_SPIDEV is not set
1008# CONFIG_SPI_TLE62X0 is not set 1036# CONFIG_SPI_TLE62X0 is not set
1037
1038#
1039# PPS support
1040#
1041# CONFIG_PPS is not set
1009CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 1042CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
1010# CONFIG_GPIOLIB is not set 1043# CONFIG_GPIOLIB is not set
1011# CONFIG_W1 is not set 1044# CONFIG_W1 is not set
@@ -1063,6 +1096,7 @@ CONFIG_HWMON=y
1063# CONFIG_SENSORS_SMSC47B397 is not set 1096# CONFIG_SENSORS_SMSC47B397 is not set
1064# CONFIG_SENSORS_ADS7828 is not set 1097# CONFIG_SENSORS_ADS7828 is not set
1065# CONFIG_SENSORS_THMC50 is not set 1098# CONFIG_SENSORS_THMC50 is not set
1099# CONFIG_SENSORS_TMP401 is not set
1066# CONFIG_SENSORS_VIA686A is not set 1100# CONFIG_SENSORS_VIA686A is not set
1067# CONFIG_SENSORS_VT1211 is not set 1101# CONFIG_SENSORS_VT1211 is not set
1068# CONFIG_SENSORS_VT8231 is not set 1102# CONFIG_SENSORS_VT8231 is not set
@@ -1117,24 +1151,10 @@ CONFIG_SSB_POSSIBLE=y
1117# CONFIG_MFD_WM8400 is not set 1151# CONFIG_MFD_WM8400 is not set
1118# CONFIG_MFD_WM8350_I2C is not set 1152# CONFIG_MFD_WM8350_I2C is not set
1119# CONFIG_MFD_PCF50633 is not set 1153# CONFIG_MFD_PCF50633 is not set
1154# CONFIG_AB3100_CORE is not set
1155# CONFIG_EZX_PCAP is not set
1120# CONFIG_REGULATOR is not set 1156# CONFIG_REGULATOR is not set
1121 1157# CONFIG_MEDIA_SUPPORT is not set
1122#
1123# Multimedia devices
1124#
1125
1126#
1127# Multimedia core support
1128#
1129# CONFIG_VIDEO_DEV is not set
1130# CONFIG_DVB_CORE is not set
1131# CONFIG_VIDEO_MEDIA is not set
1132
1133#
1134# Multimedia drivers
1135#
1136CONFIG_DAB=y
1137# CONFIG_USB_DABUSB is not set
1138 1158
1139# 1159#
1140# Graphics support 1160# Graphics support
@@ -1196,6 +1216,7 @@ CONFIG_USB_MON=y
1196# USB Host Controller Drivers 1216# USB Host Controller Drivers
1197# 1217#
1198# CONFIG_USB_C67X00_HCD is not set 1218# CONFIG_USB_C67X00_HCD is not set
1219# CONFIG_USB_XHCI_HCD is not set
1199CONFIG_USB_EHCI_HCD=y 1220CONFIG_USB_EHCI_HCD=y
1200CONFIG_USB_EHCI_ROOT_HUB_TT=y 1221CONFIG_USB_EHCI_ROOT_HUB_TT=y
1201# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1222# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1205,9 +1226,9 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y
1205# CONFIG_USB_ISP116X_HCD is not set 1226# CONFIG_USB_ISP116X_HCD is not set
1206# CONFIG_USB_ISP1760_HCD is not set 1227# CONFIG_USB_ISP1760_HCD is not set
1207CONFIG_USB_OHCI_HCD=y 1228CONFIG_USB_OHCI_HCD=y
1208CONFIG_USB_OHCI_HCD_PPC_OF=y
1209CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1229CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1210# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set 1230# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
1231CONFIG_USB_OHCI_HCD_PPC_OF=y
1211CONFIG_USB_OHCI_HCD_PCI=y 1232CONFIG_USB_OHCI_HCD_PCI=y
1212CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y 1233CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1213CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y 1234CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
@@ -1296,8 +1317,9 @@ CONFIG_USB_GADGET_SELECTED=y
1296# CONFIG_USB_GADGET_OMAP is not set 1317# CONFIG_USB_GADGET_OMAP is not set
1297# CONFIG_USB_GADGET_PXA25X is not set 1318# CONFIG_USB_GADGET_PXA25X is not set
1298# CONFIG_USB_GADGET_PXA27X is not set 1319# CONFIG_USB_GADGET_PXA27X is not set
1299# CONFIG_USB_GADGET_S3C2410 is not set 1320# CONFIG_USB_GADGET_S3C_HSOTG is not set
1300# CONFIG_USB_GADGET_IMX is not set 1321# CONFIG_USB_GADGET_IMX is not set
1322# CONFIG_USB_GADGET_S3C2410 is not set
1301# CONFIG_USB_GADGET_M66592 is not set 1323# CONFIG_USB_GADGET_M66592 is not set
1302# CONFIG_USB_GADGET_AMD5536UDC is not set 1324# CONFIG_USB_GADGET_AMD5536UDC is not set
1303# CONFIG_USB_GADGET_FSL_QE is not set 1325# CONFIG_USB_GADGET_FSL_QE is not set
@@ -1305,9 +1327,11 @@ CONFIG_USB_GADGET_SELECTED=y
1305CONFIG_USB_GADGET_NET2280=y 1327CONFIG_USB_GADGET_NET2280=y
1306CONFIG_USB_NET2280=y 1328CONFIG_USB_NET2280=y
1307# CONFIG_USB_GADGET_GOKU is not set 1329# CONFIG_USB_GADGET_GOKU is not set
1330# CONFIG_USB_GADGET_LANGWELL is not set
1308# CONFIG_USB_GADGET_DUMMY_HCD is not set 1331# CONFIG_USB_GADGET_DUMMY_HCD is not set
1309CONFIG_USB_GADGET_DUALSPEED=y 1332CONFIG_USB_GADGET_DUALSPEED=y
1310# CONFIG_USB_ZERO is not set 1333# CONFIG_USB_ZERO is not set
1334# CONFIG_USB_AUDIO is not set
1311CONFIG_USB_ETH=y 1335CONFIG_USB_ETH=y
1312CONFIG_USB_ETH_RNDIS=y 1336CONFIG_USB_ETH_RNDIS=y
1313# CONFIG_USB_GADGETFS is not set 1337# CONFIG_USB_GADGETFS is not set
@@ -1359,6 +1383,7 @@ CONFIG_RTC_DRV_DS1307=y
1359# CONFIG_RTC_DRV_S35390A is not set 1383# CONFIG_RTC_DRV_S35390A is not set
1360# CONFIG_RTC_DRV_FM3130 is not set 1384# CONFIG_RTC_DRV_FM3130 is not set
1361# CONFIG_RTC_DRV_RX8581 is not set 1385# CONFIG_RTC_DRV_RX8581 is not set
1386# CONFIG_RTC_DRV_RX8025 is not set
1362 1387
1363# 1388#
1364# SPI RTC drivers 1389# SPI RTC drivers
@@ -1393,6 +1418,10 @@ CONFIG_RTC_DRV_DS1307=y
1393# CONFIG_DMADEVICES is not set 1418# CONFIG_DMADEVICES is not set
1394# CONFIG_AUXDISPLAY is not set 1419# CONFIG_AUXDISPLAY is not set
1395# CONFIG_UIO is not set 1420# CONFIG_UIO is not set
1421
1422#
1423# TI VLYNQ
1424#
1396# CONFIG_STAGING is not set 1425# CONFIG_STAGING is not set
1397 1426
1398# 1427#
@@ -1412,10 +1441,12 @@ CONFIG_FS_MBCACHE=y
1412# CONFIG_REISERFS_FS is not set 1441# CONFIG_REISERFS_FS is not set
1413# CONFIG_JFS_FS is not set 1442# CONFIG_JFS_FS is not set
1414# CONFIG_FS_POSIX_ACL is not set 1443# CONFIG_FS_POSIX_ACL is not set
1415CONFIG_FILE_LOCKING=y
1416# CONFIG_XFS_FS is not set 1444# CONFIG_XFS_FS is not set
1445# CONFIG_GFS2_FS is not set
1417# CONFIG_OCFS2_FS is not set 1446# CONFIG_OCFS2_FS is not set
1418# CONFIG_BTRFS_FS is not set 1447# CONFIG_BTRFS_FS is not set
1448CONFIG_FILE_LOCKING=y
1449CONFIG_FSNOTIFY=y
1419CONFIG_DNOTIFY=y 1450CONFIG_DNOTIFY=y
1420CONFIG_INOTIFY=y 1451CONFIG_INOTIFY=y
1421CONFIG_INOTIFY_USER=y 1452CONFIG_INOTIFY_USER=y
@@ -1489,6 +1520,7 @@ CONFIG_NFS_FS=y
1489CONFIG_NFS_V3=y 1520CONFIG_NFS_V3=y
1490# CONFIG_NFS_V3_ACL is not set 1521# CONFIG_NFS_V3_ACL is not set
1491CONFIG_NFS_V4=y 1522CONFIG_NFS_V4=y
1523# CONFIG_NFS_V4_1 is not set
1492CONFIG_ROOT_NFS=y 1524CONFIG_ROOT_NFS=y
1493# CONFIG_NFSD is not set 1525# CONFIG_NFSD is not set
1494CONFIG_LOCKD=y 1526CONFIG_LOCKD=y
@@ -1525,7 +1557,46 @@ CONFIG_MSDOS_PARTITION=y
1525# CONFIG_KARMA_PARTITION is not set 1557# CONFIG_KARMA_PARTITION is not set
1526# CONFIG_EFI_PARTITION is not set 1558# CONFIG_EFI_PARTITION is not set
1527# CONFIG_SYSV68_PARTITION is not set 1559# CONFIG_SYSV68_PARTITION is not set
1528# CONFIG_NLS is not set 1560CONFIG_NLS=y
1561CONFIG_NLS_DEFAULT="iso8859-1"
1562# CONFIG_NLS_CODEPAGE_437 is not set
1563# CONFIG_NLS_CODEPAGE_737 is not set
1564# CONFIG_NLS_CODEPAGE_775 is not set
1565# CONFIG_NLS_CODEPAGE_850 is not set
1566# CONFIG_NLS_CODEPAGE_852 is not set
1567# CONFIG_NLS_CODEPAGE_855 is not set
1568# CONFIG_NLS_CODEPAGE_857 is not set
1569# CONFIG_NLS_CODEPAGE_860 is not set
1570# CONFIG_NLS_CODEPAGE_861 is not set
1571# CONFIG_NLS_CODEPAGE_862 is not set
1572# CONFIG_NLS_CODEPAGE_863 is not set
1573# CONFIG_NLS_CODEPAGE_864 is not set
1574# CONFIG_NLS_CODEPAGE_865 is not set
1575# CONFIG_NLS_CODEPAGE_866 is not set
1576# CONFIG_NLS_CODEPAGE_869 is not set
1577# CONFIG_NLS_CODEPAGE_936 is not set
1578# CONFIG_NLS_CODEPAGE_950 is not set
1579# CONFIG_NLS_CODEPAGE_932 is not set
1580# CONFIG_NLS_CODEPAGE_949 is not set
1581# CONFIG_NLS_CODEPAGE_874 is not set
1582# CONFIG_NLS_ISO8859_8 is not set
1583# CONFIG_NLS_CODEPAGE_1250 is not set
1584# CONFIG_NLS_CODEPAGE_1251 is not set
1585# CONFIG_NLS_ASCII is not set
1586# CONFIG_NLS_ISO8859_1 is not set
1587# CONFIG_NLS_ISO8859_2 is not set
1588# CONFIG_NLS_ISO8859_3 is not set
1589# CONFIG_NLS_ISO8859_4 is not set
1590# CONFIG_NLS_ISO8859_5 is not set
1591# CONFIG_NLS_ISO8859_6 is not set
1592# CONFIG_NLS_ISO8859_7 is not set
1593# CONFIG_NLS_ISO8859_9 is not set
1594# CONFIG_NLS_ISO8859_13 is not set
1595# CONFIG_NLS_ISO8859_14 is not set
1596# CONFIG_NLS_ISO8859_15 is not set
1597# CONFIG_NLS_KOI8_R is not set
1598# CONFIG_NLS_KOI8_U is not set
1599# CONFIG_NLS_UTF8 is not set
1529# CONFIG_DLM is not set 1600# CONFIG_DLM is not set
1530# CONFIG_BINARY_PRINTF is not set 1601# CONFIG_BINARY_PRINTF is not set
1531 1602
@@ -1549,6 +1620,7 @@ CONFIG_HAS_IOPORT=y
1549CONFIG_HAS_DMA=y 1620CONFIG_HAS_DMA=y
1550CONFIG_HAVE_LMB=y 1621CONFIG_HAVE_LMB=y
1551CONFIG_NLATTR=y 1622CONFIG_NLATTR=y
1623CONFIG_GENERIC_ATOMIC64=y
1552 1624
1553# 1625#
1554# Kernel hacking 1626# Kernel hacking
@@ -1579,6 +1651,9 @@ CONFIG_SCHED_DEBUG=y
1579# CONFIG_RT_MUTEX_TESTER is not set 1651# CONFIG_RT_MUTEX_TESTER is not set
1580# CONFIG_DEBUG_SPINLOCK is not set 1652# CONFIG_DEBUG_SPINLOCK is not set
1581# CONFIG_DEBUG_MUTEXES is not set 1653# CONFIG_DEBUG_MUTEXES is not set
1654# CONFIG_DEBUG_LOCK_ALLOC is not set
1655# CONFIG_PROVE_LOCKING is not set
1656# CONFIG_LOCK_STAT is not set
1582# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1657# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1583# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1658# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1584# CONFIG_DEBUG_KOBJECT is not set 1659# CONFIG_DEBUG_KOBJECT is not set
@@ -1590,7 +1665,6 @@ CONFIG_SCHED_DEBUG=y
1590# CONFIG_DEBUG_LIST is not set 1665# CONFIG_DEBUG_LIST is not set
1591# CONFIG_DEBUG_SG is not set 1666# CONFIG_DEBUG_SG is not set
1592# CONFIG_DEBUG_NOTIFIERS is not set 1667# CONFIG_DEBUG_NOTIFIERS is not set
1593# CONFIG_BOOT_PRINTK_DELAY is not set
1594# CONFIG_RCU_TORTURE_TEST is not set 1668# CONFIG_RCU_TORTURE_TEST is not set
1595# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1669# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1596# CONFIG_BACKTRACE_SELF_TEST is not set 1670# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1604,16 +1678,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1604CONFIG_HAVE_DYNAMIC_FTRACE=y 1678CONFIG_HAVE_DYNAMIC_FTRACE=y
1605CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1679CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1606CONFIG_TRACING_SUPPORT=y 1680CONFIG_TRACING_SUPPORT=y
1607 1681CONFIG_FTRACE=y
1608#
1609# Tracers
1610#
1611# CONFIG_FUNCTION_TRACER is not set 1682# CONFIG_FUNCTION_TRACER is not set
1683# CONFIG_IRQSOFF_TRACER is not set
1612# CONFIG_SCHED_TRACER is not set 1684# CONFIG_SCHED_TRACER is not set
1613# CONFIG_CONTEXT_SWITCH_TRACER is not set 1685# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1614# CONFIG_EVENT_TRACER is not set
1615# CONFIG_BOOT_TRACER is not set 1686# CONFIG_BOOT_TRACER is not set
1616# CONFIG_TRACE_BRANCH_PROFILING is not set 1687CONFIG_BRANCH_PROFILE_NONE=y
1688# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1689# CONFIG_PROFILE_ALL_BRANCHES is not set
1617# CONFIG_STACK_TRACER is not set 1690# CONFIG_STACK_TRACER is not set
1618# CONFIG_KMEMTRACE is not set 1691# CONFIG_KMEMTRACE is not set
1619# CONFIG_WORKQUEUE_TRACER is not set 1692# CONFIG_WORKQUEUE_TRACER is not set
@@ -1621,6 +1694,9 @@ CONFIG_TRACING_SUPPORT=y
1621# CONFIG_SAMPLES is not set 1694# CONFIG_SAMPLES is not set
1622CONFIG_HAVE_ARCH_KGDB=y 1695CONFIG_HAVE_ARCH_KGDB=y
1623# CONFIG_KGDB is not set 1696# CONFIG_KGDB is not set
1697# CONFIG_KMEMCHECK is not set
1698# CONFIG_PPC_DISABLE_WERROR is not set
1699CONFIG_PPC_WERROR=y
1624CONFIG_PRINT_STACK_DEPTH=64 1700CONFIG_PRINT_STACK_DEPTH=64
1625# CONFIG_DEBUG_STACKOVERFLOW is not set 1701# CONFIG_DEBUG_STACKOVERFLOW is not set
1626# CONFIG_DEBUG_STACK_USAGE is not set 1702# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/83xx/mpc832x_mds_defconfig b/arch/powerpc/configs/83xx/mpc832x_mds_defconfig
index 8c8f660b4fc..e0e36a11340 100644
--- a/arch/powerpc/configs/83xx/mpc832x_mds_defconfig
+++ b/arch/powerpc/configs/83xx/mpc832x_mds_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:07 2009 4# Wed Jul 29 23:32:06 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_FSL_EMB_PERFMON is not set 20# CONFIG_FSL_EMB_PERFMON is not set
20# CONFIG_ALTIVEC is not set 21# CONFIG_ALTIVEC is not set
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24# CONFIG_SMP is not set 26# CONFIG_SMP is not set
25CONFIG_PPC32=y 27CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32 28CONFIG_WORD_SIZE=32
@@ -31,15 +33,16 @@ CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y 33CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y 34CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y 35CONFIG_GENERIC_HARDIRQS=y
36CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y 38CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y 39CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y 40CONFIG_HAVE_LATENCYTOP_SUPPORT=y
41CONFIG_TRACE_IRQFLAGS_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y 42CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y 43CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y 44CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y 45CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y 46CONFIG_GENERIC_FIND_NEXT_BIT=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
45CONFIG_PPC=y 48CONFIG_PPC=y
@@ -53,12 +56,14 @@ CONFIG_PPC_UDBG_16550=y
53# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
56CONFIG_DEFAULT_UIMAGE=y 60CONFIG_DEFAULT_UIMAGE=y
57CONFIG_ARCH_SUSPEND_POSSIBLE=y 61CONFIG_ARCH_SUSPEND_POSSIBLE=y
58# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
59# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
60CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
61CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
62 67
63# 68#
64# General setup 69# General setup
@@ -107,7 +112,6 @@ CONFIG_ANON_INODES=y
107CONFIG_EMBEDDED=y 112CONFIG_EMBEDDED=y
108CONFIG_SYSCTL_SYSCALL=y 113CONFIG_SYSCTL_SYSCALL=y
109# CONFIG_KALLSYMS is not set 114# CONFIG_KALLSYMS is not set
110# CONFIG_STRIP_ASM_SYMS is not set
111CONFIG_HOTPLUG=y 115CONFIG_HOTPLUG=y
112CONFIG_PRINTK=y 116CONFIG_PRINTK=y
113CONFIG_BUG=y 117CONFIG_BUG=y
@@ -120,9 +124,16 @@ CONFIG_TIMERFD=y
120CONFIG_EVENTFD=y 124CONFIG_EVENTFD=y
121CONFIG_SHMEM=y 125CONFIG_SHMEM=y
122CONFIG_AIO=y 126CONFIG_AIO=y
127CONFIG_HAVE_PERF_COUNTERS=y
128
129#
130# Performance Counters
131#
132# CONFIG_PERF_COUNTERS is not set
123CONFIG_VM_EVENT_COUNTERS=y 133CONFIG_VM_EVENT_COUNTERS=y
124CONFIG_PCI_QUIRKS=y 134CONFIG_PCI_QUIRKS=y
125CONFIG_SLUB_DEBUG=y 135CONFIG_SLUB_DEBUG=y
136# CONFIG_STRIP_ASM_SYMS is not set
126CONFIG_COMPAT_BRK=y 137CONFIG_COMPAT_BRK=y
127# CONFIG_SLAB is not set 138# CONFIG_SLAB is not set
128CONFIG_SLUB=y 139CONFIG_SLUB=y
@@ -135,6 +146,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
135CONFIG_HAVE_KPROBES=y 146CONFIG_HAVE_KPROBES=y
136CONFIG_HAVE_KRETPROBES=y 147CONFIG_HAVE_KRETPROBES=y
137CONFIG_HAVE_ARCH_TRACEHOOK=y 148CONFIG_HAVE_ARCH_TRACEHOOK=y
149
150#
151# GCOV-based kernel profiling
152#
138# CONFIG_SLOW_WORK is not set 153# CONFIG_SLOW_WORK is not set
139# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 154# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
140CONFIG_SLABINFO=y 155CONFIG_SLABINFO=y
@@ -147,7 +162,7 @@ CONFIG_MODULE_UNLOAD=y
147# CONFIG_MODVERSIONS is not set 162# CONFIG_MODVERSIONS is not set
148# CONFIG_MODULE_SRCVERSION_ALL is not set 163# CONFIG_MODULE_SRCVERSION_ALL is not set
149CONFIG_BLOCK=y 164CONFIG_BLOCK=y
150# CONFIG_LBD is not set 165CONFIG_LBDAF=y
151# CONFIG_BLK_DEV_BSG is not set 166# CONFIG_BLK_DEV_BSG is not set
152# CONFIG_BLK_DEV_INTEGRITY is not set 167# CONFIG_BLK_DEV_INTEGRITY is not set
153 168
@@ -189,6 +204,7 @@ CONFIG_MPC832x_MDS=y
189# CONFIG_MPC837x_RDB is not set 204# CONFIG_MPC837x_RDB is not set
190# CONFIG_SBC834x is not set 205# CONFIG_SBC834x is not set
191# CONFIG_ASP834x is not set 206# CONFIG_ASP834x is not set
207# CONFIG_KMETER1 is not set
192CONFIG_PPC_MPC832x=y 208CONFIG_PPC_MPC832x=y
193# CONFIG_PPC_86xx is not set 209# CONFIG_PPC_86xx is not set
194# CONFIG_EMBEDDED6xx is not set 210# CONFIG_EMBEDDED6xx is not set
@@ -235,6 +251,7 @@ CONFIG_BINFMT_ELF=y
235# CONFIG_BINFMT_MISC is not set 251# CONFIG_BINFMT_MISC is not set
236CONFIG_MATH_EMULATION=y 252CONFIG_MATH_EMULATION=y
237# CONFIG_IOMMU_HELPER is not set 253# CONFIG_IOMMU_HELPER is not set
254# CONFIG_SWIOTLB is not set
238CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 255CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
239CONFIG_ARCH_HAS_WALK_MEMORY=y 256CONFIG_ARCH_HAS_WALK_MEMORY=y
240CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 257CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -255,9 +272,9 @@ CONFIG_MIGRATION=y
255CONFIG_ZONE_DMA_FLAG=1 272CONFIG_ZONE_DMA_FLAG=1
256CONFIG_BOUNCE=y 273CONFIG_BOUNCE=y
257CONFIG_VIRT_TO_BUS=y 274CONFIG_VIRT_TO_BUS=y
258CONFIG_UNEVICTABLE_LRU=y
259CONFIG_HAVE_MLOCK=y 275CONFIG_HAVE_MLOCK=y
260CONFIG_HAVE_MLOCKED_PAGE_BIT=y 276CONFIG_HAVE_MLOCKED_PAGE_BIT=y
277CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
261CONFIG_PPC_4K_PAGES=y 278CONFIG_PPC_4K_PAGES=y
262# CONFIG_PPC_16K_PAGES is not set 279# CONFIG_PPC_16K_PAGES is not set
263# CONFIG_PPC_64K_PAGES is not set 280# CONFIG_PPC_64K_PAGES is not set
@@ -366,6 +383,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
366# CONFIG_ECONET is not set 383# CONFIG_ECONET is not set
367# CONFIG_WAN_ROUTER is not set 384# CONFIG_WAN_ROUTER is not set
368# CONFIG_PHONET is not set 385# CONFIG_PHONET is not set
386# CONFIG_IEEE802154 is not set
369# CONFIG_NET_SCHED is not set 387# CONFIG_NET_SCHED is not set
370# CONFIG_DCB is not set 388# CONFIG_DCB is not set
371 389
@@ -383,7 +401,11 @@ CONFIG_WIRELESS=y
383CONFIG_WIRELESS_OLD_REGULATORY=y 401CONFIG_WIRELESS_OLD_REGULATORY=y
384# CONFIG_WIRELESS_EXT is not set 402# CONFIG_WIRELESS_EXT is not set
385# CONFIG_LIB80211 is not set 403# CONFIG_LIB80211 is not set
386# CONFIG_MAC80211 is not set 404
405#
406# CFG80211 needs to be enabled for MAC80211
407#
408CONFIG_MAC80211_DEFAULT_PS_VALUE=0
387# CONFIG_WIMAX is not set 409# CONFIG_WIMAX is not set
388# CONFIG_RFKILL is not set 410# CONFIG_RFKILL is not set
389# CONFIG_NET_9P is not set 411# CONFIG_NET_9P is not set
@@ -404,6 +426,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
404# CONFIG_MTD is not set 426# CONFIG_MTD is not set
405CONFIG_OF_DEVICE=y 427CONFIG_OF_DEVICE=y
406CONFIG_OF_I2C=y 428CONFIG_OF_I2C=y
429CONFIG_OF_MDIO=y
407# CONFIG_PARPORT is not set 430# CONFIG_PARPORT is not set
408CONFIG_BLK_DEV=y 431CONFIG_BLK_DEV=y
409# CONFIG_BLK_DEV_FD is not set 432# CONFIG_BLK_DEV_FD is not set
@@ -438,7 +461,9 @@ CONFIG_MISC_DEVICES=y
438# 461#
439# CONFIG_EEPROM_AT24 is not set 462# CONFIG_EEPROM_AT24 is not set
440# CONFIG_EEPROM_LEGACY is not set 463# CONFIG_EEPROM_LEGACY is not set
464# CONFIG_EEPROM_MAX6875 is not set
441# CONFIG_EEPROM_93CX6 is not set 465# CONFIG_EEPROM_93CX6 is not set
466# CONFIG_CB710_CORE is not set
442CONFIG_HAVE_IDE=y 467CONFIG_HAVE_IDE=y
443# CONFIG_IDE is not set 468# CONFIG_IDE is not set
444 469
@@ -461,10 +486,6 @@ CONFIG_SCSI_PROC_FS=y
461# CONFIG_BLK_DEV_SR is not set 486# CONFIG_BLK_DEV_SR is not set
462# CONFIG_CHR_DEV_SG is not set 487# CONFIG_CHR_DEV_SG is not set
463# CONFIG_CHR_DEV_SCH is not set 488# CONFIG_CHR_DEV_SCH is not set
464
465#
466# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
467#
468# CONFIG_SCSI_MULTI_LUN is not set 489# CONFIG_SCSI_MULTI_LUN is not set
469# CONFIG_SCSI_CONSTANTS is not set 490# CONFIG_SCSI_CONSTANTS is not set
470# CONFIG_SCSI_LOGGING is not set 491# CONFIG_SCSI_LOGGING is not set
@@ -482,6 +503,7 @@ CONFIG_SCSI_WAIT_SCAN=m
482CONFIG_SCSI_LOWLEVEL=y 503CONFIG_SCSI_LOWLEVEL=y
483# CONFIG_ISCSI_TCP is not set 504# CONFIG_ISCSI_TCP is not set
484# CONFIG_SCSI_CXGB3_ISCSI is not set 505# CONFIG_SCSI_CXGB3_ISCSI is not set
506# CONFIG_SCSI_BNX2_ISCSI is not set
485# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 507# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
486# CONFIG_SCSI_3W_9XXX is not set 508# CONFIG_SCSI_3W_9XXX is not set
487# CONFIG_SCSI_ACARD is not set 509# CONFIG_SCSI_ACARD is not set
@@ -490,6 +512,7 @@ CONFIG_SCSI_LOWLEVEL=y
490# CONFIG_SCSI_AIC7XXX_OLD is not set 512# CONFIG_SCSI_AIC7XXX_OLD is not set
491# CONFIG_SCSI_AIC79XX is not set 513# CONFIG_SCSI_AIC79XX is not set
492# CONFIG_SCSI_AIC94XX is not set 514# CONFIG_SCSI_AIC94XX is not set
515# CONFIG_SCSI_MVSAS is not set
493# CONFIG_SCSI_DPT_I2O is not set 516# CONFIG_SCSI_DPT_I2O is not set
494# CONFIG_SCSI_ADVANSYS is not set 517# CONFIG_SCSI_ADVANSYS is not set
495# CONFIG_SCSI_ARCMSR is not set 518# CONFIG_SCSI_ARCMSR is not set
@@ -509,7 +532,6 @@ CONFIG_SCSI_LOWLEVEL=y
509# CONFIG_SCSI_IPS is not set 532# CONFIG_SCSI_IPS is not set
510# CONFIG_SCSI_INITIO is not set 533# CONFIG_SCSI_INITIO is not set
511# CONFIG_SCSI_INIA100 is not set 534# CONFIG_SCSI_INIA100 is not set
512# CONFIG_SCSI_MVSAS is not set
513# CONFIG_SCSI_STEX is not set 535# CONFIG_SCSI_STEX is not set
514# CONFIG_SCSI_SYM53C8XX_2 is not set 536# CONFIG_SCSI_SYM53C8XX_2 is not set
515# CONFIG_SCSI_QLOGIC_1280 is not set 537# CONFIG_SCSI_QLOGIC_1280 is not set
@@ -532,14 +554,17 @@ CONFIG_SCSI_LOWLEVEL=y
532# 554#
533 555
534# 556#
535# Enable only one of the two stacks, unless you know what you are doing 557# You can enable one or both FireWire driver stacks.
558#
559
560#
561# See the help texts for more information.
536# 562#
537# CONFIG_FIREWIRE is not set 563# CONFIG_FIREWIRE is not set
538# CONFIG_IEEE1394 is not set 564# CONFIG_IEEE1394 is not set
539# CONFIG_I2O is not set 565# CONFIG_I2O is not set
540# CONFIG_MACINTOSH_DRIVERS is not set 566# CONFIG_MACINTOSH_DRIVERS is not set
541CONFIG_NETDEVICES=y 567CONFIG_NETDEVICES=y
542CONFIG_COMPAT_NET_DEV_OPS=y
543# CONFIG_DUMMY is not set 568# CONFIG_DUMMY is not set
544# CONFIG_BONDING is not set 569# CONFIG_BONDING is not set
545# CONFIG_MACVLAN is not set 570# CONFIG_MACVLAN is not set
@@ -586,6 +611,7 @@ CONFIG_MII=y
586# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 611# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
587# CONFIG_NET_PCI is not set 612# CONFIG_NET_PCI is not set
588# CONFIG_B44 is not set 613# CONFIG_B44 is not set
614# CONFIG_KS8842 is not set
589# CONFIG_ATL2 is not set 615# CONFIG_ATL2 is not set
590CONFIG_NETDEV_1000=y 616CONFIG_NETDEV_1000=y
591# CONFIG_ACENIC is not set 617# CONFIG_ACENIC is not set
@@ -605,11 +631,13 @@ CONFIG_NETDEV_1000=y
605# CONFIG_VIA_VELOCITY is not set 631# CONFIG_VIA_VELOCITY is not set
606# CONFIG_TIGON3 is not set 632# CONFIG_TIGON3 is not set
607# CONFIG_BNX2 is not set 633# CONFIG_BNX2 is not set
634# CONFIG_CNIC is not set
608CONFIG_FSL_PQ_MDIO=y 635CONFIG_FSL_PQ_MDIO=y
609# CONFIG_GIANFAR is not set 636# CONFIG_GIANFAR is not set
610CONFIG_UCC_GETH=y 637CONFIG_UCC_GETH=y
611# CONFIG_UGETH_MAGIC_PACKET is not set 638# CONFIG_UGETH_MAGIC_PACKET is not set
612# CONFIG_UGETH_TX_ON_DEMAND is not set 639# CONFIG_UGETH_TX_ON_DEMAND is not set
640# CONFIG_MV643XX_ETH is not set
613# CONFIG_QLA3XXX is not set 641# CONFIG_QLA3XXX is not set
614# CONFIG_ATL1 is not set 642# CONFIG_ATL1 is not set
615# CONFIG_ATL1E is not set 643# CONFIG_ATL1E is not set
@@ -787,13 +815,17 @@ CONFIG_I2C_MPC=y
787# CONFIG_SENSORS_PCF8574 is not set 815# CONFIG_SENSORS_PCF8574 is not set
788# CONFIG_PCF8575 is not set 816# CONFIG_PCF8575 is not set
789# CONFIG_SENSORS_PCA9539 is not set 817# CONFIG_SENSORS_PCA9539 is not set
790# CONFIG_SENSORS_MAX6875 is not set
791# CONFIG_SENSORS_TSL2550 is not set 818# CONFIG_SENSORS_TSL2550 is not set
792# CONFIG_I2C_DEBUG_CORE is not set 819# CONFIG_I2C_DEBUG_CORE is not set
793# CONFIG_I2C_DEBUG_ALGO is not set 820# CONFIG_I2C_DEBUG_ALGO is not set
794# CONFIG_I2C_DEBUG_BUS is not set 821# CONFIG_I2C_DEBUG_BUS is not set
795# CONFIG_I2C_DEBUG_CHIP is not set 822# CONFIG_I2C_DEBUG_CHIP is not set
796# CONFIG_SPI is not set 823# CONFIG_SPI is not set
824
825#
826# PPS support
827#
828# CONFIG_PPS is not set
797CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 829CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
798# CONFIG_GPIOLIB is not set 830# CONFIG_GPIOLIB is not set
799# CONFIG_W1 is not set 831# CONFIG_W1 is not set
@@ -848,6 +880,7 @@ CONFIG_HWMON=y
848# CONFIG_SENSORS_SMSC47B397 is not set 880# CONFIG_SENSORS_SMSC47B397 is not set
849# CONFIG_SENSORS_ADS7828 is not set 881# CONFIG_SENSORS_ADS7828 is not set
850# CONFIG_SENSORS_THMC50 is not set 882# CONFIG_SENSORS_THMC50 is not set
883# CONFIG_SENSORS_TMP401 is not set
851# CONFIG_SENSORS_VIA686A is not set 884# CONFIG_SENSORS_VIA686A is not set
852# CONFIG_SENSORS_VT1211 is not set 885# CONFIG_SENSORS_VT1211 is not set
853# CONFIG_SENSORS_VT8231 is not set 886# CONFIG_SENSORS_VT8231 is not set
@@ -896,23 +929,9 @@ CONFIG_SSB_POSSIBLE=y
896# CONFIG_MFD_WM8400 is not set 929# CONFIG_MFD_WM8400 is not set
897# CONFIG_MFD_WM8350_I2C is not set 930# CONFIG_MFD_WM8350_I2C is not set
898# CONFIG_MFD_PCF50633 is not set 931# CONFIG_MFD_PCF50633 is not set
932# CONFIG_AB3100_CORE is not set
899# CONFIG_REGULATOR is not set 933# CONFIG_REGULATOR is not set
900 934# CONFIG_MEDIA_SUPPORT is not set
901#
902# Multimedia devices
903#
904
905#
906# Multimedia core support
907#
908# CONFIG_VIDEO_DEV is not set
909# CONFIG_DVB_CORE is not set
910# CONFIG_VIDEO_MEDIA is not set
911
912#
913# Multimedia drivers
914#
915CONFIG_DAB=y
916 935
917# 936#
918# Graphics support 937# Graphics support
@@ -996,6 +1015,7 @@ CONFIG_RTC_DRV_DS1374=y
996# CONFIG_RTC_DRV_S35390A is not set 1015# CONFIG_RTC_DRV_S35390A is not set
997# CONFIG_RTC_DRV_FM3130 is not set 1016# CONFIG_RTC_DRV_FM3130 is not set
998# CONFIG_RTC_DRV_RX8581 is not set 1017# CONFIG_RTC_DRV_RX8581 is not set
1018# CONFIG_RTC_DRV_RX8025 is not set
999 1019
1000# 1020#
1001# SPI RTC drivers 1021# SPI RTC drivers
@@ -1023,6 +1043,10 @@ CONFIG_RTC_DRV_DS1374=y
1023# CONFIG_DMADEVICES is not set 1043# CONFIG_DMADEVICES is not set
1024# CONFIG_AUXDISPLAY is not set 1044# CONFIG_AUXDISPLAY is not set
1025# CONFIG_UIO is not set 1045# CONFIG_UIO is not set
1046
1047#
1048# TI VLYNQ
1049#
1026# CONFIG_STAGING is not set 1050# CONFIG_STAGING is not set
1027 1051
1028# 1052#
@@ -1042,10 +1066,12 @@ CONFIG_FS_MBCACHE=y
1042# CONFIG_REISERFS_FS is not set 1066# CONFIG_REISERFS_FS is not set
1043# CONFIG_JFS_FS is not set 1067# CONFIG_JFS_FS is not set
1044# CONFIG_FS_POSIX_ACL is not set 1068# CONFIG_FS_POSIX_ACL is not set
1045CONFIG_FILE_LOCKING=y
1046# CONFIG_XFS_FS is not set 1069# CONFIG_XFS_FS is not set
1070# CONFIG_GFS2_FS is not set
1047# CONFIG_OCFS2_FS is not set 1071# CONFIG_OCFS2_FS is not set
1048# CONFIG_BTRFS_FS is not set 1072# CONFIG_BTRFS_FS is not set
1073CONFIG_FILE_LOCKING=y
1074CONFIG_FSNOTIFY=y
1049CONFIG_DNOTIFY=y 1075CONFIG_DNOTIFY=y
1050CONFIG_INOTIFY=y 1076CONFIG_INOTIFY=y
1051CONFIG_INOTIFY_USER=y 1077CONFIG_INOTIFY_USER=y
@@ -1108,6 +1134,7 @@ CONFIG_NFS_FS=y
1108CONFIG_NFS_V3=y 1134CONFIG_NFS_V3=y
1109# CONFIG_NFS_V3_ACL is not set 1135# CONFIG_NFS_V3_ACL is not set
1110CONFIG_NFS_V4=y 1136CONFIG_NFS_V4=y
1137# CONFIG_NFS_V4_1 is not set
1111CONFIG_ROOT_NFS=y 1138CONFIG_ROOT_NFS=y
1112# CONFIG_NFSD is not set 1139# CONFIG_NFSD is not set
1113CONFIG_LOCKD=y 1140CONFIG_LOCKD=y
@@ -1165,6 +1192,7 @@ CONFIG_HAS_IOPORT=y
1165CONFIG_HAS_DMA=y 1192CONFIG_HAS_DMA=y
1166CONFIG_HAVE_LMB=y 1193CONFIG_HAVE_LMB=y
1167CONFIG_NLATTR=y 1194CONFIG_NLATTR=y
1195CONFIG_GENERIC_ATOMIC64=y
1168 1196
1169# 1197#
1170# Kernel hacking 1198# Kernel hacking
@@ -1190,22 +1218,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1190CONFIG_HAVE_DYNAMIC_FTRACE=y 1218CONFIG_HAVE_DYNAMIC_FTRACE=y
1191CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1219CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1192CONFIG_TRACING_SUPPORT=y 1220CONFIG_TRACING_SUPPORT=y
1193 1221# CONFIG_FTRACE is not set
1194#
1195# Tracers
1196#
1197# CONFIG_FUNCTION_TRACER is not set
1198# CONFIG_SCHED_TRACER is not set
1199# CONFIG_CONTEXT_SWITCH_TRACER is not set
1200# CONFIG_EVENT_TRACER is not set
1201# CONFIG_BOOT_TRACER is not set
1202# CONFIG_TRACE_BRANCH_PROFILING is not set
1203# CONFIG_STACK_TRACER is not set
1204# CONFIG_KMEMTRACE is not set
1205# CONFIG_WORKQUEUE_TRACER is not set
1206# CONFIG_BLK_DEV_IO_TRACE is not set
1207# CONFIG_SAMPLES is not set 1222# CONFIG_SAMPLES is not set
1208CONFIG_HAVE_ARCH_KGDB=y 1223CONFIG_HAVE_ARCH_KGDB=y
1224# CONFIG_PPC_DISABLE_WERROR is not set
1225CONFIG_PPC_WERROR=y
1209CONFIG_PRINT_STACK_DEPTH=64 1226CONFIG_PRINT_STACK_DEPTH=64
1210# CONFIG_IRQSTACKS is not set 1227# CONFIG_IRQSTACKS is not set
1211# CONFIG_BOOTX_TEXT is not set 1228# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig b/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
index 227dbba7679..4f27d454822 100644
--- a/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:08 2009 4# Wed Jul 29 23:32:07 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_FSL_EMB_PERFMON is not set 20# CONFIG_FSL_EMB_PERFMON is not set
20# CONFIG_ALTIVEC is not set 21# CONFIG_ALTIVEC is not set
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24# CONFIG_SMP is not set 26# CONFIG_SMP is not set
25CONFIG_PPC32=y 27CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32 28CONFIG_WORD_SIZE=32
@@ -31,15 +33,16 @@ CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y 33CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y 34CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y 35CONFIG_GENERIC_HARDIRQS=y
36CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y 38CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y 39CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y 40CONFIG_HAVE_LATENCYTOP_SUPPORT=y
41CONFIG_TRACE_IRQFLAGS_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y 42CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y 43CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y 44CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y 45CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y 46CONFIG_GENERIC_FIND_NEXT_BIT=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
45CONFIG_PPC=y 48CONFIG_PPC=y
@@ -53,12 +56,14 @@ CONFIG_PPC_UDBG_16550=y
53# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
56CONFIG_DEFAULT_UIMAGE=y 60CONFIG_DEFAULT_UIMAGE=y
57CONFIG_ARCH_SUSPEND_POSSIBLE=y 61CONFIG_ARCH_SUSPEND_POSSIBLE=y
58# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
59# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
60CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
61CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
62 67
63# 68#
64# General setup 69# General setup
@@ -107,7 +112,6 @@ CONFIG_ANON_INODES=y
107CONFIG_EMBEDDED=y 112CONFIG_EMBEDDED=y
108CONFIG_SYSCTL_SYSCALL=y 113CONFIG_SYSCTL_SYSCALL=y
109# CONFIG_KALLSYMS is not set 114# CONFIG_KALLSYMS is not set
110# CONFIG_STRIP_ASM_SYMS is not set
111CONFIG_HOTPLUG=y 115CONFIG_HOTPLUG=y
112CONFIG_PRINTK=y 116CONFIG_PRINTK=y
113CONFIG_BUG=y 117CONFIG_BUG=y
@@ -120,9 +124,16 @@ CONFIG_TIMERFD=y
120CONFIG_EVENTFD=y 124CONFIG_EVENTFD=y
121CONFIG_SHMEM=y 125CONFIG_SHMEM=y
122CONFIG_AIO=y 126CONFIG_AIO=y
127CONFIG_HAVE_PERF_COUNTERS=y
128
129#
130# Performance Counters
131#
132# CONFIG_PERF_COUNTERS is not set
123CONFIG_VM_EVENT_COUNTERS=y 133CONFIG_VM_EVENT_COUNTERS=y
124CONFIG_PCI_QUIRKS=y 134CONFIG_PCI_QUIRKS=y
125CONFIG_SLUB_DEBUG=y 135CONFIG_SLUB_DEBUG=y
136# CONFIG_STRIP_ASM_SYMS is not set
126CONFIG_COMPAT_BRK=y 137CONFIG_COMPAT_BRK=y
127# CONFIG_SLAB is not set 138# CONFIG_SLAB is not set
128CONFIG_SLUB=y 139CONFIG_SLUB=y
@@ -135,6 +146,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
135CONFIG_HAVE_KPROBES=y 146CONFIG_HAVE_KPROBES=y
136CONFIG_HAVE_KRETPROBES=y 147CONFIG_HAVE_KRETPROBES=y
137CONFIG_HAVE_ARCH_TRACEHOOK=y 148CONFIG_HAVE_ARCH_TRACEHOOK=y
149
150#
151# GCOV-based kernel profiling
152#
138# CONFIG_SLOW_WORK is not set 153# CONFIG_SLOW_WORK is not set
139# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 154# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
140CONFIG_SLABINFO=y 155CONFIG_SLABINFO=y
@@ -147,7 +162,7 @@ CONFIG_MODULE_UNLOAD=y
147# CONFIG_MODVERSIONS is not set 162# CONFIG_MODVERSIONS is not set
148# CONFIG_MODULE_SRCVERSION_ALL is not set 163# CONFIG_MODULE_SRCVERSION_ALL is not set
149CONFIG_BLOCK=y 164CONFIG_BLOCK=y
150# CONFIG_LBD is not set 165CONFIG_LBDAF=y
151# CONFIG_BLK_DEV_BSG is not set 166# CONFIG_BLK_DEV_BSG is not set
152# CONFIG_BLK_DEV_INTEGRITY is not set 167# CONFIG_BLK_DEV_INTEGRITY is not set
153 168
@@ -189,6 +204,7 @@ CONFIG_MPC832x_RDB=y
189# CONFIG_MPC837x_RDB is not set 204# CONFIG_MPC837x_RDB is not set
190# CONFIG_SBC834x is not set 205# CONFIG_SBC834x is not set
191# CONFIG_ASP834x is not set 206# CONFIG_ASP834x is not set
207# CONFIG_KMETER1 is not set
192CONFIG_PPC_MPC832x=y 208CONFIG_PPC_MPC832x=y
193# CONFIG_PPC_86xx is not set 209# CONFIG_PPC_86xx is not set
194# CONFIG_EMBEDDED6xx is not set 210# CONFIG_EMBEDDED6xx is not set
@@ -235,6 +251,7 @@ CONFIG_BINFMT_ELF=y
235# CONFIG_BINFMT_MISC is not set 251# CONFIG_BINFMT_MISC is not set
236CONFIG_MATH_EMULATION=y 252CONFIG_MATH_EMULATION=y
237# CONFIG_IOMMU_HELPER is not set 253# CONFIG_IOMMU_HELPER is not set
254# CONFIG_SWIOTLB is not set
238CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 255CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
239CONFIG_ARCH_HAS_WALK_MEMORY=y 256CONFIG_ARCH_HAS_WALK_MEMORY=y
240CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 257CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -255,9 +272,9 @@ CONFIG_MIGRATION=y
255CONFIG_ZONE_DMA_FLAG=1 272CONFIG_ZONE_DMA_FLAG=1
256CONFIG_BOUNCE=y 273CONFIG_BOUNCE=y
257CONFIG_VIRT_TO_BUS=y 274CONFIG_VIRT_TO_BUS=y
258CONFIG_UNEVICTABLE_LRU=y
259CONFIG_HAVE_MLOCK=y 275CONFIG_HAVE_MLOCK=y
260CONFIG_HAVE_MLOCKED_PAGE_BIT=y 276CONFIG_HAVE_MLOCKED_PAGE_BIT=y
277CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
261CONFIG_PPC_4K_PAGES=y 278CONFIG_PPC_4K_PAGES=y
262# CONFIG_PPC_16K_PAGES is not set 279# CONFIG_PPC_16K_PAGES is not set
263# CONFIG_PPC_64K_PAGES is not set 280# CONFIG_PPC_64K_PAGES is not set
@@ -366,6 +383,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
366# CONFIG_ECONET is not set 383# CONFIG_ECONET is not set
367# CONFIG_WAN_ROUTER is not set 384# CONFIG_WAN_ROUTER is not set
368# CONFIG_PHONET is not set 385# CONFIG_PHONET is not set
386# CONFIG_IEEE802154 is not set
369# CONFIG_NET_SCHED is not set 387# CONFIG_NET_SCHED is not set
370# CONFIG_DCB is not set 388# CONFIG_DCB is not set
371 389
@@ -383,7 +401,11 @@ CONFIG_WIRELESS=y
383CONFIG_WIRELESS_OLD_REGULATORY=y 401CONFIG_WIRELESS_OLD_REGULATORY=y
384# CONFIG_WIRELESS_EXT is not set 402# CONFIG_WIRELESS_EXT is not set
385# CONFIG_LIB80211 is not set 403# CONFIG_LIB80211 is not set
386# CONFIG_MAC80211 is not set 404
405#
406# CFG80211 needs to be enabled for MAC80211
407#
408CONFIG_MAC80211_DEFAULT_PS_VALUE=0
387# CONFIG_WIMAX is not set 409# CONFIG_WIMAX is not set
388# CONFIG_RFKILL is not set 410# CONFIG_RFKILL is not set
389# CONFIG_NET_9P is not set 411# CONFIG_NET_9P is not set
@@ -405,6 +427,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
405CONFIG_OF_DEVICE=y 427CONFIG_OF_DEVICE=y
406CONFIG_OF_I2C=y 428CONFIG_OF_I2C=y
407CONFIG_OF_SPI=y 429CONFIG_OF_SPI=y
430CONFIG_OF_MDIO=y
408# CONFIG_PARPORT is not set 431# CONFIG_PARPORT is not set
409CONFIG_BLK_DEV=y 432CONFIG_BLK_DEV=y
410# CONFIG_BLK_DEV_FD is not set 433# CONFIG_BLK_DEV_FD is not set
@@ -441,7 +464,9 @@ CONFIG_MISC_DEVICES=y
441# CONFIG_EEPROM_AT24 is not set 464# CONFIG_EEPROM_AT24 is not set
442# CONFIG_EEPROM_AT25 is not set 465# CONFIG_EEPROM_AT25 is not set
443# CONFIG_EEPROM_LEGACY is not set 466# CONFIG_EEPROM_LEGACY is not set
467# CONFIG_EEPROM_MAX6875 is not set
444# CONFIG_EEPROM_93CX6 is not set 468# CONFIG_EEPROM_93CX6 is not set
469# CONFIG_CB710_CORE is not set
445CONFIG_HAVE_IDE=y 470CONFIG_HAVE_IDE=y
446# CONFIG_IDE is not set 471# CONFIG_IDE is not set
447 472
@@ -464,10 +489,6 @@ CONFIG_BLK_DEV_SD=y
464# CONFIG_BLK_DEV_SR is not set 489# CONFIG_BLK_DEV_SR is not set
465# CONFIG_CHR_DEV_SG is not set 490# CONFIG_CHR_DEV_SG is not set
466# CONFIG_CHR_DEV_SCH is not set 491# CONFIG_CHR_DEV_SCH is not set
467
468#
469# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
470#
471# CONFIG_SCSI_MULTI_LUN is not set 492# CONFIG_SCSI_MULTI_LUN is not set
472# CONFIG_SCSI_CONSTANTS is not set 493# CONFIG_SCSI_CONSTANTS is not set
473# CONFIG_SCSI_LOGGING is not set 494# CONFIG_SCSI_LOGGING is not set
@@ -485,6 +506,7 @@ CONFIG_SCSI_WAIT_SCAN=m
485CONFIG_SCSI_LOWLEVEL=y 506CONFIG_SCSI_LOWLEVEL=y
486# CONFIG_ISCSI_TCP is not set 507# CONFIG_ISCSI_TCP is not set
487# CONFIG_SCSI_CXGB3_ISCSI is not set 508# CONFIG_SCSI_CXGB3_ISCSI is not set
509# CONFIG_SCSI_BNX2_ISCSI is not set
488# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 510# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
489# CONFIG_SCSI_3W_9XXX is not set 511# CONFIG_SCSI_3W_9XXX is not set
490# CONFIG_SCSI_ACARD is not set 512# CONFIG_SCSI_ACARD is not set
@@ -493,6 +515,7 @@ CONFIG_SCSI_LOWLEVEL=y
493# CONFIG_SCSI_AIC7XXX_OLD is not set 515# CONFIG_SCSI_AIC7XXX_OLD is not set
494# CONFIG_SCSI_AIC79XX is not set 516# CONFIG_SCSI_AIC79XX is not set
495# CONFIG_SCSI_AIC94XX is not set 517# CONFIG_SCSI_AIC94XX is not set
518# CONFIG_SCSI_MVSAS is not set
496# CONFIG_SCSI_DPT_I2O is not set 519# CONFIG_SCSI_DPT_I2O is not set
497# CONFIG_SCSI_ADVANSYS is not set 520# CONFIG_SCSI_ADVANSYS is not set
498# CONFIG_SCSI_ARCMSR is not set 521# CONFIG_SCSI_ARCMSR is not set
@@ -512,7 +535,6 @@ CONFIG_SCSI_LOWLEVEL=y
512# CONFIG_SCSI_IPS is not set 535# CONFIG_SCSI_IPS is not set
513# CONFIG_SCSI_INITIO is not set 536# CONFIG_SCSI_INITIO is not set
514# CONFIG_SCSI_INIA100 is not set 537# CONFIG_SCSI_INIA100 is not set
515# CONFIG_SCSI_MVSAS is not set
516# CONFIG_SCSI_STEX is not set 538# CONFIG_SCSI_STEX is not set
517# CONFIG_SCSI_SYM53C8XX_2 is not set 539# CONFIG_SCSI_SYM53C8XX_2 is not set
518# CONFIG_SCSI_QLOGIC_1280 is not set 540# CONFIG_SCSI_QLOGIC_1280 is not set
@@ -535,14 +557,17 @@ CONFIG_SCSI_LOWLEVEL=y
535# 557#
536 558
537# 559#
538# Enable only one of the two stacks, unless you know what you are doing 560# You can enable one or both FireWire driver stacks.
561#
562
563#
564# See the help texts for more information.
539# 565#
540# CONFIG_FIREWIRE is not set 566# CONFIG_FIREWIRE is not set
541# CONFIG_IEEE1394 is not set 567# CONFIG_IEEE1394 is not set
542# CONFIG_I2O is not set 568# CONFIG_I2O is not set
543# CONFIG_MACINTOSH_DRIVERS is not set 569# CONFIG_MACINTOSH_DRIVERS is not set
544CONFIG_NETDEVICES=y 570CONFIG_NETDEVICES=y
545CONFIG_COMPAT_NET_DEV_OPS=y
546# CONFIG_DUMMY is not set 571# CONFIG_DUMMY is not set
547# CONFIG_BONDING is not set 572# CONFIG_BONDING is not set
548# CONFIG_MACVLAN is not set 573# CONFIG_MACVLAN is not set
@@ -590,6 +615,8 @@ CONFIG_MII=y
590# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 615# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
591# CONFIG_NET_PCI is not set 616# CONFIG_NET_PCI is not set
592# CONFIG_B44 is not set 617# CONFIG_B44 is not set
618# CONFIG_KS8842 is not set
619# CONFIG_KS8851 is not set
593# CONFIG_ATL2 is not set 620# CONFIG_ATL2 is not set
594CONFIG_NETDEV_1000=y 621CONFIG_NETDEV_1000=y
595# CONFIG_ACENIC is not set 622# CONFIG_ACENIC is not set
@@ -609,11 +636,13 @@ CONFIG_E1000=y
609# CONFIG_VIA_VELOCITY is not set 636# CONFIG_VIA_VELOCITY is not set
610# CONFIG_TIGON3 is not set 637# CONFIG_TIGON3 is not set
611# CONFIG_BNX2 is not set 638# CONFIG_BNX2 is not set
639# CONFIG_CNIC is not set
612CONFIG_FSL_PQ_MDIO=y 640CONFIG_FSL_PQ_MDIO=y
613# CONFIG_GIANFAR is not set 641# CONFIG_GIANFAR is not set
614CONFIG_UCC_GETH=y 642CONFIG_UCC_GETH=y
615# CONFIG_UGETH_MAGIC_PACKET is not set 643# CONFIG_UGETH_MAGIC_PACKET is not set
616# CONFIG_UGETH_TX_ON_DEMAND is not set 644# CONFIG_UGETH_TX_ON_DEMAND is not set
645# CONFIG_MV643XX_ETH is not set
617# CONFIG_QLA3XXX is not set 646# CONFIG_QLA3XXX is not set
618# CONFIG_ATL1 is not set 647# CONFIG_ATL1 is not set
619# CONFIG_ATL1E is not set 648# CONFIG_ATL1E is not set
@@ -804,7 +833,6 @@ CONFIG_I2C_MPC=y
804# CONFIG_SENSORS_PCF8574 is not set 833# CONFIG_SENSORS_PCF8574 is not set
805# CONFIG_PCF8575 is not set 834# CONFIG_PCF8575 is not set
806# CONFIG_SENSORS_PCA9539 is not set 835# CONFIG_SENSORS_PCA9539 is not set
807# CONFIG_SENSORS_MAX6875 is not set
808# CONFIG_SENSORS_TSL2550 is not set 836# CONFIG_SENSORS_TSL2550 is not set
809# CONFIG_I2C_DEBUG_CORE is not set 837# CONFIG_I2C_DEBUG_CORE is not set
810# CONFIG_I2C_DEBUG_ALGO is not set 838# CONFIG_I2C_DEBUG_ALGO is not set
@@ -817,13 +845,18 @@ CONFIG_SPI_MASTER=y
817# SPI Master Controller Drivers 845# SPI Master Controller Drivers
818# 846#
819CONFIG_SPI_BITBANG=y 847CONFIG_SPI_BITBANG=y
820CONFIG_SPI_MPC83xx=y 848# CONFIG_SPI_MPC8xxx is not set
821 849
822# 850#
823# SPI Protocol Masters 851# SPI Protocol Masters
824# 852#
825# CONFIG_SPI_SPIDEV is not set 853# CONFIG_SPI_SPIDEV is not set
826# CONFIG_SPI_TLE62X0 is not set 854# CONFIG_SPI_TLE62X0 is not set
855
856#
857# PPS support
858#
859# CONFIG_PPS is not set
827CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 860CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
828# CONFIG_GPIOLIB is not set 861# CONFIG_GPIOLIB is not set
829# CONFIG_W1 is not set 862# CONFIG_W1 is not set
@@ -881,6 +914,7 @@ CONFIG_HWMON=y
881# CONFIG_SENSORS_SMSC47B397 is not set 914# CONFIG_SENSORS_SMSC47B397 is not set
882# CONFIG_SENSORS_ADS7828 is not set 915# CONFIG_SENSORS_ADS7828 is not set
883# CONFIG_SENSORS_THMC50 is not set 916# CONFIG_SENSORS_THMC50 is not set
917# CONFIG_SENSORS_TMP401 is not set
884# CONFIG_SENSORS_VIA686A is not set 918# CONFIG_SENSORS_VIA686A is not set
885# CONFIG_SENSORS_VT1211 is not set 919# CONFIG_SENSORS_VT1211 is not set
886# CONFIG_SENSORS_VT8231 is not set 920# CONFIG_SENSORS_VT8231 is not set
@@ -935,24 +969,10 @@ CONFIG_SSB_POSSIBLE=y
935# CONFIG_MFD_WM8400 is not set 969# CONFIG_MFD_WM8400 is not set
936# CONFIG_MFD_WM8350_I2C is not set 970# CONFIG_MFD_WM8350_I2C is not set
937# CONFIG_MFD_PCF50633 is not set 971# CONFIG_MFD_PCF50633 is not set
972# CONFIG_AB3100_CORE is not set
973# CONFIG_EZX_PCAP is not set
938# CONFIG_REGULATOR is not set 974# CONFIG_REGULATOR is not set
939 975# CONFIG_MEDIA_SUPPORT is not set
940#
941# Multimedia devices
942#
943
944#
945# Multimedia core support
946#
947# CONFIG_VIDEO_DEV is not set
948# CONFIG_DVB_CORE is not set
949# CONFIG_VIDEO_MEDIA is not set
950
951#
952# Multimedia drivers
953#
954CONFIG_DAB=y
955# CONFIG_USB_DABUSB is not set
956 976
957# 977#
958# Graphics support 978# Graphics support
@@ -1014,6 +1034,7 @@ CONFIG_USB_MON=y
1014# USB Host Controller Drivers 1034# USB Host Controller Drivers
1015# 1035#
1016# CONFIG_USB_C67X00_HCD is not set 1036# CONFIG_USB_C67X00_HCD is not set
1037# CONFIG_USB_XHCI_HCD is not set
1017CONFIG_USB_EHCI_HCD=y 1038CONFIG_USB_EHCI_HCD=y
1018# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1039# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1019# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1040# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1023,9 +1044,9 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y
1023# CONFIG_USB_ISP116X_HCD is not set 1044# CONFIG_USB_ISP116X_HCD is not set
1024# CONFIG_USB_ISP1760_HCD is not set 1045# CONFIG_USB_ISP1760_HCD is not set
1025CONFIG_USB_OHCI_HCD=y 1046CONFIG_USB_OHCI_HCD=y
1026CONFIG_USB_OHCI_HCD_PPC_OF=y
1027CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1047CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1028# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set 1048# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
1049CONFIG_USB_OHCI_HCD_PPC_OF=y
1029CONFIG_USB_OHCI_HCD_PCI=y 1050CONFIG_USB_OHCI_HCD_PCI=y
1030CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y 1051CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1031CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y 1052CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
@@ -1127,6 +1148,8 @@ CONFIG_MMC_BLOCK_BOUNCE=y
1127# CONFIG_MMC_WBSD is not set 1148# CONFIG_MMC_WBSD is not set
1128# CONFIG_MMC_TIFM_SD is not set 1149# CONFIG_MMC_TIFM_SD is not set
1129CONFIG_MMC_SPI=y 1150CONFIG_MMC_SPI=y
1151# CONFIG_MMC_CB710 is not set
1152# CONFIG_MMC_VIA_SDMMC is not set
1130# CONFIG_MEMSTICK is not set 1153# CONFIG_MEMSTICK is not set
1131# CONFIG_NEW_LEDS is not set 1154# CONFIG_NEW_LEDS is not set
1132# CONFIG_ACCESSIBILITY is not set 1155# CONFIG_ACCESSIBILITY is not set
@@ -1136,6 +1159,10 @@ CONFIG_MMC_SPI=y
1136# CONFIG_DMADEVICES is not set 1159# CONFIG_DMADEVICES is not set
1137# CONFIG_AUXDISPLAY is not set 1160# CONFIG_AUXDISPLAY is not set
1138# CONFIG_UIO is not set 1161# CONFIG_UIO is not set
1162
1163#
1164# TI VLYNQ
1165#
1139# CONFIG_STAGING is not set 1166# CONFIG_STAGING is not set
1140 1167
1141# 1168#
@@ -1155,10 +1182,12 @@ CONFIG_FS_MBCACHE=y
1155# CONFIG_REISERFS_FS is not set 1182# CONFIG_REISERFS_FS is not set
1156# CONFIG_JFS_FS is not set 1183# CONFIG_JFS_FS is not set
1157# CONFIG_FS_POSIX_ACL is not set 1184# CONFIG_FS_POSIX_ACL is not set
1158CONFIG_FILE_LOCKING=y
1159# CONFIG_XFS_FS is not set 1185# CONFIG_XFS_FS is not set
1186# CONFIG_GFS2_FS is not set
1160# CONFIG_OCFS2_FS is not set 1187# CONFIG_OCFS2_FS is not set
1161# CONFIG_BTRFS_FS is not set 1188# CONFIG_BTRFS_FS is not set
1189CONFIG_FILE_LOCKING=y
1190CONFIG_FSNOTIFY=y
1162CONFIG_DNOTIFY=y 1191CONFIG_DNOTIFY=y
1163CONFIG_INOTIFY=y 1192CONFIG_INOTIFY=y
1164CONFIG_INOTIFY_USER=y 1193CONFIG_INOTIFY_USER=y
@@ -1224,6 +1253,7 @@ CONFIG_NFS_FS=y
1224CONFIG_NFS_V3=y 1253CONFIG_NFS_V3=y
1225# CONFIG_NFS_V3_ACL is not set 1254# CONFIG_NFS_V3_ACL is not set
1226CONFIG_NFS_V4=y 1255CONFIG_NFS_V4=y
1256# CONFIG_NFS_V4_1 is not set
1227CONFIG_ROOT_NFS=y 1257CONFIG_ROOT_NFS=y
1228# CONFIG_NFSD is not set 1258# CONFIG_NFSD is not set
1229CONFIG_LOCKD=y 1259CONFIG_LOCKD=y
@@ -1325,6 +1355,7 @@ CONFIG_HAS_IOPORT=y
1325CONFIG_HAS_DMA=y 1355CONFIG_HAS_DMA=y
1326CONFIG_HAVE_LMB=y 1356CONFIG_HAVE_LMB=y
1327CONFIG_NLATTR=y 1357CONFIG_NLATTR=y
1358CONFIG_GENERIC_ATOMIC64=y
1328 1359
1329# 1360#
1330# Kernel hacking 1361# Kernel hacking
@@ -1350,22 +1381,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1350CONFIG_HAVE_DYNAMIC_FTRACE=y 1381CONFIG_HAVE_DYNAMIC_FTRACE=y
1351CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1382CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1352CONFIG_TRACING_SUPPORT=y 1383CONFIG_TRACING_SUPPORT=y
1353 1384# CONFIG_FTRACE is not set
1354#
1355# Tracers
1356#
1357# CONFIG_FUNCTION_TRACER is not set
1358# CONFIG_SCHED_TRACER is not set
1359# CONFIG_CONTEXT_SWITCH_TRACER is not set
1360# CONFIG_EVENT_TRACER is not set
1361# CONFIG_BOOT_TRACER is not set
1362# CONFIG_TRACE_BRANCH_PROFILING is not set
1363# CONFIG_STACK_TRACER is not set
1364# CONFIG_KMEMTRACE is not set
1365# CONFIG_WORKQUEUE_TRACER is not set
1366# CONFIG_BLK_DEV_IO_TRACE is not set
1367# CONFIG_SAMPLES is not set 1385# CONFIG_SAMPLES is not set
1368CONFIG_HAVE_ARCH_KGDB=y 1386CONFIG_HAVE_ARCH_KGDB=y
1387# CONFIG_PPC_DISABLE_WERROR is not set
1388CONFIG_PPC_WERROR=y
1369CONFIG_PRINT_STACK_DEPTH=64 1389CONFIG_PRINT_STACK_DEPTH=64
1370# CONFIG_IRQSTACKS is not set 1390# CONFIG_IRQSTACKS is not set
1371# CONFIG_BOOTX_TEXT is not set 1391# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
index 24ee7fcac87..648dac0c9d8 100644
--- a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
+++ b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:09 2009 4# Wed Jul 29 23:32:07 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_FSL_EMB_PERFMON is not set 20# CONFIG_FSL_EMB_PERFMON is not set
20# CONFIG_ALTIVEC is not set 21# CONFIG_ALTIVEC is not set
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24# CONFIG_SMP is not set 26# CONFIG_SMP is not set
25CONFIG_PPC32=y 27CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32 28CONFIG_WORD_SIZE=32
@@ -31,15 +33,16 @@ CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y 33CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y 34CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y 35CONFIG_GENERIC_HARDIRQS=y
36CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y 38CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y 39CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y 40CONFIG_HAVE_LATENCYTOP_SUPPORT=y
41CONFIG_TRACE_IRQFLAGS_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y 42CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y 43CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y 44CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y 45CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y 46CONFIG_GENERIC_FIND_NEXT_BIT=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
45CONFIG_PPC=y 48CONFIG_PPC=y
@@ -53,12 +56,14 @@ CONFIG_PPC_UDBG_16550=y
53# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
56CONFIG_DEFAULT_UIMAGE=y 60CONFIG_DEFAULT_UIMAGE=y
57CONFIG_ARCH_SUSPEND_POSSIBLE=y 61CONFIG_ARCH_SUSPEND_POSSIBLE=y
58# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
59# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
60CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
61CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
62 67
63# 68#
64# General setup 69# General setup
@@ -107,7 +112,6 @@ CONFIG_ANON_INODES=y
107CONFIG_EMBEDDED=y 112CONFIG_EMBEDDED=y
108CONFIG_SYSCTL_SYSCALL=y 113CONFIG_SYSCTL_SYSCALL=y
109# CONFIG_KALLSYMS is not set 114# CONFIG_KALLSYMS is not set
110# CONFIG_STRIP_ASM_SYMS is not set
111CONFIG_HOTPLUG=y 115CONFIG_HOTPLUG=y
112CONFIG_PRINTK=y 116CONFIG_PRINTK=y
113CONFIG_BUG=y 117CONFIG_BUG=y
@@ -120,9 +124,16 @@ CONFIG_TIMERFD=y
120CONFIG_EVENTFD=y 124CONFIG_EVENTFD=y
121CONFIG_SHMEM=y 125CONFIG_SHMEM=y
122CONFIG_AIO=y 126CONFIG_AIO=y
127CONFIG_HAVE_PERF_COUNTERS=y
128
129#
130# Performance Counters
131#
132# CONFIG_PERF_COUNTERS is not set
123CONFIG_VM_EVENT_COUNTERS=y 133CONFIG_VM_EVENT_COUNTERS=y
124CONFIG_PCI_QUIRKS=y 134CONFIG_PCI_QUIRKS=y
125CONFIG_SLUB_DEBUG=y 135CONFIG_SLUB_DEBUG=y
136# CONFIG_STRIP_ASM_SYMS is not set
126CONFIG_COMPAT_BRK=y 137CONFIG_COMPAT_BRK=y
127# CONFIG_SLAB is not set 138# CONFIG_SLAB is not set
128CONFIG_SLUB=y 139CONFIG_SLUB=y
@@ -135,6 +146,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
135CONFIG_HAVE_KPROBES=y 146CONFIG_HAVE_KPROBES=y
136CONFIG_HAVE_KRETPROBES=y 147CONFIG_HAVE_KRETPROBES=y
137CONFIG_HAVE_ARCH_TRACEHOOK=y 148CONFIG_HAVE_ARCH_TRACEHOOK=y
149
150#
151# GCOV-based kernel profiling
152#
138# CONFIG_SLOW_WORK is not set 153# CONFIG_SLOW_WORK is not set
139# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 154# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
140CONFIG_SLABINFO=y 155CONFIG_SLABINFO=y
@@ -147,7 +162,7 @@ CONFIG_MODULE_UNLOAD=y
147# CONFIG_MODVERSIONS is not set 162# CONFIG_MODVERSIONS is not set
148# CONFIG_MODULE_SRCVERSION_ALL is not set 163# CONFIG_MODULE_SRCVERSION_ALL is not set
149CONFIG_BLOCK=y 164CONFIG_BLOCK=y
150# CONFIG_LBD is not set 165CONFIG_LBDAF=y
151# CONFIG_BLK_DEV_BSG is not set 166# CONFIG_BLK_DEV_BSG is not set
152# CONFIG_BLK_DEV_INTEGRITY is not set 167# CONFIG_BLK_DEV_INTEGRITY is not set
153 168
@@ -189,6 +204,7 @@ CONFIG_MPC834x_ITX=y
189# CONFIG_MPC837x_RDB is not set 204# CONFIG_MPC837x_RDB is not set
190# CONFIG_SBC834x is not set 205# CONFIG_SBC834x is not set
191# CONFIG_ASP834x is not set 206# CONFIG_ASP834x is not set
207# CONFIG_KMETER1 is not set
192CONFIG_PPC_MPC834x=y 208CONFIG_PPC_MPC834x=y
193# CONFIG_PPC_86xx is not set 209# CONFIG_PPC_86xx is not set
194# CONFIG_EMBEDDED6xx is not set 210# CONFIG_EMBEDDED6xx is not set
@@ -234,6 +250,7 @@ CONFIG_BINFMT_ELF=y
234# CONFIG_HAVE_AOUT is not set 250# CONFIG_HAVE_AOUT is not set
235# CONFIG_BINFMT_MISC is not set 251# CONFIG_BINFMT_MISC is not set
236# CONFIG_IOMMU_HELPER is not set 252# CONFIG_IOMMU_HELPER is not set
253# CONFIG_SWIOTLB is not set
237CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 254CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
238CONFIG_ARCH_HAS_WALK_MEMORY=y 255CONFIG_ARCH_HAS_WALK_MEMORY=y
239CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 256CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -254,9 +271,9 @@ CONFIG_MIGRATION=y
254CONFIG_ZONE_DMA_FLAG=1 271CONFIG_ZONE_DMA_FLAG=1
255CONFIG_BOUNCE=y 272CONFIG_BOUNCE=y
256CONFIG_VIRT_TO_BUS=y 273CONFIG_VIRT_TO_BUS=y
257CONFIG_UNEVICTABLE_LRU=y
258CONFIG_HAVE_MLOCK=y 274CONFIG_HAVE_MLOCK=y
259CONFIG_HAVE_MLOCKED_PAGE_BIT=y 275CONFIG_HAVE_MLOCKED_PAGE_BIT=y
276CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
260CONFIG_PPC_4K_PAGES=y 277CONFIG_PPC_4K_PAGES=y
261# CONFIG_PPC_16K_PAGES is not set 278# CONFIG_PPC_16K_PAGES is not set
262# CONFIG_PPC_64K_PAGES is not set 279# CONFIG_PPC_64K_PAGES is not set
@@ -365,6 +382,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
365# CONFIG_ECONET is not set 382# CONFIG_ECONET is not set
366# CONFIG_WAN_ROUTER is not set 383# CONFIG_WAN_ROUTER is not set
367# CONFIG_PHONET is not set 384# CONFIG_PHONET is not set
385# CONFIG_IEEE802154 is not set
368# CONFIG_NET_SCHED is not set 386# CONFIG_NET_SCHED is not set
369# CONFIG_DCB is not set 387# CONFIG_DCB is not set
370 388
@@ -382,7 +400,11 @@ CONFIG_WIRELESS=y
382CONFIG_WIRELESS_OLD_REGULATORY=y 400CONFIG_WIRELESS_OLD_REGULATORY=y
383# CONFIG_WIRELESS_EXT is not set 401# CONFIG_WIRELESS_EXT is not set
384# CONFIG_LIB80211 is not set 402# CONFIG_LIB80211 is not set
385# CONFIG_MAC80211 is not set 403
404#
405# CFG80211 needs to be enabled for MAC80211
406#
407CONFIG_MAC80211_DEFAULT_PS_VALUE=0
386# CONFIG_WIMAX is not set 408# CONFIG_WIMAX is not set
387# CONFIG_RFKILL is not set 409# CONFIG_RFKILL is not set
388# CONFIG_NET_9P is not set 410# CONFIG_NET_9P is not set
@@ -487,6 +509,7 @@ CONFIG_MTD_PHYSMAP=y
487CONFIG_OF_DEVICE=y 509CONFIG_OF_DEVICE=y
488CONFIG_OF_I2C=y 510CONFIG_OF_I2C=y
489CONFIG_OF_SPI=y 511CONFIG_OF_SPI=y
512CONFIG_OF_MDIO=y
490# CONFIG_PARPORT is not set 513# CONFIG_PARPORT is not set
491CONFIG_BLK_DEV=y 514CONFIG_BLK_DEV=y
492# CONFIG_BLK_DEV_FD is not set 515# CONFIG_BLK_DEV_FD is not set
@@ -523,7 +546,9 @@ CONFIG_MISC_DEVICES=y
523# CONFIG_EEPROM_AT24 is not set 546# CONFIG_EEPROM_AT24 is not set
524# CONFIG_EEPROM_AT25 is not set 547# CONFIG_EEPROM_AT25 is not set
525# CONFIG_EEPROM_LEGACY is not set 548# CONFIG_EEPROM_LEGACY is not set
549# CONFIG_EEPROM_MAX6875 is not set
526# CONFIG_EEPROM_93CX6 is not set 550# CONFIG_EEPROM_93CX6 is not set
551# CONFIG_CB710_CORE is not set
527CONFIG_HAVE_IDE=y 552CONFIG_HAVE_IDE=y
528CONFIG_IDE=y 553CONFIG_IDE=y
529 554
@@ -594,10 +619,6 @@ CONFIG_BLK_DEV_SD=y
594# CONFIG_BLK_DEV_SR is not set 619# CONFIG_BLK_DEV_SR is not set
595CONFIG_CHR_DEV_SG=y 620CONFIG_CHR_DEV_SG=y
596# CONFIG_CHR_DEV_SCH is not set 621# CONFIG_CHR_DEV_SCH is not set
597
598#
599# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
600#
601# CONFIG_SCSI_MULTI_LUN is not set 622# CONFIG_SCSI_MULTI_LUN is not set
602# CONFIG_SCSI_CONSTANTS is not set 623# CONFIG_SCSI_CONSTANTS is not set
603# CONFIG_SCSI_LOGGING is not set 624# CONFIG_SCSI_LOGGING is not set
@@ -615,6 +636,7 @@ CONFIG_SCSI_SPI_ATTRS=y
615CONFIG_SCSI_LOWLEVEL=y 636CONFIG_SCSI_LOWLEVEL=y
616# CONFIG_ISCSI_TCP is not set 637# CONFIG_ISCSI_TCP is not set
617# CONFIG_SCSI_CXGB3_ISCSI is not set 638# CONFIG_SCSI_CXGB3_ISCSI is not set
639# CONFIG_SCSI_BNX2_ISCSI is not set
618# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 640# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
619# CONFIG_SCSI_3W_9XXX is not set 641# CONFIG_SCSI_3W_9XXX is not set
620# CONFIG_SCSI_ACARD is not set 642# CONFIG_SCSI_ACARD is not set
@@ -623,6 +645,7 @@ CONFIG_SCSI_LOWLEVEL=y
623# CONFIG_SCSI_AIC7XXX_OLD is not set 645# CONFIG_SCSI_AIC7XXX_OLD is not set
624# CONFIG_SCSI_AIC79XX is not set 646# CONFIG_SCSI_AIC79XX is not set
625# CONFIG_SCSI_AIC94XX is not set 647# CONFIG_SCSI_AIC94XX is not set
648# CONFIG_SCSI_MVSAS is not set
626# CONFIG_SCSI_DPT_I2O is not set 649# CONFIG_SCSI_DPT_I2O is not set
627# CONFIG_SCSI_ADVANSYS is not set 650# CONFIG_SCSI_ADVANSYS is not set
628# CONFIG_SCSI_ARCMSR is not set 651# CONFIG_SCSI_ARCMSR is not set
@@ -642,7 +665,6 @@ CONFIG_SCSI_LOWLEVEL=y
642# CONFIG_SCSI_IPS is not set 665# CONFIG_SCSI_IPS is not set
643# CONFIG_SCSI_INITIO is not set 666# CONFIG_SCSI_INITIO is not set
644# CONFIG_SCSI_INIA100 is not set 667# CONFIG_SCSI_INIA100 is not set
645# CONFIG_SCSI_MVSAS is not set
646# CONFIG_SCSI_STEX is not set 668# CONFIG_SCSI_STEX is not set
647# CONFIG_SCSI_SYM53C8XX_2 is not set 669# CONFIG_SCSI_SYM53C8XX_2 is not set
648# CONFIG_SCSI_IPR is not set 670# CONFIG_SCSI_IPR is not set
@@ -737,14 +759,17 @@ CONFIG_MD_RAID1=y
737# 759#
738 760
739# 761#
740# Enable only one of the two stacks, unless you know what you are doing 762# You can enable one or both FireWire driver stacks.
763#
764
765#
766# See the help texts for more information.
741# 767#
742# CONFIG_FIREWIRE is not set 768# CONFIG_FIREWIRE is not set
743# CONFIG_IEEE1394 is not set 769# CONFIG_IEEE1394 is not set
744# CONFIG_I2O is not set 770# CONFIG_I2O is not set
745# CONFIG_MACINTOSH_DRIVERS is not set 771# CONFIG_MACINTOSH_DRIVERS is not set
746CONFIG_NETDEVICES=y 772CONFIG_NETDEVICES=y
747CONFIG_COMPAT_NET_DEV_OPS=y
748# CONFIG_DUMMY is not set 773# CONFIG_DUMMY is not set
749# CONFIG_BONDING is not set 774# CONFIG_BONDING is not set
750# CONFIG_MACVLAN is not set 775# CONFIG_MACVLAN is not set
@@ -791,8 +816,10 @@ CONFIG_NETDEV_1000=y
791# CONFIG_VIA_VELOCITY is not set 816# CONFIG_VIA_VELOCITY is not set
792# CONFIG_TIGON3 is not set 817# CONFIG_TIGON3 is not set
793# CONFIG_BNX2 is not set 818# CONFIG_BNX2 is not set
819# CONFIG_CNIC is not set
794CONFIG_FSL_PQ_MDIO=y 820CONFIG_FSL_PQ_MDIO=y
795CONFIG_GIANFAR=y 821CONFIG_GIANFAR=y
822# CONFIG_MV643XX_ETH is not set
796# CONFIG_QLA3XXX is not set 823# CONFIG_QLA3XXX is not set
797# CONFIG_ATL1 is not set 824# CONFIG_ATL1 is not set
798# CONFIG_ATL1E is not set 825# CONFIG_ATL1E is not set
@@ -960,7 +987,6 @@ CONFIG_I2C_MPC=y
960CONFIG_SENSORS_PCF8574=y 987CONFIG_SENSORS_PCF8574=y
961# CONFIG_PCF8575 is not set 988# CONFIG_PCF8575 is not set
962# CONFIG_SENSORS_PCA9539 is not set 989# CONFIG_SENSORS_PCA9539 is not set
963# CONFIG_SENSORS_MAX6875 is not set
964# CONFIG_SENSORS_TSL2550 is not set 990# CONFIG_SENSORS_TSL2550 is not set
965# CONFIG_I2C_DEBUG_CORE is not set 991# CONFIG_I2C_DEBUG_CORE is not set
966# CONFIG_I2C_DEBUG_ALGO is not set 992# CONFIG_I2C_DEBUG_ALGO is not set
@@ -973,13 +999,18 @@ CONFIG_SPI_MASTER=y
973# SPI Master Controller Drivers 999# SPI Master Controller Drivers
974# 1000#
975CONFIG_SPI_BITBANG=y 1001CONFIG_SPI_BITBANG=y
976CONFIG_SPI_MPC83xx=y 1002# CONFIG_SPI_MPC8xxx is not set
977 1003
978# 1004#
979# SPI Protocol Masters 1005# SPI Protocol Masters
980# 1006#
981# CONFIG_SPI_SPIDEV is not set 1007# CONFIG_SPI_SPIDEV is not set
982# CONFIG_SPI_TLE62X0 is not set 1008# CONFIG_SPI_TLE62X0 is not set
1009
1010#
1011# PPS support
1012#
1013# CONFIG_PPS is not set
983CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 1014CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
984# CONFIG_GPIOLIB is not set 1015# CONFIG_GPIOLIB is not set
985# CONFIG_W1 is not set 1016# CONFIG_W1 is not set
@@ -1026,24 +1057,10 @@ CONFIG_SSB_POSSIBLE=y
1026# CONFIG_MFD_WM8400 is not set 1057# CONFIG_MFD_WM8400 is not set
1027# CONFIG_MFD_WM8350_I2C is not set 1058# CONFIG_MFD_WM8350_I2C is not set
1028# CONFIG_MFD_PCF50633 is not set 1059# CONFIG_MFD_PCF50633 is not set
1060# CONFIG_AB3100_CORE is not set
1061# CONFIG_EZX_PCAP is not set
1029# CONFIG_REGULATOR is not set 1062# CONFIG_REGULATOR is not set
1030 1063# CONFIG_MEDIA_SUPPORT is not set
1031#
1032# Multimedia devices
1033#
1034
1035#
1036# Multimedia core support
1037#
1038# CONFIG_VIDEO_DEV is not set
1039# CONFIG_DVB_CORE is not set
1040# CONFIG_VIDEO_MEDIA is not set
1041
1042#
1043# Multimedia drivers
1044#
1045CONFIG_DAB=y
1046# CONFIG_USB_DABUSB is not set
1047 1064
1048# 1065#
1049# Graphics support 1066# Graphics support
@@ -1085,6 +1102,7 @@ CONFIG_USB_MON=y
1085# USB Host Controller Drivers 1102# USB Host Controller Drivers
1086# 1103#
1087# CONFIG_USB_C67X00_HCD is not set 1104# CONFIG_USB_C67X00_HCD is not set
1105# CONFIG_USB_XHCI_HCD is not set
1088CONFIG_USB_EHCI_HCD=y 1106CONFIG_USB_EHCI_HCD=y
1089CONFIG_USB_EHCI_ROOT_HUB_TT=y 1107CONFIG_USB_EHCI_ROOT_HUB_TT=y
1090# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1108# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1208,6 +1226,7 @@ CONFIG_RTC_DRV_DS1307=y
1208# CONFIG_RTC_DRV_S35390A is not set 1226# CONFIG_RTC_DRV_S35390A is not set
1209# CONFIG_RTC_DRV_FM3130 is not set 1227# CONFIG_RTC_DRV_FM3130 is not set
1210# CONFIG_RTC_DRV_RX8581 is not set 1228# CONFIG_RTC_DRV_RX8581 is not set
1229# CONFIG_RTC_DRV_RX8025 is not set
1211 1230
1212# 1231#
1213# SPI RTC drivers 1232# SPI RTC drivers
@@ -1242,6 +1261,10 @@ CONFIG_RTC_DRV_DS1307=y
1242# CONFIG_DMADEVICES is not set 1261# CONFIG_DMADEVICES is not set
1243# CONFIG_AUXDISPLAY is not set 1262# CONFIG_AUXDISPLAY is not set
1244# CONFIG_UIO is not set 1263# CONFIG_UIO is not set
1264
1265#
1266# TI VLYNQ
1267#
1245# CONFIG_STAGING is not set 1268# CONFIG_STAGING is not set
1246 1269
1247# 1270#
@@ -1261,10 +1284,12 @@ CONFIG_FS_MBCACHE=y
1261# CONFIG_REISERFS_FS is not set 1284# CONFIG_REISERFS_FS is not set
1262# CONFIG_JFS_FS is not set 1285# CONFIG_JFS_FS is not set
1263# CONFIG_FS_POSIX_ACL is not set 1286# CONFIG_FS_POSIX_ACL is not set
1264CONFIG_FILE_LOCKING=y
1265# CONFIG_XFS_FS is not set 1287# CONFIG_XFS_FS is not set
1288# CONFIG_GFS2_FS is not set
1266# CONFIG_OCFS2_FS is not set 1289# CONFIG_OCFS2_FS is not set
1267# CONFIG_BTRFS_FS is not set 1290# CONFIG_BTRFS_FS is not set
1291CONFIG_FILE_LOCKING=y
1292CONFIG_FSNOTIFY=y
1268CONFIG_DNOTIFY=y 1293CONFIG_DNOTIFY=y
1269CONFIG_INOTIFY=y 1294CONFIG_INOTIFY=y
1270CONFIG_INOTIFY_USER=y 1295CONFIG_INOTIFY_USER=y
@@ -1331,6 +1356,7 @@ CONFIG_NFS_FS=y
1331CONFIG_NFS_V3=y 1356CONFIG_NFS_V3=y
1332# CONFIG_NFS_V3_ACL is not set 1357# CONFIG_NFS_V3_ACL is not set
1333CONFIG_NFS_V4=y 1358CONFIG_NFS_V4=y
1359# CONFIG_NFS_V4_1 is not set
1334CONFIG_ROOT_NFS=y 1360CONFIG_ROOT_NFS=y
1335# CONFIG_NFSD is not set 1361# CONFIG_NFSD is not set
1336CONFIG_LOCKD=y 1362CONFIG_LOCKD=y
@@ -1429,6 +1455,7 @@ CONFIG_HAS_IOPORT=y
1429CONFIG_HAS_DMA=y 1455CONFIG_HAS_DMA=y
1430CONFIG_HAVE_LMB=y 1456CONFIG_HAVE_LMB=y
1431CONFIG_NLATTR=y 1457CONFIG_NLATTR=y
1458CONFIG_GENERIC_ATOMIC64=y
1432 1459
1433# 1460#
1434# Kernel hacking 1461# Kernel hacking
@@ -1454,22 +1481,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1454CONFIG_HAVE_DYNAMIC_FTRACE=y 1481CONFIG_HAVE_DYNAMIC_FTRACE=y
1455CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1482CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1456CONFIG_TRACING_SUPPORT=y 1483CONFIG_TRACING_SUPPORT=y
1457 1484# CONFIG_FTRACE is not set
1458#
1459# Tracers
1460#
1461# CONFIG_FUNCTION_TRACER is not set
1462# CONFIG_SCHED_TRACER is not set
1463# CONFIG_CONTEXT_SWITCH_TRACER is not set
1464# CONFIG_EVENT_TRACER is not set
1465# CONFIG_BOOT_TRACER is not set
1466# CONFIG_TRACE_BRANCH_PROFILING is not set
1467# CONFIG_STACK_TRACER is not set
1468# CONFIG_KMEMTRACE is not set
1469# CONFIG_WORKQUEUE_TRACER is not set
1470# CONFIG_BLK_DEV_IO_TRACE is not set
1471# CONFIG_SAMPLES is not set 1485# CONFIG_SAMPLES is not set
1472CONFIG_HAVE_ARCH_KGDB=y 1486CONFIG_HAVE_ARCH_KGDB=y
1487# CONFIG_PPC_DISABLE_WERROR is not set
1488CONFIG_PPC_WERROR=y
1473CONFIG_PRINT_STACK_DEPTH=64 1489CONFIG_PRINT_STACK_DEPTH=64
1474# CONFIG_IRQSTACKS is not set 1490# CONFIG_IRQSTACKS is not set
1475# CONFIG_BOOTX_TEXT is not set 1491# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig b/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig
index 7f39543205a..bf6deb831dc 100644
--- a/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig
+++ b/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:10 2009 4# Wed Jul 29 23:32:08 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_FSL_EMB_PERFMON is not set 20# CONFIG_FSL_EMB_PERFMON is not set
20# CONFIG_ALTIVEC is not set 21# CONFIG_ALTIVEC is not set
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24# CONFIG_SMP is not set 26# CONFIG_SMP is not set
25CONFIG_PPC32=y 27CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32 28CONFIG_WORD_SIZE=32
@@ -31,15 +33,16 @@ CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y 33CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y 34CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y 35CONFIG_GENERIC_HARDIRQS=y
36CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y 38CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y 39CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y 40CONFIG_HAVE_LATENCYTOP_SUPPORT=y
41CONFIG_TRACE_IRQFLAGS_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y 42CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y 43CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y 44CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y 45CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y 46CONFIG_GENERIC_FIND_NEXT_BIT=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
45CONFIG_PPC=y 48CONFIG_PPC=y
@@ -53,12 +56,14 @@ CONFIG_PPC_UDBG_16550=y
53# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
56CONFIG_DEFAULT_UIMAGE=y 60CONFIG_DEFAULT_UIMAGE=y
57CONFIG_ARCH_SUSPEND_POSSIBLE=y 61CONFIG_ARCH_SUSPEND_POSSIBLE=y
58# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
59# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
60CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
61CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
62 67
63# 68#
64# General setup 69# General setup
@@ -107,7 +112,6 @@ CONFIG_ANON_INODES=y
107CONFIG_EMBEDDED=y 112CONFIG_EMBEDDED=y
108CONFIG_SYSCTL_SYSCALL=y 113CONFIG_SYSCTL_SYSCALL=y
109# CONFIG_KALLSYMS is not set 114# CONFIG_KALLSYMS is not set
110# CONFIG_STRIP_ASM_SYMS is not set
111CONFIG_HOTPLUG=y 115CONFIG_HOTPLUG=y
112CONFIG_PRINTK=y 116CONFIG_PRINTK=y
113CONFIG_BUG=y 117CONFIG_BUG=y
@@ -120,9 +124,16 @@ CONFIG_TIMERFD=y
120CONFIG_EVENTFD=y 124CONFIG_EVENTFD=y
121CONFIG_SHMEM=y 125CONFIG_SHMEM=y
122CONFIG_AIO=y 126CONFIG_AIO=y
127CONFIG_HAVE_PERF_COUNTERS=y
128
129#
130# Performance Counters
131#
132# CONFIG_PERF_COUNTERS is not set
123CONFIG_VM_EVENT_COUNTERS=y 133CONFIG_VM_EVENT_COUNTERS=y
124CONFIG_PCI_QUIRKS=y 134CONFIG_PCI_QUIRKS=y
125CONFIG_SLUB_DEBUG=y 135CONFIG_SLUB_DEBUG=y
136# CONFIG_STRIP_ASM_SYMS is not set
126CONFIG_COMPAT_BRK=y 137CONFIG_COMPAT_BRK=y
127# CONFIG_SLAB is not set 138# CONFIG_SLAB is not set
128CONFIG_SLUB=y 139CONFIG_SLUB=y
@@ -135,6 +146,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
135CONFIG_HAVE_KPROBES=y 146CONFIG_HAVE_KPROBES=y
136CONFIG_HAVE_KRETPROBES=y 147CONFIG_HAVE_KRETPROBES=y
137CONFIG_HAVE_ARCH_TRACEHOOK=y 148CONFIG_HAVE_ARCH_TRACEHOOK=y
149
150#
151# GCOV-based kernel profiling
152#
138# CONFIG_SLOW_WORK is not set 153# CONFIG_SLOW_WORK is not set
139# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 154# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
140CONFIG_SLABINFO=y 155CONFIG_SLABINFO=y
@@ -147,7 +162,7 @@ CONFIG_MODULE_UNLOAD=y
147# CONFIG_MODVERSIONS is not set 162# CONFIG_MODVERSIONS is not set
148# CONFIG_MODULE_SRCVERSION_ALL is not set 163# CONFIG_MODULE_SRCVERSION_ALL is not set
149CONFIG_BLOCK=y 164CONFIG_BLOCK=y
150# CONFIG_LBD is not set 165CONFIG_LBDAF=y
151# CONFIG_BLK_DEV_BSG is not set 166# CONFIG_BLK_DEV_BSG is not set
152# CONFIG_BLK_DEV_INTEGRITY is not set 167# CONFIG_BLK_DEV_INTEGRITY is not set
153 168
@@ -189,6 +204,7 @@ CONFIG_MPC834x_ITX=y
189# CONFIG_MPC837x_RDB is not set 204# CONFIG_MPC837x_RDB is not set
190# CONFIG_SBC834x is not set 205# CONFIG_SBC834x is not set
191# CONFIG_ASP834x is not set 206# CONFIG_ASP834x is not set
207# CONFIG_KMETER1 is not set
192CONFIG_PPC_MPC834x=y 208CONFIG_PPC_MPC834x=y
193# CONFIG_PPC_86xx is not set 209# CONFIG_PPC_86xx is not set
194# CONFIG_EMBEDDED6xx is not set 210# CONFIG_EMBEDDED6xx is not set
@@ -234,6 +250,7 @@ CONFIG_BINFMT_ELF=y
234# CONFIG_HAVE_AOUT is not set 250# CONFIG_HAVE_AOUT is not set
235# CONFIG_BINFMT_MISC is not set 251# CONFIG_BINFMT_MISC is not set
236# CONFIG_IOMMU_HELPER is not set 252# CONFIG_IOMMU_HELPER is not set
253# CONFIG_SWIOTLB is not set
237CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 254CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
238CONFIG_ARCH_HAS_WALK_MEMORY=y 255CONFIG_ARCH_HAS_WALK_MEMORY=y
239CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 256CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -254,9 +271,9 @@ CONFIG_MIGRATION=y
254CONFIG_ZONE_DMA_FLAG=1 271CONFIG_ZONE_DMA_FLAG=1
255CONFIG_BOUNCE=y 272CONFIG_BOUNCE=y
256CONFIG_VIRT_TO_BUS=y 273CONFIG_VIRT_TO_BUS=y
257CONFIG_UNEVICTABLE_LRU=y
258CONFIG_HAVE_MLOCK=y 274CONFIG_HAVE_MLOCK=y
259CONFIG_HAVE_MLOCKED_PAGE_BIT=y 275CONFIG_HAVE_MLOCKED_PAGE_BIT=y
276CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
260CONFIG_PPC_4K_PAGES=y 277CONFIG_PPC_4K_PAGES=y
261# CONFIG_PPC_16K_PAGES is not set 278# CONFIG_PPC_16K_PAGES is not set
262# CONFIG_PPC_64K_PAGES is not set 279# CONFIG_PPC_64K_PAGES is not set
@@ -365,6 +382,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
365# CONFIG_ECONET is not set 382# CONFIG_ECONET is not set
366# CONFIG_WAN_ROUTER is not set 383# CONFIG_WAN_ROUTER is not set
367# CONFIG_PHONET is not set 384# CONFIG_PHONET is not set
385# CONFIG_IEEE802154 is not set
368# CONFIG_NET_SCHED is not set 386# CONFIG_NET_SCHED is not set
369# CONFIG_DCB is not set 387# CONFIG_DCB is not set
370 388
@@ -382,7 +400,11 @@ CONFIG_WIRELESS=y
382CONFIG_WIRELESS_OLD_REGULATORY=y 400CONFIG_WIRELESS_OLD_REGULATORY=y
383# CONFIG_WIRELESS_EXT is not set 401# CONFIG_WIRELESS_EXT is not set
384# CONFIG_LIB80211 is not set 402# CONFIG_LIB80211 is not set
385# CONFIG_MAC80211 is not set 403
404#
405# CFG80211 needs to be enabled for MAC80211
406#
407CONFIG_MAC80211_DEFAULT_PS_VALUE=0
386# CONFIG_WIMAX is not set 408# CONFIG_WIMAX is not set
387# CONFIG_RFKILL is not set 409# CONFIG_RFKILL is not set
388# CONFIG_NET_9P is not set 410# CONFIG_NET_9P is not set
@@ -487,6 +509,7 @@ CONFIG_MTD_PHYSMAP=y
487CONFIG_OF_DEVICE=y 509CONFIG_OF_DEVICE=y
488CONFIG_OF_I2C=y 510CONFIG_OF_I2C=y
489CONFIG_OF_SPI=y 511CONFIG_OF_SPI=y
512CONFIG_OF_MDIO=y
490# CONFIG_PARPORT is not set 513# CONFIG_PARPORT is not set
491CONFIG_BLK_DEV=y 514CONFIG_BLK_DEV=y
492# CONFIG_BLK_DEV_FD is not set 515# CONFIG_BLK_DEV_FD is not set
@@ -523,7 +546,9 @@ CONFIG_MISC_DEVICES=y
523# CONFIG_EEPROM_AT24 is not set 546# CONFIG_EEPROM_AT24 is not set
524# CONFIG_EEPROM_AT25 is not set 547# CONFIG_EEPROM_AT25 is not set
525# CONFIG_EEPROM_LEGACY is not set 548# CONFIG_EEPROM_LEGACY is not set
549# CONFIG_EEPROM_MAX6875 is not set
526# CONFIG_EEPROM_93CX6 is not set 550# CONFIG_EEPROM_93CX6 is not set
551# CONFIG_CB710_CORE is not set
527CONFIG_HAVE_IDE=y 552CONFIG_HAVE_IDE=y
528# CONFIG_IDE is not set 553# CONFIG_IDE is not set
529 554
@@ -546,10 +571,6 @@ CONFIG_BLK_DEV_SD=y
546# CONFIG_BLK_DEV_SR is not set 571# CONFIG_BLK_DEV_SR is not set
547CONFIG_CHR_DEV_SG=y 572CONFIG_CHR_DEV_SG=y
548# CONFIG_CHR_DEV_SCH is not set 573# CONFIG_CHR_DEV_SCH is not set
549
550#
551# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
552#
553# CONFIG_SCSI_MULTI_LUN is not set 574# CONFIG_SCSI_MULTI_LUN is not set
554# CONFIG_SCSI_CONSTANTS is not set 575# CONFIG_SCSI_CONSTANTS is not set
555# CONFIG_SCSI_LOGGING is not set 576# CONFIG_SCSI_LOGGING is not set
@@ -567,6 +588,7 @@ CONFIG_SCSI_SPI_ATTRS=y
567CONFIG_SCSI_LOWLEVEL=y 588CONFIG_SCSI_LOWLEVEL=y
568# CONFIG_ISCSI_TCP is not set 589# CONFIG_ISCSI_TCP is not set
569# CONFIG_SCSI_CXGB3_ISCSI is not set 590# CONFIG_SCSI_CXGB3_ISCSI is not set
591# CONFIG_SCSI_BNX2_ISCSI is not set
570# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 592# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
571# CONFIG_SCSI_3W_9XXX is not set 593# CONFIG_SCSI_3W_9XXX is not set
572# CONFIG_SCSI_ACARD is not set 594# CONFIG_SCSI_ACARD is not set
@@ -575,6 +597,7 @@ CONFIG_SCSI_LOWLEVEL=y
575# CONFIG_SCSI_AIC7XXX_OLD is not set 597# CONFIG_SCSI_AIC7XXX_OLD is not set
576# CONFIG_SCSI_AIC79XX is not set 598# CONFIG_SCSI_AIC79XX is not set
577# CONFIG_SCSI_AIC94XX is not set 599# CONFIG_SCSI_AIC94XX is not set
600# CONFIG_SCSI_MVSAS is not set
578# CONFIG_SCSI_DPT_I2O is not set 601# CONFIG_SCSI_DPT_I2O is not set
579# CONFIG_SCSI_ADVANSYS is not set 602# CONFIG_SCSI_ADVANSYS is not set
580# CONFIG_SCSI_ARCMSR is not set 603# CONFIG_SCSI_ARCMSR is not set
@@ -594,7 +617,6 @@ CONFIG_SCSI_LOWLEVEL=y
594# CONFIG_SCSI_IPS is not set 617# CONFIG_SCSI_IPS is not set
595# CONFIG_SCSI_INITIO is not set 618# CONFIG_SCSI_INITIO is not set
596# CONFIG_SCSI_INIA100 is not set 619# CONFIG_SCSI_INIA100 is not set
597# CONFIG_SCSI_MVSAS is not set
598# CONFIG_SCSI_STEX is not set 620# CONFIG_SCSI_STEX is not set
599# CONFIG_SCSI_SYM53C8XX_2 is not set 621# CONFIG_SCSI_SYM53C8XX_2 is not set
600# CONFIG_SCSI_QLOGIC_1280 is not set 622# CONFIG_SCSI_QLOGIC_1280 is not set
@@ -617,14 +639,17 @@ CONFIG_SCSI_LOWLEVEL=y
617# 639#
618 640
619# 641#
620# Enable only one of the two stacks, unless you know what you are doing 642# You can enable one or both FireWire driver stacks.
643#
644
645#
646# See the help texts for more information.
621# 647#
622# CONFIG_FIREWIRE is not set 648# CONFIG_FIREWIRE is not set
623# CONFIG_IEEE1394 is not set 649# CONFIG_IEEE1394 is not set
624# CONFIG_I2O is not set 650# CONFIG_I2O is not set
625# CONFIG_MACINTOSH_DRIVERS is not set 651# CONFIG_MACINTOSH_DRIVERS is not set
626CONFIG_NETDEVICES=y 652CONFIG_NETDEVICES=y
627CONFIG_COMPAT_NET_DEV_OPS=y
628# CONFIG_DUMMY is not set 653# CONFIG_DUMMY is not set
629# CONFIG_BONDING is not set 654# CONFIG_BONDING is not set
630# CONFIG_MACVLAN is not set 655# CONFIG_MACVLAN is not set
@@ -671,8 +696,10 @@ CONFIG_NETDEV_1000=y
671# CONFIG_VIA_VELOCITY is not set 696# CONFIG_VIA_VELOCITY is not set
672# CONFIG_TIGON3 is not set 697# CONFIG_TIGON3 is not set
673# CONFIG_BNX2 is not set 698# CONFIG_BNX2 is not set
699# CONFIG_CNIC is not set
674CONFIG_FSL_PQ_MDIO=y 700CONFIG_FSL_PQ_MDIO=y
675CONFIG_GIANFAR=y 701CONFIG_GIANFAR=y
702# CONFIG_MV643XX_ETH is not set
676# CONFIG_QLA3XXX is not set 703# CONFIG_QLA3XXX is not set
677# CONFIG_ATL1 is not set 704# CONFIG_ATL1 is not set
678# CONFIG_ATL1E is not set 705# CONFIG_ATL1E is not set
@@ -840,7 +867,6 @@ CONFIG_I2C_MPC=y
840CONFIG_SENSORS_PCF8574=y 867CONFIG_SENSORS_PCF8574=y
841# CONFIG_PCF8575 is not set 868# CONFIG_PCF8575 is not set
842# CONFIG_SENSORS_PCA9539 is not set 869# CONFIG_SENSORS_PCA9539 is not set
843# CONFIG_SENSORS_MAX6875 is not set
844# CONFIG_SENSORS_TSL2550 is not set 870# CONFIG_SENSORS_TSL2550 is not set
845# CONFIG_I2C_DEBUG_CORE is not set 871# CONFIG_I2C_DEBUG_CORE is not set
846# CONFIG_I2C_DEBUG_ALGO is not set 872# CONFIG_I2C_DEBUG_ALGO is not set
@@ -853,13 +879,18 @@ CONFIG_SPI_MASTER=y
853# SPI Master Controller Drivers 879# SPI Master Controller Drivers
854# 880#
855CONFIG_SPI_BITBANG=y 881CONFIG_SPI_BITBANG=y
856CONFIG_SPI_MPC83xx=y 882# CONFIG_SPI_MPC8xxx is not set
857 883
858# 884#
859# SPI Protocol Masters 885# SPI Protocol Masters
860# 886#
861# CONFIG_SPI_SPIDEV is not set 887# CONFIG_SPI_SPIDEV is not set
862# CONFIG_SPI_TLE62X0 is not set 888# CONFIG_SPI_TLE62X0 is not set
889
890#
891# PPS support
892#
893# CONFIG_PPS is not set
863CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 894CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
864# CONFIG_GPIOLIB is not set 895# CONFIG_GPIOLIB is not set
865# CONFIG_W1 is not set 896# CONFIG_W1 is not set
@@ -906,24 +937,10 @@ CONFIG_SSB_POSSIBLE=y
906# CONFIG_MFD_WM8400 is not set 937# CONFIG_MFD_WM8400 is not set
907# CONFIG_MFD_WM8350_I2C is not set 938# CONFIG_MFD_WM8350_I2C is not set
908# CONFIG_MFD_PCF50633 is not set 939# CONFIG_MFD_PCF50633 is not set
940# CONFIG_AB3100_CORE is not set
941# CONFIG_EZX_PCAP is not set
909# CONFIG_REGULATOR is not set 942# CONFIG_REGULATOR is not set
910 943# CONFIG_MEDIA_SUPPORT is not set
911#
912# Multimedia devices
913#
914
915#
916# Multimedia core support
917#
918# CONFIG_VIDEO_DEV is not set
919# CONFIG_DVB_CORE is not set
920# CONFIG_VIDEO_MEDIA is not set
921
922#
923# Multimedia drivers
924#
925CONFIG_DAB=y
926# CONFIG_USB_DABUSB is not set
927 944
928# 945#
929# Graphics support 946# Graphics support
@@ -965,6 +982,7 @@ CONFIG_USB_MON=y
965# USB Host Controller Drivers 982# USB Host Controller Drivers
966# 983#
967# CONFIG_USB_C67X00_HCD is not set 984# CONFIG_USB_C67X00_HCD is not set
985# CONFIG_USB_XHCI_HCD is not set
968CONFIG_USB_EHCI_HCD=y 986CONFIG_USB_EHCI_HCD=y
969CONFIG_USB_EHCI_ROOT_HUB_TT=y 987CONFIG_USB_EHCI_ROOT_HUB_TT=y
970# CONFIG_USB_EHCI_TT_NEWSCHED is not set 988# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1087,6 +1105,7 @@ CONFIG_RTC_DRV_DS1307=y
1087# CONFIG_RTC_DRV_S35390A is not set 1105# CONFIG_RTC_DRV_S35390A is not set
1088# CONFIG_RTC_DRV_FM3130 is not set 1106# CONFIG_RTC_DRV_FM3130 is not set
1089# CONFIG_RTC_DRV_RX8581 is not set 1107# CONFIG_RTC_DRV_RX8581 is not set
1108# CONFIG_RTC_DRV_RX8025 is not set
1090 1109
1091# 1110#
1092# SPI RTC drivers 1111# SPI RTC drivers
@@ -1121,6 +1140,10 @@ CONFIG_RTC_DRV_DS1307=y
1121# CONFIG_DMADEVICES is not set 1140# CONFIG_DMADEVICES is not set
1122# CONFIG_AUXDISPLAY is not set 1141# CONFIG_AUXDISPLAY is not set
1123# CONFIG_UIO is not set 1142# CONFIG_UIO is not set
1143
1144#
1145# TI VLYNQ
1146#
1124# CONFIG_STAGING is not set 1147# CONFIG_STAGING is not set
1125 1148
1126# 1149#
@@ -1140,10 +1163,12 @@ CONFIG_FS_MBCACHE=y
1140# CONFIG_REISERFS_FS is not set 1163# CONFIG_REISERFS_FS is not set
1141# CONFIG_JFS_FS is not set 1164# CONFIG_JFS_FS is not set
1142# CONFIG_FS_POSIX_ACL is not set 1165# CONFIG_FS_POSIX_ACL is not set
1143CONFIG_FILE_LOCKING=y
1144# CONFIG_XFS_FS is not set 1166# CONFIG_XFS_FS is not set
1167# CONFIG_GFS2_FS is not set
1145# CONFIG_OCFS2_FS is not set 1168# CONFIG_OCFS2_FS is not set
1146# CONFIG_BTRFS_FS is not set 1169# CONFIG_BTRFS_FS is not set
1170CONFIG_FILE_LOCKING=y
1171CONFIG_FSNOTIFY=y
1147CONFIG_DNOTIFY=y 1172CONFIG_DNOTIFY=y
1148CONFIG_INOTIFY=y 1173CONFIG_INOTIFY=y
1149CONFIG_INOTIFY_USER=y 1174CONFIG_INOTIFY_USER=y
@@ -1210,6 +1235,7 @@ CONFIG_NFS_FS=y
1210CONFIG_NFS_V3=y 1235CONFIG_NFS_V3=y
1211# CONFIG_NFS_V3_ACL is not set 1236# CONFIG_NFS_V3_ACL is not set
1212CONFIG_NFS_V4=y 1237CONFIG_NFS_V4=y
1238# CONFIG_NFS_V4_1 is not set
1213CONFIG_ROOT_NFS=y 1239CONFIG_ROOT_NFS=y
1214# CONFIG_NFSD is not set 1240# CONFIG_NFSD is not set
1215CONFIG_LOCKD=y 1241CONFIG_LOCKD=y
@@ -1308,6 +1334,7 @@ CONFIG_HAS_IOPORT=y
1308CONFIG_HAS_DMA=y 1334CONFIG_HAS_DMA=y
1309CONFIG_HAVE_LMB=y 1335CONFIG_HAVE_LMB=y
1310CONFIG_NLATTR=y 1336CONFIG_NLATTR=y
1337CONFIG_GENERIC_ATOMIC64=y
1311 1338
1312# 1339#
1313# Kernel hacking 1340# Kernel hacking
@@ -1333,22 +1360,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1333CONFIG_HAVE_DYNAMIC_FTRACE=y 1360CONFIG_HAVE_DYNAMIC_FTRACE=y
1334CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1361CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1335CONFIG_TRACING_SUPPORT=y 1362CONFIG_TRACING_SUPPORT=y
1336 1363# CONFIG_FTRACE is not set
1337#
1338# Tracers
1339#
1340# CONFIG_FUNCTION_TRACER is not set
1341# CONFIG_SCHED_TRACER is not set
1342# CONFIG_CONTEXT_SWITCH_TRACER is not set
1343# CONFIG_EVENT_TRACER is not set
1344# CONFIG_BOOT_TRACER is not set
1345# CONFIG_TRACE_BRANCH_PROFILING is not set
1346# CONFIG_STACK_TRACER is not set
1347# CONFIG_KMEMTRACE is not set
1348# CONFIG_WORKQUEUE_TRACER is not set
1349# CONFIG_BLK_DEV_IO_TRACE is not set
1350# CONFIG_SAMPLES is not set 1364# CONFIG_SAMPLES is not set
1351CONFIG_HAVE_ARCH_KGDB=y 1365CONFIG_HAVE_ARCH_KGDB=y
1366# CONFIG_PPC_DISABLE_WERROR is not set
1367CONFIG_PPC_WERROR=y
1352CONFIG_PRINT_STACK_DEPTH=64 1368CONFIG_PRINT_STACK_DEPTH=64
1353# CONFIG_IRQSTACKS is not set 1369# CONFIG_IRQSTACKS is not set
1354# CONFIG_BOOTX_TEXT is not set 1370# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/83xx/mpc834x_mds_defconfig b/arch/powerpc/configs/83xx/mpc834x_mds_defconfig
index 1cd1fcac22c..3236c47712c 100644
--- a/arch/powerpc/configs/83xx/mpc834x_mds_defconfig
+++ b/arch/powerpc/configs/83xx/mpc834x_mds_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:11 2009 4# Wed Jul 29 23:32:09 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_FSL_EMB_PERFMON is not set 20# CONFIG_FSL_EMB_PERFMON is not set
20# CONFIG_ALTIVEC is not set 21# CONFIG_ALTIVEC is not set
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24# CONFIG_SMP is not set 26# CONFIG_SMP is not set
25CONFIG_PPC32=y 27CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32 28CONFIG_WORD_SIZE=32
@@ -31,15 +33,16 @@ CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y 33CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y 34CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y 35CONFIG_GENERIC_HARDIRQS=y
36CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y 38CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y 39CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y 40CONFIG_HAVE_LATENCYTOP_SUPPORT=y
41CONFIG_TRACE_IRQFLAGS_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y 42CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y 43CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y 44CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y 45CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y 46CONFIG_GENERIC_FIND_NEXT_BIT=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
45CONFIG_PPC=y 48CONFIG_PPC=y
@@ -53,12 +56,14 @@ CONFIG_PPC_UDBG_16550=y
53# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
56CONFIG_DEFAULT_UIMAGE=y 60CONFIG_DEFAULT_UIMAGE=y
57CONFIG_ARCH_SUSPEND_POSSIBLE=y 61CONFIG_ARCH_SUSPEND_POSSIBLE=y
58# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
59# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
60CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
61CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
62 67
63# 68#
64# General setup 69# General setup
@@ -107,7 +112,6 @@ CONFIG_ANON_INODES=y
107CONFIG_EMBEDDED=y 112CONFIG_EMBEDDED=y
108CONFIG_SYSCTL_SYSCALL=y 113CONFIG_SYSCTL_SYSCALL=y
109# CONFIG_KALLSYMS is not set 114# CONFIG_KALLSYMS is not set
110# CONFIG_STRIP_ASM_SYMS is not set
111CONFIG_HOTPLUG=y 115CONFIG_HOTPLUG=y
112CONFIG_PRINTK=y 116CONFIG_PRINTK=y
113CONFIG_BUG=y 117CONFIG_BUG=y
@@ -120,9 +124,16 @@ CONFIG_TIMERFD=y
120CONFIG_EVENTFD=y 124CONFIG_EVENTFD=y
121CONFIG_SHMEM=y 125CONFIG_SHMEM=y
122CONFIG_AIO=y 126CONFIG_AIO=y
127CONFIG_HAVE_PERF_COUNTERS=y
128
129#
130# Performance Counters
131#
132# CONFIG_PERF_COUNTERS is not set
123CONFIG_VM_EVENT_COUNTERS=y 133CONFIG_VM_EVENT_COUNTERS=y
124CONFIG_PCI_QUIRKS=y 134CONFIG_PCI_QUIRKS=y
125CONFIG_SLUB_DEBUG=y 135CONFIG_SLUB_DEBUG=y
136# CONFIG_STRIP_ASM_SYMS is not set
126CONFIG_COMPAT_BRK=y 137CONFIG_COMPAT_BRK=y
127# CONFIG_SLAB is not set 138# CONFIG_SLAB is not set
128CONFIG_SLUB=y 139CONFIG_SLUB=y
@@ -135,6 +146,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
135CONFIG_HAVE_KPROBES=y 146CONFIG_HAVE_KPROBES=y
136CONFIG_HAVE_KRETPROBES=y 147CONFIG_HAVE_KRETPROBES=y
137CONFIG_HAVE_ARCH_TRACEHOOK=y 148CONFIG_HAVE_ARCH_TRACEHOOK=y
149
150#
151# GCOV-based kernel profiling
152#
138# CONFIG_SLOW_WORK is not set 153# CONFIG_SLOW_WORK is not set
139# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 154# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
140CONFIG_SLABINFO=y 155CONFIG_SLABINFO=y
@@ -147,7 +162,7 @@ CONFIG_MODULE_UNLOAD=y
147# CONFIG_MODVERSIONS is not set 162# CONFIG_MODVERSIONS is not set
148# CONFIG_MODULE_SRCVERSION_ALL is not set 163# CONFIG_MODULE_SRCVERSION_ALL is not set
149CONFIG_BLOCK=y 164CONFIG_BLOCK=y
150# CONFIG_LBD is not set 165CONFIG_LBDAF=y
151# CONFIG_BLK_DEV_BSG is not set 166# CONFIG_BLK_DEV_BSG is not set
152# CONFIG_BLK_DEV_INTEGRITY is not set 167# CONFIG_BLK_DEV_INTEGRITY is not set
153 168
@@ -189,6 +204,7 @@ CONFIG_MPC834x_MDS=y
189# CONFIG_MPC837x_RDB is not set 204# CONFIG_MPC837x_RDB is not set
190# CONFIG_SBC834x is not set 205# CONFIG_SBC834x is not set
191# CONFIG_ASP834x is not set 206# CONFIG_ASP834x is not set
207# CONFIG_KMETER1 is not set
192CONFIG_PPC_MPC834x=y 208CONFIG_PPC_MPC834x=y
193# CONFIG_PPC_86xx is not set 209# CONFIG_PPC_86xx is not set
194# CONFIG_EMBEDDED6xx is not set 210# CONFIG_EMBEDDED6xx is not set
@@ -234,6 +250,7 @@ CONFIG_BINFMT_ELF=y
234# CONFIG_HAVE_AOUT is not set 250# CONFIG_HAVE_AOUT is not set
235# CONFIG_BINFMT_MISC is not set 251# CONFIG_BINFMT_MISC is not set
236# CONFIG_IOMMU_HELPER is not set 252# CONFIG_IOMMU_HELPER is not set
253# CONFIG_SWIOTLB is not set
237CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 254CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
238CONFIG_ARCH_HAS_WALK_MEMORY=y 255CONFIG_ARCH_HAS_WALK_MEMORY=y
239CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 256CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -254,9 +271,9 @@ CONFIG_MIGRATION=y
254CONFIG_ZONE_DMA_FLAG=1 271CONFIG_ZONE_DMA_FLAG=1
255CONFIG_BOUNCE=y 272CONFIG_BOUNCE=y
256CONFIG_VIRT_TO_BUS=y 273CONFIG_VIRT_TO_BUS=y
257CONFIG_UNEVICTABLE_LRU=y
258CONFIG_HAVE_MLOCK=y 274CONFIG_HAVE_MLOCK=y
259CONFIG_HAVE_MLOCKED_PAGE_BIT=y 275CONFIG_HAVE_MLOCKED_PAGE_BIT=y
276CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
260CONFIG_PPC_4K_PAGES=y 277CONFIG_PPC_4K_PAGES=y
261# CONFIG_PPC_16K_PAGES is not set 278# CONFIG_PPC_16K_PAGES is not set
262# CONFIG_PPC_64K_PAGES is not set 279# CONFIG_PPC_64K_PAGES is not set
@@ -365,6 +382,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
365# CONFIG_ECONET is not set 382# CONFIG_ECONET is not set
366# CONFIG_WAN_ROUTER is not set 383# CONFIG_WAN_ROUTER is not set
367# CONFIG_PHONET is not set 384# CONFIG_PHONET is not set
385# CONFIG_IEEE802154 is not set
368# CONFIG_NET_SCHED is not set 386# CONFIG_NET_SCHED is not set
369# CONFIG_DCB is not set 387# CONFIG_DCB is not set
370 388
@@ -382,7 +400,11 @@ CONFIG_WIRELESS=y
382CONFIG_WIRELESS_OLD_REGULATORY=y 400CONFIG_WIRELESS_OLD_REGULATORY=y
383# CONFIG_WIRELESS_EXT is not set 401# CONFIG_WIRELESS_EXT is not set
384# CONFIG_LIB80211 is not set 402# CONFIG_LIB80211 is not set
385# CONFIG_MAC80211 is not set 403
404#
405# CFG80211 needs to be enabled for MAC80211
406#
407CONFIG_MAC80211_DEFAULT_PS_VALUE=0
386# CONFIG_WIMAX is not set 408# CONFIG_WIMAX is not set
387# CONFIG_RFKILL is not set 409# CONFIG_RFKILL is not set
388# CONFIG_NET_9P is not set 410# CONFIG_NET_9P is not set
@@ -403,6 +425,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
403# CONFIG_MTD is not set 425# CONFIG_MTD is not set
404CONFIG_OF_DEVICE=y 426CONFIG_OF_DEVICE=y
405CONFIG_OF_I2C=y 427CONFIG_OF_I2C=y
428CONFIG_OF_MDIO=y
406# CONFIG_PARPORT is not set 429# CONFIG_PARPORT is not set
407CONFIG_BLK_DEV=y 430CONFIG_BLK_DEV=y
408# CONFIG_BLK_DEV_FD is not set 431# CONFIG_BLK_DEV_FD is not set
@@ -437,7 +460,9 @@ CONFIG_MISC_DEVICES=y
437# 460#
438# CONFIG_EEPROM_AT24 is not set 461# CONFIG_EEPROM_AT24 is not set
439# CONFIG_EEPROM_LEGACY is not set 462# CONFIG_EEPROM_LEGACY is not set
463# CONFIG_EEPROM_MAX6875 is not set
440# CONFIG_EEPROM_93CX6 is not set 464# CONFIG_EEPROM_93CX6 is not set
465# CONFIG_CB710_CORE is not set
441CONFIG_HAVE_IDE=y 466CONFIG_HAVE_IDE=y
442# CONFIG_IDE is not set 467# CONFIG_IDE is not set
443 468
@@ -457,14 +482,17 @@ CONFIG_HAVE_IDE=y
457# 482#
458 483
459# 484#
460# Enable only one of the two stacks, unless you know what you are doing 485# You can enable one or both FireWire driver stacks.
486#
487
488#
489# See the help texts for more information.
461# 490#
462# CONFIG_FIREWIRE is not set 491# CONFIG_FIREWIRE is not set
463# CONFIG_IEEE1394 is not set 492# CONFIG_IEEE1394 is not set
464# CONFIG_I2O is not set 493# CONFIG_I2O is not set
465# CONFIG_MACINTOSH_DRIVERS is not set 494# CONFIG_MACINTOSH_DRIVERS is not set
466CONFIG_NETDEVICES=y 495CONFIG_NETDEVICES=y
467CONFIG_COMPAT_NET_DEV_OPS=y
468# CONFIG_DUMMY is not set 496# CONFIG_DUMMY is not set
469# CONFIG_BONDING is not set 497# CONFIG_BONDING is not set
470# CONFIG_MACVLAN is not set 498# CONFIG_MACVLAN is not set
@@ -527,6 +555,7 @@ CONFIG_E100=y
527# CONFIG_SMSC9420 is not set 555# CONFIG_SMSC9420 is not set
528# CONFIG_SUNDANCE is not set 556# CONFIG_SUNDANCE is not set
529# CONFIG_TLAN is not set 557# CONFIG_TLAN is not set
558# CONFIG_KS8842 is not set
530# CONFIG_VIA_RHINE is not set 559# CONFIG_VIA_RHINE is not set
531# CONFIG_SC92031 is not set 560# CONFIG_SC92031 is not set
532# CONFIG_ATL2 is not set 561# CONFIG_ATL2 is not set
@@ -548,8 +577,10 @@ CONFIG_NETDEV_1000=y
548# CONFIG_VIA_VELOCITY is not set 577# CONFIG_VIA_VELOCITY is not set
549# CONFIG_TIGON3 is not set 578# CONFIG_TIGON3 is not set
550# CONFIG_BNX2 is not set 579# CONFIG_BNX2 is not set
580# CONFIG_CNIC is not set
551CONFIG_FSL_PQ_MDIO=y 581CONFIG_FSL_PQ_MDIO=y
552CONFIG_GIANFAR=y 582CONFIG_GIANFAR=y
583# CONFIG_MV643XX_ETH is not set
553# CONFIG_QLA3XXX is not set 584# CONFIG_QLA3XXX is not set
554# CONFIG_ATL1 is not set 585# CONFIG_ATL1 is not set
555# CONFIG_ATL1E is not set 586# CONFIG_ATL1E is not set
@@ -724,13 +755,17 @@ CONFIG_I2C_MPC=y
724# CONFIG_SENSORS_PCF8574 is not set 755# CONFIG_SENSORS_PCF8574 is not set
725# CONFIG_PCF8575 is not set 756# CONFIG_PCF8575 is not set
726# CONFIG_SENSORS_PCA9539 is not set 757# CONFIG_SENSORS_PCA9539 is not set
727# CONFIG_SENSORS_MAX6875 is not set
728# CONFIG_SENSORS_TSL2550 is not set 758# CONFIG_SENSORS_TSL2550 is not set
729# CONFIG_I2C_DEBUG_CORE is not set 759# CONFIG_I2C_DEBUG_CORE is not set
730# CONFIG_I2C_DEBUG_ALGO is not set 760# CONFIG_I2C_DEBUG_ALGO is not set
731# CONFIG_I2C_DEBUG_BUS is not set 761# CONFIG_I2C_DEBUG_BUS is not set
732# CONFIG_I2C_DEBUG_CHIP is not set 762# CONFIG_I2C_DEBUG_CHIP is not set
733# CONFIG_SPI is not set 763# CONFIG_SPI is not set
764
765#
766# PPS support
767#
768# CONFIG_PPS is not set
734CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 769CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
735# CONFIG_GPIOLIB is not set 770# CONFIG_GPIOLIB is not set
736# CONFIG_W1 is not set 771# CONFIG_W1 is not set
@@ -785,6 +820,7 @@ CONFIG_HWMON=y
785# CONFIG_SENSORS_SMSC47B397 is not set 820# CONFIG_SENSORS_SMSC47B397 is not set
786# CONFIG_SENSORS_ADS7828 is not set 821# CONFIG_SENSORS_ADS7828 is not set
787# CONFIG_SENSORS_THMC50 is not set 822# CONFIG_SENSORS_THMC50 is not set
823# CONFIG_SENSORS_TMP401 is not set
788# CONFIG_SENSORS_VIA686A is not set 824# CONFIG_SENSORS_VIA686A is not set
789# CONFIG_SENSORS_VT1211 is not set 825# CONFIG_SENSORS_VT1211 is not set
790# CONFIG_SENSORS_VT8231 is not set 826# CONFIG_SENSORS_VT8231 is not set
@@ -833,23 +869,9 @@ CONFIG_SSB_POSSIBLE=y
833# CONFIG_MFD_WM8400 is not set 869# CONFIG_MFD_WM8400 is not set
834# CONFIG_MFD_WM8350_I2C is not set 870# CONFIG_MFD_WM8350_I2C is not set
835# CONFIG_MFD_PCF50633 is not set 871# CONFIG_MFD_PCF50633 is not set
872# CONFIG_AB3100_CORE is not set
836# CONFIG_REGULATOR is not set 873# CONFIG_REGULATOR is not set
837 874# CONFIG_MEDIA_SUPPORT is not set
838#
839# Multimedia devices
840#
841
842#
843# Multimedia core support
844#
845# CONFIG_VIDEO_DEV is not set
846# CONFIG_DVB_CORE is not set
847# CONFIG_VIDEO_MEDIA is not set
848
849#
850# Multimedia drivers
851#
852CONFIG_DAB=y
853 875
854# 876#
855# Graphics support 877# Graphics support
@@ -933,6 +955,7 @@ CONFIG_RTC_DRV_DS1374=y
933# CONFIG_RTC_DRV_S35390A is not set 955# CONFIG_RTC_DRV_S35390A is not set
934# CONFIG_RTC_DRV_FM3130 is not set 956# CONFIG_RTC_DRV_FM3130 is not set
935# CONFIG_RTC_DRV_RX8581 is not set 957# CONFIG_RTC_DRV_RX8581 is not set
958# CONFIG_RTC_DRV_RX8025 is not set
936 959
937# 960#
938# SPI RTC drivers 961# SPI RTC drivers
@@ -960,6 +983,10 @@ CONFIG_RTC_DRV_DS1374=y
960# CONFIG_DMADEVICES is not set 983# CONFIG_DMADEVICES is not set
961# CONFIG_AUXDISPLAY is not set 984# CONFIG_AUXDISPLAY is not set
962# CONFIG_UIO is not set 985# CONFIG_UIO is not set
986
987#
988# TI VLYNQ
989#
963# CONFIG_STAGING is not set 990# CONFIG_STAGING is not set
964 991
965# 992#
@@ -979,10 +1006,12 @@ CONFIG_FS_MBCACHE=y
979# CONFIG_REISERFS_FS is not set 1006# CONFIG_REISERFS_FS is not set
980# CONFIG_JFS_FS is not set 1007# CONFIG_JFS_FS is not set
981# CONFIG_FS_POSIX_ACL is not set 1008# CONFIG_FS_POSIX_ACL is not set
982CONFIG_FILE_LOCKING=y
983# CONFIG_XFS_FS is not set 1009# CONFIG_XFS_FS is not set
1010# CONFIG_GFS2_FS is not set
984# CONFIG_OCFS2_FS is not set 1011# CONFIG_OCFS2_FS is not set
985# CONFIG_BTRFS_FS is not set 1012# CONFIG_BTRFS_FS is not set
1013CONFIG_FILE_LOCKING=y
1014CONFIG_FSNOTIFY=y
986CONFIG_DNOTIFY=y 1015CONFIG_DNOTIFY=y
987CONFIG_INOTIFY=y 1016CONFIG_INOTIFY=y
988CONFIG_INOTIFY_USER=y 1017CONFIG_INOTIFY_USER=y
@@ -1045,6 +1074,7 @@ CONFIG_NFS_FS=y
1045CONFIG_NFS_V3=y 1074CONFIG_NFS_V3=y
1046# CONFIG_NFS_V3_ACL is not set 1075# CONFIG_NFS_V3_ACL is not set
1047CONFIG_NFS_V4=y 1076CONFIG_NFS_V4=y
1077# CONFIG_NFS_V4_1 is not set
1048CONFIG_ROOT_NFS=y 1078CONFIG_ROOT_NFS=y
1049# CONFIG_NFSD is not set 1079# CONFIG_NFSD is not set
1050CONFIG_LOCKD=y 1080CONFIG_LOCKD=y
@@ -1100,6 +1130,7 @@ CONFIG_HAS_IOPORT=y
1100CONFIG_HAS_DMA=y 1130CONFIG_HAS_DMA=y
1101CONFIG_HAVE_LMB=y 1131CONFIG_HAVE_LMB=y
1102CONFIG_NLATTR=y 1132CONFIG_NLATTR=y
1133CONFIG_GENERIC_ATOMIC64=y
1103 1134
1104# 1135#
1105# Kernel hacking 1136# Kernel hacking
@@ -1125,22 +1156,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1125CONFIG_HAVE_DYNAMIC_FTRACE=y 1156CONFIG_HAVE_DYNAMIC_FTRACE=y
1126CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1157CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1127CONFIG_TRACING_SUPPORT=y 1158CONFIG_TRACING_SUPPORT=y
1128 1159# CONFIG_FTRACE is not set
1129#
1130# Tracers
1131#
1132# CONFIG_FUNCTION_TRACER is not set
1133# CONFIG_SCHED_TRACER is not set
1134# CONFIG_CONTEXT_SWITCH_TRACER is not set
1135# CONFIG_EVENT_TRACER is not set
1136# CONFIG_BOOT_TRACER is not set
1137# CONFIG_TRACE_BRANCH_PROFILING is not set
1138# CONFIG_STACK_TRACER is not set
1139# CONFIG_KMEMTRACE is not set
1140# CONFIG_WORKQUEUE_TRACER is not set
1141# CONFIG_BLK_DEV_IO_TRACE is not set
1142# CONFIG_SAMPLES is not set 1160# CONFIG_SAMPLES is not set
1143CONFIG_HAVE_ARCH_KGDB=y 1161CONFIG_HAVE_ARCH_KGDB=y
1162# CONFIG_PPC_DISABLE_WERROR is not set
1163CONFIG_PPC_WERROR=y
1144CONFIG_PRINT_STACK_DEPTH=64 1164CONFIG_PRINT_STACK_DEPTH=64
1145# CONFIG_IRQSTACKS is not set 1165# CONFIG_IRQSTACKS is not set
1146# CONFIG_BOOTX_TEXT is not set 1166# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/83xx/mpc836x_mds_defconfig b/arch/powerpc/configs/83xx/mpc836x_mds_defconfig
index ce5177393a0..8c5299d7481 100644
--- a/arch/powerpc/configs/83xx/mpc836x_mds_defconfig
+++ b/arch/powerpc/configs/83xx/mpc836x_mds_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:12 2009 4# Wed Jul 29 23:32:10 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_FSL_EMB_PERFMON is not set 20# CONFIG_FSL_EMB_PERFMON is not set
20# CONFIG_ALTIVEC is not set 21# CONFIG_ALTIVEC is not set
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24# CONFIG_SMP is not set 26# CONFIG_SMP is not set
25CONFIG_PPC32=y 27CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32 28CONFIG_WORD_SIZE=32
@@ -31,15 +33,16 @@ CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y 33CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y 34CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y 35CONFIG_GENERIC_HARDIRQS=y
36CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y 38CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y 39CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y 40CONFIG_HAVE_LATENCYTOP_SUPPORT=y
41CONFIG_TRACE_IRQFLAGS_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y 42CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y 43CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y 44CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y 45CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y 46CONFIG_GENERIC_FIND_NEXT_BIT=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
45CONFIG_PPC=y 48CONFIG_PPC=y
@@ -53,12 +56,14 @@ CONFIG_PPC_UDBG_16550=y
53# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
56CONFIG_DEFAULT_UIMAGE=y 60CONFIG_DEFAULT_UIMAGE=y
57CONFIG_ARCH_SUSPEND_POSSIBLE=y 61CONFIG_ARCH_SUSPEND_POSSIBLE=y
58# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
59# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
60CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
61CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
62 67
63# 68#
64# General setup 69# General setup
@@ -107,7 +112,6 @@ CONFIG_ANON_INODES=y
107CONFIG_EMBEDDED=y 112CONFIG_EMBEDDED=y
108CONFIG_SYSCTL_SYSCALL=y 113CONFIG_SYSCTL_SYSCALL=y
109# CONFIG_KALLSYMS is not set 114# CONFIG_KALLSYMS is not set
110# CONFIG_STRIP_ASM_SYMS is not set
111CONFIG_HOTPLUG=y 115CONFIG_HOTPLUG=y
112CONFIG_PRINTK=y 116CONFIG_PRINTK=y
113CONFIG_BUG=y 117CONFIG_BUG=y
@@ -120,9 +124,16 @@ CONFIG_TIMERFD=y
120CONFIG_EVENTFD=y 124CONFIG_EVENTFD=y
121CONFIG_SHMEM=y 125CONFIG_SHMEM=y
122CONFIG_AIO=y 126CONFIG_AIO=y
127CONFIG_HAVE_PERF_COUNTERS=y
128
129#
130# Performance Counters
131#
132# CONFIG_PERF_COUNTERS is not set
123CONFIG_VM_EVENT_COUNTERS=y 133CONFIG_VM_EVENT_COUNTERS=y
124CONFIG_PCI_QUIRKS=y 134CONFIG_PCI_QUIRKS=y
125CONFIG_SLUB_DEBUG=y 135CONFIG_SLUB_DEBUG=y
136# CONFIG_STRIP_ASM_SYMS is not set
126CONFIG_COMPAT_BRK=y 137CONFIG_COMPAT_BRK=y
127# CONFIG_SLAB is not set 138# CONFIG_SLAB is not set
128CONFIG_SLUB=y 139CONFIG_SLUB=y
@@ -135,6 +146,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
135CONFIG_HAVE_KPROBES=y 146CONFIG_HAVE_KPROBES=y
136CONFIG_HAVE_KRETPROBES=y 147CONFIG_HAVE_KRETPROBES=y
137CONFIG_HAVE_ARCH_TRACEHOOK=y 148CONFIG_HAVE_ARCH_TRACEHOOK=y
149
150#
151# GCOV-based kernel profiling
152#
138# CONFIG_SLOW_WORK is not set 153# CONFIG_SLOW_WORK is not set
139# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 154# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
140CONFIG_SLABINFO=y 155CONFIG_SLABINFO=y
@@ -147,7 +162,7 @@ CONFIG_MODULE_UNLOAD=y
147# CONFIG_MODVERSIONS is not set 162# CONFIG_MODVERSIONS is not set
148# CONFIG_MODULE_SRCVERSION_ALL is not set 163# CONFIG_MODULE_SRCVERSION_ALL is not set
149CONFIG_BLOCK=y 164CONFIG_BLOCK=y
150# CONFIG_LBD is not set 165CONFIG_LBDAF=y
151# CONFIG_BLK_DEV_BSG is not set 166# CONFIG_BLK_DEV_BSG is not set
152# CONFIG_BLK_DEV_INTEGRITY is not set 167# CONFIG_BLK_DEV_INTEGRITY is not set
153 168
@@ -189,6 +204,7 @@ CONFIG_MPC836x_MDS=y
189# CONFIG_MPC837x_RDB is not set 204# CONFIG_MPC837x_RDB is not set
190# CONFIG_SBC834x is not set 205# CONFIG_SBC834x is not set
191# CONFIG_ASP834x is not set 206# CONFIG_ASP834x is not set
207# CONFIG_KMETER1 is not set
192# CONFIG_PPC_86xx is not set 208# CONFIG_PPC_86xx is not set
193# CONFIG_EMBEDDED6xx is not set 209# CONFIG_EMBEDDED6xx is not set
194# CONFIG_AMIGAONE is not set 210# CONFIG_AMIGAONE is not set
@@ -233,6 +249,7 @@ CONFIG_BINFMT_ELF=y
233# CONFIG_HAVE_AOUT is not set 249# CONFIG_HAVE_AOUT is not set
234# CONFIG_BINFMT_MISC is not set 250# CONFIG_BINFMT_MISC is not set
235# CONFIG_IOMMU_HELPER is not set 251# CONFIG_IOMMU_HELPER is not set
252# CONFIG_SWIOTLB is not set
236CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 253CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
237CONFIG_ARCH_HAS_WALK_MEMORY=y 254CONFIG_ARCH_HAS_WALK_MEMORY=y
238CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 255CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -253,9 +270,9 @@ CONFIG_MIGRATION=y
253CONFIG_ZONE_DMA_FLAG=1 270CONFIG_ZONE_DMA_FLAG=1
254CONFIG_BOUNCE=y 271CONFIG_BOUNCE=y
255CONFIG_VIRT_TO_BUS=y 272CONFIG_VIRT_TO_BUS=y
256CONFIG_UNEVICTABLE_LRU=y
257CONFIG_HAVE_MLOCK=y 273CONFIG_HAVE_MLOCK=y
258CONFIG_HAVE_MLOCKED_PAGE_BIT=y 274CONFIG_HAVE_MLOCKED_PAGE_BIT=y
275CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
259CONFIG_PPC_4K_PAGES=y 276CONFIG_PPC_4K_PAGES=y
260# CONFIG_PPC_16K_PAGES is not set 277# CONFIG_PPC_16K_PAGES is not set
261# CONFIG_PPC_64K_PAGES is not set 278# CONFIG_PPC_64K_PAGES is not set
@@ -364,6 +381,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
364# CONFIG_ECONET is not set 381# CONFIG_ECONET is not set
365# CONFIG_WAN_ROUTER is not set 382# CONFIG_WAN_ROUTER is not set
366# CONFIG_PHONET is not set 383# CONFIG_PHONET is not set
384# CONFIG_IEEE802154 is not set
367# CONFIG_NET_SCHED is not set 385# CONFIG_NET_SCHED is not set
368# CONFIG_DCB is not set 386# CONFIG_DCB is not set
369 387
@@ -381,7 +399,11 @@ CONFIG_WIRELESS=y
381CONFIG_WIRELESS_OLD_REGULATORY=y 399CONFIG_WIRELESS_OLD_REGULATORY=y
382# CONFIG_WIRELESS_EXT is not set 400# CONFIG_WIRELESS_EXT is not set
383# CONFIG_LIB80211 is not set 401# CONFIG_LIB80211 is not set
384# CONFIG_MAC80211 is not set 402
403#
404# CFG80211 needs to be enabled for MAC80211
405#
406CONFIG_MAC80211_DEFAULT_PS_VALUE=0
385# CONFIG_WIMAX is not set 407# CONFIG_WIMAX is not set
386# CONFIG_RFKILL is not set 408# CONFIG_RFKILL is not set
387# CONFIG_NET_9P is not set 409# CONFIG_NET_9P is not set
@@ -485,6 +507,7 @@ CONFIG_MTD_PHYSMAP_OF=y
485# CONFIG_MTD_UBI is not set 507# CONFIG_MTD_UBI is not set
486CONFIG_OF_DEVICE=y 508CONFIG_OF_DEVICE=y
487CONFIG_OF_I2C=y 509CONFIG_OF_I2C=y
510CONFIG_OF_MDIO=y
488# CONFIG_PARPORT is not set 511# CONFIG_PARPORT is not set
489CONFIG_BLK_DEV=y 512CONFIG_BLK_DEV=y
490# CONFIG_BLK_DEV_FD is not set 513# CONFIG_BLK_DEV_FD is not set
@@ -519,7 +542,9 @@ CONFIG_MISC_DEVICES=y
519# 542#
520# CONFIG_EEPROM_AT24 is not set 543# CONFIG_EEPROM_AT24 is not set
521# CONFIG_EEPROM_LEGACY is not set 544# CONFIG_EEPROM_LEGACY is not set
545# CONFIG_EEPROM_MAX6875 is not set
522# CONFIG_EEPROM_93CX6 is not set 546# CONFIG_EEPROM_93CX6 is not set
547# CONFIG_CB710_CORE is not set
523CONFIG_HAVE_IDE=y 548CONFIG_HAVE_IDE=y
524# CONFIG_IDE is not set 549# CONFIG_IDE is not set
525 550
@@ -542,10 +567,6 @@ CONFIG_SCSI_PROC_FS=y
542# CONFIG_BLK_DEV_SR is not set 567# CONFIG_BLK_DEV_SR is not set
543# CONFIG_CHR_DEV_SG is not set 568# CONFIG_CHR_DEV_SG is not set
544# CONFIG_CHR_DEV_SCH is not set 569# CONFIG_CHR_DEV_SCH is not set
545
546#
547# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
548#
549# CONFIG_SCSI_MULTI_LUN is not set 570# CONFIG_SCSI_MULTI_LUN is not set
550# CONFIG_SCSI_CONSTANTS is not set 571# CONFIG_SCSI_CONSTANTS is not set
551# CONFIG_SCSI_LOGGING is not set 572# CONFIG_SCSI_LOGGING is not set
@@ -563,6 +584,7 @@ CONFIG_SCSI_WAIT_SCAN=m
563CONFIG_SCSI_LOWLEVEL=y 584CONFIG_SCSI_LOWLEVEL=y
564# CONFIG_ISCSI_TCP is not set 585# CONFIG_ISCSI_TCP is not set
565# CONFIG_SCSI_CXGB3_ISCSI is not set 586# CONFIG_SCSI_CXGB3_ISCSI is not set
587# CONFIG_SCSI_BNX2_ISCSI is not set
566# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 588# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
567# CONFIG_SCSI_3W_9XXX is not set 589# CONFIG_SCSI_3W_9XXX is not set
568# CONFIG_SCSI_ACARD is not set 590# CONFIG_SCSI_ACARD is not set
@@ -571,6 +593,7 @@ CONFIG_SCSI_LOWLEVEL=y
571# CONFIG_SCSI_AIC7XXX_OLD is not set 593# CONFIG_SCSI_AIC7XXX_OLD is not set
572# CONFIG_SCSI_AIC79XX is not set 594# CONFIG_SCSI_AIC79XX is not set
573# CONFIG_SCSI_AIC94XX is not set 595# CONFIG_SCSI_AIC94XX is not set
596# CONFIG_SCSI_MVSAS is not set
574# CONFIG_SCSI_DPT_I2O is not set 597# CONFIG_SCSI_DPT_I2O is not set
575# CONFIG_SCSI_ADVANSYS is not set 598# CONFIG_SCSI_ADVANSYS is not set
576# CONFIG_SCSI_ARCMSR is not set 599# CONFIG_SCSI_ARCMSR is not set
@@ -590,7 +613,6 @@ CONFIG_SCSI_LOWLEVEL=y
590# CONFIG_SCSI_IPS is not set 613# CONFIG_SCSI_IPS is not set
591# CONFIG_SCSI_INITIO is not set 614# CONFIG_SCSI_INITIO is not set
592# CONFIG_SCSI_INIA100 is not set 615# CONFIG_SCSI_INIA100 is not set
593# CONFIG_SCSI_MVSAS is not set
594# CONFIG_SCSI_STEX is not set 616# CONFIG_SCSI_STEX is not set
595# CONFIG_SCSI_SYM53C8XX_2 is not set 617# CONFIG_SCSI_SYM53C8XX_2 is not set
596# CONFIG_SCSI_QLOGIC_1280 is not set 618# CONFIG_SCSI_QLOGIC_1280 is not set
@@ -613,14 +635,17 @@ CONFIG_SCSI_LOWLEVEL=y
613# 635#
614 636
615# 637#
616# Enable only one of the two stacks, unless you know what you are doing 638# You can enable one or both FireWire driver stacks.
639#
640
641#
642# See the help texts for more information.
617# 643#
618# CONFIG_FIREWIRE is not set 644# CONFIG_FIREWIRE is not set
619# CONFIG_IEEE1394 is not set 645# CONFIG_IEEE1394 is not set
620# CONFIG_I2O is not set 646# CONFIG_I2O is not set
621# CONFIG_MACINTOSH_DRIVERS is not set 647# CONFIG_MACINTOSH_DRIVERS is not set
622CONFIG_NETDEVICES=y 648CONFIG_NETDEVICES=y
623CONFIG_COMPAT_NET_DEV_OPS=y
624# CONFIG_DUMMY is not set 649# CONFIG_DUMMY is not set
625# CONFIG_BONDING is not set 650# CONFIG_BONDING is not set
626# CONFIG_MACVLAN is not set 651# CONFIG_MACVLAN is not set
@@ -667,6 +692,7 @@ CONFIG_MII=y
667# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 692# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
668# CONFIG_NET_PCI is not set 693# CONFIG_NET_PCI is not set
669# CONFIG_B44 is not set 694# CONFIG_B44 is not set
695# CONFIG_KS8842 is not set
670# CONFIG_ATL2 is not set 696# CONFIG_ATL2 is not set
671CONFIG_NETDEV_1000=y 697CONFIG_NETDEV_1000=y
672# CONFIG_ACENIC is not set 698# CONFIG_ACENIC is not set
@@ -686,11 +712,13 @@ CONFIG_NETDEV_1000=y
686# CONFIG_VIA_VELOCITY is not set 712# CONFIG_VIA_VELOCITY is not set
687# CONFIG_TIGON3 is not set 713# CONFIG_TIGON3 is not set
688# CONFIG_BNX2 is not set 714# CONFIG_BNX2 is not set
715# CONFIG_CNIC is not set
689CONFIG_FSL_PQ_MDIO=y 716CONFIG_FSL_PQ_MDIO=y
690# CONFIG_GIANFAR is not set 717# CONFIG_GIANFAR is not set
691CONFIG_UCC_GETH=y 718CONFIG_UCC_GETH=y
692# CONFIG_UGETH_MAGIC_PACKET is not set 719# CONFIG_UGETH_MAGIC_PACKET is not set
693# CONFIG_UGETH_TX_ON_DEMAND is not set 720# CONFIG_UGETH_TX_ON_DEMAND is not set
721# CONFIG_MV643XX_ETH is not set
694# CONFIG_QLA3XXX is not set 722# CONFIG_QLA3XXX is not set
695# CONFIG_ATL1 is not set 723# CONFIG_ATL1 is not set
696# CONFIG_ATL1E is not set 724# CONFIG_ATL1E is not set
@@ -868,13 +896,17 @@ CONFIG_I2C_MPC=y
868# CONFIG_SENSORS_PCF8574 is not set 896# CONFIG_SENSORS_PCF8574 is not set
869# CONFIG_PCF8575 is not set 897# CONFIG_PCF8575 is not set
870# CONFIG_SENSORS_PCA9539 is not set 898# CONFIG_SENSORS_PCA9539 is not set
871# CONFIG_SENSORS_MAX6875 is not set
872# CONFIG_SENSORS_TSL2550 is not set 899# CONFIG_SENSORS_TSL2550 is not set
873# CONFIG_I2C_DEBUG_CORE is not set 900# CONFIG_I2C_DEBUG_CORE is not set
874# CONFIG_I2C_DEBUG_ALGO is not set 901# CONFIG_I2C_DEBUG_ALGO is not set
875# CONFIG_I2C_DEBUG_BUS is not set 902# CONFIG_I2C_DEBUG_BUS is not set
876# CONFIG_I2C_DEBUG_CHIP is not set 903# CONFIG_I2C_DEBUG_CHIP is not set
877# CONFIG_SPI is not set 904# CONFIG_SPI is not set
905
906#
907# PPS support
908#
909# CONFIG_PPS is not set
878CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 910CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
879# CONFIG_GPIOLIB is not set 911# CONFIG_GPIOLIB is not set
880# CONFIG_W1 is not set 912# CONFIG_W1 is not set
@@ -929,6 +961,7 @@ CONFIG_HWMON=y
929# CONFIG_SENSORS_SMSC47B397 is not set 961# CONFIG_SENSORS_SMSC47B397 is not set
930# CONFIG_SENSORS_ADS7828 is not set 962# CONFIG_SENSORS_ADS7828 is not set
931# CONFIG_SENSORS_THMC50 is not set 963# CONFIG_SENSORS_THMC50 is not set
964# CONFIG_SENSORS_TMP401 is not set
932# CONFIG_SENSORS_VIA686A is not set 965# CONFIG_SENSORS_VIA686A is not set
933# CONFIG_SENSORS_VT1211 is not set 966# CONFIG_SENSORS_VT1211 is not set
934# CONFIG_SENSORS_VT8231 is not set 967# CONFIG_SENSORS_VT8231 is not set
@@ -977,23 +1010,9 @@ CONFIG_SSB_POSSIBLE=y
977# CONFIG_MFD_WM8400 is not set 1010# CONFIG_MFD_WM8400 is not set
978# CONFIG_MFD_WM8350_I2C is not set 1011# CONFIG_MFD_WM8350_I2C is not set
979# CONFIG_MFD_PCF50633 is not set 1012# CONFIG_MFD_PCF50633 is not set
1013# CONFIG_AB3100_CORE is not set
980# CONFIG_REGULATOR is not set 1014# CONFIG_REGULATOR is not set
981 1015# CONFIG_MEDIA_SUPPORT is not set
982#
983# Multimedia devices
984#
985
986#
987# Multimedia core support
988#
989# CONFIG_VIDEO_DEV is not set
990# CONFIG_DVB_CORE is not set
991# CONFIG_VIDEO_MEDIA is not set
992
993#
994# Multimedia drivers
995#
996CONFIG_DAB=y
997 1016
998# 1017#
999# Graphics support 1018# Graphics support
@@ -1077,6 +1096,7 @@ CONFIG_RTC_DRV_DS1374=y
1077# CONFIG_RTC_DRV_S35390A is not set 1096# CONFIG_RTC_DRV_S35390A is not set
1078# CONFIG_RTC_DRV_FM3130 is not set 1097# CONFIG_RTC_DRV_FM3130 is not set
1079# CONFIG_RTC_DRV_RX8581 is not set 1098# CONFIG_RTC_DRV_RX8581 is not set
1099# CONFIG_RTC_DRV_RX8025 is not set
1080 1100
1081# 1101#
1082# SPI RTC drivers 1102# SPI RTC drivers
@@ -1104,6 +1124,10 @@ CONFIG_RTC_DRV_DS1374=y
1104# CONFIG_DMADEVICES is not set 1124# CONFIG_DMADEVICES is not set
1105# CONFIG_AUXDISPLAY is not set 1125# CONFIG_AUXDISPLAY is not set
1106# CONFIG_UIO is not set 1126# CONFIG_UIO is not set
1127
1128#
1129# TI VLYNQ
1130#
1107# CONFIG_STAGING is not set 1131# CONFIG_STAGING is not set
1108 1132
1109# 1133#
@@ -1123,10 +1147,12 @@ CONFIG_FS_MBCACHE=y
1123# CONFIG_REISERFS_FS is not set 1147# CONFIG_REISERFS_FS is not set
1124# CONFIG_JFS_FS is not set 1148# CONFIG_JFS_FS is not set
1125# CONFIG_FS_POSIX_ACL is not set 1149# CONFIG_FS_POSIX_ACL is not set
1126CONFIG_FILE_LOCKING=y
1127# CONFIG_XFS_FS is not set 1150# CONFIG_XFS_FS is not set
1151# CONFIG_GFS2_FS is not set
1128# CONFIG_OCFS2_FS is not set 1152# CONFIG_OCFS2_FS is not set
1129# CONFIG_BTRFS_FS is not set 1153# CONFIG_BTRFS_FS is not set
1154CONFIG_FILE_LOCKING=y
1155CONFIG_FSNOTIFY=y
1130CONFIG_DNOTIFY=y 1156CONFIG_DNOTIFY=y
1131CONFIG_INOTIFY=y 1157CONFIG_INOTIFY=y
1132CONFIG_INOTIFY_USER=y 1158CONFIG_INOTIFY_USER=y
@@ -1190,6 +1216,7 @@ CONFIG_NFS_FS=y
1190CONFIG_NFS_V3=y 1216CONFIG_NFS_V3=y
1191# CONFIG_NFS_V3_ACL is not set 1217# CONFIG_NFS_V3_ACL is not set
1192CONFIG_NFS_V4=y 1218CONFIG_NFS_V4=y
1219# CONFIG_NFS_V4_1 is not set
1193CONFIG_ROOT_NFS=y 1220CONFIG_ROOT_NFS=y
1194# CONFIG_NFSD is not set 1221# CONFIG_NFSD is not set
1195CONFIG_LOCKD=y 1222CONFIG_LOCKD=y
@@ -1247,6 +1274,7 @@ CONFIG_HAS_IOPORT=y
1247CONFIG_HAS_DMA=y 1274CONFIG_HAS_DMA=y
1248CONFIG_HAVE_LMB=y 1275CONFIG_HAVE_LMB=y
1249CONFIG_NLATTR=y 1276CONFIG_NLATTR=y
1277CONFIG_GENERIC_ATOMIC64=y
1250 1278
1251# 1279#
1252# Kernel hacking 1280# Kernel hacking
@@ -1272,22 +1300,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1272CONFIG_HAVE_DYNAMIC_FTRACE=y 1300CONFIG_HAVE_DYNAMIC_FTRACE=y
1273CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1301CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1274CONFIG_TRACING_SUPPORT=y 1302CONFIG_TRACING_SUPPORT=y
1275 1303# CONFIG_FTRACE is not set
1276#
1277# Tracers
1278#
1279# CONFIG_FUNCTION_TRACER is not set
1280# CONFIG_SCHED_TRACER is not set
1281# CONFIG_CONTEXT_SWITCH_TRACER is not set
1282# CONFIG_EVENT_TRACER is not set
1283# CONFIG_BOOT_TRACER is not set
1284# CONFIG_TRACE_BRANCH_PROFILING is not set
1285# CONFIG_STACK_TRACER is not set
1286# CONFIG_KMEMTRACE is not set
1287# CONFIG_WORKQUEUE_TRACER is not set
1288# CONFIG_BLK_DEV_IO_TRACE is not set
1289# CONFIG_SAMPLES is not set 1304# CONFIG_SAMPLES is not set
1290CONFIG_HAVE_ARCH_KGDB=y 1305CONFIG_HAVE_ARCH_KGDB=y
1306# CONFIG_PPC_DISABLE_WERROR is not set
1307CONFIG_PPC_WERROR=y
1291CONFIG_PRINT_STACK_DEPTH=64 1308CONFIG_PRINT_STACK_DEPTH=64
1292# CONFIG_IRQSTACKS is not set 1309# CONFIG_IRQSTACKS is not set
1293# CONFIG_BOOTX_TEXT is not set 1310# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig b/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig
index 7f1d1383a24..ff31667a890 100644
--- a/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig
+++ b/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:13 2009 4# Wed Jul 29 23:32:12 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_FSL_EMB_PERFMON is not set 20# CONFIG_FSL_EMB_PERFMON is not set
20# CONFIG_ALTIVEC is not set 21# CONFIG_ALTIVEC is not set
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24# CONFIG_SMP is not set 26# CONFIG_SMP is not set
25CONFIG_PPC32=y 27CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32 28CONFIG_WORD_SIZE=32
@@ -31,15 +33,16 @@ CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y 33CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y 34CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y 35CONFIG_GENERIC_HARDIRQS=y
36CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y 38CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y 39CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y 40CONFIG_HAVE_LATENCYTOP_SUPPORT=y
41CONFIG_TRACE_IRQFLAGS_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y 42CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y 43CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y 44CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y 45CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y 46CONFIG_GENERIC_FIND_NEXT_BIT=y
44CONFIG_GENERIC_GPIO=y 47CONFIG_GENERIC_GPIO=y
45# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -54,12 +57,14 @@ CONFIG_PPC_UDBG_16550=y
54# CONFIG_GENERIC_TBSYNC is not set 57# CONFIG_GENERIC_TBSYNC is not set
55CONFIG_AUDIT_ARCH=y 58CONFIG_AUDIT_ARCH=y
56CONFIG_GENERIC_BUG=y 59CONFIG_GENERIC_BUG=y
60CONFIG_DTC=y
57CONFIG_DEFAULT_UIMAGE=y 61CONFIG_DEFAULT_UIMAGE=y
58CONFIG_ARCH_SUSPEND_POSSIBLE=y 62CONFIG_ARCH_SUSPEND_POSSIBLE=y
59# CONFIG_PPC_DCR_NATIVE is not set 63# CONFIG_PPC_DCR_NATIVE is not set
60# CONFIG_PPC_DCR_MMIO is not set 64# CONFIG_PPC_DCR_MMIO is not set
61CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 65CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
62CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 66CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
67CONFIG_CONSTRUCTORS=y
63 68
64# 69#
65# General setup 70# General setup
@@ -108,7 +113,6 @@ CONFIG_ANON_INODES=y
108CONFIG_EMBEDDED=y 113CONFIG_EMBEDDED=y
109CONFIG_SYSCTL_SYSCALL=y 114CONFIG_SYSCTL_SYSCALL=y
110# CONFIG_KALLSYMS is not set 115# CONFIG_KALLSYMS is not set
111# CONFIG_STRIP_ASM_SYMS is not set
112CONFIG_HOTPLUG=y 116CONFIG_HOTPLUG=y
113CONFIG_PRINTK=y 117CONFIG_PRINTK=y
114CONFIG_BUG=y 118CONFIG_BUG=y
@@ -121,9 +125,16 @@ CONFIG_TIMERFD=y
121CONFIG_EVENTFD=y 125CONFIG_EVENTFD=y
122CONFIG_SHMEM=y 126CONFIG_SHMEM=y
123CONFIG_AIO=y 127CONFIG_AIO=y
128CONFIG_HAVE_PERF_COUNTERS=y
129
130#
131# Performance Counters
132#
133# CONFIG_PERF_COUNTERS is not set
124CONFIG_VM_EVENT_COUNTERS=y 134CONFIG_VM_EVENT_COUNTERS=y
125CONFIG_PCI_QUIRKS=y 135CONFIG_PCI_QUIRKS=y
126CONFIG_SLUB_DEBUG=y 136CONFIG_SLUB_DEBUG=y
137# CONFIG_STRIP_ASM_SYMS is not set
127CONFIG_COMPAT_BRK=y 138CONFIG_COMPAT_BRK=y
128# CONFIG_SLAB is not set 139# CONFIG_SLAB is not set
129CONFIG_SLUB=y 140CONFIG_SLUB=y
@@ -136,6 +147,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
136CONFIG_HAVE_KPROBES=y 147CONFIG_HAVE_KPROBES=y
137CONFIG_HAVE_KRETPROBES=y 148CONFIG_HAVE_KRETPROBES=y
138CONFIG_HAVE_ARCH_TRACEHOOK=y 149CONFIG_HAVE_ARCH_TRACEHOOK=y
150
151#
152# GCOV-based kernel profiling
153#
139# CONFIG_SLOW_WORK is not set 154# CONFIG_SLOW_WORK is not set
140# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 155# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
141CONFIG_SLABINFO=y 156CONFIG_SLABINFO=y
@@ -148,7 +163,7 @@ CONFIG_MODULE_UNLOAD=y
148# CONFIG_MODVERSIONS is not set 163# CONFIG_MODVERSIONS is not set
149# CONFIG_MODULE_SRCVERSION_ALL is not set 164# CONFIG_MODULE_SRCVERSION_ALL is not set
150CONFIG_BLOCK=y 165CONFIG_BLOCK=y
151# CONFIG_LBD is not set 166CONFIG_LBDAF=y
152# CONFIG_BLK_DEV_BSG is not set 167# CONFIG_BLK_DEV_BSG is not set
153# CONFIG_BLK_DEV_INTEGRITY is not set 168# CONFIG_BLK_DEV_INTEGRITY is not set
154 169
@@ -190,6 +205,7 @@ CONFIG_MPC836x_RDK=y
190# CONFIG_MPC837x_RDB is not set 205# CONFIG_MPC837x_RDB is not set
191# CONFIG_SBC834x is not set 206# CONFIG_SBC834x is not set
192# CONFIG_ASP834x is not set 207# CONFIG_ASP834x is not set
208# CONFIG_KMETER1 is not set
193# CONFIG_PPC_86xx is not set 209# CONFIG_PPC_86xx is not set
194# CONFIG_EMBEDDED6xx is not set 210# CONFIG_EMBEDDED6xx is not set
195# CONFIG_AMIGAONE is not set 211# CONFIG_AMIGAONE is not set
@@ -233,6 +249,7 @@ CONFIG_BINFMT_ELF=y
233# CONFIG_HAVE_AOUT is not set 249# CONFIG_HAVE_AOUT is not set
234# CONFIG_BINFMT_MISC is not set 250# CONFIG_BINFMT_MISC is not set
235# CONFIG_IOMMU_HELPER is not set 251# CONFIG_IOMMU_HELPER is not set
252# CONFIG_SWIOTLB is not set
236CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 253CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
237CONFIG_ARCH_HAS_WALK_MEMORY=y 254CONFIG_ARCH_HAS_WALK_MEMORY=y
238CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 255CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -253,9 +270,9 @@ CONFIG_MIGRATION=y
253CONFIG_ZONE_DMA_FLAG=1 270CONFIG_ZONE_DMA_FLAG=1
254CONFIG_BOUNCE=y 271CONFIG_BOUNCE=y
255CONFIG_VIRT_TO_BUS=y 272CONFIG_VIRT_TO_BUS=y
256CONFIG_UNEVICTABLE_LRU=y
257CONFIG_HAVE_MLOCK=y 273CONFIG_HAVE_MLOCK=y
258CONFIG_HAVE_MLOCKED_PAGE_BIT=y 274CONFIG_HAVE_MLOCKED_PAGE_BIT=y
275CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
259CONFIG_PPC_4K_PAGES=y 276CONFIG_PPC_4K_PAGES=y
260# CONFIG_PPC_16K_PAGES is not set 277# CONFIG_PPC_16K_PAGES is not set
261# CONFIG_PPC_64K_PAGES is not set 278# CONFIG_PPC_64K_PAGES is not set
@@ -366,6 +383,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
366# CONFIG_ECONET is not set 383# CONFIG_ECONET is not set
367# CONFIG_WAN_ROUTER is not set 384# CONFIG_WAN_ROUTER is not set
368# CONFIG_PHONET is not set 385# CONFIG_PHONET is not set
386# CONFIG_IEEE802154 is not set
369# CONFIG_NET_SCHED is not set 387# CONFIG_NET_SCHED is not set
370# CONFIG_DCB is not set 388# CONFIG_DCB is not set
371 389
@@ -383,7 +401,11 @@ CONFIG_WIRELESS=y
383CONFIG_WIRELESS_OLD_REGULATORY=y 401CONFIG_WIRELESS_OLD_REGULATORY=y
384# CONFIG_WIRELESS_EXT is not set 402# CONFIG_WIRELESS_EXT is not set
385# CONFIG_LIB80211 is not set 403# CONFIG_LIB80211 is not set
386# CONFIG_MAC80211 is not set 404
405#
406# CFG80211 needs to be enabled for MAC80211
407#
408CONFIG_MAC80211_DEFAULT_PS_VALUE=0
387# CONFIG_WIMAX is not set 409# CONFIG_WIMAX is not set
388# CONFIG_RFKILL is not set 410# CONFIG_RFKILL is not set
389# CONFIG_NET_9P is not set 411# CONFIG_NET_9P is not set
@@ -498,6 +520,7 @@ CONFIG_OF_DEVICE=y
498CONFIG_OF_GPIO=y 520CONFIG_OF_GPIO=y
499CONFIG_OF_I2C=y 521CONFIG_OF_I2C=y
500CONFIG_OF_SPI=y 522CONFIG_OF_SPI=y
523CONFIG_OF_MDIO=y
501# CONFIG_PARPORT is not set 524# CONFIG_PARPORT is not set
502CONFIG_BLK_DEV=y 525CONFIG_BLK_DEV=y
503# CONFIG_BLK_DEV_FD is not set 526# CONFIG_BLK_DEV_FD is not set
@@ -533,7 +556,9 @@ CONFIG_MISC_DEVICES=y
533# CONFIG_EEPROM_AT24 is not set 556# CONFIG_EEPROM_AT24 is not set
534# CONFIG_EEPROM_AT25 is not set 557# CONFIG_EEPROM_AT25 is not set
535# CONFIG_EEPROM_LEGACY is not set 558# CONFIG_EEPROM_LEGACY is not set
559# CONFIG_EEPROM_MAX6875 is not set
536# CONFIG_EEPROM_93CX6 is not set 560# CONFIG_EEPROM_93CX6 is not set
561# CONFIG_CB710_CORE is not set
537CONFIG_HAVE_IDE=y 562CONFIG_HAVE_IDE=y
538# CONFIG_IDE is not set 563# CONFIG_IDE is not set
539 564
@@ -553,14 +578,17 @@ CONFIG_HAVE_IDE=y
553# 578#
554 579
555# 580#
556# Enable only one of the two stacks, unless you know what you are doing 581# You can enable one or both FireWire driver stacks.
582#
583
584#
585# See the help texts for more information.
557# 586#
558# CONFIG_FIREWIRE is not set 587# CONFIG_FIREWIRE is not set
559# CONFIG_IEEE1394 is not set 588# CONFIG_IEEE1394 is not set
560# CONFIG_I2O is not set 589# CONFIG_I2O is not set
561# CONFIG_MACINTOSH_DRIVERS is not set 590# CONFIG_MACINTOSH_DRIVERS is not set
562CONFIG_NETDEVICES=y 591CONFIG_NETDEVICES=y
563CONFIG_COMPAT_NET_DEV_OPS=y
564# CONFIG_DUMMY is not set 592# CONFIG_DUMMY is not set
565# CONFIG_BONDING is not set 593# CONFIG_BONDING is not set
566# CONFIG_MACVLAN is not set 594# CONFIG_MACVLAN is not set
@@ -607,11 +635,13 @@ CONFIG_NETDEV_1000=y
607# CONFIG_VIA_VELOCITY is not set 635# CONFIG_VIA_VELOCITY is not set
608# CONFIG_TIGON3 is not set 636# CONFIG_TIGON3 is not set
609# CONFIG_BNX2 is not set 637# CONFIG_BNX2 is not set
638# CONFIG_CNIC is not set
610CONFIG_FSL_PQ_MDIO=y 639CONFIG_FSL_PQ_MDIO=y
611# CONFIG_GIANFAR is not set 640# CONFIG_GIANFAR is not set
612CONFIG_UCC_GETH=y 641CONFIG_UCC_GETH=y
613# CONFIG_UGETH_MAGIC_PACKET is not set 642# CONFIG_UGETH_MAGIC_PACKET is not set
614# CONFIG_UGETH_TX_ON_DEMAND is not set 643# CONFIG_UGETH_TX_ON_DEMAND is not set
644# CONFIG_MV643XX_ETH is not set
615# CONFIG_QLA3XXX is not set 645# CONFIG_QLA3XXX is not set
616# CONFIG_ATL1 is not set 646# CONFIG_ATL1 is not set
617# CONFIG_ATL1E is not set 647# CONFIG_ATL1E is not set
@@ -777,7 +807,6 @@ CONFIG_I2C_MPC=y
777# CONFIG_SENSORS_PCF8574 is not set 807# CONFIG_SENSORS_PCF8574 is not set
778# CONFIG_PCF8575 is not set 808# CONFIG_PCF8575 is not set
779# CONFIG_SENSORS_PCA9539 is not set 809# CONFIG_SENSORS_PCA9539 is not set
780# CONFIG_SENSORS_MAX6875 is not set
781# CONFIG_SENSORS_TSL2550 is not set 810# CONFIG_SENSORS_TSL2550 is not set
782# CONFIG_I2C_DEBUG_CORE is not set 811# CONFIG_I2C_DEBUG_CORE is not set
783# CONFIG_I2C_DEBUG_ALGO is not set 812# CONFIG_I2C_DEBUG_ALGO is not set
@@ -791,13 +820,18 @@ CONFIG_SPI_MASTER=y
791# 820#
792CONFIG_SPI_BITBANG=y 821CONFIG_SPI_BITBANG=y
793# CONFIG_SPI_GPIO is not set 822# CONFIG_SPI_GPIO is not set
794CONFIG_SPI_MPC83xx=y 823# CONFIG_SPI_MPC8xxx is not set
795 824
796# 825#
797# SPI Protocol Masters 826# SPI Protocol Masters
798# 827#
799CONFIG_SPI_SPIDEV=y 828CONFIG_SPI_SPIDEV=y
800# CONFIG_SPI_TLE62X0 is not set 829# CONFIG_SPI_TLE62X0 is not set
830
831#
832# PPS support
833#
834# CONFIG_PPS is not set
801CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 835CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
802CONFIG_ARCH_REQUIRE_GPIOLIB=y 836CONFIG_ARCH_REQUIRE_GPIOLIB=y
803CONFIG_GPIOLIB=y 837CONFIG_GPIOLIB=y
@@ -865,23 +899,10 @@ CONFIG_SSB_POSSIBLE=y
865# CONFIG_MFD_WM8400 is not set 899# CONFIG_MFD_WM8400 is not set
866# CONFIG_MFD_WM8350_I2C is not set 900# CONFIG_MFD_WM8350_I2C is not set
867# CONFIG_MFD_PCF50633 is not set 901# CONFIG_MFD_PCF50633 is not set
902# CONFIG_AB3100_CORE is not set
903# CONFIG_EZX_PCAP is not set
868# CONFIG_REGULATOR is not set 904# CONFIG_REGULATOR is not set
869 905# CONFIG_MEDIA_SUPPORT is not set
870#
871# Multimedia devices
872#
873
874#
875# Multimedia core support
876#
877# CONFIG_VIDEO_DEV is not set
878# CONFIG_DVB_CORE is not set
879# CONFIG_VIDEO_MEDIA is not set
880
881#
882# Multimedia drivers
883#
884CONFIG_DAB=y
885 906
886# 907#
887# Graphics support 908# Graphics support
@@ -990,6 +1011,10 @@ CONFIG_HID=y
990# CONFIG_DMADEVICES is not set 1011# CONFIG_DMADEVICES is not set
991# CONFIG_AUXDISPLAY is not set 1012# CONFIG_AUXDISPLAY is not set
992# CONFIG_UIO is not set 1013# CONFIG_UIO is not set
1014
1015#
1016# TI VLYNQ
1017#
993# CONFIG_STAGING is not set 1018# CONFIG_STAGING is not set
994 1019
995# 1020#
@@ -1009,10 +1034,12 @@ CONFIG_FS_MBCACHE=y
1009# CONFIG_REISERFS_FS is not set 1034# CONFIG_REISERFS_FS is not set
1010# CONFIG_JFS_FS is not set 1035# CONFIG_JFS_FS is not set
1011# CONFIG_FS_POSIX_ACL is not set 1036# CONFIG_FS_POSIX_ACL is not set
1012CONFIG_FILE_LOCKING=y
1013# CONFIG_XFS_FS is not set 1037# CONFIG_XFS_FS is not set
1038# CONFIG_GFS2_FS is not set
1014# CONFIG_OCFS2_FS is not set 1039# CONFIG_OCFS2_FS is not set
1015# CONFIG_BTRFS_FS is not set 1040# CONFIG_BTRFS_FS is not set
1041CONFIG_FILE_LOCKING=y
1042CONFIG_FSNOTIFY=y
1016CONFIG_DNOTIFY=y 1043CONFIG_DNOTIFY=y
1017CONFIG_INOTIFY=y 1044CONFIG_INOTIFY=y
1018CONFIG_INOTIFY_USER=y 1045CONFIG_INOTIFY_USER=y
@@ -1086,6 +1113,7 @@ CONFIG_NFS_FS=y
1086CONFIG_NFS_V3=y 1113CONFIG_NFS_V3=y
1087# CONFIG_NFS_V3_ACL is not set 1114# CONFIG_NFS_V3_ACL is not set
1088CONFIG_NFS_V4=y 1115CONFIG_NFS_V4=y
1116# CONFIG_NFS_V4_1 is not set
1089CONFIG_ROOT_NFS=y 1117CONFIG_ROOT_NFS=y
1090# CONFIG_NFSD is not set 1118# CONFIG_NFSD is not set
1091CONFIG_LOCKD=y 1119CONFIG_LOCKD=y
@@ -1145,6 +1173,7 @@ CONFIG_HAS_IOPORT=y
1145CONFIG_HAS_DMA=y 1173CONFIG_HAS_DMA=y
1146CONFIG_HAVE_LMB=y 1174CONFIG_HAVE_LMB=y
1147CONFIG_NLATTR=y 1175CONFIG_NLATTR=y
1176CONFIG_GENERIC_ATOMIC64=y
1148 1177
1149# 1178#
1150# Kernel hacking 1179# Kernel hacking
@@ -1170,22 +1199,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1170CONFIG_HAVE_DYNAMIC_FTRACE=y 1199CONFIG_HAVE_DYNAMIC_FTRACE=y
1171CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1200CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1172CONFIG_TRACING_SUPPORT=y 1201CONFIG_TRACING_SUPPORT=y
1173 1202# CONFIG_FTRACE is not set
1174#
1175# Tracers
1176#
1177# CONFIG_FUNCTION_TRACER is not set
1178# CONFIG_SCHED_TRACER is not set
1179# CONFIG_CONTEXT_SWITCH_TRACER is not set
1180# CONFIG_EVENT_TRACER is not set
1181# CONFIG_BOOT_TRACER is not set
1182# CONFIG_TRACE_BRANCH_PROFILING is not set
1183# CONFIG_STACK_TRACER is not set
1184# CONFIG_KMEMTRACE is not set
1185# CONFIG_WORKQUEUE_TRACER is not set
1186# CONFIG_BLK_DEV_IO_TRACE is not set
1187# CONFIG_SAMPLES is not set 1203# CONFIG_SAMPLES is not set
1188CONFIG_HAVE_ARCH_KGDB=y 1204CONFIG_HAVE_ARCH_KGDB=y
1205# CONFIG_PPC_DISABLE_WERROR is not set
1206CONFIG_PPC_WERROR=y
1189CONFIG_PRINT_STACK_DEPTH=64 1207CONFIG_PRINT_STACK_DEPTH=64
1190# CONFIG_IRQSTACKS is not set 1208# CONFIG_IRQSTACKS is not set
1191# CONFIG_BOOTX_TEXT is not set 1209# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/83xx/mpc837x_mds_defconfig b/arch/powerpc/configs/83xx/mpc837x_mds_defconfig
index bf636fd560a..e285ec0fe95 100644
--- a/arch/powerpc/configs/83xx/mpc837x_mds_defconfig
+++ b/arch/powerpc/configs/83xx/mpc837x_mds_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:12 2009 4# Wed Jul 29 23:32:11 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_FSL_EMB_PERFMON is not set 20# CONFIG_FSL_EMB_PERFMON is not set
20# CONFIG_ALTIVEC is not set 21# CONFIG_ALTIVEC is not set
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24# CONFIG_SMP is not set 26# CONFIG_SMP is not set
25CONFIG_PPC32=y 27CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32 28CONFIG_WORD_SIZE=32
@@ -31,15 +33,16 @@ CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y 33CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y 34CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y 35CONFIG_GENERIC_HARDIRQS=y
36CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y 38CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y 39CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y 40CONFIG_HAVE_LATENCYTOP_SUPPORT=y
41CONFIG_TRACE_IRQFLAGS_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y 42CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y 43CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y 44CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y 45CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y 46CONFIG_GENERIC_FIND_NEXT_BIT=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
45CONFIG_PPC=y 48CONFIG_PPC=y
@@ -53,12 +56,14 @@ CONFIG_PPC_UDBG_16550=y
53# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
56CONFIG_DEFAULT_UIMAGE=y 60CONFIG_DEFAULT_UIMAGE=y
57CONFIG_ARCH_SUSPEND_POSSIBLE=y 61CONFIG_ARCH_SUSPEND_POSSIBLE=y
58# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
59# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
60CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
61CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
62 67
63# 68#
64# General setup 69# General setup
@@ -108,7 +113,6 @@ CONFIG_EMBEDDED=y
108CONFIG_SYSCTL_SYSCALL=y 113CONFIG_SYSCTL_SYSCALL=y
109CONFIG_KALLSYMS=y 114CONFIG_KALLSYMS=y
110# CONFIG_KALLSYMS_EXTRA_PASS is not set 115# CONFIG_KALLSYMS_EXTRA_PASS is not set
111# CONFIG_STRIP_ASM_SYMS is not set
112CONFIG_HOTPLUG=y 116CONFIG_HOTPLUG=y
113CONFIG_PRINTK=y 117CONFIG_PRINTK=y
114CONFIG_BUG=y 118CONFIG_BUG=y
@@ -121,8 +125,15 @@ CONFIG_TIMERFD=y
121CONFIG_EVENTFD=y 125CONFIG_EVENTFD=y
122CONFIG_SHMEM=y 126CONFIG_SHMEM=y
123CONFIG_AIO=y 127CONFIG_AIO=y
128CONFIG_HAVE_PERF_COUNTERS=y
129
130#
131# Performance Counters
132#
133# CONFIG_PERF_COUNTERS is not set
124CONFIG_VM_EVENT_COUNTERS=y 134CONFIG_VM_EVENT_COUNTERS=y
125CONFIG_PCI_QUIRKS=y 135CONFIG_PCI_QUIRKS=y
136# CONFIG_STRIP_ASM_SYMS is not set
126CONFIG_COMPAT_BRK=y 137CONFIG_COMPAT_BRK=y
127CONFIG_SLAB=y 138CONFIG_SLAB=y
128# CONFIG_SLUB is not set 139# CONFIG_SLUB is not set
@@ -136,6 +147,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
136CONFIG_HAVE_KPROBES=y 147CONFIG_HAVE_KPROBES=y
137CONFIG_HAVE_KRETPROBES=y 148CONFIG_HAVE_KRETPROBES=y
138CONFIG_HAVE_ARCH_TRACEHOOK=y 149CONFIG_HAVE_ARCH_TRACEHOOK=y
150
151#
152# GCOV-based kernel profiling
153#
139# CONFIG_SLOW_WORK is not set 154# CONFIG_SLOW_WORK is not set
140# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 155# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
141CONFIG_SLABINFO=y 156CONFIG_SLABINFO=y
@@ -148,7 +163,7 @@ CONFIG_MODULE_UNLOAD=y
148# CONFIG_MODVERSIONS is not set 163# CONFIG_MODVERSIONS is not set
149# CONFIG_MODULE_SRCVERSION_ALL is not set 164# CONFIG_MODULE_SRCVERSION_ALL is not set
150CONFIG_BLOCK=y 165CONFIG_BLOCK=y
151# CONFIG_LBD is not set 166CONFIG_LBDAF=y
152# CONFIG_BLK_DEV_BSG is not set 167# CONFIG_BLK_DEV_BSG is not set
153# CONFIG_BLK_DEV_INTEGRITY is not set 168# CONFIG_BLK_DEV_INTEGRITY is not set
154 169
@@ -190,6 +205,7 @@ CONFIG_MPC837x_MDS=y
190# CONFIG_MPC837x_RDB is not set 205# CONFIG_MPC837x_RDB is not set
191# CONFIG_SBC834x is not set 206# CONFIG_SBC834x is not set
192# CONFIG_ASP834x is not set 207# CONFIG_ASP834x is not set
208# CONFIG_KMETER1 is not set
193CONFIG_PPC_MPC837x=y 209CONFIG_PPC_MPC837x=y
194# CONFIG_PPC_86xx is not set 210# CONFIG_PPC_86xx is not set
195# CONFIG_EMBEDDED6xx is not set 211# CONFIG_EMBEDDED6xx is not set
@@ -234,6 +250,7 @@ CONFIG_BINFMT_ELF=y
234# CONFIG_HAVE_AOUT is not set 250# CONFIG_HAVE_AOUT is not set
235# CONFIG_BINFMT_MISC is not set 251# CONFIG_BINFMT_MISC is not set
236# CONFIG_IOMMU_HELPER is not set 252# CONFIG_IOMMU_HELPER is not set
253# CONFIG_SWIOTLB is not set
237CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 254CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
238CONFIG_ARCH_HAS_WALK_MEMORY=y 255CONFIG_ARCH_HAS_WALK_MEMORY=y
239CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 256CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -254,9 +271,9 @@ CONFIG_MIGRATION=y
254CONFIG_ZONE_DMA_FLAG=1 271CONFIG_ZONE_DMA_FLAG=1
255CONFIG_BOUNCE=y 272CONFIG_BOUNCE=y
256CONFIG_VIRT_TO_BUS=y 273CONFIG_VIRT_TO_BUS=y
257CONFIG_UNEVICTABLE_LRU=y
258CONFIG_HAVE_MLOCK=y 274CONFIG_HAVE_MLOCK=y
259CONFIG_HAVE_MLOCKED_PAGE_BIT=y 275CONFIG_HAVE_MLOCKED_PAGE_BIT=y
276CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
260CONFIG_PPC_4K_PAGES=y 277CONFIG_PPC_4K_PAGES=y
261# CONFIG_PPC_16K_PAGES is not set 278# CONFIG_PPC_16K_PAGES is not set
262# CONFIG_PPC_64K_PAGES is not set 279# CONFIG_PPC_64K_PAGES is not set
@@ -365,6 +382,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
365# CONFIG_ECONET is not set 382# CONFIG_ECONET is not set
366# CONFIG_WAN_ROUTER is not set 383# CONFIG_WAN_ROUTER is not set
367# CONFIG_PHONET is not set 384# CONFIG_PHONET is not set
385# CONFIG_IEEE802154 is not set
368# CONFIG_NET_SCHED is not set 386# CONFIG_NET_SCHED is not set
369# CONFIG_DCB is not set 387# CONFIG_DCB is not set
370 388
@@ -382,7 +400,11 @@ CONFIG_WIRELESS=y
382CONFIG_WIRELESS_OLD_REGULATORY=y 400CONFIG_WIRELESS_OLD_REGULATORY=y
383# CONFIG_WIRELESS_EXT is not set 401# CONFIG_WIRELESS_EXT is not set
384# CONFIG_LIB80211 is not set 402# CONFIG_LIB80211 is not set
385# CONFIG_MAC80211 is not set 403
404#
405# CFG80211 needs to be enabled for MAC80211
406#
407CONFIG_MAC80211_DEFAULT_PS_VALUE=0
386# CONFIG_WIMAX is not set 408# CONFIG_WIMAX is not set
387# CONFIG_RFKILL is not set 409# CONFIG_RFKILL is not set
388# CONFIG_NET_9P is not set 410# CONFIG_NET_9P is not set
@@ -403,6 +425,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
403# CONFIG_MTD is not set 425# CONFIG_MTD is not set
404CONFIG_OF_DEVICE=y 426CONFIG_OF_DEVICE=y
405CONFIG_OF_I2C=y 427CONFIG_OF_I2C=y
428CONFIG_OF_MDIO=y
406# CONFIG_PARPORT is not set 429# CONFIG_PARPORT is not set
407CONFIG_BLK_DEV=y 430CONFIG_BLK_DEV=y
408# CONFIG_BLK_DEV_FD is not set 431# CONFIG_BLK_DEV_FD is not set
@@ -437,7 +460,9 @@ CONFIG_MISC_DEVICES=y
437# 460#
438# CONFIG_EEPROM_AT24 is not set 461# CONFIG_EEPROM_AT24 is not set
439# CONFIG_EEPROM_LEGACY is not set 462# CONFIG_EEPROM_LEGACY is not set
463# CONFIG_EEPROM_MAX6875 is not set
440# CONFIG_EEPROM_93CX6 is not set 464# CONFIG_EEPROM_93CX6 is not set
465# CONFIG_CB710_CORE is not set
441CONFIG_HAVE_IDE=y 466CONFIG_HAVE_IDE=y
442# CONFIG_IDE is not set 467# CONFIG_IDE is not set
443 468
@@ -460,10 +485,6 @@ CONFIG_BLK_DEV_SD=y
460# CONFIG_BLK_DEV_SR is not set 485# CONFIG_BLK_DEV_SR is not set
461CONFIG_CHR_DEV_SG=y 486CONFIG_CHR_DEV_SG=y
462# CONFIG_CHR_DEV_SCH is not set 487# CONFIG_CHR_DEV_SCH is not set
463
464#
465# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
466#
467# CONFIG_SCSI_MULTI_LUN is not set 488# CONFIG_SCSI_MULTI_LUN is not set
468# CONFIG_SCSI_CONSTANTS is not set 489# CONFIG_SCSI_CONSTANTS is not set
469# CONFIG_SCSI_LOGGING is not set 490# CONFIG_SCSI_LOGGING is not set
@@ -481,6 +502,7 @@ CONFIG_SCSI_WAIT_SCAN=m
481CONFIG_SCSI_LOWLEVEL=y 502CONFIG_SCSI_LOWLEVEL=y
482# CONFIG_ISCSI_TCP is not set 503# CONFIG_ISCSI_TCP is not set
483# CONFIG_SCSI_CXGB3_ISCSI is not set 504# CONFIG_SCSI_CXGB3_ISCSI is not set
505# CONFIG_SCSI_BNX2_ISCSI is not set
484# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 506# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
485# CONFIG_SCSI_3W_9XXX is not set 507# CONFIG_SCSI_3W_9XXX is not set
486# CONFIG_SCSI_ACARD is not set 508# CONFIG_SCSI_ACARD is not set
@@ -489,6 +511,7 @@ CONFIG_SCSI_LOWLEVEL=y
489# CONFIG_SCSI_AIC7XXX_OLD is not set 511# CONFIG_SCSI_AIC7XXX_OLD is not set
490# CONFIG_SCSI_AIC79XX is not set 512# CONFIG_SCSI_AIC79XX is not set
491# CONFIG_SCSI_AIC94XX is not set 513# CONFIG_SCSI_AIC94XX is not set
514# CONFIG_SCSI_MVSAS is not set
492# CONFIG_SCSI_DPT_I2O is not set 515# CONFIG_SCSI_DPT_I2O is not set
493# CONFIG_SCSI_ADVANSYS is not set 516# CONFIG_SCSI_ADVANSYS is not set
494# CONFIG_SCSI_ARCMSR is not set 517# CONFIG_SCSI_ARCMSR is not set
@@ -508,7 +531,6 @@ CONFIG_SCSI_LOWLEVEL=y
508# CONFIG_SCSI_IPS is not set 531# CONFIG_SCSI_IPS is not set
509# CONFIG_SCSI_INITIO is not set 532# CONFIG_SCSI_INITIO is not set
510# CONFIG_SCSI_INIA100 is not set 533# CONFIG_SCSI_INIA100 is not set
511# CONFIG_SCSI_MVSAS is not set
512# CONFIG_SCSI_STEX is not set 534# CONFIG_SCSI_STEX is not set
513# CONFIG_SCSI_SYM53C8XX_2 is not set 535# CONFIG_SCSI_SYM53C8XX_2 is not set
514# CONFIG_SCSI_IPR is not set 536# CONFIG_SCSI_IPR is not set
@@ -592,14 +614,17 @@ CONFIG_ATA_SFF=y
592# 614#
593 615
594# 616#
595# Enable only one of the two stacks, unless you know what you are doing 617# You can enable one or both FireWire driver stacks.
618#
619
620#
621# See the help texts for more information.
596# 622#
597# CONFIG_FIREWIRE is not set 623# CONFIG_FIREWIRE is not set
598# CONFIG_IEEE1394 is not set 624# CONFIG_IEEE1394 is not set
599# CONFIG_I2O is not set 625# CONFIG_I2O is not set
600# CONFIG_MACINTOSH_DRIVERS is not set 626# CONFIG_MACINTOSH_DRIVERS is not set
601CONFIG_NETDEVICES=y 627CONFIG_NETDEVICES=y
602CONFIG_COMPAT_NET_DEV_OPS=y
603# CONFIG_DUMMY is not set 628# CONFIG_DUMMY is not set
604# CONFIG_BONDING is not set 629# CONFIG_BONDING is not set
605# CONFIG_MACVLAN is not set 630# CONFIG_MACVLAN is not set
@@ -646,6 +671,7 @@ CONFIG_MII=y
646# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 671# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
647# CONFIG_NET_PCI is not set 672# CONFIG_NET_PCI is not set
648# CONFIG_B44 is not set 673# CONFIG_B44 is not set
674# CONFIG_KS8842 is not set
649# CONFIG_ATL2 is not set 675# CONFIG_ATL2 is not set
650CONFIG_NETDEV_1000=y 676CONFIG_NETDEV_1000=y
651# CONFIG_ACENIC is not set 677# CONFIG_ACENIC is not set
@@ -665,8 +691,10 @@ CONFIG_NETDEV_1000=y
665# CONFIG_VIA_VELOCITY is not set 691# CONFIG_VIA_VELOCITY is not set
666# CONFIG_TIGON3 is not set 692# CONFIG_TIGON3 is not set
667# CONFIG_BNX2 is not set 693# CONFIG_BNX2 is not set
694# CONFIG_CNIC is not set
668CONFIG_FSL_PQ_MDIO=y 695CONFIG_FSL_PQ_MDIO=y
669CONFIG_GIANFAR=y 696CONFIG_GIANFAR=y
697# CONFIG_MV643XX_ETH is not set
670# CONFIG_QLA3XXX is not set 698# CONFIG_QLA3XXX is not set
671# CONFIG_ATL1 is not set 699# CONFIG_ATL1 is not set
672# CONFIG_ATL1E is not set 700# CONFIG_ATL1E is not set
@@ -844,13 +872,17 @@ CONFIG_I2C_MPC=y
844# CONFIG_SENSORS_PCF8574 is not set 872# CONFIG_SENSORS_PCF8574 is not set
845# CONFIG_PCF8575 is not set 873# CONFIG_PCF8575 is not set
846# CONFIG_SENSORS_PCA9539 is not set 874# CONFIG_SENSORS_PCA9539 is not set
847# CONFIG_SENSORS_MAX6875 is not set
848# CONFIG_SENSORS_TSL2550 is not set 875# CONFIG_SENSORS_TSL2550 is not set
849# CONFIG_I2C_DEBUG_CORE is not set 876# CONFIG_I2C_DEBUG_CORE is not set
850# CONFIG_I2C_DEBUG_ALGO is not set 877# CONFIG_I2C_DEBUG_ALGO is not set
851# CONFIG_I2C_DEBUG_BUS is not set 878# CONFIG_I2C_DEBUG_BUS is not set
852# CONFIG_I2C_DEBUG_CHIP is not set 879# CONFIG_I2C_DEBUG_CHIP is not set
853# CONFIG_SPI is not set 880# CONFIG_SPI is not set
881
882#
883# PPS support
884#
885# CONFIG_PPS is not set
854CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 886CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
855# CONFIG_GPIOLIB is not set 887# CONFIG_GPIOLIB is not set
856# CONFIG_W1 is not set 888# CONFIG_W1 is not set
@@ -905,6 +937,7 @@ CONFIG_HWMON=y
905# CONFIG_SENSORS_SMSC47B397 is not set 937# CONFIG_SENSORS_SMSC47B397 is not set
906# CONFIG_SENSORS_ADS7828 is not set 938# CONFIG_SENSORS_ADS7828 is not set
907# CONFIG_SENSORS_THMC50 is not set 939# CONFIG_SENSORS_THMC50 is not set
940# CONFIG_SENSORS_TMP401 is not set
908# CONFIG_SENSORS_VIA686A is not set 941# CONFIG_SENSORS_VIA686A is not set
909# CONFIG_SENSORS_VT1211 is not set 942# CONFIG_SENSORS_VT1211 is not set
910# CONFIG_SENSORS_VT8231 is not set 943# CONFIG_SENSORS_VT8231 is not set
@@ -953,23 +986,9 @@ CONFIG_SSB_POSSIBLE=y
953# CONFIG_MFD_WM8400 is not set 986# CONFIG_MFD_WM8400 is not set
954# CONFIG_MFD_WM8350_I2C is not set 987# CONFIG_MFD_WM8350_I2C is not set
955# CONFIG_MFD_PCF50633 is not set 988# CONFIG_MFD_PCF50633 is not set
989# CONFIG_AB3100_CORE is not set
956# CONFIG_REGULATOR is not set 990# CONFIG_REGULATOR is not set
957 991# CONFIG_MEDIA_SUPPORT is not set
958#
959# Multimedia devices
960#
961
962#
963# Multimedia core support
964#
965# CONFIG_VIDEO_DEV is not set
966# CONFIG_DVB_CORE is not set
967# CONFIG_VIDEO_MEDIA is not set
968
969#
970# Multimedia drivers
971#
972CONFIG_DAB=y
973 992
974# 993#
975# Graphics support 994# Graphics support
@@ -1026,6 +1045,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1026# CONFIG_DMADEVICES is not set 1045# CONFIG_DMADEVICES is not set
1027# CONFIG_AUXDISPLAY is not set 1046# CONFIG_AUXDISPLAY is not set
1028# CONFIG_UIO is not set 1047# CONFIG_UIO is not set
1048
1049#
1050# TI VLYNQ
1051#
1029# CONFIG_STAGING is not set 1052# CONFIG_STAGING is not set
1030 1053
1031# 1054#
@@ -1045,10 +1068,12 @@ CONFIG_FS_MBCACHE=y
1045# CONFIG_REISERFS_FS is not set 1068# CONFIG_REISERFS_FS is not set
1046# CONFIG_JFS_FS is not set 1069# CONFIG_JFS_FS is not set
1047# CONFIG_FS_POSIX_ACL is not set 1070# CONFIG_FS_POSIX_ACL is not set
1048CONFIG_FILE_LOCKING=y
1049# CONFIG_XFS_FS is not set 1071# CONFIG_XFS_FS is not set
1072# CONFIG_GFS2_FS is not set
1050# CONFIG_OCFS2_FS is not set 1073# CONFIG_OCFS2_FS is not set
1051# CONFIG_BTRFS_FS is not set 1074# CONFIG_BTRFS_FS is not set
1075CONFIG_FILE_LOCKING=y
1076CONFIG_FSNOTIFY=y
1052CONFIG_DNOTIFY=y 1077CONFIG_DNOTIFY=y
1053CONFIG_INOTIFY=y 1078CONFIG_INOTIFY=y
1054CONFIG_INOTIFY_USER=y 1079CONFIG_INOTIFY_USER=y
@@ -1111,6 +1136,7 @@ CONFIG_NFS_FS=y
1111CONFIG_NFS_V3=y 1136CONFIG_NFS_V3=y
1112# CONFIG_NFS_V3_ACL is not set 1137# CONFIG_NFS_V3_ACL is not set
1113CONFIG_NFS_V4=y 1138CONFIG_NFS_V4=y
1139# CONFIG_NFS_V4_1 is not set
1114CONFIG_ROOT_NFS=y 1140CONFIG_ROOT_NFS=y
1115# CONFIG_NFSD is not set 1141# CONFIG_NFSD is not set
1116CONFIG_LOCKD=y 1142CONFIG_LOCKD=y
@@ -1170,6 +1196,7 @@ CONFIG_HAS_IOPORT=y
1170CONFIG_HAS_DMA=y 1196CONFIG_HAS_DMA=y
1171CONFIG_HAVE_LMB=y 1197CONFIG_HAVE_LMB=y
1172CONFIG_NLATTR=y 1198CONFIG_NLATTR=y
1199CONFIG_GENERIC_ATOMIC64=y
1173 1200
1174# 1201#
1175# Kernel hacking 1202# Kernel hacking
@@ -1193,22 +1220,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1193CONFIG_HAVE_DYNAMIC_FTRACE=y 1220CONFIG_HAVE_DYNAMIC_FTRACE=y
1194CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1221CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1195CONFIG_TRACING_SUPPORT=y 1222CONFIG_TRACING_SUPPORT=y
1196 1223# CONFIG_FTRACE is not set
1197#
1198# Tracers
1199#
1200# CONFIG_FUNCTION_TRACER is not set
1201# CONFIG_SCHED_TRACER is not set
1202# CONFIG_CONTEXT_SWITCH_TRACER is not set
1203# CONFIG_EVENT_TRACER is not set
1204# CONFIG_BOOT_TRACER is not set
1205# CONFIG_TRACE_BRANCH_PROFILING is not set
1206# CONFIG_STACK_TRACER is not set
1207# CONFIG_KMEMTRACE is not set
1208# CONFIG_WORKQUEUE_TRACER is not set
1209# CONFIG_BLK_DEV_IO_TRACE is not set
1210# CONFIG_SAMPLES is not set 1224# CONFIG_SAMPLES is not set
1211CONFIG_HAVE_ARCH_KGDB=y 1225CONFIG_HAVE_ARCH_KGDB=y
1226# CONFIG_PPC_DISABLE_WERROR is not set
1227CONFIG_PPC_WERROR=y
1212CONFIG_PRINT_STACK_DEPTH=64 1228CONFIG_PRINT_STACK_DEPTH=64
1213# CONFIG_IRQSTACKS is not set 1229# CONFIG_IRQSTACKS is not set
1214# CONFIG_BOOTX_TEXT is not set 1230# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig b/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig
index fe6454eacbd..1ab3e4cd301 100644
--- a/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:14 2009 4# Wed Jul 29 23:32:13 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_FSL_EMB_PERFMON is not set 20# CONFIG_FSL_EMB_PERFMON is not set
20# CONFIG_ALTIVEC is not set 21# CONFIG_ALTIVEC is not set
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24# CONFIG_SMP is not set 26# CONFIG_SMP is not set
25CONFIG_PPC32=y 27CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32 28CONFIG_WORD_SIZE=32
@@ -31,15 +33,16 @@ CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y 33CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y 34CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y 35CONFIG_GENERIC_HARDIRQS=y
36CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y 38CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y 39CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y 40CONFIG_HAVE_LATENCYTOP_SUPPORT=y
41CONFIG_TRACE_IRQFLAGS_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y 42CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y 43CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y 44CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y 45CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y 46CONFIG_GENERIC_FIND_NEXT_BIT=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
45CONFIG_PPC=y 48CONFIG_PPC=y
@@ -53,12 +56,14 @@ CONFIG_PPC_UDBG_16550=y
53# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
56CONFIG_DEFAULT_UIMAGE=y 60CONFIG_DEFAULT_UIMAGE=y
57CONFIG_ARCH_SUSPEND_POSSIBLE=y 61CONFIG_ARCH_SUSPEND_POSSIBLE=y
58# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
59# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
60CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
61CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
62 67
63# 68#
64# General setup 69# General setup
@@ -108,7 +113,6 @@ CONFIG_EMBEDDED=y
108CONFIG_SYSCTL_SYSCALL=y 113CONFIG_SYSCTL_SYSCALL=y
109CONFIG_KALLSYMS=y 114CONFIG_KALLSYMS=y
110# CONFIG_KALLSYMS_EXTRA_PASS is not set 115# CONFIG_KALLSYMS_EXTRA_PASS is not set
111# CONFIG_STRIP_ASM_SYMS is not set
112CONFIG_HOTPLUG=y 116CONFIG_HOTPLUG=y
113CONFIG_PRINTK=y 117CONFIG_PRINTK=y
114CONFIG_BUG=y 118CONFIG_BUG=y
@@ -121,8 +125,15 @@ CONFIG_TIMERFD=y
121CONFIG_EVENTFD=y 125CONFIG_EVENTFD=y
122CONFIG_SHMEM=y 126CONFIG_SHMEM=y
123CONFIG_AIO=y 127CONFIG_AIO=y
128CONFIG_HAVE_PERF_COUNTERS=y
129
130#
131# Performance Counters
132#
133# CONFIG_PERF_COUNTERS is not set
124CONFIG_VM_EVENT_COUNTERS=y 134CONFIG_VM_EVENT_COUNTERS=y
125CONFIG_PCI_QUIRKS=y 135CONFIG_PCI_QUIRKS=y
136# CONFIG_STRIP_ASM_SYMS is not set
126CONFIG_COMPAT_BRK=y 137CONFIG_COMPAT_BRK=y
127CONFIG_SLAB=y 138CONFIG_SLAB=y
128# CONFIG_SLUB is not set 139# CONFIG_SLUB is not set
@@ -136,6 +147,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
136CONFIG_HAVE_KPROBES=y 147CONFIG_HAVE_KPROBES=y
137CONFIG_HAVE_KRETPROBES=y 148CONFIG_HAVE_KRETPROBES=y
138CONFIG_HAVE_ARCH_TRACEHOOK=y 149CONFIG_HAVE_ARCH_TRACEHOOK=y
150
151#
152# GCOV-based kernel profiling
153#
139# CONFIG_SLOW_WORK is not set 154# CONFIG_SLOW_WORK is not set
140# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 155# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
141CONFIG_SLABINFO=y 156CONFIG_SLABINFO=y
@@ -148,7 +163,7 @@ CONFIG_MODULE_UNLOAD=y
148# CONFIG_MODVERSIONS is not set 163# CONFIG_MODVERSIONS is not set
149# CONFIG_MODULE_SRCVERSION_ALL is not set 164# CONFIG_MODULE_SRCVERSION_ALL is not set
150CONFIG_BLOCK=y 165CONFIG_BLOCK=y
151# CONFIG_LBD is not set 166CONFIG_LBDAF=y
152# CONFIG_BLK_DEV_BSG is not set 167# CONFIG_BLK_DEV_BSG is not set
153# CONFIG_BLK_DEV_INTEGRITY is not set 168# CONFIG_BLK_DEV_INTEGRITY is not set
154 169
@@ -190,6 +205,7 @@ CONFIG_PPC_83xx=y
190CONFIG_MPC837x_RDB=y 205CONFIG_MPC837x_RDB=y
191# CONFIG_SBC834x is not set 206# CONFIG_SBC834x is not set
192# CONFIG_ASP834x is not set 207# CONFIG_ASP834x is not set
208# CONFIG_KMETER1 is not set
193CONFIG_PPC_MPC837x=y 209CONFIG_PPC_MPC837x=y
194# CONFIG_PPC_86xx is not set 210# CONFIG_PPC_86xx is not set
195# CONFIG_EMBEDDED6xx is not set 211# CONFIG_EMBEDDED6xx is not set
@@ -234,6 +250,7 @@ CONFIG_BINFMT_ELF=y
234# CONFIG_HAVE_AOUT is not set 250# CONFIG_HAVE_AOUT is not set
235# CONFIG_BINFMT_MISC is not set 251# CONFIG_BINFMT_MISC is not set
236# CONFIG_IOMMU_HELPER is not set 252# CONFIG_IOMMU_HELPER is not set
253# CONFIG_SWIOTLB is not set
237CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 254CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
238CONFIG_ARCH_HAS_WALK_MEMORY=y 255CONFIG_ARCH_HAS_WALK_MEMORY=y
239CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 256CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -254,9 +271,9 @@ CONFIG_MIGRATION=y
254CONFIG_ZONE_DMA_FLAG=1 271CONFIG_ZONE_DMA_FLAG=1
255CONFIG_BOUNCE=y 272CONFIG_BOUNCE=y
256CONFIG_VIRT_TO_BUS=y 273CONFIG_VIRT_TO_BUS=y
257CONFIG_UNEVICTABLE_LRU=y
258CONFIG_HAVE_MLOCK=y 274CONFIG_HAVE_MLOCK=y
259CONFIG_HAVE_MLOCKED_PAGE_BIT=y 275CONFIG_HAVE_MLOCKED_PAGE_BIT=y
276CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
260CONFIG_PPC_4K_PAGES=y 277CONFIG_PPC_4K_PAGES=y
261# CONFIG_PPC_16K_PAGES is not set 278# CONFIG_PPC_16K_PAGES is not set
262# CONFIG_PPC_64K_PAGES is not set 279# CONFIG_PPC_64K_PAGES is not set
@@ -360,6 +377,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
360# CONFIG_ECONET is not set 377# CONFIG_ECONET is not set
361# CONFIG_WAN_ROUTER is not set 378# CONFIG_WAN_ROUTER is not set
362# CONFIG_PHONET is not set 379# CONFIG_PHONET is not set
380# CONFIG_IEEE802154 is not set
363# CONFIG_NET_SCHED is not set 381# CONFIG_NET_SCHED is not set
364# CONFIG_DCB is not set 382# CONFIG_DCB is not set
365 383
@@ -377,7 +395,11 @@ CONFIG_WIRELESS=y
377CONFIG_WIRELESS_OLD_REGULATORY=y 395CONFIG_WIRELESS_OLD_REGULATORY=y
378# CONFIG_WIRELESS_EXT is not set 396# CONFIG_WIRELESS_EXT is not set
379# CONFIG_LIB80211 is not set 397# CONFIG_LIB80211 is not set
380# CONFIG_MAC80211 is not set 398
399#
400# CFG80211 needs to be enabled for MAC80211
401#
402CONFIG_MAC80211_DEFAULT_PS_VALUE=0
381# CONFIG_WIMAX is not set 403# CONFIG_WIMAX is not set
382# CONFIG_RFKILL is not set 404# CONFIG_RFKILL is not set
383# CONFIG_NET_9P is not set 405# CONFIG_NET_9P is not set
@@ -398,6 +420,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
398# CONFIG_MTD is not set 420# CONFIG_MTD is not set
399CONFIG_OF_DEVICE=y 421CONFIG_OF_DEVICE=y
400CONFIG_OF_I2C=y 422CONFIG_OF_I2C=y
423CONFIG_OF_MDIO=y
401# CONFIG_PARPORT is not set 424# CONFIG_PARPORT is not set
402CONFIG_BLK_DEV=y 425CONFIG_BLK_DEV=y
403# CONFIG_BLK_DEV_FD is not set 426# CONFIG_BLK_DEV_FD is not set
@@ -433,7 +456,9 @@ CONFIG_MISC_DEVICES=y
433# 456#
434# CONFIG_EEPROM_AT24 is not set 457# CONFIG_EEPROM_AT24 is not set
435# CONFIG_EEPROM_LEGACY is not set 458# CONFIG_EEPROM_LEGACY is not set
459# CONFIG_EEPROM_MAX6875 is not set
436# CONFIG_EEPROM_93CX6 is not set 460# CONFIG_EEPROM_93CX6 is not set
461# CONFIG_CB710_CORE is not set
437CONFIG_HAVE_IDE=y 462CONFIG_HAVE_IDE=y
438# CONFIG_IDE is not set 463# CONFIG_IDE is not set
439 464
@@ -456,10 +481,6 @@ CONFIG_BLK_DEV_SD=y
456# CONFIG_BLK_DEV_SR is not set 481# CONFIG_BLK_DEV_SR is not set
457CONFIG_CHR_DEV_SG=y 482CONFIG_CHR_DEV_SG=y
458# CONFIG_CHR_DEV_SCH is not set 483# CONFIG_CHR_DEV_SCH is not set
459
460#
461# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
462#
463# CONFIG_SCSI_MULTI_LUN is not set 484# CONFIG_SCSI_MULTI_LUN is not set
464# CONFIG_SCSI_CONSTANTS is not set 485# CONFIG_SCSI_CONSTANTS is not set
465# CONFIG_SCSI_LOGGING is not set 486# CONFIG_SCSI_LOGGING is not set
@@ -476,6 +497,7 @@ CONFIG_SCSI_WAIT_SCAN=m
476# CONFIG_SCSI_SRP_ATTRS is not set 497# CONFIG_SCSI_SRP_ATTRS is not set
477CONFIG_SCSI_LOWLEVEL=y 498CONFIG_SCSI_LOWLEVEL=y
478# CONFIG_ISCSI_TCP is not set 499# CONFIG_ISCSI_TCP is not set
500# CONFIG_SCSI_BNX2_ISCSI is not set
479# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 501# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
480# CONFIG_SCSI_3W_9XXX is not set 502# CONFIG_SCSI_3W_9XXX is not set
481# CONFIG_SCSI_ACARD is not set 503# CONFIG_SCSI_ACARD is not set
@@ -484,6 +506,7 @@ CONFIG_SCSI_LOWLEVEL=y
484# CONFIG_SCSI_AIC7XXX_OLD is not set 506# CONFIG_SCSI_AIC7XXX_OLD is not set
485# CONFIG_SCSI_AIC79XX is not set 507# CONFIG_SCSI_AIC79XX is not set
486# CONFIG_SCSI_AIC94XX is not set 508# CONFIG_SCSI_AIC94XX is not set
509# CONFIG_SCSI_MVSAS is not set
487# CONFIG_SCSI_DPT_I2O is not set 510# CONFIG_SCSI_DPT_I2O is not set
488# CONFIG_SCSI_ADVANSYS is not set 511# CONFIG_SCSI_ADVANSYS is not set
489# CONFIG_SCSI_ARCMSR is not set 512# CONFIG_SCSI_ARCMSR is not set
@@ -503,7 +526,6 @@ CONFIG_SCSI_LOWLEVEL=y
503# CONFIG_SCSI_IPS is not set 526# CONFIG_SCSI_IPS is not set
504# CONFIG_SCSI_INITIO is not set 527# CONFIG_SCSI_INITIO is not set
505# CONFIG_SCSI_INIA100 is not set 528# CONFIG_SCSI_INIA100 is not set
506# CONFIG_SCSI_MVSAS is not set
507# CONFIG_SCSI_STEX is not set 529# CONFIG_SCSI_STEX is not set
508# CONFIG_SCSI_SYM53C8XX_2 is not set 530# CONFIG_SCSI_SYM53C8XX_2 is not set
509# CONFIG_SCSI_IPR is not set 531# CONFIG_SCSI_IPR is not set
@@ -598,14 +620,17 @@ CONFIG_MD_RAID6_PQ=y
598# 620#
599 621
600# 622#
601# Enable only one of the two stacks, unless you know what you are doing 623# You can enable one or both FireWire driver stacks.
624#
625
626#
627# See the help texts for more information.
602# 628#
603# CONFIG_FIREWIRE is not set 629# CONFIG_FIREWIRE is not set
604# CONFIG_IEEE1394 is not set 630# CONFIG_IEEE1394 is not set
605# CONFIG_I2O is not set 631# CONFIG_I2O is not set
606# CONFIG_MACINTOSH_DRIVERS is not set 632# CONFIG_MACINTOSH_DRIVERS is not set
607CONFIG_NETDEVICES=y 633CONFIG_NETDEVICES=y
608CONFIG_COMPAT_NET_DEV_OPS=y
609# CONFIG_DUMMY is not set 634# CONFIG_DUMMY is not set
610# CONFIG_BONDING is not set 635# CONFIG_BONDING is not set
611# CONFIG_MACVLAN is not set 636# CONFIG_MACVLAN is not set
@@ -652,6 +677,7 @@ CONFIG_MII=y
652# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 677# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
653# CONFIG_NET_PCI is not set 678# CONFIG_NET_PCI is not set
654# CONFIG_B44 is not set 679# CONFIG_B44 is not set
680# CONFIG_KS8842 is not set
655# CONFIG_ATL2 is not set 681# CONFIG_ATL2 is not set
656CONFIG_NETDEV_1000=y 682CONFIG_NETDEV_1000=y
657# CONFIG_ACENIC is not set 683# CONFIG_ACENIC is not set
@@ -671,8 +697,10 @@ CONFIG_NETDEV_1000=y
671# CONFIG_VIA_VELOCITY is not set 697# CONFIG_VIA_VELOCITY is not set
672# CONFIG_TIGON3 is not set 698# CONFIG_TIGON3 is not set
673# CONFIG_BNX2 is not set 699# CONFIG_BNX2 is not set
700# CONFIG_CNIC is not set
674CONFIG_FSL_PQ_MDIO=y 701CONFIG_FSL_PQ_MDIO=y
675CONFIG_GIANFAR=y 702CONFIG_GIANFAR=y
703# CONFIG_MV643XX_ETH is not set
676# CONFIG_QLA3XXX is not set 704# CONFIG_QLA3XXX is not set
677# CONFIG_ATL1 is not set 705# CONFIG_ATL1 is not set
678# CONFIG_ATL1E is not set 706# CONFIG_ATL1E is not set
@@ -842,13 +870,17 @@ CONFIG_I2C_MPC=y
842# CONFIG_SENSORS_PCF8574 is not set 870# CONFIG_SENSORS_PCF8574 is not set
843# CONFIG_PCF8575 is not set 871# CONFIG_PCF8575 is not set
844# CONFIG_SENSORS_PCA9539 is not set 872# CONFIG_SENSORS_PCA9539 is not set
845# CONFIG_SENSORS_MAX6875 is not set
846# CONFIG_SENSORS_TSL2550 is not set 873# CONFIG_SENSORS_TSL2550 is not set
847# CONFIG_I2C_DEBUG_CORE is not set 874# CONFIG_I2C_DEBUG_CORE is not set
848# CONFIG_I2C_DEBUG_ALGO is not set 875# CONFIG_I2C_DEBUG_ALGO is not set
849# CONFIG_I2C_DEBUG_BUS is not set 876# CONFIG_I2C_DEBUG_BUS is not set
850# CONFIG_I2C_DEBUG_CHIP is not set 877# CONFIG_I2C_DEBUG_CHIP is not set
851# CONFIG_SPI is not set 878# CONFIG_SPI is not set
879
880#
881# PPS support
882#
883# CONFIG_PPS is not set
852CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 884CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
853# CONFIG_GPIOLIB is not set 885# CONFIG_GPIOLIB is not set
854# CONFIG_W1 is not set 886# CONFIG_W1 is not set
@@ -903,6 +935,7 @@ CONFIG_HWMON=y
903# CONFIG_SENSORS_SMSC47B397 is not set 935# CONFIG_SENSORS_SMSC47B397 is not set
904# CONFIG_SENSORS_ADS7828 is not set 936# CONFIG_SENSORS_ADS7828 is not set
905# CONFIG_SENSORS_THMC50 is not set 937# CONFIG_SENSORS_THMC50 is not set
938# CONFIG_SENSORS_TMP401 is not set
906# CONFIG_SENSORS_VIA686A is not set 939# CONFIG_SENSORS_VIA686A is not set
907# CONFIG_SENSORS_VT1211 is not set 940# CONFIG_SENSORS_VT1211 is not set
908# CONFIG_SENSORS_VT8231 is not set 941# CONFIG_SENSORS_VT8231 is not set
@@ -956,24 +989,9 @@ CONFIG_SSB_POSSIBLE=y
956# CONFIG_MFD_WM8400 is not set 989# CONFIG_MFD_WM8400 is not set
957# CONFIG_MFD_WM8350_I2C is not set 990# CONFIG_MFD_WM8350_I2C is not set
958# CONFIG_MFD_PCF50633 is not set 991# CONFIG_MFD_PCF50633 is not set
992# CONFIG_AB3100_CORE is not set
959# CONFIG_REGULATOR is not set 993# CONFIG_REGULATOR is not set
960 994# CONFIG_MEDIA_SUPPORT is not set
961#
962# Multimedia devices
963#
964
965#
966# Multimedia core support
967#
968# CONFIG_VIDEO_DEV is not set
969# CONFIG_DVB_CORE is not set
970# CONFIG_VIDEO_MEDIA is not set
971
972#
973# Multimedia drivers
974#
975CONFIG_DAB=y
976# CONFIG_USB_DABUSB is not set
977 995
978# 996#
979# Graphics support 997# Graphics support
@@ -1011,7 +1029,7 @@ CONFIG_HID_BELKIN=y
1011CONFIG_HID_CHERRY=y 1029CONFIG_HID_CHERRY=y
1012CONFIG_HID_CHICONY=y 1030CONFIG_HID_CHICONY=y
1013CONFIG_HID_CYPRESS=y 1031CONFIG_HID_CYPRESS=y
1014# CONFIG_DRAGONRISE_FF is not set 1032# CONFIG_HID_DRAGONRISE is not set
1015CONFIG_HID_EZKEY=y 1033CONFIG_HID_EZKEY=y
1016# CONFIG_HID_KYE is not set 1034# CONFIG_HID_KYE is not set
1017CONFIG_HID_GYRATION=y 1035CONFIG_HID_GYRATION=y
@@ -1028,10 +1046,11 @@ CONFIG_HID_PETALYNX=y
1028CONFIG_HID_SAMSUNG=y 1046CONFIG_HID_SAMSUNG=y
1029CONFIG_HID_SONY=y 1047CONFIG_HID_SONY=y
1030CONFIG_HID_SUNPLUS=y 1048CONFIG_HID_SUNPLUS=y
1031# CONFIG_GREENASIA_FF is not set 1049# CONFIG_HID_GREENASIA is not set
1050# CONFIG_HID_SMARTJOYPLUS is not set
1032# CONFIG_HID_TOPSEED is not set 1051# CONFIG_HID_TOPSEED is not set
1033CONFIG_THRUSTMASTER_FF=m 1052# CONFIG_HID_THRUSTMASTER is not set
1034CONFIG_ZEROPLUS_FF=m 1053# CONFIG_HID_ZEROPLUS is not set
1035CONFIG_USB_SUPPORT=y 1054CONFIG_USB_SUPPORT=y
1036CONFIG_USB_ARCH_HAS_HCD=y 1055CONFIG_USB_ARCH_HAS_HCD=y
1037CONFIG_USB_ARCH_HAS_OHCI=y 1056CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1057,6 +1076,7 @@ CONFIG_USB_MON=y
1057# USB Host Controller Drivers 1076# USB Host Controller Drivers
1058# 1077#
1059# CONFIG_USB_C67X00_HCD is not set 1078# CONFIG_USB_C67X00_HCD is not set
1079# CONFIG_USB_XHCI_HCD is not set
1060CONFIG_USB_EHCI_HCD=y 1080CONFIG_USB_EHCI_HCD=y
1061CONFIG_USB_EHCI_ROOT_HUB_TT=y 1081CONFIG_USB_EHCI_ROOT_HUB_TT=y
1062# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1082# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1141,6 +1161,10 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y
1141# CONFIG_DMADEVICES is not set 1161# CONFIG_DMADEVICES is not set
1142# CONFIG_AUXDISPLAY is not set 1162# CONFIG_AUXDISPLAY is not set
1143# CONFIG_UIO is not set 1163# CONFIG_UIO is not set
1164
1165#
1166# TI VLYNQ
1167#
1144# CONFIG_STAGING is not set 1168# CONFIG_STAGING is not set
1145 1169
1146# 1170#
@@ -1160,10 +1184,12 @@ CONFIG_FS_MBCACHE=y
1160# CONFIG_REISERFS_FS is not set 1184# CONFIG_REISERFS_FS is not set
1161# CONFIG_JFS_FS is not set 1185# CONFIG_JFS_FS is not set
1162# CONFIG_FS_POSIX_ACL is not set 1186# CONFIG_FS_POSIX_ACL is not set
1163CONFIG_FILE_LOCKING=y
1164# CONFIG_XFS_FS is not set 1187# CONFIG_XFS_FS is not set
1188# CONFIG_GFS2_FS is not set
1165# CONFIG_OCFS2_FS is not set 1189# CONFIG_OCFS2_FS is not set
1166# CONFIG_BTRFS_FS is not set 1190# CONFIG_BTRFS_FS is not set
1191CONFIG_FILE_LOCKING=y
1192CONFIG_FSNOTIFY=y
1167CONFIG_DNOTIFY=y 1193CONFIG_DNOTIFY=y
1168CONFIG_INOTIFY=y 1194CONFIG_INOTIFY=y
1169CONFIG_INOTIFY_USER=y 1195CONFIG_INOTIFY_USER=y
@@ -1226,6 +1252,7 @@ CONFIG_NFS_FS=y
1226CONFIG_NFS_V3=y 1252CONFIG_NFS_V3=y
1227# CONFIG_NFS_V3_ACL is not set 1253# CONFIG_NFS_V3_ACL is not set
1228CONFIG_NFS_V4=y 1254CONFIG_NFS_V4=y
1255# CONFIG_NFS_V4_1 is not set
1229CONFIG_ROOT_NFS=y 1256CONFIG_ROOT_NFS=y
1230# CONFIG_NFSD is not set 1257# CONFIG_NFSD is not set
1231CONFIG_LOCKD=y 1258CONFIG_LOCKD=y
@@ -1262,7 +1289,46 @@ CONFIG_MSDOS_PARTITION=y
1262# CONFIG_KARMA_PARTITION is not set 1289# CONFIG_KARMA_PARTITION is not set
1263# CONFIG_EFI_PARTITION is not set 1290# CONFIG_EFI_PARTITION is not set
1264# CONFIG_SYSV68_PARTITION is not set 1291# CONFIG_SYSV68_PARTITION is not set
1265# CONFIG_NLS is not set 1292CONFIG_NLS=y
1293CONFIG_NLS_DEFAULT="iso8859-1"
1294# CONFIG_NLS_CODEPAGE_437 is not set
1295# CONFIG_NLS_CODEPAGE_737 is not set
1296# CONFIG_NLS_CODEPAGE_775 is not set
1297# CONFIG_NLS_CODEPAGE_850 is not set
1298# CONFIG_NLS_CODEPAGE_852 is not set
1299# CONFIG_NLS_CODEPAGE_855 is not set
1300# CONFIG_NLS_CODEPAGE_857 is not set
1301# CONFIG_NLS_CODEPAGE_860 is not set
1302# CONFIG_NLS_CODEPAGE_861 is not set
1303# CONFIG_NLS_CODEPAGE_862 is not set
1304# CONFIG_NLS_CODEPAGE_863 is not set
1305# CONFIG_NLS_CODEPAGE_864 is not set
1306# CONFIG_NLS_CODEPAGE_865 is not set
1307# CONFIG_NLS_CODEPAGE_866 is not set
1308# CONFIG_NLS_CODEPAGE_869 is not set
1309# CONFIG_NLS_CODEPAGE_936 is not set
1310# CONFIG_NLS_CODEPAGE_950 is not set
1311# CONFIG_NLS_CODEPAGE_932 is not set
1312# CONFIG_NLS_CODEPAGE_949 is not set
1313# CONFIG_NLS_CODEPAGE_874 is not set
1314# CONFIG_NLS_ISO8859_8 is not set
1315# CONFIG_NLS_CODEPAGE_1250 is not set
1316# CONFIG_NLS_CODEPAGE_1251 is not set
1317# CONFIG_NLS_ASCII is not set
1318# CONFIG_NLS_ISO8859_1 is not set
1319# CONFIG_NLS_ISO8859_2 is not set
1320# CONFIG_NLS_ISO8859_3 is not set
1321# CONFIG_NLS_ISO8859_4 is not set
1322# CONFIG_NLS_ISO8859_5 is not set
1323# CONFIG_NLS_ISO8859_6 is not set
1324# CONFIG_NLS_ISO8859_7 is not set
1325# CONFIG_NLS_ISO8859_9 is not set
1326# CONFIG_NLS_ISO8859_13 is not set
1327# CONFIG_NLS_ISO8859_14 is not set
1328# CONFIG_NLS_ISO8859_15 is not set
1329# CONFIG_NLS_KOI8_R is not set
1330# CONFIG_NLS_KOI8_U is not set
1331# CONFIG_NLS_UTF8 is not set
1266# CONFIG_DLM is not set 1332# CONFIG_DLM is not set
1267# CONFIG_BINARY_PRINTF is not set 1333# CONFIG_BINARY_PRINTF is not set
1268 1334
@@ -1285,6 +1351,7 @@ CONFIG_HAS_IOPORT=y
1285CONFIG_HAS_DMA=y 1351CONFIG_HAS_DMA=y
1286CONFIG_HAVE_LMB=y 1352CONFIG_HAVE_LMB=y
1287CONFIG_NLATTR=y 1353CONFIG_NLATTR=y
1354CONFIG_GENERIC_ATOMIC64=y
1288 1355
1289# 1356#
1290# Kernel hacking 1357# Kernel hacking
@@ -1308,22 +1375,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1308CONFIG_HAVE_DYNAMIC_FTRACE=y 1375CONFIG_HAVE_DYNAMIC_FTRACE=y
1309CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1376CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1310CONFIG_TRACING_SUPPORT=y 1377CONFIG_TRACING_SUPPORT=y
1311 1378# CONFIG_FTRACE is not set
1312#
1313# Tracers
1314#
1315# CONFIG_FUNCTION_TRACER is not set
1316# CONFIG_SCHED_TRACER is not set
1317# CONFIG_CONTEXT_SWITCH_TRACER is not set
1318# CONFIG_EVENT_TRACER is not set
1319# CONFIG_BOOT_TRACER is not set
1320# CONFIG_TRACE_BRANCH_PROFILING is not set
1321# CONFIG_STACK_TRACER is not set
1322# CONFIG_KMEMTRACE is not set
1323# CONFIG_WORKQUEUE_TRACER is not set
1324# CONFIG_BLK_DEV_IO_TRACE is not set
1325# CONFIG_SAMPLES is not set 1379# CONFIG_SAMPLES is not set
1326CONFIG_HAVE_ARCH_KGDB=y 1380CONFIG_HAVE_ARCH_KGDB=y
1381# CONFIG_PPC_DISABLE_WERROR is not set
1382CONFIG_PPC_WERROR=y
1327CONFIG_PRINT_STACK_DEPTH=64 1383CONFIG_PRINT_STACK_DEPTH=64
1328# CONFIG_IRQSTACKS is not set 1384# CONFIG_IRQSTACKS is not set
1329# CONFIG_BOOTX_TEXT is not set 1385# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/83xx/sbc834x_defconfig b/arch/powerpc/configs/83xx/sbc834x_defconfig
index fe08f672cb2..a592b5efdc4 100644
--- a/arch/powerpc/configs/83xx/sbc834x_defconfig
+++ b/arch/powerpc/configs/83xx/sbc834x_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:15 2009 4# Wed Jul 29 23:32:13 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_FSL_EMB_PERFMON is not set 20# CONFIG_FSL_EMB_PERFMON is not set
20# CONFIG_ALTIVEC is not set 21# CONFIG_ALTIVEC is not set
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24# CONFIG_SMP is not set 26# CONFIG_SMP is not set
25CONFIG_PPC32=y 27CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32 28CONFIG_WORD_SIZE=32
@@ -31,15 +33,16 @@ CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y 33CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y 34CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y 35CONFIG_GENERIC_HARDIRQS=y
36CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y 38CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y 39CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y 40CONFIG_HAVE_LATENCYTOP_SUPPORT=y
41CONFIG_TRACE_IRQFLAGS_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y 42CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y 43CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y 44CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y 45CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y 46CONFIG_GENERIC_FIND_NEXT_BIT=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
45CONFIG_PPC=y 48CONFIG_PPC=y
@@ -53,12 +56,14 @@ CONFIG_PPC_UDBG_16550=y
53# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
56CONFIG_DEFAULT_UIMAGE=y 60CONFIG_DEFAULT_UIMAGE=y
57CONFIG_ARCH_SUSPEND_POSSIBLE=y 61CONFIG_ARCH_SUSPEND_POSSIBLE=y
58# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
59# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
60CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
61CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
62 67
63# 68#
64# General setup 69# General setup
@@ -107,7 +112,6 @@ CONFIG_ANON_INODES=y
107CONFIG_EMBEDDED=y 112CONFIG_EMBEDDED=y
108CONFIG_SYSCTL_SYSCALL=y 113CONFIG_SYSCTL_SYSCALL=y
109# CONFIG_KALLSYMS is not set 114# CONFIG_KALLSYMS is not set
110# CONFIG_STRIP_ASM_SYMS is not set
111CONFIG_HOTPLUG=y 115CONFIG_HOTPLUG=y
112CONFIG_PRINTK=y 116CONFIG_PRINTK=y
113CONFIG_BUG=y 117CONFIG_BUG=y
@@ -120,8 +124,15 @@ CONFIG_TIMERFD=y
120CONFIG_EVENTFD=y 124CONFIG_EVENTFD=y
121CONFIG_SHMEM=y 125CONFIG_SHMEM=y
122CONFIG_AIO=y 126CONFIG_AIO=y
127CONFIG_HAVE_PERF_COUNTERS=y
128
129#
130# Performance Counters
131#
132# CONFIG_PERF_COUNTERS is not set
123CONFIG_VM_EVENT_COUNTERS=y 133CONFIG_VM_EVENT_COUNTERS=y
124CONFIG_PCI_QUIRKS=y 134CONFIG_PCI_QUIRKS=y
135# CONFIG_STRIP_ASM_SYMS is not set
125CONFIG_COMPAT_BRK=y 136CONFIG_COMPAT_BRK=y
126CONFIG_SLAB=y 137CONFIG_SLAB=y
127# CONFIG_SLUB is not set 138# CONFIG_SLUB is not set
@@ -134,6 +145,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
134CONFIG_HAVE_KPROBES=y 145CONFIG_HAVE_KPROBES=y
135CONFIG_HAVE_KRETPROBES=y 146CONFIG_HAVE_KRETPROBES=y
136CONFIG_HAVE_ARCH_TRACEHOOK=y 147CONFIG_HAVE_ARCH_TRACEHOOK=y
148
149#
150# GCOV-based kernel profiling
151#
137# CONFIG_SLOW_WORK is not set 152# CONFIG_SLOW_WORK is not set
138# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 153# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
139CONFIG_SLABINFO=y 154CONFIG_SLABINFO=y
@@ -146,7 +161,7 @@ CONFIG_MODULE_UNLOAD=y
146# CONFIG_MODVERSIONS is not set 161# CONFIG_MODVERSIONS is not set
147# CONFIG_MODULE_SRCVERSION_ALL is not set 162# CONFIG_MODULE_SRCVERSION_ALL is not set
148CONFIG_BLOCK=y 163CONFIG_BLOCK=y
149# CONFIG_LBD is not set 164CONFIG_LBDAF=y
150# CONFIG_BLK_DEV_BSG is not set 165# CONFIG_BLK_DEV_BSG is not set
151# CONFIG_BLK_DEV_INTEGRITY is not set 166# CONFIG_BLK_DEV_INTEGRITY is not set
152 167
@@ -188,6 +203,7 @@ CONFIG_PPC_83xx=y
188# CONFIG_MPC837x_RDB is not set 203# CONFIG_MPC837x_RDB is not set
189CONFIG_SBC834x=y 204CONFIG_SBC834x=y
190# CONFIG_ASP834x is not set 205# CONFIG_ASP834x is not set
206# CONFIG_KMETER1 is not set
191CONFIG_PPC_MPC834x=y 207CONFIG_PPC_MPC834x=y
192# CONFIG_PPC_86xx is not set 208# CONFIG_PPC_86xx is not set
193# CONFIG_EMBEDDED6xx is not set 209# CONFIG_EMBEDDED6xx is not set
@@ -232,6 +248,7 @@ CONFIG_BINFMT_ELF=y
232# CONFIG_HAVE_AOUT is not set 248# CONFIG_HAVE_AOUT is not set
233# CONFIG_BINFMT_MISC is not set 249# CONFIG_BINFMT_MISC is not set
234# CONFIG_IOMMU_HELPER is not set 250# CONFIG_IOMMU_HELPER is not set
251# CONFIG_SWIOTLB is not set
235CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 252CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
236CONFIG_ARCH_HAS_WALK_MEMORY=y 253CONFIG_ARCH_HAS_WALK_MEMORY=y
237CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 254CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -252,9 +269,9 @@ CONFIG_MIGRATION=y
252CONFIG_ZONE_DMA_FLAG=1 269CONFIG_ZONE_DMA_FLAG=1
253CONFIG_BOUNCE=y 270CONFIG_BOUNCE=y
254CONFIG_VIRT_TO_BUS=y 271CONFIG_VIRT_TO_BUS=y
255CONFIG_UNEVICTABLE_LRU=y
256CONFIG_HAVE_MLOCK=y 272CONFIG_HAVE_MLOCK=y
257CONFIG_HAVE_MLOCKED_PAGE_BIT=y 273CONFIG_HAVE_MLOCKED_PAGE_BIT=y
274CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
258CONFIG_PPC_4K_PAGES=y 275CONFIG_PPC_4K_PAGES=y
259# CONFIG_PPC_16K_PAGES is not set 276# CONFIG_PPC_16K_PAGES is not set
260# CONFIG_PPC_64K_PAGES is not set 277# CONFIG_PPC_64K_PAGES is not set
@@ -363,6 +380,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
363# CONFIG_ECONET is not set 380# CONFIG_ECONET is not set
364# CONFIG_WAN_ROUTER is not set 381# CONFIG_WAN_ROUTER is not set
365# CONFIG_PHONET is not set 382# CONFIG_PHONET is not set
383# CONFIG_IEEE802154 is not set
366# CONFIG_NET_SCHED is not set 384# CONFIG_NET_SCHED is not set
367# CONFIG_DCB is not set 385# CONFIG_DCB is not set
368 386
@@ -380,7 +398,11 @@ CONFIG_WIRELESS=y
380CONFIG_WIRELESS_OLD_REGULATORY=y 398CONFIG_WIRELESS_OLD_REGULATORY=y
381# CONFIG_WIRELESS_EXT is not set 399# CONFIG_WIRELESS_EXT is not set
382# CONFIG_LIB80211 is not set 400# CONFIG_LIB80211 is not set
383# CONFIG_MAC80211 is not set 401
402#
403# CFG80211 needs to be enabled for MAC80211
404#
405CONFIG_MAC80211_DEFAULT_PS_VALUE=0
384# CONFIG_WIMAX is not set 406# CONFIG_WIMAX is not set
385# CONFIG_RFKILL is not set 407# CONFIG_RFKILL is not set
386# CONFIG_NET_9P is not set 408# CONFIG_NET_9P is not set
@@ -401,6 +423,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
401# CONFIG_MTD is not set 423# CONFIG_MTD is not set
402CONFIG_OF_DEVICE=y 424CONFIG_OF_DEVICE=y
403CONFIG_OF_I2C=y 425CONFIG_OF_I2C=y
426CONFIG_OF_MDIO=y
404# CONFIG_PARPORT is not set 427# CONFIG_PARPORT is not set
405CONFIG_BLK_DEV=y 428CONFIG_BLK_DEV=y
406# CONFIG_BLK_DEV_FD is not set 429# CONFIG_BLK_DEV_FD is not set
@@ -435,7 +458,9 @@ CONFIG_MISC_DEVICES=y
435# 458#
436# CONFIG_EEPROM_AT24 is not set 459# CONFIG_EEPROM_AT24 is not set
437# CONFIG_EEPROM_LEGACY is not set 460# CONFIG_EEPROM_LEGACY is not set
461# CONFIG_EEPROM_MAX6875 is not set
438# CONFIG_EEPROM_93CX6 is not set 462# CONFIG_EEPROM_93CX6 is not set
463# CONFIG_CB710_CORE is not set
439CONFIG_HAVE_IDE=y 464CONFIG_HAVE_IDE=y
440# CONFIG_IDE is not set 465# CONFIG_IDE is not set
441 466
@@ -455,14 +480,17 @@ CONFIG_HAVE_IDE=y
455# 480#
456 481
457# 482#
458# Enable only one of the two stacks, unless you know what you are doing 483# You can enable one or both FireWire driver stacks.
484#
485
486#
487# See the help texts for more information.
459# 488#
460# CONFIG_FIREWIRE is not set 489# CONFIG_FIREWIRE is not set
461# CONFIG_IEEE1394 is not set 490# CONFIG_IEEE1394 is not set
462# CONFIG_I2O is not set 491# CONFIG_I2O is not set
463# CONFIG_MACINTOSH_DRIVERS is not set 492# CONFIG_MACINTOSH_DRIVERS is not set
464CONFIG_NETDEVICES=y 493CONFIG_NETDEVICES=y
465CONFIG_COMPAT_NET_DEV_OPS=y
466# CONFIG_DUMMY is not set 494# CONFIG_DUMMY is not set
467# CONFIG_BONDING is not set 495# CONFIG_BONDING is not set
468# CONFIG_MACVLAN is not set 496# CONFIG_MACVLAN is not set
@@ -509,6 +537,7 @@ CONFIG_MII=y
509# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 537# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
510# CONFIG_NET_PCI is not set 538# CONFIG_NET_PCI is not set
511# CONFIG_B44 is not set 539# CONFIG_B44 is not set
540# CONFIG_KS8842 is not set
512# CONFIG_ATL2 is not set 541# CONFIG_ATL2 is not set
513CONFIG_NETDEV_1000=y 542CONFIG_NETDEV_1000=y
514# CONFIG_ACENIC is not set 543# CONFIG_ACENIC is not set
@@ -528,8 +557,10 @@ CONFIG_NETDEV_1000=y
528# CONFIG_VIA_VELOCITY is not set 557# CONFIG_VIA_VELOCITY is not set
529# CONFIG_TIGON3 is not set 558# CONFIG_TIGON3 is not set
530# CONFIG_BNX2 is not set 559# CONFIG_BNX2 is not set
560# CONFIG_CNIC is not set
531CONFIG_FSL_PQ_MDIO=y 561CONFIG_FSL_PQ_MDIO=y
532CONFIG_GIANFAR=y 562CONFIG_GIANFAR=y
563# CONFIG_MV643XX_ETH is not set
533# CONFIG_QLA3XXX is not set 564# CONFIG_QLA3XXX is not set
534# CONFIG_ATL1 is not set 565# CONFIG_ATL1 is not set
535# CONFIG_ATL1E is not set 566# CONFIG_ATL1E is not set
@@ -688,13 +719,17 @@ CONFIG_I2C_MPC=y
688# CONFIG_SENSORS_PCF8574 is not set 719# CONFIG_SENSORS_PCF8574 is not set
689# CONFIG_PCF8575 is not set 720# CONFIG_PCF8575 is not set
690# CONFIG_SENSORS_PCA9539 is not set 721# CONFIG_SENSORS_PCA9539 is not set
691# CONFIG_SENSORS_MAX6875 is not set
692# CONFIG_SENSORS_TSL2550 is not set 722# CONFIG_SENSORS_TSL2550 is not set
693# CONFIG_I2C_DEBUG_CORE is not set 723# CONFIG_I2C_DEBUG_CORE is not set
694# CONFIG_I2C_DEBUG_ALGO is not set 724# CONFIG_I2C_DEBUG_ALGO is not set
695# CONFIG_I2C_DEBUG_BUS is not set 725# CONFIG_I2C_DEBUG_BUS is not set
696# CONFIG_I2C_DEBUG_CHIP is not set 726# CONFIG_I2C_DEBUG_CHIP is not set
697# CONFIG_SPI is not set 727# CONFIG_SPI is not set
728
729#
730# PPS support
731#
732# CONFIG_PPS is not set
698CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 733CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
699# CONFIG_GPIOLIB is not set 734# CONFIG_GPIOLIB is not set
700# CONFIG_W1 is not set 735# CONFIG_W1 is not set
@@ -749,6 +784,7 @@ CONFIG_HWMON=y
749# CONFIG_SENSORS_SMSC47B397 is not set 784# CONFIG_SENSORS_SMSC47B397 is not set
750# CONFIG_SENSORS_ADS7828 is not set 785# CONFIG_SENSORS_ADS7828 is not set
751# CONFIG_SENSORS_THMC50 is not set 786# CONFIG_SENSORS_THMC50 is not set
787# CONFIG_SENSORS_TMP401 is not set
752# CONFIG_SENSORS_VIA686A is not set 788# CONFIG_SENSORS_VIA686A is not set
753# CONFIG_SENSORS_VT1211 is not set 789# CONFIG_SENSORS_VT1211 is not set
754# CONFIG_SENSORS_VT8231 is not set 790# CONFIG_SENSORS_VT8231 is not set
@@ -797,23 +833,9 @@ CONFIG_SSB_POSSIBLE=y
797# CONFIG_MFD_WM8400 is not set 833# CONFIG_MFD_WM8400 is not set
798# CONFIG_MFD_WM8350_I2C is not set 834# CONFIG_MFD_WM8350_I2C is not set
799# CONFIG_MFD_PCF50633 is not set 835# CONFIG_MFD_PCF50633 is not set
836# CONFIG_AB3100_CORE is not set
800# CONFIG_REGULATOR is not set 837# CONFIG_REGULATOR is not set
801 838# CONFIG_MEDIA_SUPPORT is not set
802#
803# Multimedia devices
804#
805
806#
807# Multimedia core support
808#
809# CONFIG_VIDEO_DEV is not set
810# CONFIG_DVB_CORE is not set
811# CONFIG_VIDEO_MEDIA is not set
812
813#
814# Multimedia drivers
815#
816# CONFIG_DAB is not set
817 839
818# 840#
819# Graphics support 841# Graphics support
@@ -851,6 +873,10 @@ CONFIG_HID=y
851# CONFIG_DMADEVICES is not set 873# CONFIG_DMADEVICES is not set
852# CONFIG_AUXDISPLAY is not set 874# CONFIG_AUXDISPLAY is not set
853# CONFIG_UIO is not set 875# CONFIG_UIO is not set
876
877#
878# TI VLYNQ
879#
854# CONFIG_STAGING is not set 880# CONFIG_STAGING is not set
855 881
856# 882#
@@ -862,10 +888,12 @@ CONFIG_HID=y
862# CONFIG_REISERFS_FS is not set 888# CONFIG_REISERFS_FS is not set
863# CONFIG_JFS_FS is not set 889# CONFIG_JFS_FS is not set
864# CONFIG_FS_POSIX_ACL is not set 890# CONFIG_FS_POSIX_ACL is not set
865CONFIG_FILE_LOCKING=y
866# CONFIG_XFS_FS is not set 891# CONFIG_XFS_FS is not set
892# CONFIG_GFS2_FS is not set
867# CONFIG_OCFS2_FS is not set 893# CONFIG_OCFS2_FS is not set
868# CONFIG_BTRFS_FS is not set 894# CONFIG_BTRFS_FS is not set
895CONFIG_FILE_LOCKING=y
896CONFIG_FSNOTIFY=y
869CONFIG_DNOTIFY=y 897CONFIG_DNOTIFY=y
870CONFIG_INOTIFY=y 898CONFIG_INOTIFY=y
871CONFIG_INOTIFY_USER=y 899CONFIG_INOTIFY_USER=y
@@ -928,6 +956,7 @@ CONFIG_NFS_FS=y
928CONFIG_NFS_V3=y 956CONFIG_NFS_V3=y
929# CONFIG_NFS_V3_ACL is not set 957# CONFIG_NFS_V3_ACL is not set
930CONFIG_NFS_V4=y 958CONFIG_NFS_V4=y
959# CONFIG_NFS_V4_1 is not set
931CONFIG_ROOT_NFS=y 960CONFIG_ROOT_NFS=y
932# CONFIG_NFSD is not set 961# CONFIG_NFSD is not set
933CONFIG_LOCKD=y 962CONFIG_LOCKD=y
@@ -971,6 +1000,7 @@ CONFIG_HAS_IOPORT=y
971CONFIG_HAS_DMA=y 1000CONFIG_HAS_DMA=y
972CONFIG_HAVE_LMB=y 1001CONFIG_HAVE_LMB=y
973CONFIG_NLATTR=y 1002CONFIG_NLATTR=y
1003CONFIG_GENERIC_ATOMIC64=y
974 1004
975# 1005#
976# Kernel hacking 1006# Kernel hacking
@@ -994,22 +1024,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
994CONFIG_HAVE_DYNAMIC_FTRACE=y 1024CONFIG_HAVE_DYNAMIC_FTRACE=y
995CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1025CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
996CONFIG_TRACING_SUPPORT=y 1026CONFIG_TRACING_SUPPORT=y
997 1027# CONFIG_FTRACE is not set
998#
999# Tracers
1000#
1001# CONFIG_FUNCTION_TRACER is not set
1002# CONFIG_SCHED_TRACER is not set
1003# CONFIG_CONTEXT_SWITCH_TRACER is not set
1004# CONFIG_EVENT_TRACER is not set
1005# CONFIG_BOOT_TRACER is not set
1006# CONFIG_TRACE_BRANCH_PROFILING is not set
1007# CONFIG_STACK_TRACER is not set
1008# CONFIG_KMEMTRACE is not set
1009# CONFIG_WORKQUEUE_TRACER is not set
1010# CONFIG_BLK_DEV_IO_TRACE is not set
1011# CONFIG_SAMPLES is not set 1028# CONFIG_SAMPLES is not set
1012CONFIG_HAVE_ARCH_KGDB=y 1029CONFIG_HAVE_ARCH_KGDB=y
1030# CONFIG_PPC_DISABLE_WERROR is not set
1031CONFIG_PPC_WERROR=y
1013CONFIG_PRINT_STACK_DEPTH=64 1032CONFIG_PRINT_STACK_DEPTH=64
1014# CONFIG_IRQSTACKS is not set 1033# CONFIG_IRQSTACKS is not set
1015# CONFIG_BOOTX_TEXT is not set 1034# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/85xx/ksi8560_defconfig b/arch/powerpc/configs/85xx/ksi8560_defconfig
index 09146ddaa3c..ff04e1028f5 100644
--- a/arch/powerpc/configs/85xx/ksi8560_defconfig
+++ b/arch/powerpc/configs/85xx/ksi8560_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:16 2009 4# Wed Jul 29 23:32:14 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12CONFIG_PPC_85xx=y 12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -34,15 +34,16 @@ CONFIG_GENERIC_TIME=y
34CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
35CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
36CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
38CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
39CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
40CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
41CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
42CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
43CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
44CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
45CONFIG_GENERIC_CALIBRATE_DELAY=y
46CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
47CONFIG_GENERIC_GPIO=y 48CONFIG_GENERIC_GPIO=y
48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 49# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -57,11 +58,13 @@ CONFIG_PPC_UDBG_16550=y
57# CONFIG_GENERIC_TBSYNC is not set 58# CONFIG_GENERIC_TBSYNC is not set
58CONFIG_AUDIT_ARCH=y 59CONFIG_AUDIT_ARCH=y
59CONFIG_GENERIC_BUG=y 60CONFIG_GENERIC_BUG=y
61CONFIG_DTC=y
60CONFIG_DEFAULT_UIMAGE=y 62CONFIG_DEFAULT_UIMAGE=y
61# CONFIG_PPC_DCR_NATIVE is not set 63# CONFIG_PPC_DCR_NATIVE is not set
62# CONFIG_PPC_DCR_MMIO is not set 64# CONFIG_PPC_DCR_MMIO is not set
63CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 65CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
64CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 66CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
67CONFIG_CONSTRUCTORS=y
65 68
66# 69#
67# General setup 70# General setup
@@ -108,7 +111,6 @@ CONFIG_SYSCTL_SYSCALL=y
108CONFIG_KALLSYMS=y 111CONFIG_KALLSYMS=y
109# CONFIG_KALLSYMS_ALL is not set 112# CONFIG_KALLSYMS_ALL is not set
110# CONFIG_KALLSYMS_EXTRA_PASS is not set 113# CONFIG_KALLSYMS_EXTRA_PASS is not set
111# CONFIG_STRIP_ASM_SYMS is not set
112CONFIG_HOTPLUG=y 114CONFIG_HOTPLUG=y
113CONFIG_PRINTK=y 115CONFIG_PRINTK=y
114CONFIG_BUG=y 116CONFIG_BUG=y
@@ -121,8 +123,15 @@ CONFIG_TIMERFD=y
121CONFIG_EVENTFD=y 123CONFIG_EVENTFD=y
122CONFIG_SHMEM=y 124CONFIG_SHMEM=y
123CONFIG_AIO=y 125CONFIG_AIO=y
126CONFIG_HAVE_PERF_COUNTERS=y
127
128#
129# Performance Counters
130#
131# CONFIG_PERF_COUNTERS is not set
124CONFIG_VM_EVENT_COUNTERS=y 132CONFIG_VM_EVENT_COUNTERS=y
125CONFIG_SLUB_DEBUG=y 133CONFIG_SLUB_DEBUG=y
134# CONFIG_STRIP_ASM_SYMS is not set
126CONFIG_COMPAT_BRK=y 135CONFIG_COMPAT_BRK=y
127# CONFIG_SLAB is not set 136# CONFIG_SLAB is not set
128CONFIG_SLUB=y 137CONFIG_SLUB=y
@@ -136,6 +145,11 @@ CONFIG_HAVE_KPROBES=y
136CONFIG_HAVE_KRETPROBES=y 145CONFIG_HAVE_KRETPROBES=y
137CONFIG_HAVE_ARCH_TRACEHOOK=y 146CONFIG_HAVE_ARCH_TRACEHOOK=y
138CONFIG_HAVE_CLK=y 147CONFIG_HAVE_CLK=y
148
149#
150# GCOV-based kernel profiling
151#
152# CONFIG_GCOV_KERNEL is not set
139# CONFIG_SLOW_WORK is not set 153# CONFIG_SLOW_WORK is not set
140# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 154# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
141CONFIG_SLABINFO=y 155CONFIG_SLABINFO=y
@@ -143,7 +157,7 @@ CONFIG_RT_MUTEXES=y
143CONFIG_BASE_SMALL=0 157CONFIG_BASE_SMALL=0
144# CONFIG_MODULES is not set 158# CONFIG_MODULES is not set
145CONFIG_BLOCK=y 159CONFIG_BLOCK=y
146# CONFIG_LBD is not set 160CONFIG_LBDAF=y
147# CONFIG_BLK_DEV_BSG is not set 161# CONFIG_BLK_DEV_BSG is not set
148# CONFIG_BLK_DEV_INTEGRITY is not set 162# CONFIG_BLK_DEV_INTEGRITY is not set
149 163
@@ -176,6 +190,7 @@ CONFIG_MPC85xx=y
176# CONFIG_MPC85xx_DS is not set 190# CONFIG_MPC85xx_DS is not set
177# CONFIG_SOCRATES is not set 191# CONFIG_SOCRATES is not set
178CONFIG_KSI8560=y 192CONFIG_KSI8560=y
193# CONFIG_XES_MPC85xx is not set
179# CONFIG_STX_GP3 is not set 194# CONFIG_STX_GP3 is not set
180# CONFIG_TQM8540 is not set 195# CONFIG_TQM8540 is not set
181# CONFIG_TQM8541 is not set 196# CONFIG_TQM8541 is not set
@@ -224,6 +239,7 @@ CONFIG_BINFMT_ELF=y
224CONFIG_BINFMT_MISC=y 239CONFIG_BINFMT_MISC=y
225CONFIG_MATH_EMULATION=y 240CONFIG_MATH_EMULATION=y
226# CONFIG_IOMMU_HELPER is not set 241# CONFIG_IOMMU_HELPER is not set
242# CONFIG_SWIOTLB is not set
227CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 243CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
228CONFIG_ARCH_HAS_WALK_MEMORY=y 244CONFIG_ARCH_HAS_WALK_MEMORY=y
229CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 245CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -242,9 +258,9 @@ CONFIG_MIGRATION=y
242CONFIG_ZONE_DMA_FLAG=1 258CONFIG_ZONE_DMA_FLAG=1
243CONFIG_BOUNCE=y 259CONFIG_BOUNCE=y
244CONFIG_VIRT_TO_BUS=y 260CONFIG_VIRT_TO_BUS=y
245CONFIG_UNEVICTABLE_LRU=y
246CONFIG_HAVE_MLOCK=y 261CONFIG_HAVE_MLOCK=y
247CONFIG_HAVE_MLOCKED_PAGE_BIT=y 262CONFIG_HAVE_MLOCKED_PAGE_BIT=y
263CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
248CONFIG_PPC_4K_PAGES=y 264CONFIG_PPC_4K_PAGES=y
249# CONFIG_PPC_16K_PAGES is not set 265# CONFIG_PPC_16K_PAGES is not set
250# CONFIG_PPC_64K_PAGES is not set 266# CONFIG_PPC_64K_PAGES is not set
@@ -346,6 +362,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
346# CONFIG_ECONET is not set 362# CONFIG_ECONET is not set
347# CONFIG_WAN_ROUTER is not set 363# CONFIG_WAN_ROUTER is not set
348# CONFIG_PHONET is not set 364# CONFIG_PHONET is not set
365# CONFIG_IEEE802154 is not set
349# CONFIG_NET_SCHED is not set 366# CONFIG_NET_SCHED is not set
350# CONFIG_DCB is not set 367# CONFIG_DCB is not set
351 368
@@ -363,7 +380,11 @@ CONFIG_WIRELESS=y
363CONFIG_WIRELESS_OLD_REGULATORY=y 380CONFIG_WIRELESS_OLD_REGULATORY=y
364# CONFIG_WIRELESS_EXT is not set 381# CONFIG_WIRELESS_EXT is not set
365# CONFIG_LIB80211 is not set 382# CONFIG_LIB80211 is not set
366# CONFIG_MAC80211 is not set 383
384#
385# CFG80211 needs to be enabled for MAC80211
386#
387CONFIG_MAC80211_DEFAULT_PS_VALUE=0
367# CONFIG_WIMAX is not set 388# CONFIG_WIMAX is not set
368# CONFIG_RFKILL is not set 389# CONFIG_RFKILL is not set
369# CONFIG_NET_9P is not set 390# CONFIG_NET_9P is not set
@@ -466,6 +487,7 @@ CONFIG_MTD_PHYSMAP_OF=y
466# CONFIG_MTD_UBI is not set 487# CONFIG_MTD_UBI is not set
467CONFIG_OF_DEVICE=y 488CONFIG_OF_DEVICE=y
468CONFIG_OF_GPIO=y 489CONFIG_OF_GPIO=y
490CONFIG_OF_MDIO=y
469# CONFIG_PARPORT is not set 491# CONFIG_PARPORT is not set
470CONFIG_BLK_DEV=y 492CONFIG_BLK_DEV=y
471# CONFIG_BLK_DEV_FD is not set 493# CONFIG_BLK_DEV_FD is not set
@@ -520,7 +542,6 @@ CONFIG_IDE_PROC_FS=y
520# CONFIG_MD is not set 542# CONFIG_MD is not set
521# CONFIG_MACINTOSH_DRIVERS is not set 543# CONFIG_MACINTOSH_DRIVERS is not set
522CONFIG_NETDEVICES=y 544CONFIG_NETDEVICES=y
523CONFIG_COMPAT_NET_DEV_OPS=y
524# CONFIG_DUMMY is not set 545# CONFIG_DUMMY is not set
525# CONFIG_BONDING is not set 546# CONFIG_BONDING is not set
526# CONFIG_MACVLAN is not set 547# CONFIG_MACVLAN is not set
@@ -560,6 +581,7 @@ CONFIG_MII=y
560# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 581# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
561# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 582# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
562# CONFIG_B44 is not set 583# CONFIG_B44 is not set
584# CONFIG_KS8842 is not set
563CONFIG_FS_ENET=y 585CONFIG_FS_ENET=y
564# CONFIG_FS_ENET_HAS_SCC is not set 586# CONFIG_FS_ENET_HAS_SCC is not set
565CONFIG_FS_ENET_HAS_FCC=y 587CONFIG_FS_ENET_HAS_FCC=y
@@ -567,6 +589,7 @@ CONFIG_FS_ENET_MDIO_FCC=y
567CONFIG_NETDEV_1000=y 589CONFIG_NETDEV_1000=y
568CONFIG_FSL_PQ_MDIO=y 590CONFIG_FSL_PQ_MDIO=y
569CONFIG_GIANFAR=y 591CONFIG_GIANFAR=y
592# CONFIG_MV643XX_ETH is not set
570CONFIG_NETDEV_10000=y 593CONFIG_NETDEV_10000=y
571 594
572# 595#
@@ -654,6 +677,11 @@ CONFIG_GEN_RTC=y
654# CONFIG_TCG_TPM is not set 677# CONFIG_TCG_TPM is not set
655# CONFIG_I2C is not set 678# CONFIG_I2C is not set
656# CONFIG_SPI is not set 679# CONFIG_SPI is not set
680
681#
682# PPS support
683#
684# CONFIG_PPS is not set
657CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 685CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
658CONFIG_ARCH_REQUIRE_GPIOLIB=y 686CONFIG_ARCH_REQUIRE_GPIOLIB=y
659CONFIG_GPIOLIB=y 687CONFIG_GPIOLIB=y
@@ -710,22 +738,7 @@ CONFIG_SSB_POSSIBLE=y
710# CONFIG_HTC_PASIC3 is not set 738# CONFIG_HTC_PASIC3 is not set
711# CONFIG_MFD_TMIO is not set 739# CONFIG_MFD_TMIO is not set
712# CONFIG_REGULATOR is not set 740# CONFIG_REGULATOR is not set
713 741# CONFIG_MEDIA_SUPPORT is not set
714#
715# Multimedia devices
716#
717
718#
719# Multimedia core support
720#
721# CONFIG_VIDEO_DEV is not set
722# CONFIG_DVB_CORE is not set
723# CONFIG_VIDEO_MEDIA is not set
724
725#
726# Multimedia drivers
727#
728CONFIG_DAB=y
729 742
730# 743#
731# Graphics support 744# Graphics support
@@ -777,6 +790,10 @@ CONFIG_USB_SUPPORT=y
777# CONFIG_DMADEVICES is not set 790# CONFIG_DMADEVICES is not set
778# CONFIG_AUXDISPLAY is not set 791# CONFIG_AUXDISPLAY is not set
779# CONFIG_UIO is not set 792# CONFIG_UIO is not set
793
794#
795# TI VLYNQ
796#
780# CONFIG_STAGING is not set 797# CONFIG_STAGING is not set
781 798
782# 799#
@@ -797,10 +814,12 @@ CONFIG_FS_MBCACHE=y
797# CONFIG_REISERFS_FS is not set 814# CONFIG_REISERFS_FS is not set
798# CONFIG_JFS_FS is not set 815# CONFIG_JFS_FS is not set
799# CONFIG_FS_POSIX_ACL is not set 816# CONFIG_FS_POSIX_ACL is not set
800CONFIG_FILE_LOCKING=y
801# CONFIG_XFS_FS is not set 817# CONFIG_XFS_FS is not set
818# CONFIG_GFS2_FS is not set
802# CONFIG_OCFS2_FS is not set 819# CONFIG_OCFS2_FS is not set
803# CONFIG_BTRFS_FS is not set 820# CONFIG_BTRFS_FS is not set
821CONFIG_FILE_LOCKING=y
822CONFIG_FSNOTIFY=y
804CONFIG_DNOTIFY=y 823CONFIG_DNOTIFY=y
805CONFIG_INOTIFY=y 824CONFIG_INOTIFY=y
806CONFIG_INOTIFY_USER=y 825CONFIG_INOTIFY_USER=y
@@ -916,6 +935,7 @@ CONFIG_HAS_IOPORT=y
916CONFIG_HAS_DMA=y 935CONFIG_HAS_DMA=y
917CONFIG_HAVE_LMB=y 936CONFIG_HAVE_LMB=y
918CONFIG_NLATTR=y 937CONFIG_NLATTR=y
938CONFIG_GENERIC_ATOMIC64=y
919 939
920# 940#
921# Kernel hacking 941# Kernel hacking
@@ -946,6 +966,9 @@ CONFIG_SCHED_DEBUG=y
946# CONFIG_RT_MUTEX_TESTER is not set 966# CONFIG_RT_MUTEX_TESTER is not set
947# CONFIG_DEBUG_SPINLOCK is not set 967# CONFIG_DEBUG_SPINLOCK is not set
948CONFIG_DEBUG_MUTEXES=y 968CONFIG_DEBUG_MUTEXES=y
969# CONFIG_DEBUG_LOCK_ALLOC is not set
970# CONFIG_PROVE_LOCKING is not set
971# CONFIG_LOCK_STAT is not set
949# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 972# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
950# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 973# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
951# CONFIG_DEBUG_KOBJECT is not set 974# CONFIG_DEBUG_KOBJECT is not set
@@ -958,7 +981,6 @@ CONFIG_DEBUG_MUTEXES=y
958# CONFIG_DEBUG_LIST is not set 981# CONFIG_DEBUG_LIST is not set
959# CONFIG_DEBUG_SG is not set 982# CONFIG_DEBUG_SG is not set
960# CONFIG_DEBUG_NOTIFIERS is not set 983# CONFIG_DEBUG_NOTIFIERS is not set
961# CONFIG_BOOT_PRINTK_DELAY is not set
962# CONFIG_RCU_TORTURE_TEST is not set 984# CONFIG_RCU_TORTURE_TEST is not set
963# CONFIG_RCU_CPU_STALL_DETECTOR is not set 985# CONFIG_RCU_CPU_STALL_DETECTOR is not set
964# CONFIG_BACKTRACE_SELF_TEST is not set 986# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -972,16 +994,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
972CONFIG_HAVE_DYNAMIC_FTRACE=y 994CONFIG_HAVE_DYNAMIC_FTRACE=y
973CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 995CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
974CONFIG_TRACING_SUPPORT=y 996CONFIG_TRACING_SUPPORT=y
975 997CONFIG_FTRACE=y
976#
977# Tracers
978#
979# CONFIG_FUNCTION_TRACER is not set 998# CONFIG_FUNCTION_TRACER is not set
999# CONFIG_IRQSOFF_TRACER is not set
980# CONFIG_SCHED_TRACER is not set 1000# CONFIG_SCHED_TRACER is not set
981# CONFIG_CONTEXT_SWITCH_TRACER is not set 1001# CONFIG_ENABLE_DEFAULT_TRACERS is not set
982# CONFIG_EVENT_TRACER is not set
983# CONFIG_BOOT_TRACER is not set 1002# CONFIG_BOOT_TRACER is not set
984# CONFIG_TRACE_BRANCH_PROFILING is not set 1003CONFIG_BRANCH_PROFILE_NONE=y
1004# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1005# CONFIG_PROFILE_ALL_BRANCHES is not set
985# CONFIG_STACK_TRACER is not set 1006# CONFIG_STACK_TRACER is not set
986# CONFIG_KMEMTRACE is not set 1007# CONFIG_KMEMTRACE is not set
987# CONFIG_WORKQUEUE_TRACER is not set 1008# CONFIG_WORKQUEUE_TRACER is not set
@@ -990,9 +1011,13 @@ CONFIG_TRACING_SUPPORT=y
990# CONFIG_SAMPLES is not set 1011# CONFIG_SAMPLES is not set
991CONFIG_HAVE_ARCH_KGDB=y 1012CONFIG_HAVE_ARCH_KGDB=y
992# CONFIG_KGDB is not set 1013# CONFIG_KGDB is not set
1014# CONFIG_KMEMCHECK is not set
1015# CONFIG_PPC_DISABLE_WERROR is not set
1016CONFIG_PPC_WERROR=y
993CONFIG_PRINT_STACK_DEPTH=64 1017CONFIG_PRINT_STACK_DEPTH=64
994# CONFIG_DEBUG_STACKOVERFLOW is not set 1018# CONFIG_DEBUG_STACKOVERFLOW is not set
995# CONFIG_DEBUG_STACK_USAGE is not set 1019# CONFIG_DEBUG_STACK_USAGE is not set
1020# CONFIG_PPC_EMULATED_STATS is not set
996# CONFIG_CODE_PATCHING_SELFTEST is not set 1021# CONFIG_CODE_PATCHING_SELFTEST is not set
997# CONFIG_FTR_FIXUP_SELFTEST is not set 1022# CONFIG_FTR_FIXUP_SELFTEST is not set
998# CONFIG_MSI_BITMAP_SELFTEST is not set 1023# CONFIG_MSI_BITMAP_SELFTEST is not set
diff --git a/arch/powerpc/configs/85xx/mpc8540_ads_defconfig b/arch/powerpc/configs/85xx/mpc8540_ads_defconfig
index 7b43be7586b..fb10cc83702 100644
--- a/arch/powerpc/configs/85xx/mpc8540_ads_defconfig
+++ b/arch/powerpc/configs/85xx/mpc8540_ads_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:17 2009 4# Wed Jul 29 23:32:15 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12CONFIG_PPC_85xx=y 12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -34,15 +34,16 @@ CONFIG_GENERIC_TIME=y
34CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
35CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
36CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
38CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
39CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
40CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
41CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
42CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
43CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
44CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
45CONFIG_GENERIC_CALIBRATE_DELAY=y
46CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
48CONFIG_PPC=y 49CONFIG_PPC=y
@@ -56,11 +57,13 @@ CONFIG_PPC_UDBG_16550=y
56# CONFIG_GENERIC_TBSYNC is not set 57# CONFIG_GENERIC_TBSYNC is not set
57CONFIG_AUDIT_ARCH=y 58CONFIG_AUDIT_ARCH=y
58CONFIG_GENERIC_BUG=y 59CONFIG_GENERIC_BUG=y
60CONFIG_DTC=y
59CONFIG_DEFAULT_UIMAGE=y 61CONFIG_DEFAULT_UIMAGE=y
60# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
61# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
62CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
63CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
64 67
65# 68#
66# General setup 69# General setup
@@ -111,7 +114,6 @@ CONFIG_SYSCTL_SYSCALL=y
111CONFIG_KALLSYMS=y 114CONFIG_KALLSYMS=y
112# CONFIG_KALLSYMS_ALL is not set 115# CONFIG_KALLSYMS_ALL is not set
113# CONFIG_KALLSYMS_EXTRA_PASS is not set 116# CONFIG_KALLSYMS_EXTRA_PASS is not set
114# CONFIG_STRIP_ASM_SYMS is not set
115CONFIG_HOTPLUG=y 117CONFIG_HOTPLUG=y
116CONFIG_PRINTK=y 118CONFIG_PRINTK=y
117CONFIG_BUG=y 119CONFIG_BUG=y
@@ -124,8 +126,15 @@ CONFIG_TIMERFD=y
124CONFIG_EVENTFD=y 126CONFIG_EVENTFD=y
125CONFIG_SHMEM=y 127CONFIG_SHMEM=y
126CONFIG_AIO=y 128CONFIG_AIO=y
129CONFIG_HAVE_PERF_COUNTERS=y
130
131#
132# Performance Counters
133#
134# CONFIG_PERF_COUNTERS is not set
127CONFIG_VM_EVENT_COUNTERS=y 135CONFIG_VM_EVENT_COUNTERS=y
128CONFIG_SLUB_DEBUG=y 136CONFIG_SLUB_DEBUG=y
137# CONFIG_STRIP_ASM_SYMS is not set
129CONFIG_COMPAT_BRK=y 138CONFIG_COMPAT_BRK=y
130# CONFIG_SLAB is not set 139# CONFIG_SLAB is not set
131CONFIG_SLUB=y 140CONFIG_SLUB=y
@@ -138,6 +147,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
138CONFIG_HAVE_KPROBES=y 147CONFIG_HAVE_KPROBES=y
139CONFIG_HAVE_KRETPROBES=y 148CONFIG_HAVE_KRETPROBES=y
140CONFIG_HAVE_ARCH_TRACEHOOK=y 149CONFIG_HAVE_ARCH_TRACEHOOK=y
150
151#
152# GCOV-based kernel profiling
153#
141# CONFIG_SLOW_WORK is not set 154# CONFIG_SLOW_WORK is not set
142# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 155# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
143CONFIG_SLABINFO=y 156CONFIG_SLABINFO=y
@@ -145,7 +158,7 @@ CONFIG_RT_MUTEXES=y
145CONFIG_BASE_SMALL=0 158CONFIG_BASE_SMALL=0
146# CONFIG_MODULES is not set 159# CONFIG_MODULES is not set
147CONFIG_BLOCK=y 160CONFIG_BLOCK=y
148# CONFIG_LBD is not set 161CONFIG_LBDAF=y
149# CONFIG_BLK_DEV_BSG is not set 162# CONFIG_BLK_DEV_BSG is not set
150# CONFIG_BLK_DEV_INTEGRITY is not set 163# CONFIG_BLK_DEV_INTEGRITY is not set
151 164
@@ -178,6 +191,7 @@ CONFIG_MPC8540_ADS=y
178# CONFIG_MPC85xx_DS is not set 191# CONFIG_MPC85xx_DS is not set
179# CONFIG_SOCRATES is not set 192# CONFIG_SOCRATES is not set
180# CONFIG_KSI8560 is not set 193# CONFIG_KSI8560 is not set
194# CONFIG_XES_MPC85xx is not set
181# CONFIG_STX_GP3 is not set 195# CONFIG_STX_GP3 is not set
182# CONFIG_TQM8540 is not set 196# CONFIG_TQM8540 is not set
183# CONFIG_TQM8541 is not set 197# CONFIG_TQM8541 is not set
@@ -226,6 +240,7 @@ CONFIG_BINFMT_ELF=y
226CONFIG_BINFMT_MISC=y 240CONFIG_BINFMT_MISC=y
227CONFIG_MATH_EMULATION=y 241CONFIG_MATH_EMULATION=y
228# CONFIG_IOMMU_HELPER is not set 242# CONFIG_IOMMU_HELPER is not set
243# CONFIG_SWIOTLB is not set
229CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 244CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
230CONFIG_ARCH_HAS_WALK_MEMORY=y 245CONFIG_ARCH_HAS_WALK_MEMORY=y
231CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 246CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -244,9 +259,9 @@ CONFIG_MIGRATION=y
244CONFIG_ZONE_DMA_FLAG=1 259CONFIG_ZONE_DMA_FLAG=1
245CONFIG_BOUNCE=y 260CONFIG_BOUNCE=y
246CONFIG_VIRT_TO_BUS=y 261CONFIG_VIRT_TO_BUS=y
247CONFIG_UNEVICTABLE_LRU=y
248CONFIG_HAVE_MLOCK=y 262CONFIG_HAVE_MLOCK=y
249CONFIG_HAVE_MLOCKED_PAGE_BIT=y 263CONFIG_HAVE_MLOCKED_PAGE_BIT=y
264CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
250CONFIG_PPC_4K_PAGES=y 265CONFIG_PPC_4K_PAGES=y
251# CONFIG_PPC_16K_PAGES is not set 266# CONFIG_PPC_16K_PAGES is not set
252# CONFIG_PPC_64K_PAGES is not set 267# CONFIG_PPC_64K_PAGES is not set
@@ -348,6 +363,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
348# CONFIG_ECONET is not set 363# CONFIG_ECONET is not set
349# CONFIG_WAN_ROUTER is not set 364# CONFIG_WAN_ROUTER is not set
350# CONFIG_PHONET is not set 365# CONFIG_PHONET is not set
366# CONFIG_IEEE802154 is not set
351# CONFIG_NET_SCHED is not set 367# CONFIG_NET_SCHED is not set
352# CONFIG_DCB is not set 368# CONFIG_DCB is not set
353 369
@@ -365,7 +381,11 @@ CONFIG_WIRELESS=y
365CONFIG_WIRELESS_OLD_REGULATORY=y 381CONFIG_WIRELESS_OLD_REGULATORY=y
366# CONFIG_WIRELESS_EXT is not set 382# CONFIG_WIRELESS_EXT is not set
367# CONFIG_LIB80211 is not set 383# CONFIG_LIB80211 is not set
368# CONFIG_MAC80211 is not set 384
385#
386# CFG80211 needs to be enabled for MAC80211
387#
388CONFIG_MAC80211_DEFAULT_PS_VALUE=0
369# CONFIG_WIMAX is not set 389# CONFIG_WIMAX is not set
370# CONFIG_RFKILL is not set 390# CONFIG_RFKILL is not set
371# CONFIG_NET_9P is not set 391# CONFIG_NET_9P is not set
@@ -387,6 +407,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
387# CONFIG_CONNECTOR is not set 407# CONFIG_CONNECTOR is not set
388# CONFIG_MTD is not set 408# CONFIG_MTD is not set
389CONFIG_OF_DEVICE=y 409CONFIG_OF_DEVICE=y
410CONFIG_OF_MDIO=y
390# CONFIG_PARPORT is not set 411# CONFIG_PARPORT is not set
391CONFIG_BLK_DEV=y 412CONFIG_BLK_DEV=y
392# CONFIG_BLK_DEV_FD is not set 413# CONFIG_BLK_DEV_FD is not set
@@ -423,7 +444,6 @@ CONFIG_HAVE_IDE=y
423# CONFIG_MD is not set 444# CONFIG_MD is not set
424# CONFIG_MACINTOSH_DRIVERS is not set 445# CONFIG_MACINTOSH_DRIVERS is not set
425CONFIG_NETDEVICES=y 446CONFIG_NETDEVICES=y
426CONFIG_COMPAT_NET_DEV_OPS=y
427# CONFIG_DUMMY is not set 447# CONFIG_DUMMY is not set
428# CONFIG_BONDING is not set 448# CONFIG_BONDING is not set
429# CONFIG_MACVLAN is not set 449# CONFIG_MACVLAN is not set
@@ -462,9 +482,11 @@ CONFIG_MII=y
462# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 482# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
463# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 483# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
464# CONFIG_B44 is not set 484# CONFIG_B44 is not set
485# CONFIG_KS8842 is not set
465CONFIG_NETDEV_1000=y 486CONFIG_NETDEV_1000=y
466CONFIG_FSL_PQ_MDIO=y 487CONFIG_FSL_PQ_MDIO=y
467CONFIG_GIANFAR=y 488CONFIG_GIANFAR=y
489# CONFIG_MV643XX_ETH is not set
468CONFIG_NETDEV_10000=y 490CONFIG_NETDEV_10000=y
469 491
470# 492#
@@ -555,6 +577,11 @@ CONFIG_GEN_RTC=y
555# CONFIG_TCG_TPM is not set 577# CONFIG_TCG_TPM is not set
556# CONFIG_I2C is not set 578# CONFIG_I2C is not set
557# CONFIG_SPI is not set 579# CONFIG_SPI is not set
580
581#
582# PPS support
583#
584# CONFIG_PPS is not set
558CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 585CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
559# CONFIG_GPIOLIB is not set 586# CONFIG_GPIOLIB is not set
560# CONFIG_W1 is not set 587# CONFIG_W1 is not set
@@ -590,22 +617,7 @@ CONFIG_SSB_POSSIBLE=y
590# CONFIG_HTC_PASIC3 is not set 617# CONFIG_HTC_PASIC3 is not set
591# CONFIG_MFD_TMIO is not set 618# CONFIG_MFD_TMIO is not set
592# CONFIG_REGULATOR is not set 619# CONFIG_REGULATOR is not set
593 620# CONFIG_MEDIA_SUPPORT is not set
594#
595# Multimedia devices
596#
597
598#
599# Multimedia core support
600#
601# CONFIG_VIDEO_DEV is not set
602# CONFIG_DVB_CORE is not set
603# CONFIG_VIDEO_MEDIA is not set
604
605#
606# Multimedia drivers
607#
608CONFIG_DAB=y
609 621
610# 622#
611# Graphics support 623# Graphics support
@@ -657,6 +669,10 @@ CONFIG_USB_SUPPORT=y
657# CONFIG_DMADEVICES is not set 669# CONFIG_DMADEVICES is not set
658# CONFIG_AUXDISPLAY is not set 670# CONFIG_AUXDISPLAY is not set
659# CONFIG_UIO is not set 671# CONFIG_UIO is not set
672
673#
674# TI VLYNQ
675#
660# CONFIG_STAGING is not set 676# CONFIG_STAGING is not set
661 677
662# 678#
@@ -676,10 +692,12 @@ CONFIG_FS_MBCACHE=y
676# CONFIG_REISERFS_FS is not set 692# CONFIG_REISERFS_FS is not set
677# CONFIG_JFS_FS is not set 693# CONFIG_JFS_FS is not set
678# CONFIG_FS_POSIX_ACL is not set 694# CONFIG_FS_POSIX_ACL is not set
679CONFIG_FILE_LOCKING=y
680# CONFIG_XFS_FS is not set 695# CONFIG_XFS_FS is not set
696# CONFIG_GFS2_FS is not set
681# CONFIG_OCFS2_FS is not set 697# CONFIG_OCFS2_FS is not set
682# CONFIG_BTRFS_FS is not set 698# CONFIG_BTRFS_FS is not set
699CONFIG_FILE_LOCKING=y
700CONFIG_FSNOTIFY=y
683CONFIG_DNOTIFY=y 701CONFIG_DNOTIFY=y
684CONFIG_INOTIFY=y 702CONFIG_INOTIFY=y
685CONFIG_INOTIFY_USER=y 703CONFIG_INOTIFY_USER=y
@@ -794,6 +812,7 @@ CONFIG_HAS_IOPORT=y
794CONFIG_HAS_DMA=y 812CONFIG_HAS_DMA=y
795CONFIG_HAVE_LMB=y 813CONFIG_HAVE_LMB=y
796CONFIG_NLATTR=y 814CONFIG_NLATTR=y
815CONFIG_GENERIC_ATOMIC64=y
797 816
798# 817#
799# Kernel hacking 818# Kernel hacking
@@ -824,6 +843,9 @@ CONFIG_SCHED_DEBUG=y
824# CONFIG_RT_MUTEX_TESTER is not set 843# CONFIG_RT_MUTEX_TESTER is not set
825# CONFIG_DEBUG_SPINLOCK is not set 844# CONFIG_DEBUG_SPINLOCK is not set
826CONFIG_DEBUG_MUTEXES=y 845CONFIG_DEBUG_MUTEXES=y
846# CONFIG_DEBUG_LOCK_ALLOC is not set
847# CONFIG_PROVE_LOCKING is not set
848# CONFIG_LOCK_STAT is not set
827# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 849# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
828# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 850# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
829# CONFIG_DEBUG_KOBJECT is not set 851# CONFIG_DEBUG_KOBJECT is not set
@@ -835,7 +857,6 @@ CONFIG_DEBUG_MUTEXES=y
835# CONFIG_DEBUG_LIST is not set 857# CONFIG_DEBUG_LIST is not set
836# CONFIG_DEBUG_SG is not set 858# CONFIG_DEBUG_SG is not set
837# CONFIG_DEBUG_NOTIFIERS is not set 859# CONFIG_DEBUG_NOTIFIERS is not set
838# CONFIG_BOOT_PRINTK_DELAY is not set
839# CONFIG_RCU_TORTURE_TEST is not set 860# CONFIG_RCU_TORTURE_TEST is not set
840# CONFIG_RCU_CPU_STALL_DETECTOR is not set 861# CONFIG_RCU_CPU_STALL_DETECTOR is not set
841# CONFIG_BACKTRACE_SELF_TEST is not set 862# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -849,16 +870,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
849CONFIG_HAVE_DYNAMIC_FTRACE=y 870CONFIG_HAVE_DYNAMIC_FTRACE=y
850CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 871CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
851CONFIG_TRACING_SUPPORT=y 872CONFIG_TRACING_SUPPORT=y
852 873CONFIG_FTRACE=y
853#
854# Tracers
855#
856# CONFIG_FUNCTION_TRACER is not set 874# CONFIG_FUNCTION_TRACER is not set
875# CONFIG_IRQSOFF_TRACER is not set
857# CONFIG_SCHED_TRACER is not set 876# CONFIG_SCHED_TRACER is not set
858# CONFIG_CONTEXT_SWITCH_TRACER is not set 877# CONFIG_ENABLE_DEFAULT_TRACERS is not set
859# CONFIG_EVENT_TRACER is not set
860# CONFIG_BOOT_TRACER is not set 878# CONFIG_BOOT_TRACER is not set
861# CONFIG_TRACE_BRANCH_PROFILING is not set 879CONFIG_BRANCH_PROFILE_NONE=y
880# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
881# CONFIG_PROFILE_ALL_BRANCHES is not set
862# CONFIG_STACK_TRACER is not set 882# CONFIG_STACK_TRACER is not set
863# CONFIG_KMEMTRACE is not set 883# CONFIG_KMEMTRACE is not set
864# CONFIG_WORKQUEUE_TRACER is not set 884# CONFIG_WORKQUEUE_TRACER is not set
@@ -866,6 +886,9 @@ CONFIG_TRACING_SUPPORT=y
866# CONFIG_SAMPLES is not set 886# CONFIG_SAMPLES is not set
867CONFIG_HAVE_ARCH_KGDB=y 887CONFIG_HAVE_ARCH_KGDB=y
868# CONFIG_KGDB is not set 888# CONFIG_KGDB is not set
889# CONFIG_KMEMCHECK is not set
890# CONFIG_PPC_DISABLE_WERROR is not set
891CONFIG_PPC_WERROR=y
869CONFIG_PRINT_STACK_DEPTH=64 892CONFIG_PRINT_STACK_DEPTH=64
870# CONFIG_DEBUG_STACKOVERFLOW is not set 893# CONFIG_DEBUG_STACKOVERFLOW is not set
871# CONFIG_DEBUG_STACK_USAGE is not set 894# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/85xx/mpc8560_ads_defconfig b/arch/powerpc/configs/85xx/mpc8560_ads_defconfig
index 62adb71a5d4..5c8ce697882 100644
--- a/arch/powerpc/configs/85xx/mpc8560_ads_defconfig
+++ b/arch/powerpc/configs/85xx/mpc8560_ads_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:17 2009 4# Wed Jul 29 23:32:16 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12CONFIG_PPC_85xx=y 12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -34,15 +34,16 @@ CONFIG_GENERIC_TIME=y
34CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
35CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
36CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
38CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
39CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
40CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
41CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
42CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
43CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
44CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
45CONFIG_GENERIC_CALIBRATE_DELAY=y
46CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
47CONFIG_GENERIC_GPIO=y 48CONFIG_GENERIC_GPIO=y
48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 49# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -57,11 +58,13 @@ CONFIG_PPC_UDBG_16550=y
57# CONFIG_GENERIC_TBSYNC is not set 58# CONFIG_GENERIC_TBSYNC is not set
58CONFIG_AUDIT_ARCH=y 59CONFIG_AUDIT_ARCH=y
59CONFIG_GENERIC_BUG=y 60CONFIG_GENERIC_BUG=y
61CONFIG_DTC=y
60CONFIG_DEFAULT_UIMAGE=y 62CONFIG_DEFAULT_UIMAGE=y
61# CONFIG_PPC_DCR_NATIVE is not set 63# CONFIG_PPC_DCR_NATIVE is not set
62# CONFIG_PPC_DCR_MMIO is not set 64# CONFIG_PPC_DCR_MMIO is not set
63CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 65CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
64CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 66CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
67CONFIG_CONSTRUCTORS=y
65 68
66# 69#
67# General setup 70# General setup
@@ -112,7 +115,6 @@ CONFIG_SYSCTL_SYSCALL=y
112CONFIG_KALLSYMS=y 115CONFIG_KALLSYMS=y
113# CONFIG_KALLSYMS_ALL is not set 116# CONFIG_KALLSYMS_ALL is not set
114# CONFIG_KALLSYMS_EXTRA_PASS is not set 117# CONFIG_KALLSYMS_EXTRA_PASS is not set
115# CONFIG_STRIP_ASM_SYMS is not set
116CONFIG_HOTPLUG=y 118CONFIG_HOTPLUG=y
117CONFIG_PRINTK=y 119CONFIG_PRINTK=y
118CONFIG_BUG=y 120CONFIG_BUG=y
@@ -125,9 +127,16 @@ CONFIG_TIMERFD=y
125CONFIG_EVENTFD=y 127CONFIG_EVENTFD=y
126CONFIG_SHMEM=y 128CONFIG_SHMEM=y
127CONFIG_AIO=y 129CONFIG_AIO=y
130CONFIG_HAVE_PERF_COUNTERS=y
131
132#
133# Performance Counters
134#
135# CONFIG_PERF_COUNTERS is not set
128CONFIG_VM_EVENT_COUNTERS=y 136CONFIG_VM_EVENT_COUNTERS=y
129CONFIG_PCI_QUIRKS=y 137CONFIG_PCI_QUIRKS=y
130CONFIG_SLUB_DEBUG=y 138CONFIG_SLUB_DEBUG=y
139# CONFIG_STRIP_ASM_SYMS is not set
131CONFIG_COMPAT_BRK=y 140CONFIG_COMPAT_BRK=y
132# CONFIG_SLAB is not set 141# CONFIG_SLAB is not set
133CONFIG_SLUB=y 142CONFIG_SLUB=y
@@ -141,6 +150,10 @@ CONFIG_HAVE_KPROBES=y
141CONFIG_HAVE_KRETPROBES=y 150CONFIG_HAVE_KRETPROBES=y
142CONFIG_HAVE_ARCH_TRACEHOOK=y 151CONFIG_HAVE_ARCH_TRACEHOOK=y
143CONFIG_HAVE_CLK=y 152CONFIG_HAVE_CLK=y
153
154#
155# GCOV-based kernel profiling
156#
144# CONFIG_SLOW_WORK is not set 157# CONFIG_SLOW_WORK is not set
145# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 158# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
146CONFIG_SLABINFO=y 159CONFIG_SLABINFO=y
@@ -148,7 +161,7 @@ CONFIG_RT_MUTEXES=y
148CONFIG_BASE_SMALL=0 161CONFIG_BASE_SMALL=0
149# CONFIG_MODULES is not set 162# CONFIG_MODULES is not set
150CONFIG_BLOCK=y 163CONFIG_BLOCK=y
151# CONFIG_LBD is not set 164CONFIG_LBDAF=y
152# CONFIG_BLK_DEV_BSG is not set 165# CONFIG_BLK_DEV_BSG is not set
153# CONFIG_BLK_DEV_INTEGRITY is not set 166# CONFIG_BLK_DEV_INTEGRITY is not set
154 167
@@ -181,6 +194,7 @@ CONFIG_MPC8560_ADS=y
181# CONFIG_MPC85xx_DS is not set 194# CONFIG_MPC85xx_DS is not set
182# CONFIG_SOCRATES is not set 195# CONFIG_SOCRATES is not set
183# CONFIG_KSI8560 is not set 196# CONFIG_KSI8560 is not set
197# CONFIG_XES_MPC85xx is not set
184# CONFIG_STX_GP3 is not set 198# CONFIG_STX_GP3 is not set
185# CONFIG_TQM8540 is not set 199# CONFIG_TQM8540 is not set
186# CONFIG_TQM8541 is not set 200# CONFIG_TQM8541 is not set
@@ -229,6 +243,7 @@ CONFIG_BINFMT_ELF=y
229CONFIG_BINFMT_MISC=y 243CONFIG_BINFMT_MISC=y
230CONFIG_MATH_EMULATION=y 244CONFIG_MATH_EMULATION=y
231# CONFIG_IOMMU_HELPER is not set 245# CONFIG_IOMMU_HELPER is not set
246# CONFIG_SWIOTLB is not set
232CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 247CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
233CONFIG_ARCH_HAS_WALK_MEMORY=y 248CONFIG_ARCH_HAS_WALK_MEMORY=y
234CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 249CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -247,9 +262,9 @@ CONFIG_MIGRATION=y
247CONFIG_ZONE_DMA_FLAG=1 262CONFIG_ZONE_DMA_FLAG=1
248CONFIG_BOUNCE=y 263CONFIG_BOUNCE=y
249CONFIG_VIRT_TO_BUS=y 264CONFIG_VIRT_TO_BUS=y
250CONFIG_UNEVICTABLE_LRU=y
251CONFIG_HAVE_MLOCK=y 265CONFIG_HAVE_MLOCK=y
252CONFIG_HAVE_MLOCKED_PAGE_BIT=y 266CONFIG_HAVE_MLOCKED_PAGE_BIT=y
267CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
253CONFIG_PPC_4K_PAGES=y 268CONFIG_PPC_4K_PAGES=y
254# CONFIG_PPC_16K_PAGES is not set 269# CONFIG_PPC_16K_PAGES is not set
255# CONFIG_PPC_64K_PAGES is not set 270# CONFIG_PPC_64K_PAGES is not set
@@ -360,6 +375,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
360# CONFIG_ECONET is not set 375# CONFIG_ECONET is not set
361# CONFIG_WAN_ROUTER is not set 376# CONFIG_WAN_ROUTER is not set
362# CONFIG_PHONET is not set 377# CONFIG_PHONET is not set
378# CONFIG_IEEE802154 is not set
363# CONFIG_NET_SCHED is not set 379# CONFIG_NET_SCHED is not set
364# CONFIG_DCB is not set 380# CONFIG_DCB is not set
365 381
@@ -377,7 +393,11 @@ CONFIG_WIRELESS=y
377CONFIG_WIRELESS_OLD_REGULATORY=y 393CONFIG_WIRELESS_OLD_REGULATORY=y
378# CONFIG_WIRELESS_EXT is not set 394# CONFIG_WIRELESS_EXT is not set
379# CONFIG_LIB80211 is not set 395# CONFIG_LIB80211 is not set
380# CONFIG_MAC80211 is not set 396
397#
398# CFG80211 needs to be enabled for MAC80211
399#
400CONFIG_MAC80211_DEFAULT_PS_VALUE=0
381# CONFIG_WIMAX is not set 401# CONFIG_WIMAX is not set
382# CONFIG_RFKILL is not set 402# CONFIG_RFKILL is not set
383# CONFIG_NET_9P is not set 403# CONFIG_NET_9P is not set
@@ -400,6 +420,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
400# CONFIG_MTD is not set 420# CONFIG_MTD is not set
401CONFIG_OF_DEVICE=y 421CONFIG_OF_DEVICE=y
402CONFIG_OF_GPIO=y 422CONFIG_OF_GPIO=y
423CONFIG_OF_MDIO=y
403# CONFIG_PARPORT is not set 424# CONFIG_PARPORT is not set
404CONFIG_BLK_DEV=y 425CONFIG_BLK_DEV=y
405# CONFIG_BLK_DEV_FD is not set 426# CONFIG_BLK_DEV_FD is not set
@@ -431,6 +452,7 @@ CONFIG_MISC_DEVICES=y
431# EEPROM support 452# EEPROM support
432# 453#
433# CONFIG_EEPROM_93CX6 is not set 454# CONFIG_EEPROM_93CX6 is not set
455# CONFIG_CB710_CORE is not set
434CONFIG_HAVE_IDE=y 456CONFIG_HAVE_IDE=y
435# CONFIG_IDE is not set 457# CONFIG_IDE is not set
436 458
@@ -450,14 +472,17 @@ CONFIG_HAVE_IDE=y
450# 472#
451 473
452# 474#
453# Enable only one of the two stacks, unless you know what you are doing 475# You can enable one or both FireWire driver stacks.
476#
477
478#
479# See the help texts for more information.
454# 480#
455# CONFIG_FIREWIRE is not set 481# CONFIG_FIREWIRE is not set
456# CONFIG_IEEE1394 is not set 482# CONFIG_IEEE1394 is not set
457# CONFIG_I2O is not set 483# CONFIG_I2O is not set
458# CONFIG_MACINTOSH_DRIVERS is not set 484# CONFIG_MACINTOSH_DRIVERS is not set
459CONFIG_NETDEVICES=y 485CONFIG_NETDEVICES=y
460CONFIG_COMPAT_NET_DEV_OPS=y
461# CONFIG_DUMMY is not set 486# CONFIG_DUMMY is not set
462# CONFIG_BONDING is not set 487# CONFIG_BONDING is not set
463# CONFIG_MACVLAN is not set 488# CONFIG_MACVLAN is not set
@@ -504,6 +529,7 @@ CONFIG_MII=y
504# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 529# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
505# CONFIG_NET_PCI is not set 530# CONFIG_NET_PCI is not set
506# CONFIG_B44 is not set 531# CONFIG_B44 is not set
532# CONFIG_KS8842 is not set
507# CONFIG_ATL2 is not set 533# CONFIG_ATL2 is not set
508CONFIG_FS_ENET=y 534CONFIG_FS_ENET=y
509# CONFIG_FS_ENET_HAS_SCC is not set 535# CONFIG_FS_ENET_HAS_SCC is not set
@@ -527,8 +553,10 @@ CONFIG_E1000=y
527# CONFIG_VIA_VELOCITY is not set 553# CONFIG_VIA_VELOCITY is not set
528# CONFIG_TIGON3 is not set 554# CONFIG_TIGON3 is not set
529# CONFIG_BNX2 is not set 555# CONFIG_BNX2 is not set
556# CONFIG_CNIC is not set
530CONFIG_FSL_PQ_MDIO=y 557CONFIG_FSL_PQ_MDIO=y
531CONFIG_GIANFAR=y 558CONFIG_GIANFAR=y
559# CONFIG_MV643XX_ETH is not set
532# CONFIG_QLA3XXX is not set 560# CONFIG_QLA3XXX is not set
533# CONFIG_ATL1 is not set 561# CONFIG_ATL1 is not set
534# CONFIG_ATL1E is not set 562# CONFIG_ATL1E is not set
@@ -646,6 +674,11 @@ CONFIG_GEN_RTC=y
646CONFIG_DEVPORT=y 674CONFIG_DEVPORT=y
647# CONFIG_I2C is not set 675# CONFIG_I2C is not set
648# CONFIG_SPI is not set 676# CONFIG_SPI is not set
677
678#
679# PPS support
680#
681# CONFIG_PPS is not set
649CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 682CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
650CONFIG_ARCH_REQUIRE_GPIOLIB=y 683CONFIG_ARCH_REQUIRE_GPIOLIB=y
651CONFIG_GPIOLIB=y 684CONFIG_GPIOLIB=y
@@ -707,22 +740,7 @@ CONFIG_SSB_POSSIBLE=y
707# CONFIG_HTC_PASIC3 is not set 740# CONFIG_HTC_PASIC3 is not set
708# CONFIG_MFD_TMIO is not set 741# CONFIG_MFD_TMIO is not set
709# CONFIG_REGULATOR is not set 742# CONFIG_REGULATOR is not set
710 743# CONFIG_MEDIA_SUPPORT is not set
711#
712# Multimedia devices
713#
714
715#
716# Multimedia core support
717#
718# CONFIG_VIDEO_DEV is not set
719# CONFIG_DVB_CORE is not set
720# CONFIG_VIDEO_MEDIA is not set
721
722#
723# Multimedia drivers
724#
725CONFIG_DAB=y
726 744
727# 745#
728# Graphics support 746# Graphics support
@@ -779,6 +797,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
779# CONFIG_DMADEVICES is not set 797# CONFIG_DMADEVICES is not set
780# CONFIG_AUXDISPLAY is not set 798# CONFIG_AUXDISPLAY is not set
781# CONFIG_UIO is not set 799# CONFIG_UIO is not set
800
801#
802# TI VLYNQ
803#
782# CONFIG_STAGING is not set 804# CONFIG_STAGING is not set
783 805
784# 806#
@@ -798,10 +820,12 @@ CONFIG_FS_MBCACHE=y
798# CONFIG_REISERFS_FS is not set 820# CONFIG_REISERFS_FS is not set
799# CONFIG_JFS_FS is not set 821# CONFIG_JFS_FS is not set
800# CONFIG_FS_POSIX_ACL is not set 822# CONFIG_FS_POSIX_ACL is not set
801CONFIG_FILE_LOCKING=y
802# CONFIG_XFS_FS is not set 823# CONFIG_XFS_FS is not set
824# CONFIG_GFS2_FS is not set
803# CONFIG_OCFS2_FS is not set 825# CONFIG_OCFS2_FS is not set
804# CONFIG_BTRFS_FS is not set 826# CONFIG_BTRFS_FS is not set
827CONFIG_FILE_LOCKING=y
828CONFIG_FSNOTIFY=y
805CONFIG_DNOTIFY=y 829CONFIG_DNOTIFY=y
806CONFIG_INOTIFY=y 830CONFIG_INOTIFY=y
807CONFIG_INOTIFY_USER=y 831CONFIG_INOTIFY_USER=y
@@ -916,6 +940,7 @@ CONFIG_HAS_IOPORT=y
916CONFIG_HAS_DMA=y 940CONFIG_HAS_DMA=y
917CONFIG_HAVE_LMB=y 941CONFIG_HAVE_LMB=y
918CONFIG_NLATTR=y 942CONFIG_NLATTR=y
943CONFIG_GENERIC_ATOMIC64=y
919 944
920# 945#
921# Kernel hacking 946# Kernel hacking
@@ -946,6 +971,9 @@ CONFIG_SCHED_DEBUG=y
946# CONFIG_RT_MUTEX_TESTER is not set 971# CONFIG_RT_MUTEX_TESTER is not set
947# CONFIG_DEBUG_SPINLOCK is not set 972# CONFIG_DEBUG_SPINLOCK is not set
948CONFIG_DEBUG_MUTEXES=y 973CONFIG_DEBUG_MUTEXES=y
974# CONFIG_DEBUG_LOCK_ALLOC is not set
975# CONFIG_PROVE_LOCKING is not set
976# CONFIG_LOCK_STAT is not set
949# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 977# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
950# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 978# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
951# CONFIG_DEBUG_KOBJECT is not set 979# CONFIG_DEBUG_KOBJECT is not set
@@ -957,7 +985,6 @@ CONFIG_DEBUG_MUTEXES=y
957# CONFIG_DEBUG_LIST is not set 985# CONFIG_DEBUG_LIST is not set
958# CONFIG_DEBUG_SG is not set 986# CONFIG_DEBUG_SG is not set
959# CONFIG_DEBUG_NOTIFIERS is not set 987# CONFIG_DEBUG_NOTIFIERS is not set
960# CONFIG_BOOT_PRINTK_DELAY is not set
961# CONFIG_RCU_TORTURE_TEST is not set 988# CONFIG_RCU_TORTURE_TEST is not set
962# CONFIG_RCU_CPU_STALL_DETECTOR is not set 989# CONFIG_RCU_CPU_STALL_DETECTOR is not set
963# CONFIG_BACKTRACE_SELF_TEST is not set 990# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -971,16 +998,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
971CONFIG_HAVE_DYNAMIC_FTRACE=y 998CONFIG_HAVE_DYNAMIC_FTRACE=y
972CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 999CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
973CONFIG_TRACING_SUPPORT=y 1000CONFIG_TRACING_SUPPORT=y
974 1001CONFIG_FTRACE=y
975#
976# Tracers
977#
978# CONFIG_FUNCTION_TRACER is not set 1002# CONFIG_FUNCTION_TRACER is not set
1003# CONFIG_IRQSOFF_TRACER is not set
979# CONFIG_SCHED_TRACER is not set 1004# CONFIG_SCHED_TRACER is not set
980# CONFIG_CONTEXT_SWITCH_TRACER is not set 1005# CONFIG_ENABLE_DEFAULT_TRACERS is not set
981# CONFIG_EVENT_TRACER is not set
982# CONFIG_BOOT_TRACER is not set 1006# CONFIG_BOOT_TRACER is not set
983# CONFIG_TRACE_BRANCH_PROFILING is not set 1007CONFIG_BRANCH_PROFILE_NONE=y
1008# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1009# CONFIG_PROFILE_ALL_BRANCHES is not set
984# CONFIG_STACK_TRACER is not set 1010# CONFIG_STACK_TRACER is not set
985# CONFIG_KMEMTRACE is not set 1011# CONFIG_KMEMTRACE is not set
986# CONFIG_WORKQUEUE_TRACER is not set 1012# CONFIG_WORKQUEUE_TRACER is not set
@@ -988,6 +1014,9 @@ CONFIG_TRACING_SUPPORT=y
988# CONFIG_SAMPLES is not set 1014# CONFIG_SAMPLES is not set
989CONFIG_HAVE_ARCH_KGDB=y 1015CONFIG_HAVE_ARCH_KGDB=y
990# CONFIG_KGDB is not set 1016# CONFIG_KGDB is not set
1017# CONFIG_KMEMCHECK is not set
1018# CONFIG_PPC_DISABLE_WERROR is not set
1019CONFIG_PPC_WERROR=y
991CONFIG_PRINT_STACK_DEPTH=64 1020CONFIG_PRINT_STACK_DEPTH=64
992# CONFIG_DEBUG_STACKOVERFLOW is not set 1021# CONFIG_DEBUG_STACKOVERFLOW is not set
993# CONFIG_DEBUG_STACK_USAGE is not set 1022# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/85xx/mpc85xx_cds_defconfig b/arch/powerpc/configs/85xx/mpc85xx_cds_defconfig
index 41209e3a654..158e63e8607 100644
--- a/arch/powerpc/configs/85xx/mpc85xx_cds_defconfig
+++ b/arch/powerpc/configs/85xx/mpc85xx_cds_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:18 2009 4# Wed Jul 29 23:32:17 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12CONFIG_PPC_85xx=y 12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -34,15 +34,16 @@ CONFIG_GENERIC_TIME=y
34CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
35CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
36CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
38CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
39CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
40CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
41CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
42CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
43CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
44CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
45CONFIG_GENERIC_CALIBRATE_DELAY=y
46CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
48CONFIG_PPC=y 49CONFIG_PPC=y
@@ -56,11 +57,13 @@ CONFIG_PPC_UDBG_16550=y
56# CONFIG_GENERIC_TBSYNC is not set 57# CONFIG_GENERIC_TBSYNC is not set
57CONFIG_AUDIT_ARCH=y 58CONFIG_AUDIT_ARCH=y
58CONFIG_GENERIC_BUG=y 59CONFIG_GENERIC_BUG=y
60CONFIG_DTC=y
59CONFIG_DEFAULT_UIMAGE=y 61CONFIG_DEFAULT_UIMAGE=y
60# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
61# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
62CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
63CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
64 67
65# 68#
66# General setup 69# General setup
@@ -111,7 +114,6 @@ CONFIG_SYSCTL_SYSCALL=y
111CONFIG_KALLSYMS=y 114CONFIG_KALLSYMS=y
112# CONFIG_KALLSYMS_ALL is not set 115# CONFIG_KALLSYMS_ALL is not set
113# CONFIG_KALLSYMS_EXTRA_PASS is not set 116# CONFIG_KALLSYMS_EXTRA_PASS is not set
114# CONFIG_STRIP_ASM_SYMS is not set
115CONFIG_HOTPLUG=y 117CONFIG_HOTPLUG=y
116CONFIG_PRINTK=y 118CONFIG_PRINTK=y
117CONFIG_BUG=y 119CONFIG_BUG=y
@@ -124,9 +126,16 @@ CONFIG_TIMERFD=y
124CONFIG_EVENTFD=y 126CONFIG_EVENTFD=y
125CONFIG_SHMEM=y 127CONFIG_SHMEM=y
126CONFIG_AIO=y 128CONFIG_AIO=y
129CONFIG_HAVE_PERF_COUNTERS=y
130
131#
132# Performance Counters
133#
134# CONFIG_PERF_COUNTERS is not set
127CONFIG_VM_EVENT_COUNTERS=y 135CONFIG_VM_EVENT_COUNTERS=y
128CONFIG_PCI_QUIRKS=y 136CONFIG_PCI_QUIRKS=y
129CONFIG_SLUB_DEBUG=y 137CONFIG_SLUB_DEBUG=y
138# CONFIG_STRIP_ASM_SYMS is not set
130CONFIG_COMPAT_BRK=y 139CONFIG_COMPAT_BRK=y
131# CONFIG_SLAB is not set 140# CONFIG_SLAB is not set
132CONFIG_SLUB=y 141CONFIG_SLUB=y
@@ -139,6 +148,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
139CONFIG_HAVE_KPROBES=y 148CONFIG_HAVE_KPROBES=y
140CONFIG_HAVE_KRETPROBES=y 149CONFIG_HAVE_KRETPROBES=y
141CONFIG_HAVE_ARCH_TRACEHOOK=y 150CONFIG_HAVE_ARCH_TRACEHOOK=y
151
152#
153# GCOV-based kernel profiling
154#
142# CONFIG_SLOW_WORK is not set 155# CONFIG_SLOW_WORK is not set
143# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 156# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
144CONFIG_SLABINFO=y 157CONFIG_SLABINFO=y
@@ -146,7 +159,7 @@ CONFIG_RT_MUTEXES=y
146CONFIG_BASE_SMALL=0 159CONFIG_BASE_SMALL=0
147# CONFIG_MODULES is not set 160# CONFIG_MODULES is not set
148CONFIG_BLOCK=y 161CONFIG_BLOCK=y
149# CONFIG_LBD is not set 162CONFIG_LBDAF=y
150# CONFIG_BLK_DEV_BSG is not set 163# CONFIG_BLK_DEV_BSG is not set
151# CONFIG_BLK_DEV_INTEGRITY is not set 164# CONFIG_BLK_DEV_INTEGRITY is not set
152 165
@@ -179,6 +192,7 @@ CONFIG_MPC85xx_CDS=y
179# CONFIG_MPC85xx_DS is not set 192# CONFIG_MPC85xx_DS is not set
180# CONFIG_SOCRATES is not set 193# CONFIG_SOCRATES is not set
181# CONFIG_KSI8560 is not set 194# CONFIG_KSI8560 is not set
195# CONFIG_XES_MPC85xx is not set
182# CONFIG_STX_GP3 is not set 196# CONFIG_STX_GP3 is not set
183# CONFIG_TQM8540 is not set 197# CONFIG_TQM8540 is not set
184# CONFIG_TQM8541 is not set 198# CONFIG_TQM8541 is not set
@@ -227,6 +241,7 @@ CONFIG_BINFMT_ELF=y
227CONFIG_BINFMT_MISC=y 241CONFIG_BINFMT_MISC=y
228CONFIG_MATH_EMULATION=y 242CONFIG_MATH_EMULATION=y
229# CONFIG_IOMMU_HELPER is not set 243# CONFIG_IOMMU_HELPER is not set
244# CONFIG_SWIOTLB is not set
230CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 245CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
231CONFIG_ARCH_HAS_WALK_MEMORY=y 246CONFIG_ARCH_HAS_WALK_MEMORY=y
232CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 247CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -245,9 +260,9 @@ CONFIG_MIGRATION=y
245CONFIG_ZONE_DMA_FLAG=1 260CONFIG_ZONE_DMA_FLAG=1
246CONFIG_BOUNCE=y 261CONFIG_BOUNCE=y
247CONFIG_VIRT_TO_BUS=y 262CONFIG_VIRT_TO_BUS=y
248CONFIG_UNEVICTABLE_LRU=y
249CONFIG_HAVE_MLOCK=y 263CONFIG_HAVE_MLOCK=y
250CONFIG_HAVE_MLOCKED_PAGE_BIT=y 264CONFIG_HAVE_MLOCKED_PAGE_BIT=y
265CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
251CONFIG_PPC_4K_PAGES=y 266CONFIG_PPC_4K_PAGES=y
252# CONFIG_PPC_16K_PAGES is not set 267# CONFIG_PPC_16K_PAGES is not set
253# CONFIG_PPC_64K_PAGES is not set 268# CONFIG_PPC_64K_PAGES is not set
@@ -358,6 +373,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
358# CONFIG_ECONET is not set 373# CONFIG_ECONET is not set
359# CONFIG_WAN_ROUTER is not set 374# CONFIG_WAN_ROUTER is not set
360# CONFIG_PHONET is not set 375# CONFIG_PHONET is not set
376# CONFIG_IEEE802154 is not set
361# CONFIG_NET_SCHED is not set 377# CONFIG_NET_SCHED is not set
362# CONFIG_DCB is not set 378# CONFIG_DCB is not set
363 379
@@ -375,7 +391,11 @@ CONFIG_WIRELESS=y
375CONFIG_WIRELESS_OLD_REGULATORY=y 391CONFIG_WIRELESS_OLD_REGULATORY=y
376# CONFIG_WIRELESS_EXT is not set 392# CONFIG_WIRELESS_EXT is not set
377# CONFIG_LIB80211 is not set 393# CONFIG_LIB80211 is not set
378# CONFIG_MAC80211 is not set 394
395#
396# CFG80211 needs to be enabled for MAC80211
397#
398CONFIG_MAC80211_DEFAULT_PS_VALUE=0
379# CONFIG_WIMAX is not set 399# CONFIG_WIMAX is not set
380# CONFIG_RFKILL is not set 400# CONFIG_RFKILL is not set
381# CONFIG_NET_9P is not set 401# CONFIG_NET_9P is not set
@@ -397,6 +417,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
397# CONFIG_CONNECTOR is not set 417# CONFIG_CONNECTOR is not set
398# CONFIG_MTD is not set 418# CONFIG_MTD is not set
399CONFIG_OF_DEVICE=y 419CONFIG_OF_DEVICE=y
420CONFIG_OF_MDIO=y
400# CONFIG_PARPORT is not set 421# CONFIG_PARPORT is not set
401CONFIG_BLK_DEV=y 422CONFIG_BLK_DEV=y
402# CONFIG_BLK_DEV_FD is not set 423# CONFIG_BLK_DEV_FD is not set
@@ -428,6 +449,7 @@ CONFIG_MISC_DEVICES=y
428# EEPROM support 449# EEPROM support
429# 450#
430# CONFIG_EEPROM_93CX6 is not set 451# CONFIG_EEPROM_93CX6 is not set
452# CONFIG_CB710_CORE is not set
431CONFIG_HAVE_IDE=y 453CONFIG_HAVE_IDE=y
432CONFIG_IDE=y 454CONFIG_IDE=y
433 455
@@ -502,14 +524,17 @@ CONFIG_BLK_DEV_IDEDMA=y
502# 524#
503 525
504# 526#
505# Enable only one of the two stacks, unless you know what you are doing 527# You can enable one or both FireWire driver stacks.
528#
529
530#
531# See the help texts for more information.
506# 532#
507# CONFIG_FIREWIRE is not set 533# CONFIG_FIREWIRE is not set
508# CONFIG_IEEE1394 is not set 534# CONFIG_IEEE1394 is not set
509# CONFIG_I2O is not set 535# CONFIG_I2O is not set
510# CONFIG_MACINTOSH_DRIVERS is not set 536# CONFIG_MACINTOSH_DRIVERS is not set
511CONFIG_NETDEVICES=y 537CONFIG_NETDEVICES=y
512CONFIG_COMPAT_NET_DEV_OPS=y
513# CONFIG_DUMMY is not set 538# CONFIG_DUMMY is not set
514# CONFIG_BONDING is not set 539# CONFIG_BONDING is not set
515# CONFIG_MACVLAN is not set 540# CONFIG_MACVLAN is not set
@@ -556,6 +581,7 @@ CONFIG_MII=y
556# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 581# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
557# CONFIG_NET_PCI is not set 582# CONFIG_NET_PCI is not set
558# CONFIG_B44 is not set 583# CONFIG_B44 is not set
584# CONFIG_KS8842 is not set
559# CONFIG_ATL2 is not set 585# CONFIG_ATL2 is not set
560CONFIG_NETDEV_1000=y 586CONFIG_NETDEV_1000=y
561# CONFIG_ACENIC is not set 587# CONFIG_ACENIC is not set
@@ -575,8 +601,10 @@ CONFIG_E1000=y
575# CONFIG_VIA_VELOCITY is not set 601# CONFIG_VIA_VELOCITY is not set
576# CONFIG_TIGON3 is not set 602# CONFIG_TIGON3 is not set
577# CONFIG_BNX2 is not set 603# CONFIG_BNX2 is not set
604# CONFIG_CNIC is not set
578CONFIG_FSL_PQ_MDIO=y 605CONFIG_FSL_PQ_MDIO=y
579CONFIG_GIANFAR=y 606CONFIG_GIANFAR=y
607# CONFIG_MV643XX_ETH is not set
580# CONFIG_QLA3XXX is not set 608# CONFIG_QLA3XXX is not set
581# CONFIG_ATL1 is not set 609# CONFIG_ATL1 is not set
582# CONFIG_ATL1E is not set 610# CONFIG_ATL1E is not set
@@ -698,6 +726,11 @@ CONFIG_GEN_RTC=y
698CONFIG_DEVPORT=y 726CONFIG_DEVPORT=y
699# CONFIG_I2C is not set 727# CONFIG_I2C is not set
700# CONFIG_SPI is not set 728# CONFIG_SPI is not set
729
730#
731# PPS support
732#
733# CONFIG_PPS is not set
701CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 734CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
702# CONFIG_GPIOLIB is not set 735# CONFIG_GPIOLIB is not set
703# CONFIG_W1 is not set 736# CONFIG_W1 is not set
@@ -737,22 +770,7 @@ CONFIG_SSB_POSSIBLE=y
737# CONFIG_HTC_PASIC3 is not set 770# CONFIG_HTC_PASIC3 is not set
738# CONFIG_MFD_TMIO is not set 771# CONFIG_MFD_TMIO is not set
739# CONFIG_REGULATOR is not set 772# CONFIG_REGULATOR is not set
740 773# CONFIG_MEDIA_SUPPORT is not set
741#
742# Multimedia devices
743#
744
745#
746# Multimedia core support
747#
748# CONFIG_VIDEO_DEV is not set
749# CONFIG_DVB_CORE is not set
750# CONFIG_VIDEO_MEDIA is not set
751
752#
753# Multimedia drivers
754#
755CONFIG_DAB=y
756 774
757# 775#
758# Graphics support 776# Graphics support
@@ -809,6 +827,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
809# CONFIG_DMADEVICES is not set 827# CONFIG_DMADEVICES is not set
810# CONFIG_AUXDISPLAY is not set 828# CONFIG_AUXDISPLAY is not set
811# CONFIG_UIO is not set 829# CONFIG_UIO is not set
830
831#
832# TI VLYNQ
833#
812# CONFIG_STAGING is not set 834# CONFIG_STAGING is not set
813 835
814# 836#
@@ -828,10 +850,12 @@ CONFIG_FS_MBCACHE=y
828# CONFIG_REISERFS_FS is not set 850# CONFIG_REISERFS_FS is not set
829# CONFIG_JFS_FS is not set 851# CONFIG_JFS_FS is not set
830# CONFIG_FS_POSIX_ACL is not set 852# CONFIG_FS_POSIX_ACL is not set
831CONFIG_FILE_LOCKING=y
832# CONFIG_XFS_FS is not set 853# CONFIG_XFS_FS is not set
854# CONFIG_GFS2_FS is not set
833# CONFIG_OCFS2_FS is not set 855# CONFIG_OCFS2_FS is not set
834# CONFIG_BTRFS_FS is not set 856# CONFIG_BTRFS_FS is not set
857CONFIG_FILE_LOCKING=y
858CONFIG_FSNOTIFY=y
835CONFIG_DNOTIFY=y 859CONFIG_DNOTIFY=y
836CONFIG_INOTIFY=y 860CONFIG_INOTIFY=y
837CONFIG_INOTIFY_USER=y 861CONFIG_INOTIFY_USER=y
@@ -946,6 +970,7 @@ CONFIG_HAS_IOPORT=y
946CONFIG_HAS_DMA=y 970CONFIG_HAS_DMA=y
947CONFIG_HAVE_LMB=y 971CONFIG_HAVE_LMB=y
948CONFIG_NLATTR=y 972CONFIG_NLATTR=y
973CONFIG_GENERIC_ATOMIC64=y
949 974
950# 975#
951# Kernel hacking 976# Kernel hacking
@@ -976,6 +1001,9 @@ CONFIG_SCHED_DEBUG=y
976# CONFIG_RT_MUTEX_TESTER is not set 1001# CONFIG_RT_MUTEX_TESTER is not set
977# CONFIG_DEBUG_SPINLOCK is not set 1002# CONFIG_DEBUG_SPINLOCK is not set
978CONFIG_DEBUG_MUTEXES=y 1003CONFIG_DEBUG_MUTEXES=y
1004# CONFIG_DEBUG_LOCK_ALLOC is not set
1005# CONFIG_PROVE_LOCKING is not set
1006# CONFIG_LOCK_STAT is not set
979# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1007# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
980# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1008# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
981# CONFIG_DEBUG_KOBJECT is not set 1009# CONFIG_DEBUG_KOBJECT is not set
@@ -987,7 +1015,6 @@ CONFIG_DEBUG_MUTEXES=y
987# CONFIG_DEBUG_LIST is not set 1015# CONFIG_DEBUG_LIST is not set
988# CONFIG_DEBUG_SG is not set 1016# CONFIG_DEBUG_SG is not set
989# CONFIG_DEBUG_NOTIFIERS is not set 1017# CONFIG_DEBUG_NOTIFIERS is not set
990# CONFIG_BOOT_PRINTK_DELAY is not set
991# CONFIG_RCU_TORTURE_TEST is not set 1018# CONFIG_RCU_TORTURE_TEST is not set
992# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1019# CONFIG_RCU_CPU_STALL_DETECTOR is not set
993# CONFIG_BACKTRACE_SELF_TEST is not set 1020# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1001,16 +1028,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1001CONFIG_HAVE_DYNAMIC_FTRACE=y 1028CONFIG_HAVE_DYNAMIC_FTRACE=y
1002CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1029CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1003CONFIG_TRACING_SUPPORT=y 1030CONFIG_TRACING_SUPPORT=y
1004 1031CONFIG_FTRACE=y
1005#
1006# Tracers
1007#
1008# CONFIG_FUNCTION_TRACER is not set 1032# CONFIG_FUNCTION_TRACER is not set
1033# CONFIG_IRQSOFF_TRACER is not set
1009# CONFIG_SCHED_TRACER is not set 1034# CONFIG_SCHED_TRACER is not set
1010# CONFIG_CONTEXT_SWITCH_TRACER is not set 1035# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1011# CONFIG_EVENT_TRACER is not set
1012# CONFIG_BOOT_TRACER is not set 1036# CONFIG_BOOT_TRACER is not set
1013# CONFIG_TRACE_BRANCH_PROFILING is not set 1037CONFIG_BRANCH_PROFILE_NONE=y
1038# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1039# CONFIG_PROFILE_ALL_BRANCHES is not set
1014# CONFIG_STACK_TRACER is not set 1040# CONFIG_STACK_TRACER is not set
1015# CONFIG_KMEMTRACE is not set 1041# CONFIG_KMEMTRACE is not set
1016# CONFIG_WORKQUEUE_TRACER is not set 1042# CONFIG_WORKQUEUE_TRACER is not set
@@ -1018,6 +1044,9 @@ CONFIG_TRACING_SUPPORT=y
1018# CONFIG_SAMPLES is not set 1044# CONFIG_SAMPLES is not set
1019CONFIG_HAVE_ARCH_KGDB=y 1045CONFIG_HAVE_ARCH_KGDB=y
1020# CONFIG_KGDB is not set 1046# CONFIG_KGDB is not set
1047# CONFIG_KMEMCHECK is not set
1048# CONFIG_PPC_DISABLE_WERROR is not set
1049CONFIG_PPC_WERROR=y
1021CONFIG_PRINT_STACK_DEPTH=64 1050CONFIG_PRINT_STACK_DEPTH=64
1022# CONFIG_DEBUG_STACKOVERFLOW is not set 1051# CONFIG_DEBUG_STACKOVERFLOW is not set
1023# CONFIG_DEBUG_STACK_USAGE is not set 1052# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/85xx/sbc8548_defconfig b/arch/powerpc/configs/85xx/sbc8548_defconfig
index 6c36c9c7abf..2726fca1d69 100644
--- a/arch/powerpc/configs/85xx/sbc8548_defconfig
+++ b/arch/powerpc/configs/85xx/sbc8548_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:19 2009 4# Wed Jul 29 23:32:18 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12CONFIG_PPC_85xx=y 12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -34,15 +34,16 @@ CONFIG_GENERIC_TIME=y
34CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
35CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
36CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
38CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
39CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
40CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
41CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
42CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
43CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
44CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
45CONFIG_GENERIC_CALIBRATE_DELAY=y
46CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
48CONFIG_PPC=y 49CONFIG_PPC=y
@@ -56,11 +57,13 @@ CONFIG_PPC_UDBG_16550=y
56# CONFIG_GENERIC_TBSYNC is not set 57# CONFIG_GENERIC_TBSYNC is not set
57CONFIG_AUDIT_ARCH=y 58CONFIG_AUDIT_ARCH=y
58CONFIG_GENERIC_BUG=y 59CONFIG_GENERIC_BUG=y
60CONFIG_DTC=y
59CONFIG_DEFAULT_UIMAGE=y 61CONFIG_DEFAULT_UIMAGE=y
60# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
61# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
62CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
63CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
64 67
65# 68#
66# General setup 69# General setup
@@ -110,7 +113,6 @@ CONFIG_EMBEDDED=y
110CONFIG_SYSCTL_SYSCALL=y 113CONFIG_SYSCTL_SYSCALL=y
111CONFIG_KALLSYMS=y 114CONFIG_KALLSYMS=y
112# CONFIG_KALLSYMS_EXTRA_PASS is not set 115# CONFIG_KALLSYMS_EXTRA_PASS is not set
113# CONFIG_STRIP_ASM_SYMS is not set
114CONFIG_HOTPLUG=y 116CONFIG_HOTPLUG=y
115CONFIG_PRINTK=y 117CONFIG_PRINTK=y
116CONFIG_BUG=y 118CONFIG_BUG=y
@@ -123,8 +125,15 @@ CONFIG_TIMERFD=y
123CONFIG_EVENTFD=y 125CONFIG_EVENTFD=y
124CONFIG_SHMEM=y 126CONFIG_SHMEM=y
125CONFIG_AIO=y 127CONFIG_AIO=y
128CONFIG_HAVE_PERF_COUNTERS=y
129
130#
131# Performance Counters
132#
133# CONFIG_PERF_COUNTERS is not set
126CONFIG_VM_EVENT_COUNTERS=y 134CONFIG_VM_EVENT_COUNTERS=y
127CONFIG_PCI_QUIRKS=y 135CONFIG_PCI_QUIRKS=y
136# CONFIG_STRIP_ASM_SYMS is not set
128CONFIG_COMPAT_BRK=y 137CONFIG_COMPAT_BRK=y
129CONFIG_SLAB=y 138CONFIG_SLAB=y
130# CONFIG_SLUB is not set 139# CONFIG_SLUB is not set
@@ -137,6 +146,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
137CONFIG_HAVE_KPROBES=y 146CONFIG_HAVE_KPROBES=y
138CONFIG_HAVE_KRETPROBES=y 147CONFIG_HAVE_KRETPROBES=y
139CONFIG_HAVE_ARCH_TRACEHOOK=y 148CONFIG_HAVE_ARCH_TRACEHOOK=y
149
150#
151# GCOV-based kernel profiling
152#
140# CONFIG_SLOW_WORK is not set 153# CONFIG_SLOW_WORK is not set
141# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 154# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
142CONFIG_SLABINFO=y 155CONFIG_SLABINFO=y
@@ -144,7 +157,7 @@ CONFIG_RT_MUTEXES=y
144CONFIG_BASE_SMALL=0 157CONFIG_BASE_SMALL=0
145# CONFIG_MODULES is not set 158# CONFIG_MODULES is not set
146CONFIG_BLOCK=y 159CONFIG_BLOCK=y
147# CONFIG_LBD is not set 160CONFIG_LBDAF=y
148# CONFIG_BLK_DEV_BSG is not set 161# CONFIG_BLK_DEV_BSG is not set
149# CONFIG_BLK_DEV_INTEGRITY is not set 162# CONFIG_BLK_DEV_INTEGRITY is not set
150 163
@@ -177,6 +190,7 @@ CONFIG_MPC85xx=y
177# CONFIG_MPC85xx_DS is not set 190# CONFIG_MPC85xx_DS is not set
178# CONFIG_SOCRATES is not set 191# CONFIG_SOCRATES is not set
179# CONFIG_KSI8560 is not set 192# CONFIG_KSI8560 is not set
193# CONFIG_XES_MPC85xx is not set
180# CONFIG_STX_GP3 is not set 194# CONFIG_STX_GP3 is not set
181# CONFIG_TQM8540 is not set 195# CONFIG_TQM8540 is not set
182# CONFIG_TQM8541 is not set 196# CONFIG_TQM8541 is not set
@@ -224,6 +238,7 @@ CONFIG_BINFMT_ELF=y
224CONFIG_BINFMT_MISC=y 238CONFIG_BINFMT_MISC=y
225CONFIG_MATH_EMULATION=y 239CONFIG_MATH_EMULATION=y
226# CONFIG_IOMMU_HELPER is not set 240# CONFIG_IOMMU_HELPER is not set
241# CONFIG_SWIOTLB is not set
227CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 242CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
228CONFIG_ARCH_HAS_WALK_MEMORY=y 243CONFIG_ARCH_HAS_WALK_MEMORY=y
229CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 244CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -242,9 +257,9 @@ CONFIG_MIGRATION=y
242CONFIG_ZONE_DMA_FLAG=1 257CONFIG_ZONE_DMA_FLAG=1
243CONFIG_BOUNCE=y 258CONFIG_BOUNCE=y
244CONFIG_VIRT_TO_BUS=y 259CONFIG_VIRT_TO_BUS=y
245CONFIG_UNEVICTABLE_LRU=y
246CONFIG_HAVE_MLOCK=y 260CONFIG_HAVE_MLOCK=y
247CONFIG_HAVE_MLOCKED_PAGE_BIT=y 261CONFIG_HAVE_MLOCKED_PAGE_BIT=y
262CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
248CONFIG_PPC_4K_PAGES=y 263CONFIG_PPC_4K_PAGES=y
249# CONFIG_PPC_16K_PAGES is not set 264# CONFIG_PPC_16K_PAGES is not set
250# CONFIG_PPC_64K_PAGES is not set 265# CONFIG_PPC_64K_PAGES is not set
@@ -354,6 +369,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
354# CONFIG_ECONET is not set 369# CONFIG_ECONET is not set
355# CONFIG_WAN_ROUTER is not set 370# CONFIG_WAN_ROUTER is not set
356# CONFIG_PHONET is not set 371# CONFIG_PHONET is not set
372# CONFIG_IEEE802154 is not set
357# CONFIG_NET_SCHED is not set 373# CONFIG_NET_SCHED is not set
358# CONFIG_DCB is not set 374# CONFIG_DCB is not set
359 375
@@ -371,7 +387,11 @@ CONFIG_WIRELESS=y
371CONFIG_WIRELESS_OLD_REGULATORY=y 387CONFIG_WIRELESS_OLD_REGULATORY=y
372# CONFIG_WIRELESS_EXT is not set 388# CONFIG_WIRELESS_EXT is not set
373# CONFIG_LIB80211 is not set 389# CONFIG_LIB80211 is not set
374# CONFIG_MAC80211 is not set 390
391#
392# CFG80211 needs to be enabled for MAC80211
393#
394CONFIG_MAC80211_DEFAULT_PS_VALUE=0
375# CONFIG_WIMAX is not set 395# CONFIG_WIMAX is not set
376# CONFIG_RFKILL is not set 396# CONFIG_RFKILL is not set
377# CONFIG_NET_9P is not set 397# CONFIG_NET_9P is not set
@@ -391,6 +411,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
391# CONFIG_CONNECTOR is not set 411# CONFIG_CONNECTOR is not set
392# CONFIG_MTD is not set 412# CONFIG_MTD is not set
393CONFIG_OF_DEVICE=y 413CONFIG_OF_DEVICE=y
414CONFIG_OF_MDIO=y
394# CONFIG_PARPORT is not set 415# CONFIG_PARPORT is not set
395CONFIG_BLK_DEV=y 416CONFIG_BLK_DEV=y
396# CONFIG_BLK_DEV_FD is not set 417# CONFIG_BLK_DEV_FD is not set
@@ -422,6 +443,7 @@ CONFIG_MISC_DEVICES=y
422# EEPROM support 443# EEPROM support
423# 444#
424# CONFIG_EEPROM_93CX6 is not set 445# CONFIG_EEPROM_93CX6 is not set
446# CONFIG_CB710_CORE is not set
425CONFIG_HAVE_IDE=y 447CONFIG_HAVE_IDE=y
426# CONFIG_IDE is not set 448# CONFIG_IDE is not set
427 449
@@ -441,14 +463,17 @@ CONFIG_HAVE_IDE=y
441# 463#
442 464
443# 465#
444# Enable only one of the two stacks, unless you know what you are doing 466# You can enable one or both FireWire driver stacks.
467#
468
469#
470# See the help texts for more information.
445# 471#
446# CONFIG_FIREWIRE is not set 472# CONFIG_FIREWIRE is not set
447# CONFIG_IEEE1394 is not set 473# CONFIG_IEEE1394 is not set
448# CONFIG_I2O is not set 474# CONFIG_I2O is not set
449# CONFIG_MACINTOSH_DRIVERS is not set 475# CONFIG_MACINTOSH_DRIVERS is not set
450CONFIG_NETDEVICES=y 476CONFIG_NETDEVICES=y
451CONFIG_COMPAT_NET_DEV_OPS=y
452# CONFIG_DUMMY is not set 477# CONFIG_DUMMY is not set
453# CONFIG_BONDING is not set 478# CONFIG_BONDING is not set
454# CONFIG_MACVLAN is not set 479# CONFIG_MACVLAN is not set
@@ -495,6 +520,7 @@ CONFIG_MII=y
495# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 520# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
496# CONFIG_NET_PCI is not set 521# CONFIG_NET_PCI is not set
497# CONFIG_B44 is not set 522# CONFIG_B44 is not set
523# CONFIG_KS8842 is not set
498# CONFIG_ATL2 is not set 524# CONFIG_ATL2 is not set
499CONFIG_NETDEV_1000=y 525CONFIG_NETDEV_1000=y
500# CONFIG_ACENIC is not set 526# CONFIG_ACENIC is not set
@@ -514,8 +540,10 @@ CONFIG_NETDEV_1000=y
514# CONFIG_VIA_VELOCITY is not set 540# CONFIG_VIA_VELOCITY is not set
515# CONFIG_TIGON3 is not set 541# CONFIG_TIGON3 is not set
516# CONFIG_BNX2 is not set 542# CONFIG_BNX2 is not set
543# CONFIG_CNIC is not set
517CONFIG_FSL_PQ_MDIO=y 544CONFIG_FSL_PQ_MDIO=y
518CONFIG_GIANFAR=y 545CONFIG_GIANFAR=y
546# CONFIG_MV643XX_ETH is not set
519# CONFIG_QLA3XXX is not set 547# CONFIG_QLA3XXX is not set
520# CONFIG_ATL1 is not set 548# CONFIG_ATL1 is not set
521# CONFIG_ATL1E is not set 549# CONFIG_ATL1E is not set
@@ -637,6 +665,11 @@ CONFIG_GEN_RTC=y
637CONFIG_DEVPORT=y 665CONFIG_DEVPORT=y
638# CONFIG_I2C is not set 666# CONFIG_I2C is not set
639# CONFIG_SPI is not set 667# CONFIG_SPI is not set
668
669#
670# PPS support
671#
672# CONFIG_PPS is not set
640CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 673CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
641# CONFIG_GPIOLIB is not set 674# CONFIG_GPIOLIB is not set
642# CONFIG_W1 is not set 675# CONFIG_W1 is not set
@@ -676,22 +709,7 @@ CONFIG_SSB_POSSIBLE=y
676# CONFIG_HTC_PASIC3 is not set 709# CONFIG_HTC_PASIC3 is not set
677# CONFIG_MFD_TMIO is not set 710# CONFIG_MFD_TMIO is not set
678# CONFIG_REGULATOR is not set 711# CONFIG_REGULATOR is not set
679 712# CONFIG_MEDIA_SUPPORT is not set
680#
681# Multimedia devices
682#
683
684#
685# Multimedia core support
686#
687# CONFIG_VIDEO_DEV is not set
688# CONFIG_DVB_CORE is not set
689# CONFIG_VIDEO_MEDIA is not set
690
691#
692# Multimedia drivers
693#
694CONFIG_DAB=y
695 713
696# 714#
697# Graphics support 715# Graphics support
@@ -721,6 +739,10 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
721# CONFIG_DMADEVICES is not set 739# CONFIG_DMADEVICES is not set
722# CONFIG_AUXDISPLAY is not set 740# CONFIG_AUXDISPLAY is not set
723# CONFIG_UIO is not set 741# CONFIG_UIO is not set
742
743#
744# TI VLYNQ
745#
724# CONFIG_STAGING is not set 746# CONFIG_STAGING is not set
725 747
726# 748#
@@ -732,10 +754,12 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
732# CONFIG_REISERFS_FS is not set 754# CONFIG_REISERFS_FS is not set
733# CONFIG_JFS_FS is not set 755# CONFIG_JFS_FS is not set
734# CONFIG_FS_POSIX_ACL is not set 756# CONFIG_FS_POSIX_ACL is not set
735CONFIG_FILE_LOCKING=y
736# CONFIG_XFS_FS is not set 757# CONFIG_XFS_FS is not set
758# CONFIG_GFS2_FS is not set
737# CONFIG_OCFS2_FS is not set 759# CONFIG_OCFS2_FS is not set
738# CONFIG_BTRFS_FS is not set 760# CONFIG_BTRFS_FS is not set
761CONFIG_FILE_LOCKING=y
762CONFIG_FSNOTIFY=y
739CONFIG_DNOTIFY=y 763CONFIG_DNOTIFY=y
740CONFIG_INOTIFY=y 764CONFIG_INOTIFY=y
741CONFIG_INOTIFY_USER=y 765CONFIG_INOTIFY_USER=y
@@ -838,6 +862,7 @@ CONFIG_HAS_IOPORT=y
838CONFIG_HAS_DMA=y 862CONFIG_HAS_DMA=y
839CONFIG_HAVE_LMB=y 863CONFIG_HAVE_LMB=y
840CONFIG_NLATTR=y 864CONFIG_NLATTR=y
865CONFIG_GENERIC_ATOMIC64=y
841 866
842# 867#
843# Kernel hacking 868# Kernel hacking
@@ -861,22 +886,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
861CONFIG_HAVE_DYNAMIC_FTRACE=y 886CONFIG_HAVE_DYNAMIC_FTRACE=y
862CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 887CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
863CONFIG_TRACING_SUPPORT=y 888CONFIG_TRACING_SUPPORT=y
864 889# CONFIG_FTRACE is not set
865#
866# Tracers
867#
868# CONFIG_FUNCTION_TRACER is not set
869# CONFIG_SCHED_TRACER is not set
870# CONFIG_CONTEXT_SWITCH_TRACER is not set
871# CONFIG_EVENT_TRACER is not set
872# CONFIG_BOOT_TRACER is not set
873# CONFIG_TRACE_BRANCH_PROFILING is not set
874# CONFIG_STACK_TRACER is not set
875# CONFIG_KMEMTRACE is not set
876# CONFIG_WORKQUEUE_TRACER is not set
877# CONFIG_BLK_DEV_IO_TRACE is not set
878# CONFIG_SAMPLES is not set 890# CONFIG_SAMPLES is not set
879CONFIG_HAVE_ARCH_KGDB=y 891CONFIG_HAVE_ARCH_KGDB=y
892# CONFIG_PPC_DISABLE_WERROR is not set
893CONFIG_PPC_WERROR=y
880CONFIG_PRINT_STACK_DEPTH=64 894CONFIG_PRINT_STACK_DEPTH=64
881# CONFIG_IRQSTACKS is not set 895# CONFIG_IRQSTACKS is not set
882# CONFIG_PPC_EARLY_DEBUG is not set 896# CONFIG_PPC_EARLY_DEBUG is not set
diff --git a/arch/powerpc/configs/85xx/sbc8560_defconfig b/arch/powerpc/configs/85xx/sbc8560_defconfig
index 4aaf1a6bdc7..b0c469823b0 100644
--- a/arch/powerpc/configs/85xx/sbc8560_defconfig
+++ b/arch/powerpc/configs/85xx/sbc8560_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:20 2009 4# Wed Jul 29 23:32:19 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12CONFIG_PPC_85xx=y 12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -34,15 +34,16 @@ CONFIG_GENERIC_TIME=y
34CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
35CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
36CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
38CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
39CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
40CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
41CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
42CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
43CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
44CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
45CONFIG_GENERIC_CALIBRATE_DELAY=y
46CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
48CONFIG_PPC=y 49CONFIG_PPC=y
@@ -56,11 +57,13 @@ CONFIG_PPC_UDBG_16550=y
56# CONFIG_GENERIC_TBSYNC is not set 57# CONFIG_GENERIC_TBSYNC is not set
57CONFIG_AUDIT_ARCH=y 58CONFIG_AUDIT_ARCH=y
58CONFIG_GENERIC_BUG=y 59CONFIG_GENERIC_BUG=y
60CONFIG_DTC=y
59CONFIG_DEFAULT_UIMAGE=y 61CONFIG_DEFAULT_UIMAGE=y
60# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
61# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
62CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
63CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
64 67
65# 68#
66# General setup 69# General setup
@@ -111,7 +114,6 @@ CONFIG_SYSCTL_SYSCALL=y
111CONFIG_KALLSYMS=y 114CONFIG_KALLSYMS=y
112# CONFIG_KALLSYMS_ALL is not set 115# CONFIG_KALLSYMS_ALL is not set
113# CONFIG_KALLSYMS_EXTRA_PASS is not set 116# CONFIG_KALLSYMS_EXTRA_PASS is not set
114# CONFIG_STRIP_ASM_SYMS is not set
115CONFIG_HOTPLUG=y 117CONFIG_HOTPLUG=y
116CONFIG_PRINTK=y 118CONFIG_PRINTK=y
117CONFIG_BUG=y 119CONFIG_BUG=y
@@ -124,7 +126,14 @@ CONFIG_TIMERFD=y
124CONFIG_EVENTFD=y 126CONFIG_EVENTFD=y
125CONFIG_SHMEM=y 127CONFIG_SHMEM=y
126CONFIG_AIO=y 128CONFIG_AIO=y
129CONFIG_HAVE_PERF_COUNTERS=y
130
131#
132# Performance Counters
133#
134# CONFIG_PERF_COUNTERS is not set
127CONFIG_VM_EVENT_COUNTERS=y 135CONFIG_VM_EVENT_COUNTERS=y
136# CONFIG_STRIP_ASM_SYMS is not set
128CONFIG_COMPAT_BRK=y 137CONFIG_COMPAT_BRK=y
129CONFIG_SLAB=y 138CONFIG_SLAB=y
130# CONFIG_SLUB is not set 139# CONFIG_SLUB is not set
@@ -137,6 +146,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
137CONFIG_HAVE_KPROBES=y 146CONFIG_HAVE_KPROBES=y
138CONFIG_HAVE_KRETPROBES=y 147CONFIG_HAVE_KRETPROBES=y
139CONFIG_HAVE_ARCH_TRACEHOOK=y 148CONFIG_HAVE_ARCH_TRACEHOOK=y
149
150#
151# GCOV-based kernel profiling
152#
140# CONFIG_SLOW_WORK is not set 153# CONFIG_SLOW_WORK is not set
141# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 154# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
142CONFIG_SLABINFO=y 155CONFIG_SLABINFO=y
@@ -144,7 +157,7 @@ CONFIG_RT_MUTEXES=y
144CONFIG_BASE_SMALL=0 157CONFIG_BASE_SMALL=0
145# CONFIG_MODULES is not set 158# CONFIG_MODULES is not set
146CONFIG_BLOCK=y 159CONFIG_BLOCK=y
147# CONFIG_LBD is not set 160CONFIG_LBDAF=y
148# CONFIG_BLK_DEV_BSG is not set 161# CONFIG_BLK_DEV_BSG is not set
149# CONFIG_BLK_DEV_INTEGRITY is not set 162# CONFIG_BLK_DEV_INTEGRITY is not set
150 163
@@ -177,6 +190,7 @@ CONFIG_MPC85xx=y
177# CONFIG_MPC85xx_DS is not set 190# CONFIG_MPC85xx_DS is not set
178# CONFIG_SOCRATES is not set 191# CONFIG_SOCRATES is not set
179# CONFIG_KSI8560 is not set 192# CONFIG_KSI8560 is not set
193# CONFIG_XES_MPC85xx is not set
180# CONFIG_STX_GP3 is not set 194# CONFIG_STX_GP3 is not set
181# CONFIG_TQM8540 is not set 195# CONFIG_TQM8540 is not set
182# CONFIG_TQM8541 is not set 196# CONFIG_TQM8541 is not set
@@ -224,6 +238,7 @@ CONFIG_BINFMT_ELF=y
224CONFIG_BINFMT_MISC=y 238CONFIG_BINFMT_MISC=y
225# CONFIG_MATH_EMULATION is not set 239# CONFIG_MATH_EMULATION is not set
226# CONFIG_IOMMU_HELPER is not set 240# CONFIG_IOMMU_HELPER is not set
241# CONFIG_SWIOTLB is not set
227CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 242CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
228CONFIG_ARCH_HAS_WALK_MEMORY=y 243CONFIG_ARCH_HAS_WALK_MEMORY=y
229CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 244CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -242,9 +257,9 @@ CONFIG_MIGRATION=y
242CONFIG_ZONE_DMA_FLAG=1 257CONFIG_ZONE_DMA_FLAG=1
243CONFIG_BOUNCE=y 258CONFIG_BOUNCE=y
244CONFIG_VIRT_TO_BUS=y 259CONFIG_VIRT_TO_BUS=y
245CONFIG_UNEVICTABLE_LRU=y
246CONFIG_HAVE_MLOCK=y 260CONFIG_HAVE_MLOCK=y
247CONFIG_HAVE_MLOCKED_PAGE_BIT=y 261CONFIG_HAVE_MLOCKED_PAGE_BIT=y
262CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
248CONFIG_PPC_4K_PAGES=y 263CONFIG_PPC_4K_PAGES=y
249# CONFIG_PPC_16K_PAGES is not set 264# CONFIG_PPC_16K_PAGES is not set
250# CONFIG_PPC_64K_PAGES is not set 265# CONFIG_PPC_64K_PAGES is not set
@@ -346,6 +361,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
346# CONFIG_ECONET is not set 361# CONFIG_ECONET is not set
347# CONFIG_WAN_ROUTER is not set 362# CONFIG_WAN_ROUTER is not set
348# CONFIG_PHONET is not set 363# CONFIG_PHONET is not set
364# CONFIG_IEEE802154 is not set
349# CONFIG_NET_SCHED is not set 365# CONFIG_NET_SCHED is not set
350# CONFIG_DCB is not set 366# CONFIG_DCB is not set
351 367
@@ -363,7 +379,11 @@ CONFIG_WIRELESS=y
363CONFIG_WIRELESS_OLD_REGULATORY=y 379CONFIG_WIRELESS_OLD_REGULATORY=y
364# CONFIG_WIRELESS_EXT is not set 380# CONFIG_WIRELESS_EXT is not set
365# CONFIG_LIB80211 is not set 381# CONFIG_LIB80211 is not set
366# CONFIG_MAC80211 is not set 382
383#
384# CFG80211 needs to be enabled for MAC80211
385#
386CONFIG_MAC80211_DEFAULT_PS_VALUE=0
367# CONFIG_WIMAX is not set 387# CONFIG_WIMAX is not set
368# CONFIG_RFKILL is not set 388# CONFIG_RFKILL is not set
369# CONFIG_NET_9P is not set 389# CONFIG_NET_9P is not set
@@ -385,6 +405,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
385# CONFIG_CONNECTOR is not set 405# CONFIG_CONNECTOR is not set
386# CONFIG_MTD is not set 406# CONFIG_MTD is not set
387CONFIG_OF_DEVICE=y 407CONFIG_OF_DEVICE=y
408CONFIG_OF_MDIO=y
388# CONFIG_PARPORT is not set 409# CONFIG_PARPORT is not set
389CONFIG_BLK_DEV=y 410CONFIG_BLK_DEV=y
390# CONFIG_BLK_DEV_FD is not set 411# CONFIG_BLK_DEV_FD is not set
@@ -421,7 +442,6 @@ CONFIG_HAVE_IDE=y
421# CONFIG_MD is not set 442# CONFIG_MD is not set
422# CONFIG_MACINTOSH_DRIVERS is not set 443# CONFIG_MACINTOSH_DRIVERS is not set
423CONFIG_NETDEVICES=y 444CONFIG_NETDEVICES=y
424CONFIG_COMPAT_NET_DEV_OPS=y
425# CONFIG_DUMMY is not set 445# CONFIG_DUMMY is not set
426# CONFIG_BONDING is not set 446# CONFIG_BONDING is not set
427# CONFIG_MACVLAN is not set 447# CONFIG_MACVLAN is not set
@@ -460,9 +480,11 @@ CONFIG_MII=y
460# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 480# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
461# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 481# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
462# CONFIG_B44 is not set 482# CONFIG_B44 is not set
483# CONFIG_KS8842 is not set
463CONFIG_NETDEV_1000=y 484CONFIG_NETDEV_1000=y
464CONFIG_FSL_PQ_MDIO=y 485CONFIG_FSL_PQ_MDIO=y
465CONFIG_GIANFAR=y 486CONFIG_GIANFAR=y
487# CONFIG_MV643XX_ETH is not set
466CONFIG_NETDEV_10000=y 488CONFIG_NETDEV_10000=y
467 489
468# 490#
@@ -551,6 +573,11 @@ CONFIG_LEGACY_PTY_COUNT=256
551# CONFIG_TCG_TPM is not set 573# CONFIG_TCG_TPM is not set
552# CONFIG_I2C is not set 574# CONFIG_I2C is not set
553# CONFIG_SPI is not set 575# CONFIG_SPI is not set
576
577#
578# PPS support
579#
580# CONFIG_PPS is not set
554CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 581CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
555# CONFIG_GPIOLIB is not set 582# CONFIG_GPIOLIB is not set
556# CONFIG_W1 is not set 583# CONFIG_W1 is not set
@@ -586,22 +613,7 @@ CONFIG_SSB_POSSIBLE=y
586# CONFIG_HTC_PASIC3 is not set 613# CONFIG_HTC_PASIC3 is not set
587# CONFIG_MFD_TMIO is not set 614# CONFIG_MFD_TMIO is not set
588# CONFIG_REGULATOR is not set 615# CONFIG_REGULATOR is not set
589 616# CONFIG_MEDIA_SUPPORT is not set
590#
591# Multimedia devices
592#
593
594#
595# Multimedia core support
596#
597# CONFIG_VIDEO_DEV is not set
598# CONFIG_DVB_CORE is not set
599# CONFIG_VIDEO_MEDIA is not set
600
601#
602# Multimedia drivers
603#
604CONFIG_DAB=y
605 617
606# 618#
607# Graphics support 619# Graphics support
@@ -690,6 +702,10 @@ CONFIG_RTC_DRV_M48T59=y
690# CONFIG_DMADEVICES is not set 702# CONFIG_DMADEVICES is not set
691# CONFIG_AUXDISPLAY is not set 703# CONFIG_AUXDISPLAY is not set
692# CONFIG_UIO is not set 704# CONFIG_UIO is not set
705
706#
707# TI VLYNQ
708#
693# CONFIG_STAGING is not set 709# CONFIG_STAGING is not set
694 710
695# 711#
@@ -701,10 +717,12 @@ CONFIG_RTC_DRV_M48T59=y
701# CONFIG_REISERFS_FS is not set 717# CONFIG_REISERFS_FS is not set
702# CONFIG_JFS_FS is not set 718# CONFIG_JFS_FS is not set
703# CONFIG_FS_POSIX_ACL is not set 719# CONFIG_FS_POSIX_ACL is not set
704CONFIG_FILE_LOCKING=y
705# CONFIG_XFS_FS is not set 720# CONFIG_XFS_FS is not set
721# CONFIG_GFS2_FS is not set
706# CONFIG_OCFS2_FS is not set 722# CONFIG_OCFS2_FS is not set
707# CONFIG_BTRFS_FS is not set 723# CONFIG_BTRFS_FS is not set
724CONFIG_FILE_LOCKING=y
725CONFIG_FSNOTIFY=y
708CONFIG_DNOTIFY=y 726CONFIG_DNOTIFY=y
709CONFIG_INOTIFY=y 727CONFIG_INOTIFY=y
710CONFIG_INOTIFY_USER=y 728CONFIG_INOTIFY_USER=y
@@ -819,6 +837,7 @@ CONFIG_HAS_IOPORT=y
819CONFIG_HAS_DMA=y 837CONFIG_HAS_DMA=y
820CONFIG_HAVE_LMB=y 838CONFIG_HAVE_LMB=y
821CONFIG_NLATTR=y 839CONFIG_NLATTR=y
840CONFIG_GENERIC_ATOMIC64=y
822 841
823# 842#
824# Kernel hacking 843# Kernel hacking
@@ -848,6 +867,9 @@ CONFIG_SCHED_DEBUG=y
848# CONFIG_RT_MUTEX_TESTER is not set 867# CONFIG_RT_MUTEX_TESTER is not set
849# CONFIG_DEBUG_SPINLOCK is not set 868# CONFIG_DEBUG_SPINLOCK is not set
850CONFIG_DEBUG_MUTEXES=y 869CONFIG_DEBUG_MUTEXES=y
870# CONFIG_DEBUG_LOCK_ALLOC is not set
871# CONFIG_PROVE_LOCKING is not set
872# CONFIG_LOCK_STAT is not set
851# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 873# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
852# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 874# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
853# CONFIG_DEBUG_KOBJECT is not set 875# CONFIG_DEBUG_KOBJECT is not set
@@ -859,7 +881,6 @@ CONFIG_DEBUG_MUTEXES=y
859# CONFIG_DEBUG_LIST is not set 881# CONFIG_DEBUG_LIST is not set
860# CONFIG_DEBUG_SG is not set 882# CONFIG_DEBUG_SG is not set
861# CONFIG_DEBUG_NOTIFIERS is not set 883# CONFIG_DEBUG_NOTIFIERS is not set
862# CONFIG_BOOT_PRINTK_DELAY is not set
863# CONFIG_RCU_TORTURE_TEST is not set 884# CONFIG_RCU_TORTURE_TEST is not set
864# CONFIG_RCU_CPU_STALL_DETECTOR is not set 885# CONFIG_RCU_CPU_STALL_DETECTOR is not set
865# CONFIG_BACKTRACE_SELF_TEST is not set 886# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -873,16 +894,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
873CONFIG_HAVE_DYNAMIC_FTRACE=y 894CONFIG_HAVE_DYNAMIC_FTRACE=y
874CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 895CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
875CONFIG_TRACING_SUPPORT=y 896CONFIG_TRACING_SUPPORT=y
876 897CONFIG_FTRACE=y
877#
878# Tracers
879#
880# CONFIG_FUNCTION_TRACER is not set 898# CONFIG_FUNCTION_TRACER is not set
899# CONFIG_IRQSOFF_TRACER is not set
881# CONFIG_SCHED_TRACER is not set 900# CONFIG_SCHED_TRACER is not set
882# CONFIG_CONTEXT_SWITCH_TRACER is not set 901# CONFIG_ENABLE_DEFAULT_TRACERS is not set
883# CONFIG_EVENT_TRACER is not set
884# CONFIG_BOOT_TRACER is not set 902# CONFIG_BOOT_TRACER is not set
885# CONFIG_TRACE_BRANCH_PROFILING is not set 903CONFIG_BRANCH_PROFILE_NONE=y
904# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
905# CONFIG_PROFILE_ALL_BRANCHES is not set
886# CONFIG_STACK_TRACER is not set 906# CONFIG_STACK_TRACER is not set
887# CONFIG_KMEMTRACE is not set 907# CONFIG_KMEMTRACE is not set
888# CONFIG_WORKQUEUE_TRACER is not set 908# CONFIG_WORKQUEUE_TRACER is not set
@@ -890,6 +910,9 @@ CONFIG_TRACING_SUPPORT=y
890# CONFIG_SAMPLES is not set 910# CONFIG_SAMPLES is not set
891CONFIG_HAVE_ARCH_KGDB=y 911CONFIG_HAVE_ARCH_KGDB=y
892# CONFIG_KGDB is not set 912# CONFIG_KGDB is not set
913# CONFIG_KMEMCHECK is not set
914# CONFIG_PPC_DISABLE_WERROR is not set
915CONFIG_PPC_WERROR=y
893CONFIG_PRINT_STACK_DEPTH=64 916CONFIG_PRINT_STACK_DEPTH=64
894# CONFIG_DEBUG_STACKOVERFLOW is not set 917# CONFIG_DEBUG_STACKOVERFLOW is not set
895# CONFIG_DEBUG_STACK_USAGE is not set 918# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/85xx/socrates_defconfig b/arch/powerpc/configs/85xx/socrates_defconfig
index 79984589db6..04c85dada84 100644
--- a/arch/powerpc/configs/85xx/socrates_defconfig
+++ b/arch/powerpc/configs/85xx/socrates_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:21 2009 4# Wed Jul 29 23:32:19 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12CONFIG_PPC_85xx=y 12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -34,15 +34,16 @@ CONFIG_GENERIC_TIME=y
34CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
35CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
36CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
38CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
39CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
40CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
41CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
42CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
43CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
44CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
45CONFIG_GENERIC_CALIBRATE_DELAY=y
46CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
48CONFIG_PPC=y 49CONFIG_PPC=y
@@ -56,11 +57,13 @@ CONFIG_PPC_UDBG_16550=y
56# CONFIG_GENERIC_TBSYNC is not set 57# CONFIG_GENERIC_TBSYNC is not set
57CONFIG_AUDIT_ARCH=y 58CONFIG_AUDIT_ARCH=y
58CONFIG_GENERIC_BUG=y 59CONFIG_GENERIC_BUG=y
60CONFIG_DTC=y
59CONFIG_DEFAULT_UIMAGE=y 61CONFIG_DEFAULT_UIMAGE=y
60# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
61# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
62CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
63CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
64 67
65# 68#
66# General setup 69# General setup
@@ -109,7 +112,6 @@ CONFIG_ANON_INODES=y
109CONFIG_EMBEDDED=y 112CONFIG_EMBEDDED=y
110CONFIG_SYSCTL_SYSCALL=y 113CONFIG_SYSCTL_SYSCALL=y
111# CONFIG_KALLSYMS is not set 114# CONFIG_KALLSYMS is not set
112# CONFIG_STRIP_ASM_SYMS is not set
113# CONFIG_HOTPLUG is not set 115# CONFIG_HOTPLUG is not set
114CONFIG_PRINTK=y 116CONFIG_PRINTK=y
115CONFIG_BUG=y 117CONFIG_BUG=y
@@ -122,9 +124,16 @@ CONFIG_TIMERFD=y
122CONFIG_EVENTFD=y 124CONFIG_EVENTFD=y
123CONFIG_SHMEM=y 125CONFIG_SHMEM=y
124CONFIG_AIO=y 126CONFIG_AIO=y
127CONFIG_HAVE_PERF_COUNTERS=y
128
129#
130# Performance Counters
131#
132# CONFIG_PERF_COUNTERS is not set
125CONFIG_VM_EVENT_COUNTERS=y 133CONFIG_VM_EVENT_COUNTERS=y
126CONFIG_PCI_QUIRKS=y 134CONFIG_PCI_QUIRKS=y
127CONFIG_SLUB_DEBUG=y 135CONFIG_SLUB_DEBUG=y
136# CONFIG_STRIP_ASM_SYMS is not set
128CONFIG_COMPAT_BRK=y 137CONFIG_COMPAT_BRK=y
129# CONFIG_SLAB is not set 138# CONFIG_SLAB is not set
130CONFIG_SLUB=y 139CONFIG_SLUB=y
@@ -137,6 +146,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
137CONFIG_HAVE_KPROBES=y 146CONFIG_HAVE_KPROBES=y
138CONFIG_HAVE_KRETPROBES=y 147CONFIG_HAVE_KRETPROBES=y
139CONFIG_HAVE_ARCH_TRACEHOOK=y 148CONFIG_HAVE_ARCH_TRACEHOOK=y
149
150#
151# GCOV-based kernel profiling
152#
140# CONFIG_SLOW_WORK is not set 153# CONFIG_SLOW_WORK is not set
141# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 154# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
142CONFIG_SLABINFO=y 155CONFIG_SLABINFO=y
@@ -149,7 +162,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
149# CONFIG_MODVERSIONS is not set 162# CONFIG_MODVERSIONS is not set
150# CONFIG_MODULE_SRCVERSION_ALL is not set 163# CONFIG_MODULE_SRCVERSION_ALL is not set
151CONFIG_BLOCK=y 164CONFIG_BLOCK=y
152# CONFIG_LBD is not set 165CONFIG_LBDAF=y
153# CONFIG_BLK_DEV_BSG is not set 166# CONFIG_BLK_DEV_BSG is not set
154# CONFIG_BLK_DEV_INTEGRITY is not set 167# CONFIG_BLK_DEV_INTEGRITY is not set
155 168
@@ -182,6 +195,7 @@ CONFIG_MPC85xx=y
182# CONFIG_MPC85xx_DS is not set 195# CONFIG_MPC85xx_DS is not set
183CONFIG_SOCRATES=y 196CONFIG_SOCRATES=y
184# CONFIG_KSI8560 is not set 197# CONFIG_KSI8560 is not set
198# CONFIG_XES_MPC85xx is not set
185# CONFIG_STX_GP3 is not set 199# CONFIG_STX_GP3 is not set
186# CONFIG_TQM8540 is not set 200# CONFIG_TQM8540 is not set
187# CONFIG_TQM8541 is not set 201# CONFIG_TQM8541 is not set
@@ -229,6 +243,7 @@ CONFIG_BINFMT_ELF=y
229# CONFIG_BINFMT_MISC is not set 243# CONFIG_BINFMT_MISC is not set
230CONFIG_MATH_EMULATION=y 244CONFIG_MATH_EMULATION=y
231# CONFIG_IOMMU_HELPER is not set 245# CONFIG_IOMMU_HELPER is not set
246# CONFIG_SWIOTLB is not set
232CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 247CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
233CONFIG_ARCH_HAS_WALK_MEMORY=y 248CONFIG_ARCH_HAS_WALK_MEMORY=y
234CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 249CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -247,9 +262,9 @@ CONFIG_MIGRATION=y
247CONFIG_ZONE_DMA_FLAG=1 262CONFIG_ZONE_DMA_FLAG=1
248CONFIG_BOUNCE=y 263CONFIG_BOUNCE=y
249CONFIG_VIRT_TO_BUS=y 264CONFIG_VIRT_TO_BUS=y
250CONFIG_UNEVICTABLE_LRU=y
251CONFIG_HAVE_MLOCK=y 265CONFIG_HAVE_MLOCK=y
252CONFIG_HAVE_MLOCKED_PAGE_BIT=y 266CONFIG_HAVE_MLOCKED_PAGE_BIT=y
267CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
253CONFIG_PPC_4K_PAGES=y 268CONFIG_PPC_4K_PAGES=y
254# CONFIG_PPC_16K_PAGES is not set 269# CONFIG_PPC_16K_PAGES is not set
255# CONFIG_PPC_64K_PAGES is not set 270# CONFIG_PPC_64K_PAGES is not set
@@ -357,6 +372,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
357# CONFIG_ECONET is not set 372# CONFIG_ECONET is not set
358# CONFIG_WAN_ROUTER is not set 373# CONFIG_WAN_ROUTER is not set
359# CONFIG_PHONET is not set 374# CONFIG_PHONET is not set
375# CONFIG_IEEE802154 is not set
360# CONFIG_NET_SCHED is not set 376# CONFIG_NET_SCHED is not set
361# CONFIG_DCB is not set 377# CONFIG_DCB is not set
362 378
@@ -373,6 +389,7 @@ CONFIG_CAN_BCM=y
373# CAN Device Drivers 389# CAN Device Drivers
374# 390#
375# CONFIG_CAN_VCAN is not set 391# CONFIG_CAN_VCAN is not set
392# CONFIG_CAN_DEV is not set
376# CONFIG_CAN_DEBUG_DEVICES is not set 393# CONFIG_CAN_DEBUG_DEVICES is not set
377# CONFIG_IRDA is not set 394# CONFIG_IRDA is not set
378# CONFIG_BT is not set 395# CONFIG_BT is not set
@@ -382,7 +399,11 @@ CONFIG_WIRELESS=y
382# CONFIG_WIRELESS_OLD_REGULATORY is not set 399# CONFIG_WIRELESS_OLD_REGULATORY is not set
383# CONFIG_WIRELESS_EXT is not set 400# CONFIG_WIRELESS_EXT is not set
384# CONFIG_LIB80211 is not set 401# CONFIG_LIB80211 is not set
385# CONFIG_MAC80211 is not set 402
403#
404# CFG80211 needs to be enabled for MAC80211
405#
406CONFIG_MAC80211_DEFAULT_PS_VALUE=0
386# CONFIG_WIMAX is not set 407# CONFIG_WIMAX is not set
387# CONFIG_RFKILL is not set 408# CONFIG_RFKILL is not set
388# CONFIG_NET_9P is not set 409# CONFIG_NET_9P is not set
@@ -499,6 +520,7 @@ CONFIG_MTD_NAND_SOCRATES=y
499CONFIG_OF_DEVICE=y 520CONFIG_OF_DEVICE=y
500CONFIG_OF_I2C=y 521CONFIG_OF_I2C=y
501CONFIG_OF_SPI=y 522CONFIG_OF_SPI=y
523CONFIG_OF_MDIO=y
502# CONFIG_PARPORT is not set 524# CONFIG_PARPORT is not set
503CONFIG_BLK_DEV=y 525CONFIG_BLK_DEV=y
504# CONFIG_BLK_DEV_FD is not set 526# CONFIG_BLK_DEV_FD is not set
@@ -535,7 +557,9 @@ CONFIG_MISC_DEVICES=y
535# CONFIG_EEPROM_AT24 is not set 557# CONFIG_EEPROM_AT24 is not set
536# CONFIG_EEPROM_AT25 is not set 558# CONFIG_EEPROM_AT25 is not set
537# CONFIG_EEPROM_LEGACY is not set 559# CONFIG_EEPROM_LEGACY is not set
560# CONFIG_EEPROM_MAX6875 is not set
538# CONFIG_EEPROM_93CX6 is not set 561# CONFIG_EEPROM_93CX6 is not set
562# CONFIG_CB710_CORE is not set
539CONFIG_HAVE_IDE=y 563CONFIG_HAVE_IDE=y
540# CONFIG_IDE is not set 564# CONFIG_IDE is not set
541 565
@@ -558,10 +582,6 @@ CONFIG_BLK_DEV_SD=y
558# CONFIG_BLK_DEV_SR is not set 582# CONFIG_BLK_DEV_SR is not set
559# CONFIG_CHR_DEV_SG is not set 583# CONFIG_CHR_DEV_SG is not set
560# CONFIG_CHR_DEV_SCH is not set 584# CONFIG_CHR_DEV_SCH is not set
561
562#
563# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
564#
565# CONFIG_SCSI_MULTI_LUN is not set 585# CONFIG_SCSI_MULTI_LUN is not set
566# CONFIG_SCSI_CONSTANTS is not set 586# CONFIG_SCSI_CONSTANTS is not set
567# CONFIG_SCSI_LOGGING is not set 587# CONFIG_SCSI_LOGGING is not set
@@ -588,14 +608,17 @@ CONFIG_SCSI_WAIT_SCAN=m
588# 608#
589 609
590# 610#
591# Enable only one of the two stacks, unless you know what you are doing 611# You can enable one or both FireWire driver stacks.
612#
613
614#
615# See the help texts for more information.
592# 616#
593# CONFIG_FIREWIRE is not set 617# CONFIG_FIREWIRE is not set
594# CONFIG_IEEE1394 is not set 618# CONFIG_IEEE1394 is not set
595# CONFIG_I2O is not set 619# CONFIG_I2O is not set
596# CONFIG_MACINTOSH_DRIVERS is not set 620# CONFIG_MACINTOSH_DRIVERS is not set
597CONFIG_NETDEVICES=y 621CONFIG_NETDEVICES=y
598CONFIG_COMPAT_NET_DEV_OPS=y
599# CONFIG_DUMMY is not set 622# CONFIG_DUMMY is not set
600# CONFIG_BONDING is not set 623# CONFIG_BONDING is not set
601# CONFIG_MACVLAN is not set 624# CONFIG_MACVLAN is not set
@@ -643,6 +666,8 @@ CONFIG_MII=y
643# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 666# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
644# CONFIG_NET_PCI is not set 667# CONFIG_NET_PCI is not set
645# CONFIG_B44 is not set 668# CONFIG_B44 is not set
669# CONFIG_KS8842 is not set
670# CONFIG_KS8851 is not set
646# CONFIG_ATL2 is not set 671# CONFIG_ATL2 is not set
647CONFIG_NETDEV_1000=y 672CONFIG_NETDEV_1000=y
648# CONFIG_ACENIC is not set 673# CONFIG_ACENIC is not set
@@ -662,8 +687,10 @@ CONFIG_NETDEV_1000=y
662# CONFIG_VIA_VELOCITY is not set 687# CONFIG_VIA_VELOCITY is not set
663# CONFIG_TIGON3 is not set 688# CONFIG_TIGON3 is not set
664# CONFIG_BNX2 is not set 689# CONFIG_BNX2 is not set
690# CONFIG_CNIC is not set
665CONFIG_FSL_PQ_MDIO=y 691CONFIG_FSL_PQ_MDIO=y
666CONFIG_GIANFAR=y 692CONFIG_GIANFAR=y
693# CONFIG_MV643XX_ETH is not set
667# CONFIG_QLA3XXX is not set 694# CONFIG_QLA3XXX is not set
668# CONFIG_ATL1 is not set 695# CONFIG_ATL1 is not set
669# CONFIG_ATL1E is not set 696# CONFIG_ATL1E is not set
@@ -733,6 +760,7 @@ CONFIG_INPUT_TOUCHSCREEN=y
733# CONFIG_TOUCHSCREEN_AD7879_I2C is not set 760# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
734# CONFIG_TOUCHSCREEN_AD7879_SPI is not set 761# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
735# CONFIG_TOUCHSCREEN_AD7879 is not set 762# CONFIG_TOUCHSCREEN_AD7879 is not set
763# CONFIG_TOUCHSCREEN_EETI is not set
736# CONFIG_TOUCHSCREEN_FUJITSU is not set 764# CONFIG_TOUCHSCREEN_FUJITSU is not set
737# CONFIG_TOUCHSCREEN_GUNZE is not set 765# CONFIG_TOUCHSCREEN_GUNZE is not set
738# CONFIG_TOUCHSCREEN_ELO is not set 766# CONFIG_TOUCHSCREEN_ELO is not set
@@ -746,6 +774,7 @@ CONFIG_INPUT_TOUCHSCREEN=y
746# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set 774# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
747# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set 775# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
748# CONFIG_TOUCHSCREEN_TSC2007 is not set 776# CONFIG_TOUCHSCREEN_TSC2007 is not set
777# CONFIG_TOUCHSCREEN_W90X900 is not set
749# CONFIG_INPUT_MISC is not set 778# CONFIG_INPUT_MISC is not set
750 779
751# 780#
@@ -862,7 +891,6 @@ CONFIG_I2C_MPC=y
862# CONFIG_SENSORS_PCF8574 is not set 891# CONFIG_SENSORS_PCF8574 is not set
863# CONFIG_PCF8575 is not set 892# CONFIG_PCF8575 is not set
864# CONFIG_SENSORS_PCA9539 is not set 893# CONFIG_SENSORS_PCA9539 is not set
865# CONFIG_SENSORS_MAX6875 is not set
866# CONFIG_SENSORS_TSL2550 is not set 894# CONFIG_SENSORS_TSL2550 is not set
867# CONFIG_I2C_DEBUG_CORE is not set 895# CONFIG_I2C_DEBUG_CORE is not set
868# CONFIG_I2C_DEBUG_ALGO is not set 896# CONFIG_I2C_DEBUG_ALGO is not set
@@ -875,12 +903,18 @@ CONFIG_SPI_MASTER=y
875# SPI Master Controller Drivers 903# SPI Master Controller Drivers
876# 904#
877# CONFIG_SPI_BITBANG is not set 905# CONFIG_SPI_BITBANG is not set
906# CONFIG_SPI_MPC8xxx is not set
878 907
879# 908#
880# SPI Protocol Masters 909# SPI Protocol Masters
881# 910#
882# CONFIG_SPI_SPIDEV is not set 911# CONFIG_SPI_SPIDEV is not set
883# CONFIG_SPI_TLE62X0 is not set 912# CONFIG_SPI_TLE62X0 is not set
913
914#
915# PPS support
916#
917# CONFIG_PPS is not set
884CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 918CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
885# CONFIG_GPIOLIB is not set 919# CONFIG_GPIOLIB is not set
886# CONFIG_W1 is not set 920# CONFIG_W1 is not set
@@ -938,6 +972,7 @@ CONFIG_SENSORS_LM75=y
938# CONFIG_SENSORS_SMSC47B397 is not set 972# CONFIG_SENSORS_SMSC47B397 is not set
939# CONFIG_SENSORS_ADS7828 is not set 973# CONFIG_SENSORS_ADS7828 is not set
940# CONFIG_SENSORS_THMC50 is not set 974# CONFIG_SENSORS_THMC50 is not set
975# CONFIG_SENSORS_TMP401 is not set
941# CONFIG_SENSORS_VIA686A is not set 976# CONFIG_SENSORS_VIA686A is not set
942# CONFIG_SENSORS_VT1211 is not set 977# CONFIG_SENSORS_VT1211 is not set
943# CONFIG_SENSORS_VT8231 is not set 978# CONFIG_SENSORS_VT8231 is not set
@@ -973,24 +1008,10 @@ CONFIG_SSB_POSSIBLE=y
973# CONFIG_MFD_WM8400 is not set 1008# CONFIG_MFD_WM8400 is not set
974# CONFIG_MFD_WM8350_I2C is not set 1009# CONFIG_MFD_WM8350_I2C is not set
975# CONFIG_MFD_PCF50633 is not set 1010# CONFIG_MFD_PCF50633 is not set
1011# CONFIG_AB3100_CORE is not set
1012# CONFIG_EZX_PCAP is not set
976# CONFIG_REGULATOR is not set 1013# CONFIG_REGULATOR is not set
977 1014# CONFIG_MEDIA_SUPPORT is not set
978#
979# Multimedia devices
980#
981
982#
983# Multimedia core support
984#
985# CONFIG_VIDEO_DEV is not set
986# CONFIG_DVB_CORE is not set
987# CONFIG_VIDEO_MEDIA is not set
988
989#
990# Multimedia drivers
991#
992CONFIG_DAB=y
993# CONFIG_USB_DABUSB is not set
994 1015
995# 1016#
996# Graphics support 1017# Graphics support
@@ -1110,7 +1131,7 @@ CONFIG_USB_HID=y
1110# CONFIG_HID_CHERRY is not set 1131# CONFIG_HID_CHERRY is not set
1111# CONFIG_HID_CHICONY is not set 1132# CONFIG_HID_CHICONY is not set
1112# CONFIG_HID_CYPRESS is not set 1133# CONFIG_HID_CYPRESS is not set
1113# CONFIG_DRAGONRISE_FF is not set 1134# CONFIG_HID_DRAGONRISE is not set
1114# CONFIG_HID_EZKEY is not set 1135# CONFIG_HID_EZKEY is not set
1115# CONFIG_HID_KYE is not set 1136# CONFIG_HID_KYE is not set
1116# CONFIG_HID_GYRATION is not set 1137# CONFIG_HID_GYRATION is not set
@@ -1124,10 +1145,11 @@ CONFIG_USB_HID=y
1124# CONFIG_HID_SAMSUNG is not set 1145# CONFIG_HID_SAMSUNG is not set
1125# CONFIG_HID_SONY is not set 1146# CONFIG_HID_SONY is not set
1126# CONFIG_HID_SUNPLUS is not set 1147# CONFIG_HID_SUNPLUS is not set
1127# CONFIG_GREENASIA_FF is not set 1148# CONFIG_HID_GREENASIA is not set
1149# CONFIG_HID_SMARTJOYPLUS is not set
1128# CONFIG_HID_TOPSEED is not set 1150# CONFIG_HID_TOPSEED is not set
1129# CONFIG_THRUSTMASTER_FF is not set 1151# CONFIG_HID_THRUSTMASTER is not set
1130# CONFIG_ZEROPLUS_FF is not set 1152# CONFIG_HID_ZEROPLUS is not set
1131CONFIG_USB_SUPPORT=y 1153CONFIG_USB_SUPPORT=y
1132CONFIG_USB_ARCH_HAS_HCD=y 1154CONFIG_USB_ARCH_HAS_HCD=y
1133CONFIG_USB_ARCH_HAS_OHCI=y 1155CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1153,6 +1175,7 @@ CONFIG_USB_MON=y
1153# USB Host Controller Drivers 1175# USB Host Controller Drivers
1154# 1176#
1155# CONFIG_USB_C67X00_HCD is not set 1177# CONFIG_USB_C67X00_HCD is not set
1178# CONFIG_USB_XHCI_HCD is not set
1156CONFIG_USB_EHCI_HCD=y 1179CONFIG_USB_EHCI_HCD=y
1157# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1180# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1158# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1181# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1162,9 +1185,9 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y
1162# CONFIG_USB_ISP116X_HCD is not set 1185# CONFIG_USB_ISP116X_HCD is not set
1163# CONFIG_USB_ISP1760_HCD is not set 1186# CONFIG_USB_ISP1760_HCD is not set
1164CONFIG_USB_OHCI_HCD=y 1187CONFIG_USB_OHCI_HCD=y
1165CONFIG_USB_OHCI_HCD_PPC_OF=y
1166CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1188CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1167# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set 1189# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
1190CONFIG_USB_OHCI_HCD_PPC_OF=y
1168CONFIG_USB_OHCI_HCD_PCI=y 1191CONFIG_USB_OHCI_HCD_PCI=y
1169CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y 1192CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1170CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y 1193CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
@@ -1284,6 +1307,7 @@ CONFIG_RTC_INTF_DEV=y
1284# CONFIG_RTC_DRV_S35390A is not set 1307# CONFIG_RTC_DRV_S35390A is not set
1285# CONFIG_RTC_DRV_FM3130 is not set 1308# CONFIG_RTC_DRV_FM3130 is not set
1286# CONFIG_RTC_DRV_RX8581 is not set 1309# CONFIG_RTC_DRV_RX8581 is not set
1310# CONFIG_RTC_DRV_RX8025 is not set
1287 1311
1288# 1312#
1289# SPI RTC drivers 1313# SPI RTC drivers
@@ -1318,6 +1342,10 @@ CONFIG_RTC_INTF_DEV=y
1318# CONFIG_DMADEVICES is not set 1342# CONFIG_DMADEVICES is not set
1319# CONFIG_AUXDISPLAY is not set 1343# CONFIG_AUXDISPLAY is not set
1320# CONFIG_UIO is not set 1344# CONFIG_UIO is not set
1345
1346#
1347# TI VLYNQ
1348#
1321# CONFIG_STAGING is not set 1349# CONFIG_STAGING is not set
1322 1350
1323# 1351#
@@ -1337,10 +1365,12 @@ CONFIG_FS_MBCACHE=y
1337# CONFIG_REISERFS_FS is not set 1365# CONFIG_REISERFS_FS is not set
1338# CONFIG_JFS_FS is not set 1366# CONFIG_JFS_FS is not set
1339# CONFIG_FS_POSIX_ACL is not set 1367# CONFIG_FS_POSIX_ACL is not set
1340CONFIG_FILE_LOCKING=y
1341# CONFIG_XFS_FS is not set 1368# CONFIG_XFS_FS is not set
1369# CONFIG_GFS2_FS is not set
1342# CONFIG_OCFS2_FS is not set 1370# CONFIG_OCFS2_FS is not set
1343# CONFIG_BTRFS_FS is not set 1371# CONFIG_BTRFS_FS is not set
1372CONFIG_FILE_LOCKING=y
1373CONFIG_FSNOTIFY=y
1344CONFIG_DNOTIFY=y 1374CONFIG_DNOTIFY=y
1345CONFIG_INOTIFY=y 1375CONFIG_INOTIFY=y
1346CONFIG_INOTIFY_USER=y 1376CONFIG_INOTIFY_USER=y
@@ -1449,7 +1479,46 @@ CONFIG_MSDOS_PARTITION=y
1449# CONFIG_KARMA_PARTITION is not set 1479# CONFIG_KARMA_PARTITION is not set
1450# CONFIG_EFI_PARTITION is not set 1480# CONFIG_EFI_PARTITION is not set
1451# CONFIG_SYSV68_PARTITION is not set 1481# CONFIG_SYSV68_PARTITION is not set
1452# CONFIG_NLS is not set 1482CONFIG_NLS=y
1483CONFIG_NLS_DEFAULT="iso8859-1"
1484# CONFIG_NLS_CODEPAGE_437 is not set
1485# CONFIG_NLS_CODEPAGE_737 is not set
1486# CONFIG_NLS_CODEPAGE_775 is not set
1487# CONFIG_NLS_CODEPAGE_850 is not set
1488# CONFIG_NLS_CODEPAGE_852 is not set
1489# CONFIG_NLS_CODEPAGE_855 is not set
1490# CONFIG_NLS_CODEPAGE_857 is not set
1491# CONFIG_NLS_CODEPAGE_860 is not set
1492# CONFIG_NLS_CODEPAGE_861 is not set
1493# CONFIG_NLS_CODEPAGE_862 is not set
1494# CONFIG_NLS_CODEPAGE_863 is not set
1495# CONFIG_NLS_CODEPAGE_864 is not set
1496# CONFIG_NLS_CODEPAGE_865 is not set
1497# CONFIG_NLS_CODEPAGE_866 is not set
1498# CONFIG_NLS_CODEPAGE_869 is not set
1499# CONFIG_NLS_CODEPAGE_936 is not set
1500# CONFIG_NLS_CODEPAGE_950 is not set
1501# CONFIG_NLS_CODEPAGE_932 is not set
1502# CONFIG_NLS_CODEPAGE_949 is not set
1503# CONFIG_NLS_CODEPAGE_874 is not set
1504# CONFIG_NLS_ISO8859_8 is not set
1505# CONFIG_NLS_CODEPAGE_1250 is not set
1506# CONFIG_NLS_CODEPAGE_1251 is not set
1507# CONFIG_NLS_ASCII is not set
1508# CONFIG_NLS_ISO8859_1 is not set
1509# CONFIG_NLS_ISO8859_2 is not set
1510# CONFIG_NLS_ISO8859_3 is not set
1511# CONFIG_NLS_ISO8859_4 is not set
1512# CONFIG_NLS_ISO8859_5 is not set
1513# CONFIG_NLS_ISO8859_6 is not set
1514# CONFIG_NLS_ISO8859_7 is not set
1515# CONFIG_NLS_ISO8859_9 is not set
1516# CONFIG_NLS_ISO8859_13 is not set
1517# CONFIG_NLS_ISO8859_14 is not set
1518# CONFIG_NLS_ISO8859_15 is not set
1519# CONFIG_NLS_KOI8_R is not set
1520# CONFIG_NLS_KOI8_U is not set
1521# CONFIG_NLS_UTF8 is not set
1453# CONFIG_DLM is not set 1522# CONFIG_DLM is not set
1454# CONFIG_BINARY_PRINTF is not set 1523# CONFIG_BINARY_PRINTF is not set
1455 1524
@@ -1473,6 +1542,7 @@ CONFIG_HAS_IOPORT=y
1473CONFIG_HAS_DMA=y 1542CONFIG_HAS_DMA=y
1474CONFIG_HAVE_LMB=y 1543CONFIG_HAVE_LMB=y
1475CONFIG_NLATTR=y 1544CONFIG_NLATTR=y
1545CONFIG_GENERIC_ATOMIC64=y
1476 1546
1477# 1547#
1478# Kernel hacking 1548# Kernel hacking
@@ -1498,22 +1568,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1498CONFIG_HAVE_DYNAMIC_FTRACE=y 1568CONFIG_HAVE_DYNAMIC_FTRACE=y
1499CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1569CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1500CONFIG_TRACING_SUPPORT=y 1570CONFIG_TRACING_SUPPORT=y
1501 1571# CONFIG_FTRACE is not set
1502#
1503# Tracers
1504#
1505# CONFIG_FUNCTION_TRACER is not set
1506# CONFIG_SCHED_TRACER is not set
1507# CONFIG_CONTEXT_SWITCH_TRACER is not set
1508# CONFIG_EVENT_TRACER is not set
1509# CONFIG_BOOT_TRACER is not set
1510# CONFIG_TRACE_BRANCH_PROFILING is not set
1511# CONFIG_STACK_TRACER is not set
1512# CONFIG_KMEMTRACE is not set
1513# CONFIG_WORKQUEUE_TRACER is not set
1514# CONFIG_BLK_DEV_IO_TRACE is not set
1515# CONFIG_SAMPLES is not set 1572# CONFIG_SAMPLES is not set
1516CONFIG_HAVE_ARCH_KGDB=y 1573CONFIG_HAVE_ARCH_KGDB=y
1574# CONFIG_PPC_DISABLE_WERROR is not set
1575CONFIG_PPC_WERROR=y
1517CONFIG_PRINT_STACK_DEPTH=64 1576CONFIG_PRINT_STACK_DEPTH=64
1518# CONFIG_IRQSTACKS is not set 1577# CONFIG_IRQSTACKS is not set
1519# CONFIG_PPC_EARLY_DEBUG is not set 1578# CONFIG_PPC_EARLY_DEBUG is not set
diff --git a/arch/powerpc/configs/85xx/stx_gp3_defconfig b/arch/powerpc/configs/85xx/stx_gp3_defconfig
index bd1bfcddbd0..e7e81d6769f 100644
--- a/arch/powerpc/configs/85xx/stx_gp3_defconfig
+++ b/arch/powerpc/configs/85xx/stx_gp3_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:22 2009 4# Wed Jul 29 23:32:20 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12CONFIG_PPC_85xx=y 12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -34,15 +34,16 @@ CONFIG_GENERIC_TIME=y
34CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
35CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
36CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
38CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
39CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
40CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
41CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
42CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
43CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
44CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
45CONFIG_GENERIC_CALIBRATE_DELAY=y
46CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
47CONFIG_GENERIC_GPIO=y 48CONFIG_GENERIC_GPIO=y
48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 49# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -57,11 +58,13 @@ CONFIG_PPC_UDBG_16550=y
57# CONFIG_GENERIC_TBSYNC is not set 58# CONFIG_GENERIC_TBSYNC is not set
58CONFIG_AUDIT_ARCH=y 59CONFIG_AUDIT_ARCH=y
59CONFIG_GENERIC_BUG=y 60CONFIG_GENERIC_BUG=y
61CONFIG_DTC=y
60CONFIG_DEFAULT_UIMAGE=y 62CONFIG_DEFAULT_UIMAGE=y
61# CONFIG_PPC_DCR_NATIVE is not set 63# CONFIG_PPC_DCR_NATIVE is not set
62# CONFIG_PPC_DCR_MMIO is not set 64# CONFIG_PPC_DCR_MMIO is not set
63CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 65CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
64CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 66CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
67CONFIG_CONSTRUCTORS=y
65 68
66# 69#
67# General setup 70# General setup
@@ -112,7 +115,6 @@ CONFIG_SYSCTL_SYSCALL=y
112CONFIG_KALLSYMS=y 115CONFIG_KALLSYMS=y
113# CONFIG_KALLSYMS_ALL is not set 116# CONFIG_KALLSYMS_ALL is not set
114# CONFIG_KALLSYMS_EXTRA_PASS is not set 117# CONFIG_KALLSYMS_EXTRA_PASS is not set
115# CONFIG_STRIP_ASM_SYMS is not set
116CONFIG_HOTPLUG=y 118CONFIG_HOTPLUG=y
117CONFIG_PRINTK=y 119CONFIG_PRINTK=y
118CONFIG_BUG=y 120CONFIG_BUG=y
@@ -125,9 +127,16 @@ CONFIG_TIMERFD=y
125CONFIG_EVENTFD=y 127CONFIG_EVENTFD=y
126CONFIG_SHMEM=y 128CONFIG_SHMEM=y
127CONFIG_AIO=y 129CONFIG_AIO=y
130CONFIG_HAVE_PERF_COUNTERS=y
131
132#
133# Performance Counters
134#
135# CONFIG_PERF_COUNTERS is not set
128CONFIG_VM_EVENT_COUNTERS=y 136CONFIG_VM_EVENT_COUNTERS=y
129CONFIG_PCI_QUIRKS=y 137CONFIG_PCI_QUIRKS=y
130CONFIG_SLUB_DEBUG=y 138CONFIG_SLUB_DEBUG=y
139# CONFIG_STRIP_ASM_SYMS is not set
131CONFIG_COMPAT_BRK=y 140CONFIG_COMPAT_BRK=y
132# CONFIG_SLAB is not set 141# CONFIG_SLAB is not set
133CONFIG_SLUB=y 142CONFIG_SLUB=y
@@ -142,6 +151,10 @@ CONFIG_HAVE_KPROBES=y
142CONFIG_HAVE_KRETPROBES=y 151CONFIG_HAVE_KRETPROBES=y
143CONFIG_HAVE_ARCH_TRACEHOOK=y 152CONFIG_HAVE_ARCH_TRACEHOOK=y
144CONFIG_HAVE_CLK=y 153CONFIG_HAVE_CLK=y
154
155#
156# GCOV-based kernel profiling
157#
145# CONFIG_SLOW_WORK is not set 158# CONFIG_SLOW_WORK is not set
146# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 159# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
147CONFIG_SLABINFO=y 160CONFIG_SLABINFO=y
@@ -153,7 +166,7 @@ CONFIG_MODULES=y
153CONFIG_MODVERSIONS=y 166CONFIG_MODVERSIONS=y
154# CONFIG_MODULE_SRCVERSION_ALL is not set 167# CONFIG_MODULE_SRCVERSION_ALL is not set
155CONFIG_BLOCK=y 168CONFIG_BLOCK=y
156# CONFIG_LBD is not set 169CONFIG_LBDAF=y
157# CONFIG_BLK_DEV_BSG is not set 170# CONFIG_BLK_DEV_BSG is not set
158# CONFIG_BLK_DEV_INTEGRITY is not set 171# CONFIG_BLK_DEV_INTEGRITY is not set
159 172
@@ -186,6 +199,7 @@ CONFIG_MPC85xx=y
186# CONFIG_MPC85xx_DS is not set 199# CONFIG_MPC85xx_DS is not set
187# CONFIG_SOCRATES is not set 200# CONFIG_SOCRATES is not set
188# CONFIG_KSI8560 is not set 201# CONFIG_KSI8560 is not set
202# CONFIG_XES_MPC85xx is not set
189CONFIG_STX_GP3=y 203CONFIG_STX_GP3=y
190# CONFIG_TQM8540 is not set 204# CONFIG_TQM8540 is not set
191# CONFIG_TQM8541 is not set 205# CONFIG_TQM8541 is not set
@@ -234,6 +248,7 @@ CONFIG_BINFMT_ELF=y
234CONFIG_BINFMT_MISC=m 248CONFIG_BINFMT_MISC=m
235CONFIG_MATH_EMULATION=y 249CONFIG_MATH_EMULATION=y
236# CONFIG_IOMMU_HELPER is not set 250# CONFIG_IOMMU_HELPER is not set
251# CONFIG_SWIOTLB is not set
237CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 252CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
238CONFIG_ARCH_HAS_WALK_MEMORY=y 253CONFIG_ARCH_HAS_WALK_MEMORY=y
239CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 254CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -252,9 +267,9 @@ CONFIG_MIGRATION=y
252CONFIG_ZONE_DMA_FLAG=1 267CONFIG_ZONE_DMA_FLAG=1
253CONFIG_BOUNCE=y 268CONFIG_BOUNCE=y
254CONFIG_VIRT_TO_BUS=y 269CONFIG_VIRT_TO_BUS=y
255CONFIG_UNEVICTABLE_LRU=y
256CONFIG_HAVE_MLOCK=y 270CONFIG_HAVE_MLOCK=y
257CONFIG_HAVE_MLOCKED_PAGE_BIT=y 271CONFIG_HAVE_MLOCKED_PAGE_BIT=y
272CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
258CONFIG_PPC_4K_PAGES=y 273CONFIG_PPC_4K_PAGES=y
259# CONFIG_PPC_16K_PAGES is not set 274# CONFIG_PPC_16K_PAGES is not set
260# CONFIG_PPC_64K_PAGES is not set 275# CONFIG_PPC_64K_PAGES is not set
@@ -425,6 +440,7 @@ CONFIG_IP_NF_FILTER=m
425# CONFIG_ECONET is not set 440# CONFIG_ECONET is not set
426# CONFIG_WAN_ROUTER is not set 441# CONFIG_WAN_ROUTER is not set
427# CONFIG_PHONET is not set 442# CONFIG_PHONET is not set
443# CONFIG_IEEE802154 is not set
428# CONFIG_NET_SCHED is not set 444# CONFIG_NET_SCHED is not set
429# CONFIG_DCB is not set 445# CONFIG_DCB is not set
430 446
@@ -442,7 +458,11 @@ CONFIG_WIRELESS=y
442CONFIG_WIRELESS_OLD_REGULATORY=y 458CONFIG_WIRELESS_OLD_REGULATORY=y
443# CONFIG_WIRELESS_EXT is not set 459# CONFIG_WIRELESS_EXT is not set
444# CONFIG_LIB80211 is not set 460# CONFIG_LIB80211 is not set
445# CONFIG_MAC80211 is not set 461
462#
463# CFG80211 needs to be enabled for MAC80211
464#
465CONFIG_MAC80211_DEFAULT_PS_VALUE=0
446# CONFIG_WIMAX is not set 466# CONFIG_WIMAX is not set
447# CONFIG_RFKILL is not set 467# CONFIG_RFKILL is not set
448# CONFIG_NET_9P is not set 468# CONFIG_NET_9P is not set
@@ -466,6 +486,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
466CONFIG_OF_DEVICE=y 486CONFIG_OF_DEVICE=y
467CONFIG_OF_GPIO=y 487CONFIG_OF_GPIO=y
468CONFIG_OF_I2C=m 488CONFIG_OF_I2C=m
489CONFIG_OF_MDIO=y
469CONFIG_PARPORT=m 490CONFIG_PARPORT=m
470CONFIG_PARPORT_PC=m 491CONFIG_PARPORT_PC=m
471# CONFIG_PARPORT_PC_FIFO is not set 492# CONFIG_PARPORT_PC_FIFO is not set
@@ -507,7 +528,9 @@ CONFIG_MISC_DEVICES=y
507# 528#
508# CONFIG_EEPROM_AT24 is not set 529# CONFIG_EEPROM_AT24 is not set
509# CONFIG_EEPROM_LEGACY is not set 530# CONFIG_EEPROM_LEGACY is not set
531# CONFIG_EEPROM_MAX6875 is not set
510# CONFIG_EEPROM_93CX6 is not set 532# CONFIG_EEPROM_93CX6 is not set
533# CONFIG_CB710_CORE is not set
511CONFIG_HAVE_IDE=y 534CONFIG_HAVE_IDE=y
512CONFIG_IDE=y 535CONFIG_IDE=y
513 536
@@ -581,10 +604,6 @@ CONFIG_BLK_DEV_SR=m
581# CONFIG_BLK_DEV_SR_VENDOR is not set 604# CONFIG_BLK_DEV_SR_VENDOR is not set
582CONFIG_CHR_DEV_SG=m 605CONFIG_CHR_DEV_SG=m
583# CONFIG_CHR_DEV_SCH is not set 606# CONFIG_CHR_DEV_SCH is not set
584
585#
586# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
587#
588CONFIG_SCSI_MULTI_LUN=y 607CONFIG_SCSI_MULTI_LUN=y
589CONFIG_SCSI_CONSTANTS=y 608CONFIG_SCSI_CONSTANTS=y
590# CONFIG_SCSI_LOGGING is not set 609# CONFIG_SCSI_LOGGING is not set
@@ -602,6 +621,7 @@ CONFIG_SCSI_WAIT_SCAN=m
602CONFIG_SCSI_LOWLEVEL=y 621CONFIG_SCSI_LOWLEVEL=y
603# CONFIG_ISCSI_TCP is not set 622# CONFIG_ISCSI_TCP is not set
604# CONFIG_SCSI_CXGB3_ISCSI is not set 623# CONFIG_SCSI_CXGB3_ISCSI is not set
624# CONFIG_SCSI_BNX2_ISCSI is not set
605# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 625# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
606# CONFIG_SCSI_3W_9XXX is not set 626# CONFIG_SCSI_3W_9XXX is not set
607# CONFIG_SCSI_ACARD is not set 627# CONFIG_SCSI_ACARD is not set
@@ -610,6 +630,7 @@ CONFIG_SCSI_LOWLEVEL=y
610# CONFIG_SCSI_AIC7XXX_OLD is not set 630# CONFIG_SCSI_AIC7XXX_OLD is not set
611# CONFIG_SCSI_AIC79XX is not set 631# CONFIG_SCSI_AIC79XX is not set
612# CONFIG_SCSI_AIC94XX is not set 632# CONFIG_SCSI_AIC94XX is not set
633# CONFIG_SCSI_MVSAS is not set
613# CONFIG_SCSI_DPT_I2O is not set 634# CONFIG_SCSI_DPT_I2O is not set
614# CONFIG_SCSI_ADVANSYS is not set 635# CONFIG_SCSI_ADVANSYS is not set
615# CONFIG_SCSI_ARCMSR is not set 636# CONFIG_SCSI_ARCMSR is not set
@@ -631,7 +652,6 @@ CONFIG_SCSI_LOWLEVEL=y
631# CONFIG_SCSI_INIA100 is not set 652# CONFIG_SCSI_INIA100 is not set
632# CONFIG_SCSI_PPA is not set 653# CONFIG_SCSI_PPA is not set
633# CONFIG_SCSI_IMM is not set 654# CONFIG_SCSI_IMM is not set
634# CONFIG_SCSI_MVSAS is not set
635# CONFIG_SCSI_STEX is not set 655# CONFIG_SCSI_STEX is not set
636# CONFIG_SCSI_SYM53C8XX_2 is not set 656# CONFIG_SCSI_SYM53C8XX_2 is not set
637# CONFIG_SCSI_QLOGIC_1280 is not set 657# CONFIG_SCSI_QLOGIC_1280 is not set
@@ -654,14 +674,17 @@ CONFIG_SCSI_LOWLEVEL=y
654# 674#
655 675
656# 676#
657# Enable only one of the two stacks, unless you know what you are doing 677# You can enable one or both FireWire driver stacks.
678#
679
680#
681# See the help texts for more information.
658# 682#
659# CONFIG_FIREWIRE is not set 683# CONFIG_FIREWIRE is not set
660# CONFIG_IEEE1394 is not set 684# CONFIG_IEEE1394 is not set
661# CONFIG_I2O is not set 685# CONFIG_I2O is not set
662# CONFIG_MACINTOSH_DRIVERS is not set 686# CONFIG_MACINTOSH_DRIVERS is not set
663CONFIG_NETDEVICES=y 687CONFIG_NETDEVICES=y
664CONFIG_COMPAT_NET_DEV_OPS=y
665# CONFIG_DUMMY is not set 688# CONFIG_DUMMY is not set
666# CONFIG_BONDING is not set 689# CONFIG_BONDING is not set
667# CONFIG_MACVLAN is not set 690# CONFIG_MACVLAN is not set
@@ -708,6 +731,7 @@ CONFIG_NET_ETHERNET=y
708# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 731# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
709# CONFIG_NET_PCI is not set 732# CONFIG_NET_PCI is not set
710# CONFIG_B44 is not set 733# CONFIG_B44 is not set
734# CONFIG_KS8842 is not set
711# CONFIG_NET_POCKET is not set 735# CONFIG_NET_POCKET is not set
712# CONFIG_ATL2 is not set 736# CONFIG_ATL2 is not set
713# CONFIG_FS_ENET is not set 737# CONFIG_FS_ENET is not set
@@ -729,8 +753,10 @@ CONFIG_NETDEV_1000=y
729# CONFIG_VIA_VELOCITY is not set 753# CONFIG_VIA_VELOCITY is not set
730# CONFIG_TIGON3 is not set 754# CONFIG_TIGON3 is not set
731# CONFIG_BNX2 is not set 755# CONFIG_BNX2 is not set
756# CONFIG_CNIC is not set
732CONFIG_FSL_PQ_MDIO=y 757CONFIG_FSL_PQ_MDIO=y
733CONFIG_GIANFAR=y 758CONFIG_GIANFAR=y
759# CONFIG_MV643XX_ETH is not set
734# CONFIG_QLA3XXX is not set 760# CONFIG_QLA3XXX is not set
735# CONFIG_ATL1 is not set 761# CONFIG_ATL1 is not set
736# CONFIG_ATL1E is not set 762# CONFIG_ATL1E is not set
@@ -802,12 +828,13 @@ CONFIG_INPUT_EVDEV=m
802# 828#
803CONFIG_INPUT_KEYBOARD=y 829CONFIG_INPUT_KEYBOARD=y
804CONFIG_KEYBOARD_ATKBD=y 830CONFIG_KEYBOARD_ATKBD=y
805# CONFIG_KEYBOARD_SUNKBD is not set
806# CONFIG_KEYBOARD_LKKBD is not set 831# CONFIG_KEYBOARD_LKKBD is not set
807# CONFIG_KEYBOARD_XTKBD is not set 832# CONFIG_KEYBOARD_GPIO is not set
833# CONFIG_KEYBOARD_MATRIX is not set
808# CONFIG_KEYBOARD_NEWTON is not set 834# CONFIG_KEYBOARD_NEWTON is not set
809# CONFIG_KEYBOARD_STOWAWAY is not set 835# CONFIG_KEYBOARD_STOWAWAY is not set
810# CONFIG_KEYBOARD_GPIO is not set 836# CONFIG_KEYBOARD_SUNKBD is not set
837# CONFIG_KEYBOARD_XTKBD is not set
811CONFIG_INPUT_MOUSE=y 838CONFIG_INPUT_MOUSE=y
812CONFIG_MOUSE_PS2=y 839CONFIG_MOUSE_PS2=y
813CONFIG_MOUSE_PS2_ALPS=y 840CONFIG_MOUSE_PS2_ALPS=y
@@ -821,6 +848,7 @@ CONFIG_MOUSE_PS2_TRACKPOINT=y
821# CONFIG_MOUSE_BCM5974 is not set 848# CONFIG_MOUSE_BCM5974 is not set
822# CONFIG_MOUSE_VSXXXAA is not set 849# CONFIG_MOUSE_VSXXXAA is not set
823# CONFIG_MOUSE_GPIO is not set 850# CONFIG_MOUSE_GPIO is not set
851# CONFIG_MOUSE_SYNAPTICS_I2C is not set
824# CONFIG_INPUT_JOYSTICK is not set 852# CONFIG_INPUT_JOYSTICK is not set
825# CONFIG_INPUT_TABLET is not set 853# CONFIG_INPUT_TABLET is not set
826# CONFIG_INPUT_TOUCHSCREEN is not set 854# CONFIG_INPUT_TOUCHSCREEN is not set
@@ -911,6 +939,7 @@ CONFIG_I2C_ALGOBIT=m
911# I2C system bus drivers (mostly embedded / system-on-chip) 939# I2C system bus drivers (mostly embedded / system-on-chip)
912# 940#
913# CONFIG_I2C_CPM is not set 941# CONFIG_I2C_CPM is not set
942# CONFIG_I2C_DESIGNWARE is not set
914# CONFIG_I2C_GPIO is not set 943# CONFIG_I2C_GPIO is not set
915# CONFIG_I2C_MPC is not set 944# CONFIG_I2C_MPC is not set
916# CONFIG_I2C_OCORES is not set 945# CONFIG_I2C_OCORES is not set
@@ -941,13 +970,17 @@ CONFIG_I2C_ALGOBIT=m
941# CONFIG_SENSORS_PCF8574 is not set 970# CONFIG_SENSORS_PCF8574 is not set
942# CONFIG_PCF8575 is not set 971# CONFIG_PCF8575 is not set
943# CONFIG_SENSORS_PCA9539 is not set 972# CONFIG_SENSORS_PCA9539 is not set
944# CONFIG_SENSORS_MAX6875 is not set
945# CONFIG_SENSORS_TSL2550 is not set 973# CONFIG_SENSORS_TSL2550 is not set
946# CONFIG_I2C_DEBUG_CORE is not set 974# CONFIG_I2C_DEBUG_CORE is not set
947# CONFIG_I2C_DEBUG_ALGO is not set 975# CONFIG_I2C_DEBUG_ALGO is not set
948# CONFIG_I2C_DEBUG_BUS is not set 976# CONFIG_I2C_DEBUG_BUS is not set
949# CONFIG_I2C_DEBUG_CHIP is not set 977# CONFIG_I2C_DEBUG_CHIP is not set
950# CONFIG_SPI is not set 978# CONFIG_SPI is not set
979
980#
981# PPS support
982#
983# CONFIG_PPS is not set
951CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 984CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
952CONFIG_ARCH_REQUIRE_GPIOLIB=y 985CONFIG_ARCH_REQUIRE_GPIOLIB=y
953CONFIG_GPIOLIB=y 986CONFIG_GPIOLIB=y
@@ -1027,6 +1060,7 @@ CONFIG_HWMON=y
1027# CONFIG_SENSORS_SMSC47B397 is not set 1060# CONFIG_SENSORS_SMSC47B397 is not set
1028# CONFIG_SENSORS_ADS7828 is not set 1061# CONFIG_SENSORS_ADS7828 is not set
1029# CONFIG_SENSORS_THMC50 is not set 1062# CONFIG_SENSORS_THMC50 is not set
1063# CONFIG_SENSORS_TMP401 is not set
1030# CONFIG_SENSORS_VIA686A is not set 1064# CONFIG_SENSORS_VIA686A is not set
1031# CONFIG_SENSORS_VT1211 is not set 1065# CONFIG_SENSORS_VT1211 is not set
1032# CONFIG_SENSORS_VT8231 is not set 1066# CONFIG_SENSORS_VT8231 is not set
@@ -1060,23 +1094,9 @@ CONFIG_SSB_POSSIBLE=y
1060# CONFIG_MFD_WM8400 is not set 1094# CONFIG_MFD_WM8400 is not set
1061# CONFIG_MFD_WM8350_I2C is not set 1095# CONFIG_MFD_WM8350_I2C is not set
1062# CONFIG_MFD_PCF50633 is not set 1096# CONFIG_MFD_PCF50633 is not set
1097# CONFIG_AB3100_CORE is not set
1063# CONFIG_REGULATOR is not set 1098# CONFIG_REGULATOR is not set
1064 1099# CONFIG_MEDIA_SUPPORT is not set
1065#
1066# Multimedia devices
1067#
1068
1069#
1070# Multimedia core support
1071#
1072# CONFIG_VIDEO_DEV is not set
1073# CONFIG_DVB_CORE is not set
1074# CONFIG_VIDEO_MEDIA is not set
1075
1076#
1077# Multimedia drivers
1078#
1079CONFIG_DAB=y
1080 1100
1081# 1101#
1082# Graphics support 1102# Graphics support
@@ -1143,6 +1163,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1143# CONFIG_DMADEVICES is not set 1163# CONFIG_DMADEVICES is not set
1144# CONFIG_AUXDISPLAY is not set 1164# CONFIG_AUXDISPLAY is not set
1145# CONFIG_UIO is not set 1165# CONFIG_UIO is not set
1166
1167#
1168# TI VLYNQ
1169#
1146# CONFIG_STAGING is not set 1170# CONFIG_STAGING is not set
1147 1171
1148# 1172#
@@ -1162,10 +1186,12 @@ CONFIG_FS_MBCACHE=y
1162# CONFIG_REISERFS_FS is not set 1186# CONFIG_REISERFS_FS is not set
1163# CONFIG_JFS_FS is not set 1187# CONFIG_JFS_FS is not set
1164# CONFIG_FS_POSIX_ACL is not set 1188# CONFIG_FS_POSIX_ACL is not set
1165CONFIG_FILE_LOCKING=y
1166# CONFIG_XFS_FS is not set 1189# CONFIG_XFS_FS is not set
1190# CONFIG_GFS2_FS is not set
1167# CONFIG_OCFS2_FS is not set 1191# CONFIG_OCFS2_FS is not set
1168# CONFIG_BTRFS_FS is not set 1192# CONFIG_BTRFS_FS is not set
1193CONFIG_FILE_LOCKING=y
1194CONFIG_FSNOTIFY=y
1169CONFIG_DNOTIFY=y 1195CONFIG_DNOTIFY=y
1170CONFIG_INOTIFY=y 1196CONFIG_INOTIFY=y
1171CONFIG_INOTIFY_USER=y 1197CONFIG_INOTIFY_USER=y
@@ -1316,6 +1342,7 @@ CONFIG_HAS_IOPORT=y
1316CONFIG_HAS_DMA=y 1342CONFIG_HAS_DMA=y
1317CONFIG_HAVE_LMB=y 1343CONFIG_HAVE_LMB=y
1318CONFIG_NLATTR=y 1344CONFIG_NLATTR=y
1345CONFIG_GENERIC_ATOMIC64=y
1319 1346
1320# 1347#
1321# Kernel hacking 1348# Kernel hacking
@@ -1346,6 +1373,9 @@ CONFIG_SCHED_DEBUG=y
1346# CONFIG_RT_MUTEX_TESTER is not set 1373# CONFIG_RT_MUTEX_TESTER is not set
1347# CONFIG_DEBUG_SPINLOCK is not set 1374# CONFIG_DEBUG_SPINLOCK is not set
1348# CONFIG_DEBUG_MUTEXES is not set 1375# CONFIG_DEBUG_MUTEXES is not set
1376# CONFIG_DEBUG_LOCK_ALLOC is not set
1377# CONFIG_PROVE_LOCKING is not set
1378# CONFIG_LOCK_STAT is not set
1349# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1379# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1350# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1380# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1351# CONFIG_DEBUG_KOBJECT is not set 1381# CONFIG_DEBUG_KOBJECT is not set
@@ -1358,7 +1388,6 @@ CONFIG_SCHED_DEBUG=y
1358# CONFIG_DEBUG_LIST is not set 1388# CONFIG_DEBUG_LIST is not set
1359# CONFIG_DEBUG_SG is not set 1389# CONFIG_DEBUG_SG is not set
1360# CONFIG_DEBUG_NOTIFIERS is not set 1390# CONFIG_DEBUG_NOTIFIERS is not set
1361# CONFIG_BOOT_PRINTK_DELAY is not set
1362# CONFIG_RCU_TORTURE_TEST is not set 1391# CONFIG_RCU_TORTURE_TEST is not set
1363# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1392# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1364# CONFIG_BACKTRACE_SELF_TEST is not set 1393# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1372,16 +1401,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1372CONFIG_HAVE_DYNAMIC_FTRACE=y 1401CONFIG_HAVE_DYNAMIC_FTRACE=y
1373CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1402CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1374CONFIG_TRACING_SUPPORT=y 1403CONFIG_TRACING_SUPPORT=y
1375 1404CONFIG_FTRACE=y
1376#
1377# Tracers
1378#
1379# CONFIG_FUNCTION_TRACER is not set 1405# CONFIG_FUNCTION_TRACER is not set
1406# CONFIG_IRQSOFF_TRACER is not set
1380# CONFIG_SCHED_TRACER is not set 1407# CONFIG_SCHED_TRACER is not set
1381# CONFIG_CONTEXT_SWITCH_TRACER is not set 1408# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1382# CONFIG_EVENT_TRACER is not set
1383# CONFIG_BOOT_TRACER is not set 1409# CONFIG_BOOT_TRACER is not set
1384# CONFIG_TRACE_BRANCH_PROFILING is not set 1410CONFIG_BRANCH_PROFILE_NONE=y
1411# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1412# CONFIG_PROFILE_ALL_BRANCHES is not set
1385# CONFIG_STACK_TRACER is not set 1413# CONFIG_STACK_TRACER is not set
1386# CONFIG_KMEMTRACE is not set 1414# CONFIG_KMEMTRACE is not set
1387# CONFIG_WORKQUEUE_TRACER is not set 1415# CONFIG_WORKQUEUE_TRACER is not set
@@ -1389,6 +1417,9 @@ CONFIG_TRACING_SUPPORT=y
1389# CONFIG_SAMPLES is not set 1417# CONFIG_SAMPLES is not set
1390CONFIG_HAVE_ARCH_KGDB=y 1418CONFIG_HAVE_ARCH_KGDB=y
1391# CONFIG_KGDB is not set 1419# CONFIG_KGDB is not set
1420# CONFIG_KMEMCHECK is not set
1421# CONFIG_PPC_DISABLE_WERROR is not set
1422CONFIG_PPC_WERROR=y
1392CONFIG_PRINT_STACK_DEPTH=64 1423CONFIG_PRINT_STACK_DEPTH=64
1393# CONFIG_DEBUG_STACKOVERFLOW is not set 1424# CONFIG_DEBUG_STACKOVERFLOW is not set
1394# CONFIG_DEBUG_STACK_USAGE is not set 1425# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/85xx/tqm8540_defconfig b/arch/powerpc/configs/85xx/tqm8540_defconfig
index 767600145fb..2c407523aad 100644
--- a/arch/powerpc/configs/85xx/tqm8540_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8540_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:23 2009 4# Wed Jul 29 23:32:21 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12CONFIG_PPC_85xx=y 12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -34,15 +34,16 @@ CONFIG_GENERIC_TIME=y
34CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
35CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
36CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
38CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
39CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
40CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
41CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
42CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
43CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
44CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
45CONFIG_GENERIC_CALIBRATE_DELAY=y
46CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
48CONFIG_PPC=y 49CONFIG_PPC=y
@@ -56,11 +57,13 @@ CONFIG_PPC_UDBG_16550=y
56# CONFIG_GENERIC_TBSYNC is not set 57# CONFIG_GENERIC_TBSYNC is not set
57CONFIG_AUDIT_ARCH=y 58CONFIG_AUDIT_ARCH=y
58CONFIG_GENERIC_BUG=y 59CONFIG_GENERIC_BUG=y
60CONFIG_DTC=y
59CONFIG_DEFAULT_UIMAGE=y 61CONFIG_DEFAULT_UIMAGE=y
60# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
61# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
62CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
63CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
64 67
65# 68#
66# General setup 69# General setup
@@ -109,7 +112,6 @@ CONFIG_ANON_INODES=y
109CONFIG_EMBEDDED=y 112CONFIG_EMBEDDED=y
110CONFIG_SYSCTL_SYSCALL=y 113CONFIG_SYSCTL_SYSCALL=y
111# CONFIG_KALLSYMS is not set 114# CONFIG_KALLSYMS is not set
112# CONFIG_STRIP_ASM_SYMS is not set
113# CONFIG_HOTPLUG is not set 115# CONFIG_HOTPLUG is not set
114CONFIG_PRINTK=y 116CONFIG_PRINTK=y
115CONFIG_BUG=y 117CONFIG_BUG=y
@@ -122,9 +124,16 @@ CONFIG_TIMERFD=y
122CONFIG_EVENTFD=y 124CONFIG_EVENTFD=y
123CONFIG_SHMEM=y 125CONFIG_SHMEM=y
124CONFIG_AIO=y 126CONFIG_AIO=y
127CONFIG_HAVE_PERF_COUNTERS=y
128
129#
130# Performance Counters
131#
132# CONFIG_PERF_COUNTERS is not set
125CONFIG_VM_EVENT_COUNTERS=y 133CONFIG_VM_EVENT_COUNTERS=y
126CONFIG_PCI_QUIRKS=y 134CONFIG_PCI_QUIRKS=y
127CONFIG_SLUB_DEBUG=y 135CONFIG_SLUB_DEBUG=y
136# CONFIG_STRIP_ASM_SYMS is not set
128CONFIG_COMPAT_BRK=y 137CONFIG_COMPAT_BRK=y
129# CONFIG_SLAB is not set 138# CONFIG_SLAB is not set
130CONFIG_SLUB=y 139CONFIG_SLUB=y
@@ -137,6 +146,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
137CONFIG_HAVE_KPROBES=y 146CONFIG_HAVE_KPROBES=y
138CONFIG_HAVE_KRETPROBES=y 147CONFIG_HAVE_KRETPROBES=y
139CONFIG_HAVE_ARCH_TRACEHOOK=y 148CONFIG_HAVE_ARCH_TRACEHOOK=y
149
150#
151# GCOV-based kernel profiling
152#
140# CONFIG_SLOW_WORK is not set 153# CONFIG_SLOW_WORK is not set
141# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 154# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
142CONFIG_SLABINFO=y 155CONFIG_SLABINFO=y
@@ -144,7 +157,7 @@ CONFIG_RT_MUTEXES=y
144CONFIG_BASE_SMALL=0 157CONFIG_BASE_SMALL=0
145# CONFIG_MODULES is not set 158# CONFIG_MODULES is not set
146CONFIG_BLOCK=y 159CONFIG_BLOCK=y
147# CONFIG_LBD is not set 160CONFIG_LBDAF=y
148# CONFIG_BLK_DEV_BSG is not set 161# CONFIG_BLK_DEV_BSG is not set
149# CONFIG_BLK_DEV_INTEGRITY is not set 162# CONFIG_BLK_DEV_INTEGRITY is not set
150 163
@@ -177,6 +190,7 @@ CONFIG_MPC85xx=y
177# CONFIG_MPC85xx_DS is not set 190# CONFIG_MPC85xx_DS is not set
178# CONFIG_SOCRATES is not set 191# CONFIG_SOCRATES is not set
179# CONFIG_KSI8560 is not set 192# CONFIG_KSI8560 is not set
193# CONFIG_XES_MPC85xx is not set
180# CONFIG_STX_GP3 is not set 194# CONFIG_STX_GP3 is not set
181CONFIG_TQM8540=y 195CONFIG_TQM8540=y
182# CONFIG_TQM8541 is not set 196# CONFIG_TQM8541 is not set
@@ -225,6 +239,7 @@ CONFIG_BINFMT_ELF=y
225# CONFIG_BINFMT_MISC is not set 239# CONFIG_BINFMT_MISC is not set
226CONFIG_MATH_EMULATION=y 240CONFIG_MATH_EMULATION=y
227# CONFIG_IOMMU_HELPER is not set 241# CONFIG_IOMMU_HELPER is not set
242# CONFIG_SWIOTLB is not set
228CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 243CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
229CONFIG_ARCH_HAS_WALK_MEMORY=y 244CONFIG_ARCH_HAS_WALK_MEMORY=y
230CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 245CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -243,9 +258,9 @@ CONFIG_MIGRATION=y
243CONFIG_ZONE_DMA_FLAG=1 258CONFIG_ZONE_DMA_FLAG=1
244CONFIG_BOUNCE=y 259CONFIG_BOUNCE=y
245CONFIG_VIRT_TO_BUS=y 260CONFIG_VIRT_TO_BUS=y
246CONFIG_UNEVICTABLE_LRU=y
247CONFIG_HAVE_MLOCK=y 261CONFIG_HAVE_MLOCK=y
248CONFIG_HAVE_MLOCKED_PAGE_BIT=y 262CONFIG_HAVE_MLOCKED_PAGE_BIT=y
263CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
249CONFIG_PPC_4K_PAGES=y 264CONFIG_PPC_4K_PAGES=y
250# CONFIG_PPC_16K_PAGES is not set 265# CONFIG_PPC_16K_PAGES is not set
251# CONFIG_PPC_64K_PAGES is not set 266# CONFIG_PPC_64K_PAGES is not set
@@ -353,6 +368,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
353# CONFIG_ECONET is not set 368# CONFIG_ECONET is not set
354# CONFIG_WAN_ROUTER is not set 369# CONFIG_WAN_ROUTER is not set
355# CONFIG_PHONET is not set 370# CONFIG_PHONET is not set
371# CONFIG_IEEE802154 is not set
356# CONFIG_NET_SCHED is not set 372# CONFIG_NET_SCHED is not set
357# CONFIG_DCB is not set 373# CONFIG_DCB is not set
358 374
@@ -370,7 +386,11 @@ CONFIG_WIRELESS=y
370CONFIG_WIRELESS_OLD_REGULATORY=y 386CONFIG_WIRELESS_OLD_REGULATORY=y
371# CONFIG_WIRELESS_EXT is not set 387# CONFIG_WIRELESS_EXT is not set
372# CONFIG_LIB80211 is not set 388# CONFIG_LIB80211 is not set
373# CONFIG_MAC80211 is not set 389
390#
391# CFG80211 needs to be enabled for MAC80211
392#
393CONFIG_MAC80211_DEFAULT_PS_VALUE=0
374# CONFIG_WIMAX is not set 394# CONFIG_WIMAX is not set
375# CONFIG_RFKILL is not set 395# CONFIG_RFKILL is not set
376# CONFIG_NET_9P is not set 396# CONFIG_NET_9P is not set
@@ -471,6 +491,7 @@ CONFIG_MTD_CFI_UTIL=y
471# CONFIG_MTD_UBI is not set 491# CONFIG_MTD_UBI is not set
472CONFIG_OF_DEVICE=y 492CONFIG_OF_DEVICE=y
473CONFIG_OF_I2C=y 493CONFIG_OF_I2C=y
494CONFIG_OF_MDIO=y
474# CONFIG_PARPORT is not set 495# CONFIG_PARPORT is not set
475CONFIG_BLK_DEV=y 496CONFIG_BLK_DEV=y
476# CONFIG_BLK_DEV_FD is not set 497# CONFIG_BLK_DEV_FD is not set
@@ -505,7 +526,9 @@ CONFIG_MISC_DEVICES=y
505# 526#
506# CONFIG_EEPROM_AT24 is not set 527# CONFIG_EEPROM_AT24 is not set
507# CONFIG_EEPROM_LEGACY is not set 528# CONFIG_EEPROM_LEGACY is not set
529# CONFIG_EEPROM_MAX6875 is not set
508# CONFIG_EEPROM_93CX6 is not set 530# CONFIG_EEPROM_93CX6 is not set
531# CONFIG_CB710_CORE is not set
509CONFIG_HAVE_IDE=y 532CONFIG_HAVE_IDE=y
510CONFIG_IDE=y 533CONFIG_IDE=y
511 534
@@ -580,14 +603,17 @@ CONFIG_BLK_DEV_IDEDMA=y
580# 603#
581 604
582# 605#
583# Enable only one of the two stacks, unless you know what you are doing 606# You can enable one or both FireWire driver stacks.
607#
608
609#
610# See the help texts for more information.
584# 611#
585# CONFIG_FIREWIRE is not set 612# CONFIG_FIREWIRE is not set
586# CONFIG_IEEE1394 is not set 613# CONFIG_IEEE1394 is not set
587# CONFIG_I2O is not set 614# CONFIG_I2O is not set
588# CONFIG_MACINTOSH_DRIVERS is not set 615# CONFIG_MACINTOSH_DRIVERS is not set
589CONFIG_NETDEVICES=y 616CONFIG_NETDEVICES=y
590CONFIG_COMPAT_NET_DEV_OPS=y
591# CONFIG_DUMMY is not set 617# CONFIG_DUMMY is not set
592# CONFIG_BONDING is not set 618# CONFIG_BONDING is not set
593# CONFIG_MACVLAN is not set 619# CONFIG_MACVLAN is not set
@@ -650,6 +676,7 @@ CONFIG_E100=y
650# CONFIG_SMSC9420 is not set 676# CONFIG_SMSC9420 is not set
651# CONFIG_SUNDANCE is not set 677# CONFIG_SUNDANCE is not set
652# CONFIG_TLAN is not set 678# CONFIG_TLAN is not set
679# CONFIG_KS8842 is not set
653# CONFIG_VIA_RHINE is not set 680# CONFIG_VIA_RHINE is not set
654# CONFIG_SC92031 is not set 681# CONFIG_SC92031 is not set
655# CONFIG_ATL2 is not set 682# CONFIG_ATL2 is not set
@@ -671,8 +698,10 @@ CONFIG_NETDEV_1000=y
671# CONFIG_VIA_VELOCITY is not set 698# CONFIG_VIA_VELOCITY is not set
672# CONFIG_TIGON3 is not set 699# CONFIG_TIGON3 is not set
673# CONFIG_BNX2 is not set 700# CONFIG_BNX2 is not set
701# CONFIG_CNIC is not set
674CONFIG_FSL_PQ_MDIO=y 702CONFIG_FSL_PQ_MDIO=y
675CONFIG_GIANFAR=y 703CONFIG_GIANFAR=y
704# CONFIG_MV643XX_ETH is not set
676# CONFIG_QLA3XXX is not set 705# CONFIG_QLA3XXX is not set
677# CONFIG_ATL1 is not set 706# CONFIG_ATL1 is not set
678# CONFIG_ATL1E is not set 707# CONFIG_ATL1E is not set
@@ -850,13 +879,17 @@ CONFIG_I2C_MPC=y
850# CONFIG_SENSORS_PCF8574 is not set 879# CONFIG_SENSORS_PCF8574 is not set
851# CONFIG_PCF8575 is not set 880# CONFIG_PCF8575 is not set
852# CONFIG_SENSORS_PCA9539 is not set 881# CONFIG_SENSORS_PCA9539 is not set
853# CONFIG_SENSORS_MAX6875 is not set
854# CONFIG_SENSORS_TSL2550 is not set 882# CONFIG_SENSORS_TSL2550 is not set
855# CONFIG_I2C_DEBUG_CORE is not set 883# CONFIG_I2C_DEBUG_CORE is not set
856# CONFIG_I2C_DEBUG_ALGO is not set 884# CONFIG_I2C_DEBUG_ALGO is not set
857# CONFIG_I2C_DEBUG_BUS is not set 885# CONFIG_I2C_DEBUG_BUS is not set
858# CONFIG_I2C_DEBUG_CHIP is not set 886# CONFIG_I2C_DEBUG_CHIP is not set
859# CONFIG_SPI is not set 887# CONFIG_SPI is not set
888
889#
890# PPS support
891#
892# CONFIG_PPS is not set
860CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 893CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
861# CONFIG_GPIOLIB is not set 894# CONFIG_GPIOLIB is not set
862# CONFIG_W1 is not set 895# CONFIG_W1 is not set
@@ -911,6 +944,7 @@ CONFIG_SENSORS_LM75=y
911# CONFIG_SENSORS_SMSC47B397 is not set 944# CONFIG_SENSORS_SMSC47B397 is not set
912# CONFIG_SENSORS_ADS7828 is not set 945# CONFIG_SENSORS_ADS7828 is not set
913# CONFIG_SENSORS_THMC50 is not set 946# CONFIG_SENSORS_THMC50 is not set
947# CONFIG_SENSORS_TMP401 is not set
914# CONFIG_SENSORS_VIA686A is not set 948# CONFIG_SENSORS_VIA686A is not set
915# CONFIG_SENSORS_VT1211 is not set 949# CONFIG_SENSORS_VT1211 is not set
916# CONFIG_SENSORS_VT8231 is not set 950# CONFIG_SENSORS_VT8231 is not set
@@ -945,23 +979,9 @@ CONFIG_SSB_POSSIBLE=y
945# CONFIG_MFD_WM8400 is not set 979# CONFIG_MFD_WM8400 is not set
946# CONFIG_MFD_WM8350_I2C is not set 980# CONFIG_MFD_WM8350_I2C is not set
947# CONFIG_MFD_PCF50633 is not set 981# CONFIG_MFD_PCF50633 is not set
982# CONFIG_AB3100_CORE is not set
948# CONFIG_REGULATOR is not set 983# CONFIG_REGULATOR is not set
949 984# CONFIG_MEDIA_SUPPORT is not set
950#
951# Multimedia devices
952#
953
954#
955# Multimedia core support
956#
957# CONFIG_VIDEO_DEV is not set
958# CONFIG_DVB_CORE is not set
959# CONFIG_VIDEO_MEDIA is not set
960
961#
962# Multimedia drivers
963#
964CONFIG_DAB=y
965 985
966# 986#
967# Graphics support 987# Graphics support
@@ -1018,6 +1038,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1018# CONFIG_DMADEVICES is not set 1038# CONFIG_DMADEVICES is not set
1019# CONFIG_AUXDISPLAY is not set 1039# CONFIG_AUXDISPLAY is not set
1020# CONFIG_UIO is not set 1040# CONFIG_UIO is not set
1041
1042#
1043# TI VLYNQ
1044#
1021# CONFIG_STAGING is not set 1045# CONFIG_STAGING is not set
1022 1046
1023# 1047#
@@ -1037,10 +1061,12 @@ CONFIG_FS_MBCACHE=y
1037# CONFIG_REISERFS_FS is not set 1061# CONFIG_REISERFS_FS is not set
1038# CONFIG_JFS_FS is not set 1062# CONFIG_JFS_FS is not set
1039# CONFIG_FS_POSIX_ACL is not set 1063# CONFIG_FS_POSIX_ACL is not set
1040CONFIG_FILE_LOCKING=y
1041# CONFIG_XFS_FS is not set 1064# CONFIG_XFS_FS is not set
1065# CONFIG_GFS2_FS is not set
1042# CONFIG_OCFS2_FS is not set 1066# CONFIG_OCFS2_FS is not set
1043# CONFIG_BTRFS_FS is not set 1067# CONFIG_BTRFS_FS is not set
1068CONFIG_FILE_LOCKING=y
1069CONFIG_FSNOTIFY=y
1044CONFIG_DNOTIFY=y 1070CONFIG_DNOTIFY=y
1045CONFIG_INOTIFY=y 1071CONFIG_INOTIFY=y
1046CONFIG_INOTIFY_USER=y 1072CONFIG_INOTIFY_USER=y
@@ -1167,6 +1193,7 @@ CONFIG_HAS_IOPORT=y
1167CONFIG_HAS_DMA=y 1193CONFIG_HAS_DMA=y
1168CONFIG_HAVE_LMB=y 1194CONFIG_HAVE_LMB=y
1169CONFIG_NLATTR=y 1195CONFIG_NLATTR=y
1196CONFIG_GENERIC_ATOMIC64=y
1170 1197
1171# 1198#
1172# Kernel hacking 1199# Kernel hacking
@@ -1192,22 +1219,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1192CONFIG_HAVE_DYNAMIC_FTRACE=y 1219CONFIG_HAVE_DYNAMIC_FTRACE=y
1193CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1220CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1194CONFIG_TRACING_SUPPORT=y 1221CONFIG_TRACING_SUPPORT=y
1195 1222# CONFIG_FTRACE is not set
1196#
1197# Tracers
1198#
1199# CONFIG_FUNCTION_TRACER is not set
1200# CONFIG_SCHED_TRACER is not set
1201# CONFIG_CONTEXT_SWITCH_TRACER is not set
1202# CONFIG_EVENT_TRACER is not set
1203# CONFIG_BOOT_TRACER is not set
1204# CONFIG_TRACE_BRANCH_PROFILING is not set
1205# CONFIG_STACK_TRACER is not set
1206# CONFIG_KMEMTRACE is not set
1207# CONFIG_WORKQUEUE_TRACER is not set
1208# CONFIG_BLK_DEV_IO_TRACE is not set
1209# CONFIG_SAMPLES is not set 1223# CONFIG_SAMPLES is not set
1210CONFIG_HAVE_ARCH_KGDB=y 1224CONFIG_HAVE_ARCH_KGDB=y
1225# CONFIG_PPC_DISABLE_WERROR is not set
1226CONFIG_PPC_WERROR=y
1211CONFIG_PRINT_STACK_DEPTH=64 1227CONFIG_PRINT_STACK_DEPTH=64
1212# CONFIG_IRQSTACKS is not set 1228# CONFIG_IRQSTACKS is not set
1213# CONFIG_PPC_EARLY_DEBUG is not set 1229# CONFIG_PPC_EARLY_DEBUG is not set
diff --git a/arch/powerpc/configs/85xx/tqm8541_defconfig b/arch/powerpc/configs/85xx/tqm8541_defconfig
index 52fafc006dd..845731dc51c 100644
--- a/arch/powerpc/configs/85xx/tqm8541_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8541_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:23 2009 4# Wed Jul 29 23:32:22 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12CONFIG_PPC_85xx=y 12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -34,15 +34,16 @@ CONFIG_GENERIC_TIME=y
34CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
35CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
36CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
38CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
39CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
40CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
41CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
42CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
43CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
44CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
45CONFIG_GENERIC_CALIBRATE_DELAY=y
46CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
47CONFIG_GENERIC_GPIO=y 48CONFIG_GENERIC_GPIO=y
48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 49# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -57,11 +58,13 @@ CONFIG_PPC_UDBG_16550=y
57# CONFIG_GENERIC_TBSYNC is not set 58# CONFIG_GENERIC_TBSYNC is not set
58CONFIG_AUDIT_ARCH=y 59CONFIG_AUDIT_ARCH=y
59CONFIG_GENERIC_BUG=y 60CONFIG_GENERIC_BUG=y
61CONFIG_DTC=y
60CONFIG_DEFAULT_UIMAGE=y 62CONFIG_DEFAULT_UIMAGE=y
61# CONFIG_PPC_DCR_NATIVE is not set 63# CONFIG_PPC_DCR_NATIVE is not set
62# CONFIG_PPC_DCR_MMIO is not set 64# CONFIG_PPC_DCR_MMIO is not set
63CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 65CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
64CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 66CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
67CONFIG_CONSTRUCTORS=y
65 68
66# 69#
67# General setup 70# General setup
@@ -110,7 +113,6 @@ CONFIG_ANON_INODES=y
110CONFIG_EMBEDDED=y 113CONFIG_EMBEDDED=y
111CONFIG_SYSCTL_SYSCALL=y 114CONFIG_SYSCTL_SYSCALL=y
112# CONFIG_KALLSYMS is not set 115# CONFIG_KALLSYMS is not set
113# CONFIG_STRIP_ASM_SYMS is not set
114# CONFIG_HOTPLUG is not set 116# CONFIG_HOTPLUG is not set
115CONFIG_PRINTK=y 117CONFIG_PRINTK=y
116CONFIG_BUG=y 118CONFIG_BUG=y
@@ -123,9 +125,16 @@ CONFIG_TIMERFD=y
123CONFIG_EVENTFD=y 125CONFIG_EVENTFD=y
124CONFIG_SHMEM=y 126CONFIG_SHMEM=y
125CONFIG_AIO=y 127CONFIG_AIO=y
128CONFIG_HAVE_PERF_COUNTERS=y
129
130#
131# Performance Counters
132#
133# CONFIG_PERF_COUNTERS is not set
126CONFIG_VM_EVENT_COUNTERS=y 134CONFIG_VM_EVENT_COUNTERS=y
127CONFIG_PCI_QUIRKS=y 135CONFIG_PCI_QUIRKS=y
128CONFIG_SLUB_DEBUG=y 136CONFIG_SLUB_DEBUG=y
137# CONFIG_STRIP_ASM_SYMS is not set
129CONFIG_COMPAT_BRK=y 138CONFIG_COMPAT_BRK=y
130# CONFIG_SLAB is not set 139# CONFIG_SLAB is not set
131CONFIG_SLUB=y 140CONFIG_SLUB=y
@@ -139,6 +148,10 @@ CONFIG_HAVE_KPROBES=y
139CONFIG_HAVE_KRETPROBES=y 148CONFIG_HAVE_KRETPROBES=y
140CONFIG_HAVE_ARCH_TRACEHOOK=y 149CONFIG_HAVE_ARCH_TRACEHOOK=y
141CONFIG_HAVE_CLK=y 150CONFIG_HAVE_CLK=y
151
152#
153# GCOV-based kernel profiling
154#
142# CONFIG_SLOW_WORK is not set 155# CONFIG_SLOW_WORK is not set
143# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 156# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
144CONFIG_SLABINFO=y 157CONFIG_SLABINFO=y
@@ -146,7 +159,7 @@ CONFIG_RT_MUTEXES=y
146CONFIG_BASE_SMALL=0 159CONFIG_BASE_SMALL=0
147# CONFIG_MODULES is not set 160# CONFIG_MODULES is not set
148CONFIG_BLOCK=y 161CONFIG_BLOCK=y
149# CONFIG_LBD is not set 162CONFIG_LBDAF=y
150# CONFIG_BLK_DEV_BSG is not set 163# CONFIG_BLK_DEV_BSG is not set
151# CONFIG_BLK_DEV_INTEGRITY is not set 164# CONFIG_BLK_DEV_INTEGRITY is not set
152 165
@@ -179,6 +192,7 @@ CONFIG_MPC85xx=y
179# CONFIG_MPC85xx_DS is not set 192# CONFIG_MPC85xx_DS is not set
180# CONFIG_SOCRATES is not set 193# CONFIG_SOCRATES is not set
181# CONFIG_KSI8560 is not set 194# CONFIG_KSI8560 is not set
195# CONFIG_XES_MPC85xx is not set
182# CONFIG_STX_GP3 is not set 196# CONFIG_STX_GP3 is not set
183# CONFIG_TQM8540 is not set 197# CONFIG_TQM8540 is not set
184CONFIG_TQM8541=y 198CONFIG_TQM8541=y
@@ -228,6 +242,7 @@ CONFIG_BINFMT_ELF=y
228# CONFIG_BINFMT_MISC is not set 242# CONFIG_BINFMT_MISC is not set
229CONFIG_MATH_EMULATION=y 243CONFIG_MATH_EMULATION=y
230# CONFIG_IOMMU_HELPER is not set 244# CONFIG_IOMMU_HELPER is not set
245# CONFIG_SWIOTLB is not set
231CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 246CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
232CONFIG_ARCH_HAS_WALK_MEMORY=y 247CONFIG_ARCH_HAS_WALK_MEMORY=y
233CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 248CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -246,9 +261,9 @@ CONFIG_MIGRATION=y
246CONFIG_ZONE_DMA_FLAG=1 261CONFIG_ZONE_DMA_FLAG=1
247CONFIG_BOUNCE=y 262CONFIG_BOUNCE=y
248CONFIG_VIRT_TO_BUS=y 263CONFIG_VIRT_TO_BUS=y
249CONFIG_UNEVICTABLE_LRU=y
250CONFIG_HAVE_MLOCK=y 264CONFIG_HAVE_MLOCK=y
251CONFIG_HAVE_MLOCKED_PAGE_BIT=y 265CONFIG_HAVE_MLOCKED_PAGE_BIT=y
266CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
252CONFIG_PPC_4K_PAGES=y 267CONFIG_PPC_4K_PAGES=y
253# CONFIG_PPC_16K_PAGES is not set 268# CONFIG_PPC_16K_PAGES is not set
254# CONFIG_PPC_64K_PAGES is not set 269# CONFIG_PPC_64K_PAGES is not set
@@ -356,6 +371,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
356# CONFIG_ECONET is not set 371# CONFIG_ECONET is not set
357# CONFIG_WAN_ROUTER is not set 372# CONFIG_WAN_ROUTER is not set
358# CONFIG_PHONET is not set 373# CONFIG_PHONET is not set
374# CONFIG_IEEE802154 is not set
359# CONFIG_NET_SCHED is not set 375# CONFIG_NET_SCHED is not set
360# CONFIG_DCB is not set 376# CONFIG_DCB is not set
361 377
@@ -373,7 +389,11 @@ CONFIG_WIRELESS=y
373CONFIG_WIRELESS_OLD_REGULATORY=y 389CONFIG_WIRELESS_OLD_REGULATORY=y
374# CONFIG_WIRELESS_EXT is not set 390# CONFIG_WIRELESS_EXT is not set
375# CONFIG_LIB80211 is not set 391# CONFIG_LIB80211 is not set
376# CONFIG_MAC80211 is not set 392
393#
394# CFG80211 needs to be enabled for MAC80211
395#
396CONFIG_MAC80211_DEFAULT_PS_VALUE=0
377# CONFIG_WIMAX is not set 397# CONFIG_WIMAX is not set
378# CONFIG_RFKILL is not set 398# CONFIG_RFKILL is not set
379# CONFIG_NET_9P is not set 399# CONFIG_NET_9P is not set
@@ -475,6 +495,7 @@ CONFIG_MTD_CFI_UTIL=y
475CONFIG_OF_DEVICE=y 495CONFIG_OF_DEVICE=y
476CONFIG_OF_GPIO=y 496CONFIG_OF_GPIO=y
477CONFIG_OF_I2C=y 497CONFIG_OF_I2C=y
498CONFIG_OF_MDIO=y
478# CONFIG_PARPORT is not set 499# CONFIG_PARPORT is not set
479CONFIG_BLK_DEV=y 500CONFIG_BLK_DEV=y
480# CONFIG_BLK_DEV_FD is not set 501# CONFIG_BLK_DEV_FD is not set
@@ -509,7 +530,9 @@ CONFIG_MISC_DEVICES=y
509# 530#
510# CONFIG_EEPROM_AT24 is not set 531# CONFIG_EEPROM_AT24 is not set
511# CONFIG_EEPROM_LEGACY is not set 532# CONFIG_EEPROM_LEGACY is not set
533# CONFIG_EEPROM_MAX6875 is not set
512# CONFIG_EEPROM_93CX6 is not set 534# CONFIG_EEPROM_93CX6 is not set
535# CONFIG_CB710_CORE is not set
513CONFIG_HAVE_IDE=y 536CONFIG_HAVE_IDE=y
514CONFIG_IDE=y 537CONFIG_IDE=y
515 538
@@ -584,14 +607,17 @@ CONFIG_BLK_DEV_IDEDMA=y
584# 607#
585 608
586# 609#
587# Enable only one of the two stacks, unless you know what you are doing 610# You can enable one or both FireWire driver stacks.
611#
612
613#
614# See the help texts for more information.
588# 615#
589# CONFIG_FIREWIRE is not set 616# CONFIG_FIREWIRE is not set
590# CONFIG_IEEE1394 is not set 617# CONFIG_IEEE1394 is not set
591# CONFIG_I2O is not set 618# CONFIG_I2O is not set
592# CONFIG_MACINTOSH_DRIVERS is not set 619# CONFIG_MACINTOSH_DRIVERS is not set
593CONFIG_NETDEVICES=y 620CONFIG_NETDEVICES=y
594CONFIG_COMPAT_NET_DEV_OPS=y
595# CONFIG_DUMMY is not set 621# CONFIG_DUMMY is not set
596# CONFIG_BONDING is not set 622# CONFIG_BONDING is not set
597# CONFIG_MACVLAN is not set 623# CONFIG_MACVLAN is not set
@@ -654,6 +680,7 @@ CONFIG_E100=y
654# CONFIG_SMSC9420 is not set 680# CONFIG_SMSC9420 is not set
655# CONFIG_SUNDANCE is not set 681# CONFIG_SUNDANCE is not set
656# CONFIG_TLAN is not set 682# CONFIG_TLAN is not set
683# CONFIG_KS8842 is not set
657# CONFIG_VIA_RHINE is not set 684# CONFIG_VIA_RHINE is not set
658# CONFIG_SC92031 is not set 685# CONFIG_SC92031 is not set
659# CONFIG_ATL2 is not set 686# CONFIG_ATL2 is not set
@@ -676,8 +703,10 @@ CONFIG_NETDEV_1000=y
676# CONFIG_VIA_VELOCITY is not set 703# CONFIG_VIA_VELOCITY is not set
677# CONFIG_TIGON3 is not set 704# CONFIG_TIGON3 is not set
678# CONFIG_BNX2 is not set 705# CONFIG_BNX2 is not set
706# CONFIG_CNIC is not set
679CONFIG_FSL_PQ_MDIO=y 707CONFIG_FSL_PQ_MDIO=y
680CONFIG_GIANFAR=y 708CONFIG_GIANFAR=y
709# CONFIG_MV643XX_ETH is not set
681# CONFIG_QLA3XXX is not set 710# CONFIG_QLA3XXX is not set
682# CONFIG_ATL1 is not set 711# CONFIG_ATL1 is not set
683# CONFIG_ATL1E is not set 712# CONFIG_ATL1E is not set
@@ -831,6 +860,7 @@ CONFIG_I2C_HELPER_AUTO=y
831# I2C system bus drivers (mostly embedded / system-on-chip) 860# I2C system bus drivers (mostly embedded / system-on-chip)
832# 861#
833# CONFIG_I2C_CPM is not set 862# CONFIG_I2C_CPM is not set
863# CONFIG_I2C_DESIGNWARE is not set
834# CONFIG_I2C_GPIO is not set 864# CONFIG_I2C_GPIO is not set
835CONFIG_I2C_MPC=y 865CONFIG_I2C_MPC=y
836# CONFIG_I2C_OCORES is not set 866# CONFIG_I2C_OCORES is not set
@@ -859,13 +889,17 @@ CONFIG_I2C_MPC=y
859# CONFIG_SENSORS_PCF8574 is not set 889# CONFIG_SENSORS_PCF8574 is not set
860# CONFIG_PCF8575 is not set 890# CONFIG_PCF8575 is not set
861# CONFIG_SENSORS_PCA9539 is not set 891# CONFIG_SENSORS_PCA9539 is not set
862# CONFIG_SENSORS_MAX6875 is not set
863# CONFIG_SENSORS_TSL2550 is not set 892# CONFIG_SENSORS_TSL2550 is not set
864# CONFIG_I2C_DEBUG_CORE is not set 893# CONFIG_I2C_DEBUG_CORE is not set
865# CONFIG_I2C_DEBUG_ALGO is not set 894# CONFIG_I2C_DEBUG_ALGO is not set
866# CONFIG_I2C_DEBUG_BUS is not set 895# CONFIG_I2C_DEBUG_BUS is not set
867# CONFIG_I2C_DEBUG_CHIP is not set 896# CONFIG_I2C_DEBUG_CHIP is not set
868# CONFIG_SPI is not set 897# CONFIG_SPI is not set
898
899#
900# PPS support
901#
902# CONFIG_PPS is not set
869CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 903CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
870CONFIG_ARCH_REQUIRE_GPIOLIB=y 904CONFIG_ARCH_REQUIRE_GPIOLIB=y
871CONFIG_GPIOLIB=y 905CONFIG_GPIOLIB=y
@@ -944,6 +978,7 @@ CONFIG_SENSORS_LM75=y
944# CONFIG_SENSORS_SMSC47B397 is not set 978# CONFIG_SENSORS_SMSC47B397 is not set
945# CONFIG_SENSORS_ADS7828 is not set 979# CONFIG_SENSORS_ADS7828 is not set
946# CONFIG_SENSORS_THMC50 is not set 980# CONFIG_SENSORS_THMC50 is not set
981# CONFIG_SENSORS_TMP401 is not set
947# CONFIG_SENSORS_VIA686A is not set 982# CONFIG_SENSORS_VIA686A is not set
948# CONFIG_SENSORS_VT1211 is not set 983# CONFIG_SENSORS_VT1211 is not set
949# CONFIG_SENSORS_VT8231 is not set 984# CONFIG_SENSORS_VT8231 is not set
@@ -979,23 +1014,9 @@ CONFIG_SSB_POSSIBLE=y
979# CONFIG_MFD_WM8400 is not set 1014# CONFIG_MFD_WM8400 is not set
980# CONFIG_MFD_WM8350_I2C is not set 1015# CONFIG_MFD_WM8350_I2C is not set
981# CONFIG_MFD_PCF50633 is not set 1016# CONFIG_MFD_PCF50633 is not set
1017# CONFIG_AB3100_CORE is not set
982# CONFIG_REGULATOR is not set 1018# CONFIG_REGULATOR is not set
983 1019# CONFIG_MEDIA_SUPPORT is not set
984#
985# Multimedia devices
986#
987
988#
989# Multimedia core support
990#
991# CONFIG_VIDEO_DEV is not set
992# CONFIG_DVB_CORE is not set
993# CONFIG_VIDEO_MEDIA is not set
994
995#
996# Multimedia drivers
997#
998CONFIG_DAB=y
999 1020
1000# 1021#
1001# Graphics support 1022# Graphics support
@@ -1052,6 +1073,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1052# CONFIG_DMADEVICES is not set 1073# CONFIG_DMADEVICES is not set
1053# CONFIG_AUXDISPLAY is not set 1074# CONFIG_AUXDISPLAY is not set
1054# CONFIG_UIO is not set 1075# CONFIG_UIO is not set
1076
1077#
1078# TI VLYNQ
1079#
1055# CONFIG_STAGING is not set 1080# CONFIG_STAGING is not set
1056 1081
1057# 1082#
@@ -1071,10 +1096,12 @@ CONFIG_FS_MBCACHE=y
1071# CONFIG_REISERFS_FS is not set 1096# CONFIG_REISERFS_FS is not set
1072# CONFIG_JFS_FS is not set 1097# CONFIG_JFS_FS is not set
1073# CONFIG_FS_POSIX_ACL is not set 1098# CONFIG_FS_POSIX_ACL is not set
1074CONFIG_FILE_LOCKING=y
1075# CONFIG_XFS_FS is not set 1099# CONFIG_XFS_FS is not set
1100# CONFIG_GFS2_FS is not set
1076# CONFIG_OCFS2_FS is not set 1101# CONFIG_OCFS2_FS is not set
1077# CONFIG_BTRFS_FS is not set 1102# CONFIG_BTRFS_FS is not set
1103CONFIG_FILE_LOCKING=y
1104CONFIG_FSNOTIFY=y
1078CONFIG_DNOTIFY=y 1105CONFIG_DNOTIFY=y
1079CONFIG_INOTIFY=y 1106CONFIG_INOTIFY=y
1080CONFIG_INOTIFY_USER=y 1107CONFIG_INOTIFY_USER=y
@@ -1201,6 +1228,7 @@ CONFIG_HAS_IOPORT=y
1201CONFIG_HAS_DMA=y 1228CONFIG_HAS_DMA=y
1202CONFIG_HAVE_LMB=y 1229CONFIG_HAVE_LMB=y
1203CONFIG_NLATTR=y 1230CONFIG_NLATTR=y
1231CONFIG_GENERIC_ATOMIC64=y
1204 1232
1205# 1233#
1206# Kernel hacking 1234# Kernel hacking
@@ -1226,22 +1254,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1226CONFIG_HAVE_DYNAMIC_FTRACE=y 1254CONFIG_HAVE_DYNAMIC_FTRACE=y
1227CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1255CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1228CONFIG_TRACING_SUPPORT=y 1256CONFIG_TRACING_SUPPORT=y
1229 1257# CONFIG_FTRACE is not set
1230#
1231# Tracers
1232#
1233# CONFIG_FUNCTION_TRACER is not set
1234# CONFIG_SCHED_TRACER is not set
1235# CONFIG_CONTEXT_SWITCH_TRACER is not set
1236# CONFIG_EVENT_TRACER is not set
1237# CONFIG_BOOT_TRACER is not set
1238# CONFIG_TRACE_BRANCH_PROFILING is not set
1239# CONFIG_STACK_TRACER is not set
1240# CONFIG_KMEMTRACE is not set
1241# CONFIG_WORKQUEUE_TRACER is not set
1242# CONFIG_BLK_DEV_IO_TRACE is not set
1243# CONFIG_SAMPLES is not set 1258# CONFIG_SAMPLES is not set
1244CONFIG_HAVE_ARCH_KGDB=y 1259CONFIG_HAVE_ARCH_KGDB=y
1260# CONFIG_PPC_DISABLE_WERROR is not set
1261CONFIG_PPC_WERROR=y
1245CONFIG_PRINT_STACK_DEPTH=64 1262CONFIG_PRINT_STACK_DEPTH=64
1246# CONFIG_IRQSTACKS is not set 1263# CONFIG_IRQSTACKS is not set
1247# CONFIG_PPC_EARLY_DEBUG is not set 1264# CONFIG_PPC_EARLY_DEBUG is not set
diff --git a/arch/powerpc/configs/85xx/tqm8548_defconfig b/arch/powerpc/configs/85xx/tqm8548_defconfig
index 8b4faae7a9a..4f228a90527 100644
--- a/arch/powerpc/configs/85xx/tqm8548_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8548_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:24 2009 4# Wed Jul 29 23:32:23 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12CONFIG_PPC_85xx=y 12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -34,15 +34,16 @@ CONFIG_GENERIC_TIME=y
34CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
35CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
36CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
38CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
39CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
40CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
41CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
42CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
43CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
44CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
45CONFIG_GENERIC_CALIBRATE_DELAY=y
46CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
48CONFIG_PPC=y 49CONFIG_PPC=y
@@ -56,11 +57,13 @@ CONFIG_PPC_UDBG_16550=y
56# CONFIG_GENERIC_TBSYNC is not set 57# CONFIG_GENERIC_TBSYNC is not set
57CONFIG_AUDIT_ARCH=y 58CONFIG_AUDIT_ARCH=y
58CONFIG_GENERIC_BUG=y 59CONFIG_GENERIC_BUG=y
60CONFIG_DTC=y
59CONFIG_DEFAULT_UIMAGE=y 61CONFIG_DEFAULT_UIMAGE=y
60# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
61# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
62CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
63CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
64 67
65# 68#
66# General setup 69# General setup
@@ -111,7 +114,6 @@ CONFIG_SYSCTL_SYSCALL=y
111CONFIG_KALLSYMS=y 114CONFIG_KALLSYMS=y
112# CONFIG_KALLSYMS_ALL is not set 115# CONFIG_KALLSYMS_ALL is not set
113# CONFIG_KALLSYMS_EXTRA_PASS is not set 116# CONFIG_KALLSYMS_EXTRA_PASS is not set
114# CONFIG_STRIP_ASM_SYMS is not set
115CONFIG_HOTPLUG=y 117CONFIG_HOTPLUG=y
116CONFIG_PRINTK=y 118CONFIG_PRINTK=y
117CONFIG_BUG=y 119CONFIG_BUG=y
@@ -124,9 +126,16 @@ CONFIG_TIMERFD=y
124CONFIG_EVENTFD=y 126CONFIG_EVENTFD=y
125CONFIG_SHMEM=y 127CONFIG_SHMEM=y
126CONFIG_AIO=y 128CONFIG_AIO=y
129CONFIG_HAVE_PERF_COUNTERS=y
130
131#
132# Performance Counters
133#
134# CONFIG_PERF_COUNTERS is not set
127CONFIG_VM_EVENT_COUNTERS=y 135CONFIG_VM_EVENT_COUNTERS=y
128CONFIG_PCI_QUIRKS=y 136CONFIG_PCI_QUIRKS=y
129CONFIG_SLUB_DEBUG=y 137CONFIG_SLUB_DEBUG=y
138# CONFIG_STRIP_ASM_SYMS is not set
130CONFIG_COMPAT_BRK=y 139CONFIG_COMPAT_BRK=y
131# CONFIG_SLAB is not set 140# CONFIG_SLAB is not set
132CONFIG_SLUB=y 141CONFIG_SLUB=y
@@ -140,6 +149,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
140CONFIG_HAVE_KPROBES=y 149CONFIG_HAVE_KPROBES=y
141CONFIG_HAVE_KRETPROBES=y 150CONFIG_HAVE_KRETPROBES=y
142CONFIG_HAVE_ARCH_TRACEHOOK=y 151CONFIG_HAVE_ARCH_TRACEHOOK=y
152
153#
154# GCOV-based kernel profiling
155#
143# CONFIG_SLOW_WORK is not set 156# CONFIG_SLOW_WORK is not set
144# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 157# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
145CONFIG_SLABINFO=y 158CONFIG_SLABINFO=y
@@ -152,7 +165,7 @@ CONFIG_MODULE_UNLOAD=y
152# CONFIG_MODVERSIONS is not set 165# CONFIG_MODVERSIONS is not set
153# CONFIG_MODULE_SRCVERSION_ALL is not set 166# CONFIG_MODULE_SRCVERSION_ALL is not set
154CONFIG_BLOCK=y 167CONFIG_BLOCK=y
155# CONFIG_LBD is not set 168CONFIG_LBDAF=y
156# CONFIG_BLK_DEV_BSG is not set 169# CONFIG_BLK_DEV_BSG is not set
157# CONFIG_BLK_DEV_INTEGRITY is not set 170# CONFIG_BLK_DEV_INTEGRITY is not set
158 171
@@ -185,6 +198,7 @@ CONFIG_MPC85xx=y
185# CONFIG_MPC85xx_DS is not set 198# CONFIG_MPC85xx_DS is not set
186# CONFIG_SOCRATES is not set 199# CONFIG_SOCRATES is not set
187# CONFIG_KSI8560 is not set 200# CONFIG_KSI8560 is not set
201# CONFIG_XES_MPC85xx is not set
188# CONFIG_STX_GP3 is not set 202# CONFIG_STX_GP3 is not set
189# CONFIG_TQM8540 is not set 203# CONFIG_TQM8540 is not set
190# CONFIG_TQM8541 is not set 204# CONFIG_TQM8541 is not set
@@ -234,6 +248,7 @@ CONFIG_BINFMT_ELF=y
234CONFIG_BINFMT_MISC=y 248CONFIG_BINFMT_MISC=y
235CONFIG_MATH_EMULATION=y 249CONFIG_MATH_EMULATION=y
236# CONFIG_IOMMU_HELPER is not set 250# CONFIG_IOMMU_HELPER is not set
251# CONFIG_SWIOTLB is not set
237CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 252CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
238CONFIG_ARCH_HAS_WALK_MEMORY=y 253CONFIG_ARCH_HAS_WALK_MEMORY=y
239CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 254CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -252,9 +267,9 @@ CONFIG_MIGRATION=y
252CONFIG_ZONE_DMA_FLAG=1 267CONFIG_ZONE_DMA_FLAG=1
253CONFIG_BOUNCE=y 268CONFIG_BOUNCE=y
254CONFIG_VIRT_TO_BUS=y 269CONFIG_VIRT_TO_BUS=y
255CONFIG_UNEVICTABLE_LRU=y
256CONFIG_HAVE_MLOCK=y 270CONFIG_HAVE_MLOCK=y
257CONFIG_HAVE_MLOCKED_PAGE_BIT=y 271CONFIG_HAVE_MLOCKED_PAGE_BIT=y
272CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
258CONFIG_PPC_4K_PAGES=y 273CONFIG_PPC_4K_PAGES=y
259# CONFIG_PPC_16K_PAGES is not set 274# CONFIG_PPC_16K_PAGES is not set
260# CONFIG_PPC_64K_PAGES is not set 275# CONFIG_PPC_64K_PAGES is not set
@@ -281,6 +296,8 @@ CONFIG_PCI_DOMAINS=y
281CONFIG_PCI_SYSCALL=y 296CONFIG_PCI_SYSCALL=y
282CONFIG_PCIEPORTBUS=y 297CONFIG_PCIEPORTBUS=y
283CONFIG_PCIEAER=y 298CONFIG_PCIEAER=y
299# CONFIG_PCIE_ECRC is not set
300# CONFIG_PCIEAER_INJECT is not set
284# CONFIG_PCIEASPM is not set 301# CONFIG_PCIEASPM is not set
285CONFIG_ARCH_SUPPORTS_MSI=y 302CONFIG_ARCH_SUPPORTS_MSI=y
286# CONFIG_PCI_MSI is not set 303# CONFIG_PCI_MSI is not set
@@ -368,6 +385,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
368# CONFIG_ECONET is not set 385# CONFIG_ECONET is not set
369# CONFIG_WAN_ROUTER is not set 386# CONFIG_WAN_ROUTER is not set
370# CONFIG_PHONET is not set 387# CONFIG_PHONET is not set
388# CONFIG_IEEE802154 is not set
371# CONFIG_NET_SCHED is not set 389# CONFIG_NET_SCHED is not set
372# CONFIG_DCB is not set 390# CONFIG_DCB is not set
373 391
@@ -497,6 +515,7 @@ CONFIG_MTD_NAND_FSL_UPM=y
497# CONFIG_MTD_UBI is not set 515# CONFIG_MTD_UBI is not set
498CONFIG_OF_DEVICE=y 516CONFIG_OF_DEVICE=y
499CONFIG_OF_I2C=y 517CONFIG_OF_I2C=y
518CONFIG_OF_MDIO=y
500# CONFIG_PARPORT is not set 519# CONFIG_PARPORT is not set
501CONFIG_BLK_DEV=y 520CONFIG_BLK_DEV=y
502# CONFIG_BLK_DEV_FD is not set 521# CONFIG_BLK_DEV_FD is not set
@@ -531,7 +550,9 @@ CONFIG_MISC_DEVICES=y
531# 550#
532# CONFIG_EEPROM_AT24 is not set 551# CONFIG_EEPROM_AT24 is not set
533# CONFIG_EEPROM_LEGACY is not set 552# CONFIG_EEPROM_LEGACY is not set
553# CONFIG_EEPROM_MAX6875 is not set
534# CONFIG_EEPROM_93CX6 is not set 554# CONFIG_EEPROM_93CX6 is not set
555# CONFIG_CB710_CORE is not set
535CONFIG_HAVE_IDE=y 556CONFIG_HAVE_IDE=y
536# CONFIG_IDE is not set 557# CONFIG_IDE is not set
537 558
@@ -551,14 +572,17 @@ CONFIG_HAVE_IDE=y
551# 572#
552 573
553# 574#
554# Enable only one of the two stacks, unless you know what you are doing 575# You can enable one or both FireWire driver stacks.
576#
577
578#
579# See the help texts for more information.
555# 580#
556# CONFIG_FIREWIRE is not set 581# CONFIG_FIREWIRE is not set
557# CONFIG_IEEE1394 is not set 582# CONFIG_IEEE1394 is not set
558# CONFIG_I2O is not set 583# CONFIG_I2O is not set
559# CONFIG_MACINTOSH_DRIVERS is not set 584# CONFIG_MACINTOSH_DRIVERS is not set
560CONFIG_NETDEVICES=y 585CONFIG_NETDEVICES=y
561CONFIG_COMPAT_NET_DEV_OPS=y
562# CONFIG_DUMMY is not set 586# CONFIG_DUMMY is not set
563# CONFIG_BONDING is not set 587# CONFIG_BONDING is not set
564# CONFIG_MACVLAN is not set 588# CONFIG_MACVLAN is not set
@@ -605,6 +629,7 @@ CONFIG_MII=y
605# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 629# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
606# CONFIG_NET_PCI is not set 630# CONFIG_NET_PCI is not set
607# CONFIG_B44 is not set 631# CONFIG_B44 is not set
632# CONFIG_KS8842 is not set
608# CONFIG_ATL2 is not set 633# CONFIG_ATL2 is not set
609CONFIG_NETDEV_1000=y 634CONFIG_NETDEV_1000=y
610# CONFIG_ACENIC is not set 635# CONFIG_ACENIC is not set
@@ -624,8 +649,10 @@ CONFIG_NETDEV_1000=y
624# CONFIG_VIA_VELOCITY is not set 649# CONFIG_VIA_VELOCITY is not set
625# CONFIG_TIGON3 is not set 650# CONFIG_TIGON3 is not set
626# CONFIG_BNX2 is not set 651# CONFIG_BNX2 is not set
652# CONFIG_CNIC is not set
627CONFIG_FSL_PQ_MDIO=y 653CONFIG_FSL_PQ_MDIO=y
628CONFIG_GIANFAR=y 654CONFIG_GIANFAR=y
655# CONFIG_MV643XX_ETH is not set
629# CONFIG_QLA3XXX is not set 656# CONFIG_QLA3XXX is not set
630# CONFIG_ATL1 is not set 657# CONFIG_ATL1 is not set
631# CONFIG_ATL1E is not set 658# CONFIG_ATL1E is not set
@@ -801,13 +828,17 @@ CONFIG_I2C_MPC=y
801# CONFIG_SENSORS_PCF8574 is not set 828# CONFIG_SENSORS_PCF8574 is not set
802# CONFIG_PCF8575 is not set 829# CONFIG_PCF8575 is not set
803# CONFIG_SENSORS_PCA9539 is not set 830# CONFIG_SENSORS_PCA9539 is not set
804# CONFIG_SENSORS_MAX6875 is not set
805# CONFIG_SENSORS_TSL2550 is not set 831# CONFIG_SENSORS_TSL2550 is not set
806# CONFIG_I2C_DEBUG_CORE is not set 832# CONFIG_I2C_DEBUG_CORE is not set
807# CONFIG_I2C_DEBUG_ALGO is not set 833# CONFIG_I2C_DEBUG_ALGO is not set
808# CONFIG_I2C_DEBUG_BUS is not set 834# CONFIG_I2C_DEBUG_BUS is not set
809# CONFIG_I2C_DEBUG_CHIP is not set 835# CONFIG_I2C_DEBUG_CHIP is not set
810# CONFIG_SPI is not set 836# CONFIG_SPI is not set
837
838#
839# PPS support
840#
841# CONFIG_PPS is not set
811CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 842CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
812# CONFIG_GPIOLIB is not set 843# CONFIG_GPIOLIB is not set
813# CONFIG_W1 is not set 844# CONFIG_W1 is not set
@@ -862,6 +893,7 @@ CONFIG_SENSORS_LM75=y
862# CONFIG_SENSORS_SMSC47B397 is not set 893# CONFIG_SENSORS_SMSC47B397 is not set
863# CONFIG_SENSORS_ADS7828 is not set 894# CONFIG_SENSORS_ADS7828 is not set
864# CONFIG_SENSORS_THMC50 is not set 895# CONFIG_SENSORS_THMC50 is not set
896# CONFIG_SENSORS_TMP401 is not set
865# CONFIG_SENSORS_VIA686A is not set 897# CONFIG_SENSORS_VIA686A is not set
866# CONFIG_SENSORS_VT1211 is not set 898# CONFIG_SENSORS_VT1211 is not set
867# CONFIG_SENSORS_VT8231 is not set 899# CONFIG_SENSORS_VT8231 is not set
@@ -896,23 +928,9 @@ CONFIG_SSB_POSSIBLE=y
896# CONFIG_MFD_WM8400 is not set 928# CONFIG_MFD_WM8400 is not set
897# CONFIG_MFD_WM8350_I2C is not set 929# CONFIG_MFD_WM8350_I2C is not set
898# CONFIG_MFD_PCF50633 is not set 930# CONFIG_MFD_PCF50633 is not set
931# CONFIG_AB3100_CORE is not set
899# CONFIG_REGULATOR is not set 932# CONFIG_REGULATOR is not set
900 933# CONFIG_MEDIA_SUPPORT is not set
901#
902# Multimedia devices
903#
904
905#
906# Multimedia core support
907#
908# CONFIG_VIDEO_DEV is not set
909# CONFIG_DVB_CORE is not set
910# CONFIG_VIDEO_MEDIA is not set
911
912#
913# Multimedia drivers
914#
915CONFIG_DAB=y
916 934
917# 935#
918# Graphics support 936# Graphics support
@@ -977,6 +995,7 @@ CONFIG_RTC_DRV_DS1307=y
977# CONFIG_RTC_DRV_S35390A is not set 995# CONFIG_RTC_DRV_S35390A is not set
978# CONFIG_RTC_DRV_FM3130 is not set 996# CONFIG_RTC_DRV_FM3130 is not set
979# CONFIG_RTC_DRV_RX8581 is not set 997# CONFIG_RTC_DRV_RX8581 is not set
998# CONFIG_RTC_DRV_RX8025 is not set
980 999
981# 1000#
982# SPI RTC drivers 1001# SPI RTC drivers
@@ -1004,6 +1023,10 @@ CONFIG_RTC_DRV_DS1307=y
1004# CONFIG_DMADEVICES is not set 1023# CONFIG_DMADEVICES is not set
1005# CONFIG_AUXDISPLAY is not set 1024# CONFIG_AUXDISPLAY is not set
1006# CONFIG_UIO is not set 1025# CONFIG_UIO is not set
1026
1027#
1028# TI VLYNQ
1029#
1007# CONFIG_STAGING is not set 1030# CONFIG_STAGING is not set
1008 1031
1009# 1032#
@@ -1015,10 +1038,12 @@ CONFIG_RTC_DRV_DS1307=y
1015# CONFIG_REISERFS_FS is not set 1038# CONFIG_REISERFS_FS is not set
1016# CONFIG_JFS_FS is not set 1039# CONFIG_JFS_FS is not set
1017# CONFIG_FS_POSIX_ACL is not set 1040# CONFIG_FS_POSIX_ACL is not set
1018CONFIG_FILE_LOCKING=y
1019# CONFIG_XFS_FS is not set 1041# CONFIG_XFS_FS is not set
1042# CONFIG_GFS2_FS is not set
1020# CONFIG_OCFS2_FS is not set 1043# CONFIG_OCFS2_FS is not set
1021# CONFIG_BTRFS_FS is not set 1044# CONFIG_BTRFS_FS is not set
1045CONFIG_FILE_LOCKING=y
1046CONFIG_FSNOTIFY=y
1022CONFIG_DNOTIFY=y 1047CONFIG_DNOTIFY=y
1023CONFIG_INOTIFY=y 1048CONFIG_INOTIFY=y
1024CONFIG_INOTIFY_USER=y 1049CONFIG_INOTIFY_USER=y
@@ -1145,6 +1170,7 @@ CONFIG_HAS_IOPORT=y
1145CONFIG_HAS_DMA=y 1170CONFIG_HAS_DMA=y
1146CONFIG_HAVE_LMB=y 1171CONFIG_HAVE_LMB=y
1147CONFIG_NLATTR=y 1172CONFIG_NLATTR=y
1173CONFIG_GENERIC_ATOMIC64=y
1148 1174
1149# 1175#
1150# Kernel hacking 1176# Kernel hacking
@@ -1175,6 +1201,9 @@ CONFIG_SCHED_DEBUG=y
1175# CONFIG_RT_MUTEX_TESTER is not set 1201# CONFIG_RT_MUTEX_TESTER is not set
1176# CONFIG_DEBUG_SPINLOCK is not set 1202# CONFIG_DEBUG_SPINLOCK is not set
1177CONFIG_DEBUG_MUTEXES=y 1203CONFIG_DEBUG_MUTEXES=y
1204# CONFIG_DEBUG_LOCK_ALLOC is not set
1205# CONFIG_PROVE_LOCKING is not set
1206# CONFIG_LOCK_STAT is not set
1178# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1207# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1179# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1208# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1180# CONFIG_DEBUG_KOBJECT is not set 1209# CONFIG_DEBUG_KOBJECT is not set
@@ -1187,7 +1216,6 @@ CONFIG_DEBUG_MUTEXES=y
1187# CONFIG_DEBUG_LIST is not set 1216# CONFIG_DEBUG_LIST is not set
1188# CONFIG_DEBUG_SG is not set 1217# CONFIG_DEBUG_SG is not set
1189# CONFIG_DEBUG_NOTIFIERS is not set 1218# CONFIG_DEBUG_NOTIFIERS is not set
1190# CONFIG_BOOT_PRINTK_DELAY is not set
1191# CONFIG_RCU_TORTURE_TEST is not set 1219# CONFIG_RCU_TORTURE_TEST is not set
1192# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1220# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1193# CONFIG_BACKTRACE_SELF_TEST is not set 1221# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1201,16 +1229,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1201CONFIG_HAVE_DYNAMIC_FTRACE=y 1229CONFIG_HAVE_DYNAMIC_FTRACE=y
1202CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1230CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1203CONFIG_TRACING_SUPPORT=y 1231CONFIG_TRACING_SUPPORT=y
1204 1232CONFIG_FTRACE=y
1205#
1206# Tracers
1207#
1208# CONFIG_FUNCTION_TRACER is not set 1233# CONFIG_FUNCTION_TRACER is not set
1234# CONFIG_IRQSOFF_TRACER is not set
1209# CONFIG_SCHED_TRACER is not set 1235# CONFIG_SCHED_TRACER is not set
1210# CONFIG_CONTEXT_SWITCH_TRACER is not set 1236# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1211# CONFIG_EVENT_TRACER is not set
1212# CONFIG_BOOT_TRACER is not set 1237# CONFIG_BOOT_TRACER is not set
1213# CONFIG_TRACE_BRANCH_PROFILING is not set 1238CONFIG_BRANCH_PROFILE_NONE=y
1239# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1240# CONFIG_PROFILE_ALL_BRANCHES is not set
1214# CONFIG_STACK_TRACER is not set 1241# CONFIG_STACK_TRACER is not set
1215# CONFIG_KMEMTRACE is not set 1242# CONFIG_KMEMTRACE is not set
1216# CONFIG_WORKQUEUE_TRACER is not set 1243# CONFIG_WORKQUEUE_TRACER is not set
@@ -1218,6 +1245,9 @@ CONFIG_TRACING_SUPPORT=y
1218# CONFIG_SAMPLES is not set 1245# CONFIG_SAMPLES is not set
1219CONFIG_HAVE_ARCH_KGDB=y 1246CONFIG_HAVE_ARCH_KGDB=y
1220# CONFIG_KGDB is not set 1247# CONFIG_KGDB is not set
1248# CONFIG_KMEMCHECK is not set
1249# CONFIG_PPC_DISABLE_WERROR is not set
1250CONFIG_PPC_WERROR=y
1221CONFIG_PRINT_STACK_DEPTH=64 1251CONFIG_PRINT_STACK_DEPTH=64
1222# CONFIG_DEBUG_STACKOVERFLOW is not set 1252# CONFIG_DEBUG_STACKOVERFLOW is not set
1223# CONFIG_DEBUG_STACK_USAGE is not set 1253# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/85xx/tqm8555_defconfig b/arch/powerpc/configs/85xx/tqm8555_defconfig
index 170360934ce..9196724bebc 100644
--- a/arch/powerpc/configs/85xx/tqm8555_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8555_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:25 2009 4# Wed Jul 29 23:32:24 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12CONFIG_PPC_85xx=y 12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -34,15 +34,16 @@ CONFIG_GENERIC_TIME=y
34CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
35CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
36CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
38CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
39CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
40CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
41CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
42CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
43CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
44CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
45CONFIG_GENERIC_CALIBRATE_DELAY=y
46CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
47CONFIG_GENERIC_GPIO=y 48CONFIG_GENERIC_GPIO=y
48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 49# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -57,11 +58,13 @@ CONFIG_PPC_UDBG_16550=y
57# CONFIG_GENERIC_TBSYNC is not set 58# CONFIG_GENERIC_TBSYNC is not set
58CONFIG_AUDIT_ARCH=y 59CONFIG_AUDIT_ARCH=y
59CONFIG_GENERIC_BUG=y 60CONFIG_GENERIC_BUG=y
61CONFIG_DTC=y
60CONFIG_DEFAULT_UIMAGE=y 62CONFIG_DEFAULT_UIMAGE=y
61# CONFIG_PPC_DCR_NATIVE is not set 63# CONFIG_PPC_DCR_NATIVE is not set
62# CONFIG_PPC_DCR_MMIO is not set 64# CONFIG_PPC_DCR_MMIO is not set
63CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 65CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
64CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 66CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
67CONFIG_CONSTRUCTORS=y
65 68
66# 69#
67# General setup 70# General setup
@@ -110,7 +113,6 @@ CONFIG_ANON_INODES=y
110CONFIG_EMBEDDED=y 113CONFIG_EMBEDDED=y
111CONFIG_SYSCTL_SYSCALL=y 114CONFIG_SYSCTL_SYSCALL=y
112# CONFIG_KALLSYMS is not set 115# CONFIG_KALLSYMS is not set
113# CONFIG_STRIP_ASM_SYMS is not set
114# CONFIG_HOTPLUG is not set 116# CONFIG_HOTPLUG is not set
115CONFIG_PRINTK=y 117CONFIG_PRINTK=y
116CONFIG_BUG=y 118CONFIG_BUG=y
@@ -123,9 +125,16 @@ CONFIG_TIMERFD=y
123CONFIG_EVENTFD=y 125CONFIG_EVENTFD=y
124CONFIG_SHMEM=y 126CONFIG_SHMEM=y
125CONFIG_AIO=y 127CONFIG_AIO=y
128CONFIG_HAVE_PERF_COUNTERS=y
129
130#
131# Performance Counters
132#
133# CONFIG_PERF_COUNTERS is not set
126CONFIG_VM_EVENT_COUNTERS=y 134CONFIG_VM_EVENT_COUNTERS=y
127CONFIG_PCI_QUIRKS=y 135CONFIG_PCI_QUIRKS=y
128CONFIG_SLUB_DEBUG=y 136CONFIG_SLUB_DEBUG=y
137# CONFIG_STRIP_ASM_SYMS is not set
129CONFIG_COMPAT_BRK=y 138CONFIG_COMPAT_BRK=y
130# CONFIG_SLAB is not set 139# CONFIG_SLAB is not set
131CONFIG_SLUB=y 140CONFIG_SLUB=y
@@ -139,6 +148,10 @@ CONFIG_HAVE_KPROBES=y
139CONFIG_HAVE_KRETPROBES=y 148CONFIG_HAVE_KRETPROBES=y
140CONFIG_HAVE_ARCH_TRACEHOOK=y 149CONFIG_HAVE_ARCH_TRACEHOOK=y
141CONFIG_HAVE_CLK=y 150CONFIG_HAVE_CLK=y
151
152#
153# GCOV-based kernel profiling
154#
142# CONFIG_SLOW_WORK is not set 155# CONFIG_SLOW_WORK is not set
143# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 156# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
144CONFIG_SLABINFO=y 157CONFIG_SLABINFO=y
@@ -146,7 +159,7 @@ CONFIG_RT_MUTEXES=y
146CONFIG_BASE_SMALL=0 159CONFIG_BASE_SMALL=0
147# CONFIG_MODULES is not set 160# CONFIG_MODULES is not set
148CONFIG_BLOCK=y 161CONFIG_BLOCK=y
149# CONFIG_LBD is not set 162CONFIG_LBDAF=y
150# CONFIG_BLK_DEV_BSG is not set 163# CONFIG_BLK_DEV_BSG is not set
151# CONFIG_BLK_DEV_INTEGRITY is not set 164# CONFIG_BLK_DEV_INTEGRITY is not set
152 165
@@ -179,6 +192,7 @@ CONFIG_MPC85xx=y
179# CONFIG_MPC85xx_DS is not set 192# CONFIG_MPC85xx_DS is not set
180# CONFIG_SOCRATES is not set 193# CONFIG_SOCRATES is not set
181# CONFIG_KSI8560 is not set 194# CONFIG_KSI8560 is not set
195# CONFIG_XES_MPC85xx is not set
182# CONFIG_STX_GP3 is not set 196# CONFIG_STX_GP3 is not set
183# CONFIG_TQM8540 is not set 197# CONFIG_TQM8540 is not set
184# CONFIG_TQM8541 is not set 198# CONFIG_TQM8541 is not set
@@ -228,6 +242,7 @@ CONFIG_BINFMT_ELF=y
228# CONFIG_BINFMT_MISC is not set 242# CONFIG_BINFMT_MISC is not set
229CONFIG_MATH_EMULATION=y 243CONFIG_MATH_EMULATION=y
230# CONFIG_IOMMU_HELPER is not set 244# CONFIG_IOMMU_HELPER is not set
245# CONFIG_SWIOTLB is not set
231CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 246CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
232CONFIG_ARCH_HAS_WALK_MEMORY=y 247CONFIG_ARCH_HAS_WALK_MEMORY=y
233CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 248CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -246,9 +261,9 @@ CONFIG_MIGRATION=y
246CONFIG_ZONE_DMA_FLAG=1 261CONFIG_ZONE_DMA_FLAG=1
247CONFIG_BOUNCE=y 262CONFIG_BOUNCE=y
248CONFIG_VIRT_TO_BUS=y 263CONFIG_VIRT_TO_BUS=y
249CONFIG_UNEVICTABLE_LRU=y
250CONFIG_HAVE_MLOCK=y 264CONFIG_HAVE_MLOCK=y
251CONFIG_HAVE_MLOCKED_PAGE_BIT=y 265CONFIG_HAVE_MLOCKED_PAGE_BIT=y
266CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
252CONFIG_PPC_4K_PAGES=y 267CONFIG_PPC_4K_PAGES=y
253# CONFIG_PPC_16K_PAGES is not set 268# CONFIG_PPC_16K_PAGES is not set
254# CONFIG_PPC_64K_PAGES is not set 269# CONFIG_PPC_64K_PAGES is not set
@@ -356,6 +371,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
356# CONFIG_ECONET is not set 371# CONFIG_ECONET is not set
357# CONFIG_WAN_ROUTER is not set 372# CONFIG_WAN_ROUTER is not set
358# CONFIG_PHONET is not set 373# CONFIG_PHONET is not set
374# CONFIG_IEEE802154 is not set
359# CONFIG_NET_SCHED is not set 375# CONFIG_NET_SCHED is not set
360# CONFIG_DCB is not set 376# CONFIG_DCB is not set
361 377
@@ -373,7 +389,11 @@ CONFIG_WIRELESS=y
373CONFIG_WIRELESS_OLD_REGULATORY=y 389CONFIG_WIRELESS_OLD_REGULATORY=y
374# CONFIG_WIRELESS_EXT is not set 390# CONFIG_WIRELESS_EXT is not set
375# CONFIG_LIB80211 is not set 391# CONFIG_LIB80211 is not set
376# CONFIG_MAC80211 is not set 392
393#
394# CFG80211 needs to be enabled for MAC80211
395#
396CONFIG_MAC80211_DEFAULT_PS_VALUE=0
377# CONFIG_WIMAX is not set 397# CONFIG_WIMAX is not set
378# CONFIG_RFKILL is not set 398# CONFIG_RFKILL is not set
379# CONFIG_NET_9P is not set 399# CONFIG_NET_9P is not set
@@ -475,6 +495,7 @@ CONFIG_MTD_CFI_UTIL=y
475CONFIG_OF_DEVICE=y 495CONFIG_OF_DEVICE=y
476CONFIG_OF_GPIO=y 496CONFIG_OF_GPIO=y
477CONFIG_OF_I2C=y 497CONFIG_OF_I2C=y
498CONFIG_OF_MDIO=y
478# CONFIG_PARPORT is not set 499# CONFIG_PARPORT is not set
479CONFIG_BLK_DEV=y 500CONFIG_BLK_DEV=y
480# CONFIG_BLK_DEV_FD is not set 501# CONFIG_BLK_DEV_FD is not set
@@ -509,7 +530,9 @@ CONFIG_MISC_DEVICES=y
509# 530#
510# CONFIG_EEPROM_AT24 is not set 531# CONFIG_EEPROM_AT24 is not set
511# CONFIG_EEPROM_LEGACY is not set 532# CONFIG_EEPROM_LEGACY is not set
533# CONFIG_EEPROM_MAX6875 is not set
512# CONFIG_EEPROM_93CX6 is not set 534# CONFIG_EEPROM_93CX6 is not set
535# CONFIG_CB710_CORE is not set
513CONFIG_HAVE_IDE=y 536CONFIG_HAVE_IDE=y
514CONFIG_IDE=y 537CONFIG_IDE=y
515 538
@@ -584,14 +607,17 @@ CONFIG_BLK_DEV_IDEDMA=y
584# 607#
585 608
586# 609#
587# Enable only one of the two stacks, unless you know what you are doing 610# You can enable one or both FireWire driver stacks.
611#
612
613#
614# See the help texts for more information.
588# 615#
589# CONFIG_FIREWIRE is not set 616# CONFIG_FIREWIRE is not set
590# CONFIG_IEEE1394 is not set 617# CONFIG_IEEE1394 is not set
591# CONFIG_I2O is not set 618# CONFIG_I2O is not set
592# CONFIG_MACINTOSH_DRIVERS is not set 619# CONFIG_MACINTOSH_DRIVERS is not set
593CONFIG_NETDEVICES=y 620CONFIG_NETDEVICES=y
594CONFIG_COMPAT_NET_DEV_OPS=y
595# CONFIG_DUMMY is not set 621# CONFIG_DUMMY is not set
596# CONFIG_BONDING is not set 622# CONFIG_BONDING is not set
597# CONFIG_MACVLAN is not set 623# CONFIG_MACVLAN is not set
@@ -654,6 +680,7 @@ CONFIG_E100=y
654# CONFIG_SMSC9420 is not set 680# CONFIG_SMSC9420 is not set
655# CONFIG_SUNDANCE is not set 681# CONFIG_SUNDANCE is not set
656# CONFIG_TLAN is not set 682# CONFIG_TLAN is not set
683# CONFIG_KS8842 is not set
657# CONFIG_VIA_RHINE is not set 684# CONFIG_VIA_RHINE is not set
658# CONFIG_SC92031 is not set 685# CONFIG_SC92031 is not set
659# CONFIG_ATL2 is not set 686# CONFIG_ATL2 is not set
@@ -676,8 +703,10 @@ CONFIG_NETDEV_1000=y
676# CONFIG_VIA_VELOCITY is not set 703# CONFIG_VIA_VELOCITY is not set
677# CONFIG_TIGON3 is not set 704# CONFIG_TIGON3 is not set
678# CONFIG_BNX2 is not set 705# CONFIG_BNX2 is not set
706# CONFIG_CNIC is not set
679CONFIG_FSL_PQ_MDIO=y 707CONFIG_FSL_PQ_MDIO=y
680CONFIG_GIANFAR=y 708CONFIG_GIANFAR=y
709# CONFIG_MV643XX_ETH is not set
681# CONFIG_QLA3XXX is not set 710# CONFIG_QLA3XXX is not set
682# CONFIG_ATL1 is not set 711# CONFIG_ATL1 is not set
683# CONFIG_ATL1E is not set 712# CONFIG_ATL1E is not set
@@ -831,6 +860,7 @@ CONFIG_I2C_HELPER_AUTO=y
831# I2C system bus drivers (mostly embedded / system-on-chip) 860# I2C system bus drivers (mostly embedded / system-on-chip)
832# 861#
833# CONFIG_I2C_CPM is not set 862# CONFIG_I2C_CPM is not set
863# CONFIG_I2C_DESIGNWARE is not set
834# CONFIG_I2C_GPIO is not set 864# CONFIG_I2C_GPIO is not set
835CONFIG_I2C_MPC=y 865CONFIG_I2C_MPC=y
836# CONFIG_I2C_OCORES is not set 866# CONFIG_I2C_OCORES is not set
@@ -859,13 +889,17 @@ CONFIG_I2C_MPC=y
859# CONFIG_SENSORS_PCF8574 is not set 889# CONFIG_SENSORS_PCF8574 is not set
860# CONFIG_PCF8575 is not set 890# CONFIG_PCF8575 is not set
861# CONFIG_SENSORS_PCA9539 is not set 891# CONFIG_SENSORS_PCA9539 is not set
862# CONFIG_SENSORS_MAX6875 is not set
863# CONFIG_SENSORS_TSL2550 is not set 892# CONFIG_SENSORS_TSL2550 is not set
864# CONFIG_I2C_DEBUG_CORE is not set 893# CONFIG_I2C_DEBUG_CORE is not set
865# CONFIG_I2C_DEBUG_ALGO is not set 894# CONFIG_I2C_DEBUG_ALGO is not set
866# CONFIG_I2C_DEBUG_BUS is not set 895# CONFIG_I2C_DEBUG_BUS is not set
867# CONFIG_I2C_DEBUG_CHIP is not set 896# CONFIG_I2C_DEBUG_CHIP is not set
868# CONFIG_SPI is not set 897# CONFIG_SPI is not set
898
899#
900# PPS support
901#
902# CONFIG_PPS is not set
869CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 903CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
870CONFIG_ARCH_REQUIRE_GPIOLIB=y 904CONFIG_ARCH_REQUIRE_GPIOLIB=y
871CONFIG_GPIOLIB=y 905CONFIG_GPIOLIB=y
@@ -944,6 +978,7 @@ CONFIG_SENSORS_LM75=y
944# CONFIG_SENSORS_SMSC47B397 is not set 978# CONFIG_SENSORS_SMSC47B397 is not set
945# CONFIG_SENSORS_ADS7828 is not set 979# CONFIG_SENSORS_ADS7828 is not set
946# CONFIG_SENSORS_THMC50 is not set 980# CONFIG_SENSORS_THMC50 is not set
981# CONFIG_SENSORS_TMP401 is not set
947# CONFIG_SENSORS_VIA686A is not set 982# CONFIG_SENSORS_VIA686A is not set
948# CONFIG_SENSORS_VT1211 is not set 983# CONFIG_SENSORS_VT1211 is not set
949# CONFIG_SENSORS_VT8231 is not set 984# CONFIG_SENSORS_VT8231 is not set
@@ -979,23 +1014,9 @@ CONFIG_SSB_POSSIBLE=y
979# CONFIG_MFD_WM8400 is not set 1014# CONFIG_MFD_WM8400 is not set
980# CONFIG_MFD_WM8350_I2C is not set 1015# CONFIG_MFD_WM8350_I2C is not set
981# CONFIG_MFD_PCF50633 is not set 1016# CONFIG_MFD_PCF50633 is not set
1017# CONFIG_AB3100_CORE is not set
982# CONFIG_REGULATOR is not set 1018# CONFIG_REGULATOR is not set
983 1019# CONFIG_MEDIA_SUPPORT is not set
984#
985# Multimedia devices
986#
987
988#
989# Multimedia core support
990#
991# CONFIG_VIDEO_DEV is not set
992# CONFIG_DVB_CORE is not set
993# CONFIG_VIDEO_MEDIA is not set
994
995#
996# Multimedia drivers
997#
998CONFIG_DAB=y
999 1020
1000# 1021#
1001# Graphics support 1022# Graphics support
@@ -1052,6 +1073,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1052# CONFIG_DMADEVICES is not set 1073# CONFIG_DMADEVICES is not set
1053# CONFIG_AUXDISPLAY is not set 1074# CONFIG_AUXDISPLAY is not set
1054# CONFIG_UIO is not set 1075# CONFIG_UIO is not set
1076
1077#
1078# TI VLYNQ
1079#
1055# CONFIG_STAGING is not set 1080# CONFIG_STAGING is not set
1056 1081
1057# 1082#
@@ -1071,10 +1096,12 @@ CONFIG_FS_MBCACHE=y
1071# CONFIG_REISERFS_FS is not set 1096# CONFIG_REISERFS_FS is not set
1072# CONFIG_JFS_FS is not set 1097# CONFIG_JFS_FS is not set
1073# CONFIG_FS_POSIX_ACL is not set 1098# CONFIG_FS_POSIX_ACL is not set
1074CONFIG_FILE_LOCKING=y
1075# CONFIG_XFS_FS is not set 1099# CONFIG_XFS_FS is not set
1100# CONFIG_GFS2_FS is not set
1076# CONFIG_OCFS2_FS is not set 1101# CONFIG_OCFS2_FS is not set
1077# CONFIG_BTRFS_FS is not set 1102# CONFIG_BTRFS_FS is not set
1103CONFIG_FILE_LOCKING=y
1104CONFIG_FSNOTIFY=y
1078CONFIG_DNOTIFY=y 1105CONFIG_DNOTIFY=y
1079CONFIG_INOTIFY=y 1106CONFIG_INOTIFY=y
1080CONFIG_INOTIFY_USER=y 1107CONFIG_INOTIFY_USER=y
@@ -1201,6 +1228,7 @@ CONFIG_HAS_IOPORT=y
1201CONFIG_HAS_DMA=y 1228CONFIG_HAS_DMA=y
1202CONFIG_HAVE_LMB=y 1229CONFIG_HAVE_LMB=y
1203CONFIG_NLATTR=y 1230CONFIG_NLATTR=y
1231CONFIG_GENERIC_ATOMIC64=y
1204 1232
1205# 1233#
1206# Kernel hacking 1234# Kernel hacking
@@ -1226,22 +1254,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1226CONFIG_HAVE_DYNAMIC_FTRACE=y 1254CONFIG_HAVE_DYNAMIC_FTRACE=y
1227CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1255CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1228CONFIG_TRACING_SUPPORT=y 1256CONFIG_TRACING_SUPPORT=y
1229 1257# CONFIG_FTRACE is not set
1230#
1231# Tracers
1232#
1233# CONFIG_FUNCTION_TRACER is not set
1234# CONFIG_SCHED_TRACER is not set
1235# CONFIG_CONTEXT_SWITCH_TRACER is not set
1236# CONFIG_EVENT_TRACER is not set
1237# CONFIG_BOOT_TRACER is not set
1238# CONFIG_TRACE_BRANCH_PROFILING is not set
1239# CONFIG_STACK_TRACER is not set
1240# CONFIG_KMEMTRACE is not set
1241# CONFIG_WORKQUEUE_TRACER is not set
1242# CONFIG_BLK_DEV_IO_TRACE is not set
1243# CONFIG_SAMPLES is not set 1258# CONFIG_SAMPLES is not set
1244CONFIG_HAVE_ARCH_KGDB=y 1259CONFIG_HAVE_ARCH_KGDB=y
1260# CONFIG_PPC_DISABLE_WERROR is not set
1261CONFIG_PPC_WERROR=y
1245CONFIG_PRINT_STACK_DEPTH=64 1262CONFIG_PRINT_STACK_DEPTH=64
1246# CONFIG_IRQSTACKS is not set 1263# CONFIG_IRQSTACKS is not set
1247# CONFIG_PPC_EARLY_DEBUG is not set 1264# CONFIG_PPC_EARLY_DEBUG is not set
diff --git a/arch/powerpc/configs/85xx/tqm8560_defconfig b/arch/powerpc/configs/85xx/tqm8560_defconfig
index f41cc2444d4..2e49a6e9faf 100644
--- a/arch/powerpc/configs/85xx/tqm8560_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8560_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:26 2009 4# Wed Jul 29 23:32:25 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12CONFIG_PPC_85xx=y 12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -34,15 +34,16 @@ CONFIG_GENERIC_TIME=y
34CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
35CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
36CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
38CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
39CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
40CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
41CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
42CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
43CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
44CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
45CONFIG_GENERIC_CALIBRATE_DELAY=y
46CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
47CONFIG_GENERIC_GPIO=y 48CONFIG_GENERIC_GPIO=y
48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 49# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -57,11 +58,13 @@ CONFIG_PPC_UDBG_16550=y
57# CONFIG_GENERIC_TBSYNC is not set 58# CONFIG_GENERIC_TBSYNC is not set
58CONFIG_AUDIT_ARCH=y 59CONFIG_AUDIT_ARCH=y
59CONFIG_GENERIC_BUG=y 60CONFIG_GENERIC_BUG=y
61CONFIG_DTC=y
60CONFIG_DEFAULT_UIMAGE=y 62CONFIG_DEFAULT_UIMAGE=y
61# CONFIG_PPC_DCR_NATIVE is not set 63# CONFIG_PPC_DCR_NATIVE is not set
62# CONFIG_PPC_DCR_MMIO is not set 64# CONFIG_PPC_DCR_MMIO is not set
63CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 65CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
64CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 66CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
67CONFIG_CONSTRUCTORS=y
65 68
66# 69#
67# General setup 70# General setup
@@ -110,7 +113,6 @@ CONFIG_ANON_INODES=y
110CONFIG_EMBEDDED=y 113CONFIG_EMBEDDED=y
111CONFIG_SYSCTL_SYSCALL=y 114CONFIG_SYSCTL_SYSCALL=y
112# CONFIG_KALLSYMS is not set 115# CONFIG_KALLSYMS is not set
113# CONFIG_STRIP_ASM_SYMS is not set
114# CONFIG_HOTPLUG is not set 116# CONFIG_HOTPLUG is not set
115CONFIG_PRINTK=y 117CONFIG_PRINTK=y
116CONFIG_BUG=y 118CONFIG_BUG=y
@@ -123,9 +125,16 @@ CONFIG_TIMERFD=y
123CONFIG_EVENTFD=y 125CONFIG_EVENTFD=y
124CONFIG_SHMEM=y 126CONFIG_SHMEM=y
125CONFIG_AIO=y 127CONFIG_AIO=y
128CONFIG_HAVE_PERF_COUNTERS=y
129
130#
131# Performance Counters
132#
133# CONFIG_PERF_COUNTERS is not set
126CONFIG_VM_EVENT_COUNTERS=y 134CONFIG_VM_EVENT_COUNTERS=y
127CONFIG_PCI_QUIRKS=y 135CONFIG_PCI_QUIRKS=y
128CONFIG_SLUB_DEBUG=y 136CONFIG_SLUB_DEBUG=y
137# CONFIG_STRIP_ASM_SYMS is not set
129CONFIG_COMPAT_BRK=y 138CONFIG_COMPAT_BRK=y
130# CONFIG_SLAB is not set 139# CONFIG_SLAB is not set
131CONFIG_SLUB=y 140CONFIG_SLUB=y
@@ -139,6 +148,10 @@ CONFIG_HAVE_KPROBES=y
139CONFIG_HAVE_KRETPROBES=y 148CONFIG_HAVE_KRETPROBES=y
140CONFIG_HAVE_ARCH_TRACEHOOK=y 149CONFIG_HAVE_ARCH_TRACEHOOK=y
141CONFIG_HAVE_CLK=y 150CONFIG_HAVE_CLK=y
151
152#
153# GCOV-based kernel profiling
154#
142# CONFIG_SLOW_WORK is not set 155# CONFIG_SLOW_WORK is not set
143# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 156# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
144CONFIG_SLABINFO=y 157CONFIG_SLABINFO=y
@@ -146,7 +159,7 @@ CONFIG_RT_MUTEXES=y
146CONFIG_BASE_SMALL=0 159CONFIG_BASE_SMALL=0
147# CONFIG_MODULES is not set 160# CONFIG_MODULES is not set
148CONFIG_BLOCK=y 161CONFIG_BLOCK=y
149# CONFIG_LBD is not set 162CONFIG_LBDAF=y
150# CONFIG_BLK_DEV_BSG is not set 163# CONFIG_BLK_DEV_BSG is not set
151# CONFIG_BLK_DEV_INTEGRITY is not set 164# CONFIG_BLK_DEV_INTEGRITY is not set
152 165
@@ -179,6 +192,7 @@ CONFIG_MPC85xx=y
179# CONFIG_MPC85xx_DS is not set 192# CONFIG_MPC85xx_DS is not set
180# CONFIG_SOCRATES is not set 193# CONFIG_SOCRATES is not set
181# CONFIG_KSI8560 is not set 194# CONFIG_KSI8560 is not set
195# CONFIG_XES_MPC85xx is not set
182# CONFIG_STX_GP3 is not set 196# CONFIG_STX_GP3 is not set
183# CONFIG_TQM8540 is not set 197# CONFIG_TQM8540 is not set
184# CONFIG_TQM8541 is not set 198# CONFIG_TQM8541 is not set
@@ -228,6 +242,7 @@ CONFIG_BINFMT_ELF=y
228# CONFIG_BINFMT_MISC is not set 242# CONFIG_BINFMT_MISC is not set
229CONFIG_MATH_EMULATION=y 243CONFIG_MATH_EMULATION=y
230# CONFIG_IOMMU_HELPER is not set 244# CONFIG_IOMMU_HELPER is not set
245# CONFIG_SWIOTLB is not set
231CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 246CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
232CONFIG_ARCH_HAS_WALK_MEMORY=y 247CONFIG_ARCH_HAS_WALK_MEMORY=y
233CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 248CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -246,9 +261,9 @@ CONFIG_MIGRATION=y
246CONFIG_ZONE_DMA_FLAG=1 261CONFIG_ZONE_DMA_FLAG=1
247CONFIG_BOUNCE=y 262CONFIG_BOUNCE=y
248CONFIG_VIRT_TO_BUS=y 263CONFIG_VIRT_TO_BUS=y
249CONFIG_UNEVICTABLE_LRU=y
250CONFIG_HAVE_MLOCK=y 264CONFIG_HAVE_MLOCK=y
251CONFIG_HAVE_MLOCKED_PAGE_BIT=y 265CONFIG_HAVE_MLOCKED_PAGE_BIT=y
266CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
252CONFIG_PPC_4K_PAGES=y 267CONFIG_PPC_4K_PAGES=y
253# CONFIG_PPC_16K_PAGES is not set 268# CONFIG_PPC_16K_PAGES is not set
254# CONFIG_PPC_64K_PAGES is not set 269# CONFIG_PPC_64K_PAGES is not set
@@ -356,6 +371,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
356# CONFIG_ECONET is not set 371# CONFIG_ECONET is not set
357# CONFIG_WAN_ROUTER is not set 372# CONFIG_WAN_ROUTER is not set
358# CONFIG_PHONET is not set 373# CONFIG_PHONET is not set
374# CONFIG_IEEE802154 is not set
359# CONFIG_NET_SCHED is not set 375# CONFIG_NET_SCHED is not set
360# CONFIG_DCB is not set 376# CONFIG_DCB is not set
361 377
@@ -373,7 +389,11 @@ CONFIG_WIRELESS=y
373CONFIG_WIRELESS_OLD_REGULATORY=y 389CONFIG_WIRELESS_OLD_REGULATORY=y
374# CONFIG_WIRELESS_EXT is not set 390# CONFIG_WIRELESS_EXT is not set
375# CONFIG_LIB80211 is not set 391# CONFIG_LIB80211 is not set
376# CONFIG_MAC80211 is not set 392
393#
394# CFG80211 needs to be enabled for MAC80211
395#
396CONFIG_MAC80211_DEFAULT_PS_VALUE=0
377# CONFIG_WIMAX is not set 397# CONFIG_WIMAX is not set
378# CONFIG_RFKILL is not set 398# CONFIG_RFKILL is not set
379# CONFIG_NET_9P is not set 399# CONFIG_NET_9P is not set
@@ -475,6 +495,7 @@ CONFIG_MTD_CFI_UTIL=y
475CONFIG_OF_DEVICE=y 495CONFIG_OF_DEVICE=y
476CONFIG_OF_GPIO=y 496CONFIG_OF_GPIO=y
477CONFIG_OF_I2C=y 497CONFIG_OF_I2C=y
498CONFIG_OF_MDIO=y
478# CONFIG_PARPORT is not set 499# CONFIG_PARPORT is not set
479CONFIG_BLK_DEV=y 500CONFIG_BLK_DEV=y
480# CONFIG_BLK_DEV_FD is not set 501# CONFIG_BLK_DEV_FD is not set
@@ -509,7 +530,9 @@ CONFIG_MISC_DEVICES=y
509# 530#
510# CONFIG_EEPROM_AT24 is not set 531# CONFIG_EEPROM_AT24 is not set
511# CONFIG_EEPROM_LEGACY is not set 532# CONFIG_EEPROM_LEGACY is not set
533# CONFIG_EEPROM_MAX6875 is not set
512# CONFIG_EEPROM_93CX6 is not set 534# CONFIG_EEPROM_93CX6 is not set
535# CONFIG_CB710_CORE is not set
513CONFIG_HAVE_IDE=y 536CONFIG_HAVE_IDE=y
514CONFIG_IDE=y 537CONFIG_IDE=y
515 538
@@ -584,14 +607,17 @@ CONFIG_BLK_DEV_IDEDMA=y
584# 607#
585 608
586# 609#
587# Enable only one of the two stacks, unless you know what you are doing 610# You can enable one or both FireWire driver stacks.
611#
612
613#
614# See the help texts for more information.
588# 615#
589# CONFIG_FIREWIRE is not set 616# CONFIG_FIREWIRE is not set
590# CONFIG_IEEE1394 is not set 617# CONFIG_IEEE1394 is not set
591# CONFIG_I2O is not set 618# CONFIG_I2O is not set
592# CONFIG_MACINTOSH_DRIVERS is not set 619# CONFIG_MACINTOSH_DRIVERS is not set
593CONFIG_NETDEVICES=y 620CONFIG_NETDEVICES=y
594CONFIG_COMPAT_NET_DEV_OPS=y
595# CONFIG_DUMMY is not set 621# CONFIG_DUMMY is not set
596# CONFIG_BONDING is not set 622# CONFIG_BONDING is not set
597# CONFIG_MACVLAN is not set 623# CONFIG_MACVLAN is not set
@@ -654,6 +680,7 @@ CONFIG_E100=y
654# CONFIG_SMSC9420 is not set 680# CONFIG_SMSC9420 is not set
655# CONFIG_SUNDANCE is not set 681# CONFIG_SUNDANCE is not set
656# CONFIG_TLAN is not set 682# CONFIG_TLAN is not set
683# CONFIG_KS8842 is not set
657# CONFIG_VIA_RHINE is not set 684# CONFIG_VIA_RHINE is not set
658# CONFIG_SC92031 is not set 685# CONFIG_SC92031 is not set
659# CONFIG_ATL2 is not set 686# CONFIG_ATL2 is not set
@@ -676,8 +703,10 @@ CONFIG_NETDEV_1000=y
676# CONFIG_VIA_VELOCITY is not set 703# CONFIG_VIA_VELOCITY is not set
677# CONFIG_TIGON3 is not set 704# CONFIG_TIGON3 is not set
678# CONFIG_BNX2 is not set 705# CONFIG_BNX2 is not set
706# CONFIG_CNIC is not set
679CONFIG_FSL_PQ_MDIO=y 707CONFIG_FSL_PQ_MDIO=y
680CONFIG_GIANFAR=y 708CONFIG_GIANFAR=y
709# CONFIG_MV643XX_ETH is not set
681# CONFIG_QLA3XXX is not set 710# CONFIG_QLA3XXX is not set
682# CONFIG_ATL1 is not set 711# CONFIG_ATL1 is not set
683# CONFIG_ATL1E is not set 712# CONFIG_ATL1E is not set
@@ -831,6 +860,7 @@ CONFIG_I2C_HELPER_AUTO=y
831# I2C system bus drivers (mostly embedded / system-on-chip) 860# I2C system bus drivers (mostly embedded / system-on-chip)
832# 861#
833# CONFIG_I2C_CPM is not set 862# CONFIG_I2C_CPM is not set
863# CONFIG_I2C_DESIGNWARE is not set
834# CONFIG_I2C_GPIO is not set 864# CONFIG_I2C_GPIO is not set
835CONFIG_I2C_MPC=y 865CONFIG_I2C_MPC=y
836# CONFIG_I2C_OCORES is not set 866# CONFIG_I2C_OCORES is not set
@@ -859,13 +889,17 @@ CONFIG_I2C_MPC=y
859# CONFIG_SENSORS_PCF8574 is not set 889# CONFIG_SENSORS_PCF8574 is not set
860# CONFIG_PCF8575 is not set 890# CONFIG_PCF8575 is not set
861# CONFIG_SENSORS_PCA9539 is not set 891# CONFIG_SENSORS_PCA9539 is not set
862# CONFIG_SENSORS_MAX6875 is not set
863# CONFIG_SENSORS_TSL2550 is not set 892# CONFIG_SENSORS_TSL2550 is not set
864# CONFIG_I2C_DEBUG_CORE is not set 893# CONFIG_I2C_DEBUG_CORE is not set
865# CONFIG_I2C_DEBUG_ALGO is not set 894# CONFIG_I2C_DEBUG_ALGO is not set
866# CONFIG_I2C_DEBUG_BUS is not set 895# CONFIG_I2C_DEBUG_BUS is not set
867# CONFIG_I2C_DEBUG_CHIP is not set 896# CONFIG_I2C_DEBUG_CHIP is not set
868# CONFIG_SPI is not set 897# CONFIG_SPI is not set
898
899#
900# PPS support
901#
902# CONFIG_PPS is not set
869CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 903CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
870CONFIG_ARCH_REQUIRE_GPIOLIB=y 904CONFIG_ARCH_REQUIRE_GPIOLIB=y
871CONFIG_GPIOLIB=y 905CONFIG_GPIOLIB=y
@@ -944,6 +978,7 @@ CONFIG_SENSORS_LM75=y
944# CONFIG_SENSORS_SMSC47B397 is not set 978# CONFIG_SENSORS_SMSC47B397 is not set
945# CONFIG_SENSORS_ADS7828 is not set 979# CONFIG_SENSORS_ADS7828 is not set
946# CONFIG_SENSORS_THMC50 is not set 980# CONFIG_SENSORS_THMC50 is not set
981# CONFIG_SENSORS_TMP401 is not set
947# CONFIG_SENSORS_VIA686A is not set 982# CONFIG_SENSORS_VIA686A is not set
948# CONFIG_SENSORS_VT1211 is not set 983# CONFIG_SENSORS_VT1211 is not set
949# CONFIG_SENSORS_VT8231 is not set 984# CONFIG_SENSORS_VT8231 is not set
@@ -979,23 +1014,9 @@ CONFIG_SSB_POSSIBLE=y
979# CONFIG_MFD_WM8400 is not set 1014# CONFIG_MFD_WM8400 is not set
980# CONFIG_MFD_WM8350_I2C is not set 1015# CONFIG_MFD_WM8350_I2C is not set
981# CONFIG_MFD_PCF50633 is not set 1016# CONFIG_MFD_PCF50633 is not set
1017# CONFIG_AB3100_CORE is not set
982# CONFIG_REGULATOR is not set 1018# CONFIG_REGULATOR is not set
983 1019# CONFIG_MEDIA_SUPPORT is not set
984#
985# Multimedia devices
986#
987
988#
989# Multimedia core support
990#
991# CONFIG_VIDEO_DEV is not set
992# CONFIG_DVB_CORE is not set
993# CONFIG_VIDEO_MEDIA is not set
994
995#
996# Multimedia drivers
997#
998CONFIG_DAB=y
999 1020
1000# 1021#
1001# Graphics support 1022# Graphics support
@@ -1052,6 +1073,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1052# CONFIG_DMADEVICES is not set 1073# CONFIG_DMADEVICES is not set
1053# CONFIG_AUXDISPLAY is not set 1074# CONFIG_AUXDISPLAY is not set
1054# CONFIG_UIO is not set 1075# CONFIG_UIO is not set
1076
1077#
1078# TI VLYNQ
1079#
1055# CONFIG_STAGING is not set 1080# CONFIG_STAGING is not set
1056 1081
1057# 1082#
@@ -1071,10 +1096,12 @@ CONFIG_FS_MBCACHE=y
1071# CONFIG_REISERFS_FS is not set 1096# CONFIG_REISERFS_FS is not set
1072# CONFIG_JFS_FS is not set 1097# CONFIG_JFS_FS is not set
1073# CONFIG_FS_POSIX_ACL is not set 1098# CONFIG_FS_POSIX_ACL is not set
1074CONFIG_FILE_LOCKING=y
1075# CONFIG_XFS_FS is not set 1099# CONFIG_XFS_FS is not set
1100# CONFIG_GFS2_FS is not set
1076# CONFIG_OCFS2_FS is not set 1101# CONFIG_OCFS2_FS is not set
1077# CONFIG_BTRFS_FS is not set 1102# CONFIG_BTRFS_FS is not set
1103CONFIG_FILE_LOCKING=y
1104CONFIG_FSNOTIFY=y
1078CONFIG_DNOTIFY=y 1105CONFIG_DNOTIFY=y
1079CONFIG_INOTIFY=y 1106CONFIG_INOTIFY=y
1080CONFIG_INOTIFY_USER=y 1107CONFIG_INOTIFY_USER=y
@@ -1201,6 +1228,7 @@ CONFIG_HAS_IOPORT=y
1201CONFIG_HAS_DMA=y 1228CONFIG_HAS_DMA=y
1202CONFIG_HAVE_LMB=y 1229CONFIG_HAVE_LMB=y
1203CONFIG_NLATTR=y 1230CONFIG_NLATTR=y
1231CONFIG_GENERIC_ATOMIC64=y
1204 1232
1205# 1233#
1206# Kernel hacking 1234# Kernel hacking
@@ -1226,22 +1254,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1226CONFIG_HAVE_DYNAMIC_FTRACE=y 1254CONFIG_HAVE_DYNAMIC_FTRACE=y
1227CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1255CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1228CONFIG_TRACING_SUPPORT=y 1256CONFIG_TRACING_SUPPORT=y
1229 1257# CONFIG_FTRACE is not set
1230#
1231# Tracers
1232#
1233# CONFIG_FUNCTION_TRACER is not set
1234# CONFIG_SCHED_TRACER is not set
1235# CONFIG_CONTEXT_SWITCH_TRACER is not set
1236# CONFIG_EVENT_TRACER is not set
1237# CONFIG_BOOT_TRACER is not set
1238# CONFIG_TRACE_BRANCH_PROFILING is not set
1239# CONFIG_STACK_TRACER is not set
1240# CONFIG_KMEMTRACE is not set
1241# CONFIG_WORKQUEUE_TRACER is not set
1242# CONFIG_BLK_DEV_IO_TRACE is not set
1243# CONFIG_SAMPLES is not set 1258# CONFIG_SAMPLES is not set
1244CONFIG_HAVE_ARCH_KGDB=y 1259CONFIG_HAVE_ARCH_KGDB=y
1260# CONFIG_PPC_DISABLE_WERROR is not set
1261CONFIG_PPC_WERROR=y
1245CONFIG_PRINT_STACK_DEPTH=64 1262CONFIG_PRINT_STACK_DEPTH=64
1246# CONFIG_IRQSTACKS is not set 1263# CONFIG_IRQSTACKS is not set
1247# CONFIG_PPC_EARLY_DEBUG is not set 1264# CONFIG_PPC_EARLY_DEBUG is not set
diff --git a/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig b/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
index 2552cbefba6..1025da2bf06 100644
--- a/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
+++ b/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc6 3# Linux kernel version: 2.6.31-rc4
4# Thu Jun 11 11:25:17 2009 4# Wed Jul 29 23:32:25 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12CONFIG_PPC_85xx=y 12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -35,15 +35,16 @@ CONFIG_GENERIC_TIME=y
35CONFIG_GENERIC_TIME_VSYSCALL=y 35CONFIG_GENERIC_TIME_VSYSCALL=y
36CONFIG_GENERIC_CLOCKEVENTS=y 36CONFIG_GENERIC_CLOCKEVENTS=y
37CONFIG_GENERIC_HARDIRQS=y 37CONFIG_GENERIC_HARDIRQS=y
38CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 39# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
39CONFIG_IRQ_PER_CPU=y 40CONFIG_IRQ_PER_CPU=y
40CONFIG_STACKTRACE_SUPPORT=y 41CONFIG_STACKTRACE_SUPPORT=y
41CONFIG_HAVE_LATENCYTOP_SUPPORT=y 42CONFIG_HAVE_LATENCYTOP_SUPPORT=y
43CONFIG_TRACE_IRQFLAGS_SUPPORT=y
42CONFIG_LOCKDEP_SUPPORT=y 44CONFIG_LOCKDEP_SUPPORT=y
43CONFIG_RWSEM_XCHGADD_ALGORITHM=y 45CONFIG_RWSEM_XCHGADD_ALGORITHM=y
44CONFIG_ARCH_HAS_ILOG2_U32=y 46CONFIG_ARCH_HAS_ILOG2_U32=y
45CONFIG_GENERIC_HWEIGHT=y 47CONFIG_GENERIC_HWEIGHT=y
46CONFIG_GENERIC_CALIBRATE_DELAY=y
47CONFIG_GENERIC_FIND_NEXT_BIT=y 48CONFIG_GENERIC_FIND_NEXT_BIT=y
48CONFIG_GENERIC_GPIO=y 49CONFIG_GENERIC_GPIO=y
49# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 50# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -64,6 +65,7 @@ CONFIG_DEFAULT_UIMAGE=y
64# CONFIG_PPC_DCR_MMIO is not set 65# CONFIG_PPC_DCR_MMIO is not set
65CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 66CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
66CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 67CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
68CONFIG_CONSTRUCTORS=y
67 69
68# 70#
69# General setup 71# General setup
@@ -114,7 +116,6 @@ CONFIG_SYSCTL_SYSCALL=y
114CONFIG_KALLSYMS=y 116CONFIG_KALLSYMS=y
115CONFIG_KALLSYMS_ALL=y 117CONFIG_KALLSYMS_ALL=y
116CONFIG_KALLSYMS_EXTRA_PASS=y 118CONFIG_KALLSYMS_EXTRA_PASS=y
117# CONFIG_STRIP_ASM_SYMS is not set
118CONFIG_HOTPLUG=y 119CONFIG_HOTPLUG=y
119CONFIG_PRINTK=y 120CONFIG_PRINTK=y
120CONFIG_BUG=y 121CONFIG_BUG=y
@@ -127,9 +128,16 @@ CONFIG_TIMERFD=y
127CONFIG_EVENTFD=y 128CONFIG_EVENTFD=y
128CONFIG_SHMEM=y 129CONFIG_SHMEM=y
129CONFIG_AIO=y 130CONFIG_AIO=y
131CONFIG_HAVE_PERF_COUNTERS=y
132
133#
134# Performance Counters
135#
136# CONFIG_PERF_COUNTERS is not set
130CONFIG_VM_EVENT_COUNTERS=y 137CONFIG_VM_EVENT_COUNTERS=y
131CONFIG_PCI_QUIRKS=y 138CONFIG_PCI_QUIRKS=y
132CONFIG_SLUB_DEBUG=y 139CONFIG_SLUB_DEBUG=y
140# CONFIG_STRIP_ASM_SYMS is not set
133CONFIG_COMPAT_BRK=y 141CONFIG_COMPAT_BRK=y
134# CONFIG_SLAB is not set 142# CONFIG_SLAB is not set
135CONFIG_SLUB=y 143CONFIG_SLUB=y
@@ -144,6 +152,10 @@ CONFIG_HAVE_KPROBES=y
144CONFIG_HAVE_KRETPROBES=y 152CONFIG_HAVE_KRETPROBES=y
145CONFIG_HAVE_ARCH_TRACEHOOK=y 153CONFIG_HAVE_ARCH_TRACEHOOK=y
146CONFIG_USE_GENERIC_SMP_HELPERS=y 154CONFIG_USE_GENERIC_SMP_HELPERS=y
155
156#
157# GCOV-based kernel profiling
158#
147# CONFIG_SLOW_WORK is not set 159# CONFIG_SLOW_WORK is not set
148# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 160# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
149CONFIG_SLABINFO=y 161CONFIG_SLABINFO=y
@@ -157,7 +169,7 @@ CONFIG_MODVERSIONS=y
157# CONFIG_MODULE_SRCVERSION_ALL is not set 169# CONFIG_MODULE_SRCVERSION_ALL is not set
158CONFIG_STOP_MACHINE=y 170CONFIG_STOP_MACHINE=y
159CONFIG_BLOCK=y 171CONFIG_BLOCK=y
160CONFIG_LBD=y 172CONFIG_LBDAF=y
161# CONFIG_BLK_DEV_BSG is not set 173# CONFIG_BLK_DEV_BSG is not set
162# CONFIG_BLK_DEV_INTEGRITY is not set 174# CONFIG_BLK_DEV_INTEGRITY is not set
163 175
@@ -239,6 +251,7 @@ CONFIG_BINFMT_ELF=y
239# CONFIG_BINFMT_MISC is not set 251# CONFIG_BINFMT_MISC is not set
240CONFIG_MATH_EMULATION=y 252CONFIG_MATH_EMULATION=y
241# CONFIG_IOMMU_HELPER is not set 253# CONFIG_IOMMU_HELPER is not set
254# CONFIG_SWIOTLB is not set
242CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 255CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
243CONFIG_ARCH_HAS_WALK_MEMORY=y 256CONFIG_ARCH_HAS_WALK_MEMORY=y
244CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 257CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -258,9 +271,9 @@ CONFIG_MIGRATION=y
258CONFIG_ZONE_DMA_FLAG=1 271CONFIG_ZONE_DMA_FLAG=1
259CONFIG_BOUNCE=y 272CONFIG_BOUNCE=y
260CONFIG_VIRT_TO_BUS=y 273CONFIG_VIRT_TO_BUS=y
261CONFIG_UNEVICTABLE_LRU=y
262CONFIG_HAVE_MLOCK=y 274CONFIG_HAVE_MLOCK=y
263CONFIG_HAVE_MLOCKED_PAGE_BIT=y 275CONFIG_HAVE_MLOCKED_PAGE_BIT=y
276CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
264CONFIG_PPC_4K_PAGES=y 277CONFIG_PPC_4K_PAGES=y
265# CONFIG_PPC_16K_PAGES is not set 278# CONFIG_PPC_16K_PAGES is not set
266# CONFIG_PPC_64K_PAGES is not set 279# CONFIG_PPC_64K_PAGES is not set
@@ -287,6 +300,8 @@ CONFIG_PCI_DOMAINS=y
287CONFIG_PCI_SYSCALL=y 300CONFIG_PCI_SYSCALL=y
288CONFIG_PCIEPORTBUS=y 301CONFIG_PCIEPORTBUS=y
289CONFIG_PCIEAER=y 302CONFIG_PCIEAER=y
303# CONFIG_PCIE_ECRC is not set
304# CONFIG_PCIEAER_INJECT is not set
290# CONFIG_PCIEASPM is not set 305# CONFIG_PCIEASPM is not set
291CONFIG_ARCH_SUPPORTS_MSI=y 306CONFIG_ARCH_SUPPORTS_MSI=y
292CONFIG_PCI_MSI=y 307CONFIG_PCI_MSI=y
@@ -404,6 +419,7 @@ CONFIG_IPV6_NDISC_NODETYPE=y
404# CONFIG_ECONET is not set 419# CONFIG_ECONET is not set
405# CONFIG_WAN_ROUTER is not set 420# CONFIG_WAN_ROUTER is not set
406# CONFIG_PHONET is not set 421# CONFIG_PHONET is not set
422# CONFIG_IEEE802154 is not set
407# CONFIG_NET_SCHED is not set 423# CONFIG_NET_SCHED is not set
408# CONFIG_DCB is not set 424# CONFIG_DCB is not set
409 425
@@ -540,6 +556,7 @@ CONFIG_MTD_NAND_FSL_UPM=y
540CONFIG_OF_DEVICE=y 556CONFIG_OF_DEVICE=y
541CONFIG_OF_GPIO=y 557CONFIG_OF_GPIO=y
542CONFIG_OF_I2C=y 558CONFIG_OF_I2C=y
559CONFIG_OF_MDIO=y
543# CONFIG_PARPORT is not set 560# CONFIG_PARPORT is not set
544CONFIG_BLK_DEV=y 561CONFIG_BLK_DEV=y
545# CONFIG_BLK_DEV_FD is not set 562# CONFIG_BLK_DEV_FD is not set
@@ -575,7 +592,9 @@ CONFIG_MISC_DEVICES=y
575# 592#
576# CONFIG_EEPROM_AT24 is not set 593# CONFIG_EEPROM_AT24 is not set
577# CONFIG_EEPROM_LEGACY is not set 594# CONFIG_EEPROM_LEGACY is not set
595# CONFIG_EEPROM_MAX6875 is not set
578# CONFIG_EEPROM_93CX6 is not set 596# CONFIG_EEPROM_93CX6 is not set
597# CONFIG_CB710_CORE is not set
579CONFIG_HAVE_IDE=y 598CONFIG_HAVE_IDE=y
580# CONFIG_IDE is not set 599# CONFIG_IDE is not set
581 600
@@ -599,10 +618,6 @@ CONFIG_BLK_DEV_SR=y
599# CONFIG_BLK_DEV_SR_VENDOR is not set 618# CONFIG_BLK_DEV_SR_VENDOR is not set
600CONFIG_CHR_DEV_SG=y 619CONFIG_CHR_DEV_SG=y
601# CONFIG_CHR_DEV_SCH is not set 620# CONFIG_CHR_DEV_SCH is not set
602
603#
604# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
605#
606CONFIG_SCSI_MULTI_LUN=y 621CONFIG_SCSI_MULTI_LUN=y
607# CONFIG_SCSI_CONSTANTS is not set 622# CONFIG_SCSI_CONSTANTS is not set
608CONFIG_SCSI_LOGGING=y 623CONFIG_SCSI_LOGGING=y
@@ -619,6 +634,7 @@ CONFIG_SCSI_WAIT_SCAN=m
619# CONFIG_SCSI_SRP_ATTRS is not set 634# CONFIG_SCSI_SRP_ATTRS is not set
620CONFIG_SCSI_LOWLEVEL=y 635CONFIG_SCSI_LOWLEVEL=y
621# CONFIG_ISCSI_TCP is not set 636# CONFIG_ISCSI_TCP is not set
637# CONFIG_SCSI_BNX2_ISCSI is not set
622# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 638# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
623# CONFIG_SCSI_3W_9XXX is not set 639# CONFIG_SCSI_3W_9XXX is not set
624# CONFIG_SCSI_ACARD is not set 640# CONFIG_SCSI_ACARD is not set
@@ -627,6 +643,7 @@ CONFIG_SCSI_LOWLEVEL=y
627# CONFIG_SCSI_AIC7XXX_OLD is not set 643# CONFIG_SCSI_AIC7XXX_OLD is not set
628# CONFIG_SCSI_AIC79XX is not set 644# CONFIG_SCSI_AIC79XX is not set
629# CONFIG_SCSI_AIC94XX is not set 645# CONFIG_SCSI_AIC94XX is not set
646# CONFIG_SCSI_MVSAS is not set
630# CONFIG_SCSI_DPT_I2O is not set 647# CONFIG_SCSI_DPT_I2O is not set
631# CONFIG_SCSI_ADVANSYS is not set 648# CONFIG_SCSI_ADVANSYS is not set
632# CONFIG_SCSI_ARCMSR is not set 649# CONFIG_SCSI_ARCMSR is not set
@@ -646,7 +663,6 @@ CONFIG_SCSI_LOWLEVEL=y
646# CONFIG_SCSI_IPS is not set 663# CONFIG_SCSI_IPS is not set
647# CONFIG_SCSI_INITIO is not set 664# CONFIG_SCSI_INITIO is not set
648# CONFIG_SCSI_INIA100 is not set 665# CONFIG_SCSI_INIA100 is not set
649# CONFIG_SCSI_MVSAS is not set
650# CONFIG_SCSI_STEX is not set 666# CONFIG_SCSI_STEX is not set
651# CONFIG_SCSI_SYM53C8XX_2 is not set 667# CONFIG_SCSI_SYM53C8XX_2 is not set
652# CONFIG_SCSI_IPR is not set 668# CONFIG_SCSI_IPR is not set
@@ -730,14 +746,17 @@ CONFIG_PATA_ALI=y
730# 746#
731 747
732# 748#
733# Enable only one of the two stacks, unless you know what you are doing 749# You can enable one or both FireWire driver stacks.
750#
751
752#
753# See the help texts for more information.
734# 754#
735# CONFIG_FIREWIRE is not set 755# CONFIG_FIREWIRE is not set
736# CONFIG_IEEE1394 is not set 756# CONFIG_IEEE1394 is not set
737# CONFIG_I2O is not set 757# CONFIG_I2O is not set
738# CONFIG_MACINTOSH_DRIVERS is not set 758# CONFIG_MACINTOSH_DRIVERS is not set
739CONFIG_NETDEVICES=y 759CONFIG_NETDEVICES=y
740CONFIG_COMPAT_NET_DEV_OPS=y
741CONFIG_DUMMY=y 760CONFIG_DUMMY=y
742# CONFIG_BONDING is not set 761# CONFIG_BONDING is not set
743# CONFIG_MACVLAN is not set 762# CONFIG_MACVLAN is not set
@@ -784,6 +803,7 @@ CONFIG_MII=y
784# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 803# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
785# CONFIG_NET_PCI is not set 804# CONFIG_NET_PCI is not set
786# CONFIG_B44 is not set 805# CONFIG_B44 is not set
806# CONFIG_KS8842 is not set
787# CONFIG_ATL2 is not set 807# CONFIG_ATL2 is not set
788CONFIG_NETDEV_1000=y 808CONFIG_NETDEV_1000=y
789# CONFIG_ACENIC is not set 809# CONFIG_ACENIC is not set
@@ -803,8 +823,10 @@ CONFIG_E1000=y
803# CONFIG_VIA_VELOCITY is not set 823# CONFIG_VIA_VELOCITY is not set
804# CONFIG_TIGON3 is not set 824# CONFIG_TIGON3 is not set
805# CONFIG_BNX2 is not set 825# CONFIG_BNX2 is not set
826# CONFIG_CNIC is not set
806CONFIG_FSL_PQ_MDIO=y 827CONFIG_FSL_PQ_MDIO=y
807CONFIG_GIANFAR=y 828CONFIG_GIANFAR=y
829# CONFIG_MV643XX_ETH is not set
808# CONFIG_QLA3XXX is not set 830# CONFIG_QLA3XXX is not set
809# CONFIG_ATL1 is not set 831# CONFIG_ATL1 is not set
810# CONFIG_ATL1E is not set 832# CONFIG_ATL1E is not set
@@ -986,13 +1008,17 @@ CONFIG_I2C_MPC=y
986# CONFIG_DS1682 is not set 1008# CONFIG_DS1682 is not set
987# CONFIG_SENSORS_PCF8574 is not set 1009# CONFIG_SENSORS_PCF8574 is not set
988# CONFIG_PCF8575 is not set 1010# CONFIG_PCF8575 is not set
989# CONFIG_SENSORS_MAX6875 is not set
990# CONFIG_SENSORS_TSL2550 is not set 1011# CONFIG_SENSORS_TSL2550 is not set
991# CONFIG_I2C_DEBUG_CORE is not set 1012# CONFIG_I2C_DEBUG_CORE is not set
992# CONFIG_I2C_DEBUG_ALGO is not set 1013# CONFIG_I2C_DEBUG_ALGO is not set
993# CONFIG_I2C_DEBUG_BUS is not set 1014# CONFIG_I2C_DEBUG_BUS is not set
994# CONFIG_I2C_DEBUG_CHIP is not set 1015# CONFIG_I2C_DEBUG_CHIP is not set
995# CONFIG_SPI is not set 1016# CONFIG_SPI is not set
1017
1018#
1019# PPS support
1020#
1021# CONFIG_PPS is not set
996CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 1022CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
997CONFIG_ARCH_REQUIRE_GPIOLIB=y 1023CONFIG_ARCH_REQUIRE_GPIOLIB=y
998CONFIG_GPIOLIB=y 1024CONFIG_GPIOLIB=y
@@ -1072,6 +1098,7 @@ CONFIG_SENSORS_LM90=y
1072# CONFIG_SENSORS_SMSC47B397 is not set 1098# CONFIG_SENSORS_SMSC47B397 is not set
1073# CONFIG_SENSORS_ADS7828 is not set 1099# CONFIG_SENSORS_ADS7828 is not set
1074# CONFIG_SENSORS_THMC50 is not set 1100# CONFIG_SENSORS_THMC50 is not set
1101# CONFIG_SENSORS_TMP401 is not set
1075# CONFIG_SENSORS_VIA686A is not set 1102# CONFIG_SENSORS_VIA686A is not set
1076# CONFIG_SENSORS_VT1211 is not set 1103# CONFIG_SENSORS_VT1211 is not set
1077# CONFIG_SENSORS_VT8231 is not set 1104# CONFIG_SENSORS_VT8231 is not set
@@ -1126,23 +1153,9 @@ CONFIG_SSB_POSSIBLE=y
1126# CONFIG_MFD_WM8400 is not set 1153# CONFIG_MFD_WM8400 is not set
1127# CONFIG_MFD_WM8350_I2C is not set 1154# CONFIG_MFD_WM8350_I2C is not set
1128# CONFIG_MFD_PCF50633 is not set 1155# CONFIG_MFD_PCF50633 is not set
1156# CONFIG_AB3100_CORE is not set
1129# CONFIG_REGULATOR is not set 1157# CONFIG_REGULATOR is not set
1130 1158# CONFIG_MEDIA_SUPPORT is not set
1131#
1132# Multimedia devices
1133#
1134
1135#
1136# Multimedia core support
1137#
1138# CONFIG_VIDEO_DEV is not set
1139# CONFIG_DVB_CORE is not set
1140# CONFIG_VIDEO_MEDIA is not set
1141
1142#
1143# Multimedia drivers
1144#
1145# CONFIG_DAB is not set
1146 1159
1147# 1160#
1148# Graphics support 1161# Graphics support
@@ -1187,7 +1200,7 @@ CONFIG_USB_HID=y
1187# CONFIG_HID_CHERRY is not set 1200# CONFIG_HID_CHERRY is not set
1188# CONFIG_HID_CHICONY is not set 1201# CONFIG_HID_CHICONY is not set
1189# CONFIG_HID_CYPRESS is not set 1202# CONFIG_HID_CYPRESS is not set
1190# CONFIG_DRAGONRISE_FF is not set 1203# CONFIG_HID_DRAGONRISE is not set
1191# CONFIG_HID_EZKEY is not set 1204# CONFIG_HID_EZKEY is not set
1192# CONFIG_HID_KYE is not set 1205# CONFIG_HID_KYE is not set
1193# CONFIG_HID_GYRATION is not set 1206# CONFIG_HID_GYRATION is not set
@@ -1201,10 +1214,11 @@ CONFIG_USB_HID=y
1201# CONFIG_HID_SAMSUNG is not set 1214# CONFIG_HID_SAMSUNG is not set
1202# CONFIG_HID_SONY is not set 1215# CONFIG_HID_SONY is not set
1203# CONFIG_HID_SUNPLUS is not set 1216# CONFIG_HID_SUNPLUS is not set
1204# CONFIG_GREENASIA_FF is not set 1217# CONFIG_HID_GREENASIA is not set
1218# CONFIG_HID_SMARTJOYPLUS is not set
1205# CONFIG_HID_TOPSEED is not set 1219# CONFIG_HID_TOPSEED is not set
1206# CONFIG_THRUSTMASTER_FF is not set 1220# CONFIG_HID_THRUSTMASTER is not set
1207# CONFIG_ZEROPLUS_FF is not set 1221# CONFIG_HID_ZEROPLUS is not set
1208CONFIG_USB_SUPPORT=y 1222CONFIG_USB_SUPPORT=y
1209CONFIG_USB_ARCH_HAS_HCD=y 1223CONFIG_USB_ARCH_HAS_HCD=y
1210CONFIG_USB_ARCH_HAS_OHCI=y 1224CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1230,6 +1244,7 @@ CONFIG_USB_MON=y
1230# USB Host Controller Drivers 1244# USB Host Controller Drivers
1231# 1245#
1232# CONFIG_USB_C67X00_HCD is not set 1246# CONFIG_USB_C67X00_HCD is not set
1247# CONFIG_USB_XHCI_HCD is not set
1233# CONFIG_USB_EHCI_HCD is not set 1248# CONFIG_USB_EHCI_HCD is not set
1234# CONFIG_USB_OXU210HP_HCD is not set 1249# CONFIG_USB_OXU210HP_HCD is not set
1235# CONFIG_USB_ISP116X_HCD is not set 1250# CONFIG_USB_ISP116X_HCD is not set
@@ -1325,7 +1340,7 @@ CONFIG_LEDS_CLASS=y
1325CONFIG_LEDS_GPIO=y 1340CONFIG_LEDS_GPIO=y
1326CONFIG_LEDS_GPIO_PLATFORM=y 1341CONFIG_LEDS_GPIO_PLATFORM=y
1327CONFIG_LEDS_GPIO_OF=y 1342CONFIG_LEDS_GPIO_OF=y
1328# CONFIG_LEDS_LP5521 is not set 1343# CONFIG_LEDS_LP3944 is not set
1329CONFIG_LEDS_PCA955X=y 1344CONFIG_LEDS_PCA955X=y
1330# CONFIG_LEDS_BD2802 is not set 1345# CONFIG_LEDS_BD2802 is not set
1331 1346
@@ -1352,8 +1367,6 @@ CONFIG_EDAC=y
1352# CONFIG_EDAC_DEBUG is not set 1367# CONFIG_EDAC_DEBUG is not set
1353CONFIG_EDAC_MM_EDAC=y 1368CONFIG_EDAC_MM_EDAC=y
1354CONFIG_EDAC_MPC85XX=y 1369CONFIG_EDAC_MPC85XX=y
1355# CONFIG_EDAC_AMD8131 is not set
1356# CONFIG_EDAC_AMD8111 is not set
1357CONFIG_RTC_LIB=y 1370CONFIG_RTC_LIB=y
1358CONFIG_RTC_CLASS=y 1371CONFIG_RTC_CLASS=y
1359CONFIG_RTC_HCTOSYS=y 1372CONFIG_RTC_HCTOSYS=y
@@ -1385,6 +1398,7 @@ CONFIG_RTC_DRV_DS1307=y
1385# CONFIG_RTC_DRV_S35390A is not set 1398# CONFIG_RTC_DRV_S35390A is not set
1386# CONFIG_RTC_DRV_FM3130 is not set 1399# CONFIG_RTC_DRV_FM3130 is not set
1387# CONFIG_RTC_DRV_RX8581 is not set 1400# CONFIG_RTC_DRV_RX8581 is not set
1401# CONFIG_RTC_DRV_RX8025 is not set
1388 1402
1389# 1403#
1390# SPI RTC drivers 1404# SPI RTC drivers
@@ -1425,6 +1439,10 @@ CONFIG_NET_DMA=y
1425# CONFIG_DMATEST is not set 1439# CONFIG_DMATEST is not set
1426# CONFIG_AUXDISPLAY is not set 1440# CONFIG_AUXDISPLAY is not set
1427# CONFIG_UIO is not set 1441# CONFIG_UIO is not set
1442
1443#
1444# TI VLYNQ
1445#
1428# CONFIG_STAGING is not set 1446# CONFIG_STAGING is not set
1429 1447
1430# 1448#
@@ -1444,11 +1462,12 @@ CONFIG_FS_MBCACHE=y
1444# CONFIG_REISERFS_FS is not set 1462# CONFIG_REISERFS_FS is not set
1445# CONFIG_JFS_FS is not set 1463# CONFIG_JFS_FS is not set
1446# CONFIG_FS_POSIX_ACL is not set 1464# CONFIG_FS_POSIX_ACL is not set
1447CONFIG_FILE_LOCKING=y
1448# CONFIG_XFS_FS is not set 1465# CONFIG_XFS_FS is not set
1449# CONFIG_GFS2_FS is not set 1466# CONFIG_GFS2_FS is not set
1450# CONFIG_OCFS2_FS is not set 1467# CONFIG_OCFS2_FS is not set
1451# CONFIG_BTRFS_FS is not set 1468# CONFIG_BTRFS_FS is not set
1469CONFIG_FILE_LOCKING=y
1470CONFIG_FSNOTIFY=y
1452CONFIG_DNOTIFY=y 1471CONFIG_DNOTIFY=y
1453CONFIG_INOTIFY=y 1472CONFIG_INOTIFY=y
1454CONFIG_INOTIFY_USER=y 1473CONFIG_INOTIFY_USER=y
@@ -1629,6 +1648,7 @@ CONFIG_HAS_IOPORT=y
1629CONFIG_HAS_DMA=y 1648CONFIG_HAS_DMA=y
1630CONFIG_HAVE_LMB=y 1649CONFIG_HAVE_LMB=y
1631CONFIG_NLATTR=y 1650CONFIG_NLATTR=y
1651CONFIG_GENERIC_ATOMIC64=y
1632 1652
1633# 1653#
1634# Kernel hacking 1654# Kernel hacking
@@ -1659,6 +1679,9 @@ CONFIG_SCHED_DEBUG=y
1659# CONFIG_RT_MUTEX_TESTER is not set 1679# CONFIG_RT_MUTEX_TESTER is not set
1660# CONFIG_DEBUG_SPINLOCK is not set 1680# CONFIG_DEBUG_SPINLOCK is not set
1661# CONFIG_DEBUG_MUTEXES is not set 1681# CONFIG_DEBUG_MUTEXES is not set
1682# CONFIG_DEBUG_LOCK_ALLOC is not set
1683# CONFIG_PROVE_LOCKING is not set
1684# CONFIG_LOCK_STAT is not set
1662# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1685# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1663# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1686# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1664# CONFIG_DEBUG_KOBJECT is not set 1687# CONFIG_DEBUG_KOBJECT is not set
@@ -1671,7 +1694,6 @@ CONFIG_SCHED_DEBUG=y
1671# CONFIG_DEBUG_LIST is not set 1694# CONFIG_DEBUG_LIST is not set
1672# CONFIG_DEBUG_SG is not set 1695# CONFIG_DEBUG_SG is not set
1673# CONFIG_DEBUG_NOTIFIERS is not set 1696# CONFIG_DEBUG_NOTIFIERS is not set
1674# CONFIG_BOOT_PRINTK_DELAY is not set
1675# CONFIG_RCU_TORTURE_TEST is not set 1697# CONFIG_RCU_TORTURE_TEST is not set
1676# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1698# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1677# CONFIG_BACKTRACE_SELF_TEST is not set 1699# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1685,16 +1707,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1685CONFIG_HAVE_DYNAMIC_FTRACE=y 1707CONFIG_HAVE_DYNAMIC_FTRACE=y
1686CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1708CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1687CONFIG_TRACING_SUPPORT=y 1709CONFIG_TRACING_SUPPORT=y
1688 1710CONFIG_FTRACE=y
1689#
1690# Tracers
1691#
1692# CONFIG_FUNCTION_TRACER is not set 1711# CONFIG_FUNCTION_TRACER is not set
1712# CONFIG_IRQSOFF_TRACER is not set
1693# CONFIG_SCHED_TRACER is not set 1713# CONFIG_SCHED_TRACER is not set
1694# CONFIG_CONTEXT_SWITCH_TRACER is not set 1714# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1695# CONFIG_EVENT_TRACER is not set
1696# CONFIG_BOOT_TRACER is not set 1715# CONFIG_BOOT_TRACER is not set
1697# CONFIG_TRACE_BRANCH_PROFILING is not set 1716CONFIG_BRANCH_PROFILE_NONE=y
1717# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1718# CONFIG_PROFILE_ALL_BRANCHES is not set
1698# CONFIG_STACK_TRACER is not set 1719# CONFIG_STACK_TRACER is not set
1699# CONFIG_KMEMTRACE is not set 1720# CONFIG_KMEMTRACE is not set
1700# CONFIG_WORKQUEUE_TRACER is not set 1721# CONFIG_WORKQUEUE_TRACER is not set
@@ -1702,6 +1723,9 @@ CONFIG_TRACING_SUPPORT=y
1702# CONFIG_SAMPLES is not set 1723# CONFIG_SAMPLES is not set
1703CONFIG_HAVE_ARCH_KGDB=y 1724CONFIG_HAVE_ARCH_KGDB=y
1704# CONFIG_KGDB is not set 1725# CONFIG_KGDB is not set
1726# CONFIG_KMEMCHECK is not set
1727# CONFIG_PPC_DISABLE_WERROR is not set
1728CONFIG_PPC_WERROR=y
1705CONFIG_PRINT_STACK_DEPTH=64 1729CONFIG_PRINT_STACK_DEPTH=64
1706# CONFIG_DEBUG_STACKOVERFLOW is not set 1730# CONFIG_DEBUG_STACKOVERFLOW is not set
1707# CONFIG_DEBUG_STACK_USAGE is not set 1731# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/86xx/gef_ppc9a_defconfig b/arch/powerpc/configs/86xx/gef_ppc9a_defconfig
index b6a23af57f4..527ad1a5e80 100644
--- a/arch/powerpc/configs/86xx/gef_ppc9a_defconfig
+++ b/arch/powerpc/configs/86xx/gef_ppc9a_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:31 2009 4# Wed Jul 29 23:32:31 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_PHYS_64BIT is not set 20# CONFIG_PHYS_64BIT is not set
20CONFIG_ALTIVEC=y 21CONFIG_ALTIVEC=y
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24CONFIG_SMP=y 26CONFIG_SMP=y
25CONFIG_NR_CPUS=2 27CONFIG_NR_CPUS=2
26CONFIG_PPC32=y 28CONFIG_PPC32=y
@@ -32,16 +34,17 @@ CONFIG_GENERIC_TIME=y
32CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
33CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
34CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
35# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
36CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
37CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
38CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
39CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
40CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
41CONFIG_GENERIC_LOCKBREAK=y 45CONFIG_GENERIC_LOCKBREAK=y
42CONFIG_ARCH_HAS_ILOG2_U32=y 46CONFIG_ARCH_HAS_ILOG2_U32=y
43CONFIG_GENERIC_HWEIGHT=y 47CONFIG_GENERIC_HWEIGHT=y
44CONFIG_GENERIC_CALIBRATE_DELAY=y
45CONFIG_GENERIC_FIND_NEXT_BIT=y 48CONFIG_GENERIC_FIND_NEXT_BIT=y
46CONFIG_GENERIC_GPIO=y 49CONFIG_GENERIC_GPIO=y
47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 50# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -56,11 +59,13 @@ CONFIG_PPC_UDBG_16550=y
56CONFIG_GENERIC_TBSYNC=y 59CONFIG_GENERIC_TBSYNC=y
57CONFIG_AUDIT_ARCH=y 60CONFIG_AUDIT_ARCH=y
58CONFIG_GENERIC_BUG=y 61CONFIG_GENERIC_BUG=y
62CONFIG_DTC=y
59CONFIG_DEFAULT_UIMAGE=y 63CONFIG_DEFAULT_UIMAGE=y
60# CONFIG_PPC_DCR_NATIVE is not set 64# CONFIG_PPC_DCR_NATIVE is not set
61# CONFIG_PPC_DCR_MMIO is not set 65# CONFIG_PPC_DCR_MMIO is not set
62CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 66CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
63CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 67CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
68CONFIG_CONSTRUCTORS=y
64 69
65# 70#
66# General setup 71# General setup
@@ -112,9 +117,7 @@ CONFIG_ANON_INODES=y
112CONFIG_EMBEDDED=y 117CONFIG_EMBEDDED=y
113CONFIG_SYSCTL_SYSCALL=y 118CONFIG_SYSCTL_SYSCALL=y
114CONFIG_KALLSYMS=y 119CONFIG_KALLSYMS=y
115# CONFIG_KALLSYMS_ALL is not set
116# CONFIG_KALLSYMS_EXTRA_PASS is not set 120# CONFIG_KALLSYMS_EXTRA_PASS is not set
117# CONFIG_STRIP_ASM_SYMS is not set
118CONFIG_HOTPLUG=y 121CONFIG_HOTPLUG=y
119CONFIG_PRINTK=y 122CONFIG_PRINTK=y
120CONFIG_BUG=y 123CONFIG_BUG=y
@@ -127,8 +130,15 @@ CONFIG_TIMERFD=y
127CONFIG_EVENTFD=y 130CONFIG_EVENTFD=y
128CONFIG_SHMEM=y 131CONFIG_SHMEM=y
129CONFIG_AIO=y 132CONFIG_AIO=y
133CONFIG_HAVE_PERF_COUNTERS=y
134
135#
136# Performance Counters
137#
138# CONFIG_PERF_COUNTERS is not set
130CONFIG_VM_EVENT_COUNTERS=y 139CONFIG_VM_EVENT_COUNTERS=y
131CONFIG_PCI_QUIRKS=y 140CONFIG_PCI_QUIRKS=y
141# CONFIG_STRIP_ASM_SYMS is not set
132CONFIG_COMPAT_BRK=y 142CONFIG_COMPAT_BRK=y
133CONFIG_SLAB=y 143CONFIG_SLAB=y
134# CONFIG_SLUB is not set 144# CONFIG_SLUB is not set
@@ -143,6 +153,10 @@ CONFIG_HAVE_KPROBES=y
143CONFIG_HAVE_KRETPROBES=y 153CONFIG_HAVE_KRETPROBES=y
144CONFIG_HAVE_ARCH_TRACEHOOK=y 154CONFIG_HAVE_ARCH_TRACEHOOK=y
145CONFIG_USE_GENERIC_SMP_HELPERS=y 155CONFIG_USE_GENERIC_SMP_HELPERS=y
156
157#
158# GCOV-based kernel profiling
159#
146# CONFIG_SLOW_WORK is not set 160# CONFIG_SLOW_WORK is not set
147# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 161# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
148CONFIG_SLABINFO=y 162CONFIG_SLABINFO=y
@@ -156,7 +170,7 @@ CONFIG_MODULE_UNLOAD=y
156# CONFIG_MODULE_SRCVERSION_ALL is not set 170# CONFIG_MODULE_SRCVERSION_ALL is not set
157CONFIG_STOP_MACHINE=y 171CONFIG_STOP_MACHINE=y
158CONFIG_BLOCK=y 172CONFIG_BLOCK=y
159# CONFIG_LBD is not set 173CONFIG_LBDAF=y
160# CONFIG_BLK_DEV_BSG is not set 174# CONFIG_BLK_DEV_BSG is not set
161# CONFIG_BLK_DEV_INTEGRITY is not set 175# CONFIG_BLK_DEV_INTEGRITY is not set
162 176
@@ -216,7 +230,7 @@ CONFIG_MPIC=y
216# 230#
217# Kernel options 231# Kernel options
218# 232#
219# CONFIG_HIGHMEM is not set 233CONFIG_HIGHMEM=y
220CONFIG_TICK_ONESHOT=y 234CONFIG_TICK_ONESHOT=y
221# CONFIG_NO_HZ is not set 235# CONFIG_NO_HZ is not set
222CONFIG_HIGH_RES_TIMERS=y 236CONFIG_HIGH_RES_TIMERS=y
@@ -235,6 +249,7 @@ CONFIG_BINFMT_ELF=y
235# CONFIG_HAVE_AOUT is not set 249# CONFIG_HAVE_AOUT is not set
236CONFIG_BINFMT_MISC=m 250CONFIG_BINFMT_MISC=m
237# CONFIG_IOMMU_HELPER is not set 251# CONFIG_IOMMU_HELPER is not set
252# CONFIG_SWIOTLB is not set
238CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 253CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
239CONFIG_ARCH_HAS_WALK_MEMORY=y 254CONFIG_ARCH_HAS_WALK_MEMORY=y
240CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 255CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -256,9 +271,9 @@ CONFIG_MIGRATION=y
256CONFIG_ZONE_DMA_FLAG=1 271CONFIG_ZONE_DMA_FLAG=1
257CONFIG_BOUNCE=y 272CONFIG_BOUNCE=y
258CONFIG_VIRT_TO_BUS=y 273CONFIG_VIRT_TO_BUS=y
259CONFIG_UNEVICTABLE_LRU=y
260CONFIG_HAVE_MLOCK=y 274CONFIG_HAVE_MLOCK=y
261CONFIG_HAVE_MLOCKED_PAGE_BIT=y 275CONFIG_HAVE_MLOCKED_PAGE_BIT=y
276CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
262CONFIG_PPC_4K_PAGES=y 277CONFIG_PPC_4K_PAGES=y
263# CONFIG_PPC_16K_PAGES is not set 278# CONFIG_PPC_16K_PAGES is not set
264# CONFIG_PPC_64K_PAGES is not set 279# CONFIG_PPC_64K_PAGES is not set
@@ -285,14 +300,32 @@ CONFIG_PCI_DOMAINS=y
285CONFIG_PCI_SYSCALL=y 300CONFIG_PCI_SYSCALL=y
286CONFIG_PCIEPORTBUS=y 301CONFIG_PCIEPORTBUS=y
287CONFIG_PCIEAER=y 302CONFIG_PCIEAER=y
303# CONFIG_PCIE_ECRC is not set
304# CONFIG_PCIEAER_INJECT is not set
288# CONFIG_PCIEASPM is not set 305# CONFIG_PCIEASPM is not set
289CONFIG_ARCH_SUPPORTS_MSI=y 306CONFIG_ARCH_SUPPORTS_MSI=y
290# CONFIG_PCI_MSI is not set 307# CONFIG_PCI_MSI is not set
291# CONFIG_PCI_LEGACY is not set 308# CONFIG_PCI_LEGACY is not set
292CONFIG_PCI_DEBUG=y
293# CONFIG_PCI_STUB is not set 309# CONFIG_PCI_STUB is not set
294# CONFIG_PCI_IOV is not set 310# CONFIG_PCI_IOV is not set
295# CONFIG_PCCARD is not set 311CONFIG_PCCARD=y
312# CONFIG_PCMCIA_DEBUG is not set
313CONFIG_PCMCIA=y
314# CONFIG_PCMCIA_LOAD_CIS is not set
315# CONFIG_PCMCIA_IOCTL is not set
316# CONFIG_CARDBUS is not set
317
318#
319# PC-card bridges
320#
321CONFIG_YENTA=y
322# CONFIG_YENTA_O2 is not set
323# CONFIG_YENTA_RICOH is not set
324CONFIG_YENTA_TI=y
325# CONFIG_YENTA_TOSHIBA is not set
326# CONFIG_PD6729 is not set
327# CONFIG_I82092 is not set
328CONFIG_PCCARD_NONSTATIC=y
296# CONFIG_HOTPLUG_PCI is not set 329# CONFIG_HOTPLUG_PCI is not set
297# CONFIG_HAS_RAPIDIO is not set 330# CONFIG_HAS_RAPIDIO is not set
298 331
@@ -353,8 +386,8 @@ CONFIG_INET_XFRM_TUNNEL=m
353CONFIG_INET_TUNNEL=m 386CONFIG_INET_TUNNEL=m
354CONFIG_INET_XFRM_MODE_TRANSPORT=y 387CONFIG_INET_XFRM_MODE_TRANSPORT=y
355CONFIG_INET_XFRM_MODE_TUNNEL=y 388CONFIG_INET_XFRM_MODE_TUNNEL=y
356CONFIG_INET_XFRM_MODE_BEET=y 389# CONFIG_INET_XFRM_MODE_BEET is not set
357# CONFIG_INET_LRO is not set 390CONFIG_INET_LRO=y
358CONFIG_INET_DIAG=y 391CONFIG_INET_DIAG=y
359CONFIG_INET_TCP_DIAG=y 392CONFIG_INET_TCP_DIAG=y
360# CONFIG_TCP_CONG_ADVANCED is not set 393# CONFIG_TCP_CONG_ADVANCED is not set
@@ -380,174 +413,26 @@ CONFIG_IPV6_NDISC_NODETYPE=y
380CONFIG_IPV6_TUNNEL=m 413CONFIG_IPV6_TUNNEL=m
381# CONFIG_IPV6_MULTIPLE_TABLES is not set 414# CONFIG_IPV6_MULTIPLE_TABLES is not set
382# CONFIG_IPV6_MROUTE is not set 415# CONFIG_IPV6_MROUTE is not set
383# CONFIG_NETLABEL is not set
384# CONFIG_NETWORK_SECMARK is not set 416# CONFIG_NETWORK_SECMARK is not set
385CONFIG_NETFILTER=y 417# CONFIG_NETFILTER is not set
386# CONFIG_NETFILTER_DEBUG is not set
387CONFIG_NETFILTER_ADVANCED=y
388CONFIG_BRIDGE_NETFILTER=y
389
390#
391# Core Netfilter Configuration
392#
393# CONFIG_NETFILTER_NETLINK_QUEUE is not set
394# CONFIG_NETFILTER_NETLINK_LOG is not set
395# CONFIG_NF_CONNTRACK is not set
396# CONFIG_NETFILTER_TPROXY is not set
397CONFIG_NETFILTER_XTABLES=m
398# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
399# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
400# CONFIG_NETFILTER_XT_TARGET_HL is not set
401# CONFIG_NETFILTER_XT_TARGET_MARK is not set
402# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
403# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
404# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
405# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
406# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
407# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set
408# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
409# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
410# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
411# CONFIG_NETFILTER_XT_MATCH_ESP is not set
412# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
413CONFIG_NETFILTER_XT_MATCH_HL=m
414# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set
415# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
416# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
417# CONFIG_NETFILTER_XT_MATCH_MAC is not set
418# CONFIG_NETFILTER_XT_MATCH_MARK is not set
419# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
420# CONFIG_NETFILTER_XT_MATCH_OWNER is not set
421# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
422# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
423# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
424# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
425# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
426# CONFIG_NETFILTER_XT_MATCH_REALM is not set
427# CONFIG_NETFILTER_XT_MATCH_RECENT is not set
428# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
429# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
430# CONFIG_NETFILTER_XT_MATCH_STRING is not set
431# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
432# CONFIG_NETFILTER_XT_MATCH_TIME is not set
433# CONFIG_NETFILTER_XT_MATCH_U32 is not set
434# CONFIG_IP_VS is not set
435
436#
437# IP: Netfilter Configuration
438#
439# CONFIG_NF_DEFRAG_IPV4 is not set
440CONFIG_IP_NF_QUEUE=m
441CONFIG_IP_NF_IPTABLES=m
442CONFIG_IP_NF_MATCH_ADDRTYPE=m
443# CONFIG_IP_NF_MATCH_AH is not set
444CONFIG_IP_NF_MATCH_ECN=m
445CONFIG_IP_NF_MATCH_TTL=m
446CONFIG_IP_NF_FILTER=m
447CONFIG_IP_NF_TARGET_REJECT=m
448CONFIG_IP_NF_TARGET_LOG=m
449CONFIG_IP_NF_TARGET_ULOG=m
450CONFIG_IP_NF_MANGLE=m
451CONFIG_IP_NF_TARGET_ECN=m
452# CONFIG_IP_NF_TARGET_TTL is not set
453CONFIG_IP_NF_RAW=m
454# CONFIG_IP_NF_SECURITY is not set
455CONFIG_IP_NF_ARPTABLES=m
456CONFIG_IP_NF_ARPFILTER=m
457CONFIG_IP_NF_ARP_MANGLE=m
458
459#
460# IPv6: Netfilter Configuration
461#
462CONFIG_IP6_NF_QUEUE=m
463CONFIG_IP6_NF_IPTABLES=m
464# CONFIG_IP6_NF_MATCH_AH is not set
465CONFIG_IP6_NF_MATCH_EUI64=m
466CONFIG_IP6_NF_MATCH_FRAG=m
467CONFIG_IP6_NF_MATCH_OPTS=m
468CONFIG_IP6_NF_MATCH_HL=m
469CONFIG_IP6_NF_MATCH_IPV6HEADER=m
470# CONFIG_IP6_NF_MATCH_MH is not set
471CONFIG_IP6_NF_MATCH_RT=m
472# CONFIG_IP6_NF_TARGET_HL is not set
473CONFIG_IP6_NF_TARGET_LOG=m
474CONFIG_IP6_NF_FILTER=m
475# CONFIG_IP6_NF_TARGET_REJECT is not set
476CONFIG_IP6_NF_MANGLE=m
477CONFIG_IP6_NF_RAW=m
478# CONFIG_IP6_NF_SECURITY is not set
479# CONFIG_BRIDGE_NF_EBTABLES is not set
480# CONFIG_IP_DCCP is not set 418# CONFIG_IP_DCCP is not set
481CONFIG_IP_SCTP=m 419# CONFIG_IP_SCTP is not set
482# CONFIG_SCTP_DBG_MSG is not set 420# CONFIG_TIPC is not set
483# CONFIG_SCTP_DBG_OBJCNT is not set 421# CONFIG_ATM is not set
484# CONFIG_SCTP_HMAC_NONE is not set 422# CONFIG_BRIDGE is not set
485# CONFIG_SCTP_HMAC_SHA1 is not set
486CONFIG_SCTP_HMAC_MD5=y
487CONFIG_TIPC=m
488# CONFIG_TIPC_ADVANCED is not set
489# CONFIG_TIPC_DEBUG is not set
490CONFIG_ATM=m
491CONFIG_ATM_CLIP=m
492# CONFIG_ATM_CLIP_NO_ICMP is not set
493CONFIG_ATM_LANE=m
494CONFIG_ATM_MPOA=m
495CONFIG_ATM_BR2684=m
496# CONFIG_ATM_BR2684_IPFILTER is not set
497CONFIG_STP=m
498CONFIG_BRIDGE=m
499# CONFIG_NET_DSA is not set 423# CONFIG_NET_DSA is not set
500CONFIG_VLAN_8021Q=m 424# CONFIG_VLAN_8021Q is not set
501# CONFIG_VLAN_8021Q_GVRP is not set
502# CONFIG_DECNET is not set 425# CONFIG_DECNET is not set
503CONFIG_LLC=m
504# CONFIG_LLC2 is not set 426# CONFIG_LLC2 is not set
505# CONFIG_IPX is not set 427# CONFIG_IPX is not set
506# CONFIG_ATALK is not set 428# CONFIG_ATALK is not set
507# CONFIG_X25 is not set 429# CONFIG_X25 is not set
508# CONFIG_LAPB is not set 430# CONFIG_LAPB is not set
509# CONFIG_ECONET is not set 431# CONFIG_ECONET is not set
510CONFIG_WAN_ROUTER=m 432# CONFIG_WAN_ROUTER is not set
511# CONFIG_PHONET is not set 433# CONFIG_PHONET is not set
512CONFIG_NET_SCHED=y 434# CONFIG_IEEE802154 is not set
513 435# CONFIG_NET_SCHED is not set
514#
515# Queueing/Scheduling
516#
517CONFIG_NET_SCH_CBQ=m
518CONFIG_NET_SCH_HTB=m
519CONFIG_NET_SCH_HFSC=m
520CONFIG_NET_SCH_ATM=m
521CONFIG_NET_SCH_PRIO=m
522# CONFIG_NET_SCH_MULTIQ is not set
523CONFIG_NET_SCH_RED=m
524CONFIG_NET_SCH_SFQ=m
525CONFIG_NET_SCH_TEQL=m
526CONFIG_NET_SCH_TBF=m
527CONFIG_NET_SCH_GRED=m
528CONFIG_NET_SCH_DSMARK=m
529CONFIG_NET_SCH_NETEM=m
530# CONFIG_NET_SCH_DRR is not set
531
532#
533# Classification
534#
535CONFIG_NET_CLS=y
536# CONFIG_NET_CLS_BASIC is not set
537CONFIG_NET_CLS_TCINDEX=m
538CONFIG_NET_CLS_ROUTE4=m
539CONFIG_NET_CLS_ROUTE=y
540CONFIG_NET_CLS_FW=m
541CONFIG_NET_CLS_U32=m
542# CONFIG_CLS_U32_PERF is not set
543# CONFIG_CLS_U32_MARK is not set
544CONFIG_NET_CLS_RSVP=m
545CONFIG_NET_CLS_RSVP6=m
546# CONFIG_NET_CLS_FLOW is not set
547# CONFIG_NET_EMATCH is not set
548# CONFIG_NET_CLS_ACT is not set
549# CONFIG_NET_CLS_IND is not set
550CONFIG_NET_SCH_FIFO=y
551# CONFIG_DCB is not set 436# CONFIG_DCB is not set
552 437
553# 438#
@@ -560,12 +445,7 @@ CONFIG_NET_PKTGEN=m
560# CONFIG_BT is not set 445# CONFIG_BT is not set
561# CONFIG_AF_RXRPC is not set 446# CONFIG_AF_RXRPC is not set
562CONFIG_FIB_RULES=y 447CONFIG_FIB_RULES=y
563CONFIG_WIRELESS=y 448# CONFIG_WIRELESS is not set
564# CONFIG_CFG80211 is not set
565CONFIG_WIRELESS_OLD_REGULATORY=y
566# CONFIG_WIRELESS_EXT is not set
567# CONFIG_LIB80211 is not set
568# CONFIG_MAC80211 is not set
569# CONFIG_WIMAX is not set 449# CONFIG_WIMAX is not set
570# CONFIG_RFKILL is not set 450# CONFIG_RFKILL is not set
571# CONFIG_NET_9P is not set 451# CONFIG_NET_9P is not set
@@ -580,9 +460,9 @@ CONFIG_WIRELESS_OLD_REGULATORY=y
580CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 460CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
581CONFIG_STANDALONE=y 461CONFIG_STANDALONE=y
582CONFIG_PREVENT_FIRMWARE_BUILD=y 462CONFIG_PREVENT_FIRMWARE_BUILD=y
583# CONFIG_FW_LOADER is not set 463CONFIG_FW_LOADER=y
584# CONFIG_DEBUG_DRIVER is not set 464CONFIG_FIRMWARE_IN_KERNEL=y
585# CONFIG_DEBUG_DEVRES is not set 465CONFIG_EXTRA_FIRMWARE=""
586# CONFIG_SYS_HYPERVISOR is not set 466# CONFIG_SYS_HYPERVISOR is not set
587# CONFIG_CONNECTOR is not set 467# CONFIG_CONNECTOR is not set
588CONFIG_MTD=y 468CONFIG_MTD=y
@@ -672,6 +552,7 @@ CONFIG_MTD_PHYSMAP_OF=y
672CONFIG_OF_DEVICE=y 552CONFIG_OF_DEVICE=y
673CONFIG_OF_GPIO=y 553CONFIG_OF_GPIO=y
674CONFIG_OF_I2C=y 554CONFIG_OF_I2C=y
555CONFIG_OF_MDIO=y
675# CONFIG_PARPORT is not set 556# CONFIG_PARPORT is not set
676CONFIG_BLK_DEV=y 557CONFIG_BLK_DEV=y
677# CONFIG_BLK_DEV_FD is not set 558# CONFIG_BLK_DEV_FD is not set
@@ -707,9 +588,60 @@ CONFIG_MISC_DEVICES=y
707# 588#
708# CONFIG_EEPROM_AT24 is not set 589# CONFIG_EEPROM_AT24 is not set
709# CONFIG_EEPROM_LEGACY is not set 590# CONFIG_EEPROM_LEGACY is not set
591# CONFIG_EEPROM_MAX6875 is not set
710# CONFIG_EEPROM_93CX6 is not set 592# CONFIG_EEPROM_93CX6 is not set
593# CONFIG_CB710_CORE is not set
711CONFIG_HAVE_IDE=y 594CONFIG_HAVE_IDE=y
712# CONFIG_IDE is not set 595CONFIG_IDE=y
596
597#
598# Please see Documentation/ide/ide.txt for help/info on IDE drives
599#
600# CONFIG_BLK_DEV_IDE_SATA is not set
601CONFIG_IDE_GD=y
602CONFIG_IDE_GD_ATA=y
603# CONFIG_IDE_GD_ATAPI is not set
604CONFIG_BLK_DEV_IDECS=y
605# CONFIG_BLK_DEV_IDECD is not set
606# CONFIG_BLK_DEV_IDETAPE is not set
607# CONFIG_IDE_TASK_IOCTL is not set
608CONFIG_IDE_PROC_FS=y
609
610#
611# IDE chipset support/bugfixes
612#
613# CONFIG_BLK_DEV_PLATFORM is not set
614
615#
616# PCI IDE chipsets support
617#
618# CONFIG_BLK_DEV_GENERIC is not set
619# CONFIG_BLK_DEV_OPTI621 is not set
620# CONFIG_BLK_DEV_AEC62XX is not set
621# CONFIG_BLK_DEV_ALI15X3 is not set
622# CONFIG_BLK_DEV_AMD74XX is not set
623# CONFIG_BLK_DEV_CMD64X is not set
624# CONFIG_BLK_DEV_TRIFLEX is not set
625# CONFIG_BLK_DEV_CS5520 is not set
626# CONFIG_BLK_DEV_CS5530 is not set
627# CONFIG_BLK_DEV_HPT366 is not set
628# CONFIG_BLK_DEV_JMICRON is not set
629# CONFIG_BLK_DEV_SC1200 is not set
630# CONFIG_BLK_DEV_PIIX is not set
631# CONFIG_BLK_DEV_IT8172 is not set
632# CONFIG_BLK_DEV_IT8213 is not set
633# CONFIG_BLK_DEV_IT821X is not set
634# CONFIG_BLK_DEV_NS87415 is not set
635# CONFIG_BLK_DEV_PDC202XX_OLD is not set
636# CONFIG_BLK_DEV_PDC202XX_NEW is not set
637# CONFIG_BLK_DEV_SVWKS is not set
638# CONFIG_BLK_DEV_SIIMAGE is not set
639# CONFIG_BLK_DEV_SL82C105 is not set
640# CONFIG_BLK_DEV_SLC90E66 is not set
641# CONFIG_BLK_DEV_TRM290 is not set
642# CONFIG_BLK_DEV_VIA82CXXX is not set
643# CONFIG_BLK_DEV_TC86C001 is not set
644# CONFIG_BLK_DEV_IDEDMA is not set
713 645
714# 646#
715# SCSI device support 647# SCSI device support
@@ -731,10 +663,6 @@ CONFIG_BLK_DEV_SR=y
731# CONFIG_BLK_DEV_SR_VENDOR is not set 663# CONFIG_BLK_DEV_SR_VENDOR is not set
732# CONFIG_CHR_DEV_SG is not set 664# CONFIG_CHR_DEV_SG is not set
733# CONFIG_CHR_DEV_SCH is not set 665# CONFIG_CHR_DEV_SCH is not set
734
735#
736# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
737#
738# CONFIG_SCSI_MULTI_LUN is not set 666# CONFIG_SCSI_MULTI_LUN is not set
739# CONFIG_SCSI_CONSTANTS is not set 667# CONFIG_SCSI_CONSTANTS is not set
740# CONFIG_SCSI_LOGGING is not set 668# CONFIG_SCSI_LOGGING is not set
@@ -751,6 +679,7 @@ CONFIG_SCSI_WAIT_SCAN=m
751# CONFIG_SCSI_SRP_ATTRS is not set 679# CONFIG_SCSI_SRP_ATTRS is not set
752CONFIG_SCSI_LOWLEVEL=y 680CONFIG_SCSI_LOWLEVEL=y
753# CONFIG_ISCSI_TCP is not set 681# CONFIG_ISCSI_TCP is not set
682# CONFIG_SCSI_BNX2_ISCSI is not set
754# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 683# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
755# CONFIG_SCSI_3W_9XXX is not set 684# CONFIG_SCSI_3W_9XXX is not set
756# CONFIG_SCSI_ACARD is not set 685# CONFIG_SCSI_ACARD is not set
@@ -759,6 +688,7 @@ CONFIG_SCSI_LOWLEVEL=y
759# CONFIG_SCSI_AIC7XXX_OLD is not set 688# CONFIG_SCSI_AIC7XXX_OLD is not set
760# CONFIG_SCSI_AIC79XX is not set 689# CONFIG_SCSI_AIC79XX is not set
761# CONFIG_SCSI_AIC94XX is not set 690# CONFIG_SCSI_AIC94XX is not set
691# CONFIG_SCSI_MVSAS is not set
762# CONFIG_SCSI_DPT_I2O is not set 692# CONFIG_SCSI_DPT_I2O is not set
763# CONFIG_SCSI_ADVANSYS is not set 693# CONFIG_SCSI_ADVANSYS is not set
764# CONFIG_SCSI_ARCMSR is not set 694# CONFIG_SCSI_ARCMSR is not set
@@ -778,7 +708,6 @@ CONFIG_SCSI_LOWLEVEL=y
778# CONFIG_SCSI_IPS is not set 708# CONFIG_SCSI_IPS is not set
779# CONFIG_SCSI_INITIO is not set 709# CONFIG_SCSI_INITIO is not set
780# CONFIG_SCSI_INIA100 is not set 710# CONFIG_SCSI_INIA100 is not set
781# CONFIG_SCSI_MVSAS is not set
782# CONFIG_SCSI_STEX is not set 711# CONFIG_SCSI_STEX is not set
783# CONFIG_SCSI_SYM53C8XX_2 is not set 712# CONFIG_SCSI_SYM53C8XX_2 is not set
784# CONFIG_SCSI_IPR is not set 713# CONFIG_SCSI_IPR is not set
@@ -791,6 +720,7 @@ CONFIG_SCSI_LOWLEVEL=y
791# CONFIG_SCSI_NSP32 is not set 720# CONFIG_SCSI_NSP32 is not set
792# CONFIG_SCSI_DEBUG is not set 721# CONFIG_SCSI_DEBUG is not set
793# CONFIG_SCSI_SRP is not set 722# CONFIG_SCSI_SRP is not set
723# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
794# CONFIG_SCSI_DH is not set 724# CONFIG_SCSI_DH is not set
795# CONFIG_SCSI_OSD_INITIATOR is not set 725# CONFIG_SCSI_OSD_INITIATOR is not set
796CONFIG_ATA=y 726CONFIG_ATA=y
@@ -842,6 +772,7 @@ CONFIG_SATA_SIL=y
842# CONFIG_PATA_NS87415 is not set 772# CONFIG_PATA_NS87415 is not set
843# CONFIG_PATA_OPTI is not set 773# CONFIG_PATA_OPTI is not set
844# CONFIG_PATA_OPTIDMA is not set 774# CONFIG_PATA_OPTIDMA is not set
775# CONFIG_PATA_PCMCIA is not set
845# CONFIG_PATA_PDC_OLD is not set 776# CONFIG_PATA_PDC_OLD is not set
846# CONFIG_PATA_RADISYS is not set 777# CONFIG_PATA_RADISYS is not set
847# CONFIG_PATA_RZ1000 is not set 778# CONFIG_PATA_RZ1000 is not set
@@ -862,14 +793,17 @@ CONFIG_SATA_SIL=y
862# 793#
863 794
864# 795#
865# Enable only one of the two stacks, unless you know what you are doing 796# You can enable one or both FireWire driver stacks.
797#
798
799#
800# See the help texts for more information.
866# 801#
867# CONFIG_FIREWIRE is not set 802# CONFIG_FIREWIRE is not set
868# CONFIG_IEEE1394 is not set 803# CONFIG_IEEE1394 is not set
869# CONFIG_I2O is not set 804# CONFIG_I2O is not set
870# CONFIG_MACINTOSH_DRIVERS is not set 805# CONFIG_MACINTOSH_DRIVERS is not set
871CONFIG_NETDEVICES=y 806CONFIG_NETDEVICES=y
872CONFIG_COMPAT_NET_DEV_OPS=y
873CONFIG_DUMMY=m 807CONFIG_DUMMY=m
874CONFIG_BONDING=m 808CONFIG_BONDING=m
875# CONFIG_MACVLAN is not set 809# CONFIG_MACVLAN is not set
@@ -916,6 +850,7 @@ CONFIG_MII=y
916# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 850# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
917# CONFIG_NET_PCI is not set 851# CONFIG_NET_PCI is not set
918# CONFIG_B44 is not set 852# CONFIG_B44 is not set
853# CONFIG_KS8842 is not set
919# CONFIG_ATL2 is not set 854# CONFIG_ATL2 is not set
920CONFIG_NETDEV_1000=y 855CONFIG_NETDEV_1000=y
921# CONFIG_ACENIC is not set 856# CONFIG_ACENIC is not set
@@ -935,8 +870,10 @@ CONFIG_NETDEV_1000=y
935# CONFIG_VIA_VELOCITY is not set 870# CONFIG_VIA_VELOCITY is not set
936# CONFIG_TIGON3 is not set 871# CONFIG_TIGON3 is not set
937# CONFIG_BNX2 is not set 872# CONFIG_BNX2 is not set
873# CONFIG_CNIC is not set
938CONFIG_FSL_PQ_MDIO=y 874CONFIG_FSL_PQ_MDIO=y
939CONFIG_GIANFAR=y 875CONFIG_GIANFAR=y
876# CONFIG_MV643XX_ETH is not set
940# CONFIG_QLA3XXX is not set 877# CONFIG_QLA3XXX is not set
941# CONFIG_ATL1 is not set 878# CONFIG_ATL1 is not set
942# CONFIG_ATL1E is not set 879# CONFIG_ATL1E is not set
@@ -963,22 +900,8 @@ CONFIG_GIANFAR=y
963# CONFIG_USB_PEGASUS is not set 900# CONFIG_USB_PEGASUS is not set
964# CONFIG_USB_RTL8150 is not set 901# CONFIG_USB_RTL8150 is not set
965# CONFIG_USB_USBNET is not set 902# CONFIG_USB_USBNET is not set
903# CONFIG_NET_PCMCIA is not set
966# CONFIG_WAN is not set 904# CONFIG_WAN is not set
967CONFIG_ATM_DRIVERS=y
968# CONFIG_ATM_DUMMY is not set
969# CONFIG_ATM_TCP is not set
970# CONFIG_ATM_LANAI is not set
971# CONFIG_ATM_ENI is not set
972# CONFIG_ATM_FIRESTREAM is not set
973# CONFIG_ATM_ZATM is not set
974# CONFIG_ATM_NICSTAR is not set
975# CONFIG_ATM_IDT77252 is not set
976# CONFIG_ATM_AMBASSADOR is not set
977# CONFIG_ATM_HORIZON is not set
978# CONFIG_ATM_IA is not set
979# CONFIG_ATM_FORE200E is not set
980# CONFIG_ATM_HE is not set
981# CONFIG_ATM_SOLOS is not set
982# CONFIG_FDDI is not set 905# CONFIG_FDDI is not set
983# CONFIG_HIPPI is not set 906# CONFIG_HIPPI is not set
984CONFIG_PPP=m 907CONFIG_PPP=m
@@ -990,7 +913,6 @@ CONFIG_PPP_DEFLATE=m
990CONFIG_PPP_BSDCOMP=m 913CONFIG_PPP_BSDCOMP=m
991# CONFIG_PPP_MPPE is not set 914# CONFIG_PPP_MPPE is not set
992CONFIG_PPPOE=m 915CONFIG_PPPOE=m
993CONFIG_PPPOATM=m
994# CONFIG_PPPOL2TP is not set 916# CONFIG_PPPOL2TP is not set
995CONFIG_SLIP=m 917CONFIG_SLIP=m
996CONFIG_SLIP_COMPRESSED=y 918CONFIG_SLIP_COMPRESSED=y
@@ -1010,7 +932,7 @@ CONFIG_NET_POLL_CONTROLLER=y
1010# Input device support 932# Input device support
1011# 933#
1012CONFIG_INPUT=y 934CONFIG_INPUT=y
1013CONFIG_INPUT_FF_MEMLESS=m 935# CONFIG_INPUT_FF_MEMLESS is not set
1014# CONFIG_INPUT_POLLDEV is not set 936# CONFIG_INPUT_POLLDEV is not set
1015 937
1016# 938#
@@ -1058,6 +980,7 @@ CONFIG_DEVKMEM=y
1058CONFIG_SERIAL_8250=y 980CONFIG_SERIAL_8250=y
1059CONFIG_SERIAL_8250_CONSOLE=y 981CONFIG_SERIAL_8250_CONSOLE=y
1060# CONFIG_SERIAL_8250_PCI is not set 982# CONFIG_SERIAL_8250_PCI is not set
983# CONFIG_SERIAL_8250_CS is not set
1061CONFIG_SERIAL_8250_NR_UARTS=2 984CONFIG_SERIAL_8250_NR_UARTS=2
1062CONFIG_SERIAL_8250_RUNTIME_UARTS=2 985CONFIG_SERIAL_8250_RUNTIME_UARTS=2
1063# CONFIG_SERIAL_8250_EXTENDED is not set 986# CONFIG_SERIAL_8250_EXTENDED is not set
@@ -1080,6 +1003,14 @@ CONFIG_HW_RANDOM=y
1080CONFIG_NVRAM=y 1003CONFIG_NVRAM=y
1081# CONFIG_R3964 is not set 1004# CONFIG_R3964 is not set
1082# CONFIG_APPLICOM is not set 1005# CONFIG_APPLICOM is not set
1006
1007#
1008# PCMCIA character devices
1009#
1010# CONFIG_SYNCLINK_CS is not set
1011# CONFIG_CARDMAN_4000 is not set
1012# CONFIG_CARDMAN_4040 is not set
1013# CONFIG_IPWIRELESS is not set
1083# CONFIG_RAW_DRIVER is not set 1014# CONFIG_RAW_DRIVER is not set
1084# CONFIG_TCG_TPM is not set 1015# CONFIG_TCG_TPM is not set
1085CONFIG_DEVPORT=y 1016CONFIG_DEVPORT=y
@@ -1143,18 +1074,21 @@ CONFIG_DS1682=y
1143# CONFIG_SENSORS_PCF8574 is not set 1074# CONFIG_SENSORS_PCF8574 is not set
1144# CONFIG_PCF8575 is not set 1075# CONFIG_PCF8575 is not set
1145# CONFIG_SENSORS_PCA9539 is not set 1076# CONFIG_SENSORS_PCA9539 is not set
1146# CONFIG_SENSORS_MAX6875 is not set
1147# CONFIG_SENSORS_TSL2550 is not set 1077# CONFIG_SENSORS_TSL2550 is not set
1148# CONFIG_I2C_DEBUG_CORE is not set 1078# CONFIG_I2C_DEBUG_CORE is not set
1149# CONFIG_I2C_DEBUG_ALGO is not set 1079# CONFIG_I2C_DEBUG_ALGO is not set
1150# CONFIG_I2C_DEBUG_BUS is not set 1080# CONFIG_I2C_DEBUG_BUS is not set
1151# CONFIG_I2C_DEBUG_CHIP is not set 1081# CONFIG_I2C_DEBUG_CHIP is not set
1152# CONFIG_SPI is not set 1082# CONFIG_SPI is not set
1083
1084#
1085# PPS support
1086#
1087# CONFIG_PPS is not set
1153CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 1088CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
1154CONFIG_ARCH_REQUIRE_GPIOLIB=y 1089CONFIG_ARCH_REQUIRE_GPIOLIB=y
1155CONFIG_GPIOLIB=y 1090CONFIG_GPIOLIB=y
1156# CONFIG_DEBUG_GPIO is not set 1091CONFIG_GPIO_SYSFS=y
1157# CONFIG_GPIO_SYSFS is not set
1158 1092
1159# 1093#
1160# Memory mapped GPIO expanders: 1094# Memory mapped GPIO expanders:
@@ -1229,6 +1163,7 @@ CONFIG_SENSORS_LM92=y
1229# CONFIG_SENSORS_SMSC47B397 is not set 1163# CONFIG_SENSORS_SMSC47B397 is not set
1230# CONFIG_SENSORS_ADS7828 is not set 1164# CONFIG_SENSORS_ADS7828 is not set
1231# CONFIG_SENSORS_THMC50 is not set 1165# CONFIG_SENSORS_THMC50 is not set
1166# CONFIG_SENSORS_TMP401 is not set
1232# CONFIG_SENSORS_VIA686A is not set 1167# CONFIG_SENSORS_VIA686A is not set
1233# CONFIG_SENSORS_VT1211 is not set 1168# CONFIG_SENSORS_VT1211 is not set
1234# CONFIG_SENSORS_VT8231 is not set 1169# CONFIG_SENSORS_VT8231 is not set
@@ -1284,24 +1219,9 @@ CONFIG_SSB_POSSIBLE=y
1284# CONFIG_MFD_WM8400 is not set 1219# CONFIG_MFD_WM8400 is not set
1285# CONFIG_MFD_WM8350_I2C is not set 1220# CONFIG_MFD_WM8350_I2C is not set
1286# CONFIG_MFD_PCF50633 is not set 1221# CONFIG_MFD_PCF50633 is not set
1222# CONFIG_AB3100_CORE is not set
1287# CONFIG_REGULATOR is not set 1223# CONFIG_REGULATOR is not set
1288 1224# CONFIG_MEDIA_SUPPORT is not set
1289#
1290# Multimedia devices
1291#
1292
1293#
1294# Multimedia core support
1295#
1296# CONFIG_VIDEO_DEV is not set
1297# CONFIG_DVB_CORE is not set
1298# CONFIG_VIDEO_MEDIA is not set
1299
1300#
1301# Multimedia drivers
1302#
1303CONFIG_DAB=y
1304# CONFIG_USB_DABUSB is not set
1305 1225
1306# 1226#
1307# Graphics support 1227# Graphics support
@@ -1346,7 +1266,7 @@ CONFIG_HID_BELKIN=y
1346CONFIG_HID_CHERRY=y 1266CONFIG_HID_CHERRY=y
1347CONFIG_HID_CHICONY=y 1267CONFIG_HID_CHICONY=y
1348CONFIG_HID_CYPRESS=y 1268CONFIG_HID_CYPRESS=y
1349# CONFIG_DRAGONRISE_FF is not set 1269# CONFIG_HID_DRAGONRISE is not set
1350CONFIG_HID_EZKEY=y 1270CONFIG_HID_EZKEY=y
1351# CONFIG_HID_KYE is not set 1271# CONFIG_HID_KYE is not set
1352CONFIG_HID_GYRATION=y 1272CONFIG_HID_GYRATION=y
@@ -1363,10 +1283,11 @@ CONFIG_HID_PETALYNX=y
1363CONFIG_HID_SAMSUNG=y 1283CONFIG_HID_SAMSUNG=y
1364CONFIG_HID_SONY=y 1284CONFIG_HID_SONY=y
1365CONFIG_HID_SUNPLUS=y 1285CONFIG_HID_SUNPLUS=y
1366# CONFIG_GREENASIA_FF is not set 1286# CONFIG_HID_GREENASIA is not set
1287# CONFIG_HID_SMARTJOYPLUS is not set
1367# CONFIG_HID_TOPSEED is not set 1288# CONFIG_HID_TOPSEED is not set
1368CONFIG_THRUSTMASTER_FF=m 1289# CONFIG_HID_THRUSTMASTER is not set
1369CONFIG_ZEROPLUS_FF=m 1290# CONFIG_HID_ZEROPLUS is not set
1370CONFIG_USB_SUPPORT=y 1291CONFIG_USB_SUPPORT=y
1371CONFIG_USB_ARCH_HAS_HCD=y 1292CONFIG_USB_ARCH_HAS_HCD=y
1372CONFIG_USB_ARCH_HAS_OHCI=y 1293CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1392,6 +1313,7 @@ CONFIG_USB=y
1392# USB Host Controller Drivers 1313# USB Host Controller Drivers
1393# 1314#
1394# CONFIG_USB_C67X00_HCD is not set 1315# CONFIG_USB_C67X00_HCD is not set
1316# CONFIG_USB_XHCI_HCD is not set
1395CONFIG_USB_EHCI_HCD=y 1317CONFIG_USB_EHCI_HCD=y
1396# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1318# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1397# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1319# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1401,6 +1323,8 @@ CONFIG_USB_EHCI_HCD=y
1401# CONFIG_USB_ISP116X_HCD is not set 1323# CONFIG_USB_ISP116X_HCD is not set
1402# CONFIG_USB_ISP1760_HCD is not set 1324# CONFIG_USB_ISP1760_HCD is not set
1403CONFIG_USB_OHCI_HCD=y 1325CONFIG_USB_OHCI_HCD=y
1326# CONFIG_USB_OHCI_HCD_PPC_OF_BE is not set
1327# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
1404# CONFIG_USB_OHCI_HCD_PPC_OF is not set 1328# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1405# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1329# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1406# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 1330# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1475,7 +1399,6 @@ CONFIG_USB_STORAGE=y
1475# CONFIG_USB_IOWARRIOR is not set 1399# CONFIG_USB_IOWARRIOR is not set
1476# CONFIG_USB_ISIGHTFW is not set 1400# CONFIG_USB_ISIGHTFW is not set
1477# CONFIG_USB_VST is not set 1401# CONFIG_USB_VST is not set
1478# CONFIG_USB_ATM is not set
1479# CONFIG_USB_GADGET is not set 1402# CONFIG_USB_GADGET is not set
1480 1403
1481# 1404#
@@ -1521,6 +1444,7 @@ CONFIG_RTC_INTF_DEV=y
1521# CONFIG_RTC_DRV_S35390A is not set 1444# CONFIG_RTC_DRV_S35390A is not set
1522# CONFIG_RTC_DRV_FM3130 is not set 1445# CONFIG_RTC_DRV_FM3130 is not set
1523CONFIG_RTC_DRV_RX8581=y 1446CONFIG_RTC_DRV_RX8581=y
1447# CONFIG_RTC_DRV_RX8025 is not set
1524 1448
1525# 1449#
1526# SPI RTC drivers 1450# SPI RTC drivers
@@ -1548,6 +1472,10 @@ CONFIG_RTC_DRV_RX8581=y
1548# CONFIG_DMADEVICES is not set 1472# CONFIG_DMADEVICES is not set
1549# CONFIG_AUXDISPLAY is not set 1473# CONFIG_AUXDISPLAY is not set
1550# CONFIG_UIO is not set 1474# CONFIG_UIO is not set
1475
1476#
1477# TI VLYNQ
1478#
1551# CONFIG_STAGING is not set 1479# CONFIG_STAGING is not set
1552 1480
1553# 1481#
@@ -1569,10 +1497,12 @@ CONFIG_FS_MBCACHE=y
1569# CONFIG_REISERFS_FS is not set 1497# CONFIG_REISERFS_FS is not set
1570# CONFIG_JFS_FS is not set 1498# CONFIG_JFS_FS is not set
1571CONFIG_FS_POSIX_ACL=y 1499CONFIG_FS_POSIX_ACL=y
1572CONFIG_FILE_LOCKING=y
1573# CONFIG_XFS_FS is not set 1500# CONFIG_XFS_FS is not set
1501# CONFIG_GFS2_FS is not set
1574# CONFIG_OCFS2_FS is not set 1502# CONFIG_OCFS2_FS is not set
1575# CONFIG_BTRFS_FS is not set 1503# CONFIG_BTRFS_FS is not set
1504CONFIG_FILE_LOCKING=y
1505CONFIG_FSNOTIFY=y
1576CONFIG_DNOTIFY=y 1506CONFIG_DNOTIFY=y
1577CONFIG_INOTIFY=y 1507CONFIG_INOTIFY=y
1578CONFIG_INOTIFY_USER=y 1508CONFIG_INOTIFY_USER=y
@@ -1589,8 +1519,11 @@ CONFIG_INOTIFY_USER=y
1589# 1519#
1590# CD-ROM/DVD Filesystems 1520# CD-ROM/DVD Filesystems
1591# 1521#
1592# CONFIG_ISO9660_FS is not set 1522CONFIG_ISO9660_FS=y
1593# CONFIG_UDF_FS is not set 1523CONFIG_JOLIET=y
1524CONFIG_ZISOFS=y
1525CONFIG_UDF_FS=y
1526CONFIG_UDF_NLS=y
1594 1527
1595# 1528#
1596# DOS/FAT/NT Filesystems 1529# DOS/FAT/NT Filesystems
@@ -1598,8 +1531,8 @@ CONFIG_INOTIFY_USER=y
1598CONFIG_FAT_FS=y 1531CONFIG_FAT_FS=y
1599CONFIG_MSDOS_FS=y 1532CONFIG_MSDOS_FS=y
1600CONFIG_VFAT_FS=y 1533CONFIG_VFAT_FS=y
1601CONFIG_FAT_DEFAULT_CODEPAGE=437 1534CONFIG_FAT_DEFAULT_CODEPAGE=850
1602CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" 1535CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
1603# CONFIG_NTFS_FS is not set 1536# CONFIG_NTFS_FS is not set
1604 1537
1605# 1538#
@@ -1649,6 +1582,7 @@ CONFIG_NFS_FS=y
1649CONFIG_NFS_V3=y 1582CONFIG_NFS_V3=y
1650# CONFIG_NFS_V3_ACL is not set 1583# CONFIG_NFS_V3_ACL is not set
1651CONFIG_NFS_V4=y 1584CONFIG_NFS_V4=y
1585# CONFIG_NFS_V4_1 is not set
1652CONFIG_ROOT_NFS=y 1586CONFIG_ROOT_NFS=y
1653# CONFIG_NFSD is not set 1587# CONFIG_NFSD is not set
1654CONFIG_LOCKD=y 1588CONFIG_LOCKD=y
@@ -1723,13 +1657,13 @@ CONFIG_NLS_UTF8=m
1723# 1657#
1724CONFIG_BITREVERSE=y 1658CONFIG_BITREVERSE=y
1725CONFIG_GENERIC_FIND_LAST_BIT=y 1659CONFIG_GENERIC_FIND_LAST_BIT=y
1726CONFIG_CRC_CCITT=m 1660CONFIG_CRC_CCITT=y
1727# CONFIG_CRC16 is not set 1661# CONFIG_CRC16 is not set
1728# CONFIG_CRC_T10DIF is not set 1662CONFIG_CRC_T10DIF=y
1729# CONFIG_CRC_ITU_T is not set 1663CONFIG_CRC_ITU_T=y
1730CONFIG_CRC32=y 1664CONFIG_CRC32=y
1731# CONFIG_CRC7 is not set 1665# CONFIG_CRC7 is not set
1732CONFIG_LIBCRC32C=m 1666CONFIG_LIBCRC32C=y
1733CONFIG_ZLIB_INFLATE=y 1667CONFIG_ZLIB_INFLATE=y
1734CONFIG_ZLIB_DEFLATE=y 1668CONFIG_ZLIB_DEFLATE=y
1735CONFIG_DECOMPRESS_GZIP=y 1669CONFIG_DECOMPRESS_GZIP=y
@@ -1738,6 +1672,7 @@ CONFIG_HAS_IOPORT=y
1738CONFIG_HAS_DMA=y 1672CONFIG_HAS_DMA=y
1739CONFIG_HAVE_LMB=y 1673CONFIG_HAVE_LMB=y
1740CONFIG_NLATTR=y 1674CONFIG_NLATTR=y
1675CONFIG_GENERIC_ATOMIC64=y
1741 1676
1742# 1677#
1743# Kernel hacking 1678# Kernel hacking
@@ -1750,75 +1685,24 @@ CONFIG_MAGIC_SYSRQ=y
1750# CONFIG_UNUSED_SYMBOLS is not set 1685# CONFIG_UNUSED_SYMBOLS is not set
1751# CONFIG_DEBUG_FS is not set 1686# CONFIG_DEBUG_FS is not set
1752# CONFIG_HEADERS_CHECK is not set 1687# CONFIG_HEADERS_CHECK is not set
1753CONFIG_DEBUG_KERNEL=y 1688# CONFIG_DEBUG_KERNEL is not set
1754# CONFIG_DEBUG_SHIRQ is not set
1755CONFIG_DETECT_SOFTLOCKUP=y
1756# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1757CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1758CONFIG_DETECT_HUNG_TASK=y
1759# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1760CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1761CONFIG_SCHED_DEBUG=y
1762# CONFIG_SCHEDSTATS is not set
1763# CONFIG_TIMER_STATS is not set
1764# CONFIG_DEBUG_OBJECTS is not set
1765# CONFIG_DEBUG_SLAB is not set
1766# CONFIG_DEBUG_RT_MUTEXES is not set
1767# CONFIG_RT_MUTEX_TESTER is not set
1768# CONFIG_DEBUG_SPINLOCK is not set
1769# CONFIG_DEBUG_MUTEXES is not set
1770# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1771# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1772# CONFIG_DEBUG_KOBJECT is not set
1773# CONFIG_DEBUG_BUGVERBOSE is not set 1689# CONFIG_DEBUG_BUGVERBOSE is not set
1774CONFIG_DEBUG_INFO=y
1775# CONFIG_DEBUG_VM is not set
1776# CONFIG_DEBUG_WRITECOUNT is not set
1777# CONFIG_DEBUG_MEMORY_INIT is not set 1690# CONFIG_DEBUG_MEMORY_INIT is not set
1778# CONFIG_DEBUG_LIST is not set
1779# CONFIG_DEBUG_SG is not set
1780# CONFIG_DEBUG_NOTIFIERS is not set
1781# CONFIG_BOOT_PRINTK_DELAY is not set
1782# CONFIG_RCU_TORTURE_TEST is not set
1783# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1691# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1784# CONFIG_BACKTRACE_SELF_TEST is not set
1785# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1786# CONFIG_FAULT_INJECTION is not set
1787# CONFIG_LATENCYTOP is not set 1692# CONFIG_LATENCYTOP is not set
1788CONFIG_SYSCTL_SYSCALL_CHECK=y 1693CONFIG_SYSCTL_SYSCALL_CHECK=y
1789# CONFIG_DEBUG_PAGEALLOC is not set
1790CONFIG_HAVE_FUNCTION_TRACER=y 1694CONFIG_HAVE_FUNCTION_TRACER=y
1791CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y 1695CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1792CONFIG_HAVE_DYNAMIC_FTRACE=y 1696CONFIG_HAVE_DYNAMIC_FTRACE=y
1793CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1697CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1794CONFIG_TRACING_SUPPORT=y 1698CONFIG_TRACING_SUPPORT=y
1795 1699# CONFIG_FTRACE is not set
1796#
1797# Tracers
1798#
1799# CONFIG_FUNCTION_TRACER is not set
1800# CONFIG_PREEMPT_TRACER is not set
1801# CONFIG_SCHED_TRACER is not set
1802# CONFIG_CONTEXT_SWITCH_TRACER is not set
1803# CONFIG_EVENT_TRACER is not set
1804# CONFIG_BOOT_TRACER is not set
1805# CONFIG_TRACE_BRANCH_PROFILING is not set
1806# CONFIG_STACK_TRACER is not set
1807# CONFIG_KMEMTRACE is not set
1808# CONFIG_WORKQUEUE_TRACER is not set
1809# CONFIG_BLK_DEV_IO_TRACE is not set
1810# CONFIG_SAMPLES is not set 1700# CONFIG_SAMPLES is not set
1811CONFIG_HAVE_ARCH_KGDB=y 1701CONFIG_HAVE_ARCH_KGDB=y
1812# CONFIG_KGDB is not set 1702# CONFIG_PPC_DISABLE_WERROR is not set
1703CONFIG_PPC_WERROR=y
1813CONFIG_PRINT_STACK_DEPTH=64 1704CONFIG_PRINT_STACK_DEPTH=64
1814# CONFIG_DEBUG_STACKOVERFLOW is not set
1815# CONFIG_DEBUG_STACK_USAGE is not set
1816# CONFIG_CODE_PATCHING_SELFTEST is not set
1817# CONFIG_FTR_FIXUP_SELFTEST is not set
1818# CONFIG_MSI_BITMAP_SELFTEST is not set
1819# CONFIG_XMON is not set
1820# CONFIG_IRQSTACKS is not set 1705# CONFIG_IRQSTACKS is not set
1821# CONFIG_BDI_SWITCH is not set
1822# CONFIG_BOOTX_TEXT is not set 1706# CONFIG_BOOTX_TEXT is not set
1823# CONFIG_PPC_EARLY_DEBUG is not set 1707# CONFIG_PPC_EARLY_DEBUG is not set
1824 1708
@@ -1826,15 +1710,9 @@ CONFIG_PRINT_STACK_DEPTH=64
1826# Security options 1710# Security options
1827# 1711#
1828# CONFIG_KEYS is not set 1712# CONFIG_KEYS is not set
1829CONFIG_SECURITY=y 1713# CONFIG_SECURITY is not set
1830# CONFIG_SECURITYFS is not set 1714# CONFIG_SECURITYFS is not set
1831CONFIG_SECURITY_NETWORK=y
1832# CONFIG_SECURITY_NETWORK_XFRM is not set
1833# CONFIG_SECURITY_PATH is not set
1834# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1715# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1835# CONFIG_SECURITY_ROOTPLUG is not set
1836CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
1837# CONFIG_SECURITY_TOMOYO is not set
1838CONFIG_CRYPTO=y 1716CONFIG_CRYPTO=y
1839 1717
1840# 1718#
@@ -1854,11 +1732,11 @@ CONFIG_CRYPTO_PCOMP=y
1854CONFIG_CRYPTO_MANAGER=y 1732CONFIG_CRYPTO_MANAGER=y
1855CONFIG_CRYPTO_MANAGER2=y 1733CONFIG_CRYPTO_MANAGER2=y
1856# CONFIG_CRYPTO_GF128MUL is not set 1734# CONFIG_CRYPTO_GF128MUL is not set
1857CONFIG_CRYPTO_NULL=m 1735# CONFIG_CRYPTO_NULL is not set
1858CONFIG_CRYPTO_WORKQUEUE=y 1736CONFIG_CRYPTO_WORKQUEUE=y
1859# CONFIG_CRYPTO_CRYPTD is not set 1737# CONFIG_CRYPTO_CRYPTD is not set
1860CONFIG_CRYPTO_AUTHENC=m 1738CONFIG_CRYPTO_AUTHENC=m
1861CONFIG_CRYPTO_TEST=m 1739# CONFIG_CRYPTO_TEST is not set
1862 1740
1863# 1741#
1864# Authenticated Encryption with Associated Data 1742# Authenticated Encryption with Associated Data
@@ -1873,53 +1751,52 @@ CONFIG_CRYPTO_TEST=m
1873CONFIG_CRYPTO_CBC=y 1751CONFIG_CRYPTO_CBC=y
1874# CONFIG_CRYPTO_CTR is not set 1752# CONFIG_CRYPTO_CTR is not set
1875# CONFIG_CRYPTO_CTS is not set 1753# CONFIG_CRYPTO_CTS is not set
1876CONFIG_CRYPTO_ECB=m 1754# CONFIG_CRYPTO_ECB is not set
1877# CONFIG_CRYPTO_LRW is not set 1755# CONFIG_CRYPTO_LRW is not set
1878CONFIG_CRYPTO_PCBC=m 1756# CONFIG_CRYPTO_PCBC is not set
1879# CONFIG_CRYPTO_XTS is not set 1757# CONFIG_CRYPTO_XTS is not set
1880 1758
1881# 1759#
1882# Hash modes 1760# Hash modes
1883# 1761#
1884CONFIG_CRYPTO_HMAC=y 1762CONFIG_CRYPTO_HMAC=m
1885# CONFIG_CRYPTO_XCBC is not set 1763# CONFIG_CRYPTO_XCBC is not set
1886 1764
1887# 1765#
1888# Digest 1766# Digest
1889# 1767#
1890CONFIG_CRYPTO_CRC32C=m 1768CONFIG_CRYPTO_CRC32C=y
1891CONFIG_CRYPTO_MD4=m 1769# CONFIG_CRYPTO_MD4 is not set
1892CONFIG_CRYPTO_MD5=y 1770CONFIG_CRYPTO_MD5=y
1893CONFIG_CRYPTO_MICHAEL_MIC=m 1771# CONFIG_CRYPTO_MICHAEL_MIC is not set
1894# CONFIG_CRYPTO_RMD128 is not set 1772# CONFIG_CRYPTO_RMD128 is not set
1895# CONFIG_CRYPTO_RMD160 is not set 1773# CONFIG_CRYPTO_RMD160 is not set
1896# CONFIG_CRYPTO_RMD256 is not set 1774# CONFIG_CRYPTO_RMD256 is not set
1897# CONFIG_CRYPTO_RMD320 is not set 1775# CONFIG_CRYPTO_RMD320 is not set
1898CONFIG_CRYPTO_SHA1=m 1776CONFIG_CRYPTO_SHA1=m
1899CONFIG_CRYPTO_SHA256=m 1777# CONFIG_CRYPTO_SHA256 is not set
1900CONFIG_CRYPTO_SHA512=m 1778# CONFIG_CRYPTO_SHA512 is not set
1901# CONFIG_CRYPTO_TGR192 is not set 1779# CONFIG_CRYPTO_TGR192 is not set
1902CONFIG_CRYPTO_WP512=m 1780# CONFIG_CRYPTO_WP512 is not set
1903 1781
1904# 1782#
1905# Ciphers 1783# Ciphers
1906# 1784#
1907CONFIG_CRYPTO_AES=m 1785# CONFIG_CRYPTO_AES is not set
1908CONFIG_CRYPTO_ANUBIS=m 1786# CONFIG_CRYPTO_ANUBIS is not set
1909CONFIG_CRYPTO_ARC4=m 1787# CONFIG_CRYPTO_ARC4 is not set
1910CONFIG_CRYPTO_BLOWFISH=m 1788# CONFIG_CRYPTO_BLOWFISH is not set
1911# CONFIG_CRYPTO_CAMELLIA is not set 1789# CONFIG_CRYPTO_CAMELLIA is not set
1912CONFIG_CRYPTO_CAST5=m 1790# CONFIG_CRYPTO_CAST5 is not set
1913CONFIG_CRYPTO_CAST6=m 1791# CONFIG_CRYPTO_CAST6 is not set
1914CONFIG_CRYPTO_DES=y 1792CONFIG_CRYPTO_DES=y
1915# CONFIG_CRYPTO_FCRYPT is not set 1793# CONFIG_CRYPTO_FCRYPT is not set
1916CONFIG_CRYPTO_KHAZAD=m 1794# CONFIG_CRYPTO_KHAZAD is not set
1917# CONFIG_CRYPTO_SALSA20 is not set 1795# CONFIG_CRYPTO_SALSA20 is not set
1918# CONFIG_CRYPTO_SEED is not set 1796# CONFIG_CRYPTO_SEED is not set
1919CONFIG_CRYPTO_SERPENT=m 1797# CONFIG_CRYPTO_SERPENT is not set
1920CONFIG_CRYPTO_TEA=m 1798# CONFIG_CRYPTO_TEA is not set
1921CONFIG_CRYPTO_TWOFISH=m 1799# CONFIG_CRYPTO_TWOFISH is not set
1922CONFIG_CRYPTO_TWOFISH_COMMON=m
1923 1800
1924# 1801#
1925# Compression 1802# Compression
diff --git a/arch/powerpc/configs/86xx/gef_sbc310_defconfig b/arch/powerpc/configs/86xx/gef_sbc310_defconfig
index a66910e6334..cd338d493be 100644
--- a/arch/powerpc/configs/86xx/gef_sbc310_defconfig
+++ b/arch/powerpc/configs/86xx/gef_sbc310_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:29 2009 4# Wed Jul 29 23:32:29 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_PHYS_64BIT is not set 20# CONFIG_PHYS_64BIT is not set
20CONFIG_ALTIVEC=y 21CONFIG_ALTIVEC=y
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24CONFIG_SMP=y 26CONFIG_SMP=y
25CONFIG_NR_CPUS=2 27CONFIG_NR_CPUS=2
26CONFIG_PPC32=y 28CONFIG_PPC32=y
@@ -32,16 +34,17 @@ CONFIG_GENERIC_TIME=y
32CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
33CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
34CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
35# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
36CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
37CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
38CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
39CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
40CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
41CONFIG_GENERIC_LOCKBREAK=y 45CONFIG_GENERIC_LOCKBREAK=y
42CONFIG_ARCH_HAS_ILOG2_U32=y 46CONFIG_ARCH_HAS_ILOG2_U32=y
43CONFIG_GENERIC_HWEIGHT=y 47CONFIG_GENERIC_HWEIGHT=y
44CONFIG_GENERIC_CALIBRATE_DELAY=y
45CONFIG_GENERIC_FIND_NEXT_BIT=y 48CONFIG_GENERIC_FIND_NEXT_BIT=y
46CONFIG_GENERIC_GPIO=y 49CONFIG_GENERIC_GPIO=y
47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 50# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -56,11 +59,13 @@ CONFIG_PPC_UDBG_16550=y
56CONFIG_GENERIC_TBSYNC=y 59CONFIG_GENERIC_TBSYNC=y
57CONFIG_AUDIT_ARCH=y 60CONFIG_AUDIT_ARCH=y
58CONFIG_GENERIC_BUG=y 61CONFIG_GENERIC_BUG=y
62CONFIG_DTC=y
59CONFIG_DEFAULT_UIMAGE=y 63CONFIG_DEFAULT_UIMAGE=y
60# CONFIG_PPC_DCR_NATIVE is not set 64# CONFIG_PPC_DCR_NATIVE is not set
61# CONFIG_PPC_DCR_MMIO is not set 65# CONFIG_PPC_DCR_MMIO is not set
62CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 66CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
63CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 67CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
68CONFIG_CONSTRUCTORS=y
64 69
65# 70#
66# General setup 71# General setup
@@ -91,7 +96,11 @@ CONFIG_CLASSIC_RCU=y
91CONFIG_IKCONFIG=y 96CONFIG_IKCONFIG=y
92CONFIG_IKCONFIG_PROC=y 97CONFIG_IKCONFIG_PROC=y
93CONFIG_LOG_BUF_SHIFT=14 98CONFIG_LOG_BUF_SHIFT=14
94# CONFIG_GROUP_SCHED is not set 99CONFIG_GROUP_SCHED=y
100CONFIG_FAIR_GROUP_SCHED=y
101# CONFIG_RT_GROUP_SCHED is not set
102CONFIG_USER_SCHED=y
103# CONFIG_CGROUP_SCHED is not set
95# CONFIG_CGROUPS is not set 104# CONFIG_CGROUPS is not set
96CONFIG_SYSFS_DEPRECATED=y 105CONFIG_SYSFS_DEPRECATED=y
97CONFIG_SYSFS_DEPRECATED_V2=y 106CONFIG_SYSFS_DEPRECATED_V2=y
@@ -109,7 +118,6 @@ CONFIG_EMBEDDED=y
109CONFIG_SYSCTL_SYSCALL=y 118CONFIG_SYSCTL_SYSCALL=y
110CONFIG_KALLSYMS=y 119CONFIG_KALLSYMS=y
111# CONFIG_KALLSYMS_EXTRA_PASS is not set 120# CONFIG_KALLSYMS_EXTRA_PASS is not set
112# CONFIG_STRIP_ASM_SYMS is not set
113CONFIG_HOTPLUG=y 121CONFIG_HOTPLUG=y
114CONFIG_PRINTK=y 122CONFIG_PRINTK=y
115CONFIG_BUG=y 123CONFIG_BUG=y
@@ -122,8 +130,15 @@ CONFIG_TIMERFD=y
122CONFIG_EVENTFD=y 130CONFIG_EVENTFD=y
123CONFIG_SHMEM=y 131CONFIG_SHMEM=y
124CONFIG_AIO=y 132CONFIG_AIO=y
133CONFIG_HAVE_PERF_COUNTERS=y
134
135#
136# Performance Counters
137#
138# CONFIG_PERF_COUNTERS is not set
125CONFIG_VM_EVENT_COUNTERS=y 139CONFIG_VM_EVENT_COUNTERS=y
126CONFIG_PCI_QUIRKS=y 140CONFIG_PCI_QUIRKS=y
141# CONFIG_STRIP_ASM_SYMS is not set
127CONFIG_COMPAT_BRK=y 142CONFIG_COMPAT_BRK=y
128CONFIG_SLAB=y 143CONFIG_SLAB=y
129# CONFIG_SLUB is not set 144# CONFIG_SLUB is not set
@@ -138,6 +153,10 @@ CONFIG_HAVE_KPROBES=y
138CONFIG_HAVE_KRETPROBES=y 153CONFIG_HAVE_KRETPROBES=y
139CONFIG_HAVE_ARCH_TRACEHOOK=y 154CONFIG_HAVE_ARCH_TRACEHOOK=y
140CONFIG_USE_GENERIC_SMP_HELPERS=y 155CONFIG_USE_GENERIC_SMP_HELPERS=y
156
157#
158# GCOV-based kernel profiling
159#
141# CONFIG_SLOW_WORK is not set 160# CONFIG_SLOW_WORK is not set
142# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 161# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
143CONFIG_SLABINFO=y 162CONFIG_SLABINFO=y
@@ -151,7 +170,7 @@ CONFIG_MODULE_UNLOAD=y
151# CONFIG_MODULE_SRCVERSION_ALL is not set 170# CONFIG_MODULE_SRCVERSION_ALL is not set
152CONFIG_STOP_MACHINE=y 171CONFIG_STOP_MACHINE=y
153CONFIG_BLOCK=y 172CONFIG_BLOCK=y
154# CONFIG_LBD is not set 173CONFIG_LBDAF=y
155# CONFIG_BLK_DEV_BSG is not set 174# CONFIG_BLK_DEV_BSG is not set
156# CONFIG_BLK_DEV_INTEGRITY is not set 175# CONFIG_BLK_DEV_INTEGRITY is not set
157 176
@@ -168,7 +187,6 @@ CONFIG_DEFAULT_CFQ=y
168# CONFIG_DEFAULT_NOOP is not set 187# CONFIG_DEFAULT_NOOP is not set
169CONFIG_DEFAULT_IOSCHED="cfq" 188CONFIG_DEFAULT_IOSCHED="cfq"
170# CONFIG_FREEZER is not set 189# CONFIG_FREEZER is not set
171CONFIG_PPC_MSI_BITMAP=y
172 190
173# 191#
174# Platform support 192# Platform support
@@ -212,7 +230,7 @@ CONFIG_MPIC=y
212# 230#
213# Kernel options 231# Kernel options
214# 232#
215# CONFIG_HIGHMEM is not set 233CONFIG_HIGHMEM=y
216CONFIG_TICK_ONESHOT=y 234CONFIG_TICK_ONESHOT=y
217# CONFIG_NO_HZ is not set 235# CONFIG_NO_HZ is not set
218CONFIG_HIGH_RES_TIMERS=y 236CONFIG_HIGH_RES_TIMERS=y
@@ -231,6 +249,7 @@ CONFIG_BINFMT_ELF=y
231# CONFIG_HAVE_AOUT is not set 249# CONFIG_HAVE_AOUT is not set
232CONFIG_BINFMT_MISC=y 250CONFIG_BINFMT_MISC=y
233# CONFIG_IOMMU_HELPER is not set 251# CONFIG_IOMMU_HELPER is not set
252# CONFIG_SWIOTLB is not set
234CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 253CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
235CONFIG_ARCH_HAS_WALK_MEMORY=y 254CONFIG_ARCH_HAS_WALK_MEMORY=y
236CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 255CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -252,9 +271,9 @@ CONFIG_MIGRATION=y
252CONFIG_ZONE_DMA_FLAG=1 271CONFIG_ZONE_DMA_FLAG=1
253CONFIG_BOUNCE=y 272CONFIG_BOUNCE=y
254CONFIG_VIRT_TO_BUS=y 273CONFIG_VIRT_TO_BUS=y
255CONFIG_UNEVICTABLE_LRU=y
256CONFIG_HAVE_MLOCK=y 274CONFIG_HAVE_MLOCK=y
257CONFIG_HAVE_MLOCKED_PAGE_BIT=y 275CONFIG_HAVE_MLOCKED_PAGE_BIT=y
276CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
258CONFIG_PPC_4K_PAGES=y 277CONFIG_PPC_4K_PAGES=y
259# CONFIG_PPC_16K_PAGES is not set 278# CONFIG_PPC_16K_PAGES is not set
260# CONFIG_PPC_64K_PAGES is not set 279# CONFIG_PPC_64K_PAGES is not set
@@ -281,13 +300,32 @@ CONFIG_PCI_DOMAINS=y
281CONFIG_PCI_SYSCALL=y 300CONFIG_PCI_SYSCALL=y
282CONFIG_PCIEPORTBUS=y 301CONFIG_PCIEPORTBUS=y
283CONFIG_PCIEAER=y 302CONFIG_PCIEAER=y
303# CONFIG_PCIE_ECRC is not set
304# CONFIG_PCIEAER_INJECT is not set
284# CONFIG_PCIEASPM is not set 305# CONFIG_PCIEASPM is not set
285CONFIG_ARCH_SUPPORTS_MSI=y 306CONFIG_ARCH_SUPPORTS_MSI=y
286CONFIG_PCI_MSI=y 307# CONFIG_PCI_MSI is not set
287# CONFIG_PCI_LEGACY is not set 308# CONFIG_PCI_LEGACY is not set
288# CONFIG_PCI_STUB is not set 309# CONFIG_PCI_STUB is not set
289# CONFIG_PCI_IOV is not set 310# CONFIG_PCI_IOV is not set
290# CONFIG_PCCARD is not set 311CONFIG_PCCARD=y
312# CONFIG_PCMCIA_DEBUG is not set
313CONFIG_PCMCIA=y
314# CONFIG_PCMCIA_LOAD_CIS is not set
315# CONFIG_PCMCIA_IOCTL is not set
316# CONFIG_CARDBUS is not set
317
318#
319# PC-card bridges
320#
321CONFIG_YENTA=y
322# CONFIG_YENTA_O2 is not set
323# CONFIG_YENTA_RICOH is not set
324CONFIG_YENTA_TI=y
325# CONFIG_YENTA_TOSHIBA is not set
326# CONFIG_PD6729 is not set
327# CONFIG_I82092 is not set
328CONFIG_PCCARD_NONSTATIC=y
291# CONFIG_HOTPLUG_PCI is not set 329# CONFIG_HOTPLUG_PCI is not set
292# CONFIG_HAS_RAPIDIO is not set 330# CONFIG_HAS_RAPIDIO is not set
293 331
@@ -393,6 +431,7 @@ CONFIG_IPV6_TUNNEL=m
393# CONFIG_ECONET is not set 431# CONFIG_ECONET is not set
394# CONFIG_WAN_ROUTER is not set 432# CONFIG_WAN_ROUTER is not set
395# CONFIG_PHONET is not set 433# CONFIG_PHONET is not set
434# CONFIG_IEEE802154 is not set
396# CONFIG_NET_SCHED is not set 435# CONFIG_NET_SCHED is not set
397# CONFIG_DCB is not set 436# CONFIG_DCB is not set
398 437
@@ -421,7 +460,9 @@ CONFIG_FIB_RULES=y
421CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 460CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
422CONFIG_STANDALONE=y 461CONFIG_STANDALONE=y
423CONFIG_PREVENT_FIRMWARE_BUILD=y 462CONFIG_PREVENT_FIRMWARE_BUILD=y
424# CONFIG_FW_LOADER is not set 463CONFIG_FW_LOADER=y
464CONFIG_FIRMWARE_IN_KERNEL=y
465CONFIG_EXTRA_FIRMWARE=""
425# CONFIG_SYS_HYPERVISOR is not set 466# CONFIG_SYS_HYPERVISOR is not set
426# CONFIG_CONNECTOR is not set 467# CONFIG_CONNECTOR is not set
427CONFIG_MTD=y 468CONFIG_MTD=y
@@ -511,6 +552,7 @@ CONFIG_MTD_PHYSMAP_OF=y
511CONFIG_OF_DEVICE=y 552CONFIG_OF_DEVICE=y
512CONFIG_OF_GPIO=y 553CONFIG_OF_GPIO=y
513CONFIG_OF_I2C=y 554CONFIG_OF_I2C=y
555CONFIG_OF_MDIO=y
514# CONFIG_PARPORT is not set 556# CONFIG_PARPORT is not set
515CONFIG_BLK_DEV=y 557CONFIG_BLK_DEV=y
516# CONFIG_BLK_DEV_FD is not set 558# CONFIG_BLK_DEV_FD is not set
@@ -546,9 +588,60 @@ CONFIG_MISC_DEVICES=y
546# 588#
547# CONFIG_EEPROM_AT24 is not set 589# CONFIG_EEPROM_AT24 is not set
548# CONFIG_EEPROM_LEGACY is not set 590# CONFIG_EEPROM_LEGACY is not set
591# CONFIG_EEPROM_MAX6875 is not set
549# CONFIG_EEPROM_93CX6 is not set 592# CONFIG_EEPROM_93CX6 is not set
593# CONFIG_CB710_CORE is not set
550CONFIG_HAVE_IDE=y 594CONFIG_HAVE_IDE=y
551# CONFIG_IDE is not set 595CONFIG_IDE=y
596
597#
598# Please see Documentation/ide/ide.txt for help/info on IDE drives
599#
600# CONFIG_BLK_DEV_IDE_SATA is not set
601CONFIG_IDE_GD=y
602CONFIG_IDE_GD_ATA=y
603# CONFIG_IDE_GD_ATAPI is not set
604CONFIG_BLK_DEV_IDECS=y
605# CONFIG_BLK_DEV_IDECD is not set
606# CONFIG_BLK_DEV_IDETAPE is not set
607# CONFIG_IDE_TASK_IOCTL is not set
608CONFIG_IDE_PROC_FS=y
609
610#
611# IDE chipset support/bugfixes
612#
613# CONFIG_BLK_DEV_PLATFORM is not set
614
615#
616# PCI IDE chipsets support
617#
618# CONFIG_BLK_DEV_GENERIC is not set
619# CONFIG_BLK_DEV_OPTI621 is not set
620# CONFIG_BLK_DEV_AEC62XX is not set
621# CONFIG_BLK_DEV_ALI15X3 is not set
622# CONFIG_BLK_DEV_AMD74XX is not set
623# CONFIG_BLK_DEV_CMD64X is not set
624# CONFIG_BLK_DEV_TRIFLEX is not set
625# CONFIG_BLK_DEV_CS5520 is not set
626# CONFIG_BLK_DEV_CS5530 is not set
627# CONFIG_BLK_DEV_HPT366 is not set
628# CONFIG_BLK_DEV_JMICRON is not set
629# CONFIG_BLK_DEV_SC1200 is not set
630# CONFIG_BLK_DEV_PIIX is not set
631# CONFIG_BLK_DEV_IT8172 is not set
632# CONFIG_BLK_DEV_IT8213 is not set
633# CONFIG_BLK_DEV_IT821X is not set
634# CONFIG_BLK_DEV_NS87415 is not set
635# CONFIG_BLK_DEV_PDC202XX_OLD is not set
636# CONFIG_BLK_DEV_PDC202XX_NEW is not set
637# CONFIG_BLK_DEV_SVWKS is not set
638# CONFIG_BLK_DEV_SIIMAGE is not set
639# CONFIG_BLK_DEV_SL82C105 is not set
640# CONFIG_BLK_DEV_SLC90E66 is not set
641# CONFIG_BLK_DEV_TRM290 is not set
642# CONFIG_BLK_DEV_VIA82CXXX is not set
643# CONFIG_BLK_DEV_TC86C001 is not set
644# CONFIG_BLK_DEV_IDEDMA is not set
552 645
553# 646#
554# SCSI device support 647# SCSI device support
@@ -570,10 +663,6 @@ CONFIG_BLK_DEV_SR=y
570# CONFIG_BLK_DEV_SR_VENDOR is not set 663# CONFIG_BLK_DEV_SR_VENDOR is not set
571# CONFIG_CHR_DEV_SG is not set 664# CONFIG_CHR_DEV_SG is not set
572# CONFIG_CHR_DEV_SCH is not set 665# CONFIG_CHR_DEV_SCH is not set
573
574#
575# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
576#
577# CONFIG_SCSI_MULTI_LUN is not set 666# CONFIG_SCSI_MULTI_LUN is not set
578# CONFIG_SCSI_CONSTANTS is not set 667# CONFIG_SCSI_CONSTANTS is not set
579# CONFIG_SCSI_LOGGING is not set 668# CONFIG_SCSI_LOGGING is not set
@@ -590,6 +679,7 @@ CONFIG_SCSI_WAIT_SCAN=m
590# CONFIG_SCSI_SRP_ATTRS is not set 679# CONFIG_SCSI_SRP_ATTRS is not set
591CONFIG_SCSI_LOWLEVEL=y 680CONFIG_SCSI_LOWLEVEL=y
592# CONFIG_ISCSI_TCP is not set 681# CONFIG_ISCSI_TCP is not set
682# CONFIG_SCSI_BNX2_ISCSI is not set
593# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 683# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
594# CONFIG_SCSI_3W_9XXX is not set 684# CONFIG_SCSI_3W_9XXX is not set
595# CONFIG_SCSI_ACARD is not set 685# CONFIG_SCSI_ACARD is not set
@@ -598,6 +688,7 @@ CONFIG_SCSI_LOWLEVEL=y
598# CONFIG_SCSI_AIC7XXX_OLD is not set 688# CONFIG_SCSI_AIC7XXX_OLD is not set
599# CONFIG_SCSI_AIC79XX is not set 689# CONFIG_SCSI_AIC79XX is not set
600# CONFIG_SCSI_AIC94XX is not set 690# CONFIG_SCSI_AIC94XX is not set
691# CONFIG_SCSI_MVSAS is not set
601# CONFIG_SCSI_DPT_I2O is not set 692# CONFIG_SCSI_DPT_I2O is not set
602# CONFIG_SCSI_ADVANSYS is not set 693# CONFIG_SCSI_ADVANSYS is not set
603# CONFIG_SCSI_ARCMSR is not set 694# CONFIG_SCSI_ARCMSR is not set
@@ -617,7 +708,6 @@ CONFIG_SCSI_LOWLEVEL=y
617# CONFIG_SCSI_IPS is not set 708# CONFIG_SCSI_IPS is not set
618# CONFIG_SCSI_INITIO is not set 709# CONFIG_SCSI_INITIO is not set
619# CONFIG_SCSI_INIA100 is not set 710# CONFIG_SCSI_INIA100 is not set
620# CONFIG_SCSI_MVSAS is not set
621# CONFIG_SCSI_STEX is not set 711# CONFIG_SCSI_STEX is not set
622# CONFIG_SCSI_SYM53C8XX_2 is not set 712# CONFIG_SCSI_SYM53C8XX_2 is not set
623# CONFIG_SCSI_IPR is not set 713# CONFIG_SCSI_IPR is not set
@@ -630,6 +720,7 @@ CONFIG_SCSI_LOWLEVEL=y
630# CONFIG_SCSI_NSP32 is not set 720# CONFIG_SCSI_NSP32 is not set
631# CONFIG_SCSI_DEBUG is not set 721# CONFIG_SCSI_DEBUG is not set
632# CONFIG_SCSI_SRP is not set 722# CONFIG_SCSI_SRP is not set
723# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
633# CONFIG_SCSI_DH is not set 724# CONFIG_SCSI_DH is not set
634# CONFIG_SCSI_OSD_INITIATOR is not set 725# CONFIG_SCSI_OSD_INITIATOR is not set
635CONFIG_ATA=y 726CONFIG_ATA=y
@@ -647,14 +738,17 @@ CONFIG_SATA_SIL24=y
647# 738#
648 739
649# 740#
650# Enable only one of the two stacks, unless you know what you are doing 741# You can enable one or both FireWire driver stacks.
742#
743
744#
745# See the help texts for more information.
651# 746#
652# CONFIG_FIREWIRE is not set 747# CONFIG_FIREWIRE is not set
653# CONFIG_IEEE1394 is not set 748# CONFIG_IEEE1394 is not set
654# CONFIG_I2O is not set 749# CONFIG_I2O is not set
655# CONFIG_MACINTOSH_DRIVERS is not set 750# CONFIG_MACINTOSH_DRIVERS is not set
656CONFIG_NETDEVICES=y 751CONFIG_NETDEVICES=y
657CONFIG_COMPAT_NET_DEV_OPS=y
658CONFIG_DUMMY=m 752CONFIG_DUMMY=m
659CONFIG_BONDING=m 753CONFIG_BONDING=m
660# CONFIG_MACVLAN is not set 754# CONFIG_MACVLAN is not set
@@ -701,6 +795,7 @@ CONFIG_MII=y
701# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 795# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
702# CONFIG_NET_PCI is not set 796# CONFIG_NET_PCI is not set
703# CONFIG_B44 is not set 797# CONFIG_B44 is not set
798# CONFIG_KS8842 is not set
704# CONFIG_ATL2 is not set 799# CONFIG_ATL2 is not set
705CONFIG_NETDEV_1000=y 800CONFIG_NETDEV_1000=y
706# CONFIG_ACENIC is not set 801# CONFIG_ACENIC is not set
@@ -720,8 +815,10 @@ CONFIG_NETDEV_1000=y
720# CONFIG_VIA_VELOCITY is not set 815# CONFIG_VIA_VELOCITY is not set
721# CONFIG_TIGON3 is not set 816# CONFIG_TIGON3 is not set
722# CONFIG_BNX2 is not set 817# CONFIG_BNX2 is not set
818# CONFIG_CNIC is not set
723CONFIG_FSL_PQ_MDIO=y 819CONFIG_FSL_PQ_MDIO=y
724CONFIG_GIANFAR=y 820CONFIG_GIANFAR=y
821# CONFIG_MV643XX_ETH is not set
725# CONFIG_QLA3XXX is not set 822# CONFIG_QLA3XXX is not set
726# CONFIG_ATL1 is not set 823# CONFIG_ATL1 is not set
727# CONFIG_ATL1E is not set 824# CONFIG_ATL1E is not set
@@ -748,6 +845,7 @@ CONFIG_GIANFAR=y
748# CONFIG_USB_PEGASUS is not set 845# CONFIG_USB_PEGASUS is not set
749# CONFIG_USB_RTL8150 is not set 846# CONFIG_USB_RTL8150 is not set
750# CONFIG_USB_USBNET is not set 847# CONFIG_USB_USBNET is not set
848# CONFIG_NET_PCMCIA is not set
751# CONFIG_WAN is not set 849# CONFIG_WAN is not set
752# CONFIG_FDDI is not set 850# CONFIG_FDDI is not set
753# CONFIG_HIPPI is not set 851# CONFIG_HIPPI is not set
@@ -827,6 +925,7 @@ CONFIG_DEVKMEM=y
827CONFIG_SERIAL_8250=y 925CONFIG_SERIAL_8250=y
828CONFIG_SERIAL_8250_CONSOLE=y 926CONFIG_SERIAL_8250_CONSOLE=y
829# CONFIG_SERIAL_8250_PCI is not set 927# CONFIG_SERIAL_8250_PCI is not set
928# CONFIG_SERIAL_8250_CS is not set
830CONFIG_SERIAL_8250_NR_UARTS=2 929CONFIG_SERIAL_8250_NR_UARTS=2
831CONFIG_SERIAL_8250_RUNTIME_UARTS=2 930CONFIG_SERIAL_8250_RUNTIME_UARTS=2
832# CONFIG_SERIAL_8250_EXTENDED is not set 931# CONFIG_SERIAL_8250_EXTENDED is not set
@@ -849,6 +948,14 @@ CONFIG_HW_RANDOM=y
849CONFIG_NVRAM=y 948CONFIG_NVRAM=y
850# CONFIG_R3964 is not set 949# CONFIG_R3964 is not set
851# CONFIG_APPLICOM is not set 950# CONFIG_APPLICOM is not set
951
952#
953# PCMCIA character devices
954#
955# CONFIG_SYNCLINK_CS is not set
956# CONFIG_CARDMAN_4000 is not set
957# CONFIG_CARDMAN_4040 is not set
958# CONFIG_IPWIRELESS is not set
852# CONFIG_RAW_DRIVER is not set 959# CONFIG_RAW_DRIVER is not set
853# CONFIG_TCG_TPM is not set 960# CONFIG_TCG_TPM is not set
854CONFIG_DEVPORT=y 961CONFIG_DEVPORT=y
@@ -912,13 +1019,17 @@ CONFIG_DS1682=y
912# CONFIG_SENSORS_PCF8574 is not set 1019# CONFIG_SENSORS_PCF8574 is not set
913# CONFIG_PCF8575 is not set 1020# CONFIG_PCF8575 is not set
914# CONFIG_SENSORS_PCA9539 is not set 1021# CONFIG_SENSORS_PCA9539 is not set
915# CONFIG_SENSORS_MAX6875 is not set
916# CONFIG_SENSORS_TSL2550 is not set 1022# CONFIG_SENSORS_TSL2550 is not set
917# CONFIG_I2C_DEBUG_CORE is not set 1023# CONFIG_I2C_DEBUG_CORE is not set
918# CONFIG_I2C_DEBUG_ALGO is not set 1024# CONFIG_I2C_DEBUG_ALGO is not set
919# CONFIG_I2C_DEBUG_BUS is not set 1025# CONFIG_I2C_DEBUG_BUS is not set
920# CONFIG_I2C_DEBUG_CHIP is not set 1026# CONFIG_I2C_DEBUG_CHIP is not set
921# CONFIG_SPI is not set 1027# CONFIG_SPI is not set
1028
1029#
1030# PPS support
1031#
1032# CONFIG_PPS is not set
922CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 1033CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
923CONFIG_ARCH_REQUIRE_GPIOLIB=y 1034CONFIG_ARCH_REQUIRE_GPIOLIB=y
924CONFIG_GPIOLIB=y 1035CONFIG_GPIOLIB=y
@@ -997,6 +1108,7 @@ CONFIG_SENSORS_LM92=y
997# CONFIG_SENSORS_SMSC47B397 is not set 1108# CONFIG_SENSORS_SMSC47B397 is not set
998# CONFIG_SENSORS_ADS7828 is not set 1109# CONFIG_SENSORS_ADS7828 is not set
999# CONFIG_SENSORS_THMC50 is not set 1110# CONFIG_SENSORS_THMC50 is not set
1111# CONFIG_SENSORS_TMP401 is not set
1000# CONFIG_SENSORS_VIA686A is not set 1112# CONFIG_SENSORS_VIA686A is not set
1001# CONFIG_SENSORS_VT1211 is not set 1113# CONFIG_SENSORS_VT1211 is not set
1002# CONFIG_SENSORS_VT8231 is not set 1114# CONFIG_SENSORS_VT8231 is not set
@@ -1052,24 +1164,9 @@ CONFIG_SSB_POSSIBLE=y
1052# CONFIG_MFD_WM8400 is not set 1164# CONFIG_MFD_WM8400 is not set
1053# CONFIG_MFD_WM8350_I2C is not set 1165# CONFIG_MFD_WM8350_I2C is not set
1054# CONFIG_MFD_PCF50633 is not set 1166# CONFIG_MFD_PCF50633 is not set
1167# CONFIG_AB3100_CORE is not set
1055# CONFIG_REGULATOR is not set 1168# CONFIG_REGULATOR is not set
1056 1169# CONFIG_MEDIA_SUPPORT is not set
1057#
1058# Multimedia devices
1059#
1060
1061#
1062# Multimedia core support
1063#
1064# CONFIG_VIDEO_DEV is not set
1065# CONFIG_DVB_CORE is not set
1066# CONFIG_VIDEO_MEDIA is not set
1067
1068#
1069# Multimedia drivers
1070#
1071CONFIG_DAB=y
1072# CONFIG_USB_DABUSB is not set
1073 1170
1074# 1171#
1075# Graphics support 1172# Graphics support
@@ -1114,7 +1211,7 @@ CONFIG_HID_BELKIN=y
1114CONFIG_HID_CHERRY=y 1211CONFIG_HID_CHERRY=y
1115CONFIG_HID_CHICONY=y 1212CONFIG_HID_CHICONY=y
1116CONFIG_HID_CYPRESS=y 1213CONFIG_HID_CYPRESS=y
1117# CONFIG_DRAGONRISE_FF is not set 1214# CONFIG_HID_DRAGONRISE is not set
1118CONFIG_HID_EZKEY=y 1215CONFIG_HID_EZKEY=y
1119# CONFIG_HID_KYE is not set 1216# CONFIG_HID_KYE is not set
1120CONFIG_HID_GYRATION=y 1217CONFIG_HID_GYRATION=y
@@ -1131,10 +1228,11 @@ CONFIG_HID_PETALYNX=y
1131CONFIG_HID_SAMSUNG=y 1228CONFIG_HID_SAMSUNG=y
1132CONFIG_HID_SONY=y 1229CONFIG_HID_SONY=y
1133CONFIG_HID_SUNPLUS=y 1230CONFIG_HID_SUNPLUS=y
1134# CONFIG_GREENASIA_FF is not set 1231# CONFIG_HID_GREENASIA is not set
1232# CONFIG_HID_SMARTJOYPLUS is not set
1135# CONFIG_HID_TOPSEED is not set 1233# CONFIG_HID_TOPSEED is not set
1136# CONFIG_THRUSTMASTER_FF is not set 1234# CONFIG_HID_THRUSTMASTER is not set
1137# CONFIG_ZEROPLUS_FF is not set 1235# CONFIG_HID_ZEROPLUS is not set
1138CONFIG_USB_SUPPORT=y 1236CONFIG_USB_SUPPORT=y
1139CONFIG_USB_ARCH_HAS_HCD=y 1237CONFIG_USB_ARCH_HAS_HCD=y
1140CONFIG_USB_ARCH_HAS_OHCI=y 1238CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1160,6 +1258,7 @@ CONFIG_USB=y
1160# USB Host Controller Drivers 1258# USB Host Controller Drivers
1161# 1259#
1162# CONFIG_USB_C67X00_HCD is not set 1260# CONFIG_USB_C67X00_HCD is not set
1261# CONFIG_USB_XHCI_HCD is not set
1163CONFIG_USB_EHCI_HCD=y 1262CONFIG_USB_EHCI_HCD=y
1164# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1263# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1165# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1264# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1169,6 +1268,8 @@ CONFIG_USB_EHCI_HCD=y
1169# CONFIG_USB_ISP116X_HCD is not set 1268# CONFIG_USB_ISP116X_HCD is not set
1170# CONFIG_USB_ISP1760_HCD is not set 1269# CONFIG_USB_ISP1760_HCD is not set
1171CONFIG_USB_OHCI_HCD=y 1270CONFIG_USB_OHCI_HCD=y
1271# CONFIG_USB_OHCI_HCD_PPC_OF_BE is not set
1272# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
1172# CONFIG_USB_OHCI_HCD_PPC_OF is not set 1273# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1173# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1274# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1174# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 1275# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1288,6 +1389,7 @@ CONFIG_RTC_INTF_DEV=y
1288# CONFIG_RTC_DRV_S35390A is not set 1389# CONFIG_RTC_DRV_S35390A is not set
1289# CONFIG_RTC_DRV_FM3130 is not set 1390# CONFIG_RTC_DRV_FM3130 is not set
1290CONFIG_RTC_DRV_RX8581=y 1391CONFIG_RTC_DRV_RX8581=y
1392# CONFIG_RTC_DRV_RX8025 is not set
1291 1393
1292# 1394#
1293# SPI RTC drivers 1395# SPI RTC drivers
@@ -1315,6 +1417,10 @@ CONFIG_RTC_DRV_RX8581=y
1315# CONFIG_DMADEVICES is not set 1417# CONFIG_DMADEVICES is not set
1316# CONFIG_AUXDISPLAY is not set 1418# CONFIG_AUXDISPLAY is not set
1317# CONFIG_UIO is not set 1419# CONFIG_UIO is not set
1420
1421#
1422# TI VLYNQ
1423#
1318# CONFIG_STAGING is not set 1424# CONFIG_STAGING is not set
1319 1425
1320# 1426#
@@ -1336,10 +1442,12 @@ CONFIG_FS_MBCACHE=y
1336# CONFIG_REISERFS_FS is not set 1442# CONFIG_REISERFS_FS is not set
1337# CONFIG_JFS_FS is not set 1443# CONFIG_JFS_FS is not set
1338CONFIG_FS_POSIX_ACL=y 1444CONFIG_FS_POSIX_ACL=y
1339CONFIG_FILE_LOCKING=y
1340# CONFIG_XFS_FS is not set 1445# CONFIG_XFS_FS is not set
1446# CONFIG_GFS2_FS is not set
1341# CONFIG_OCFS2_FS is not set 1447# CONFIG_OCFS2_FS is not set
1342# CONFIG_BTRFS_FS is not set 1448# CONFIG_BTRFS_FS is not set
1449CONFIG_FILE_LOCKING=y
1450CONFIG_FSNOTIFY=y
1343CONFIG_DNOTIFY=y 1451CONFIG_DNOTIFY=y
1344CONFIG_INOTIFY=y 1452CONFIG_INOTIFY=y
1345CONFIG_INOTIFY_USER=y 1453CONFIG_INOTIFY_USER=y
@@ -1419,6 +1527,7 @@ CONFIG_NFS_FS=y
1419CONFIG_NFS_V3=y 1527CONFIG_NFS_V3=y
1420# CONFIG_NFS_V3_ACL is not set 1528# CONFIG_NFS_V3_ACL is not set
1421CONFIG_NFS_V4=y 1529CONFIG_NFS_V4=y
1530# CONFIG_NFS_V4_1 is not set
1422CONFIG_ROOT_NFS=y 1531CONFIG_ROOT_NFS=y
1423# CONFIG_NFSD is not set 1532# CONFIG_NFSD is not set
1424CONFIG_LOCKD=y 1533CONFIG_LOCKD=y
@@ -1508,6 +1617,7 @@ CONFIG_HAS_IOPORT=y
1508CONFIG_HAS_DMA=y 1617CONFIG_HAS_DMA=y
1509CONFIG_HAVE_LMB=y 1618CONFIG_HAVE_LMB=y
1510CONFIG_NLATTR=y 1619CONFIG_NLATTR=y
1620CONFIG_GENERIC_ATOMIC64=y
1511 1621
1512# 1622#
1513# Kernel hacking 1623# Kernel hacking
@@ -1531,23 +1641,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1531CONFIG_HAVE_DYNAMIC_FTRACE=y 1641CONFIG_HAVE_DYNAMIC_FTRACE=y
1532CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1642CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1533CONFIG_TRACING_SUPPORT=y 1643CONFIG_TRACING_SUPPORT=y
1534 1644# CONFIG_FTRACE is not set
1535#
1536# Tracers
1537#
1538# CONFIG_FUNCTION_TRACER is not set
1539# CONFIG_PREEMPT_TRACER is not set
1540# CONFIG_SCHED_TRACER is not set
1541# CONFIG_CONTEXT_SWITCH_TRACER is not set
1542# CONFIG_EVENT_TRACER is not set
1543# CONFIG_BOOT_TRACER is not set
1544# CONFIG_TRACE_BRANCH_PROFILING is not set
1545# CONFIG_STACK_TRACER is not set
1546# CONFIG_KMEMTRACE is not set
1547# CONFIG_WORKQUEUE_TRACER is not set
1548# CONFIG_BLK_DEV_IO_TRACE is not set
1549# CONFIG_SAMPLES is not set 1645# CONFIG_SAMPLES is not set
1550CONFIG_HAVE_ARCH_KGDB=y 1646CONFIG_HAVE_ARCH_KGDB=y
1647# CONFIG_PPC_DISABLE_WERROR is not set
1648CONFIG_PPC_WERROR=y
1551CONFIG_PRINT_STACK_DEPTH=64 1649CONFIG_PRINT_STACK_DEPTH=64
1552# CONFIG_IRQSTACKS is not set 1650# CONFIG_IRQSTACKS is not set
1553# CONFIG_BOOTX_TEXT is not set 1651# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/86xx/gef_sbc610_defconfig b/arch/powerpc/configs/86xx/gef_sbc610_defconfig
index c6a7fc82b69..ba47883f4aa 100644
--- a/arch/powerpc/configs/86xx/gef_sbc610_defconfig
+++ b/arch/powerpc/configs/86xx/gef_sbc610_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:30 2009 4# Wed Jul 29 23:32:30 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_PHYS_64BIT is not set 20# CONFIG_PHYS_64BIT is not set
20CONFIG_ALTIVEC=y 21CONFIG_ALTIVEC=y
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24CONFIG_SMP=y 26CONFIG_SMP=y
25CONFIG_NR_CPUS=2 27CONFIG_NR_CPUS=2
26CONFIG_PPC32=y 28CONFIG_PPC32=y
@@ -32,16 +34,17 @@ CONFIG_GENERIC_TIME=y
32CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
33CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
34CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
35# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
36CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
37CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
38CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
39CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
40CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
41CONFIG_GENERIC_LOCKBREAK=y 45CONFIG_GENERIC_LOCKBREAK=y
42CONFIG_ARCH_HAS_ILOG2_U32=y 46CONFIG_ARCH_HAS_ILOG2_U32=y
43CONFIG_GENERIC_HWEIGHT=y 47CONFIG_GENERIC_HWEIGHT=y
44CONFIG_GENERIC_CALIBRATE_DELAY=y
45CONFIG_GENERIC_FIND_NEXT_BIT=y 48CONFIG_GENERIC_FIND_NEXT_BIT=y
46CONFIG_GENERIC_GPIO=y 49CONFIG_GENERIC_GPIO=y
47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 50# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -56,11 +59,13 @@ CONFIG_PPC_UDBG_16550=y
56CONFIG_GENERIC_TBSYNC=y 59CONFIG_GENERIC_TBSYNC=y
57CONFIG_AUDIT_ARCH=y 60CONFIG_AUDIT_ARCH=y
58CONFIG_GENERIC_BUG=y 61CONFIG_GENERIC_BUG=y
62CONFIG_DTC=y
59CONFIG_DEFAULT_UIMAGE=y 63CONFIG_DEFAULT_UIMAGE=y
60# CONFIG_PPC_DCR_NATIVE is not set 64# CONFIG_PPC_DCR_NATIVE is not set
61# CONFIG_PPC_DCR_MMIO is not set 65# CONFIG_PPC_DCR_MMIO is not set
62CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 66CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
63CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 67CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
68CONFIG_CONSTRUCTORS=y
64 69
65# 70#
66# General setup 71# General setup
@@ -114,7 +119,6 @@ CONFIG_SYSCTL_SYSCALL=y
114CONFIG_KALLSYMS=y 119CONFIG_KALLSYMS=y
115# CONFIG_KALLSYMS_ALL is not set 120# CONFIG_KALLSYMS_ALL is not set
116# CONFIG_KALLSYMS_EXTRA_PASS is not set 121# CONFIG_KALLSYMS_EXTRA_PASS is not set
117# CONFIG_STRIP_ASM_SYMS is not set
118CONFIG_HOTPLUG=y 122CONFIG_HOTPLUG=y
119CONFIG_PRINTK=y 123CONFIG_PRINTK=y
120CONFIG_BUG=y 124CONFIG_BUG=y
@@ -127,8 +131,15 @@ CONFIG_TIMERFD=y
127CONFIG_EVENTFD=y 131CONFIG_EVENTFD=y
128CONFIG_SHMEM=y 132CONFIG_SHMEM=y
129CONFIG_AIO=y 133CONFIG_AIO=y
134CONFIG_HAVE_PERF_COUNTERS=y
135
136#
137# Performance Counters
138#
139# CONFIG_PERF_COUNTERS is not set
130CONFIG_VM_EVENT_COUNTERS=y 140CONFIG_VM_EVENT_COUNTERS=y
131CONFIG_PCI_QUIRKS=y 141CONFIG_PCI_QUIRKS=y
142# CONFIG_STRIP_ASM_SYMS is not set
132CONFIG_COMPAT_BRK=y 143CONFIG_COMPAT_BRK=y
133CONFIG_SLAB=y 144CONFIG_SLAB=y
134# CONFIG_SLUB is not set 145# CONFIG_SLUB is not set
@@ -143,6 +154,10 @@ CONFIG_HAVE_KPROBES=y
143CONFIG_HAVE_KRETPROBES=y 154CONFIG_HAVE_KRETPROBES=y
144CONFIG_HAVE_ARCH_TRACEHOOK=y 155CONFIG_HAVE_ARCH_TRACEHOOK=y
145CONFIG_USE_GENERIC_SMP_HELPERS=y 156CONFIG_USE_GENERIC_SMP_HELPERS=y
157
158#
159# GCOV-based kernel profiling
160#
146# CONFIG_SLOW_WORK is not set 161# CONFIG_SLOW_WORK is not set
147# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 162# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
148CONFIG_SLABINFO=y 163CONFIG_SLABINFO=y
@@ -156,7 +171,7 @@ CONFIG_MODULE_UNLOAD=y
156# CONFIG_MODULE_SRCVERSION_ALL is not set 171# CONFIG_MODULE_SRCVERSION_ALL is not set
157CONFIG_STOP_MACHINE=y 172CONFIG_STOP_MACHINE=y
158CONFIG_BLOCK=y 173CONFIG_BLOCK=y
159# CONFIG_LBD is not set 174CONFIG_LBDAF=y
160# CONFIG_BLK_DEV_BSG is not set 175# CONFIG_BLK_DEV_BSG is not set
161# CONFIG_BLK_DEV_INTEGRITY is not set 176# CONFIG_BLK_DEV_INTEGRITY is not set
162 177
@@ -235,6 +250,7 @@ CONFIG_BINFMT_ELF=y
235# CONFIG_HAVE_AOUT is not set 250# CONFIG_HAVE_AOUT is not set
236CONFIG_BINFMT_MISC=m 251CONFIG_BINFMT_MISC=m
237# CONFIG_IOMMU_HELPER is not set 252# CONFIG_IOMMU_HELPER is not set
253# CONFIG_SWIOTLB is not set
238CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 254CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
239CONFIG_ARCH_HAS_WALK_MEMORY=y 255CONFIG_ARCH_HAS_WALK_MEMORY=y
240CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 256CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -256,9 +272,9 @@ CONFIG_MIGRATION=y
256CONFIG_ZONE_DMA_FLAG=1 272CONFIG_ZONE_DMA_FLAG=1
257CONFIG_BOUNCE=y 273CONFIG_BOUNCE=y
258CONFIG_VIRT_TO_BUS=y 274CONFIG_VIRT_TO_BUS=y
259CONFIG_UNEVICTABLE_LRU=y
260CONFIG_HAVE_MLOCK=y 275CONFIG_HAVE_MLOCK=y
261CONFIG_HAVE_MLOCKED_PAGE_BIT=y 276CONFIG_HAVE_MLOCKED_PAGE_BIT=y
277CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
262CONFIG_PPC_4K_PAGES=y 278CONFIG_PPC_4K_PAGES=y
263# CONFIG_PPC_16K_PAGES is not set 279# CONFIG_PPC_16K_PAGES is not set
264# CONFIG_PPC_64K_PAGES is not set 280# CONFIG_PPC_64K_PAGES is not set
@@ -285,6 +301,8 @@ CONFIG_PCI_DOMAINS=y
285CONFIG_PCI_SYSCALL=y 301CONFIG_PCI_SYSCALL=y
286CONFIG_PCIEPORTBUS=y 302CONFIG_PCIEPORTBUS=y
287CONFIG_PCIEAER=y 303CONFIG_PCIEAER=y
304# CONFIG_PCIE_ECRC is not set
305# CONFIG_PCIEAER_INJECT is not set
288# CONFIG_PCIEASPM is not set 306# CONFIG_PCIEASPM is not set
289CONFIG_ARCH_SUPPORTS_MSI=y 307CONFIG_ARCH_SUPPORTS_MSI=y
290# CONFIG_PCI_MSI is not set 308# CONFIG_PCI_MSI is not set
@@ -510,6 +528,7 @@ CONFIG_LLC=m
510# CONFIG_ECONET is not set 528# CONFIG_ECONET is not set
511CONFIG_WAN_ROUTER=m 529CONFIG_WAN_ROUTER=m
512# CONFIG_PHONET is not set 530# CONFIG_PHONET is not set
531# CONFIG_IEEE802154 is not set
513CONFIG_NET_SCHED=y 532CONFIG_NET_SCHED=y
514 533
515# 534#
@@ -566,7 +585,11 @@ CONFIG_WIRELESS=y
566CONFIG_WIRELESS_OLD_REGULATORY=y 585CONFIG_WIRELESS_OLD_REGULATORY=y
567# CONFIG_WIRELESS_EXT is not set 586# CONFIG_WIRELESS_EXT is not set
568# CONFIG_LIB80211 is not set 587# CONFIG_LIB80211 is not set
569# CONFIG_MAC80211 is not set 588
589#
590# CFG80211 needs to be enabled for MAC80211
591#
592CONFIG_MAC80211_DEFAULT_PS_VALUE=0
570# CONFIG_WIMAX is not set 593# CONFIG_WIMAX is not set
571# CONFIG_RFKILL is not set 594# CONFIG_RFKILL is not set
572# CONFIG_NET_9P is not set 595# CONFIG_NET_9P is not set
@@ -678,6 +701,7 @@ CONFIG_MTD_PHYSMAP_OF=y
678CONFIG_OF_DEVICE=y 701CONFIG_OF_DEVICE=y
679CONFIG_OF_GPIO=y 702CONFIG_OF_GPIO=y
680CONFIG_OF_I2C=y 703CONFIG_OF_I2C=y
704CONFIG_OF_MDIO=y
681# CONFIG_PARPORT is not set 705# CONFIG_PARPORT is not set
682CONFIG_BLK_DEV=y 706CONFIG_BLK_DEV=y
683# CONFIG_BLK_DEV_FD is not set 707# CONFIG_BLK_DEV_FD is not set
@@ -713,7 +737,9 @@ CONFIG_MISC_DEVICES=y
713# 737#
714# CONFIG_EEPROM_AT24 is not set 738# CONFIG_EEPROM_AT24 is not set
715# CONFIG_EEPROM_LEGACY is not set 739# CONFIG_EEPROM_LEGACY is not set
740# CONFIG_EEPROM_MAX6875 is not set
716# CONFIG_EEPROM_93CX6 is not set 741# CONFIG_EEPROM_93CX6 is not set
742# CONFIG_CB710_CORE is not set
717CONFIG_HAVE_IDE=y 743CONFIG_HAVE_IDE=y
718# CONFIG_IDE is not set 744# CONFIG_IDE is not set
719 745
@@ -737,10 +763,6 @@ CONFIG_BLK_DEV_SR=y
737# CONFIG_BLK_DEV_SR_VENDOR is not set 763# CONFIG_BLK_DEV_SR_VENDOR is not set
738# CONFIG_CHR_DEV_SG is not set 764# CONFIG_CHR_DEV_SG is not set
739# CONFIG_CHR_DEV_SCH is not set 765# CONFIG_CHR_DEV_SCH is not set
740
741#
742# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
743#
744# CONFIG_SCSI_MULTI_LUN is not set 766# CONFIG_SCSI_MULTI_LUN is not set
745# CONFIG_SCSI_CONSTANTS is not set 767# CONFIG_SCSI_CONSTANTS is not set
746# CONFIG_SCSI_LOGGING is not set 768# CONFIG_SCSI_LOGGING is not set
@@ -757,6 +779,7 @@ CONFIG_SCSI_WAIT_SCAN=m
757# CONFIG_SCSI_SRP_ATTRS is not set 779# CONFIG_SCSI_SRP_ATTRS is not set
758CONFIG_SCSI_LOWLEVEL=y 780CONFIG_SCSI_LOWLEVEL=y
759# CONFIG_ISCSI_TCP is not set 781# CONFIG_ISCSI_TCP is not set
782# CONFIG_SCSI_BNX2_ISCSI is not set
760# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 783# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
761# CONFIG_SCSI_3W_9XXX is not set 784# CONFIG_SCSI_3W_9XXX is not set
762# CONFIG_SCSI_ACARD is not set 785# CONFIG_SCSI_ACARD is not set
@@ -765,6 +788,7 @@ CONFIG_SCSI_LOWLEVEL=y
765# CONFIG_SCSI_AIC7XXX_OLD is not set 788# CONFIG_SCSI_AIC7XXX_OLD is not set
766# CONFIG_SCSI_AIC79XX is not set 789# CONFIG_SCSI_AIC79XX is not set
767# CONFIG_SCSI_AIC94XX is not set 790# CONFIG_SCSI_AIC94XX is not set
791# CONFIG_SCSI_MVSAS is not set
768# CONFIG_SCSI_DPT_I2O is not set 792# CONFIG_SCSI_DPT_I2O is not set
769# CONFIG_SCSI_ADVANSYS is not set 793# CONFIG_SCSI_ADVANSYS is not set
770# CONFIG_SCSI_ARCMSR is not set 794# CONFIG_SCSI_ARCMSR is not set
@@ -784,7 +808,6 @@ CONFIG_SCSI_LOWLEVEL=y
784# CONFIG_SCSI_IPS is not set 808# CONFIG_SCSI_IPS is not set
785# CONFIG_SCSI_INITIO is not set 809# CONFIG_SCSI_INITIO is not set
786# CONFIG_SCSI_INIA100 is not set 810# CONFIG_SCSI_INIA100 is not set
787# CONFIG_SCSI_MVSAS is not set
788# CONFIG_SCSI_STEX is not set 811# CONFIG_SCSI_STEX is not set
789# CONFIG_SCSI_SYM53C8XX_2 is not set 812# CONFIG_SCSI_SYM53C8XX_2 is not set
790# CONFIG_SCSI_IPR is not set 813# CONFIG_SCSI_IPR is not set
@@ -868,14 +891,17 @@ CONFIG_SATA_SIL=y
868# 891#
869 892
870# 893#
871# Enable only one of the two stacks, unless you know what you are doing 894# You can enable one or both FireWire driver stacks.
895#
896
897#
898# See the help texts for more information.
872# 899#
873# CONFIG_FIREWIRE is not set 900# CONFIG_FIREWIRE is not set
874# CONFIG_IEEE1394 is not set 901# CONFIG_IEEE1394 is not set
875# CONFIG_I2O is not set 902# CONFIG_I2O is not set
876# CONFIG_MACINTOSH_DRIVERS is not set 903# CONFIG_MACINTOSH_DRIVERS is not set
877CONFIG_NETDEVICES=y 904CONFIG_NETDEVICES=y
878CONFIG_COMPAT_NET_DEV_OPS=y
879CONFIG_DUMMY=m 905CONFIG_DUMMY=m
880CONFIG_BONDING=m 906CONFIG_BONDING=m
881# CONFIG_MACVLAN is not set 907# CONFIG_MACVLAN is not set
@@ -922,6 +948,7 @@ CONFIG_MII=y
922# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 948# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
923# CONFIG_NET_PCI is not set 949# CONFIG_NET_PCI is not set
924# CONFIG_B44 is not set 950# CONFIG_B44 is not set
951# CONFIG_KS8842 is not set
925# CONFIG_ATL2 is not set 952# CONFIG_ATL2 is not set
926CONFIG_NETDEV_1000=y 953CONFIG_NETDEV_1000=y
927# CONFIG_ACENIC is not set 954# CONFIG_ACENIC is not set
@@ -941,8 +968,10 @@ CONFIG_NETDEV_1000=y
941# CONFIG_VIA_VELOCITY is not set 968# CONFIG_VIA_VELOCITY is not set
942# CONFIG_TIGON3 is not set 969# CONFIG_TIGON3 is not set
943# CONFIG_BNX2 is not set 970# CONFIG_BNX2 is not set
971# CONFIG_CNIC is not set
944CONFIG_FSL_PQ_MDIO=y 972CONFIG_FSL_PQ_MDIO=y
945CONFIG_GIANFAR=y 973CONFIG_GIANFAR=y
974# CONFIG_MV643XX_ETH is not set
946# CONFIG_QLA3XXX is not set 975# CONFIG_QLA3XXX is not set
947# CONFIG_ATL1 is not set 976# CONFIG_ATL1 is not set
948# CONFIG_ATL1E is not set 977# CONFIG_ATL1E is not set
@@ -1149,13 +1178,17 @@ CONFIG_DS1682=y
1149# CONFIG_SENSORS_PCF8574 is not set 1178# CONFIG_SENSORS_PCF8574 is not set
1150# CONFIG_PCF8575 is not set 1179# CONFIG_PCF8575 is not set
1151# CONFIG_SENSORS_PCA9539 is not set 1180# CONFIG_SENSORS_PCA9539 is not set
1152# CONFIG_SENSORS_MAX6875 is not set
1153# CONFIG_SENSORS_TSL2550 is not set 1181# CONFIG_SENSORS_TSL2550 is not set
1154# CONFIG_I2C_DEBUG_CORE is not set 1182# CONFIG_I2C_DEBUG_CORE is not set
1155# CONFIG_I2C_DEBUG_ALGO is not set 1183# CONFIG_I2C_DEBUG_ALGO is not set
1156# CONFIG_I2C_DEBUG_BUS is not set 1184# CONFIG_I2C_DEBUG_BUS is not set
1157# CONFIG_I2C_DEBUG_CHIP is not set 1185# CONFIG_I2C_DEBUG_CHIP is not set
1158# CONFIG_SPI is not set 1186# CONFIG_SPI is not set
1187
1188#
1189# PPS support
1190#
1191# CONFIG_PPS is not set
1159CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 1192CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
1160CONFIG_ARCH_REQUIRE_GPIOLIB=y 1193CONFIG_ARCH_REQUIRE_GPIOLIB=y
1161CONFIG_GPIOLIB=y 1194CONFIG_GPIOLIB=y
@@ -1235,6 +1268,7 @@ CONFIG_SENSORS_LM92=y
1235# CONFIG_SENSORS_SMSC47B397 is not set 1268# CONFIG_SENSORS_SMSC47B397 is not set
1236# CONFIG_SENSORS_ADS7828 is not set 1269# CONFIG_SENSORS_ADS7828 is not set
1237# CONFIG_SENSORS_THMC50 is not set 1270# CONFIG_SENSORS_THMC50 is not set
1271# CONFIG_SENSORS_TMP401 is not set
1238# CONFIG_SENSORS_VIA686A is not set 1272# CONFIG_SENSORS_VIA686A is not set
1239# CONFIG_SENSORS_VT1211 is not set 1273# CONFIG_SENSORS_VT1211 is not set
1240# CONFIG_SENSORS_VT8231 is not set 1274# CONFIG_SENSORS_VT8231 is not set
@@ -1290,24 +1324,9 @@ CONFIG_SSB_POSSIBLE=y
1290# CONFIG_MFD_WM8400 is not set 1324# CONFIG_MFD_WM8400 is not set
1291# CONFIG_MFD_WM8350_I2C is not set 1325# CONFIG_MFD_WM8350_I2C is not set
1292# CONFIG_MFD_PCF50633 is not set 1326# CONFIG_MFD_PCF50633 is not set
1327# CONFIG_AB3100_CORE is not set
1293# CONFIG_REGULATOR is not set 1328# CONFIG_REGULATOR is not set
1294 1329# CONFIG_MEDIA_SUPPORT is not set
1295#
1296# Multimedia devices
1297#
1298
1299#
1300# Multimedia core support
1301#
1302# CONFIG_VIDEO_DEV is not set
1303# CONFIG_DVB_CORE is not set
1304# CONFIG_VIDEO_MEDIA is not set
1305
1306#
1307# Multimedia drivers
1308#
1309CONFIG_DAB=y
1310# CONFIG_USB_DABUSB is not set
1311 1330
1312# 1331#
1313# Graphics support 1332# Graphics support
@@ -1352,7 +1371,7 @@ CONFIG_HID_BELKIN=y
1352CONFIG_HID_CHERRY=y 1371CONFIG_HID_CHERRY=y
1353CONFIG_HID_CHICONY=y 1372CONFIG_HID_CHICONY=y
1354CONFIG_HID_CYPRESS=y 1373CONFIG_HID_CYPRESS=y
1355# CONFIG_DRAGONRISE_FF is not set 1374# CONFIG_HID_DRAGONRISE is not set
1356CONFIG_HID_EZKEY=y 1375CONFIG_HID_EZKEY=y
1357# CONFIG_HID_KYE is not set 1376# CONFIG_HID_KYE is not set
1358CONFIG_HID_GYRATION=y 1377CONFIG_HID_GYRATION=y
@@ -1369,10 +1388,11 @@ CONFIG_HID_PETALYNX=y
1369CONFIG_HID_SAMSUNG=y 1388CONFIG_HID_SAMSUNG=y
1370CONFIG_HID_SONY=y 1389CONFIG_HID_SONY=y
1371CONFIG_HID_SUNPLUS=y 1390CONFIG_HID_SUNPLUS=y
1372# CONFIG_GREENASIA_FF is not set 1391# CONFIG_HID_GREENASIA is not set
1392# CONFIG_HID_SMARTJOYPLUS is not set
1373# CONFIG_HID_TOPSEED is not set 1393# CONFIG_HID_TOPSEED is not set
1374CONFIG_THRUSTMASTER_FF=m 1394# CONFIG_HID_THRUSTMASTER is not set
1375CONFIG_ZEROPLUS_FF=m 1395# CONFIG_HID_ZEROPLUS is not set
1376CONFIG_USB_SUPPORT=y 1396CONFIG_USB_SUPPORT=y
1377CONFIG_USB_ARCH_HAS_HCD=y 1397CONFIG_USB_ARCH_HAS_HCD=y
1378CONFIG_USB_ARCH_HAS_OHCI=y 1398CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1398,6 +1418,7 @@ CONFIG_USB=y
1398# USB Host Controller Drivers 1418# USB Host Controller Drivers
1399# 1419#
1400# CONFIG_USB_C67X00_HCD is not set 1420# CONFIG_USB_C67X00_HCD is not set
1421# CONFIG_USB_XHCI_HCD is not set
1401CONFIG_USB_EHCI_HCD=y 1422CONFIG_USB_EHCI_HCD=y
1402# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1423# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1403# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1424# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1407,6 +1428,8 @@ CONFIG_USB_EHCI_HCD=y
1407# CONFIG_USB_ISP116X_HCD is not set 1428# CONFIG_USB_ISP116X_HCD is not set
1408# CONFIG_USB_ISP1760_HCD is not set 1429# CONFIG_USB_ISP1760_HCD is not set
1409CONFIG_USB_OHCI_HCD=y 1430CONFIG_USB_OHCI_HCD=y
1431# CONFIG_USB_OHCI_HCD_PPC_OF_BE is not set
1432# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
1410# CONFIG_USB_OHCI_HCD_PPC_OF is not set 1433# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1411# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1434# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1412# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 1435# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1527,6 +1550,7 @@ CONFIG_RTC_INTF_DEV=y
1527# CONFIG_RTC_DRV_S35390A is not set 1550# CONFIG_RTC_DRV_S35390A is not set
1528# CONFIG_RTC_DRV_FM3130 is not set 1551# CONFIG_RTC_DRV_FM3130 is not set
1529CONFIG_RTC_DRV_RX8581=y 1552CONFIG_RTC_DRV_RX8581=y
1553# CONFIG_RTC_DRV_RX8025 is not set
1530 1554
1531# 1555#
1532# SPI RTC drivers 1556# SPI RTC drivers
@@ -1554,6 +1578,10 @@ CONFIG_RTC_DRV_RX8581=y
1554# CONFIG_DMADEVICES is not set 1578# CONFIG_DMADEVICES is not set
1555# CONFIG_AUXDISPLAY is not set 1579# CONFIG_AUXDISPLAY is not set
1556# CONFIG_UIO is not set 1580# CONFIG_UIO is not set
1581
1582#
1583# TI VLYNQ
1584#
1557# CONFIG_STAGING is not set 1585# CONFIG_STAGING is not set
1558 1586
1559# 1587#
@@ -1575,10 +1603,12 @@ CONFIG_FS_MBCACHE=y
1575# CONFIG_REISERFS_FS is not set 1603# CONFIG_REISERFS_FS is not set
1576# CONFIG_JFS_FS is not set 1604# CONFIG_JFS_FS is not set
1577CONFIG_FS_POSIX_ACL=y 1605CONFIG_FS_POSIX_ACL=y
1578CONFIG_FILE_LOCKING=y
1579# CONFIG_XFS_FS is not set 1606# CONFIG_XFS_FS is not set
1607# CONFIG_GFS2_FS is not set
1580# CONFIG_OCFS2_FS is not set 1608# CONFIG_OCFS2_FS is not set
1581# CONFIG_BTRFS_FS is not set 1609# CONFIG_BTRFS_FS is not set
1610CONFIG_FILE_LOCKING=y
1611CONFIG_FSNOTIFY=y
1582CONFIG_DNOTIFY=y 1612CONFIG_DNOTIFY=y
1583CONFIG_INOTIFY=y 1613CONFIG_INOTIFY=y
1584CONFIG_INOTIFY_USER=y 1614CONFIG_INOTIFY_USER=y
@@ -1645,6 +1675,7 @@ CONFIG_NFS_FS=y
1645CONFIG_NFS_V3=y 1675CONFIG_NFS_V3=y
1646# CONFIG_NFS_V3_ACL is not set 1676# CONFIG_NFS_V3_ACL is not set
1647CONFIG_NFS_V4=y 1677CONFIG_NFS_V4=y
1678# CONFIG_NFS_V4_1 is not set
1648CONFIG_ROOT_NFS=y 1679CONFIG_ROOT_NFS=y
1649# CONFIG_NFSD is not set 1680# CONFIG_NFSD is not set
1650CONFIG_LOCKD=y 1681CONFIG_LOCKD=y
@@ -1734,6 +1765,7 @@ CONFIG_HAS_IOPORT=y
1734CONFIG_HAS_DMA=y 1765CONFIG_HAS_DMA=y
1735CONFIG_HAVE_LMB=y 1766CONFIG_HAVE_LMB=y
1736CONFIG_NLATTR=y 1767CONFIG_NLATTR=y
1768CONFIG_GENERIC_ATOMIC64=y
1737 1769
1738# 1770#
1739# Kernel hacking 1771# Kernel hacking
@@ -1759,10 +1791,14 @@ CONFIG_SCHED_DEBUG=y
1759# CONFIG_TIMER_STATS is not set 1791# CONFIG_TIMER_STATS is not set
1760# CONFIG_DEBUG_OBJECTS is not set 1792# CONFIG_DEBUG_OBJECTS is not set
1761# CONFIG_DEBUG_SLAB is not set 1793# CONFIG_DEBUG_SLAB is not set
1794CONFIG_DEBUG_PREEMPT=y
1762# CONFIG_DEBUG_RT_MUTEXES is not set 1795# CONFIG_DEBUG_RT_MUTEXES is not set
1763# CONFIG_RT_MUTEX_TESTER is not set 1796# CONFIG_RT_MUTEX_TESTER is not set
1764# CONFIG_DEBUG_SPINLOCK is not set 1797# CONFIG_DEBUG_SPINLOCK is not set
1765# CONFIG_DEBUG_MUTEXES is not set 1798# CONFIG_DEBUG_MUTEXES is not set
1799# CONFIG_DEBUG_LOCK_ALLOC is not set
1800# CONFIG_PROVE_LOCKING is not set
1801# CONFIG_LOCK_STAT is not set
1766# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1802# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1767# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1803# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1768# CONFIG_DEBUG_KOBJECT is not set 1804# CONFIG_DEBUG_KOBJECT is not set
@@ -1774,7 +1810,6 @@ CONFIG_DEBUG_INFO=y
1774# CONFIG_DEBUG_LIST is not set 1810# CONFIG_DEBUG_LIST is not set
1775# CONFIG_DEBUG_SG is not set 1811# CONFIG_DEBUG_SG is not set
1776# CONFIG_DEBUG_NOTIFIERS is not set 1812# CONFIG_DEBUG_NOTIFIERS is not set
1777# CONFIG_BOOT_PRINTK_DELAY is not set
1778# CONFIG_RCU_TORTURE_TEST is not set 1813# CONFIG_RCU_TORTURE_TEST is not set
1779# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1814# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1780# CONFIG_BACKTRACE_SELF_TEST is not set 1815# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1788,17 +1823,16 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1788CONFIG_HAVE_DYNAMIC_FTRACE=y 1823CONFIG_HAVE_DYNAMIC_FTRACE=y
1789CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1824CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1790CONFIG_TRACING_SUPPORT=y 1825CONFIG_TRACING_SUPPORT=y
1791 1826CONFIG_FTRACE=y
1792#
1793# Tracers
1794#
1795# CONFIG_FUNCTION_TRACER is not set 1827# CONFIG_FUNCTION_TRACER is not set
1828# CONFIG_IRQSOFF_TRACER is not set
1796# CONFIG_PREEMPT_TRACER is not set 1829# CONFIG_PREEMPT_TRACER is not set
1797# CONFIG_SCHED_TRACER is not set 1830# CONFIG_SCHED_TRACER is not set
1798# CONFIG_CONTEXT_SWITCH_TRACER is not set 1831# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1799# CONFIG_EVENT_TRACER is not set
1800# CONFIG_BOOT_TRACER is not set 1832# CONFIG_BOOT_TRACER is not set
1801# CONFIG_TRACE_BRANCH_PROFILING is not set 1833CONFIG_BRANCH_PROFILE_NONE=y
1834# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1835# CONFIG_PROFILE_ALL_BRANCHES is not set
1802# CONFIG_STACK_TRACER is not set 1836# CONFIG_STACK_TRACER is not set
1803# CONFIG_KMEMTRACE is not set 1837# CONFIG_KMEMTRACE is not set
1804# CONFIG_WORKQUEUE_TRACER is not set 1838# CONFIG_WORKQUEUE_TRACER is not set
@@ -1806,6 +1840,9 @@ CONFIG_TRACING_SUPPORT=y
1806# CONFIG_SAMPLES is not set 1840# CONFIG_SAMPLES is not set
1807CONFIG_HAVE_ARCH_KGDB=y 1841CONFIG_HAVE_ARCH_KGDB=y
1808# CONFIG_KGDB is not set 1842# CONFIG_KGDB is not set
1843# CONFIG_KMEMCHECK is not set
1844# CONFIG_PPC_DISABLE_WERROR is not set
1845CONFIG_PPC_WERROR=y
1809CONFIG_PRINT_STACK_DEPTH=64 1846CONFIG_PRINT_STACK_DEPTH=64
1810# CONFIG_DEBUG_STACKOVERFLOW is not set 1847# CONFIG_DEBUG_STACKOVERFLOW is not set
1811# CONFIG_DEBUG_STACK_USAGE is not set 1848# CONFIG_DEBUG_STACK_USAGE is not set
@@ -1829,7 +1866,6 @@ CONFIG_SECURITY_NETWORK=y
1829# CONFIG_SECURITY_PATH is not set 1866# CONFIG_SECURITY_PATH is not set
1830# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1867# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1831# CONFIG_SECURITY_ROOTPLUG is not set 1868# CONFIG_SECURITY_ROOTPLUG is not set
1832CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
1833# CONFIG_SECURITY_TOMOYO is not set 1869# CONFIG_SECURITY_TOMOYO is not set
1834CONFIG_CRYPTO=y 1870CONFIG_CRYPTO=y
1835 1871
diff --git a/arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig b/arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig
index cfd2efcc6bc..a61f183f718 100644
--- a/arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig
+++ b/arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:28 2009 4# Wed Jul 29 23:32:27 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_PHYS_64BIT is not set 20# CONFIG_PHYS_64BIT is not set
20CONFIG_ALTIVEC=y 21CONFIG_ALTIVEC=y
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24# CONFIG_SMP is not set 26# CONFIG_SMP is not set
25CONFIG_PPC32=y 27CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32 28CONFIG_WORD_SIZE=32
@@ -31,15 +33,16 @@ CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y 33CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y 34CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y 35CONFIG_GENERIC_HARDIRQS=y
36CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y 38CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y 39CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y 40CONFIG_HAVE_LATENCYTOP_SUPPORT=y
41CONFIG_TRACE_IRQFLAGS_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y 42CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y 43CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y 44CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y 45CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y 46CONFIG_GENERIC_FIND_NEXT_BIT=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
45CONFIG_PPC=y 48CONFIG_PPC=y
@@ -53,11 +56,13 @@ CONFIG_PPC_UDBG_16550=y
53# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
56CONFIG_DEFAULT_UIMAGE=y 60CONFIG_DEFAULT_UIMAGE=y
57# CONFIG_PPC_DCR_NATIVE is not set 61# CONFIG_PPC_DCR_NATIVE is not set
58# CONFIG_PPC_DCR_MMIO is not set 62# CONFIG_PPC_DCR_MMIO is not set
59CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 63CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
60CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 64CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
65CONFIG_CONSTRUCTORS=y
61 66
62# 67#
63# General setup 68# General setup
@@ -109,7 +114,6 @@ CONFIG_SYSCTL_SYSCALL=y
109CONFIG_KALLSYMS=y 114CONFIG_KALLSYMS=y
110# CONFIG_KALLSYMS_ALL is not set 115# CONFIG_KALLSYMS_ALL is not set
111CONFIG_KALLSYMS_EXTRA_PASS=y 116CONFIG_KALLSYMS_EXTRA_PASS=y
112# CONFIG_STRIP_ASM_SYMS is not set
113CONFIG_HOTPLUG=y 117CONFIG_HOTPLUG=y
114CONFIG_PRINTK=y 118CONFIG_PRINTK=y
115CONFIG_BUG=y 119CONFIG_BUG=y
@@ -122,9 +126,16 @@ CONFIG_TIMERFD=y
122CONFIG_EVENTFD=y 126CONFIG_EVENTFD=y
123CONFIG_SHMEM=y 127CONFIG_SHMEM=y
124CONFIG_AIO=y 128CONFIG_AIO=y
129CONFIG_HAVE_PERF_COUNTERS=y
130
131#
132# Performance Counters
133#
134# CONFIG_PERF_COUNTERS is not set
125CONFIG_VM_EVENT_COUNTERS=y 135CONFIG_VM_EVENT_COUNTERS=y
126CONFIG_PCI_QUIRKS=y 136CONFIG_PCI_QUIRKS=y
127CONFIG_SLUB_DEBUG=y 137CONFIG_SLUB_DEBUG=y
138# CONFIG_STRIP_ASM_SYMS is not set
128CONFIG_COMPAT_BRK=y 139CONFIG_COMPAT_BRK=y
129# CONFIG_SLAB is not set 140# CONFIG_SLAB is not set
130CONFIG_SLUB=y 141CONFIG_SLUB=y
@@ -138,6 +149,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
138CONFIG_HAVE_KPROBES=y 149CONFIG_HAVE_KPROBES=y
139CONFIG_HAVE_KRETPROBES=y 150CONFIG_HAVE_KRETPROBES=y
140CONFIG_HAVE_ARCH_TRACEHOOK=y 151CONFIG_HAVE_ARCH_TRACEHOOK=y
152
153#
154# GCOV-based kernel profiling
155#
141# CONFIG_SLOW_WORK is not set 156# CONFIG_SLOW_WORK is not set
142# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 157# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
143CONFIG_SLABINFO=y 158CONFIG_SLABINFO=y
@@ -150,7 +165,7 @@ CONFIG_MODULE_UNLOAD=y
150# CONFIG_MODVERSIONS is not set 165# CONFIG_MODVERSIONS is not set
151# CONFIG_MODULE_SRCVERSION_ALL is not set 166# CONFIG_MODULE_SRCVERSION_ALL is not set
152CONFIG_BLOCK=y 167CONFIG_BLOCK=y
153# CONFIG_LBD is not set 168CONFIG_LBDAF=y
154# CONFIG_BLK_DEV_BSG is not set 169# CONFIG_BLK_DEV_BSG is not set
155# CONFIG_BLK_DEV_INTEGRITY is not set 170# CONFIG_BLK_DEV_INTEGRITY is not set
156 171
@@ -230,6 +245,7 @@ CONFIG_BINFMT_ELF=y
230# CONFIG_HAVE_AOUT is not set 245# CONFIG_HAVE_AOUT is not set
231# CONFIG_BINFMT_MISC is not set 246# CONFIG_BINFMT_MISC is not set
232# CONFIG_IOMMU_HELPER is not set 247# CONFIG_IOMMU_HELPER is not set
248# CONFIG_SWIOTLB is not set
233CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 249CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
234CONFIG_ARCH_HAS_WALK_MEMORY=y 250CONFIG_ARCH_HAS_WALK_MEMORY=y
235CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 251CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -250,9 +266,9 @@ CONFIG_MIGRATION=y
250CONFIG_ZONE_DMA_FLAG=1 266CONFIG_ZONE_DMA_FLAG=1
251CONFIG_BOUNCE=y 267CONFIG_BOUNCE=y
252CONFIG_VIRT_TO_BUS=y 268CONFIG_VIRT_TO_BUS=y
253CONFIG_UNEVICTABLE_LRU=y
254CONFIG_HAVE_MLOCK=y 269CONFIG_HAVE_MLOCK=y
255CONFIG_HAVE_MLOCKED_PAGE_BIT=y 270CONFIG_HAVE_MLOCKED_PAGE_BIT=y
271CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
256CONFIG_PPC_4K_PAGES=y 272CONFIG_PPC_4K_PAGES=y
257# CONFIG_PPC_16K_PAGES is not set 273# CONFIG_PPC_16K_PAGES is not set
258# CONFIG_PPC_64K_PAGES is not set 274# CONFIG_PPC_64K_PAGES is not set
@@ -279,6 +295,8 @@ CONFIG_PCI_DOMAINS=y
279CONFIG_PCI_SYSCALL=y 295CONFIG_PCI_SYSCALL=y
280CONFIG_PCIEPORTBUS=y 296CONFIG_PCIEPORTBUS=y
281CONFIG_PCIEAER=y 297CONFIG_PCIEAER=y
298# CONFIG_PCIE_ECRC is not set
299# CONFIG_PCIEAER_INJECT is not set
282# CONFIG_PCIEASPM is not set 300# CONFIG_PCIEASPM is not set
283CONFIG_ARCH_SUPPORTS_MSI=y 301CONFIG_ARCH_SUPPORTS_MSI=y
284# CONFIG_PCI_MSI is not set 302# CONFIG_PCI_MSI is not set
@@ -381,6 +399,7 @@ CONFIG_IPV6_NDISC_NODETYPE=y
381# CONFIG_ECONET is not set 399# CONFIG_ECONET is not set
382# CONFIG_WAN_ROUTER is not set 400# CONFIG_WAN_ROUTER is not set
383# CONFIG_PHONET is not set 401# CONFIG_PHONET is not set
402# CONFIG_IEEE802154 is not set
384# CONFIG_NET_SCHED is not set 403# CONFIG_NET_SCHED is not set
385# CONFIG_DCB is not set 404# CONFIG_DCB is not set
386 405
@@ -398,7 +417,11 @@ CONFIG_WIRELESS=y
398CONFIG_WIRELESS_OLD_REGULATORY=y 417CONFIG_WIRELESS_OLD_REGULATORY=y
399# CONFIG_WIRELESS_EXT is not set 418# CONFIG_WIRELESS_EXT is not set
400# CONFIG_LIB80211 is not set 419# CONFIG_LIB80211 is not set
401# CONFIG_MAC80211 is not set 420
421#
422# CFG80211 needs to be enabled for MAC80211
423#
424CONFIG_MAC80211_DEFAULT_PS_VALUE=0
402# CONFIG_WIMAX is not set 425# CONFIG_WIMAX is not set
403# CONFIG_RFKILL is not set 426# CONFIG_RFKILL is not set
404# CONFIG_NET_9P is not set 427# CONFIG_NET_9P is not set
@@ -549,7 +572,9 @@ CONFIG_MISC_DEVICES=y
549# 572#
550# CONFIG_EEPROM_AT24 is not set 573# CONFIG_EEPROM_AT24 is not set
551# CONFIG_EEPROM_LEGACY is not set 574# CONFIG_EEPROM_LEGACY is not set
575# CONFIG_EEPROM_MAX6875 is not set
552# CONFIG_EEPROM_93CX6 is not set 576# CONFIG_EEPROM_93CX6 is not set
577# CONFIG_CB710_CORE is not set
553CONFIG_HAVE_IDE=y 578CONFIG_HAVE_IDE=y
554CONFIG_IDE=y 579CONFIG_IDE=y
555 580
@@ -620,10 +645,6 @@ CONFIG_BLK_DEV_SD=y
620# CONFIG_BLK_DEV_SR is not set 645# CONFIG_BLK_DEV_SR is not set
621CONFIG_CHR_DEV_SG=y 646CONFIG_CHR_DEV_SG=y
622# CONFIG_CHR_DEV_SCH is not set 647# CONFIG_CHR_DEV_SCH is not set
623
624#
625# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
626#
627# CONFIG_SCSI_MULTI_LUN is not set 648# CONFIG_SCSI_MULTI_LUN is not set
628# CONFIG_SCSI_CONSTANTS is not set 649# CONFIG_SCSI_CONSTANTS is not set
629# CONFIG_SCSI_LOGGING is not set 650# CONFIG_SCSI_LOGGING is not set
@@ -640,6 +661,7 @@ CONFIG_SCSI_WAIT_SCAN=m
640# CONFIG_SCSI_SRP_ATTRS is not set 661# CONFIG_SCSI_SRP_ATTRS is not set
641CONFIG_SCSI_LOWLEVEL=y 662CONFIG_SCSI_LOWLEVEL=y
642# CONFIG_ISCSI_TCP is not set 663# CONFIG_ISCSI_TCP is not set
664# CONFIG_SCSI_BNX2_ISCSI is not set
643# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 665# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
644# CONFIG_SCSI_3W_9XXX is not set 666# CONFIG_SCSI_3W_9XXX is not set
645# CONFIG_SCSI_ACARD is not set 667# CONFIG_SCSI_ACARD is not set
@@ -648,6 +670,7 @@ CONFIG_SCSI_LOWLEVEL=y
648# CONFIG_SCSI_AIC7XXX_OLD is not set 670# CONFIG_SCSI_AIC7XXX_OLD is not set
649# CONFIG_SCSI_AIC79XX is not set 671# CONFIG_SCSI_AIC79XX is not set
650# CONFIG_SCSI_AIC94XX is not set 672# CONFIG_SCSI_AIC94XX is not set
673# CONFIG_SCSI_MVSAS is not set
651# CONFIG_SCSI_DPT_I2O is not set 674# CONFIG_SCSI_DPT_I2O is not set
652# CONFIG_SCSI_ADVANSYS is not set 675# CONFIG_SCSI_ADVANSYS is not set
653# CONFIG_SCSI_ARCMSR is not set 676# CONFIG_SCSI_ARCMSR is not set
@@ -667,7 +690,6 @@ CONFIG_SCSI_LOWLEVEL=y
667# CONFIG_SCSI_IPS is not set 690# CONFIG_SCSI_IPS is not set
668# CONFIG_SCSI_INITIO is not set 691# CONFIG_SCSI_INITIO is not set
669# CONFIG_SCSI_INIA100 is not set 692# CONFIG_SCSI_INIA100 is not set
670# CONFIG_SCSI_MVSAS is not set
671# CONFIG_SCSI_STEX is not set 693# CONFIG_SCSI_STEX is not set
672# CONFIG_SCSI_SYM53C8XX_2 is not set 694# CONFIG_SCSI_SYM53C8XX_2 is not set
673# CONFIG_SCSI_IPR is not set 695# CONFIG_SCSI_IPR is not set
@@ -751,14 +773,17 @@ CONFIG_PATA_ALI=y
751# 773#
752 774
753# 775#
754# Enable only one of the two stacks, unless you know what you are doing 776# You can enable one or both FireWire driver stacks.
777#
778
779#
780# See the help texts for more information.
755# 781#
756# CONFIG_FIREWIRE is not set 782# CONFIG_FIREWIRE is not set
757# CONFIG_IEEE1394 is not set 783# CONFIG_IEEE1394 is not set
758# CONFIG_I2O is not set 784# CONFIG_I2O is not set
759# CONFIG_MACINTOSH_DRIVERS is not set 785# CONFIG_MACINTOSH_DRIVERS is not set
760CONFIG_NETDEVICES=y 786CONFIG_NETDEVICES=y
761CONFIG_COMPAT_NET_DEV_OPS=y
762CONFIG_DUMMY=y 787CONFIG_DUMMY=y
763# CONFIG_BONDING is not set 788# CONFIG_BONDING is not set
764# CONFIG_MACVLAN is not set 789# CONFIG_MACVLAN is not set
@@ -792,6 +817,7 @@ CONFIG_ULI526X=y
792# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 817# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
793# CONFIG_NET_PCI is not set 818# CONFIG_NET_PCI is not set
794# CONFIG_B44 is not set 819# CONFIG_B44 is not set
820# CONFIG_KS8842 is not set
795# CONFIG_ATL2 is not set 821# CONFIG_ATL2 is not set
796# CONFIG_NETDEV_1000 is not set 822# CONFIG_NETDEV_1000 is not set
797# CONFIG_NETDEV_10000 is not set 823# CONFIG_NETDEV_10000 is not set
@@ -959,13 +985,17 @@ CONFIG_I2C_MPC=y
959# CONFIG_SENSORS_PCF8574 is not set 985# CONFIG_SENSORS_PCF8574 is not set
960# CONFIG_PCF8575 is not set 986# CONFIG_PCF8575 is not set
961# CONFIG_SENSORS_PCA9539 is not set 987# CONFIG_SENSORS_PCA9539 is not set
962# CONFIG_SENSORS_MAX6875 is not set
963# CONFIG_SENSORS_TSL2550 is not set 988# CONFIG_SENSORS_TSL2550 is not set
964# CONFIG_I2C_DEBUG_CORE is not set 989# CONFIG_I2C_DEBUG_CORE is not set
965# CONFIG_I2C_DEBUG_ALGO is not set 990# CONFIG_I2C_DEBUG_ALGO is not set
966# CONFIG_I2C_DEBUG_BUS is not set 991# CONFIG_I2C_DEBUG_BUS is not set
967# CONFIG_I2C_DEBUG_CHIP is not set 992# CONFIG_I2C_DEBUG_CHIP is not set
968# CONFIG_SPI is not set 993# CONFIG_SPI is not set
994
995#
996# PPS support
997#
998# CONFIG_PPS is not set
969CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 999CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
970# CONFIG_GPIOLIB is not set 1000# CONFIG_GPIOLIB is not set
971# CONFIG_W1 is not set 1001# CONFIG_W1 is not set
@@ -993,23 +1023,9 @@ CONFIG_SSB_POSSIBLE=y
993# CONFIG_MFD_WM8400 is not set 1023# CONFIG_MFD_WM8400 is not set
994# CONFIG_MFD_WM8350_I2C is not set 1024# CONFIG_MFD_WM8350_I2C is not set
995# CONFIG_MFD_PCF50633 is not set 1025# CONFIG_MFD_PCF50633 is not set
1026# CONFIG_AB3100_CORE is not set
996# CONFIG_REGULATOR is not set 1027# CONFIG_REGULATOR is not set
997 1028# CONFIG_MEDIA_SUPPORT is not set
998#
999# Multimedia devices
1000#
1001
1002#
1003# Multimedia core support
1004#
1005# CONFIG_VIDEO_DEV is not set
1006# CONFIG_DVB_CORE is not set
1007# CONFIG_VIDEO_MEDIA is not set
1008
1009#
1010# Multimedia drivers
1011#
1012CONFIG_DAB=y
1013 1029
1014# 1030#
1015# Graphics support 1031# Graphics support
@@ -1106,6 +1122,11 @@ CONFIG_SND_PCM_OSS_PLUGINS=y
1106CONFIG_SND_VERBOSE_PROCFS=y 1122CONFIG_SND_VERBOSE_PROCFS=y
1107# CONFIG_SND_VERBOSE_PRINTK is not set 1123# CONFIG_SND_VERBOSE_PRINTK is not set
1108# CONFIG_SND_DEBUG is not set 1124# CONFIG_SND_DEBUG is not set
1125# CONFIG_SND_RAWMIDI_SEQ is not set
1126# CONFIG_SND_OPL3_LIB_SEQ is not set
1127# CONFIG_SND_OPL4_LIB_SEQ is not set
1128# CONFIG_SND_SBAWE_SEQ is not set
1129# CONFIG_SND_EMU10K1_SEQ is not set
1109CONFIG_SND_DRIVERS=y 1130CONFIG_SND_DRIVERS=y
1110# CONFIG_SND_DUMMY is not set 1131# CONFIG_SND_DUMMY is not set
1111# CONFIG_SND_MTPAV is not set 1132# CONFIG_SND_MTPAV is not set
@@ -1130,6 +1151,7 @@ CONFIG_SND_PCI=y
1130# CONFIG_SND_CS4281 is not set 1151# CONFIG_SND_CS4281 is not set
1131# CONFIG_SND_CS46XX is not set 1152# CONFIG_SND_CS46XX is not set
1132# CONFIG_SND_CS5530 is not set 1153# CONFIG_SND_CS5530 is not set
1154# CONFIG_SND_CTXFI is not set
1133# CONFIG_SND_DARLA20 is not set 1155# CONFIG_SND_DARLA20 is not set
1134# CONFIG_SND_GINA20 is not set 1156# CONFIG_SND_GINA20 is not set
1135# CONFIG_SND_LAYLA20 is not set 1157# CONFIG_SND_LAYLA20 is not set
@@ -1160,6 +1182,7 @@ CONFIG_SND_PCI=y
1160# CONFIG_SND_INTEL8X0 is not set 1182# CONFIG_SND_INTEL8X0 is not set
1161# CONFIG_SND_INTEL8X0M is not set 1183# CONFIG_SND_INTEL8X0M is not set
1162# CONFIG_SND_KORG1212 is not set 1184# CONFIG_SND_KORG1212 is not set
1185# CONFIG_SND_LX6464ES is not set
1163# CONFIG_SND_MAESTRO3 is not set 1186# CONFIG_SND_MAESTRO3 is not set
1164# CONFIG_SND_MIXART is not set 1187# CONFIG_SND_MIXART is not set
1165# CONFIG_SND_NM256 is not set 1188# CONFIG_SND_NM256 is not set
@@ -1251,6 +1274,7 @@ CONFIG_RTC_INTF_DEV=y
1251# CONFIG_RTC_DRV_S35390A is not set 1274# CONFIG_RTC_DRV_S35390A is not set
1252# CONFIG_RTC_DRV_FM3130 is not set 1275# CONFIG_RTC_DRV_FM3130 is not set
1253# CONFIG_RTC_DRV_RX8581 is not set 1276# CONFIG_RTC_DRV_RX8581 is not set
1277# CONFIG_RTC_DRV_RX8025 is not set
1254 1278
1255# 1279#
1256# SPI RTC drivers 1280# SPI RTC drivers
@@ -1278,6 +1302,10 @@ CONFIG_RTC_DRV_CMOS=y
1278# CONFIG_DMADEVICES is not set 1302# CONFIG_DMADEVICES is not set
1279# CONFIG_AUXDISPLAY is not set 1303# CONFIG_AUXDISPLAY is not set
1280# CONFIG_UIO is not set 1304# CONFIG_UIO is not set
1305
1306#
1307# TI VLYNQ
1308#
1281# CONFIG_STAGING is not set 1309# CONFIG_STAGING is not set
1282 1310
1283# 1311#
@@ -1297,12 +1325,15 @@ CONFIG_FS_MBCACHE=y
1297# CONFIG_REISERFS_FS is not set 1325# CONFIG_REISERFS_FS is not set
1298# CONFIG_JFS_FS is not set 1326# CONFIG_JFS_FS is not set
1299# CONFIG_FS_POSIX_ACL is not set 1327# CONFIG_FS_POSIX_ACL is not set
1300CONFIG_FILE_LOCKING=y
1301# CONFIG_XFS_FS is not set 1328# CONFIG_XFS_FS is not set
1329# CONFIG_GFS2_FS is not set
1302# CONFIG_OCFS2_FS is not set 1330# CONFIG_OCFS2_FS is not set
1303# CONFIG_BTRFS_FS is not set 1331# CONFIG_BTRFS_FS is not set
1332CONFIG_FILE_LOCKING=y
1333CONFIG_FSNOTIFY=y
1304# CONFIG_DNOTIFY is not set 1334# CONFIG_DNOTIFY is not set
1305# CONFIG_INOTIFY is not set 1335# CONFIG_INOTIFY is not set
1336CONFIG_INOTIFY_USER=y
1306# CONFIG_QUOTA is not set 1337# CONFIG_QUOTA is not set
1307# CONFIG_AUTOFS_FS is not set 1338# CONFIG_AUTOFS_FS is not set
1308# CONFIG_AUTOFS4_FS is not set 1339# CONFIG_AUTOFS4_FS is not set
@@ -1464,6 +1495,7 @@ CONFIG_HAS_IOPORT=y
1464CONFIG_HAS_DMA=y 1495CONFIG_HAS_DMA=y
1465CONFIG_HAVE_LMB=y 1496CONFIG_HAVE_LMB=y
1466CONFIG_NLATTR=y 1497CONFIG_NLATTR=y
1498CONFIG_GENERIC_ATOMIC64=y
1467 1499
1468# 1500#
1469# Kernel hacking 1501# Kernel hacking
@@ -1494,6 +1526,9 @@ CONFIG_SCHED_DEBUG=y
1494# CONFIG_RT_MUTEX_TESTER is not set 1526# CONFIG_RT_MUTEX_TESTER is not set
1495# CONFIG_DEBUG_SPINLOCK is not set 1527# CONFIG_DEBUG_SPINLOCK is not set
1496# CONFIG_DEBUG_MUTEXES is not set 1528# CONFIG_DEBUG_MUTEXES is not set
1529# CONFIG_DEBUG_LOCK_ALLOC is not set
1530# CONFIG_PROVE_LOCKING is not set
1531# CONFIG_LOCK_STAT is not set
1497# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1532# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1498# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1533# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1499# CONFIG_DEBUG_KOBJECT is not set 1534# CONFIG_DEBUG_KOBJECT is not set
@@ -1506,7 +1541,6 @@ CONFIG_DEBUG_INFO=y
1506# CONFIG_DEBUG_LIST is not set 1541# CONFIG_DEBUG_LIST is not set
1507# CONFIG_DEBUG_SG is not set 1542# CONFIG_DEBUG_SG is not set
1508# CONFIG_DEBUG_NOTIFIERS is not set 1543# CONFIG_DEBUG_NOTIFIERS is not set
1509# CONFIG_BOOT_PRINTK_DELAY is not set
1510# CONFIG_RCU_TORTURE_TEST is not set 1544# CONFIG_RCU_TORTURE_TEST is not set
1511# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1545# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1512# CONFIG_BACKTRACE_SELF_TEST is not set 1546# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1520,16 +1554,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1520CONFIG_HAVE_DYNAMIC_FTRACE=y 1554CONFIG_HAVE_DYNAMIC_FTRACE=y
1521CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1555CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1522CONFIG_TRACING_SUPPORT=y 1556CONFIG_TRACING_SUPPORT=y
1523 1557CONFIG_FTRACE=y
1524#
1525# Tracers
1526#
1527# CONFIG_FUNCTION_TRACER is not set 1558# CONFIG_FUNCTION_TRACER is not set
1559# CONFIG_IRQSOFF_TRACER is not set
1528# CONFIG_SCHED_TRACER is not set 1560# CONFIG_SCHED_TRACER is not set
1529# CONFIG_CONTEXT_SWITCH_TRACER is not set 1561# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1530# CONFIG_EVENT_TRACER is not set
1531# CONFIG_BOOT_TRACER is not set 1562# CONFIG_BOOT_TRACER is not set
1532# CONFIG_TRACE_BRANCH_PROFILING is not set 1563CONFIG_BRANCH_PROFILE_NONE=y
1564# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1565# CONFIG_PROFILE_ALL_BRANCHES is not set
1533# CONFIG_STACK_TRACER is not set 1566# CONFIG_STACK_TRACER is not set
1534# CONFIG_KMEMTRACE is not set 1567# CONFIG_KMEMTRACE is not set
1535# CONFIG_WORKQUEUE_TRACER is not set 1568# CONFIG_WORKQUEUE_TRACER is not set
@@ -1537,6 +1570,9 @@ CONFIG_TRACING_SUPPORT=y
1537# CONFIG_SAMPLES is not set 1570# CONFIG_SAMPLES is not set
1538CONFIG_HAVE_ARCH_KGDB=y 1571CONFIG_HAVE_ARCH_KGDB=y
1539# CONFIG_KGDB is not set 1572# CONFIG_KGDB is not set
1573# CONFIG_KMEMCHECK is not set
1574# CONFIG_PPC_DISABLE_WERROR is not set
1575CONFIG_PPC_WERROR=y
1540CONFIG_PRINT_STACK_DEPTH=64 1576CONFIG_PRINT_STACK_DEPTH=64
1541# CONFIG_DEBUG_STACKOVERFLOW is not set 1577# CONFIG_DEBUG_STACKOVERFLOW is not set
1542# CONFIG_DEBUG_STACK_USAGE is not set 1578# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig b/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig
index 0bee3e30394..7016ce73260 100644
--- a/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig
+++ b/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:28 2009 4# Wed Jul 29 23:32:28 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_PHYS_64BIT is not set 20# CONFIG_PHYS_64BIT is not set
20CONFIG_ALTIVEC=y 21CONFIG_ALTIVEC=y
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24CONFIG_SMP=y 26CONFIG_SMP=y
25CONFIG_NR_CPUS=2 27CONFIG_NR_CPUS=2
26CONFIG_PPC32=y 28CONFIG_PPC32=y
@@ -32,15 +34,16 @@ CONFIG_GENERIC_TIME=y
32CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
33CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
34CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
35# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
36CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
37CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
38CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
39CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
40CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
41CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
42CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
43CONFIG_GENERIC_CALIBRATE_DELAY=y
44CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
45# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
46CONFIG_PPC=y 49CONFIG_PPC=y
@@ -54,11 +57,13 @@ CONFIG_PPC_UDBG_16550=y
54CONFIG_GENERIC_TBSYNC=y 57CONFIG_GENERIC_TBSYNC=y
55CONFIG_AUDIT_ARCH=y 58CONFIG_AUDIT_ARCH=y
56CONFIG_GENERIC_BUG=y 59CONFIG_GENERIC_BUG=y
60CONFIG_DTC=y
57CONFIG_DEFAULT_UIMAGE=y 61CONFIG_DEFAULT_UIMAGE=y
58# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
59# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
60CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
61CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
62 67
63# 68#
64# General setup 69# General setup
@@ -113,7 +118,6 @@ CONFIG_SYSCTL_SYSCALL=y
113CONFIG_KALLSYMS=y 118CONFIG_KALLSYMS=y
114CONFIG_KALLSYMS_ALL=y 119CONFIG_KALLSYMS_ALL=y
115CONFIG_KALLSYMS_EXTRA_PASS=y 120CONFIG_KALLSYMS_EXTRA_PASS=y
116# CONFIG_STRIP_ASM_SYMS is not set
117CONFIG_HOTPLUG=y 121CONFIG_HOTPLUG=y
118CONFIG_PRINTK=y 122CONFIG_PRINTK=y
119CONFIG_BUG=y 123CONFIG_BUG=y
@@ -126,9 +130,16 @@ CONFIG_TIMERFD=y
126CONFIG_EVENTFD=y 130CONFIG_EVENTFD=y
127CONFIG_SHMEM=y 131CONFIG_SHMEM=y
128CONFIG_AIO=y 132CONFIG_AIO=y
133CONFIG_HAVE_PERF_COUNTERS=y
134
135#
136# Performance Counters
137#
138# CONFIG_PERF_COUNTERS is not set
129CONFIG_VM_EVENT_COUNTERS=y 139CONFIG_VM_EVENT_COUNTERS=y
130CONFIG_PCI_QUIRKS=y 140CONFIG_PCI_QUIRKS=y
131CONFIG_SLUB_DEBUG=y 141CONFIG_SLUB_DEBUG=y
142# CONFIG_STRIP_ASM_SYMS is not set
132CONFIG_COMPAT_BRK=y 143CONFIG_COMPAT_BRK=y
133# CONFIG_SLAB is not set 144# CONFIG_SLAB is not set
134CONFIG_SLUB=y 145CONFIG_SLUB=y
@@ -143,6 +154,10 @@ CONFIG_HAVE_KPROBES=y
143CONFIG_HAVE_KRETPROBES=y 154CONFIG_HAVE_KRETPROBES=y
144CONFIG_HAVE_ARCH_TRACEHOOK=y 155CONFIG_HAVE_ARCH_TRACEHOOK=y
145CONFIG_USE_GENERIC_SMP_HELPERS=y 156CONFIG_USE_GENERIC_SMP_HELPERS=y
157
158#
159# GCOV-based kernel profiling
160#
146# CONFIG_SLOW_WORK is not set 161# CONFIG_SLOW_WORK is not set
147# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 162# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
148CONFIG_SLABINFO=y 163CONFIG_SLABINFO=y
@@ -156,7 +171,7 @@ CONFIG_MODVERSIONS=y
156# CONFIG_MODULE_SRCVERSION_ALL is not set 171# CONFIG_MODULE_SRCVERSION_ALL is not set
157CONFIG_STOP_MACHINE=y 172CONFIG_STOP_MACHINE=y
158CONFIG_BLOCK=y 173CONFIG_BLOCK=y
159CONFIG_LBD=y 174CONFIG_LBDAF=y
160# CONFIG_BLK_DEV_BSG is not set 175# CONFIG_BLK_DEV_BSG is not set
161# CONFIG_BLK_DEV_INTEGRITY is not set 176# CONFIG_BLK_DEV_INTEGRITY is not set
162 177
@@ -234,7 +249,9 @@ CONFIG_BINFMT_ELF=y
234# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 249# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
235# CONFIG_HAVE_AOUT is not set 250# CONFIG_HAVE_AOUT is not set
236CONFIG_BINFMT_MISC=m 251CONFIG_BINFMT_MISC=m
237# CONFIG_IOMMU_HELPER is not set 252CONFIG_IOMMU_HELPER=y
253CONFIG_SWIOTLB=y
254CONFIG_PPC_NEED_DMA_SYNC_OPS=y
238CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 255CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
239CONFIG_ARCH_HAS_WALK_MEMORY=y 256CONFIG_ARCH_HAS_WALK_MEMORY=y
240CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 257CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -256,9 +273,9 @@ CONFIG_MIGRATION=y
256CONFIG_ZONE_DMA_FLAG=1 273CONFIG_ZONE_DMA_FLAG=1
257CONFIG_BOUNCE=y 274CONFIG_BOUNCE=y
258CONFIG_VIRT_TO_BUS=y 275CONFIG_VIRT_TO_BUS=y
259CONFIG_UNEVICTABLE_LRU=y
260CONFIG_HAVE_MLOCK=y 276CONFIG_HAVE_MLOCK=y
261CONFIG_HAVE_MLOCKED_PAGE_BIT=y 277CONFIG_HAVE_MLOCKED_PAGE_BIT=y
278CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
262CONFIG_PPC_4K_PAGES=y 279CONFIG_PPC_4K_PAGES=y
263# CONFIG_PPC_16K_PAGES is not set 280# CONFIG_PPC_16K_PAGES is not set
264# CONFIG_PPC_64K_PAGES is not set 281# CONFIG_PPC_64K_PAGES is not set
@@ -401,6 +418,7 @@ CONFIG_SCTP_HMAC_MD5=y
401# CONFIG_ECONET is not set 418# CONFIG_ECONET is not set
402# CONFIG_WAN_ROUTER is not set 419# CONFIG_WAN_ROUTER is not set
403# CONFIG_PHONET is not set 420# CONFIG_PHONET is not set
421# CONFIG_IEEE802154 is not set
404# CONFIG_NET_SCHED is not set 422# CONFIG_NET_SCHED is not set
405# CONFIG_DCB is not set 423# CONFIG_DCB is not set
406 424
@@ -419,7 +437,11 @@ CONFIG_WIRELESS=y
419CONFIG_WIRELESS_OLD_REGULATORY=y 437CONFIG_WIRELESS_OLD_REGULATORY=y
420# CONFIG_WIRELESS_EXT is not set 438# CONFIG_WIRELESS_EXT is not set
421# CONFIG_LIB80211 is not set 439# CONFIG_LIB80211 is not set
422# CONFIG_MAC80211 is not set 440
441#
442# CFG80211 needs to be enabled for MAC80211
443#
444CONFIG_MAC80211_DEFAULT_PS_VALUE=0
423# CONFIG_WIMAX is not set 445# CONFIG_WIMAX is not set
424# CONFIG_RFKILL is not set 446# CONFIG_RFKILL is not set
425# CONFIG_NET_9P is not set 447# CONFIG_NET_9P is not set
@@ -444,6 +466,7 @@ CONFIG_EXTRA_FIRMWARE=""
444# CONFIG_MTD is not set 466# CONFIG_MTD is not set
445CONFIG_OF_DEVICE=y 467CONFIG_OF_DEVICE=y
446CONFIG_OF_I2C=y 468CONFIG_OF_I2C=y
469CONFIG_OF_MDIO=y
447# CONFIG_PARPORT is not set 470# CONFIG_PARPORT is not set
448CONFIG_BLK_DEV=y 471CONFIG_BLK_DEV=y
449# CONFIG_BLK_DEV_FD is not set 472# CONFIG_BLK_DEV_FD is not set
@@ -479,7 +502,9 @@ CONFIG_MISC_DEVICES=y
479# 502#
480# CONFIG_EEPROM_AT24 is not set 503# CONFIG_EEPROM_AT24 is not set
481CONFIG_EEPROM_LEGACY=y 504CONFIG_EEPROM_LEGACY=y
505# CONFIG_EEPROM_MAX6875 is not set
482# CONFIG_EEPROM_93CX6 is not set 506# CONFIG_EEPROM_93CX6 is not set
507# CONFIG_CB710_CORE is not set
483CONFIG_HAVE_IDE=y 508CONFIG_HAVE_IDE=y
484# CONFIG_IDE is not set 509# CONFIG_IDE is not set
485 510
@@ -503,10 +528,6 @@ CONFIG_BLK_DEV_SR=y
503# CONFIG_BLK_DEV_SR_VENDOR is not set 528# CONFIG_BLK_DEV_SR_VENDOR is not set
504CONFIG_CHR_DEV_SG=y 529CONFIG_CHR_DEV_SG=y
505# CONFIG_CHR_DEV_SCH is not set 530# CONFIG_CHR_DEV_SCH is not set
506
507#
508# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
509#
510CONFIG_SCSI_MULTI_LUN=y 531CONFIG_SCSI_MULTI_LUN=y
511# CONFIG_SCSI_CONSTANTS is not set 532# CONFIG_SCSI_CONSTANTS is not set
512CONFIG_SCSI_LOGGING=y 533CONFIG_SCSI_LOGGING=y
@@ -524,6 +545,7 @@ CONFIG_SCSI_WAIT_SCAN=m
524CONFIG_SCSI_LOWLEVEL=y 545CONFIG_SCSI_LOWLEVEL=y
525# CONFIG_ISCSI_TCP is not set 546# CONFIG_ISCSI_TCP is not set
526# CONFIG_SCSI_CXGB3_ISCSI is not set 547# CONFIG_SCSI_CXGB3_ISCSI is not set
548# CONFIG_SCSI_BNX2_ISCSI is not set
527# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 549# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
528# CONFIG_SCSI_3W_9XXX is not set 550# CONFIG_SCSI_3W_9XXX is not set
529# CONFIG_SCSI_ACARD is not set 551# CONFIG_SCSI_ACARD is not set
@@ -532,6 +554,7 @@ CONFIG_SCSI_LOWLEVEL=y
532# CONFIG_SCSI_AIC7XXX_OLD is not set 554# CONFIG_SCSI_AIC7XXX_OLD is not set
533# CONFIG_SCSI_AIC79XX is not set 555# CONFIG_SCSI_AIC79XX is not set
534# CONFIG_SCSI_AIC94XX is not set 556# CONFIG_SCSI_AIC94XX is not set
557# CONFIG_SCSI_MVSAS is not set
535# CONFIG_SCSI_DPT_I2O is not set 558# CONFIG_SCSI_DPT_I2O is not set
536# CONFIG_SCSI_ADVANSYS is not set 559# CONFIG_SCSI_ADVANSYS is not set
537# CONFIG_SCSI_ARCMSR is not set 560# CONFIG_SCSI_ARCMSR is not set
@@ -551,7 +574,6 @@ CONFIG_SCSI_LOWLEVEL=y
551# CONFIG_SCSI_IPS is not set 574# CONFIG_SCSI_IPS is not set
552# CONFIG_SCSI_INITIO is not set 575# CONFIG_SCSI_INITIO is not set
553# CONFIG_SCSI_INIA100 is not set 576# CONFIG_SCSI_INIA100 is not set
554# CONFIG_SCSI_MVSAS is not set
555# CONFIG_SCSI_STEX is not set 577# CONFIG_SCSI_STEX is not set
556# CONFIG_SCSI_SYM53C8XX_2 is not set 578# CONFIG_SCSI_SYM53C8XX_2 is not set
557# CONFIG_SCSI_IPR is not set 579# CONFIG_SCSI_IPR is not set
@@ -635,14 +657,17 @@ CONFIG_PATA_ALI=y
635# 657#
636 658
637# 659#
638# Enable only one of the two stacks, unless you know what you are doing 660# You can enable one or both FireWire driver stacks.
661#
662
663#
664# See the help texts for more information.
639# 665#
640# CONFIG_FIREWIRE is not set 666# CONFIG_FIREWIRE is not set
641# CONFIG_IEEE1394 is not set 667# CONFIG_IEEE1394 is not set
642# CONFIG_I2O is not set 668# CONFIG_I2O is not set
643# CONFIG_MACINTOSH_DRIVERS is not set 669# CONFIG_MACINTOSH_DRIVERS is not set
644CONFIG_NETDEVICES=y 670CONFIG_NETDEVICES=y
645CONFIG_COMPAT_NET_DEV_OPS=y
646CONFIG_DUMMY=y 671CONFIG_DUMMY=y
647# CONFIG_BONDING is not set 672# CONFIG_BONDING is not set
648# CONFIG_MACVLAN is not set 673# CONFIG_MACVLAN is not set
@@ -689,6 +714,7 @@ CONFIG_MII=y
689# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 714# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
690# CONFIG_NET_PCI is not set 715# CONFIG_NET_PCI is not set
691# CONFIG_B44 is not set 716# CONFIG_B44 is not set
717# CONFIG_KS8842 is not set
692# CONFIG_ATL2 is not set 718# CONFIG_ATL2 is not set
693CONFIG_NETDEV_1000=y 719CONFIG_NETDEV_1000=y
694# CONFIG_ACENIC is not set 720# CONFIG_ACENIC is not set
@@ -708,8 +734,10 @@ CONFIG_NETDEV_1000=y
708# CONFIG_VIA_VELOCITY is not set 734# CONFIG_VIA_VELOCITY is not set
709# CONFIG_TIGON3 is not set 735# CONFIG_TIGON3 is not set
710# CONFIG_BNX2 is not set 736# CONFIG_BNX2 is not set
737# CONFIG_CNIC is not set
711CONFIG_FSL_PQ_MDIO=y 738CONFIG_FSL_PQ_MDIO=y
712CONFIG_GIANFAR=y 739CONFIG_GIANFAR=y
740# CONFIG_MV643XX_ETH is not set
713# CONFIG_QLA3XXX is not set 741# CONFIG_QLA3XXX is not set
714# CONFIG_ATL1 is not set 742# CONFIG_ATL1 is not set
715# CONFIG_ATL1E is not set 743# CONFIG_ATL1E is not set
@@ -909,13 +937,17 @@ CONFIG_I2C_MPC=y
909# CONFIG_SENSORS_PCF8574 is not set 937# CONFIG_SENSORS_PCF8574 is not set
910# CONFIG_PCF8575 is not set 938# CONFIG_PCF8575 is not set
911# CONFIG_SENSORS_PCA9539 is not set 939# CONFIG_SENSORS_PCA9539 is not set
912# CONFIG_SENSORS_MAX6875 is not set
913# CONFIG_SENSORS_TSL2550 is not set 940# CONFIG_SENSORS_TSL2550 is not set
914# CONFIG_I2C_DEBUG_CORE is not set 941# CONFIG_I2C_DEBUG_CORE is not set
915# CONFIG_I2C_DEBUG_ALGO is not set 942# CONFIG_I2C_DEBUG_ALGO is not set
916# CONFIG_I2C_DEBUG_BUS is not set 943# CONFIG_I2C_DEBUG_BUS is not set
917# CONFIG_I2C_DEBUG_CHIP is not set 944# CONFIG_I2C_DEBUG_CHIP is not set
918# CONFIG_SPI is not set 945# CONFIG_SPI is not set
946
947#
948# PPS support
949#
950# CONFIG_PPS is not set
919CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 951CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
920# CONFIG_GPIOLIB is not set 952# CONFIG_GPIOLIB is not set
921# CONFIG_W1 is not set 953# CONFIG_W1 is not set
@@ -943,76 +975,9 @@ CONFIG_SSB_POSSIBLE=y
943# CONFIG_MFD_WM8400 is not set 975# CONFIG_MFD_WM8400 is not set
944# CONFIG_MFD_WM8350_I2C is not set 976# CONFIG_MFD_WM8350_I2C is not set
945# CONFIG_MFD_PCF50633 is not set 977# CONFIG_MFD_PCF50633 is not set
978# CONFIG_AB3100_CORE is not set
946# CONFIG_REGULATOR is not set 979# CONFIG_REGULATOR is not set
947 980# CONFIG_MEDIA_SUPPORT is not set
948#
949# Multimedia devices
950#
951
952#
953# Multimedia core support
954#
955# CONFIG_VIDEO_DEV is not set
956CONFIG_DVB_CORE=m
957CONFIG_VIDEO_MEDIA=m
958
959#
960# Multimedia drivers
961#
962# CONFIG_MEDIA_ATTACH is not set
963CONFIG_MEDIA_TUNER=m
964# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
965CONFIG_MEDIA_TUNER_SIMPLE=m
966CONFIG_MEDIA_TUNER_TDA8290=m
967CONFIG_MEDIA_TUNER_TDA9887=m
968CONFIG_MEDIA_TUNER_TEA5761=m
969CONFIG_MEDIA_TUNER_TEA5767=m
970CONFIG_MEDIA_TUNER_MT20XX=m
971CONFIG_MEDIA_TUNER_XC2028=m
972CONFIG_MEDIA_TUNER_XC5000=m
973CONFIG_MEDIA_TUNER_MC44S803=m
974# CONFIG_DVB_DYNAMIC_MINORS is not set
975CONFIG_DVB_CAPTURE_DRIVERS=y
976
977#
978# Supported SAA7146 based PCI Adapters
979#
980# CONFIG_TTPCI_EEPROM is not set
981# CONFIG_DVB_BUDGET_CORE is not set
982
983#
984# Supported USB Adapters
985#
986# CONFIG_DVB_USB is not set
987# CONFIG_DVB_TTUSB_BUDGET is not set
988# CONFIG_DVB_TTUSB_DEC is not set
989# CONFIG_DVB_SIANO_SMS1XXX is not set
990
991#
992# Supported FlexCopII (B2C2) Adapters
993#
994# CONFIG_DVB_B2C2_FLEXCOP is not set
995
996#
997# Supported BT878 Adapters
998#
999
1000#
1001# Supported Pluto2 Adapters
1002#
1003# CONFIG_DVB_PLUTO2 is not set
1004
1005#
1006# Supported SDMC DM1105 Adapters
1007#
1008# CONFIG_DVB_DM1105 is not set
1009
1010#
1011# Supported DVB Frontends
1012#
1013# CONFIG_DVB_FE_CUSTOMISE is not set
1014CONFIG_DAB=y
1015# CONFIG_USB_DABUSB is not set
1016 981
1017# 982#
1018# Graphics support 983# Graphics support
@@ -1052,6 +1017,11 @@ CONFIG_SND_VERBOSE_PROCFS=y
1052# CONFIG_SND_VERBOSE_PRINTK is not set 1017# CONFIG_SND_VERBOSE_PRINTK is not set
1053# CONFIG_SND_DEBUG is not set 1018# CONFIG_SND_DEBUG is not set
1054CONFIG_SND_VMASTER=y 1019CONFIG_SND_VMASTER=y
1020# CONFIG_SND_RAWMIDI_SEQ is not set
1021# CONFIG_SND_OPL3_LIB_SEQ is not set
1022# CONFIG_SND_OPL4_LIB_SEQ is not set
1023# CONFIG_SND_SBAWE_SEQ is not set
1024# CONFIG_SND_EMU10K1_SEQ is not set
1055CONFIG_SND_AC97_CODEC=y 1025CONFIG_SND_AC97_CODEC=y
1056CONFIG_SND_DRIVERS=y 1026CONFIG_SND_DRIVERS=y
1057# CONFIG_SND_DUMMY is not set 1027# CONFIG_SND_DUMMY is not set
@@ -1078,6 +1048,7 @@ CONFIG_SND_PCI=y
1078# CONFIG_SND_CS4281 is not set 1048# CONFIG_SND_CS4281 is not set
1079# CONFIG_SND_CS46XX is not set 1049# CONFIG_SND_CS46XX is not set
1080# CONFIG_SND_CS5530 is not set 1050# CONFIG_SND_CS5530 is not set
1051# CONFIG_SND_CTXFI is not set
1081# CONFIG_SND_DARLA20 is not set 1052# CONFIG_SND_DARLA20 is not set
1082# CONFIG_SND_GINA20 is not set 1053# CONFIG_SND_GINA20 is not set
1083# CONFIG_SND_LAYLA20 is not set 1054# CONFIG_SND_LAYLA20 is not set
@@ -1108,6 +1079,7 @@ CONFIG_SND_PCI=y
1108CONFIG_SND_INTEL8X0=y 1079CONFIG_SND_INTEL8X0=y
1109# CONFIG_SND_INTEL8X0M is not set 1080# CONFIG_SND_INTEL8X0M is not set
1110# CONFIG_SND_KORG1212 is not set 1081# CONFIG_SND_KORG1212 is not set
1082# CONFIG_SND_LX6464ES is not set
1111# CONFIG_SND_MAESTRO3 is not set 1083# CONFIG_SND_MAESTRO3 is not set
1112# CONFIG_SND_MIXART is not set 1084# CONFIG_SND_MIXART is not set
1113# CONFIG_SND_NM256 is not set 1085# CONFIG_SND_NM256 is not set
@@ -1152,7 +1124,7 @@ CONFIG_HID_BELKIN=y
1152CONFIG_HID_CHERRY=y 1124CONFIG_HID_CHERRY=y
1153CONFIG_HID_CHICONY=y 1125CONFIG_HID_CHICONY=y
1154CONFIG_HID_CYPRESS=y 1126CONFIG_HID_CYPRESS=y
1155# CONFIG_DRAGONRISE_FF is not set 1127# CONFIG_HID_DRAGONRISE is not set
1156CONFIG_HID_EZKEY=y 1128CONFIG_HID_EZKEY=y
1157# CONFIG_HID_KYE is not set 1129# CONFIG_HID_KYE is not set
1158CONFIG_HID_GYRATION=y 1130CONFIG_HID_GYRATION=y
@@ -1169,10 +1141,11 @@ CONFIG_HID_PETALYNX=y
1169CONFIG_HID_SAMSUNG=y 1141CONFIG_HID_SAMSUNG=y
1170CONFIG_HID_SONY=y 1142CONFIG_HID_SONY=y
1171CONFIG_HID_SUNPLUS=y 1143CONFIG_HID_SUNPLUS=y
1172# CONFIG_GREENASIA_FF is not set 1144# CONFIG_HID_GREENASIA is not set
1145# CONFIG_HID_SMARTJOYPLUS is not set
1173# CONFIG_HID_TOPSEED is not set 1146# CONFIG_HID_TOPSEED is not set
1174CONFIG_THRUSTMASTER_FF=m 1147# CONFIG_HID_THRUSTMASTER is not set
1175CONFIG_ZEROPLUS_FF=m 1148# CONFIG_HID_ZEROPLUS is not set
1176CONFIG_USB_SUPPORT=y 1149CONFIG_USB_SUPPORT=y
1177CONFIG_USB_ARCH_HAS_HCD=y 1150CONFIG_USB_ARCH_HAS_HCD=y
1178CONFIG_USB_ARCH_HAS_OHCI=y 1151CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1198,6 +1171,7 @@ CONFIG_USB_MON=y
1198# USB Host Controller Drivers 1171# USB Host Controller Drivers
1199# 1172#
1200# CONFIG_USB_C67X00_HCD is not set 1173# CONFIG_USB_C67X00_HCD is not set
1174# CONFIG_USB_XHCI_HCD is not set
1201CONFIG_USB_EHCI_HCD=y 1175CONFIG_USB_EHCI_HCD=y
1202# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1176# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1203# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1177# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1207,9 +1181,9 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y
1207# CONFIG_USB_ISP116X_HCD is not set 1181# CONFIG_USB_ISP116X_HCD is not set
1208# CONFIG_USB_ISP1760_HCD is not set 1182# CONFIG_USB_ISP1760_HCD is not set
1209CONFIG_USB_OHCI_HCD=y 1183CONFIG_USB_OHCI_HCD=y
1210CONFIG_USB_OHCI_HCD_PPC_OF=y
1211CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1184CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1212CONFIG_USB_OHCI_HCD_PPC_OF_LE=y 1185CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
1186CONFIG_USB_OHCI_HCD_PPC_OF=y
1213CONFIG_USB_OHCI_HCD_PCI=y 1187CONFIG_USB_OHCI_HCD_PCI=y
1214CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y 1188CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1215CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y 1189CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
@@ -1329,6 +1303,7 @@ CONFIG_RTC_INTF_DEV=y
1329# CONFIG_RTC_DRV_S35390A is not set 1303# CONFIG_RTC_DRV_S35390A is not set
1330# CONFIG_RTC_DRV_FM3130 is not set 1304# CONFIG_RTC_DRV_FM3130 is not set
1331# CONFIG_RTC_DRV_RX8581 is not set 1305# CONFIG_RTC_DRV_RX8581 is not set
1306# CONFIG_RTC_DRV_RX8025 is not set
1332 1307
1333# 1308#
1334# SPI RTC drivers 1309# SPI RTC drivers
@@ -1356,6 +1331,10 @@ CONFIG_RTC_DRV_CMOS=y
1356# CONFIG_DMADEVICES is not set 1331# CONFIG_DMADEVICES is not set
1357# CONFIG_AUXDISPLAY is not set 1332# CONFIG_AUXDISPLAY is not set
1358# CONFIG_UIO is not set 1333# CONFIG_UIO is not set
1334
1335#
1336# TI VLYNQ
1337#
1359# CONFIG_STAGING is not set 1338# CONFIG_STAGING is not set
1360 1339
1361# 1340#
@@ -1375,11 +1354,12 @@ CONFIG_FS_MBCACHE=y
1375# CONFIG_REISERFS_FS is not set 1354# CONFIG_REISERFS_FS is not set
1376# CONFIG_JFS_FS is not set 1355# CONFIG_JFS_FS is not set
1377# CONFIG_FS_POSIX_ACL is not set 1356# CONFIG_FS_POSIX_ACL is not set
1378CONFIG_FILE_LOCKING=y
1379# CONFIG_XFS_FS is not set 1357# CONFIG_XFS_FS is not set
1380# CONFIG_GFS2_FS is not set 1358# CONFIG_GFS2_FS is not set
1381# CONFIG_OCFS2_FS is not set 1359# CONFIG_OCFS2_FS is not set
1382# CONFIG_BTRFS_FS is not set 1360# CONFIG_BTRFS_FS is not set
1361CONFIG_FILE_LOCKING=y
1362CONFIG_FSNOTIFY=y
1383CONFIG_DNOTIFY=y 1363CONFIG_DNOTIFY=y
1384CONFIG_INOTIFY=y 1364CONFIG_INOTIFY=y
1385CONFIG_INOTIFY_USER=y 1365CONFIG_INOTIFY_USER=y
@@ -1454,6 +1434,7 @@ CONFIG_NFS_FS=y
1454CONFIG_NFS_V3=y 1434CONFIG_NFS_V3=y
1455# CONFIG_NFS_V3_ACL is not set 1435# CONFIG_NFS_V3_ACL is not set
1456CONFIG_NFS_V4=y 1436CONFIG_NFS_V4=y
1437# CONFIG_NFS_V4_1 is not set
1457CONFIG_ROOT_NFS=y 1438CONFIG_ROOT_NFS=y
1458CONFIG_NFSD=y 1439CONFIG_NFSD=y
1459# CONFIG_NFSD_V3 is not set 1440# CONFIG_NFSD_V3 is not set
@@ -1555,6 +1536,7 @@ CONFIG_HAS_IOPORT=y
1555CONFIG_HAS_DMA=y 1536CONFIG_HAS_DMA=y
1556CONFIG_HAVE_LMB=y 1537CONFIG_HAVE_LMB=y
1557CONFIG_NLATTR=y 1538CONFIG_NLATTR=y
1539CONFIG_GENERIC_ATOMIC64=y
1558 1540
1559# 1541#
1560# Kernel hacking 1542# Kernel hacking
@@ -1585,6 +1567,9 @@ CONFIG_SCHED_DEBUG=y
1585# CONFIG_RT_MUTEX_TESTER is not set 1567# CONFIG_RT_MUTEX_TESTER is not set
1586# CONFIG_DEBUG_SPINLOCK is not set 1568# CONFIG_DEBUG_SPINLOCK is not set
1587# CONFIG_DEBUG_MUTEXES is not set 1569# CONFIG_DEBUG_MUTEXES is not set
1570# CONFIG_DEBUG_LOCK_ALLOC is not set
1571# CONFIG_PROVE_LOCKING is not set
1572# CONFIG_LOCK_STAT is not set
1588# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1573# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1589# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1574# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1590# CONFIG_DEBUG_KOBJECT is not set 1575# CONFIG_DEBUG_KOBJECT is not set
@@ -1597,7 +1582,6 @@ CONFIG_DEBUG_INFO=y
1597# CONFIG_DEBUG_LIST is not set 1582# CONFIG_DEBUG_LIST is not set
1598# CONFIG_DEBUG_SG is not set 1583# CONFIG_DEBUG_SG is not set
1599# CONFIG_DEBUG_NOTIFIERS is not set 1584# CONFIG_DEBUG_NOTIFIERS is not set
1600# CONFIG_BOOT_PRINTK_DELAY is not set
1601# CONFIG_RCU_TORTURE_TEST is not set 1585# CONFIG_RCU_TORTURE_TEST is not set
1602# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1586# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1603# CONFIG_BACKTRACE_SELF_TEST is not set 1587# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1611,16 +1595,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1611CONFIG_HAVE_DYNAMIC_FTRACE=y 1595CONFIG_HAVE_DYNAMIC_FTRACE=y
1612CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1596CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1613CONFIG_TRACING_SUPPORT=y 1597CONFIG_TRACING_SUPPORT=y
1614 1598CONFIG_FTRACE=y
1615#
1616# Tracers
1617#
1618# CONFIG_FUNCTION_TRACER is not set 1599# CONFIG_FUNCTION_TRACER is not set
1600# CONFIG_IRQSOFF_TRACER is not set
1619# CONFIG_SCHED_TRACER is not set 1601# CONFIG_SCHED_TRACER is not set
1620# CONFIG_CONTEXT_SWITCH_TRACER is not set 1602# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1621# CONFIG_EVENT_TRACER is not set
1622# CONFIG_BOOT_TRACER is not set 1603# CONFIG_BOOT_TRACER is not set
1623# CONFIG_TRACE_BRANCH_PROFILING is not set 1604CONFIG_BRANCH_PROFILE_NONE=y
1605# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1606# CONFIG_PROFILE_ALL_BRANCHES is not set
1624# CONFIG_STACK_TRACER is not set 1607# CONFIG_STACK_TRACER is not set
1625# CONFIG_KMEMTRACE is not set 1608# CONFIG_KMEMTRACE is not set
1626# CONFIG_WORKQUEUE_TRACER is not set 1609# CONFIG_WORKQUEUE_TRACER is not set
@@ -1628,6 +1611,9 @@ CONFIG_TRACING_SUPPORT=y
1628# CONFIG_SAMPLES is not set 1611# CONFIG_SAMPLES is not set
1629CONFIG_HAVE_ARCH_KGDB=y 1612CONFIG_HAVE_ARCH_KGDB=y
1630# CONFIG_KGDB is not set 1613# CONFIG_KGDB is not set
1614# CONFIG_KMEMCHECK is not set
1615# CONFIG_PPC_DISABLE_WERROR is not set
1616CONFIG_PPC_WERROR=y
1631CONFIG_PRINT_STACK_DEPTH=64 1617CONFIG_PRINT_STACK_DEPTH=64
1632# CONFIG_DEBUG_STACKOVERFLOW is not set 1618# CONFIG_DEBUG_STACKOVERFLOW is not set
1633# CONFIG_DEBUG_STACK_USAGE is not set 1619# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/86xx/sbc8641d_defconfig b/arch/powerpc/configs/86xx/sbc8641d_defconfig
index c30a0c71587..f5ca2e0cd40 100644
--- a/arch/powerpc/configs/86xx/sbc8641d_defconfig
+++ b/arch/powerpc/configs/86xx/sbc8641d_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:27 2009 4# Wed Jul 29 23:32:26 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_PHYS_64BIT is not set 20# CONFIG_PHYS_64BIT is not set
20CONFIG_ALTIVEC=y 21CONFIG_ALTIVEC=y
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24CONFIG_SMP=y 26CONFIG_SMP=y
25CONFIG_NR_CPUS=2 27CONFIG_NR_CPUS=2
26CONFIG_PPC32=y 28CONFIG_PPC32=y
@@ -32,16 +34,17 @@ CONFIG_GENERIC_TIME=y
32CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
33CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
34CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
35# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
36CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
37CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
38CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
39CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
40CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
41CONFIG_GENERIC_LOCKBREAK=y 45CONFIG_GENERIC_LOCKBREAK=y
42CONFIG_ARCH_HAS_ILOG2_U32=y 46CONFIG_ARCH_HAS_ILOG2_U32=y
43CONFIG_GENERIC_HWEIGHT=y 47CONFIG_GENERIC_HWEIGHT=y
44CONFIG_GENERIC_CALIBRATE_DELAY=y
45CONFIG_GENERIC_FIND_NEXT_BIT=y 48CONFIG_GENERIC_FIND_NEXT_BIT=y
46# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 49# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
47CONFIG_PPC=y 50CONFIG_PPC=y
@@ -55,11 +58,13 @@ CONFIG_PPC_UDBG_16550=y
55CONFIG_GENERIC_TBSYNC=y 58CONFIG_GENERIC_TBSYNC=y
56CONFIG_AUDIT_ARCH=y 59CONFIG_AUDIT_ARCH=y
57CONFIG_GENERIC_BUG=y 60CONFIG_GENERIC_BUG=y
61CONFIG_DTC=y
58CONFIG_DEFAULT_UIMAGE=y 62CONFIG_DEFAULT_UIMAGE=y
59# CONFIG_PPC_DCR_NATIVE is not set 63# CONFIG_PPC_DCR_NATIVE is not set
60# CONFIG_PPC_DCR_MMIO is not set 64# CONFIG_PPC_DCR_MMIO is not set
61CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 65CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
62CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 66CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
67CONFIG_CONSTRUCTORS=y
63 68
64# 69#
65# General setup 70# General setup
@@ -113,7 +118,6 @@ CONFIG_SYSCTL_SYSCALL=y
113CONFIG_KALLSYMS=y 118CONFIG_KALLSYMS=y
114# CONFIG_KALLSYMS_ALL is not set 119# CONFIG_KALLSYMS_ALL is not set
115# CONFIG_KALLSYMS_EXTRA_PASS is not set 120# CONFIG_KALLSYMS_EXTRA_PASS is not set
116# CONFIG_STRIP_ASM_SYMS is not set
117CONFIG_HOTPLUG=y 121CONFIG_HOTPLUG=y
118CONFIG_PRINTK=y 122CONFIG_PRINTK=y
119CONFIG_BUG=y 123CONFIG_BUG=y
@@ -126,8 +130,15 @@ CONFIG_TIMERFD=y
126CONFIG_EVENTFD=y 130CONFIG_EVENTFD=y
127CONFIG_SHMEM=y 131CONFIG_SHMEM=y
128CONFIG_AIO=y 132CONFIG_AIO=y
133CONFIG_HAVE_PERF_COUNTERS=y
134
135#
136# Performance Counters
137#
138# CONFIG_PERF_COUNTERS is not set
129CONFIG_VM_EVENT_COUNTERS=y 139CONFIG_VM_EVENT_COUNTERS=y
130CONFIG_PCI_QUIRKS=y 140CONFIG_PCI_QUIRKS=y
141# CONFIG_STRIP_ASM_SYMS is not set
131CONFIG_COMPAT_BRK=y 142CONFIG_COMPAT_BRK=y
132CONFIG_SLAB=y 143CONFIG_SLAB=y
133# CONFIG_SLUB is not set 144# CONFIG_SLUB is not set
@@ -142,6 +153,11 @@ CONFIG_HAVE_KPROBES=y
142CONFIG_HAVE_KRETPROBES=y 153CONFIG_HAVE_KRETPROBES=y
143CONFIG_HAVE_ARCH_TRACEHOOK=y 154CONFIG_HAVE_ARCH_TRACEHOOK=y
144CONFIG_USE_GENERIC_SMP_HELPERS=y 155CONFIG_USE_GENERIC_SMP_HELPERS=y
156
157#
158# GCOV-based kernel profiling
159#
160# CONFIG_GCOV_KERNEL is not set
145# CONFIG_SLOW_WORK is not set 161# CONFIG_SLOW_WORK is not set
146# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 162# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
147CONFIG_SLABINFO=y 163CONFIG_SLABINFO=y
@@ -155,7 +171,7 @@ CONFIG_MODULE_UNLOAD=y
155# CONFIG_MODULE_SRCVERSION_ALL is not set 171# CONFIG_MODULE_SRCVERSION_ALL is not set
156CONFIG_STOP_MACHINE=y 172CONFIG_STOP_MACHINE=y
157CONFIG_BLOCK=y 173CONFIG_BLOCK=y
158# CONFIG_LBD is not set 174CONFIG_LBDAF=y
159# CONFIG_BLK_DEV_BSG is not set 175# CONFIG_BLK_DEV_BSG is not set
160# CONFIG_BLK_DEV_INTEGRITY is not set 176# CONFIG_BLK_DEV_INTEGRITY is not set
161 177
@@ -234,6 +250,7 @@ CONFIG_BINFMT_ELF=y
234# CONFIG_HAVE_AOUT is not set 250# CONFIG_HAVE_AOUT is not set
235CONFIG_BINFMT_MISC=m 251CONFIG_BINFMT_MISC=m
236# CONFIG_IOMMU_HELPER is not set 252# CONFIG_IOMMU_HELPER is not set
253# CONFIG_SWIOTLB is not set
237CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 254CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
238CONFIG_ARCH_HAS_WALK_MEMORY=y 255CONFIG_ARCH_HAS_WALK_MEMORY=y
239CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 256CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -255,9 +272,9 @@ CONFIG_MIGRATION=y
255CONFIG_ZONE_DMA_FLAG=1 272CONFIG_ZONE_DMA_FLAG=1
256CONFIG_BOUNCE=y 273CONFIG_BOUNCE=y
257CONFIG_VIRT_TO_BUS=y 274CONFIG_VIRT_TO_BUS=y
258CONFIG_UNEVICTABLE_LRU=y
259CONFIG_HAVE_MLOCK=y 275CONFIG_HAVE_MLOCK=y
260CONFIG_HAVE_MLOCKED_PAGE_BIT=y 276CONFIG_HAVE_MLOCKED_PAGE_BIT=y
277CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
261CONFIG_PPC_4K_PAGES=y 278CONFIG_PPC_4K_PAGES=y
262# CONFIG_PPC_16K_PAGES is not set 279# CONFIG_PPC_16K_PAGES is not set
263# CONFIG_PPC_64K_PAGES is not set 280# CONFIG_PPC_64K_PAGES is not set
@@ -284,6 +301,8 @@ CONFIG_PCI_DOMAINS=y
284CONFIG_PCI_SYSCALL=y 301CONFIG_PCI_SYSCALL=y
285CONFIG_PCIEPORTBUS=y 302CONFIG_PCIEPORTBUS=y
286CONFIG_PCIEAER=y 303CONFIG_PCIEAER=y
304# CONFIG_PCIE_ECRC is not set
305# CONFIG_PCIEAER_INJECT is not set
287# CONFIG_PCIEASPM is not set 306# CONFIG_PCIEASPM is not set
288CONFIG_ARCH_SUPPORTS_MSI=y 307CONFIG_ARCH_SUPPORTS_MSI=y
289# CONFIG_PCI_MSI is not set 308# CONFIG_PCI_MSI is not set
@@ -508,6 +527,7 @@ CONFIG_LLC=m
508# CONFIG_ECONET is not set 527# CONFIG_ECONET is not set
509CONFIG_WAN_ROUTER=m 528CONFIG_WAN_ROUTER=m
510# CONFIG_PHONET is not set 529# CONFIG_PHONET is not set
530# CONFIG_IEEE802154 is not set
511CONFIG_NET_SCHED=y 531CONFIG_NET_SCHED=y
512 532
513# 533#
@@ -564,7 +584,11 @@ CONFIG_WIRELESS=y
564CONFIG_WIRELESS_OLD_REGULATORY=y 584CONFIG_WIRELESS_OLD_REGULATORY=y
565# CONFIG_WIRELESS_EXT is not set 585# CONFIG_WIRELESS_EXT is not set
566# CONFIG_LIB80211 is not set 586# CONFIG_LIB80211 is not set
567# CONFIG_MAC80211 is not set 587
588#
589# CFG80211 needs to be enabled for MAC80211
590#
591CONFIG_MAC80211_DEFAULT_PS_VALUE=0
568# CONFIG_WIMAX is not set 592# CONFIG_WIMAX is not set
569# CONFIG_RFKILL is not set 593# CONFIG_RFKILL is not set
570# CONFIG_NET_9P is not set 594# CONFIG_NET_9P is not set
@@ -675,6 +699,7 @@ CONFIG_MTD_PHYSMAP_OF=y
675# CONFIG_MTD_UBI is not set 699# CONFIG_MTD_UBI is not set
676CONFIG_OF_DEVICE=y 700CONFIG_OF_DEVICE=y
677CONFIG_OF_I2C=y 701CONFIG_OF_I2C=y
702CONFIG_OF_MDIO=y
678# CONFIG_PARPORT is not set 703# CONFIG_PARPORT is not set
679CONFIG_BLK_DEV=y 704CONFIG_BLK_DEV=y
680# CONFIG_BLK_DEV_FD is not set 705# CONFIG_BLK_DEV_FD is not set
@@ -709,7 +734,9 @@ CONFIG_MISC_DEVICES=y
709# 734#
710# CONFIG_EEPROM_AT24 is not set 735# CONFIG_EEPROM_AT24 is not set
711# CONFIG_EEPROM_LEGACY is not set 736# CONFIG_EEPROM_LEGACY is not set
737# CONFIG_EEPROM_MAX6875 is not set
712# CONFIG_EEPROM_93CX6 is not set 738# CONFIG_EEPROM_93CX6 is not set
739# CONFIG_CB710_CORE is not set
713CONFIG_HAVE_IDE=y 740CONFIG_HAVE_IDE=y
714# CONFIG_IDE is not set 741# CONFIG_IDE is not set
715 742
@@ -736,6 +763,7 @@ CONFIG_BLK_DEV_DM=y
736CONFIG_DM_CRYPT=y 763CONFIG_DM_CRYPT=y
737CONFIG_DM_SNAPSHOT=y 764CONFIG_DM_SNAPSHOT=y
738CONFIG_DM_MIRROR=y 765CONFIG_DM_MIRROR=y
766# CONFIG_DM_LOG_USERSPACE is not set
739CONFIG_DM_ZERO=y 767CONFIG_DM_ZERO=y
740# CONFIG_DM_MULTIPATH is not set 768# CONFIG_DM_MULTIPATH is not set
741# CONFIG_DM_DELAY is not set 769# CONFIG_DM_DELAY is not set
@@ -747,14 +775,17 @@ CONFIG_DM_ZERO=y
747# 775#
748 776
749# 777#
750# Enable only one of the two stacks, unless you know what you are doing 778# You can enable one or both FireWire driver stacks.
779#
780
781#
782# See the help texts for more information.
751# 783#
752# CONFIG_FIREWIRE is not set 784# CONFIG_FIREWIRE is not set
753# CONFIG_IEEE1394 is not set 785# CONFIG_IEEE1394 is not set
754# CONFIG_I2O is not set 786# CONFIG_I2O is not set
755# CONFIG_MACINTOSH_DRIVERS is not set 787# CONFIG_MACINTOSH_DRIVERS is not set
756CONFIG_NETDEVICES=y 788CONFIG_NETDEVICES=y
757CONFIG_COMPAT_NET_DEV_OPS=y
758CONFIG_DUMMY=m 789CONFIG_DUMMY=m
759CONFIG_BONDING=m 790CONFIG_BONDING=m
760# CONFIG_MACVLAN is not set 791# CONFIG_MACVLAN is not set
@@ -801,6 +832,7 @@ CONFIG_MII=y
801# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 832# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
802# CONFIG_NET_PCI is not set 833# CONFIG_NET_PCI is not set
803# CONFIG_B44 is not set 834# CONFIG_B44 is not set
835# CONFIG_KS8842 is not set
804# CONFIG_ATL2 is not set 836# CONFIG_ATL2 is not set
805CONFIG_NETDEV_1000=y 837CONFIG_NETDEV_1000=y
806# CONFIG_ACENIC is not set 838# CONFIG_ACENIC is not set
@@ -820,8 +852,10 @@ CONFIG_NETDEV_1000=y
820# CONFIG_VIA_VELOCITY is not set 852# CONFIG_VIA_VELOCITY is not set
821# CONFIG_TIGON3 is not set 853# CONFIG_TIGON3 is not set
822# CONFIG_BNX2 is not set 854# CONFIG_BNX2 is not set
855# CONFIG_CNIC is not set
823CONFIG_FSL_PQ_MDIO=y 856CONFIG_FSL_PQ_MDIO=y
824CONFIG_GIANFAR=y 857CONFIG_GIANFAR=y
858# CONFIG_MV643XX_ETH is not set
825# CONFIG_QLA3XXX is not set 859# CONFIG_QLA3XXX is not set
826# CONFIG_ATL1 is not set 860# CONFIG_ATL1 is not set
827# CONFIG_ATL1E is not set 861# CONFIG_ATL1E is not set
@@ -1018,13 +1052,17 @@ CONFIG_I2C_MPC=y
1018# CONFIG_SENSORS_PCF8574 is not set 1052# CONFIG_SENSORS_PCF8574 is not set
1019# CONFIG_PCF8575 is not set 1053# CONFIG_PCF8575 is not set
1020# CONFIG_SENSORS_PCA9539 is not set 1054# CONFIG_SENSORS_PCA9539 is not set
1021# CONFIG_SENSORS_MAX6875 is not set
1022# CONFIG_SENSORS_TSL2550 is not set 1055# CONFIG_SENSORS_TSL2550 is not set
1023# CONFIG_I2C_DEBUG_CORE is not set 1056# CONFIG_I2C_DEBUG_CORE is not set
1024# CONFIG_I2C_DEBUG_ALGO is not set 1057# CONFIG_I2C_DEBUG_ALGO is not set
1025# CONFIG_I2C_DEBUG_BUS is not set 1058# CONFIG_I2C_DEBUG_BUS is not set
1026# CONFIG_I2C_DEBUG_CHIP is not set 1059# CONFIG_I2C_DEBUG_CHIP is not set
1027# CONFIG_SPI is not set 1060# CONFIG_SPI is not set
1061
1062#
1063# PPS support
1064#
1065# CONFIG_PPS is not set
1028CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 1066CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
1029# CONFIG_GPIOLIB is not set 1067# CONFIG_GPIOLIB is not set
1030# CONFIG_W1 is not set 1068# CONFIG_W1 is not set
@@ -1079,6 +1117,7 @@ CONFIG_HWMON=y
1079# CONFIG_SENSORS_SMSC47B397 is not set 1117# CONFIG_SENSORS_SMSC47B397 is not set
1080# CONFIG_SENSORS_ADS7828 is not set 1118# CONFIG_SENSORS_ADS7828 is not set
1081# CONFIG_SENSORS_THMC50 is not set 1119# CONFIG_SENSORS_THMC50 is not set
1120# CONFIG_SENSORS_TMP401 is not set
1082# CONFIG_SENSORS_VIA686A is not set 1121# CONFIG_SENSORS_VIA686A is not set
1083# CONFIG_SENSORS_VT1211 is not set 1122# CONFIG_SENSORS_VT1211 is not set
1084# CONFIG_SENSORS_VT8231 is not set 1123# CONFIG_SENSORS_VT8231 is not set
@@ -1127,23 +1166,9 @@ CONFIG_SSB_POSSIBLE=y
1127# CONFIG_MFD_WM8400 is not set 1166# CONFIG_MFD_WM8400 is not set
1128# CONFIG_MFD_WM8350_I2C is not set 1167# CONFIG_MFD_WM8350_I2C is not set
1129# CONFIG_MFD_PCF50633 is not set 1168# CONFIG_MFD_PCF50633 is not set
1169# CONFIG_AB3100_CORE is not set
1130# CONFIG_REGULATOR is not set 1170# CONFIG_REGULATOR is not set
1131 1171# CONFIG_MEDIA_SUPPORT is not set
1132#
1133# Multimedia devices
1134#
1135
1136#
1137# Multimedia core support
1138#
1139# CONFIG_VIDEO_DEV is not set
1140# CONFIG_DVB_CORE is not set
1141# CONFIG_VIDEO_MEDIA is not set
1142
1143#
1144# Multimedia drivers
1145#
1146CONFIG_DAB=y
1147 1172
1148# 1173#
1149# Graphics support 1174# Graphics support
@@ -1207,6 +1232,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1207# CONFIG_DMADEVICES is not set 1232# CONFIG_DMADEVICES is not set
1208# CONFIG_AUXDISPLAY is not set 1233# CONFIG_AUXDISPLAY is not set
1209# CONFIG_UIO is not set 1234# CONFIG_UIO is not set
1235
1236#
1237# TI VLYNQ
1238#
1210# CONFIG_STAGING is not set 1239# CONFIG_STAGING is not set
1211 1240
1212# 1241#
@@ -1236,8 +1265,8 @@ CONFIG_REISERFS_FS_POSIX_ACL=y
1236# CONFIG_REISERFS_FS_SECURITY is not set 1265# CONFIG_REISERFS_FS_SECURITY is not set
1237# CONFIG_JFS_FS is not set 1266# CONFIG_JFS_FS is not set
1238CONFIG_FS_POSIX_ACL=y 1267CONFIG_FS_POSIX_ACL=y
1239CONFIG_FILE_LOCKING=y
1240# CONFIG_XFS_FS is not set 1268# CONFIG_XFS_FS is not set
1269# CONFIG_GFS2_FS is not set
1241CONFIG_OCFS2_FS=m 1270CONFIG_OCFS2_FS=m
1242CONFIG_OCFS2_FS_O2CB=m 1271CONFIG_OCFS2_FS_O2CB=m
1243CONFIG_OCFS2_FS_STATS=y 1272CONFIG_OCFS2_FS_STATS=y
@@ -1245,6 +1274,8 @@ CONFIG_OCFS2_DEBUG_MASKLOG=y
1245# CONFIG_OCFS2_DEBUG_FS is not set 1274# CONFIG_OCFS2_DEBUG_FS is not set
1246# CONFIG_OCFS2_FS_POSIX_ACL is not set 1275# CONFIG_OCFS2_FS_POSIX_ACL is not set
1247# CONFIG_BTRFS_FS is not set 1276# CONFIG_BTRFS_FS is not set
1277CONFIG_FILE_LOCKING=y
1278CONFIG_FSNOTIFY=y
1248CONFIG_DNOTIFY=y 1279CONFIG_DNOTIFY=y
1249CONFIG_INOTIFY=y 1280CONFIG_INOTIFY=y
1250CONFIG_INOTIFY_USER=y 1281CONFIG_INOTIFY_USER=y
@@ -1318,6 +1349,7 @@ CONFIG_NFS_FS=y
1318CONFIG_NFS_V3=y 1349CONFIG_NFS_V3=y
1319# CONFIG_NFS_V3_ACL is not set 1350# CONFIG_NFS_V3_ACL is not set
1320CONFIG_NFS_V4=y 1351CONFIG_NFS_V4=y
1352# CONFIG_NFS_V4_1 is not set
1321CONFIG_ROOT_NFS=y 1353CONFIG_ROOT_NFS=y
1322# CONFIG_NFSD is not set 1354# CONFIG_NFSD is not set
1323CONFIG_LOCKD=y 1355CONFIG_LOCKD=y
@@ -1409,6 +1441,7 @@ CONFIG_HAS_IOPORT=y
1409CONFIG_HAS_DMA=y 1441CONFIG_HAS_DMA=y
1410CONFIG_HAVE_LMB=y 1442CONFIG_HAVE_LMB=y
1411CONFIG_NLATTR=y 1443CONFIG_NLATTR=y
1444CONFIG_GENERIC_ATOMIC64=y
1412 1445
1413# 1446#
1414# Kernel hacking 1447# Kernel hacking
@@ -1434,10 +1467,14 @@ CONFIG_SCHED_DEBUG=y
1434# CONFIG_TIMER_STATS is not set 1467# CONFIG_TIMER_STATS is not set
1435# CONFIG_DEBUG_OBJECTS is not set 1468# CONFIG_DEBUG_OBJECTS is not set
1436# CONFIG_DEBUG_SLAB is not set 1469# CONFIG_DEBUG_SLAB is not set
1470CONFIG_DEBUG_PREEMPT=y
1437# CONFIG_DEBUG_RT_MUTEXES is not set 1471# CONFIG_DEBUG_RT_MUTEXES is not set
1438# CONFIG_RT_MUTEX_TESTER is not set 1472# CONFIG_RT_MUTEX_TESTER is not set
1439# CONFIG_DEBUG_SPINLOCK is not set 1473# CONFIG_DEBUG_SPINLOCK is not set
1440# CONFIG_DEBUG_MUTEXES is not set 1474# CONFIG_DEBUG_MUTEXES is not set
1475# CONFIG_DEBUG_LOCK_ALLOC is not set
1476# CONFIG_PROVE_LOCKING is not set
1477# CONFIG_LOCK_STAT is not set
1441# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1478# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1442# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1479# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1443# CONFIG_DEBUG_KOBJECT is not set 1480# CONFIG_DEBUG_KOBJECT is not set
@@ -1449,7 +1486,6 @@ CONFIG_DEBUG_INFO=y
1449# CONFIG_DEBUG_LIST is not set 1486# CONFIG_DEBUG_LIST is not set
1450# CONFIG_DEBUG_SG is not set 1487# CONFIG_DEBUG_SG is not set
1451# CONFIG_DEBUG_NOTIFIERS is not set 1488# CONFIG_DEBUG_NOTIFIERS is not set
1452# CONFIG_BOOT_PRINTK_DELAY is not set
1453# CONFIG_RCU_TORTURE_TEST is not set 1489# CONFIG_RCU_TORTURE_TEST is not set
1454# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1490# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1455# CONFIG_BACKTRACE_SELF_TEST is not set 1491# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1463,17 +1499,16 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1463CONFIG_HAVE_DYNAMIC_FTRACE=y 1499CONFIG_HAVE_DYNAMIC_FTRACE=y
1464CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1500CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1465CONFIG_TRACING_SUPPORT=y 1501CONFIG_TRACING_SUPPORT=y
1466 1502CONFIG_FTRACE=y
1467#
1468# Tracers
1469#
1470# CONFIG_FUNCTION_TRACER is not set 1503# CONFIG_FUNCTION_TRACER is not set
1504# CONFIG_IRQSOFF_TRACER is not set
1471# CONFIG_PREEMPT_TRACER is not set 1505# CONFIG_PREEMPT_TRACER is not set
1472# CONFIG_SCHED_TRACER is not set 1506# CONFIG_SCHED_TRACER is not set
1473# CONFIG_CONTEXT_SWITCH_TRACER is not set 1507# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1474# CONFIG_EVENT_TRACER is not set
1475# CONFIG_BOOT_TRACER is not set 1508# CONFIG_BOOT_TRACER is not set
1476# CONFIG_TRACE_BRANCH_PROFILING is not set 1509CONFIG_BRANCH_PROFILE_NONE=y
1510# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1511# CONFIG_PROFILE_ALL_BRANCHES is not set
1477# CONFIG_STACK_TRACER is not set 1512# CONFIG_STACK_TRACER is not set
1478# CONFIG_KMEMTRACE is not set 1513# CONFIG_KMEMTRACE is not set
1479# CONFIG_WORKQUEUE_TRACER is not set 1514# CONFIG_WORKQUEUE_TRACER is not set
@@ -1482,9 +1517,13 @@ CONFIG_TRACING_SUPPORT=y
1482# CONFIG_SAMPLES is not set 1517# CONFIG_SAMPLES is not set
1483CONFIG_HAVE_ARCH_KGDB=y 1518CONFIG_HAVE_ARCH_KGDB=y
1484# CONFIG_KGDB is not set 1519# CONFIG_KGDB is not set
1520# CONFIG_KMEMCHECK is not set
1521# CONFIG_PPC_DISABLE_WERROR is not set
1522CONFIG_PPC_WERROR=y
1485CONFIG_PRINT_STACK_DEPTH=64 1523CONFIG_PRINT_STACK_DEPTH=64
1486# CONFIG_DEBUG_STACKOVERFLOW is not set 1524# CONFIG_DEBUG_STACKOVERFLOW is not set
1487# CONFIG_DEBUG_STACK_USAGE is not set 1525# CONFIG_DEBUG_STACK_USAGE is not set
1526# CONFIG_PPC_EMULATED_STATS is not set
1488# CONFIG_CODE_PATCHING_SELFTEST is not set 1527# CONFIG_CODE_PATCHING_SELFTEST is not set
1489# CONFIG_FTR_FIXUP_SELFTEST is not set 1528# CONFIG_FTR_FIXUP_SELFTEST is not set
1490# CONFIG_MSI_BITMAP_SELFTEST is not set 1529# CONFIG_MSI_BITMAP_SELFTEST is not set
@@ -1505,7 +1544,6 @@ CONFIG_SECURITY_NETWORK=y
1505# CONFIG_SECURITY_NETWORK_XFRM is not set 1544# CONFIG_SECURITY_NETWORK_XFRM is not set
1506# CONFIG_SECURITY_PATH is not set 1545# CONFIG_SECURITY_PATH is not set
1507# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1546# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1508CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
1509# CONFIG_SECURITY_TOMOYO is not set 1547# CONFIG_SECURITY_TOMOYO is not set
1510CONFIG_CRYPTO=y 1548CONFIG_CRYPTO=y
1511 1549
diff --git a/arch/powerpc/configs/adder875_defconfig b/arch/powerpc/configs/adder875_defconfig
index 74f7f7c6fdc..aece6bb5f73 100644
--- a/arch/powerpc/configs/adder875_defconfig
+++ b/arch/powerpc/configs/adder875_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:21:50 2009 4# Wed Jul 29 23:31:47 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13CONFIG_PPC_8xx=y 13CONFIG_PPC_8xx=y
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -27,15 +27,16 @@ CONFIG_GENERIC_TIME=y
27CONFIG_GENERIC_TIME_VSYSCALL=y 27CONFIG_GENERIC_TIME_VSYSCALL=y
28CONFIG_GENERIC_CLOCKEVENTS=y 28CONFIG_GENERIC_CLOCKEVENTS=y
29CONFIG_GENERIC_HARDIRQS=y 29CONFIG_GENERIC_HARDIRQS=y
30CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
30# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 31# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
31CONFIG_IRQ_PER_CPU=y 32CONFIG_IRQ_PER_CPU=y
32CONFIG_STACKTRACE_SUPPORT=y 33CONFIG_STACKTRACE_SUPPORT=y
33CONFIG_HAVE_LATENCYTOP_SUPPORT=y 34CONFIG_HAVE_LATENCYTOP_SUPPORT=y
35CONFIG_TRACE_IRQFLAGS_SUPPORT=y
34CONFIG_LOCKDEP_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
38CONFIG_GENERIC_CALIBRATE_DELAY=y
39CONFIG_GENERIC_FIND_NEXT_BIT=y 40CONFIG_GENERIC_FIND_NEXT_BIT=y
40# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 41# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
41CONFIG_PPC=y 42CONFIG_PPC=y
@@ -49,12 +50,14 @@ CONFIG_OF=y
49# CONFIG_GENERIC_TBSYNC is not set 50# CONFIG_GENERIC_TBSYNC is not set
50CONFIG_AUDIT_ARCH=y 51CONFIG_AUDIT_ARCH=y
51CONFIG_GENERIC_BUG=y 52CONFIG_GENERIC_BUG=y
53CONFIG_DTC=y
52# CONFIG_DEFAULT_UIMAGE is not set 54# CONFIG_DEFAULT_UIMAGE is not set
53CONFIG_REDBOOT=y 55CONFIG_REDBOOT=y
54# CONFIG_PPC_DCR_NATIVE is not set 56# CONFIG_PPC_DCR_NATIVE is not set
55# CONFIG_PPC_DCR_MMIO is not set 57# CONFIG_PPC_DCR_MMIO is not set
56CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 58CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
57CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 59CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
60CONFIG_CONSTRUCTORS=y
58 61
59# 62#
60# General setup 63# General setup
@@ -101,7 +104,6 @@ CONFIG_EMBEDDED=y
101CONFIG_KALLSYMS=y 104CONFIG_KALLSYMS=y
102# CONFIG_KALLSYMS_ALL is not set 105# CONFIG_KALLSYMS_ALL is not set
103# CONFIG_KALLSYMS_EXTRA_PASS is not set 106# CONFIG_KALLSYMS_EXTRA_PASS is not set
104# CONFIG_STRIP_ASM_SYMS is not set
105CONFIG_HOTPLUG=y 107CONFIG_HOTPLUG=y
106CONFIG_PRINTK=y 108CONFIG_PRINTK=y
107CONFIG_BUG=y 109CONFIG_BUG=y
@@ -114,8 +116,15 @@ CONFIG_TIMERFD=y
114CONFIG_EVENTFD=y 116CONFIG_EVENTFD=y
115CONFIG_SHMEM=y 117CONFIG_SHMEM=y
116CONFIG_AIO=y 118CONFIG_AIO=y
119CONFIG_HAVE_PERF_COUNTERS=y
120
121#
122# Performance Counters
123#
124# CONFIG_PERF_COUNTERS is not set
117# CONFIG_VM_EVENT_COUNTERS is not set 125# CONFIG_VM_EVENT_COUNTERS is not set
118CONFIG_SLUB_DEBUG=y 126CONFIG_SLUB_DEBUG=y
127# CONFIG_STRIP_ASM_SYMS is not set
119CONFIG_COMPAT_BRK=y 128CONFIG_COMPAT_BRK=y
120# CONFIG_SLAB is not set 129# CONFIG_SLAB is not set
121CONFIG_SLUB=y 130CONFIG_SLUB=y
@@ -129,13 +138,18 @@ CONFIG_HAVE_KPROBES=y
129CONFIG_HAVE_KRETPROBES=y 138CONFIG_HAVE_KRETPROBES=y
130CONFIG_HAVE_ARCH_TRACEHOOK=y 139CONFIG_HAVE_ARCH_TRACEHOOK=y
131CONFIG_HAVE_CLK=y 140CONFIG_HAVE_CLK=y
141
142#
143# GCOV-based kernel profiling
144#
145# CONFIG_GCOV_KERNEL is not set
132# CONFIG_SLOW_WORK is not set 146# CONFIG_SLOW_WORK is not set
133# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 147# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
134CONFIG_SLABINFO=y 148CONFIG_SLABINFO=y
135CONFIG_BASE_SMALL=1 149CONFIG_BASE_SMALL=1
136# CONFIG_MODULES is not set 150# CONFIG_MODULES is not set
137CONFIG_BLOCK=y 151CONFIG_BLOCK=y
138# CONFIG_LBD is not set 152CONFIG_LBDAF=y
139# CONFIG_BLK_DEV_BSG is not set 153# CONFIG_BLK_DEV_BSG is not set
140# CONFIG_BLK_DEV_INTEGRITY is not set 154# CONFIG_BLK_DEV_INTEGRITY is not set
141 155
@@ -220,6 +234,7 @@ CONFIG_BINFMT_ELF=y
220# CONFIG_MATH_EMULATION is not set 234# CONFIG_MATH_EMULATION is not set
221# CONFIG_8XX_MINIMAL_FPEMU is not set 235# CONFIG_8XX_MINIMAL_FPEMU is not set
222# CONFIG_IOMMU_HELPER is not set 236# CONFIG_IOMMU_HELPER is not set
237# CONFIG_SWIOTLB is not set
223CONFIG_PPC_NEED_DMA_SYNC_OPS=y 238CONFIG_PPC_NEED_DMA_SYNC_OPS=y
224CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 239CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
225CONFIG_ARCH_HAS_WALK_MEMORY=y 240CONFIG_ARCH_HAS_WALK_MEMORY=y
@@ -239,9 +254,9 @@ CONFIG_MIGRATION=y
239CONFIG_ZONE_DMA_FLAG=1 254CONFIG_ZONE_DMA_FLAG=1
240CONFIG_BOUNCE=y 255CONFIG_BOUNCE=y
241CONFIG_VIRT_TO_BUS=y 256CONFIG_VIRT_TO_BUS=y
242CONFIG_UNEVICTABLE_LRU=y
243CONFIG_HAVE_MLOCK=y 257CONFIG_HAVE_MLOCK=y
244CONFIG_HAVE_MLOCKED_PAGE_BIT=y 258CONFIG_HAVE_MLOCKED_PAGE_BIT=y
259CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
245CONFIG_PPC_4K_PAGES=y 260CONFIG_PPC_4K_PAGES=y
246# CONFIG_PPC_16K_PAGES is not set 261# CONFIG_PPC_16K_PAGES is not set
247# CONFIG_PPC_64K_PAGES is not set 262# CONFIG_PPC_64K_PAGES is not set
@@ -280,6 +295,7 @@ CONFIG_PAGE_OFFSET=0xc0000000
280CONFIG_KERNEL_START=0xc0000000 295CONFIG_KERNEL_START=0xc0000000
281CONFIG_PHYSICAL_START=0x00000000 296CONFIG_PHYSICAL_START=0x00000000
282CONFIG_TASK_SIZE=0x80000000 297CONFIG_TASK_SIZE=0x80000000
298CONFIG_CONSISTENT_SIZE=0x00200000
283CONFIG_NET=y 299CONFIG_NET=y
284 300
285# 301#
@@ -336,6 +352,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
336# CONFIG_ECONET is not set 352# CONFIG_ECONET is not set
337# CONFIG_WAN_ROUTER is not set 353# CONFIG_WAN_ROUTER is not set
338# CONFIG_PHONET is not set 354# CONFIG_PHONET is not set
355# CONFIG_IEEE802154 is not set
339# CONFIG_NET_SCHED is not set 356# CONFIG_NET_SCHED is not set
340# CONFIG_DCB is not set 357# CONFIG_DCB is not set
341 358
@@ -353,7 +370,11 @@ CONFIG_WIRELESS=y
353CONFIG_WIRELESS_OLD_REGULATORY=y 370CONFIG_WIRELESS_OLD_REGULATORY=y
354# CONFIG_WIRELESS_EXT is not set 371# CONFIG_WIRELESS_EXT is not set
355# CONFIG_LIB80211 is not set 372# CONFIG_LIB80211 is not set
356# CONFIG_MAC80211 is not set 373
374#
375# CFG80211 needs to be enabled for MAC80211
376#
377CONFIG_MAC80211_DEFAULT_PS_VALUE=0
357# CONFIG_WIMAX is not set 378# CONFIG_WIMAX is not set
358# CONFIG_RFKILL is not set 379# CONFIG_RFKILL is not set
359# CONFIG_NET_9P is not set 380# CONFIG_NET_9P is not set
@@ -452,6 +473,7 @@ CONFIG_MTD_PHYSMAP_OF=y
452# 473#
453# CONFIG_MTD_UBI is not set 474# CONFIG_MTD_UBI is not set
454CONFIG_OF_DEVICE=y 475CONFIG_OF_DEVICE=y
476CONFIG_OF_MDIO=y
455# CONFIG_PARPORT is not set 477# CONFIG_PARPORT is not set
456# CONFIG_BLK_DEV is not set 478# CONFIG_BLK_DEV is not set
457# CONFIG_MISC_DEVICES is not set 479# CONFIG_MISC_DEVICES is not set
@@ -469,7 +491,6 @@ CONFIG_HAVE_IDE=y
469# CONFIG_MD is not set 491# CONFIG_MD is not set
470# CONFIG_MACINTOSH_DRIVERS is not set 492# CONFIG_MACINTOSH_DRIVERS is not set
471CONFIG_NETDEVICES=y 493CONFIG_NETDEVICES=y
472CONFIG_COMPAT_NET_DEV_OPS=y
473# CONFIG_DUMMY is not set 494# CONFIG_DUMMY is not set
474# CONFIG_BONDING is not set 495# CONFIG_BONDING is not set
475# CONFIG_MACVLAN is not set 496# CONFIG_MACVLAN is not set
@@ -508,6 +529,7 @@ CONFIG_MII=y
508# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 529# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
509# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 530# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
510# CONFIG_B44 is not set 531# CONFIG_B44 is not set
532# CONFIG_KS8842 is not set
511CONFIG_FS_ENET=y 533CONFIG_FS_ENET=y
512# CONFIG_FS_ENET_HAS_SCC is not set 534# CONFIG_FS_ENET_HAS_SCC is not set
513CONFIG_FS_ENET_HAS_FEC=y 535CONFIG_FS_ENET_HAS_FEC=y
@@ -556,11 +578,11 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
556# 578#
557CONFIG_INPUT_KEYBOARD=y 579CONFIG_INPUT_KEYBOARD=y
558CONFIG_KEYBOARD_ATKBD=y 580CONFIG_KEYBOARD_ATKBD=y
559# CONFIG_KEYBOARD_SUNKBD is not set
560# CONFIG_KEYBOARD_LKKBD is not set 581# CONFIG_KEYBOARD_LKKBD is not set
561# CONFIG_KEYBOARD_XTKBD is not set
562# CONFIG_KEYBOARD_NEWTON is not set 582# CONFIG_KEYBOARD_NEWTON is not set
563# CONFIG_KEYBOARD_STOWAWAY is not set 583# CONFIG_KEYBOARD_STOWAWAY is not set
584# CONFIG_KEYBOARD_SUNKBD is not set
585# CONFIG_KEYBOARD_XTKBD is not set
564CONFIG_INPUT_MOUSE=y 586CONFIG_INPUT_MOUSE=y
565CONFIG_MOUSE_PS2=y 587CONFIG_MOUSE_PS2=y
566CONFIG_MOUSE_PS2_ALPS=y 588CONFIG_MOUSE_PS2_ALPS=y
@@ -622,6 +644,11 @@ CONFIG_GEN_RTC=y
622# CONFIG_TCG_TPM is not set 644# CONFIG_TCG_TPM is not set
623# CONFIG_I2C is not set 645# CONFIG_I2C is not set
624# CONFIG_SPI is not set 646# CONFIG_SPI is not set
647
648#
649# PPS support
650#
651# CONFIG_PPS is not set
625CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 652CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
626# CONFIG_GPIOLIB is not set 653# CONFIG_GPIOLIB is not set
627# CONFIG_W1 is not set 654# CONFIG_W1 is not set
@@ -644,22 +671,7 @@ CONFIG_SSB_POSSIBLE=y
644# CONFIG_HTC_PASIC3 is not set 671# CONFIG_HTC_PASIC3 is not set
645# CONFIG_MFD_TMIO is not set 672# CONFIG_MFD_TMIO is not set
646# CONFIG_REGULATOR is not set 673# CONFIG_REGULATOR is not set
647 674# CONFIG_MEDIA_SUPPORT is not set
648#
649# Multimedia devices
650#
651
652#
653# Multimedia core support
654#
655# CONFIG_VIDEO_DEV is not set
656# CONFIG_DVB_CORE is not set
657# CONFIG_VIDEO_MEDIA is not set
658
659#
660# Multimedia drivers
661#
662CONFIG_DAB=y
663 675
664# 676#
665# Graphics support 677# Graphics support
@@ -685,6 +697,10 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
685# CONFIG_DMADEVICES is not set 697# CONFIG_DMADEVICES is not set
686# CONFIG_AUXDISPLAY is not set 698# CONFIG_AUXDISPLAY is not set
687# CONFIG_UIO is not set 699# CONFIG_UIO is not set
700
701#
702# TI VLYNQ
703#
688# CONFIG_STAGING is not set 704# CONFIG_STAGING is not set
689 705
690# 706#
@@ -696,12 +712,15 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
696# CONFIG_REISERFS_FS is not set 712# CONFIG_REISERFS_FS is not set
697# CONFIG_JFS_FS is not set 713# CONFIG_JFS_FS is not set
698# CONFIG_FS_POSIX_ACL is not set 714# CONFIG_FS_POSIX_ACL is not set
699CONFIG_FILE_LOCKING=y
700# CONFIG_XFS_FS is not set 715# CONFIG_XFS_FS is not set
716# CONFIG_GFS2_FS is not set
701# CONFIG_OCFS2_FS is not set 717# CONFIG_OCFS2_FS is not set
702# CONFIG_BTRFS_FS is not set 718# CONFIG_BTRFS_FS is not set
719CONFIG_FILE_LOCKING=y
720CONFIG_FSNOTIFY=y
703# CONFIG_DNOTIFY is not set 721# CONFIG_DNOTIFY is not set
704# CONFIG_INOTIFY is not set 722# CONFIG_INOTIFY is not set
723CONFIG_INOTIFY_USER=y
705# CONFIG_QUOTA is not set 724# CONFIG_QUOTA is not set
706# CONFIG_AUTOFS_FS is not set 725# CONFIG_AUTOFS_FS is not set
707# CONFIG_AUTOFS4_FS is not set 726# CONFIG_AUTOFS4_FS is not set
@@ -818,6 +837,7 @@ CONFIG_HAS_IOPORT=y
818CONFIG_HAS_DMA=y 837CONFIG_HAS_DMA=y
819CONFIG_HAVE_LMB=y 838CONFIG_HAVE_LMB=y
820CONFIG_NLATTR=y 839CONFIG_NLATTR=y
840CONFIG_GENERIC_ATOMIC64=y
821 841
822# 842#
823# Kernel hacking 843# Kernel hacking
@@ -846,6 +866,9 @@ CONFIG_SCHED_DEBUG=y
846# CONFIG_SLUB_STATS is not set 866# CONFIG_SLUB_STATS is not set
847# CONFIG_DEBUG_SPINLOCK is not set 867# CONFIG_DEBUG_SPINLOCK is not set
848# CONFIG_DEBUG_MUTEXES is not set 868# CONFIG_DEBUG_MUTEXES is not set
869# CONFIG_DEBUG_LOCK_ALLOC is not set
870# CONFIG_PROVE_LOCKING is not set
871# CONFIG_LOCK_STAT is not set
849# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 872# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
850# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 873# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
851# CONFIG_DEBUG_KOBJECT is not set 874# CONFIG_DEBUG_KOBJECT is not set
@@ -857,7 +880,6 @@ CONFIG_DEBUG_INFO=y
857# CONFIG_DEBUG_LIST is not set 880# CONFIG_DEBUG_LIST is not set
858# CONFIG_DEBUG_SG is not set 881# CONFIG_DEBUG_SG is not set
859# CONFIG_DEBUG_NOTIFIERS is not set 882# CONFIG_DEBUG_NOTIFIERS is not set
860# CONFIG_BOOT_PRINTK_DELAY is not set
861# CONFIG_RCU_TORTURE_TEST is not set 883# CONFIG_RCU_TORTURE_TEST is not set
862# CONFIG_RCU_CPU_STALL_DETECTOR is not set 884# CONFIG_RCU_CPU_STALL_DETECTOR is not set
863# CONFIG_BACKTRACE_SELF_TEST is not set 885# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -870,16 +892,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
870CONFIG_HAVE_DYNAMIC_FTRACE=y 892CONFIG_HAVE_DYNAMIC_FTRACE=y
871CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 893CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
872CONFIG_TRACING_SUPPORT=y 894CONFIG_TRACING_SUPPORT=y
873 895CONFIG_FTRACE=y
874#
875# Tracers
876#
877# CONFIG_FUNCTION_TRACER is not set 896# CONFIG_FUNCTION_TRACER is not set
897# CONFIG_IRQSOFF_TRACER is not set
878# CONFIG_SCHED_TRACER is not set 898# CONFIG_SCHED_TRACER is not set
879# CONFIG_CONTEXT_SWITCH_TRACER is not set 899# CONFIG_ENABLE_DEFAULT_TRACERS is not set
880# CONFIG_EVENT_TRACER is not set
881# CONFIG_BOOT_TRACER is not set 900# CONFIG_BOOT_TRACER is not set
882# CONFIG_TRACE_BRANCH_PROFILING is not set 901CONFIG_BRANCH_PROFILE_NONE=y
902# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
903# CONFIG_PROFILE_ALL_BRANCHES is not set
883# CONFIG_STACK_TRACER is not set 904# CONFIG_STACK_TRACER is not set
884# CONFIG_KMEMTRACE is not set 905# CONFIG_KMEMTRACE is not set
885# CONFIG_WORKQUEUE_TRACER is not set 906# CONFIG_WORKQUEUE_TRACER is not set
@@ -888,9 +909,13 @@ CONFIG_TRACING_SUPPORT=y
888# CONFIG_SAMPLES is not set 909# CONFIG_SAMPLES is not set
889CONFIG_HAVE_ARCH_KGDB=y 910CONFIG_HAVE_ARCH_KGDB=y
890# CONFIG_KGDB is not set 911# CONFIG_KGDB is not set
912# CONFIG_KMEMCHECK is not set
913# CONFIG_PPC_DISABLE_WERROR is not set
914CONFIG_PPC_WERROR=y
891CONFIG_PRINT_STACK_DEPTH=64 915CONFIG_PRINT_STACK_DEPTH=64
892# CONFIG_DEBUG_STACKOVERFLOW is not set 916# CONFIG_DEBUG_STACKOVERFLOW is not set
893# CONFIG_DEBUG_STACK_USAGE is not set 917# CONFIG_DEBUG_STACK_USAGE is not set
918# CONFIG_PPC_EMULATED_STATS is not set
894# CONFIG_CODE_PATCHING_SELFTEST is not set 919# CONFIG_CODE_PATCHING_SELFTEST is not set
895# CONFIG_FTR_FIXUP_SELFTEST is not set 920# CONFIG_FTR_FIXUP_SELFTEST is not set
896# CONFIG_MSI_BITMAP_SELFTEST is not set 921# CONFIG_MSI_BITMAP_SELFTEST is not set
diff --git a/arch/powerpc/configs/c2k_defconfig b/arch/powerpc/configs/c2k_defconfig
index 9ffa8de9280..8105360d53f 100644
--- a/arch/powerpc/configs/c2k_defconfig
+++ b/arch/powerpc/configs/c2k_defconfig
@@ -1,25 +1,27 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:21:51 2009 4# Wed Jul 29 23:31:48 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_ALTIVEC is not set 20# CONFIG_ALTIVEC is not set
20CONFIG_PPC_STD_MMU=y 21CONFIG_PPC_STD_MMU=y
21CONFIG_PPC_STD_MMU_32=y 22CONFIG_PPC_STD_MMU_32=y
22# CONFIG_PPC_MM_SLICES is not set 23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC_HAVE_PMU_SUPPORT=y
23# CONFIG_SMP is not set 25# CONFIG_SMP is not set
24CONFIG_NOT_COHERENT_CACHE=y 26CONFIG_NOT_COHERENT_CACHE=y
25CONFIG_CHECK_CACHE_COHERENCY=y 27CONFIG_CHECK_CACHE_COHERENCY=y
@@ -32,15 +34,16 @@ CONFIG_GENERIC_TIME=y
32CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
33CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
34CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
35# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
36CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
37CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
38CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
39CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
40CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
41CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
42CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
43CONFIG_GENERIC_CALIBRATE_DELAY=y
44CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
45# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
46CONFIG_PPC=y 49CONFIG_PPC=y
@@ -54,11 +57,13 @@ CONFIG_OF=y
54# CONFIG_GENERIC_TBSYNC is not set 57# CONFIG_GENERIC_TBSYNC is not set
55CONFIG_AUDIT_ARCH=y 58CONFIG_AUDIT_ARCH=y
56CONFIG_GENERIC_BUG=y 59CONFIG_GENERIC_BUG=y
60CONFIG_DTC=y
57# CONFIG_DEFAULT_UIMAGE is not set 61# CONFIG_DEFAULT_UIMAGE is not set
58# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
59# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
60CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
61CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
62 67
63# 68#
64# General setup 69# General setup
@@ -118,7 +123,6 @@ CONFIG_SYSCTL_SYSCALL=y
118CONFIG_KALLSYMS=y 123CONFIG_KALLSYMS=y
119# CONFIG_KALLSYMS_ALL is not set 124# CONFIG_KALLSYMS_ALL is not set
120CONFIG_KALLSYMS_EXTRA_PASS=y 125CONFIG_KALLSYMS_EXTRA_PASS=y
121# CONFIG_STRIP_ASM_SYMS is not set
122CONFIG_HOTPLUG=y 126CONFIG_HOTPLUG=y
123CONFIG_PRINTK=y 127CONFIG_PRINTK=y
124CONFIG_BUG=y 128CONFIG_BUG=y
@@ -131,16 +135,23 @@ CONFIG_TIMERFD=y
131CONFIG_EVENTFD=y 135CONFIG_EVENTFD=y
132CONFIG_SHMEM=y 136CONFIG_SHMEM=y
133CONFIG_AIO=y 137CONFIG_AIO=y
138CONFIG_HAVE_PERF_COUNTERS=y
139
140#
141# Performance Counters
142#
143# CONFIG_PERF_COUNTERS is not set
134CONFIG_VM_EVENT_COUNTERS=y 144CONFIG_VM_EVENT_COUNTERS=y
135CONFIG_PCI_QUIRKS=y 145CONFIG_PCI_QUIRKS=y
136CONFIG_SLUB_DEBUG=y 146CONFIG_SLUB_DEBUG=y
147# CONFIG_STRIP_ASM_SYMS is not set
137CONFIG_COMPAT_BRK=y 148CONFIG_COMPAT_BRK=y
138# CONFIG_SLAB is not set 149# CONFIG_SLAB is not set
139CONFIG_SLUB=y 150CONFIG_SLUB=y
140# CONFIG_SLOB is not set 151# CONFIG_SLOB is not set
141CONFIG_PROFILING=y 152CONFIG_PROFILING=y
142CONFIG_TRACEPOINTS=y 153CONFIG_TRACEPOINTS=y
143# CONFIG_MARKERS is not set 154CONFIG_MARKERS=y
144CONFIG_OPROFILE=m 155CONFIG_OPROFILE=m
145CONFIG_HAVE_OPROFILE=y 156CONFIG_HAVE_OPROFILE=y
146CONFIG_KPROBES=y 157CONFIG_KPROBES=y
@@ -150,6 +161,11 @@ CONFIG_HAVE_IOREMAP_PROT=y
150CONFIG_HAVE_KPROBES=y 161CONFIG_HAVE_KPROBES=y
151CONFIG_HAVE_KRETPROBES=y 162CONFIG_HAVE_KRETPROBES=y
152CONFIG_HAVE_ARCH_TRACEHOOK=y 163CONFIG_HAVE_ARCH_TRACEHOOK=y
164
165#
166# GCOV-based kernel profiling
167#
168# CONFIG_GCOV_KERNEL is not set
153# CONFIG_SLOW_WORK is not set 169# CONFIG_SLOW_WORK is not set
154# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 170# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
155CONFIG_SLABINFO=y 171CONFIG_SLABINFO=y
@@ -162,7 +178,7 @@ CONFIG_MODULE_UNLOAD=y
162CONFIG_MODVERSIONS=y 178CONFIG_MODVERSIONS=y
163# CONFIG_MODULE_SRCVERSION_ALL is not set 179# CONFIG_MODULE_SRCVERSION_ALL is not set
164CONFIG_BLOCK=y 180CONFIG_BLOCK=y
165CONFIG_LBD=y 181CONFIG_LBDAF=y
166# CONFIG_BLK_DEV_BSG is not set 182# CONFIG_BLK_DEV_BSG is not set
167# CONFIG_BLK_DEV_INTEGRITY is not set 183# CONFIG_BLK_DEV_INTEGRITY is not set
168 184
@@ -258,6 +274,7 @@ CONFIG_BINFMT_ELF=y
258# CONFIG_HAVE_AOUT is not set 274# CONFIG_HAVE_AOUT is not set
259CONFIG_BINFMT_MISC=y 275CONFIG_BINFMT_MISC=y
260# CONFIG_IOMMU_HELPER is not set 276# CONFIG_IOMMU_HELPER is not set
277# CONFIG_SWIOTLB is not set
261CONFIG_PPC_NEED_DMA_SYNC_OPS=y 278CONFIG_PPC_NEED_DMA_SYNC_OPS=y
262CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 279CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
263CONFIG_ARCH_HAS_WALK_MEMORY=y 280CONFIG_ARCH_HAS_WALK_MEMORY=y
@@ -279,9 +296,9 @@ CONFIG_MIGRATION=y
279CONFIG_ZONE_DMA_FLAG=1 296CONFIG_ZONE_DMA_FLAG=1
280CONFIG_BOUNCE=y 297CONFIG_BOUNCE=y
281CONFIG_VIRT_TO_BUS=y 298CONFIG_VIRT_TO_BUS=y
282CONFIG_UNEVICTABLE_LRU=y
283CONFIG_HAVE_MLOCK=y 299CONFIG_HAVE_MLOCK=y
284CONFIG_HAVE_MLOCKED_PAGE_BIT=y 300CONFIG_HAVE_MLOCKED_PAGE_BIT=y
301CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
285CONFIG_PPC_4K_PAGES=y 302CONFIG_PPC_4K_PAGES=y
286# CONFIG_PPC_16K_PAGES is not set 303# CONFIG_PPC_16K_PAGES is not set
287# CONFIG_PPC_64K_PAGES is not set 304# CONFIG_PPC_64K_PAGES is not set
@@ -331,6 +348,7 @@ CONFIG_PAGE_OFFSET=0xc0000000
331CONFIG_KERNEL_START=0xc0000000 348CONFIG_KERNEL_START=0xc0000000
332CONFIG_PHYSICAL_START=0x00000000 349CONFIG_PHYSICAL_START=0x00000000
333CONFIG_TASK_SIZE=0xc0000000 350CONFIG_TASK_SIZE=0xc0000000
351CONFIG_CONSISTENT_SIZE=0x00200000
334CONFIG_NET=y 352CONFIG_NET=y
335 353
336# 354#
@@ -583,6 +601,7 @@ CONFIG_LLC=m
583# CONFIG_ECONET is not set 601# CONFIG_ECONET is not set
584# CONFIG_WAN_ROUTER is not set 602# CONFIG_WAN_ROUTER is not set
585# CONFIG_PHONET is not set 603# CONFIG_PHONET is not set
604# CONFIG_IEEE802154 is not set
586CONFIG_NET_SCHED=y 605CONFIG_NET_SCHED=y
587 606
588# 607#
@@ -663,7 +682,11 @@ CONFIG_WIRELESS_OLD_REGULATORY=y
663CONFIG_WIRELESS_EXT=y 682CONFIG_WIRELESS_EXT=y
664CONFIG_WIRELESS_EXT_SYSFS=y 683CONFIG_WIRELESS_EXT_SYSFS=y
665# CONFIG_LIB80211 is not set 684# CONFIG_LIB80211 is not set
666# CONFIG_MAC80211 is not set 685
686#
687# CFG80211 needs to be enabled for MAC80211
688#
689CONFIG_MAC80211_DEFAULT_PS_VALUE=0
667# CONFIG_WIMAX is not set 690# CONFIG_WIMAX is not set
668# CONFIG_RFKILL is not set 691# CONFIG_RFKILL is not set
669# CONFIG_NET_9P is not set 692# CONFIG_NET_9P is not set
@@ -772,6 +795,7 @@ CONFIG_MTD_PHYSMAP_OF=y
772# CONFIG_MTD_UBI is not set 795# CONFIG_MTD_UBI is not set
773CONFIG_OF_DEVICE=y 796CONFIG_OF_DEVICE=y
774CONFIG_OF_I2C=m 797CONFIG_OF_I2C=m
798CONFIG_OF_MDIO=y
775# CONFIG_PARPORT is not set 799# CONFIG_PARPORT is not set
776CONFIG_BLK_DEV=y 800CONFIG_BLK_DEV=y
777# CONFIG_BLK_DEV_FD is not set 801# CONFIG_BLK_DEV_FD is not set
@@ -816,10 +840,6 @@ CONFIG_BLK_DEV_SR=m
816CONFIG_BLK_DEV_SR_VENDOR=y 840CONFIG_BLK_DEV_SR_VENDOR=y
817CONFIG_CHR_DEV_SG=m 841CONFIG_CHR_DEV_SG=m
818# CONFIG_CHR_DEV_SCH is not set 842# CONFIG_CHR_DEV_SCH is not set
819
820#
821# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
822#
823# CONFIG_SCSI_MULTI_LUN is not set 843# CONFIG_SCSI_MULTI_LUN is not set
824CONFIG_SCSI_CONSTANTS=y 844CONFIG_SCSI_CONSTANTS=y
825CONFIG_SCSI_LOGGING=y 845CONFIG_SCSI_LOGGING=y
@@ -836,6 +856,7 @@ CONFIG_SCSI_ISCSI_ATTRS=m
836CONFIG_SCSI_SRP_ATTRS=m 856CONFIG_SCSI_SRP_ATTRS=m
837CONFIG_SCSI_LOWLEVEL=y 857CONFIG_SCSI_LOWLEVEL=y
838# CONFIG_ISCSI_TCP is not set 858# CONFIG_ISCSI_TCP is not set
859# CONFIG_SCSI_BNX2_ISCSI is not set
839CONFIG_BLK_DEV_3W_XXXX_RAID=m 860CONFIG_BLK_DEV_3W_XXXX_RAID=m
840CONFIG_SCSI_3W_9XXX=m 861CONFIG_SCSI_3W_9XXX=m
841CONFIG_SCSI_ACARD=m 862CONFIG_SCSI_ACARD=m
@@ -854,6 +875,7 @@ CONFIG_AIC79XX_RESET_DELAY_MS=15000
854CONFIG_AIC79XX_DEBUG_MASK=0 875CONFIG_AIC79XX_DEBUG_MASK=0
855# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set 876# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
856# CONFIG_SCSI_AIC94XX is not set 877# CONFIG_SCSI_AIC94XX is not set
878# CONFIG_SCSI_MVSAS is not set
857# CONFIG_SCSI_DPT_I2O is not set 879# CONFIG_SCSI_DPT_I2O is not set
858# CONFIG_SCSI_ADVANSYS is not set 880# CONFIG_SCSI_ADVANSYS is not set
859CONFIG_SCSI_ARCMSR=m 881CONFIG_SCSI_ARCMSR=m
@@ -875,7 +897,6 @@ CONFIG_SCSI_GDTH=m
875CONFIG_SCSI_IPS=m 897CONFIG_SCSI_IPS=m
876CONFIG_SCSI_INITIO=m 898CONFIG_SCSI_INITIO=m
877# CONFIG_SCSI_INIA100 is not set 899# CONFIG_SCSI_INIA100 is not set
878# CONFIG_SCSI_MVSAS is not set
879# CONFIG_SCSI_STEX is not set 900# CONFIG_SCSI_STEX is not set
880CONFIG_SCSI_SYM53C8XX_2=m 901CONFIG_SCSI_SYM53C8XX_2=m
881CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 902CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
@@ -903,14 +924,17 @@ CONFIG_SCSI_LPFC=m
903# 924#
904 925
905# 926#
906# Enable only one of the two stacks, unless you know what you are doing 927# You can enable one or both FireWire driver stacks.
928#
929
930#
931# See the help texts for more information.
907# 932#
908# CONFIG_FIREWIRE is not set 933# CONFIG_FIREWIRE is not set
909# CONFIG_IEEE1394 is not set 934# CONFIG_IEEE1394 is not set
910# CONFIG_I2O is not set 935# CONFIG_I2O is not set
911# CONFIG_MACINTOSH_DRIVERS is not set 936# CONFIG_MACINTOSH_DRIVERS is not set
912CONFIG_NETDEVICES=y 937CONFIG_NETDEVICES=y
913CONFIG_COMPAT_NET_DEV_OPS=y
914CONFIG_DUMMY=m 938CONFIG_DUMMY=m
915CONFIG_BONDING=m 939CONFIG_BONDING=m
916# CONFIG_MACVLAN is not set 940# CONFIG_MACVLAN is not set
@@ -957,6 +981,7 @@ CONFIG_MII=y
957# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 981# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
958# CONFIG_NET_PCI is not set 982# CONFIG_NET_PCI is not set
959# CONFIG_B44 is not set 983# CONFIG_B44 is not set
984# CONFIG_KS8842 is not set
960# CONFIG_ATL2 is not set 985# CONFIG_ATL2 is not set
961CONFIG_NETDEV_1000=y 986CONFIG_NETDEV_1000=y
962# CONFIG_ACENIC is not set 987# CONFIG_ACENIC is not set
@@ -976,6 +1001,7 @@ CONFIG_NETDEV_1000=y
976# CONFIG_VIA_VELOCITY is not set 1001# CONFIG_VIA_VELOCITY is not set
977# CONFIG_TIGON3 is not set 1002# CONFIG_TIGON3 is not set
978# CONFIG_BNX2 is not set 1003# CONFIG_BNX2 is not set
1004# CONFIG_CNIC is not set
979CONFIG_MV643XX_ETH=y 1005CONFIG_MV643XX_ETH=y
980# CONFIG_QLA3XXX is not set 1006# CONFIG_QLA3XXX is not set
981# CONFIG_ATL1 is not set 1007# CONFIG_ATL1 is not set
@@ -1177,13 +1203,17 @@ CONFIG_I2C_MV64XXX=m
1177CONFIG_SENSORS_PCF8574=m 1203CONFIG_SENSORS_PCF8574=m
1178# CONFIG_PCF8575 is not set 1204# CONFIG_PCF8575 is not set
1179# CONFIG_SENSORS_PCA9539 is not set 1205# CONFIG_SENSORS_PCA9539 is not set
1180# CONFIG_SENSORS_MAX6875 is not set
1181# CONFIG_SENSORS_TSL2550 is not set 1206# CONFIG_SENSORS_TSL2550 is not set
1182# CONFIG_I2C_DEBUG_CORE is not set 1207# CONFIG_I2C_DEBUG_CORE is not set
1183# CONFIG_I2C_DEBUG_ALGO is not set 1208# CONFIG_I2C_DEBUG_ALGO is not set
1184# CONFIG_I2C_DEBUG_BUS is not set 1209# CONFIG_I2C_DEBUG_BUS is not set
1185# CONFIG_I2C_DEBUG_CHIP is not set 1210# CONFIG_I2C_DEBUG_CHIP is not set
1186# CONFIG_SPI is not set 1211# CONFIG_SPI is not set
1212
1213#
1214# PPS support
1215#
1216# CONFIG_PPS is not set
1187CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 1217CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
1188# CONFIG_GPIOLIB is not set 1218# CONFIG_GPIOLIB is not set
1189# CONFIG_W1 is not set 1219# CONFIG_W1 is not set
@@ -1238,6 +1268,7 @@ CONFIG_SENSORS_SMSC47M1=m
1238CONFIG_SENSORS_SMSC47B397=m 1268CONFIG_SENSORS_SMSC47B397=m
1239# CONFIG_SENSORS_ADS7828 is not set 1269# CONFIG_SENSORS_ADS7828 is not set
1240# CONFIG_SENSORS_THMC50 is not set 1270# CONFIG_SENSORS_THMC50 is not set
1271# CONFIG_SENSORS_TMP401 is not set
1241CONFIG_SENSORS_VIA686A=m 1272CONFIG_SENSORS_VIA686A=m
1242# CONFIG_SENSORS_VT1211 is not set 1273# CONFIG_SENSORS_VT1211 is not set
1243# CONFIG_SENSORS_VT8231 is not set 1274# CONFIG_SENSORS_VT8231 is not set
@@ -1266,7 +1297,6 @@ CONFIG_SOFT_WATCHDOG=m
1266# 1297#
1267CONFIG_PCIPCWATCHDOG=m 1298CONFIG_PCIPCWATCHDOG=m
1268CONFIG_WDTPCI=m 1299CONFIG_WDTPCI=m
1269CONFIG_WDT_501_PCI=y
1270 1300
1271# 1301#
1272# USB-based Watchdog Cards 1302# USB-based Watchdog Cards
@@ -1289,23 +1319,9 @@ CONFIG_SSB_POSSIBLE=y
1289# CONFIG_MFD_WM8400 is not set 1319# CONFIG_MFD_WM8400 is not set
1290# CONFIG_MFD_WM8350_I2C is not set 1320# CONFIG_MFD_WM8350_I2C is not set
1291# CONFIG_MFD_PCF50633 is not set 1321# CONFIG_MFD_PCF50633 is not set
1322# CONFIG_AB3100_CORE is not set
1292# CONFIG_REGULATOR is not set 1323# CONFIG_REGULATOR is not set
1293 1324# CONFIG_MEDIA_SUPPORT is not set
1294#
1295# Multimedia devices
1296#
1297
1298#
1299# Multimedia core support
1300#
1301# CONFIG_VIDEO_DEV is not set
1302# CONFIG_DVB_CORE is not set
1303# CONFIG_VIDEO_MEDIA is not set
1304
1305#
1306# Multimedia drivers
1307#
1308# CONFIG_DAB is not set
1309 1325
1310# 1326#
1311# Graphics support 1327# Graphics support
@@ -1354,6 +1370,7 @@ CONFIG_USB_MON=m
1354# USB Host Controller Drivers 1370# USB Host Controller Drivers
1355# 1371#
1356# CONFIG_USB_C67X00_HCD is not set 1372# CONFIG_USB_C67X00_HCD is not set
1373# CONFIG_USB_XHCI_HCD is not set
1357CONFIG_USB_EHCI_HCD=m 1374CONFIG_USB_EHCI_HCD=m
1358CONFIG_USB_EHCI_ROOT_HUB_TT=y 1375CONFIG_USB_EHCI_ROOT_HUB_TT=y
1359# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1376# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1362,9 +1379,9 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y
1362# CONFIG_USB_ISP116X_HCD is not set 1379# CONFIG_USB_ISP116X_HCD is not set
1363# CONFIG_USB_ISP1760_HCD is not set 1380# CONFIG_USB_ISP1760_HCD is not set
1364CONFIG_USB_OHCI_HCD=m 1381CONFIG_USB_OHCI_HCD=m
1365CONFIG_USB_OHCI_HCD_PPC_OF=y
1366CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1382CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1367# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set 1383# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
1384CONFIG_USB_OHCI_HCD_PPC_OF=y
1368CONFIG_USB_OHCI_HCD_PCI=y 1385CONFIG_USB_OHCI_HCD_PCI=y
1369CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y 1386CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1370CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y 1387CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
@@ -1545,6 +1562,10 @@ CONFIG_DMADEVICES=y
1545# 1562#
1546# CONFIG_AUXDISPLAY is not set 1563# CONFIG_AUXDISPLAY is not set
1547# CONFIG_UIO is not set 1564# CONFIG_UIO is not set
1565
1566#
1567# TI VLYNQ
1568#
1548# CONFIG_STAGING is not set 1569# CONFIG_STAGING is not set
1549 1570
1550# 1571#
@@ -1563,11 +1584,12 @@ CONFIG_FS_MBCACHE=m
1563# CONFIG_REISERFS_FS is not set 1584# CONFIG_REISERFS_FS is not set
1564# CONFIG_JFS_FS is not set 1585# CONFIG_JFS_FS is not set
1565CONFIG_FS_POSIX_ACL=y 1586CONFIG_FS_POSIX_ACL=y
1566CONFIG_FILE_LOCKING=y
1567# CONFIG_XFS_FS is not set 1587# CONFIG_XFS_FS is not set
1568# CONFIG_GFS2_FS is not set 1588# CONFIG_GFS2_FS is not set
1569# CONFIG_OCFS2_FS is not set 1589# CONFIG_OCFS2_FS is not set
1570# CONFIG_BTRFS_FS is not set 1590# CONFIG_BTRFS_FS is not set
1591CONFIG_FILE_LOCKING=y
1592CONFIG_FSNOTIFY=y
1571CONFIG_DNOTIFY=y 1593CONFIG_DNOTIFY=y
1572CONFIG_INOTIFY=y 1594CONFIG_INOTIFY=y
1573CONFIG_INOTIFY_USER=y 1595CONFIG_INOTIFY_USER=y
@@ -1652,6 +1674,7 @@ CONFIG_NFS_FS=y
1652CONFIG_NFS_V3=y 1674CONFIG_NFS_V3=y
1653CONFIG_NFS_V3_ACL=y 1675CONFIG_NFS_V3_ACL=y
1654CONFIG_NFS_V4=y 1676CONFIG_NFS_V4=y
1677# CONFIG_NFS_V4_1 is not set
1655CONFIG_ROOT_NFS=y 1678CONFIG_ROOT_NFS=y
1656# CONFIG_NFSD is not set 1679# CONFIG_NFSD is not set
1657CONFIG_LOCKD=y 1680CONFIG_LOCKD=y
@@ -1764,6 +1787,7 @@ CONFIG_HAS_DMA=y
1764CONFIG_CHECK_SIGNATURE=y 1787CONFIG_CHECK_SIGNATURE=y
1765CONFIG_HAVE_LMB=y 1788CONFIG_HAVE_LMB=y
1766CONFIG_NLATTR=y 1789CONFIG_NLATTR=y
1790CONFIG_GENERIC_ATOMIC64=y
1767 1791
1768# 1792#
1769# Kernel hacking 1793# Kernel hacking
@@ -1794,6 +1818,9 @@ CONFIG_SCHED_DEBUG=y
1794# CONFIG_RT_MUTEX_TESTER is not set 1818# CONFIG_RT_MUTEX_TESTER is not set
1795CONFIG_DEBUG_SPINLOCK=y 1819CONFIG_DEBUG_SPINLOCK=y
1796# CONFIG_DEBUG_MUTEXES is not set 1820# CONFIG_DEBUG_MUTEXES is not set
1821# CONFIG_DEBUG_LOCK_ALLOC is not set
1822# CONFIG_PROVE_LOCKING is not set
1823# CONFIG_LOCK_STAT is not set
1797CONFIG_DEBUG_SPINLOCK_SLEEP=y 1824CONFIG_DEBUG_SPINLOCK_SLEEP=y
1798# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1825# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1799CONFIG_STACKTRACE=y 1826CONFIG_STACKTRACE=y
@@ -1807,7 +1834,6 @@ CONFIG_DEBUG_MEMORY_INIT=y
1807# CONFIG_DEBUG_LIST is not set 1834# CONFIG_DEBUG_LIST is not set
1808# CONFIG_DEBUG_SG is not set 1835# CONFIG_DEBUG_SG is not set
1809# CONFIG_DEBUG_NOTIFIERS is not set 1836# CONFIG_DEBUG_NOTIFIERS is not set
1810# CONFIG_BOOT_PRINTK_DELAY is not set
1811# CONFIG_RCU_TORTURE_TEST is not set 1837# CONFIG_RCU_TORTURE_TEST is not set
1812# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1838# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1813# CONFIG_KPROBES_SANITY_TEST is not set 1839# CONFIG_KPROBES_SANITY_TEST is not set
@@ -1824,30 +1850,34 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1824CONFIG_HAVE_DYNAMIC_FTRACE=y 1850CONFIG_HAVE_DYNAMIC_FTRACE=y
1825CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1851CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1826CONFIG_RING_BUFFER=y 1852CONFIG_RING_BUFFER=y
1853CONFIG_EVENT_TRACING=y
1854CONFIG_CONTEXT_SWITCH_TRACER=y
1827CONFIG_TRACING=y 1855CONFIG_TRACING=y
1828CONFIG_TRACING_SUPPORT=y 1856CONFIG_TRACING_SUPPORT=y
1829 1857CONFIG_FTRACE=y
1830#
1831# Tracers
1832#
1833# CONFIG_FUNCTION_TRACER is not set 1858# CONFIG_FUNCTION_TRACER is not set
1859# CONFIG_IRQSOFF_TRACER is not set
1834# CONFIG_SCHED_TRACER is not set 1860# CONFIG_SCHED_TRACER is not set
1835# CONFIG_CONTEXT_SWITCH_TRACER is not set 1861# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1836# CONFIG_EVENT_TRACER is not set
1837# CONFIG_BOOT_TRACER is not set 1862# CONFIG_BOOT_TRACER is not set
1838# CONFIG_TRACE_BRANCH_PROFILING is not set 1863CONFIG_BRANCH_PROFILE_NONE=y
1864# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1865# CONFIG_PROFILE_ALL_BRANCHES is not set
1839# CONFIG_STACK_TRACER is not set 1866# CONFIG_STACK_TRACER is not set
1840# CONFIG_KMEMTRACE is not set 1867# CONFIG_KMEMTRACE is not set
1841# CONFIG_WORKQUEUE_TRACER is not set 1868# CONFIG_WORKQUEUE_TRACER is not set
1842# CONFIG_BLK_DEV_IO_TRACE is not set 1869# CONFIG_BLK_DEV_IO_TRACE is not set
1843# CONFIG_FTRACE_STARTUP_TEST is not set 1870# CONFIG_RING_BUFFER_BENCHMARK is not set
1844# CONFIG_DYNAMIC_DEBUG is not set 1871# CONFIG_DYNAMIC_DEBUG is not set
1845# CONFIG_SAMPLES is not set 1872# CONFIG_SAMPLES is not set
1846CONFIG_HAVE_ARCH_KGDB=y 1873CONFIG_HAVE_ARCH_KGDB=y
1847# CONFIG_KGDB is not set 1874# CONFIG_KGDB is not set
1875# CONFIG_PPC_DISABLE_WERROR is not set
1876CONFIG_PPC_WERROR=y
1848CONFIG_PRINT_STACK_DEPTH=64 1877CONFIG_PRINT_STACK_DEPTH=64
1849CONFIG_DEBUG_STACKOVERFLOW=y 1878CONFIG_DEBUG_STACKOVERFLOW=y
1850CONFIG_DEBUG_STACK_USAGE=y 1879CONFIG_DEBUG_STACK_USAGE=y
1880# CONFIG_PPC_EMULATED_STATS is not set
1851# CONFIG_CODE_PATCHING_SELFTEST is not set 1881# CONFIG_CODE_PATCHING_SELFTEST is not set
1852# CONFIG_FTR_FIXUP_SELFTEST is not set 1882# CONFIG_FTR_FIXUP_SELFTEST is not set
1853# CONFIG_MSI_BITMAP_SELFTEST is not set 1883# CONFIG_MSI_BITMAP_SELFTEST is not set
@@ -1869,7 +1899,6 @@ CONFIG_SECURITY_NETWORK=y
1869# CONFIG_SECURITY_NETWORK_XFRM is not set 1899# CONFIG_SECURITY_NETWORK_XFRM is not set
1870# CONFIG_SECURITY_PATH is not set 1900# CONFIG_SECURITY_PATH is not set
1871# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1901# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1872CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
1873CONFIG_SECURITY_SELINUX=y 1902CONFIG_SECURITY_SELINUX=y
1874CONFIG_SECURITY_SELINUX_BOOTPARAM=y 1903CONFIG_SECURITY_SELINUX_BOOTPARAM=y
1875CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 1904CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
diff --git a/arch/powerpc/configs/ep8248e_defconfig b/arch/powerpc/configs/ep8248e_defconfig
index 04915c3a43f..0aa5b43ffeb 100644
--- a/arch/powerpc/configs/ep8248e_defconfig
+++ b/arch/powerpc/configs/ep8248e_defconfig
@@ -1,25 +1,27 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:21:52 2009 4# Wed Jul 29 23:31:49 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_ALTIVEC is not set 20# CONFIG_ALTIVEC is not set
20CONFIG_PPC_STD_MMU=y 21CONFIG_PPC_STD_MMU=y
21CONFIG_PPC_STD_MMU_32=y 22CONFIG_PPC_STD_MMU_32=y
22# CONFIG_PPC_MM_SLICES is not set 23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC_HAVE_PMU_SUPPORT=y
23# CONFIG_SMP is not set 25# CONFIG_SMP is not set
24CONFIG_PPC32=y 26CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32 27CONFIG_WORD_SIZE=32
@@ -30,15 +32,16 @@ CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y 32CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y 33CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 34CONFIG_GENERIC_HARDIRQS=y
35CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 36# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 37CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y 38CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_HAVE_LATENCYTOP_SUPPORT=y 39CONFIG_HAVE_LATENCYTOP_SUPPORT=y
40CONFIG_TRACE_IRQFLAGS_SUPPORT=y
37CONFIG_LOCKDEP_SUPPORT=y 41CONFIG_LOCKDEP_SUPPORT=y
38CONFIG_RWSEM_XCHGADD_ALGORITHM=y 42CONFIG_RWSEM_XCHGADD_ALGORITHM=y
39CONFIG_ARCH_HAS_ILOG2_U32=y 43CONFIG_ARCH_HAS_ILOG2_U32=y
40CONFIG_GENERIC_HWEIGHT=y 44CONFIG_GENERIC_HWEIGHT=y
41CONFIG_GENERIC_CALIBRATE_DELAY=y
42CONFIG_GENERIC_FIND_NEXT_BIT=y 45CONFIG_GENERIC_FIND_NEXT_BIT=y
43CONFIG_GENERIC_GPIO=y 46CONFIG_GENERIC_GPIO=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -53,11 +56,13 @@ CONFIG_OF=y
53# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
56# CONFIG_DEFAULT_UIMAGE is not set 60# CONFIG_DEFAULT_UIMAGE is not set
57# CONFIG_PPC_DCR_NATIVE is not set 61# CONFIG_PPC_DCR_NATIVE is not set
58# CONFIG_PPC_DCR_MMIO is not set 62# CONFIG_PPC_DCR_MMIO is not set
59CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 63CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
60CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 64CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
65CONFIG_CONSTRUCTORS=y
61 66
62# 67#
63# General setup 68# General setup
@@ -99,7 +104,6 @@ CONFIG_SYSCTL_SYSCALL=y
99CONFIG_KALLSYMS=y 104CONFIG_KALLSYMS=y
100CONFIG_KALLSYMS_ALL=y 105CONFIG_KALLSYMS_ALL=y
101# CONFIG_KALLSYMS_EXTRA_PASS is not set 106# CONFIG_KALLSYMS_EXTRA_PASS is not set
102# CONFIG_STRIP_ASM_SYMS is not set
103CONFIG_HOTPLUG=y 107CONFIG_HOTPLUG=y
104CONFIG_PRINTK=y 108CONFIG_PRINTK=y
105CONFIG_BUG=y 109CONFIG_BUG=y
@@ -112,8 +116,15 @@ CONFIG_TIMERFD=y
112CONFIG_EVENTFD=y 116CONFIG_EVENTFD=y
113CONFIG_SHMEM=y 117CONFIG_SHMEM=y
114CONFIG_AIO=y 118CONFIG_AIO=y
119CONFIG_HAVE_PERF_COUNTERS=y
120
121#
122# Performance Counters
123#
124# CONFIG_PERF_COUNTERS is not set
115CONFIG_VM_EVENT_COUNTERS=y 125CONFIG_VM_EVENT_COUNTERS=y
116CONFIG_PCI_QUIRKS=y 126CONFIG_PCI_QUIRKS=y
127# CONFIG_STRIP_ASM_SYMS is not set
117CONFIG_COMPAT_BRK=y 128CONFIG_COMPAT_BRK=y
118CONFIG_SLAB=y 129CONFIG_SLAB=y
119# CONFIG_SLUB is not set 130# CONFIG_SLUB is not set
@@ -127,6 +138,10 @@ CONFIG_HAVE_KPROBES=y
127CONFIG_HAVE_KRETPROBES=y 138CONFIG_HAVE_KRETPROBES=y
128CONFIG_HAVE_ARCH_TRACEHOOK=y 139CONFIG_HAVE_ARCH_TRACEHOOK=y
129CONFIG_HAVE_CLK=y 140CONFIG_HAVE_CLK=y
141
142#
143# GCOV-based kernel profiling
144#
130# CONFIG_SLOW_WORK is not set 145# CONFIG_SLOW_WORK is not set
131# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 146# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
132CONFIG_SLABINFO=y 147CONFIG_SLABINFO=y
@@ -134,7 +149,7 @@ CONFIG_RT_MUTEXES=y
134CONFIG_BASE_SMALL=0 149CONFIG_BASE_SMALL=0
135# CONFIG_MODULES is not set 150# CONFIG_MODULES is not set
136CONFIG_BLOCK=y 151CONFIG_BLOCK=y
137# CONFIG_LBD is not set 152CONFIG_LBDAF=y
138# CONFIG_BLK_DEV_INTEGRITY is not set 153# CONFIG_BLK_DEV_INTEGRITY is not set
139 154
140# 155#
@@ -213,6 +228,7 @@ CONFIG_BINFMT_ELF=y
213# CONFIG_HAVE_AOUT is not set 228# CONFIG_HAVE_AOUT is not set
214CONFIG_BINFMT_MISC=y 229CONFIG_BINFMT_MISC=y
215# CONFIG_IOMMU_HELPER is not set 230# CONFIG_IOMMU_HELPER is not set
231# CONFIG_SWIOTLB is not set
216CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 232CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
217CONFIG_ARCH_HAS_WALK_MEMORY=y 233CONFIG_ARCH_HAS_WALK_MEMORY=y
218CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 234CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -228,9 +244,9 @@ CONFIG_MIGRATION=y
228CONFIG_ZONE_DMA_FLAG=1 244CONFIG_ZONE_DMA_FLAG=1
229CONFIG_BOUNCE=y 245CONFIG_BOUNCE=y
230CONFIG_VIRT_TO_BUS=y 246CONFIG_VIRT_TO_BUS=y
231CONFIG_UNEVICTABLE_LRU=y
232CONFIG_HAVE_MLOCK=y 247CONFIG_HAVE_MLOCK=y
233CONFIG_HAVE_MLOCKED_PAGE_BIT=y 248CONFIG_HAVE_MLOCKED_PAGE_BIT=y
249CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
234CONFIG_PPC_4K_PAGES=y 250CONFIG_PPC_4K_PAGES=y
235# CONFIG_PPC_16K_PAGES is not set 251# CONFIG_PPC_16K_PAGES is not set
236# CONFIG_PPC_64K_PAGES is not set 252# CONFIG_PPC_64K_PAGES is not set
@@ -300,6 +316,7 @@ CONFIG_IP_PNP_BOOTP=y
300# CONFIG_NET_IPIP is not set 316# CONFIG_NET_IPIP is not set
301# CONFIG_NET_IPGRE is not set 317# CONFIG_NET_IPGRE is not set
302# CONFIG_IP_MROUTE is not set 318# CONFIG_IP_MROUTE is not set
319# CONFIG_ARPD is not set
303CONFIG_SYN_COOKIES=y 320CONFIG_SYN_COOKIES=y
304# CONFIG_INET_AH is not set 321# CONFIG_INET_AH is not set
305# CONFIG_INET_ESP is not set 322# CONFIG_INET_ESP is not set
@@ -380,7 +397,11 @@ CONFIG_WIRELESS=y
380CONFIG_WIRELESS_OLD_REGULATORY=y 397CONFIG_WIRELESS_OLD_REGULATORY=y
381# CONFIG_WIRELESS_EXT is not set 398# CONFIG_WIRELESS_EXT is not set
382# CONFIG_LIB80211 is not set 399# CONFIG_LIB80211 is not set
383# CONFIG_MAC80211 is not set 400
401#
402# CFG80211 needs to be enabled for MAC80211
403#
404CONFIG_MAC80211_DEFAULT_PS_VALUE=0
384# CONFIG_WIMAX is not set 405# CONFIG_WIMAX is not set
385# CONFIG_RFKILL is not set 406# CONFIG_RFKILL is not set
386 407
@@ -485,6 +506,7 @@ CONFIG_MTD_PHYSMAP_OF=y
485# CONFIG_MTD_UBI is not set 506# CONFIG_MTD_UBI is not set
486CONFIG_OF_DEVICE=y 507CONFIG_OF_DEVICE=y
487CONFIG_OF_GPIO=y 508CONFIG_OF_GPIO=y
509CONFIG_OF_MDIO=y
488# CONFIG_PARPORT is not set 510# CONFIG_PARPORT is not set
489CONFIG_BLK_DEV=y 511CONFIG_BLK_DEV=y
490# CONFIG_BLK_DEV_FD is not set 512# CONFIG_BLK_DEV_FD is not set
@@ -520,13 +542,17 @@ CONFIG_HAVE_IDE=y
520# 542#
521 543
522# 544#
523# A new alternative FireWire stack is available with EXPERIMENTAL=y 545# You can enable one or both FireWire driver stacks.
524# 546#
547
548#
549# See the help texts for more information.
550#
551# CONFIG_FIREWIRE is not set
525# CONFIG_IEEE1394 is not set 552# CONFIG_IEEE1394 is not set
526# CONFIG_I2O is not set 553# CONFIG_I2O is not set
527# CONFIG_MACINTOSH_DRIVERS is not set 554# CONFIG_MACINTOSH_DRIVERS is not set
528CONFIG_NETDEVICES=y 555CONFIG_NETDEVICES=y
529CONFIG_COMPAT_NET_DEV_OPS=y
530# CONFIG_DUMMY is not set 556# CONFIG_DUMMY is not set
531# CONFIG_BONDING is not set 557# CONFIG_BONDING is not set
532# CONFIG_EQUALIZER is not set 558# CONFIG_EQUALIZER is not set
@@ -573,6 +599,7 @@ CONFIG_MII=y
573# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 599# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
574# CONFIG_NET_PCI is not set 600# CONFIG_NET_PCI is not set
575# CONFIG_B44 is not set 601# CONFIG_B44 is not set
602# CONFIG_KS8842 is not set
576# CONFIG_ATL2 is not set 603# CONFIG_ATL2 is not set
577CONFIG_FS_ENET=y 604CONFIG_FS_ENET=y
578# CONFIG_FS_ENET_HAS_SCC is not set 605# CONFIG_FS_ENET_HAS_SCC is not set
@@ -594,8 +621,10 @@ CONFIG_NETDEV_1000=y
594# CONFIG_VIA_VELOCITY is not set 621# CONFIG_VIA_VELOCITY is not set
595# CONFIG_TIGON3 is not set 622# CONFIG_TIGON3 is not set
596# CONFIG_BNX2 is not set 623# CONFIG_BNX2 is not set
624# CONFIG_CNIC is not set
597# CONFIG_FSL_PQ_MDIO is not set 625# CONFIG_FSL_PQ_MDIO is not set
598# CONFIG_GIANFAR is not set 626# CONFIG_GIANFAR is not set
627# CONFIG_MV643XX_ETH is not set
599# CONFIG_QLA3XXX is not set 628# CONFIG_QLA3XXX is not set
600# CONFIG_ATL1 is not set 629# CONFIG_ATL1 is not set
601# CONFIG_JME is not set 630# CONFIG_JME is not set
@@ -685,6 +714,10 @@ CONFIG_HW_RANDOM=y
685CONFIG_DEVPORT=y 714CONFIG_DEVPORT=y
686# CONFIG_I2C is not set 715# CONFIG_I2C is not set
687# CONFIG_SPI is not set 716# CONFIG_SPI is not set
717
718#
719# PPS support
720#
688CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 721CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
689CONFIG_ARCH_REQUIRE_GPIOLIB=y 722CONFIG_ARCH_REQUIRE_GPIOLIB=y
690CONFIG_GPIOLIB=y 723CONFIG_GPIOLIB=y
@@ -728,22 +761,7 @@ CONFIG_SSB_POSSIBLE=y
728# CONFIG_HTC_PASIC3 is not set 761# CONFIG_HTC_PASIC3 is not set
729# CONFIG_MFD_TMIO is not set 762# CONFIG_MFD_TMIO is not set
730# CONFIG_REGULATOR is not set 763# CONFIG_REGULATOR is not set
731 764# CONFIG_MEDIA_SUPPORT is not set
732#
733# Multimedia devices
734#
735
736#
737# Multimedia core support
738#
739# CONFIG_VIDEO_DEV is not set
740# CONFIG_DVB_CORE is not set
741# CONFIG_VIDEO_MEDIA is not set
742
743#
744# Multimedia drivers
745#
746CONFIG_DAB=y
747 765
748# 766#
749# Graphics support 767# Graphics support
@@ -771,6 +789,10 @@ CONFIG_DAB=y
771# CONFIG_DMADEVICES is not set 789# CONFIG_DMADEVICES is not set
772# CONFIG_AUXDISPLAY is not set 790# CONFIG_AUXDISPLAY is not set
773# CONFIG_UIO is not set 791# CONFIG_UIO is not set
792
793#
794# TI VLYNQ
795#
774# CONFIG_STAGING is not set 796# CONFIG_STAGING is not set
775 797
776# 798#
@@ -787,9 +809,10 @@ CONFIG_JBD=y
787# CONFIG_REISERFS_FS is not set 809# CONFIG_REISERFS_FS is not set
788# CONFIG_JFS_FS is not set 810# CONFIG_JFS_FS is not set
789# CONFIG_FS_POSIX_ACL is not set 811# CONFIG_FS_POSIX_ACL is not set
790CONFIG_FILE_LOCKING=y
791# CONFIG_XFS_FS is not set 812# CONFIG_XFS_FS is not set
792# CONFIG_OCFS2_FS is not set 813# CONFIG_OCFS2_FS is not set
814CONFIG_FILE_LOCKING=y
815CONFIG_FSNOTIFY=y
793CONFIG_DNOTIFY=y 816CONFIG_DNOTIFY=y
794CONFIG_INOTIFY=y 817CONFIG_INOTIFY=y
795CONFIG_INOTIFY_USER=y 818CONFIG_INOTIFY_USER=y
@@ -935,6 +958,7 @@ CONFIG_HAS_IOPORT=y
935CONFIG_HAS_DMA=y 958CONFIG_HAS_DMA=y
936CONFIG_HAVE_LMB=y 959CONFIG_HAVE_LMB=y
937CONFIG_NLATTR=y 960CONFIG_NLATTR=y
961CONFIG_GENERIC_ATOMIC64=y
938 962
939# 963#
940# Kernel hacking 964# Kernel hacking
@@ -960,6 +984,9 @@ CONFIG_DEBUG_KERNEL=y
960# CONFIG_RT_MUTEX_TESTER is not set 984# CONFIG_RT_MUTEX_TESTER is not set
961# CONFIG_DEBUG_SPINLOCK is not set 985# CONFIG_DEBUG_SPINLOCK is not set
962# CONFIG_DEBUG_MUTEXES is not set 986# CONFIG_DEBUG_MUTEXES is not set
987# CONFIG_DEBUG_LOCK_ALLOC is not set
988# CONFIG_PROVE_LOCKING is not set
989# CONFIG_LOCK_STAT is not set
963# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 990# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
964# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 991# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
965# CONFIG_DEBUG_KOBJECT is not set 992# CONFIG_DEBUG_KOBJECT is not set
@@ -971,7 +998,6 @@ CONFIG_DEBUG_INFO=y
971# CONFIG_DEBUG_LIST is not set 998# CONFIG_DEBUG_LIST is not set
972# CONFIG_DEBUG_SG is not set 999# CONFIG_DEBUG_SG is not set
973# CONFIG_DEBUG_NOTIFIERS is not set 1000# CONFIG_DEBUG_NOTIFIERS is not set
974# CONFIG_BOOT_PRINTK_DELAY is not set
975# CONFIG_RCU_TORTURE_TEST is not set 1001# CONFIG_RCU_TORTURE_TEST is not set
976# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1002# CONFIG_RCU_CPU_STALL_DETECTOR is not set
977# CONFIG_BACKTRACE_SELF_TEST is not set 1003# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -985,22 +1011,23 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
985CONFIG_HAVE_DYNAMIC_FTRACE=y 1011CONFIG_HAVE_DYNAMIC_FTRACE=y
986CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1012CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
987CONFIG_TRACING_SUPPORT=y 1013CONFIG_TRACING_SUPPORT=y
988 1014CONFIG_FTRACE=y
989#
990# Tracers
991#
992# CONFIG_FUNCTION_TRACER is not set 1015# CONFIG_FUNCTION_TRACER is not set
1016# CONFIG_IRQSOFF_TRACER is not set
993# CONFIG_SCHED_TRACER is not set 1017# CONFIG_SCHED_TRACER is not set
994# CONFIG_CONTEXT_SWITCH_TRACER is not set 1018# CONFIG_ENABLE_DEFAULT_TRACERS is not set
995# CONFIG_EVENT_TRACER is not set
996# CONFIG_BOOT_TRACER is not set 1019# CONFIG_BOOT_TRACER is not set
997# CONFIG_TRACE_BRANCH_PROFILING is not set 1020CONFIG_BRANCH_PROFILE_NONE=y
1021# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1022# CONFIG_PROFILE_ALL_BRANCHES is not set
998# CONFIG_STACK_TRACER is not set 1023# CONFIG_STACK_TRACER is not set
999# CONFIG_KMEMTRACE is not set 1024# CONFIG_KMEMTRACE is not set
1000# CONFIG_WORKQUEUE_TRACER is not set 1025# CONFIG_WORKQUEUE_TRACER is not set
1001# CONFIG_BLK_DEV_IO_TRACE is not set 1026# CONFIG_BLK_DEV_IO_TRACE is not set
1002# CONFIG_SAMPLES is not set 1027# CONFIG_SAMPLES is not set
1003CONFIG_HAVE_ARCH_KGDB=y 1028CONFIG_HAVE_ARCH_KGDB=y
1029# CONFIG_PPC_DISABLE_WERROR is not set
1030CONFIG_PPC_WERROR=y
1004CONFIG_PRINT_STACK_DEPTH=64 1031CONFIG_PRINT_STACK_DEPTH=64
1005# CONFIG_DEBUG_STACKOVERFLOW is not set 1032# CONFIG_DEBUG_STACKOVERFLOW is not set
1006# CONFIG_DEBUG_STACK_USAGE is not set 1033# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/ep88xc_defconfig b/arch/powerpc/configs/ep88xc_defconfig
index c2a439595f4..2c292e25cc0 100644
--- a/arch/powerpc/configs/ep88xc_defconfig
+++ b/arch/powerpc/configs/ep88xc_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:21:53 2009 4# Wed Jul 29 23:31:49 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13CONFIG_PPC_8xx=y 13CONFIG_PPC_8xx=y
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -27,15 +27,16 @@ CONFIG_GENERIC_TIME=y
27CONFIG_GENERIC_TIME_VSYSCALL=y 27CONFIG_GENERIC_TIME_VSYSCALL=y
28CONFIG_GENERIC_CLOCKEVENTS=y 28CONFIG_GENERIC_CLOCKEVENTS=y
29CONFIG_GENERIC_HARDIRQS=y 29CONFIG_GENERIC_HARDIRQS=y
30CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
30# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 31# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
31CONFIG_IRQ_PER_CPU=y 32CONFIG_IRQ_PER_CPU=y
32CONFIG_STACKTRACE_SUPPORT=y 33CONFIG_STACKTRACE_SUPPORT=y
33CONFIG_HAVE_LATENCYTOP_SUPPORT=y 34CONFIG_HAVE_LATENCYTOP_SUPPORT=y
35CONFIG_TRACE_IRQFLAGS_SUPPORT=y
34CONFIG_LOCKDEP_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
38CONFIG_GENERIC_CALIBRATE_DELAY=y
39CONFIG_GENERIC_FIND_NEXT_BIT=y 40CONFIG_GENERIC_FIND_NEXT_BIT=y
40# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 41# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
41CONFIG_PPC=y 42CONFIG_PPC=y
@@ -49,11 +50,13 @@ CONFIG_OF=y
49# CONFIG_GENERIC_TBSYNC is not set 50# CONFIG_GENERIC_TBSYNC is not set
50CONFIG_AUDIT_ARCH=y 51CONFIG_AUDIT_ARCH=y
51CONFIG_GENERIC_BUG=y 52CONFIG_GENERIC_BUG=y
53CONFIG_DTC=y
52# CONFIG_DEFAULT_UIMAGE is not set 54# CONFIG_DEFAULT_UIMAGE is not set
53# CONFIG_PPC_DCR_NATIVE is not set 55# CONFIG_PPC_DCR_NATIVE is not set
54# CONFIG_PPC_DCR_MMIO is not set 56# CONFIG_PPC_DCR_MMIO is not set
55CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 57CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
56CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 58CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
59CONFIG_CONSTRUCTORS=y
57 60
58# 61#
59# General setup 62# General setup
@@ -100,7 +103,6 @@ CONFIG_EMBEDDED=y
100CONFIG_KALLSYMS=y 103CONFIG_KALLSYMS=y
101# CONFIG_KALLSYMS_ALL is not set 104# CONFIG_KALLSYMS_ALL is not set
102# CONFIG_KALLSYMS_EXTRA_PASS is not set 105# CONFIG_KALLSYMS_EXTRA_PASS is not set
103# CONFIG_STRIP_ASM_SYMS is not set
104CONFIG_HOTPLUG=y 106CONFIG_HOTPLUG=y
105CONFIG_PRINTK=y 107CONFIG_PRINTK=y
106CONFIG_BUG=y 108CONFIG_BUG=y
@@ -113,8 +115,15 @@ CONFIG_TIMERFD=y
113CONFIG_EVENTFD=y 115CONFIG_EVENTFD=y
114CONFIG_SHMEM=y 116CONFIG_SHMEM=y
115CONFIG_AIO=y 117CONFIG_AIO=y
118CONFIG_HAVE_PERF_COUNTERS=y
119
120#
121# Performance Counters
122#
123# CONFIG_PERF_COUNTERS is not set
116# CONFIG_VM_EVENT_COUNTERS is not set 124# CONFIG_VM_EVENT_COUNTERS is not set
117CONFIG_SLUB_DEBUG=y 125CONFIG_SLUB_DEBUG=y
126# CONFIG_STRIP_ASM_SYMS is not set
118CONFIG_COMPAT_BRK=y 127CONFIG_COMPAT_BRK=y
119# CONFIG_SLAB is not set 128# CONFIG_SLAB is not set
120CONFIG_SLUB=y 129CONFIG_SLUB=y
@@ -128,13 +137,17 @@ CONFIG_HAVE_KPROBES=y
128CONFIG_HAVE_KRETPROBES=y 137CONFIG_HAVE_KRETPROBES=y
129CONFIG_HAVE_ARCH_TRACEHOOK=y 138CONFIG_HAVE_ARCH_TRACEHOOK=y
130CONFIG_HAVE_CLK=y 139CONFIG_HAVE_CLK=y
140
141#
142# GCOV-based kernel profiling
143#
131# CONFIG_SLOW_WORK is not set 144# CONFIG_SLOW_WORK is not set
132# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 145# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
133CONFIG_SLABINFO=y 146CONFIG_SLABINFO=y
134CONFIG_BASE_SMALL=1 147CONFIG_BASE_SMALL=1
135# CONFIG_MODULES is not set 148# CONFIG_MODULES is not set
136CONFIG_BLOCK=y 149CONFIG_BLOCK=y
137# CONFIG_LBD is not set 150CONFIG_LBDAF=y
138# CONFIG_BLK_DEV_BSG is not set 151# CONFIG_BLK_DEV_BSG is not set
139# CONFIG_BLK_DEV_INTEGRITY is not set 152# CONFIG_BLK_DEV_INTEGRITY is not set
140 153
@@ -220,6 +233,7 @@ CONFIG_BINFMT_ELF=y
220# CONFIG_MATH_EMULATION is not set 233# CONFIG_MATH_EMULATION is not set
221CONFIG_8XX_MINIMAL_FPEMU=y 234CONFIG_8XX_MINIMAL_FPEMU=y
222# CONFIG_IOMMU_HELPER is not set 235# CONFIG_IOMMU_HELPER is not set
236# CONFIG_SWIOTLB is not set
223CONFIG_PPC_NEED_DMA_SYNC_OPS=y 237CONFIG_PPC_NEED_DMA_SYNC_OPS=y
224CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 238CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
225CONFIG_ARCH_HAS_WALK_MEMORY=y 239CONFIG_ARCH_HAS_WALK_MEMORY=y
@@ -239,9 +253,9 @@ CONFIG_MIGRATION=y
239CONFIG_ZONE_DMA_FLAG=1 253CONFIG_ZONE_DMA_FLAG=1
240CONFIG_BOUNCE=y 254CONFIG_BOUNCE=y
241CONFIG_VIRT_TO_BUS=y 255CONFIG_VIRT_TO_BUS=y
242CONFIG_UNEVICTABLE_LRU=y
243CONFIG_HAVE_MLOCK=y 256CONFIG_HAVE_MLOCK=y
244CONFIG_HAVE_MLOCKED_PAGE_BIT=y 257CONFIG_HAVE_MLOCKED_PAGE_BIT=y
258CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
245CONFIG_PPC_4K_PAGES=y 259CONFIG_PPC_4K_PAGES=y
246# CONFIG_PPC_16K_PAGES is not set 260# CONFIG_PPC_16K_PAGES is not set
247# CONFIG_PPC_64K_PAGES is not set 261# CONFIG_PPC_64K_PAGES is not set
@@ -280,6 +294,7 @@ CONFIG_PAGE_OFFSET=0xc0000000
280CONFIG_KERNEL_START=0xc0000000 294CONFIG_KERNEL_START=0xc0000000
281CONFIG_PHYSICAL_START=0x00000000 295CONFIG_PHYSICAL_START=0x00000000
282CONFIG_TASK_SIZE=0x80000000 296CONFIG_TASK_SIZE=0x80000000
297CONFIG_CONSISTENT_SIZE=0x00200000
283CONFIG_NET=y 298CONFIG_NET=y
284 299
285# 300#
@@ -336,6 +351,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
336# CONFIG_ECONET is not set 351# CONFIG_ECONET is not set
337# CONFIG_WAN_ROUTER is not set 352# CONFIG_WAN_ROUTER is not set
338# CONFIG_PHONET is not set 353# CONFIG_PHONET is not set
354# CONFIG_IEEE802154 is not set
339# CONFIG_NET_SCHED is not set 355# CONFIG_NET_SCHED is not set
340# CONFIG_DCB is not set 356# CONFIG_DCB is not set
341 357
@@ -353,7 +369,11 @@ CONFIG_WIRELESS=y
353CONFIG_WIRELESS_OLD_REGULATORY=y 369CONFIG_WIRELESS_OLD_REGULATORY=y
354# CONFIG_WIRELESS_EXT is not set 370# CONFIG_WIRELESS_EXT is not set
355# CONFIG_LIB80211 is not set 371# CONFIG_LIB80211 is not set
356# CONFIG_MAC80211 is not set 372
373#
374# CFG80211 needs to be enabled for MAC80211
375#
376CONFIG_MAC80211_DEFAULT_PS_VALUE=0
357# CONFIG_WIMAX is not set 377# CONFIG_WIMAX is not set
358# CONFIG_RFKILL is not set 378# CONFIG_RFKILL is not set
359# CONFIG_NET_9P is not set 379# CONFIG_NET_9P is not set
@@ -452,6 +472,7 @@ CONFIG_MTD_PHYSMAP_OF=y
452# 472#
453# CONFIG_MTD_UBI is not set 473# CONFIG_MTD_UBI is not set
454CONFIG_OF_DEVICE=y 474CONFIG_OF_DEVICE=y
475CONFIG_OF_MDIO=y
455# CONFIG_PARPORT is not set 476# CONFIG_PARPORT is not set
456# CONFIG_BLK_DEV is not set 477# CONFIG_BLK_DEV is not set
457# CONFIG_MISC_DEVICES is not set 478# CONFIG_MISC_DEVICES is not set
@@ -469,7 +490,6 @@ CONFIG_HAVE_IDE=y
469# CONFIG_MD is not set 490# CONFIG_MD is not set
470# CONFIG_MACINTOSH_DRIVERS is not set 491# CONFIG_MACINTOSH_DRIVERS is not set
471CONFIG_NETDEVICES=y 492CONFIG_NETDEVICES=y
472CONFIG_COMPAT_NET_DEV_OPS=y
473# CONFIG_DUMMY is not set 493# CONFIG_DUMMY is not set
474# CONFIG_BONDING is not set 494# CONFIG_BONDING is not set
475# CONFIG_MACVLAN is not set 495# CONFIG_MACVLAN is not set
@@ -508,6 +528,7 @@ CONFIG_MII=y
508# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 528# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
509# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 529# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
510# CONFIG_B44 is not set 530# CONFIG_B44 is not set
531# CONFIG_KS8842 is not set
511CONFIG_FS_ENET=y 532CONFIG_FS_ENET=y
512# CONFIG_FS_ENET_HAS_SCC is not set 533# CONFIG_FS_ENET_HAS_SCC is not set
513CONFIG_FS_ENET_HAS_FEC=y 534CONFIG_FS_ENET_HAS_FEC=y
@@ -579,6 +600,11 @@ CONFIG_GEN_RTC=y
579# CONFIG_TCG_TPM is not set 600# CONFIG_TCG_TPM is not set
580# CONFIG_I2C is not set 601# CONFIG_I2C is not set
581# CONFIG_SPI is not set 602# CONFIG_SPI is not set
603
604#
605# PPS support
606#
607# CONFIG_PPS is not set
582CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 608CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
583# CONFIG_GPIOLIB is not set 609# CONFIG_GPIOLIB is not set
584# CONFIG_W1 is not set 610# CONFIG_W1 is not set
@@ -602,22 +628,7 @@ CONFIG_SSB_POSSIBLE=y
602# CONFIG_HTC_PASIC3 is not set 628# CONFIG_HTC_PASIC3 is not set
603# CONFIG_MFD_TMIO is not set 629# CONFIG_MFD_TMIO is not set
604# CONFIG_REGULATOR is not set 630# CONFIG_REGULATOR is not set
605 631# CONFIG_MEDIA_SUPPORT is not set
606#
607# Multimedia devices
608#
609
610#
611# Multimedia core support
612#
613# CONFIG_VIDEO_DEV is not set
614# CONFIG_DVB_CORE is not set
615# CONFIG_VIDEO_MEDIA is not set
616
617#
618# Multimedia drivers
619#
620CONFIG_DAB=y
621 632
622# 633#
623# Graphics support 634# Graphics support
@@ -642,6 +653,10 @@ CONFIG_DAB=y
642# CONFIG_DMADEVICES is not set 653# CONFIG_DMADEVICES is not set
643# CONFIG_AUXDISPLAY is not set 654# CONFIG_AUXDISPLAY is not set
644# CONFIG_UIO is not set 655# CONFIG_UIO is not set
656
657#
658# TI VLYNQ
659#
645# CONFIG_STAGING is not set 660# CONFIG_STAGING is not set
646 661
647# 662#
@@ -653,12 +668,15 @@ CONFIG_DAB=y
653# CONFIG_REISERFS_FS is not set 668# CONFIG_REISERFS_FS is not set
654# CONFIG_JFS_FS is not set 669# CONFIG_JFS_FS is not set
655# CONFIG_FS_POSIX_ACL is not set 670# CONFIG_FS_POSIX_ACL is not set
656CONFIG_FILE_LOCKING=y
657# CONFIG_XFS_FS is not set 671# CONFIG_XFS_FS is not set
672# CONFIG_GFS2_FS is not set
658# CONFIG_OCFS2_FS is not set 673# CONFIG_OCFS2_FS is not set
659# CONFIG_BTRFS_FS is not set 674# CONFIG_BTRFS_FS is not set
675CONFIG_FILE_LOCKING=y
676CONFIG_FSNOTIFY=y
660# CONFIG_DNOTIFY is not set 677# CONFIG_DNOTIFY is not set
661# CONFIG_INOTIFY is not set 678# CONFIG_INOTIFY is not set
679CONFIG_INOTIFY_USER=y
662# CONFIG_QUOTA is not set 680# CONFIG_QUOTA is not set
663# CONFIG_AUTOFS_FS is not set 681# CONFIG_AUTOFS_FS is not set
664# CONFIG_AUTOFS4_FS is not set 682# CONFIG_AUTOFS4_FS is not set
@@ -775,6 +793,7 @@ CONFIG_HAS_IOPORT=y
775CONFIG_HAS_DMA=y 793CONFIG_HAS_DMA=y
776CONFIG_HAVE_LMB=y 794CONFIG_HAVE_LMB=y
777CONFIG_NLATTR=y 795CONFIG_NLATTR=y
796CONFIG_GENERIC_ATOMIC64=y
778 797
779# 798#
780# Kernel hacking 799# Kernel hacking
@@ -803,6 +822,9 @@ CONFIG_SCHED_DEBUG=y
803# CONFIG_SLUB_STATS is not set 822# CONFIG_SLUB_STATS is not set
804# CONFIG_DEBUG_SPINLOCK is not set 823# CONFIG_DEBUG_SPINLOCK is not set
805# CONFIG_DEBUG_MUTEXES is not set 824# CONFIG_DEBUG_MUTEXES is not set
825# CONFIG_DEBUG_LOCK_ALLOC is not set
826# CONFIG_PROVE_LOCKING is not set
827# CONFIG_LOCK_STAT is not set
806# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 828# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
807# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 829# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
808# CONFIG_DEBUG_KOBJECT is not set 830# CONFIG_DEBUG_KOBJECT is not set
@@ -814,7 +836,6 @@ CONFIG_DEBUG_INFO=y
814# CONFIG_DEBUG_LIST is not set 836# CONFIG_DEBUG_LIST is not set
815# CONFIG_DEBUG_SG is not set 837# CONFIG_DEBUG_SG is not set
816# CONFIG_DEBUG_NOTIFIERS is not set 838# CONFIG_DEBUG_NOTIFIERS is not set
817# CONFIG_BOOT_PRINTK_DELAY is not set
818# CONFIG_RCU_TORTURE_TEST is not set 839# CONFIG_RCU_TORTURE_TEST is not set
819# CONFIG_RCU_CPU_STALL_DETECTOR is not set 840# CONFIG_RCU_CPU_STALL_DETECTOR is not set
820# CONFIG_BACKTRACE_SELF_TEST is not set 841# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -827,16 +848,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
827CONFIG_HAVE_DYNAMIC_FTRACE=y 848CONFIG_HAVE_DYNAMIC_FTRACE=y
828CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 849CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
829CONFIG_TRACING_SUPPORT=y 850CONFIG_TRACING_SUPPORT=y
830 851CONFIG_FTRACE=y
831#
832# Tracers
833#
834# CONFIG_FUNCTION_TRACER is not set 852# CONFIG_FUNCTION_TRACER is not set
853# CONFIG_IRQSOFF_TRACER is not set
835# CONFIG_SCHED_TRACER is not set 854# CONFIG_SCHED_TRACER is not set
836# CONFIG_CONTEXT_SWITCH_TRACER is not set 855# CONFIG_ENABLE_DEFAULT_TRACERS is not set
837# CONFIG_EVENT_TRACER is not set
838# CONFIG_BOOT_TRACER is not set 856# CONFIG_BOOT_TRACER is not set
839# CONFIG_TRACE_BRANCH_PROFILING is not set 857CONFIG_BRANCH_PROFILE_NONE=y
858# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
859# CONFIG_PROFILE_ALL_BRANCHES is not set
840# CONFIG_STACK_TRACER is not set 860# CONFIG_STACK_TRACER is not set
841# CONFIG_KMEMTRACE is not set 861# CONFIG_KMEMTRACE is not set
842# CONFIG_WORKQUEUE_TRACER is not set 862# CONFIG_WORKQUEUE_TRACER is not set
@@ -844,6 +864,9 @@ CONFIG_TRACING_SUPPORT=y
844# CONFIG_SAMPLES is not set 864# CONFIG_SAMPLES is not set
845CONFIG_HAVE_ARCH_KGDB=y 865CONFIG_HAVE_ARCH_KGDB=y
846# CONFIG_KGDB is not set 866# CONFIG_KGDB is not set
867# CONFIG_KMEMCHECK is not set
868# CONFIG_PPC_DISABLE_WERROR is not set
869CONFIG_PPC_WERROR=y
847CONFIG_PRINT_STACK_DEPTH=64 870CONFIG_PRINT_STACK_DEPTH=64
848# CONFIG_DEBUG_STACKOVERFLOW is not set 871# CONFIG_DEBUG_STACKOVERFLOW is not set
849# CONFIG_DEBUG_STACK_USAGE is not set 872# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/linkstation_defconfig b/arch/powerpc/configs/linkstation_defconfig
index a4053ab9e24..45671e7dd2c 100644
--- a/arch/powerpc/configs/linkstation_defconfig
+++ b/arch/powerpc/configs/linkstation_defconfig
@@ -1,25 +1,27 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:21:54 2009 4# Wed Jul 29 23:31:50 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_ALTIVEC is not set 20# CONFIG_ALTIVEC is not set
20CONFIG_PPC_STD_MMU=y 21CONFIG_PPC_STD_MMU=y
21CONFIG_PPC_STD_MMU_32=y 22CONFIG_PPC_STD_MMU_32=y
22# CONFIG_PPC_MM_SLICES is not set 23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC_HAVE_PMU_SUPPORT=y
23# CONFIG_SMP is not set 25# CONFIG_SMP is not set
24CONFIG_PPC32=y 26CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32 27CONFIG_WORD_SIZE=32
@@ -30,15 +32,16 @@ CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y 32CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y 33CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 34CONFIG_GENERIC_HARDIRQS=y
35CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 36# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 37CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y 38CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_HAVE_LATENCYTOP_SUPPORT=y 39CONFIG_HAVE_LATENCYTOP_SUPPORT=y
40CONFIG_TRACE_IRQFLAGS_SUPPORT=y
37CONFIG_LOCKDEP_SUPPORT=y 41CONFIG_LOCKDEP_SUPPORT=y
38CONFIG_RWSEM_XCHGADD_ALGORITHM=y 42CONFIG_RWSEM_XCHGADD_ALGORITHM=y
39CONFIG_ARCH_HAS_ILOG2_U32=y 43CONFIG_ARCH_HAS_ILOG2_U32=y
40CONFIG_GENERIC_HWEIGHT=y 44CONFIG_GENERIC_HWEIGHT=y
41CONFIG_GENERIC_CALIBRATE_DELAY=y
42CONFIG_GENERIC_FIND_NEXT_BIT=y 45CONFIG_GENERIC_FIND_NEXT_BIT=y
43# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 46# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
44CONFIG_PPC=y 47CONFIG_PPC=y
@@ -52,11 +55,13 @@ CONFIG_PPC_UDBG_16550=y
52# CONFIG_GENERIC_TBSYNC is not set 55# CONFIG_GENERIC_TBSYNC is not set
53CONFIG_AUDIT_ARCH=y 56CONFIG_AUDIT_ARCH=y
54CONFIG_GENERIC_BUG=y 57CONFIG_GENERIC_BUG=y
58CONFIG_DTC=y
55CONFIG_DEFAULT_UIMAGE=y 59CONFIG_DEFAULT_UIMAGE=y
56# CONFIG_PPC_DCR_NATIVE is not set 60# CONFIG_PPC_DCR_NATIVE is not set
57# CONFIG_PPC_DCR_MMIO is not set 61# CONFIG_PPC_DCR_MMIO is not set
58CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 62CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
59CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 63CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
64CONFIG_CONSTRUCTORS=y
60 65
61# 66#
62# General setup 67# General setup
@@ -114,7 +119,6 @@ CONFIG_SYSCTL_SYSCALL=y
114CONFIG_KALLSYMS=y 119CONFIG_KALLSYMS=y
115# CONFIG_KALLSYMS_ALL is not set 120# CONFIG_KALLSYMS_ALL is not set
116# CONFIG_KALLSYMS_EXTRA_PASS is not set 121# CONFIG_KALLSYMS_EXTRA_PASS is not set
117# CONFIG_STRIP_ASM_SYMS is not set
118CONFIG_HOTPLUG=y 122CONFIG_HOTPLUG=y
119CONFIG_PRINTK=y 123CONFIG_PRINTK=y
120CONFIG_BUG=y 124CONFIG_BUG=y
@@ -127,9 +131,16 @@ CONFIG_TIMERFD=y
127CONFIG_EVENTFD=y 131CONFIG_EVENTFD=y
128CONFIG_SHMEM=y 132CONFIG_SHMEM=y
129CONFIG_AIO=y 133CONFIG_AIO=y
134CONFIG_HAVE_PERF_COUNTERS=y
135
136#
137# Performance Counters
138#
139# CONFIG_PERF_COUNTERS is not set
130CONFIG_VM_EVENT_COUNTERS=y 140CONFIG_VM_EVENT_COUNTERS=y
131CONFIG_PCI_QUIRKS=y 141CONFIG_PCI_QUIRKS=y
132CONFIG_SLUB_DEBUG=y 142CONFIG_SLUB_DEBUG=y
143# CONFIG_STRIP_ASM_SYMS is not set
133# CONFIG_COMPAT_BRK is not set 144# CONFIG_COMPAT_BRK is not set
134# CONFIG_SLAB is not set 145# CONFIG_SLAB is not set
135CONFIG_SLUB=y 146CONFIG_SLUB=y
@@ -143,6 +154,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
143CONFIG_HAVE_KPROBES=y 154CONFIG_HAVE_KPROBES=y
144CONFIG_HAVE_KRETPROBES=y 155CONFIG_HAVE_KRETPROBES=y
145CONFIG_HAVE_ARCH_TRACEHOOK=y 156CONFIG_HAVE_ARCH_TRACEHOOK=y
157
158#
159# GCOV-based kernel profiling
160#
146# CONFIG_SLOW_WORK is not set 161# CONFIG_SLOW_WORK is not set
147# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 162# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
148CONFIG_SLABINFO=y 163CONFIG_SLABINFO=y
@@ -155,7 +170,7 @@ CONFIG_MODULE_UNLOAD=y
155# CONFIG_MODVERSIONS is not set 170# CONFIG_MODVERSIONS is not set
156# CONFIG_MODULE_SRCVERSION_ALL is not set 171# CONFIG_MODULE_SRCVERSION_ALL is not set
157CONFIG_BLOCK=y 172CONFIG_BLOCK=y
158# CONFIG_LBD is not set 173CONFIG_LBDAF=y
159# CONFIG_BLK_DEV_BSG is not set 174# CONFIG_BLK_DEV_BSG is not set
160# CONFIG_BLK_DEV_INTEGRITY is not set 175# CONFIG_BLK_DEV_INTEGRITY is not set
161 176
@@ -237,6 +252,7 @@ CONFIG_BINFMT_ELF=y
237# CONFIG_HAVE_AOUT is not set 252# CONFIG_HAVE_AOUT is not set
238# CONFIG_BINFMT_MISC is not set 253# CONFIG_BINFMT_MISC is not set
239# CONFIG_IOMMU_HELPER is not set 254# CONFIG_IOMMU_HELPER is not set
255# CONFIG_SWIOTLB is not set
240CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 256CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
241CONFIG_ARCH_HAS_WALK_MEMORY=y 257CONFIG_ARCH_HAS_WALK_MEMORY=y
242CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 258CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -257,9 +273,9 @@ CONFIG_MIGRATION=y
257CONFIG_ZONE_DMA_FLAG=1 273CONFIG_ZONE_DMA_FLAG=1
258CONFIG_BOUNCE=y 274CONFIG_BOUNCE=y
259CONFIG_VIRT_TO_BUS=y 275CONFIG_VIRT_TO_BUS=y
260CONFIG_UNEVICTABLE_LRU=y
261CONFIG_HAVE_MLOCK=y 276CONFIG_HAVE_MLOCK=y
262CONFIG_HAVE_MLOCKED_PAGE_BIT=y 277CONFIG_HAVE_MLOCKED_PAGE_BIT=y
278CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
263CONFIG_PPC_4K_PAGES=y 279CONFIG_PPC_4K_PAGES=y
264# CONFIG_PPC_16K_PAGES is not set 280# CONFIG_PPC_16K_PAGES is not set
265# CONFIG_PPC_64K_PAGES is not set 281# CONFIG_PPC_64K_PAGES is not set
@@ -480,6 +496,7 @@ CONFIG_IP_NF_ARP_MANGLE=m
480# CONFIG_ECONET is not set 496# CONFIG_ECONET is not set
481# CONFIG_WAN_ROUTER is not set 497# CONFIG_WAN_ROUTER is not set
482# CONFIG_PHONET is not set 498# CONFIG_PHONET is not set
499# CONFIG_IEEE802154 is not set
483# CONFIG_NET_SCHED is not set 500# CONFIG_NET_SCHED is not set
484# CONFIG_DCB is not set 501# CONFIG_DCB is not set
485 502
@@ -498,7 +515,11 @@ CONFIG_WIRELESS_OLD_REGULATORY=y
498CONFIG_WIRELESS_EXT=y 515CONFIG_WIRELESS_EXT=y
499CONFIG_WIRELESS_EXT_SYSFS=y 516CONFIG_WIRELESS_EXT_SYSFS=y
500# CONFIG_LIB80211 is not set 517# CONFIG_LIB80211 is not set
501# CONFIG_MAC80211 is not set 518
519#
520# CFG80211 needs to be enabled for MAC80211
521#
522CONFIG_MAC80211_DEFAULT_PS_VALUE=0
502# CONFIG_WIMAX is not set 523# CONFIG_WIMAX is not set
503# CONFIG_RFKILL is not set 524# CONFIG_RFKILL is not set
504# CONFIG_NET_9P is not set 525# CONFIG_NET_9P is not set
@@ -647,7 +668,9 @@ CONFIG_MISC_DEVICES=y
647# 668#
648# CONFIG_EEPROM_AT24 is not set 669# CONFIG_EEPROM_AT24 is not set
649CONFIG_EEPROM_LEGACY=m 670CONFIG_EEPROM_LEGACY=m
671# CONFIG_EEPROM_MAX6875 is not set
650# CONFIG_EEPROM_93CX6 is not set 672# CONFIG_EEPROM_93CX6 is not set
673# CONFIG_CB710_CORE is not set
651CONFIG_HAVE_IDE=y 674CONFIG_HAVE_IDE=y
652# CONFIG_IDE is not set 675# CONFIG_IDE is not set
653 676
@@ -670,10 +693,6 @@ CONFIG_BLK_DEV_SD=y
670# CONFIG_BLK_DEV_SR is not set 693# CONFIG_BLK_DEV_SR is not set
671CONFIG_CHR_DEV_SG=y 694CONFIG_CHR_DEV_SG=y
672# CONFIG_CHR_DEV_SCH is not set 695# CONFIG_CHR_DEV_SCH is not set
673
674#
675# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
676#
677CONFIG_SCSI_MULTI_LUN=y 696CONFIG_SCSI_MULTI_LUN=y
678# CONFIG_SCSI_CONSTANTS is not set 697# CONFIG_SCSI_CONSTANTS is not set
679# CONFIG_SCSI_LOGGING is not set 698# CONFIG_SCSI_LOGGING is not set
@@ -691,6 +710,7 @@ CONFIG_SCSI_WAIT_SCAN=m
691CONFIG_SCSI_LOWLEVEL=y 710CONFIG_SCSI_LOWLEVEL=y
692# CONFIG_ISCSI_TCP is not set 711# CONFIG_ISCSI_TCP is not set
693# CONFIG_SCSI_CXGB3_ISCSI is not set 712# CONFIG_SCSI_CXGB3_ISCSI is not set
713# CONFIG_SCSI_BNX2_ISCSI is not set
694# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 714# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
695# CONFIG_SCSI_3W_9XXX is not set 715# CONFIG_SCSI_3W_9XXX is not set
696# CONFIG_SCSI_ACARD is not set 716# CONFIG_SCSI_ACARD is not set
@@ -699,6 +719,7 @@ CONFIG_SCSI_LOWLEVEL=y
699# CONFIG_SCSI_AIC7XXX_OLD is not set 719# CONFIG_SCSI_AIC7XXX_OLD is not set
700# CONFIG_SCSI_AIC79XX is not set 720# CONFIG_SCSI_AIC79XX is not set
701# CONFIG_SCSI_AIC94XX is not set 721# CONFIG_SCSI_AIC94XX is not set
722# CONFIG_SCSI_MVSAS is not set
702# CONFIG_SCSI_DPT_I2O is not set 723# CONFIG_SCSI_DPT_I2O is not set
703# CONFIG_SCSI_ADVANSYS is not set 724# CONFIG_SCSI_ADVANSYS is not set
704# CONFIG_SCSI_ARCMSR is not set 725# CONFIG_SCSI_ARCMSR is not set
@@ -718,7 +739,6 @@ CONFIG_SCSI_LOWLEVEL=y
718# CONFIG_SCSI_IPS is not set 739# CONFIG_SCSI_IPS is not set
719# CONFIG_SCSI_INITIO is not set 740# CONFIG_SCSI_INITIO is not set
720# CONFIG_SCSI_INIA100 is not set 741# CONFIG_SCSI_INIA100 is not set
721# CONFIG_SCSI_MVSAS is not set
722# CONFIG_SCSI_STEX is not set 742# CONFIG_SCSI_STEX is not set
723# CONFIG_SCSI_SYM53C8XX_2 is not set 743# CONFIG_SCSI_SYM53C8XX_2 is not set
724# CONFIG_SCSI_IPR is not set 744# CONFIG_SCSI_IPR is not set
@@ -802,14 +822,17 @@ CONFIG_PATA_SIL680=y
802# 822#
803 823
804# 824#
805# Enable only one of the two stacks, unless you know what you are doing 825# You can enable one or both FireWire driver stacks.
826#
827
828#
829# See the help texts for more information.
806# 830#
807# CONFIG_FIREWIRE is not set 831# CONFIG_FIREWIRE is not set
808# CONFIG_IEEE1394 is not set 832# CONFIG_IEEE1394 is not set
809# CONFIG_I2O is not set 833# CONFIG_I2O is not set
810# CONFIG_MACINTOSH_DRIVERS is not set 834# CONFIG_MACINTOSH_DRIVERS is not set
811CONFIG_NETDEVICES=y 835CONFIG_NETDEVICES=y
812CONFIG_COMPAT_NET_DEV_OPS=y
813# CONFIG_DUMMY is not set 836# CONFIG_DUMMY is not set
814# CONFIG_BONDING is not set 837# CONFIG_BONDING is not set
815# CONFIG_MACVLAN is not set 838# CONFIG_MACVLAN is not set
@@ -846,6 +869,7 @@ CONFIG_TULIP_MMIO=y
846# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 869# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
847# CONFIG_NET_PCI is not set 870# CONFIG_NET_PCI is not set
848# CONFIG_B44 is not set 871# CONFIG_B44 is not set
872# CONFIG_KS8842 is not set
849# CONFIG_ATL2 is not set 873# CONFIG_ATL2 is not set
850CONFIG_NETDEV_1000=y 874CONFIG_NETDEV_1000=y
851# CONFIG_ACENIC is not set 875# CONFIG_ACENIC is not set
@@ -865,8 +889,10 @@ CONFIG_R8169=y
865# CONFIG_VIA_VELOCITY is not set 889# CONFIG_VIA_VELOCITY is not set
866# CONFIG_TIGON3 is not set 890# CONFIG_TIGON3 is not set
867# CONFIG_BNX2 is not set 891# CONFIG_BNX2 is not set
892# CONFIG_CNIC is not set
868# CONFIG_FSL_PQ_MDIO is not set 893# CONFIG_FSL_PQ_MDIO is not set
869# CONFIG_GIANFAR is not set 894# CONFIG_GIANFAR is not set
895# CONFIG_MV643XX_ETH is not set
870# CONFIG_QLA3XXX is not set 896# CONFIG_QLA3XXX is not set
871# CONFIG_ATL1 is not set 897# CONFIG_ATL1 is not set
872# CONFIG_ATL1E is not set 898# CONFIG_ATL1E is not set
@@ -1074,13 +1100,17 @@ CONFIG_I2C_MPC=y
1074# CONFIG_SENSORS_PCF8574 is not set 1100# CONFIG_SENSORS_PCF8574 is not set
1075# CONFIG_PCF8575 is not set 1101# CONFIG_PCF8575 is not set
1076# CONFIG_SENSORS_PCA9539 is not set 1102# CONFIG_SENSORS_PCA9539 is not set
1077# CONFIG_SENSORS_MAX6875 is not set
1078# CONFIG_SENSORS_TSL2550 is not set 1103# CONFIG_SENSORS_TSL2550 is not set
1079# CONFIG_I2C_DEBUG_CORE is not set 1104# CONFIG_I2C_DEBUG_CORE is not set
1080# CONFIG_I2C_DEBUG_ALGO is not set 1105# CONFIG_I2C_DEBUG_ALGO is not set
1081# CONFIG_I2C_DEBUG_BUS is not set 1106# CONFIG_I2C_DEBUG_BUS is not set
1082# CONFIG_I2C_DEBUG_CHIP is not set 1107# CONFIG_I2C_DEBUG_CHIP is not set
1083# CONFIG_SPI is not set 1108# CONFIG_SPI is not set
1109
1110#
1111# PPS support
1112#
1113# CONFIG_PPS is not set
1084CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 1114CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
1085# CONFIG_GPIOLIB is not set 1115# CONFIG_GPIOLIB is not set
1086# CONFIG_W1 is not set 1116# CONFIG_W1 is not set
@@ -1135,6 +1165,7 @@ CONFIG_HWMON=y
1135# CONFIG_SENSORS_SMSC47B397 is not set 1165# CONFIG_SENSORS_SMSC47B397 is not set
1136# CONFIG_SENSORS_ADS7828 is not set 1166# CONFIG_SENSORS_ADS7828 is not set
1137# CONFIG_SENSORS_THMC50 is not set 1167# CONFIG_SENSORS_THMC50 is not set
1168# CONFIG_SENSORS_TMP401 is not set
1138# CONFIG_SENSORS_VIA686A is not set 1169# CONFIG_SENSORS_VIA686A is not set
1139# CONFIG_SENSORS_VT1211 is not set 1170# CONFIG_SENSORS_VT1211 is not set
1140# CONFIG_SENSORS_VT8231 is not set 1171# CONFIG_SENSORS_VT8231 is not set
@@ -1169,23 +1200,9 @@ CONFIG_SSB_POSSIBLE=y
1169# CONFIG_MFD_WM8400 is not set 1200# CONFIG_MFD_WM8400 is not set
1170# CONFIG_MFD_WM8350_I2C is not set 1201# CONFIG_MFD_WM8350_I2C is not set
1171# CONFIG_MFD_PCF50633 is not set 1202# CONFIG_MFD_PCF50633 is not set
1203# CONFIG_AB3100_CORE is not set
1172# CONFIG_REGULATOR is not set 1204# CONFIG_REGULATOR is not set
1173 1205# CONFIG_MEDIA_SUPPORT is not set
1174#
1175# Multimedia devices
1176#
1177
1178#
1179# Multimedia core support
1180#
1181# CONFIG_VIDEO_DEV is not set
1182# CONFIG_DVB_CORE is not set
1183# CONFIG_VIDEO_MEDIA is not set
1184
1185#
1186# Multimedia drivers
1187#
1188# CONFIG_DAB is not set
1189 1206
1190# 1207#
1191# Graphics support 1208# Graphics support
@@ -1245,6 +1262,7 @@ CONFIG_USB_MON=y
1245# USB Host Controller Drivers 1262# USB Host Controller Drivers
1246# 1263#
1247# CONFIG_USB_C67X00_HCD is not set 1264# CONFIG_USB_C67X00_HCD is not set
1265# CONFIG_USB_XHCI_HCD is not set
1248CONFIG_USB_EHCI_HCD=y 1266CONFIG_USB_EHCI_HCD=y
1249# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1267# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1250# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1268# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1254,9 +1272,9 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y
1254# CONFIG_USB_ISP116X_HCD is not set 1272# CONFIG_USB_ISP116X_HCD is not set
1255# CONFIG_USB_ISP1760_HCD is not set 1273# CONFIG_USB_ISP1760_HCD is not set
1256CONFIG_USB_OHCI_HCD=y 1274CONFIG_USB_OHCI_HCD=y
1257CONFIG_USB_OHCI_HCD_PPC_OF=y
1258CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1275CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1259# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set 1276# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
1277CONFIG_USB_OHCI_HCD_PPC_OF=y
1260CONFIG_USB_OHCI_HCD_PCI=y 1278CONFIG_USB_OHCI_HCD_PCI=y
1261CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y 1279CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1262CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y 1280CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
@@ -1423,6 +1441,7 @@ CONFIG_RTC_DRV_RS5C372=y
1423# CONFIG_RTC_DRV_S35390A is not set 1441# CONFIG_RTC_DRV_S35390A is not set
1424# CONFIG_RTC_DRV_FM3130 is not set 1442# CONFIG_RTC_DRV_FM3130 is not set
1425# CONFIG_RTC_DRV_RX8581 is not set 1443# CONFIG_RTC_DRV_RX8581 is not set
1444# CONFIG_RTC_DRV_RX8025 is not set
1426 1445
1427# 1446#
1428# SPI RTC drivers 1447# SPI RTC drivers
@@ -1450,6 +1469,10 @@ CONFIG_RTC_DRV_RS5C372=y
1450# CONFIG_DMADEVICES is not set 1469# CONFIG_DMADEVICES is not set
1451# CONFIG_AUXDISPLAY is not set 1470# CONFIG_AUXDISPLAY is not set
1452# CONFIG_UIO is not set 1471# CONFIG_UIO is not set
1472
1473#
1474# TI VLYNQ
1475#
1453# CONFIG_STAGING is not set 1476# CONFIG_STAGING is not set
1454 1477
1455# 1478#
@@ -1469,14 +1492,16 @@ CONFIG_FS_MBCACHE=y
1469# CONFIG_REISERFS_FS is not set 1492# CONFIG_REISERFS_FS is not set
1470# CONFIG_JFS_FS is not set 1493# CONFIG_JFS_FS is not set
1471CONFIG_FS_POSIX_ACL=y 1494CONFIG_FS_POSIX_ACL=y
1472CONFIG_FILE_LOCKING=y
1473CONFIG_XFS_FS=m 1495CONFIG_XFS_FS=m
1474# CONFIG_XFS_QUOTA is not set 1496# CONFIG_XFS_QUOTA is not set
1475# CONFIG_XFS_POSIX_ACL is not set 1497# CONFIG_XFS_POSIX_ACL is not set
1476# CONFIG_XFS_RT is not set 1498# CONFIG_XFS_RT is not set
1477# CONFIG_XFS_DEBUG is not set 1499# CONFIG_XFS_DEBUG is not set
1500# CONFIG_GFS2_FS is not set
1478# CONFIG_OCFS2_FS is not set 1501# CONFIG_OCFS2_FS is not set
1479# CONFIG_BTRFS_FS is not set 1502# CONFIG_BTRFS_FS is not set
1503CONFIG_FILE_LOCKING=y
1504CONFIG_FSNOTIFY=y
1480CONFIG_DNOTIFY=y 1505CONFIG_DNOTIFY=y
1481CONFIG_INOTIFY=y 1506CONFIG_INOTIFY=y
1482CONFIG_INOTIFY_USER=y 1507CONFIG_INOTIFY_USER=y
@@ -1548,6 +1573,7 @@ CONFIG_NFS_FS=y
1548CONFIG_NFS_V3=y 1573CONFIG_NFS_V3=y
1549CONFIG_NFS_V3_ACL=y 1574CONFIG_NFS_V3_ACL=y
1550CONFIG_NFS_V4=y 1575CONFIG_NFS_V4=y
1576# CONFIG_NFS_V4_1 is not set
1551CONFIG_ROOT_NFS=y 1577CONFIG_ROOT_NFS=y
1552CONFIG_NFSD=m 1578CONFIG_NFSD=m
1553CONFIG_NFSD_V3=y 1579CONFIG_NFSD_V3=y
@@ -1578,7 +1604,7 @@ CONFIG_CIFS=m
1578# 1604#
1579# CONFIG_PARTITION_ADVANCED is not set 1605# CONFIG_PARTITION_ADVANCED is not set
1580CONFIG_MSDOS_PARTITION=y 1606CONFIG_MSDOS_PARTITION=y
1581CONFIG_NLS=m 1607CONFIG_NLS=y
1582CONFIG_NLS_DEFAULT="iso8859-1" 1608CONFIG_NLS_DEFAULT="iso8859-1"
1583CONFIG_NLS_CODEPAGE_437=m 1609CONFIG_NLS_CODEPAGE_437=m
1584# CONFIG_NLS_CODEPAGE_737 is not set 1610# CONFIG_NLS_CODEPAGE_737 is not set
@@ -1645,6 +1671,7 @@ CONFIG_HAS_IOPORT=y
1645CONFIG_HAS_DMA=y 1671CONFIG_HAS_DMA=y
1646CONFIG_HAVE_LMB=y 1672CONFIG_HAVE_LMB=y
1647CONFIG_NLATTR=y 1673CONFIG_NLATTR=y
1674CONFIG_GENERIC_ATOMIC64=y
1648 1675
1649# 1676#
1650# Kernel hacking 1677# Kernel hacking
@@ -1675,6 +1702,9 @@ CONFIG_SCHED_DEBUG=y
1675# CONFIG_RT_MUTEX_TESTER is not set 1702# CONFIG_RT_MUTEX_TESTER is not set
1676# CONFIG_DEBUG_SPINLOCK is not set 1703# CONFIG_DEBUG_SPINLOCK is not set
1677# CONFIG_DEBUG_MUTEXES is not set 1704# CONFIG_DEBUG_MUTEXES is not set
1705# CONFIG_DEBUG_LOCK_ALLOC is not set
1706# CONFIG_PROVE_LOCKING is not set
1707# CONFIG_LOCK_STAT is not set
1678# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1708# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1679# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1709# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1680# CONFIG_DEBUG_KOBJECT is not set 1710# CONFIG_DEBUG_KOBJECT is not set
@@ -1686,7 +1716,6 @@ CONFIG_DEBUG_MEMORY_INIT=y
1686# CONFIG_DEBUG_LIST is not set 1716# CONFIG_DEBUG_LIST is not set
1687# CONFIG_DEBUG_SG is not set 1717# CONFIG_DEBUG_SG is not set
1688# CONFIG_DEBUG_NOTIFIERS is not set 1718# CONFIG_DEBUG_NOTIFIERS is not set
1689# CONFIG_BOOT_PRINTK_DELAY is not set
1690# CONFIG_RCU_TORTURE_TEST is not set 1719# CONFIG_RCU_TORTURE_TEST is not set
1691# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1720# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1692# CONFIG_BACKTRACE_SELF_TEST is not set 1721# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1700,16 +1729,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1700CONFIG_HAVE_DYNAMIC_FTRACE=y 1729CONFIG_HAVE_DYNAMIC_FTRACE=y
1701CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1730CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1702CONFIG_TRACING_SUPPORT=y 1731CONFIG_TRACING_SUPPORT=y
1703 1732CONFIG_FTRACE=y
1704#
1705# Tracers
1706#
1707# CONFIG_FUNCTION_TRACER is not set 1733# CONFIG_FUNCTION_TRACER is not set
1734# CONFIG_IRQSOFF_TRACER is not set
1708# CONFIG_SCHED_TRACER is not set 1735# CONFIG_SCHED_TRACER is not set
1709# CONFIG_CONTEXT_SWITCH_TRACER is not set 1736# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1710# CONFIG_EVENT_TRACER is not set
1711# CONFIG_BOOT_TRACER is not set 1737# CONFIG_BOOT_TRACER is not set
1712# CONFIG_TRACE_BRANCH_PROFILING is not set 1738CONFIG_BRANCH_PROFILE_NONE=y
1739# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1740# CONFIG_PROFILE_ALL_BRANCHES is not set
1713# CONFIG_STACK_TRACER is not set 1741# CONFIG_STACK_TRACER is not set
1714# CONFIG_KMEMTRACE is not set 1742# CONFIG_KMEMTRACE is not set
1715# CONFIG_WORKQUEUE_TRACER is not set 1743# CONFIG_WORKQUEUE_TRACER is not set
@@ -1717,6 +1745,8 @@ CONFIG_TRACING_SUPPORT=y
1717# CONFIG_SAMPLES is not set 1745# CONFIG_SAMPLES is not set
1718CONFIG_HAVE_ARCH_KGDB=y 1746CONFIG_HAVE_ARCH_KGDB=y
1719# CONFIG_KGDB is not set 1747# CONFIG_KGDB is not set
1748# CONFIG_PPC_DISABLE_WERROR is not set
1749CONFIG_PPC_WERROR=y
1720CONFIG_PRINT_STACK_DEPTH=64 1750CONFIG_PRINT_STACK_DEPTH=64
1721# CONFIG_DEBUG_STACKOVERFLOW is not set 1751# CONFIG_DEBUG_STACKOVERFLOW is not set
1722# CONFIG_DEBUG_STACK_USAGE is not set 1752# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/mgcoge_defconfig b/arch/powerpc/configs/mgcoge_defconfig
index 31e1df66515..e9491c1c3f3 100644
--- a/arch/powerpc/configs/mgcoge_defconfig
+++ b/arch/powerpc/configs/mgcoge_defconfig
@@ -1,25 +1,27 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:21:55 2009 4# Wed Jul 29 23:31:51 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_ALTIVEC is not set 20# CONFIG_ALTIVEC is not set
20CONFIG_PPC_STD_MMU=y 21CONFIG_PPC_STD_MMU=y
21CONFIG_PPC_STD_MMU_32=y 22CONFIG_PPC_STD_MMU_32=y
22# CONFIG_PPC_MM_SLICES is not set 23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC_HAVE_PMU_SUPPORT=y
23# CONFIG_SMP is not set 25# CONFIG_SMP is not set
24CONFIG_PPC32=y 26CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32 27CONFIG_WORD_SIZE=32
@@ -30,15 +32,16 @@ CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y 32CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y 33CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 34CONFIG_GENERIC_HARDIRQS=y
35CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 36# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 37CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y 38CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_HAVE_LATENCYTOP_SUPPORT=y 39CONFIG_HAVE_LATENCYTOP_SUPPORT=y
40CONFIG_TRACE_IRQFLAGS_SUPPORT=y
37CONFIG_LOCKDEP_SUPPORT=y 41CONFIG_LOCKDEP_SUPPORT=y
38CONFIG_RWSEM_XCHGADD_ALGORITHM=y 42CONFIG_RWSEM_XCHGADD_ALGORITHM=y
39CONFIG_ARCH_HAS_ILOG2_U32=y 43CONFIG_ARCH_HAS_ILOG2_U32=y
40CONFIG_GENERIC_HWEIGHT=y 44CONFIG_GENERIC_HWEIGHT=y
41CONFIG_GENERIC_CALIBRATE_DELAY=y
42CONFIG_GENERIC_FIND_NEXT_BIT=y 45CONFIG_GENERIC_FIND_NEXT_BIT=y
43CONFIG_GENERIC_GPIO=y 46CONFIG_GENERIC_GPIO=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -53,6 +56,7 @@ CONFIG_PPC_UDBG_16550=y
53# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
56# CONFIG_DEFAULT_UIMAGE is not set 60# CONFIG_DEFAULT_UIMAGE is not set
57CONFIG_HIBERNATE_32=y 61CONFIG_HIBERNATE_32=y
58CONFIG_ARCH_HIBERNATION_POSSIBLE=y 62CONFIG_ARCH_HIBERNATION_POSSIBLE=y
@@ -60,6 +64,7 @@ CONFIG_ARCH_HIBERNATION_POSSIBLE=y
60# CONFIG_PPC_DCR_MMIO is not set 64# CONFIG_PPC_DCR_MMIO is not set
61CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 65CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
62CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 66CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
67CONFIG_CONSTRUCTORS=y
63 68
64# 69#
65# General setup 70# General setup
@@ -105,7 +110,6 @@ CONFIG_SYSCTL_SYSCALL=y
105CONFIG_KALLSYMS=y 110CONFIG_KALLSYMS=y
106CONFIG_KALLSYMS_ALL=y 111CONFIG_KALLSYMS_ALL=y
107# CONFIG_KALLSYMS_EXTRA_PASS is not set 112# CONFIG_KALLSYMS_EXTRA_PASS is not set
108# CONFIG_STRIP_ASM_SYMS is not set
109CONFIG_HOTPLUG=y 113CONFIG_HOTPLUG=y
110CONFIG_PRINTK=y 114CONFIG_PRINTK=y
111CONFIG_BUG=y 115CONFIG_BUG=y
@@ -119,8 +123,15 @@ CONFIG_TIMERFD=y
119CONFIG_EVENTFD=y 123CONFIG_EVENTFD=y
120CONFIG_SHMEM=y 124CONFIG_SHMEM=y
121CONFIG_AIO=y 125CONFIG_AIO=y
126CONFIG_HAVE_PERF_COUNTERS=y
127
128#
129# Performance Counters
130#
131# CONFIG_PERF_COUNTERS is not set
122CONFIG_VM_EVENT_COUNTERS=y 132CONFIG_VM_EVENT_COUNTERS=y
123CONFIG_PCI_QUIRKS=y 133CONFIG_PCI_QUIRKS=y
134# CONFIG_STRIP_ASM_SYMS is not set
124CONFIG_COMPAT_BRK=y 135CONFIG_COMPAT_BRK=y
125CONFIG_SLAB=y 136CONFIG_SLAB=y
126# CONFIG_SLUB is not set 137# CONFIG_SLUB is not set
@@ -134,6 +145,11 @@ CONFIG_HAVE_KPROBES=y
134CONFIG_HAVE_KRETPROBES=y 145CONFIG_HAVE_KRETPROBES=y
135CONFIG_HAVE_ARCH_TRACEHOOK=y 146CONFIG_HAVE_ARCH_TRACEHOOK=y
136CONFIG_HAVE_CLK=y 147CONFIG_HAVE_CLK=y
148
149#
150# GCOV-based kernel profiling
151#
152# CONFIG_GCOV_KERNEL is not set
137# CONFIG_SLOW_WORK is not set 153# CONFIG_SLOW_WORK is not set
138# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 154# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
139CONFIG_SLABINFO=y 155CONFIG_SLABINFO=y
@@ -141,7 +157,7 @@ CONFIG_RT_MUTEXES=y
141CONFIG_BASE_SMALL=0 157CONFIG_BASE_SMALL=0
142# CONFIG_MODULES is not set 158# CONFIG_MODULES is not set
143CONFIG_BLOCK=y 159CONFIG_BLOCK=y
144# CONFIG_LBD is not set 160CONFIG_LBDAF=y
145# CONFIG_BLK_DEV_INTEGRITY is not set 161# CONFIG_BLK_DEV_INTEGRITY is not set
146 162
147# 163#
@@ -225,6 +241,7 @@ CONFIG_BINFMT_ELF=y
225# CONFIG_HAVE_AOUT is not set 241# CONFIG_HAVE_AOUT is not set
226CONFIG_BINFMT_MISC=y 242CONFIG_BINFMT_MISC=y
227# CONFIG_IOMMU_HELPER is not set 243# CONFIG_IOMMU_HELPER is not set
244# CONFIG_SWIOTLB is not set
228CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 245CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
229CONFIG_ARCH_HAS_WALK_MEMORY=y 246CONFIG_ARCH_HAS_WALK_MEMORY=y
230CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 247CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -240,9 +257,9 @@ CONFIG_MIGRATION=y
240CONFIG_ZONE_DMA_FLAG=1 257CONFIG_ZONE_DMA_FLAG=1
241CONFIG_BOUNCE=y 258CONFIG_BOUNCE=y
242CONFIG_VIRT_TO_BUS=y 259CONFIG_VIRT_TO_BUS=y
243CONFIG_UNEVICTABLE_LRU=y
244CONFIG_HAVE_MLOCK=y 260CONFIG_HAVE_MLOCK=y
245CONFIG_HAVE_MLOCKED_PAGE_BIT=y 261CONFIG_HAVE_MLOCKED_PAGE_BIT=y
262CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
246CONFIG_PPC_4K_PAGES=y 263CONFIG_PPC_4K_PAGES=y
247# CONFIG_PPC_16K_PAGES is not set 264# CONFIG_PPC_16K_PAGES is not set
248# CONFIG_PPC_64K_PAGES is not set 265# CONFIG_PPC_64K_PAGES is not set
@@ -313,6 +330,7 @@ CONFIG_IP_PNP_BOOTP=y
313# CONFIG_NET_IPIP is not set 330# CONFIG_NET_IPIP is not set
314# CONFIG_NET_IPGRE is not set 331# CONFIG_NET_IPGRE is not set
315# CONFIG_IP_MROUTE is not set 332# CONFIG_IP_MROUTE is not set
333# CONFIG_ARPD is not set
316CONFIG_SYN_COOKIES=y 334CONFIG_SYN_COOKIES=y
317# CONFIG_INET_AH is not set 335# CONFIG_INET_AH is not set
318# CONFIG_INET_ESP is not set 336# CONFIG_INET_ESP is not set
@@ -374,7 +392,11 @@ CONFIG_WIRELESS=y
374CONFIG_WIRELESS_OLD_REGULATORY=y 392CONFIG_WIRELESS_OLD_REGULATORY=y
375# CONFIG_WIRELESS_EXT is not set 393# CONFIG_WIRELESS_EXT is not set
376# CONFIG_LIB80211 is not set 394# CONFIG_LIB80211 is not set
377# CONFIG_MAC80211 is not set 395
396#
397# CFG80211 needs to be enabled for MAC80211
398#
399CONFIG_MAC80211_DEFAULT_PS_VALUE=0
378# CONFIG_WIMAX is not set 400# CONFIG_WIMAX is not set
379# CONFIG_RFKILL is not set 401# CONFIG_RFKILL is not set
380 402
@@ -484,6 +506,7 @@ CONFIG_MTD_PHYSMAP_OF=y
484# CONFIG_MTD_UBI is not set 506# CONFIG_MTD_UBI is not set
485CONFIG_OF_DEVICE=y 507CONFIG_OF_DEVICE=y
486CONFIG_OF_GPIO=y 508CONFIG_OF_GPIO=y
509CONFIG_OF_MDIO=y
487# CONFIG_PARPORT is not set 510# CONFIG_PARPORT is not set
488CONFIG_BLK_DEV=y 511CONFIG_BLK_DEV=y
489# CONFIG_BLK_DEV_FD is not set 512# CONFIG_BLK_DEV_FD is not set
@@ -523,13 +546,17 @@ CONFIG_HAVE_IDE=y
523# 546#
524 547
525# 548#
526# A new alternative FireWire stack is available with EXPERIMENTAL=y 549# You can enable one or both FireWire driver stacks.
527# 550#
551
552#
553# See the help texts for more information.
554#
555# CONFIG_FIREWIRE is not set
528# CONFIG_IEEE1394 is not set 556# CONFIG_IEEE1394 is not set
529# CONFIG_I2O is not set 557# CONFIG_I2O is not set
530# CONFIG_MACINTOSH_DRIVERS is not set 558# CONFIG_MACINTOSH_DRIVERS is not set
531CONFIG_NETDEVICES=y 559CONFIG_NETDEVICES=y
532CONFIG_COMPAT_NET_DEV_OPS=y
533# CONFIG_DUMMY is not set 560# CONFIG_DUMMY is not set
534# CONFIG_BONDING is not set 561# CONFIG_BONDING is not set
535# CONFIG_EQUALIZER is not set 562# CONFIG_EQUALIZER is not set
@@ -577,6 +604,7 @@ CONFIG_MII=y
577# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 604# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
578# CONFIG_NET_PCI is not set 605# CONFIG_NET_PCI is not set
579# CONFIG_B44 is not set 606# CONFIG_B44 is not set
607# CONFIG_KS8842 is not set
580# CONFIG_ATL2 is not set 608# CONFIG_ATL2 is not set
581CONFIG_FS_ENET=y 609CONFIG_FS_ENET=y
582CONFIG_FS_ENET_HAS_SCC=y 610CONFIG_FS_ENET_HAS_SCC=y
@@ -654,6 +682,10 @@ CONFIG_HW_RANDOM=y
654CONFIG_DEVPORT=y 682CONFIG_DEVPORT=y
655# CONFIG_I2C is not set 683# CONFIG_I2C is not set
656# CONFIG_SPI is not set 684# CONFIG_SPI is not set
685
686#
687# PPS support
688#
657CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 689CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
658CONFIG_ARCH_REQUIRE_GPIOLIB=y 690CONFIG_ARCH_REQUIRE_GPIOLIB=y
659CONFIG_GPIOLIB=y 691CONFIG_GPIOLIB=y
@@ -697,22 +729,7 @@ CONFIG_SSB_POSSIBLE=y
697# CONFIG_HTC_PASIC3 is not set 729# CONFIG_HTC_PASIC3 is not set
698# CONFIG_MFD_TMIO is not set 730# CONFIG_MFD_TMIO is not set
699# CONFIG_REGULATOR is not set 731# CONFIG_REGULATOR is not set
700 732# CONFIG_MEDIA_SUPPORT is not set
701#
702# Multimedia devices
703#
704
705#
706# Multimedia core support
707#
708# CONFIG_VIDEO_DEV is not set
709# CONFIG_DVB_CORE is not set
710# CONFIG_VIDEO_MEDIA is not set
711
712#
713# Multimedia drivers
714#
715# CONFIG_DAB is not set
716 733
717# 734#
718# Graphics support 735# Graphics support
@@ -740,6 +757,10 @@ CONFIG_SSB_POSSIBLE=y
740# CONFIG_DMADEVICES is not set 757# CONFIG_DMADEVICES is not set
741# CONFIG_AUXDISPLAY is not set 758# CONFIG_AUXDISPLAY is not set
742# CONFIG_UIO is not set 759# CONFIG_UIO is not set
760
761#
762# TI VLYNQ
763#
743# CONFIG_STAGING is not set 764# CONFIG_STAGING is not set
744 765
745# 766#
@@ -757,9 +778,10 @@ CONFIG_JBD=y
757# CONFIG_REISERFS_FS is not set 778# CONFIG_REISERFS_FS is not set
758# CONFIG_JFS_FS is not set 779# CONFIG_JFS_FS is not set
759# CONFIG_FS_POSIX_ACL is not set 780# CONFIG_FS_POSIX_ACL is not set
760CONFIG_FILE_LOCKING=y
761# CONFIG_XFS_FS is not set 781# CONFIG_XFS_FS is not set
762# CONFIG_OCFS2_FS is not set 782# CONFIG_OCFS2_FS is not set
783CONFIG_FILE_LOCKING=y
784CONFIG_FSNOTIFY=y
763CONFIG_DNOTIFY=y 785CONFIG_DNOTIFY=y
764CONFIG_INOTIFY=y 786CONFIG_INOTIFY=y
765CONFIG_INOTIFY_USER=y 787CONFIG_INOTIFY_USER=y
@@ -916,6 +938,7 @@ CONFIG_HAS_IOPORT=y
916CONFIG_HAS_DMA=y 938CONFIG_HAS_DMA=y
917CONFIG_HAVE_LMB=y 939CONFIG_HAVE_LMB=y
918CONFIG_NLATTR=y 940CONFIG_NLATTR=y
941CONFIG_GENERIC_ATOMIC64=y
919 942
920# 943#
921# Kernel hacking 944# Kernel hacking
@@ -941,6 +964,9 @@ CONFIG_DEBUG_KERNEL=y
941# CONFIG_RT_MUTEX_TESTER is not set 964# CONFIG_RT_MUTEX_TESTER is not set
942# CONFIG_DEBUG_SPINLOCK is not set 965# CONFIG_DEBUG_SPINLOCK is not set
943# CONFIG_DEBUG_MUTEXES is not set 966# CONFIG_DEBUG_MUTEXES is not set
967# CONFIG_DEBUG_LOCK_ALLOC is not set
968# CONFIG_PROVE_LOCKING is not set
969# CONFIG_LOCK_STAT is not set
944# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 970# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
945# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 971# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
946# CONFIG_DEBUG_KOBJECT is not set 972# CONFIG_DEBUG_KOBJECT is not set
@@ -952,7 +978,6 @@ CONFIG_DEBUG_INFO=y
952# CONFIG_DEBUG_LIST is not set 978# CONFIG_DEBUG_LIST is not set
953# CONFIG_DEBUG_SG is not set 979# CONFIG_DEBUG_SG is not set
954# CONFIG_DEBUG_NOTIFIERS is not set 980# CONFIG_DEBUG_NOTIFIERS is not set
955# CONFIG_BOOT_PRINTK_DELAY is not set
956# CONFIG_RCU_TORTURE_TEST is not set 981# CONFIG_RCU_TORTURE_TEST is not set
957# CONFIG_RCU_CPU_STALL_DETECTOR is not set 982# CONFIG_RCU_CPU_STALL_DETECTOR is not set
958# CONFIG_BACKTRACE_SELF_TEST is not set 983# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -966,16 +991,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
966CONFIG_HAVE_DYNAMIC_FTRACE=y 991CONFIG_HAVE_DYNAMIC_FTRACE=y
967CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 992CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
968CONFIG_TRACING_SUPPORT=y 993CONFIG_TRACING_SUPPORT=y
969 994CONFIG_FTRACE=y
970#
971# Tracers
972#
973# CONFIG_FUNCTION_TRACER is not set 995# CONFIG_FUNCTION_TRACER is not set
996# CONFIG_IRQSOFF_TRACER is not set
974# CONFIG_SCHED_TRACER is not set 997# CONFIG_SCHED_TRACER is not set
975# CONFIG_CONTEXT_SWITCH_TRACER is not set 998# CONFIG_ENABLE_DEFAULT_TRACERS is not set
976# CONFIG_EVENT_TRACER is not set
977# CONFIG_BOOT_TRACER is not set 999# CONFIG_BOOT_TRACER is not set
978# CONFIG_TRACE_BRANCH_PROFILING is not set 1000CONFIG_BRANCH_PROFILE_NONE=y
1001# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1002# CONFIG_PROFILE_ALL_BRANCHES is not set
979# CONFIG_STACK_TRACER is not set 1003# CONFIG_STACK_TRACER is not set
980# CONFIG_KMEMTRACE is not set 1004# CONFIG_KMEMTRACE is not set
981# CONFIG_WORKQUEUE_TRACER is not set 1005# CONFIG_WORKQUEUE_TRACER is not set
@@ -983,9 +1007,12 @@ CONFIG_TRACING_SUPPORT=y
983# CONFIG_DYNAMIC_DEBUG is not set 1007# CONFIG_DYNAMIC_DEBUG is not set
984# CONFIG_SAMPLES is not set 1008# CONFIG_SAMPLES is not set
985CONFIG_HAVE_ARCH_KGDB=y 1009CONFIG_HAVE_ARCH_KGDB=y
1010# CONFIG_PPC_DISABLE_WERROR is not set
1011CONFIG_PPC_WERROR=y
986CONFIG_PRINT_STACK_DEPTH=64 1012CONFIG_PRINT_STACK_DEPTH=64
987# CONFIG_DEBUG_STACKOVERFLOW is not set 1013# CONFIG_DEBUG_STACKOVERFLOW is not set
988# CONFIG_DEBUG_STACK_USAGE is not set 1014# CONFIG_DEBUG_STACK_USAGE is not set
1015# CONFIG_PPC_EMULATED_STATS is not set
989# CONFIG_CODE_PATCHING_SELFTEST is not set 1016# CONFIG_CODE_PATCHING_SELFTEST is not set
990# CONFIG_FTR_FIXUP_SELFTEST is not set 1017# CONFIG_FTR_FIXUP_SELFTEST is not set
991# CONFIG_MSI_BITMAP_SELFTEST is not set 1018# CONFIG_MSI_BITMAP_SELFTEST is not set
diff --git a/arch/powerpc/configs/mgsuvd_defconfig b/arch/powerpc/configs/mgsuvd_defconfig
index 24fa90792c5..1ae85a3b294 100644
--- a/arch/powerpc/configs/mgsuvd_defconfig
+++ b/arch/powerpc/configs/mgsuvd_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:21:55 2009 4# Wed Jul 29 23:31:52 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13CONFIG_PPC_8xx=y 13CONFIG_PPC_8xx=y
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -27,15 +27,16 @@ CONFIG_GENERIC_TIME=y
27CONFIG_GENERIC_TIME_VSYSCALL=y 27CONFIG_GENERIC_TIME_VSYSCALL=y
28CONFIG_GENERIC_CLOCKEVENTS=y 28CONFIG_GENERIC_CLOCKEVENTS=y
29CONFIG_GENERIC_HARDIRQS=y 29CONFIG_GENERIC_HARDIRQS=y
30CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
30# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 31# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
31CONFIG_IRQ_PER_CPU=y 32CONFIG_IRQ_PER_CPU=y
32CONFIG_STACKTRACE_SUPPORT=y 33CONFIG_STACKTRACE_SUPPORT=y
33CONFIG_HAVE_LATENCYTOP_SUPPORT=y 34CONFIG_HAVE_LATENCYTOP_SUPPORT=y
35CONFIG_TRACE_IRQFLAGS_SUPPORT=y
34CONFIG_LOCKDEP_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
38CONFIG_GENERIC_CALIBRATE_DELAY=y
39CONFIG_GENERIC_FIND_NEXT_BIT=y 40CONFIG_GENERIC_FIND_NEXT_BIT=y
40# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 41# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
41CONFIG_PPC=y 42CONFIG_PPC=y
@@ -48,11 +49,13 @@ CONFIG_OF=y
48# CONFIG_PPC_UDBG_16550 is not set 49# CONFIG_PPC_UDBG_16550 is not set
49# CONFIG_GENERIC_TBSYNC is not set 50# CONFIG_GENERIC_TBSYNC is not set
50CONFIG_AUDIT_ARCH=y 51CONFIG_AUDIT_ARCH=y
52CONFIG_DTC=y
51# CONFIG_DEFAULT_UIMAGE is not set 53# CONFIG_DEFAULT_UIMAGE is not set
52# CONFIG_PPC_DCR_NATIVE is not set 54# CONFIG_PPC_DCR_NATIVE is not set
53# CONFIG_PPC_DCR_MMIO is not set 55# CONFIG_PPC_DCR_MMIO is not set
54CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 56CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
55CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 57CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
58CONFIG_CONSTRUCTORS=y
56 59
57# 60#
58# General setup 61# General setup
@@ -102,7 +105,6 @@ CONFIG_EMBEDDED=y
102# CONFIG_SYSCTL_SYSCALL is not set 105# CONFIG_SYSCTL_SYSCALL is not set
103CONFIG_KALLSYMS=y 106CONFIG_KALLSYMS=y
104# CONFIG_KALLSYMS_EXTRA_PASS is not set 107# CONFIG_KALLSYMS_EXTRA_PASS is not set
105# CONFIG_STRIP_ASM_SYMS is not set
106# CONFIG_HOTPLUG is not set 108# CONFIG_HOTPLUG is not set
107CONFIG_PRINTK=y 109CONFIG_PRINTK=y
108# CONFIG_BUG is not set 110# CONFIG_BUG is not set
@@ -115,7 +117,14 @@ CONFIG_TIMERFD=y
115CONFIG_EVENTFD=y 117CONFIG_EVENTFD=y
116CONFIG_SHMEM=y 118CONFIG_SHMEM=y
117CONFIG_AIO=y 119CONFIG_AIO=y
120CONFIG_HAVE_PERF_COUNTERS=y
121
122#
123# Performance Counters
124#
125# CONFIG_PERF_COUNTERS is not set
118# CONFIG_VM_EVENT_COUNTERS is not set 126# CONFIG_VM_EVENT_COUNTERS is not set
127# CONFIG_STRIP_ASM_SYMS is not set
119CONFIG_COMPAT_BRK=y 128CONFIG_COMPAT_BRK=y
120CONFIG_SLAB=y 129CONFIG_SLAB=y
121# CONFIG_SLUB is not set 130# CONFIG_SLUB is not set
@@ -129,6 +138,11 @@ CONFIG_HAVE_KPROBES=y
129CONFIG_HAVE_KRETPROBES=y 138CONFIG_HAVE_KRETPROBES=y
130CONFIG_HAVE_ARCH_TRACEHOOK=y 139CONFIG_HAVE_ARCH_TRACEHOOK=y
131CONFIG_HAVE_CLK=y 140CONFIG_HAVE_CLK=y
141
142#
143# GCOV-based kernel profiling
144#
145# CONFIG_GCOV_KERNEL is not set
132# CONFIG_SLOW_WORK is not set 146# CONFIG_SLOW_WORK is not set
133# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 147# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
134CONFIG_SLABINFO=y 148CONFIG_SLABINFO=y
@@ -136,7 +150,7 @@ CONFIG_RT_MUTEXES=y
136CONFIG_BASE_SMALL=1 150CONFIG_BASE_SMALL=1
137# CONFIG_MODULES is not set 151# CONFIG_MODULES is not set
138CONFIG_BLOCK=y 152CONFIG_BLOCK=y
139# CONFIG_LBD is not set 153CONFIG_LBDAF=y
140# CONFIG_BLK_DEV_BSG is not set 154# CONFIG_BLK_DEV_BSG is not set
141# CONFIG_BLK_DEV_INTEGRITY is not set 155# CONFIG_BLK_DEV_INTEGRITY is not set
142 156
@@ -222,6 +236,7 @@ CONFIG_BINFMT_ELF=y
222# CONFIG_BINFMT_MISC is not set 236# CONFIG_BINFMT_MISC is not set
223CONFIG_MATH_EMULATION=y 237CONFIG_MATH_EMULATION=y
224# CONFIG_IOMMU_HELPER is not set 238# CONFIG_IOMMU_HELPER is not set
239# CONFIG_SWIOTLB is not set
225CONFIG_PPC_NEED_DMA_SYNC_OPS=y 240CONFIG_PPC_NEED_DMA_SYNC_OPS=y
226CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 241CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
227CONFIG_ARCH_HAS_WALK_MEMORY=y 242CONFIG_ARCH_HAS_WALK_MEMORY=y
@@ -241,9 +256,9 @@ CONFIG_MIGRATION=y
241CONFIG_ZONE_DMA_FLAG=1 256CONFIG_ZONE_DMA_FLAG=1
242CONFIG_BOUNCE=y 257CONFIG_BOUNCE=y
243CONFIG_VIRT_TO_BUS=y 258CONFIG_VIRT_TO_BUS=y
244CONFIG_UNEVICTABLE_LRU=y
245CONFIG_HAVE_MLOCK=y 259CONFIG_HAVE_MLOCK=y
246CONFIG_HAVE_MLOCKED_PAGE_BIT=y 260CONFIG_HAVE_MLOCKED_PAGE_BIT=y
261CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
247CONFIG_PPC_4K_PAGES=y 262CONFIG_PPC_4K_PAGES=y
248# CONFIG_PPC_16K_PAGES is not set 263# CONFIG_PPC_16K_PAGES is not set
249# CONFIG_PPC_64K_PAGES is not set 264# CONFIG_PPC_64K_PAGES is not set
@@ -281,6 +296,7 @@ CONFIG_PAGE_OFFSET=0xc0000000
281CONFIG_KERNEL_START=0xc0000000 296CONFIG_KERNEL_START=0xc0000000
282CONFIG_PHYSICAL_START=0x00000000 297CONFIG_PHYSICAL_START=0x00000000
283CONFIG_TASK_SIZE=0x80000000 298CONFIG_TASK_SIZE=0x80000000
299CONFIG_CONSISTENT_SIZE=0x00200000
284CONFIG_NET=y 300CONFIG_NET=y
285 301
286# 302#
@@ -342,6 +358,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
342# CONFIG_ECONET is not set 358# CONFIG_ECONET is not set
343# CONFIG_WAN_ROUTER is not set 359# CONFIG_WAN_ROUTER is not set
344# CONFIG_PHONET is not set 360# CONFIG_PHONET is not set
361# CONFIG_IEEE802154 is not set
345# CONFIG_NET_SCHED is not set 362# CONFIG_NET_SCHED is not set
346# CONFIG_DCB is not set 363# CONFIG_DCB is not set
347 364
@@ -359,7 +376,11 @@ CONFIG_WIRELESS=y
359CONFIG_WIRELESS_OLD_REGULATORY=y 376CONFIG_WIRELESS_OLD_REGULATORY=y
360# CONFIG_WIRELESS_EXT is not set 377# CONFIG_WIRELESS_EXT is not set
361# CONFIG_LIB80211 is not set 378# CONFIG_LIB80211 is not set
362# CONFIG_MAC80211 is not set 379
380#
381# CFG80211 needs to be enabled for MAC80211
382#
383CONFIG_MAC80211_DEFAULT_PS_VALUE=0
363# CONFIG_WIMAX is not set 384# CONFIG_WIMAX is not set
364# CONFIG_RFKILL is not set 385# CONFIG_RFKILL is not set
365# CONFIG_NET_9P is not set 386# CONFIG_NET_9P is not set
@@ -463,6 +484,7 @@ CONFIG_MTD_PHYSMAP_OF=y
463# 484#
464# CONFIG_MTD_UBI is not set 485# CONFIG_MTD_UBI is not set
465CONFIG_OF_DEVICE=y 486CONFIG_OF_DEVICE=y
487CONFIG_OF_MDIO=y
466# CONFIG_PARPORT is not set 488# CONFIG_PARPORT is not set
467CONFIG_BLK_DEV=y 489CONFIG_BLK_DEV=y
468# CONFIG_BLK_DEV_FD is not set 490# CONFIG_BLK_DEV_FD is not set
@@ -492,7 +514,6 @@ CONFIG_HAVE_IDE=y
492# CONFIG_MD is not set 514# CONFIG_MD is not set
493# CONFIG_MACINTOSH_DRIVERS is not set 515# CONFIG_MACINTOSH_DRIVERS is not set
494CONFIG_NETDEVICES=y 516CONFIG_NETDEVICES=y
495CONFIG_COMPAT_NET_DEV_OPS=y
496# CONFIG_DUMMY is not set 517# CONFIG_DUMMY is not set
497# CONFIG_BONDING is not set 518# CONFIG_BONDING is not set
498# CONFIG_MACVLAN is not set 519# CONFIG_MACVLAN is not set
@@ -531,6 +552,7 @@ CONFIG_MII=y
531# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 552# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
532# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 553# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
533# CONFIG_B44 is not set 554# CONFIG_B44 is not set
555# CONFIG_KS8842 is not set
534CONFIG_FS_ENET=y 556CONFIG_FS_ENET=y
535CONFIG_FS_ENET_HAS_SCC=y 557CONFIG_FS_ENET_HAS_SCC=y
536# CONFIG_FS_ENET_HAS_FEC is not set 558# CONFIG_FS_ENET_HAS_FEC is not set
@@ -602,6 +624,11 @@ CONFIG_GEN_RTC=y
602# CONFIG_TCG_TPM is not set 624# CONFIG_TCG_TPM is not set
603# CONFIG_I2C is not set 625# CONFIG_I2C is not set
604# CONFIG_SPI is not set 626# CONFIG_SPI is not set
627
628#
629# PPS support
630#
631# CONFIG_PPS is not set
605CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 632CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
606# CONFIG_GPIOLIB is not set 633# CONFIG_GPIOLIB is not set
607# CONFIG_W1 is not set 634# CONFIG_W1 is not set
@@ -625,22 +652,7 @@ CONFIG_SSB_POSSIBLE=y
625# CONFIG_HTC_PASIC3 is not set 652# CONFIG_HTC_PASIC3 is not set
626# CONFIG_MFD_TMIO is not set 653# CONFIG_MFD_TMIO is not set
627# CONFIG_REGULATOR is not set 654# CONFIG_REGULATOR is not set
628 655# CONFIG_MEDIA_SUPPORT is not set
629#
630# Multimedia devices
631#
632
633#
634# Multimedia core support
635#
636# CONFIG_VIDEO_DEV is not set
637# CONFIG_DVB_CORE is not set
638# CONFIG_VIDEO_MEDIA is not set
639
640#
641# Multimedia drivers
642#
643# CONFIG_DAB is not set
644 656
645# 657#
646# Graphics support 658# Graphics support
@@ -665,6 +677,10 @@ CONFIG_SSB_POSSIBLE=y
665# CONFIG_DMADEVICES is not set 677# CONFIG_DMADEVICES is not set
666# CONFIG_AUXDISPLAY is not set 678# CONFIG_AUXDISPLAY is not set
667# CONFIG_UIO is not set 679# CONFIG_UIO is not set
680
681#
682# TI VLYNQ
683#
668# CONFIG_STAGING is not set 684# CONFIG_STAGING is not set
669 685
670# 686#
@@ -687,10 +703,12 @@ CONFIG_FS_MBCACHE=y
687# CONFIG_REISERFS_FS is not set 703# CONFIG_REISERFS_FS is not set
688# CONFIG_JFS_FS is not set 704# CONFIG_JFS_FS is not set
689# CONFIG_FS_POSIX_ACL is not set 705# CONFIG_FS_POSIX_ACL is not set
690CONFIG_FILE_LOCKING=y
691# CONFIG_XFS_FS is not set 706# CONFIG_XFS_FS is not set
707# CONFIG_GFS2_FS is not set
692# CONFIG_OCFS2_FS is not set 708# CONFIG_OCFS2_FS is not set
693# CONFIG_BTRFS_FS is not set 709# CONFIG_BTRFS_FS is not set
710CONFIG_FILE_LOCKING=y
711CONFIG_FSNOTIFY=y
694CONFIG_DNOTIFY=y 712CONFIG_DNOTIFY=y
695CONFIG_INOTIFY=y 713CONFIG_INOTIFY=y
696CONFIG_INOTIFY_USER=y 714CONFIG_INOTIFY_USER=y
@@ -823,6 +841,7 @@ CONFIG_HAS_IOPORT=y
823CONFIG_HAS_DMA=y 841CONFIG_HAS_DMA=y
824CONFIG_HAVE_LMB=y 842CONFIG_HAVE_LMB=y
825CONFIG_NLATTR=y 843CONFIG_NLATTR=y
844CONFIG_GENERIC_ATOMIC64=y
826 845
827# 846#
828# Kernel hacking 847# Kernel hacking
@@ -844,24 +863,14 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
844CONFIG_HAVE_DYNAMIC_FTRACE=y 863CONFIG_HAVE_DYNAMIC_FTRACE=y
845CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 864CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
846CONFIG_TRACING_SUPPORT=y 865CONFIG_TRACING_SUPPORT=y
847 866# CONFIG_FTRACE is not set
848#
849# Tracers
850#
851# CONFIG_FUNCTION_TRACER is not set
852# CONFIG_SCHED_TRACER is not set
853# CONFIG_CONTEXT_SWITCH_TRACER is not set
854# CONFIG_EVENT_TRACER is not set
855# CONFIG_BOOT_TRACER is not set
856# CONFIG_TRACE_BRANCH_PROFILING is not set
857# CONFIG_STACK_TRACER is not set
858# CONFIG_KMEMTRACE is not set
859# CONFIG_WORKQUEUE_TRACER is not set
860# CONFIG_BLK_DEV_IO_TRACE is not set
861# CONFIG_DYNAMIC_DEBUG is not set 867# CONFIG_DYNAMIC_DEBUG is not set
862# CONFIG_SAMPLES is not set 868# CONFIG_SAMPLES is not set
863CONFIG_HAVE_ARCH_KGDB=y 869CONFIG_HAVE_ARCH_KGDB=y
870# CONFIG_PPC_DISABLE_WERROR is not set
871CONFIG_PPC_WERROR=y
864CONFIG_PRINT_STACK_DEPTH=64 872CONFIG_PRINT_STACK_DEPTH=64
873# CONFIG_PPC_EMULATED_STATS is not set
865# CONFIG_IRQSTACKS is not set 874# CONFIG_IRQSTACKS is not set
866# CONFIG_VIRQ_DEBUG is not set 875# CONFIG_VIRQ_DEBUG is not set
867# CONFIG_PPC_EARLY_DEBUG is not set 876# CONFIG_PPC_EARLY_DEBUG is not set
diff --git a/arch/powerpc/configs/mpc7448_hpc2_defconfig b/arch/powerpc/configs/mpc7448_hpc2_defconfig
index 642ab67c843..f23428c3b34 100644
--- a/arch/powerpc/configs/mpc7448_hpc2_defconfig
+++ b/arch/powerpc/configs/mpc7448_hpc2_defconfig
@@ -1,25 +1,27 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:21:56 2009 4# Wed Jul 29 23:31:53 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19CONFIG_ALTIVEC=y 20CONFIG_ALTIVEC=y
20CONFIG_PPC_STD_MMU=y 21CONFIG_PPC_STD_MMU=y
21CONFIG_PPC_STD_MMU_32=y 22CONFIG_PPC_STD_MMU_32=y
22# CONFIG_PPC_MM_SLICES is not set 23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC_HAVE_PMU_SUPPORT=y
23# CONFIG_SMP is not set 25# CONFIG_SMP is not set
24CONFIG_PPC32=y 26CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32 27CONFIG_WORD_SIZE=32
@@ -30,15 +32,16 @@ CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y 32CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y 33CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 34CONFIG_GENERIC_HARDIRQS=y
35CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 36# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 37CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y 38CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_HAVE_LATENCYTOP_SUPPORT=y 39CONFIG_HAVE_LATENCYTOP_SUPPORT=y
40CONFIG_TRACE_IRQFLAGS_SUPPORT=y
37CONFIG_LOCKDEP_SUPPORT=y 41CONFIG_LOCKDEP_SUPPORT=y
38CONFIG_RWSEM_XCHGADD_ALGORITHM=y 42CONFIG_RWSEM_XCHGADD_ALGORITHM=y
39CONFIG_ARCH_HAS_ILOG2_U32=y 43CONFIG_ARCH_HAS_ILOG2_U32=y
40CONFIG_GENERIC_HWEIGHT=y 44CONFIG_GENERIC_HWEIGHT=y
41CONFIG_GENERIC_CALIBRATE_DELAY=y
42CONFIG_GENERIC_FIND_NEXT_BIT=y 45CONFIG_GENERIC_FIND_NEXT_BIT=y
43# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 46# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
44CONFIG_PPC=y 47CONFIG_PPC=y
@@ -52,11 +55,13 @@ CONFIG_PPC_UDBG_16550=y
52# CONFIG_GENERIC_TBSYNC is not set 55# CONFIG_GENERIC_TBSYNC is not set
53CONFIG_AUDIT_ARCH=y 56CONFIG_AUDIT_ARCH=y
54CONFIG_GENERIC_BUG=y 57CONFIG_GENERIC_BUG=y
58CONFIG_DTC=y
55CONFIG_DEFAULT_UIMAGE=y 59CONFIG_DEFAULT_UIMAGE=y
56# CONFIG_PPC_DCR_NATIVE is not set 60# CONFIG_PPC_DCR_NATIVE is not set
57# CONFIG_PPC_DCR_MMIO is not set 61# CONFIG_PPC_DCR_MMIO is not set
58CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 62CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
59CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 63CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
64CONFIG_CONSTRUCTORS=y
60 65
61# 66#
62# General setup 67# General setup
@@ -106,7 +111,6 @@ CONFIG_EMBEDDED=y
106CONFIG_SYSCTL_SYSCALL=y 111CONFIG_SYSCTL_SYSCALL=y
107CONFIG_KALLSYMS=y 112CONFIG_KALLSYMS=y
108# CONFIG_KALLSYMS_EXTRA_PASS is not set 113# CONFIG_KALLSYMS_EXTRA_PASS is not set
109# CONFIG_STRIP_ASM_SYMS is not set
110CONFIG_HOTPLUG=y 114CONFIG_HOTPLUG=y
111CONFIG_PRINTK=y 115CONFIG_PRINTK=y
112CONFIG_BUG=y 116CONFIG_BUG=y
@@ -119,9 +123,16 @@ CONFIG_TIMERFD=y
119CONFIG_EVENTFD=y 123CONFIG_EVENTFD=y
120CONFIG_SHMEM=y 124CONFIG_SHMEM=y
121CONFIG_AIO=y 125CONFIG_AIO=y
126CONFIG_HAVE_PERF_COUNTERS=y
127
128#
129# Performance Counters
130#
131# CONFIG_PERF_COUNTERS is not set
122CONFIG_VM_EVENT_COUNTERS=y 132CONFIG_VM_EVENT_COUNTERS=y
123CONFIG_PCI_QUIRKS=y 133CONFIG_PCI_QUIRKS=y
124CONFIG_SLUB_DEBUG=y 134CONFIG_SLUB_DEBUG=y
135# CONFIG_STRIP_ASM_SYMS is not set
125CONFIG_COMPAT_BRK=y 136CONFIG_COMPAT_BRK=y
126# CONFIG_SLAB is not set 137# CONFIG_SLAB is not set
127CONFIG_SLUB=y 138CONFIG_SLUB=y
@@ -134,6 +145,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
134CONFIG_HAVE_KPROBES=y 145CONFIG_HAVE_KPROBES=y
135CONFIG_HAVE_KRETPROBES=y 146CONFIG_HAVE_KRETPROBES=y
136CONFIG_HAVE_ARCH_TRACEHOOK=y 147CONFIG_HAVE_ARCH_TRACEHOOK=y
148
149#
150# GCOV-based kernel profiling
151#
137# CONFIG_SLOW_WORK is not set 152# CONFIG_SLOW_WORK is not set
138# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 153# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
139CONFIG_SLABINFO=y 154CONFIG_SLABINFO=y
@@ -141,7 +156,7 @@ CONFIG_RT_MUTEXES=y
141CONFIG_BASE_SMALL=0 156CONFIG_BASE_SMALL=0
142# CONFIG_MODULES is not set 157# CONFIG_MODULES is not set
143CONFIG_BLOCK=y 158CONFIG_BLOCK=y
144CONFIG_LBD=y 159CONFIG_LBDAF=y
145# CONFIG_BLK_DEV_BSG is not set 160# CONFIG_BLK_DEV_BSG is not set
146# CONFIG_BLK_DEV_INTEGRITY is not set 161# CONFIG_BLK_DEV_INTEGRITY is not set
147 162
@@ -220,6 +235,7 @@ CONFIG_BINFMT_ELF=y
220# CONFIG_HAVE_AOUT is not set 235# CONFIG_HAVE_AOUT is not set
221CONFIG_BINFMT_MISC=y 236CONFIG_BINFMT_MISC=y
222# CONFIG_IOMMU_HELPER is not set 237# CONFIG_IOMMU_HELPER is not set
238# CONFIG_SWIOTLB is not set
223CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 239CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
224CONFIG_ARCH_HAS_WALK_MEMORY=y 240CONFIG_ARCH_HAS_WALK_MEMORY=y
225CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 241CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -240,9 +256,9 @@ CONFIG_MIGRATION=y
240CONFIG_ZONE_DMA_FLAG=1 256CONFIG_ZONE_DMA_FLAG=1
241CONFIG_BOUNCE=y 257CONFIG_BOUNCE=y
242CONFIG_VIRT_TO_BUS=y 258CONFIG_VIRT_TO_BUS=y
243CONFIG_UNEVICTABLE_LRU=y
244CONFIG_HAVE_MLOCK=y 259CONFIG_HAVE_MLOCK=y
245CONFIG_HAVE_MLOCKED_PAGE_BIT=y 260CONFIG_HAVE_MLOCKED_PAGE_BIT=y
261CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
246CONFIG_PPC_4K_PAGES=y 262CONFIG_PPC_4K_PAGES=y
247# CONFIG_PPC_16K_PAGES is not set 263# CONFIG_PPC_16K_PAGES is not set
248# CONFIG_PPC_64K_PAGES is not set 264# CONFIG_PPC_64K_PAGES is not set
@@ -348,6 +364,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
348# CONFIG_ECONET is not set 364# CONFIG_ECONET is not set
349# CONFIG_WAN_ROUTER is not set 365# CONFIG_WAN_ROUTER is not set
350# CONFIG_PHONET is not set 366# CONFIG_PHONET is not set
367# CONFIG_IEEE802154 is not set
351# CONFIG_NET_SCHED is not set 368# CONFIG_NET_SCHED is not set
352# CONFIG_DCB is not set 369# CONFIG_DCB is not set
353 370
@@ -365,7 +382,11 @@ CONFIG_WIRELESS=y
365CONFIG_WIRELESS_OLD_REGULATORY=y 382CONFIG_WIRELESS_OLD_REGULATORY=y
366# CONFIG_WIRELESS_EXT is not set 383# CONFIG_WIRELESS_EXT is not set
367# CONFIG_LIB80211 is not set 384# CONFIG_LIB80211 is not set
368# CONFIG_MAC80211 is not set 385
386#
387# CFG80211 needs to be enabled for MAC80211
388#
389CONFIG_MAC80211_DEFAULT_PS_VALUE=0
369# CONFIG_WIMAX is not set 390# CONFIG_WIMAX is not set
370# CONFIG_RFKILL is not set 391# CONFIG_RFKILL is not set
371# CONFIG_NET_9P is not set 392# CONFIG_NET_9P is not set
@@ -385,6 +406,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
385# CONFIG_CONNECTOR is not set 406# CONFIG_CONNECTOR is not set
386# CONFIG_MTD is not set 407# CONFIG_MTD is not set
387CONFIG_OF_DEVICE=y 408CONFIG_OF_DEVICE=y
409CONFIG_OF_MDIO=y
388# CONFIG_PARPORT is not set 410# CONFIG_PARPORT is not set
389CONFIG_BLK_DEV=y 411CONFIG_BLK_DEV=y
390# CONFIG_BLK_DEV_FD is not set 412# CONFIG_BLK_DEV_FD is not set
@@ -416,6 +438,7 @@ CONFIG_MISC_DEVICES=y
416# EEPROM support 438# EEPROM support
417# 439#
418# CONFIG_EEPROM_93CX6 is not set 440# CONFIG_EEPROM_93CX6 is not set
441# CONFIG_CB710_CORE is not set
419CONFIG_HAVE_IDE=y 442CONFIG_HAVE_IDE=y
420# CONFIG_IDE is not set 443# CONFIG_IDE is not set
421 444
@@ -438,10 +461,6 @@ CONFIG_BLK_DEV_SD=y
438# CONFIG_BLK_DEV_SR is not set 461# CONFIG_BLK_DEV_SR is not set
439# CONFIG_CHR_DEV_SG is not set 462# CONFIG_CHR_DEV_SG is not set
440# CONFIG_CHR_DEV_SCH is not set 463# CONFIG_CHR_DEV_SCH is not set
441
442#
443# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
444#
445# CONFIG_SCSI_MULTI_LUN is not set 464# CONFIG_SCSI_MULTI_LUN is not set
446# CONFIG_SCSI_CONSTANTS is not set 465# CONFIG_SCSI_CONSTANTS is not set
447# CONFIG_SCSI_LOGGING is not set 466# CONFIG_SCSI_LOGGING is not set
@@ -458,6 +477,7 @@ CONFIG_BLK_DEV_SD=y
458CONFIG_SCSI_LOWLEVEL=y 477CONFIG_SCSI_LOWLEVEL=y
459# CONFIG_ISCSI_TCP is not set 478# CONFIG_ISCSI_TCP is not set
460# CONFIG_SCSI_CXGB3_ISCSI is not set 479# CONFIG_SCSI_CXGB3_ISCSI is not set
480# CONFIG_SCSI_BNX2_ISCSI is not set
461# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 481# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
462# CONFIG_SCSI_3W_9XXX is not set 482# CONFIG_SCSI_3W_9XXX is not set
463# CONFIG_SCSI_ACARD is not set 483# CONFIG_SCSI_ACARD is not set
@@ -466,6 +486,7 @@ CONFIG_SCSI_LOWLEVEL=y
466# CONFIG_SCSI_AIC7XXX_OLD is not set 486# CONFIG_SCSI_AIC7XXX_OLD is not set
467# CONFIG_SCSI_AIC79XX is not set 487# CONFIG_SCSI_AIC79XX is not set
468# CONFIG_SCSI_AIC94XX is not set 488# CONFIG_SCSI_AIC94XX is not set
489# CONFIG_SCSI_MVSAS is not set
469# CONFIG_SCSI_DPT_I2O is not set 490# CONFIG_SCSI_DPT_I2O is not set
470# CONFIG_SCSI_ADVANSYS is not set 491# CONFIG_SCSI_ADVANSYS is not set
471# CONFIG_SCSI_ARCMSR is not set 492# CONFIG_SCSI_ARCMSR is not set
@@ -485,7 +506,6 @@ CONFIG_SCSI_LOWLEVEL=y
485# CONFIG_SCSI_IPS is not set 506# CONFIG_SCSI_IPS is not set
486# CONFIG_SCSI_INITIO is not set 507# CONFIG_SCSI_INITIO is not set
487# CONFIG_SCSI_INIA100 is not set 508# CONFIG_SCSI_INIA100 is not set
488# CONFIG_SCSI_MVSAS is not set
489# CONFIG_SCSI_STEX is not set 509# CONFIG_SCSI_STEX is not set
490# CONFIG_SCSI_SYM53C8XX_2 is not set 510# CONFIG_SCSI_SYM53C8XX_2 is not set
491# CONFIG_SCSI_IPR is not set 511# CONFIG_SCSI_IPR is not set
@@ -568,14 +588,17 @@ CONFIG_SATA_MV=y
568# 588#
569 589
570# 590#
571# Enable only one of the two stacks, unless you know what you are doing 591# You can enable one or both FireWire driver stacks.
592#
593
594#
595# See the help texts for more information.
572# 596#
573# CONFIG_FIREWIRE is not set 597# CONFIG_FIREWIRE is not set
574# CONFIG_IEEE1394 is not set 598# CONFIG_IEEE1394 is not set
575# CONFIG_I2O is not set 599# CONFIG_I2O is not set
576# CONFIG_MACINTOSH_DRIVERS is not set 600# CONFIG_MACINTOSH_DRIVERS is not set
577CONFIG_NETDEVICES=y 601CONFIG_NETDEVICES=y
578CONFIG_COMPAT_NET_DEV_OPS=y
579# CONFIG_DUMMY is not set 602# CONFIG_DUMMY is not set
580# CONFIG_BONDING is not set 603# CONFIG_BONDING is not set
581# CONFIG_MACVLAN is not set 604# CONFIG_MACVLAN is not set
@@ -642,6 +665,7 @@ CONFIG_8139TOO=y
642# CONFIG_SMSC9420 is not set 665# CONFIG_SMSC9420 is not set
643# CONFIG_SUNDANCE is not set 666# CONFIG_SUNDANCE is not set
644# CONFIG_TLAN is not set 667# CONFIG_TLAN is not set
668# CONFIG_KS8842 is not set
645# CONFIG_VIA_RHINE is not set 669# CONFIG_VIA_RHINE is not set
646# CONFIG_SC92031 is not set 670# CONFIG_SC92031 is not set
647# CONFIG_ATL2 is not set 671# CONFIG_ATL2 is not set
@@ -663,7 +687,9 @@ CONFIG_NETDEV_1000=y
663# CONFIG_VIA_VELOCITY is not set 687# CONFIG_VIA_VELOCITY is not set
664# CONFIG_TIGON3 is not set 688# CONFIG_TIGON3 is not set
665# CONFIG_BNX2 is not set 689# CONFIG_BNX2 is not set
690# CONFIG_CNIC is not set
666CONFIG_TSI108_ETH=y 691CONFIG_TSI108_ETH=y
692# CONFIG_MV643XX_ETH is not set
667# CONFIG_QLA3XXX is not set 693# CONFIG_QLA3XXX is not set
668# CONFIG_ATL1 is not set 694# CONFIG_ATL1 is not set
669# CONFIG_ATL1E is not set 695# CONFIG_ATL1E is not set
@@ -785,6 +811,11 @@ CONFIG_GEN_RTC=y
785CONFIG_DEVPORT=y 811CONFIG_DEVPORT=y
786# CONFIG_I2C is not set 812# CONFIG_I2C is not set
787# CONFIG_SPI is not set 813# CONFIG_SPI is not set
814
815#
816# PPS support
817#
818# CONFIG_PPS is not set
788CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 819CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
789# CONFIG_GPIOLIB is not set 820# CONFIG_GPIOLIB is not set
790# CONFIG_W1 is not set 821# CONFIG_W1 is not set
@@ -824,22 +855,7 @@ CONFIG_SSB_POSSIBLE=y
824# CONFIG_HTC_PASIC3 is not set 855# CONFIG_HTC_PASIC3 is not set
825# CONFIG_MFD_TMIO is not set 856# CONFIG_MFD_TMIO is not set
826# CONFIG_REGULATOR is not set 857# CONFIG_REGULATOR is not set
827 858# CONFIG_MEDIA_SUPPORT is not set
828#
829# Multimedia devices
830#
831
832#
833# Multimedia core support
834#
835# CONFIG_VIDEO_DEV is not set
836# CONFIG_DVB_CORE is not set
837# CONFIG_VIDEO_MEDIA is not set
838
839#
840# Multimedia drivers
841#
842CONFIG_DAB=y
843 859
844# 860#
845# Graphics support 861# Graphics support
@@ -896,6 +912,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
896# CONFIG_DMADEVICES is not set 912# CONFIG_DMADEVICES is not set
897# CONFIG_AUXDISPLAY is not set 913# CONFIG_AUXDISPLAY is not set
898# CONFIG_UIO is not set 914# CONFIG_UIO is not set
915
916#
917# TI VLYNQ
918#
899# CONFIG_STAGING is not set 919# CONFIG_STAGING is not set
900 920
901# 921#
@@ -915,11 +935,12 @@ CONFIG_FS_MBCACHE=y
915# CONFIG_REISERFS_FS is not set 935# CONFIG_REISERFS_FS is not set
916# CONFIG_JFS_FS is not set 936# CONFIG_JFS_FS is not set
917# CONFIG_FS_POSIX_ACL is not set 937# CONFIG_FS_POSIX_ACL is not set
918CONFIG_FILE_LOCKING=y
919# CONFIG_XFS_FS is not set 938# CONFIG_XFS_FS is not set
920# CONFIG_GFS2_FS is not set 939# CONFIG_GFS2_FS is not set
921# CONFIG_OCFS2_FS is not set 940# CONFIG_OCFS2_FS is not set
922# CONFIG_BTRFS_FS is not set 941# CONFIG_BTRFS_FS is not set
942CONFIG_FILE_LOCKING=y
943CONFIG_FSNOTIFY=y
923CONFIG_DNOTIFY=y 944CONFIG_DNOTIFY=y
924CONFIG_INOTIFY=y 945CONFIG_INOTIFY=y
925CONFIG_INOTIFY_USER=y 946CONFIG_INOTIFY_USER=y
@@ -1038,6 +1059,7 @@ CONFIG_HAS_IOPORT=y
1038CONFIG_HAS_DMA=y 1059CONFIG_HAS_DMA=y
1039CONFIG_HAVE_LMB=y 1060CONFIG_HAVE_LMB=y
1040CONFIG_NLATTR=y 1061CONFIG_NLATTR=y
1062CONFIG_GENERIC_ATOMIC64=y
1041 1063
1042# 1064#
1043# Kernel hacking 1065# Kernel hacking
@@ -1063,22 +1085,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1063CONFIG_HAVE_DYNAMIC_FTRACE=y 1085CONFIG_HAVE_DYNAMIC_FTRACE=y
1064CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1086CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1065CONFIG_TRACING_SUPPORT=y 1087CONFIG_TRACING_SUPPORT=y
1066 1088# CONFIG_FTRACE is not set
1067#
1068# Tracers
1069#
1070# CONFIG_FUNCTION_TRACER is not set
1071# CONFIG_SCHED_TRACER is not set
1072# CONFIG_CONTEXT_SWITCH_TRACER is not set
1073# CONFIG_EVENT_TRACER is not set
1074# CONFIG_BOOT_TRACER is not set
1075# CONFIG_TRACE_BRANCH_PROFILING is not set
1076# CONFIG_STACK_TRACER is not set
1077# CONFIG_KMEMTRACE is not set
1078# CONFIG_WORKQUEUE_TRACER is not set
1079# CONFIG_BLK_DEV_IO_TRACE is not set
1080# CONFIG_SAMPLES is not set 1089# CONFIG_SAMPLES is not set
1081CONFIG_HAVE_ARCH_KGDB=y 1090CONFIG_HAVE_ARCH_KGDB=y
1091# CONFIG_PPC_DISABLE_WERROR is not set
1092CONFIG_PPC_WERROR=y
1082CONFIG_PRINT_STACK_DEPTH=64 1093CONFIG_PRINT_STACK_DEPTH=64
1083# CONFIG_IRQSTACKS is not set 1094# CONFIG_IRQSTACKS is not set
1084# CONFIG_BOOTX_TEXT is not set 1095# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/mpc8272_ads_defconfig b/arch/powerpc/configs/mpc8272_ads_defconfig
index cb966ca2ce8..02716f72db6 100644
--- a/arch/powerpc/configs/mpc8272_ads_defconfig
+++ b/arch/powerpc/configs/mpc8272_ads_defconfig
@@ -1,25 +1,27 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:21:57 2009 4# Wed Jul 29 23:31:54 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_ALTIVEC is not set 20# CONFIG_ALTIVEC is not set
20CONFIG_PPC_STD_MMU=y 21CONFIG_PPC_STD_MMU=y
21CONFIG_PPC_STD_MMU_32=y 22CONFIG_PPC_STD_MMU_32=y
22# CONFIG_PPC_MM_SLICES is not set 23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC_HAVE_PMU_SUPPORT=y
23# CONFIG_SMP is not set 25# CONFIG_SMP is not set
24CONFIG_PPC32=y 26CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32 27CONFIG_WORD_SIZE=32
@@ -30,15 +32,16 @@ CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y 32CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y 33CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 34CONFIG_GENERIC_HARDIRQS=y
35CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 36# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 37CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y 38CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_HAVE_LATENCYTOP_SUPPORT=y 39CONFIG_HAVE_LATENCYTOP_SUPPORT=y
40CONFIG_TRACE_IRQFLAGS_SUPPORT=y
37CONFIG_LOCKDEP_SUPPORT=y 41CONFIG_LOCKDEP_SUPPORT=y
38CONFIG_RWSEM_XCHGADD_ALGORITHM=y 42CONFIG_RWSEM_XCHGADD_ALGORITHM=y
39CONFIG_ARCH_HAS_ILOG2_U32=y 43CONFIG_ARCH_HAS_ILOG2_U32=y
40CONFIG_GENERIC_HWEIGHT=y 44CONFIG_GENERIC_HWEIGHT=y
41CONFIG_GENERIC_CALIBRATE_DELAY=y
42CONFIG_GENERIC_FIND_NEXT_BIT=y 45CONFIG_GENERIC_FIND_NEXT_BIT=y
43CONFIG_GENERIC_GPIO=y 46CONFIG_GENERIC_GPIO=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -53,11 +56,13 @@ CONFIG_OF=y
53# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
56CONFIG_DEFAULT_UIMAGE=y 60CONFIG_DEFAULT_UIMAGE=y
57# CONFIG_PPC_DCR_NATIVE is not set 61# CONFIG_PPC_DCR_NATIVE is not set
58# CONFIG_PPC_DCR_MMIO is not set 62# CONFIG_PPC_DCR_MMIO is not set
59CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 63CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
60CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 64CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
65CONFIG_CONSTRUCTORS=y
61 66
62# 67#
63# General setup 68# General setup
@@ -99,7 +104,6 @@ CONFIG_SYSCTL_SYSCALL=y
99CONFIG_KALLSYMS=y 104CONFIG_KALLSYMS=y
100CONFIG_KALLSYMS_ALL=y 105CONFIG_KALLSYMS_ALL=y
101# CONFIG_KALLSYMS_EXTRA_PASS is not set 106# CONFIG_KALLSYMS_EXTRA_PASS is not set
102# CONFIG_STRIP_ASM_SYMS is not set
103CONFIG_HOTPLUG=y 107CONFIG_HOTPLUG=y
104CONFIG_PRINTK=y 108CONFIG_PRINTK=y
105CONFIG_BUG=y 109CONFIG_BUG=y
@@ -112,9 +116,16 @@ CONFIG_TIMERFD=y
112CONFIG_EVENTFD=y 116CONFIG_EVENTFD=y
113CONFIG_SHMEM=y 117CONFIG_SHMEM=y
114CONFIG_AIO=y 118CONFIG_AIO=y
119CONFIG_HAVE_PERF_COUNTERS=y
120
121#
122# Performance Counters
123#
124# CONFIG_PERF_COUNTERS is not set
115CONFIG_VM_EVENT_COUNTERS=y 125CONFIG_VM_EVENT_COUNTERS=y
116CONFIG_PCI_QUIRKS=y 126CONFIG_PCI_QUIRKS=y
117CONFIG_SLUB_DEBUG=y 127CONFIG_SLUB_DEBUG=y
128# CONFIG_STRIP_ASM_SYMS is not set
118CONFIG_COMPAT_BRK=y 129CONFIG_COMPAT_BRK=y
119# CONFIG_SLAB is not set 130# CONFIG_SLAB is not set
120CONFIG_SLUB=y 131CONFIG_SLUB=y
@@ -128,6 +139,10 @@ CONFIG_HAVE_KPROBES=y
128CONFIG_HAVE_KRETPROBES=y 139CONFIG_HAVE_KRETPROBES=y
129CONFIG_HAVE_ARCH_TRACEHOOK=y 140CONFIG_HAVE_ARCH_TRACEHOOK=y
130CONFIG_HAVE_CLK=y 141CONFIG_HAVE_CLK=y
142
143#
144# GCOV-based kernel profiling
145#
131# CONFIG_SLOW_WORK is not set 146# CONFIG_SLOW_WORK is not set
132# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 147# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
133CONFIG_SLABINFO=y 148CONFIG_SLABINFO=y
@@ -135,7 +150,7 @@ CONFIG_RT_MUTEXES=y
135CONFIG_BASE_SMALL=0 150CONFIG_BASE_SMALL=0
136# CONFIG_MODULES is not set 151# CONFIG_MODULES is not set
137CONFIG_BLOCK=y 152CONFIG_BLOCK=y
138# CONFIG_LBD is not set 153CONFIG_LBDAF=y
139# CONFIG_BLK_DEV_INTEGRITY is not set 154# CONFIG_BLK_DEV_INTEGRITY is not set
140 155
141# 156#
@@ -216,6 +231,7 @@ CONFIG_BINFMT_ELF=y
216# CONFIG_HAVE_AOUT is not set 231# CONFIG_HAVE_AOUT is not set
217CONFIG_BINFMT_MISC=y 232CONFIG_BINFMT_MISC=y
218# CONFIG_IOMMU_HELPER is not set 233# CONFIG_IOMMU_HELPER is not set
234# CONFIG_SWIOTLB is not set
219CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 235CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
220CONFIG_ARCH_HAS_WALK_MEMORY=y 236CONFIG_ARCH_HAS_WALK_MEMORY=y
221CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 237CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -231,9 +247,9 @@ CONFIG_MIGRATION=y
231CONFIG_ZONE_DMA_FLAG=1 247CONFIG_ZONE_DMA_FLAG=1
232CONFIG_BOUNCE=y 248CONFIG_BOUNCE=y
233CONFIG_VIRT_TO_BUS=y 249CONFIG_VIRT_TO_BUS=y
234CONFIG_UNEVICTABLE_LRU=y
235CONFIG_HAVE_MLOCK=y 250CONFIG_HAVE_MLOCK=y
236CONFIG_HAVE_MLOCKED_PAGE_BIT=y 251CONFIG_HAVE_MLOCKED_PAGE_BIT=y
252CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
237CONFIG_PPC_4K_PAGES=y 253CONFIG_PPC_4K_PAGES=y
238# CONFIG_PPC_16K_PAGES is not set 254# CONFIG_PPC_16K_PAGES is not set
239# CONFIG_PPC_64K_PAGES is not set 255# CONFIG_PPC_64K_PAGES is not set
@@ -303,6 +319,7 @@ CONFIG_IP_PNP_BOOTP=y
303# CONFIG_NET_IPIP is not set 319# CONFIG_NET_IPIP is not set
304# CONFIG_NET_IPGRE is not set 320# CONFIG_NET_IPGRE is not set
305# CONFIG_IP_MROUTE is not set 321# CONFIG_IP_MROUTE is not set
322# CONFIG_ARPD is not set
306CONFIG_SYN_COOKIES=y 323CONFIG_SYN_COOKIES=y
307# CONFIG_INET_AH is not set 324# CONFIG_INET_AH is not set
308# CONFIG_INET_ESP is not set 325# CONFIG_INET_ESP is not set
@@ -383,7 +400,11 @@ CONFIG_WIRELESS=y
383CONFIG_WIRELESS_OLD_REGULATORY=y 400CONFIG_WIRELESS_OLD_REGULATORY=y
384# CONFIG_WIRELESS_EXT is not set 401# CONFIG_WIRELESS_EXT is not set
385# CONFIG_LIB80211 is not set 402# CONFIG_LIB80211 is not set
386# CONFIG_MAC80211 is not set 403
404#
405# CFG80211 needs to be enabled for MAC80211
406#
407CONFIG_MAC80211_DEFAULT_PS_VALUE=0
387# CONFIG_WIMAX is not set 408# CONFIG_WIMAX is not set
388# CONFIG_RFKILL is not set 409# CONFIG_RFKILL is not set
389 410
@@ -489,6 +510,7 @@ CONFIG_MTD_PHYSMAP_OF=y
489# CONFIG_MTD_UBI is not set 510# CONFIG_MTD_UBI is not set
490CONFIG_OF_DEVICE=y 511CONFIG_OF_DEVICE=y
491CONFIG_OF_GPIO=y 512CONFIG_OF_GPIO=y
513CONFIG_OF_MDIO=y
492# CONFIG_PARPORT is not set 514# CONFIG_PARPORT is not set
493CONFIG_BLK_DEV=y 515CONFIG_BLK_DEV=y
494# CONFIG_BLK_DEV_FD is not set 516# CONFIG_BLK_DEV_FD is not set
@@ -524,13 +546,17 @@ CONFIG_HAVE_IDE=y
524# 546#
525 547
526# 548#
527# A new alternative FireWire stack is available with EXPERIMENTAL=y 549# You can enable one or both FireWire driver stacks.
550#
551
552#
553# See the help texts for more information.
528# 554#
555# CONFIG_FIREWIRE is not set
529# CONFIG_IEEE1394 is not set 556# CONFIG_IEEE1394 is not set
530# CONFIG_I2O is not set 557# CONFIG_I2O is not set
531# CONFIG_MACINTOSH_DRIVERS is not set 558# CONFIG_MACINTOSH_DRIVERS is not set
532CONFIG_NETDEVICES=y 559CONFIG_NETDEVICES=y
533CONFIG_COMPAT_NET_DEV_OPS=y
534# CONFIG_DUMMY is not set 560# CONFIG_DUMMY is not set
535# CONFIG_BONDING is not set 561# CONFIG_BONDING is not set
536# CONFIG_EQUALIZER is not set 562# CONFIG_EQUALIZER is not set
@@ -577,6 +603,7 @@ CONFIG_MII=y
577# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 603# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
578# CONFIG_NET_PCI is not set 604# CONFIG_NET_PCI is not set
579# CONFIG_B44 is not set 605# CONFIG_B44 is not set
606# CONFIG_KS8842 is not set
580# CONFIG_ATL2 is not set 607# CONFIG_ATL2 is not set
581CONFIG_FS_ENET=y 608CONFIG_FS_ENET=y
582# CONFIG_FS_ENET_HAS_SCC is not set 609# CONFIG_FS_ENET_HAS_SCC is not set
@@ -598,8 +625,10 @@ CONFIG_NETDEV_1000=y
598# CONFIG_VIA_VELOCITY is not set 625# CONFIG_VIA_VELOCITY is not set
599# CONFIG_TIGON3 is not set 626# CONFIG_TIGON3 is not set
600# CONFIG_BNX2 is not set 627# CONFIG_BNX2 is not set
628# CONFIG_CNIC is not set
601# CONFIG_FSL_PQ_MDIO is not set 629# CONFIG_FSL_PQ_MDIO is not set
602# CONFIG_GIANFAR is not set 630# CONFIG_GIANFAR is not set
631# CONFIG_MV643XX_ETH is not set
603# CONFIG_QLA3XXX is not set 632# CONFIG_QLA3XXX is not set
604# CONFIG_ATL1 is not set 633# CONFIG_ATL1 is not set
605# CONFIG_JME is not set 634# CONFIG_JME is not set
@@ -671,12 +700,13 @@ CONFIG_INPUT_EVDEV=y
671# 700#
672CONFIG_INPUT_KEYBOARD=y 701CONFIG_INPUT_KEYBOARD=y
673CONFIG_KEYBOARD_ATKBD=y 702CONFIG_KEYBOARD_ATKBD=y
674# CONFIG_KEYBOARD_SUNKBD is not set
675# CONFIG_KEYBOARD_LKKBD is not set 703# CONFIG_KEYBOARD_LKKBD is not set
676# CONFIG_KEYBOARD_XTKBD is not set 704# CONFIG_KEYBOARD_GPIO is not set
705# CONFIG_KEYBOARD_MATRIX is not set
677# CONFIG_KEYBOARD_NEWTON is not set 706# CONFIG_KEYBOARD_NEWTON is not set
678# CONFIG_KEYBOARD_STOWAWAY is not set 707# CONFIG_KEYBOARD_STOWAWAY is not set
679# CONFIG_KEYBOARD_GPIO is not set 708# CONFIG_KEYBOARD_SUNKBD is not set
709# CONFIG_KEYBOARD_XTKBD is not set
680CONFIG_INPUT_MOUSE=y 710CONFIG_INPUT_MOUSE=y
681CONFIG_MOUSE_PS2=y 711CONFIG_MOUSE_PS2=y
682CONFIG_MOUSE_PS2_ALPS=y 712CONFIG_MOUSE_PS2_ALPS=y
@@ -741,6 +771,10 @@ CONFIG_HW_RANDOM=y
741CONFIG_DEVPORT=y 771CONFIG_DEVPORT=y
742# CONFIG_I2C is not set 772# CONFIG_I2C is not set
743# CONFIG_SPI is not set 773# CONFIG_SPI is not set
774
775#
776# PPS support
777#
744CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 778CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
745CONFIG_ARCH_REQUIRE_GPIOLIB=y 779CONFIG_ARCH_REQUIRE_GPIOLIB=y
746CONFIG_GPIOLIB=y 780CONFIG_GPIOLIB=y
@@ -784,22 +818,7 @@ CONFIG_SSB_POSSIBLE=y
784# CONFIG_HTC_PASIC3 is not set 818# CONFIG_HTC_PASIC3 is not set
785# CONFIG_MFD_TMIO is not set 819# CONFIG_MFD_TMIO is not set
786# CONFIG_REGULATOR is not set 820# CONFIG_REGULATOR is not set
787 821# CONFIG_MEDIA_SUPPORT is not set
788#
789# Multimedia devices
790#
791
792#
793# Multimedia core support
794#
795# CONFIG_VIDEO_DEV is not set
796# CONFIG_DVB_CORE is not set
797# CONFIG_VIDEO_MEDIA is not set
798
799#
800# Multimedia drivers
801#
802CONFIG_DAB=y
803 822
804# 823#
805# Graphics support 824# Graphics support
@@ -828,6 +847,10 @@ CONFIG_DAB=y
828# CONFIG_DMADEVICES is not set 847# CONFIG_DMADEVICES is not set
829# CONFIG_AUXDISPLAY is not set 848# CONFIG_AUXDISPLAY is not set
830# CONFIG_UIO is not set 849# CONFIG_UIO is not set
850
851#
852# TI VLYNQ
853#
831# CONFIG_STAGING is not set 854# CONFIG_STAGING is not set
832 855
833# 856#
@@ -847,9 +870,10 @@ CONFIG_FS_MBCACHE=y
847# CONFIG_REISERFS_FS is not set 870# CONFIG_REISERFS_FS is not set
848# CONFIG_JFS_FS is not set 871# CONFIG_JFS_FS is not set
849CONFIG_FS_POSIX_ACL=y 872CONFIG_FS_POSIX_ACL=y
850CONFIG_FILE_LOCKING=y
851# CONFIG_XFS_FS is not set 873# CONFIG_XFS_FS is not set
852# CONFIG_OCFS2_FS is not set 874# CONFIG_OCFS2_FS is not set
875CONFIG_FILE_LOCKING=y
876CONFIG_FSNOTIFY=y
853CONFIG_DNOTIFY=y 877CONFIG_DNOTIFY=y
854CONFIG_INOTIFY=y 878CONFIG_INOTIFY=y
855CONFIG_INOTIFY_USER=y 879CONFIG_INOTIFY_USER=y
@@ -998,6 +1022,7 @@ CONFIG_HAS_IOPORT=y
998CONFIG_HAS_DMA=y 1022CONFIG_HAS_DMA=y
999CONFIG_HAVE_LMB=y 1023CONFIG_HAVE_LMB=y
1000CONFIG_NLATTR=y 1024CONFIG_NLATTR=y
1025CONFIG_GENERIC_ATOMIC64=y
1001 1026
1002# 1027#
1003# Kernel hacking 1028# Kernel hacking
@@ -1028,6 +1053,9 @@ CONFIG_SCHED_DEBUG=y
1028# CONFIG_RT_MUTEX_TESTER is not set 1053# CONFIG_RT_MUTEX_TESTER is not set
1029# CONFIG_DEBUG_SPINLOCK is not set 1054# CONFIG_DEBUG_SPINLOCK is not set
1030# CONFIG_DEBUG_MUTEXES is not set 1055# CONFIG_DEBUG_MUTEXES is not set
1056# CONFIG_DEBUG_LOCK_ALLOC is not set
1057# CONFIG_PROVE_LOCKING is not set
1058# CONFIG_LOCK_STAT is not set
1031# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1059# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1032# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1060# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1033# CONFIG_DEBUG_KOBJECT is not set 1061# CONFIG_DEBUG_KOBJECT is not set
@@ -1039,7 +1067,6 @@ CONFIG_DEBUG_INFO=y
1039# CONFIG_DEBUG_LIST is not set 1067# CONFIG_DEBUG_LIST is not set
1040# CONFIG_DEBUG_SG is not set 1068# CONFIG_DEBUG_SG is not set
1041# CONFIG_DEBUG_NOTIFIERS is not set 1069# CONFIG_DEBUG_NOTIFIERS is not set
1042# CONFIG_BOOT_PRINTK_DELAY is not set
1043# CONFIG_RCU_TORTURE_TEST is not set 1070# CONFIG_RCU_TORTURE_TEST is not set
1044# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1071# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1045# CONFIG_BACKTRACE_SELF_TEST is not set 1072# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1053,22 +1080,23 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1053CONFIG_HAVE_DYNAMIC_FTRACE=y 1080CONFIG_HAVE_DYNAMIC_FTRACE=y
1054CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1081CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1055CONFIG_TRACING_SUPPORT=y 1082CONFIG_TRACING_SUPPORT=y
1056 1083CONFIG_FTRACE=y
1057#
1058# Tracers
1059#
1060# CONFIG_FUNCTION_TRACER is not set 1084# CONFIG_FUNCTION_TRACER is not set
1085# CONFIG_IRQSOFF_TRACER is not set
1061# CONFIG_SCHED_TRACER is not set 1086# CONFIG_SCHED_TRACER is not set
1062# CONFIG_CONTEXT_SWITCH_TRACER is not set 1087# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1063# CONFIG_EVENT_TRACER is not set
1064# CONFIG_BOOT_TRACER is not set 1088# CONFIG_BOOT_TRACER is not set
1065# CONFIG_TRACE_BRANCH_PROFILING is not set 1089CONFIG_BRANCH_PROFILE_NONE=y
1090# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1091# CONFIG_PROFILE_ALL_BRANCHES is not set
1066# CONFIG_STACK_TRACER is not set 1092# CONFIG_STACK_TRACER is not set
1067# CONFIG_KMEMTRACE is not set 1093# CONFIG_KMEMTRACE is not set
1068# CONFIG_WORKQUEUE_TRACER is not set 1094# CONFIG_WORKQUEUE_TRACER is not set
1069# CONFIG_BLK_DEV_IO_TRACE is not set 1095# CONFIG_BLK_DEV_IO_TRACE is not set
1070# CONFIG_SAMPLES is not set 1096# CONFIG_SAMPLES is not set
1071CONFIG_HAVE_ARCH_KGDB=y 1097CONFIG_HAVE_ARCH_KGDB=y
1098# CONFIG_PPC_DISABLE_WERROR is not set
1099CONFIG_PPC_WERROR=y
1072CONFIG_PRINT_STACK_DEPTH=64 1100CONFIG_PRINT_STACK_DEPTH=64
1073# CONFIG_DEBUG_STACKOVERFLOW is not set 1101# CONFIG_DEBUG_STACKOVERFLOW is not set
1074# CONFIG_DEBUG_STACK_USAGE is not set 1102# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/mpc83xx_defconfig b/arch/powerpc/configs/mpc83xx_defconfig
index 433c303eb82..4a96cb6925b 100644
--- a/arch/powerpc/configs/mpc83xx_defconfig
+++ b/arch/powerpc/configs/mpc83xx_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:21:58 2009 4# Wed Jul 29 23:31:55 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_FSL_EMB_PERFMON is not set 20# CONFIG_FSL_EMB_PERFMON is not set
20# CONFIG_ALTIVEC is not set 21# CONFIG_ALTIVEC is not set
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24# CONFIG_SMP is not set 26# CONFIG_SMP is not set
25CONFIG_PPC32=y 27CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32 28CONFIG_WORD_SIZE=32
@@ -31,15 +33,16 @@ CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y 33CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y 34CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y 35CONFIG_GENERIC_HARDIRQS=y
36CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y 38CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y 39CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y 40CONFIG_HAVE_LATENCYTOP_SUPPORT=y
41CONFIG_TRACE_IRQFLAGS_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y 42CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y 43CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y 44CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y 45CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y 46CONFIG_GENERIC_FIND_NEXT_BIT=y
44CONFIG_GENERIC_GPIO=y 47CONFIG_GENERIC_GPIO=y
45# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -54,6 +57,7 @@ CONFIG_PPC_UDBG_16550=y
54# CONFIG_GENERIC_TBSYNC is not set 57# CONFIG_GENERIC_TBSYNC is not set
55CONFIG_AUDIT_ARCH=y 58CONFIG_AUDIT_ARCH=y
56CONFIG_GENERIC_BUG=y 59CONFIG_GENERIC_BUG=y
60CONFIG_DTC=y
57CONFIG_DEFAULT_UIMAGE=y 61CONFIG_DEFAULT_UIMAGE=y
58CONFIG_REDBOOT=y 62CONFIG_REDBOOT=y
59CONFIG_ARCH_SUSPEND_POSSIBLE=y 63CONFIG_ARCH_SUSPEND_POSSIBLE=y
@@ -61,6 +65,7 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y
61# CONFIG_PPC_DCR_MMIO is not set 65# CONFIG_PPC_DCR_MMIO is not set
62CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 66CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
63CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 67CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
68CONFIG_CONSTRUCTORS=y
64 69
65# 70#
66# General setup 71# General setup
@@ -110,7 +115,6 @@ CONFIG_EMBEDDED=y
110CONFIG_SYSCTL_SYSCALL=y 115CONFIG_SYSCTL_SYSCALL=y
111CONFIG_KALLSYMS=y 116CONFIG_KALLSYMS=y
112# CONFIG_KALLSYMS_EXTRA_PASS is not set 117# CONFIG_KALLSYMS_EXTRA_PASS is not set
113# CONFIG_STRIP_ASM_SYMS is not set
114CONFIG_HOTPLUG=y 118CONFIG_HOTPLUG=y
115CONFIG_PRINTK=y 119CONFIG_PRINTK=y
116CONFIG_BUG=y 120CONFIG_BUG=y
@@ -123,8 +127,15 @@ CONFIG_TIMERFD=y
123CONFIG_EVENTFD=y 127CONFIG_EVENTFD=y
124CONFIG_SHMEM=y 128CONFIG_SHMEM=y
125CONFIG_AIO=y 129CONFIG_AIO=y
130CONFIG_HAVE_PERF_COUNTERS=y
131
132#
133# Performance Counters
134#
135# CONFIG_PERF_COUNTERS is not set
126CONFIG_VM_EVENT_COUNTERS=y 136CONFIG_VM_EVENT_COUNTERS=y
127CONFIG_PCI_QUIRKS=y 137CONFIG_PCI_QUIRKS=y
138# CONFIG_STRIP_ASM_SYMS is not set
128CONFIG_COMPAT_BRK=y 139CONFIG_COMPAT_BRK=y
129CONFIG_SLAB=y 140CONFIG_SLAB=y
130# CONFIG_SLUB is not set 141# CONFIG_SLUB is not set
@@ -138,6 +149,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
138CONFIG_HAVE_KPROBES=y 149CONFIG_HAVE_KPROBES=y
139CONFIG_HAVE_KRETPROBES=y 150CONFIG_HAVE_KRETPROBES=y
140CONFIG_HAVE_ARCH_TRACEHOOK=y 151CONFIG_HAVE_ARCH_TRACEHOOK=y
152
153#
154# GCOV-based kernel profiling
155#
141# CONFIG_SLOW_WORK is not set 156# CONFIG_SLOW_WORK is not set
142# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 157# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
143CONFIG_SLABINFO=y 158CONFIG_SLABINFO=y
@@ -150,7 +165,7 @@ CONFIG_MODULE_UNLOAD=y
150# CONFIG_MODVERSIONS is not set 165# CONFIG_MODVERSIONS is not set
151# CONFIG_MODULE_SRCVERSION_ALL is not set 166# CONFIG_MODULE_SRCVERSION_ALL is not set
152CONFIG_BLOCK=y 167CONFIG_BLOCK=y
153# CONFIG_LBD is not set 168CONFIG_LBDAF=y
154# CONFIG_BLK_DEV_BSG is not set 169# CONFIG_BLK_DEV_BSG is not set
155# CONFIG_BLK_DEV_INTEGRITY is not set 170# CONFIG_BLK_DEV_INTEGRITY is not set
156 171
@@ -192,6 +207,7 @@ CONFIG_MPC837x_MDS=y
192CONFIG_MPC837x_RDB=y 207CONFIG_MPC837x_RDB=y
193CONFIG_SBC834x=y 208CONFIG_SBC834x=y
194CONFIG_ASP834x=y 209CONFIG_ASP834x=y
210# CONFIG_KMETER1 is not set
195CONFIG_PPC_MPC831x=y 211CONFIG_PPC_MPC831x=y
196CONFIG_PPC_MPC832x=y 212CONFIG_PPC_MPC832x=y
197CONFIG_PPC_MPC834x=y 213CONFIG_PPC_MPC834x=y
@@ -241,6 +257,7 @@ CONFIG_BINFMT_ELF=y
241# CONFIG_BINFMT_MISC is not set 257# CONFIG_BINFMT_MISC is not set
242CONFIG_MATH_EMULATION=y 258CONFIG_MATH_EMULATION=y
243# CONFIG_IOMMU_HELPER is not set 259# CONFIG_IOMMU_HELPER is not set
260# CONFIG_SWIOTLB is not set
244CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 261CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
245CONFIG_ARCH_HAS_WALK_MEMORY=y 262CONFIG_ARCH_HAS_WALK_MEMORY=y
246CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 263CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -261,9 +278,9 @@ CONFIG_MIGRATION=y
261CONFIG_ZONE_DMA_FLAG=1 278CONFIG_ZONE_DMA_FLAG=1
262CONFIG_BOUNCE=y 279CONFIG_BOUNCE=y
263CONFIG_VIRT_TO_BUS=y 280CONFIG_VIRT_TO_BUS=y
264CONFIG_UNEVICTABLE_LRU=y
265CONFIG_HAVE_MLOCK=y 281CONFIG_HAVE_MLOCK=y
266CONFIG_HAVE_MLOCKED_PAGE_BIT=y 282CONFIG_HAVE_MLOCKED_PAGE_BIT=y
283CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
267CONFIG_PPC_4K_PAGES=y 284CONFIG_PPC_4K_PAGES=y
268# CONFIG_PPC_16K_PAGES is not set 285# CONFIG_PPC_16K_PAGES is not set
269# CONFIG_PPC_64K_PAGES is not set 286# CONFIG_PPC_64K_PAGES is not set
@@ -374,6 +391,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
374# CONFIG_ECONET is not set 391# CONFIG_ECONET is not set
375# CONFIG_WAN_ROUTER is not set 392# CONFIG_WAN_ROUTER is not set
376# CONFIG_PHONET is not set 393# CONFIG_PHONET is not set
394# CONFIG_IEEE802154 is not set
377# CONFIG_NET_SCHED is not set 395# CONFIG_NET_SCHED is not set
378# CONFIG_DCB is not set 396# CONFIG_DCB is not set
379 397
@@ -391,7 +409,11 @@ CONFIG_WIRELESS=y
391CONFIG_WIRELESS_OLD_REGULATORY=y 409CONFIG_WIRELESS_OLD_REGULATORY=y
392# CONFIG_WIRELESS_EXT is not set 410# CONFIG_WIRELESS_EXT is not set
393# CONFIG_LIB80211 is not set 411# CONFIG_LIB80211 is not set
394# CONFIG_MAC80211 is not set 412
413#
414# CFG80211 needs to be enabled for MAC80211
415#
416CONFIG_MAC80211_DEFAULT_PS_VALUE=0
395# CONFIG_WIMAX is not set 417# CONFIG_WIMAX is not set
396# CONFIG_RFKILL is not set 418# CONFIG_RFKILL is not set
397# CONFIG_NET_9P is not set 419# CONFIG_NET_9P is not set
@@ -507,6 +529,7 @@ CONFIG_MTD_NAND_FSL_ELBC=y
507CONFIG_OF_DEVICE=y 529CONFIG_OF_DEVICE=y
508CONFIG_OF_GPIO=y 530CONFIG_OF_GPIO=y
509CONFIG_OF_I2C=y 531CONFIG_OF_I2C=y
532CONFIG_OF_MDIO=y
510# CONFIG_PARPORT is not set 533# CONFIG_PARPORT is not set
511CONFIG_BLK_DEV=y 534CONFIG_BLK_DEV=y
512# CONFIG_BLK_DEV_FD is not set 535# CONFIG_BLK_DEV_FD is not set
@@ -542,7 +565,9 @@ CONFIG_MISC_DEVICES=y
542# 565#
543# CONFIG_EEPROM_AT24 is not set 566# CONFIG_EEPROM_AT24 is not set
544# CONFIG_EEPROM_LEGACY is not set 567# CONFIG_EEPROM_LEGACY is not set
568# CONFIG_EEPROM_MAX6875 is not set
545# CONFIG_EEPROM_93CX6 is not set 569# CONFIG_EEPROM_93CX6 is not set
570# CONFIG_CB710_CORE is not set
546CONFIG_HAVE_IDE=y 571CONFIG_HAVE_IDE=y
547# CONFIG_IDE is not set 572# CONFIG_IDE is not set
548 573
@@ -565,10 +590,6 @@ CONFIG_BLK_DEV_SD=y
565# CONFIG_BLK_DEV_SR is not set 590# CONFIG_BLK_DEV_SR is not set
566CONFIG_CHR_DEV_SG=y 591CONFIG_CHR_DEV_SG=y
567# CONFIG_CHR_DEV_SCH is not set 592# CONFIG_CHR_DEV_SCH is not set
568
569#
570# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
571#
572# CONFIG_SCSI_MULTI_LUN is not set 593# CONFIG_SCSI_MULTI_LUN is not set
573# CONFIG_SCSI_CONSTANTS is not set 594# CONFIG_SCSI_CONSTANTS is not set
574# CONFIG_SCSI_LOGGING is not set 595# CONFIG_SCSI_LOGGING is not set
@@ -586,6 +607,7 @@ CONFIG_SCSI_WAIT_SCAN=m
586CONFIG_SCSI_LOWLEVEL=y 607CONFIG_SCSI_LOWLEVEL=y
587# CONFIG_ISCSI_TCP is not set 608# CONFIG_ISCSI_TCP is not set
588# CONFIG_SCSI_CXGB3_ISCSI is not set 609# CONFIG_SCSI_CXGB3_ISCSI is not set
610# CONFIG_SCSI_BNX2_ISCSI is not set
589# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 611# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
590# CONFIG_SCSI_3W_9XXX is not set 612# CONFIG_SCSI_3W_9XXX is not set
591# CONFIG_SCSI_ACARD is not set 613# CONFIG_SCSI_ACARD is not set
@@ -594,6 +616,7 @@ CONFIG_SCSI_LOWLEVEL=y
594# CONFIG_SCSI_AIC7XXX_OLD is not set 616# CONFIG_SCSI_AIC7XXX_OLD is not set
595# CONFIG_SCSI_AIC79XX is not set 617# CONFIG_SCSI_AIC79XX is not set
596# CONFIG_SCSI_AIC94XX is not set 618# CONFIG_SCSI_AIC94XX is not set
619# CONFIG_SCSI_MVSAS is not set
597# CONFIG_SCSI_DPT_I2O is not set 620# CONFIG_SCSI_DPT_I2O is not set
598# CONFIG_SCSI_ADVANSYS is not set 621# CONFIG_SCSI_ADVANSYS is not set
599# CONFIG_SCSI_ARCMSR is not set 622# CONFIG_SCSI_ARCMSR is not set
@@ -613,7 +636,6 @@ CONFIG_SCSI_LOWLEVEL=y
613# CONFIG_SCSI_IPS is not set 636# CONFIG_SCSI_IPS is not set
614# CONFIG_SCSI_INITIO is not set 637# CONFIG_SCSI_INITIO is not set
615# CONFIG_SCSI_INIA100 is not set 638# CONFIG_SCSI_INIA100 is not set
616# CONFIG_SCSI_MVSAS is not set
617# CONFIG_SCSI_STEX is not set 639# CONFIG_SCSI_STEX is not set
618# CONFIG_SCSI_SYM53C8XX_2 is not set 640# CONFIG_SCSI_SYM53C8XX_2 is not set
619# CONFIG_SCSI_IPR is not set 641# CONFIG_SCSI_IPR is not set
@@ -697,14 +719,17 @@ CONFIG_ATA_SFF=y
697# 719#
698 720
699# 721#
700# Enable only one of the two stacks, unless you know what you are doing 722# You can enable one or both FireWire driver stacks.
723#
724
725#
726# See the help texts for more information.
701# 727#
702# CONFIG_FIREWIRE is not set 728# CONFIG_FIREWIRE is not set
703# CONFIG_IEEE1394 is not set 729# CONFIG_IEEE1394 is not set
704# CONFIG_I2O is not set 730# CONFIG_I2O is not set
705# CONFIG_MACINTOSH_DRIVERS is not set 731# CONFIG_MACINTOSH_DRIVERS is not set
706CONFIG_NETDEVICES=y 732CONFIG_NETDEVICES=y
707CONFIG_COMPAT_NET_DEV_OPS=y
708# CONFIG_DUMMY is not set 733# CONFIG_DUMMY is not set
709# CONFIG_BONDING is not set 734# CONFIG_BONDING is not set
710# CONFIG_MACVLAN is not set 735# CONFIG_MACVLAN is not set
@@ -751,6 +776,7 @@ CONFIG_MII=y
751# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 776# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
752# CONFIG_NET_PCI is not set 777# CONFIG_NET_PCI is not set
753# CONFIG_B44 is not set 778# CONFIG_B44 is not set
779# CONFIG_KS8842 is not set
754# CONFIG_ATL2 is not set 780# CONFIG_ATL2 is not set
755CONFIG_NETDEV_1000=y 781CONFIG_NETDEV_1000=y
756# CONFIG_ACENIC is not set 782# CONFIG_ACENIC is not set
@@ -770,11 +796,13 @@ CONFIG_NETDEV_1000=y
770# CONFIG_VIA_VELOCITY is not set 796# CONFIG_VIA_VELOCITY is not set
771# CONFIG_TIGON3 is not set 797# CONFIG_TIGON3 is not set
772# CONFIG_BNX2 is not set 798# CONFIG_BNX2 is not set
799# CONFIG_CNIC is not set
773CONFIG_FSL_PQ_MDIO=y 800CONFIG_FSL_PQ_MDIO=y
774CONFIG_GIANFAR=y 801CONFIG_GIANFAR=y
775CONFIG_UCC_GETH=y 802CONFIG_UCC_GETH=y
776# CONFIG_UGETH_MAGIC_PACKET is not set 803# CONFIG_UGETH_MAGIC_PACKET is not set
777# CONFIG_UGETH_TX_ON_DEMAND is not set 804# CONFIG_UGETH_TX_ON_DEMAND is not set
805# CONFIG_MV643XX_ETH is not set
778# CONFIG_QLA3XXX is not set 806# CONFIG_QLA3XXX is not set
779# CONFIG_ATL1 is not set 807# CONFIG_ATL1 is not set
780# CONFIG_ATL1E is not set 808# CONFIG_ATL1E is not set
@@ -965,13 +993,17 @@ CONFIG_I2C_MPC=y
965# CONFIG_SENSORS_PCF8574 is not set 993# CONFIG_SENSORS_PCF8574 is not set
966# CONFIG_PCF8575 is not set 994# CONFIG_PCF8575 is not set
967# CONFIG_SENSORS_PCA9539 is not set 995# CONFIG_SENSORS_PCA9539 is not set
968# CONFIG_SENSORS_MAX6875 is not set
969# CONFIG_SENSORS_TSL2550 is not set 996# CONFIG_SENSORS_TSL2550 is not set
970# CONFIG_I2C_DEBUG_CORE is not set 997# CONFIG_I2C_DEBUG_CORE is not set
971# CONFIG_I2C_DEBUG_ALGO is not set 998# CONFIG_I2C_DEBUG_ALGO is not set
972# CONFIG_I2C_DEBUG_BUS is not set 999# CONFIG_I2C_DEBUG_BUS is not set
973# CONFIG_I2C_DEBUG_CHIP is not set 1000# CONFIG_I2C_DEBUG_CHIP is not set
974# CONFIG_SPI is not set 1001# CONFIG_SPI is not set
1002
1003#
1004# PPS support
1005#
1006# CONFIG_PPS is not set
975CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 1007CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
976CONFIG_ARCH_REQUIRE_GPIOLIB=y 1008CONFIG_ARCH_REQUIRE_GPIOLIB=y
977CONFIG_GPIOLIB=y 1009CONFIG_GPIOLIB=y
@@ -1050,6 +1082,7 @@ CONFIG_HWMON=y
1050# CONFIG_SENSORS_SMSC47B397 is not set 1082# CONFIG_SENSORS_SMSC47B397 is not set
1051# CONFIG_SENSORS_ADS7828 is not set 1083# CONFIG_SENSORS_ADS7828 is not set
1052# CONFIG_SENSORS_THMC50 is not set 1084# CONFIG_SENSORS_THMC50 is not set
1085# CONFIG_SENSORS_TMP401 is not set
1053# CONFIG_SENSORS_VIA686A is not set 1086# CONFIG_SENSORS_VIA686A is not set
1054# CONFIG_SENSORS_VT1211 is not set 1087# CONFIG_SENSORS_VT1211 is not set
1055# CONFIG_SENSORS_VT8231 is not set 1088# CONFIG_SENSORS_VT8231 is not set
@@ -1104,24 +1137,9 @@ CONFIG_SSB_POSSIBLE=y
1104# CONFIG_MFD_WM8400 is not set 1137# CONFIG_MFD_WM8400 is not set
1105# CONFIG_MFD_WM8350_I2C is not set 1138# CONFIG_MFD_WM8350_I2C is not set
1106# CONFIG_MFD_PCF50633 is not set 1139# CONFIG_MFD_PCF50633 is not set
1140# CONFIG_AB3100_CORE is not set
1107# CONFIG_REGULATOR is not set 1141# CONFIG_REGULATOR is not set
1108 1142# CONFIG_MEDIA_SUPPORT is not set
1109#
1110# Multimedia devices
1111#
1112
1113#
1114# Multimedia core support
1115#
1116# CONFIG_VIDEO_DEV is not set
1117# CONFIG_DVB_CORE is not set
1118# CONFIG_VIDEO_MEDIA is not set
1119
1120#
1121# Multimedia drivers
1122#
1123CONFIG_DAB=y
1124# CONFIG_USB_DABUSB is not set
1125 1143
1126# 1144#
1127# Graphics support 1145# Graphics support
@@ -1159,7 +1177,7 @@ CONFIG_HID_BELKIN=y
1159CONFIG_HID_CHERRY=y 1177CONFIG_HID_CHERRY=y
1160CONFIG_HID_CHICONY=y 1178CONFIG_HID_CHICONY=y
1161CONFIG_HID_CYPRESS=y 1179CONFIG_HID_CYPRESS=y
1162# CONFIG_DRAGONRISE_FF is not set 1180# CONFIG_HID_DRAGONRISE is not set
1163CONFIG_HID_EZKEY=y 1181CONFIG_HID_EZKEY=y
1164# CONFIG_HID_KYE is not set 1182# CONFIG_HID_KYE is not set
1165CONFIG_HID_GYRATION=y 1183CONFIG_HID_GYRATION=y
@@ -1176,10 +1194,11 @@ CONFIG_HID_PETALYNX=y
1176CONFIG_HID_SAMSUNG=y 1194CONFIG_HID_SAMSUNG=y
1177CONFIG_HID_SONY=y 1195CONFIG_HID_SONY=y
1178CONFIG_HID_SUNPLUS=y 1196CONFIG_HID_SUNPLUS=y
1179# CONFIG_GREENASIA_FF is not set 1197# CONFIG_HID_GREENASIA is not set
1198# CONFIG_HID_SMARTJOYPLUS is not set
1180# CONFIG_HID_TOPSEED is not set 1199# CONFIG_HID_TOPSEED is not set
1181CONFIG_THRUSTMASTER_FF=m 1200# CONFIG_HID_THRUSTMASTER is not set
1182CONFIG_ZEROPLUS_FF=m 1201# CONFIG_HID_ZEROPLUS is not set
1183CONFIG_USB_SUPPORT=y 1202CONFIG_USB_SUPPORT=y
1184CONFIG_USB_ARCH_HAS_HCD=y 1203CONFIG_USB_ARCH_HAS_HCD=y
1185CONFIG_USB_ARCH_HAS_OHCI=y 1204CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1205,6 +1224,7 @@ CONFIG_USB_MON=y
1205# USB Host Controller Drivers 1224# USB Host Controller Drivers
1206# 1225#
1207# CONFIG_USB_C67X00_HCD is not set 1226# CONFIG_USB_C67X00_HCD is not set
1227# CONFIG_USB_XHCI_HCD is not set
1208CONFIG_USB_EHCI_HCD=y 1228CONFIG_USB_EHCI_HCD=y
1209CONFIG_USB_EHCI_ROOT_HUB_TT=y 1229CONFIG_USB_EHCI_ROOT_HUB_TT=y
1210# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1230# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1291,6 +1311,10 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y
1291# CONFIG_DMADEVICES is not set 1311# CONFIG_DMADEVICES is not set
1292# CONFIG_AUXDISPLAY is not set 1312# CONFIG_AUXDISPLAY is not set
1293# CONFIG_UIO is not set 1313# CONFIG_UIO is not set
1314
1315#
1316# TI VLYNQ
1317#
1294# CONFIG_STAGING is not set 1318# CONFIG_STAGING is not set
1295 1319
1296# 1320#
@@ -1310,10 +1334,12 @@ CONFIG_FS_MBCACHE=y
1310# CONFIG_REISERFS_FS is not set 1334# CONFIG_REISERFS_FS is not set
1311# CONFIG_JFS_FS is not set 1335# CONFIG_JFS_FS is not set
1312# CONFIG_FS_POSIX_ACL is not set 1336# CONFIG_FS_POSIX_ACL is not set
1313CONFIG_FILE_LOCKING=y
1314# CONFIG_XFS_FS is not set 1337# CONFIG_XFS_FS is not set
1338# CONFIG_GFS2_FS is not set
1315# CONFIG_OCFS2_FS is not set 1339# CONFIG_OCFS2_FS is not set
1316# CONFIG_BTRFS_FS is not set 1340# CONFIG_BTRFS_FS is not set
1341CONFIG_FILE_LOCKING=y
1342CONFIG_FSNOTIFY=y
1317CONFIG_DNOTIFY=y 1343CONFIG_DNOTIFY=y
1318CONFIG_INOTIFY=y 1344CONFIG_INOTIFY=y
1319CONFIG_INOTIFY_USER=y 1345CONFIG_INOTIFY_USER=y
@@ -1377,6 +1403,7 @@ CONFIG_NFS_FS=y
1377CONFIG_NFS_V3=y 1403CONFIG_NFS_V3=y
1378# CONFIG_NFS_V3_ACL is not set 1404# CONFIG_NFS_V3_ACL is not set
1379CONFIG_NFS_V4=y 1405CONFIG_NFS_V4=y
1406# CONFIG_NFS_V4_1 is not set
1380CONFIG_ROOT_NFS=y 1407CONFIG_ROOT_NFS=y
1381# CONFIG_NFSD is not set 1408# CONFIG_NFSD is not set
1382CONFIG_LOCKD=y 1409CONFIG_LOCKD=y
@@ -1413,7 +1440,46 @@ CONFIG_MSDOS_PARTITION=y
1413# CONFIG_KARMA_PARTITION is not set 1440# CONFIG_KARMA_PARTITION is not set
1414# CONFIG_EFI_PARTITION is not set 1441# CONFIG_EFI_PARTITION is not set
1415# CONFIG_SYSV68_PARTITION is not set 1442# CONFIG_SYSV68_PARTITION is not set
1416# CONFIG_NLS is not set 1443CONFIG_NLS=y
1444CONFIG_NLS_DEFAULT="iso8859-1"
1445# CONFIG_NLS_CODEPAGE_437 is not set
1446# CONFIG_NLS_CODEPAGE_737 is not set
1447# CONFIG_NLS_CODEPAGE_775 is not set
1448# CONFIG_NLS_CODEPAGE_850 is not set
1449# CONFIG_NLS_CODEPAGE_852 is not set
1450# CONFIG_NLS_CODEPAGE_855 is not set
1451# CONFIG_NLS_CODEPAGE_857 is not set
1452# CONFIG_NLS_CODEPAGE_860 is not set
1453# CONFIG_NLS_CODEPAGE_861 is not set
1454# CONFIG_NLS_CODEPAGE_862 is not set
1455# CONFIG_NLS_CODEPAGE_863 is not set
1456# CONFIG_NLS_CODEPAGE_864 is not set
1457# CONFIG_NLS_CODEPAGE_865 is not set
1458# CONFIG_NLS_CODEPAGE_866 is not set
1459# CONFIG_NLS_CODEPAGE_869 is not set
1460# CONFIG_NLS_CODEPAGE_936 is not set
1461# CONFIG_NLS_CODEPAGE_950 is not set
1462# CONFIG_NLS_CODEPAGE_932 is not set
1463# CONFIG_NLS_CODEPAGE_949 is not set
1464# CONFIG_NLS_CODEPAGE_874 is not set
1465# CONFIG_NLS_ISO8859_8 is not set
1466# CONFIG_NLS_CODEPAGE_1250 is not set
1467# CONFIG_NLS_CODEPAGE_1251 is not set
1468# CONFIG_NLS_ASCII is not set
1469# CONFIG_NLS_ISO8859_1 is not set
1470# CONFIG_NLS_ISO8859_2 is not set
1471# CONFIG_NLS_ISO8859_3 is not set
1472# CONFIG_NLS_ISO8859_4 is not set
1473# CONFIG_NLS_ISO8859_5 is not set
1474# CONFIG_NLS_ISO8859_6 is not set
1475# CONFIG_NLS_ISO8859_7 is not set
1476# CONFIG_NLS_ISO8859_9 is not set
1477# CONFIG_NLS_ISO8859_13 is not set
1478# CONFIG_NLS_ISO8859_14 is not set
1479# CONFIG_NLS_ISO8859_15 is not set
1480# CONFIG_NLS_KOI8_R is not set
1481# CONFIG_NLS_KOI8_U is not set
1482# CONFIG_NLS_UTF8 is not set
1417# CONFIG_DLM is not set 1483# CONFIG_DLM is not set
1418CONFIG_UCC_FAST=y 1484CONFIG_UCC_FAST=y
1419CONFIG_UCC=y 1485CONFIG_UCC=y
@@ -1438,6 +1504,7 @@ CONFIG_HAS_IOPORT=y
1438CONFIG_HAS_DMA=y 1504CONFIG_HAS_DMA=y
1439CONFIG_HAVE_LMB=y 1505CONFIG_HAVE_LMB=y
1440CONFIG_NLATTR=y 1506CONFIG_NLATTR=y
1507CONFIG_GENERIC_ATOMIC64=y
1441 1508
1442# 1509#
1443# Kernel hacking 1510# Kernel hacking
@@ -1461,22 +1528,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1461CONFIG_HAVE_DYNAMIC_FTRACE=y 1528CONFIG_HAVE_DYNAMIC_FTRACE=y
1462CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1529CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1463CONFIG_TRACING_SUPPORT=y 1530CONFIG_TRACING_SUPPORT=y
1464 1531# CONFIG_FTRACE is not set
1465#
1466# Tracers
1467#
1468# CONFIG_FUNCTION_TRACER is not set
1469# CONFIG_SCHED_TRACER is not set
1470# CONFIG_CONTEXT_SWITCH_TRACER is not set
1471# CONFIG_EVENT_TRACER is not set
1472# CONFIG_BOOT_TRACER is not set
1473# CONFIG_TRACE_BRANCH_PROFILING is not set
1474# CONFIG_STACK_TRACER is not set
1475# CONFIG_KMEMTRACE is not set
1476# CONFIG_WORKQUEUE_TRACER is not set
1477# CONFIG_BLK_DEV_IO_TRACE is not set
1478# CONFIG_SAMPLES is not set 1532# CONFIG_SAMPLES is not set
1479CONFIG_HAVE_ARCH_KGDB=y 1533CONFIG_HAVE_ARCH_KGDB=y
1534# CONFIG_PPC_DISABLE_WERROR is not set
1535CONFIG_PPC_WERROR=y
1480CONFIG_PRINT_STACK_DEPTH=64 1536CONFIG_PRINT_STACK_DEPTH=64
1481# CONFIG_IRQSTACKS is not set 1537# CONFIG_IRQSTACKS is not set
1482# CONFIG_BOOTX_TEXT is not set 1538# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig
index c162724fed4..ada595898af 100644
--- a/arch/powerpc/configs/mpc85xx_defconfig
+++ b/arch/powerpc/configs/mpc85xx_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc2 3# Linux kernel version: 2.6.31-rc4
4# Tue Apr 21 15:40:23 2009 4# Wed Jul 29 23:31:55 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12CONFIG_PPC_85xx=y 12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -34,15 +34,16 @@ CONFIG_GENERIC_TIME=y
34CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
35CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
36CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
37# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
38CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
39CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
40CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
41CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
42CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
43CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
44CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
45CONFIG_GENERIC_CALIBRATE_DELAY=y
46CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
47CONFIG_GENERIC_GPIO=y 48CONFIG_GENERIC_GPIO=y
48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 49# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -57,11 +58,13 @@ CONFIG_PPC_UDBG_16550=y
57# CONFIG_GENERIC_TBSYNC is not set 58# CONFIG_GENERIC_TBSYNC is not set
58CONFIG_AUDIT_ARCH=y 59CONFIG_AUDIT_ARCH=y
59CONFIG_GENERIC_BUG=y 60CONFIG_GENERIC_BUG=y
61CONFIG_DTC=y
60CONFIG_DEFAULT_UIMAGE=y 62CONFIG_DEFAULT_UIMAGE=y
61# CONFIG_PPC_DCR_NATIVE is not set 63# CONFIG_PPC_DCR_NATIVE is not set
62# CONFIG_PPC_DCR_MMIO is not set 64# CONFIG_PPC_DCR_MMIO is not set
63CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 65CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
64CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 66CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
67CONFIG_CONSTRUCTORS=y
65 68
66# 69#
67# General setup 70# General setup
@@ -116,7 +119,6 @@ CONFIG_SYSCTL_SYSCALL=y
116CONFIG_KALLSYMS=y 119CONFIG_KALLSYMS=y
117CONFIG_KALLSYMS_ALL=y 120CONFIG_KALLSYMS_ALL=y
118CONFIG_KALLSYMS_EXTRA_PASS=y 121CONFIG_KALLSYMS_EXTRA_PASS=y
119# CONFIG_STRIP_ASM_SYMS is not set
120CONFIG_HOTPLUG=y 122CONFIG_HOTPLUG=y
121CONFIG_PRINTK=y 123CONFIG_PRINTK=y
122CONFIG_BUG=y 124CONFIG_BUG=y
@@ -129,9 +131,16 @@ CONFIG_TIMERFD=y
129CONFIG_EVENTFD=y 131CONFIG_EVENTFD=y
130CONFIG_SHMEM=y 132CONFIG_SHMEM=y
131CONFIG_AIO=y 133CONFIG_AIO=y
134CONFIG_HAVE_PERF_COUNTERS=y
135
136#
137# Performance Counters
138#
139# CONFIG_PERF_COUNTERS is not set
132CONFIG_VM_EVENT_COUNTERS=y 140CONFIG_VM_EVENT_COUNTERS=y
133CONFIG_PCI_QUIRKS=y 141CONFIG_PCI_QUIRKS=y
134CONFIG_SLUB_DEBUG=y 142CONFIG_SLUB_DEBUG=y
143# CONFIG_STRIP_ASM_SYMS is not set
135CONFIG_COMPAT_BRK=y 144CONFIG_COMPAT_BRK=y
136# CONFIG_SLAB is not set 145# CONFIG_SLAB is not set
137CONFIG_SLUB=y 146CONFIG_SLUB=y
@@ -146,6 +155,11 @@ CONFIG_HAVE_KPROBES=y
146CONFIG_HAVE_KRETPROBES=y 155CONFIG_HAVE_KRETPROBES=y
147CONFIG_HAVE_ARCH_TRACEHOOK=y 156CONFIG_HAVE_ARCH_TRACEHOOK=y
148CONFIG_HAVE_CLK=y 157CONFIG_HAVE_CLK=y
158
159#
160# GCOV-based kernel profiling
161#
162# CONFIG_GCOV_KERNEL is not set
149# CONFIG_SLOW_WORK is not set 163# CONFIG_SLOW_WORK is not set
150# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 164# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
151CONFIG_SLABINFO=y 165CONFIG_SLABINFO=y
@@ -158,7 +172,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
158CONFIG_MODVERSIONS=y 172CONFIG_MODVERSIONS=y
159# CONFIG_MODULE_SRCVERSION_ALL is not set 173# CONFIG_MODULE_SRCVERSION_ALL is not set
160CONFIG_BLOCK=y 174CONFIG_BLOCK=y
161CONFIG_LBD=y 175CONFIG_LBDAF=y
162# CONFIG_BLK_DEV_BSG is not set 176# CONFIG_BLK_DEV_BSG is not set
163# CONFIG_BLK_DEV_INTEGRITY is not set 177# CONFIG_BLK_DEV_INTEGRITY is not set
164 178
@@ -191,6 +205,7 @@ CONFIG_MPC8536_DS=y
191CONFIG_MPC85xx_DS=y 205CONFIG_MPC85xx_DS=y
192CONFIG_SOCRATES=y 206CONFIG_SOCRATES=y
193CONFIG_KSI8560=y 207CONFIG_KSI8560=y
208# CONFIG_XES_MPC85xx is not set
194CONFIG_STX_GP3=y 209CONFIG_STX_GP3=y
195CONFIG_TQM8540=y 210CONFIG_TQM8540=y
196CONFIG_TQM8541=y 211CONFIG_TQM8541=y
@@ -241,7 +256,9 @@ CONFIG_BINFMT_ELF=y
241# CONFIG_HAVE_AOUT is not set 256# CONFIG_HAVE_AOUT is not set
242CONFIG_BINFMT_MISC=m 257CONFIG_BINFMT_MISC=m
243CONFIG_MATH_EMULATION=y 258CONFIG_MATH_EMULATION=y
244# CONFIG_IOMMU_HELPER is not set 259CONFIG_IOMMU_HELPER=y
260CONFIG_SWIOTLB=y
261CONFIG_PPC_NEED_DMA_SYNC_OPS=y
245CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 262CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
246CONFIG_ARCH_HAS_WALK_MEMORY=y 263CONFIG_ARCH_HAS_WALK_MEMORY=y
247CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 264CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -260,9 +277,9 @@ CONFIG_MIGRATION=y
260CONFIG_ZONE_DMA_FLAG=1 277CONFIG_ZONE_DMA_FLAG=1
261CONFIG_BOUNCE=y 278CONFIG_BOUNCE=y
262CONFIG_VIRT_TO_BUS=y 279CONFIG_VIRT_TO_BUS=y
263CONFIG_UNEVICTABLE_LRU=y
264CONFIG_HAVE_MLOCK=y 280CONFIG_HAVE_MLOCK=y
265CONFIG_HAVE_MLOCKED_PAGE_BIT=y 281CONFIG_HAVE_MLOCKED_PAGE_BIT=y
282CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
266CONFIG_PPC_4K_PAGES=y 283CONFIG_PPC_4K_PAGES=y
267# CONFIG_PPC_16K_PAGES is not set 284# CONFIG_PPC_16K_PAGES is not set
268# CONFIG_PPC_64K_PAGES is not set 285# CONFIG_PPC_64K_PAGES is not set
@@ -296,7 +313,8 @@ CONFIG_ARCH_SUPPORTS_MSI=y
296# CONFIG_PCI_IOV is not set 313# CONFIG_PCI_IOV is not set
297# CONFIG_PCCARD is not set 314# CONFIG_PCCARD is not set
298# CONFIG_HOTPLUG_PCI is not set 315# CONFIG_HOTPLUG_PCI is not set
299# CONFIG_HAS_RAPIDIO is not set 316CONFIG_HAS_RAPIDIO=y
317# CONFIG_RAPIDIO is not set
300 318
301# 319#
302# Advanced setup 320# Advanced setup
@@ -406,6 +424,7 @@ CONFIG_SCTP_HMAC_MD5=y
406# CONFIG_ECONET is not set 424# CONFIG_ECONET is not set
407# CONFIG_WAN_ROUTER is not set 425# CONFIG_WAN_ROUTER is not set
408# CONFIG_PHONET is not set 426# CONFIG_PHONET is not set
427# CONFIG_IEEE802154 is not set
409# CONFIG_NET_SCHED is not set 428# CONFIG_NET_SCHED is not set
410# CONFIG_DCB is not set 429# CONFIG_DCB is not set
411 430
@@ -424,7 +443,11 @@ CONFIG_WIRELESS=y
424CONFIG_WIRELESS_OLD_REGULATORY=y 443CONFIG_WIRELESS_OLD_REGULATORY=y
425# CONFIG_WIRELESS_EXT is not set 444# CONFIG_WIRELESS_EXT is not set
426# CONFIG_LIB80211 is not set 445# CONFIG_LIB80211 is not set
427# CONFIG_MAC80211 is not set 446
447#
448# CFG80211 needs to be enabled for MAC80211
449#
450CONFIG_MAC80211_DEFAULT_PS_VALUE=0
428# CONFIG_WIMAX is not set 451# CONFIG_WIMAX is not set
429# CONFIG_RFKILL is not set 452# CONFIG_RFKILL is not set
430# CONFIG_NET_9P is not set 453# CONFIG_NET_9P is not set
@@ -450,6 +473,7 @@ CONFIG_EXTRA_FIRMWARE=""
450CONFIG_OF_DEVICE=y 473CONFIG_OF_DEVICE=y
451CONFIG_OF_GPIO=y 474CONFIG_OF_GPIO=y
452CONFIG_OF_I2C=y 475CONFIG_OF_I2C=y
476CONFIG_OF_MDIO=y
453# CONFIG_PARPORT is not set 477# CONFIG_PARPORT is not set
454CONFIG_BLK_DEV=y 478CONFIG_BLK_DEV=y
455# CONFIG_BLK_DEV_FD is not set 479# CONFIG_BLK_DEV_FD is not set
@@ -485,7 +509,9 @@ CONFIG_MISC_DEVICES=y
485# 509#
486# CONFIG_EEPROM_AT24 is not set 510# CONFIG_EEPROM_AT24 is not set
487CONFIG_EEPROM_LEGACY=y 511CONFIG_EEPROM_LEGACY=y
512# CONFIG_EEPROM_MAX6875 is not set
488# CONFIG_EEPROM_93CX6 is not set 513# CONFIG_EEPROM_93CX6 is not set
514# CONFIG_CB710_CORE is not set
489CONFIG_HAVE_IDE=y 515CONFIG_HAVE_IDE=y
490# CONFIG_IDE is not set 516# CONFIG_IDE is not set
491 517
@@ -509,10 +535,6 @@ CONFIG_BLK_DEV_SR=y
509# CONFIG_BLK_DEV_SR_VENDOR is not set 535# CONFIG_BLK_DEV_SR_VENDOR is not set
510CONFIG_CHR_DEV_SG=y 536CONFIG_CHR_DEV_SG=y
511# CONFIG_CHR_DEV_SCH is not set 537# CONFIG_CHR_DEV_SCH is not set
512
513#
514# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
515#
516CONFIG_SCSI_MULTI_LUN=y 538CONFIG_SCSI_MULTI_LUN=y
517# CONFIG_SCSI_CONSTANTS is not set 539# CONFIG_SCSI_CONSTANTS is not set
518CONFIG_SCSI_LOGGING=y 540CONFIG_SCSI_LOGGING=y
@@ -530,6 +552,7 @@ CONFIG_SCSI_WAIT_SCAN=m
530CONFIG_SCSI_LOWLEVEL=y 552CONFIG_SCSI_LOWLEVEL=y
531# CONFIG_ISCSI_TCP is not set 553# CONFIG_ISCSI_TCP is not set
532# CONFIG_SCSI_CXGB3_ISCSI is not set 554# CONFIG_SCSI_CXGB3_ISCSI is not set
555# CONFIG_SCSI_BNX2_ISCSI is not set
533# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 556# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
534# CONFIG_SCSI_3W_9XXX is not set 557# CONFIG_SCSI_3W_9XXX is not set
535# CONFIG_SCSI_ACARD is not set 558# CONFIG_SCSI_ACARD is not set
@@ -538,6 +561,7 @@ CONFIG_SCSI_LOWLEVEL=y
538# CONFIG_SCSI_AIC7XXX_OLD is not set 561# CONFIG_SCSI_AIC7XXX_OLD is not set
539# CONFIG_SCSI_AIC79XX is not set 562# CONFIG_SCSI_AIC79XX is not set
540# CONFIG_SCSI_AIC94XX is not set 563# CONFIG_SCSI_AIC94XX is not set
564# CONFIG_SCSI_MVSAS is not set
541# CONFIG_SCSI_DPT_I2O is not set 565# CONFIG_SCSI_DPT_I2O is not set
542# CONFIG_SCSI_ADVANSYS is not set 566# CONFIG_SCSI_ADVANSYS is not set
543# CONFIG_SCSI_ARCMSR is not set 567# CONFIG_SCSI_ARCMSR is not set
@@ -557,7 +581,6 @@ CONFIG_SCSI_LOWLEVEL=y
557# CONFIG_SCSI_IPS is not set 581# CONFIG_SCSI_IPS is not set
558# CONFIG_SCSI_INITIO is not set 582# CONFIG_SCSI_INITIO is not set
559# CONFIG_SCSI_INIA100 is not set 583# CONFIG_SCSI_INIA100 is not set
560# CONFIG_SCSI_MVSAS is not set
561# CONFIG_SCSI_STEX is not set 584# CONFIG_SCSI_STEX is not set
562# CONFIG_SCSI_SYM53C8XX_2 is not set 585# CONFIG_SCSI_SYM53C8XX_2 is not set
563# CONFIG_SCSI_IPR is not set 586# CONFIG_SCSI_IPR is not set
@@ -641,14 +664,17 @@ CONFIG_PATA_ALI=y
641# 664#
642 665
643# 666#
644# Enable only one of the two stacks, unless you know what you are doing 667# You can enable one or both FireWire driver stacks.
668#
669
670#
671# See the help texts for more information.
645# 672#
646# CONFIG_FIREWIRE is not set 673# CONFIG_FIREWIRE is not set
647# CONFIG_IEEE1394 is not set 674# CONFIG_IEEE1394 is not set
648# CONFIG_I2O is not set 675# CONFIG_I2O is not set
649# CONFIG_MACINTOSH_DRIVERS is not set 676# CONFIG_MACINTOSH_DRIVERS is not set
650CONFIG_NETDEVICES=y 677CONFIG_NETDEVICES=y
651CONFIG_COMPAT_NET_DEV_OPS=y
652CONFIG_DUMMY=y 678CONFIG_DUMMY=y
653# CONFIG_BONDING is not set 679# CONFIG_BONDING is not set
654# CONFIG_MACVLAN is not set 680# CONFIG_MACVLAN is not set
@@ -695,6 +721,7 @@ CONFIG_MII=y
695# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 721# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
696# CONFIG_NET_PCI is not set 722# CONFIG_NET_PCI is not set
697# CONFIG_B44 is not set 723# CONFIG_B44 is not set
724# CONFIG_KS8842 is not set
698# CONFIG_ATL2 is not set 725# CONFIG_ATL2 is not set
699CONFIG_FS_ENET=y 726CONFIG_FS_ENET=y
700CONFIG_FS_ENET_HAS_SCC=y 727CONFIG_FS_ENET_HAS_SCC=y
@@ -718,11 +745,13 @@ CONFIG_NETDEV_1000=y
718# CONFIG_VIA_VELOCITY is not set 745# CONFIG_VIA_VELOCITY is not set
719# CONFIG_TIGON3 is not set 746# CONFIG_TIGON3 is not set
720# CONFIG_BNX2 is not set 747# CONFIG_BNX2 is not set
748# CONFIG_CNIC is not set
721CONFIG_FSL_PQ_MDIO=y 749CONFIG_FSL_PQ_MDIO=y
722CONFIG_GIANFAR=y 750CONFIG_GIANFAR=y
723CONFIG_UCC_GETH=y 751CONFIG_UCC_GETH=y
724# CONFIG_UGETH_MAGIC_PACKET is not set 752# CONFIG_UGETH_MAGIC_PACKET is not set
725# CONFIG_UGETH_TX_ON_DEMAND is not set 753# CONFIG_UGETH_TX_ON_DEMAND is not set
754# CONFIG_MV643XX_ETH is not set
726# CONFIG_QLA3XXX is not set 755# CONFIG_QLA3XXX is not set
727# CONFIG_ATL1 is not set 756# CONFIG_ATL1 is not set
728# CONFIG_ATL1E is not set 757# CONFIG_ATL1E is not set
@@ -897,6 +926,7 @@ CONFIG_I2C_HELPER_AUTO=y
897# I2C system bus drivers (mostly embedded / system-on-chip) 926# I2C system bus drivers (mostly embedded / system-on-chip)
898# 927#
899CONFIG_I2C_CPM=m 928CONFIG_I2C_CPM=m
929# CONFIG_I2C_DESIGNWARE is not set
900# CONFIG_I2C_GPIO is not set 930# CONFIG_I2C_GPIO is not set
901CONFIG_I2C_MPC=y 931CONFIG_I2C_MPC=y
902# CONFIG_I2C_OCORES is not set 932# CONFIG_I2C_OCORES is not set
@@ -927,13 +957,17 @@ CONFIG_I2C_MPC=y
927# CONFIG_SENSORS_PCF8574 is not set 957# CONFIG_SENSORS_PCF8574 is not set
928# CONFIG_PCF8575 is not set 958# CONFIG_PCF8575 is not set
929# CONFIG_SENSORS_PCA9539 is not set 959# CONFIG_SENSORS_PCA9539 is not set
930# CONFIG_SENSORS_MAX6875 is not set
931# CONFIG_SENSORS_TSL2550 is not set 960# CONFIG_SENSORS_TSL2550 is not set
932# CONFIG_I2C_DEBUG_CORE is not set 961# CONFIG_I2C_DEBUG_CORE is not set
933# CONFIG_I2C_DEBUG_ALGO is not set 962# CONFIG_I2C_DEBUG_ALGO is not set
934# CONFIG_I2C_DEBUG_BUS is not set 963# CONFIG_I2C_DEBUG_BUS is not set
935# CONFIG_I2C_DEBUG_CHIP is not set 964# CONFIG_I2C_DEBUG_CHIP is not set
936# CONFIG_SPI is not set 965# CONFIG_SPI is not set
966
967#
968# PPS support
969#
970# CONFIG_PPS is not set
937CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 971CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
938CONFIG_ARCH_REQUIRE_GPIOLIB=y 972CONFIG_ARCH_REQUIRE_GPIOLIB=y
939CONFIG_GPIOLIB=y 973CONFIG_GPIOLIB=y
@@ -987,76 +1021,9 @@ CONFIG_SSB_POSSIBLE=y
987# CONFIG_MFD_WM8400 is not set 1021# CONFIG_MFD_WM8400 is not set
988# CONFIG_MFD_WM8350_I2C is not set 1022# CONFIG_MFD_WM8350_I2C is not set
989# CONFIG_MFD_PCF50633 is not set 1023# CONFIG_MFD_PCF50633 is not set
1024# CONFIG_AB3100_CORE is not set
990# CONFIG_REGULATOR is not set 1025# CONFIG_REGULATOR is not set
991 1026# CONFIG_MEDIA_SUPPORT is not set
992#
993# Multimedia devices
994#
995
996#
997# Multimedia core support
998#
999# CONFIG_VIDEO_DEV is not set
1000CONFIG_DVB_CORE=m
1001CONFIG_VIDEO_MEDIA=m
1002
1003#
1004# Multimedia drivers
1005#
1006# CONFIG_MEDIA_ATTACH is not set
1007CONFIG_MEDIA_TUNER=m
1008# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
1009CONFIG_MEDIA_TUNER_SIMPLE=m
1010CONFIG_MEDIA_TUNER_TDA8290=m
1011CONFIG_MEDIA_TUNER_TDA9887=m
1012CONFIG_MEDIA_TUNER_TEA5761=m
1013CONFIG_MEDIA_TUNER_TEA5767=m
1014CONFIG_MEDIA_TUNER_MT20XX=m
1015CONFIG_MEDIA_TUNER_XC2028=m
1016CONFIG_MEDIA_TUNER_XC5000=m
1017CONFIG_MEDIA_TUNER_MC44S803=m
1018# CONFIG_DVB_DYNAMIC_MINORS is not set
1019CONFIG_DVB_CAPTURE_DRIVERS=y
1020
1021#
1022# Supported SAA7146 based PCI Adapters
1023#
1024# CONFIG_TTPCI_EEPROM is not set
1025# CONFIG_DVB_BUDGET_CORE is not set
1026
1027#
1028# Supported USB Adapters
1029#
1030# CONFIG_DVB_USB is not set
1031# CONFIG_DVB_TTUSB_BUDGET is not set
1032# CONFIG_DVB_TTUSB_DEC is not set
1033# CONFIG_DVB_SIANO_SMS1XXX is not set
1034
1035#
1036# Supported FlexCopII (B2C2) Adapters
1037#
1038# CONFIG_DVB_B2C2_FLEXCOP is not set
1039
1040#
1041# Supported BT878 Adapters
1042#
1043
1044#
1045# Supported Pluto2 Adapters
1046#
1047# CONFIG_DVB_PLUTO2 is not set
1048
1049#
1050# Supported SDMC DM1105 Adapters
1051#
1052# CONFIG_DVB_DM1105 is not set
1053
1054#
1055# Supported DVB Frontends
1056#
1057# CONFIG_DVB_FE_CUSTOMISE is not set
1058CONFIG_DAB=y
1059# CONFIG_USB_DABUSB is not set
1060 1027
1061# 1028#
1062# Graphics support 1029# Graphics support
@@ -1096,6 +1063,11 @@ CONFIG_SND_VERBOSE_PROCFS=y
1096# CONFIG_SND_VERBOSE_PRINTK is not set 1063# CONFIG_SND_VERBOSE_PRINTK is not set
1097# CONFIG_SND_DEBUG is not set 1064# CONFIG_SND_DEBUG is not set
1098CONFIG_SND_VMASTER=y 1065CONFIG_SND_VMASTER=y
1066# CONFIG_SND_RAWMIDI_SEQ is not set
1067# CONFIG_SND_OPL3_LIB_SEQ is not set
1068# CONFIG_SND_OPL4_LIB_SEQ is not set
1069# CONFIG_SND_SBAWE_SEQ is not set
1070# CONFIG_SND_EMU10K1_SEQ is not set
1099CONFIG_SND_AC97_CODEC=y 1071CONFIG_SND_AC97_CODEC=y
1100CONFIG_SND_DRIVERS=y 1072CONFIG_SND_DRIVERS=y
1101# CONFIG_SND_DUMMY is not set 1073# CONFIG_SND_DUMMY is not set
@@ -1122,6 +1094,7 @@ CONFIG_SND_PCI=y
1122# CONFIG_SND_CS4281 is not set 1094# CONFIG_SND_CS4281 is not set
1123# CONFIG_SND_CS46XX is not set 1095# CONFIG_SND_CS46XX is not set
1124# CONFIG_SND_CS5530 is not set 1096# CONFIG_SND_CS5530 is not set
1097# CONFIG_SND_CTXFI is not set
1125# CONFIG_SND_DARLA20 is not set 1098# CONFIG_SND_DARLA20 is not set
1126# CONFIG_SND_GINA20 is not set 1099# CONFIG_SND_GINA20 is not set
1127# CONFIG_SND_LAYLA20 is not set 1100# CONFIG_SND_LAYLA20 is not set
@@ -1152,6 +1125,7 @@ CONFIG_SND_PCI=y
1152CONFIG_SND_INTEL8X0=y 1125CONFIG_SND_INTEL8X0=y
1153# CONFIG_SND_INTEL8X0M is not set 1126# CONFIG_SND_INTEL8X0M is not set
1154# CONFIG_SND_KORG1212 is not set 1127# CONFIG_SND_KORG1212 is not set
1128# CONFIG_SND_LX6464ES is not set
1155# CONFIG_SND_MAESTRO3 is not set 1129# CONFIG_SND_MAESTRO3 is not set
1156# CONFIG_SND_MIXART is not set 1130# CONFIG_SND_MIXART is not set
1157# CONFIG_SND_NM256 is not set 1131# CONFIG_SND_NM256 is not set
@@ -1196,7 +1170,7 @@ CONFIG_HID_BELKIN=y
1196CONFIG_HID_CHERRY=y 1170CONFIG_HID_CHERRY=y
1197CONFIG_HID_CHICONY=y 1171CONFIG_HID_CHICONY=y
1198CONFIG_HID_CYPRESS=y 1172CONFIG_HID_CYPRESS=y
1199# CONFIG_DRAGONRISE_FF is not set 1173# CONFIG_HID_DRAGONRISE is not set
1200CONFIG_HID_EZKEY=y 1174CONFIG_HID_EZKEY=y
1201# CONFIG_HID_KYE is not set 1175# CONFIG_HID_KYE is not set
1202CONFIG_HID_GYRATION=y 1176CONFIG_HID_GYRATION=y
@@ -1213,10 +1187,11 @@ CONFIG_HID_PETALYNX=y
1213CONFIG_HID_SAMSUNG=y 1187CONFIG_HID_SAMSUNG=y
1214CONFIG_HID_SONY=y 1188CONFIG_HID_SONY=y
1215CONFIG_HID_SUNPLUS=y 1189CONFIG_HID_SUNPLUS=y
1216# CONFIG_GREENASIA_FF is not set 1190# CONFIG_HID_GREENASIA is not set
1191# CONFIG_HID_SMARTJOYPLUS is not set
1217# CONFIG_HID_TOPSEED is not set 1192# CONFIG_HID_TOPSEED is not set
1218CONFIG_THRUSTMASTER_FF=m 1193# CONFIG_HID_THRUSTMASTER is not set
1219CONFIG_ZEROPLUS_FF=m 1194# CONFIG_HID_ZEROPLUS is not set
1220CONFIG_USB_SUPPORT=y 1195CONFIG_USB_SUPPORT=y
1221CONFIG_USB_ARCH_HAS_HCD=y 1196CONFIG_USB_ARCH_HAS_HCD=y
1222CONFIG_USB_ARCH_HAS_OHCI=y 1197CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1242,6 +1217,7 @@ CONFIG_USB_MON=y
1242# USB Host Controller Drivers 1217# USB Host Controller Drivers
1243# 1218#
1244# CONFIG_USB_C67X00_HCD is not set 1219# CONFIG_USB_C67X00_HCD is not set
1220# CONFIG_USB_XHCI_HCD is not set
1245CONFIG_USB_EHCI_HCD=y 1221CONFIG_USB_EHCI_HCD=y
1246CONFIG_USB_EHCI_ROOT_HUB_TT=y 1222CONFIG_USB_EHCI_ROOT_HUB_TT=y
1247# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1223# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1251,9 +1227,9 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y
1251# CONFIG_USB_ISP116X_HCD is not set 1227# CONFIG_USB_ISP116X_HCD is not set
1252# CONFIG_USB_ISP1760_HCD is not set 1228# CONFIG_USB_ISP1760_HCD is not set
1253CONFIG_USB_OHCI_HCD=y 1229CONFIG_USB_OHCI_HCD=y
1254CONFIG_USB_OHCI_HCD_PPC_OF=y
1255CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1230CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1256CONFIG_USB_OHCI_HCD_PPC_OF_LE=y 1231CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
1232CONFIG_USB_OHCI_HCD_PPC_OF=y
1257CONFIG_USB_OHCI_HCD_PCI=y 1233CONFIG_USB_OHCI_HCD_PCI=y
1258CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y 1234CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1259CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y 1235CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
@@ -1352,8 +1328,6 @@ CONFIG_EDAC=y
1352# CONFIG_EDAC_DEBUG is not set 1328# CONFIG_EDAC_DEBUG is not set
1353CONFIG_EDAC_MM_EDAC=y 1329CONFIG_EDAC_MM_EDAC=y
1354CONFIG_EDAC_MPC85XX=y 1330CONFIG_EDAC_MPC85XX=y
1355# CONFIG_EDAC_AMD8131 is not set
1356# CONFIG_EDAC_AMD8111 is not set
1357CONFIG_RTC_LIB=y 1331CONFIG_RTC_LIB=y
1358CONFIG_RTC_CLASS=y 1332CONFIG_RTC_CLASS=y
1359CONFIG_RTC_HCTOSYS=y 1333CONFIG_RTC_HCTOSYS=y
@@ -1385,6 +1359,7 @@ CONFIG_RTC_INTF_DEV=y
1385# CONFIG_RTC_DRV_S35390A is not set 1359# CONFIG_RTC_DRV_S35390A is not set
1386# CONFIG_RTC_DRV_FM3130 is not set 1360# CONFIG_RTC_DRV_FM3130 is not set
1387# CONFIG_RTC_DRV_RX8581 is not set 1361# CONFIG_RTC_DRV_RX8581 is not set
1362# CONFIG_RTC_DRV_RX8025 is not set
1388 1363
1389# 1364#
1390# SPI RTC drivers 1365# SPI RTC drivers
@@ -1425,6 +1400,10 @@ CONFIG_DMA_ENGINE=y
1425# CONFIG_DMATEST is not set 1400# CONFIG_DMATEST is not set
1426# CONFIG_AUXDISPLAY is not set 1401# CONFIG_AUXDISPLAY is not set
1427# CONFIG_UIO is not set 1402# CONFIG_UIO is not set
1403
1404#
1405# TI VLYNQ
1406#
1428# CONFIG_STAGING is not set 1407# CONFIG_STAGING is not set
1429 1408
1430# 1409#
@@ -1445,11 +1424,12 @@ CONFIG_FS_MBCACHE=y
1445# CONFIG_REISERFS_FS is not set 1424# CONFIG_REISERFS_FS is not set
1446# CONFIG_JFS_FS is not set 1425# CONFIG_JFS_FS is not set
1447# CONFIG_FS_POSIX_ACL is not set 1426# CONFIG_FS_POSIX_ACL is not set
1448CONFIG_FILE_LOCKING=y
1449# CONFIG_XFS_FS is not set 1427# CONFIG_XFS_FS is not set
1450# CONFIG_GFS2_FS is not set 1428# CONFIG_GFS2_FS is not set
1451# CONFIG_OCFS2_FS is not set 1429# CONFIG_OCFS2_FS is not set
1452# CONFIG_BTRFS_FS is not set 1430# CONFIG_BTRFS_FS is not set
1431CONFIG_FILE_LOCKING=y
1432CONFIG_FSNOTIFY=y
1453CONFIG_DNOTIFY=y 1433CONFIG_DNOTIFY=y
1454CONFIG_INOTIFY=y 1434CONFIG_INOTIFY=y
1455CONFIG_INOTIFY_USER=y 1435CONFIG_INOTIFY_USER=y
@@ -1524,6 +1504,7 @@ CONFIG_NFS_FS=y
1524CONFIG_NFS_V3=y 1504CONFIG_NFS_V3=y
1525# CONFIG_NFS_V3_ACL is not set 1505# CONFIG_NFS_V3_ACL is not set
1526CONFIG_NFS_V4=y 1506CONFIG_NFS_V4=y
1507# CONFIG_NFS_V4_1 is not set
1527CONFIG_ROOT_NFS=y 1508CONFIG_ROOT_NFS=y
1528CONFIG_NFSD=y 1509CONFIG_NFSD=y
1529# CONFIG_NFSD_V3 is not set 1510# CONFIG_NFSD_V3 is not set
@@ -1628,6 +1609,7 @@ CONFIG_HAS_IOPORT=y
1628CONFIG_HAS_DMA=y 1609CONFIG_HAS_DMA=y
1629CONFIG_HAVE_LMB=y 1610CONFIG_HAVE_LMB=y
1630CONFIG_NLATTR=y 1611CONFIG_NLATTR=y
1612CONFIG_GENERIC_ATOMIC64=y
1631 1613
1632# 1614#
1633# Kernel hacking 1615# Kernel hacking
@@ -1658,6 +1640,9 @@ CONFIG_SCHED_DEBUG=y
1658# CONFIG_RT_MUTEX_TESTER is not set 1640# CONFIG_RT_MUTEX_TESTER is not set
1659# CONFIG_DEBUG_SPINLOCK is not set 1641# CONFIG_DEBUG_SPINLOCK is not set
1660# CONFIG_DEBUG_MUTEXES is not set 1642# CONFIG_DEBUG_MUTEXES is not set
1643# CONFIG_DEBUG_LOCK_ALLOC is not set
1644# CONFIG_PROVE_LOCKING is not set
1645# CONFIG_LOCK_STAT is not set
1661# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1646# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1662# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1647# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1663# CONFIG_DEBUG_KOBJECT is not set 1648# CONFIG_DEBUG_KOBJECT is not set
@@ -1670,7 +1655,6 @@ CONFIG_DEBUG_INFO=y
1670# CONFIG_DEBUG_LIST is not set 1655# CONFIG_DEBUG_LIST is not set
1671# CONFIG_DEBUG_SG is not set 1656# CONFIG_DEBUG_SG is not set
1672# CONFIG_DEBUG_NOTIFIERS is not set 1657# CONFIG_DEBUG_NOTIFIERS is not set
1673# CONFIG_BOOT_PRINTK_DELAY is not set
1674# CONFIG_RCU_TORTURE_TEST is not set 1658# CONFIG_RCU_TORTURE_TEST is not set
1675# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1659# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1676# CONFIG_BACKTRACE_SELF_TEST is not set 1660# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1684,16 +1668,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1684CONFIG_HAVE_DYNAMIC_FTRACE=y 1668CONFIG_HAVE_DYNAMIC_FTRACE=y
1685CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1669CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1686CONFIG_TRACING_SUPPORT=y 1670CONFIG_TRACING_SUPPORT=y
1687 1671CONFIG_FTRACE=y
1688#
1689# Tracers
1690#
1691# CONFIG_FUNCTION_TRACER is not set 1672# CONFIG_FUNCTION_TRACER is not set
1673# CONFIG_IRQSOFF_TRACER is not set
1692# CONFIG_SCHED_TRACER is not set 1674# CONFIG_SCHED_TRACER is not set
1693# CONFIG_CONTEXT_SWITCH_TRACER is not set 1675# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1694# CONFIG_EVENT_TRACER is not set
1695# CONFIG_BOOT_TRACER is not set 1676# CONFIG_BOOT_TRACER is not set
1696# CONFIG_TRACE_BRANCH_PROFILING is not set 1677CONFIG_BRANCH_PROFILE_NONE=y
1678# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1679# CONFIG_PROFILE_ALL_BRANCHES is not set
1697# CONFIG_STACK_TRACER is not set 1680# CONFIG_STACK_TRACER is not set
1698# CONFIG_KMEMTRACE is not set 1681# CONFIG_KMEMTRACE is not set
1699# CONFIG_WORKQUEUE_TRACER is not set 1682# CONFIG_WORKQUEUE_TRACER is not set
@@ -1702,9 +1685,13 @@ CONFIG_TRACING_SUPPORT=y
1702# CONFIG_SAMPLES is not set 1685# CONFIG_SAMPLES is not set
1703CONFIG_HAVE_ARCH_KGDB=y 1686CONFIG_HAVE_ARCH_KGDB=y
1704# CONFIG_KGDB is not set 1687# CONFIG_KGDB is not set
1688# CONFIG_KMEMCHECK is not set
1689# CONFIG_PPC_DISABLE_WERROR is not set
1690CONFIG_PPC_WERROR=y
1705CONFIG_PRINT_STACK_DEPTH=64 1691CONFIG_PRINT_STACK_DEPTH=64
1706# CONFIG_DEBUG_STACKOVERFLOW is not set 1692# CONFIG_DEBUG_STACKOVERFLOW is not set
1707# CONFIG_DEBUG_STACK_USAGE is not set 1693# CONFIG_DEBUG_STACK_USAGE is not set
1694# CONFIG_PPC_EMULATED_STATS is not set
1708# CONFIG_CODE_PATCHING_SELFTEST is not set 1695# CONFIG_CODE_PATCHING_SELFTEST is not set
1709# CONFIG_FTR_FIXUP_SELFTEST is not set 1696# CONFIG_FTR_FIXUP_SELFTEST is not set
1710# CONFIG_MSI_BITMAP_SELFTEST is not set 1697# CONFIG_MSI_BITMAP_SELFTEST is not set
diff --git a/arch/powerpc/configs/mpc85xx_smp_defconfig b/arch/powerpc/configs/mpc85xx_smp_defconfig
index 1aa1c508d60..db082ce5a1c 100644
--- a/arch/powerpc/configs/mpc85xx_smp_defconfig
+++ b/arch/powerpc/configs/mpc85xx_smp_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc2 3# Linux kernel version: 2.6.31-rc4
4# Tue Apr 21 15:41:18 2009 4# Wed Jul 29 23:31:56 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12CONFIG_PPC_85xx=y 12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -35,15 +35,16 @@ CONFIG_GENERIC_TIME=y
35CONFIG_GENERIC_TIME_VSYSCALL=y 35CONFIG_GENERIC_TIME_VSYSCALL=y
36CONFIG_GENERIC_CLOCKEVENTS=y 36CONFIG_GENERIC_CLOCKEVENTS=y
37CONFIG_GENERIC_HARDIRQS=y 37CONFIG_GENERIC_HARDIRQS=y
38CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 39# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
39CONFIG_IRQ_PER_CPU=y 40CONFIG_IRQ_PER_CPU=y
40CONFIG_STACKTRACE_SUPPORT=y 41CONFIG_STACKTRACE_SUPPORT=y
41CONFIG_HAVE_LATENCYTOP_SUPPORT=y 42CONFIG_HAVE_LATENCYTOP_SUPPORT=y
43CONFIG_TRACE_IRQFLAGS_SUPPORT=y
42CONFIG_LOCKDEP_SUPPORT=y 44CONFIG_LOCKDEP_SUPPORT=y
43CONFIG_RWSEM_XCHGADD_ALGORITHM=y 45CONFIG_RWSEM_XCHGADD_ALGORITHM=y
44CONFIG_ARCH_HAS_ILOG2_U32=y 46CONFIG_ARCH_HAS_ILOG2_U32=y
45CONFIG_GENERIC_HWEIGHT=y 47CONFIG_GENERIC_HWEIGHT=y
46CONFIG_GENERIC_CALIBRATE_DELAY=y
47CONFIG_GENERIC_FIND_NEXT_BIT=y 48CONFIG_GENERIC_FIND_NEXT_BIT=y
48CONFIG_GENERIC_GPIO=y 49CONFIG_GENERIC_GPIO=y
49# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 50# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -58,11 +59,13 @@ CONFIG_PPC_UDBG_16550=y
58CONFIG_GENERIC_TBSYNC=y 59CONFIG_GENERIC_TBSYNC=y
59CONFIG_AUDIT_ARCH=y 60CONFIG_AUDIT_ARCH=y
60CONFIG_GENERIC_BUG=y 61CONFIG_GENERIC_BUG=y
62CONFIG_DTC=y
61CONFIG_DEFAULT_UIMAGE=y 63CONFIG_DEFAULT_UIMAGE=y
62# CONFIG_PPC_DCR_NATIVE is not set 64# CONFIG_PPC_DCR_NATIVE is not set
63# CONFIG_PPC_DCR_MMIO is not set 65# CONFIG_PPC_DCR_MMIO is not set
64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 66CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 67CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
68CONFIG_CONSTRUCTORS=y
66 69
67# 70#
68# General setup 71# General setup
@@ -117,7 +120,6 @@ CONFIG_SYSCTL_SYSCALL=y
117CONFIG_KALLSYMS=y 120CONFIG_KALLSYMS=y
118CONFIG_KALLSYMS_ALL=y 121CONFIG_KALLSYMS_ALL=y
119CONFIG_KALLSYMS_EXTRA_PASS=y 122CONFIG_KALLSYMS_EXTRA_PASS=y
120# CONFIG_STRIP_ASM_SYMS is not set
121CONFIG_HOTPLUG=y 123CONFIG_HOTPLUG=y
122CONFIG_PRINTK=y 124CONFIG_PRINTK=y
123CONFIG_BUG=y 125CONFIG_BUG=y
@@ -130,9 +132,16 @@ CONFIG_TIMERFD=y
130CONFIG_EVENTFD=y 132CONFIG_EVENTFD=y
131CONFIG_SHMEM=y 133CONFIG_SHMEM=y
132CONFIG_AIO=y 134CONFIG_AIO=y
135CONFIG_HAVE_PERF_COUNTERS=y
136
137#
138# Performance Counters
139#
140# CONFIG_PERF_COUNTERS is not set
133CONFIG_VM_EVENT_COUNTERS=y 141CONFIG_VM_EVENT_COUNTERS=y
134CONFIG_PCI_QUIRKS=y 142CONFIG_PCI_QUIRKS=y
135CONFIG_SLUB_DEBUG=y 143CONFIG_SLUB_DEBUG=y
144# CONFIG_STRIP_ASM_SYMS is not set
136CONFIG_COMPAT_BRK=y 145CONFIG_COMPAT_BRK=y
137# CONFIG_SLAB is not set 146# CONFIG_SLAB is not set
138CONFIG_SLUB=y 147CONFIG_SLUB=y
@@ -148,6 +157,11 @@ CONFIG_HAVE_KRETPROBES=y
148CONFIG_HAVE_ARCH_TRACEHOOK=y 157CONFIG_HAVE_ARCH_TRACEHOOK=y
149CONFIG_USE_GENERIC_SMP_HELPERS=y 158CONFIG_USE_GENERIC_SMP_HELPERS=y
150CONFIG_HAVE_CLK=y 159CONFIG_HAVE_CLK=y
160
161#
162# GCOV-based kernel profiling
163#
164# CONFIG_GCOV_KERNEL is not set
151# CONFIG_SLOW_WORK is not set 165# CONFIG_SLOW_WORK is not set
152# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 166# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
153CONFIG_SLABINFO=y 167CONFIG_SLABINFO=y
@@ -161,7 +175,7 @@ CONFIG_MODVERSIONS=y
161# CONFIG_MODULE_SRCVERSION_ALL is not set 175# CONFIG_MODULE_SRCVERSION_ALL is not set
162CONFIG_STOP_MACHINE=y 176CONFIG_STOP_MACHINE=y
163CONFIG_BLOCK=y 177CONFIG_BLOCK=y
164CONFIG_LBD=y 178CONFIG_LBDAF=y
165# CONFIG_BLK_DEV_BSG is not set 179# CONFIG_BLK_DEV_BSG is not set
166# CONFIG_BLK_DEV_INTEGRITY is not set 180# CONFIG_BLK_DEV_INTEGRITY is not set
167 181
@@ -194,6 +208,7 @@ CONFIG_MPC8536_DS=y
194CONFIG_MPC85xx_DS=y 208CONFIG_MPC85xx_DS=y
195CONFIG_SOCRATES=y 209CONFIG_SOCRATES=y
196CONFIG_KSI8560=y 210CONFIG_KSI8560=y
211# CONFIG_XES_MPC85xx is not set
197CONFIG_STX_GP3=y 212CONFIG_STX_GP3=y
198CONFIG_TQM8540=y 213CONFIG_TQM8540=y
199CONFIG_TQM8541=y 214CONFIG_TQM8541=y
@@ -244,7 +259,9 @@ CONFIG_BINFMT_ELF=y
244# CONFIG_HAVE_AOUT is not set 259# CONFIG_HAVE_AOUT is not set
245CONFIG_BINFMT_MISC=m 260CONFIG_BINFMT_MISC=m
246CONFIG_MATH_EMULATION=y 261CONFIG_MATH_EMULATION=y
247# CONFIG_IOMMU_HELPER is not set 262CONFIG_IOMMU_HELPER=y
263CONFIG_SWIOTLB=y
264CONFIG_PPC_NEED_DMA_SYNC_OPS=y
248CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 265CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
249CONFIG_ARCH_HAS_WALK_MEMORY=y 266CONFIG_ARCH_HAS_WALK_MEMORY=y
250CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 267CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -264,9 +281,9 @@ CONFIG_MIGRATION=y
264CONFIG_ZONE_DMA_FLAG=1 281CONFIG_ZONE_DMA_FLAG=1
265CONFIG_BOUNCE=y 282CONFIG_BOUNCE=y
266CONFIG_VIRT_TO_BUS=y 283CONFIG_VIRT_TO_BUS=y
267CONFIG_UNEVICTABLE_LRU=y
268CONFIG_HAVE_MLOCK=y 284CONFIG_HAVE_MLOCK=y
269CONFIG_HAVE_MLOCKED_PAGE_BIT=y 285CONFIG_HAVE_MLOCKED_PAGE_BIT=y
286CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
270CONFIG_PPC_4K_PAGES=y 287CONFIG_PPC_4K_PAGES=y
271# CONFIG_PPC_16K_PAGES is not set 288# CONFIG_PPC_16K_PAGES is not set
272# CONFIG_PPC_64K_PAGES is not set 289# CONFIG_PPC_64K_PAGES is not set
@@ -300,7 +317,8 @@ CONFIG_ARCH_SUPPORTS_MSI=y
300# CONFIG_PCI_IOV is not set 317# CONFIG_PCI_IOV is not set
301# CONFIG_PCCARD is not set 318# CONFIG_PCCARD is not set
302# CONFIG_HOTPLUG_PCI is not set 319# CONFIG_HOTPLUG_PCI is not set
303# CONFIG_HAS_RAPIDIO is not set 320CONFIG_HAS_RAPIDIO=y
321# CONFIG_RAPIDIO is not set
304 322
305# 323#
306# Advanced setup 324# Advanced setup
@@ -410,6 +428,7 @@ CONFIG_SCTP_HMAC_MD5=y
410# CONFIG_ECONET is not set 428# CONFIG_ECONET is not set
411# CONFIG_WAN_ROUTER is not set 429# CONFIG_WAN_ROUTER is not set
412# CONFIG_PHONET is not set 430# CONFIG_PHONET is not set
431# CONFIG_IEEE802154 is not set
413# CONFIG_NET_SCHED is not set 432# CONFIG_NET_SCHED is not set
414# CONFIG_DCB is not set 433# CONFIG_DCB is not set
415 434
@@ -428,7 +447,11 @@ CONFIG_WIRELESS=y
428CONFIG_WIRELESS_OLD_REGULATORY=y 447CONFIG_WIRELESS_OLD_REGULATORY=y
429# CONFIG_WIRELESS_EXT is not set 448# CONFIG_WIRELESS_EXT is not set
430# CONFIG_LIB80211 is not set 449# CONFIG_LIB80211 is not set
431# CONFIG_MAC80211 is not set 450
451#
452# CFG80211 needs to be enabled for MAC80211
453#
454CONFIG_MAC80211_DEFAULT_PS_VALUE=0
432# CONFIG_WIMAX is not set 455# CONFIG_WIMAX is not set
433# CONFIG_RFKILL is not set 456# CONFIG_RFKILL is not set
434# CONFIG_NET_9P is not set 457# CONFIG_NET_9P is not set
@@ -454,6 +477,7 @@ CONFIG_EXTRA_FIRMWARE=""
454CONFIG_OF_DEVICE=y 477CONFIG_OF_DEVICE=y
455CONFIG_OF_GPIO=y 478CONFIG_OF_GPIO=y
456CONFIG_OF_I2C=y 479CONFIG_OF_I2C=y
480CONFIG_OF_MDIO=y
457# CONFIG_PARPORT is not set 481# CONFIG_PARPORT is not set
458CONFIG_BLK_DEV=y 482CONFIG_BLK_DEV=y
459# CONFIG_BLK_DEV_FD is not set 483# CONFIG_BLK_DEV_FD is not set
@@ -489,7 +513,9 @@ CONFIG_MISC_DEVICES=y
489# 513#
490# CONFIG_EEPROM_AT24 is not set 514# CONFIG_EEPROM_AT24 is not set
491CONFIG_EEPROM_LEGACY=y 515CONFIG_EEPROM_LEGACY=y
516# CONFIG_EEPROM_MAX6875 is not set
492# CONFIG_EEPROM_93CX6 is not set 517# CONFIG_EEPROM_93CX6 is not set
518# CONFIG_CB710_CORE is not set
493CONFIG_HAVE_IDE=y 519CONFIG_HAVE_IDE=y
494# CONFIG_IDE is not set 520# CONFIG_IDE is not set
495 521
@@ -513,10 +539,6 @@ CONFIG_BLK_DEV_SR=y
513# CONFIG_BLK_DEV_SR_VENDOR is not set 539# CONFIG_BLK_DEV_SR_VENDOR is not set
514CONFIG_CHR_DEV_SG=y 540CONFIG_CHR_DEV_SG=y
515# CONFIG_CHR_DEV_SCH is not set 541# CONFIG_CHR_DEV_SCH is not set
516
517#
518# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
519#
520CONFIG_SCSI_MULTI_LUN=y 542CONFIG_SCSI_MULTI_LUN=y
521# CONFIG_SCSI_CONSTANTS is not set 543# CONFIG_SCSI_CONSTANTS is not set
522CONFIG_SCSI_LOGGING=y 544CONFIG_SCSI_LOGGING=y
@@ -534,6 +556,7 @@ CONFIG_SCSI_WAIT_SCAN=m
534CONFIG_SCSI_LOWLEVEL=y 556CONFIG_SCSI_LOWLEVEL=y
535# CONFIG_ISCSI_TCP is not set 557# CONFIG_ISCSI_TCP is not set
536# CONFIG_SCSI_CXGB3_ISCSI is not set 558# CONFIG_SCSI_CXGB3_ISCSI is not set
559# CONFIG_SCSI_BNX2_ISCSI is not set
537# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 560# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
538# CONFIG_SCSI_3W_9XXX is not set 561# CONFIG_SCSI_3W_9XXX is not set
539# CONFIG_SCSI_ACARD is not set 562# CONFIG_SCSI_ACARD is not set
@@ -542,6 +565,7 @@ CONFIG_SCSI_LOWLEVEL=y
542# CONFIG_SCSI_AIC7XXX_OLD is not set 565# CONFIG_SCSI_AIC7XXX_OLD is not set
543# CONFIG_SCSI_AIC79XX is not set 566# CONFIG_SCSI_AIC79XX is not set
544# CONFIG_SCSI_AIC94XX is not set 567# CONFIG_SCSI_AIC94XX is not set
568# CONFIG_SCSI_MVSAS is not set
545# CONFIG_SCSI_DPT_I2O is not set 569# CONFIG_SCSI_DPT_I2O is not set
546# CONFIG_SCSI_ADVANSYS is not set 570# CONFIG_SCSI_ADVANSYS is not set
547# CONFIG_SCSI_ARCMSR is not set 571# CONFIG_SCSI_ARCMSR is not set
@@ -561,7 +585,6 @@ CONFIG_SCSI_LOWLEVEL=y
561# CONFIG_SCSI_IPS is not set 585# CONFIG_SCSI_IPS is not set
562# CONFIG_SCSI_INITIO is not set 586# CONFIG_SCSI_INITIO is not set
563# CONFIG_SCSI_INIA100 is not set 587# CONFIG_SCSI_INIA100 is not set
564# CONFIG_SCSI_MVSAS is not set
565# CONFIG_SCSI_STEX is not set 588# CONFIG_SCSI_STEX is not set
566# CONFIG_SCSI_SYM53C8XX_2 is not set 589# CONFIG_SCSI_SYM53C8XX_2 is not set
567# CONFIG_SCSI_IPR is not set 590# CONFIG_SCSI_IPR is not set
@@ -645,14 +668,17 @@ CONFIG_PATA_ALI=y
645# 668#
646 669
647# 670#
648# Enable only one of the two stacks, unless you know what you are doing 671# You can enable one or both FireWire driver stacks.
672#
673
674#
675# See the help texts for more information.
649# 676#
650# CONFIG_FIREWIRE is not set 677# CONFIG_FIREWIRE is not set
651# CONFIG_IEEE1394 is not set 678# CONFIG_IEEE1394 is not set
652# CONFIG_I2O is not set 679# CONFIG_I2O is not set
653# CONFIG_MACINTOSH_DRIVERS is not set 680# CONFIG_MACINTOSH_DRIVERS is not set
654CONFIG_NETDEVICES=y 681CONFIG_NETDEVICES=y
655CONFIG_COMPAT_NET_DEV_OPS=y
656CONFIG_DUMMY=y 682CONFIG_DUMMY=y
657# CONFIG_BONDING is not set 683# CONFIG_BONDING is not set
658# CONFIG_MACVLAN is not set 684# CONFIG_MACVLAN is not set
@@ -699,6 +725,7 @@ CONFIG_MII=y
699# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 725# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
700# CONFIG_NET_PCI is not set 726# CONFIG_NET_PCI is not set
701# CONFIG_B44 is not set 727# CONFIG_B44 is not set
728# CONFIG_KS8842 is not set
702# CONFIG_ATL2 is not set 729# CONFIG_ATL2 is not set
703CONFIG_FS_ENET=y 730CONFIG_FS_ENET=y
704CONFIG_FS_ENET_HAS_SCC=y 731CONFIG_FS_ENET_HAS_SCC=y
@@ -722,11 +749,13 @@ CONFIG_NETDEV_1000=y
722# CONFIG_VIA_VELOCITY is not set 749# CONFIG_VIA_VELOCITY is not set
723# CONFIG_TIGON3 is not set 750# CONFIG_TIGON3 is not set
724# CONFIG_BNX2 is not set 751# CONFIG_BNX2 is not set
752# CONFIG_CNIC is not set
725CONFIG_FSL_PQ_MDIO=y 753CONFIG_FSL_PQ_MDIO=y
726CONFIG_GIANFAR=y 754CONFIG_GIANFAR=y
727CONFIG_UCC_GETH=y 755CONFIG_UCC_GETH=y
728# CONFIG_UGETH_MAGIC_PACKET is not set 756# CONFIG_UGETH_MAGIC_PACKET is not set
729# CONFIG_UGETH_TX_ON_DEMAND is not set 757# CONFIG_UGETH_TX_ON_DEMAND is not set
758# CONFIG_MV643XX_ETH is not set
730# CONFIG_QLA3XXX is not set 759# CONFIG_QLA3XXX is not set
731# CONFIG_ATL1 is not set 760# CONFIG_ATL1 is not set
732# CONFIG_ATL1E is not set 761# CONFIG_ATL1E is not set
@@ -901,6 +930,7 @@ CONFIG_I2C_HELPER_AUTO=y
901# I2C system bus drivers (mostly embedded / system-on-chip) 930# I2C system bus drivers (mostly embedded / system-on-chip)
902# 931#
903CONFIG_I2C_CPM=m 932CONFIG_I2C_CPM=m
933# CONFIG_I2C_DESIGNWARE is not set
904# CONFIG_I2C_GPIO is not set 934# CONFIG_I2C_GPIO is not set
905CONFIG_I2C_MPC=y 935CONFIG_I2C_MPC=y
906# CONFIG_I2C_OCORES is not set 936# CONFIG_I2C_OCORES is not set
@@ -931,13 +961,17 @@ CONFIG_I2C_MPC=y
931# CONFIG_SENSORS_PCF8574 is not set 961# CONFIG_SENSORS_PCF8574 is not set
932# CONFIG_PCF8575 is not set 962# CONFIG_PCF8575 is not set
933# CONFIG_SENSORS_PCA9539 is not set 963# CONFIG_SENSORS_PCA9539 is not set
934# CONFIG_SENSORS_MAX6875 is not set
935# CONFIG_SENSORS_TSL2550 is not set 964# CONFIG_SENSORS_TSL2550 is not set
936# CONFIG_I2C_DEBUG_CORE is not set 965# CONFIG_I2C_DEBUG_CORE is not set
937# CONFIG_I2C_DEBUG_ALGO is not set 966# CONFIG_I2C_DEBUG_ALGO is not set
938# CONFIG_I2C_DEBUG_BUS is not set 967# CONFIG_I2C_DEBUG_BUS is not set
939# CONFIG_I2C_DEBUG_CHIP is not set 968# CONFIG_I2C_DEBUG_CHIP is not set
940# CONFIG_SPI is not set 969# CONFIG_SPI is not set
970
971#
972# PPS support
973#
974# CONFIG_PPS is not set
941CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 975CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
942CONFIG_ARCH_REQUIRE_GPIOLIB=y 976CONFIG_ARCH_REQUIRE_GPIOLIB=y
943CONFIG_GPIOLIB=y 977CONFIG_GPIOLIB=y
@@ -991,76 +1025,9 @@ CONFIG_SSB_POSSIBLE=y
991# CONFIG_MFD_WM8400 is not set 1025# CONFIG_MFD_WM8400 is not set
992# CONFIG_MFD_WM8350_I2C is not set 1026# CONFIG_MFD_WM8350_I2C is not set
993# CONFIG_MFD_PCF50633 is not set 1027# CONFIG_MFD_PCF50633 is not set
1028# CONFIG_AB3100_CORE is not set
994# CONFIG_REGULATOR is not set 1029# CONFIG_REGULATOR is not set
995 1030# CONFIG_MEDIA_SUPPORT is not set
996#
997# Multimedia devices
998#
999
1000#
1001# Multimedia core support
1002#
1003# CONFIG_VIDEO_DEV is not set
1004CONFIG_DVB_CORE=m
1005CONFIG_VIDEO_MEDIA=m
1006
1007#
1008# Multimedia drivers
1009#
1010# CONFIG_MEDIA_ATTACH is not set
1011CONFIG_MEDIA_TUNER=m
1012# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
1013CONFIG_MEDIA_TUNER_SIMPLE=m
1014CONFIG_MEDIA_TUNER_TDA8290=m
1015CONFIG_MEDIA_TUNER_TDA9887=m
1016CONFIG_MEDIA_TUNER_TEA5761=m
1017CONFIG_MEDIA_TUNER_TEA5767=m
1018CONFIG_MEDIA_TUNER_MT20XX=m
1019CONFIG_MEDIA_TUNER_XC2028=m
1020CONFIG_MEDIA_TUNER_XC5000=m
1021CONFIG_MEDIA_TUNER_MC44S803=m
1022# CONFIG_DVB_DYNAMIC_MINORS is not set
1023CONFIG_DVB_CAPTURE_DRIVERS=y
1024
1025#
1026# Supported SAA7146 based PCI Adapters
1027#
1028# CONFIG_TTPCI_EEPROM is not set
1029# CONFIG_DVB_BUDGET_CORE is not set
1030
1031#
1032# Supported USB Adapters
1033#
1034# CONFIG_DVB_USB is not set
1035# CONFIG_DVB_TTUSB_BUDGET is not set
1036# CONFIG_DVB_TTUSB_DEC is not set
1037# CONFIG_DVB_SIANO_SMS1XXX is not set
1038
1039#
1040# Supported FlexCopII (B2C2) Adapters
1041#
1042# CONFIG_DVB_B2C2_FLEXCOP is not set
1043
1044#
1045# Supported BT878 Adapters
1046#
1047
1048#
1049# Supported Pluto2 Adapters
1050#
1051# CONFIG_DVB_PLUTO2 is not set
1052
1053#
1054# Supported SDMC DM1105 Adapters
1055#
1056# CONFIG_DVB_DM1105 is not set
1057
1058#
1059# Supported DVB Frontends
1060#
1061# CONFIG_DVB_FE_CUSTOMISE is not set
1062CONFIG_DAB=y
1063# CONFIG_USB_DABUSB is not set
1064 1031
1065# 1032#
1066# Graphics support 1033# Graphics support
@@ -1100,6 +1067,11 @@ CONFIG_SND_VERBOSE_PROCFS=y
1100# CONFIG_SND_VERBOSE_PRINTK is not set 1067# CONFIG_SND_VERBOSE_PRINTK is not set
1101# CONFIG_SND_DEBUG is not set 1068# CONFIG_SND_DEBUG is not set
1102CONFIG_SND_VMASTER=y 1069CONFIG_SND_VMASTER=y
1070# CONFIG_SND_RAWMIDI_SEQ is not set
1071# CONFIG_SND_OPL3_LIB_SEQ is not set
1072# CONFIG_SND_OPL4_LIB_SEQ is not set
1073# CONFIG_SND_SBAWE_SEQ is not set
1074# CONFIG_SND_EMU10K1_SEQ is not set
1103CONFIG_SND_AC97_CODEC=y 1075CONFIG_SND_AC97_CODEC=y
1104CONFIG_SND_DRIVERS=y 1076CONFIG_SND_DRIVERS=y
1105# CONFIG_SND_DUMMY is not set 1077# CONFIG_SND_DUMMY is not set
@@ -1126,6 +1098,7 @@ CONFIG_SND_PCI=y
1126# CONFIG_SND_CS4281 is not set 1098# CONFIG_SND_CS4281 is not set
1127# CONFIG_SND_CS46XX is not set 1099# CONFIG_SND_CS46XX is not set
1128# CONFIG_SND_CS5530 is not set 1100# CONFIG_SND_CS5530 is not set
1101# CONFIG_SND_CTXFI is not set
1129# CONFIG_SND_DARLA20 is not set 1102# CONFIG_SND_DARLA20 is not set
1130# CONFIG_SND_GINA20 is not set 1103# CONFIG_SND_GINA20 is not set
1131# CONFIG_SND_LAYLA20 is not set 1104# CONFIG_SND_LAYLA20 is not set
@@ -1156,6 +1129,7 @@ CONFIG_SND_PCI=y
1156CONFIG_SND_INTEL8X0=y 1129CONFIG_SND_INTEL8X0=y
1157# CONFIG_SND_INTEL8X0M is not set 1130# CONFIG_SND_INTEL8X0M is not set
1158# CONFIG_SND_KORG1212 is not set 1131# CONFIG_SND_KORG1212 is not set
1132# CONFIG_SND_LX6464ES is not set
1159# CONFIG_SND_MAESTRO3 is not set 1133# CONFIG_SND_MAESTRO3 is not set
1160# CONFIG_SND_MIXART is not set 1134# CONFIG_SND_MIXART is not set
1161# CONFIG_SND_NM256 is not set 1135# CONFIG_SND_NM256 is not set
@@ -1200,7 +1174,7 @@ CONFIG_HID_BELKIN=y
1200CONFIG_HID_CHERRY=y 1174CONFIG_HID_CHERRY=y
1201CONFIG_HID_CHICONY=y 1175CONFIG_HID_CHICONY=y
1202CONFIG_HID_CYPRESS=y 1176CONFIG_HID_CYPRESS=y
1203# CONFIG_DRAGONRISE_FF is not set 1177# CONFIG_HID_DRAGONRISE is not set
1204CONFIG_HID_EZKEY=y 1178CONFIG_HID_EZKEY=y
1205# CONFIG_HID_KYE is not set 1179# CONFIG_HID_KYE is not set
1206CONFIG_HID_GYRATION=y 1180CONFIG_HID_GYRATION=y
@@ -1217,10 +1191,11 @@ CONFIG_HID_PETALYNX=y
1217CONFIG_HID_SAMSUNG=y 1191CONFIG_HID_SAMSUNG=y
1218CONFIG_HID_SONY=y 1192CONFIG_HID_SONY=y
1219CONFIG_HID_SUNPLUS=y 1193CONFIG_HID_SUNPLUS=y
1220# CONFIG_GREENASIA_FF is not set 1194# CONFIG_HID_GREENASIA is not set
1195# CONFIG_HID_SMARTJOYPLUS is not set
1221# CONFIG_HID_TOPSEED is not set 1196# CONFIG_HID_TOPSEED is not set
1222CONFIG_THRUSTMASTER_FF=m 1197# CONFIG_HID_THRUSTMASTER is not set
1223CONFIG_ZEROPLUS_FF=m 1198# CONFIG_HID_ZEROPLUS is not set
1224CONFIG_USB_SUPPORT=y 1199CONFIG_USB_SUPPORT=y
1225CONFIG_USB_ARCH_HAS_HCD=y 1200CONFIG_USB_ARCH_HAS_HCD=y
1226CONFIG_USB_ARCH_HAS_OHCI=y 1201CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1246,6 +1221,7 @@ CONFIG_USB_MON=y
1246# USB Host Controller Drivers 1221# USB Host Controller Drivers
1247# 1222#
1248# CONFIG_USB_C67X00_HCD is not set 1223# CONFIG_USB_C67X00_HCD is not set
1224# CONFIG_USB_XHCI_HCD is not set
1249CONFIG_USB_EHCI_HCD=y 1225CONFIG_USB_EHCI_HCD=y
1250CONFIG_USB_EHCI_ROOT_HUB_TT=y 1226CONFIG_USB_EHCI_ROOT_HUB_TT=y
1251# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1227# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1255,9 +1231,9 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y
1255# CONFIG_USB_ISP116X_HCD is not set 1231# CONFIG_USB_ISP116X_HCD is not set
1256# CONFIG_USB_ISP1760_HCD is not set 1232# CONFIG_USB_ISP1760_HCD is not set
1257CONFIG_USB_OHCI_HCD=y 1233CONFIG_USB_OHCI_HCD=y
1258CONFIG_USB_OHCI_HCD_PPC_OF=y
1259CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1234CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1260CONFIG_USB_OHCI_HCD_PPC_OF_LE=y 1235CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
1236CONFIG_USB_OHCI_HCD_PPC_OF=y
1261CONFIG_USB_OHCI_HCD_PCI=y 1237CONFIG_USB_OHCI_HCD_PCI=y
1262CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y 1238CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1263CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y 1239CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
@@ -1356,8 +1332,6 @@ CONFIG_EDAC=y
1356# CONFIG_EDAC_DEBUG is not set 1332# CONFIG_EDAC_DEBUG is not set
1357CONFIG_EDAC_MM_EDAC=y 1333CONFIG_EDAC_MM_EDAC=y
1358CONFIG_EDAC_MPC85XX=y 1334CONFIG_EDAC_MPC85XX=y
1359# CONFIG_EDAC_AMD8131 is not set
1360# CONFIG_EDAC_AMD8111 is not set
1361CONFIG_RTC_LIB=y 1335CONFIG_RTC_LIB=y
1362CONFIG_RTC_CLASS=y 1336CONFIG_RTC_CLASS=y
1363CONFIG_RTC_HCTOSYS=y 1337CONFIG_RTC_HCTOSYS=y
@@ -1389,6 +1363,7 @@ CONFIG_RTC_INTF_DEV=y
1389# CONFIG_RTC_DRV_S35390A is not set 1363# CONFIG_RTC_DRV_S35390A is not set
1390# CONFIG_RTC_DRV_FM3130 is not set 1364# CONFIG_RTC_DRV_FM3130 is not set
1391# CONFIG_RTC_DRV_RX8581 is not set 1365# CONFIG_RTC_DRV_RX8581 is not set
1366# CONFIG_RTC_DRV_RX8025 is not set
1392 1367
1393# 1368#
1394# SPI RTC drivers 1369# SPI RTC drivers
@@ -1429,6 +1404,10 @@ CONFIG_DMA_ENGINE=y
1429# CONFIG_DMATEST is not set 1404# CONFIG_DMATEST is not set
1430# CONFIG_AUXDISPLAY is not set 1405# CONFIG_AUXDISPLAY is not set
1431# CONFIG_UIO is not set 1406# CONFIG_UIO is not set
1407
1408#
1409# TI VLYNQ
1410#
1432# CONFIG_STAGING is not set 1411# CONFIG_STAGING is not set
1433 1412
1434# 1413#
@@ -1449,11 +1428,12 @@ CONFIG_FS_MBCACHE=y
1449# CONFIG_REISERFS_FS is not set 1428# CONFIG_REISERFS_FS is not set
1450# CONFIG_JFS_FS is not set 1429# CONFIG_JFS_FS is not set
1451# CONFIG_FS_POSIX_ACL is not set 1430# CONFIG_FS_POSIX_ACL is not set
1452CONFIG_FILE_LOCKING=y
1453# CONFIG_XFS_FS is not set 1431# CONFIG_XFS_FS is not set
1454# CONFIG_GFS2_FS is not set 1432# CONFIG_GFS2_FS is not set
1455# CONFIG_OCFS2_FS is not set 1433# CONFIG_OCFS2_FS is not set
1456# CONFIG_BTRFS_FS is not set 1434# CONFIG_BTRFS_FS is not set
1435CONFIG_FILE_LOCKING=y
1436CONFIG_FSNOTIFY=y
1457CONFIG_DNOTIFY=y 1437CONFIG_DNOTIFY=y
1458CONFIG_INOTIFY=y 1438CONFIG_INOTIFY=y
1459CONFIG_INOTIFY_USER=y 1439CONFIG_INOTIFY_USER=y
@@ -1528,6 +1508,7 @@ CONFIG_NFS_FS=y
1528CONFIG_NFS_V3=y 1508CONFIG_NFS_V3=y
1529# CONFIG_NFS_V3_ACL is not set 1509# CONFIG_NFS_V3_ACL is not set
1530CONFIG_NFS_V4=y 1510CONFIG_NFS_V4=y
1511# CONFIG_NFS_V4_1 is not set
1531CONFIG_ROOT_NFS=y 1512CONFIG_ROOT_NFS=y
1532CONFIG_NFSD=y 1513CONFIG_NFSD=y
1533# CONFIG_NFSD_V3 is not set 1514# CONFIG_NFSD_V3 is not set
@@ -1632,6 +1613,7 @@ CONFIG_HAS_IOPORT=y
1632CONFIG_HAS_DMA=y 1613CONFIG_HAS_DMA=y
1633CONFIG_HAVE_LMB=y 1614CONFIG_HAVE_LMB=y
1634CONFIG_NLATTR=y 1615CONFIG_NLATTR=y
1616CONFIG_GENERIC_ATOMIC64=y
1635 1617
1636# 1618#
1637# Kernel hacking 1619# Kernel hacking
@@ -1662,6 +1644,9 @@ CONFIG_SCHED_DEBUG=y
1662# CONFIG_RT_MUTEX_TESTER is not set 1644# CONFIG_RT_MUTEX_TESTER is not set
1663# CONFIG_DEBUG_SPINLOCK is not set 1645# CONFIG_DEBUG_SPINLOCK is not set
1664# CONFIG_DEBUG_MUTEXES is not set 1646# CONFIG_DEBUG_MUTEXES is not set
1647# CONFIG_DEBUG_LOCK_ALLOC is not set
1648# CONFIG_PROVE_LOCKING is not set
1649# CONFIG_LOCK_STAT is not set
1665# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1650# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1666# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1651# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1667# CONFIG_DEBUG_KOBJECT is not set 1652# CONFIG_DEBUG_KOBJECT is not set
@@ -1674,7 +1659,6 @@ CONFIG_DEBUG_INFO=y
1674# CONFIG_DEBUG_LIST is not set 1659# CONFIG_DEBUG_LIST is not set
1675# CONFIG_DEBUG_SG is not set 1660# CONFIG_DEBUG_SG is not set
1676# CONFIG_DEBUG_NOTIFIERS is not set 1661# CONFIG_DEBUG_NOTIFIERS is not set
1677# CONFIG_BOOT_PRINTK_DELAY is not set
1678# CONFIG_RCU_TORTURE_TEST is not set 1662# CONFIG_RCU_TORTURE_TEST is not set
1679# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1663# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1680# CONFIG_BACKTRACE_SELF_TEST is not set 1664# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1688,16 +1672,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1688CONFIG_HAVE_DYNAMIC_FTRACE=y 1672CONFIG_HAVE_DYNAMIC_FTRACE=y
1689CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1673CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1690CONFIG_TRACING_SUPPORT=y 1674CONFIG_TRACING_SUPPORT=y
1691 1675CONFIG_FTRACE=y
1692#
1693# Tracers
1694#
1695# CONFIG_FUNCTION_TRACER is not set 1676# CONFIG_FUNCTION_TRACER is not set
1677# CONFIG_IRQSOFF_TRACER is not set
1696# CONFIG_SCHED_TRACER is not set 1678# CONFIG_SCHED_TRACER is not set
1697# CONFIG_CONTEXT_SWITCH_TRACER is not set 1679# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1698# CONFIG_EVENT_TRACER is not set
1699# CONFIG_BOOT_TRACER is not set 1680# CONFIG_BOOT_TRACER is not set
1700# CONFIG_TRACE_BRANCH_PROFILING is not set 1681CONFIG_BRANCH_PROFILE_NONE=y
1682# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1683# CONFIG_PROFILE_ALL_BRANCHES is not set
1701# CONFIG_STACK_TRACER is not set 1684# CONFIG_STACK_TRACER is not set
1702# CONFIG_KMEMTRACE is not set 1685# CONFIG_KMEMTRACE is not set
1703# CONFIG_WORKQUEUE_TRACER is not set 1686# CONFIG_WORKQUEUE_TRACER is not set
@@ -1706,9 +1689,13 @@ CONFIG_TRACING_SUPPORT=y
1706# CONFIG_SAMPLES is not set 1689# CONFIG_SAMPLES is not set
1707CONFIG_HAVE_ARCH_KGDB=y 1690CONFIG_HAVE_ARCH_KGDB=y
1708# CONFIG_KGDB is not set 1691# CONFIG_KGDB is not set
1692# CONFIG_KMEMCHECK is not set
1693# CONFIG_PPC_DISABLE_WERROR is not set
1694CONFIG_PPC_WERROR=y
1709CONFIG_PRINT_STACK_DEPTH=64 1695CONFIG_PRINT_STACK_DEPTH=64
1710# CONFIG_DEBUG_STACKOVERFLOW is not set 1696# CONFIG_DEBUG_STACKOVERFLOW is not set
1711# CONFIG_DEBUG_STACK_USAGE is not set 1697# CONFIG_DEBUG_STACK_USAGE is not set
1698# CONFIG_PPC_EMULATED_STATS is not set
1712# CONFIG_CODE_PATCHING_SELFTEST is not set 1699# CONFIG_CODE_PATCHING_SELFTEST is not set
1713# CONFIG_FTR_FIXUP_SELFTEST is not set 1700# CONFIG_FTR_FIXUP_SELFTEST is not set
1714# CONFIG_MSI_BITMAP_SELFTEST is not set 1701# CONFIG_MSI_BITMAP_SELFTEST is not set
diff --git a/arch/powerpc/configs/mpc866_ads_defconfig b/arch/powerpc/configs/mpc866_ads_defconfig
index 3add6f62b21..6809b61ed3d 100644
--- a/arch/powerpc/configs/mpc866_ads_defconfig
+++ b/arch/powerpc/configs/mpc866_ads_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:00 2009 4# Wed Jul 29 23:31:57 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13CONFIG_PPC_8xx=y 13CONFIG_PPC_8xx=y
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -27,15 +27,16 @@ CONFIG_GENERIC_TIME=y
27CONFIG_GENERIC_TIME_VSYSCALL=y 27CONFIG_GENERIC_TIME_VSYSCALL=y
28CONFIG_GENERIC_CLOCKEVENTS=y 28CONFIG_GENERIC_CLOCKEVENTS=y
29CONFIG_GENERIC_HARDIRQS=y 29CONFIG_GENERIC_HARDIRQS=y
30CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
30# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 31# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
31CONFIG_IRQ_PER_CPU=y 32CONFIG_IRQ_PER_CPU=y
32CONFIG_STACKTRACE_SUPPORT=y 33CONFIG_STACKTRACE_SUPPORT=y
33CONFIG_HAVE_LATENCYTOP_SUPPORT=y 34CONFIG_HAVE_LATENCYTOP_SUPPORT=y
35CONFIG_TRACE_IRQFLAGS_SUPPORT=y
34CONFIG_LOCKDEP_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
38CONFIG_GENERIC_CALIBRATE_DELAY=y
39CONFIG_GENERIC_FIND_NEXT_BIT=y 40CONFIG_GENERIC_FIND_NEXT_BIT=y
40# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 41# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
41CONFIG_PPC=y 42CONFIG_PPC=y
@@ -48,11 +49,13 @@ CONFIG_OF=y
48# CONFIG_PPC_UDBG_16550 is not set 49# CONFIG_PPC_UDBG_16550 is not set
49# CONFIG_GENERIC_TBSYNC is not set 50# CONFIG_GENERIC_TBSYNC is not set
50CONFIG_AUDIT_ARCH=y 51CONFIG_AUDIT_ARCH=y
52CONFIG_DTC=y
51# CONFIG_DEFAULT_UIMAGE is not set 53# CONFIG_DEFAULT_UIMAGE is not set
52# CONFIG_PPC_DCR_NATIVE is not set 54# CONFIG_PPC_DCR_NATIVE is not set
53# CONFIG_PPC_DCR_MMIO is not set 55# CONFIG_PPC_DCR_MMIO is not set
54CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 56CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
55CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 57CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
58CONFIG_CONSTRUCTORS=y
56 59
57# 60#
58# General setup 61# General setup
@@ -98,7 +101,6 @@ CONFIG_EMBEDDED=y
98# CONFIG_SYSCTL_SYSCALL is not set 101# CONFIG_SYSCTL_SYSCALL is not set
99CONFIG_KALLSYMS=y 102CONFIG_KALLSYMS=y
100# CONFIG_KALLSYMS_EXTRA_PASS is not set 103# CONFIG_KALLSYMS_EXTRA_PASS is not set
101# CONFIG_STRIP_ASM_SYMS is not set
102# CONFIG_HOTPLUG is not set 104# CONFIG_HOTPLUG is not set
103CONFIG_PRINTK=y 105CONFIG_PRINTK=y
104# CONFIG_BUG is not set 106# CONFIG_BUG is not set
@@ -111,8 +113,15 @@ CONFIG_TIMERFD=y
111CONFIG_EVENTFD=y 113CONFIG_EVENTFD=y
112CONFIG_SHMEM=y 114CONFIG_SHMEM=y
113CONFIG_AIO=y 115CONFIG_AIO=y
116CONFIG_HAVE_PERF_COUNTERS=y
117
118#
119# Performance Counters
120#
121# CONFIG_PERF_COUNTERS is not set
114# CONFIG_VM_EVENT_COUNTERS is not set 122# CONFIG_VM_EVENT_COUNTERS is not set
115CONFIG_SLUB_DEBUG=y 123CONFIG_SLUB_DEBUG=y
124# CONFIG_STRIP_ASM_SYMS is not set
116CONFIG_COMPAT_BRK=y 125CONFIG_COMPAT_BRK=y
117# CONFIG_SLAB is not set 126# CONFIG_SLAB is not set
118CONFIG_SLUB=y 127CONFIG_SLUB=y
@@ -126,6 +135,10 @@ CONFIG_HAVE_KPROBES=y
126CONFIG_HAVE_KRETPROBES=y 135CONFIG_HAVE_KRETPROBES=y
127CONFIG_HAVE_ARCH_TRACEHOOK=y 136CONFIG_HAVE_ARCH_TRACEHOOK=y
128CONFIG_HAVE_CLK=y 137CONFIG_HAVE_CLK=y
138
139#
140# GCOV-based kernel profiling
141#
129# CONFIG_SLOW_WORK is not set 142# CONFIG_SLOW_WORK is not set
130# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 143# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
131CONFIG_SLABINFO=y 144CONFIG_SLABINFO=y
@@ -133,7 +146,7 @@ CONFIG_RT_MUTEXES=y
133CONFIG_BASE_SMALL=1 146CONFIG_BASE_SMALL=1
134# CONFIG_MODULES is not set 147# CONFIG_MODULES is not set
135CONFIG_BLOCK=y 148CONFIG_BLOCK=y
136# CONFIG_LBD is not set 149CONFIG_LBDAF=y
137# CONFIG_BLK_DEV_BSG is not set 150# CONFIG_BLK_DEV_BSG is not set
138# CONFIG_BLK_DEV_INTEGRITY is not set 151# CONFIG_BLK_DEV_INTEGRITY is not set
139 152
@@ -219,6 +232,7 @@ CONFIG_BINFMT_ELF=y
219# CONFIG_BINFMT_MISC is not set 232# CONFIG_BINFMT_MISC is not set
220CONFIG_MATH_EMULATION=y 233CONFIG_MATH_EMULATION=y
221# CONFIG_IOMMU_HELPER is not set 234# CONFIG_IOMMU_HELPER is not set
235# CONFIG_SWIOTLB is not set
222CONFIG_PPC_NEED_DMA_SYNC_OPS=y 236CONFIG_PPC_NEED_DMA_SYNC_OPS=y
223CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 237CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
224CONFIG_ARCH_HAS_WALK_MEMORY=y 238CONFIG_ARCH_HAS_WALK_MEMORY=y
@@ -238,9 +252,9 @@ CONFIG_MIGRATION=y
238CONFIG_ZONE_DMA_FLAG=1 252CONFIG_ZONE_DMA_FLAG=1
239CONFIG_BOUNCE=y 253CONFIG_BOUNCE=y
240CONFIG_VIRT_TO_BUS=y 254CONFIG_VIRT_TO_BUS=y
241CONFIG_UNEVICTABLE_LRU=y
242CONFIG_HAVE_MLOCK=y 255CONFIG_HAVE_MLOCK=y
243CONFIG_HAVE_MLOCKED_PAGE_BIT=y 256CONFIG_HAVE_MLOCKED_PAGE_BIT=y
257CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
244CONFIG_PPC_4K_PAGES=y 258CONFIG_PPC_4K_PAGES=y
245# CONFIG_PPC_16K_PAGES is not set 259# CONFIG_PPC_16K_PAGES is not set
246# CONFIG_PPC_64K_PAGES is not set 260# CONFIG_PPC_64K_PAGES is not set
@@ -278,6 +292,7 @@ CONFIG_PAGE_OFFSET=0xc0000000
278CONFIG_KERNEL_START=0xc0000000 292CONFIG_KERNEL_START=0xc0000000
279CONFIG_PHYSICAL_START=0x00000000 293CONFIG_PHYSICAL_START=0x00000000
280CONFIG_TASK_SIZE=0x80000000 294CONFIG_TASK_SIZE=0x80000000
295CONFIG_CONSISTENT_SIZE=0x00200000
281CONFIG_NET=y 296CONFIG_NET=y
282 297
283# 298#
@@ -339,6 +354,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
339# CONFIG_ECONET is not set 354# CONFIG_ECONET is not set
340# CONFIG_WAN_ROUTER is not set 355# CONFIG_WAN_ROUTER is not set
341# CONFIG_PHONET is not set 356# CONFIG_PHONET is not set
357# CONFIG_IEEE802154 is not set
342# CONFIG_NET_SCHED is not set 358# CONFIG_NET_SCHED is not set
343# CONFIG_DCB is not set 359# CONFIG_DCB is not set
344 360
@@ -356,7 +372,11 @@ CONFIG_WIRELESS=y
356CONFIG_WIRELESS_OLD_REGULATORY=y 372CONFIG_WIRELESS_OLD_REGULATORY=y
357# CONFIG_WIRELESS_EXT is not set 373# CONFIG_WIRELESS_EXT is not set
358# CONFIG_LIB80211 is not set 374# CONFIG_LIB80211 is not set
359# CONFIG_MAC80211 is not set 375
376#
377# CFG80211 needs to be enabled for MAC80211
378#
379CONFIG_MAC80211_DEFAULT_PS_VALUE=0
360# CONFIG_WIMAX is not set 380# CONFIG_WIMAX is not set
361# CONFIG_RFKILL is not set 381# CONFIG_RFKILL is not set
362# CONFIG_NET_9P is not set 382# CONFIG_NET_9P is not set
@@ -374,6 +394,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
374# CONFIG_CONNECTOR is not set 394# CONFIG_CONNECTOR is not set
375# CONFIG_MTD is not set 395# CONFIG_MTD is not set
376CONFIG_OF_DEVICE=y 396CONFIG_OF_DEVICE=y
397CONFIG_OF_MDIO=y
377# CONFIG_PARPORT is not set 398# CONFIG_PARPORT is not set
378CONFIG_BLK_DEV=y 399CONFIG_BLK_DEV=y
379# CONFIG_BLK_DEV_FD is not set 400# CONFIG_BLK_DEV_FD is not set
@@ -407,7 +428,6 @@ CONFIG_HAVE_IDE=y
407# CONFIG_MD is not set 428# CONFIG_MD is not set
408# CONFIG_MACINTOSH_DRIVERS is not set 429# CONFIG_MACINTOSH_DRIVERS is not set
409CONFIG_NETDEVICES=y 430CONFIG_NETDEVICES=y
410CONFIG_COMPAT_NET_DEV_OPS=y
411# CONFIG_DUMMY is not set 431# CONFIG_DUMMY is not set
412# CONFIG_BONDING is not set 432# CONFIG_BONDING is not set
413# CONFIG_MACVLAN is not set 433# CONFIG_MACVLAN is not set
@@ -446,6 +466,7 @@ CONFIG_MII=y
446# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 466# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
447# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 467# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
448# CONFIG_B44 is not set 468# CONFIG_B44 is not set
469# CONFIG_KS8842 is not set
449CONFIG_FS_ENET=y 470CONFIG_FS_ENET=y
450CONFIG_FS_ENET_HAS_SCC=y 471CONFIG_FS_ENET_HAS_SCC=y
451CONFIG_FS_ENET_HAS_FEC=y 472CONFIG_FS_ENET_HAS_FEC=y
@@ -453,6 +474,7 @@ CONFIG_FS_ENET_MDIO_FEC=y
453CONFIG_NETDEV_1000=y 474CONFIG_NETDEV_1000=y
454# CONFIG_FSL_PQ_MDIO is not set 475# CONFIG_FSL_PQ_MDIO is not set
455# CONFIG_GIANFAR is not set 476# CONFIG_GIANFAR is not set
477# CONFIG_MV643XX_ETH is not set
456CONFIG_NETDEV_10000=y 478CONFIG_NETDEV_10000=y
457 479
458# 480#
@@ -496,11 +518,11 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
496# 518#
497CONFIG_INPUT_KEYBOARD=y 519CONFIG_INPUT_KEYBOARD=y
498CONFIG_KEYBOARD_ATKBD=y 520CONFIG_KEYBOARD_ATKBD=y
499# CONFIG_KEYBOARD_SUNKBD is not set
500# CONFIG_KEYBOARD_LKKBD is not set 521# CONFIG_KEYBOARD_LKKBD is not set
501# CONFIG_KEYBOARD_XTKBD is not set
502# CONFIG_KEYBOARD_NEWTON is not set 522# CONFIG_KEYBOARD_NEWTON is not set
503# CONFIG_KEYBOARD_STOWAWAY is not set 523# CONFIG_KEYBOARD_STOWAWAY is not set
524# CONFIG_KEYBOARD_SUNKBD is not set
525# CONFIG_KEYBOARD_XTKBD is not set
504CONFIG_INPUT_MOUSE=y 526CONFIG_INPUT_MOUSE=y
505CONFIG_MOUSE_PS2=y 527CONFIG_MOUSE_PS2=y
506CONFIG_MOUSE_PS2_ALPS=y 528CONFIG_MOUSE_PS2_ALPS=y
@@ -562,6 +584,11 @@ CONFIG_GEN_RTC=y
562# CONFIG_TCG_TPM is not set 584# CONFIG_TCG_TPM is not set
563# CONFIG_I2C is not set 585# CONFIG_I2C is not set
564# CONFIG_SPI is not set 586# CONFIG_SPI is not set
587
588#
589# PPS support
590#
591# CONFIG_PPS is not set
565CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 592CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
566# CONFIG_GPIOLIB is not set 593# CONFIG_GPIOLIB is not set
567# CONFIG_W1 is not set 594# CONFIG_W1 is not set
@@ -597,22 +624,7 @@ CONFIG_SSB_POSSIBLE=y
597# CONFIG_HTC_PASIC3 is not set 624# CONFIG_HTC_PASIC3 is not set
598# CONFIG_MFD_TMIO is not set 625# CONFIG_MFD_TMIO is not set
599# CONFIG_REGULATOR is not set 626# CONFIG_REGULATOR is not set
600 627# CONFIG_MEDIA_SUPPORT is not set
601#
602# Multimedia devices
603#
604
605#
606# Multimedia core support
607#
608# CONFIG_VIDEO_DEV is not set
609# CONFIG_DVB_CORE is not set
610# CONFIG_VIDEO_MEDIA is not set
611
612#
613# Multimedia drivers
614#
615CONFIG_DAB=y
616 628
617# 629#
618# Graphics support 630# Graphics support
@@ -664,6 +676,10 @@ CONFIG_USB_SUPPORT=y
664# CONFIG_DMADEVICES is not set 676# CONFIG_DMADEVICES is not set
665# CONFIG_AUXDISPLAY is not set 677# CONFIG_AUXDISPLAY is not set
666# CONFIG_UIO is not set 678# CONFIG_UIO is not set
679
680#
681# TI VLYNQ
682#
667# CONFIG_STAGING is not set 683# CONFIG_STAGING is not set
668 684
669# 685#
@@ -685,10 +701,12 @@ CONFIG_FS_MBCACHE=y
685# CONFIG_REISERFS_FS is not set 701# CONFIG_REISERFS_FS is not set
686# CONFIG_JFS_FS is not set 702# CONFIG_JFS_FS is not set
687# CONFIG_FS_POSIX_ACL is not set 703# CONFIG_FS_POSIX_ACL is not set
688CONFIG_FILE_LOCKING=y
689# CONFIG_XFS_FS is not set 704# CONFIG_XFS_FS is not set
705# CONFIG_GFS2_FS is not set
690# CONFIG_OCFS2_FS is not set 706# CONFIG_OCFS2_FS is not set
691# CONFIG_BTRFS_FS is not set 707# CONFIG_BTRFS_FS is not set
708CONFIG_FILE_LOCKING=y
709CONFIG_FSNOTIFY=y
692CONFIG_DNOTIFY=y 710CONFIG_DNOTIFY=y
693CONFIG_INOTIFY=y 711CONFIG_INOTIFY=y
694CONFIG_INOTIFY_USER=y 712CONFIG_INOTIFY_USER=y
@@ -808,6 +826,7 @@ CONFIG_HAS_IOPORT=y
808CONFIG_HAS_DMA=y 826CONFIG_HAS_DMA=y
809CONFIG_HAVE_LMB=y 827CONFIG_HAVE_LMB=y
810CONFIG_NLATTR=y 828CONFIG_NLATTR=y
829CONFIG_GENERIC_ATOMIC64=y
811 830
812# 831#
813# Kernel hacking 832# Kernel hacking
@@ -831,22 +850,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
831CONFIG_HAVE_DYNAMIC_FTRACE=y 850CONFIG_HAVE_DYNAMIC_FTRACE=y
832CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 851CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
833CONFIG_TRACING_SUPPORT=y 852CONFIG_TRACING_SUPPORT=y
834 853# CONFIG_FTRACE is not set
835#
836# Tracers
837#
838# CONFIG_FUNCTION_TRACER is not set
839# CONFIG_SCHED_TRACER is not set
840# CONFIG_CONTEXT_SWITCH_TRACER is not set
841# CONFIG_EVENT_TRACER is not set
842# CONFIG_BOOT_TRACER is not set
843# CONFIG_TRACE_BRANCH_PROFILING is not set
844# CONFIG_STACK_TRACER is not set
845# CONFIG_KMEMTRACE is not set
846# CONFIG_WORKQUEUE_TRACER is not set
847# CONFIG_BLK_DEV_IO_TRACE is not set
848# CONFIG_SAMPLES is not set 854# CONFIG_SAMPLES is not set
849CONFIG_HAVE_ARCH_KGDB=y 855CONFIG_HAVE_ARCH_KGDB=y
856# CONFIG_PPC_DISABLE_WERROR is not set
857CONFIG_PPC_WERROR=y
850CONFIG_PRINT_STACK_DEPTH=64 858CONFIG_PRINT_STACK_DEPTH=64
851# CONFIG_IRQSTACKS is not set 859# CONFIG_IRQSTACKS is not set
852# CONFIG_PPC_EARLY_DEBUG is not set 860# CONFIG_PPC_EARLY_DEBUG is not set
diff --git a/arch/powerpc/configs/mpc86xx_defconfig b/arch/powerpc/configs/mpc86xx_defconfig
index 5bb1b8eb0b4..0e8684a3138 100644
--- a/arch/powerpc/configs/mpc86xx_defconfig
+++ b/arch/powerpc/configs/mpc86xx_defconfig
@@ -1,26 +1,28 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:00 2009 4# Wed Jul 29 23:31:58 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_PHYS_64BIT is not set 20# CONFIG_PHYS_64BIT is not set
20CONFIG_ALTIVEC=y 21CONFIG_ALTIVEC=y
21CONFIG_PPC_STD_MMU=y 22CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y 23CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set 24# CONFIG_PPC_MM_SLICES is not set
25CONFIG_PPC_HAVE_PMU_SUPPORT=y
24CONFIG_SMP=y 26CONFIG_SMP=y
25CONFIG_NR_CPUS=2 27CONFIG_NR_CPUS=2
26CONFIG_PPC32=y 28CONFIG_PPC32=y
@@ -32,15 +34,16 @@ CONFIG_GENERIC_TIME=y
32CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
33CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
34CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
35# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
36CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
37CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
38CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
39CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
40CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
41CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
42CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
43CONFIG_GENERIC_CALIBRATE_DELAY=y
44CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
45CONFIG_GENERIC_GPIO=y 48CONFIG_GENERIC_GPIO=y
46# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 49# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -55,11 +58,13 @@ CONFIG_PPC_UDBG_16550=y
55CONFIG_GENERIC_TBSYNC=y 58CONFIG_GENERIC_TBSYNC=y
56CONFIG_AUDIT_ARCH=y 59CONFIG_AUDIT_ARCH=y
57CONFIG_GENERIC_BUG=y 60CONFIG_GENERIC_BUG=y
61CONFIG_DTC=y
58CONFIG_DEFAULT_UIMAGE=y 62CONFIG_DEFAULT_UIMAGE=y
59# CONFIG_PPC_DCR_NATIVE is not set 63# CONFIG_PPC_DCR_NATIVE is not set
60# CONFIG_PPC_DCR_MMIO is not set 64# CONFIG_PPC_DCR_MMIO is not set
61CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 65CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
62CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 66CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
67CONFIG_CONSTRUCTORS=y
63 68
64# 69#
65# General setup 70# General setup
@@ -114,7 +119,6 @@ CONFIG_SYSCTL_SYSCALL=y
114CONFIG_KALLSYMS=y 119CONFIG_KALLSYMS=y
115CONFIG_KALLSYMS_ALL=y 120CONFIG_KALLSYMS_ALL=y
116CONFIG_KALLSYMS_EXTRA_PASS=y 121CONFIG_KALLSYMS_EXTRA_PASS=y
117# CONFIG_STRIP_ASM_SYMS is not set
118CONFIG_HOTPLUG=y 122CONFIG_HOTPLUG=y
119CONFIG_PRINTK=y 123CONFIG_PRINTK=y
120CONFIG_BUG=y 124CONFIG_BUG=y
@@ -127,9 +131,16 @@ CONFIG_TIMERFD=y
127CONFIG_EVENTFD=y 131CONFIG_EVENTFD=y
128CONFIG_SHMEM=y 132CONFIG_SHMEM=y
129CONFIG_AIO=y 133CONFIG_AIO=y
134CONFIG_HAVE_PERF_COUNTERS=y
135
136#
137# Performance Counters
138#
139# CONFIG_PERF_COUNTERS is not set
130CONFIG_VM_EVENT_COUNTERS=y 140CONFIG_VM_EVENT_COUNTERS=y
131CONFIG_PCI_QUIRKS=y 141CONFIG_PCI_QUIRKS=y
132CONFIG_SLUB_DEBUG=y 142CONFIG_SLUB_DEBUG=y
143# CONFIG_STRIP_ASM_SYMS is not set
133CONFIG_COMPAT_BRK=y 144CONFIG_COMPAT_BRK=y
134# CONFIG_SLAB is not set 145# CONFIG_SLAB is not set
135CONFIG_SLUB=y 146CONFIG_SLUB=y
@@ -144,6 +155,10 @@ CONFIG_HAVE_KPROBES=y
144CONFIG_HAVE_KRETPROBES=y 155CONFIG_HAVE_KRETPROBES=y
145CONFIG_HAVE_ARCH_TRACEHOOK=y 156CONFIG_HAVE_ARCH_TRACEHOOK=y
146CONFIG_USE_GENERIC_SMP_HELPERS=y 157CONFIG_USE_GENERIC_SMP_HELPERS=y
158
159#
160# GCOV-based kernel profiling
161#
147# CONFIG_SLOW_WORK is not set 162# CONFIG_SLOW_WORK is not set
148# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 163# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
149CONFIG_SLABINFO=y 164CONFIG_SLABINFO=y
@@ -157,7 +172,7 @@ CONFIG_MODVERSIONS=y
157# CONFIG_MODULE_SRCVERSION_ALL is not set 172# CONFIG_MODULE_SRCVERSION_ALL is not set
158CONFIG_STOP_MACHINE=y 173CONFIG_STOP_MACHINE=y
159CONFIG_BLOCK=y 174CONFIG_BLOCK=y
160CONFIG_LBD=y 175CONFIG_LBDAF=y
161# CONFIG_BLK_DEV_BSG is not set 176# CONFIG_BLK_DEV_BSG is not set
162# CONFIG_BLK_DEV_INTEGRITY is not set 177# CONFIG_BLK_DEV_INTEGRITY is not set
163 178
@@ -236,7 +251,9 @@ CONFIG_BINFMT_ELF=y
236# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 251# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
237# CONFIG_HAVE_AOUT is not set 252# CONFIG_HAVE_AOUT is not set
238CONFIG_BINFMT_MISC=m 253CONFIG_BINFMT_MISC=m
239# CONFIG_IOMMU_HELPER is not set 254CONFIG_IOMMU_HELPER=y
255CONFIG_SWIOTLB=y
256CONFIG_PPC_NEED_DMA_SYNC_OPS=y
240CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 257CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
241CONFIG_ARCH_HAS_WALK_MEMORY=y 258CONFIG_ARCH_HAS_WALK_MEMORY=y
242CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 259CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -258,9 +275,9 @@ CONFIG_MIGRATION=y
258CONFIG_ZONE_DMA_FLAG=1 275CONFIG_ZONE_DMA_FLAG=1
259CONFIG_BOUNCE=y 276CONFIG_BOUNCE=y
260CONFIG_VIRT_TO_BUS=y 277CONFIG_VIRT_TO_BUS=y
261CONFIG_UNEVICTABLE_LRU=y
262CONFIG_HAVE_MLOCK=y 278CONFIG_HAVE_MLOCK=y
263CONFIG_HAVE_MLOCKED_PAGE_BIT=y 279CONFIG_HAVE_MLOCKED_PAGE_BIT=y
280CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
264CONFIG_PPC_4K_PAGES=y 281CONFIG_PPC_4K_PAGES=y
265# CONFIG_PPC_16K_PAGES is not set 282# CONFIG_PPC_16K_PAGES is not set
266# CONFIG_PPC_64K_PAGES is not set 283# CONFIG_PPC_64K_PAGES is not set
@@ -403,6 +420,7 @@ CONFIG_SCTP_HMAC_MD5=y
403# CONFIG_ECONET is not set 420# CONFIG_ECONET is not set
404# CONFIG_WAN_ROUTER is not set 421# CONFIG_WAN_ROUTER is not set
405# CONFIG_PHONET is not set 422# CONFIG_PHONET is not set
423# CONFIG_IEEE802154 is not set
406# CONFIG_NET_SCHED is not set 424# CONFIG_NET_SCHED is not set
407# CONFIG_DCB is not set 425# CONFIG_DCB is not set
408 426
@@ -421,7 +439,11 @@ CONFIG_WIRELESS=y
421CONFIG_WIRELESS_OLD_REGULATORY=y 439CONFIG_WIRELESS_OLD_REGULATORY=y
422# CONFIG_WIRELESS_EXT is not set 440# CONFIG_WIRELESS_EXT is not set
423# CONFIG_LIB80211 is not set 441# CONFIG_LIB80211 is not set
424# CONFIG_MAC80211 is not set 442
443#
444# CFG80211 needs to be enabled for MAC80211
445#
446CONFIG_MAC80211_DEFAULT_PS_VALUE=0
425# CONFIG_WIMAX is not set 447# CONFIG_WIMAX is not set
426# CONFIG_RFKILL is not set 448# CONFIG_RFKILL is not set
427# CONFIG_NET_9P is not set 449# CONFIG_NET_9P is not set
@@ -447,6 +469,7 @@ CONFIG_EXTRA_FIRMWARE=""
447CONFIG_OF_DEVICE=y 469CONFIG_OF_DEVICE=y
448CONFIG_OF_GPIO=y 470CONFIG_OF_GPIO=y
449CONFIG_OF_I2C=y 471CONFIG_OF_I2C=y
472CONFIG_OF_MDIO=y
450# CONFIG_PARPORT is not set 473# CONFIG_PARPORT is not set
451CONFIG_BLK_DEV=y 474CONFIG_BLK_DEV=y
452# CONFIG_BLK_DEV_FD is not set 475# CONFIG_BLK_DEV_FD is not set
@@ -482,7 +505,9 @@ CONFIG_MISC_DEVICES=y
482# 505#
483# CONFIG_EEPROM_AT24 is not set 506# CONFIG_EEPROM_AT24 is not set
484CONFIG_EEPROM_LEGACY=y 507CONFIG_EEPROM_LEGACY=y
508# CONFIG_EEPROM_MAX6875 is not set
485# CONFIG_EEPROM_93CX6 is not set 509# CONFIG_EEPROM_93CX6 is not set
510# CONFIG_CB710_CORE is not set
486CONFIG_HAVE_IDE=y 511CONFIG_HAVE_IDE=y
487# CONFIG_IDE is not set 512# CONFIG_IDE is not set
488 513
@@ -506,10 +531,6 @@ CONFIG_BLK_DEV_SR=y
506# CONFIG_BLK_DEV_SR_VENDOR is not set 531# CONFIG_BLK_DEV_SR_VENDOR is not set
507CONFIG_CHR_DEV_SG=y 532CONFIG_CHR_DEV_SG=y
508# CONFIG_CHR_DEV_SCH is not set 533# CONFIG_CHR_DEV_SCH is not set
509
510#
511# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
512#
513CONFIG_SCSI_MULTI_LUN=y 534CONFIG_SCSI_MULTI_LUN=y
514# CONFIG_SCSI_CONSTANTS is not set 535# CONFIG_SCSI_CONSTANTS is not set
515CONFIG_SCSI_LOGGING=y 536CONFIG_SCSI_LOGGING=y
@@ -527,6 +548,7 @@ CONFIG_SCSI_WAIT_SCAN=m
527CONFIG_SCSI_LOWLEVEL=y 548CONFIG_SCSI_LOWLEVEL=y
528# CONFIG_ISCSI_TCP is not set 549# CONFIG_ISCSI_TCP is not set
529# CONFIG_SCSI_CXGB3_ISCSI is not set 550# CONFIG_SCSI_CXGB3_ISCSI is not set
551# CONFIG_SCSI_BNX2_ISCSI is not set
530# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 552# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
531# CONFIG_SCSI_3W_9XXX is not set 553# CONFIG_SCSI_3W_9XXX is not set
532# CONFIG_SCSI_ACARD is not set 554# CONFIG_SCSI_ACARD is not set
@@ -535,6 +557,7 @@ CONFIG_SCSI_LOWLEVEL=y
535# CONFIG_SCSI_AIC7XXX_OLD is not set 557# CONFIG_SCSI_AIC7XXX_OLD is not set
536# CONFIG_SCSI_AIC79XX is not set 558# CONFIG_SCSI_AIC79XX is not set
537# CONFIG_SCSI_AIC94XX is not set 559# CONFIG_SCSI_AIC94XX is not set
560# CONFIG_SCSI_MVSAS is not set
538# CONFIG_SCSI_DPT_I2O is not set 561# CONFIG_SCSI_DPT_I2O is not set
539# CONFIG_SCSI_ADVANSYS is not set 562# CONFIG_SCSI_ADVANSYS is not set
540# CONFIG_SCSI_ARCMSR is not set 563# CONFIG_SCSI_ARCMSR is not set
@@ -554,7 +577,6 @@ CONFIG_SCSI_LOWLEVEL=y
554# CONFIG_SCSI_IPS is not set 577# CONFIG_SCSI_IPS is not set
555# CONFIG_SCSI_INITIO is not set 578# CONFIG_SCSI_INITIO is not set
556# CONFIG_SCSI_INIA100 is not set 579# CONFIG_SCSI_INIA100 is not set
557# CONFIG_SCSI_MVSAS is not set
558# CONFIG_SCSI_STEX is not set 580# CONFIG_SCSI_STEX is not set
559# CONFIG_SCSI_SYM53C8XX_2 is not set 581# CONFIG_SCSI_SYM53C8XX_2 is not set
560# CONFIG_SCSI_IPR is not set 582# CONFIG_SCSI_IPR is not set
@@ -638,14 +660,17 @@ CONFIG_PATA_ALI=y
638# 660#
639 661
640# 662#
641# Enable only one of the two stacks, unless you know what you are doing 663# You can enable one or both FireWire driver stacks.
664#
665
666#
667# See the help texts for more information.
642# 668#
643# CONFIG_FIREWIRE is not set 669# CONFIG_FIREWIRE is not set
644# CONFIG_IEEE1394 is not set 670# CONFIG_IEEE1394 is not set
645# CONFIG_I2O is not set 671# CONFIG_I2O is not set
646# CONFIG_MACINTOSH_DRIVERS is not set 672# CONFIG_MACINTOSH_DRIVERS is not set
647CONFIG_NETDEVICES=y 673CONFIG_NETDEVICES=y
648CONFIG_COMPAT_NET_DEV_OPS=y
649CONFIG_DUMMY=y 674CONFIG_DUMMY=y
650# CONFIG_BONDING is not set 675# CONFIG_BONDING is not set
651# CONFIG_MACVLAN is not set 676# CONFIG_MACVLAN is not set
@@ -692,6 +717,7 @@ CONFIG_MII=y
692# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 717# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
693# CONFIG_NET_PCI is not set 718# CONFIG_NET_PCI is not set
694# CONFIG_B44 is not set 719# CONFIG_B44 is not set
720# CONFIG_KS8842 is not set
695# CONFIG_ATL2 is not set 721# CONFIG_ATL2 is not set
696CONFIG_NETDEV_1000=y 722CONFIG_NETDEV_1000=y
697# CONFIG_ACENIC is not set 723# CONFIG_ACENIC is not set
@@ -711,8 +737,10 @@ CONFIG_NETDEV_1000=y
711# CONFIG_VIA_VELOCITY is not set 737# CONFIG_VIA_VELOCITY is not set
712# CONFIG_TIGON3 is not set 738# CONFIG_TIGON3 is not set
713# CONFIG_BNX2 is not set 739# CONFIG_BNX2 is not set
740# CONFIG_CNIC is not set
714CONFIG_FSL_PQ_MDIO=y 741CONFIG_FSL_PQ_MDIO=y
715CONFIG_GIANFAR=y 742CONFIG_GIANFAR=y
743# CONFIG_MV643XX_ETH is not set
716# CONFIG_QLA3XXX is not set 744# CONFIG_QLA3XXX is not set
717# CONFIG_ATL1 is not set 745# CONFIG_ATL1 is not set
718# CONFIG_ATL1E is not set 746# CONFIG_ATL1E is not set
@@ -913,13 +941,17 @@ CONFIG_I2C_MPC=y
913# CONFIG_SENSORS_PCF8574 is not set 941# CONFIG_SENSORS_PCF8574 is not set
914# CONFIG_PCF8575 is not set 942# CONFIG_PCF8575 is not set
915# CONFIG_SENSORS_PCA9539 is not set 943# CONFIG_SENSORS_PCA9539 is not set
916# CONFIG_SENSORS_MAX6875 is not set
917# CONFIG_SENSORS_TSL2550 is not set 944# CONFIG_SENSORS_TSL2550 is not set
918# CONFIG_I2C_DEBUG_CORE is not set 945# CONFIG_I2C_DEBUG_CORE is not set
919# CONFIG_I2C_DEBUG_ALGO is not set 946# CONFIG_I2C_DEBUG_ALGO is not set
920# CONFIG_I2C_DEBUG_BUS is not set 947# CONFIG_I2C_DEBUG_BUS is not set
921# CONFIG_I2C_DEBUG_CHIP is not set 948# CONFIG_I2C_DEBUG_CHIP is not set
922# CONFIG_SPI is not set 949# CONFIG_SPI is not set
950
951#
952# PPS support
953#
954# CONFIG_PPS is not set
923CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 955CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
924CONFIG_ARCH_REQUIRE_GPIOLIB=y 956CONFIG_ARCH_REQUIRE_GPIOLIB=y
925CONFIG_GPIOLIB=y 957CONFIG_GPIOLIB=y
@@ -973,76 +1005,9 @@ CONFIG_SSB_POSSIBLE=y
973# CONFIG_MFD_WM8400 is not set 1005# CONFIG_MFD_WM8400 is not set
974# CONFIG_MFD_WM8350_I2C is not set 1006# CONFIG_MFD_WM8350_I2C is not set
975# CONFIG_MFD_PCF50633 is not set 1007# CONFIG_MFD_PCF50633 is not set
1008# CONFIG_AB3100_CORE is not set
976# CONFIG_REGULATOR is not set 1009# CONFIG_REGULATOR is not set
977 1010# CONFIG_MEDIA_SUPPORT is not set
978#
979# Multimedia devices
980#
981
982#
983# Multimedia core support
984#
985# CONFIG_VIDEO_DEV is not set
986CONFIG_DVB_CORE=m
987CONFIG_VIDEO_MEDIA=m
988
989#
990# Multimedia drivers
991#
992# CONFIG_MEDIA_ATTACH is not set
993CONFIG_MEDIA_TUNER=m
994# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
995CONFIG_MEDIA_TUNER_SIMPLE=m
996CONFIG_MEDIA_TUNER_TDA8290=m
997CONFIG_MEDIA_TUNER_TDA9887=m
998CONFIG_MEDIA_TUNER_TEA5761=m
999CONFIG_MEDIA_TUNER_TEA5767=m
1000CONFIG_MEDIA_TUNER_MT20XX=m
1001CONFIG_MEDIA_TUNER_XC2028=m
1002CONFIG_MEDIA_TUNER_XC5000=m
1003CONFIG_MEDIA_TUNER_MC44S803=m
1004# CONFIG_DVB_DYNAMIC_MINORS is not set
1005CONFIG_DVB_CAPTURE_DRIVERS=y
1006
1007#
1008# Supported SAA7146 based PCI Adapters
1009#
1010# CONFIG_TTPCI_EEPROM is not set
1011# CONFIG_DVB_BUDGET_CORE is not set
1012
1013#
1014# Supported USB Adapters
1015#
1016# CONFIG_DVB_USB is not set
1017# CONFIG_DVB_TTUSB_BUDGET is not set
1018# CONFIG_DVB_TTUSB_DEC is not set
1019# CONFIG_DVB_SIANO_SMS1XXX is not set
1020
1021#
1022# Supported FlexCopII (B2C2) Adapters
1023#
1024# CONFIG_DVB_B2C2_FLEXCOP is not set
1025
1026#
1027# Supported BT878 Adapters
1028#
1029
1030#
1031# Supported Pluto2 Adapters
1032#
1033# CONFIG_DVB_PLUTO2 is not set
1034
1035#
1036# Supported SDMC DM1105 Adapters
1037#
1038# CONFIG_DVB_DM1105 is not set
1039
1040#
1041# Supported DVB Frontends
1042#
1043# CONFIG_DVB_FE_CUSTOMISE is not set
1044CONFIG_DAB=y
1045# CONFIG_USB_DABUSB is not set
1046 1011
1047# 1012#
1048# Graphics support 1013# Graphics support
@@ -1082,6 +1047,11 @@ CONFIG_SND_VERBOSE_PROCFS=y
1082# CONFIG_SND_VERBOSE_PRINTK is not set 1047# CONFIG_SND_VERBOSE_PRINTK is not set
1083# CONFIG_SND_DEBUG is not set 1048# CONFIG_SND_DEBUG is not set
1084CONFIG_SND_VMASTER=y 1049CONFIG_SND_VMASTER=y
1050# CONFIG_SND_RAWMIDI_SEQ is not set
1051# CONFIG_SND_OPL3_LIB_SEQ is not set
1052# CONFIG_SND_OPL4_LIB_SEQ is not set
1053# CONFIG_SND_SBAWE_SEQ is not set
1054# CONFIG_SND_EMU10K1_SEQ is not set
1085CONFIG_SND_AC97_CODEC=y 1055CONFIG_SND_AC97_CODEC=y
1086CONFIG_SND_DRIVERS=y 1056CONFIG_SND_DRIVERS=y
1087# CONFIG_SND_DUMMY is not set 1057# CONFIG_SND_DUMMY is not set
@@ -1108,6 +1078,7 @@ CONFIG_SND_PCI=y
1108# CONFIG_SND_CS4281 is not set 1078# CONFIG_SND_CS4281 is not set
1109# CONFIG_SND_CS46XX is not set 1079# CONFIG_SND_CS46XX is not set
1110# CONFIG_SND_CS5530 is not set 1080# CONFIG_SND_CS5530 is not set
1081# CONFIG_SND_CTXFI is not set
1111# CONFIG_SND_DARLA20 is not set 1082# CONFIG_SND_DARLA20 is not set
1112# CONFIG_SND_GINA20 is not set 1083# CONFIG_SND_GINA20 is not set
1113# CONFIG_SND_LAYLA20 is not set 1084# CONFIG_SND_LAYLA20 is not set
@@ -1138,6 +1109,7 @@ CONFIG_SND_PCI=y
1138CONFIG_SND_INTEL8X0=y 1109CONFIG_SND_INTEL8X0=y
1139# CONFIG_SND_INTEL8X0M is not set 1110# CONFIG_SND_INTEL8X0M is not set
1140# CONFIG_SND_KORG1212 is not set 1111# CONFIG_SND_KORG1212 is not set
1112# CONFIG_SND_LX6464ES is not set
1141# CONFIG_SND_MAESTRO3 is not set 1113# CONFIG_SND_MAESTRO3 is not set
1142# CONFIG_SND_MIXART is not set 1114# CONFIG_SND_MIXART is not set
1143# CONFIG_SND_NM256 is not set 1115# CONFIG_SND_NM256 is not set
@@ -1182,7 +1154,7 @@ CONFIG_HID_BELKIN=y
1182CONFIG_HID_CHERRY=y 1154CONFIG_HID_CHERRY=y
1183CONFIG_HID_CHICONY=y 1155CONFIG_HID_CHICONY=y
1184CONFIG_HID_CYPRESS=y 1156CONFIG_HID_CYPRESS=y
1185# CONFIG_DRAGONRISE_FF is not set 1157# CONFIG_HID_DRAGONRISE is not set
1186CONFIG_HID_EZKEY=y 1158CONFIG_HID_EZKEY=y
1187# CONFIG_HID_KYE is not set 1159# CONFIG_HID_KYE is not set
1188CONFIG_HID_GYRATION=y 1160CONFIG_HID_GYRATION=y
@@ -1199,10 +1171,11 @@ CONFIG_HID_PETALYNX=y
1199CONFIG_HID_SAMSUNG=y 1171CONFIG_HID_SAMSUNG=y
1200CONFIG_HID_SONY=y 1172CONFIG_HID_SONY=y
1201CONFIG_HID_SUNPLUS=y 1173CONFIG_HID_SUNPLUS=y
1202# CONFIG_GREENASIA_FF is not set 1174# CONFIG_HID_GREENASIA is not set
1175# CONFIG_HID_SMARTJOYPLUS is not set
1203# CONFIG_HID_TOPSEED is not set 1176# CONFIG_HID_TOPSEED is not set
1204CONFIG_THRUSTMASTER_FF=m 1177# CONFIG_HID_THRUSTMASTER is not set
1205CONFIG_ZEROPLUS_FF=m 1178# CONFIG_HID_ZEROPLUS is not set
1206CONFIG_USB_SUPPORT=y 1179CONFIG_USB_SUPPORT=y
1207CONFIG_USB_ARCH_HAS_HCD=y 1180CONFIG_USB_ARCH_HAS_HCD=y
1208CONFIG_USB_ARCH_HAS_OHCI=y 1181CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1228,6 +1201,7 @@ CONFIG_USB_MON=y
1228# USB Host Controller Drivers 1201# USB Host Controller Drivers
1229# 1202#
1230# CONFIG_USB_C67X00_HCD is not set 1203# CONFIG_USB_C67X00_HCD is not set
1204# CONFIG_USB_XHCI_HCD is not set
1231CONFIG_USB_EHCI_HCD=y 1205CONFIG_USB_EHCI_HCD=y
1232# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1206# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1233# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1207# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1237,9 +1211,9 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y
1237# CONFIG_USB_ISP116X_HCD is not set 1211# CONFIG_USB_ISP116X_HCD is not set
1238# CONFIG_USB_ISP1760_HCD is not set 1212# CONFIG_USB_ISP1760_HCD is not set
1239CONFIG_USB_OHCI_HCD=y 1213CONFIG_USB_OHCI_HCD=y
1240CONFIG_USB_OHCI_HCD_PPC_OF=y
1241CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1214CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1242CONFIG_USB_OHCI_HCD_PPC_OF_LE=y 1215CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
1216CONFIG_USB_OHCI_HCD_PPC_OF=y
1243CONFIG_USB_OHCI_HCD_PCI=y 1217CONFIG_USB_OHCI_HCD_PCI=y
1244CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y 1218CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1245CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y 1219CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
@@ -1360,6 +1334,7 @@ CONFIG_RTC_INTF_DEV=y
1360# CONFIG_RTC_DRV_S35390A is not set 1334# CONFIG_RTC_DRV_S35390A is not set
1361# CONFIG_RTC_DRV_FM3130 is not set 1335# CONFIG_RTC_DRV_FM3130 is not set
1362# CONFIG_RTC_DRV_RX8581 is not set 1336# CONFIG_RTC_DRV_RX8581 is not set
1337# CONFIG_RTC_DRV_RX8025 is not set
1363 1338
1364# 1339#
1365# SPI RTC drivers 1340# SPI RTC drivers
@@ -1387,6 +1362,10 @@ CONFIG_RTC_DRV_CMOS=y
1387# CONFIG_DMADEVICES is not set 1362# CONFIG_DMADEVICES is not set
1388# CONFIG_AUXDISPLAY is not set 1363# CONFIG_AUXDISPLAY is not set
1389# CONFIG_UIO is not set 1364# CONFIG_UIO is not set
1365
1366#
1367# TI VLYNQ
1368#
1390# CONFIG_STAGING is not set 1369# CONFIG_STAGING is not set
1391 1370
1392# 1371#
@@ -1406,11 +1385,12 @@ CONFIG_FS_MBCACHE=y
1406# CONFIG_REISERFS_FS is not set 1385# CONFIG_REISERFS_FS is not set
1407# CONFIG_JFS_FS is not set 1386# CONFIG_JFS_FS is not set
1408# CONFIG_FS_POSIX_ACL is not set 1387# CONFIG_FS_POSIX_ACL is not set
1409CONFIG_FILE_LOCKING=y
1410# CONFIG_XFS_FS is not set 1388# CONFIG_XFS_FS is not set
1411# CONFIG_GFS2_FS is not set 1389# CONFIG_GFS2_FS is not set
1412# CONFIG_OCFS2_FS is not set 1390# CONFIG_OCFS2_FS is not set
1413# CONFIG_BTRFS_FS is not set 1391# CONFIG_BTRFS_FS is not set
1392CONFIG_FILE_LOCKING=y
1393CONFIG_FSNOTIFY=y
1414CONFIG_DNOTIFY=y 1394CONFIG_DNOTIFY=y
1415CONFIG_INOTIFY=y 1395CONFIG_INOTIFY=y
1416CONFIG_INOTIFY_USER=y 1396CONFIG_INOTIFY_USER=y
@@ -1485,6 +1465,7 @@ CONFIG_NFS_FS=y
1485CONFIG_NFS_V3=y 1465CONFIG_NFS_V3=y
1486# CONFIG_NFS_V3_ACL is not set 1466# CONFIG_NFS_V3_ACL is not set
1487CONFIG_NFS_V4=y 1467CONFIG_NFS_V4=y
1468# CONFIG_NFS_V4_1 is not set
1488CONFIG_ROOT_NFS=y 1469CONFIG_ROOT_NFS=y
1489CONFIG_NFSD=y 1470CONFIG_NFSD=y
1490# CONFIG_NFSD_V3 is not set 1471# CONFIG_NFSD_V3 is not set
@@ -1586,6 +1567,7 @@ CONFIG_HAS_IOPORT=y
1586CONFIG_HAS_DMA=y 1567CONFIG_HAS_DMA=y
1587CONFIG_HAVE_LMB=y 1568CONFIG_HAVE_LMB=y
1588CONFIG_NLATTR=y 1569CONFIG_NLATTR=y
1570CONFIG_GENERIC_ATOMIC64=y
1589 1571
1590# 1572#
1591# Kernel hacking 1573# Kernel hacking
@@ -1616,6 +1598,9 @@ CONFIG_SCHED_DEBUG=y
1616# CONFIG_RT_MUTEX_TESTER is not set 1598# CONFIG_RT_MUTEX_TESTER is not set
1617# CONFIG_DEBUG_SPINLOCK is not set 1599# CONFIG_DEBUG_SPINLOCK is not set
1618# CONFIG_DEBUG_MUTEXES is not set 1600# CONFIG_DEBUG_MUTEXES is not set
1601# CONFIG_DEBUG_LOCK_ALLOC is not set
1602# CONFIG_PROVE_LOCKING is not set
1603# CONFIG_LOCK_STAT is not set
1619# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1604# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1620# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1605# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1621# CONFIG_DEBUG_KOBJECT is not set 1606# CONFIG_DEBUG_KOBJECT is not set
@@ -1628,7 +1613,6 @@ CONFIG_DEBUG_INFO=y
1628# CONFIG_DEBUG_LIST is not set 1613# CONFIG_DEBUG_LIST is not set
1629# CONFIG_DEBUG_SG is not set 1614# CONFIG_DEBUG_SG is not set
1630# CONFIG_DEBUG_NOTIFIERS is not set 1615# CONFIG_DEBUG_NOTIFIERS is not set
1631# CONFIG_BOOT_PRINTK_DELAY is not set
1632# CONFIG_RCU_TORTURE_TEST is not set 1616# CONFIG_RCU_TORTURE_TEST is not set
1633# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1617# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1634# CONFIG_BACKTRACE_SELF_TEST is not set 1618# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1642,16 +1626,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1642CONFIG_HAVE_DYNAMIC_FTRACE=y 1626CONFIG_HAVE_DYNAMIC_FTRACE=y
1643CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1627CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1644CONFIG_TRACING_SUPPORT=y 1628CONFIG_TRACING_SUPPORT=y
1645 1629CONFIG_FTRACE=y
1646#
1647# Tracers
1648#
1649# CONFIG_FUNCTION_TRACER is not set 1630# CONFIG_FUNCTION_TRACER is not set
1631# CONFIG_IRQSOFF_TRACER is not set
1650# CONFIG_SCHED_TRACER is not set 1632# CONFIG_SCHED_TRACER is not set
1651# CONFIG_CONTEXT_SWITCH_TRACER is not set 1633# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1652# CONFIG_EVENT_TRACER is not set
1653# CONFIG_BOOT_TRACER is not set 1634# CONFIG_BOOT_TRACER is not set
1654# CONFIG_TRACE_BRANCH_PROFILING is not set 1635CONFIG_BRANCH_PROFILE_NONE=y
1636# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1637# CONFIG_PROFILE_ALL_BRANCHES is not set
1655# CONFIG_STACK_TRACER is not set 1638# CONFIG_STACK_TRACER is not set
1656# CONFIG_KMEMTRACE is not set 1639# CONFIG_KMEMTRACE is not set
1657# CONFIG_WORKQUEUE_TRACER is not set 1640# CONFIG_WORKQUEUE_TRACER is not set
@@ -1659,6 +1642,9 @@ CONFIG_TRACING_SUPPORT=y
1659# CONFIG_SAMPLES is not set 1642# CONFIG_SAMPLES is not set
1660CONFIG_HAVE_ARCH_KGDB=y 1643CONFIG_HAVE_ARCH_KGDB=y
1661# CONFIG_KGDB is not set 1644# CONFIG_KGDB is not set
1645# CONFIG_KMEMCHECK is not set
1646# CONFIG_PPC_DISABLE_WERROR is not set
1647CONFIG_PPC_WERROR=y
1662CONFIG_PRINT_STACK_DEPTH=64 1648CONFIG_PRINT_STACK_DEPTH=64
1663# CONFIG_DEBUG_STACKOVERFLOW is not set 1649# CONFIG_DEBUG_STACKOVERFLOW is not set
1664# CONFIG_DEBUG_STACK_USAGE is not set 1650# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/mpc885_ads_defconfig b/arch/powerpc/configs/mpc885_ads_defconfig
index 42e64ebc279..dbe8e869a82 100644
--- a/arch/powerpc/configs/mpc885_ads_defconfig
+++ b/arch/powerpc/configs/mpc885_ads_defconfig
@@ -1,14 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:01 2009 4# Wed Jul 29 23:31:59 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11# CONFIG_6xx is not set 11# CONFIG_PPC_BOOK3S_32 is not set
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13CONFIG_PPC_8xx=y 13CONFIG_PPC_8xx=y
14# CONFIG_40x is not set 14# CONFIG_40x is not set
@@ -27,15 +27,16 @@ CONFIG_GENERIC_TIME=y
27CONFIG_GENERIC_TIME_VSYSCALL=y 27CONFIG_GENERIC_TIME_VSYSCALL=y
28CONFIG_GENERIC_CLOCKEVENTS=y 28CONFIG_GENERIC_CLOCKEVENTS=y
29CONFIG_GENERIC_HARDIRQS=y 29CONFIG_GENERIC_HARDIRQS=y
30CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
30# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 31# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
31CONFIG_IRQ_PER_CPU=y 32CONFIG_IRQ_PER_CPU=y
32CONFIG_STACKTRACE_SUPPORT=y 33CONFIG_STACKTRACE_SUPPORT=y
33CONFIG_HAVE_LATENCYTOP_SUPPORT=y 34CONFIG_HAVE_LATENCYTOP_SUPPORT=y
35CONFIG_TRACE_IRQFLAGS_SUPPORT=y
34CONFIG_LOCKDEP_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
38CONFIG_GENERIC_CALIBRATE_DELAY=y
39CONFIG_GENERIC_FIND_NEXT_BIT=y 40CONFIG_GENERIC_FIND_NEXT_BIT=y
40# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 41# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
41CONFIG_PPC=y 42CONFIG_PPC=y
@@ -49,11 +50,13 @@ CONFIG_OF=y
49# CONFIG_GENERIC_TBSYNC is not set 50# CONFIG_GENERIC_TBSYNC is not set
50CONFIG_AUDIT_ARCH=y 51CONFIG_AUDIT_ARCH=y
51CONFIG_GENERIC_BUG=y 52CONFIG_GENERIC_BUG=y
53CONFIG_DTC=y
52# CONFIG_DEFAULT_UIMAGE is not set 54# CONFIG_DEFAULT_UIMAGE is not set
53# CONFIG_PPC_DCR_NATIVE is not set 55# CONFIG_PPC_DCR_NATIVE is not set
54# CONFIG_PPC_DCR_MMIO is not set 56# CONFIG_PPC_DCR_MMIO is not set
55CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 57CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
56CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 58CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
59CONFIG_CONSTRUCTORS=y
57 60
58# 61#
59# General setup 62# General setup
@@ -100,7 +103,6 @@ CONFIG_EMBEDDED=y
100CONFIG_KALLSYMS=y 103CONFIG_KALLSYMS=y
101# CONFIG_KALLSYMS_ALL is not set 104# CONFIG_KALLSYMS_ALL is not set
102# CONFIG_KALLSYMS_EXTRA_PASS is not set 105# CONFIG_KALLSYMS_EXTRA_PASS is not set
103# CONFIG_STRIP_ASM_SYMS is not set
104CONFIG_HOTPLUG=y 106CONFIG_HOTPLUG=y
105CONFIG_PRINTK=y 107CONFIG_PRINTK=y
106CONFIG_BUG=y 108CONFIG_BUG=y
@@ -113,8 +115,15 @@ CONFIG_TIMERFD=y
113CONFIG_EVENTFD=y 115CONFIG_EVENTFD=y
114CONFIG_SHMEM=y 116CONFIG_SHMEM=y
115CONFIG_AIO=y 117CONFIG_AIO=y
118CONFIG_HAVE_PERF_COUNTERS=y
119
120#
121# Performance Counters
122#
123# CONFIG_PERF_COUNTERS is not set
116# CONFIG_VM_EVENT_COUNTERS is not set 124# CONFIG_VM_EVENT_COUNTERS is not set
117CONFIG_SLUB_DEBUG=y 125CONFIG_SLUB_DEBUG=y
126# CONFIG_STRIP_ASM_SYMS is not set
118CONFIG_COMPAT_BRK=y 127CONFIG_COMPAT_BRK=y
119# CONFIG_SLAB is not set 128# CONFIG_SLAB is not set
120CONFIG_SLUB=y 129CONFIG_SLUB=y
@@ -128,13 +137,17 @@ CONFIG_HAVE_KPROBES=y
128CONFIG_HAVE_KRETPROBES=y 137CONFIG_HAVE_KRETPROBES=y
129CONFIG_HAVE_ARCH_TRACEHOOK=y 138CONFIG_HAVE_ARCH_TRACEHOOK=y
130CONFIG_HAVE_CLK=y 139CONFIG_HAVE_CLK=y
140
141#
142# GCOV-based kernel profiling
143#
131# CONFIG_SLOW_WORK is not set 144# CONFIG_SLOW_WORK is not set
132# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 145# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
133CONFIG_SLABINFO=y 146CONFIG_SLABINFO=y
134CONFIG_BASE_SMALL=1 147CONFIG_BASE_SMALL=1
135# CONFIG_MODULES is not set 148# CONFIG_MODULES is not set
136CONFIG_BLOCK=y 149CONFIG_BLOCK=y
137# CONFIG_LBD is not set 150CONFIG_LBDAF=y
138# CONFIG_BLK_DEV_BSG is not set 151# CONFIG_BLK_DEV_BSG is not set
139# CONFIG_BLK_DEV_INTEGRITY is not set 152# CONFIG_BLK_DEV_INTEGRITY is not set
140 153
@@ -227,6 +240,7 @@ CONFIG_BINFMT_ELF=y
227# CONFIG_MATH_EMULATION is not set 240# CONFIG_MATH_EMULATION is not set
228CONFIG_8XX_MINIMAL_FPEMU=y 241CONFIG_8XX_MINIMAL_FPEMU=y
229# CONFIG_IOMMU_HELPER is not set 242# CONFIG_IOMMU_HELPER is not set
243# CONFIG_SWIOTLB is not set
230CONFIG_PPC_NEED_DMA_SYNC_OPS=y 244CONFIG_PPC_NEED_DMA_SYNC_OPS=y
231CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 245CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
232CONFIG_ARCH_HAS_WALK_MEMORY=y 246CONFIG_ARCH_HAS_WALK_MEMORY=y
@@ -246,9 +260,9 @@ CONFIG_MIGRATION=y
246CONFIG_ZONE_DMA_FLAG=1 260CONFIG_ZONE_DMA_FLAG=1
247CONFIG_BOUNCE=y 261CONFIG_BOUNCE=y
248CONFIG_VIRT_TO_BUS=y 262CONFIG_VIRT_TO_BUS=y
249CONFIG_UNEVICTABLE_LRU=y
250CONFIG_HAVE_MLOCK=y 263CONFIG_HAVE_MLOCK=y
251CONFIG_HAVE_MLOCKED_PAGE_BIT=y 264CONFIG_HAVE_MLOCKED_PAGE_BIT=y
265CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
252CONFIG_PPC_4K_PAGES=y 266CONFIG_PPC_4K_PAGES=y
253# CONFIG_PPC_16K_PAGES is not set 267# CONFIG_PPC_16K_PAGES is not set
254# CONFIG_PPC_64K_PAGES is not set 268# CONFIG_PPC_64K_PAGES is not set
@@ -287,6 +301,7 @@ CONFIG_PAGE_OFFSET=0xc0000000
287CONFIG_KERNEL_START=0xc0000000 301CONFIG_KERNEL_START=0xc0000000
288CONFIG_PHYSICAL_START=0x00000000 302CONFIG_PHYSICAL_START=0x00000000
289CONFIG_TASK_SIZE=0x80000000 303CONFIG_TASK_SIZE=0x80000000
304CONFIG_CONSISTENT_SIZE=0x00200000
290CONFIG_NET=y 305CONFIG_NET=y
291 306
292# 307#
@@ -343,6 +358,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
343# CONFIG_ECONET is not set 358# CONFIG_ECONET is not set
344# CONFIG_WAN_ROUTER is not set 359# CONFIG_WAN_ROUTER is not set
345# CONFIG_PHONET is not set 360# CONFIG_PHONET is not set
361# CONFIG_IEEE802154 is not set
346# CONFIG_NET_SCHED is not set 362# CONFIG_NET_SCHED is not set
347# CONFIG_DCB is not set 363# CONFIG_DCB is not set
348 364
@@ -360,7 +376,11 @@ CONFIG_WIRELESS=y
360CONFIG_WIRELESS_OLD_REGULATORY=y 376CONFIG_WIRELESS_OLD_REGULATORY=y
361# CONFIG_WIRELESS_EXT is not set 377# CONFIG_WIRELESS_EXT is not set
362# CONFIG_LIB80211 is not set 378# CONFIG_LIB80211 is not set
363# CONFIG_MAC80211 is not set 379
380#
381# CFG80211 needs to be enabled for MAC80211
382#
383CONFIG_MAC80211_DEFAULT_PS_VALUE=0
364# CONFIG_WIMAX is not set 384# CONFIG_WIMAX is not set
365# CONFIG_RFKILL is not set 385# CONFIG_RFKILL is not set
366# CONFIG_NET_9P is not set 386# CONFIG_NET_9P is not set
@@ -463,6 +483,7 @@ CONFIG_MTD_PHYSMAP_OF=y
463# 483#
464# CONFIG_MTD_UBI is not set 484# CONFIG_MTD_UBI is not set
465CONFIG_OF_DEVICE=y 485CONFIG_OF_DEVICE=y
486CONFIG_OF_MDIO=y
466# CONFIG_PARPORT is not set 487# CONFIG_PARPORT is not set
467# CONFIG_BLK_DEV is not set 488# CONFIG_BLK_DEV is not set
468# CONFIG_MISC_DEVICES is not set 489# CONFIG_MISC_DEVICES is not set
@@ -480,7 +501,6 @@ CONFIG_HAVE_IDE=y
480# CONFIG_MD is not set 501# CONFIG_MD is not set
481# CONFIG_MACINTOSH_DRIVERS is not set 502# CONFIG_MACINTOSH_DRIVERS is not set
482CONFIG_NETDEVICES=y 503CONFIG_NETDEVICES=y
483CONFIG_COMPAT_NET_DEV_OPS=y
484# CONFIG_DUMMY is not set 504# CONFIG_DUMMY is not set
485# CONFIG_BONDING is not set 505# CONFIG_BONDING is not set
486# CONFIG_MACVLAN is not set 506# CONFIG_MACVLAN is not set
@@ -519,6 +539,7 @@ CONFIG_MII=y
519# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 539# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
520# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 540# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
521# CONFIG_B44 is not set 541# CONFIG_B44 is not set
542# CONFIG_KS8842 is not set
522CONFIG_FS_ENET=y 543CONFIG_FS_ENET=y
523# CONFIG_FS_ENET_HAS_SCC is not set 544# CONFIG_FS_ENET_HAS_SCC is not set
524CONFIG_FS_ENET_HAS_FEC=y 545CONFIG_FS_ENET_HAS_FEC=y
@@ -590,6 +611,11 @@ CONFIG_GEN_RTC=y
590# CONFIG_TCG_TPM is not set 611# CONFIG_TCG_TPM is not set
591# CONFIG_I2C is not set 612# CONFIG_I2C is not set
592# CONFIG_SPI is not set 613# CONFIG_SPI is not set
614
615#
616# PPS support
617#
618# CONFIG_PPS is not set
593CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 619CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
594# CONFIG_GPIOLIB is not set 620# CONFIG_GPIOLIB is not set
595# CONFIG_W1 is not set 621# CONFIG_W1 is not set
@@ -613,22 +639,7 @@ CONFIG_SSB_POSSIBLE=y
613# CONFIG_HTC_PASIC3 is not set 639# CONFIG_HTC_PASIC3 is not set
614# CONFIG_MFD_TMIO is not set 640# CONFIG_MFD_TMIO is not set
615# CONFIG_REGULATOR is not set 641# CONFIG_REGULATOR is not set
616 642# CONFIG_MEDIA_SUPPORT is not set
617#
618# Multimedia devices
619#
620
621#
622# Multimedia core support
623#
624# CONFIG_VIDEO_DEV is not set
625# CONFIG_DVB_CORE is not set
626# CONFIG_VIDEO_MEDIA is not set
627
628#
629# Multimedia drivers
630#
631CONFIG_DAB=y
632 643
633# 644#
634# Graphics support 645# Graphics support
@@ -653,6 +664,10 @@ CONFIG_DAB=y
653# CONFIG_DMADEVICES is not set 664# CONFIG_DMADEVICES is not set
654# CONFIG_AUXDISPLAY is not set 665# CONFIG_AUXDISPLAY is not set
655# CONFIG_UIO is not set 666# CONFIG_UIO is not set
667
668#
669# TI VLYNQ
670#
656# CONFIG_STAGING is not set 671# CONFIG_STAGING is not set
657 672
658# 673#
@@ -664,12 +679,15 @@ CONFIG_DAB=y
664# CONFIG_REISERFS_FS is not set 679# CONFIG_REISERFS_FS is not set
665# CONFIG_JFS_FS is not set 680# CONFIG_JFS_FS is not set
666# CONFIG_FS_POSIX_ACL is not set 681# CONFIG_FS_POSIX_ACL is not set
667CONFIG_FILE_LOCKING=y
668# CONFIG_XFS_FS is not set 682# CONFIG_XFS_FS is not set
683# CONFIG_GFS2_FS is not set
669# CONFIG_OCFS2_FS is not set 684# CONFIG_OCFS2_FS is not set
670# CONFIG_BTRFS_FS is not set 685# CONFIG_BTRFS_FS is not set
686CONFIG_FILE_LOCKING=y
687CONFIG_FSNOTIFY=y
671# CONFIG_DNOTIFY is not set 688# CONFIG_DNOTIFY is not set
672# CONFIG_INOTIFY is not set 689# CONFIG_INOTIFY is not set
690CONFIG_INOTIFY_USER=y
673# CONFIG_QUOTA is not set 691# CONFIG_QUOTA is not set
674# CONFIG_AUTOFS_FS is not set 692# CONFIG_AUTOFS_FS is not set
675# CONFIG_AUTOFS4_FS is not set 693# CONFIG_AUTOFS4_FS is not set
@@ -786,6 +804,7 @@ CONFIG_HAS_IOPORT=y
786CONFIG_HAS_DMA=y 804CONFIG_HAS_DMA=y
787CONFIG_HAVE_LMB=y 805CONFIG_HAVE_LMB=y
788CONFIG_NLATTR=y 806CONFIG_NLATTR=y
807CONFIG_GENERIC_ATOMIC64=y
789 808
790# 809#
791# Kernel hacking 810# Kernel hacking
@@ -814,6 +833,9 @@ CONFIG_SCHED_DEBUG=y
814# CONFIG_SLUB_STATS is not set 833# CONFIG_SLUB_STATS is not set
815# CONFIG_DEBUG_SPINLOCK is not set 834# CONFIG_DEBUG_SPINLOCK is not set
816# CONFIG_DEBUG_MUTEXES is not set 835# CONFIG_DEBUG_MUTEXES is not set
836# CONFIG_DEBUG_LOCK_ALLOC is not set
837# CONFIG_PROVE_LOCKING is not set
838# CONFIG_LOCK_STAT is not set
817# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 839# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
818# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 840# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
819# CONFIG_DEBUG_KOBJECT is not set 841# CONFIG_DEBUG_KOBJECT is not set
@@ -825,7 +847,6 @@ CONFIG_DEBUG_INFO=y
825# CONFIG_DEBUG_LIST is not set 847# CONFIG_DEBUG_LIST is not set
826# CONFIG_DEBUG_SG is not set 848# CONFIG_DEBUG_SG is not set
827# CONFIG_DEBUG_NOTIFIERS is not set 849# CONFIG_DEBUG_NOTIFIERS is not set
828# CONFIG_BOOT_PRINTK_DELAY is not set
829# CONFIG_RCU_TORTURE_TEST is not set 850# CONFIG_RCU_TORTURE_TEST is not set
830# CONFIG_RCU_CPU_STALL_DETECTOR is not set 851# CONFIG_RCU_CPU_STALL_DETECTOR is not set
831# CONFIG_BACKTRACE_SELF_TEST is not set 852# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -838,16 +859,15 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
838CONFIG_HAVE_DYNAMIC_FTRACE=y 859CONFIG_HAVE_DYNAMIC_FTRACE=y
839CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 860CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
840CONFIG_TRACING_SUPPORT=y 861CONFIG_TRACING_SUPPORT=y
841 862CONFIG_FTRACE=y
842#
843# Tracers
844#
845# CONFIG_FUNCTION_TRACER is not set 863# CONFIG_FUNCTION_TRACER is not set
864# CONFIG_IRQSOFF_TRACER is not set
846# CONFIG_SCHED_TRACER is not set 865# CONFIG_SCHED_TRACER is not set
847# CONFIG_CONTEXT_SWITCH_TRACER is not set 866# CONFIG_ENABLE_DEFAULT_TRACERS is not set
848# CONFIG_EVENT_TRACER is not set
849# CONFIG_BOOT_TRACER is not set 867# CONFIG_BOOT_TRACER is not set
850# CONFIG_TRACE_BRANCH_PROFILING is not set 868CONFIG_BRANCH_PROFILE_NONE=y
869# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
870# CONFIG_PROFILE_ALL_BRANCHES is not set
851# CONFIG_STACK_TRACER is not set 871# CONFIG_STACK_TRACER is not set
852# CONFIG_KMEMTRACE is not set 872# CONFIG_KMEMTRACE is not set
853# CONFIG_WORKQUEUE_TRACER is not set 873# CONFIG_WORKQUEUE_TRACER is not set
@@ -855,6 +875,9 @@ CONFIG_TRACING_SUPPORT=y
855# CONFIG_SAMPLES is not set 875# CONFIG_SAMPLES is not set
856CONFIG_HAVE_ARCH_KGDB=y 876CONFIG_HAVE_ARCH_KGDB=y
857# CONFIG_KGDB is not set 877# CONFIG_KGDB is not set
878# CONFIG_KMEMCHECK is not set
879# CONFIG_PPC_DISABLE_WERROR is not set
880CONFIG_PPC_WERROR=y
858CONFIG_PRINT_STACK_DEPTH=64 881CONFIG_PRINT_STACK_DEPTH=64
859# CONFIG_DEBUG_STACKOVERFLOW is not set 882# CONFIG_DEBUG_STACKOVERFLOW is not set
860# CONFIG_DEBUG_STACK_USAGE is not set 883# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/pq2fads_defconfig b/arch/powerpc/configs/pq2fads_defconfig
index 129d80860f2..ff96bb43c32 100644
--- a/arch/powerpc/configs/pq2fads_defconfig
+++ b/arch/powerpc/configs/pq2fads_defconfig
@@ -1,25 +1,27 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:02 2009 4# Wed Jul 29 23:32:00 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_ALTIVEC is not set 20# CONFIG_ALTIVEC is not set
20CONFIG_PPC_STD_MMU=y 21CONFIG_PPC_STD_MMU=y
21CONFIG_PPC_STD_MMU_32=y 22CONFIG_PPC_STD_MMU_32=y
22# CONFIG_PPC_MM_SLICES is not set 23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC_HAVE_PMU_SUPPORT=y
23# CONFIG_SMP is not set 25# CONFIG_SMP is not set
24CONFIG_PPC32=y 26CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32 27CONFIG_WORD_SIZE=32
@@ -30,15 +32,16 @@ CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y 32CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y 33CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 34CONFIG_GENERIC_HARDIRQS=y
35CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 36# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 37CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y 38CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_HAVE_LATENCYTOP_SUPPORT=y 39CONFIG_HAVE_LATENCYTOP_SUPPORT=y
40CONFIG_TRACE_IRQFLAGS_SUPPORT=y
37CONFIG_LOCKDEP_SUPPORT=y 41CONFIG_LOCKDEP_SUPPORT=y
38CONFIG_RWSEM_XCHGADD_ALGORITHM=y 42CONFIG_RWSEM_XCHGADD_ALGORITHM=y
39CONFIG_ARCH_HAS_ILOG2_U32=y 43CONFIG_ARCH_HAS_ILOG2_U32=y
40CONFIG_GENERIC_HWEIGHT=y 44CONFIG_GENERIC_HWEIGHT=y
41CONFIG_GENERIC_CALIBRATE_DELAY=y
42CONFIG_GENERIC_FIND_NEXT_BIT=y 45CONFIG_GENERIC_FIND_NEXT_BIT=y
43CONFIG_GENERIC_GPIO=y 46CONFIG_GENERIC_GPIO=y
44# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 47# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
@@ -53,11 +56,13 @@ CONFIG_OF=y
53# CONFIG_GENERIC_TBSYNC is not set 56# CONFIG_GENERIC_TBSYNC is not set
54CONFIG_AUDIT_ARCH=y 57CONFIG_AUDIT_ARCH=y
55CONFIG_GENERIC_BUG=y 58CONFIG_GENERIC_BUG=y
59CONFIG_DTC=y
56CONFIG_DEFAULT_UIMAGE=y 60CONFIG_DEFAULT_UIMAGE=y
57# CONFIG_PPC_DCR_NATIVE is not set 61# CONFIG_PPC_DCR_NATIVE is not set
58# CONFIG_PPC_DCR_MMIO is not set 62# CONFIG_PPC_DCR_MMIO is not set
59CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 63CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
60CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 64CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
65CONFIG_CONSTRUCTORS=y
61 66
62# 67#
63# General setup 68# General setup
@@ -103,7 +108,6 @@ CONFIG_SYSCTL_SYSCALL=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
106# CONFIG_STRIP_ASM_SYMS is not set
107CONFIG_HOTPLUG=y 111CONFIG_HOTPLUG=y
108CONFIG_PRINTK=y 112CONFIG_PRINTK=y
109CONFIG_BUG=y 113CONFIG_BUG=y
@@ -116,9 +120,16 @@ CONFIG_TIMERFD=y
116CONFIG_EVENTFD=y 120CONFIG_EVENTFD=y
117CONFIG_SHMEM=y 121CONFIG_SHMEM=y
118CONFIG_AIO=y 122CONFIG_AIO=y
123CONFIG_HAVE_PERF_COUNTERS=y
124
125#
126# Performance Counters
127#
128# CONFIG_PERF_COUNTERS is not set
119CONFIG_VM_EVENT_COUNTERS=y 129CONFIG_VM_EVENT_COUNTERS=y
120CONFIG_PCI_QUIRKS=y 130CONFIG_PCI_QUIRKS=y
121CONFIG_SLUB_DEBUG=y 131CONFIG_SLUB_DEBUG=y
132# CONFIG_STRIP_ASM_SYMS is not set
122CONFIG_COMPAT_BRK=y 133CONFIG_COMPAT_BRK=y
123# CONFIG_SLAB is not set 134# CONFIG_SLAB is not set
124CONFIG_SLUB=y 135CONFIG_SLUB=y
@@ -132,6 +143,10 @@ CONFIG_HAVE_KPROBES=y
132CONFIG_HAVE_KRETPROBES=y 143CONFIG_HAVE_KRETPROBES=y
133CONFIG_HAVE_ARCH_TRACEHOOK=y 144CONFIG_HAVE_ARCH_TRACEHOOK=y
134CONFIG_HAVE_CLK=y 145CONFIG_HAVE_CLK=y
146
147#
148# GCOV-based kernel profiling
149#
135# CONFIG_SLOW_WORK is not set 150# CONFIG_SLOW_WORK is not set
136# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 151# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
137CONFIG_SLABINFO=y 152CONFIG_SLABINFO=y
@@ -139,7 +154,7 @@ CONFIG_RT_MUTEXES=y
139CONFIG_BASE_SMALL=0 154CONFIG_BASE_SMALL=0
140# CONFIG_MODULES is not set 155# CONFIG_MODULES is not set
141CONFIG_BLOCK=y 156CONFIG_BLOCK=y
142# CONFIG_LBD is not set 157CONFIG_LBDAF=y
143# CONFIG_BLK_DEV_INTEGRITY is not set 158# CONFIG_BLK_DEV_INTEGRITY is not set
144 159
145# 160#
@@ -219,6 +234,7 @@ CONFIG_BINFMT_ELF=y
219# CONFIG_HAVE_AOUT is not set 234# CONFIG_HAVE_AOUT is not set
220CONFIG_BINFMT_MISC=y 235CONFIG_BINFMT_MISC=y
221# CONFIG_IOMMU_HELPER is not set 236# CONFIG_IOMMU_HELPER is not set
237# CONFIG_SWIOTLB is not set
222CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 238CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
223CONFIG_ARCH_HAS_WALK_MEMORY=y 239CONFIG_ARCH_HAS_WALK_MEMORY=y
224CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 240CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -234,9 +250,9 @@ CONFIG_MIGRATION=y
234CONFIG_ZONE_DMA_FLAG=1 250CONFIG_ZONE_DMA_FLAG=1
235CONFIG_BOUNCE=y 251CONFIG_BOUNCE=y
236CONFIG_VIRT_TO_BUS=y 252CONFIG_VIRT_TO_BUS=y
237CONFIG_UNEVICTABLE_LRU=y
238CONFIG_HAVE_MLOCK=y 253CONFIG_HAVE_MLOCK=y
239CONFIG_HAVE_MLOCKED_PAGE_BIT=y 254CONFIG_HAVE_MLOCKED_PAGE_BIT=y
255CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
240CONFIG_PPC_4K_PAGES=y 256CONFIG_PPC_4K_PAGES=y
241# CONFIG_PPC_16K_PAGES is not set 257# CONFIG_PPC_16K_PAGES is not set
242# CONFIG_PPC_64K_PAGES is not set 258# CONFIG_PPC_64K_PAGES is not set
@@ -307,6 +323,7 @@ CONFIG_IP_PNP_BOOTP=y
307# CONFIG_NET_IPIP is not set 323# CONFIG_NET_IPIP is not set
308# CONFIG_NET_IPGRE is not set 324# CONFIG_NET_IPGRE is not set
309# CONFIG_IP_MROUTE is not set 325# CONFIG_IP_MROUTE is not set
326# CONFIG_ARPD is not set
310CONFIG_SYN_COOKIES=y 327CONFIG_SYN_COOKIES=y
311# CONFIG_INET_AH is not set 328# CONFIG_INET_AH is not set
312# CONFIG_INET_ESP is not set 329# CONFIG_INET_ESP is not set
@@ -387,7 +404,11 @@ CONFIG_WIRELESS=y
387CONFIG_WIRELESS_OLD_REGULATORY=y 404CONFIG_WIRELESS_OLD_REGULATORY=y
388# CONFIG_WIRELESS_EXT is not set 405# CONFIG_WIRELESS_EXT is not set
389# CONFIG_LIB80211 is not set 406# CONFIG_LIB80211 is not set
390# CONFIG_MAC80211 is not set 407
408#
409# CFG80211 needs to be enabled for MAC80211
410#
411CONFIG_MAC80211_DEFAULT_PS_VALUE=0
391# CONFIG_WIMAX is not set 412# CONFIG_WIMAX is not set
392# CONFIG_RFKILL is not set 413# CONFIG_RFKILL is not set
393 414
@@ -493,6 +514,7 @@ CONFIG_MTD_PHYSMAP_OF=y
493# CONFIG_MTD_UBI is not set 514# CONFIG_MTD_UBI is not set
494CONFIG_OF_DEVICE=y 515CONFIG_OF_DEVICE=y
495CONFIG_OF_GPIO=y 516CONFIG_OF_GPIO=y
517CONFIG_OF_MDIO=y
496# CONFIG_PARPORT is not set 518# CONFIG_PARPORT is not set
497CONFIG_BLK_DEV=y 519CONFIG_BLK_DEV=y
498# CONFIG_BLK_DEV_FD is not set 520# CONFIG_BLK_DEV_FD is not set
@@ -518,6 +540,7 @@ CONFIG_MISC_DEVICES=y
518# EEPROM support 540# EEPROM support
519# 541#
520# CONFIG_EEPROM_93CX6 is not set 542# CONFIG_EEPROM_93CX6 is not set
543# CONFIG_CB710_CORE is not set
521CONFIG_HAVE_IDE=y 544CONFIG_HAVE_IDE=y
522CONFIG_IDE=y 545CONFIG_IDE=y
523 546
@@ -583,13 +606,17 @@ CONFIG_IDE_PROC_FS=y
583# 606#
584 607
585# 608#
586# A new alternative FireWire stack is available with EXPERIMENTAL=y 609# You can enable one or both FireWire driver stacks.
610#
611
612#
613# See the help texts for more information.
587# 614#
615# CONFIG_FIREWIRE is not set
588# CONFIG_IEEE1394 is not set 616# CONFIG_IEEE1394 is not set
589# CONFIG_I2O is not set 617# CONFIG_I2O is not set
590# CONFIG_MACINTOSH_DRIVERS is not set 618# CONFIG_MACINTOSH_DRIVERS is not set
591CONFIG_NETDEVICES=y 619CONFIG_NETDEVICES=y
592CONFIG_COMPAT_NET_DEV_OPS=y
593# CONFIG_DUMMY is not set 620# CONFIG_DUMMY is not set
594# CONFIG_BONDING is not set 621# CONFIG_BONDING is not set
595# CONFIG_EQUALIZER is not set 622# CONFIG_EQUALIZER is not set
@@ -636,6 +663,7 @@ CONFIG_MII=y
636# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 663# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
637# CONFIG_NET_PCI is not set 664# CONFIG_NET_PCI is not set
638# CONFIG_B44 is not set 665# CONFIG_B44 is not set
666# CONFIG_KS8842 is not set
639# CONFIG_ATL2 is not set 667# CONFIG_ATL2 is not set
640CONFIG_FS_ENET=y 668CONFIG_FS_ENET=y
641# CONFIG_FS_ENET_HAS_SCC is not set 669# CONFIG_FS_ENET_HAS_SCC is not set
@@ -657,8 +685,10 @@ CONFIG_NETDEV_1000=y
657# CONFIG_VIA_VELOCITY is not set 685# CONFIG_VIA_VELOCITY is not set
658# CONFIG_TIGON3 is not set 686# CONFIG_TIGON3 is not set
659# CONFIG_BNX2 is not set 687# CONFIG_BNX2 is not set
688# CONFIG_CNIC is not set
660# CONFIG_FSL_PQ_MDIO is not set 689# CONFIG_FSL_PQ_MDIO is not set
661# CONFIG_GIANFAR is not set 690# CONFIG_GIANFAR is not set
691# CONFIG_MV643XX_ETH is not set
662# CONFIG_QLA3XXX is not set 692# CONFIG_QLA3XXX is not set
663# CONFIG_ATL1 is not set 693# CONFIG_ATL1 is not set
664# CONFIG_JME is not set 694# CONFIG_JME is not set
@@ -730,12 +760,13 @@ CONFIG_INPUT_EVDEV=y
730# 760#
731CONFIG_INPUT_KEYBOARD=y 761CONFIG_INPUT_KEYBOARD=y
732CONFIG_KEYBOARD_ATKBD=y 762CONFIG_KEYBOARD_ATKBD=y
733# CONFIG_KEYBOARD_SUNKBD is not set
734# CONFIG_KEYBOARD_LKKBD is not set 763# CONFIG_KEYBOARD_LKKBD is not set
735# CONFIG_KEYBOARD_XTKBD is not set 764# CONFIG_KEYBOARD_GPIO is not set
765# CONFIG_KEYBOARD_MATRIX is not set
736# CONFIG_KEYBOARD_NEWTON is not set 766# CONFIG_KEYBOARD_NEWTON is not set
737# CONFIG_KEYBOARD_STOWAWAY is not set 767# CONFIG_KEYBOARD_STOWAWAY is not set
738# CONFIG_KEYBOARD_GPIO is not set 768# CONFIG_KEYBOARD_SUNKBD is not set
769# CONFIG_KEYBOARD_XTKBD is not set
739CONFIG_INPUT_MOUSE=y 770CONFIG_INPUT_MOUSE=y
740CONFIG_MOUSE_PS2=y 771CONFIG_MOUSE_PS2=y
741CONFIG_MOUSE_PS2_ALPS=y 772CONFIG_MOUSE_PS2_ALPS=y
@@ -802,6 +833,10 @@ CONFIG_HW_RANDOM=y
802CONFIG_DEVPORT=y 833CONFIG_DEVPORT=y
803# CONFIG_I2C is not set 834# CONFIG_I2C is not set
804# CONFIG_SPI is not set 835# CONFIG_SPI is not set
836
837#
838# PPS support
839#
805CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 840CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
806CONFIG_ARCH_REQUIRE_GPIOLIB=y 841CONFIG_ARCH_REQUIRE_GPIOLIB=y
807CONFIG_GPIOLIB=y 842CONFIG_GPIOLIB=y
@@ -845,22 +880,7 @@ CONFIG_SSB_POSSIBLE=y
845# CONFIG_HTC_PASIC3 is not set 880# CONFIG_HTC_PASIC3 is not set
846# CONFIG_MFD_TMIO is not set 881# CONFIG_MFD_TMIO is not set
847# CONFIG_REGULATOR is not set 882# CONFIG_REGULATOR is not set
848 883# CONFIG_MEDIA_SUPPORT is not set
849#
850# Multimedia devices
851#
852
853#
854# Multimedia core support
855#
856# CONFIG_VIDEO_DEV is not set
857# CONFIG_DVB_CORE is not set
858# CONFIG_VIDEO_MEDIA is not set
859
860#
861# Multimedia drivers
862#
863CONFIG_DAB=y
864 884
865# 885#
866# Graphics support 886# Graphics support
@@ -903,8 +923,9 @@ CONFIG_USB_GADGET_SELECTED=y
903# CONFIG_USB_GADGET_OMAP is not set 923# CONFIG_USB_GADGET_OMAP is not set
904# CONFIG_USB_GADGET_PXA25X is not set 924# CONFIG_USB_GADGET_PXA25X is not set
905# CONFIG_USB_GADGET_PXA27X is not set 925# CONFIG_USB_GADGET_PXA27X is not set
906# CONFIG_USB_GADGET_S3C2410 is not set 926# CONFIG_USB_GADGET_S3C_HSOTG is not set
907# CONFIG_USB_GADGET_IMX is not set 927# CONFIG_USB_GADGET_IMX is not set
928# CONFIG_USB_GADGET_S3C2410 is not set
908CONFIG_USB_GADGET_M66592=y 929CONFIG_USB_GADGET_M66592=y
909CONFIG_USB_M66592=y 930CONFIG_USB_M66592=y
910# CONFIG_USB_GADGET_AMD5536UDC is not set 931# CONFIG_USB_GADGET_AMD5536UDC is not set
@@ -912,9 +933,11 @@ CONFIG_USB_M66592=y
912# CONFIG_USB_GADGET_CI13XXX is not set 933# CONFIG_USB_GADGET_CI13XXX is not set
913# CONFIG_USB_GADGET_NET2280 is not set 934# CONFIG_USB_GADGET_NET2280 is not set
914# CONFIG_USB_GADGET_GOKU is not set 935# CONFIG_USB_GADGET_GOKU is not set
936# CONFIG_USB_GADGET_LANGWELL is not set
915# CONFIG_USB_GADGET_DUMMY_HCD is not set 937# CONFIG_USB_GADGET_DUMMY_HCD is not set
916CONFIG_USB_GADGET_DUALSPEED=y 938CONFIG_USB_GADGET_DUALSPEED=y
917# CONFIG_USB_ZERO is not set 939# CONFIG_USB_ZERO is not set
940# CONFIG_USB_AUDIO is not set
918CONFIG_USB_ETH=y 941CONFIG_USB_ETH=y
919CONFIG_USB_ETH_RNDIS=y 942CONFIG_USB_ETH_RNDIS=y
920# CONFIG_USB_GADGETFS is not set 943# CONFIG_USB_GADGETFS is not set
@@ -939,6 +962,10 @@ CONFIG_USB_ETH_RNDIS=y
939# CONFIG_DMADEVICES is not set 962# CONFIG_DMADEVICES is not set
940# CONFIG_AUXDISPLAY is not set 963# CONFIG_AUXDISPLAY is not set
941# CONFIG_UIO is not set 964# CONFIG_UIO is not set
965
966#
967# TI VLYNQ
968#
942# CONFIG_STAGING is not set 969# CONFIG_STAGING is not set
943 970
944# 971#
@@ -958,9 +985,10 @@ CONFIG_FS_MBCACHE=y
958# CONFIG_REISERFS_FS is not set 985# CONFIG_REISERFS_FS is not set
959# CONFIG_JFS_FS is not set 986# CONFIG_JFS_FS is not set
960CONFIG_FS_POSIX_ACL=y 987CONFIG_FS_POSIX_ACL=y
961CONFIG_FILE_LOCKING=y
962# CONFIG_XFS_FS is not set 988# CONFIG_XFS_FS is not set
963# CONFIG_OCFS2_FS is not set 989# CONFIG_OCFS2_FS is not set
990CONFIG_FILE_LOCKING=y
991CONFIG_FSNOTIFY=y
964CONFIG_DNOTIFY=y 992CONFIG_DNOTIFY=y
965CONFIG_INOTIFY=y 993CONFIG_INOTIFY=y
966CONFIG_INOTIFY_USER=y 994CONFIG_INOTIFY_USER=y
@@ -1110,6 +1138,7 @@ CONFIG_HAS_IOPORT=y
1110CONFIG_HAS_DMA=y 1138CONFIG_HAS_DMA=y
1111CONFIG_HAVE_LMB=y 1139CONFIG_HAVE_LMB=y
1112CONFIG_NLATTR=y 1140CONFIG_NLATTR=y
1141CONFIG_GENERIC_ATOMIC64=y
1113 1142
1114# 1143#
1115# Kernel hacking 1144# Kernel hacking
@@ -1140,6 +1169,9 @@ CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1140# CONFIG_RT_MUTEX_TESTER is not set 1169# CONFIG_RT_MUTEX_TESTER is not set
1141# CONFIG_DEBUG_SPINLOCK is not set 1170# CONFIG_DEBUG_SPINLOCK is not set
1142# CONFIG_DEBUG_MUTEXES is not set 1171# CONFIG_DEBUG_MUTEXES is not set
1172# CONFIG_DEBUG_LOCK_ALLOC is not set
1173# CONFIG_PROVE_LOCKING is not set
1174# CONFIG_LOCK_STAT is not set
1143# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1175# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1144# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1176# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1145# CONFIG_DEBUG_KOBJECT is not set 1177# CONFIG_DEBUG_KOBJECT is not set
@@ -1151,7 +1183,6 @@ CONFIG_DEBUG_INFO=y
1151# CONFIG_DEBUG_LIST is not set 1183# CONFIG_DEBUG_LIST is not set
1152# CONFIG_DEBUG_SG is not set 1184# CONFIG_DEBUG_SG is not set
1153# CONFIG_DEBUG_NOTIFIERS is not set 1185# CONFIG_DEBUG_NOTIFIERS is not set
1154# CONFIG_BOOT_PRINTK_DELAY is not set
1155# CONFIG_RCU_TORTURE_TEST is not set 1186# CONFIG_RCU_TORTURE_TEST is not set
1156# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1187# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1157# CONFIG_BACKTRACE_SELF_TEST is not set 1188# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1165,22 +1196,23 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1165CONFIG_HAVE_DYNAMIC_FTRACE=y 1196CONFIG_HAVE_DYNAMIC_FTRACE=y
1166CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1197CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1167CONFIG_TRACING_SUPPORT=y 1198CONFIG_TRACING_SUPPORT=y
1168 1199CONFIG_FTRACE=y
1169#
1170# Tracers
1171#
1172# CONFIG_FUNCTION_TRACER is not set 1200# CONFIG_FUNCTION_TRACER is not set
1201# CONFIG_IRQSOFF_TRACER is not set
1173# CONFIG_SCHED_TRACER is not set 1202# CONFIG_SCHED_TRACER is not set
1174# CONFIG_CONTEXT_SWITCH_TRACER is not set 1203# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1175# CONFIG_EVENT_TRACER is not set
1176# CONFIG_BOOT_TRACER is not set 1204# CONFIG_BOOT_TRACER is not set
1177# CONFIG_TRACE_BRANCH_PROFILING is not set 1205CONFIG_BRANCH_PROFILE_NONE=y
1206# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1207# CONFIG_PROFILE_ALL_BRANCHES is not set
1178# CONFIG_STACK_TRACER is not set 1208# CONFIG_STACK_TRACER is not set
1179# CONFIG_KMEMTRACE is not set 1209# CONFIG_KMEMTRACE is not set
1180# CONFIG_WORKQUEUE_TRACER is not set 1210# CONFIG_WORKQUEUE_TRACER is not set
1181# CONFIG_BLK_DEV_IO_TRACE is not set 1211# CONFIG_BLK_DEV_IO_TRACE is not set
1182# CONFIG_SAMPLES is not set 1212# CONFIG_SAMPLES is not set
1183CONFIG_HAVE_ARCH_KGDB=y 1213CONFIG_HAVE_ARCH_KGDB=y
1214# CONFIG_PPC_DISABLE_WERROR is not set
1215CONFIG_PPC_WERROR=y
1184CONFIG_PRINT_STACK_DEPTH=64 1216CONFIG_PRINT_STACK_DEPTH=64
1185# CONFIG_DEBUG_STACKOVERFLOW is not set 1217# CONFIG_DEBUG_STACKOVERFLOW is not set
1186# CONFIG_DEBUG_STACK_USAGE is not set 1218# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/powerpc/configs/prpmc2800_defconfig b/arch/powerpc/configs/prpmc2800_defconfig
index e9f287f313f..1293c465d7f 100644
--- a/arch/powerpc/configs/prpmc2800_defconfig
+++ b/arch/powerpc/configs/prpmc2800_defconfig
@@ -1,25 +1,27 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:03 2009 4# Wed Jul 29 23:32:01 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19CONFIG_ALTIVEC=y 20CONFIG_ALTIVEC=y
20CONFIG_PPC_STD_MMU=y 21CONFIG_PPC_STD_MMU=y
21CONFIG_PPC_STD_MMU_32=y 22CONFIG_PPC_STD_MMU_32=y
22# CONFIG_PPC_MM_SLICES is not set 23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC_HAVE_PMU_SUPPORT=y
23# CONFIG_SMP is not set 25# CONFIG_SMP is not set
24CONFIG_NOT_COHERENT_CACHE=y 26CONFIG_NOT_COHERENT_CACHE=y
25CONFIG_CHECK_CACHE_COHERENCY=y 27CONFIG_CHECK_CACHE_COHERENCY=y
@@ -32,15 +34,16 @@ CONFIG_GENERIC_TIME=y
32CONFIG_GENERIC_TIME_VSYSCALL=y 34CONFIG_GENERIC_TIME_VSYSCALL=y
33CONFIG_GENERIC_CLOCKEVENTS=y 35CONFIG_GENERIC_CLOCKEVENTS=y
34CONFIG_GENERIC_HARDIRQS=y 36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
35# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
36CONFIG_IRQ_PER_CPU=y 39CONFIG_IRQ_PER_CPU=y
37CONFIG_STACKTRACE_SUPPORT=y 40CONFIG_STACKTRACE_SUPPORT=y
38CONFIG_HAVE_LATENCYTOP_SUPPORT=y 41CONFIG_HAVE_LATENCYTOP_SUPPORT=y
42CONFIG_TRACE_IRQFLAGS_SUPPORT=y
39CONFIG_LOCKDEP_SUPPORT=y 43CONFIG_LOCKDEP_SUPPORT=y
40CONFIG_RWSEM_XCHGADD_ALGORITHM=y 44CONFIG_RWSEM_XCHGADD_ALGORITHM=y
41CONFIG_ARCH_HAS_ILOG2_U32=y 45CONFIG_ARCH_HAS_ILOG2_U32=y
42CONFIG_GENERIC_HWEIGHT=y 46CONFIG_GENERIC_HWEIGHT=y
43CONFIG_GENERIC_CALIBRATE_DELAY=y
44CONFIG_GENERIC_FIND_NEXT_BIT=y 47CONFIG_GENERIC_FIND_NEXT_BIT=y
45# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 48# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
46CONFIG_PPC=y 49CONFIG_PPC=y
@@ -54,11 +57,13 @@ CONFIG_OF=y
54# CONFIG_GENERIC_TBSYNC is not set 57# CONFIG_GENERIC_TBSYNC is not set
55CONFIG_AUDIT_ARCH=y 58CONFIG_AUDIT_ARCH=y
56CONFIG_GENERIC_BUG=y 59CONFIG_GENERIC_BUG=y
60CONFIG_DTC=y
57# CONFIG_DEFAULT_UIMAGE is not set 61# CONFIG_DEFAULT_UIMAGE is not set
58# CONFIG_PPC_DCR_NATIVE is not set 62# CONFIG_PPC_DCR_NATIVE is not set
59# CONFIG_PPC_DCR_MMIO is not set 63# CONFIG_PPC_DCR_MMIO is not set
60CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 64CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
61CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66CONFIG_CONSTRUCTORS=y
62 67
63# 68#
64# General setup 69# General setup
@@ -114,7 +119,6 @@ CONFIG_ANON_INODES=y
114CONFIG_SYSCTL_SYSCALL=y 119CONFIG_SYSCTL_SYSCALL=y
115CONFIG_KALLSYMS=y 120CONFIG_KALLSYMS=y
116# CONFIG_KALLSYMS_EXTRA_PASS is not set 121# CONFIG_KALLSYMS_EXTRA_PASS is not set
117# CONFIG_STRIP_ASM_SYMS is not set
118CONFIG_HOTPLUG=y 122CONFIG_HOTPLUG=y
119CONFIG_PRINTK=y 123CONFIG_PRINTK=y
120CONFIG_BUG=y 124CONFIG_BUG=y
@@ -127,9 +131,16 @@ CONFIG_TIMERFD=y
127CONFIG_EVENTFD=y 131CONFIG_EVENTFD=y
128CONFIG_SHMEM=y 132CONFIG_SHMEM=y
129CONFIG_AIO=y 133CONFIG_AIO=y
134CONFIG_HAVE_PERF_COUNTERS=y
135
136#
137# Performance Counters
138#
139# CONFIG_PERF_COUNTERS is not set
130CONFIG_VM_EVENT_COUNTERS=y 140CONFIG_VM_EVENT_COUNTERS=y
131CONFIG_PCI_QUIRKS=y 141CONFIG_PCI_QUIRKS=y
132CONFIG_SLUB_DEBUG=y 142CONFIG_SLUB_DEBUG=y
143# CONFIG_STRIP_ASM_SYMS is not set
133CONFIG_COMPAT_BRK=y 144CONFIG_COMPAT_BRK=y
134# CONFIG_SLAB is not set 145# CONFIG_SLAB is not set
135CONFIG_SLUB=y 146CONFIG_SLUB=y
@@ -142,6 +153,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
142CONFIG_HAVE_KPROBES=y 153CONFIG_HAVE_KPROBES=y
143CONFIG_HAVE_KRETPROBES=y 154CONFIG_HAVE_KRETPROBES=y
144CONFIG_HAVE_ARCH_TRACEHOOK=y 155CONFIG_HAVE_ARCH_TRACEHOOK=y
156
157#
158# GCOV-based kernel profiling
159#
145# CONFIG_SLOW_WORK is not set 160# CONFIG_SLOW_WORK is not set
146# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 161# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
147CONFIG_SLABINFO=y 162CONFIG_SLABINFO=y
@@ -149,7 +164,7 @@ CONFIG_RT_MUTEXES=y
149CONFIG_BASE_SMALL=0 164CONFIG_BASE_SMALL=0
150# CONFIG_MODULES is not set 165# CONFIG_MODULES is not set
151CONFIG_BLOCK=y 166CONFIG_BLOCK=y
152CONFIG_LBD=y 167CONFIG_LBDAF=y
153# CONFIG_BLK_DEV_BSG is not set 168# CONFIG_BLK_DEV_BSG is not set
154# CONFIG_BLK_DEV_INTEGRITY is not set 169# CONFIG_BLK_DEV_INTEGRITY is not set
155 170
@@ -228,6 +243,7 @@ CONFIG_BINFMT_ELF=y
228# CONFIG_HAVE_AOUT is not set 243# CONFIG_HAVE_AOUT is not set
229CONFIG_BINFMT_MISC=y 244CONFIG_BINFMT_MISC=y
230# CONFIG_IOMMU_HELPER is not set 245# CONFIG_IOMMU_HELPER is not set
246# CONFIG_SWIOTLB is not set
231CONFIG_PPC_NEED_DMA_SYNC_OPS=y 247CONFIG_PPC_NEED_DMA_SYNC_OPS=y
232CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 248CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
233CONFIG_ARCH_HAS_WALK_MEMORY=y 249CONFIG_ARCH_HAS_WALK_MEMORY=y
@@ -249,9 +265,9 @@ CONFIG_MIGRATION=y
249CONFIG_ZONE_DMA_FLAG=1 265CONFIG_ZONE_DMA_FLAG=1
250CONFIG_BOUNCE=y 266CONFIG_BOUNCE=y
251CONFIG_VIRT_TO_BUS=y 267CONFIG_VIRT_TO_BUS=y
252CONFIG_UNEVICTABLE_LRU=y
253CONFIG_HAVE_MLOCK=y 268CONFIG_HAVE_MLOCK=y
254CONFIG_HAVE_MLOCKED_PAGE_BIT=y 269CONFIG_HAVE_MLOCKED_PAGE_BIT=y
270CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
255CONFIG_PPC_4K_PAGES=y 271CONFIG_PPC_4K_PAGES=y
256# CONFIG_PPC_16K_PAGES is not set 272# CONFIG_PPC_16K_PAGES is not set
257# CONFIG_PPC_64K_PAGES is not set 273# CONFIG_PPC_64K_PAGES is not set
@@ -296,6 +312,7 @@ CONFIG_PAGE_OFFSET=0xc0000000
296CONFIG_KERNEL_START=0xc0000000 312CONFIG_KERNEL_START=0xc0000000
297CONFIG_PHYSICAL_START=0x00000000 313CONFIG_PHYSICAL_START=0x00000000
298CONFIG_TASK_SIZE=0xc0000000 314CONFIG_TASK_SIZE=0xc0000000
315CONFIG_CONSISTENT_SIZE=0x00200000
299CONFIG_NET=y 316CONFIG_NET=y
300 317
301# 318#
@@ -357,6 +374,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
357# CONFIG_ECONET is not set 374# CONFIG_ECONET is not set
358# CONFIG_WAN_ROUTER is not set 375# CONFIG_WAN_ROUTER is not set
359# CONFIG_PHONET is not set 376# CONFIG_PHONET is not set
377# CONFIG_IEEE802154 is not set
360# CONFIG_NET_SCHED is not set 378# CONFIG_NET_SCHED is not set
361# CONFIG_DCB is not set 379# CONFIG_DCB is not set
362 380
@@ -374,7 +392,11 @@ CONFIG_WIRELESS=y
374CONFIG_WIRELESS_OLD_REGULATORY=y 392CONFIG_WIRELESS_OLD_REGULATORY=y
375# CONFIG_WIRELESS_EXT is not set 393# CONFIG_WIRELESS_EXT is not set
376# CONFIG_LIB80211 is not set 394# CONFIG_LIB80211 is not set
377# CONFIG_MAC80211 is not set 395
396#
397# CFG80211 needs to be enabled for MAC80211
398#
399CONFIG_MAC80211_DEFAULT_PS_VALUE=0
378# CONFIG_WIMAX is not set 400# CONFIG_WIMAX is not set
379# CONFIG_RFKILL is not set 401# CONFIG_RFKILL is not set
380# CONFIG_NET_9P is not set 402# CONFIG_NET_9P is not set
@@ -479,6 +501,7 @@ CONFIG_MTD_PHYSMAP_OF=y
479# CONFIG_MTD_UBI is not set 501# CONFIG_MTD_UBI is not set
480CONFIG_OF_DEVICE=y 502CONFIG_OF_DEVICE=y
481CONFIG_OF_I2C=y 503CONFIG_OF_I2C=y
504CONFIG_OF_MDIO=y
482# CONFIG_PARPORT is not set 505# CONFIG_PARPORT is not set
483CONFIG_BLK_DEV=y 506CONFIG_BLK_DEV=y
484# CONFIG_BLK_DEV_FD is not set 507# CONFIG_BLK_DEV_FD is not set
@@ -514,7 +537,9 @@ CONFIG_MISC_DEVICES=y
514# 537#
515# CONFIG_EEPROM_AT24 is not set 538# CONFIG_EEPROM_AT24 is not set
516# CONFIG_EEPROM_LEGACY is not set 539# CONFIG_EEPROM_LEGACY is not set
540# CONFIG_EEPROM_MAX6875 is not set
517# CONFIG_EEPROM_93CX6 is not set 541# CONFIG_EEPROM_93CX6 is not set
542# CONFIG_CB710_CORE is not set
518CONFIG_HAVE_IDE=y 543CONFIG_HAVE_IDE=y
519CONFIG_IDE=y 544CONFIG_IDE=y
520 545
@@ -591,10 +616,6 @@ CONFIG_BLK_DEV_SD=y
591# CONFIG_BLK_DEV_SR is not set 616# CONFIG_BLK_DEV_SR is not set
592# CONFIG_CHR_DEV_SG is not set 617# CONFIG_CHR_DEV_SG is not set
593# CONFIG_CHR_DEV_SCH is not set 618# CONFIG_CHR_DEV_SCH is not set
594
595#
596# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
597#
598# CONFIG_SCSI_MULTI_LUN is not set 619# CONFIG_SCSI_MULTI_LUN is not set
599# CONFIG_SCSI_CONSTANTS is not set 620# CONFIG_SCSI_CONSTANTS is not set
600# CONFIG_SCSI_LOGGING is not set 621# CONFIG_SCSI_LOGGING is not set
@@ -611,6 +632,7 @@ CONFIG_BLK_DEV_SD=y
611CONFIG_SCSI_LOWLEVEL=y 632CONFIG_SCSI_LOWLEVEL=y
612# CONFIG_ISCSI_TCP is not set 633# CONFIG_ISCSI_TCP is not set
613# CONFIG_SCSI_CXGB3_ISCSI is not set 634# CONFIG_SCSI_CXGB3_ISCSI is not set
635# CONFIG_SCSI_BNX2_ISCSI is not set
614# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 636# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
615# CONFIG_SCSI_3W_9XXX is not set 637# CONFIG_SCSI_3W_9XXX is not set
616# CONFIG_SCSI_ACARD is not set 638# CONFIG_SCSI_ACARD is not set
@@ -619,6 +641,7 @@ CONFIG_SCSI_LOWLEVEL=y
619# CONFIG_SCSI_AIC7XXX_OLD is not set 641# CONFIG_SCSI_AIC7XXX_OLD is not set
620# CONFIG_SCSI_AIC79XX is not set 642# CONFIG_SCSI_AIC79XX is not set
621# CONFIG_SCSI_AIC94XX is not set 643# CONFIG_SCSI_AIC94XX is not set
644# CONFIG_SCSI_MVSAS is not set
622# CONFIG_SCSI_DPT_I2O is not set 645# CONFIG_SCSI_DPT_I2O is not set
623# CONFIG_SCSI_ADVANSYS is not set 646# CONFIG_SCSI_ADVANSYS is not set
624# CONFIG_SCSI_ARCMSR is not set 647# CONFIG_SCSI_ARCMSR is not set
@@ -638,7 +661,6 @@ CONFIG_SCSI_LOWLEVEL=y
638# CONFIG_SCSI_IPS is not set 661# CONFIG_SCSI_IPS is not set
639# CONFIG_SCSI_INITIO is not set 662# CONFIG_SCSI_INITIO is not set
640# CONFIG_SCSI_INIA100 is not set 663# CONFIG_SCSI_INIA100 is not set
641# CONFIG_SCSI_MVSAS is not set
642# CONFIG_SCSI_STEX is not set 664# CONFIG_SCSI_STEX is not set
643# CONFIG_SCSI_SYM53C8XX_2 is not set 665# CONFIG_SCSI_SYM53C8XX_2 is not set
644# CONFIG_SCSI_IPR is not set 666# CONFIG_SCSI_IPR is not set
@@ -721,7 +743,11 @@ CONFIG_SATA_MV=y
721# 743#
722 744
723# 745#
724# Enable only one of the two stacks, unless you know what you are doing 746# You can enable one or both FireWire driver stacks.
747#
748
749#
750# See the help texts for more information.
725# 751#
726# CONFIG_FIREWIRE is not set 752# CONFIG_FIREWIRE is not set
727# CONFIG_IEEE1394 is not set 753# CONFIG_IEEE1394 is not set
@@ -730,7 +756,6 @@ CONFIG_MACINTOSH_DRIVERS=y
730# CONFIG_MAC_EMUMOUSEBTN is not set 756# CONFIG_MAC_EMUMOUSEBTN is not set
731# CONFIG_WINDFARM is not set 757# CONFIG_WINDFARM is not set
732CONFIG_NETDEVICES=y 758CONFIG_NETDEVICES=y
733CONFIG_COMPAT_NET_DEV_OPS=y
734# CONFIG_DUMMY is not set 759# CONFIG_DUMMY is not set
735# CONFIG_BONDING is not set 760# CONFIG_BONDING is not set
736# CONFIG_MACVLAN is not set 761# CONFIG_MACVLAN is not set
@@ -797,6 +822,7 @@ CONFIG_8139TOO=y
797# CONFIG_SMSC9420 is not set 822# CONFIG_SMSC9420 is not set
798# CONFIG_SUNDANCE is not set 823# CONFIG_SUNDANCE is not set
799# CONFIG_TLAN is not set 824# CONFIG_TLAN is not set
825# CONFIG_KS8842 is not set
800# CONFIG_VIA_RHINE is not set 826# CONFIG_VIA_RHINE is not set
801# CONFIG_SC92031 is not set 827# CONFIG_SC92031 is not set
802# CONFIG_ATL2 is not set 828# CONFIG_ATL2 is not set
@@ -818,6 +844,7 @@ CONFIG_E1000=y
818# CONFIG_VIA_VELOCITY is not set 844# CONFIG_VIA_VELOCITY is not set
819# CONFIG_TIGON3 is not set 845# CONFIG_TIGON3 is not set
820# CONFIG_BNX2 is not set 846# CONFIG_BNX2 is not set
847# CONFIG_CNIC is not set
821CONFIG_MV643XX_ETH=y 848CONFIG_MV643XX_ETH=y
822# CONFIG_QLA3XXX is not set 849# CONFIG_QLA3XXX is not set
823# CONFIG_ATL1 is not set 850# CONFIG_ATL1 is not set
@@ -1007,13 +1034,17 @@ CONFIG_I2C_MV64XXX=y
1007# CONFIG_SENSORS_PCF8574 is not set 1034# CONFIG_SENSORS_PCF8574 is not set
1008# CONFIG_PCF8575 is not set 1035# CONFIG_PCF8575 is not set
1009# CONFIG_SENSORS_PCA9539 is not set 1036# CONFIG_SENSORS_PCA9539 is not set
1010# CONFIG_SENSORS_MAX6875 is not set
1011# CONFIG_SENSORS_TSL2550 is not set 1037# CONFIG_SENSORS_TSL2550 is not set
1012# CONFIG_I2C_DEBUG_CORE is not set 1038# CONFIG_I2C_DEBUG_CORE is not set
1013# CONFIG_I2C_DEBUG_ALGO is not set 1039# CONFIG_I2C_DEBUG_ALGO is not set
1014# CONFIG_I2C_DEBUG_BUS is not set 1040# CONFIG_I2C_DEBUG_BUS is not set
1015# CONFIG_I2C_DEBUG_CHIP is not set 1041# CONFIG_I2C_DEBUG_CHIP is not set
1016# CONFIG_SPI is not set 1042# CONFIG_SPI is not set
1043
1044#
1045# PPS support
1046#
1047# CONFIG_PPS is not set
1017CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 1048CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
1018# CONFIG_GPIOLIB is not set 1049# CONFIG_GPIOLIB is not set
1019# CONFIG_W1 is not set 1050# CONFIG_W1 is not set
@@ -1068,6 +1099,7 @@ CONFIG_HWMON=y
1068# CONFIG_SENSORS_SMSC47B397 is not set 1099# CONFIG_SENSORS_SMSC47B397 is not set
1069# CONFIG_SENSORS_ADS7828 is not set 1100# CONFIG_SENSORS_ADS7828 is not set
1070# CONFIG_SENSORS_THMC50 is not set 1101# CONFIG_SENSORS_THMC50 is not set
1102# CONFIG_SENSORS_TMP401 is not set
1071# CONFIG_SENSORS_VIA686A is not set 1103# CONFIG_SENSORS_VIA686A is not set
1072# CONFIG_SENSORS_VT1211 is not set 1104# CONFIG_SENSORS_VT1211 is not set
1073# CONFIG_SENSORS_VT8231 is not set 1105# CONFIG_SENSORS_VT8231 is not set
@@ -1102,23 +1134,9 @@ CONFIG_SSB_POSSIBLE=y
1102# CONFIG_MFD_WM8400 is not set 1134# CONFIG_MFD_WM8400 is not set
1103# CONFIG_MFD_WM8350_I2C is not set 1135# CONFIG_MFD_WM8350_I2C is not set
1104# CONFIG_MFD_PCF50633 is not set 1136# CONFIG_MFD_PCF50633 is not set
1137# CONFIG_AB3100_CORE is not set
1105# CONFIG_REGULATOR is not set 1138# CONFIG_REGULATOR is not set
1106 1139# CONFIG_MEDIA_SUPPORT is not set
1107#
1108# Multimedia devices
1109#
1110
1111#
1112# Multimedia core support
1113#
1114# CONFIG_VIDEO_DEV is not set
1115# CONFIG_DVB_CORE is not set
1116# CONFIG_VIDEO_MEDIA is not set
1117
1118#
1119# Multimedia drivers
1120#
1121# CONFIG_DAB is not set
1122 1140
1123# 1141#
1124# Graphics support 1142# Graphics support
@@ -1163,6 +1181,7 @@ CONFIG_HID_BELKIN=y
1163CONFIG_HID_CHERRY=y 1181CONFIG_HID_CHERRY=y
1164CONFIG_HID_CHICONY=y 1182CONFIG_HID_CHICONY=y
1165CONFIG_HID_CYPRESS=y 1183CONFIG_HID_CYPRESS=y
1184CONFIG_HID_DRAGONRISE=y
1166# CONFIG_DRAGONRISE_FF is not set 1185# CONFIG_DRAGONRISE_FF is not set
1167CONFIG_HID_EZKEY=y 1186CONFIG_HID_EZKEY=y
1168CONFIG_HID_KYE=y 1187CONFIG_HID_KYE=y
@@ -1180,9 +1199,14 @@ CONFIG_HID_PETALYNX=y
1180CONFIG_HID_SAMSUNG=y 1199CONFIG_HID_SAMSUNG=y
1181CONFIG_HID_SONY=y 1200CONFIG_HID_SONY=y
1182CONFIG_HID_SUNPLUS=y 1201CONFIG_HID_SUNPLUS=y
1202CONFIG_HID_GREENASIA=y
1183# CONFIG_GREENASIA_FF is not set 1203# CONFIG_GREENASIA_FF is not set
1204CONFIG_HID_SMARTJOYPLUS=y
1205# CONFIG_SMARTJOYPLUS_FF is not set
1184CONFIG_HID_TOPSEED=y 1206CONFIG_HID_TOPSEED=y
1207CONFIG_HID_THRUSTMASTER=y
1185CONFIG_THRUSTMASTER_FF=y 1208CONFIG_THRUSTMASTER_FF=y
1209CONFIG_HID_ZEROPLUS=y
1186CONFIG_ZEROPLUS_FF=y 1210CONFIG_ZEROPLUS_FF=y
1187CONFIG_USB_SUPPORT=y 1211CONFIG_USB_SUPPORT=y
1188CONFIG_USB_ARCH_HAS_HCD=y 1212CONFIG_USB_ARCH_HAS_HCD=y
@@ -1207,6 +1231,7 @@ CONFIG_USB_MON=y
1207# USB Host Controller Drivers 1231# USB Host Controller Drivers
1208# 1232#
1209# CONFIG_USB_C67X00_HCD is not set 1233# CONFIG_USB_C67X00_HCD is not set
1234# CONFIG_USB_XHCI_HCD is not set
1210CONFIG_USB_EHCI_HCD=y 1235CONFIG_USB_EHCI_HCD=y
1211# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1236# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1212# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1237# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -1215,6 +1240,8 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y
1215# CONFIG_USB_ISP116X_HCD is not set 1240# CONFIG_USB_ISP116X_HCD is not set
1216# CONFIG_USB_ISP1760_HCD is not set 1241# CONFIG_USB_ISP1760_HCD is not set
1217CONFIG_USB_OHCI_HCD=y 1242CONFIG_USB_OHCI_HCD=y
1243# CONFIG_USB_OHCI_HCD_PPC_OF_BE is not set
1244# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
1218# CONFIG_USB_OHCI_HCD_PPC_OF is not set 1245# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1219# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1246# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1220# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 1247# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1322,6 +1349,7 @@ CONFIG_RTC_DRV_MAX6900=y
1322# CONFIG_RTC_DRV_S35390A is not set 1349# CONFIG_RTC_DRV_S35390A is not set
1323# CONFIG_RTC_DRV_FM3130 is not set 1350# CONFIG_RTC_DRV_FM3130 is not set
1324# CONFIG_RTC_DRV_RX8581 is not set 1351# CONFIG_RTC_DRV_RX8581 is not set
1352# CONFIG_RTC_DRV_RX8025 is not set
1325 1353
1326# 1354#
1327# SPI RTC drivers 1355# SPI RTC drivers
@@ -1349,6 +1377,10 @@ CONFIG_RTC_DRV_MAX6900=y
1349# CONFIG_DMADEVICES is not set 1377# CONFIG_DMADEVICES is not set
1350# CONFIG_AUXDISPLAY is not set 1378# CONFIG_AUXDISPLAY is not set
1351# CONFIG_UIO is not set 1379# CONFIG_UIO is not set
1380
1381#
1382# TI VLYNQ
1383#
1352# CONFIG_STAGING is not set 1384# CONFIG_STAGING is not set
1353 1385
1354# 1386#
@@ -1368,11 +1400,12 @@ CONFIG_FS_MBCACHE=y
1368# CONFIG_REISERFS_FS is not set 1400# CONFIG_REISERFS_FS is not set
1369# CONFIG_JFS_FS is not set 1401# CONFIG_JFS_FS is not set
1370# CONFIG_FS_POSIX_ACL is not set 1402# CONFIG_FS_POSIX_ACL is not set
1371CONFIG_FILE_LOCKING=y
1372# CONFIG_XFS_FS is not set 1403# CONFIG_XFS_FS is not set
1373# CONFIG_GFS2_FS is not set 1404# CONFIG_GFS2_FS is not set
1374# CONFIG_OCFS2_FS is not set 1405# CONFIG_OCFS2_FS is not set
1375# CONFIG_BTRFS_FS is not set 1406# CONFIG_BTRFS_FS is not set
1407CONFIG_FILE_LOCKING=y
1408CONFIG_FSNOTIFY=y
1376CONFIG_DNOTIFY=y 1409CONFIG_DNOTIFY=y
1377CONFIG_INOTIFY=y 1410CONFIG_INOTIFY=y
1378CONFIG_INOTIFY_USER=y 1411CONFIG_INOTIFY_USER=y
@@ -1469,7 +1502,46 @@ CONFIG_MSDOS_PARTITION=y
1469# CONFIG_KARMA_PARTITION is not set 1502# CONFIG_KARMA_PARTITION is not set
1470# CONFIG_EFI_PARTITION is not set 1503# CONFIG_EFI_PARTITION is not set
1471# CONFIG_SYSV68_PARTITION is not set 1504# CONFIG_SYSV68_PARTITION is not set
1472# CONFIG_NLS is not set 1505CONFIG_NLS=y
1506CONFIG_NLS_DEFAULT="iso8859-1"
1507# CONFIG_NLS_CODEPAGE_437 is not set
1508# CONFIG_NLS_CODEPAGE_737 is not set
1509# CONFIG_NLS_CODEPAGE_775 is not set
1510# CONFIG_NLS_CODEPAGE_850 is not set
1511# CONFIG_NLS_CODEPAGE_852 is not set
1512# CONFIG_NLS_CODEPAGE_855 is not set
1513# CONFIG_NLS_CODEPAGE_857 is not set
1514# CONFIG_NLS_CODEPAGE_860 is not set
1515# CONFIG_NLS_CODEPAGE_861 is not set
1516# CONFIG_NLS_CODEPAGE_862 is not set
1517# CONFIG_NLS_CODEPAGE_863 is not set
1518# CONFIG_NLS_CODEPAGE_864 is not set
1519# CONFIG_NLS_CODEPAGE_865 is not set
1520# CONFIG_NLS_CODEPAGE_866 is not set
1521# CONFIG_NLS_CODEPAGE_869 is not set
1522# CONFIG_NLS_CODEPAGE_936 is not set
1523# CONFIG_NLS_CODEPAGE_950 is not set
1524# CONFIG_NLS_CODEPAGE_932 is not set
1525# CONFIG_NLS_CODEPAGE_949 is not set
1526# CONFIG_NLS_CODEPAGE_874 is not set
1527# CONFIG_NLS_ISO8859_8 is not set
1528# CONFIG_NLS_CODEPAGE_1250 is not set
1529# CONFIG_NLS_CODEPAGE_1251 is not set
1530# CONFIG_NLS_ASCII is not set
1531# CONFIG_NLS_ISO8859_1 is not set
1532# CONFIG_NLS_ISO8859_2 is not set
1533# CONFIG_NLS_ISO8859_3 is not set
1534# CONFIG_NLS_ISO8859_4 is not set
1535# CONFIG_NLS_ISO8859_5 is not set
1536# CONFIG_NLS_ISO8859_6 is not set
1537# CONFIG_NLS_ISO8859_7 is not set
1538# CONFIG_NLS_ISO8859_9 is not set
1539# CONFIG_NLS_ISO8859_13 is not set
1540# CONFIG_NLS_ISO8859_14 is not set
1541# CONFIG_NLS_ISO8859_15 is not set
1542# CONFIG_NLS_KOI8_R is not set
1543# CONFIG_NLS_KOI8_U is not set
1544# CONFIG_NLS_UTF8 is not set
1473# CONFIG_DLM is not set 1545# CONFIG_DLM is not set
1474# CONFIG_BINARY_PRINTF is not set 1546# CONFIG_BINARY_PRINTF is not set
1475 1547
@@ -1494,6 +1566,7 @@ CONFIG_HAS_IOPORT=y
1494CONFIG_HAS_DMA=y 1566CONFIG_HAS_DMA=y
1495CONFIG_HAVE_LMB=y 1567CONFIG_HAVE_LMB=y
1496CONFIG_NLATTR=y 1568CONFIG_NLATTR=y
1569CONFIG_GENERIC_ATOMIC64=y
1497 1570
1498# 1571#
1499# Kernel hacking 1572# Kernel hacking
@@ -1519,22 +1592,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1519CONFIG_HAVE_DYNAMIC_FTRACE=y 1592CONFIG_HAVE_DYNAMIC_FTRACE=y
1520CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1593CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1521CONFIG_TRACING_SUPPORT=y 1594CONFIG_TRACING_SUPPORT=y
1522 1595# CONFIG_FTRACE is not set
1523#
1524# Tracers
1525#
1526# CONFIG_FUNCTION_TRACER is not set
1527# CONFIG_SCHED_TRACER is not set
1528# CONFIG_CONTEXT_SWITCH_TRACER is not set
1529# CONFIG_EVENT_TRACER is not set
1530# CONFIG_BOOT_TRACER is not set
1531# CONFIG_TRACE_BRANCH_PROFILING is not set
1532# CONFIG_STACK_TRACER is not set
1533# CONFIG_KMEMTRACE is not set
1534# CONFIG_WORKQUEUE_TRACER is not set
1535# CONFIG_BLK_DEV_IO_TRACE is not set
1536# CONFIG_SAMPLES is not set 1596# CONFIG_SAMPLES is not set
1537CONFIG_HAVE_ARCH_KGDB=y 1597CONFIG_HAVE_ARCH_KGDB=y
1598# CONFIG_PPC_DISABLE_WERROR is not set
1599CONFIG_PPC_WERROR=y
1538CONFIG_PRINT_STACK_DEPTH=64 1600CONFIG_PRINT_STACK_DEPTH=64
1539# CONFIG_IRQSTACKS is not set 1601# CONFIG_IRQSTACKS is not set
1540# CONFIG_BOOTX_TEXT is not set 1602# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/configs/storcenter_defconfig b/arch/powerpc/configs/storcenter_defconfig
index bd4a8d435c5..28384dc0100 100644
--- a/arch/powerpc/configs/storcenter_defconfig
+++ b/arch/powerpc/configs/storcenter_defconfig
@@ -1,25 +1,27 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc3 3# Linux kernel version: 2.6.31-rc4
4# Wed May 13 17:22:04 2009 4# Wed Jul 29 23:32:01 2009
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15# CONFIG_44x is not set
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y 17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
18CONFIG_PPC_FPU=y 19CONFIG_PPC_FPU=y
19# CONFIG_ALTIVEC is not set 20# CONFIG_ALTIVEC is not set
20CONFIG_PPC_STD_MMU=y 21CONFIG_PPC_STD_MMU=y
21CONFIG_PPC_STD_MMU_32=y 22CONFIG_PPC_STD_MMU_32=y
22# CONFIG_PPC_MM_SLICES is not set 23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC_HAVE_PMU_SUPPORT=y
23# CONFIG_SMP is not set 25# CONFIG_SMP is not set
24CONFIG_PPC32=y 26CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32 27CONFIG_WORD_SIZE=32
@@ -30,15 +32,16 @@ CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y 32CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y 33CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 34CONFIG_GENERIC_HARDIRQS=y
35CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 36# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 37CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y 38CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_HAVE_LATENCYTOP_SUPPORT=y 39CONFIG_HAVE_LATENCYTOP_SUPPORT=y
40CONFIG_TRACE_IRQFLAGS_SUPPORT=y
37CONFIG_LOCKDEP_SUPPORT=y 41CONFIG_LOCKDEP_SUPPORT=y
38CONFIG_RWSEM_XCHGADD_ALGORITHM=y 42CONFIG_RWSEM_XCHGADD_ALGORITHM=y
39CONFIG_ARCH_HAS_ILOG2_U32=y 43CONFIG_ARCH_HAS_ILOG2_U32=y
40CONFIG_GENERIC_HWEIGHT=y 44CONFIG_GENERIC_HWEIGHT=y
41CONFIG_GENERIC_CALIBRATE_DELAY=y
42CONFIG_GENERIC_FIND_NEXT_BIT=y 45CONFIG_GENERIC_FIND_NEXT_BIT=y
43# CONFIG_ARCH_NO_VIRT_TO_BUS is not set 46# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
44CONFIG_PPC=y 47CONFIG_PPC=y
@@ -52,11 +55,13 @@ CONFIG_PPC_UDBG_16550=y
52# CONFIG_GENERIC_TBSYNC is not set 55# CONFIG_GENERIC_TBSYNC is not set
53CONFIG_AUDIT_ARCH=y 56CONFIG_AUDIT_ARCH=y
54CONFIG_GENERIC_BUG=y 57CONFIG_GENERIC_BUG=y
58CONFIG_DTC=y
55# CONFIG_DEFAULT_UIMAGE is not set 59# CONFIG_DEFAULT_UIMAGE is not set
56# CONFIG_PPC_DCR_NATIVE is not set 60# CONFIG_PPC_DCR_NATIVE is not set
57# CONFIG_PPC_DCR_MMIO is not set 61# CONFIG_PPC_DCR_MMIO is not set
58CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 62CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
59CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 63CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
64CONFIG_CONSTRUCTORS=y
60 65
61# 66#
62# General setup 67# General setup
@@ -101,7 +106,6 @@ CONFIG_ANON_INODES=y
101CONFIG_EMBEDDED=y 106CONFIG_EMBEDDED=y
102CONFIG_SYSCTL_SYSCALL=y 107CONFIG_SYSCTL_SYSCALL=y
103# CONFIG_KALLSYMS is not set 108# CONFIG_KALLSYMS is not set
104# CONFIG_STRIP_ASM_SYMS is not set
105CONFIG_HOTPLUG=y 109CONFIG_HOTPLUG=y
106CONFIG_PRINTK=y 110CONFIG_PRINTK=y
107CONFIG_BUG=y 111CONFIG_BUG=y
@@ -114,9 +118,16 @@ CONFIG_TIMERFD=y
114CONFIG_EVENTFD=y 118CONFIG_EVENTFD=y
115CONFIG_SHMEM=y 119CONFIG_SHMEM=y
116CONFIG_AIO=y 120CONFIG_AIO=y
121CONFIG_HAVE_PERF_COUNTERS=y
122
123#
124# Performance Counters
125#
126# CONFIG_PERF_COUNTERS is not set
117CONFIG_VM_EVENT_COUNTERS=y 127CONFIG_VM_EVENT_COUNTERS=y
118CONFIG_PCI_QUIRKS=y 128CONFIG_PCI_QUIRKS=y
119CONFIG_SLUB_DEBUG=y 129CONFIG_SLUB_DEBUG=y
130# CONFIG_STRIP_ASM_SYMS is not set
120CONFIG_COMPAT_BRK=y 131CONFIG_COMPAT_BRK=y
121# CONFIG_SLAB is not set 132# CONFIG_SLAB is not set
122CONFIG_SLUB=y 133CONFIG_SLUB=y
@@ -129,6 +140,10 @@ CONFIG_HAVE_IOREMAP_PROT=y
129CONFIG_HAVE_KPROBES=y 140CONFIG_HAVE_KPROBES=y
130CONFIG_HAVE_KRETPROBES=y 141CONFIG_HAVE_KRETPROBES=y
131CONFIG_HAVE_ARCH_TRACEHOOK=y 142CONFIG_HAVE_ARCH_TRACEHOOK=y
143
144#
145# GCOV-based kernel profiling
146#
132# CONFIG_SLOW_WORK is not set 147# CONFIG_SLOW_WORK is not set
133# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 148# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
134CONFIG_SLABINFO=y 149CONFIG_SLABINFO=y
@@ -141,7 +156,7 @@ CONFIG_MODULE_UNLOAD=y
141# CONFIG_MODVERSIONS is not set 156# CONFIG_MODVERSIONS is not set
142# CONFIG_MODULE_SRCVERSION_ALL is not set 157# CONFIG_MODULE_SRCVERSION_ALL is not set
143CONFIG_BLOCK=y 158CONFIG_BLOCK=y
144CONFIG_LBD=y 159CONFIG_LBDAF=y
145# CONFIG_BLK_DEV_BSG is not set 160# CONFIG_BLK_DEV_BSG is not set
146# CONFIG_BLK_DEV_INTEGRITY is not set 161# CONFIG_BLK_DEV_INTEGRITY is not set
147 162
@@ -222,6 +237,7 @@ CONFIG_BINFMT_ELF=y
222# CONFIG_HAVE_AOUT is not set 237# CONFIG_HAVE_AOUT is not set
223CONFIG_BINFMT_MISC=y 238CONFIG_BINFMT_MISC=y
224# CONFIG_IOMMU_HELPER is not set 239# CONFIG_IOMMU_HELPER is not set
240# CONFIG_SWIOTLB is not set
225CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 241CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
226CONFIG_ARCH_HAS_WALK_MEMORY=y 242CONFIG_ARCH_HAS_WALK_MEMORY=y
227CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 243CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
@@ -242,9 +258,9 @@ CONFIG_MIGRATION=y
242CONFIG_ZONE_DMA_FLAG=1 258CONFIG_ZONE_DMA_FLAG=1
243CONFIG_BOUNCE=y 259CONFIG_BOUNCE=y
244CONFIG_VIRT_TO_BUS=y 260CONFIG_VIRT_TO_BUS=y
245CONFIG_UNEVICTABLE_LRU=y
246CONFIG_HAVE_MLOCK=y 261CONFIG_HAVE_MLOCK=y
247CONFIG_HAVE_MLOCKED_PAGE_BIT=y 262CONFIG_HAVE_MLOCKED_PAGE_BIT=y
263CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
248CONFIG_PPC_4K_PAGES=y 264CONFIG_PPC_4K_PAGES=y
249# CONFIG_PPC_16K_PAGES is not set 265# CONFIG_PPC_16K_PAGES is not set
250# CONFIG_PPC_64K_PAGES is not set 266# CONFIG_PPC_64K_PAGES is not set
@@ -347,6 +363,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
347# CONFIG_ECONET is not set 363# CONFIG_ECONET is not set
348# CONFIG_WAN_ROUTER is not set 364# CONFIG_WAN_ROUTER is not set
349# CONFIG_PHONET is not set 365# CONFIG_PHONET is not set
366# CONFIG_IEEE802154 is not set
350# CONFIG_NET_SCHED is not set 367# CONFIG_NET_SCHED is not set
351# CONFIG_DCB is not set 368# CONFIG_DCB is not set
352 369
@@ -364,7 +381,11 @@ CONFIG_WIRELESS=y
364CONFIG_WIRELESS_OLD_REGULATORY=y 381CONFIG_WIRELESS_OLD_REGULATORY=y
365# CONFIG_WIRELESS_EXT is not set 382# CONFIG_WIRELESS_EXT is not set
366# CONFIG_LIB80211 is not set 383# CONFIG_LIB80211 is not set
367# CONFIG_MAC80211 is not set 384
385#
386# CFG80211 needs to be enabled for MAC80211
387#
388CONFIG_MAC80211_DEFAULT_PS_VALUE=0
368# CONFIG_WIMAX is not set 389# CONFIG_WIMAX is not set
369# CONFIG_RFKILL is not set 390# CONFIG_RFKILL is not set
370# CONFIG_NET_9P is not set 391# CONFIG_NET_9P is not set
@@ -501,7 +522,9 @@ CONFIG_MISC_DEVICES=y
501# 522#
502# CONFIG_EEPROM_AT24 is not set 523# CONFIG_EEPROM_AT24 is not set
503# CONFIG_EEPROM_LEGACY is not set 524# CONFIG_EEPROM_LEGACY is not set
525# CONFIG_EEPROM_MAX6875 is not set
504# CONFIG_EEPROM_93CX6 is not set 526# CONFIG_EEPROM_93CX6 is not set
527# CONFIG_CB710_CORE is not set
505CONFIG_HAVE_IDE=y 528CONFIG_HAVE_IDE=y
506CONFIG_IDE=y 529CONFIG_IDE=y
507 530
@@ -579,10 +602,6 @@ CONFIG_BLK_DEV_SR=y
579# CONFIG_BLK_DEV_SR_VENDOR is not set 602# CONFIG_BLK_DEV_SR_VENDOR is not set
580# CONFIG_CHR_DEV_SG is not set 603# CONFIG_CHR_DEV_SG is not set
581# CONFIG_CHR_DEV_SCH is not set 604# CONFIG_CHR_DEV_SCH is not set
582
583#
584# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
585#
586# CONFIG_SCSI_MULTI_LUN is not set 605# CONFIG_SCSI_MULTI_LUN is not set
587# CONFIG_SCSI_CONSTANTS is not set 606# CONFIG_SCSI_CONSTANTS is not set
588# CONFIG_SCSI_LOGGING is not set 607# CONFIG_SCSI_LOGGING is not set
@@ -599,6 +618,7 @@ CONFIG_SCSI_SPI_ATTRS=y
599# CONFIG_SCSI_SRP_ATTRS is not set 618# CONFIG_SCSI_SRP_ATTRS is not set
600CONFIG_SCSI_LOWLEVEL=y 619CONFIG_SCSI_LOWLEVEL=y
601# CONFIG_ISCSI_TCP is not set 620# CONFIG_ISCSI_TCP is not set
621# CONFIG_SCSI_BNX2_ISCSI is not set
602# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 622# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
603# CONFIG_SCSI_3W_9XXX is not set 623# CONFIG_SCSI_3W_9XXX is not set
604# CONFIG_SCSI_ACARD is not set 624# CONFIG_SCSI_ACARD is not set
@@ -607,6 +627,7 @@ CONFIG_SCSI_LOWLEVEL=y
607# CONFIG_SCSI_AIC7XXX_OLD is not set 627# CONFIG_SCSI_AIC7XXX_OLD is not set
608# CONFIG_SCSI_AIC79XX is not set 628# CONFIG_SCSI_AIC79XX is not set
609# CONFIG_SCSI_AIC94XX is not set 629# CONFIG_SCSI_AIC94XX is not set
630# CONFIG_SCSI_MVSAS is not set
610# CONFIG_SCSI_DPT_I2O is not set 631# CONFIG_SCSI_DPT_I2O is not set
611# CONFIG_SCSI_ADVANSYS is not set 632# CONFIG_SCSI_ADVANSYS is not set
612# CONFIG_SCSI_ARCMSR is not set 633# CONFIG_SCSI_ARCMSR is not set
@@ -626,7 +647,6 @@ CONFIG_SCSI_LOWLEVEL=y
626# CONFIG_SCSI_IPS is not set 647# CONFIG_SCSI_IPS is not set
627# CONFIG_SCSI_INITIO is not set 648# CONFIG_SCSI_INITIO is not set
628# CONFIG_SCSI_INIA100 is not set 649# CONFIG_SCSI_INIA100 is not set
629# CONFIG_SCSI_MVSAS is not set
630# CONFIG_SCSI_STEX is not set 650# CONFIG_SCSI_STEX is not set
631# CONFIG_SCSI_SYM53C8XX_2 is not set 651# CONFIG_SCSI_SYM53C8XX_2 is not set
632# CONFIG_SCSI_QLOGIC_1280 is not set 652# CONFIG_SCSI_QLOGIC_1280 is not set
@@ -660,14 +680,17 @@ CONFIG_MD_RAID6_PQ=y
660# 680#
661 681
662# 682#
663# Enable only one of the two stacks, unless you know what you are doing 683# You can enable one or both FireWire driver stacks.
684#
685
686#
687# See the help texts for more information.
664# 688#
665# CONFIG_FIREWIRE is not set 689# CONFIG_FIREWIRE is not set
666# CONFIG_IEEE1394 is not set 690# CONFIG_IEEE1394 is not set
667# CONFIG_I2O is not set 691# CONFIG_I2O is not set
668# CONFIG_MACINTOSH_DRIVERS is not set 692# CONFIG_MACINTOSH_DRIVERS is not set
669CONFIG_NETDEVICES=y 693CONFIG_NETDEVICES=y
670CONFIG_COMPAT_NET_DEV_OPS=y
671CONFIG_DUMMY=m 694CONFIG_DUMMY=m
672# CONFIG_BONDING is not set 695# CONFIG_BONDING is not set
673# CONFIG_MACVLAN is not set 696# CONFIG_MACVLAN is not set
@@ -695,8 +718,10 @@ CONFIG_R8169=y
695# CONFIG_VIA_VELOCITY is not set 718# CONFIG_VIA_VELOCITY is not set
696# CONFIG_TIGON3 is not set 719# CONFIG_TIGON3 is not set
697# CONFIG_BNX2 is not set 720# CONFIG_BNX2 is not set
721# CONFIG_CNIC is not set
698# CONFIG_FSL_PQ_MDIO is not set 722# CONFIG_FSL_PQ_MDIO is not set
699# CONFIG_GIANFAR is not set 723# CONFIG_GIANFAR is not set
724# CONFIG_MV643XX_ETH is not set
700# CONFIG_QLA3XXX is not set 725# CONFIG_QLA3XXX is not set
701# CONFIG_ATL1 is not set 726# CONFIG_ATL1 is not set
702# CONFIG_ATL1E is not set 727# CONFIG_ATL1E is not set
@@ -845,13 +870,17 @@ CONFIG_I2C_MPC=y
845# CONFIG_SENSORS_PCF8574 is not set 870# CONFIG_SENSORS_PCF8574 is not set
846# CONFIG_PCF8575 is not set 871# CONFIG_PCF8575 is not set
847# CONFIG_SENSORS_PCA9539 is not set 872# CONFIG_SENSORS_PCA9539 is not set
848# CONFIG_SENSORS_MAX6875 is not set
849# CONFIG_SENSORS_TSL2550 is not set 873# CONFIG_SENSORS_TSL2550 is not set
850# CONFIG_I2C_DEBUG_CORE is not set 874# CONFIG_I2C_DEBUG_CORE is not set
851# CONFIG_I2C_DEBUG_ALGO is not set 875# CONFIG_I2C_DEBUG_ALGO is not set
852# CONFIG_I2C_DEBUG_BUS is not set 876# CONFIG_I2C_DEBUG_BUS is not set
853# CONFIG_I2C_DEBUG_CHIP is not set 877# CONFIG_I2C_DEBUG_CHIP is not set
854# CONFIG_SPI is not set 878# CONFIG_SPI is not set
879
880#
881# PPS support
882#
883# CONFIG_PPS is not set
855CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 884CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
856# CONFIG_GPIOLIB is not set 885# CONFIG_GPIOLIB is not set
857# CONFIG_W1 is not set 886# CONFIG_W1 is not set
@@ -879,23 +908,9 @@ CONFIG_SSB_POSSIBLE=y
879# CONFIG_MFD_WM8400 is not set 908# CONFIG_MFD_WM8400 is not set
880# CONFIG_MFD_WM8350_I2C is not set 909# CONFIG_MFD_WM8350_I2C is not set
881# CONFIG_MFD_PCF50633 is not set 910# CONFIG_MFD_PCF50633 is not set
911# CONFIG_AB3100_CORE is not set
882# CONFIG_REGULATOR is not set 912# CONFIG_REGULATOR is not set
883 913# CONFIG_MEDIA_SUPPORT is not set
884#
885# Multimedia devices
886#
887
888#
889# Multimedia core support
890#
891# CONFIG_VIDEO_DEV is not set
892# CONFIG_DVB_CORE is not set
893# CONFIG_VIDEO_MEDIA is not set
894
895#
896# Multimedia drivers
897#
898# CONFIG_DAB is not set
899 914
900# 915#
901# Graphics support 916# Graphics support
@@ -937,6 +952,7 @@ CONFIG_USB_DEVICE_CLASS=y
937# USB Host Controller Drivers 952# USB Host Controller Drivers
938# 953#
939# CONFIG_USB_C67X00_HCD is not set 954# CONFIG_USB_C67X00_HCD is not set
955# CONFIG_USB_XHCI_HCD is not set
940CONFIG_USB_EHCI_HCD=y 956CONFIG_USB_EHCI_HCD=y
941# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 957# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
942# CONFIG_USB_EHCI_TT_NEWSCHED is not set 958# CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -946,6 +962,8 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y
946# CONFIG_USB_ISP116X_HCD is not set 962# CONFIG_USB_ISP116X_HCD is not set
947# CONFIG_USB_ISP1760_HCD is not set 963# CONFIG_USB_ISP1760_HCD is not set
948CONFIG_USB_OHCI_HCD=y 964CONFIG_USB_OHCI_HCD=y
965# CONFIG_USB_OHCI_HCD_PPC_OF_BE is not set
966# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
949# CONFIG_USB_OHCI_HCD_PPC_OF is not set 967# CONFIG_USB_OHCI_HCD_PPC_OF is not set
950# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 968# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
951# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 969# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1064,6 +1082,7 @@ CONFIG_RTC_DRV_DS1307=y
1064# CONFIG_RTC_DRV_S35390A is not set 1082# CONFIG_RTC_DRV_S35390A is not set
1065# CONFIG_RTC_DRV_FM3130 is not set 1083# CONFIG_RTC_DRV_FM3130 is not set
1066# CONFIG_RTC_DRV_RX8581 is not set 1084# CONFIG_RTC_DRV_RX8581 is not set
1085# CONFIG_RTC_DRV_RX8025 is not set
1067 1086
1068# 1087#
1069# SPI RTC drivers 1088# SPI RTC drivers
@@ -1091,6 +1110,10 @@ CONFIG_RTC_DRV_DS1307=y
1091# CONFIG_DMADEVICES is not set 1110# CONFIG_DMADEVICES is not set
1092# CONFIG_AUXDISPLAY is not set 1111# CONFIG_AUXDISPLAY is not set
1093# CONFIG_UIO is not set 1112# CONFIG_UIO is not set
1113
1114#
1115# TI VLYNQ
1116#
1094# CONFIG_STAGING is not set 1117# CONFIG_STAGING is not set
1095 1118
1096# 1119#
@@ -1110,7 +1133,6 @@ CONFIG_FS_MBCACHE=y
1110# CONFIG_REISERFS_FS is not set 1133# CONFIG_REISERFS_FS is not set
1111# CONFIG_JFS_FS is not set 1134# CONFIG_JFS_FS is not set
1112# CONFIG_FS_POSIX_ACL is not set 1135# CONFIG_FS_POSIX_ACL is not set
1113CONFIG_FILE_LOCKING=y
1114CONFIG_XFS_FS=m 1136CONFIG_XFS_FS=m
1115# CONFIG_XFS_QUOTA is not set 1137# CONFIG_XFS_QUOTA is not set
1116# CONFIG_XFS_POSIX_ACL is not set 1138# CONFIG_XFS_POSIX_ACL is not set
@@ -1119,6 +1141,8 @@ CONFIG_XFS_FS=m
1119# CONFIG_GFS2_FS is not set 1141# CONFIG_GFS2_FS is not set
1120# CONFIG_OCFS2_FS is not set 1142# CONFIG_OCFS2_FS is not set
1121# CONFIG_BTRFS_FS is not set 1143# CONFIG_BTRFS_FS is not set
1144CONFIG_FILE_LOCKING=y
1145CONFIG_FSNOTIFY=y
1122CONFIG_DNOTIFY=y 1146CONFIG_DNOTIFY=y
1123CONFIG_INOTIFY=y 1147CONFIG_INOTIFY=y
1124CONFIG_INOTIFY_USER=y 1148CONFIG_INOTIFY_USER=y
@@ -1273,6 +1297,7 @@ CONFIG_HAS_IOPORT=y
1273CONFIG_HAS_DMA=y 1297CONFIG_HAS_DMA=y
1274CONFIG_HAVE_LMB=y 1298CONFIG_HAVE_LMB=y
1275CONFIG_NLATTR=y 1299CONFIG_NLATTR=y
1300CONFIG_GENERIC_ATOMIC64=y
1276 1301
1277# 1302#
1278# Kernel hacking 1303# Kernel hacking
@@ -1298,22 +1323,11 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1298CONFIG_HAVE_DYNAMIC_FTRACE=y 1323CONFIG_HAVE_DYNAMIC_FTRACE=y
1299CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1324CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1300CONFIG_TRACING_SUPPORT=y 1325CONFIG_TRACING_SUPPORT=y
1301 1326# CONFIG_FTRACE is not set
1302#
1303# Tracers
1304#
1305# CONFIG_FUNCTION_TRACER is not set
1306# CONFIG_SCHED_TRACER is not set
1307# CONFIG_CONTEXT_SWITCH_TRACER is not set
1308# CONFIG_EVENT_TRACER is not set
1309# CONFIG_BOOT_TRACER is not set
1310# CONFIG_TRACE_BRANCH_PROFILING is not set
1311# CONFIG_STACK_TRACER is not set
1312# CONFIG_KMEMTRACE is not set
1313# CONFIG_WORKQUEUE_TRACER is not set
1314# CONFIG_BLK_DEV_IO_TRACE is not set
1315# CONFIG_SAMPLES is not set 1327# CONFIG_SAMPLES is not set
1316CONFIG_HAVE_ARCH_KGDB=y 1328CONFIG_HAVE_ARCH_KGDB=y
1329# CONFIG_PPC_DISABLE_WERROR is not set
1330CONFIG_PPC_WERROR=y
1317CONFIG_PRINT_STACK_DEPTH=64 1331CONFIG_PRINT_STACK_DEPTH=64
1318# CONFIG_IRQSTACKS is not set 1332# CONFIG_IRQSTACKS is not set
1319# CONFIG_BOOTX_TEXT is not set 1333# CONFIG_BOOTX_TEXT is not set
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h
index dfdf13c9fef..fddc3ed715f 100644
--- a/arch/powerpc/include/asm/kvm_host.h
+++ b/arch/powerpc/include/asm/kvm_host.h
@@ -34,7 +34,7 @@
34#define KVM_COALESCED_MMIO_PAGE_OFFSET 1 34#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
35 35
36/* We don't currently support large pages. */ 36/* We don't currently support large pages. */
37#define KVM_PAGES_PER_HPAGE (1<<31) 37#define KVM_PAGES_PER_HPAGE (1UL << 31)
38 38
39struct kvm; 39struct kvm;
40struct kvm_run; 40struct kvm_run;
diff --git a/arch/powerpc/include/asm/pgalloc-32.h b/arch/powerpc/include/asm/pgalloc-32.h
index 0815eb40aca..c9500d666a1 100644
--- a/arch/powerpc/include/asm/pgalloc-32.h
+++ b/arch/powerpc/include/asm/pgalloc-32.h
@@ -16,7 +16,7 @@ extern void pgd_free(struct mm_struct *mm, pgd_t *pgd);
16 */ 16 */
17/* #define pmd_alloc_one(mm,address) ({ BUG(); ((pmd_t *)2); }) */ 17/* #define pmd_alloc_one(mm,address) ({ BUG(); ((pmd_t *)2); }) */
18#define pmd_free(mm, x) do { } while (0) 18#define pmd_free(mm, x) do { } while (0)
19#define __pmd_free_tlb(tlb,x) do { } while (0) 19#define __pmd_free_tlb(tlb,x,a) do { } while (0)
20/* #define pgd_populate(mm, pmd, pte) BUG() */ 20/* #define pgd_populate(mm, pmd, pte) BUG() */
21 21
22#ifndef CONFIG_BOOKE 22#ifndef CONFIG_BOOKE
diff --git a/arch/powerpc/include/asm/pgalloc-64.h b/arch/powerpc/include/asm/pgalloc-64.h
index afda2bdd860..e6f069c4f71 100644
--- a/arch/powerpc/include/asm/pgalloc-64.h
+++ b/arch/powerpc/include/asm/pgalloc-64.h
@@ -118,11 +118,11 @@ static inline void pgtable_free(pgtable_free_t pgf)
118 kmem_cache_free(pgtable_cache[cachenum], p); 118 kmem_cache_free(pgtable_cache[cachenum], p);
119} 119}
120 120
121#define __pmd_free_tlb(tlb, pmd) \ 121#define __pmd_free_tlb(tlb, pmd,addr) \
122 pgtable_free_tlb(tlb, pgtable_free_cache(pmd, \ 122 pgtable_free_tlb(tlb, pgtable_free_cache(pmd, \
123 PMD_CACHE_NUM, PMD_TABLE_SIZE-1)) 123 PMD_CACHE_NUM, PMD_TABLE_SIZE-1))
124#ifndef CONFIG_PPC_64K_PAGES 124#ifndef CONFIG_PPC_64K_PAGES
125#define __pud_free_tlb(tlb, pud) \ 125#define __pud_free_tlb(tlb, pud, addr) \
126 pgtable_free_tlb(tlb, pgtable_free_cache(pud, \ 126 pgtable_free_tlb(tlb, pgtable_free_cache(pud, \
127 PUD_CACHE_NUM, PUD_TABLE_SIZE-1)) 127 PUD_CACHE_NUM, PUD_TABLE_SIZE-1))
128#endif /* CONFIG_PPC_64K_PAGES */ 128#endif /* CONFIG_PPC_64K_PAGES */
diff --git a/arch/powerpc/include/asm/pgalloc.h b/arch/powerpc/include/asm/pgalloc.h
index 5d8480265a7..1730e5e298d 100644
--- a/arch/powerpc/include/asm/pgalloc.h
+++ b/arch/powerpc/include/asm/pgalloc.h
@@ -38,14 +38,14 @@ static inline pgtable_free_t pgtable_free_cache(void *p, int cachenum,
38extern void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf); 38extern void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf);
39 39
40#ifdef CONFIG_SMP 40#ifdef CONFIG_SMP
41#define __pte_free_tlb(tlb,ptepage) \ 41#define __pte_free_tlb(tlb,ptepage,address) \
42do { \ 42do { \
43 pgtable_page_dtor(ptepage); \ 43 pgtable_page_dtor(ptepage); \
44 pgtable_free_tlb(tlb, pgtable_free_cache(page_address(ptepage), \ 44 pgtable_free_tlb(tlb, pgtable_free_cache(page_address(ptepage), \
45 PTE_NONCACHE_NUM, PTE_TABLE_SIZE-1)); \ 45 PTE_NONCACHE_NUM, PTE_TABLE_SIZE-1)); \
46} while (0) 46} while (0)
47#else 47#else
48#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, (pte)) 48#define __pte_free_tlb(tlb, pte, address) pte_free((tlb)->mm, (pte))
49#endif 49#endif
50 50
51 51
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index 20a60d661ba..ccf129d47d8 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -7,6 +7,7 @@
7 7
8#include <linux/device.h> 8#include <linux/device.h>
9#include <linux/dma-mapping.h> 9#include <linux/dma-mapping.h>
10#include <linux/lmb.h>
10#include <asm/bug.h> 11#include <asm/bug.h>
11#include <asm/abs_addr.h> 12#include <asm/abs_addr.h>
12 13
@@ -90,11 +91,10 @@ static void dma_direct_unmap_sg(struct device *dev, struct scatterlist *sg,
90static int dma_direct_dma_supported(struct device *dev, u64 mask) 91static int dma_direct_dma_supported(struct device *dev, u64 mask)
91{ 92{
92#ifdef CONFIG_PPC64 93#ifdef CONFIG_PPC64
93 /* Could be improved to check for memory though it better be 94 /* Could be improved so platforms can set the limit in case
94 * done via some global so platforms can set the limit in case
95 * they have limited DMA windows 95 * they have limited DMA windows
96 */ 96 */
97 return mask >= DMA_BIT_MASK(32); 97 return mask >= (lmb_end_of_DRAM() - 1);
98#else 98#else
99 return 1; 99 return 1;
100#endif 100#endif
diff --git a/arch/powerpc/kernel/mpc7450-pmu.c b/arch/powerpc/kernel/mpc7450-pmu.c
index c244133c67a..cc466d039af 100644
--- a/arch/powerpc/kernel/mpc7450-pmu.c
+++ b/arch/powerpc/kernel/mpc7450-pmu.c
@@ -407,7 +407,8 @@ struct power_pmu mpc7450_pmu = {
407 407
408static int init_mpc7450_pmu(void) 408static int init_mpc7450_pmu(void)
409{ 409{
410 if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/7450")) 410 if (!cur_cpu_spec->oprofile_cpu_type ||
411 strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/7450"))
411 return -ENODEV; 412 return -ENODEV;
412 413
413 return register_power_pmu(&mpc7450_pmu); 414 return register_power_pmu(&mpc7450_pmu);
diff --git a/arch/powerpc/kernel/perf_counter.c b/arch/powerpc/kernel/perf_counter.c
index 809fdf94b95..70e1f57f7dd 100644
--- a/arch/powerpc/kernel/perf_counter.c
+++ b/arch/powerpc/kernel/perf_counter.c
@@ -518,6 +518,8 @@ void hw_perf_disable(void)
518 struct cpu_hw_counters *cpuhw; 518 struct cpu_hw_counters *cpuhw;
519 unsigned long flags; 519 unsigned long flags;
520 520
521 if (!ppmu)
522 return;
521 local_irq_save(flags); 523 local_irq_save(flags);
522 cpuhw = &__get_cpu_var(cpu_hw_counters); 524 cpuhw = &__get_cpu_var(cpu_hw_counters);
523 525
@@ -572,6 +574,8 @@ void hw_perf_enable(void)
572 int n_lim; 574 int n_lim;
573 int idx; 575 int idx;
574 576
577 if (!ppmu)
578 return;
575 local_irq_save(flags); 579 local_irq_save(flags);
576 cpuhw = &__get_cpu_var(cpu_hw_counters); 580 cpuhw = &__get_cpu_var(cpu_hw_counters);
577 if (!cpuhw->disabled) { 581 if (!cpuhw->disabled) {
@@ -737,6 +741,8 @@ int hw_perf_group_sched_in(struct perf_counter *group_leader,
737 long i, n, n0; 741 long i, n, n0;
738 struct perf_counter *sub; 742 struct perf_counter *sub;
739 743
744 if (!ppmu)
745 return 0;
740 cpuhw = &__get_cpu_var(cpu_hw_counters); 746 cpuhw = &__get_cpu_var(cpu_hw_counters);
741 n0 = cpuhw->n_counters; 747 n0 = cpuhw->n_counters;
742 n = collect_events(group_leader, ppmu->n_counter - n0, 748 n = collect_events(group_leader, ppmu->n_counter - n0,
@@ -1281,6 +1287,8 @@ void hw_perf_counter_setup(int cpu)
1281{ 1287{
1282 struct cpu_hw_counters *cpuhw = &per_cpu(cpu_hw_counters, cpu); 1288 struct cpu_hw_counters *cpuhw = &per_cpu(cpu_hw_counters, cpu);
1283 1289
1290 if (!ppmu)
1291 return;
1284 memset(cpuhw, 0, sizeof(*cpuhw)); 1292 memset(cpuhw, 0, sizeof(*cpuhw));
1285 cpuhw->mmcr[0] = MMCR0_FC; 1293 cpuhw->mmcr[0] = MMCR0_FC;
1286} 1294}
diff --git a/arch/powerpc/kernel/power4-pmu.c b/arch/powerpc/kernel/power4-pmu.c
index db90b0c5c27..3c90a3d9173 100644
--- a/arch/powerpc/kernel/power4-pmu.c
+++ b/arch/powerpc/kernel/power4-pmu.c
@@ -606,7 +606,8 @@ static struct power_pmu power4_pmu = {
606 606
607static int init_power4_pmu(void) 607static int init_power4_pmu(void)
608{ 608{
609 if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power4")) 609 if (!cur_cpu_spec->oprofile_cpu_type ||
610 strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power4"))
610 return -ENODEV; 611 return -ENODEV;
611 612
612 return register_power_pmu(&power4_pmu); 613 return register_power_pmu(&power4_pmu);
diff --git a/arch/powerpc/kernel/power5+-pmu.c b/arch/powerpc/kernel/power5+-pmu.c
index f4adca8e98a..31918af3e35 100644
--- a/arch/powerpc/kernel/power5+-pmu.c
+++ b/arch/powerpc/kernel/power5+-pmu.c
@@ -678,8 +678,9 @@ static struct power_pmu power5p_pmu = {
678 678
679static int init_power5p_pmu(void) 679static int init_power5p_pmu(void)
680{ 680{
681 if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5+") 681 if (!cur_cpu_spec->oprofile_cpu_type ||
682 && strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5++")) 682 (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5+")
683 && strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5++")))
683 return -ENODEV; 684 return -ENODEV;
684 685
685 return register_power_pmu(&power5p_pmu); 686 return register_power_pmu(&power5p_pmu);
diff --git a/arch/powerpc/kernel/power5-pmu.c b/arch/powerpc/kernel/power5-pmu.c
index 29b2c6c0e83..867f6f66396 100644
--- a/arch/powerpc/kernel/power5-pmu.c
+++ b/arch/powerpc/kernel/power5-pmu.c
@@ -618,7 +618,8 @@ static struct power_pmu power5_pmu = {
618 618
619static int init_power5_pmu(void) 619static int init_power5_pmu(void)
620{ 620{
621 if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5")) 621 if (!cur_cpu_spec->oprofile_cpu_type ||
622 strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5"))
622 return -ENODEV; 623 return -ENODEV;
623 624
624 return register_power_pmu(&power5_pmu); 625 return register_power_pmu(&power5_pmu);
diff --git a/arch/powerpc/kernel/power6-pmu.c b/arch/powerpc/kernel/power6-pmu.c
index 09ae5bf5bda..fa21890531d 100644
--- a/arch/powerpc/kernel/power6-pmu.c
+++ b/arch/powerpc/kernel/power6-pmu.c
@@ -537,7 +537,8 @@ static struct power_pmu power6_pmu = {
537 537
538static int init_power6_pmu(void) 538static int init_power6_pmu(void)
539{ 539{
540 if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power6")) 540 if (!cur_cpu_spec->oprofile_cpu_type ||
541 strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power6"))
541 return -ENODEV; 542 return -ENODEV;
542 543
543 return register_power_pmu(&power6_pmu); 544 return register_power_pmu(&power6_pmu);
diff --git a/arch/powerpc/kernel/power7-pmu.c b/arch/powerpc/kernel/power7-pmu.c
index 5a9f5cbd40a..388cf57ad82 100644
--- a/arch/powerpc/kernel/power7-pmu.c
+++ b/arch/powerpc/kernel/power7-pmu.c
@@ -366,7 +366,8 @@ static struct power_pmu power7_pmu = {
366 366
367static int init_power7_pmu(void) 367static int init_power7_pmu(void)
368{ 368{
369 if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power7")) 369 if (!cur_cpu_spec->oprofile_cpu_type ||
370 strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power7"))
370 return -ENODEV; 371 return -ENODEV;
371 372
372 return register_power_pmu(&power7_pmu); 373 return register_power_pmu(&power7_pmu);
diff --git a/arch/powerpc/kernel/ppc970-pmu.c b/arch/powerpc/kernel/ppc970-pmu.c
index 833097ac45d..75dccb71a04 100644
--- a/arch/powerpc/kernel/ppc970-pmu.c
+++ b/arch/powerpc/kernel/ppc970-pmu.c
@@ -488,8 +488,9 @@ static struct power_pmu ppc970_pmu = {
488 488
489static int init_ppc970_pmu(void) 489static int init_ppc970_pmu(void)
490{ 490{
491 if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970") 491 if (!cur_cpu_spec->oprofile_cpu_type ||
492 && strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970MP")) 492 (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970")
493 && strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970MP")))
493 return -ENODEV; 494 return -ENODEV;
494 495
495 return register_power_pmu(&ppc970_pmu); 496 return register_power_pmu(&ppc970_pmu);
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 9920d6a7cf2..c46ef2ffa3d 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -305,7 +305,7 @@ static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
305 305
306 pmd = pmd_offset(pud, start); 306 pmd = pmd_offset(pud, start);
307 pud_clear(pud); 307 pud_clear(pud);
308 pmd_free_tlb(tlb, pmd); 308 pmd_free_tlb(tlb, pmd, start);
309} 309}
310 310
311static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd, 311static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
@@ -348,7 +348,7 @@ static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
348 348
349 pud = pud_offset(pgd, start); 349 pud = pud_offset(pgd, start);
350 pgd_clear(pgd); 350 pgd_clear(pgd);
351 pud_free_tlb(tlb, pud); 351 pud_free_tlb(tlb, pud, start);
352} 352}
353 353
354/* 354/*
diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/mmu_context_nohash.c
index 92a197117d5..b1a727def15 100644
--- a/arch/powerpc/mm/mmu_context_nohash.c
+++ b/arch/powerpc/mm/mmu_context_nohash.c
@@ -217,6 +217,7 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next)
217 id = steal_context_smp(id); 217 id = steal_context_smp(id);
218 if (id == MMU_NO_CONTEXT) 218 if (id == MMU_NO_CONTEXT)
219 goto again; 219 goto again;
220 goto stolen;
220 } 221 }
221#endif /* CONFIG_SMP */ 222#endif /* CONFIG_SMP */
222 id = steal_context_up(id); 223 id = steal_context_up(id);
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index 60ed9c067b1..bfb32834ab0 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -233,6 +233,19 @@ static void __init mpc85xx_mds_setup_arch(void)
233 /* Turn UCC1 & UCC2 on */ 233 /* Turn UCC1 & UCC2 on */
234 setbits8(&bcsr_regs[8], BCSR_UCC1_GETH_EN); 234 setbits8(&bcsr_regs[8], BCSR_UCC1_GETH_EN);
235 setbits8(&bcsr_regs[9], BCSR_UCC2_GETH_EN); 235 setbits8(&bcsr_regs[9], BCSR_UCC2_GETH_EN);
236 } else if (machine_is(mpc8569_mds)) {
237#define BCSR7_UCC12_GETHnRST (0x1 << 2)
238#define BCSR8_UEM_MARVELL_RST (0x1 << 1)
239 /*
240 * U-Boot mangles interrupt polarity for Marvell PHYs,
241 * so reset built-in and UEM Marvell PHYs, this puts
242 * the PHYs into their normal state.
243 */
244 clrbits8(&bcsr_regs[7], BCSR7_UCC12_GETHnRST);
245 setbits8(&bcsr_regs[8], BCSR8_UEM_MARVELL_RST);
246
247 setbits8(&bcsr_regs[7], BCSR7_UCC12_GETHnRST);
248 clrbits8(&bcsr_regs[8], BCSR8_UEM_MARVELL_RST);
236 } 249 }
237 iounmap(bcsr_regs); 250 iounmap(bcsr_regs);
238 } 251 }
diff --git a/arch/s390/include/asm/tlb.h b/arch/s390/include/asm/tlb.h
index 3d8a96d39d9..81150b05368 100644
--- a/arch/s390/include/asm/tlb.h
+++ b/arch/s390/include/asm/tlb.h
@@ -96,7 +96,8 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
96 * pte_free_tlb frees a pte table and clears the CRSTE for the 96 * pte_free_tlb frees a pte table and clears the CRSTE for the
97 * page table from the tlb. 97 * page table from the tlb.
98 */ 98 */
99static inline void pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte) 99static inline void pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte,
100 unsigned long address)
100{ 101{
101 if (!tlb->fullmm) { 102 if (!tlb->fullmm) {
102 tlb->array[tlb->nr_ptes++] = pte; 103 tlb->array[tlb->nr_ptes++] = pte;
@@ -113,7 +114,8 @@ static inline void pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte)
113 * as the pgd. pmd_free_tlb checks the asce_limit against 2GB 114 * as the pgd. pmd_free_tlb checks the asce_limit against 2GB
114 * to avoid the double free of the pmd in this case. 115 * to avoid the double free of the pmd in this case.
115 */ 116 */
116static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) 117static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd,
118 unsigned long address)
117{ 119{
118#ifdef __s390x__ 120#ifdef __s390x__
119 if (tlb->mm->context.asce_limit <= (1UL << 31)) 121 if (tlb->mm->context.asce_limit <= (1UL << 31))
@@ -134,7 +136,8 @@ static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd)
134 * as the pgd. pud_free_tlb checks the asce_limit against 4TB 136 * as the pgd. pud_free_tlb checks the asce_limit against 4TB
135 * to avoid the double free of the pud in this case. 137 * to avoid the double free of the pud in this case.
136 */ 138 */
137static inline void pud_free_tlb(struct mmu_gather *tlb, pud_t *pud) 139static inline void pud_free_tlb(struct mmu_gather *tlb, pud_t *pud,
140 unsigned long address)
138{ 141{
139#ifdef __s390x__ 142#ifdef __s390x__
140 if (tlb->mm->context.asce_limit <= (1UL << 42)) 143 if (tlb->mm->context.asce_limit <= (1UL << 42))
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index f9b144049dc..cae14c49951 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -208,9 +208,12 @@ static noinline __init void detect_machine_type(void)
208 machine_flags |= MACHINE_FLAG_KVM; 208 machine_flags |= MACHINE_FLAG_KVM;
209 else 209 else
210 machine_flags |= MACHINE_FLAG_VM; 210 machine_flags |= MACHINE_FLAG_VM;
211
212 /* Store machine flags for setting up lowcore early */
213 S390_lowcore.machine_flags = machine_flags;
211} 214}
212 215
213static void early_pgm_check_handler(void) 216static __init void early_pgm_check_handler(void)
214{ 217{
215 unsigned long addr; 218 unsigned long addr;
216 const struct exception_table_entry *fixup; 219 const struct exception_table_entry *fixup;
@@ -222,7 +225,7 @@ static void early_pgm_check_handler(void)
222 S390_lowcore.program_old_psw.addr = fixup->fixup | PSW_ADDR_AMODE; 225 S390_lowcore.program_old_psw.addr = fixup->fixup | PSW_ADDR_AMODE;
223} 226}
224 227
225void setup_lowcore_early(void) 228static noinline __init void setup_lowcore_early(void)
226{ 229{
227 psw_t psw; 230 psw_t psw;
228 231
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 2270730f535..be2cae08340 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -687,13 +687,14 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
687#ifndef CONFIG_64BIT 687#ifndef CONFIG_64BIT
688 if (MACHINE_HAS_IEEE) 688 if (MACHINE_HAS_IEEE)
689 lowcore->extended_save_area_addr = (u32) save_area; 689 lowcore->extended_save_area_addr = (u32) save_area;
690#else
691 if (vdso_alloc_per_cpu(smp_processor_id(), lowcore))
692 BUG();
693#endif 690#endif
694 set_prefix((u32)(unsigned long) lowcore); 691 set_prefix((u32)(unsigned long) lowcore);
695 local_mcck_enable(); 692 local_mcck_enable();
696 local_irq_enable(); 693 local_irq_enable();
694#ifdef CONFIG_64BIT
695 if (vdso_alloc_per_cpu(smp_processor_id(), &S390_lowcore))
696 BUG();
697#endif
697 for_each_possible_cpu(cpu) 698 for_each_possible_cpu(cpu)
698 if (cpu != smp_processor_id()) 699 if (cpu != smp_processor_id())
699 smp_create_idle(cpu); 700 smp_create_idle(cpu);
diff --git a/arch/s390/kernel/vdso64/clock_gettime.S b/arch/s390/kernel/vdso64/clock_gettime.S
index 79dbfee831e..49106c6e6f8 100644
--- a/arch/s390/kernel/vdso64/clock_gettime.S
+++ b/arch/s390/kernel/vdso64/clock_gettime.S
@@ -88,10 +88,17 @@ __kernel_clock_gettime:
88 llilh %r4,0x0100 88 llilh %r4,0x0100
89 sar %a4,%r4 89 sar %a4,%r4
90 lghi %r4,0 90 lghi %r4,0
91 epsw %r5,0
91 sacf 512 /* Magic ectg instruction */ 92 sacf 512 /* Magic ectg instruction */
92 .insn ssf,0xc80100000000,__VDSO_ECTG_BASE(4),__VDSO_ECTG_USER(4),4 93 .insn ssf,0xc80100000000,__VDSO_ECTG_BASE(4),__VDSO_ECTG_USER(4),4
93 sacf 0 94 tml %r5,0x4000
94 sar %a4,%r2 95 jo 11f
96 tml %r5,0x8000
97 jno 10f
98 sacf 256
99 j 11f
10010: sacf 0
10111: sar %a4,%r2
95 algr %r1,%r0 /* r1 = cputime as TOD value */ 102 algr %r1,%r0 /* r1 = cputime as TOD value */
96 mghi %r1,1000 /* convert to nanoseconds */ 103 mghi %r1,1000 /* convert to nanoseconds */
97 srlg %r1,%r1,12 /* r1 = cputime in nanosec */ 104 srlg %r1,%r1,12 /* r1 = cputime in nanosec */
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index f04f5301b1b..4d613415c43 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -386,7 +386,7 @@ no_timer:
386 } 386 }
387 __unset_cpu_idle(vcpu); 387 __unset_cpu_idle(vcpu);
388 __set_current_state(TASK_RUNNING); 388 __set_current_state(TASK_RUNNING);
389 remove_wait_queue(&vcpu->wq, &wait); 389 remove_wait_queue(&vcpu->arch.local_int.wq, &wait);
390 spin_unlock_bh(&vcpu->arch.local_int.lock); 390 spin_unlock_bh(&vcpu->arch.local_int.lock);
391 spin_unlock(&vcpu->arch.local_int.float_int->lock); 391 spin_unlock(&vcpu->arch.local_int.float_int->lock);
392 hrtimer_try_to_cancel(&vcpu->arch.ckc_timer); 392 hrtimer_try_to_cancel(&vcpu->arch.ckc_timer);
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c
index 36678835034..0ef81d6776e 100644
--- a/arch/s390/kvm/sigp.c
+++ b/arch/s390/kvm/sigp.c
@@ -169,7 +169,7 @@ static int __sigp_set_prefix(struct kvm_vcpu *vcpu, u16 cpu_addr, u32 address,
169 unsigned long *reg) 169 unsigned long *reg)
170{ 170{
171 struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int; 171 struct kvm_s390_float_interrupt *fi = &vcpu->kvm->arch.float_int;
172 struct kvm_s390_local_interrupt *li; 172 struct kvm_s390_local_interrupt *li = NULL;
173 struct kvm_s390_interrupt_info *inti; 173 struct kvm_s390_interrupt_info *inti;
174 int rc; 174 int rc;
175 u8 tmp; 175 u8 tmp;
@@ -189,9 +189,10 @@ static int __sigp_set_prefix(struct kvm_vcpu *vcpu, u16 cpu_addr, u32 address,
189 return 2; /* busy */ 189 return 2; /* busy */
190 190
191 spin_lock(&fi->lock); 191 spin_lock(&fi->lock);
192 li = fi->local_int[cpu_addr]; 192 if (cpu_addr < KVM_MAX_VCPUS)
193 li = fi->local_int[cpu_addr];
193 194
194 if ((cpu_addr >= KVM_MAX_VCPUS) || (li == NULL)) { 195 if (li == NULL) {
195 rc = 1; /* incorrect state */ 196 rc = 1; /* incorrect state */
196 *reg &= SIGP_STAT_INCORRECT_STATE; 197 *reg &= SIGP_STAT_INCORRECT_STATE;
197 kfree(inti); 198 kfree(inti);
diff --git a/arch/s390/power/swsusp.c b/arch/s390/power/swsusp.c
index e6a4fe9f5f2..bd1f5c6b0b8 100644
--- a/arch/s390/power/swsusp.c
+++ b/arch/s390/power/swsusp.c
@@ -7,24 +7,36 @@
7 * 7 *
8 */ 8 */
9 9
10#include <asm/system.h>
10 11
11/*
12 * save CPU registers before creating a hibernation image and before
13 * restoring the memory state from it
14 */
15void save_processor_state(void) 12void save_processor_state(void)
16{ 13{
17 /* implentation contained in the 14 /* swsusp_arch_suspend() actually saves all cpu register contents.
18 * swsusp_arch_suspend function 15 * Machine checks must be disabled since swsusp_arch_suspend() stores
16 * register contents to their lowcore save areas. That's the same
17 * place where register contents on machine checks would be saved.
18 * To avoid register corruption disable machine checks.
19 * We must also disable machine checks in the new psw mask for
20 * program checks, since swsusp_arch_suspend() may generate program
21 * checks. Disabling machine checks for all other new psw masks is
22 * just paranoia.
19 */ 23 */
24 local_mcck_disable();
25 /* Disable lowcore protection */
26 __ctl_clear_bit(0,28);
27 S390_lowcore.external_new_psw.mask &= ~PSW_MASK_MCHECK;
28 S390_lowcore.svc_new_psw.mask &= ~PSW_MASK_MCHECK;
29 S390_lowcore.io_new_psw.mask &= ~PSW_MASK_MCHECK;
30 S390_lowcore.program_new_psw.mask &= ~PSW_MASK_MCHECK;
20} 31}
21 32
22/*
23 * restore the contents of CPU registers
24 */
25void restore_processor_state(void) 33void restore_processor_state(void)
26{ 34{
27 /* implentation contained in the 35 S390_lowcore.external_new_psw.mask |= PSW_MASK_MCHECK;
28 * swsusp_arch_resume function 36 S390_lowcore.svc_new_psw.mask |= PSW_MASK_MCHECK;
29 */ 37 S390_lowcore.io_new_psw.mask |= PSW_MASK_MCHECK;
38 S390_lowcore.program_new_psw.mask |= PSW_MASK_MCHECK;
39 /* Enable lowcore protection */
40 __ctl_set_bit(0,28);
41 local_mcck_enable();
30} 42}
diff --git a/arch/s390/power/swsusp_asm64.S b/arch/s390/power/swsusp_asm64.S
index 76d688da32f..b26df5c5933 100644
--- a/arch/s390/power/swsusp_asm64.S
+++ b/arch/s390/power/swsusp_asm64.S
@@ -32,19 +32,14 @@ swsusp_arch_suspend:
32 /* Deactivate DAT */ 32 /* Deactivate DAT */
33 stnsm __SF_EMPTY(%r15),0xfb 33 stnsm __SF_EMPTY(%r15),0xfb
34 34
35 /* Switch off lowcore protection */
36 stctg %c0,%c0,__SF_EMPTY(%r15)
37 ni __SF_EMPTY+4(%r15),0xef
38 lctlg %c0,%c0,__SF_EMPTY(%r15)
39
40 /* Store prefix register on stack */ 35 /* Store prefix register on stack */
41 stpx __SF_EMPTY(%r15) 36 stpx __SF_EMPTY(%r15)
42 37
43 /* Setup base register for lowcore (absolute 0) */ 38 /* Save prefix register contents for lowcore */
44 llgf %r1,__SF_EMPTY(%r15) 39 llgf %r4,__SF_EMPTY(%r15)
45 40
46 /* Get pointer to save area */ 41 /* Get pointer to save area */
47 aghi %r1,0x1000 42 lghi %r1,0x1000
48 43
49 /* Store registers */ 44 /* Store registers */
50 mvc 0x318(4,%r1),__SF_EMPTY(%r15) /* move prefix to lowcore */ 45 mvc 0x318(4,%r1),__SF_EMPTY(%r15) /* move prefix to lowcore */
@@ -79,17 +74,15 @@ swsusp_arch_suspend:
79 xc __SF_EMPTY(4,%r15),__SF_EMPTY(%r15) 74 xc __SF_EMPTY(4,%r15),__SF_EMPTY(%r15)
80 spx __SF_EMPTY(%r15) 75 spx __SF_EMPTY(%r15)
81 76
82 /* Setup lowcore */ 77 lghi %r2,0
83 brasl %r14,setup_lowcore_early 78 lghi %r3,2*PAGE_SIZE
79 lghi %r5,2*PAGE_SIZE
801: mvcle %r2,%r4,0
81 jo 1b
84 82
85 /* Save image */ 83 /* Save image */
86 brasl %r14,swsusp_save 84 brasl %r14,swsusp_save
87 85
88 /* Switch on lowcore protection */
89 stctg %c0,%c0,__SF_EMPTY(%r15)
90 oi __SF_EMPTY+4(%r15),0x10
91 lctlg %c0,%c0,__SF_EMPTY(%r15)
92
93 /* Restore prefix register and return */ 86 /* Restore prefix register and return */
94 lghi %r1,0x1000 87 lghi %r1,0x1000
95 spx 0x318(%r1) 88 spx 0x318(%r1)
@@ -117,11 +110,6 @@ swsusp_arch_resume:
117 /* Deactivate DAT */ 110 /* Deactivate DAT */
118 stnsm __SF_EMPTY(%r15),0xfb 111 stnsm __SF_EMPTY(%r15),0xfb
119 112
120 /* Switch off lowcore protection */
121 stctg %c0,%c0,__SF_EMPTY(%r15)
122 ni __SF_EMPTY+4(%r15),0xef
123 lctlg %c0,%c0,__SF_EMPTY(%r15)
124
125 /* Set prefix page to zero */ 113 /* Set prefix page to zero */
126 xc __SF_EMPTY(4,%r15),__SF_EMPTY(%r15) 114 xc __SF_EMPTY(4,%r15),__SF_EMPTY(%r15)
127 spx __SF_EMPTY(%r15) 115 spx __SF_EMPTY(%r15)
@@ -175,7 +163,7 @@ swsusp_arch_resume:
175 /* Load old stack */ 163 /* Load old stack */
176 lg %r15,0x2f8(%r13) 164 lg %r15,0x2f8(%r13)
177 165
178 /* Pointer to save arae */ 166 /* Pointer to save area */
179 lghi %r13,0x1000 167 lghi %r13,0x1000
180 168
181#ifdef CONFIG_SMP 169#ifdef CONFIG_SMP
@@ -187,11 +175,6 @@ swsusp_arch_resume:
187 /* Restore prefix register */ 175 /* Restore prefix register */
188 spx 0x318(%r13) 176 spx 0x318(%r13)
189 177
190 /* Switch on lowcore protection */
191 stctg %c0,%c0,__SF_EMPTY(%r15)
192 oi __SF_EMPTY+4(%r15),0x10
193 lctlg %c0,%c0,__SF_EMPTY(%r15)
194
195 /* Activate DAT */ 178 /* Activate DAT */
196 stosm __SF_EMPTY(%r15),0x04 179 stosm __SF_EMPTY(%r15),0x04
197 180
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c
index 7ffd1b4315b..b9c88cc519e 100644
--- a/arch/sh/boards/board-ap325rxa.c
+++ b/arch/sh/boards/board-ap325rxa.c
@@ -547,7 +547,7 @@ static int __init ap325rxa_devices_setup(void)
547 return platform_add_devices(ap325rxa_devices, 547 return platform_add_devices(ap325rxa_devices,
548 ARRAY_SIZE(ap325rxa_devices)); 548 ARRAY_SIZE(ap325rxa_devices));
549} 549}
550device_initcall(ap325rxa_devices_setup); 550arch_initcall(ap325rxa_devices_setup);
551 551
552/* Return the board specific boot mode pin configuration */ 552/* Return the board specific boot mode pin configuration */
553static int ap325rxa_mode_pins(void) 553static int ap325rxa_mode_pins(void)
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index f70f4644deb..f9b2e4df35b 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -608,7 +608,7 @@ static int __init migor_devices_setup(void)
608 608
609 return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices)); 609 return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices));
610} 610}
611__initcall(migor_devices_setup); 611arch_initcall(migor_devices_setup);
612 612
613/* Return the board specific boot mode pin configuration */ 613/* Return the board specific boot mode pin configuration */
614static int migor_mode_pins(void) 614static int migor_mode_pins(void)
diff --git a/arch/sh/include/asm/pgalloc.h b/arch/sh/include/asm/pgalloc.h
index 84dd2db7104..63ca37bd9a9 100644
--- a/arch/sh/include/asm/pgalloc.h
+++ b/arch/sh/include/asm/pgalloc.h
@@ -73,20 +73,12 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
73 quicklist_free_page(QUICK_PT, NULL, pte); 73 quicklist_free_page(QUICK_PT, NULL, pte);
74} 74}
75 75
76#define __pte_free_tlb(tlb,pte) \ 76#define __pte_free_tlb(tlb,pte,addr) \
77do { \ 77do { \
78 pgtable_page_dtor(pte); \ 78 pgtable_page_dtor(pte); \
79 tlb_remove_page((tlb), (pte)); \ 79 tlb_remove_page((tlb), (pte)); \
80} while (0) 80} while (0)
81 81
82/*
83 * allocating and freeing a pmd is trivial: the 1-entry pmd is
84 * inside the pgd, so has no extra memory associated with it.
85 */
86
87#define pmd_free(mm, x) do { } while (0)
88#define __pmd_free_tlb(tlb,x) do { } while (0)
89
90static inline void check_pgt_cache(void) 82static inline void check_pgt_cache(void)
91{ 83{
92 quicklist_trim(QUICK_PGD, NULL, 25, 16); 84 quicklist_trim(QUICK_PGD, NULL, 25, 16);
diff --git a/arch/sh/include/asm/tlb.h b/arch/sh/include/asm/tlb.h
index 9c16f737074..da8fe7ab872 100644
--- a/arch/sh/include/asm/tlb.h
+++ b/arch/sh/include/asm/tlb.h
@@ -91,9 +91,9 @@ tlb_end_vma(struct mmu_gather *tlb, struct vm_area_struct *vma)
91} 91}
92 92
93#define tlb_remove_page(tlb,page) free_page_and_swap_cache(page) 93#define tlb_remove_page(tlb,page) free_page_and_swap_cache(page)
94#define pte_free_tlb(tlb, ptep) pte_free((tlb)->mm, ptep) 94#define pte_free_tlb(tlb, ptep, addr) pte_free((tlb)->mm, ptep)
95#define pmd_free_tlb(tlb, pmdp) pmd_free((tlb)->mm, pmdp) 95#define pmd_free_tlb(tlb, pmdp, addr) pmd_free((tlb)->mm, pmdp)
96#define pud_free_tlb(tlb, pudp) pud_free((tlb)->mm, pudp) 96#define pud_free_tlb(tlb, pudp, addr) pud_free((tlb)->mm, pudp)
97 97
98#define tlb_migrate_finish(mm) do { } while (0) 98#define tlb_migrate_finish(mm) do { } while (0)
99 99
diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
index 13798733f2d..8555c05e866 100644
--- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c
+++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
@@ -187,7 +187,7 @@ static int __init sh7619_devices_setup(void)
187 return platform_add_devices(sh7619_devices, 187 return platform_add_devices(sh7619_devices,
188 ARRAY_SIZE(sh7619_devices)); 188 ARRAY_SIZE(sh7619_devices));
189} 189}
190__initcall(sh7619_devices_setup); 190arch_initcall(sh7619_devices_setup);
191 191
192void __init plat_irq_setup(void) 192void __init plat_irq_setup(void)
193{ 193{
diff --git a/arch/sh/kernel/cpu/sh2a/setup-mxg.c b/arch/sh/kernel/cpu/sh2a/setup-mxg.c
index 869c2da4820..b6737644531 100644
--- a/arch/sh/kernel/cpu/sh2a/setup-mxg.c
+++ b/arch/sh/kernel/cpu/sh2a/setup-mxg.c
@@ -238,7 +238,7 @@ static int __init mxg_devices_setup(void)
238 return platform_add_devices(mxg_devices, 238 return platform_add_devices(mxg_devices,
239 ARRAY_SIZE(mxg_devices)); 239 ARRAY_SIZE(mxg_devices));
240} 240}
241__initcall(mxg_devices_setup); 241arch_initcall(mxg_devices_setup);
242 242
243void __init plat_irq_setup(void) 243void __init plat_irq_setup(void)
244{ 244{
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7201.c b/arch/sh/kernel/cpu/sh2a/setup-sh7201.c
index d8febe12806..fbde5b75deb 100644
--- a/arch/sh/kernel/cpu/sh2a/setup-sh7201.c
+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7201.c
@@ -357,7 +357,7 @@ static int __init sh7201_devices_setup(void)
357 return platform_add_devices(sh7201_devices, 357 return platform_add_devices(sh7201_devices,
358 ARRAY_SIZE(sh7201_devices)); 358 ARRAY_SIZE(sh7201_devices));
359} 359}
360__initcall(sh7201_devices_setup); 360arch_initcall(sh7201_devices_setup);
361 361
362void __init plat_irq_setup(void) 362void __init plat_irq_setup(void)
363{ 363{
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
index 62e3039d239..d3fd536c9a8 100644
--- a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
@@ -367,7 +367,7 @@ static int __init sh7203_devices_setup(void)
367 return platform_add_devices(sh7203_devices, 367 return platform_add_devices(sh7203_devices,
368 ARRAY_SIZE(sh7203_devices)); 368 ARRAY_SIZE(sh7203_devices));
369} 369}
370__initcall(sh7203_devices_setup); 370arch_initcall(sh7203_devices_setup);
371 371
372void __init plat_irq_setup(void) 372void __init plat_irq_setup(void)
373{ 373{
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
index 3e6f3d7a58b..a9ccc5e8d9e 100644
--- a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
@@ -338,7 +338,7 @@ static int __init sh7206_devices_setup(void)
338 return platform_add_devices(sh7206_devices, 338 return platform_add_devices(sh7206_devices,
339 ARRAY_SIZE(sh7206_devices)); 339 ARRAY_SIZE(sh7206_devices));
340} 340}
341__initcall(sh7206_devices_setup); 341arch_initcall(sh7206_devices_setup);
342 342
343void __init plat_irq_setup(void) 343void __init plat_irq_setup(void)
344{ 344{
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7705.c b/arch/sh/kernel/cpu/sh3/setup-sh7705.c
index 88f742fed9e..c2310598387 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7705.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7705.c
@@ -222,7 +222,7 @@ static int __init sh7705_devices_setup(void)
222 return platform_add_devices(sh7705_devices, 222 return platform_add_devices(sh7705_devices,
223 ARRAY_SIZE(sh7705_devices)); 223 ARRAY_SIZE(sh7705_devices));
224} 224}
225__initcall(sh7705_devices_setup); 225arch_initcall(sh7705_devices_setup);
226 226
227static struct platform_device *sh7705_early_devices[] __initdata = { 227static struct platform_device *sh7705_early_devices[] __initdata = {
228 &tmu0_device, 228 &tmu0_device,
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh770x.c b/arch/sh/kernel/cpu/sh3/setup-sh770x.c
index c5630679858..347ab35d069 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh770x.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh770x.c
@@ -250,7 +250,7 @@ static int __init sh770x_devices_setup(void)
250 return platform_add_devices(sh770x_devices, 250 return platform_add_devices(sh770x_devices,
251 ARRAY_SIZE(sh770x_devices)); 251 ARRAY_SIZE(sh770x_devices));
252} 252}
253__initcall(sh770x_devices_setup); 253arch_initcall(sh770x_devices_setup);
254 254
255static struct platform_device *sh770x_early_devices[] __initdata = { 255static struct platform_device *sh770x_early_devices[] __initdata = {
256 &tmu0_device, 256 &tmu0_device,
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7710.c b/arch/sh/kernel/cpu/sh3/setup-sh7710.c
index efa76c8148f..717e90ae109 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7710.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7710.c
@@ -226,7 +226,7 @@ static int __init sh7710_devices_setup(void)
226 return platform_add_devices(sh7710_devices, 226 return platform_add_devices(sh7710_devices,
227 ARRAY_SIZE(sh7710_devices)); 227 ARRAY_SIZE(sh7710_devices));
228} 228}
229__initcall(sh7710_devices_setup); 229arch_initcall(sh7710_devices_setup);
230 230
231static struct platform_device *sh7710_early_devices[] __initdata = { 231static struct platform_device *sh7710_early_devices[] __initdata = {
232 &tmu0_device, 232 &tmu0_device,
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7720.c b/arch/sh/kernel/cpu/sh3/setup-sh7720.c
index 5b2107798ed..74d8baaf8e9 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7720.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7720.c
@@ -388,7 +388,7 @@ static int __init sh7720_devices_setup(void)
388 return platform_add_devices(sh7720_devices, 388 return platform_add_devices(sh7720_devices,
389 ARRAY_SIZE(sh7720_devices)); 389 ARRAY_SIZE(sh7720_devices));
390} 390}
391__initcall(sh7720_devices_setup); 391arch_initcall(sh7720_devices_setup);
392 392
393static struct platform_device *sh7720_early_devices[] __initdata = { 393static struct platform_device *sh7720_early_devices[] __initdata = {
394 &cmt0_device, 394 &cmt0_device,
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c
index 6d088d12359..de4827df19a 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c
@@ -138,7 +138,7 @@ static int __init sh4202_devices_setup(void)
138 return platform_add_devices(sh4202_devices, 138 return platform_add_devices(sh4202_devices,
139 ARRAY_SIZE(sh4202_devices)); 139 ARRAY_SIZE(sh4202_devices));
140} 140}
141__initcall(sh4202_devices_setup); 141arch_initcall(sh4202_devices_setup);
142 142
143static struct platform_device *sh4202_early_devices[] __initdata = { 143static struct platform_device *sh4202_early_devices[] __initdata = {
144 &tmu0_device, 144 &tmu0_device,
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c
index 851672d15cf..1b8b122e8f3 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c
@@ -239,7 +239,7 @@ static int __init sh7750_devices_setup(void)
239 return platform_add_devices(sh7750_devices, 239 return platform_add_devices(sh7750_devices,
240 ARRAY_SIZE(sh7750_devices)); 240 ARRAY_SIZE(sh7750_devices));
241} 241}
242__initcall(sh7750_devices_setup); 242arch_initcall(sh7750_devices_setup);
243 243
244static struct platform_device *sh7750_early_devices[] __initdata = { 244static struct platform_device *sh7750_early_devices[] __initdata = {
245 &tmu0_device, 245 &tmu0_device,
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
index 5b822519bd9..7fbb7be9284 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
@@ -265,7 +265,7 @@ static int __init sh7760_devices_setup(void)
265 return platform_add_devices(sh7760_devices, 265 return platform_add_devices(sh7760_devices,
266 ARRAY_SIZE(sh7760_devices)); 266 ARRAY_SIZE(sh7760_devices));
267} 267}
268__initcall(sh7760_devices_setup); 268arch_initcall(sh7760_devices_setup);
269 269
270static struct platform_device *sh7760_early_devices[] __initdata = { 270static struct platform_device *sh7760_early_devices[] __initdata = {
271 &tmu0_device, 271 &tmu0_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
index 6307e087c86..ac4d5672ec1 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
@@ -325,7 +325,7 @@ static int __init sh7343_devices_setup(void)
325 return platform_add_devices(sh7343_devices, 325 return platform_add_devices(sh7343_devices,
326 ARRAY_SIZE(sh7343_devices)); 326 ARRAY_SIZE(sh7343_devices));
327} 327}
328__initcall(sh7343_devices_setup); 328arch_initcall(sh7343_devices_setup);
329 329
330static struct platform_device *sh7343_early_devices[] __initdata = { 330static struct platform_device *sh7343_early_devices[] __initdata = {
331 &cmt_device, 331 &cmt_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
index c18f7d09281..1a956b1becc 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
@@ -318,7 +318,7 @@ static int __init sh7366_devices_setup(void)
318 return platform_add_devices(sh7366_devices, 318 return platform_add_devices(sh7366_devices,
319 ARRAY_SIZE(sh7366_devices)); 319 ARRAY_SIZE(sh7366_devices));
320} 320}
321__initcall(sh7366_devices_setup); 321arch_initcall(sh7366_devices_setup);
322 322
323static struct platform_device *sh7366_early_devices[] __initdata = { 323static struct platform_device *sh7366_early_devices[] __initdata = {
324 &cmt_device, 324 &cmt_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index ea524a2da3e..cda76ebf87c 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -359,7 +359,7 @@ static int __init sh7722_devices_setup(void)
359 return platform_add_devices(sh7722_devices, 359 return platform_add_devices(sh7722_devices,
360 ARRAY_SIZE(sh7722_devices)); 360 ARRAY_SIZE(sh7722_devices));
361} 361}
362__initcall(sh7722_devices_setup); 362arch_initcall(sh7722_devices_setup);
363 363
364static struct platform_device *sh7722_early_devices[] __initdata = { 364static struct platform_device *sh7722_early_devices[] __initdata = {
365 &cmt_device, 365 &cmt_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
index e1bb80b2a27..b45dace9539 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
@@ -473,7 +473,7 @@ static int __init sh7723_devices_setup(void)
473 return platform_add_devices(sh7723_devices, 473 return platform_add_devices(sh7723_devices,
474 ARRAY_SIZE(sh7723_devices)); 474 ARRAY_SIZE(sh7723_devices));
475} 475}
476__initcall(sh7723_devices_setup); 476arch_initcall(sh7723_devices_setup);
477 477
478static struct platform_device *sh7723_early_devices[] __initdata = { 478static struct platform_device *sh7723_early_devices[] __initdata = {
479 &cmt_device, 479 &cmt_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
index e5ac9eb11c6..a04edaab9a2 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
@@ -508,7 +508,7 @@ static int __init sh7724_devices_setup(void)
508 return platform_add_devices(sh7724_devices, 508 return platform_add_devices(sh7724_devices,
509 ARRAY_SIZE(sh7724_devices)); 509 ARRAY_SIZE(sh7724_devices));
510} 510}
511device_initcall(sh7724_devices_setup); 511arch_initcall(sh7724_devices_setup);
512 512
513static struct platform_device *sh7724_early_devices[] __initdata = { 513static struct platform_device *sh7724_early_devices[] __initdata = {
514 &cmt_device, 514 &cmt_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
index f1e0c0d36da..4659fff6b84 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
@@ -314,7 +314,7 @@ static int __init sh7763_devices_setup(void)
314 return platform_add_devices(sh7763_devices, 314 return platform_add_devices(sh7763_devices,
315 ARRAY_SIZE(sh7763_devices)); 315 ARRAY_SIZE(sh7763_devices));
316} 316}
317__initcall(sh7763_devices_setup); 317arch_initcall(sh7763_devices_setup);
318 318
319static struct platform_device *sh7763_early_devices[] __initdata = { 319static struct platform_device *sh7763_early_devices[] __initdata = {
320 &tmu0_device, 320 &tmu0_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c
index 1e86209db28..eead08d89d3 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c
@@ -368,7 +368,7 @@ static int __init sh7770_devices_setup(void)
368 return platform_add_devices(sh7770_devices, 368 return platform_add_devices(sh7770_devices,
369 ARRAY_SIZE(sh7770_devices)); 369 ARRAY_SIZE(sh7770_devices));
370} 370}
371__initcall(sh7770_devices_setup); 371arch_initcall(sh7770_devices_setup);
372 372
373static struct platform_device *sh7770_early_devices[] __initdata = { 373static struct platform_device *sh7770_early_devices[] __initdata = {
374 &tmu0_device, 374 &tmu0_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
index 715e05b431e..2c901f44695 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
@@ -256,7 +256,7 @@ static int __init sh7780_devices_setup(void)
256 return platform_add_devices(sh7780_devices, 256 return platform_add_devices(sh7780_devices,
257 ARRAY_SIZE(sh7780_devices)); 257 ARRAY_SIZE(sh7780_devices));
258} 258}
259__initcall(sh7780_devices_setup); 259arch_initcall(sh7780_devices_setup);
260 260
261static struct platform_device *sh7780_early_devices[] __initdata = { 261static struct platform_device *sh7780_early_devices[] __initdata = {
262 &tmu0_device, 262 &tmu0_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
index af561402570..7f6c718b6c3 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
@@ -263,7 +263,7 @@ static int __init sh7785_devices_setup(void)
263 return platform_add_devices(sh7785_devices, 263 return platform_add_devices(sh7785_devices,
264 ARRAY_SIZE(sh7785_devices)); 264 ARRAY_SIZE(sh7785_devices));
265} 265}
266__initcall(sh7785_devices_setup); 266arch_initcall(sh7785_devices_setup);
267 267
268static struct platform_device *sh7785_early_devices[] __initdata = { 268static struct platform_device *sh7785_early_devices[] __initdata = {
269 &tmu0_device, 269 &tmu0_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
index b70049470a0..0104a8ec536 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
@@ -547,7 +547,7 @@ static int __init sh7786_devices_setup(void)
547 return platform_add_devices(sh7786_devices, 547 return platform_add_devices(sh7786_devices,
548 ARRAY_SIZE(sh7786_devices)); 548 ARRAY_SIZE(sh7786_devices));
549} 549}
550device_initcall(sh7786_devices_setup); 550arch_initcall(sh7786_devices_setup);
551 551
552void __init plat_early_device_setup(void) 552void __init plat_early_device_setup(void)
553{ 553{
diff --git a/arch/sh/kernel/cpu/sh4a/setup-shx3.c b/arch/sh/kernel/cpu/sh4a/setup-shx3.c
index 53c65fd9cce..07f078961c7 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-shx3.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-shx3.c
@@ -256,7 +256,7 @@ static int __init shx3_devices_setup(void)
256 return platform_add_devices(shx3_devices, 256 return platform_add_devices(shx3_devices,
257 ARRAY_SIZE(shx3_devices)); 257 ARRAY_SIZE(shx3_devices));
258} 258}
259__initcall(shx3_devices_setup); 259arch_initcall(shx3_devices_setup);
260 260
261void __init plat_early_device_setup(void) 261void __init plat_early_device_setup(void)
262{ 262{
diff --git a/arch/sh/kernel/cpu/sh5/setup-sh5.c b/arch/sh/kernel/cpu/sh5/setup-sh5.c
index f5ff1ac57fc..6a0f82f7003 100644
--- a/arch/sh/kernel/cpu/sh5/setup-sh5.c
+++ b/arch/sh/kernel/cpu/sh5/setup-sh5.c
@@ -186,7 +186,7 @@ static int __init sh5_devices_setup(void)
186 return platform_add_devices(sh5_devices, 186 return platform_add_devices(sh5_devices,
187 ARRAY_SIZE(sh5_devices)); 187 ARRAY_SIZE(sh5_devices));
188} 188}
189__initcall(sh5_devices_setup); 189arch_initcall(sh5_devices_setup);
190 190
191void __init plat_early_device_setup(void) 191void __init plat_early_device_setup(void)
192{ 192{
diff --git a/arch/sparc/include/asm/pgalloc_32.h b/arch/sparc/include/asm/pgalloc_32.h
index 681582d2696..ca2b34456c4 100644
--- a/arch/sparc/include/asm/pgalloc_32.h
+++ b/arch/sparc/include/asm/pgalloc_32.h
@@ -44,8 +44,8 @@ BTFIXUPDEF_CALL(pmd_t *, pmd_alloc_one, struct mm_struct *, unsigned long)
44BTFIXUPDEF_CALL(void, free_pmd_fast, pmd_t *) 44BTFIXUPDEF_CALL(void, free_pmd_fast, pmd_t *)
45#define free_pmd_fast(pmd) BTFIXUP_CALL(free_pmd_fast)(pmd) 45#define free_pmd_fast(pmd) BTFIXUP_CALL(free_pmd_fast)(pmd)
46 46
47#define pmd_free(mm, pmd) free_pmd_fast(pmd) 47#define pmd_free(mm, pmd) free_pmd_fast(pmd)
48#define __pmd_free_tlb(tlb, pmd) pmd_free((tlb)->mm, pmd) 48#define __pmd_free_tlb(tlb, pmd, addr) pmd_free((tlb)->mm, pmd)
49 49
50BTFIXUPDEF_CALL(void, pmd_populate, pmd_t *, struct page *) 50BTFIXUPDEF_CALL(void, pmd_populate, pmd_t *, struct page *)
51#define pmd_populate(MM, PMD, PTE) BTFIXUP_CALL(pmd_populate)(PMD, PTE) 51#define pmd_populate(MM, PMD, PTE) BTFIXUP_CALL(pmd_populate)(PMD, PTE)
@@ -62,7 +62,7 @@ BTFIXUPDEF_CALL(void, free_pte_fast, pte_t *)
62#define pte_free_kernel(mm, pte) BTFIXUP_CALL(free_pte_fast)(pte) 62#define pte_free_kernel(mm, pte) BTFIXUP_CALL(free_pte_fast)(pte)
63 63
64BTFIXUPDEF_CALL(void, pte_free, pgtable_t ) 64BTFIXUPDEF_CALL(void, pte_free, pgtable_t )
65#define pte_free(mm, pte) BTFIXUP_CALL(pte_free)(pte) 65#define pte_free(mm, pte) BTFIXUP_CALL(pte_free)(pte)
66#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, pte) 66#define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, pte)
67 67
68#endif /* _SPARC_PGALLOC_H */ 68#endif /* _SPARC_PGALLOC_H */
diff --git a/arch/sparc/include/asm/tlb_64.h b/arch/sparc/include/asm/tlb_64.h
index ee38e731bfa..dca406b9b6f 100644
--- a/arch/sparc/include/asm/tlb_64.h
+++ b/arch/sparc/include/asm/tlb_64.h
@@ -100,9 +100,9 @@ static inline void tlb_remove_page(struct mmu_gather *mp, struct page *page)
100} 100}
101 101
102#define tlb_remove_tlb_entry(mp,ptep,addr) do { } while (0) 102#define tlb_remove_tlb_entry(mp,ptep,addr) do { } while (0)
103#define pte_free_tlb(mp, ptepage) pte_free((mp)->mm, ptepage) 103#define pte_free_tlb(mp, ptepage, addr) pte_free((mp)->mm, ptepage)
104#define pmd_free_tlb(mp, pmdp) pmd_free((mp)->mm, pmdp) 104#define pmd_free_tlb(mp, pmdp, addr) pmd_free((mp)->mm, pmdp)
105#define pud_free_tlb(tlb,pudp) __pud_free_tlb(tlb,pudp) 105#define pud_free_tlb(tlb,pudp, addr) __pud_free_tlb(tlb,pudp,addr)
106 106
107#define tlb_migrate_finish(mm) do { } while (0) 107#define tlb_migrate_finish(mm) do { } while (0)
108#define tlb_start_vma(tlb, vma) do { } while (0) 108#define tlb_start_vma(tlb, vma) do { } while (0)
diff --git a/arch/um/include/asm/pgalloc.h b/arch/um/include/asm/pgalloc.h
index 718984359f8..32c8ce4e151 100644
--- a/arch/um/include/asm/pgalloc.h
+++ b/arch/um/include/asm/pgalloc.h
@@ -40,7 +40,7 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
40 __free_page(pte); 40 __free_page(pte);
41} 41}
42 42
43#define __pte_free_tlb(tlb,pte) \ 43#define __pte_free_tlb(tlb,pte, address) \
44do { \ 44do { \
45 pgtable_page_dtor(pte); \ 45 pgtable_page_dtor(pte); \
46 tlb_remove_page((tlb),(pte)); \ 46 tlb_remove_page((tlb),(pte)); \
@@ -53,7 +53,7 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
53 free_page((unsigned long)pmd); 53 free_page((unsigned long)pmd);
54} 54}
55 55
56#define __pmd_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x)) 56#define __pmd_free_tlb(tlb,x, address) tlb_remove_page((tlb),virt_to_page(x))
57#endif 57#endif
58 58
59#define check_pgt_cache() do { } while (0) 59#define check_pgt_cache() do { } while (0)
diff --git a/arch/um/include/asm/tlb.h b/arch/um/include/asm/tlb.h
index 5240fa1c5e0..660caedac9e 100644
--- a/arch/um/include/asm/tlb.h
+++ b/arch/um/include/asm/tlb.h
@@ -116,11 +116,11 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
116 __tlb_remove_tlb_entry(tlb, ptep, address); \ 116 __tlb_remove_tlb_entry(tlb, ptep, address); \
117 } while (0) 117 } while (0)
118 118
119#define pte_free_tlb(tlb, ptep) __pte_free_tlb(tlb, ptep) 119#define pte_free_tlb(tlb, ptep, addr) __pte_free_tlb(tlb, ptep, addr)
120 120
121#define pud_free_tlb(tlb, pudp) __pud_free_tlb(tlb, pudp) 121#define pud_free_tlb(tlb, pudp, addr) __pud_free_tlb(tlb, pudp, addr)
122 122
123#define pmd_free_tlb(tlb, pmdp) __pmd_free_tlb(tlb, pmdp) 123#define pmd_free_tlb(tlb, pmdp, addr) __pmd_free_tlb(tlb, pmdp, addr)
124 124
125#define tlb_migrate_finish(mm) do {} while (0) 125#define tlb_migrate_finish(mm) do {} while (0)
126 126
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 738bdc6b0f8..13ffa5df37d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -24,6 +24,7 @@ config X86
24 select HAVE_UNSTABLE_SCHED_CLOCK 24 select HAVE_UNSTABLE_SCHED_CLOCK
25 select HAVE_IDE 25 select HAVE_IDE
26 select HAVE_OPROFILE 26 select HAVE_OPROFILE
27 select HAVE_PERF_COUNTERS if (!M386 && !M486)
27 select HAVE_IOREMAP_PROT 28 select HAVE_IOREMAP_PROT
28 select HAVE_KPROBES 29 select HAVE_KPROBES
29 select ARCH_WANT_OPTIONAL_GPIOLIB 30 select ARCH_WANT_OPTIONAL_GPIOLIB
@@ -742,7 +743,6 @@ config X86_UP_IOAPIC
742config X86_LOCAL_APIC 743config X86_LOCAL_APIC
743 def_bool y 744 def_bool y
744 depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC 745 depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC
745 select HAVE_PERF_COUNTERS if (!M386 && !M486)
746 746
747config X86_IO_APIC 747config X86_IO_APIC
748 def_bool y 748 def_bool y
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index e2ff504b4dd..f8ed0658404 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -4,7 +4,7 @@
4# create a compressed vmlinux image from the original vmlinux 4# create a compressed vmlinux image from the original vmlinux
5# 5#
6 6
7targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o 7targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o
8 8
9KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 9KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
10KBUILD_CFLAGS += -fno-strict-aliasing -fPIC 10KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
index edc90f23e70..8406ed7f992 100644
--- a/arch/x86/include/asm/efi.h
+++ b/arch/x86/include/asm/efi.h
@@ -33,7 +33,7 @@ extern unsigned long asmlinkage efi_call_phys(void *, ...);
33#define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \ 33#define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \
34 efi_call_virt(f, a1, a2, a3, a4, a5, a6) 34 efi_call_virt(f, a1, a2, a3, a4, a5, a6)
35 35
36#define efi_ioremap(addr, size) ioremap_cache(addr, size) 36#define efi_ioremap(addr, size, type) ioremap_cache(addr, size)
37 37
38#else /* !CONFIG_X86_32 */ 38#else /* !CONFIG_X86_32 */
39 39
@@ -84,7 +84,8 @@ extern u64 efi_call6(void *fp, u64 arg1, u64 arg2, u64 arg3,
84 efi_call6((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \ 84 efi_call6((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
85 (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6)) 85 (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6))
86 86
87extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size); 87extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size,
88 u32 type);
88 89
89#endif /* CONFIG_X86_32 */ 90#endif /* CONFIG_X86_32 */
90 91
diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h
index 2bdab21f089..c6ccbe7e81a 100644
--- a/arch/x86/include/asm/irqflags.h
+++ b/arch/x86/include/asm/irqflags.h
@@ -12,9 +12,15 @@ static inline unsigned long native_save_fl(void)
12{ 12{
13 unsigned long flags; 13 unsigned long flags;
14 14
15 /*
16 * Note: this needs to be "=r" not "=rm", because we have the
17 * stack offset from what gcc expects at the time the "pop" is
18 * executed, and so a memory reference with respect to the stack
19 * would end up using the wrong address.
20 */
15 asm volatile("# __raw_save_flags\n\t" 21 asm volatile("# __raw_save_flags\n\t"
16 "pushf ; pop %0" 22 "pushf ; pop %0"
17 : "=g" (flags) 23 : "=r" (flags)
18 : /* no input */ 24 : /* no input */
19 : "memory"); 25 : "memory");
20 26
diff --git a/arch/x86/include/asm/lguest.h b/arch/x86/include/asm/lguest.h
index 94cd69858b1..0d97deba1e3 100644
--- a/arch/x86/include/asm/lguest.h
+++ b/arch/x86/include/asm/lguest.h
@@ -17,8 +17,7 @@
17/* Pages for switcher itself, then two pages per cpu */ 17/* Pages for switcher itself, then two pages per cpu */
18#define TOTAL_SWITCHER_PAGES (SHARED_SWITCHER_PAGES + 2 * nr_cpu_ids) 18#define TOTAL_SWITCHER_PAGES (SHARED_SWITCHER_PAGES + 2 * nr_cpu_ids)
19 19
20/* We map at -4M (-2M when PAE is activated) for ease of mapping 20/* We map at -4M (-2M for PAE) for ease of mapping (one PTE page). */
21 * into the guest (one PTE page). */
22#ifdef CONFIG_X86_PAE 21#ifdef CONFIG_X86_PAE
23#define SWITCHER_ADDR 0xFFE00000 22#define SWITCHER_ADDR 0xFFE00000
24#else 23#else
diff --git a/arch/x86/include/asm/lguest_hcall.h b/arch/x86/include/asm/lguest_hcall.h
index 33600a66755..ba0eed8aa1a 100644
--- a/arch/x86/include/asm/lguest_hcall.h
+++ b/arch/x86/include/asm/lguest_hcall.h
@@ -30,27 +30,27 @@
30#include <asm/hw_irq.h> 30#include <asm/hw_irq.h>
31#include <asm/kvm_para.h> 31#include <asm/kvm_para.h>
32 32
33/*G:030 But first, how does our Guest contact the Host to ask for privileged 33/*G:030
34 * But first, how does our Guest contact the Host to ask for privileged
34 * operations? There are two ways: the direct way is to make a "hypercall", 35 * operations? There are two ways: the direct way is to make a "hypercall",
35 * to make requests of the Host Itself. 36 * to make requests of the Host Itself.
36 * 37 *
37 * We use the KVM hypercall mechanism. Seventeen hypercalls are 38 * We use the KVM hypercall mechanism, though completely different hypercall
38 * available: the hypercall number is put in the %eax register, and the 39 * numbers. Seventeen hypercalls are available: the hypercall number is put in
39 * arguments (when required) are placed in %ebx, %ecx, %edx and %esi. 40 * the %eax register, and the arguments (when required) are placed in %ebx,
40 * If a return value makes sense, it's returned in %eax. 41 * %ecx, %edx and %esi. If a return value makes sense, it's returned in %eax.
41 * 42 *
42 * Grossly invalid calls result in Sudden Death at the hands of the vengeful 43 * Grossly invalid calls result in Sudden Death at the hands of the vengeful
43 * Host, rather than returning failure. This reflects Winston Churchill's 44 * Host, rather than returning failure. This reflects Winston Churchill's
44 * definition of a gentleman: "someone who is only rude intentionally". */ 45 * definition of a gentleman: "someone who is only rude intentionally".
45/*:*/ 46:*/
46 47
47/* Can't use our min() macro here: needs to be a constant */ 48/* Can't use our min() macro here: needs to be a constant */
48#define LGUEST_IRQS (NR_IRQS < 32 ? NR_IRQS: 32) 49#define LGUEST_IRQS (NR_IRQS < 32 ? NR_IRQS: 32)
49 50
50#define LHCALL_RING_SIZE 64 51#define LHCALL_RING_SIZE 64
51struct hcall_args { 52struct hcall_args {
52 /* These map directly onto eax, ebx, ecx, edx and esi 53 /* These map directly onto eax/ebx/ecx/edx/esi in struct lguest_regs */
53 * in struct lguest_regs */
54 unsigned long arg0, arg1, arg2, arg3, arg4; 54 unsigned long arg0, arg1, arg2, arg3, arg4;
55}; 55};
56 56
diff --git a/arch/x86/include/asm/pgalloc.h b/arch/x86/include/asm/pgalloc.h
index dd14c54ac71..0e8c2a0fd92 100644
--- a/arch/x86/include/asm/pgalloc.h
+++ b/arch/x86/include/asm/pgalloc.h
@@ -46,7 +46,13 @@ static inline void pte_free(struct mm_struct *mm, struct page *pte)
46 __free_page(pte); 46 __free_page(pte);
47} 47}
48 48
49extern void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte); 49extern void ___pte_free_tlb(struct mmu_gather *tlb, struct page *pte);
50
51static inline void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte,
52 unsigned long address)
53{
54 ___pte_free_tlb(tlb, pte);
55}
50 56
51static inline void pmd_populate_kernel(struct mm_struct *mm, 57static inline void pmd_populate_kernel(struct mm_struct *mm,
52 pmd_t *pmd, pte_t *pte) 58 pmd_t *pmd, pte_t *pte)
@@ -78,7 +84,13 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
78 free_page((unsigned long)pmd); 84 free_page((unsigned long)pmd);
79} 85}
80 86
81extern void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd); 87extern void ___pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd);
88
89static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd,
90 unsigned long adddress)
91{
92 ___pmd_free_tlb(tlb, pmd);
93}
82 94
83#ifdef CONFIG_X86_PAE 95#ifdef CONFIG_X86_PAE
84extern void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd); 96extern void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd);
@@ -108,7 +120,14 @@ static inline void pud_free(struct mm_struct *mm, pud_t *pud)
108 free_page((unsigned long)pud); 120 free_page((unsigned long)pud);
109} 121}
110 122
111extern void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pud); 123extern void ___pud_free_tlb(struct mmu_gather *tlb, pud_t *pud);
124
125static inline void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pud,
126 unsigned long address)
127{
128 ___pud_free_tlb(tlb, pud);
129}
130
112#endif /* PAGETABLE_LEVELS > 3 */ 131#endif /* PAGETABLE_LEVELS > 3 */
113#endif /* PAGETABLE_LEVELS > 2 */ 132#endif /* PAGETABLE_LEVELS > 2 */
114 133
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 3cc06e3fceb..16748077559 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -2,6 +2,7 @@
2#define _ASM_X86_PGTABLE_H 2#define _ASM_X86_PGTABLE_H
3 3
4#include <asm/page.h> 4#include <asm/page.h>
5#include <asm/e820.h>
5 6
6#include <asm/pgtable_types.h> 7#include <asm/pgtable_types.h>
7 8
@@ -269,10 +270,17 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
269 270
270#define canon_pgprot(p) __pgprot(massage_pgprot(p)) 271#define canon_pgprot(p) __pgprot(massage_pgprot(p))
271 272
272static inline int is_new_memtype_allowed(unsigned long flags, 273static inline int is_new_memtype_allowed(u64 paddr, unsigned long size,
273 unsigned long new_flags) 274 unsigned long flags,
275 unsigned long new_flags)
274{ 276{
275 /* 277 /*
278 * PAT type is always WB for ISA. So no need to check.
279 */
280 if (is_ISA_range(paddr, paddr + size - 1))
281 return 1;
282
283 /*
276 * Certain new memtypes are not allowed with certain 284 * Certain new memtypes are not allowed with certain
277 * requested memtype: 285 * requested memtype:
278 * - request is uncached, return cannot be write-back 286 * - request is uncached, return cannot be write-back
diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
index 20e6a795e16..d2c6c930b49 100644
--- a/arch/x86/include/asm/uaccess.h
+++ b/arch/x86/include/asm/uaccess.h
@@ -212,9 +212,9 @@ extern int __get_user_bad(void);
212 : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") 212 : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
213#else 213#else
214#define __put_user_asm_u64(x, ptr, retval, errret) \ 214#define __put_user_asm_u64(x, ptr, retval, errret) \
215 __put_user_asm(x, ptr, retval, "q", "", "Zr", errret) 215 __put_user_asm(x, ptr, retval, "q", "", "er", errret)
216#define __put_user_asm_ex_u64(x, addr) \ 216#define __put_user_asm_ex_u64(x, addr) \
217 __put_user_asm_ex(x, addr, "q", "", "Zr") 217 __put_user_asm_ex(x, addr, "q", "", "er")
218#define __put_user_x8(x, ptr, __ret_pu) __put_user_x(8, x, ptr, __ret_pu) 218#define __put_user_x8(x, ptr, __ret_pu) __put_user_x(8, x, ptr, __ret_pu)
219#endif 219#endif
220 220
diff --git a/arch/x86/include/asm/uaccess_64.h b/arch/x86/include/asm/uaccess_64.h
index 8cc687326eb..db24b215fc5 100644
--- a/arch/x86/include/asm/uaccess_64.h
+++ b/arch/x86/include/asm/uaccess_64.h
@@ -88,11 +88,11 @@ int __copy_to_user(void __user *dst, const void *src, unsigned size)
88 ret, "l", "k", "ir", 4); 88 ret, "l", "k", "ir", 4);
89 return ret; 89 return ret;
90 case 8:__put_user_asm(*(u64 *)src, (u64 __user *)dst, 90 case 8:__put_user_asm(*(u64 *)src, (u64 __user *)dst,
91 ret, "q", "", "ir", 8); 91 ret, "q", "", "er", 8);
92 return ret; 92 return ret;
93 case 10: 93 case 10:
94 __put_user_asm(*(u64 *)src, (u64 __user *)dst, 94 __put_user_asm(*(u64 *)src, (u64 __user *)dst,
95 ret, "q", "", "ir", 10); 95 ret, "q", "", "er", 10);
96 if (unlikely(ret)) 96 if (unlikely(ret))
97 return ret; 97 return ret;
98 asm("":::"memory"); 98 asm("":::"memory");
@@ -101,12 +101,12 @@ int __copy_to_user(void __user *dst, const void *src, unsigned size)
101 return ret; 101 return ret;
102 case 16: 102 case 16:
103 __put_user_asm(*(u64 *)src, (u64 __user *)dst, 103 __put_user_asm(*(u64 *)src, (u64 __user *)dst,
104 ret, "q", "", "ir", 16); 104 ret, "q", "", "er", 16);
105 if (unlikely(ret)) 105 if (unlikely(ret))
106 return ret; 106 return ret;
107 asm("":::"memory"); 107 asm("":::"memory");
108 __put_user_asm(1[(u64 *)src], 1 + (u64 __user *)dst, 108 __put_user_asm(1[(u64 *)src], 1 + (u64 __user *)dst,
109 ret, "q", "", "ir", 8); 109 ret, "q", "", "er", 8);
110 return ret; 110 return ret;
111 default: 111 default:
112 return copy_user_generic((__force void *)dst, src, size); 112 return copy_user_generic((__force void *)dst, src, size);
@@ -157,7 +157,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
157 ret, "q", "", "=r", 8); 157 ret, "q", "", "=r", 8);
158 if (likely(!ret)) 158 if (likely(!ret))
159 __put_user_asm(tmp, (u64 __user *)dst, 159 __put_user_asm(tmp, (u64 __user *)dst,
160 ret, "q", "", "ir", 8); 160 ret, "q", "", "er", 8);
161 return ret; 161 return ret;
162 } 162 }
163 default: 163 default:
diff --git a/arch/x86/include/asm/uv/uv_bau.h b/arch/x86/include/asm/uv/uv_bau.h
index bddd44f2f0a..80e2984f521 100644
--- a/arch/x86/include/asm/uv/uv_bau.h
+++ b/arch/x86/include/asm/uv/uv_bau.h
@@ -133,7 +133,7 @@ struct bau_msg_payload {
133 * see table 4.2.3.0.1 in broacast_assist spec. 133 * see table 4.2.3.0.1 in broacast_assist spec.
134 */ 134 */
135struct bau_msg_header { 135struct bau_msg_header {
136 unsigned int dest_subnodeid:6; /* must be zero */ 136 unsigned int dest_subnodeid:6; /* must be 0x10, for the LB */
137 /* bits 5:0 */ 137 /* bits 5:0 */
138 unsigned int base_dest_nodeid:15; /* nasid>>1 (pnode) of */ 138 unsigned int base_dest_nodeid:15; /* nasid>>1 (pnode) of */
139 /* bits 20:6 */ /* first bit in node_map */ 139 /* bits 20:6 */ /* first bit in node_map */
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index 341070f7ad5..77a68505419 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -175,7 +175,7 @@ DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
175#define UV_GLOBAL_MMR32_PNODE_BITS(p) ((p) << (UV_GLOBAL_MMR32_PNODE_SHIFT)) 175#define UV_GLOBAL_MMR32_PNODE_BITS(p) ((p) << (UV_GLOBAL_MMR32_PNODE_SHIFT))
176 176
177#define UV_GLOBAL_MMR64_PNODE_BITS(p) \ 177#define UV_GLOBAL_MMR64_PNODE_BITS(p) \
178 ((unsigned long)(UV_PNODE_TO_GNODE(p)) << UV_GLOBAL_MMR64_PNODE_SHIFT) 178 (((unsigned long)(p)) << UV_GLOBAL_MMR64_PNODE_SHIFT)
179 179
180#define UV_APIC_PNODE_SHIFT 6 180#define UV_APIC_PNODE_SHIFT 6
181 181
@@ -327,6 +327,7 @@ struct uv_blade_info {
327 unsigned short nr_possible_cpus; 327 unsigned short nr_possible_cpus;
328 unsigned short nr_online_cpus; 328 unsigned short nr_online_cpus;
329 unsigned short pnode; 329 unsigned short pnode;
330 short memory_nid;
330}; 331};
331extern struct uv_blade_info *uv_blade_info; 332extern struct uv_blade_info *uv_blade_info;
332extern short *uv_node_to_blade; 333extern short *uv_node_to_blade;
@@ -363,6 +364,12 @@ static inline int uv_blade_to_pnode(int bid)
363 return uv_blade_info[bid].pnode; 364 return uv_blade_info[bid].pnode;
364} 365}
365 366
367/* Nid of memory node on blade. -1 if no blade-local memory */
368static inline int uv_blade_to_memory_nid(int bid)
369{
370 return uv_blade_info[bid].memory_nid;
371}
372
366/* Determine the number of possible cpus on a blade */ 373/* Determine the number of possible cpus on a blade */
367static inline int uv_blade_nr_possible_cpus(int bid) 374static inline int uv_blade_nr_possible_cpus(int bid)
368{ 375{
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 2284a4812b6..d2ed6c5ddc8 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3793,6 +3793,9 @@ int arch_enable_uv_irq(char *irq_name, unsigned int irq, int cpu, int mmr_blade,
3793 mmr_pnode = uv_blade_to_pnode(mmr_blade); 3793 mmr_pnode = uv_blade_to_pnode(mmr_blade);
3794 uv_write_global_mmr64(mmr_pnode, mmr_offset, mmr_value); 3794 uv_write_global_mmr64(mmr_pnode, mmr_offset, mmr_value);
3795 3795
3796 if (cfg->move_in_progress)
3797 send_cleanup_vector(cfg);
3798
3796 return irq; 3799 return irq;
3797} 3800}
3798 3801
diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c
index 8e4cbb255c3..a5371ec3677 100644
--- a/arch/x86/kernel/apic/x2apic_cluster.c
+++ b/arch/x86/kernel/apic/x2apic_cluster.c
@@ -17,11 +17,13 @@ static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
17 return x2apic_enabled(); 17 return x2apic_enabled();
18} 18}
19 19
20/* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */ 20/*
21 21 * need to use more than cpu 0, because we need more vectors when
22 * MSI-X are used.
23 */
22static const struct cpumask *x2apic_target_cpus(void) 24static const struct cpumask *x2apic_target_cpus(void)
23{ 25{
24 return cpumask_of(0); 26 return cpu_online_mask;
25} 27}
26 28
27/* 29/*
@@ -170,7 +172,7 @@ static unsigned long set_apic_id(unsigned int id)
170 172
171static int x2apic_cluster_phys_pkg_id(int initial_apicid, int index_msb) 173static int x2apic_cluster_phys_pkg_id(int initial_apicid, int index_msb)
172{ 174{
173 return current_cpu_data.initial_apicid >> index_msb; 175 return initial_apicid >> index_msb;
174} 176}
175 177
176static void x2apic_send_IPI_self(int vector) 178static void x2apic_send_IPI_self(int vector)
diff --git a/arch/x86/kernel/apic/x2apic_phys.c b/arch/x86/kernel/apic/x2apic_phys.c
index a284359627e..a8989aadc99 100644
--- a/arch/x86/kernel/apic/x2apic_phys.c
+++ b/arch/x86/kernel/apic/x2apic_phys.c
@@ -27,11 +27,13 @@ static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
27 return 0; 27 return 0;
28} 28}
29 29
30/* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */ 30/*
31 31 * need to use more than cpu 0, because we need more vectors when
32 * MSI-X are used.
33 */
32static const struct cpumask *x2apic_target_cpus(void) 34static const struct cpumask *x2apic_target_cpus(void)
33{ 35{
34 return cpumask_of(0); 36 return cpu_online_mask;
35} 37}
36 38
37static void x2apic_vector_allocation_domain(int cpu, struct cpumask *retmask) 39static void x2apic_vector_allocation_domain(int cpu, struct cpumask *retmask)
@@ -162,7 +164,7 @@ static unsigned long set_apic_id(unsigned int id)
162 164
163static int x2apic_phys_pkg_id(int initial_apicid, int index_msb) 165static int x2apic_phys_pkg_id(int initial_apicid, int index_msb)
164{ 166{
165 return current_cpu_data.initial_apicid >> index_msb; 167 return initial_apicid >> index_msb;
166} 168}
167 169
168static void x2apic_send_IPI_self(int vector) 170static void x2apic_send_IPI_self(int vector)
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 096d19aea2f..601159374e8 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -46,7 +46,7 @@ static int early_get_nodeid(void)
46 return node_id.s.node_id; 46 return node_id.s.node_id;
47} 47}
48 48
49static int uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id) 49static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
50{ 50{
51 if (!strcmp(oem_id, "SGI")) { 51 if (!strcmp(oem_id, "SGI")) {
52 if (!strcmp(oem_table_id, "UVL")) 52 if (!strcmp(oem_table_id, "UVL"))
@@ -253,7 +253,7 @@ static void uv_send_IPI_self(int vector)
253 apic_write(APIC_SELF_IPI, vector); 253 apic_write(APIC_SELF_IPI, vector);
254} 254}
255 255
256struct apic apic_x2apic_uv_x = { 256struct apic __refdata apic_x2apic_uv_x = {
257 257
258 .name = "UV large system", 258 .name = "UV large system",
259 .probe = NULL, 259 .probe = NULL,
@@ -261,7 +261,7 @@ struct apic apic_x2apic_uv_x = {
261 .apic_id_registered = uv_apic_id_registered, 261 .apic_id_registered = uv_apic_id_registered,
262 262
263 .irq_delivery_mode = dest_Fixed, 263 .irq_delivery_mode = dest_Fixed,
264 .irq_dest_mode = 1, /* logical */ 264 .irq_dest_mode = 0, /* physical */
265 265
266 .target_cpus = uv_target_cpus, 266 .target_cpus = uv_target_cpus,
267 .disable_esr = 0, 267 .disable_esr = 0,
@@ -362,12 +362,6 @@ static __init void get_lowmem_redirect(unsigned long *base, unsigned long *size)
362 BUG(); 362 BUG();
363} 363}
364 364
365static __init void map_low_mmrs(void)
366{
367 init_extra_mapping_uc(UV_GLOBAL_MMR32_BASE, UV_GLOBAL_MMR32_SIZE);
368 init_extra_mapping_uc(UV_LOCAL_MMR_BASE, UV_LOCAL_MMR_SIZE);
369}
370
371enum map_type {map_wb, map_uc}; 365enum map_type {map_wb, map_uc};
372 366
373static __init void map_high(char *id, unsigned long base, int shift, 367static __init void map_high(char *id, unsigned long base, int shift,
@@ -395,26 +389,6 @@ static __init void map_gru_high(int max_pnode)
395 map_high("GRU", gru.s.base, shift, max_pnode, map_wb); 389 map_high("GRU", gru.s.base, shift, max_pnode, map_wb);
396} 390}
397 391
398static __init void map_config_high(int max_pnode)
399{
400 union uvh_rh_gam_cfg_overlay_config_mmr_u cfg;
401 int shift = UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR_BASE_SHFT;
402
403 cfg.v = uv_read_local_mmr(UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR);
404 if (cfg.s.enable)
405 map_high("CONFIG", cfg.s.base, shift, max_pnode, map_uc);
406}
407
408static __init void map_mmr_high(int max_pnode)
409{
410 union uvh_rh_gam_mmr_overlay_config_mmr_u mmr;
411 int shift = UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_BASE_SHFT;
412
413 mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR);
414 if (mmr.s.enable)
415 map_high("MMR", mmr.s.base, shift, max_pnode, map_uc);
416}
417
418static __init void map_mmioh_high(int max_pnode) 392static __init void map_mmioh_high(int max_pnode)
419{ 393{
420 union uvh_rh_gam_mmioh_overlay_config_mmr_u mmioh; 394 union uvh_rh_gam_mmioh_overlay_config_mmr_u mmioh;
@@ -566,8 +540,6 @@ void __init uv_system_init(void)
566 unsigned long mmr_base, present, paddr; 540 unsigned long mmr_base, present, paddr;
567 unsigned short pnode_mask; 541 unsigned short pnode_mask;
568 542
569 map_low_mmrs();
570
571 m_n_config.v = uv_read_local_mmr(UVH_SI_ADDR_MAP_CONFIG); 543 m_n_config.v = uv_read_local_mmr(UVH_SI_ADDR_MAP_CONFIG);
572 m_val = m_n_config.s.m_skt; 544 m_val = m_n_config.s.m_skt;
573 n_val = m_n_config.s.n_skt; 545 n_val = m_n_config.s.n_skt;
@@ -591,6 +563,8 @@ void __init uv_system_init(void)
591 bytes = sizeof(struct uv_blade_info) * uv_num_possible_blades(); 563 bytes = sizeof(struct uv_blade_info) * uv_num_possible_blades();
592 uv_blade_info = kmalloc(bytes, GFP_KERNEL); 564 uv_blade_info = kmalloc(bytes, GFP_KERNEL);
593 BUG_ON(!uv_blade_info); 565 BUG_ON(!uv_blade_info);
566 for (blade = 0; blade < uv_num_possible_blades(); blade++)
567 uv_blade_info[blade].memory_nid = -1;
594 568
595 get_lowmem_redirect(&lowmem_redir_base, &lowmem_redir_size); 569 get_lowmem_redirect(&lowmem_redir_base, &lowmem_redir_size);
596 570
@@ -629,6 +603,9 @@ void __init uv_system_init(void)
629 lcpu = uv_blade_info[blade].nr_possible_cpus; 603 lcpu = uv_blade_info[blade].nr_possible_cpus;
630 uv_blade_info[blade].nr_possible_cpus++; 604 uv_blade_info[blade].nr_possible_cpus++;
631 605
606 /* Any node on the blade, else will contain -1. */
607 uv_blade_info[blade].memory_nid = nid;
608
632 uv_cpu_hub_info(cpu)->lowmem_remap_base = lowmem_redir_base; 609 uv_cpu_hub_info(cpu)->lowmem_remap_base = lowmem_redir_base;
633 uv_cpu_hub_info(cpu)->lowmem_remap_top = lowmem_redir_size; 610 uv_cpu_hub_info(cpu)->lowmem_remap_top = lowmem_redir_size;
634 uv_cpu_hub_info(cpu)->m_val = m_val; 611 uv_cpu_hub_info(cpu)->m_val = m_val;
@@ -662,11 +639,10 @@ void __init uv_system_init(void)
662 pnode = (paddr >> m_val) & pnode_mask; 639 pnode = (paddr >> m_val) & pnode_mask;
663 blade = boot_pnode_to_blade(pnode); 640 blade = boot_pnode_to_blade(pnode);
664 uv_node_to_blade[nid] = blade; 641 uv_node_to_blade[nid] = blade;
642 max_pnode = max(pnode, max_pnode);
665 } 643 }
666 644
667 map_gru_high(max_pnode); 645 map_gru_high(max_pnode);
668 map_mmr_high(max_pnode);
669 map_config_high(max_pnode);
670 map_mmioh_high(max_pnode); 646 map_mmioh_high(max_pnode);
671 647
672 uv_cpu_init(); 648 uv_cpu_init();
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index 39a4462ef8a..151ace69a5a 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -819,7 +819,7 @@ static int apm_do_idle(void)
819 u8 ret = 0; 819 u8 ret = 0;
820 int idled = 0; 820 int idled = 0;
821 int polling; 821 int polling;
822 int err; 822 int err = 0;
823 823
824 polling = !!(current_thread_info()->status & TS_POLLING); 824 polling = !!(current_thread_info()->status & TS_POLLING);
825 if (polling) { 825 if (polling) {
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 3efcb2b96a1..c1f253dac15 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -7,6 +7,10 @@ ifdef CONFIG_FUNCTION_TRACER
7CFLAGS_REMOVE_common.o = -pg 7CFLAGS_REMOVE_common.o = -pg
8endif 8endif
9 9
10# Make sure load_percpu_segment has no stackprotector
11nostackp := $(call cc-option, -fno-stack-protector)
12CFLAGS_common.o := $(nostackp)
13
10obj-y := intel_cacheinfo.o addon_cpuid_features.o 14obj-y := intel_cacheinfo.o addon_cpuid_features.o
11obj-y += proc.o capflags.o powerflags.o common.o 15obj-y += proc.o capflags.o powerflags.o common.o
12obj-y += vmware.o hypervisor.o 16obj-y += vmware.o hypervisor.o
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 28e5f595604..63fddcd082c 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -356,7 +356,7 @@ static void __cpuinit early_init_amd(struct cpuinfo_x86 *c)
356#endif 356#endif
357#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PCI) 357#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PCI)
358 /* check CPU config space for extended APIC ID */ 358 /* check CPU config space for extended APIC ID */
359 if (c->x86 >= 0xf) { 359 if (cpu_has_apic && c->x86 >= 0xf) {
360 unsigned int val; 360 unsigned int val;
361 val = read_pci_config(0, 24, 0, 0x68); 361 val = read_pci_config(0, 24, 0, 0x68);
362 if ((val & ((1 << 17) | (1 << 18))) == ((1 << 17) | (1 << 18))) 362 if ((val & ((1 << 17) | (1 << 18))) == ((1 << 17) | (1 << 18)))
@@ -400,6 +400,13 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
400 level = cpuid_eax(1); 400 level = cpuid_eax(1);
401 if((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58) 401 if((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58)
402 set_cpu_cap(c, X86_FEATURE_REP_GOOD); 402 set_cpu_cap(c, X86_FEATURE_REP_GOOD);
403
404 /*
405 * Some BIOSes incorrectly force this feature, but only K8
406 * revision D (model = 0x14) and later actually support it.
407 */
408 if (c->x86_model < 0x14)
409 clear_cpu_cap(c, X86_FEATURE_LAHF_LM);
403 } 410 }
404 if (c->x86 == 0x10 || c->x86 == 0x11) 411 if (c->x86 == 0x10 || c->x86 == 0x11)
405 set_cpu_cap(c, X86_FEATURE_REP_GOOD); 412 set_cpu_cap(c, X86_FEATURE_REP_GOOD);
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index b5764a26964..ced07ba5e93 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -59,7 +59,30 @@ void __init setup_cpu_local_masks(void)
59 alloc_bootmem_cpumask_var(&cpu_sibling_setup_mask); 59 alloc_bootmem_cpumask_var(&cpu_sibling_setup_mask);
60} 60}
61 61
62static const struct cpu_dev *this_cpu __cpuinitdata; 62static void __cpuinit default_init(struct cpuinfo_x86 *c)
63{
64#ifdef CONFIG_X86_64
65 display_cacheinfo(c);
66#else
67 /* Not much we can do here... */
68 /* Check if at least it has cpuid */
69 if (c->cpuid_level == -1) {
70 /* No cpuid. It must be an ancient CPU */
71 if (c->x86 == 4)
72 strcpy(c->x86_model_id, "486");
73 else if (c->x86 == 3)
74 strcpy(c->x86_model_id, "386");
75 }
76#endif
77}
78
79static const struct cpu_dev __cpuinitconst default_cpu = {
80 .c_init = default_init,
81 .c_vendor = "Unknown",
82 .c_x86_vendor = X86_VENDOR_UNKNOWN,
83};
84
85static const struct cpu_dev *this_cpu __cpuinitdata = &default_cpu;
63 86
64DEFINE_PER_CPU_PAGE_ALIGNED(struct gdt_page, gdt_page) = { .gdt = { 87DEFINE_PER_CPU_PAGE_ALIGNED(struct gdt_page, gdt_page) = { .gdt = {
65#ifdef CONFIG_X86_64 88#ifdef CONFIG_X86_64
@@ -332,29 +355,6 @@ void switch_to_new_gdt(int cpu)
332 355
333static const struct cpu_dev *__cpuinitdata cpu_devs[X86_VENDOR_NUM] = {}; 356static const struct cpu_dev *__cpuinitdata cpu_devs[X86_VENDOR_NUM] = {};
334 357
335static void __cpuinit default_init(struct cpuinfo_x86 *c)
336{
337#ifdef CONFIG_X86_64
338 display_cacheinfo(c);
339#else
340 /* Not much we can do here... */
341 /* Check if at least it has cpuid */
342 if (c->cpuid_level == -1) {
343 /* No cpuid. It must be an ancient CPU */
344 if (c->x86 == 4)
345 strcpy(c->x86_model_id, "486");
346 else if (c->x86 == 3)
347 strcpy(c->x86_model_id, "386");
348 }
349#endif
350}
351
352static const struct cpu_dev __cpuinitconst default_cpu = {
353 .c_init = default_init,
354 .c_vendor = "Unknown",
355 .c_x86_vendor = X86_VENDOR_UNKNOWN,
356};
357
358static void __cpuinit get_model_name(struct cpuinfo_x86 *c) 358static void __cpuinit get_model_name(struct cpuinfo_x86 *c)
359{ 359{
360 unsigned int *v; 360 unsigned int *v;
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 484c1e5f658..01213048f62 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1226,8 +1226,13 @@ static void mce_init(void)
1226} 1226}
1227 1227
1228/* Add per CPU specific workarounds here */ 1228/* Add per CPU specific workarounds here */
1229static void mce_cpu_quirks(struct cpuinfo_x86 *c) 1229static int mce_cpu_quirks(struct cpuinfo_x86 *c)
1230{ 1230{
1231 if (c->x86_vendor == X86_VENDOR_UNKNOWN) {
1232 pr_info("MCE: unknown CPU type - not enabling MCE support.\n");
1233 return -EOPNOTSUPP;
1234 }
1235
1231 /* This should be disabled by the BIOS, but isn't always */ 1236 /* This should be disabled by the BIOS, but isn't always */
1232 if (c->x86_vendor == X86_VENDOR_AMD) { 1237 if (c->x86_vendor == X86_VENDOR_AMD) {
1233 if (c->x86 == 15 && banks > 4) { 1238 if (c->x86 == 15 && banks > 4) {
@@ -1273,11 +1278,20 @@ static void mce_cpu_quirks(struct cpuinfo_x86 *c)
1273 if ((c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xe)) && 1278 if ((c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xe)) &&
1274 monarch_timeout < 0) 1279 monarch_timeout < 0)
1275 monarch_timeout = USEC_PER_SEC; 1280 monarch_timeout = USEC_PER_SEC;
1281
1282 /*
1283 * There are also broken BIOSes on some Pentium M and
1284 * earlier systems:
1285 */
1286 if (c->x86 == 6 && c->x86_model <= 13 && mce_bootlog < 0)
1287 mce_bootlog = 0;
1276 } 1288 }
1277 if (monarch_timeout < 0) 1289 if (monarch_timeout < 0)
1278 monarch_timeout = 0; 1290 monarch_timeout = 0;
1279 if (mce_bootlog != 0) 1291 if (mce_bootlog != 0)
1280 mce_panic_timeout = 30; 1292 mce_panic_timeout = 30;
1293
1294 return 0;
1281} 1295}
1282 1296
1283static void __cpuinit mce_ancient_init(struct cpuinfo_x86 *c) 1297static void __cpuinit mce_ancient_init(struct cpuinfo_x86 *c)
@@ -1338,11 +1352,10 @@ void __cpuinit mcheck_init(struct cpuinfo_x86 *c)
1338 if (!mce_available(c)) 1352 if (!mce_available(c))
1339 return; 1353 return;
1340 1354
1341 if (mce_cap_init() < 0) { 1355 if (mce_cap_init() < 0 || mce_cpu_quirks(c) < 0) {
1342 mce_disabled = 1; 1356 mce_disabled = 1;
1343 return; 1357 return;
1344 } 1358 }
1345 mce_cpu_quirks(c);
1346 1359
1347 machine_check_vector = do_machine_check; 1360 machine_check_vector = do_machine_check;
1348 1361
@@ -1692,17 +1705,15 @@ static ssize_t set_trigger(struct sys_device *s, struct sysdev_attribute *attr,
1692 const char *buf, size_t siz) 1705 const char *buf, size_t siz)
1693{ 1706{
1694 char *p; 1707 char *p;
1695 int len;
1696 1708
1697 strncpy(mce_helper, buf, sizeof(mce_helper)); 1709 strncpy(mce_helper, buf, sizeof(mce_helper));
1698 mce_helper[sizeof(mce_helper)-1] = 0; 1710 mce_helper[sizeof(mce_helper)-1] = 0;
1699 len = strlen(mce_helper);
1700 p = strchr(mce_helper, '\n'); 1711 p = strchr(mce_helper, '\n');
1701 1712
1702 if (*p) 1713 if (p)
1703 *p = 0; 1714 *p = 0;
1704 1715
1705 return len; 1716 return strlen(mce_helper) + !!p;
1706} 1717}
1707 1718
1708static ssize_t set_ignore_ce(struct sys_device *s, 1719static ssize_t set_ignore_ce(struct sys_device *s,
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c
index bff8dd191dd..5957a93e517 100644
--- a/arch/x86/kernel/cpu/mcheck/therm_throt.c
+++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c
@@ -36,6 +36,7 @@
36 36
37static DEFINE_PER_CPU(__u64, next_check) = INITIAL_JIFFIES; 37static DEFINE_PER_CPU(__u64, next_check) = INITIAL_JIFFIES;
38static DEFINE_PER_CPU(unsigned long, thermal_throttle_count); 38static DEFINE_PER_CPU(unsigned long, thermal_throttle_count);
39static DEFINE_PER_CPU(bool, thermal_throttle_active);
39 40
40static atomic_t therm_throt_en = ATOMIC_INIT(0); 41static atomic_t therm_throt_en = ATOMIC_INIT(0);
41 42
@@ -96,27 +97,33 @@ static int therm_throt_process(int curr)
96{ 97{
97 unsigned int cpu = smp_processor_id(); 98 unsigned int cpu = smp_processor_id();
98 __u64 tmp_jiffs = get_jiffies_64(); 99 __u64 tmp_jiffs = get_jiffies_64();
100 bool was_throttled = __get_cpu_var(thermal_throttle_active);
101 bool is_throttled = __get_cpu_var(thermal_throttle_active) = curr;
99 102
100 if (curr) 103 if (is_throttled)
101 __get_cpu_var(thermal_throttle_count)++; 104 __get_cpu_var(thermal_throttle_count)++;
102 105
103 if (time_before64(tmp_jiffs, __get_cpu_var(next_check))) 106 if (!(was_throttled ^ is_throttled) &&
107 time_before64(tmp_jiffs, __get_cpu_var(next_check)))
104 return 0; 108 return 0;
105 109
106 __get_cpu_var(next_check) = tmp_jiffs + CHECK_INTERVAL; 110 __get_cpu_var(next_check) = tmp_jiffs + CHECK_INTERVAL;
107 111
108 /* if we just entered the thermal event */ 112 /* if we just entered the thermal event */
109 if (curr) { 113 if (is_throttled) {
110 printk(KERN_CRIT "CPU%d: Temperature above threshold, " 114 printk(KERN_CRIT "CPU%d: Temperature above threshold, "
111 "cpu clock throttled (total events = %lu)\n", cpu, 115 "cpu clock throttled (total events = %lu)\n",
112 __get_cpu_var(thermal_throttle_count)); 116 cpu, __get_cpu_var(thermal_throttle_count));
113 117
114 add_taint(TAINT_MACHINE_CHECK); 118 add_taint(TAINT_MACHINE_CHECK);
115 } else { 119 return 1;
116 printk(KERN_CRIT "CPU%d: Temperature/speed normal\n", cpu); 120 }
121 if (was_throttled) {
122 printk(KERN_INFO "CPU%d: Temperature/speed normal\n", cpu);
123 return 1;
117 } 124 }
118 125
119 return 1; 126 return 0;
120} 127}
121 128
122#ifdef CONFIG_SYSFS 129#ifdef CONFIG_SYSFS
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
index 36c3dc7b899..900332b800f 100644
--- a/arch/x86/kernel/cpu/perf_counter.c
+++ b/arch/x86/kernel/cpu/perf_counter.c
@@ -55,6 +55,7 @@ struct x86_pmu {
55 int num_counters_fixed; 55 int num_counters_fixed;
56 int counter_bits; 56 int counter_bits;
57 u64 counter_mask; 57 u64 counter_mask;
58 int apic;
58 u64 max_period; 59 u64 max_period;
59 u64 intel_ctrl; 60 u64 intel_ctrl;
60}; 61};
@@ -66,6 +67,52 @@ static DEFINE_PER_CPU(struct cpu_hw_counters, cpu_hw_counters) = {
66}; 67};
67 68
68/* 69/*
70 * Not sure about some of these
71 */
72static const u64 p6_perfmon_event_map[] =
73{
74 [PERF_COUNT_HW_CPU_CYCLES] = 0x0079,
75 [PERF_COUNT_HW_INSTRUCTIONS] = 0x00c0,
76 [PERF_COUNT_HW_CACHE_REFERENCES] = 0x0f2e,
77 [PERF_COUNT_HW_CACHE_MISSES] = 0x012e,
78 [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c4,
79 [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c5,
80 [PERF_COUNT_HW_BUS_CYCLES] = 0x0062,
81};
82
83static u64 p6_pmu_event_map(int event)
84{
85 return p6_perfmon_event_map[event];
86}
87
88/*
89 * Counter setting that is specified not to count anything.
90 * We use this to effectively disable a counter.
91 *
92 * L2_RQSTS with 0 MESI unit mask.
93 */
94#define P6_NOP_COUNTER 0x0000002EULL
95
96static u64 p6_pmu_raw_event(u64 event)
97{
98#define P6_EVNTSEL_EVENT_MASK 0x000000FFULL
99#define P6_EVNTSEL_UNIT_MASK 0x0000FF00ULL
100#define P6_EVNTSEL_EDGE_MASK 0x00040000ULL
101#define P6_EVNTSEL_INV_MASK 0x00800000ULL
102#define P6_EVNTSEL_COUNTER_MASK 0xFF000000ULL
103
104#define P6_EVNTSEL_MASK \
105 (P6_EVNTSEL_EVENT_MASK | \
106 P6_EVNTSEL_UNIT_MASK | \
107 P6_EVNTSEL_EDGE_MASK | \
108 P6_EVNTSEL_INV_MASK | \
109 P6_EVNTSEL_COUNTER_MASK)
110
111 return event & P6_EVNTSEL_MASK;
112}
113
114
115/*
69 * Intel PerfMon v3. Used on Core2 and later. 116 * Intel PerfMon v3. Used on Core2 and later.
70 */ 117 */
71static const u64 intel_perfmon_event_map[] = 118static const u64 intel_perfmon_event_map[] =
@@ -567,6 +614,7 @@ static DEFINE_MUTEX(pmc_reserve_mutex);
567 614
568static bool reserve_pmc_hardware(void) 615static bool reserve_pmc_hardware(void)
569{ 616{
617#ifdef CONFIG_X86_LOCAL_APIC
570 int i; 618 int i;
571 619
572 if (nmi_watchdog == NMI_LOCAL_APIC) 620 if (nmi_watchdog == NMI_LOCAL_APIC)
@@ -581,9 +629,11 @@ static bool reserve_pmc_hardware(void)
581 if (!reserve_evntsel_nmi(x86_pmu.eventsel + i)) 629 if (!reserve_evntsel_nmi(x86_pmu.eventsel + i))
582 goto eventsel_fail; 630 goto eventsel_fail;
583 } 631 }
632#endif
584 633
585 return true; 634 return true;
586 635
636#ifdef CONFIG_X86_LOCAL_APIC
587eventsel_fail: 637eventsel_fail:
588 for (i--; i >= 0; i--) 638 for (i--; i >= 0; i--)
589 release_evntsel_nmi(x86_pmu.eventsel + i); 639 release_evntsel_nmi(x86_pmu.eventsel + i);
@@ -598,10 +648,12 @@ perfctr_fail:
598 enable_lapic_nmi_watchdog(); 648 enable_lapic_nmi_watchdog();
599 649
600 return false; 650 return false;
651#endif
601} 652}
602 653
603static void release_pmc_hardware(void) 654static void release_pmc_hardware(void)
604{ 655{
656#ifdef CONFIG_X86_LOCAL_APIC
605 int i; 657 int i;
606 658
607 for (i = 0; i < x86_pmu.num_counters; i++) { 659 for (i = 0; i < x86_pmu.num_counters; i++) {
@@ -611,6 +663,7 @@ static void release_pmc_hardware(void)
611 663
612 if (nmi_watchdog == NMI_LOCAL_APIC) 664 if (nmi_watchdog == NMI_LOCAL_APIC)
613 enable_lapic_nmi_watchdog(); 665 enable_lapic_nmi_watchdog();
666#endif
614} 667}
615 668
616static void hw_perf_counter_destroy(struct perf_counter *counter) 669static void hw_perf_counter_destroy(struct perf_counter *counter)
@@ -666,6 +719,7 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
666{ 719{
667 struct perf_counter_attr *attr = &counter->attr; 720 struct perf_counter_attr *attr = &counter->attr;
668 struct hw_perf_counter *hwc = &counter->hw; 721 struct hw_perf_counter *hwc = &counter->hw;
722 u64 config;
669 int err; 723 int err;
670 724
671 if (!x86_pmu_initialized()) 725 if (!x86_pmu_initialized())
@@ -701,6 +755,15 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
701 hwc->sample_period = x86_pmu.max_period; 755 hwc->sample_period = x86_pmu.max_period;
702 hwc->last_period = hwc->sample_period; 756 hwc->last_period = hwc->sample_period;
703 atomic64_set(&hwc->period_left, hwc->sample_period); 757 atomic64_set(&hwc->period_left, hwc->sample_period);
758 } else {
759 /*
760 * If we have a PMU initialized but no APIC
761 * interrupts, we cannot sample hardware
762 * counters (user-space has to fall back and
763 * sample via a hrtimer based software counter):
764 */
765 if (!x86_pmu.apic)
766 return -EOPNOTSUPP;
704 } 767 }
705 768
706 counter->destroy = hw_perf_counter_destroy; 769 counter->destroy = hw_perf_counter_destroy;
@@ -718,14 +781,40 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
718 781
719 if (attr->config >= x86_pmu.max_events) 782 if (attr->config >= x86_pmu.max_events)
720 return -EINVAL; 783 return -EINVAL;
784
721 /* 785 /*
722 * The generic map: 786 * The generic map:
723 */ 787 */
724 hwc->config |= x86_pmu.event_map(attr->config); 788 config = x86_pmu.event_map(attr->config);
789
790 if (config == 0)
791 return -ENOENT;
792
793 if (config == -1LL)
794 return -EINVAL;
795
796 hwc->config |= config;
725 797
726 return 0; 798 return 0;
727} 799}
728 800
801static void p6_pmu_disable_all(void)
802{
803 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters);
804 u64 val;
805
806 if (!cpuc->enabled)
807 return;
808
809 cpuc->enabled = 0;
810 barrier();
811
812 /* p6 only has one enable register */
813 rdmsrl(MSR_P6_EVNTSEL0, val);
814 val &= ~ARCH_PERFMON_EVENTSEL0_ENABLE;
815 wrmsrl(MSR_P6_EVNTSEL0, val);
816}
817
729static void intel_pmu_disable_all(void) 818static void intel_pmu_disable_all(void)
730{ 819{
731 wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, 0); 820 wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, 0);
@@ -767,6 +856,23 @@ void hw_perf_disable(void)
767 return x86_pmu.disable_all(); 856 return x86_pmu.disable_all();
768} 857}
769 858
859static void p6_pmu_enable_all(void)
860{
861 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters);
862 unsigned long val;
863
864 if (cpuc->enabled)
865 return;
866
867 cpuc->enabled = 1;
868 barrier();
869
870 /* p6 only has one enable register */
871 rdmsrl(MSR_P6_EVNTSEL0, val);
872 val |= ARCH_PERFMON_EVENTSEL0_ENABLE;
873 wrmsrl(MSR_P6_EVNTSEL0, val);
874}
875
770static void intel_pmu_enable_all(void) 876static void intel_pmu_enable_all(void)
771{ 877{
772 wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, x86_pmu.intel_ctrl); 878 wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, x86_pmu.intel_ctrl);
@@ -784,13 +890,13 @@ static void amd_pmu_enable_all(void)
784 barrier(); 890 barrier();
785 891
786 for (idx = 0; idx < x86_pmu.num_counters; idx++) { 892 for (idx = 0; idx < x86_pmu.num_counters; idx++) {
893 struct perf_counter *counter = cpuc->counters[idx];
787 u64 val; 894 u64 val;
788 895
789 if (!test_bit(idx, cpuc->active_mask)) 896 if (!test_bit(idx, cpuc->active_mask))
790 continue; 897 continue;
791 rdmsrl(MSR_K7_EVNTSEL0 + idx, val); 898
792 if (val & ARCH_PERFMON_EVENTSEL0_ENABLE) 899 val = counter->hw.config;
793 continue;
794 val |= ARCH_PERFMON_EVENTSEL0_ENABLE; 900 val |= ARCH_PERFMON_EVENTSEL0_ENABLE;
795 wrmsrl(MSR_K7_EVNTSEL0 + idx, val); 901 wrmsrl(MSR_K7_EVNTSEL0 + idx, val);
796 } 902 }
@@ -819,16 +925,13 @@ static inline void intel_pmu_ack_status(u64 ack)
819 925
820static inline void x86_pmu_enable_counter(struct hw_perf_counter *hwc, int idx) 926static inline void x86_pmu_enable_counter(struct hw_perf_counter *hwc, int idx)
821{ 927{
822 int err; 928 (void)checking_wrmsrl(hwc->config_base + idx,
823 err = checking_wrmsrl(hwc->config_base + idx,
824 hwc->config | ARCH_PERFMON_EVENTSEL0_ENABLE); 929 hwc->config | ARCH_PERFMON_EVENTSEL0_ENABLE);
825} 930}
826 931
827static inline void x86_pmu_disable_counter(struct hw_perf_counter *hwc, int idx) 932static inline void x86_pmu_disable_counter(struct hw_perf_counter *hwc, int idx)
828{ 933{
829 int err; 934 (void)checking_wrmsrl(hwc->config_base + idx, hwc->config);
830 err = checking_wrmsrl(hwc->config_base + idx,
831 hwc->config);
832} 935}
833 936
834static inline void 937static inline void
@@ -836,13 +939,24 @@ intel_pmu_disable_fixed(struct hw_perf_counter *hwc, int __idx)
836{ 939{
837 int idx = __idx - X86_PMC_IDX_FIXED; 940 int idx = __idx - X86_PMC_IDX_FIXED;
838 u64 ctrl_val, mask; 941 u64 ctrl_val, mask;
839 int err;
840 942
841 mask = 0xfULL << (idx * 4); 943 mask = 0xfULL << (idx * 4);
842 944
843 rdmsrl(hwc->config_base, ctrl_val); 945 rdmsrl(hwc->config_base, ctrl_val);
844 ctrl_val &= ~mask; 946 ctrl_val &= ~mask;
845 err = checking_wrmsrl(hwc->config_base, ctrl_val); 947 (void)checking_wrmsrl(hwc->config_base, ctrl_val);
948}
949
950static inline void
951p6_pmu_disable_counter(struct hw_perf_counter *hwc, int idx)
952{
953 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters);
954 u64 val = P6_NOP_COUNTER;
955
956 if (cpuc->enabled)
957 val |= ARCH_PERFMON_EVENTSEL0_ENABLE;
958
959 (void)checking_wrmsrl(hwc->config_base + idx, val);
846} 960}
847 961
848static inline void 962static inline void
@@ -943,6 +1057,19 @@ intel_pmu_enable_fixed(struct hw_perf_counter *hwc, int __idx)
943 err = checking_wrmsrl(hwc->config_base, ctrl_val); 1057 err = checking_wrmsrl(hwc->config_base, ctrl_val);
944} 1058}
945 1059
1060static void p6_pmu_enable_counter(struct hw_perf_counter *hwc, int idx)
1061{
1062 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters);
1063 u64 val;
1064
1065 val = hwc->config;
1066 if (cpuc->enabled)
1067 val |= ARCH_PERFMON_EVENTSEL0_ENABLE;
1068
1069 (void)checking_wrmsrl(hwc->config_base + idx, val);
1070}
1071
1072
946static void intel_pmu_enable_counter(struct hw_perf_counter *hwc, int idx) 1073static void intel_pmu_enable_counter(struct hw_perf_counter *hwc, int idx)
947{ 1074{
948 if (unlikely(hwc->config_base == MSR_ARCH_PERFMON_FIXED_CTR_CTRL)) { 1075 if (unlikely(hwc->config_base == MSR_ARCH_PERFMON_FIXED_CTR_CTRL)) {
@@ -959,8 +1086,6 @@ static void amd_pmu_enable_counter(struct hw_perf_counter *hwc, int idx)
959 1086
960 if (cpuc->enabled) 1087 if (cpuc->enabled)
961 x86_pmu_enable_counter(hwc, idx); 1088 x86_pmu_enable_counter(hwc, idx);
962 else
963 x86_pmu_disable_counter(hwc, idx);
964} 1089}
965 1090
966static int 1091static int
@@ -1176,6 +1301,49 @@ static void intel_pmu_reset(void)
1176 local_irq_restore(flags); 1301 local_irq_restore(flags);
1177} 1302}
1178 1303
1304static int p6_pmu_handle_irq(struct pt_regs *regs)
1305{
1306 struct perf_sample_data data;
1307 struct cpu_hw_counters *cpuc;
1308 struct perf_counter *counter;
1309 struct hw_perf_counter *hwc;
1310 int idx, handled = 0;
1311 u64 val;
1312
1313 data.regs = regs;
1314 data.addr = 0;
1315
1316 cpuc = &__get_cpu_var(cpu_hw_counters);
1317
1318 for (idx = 0; idx < x86_pmu.num_counters; idx++) {
1319 if (!test_bit(idx, cpuc->active_mask))
1320 continue;
1321
1322 counter = cpuc->counters[idx];
1323 hwc = &counter->hw;
1324
1325 val = x86_perf_counter_update(counter, hwc, idx);
1326 if (val & (1ULL << (x86_pmu.counter_bits - 1)))
1327 continue;
1328
1329 /*
1330 * counter overflow
1331 */
1332 handled = 1;
1333 data.period = counter->hw.last_period;
1334
1335 if (!x86_perf_counter_set_period(counter, hwc, idx))
1336 continue;
1337
1338 if (perf_counter_overflow(counter, 1, &data))
1339 p6_pmu_disable_counter(hwc, idx);
1340 }
1341
1342 if (handled)
1343 inc_irq_stat(apic_perf_irqs);
1344
1345 return handled;
1346}
1179 1347
1180/* 1348/*
1181 * This handler is triggered by the local APIC, so the APIC IRQ handling 1349 * This handler is triggered by the local APIC, so the APIC IRQ handling
@@ -1185,14 +1353,13 @@ static int intel_pmu_handle_irq(struct pt_regs *regs)
1185{ 1353{
1186 struct perf_sample_data data; 1354 struct perf_sample_data data;
1187 struct cpu_hw_counters *cpuc; 1355 struct cpu_hw_counters *cpuc;
1188 int bit, cpu, loops; 1356 int bit, loops;
1189 u64 ack, status; 1357 u64 ack, status;
1190 1358
1191 data.regs = regs; 1359 data.regs = regs;
1192 data.addr = 0; 1360 data.addr = 0;
1193 1361
1194 cpu = smp_processor_id(); 1362 cpuc = &__get_cpu_var(cpu_hw_counters);
1195 cpuc = &per_cpu(cpu_hw_counters, cpu);
1196 1363
1197 perf_disable(); 1364 perf_disable();
1198 status = intel_pmu_get_status(); 1365 status = intel_pmu_get_status();
@@ -1249,14 +1416,13 @@ static int amd_pmu_handle_irq(struct pt_regs *regs)
1249 struct cpu_hw_counters *cpuc; 1416 struct cpu_hw_counters *cpuc;
1250 struct perf_counter *counter; 1417 struct perf_counter *counter;
1251 struct hw_perf_counter *hwc; 1418 struct hw_perf_counter *hwc;
1252 int cpu, idx, handled = 0; 1419 int idx, handled = 0;
1253 u64 val; 1420 u64 val;
1254 1421
1255 data.regs = regs; 1422 data.regs = regs;
1256 data.addr = 0; 1423 data.addr = 0;
1257 1424
1258 cpu = smp_processor_id(); 1425 cpuc = &__get_cpu_var(cpu_hw_counters);
1259 cpuc = &per_cpu(cpu_hw_counters, cpu);
1260 1426
1261 for (idx = 0; idx < x86_pmu.num_counters; idx++) { 1427 for (idx = 0; idx < x86_pmu.num_counters; idx++) {
1262 if (!test_bit(idx, cpuc->active_mask)) 1428 if (!test_bit(idx, cpuc->active_mask))
@@ -1299,18 +1465,22 @@ void smp_perf_pending_interrupt(struct pt_regs *regs)
1299 1465
1300void set_perf_counter_pending(void) 1466void set_perf_counter_pending(void)
1301{ 1467{
1468#ifdef CONFIG_X86_LOCAL_APIC
1302 apic->send_IPI_self(LOCAL_PENDING_VECTOR); 1469 apic->send_IPI_self(LOCAL_PENDING_VECTOR);
1470#endif
1303} 1471}
1304 1472
1305void perf_counters_lapic_init(void) 1473void perf_counters_lapic_init(void)
1306{ 1474{
1307 if (!x86_pmu_initialized()) 1475#ifdef CONFIG_X86_LOCAL_APIC
1476 if (!x86_pmu.apic || !x86_pmu_initialized())
1308 return; 1477 return;
1309 1478
1310 /* 1479 /*
1311 * Always use NMI for PMU 1480 * Always use NMI for PMU
1312 */ 1481 */
1313 apic_write(APIC_LVTPC, APIC_DM_NMI); 1482 apic_write(APIC_LVTPC, APIC_DM_NMI);
1483#endif
1314} 1484}
1315 1485
1316static int __kprobes 1486static int __kprobes
@@ -1334,7 +1504,9 @@ perf_counter_nmi_handler(struct notifier_block *self,
1334 1504
1335 regs = args->regs; 1505 regs = args->regs;
1336 1506
1507#ifdef CONFIG_X86_LOCAL_APIC
1337 apic_write(APIC_LVTPC, APIC_DM_NMI); 1508 apic_write(APIC_LVTPC, APIC_DM_NMI);
1509#endif
1338 /* 1510 /*
1339 * Can't rely on the handled return value to say it was our NMI, two 1511 * Can't rely on the handled return value to say it was our NMI, two
1340 * counters could trigger 'simultaneously' raising two back-to-back NMIs. 1512 * counters could trigger 'simultaneously' raising two back-to-back NMIs.
@@ -1353,6 +1525,33 @@ static __read_mostly struct notifier_block perf_counter_nmi_notifier = {
1353 .priority = 1 1525 .priority = 1
1354}; 1526};
1355 1527
1528static struct x86_pmu p6_pmu = {
1529 .name = "p6",
1530 .handle_irq = p6_pmu_handle_irq,
1531 .disable_all = p6_pmu_disable_all,
1532 .enable_all = p6_pmu_enable_all,
1533 .enable = p6_pmu_enable_counter,
1534 .disable = p6_pmu_disable_counter,
1535 .eventsel = MSR_P6_EVNTSEL0,
1536 .perfctr = MSR_P6_PERFCTR0,
1537 .event_map = p6_pmu_event_map,
1538 .raw_event = p6_pmu_raw_event,
1539 .max_events = ARRAY_SIZE(p6_perfmon_event_map),
1540 .apic = 1,
1541 .max_period = (1ULL << 31) - 1,
1542 .version = 0,
1543 .num_counters = 2,
1544 /*
1545 * Counters have 40 bits implemented. However they are designed such
1546 * that bits [32-39] are sign extensions of bit 31. As such the
1547 * effective width of a counter for P6-like PMU is 32 bits only.
1548 *
1549 * See IA-32 Intel Architecture Software developer manual Vol 3B
1550 */
1551 .counter_bits = 32,
1552 .counter_mask = (1ULL << 32) - 1,
1553};
1554
1356static struct x86_pmu intel_pmu = { 1555static struct x86_pmu intel_pmu = {
1357 .name = "Intel", 1556 .name = "Intel",
1358 .handle_irq = intel_pmu_handle_irq, 1557 .handle_irq = intel_pmu_handle_irq,
@@ -1365,6 +1564,7 @@ static struct x86_pmu intel_pmu = {
1365 .event_map = intel_pmu_event_map, 1564 .event_map = intel_pmu_event_map,
1366 .raw_event = intel_pmu_raw_event, 1565 .raw_event = intel_pmu_raw_event,
1367 .max_events = ARRAY_SIZE(intel_perfmon_event_map), 1566 .max_events = ARRAY_SIZE(intel_perfmon_event_map),
1567 .apic = 1,
1368 /* 1568 /*
1369 * Intel PMCs cannot be accessed sanely above 32 bit width, 1569 * Intel PMCs cannot be accessed sanely above 32 bit width,
1370 * so we install an artificial 1<<31 period regardless of 1570 * so we install an artificial 1<<31 period regardless of
@@ -1388,10 +1588,43 @@ static struct x86_pmu amd_pmu = {
1388 .num_counters = 4, 1588 .num_counters = 4,
1389 .counter_bits = 48, 1589 .counter_bits = 48,
1390 .counter_mask = (1ULL << 48) - 1, 1590 .counter_mask = (1ULL << 48) - 1,
1591 .apic = 1,
1391 /* use highest bit to detect overflow */ 1592 /* use highest bit to detect overflow */
1392 .max_period = (1ULL << 47) - 1, 1593 .max_period = (1ULL << 47) - 1,
1393}; 1594};
1394 1595
1596static int p6_pmu_init(void)
1597{
1598 switch (boot_cpu_data.x86_model) {
1599 case 1:
1600 case 3: /* Pentium Pro */
1601 case 5:
1602 case 6: /* Pentium II */
1603 case 7:
1604 case 8:
1605 case 11: /* Pentium III */
1606 break;
1607 case 9:
1608 case 13:
1609 /* Pentium M */
1610 break;
1611 default:
1612 pr_cont("unsupported p6 CPU model %d ",
1613 boot_cpu_data.x86_model);
1614 return -ENODEV;
1615 }
1616
1617 x86_pmu = p6_pmu;
1618
1619 if (!cpu_has_apic) {
1620 pr_info("no APIC, boot with the \"lapic\" boot parameter to force-enable it.\n");
1621 pr_info("no hardware sampling interrupt available.\n");
1622 x86_pmu.apic = 0;
1623 }
1624
1625 return 0;
1626}
1627
1395static int intel_pmu_init(void) 1628static int intel_pmu_init(void)
1396{ 1629{
1397 union cpuid10_edx edx; 1630 union cpuid10_edx edx;
@@ -1400,8 +1633,14 @@ static int intel_pmu_init(void)
1400 unsigned int ebx; 1633 unsigned int ebx;
1401 int version; 1634 int version;
1402 1635
1403 if (!cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) 1636 if (!cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) {
1637 /* check for P6 processor family */
1638 if (boot_cpu_data.x86 == 6) {
1639 return p6_pmu_init();
1640 } else {
1404 return -ENODEV; 1641 return -ENODEV;
1642 }
1643 }
1405 1644
1406 /* 1645 /*
1407 * Check whether the Architectural PerfMon supports 1646 * Check whether the Architectural PerfMon supports
diff --git a/arch/x86/kernel/efi.c b/arch/x86/kernel/efi.c
index 96f7ac0bbf0..fe26ba3e345 100644
--- a/arch/x86/kernel/efi.c
+++ b/arch/x86/kernel/efi.c
@@ -354,7 +354,7 @@ void __init efi_init(void)
354 */ 354 */
355 c16 = tmp = early_ioremap(efi.systab->fw_vendor, 2); 355 c16 = tmp = early_ioremap(efi.systab->fw_vendor, 2);
356 if (c16) { 356 if (c16) {
357 for (i = 0; i < sizeof(vendor) && *c16; ++i) 357 for (i = 0; i < sizeof(vendor) - 1 && *c16; ++i)
358 vendor[i] = *c16++; 358 vendor[i] = *c16++;
359 vendor[i] = '\0'; 359 vendor[i] = '\0';
360 } else 360 } else
@@ -512,7 +512,7 @@ void __init efi_enter_virtual_mode(void)
512 && end_pfn <= max_pfn_mapped)) 512 && end_pfn <= max_pfn_mapped))
513 va = __va(md->phys_addr); 513 va = __va(md->phys_addr);
514 else 514 else
515 va = efi_ioremap(md->phys_addr, size); 515 va = efi_ioremap(md->phys_addr, size, md->type);
516 516
517 md->virt_addr = (u64) (unsigned long) va; 517 md->virt_addr = (u64) (unsigned long) va;
518 518
diff --git a/arch/x86/kernel/efi_64.c b/arch/x86/kernel/efi_64.c
index 22c3b7828c5..ac0621a7ac3 100644
--- a/arch/x86/kernel/efi_64.c
+++ b/arch/x86/kernel/efi_64.c
@@ -98,10 +98,14 @@ void __init efi_call_phys_epilog(void)
98 early_runtime_code_mapping_set_exec(0); 98 early_runtime_code_mapping_set_exec(0);
99} 99}
100 100
101void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size) 101void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size,
102 u32 type)
102{ 103{
103 unsigned long last_map_pfn; 104 unsigned long last_map_pfn;
104 105
106 if (type == EFI_MEMORY_MAPPED_IO)
107 return ioremap(phys_addr, size);
108
105 last_map_pfn = init_memory_mapping(phys_addr, phys_addr + size); 109 last_map_pfn = init_memory_mapping(phys_addr, phys_addr + size);
106 if ((last_map_pfn << PAGE_SHIFT) < phys_addr + size) 110 if ((last_map_pfn << PAGE_SHIFT) < phys_addr + size)
107 return NULL; 111 return NULL;
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index 8663afb5653..cc827ac9e8d 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -261,9 +261,7 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
261 * which will be freed later 261 * which will be freed later
262 */ 262 */
263 263
264#ifndef CONFIG_HOTPLUG_CPU 264__CPUINIT
265.section .init.text,"ax",@progbits
266#endif
267 265
268#ifdef CONFIG_SMP 266#ifdef CONFIG_SMP
269ENTRY(startup_32_smp) 267ENTRY(startup_32_smp)
@@ -602,7 +600,7 @@ ignore_int:
602#endif 600#endif
603 iret 601 iret
604 602
605.section .cpuinit.data,"wa" 603 __REFDATA
606.align 4 604.align 4
607ENTRY(initial_code) 605ENTRY(initial_code)
608 .long i386_start_kernel 606 .long i386_start_kernel
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c
index 696f0e475c2..92b7703d3d5 100644
--- a/arch/x86/kernel/irqinit.c
+++ b/arch/x86/kernel/irqinit.c
@@ -187,7 +187,7 @@ static void __init apic_intr_init(void)
187#ifdef CONFIG_X86_THERMAL_VECTOR 187#ifdef CONFIG_X86_THERMAL_VECTOR
188 alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt); 188 alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
189#endif 189#endif
190#ifdef CONFIG_X86_THRESHOLD 190#ifdef CONFIG_X86_MCE_THRESHOLD
191 alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt); 191 alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt);
192#endif 192#endif
193#if defined(CONFIG_X86_NEW_MCE) && defined(CONFIG_X86_LOCAL_APIC) 193#if defined(CONFIG_X86_NEW_MCE) && defined(CONFIG_X86_LOCAL_APIC)
diff --git a/arch/x86/kernel/mfgpt_32.c b/arch/x86/kernel/mfgpt_32.c
index 846510b78a0..2a62d843f01 100644
--- a/arch/x86/kernel/mfgpt_32.c
+++ b/arch/x86/kernel/mfgpt_32.c
@@ -347,7 +347,7 @@ static irqreturn_t mfgpt_tick(int irq, void *dev_id)
347 347
348static struct irqaction mfgptirq = { 348static struct irqaction mfgptirq = {
349 .handler = mfgpt_tick, 349 .handler = mfgpt_tick,
350 .flags = IRQF_DISABLED | IRQF_NOBALANCING, 350 .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER,
351 .name = "mfgpt-timer" 351 .name = "mfgpt-timer"
352}; 352};
353 353
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index d2d1ce8170f..a06e8d10184 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -3,6 +3,7 @@
3#include <linux/init.h> 3#include <linux/init.h>
4#include <linux/pm.h> 4#include <linux/pm.h>
5#include <linux/efi.h> 5#include <linux/efi.h>
6#include <linux/dmi.h>
6#include <acpi/reboot.h> 7#include <acpi/reboot.h>
7#include <asm/io.h> 8#include <asm/io.h>
8#include <asm/apic.h> 9#include <asm/apic.h>
@@ -17,7 +18,6 @@
17#include <asm/cpu.h> 18#include <asm/cpu.h>
18 19
19#ifdef CONFIG_X86_32 20#ifdef CONFIG_X86_32
20# include <linux/dmi.h>
21# include <linux/ctype.h> 21# include <linux/ctype.h>
22# include <linux/mc146818rtc.h> 22# include <linux/mc146818rtc.h>
23#else 23#else
@@ -249,6 +249,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
249 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z540N"), 249 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z540N"),
250 }, 250 },
251 }, 251 },
252 { /* Handle problems with rebooting on CompuLab SBC-FITPC2 */
253 .callback = set_bios_reboot,
254 .ident = "CompuLab SBC-FITPC2",
255 .matches = {
256 DMI_MATCH(DMI_SYS_VENDOR, "CompuLab"),
257 DMI_MATCH(DMI_PRODUCT_NAME, "SBC-FITPC2"),
258 },
259 },
252 { } 260 { }
253}; 261};
254 262
@@ -396,6 +404,46 @@ EXPORT_SYMBOL(machine_real_restart);
396 404
397#endif /* CONFIG_X86_32 */ 405#endif /* CONFIG_X86_32 */
398 406
407/*
408 * Some Apple MacBook and MacBookPro's needs reboot=p to be able to reboot
409 */
410static int __init set_pci_reboot(const struct dmi_system_id *d)
411{
412 if (reboot_type != BOOT_CF9) {
413 reboot_type = BOOT_CF9;
414 printk(KERN_INFO "%s series board detected. "
415 "Selecting PCI-method for reboots.\n", d->ident);
416 }
417 return 0;
418}
419
420static struct dmi_system_id __initdata pci_reboot_dmi_table[] = {
421 { /* Handle problems with rebooting on Apple MacBook5 */
422 .callback = set_pci_reboot,
423 .ident = "Apple MacBook5",
424 .matches = {
425 DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
426 DMI_MATCH(DMI_PRODUCT_NAME, "MacBook5"),
427 },
428 },
429 { /* Handle problems with rebooting on Apple MacBookPro5 */
430 .callback = set_pci_reboot,
431 .ident = "Apple MacBookPro5",
432 .matches = {
433 DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
434 DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro5"),
435 },
436 },
437 { }
438};
439
440static int __init pci_reboot_init(void)
441{
442 dmi_check_system(pci_reboot_dmi_table);
443 return 0;
444}
445core_initcall(pci_reboot_init);
446
399static inline void kb_wait(void) 447static inline void kb_wait(void)
400{ 448{
401 int i; 449 int i;
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index de2cab13284..63f32d220ef 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -672,6 +672,19 @@ static struct dmi_system_id __initdata bad_bios_dmi_table[] = {
672 DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies"), 672 DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies"),
673 }, 673 },
674 }, 674 },
675 {
676 /*
677 * AMI BIOS with low memory corruption was found on Intel DG45ID board.
678 * It hase different DMI_BIOS_VENDOR = "Intel Corp.", for now we will
679 * match only DMI_BOARD_NAME and see if there is more bad products
680 * with this vendor.
681 */
682 .callback = dmi_low_memory_corruption,
683 .ident = "AMI BIOS",
684 .matches = {
685 DMI_MATCH(DMI_BOARD_NAME, "DG45ID"),
686 },
687 },
675#endif 688#endif
676 {} 689 {}
677}; 690};
diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
index 8ccabb8a2f6..77b9689f8ed 100644
--- a/arch/x86/kernel/tlb_uv.c
+++ b/arch/x86/kernel/tlb_uv.c
@@ -744,6 +744,7 @@ uv_activation_descriptor_init(int node, int pnode)
744 * note that base_dest_nodeid is actually a nasid. 744 * note that base_dest_nodeid is actually a nasid.
745 */ 745 */
746 ad2->header.base_dest_nodeid = uv_partition_base_pnode << 1; 746 ad2->header.base_dest_nodeid = uv_partition_base_pnode << 1;
747 ad2->header.dest_subnodeid = 0x10; /* the LB */
747 ad2->header.command = UV_NET_ENDPOINT_INTD; 748 ad2->header.command = UV_NET_ENDPOINT_INTD;
748 ad2->header.int_both = 1; 749 ad2->header.int_both = 1;
749 /* 750 /*
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 6e1a368d21d..71f4368b357 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -275,15 +275,20 @@ static unsigned long pit_calibrate_tsc(u32 latch, unsigned long ms, int loopmin)
275 * use the TSC value at the transitions to calculate a pretty 275 * use the TSC value at the transitions to calculate a pretty
276 * good value for the TSC frequencty. 276 * good value for the TSC frequencty.
277 */ 277 */
278static inline int pit_verify_msb(unsigned char val)
279{
280 /* Ignore LSB */
281 inb(0x42);
282 return inb(0x42) == val;
283}
284
278static inline int pit_expect_msb(unsigned char val, u64 *tscp, unsigned long *deltap) 285static inline int pit_expect_msb(unsigned char val, u64 *tscp, unsigned long *deltap)
279{ 286{
280 int count; 287 int count;
281 u64 tsc = 0; 288 u64 tsc = 0;
282 289
283 for (count = 0; count < 50000; count++) { 290 for (count = 0; count < 50000; count++) {
284 /* Ignore LSB */ 291 if (!pit_verify_msb(val))
285 inb(0x42);
286 if (inb(0x42) != val)
287 break; 292 break;
288 tsc = get_cycles(); 293 tsc = get_cycles();
289 } 294 }
@@ -336,8 +341,7 @@ static unsigned long quick_pit_calibrate(void)
336 * to do that is to just read back the 16-bit counter 341 * to do that is to just read back the 16-bit counter
337 * once from the PIT. 342 * once from the PIT.
338 */ 343 */
339 inb(0x42); 344 pit_verify_msb(0);
340 inb(0x42);
341 345
342 if (pit_expect_msb(0xff, &tsc, &d1)) { 346 if (pit_expect_msb(0xff, &tsc, &d1)) {
343 for (i = 1; i <= MAX_QUICK_PIT_ITERATIONS; i++) { 347 for (i = 1; i <= MAX_QUICK_PIT_ITERATIONS; i++) {
@@ -348,8 +352,19 @@ static unsigned long quick_pit_calibrate(void)
348 * Iterate until the error is less than 500 ppm 352 * Iterate until the error is less than 500 ppm
349 */ 353 */
350 delta -= tsc; 354 delta -= tsc;
351 if (d1+d2 < delta >> 11) 355 if (d1+d2 >= delta >> 11)
352 goto success; 356 continue;
357
358 /*
359 * Check the PIT one more time to verify that
360 * all TSC reads were stable wrt the PIT.
361 *
362 * This also guarantees serialization of the
363 * last cycle read ('d2') in pit_expect_msb.
364 */
365 if (!pit_verify_msb(0xfe - i))
366 break;
367 goto success;
353 } 368 }
354 } 369 }
355 printk("Fast TSC calibration failed\n"); 370 printk("Fast TSC calibration failed\n");
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c
index b263423fbe2..95a7289e4b0 100644
--- a/arch/x86/kernel/vmi_32.c
+++ b/arch/x86/kernel/vmi_32.c
@@ -441,7 +441,7 @@ vmi_startup_ipi_hook(int phys_apicid, unsigned long start_eip,
441 ap.ds = __USER_DS; 441 ap.ds = __USER_DS;
442 ap.es = __USER_DS; 442 ap.es = __USER_DS;
443 ap.fs = __KERNEL_PERCPU; 443 ap.fs = __KERNEL_PERCPU;
444 ap.gs = 0; 444 ap.gs = __KERNEL_STACK_CANARY;
445 445
446 ap.eflags = 0; 446 ap.eflags = 0;
447 447
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index 367e8788204..9fc178255c0 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -46,11 +46,10 @@ PHDRS {
46 data PT_LOAD FLAGS(7); /* RWE */ 46 data PT_LOAD FLAGS(7); /* RWE */
47#ifdef CONFIG_X86_64 47#ifdef CONFIG_X86_64
48 user PT_LOAD FLAGS(7); /* RWE */ 48 user PT_LOAD FLAGS(7); /* RWE */
49 data.init PT_LOAD FLAGS(7); /* RWE */
50#ifdef CONFIG_SMP 49#ifdef CONFIG_SMP
51 percpu PT_LOAD FLAGS(7); /* RWE */ 50 percpu PT_LOAD FLAGS(7); /* RWE */
52#endif 51#endif
53 data.init2 PT_LOAD FLAGS(7); /* RWE */ 52 init PT_LOAD FLAGS(7); /* RWE */
54#endif 53#endif
55 note PT_NOTE FLAGS(0); /* ___ */ 54 note PT_NOTE FLAGS(0); /* ___ */
56} 55}
@@ -103,72 +102,43 @@ SECTIONS
103 __stop___ex_table = .; 102 __stop___ex_table = .;
104 } :text = 0x9090 103 } :text = 0x9090
105 104
106 RODATA 105 RO_DATA(PAGE_SIZE)
107 106
108 /* Data */ 107 /* Data */
109 . = ALIGN(PAGE_SIZE);
110 .data : AT(ADDR(.data) - LOAD_OFFSET) { 108 .data : AT(ADDR(.data) - LOAD_OFFSET) {
111 /* Start of data section */ 109 /* Start of data section */
112 _sdata = .; 110 _sdata = .;
113 DATA_DATA
114 CONSTRUCTORS
115 111
116#ifdef CONFIG_X86_64 112 /* init_task */
117 /* End of data section */ 113 INIT_TASK_DATA(THREAD_SIZE)
118 _edata = .;
119#endif
120 } :data
121 114
122#ifdef CONFIG_X86_32 115#ifdef CONFIG_X86_32
123 /* 32 bit has nosave before _edata */ 116 /* 32 bit has nosave before _edata */
124 . = ALIGN(PAGE_SIZE); 117 NOSAVE_DATA
125 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
126 __nosave_begin = .;
127 *(.data.nosave)
128 . = ALIGN(PAGE_SIZE);
129 __nosave_end = .;
130 }
131#endif 118#endif
132 119
133 . = ALIGN(PAGE_SIZE); 120 PAGE_ALIGNED_DATA(PAGE_SIZE)
134 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
135 *(.data.page_aligned)
136 *(.data.idt) 121 *(.data.idt)
137 }
138 122
139#ifdef CONFIG_X86_32 123 CACHELINE_ALIGNED_DATA(CONFIG_X86_L1_CACHE_BYTES)
140 . = ALIGN(32);
141#else
142 . = ALIGN(PAGE_SIZE);
143 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
144#endif
145 .data.cacheline_aligned :
146 AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
147 *(.data.cacheline_aligned)
148 }
149 124
150 /* rarely changed data like cpu maps */ 125 DATA_DATA
151#ifdef CONFIG_X86_32 126 CONSTRUCTORS
152 . = ALIGN(32); 127
153#else 128 /* rarely changed data like cpu maps */
154 . = ALIGN(CONFIG_X86_INTERNODE_CACHE_BYTES); 129 READ_MOSTLY_DATA(CONFIG_X86_INTERNODE_CACHE_BYTES)
155#endif
156 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) {
157 *(.data.read_mostly)
158 130
159#ifdef CONFIG_X86_32
160 /* End of data section */ 131 /* End of data section */
161 _edata = .; 132 _edata = .;
162#endif 133 } :data
163 }
164 134
165#ifdef CONFIG_X86_64 135#ifdef CONFIG_X86_64
166 136
167#define VSYSCALL_ADDR (-10*1024*1024) 137#define VSYSCALL_ADDR (-10*1024*1024)
168#define VSYSCALL_PHYS_ADDR ((LOADADDR(.data.read_mostly) + \ 138#define VSYSCALL_PHYS_ADDR ((LOADADDR(.data) + SIZEOF(.data) + \
169 SIZEOF(.data.read_mostly) + 4095) & ~(4095)) 139 PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
170#define VSYSCALL_VIRT_ADDR ((ADDR(.data.read_mostly) + \ 140#define VSYSCALL_VIRT_ADDR ((ADDR(.data) + SIZEOF(.data) + \
171 SIZEOF(.data.read_mostly) + 4095) & ~(4095)) 141 PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
172 142
173#define VLOAD_OFFSET (VSYSCALL_ADDR - VSYSCALL_PHYS_ADDR) 143#define VLOAD_OFFSET (VSYSCALL_ADDR - VSYSCALL_PHYS_ADDR)
174#define VLOAD(x) (ADDR(x) - VLOAD_OFFSET) 144#define VLOAD(x) (ADDR(x) - VLOAD_OFFSET)
@@ -234,35 +204,29 @@ SECTIONS
234 204
235#endif /* CONFIG_X86_64 */ 205#endif /* CONFIG_X86_64 */
236 206
237 /* init_task */ 207 /* Init code and data - will be freed after init */
238 . = ALIGN(THREAD_SIZE); 208 . = ALIGN(PAGE_SIZE);
239 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { 209 .init.begin : AT(ADDR(.init.begin) - LOAD_OFFSET) {
240 *(.data.init_task) 210 __init_begin = .; /* paired with __init_end */
241 } 211 }
242#ifdef CONFIG_X86_64
243 :data.init
244#endif
245 212
213#if defined(CONFIG_X86_64) && defined(CONFIG_SMP)
246 /* 214 /*
247 * smp_locks might be freed after init 215 * percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the
248 * start/end must be page aligned 216 * output PHDR, so the next output section - .init.text - should
217 * start another segment - init.
249 */ 218 */
250 . = ALIGN(PAGE_SIZE); 219 PERCPU_VADDR(0, :percpu)
251 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { 220#endif
252 __smp_locks = .;
253 *(.smp_locks)
254 __smp_locks_end = .;
255 . = ALIGN(PAGE_SIZE);
256 }
257 221
258 /* Init code and data - will be freed after init */
259 . = ALIGN(PAGE_SIZE);
260 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { 222 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
261 __init_begin = .; /* paired with __init_end */
262 _sinittext = .; 223 _sinittext = .;
263 INIT_TEXT 224 INIT_TEXT
264 _einittext = .; 225 _einittext = .;
265 } 226 }
227#ifdef CONFIG_X86_64
228 :init
229#endif
266 230
267 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { 231 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) {
268 INIT_DATA 232 INIT_DATA
@@ -333,17 +297,7 @@ SECTIONS
333 } 297 }
334#endif 298#endif
335 299
336#if defined(CONFIG_X86_64) && defined(CONFIG_SMP) 300#if !defined(CONFIG_X86_64) || !defined(CONFIG_SMP)
337 /*
338 * percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the
339 * output PHDR, so the next output section - __data_nosave - should
340 * start another section data.init2. Also, pda should be at the head of
341 * percpu area. Preallocate it and define the percpu offset symbol
342 * so that it can be accessed as a percpu variable.
343 */
344 . = ALIGN(PAGE_SIZE);
345 PERCPU_VADDR(0, :percpu)
346#else
347 PERCPU(PAGE_SIZE) 301 PERCPU(PAGE_SIZE)
348#endif 302#endif
349 303
@@ -354,15 +308,22 @@ SECTIONS
354 __init_end = .; 308 __init_end = .;
355 } 309 }
356 310
311 /*
312 * smp_locks might be freed after init
313 * start/end must be page aligned
314 */
315 . = ALIGN(PAGE_SIZE);
316 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
317 __smp_locks = .;
318 *(.smp_locks)
319 __smp_locks_end = .;
320 . = ALIGN(PAGE_SIZE);
321 }
322
357#ifdef CONFIG_X86_64 323#ifdef CONFIG_X86_64
358 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { 324 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
359 . = ALIGN(PAGE_SIZE); 325 NOSAVE_DATA
360 __nosave_begin = .; 326 }
361 *(.data.nosave)
362 . = ALIGN(PAGE_SIZE);
363 __nosave_end = .;
364 } :data.init2
365 /* use another section data.init2, see PERCPU_VADDR() above */
366#endif 327#endif
367 328
368 /* BSS */ 329 /* BSS */
@@ -400,8 +361,8 @@ SECTIONS
400 361
401 362
402#ifdef CONFIG_X86_32 363#ifdef CONFIG_X86_32
403ASSERT((_end - LOAD_OFFSET <= KERNEL_IMAGE_SIZE), 364. = ASSERT((_end - LOAD_OFFSET <= KERNEL_IMAGE_SIZE),
404 "kernel image bigger than KERNEL_IMAGE_SIZE") 365 "kernel image bigger than KERNEL_IMAGE_SIZE");
405#else 366#else
406/* 367/*
407 * Per-cpu symbols which need to be offset from __per_cpu_load 368 * Per-cpu symbols which need to be offset from __per_cpu_load
@@ -414,12 +375,12 @@ INIT_PER_CPU(irq_stack_union);
414/* 375/*
415 * Build-time check on the image size: 376 * Build-time check on the image size:
416 */ 377 */
417ASSERT((_end - _text <= KERNEL_IMAGE_SIZE), 378. = ASSERT((_end - _text <= KERNEL_IMAGE_SIZE),
418 "kernel image bigger than KERNEL_IMAGE_SIZE") 379 "kernel image bigger than KERNEL_IMAGE_SIZE");
419 380
420#ifdef CONFIG_SMP 381#ifdef CONFIG_SMP
421ASSERT((per_cpu__irq_stack_union == 0), 382. = ASSERT((per_cpu__irq_stack_union == 0),
422 "irq_stack_union is not at start of per-cpu area"); 383 "irq_stack_union is not at start of per-cpu area");
423#endif 384#endif
424 385
425#endif /* CONFIG_X86_32 */ 386#endif /* CONFIG_X86_32 */
@@ -427,7 +388,7 @@ ASSERT((per_cpu__irq_stack_union == 0),
427#ifdef CONFIG_KEXEC 388#ifdef CONFIG_KEXEC
428#include <asm/kexec.h> 389#include <asm/kexec.h>
429 390
430ASSERT(kexec_control_code_size <= KEXEC_CONTROL_CODE_MAX_SIZE, 391. = ASSERT(kexec_control_code_size <= KEXEC_CONTROL_CODE_MAX_SIZE,
431 "kexec control code size is too big") 392 "kexec control code size is too big");
432#endif 393#endif
433 394
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 4d6f0d293ee..21f68e00524 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -104,6 +104,9 @@ static s64 __kpit_elapsed(struct kvm *kvm)
104 ktime_t remaining; 104 ktime_t remaining;
105 struct kvm_kpit_state *ps = &kvm->arch.vpit->pit_state; 105 struct kvm_kpit_state *ps = &kvm->arch.vpit->pit_state;
106 106
107 if (!ps->pit_timer.period)
108 return 0;
109
107 /* 110 /*
108 * The Counter does not stop when it reaches zero. In 111 * The Counter does not stop when it reaches zero. In
109 * Modes 0, 1, 4, and 5 the Counter ``wraps around'' to 112 * Modes 0, 1, 4, and 5 the Counter ``wraps around'' to
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 7030b5f911b..0ef5bb2b404 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -489,16 +489,20 @@ static unsigned long *gfn_to_rmap(struct kvm *kvm, gfn_t gfn, int lpage)
489 * 489 *
490 * If rmapp bit zero is one, (then rmap & ~1) points to a struct kvm_rmap_desc 490 * If rmapp bit zero is one, (then rmap & ~1) points to a struct kvm_rmap_desc
491 * containing more mappings. 491 * containing more mappings.
492 *
493 * Returns the number of rmap entries before the spte was added or zero if
494 * the spte was not added.
495 *
492 */ 496 */
493static void rmap_add(struct kvm_vcpu *vcpu, u64 *spte, gfn_t gfn, int lpage) 497static int rmap_add(struct kvm_vcpu *vcpu, u64 *spte, gfn_t gfn, int lpage)
494{ 498{
495 struct kvm_mmu_page *sp; 499 struct kvm_mmu_page *sp;
496 struct kvm_rmap_desc *desc; 500 struct kvm_rmap_desc *desc;
497 unsigned long *rmapp; 501 unsigned long *rmapp;
498 int i; 502 int i, count = 0;
499 503
500 if (!is_rmap_pte(*spte)) 504 if (!is_rmap_pte(*spte))
501 return; 505 return count;
502 gfn = unalias_gfn(vcpu->kvm, gfn); 506 gfn = unalias_gfn(vcpu->kvm, gfn);
503 sp = page_header(__pa(spte)); 507 sp = page_header(__pa(spte));
504 sp->gfns[spte - sp->spt] = gfn; 508 sp->gfns[spte - sp->spt] = gfn;
@@ -515,8 +519,10 @@ static void rmap_add(struct kvm_vcpu *vcpu, u64 *spte, gfn_t gfn, int lpage)
515 } else { 519 } else {
516 rmap_printk("rmap_add: %p %llx many->many\n", spte, *spte); 520 rmap_printk("rmap_add: %p %llx many->many\n", spte, *spte);
517 desc = (struct kvm_rmap_desc *)(*rmapp & ~1ul); 521 desc = (struct kvm_rmap_desc *)(*rmapp & ~1ul);
518 while (desc->shadow_ptes[RMAP_EXT-1] && desc->more) 522 while (desc->shadow_ptes[RMAP_EXT-1] && desc->more) {
519 desc = desc->more; 523 desc = desc->more;
524 count += RMAP_EXT;
525 }
520 if (desc->shadow_ptes[RMAP_EXT-1]) { 526 if (desc->shadow_ptes[RMAP_EXT-1]) {
521 desc->more = mmu_alloc_rmap_desc(vcpu); 527 desc->more = mmu_alloc_rmap_desc(vcpu);
522 desc = desc->more; 528 desc = desc->more;
@@ -525,6 +531,7 @@ static void rmap_add(struct kvm_vcpu *vcpu, u64 *spte, gfn_t gfn, int lpage)
525 ; 531 ;
526 desc->shadow_ptes[i] = spte; 532 desc->shadow_ptes[i] = spte;
527 } 533 }
534 return count;
528} 535}
529 536
530static void rmap_desc_remove_entry(unsigned long *rmapp, 537static void rmap_desc_remove_entry(unsigned long *rmapp,
@@ -754,6 +761,19 @@ static int kvm_age_rmapp(struct kvm *kvm, unsigned long *rmapp)
754 return young; 761 return young;
755} 762}
756 763
764#define RMAP_RECYCLE_THRESHOLD 1000
765
766static void rmap_recycle(struct kvm_vcpu *vcpu, gfn_t gfn, int lpage)
767{
768 unsigned long *rmapp;
769
770 gfn = unalias_gfn(vcpu->kvm, gfn);
771 rmapp = gfn_to_rmap(vcpu->kvm, gfn, lpage);
772
773 kvm_unmap_rmapp(vcpu->kvm, rmapp);
774 kvm_flush_remote_tlbs(vcpu->kvm);
775}
776
757int kvm_age_hva(struct kvm *kvm, unsigned long hva) 777int kvm_age_hva(struct kvm *kvm, unsigned long hva)
758{ 778{
759 return kvm_handle_hva(kvm, hva, kvm_age_rmapp); 779 return kvm_handle_hva(kvm, hva, kvm_age_rmapp);
@@ -1407,24 +1427,25 @@ static int kvm_mmu_zap_page(struct kvm *kvm, struct kvm_mmu_page *sp)
1407 */ 1427 */
1408void kvm_mmu_change_mmu_pages(struct kvm *kvm, unsigned int kvm_nr_mmu_pages) 1428void kvm_mmu_change_mmu_pages(struct kvm *kvm, unsigned int kvm_nr_mmu_pages)
1409{ 1429{
1430 int used_pages;
1431
1432 used_pages = kvm->arch.n_alloc_mmu_pages - kvm->arch.n_free_mmu_pages;
1433 used_pages = max(0, used_pages);
1434
1410 /* 1435 /*
1411 * If we set the number of mmu pages to be smaller be than the 1436 * If we set the number of mmu pages to be smaller be than the
1412 * number of actived pages , we must to free some mmu pages before we 1437 * number of actived pages , we must to free some mmu pages before we
1413 * change the value 1438 * change the value
1414 */ 1439 */
1415 1440
1416 if ((kvm->arch.n_alloc_mmu_pages - kvm->arch.n_free_mmu_pages) > 1441 if (used_pages > kvm_nr_mmu_pages) {
1417 kvm_nr_mmu_pages) { 1442 while (used_pages > kvm_nr_mmu_pages) {
1418 int n_used_mmu_pages = kvm->arch.n_alloc_mmu_pages
1419 - kvm->arch.n_free_mmu_pages;
1420
1421 while (n_used_mmu_pages > kvm_nr_mmu_pages) {
1422 struct kvm_mmu_page *page; 1443 struct kvm_mmu_page *page;
1423 1444
1424 page = container_of(kvm->arch.active_mmu_pages.prev, 1445 page = container_of(kvm->arch.active_mmu_pages.prev,
1425 struct kvm_mmu_page, link); 1446 struct kvm_mmu_page, link);
1426 kvm_mmu_zap_page(kvm, page); 1447 kvm_mmu_zap_page(kvm, page);
1427 n_used_mmu_pages--; 1448 used_pages--;
1428 } 1449 }
1429 kvm->arch.n_free_mmu_pages = 0; 1450 kvm->arch.n_free_mmu_pages = 0;
1430 } 1451 }
@@ -1740,6 +1761,7 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *shadow_pte,
1740{ 1761{
1741 int was_rmapped = 0; 1762 int was_rmapped = 0;
1742 int was_writeble = is_writeble_pte(*shadow_pte); 1763 int was_writeble = is_writeble_pte(*shadow_pte);
1764 int rmap_count;
1743 1765
1744 pgprintk("%s: spte %llx access %x write_fault %d" 1766 pgprintk("%s: spte %llx access %x write_fault %d"
1745 " user_fault %d gfn %lx\n", 1767 " user_fault %d gfn %lx\n",
@@ -1781,9 +1803,11 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *shadow_pte,
1781 1803
1782 page_header_update_slot(vcpu->kvm, shadow_pte, gfn); 1804 page_header_update_slot(vcpu->kvm, shadow_pte, gfn);
1783 if (!was_rmapped) { 1805 if (!was_rmapped) {
1784 rmap_add(vcpu, shadow_pte, gfn, largepage); 1806 rmap_count = rmap_add(vcpu, shadow_pte, gfn, largepage);
1785 if (!is_rmap_pte(*shadow_pte)) 1807 if (!is_rmap_pte(*shadow_pte))
1786 kvm_release_pfn_clean(pfn); 1808 kvm_release_pfn_clean(pfn);
1809 if (rmap_count > RMAP_RECYCLE_THRESHOLD)
1810 rmap_recycle(vcpu, gfn, largepage);
1787 } else { 1811 } else {
1788 if (was_writeble) 1812 if (was_writeble)
1789 kvm_release_pfn_dirty(pfn); 1813 kvm_release_pfn_dirty(pfn);
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 71510e07e69..b1f658ad2f0 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -711,6 +711,7 @@ static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
711 svm->vmcb->control.tsc_offset += delta; 711 svm->vmcb->control.tsc_offset += delta;
712 vcpu->cpu = cpu; 712 vcpu->cpu = cpu;
713 kvm_migrate_timers(vcpu); 713 kvm_migrate_timers(vcpu);
714 svm->asid_generation = 0;
714 } 715 }
715 716
716 for (i = 0; i < NR_HOST_SAVE_USER_MSRS; i++) 717 for (i = 0; i < NR_HOST_SAVE_USER_MSRS; i++)
@@ -1031,7 +1032,6 @@ static void new_asid(struct vcpu_svm *svm, struct svm_cpu_data *svm_data)
1031 svm->vmcb->control.tlb_ctl = TLB_CONTROL_FLUSH_ALL_ASID; 1032 svm->vmcb->control.tlb_ctl = TLB_CONTROL_FLUSH_ALL_ASID;
1032 } 1033 }
1033 1034
1034 svm->vcpu.cpu = svm_data->cpu;
1035 svm->asid_generation = svm_data->asid_generation; 1035 svm->asid_generation = svm_data->asid_generation;
1036 svm->vmcb->control.asid = svm_data->next_asid++; 1036 svm->vmcb->control.asid = svm_data->next_asid++;
1037} 1037}
@@ -2300,8 +2300,8 @@ static void pre_svm_run(struct vcpu_svm *svm)
2300 struct svm_cpu_data *svm_data = per_cpu(svm_data, cpu); 2300 struct svm_cpu_data *svm_data = per_cpu(svm_data, cpu);
2301 2301
2302 svm->vmcb->control.tlb_ctl = TLB_CONTROL_DO_NOTHING; 2302 svm->vmcb->control.tlb_ctl = TLB_CONTROL_DO_NOTHING;
2303 if (svm->vcpu.cpu != cpu || 2303 /* FIXME: handle wraparound of asid_generation */
2304 svm->asid_generation != svm_data->asid_generation) 2304 if (svm->asid_generation != svm_data->asid_generation)
2305 new_asid(svm, svm_data); 2305 new_asid(svm, svm_data);
2306} 2306}
2307 2307
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 356a0ce85c6..29f912927a5 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3157,8 +3157,8 @@ static void handle_invalid_guest_state(struct kvm_vcpu *vcpu,
3157 struct vcpu_vmx *vmx = to_vmx(vcpu); 3157 struct vcpu_vmx *vmx = to_vmx(vcpu);
3158 enum emulation_result err = EMULATE_DONE; 3158 enum emulation_result err = EMULATE_DONE;
3159 3159
3160 preempt_enable();
3161 local_irq_enable(); 3160 local_irq_enable();
3161 preempt_enable();
3162 3162
3163 while (!guest_state_valid(vcpu)) { 3163 while (!guest_state_valid(vcpu)) {
3164 err = emulate_instruction(vcpu, kvm_run, 0, 0, 0); 3164 err = emulate_instruction(vcpu, kvm_run, 0, 0, 0);
@@ -3168,7 +3168,7 @@ static void handle_invalid_guest_state(struct kvm_vcpu *vcpu,
3168 3168
3169 if (err != EMULATE_DONE) { 3169 if (err != EMULATE_DONE) {
3170 kvm_report_emulation_failure(vcpu, "emulation failure"); 3170 kvm_report_emulation_failure(vcpu, "emulation failure");
3171 return; 3171 break;
3172 } 3172 }
3173 3173
3174 if (signal_pending(current)) 3174 if (signal_pending(current))
@@ -3177,8 +3177,8 @@ static void handle_invalid_guest_state(struct kvm_vcpu *vcpu,
3177 schedule(); 3177 schedule();
3178 } 3178 }
3179 3179
3180 local_irq_disable();
3181 preempt_disable(); 3180 preempt_disable();
3181 local_irq_disable();
3182 3182
3183 vmx->invalid_state_emulation_result = err; 3183 vmx->invalid_state_emulation_result = err;
3184} 3184}
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index fe5474aec41..3d452901182 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -704,11 +704,48 @@ static bool msr_mtrr_valid(unsigned msr)
704 return false; 704 return false;
705} 705}
706 706
707static bool valid_pat_type(unsigned t)
708{
709 return t < 8 && (1 << t) & 0xf3; /* 0, 1, 4, 5, 6, 7 */
710}
711
712static bool valid_mtrr_type(unsigned t)
713{
714 return t < 8 && (1 << t) & 0x73; /* 0, 1, 4, 5, 6 */
715}
716
717static bool mtrr_valid(struct kvm_vcpu *vcpu, u32 msr, u64 data)
718{
719 int i;
720
721 if (!msr_mtrr_valid(msr))
722 return false;
723
724 if (msr == MSR_IA32_CR_PAT) {
725 for (i = 0; i < 8; i++)
726 if (!valid_pat_type((data >> (i * 8)) & 0xff))
727 return false;
728 return true;
729 } else if (msr == MSR_MTRRdefType) {
730 if (data & ~0xcff)
731 return false;
732 return valid_mtrr_type(data & 0xff);
733 } else if (msr >= MSR_MTRRfix64K_00000 && msr <= MSR_MTRRfix4K_F8000) {
734 for (i = 0; i < 8 ; i++)
735 if (!valid_mtrr_type((data >> (i * 8)) & 0xff))
736 return false;
737 return true;
738 }
739
740 /* variable MTRRs */
741 return valid_mtrr_type(data & 0xff);
742}
743
707static int set_msr_mtrr(struct kvm_vcpu *vcpu, u32 msr, u64 data) 744static int set_msr_mtrr(struct kvm_vcpu *vcpu, u32 msr, u64 data)
708{ 745{
709 u64 *p = (u64 *)&vcpu->arch.mtrr_state.fixed_ranges; 746 u64 *p = (u64 *)&vcpu->arch.mtrr_state.fixed_ranges;
710 747
711 if (!msr_mtrr_valid(msr)) 748 if (!mtrr_valid(vcpu, msr, data))
712 return 1; 749 return 1;
713 750
714 if (msr == MSR_MTRRdefType) { 751 if (msr == MSR_MTRRdefType) {
@@ -1079,14 +1116,13 @@ long kvm_arch_dev_ioctl(struct file *filp,
1079 if (copy_to_user(user_msr_list, &msr_list, sizeof msr_list)) 1116 if (copy_to_user(user_msr_list, &msr_list, sizeof msr_list))
1080 goto out; 1117 goto out;
1081 r = -E2BIG; 1118 r = -E2BIG;
1082 if (n < num_msrs_to_save) 1119 if (n < msr_list.nmsrs)
1083 goto out; 1120 goto out;
1084 r = -EFAULT; 1121 r = -EFAULT;
1085 if (copy_to_user(user_msr_list->indices, &msrs_to_save, 1122 if (copy_to_user(user_msr_list->indices, &msrs_to_save,
1086 num_msrs_to_save * sizeof(u32))) 1123 num_msrs_to_save * sizeof(u32)))
1087 goto out; 1124 goto out;
1088 if (copy_to_user(user_msr_list->indices 1125 if (copy_to_user(user_msr_list->indices + num_msrs_to_save,
1089 + num_msrs_to_save * sizeof(u32),
1090 &emulated_msrs, 1126 &emulated_msrs,
1091 ARRAY_SIZE(emulated_msrs) * sizeof(u32))) 1127 ARRAY_SIZE(emulated_msrs) * sizeof(u32)))
1092 goto out; 1128 goto out;
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index f2bf1f73d46..d677fa9ca65 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -22,7 +22,8 @@
22 * 22 *
23 * So how does the kernel know it's a Guest? We'll see that later, but let's 23 * So how does the kernel know it's a Guest? We'll see that later, but let's
24 * just say that we end up here where we replace the native functions various 24 * just say that we end up here where we replace the native functions various
25 * "paravirt" structures with our Guest versions, then boot like normal. :*/ 25 * "paravirt" structures with our Guest versions, then boot like normal.
26:*/
26 27
27/* 28/*
28 * Copyright (C) 2006, Rusty Russell <rusty@rustcorp.com.au> IBM Corporation. 29 * Copyright (C) 2006, Rusty Russell <rusty@rustcorp.com.au> IBM Corporation.
@@ -74,7 +75,8 @@
74 * 75 *
75 * The Guest in our tale is a simple creature: identical to the Host but 76 * The Guest in our tale is a simple creature: identical to the Host but
76 * behaving in simplified but equivalent ways. In particular, the Guest is the 77 * behaving in simplified but equivalent ways. In particular, the Guest is the
77 * same kernel as the Host (or at least, built from the same source code). :*/ 78 * same kernel as the Host (or at least, built from the same source code).
79:*/
78 80
79struct lguest_data lguest_data = { 81struct lguest_data lguest_data = {
80 .hcall_status = { [0 ... LHCALL_RING_SIZE-1] = 0xFF }, 82 .hcall_status = { [0 ... LHCALL_RING_SIZE-1] = 0xFF },
@@ -85,7 +87,8 @@ struct lguest_data lguest_data = {
85 .syscall_vec = SYSCALL_VECTOR, 87 .syscall_vec = SYSCALL_VECTOR,
86}; 88};
87 89
88/*G:037 async_hcall() is pretty simple: I'm quite proud of it really. We have a 90/*G:037
91 * async_hcall() is pretty simple: I'm quite proud of it really. We have a
89 * ring buffer of stored hypercalls which the Host will run though next time we 92 * ring buffer of stored hypercalls which the Host will run though next time we
90 * do a normal hypercall. Each entry in the ring has 5 slots for the hypercall 93 * do a normal hypercall. Each entry in the ring has 5 slots for the hypercall
91 * arguments, and a "hcall_status" word which is 0 if the call is ready to go, 94 * arguments, and a "hcall_status" word which is 0 if the call is ready to go,
@@ -94,7 +97,8 @@ struct lguest_data lguest_data = {
94 * If we come around to a slot which hasn't been finished, then the table is 97 * If we come around to a slot which hasn't been finished, then the table is
95 * full and we just make the hypercall directly. This has the nice side 98 * full and we just make the hypercall directly. This has the nice side
96 * effect of causing the Host to run all the stored calls in the ring buffer 99 * effect of causing the Host to run all the stored calls in the ring buffer
97 * which empties it for next time! */ 100 * which empties it for next time!
101 */
98static void async_hcall(unsigned long call, unsigned long arg1, 102static void async_hcall(unsigned long call, unsigned long arg1,
99 unsigned long arg2, unsigned long arg3, 103 unsigned long arg2, unsigned long arg3,
100 unsigned long arg4) 104 unsigned long arg4)
@@ -103,9 +107,11 @@ static void async_hcall(unsigned long call, unsigned long arg1,
103 static unsigned int next_call; 107 static unsigned int next_call;
104 unsigned long flags; 108 unsigned long flags;
105 109
106 /* Disable interrupts if not already disabled: we don't want an 110 /*
111 * Disable interrupts if not already disabled: we don't want an
107 * interrupt handler making a hypercall while we're already doing 112 * interrupt handler making a hypercall while we're already doing
108 * one! */ 113 * one!
114 */
109 local_irq_save(flags); 115 local_irq_save(flags);
110 if (lguest_data.hcall_status[next_call] != 0xFF) { 116 if (lguest_data.hcall_status[next_call] != 0xFF) {
111 /* Table full, so do normal hcall which will flush table. */ 117 /* Table full, so do normal hcall which will flush table. */
@@ -125,8 +131,9 @@ static void async_hcall(unsigned long call, unsigned long arg1,
125 local_irq_restore(flags); 131 local_irq_restore(flags);
126} 132}
127 133
128/*G:035 Notice the lazy_hcall() above, rather than hcall(). This is our first 134/*G:035
129 * real optimization trick! 135 * Notice the lazy_hcall() above, rather than hcall(). This is our first real
136 * optimization trick!
130 * 137 *
131 * When lazy_mode is set, it means we're allowed to defer all hypercalls and do 138 * When lazy_mode is set, it means we're allowed to defer all hypercalls and do
132 * them as a batch when lazy_mode is eventually turned off. Because hypercalls 139 * them as a batch when lazy_mode is eventually turned off. Because hypercalls
@@ -136,7 +143,8 @@ static void async_hcall(unsigned long call, unsigned long arg1,
136 * lguest_leave_lazy_mode(). 143 * lguest_leave_lazy_mode().
137 * 144 *
138 * So, when we're in lazy mode, we call async_hcall() to store the call for 145 * So, when we're in lazy mode, we call async_hcall() to store the call for
139 * future processing: */ 146 * future processing:
147 */
140static void lazy_hcall1(unsigned long call, 148static void lazy_hcall1(unsigned long call,
141 unsigned long arg1) 149 unsigned long arg1)
142{ 150{
@@ -146,6 +154,7 @@ static void lazy_hcall1(unsigned long call,
146 async_hcall(call, arg1, 0, 0, 0); 154 async_hcall(call, arg1, 0, 0, 0);
147} 155}
148 156
157/* You can imagine what lazy_hcall2, 3 and 4 look like. :*/
149static void lazy_hcall2(unsigned long call, 158static void lazy_hcall2(unsigned long call,
150 unsigned long arg1, 159 unsigned long arg1,
151 unsigned long arg2) 160 unsigned long arg2)
@@ -181,8 +190,10 @@ static void lazy_hcall4(unsigned long call,
181} 190}
182#endif 191#endif
183 192
184/* When lazy mode is turned off reset the per-cpu lazy mode variable and then 193/*G:036
185 * issue the do-nothing hypercall to flush any stored calls. */ 194 * When lazy mode is turned off reset the per-cpu lazy mode variable and then
195 * issue the do-nothing hypercall to flush any stored calls.
196:*/
186static void lguest_leave_lazy_mmu_mode(void) 197static void lguest_leave_lazy_mmu_mode(void)
187{ 198{
188 kvm_hypercall0(LHCALL_FLUSH_ASYNC); 199 kvm_hypercall0(LHCALL_FLUSH_ASYNC);
@@ -208,9 +219,11 @@ static void lguest_end_context_switch(struct task_struct *next)
208 * check there before it tries to deliver an interrupt. 219 * check there before it tries to deliver an interrupt.
209 */ 220 */
210 221
211/* save_flags() is expected to return the processor state (ie. "flags"). The 222/*
223 * save_flags() is expected to return the processor state (ie. "flags"). The
212 * flags word contains all kind of stuff, but in practice Linux only cares 224 * flags word contains all kind of stuff, but in practice Linux only cares
213 * about the interrupt flag. Our "save_flags()" just returns that. */ 225 * about the interrupt flag. Our "save_flags()" just returns that.
226 */
214static unsigned long save_fl(void) 227static unsigned long save_fl(void)
215{ 228{
216 return lguest_data.irq_enabled; 229 return lguest_data.irq_enabled;
@@ -222,13 +235,15 @@ static void irq_disable(void)
222 lguest_data.irq_enabled = 0; 235 lguest_data.irq_enabled = 0;
223} 236}
224 237
225/* Let's pause a moment. Remember how I said these are called so often? 238/*
239 * Let's pause a moment. Remember how I said these are called so often?
226 * Jeremy Fitzhardinge optimized them so hard early in 2009 that he had to 240 * Jeremy Fitzhardinge optimized them so hard early in 2009 that he had to
227 * break some rules. In particular, these functions are assumed to save their 241 * break some rules. In particular, these functions are assumed to save their
228 * own registers if they need to: normal C functions assume they can trash the 242 * own registers if they need to: normal C functions assume they can trash the
229 * eax register. To use normal C functions, we use 243 * eax register. To use normal C functions, we use
230 * PV_CALLEE_SAVE_REGS_THUNK(), which pushes %eax onto the stack, calls the 244 * PV_CALLEE_SAVE_REGS_THUNK(), which pushes %eax onto the stack, calls the
231 * C function, then restores it. */ 245 * C function, then restores it.
246 */
232PV_CALLEE_SAVE_REGS_THUNK(save_fl); 247PV_CALLEE_SAVE_REGS_THUNK(save_fl);
233PV_CALLEE_SAVE_REGS_THUNK(irq_disable); 248PV_CALLEE_SAVE_REGS_THUNK(irq_disable);
234/*:*/ 249/*:*/
@@ -237,18 +252,18 @@ PV_CALLEE_SAVE_REGS_THUNK(irq_disable);
237extern void lg_irq_enable(void); 252extern void lg_irq_enable(void);
238extern void lg_restore_fl(unsigned long flags); 253extern void lg_restore_fl(unsigned long flags);
239 254
240/*M:003 Note that we don't check for outstanding interrupts when we re-enable 255/*M:003
241 * them (or when we unmask an interrupt). This seems to work for the moment, 256 * We could be more efficient in our checking of outstanding interrupts, rather
242 * since interrupts are rare and we'll just get the interrupt on the next timer 257 * than using a branch. One way would be to put the "irq_enabled" field in a
243 * tick, but now we can run with CONFIG_NO_HZ, we should revisit this. One way 258 * page by itself, and have the Host write-protect it when an interrupt comes
244 * would be to put the "irq_enabled" field in a page by itself, and have the 259 * in when irqs are disabled. There will then be a page fault as soon as
245 * Host write-protect it when an interrupt comes in when irqs are disabled. 260 * interrupts are re-enabled.
246 * There will then be a page fault as soon as interrupts are re-enabled.
247 * 261 *
248 * A better method is to implement soft interrupt disable generally for x86: 262 * A better method is to implement soft interrupt disable generally for x86:
249 * instead of disabling interrupts, we set a flag. If an interrupt does come 263 * instead of disabling interrupts, we set a flag. If an interrupt does come
250 * in, we then disable them for real. This is uncommon, so we could simply use 264 * in, we then disable them for real. This is uncommon, so we could simply use
251 * a hypercall for interrupt control and not worry about efficiency. :*/ 265 * a hypercall for interrupt control and not worry about efficiency.
266:*/
252 267
253/*G:034 268/*G:034
254 * The Interrupt Descriptor Table (IDT). 269 * The Interrupt Descriptor Table (IDT).
@@ -261,10 +276,12 @@ extern void lg_restore_fl(unsigned long flags);
261static void lguest_write_idt_entry(gate_desc *dt, 276static void lguest_write_idt_entry(gate_desc *dt,
262 int entrynum, const gate_desc *g) 277 int entrynum, const gate_desc *g)
263{ 278{
264 /* The gate_desc structure is 8 bytes long: we hand it to the Host in 279 /*
280 * The gate_desc structure is 8 bytes long: we hand it to the Host in
265 * two 32-bit chunks. The whole 32-bit kernel used to hand descriptors 281 * two 32-bit chunks. The whole 32-bit kernel used to hand descriptors
266 * around like this; typesafety wasn't a big concern in Linux's early 282 * around like this; typesafety wasn't a big concern in Linux's early
267 * years. */ 283 * years.
284 */
268 u32 *desc = (u32 *)g; 285 u32 *desc = (u32 *)g;
269 /* Keep the local copy up to date. */ 286 /* Keep the local copy up to date. */
270 native_write_idt_entry(dt, entrynum, g); 287 native_write_idt_entry(dt, entrynum, g);
@@ -272,9 +289,11 @@ static void lguest_write_idt_entry(gate_desc *dt,
272 kvm_hypercall3(LHCALL_LOAD_IDT_ENTRY, entrynum, desc[0], desc[1]); 289 kvm_hypercall3(LHCALL_LOAD_IDT_ENTRY, entrynum, desc[0], desc[1]);
273} 290}
274 291
275/* Changing to a different IDT is very rare: we keep the IDT up-to-date every 292/*
293 * Changing to a different IDT is very rare: we keep the IDT up-to-date every
276 * time it is written, so we can simply loop through all entries and tell the 294 * time it is written, so we can simply loop through all entries and tell the
277 * Host about them. */ 295 * Host about them.
296 */
278static void lguest_load_idt(const struct desc_ptr *desc) 297static void lguest_load_idt(const struct desc_ptr *desc)
279{ 298{
280 unsigned int i; 299 unsigned int i;
@@ -305,9 +324,11 @@ static void lguest_load_gdt(const struct desc_ptr *desc)
305 kvm_hypercall3(LHCALL_LOAD_GDT_ENTRY, i, gdt[i].a, gdt[i].b); 324 kvm_hypercall3(LHCALL_LOAD_GDT_ENTRY, i, gdt[i].a, gdt[i].b);
306} 325}
307 326
308/* For a single GDT entry which changes, we do the lazy thing: alter our GDT, 327/*
328 * For a single GDT entry which changes, we do the lazy thing: alter our GDT,
309 * then tell the Host to reload the entire thing. This operation is so rare 329 * then tell the Host to reload the entire thing. This operation is so rare
310 * that this naive implementation is reasonable. */ 330 * that this naive implementation is reasonable.
331 */
311static void lguest_write_gdt_entry(struct desc_struct *dt, int entrynum, 332static void lguest_write_gdt_entry(struct desc_struct *dt, int entrynum,
312 const void *desc, int type) 333 const void *desc, int type)
313{ 334{
@@ -317,29 +338,36 @@ static void lguest_write_gdt_entry(struct desc_struct *dt, int entrynum,
317 dt[entrynum].a, dt[entrynum].b); 338 dt[entrynum].a, dt[entrynum].b);
318} 339}
319 340
320/* OK, I lied. There are three "thread local storage" GDT entries which change 341/*
342 * OK, I lied. There are three "thread local storage" GDT entries which change
321 * on every context switch (these three entries are how glibc implements 343 * on every context switch (these three entries are how glibc implements
322 * __thread variables). So we have a hypercall specifically for this case. */ 344 * __thread variables). So we have a hypercall specifically for this case.
345 */
323static void lguest_load_tls(struct thread_struct *t, unsigned int cpu) 346static void lguest_load_tls(struct thread_struct *t, unsigned int cpu)
324{ 347{
325 /* There's one problem which normal hardware doesn't have: the Host 348 /*
349 * There's one problem which normal hardware doesn't have: the Host
326 * can't handle us removing entries we're currently using. So we clear 350 * can't handle us removing entries we're currently using. So we clear
327 * the GS register here: if it's needed it'll be reloaded anyway. */ 351 * the GS register here: if it's needed it'll be reloaded anyway.
352 */
328 lazy_load_gs(0); 353 lazy_load_gs(0);
329 lazy_hcall2(LHCALL_LOAD_TLS, __pa(&t->tls_array), cpu); 354 lazy_hcall2(LHCALL_LOAD_TLS, __pa(&t->tls_array), cpu);
330} 355}
331 356
332/*G:038 That's enough excitement for now, back to ploughing through each of 357/*G:038
333 * the different pv_ops structures (we're about 1/3 of the way through). 358 * That's enough excitement for now, back to ploughing through each of the
359 * different pv_ops structures (we're about 1/3 of the way through).
334 * 360 *
335 * This is the Local Descriptor Table, another weird Intel thingy. Linux only 361 * This is the Local Descriptor Table, another weird Intel thingy. Linux only
336 * uses this for some strange applications like Wine. We don't do anything 362 * uses this for some strange applications like Wine. We don't do anything
337 * here, so they'll get an informative and friendly Segmentation Fault. */ 363 * here, so they'll get an informative and friendly Segmentation Fault.
364 */
338static void lguest_set_ldt(const void *addr, unsigned entries) 365static void lguest_set_ldt(const void *addr, unsigned entries)
339{ 366{
340} 367}
341 368
342/* This loads a GDT entry into the "Task Register": that entry points to a 369/*
370 * This loads a GDT entry into the "Task Register": that entry points to a
343 * structure called the Task State Segment. Some comments scattered though the 371 * structure called the Task State Segment. Some comments scattered though the
344 * kernel code indicate that this used for task switching in ages past, along 372 * kernel code indicate that this used for task switching in ages past, along
345 * with blood sacrifice and astrology. 373 * with blood sacrifice and astrology.
@@ -347,19 +375,21 @@ static void lguest_set_ldt(const void *addr, unsigned entries)
347 * Now there's nothing interesting in here that we don't get told elsewhere. 375 * Now there's nothing interesting in here that we don't get told elsewhere.
348 * But the native version uses the "ltr" instruction, which makes the Host 376 * But the native version uses the "ltr" instruction, which makes the Host
349 * complain to the Guest about a Segmentation Fault and it'll oops. So we 377 * complain to the Guest about a Segmentation Fault and it'll oops. So we
350 * override the native version with a do-nothing version. */ 378 * override the native version with a do-nothing version.
379 */
351static void lguest_load_tr_desc(void) 380static void lguest_load_tr_desc(void)
352{ 381{
353} 382}
354 383
355/* The "cpuid" instruction is a way of querying both the CPU identity 384/*
385 * The "cpuid" instruction is a way of querying both the CPU identity
356 * (manufacturer, model, etc) and its features. It was introduced before the 386 * (manufacturer, model, etc) and its features. It was introduced before the
357 * Pentium in 1993 and keeps getting extended by both Intel, AMD and others. 387 * Pentium in 1993 and keeps getting extended by both Intel, AMD and others.
358 * As you might imagine, after a decade and a half this treatment, it is now a 388 * As you might imagine, after a decade and a half this treatment, it is now a
359 * giant ball of hair. Its entry in the current Intel manual runs to 28 pages. 389 * giant ball of hair. Its entry in the current Intel manual runs to 28 pages.
360 * 390 *
361 * This instruction even it has its own Wikipedia entry. The Wikipedia entry 391 * This instruction even it has its own Wikipedia entry. The Wikipedia entry
362 * has been translated into 4 languages. I am not making this up! 392 * has been translated into 5 languages. I am not making this up!
363 * 393 *
364 * We could get funky here and identify ourselves as "GenuineLguest", but 394 * We could get funky here and identify ourselves as "GenuineLguest", but
365 * instead we just use the real "cpuid" instruction. Then I pretty much turned 395 * instead we just use the real "cpuid" instruction. Then I pretty much turned
@@ -371,7 +401,8 @@ static void lguest_load_tr_desc(void)
371 * Replacing the cpuid so we can turn features off is great for the kernel, but 401 * Replacing the cpuid so we can turn features off is great for the kernel, but
372 * anyone (including userspace) can just use the raw "cpuid" instruction and 402 * anyone (including userspace) can just use the raw "cpuid" instruction and
373 * the Host won't even notice since it isn't privileged. So we try not to get 403 * the Host won't even notice since it isn't privileged. So we try not to get
374 * too worked up about it. */ 404 * too worked up about it.
405 */
375static void lguest_cpuid(unsigned int *ax, unsigned int *bx, 406static void lguest_cpuid(unsigned int *ax, unsigned int *bx,
376 unsigned int *cx, unsigned int *dx) 407 unsigned int *cx, unsigned int *dx)
377{ 408{
@@ -379,43 +410,63 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx,
379 410
380 native_cpuid(ax, bx, cx, dx); 411 native_cpuid(ax, bx, cx, dx);
381 switch (function) { 412 switch (function) {
382 case 0: /* ID and highest CPUID. Futureproof a little by sticking to 413 /*
383 * older ones. */ 414 * CPUID 0 gives the highest legal CPUID number (and the ID string).
415 * We futureproof our code a little by sticking to known CPUID values.
416 */
417 case 0:
384 if (*ax > 5) 418 if (*ax > 5)
385 *ax = 5; 419 *ax = 5;
386 break; 420 break;
387 case 1: /* Basic feature request. */ 421
388 /* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */ 422 /*
423 * CPUID 1 is a basic feature request.
424 *
425 * CX: we only allow kernel to see SSE3, CMPXCHG16B and SSSE3
426 * DX: SSE, SSE2, FXSR, MMX, CMOV, CMPXCHG8B, TSC, FPU and PAE.
427 */
428 case 1:
389 *cx &= 0x00002201; 429 *cx &= 0x00002201;
390 /* SSE, SSE2, FXSR, MMX, CMOV, CMPXCHG8B, TSC, FPU, PAE. */
391 *dx &= 0x07808151; 430 *dx &= 0x07808151;
392 /* The Host can do a nice optimization if it knows that the 431 /*
432 * The Host can do a nice optimization if it knows that the
393 * kernel mappings (addresses above 0xC0000000 or whatever 433 * kernel mappings (addresses above 0xC0000000 or whatever
394 * PAGE_OFFSET is set to) haven't changed. But Linux calls 434 * PAGE_OFFSET is set to) haven't changed. But Linux calls
395 * flush_tlb_user() for both user and kernel mappings unless 435 * flush_tlb_user() for both user and kernel mappings unless
396 * the Page Global Enable (PGE) feature bit is set. */ 436 * the Page Global Enable (PGE) feature bit is set.
437 */
397 *dx |= 0x00002000; 438 *dx |= 0x00002000;
398 /* We also lie, and say we're family id 5. 6 or greater 439 /*
440 * We also lie, and say we're family id 5. 6 or greater
399 * leads to a rdmsr in early_init_intel which we can't handle. 441 * leads to a rdmsr in early_init_intel which we can't handle.
400 * Family ID is returned as bits 8-12 in ax. */ 442 * Family ID is returned as bits 8-12 in ax.
443 */
401 *ax &= 0xFFFFF0FF; 444 *ax &= 0xFFFFF0FF;
402 *ax |= 0x00000500; 445 *ax |= 0x00000500;
403 break; 446 break;
447 /*
448 * 0x80000000 returns the highest Extended Function, so we futureproof
449 * like we do above by limiting it to known fields.
450 */
404 case 0x80000000: 451 case 0x80000000:
405 /* Futureproof this a little: if they ask how much extended
406 * processor information there is, limit it to known fields. */
407 if (*ax > 0x80000008) 452 if (*ax > 0x80000008)
408 *ax = 0x80000008; 453 *ax = 0x80000008;
409 break; 454 break;
455
456 /*
457 * PAE systems can mark pages as non-executable. Linux calls this the
458 * NX bit. Intel calls it XD (eXecute Disable), AMD EVP (Enhanced
459 * Virus Protection). We just switch turn if off here, since we don't
460 * support it.
461 */
410 case 0x80000001: 462 case 0x80000001:
411 /* Here we should fix nx cap depending on host. */
412 /* For this version of PAE, we just clear NX bit. */
413 *dx &= ~(1 << 20); 463 *dx &= ~(1 << 20);
414 break; 464 break;
415 } 465 }
416} 466}
417 467
418/* Intel has four control registers, imaginatively named cr0, cr2, cr3 and cr4. 468/*
469 * Intel has four control registers, imaginatively named cr0, cr2, cr3 and cr4.
419 * I assume there's a cr1, but it hasn't bothered us yet, so we'll not bother 470 * I assume there's a cr1, but it hasn't bothered us yet, so we'll not bother
420 * it. The Host needs to know when the Guest wants to change them, so we have 471 * it. The Host needs to know when the Guest wants to change them, so we have
421 * a whole series of functions like read_cr0() and write_cr0(). 472 * a whole series of functions like read_cr0() and write_cr0().
@@ -430,7 +481,8 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx,
430 * name like "FPUTRAP bit" be a little less cryptic? 481 * name like "FPUTRAP bit" be a little less cryptic?
431 * 482 *
432 * We store cr0 locally because the Host never changes it. The Guest sometimes 483 * We store cr0 locally because the Host never changes it. The Guest sometimes
433 * wants to read it and we'd prefer not to bother the Host unnecessarily. */ 484 * wants to read it and we'd prefer not to bother the Host unnecessarily.
485 */
434static unsigned long current_cr0; 486static unsigned long current_cr0;
435static void lguest_write_cr0(unsigned long val) 487static void lguest_write_cr0(unsigned long val)
436{ 488{
@@ -443,18 +495,22 @@ static unsigned long lguest_read_cr0(void)
443 return current_cr0; 495 return current_cr0;
444} 496}
445 497
446/* Intel provided a special instruction to clear the TS bit for people too cool 498/*
499 * Intel provided a special instruction to clear the TS bit for people too cool
447 * to use write_cr0() to do it. This "clts" instruction is faster, because all 500 * to use write_cr0() to do it. This "clts" instruction is faster, because all
448 * the vowels have been optimized out. */ 501 * the vowels have been optimized out.
502 */
449static void lguest_clts(void) 503static void lguest_clts(void)
450{ 504{
451 lazy_hcall1(LHCALL_TS, 0); 505 lazy_hcall1(LHCALL_TS, 0);
452 current_cr0 &= ~X86_CR0_TS; 506 current_cr0 &= ~X86_CR0_TS;
453} 507}
454 508
455/* cr2 is the virtual address of the last page fault, which the Guest only ever 509/*
510 * cr2 is the virtual address of the last page fault, which the Guest only ever
456 * reads. The Host kindly writes this into our "struct lguest_data", so we 511 * reads. The Host kindly writes this into our "struct lguest_data", so we
457 * just read it out of there. */ 512 * just read it out of there.
513 */
458static unsigned long lguest_read_cr2(void) 514static unsigned long lguest_read_cr2(void)
459{ 515{
460 return lguest_data.cr2; 516 return lguest_data.cr2;
@@ -463,10 +519,12 @@ static unsigned long lguest_read_cr2(void)
463/* See lguest_set_pte() below. */ 519/* See lguest_set_pte() below. */
464static bool cr3_changed = false; 520static bool cr3_changed = false;
465 521
466/* cr3 is the current toplevel pagetable page: the principle is the same as 522/*
523 * cr3 is the current toplevel pagetable page: the principle is the same as
467 * cr0. Keep a local copy, and tell the Host when it changes. The only 524 * cr0. Keep a local copy, and tell the Host when it changes. The only
468 * difference is that our local copy is in lguest_data because the Host needs 525 * difference is that our local copy is in lguest_data because the Host needs
469 * to set it upon our initial hypercall. */ 526 * to set it upon our initial hypercall.
527 */
470static void lguest_write_cr3(unsigned long cr3) 528static void lguest_write_cr3(unsigned long cr3)
471{ 529{
472 lguest_data.pgdir = cr3; 530 lguest_data.pgdir = cr3;
@@ -511,7 +569,7 @@ static void lguest_write_cr4(unsigned long val)
511 * cr3 ---> +---------+ 569 * cr3 ---> +---------+
512 * | --------->+---------+ 570 * | --------->+---------+
513 * | | | PADDR1 | 571 * | | | PADDR1 |
514 * Top-level | | PADDR2 | 572 * Mid-level | | PADDR2 |
515 * (PMD) page | | | 573 * (PMD) page | | |
516 * | | Lower-level | 574 * | | Lower-level |
517 * | | (PTE) page | 575 * | | (PTE) page |
@@ -531,21 +589,62 @@ static void lguest_write_cr4(unsigned long val)
531 * Index into top Index into second Offset within page 589 * Index into top Index into second Offset within page
532 * page directory page pagetable page 590 * page directory page pagetable page
533 * 591 *
534 * The kernel spends a lot of time changing both the top-level page directory 592 * Now, unfortunately, this isn't the whole story: Intel added Physical Address
535 * and lower-level pagetable pages. The Guest doesn't know physical addresses, 593 * Extension (PAE) to allow 32 bit systems to use 64GB of memory (ie. 36 bits).
536 * so while it maintains these page tables exactly like normal, it also needs 594 * These are held in 64-bit page table entries, so we can now only fit 512
537 * to keep the Host informed whenever it makes a change: the Host will create 595 * entries in a page, and the neat three-level tree breaks down.
538 * the real page tables based on the Guests'. 596 *
597 * The result is a four level page table:
598 *
599 * cr3 --> [ 4 Upper ]
600 * [ Level ]
601 * [ Entries ]
602 * [(PUD Page)]---> +---------+
603 * | --------->+---------+
604 * | | | PADDR1 |
605 * Mid-level | | PADDR2 |
606 * (PMD) page | | |
607 * | | Lower-level |
608 * | | (PTE) page |
609 * | | | |
610 * .... ....
611 *
612 *
613 * And the virtual address is decoded as:
614 *
615 * 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
616 * |<-2->|<--- 9 bits ---->|<---- 9 bits --->|<------ 12 bits ------>|
617 * Index into Index into mid Index into lower Offset within page
618 * top entries directory page pagetable page
619 *
620 * It's too hard to switch between these two formats at runtime, so Linux only
621 * supports one or the other depending on whether CONFIG_X86_PAE is set. Many
622 * distributions turn it on, and not just for people with silly amounts of
623 * memory: the larger PTE entries allow room for the NX bit, which lets the
624 * kernel disable execution of pages and increase security.
625 *
626 * This was a problem for lguest, which couldn't run on these distributions;
627 * then Matias Zabaljauregui figured it all out and implemented it, and only a
628 * handful of puppies were crushed in the process!
629 *
630 * Back to our point: the kernel spends a lot of time changing both the
631 * top-level page directory and lower-level pagetable pages. The Guest doesn't
632 * know physical addresses, so while it maintains these page tables exactly
633 * like normal, it also needs to keep the Host informed whenever it makes a
634 * change: the Host will create the real page tables based on the Guests'.
539 */ 635 */
540 636
541/* The Guest calls this to set a second-level entry (pte), ie. to map a page 637/*
542 * into a process' address space. We set the entry then tell the Host the 638 * The Guest calls this after it has set a second-level entry (pte), ie. to map
543 * toplevel and address this corresponds to. The Guest uses one pagetable per 639 * a page into a process' address space. Wetell the Host the toplevel and
544 * process, so we need to tell the Host which one we're changing (mm->pgd). */ 640 * address this corresponds to. The Guest uses one pagetable per process, so
641 * we need to tell the Host which one we're changing (mm->pgd).
642 */
545static void lguest_pte_update(struct mm_struct *mm, unsigned long addr, 643static void lguest_pte_update(struct mm_struct *mm, unsigned long addr,
546 pte_t *ptep) 644 pte_t *ptep)
547{ 645{
548#ifdef CONFIG_X86_PAE 646#ifdef CONFIG_X86_PAE
647 /* PAE needs to hand a 64 bit page table entry, so it uses two args. */
549 lazy_hcall4(LHCALL_SET_PTE, __pa(mm->pgd), addr, 648 lazy_hcall4(LHCALL_SET_PTE, __pa(mm->pgd), addr,
550 ptep->pte_low, ptep->pte_high); 649 ptep->pte_low, ptep->pte_high);
551#else 650#else
@@ -553,6 +652,7 @@ static void lguest_pte_update(struct mm_struct *mm, unsigned long addr,
553#endif 652#endif
554} 653}
555 654
655/* This is the "set and update" combo-meal-deal version. */
556static void lguest_set_pte_at(struct mm_struct *mm, unsigned long addr, 656static void lguest_set_pte_at(struct mm_struct *mm, unsigned long addr,
557 pte_t *ptep, pte_t pteval) 657 pte_t *ptep, pte_t pteval)
558{ 658{
@@ -560,10 +660,13 @@ static void lguest_set_pte_at(struct mm_struct *mm, unsigned long addr,
560 lguest_pte_update(mm, addr, ptep); 660 lguest_pte_update(mm, addr, ptep);
561} 661}
562 662
563/* The Guest calls lguest_set_pud to set a top-level entry and lguest_set_pmd 663/*
664 * The Guest calls lguest_set_pud to set a top-level entry and lguest_set_pmd
564 * to set a middle-level entry when PAE is activated. 665 * to set a middle-level entry when PAE is activated.
666 *
565 * Again, we set the entry then tell the Host which page we changed, 667 * Again, we set the entry then tell the Host which page we changed,
566 * and the index of the entry we changed. */ 668 * and the index of the entry we changed.
669 */
567#ifdef CONFIG_X86_PAE 670#ifdef CONFIG_X86_PAE
568static void lguest_set_pud(pud_t *pudp, pud_t pudval) 671static void lguest_set_pud(pud_t *pudp, pud_t pudval)
569{ 672{
@@ -582,8 +685,7 @@ static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval)
582} 685}
583#else 686#else
584 687
585/* The Guest calls lguest_set_pmd to set a top-level entry when PAE is not 688/* The Guest calls lguest_set_pmd to set a top-level entry when !PAE. */
586 * activated. */
587static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval) 689static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval)
588{ 690{
589 native_set_pmd(pmdp, pmdval); 691 native_set_pmd(pmdp, pmdval);
@@ -592,7 +694,8 @@ static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval)
592} 694}
593#endif 695#endif
594 696
595/* There are a couple of legacy places where the kernel sets a PTE, but we 697/*
698 * There are a couple of legacy places where the kernel sets a PTE, but we
596 * don't know the top level any more. This is useless for us, since we don't 699 * don't know the top level any more. This is useless for us, since we don't
597 * know which pagetable is changing or what address, so we just tell the Host 700 * know which pagetable is changing or what address, so we just tell the Host
598 * to forget all of them. Fortunately, this is very rare. 701 * to forget all of them. Fortunately, this is very rare.
@@ -600,7 +703,8 @@ static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval)
600 * ... except in early boot when the kernel sets up the initial pagetables, 703 * ... except in early boot when the kernel sets up the initial pagetables,
601 * which makes booting astonishingly slow: 1.83 seconds! So we don't even tell 704 * which makes booting astonishingly slow: 1.83 seconds! So we don't even tell
602 * the Host anything changed until we've done the first page table switch, 705 * the Host anything changed until we've done the first page table switch,
603 * which brings boot back to 0.25 seconds. */ 706 * which brings boot back to 0.25 seconds.
707 */
604static void lguest_set_pte(pte_t *ptep, pte_t pteval) 708static void lguest_set_pte(pte_t *ptep, pte_t pteval)
605{ 709{
606 native_set_pte(ptep, pteval); 710 native_set_pte(ptep, pteval);
@@ -609,6 +713,11 @@ static void lguest_set_pte(pte_t *ptep, pte_t pteval)
609} 713}
610 714
611#ifdef CONFIG_X86_PAE 715#ifdef CONFIG_X86_PAE
716/*
717 * With 64-bit PTE values, we need to be careful setting them: if we set 32
718 * bits at a time, the hardware could see a weird half-set entry. These
719 * versions ensure we update all 64 bits at once.
720 */
612static void lguest_set_pte_atomic(pte_t *ptep, pte_t pte) 721static void lguest_set_pte_atomic(pte_t *ptep, pte_t pte)
613{ 722{
614 native_set_pte_atomic(ptep, pte); 723 native_set_pte_atomic(ptep, pte);
@@ -616,19 +725,21 @@ static void lguest_set_pte_atomic(pte_t *ptep, pte_t pte)
616 lazy_hcall1(LHCALL_FLUSH_TLB, 1); 725 lazy_hcall1(LHCALL_FLUSH_TLB, 1);
617} 726}
618 727
619void lguest_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) 728static void lguest_pte_clear(struct mm_struct *mm, unsigned long addr,
729 pte_t *ptep)
620{ 730{
621 native_pte_clear(mm, addr, ptep); 731 native_pte_clear(mm, addr, ptep);
622 lguest_pte_update(mm, addr, ptep); 732 lguest_pte_update(mm, addr, ptep);
623} 733}
624 734
625void lguest_pmd_clear(pmd_t *pmdp) 735static void lguest_pmd_clear(pmd_t *pmdp)
626{ 736{
627 lguest_set_pmd(pmdp, __pmd(0)); 737 lguest_set_pmd(pmdp, __pmd(0));
628} 738}
629#endif 739#endif
630 740
631/* Unfortunately for Lguest, the pv_mmu_ops for page tables were based on 741/*
742 * Unfortunately for Lguest, the pv_mmu_ops for page tables were based on
632 * native page table operations. On native hardware you can set a new page 743 * native page table operations. On native hardware you can set a new page
633 * table entry whenever you want, but if you want to remove one you have to do 744 * table entry whenever you want, but if you want to remove one you have to do
634 * a TLB flush (a TLB is a little cache of page table entries kept by the CPU). 745 * a TLB flush (a TLB is a little cache of page table entries kept by the CPU).
@@ -637,24 +748,29 @@ void lguest_pmd_clear(pmd_t *pmdp)
637 * called when a valid entry is written, not when it's removed (ie. marked not 748 * called when a valid entry is written, not when it's removed (ie. marked not
638 * present). Instead, this is where we come when the Guest wants to remove a 749 * present). Instead, this is where we come when the Guest wants to remove a
639 * page table entry: we tell the Host to set that entry to 0 (ie. the present 750 * page table entry: we tell the Host to set that entry to 0 (ie. the present
640 * bit is zero). */ 751 * bit is zero).
752 */
641static void lguest_flush_tlb_single(unsigned long addr) 753static void lguest_flush_tlb_single(unsigned long addr)
642{ 754{
643 /* Simply set it to zero: if it was not, it will fault back in. */ 755 /* Simply set it to zero: if it was not, it will fault back in. */
644 lazy_hcall3(LHCALL_SET_PTE, lguest_data.pgdir, addr, 0); 756 lazy_hcall3(LHCALL_SET_PTE, lguest_data.pgdir, addr, 0);
645} 757}
646 758
647/* This is what happens after the Guest has removed a large number of entries. 759/*
760 * This is what happens after the Guest has removed a large number of entries.
648 * This tells the Host that any of the page table entries for userspace might 761 * This tells the Host that any of the page table entries for userspace might
649 * have changed, ie. virtual addresses below PAGE_OFFSET. */ 762 * have changed, ie. virtual addresses below PAGE_OFFSET.
763 */
650static void lguest_flush_tlb_user(void) 764static void lguest_flush_tlb_user(void)
651{ 765{
652 lazy_hcall1(LHCALL_FLUSH_TLB, 0); 766 lazy_hcall1(LHCALL_FLUSH_TLB, 0);
653} 767}
654 768
655/* This is called when the kernel page tables have changed. That's not very 769/*
770 * This is called when the kernel page tables have changed. That's not very
656 * common (unless the Guest is using highmem, which makes the Guest extremely 771 * common (unless the Guest is using highmem, which makes the Guest extremely
657 * slow), so it's worth separating this from the user flushing above. */ 772 * slow), so it's worth separating this from the user flushing above.
773 */
658static void lguest_flush_tlb_kernel(void) 774static void lguest_flush_tlb_kernel(void)
659{ 775{
660 lazy_hcall1(LHCALL_FLUSH_TLB, 1); 776 lazy_hcall1(LHCALL_FLUSH_TLB, 1);
@@ -691,26 +807,38 @@ static struct irq_chip lguest_irq_controller = {
691 .unmask = enable_lguest_irq, 807 .unmask = enable_lguest_irq,
692}; 808};
693 809
694/* This sets up the Interrupt Descriptor Table (IDT) entry for each hardware 810/*
811 * This sets up the Interrupt Descriptor Table (IDT) entry for each hardware
695 * interrupt (except 128, which is used for system calls), and then tells the 812 * interrupt (except 128, which is used for system calls), and then tells the
696 * Linux infrastructure that each interrupt is controlled by our level-based 813 * Linux infrastructure that each interrupt is controlled by our level-based
697 * lguest interrupt controller. */ 814 * lguest interrupt controller.
815 */
698static void __init lguest_init_IRQ(void) 816static void __init lguest_init_IRQ(void)
699{ 817{
700 unsigned int i; 818 unsigned int i;
701 819
702 for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) { 820 for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) {
703 /* Some systems map "vectors" to interrupts weirdly. Lguest has 821 /* Some systems map "vectors" to interrupts weirdly. Not us! */
704 * a straightforward 1 to 1 mapping, so force that here. */
705 __get_cpu_var(vector_irq)[i] = i - FIRST_EXTERNAL_VECTOR; 822 __get_cpu_var(vector_irq)[i] = i - FIRST_EXTERNAL_VECTOR;
706 if (i != SYSCALL_VECTOR) 823 if (i != SYSCALL_VECTOR)
707 set_intr_gate(i, interrupt[i - FIRST_EXTERNAL_VECTOR]); 824 set_intr_gate(i, interrupt[i - FIRST_EXTERNAL_VECTOR]);
708 } 825 }
709 /* This call is required to set up for 4k stacks, where we have 826
710 * separate stacks for hard and soft interrupts. */ 827 /*
828 * This call is required to set up for 4k stacks, where we have
829 * separate stacks for hard and soft interrupts.
830 */
711 irq_ctx_init(smp_processor_id()); 831 irq_ctx_init(smp_processor_id());
712} 832}
713 833
834/*
835 * With CONFIG_SPARSE_IRQ, interrupt descriptors are allocated as-needed, so
836 * rather than set them in lguest_init_IRQ we are called here every time an
837 * lguest device needs an interrupt.
838 *
839 * FIXME: irq_to_desc_alloc_node() can fail due to lack of memory, we should
840 * pass that up!
841 */
714void lguest_setup_irq(unsigned int irq) 842void lguest_setup_irq(unsigned int irq)
715{ 843{
716 irq_to_desc_alloc_node(irq, 0); 844 irq_to_desc_alloc_node(irq, 0);
@@ -729,31 +857,39 @@ static unsigned long lguest_get_wallclock(void)
729 return lguest_data.time.tv_sec; 857 return lguest_data.time.tv_sec;
730} 858}
731 859
732/* The TSC is an Intel thing called the Time Stamp Counter. The Host tells us 860/*
861 * The TSC is an Intel thing called the Time Stamp Counter. The Host tells us
733 * what speed it runs at, or 0 if it's unusable as a reliable clock source. 862 * what speed it runs at, or 0 if it's unusable as a reliable clock source.
734 * This matches what we want here: if we return 0 from this function, the x86 863 * This matches what we want here: if we return 0 from this function, the x86
735 * TSC clock will give up and not register itself. */ 864 * TSC clock will give up and not register itself.
865 */
736static unsigned long lguest_tsc_khz(void) 866static unsigned long lguest_tsc_khz(void)
737{ 867{
738 return lguest_data.tsc_khz; 868 return lguest_data.tsc_khz;
739} 869}
740 870
741/* If we can't use the TSC, the kernel falls back to our lower-priority 871/*
742 * "lguest_clock", where we read the time value given to us by the Host. */ 872 * If we can't use the TSC, the kernel falls back to our lower-priority
873 * "lguest_clock", where we read the time value given to us by the Host.
874 */
743static cycle_t lguest_clock_read(struct clocksource *cs) 875static cycle_t lguest_clock_read(struct clocksource *cs)
744{ 876{
745 unsigned long sec, nsec; 877 unsigned long sec, nsec;
746 878
747 /* Since the time is in two parts (seconds and nanoseconds), we risk 879 /*
880 * Since the time is in two parts (seconds and nanoseconds), we risk
748 * reading it just as it's changing from 99 & 0.999999999 to 100 and 0, 881 * reading it just as it's changing from 99 & 0.999999999 to 100 and 0,
749 * and getting 99 and 0. As Linux tends to come apart under the stress 882 * and getting 99 and 0. As Linux tends to come apart under the stress
750 * of time travel, we must be careful: */ 883 * of time travel, we must be careful:
884 */
751 do { 885 do {
752 /* First we read the seconds part. */ 886 /* First we read the seconds part. */
753 sec = lguest_data.time.tv_sec; 887 sec = lguest_data.time.tv_sec;
754 /* This read memory barrier tells the compiler and the CPU that 888 /*
889 * This read memory barrier tells the compiler and the CPU that
755 * this can't be reordered: we have to complete the above 890 * this can't be reordered: we have to complete the above
756 * before going on. */ 891 * before going on.
892 */
757 rmb(); 893 rmb();
758 /* Now we read the nanoseconds part. */ 894 /* Now we read the nanoseconds part. */
759 nsec = lguest_data.time.tv_nsec; 895 nsec = lguest_data.time.tv_nsec;
@@ -777,9 +913,11 @@ static struct clocksource lguest_clock = {
777 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 913 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
778}; 914};
779 915
780/* We also need a "struct clock_event_device": Linux asks us to set it to go 916/*
917 * We also need a "struct clock_event_device": Linux asks us to set it to go
781 * off some time in the future. Actually, James Morris figured all this out, I 918 * off some time in the future. Actually, James Morris figured all this out, I
782 * just applied the patch. */ 919 * just applied the patch.
920 */
783static int lguest_clockevent_set_next_event(unsigned long delta, 921static int lguest_clockevent_set_next_event(unsigned long delta,
784 struct clock_event_device *evt) 922 struct clock_event_device *evt)
785{ 923{
@@ -829,8 +967,10 @@ static struct clock_event_device lguest_clockevent = {
829 .max_delta_ns = LG_CLOCK_MAX_DELTA, 967 .max_delta_ns = LG_CLOCK_MAX_DELTA,
830}; 968};
831 969
832/* This is the Guest timer interrupt handler (hardware interrupt 0). We just 970/*
833 * call the clockevent infrastructure and it does whatever needs doing. */ 971 * This is the Guest timer interrupt handler (hardware interrupt 0). We just
972 * call the clockevent infrastructure and it does whatever needs doing.
973 */
834static void lguest_time_irq(unsigned int irq, struct irq_desc *desc) 974static void lguest_time_irq(unsigned int irq, struct irq_desc *desc)
835{ 975{
836 unsigned long flags; 976 unsigned long flags;
@@ -841,10 +981,12 @@ static void lguest_time_irq(unsigned int irq, struct irq_desc *desc)
841 local_irq_restore(flags); 981 local_irq_restore(flags);
842} 982}
843 983
844/* At some point in the boot process, we get asked to set up our timing 984/*
985 * At some point in the boot process, we get asked to set up our timing
845 * infrastructure. The kernel doesn't expect timer interrupts before this, but 986 * infrastructure. The kernel doesn't expect timer interrupts before this, but
846 * we cleverly initialized the "blocked_interrupts" field of "struct 987 * we cleverly initialized the "blocked_interrupts" field of "struct
847 * lguest_data" so that timer interrupts were blocked until now. */ 988 * lguest_data" so that timer interrupts were blocked until now.
989 */
848static void lguest_time_init(void) 990static void lguest_time_init(void)
849{ 991{
850 /* Set up the timer interrupt (0) to go to our simple timer routine */ 992 /* Set up the timer interrupt (0) to go to our simple timer routine */
@@ -868,14 +1010,16 @@ static void lguest_time_init(void)
868 * to work. They're pretty simple. 1010 * to work. They're pretty simple.
869 */ 1011 */
870 1012
871/* The Guest needs to tell the Host what stack it expects traps to use. For 1013/*
1014 * The Guest needs to tell the Host what stack it expects traps to use. For
872 * native hardware, this is part of the Task State Segment mentioned above in 1015 * native hardware, this is part of the Task State Segment mentioned above in
873 * lguest_load_tr_desc(), but to help hypervisors there's this special call. 1016 * lguest_load_tr_desc(), but to help hypervisors there's this special call.
874 * 1017 *
875 * We tell the Host the segment we want to use (__KERNEL_DS is the kernel data 1018 * We tell the Host the segment we want to use (__KERNEL_DS is the kernel data
876 * segment), the privilege level (we're privilege level 1, the Host is 0 and 1019 * segment), the privilege level (we're privilege level 1, the Host is 0 and
877 * will not tolerate us trying to use that), the stack pointer, and the number 1020 * will not tolerate us trying to use that), the stack pointer, and the number
878 * of pages in the stack. */ 1021 * of pages in the stack.
1022 */
879static void lguest_load_sp0(struct tss_struct *tss, 1023static void lguest_load_sp0(struct tss_struct *tss,
880 struct thread_struct *thread) 1024 struct thread_struct *thread)
881{ 1025{
@@ -889,7 +1033,8 @@ static void lguest_set_debugreg(int regno, unsigned long value)
889 /* FIXME: Implement */ 1033 /* FIXME: Implement */
890} 1034}
891 1035
892/* There are times when the kernel wants to make sure that no memory writes are 1036/*
1037 * There are times when the kernel wants to make sure that no memory writes are
893 * caught in the cache (that they've all reached real hardware devices). This 1038 * caught in the cache (that they've all reached real hardware devices). This
894 * doesn't matter for the Guest which has virtual hardware. 1039 * doesn't matter for the Guest which has virtual hardware.
895 * 1040 *
@@ -903,11 +1048,13 @@ static void lguest_wbinvd(void)
903{ 1048{
904} 1049}
905 1050
906/* If the Guest expects to have an Advanced Programmable Interrupt Controller, 1051/*
1052 * If the Guest expects to have an Advanced Programmable Interrupt Controller,
907 * we play dumb by ignoring writes and returning 0 for reads. So it's no 1053 * we play dumb by ignoring writes and returning 0 for reads. So it's no
908 * longer Programmable nor Controlling anything, and I don't think 8 lines of 1054 * longer Programmable nor Controlling anything, and I don't think 8 lines of
909 * code qualifies for Advanced. It will also never interrupt anything. It 1055 * code qualifies for Advanced. It will also never interrupt anything. It
910 * does, however, allow us to get through the Linux boot code. */ 1056 * does, however, allow us to get through the Linux boot code.
1057 */
911#ifdef CONFIG_X86_LOCAL_APIC 1058#ifdef CONFIG_X86_LOCAL_APIC
912static void lguest_apic_write(u32 reg, u32 v) 1059static void lguest_apic_write(u32 reg, u32 v)
913{ 1060{
@@ -956,11 +1103,13 @@ static void lguest_safe_halt(void)
956 kvm_hypercall0(LHCALL_HALT); 1103 kvm_hypercall0(LHCALL_HALT);
957} 1104}
958 1105
959/* The SHUTDOWN hypercall takes a string to describe what's happening, and 1106/*
1107 * The SHUTDOWN hypercall takes a string to describe what's happening, and
960 * an argument which says whether this to restart (reboot) the Guest or not. 1108 * an argument which says whether this to restart (reboot) the Guest or not.
961 * 1109 *
962 * Note that the Host always prefers that the Guest speak in physical addresses 1110 * Note that the Host always prefers that the Guest speak in physical addresses
963 * rather than virtual addresses, so we use __pa() here. */ 1111 * rather than virtual addresses, so we use __pa() here.
1112 */
964static void lguest_power_off(void) 1113static void lguest_power_off(void)
965{ 1114{
966 kvm_hypercall2(LHCALL_SHUTDOWN, __pa("Power down"), 1115 kvm_hypercall2(LHCALL_SHUTDOWN, __pa("Power down"),
@@ -991,8 +1140,10 @@ static __init char *lguest_memory_setup(void)
991 * nice to move it back to lguest_init. Patch welcome... */ 1140 * nice to move it back to lguest_init. Patch welcome... */
992 atomic_notifier_chain_register(&panic_notifier_list, &paniced); 1141 atomic_notifier_chain_register(&panic_notifier_list, &paniced);
993 1142
994 /* The Linux bootloader header contains an "e820" memory map: the 1143 /*
995 * Launcher populated the first entry with our memory limit. */ 1144 *The Linux bootloader header contains an "e820" memory map: the
1145 * Launcher populated the first entry with our memory limit.
1146 */
996 e820_add_region(boot_params.e820_map[0].addr, 1147 e820_add_region(boot_params.e820_map[0].addr,
997 boot_params.e820_map[0].size, 1148 boot_params.e820_map[0].size,
998 boot_params.e820_map[0].type); 1149 boot_params.e820_map[0].type);
@@ -1001,16 +1152,17 @@ static __init char *lguest_memory_setup(void)
1001 return "LGUEST"; 1152 return "LGUEST";
1002} 1153}
1003 1154
1004/* We will eventually use the virtio console device to produce console output, 1155/*
1156 * We will eventually use the virtio console device to produce console output,
1005 * but before that is set up we use LHCALL_NOTIFY on normal memory to produce 1157 * but before that is set up we use LHCALL_NOTIFY on normal memory to produce
1006 * console output. */ 1158 * console output.
1159 */
1007static __init int early_put_chars(u32 vtermno, const char *buf, int count) 1160static __init int early_put_chars(u32 vtermno, const char *buf, int count)
1008{ 1161{
1009 char scratch[17]; 1162 char scratch[17];
1010 unsigned int len = count; 1163 unsigned int len = count;
1011 1164
1012 /* We use a nul-terminated string, so we have to make a copy. Icky, 1165 /* We use a nul-terminated string, so we make a copy. Icky, huh? */
1013 * huh? */
1014 if (len > sizeof(scratch) - 1) 1166 if (len > sizeof(scratch) - 1)
1015 len = sizeof(scratch) - 1; 1167 len = sizeof(scratch) - 1;
1016 scratch[len] = '\0'; 1168 scratch[len] = '\0';
@@ -1021,8 +1173,10 @@ static __init int early_put_chars(u32 vtermno, const char *buf, int count)
1021 return len; 1173 return len;
1022} 1174}
1023 1175
1024/* Rebooting also tells the Host we're finished, but the RESTART flag tells the 1176/*
1025 * Launcher to reboot us. */ 1177 * Rebooting also tells the Host we're finished, but the RESTART flag tells the
1178 * Launcher to reboot us.
1179 */
1026static void lguest_restart(char *reason) 1180static void lguest_restart(char *reason)
1027{ 1181{
1028 kvm_hypercall2(LHCALL_SHUTDOWN, __pa(reason), LGUEST_SHUTDOWN_RESTART); 1182 kvm_hypercall2(LHCALL_SHUTDOWN, __pa(reason), LGUEST_SHUTDOWN_RESTART);
@@ -1049,7 +1203,8 @@ static void lguest_restart(char *reason)
1049 * fit comfortably. 1203 * fit comfortably.
1050 * 1204 *
1051 * First we need assembly templates of each of the patchable Guest operations, 1205 * First we need assembly templates of each of the patchable Guest operations,
1052 * and these are in i386_head.S. */ 1206 * and these are in i386_head.S.
1207 */
1053 1208
1054/*G:060 We construct a table from the assembler templates: */ 1209/*G:060 We construct a table from the assembler templates: */
1055static const struct lguest_insns 1210static const struct lguest_insns
@@ -1060,9 +1215,11 @@ static const struct lguest_insns
1060 [PARAVIRT_PATCH(pv_irq_ops.save_fl)] = { lgstart_pushf, lgend_pushf }, 1215 [PARAVIRT_PATCH(pv_irq_ops.save_fl)] = { lgstart_pushf, lgend_pushf },
1061}; 1216};
1062 1217
1063/* Now our patch routine is fairly simple (based on the native one in 1218/*
1219 * Now our patch routine is fairly simple (based on the native one in
1064 * paravirt.c). If we have a replacement, we copy it in and return how much of 1220 * paravirt.c). If we have a replacement, we copy it in and return how much of
1065 * the available space we used. */ 1221 * the available space we used.
1222 */
1066static unsigned lguest_patch(u8 type, u16 clobber, void *ibuf, 1223static unsigned lguest_patch(u8 type, u16 clobber, void *ibuf,
1067 unsigned long addr, unsigned len) 1224 unsigned long addr, unsigned len)
1068{ 1225{
@@ -1074,8 +1231,7 @@ static unsigned lguest_patch(u8 type, u16 clobber, void *ibuf,
1074 1231
1075 insn_len = lguest_insns[type].end - lguest_insns[type].start; 1232 insn_len = lguest_insns[type].end - lguest_insns[type].start;
1076 1233
1077 /* Similarly if we can't fit replacement (shouldn't happen, but let's 1234 /* Similarly if it can't fit (doesn't happen, but let's be thorough). */
1078 * be thorough). */
1079 if (len < insn_len) 1235 if (len < insn_len)
1080 return paravirt_patch_default(type, clobber, ibuf, addr, len); 1236 return paravirt_patch_default(type, clobber, ibuf, addr, len);
1081 1237
@@ -1084,22 +1240,28 @@ static unsigned lguest_patch(u8 type, u16 clobber, void *ibuf,
1084 return insn_len; 1240 return insn_len;
1085} 1241}
1086 1242
1087/*G:029 Once we get to lguest_init(), we know we're a Guest. The various 1243/*G:029
1244 * Once we get to lguest_init(), we know we're a Guest. The various
1088 * pv_ops structures in the kernel provide points for (almost) every routine we 1245 * pv_ops structures in the kernel provide points for (almost) every routine we
1089 * have to override to avoid privileged instructions. */ 1246 * have to override to avoid privileged instructions.
1247 */
1090__init void lguest_init(void) 1248__init void lguest_init(void)
1091{ 1249{
1092 /* We're under lguest, paravirt is enabled, and we're running at 1250 /* We're under lguest. */
1093 * privilege level 1, not 0 as normal. */
1094 pv_info.name = "lguest"; 1251 pv_info.name = "lguest";
1252 /* Paravirt is enabled. */
1095 pv_info.paravirt_enabled = 1; 1253 pv_info.paravirt_enabled = 1;
1254 /* We're running at privilege level 1, not 0 as normal. */
1096 pv_info.kernel_rpl = 1; 1255 pv_info.kernel_rpl = 1;
1256 /* Everyone except Xen runs with this set. */
1097 pv_info.shared_kernel_pmd = 1; 1257 pv_info.shared_kernel_pmd = 1;
1098 1258
1099 /* We set up all the lguest overrides for sensitive operations. These 1259 /*
1100 * are detailed with the operations themselves. */ 1260 * We set up all the lguest overrides for sensitive operations. These
1261 * are detailed with the operations themselves.
1262 */
1101 1263
1102 /* interrupt-related operations */ 1264 /* Interrupt-related operations */
1103 pv_irq_ops.init_IRQ = lguest_init_IRQ; 1265 pv_irq_ops.init_IRQ = lguest_init_IRQ;
1104 pv_irq_ops.save_fl = PV_CALLEE_SAVE(save_fl); 1266 pv_irq_ops.save_fl = PV_CALLEE_SAVE(save_fl);
1105 pv_irq_ops.restore_fl = __PV_IS_CALLEE_SAVE(lg_restore_fl); 1267 pv_irq_ops.restore_fl = __PV_IS_CALLEE_SAVE(lg_restore_fl);
@@ -1107,11 +1269,11 @@ __init void lguest_init(void)
1107 pv_irq_ops.irq_enable = __PV_IS_CALLEE_SAVE(lg_irq_enable); 1269 pv_irq_ops.irq_enable = __PV_IS_CALLEE_SAVE(lg_irq_enable);
1108 pv_irq_ops.safe_halt = lguest_safe_halt; 1270 pv_irq_ops.safe_halt = lguest_safe_halt;
1109 1271
1110 /* init-time operations */ 1272 /* Setup operations */
1111 pv_init_ops.memory_setup = lguest_memory_setup; 1273 pv_init_ops.memory_setup = lguest_memory_setup;
1112 pv_init_ops.patch = lguest_patch; 1274 pv_init_ops.patch = lguest_patch;
1113 1275
1114 /* Intercepts of various cpu instructions */ 1276 /* Intercepts of various CPU instructions */
1115 pv_cpu_ops.load_gdt = lguest_load_gdt; 1277 pv_cpu_ops.load_gdt = lguest_load_gdt;
1116 pv_cpu_ops.cpuid = lguest_cpuid; 1278 pv_cpu_ops.cpuid = lguest_cpuid;
1117 pv_cpu_ops.load_idt = lguest_load_idt; 1279 pv_cpu_ops.load_idt = lguest_load_idt;
@@ -1132,7 +1294,7 @@ __init void lguest_init(void)
1132 pv_cpu_ops.start_context_switch = paravirt_start_context_switch; 1294 pv_cpu_ops.start_context_switch = paravirt_start_context_switch;
1133 pv_cpu_ops.end_context_switch = lguest_end_context_switch; 1295 pv_cpu_ops.end_context_switch = lguest_end_context_switch;
1134 1296
1135 /* pagetable management */ 1297 /* Pagetable management */
1136 pv_mmu_ops.write_cr3 = lguest_write_cr3; 1298 pv_mmu_ops.write_cr3 = lguest_write_cr3;
1137 pv_mmu_ops.flush_tlb_user = lguest_flush_tlb_user; 1299 pv_mmu_ops.flush_tlb_user = lguest_flush_tlb_user;
1138 pv_mmu_ops.flush_tlb_single = lguest_flush_tlb_single; 1300 pv_mmu_ops.flush_tlb_single = lguest_flush_tlb_single;
@@ -1154,54 +1316,71 @@ __init void lguest_init(void)
1154 pv_mmu_ops.pte_update_defer = lguest_pte_update; 1316 pv_mmu_ops.pte_update_defer = lguest_pte_update;
1155 1317
1156#ifdef CONFIG_X86_LOCAL_APIC 1318#ifdef CONFIG_X86_LOCAL_APIC
1157 /* apic read/write intercepts */ 1319 /* APIC read/write intercepts */
1158 set_lguest_basic_apic_ops(); 1320 set_lguest_basic_apic_ops();
1159#endif 1321#endif
1160 1322
1161 /* time operations */ 1323 /* Time operations */
1162 pv_time_ops.get_wallclock = lguest_get_wallclock; 1324 pv_time_ops.get_wallclock = lguest_get_wallclock;
1163 pv_time_ops.time_init = lguest_time_init; 1325 pv_time_ops.time_init = lguest_time_init;
1164 pv_time_ops.get_tsc_khz = lguest_tsc_khz; 1326 pv_time_ops.get_tsc_khz = lguest_tsc_khz;
1165 1327
1166 /* Now is a good time to look at the implementations of these functions 1328 /*
1167 * before returning to the rest of lguest_init(). */ 1329 * Now is a good time to look at the implementations of these functions
1330 * before returning to the rest of lguest_init().
1331 */
1168 1332
1169 /*G:070 Now we've seen all the paravirt_ops, we return to 1333 /*G:070
1334 * Now we've seen all the paravirt_ops, we return to
1170 * lguest_init() where the rest of the fairly chaotic boot setup 1335 * lguest_init() where the rest of the fairly chaotic boot setup
1171 * occurs. */ 1336 * occurs.
1337 */
1172 1338
1173 /* The stack protector is a weird thing where gcc places a canary 1339 /*
1340 * The stack protector is a weird thing where gcc places a canary
1174 * value on the stack and then checks it on return. This file is 1341 * value on the stack and then checks it on return. This file is
1175 * compiled with -fno-stack-protector it, so we got this far without 1342 * compiled with -fno-stack-protector it, so we got this far without
1176 * problems. The value of the canary is kept at offset 20 from the 1343 * problems. The value of the canary is kept at offset 20 from the
1177 * %gs register, so we need to set that up before calling C functions 1344 * %gs register, so we need to set that up before calling C functions
1178 * in other files. */ 1345 * in other files.
1346 */
1179 setup_stack_canary_segment(0); 1347 setup_stack_canary_segment(0);
1180 /* We could just call load_stack_canary_segment(), but we might as 1348
1181 * call switch_to_new_gdt() which loads the whole table and sets up 1349 /*
1182 * the per-cpu segment descriptor register %fs as well. */ 1350 * We could just call load_stack_canary_segment(), but we might as well
1351 * call switch_to_new_gdt() which loads the whole table and sets up the
1352 * per-cpu segment descriptor register %fs as well.
1353 */
1183 switch_to_new_gdt(0); 1354 switch_to_new_gdt(0);
1184 1355
1185 /* As described in head_32.S, we map the first 128M of memory. */ 1356 /* We actually boot with all memory mapped, but let's say 128MB. */
1186 max_pfn_mapped = (128*1024*1024) >> PAGE_SHIFT; 1357 max_pfn_mapped = (128*1024*1024) >> PAGE_SHIFT;
1187 1358
1188 /* The Host<->Guest Switcher lives at the top of our address space, and 1359 /*
1360 * The Host<->Guest Switcher lives at the top of our address space, and
1189 * the Host told us how big it is when we made LGUEST_INIT hypercall: 1361 * the Host told us how big it is when we made LGUEST_INIT hypercall:
1190 * it put the answer in lguest_data.reserve_mem */ 1362 * it put the answer in lguest_data.reserve_mem
1363 */
1191 reserve_top_address(lguest_data.reserve_mem); 1364 reserve_top_address(lguest_data.reserve_mem);
1192 1365
1193 /* If we don't initialize the lock dependency checker now, it crashes 1366 /*
1194 * paravirt_disable_iospace. */ 1367 * If we don't initialize the lock dependency checker now, it crashes
1368 * paravirt_disable_iospace.
1369 */
1195 lockdep_init(); 1370 lockdep_init();
1196 1371
1197 /* The IDE code spends about 3 seconds probing for disks: if we reserve 1372 /*
1373 * The IDE code spends about 3 seconds probing for disks: if we reserve
1198 * all the I/O ports up front it can't get them and so doesn't probe. 1374 * all the I/O ports up front it can't get them and so doesn't probe.
1199 * Other device drivers are similar (but less severe). This cuts the 1375 * Other device drivers are similar (but less severe). This cuts the
1200 * kernel boot time on my machine from 4.1 seconds to 0.45 seconds. */ 1376 * kernel boot time on my machine from 4.1 seconds to 0.45 seconds.
1377 */
1201 paravirt_disable_iospace(); 1378 paravirt_disable_iospace();
1202 1379
1203 /* This is messy CPU setup stuff which the native boot code does before 1380 /*
1204 * start_kernel, so we have to do, too: */ 1381 * This is messy CPU setup stuff which the native boot code does before
1382 * start_kernel, so we have to do, too:
1383 */
1205 cpu_detect(&new_cpu_data); 1384 cpu_detect(&new_cpu_data);
1206 /* head.S usually sets up the first capability word, so do it here. */ 1385 /* head.S usually sets up the first capability word, so do it here. */
1207 new_cpu_data.x86_capability[0] = cpuid_edx(1); 1386 new_cpu_data.x86_capability[0] = cpuid_edx(1);
@@ -1218,22 +1397,28 @@ __init void lguest_init(void)
1218 acpi_ht = 0; 1397 acpi_ht = 0;
1219#endif 1398#endif
1220 1399
1221 /* We set the preferred console to "hvc". This is the "hypervisor 1400 /*
1401 * We set the preferred console to "hvc". This is the "hypervisor
1222 * virtual console" driver written by the PowerPC people, which we also 1402 * virtual console" driver written by the PowerPC people, which we also
1223 * adapted for lguest's use. */ 1403 * adapted for lguest's use.
1404 */
1224 add_preferred_console("hvc", 0, NULL); 1405 add_preferred_console("hvc", 0, NULL);
1225 1406
1226 /* Register our very early console. */ 1407 /* Register our very early console. */
1227 virtio_cons_early_init(early_put_chars); 1408 virtio_cons_early_init(early_put_chars);
1228 1409
1229 /* Last of all, we set the power management poweroff hook to point to 1410 /*
1411 * Last of all, we set the power management poweroff hook to point to
1230 * the Guest routine to power off, and the reboot hook to our restart 1412 * the Guest routine to power off, and the reboot hook to our restart
1231 * routine. */ 1413 * routine.
1414 */
1232 pm_power_off = lguest_power_off; 1415 pm_power_off = lguest_power_off;
1233 machine_ops.restart = lguest_restart; 1416 machine_ops.restart = lguest_restart;
1234 1417
1235 /* Now we're set up, call i386_start_kernel() in head32.c and we proceed 1418 /*
1236 * to boot as normal. It never returns. */ 1419 * Now we're set up, call i386_start_kernel() in head32.c and we proceed
1420 * to boot as normal. It never returns.
1421 */
1237 i386_start_kernel(); 1422 i386_start_kernel();
1238} 1423}
1239/* 1424/*
diff --git a/arch/x86/lguest/i386_head.S b/arch/x86/lguest/i386_head.S
index a9c8cfe61cd..27eac0faee4 100644
--- a/arch/x86/lguest/i386_head.S
+++ b/arch/x86/lguest/i386_head.S
@@ -5,7 +5,8 @@
5#include <asm/thread_info.h> 5#include <asm/thread_info.h>
6#include <asm/processor-flags.h> 6#include <asm/processor-flags.h>
7 7
8/*G:020 Our story starts with the kernel booting into startup_32 in 8/*G:020
9 * Our story starts with the kernel booting into startup_32 in
9 * arch/x86/kernel/head_32.S. It expects a boot header, which is created by 10 * arch/x86/kernel/head_32.S. It expects a boot header, which is created by
10 * the bootloader (the Launcher in our case). 11 * the bootloader (the Launcher in our case).
11 * 12 *
@@ -21,11 +22,14 @@
21 * data without remembering to subtract __PAGE_OFFSET! 22 * data without remembering to subtract __PAGE_OFFSET!
22 * 23 *
23 * The .section line puts this code in .init.text so it will be discarded after 24 * The .section line puts this code in .init.text so it will be discarded after
24 * boot. */ 25 * boot.
26 */
25.section .init.text, "ax", @progbits 27.section .init.text, "ax", @progbits
26ENTRY(lguest_entry) 28ENTRY(lguest_entry)
27 /* We make the "initialization" hypercall now to tell the Host about 29 /*
28 * us, and also find out where it put our page tables. */ 30 * We make the "initialization" hypercall now to tell the Host about
31 * us, and also find out where it put our page tables.
32 */
29 movl $LHCALL_LGUEST_INIT, %eax 33 movl $LHCALL_LGUEST_INIT, %eax
30 movl $lguest_data - __PAGE_OFFSET, %ebx 34 movl $lguest_data - __PAGE_OFFSET, %ebx
31 .byte 0x0f,0x01,0xc1 /* KVM_HYPERCALL */ 35 .byte 0x0f,0x01,0xc1 /* KVM_HYPERCALL */
@@ -33,13 +37,14 @@ ENTRY(lguest_entry)
33 /* Set up the initial stack so we can run C code. */ 37 /* Set up the initial stack so we can run C code. */
34 movl $(init_thread_union+THREAD_SIZE),%esp 38 movl $(init_thread_union+THREAD_SIZE),%esp
35 39
36 /* Jumps are relative, and we're running __PAGE_OFFSET too low at the 40 /* Jumps are relative: we're running __PAGE_OFFSET too low. */
37 * moment. */
38 jmp lguest_init+__PAGE_OFFSET 41 jmp lguest_init+__PAGE_OFFSET
39 42
40/*G:055 We create a macro which puts the assembler code between lgstart_ and 43/*G:055
41 * lgend_ markers. These templates are put in the .text section: they can't be 44 * We create a macro which puts the assembler code between lgstart_ and lgend_
42 * discarded after boot as we may need to patch modules, too. */ 45 * markers. These templates are put in the .text section: they can't be
46 * discarded after boot as we may need to patch modules, too.
47 */
43.text 48.text
44#define LGUEST_PATCH(name, insns...) \ 49#define LGUEST_PATCH(name, insns...) \
45 lgstart_##name: insns; lgend_##name:; \ 50 lgstart_##name: insns; lgend_##name:; \
@@ -48,83 +53,103 @@ ENTRY(lguest_entry)
48LGUEST_PATCH(cli, movl $0, lguest_data+LGUEST_DATA_irq_enabled) 53LGUEST_PATCH(cli, movl $0, lguest_data+LGUEST_DATA_irq_enabled)
49LGUEST_PATCH(pushf, movl lguest_data+LGUEST_DATA_irq_enabled, %eax) 54LGUEST_PATCH(pushf, movl lguest_data+LGUEST_DATA_irq_enabled, %eax)
50 55
51/*G:033 But using those wrappers is inefficient (we'll see why that doesn't 56/*G:033
52 * matter for save_fl and irq_disable later). If we write our routines 57 * But using those wrappers is inefficient (we'll see why that doesn't matter
53 * carefully in assembler, we can avoid clobbering any registers and avoid 58 * for save_fl and irq_disable later). If we write our routines carefully in
54 * jumping through the wrapper functions. 59 * assembler, we can avoid clobbering any registers and avoid jumping through
60 * the wrapper functions.
55 * 61 *
56 * I skipped over our first piece of assembler, but this one is worth studying 62 * I skipped over our first piece of assembler, but this one is worth studying
57 * in a bit more detail so I'll describe in easy stages. First, the routine 63 * in a bit more detail so I'll describe in easy stages. First, the routine to
58 * to enable interrupts: */ 64 * enable interrupts:
65 */
59ENTRY(lg_irq_enable) 66ENTRY(lg_irq_enable)
60 /* The reverse of irq_disable, this sets lguest_data.irq_enabled to 67 /*
61 * X86_EFLAGS_IF (ie. "Interrupts enabled"). */ 68 * The reverse of irq_disable, this sets lguest_data.irq_enabled to
69 * X86_EFLAGS_IF (ie. "Interrupts enabled").
70 */
62 movl $X86_EFLAGS_IF, lguest_data+LGUEST_DATA_irq_enabled 71 movl $X86_EFLAGS_IF, lguest_data+LGUEST_DATA_irq_enabled
63 /* But now we need to check if the Host wants to know: there might have 72 /*
73 * But now we need to check if the Host wants to know: there might have
64 * been interrupts waiting to be delivered, in which case it will have 74 * been interrupts waiting to be delivered, in which case it will have
65 * set lguest_data.irq_pending to X86_EFLAGS_IF. If it's not zero, we 75 * set lguest_data.irq_pending to X86_EFLAGS_IF. If it's not zero, we
66 * jump to send_interrupts, otherwise we're done. */ 76 * jump to send_interrupts, otherwise we're done.
77 */
67 testl $0, lguest_data+LGUEST_DATA_irq_pending 78 testl $0, lguest_data+LGUEST_DATA_irq_pending
68 jnz send_interrupts 79 jnz send_interrupts
69 /* One cool thing about x86 is that you can do many things without using 80 /*
81 * One cool thing about x86 is that you can do many things without using
70 * a register. In this case, the normal path hasn't needed to save or 82 * a register. In this case, the normal path hasn't needed to save or
71 * restore any registers at all! */ 83 * restore any registers at all!
84 */
72 ret 85 ret
73send_interrupts: 86send_interrupts:
74 /* OK, now we need a register: eax is used for the hypercall number, 87 /*
88 * OK, now we need a register: eax is used for the hypercall number,
75 * which is LHCALL_SEND_INTERRUPTS. 89 * which is LHCALL_SEND_INTERRUPTS.
76 * 90 *
77 * We used not to bother with this pending detection at all, which was 91 * We used not to bother with this pending detection at all, which was
78 * much simpler. Sooner or later the Host would realize it had to 92 * much simpler. Sooner or later the Host would realize it had to
79 * send us an interrupt. But that turns out to make performance 7 93 * send us an interrupt. But that turns out to make performance 7
80 * times worse on a simple tcp benchmark. So now we do this the hard 94 * times worse on a simple tcp benchmark. So now we do this the hard
81 * way. */ 95 * way.
96 */
82 pushl %eax 97 pushl %eax
83 movl $LHCALL_SEND_INTERRUPTS, %eax 98 movl $LHCALL_SEND_INTERRUPTS, %eax
84 /* This is a vmcall instruction (same thing that KVM uses). Older 99 /*
100 * This is a vmcall instruction (same thing that KVM uses). Older
85 * assembler versions might not know the "vmcall" instruction, so we 101 * assembler versions might not know the "vmcall" instruction, so we
86 * create one manually here. */ 102 * create one manually here.
103 */
87 .byte 0x0f,0x01,0xc1 /* KVM_HYPERCALL */ 104 .byte 0x0f,0x01,0xc1 /* KVM_HYPERCALL */
105 /* Put eax back the way we found it. */
88 popl %eax 106 popl %eax
89 ret 107 ret
90 108
91/* Finally, the "popf" or "restore flags" routine. The %eax register holds the 109/*
110 * Finally, the "popf" or "restore flags" routine. The %eax register holds the
92 * flags (in practice, either X86_EFLAGS_IF or 0): if it's X86_EFLAGS_IF we're 111 * flags (in practice, either X86_EFLAGS_IF or 0): if it's X86_EFLAGS_IF we're
93 * enabling interrupts again, if it's 0 we're leaving them off. */ 112 * enabling interrupts again, if it's 0 we're leaving them off.
113 */
94ENTRY(lg_restore_fl) 114ENTRY(lg_restore_fl)
95 /* This is just "lguest_data.irq_enabled = flags;" */ 115 /* This is just "lguest_data.irq_enabled = flags;" */
96 movl %eax, lguest_data+LGUEST_DATA_irq_enabled 116 movl %eax, lguest_data+LGUEST_DATA_irq_enabled
97 /* Now, if the %eax value has enabled interrupts and 117 /*
118 * Now, if the %eax value has enabled interrupts and
98 * lguest_data.irq_pending is set, we want to tell the Host so it can 119 * lguest_data.irq_pending is set, we want to tell the Host so it can
99 * deliver any outstanding interrupts. Fortunately, both values will 120 * deliver any outstanding interrupts. Fortunately, both values will
100 * be X86_EFLAGS_IF (ie. 512) in that case, and the "testl" 121 * be X86_EFLAGS_IF (ie. 512) in that case, and the "testl"
101 * instruction will AND them together for us. If both are set, we 122 * instruction will AND them together for us. If both are set, we
102 * jump to send_interrupts. */ 123 * jump to send_interrupts.
124 */
103 testl lguest_data+LGUEST_DATA_irq_pending, %eax 125 testl lguest_data+LGUEST_DATA_irq_pending, %eax
104 jnz send_interrupts 126 jnz send_interrupts
105 /* Again, the normal path has used no extra registers. Clever, huh? */ 127 /* Again, the normal path has used no extra registers. Clever, huh? */
106 ret 128 ret
129/*:*/
107 130
108/* These demark the EIP range where host should never deliver interrupts. */ 131/* These demark the EIP range where host should never deliver interrupts. */
109.global lguest_noirq_start 132.global lguest_noirq_start
110.global lguest_noirq_end 133.global lguest_noirq_end
111 134
112/*M:004 When the Host reflects a trap or injects an interrupt into the Guest, 135/*M:004
113 * it sets the eflags interrupt bit on the stack based on 136 * When the Host reflects a trap or injects an interrupt into the Guest, it
114 * lguest_data.irq_enabled, so the Guest iret logic does the right thing when 137 * sets the eflags interrupt bit on the stack based on lguest_data.irq_enabled,
115 * restoring it. However, when the Host sets the Guest up for direct traps, 138 * so the Guest iret logic does the right thing when restoring it. However,
116 * such as system calls, the processor is the one to push eflags onto the 139 * when the Host sets the Guest up for direct traps, such as system calls, the
117 * stack, and the interrupt bit will be 1 (in reality, interrupts are always 140 * processor is the one to push eflags onto the stack, and the interrupt bit
118 * enabled in the Guest). 141 * will be 1 (in reality, interrupts are always enabled in the Guest).
119 * 142 *
120 * This turns out to be harmless: the only trap which should happen under Linux 143 * This turns out to be harmless: the only trap which should happen under Linux
121 * with interrupts disabled is Page Fault (due to our lazy mapping of vmalloc 144 * with interrupts disabled is Page Fault (due to our lazy mapping of vmalloc
122 * regions), which has to be reflected through the Host anyway. If another 145 * regions), which has to be reflected through the Host anyway. If another
123 * trap *does* go off when interrupts are disabled, the Guest will panic, and 146 * trap *does* go off when interrupts are disabled, the Guest will panic, and
124 * we'll never get to this iret! :*/ 147 * we'll never get to this iret!
148:*/
125 149
126/*G:045 There is one final paravirt_op that the Guest implements, and glancing 150/*G:045
127 * at it you can see why I left it to last. It's *cool*! It's in *assembler*! 151 * There is one final paravirt_op that the Guest implements, and glancing at it
152 * you can see why I left it to last. It's *cool*! It's in *assembler*!
128 * 153 *
129 * The "iret" instruction is used to return from an interrupt or trap. The 154 * The "iret" instruction is used to return from an interrupt or trap. The
130 * stack looks like this: 155 * stack looks like this:
@@ -148,15 +173,18 @@ ENTRY(lg_restore_fl)
148 * return to userspace or wherever. Our solution to this is to surround the 173 * return to userspace or wherever. Our solution to this is to surround the
149 * code with lguest_noirq_start: and lguest_noirq_end: labels. We tell the 174 * code with lguest_noirq_start: and lguest_noirq_end: labels. We tell the
150 * Host that it is *never* to interrupt us there, even if interrupts seem to be 175 * Host that it is *never* to interrupt us there, even if interrupts seem to be
151 * enabled. */ 176 * enabled.
177 */
152ENTRY(lguest_iret) 178ENTRY(lguest_iret)
153 pushl %eax 179 pushl %eax
154 movl 12(%esp), %eax 180 movl 12(%esp), %eax
155lguest_noirq_start: 181lguest_noirq_start:
156 /* Note the %ss: segment prefix here. Normal data accesses use the 182 /*
183 * Note the %ss: segment prefix here. Normal data accesses use the
157 * "ds" segment, but that will have already been restored for whatever 184 * "ds" segment, but that will have already been restored for whatever
158 * we're returning to (such as userspace): we can't trust it. The %ss: 185 * we're returning to (such as userspace): we can't trust it. The %ss:
159 * prefix makes sure we use the stack segment, which is still valid. */ 186 * prefix makes sure we use the stack segment, which is still valid.
187 */
160 movl %eax,%ss:lguest_data+LGUEST_DATA_irq_enabled 188 movl %eax,%ss:lguest_data+LGUEST_DATA_irq_enabled
161 popl %eax 189 popl %eax
162 iret 190 iret
diff --git a/arch/x86/lib/msr.c b/arch/x86/lib/msr.c
index 1440b9c0547..caa24aca811 100644
--- a/arch/x86/lib/msr.c
+++ b/arch/x86/lib/msr.c
@@ -89,16 +89,13 @@ void rdmsr_on_cpus(const cpumask_t *mask, u32 msr_no, struct msr *msrs)
89 rv.msrs = msrs; 89 rv.msrs = msrs;
90 rv.msr_no = msr_no; 90 rv.msr_no = msr_no;
91 91
92 preempt_disable(); 92 this_cpu = get_cpu();
93 /* 93
94 * FIXME: handle the CPU we're executing on separately for now until 94 if (cpumask_test_cpu(this_cpu, mask))
95 * smp_call_function_many has been fixed to not skip it. 95 __rdmsr_on_cpu(&rv);
96 */
97 this_cpu = raw_smp_processor_id();
98 smp_call_function_single(this_cpu, __rdmsr_on_cpu, &rv, 1);
99 96
100 smp_call_function_many(mask, __rdmsr_on_cpu, &rv, 1); 97 smp_call_function_many(mask, __rdmsr_on_cpu, &rv, 1);
101 preempt_enable(); 98 put_cpu();
102} 99}
103EXPORT_SYMBOL(rdmsr_on_cpus); 100EXPORT_SYMBOL(rdmsr_on_cpus);
104 101
@@ -121,16 +118,13 @@ void wrmsr_on_cpus(const cpumask_t *mask, u32 msr_no, struct msr *msrs)
121 rv.msrs = msrs; 118 rv.msrs = msrs;
122 rv.msr_no = msr_no; 119 rv.msr_no = msr_no;
123 120
124 preempt_disable(); 121 this_cpu = get_cpu();
125 /* 122
126 * FIXME: handle the CPU we're executing on separately for now until 123 if (cpumask_test_cpu(this_cpu, mask))
127 * smp_call_function_many has been fixed to not skip it. 124 __wrmsr_on_cpu(&rv);
128 */
129 this_cpu = raw_smp_processor_id();
130 smp_call_function_single(this_cpu, __wrmsr_on_cpu, &rv, 1);
131 125
132 smp_call_function_many(mask, __wrmsr_on_cpu, &rv, 1); 126 smp_call_function_many(mask, __wrmsr_on_cpu, &rv, 1);
133 preempt_enable(); 127 put_cpu();
134} 128}
135EXPORT_SYMBOL(wrmsr_on_cpus); 129EXPORT_SYMBOL(wrmsr_on_cpus);
136 130
diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c
index 58f621e8191..2112ed55e7e 100644
--- a/arch/x86/mm/highmem_32.c
+++ b/arch/x86/mm/highmem_32.c
@@ -103,6 +103,7 @@ EXPORT_SYMBOL(kmap);
103EXPORT_SYMBOL(kunmap); 103EXPORT_SYMBOL(kunmap);
104EXPORT_SYMBOL(kmap_atomic); 104EXPORT_SYMBOL(kmap_atomic);
105EXPORT_SYMBOL(kunmap_atomic); 105EXPORT_SYMBOL(kunmap_atomic);
106EXPORT_SYMBOL(kmap_atomic_prot);
106 107
107void __init set_highmem_pages_init(void) 108void __init set_highmem_pages_init(void)
108{ 109{
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 6176fe8f29e..ea56b8cbb6a 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -796,7 +796,7 @@ int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
796 return ret; 796 return ret;
797 797
798#else 798#else
799 reserve_bootmem(phys, len, BOOTMEM_DEFAULT); 799 reserve_bootmem(phys, len, flags);
800#endif 800#endif
801 801
802 if (phys+len <= MAX_DMA_PFN*PAGE_SIZE) { 802 if (phys+len <= MAX_DMA_PFN*PAGE_SIZE) {
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 1b734d7a896..7e600c1962d 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -591,9 +591,12 @@ static int __change_page_attr(struct cpa_data *cpa, int primary)
591 unsigned int level; 591 unsigned int level;
592 pte_t *kpte, old_pte; 592 pte_t *kpte, old_pte;
593 593
594 if (cpa->flags & CPA_PAGES_ARRAY) 594 if (cpa->flags & CPA_PAGES_ARRAY) {
595 address = (unsigned long)page_address(cpa->pages[cpa->curpage]); 595 struct page *page = cpa->pages[cpa->curpage];
596 else if (cpa->flags & CPA_ARRAY) 596 if (unlikely(PageHighMem(page)))
597 return 0;
598 address = (unsigned long)page_address(page);
599 } else if (cpa->flags & CPA_ARRAY)
597 address = cpa->vaddr[cpa->curpage]; 600 address = cpa->vaddr[cpa->curpage];
598 else 601 else
599 address = *cpa->vaddr; 602 address = *cpa->vaddr;
@@ -697,9 +700,12 @@ static int cpa_process_alias(struct cpa_data *cpa)
697 * No need to redo, when the primary call touched the direct 700 * No need to redo, when the primary call touched the direct
698 * mapping already: 701 * mapping already:
699 */ 702 */
700 if (cpa->flags & CPA_PAGES_ARRAY) 703 if (cpa->flags & CPA_PAGES_ARRAY) {
701 vaddr = (unsigned long)page_address(cpa->pages[cpa->curpage]); 704 struct page *page = cpa->pages[cpa->curpage];
702 else if (cpa->flags & CPA_ARRAY) 705 if (unlikely(PageHighMem(page)))
706 return 0;
707 vaddr = (unsigned long)page_address(page);
708 } else if (cpa->flags & CPA_ARRAY)
703 vaddr = cpa->vaddr[cpa->curpage]; 709 vaddr = cpa->vaddr[cpa->curpage];
704 else 710 else
705 vaddr = *cpa->vaddr; 711 vaddr = *cpa->vaddr;
@@ -997,12 +1003,15 @@ EXPORT_SYMBOL(set_memory_array_uc);
997int _set_memory_wc(unsigned long addr, int numpages) 1003int _set_memory_wc(unsigned long addr, int numpages)
998{ 1004{
999 int ret; 1005 int ret;
1006 unsigned long addr_copy = addr;
1007
1000 ret = change_page_attr_set(&addr, numpages, 1008 ret = change_page_attr_set(&addr, numpages,
1001 __pgprot(_PAGE_CACHE_UC_MINUS), 0); 1009 __pgprot(_PAGE_CACHE_UC_MINUS), 0);
1002
1003 if (!ret) { 1010 if (!ret) {
1004 ret = change_page_attr_set(&addr, numpages, 1011 ret = change_page_attr_set_clr(&addr_copy, numpages,
1005 __pgprot(_PAGE_CACHE_WC), 0); 1012 __pgprot(_PAGE_CACHE_WC),
1013 __pgprot(_PAGE_CACHE_MASK),
1014 0, 0, NULL);
1006 } 1015 }
1007 return ret; 1016 return ret;
1008} 1017}
@@ -1119,7 +1128,9 @@ int set_pages_array_uc(struct page **pages, int addrinarray)
1119 int free_idx; 1128 int free_idx;
1120 1129
1121 for (i = 0; i < addrinarray; i++) { 1130 for (i = 0; i < addrinarray; i++) {
1122 start = (unsigned long)page_address(pages[i]); 1131 if (PageHighMem(pages[i]))
1132 continue;
1133 start = page_to_pfn(pages[i]) << PAGE_SHIFT;
1123 end = start + PAGE_SIZE; 1134 end = start + PAGE_SIZE;
1124 if (reserve_memtype(start, end, _PAGE_CACHE_UC_MINUS, NULL)) 1135 if (reserve_memtype(start, end, _PAGE_CACHE_UC_MINUS, NULL))
1125 goto err_out; 1136 goto err_out;
@@ -1132,7 +1143,9 @@ int set_pages_array_uc(struct page **pages, int addrinarray)
1132err_out: 1143err_out:
1133 free_idx = i; 1144 free_idx = i;
1134 for (i = 0; i < free_idx; i++) { 1145 for (i = 0; i < free_idx; i++) {
1135 start = (unsigned long)page_address(pages[i]); 1146 if (PageHighMem(pages[i]))
1147 continue;
1148 start = page_to_pfn(pages[i]) << PAGE_SHIFT;
1136 end = start + PAGE_SIZE; 1149 end = start + PAGE_SIZE;
1137 free_memtype(start, end); 1150 free_memtype(start, end);
1138 } 1151 }
@@ -1161,7 +1174,9 @@ int set_pages_array_wb(struct page **pages, int addrinarray)
1161 return retval; 1174 return retval;
1162 1175
1163 for (i = 0; i < addrinarray; i++) { 1176 for (i = 0; i < addrinarray; i++) {
1164 start = (unsigned long)page_address(pages[i]); 1177 if (PageHighMem(pages[i]))
1178 continue;
1179 start = page_to_pfn(pages[i]) << PAGE_SHIFT;
1165 end = start + PAGE_SIZE; 1180 end = start + PAGE_SIZE;
1166 free_memtype(start, end); 1181 free_memtype(start, end);
1167 } 1182 }
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index e6718bb2806..352aa9e927e 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -623,7 +623,8 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
623 return ret; 623 return ret;
624 624
625 if (flags != want_flags) { 625 if (flags != want_flags) {
626 if (strict_prot || !is_new_memtype_allowed(want_flags, flags)) { 626 if (strict_prot ||
627 !is_new_memtype_allowed(paddr, size, want_flags, flags)) {
627 free_memtype(paddr, paddr + size); 628 free_memtype(paddr, paddr + size);
628 printk(KERN_ERR "%s:%d map pfn expected mapping type %s" 629 printk(KERN_ERR "%s:%d map pfn expected mapping type %s"
629 " for %Lx-%Lx, got %s\n", 630 " for %Lx-%Lx, got %s\n",
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
index 8e43bdd4545..ed34f5e3599 100644
--- a/arch/x86/mm/pgtable.c
+++ b/arch/x86/mm/pgtable.c
@@ -25,7 +25,7 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address)
25 return pte; 25 return pte;
26} 26}
27 27
28void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte) 28void ___pte_free_tlb(struct mmu_gather *tlb, struct page *pte)
29{ 29{
30 pgtable_page_dtor(pte); 30 pgtable_page_dtor(pte);
31 paravirt_release_pte(page_to_pfn(pte)); 31 paravirt_release_pte(page_to_pfn(pte));
@@ -33,14 +33,14 @@ void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte)
33} 33}
34 34
35#if PAGETABLE_LEVELS > 2 35#if PAGETABLE_LEVELS > 2
36void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) 36void ___pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd)
37{ 37{
38 paravirt_release_pmd(__pa(pmd) >> PAGE_SHIFT); 38 paravirt_release_pmd(__pa(pmd) >> PAGE_SHIFT);
39 tlb_remove_page(tlb, virt_to_page(pmd)); 39 tlb_remove_page(tlb, virt_to_page(pmd));
40} 40}
41 41
42#if PAGETABLE_LEVELS > 3 42#if PAGETABLE_LEVELS > 3
43void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pud) 43void ___pud_free_tlb(struct mmu_gather *tlb, pud_t *pud)
44{ 44{
45 paravirt_release_pud(__pa(pud) >> PAGE_SHIFT); 45 paravirt_release_pud(__pa(pud) >> PAGE_SHIFT);
46 tlb_remove_page(tlb, virt_to_page(pud)); 46 tlb_remove_page(tlb, virt_to_page(pud));
@@ -329,7 +329,6 @@ void __init reserve_top_address(unsigned long reserve)
329 printk(KERN_INFO "Reserving virtual address space above 0x%08x\n", 329 printk(KERN_INFO "Reserving virtual address space above 0x%08x\n",
330 (int)-reserve); 330 (int)-reserve);
331 __FIXADDR_TOP = -reserve - PAGE_SIZE; 331 __FIXADDR_TOP = -reserve - PAGE_SIZE;
332 __VMALLOC_RESERVE += reserve;
333#endif 332#endif
334} 333}
335 334
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
index 2dfcbf9df2a..dbb5381f7b3 100644
--- a/arch/x86/mm/srat_64.c
+++ b/arch/x86/mm/srat_64.c
@@ -79,8 +79,10 @@ static __init void bad_srat(void)
79 acpi_numa = -1; 79 acpi_numa = -1;
80 for (i = 0; i < MAX_LOCAL_APIC; i++) 80 for (i = 0; i < MAX_LOCAL_APIC; i++)
81 apicid_to_node[i] = NUMA_NO_NODE; 81 apicid_to_node[i] = NUMA_NO_NODE;
82 for (i = 0; i < MAX_NUMNODES; i++) 82 for (i = 0; i < MAX_NUMNODES; i++) {
83 nodes_add[i].start = nodes[i].end = 0; 83 nodes[i].start = nodes[i].end = 0;
84 nodes_add[i].start = nodes_add[i].end = 0;
85 }
84 remove_all_active_ranges(); 86 remove_all_active_ranges();
85} 87}
86 88
diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile
index 172438f86a0..7410640db17 100644
--- a/arch/x86/xen/Makefile
+++ b/arch/x86/xen/Makefile
@@ -5,6 +5,10 @@ CFLAGS_REMOVE_time.o = -pg
5CFLAGS_REMOVE_irq.o = -pg 5CFLAGS_REMOVE_irq.o = -pg
6endif 6endif
7 7
8# Make sure early boot has no stackprotector
9nostackp := $(call cc-option, -fno-stack-protector)
10CFLAGS_enlighten.o := $(nostackp)
11
8obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \ 12obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \
9 time.o xen-asm.o xen-asm_$(BITS).o \ 13 time.o xen-asm.o xen-asm_$(BITS).o \
10 grant-table.o suspend.o 14 grant-table.o suspend.o
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 0a1700a2be9..e90540a46a0 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -974,10 +974,6 @@ asmlinkage void __init xen_start_kernel(void)
974 974
975 xen_domain_type = XEN_PV_DOMAIN; 975 xen_domain_type = XEN_PV_DOMAIN;
976 976
977 BUG_ON(memcmp(xen_start_info->magic, "xen-3", 5) != 0);
978
979 xen_setup_features();
980
981 /* Install Xen paravirt ops */ 977 /* Install Xen paravirt ops */
982 pv_info = xen_info; 978 pv_info = xen_info;
983 pv_init_ops = xen_init_ops; 979 pv_init_ops = xen_init_ops;
@@ -986,8 +982,15 @@ asmlinkage void __init xen_start_kernel(void)
986 pv_apic_ops = xen_apic_ops; 982 pv_apic_ops = xen_apic_ops;
987 pv_mmu_ops = xen_mmu_ops; 983 pv_mmu_ops = xen_mmu_ops;
988 984
989 xen_init_irq_ops(); 985#ifdef CONFIG_X86_64
986 /*
987 * Setup percpu state. We only need to do this for 64-bit
988 * because 32-bit already has %fs set properly.
989 */
990 load_percpu_segment(0);
991#endif
990 992
993 xen_init_irq_ops();
991 xen_init_cpuid_mask(); 994 xen_init_cpuid_mask();
992 995
993#ifdef CONFIG_X86_LOCAL_APIC 996#ifdef CONFIG_X86_LOCAL_APIC
@@ -997,6 +1000,8 @@ asmlinkage void __init xen_start_kernel(void)
997 set_xen_basic_apic_ops(); 1000 set_xen_basic_apic_ops();
998#endif 1001#endif
999 1002
1003 xen_setup_features();
1004
1000 if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) { 1005 if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) {
1001 pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start; 1006 pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start;
1002 pv_mmu_ops.ptep_modify_prot_commit = xen_ptep_modify_prot_commit; 1007 pv_mmu_ops.ptep_modify_prot_commit = xen_ptep_modify_prot_commit;
@@ -1004,13 +1009,6 @@ asmlinkage void __init xen_start_kernel(void)
1004 1009
1005 machine_ops = xen_machine_ops; 1010 machine_ops = xen_machine_ops;
1006 1011
1007#ifdef CONFIG_X86_64
1008 /*
1009 * Setup percpu state. We only need to do this for 64-bit
1010 * because 32-bit already has %fs set properly.
1011 */
1012 load_percpu_segment(0);
1013#endif
1014 /* 1012 /*
1015 * The only reliable way to retain the initial address of the 1013 * The only reliable way to retain the initial address of the
1016 * percpu gdt_page is to remember it here, so we can go and 1014 * percpu gdt_page is to remember it here, so we can go and
diff --git a/arch/xtensa/include/asm/tlb.h b/arch/xtensa/include/asm/tlb.h
index 31c220faca0..0d766f9c108 100644
--- a/arch/xtensa/include/asm/tlb.h
+++ b/arch/xtensa/include/asm/tlb.h
@@ -42,6 +42,6 @@
42 42
43#include <asm-generic/tlb.h> 43#include <asm-generic/tlb.h>
44 44
45#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, pte) 45#define __pte_free_tlb(tlb, pte, address) pte_free((tlb)->mm, pte)
46 46
47#endif /* _XTENSA_TLB_H */ 47#endif /* _XTENSA_TLB_H */
diff --git a/block/Kconfig b/block/Kconfig
index 95a86adc33a..9be0b56eaee 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -48,9 +48,9 @@ config LBDAF
48 If unsure, say Y. 48 If unsure, say Y.
49 49
50config BLK_DEV_BSG 50config BLK_DEV_BSG
51 bool "Block layer SG support v4 (EXPERIMENTAL)" 51 bool "Block layer SG support v4"
52 depends on EXPERIMENTAL 52 default y
53 ---help--- 53 help
54 Saying Y here will enable generic SG (SCSI generic) v4 support 54 Saying Y here will enable generic SG (SCSI generic) v4 support
55 for any block device. 55 for any block device.
56 56
@@ -60,7 +60,10 @@ config BLK_DEV_BSG
60 protocols (e.g. Task Management Functions and SMP in Serial 60 protocols (e.g. Task Management Functions and SMP in Serial
61 Attached SCSI). 61 Attached SCSI).
62 62
63 If unsure, say N. 63 This option is required by recent UDEV versions to properly
64 access device serial numbers, etc.
65
66 If unsure, say Y.
64 67
65config BLK_DEV_INTEGRITY 68config BLK_DEV_INTEGRITY
66 bool "Block layer data integrity support" 69 bool "Block layer data integrity support"
diff --git a/block/blk-core.c b/block/blk-core.c
index 4b45435c6ea..e3299a77a0d 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -575,13 +575,6 @@ blk_init_queue_node(request_fn_proc *rfn, spinlock_t *lock, int node_id)
575 return NULL; 575 return NULL;
576 } 576 }
577 577
578 /*
579 * if caller didn't supply a lock, they get per-queue locking with
580 * our embedded lock
581 */
582 if (!lock)
583 lock = &q->__queue_lock;
584
585 q->request_fn = rfn; 578 q->request_fn = rfn;
586 q->prep_rq_fn = NULL; 579 q->prep_rq_fn = NULL;
587 q->unplug_fn = generic_unplug_device; 580 q->unplug_fn = generic_unplug_device;
@@ -2143,7 +2136,7 @@ bool blk_end_request(struct request *rq, int error, unsigned int nr_bytes)
2143{ 2136{
2144 return blk_end_bidi_request(rq, error, nr_bytes, 0); 2137 return blk_end_bidi_request(rq, error, nr_bytes, 0);
2145} 2138}
2146EXPORT_SYMBOL_GPL(blk_end_request); 2139EXPORT_SYMBOL(blk_end_request);
2147 2140
2148/** 2141/**
2149 * blk_end_request_all - Helper function for drives to finish the request. 2142 * blk_end_request_all - Helper function for drives to finish the request.
@@ -2164,7 +2157,7 @@ void blk_end_request_all(struct request *rq, int error)
2164 pending = blk_end_bidi_request(rq, error, blk_rq_bytes(rq), bidi_bytes); 2157 pending = blk_end_bidi_request(rq, error, blk_rq_bytes(rq), bidi_bytes);
2165 BUG_ON(pending); 2158 BUG_ON(pending);
2166} 2159}
2167EXPORT_SYMBOL_GPL(blk_end_request_all); 2160EXPORT_SYMBOL(blk_end_request_all);
2168 2161
2169/** 2162/**
2170 * blk_end_request_cur - Helper function to finish the current request chunk. 2163 * blk_end_request_cur - Helper function to finish the current request chunk.
@@ -2182,7 +2175,7 @@ bool blk_end_request_cur(struct request *rq, int error)
2182{ 2175{
2183 return blk_end_request(rq, error, blk_rq_cur_bytes(rq)); 2176 return blk_end_request(rq, error, blk_rq_cur_bytes(rq));
2184} 2177}
2185EXPORT_SYMBOL_GPL(blk_end_request_cur); 2178EXPORT_SYMBOL(blk_end_request_cur);
2186 2179
2187/** 2180/**
2188 * __blk_end_request - Helper function for drivers to complete the request. 2181 * __blk_end_request - Helper function for drivers to complete the request.
@@ -2201,7 +2194,7 @@ bool __blk_end_request(struct request *rq, int error, unsigned int nr_bytes)
2201{ 2194{
2202 return __blk_end_bidi_request(rq, error, nr_bytes, 0); 2195 return __blk_end_bidi_request(rq, error, nr_bytes, 0);
2203} 2196}
2204EXPORT_SYMBOL_GPL(__blk_end_request); 2197EXPORT_SYMBOL(__blk_end_request);
2205 2198
2206/** 2199/**
2207 * __blk_end_request_all - Helper function for drives to finish the request. 2200 * __blk_end_request_all - Helper function for drives to finish the request.
@@ -2222,7 +2215,7 @@ void __blk_end_request_all(struct request *rq, int error)
2222 pending = __blk_end_bidi_request(rq, error, blk_rq_bytes(rq), bidi_bytes); 2215 pending = __blk_end_bidi_request(rq, error, blk_rq_bytes(rq), bidi_bytes);
2223 BUG_ON(pending); 2216 BUG_ON(pending);
2224} 2217}
2225EXPORT_SYMBOL_GPL(__blk_end_request_all); 2218EXPORT_SYMBOL(__blk_end_request_all);
2226 2219
2227/** 2220/**
2228 * __blk_end_request_cur - Helper function to finish the current request chunk. 2221 * __blk_end_request_cur - Helper function to finish the current request chunk.
@@ -2241,7 +2234,7 @@ bool __blk_end_request_cur(struct request *rq, int error)
2241{ 2234{
2242 return __blk_end_request(rq, error, blk_rq_cur_bytes(rq)); 2235 return __blk_end_request(rq, error, blk_rq_cur_bytes(rq));
2243} 2236}
2244EXPORT_SYMBOL_GPL(__blk_end_request_cur); 2237EXPORT_SYMBOL(__blk_end_request_cur);
2245 2238
2246void blk_rq_bio_prep(struct request_queue *q, struct request *rq, 2239void blk_rq_bio_prep(struct request_queue *q, struct request *rq,
2247 struct bio *bio) 2240 struct bio *bio)
diff --git a/block/blk-integrity.c b/block/blk-integrity.c
index 73e28d35568..15c630813b1 100644
--- a/block/blk-integrity.c
+++ b/block/blk-integrity.c
@@ -379,6 +379,7 @@ void blk_integrity_unregister(struct gendisk *disk)
379 379
380 kobject_uevent(&bi->kobj, KOBJ_REMOVE); 380 kobject_uevent(&bi->kobj, KOBJ_REMOVE);
381 kobject_del(&bi->kobj); 381 kobject_del(&bi->kobj);
382 kobject_put(&bi->kobj);
382 kmem_cache_free(integrity_cachep, bi); 383 kmem_cache_free(integrity_cachep, bi);
383 disk->integrity = NULL; 384 disk->integrity = NULL;
384} 385}
diff --git a/block/blk-settings.c b/block/blk-settings.c
index bd582a7f531..476d8706507 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -7,6 +7,7 @@
7#include <linux/bio.h> 7#include <linux/bio.h>
8#include <linux/blkdev.h> 8#include <linux/blkdev.h>
9#include <linux/bootmem.h> /* for max_pfn/max_low_pfn */ 9#include <linux/bootmem.h> /* for max_pfn/max_low_pfn */
10#include <linux/gcd.h>
10 11
11#include "blk.h" 12#include "blk.h"
12 13
@@ -165,6 +166,13 @@ void blk_queue_make_request(struct request_queue *q, make_request_fn *mfn)
165 blk_set_default_limits(&q->limits); 166 blk_set_default_limits(&q->limits);
166 167
167 /* 168 /*
169 * If the caller didn't supply a lock, fall back to our embedded
170 * per-queue locks
171 */
172 if (!q->queue_lock)
173 q->queue_lock = &q->__queue_lock;
174
175 /*
168 * by default assume old behaviour and bounce for any highmem page 176 * by default assume old behaviour and bounce for any highmem page
169 */ 177 */
170 blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH); 178 blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);
@@ -377,8 +385,8 @@ void blk_queue_alignment_offset(struct request_queue *q, unsigned int offset)
377EXPORT_SYMBOL(blk_queue_alignment_offset); 385EXPORT_SYMBOL(blk_queue_alignment_offset);
378 386
379/** 387/**
380 * blk_queue_io_min - set minimum request size for the queue 388 * blk_limits_io_min - set minimum request size for a device
381 * @q: the request queue for the device 389 * @limits: the queue limits
382 * @min: smallest I/O size in bytes 390 * @min: smallest I/O size in bytes
383 * 391 *
384 * Description: 392 * Description:
@@ -387,15 +395,35 @@ EXPORT_SYMBOL(blk_queue_alignment_offset);
387 * smallest I/O the device can perform without incurring a performance 395 * smallest I/O the device can perform without incurring a performance
388 * penalty. 396 * penalty.
389 */ 397 */
390void blk_queue_io_min(struct request_queue *q, unsigned int min) 398void blk_limits_io_min(struct queue_limits *limits, unsigned int min)
391{ 399{
392 q->limits.io_min = min; 400 limits->io_min = min;
393 401
394 if (q->limits.io_min < q->limits.logical_block_size) 402 if (limits->io_min < limits->logical_block_size)
395 q->limits.io_min = q->limits.logical_block_size; 403 limits->io_min = limits->logical_block_size;
396 404
397 if (q->limits.io_min < q->limits.physical_block_size) 405 if (limits->io_min < limits->physical_block_size)
398 q->limits.io_min = q->limits.physical_block_size; 406 limits->io_min = limits->physical_block_size;
407}
408EXPORT_SYMBOL(blk_limits_io_min);
409
410/**
411 * blk_queue_io_min - set minimum request size for the queue
412 * @q: the request queue for the device
413 * @min: smallest I/O size in bytes
414 *
415 * Description:
416 * Storage devices may report a granularity or preferred minimum I/O
417 * size which is the smallest request the device can perform without
418 * incurring a performance penalty. For disk drives this is often the
419 * physical block size. For RAID arrays it is often the stripe chunk
420 * size. A properly aligned multiple of minimum_io_size is the
421 * preferred request size for workloads where a high number of I/O
422 * operations is desired.
423 */
424void blk_queue_io_min(struct request_queue *q, unsigned int min)
425{
426 blk_limits_io_min(&q->limits, min);
399} 427}
400EXPORT_SYMBOL(blk_queue_io_min); 428EXPORT_SYMBOL(blk_queue_io_min);
401 429
@@ -405,8 +433,12 @@ EXPORT_SYMBOL(blk_queue_io_min);
405 * @opt: optimal request size in bytes 433 * @opt: optimal request size in bytes
406 * 434 *
407 * Description: 435 * Description:
408 * Drivers can call this function to set the preferred I/O request 436 * Storage devices may report an optimal I/O size, which is the
409 * size for devices that report such a value. 437 * device's preferred unit for sustained I/O. This is rarely reported
438 * for disk drives. For RAID arrays it is usually the stripe width or
439 * the internal track size. A properly aligned multiple of
440 * optimal_io_size is the preferred request size for workloads where
441 * sustained throughput is desired.
410 */ 442 */
411void blk_queue_io_opt(struct request_queue *q, unsigned int opt) 443void blk_queue_io_opt(struct request_queue *q, unsigned int opt)
412{ 444{
@@ -426,27 +458,7 @@ EXPORT_SYMBOL(blk_queue_io_opt);
426 **/ 458 **/
427void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b) 459void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b)
428{ 460{
429 /* zero is "infinity" */ 461 blk_stack_limits(&t->limits, &b->limits, 0);
430 t->limits.max_sectors = min_not_zero(queue_max_sectors(t),
431 queue_max_sectors(b));
432
433 t->limits.max_hw_sectors = min_not_zero(queue_max_hw_sectors(t),
434 queue_max_hw_sectors(b));
435
436 t->limits.seg_boundary_mask = min_not_zero(queue_segment_boundary(t),
437 queue_segment_boundary(b));
438
439 t->limits.max_phys_segments = min_not_zero(queue_max_phys_segments(t),
440 queue_max_phys_segments(b));
441
442 t->limits.max_hw_segments = min_not_zero(queue_max_hw_segments(t),
443 queue_max_hw_segments(b));
444
445 t->limits.max_segment_size = min_not_zero(queue_max_segment_size(t),
446 queue_max_segment_size(b));
447
448 t->limits.logical_block_size = max(queue_logical_block_size(t),
449 queue_logical_block_size(b));
450 462
451 if (!t->queue_lock) 463 if (!t->queue_lock)
452 WARN_ON_ONCE(1); 464 WARN_ON_ONCE(1);
@@ -516,6 +528,16 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
516 return -1; 528 return -1;
517 } 529 }
518 530
531 /* Find lcm() of optimal I/O size */
532 if (t->io_opt && b->io_opt)
533 t->io_opt = (t->io_opt * b->io_opt) / gcd(t->io_opt, b->io_opt);
534 else if (b->io_opt)
535 t->io_opt = b->io_opt;
536
537 /* Verify that optimal I/O size is a multiple of io_min */
538 if (t->io_min && t->io_opt % t->io_min)
539 return -1;
540
519 return 0; 541 return 0;
520} 542}
521EXPORT_SYMBOL(blk_stack_limits); 543EXPORT_SYMBOL(blk_stack_limits);
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index b1cd04087d6..418d6361968 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -16,9 +16,9 @@ struct queue_sysfs_entry {
16}; 16};
17 17
18static ssize_t 18static ssize_t
19queue_var_show(unsigned int var, char *page) 19queue_var_show(unsigned long var, char *page)
20{ 20{
21 return sprintf(page, "%d\n", var); 21 return sprintf(page, "%lu\n", var);
22} 22}
23 23
24static ssize_t 24static ssize_t
@@ -77,7 +77,8 @@ queue_requests_store(struct request_queue *q, const char *page, size_t count)
77 77
78static ssize_t queue_ra_show(struct request_queue *q, char *page) 78static ssize_t queue_ra_show(struct request_queue *q, char *page)
79{ 79{
80 int ra_kb = q->backing_dev_info.ra_pages << (PAGE_CACHE_SHIFT - 10); 80 unsigned long ra_kb = q->backing_dev_info.ra_pages <<
81 (PAGE_CACHE_SHIFT - 10);
81 82
82 return queue_var_show(ra_kb, (page)); 83 return queue_var_show(ra_kb, (page));
83} 84}
@@ -189,9 +190,9 @@ static ssize_t queue_nomerges_store(struct request_queue *q, const char *page,
189 190
190static ssize_t queue_rq_affinity_show(struct request_queue *q, char *page) 191static ssize_t queue_rq_affinity_show(struct request_queue *q, char *page)
191{ 192{
192 unsigned int set = test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags); 193 bool set = test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags);
193 194
194 return queue_var_show(set != 0, page); 195 return queue_var_show(set, page);
195} 196}
196 197
197static ssize_t 198static ssize_t
diff --git a/block/elevator.c b/block/elevator.c
index 6f2375339a9..2d511f9105e 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -101,11 +101,16 @@ int elv_rq_merge_ok(struct request *rq, struct bio *bio)
101 return 0; 101 return 0;
102 102
103 /* 103 /*
104 * Don't merge if failfast settings don't match 104 * Don't merge if failfast settings don't match.
105 *
106 * FIXME: The negation in front of each condition is necessary
107 * because bio and request flags use different bit positions
108 * and the accessors return those bits directly. This
109 * ugliness will soon go away.
105 */ 110 */
106 if (bio_failfast_dev(bio) != blk_failfast_dev(rq) || 111 if (!bio_failfast_dev(bio) != !blk_failfast_dev(rq) ||
107 bio_failfast_transport(bio) != blk_failfast_transport(rq) || 112 !bio_failfast_transport(bio) != !blk_failfast_transport(rq) ||
108 bio_failfast_driver(bio) != blk_failfast_driver(rq)) 113 !bio_failfast_driver(bio) != !blk_failfast_driver(rq))
109 return 0; 114 return 0;
110 115
111 if (!elv_iosched_allow_merge(rq, bio)) 116 if (!elv_iosched_allow_merge(rq, bio))
diff --git a/crypto/async_tx/async_xor.c b/crypto/async_tx/async_xor.c
index 95fe2c8d6c5..90dd3f8bd28 100644
--- a/crypto/async_tx/async_xor.c
+++ b/crypto/async_tx/async_xor.c
@@ -300,7 +300,7 @@ EXPORT_SYMBOL_GPL(async_xor_zero_sum);
300 300
301static int __init async_xor_init(void) 301static int __init async_xor_init(void)
302{ 302{
303 #ifdef CONFIG_DMA_ENGINE 303 #ifdef CONFIG_ASYNC_TX_DMA
304 /* To conserve stack space the input src_list (array of page pointers) 304 /* To conserve stack space the input src_list (array of page pointers)
305 * is reused to hold the array of dma addresses passed to the driver. 305 * is reused to hold the array of dma addresses passed to the driver.
306 * This conversion is only possible when dma_addr_t is less than the 306 * This conversion is only possible when dma_addr_t is less than the
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index 7a0f4aa4fa1..9a62224cc27 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -38,6 +38,9 @@
38 38
39#define _COMPONENT ACPI_MEMORY_DEVICE_COMPONENT 39#define _COMPONENT ACPI_MEMORY_DEVICE_COMPONENT
40 40
41#undef PREFIX
42#define PREFIX "ACPI:memory_hp:"
43
41ACPI_MODULE_NAME("acpi_memhotplug"); 44ACPI_MODULE_NAME("acpi_memhotplug");
42MODULE_AUTHOR("Naveen B S <naveen.b.s@intel.com>"); 45MODULE_AUTHOR("Naveen B S <naveen.b.s@intel.com>");
43MODULE_DESCRIPTION("Hotplug Mem Driver"); 46MODULE_DESCRIPTION("Hotplug Mem Driver");
@@ -153,6 +156,7 @@ acpi_memory_get_device(acpi_handle handle,
153 acpi_handle phandle; 156 acpi_handle phandle;
154 struct acpi_device *device = NULL; 157 struct acpi_device *device = NULL;
155 struct acpi_device *pdevice = NULL; 158 struct acpi_device *pdevice = NULL;
159 int result;
156 160
157 161
158 if (!acpi_bus_get_device(handle, &device) && device) 162 if (!acpi_bus_get_device(handle, &device) && device)
@@ -165,9 +169,9 @@ acpi_memory_get_device(acpi_handle handle,
165 } 169 }
166 170
167 /* Get the parent device */ 171 /* Get the parent device */
168 status = acpi_bus_get_device(phandle, &pdevice); 172 result = acpi_bus_get_device(phandle, &pdevice);
169 if (ACPI_FAILURE(status)) { 173 if (result) {
170 ACPI_EXCEPTION((AE_INFO, status, "Cannot get acpi bus device")); 174 printk(KERN_WARNING PREFIX "Cannot get acpi bus device");
171 return -EINVAL; 175 return -EINVAL;
172 } 176 }
173 177
@@ -175,9 +179,9 @@ acpi_memory_get_device(acpi_handle handle,
175 * Now add the notified device. This creates the acpi_device 179 * Now add the notified device. This creates the acpi_device
176 * and invokes .add function 180 * and invokes .add function
177 */ 181 */
178 status = acpi_bus_add(&device, pdevice, handle, ACPI_BUS_TYPE_DEVICE); 182 result = acpi_bus_add(&device, pdevice, handle, ACPI_BUS_TYPE_DEVICE);
179 if (ACPI_FAILURE(status)) { 183 if (result) {
180 ACPI_EXCEPTION((AE_INFO, status, "Cannot add acpi bus")); 184 printk(KERN_WARNING PREFIX "Cannot add acpi bus");
181 return -EINVAL; 185 return -EINVAL;
182 } 186 }
183 187
@@ -238,7 +242,12 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
238 num_enabled++; 242 num_enabled++;
239 continue; 243 continue;
240 } 244 }
241 245 /*
246 * If the memory block size is zero, please ignore it.
247 * Don't try to do the following memory hotplug flowchart.
248 */
249 if (!info->length)
250 continue;
242 if (node < 0) 251 if (node < 0)
243 node = memory_add_physaddr_to_nid(info->start_addr); 252 node = memory_add_physaddr_to_nid(info->start_addr);
244 253
@@ -253,8 +262,15 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
253 mem_device->state = MEMORY_INVALID_STATE; 262 mem_device->state = MEMORY_INVALID_STATE;
254 return -EINVAL; 263 return -EINVAL;
255 } 264 }
256 265 /*
257 return result; 266 * Sometimes the memory device will contain several memory blocks.
267 * When one memory block is hot-added to the system memory, it will
268 * be regarded as a success.
269 * Otherwise if the last memory block can't be hot-added to the system
270 * memory, it will be failure and the memory device can't be bound with
271 * driver.
272 */
273 return 0;
258} 274}
259 275
260static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device) 276static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device)
diff --git a/drivers/acpi/acpica/acobject.h b/drivers/acpi/acpica/acobject.h
index 544dcf83492..eb6f038b03d 100644
--- a/drivers/acpi/acpica/acobject.h
+++ b/drivers/acpi/acpica/acobject.h
@@ -97,6 +97,7 @@
97#define AOPOBJ_OBJECT_INITIALIZED 0x08 97#define AOPOBJ_OBJECT_INITIALIZED 0x08
98#define AOPOBJ_SETUP_COMPLETE 0x10 98#define AOPOBJ_SETUP_COMPLETE 0x10
99#define AOPOBJ_SINGLE_DATUM 0x20 99#define AOPOBJ_SINGLE_DATUM 0x20
100#define AOPOBJ_INVALID 0x40 /* Used if host OS won't allow an op_region address */
100 101
101/****************************************************************************** 102/******************************************************************************
102 * 103 *
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c
index 584d766e6f1..b79978f7bc7 100644
--- a/drivers/acpi/acpica/dsopcode.c
+++ b/drivers/acpi/acpica/dsopcode.c
@@ -397,6 +397,30 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc)
397 status = acpi_ds_execute_arguments(node, acpi_ns_get_parent_node(node), 397 status = acpi_ds_execute_arguments(node, acpi_ns_get_parent_node(node),
398 extra_desc->extra.aml_length, 398 extra_desc->extra.aml_length,
399 extra_desc->extra.aml_start); 399 extra_desc->extra.aml_start);
400 if (ACPI_FAILURE(status)) {
401 return_ACPI_STATUS(status);
402 }
403
404 /* Validate the region address/length via the host OS */
405
406 status = acpi_os_validate_address(obj_desc->region.space_id,
407 obj_desc->region.address,
408 (acpi_size) obj_desc->region.length,
409 acpi_ut_get_node_name(node));
410
411 if (ACPI_FAILURE(status)) {
412 /*
413 * Invalid address/length. We will emit an error message and mark
414 * the region as invalid, so that it will cause an additional error if
415 * it is ever used. Then return AE_OK.
416 */
417 ACPI_EXCEPTION((AE_INFO, status,
418 "During address validation of OpRegion [%4.4s]",
419 node->name.ascii));
420 obj_desc->common.flags |= AOPOBJ_INVALID;
421 status = AE_OK;
422 }
423
400 return_ACPI_STATUS(status); 424 return_ACPI_STATUS(status);
401} 425}
402 426
diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c
index d4075b82102..6687be167f5 100644
--- a/drivers/acpi/acpica/exfldio.c
+++ b/drivers/acpi/acpica/exfldio.c
@@ -113,6 +113,12 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
113 } 113 }
114 } 114 }
115 115
116 /* Exit if Address/Length have been disallowed by the host OS */
117
118 if (rgn_desc->common.flags & AOPOBJ_INVALID) {
119 return_ACPI_STATUS(AE_AML_ILLEGAL_ADDRESS);
120 }
121
116 /* 122 /*
117 * Exit now for SMBus address space, it has a non-linear address space 123 * Exit now for SMBus address space, it has a non-linear address space
118 * and the request cannot be directly validated 124 * and the request cannot be directly validated
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 71670719d61..5691f165a95 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -189,11 +189,36 @@ acpi_status __init acpi_os_initialize(void)
189 return AE_OK; 189 return AE_OK;
190} 190}
191 191
192static void bind_to_cpu0(struct work_struct *work)
193{
194 set_cpus_allowed(current, cpumask_of_cpu(0));
195 kfree(work);
196}
197
198static void bind_workqueue(struct workqueue_struct *wq)
199{
200 struct work_struct *work;
201
202 work = kzalloc(sizeof(struct work_struct), GFP_KERNEL);
203 INIT_WORK(work, bind_to_cpu0);
204 queue_work(wq, work);
205}
206
192acpi_status acpi_os_initialize1(void) 207acpi_status acpi_os_initialize1(void)
193{ 208{
209 /*
210 * On some machines, a software-initiated SMI causes corruption unless
211 * the SMI runs on CPU 0. An SMI can be initiated by any AML, but
212 * typically it's done in GPE-related methods that are run via
213 * workqueues, so we can avoid the known corruption cases by binding
214 * the workqueues to CPU 0.
215 */
194 kacpid_wq = create_singlethread_workqueue("kacpid"); 216 kacpid_wq = create_singlethread_workqueue("kacpid");
217 bind_workqueue(kacpid_wq);
195 kacpi_notify_wq = create_singlethread_workqueue("kacpi_notify"); 218 kacpi_notify_wq = create_singlethread_workqueue("kacpi_notify");
219 bind_workqueue(kacpi_notify_wq);
196 kacpi_hotplug_wq = create_singlethread_workqueue("kacpi_hotplug"); 220 kacpi_hotplug_wq = create_singlethread_workqueue("kacpi_hotplug");
221 bind_workqueue(kacpi_hotplug_wq);
197 BUG_ON(!kacpid_wq); 222 BUG_ON(!kacpid_wq);
198 BUG_ON(!kacpi_notify_wq); 223 BUG_ON(!kacpi_notify_wq);
199 BUG_ON(!kacpi_hotplug_wq); 224 BUG_ON(!kacpi_hotplug_wq);
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 01574a06653..42159a28f43 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -397,6 +397,14 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
397 }, 397 },
398 }, 398 },
399 { 399 {
400 .callback = init_set_sci_en_on_resume,
401 .ident = "Hewlett-Packard HP G7000 Notebook PC",
402 .matches = {
403 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
404 DMI_MATCH(DMI_PRODUCT_NAME, "HP G7000 Notebook PC"),
405 },
406 },
407 {
400 .callback = init_old_suspend_ordering, 408 .callback = init_old_suspend_ordering,
401 .ident = "Panasonic CF51-2L", 409 .ident = "Panasonic CF51-2L",
402 .matches = { 410 .matches = {
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c
index 0944daec064..9c61ab2177c 100644
--- a/drivers/acpi/system.c
+++ b/drivers/acpi/system.c
@@ -121,7 +121,7 @@ static void acpi_table_attr_init(struct acpi_table_attr *table_attr,
121 table_attr->attr.size = 0; 121 table_attr->attr.size = 0;
122 table_attr->attr.read = acpi_table_show; 122 table_attr->attr.read = acpi_table_show;
123 table_attr->attr.attr.name = table_attr->name; 123 table_attr->attr.attr.name = table_attr->name;
124 table_attr->attr.attr.mode = 0444; 124 table_attr->attr.attr.mode = 0400;
125 125
126 return; 126 return;
127} 127}
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 336eb1ed73c..fe3eba5d6b3 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -219,6 +219,8 @@ enum {
219 AHCI_HFLAG_SECT255 = (1 << 8), /* max 255 sectors */ 219 AHCI_HFLAG_SECT255 = (1 << 8), /* max 255 sectors */
220 AHCI_HFLAG_YES_NCQ = (1 << 9), /* force NCQ cap on */ 220 AHCI_HFLAG_YES_NCQ = (1 << 9), /* force NCQ cap on */
221 AHCI_HFLAG_NO_SUSPEND = (1 << 10), /* don't suspend */ 221 AHCI_HFLAG_NO_SUSPEND = (1 << 10), /* don't suspend */
222 AHCI_HFLAG_SRST_TOUT_IS_OFFLINE = (1 << 11), /* treat SRST timeout as
223 link offline */
222 224
223 /* ap->flags bits */ 225 /* ap->flags bits */
224 226
@@ -515,10 +517,14 @@ static const struct pci_device_id ahci_pci_tbl[] = {
515 { PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */ 517 { PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */
516 { PCI_VDEVICE(INTEL, 0x3a22), board_ahci }, /* ICH10 */ 518 { PCI_VDEVICE(INTEL, 0x3a22), board_ahci }, /* ICH10 */
517 { PCI_VDEVICE(INTEL, 0x3a25), board_ahci }, /* ICH10 */ 519 { PCI_VDEVICE(INTEL, 0x3a25), board_ahci }, /* ICH10 */
520 { PCI_VDEVICE(INTEL, 0x3b22), board_ahci }, /* PCH AHCI */
521 { PCI_VDEVICE(INTEL, 0x3b23), board_ahci }, /* PCH AHCI */
518 { PCI_VDEVICE(INTEL, 0x3b24), board_ahci }, /* PCH RAID */ 522 { PCI_VDEVICE(INTEL, 0x3b24), board_ahci }, /* PCH RAID */
519 { PCI_VDEVICE(INTEL, 0x3b25), board_ahci }, /* PCH RAID */ 523 { PCI_VDEVICE(INTEL, 0x3b25), board_ahci }, /* PCH RAID */
524 { PCI_VDEVICE(INTEL, 0x3b29), board_ahci }, /* PCH AHCI */
520 { PCI_VDEVICE(INTEL, 0x3b2b), board_ahci }, /* PCH RAID */ 525 { PCI_VDEVICE(INTEL, 0x3b2b), board_ahci }, /* PCH RAID */
521 { PCI_VDEVICE(INTEL, 0x3b2c), board_ahci }, /* PCH RAID */ 526 { PCI_VDEVICE(INTEL, 0x3b2c), board_ahci }, /* PCH RAID */
527 { PCI_VDEVICE(INTEL, 0x3b2f), board_ahci }, /* PCH AHCI */
522 528
523 /* JMicron 360/1/3/5/6, match class to avoid IDE function */ 529 /* JMicron 360/1/3/5/6, match class to avoid IDE function */
524 { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 530 { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
@@ -1659,6 +1665,7 @@ static int ahci_do_softreset(struct ata_link *link, unsigned int *class,
1659 int (*check_ready)(struct ata_link *link)) 1665 int (*check_ready)(struct ata_link *link))
1660{ 1666{
1661 struct ata_port *ap = link->ap; 1667 struct ata_port *ap = link->ap;
1668 struct ahci_host_priv *hpriv = ap->host->private_data;
1662 const char *reason = NULL; 1669 const char *reason = NULL;
1663 unsigned long now, msecs; 1670 unsigned long now, msecs;
1664 struct ata_taskfile tf; 1671 struct ata_taskfile tf;
@@ -1697,12 +1704,21 @@ static int ahci_do_softreset(struct ata_link *link, unsigned int *class,
1697 1704
1698 /* wait for link to become ready */ 1705 /* wait for link to become ready */
1699 rc = ata_wait_after_reset(link, deadline, check_ready); 1706 rc = ata_wait_after_reset(link, deadline, check_ready);
1700 /* link occupied, -ENODEV too is an error */ 1707 if (rc == -EBUSY && hpriv->flags & AHCI_HFLAG_SRST_TOUT_IS_OFFLINE) {
1701 if (rc) { 1708 /*
1709 * Workaround for cases where link online status can't
1710 * be trusted. Treat device readiness timeout as link
1711 * offline.
1712 */
1713 ata_link_printk(link, KERN_INFO,
1714 "device not ready, treating as offline\n");
1715 *class = ATA_DEV_NONE;
1716 } else if (rc) {
1717 /* link occupied, -ENODEV too is an error */
1702 reason = "device not ready"; 1718 reason = "device not ready";
1703 goto fail; 1719 goto fail;
1704 } 1720 } else
1705 *class = ahci_dev_classify(ap); 1721 *class = ahci_dev_classify(ap);
1706 1722
1707 DPRINTK("EXIT, class=%u\n", *class); 1723 DPRINTK("EXIT, class=%u\n", *class);
1708 return 0; 1724 return 0;
@@ -1769,7 +1785,8 @@ static int ahci_sb600_softreset(struct ata_link *link, unsigned int *class,
1769 irq_sts = readl(port_mmio + PORT_IRQ_STAT); 1785 irq_sts = readl(port_mmio + PORT_IRQ_STAT);
1770 if (irq_sts & PORT_IRQ_BAD_PMP) { 1786 if (irq_sts & PORT_IRQ_BAD_PMP) {
1771 ata_link_printk(link, KERN_WARNING, 1787 ata_link_printk(link, KERN_WARNING,
1772 "failed due to HW bug, retry pmp=0\n"); 1788 "applying SB600 PMP SRST workaround "
1789 "and retrying\n");
1773 rc = ahci_do_softreset(link, class, 0, deadline, 1790 rc = ahci_do_softreset(link, class, 0, deadline,
1774 ahci_check_ready); 1791 ahci_check_ready);
1775 } 1792 }
@@ -2722,6 +2739,56 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
2722 return !ver || strcmp(ver, dmi->driver_data) < 0; 2739 return !ver || strcmp(ver, dmi->driver_data) < 0;
2723} 2740}
2724 2741
2742static bool ahci_broken_online(struct pci_dev *pdev)
2743{
2744#define ENCODE_BUSDEVFN(bus, slot, func) \
2745 (void *)(unsigned long)(((bus) << 8) | PCI_DEVFN((slot), (func)))
2746 static const struct dmi_system_id sysids[] = {
2747 /*
2748 * There are several gigabyte boards which use
2749 * SIMG5723s configured as hardware RAID. Certain
2750 * 5723 firmware revisions shipped there keep the link
2751 * online but fail to answer properly to SRST or
2752 * IDENTIFY when no device is attached downstream
2753 * causing libata to retry quite a few times leading
2754 * to excessive detection delay.
2755 *
2756 * As these firmwares respond to the second reset try
2757 * with invalid device signature, considering unknown
2758 * sig as offline works around the problem acceptably.
2759 */
2760 {
2761 .ident = "EP45-DQ6",
2762 .matches = {
2763 DMI_MATCH(DMI_BOARD_VENDOR,
2764 "Gigabyte Technology Co., Ltd."),
2765 DMI_MATCH(DMI_BOARD_NAME, "EP45-DQ6"),
2766 },
2767 .driver_data = ENCODE_BUSDEVFN(0x0a, 0x00, 0),
2768 },
2769 {
2770 .ident = "EP45-DS5",
2771 .matches = {
2772 DMI_MATCH(DMI_BOARD_VENDOR,
2773 "Gigabyte Technology Co., Ltd."),
2774 DMI_MATCH(DMI_BOARD_NAME, "EP45-DS5"),
2775 },
2776 .driver_data = ENCODE_BUSDEVFN(0x03, 0x00, 0),
2777 },
2778 { } /* terminate list */
2779 };
2780#undef ENCODE_BUSDEVFN
2781 const struct dmi_system_id *dmi = dmi_first_match(sysids);
2782 unsigned int val;
2783
2784 if (!dmi)
2785 return false;
2786
2787 val = (unsigned long)dmi->driver_data;
2788
2789 return pdev->bus->number == (val >> 8) && pdev->devfn == (val & 0xff);
2790}
2791
2725static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) 2792static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2726{ 2793{
2727 static int printed_version; 2794 static int printed_version;
@@ -2837,6 +2904,12 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2837 "BIOS update required for suspend/resume\n"); 2904 "BIOS update required for suspend/resume\n");
2838 } 2905 }
2839 2906
2907 if (ahci_broken_online(pdev)) {
2908 hpriv->flags |= AHCI_HFLAG_SRST_TOUT_IS_OFFLINE;
2909 dev_info(&pdev->dev,
2910 "online status unreliable, applying workaround\n");
2911 }
2912
2840 /* CAP.NP sometimes indicate the index of the last enabled 2913 /* CAP.NP sometimes indicate the index of the last enabled
2841 * port, at other times, that of the last possible port, so 2914 * port, at other times, that of the last possible port, so
2842 * determining the maximum port number requires looking at 2915 * determining the maximum port number requires looking at
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index d0a14cf2bd7..56b8a3ff128 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -596,9 +596,12 @@ static const struct ich_laptop ich_laptop[] = {
596 { 0x27DF, 0x0005, 0x0280 }, /* ICH7 on Acer 5602WLMi */ 596 { 0x27DF, 0x0005, 0x0280 }, /* ICH7 on Acer 5602WLMi */
597 { 0x27DF, 0x1025, 0x0102 }, /* ICH7 on Acer 5602aWLMi */ 597 { 0x27DF, 0x1025, 0x0102 }, /* ICH7 on Acer 5602aWLMi */
598 { 0x27DF, 0x1025, 0x0110 }, /* ICH7 on Acer 3682WLMi */ 598 { 0x27DF, 0x1025, 0x0110 }, /* ICH7 on Acer 3682WLMi */
599 { 0x27DF, 0x1028, 0x02b0 }, /* ICH7 on unknown Dell */
599 { 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */ 600 { 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */
600 { 0x27DF, 0x103C, 0x30A1 }, /* ICH7 on HP Compaq nc2400 */ 601 { 0x27DF, 0x103C, 0x30A1 }, /* ICH7 on HP Compaq nc2400 */
602 { 0x27DF, 0x103C, 0x361a }, /* ICH7 on unkown HP */
601 { 0x27DF, 0x1071, 0xD221 }, /* ICH7 on Hercules EC-900 */ 603 { 0x27DF, 0x1071, 0xD221 }, /* ICH7 on Hercules EC-900 */
604 { 0x27DF, 0x152D, 0x0778 }, /* ICH7 on unknown Intel */
602 { 0x24CA, 0x1025, 0x0061 }, /* ICH4 on ACER Aspire 2023WLMi */ 605 { 0x24CA, 0x1025, 0x0061 }, /* ICH4 on ACER Aspire 2023WLMi */
603 { 0x24CA, 0x1025, 0x003d }, /* ICH4 on ACER TM290 */ 606 { 0x24CA, 0x1025, 0x003d }, /* ICH4 on ACER TM290 */
604 { 0x266F, 0x1025, 0x0066 }, /* ICH6 on ACER Aspire 1694WLMi */ 607 { 0x266F, 0x1025, 0x0066 }, /* ICH6 on ACER Aspire 1694WLMi */
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 2c6aedaef71..072ba5ea138 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1515,6 +1515,7 @@ static int ata_hpa_resize(struct ata_device *dev)
1515 1515
1516 return rc; 1516 return rc;
1517 } 1517 }
1518 dev->n_native_sectors = native_sectors;
1518 1519
1519 /* nothing to do? */ 1520 /* nothing to do? */
1520 if (native_sectors <= sectors || !ata_ignore_hpa) { 1521 if (native_sectors <= sectors || !ata_ignore_hpa) {
@@ -4099,6 +4100,7 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int new_class,
4099 unsigned int readid_flags) 4100 unsigned int readid_flags)
4100{ 4101{
4101 u64 n_sectors = dev->n_sectors; 4102 u64 n_sectors = dev->n_sectors;
4103 u64 n_native_sectors = dev->n_native_sectors;
4102 int rc; 4104 int rc;
4103 4105
4104 if (!ata_dev_enabled(dev)) 4106 if (!ata_dev_enabled(dev))
@@ -4128,16 +4130,30 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int new_class,
4128 /* verify n_sectors hasn't changed */ 4130 /* verify n_sectors hasn't changed */
4129 if (dev->class == ATA_DEV_ATA && n_sectors && 4131 if (dev->class == ATA_DEV_ATA && n_sectors &&
4130 dev->n_sectors != n_sectors) { 4132 dev->n_sectors != n_sectors) {
4131 ata_dev_printk(dev, KERN_INFO, "n_sectors mismatch " 4133 ata_dev_printk(dev, KERN_WARNING, "n_sectors mismatch "
4132 "%llu != %llu\n", 4134 "%llu != %llu\n",
4133 (unsigned long long)n_sectors, 4135 (unsigned long long)n_sectors,
4134 (unsigned long long)dev->n_sectors); 4136 (unsigned long long)dev->n_sectors);
4135 4137 /*
4136 /* restore original n_sectors */ 4138 * Something could have caused HPA to be unlocked
4137 dev->n_sectors = n_sectors; 4139 * involuntarily. If n_native_sectors hasn't changed
4138 4140 * and the new size matches it, keep the device.
4139 rc = -ENODEV; 4141 */
4140 goto fail; 4142 if (dev->n_native_sectors == n_native_sectors &&
4143 dev->n_sectors > n_sectors &&
4144 dev->n_sectors == n_native_sectors) {
4145 ata_dev_printk(dev, KERN_WARNING,
4146 "new n_sectors matches native, probably "
4147 "late HPA unlock, continuing\n");
4148 /* keep using the old n_sectors */
4149 dev->n_sectors = n_sectors;
4150 } else {
4151 /* restore original n_[native]_sectors and fail */
4152 dev->n_native_sectors = n_native_sectors;
4153 dev->n_sectors = n_sectors;
4154 rc = -ENODEV;
4155 goto fail;
4156 }
4141 } 4157 }
4142 4158
4143 return 0; 4159 return 0;
@@ -4286,6 +4302,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
4286 { "WDC WD2500JD-00HBB0", "WD-WMAL71490727", ATA_HORKAGE_BROKEN_HPA }, 4302 { "WDC WD2500JD-00HBB0", "WD-WMAL71490727", ATA_HORKAGE_BROKEN_HPA },
4287 { "MAXTOR 6L080L4", "A93.0500", ATA_HORKAGE_BROKEN_HPA }, 4303 { "MAXTOR 6L080L4", "A93.0500", ATA_HORKAGE_BROKEN_HPA },
4288 4304
4305 /* this one allows HPA unlocking but fails IOs on the area */
4306 { "OCZ-VERTEX", "1.30", ATA_HORKAGE_BROKEN_HPA },
4307
4289 /* Devices which report 1 sector over size HPA */ 4308 /* Devices which report 1 sector over size HPA */
4290 { "ST340823A", NULL, ATA_HORKAGE_HPA_SIZE, }, 4309 { "ST340823A", NULL, ATA_HORKAGE_HPA_SIZE, },
4291 { "ST320413A", NULL, ATA_HORKAGE_HPA_SIZE, }, 4310 { "ST320413A", NULL, ATA_HORKAGE_HPA_SIZE, },
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 1a07c061f64..79711b64054 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2327,7 +2327,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
2327 struct ata_port *ap = link->ap; 2327 struct ata_port *ap = link->ap;
2328 struct ata_link *slave = ap->slave_link; 2328 struct ata_link *slave = ap->slave_link;
2329 struct ata_eh_context *ehc = &link->eh_context; 2329 struct ata_eh_context *ehc = &link->eh_context;
2330 struct ata_eh_context *sehc = &slave->eh_context; 2330 struct ata_eh_context *sehc = slave ? &slave->eh_context : NULL;
2331 unsigned int *classes = ehc->classes; 2331 unsigned int *classes = ehc->classes;
2332 unsigned int lflags = link->flags; 2332 unsigned int lflags = link->flags;
2333 int verbose = !(ehc->i.flags & ATA_EHI_QUIET); 2333 int verbose = !(ehc->i.flags & ATA_EHI_QUIET);
diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c
index 8561a9f195c..41c94b1ae49 100644
--- a/drivers/ata/pata_at91.c
+++ b/drivers/ata/pata_at91.c
@@ -26,9 +26,7 @@
26#include <linux/platform_device.h> 26#include <linux/platform_device.h>
27#include <linux/ata_platform.h> 27#include <linux/ata_platform.h>
28 28
29#include <mach/at91sam9260_matrix.h>
30#include <mach/at91sam9_smc.h> 29#include <mach/at91sam9_smc.h>
31#include <mach/at91sam9260.h>
32#include <mach/board.h> 30#include <mach/board.h>
33#include <mach/gpio.h> 31#include <mach/gpio.h>
34 32
@@ -44,65 +42,62 @@ struct at91_ide_info {
44 unsigned long mode; 42 unsigned long mode;
45 unsigned int cs; 43 unsigned int cs;
46 44
45 struct clk *mck;
46
47 void __iomem *ide_addr; 47 void __iomem *ide_addr;
48 void __iomem *alt_addr; 48 void __iomem *alt_addr;
49}; 49};
50 50
51const struct ata_timing initial_timing = 51static const struct ata_timing initial_timing =
52 {XFER_PIO_0, 70, 290, 240, 600, 165, 150, 600, 0}; 52 {XFER_PIO_0, 70, 290, 240, 600, 165, 150, 600, 0};
53 53
54static unsigned int calc_mck_cycles(unsigned int ns, unsigned int mck_hz) 54static unsigned long calc_mck_cycles(unsigned long ns, unsigned long mck_hz)
55{ 55{
56 unsigned long mul; 56 unsigned long mul;
57 57
58 /* 58 /*
59 * cycles = x [nsec] * f [Hz] / 10^9 [ns in sec] = 59 * cycles = x [nsec] * f [Hz] / 10^9 [ns in sec] =
60 * x * (f / 1_000_000_000) = 60 * x * (f / 1_000_000_000) =
61 * x * ((f * 65536) / 1_000_000_000) / 65536 = 61 * x * ((f * 65536) / 1_000_000_000) / 65536 =
62 * x * (((f / 10_000) * 65536) / 100_000) / 65536 = 62 * x * (((f / 10_000) * 65536) / 100_000) / 65536 =
63 */ 63 */
64 64
65 mul = (mck_hz / 10000) << 16; 65 mul = (mck_hz / 10000) << 16;
66 mul /= 100000; 66 mul /= 100000;
67 67
68 return (ns * mul + 65536) >> 16; /* rounding */ 68 return (ns * mul + 65536) >> 16; /* rounding */
69} 69}
70 70
71static void set_smc_mode(struct at91_ide_info *info) 71static void set_smc_mode(struct at91_ide_info *info)
72{ 72{
73 at91_sys_write(AT91_SMC_MODE(info->cs), info->mode); 73 at91_sys_write(AT91_SMC_MODE(info->cs), info->mode);
74 return; 74 return;
75} 75}
76 76
77static void set_smc_timing(struct device *dev, 77static void set_smc_timing(struct device *dev,
78 struct at91_ide_info *info, const struct ata_timing *ata) 78 struct at91_ide_info *info, const struct ata_timing *ata)
79{ 79{
80 int read_cycle, write_cycle, active, recover; 80 unsigned long read_cycle, write_cycle, active, recover;
81 int nrd_setup, nrd_pulse, nrd_recover; 81 unsigned long nrd_setup, nrd_pulse, nrd_recover;
82 int nwe_setup, nwe_pulse; 82 unsigned long nwe_setup, nwe_pulse;
83 83
84 int ncs_write_setup, ncs_write_pulse; 84 unsigned long ncs_write_setup, ncs_write_pulse;
85 int ncs_read_setup, ncs_read_pulse; 85 unsigned long ncs_read_setup, ncs_read_pulse;
86 86
87 unsigned int mck_hz; 87 unsigned long mck_hz;
88 struct clk *mck;
89 88
90 read_cycle = ata->cyc8b; 89 read_cycle = ata->cyc8b;
91 nrd_setup = ata->setup; 90 nrd_setup = ata->setup;
92 nrd_pulse = ata->act8b; 91 nrd_pulse = ata->act8b;
93 nrd_recover = ata->rec8b; 92 nrd_recover = ata->rec8b;
94 93
95 mck = clk_get(NULL, "mck"); 94 mck_hz = clk_get_rate(info->mck);
96 BUG_ON(IS_ERR(mck));
97 mck_hz = clk_get_rate(mck);
98 95
99 read_cycle = calc_mck_cycles(read_cycle, mck_hz); 96 read_cycle = calc_mck_cycles(read_cycle, mck_hz);
100 nrd_setup = calc_mck_cycles(nrd_setup, mck_hz); 97 nrd_setup = calc_mck_cycles(nrd_setup, mck_hz);
101 nrd_pulse = calc_mck_cycles(nrd_pulse, mck_hz); 98 nrd_pulse = calc_mck_cycles(nrd_pulse, mck_hz);
102 nrd_recover = calc_mck_cycles(nrd_recover, mck_hz); 99 nrd_recover = calc_mck_cycles(nrd_recover, mck_hz);
103 100
104 clk_put(mck);
105
106 active = nrd_setup + nrd_pulse; 101 active = nrd_setup + nrd_pulse;
107 recover = read_cycle - active; 102 recover = read_cycle - active;
108 103
@@ -121,13 +116,13 @@ static void set_smc_timing(struct device *dev,
121 ncs_write_setup = ncs_read_setup; 116 ncs_write_setup = ncs_read_setup;
122 ncs_write_pulse = ncs_read_pulse; 117 ncs_write_pulse = ncs_read_pulse;
123 118
124 dev_dbg(dev, "ATA timings: nrd_setup = %d nrd_pulse = %d nrd_cycle = %d\n", 119 dev_dbg(dev, "ATA timings: nrd_setup = %lu nrd_pulse = %lu nrd_cycle = %lu\n",
125 nrd_setup, nrd_pulse, read_cycle); 120 nrd_setup, nrd_pulse, read_cycle);
126 dev_dbg(dev, "ATA timings: nwe_setup = %d nwe_pulse = %d nwe_cycle = %d\n", 121 dev_dbg(dev, "ATA timings: nwe_setup = %lu nwe_pulse = %lu nwe_cycle = %lu\n",
127 nwe_setup, nwe_pulse, write_cycle); 122 nwe_setup, nwe_pulse, write_cycle);
128 dev_dbg(dev, "ATA timings: ncs_read_setup = %d ncs_read_pulse = %d\n", 123 dev_dbg(dev, "ATA timings: ncs_read_setup = %lu ncs_read_pulse = %lu\n",
129 ncs_read_setup, ncs_read_pulse); 124 ncs_read_setup, ncs_read_pulse);
130 dev_dbg(dev, "ATA timings: ncs_write_setup = %d ncs_write_pulse = %d\n", 125 dev_dbg(dev, "ATA timings: ncs_write_setup = %lu ncs_write_pulse = %lu\n",
131 ncs_write_setup, ncs_write_pulse); 126 ncs_write_setup, ncs_write_pulse);
132 127
133 at91_sys_write(AT91_SMC_SETUP(info->cs), 128 at91_sys_write(AT91_SMC_SETUP(info->cs),
@@ -217,6 +212,7 @@ static int __devinit pata_at91_probe(struct platform_device *pdev)
217 struct resource *mem_res; 212 struct resource *mem_res;
218 struct ata_host *host; 213 struct ata_host *host;
219 struct ata_port *ap; 214 struct ata_port *ap;
215
220 int irq_flags = 0; 216 int irq_flags = 0;
221 int irq = 0; 217 int irq = 0;
222 int ret; 218 int ret;
@@ -254,13 +250,20 @@ static int __devinit pata_at91_probe(struct platform_device *pdev)
254 ata_port_desc(ap, "no IRQ, using PIO polling"); 250 ata_port_desc(ap, "no IRQ, using PIO polling");
255 } 251 }
256 252
257 info = kzalloc(sizeof(*info), GFP_KERNEL); 253 info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
258 254
259 if (!info) { 255 if (!info) {
260 dev_err(dev, "failed to allocate memory for private data\n"); 256 dev_err(dev, "failed to allocate memory for private data\n");
261 return -ENOMEM; 257 return -ENOMEM;
262 } 258 }
263 259
260 info->mck = clk_get(NULL, "mck");
261
262 if (IS_ERR(info->mck)) {
263 dev_err(dev, "failed to get access to mck clock\n");
264 return -ENODEV;
265 }
266
264 info->cs = board->chipselect; 267 info->cs = board->chipselect;
265 info->mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | 268 info->mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
266 AT91_SMC_EXNWMODE_READY | AT91_SMC_BAT_SELECT | 269 AT91_SMC_EXNWMODE_READY | AT91_SMC_BAT_SELECT |
@@ -272,7 +275,7 @@ static int __devinit pata_at91_probe(struct platform_device *pdev)
272 if (!info->ide_addr) { 275 if (!info->ide_addr) {
273 dev_err(dev, "failed to map IO base\n"); 276 dev_err(dev, "failed to map IO base\n");
274 ret = -ENOMEM; 277 ret = -ENOMEM;
275 goto err_ide_ioremap; 278 goto err_put;
276 } 279 }
277 280
278 info->alt_addr = devm_ioremap(dev, 281 info->alt_addr = devm_ioremap(dev,
@@ -281,7 +284,7 @@ static int __devinit pata_at91_probe(struct platform_device *pdev)
281 if (!info->alt_addr) { 284 if (!info->alt_addr) {
282 dev_err(dev, "failed to map CTL base\n"); 285 dev_err(dev, "failed to map CTL base\n");
283 ret = -ENOMEM; 286 ret = -ENOMEM;
284 goto err_alt_ioremap; 287 goto err_put;
285 } 288 }
286 289
287 ap->ioaddr.cmd_addr = info->ide_addr; 290 ap->ioaddr.cmd_addr = info->ide_addr;
@@ -300,12 +303,8 @@ static int __devinit pata_at91_probe(struct platform_device *pdev)
300 irq ? ata_sff_interrupt : NULL, 303 irq ? ata_sff_interrupt : NULL,
301 irq_flags, &pata_at91_sht); 304 irq_flags, &pata_at91_sht);
302 305
303err_alt_ioremap: 306err_put:
304 devm_iounmap(dev, info->ide_addr); 307 clk_put(info->mck);
305
306err_ide_ioremap:
307 kfree(info);
308
309 return ret; 308 return ret;
310} 309}
311 310
@@ -313,7 +312,6 @@ static int __devexit pata_at91_remove(struct platform_device *pdev)
313{ 312{
314 struct ata_host *host = dev_get_drvdata(&pdev->dev); 313 struct ata_host *host = dev_get_drvdata(&pdev->dev);
315 struct at91_ide_info *info; 314 struct at91_ide_info *info;
316 struct device *dev = &pdev->dev;
317 315
318 if (!host) 316 if (!host)
319 return 0; 317 return 0;
@@ -324,10 +322,8 @@ static int __devexit pata_at91_remove(struct platform_device *pdev)
324 if (!info) 322 if (!info)
325 return 0; 323 return 0;
326 324
327 devm_iounmap(dev, info->ide_addr); 325 clk_put(info->mck);
328 devm_iounmap(dev, info->alt_addr);
329 326
330 kfree(info);
331 return 0; 327 return 0;
332} 328}
333 329
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index bec0b8ade66..45915566e4e 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -1,6 +1,7 @@
1/* 1/*
2 * pata_atiixp.c - ATI PATA for new ATA layer 2 * pata_atiixp.c - ATI PATA for new ATA layer
3 * (C) 2005 Red Hat Inc 3 * (C) 2005 Red Hat Inc
4 * (C) 2009 Bartlomiej Zolnierkiewicz
4 * 5 *
5 * Based on 6 * Based on
6 * 7 *
@@ -61,20 +62,19 @@ static void atiixp_set_pio_timing(struct ata_port *ap, struct ata_device *adev,
61 62
62 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 63 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
63 int dn = 2 * ap->port_no + adev->devno; 64 int dn = 2 * ap->port_no + adev->devno;
64
65 /* Check this is correct - the order is odd in both drivers */
66 int timing_shift = (16 * ap->port_no) + 8 * (adev->devno ^ 1); 65 int timing_shift = (16 * ap->port_no) + 8 * (adev->devno ^ 1);
67 u16 pio_mode_data, pio_timing_data; 66 u32 pio_timing_data;
67 u16 pio_mode_data;
68 68
69 pci_read_config_word(pdev, ATIIXP_IDE_PIO_MODE, &pio_mode_data); 69 pci_read_config_word(pdev, ATIIXP_IDE_PIO_MODE, &pio_mode_data);
70 pio_mode_data &= ~(0x7 << (4 * dn)); 70 pio_mode_data &= ~(0x7 << (4 * dn));
71 pio_mode_data |= pio << (4 * dn); 71 pio_mode_data |= pio << (4 * dn);
72 pci_write_config_word(pdev, ATIIXP_IDE_PIO_MODE, pio_mode_data); 72 pci_write_config_word(pdev, ATIIXP_IDE_PIO_MODE, pio_mode_data);
73 73
74 pci_read_config_word(pdev, ATIIXP_IDE_PIO_TIMING, &pio_timing_data); 74 pci_read_config_dword(pdev, ATIIXP_IDE_PIO_TIMING, &pio_timing_data);
75 pio_timing_data &= ~(0xFF << timing_shift); 75 pio_timing_data &= ~(0xFF << timing_shift);
76 pio_timing_data |= (pio_timings[pio] << timing_shift); 76 pio_timing_data |= (pio_timings[pio] << timing_shift);
77 pci_write_config_word(pdev, ATIIXP_IDE_PIO_TIMING, pio_timing_data); 77 pci_write_config_dword(pdev, ATIIXP_IDE_PIO_TIMING, pio_timing_data);
78} 78}
79 79
80/** 80/**
@@ -119,16 +119,17 @@ static void atiixp_set_dmamode(struct ata_port *ap, struct ata_device *adev)
119 udma_mode_data |= dma << (4 * dn); 119 udma_mode_data |= dma << (4 * dn);
120 pci_write_config_word(pdev, ATIIXP_IDE_UDMA_MODE, udma_mode_data); 120 pci_write_config_word(pdev, ATIIXP_IDE_UDMA_MODE, udma_mode_data);
121 } else { 121 } else {
122 u16 mwdma_timing_data;
123 /* Check this is correct - the order is odd in both drivers */
124 int timing_shift = (16 * ap->port_no) + 8 * (adev->devno ^ 1); 122 int timing_shift = (16 * ap->port_no) + 8 * (adev->devno ^ 1);
123 u32 mwdma_timing_data;
125 124
126 dma -= XFER_MW_DMA_0; 125 dma -= XFER_MW_DMA_0;
127 126
128 pci_read_config_word(pdev, ATIIXP_IDE_MWDMA_TIMING, &mwdma_timing_data); 127 pci_read_config_dword(pdev, ATIIXP_IDE_MWDMA_TIMING,
128 &mwdma_timing_data);
129 mwdma_timing_data &= ~(0xFF << timing_shift); 129 mwdma_timing_data &= ~(0xFF << timing_shift);
130 mwdma_timing_data |= (mwdma_timings[dma] << timing_shift); 130 mwdma_timing_data |= (mwdma_timings[dma] << timing_shift);
131 pci_write_config_word(pdev, ATIIXP_IDE_MWDMA_TIMING, mwdma_timing_data); 131 pci_write_config_dword(pdev, ATIIXP_IDE_MWDMA_TIMING,
132 mwdma_timing_data);
132 } 133 }
133 /* 134 /*
134 * We must now look at the PIO mode situation. We may need to 135 * We must now look at the PIO mode situation. We may need to
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
index 8d9343accf3..abdd19fe990 100644
--- a/drivers/ata/pata_octeon_cf.c
+++ b/drivers/ata/pata_octeon_cf.c
@@ -653,7 +653,8 @@ static irqreturn_t octeon_cf_interrupt(int irq, void *dev_instance)
653 653
654 ap = host->ports[i]; 654 ap = host->ports[i];
655 ocd = ap->dev->platform_data; 655 ocd = ap->dev->platform_data;
656 if (!ap || (ap->flags & ATA_FLAG_DISABLED)) 656
657 if (ap->flags & ATA_FLAG_DISABLED)
657 continue; 658 continue;
658 659
659 ocd = ap->dev->platform_data; 660 ocd = ap->dev->platform_data;
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index f4d009ed50a..dc99e26f8e5 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -411,6 +411,7 @@ static struct pcmcia_device_id pcmcia_devices[] = {
411 PCMCIA_DEVICE_PROD_ID123("PCMCIA", "IDE CARD", "F1", 0x281f1c5d, 0x1907960c, 0xf7fde8b9), 411 PCMCIA_DEVICE_PROD_ID123("PCMCIA", "IDE CARD", "F1", 0x281f1c5d, 0x1907960c, 0xf7fde8b9),
412 PCMCIA_DEVICE_PROD_ID12("ARGOSY", "CD-ROM", 0x78f308dc, 0x66536591), 412 PCMCIA_DEVICE_PROD_ID12("ARGOSY", "CD-ROM", 0x78f308dc, 0x66536591),
413 PCMCIA_DEVICE_PROD_ID12("ARGOSY", "PnPIDE", 0x78f308dc, 0x0c694728), 413 PCMCIA_DEVICE_PROD_ID12("ARGOSY", "PnPIDE", 0x78f308dc, 0x0c694728),
414 PCMCIA_DEVICE_PROD_ID12("CNF ", "CD-ROM", 0x46d7db81, 0x66536591),
414 PCMCIA_DEVICE_PROD_ID12("CNF CD-M", "CD-ROM", 0x7d93b852, 0x66536591), 415 PCMCIA_DEVICE_PROD_ID12("CNF CD-M", "CD-ROM", 0x7d93b852, 0x66536591),
415 PCMCIA_DEVICE_PROD_ID12("Creative Technology Ltd.", "PCMCIA CD-ROM Interface Card", 0xff8c8a45, 0xfe8020c4), 416 PCMCIA_DEVICE_PROD_ID12("Creative Technology Ltd.", "PCMCIA CD-ROM Interface Card", 0xff8c8a45, 0xfe8020c4),
416 PCMCIA_DEVICE_PROD_ID12("Digital Equipment Corporation.", "Digital Mobile Media CD-ROM", 0x17692a66, 0xef1dcbde), 417 PCMCIA_DEVICE_PROD_ID12("Digital Equipment Corporation.", "Digital Mobile Media CD-ROM", 0x17692a66, 0xef1dcbde),
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 23714aefb82..c19417e0220 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -2514,7 +2514,7 @@ static void mv_unexpected_intr(struct ata_port *ap, int edma_was_enabled)
2514 char *when = "idle"; 2514 char *when = "idle";
2515 2515
2516 ata_ehi_clear_desc(ehi); 2516 ata_ehi_clear_desc(ehi);
2517 if (!ap || (ap->flags & ATA_FLAG_DISABLED)) { 2517 if (ap->flags & ATA_FLAG_DISABLED) {
2518 when = "disabled"; 2518 when = "disabled";
2519 } else if (edma_was_enabled) { 2519 } else if (edma_was_enabled) {
2520 when = "EDMA enabled"; 2520 when = "EDMA enabled";
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index b2d11f300c3..86a40582999 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -602,6 +602,7 @@ MODULE_VERSION(DRV_VERSION);
602 602
603static int adma_enabled; 603static int adma_enabled;
604static int swncq_enabled = 1; 604static int swncq_enabled = 1;
605static int msi_enabled;
605 606
606static void nv_adma_register_mode(struct ata_port *ap) 607static void nv_adma_register_mode(struct ata_port *ap)
607{ 608{
@@ -2459,6 +2460,11 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2459 } else if (type == SWNCQ) 2460 } else if (type == SWNCQ)
2460 nv_swncq_host_init(host); 2461 nv_swncq_host_init(host);
2461 2462
2463 if (msi_enabled) {
2464 dev_printk(KERN_NOTICE, &pdev->dev, "Using MSI\n");
2465 pci_enable_msi(pdev);
2466 }
2467
2462 pci_set_master(pdev); 2468 pci_set_master(pdev);
2463 return ata_host_activate(host, pdev->irq, ipriv->irq_handler, 2469 return ata_host_activate(host, pdev->irq, ipriv->irq_handler,
2464 IRQF_SHARED, ipriv->sht); 2470 IRQF_SHARED, ipriv->sht);
@@ -2558,4 +2564,6 @@ module_param_named(adma, adma_enabled, bool, 0444);
2558MODULE_PARM_DESC(adma, "Enable use of ADMA (Default: false)"); 2564MODULE_PARM_DESC(adma, "Enable use of ADMA (Default: false)");
2559module_param_named(swncq, swncq_enabled, bool, 0444); 2565module_param_named(swncq, swncq_enabled, bool, 0444);
2560MODULE_PARM_DESC(swncq, "Enable use of SWNCQ (Default: true)"); 2566MODULE_PARM_DESC(swncq, "Enable use of SWNCQ (Default: true)");
2567module_param_named(msi, msi_enabled, bool, 0444);
2568MODULE_PARM_DESC(msi, "Enable use of MSI (Default: false)");
2561 2569
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index 030ec079b18..35bd5cc7f28 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -532,7 +532,7 @@ static irqreturn_t sil_interrupt(int irq, void *dev_instance)
532 struct ata_port *ap = host->ports[i]; 532 struct ata_port *ap = host->ports[i];
533 u32 bmdma2 = readl(mmio_base + sil_port[ap->port_no].bmdma2); 533 u32 bmdma2 = readl(mmio_base + sil_port[ap->port_no].bmdma2);
534 534
535 if (unlikely(!ap || ap->flags & ATA_FLAG_DISABLED)) 535 if (unlikely(ap->flags & ATA_FLAG_DISABLED))
536 continue; 536 continue;
537 537
538 /* turn off SATA_IRQ if not supported */ 538 /* turn off SATA_IRQ if not supported */
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index f285f441fab..7376367bcb8 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -180,7 +180,6 @@ static ssize_t firmware_loading_store(struct device *dev,
180 goto err; 180 goto err;
181 } 181 }
182 /* Pages will be freed by vfree() */ 182 /* Pages will be freed by vfree() */
183 fw_priv->pages = NULL;
184 fw_priv->page_array_size = 0; 183 fw_priv->page_array_size = 0;
185 fw_priv->nr_pages = 0; 184 fw_priv->nr_pages = 0;
186 complete(&fw_priv->completion); 185 complete(&fw_priv->completion);
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 81cb01bfc35..456594bd97b 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -483,9 +483,6 @@ int platform_driver_register(struct platform_driver *drv)
483 drv->driver.remove = platform_drv_remove; 483 drv->driver.remove = platform_drv_remove;
484 if (drv->shutdown) 484 if (drv->shutdown)
485 drv->driver.shutdown = platform_drv_shutdown; 485 drv->driver.shutdown = platform_drv_shutdown;
486 if (drv->suspend || drv->resume)
487 pr_warning("Platform driver '%s' needs updating - please use "
488 "dev_pm_ops\n", drv->driver.name);
489 486
490 return driver_register(&drv->driver); 487 return driver_register(&drv->driver);
491} 488}
diff --git a/drivers/base/sys.c b/drivers/base/sys.c
index 79a9ae5238a..0d903909af7 100644
--- a/drivers/base/sys.c
+++ b/drivers/base/sys.c
@@ -275,9 +275,9 @@ int sysdev_register(struct sys_device *sysdev)
275 drv->add(sysdev); 275 drv->add(sysdev);
276 } 276 }
277 mutex_unlock(&sysdev_drivers_lock); 277 mutex_unlock(&sysdev_drivers_lock);
278 kobject_uevent(&sysdev->kobj, KOBJ_ADD);
278 } 279 }
279 280
280 kobject_uevent(&sysdev->kobj, KOBJ_ADD);
281 return error; 281 return error;
282} 282}
283 283
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c
index f5e7180d7f4..3ff02941b3d 100644
--- a/drivers/block/ataflop.c
+++ b/drivers/block/ataflop.c
@@ -1627,7 +1627,7 @@ static int fd_ioctl(struct block_device *bdev, fmode_t mode,
1627 drive, dtp->blocks, dtp->spt, dtp->stretch); 1627 drive, dtp->blocks, dtp->spt, dtp->stretch);
1628 1628
1629 /* sanity check */ 1629 /* sanity check */
1630 if (!dtp || setprm.track != dtp->blocks/dtp->spt/2 || 1630 if (setprm.track != dtp->blocks/dtp->spt/2 ||
1631 setprm.head != 2) { 1631 setprm.head != 2) {
1632 redo_fd_request(); 1632 redo_fd_request();
1633 return -EINVAL; 1633 return -EINVAL;
diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c
index f703f547824..6d7fbaa9224 100644
--- a/drivers/block/mg_disk.c
+++ b/drivers/block/mg_disk.c
@@ -36,7 +36,6 @@
36 36
37/* Register offsets */ 37/* Register offsets */
38#define MG_BUFF_OFFSET 0x8000 38#define MG_BUFF_OFFSET 0x8000
39#define MG_STORAGE_BUFFER_SIZE 0x200
40#define MG_REG_OFFSET 0xC000 39#define MG_REG_OFFSET 0xC000
41#define MG_REG_FEATURE (MG_REG_OFFSET + 2) /* write case */ 40#define MG_REG_FEATURE (MG_REG_OFFSET + 2) /* write case */
42#define MG_REG_ERROR (MG_REG_OFFSET + 2) /* read case */ 41#define MG_REG_ERROR (MG_REG_OFFSET + 2) /* read case */
@@ -219,6 +218,16 @@ static unsigned int mg_wait(struct mg_host *host, u32 expect, u32 msec)
219 host->error = MG_ERR_NONE; 218 host->error = MG_ERR_NONE;
220 expire = jiffies + msecs_to_jiffies(msec); 219 expire = jiffies + msecs_to_jiffies(msec);
221 220
221 /* These 2 times dummy status read prevents reading invalid
222 * status. A very little time (3 times of mflash operating clk)
223 * is required for busy bit is set. Use dummy read instead of
224 * busy wait, because mflash's PLL is machine dependent.
225 */
226 if (prv_data->use_polling) {
227 status = inb((unsigned long)host->dev_base + MG_REG_STATUS);
228 status = inb((unsigned long)host->dev_base + MG_REG_STATUS);
229 }
230
222 status = inb((unsigned long)host->dev_base + MG_REG_STATUS); 231 status = inb((unsigned long)host->dev_base + MG_REG_STATUS);
223 232
224 do { 233 do {
@@ -245,8 +254,6 @@ static unsigned int mg_wait(struct mg_host *host, u32 expect, u32 msec)
245 mg_dump_status("not ready", status, host); 254 mg_dump_status("not ready", status, host);
246 return MG_ERR_INV_STAT; 255 return MG_ERR_INV_STAT;
247 } 256 }
248 if (prv_data->use_polling)
249 msleep(1);
250 257
251 status = inb((unsigned long)host->dev_base + MG_REG_STATUS); 258 status = inb((unsigned long)host->dev_base + MG_REG_STATUS);
252 } while (time_before(cur_jiffies, expire)); 259 } while (time_before(cur_jiffies, expire));
@@ -469,9 +476,18 @@ static unsigned int mg_out(struct mg_host *host,
469 return MG_ERR_NONE; 476 return MG_ERR_NONE;
470} 477}
471 478
479static void mg_read_one(struct mg_host *host, struct request *req)
480{
481 u16 *buff = (u16 *)req->buffer;
482 u32 i;
483
484 for (i = 0; i < MG_SECTOR_SIZE >> 1; i++)
485 *buff++ = inw((unsigned long)host->dev_base + MG_BUFF_OFFSET +
486 (i << 1));
487}
488
472static void mg_read(struct request *req) 489static void mg_read(struct request *req)
473{ 490{
474 u32 j;
475 struct mg_host *host = req->rq_disk->private_data; 491 struct mg_host *host = req->rq_disk->private_data;
476 492
477 if (mg_out(host, blk_rq_pos(req), blk_rq_sectors(req), 493 if (mg_out(host, blk_rq_pos(req), blk_rq_sectors(req),
@@ -482,49 +498,65 @@ static void mg_read(struct request *req)
482 blk_rq_sectors(req), blk_rq_pos(req), req->buffer); 498 blk_rq_sectors(req), blk_rq_pos(req), req->buffer);
483 499
484 do { 500 do {
485 u16 *buff = (u16 *)req->buffer;
486
487 if (mg_wait(host, ATA_DRQ, 501 if (mg_wait(host, ATA_DRQ,
488 MG_TMAX_WAIT_RD_DRQ) != MG_ERR_NONE) { 502 MG_TMAX_WAIT_RD_DRQ) != MG_ERR_NONE) {
489 mg_bad_rw_intr(host); 503 mg_bad_rw_intr(host);
490 return; 504 return;
491 } 505 }
492 for (j = 0; j < MG_SECTOR_SIZE >> 1; j++) 506
493 *buff++ = inw((unsigned long)host->dev_base + 507 mg_read_one(host, req);
494 MG_BUFF_OFFSET + (j << 1));
495 508
496 outb(MG_CMD_RD_CONF, (unsigned long)host->dev_base + 509 outb(MG_CMD_RD_CONF, (unsigned long)host->dev_base +
497 MG_REG_COMMAND); 510 MG_REG_COMMAND);
498 } while (mg_end_request(host, 0, MG_SECTOR_SIZE)); 511 } while (mg_end_request(host, 0, MG_SECTOR_SIZE));
499} 512}
500 513
514static void mg_write_one(struct mg_host *host, struct request *req)
515{
516 u16 *buff = (u16 *)req->buffer;
517 u32 i;
518
519 for (i = 0; i < MG_SECTOR_SIZE >> 1; i++)
520 outw(*buff++, (unsigned long)host->dev_base + MG_BUFF_OFFSET +
521 (i << 1));
522}
523
501static void mg_write(struct request *req) 524static void mg_write(struct request *req)
502{ 525{
503 u32 j;
504 struct mg_host *host = req->rq_disk->private_data; 526 struct mg_host *host = req->rq_disk->private_data;
527 unsigned int rem = blk_rq_sectors(req);
505 528
506 if (mg_out(host, blk_rq_pos(req), blk_rq_sectors(req), 529 if (mg_out(host, blk_rq_pos(req), rem,
507 MG_CMD_WR, NULL) != MG_ERR_NONE) { 530 MG_CMD_WR, NULL) != MG_ERR_NONE) {
508 mg_bad_rw_intr(host); 531 mg_bad_rw_intr(host);
509 return; 532 return;
510 } 533 }
511 534
512 MG_DBG("requested %d sects (from %ld), buffer=0x%p\n", 535 MG_DBG("requested %d sects (from %ld), buffer=0x%p\n",
513 blk_rq_sectors(req), blk_rq_pos(req), req->buffer); 536 rem, blk_rq_pos(req), req->buffer);
537
538 if (mg_wait(host, ATA_DRQ,
539 MG_TMAX_WAIT_WR_DRQ) != MG_ERR_NONE) {
540 mg_bad_rw_intr(host);
541 return;
542 }
514 543
515 do { 544 do {
516 u16 *buff = (u16 *)req->buffer; 545 mg_write_one(host, req);
517 546
518 if (mg_wait(host, ATA_DRQ, MG_TMAX_WAIT_WR_DRQ) != MG_ERR_NONE) { 547 outb(MG_CMD_WR_CONF, (unsigned long)host->dev_base +
548 MG_REG_COMMAND);
549
550 rem--;
551 if (rem > 1 && mg_wait(host, ATA_DRQ,
552 MG_TMAX_WAIT_WR_DRQ) != MG_ERR_NONE) {
553 mg_bad_rw_intr(host);
554 return;
555 } else if (mg_wait(host, MG_STAT_READY,
556 MG_TMAX_WAIT_WR_DRQ) != MG_ERR_NONE) {
519 mg_bad_rw_intr(host); 557 mg_bad_rw_intr(host);
520 return; 558 return;
521 } 559 }
522 for (j = 0; j < MG_SECTOR_SIZE >> 1; j++)
523 outw(*buff++, (unsigned long)host->dev_base +
524 MG_BUFF_OFFSET + (j << 1));
525
526 outb(MG_CMD_WR_CONF, (unsigned long)host->dev_base +
527 MG_REG_COMMAND);
528 } while (mg_end_request(host, 0, MG_SECTOR_SIZE)); 560 } while (mg_end_request(host, 0, MG_SECTOR_SIZE));
529} 561}
530 562
@@ -532,7 +564,6 @@ static void mg_read_intr(struct mg_host *host)
532{ 564{
533 struct request *req = host->req; 565 struct request *req = host->req;
534 u32 i; 566 u32 i;
535 u16 *buff;
536 567
537 /* check status */ 568 /* check status */
538 do { 569 do {
@@ -550,13 +581,7 @@ static void mg_read_intr(struct mg_host *host)
550 return; 581 return;
551 582
552ok_to_read: 583ok_to_read:
553 /* get current segment of request */ 584 mg_read_one(host, req);
554 buff = (u16 *)req->buffer;
555
556 /* read 1 sector */
557 for (i = 0; i < MG_SECTOR_SIZE >> 1; i++)
558 *buff++ = inw((unsigned long)host->dev_base + MG_BUFF_OFFSET +
559 (i << 1));
560 585
561 MG_DBG("sector %ld, remaining=%ld, buffer=0x%p\n", 586 MG_DBG("sector %ld, remaining=%ld, buffer=0x%p\n",
562 blk_rq_pos(req), blk_rq_sectors(req) - 1, req->buffer); 587 blk_rq_pos(req), blk_rq_sectors(req) - 1, req->buffer);
@@ -575,8 +600,7 @@ ok_to_read:
575static void mg_write_intr(struct mg_host *host) 600static void mg_write_intr(struct mg_host *host)
576{ 601{
577 struct request *req = host->req; 602 struct request *req = host->req;
578 u32 i, j; 603 u32 i;
579 u16 *buff;
580 bool rem; 604 bool rem;
581 605
582 /* check status */ 606 /* check status */
@@ -597,12 +621,7 @@ static void mg_write_intr(struct mg_host *host)
597ok_to_write: 621ok_to_write:
598 if ((rem = mg_end_request(host, 0, MG_SECTOR_SIZE))) { 622 if ((rem = mg_end_request(host, 0, MG_SECTOR_SIZE))) {
599 /* write 1 sector and set handler if remains */ 623 /* write 1 sector and set handler if remains */
600 buff = (u16 *)req->buffer; 624 mg_write_one(host, req);
601 for (j = 0; j < MG_STORAGE_BUFFER_SIZE >> 1; j++) {
602 outw(*buff, (unsigned long)host->dev_base +
603 MG_BUFF_OFFSET + (j << 1));
604 buff++;
605 }
606 MG_DBG("sector %ld, remaining=%ld, buffer=0x%p\n", 625 MG_DBG("sector %ld, remaining=%ld, buffer=0x%p\n",
607 blk_rq_pos(req), blk_rq_sectors(req), req->buffer); 626 blk_rq_pos(req), blk_rq_sectors(req), req->buffer);
608 host->mg_do_intr = mg_write_intr; 627 host->mg_do_intr = mg_write_intr;
@@ -667,9 +686,6 @@ static unsigned int mg_issue_req(struct request *req,
667 unsigned int sect_num, 686 unsigned int sect_num,
668 unsigned int sect_cnt) 687 unsigned int sect_cnt)
669{ 688{
670 u16 *buff;
671 u32 i;
672
673 switch (rq_data_dir(req)) { 689 switch (rq_data_dir(req)) {
674 case READ: 690 case READ:
675 if (mg_out(host, sect_num, sect_cnt, MG_CMD_RD, &mg_read_intr) 691 if (mg_out(host, sect_num, sect_cnt, MG_CMD_RD, &mg_read_intr)
@@ -693,12 +709,7 @@ static unsigned int mg_issue_req(struct request *req,
693 mg_bad_rw_intr(host); 709 mg_bad_rw_intr(host);
694 return host->error; 710 return host->error;
695 } 711 }
696 buff = (u16 *)req->buffer; 712 mg_write_one(host, req);
697 for (i = 0; i < MG_SECTOR_SIZE >> 1; i++) {
698 outw(*buff, (unsigned long)host->dev_base +
699 MG_BUFF_OFFSET + (i << 1));
700 buff++;
701 }
702 mod_timer(&host->timer, jiffies + 3 * HZ); 713 mod_timer(&host->timer, jiffies + 3 * HZ);
703 outb(MG_CMD_WR_CONF, (unsigned long)host->dev_base + 714 outb(MG_CMD_WR_CONF, (unsigned long)host->dev_base +
704 MG_REG_COMMAND); 715 MG_REG_COMMAND);
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index fbeefb68a31..aa1a3d5a3e2 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -427,7 +427,12 @@ static unsigned int features[] = {
427 VIRTIO_BLK_F_SCSI, VIRTIO_BLK_F_IDENTIFY 427 VIRTIO_BLK_F_SCSI, VIRTIO_BLK_F_IDENTIFY
428}; 428};
429 429
430static struct virtio_driver virtio_blk = { 430/*
431 * virtio_blk causes spurious section mismatch warning by
432 * simultaneously referring to a __devinit and a __devexit function.
433 * Use __refdata to avoid this warning.
434 */
435static struct virtio_driver __refdata virtio_blk = {
431 .feature_table = features, 436 .feature_table = features,
432 .feature_table_size = ARRAY_SIZE(features), 437 .feature_table_size = ARRAY_SIZE(features),
433 .driver.name = KBUILD_MODNAME, 438 .driver.name = KBUILD_MODNAME,
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c
index 4575171e5be..b2590409f25 100644
--- a/drivers/block/z2ram.c
+++ b/drivers/block/z2ram.c
@@ -374,7 +374,7 @@ err:
374static void __exit z2_exit(void) 374static void __exit z2_exit(void)
375{ 375{
376 int i, j; 376 int i, j;
377 blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), 256); 377 blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), Z2MINOR_COUNT);
378 unregister_blkdev(Z2RAM_MAJOR, DEVICE_NAME); 378 unregister_blkdev(Z2RAM_MAJOR, DEVICE_NAME);
379 del_gendisk(z2ram_gendisk); 379 del_gendisk(z2ram_gendisk);
380 put_disk(z2ram_gendisk); 380 put_disk(z2ram_gendisk);
diff --git a/drivers/char/agp/parisc-agp.c b/drivers/char/agp/parisc-agp.c
index f4bb43fb801..e077701ae3d 100644
--- a/drivers/char/agp/parisc-agp.c
+++ b/drivers/char/agp/parisc-agp.c
@@ -225,7 +225,7 @@ static const struct agp_bridge_driver parisc_agp_driver = {
225 .configure = parisc_agp_configure, 225 .configure = parisc_agp_configure,
226 .fetch_size = parisc_agp_fetch_size, 226 .fetch_size = parisc_agp_fetch_size,
227 .tlb_flush = parisc_agp_tlbflush, 227 .tlb_flush = parisc_agp_tlbflush,
228 .mask_memory = parisc_agp_mask_memory, 228 .mask_memory = parisc_agp_page_mask_memory,
229 .masks = parisc_agp_masks, 229 .masks = parisc_agp_masks,
230 .agp_enable = parisc_agp_enable, 230 .agp_enable = parisc_agp_enable,
231 .cache_flush = global_cache_flush, 231 .cache_flush = global_cache_flush,
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index 94e7e3c8c05..d97779ef72c 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -552,7 +552,7 @@ static int hvc_chars_in_buffer(struct tty_struct *tty)
552 struct hvc_struct *hp = tty->driver_data; 552 struct hvc_struct *hp = tty->driver_data;
553 553
554 if (!hp) 554 if (!hp)
555 return -1; 555 return 0;
556 return hp->n_outbuf; 556 return hp->n_outbuf;
557} 557}
558 558
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c
index ff47907ff1b..973be2f4419 100644
--- a/drivers/char/n_tty.c
+++ b/drivers/char/n_tty.c
@@ -1583,6 +1583,7 @@ static int n_tty_open(struct tty_struct *tty)
1583 1583
1584static inline int input_available_p(struct tty_struct *tty, int amt) 1584static inline int input_available_p(struct tty_struct *tty, int amt)
1585{ 1585{
1586 tty_flush_to_ldisc(tty);
1586 if (tty->icanon) { 1587 if (tty->icanon) {
1587 if (tty->canon_data) 1588 if (tty->canon_data)
1588 return 1; 1589 return 1;
diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c
index 280b41c507a..ec58d8c387f 100644
--- a/drivers/char/nozomi.c
+++ b/drivers/char/nozomi.c
@@ -1866,16 +1866,14 @@ static s32 ntty_chars_in_buffer(struct tty_struct *tty)
1866{ 1866{
1867 struct port *port = tty->driver_data; 1867 struct port *port = tty->driver_data;
1868 struct nozomi *dc = get_dc_by_tty(tty); 1868 struct nozomi *dc = get_dc_by_tty(tty);
1869 s32 rval; 1869 s32 rval = 0;
1870 1870
1871 if (unlikely(!dc || !port)) { 1871 if (unlikely(!dc || !port)) {
1872 rval = -ENODEV;
1873 goto exit_in_buffer; 1872 goto exit_in_buffer;
1874 } 1873 }
1875 1874
1876 if (unlikely(!port->port.count)) { 1875 if (unlikely(!port->port.count)) {
1877 dev_err(&dc->pdev->dev, "No tty open?\n"); 1876 dev_err(&dc->pdev->dev, "No tty open?\n");
1878 rval = -ENODEV;
1879 goto exit_in_buffer; 1877 goto exit_in_buffer;
1880 } 1878 }
1881 1879
diff --git a/drivers/char/pcmcia/ipwireless/tty.c b/drivers/char/pcmcia/ipwireless/tty.c
index 569f2f7743a..674b3ab3587 100644
--- a/drivers/char/pcmcia/ipwireless/tty.c
+++ b/drivers/char/pcmcia/ipwireless/tty.c
@@ -320,10 +320,10 @@ static int ipw_chars_in_buffer(struct tty_struct *linux_tty)
320 struct ipw_tty *tty = linux_tty->driver_data; 320 struct ipw_tty *tty = linux_tty->driver_data;
321 321
322 if (!tty) 322 if (!tty)
323 return -ENODEV; 323 return 0;
324 324
325 if (!tty->open_count) 325 if (!tty->open_count)
326 return -EINVAL; 326 return 0;
327 327
328 return tty->tx_bytes_queued; 328 return tty->tx_bytes_queued;
329} 329}
diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index 6e6942c45f5..d083c73d784 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -144,6 +144,8 @@ static int pty_write(struct tty_struct *tty, const unsigned char *buf,
144 144
145static int pty_write_room(struct tty_struct *tty) 145static int pty_write_room(struct tty_struct *tty)
146{ 146{
147 if (tty->stopped)
148 return 0;
147 return pty_space(tty->link); 149 return pty_space(tty->link);
148} 150}
149 151
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c
index bfe4cdb2feb..268e17f9ec3 100644
--- a/drivers/char/specialix.c
+++ b/drivers/char/specialix.c
@@ -1809,10 +1809,10 @@ static int sx_tiocmset(struct tty_struct *tty, struct file *file,
1809 if (clear & TIOCM_DTR) 1809 if (clear & TIOCM_DTR)
1810 port->MSVR &= ~MSVR_DTR; 1810 port->MSVR &= ~MSVR_DTR;
1811 } 1811 }
1812 spin_lock_irqsave(&bp->lock, flags); 1812 spin_lock(&bp->lock);
1813 sx_out(bp, CD186x_CAR, port_No(port)); 1813 sx_out(bp, CD186x_CAR, port_No(port));
1814 sx_out(bp, CD186x_MSVR, port->MSVR); 1814 sx_out(bp, CD186x_MSVR, port->MSVR);
1815 spin_unlock_irqrestore(&bp->lock, flags); 1815 spin_unlock(&bp->lock);
1816 spin_unlock_irqrestore(&port->lock, flags); 1816 spin_unlock_irqrestore(&port->lock, flags);
1817 func_exit(); 1817 func_exit();
1818 return 0; 1818 return 0;
@@ -1833,11 +1833,11 @@ static int sx_send_break(struct tty_struct *tty, int length)
1833 port->break_length = SPECIALIX_TPS / HZ * length; 1833 port->break_length = SPECIALIX_TPS / HZ * length;
1834 port->COR2 |= COR2_ETC; 1834 port->COR2 |= COR2_ETC;
1835 port->IER |= IER_TXRDY; 1835 port->IER |= IER_TXRDY;
1836 spin_lock_irqsave(&bp->lock, flags); 1836 spin_lock(&bp->lock);
1837 sx_out(bp, CD186x_CAR, port_No(port)); 1837 sx_out(bp, CD186x_CAR, port_No(port));
1838 sx_out(bp, CD186x_COR2, port->COR2); 1838 sx_out(bp, CD186x_COR2, port->COR2);
1839 sx_out(bp, CD186x_IER, port->IER); 1839 sx_out(bp, CD186x_IER, port->IER);
1840 spin_unlock_irqrestore(&bp->lock, flags); 1840 spin_unlock(&bp->lock);
1841 spin_unlock_irqrestore(&port->lock, flags); 1841 spin_unlock_irqrestore(&port->lock, flags);
1842 sx_wait_CCR(bp); 1842 sx_wait_CCR(bp);
1843 spin_lock_irqsave(&bp->lock, flags); 1843 spin_lock_irqsave(&bp->lock, flags);
@@ -2023,9 +2023,9 @@ static void sx_unthrottle(struct tty_struct *tty)
2023 if (sx_crtscts(tty)) 2023 if (sx_crtscts(tty))
2024 port->MSVR |= MSVR_DTR; 2024 port->MSVR |= MSVR_DTR;
2025 /* Else clause: see remark in "sx_throttle"... */ 2025 /* Else clause: see remark in "sx_throttle"... */
2026 spin_lock_irqsave(&bp->lock, flags); 2026 spin_lock(&bp->lock);
2027 sx_out(bp, CD186x_CAR, port_No(port)); 2027 sx_out(bp, CD186x_CAR, port_No(port));
2028 spin_unlock_irqrestore(&bp->lock, flags); 2028 spin_unlock(&bp->lock);
2029 if (I_IXOFF(tty)) { 2029 if (I_IXOFF(tty)) {
2030 spin_unlock_irqrestore(&port->lock, flags); 2030 spin_unlock_irqrestore(&port->lock, flags);
2031 sx_wait_CCR(bp); 2031 sx_wait_CCR(bp);
@@ -2035,9 +2035,9 @@ static void sx_unthrottle(struct tty_struct *tty)
2035 sx_wait_CCR(bp); 2035 sx_wait_CCR(bp);
2036 spin_lock_irqsave(&port->lock, flags); 2036 spin_lock_irqsave(&port->lock, flags);
2037 } 2037 }
2038 spin_lock_irqsave(&bp->lock, flags); 2038 spin_lock(&bp->lock);
2039 sx_out(bp, CD186x_MSVR, port->MSVR); 2039 sx_out(bp, CD186x_MSVR, port->MSVR);
2040 spin_unlock_irqrestore(&bp->lock, flags); 2040 spin_unlock(&bp->lock);
2041 spin_unlock_irqrestore(&port->lock, flags); 2041 spin_unlock_irqrestore(&port->lock, flags);
2042 2042
2043 func_exit(); 2043 func_exit();
@@ -2061,10 +2061,10 @@ static void sx_stop(struct tty_struct *tty)
2061 2061
2062 spin_lock_irqsave(&port->lock, flags); 2062 spin_lock_irqsave(&port->lock, flags);
2063 port->IER &= ~IER_TXRDY; 2063 port->IER &= ~IER_TXRDY;
2064 spin_lock_irqsave(&bp->lock, flags); 2064 spin_lock(&bp->lock);
2065 sx_out(bp, CD186x_CAR, port_No(port)); 2065 sx_out(bp, CD186x_CAR, port_No(port));
2066 sx_out(bp, CD186x_IER, port->IER); 2066 sx_out(bp, CD186x_IER, port->IER);
2067 spin_unlock_irqrestore(&bp->lock, flags); 2067 spin_unlock(&bp->lock);
2068 spin_unlock_irqrestore(&port->lock, flags); 2068 spin_unlock_irqrestore(&port->lock, flags);
2069 2069
2070 func_exit(); 2070 func_exit();
@@ -2089,10 +2089,10 @@ static void sx_start(struct tty_struct *tty)
2089 spin_lock_irqsave(&port->lock, flags); 2089 spin_lock_irqsave(&port->lock, flags);
2090 if (port->xmit_cnt && port->xmit_buf && !(port->IER & IER_TXRDY)) { 2090 if (port->xmit_cnt && port->xmit_buf && !(port->IER & IER_TXRDY)) {
2091 port->IER |= IER_TXRDY; 2091 port->IER |= IER_TXRDY;
2092 spin_lock_irqsave(&bp->lock, flags); 2092 spin_lock(&bp->lock);
2093 sx_out(bp, CD186x_CAR, port_No(port)); 2093 sx_out(bp, CD186x_CAR, port_No(port));
2094 sx_out(bp, CD186x_IER, port->IER); 2094 sx_out(bp, CD186x_IER, port->IER);
2095 spin_unlock_irqrestore(&bp->lock, flags); 2095 spin_unlock(&bp->lock);
2096 } 2096 }
2097 spin_unlock_irqrestore(&port->lock, flags); 2097 spin_unlock_irqrestore(&port->lock, flags);
2098 2098
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index 0db35857e4d..5d7a02f63e1 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -35,7 +35,6 @@
35#include <linux/spinlock.h> 35#include <linux/spinlock.h>
36#include <linux/vt_kern.h> 36#include <linux/vt_kern.h>
37#include <linux/workqueue.h> 37#include <linux/workqueue.h>
38#include <linux/kexec.h>
39#include <linux/hrtimer.h> 38#include <linux/hrtimer.h>
40#include <linux/oom.h> 39#include <linux/oom.h>
41 40
@@ -124,9 +123,12 @@ static struct sysrq_key_op sysrq_unraw_op = {
124static void sysrq_handle_crash(int key, struct tty_struct *tty) 123static void sysrq_handle_crash(int key, struct tty_struct *tty)
125{ 124{
126 char *killer = NULL; 125 char *killer = NULL;
126
127 panic_on_oops = 1; /* force panic */
128 wmb();
127 *killer = 1; 129 *killer = 1;
128} 130}
129static struct sysrq_key_op sysrq_crashdump_op = { 131static struct sysrq_key_op sysrq_crash_op = {
130 .handler = sysrq_handle_crash, 132 .handler = sysrq_handle_crash,
131 .help_msg = "Crash", 133 .help_msg = "Crash",
132 .action_msg = "Trigger a crash", 134 .action_msg = "Trigger a crash",
@@ -401,7 +403,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
401 */ 403 */
402 NULL, /* a */ 404 NULL, /* a */
403 &sysrq_reboot_op, /* b */ 405 &sysrq_reboot_op, /* b */
404 &sysrq_crashdump_op, /* c & ibm_emac driver debug */ 406 &sysrq_crash_op, /* c & ibm_emac driver debug */
405 &sysrq_showlocks_op, /* d */ 407 &sysrq_showlocks_op, /* d */
406 &sysrq_term_op, /* e */ 408 &sysrq_term_op, /* e */
407 &sysrq_moom_op, /* f */ 409 &sysrq_moom_op, /* f */
diff --git a/drivers/char/tty_buffer.c b/drivers/char/tty_buffer.c
index 810ee25d66a..3108991c5c8 100644
--- a/drivers/char/tty_buffer.c
+++ b/drivers/char/tty_buffer.c
@@ -462,6 +462,19 @@ static void flush_to_ldisc(struct work_struct *work)
462} 462}
463 463
464/** 464/**
465 * tty_flush_to_ldisc
466 * @tty: tty to push
467 *
468 * Push the terminal flip buffers to the line discipline.
469 *
470 * Must not be called from IRQ context.
471 */
472void tty_flush_to_ldisc(struct tty_struct *tty)
473{
474 flush_to_ldisc(&tty->buf.work.work);
475}
476
477/**
465 * tty_flip_buffer_push - terminal 478 * tty_flip_buffer_push - terminal
466 * @tty: tty to push 479 * @tty: tty to push
467 * 480 *
diff --git a/drivers/char/tty_ldisc.c b/drivers/char/tty_ldisc.c
index acd76b767d4..1733d3439ad 100644
--- a/drivers/char/tty_ldisc.c
+++ b/drivers/char/tty_ldisc.c
@@ -48,6 +48,41 @@ static DECLARE_WAIT_QUEUE_HEAD(tty_ldisc_wait);
48/* Line disc dispatch table */ 48/* Line disc dispatch table */
49static struct tty_ldisc_ops *tty_ldiscs[NR_LDISCS]; 49static struct tty_ldisc_ops *tty_ldiscs[NR_LDISCS];
50 50
51static inline struct tty_ldisc *get_ldisc(struct tty_ldisc *ld)
52{
53 if (ld)
54 atomic_inc(&ld->users);
55 return ld;
56}
57
58static void put_ldisc(struct tty_ldisc *ld)
59{
60 unsigned long flags;
61
62 if (WARN_ON_ONCE(!ld))
63 return;
64
65 /*
66 * If this is the last user, free the ldisc, and
67 * release the ldisc ops.
68 *
69 * We really want an "atomic_dec_and_lock_irqsave()",
70 * but we don't have it, so this does it by hand.
71 */
72 local_irq_save(flags);
73 if (atomic_dec_and_lock(&ld->users, &tty_ldisc_lock)) {
74 struct tty_ldisc_ops *ldo = ld->ops;
75
76 ldo->refcount--;
77 module_put(ldo->owner);
78 spin_unlock_irqrestore(&tty_ldisc_lock, flags);
79
80 kfree(ld);
81 return;
82 }
83 local_irq_restore(flags);
84}
85
51/** 86/**
52 * tty_register_ldisc - install a line discipline 87 * tty_register_ldisc - install a line discipline
53 * @disc: ldisc number 88 * @disc: ldisc number
@@ -142,7 +177,7 @@ static struct tty_ldisc *tty_ldisc_try_get(int disc)
142 /* lock it */ 177 /* lock it */
143 ldops->refcount++; 178 ldops->refcount++;
144 ld->ops = ldops; 179 ld->ops = ldops;
145 ld->refcount = 0; 180 atomic_set(&ld->users, 1);
146 err = 0; 181 err = 0;
147 } 182 }
148 } 183 }
@@ -181,35 +216,6 @@ static struct tty_ldisc *tty_ldisc_get(int disc)
181 return ld; 216 return ld;
182} 217}
183 218
184/**
185 * tty_ldisc_put - drop ldisc reference
186 * @ld: ldisc
187 *
188 * Drop a reference to a line discipline. Manage refcounts and
189 * module usage counts. Free the ldisc once the recount hits zero.
190 *
191 * Locking:
192 * takes tty_ldisc_lock to guard against ldisc races
193 */
194
195static void tty_ldisc_put(struct tty_ldisc *ld)
196{
197 unsigned long flags;
198 int disc = ld->ops->num;
199 struct tty_ldisc_ops *ldo;
200
201 BUG_ON(disc < N_TTY || disc >= NR_LDISCS);
202
203 spin_lock_irqsave(&tty_ldisc_lock, flags);
204 ldo = tty_ldiscs[disc];
205 BUG_ON(ldo->refcount == 0);
206 ldo->refcount--;
207 module_put(ldo->owner);
208 spin_unlock_irqrestore(&tty_ldisc_lock, flags);
209 WARN_ON(ld->refcount);
210 kfree(ld);
211}
212
213static void *tty_ldiscs_seq_start(struct seq_file *m, loff_t *pos) 219static void *tty_ldiscs_seq_start(struct seq_file *m, loff_t *pos)
214{ 220{
215 return (*pos < NR_LDISCS) ? pos : NULL; 221 return (*pos < NR_LDISCS) ? pos : NULL;
@@ -234,7 +240,7 @@ static int tty_ldiscs_seq_show(struct seq_file *m, void *v)
234 if (IS_ERR(ld)) 240 if (IS_ERR(ld))
235 return 0; 241 return 0;
236 seq_printf(m, "%-10s %2d\n", ld->ops->name ? ld->ops->name : "???", i); 242 seq_printf(m, "%-10s %2d\n", ld->ops->name ? ld->ops->name : "???", i);
237 tty_ldisc_put(ld); 243 put_ldisc(ld);
238 return 0; 244 return 0;
239} 245}
240 246
@@ -288,20 +294,17 @@ static void tty_ldisc_assign(struct tty_struct *tty, struct tty_ldisc *ld)
288 * Locking: takes tty_ldisc_lock 294 * Locking: takes tty_ldisc_lock
289 */ 295 */
290 296
291static int tty_ldisc_try(struct tty_struct *tty) 297static struct tty_ldisc *tty_ldisc_try(struct tty_struct *tty)
292{ 298{
293 unsigned long flags; 299 unsigned long flags;
294 struct tty_ldisc *ld; 300 struct tty_ldisc *ld;
295 int ret = 0;
296 301
297 spin_lock_irqsave(&tty_ldisc_lock, flags); 302 spin_lock_irqsave(&tty_ldisc_lock, flags);
298 ld = tty->ldisc; 303 ld = NULL;
299 if (test_bit(TTY_LDISC, &tty->flags)) { 304 if (test_bit(TTY_LDISC, &tty->flags))
300 ld->refcount++; 305 ld = get_ldisc(tty->ldisc);
301 ret = 1;
302 }
303 spin_unlock_irqrestore(&tty_ldisc_lock, flags); 306 spin_unlock_irqrestore(&tty_ldisc_lock, flags);
304 return ret; 307 return ld;
305} 308}
306 309
307/** 310/**
@@ -322,10 +325,11 @@ static int tty_ldisc_try(struct tty_struct *tty)
322 325
323struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *tty) 326struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *tty)
324{ 327{
328 struct tty_ldisc *ld;
329
325 /* wait_event is a macro */ 330 /* wait_event is a macro */
326 wait_event(tty_ldisc_wait, tty_ldisc_try(tty)); 331 wait_event(tty_ldisc_wait, (ld = tty_ldisc_try(tty)) != NULL);
327 WARN_ON(tty->ldisc->refcount == 0); 332 return ld;
328 return tty->ldisc;
329} 333}
330EXPORT_SYMBOL_GPL(tty_ldisc_ref_wait); 334EXPORT_SYMBOL_GPL(tty_ldisc_ref_wait);
331 335
@@ -342,9 +346,7 @@ EXPORT_SYMBOL_GPL(tty_ldisc_ref_wait);
342 346
343struct tty_ldisc *tty_ldisc_ref(struct tty_struct *tty) 347struct tty_ldisc *tty_ldisc_ref(struct tty_struct *tty)
344{ 348{
345 if (tty_ldisc_try(tty)) 349 return tty_ldisc_try(tty);
346 return tty->ldisc;
347 return NULL;
348} 350}
349EXPORT_SYMBOL_GPL(tty_ldisc_ref); 351EXPORT_SYMBOL_GPL(tty_ldisc_ref);
350 352
@@ -360,21 +362,15 @@ EXPORT_SYMBOL_GPL(tty_ldisc_ref);
360 362
361void tty_ldisc_deref(struct tty_ldisc *ld) 363void tty_ldisc_deref(struct tty_ldisc *ld)
362{ 364{
363 unsigned long flags; 365 put_ldisc(ld);
364
365 BUG_ON(ld == NULL);
366
367 spin_lock_irqsave(&tty_ldisc_lock, flags);
368 if (ld->refcount == 0)
369 printk(KERN_ERR "tty_ldisc_deref: no references.\n");
370 else
371 ld->refcount--;
372 if (ld->refcount == 0)
373 wake_up(&tty_ldisc_wait);
374 spin_unlock_irqrestore(&tty_ldisc_lock, flags);
375} 366}
376EXPORT_SYMBOL_GPL(tty_ldisc_deref); 367EXPORT_SYMBOL_GPL(tty_ldisc_deref);
377 368
369static inline void tty_ldisc_put(struct tty_ldisc *ld)
370{
371 put_ldisc(ld);
372}
373
378/** 374/**
379 * tty_ldisc_enable - allow ldisc use 375 * tty_ldisc_enable - allow ldisc use
380 * @tty: terminal to activate ldisc on 376 * @tty: terminal to activate ldisc on
@@ -523,31 +519,6 @@ static int tty_ldisc_halt(struct tty_struct *tty)
523} 519}
524 520
525/** 521/**
526 * tty_ldisc_wait_idle - wait for the ldisc to become idle
527 * @tty: tty to wait for
528 *
529 * Wait for the line discipline to become idle. The discipline must
530 * have been halted for this to guarantee it remains idle.
531 *
532 * tty_ldisc_lock protects the ref counts currently.
533 */
534
535static int tty_ldisc_wait_idle(struct tty_struct *tty)
536{
537 unsigned long flags;
538 spin_lock_irqsave(&tty_ldisc_lock, flags);
539 while (tty->ldisc->refcount) {
540 spin_unlock_irqrestore(&tty_ldisc_lock, flags);
541 if (wait_event_timeout(tty_ldisc_wait,
542 tty->ldisc->refcount == 0, 5 * HZ) == 0)
543 return -EBUSY;
544 spin_lock_irqsave(&tty_ldisc_lock, flags);
545 }
546 spin_unlock_irqrestore(&tty_ldisc_lock, flags);
547 return 0;
548}
549
550/**
551 * tty_set_ldisc - set line discipline 522 * tty_set_ldisc - set line discipline
552 * @tty: the terminal to set 523 * @tty: the terminal to set
553 * @ldisc: the line discipline 524 * @ldisc: the line discipline
@@ -642,14 +613,6 @@ int tty_set_ldisc(struct tty_struct *tty, int ldisc)
642 613
643 flush_scheduled_work(); 614 flush_scheduled_work();
644 615
645 /* Let any existing reference holders finish */
646 retval = tty_ldisc_wait_idle(tty);
647 if (retval < 0) {
648 clear_bit(TTY_LDISC_CHANGING, &tty->flags);
649 tty_ldisc_put(new_ldisc);
650 return retval;
651 }
652
653 mutex_lock(&tty->ldisc_mutex); 616 mutex_lock(&tty->ldisc_mutex);
654 if (test_bit(TTY_HUPPED, &tty->flags)) { 617 if (test_bit(TTY_HUPPED, &tty->flags)) {
655 /* We were raced by the hangup method. It will have stomped 618 /* We were raced by the hangup method. It will have stomped
@@ -795,7 +758,6 @@ void tty_ldisc_hangup(struct tty_struct *tty)
795 if (tty->ldisc) { /* Not yet closed */ 758 if (tty->ldisc) { /* Not yet closed */
796 /* Switch back to N_TTY */ 759 /* Switch back to N_TTY */
797 tty_ldisc_halt(tty); 760 tty_ldisc_halt(tty);
798 tty_ldisc_wait_idle(tty);
799 tty_ldisc_reinit(tty); 761 tty_ldisc_reinit(tty);
800 /* At this point we have a closed ldisc and we want to 762 /* At this point we have a closed ldisc and we want to
801 reopen it. We could defer this to the next open but 763 reopen it. We could defer this to the next open but
@@ -860,14 +822,6 @@ void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty)
860 tty_ldisc_halt(tty); 822 tty_ldisc_halt(tty);
861 flush_scheduled_work(); 823 flush_scheduled_work();
862 824
863 /*
864 * Wait for any short term users (we know they are just driver
865 * side waiters as the file is closing so user count on the file
866 * side is zero.
867 */
868
869 tty_ldisc_wait_idle(tty);
870
871 mutex_lock(&tty->ldisc_mutex); 825 mutex_lock(&tty->ldisc_mutex);
872 /* 826 /*
873 * Now kill off the ldisc 827 * Now kill off the ldisc
diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c
index d94d25c12aa..c1791a63d99 100644
--- a/drivers/char/vc_screen.c
+++ b/drivers/char/vc_screen.c
@@ -495,11 +495,15 @@ void vcs_remove_sysfs(int index)
495 495
496int __init vcs_init(void) 496int __init vcs_init(void)
497{ 497{
498 unsigned int i;
499
498 if (register_chrdev(VCS_MAJOR, "vcs", &vcs_fops)) 500 if (register_chrdev(VCS_MAJOR, "vcs", &vcs_fops))
499 panic("unable to get major %d for vcs device", VCS_MAJOR); 501 panic("unable to get major %d for vcs device", VCS_MAJOR);
500 vc_class = class_create(THIS_MODULE, "vc"); 502 vc_class = class_create(THIS_MODULE, "vc");
501 503
502 device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs"); 504 device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs");
503 device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa"); 505 device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa");
506 for (i = 0; i < MIN_NR_CONSOLES; i++)
507 vcs_make_sysfs(i);
504 return 0; 508 return 0;
505} 509}
diff --git a/drivers/char/vr41xx_giu.c b/drivers/char/vr41xx_giu.c
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/drivers/char/vr41xx_giu.c
+++ /dev/null
diff --git a/drivers/connector/cn_queue.c b/drivers/connector/cn_queue.c
index c769ef269fb..408c2af25d5 100644
--- a/drivers/connector/cn_queue.c
+++ b/drivers/connector/cn_queue.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * cn_queue.c 2 * cn_queue.c
3 * 3 *
4 * 2004-2005 Copyright (c) Evgeniy Polyakov <johnpol@2ka.mipt.ru> 4 * 2004+ Copyright (c) Evgeniy Polyakov <zbr@ioremap.net>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index fd336c5a905..08b2500f21e 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * connector.c 2 * connector.c
3 * 3 *
4 * 2004-2005 Copyright (c) Evgeniy Polyakov <johnpol@2ka.mipt.ru> 4 * 2004+ Copyright (c) Evgeniy Polyakov <zbr@ioremap.net>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
@@ -33,7 +33,7 @@
33#include <net/sock.h> 33#include <net/sock.h>
34 34
35MODULE_LICENSE("GPL"); 35MODULE_LICENSE("GPL");
36MODULE_AUTHOR("Evgeniy Polyakov <johnpol@2ka.mipt.ru>"); 36MODULE_AUTHOR("Evgeniy Polyakov <zbr@ioremap.net>");
37MODULE_DESCRIPTION("Generic userspace <-> kernelspace connector."); 37MODULE_DESCRIPTION("Generic userspace <-> kernelspace connector.");
38 38
39static u32 cn_idx = CN_IDX_CONNECTOR; 39static u32 cn_idx = CN_IDX_CONNECTOR;
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index b90eda8b344..fd69086d08d 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -858,6 +858,8 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
858 858
859 /* Check for existing affected CPUs. 859 /* Check for existing affected CPUs.
860 * They may not be aware of it due to CPU Hotplug. 860 * They may not be aware of it due to CPU Hotplug.
861 * cpufreq_cpu_put is called when the device is removed
862 * in __cpufreq_remove_dev()
861 */ 863 */
862 managed_policy = cpufreq_cpu_get(j); 864 managed_policy = cpufreq_cpu_get(j);
863 if (unlikely(managed_policy)) { 865 if (unlikely(managed_policy)) {
@@ -884,7 +886,7 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
884 ret = sysfs_create_link(&sys_dev->kobj, 886 ret = sysfs_create_link(&sys_dev->kobj,
885 &managed_policy->kobj, 887 &managed_policy->kobj,
886 "cpufreq"); 888 "cpufreq");
887 if (!ret) 889 if (ret)
888 cpufreq_cpu_put(managed_policy); 890 cpufreq_cpu_put(managed_policy);
889 /* 891 /*
890 * Success. We only needed to be added to the mask. 892 * Success. We only needed to be added to the mask.
@@ -924,6 +926,8 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
924 926
925 spin_lock_irqsave(&cpufreq_driver_lock, flags); 927 spin_lock_irqsave(&cpufreq_driver_lock, flags);
926 for_each_cpu(j, policy->cpus) { 928 for_each_cpu(j, policy->cpus) {
929 if (!cpu_online(j))
930 continue;
927 per_cpu(cpufreq_cpu_data, j) = policy; 931 per_cpu(cpufreq_cpu_data, j) = policy;
928 per_cpu(policy_cpu, j) = policy->cpu; 932 per_cpu(policy_cpu, j) = policy->cpu;
929 } 933 }
@@ -1244,13 +1248,22 @@ EXPORT_SYMBOL(cpufreq_get);
1244 1248
1245static int cpufreq_suspend(struct sys_device *sysdev, pm_message_t pmsg) 1249static int cpufreq_suspend(struct sys_device *sysdev, pm_message_t pmsg)
1246{ 1250{
1247 int cpu = sysdev->id;
1248 int ret = 0; 1251 int ret = 0;
1252
1253#ifdef __powerpc__
1254 int cpu = sysdev->id;
1249 unsigned int cur_freq = 0; 1255 unsigned int cur_freq = 0;
1250 struct cpufreq_policy *cpu_policy; 1256 struct cpufreq_policy *cpu_policy;
1251 1257
1252 dprintk("suspending cpu %u\n", cpu); 1258 dprintk("suspending cpu %u\n", cpu);
1253 1259
1260 /*
1261 * This whole bogosity is here because Powerbooks are made of fail.
1262 * No sane platform should need any of the code below to be run.
1263 * (it's entirely the wrong thing to do, as driver->get may
1264 * reenable interrupts on some architectures).
1265 */
1266
1254 if (!cpu_online(cpu)) 1267 if (!cpu_online(cpu))
1255 return 0; 1268 return 0;
1256 1269
@@ -1309,6 +1322,7 @@ static int cpufreq_suspend(struct sys_device *sysdev, pm_message_t pmsg)
1309 1322
1310out: 1323out:
1311 cpufreq_cpu_put(cpu_policy); 1324 cpufreq_cpu_put(cpu_policy);
1325#endif /* __powerpc__ */
1312 return ret; 1326 return ret;
1313} 1327}
1314 1328
@@ -1322,12 +1336,18 @@ out:
1322 */ 1336 */
1323static int cpufreq_resume(struct sys_device *sysdev) 1337static int cpufreq_resume(struct sys_device *sysdev)
1324{ 1338{
1325 int cpu = sysdev->id;
1326 int ret = 0; 1339 int ret = 0;
1340
1341#ifdef __powerpc__
1342 int cpu = sysdev->id;
1327 struct cpufreq_policy *cpu_policy; 1343 struct cpufreq_policy *cpu_policy;
1328 1344
1329 dprintk("resuming cpu %u\n", cpu); 1345 dprintk("resuming cpu %u\n", cpu);
1330 1346
1347 /* As with the ->suspend method, all the code below is
1348 * only necessary because Powerbooks suck.
1349 * See commit 42d4dc3f4e1e for jokes. */
1350
1331 if (!cpu_online(cpu)) 1351 if (!cpu_online(cpu))
1332 return 0; 1352 return 0;
1333 1353
@@ -1391,6 +1411,7 @@ out:
1391 schedule_work(&cpu_policy->update); 1411 schedule_work(&cpu_policy->update);
1392fail: 1412fail:
1393 cpufreq_cpu_put(cpu_policy); 1413 cpufreq_cpu_put(cpu_policy);
1414#endif /* __powerpc__ */
1394 return ret; 1415 return ret;
1395} 1416}
1396 1417
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index 57490502b21..bdea7e2f94b 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -63,6 +63,7 @@ struct cpu_dbs_info_s {
63 unsigned int down_skip; 63 unsigned int down_skip;
64 unsigned int requested_freq; 64 unsigned int requested_freq;
65 int cpu; 65 int cpu;
66 unsigned int enable:1;
66 /* 67 /*
67 * percpu mutex that serializes governor limit change with 68 * percpu mutex that serializes governor limit change with
68 * do_dbs_timer invocation. We do not want do_dbs_timer to run 69 * do_dbs_timer invocation. We do not want do_dbs_timer to run
@@ -141,6 +142,9 @@ dbs_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
141 142
142 struct cpufreq_policy *policy; 143 struct cpufreq_policy *policy;
143 144
145 if (!this_dbs_info->enable)
146 return 0;
147
144 policy = this_dbs_info->cur_policy; 148 policy = this_dbs_info->cur_policy;
145 149
146 /* 150 /*
@@ -497,6 +501,7 @@ static inline void dbs_timer_init(struct cpu_dbs_info_s *dbs_info)
497 int delay = usecs_to_jiffies(dbs_tuners_ins.sampling_rate); 501 int delay = usecs_to_jiffies(dbs_tuners_ins.sampling_rate);
498 delay -= jiffies % delay; 502 delay -= jiffies % delay;
499 503
504 dbs_info->enable = 1;
500 INIT_DELAYED_WORK_DEFERRABLE(&dbs_info->work, do_dbs_timer); 505 INIT_DELAYED_WORK_DEFERRABLE(&dbs_info->work, do_dbs_timer);
501 queue_delayed_work_on(dbs_info->cpu, kconservative_wq, &dbs_info->work, 506 queue_delayed_work_on(dbs_info->cpu, kconservative_wq, &dbs_info->work,
502 delay); 507 delay);
@@ -504,6 +509,7 @@ static inline void dbs_timer_init(struct cpu_dbs_info_s *dbs_info)
504 509
505static inline void dbs_timer_exit(struct cpu_dbs_info_s *dbs_info) 510static inline void dbs_timer_exit(struct cpu_dbs_info_s *dbs_info)
506{ 511{
512 dbs_info->enable = 0;
507 cancel_delayed_work_sync(&dbs_info->work); 513 cancel_delayed_work_sync(&dbs_info->work);
508} 514}
509 515
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 070357aaedb..81e1020fb51 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -4,7 +4,7 @@
4 4
5menuconfig DMADEVICES 5menuconfig DMADEVICES
6 bool "DMA Engine support" 6 bool "DMA Engine support"
7 depends on !HIGHMEM64G && HAS_DMA 7 depends on HAS_DMA
8 help 8 help
9 DMA engines can do asynchronous data transfers without 9 DMA engines can do asynchronous data transfers without
10 involving the host CPU. Currently, this framework can be 10 involving the host CPU. Currently, this framework can be
@@ -46,6 +46,14 @@ config DW_DMAC
46 Support the Synopsys DesignWare AHB DMA controller. This 46 Support the Synopsys DesignWare AHB DMA controller. This
47 can be integrated in chips such as the Atmel AT32ap7000. 47 can be integrated in chips such as the Atmel AT32ap7000.
48 48
49config AT_HDMAC
50 tristate "Atmel AHB DMA support"
51 depends on ARCH_AT91SAM9RL
52 select DMA_ENGINE
53 help
54 Support the Atmel AHB DMA controller. This can be integrated in
55 chips such as the Atmel AT91SAM9RL.
56
49config FSL_DMA 57config FSL_DMA
50 tristate "Freescale Elo and Elo Plus DMA support" 58 tristate "Freescale Elo and Elo Plus DMA support"
51 depends on FSL_SOC 59 depends on FSL_SOC
@@ -108,7 +116,7 @@ config NET_DMA
108 116
109config ASYNC_TX_DMA 117config ASYNC_TX_DMA
110 bool "Async_tx: Offload support for the async_tx api" 118 bool "Async_tx: Offload support for the async_tx api"
111 depends on DMA_ENGINE 119 depends on DMA_ENGINE && !HIGHMEM64G
112 help 120 help
113 This allows the async_tx api to take advantage of offload engines for 121 This allows the async_tx api to take advantage of offload engines for
114 memcpy, memset, xor, and raid6 p+q operations. If your platform has 122 memcpy, memset, xor, and raid6 p+q operations. If your platform has
diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
index a0b6564800c..40e1e008357 100644
--- a/drivers/dma/Makefile
+++ b/drivers/dma/Makefile
@@ -7,5 +7,6 @@ obj-$(CONFIG_INTEL_IOP_ADMA) += iop-adma.o
7obj-$(CONFIG_FSL_DMA) += fsldma.o 7obj-$(CONFIG_FSL_DMA) += fsldma.o
8obj-$(CONFIG_MV_XOR) += mv_xor.o 8obj-$(CONFIG_MV_XOR) += mv_xor.o
9obj-$(CONFIG_DW_DMAC) += dw_dmac.o 9obj-$(CONFIG_DW_DMAC) += dw_dmac.o
10obj-$(CONFIG_AT_HDMAC) += at_hdmac.o
10obj-$(CONFIG_MX3_IPU) += ipu/ 11obj-$(CONFIG_MX3_IPU) += ipu/
11obj-$(CONFIG_TXX9_DMAC) += txx9dmac.o 12obj-$(CONFIG_TXX9_DMAC) += txx9dmac.o
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
new file mode 100644
index 00000000000..9a1e5fb412e
--- /dev/null
+++ b/drivers/dma/at_hdmac.c
@@ -0,0 +1,1213 @@
1/*
2 * Driver for the Atmel AHB DMA Controller (aka HDMA or DMAC on AT91 systems)
3 *
4 * Copyright (C) 2008 Atmel Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 *
12 * This supports the Atmel AHB DMA Controller,
13 *
14 * The driver has currently been tested with the Atmel AT91SAM9RL
15 * and AT91SAM9G45 series.
16 */
17
18#include <linux/clk.h>
19#include <linux/dmaengine.h>
20#include <linux/dma-mapping.h>
21#include <linux/dmapool.h>
22#include <linux/interrupt.h>
23#include <linux/module.h>
24#include <linux/platform_device.h>
25
26#include "at_hdmac_regs.h"
27
28/*
29 * Glossary
30 * --------
31 *
32 * at_hdmac : Name of the ATmel AHB DMA Controller
33 * at_dma_ / atdma : ATmel DMA controller entity related
34 * atc_ / atchan : ATmel DMA Channel entity related
35 */
36
37#define ATC_DEFAULT_CFG (ATC_FIFOCFG_HALFFIFO)
38#define ATC_DEFAULT_CTRLA (0)
39#define ATC_DEFAULT_CTRLB (ATC_SIF(0) \
40 |ATC_DIF(1))
41
42/*
43 * Initial number of descriptors to allocate for each channel. This could
44 * be increased during dma usage.
45 */
46static unsigned int init_nr_desc_per_channel = 64;
47module_param(init_nr_desc_per_channel, uint, 0644);
48MODULE_PARM_DESC(init_nr_desc_per_channel,
49 "initial descriptors per channel (default: 64)");
50
51
52/* prototypes */
53static dma_cookie_t atc_tx_submit(struct dma_async_tx_descriptor *tx);
54
55
56/*----------------------------------------------------------------------*/
57
58static struct at_desc *atc_first_active(struct at_dma_chan *atchan)
59{
60 return list_first_entry(&atchan->active_list,
61 struct at_desc, desc_node);
62}
63
64static struct at_desc *atc_first_queued(struct at_dma_chan *atchan)
65{
66 return list_first_entry(&atchan->queue,
67 struct at_desc, desc_node);
68}
69
70/**
71 * atc_alloc_descriptor - allocate and return an initilized descriptor
72 * @chan: the channel to allocate descriptors for
73 * @gfp_flags: GFP allocation flags
74 *
75 * Note: The ack-bit is positioned in the descriptor flag at creation time
76 * to make initial allocation more convenient. This bit will be cleared
77 * and control will be given to client at usage time (during
78 * preparation functions).
79 */
80static struct at_desc *atc_alloc_descriptor(struct dma_chan *chan,
81 gfp_t gfp_flags)
82{
83 struct at_desc *desc = NULL;
84 struct at_dma *atdma = to_at_dma(chan->device);
85 dma_addr_t phys;
86
87 desc = dma_pool_alloc(atdma->dma_desc_pool, gfp_flags, &phys);
88 if (desc) {
89 memset(desc, 0, sizeof(struct at_desc));
90 dma_async_tx_descriptor_init(&desc->txd, chan);
91 /* txd.flags will be overwritten in prep functions */
92 desc->txd.flags = DMA_CTRL_ACK;
93 desc->txd.tx_submit = atc_tx_submit;
94 desc->txd.phys = phys;
95 }
96
97 return desc;
98}
99
100/**
101 * atc_desc_get - get a unsused descriptor from free_list
102 * @atchan: channel we want a new descriptor for
103 */
104static struct at_desc *atc_desc_get(struct at_dma_chan *atchan)
105{
106 struct at_desc *desc, *_desc;
107 struct at_desc *ret = NULL;
108 unsigned int i = 0;
109 LIST_HEAD(tmp_list);
110
111 spin_lock_bh(&atchan->lock);
112 list_for_each_entry_safe(desc, _desc, &atchan->free_list, desc_node) {
113 i++;
114 if (async_tx_test_ack(&desc->txd)) {
115 list_del(&desc->desc_node);
116 ret = desc;
117 break;
118 }
119 dev_dbg(chan2dev(&atchan->chan_common),
120 "desc %p not ACKed\n", desc);
121 }
122 spin_unlock_bh(&atchan->lock);
123 dev_vdbg(chan2dev(&atchan->chan_common),
124 "scanned %u descriptors on freelist\n", i);
125
126 /* no more descriptor available in initial pool: create one more */
127 if (!ret) {
128 ret = atc_alloc_descriptor(&atchan->chan_common, GFP_ATOMIC);
129 if (ret) {
130 spin_lock_bh(&atchan->lock);
131 atchan->descs_allocated++;
132 spin_unlock_bh(&atchan->lock);
133 } else {
134 dev_err(chan2dev(&atchan->chan_common),
135 "not enough descriptors available\n");
136 }
137 }
138
139 return ret;
140}
141
142/**
143 * atc_desc_put - move a descriptor, including any children, to the free list
144 * @atchan: channel we work on
145 * @desc: descriptor, at the head of a chain, to move to free list
146 */
147static void atc_desc_put(struct at_dma_chan *atchan, struct at_desc *desc)
148{
149 if (desc) {
150 struct at_desc *child;
151
152 spin_lock_bh(&atchan->lock);
153 list_for_each_entry(child, &desc->txd.tx_list, desc_node)
154 dev_vdbg(chan2dev(&atchan->chan_common),
155 "moving child desc %p to freelist\n",
156 child);
157 list_splice_init(&desc->txd.tx_list, &atchan->free_list);
158 dev_vdbg(chan2dev(&atchan->chan_common),
159 "moving desc %p to freelist\n", desc);
160 list_add(&desc->desc_node, &atchan->free_list);
161 spin_unlock_bh(&atchan->lock);
162 }
163}
164
165/**
166 * atc_assign_cookie - compute and assign new cookie
167 * @atchan: channel we work on
168 * @desc: descriptor to asign cookie for
169 *
170 * Called with atchan->lock held and bh disabled
171 */
172static dma_cookie_t
173atc_assign_cookie(struct at_dma_chan *atchan, struct at_desc *desc)
174{
175 dma_cookie_t cookie = atchan->chan_common.cookie;
176
177 if (++cookie < 0)
178 cookie = 1;
179
180 atchan->chan_common.cookie = cookie;
181 desc->txd.cookie = cookie;
182
183 return cookie;
184}
185
186/**
187 * atc_dostart - starts the DMA engine for real
188 * @atchan: the channel we want to start
189 * @first: first descriptor in the list we want to begin with
190 *
191 * Called with atchan->lock held and bh disabled
192 */
193static void atc_dostart(struct at_dma_chan *atchan, struct at_desc *first)
194{
195 struct at_dma *atdma = to_at_dma(atchan->chan_common.device);
196
197 /* ASSERT: channel is idle */
198 if (atc_chan_is_enabled(atchan)) {
199 dev_err(chan2dev(&atchan->chan_common),
200 "BUG: Attempted to start non-idle channel\n");
201 dev_err(chan2dev(&atchan->chan_common),
202 " channel: s0x%x d0x%x ctrl0x%x:0x%x l0x%x\n",
203 channel_readl(atchan, SADDR),
204 channel_readl(atchan, DADDR),
205 channel_readl(atchan, CTRLA),
206 channel_readl(atchan, CTRLB),
207 channel_readl(atchan, DSCR));
208
209 /* The tasklet will hopefully advance the queue... */
210 return;
211 }
212
213 vdbg_dump_regs(atchan);
214
215 /* clear any pending interrupt */
216 while (dma_readl(atdma, EBCISR))
217 cpu_relax();
218
219 channel_writel(atchan, SADDR, 0);
220 channel_writel(atchan, DADDR, 0);
221 channel_writel(atchan, CTRLA, 0);
222 channel_writel(atchan, CTRLB, 0);
223 channel_writel(atchan, DSCR, first->txd.phys);
224 dma_writel(atdma, CHER, atchan->mask);
225
226 vdbg_dump_regs(atchan);
227}
228
229/**
230 * atc_chain_complete - finish work for one transaction chain
231 * @atchan: channel we work on
232 * @desc: descriptor at the head of the chain we want do complete
233 *
234 * Called with atchan->lock held and bh disabled */
235static void
236atc_chain_complete(struct at_dma_chan *atchan, struct at_desc *desc)
237{
238 dma_async_tx_callback callback;
239 void *param;
240 struct dma_async_tx_descriptor *txd = &desc->txd;
241
242 dev_vdbg(chan2dev(&atchan->chan_common),
243 "descriptor %u complete\n", txd->cookie);
244
245 atchan->completed_cookie = txd->cookie;
246 callback = txd->callback;
247 param = txd->callback_param;
248
249 /* move children to free_list */
250 list_splice_init(&txd->tx_list, &atchan->free_list);
251 /* move myself to free_list */
252 list_move(&desc->desc_node, &atchan->free_list);
253
254 /* unmap dma addresses */
255 if (!(txd->flags & DMA_COMPL_SKIP_DEST_UNMAP)) {
256 if (txd->flags & DMA_COMPL_DEST_UNMAP_SINGLE)
257 dma_unmap_single(chan2parent(&atchan->chan_common),
258 desc->lli.daddr,
259 desc->len, DMA_FROM_DEVICE);
260 else
261 dma_unmap_page(chan2parent(&atchan->chan_common),
262 desc->lli.daddr,
263 desc->len, DMA_FROM_DEVICE);
264 }
265 if (!(txd->flags & DMA_COMPL_SKIP_SRC_UNMAP)) {
266 if (txd->flags & DMA_COMPL_SRC_UNMAP_SINGLE)
267 dma_unmap_single(chan2parent(&atchan->chan_common),
268 desc->lli.saddr,
269 desc->len, DMA_TO_DEVICE);
270 else
271 dma_unmap_page(chan2parent(&atchan->chan_common),
272 desc->lli.saddr,
273 desc->len, DMA_TO_DEVICE);
274 }
275
276 /*
277 * The API requires that no submissions are done from a
278 * callback, so we don't need to drop the lock here
279 */
280 if (callback)
281 callback(param);
282
283 dma_run_dependencies(txd);
284}
285
286/**
287 * atc_complete_all - finish work for all transactions
288 * @atchan: channel to complete transactions for
289 *
290 * Eventually submit queued descriptors if any
291 *
292 * Assume channel is idle while calling this function
293 * Called with atchan->lock held and bh disabled
294 */
295static void atc_complete_all(struct at_dma_chan *atchan)
296{
297 struct at_desc *desc, *_desc;
298 LIST_HEAD(list);
299
300 dev_vdbg(chan2dev(&atchan->chan_common), "complete all\n");
301
302 BUG_ON(atc_chan_is_enabled(atchan));
303
304 /*
305 * Submit queued descriptors ASAP, i.e. before we go through
306 * the completed ones.
307 */
308 if (!list_empty(&atchan->queue))
309 atc_dostart(atchan, atc_first_queued(atchan));
310 /* empty active_list now it is completed */
311 list_splice_init(&atchan->active_list, &list);
312 /* empty queue list by moving descriptors (if any) to active_list */
313 list_splice_init(&atchan->queue, &atchan->active_list);
314
315 list_for_each_entry_safe(desc, _desc, &list, desc_node)
316 atc_chain_complete(atchan, desc);
317}
318
319/**
320 * atc_cleanup_descriptors - cleanup up finished descriptors in active_list
321 * @atchan: channel to be cleaned up
322 *
323 * Called with atchan->lock held and bh disabled
324 */
325static void atc_cleanup_descriptors(struct at_dma_chan *atchan)
326{
327 struct at_desc *desc, *_desc;
328 struct at_desc *child;
329
330 dev_vdbg(chan2dev(&atchan->chan_common), "cleanup descriptors\n");
331
332 list_for_each_entry_safe(desc, _desc, &atchan->active_list, desc_node) {
333 if (!(desc->lli.ctrla & ATC_DONE))
334 /* This one is currently in progress */
335 return;
336
337 list_for_each_entry(child, &desc->txd.tx_list, desc_node)
338 if (!(child->lli.ctrla & ATC_DONE))
339 /* Currently in progress */
340 return;
341
342 /*
343 * No descriptors so far seem to be in progress, i.e.
344 * this chain must be done.
345 */
346 atc_chain_complete(atchan, desc);
347 }
348}
349
350/**
351 * atc_advance_work - at the end of a transaction, move forward
352 * @atchan: channel where the transaction ended
353 *
354 * Called with atchan->lock held and bh disabled
355 */
356static void atc_advance_work(struct at_dma_chan *atchan)
357{
358 dev_vdbg(chan2dev(&atchan->chan_common), "advance_work\n");
359
360 if (list_empty(&atchan->active_list) ||
361 list_is_singular(&atchan->active_list)) {
362 atc_complete_all(atchan);
363 } else {
364 atc_chain_complete(atchan, atc_first_active(atchan));
365 /* advance work */
366 atc_dostart(atchan, atc_first_active(atchan));
367 }
368}
369
370
371/**
372 * atc_handle_error - handle errors reported by DMA controller
373 * @atchan: channel where error occurs
374 *
375 * Called with atchan->lock held and bh disabled
376 */
377static void atc_handle_error(struct at_dma_chan *atchan)
378{
379 struct at_desc *bad_desc;
380 struct at_desc *child;
381
382 /*
383 * The descriptor currently at the head of the active list is
384 * broked. Since we don't have any way to report errors, we'll
385 * just have to scream loudly and try to carry on.
386 */
387 bad_desc = atc_first_active(atchan);
388 list_del_init(&bad_desc->desc_node);
389
390 /* As we are stopped, take advantage to push queued descriptors
391 * in active_list */
392 list_splice_init(&atchan->queue, atchan->active_list.prev);
393
394 /* Try to restart the controller */
395 if (!list_empty(&atchan->active_list))
396 atc_dostart(atchan, atc_first_active(atchan));
397
398 /*
399 * KERN_CRITICAL may seem harsh, but since this only happens
400 * when someone submits a bad physical address in a
401 * descriptor, we should consider ourselves lucky that the
402 * controller flagged an error instead of scribbling over
403 * random memory locations.
404 */
405 dev_crit(chan2dev(&atchan->chan_common),
406 "Bad descriptor submitted for DMA!\n");
407 dev_crit(chan2dev(&atchan->chan_common),
408 " cookie: %d\n", bad_desc->txd.cookie);
409 atc_dump_lli(atchan, &bad_desc->lli);
410 list_for_each_entry(child, &bad_desc->txd.tx_list, desc_node)
411 atc_dump_lli(atchan, &child->lli);
412
413 /* Pretend the descriptor completed successfully */
414 atc_chain_complete(atchan, bad_desc);
415}
416
417
418/*-- IRQ & Tasklet ---------------------------------------------------*/
419
420static void atc_tasklet(unsigned long data)
421{
422 struct at_dma_chan *atchan = (struct at_dma_chan *)data;
423
424 /* Channel cannot be enabled here */
425 if (atc_chan_is_enabled(atchan)) {
426 dev_err(chan2dev(&atchan->chan_common),
427 "BUG: channel enabled in tasklet\n");
428 return;
429 }
430
431 spin_lock(&atchan->lock);
432 if (test_and_clear_bit(0, &atchan->error_status))
433 atc_handle_error(atchan);
434 else
435 atc_advance_work(atchan);
436
437 spin_unlock(&atchan->lock);
438}
439
440static irqreturn_t at_dma_interrupt(int irq, void *dev_id)
441{
442 struct at_dma *atdma = (struct at_dma *)dev_id;
443 struct at_dma_chan *atchan;
444 int i;
445 u32 status, pending, imr;
446 int ret = IRQ_NONE;
447
448 do {
449 imr = dma_readl(atdma, EBCIMR);
450 status = dma_readl(atdma, EBCISR);
451 pending = status & imr;
452
453 if (!pending)
454 break;
455
456 dev_vdbg(atdma->dma_common.dev,
457 "interrupt: status = 0x%08x, 0x%08x, 0x%08x\n",
458 status, imr, pending);
459
460 for (i = 0; i < atdma->dma_common.chancnt; i++) {
461 atchan = &atdma->chan[i];
462 if (pending & (AT_DMA_CBTC(i) | AT_DMA_ERR(i))) {
463 if (pending & AT_DMA_ERR(i)) {
464 /* Disable channel on AHB error */
465 dma_writel(atdma, CHDR, atchan->mask);
466 /* Give information to tasklet */
467 set_bit(0, &atchan->error_status);
468 }
469 tasklet_schedule(&atchan->tasklet);
470 ret = IRQ_HANDLED;
471 }
472 }
473
474 } while (pending);
475
476 return ret;
477}
478
479
480/*-- DMA Engine API --------------------------------------------------*/
481
482/**
483 * atc_tx_submit - set the prepared descriptor(s) to be executed by the engine
484 * @desc: descriptor at the head of the transaction chain
485 *
486 * Queue chain if DMA engine is working already
487 *
488 * Cookie increment and adding to active_list or queue must be atomic
489 */
490static dma_cookie_t atc_tx_submit(struct dma_async_tx_descriptor *tx)
491{
492 struct at_desc *desc = txd_to_at_desc(tx);
493 struct at_dma_chan *atchan = to_at_dma_chan(tx->chan);
494 dma_cookie_t cookie;
495
496 spin_lock_bh(&atchan->lock);
497 cookie = atc_assign_cookie(atchan, desc);
498
499 if (list_empty(&atchan->active_list)) {
500 dev_vdbg(chan2dev(tx->chan), "tx_submit: started %u\n",
501 desc->txd.cookie);
502 atc_dostart(atchan, desc);
503 list_add_tail(&desc->desc_node, &atchan->active_list);
504 } else {
505 dev_vdbg(chan2dev(tx->chan), "tx_submit: queued %u\n",
506 desc->txd.cookie);
507 list_add_tail(&desc->desc_node, &atchan->queue);
508 }
509
510 spin_unlock_bh(&atchan->lock);
511
512 return cookie;
513}
514
515/**
516 * atc_prep_dma_memcpy - prepare a memcpy operation
517 * @chan: the channel to prepare operation on
518 * @dest: operation virtual destination address
519 * @src: operation virtual source address
520 * @len: operation length
521 * @flags: tx descriptor status flags
522 */
523static struct dma_async_tx_descriptor *
524atc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
525 size_t len, unsigned long flags)
526{
527 struct at_dma_chan *atchan = to_at_dma_chan(chan);
528 struct at_desc *desc = NULL;
529 struct at_desc *first = NULL;
530 struct at_desc *prev = NULL;
531 size_t xfer_count;
532 size_t offset;
533 unsigned int src_width;
534 unsigned int dst_width;
535 u32 ctrla;
536 u32 ctrlb;
537
538 dev_vdbg(chan2dev(chan), "prep_dma_memcpy: d0x%x s0x%x l0x%zx f0x%lx\n",
539 dest, src, len, flags);
540
541 if (unlikely(!len)) {
542 dev_dbg(chan2dev(chan), "prep_dma_memcpy: length is zero!\n");
543 return NULL;
544 }
545
546 ctrla = ATC_DEFAULT_CTRLA;
547 ctrlb = ATC_DEFAULT_CTRLB
548 | ATC_SRC_ADDR_MODE_INCR
549 | ATC_DST_ADDR_MODE_INCR
550 | ATC_FC_MEM2MEM;
551
552 /*
553 * We can be a lot more clever here, but this should take care
554 * of the most common optimization.
555 */
556 if (!((src | dest | len) & 3)) {
557 ctrla |= ATC_SRC_WIDTH_WORD | ATC_DST_WIDTH_WORD;
558 src_width = dst_width = 2;
559 } else if (!((src | dest | len) & 1)) {
560 ctrla |= ATC_SRC_WIDTH_HALFWORD | ATC_DST_WIDTH_HALFWORD;
561 src_width = dst_width = 1;
562 } else {
563 ctrla |= ATC_SRC_WIDTH_BYTE | ATC_DST_WIDTH_BYTE;
564 src_width = dst_width = 0;
565 }
566
567 for (offset = 0; offset < len; offset += xfer_count << src_width) {
568 xfer_count = min_t(size_t, (len - offset) >> src_width,
569 ATC_BTSIZE_MAX);
570
571 desc = atc_desc_get(atchan);
572 if (!desc)
573 goto err_desc_get;
574
575 desc->lli.saddr = src + offset;
576 desc->lli.daddr = dest + offset;
577 desc->lli.ctrla = ctrla | xfer_count;
578 desc->lli.ctrlb = ctrlb;
579
580 desc->txd.cookie = 0;
581 async_tx_ack(&desc->txd);
582
583 if (!first) {
584 first = desc;
585 } else {
586 /* inform the HW lli about chaining */
587 prev->lli.dscr = desc->txd.phys;
588 /* insert the link descriptor to the LD ring */
589 list_add_tail(&desc->desc_node,
590 &first->txd.tx_list);
591 }
592 prev = desc;
593 }
594
595 /* First descriptor of the chain embedds additional information */
596 first->txd.cookie = -EBUSY;
597 first->len = len;
598
599 /* set end-of-link to the last link descriptor of list*/
600 set_desc_eol(desc);
601
602 desc->txd.flags = flags; /* client is in control of this ack */
603
604 return &first->txd;
605
606err_desc_get:
607 atc_desc_put(atchan, first);
608 return NULL;
609}
610
611
612/**
613 * atc_prep_slave_sg - prepare descriptors for a DMA_SLAVE transaction
614 * @chan: DMA channel
615 * @sgl: scatterlist to transfer to/from
616 * @sg_len: number of entries in @scatterlist
617 * @direction: DMA direction
618 * @flags: tx descriptor status flags
619 */
620static struct dma_async_tx_descriptor *
621atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
622 unsigned int sg_len, enum dma_data_direction direction,
623 unsigned long flags)
624{
625 struct at_dma_chan *atchan = to_at_dma_chan(chan);
626 struct at_dma_slave *atslave = chan->private;
627 struct at_desc *first = NULL;
628 struct at_desc *prev = NULL;
629 u32 ctrla;
630 u32 ctrlb;
631 dma_addr_t reg;
632 unsigned int reg_width;
633 unsigned int mem_width;
634 unsigned int i;
635 struct scatterlist *sg;
636 size_t total_len = 0;
637
638 dev_vdbg(chan2dev(chan), "prep_slave_sg: %s f0x%lx\n",
639 direction == DMA_TO_DEVICE ? "TO DEVICE" : "FROM DEVICE",
640 flags);
641
642 if (unlikely(!atslave || !sg_len)) {
643 dev_dbg(chan2dev(chan), "prep_dma_memcpy: length is zero!\n");
644 return NULL;
645 }
646
647 reg_width = atslave->reg_width;
648
649 sg_len = dma_map_sg(chan2parent(chan), sgl, sg_len, direction);
650
651 ctrla = ATC_DEFAULT_CTRLA | atslave->ctrla;
652 ctrlb = ATC_DEFAULT_CTRLB | ATC_IEN;
653
654 switch (direction) {
655 case DMA_TO_DEVICE:
656 ctrla |= ATC_DST_WIDTH(reg_width);
657 ctrlb |= ATC_DST_ADDR_MODE_FIXED
658 | ATC_SRC_ADDR_MODE_INCR
659 | ATC_FC_MEM2PER;
660 reg = atslave->tx_reg;
661 for_each_sg(sgl, sg, sg_len, i) {
662 struct at_desc *desc;
663 u32 len;
664 u32 mem;
665
666 desc = atc_desc_get(atchan);
667 if (!desc)
668 goto err_desc_get;
669
670 mem = sg_phys(sg);
671 len = sg_dma_len(sg);
672 mem_width = 2;
673 if (unlikely(mem & 3 || len & 3))
674 mem_width = 0;
675
676 desc->lli.saddr = mem;
677 desc->lli.daddr = reg;
678 desc->lli.ctrla = ctrla
679 | ATC_SRC_WIDTH(mem_width)
680 | len >> mem_width;
681 desc->lli.ctrlb = ctrlb;
682
683 if (!first) {
684 first = desc;
685 } else {
686 /* inform the HW lli about chaining */
687 prev->lli.dscr = desc->txd.phys;
688 /* insert the link descriptor to the LD ring */
689 list_add_tail(&desc->desc_node,
690 &first->txd.tx_list);
691 }
692 prev = desc;
693 total_len += len;
694 }
695 break;
696 case DMA_FROM_DEVICE:
697 ctrla |= ATC_SRC_WIDTH(reg_width);
698 ctrlb |= ATC_DST_ADDR_MODE_INCR
699 | ATC_SRC_ADDR_MODE_FIXED
700 | ATC_FC_PER2MEM;
701
702 reg = atslave->rx_reg;
703 for_each_sg(sgl, sg, sg_len, i) {
704 struct at_desc *desc;
705 u32 len;
706 u32 mem;
707
708 desc = atc_desc_get(atchan);
709 if (!desc)
710 goto err_desc_get;
711
712 mem = sg_phys(sg);
713 len = sg_dma_len(sg);
714 mem_width = 2;
715 if (unlikely(mem & 3 || len & 3))
716 mem_width = 0;
717
718 desc->lli.saddr = reg;
719 desc->lli.daddr = mem;
720 desc->lli.ctrla = ctrla
721 | ATC_DST_WIDTH(mem_width)
722 | len >> mem_width;
723 desc->lli.ctrlb = ctrlb;
724
725 if (!first) {
726 first = desc;
727 } else {
728 /* inform the HW lli about chaining */
729 prev->lli.dscr = desc->txd.phys;
730 /* insert the link descriptor to the LD ring */
731 list_add_tail(&desc->desc_node,
732 &first->txd.tx_list);
733 }
734 prev = desc;
735 total_len += len;
736 }
737 break;
738 default:
739 return NULL;
740 }
741
742 /* set end-of-link to the last link descriptor of list*/
743 set_desc_eol(prev);
744
745 /* First descriptor of the chain embedds additional information */
746 first->txd.cookie = -EBUSY;
747 first->len = total_len;
748
749 /* last link descriptor of list is responsible of flags */
750 prev->txd.flags = flags; /* client is in control of this ack */
751
752 return &first->txd;
753
754err_desc_get:
755 dev_err(chan2dev(chan), "not enough descriptors available\n");
756 atc_desc_put(atchan, first);
757 return NULL;
758}
759
760static void atc_terminate_all(struct dma_chan *chan)
761{
762 struct at_dma_chan *atchan = to_at_dma_chan(chan);
763 struct at_dma *atdma = to_at_dma(chan->device);
764 struct at_desc *desc, *_desc;
765 LIST_HEAD(list);
766
767 /*
768 * This is only called when something went wrong elsewhere, so
769 * we don't really care about the data. Just disable the
770 * channel. We still have to poll the channel enable bit due
771 * to AHB/HSB limitations.
772 */
773 spin_lock_bh(&atchan->lock);
774
775 dma_writel(atdma, CHDR, atchan->mask);
776
777 /* confirm that this channel is disabled */
778 while (dma_readl(atdma, CHSR) & atchan->mask)
779 cpu_relax();
780
781 /* active_list entries will end up before queued entries */
782 list_splice_init(&atchan->queue, &list);
783 list_splice_init(&atchan->active_list, &list);
784
785 spin_unlock_bh(&atchan->lock);
786
787 /* Flush all pending and queued descriptors */
788 list_for_each_entry_safe(desc, _desc, &list, desc_node)
789 atc_chain_complete(atchan, desc);
790}
791
792/**
793 * atc_is_tx_complete - poll for transaction completion
794 * @chan: DMA channel
795 * @cookie: transaction identifier to check status of
796 * @done: if not %NULL, updated with last completed transaction
797 * @used: if not %NULL, updated with last used transaction
798 *
799 * If @done and @used are passed in, upon return they reflect the driver
800 * internal state and can be used with dma_async_is_complete() to check
801 * the status of multiple cookies without re-checking hardware state.
802 */
803static enum dma_status
804atc_is_tx_complete(struct dma_chan *chan,
805 dma_cookie_t cookie,
806 dma_cookie_t *done, dma_cookie_t *used)
807{
808 struct at_dma_chan *atchan = to_at_dma_chan(chan);
809 dma_cookie_t last_used;
810 dma_cookie_t last_complete;
811 enum dma_status ret;
812
813 dev_vdbg(chan2dev(chan), "is_tx_complete: %d (d%d, u%d)\n",
814 cookie, done ? *done : 0, used ? *used : 0);
815
816 spin_lock_bh(atchan->lock);
817
818 last_complete = atchan->completed_cookie;
819 last_used = chan->cookie;
820
821 ret = dma_async_is_complete(cookie, last_complete, last_used);
822 if (ret != DMA_SUCCESS) {
823 atc_cleanup_descriptors(atchan);
824
825 last_complete = atchan->completed_cookie;
826 last_used = chan->cookie;
827
828 ret = dma_async_is_complete(cookie, last_complete, last_used);
829 }
830
831 spin_unlock_bh(atchan->lock);
832
833 if (done)
834 *done = last_complete;
835 if (used)
836 *used = last_used;
837
838 return ret;
839}
840
841/**
842 * atc_issue_pending - try to finish work
843 * @chan: target DMA channel
844 */
845static void atc_issue_pending(struct dma_chan *chan)
846{
847 struct at_dma_chan *atchan = to_at_dma_chan(chan);
848
849 dev_vdbg(chan2dev(chan), "issue_pending\n");
850
851 if (!atc_chan_is_enabled(atchan)) {
852 spin_lock_bh(&atchan->lock);
853 atc_advance_work(atchan);
854 spin_unlock_bh(&atchan->lock);
855 }
856}
857
858/**
859 * atc_alloc_chan_resources - allocate resources for DMA channel
860 * @chan: allocate descriptor resources for this channel
861 * @client: current client requesting the channel be ready for requests
862 *
863 * return - the number of allocated descriptors
864 */
865static int atc_alloc_chan_resources(struct dma_chan *chan)
866{
867 struct at_dma_chan *atchan = to_at_dma_chan(chan);
868 struct at_dma *atdma = to_at_dma(chan->device);
869 struct at_desc *desc;
870 struct at_dma_slave *atslave;
871 int i;
872 u32 cfg;
873 LIST_HEAD(tmp_list);
874
875 dev_vdbg(chan2dev(chan), "alloc_chan_resources\n");
876
877 /* ASSERT: channel is idle */
878 if (atc_chan_is_enabled(atchan)) {
879 dev_dbg(chan2dev(chan), "DMA channel not idle ?\n");
880 return -EIO;
881 }
882
883 cfg = ATC_DEFAULT_CFG;
884
885 atslave = chan->private;
886 if (atslave) {
887 /*
888 * We need controller-specific data to set up slave
889 * transfers.
890 */
891 BUG_ON(!atslave->dma_dev || atslave->dma_dev != atdma->dma_common.dev);
892
893 /* if cfg configuration specified take it instad of default */
894 if (atslave->cfg)
895 cfg = atslave->cfg;
896 }
897
898 /* have we already been set up?
899 * reconfigure channel but no need to reallocate descriptors */
900 if (!list_empty(&atchan->free_list))
901 return atchan->descs_allocated;
902
903 /* Allocate initial pool of descriptors */
904 for (i = 0; i < init_nr_desc_per_channel; i++) {
905 desc = atc_alloc_descriptor(chan, GFP_KERNEL);
906 if (!desc) {
907 dev_err(atdma->dma_common.dev,
908 "Only %d initial descriptors\n", i);
909 break;
910 }
911 list_add_tail(&desc->desc_node, &tmp_list);
912 }
913
914 spin_lock_bh(&atchan->lock);
915 atchan->descs_allocated = i;
916 list_splice(&tmp_list, &atchan->free_list);
917 atchan->completed_cookie = chan->cookie = 1;
918 spin_unlock_bh(&atchan->lock);
919
920 /* channel parameters */
921 channel_writel(atchan, CFG, cfg);
922
923 dev_dbg(chan2dev(chan),
924 "alloc_chan_resources: allocated %d descriptors\n",
925 atchan->descs_allocated);
926
927 return atchan->descs_allocated;
928}
929
930/**
931 * atc_free_chan_resources - free all channel resources
932 * @chan: DMA channel
933 */
934static void atc_free_chan_resources(struct dma_chan *chan)
935{
936 struct at_dma_chan *atchan = to_at_dma_chan(chan);
937 struct at_dma *atdma = to_at_dma(chan->device);
938 struct at_desc *desc, *_desc;
939 LIST_HEAD(list);
940
941 dev_dbg(chan2dev(chan), "free_chan_resources: (descs allocated=%u)\n",
942 atchan->descs_allocated);
943
944 /* ASSERT: channel is idle */
945 BUG_ON(!list_empty(&atchan->active_list));
946 BUG_ON(!list_empty(&atchan->queue));
947 BUG_ON(atc_chan_is_enabled(atchan));
948
949 list_for_each_entry_safe(desc, _desc, &atchan->free_list, desc_node) {
950 dev_vdbg(chan2dev(chan), " freeing descriptor %p\n", desc);
951 list_del(&desc->desc_node);
952 /* free link descriptor */
953 dma_pool_free(atdma->dma_desc_pool, desc, desc->txd.phys);
954 }
955 list_splice_init(&atchan->free_list, &list);
956 atchan->descs_allocated = 0;
957
958 dev_vdbg(chan2dev(chan), "free_chan_resources: done\n");
959}
960
961
962/*-- Module Management -----------------------------------------------*/
963
964/**
965 * at_dma_off - disable DMA controller
966 * @atdma: the Atmel HDAMC device
967 */
968static void at_dma_off(struct at_dma *atdma)
969{
970 dma_writel(atdma, EN, 0);
971
972 /* disable all interrupts */
973 dma_writel(atdma, EBCIDR, -1L);
974
975 /* confirm that all channels are disabled */
976 while (dma_readl(atdma, CHSR) & atdma->all_chan_mask)
977 cpu_relax();
978}
979
980static int __init at_dma_probe(struct platform_device *pdev)
981{
982 struct at_dma_platform_data *pdata;
983 struct resource *io;
984 struct at_dma *atdma;
985 size_t size;
986 int irq;
987 int err;
988 int i;
989
990 /* get DMA Controller parameters from platform */
991 pdata = pdev->dev.platform_data;
992 if (!pdata || pdata->nr_channels > AT_DMA_MAX_NR_CHANNELS)
993 return -EINVAL;
994
995 io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
996 if (!io)
997 return -EINVAL;
998
999 irq = platform_get_irq(pdev, 0);
1000 if (irq < 0)
1001 return irq;
1002
1003 size = sizeof(struct at_dma);
1004 size += pdata->nr_channels * sizeof(struct at_dma_chan);
1005 atdma = kzalloc(size, GFP_KERNEL);
1006 if (!atdma)
1007 return -ENOMEM;
1008
1009 /* discover transaction capabilites from the platform data */
1010 atdma->dma_common.cap_mask = pdata->cap_mask;
1011 atdma->all_chan_mask = (1 << pdata->nr_channels) - 1;
1012
1013 size = io->end - io->start + 1;
1014 if (!request_mem_region(io->start, size, pdev->dev.driver->name)) {
1015 err = -EBUSY;
1016 goto err_kfree;
1017 }
1018
1019 atdma->regs = ioremap(io->start, size);
1020 if (!atdma->regs) {
1021 err = -ENOMEM;
1022 goto err_release_r;
1023 }
1024
1025 atdma->clk = clk_get(&pdev->dev, "dma_clk");
1026 if (IS_ERR(atdma->clk)) {
1027 err = PTR_ERR(atdma->clk);
1028 goto err_clk;
1029 }
1030 clk_enable(atdma->clk);
1031
1032 /* force dma off, just in case */
1033 at_dma_off(atdma);
1034
1035 err = request_irq(irq, at_dma_interrupt, 0, "at_hdmac", atdma);
1036 if (err)
1037 goto err_irq;
1038
1039 platform_set_drvdata(pdev, atdma);
1040
1041 /* create a pool of consistent memory blocks for hardware descriptors */
1042 atdma->dma_desc_pool = dma_pool_create("at_hdmac_desc_pool",
1043 &pdev->dev, sizeof(struct at_desc),
1044 4 /* word alignment */, 0);
1045 if (!atdma->dma_desc_pool) {
1046 dev_err(&pdev->dev, "No memory for descriptors dma pool\n");
1047 err = -ENOMEM;
1048 goto err_pool_create;
1049 }
1050
1051 /* clear any pending interrupt */
1052 while (dma_readl(atdma, EBCISR))
1053 cpu_relax();
1054
1055 /* initialize channels related values */
1056 INIT_LIST_HEAD(&atdma->dma_common.channels);
1057 for (i = 0; i < pdata->nr_channels; i++, atdma->dma_common.chancnt++) {
1058 struct at_dma_chan *atchan = &atdma->chan[i];
1059
1060 atchan->chan_common.device = &atdma->dma_common;
1061 atchan->chan_common.cookie = atchan->completed_cookie = 1;
1062 atchan->chan_common.chan_id = i;
1063 list_add_tail(&atchan->chan_common.device_node,
1064 &atdma->dma_common.channels);
1065
1066 atchan->ch_regs = atdma->regs + ch_regs(i);
1067 spin_lock_init(&atchan->lock);
1068 atchan->mask = 1 << i;
1069
1070 INIT_LIST_HEAD(&atchan->active_list);
1071 INIT_LIST_HEAD(&atchan->queue);
1072 INIT_LIST_HEAD(&atchan->free_list);
1073
1074 tasklet_init(&atchan->tasklet, atc_tasklet,
1075 (unsigned long)atchan);
1076 atc_enable_irq(atchan);
1077 }
1078
1079 /* set base routines */
1080 atdma->dma_common.device_alloc_chan_resources = atc_alloc_chan_resources;
1081 atdma->dma_common.device_free_chan_resources = atc_free_chan_resources;
1082 atdma->dma_common.device_is_tx_complete = atc_is_tx_complete;
1083 atdma->dma_common.device_issue_pending = atc_issue_pending;
1084 atdma->dma_common.dev = &pdev->dev;
1085
1086 /* set prep routines based on capability */
1087 if (dma_has_cap(DMA_MEMCPY, atdma->dma_common.cap_mask))
1088 atdma->dma_common.device_prep_dma_memcpy = atc_prep_dma_memcpy;
1089
1090 if (dma_has_cap(DMA_SLAVE, atdma->dma_common.cap_mask)) {
1091 atdma->dma_common.device_prep_slave_sg = atc_prep_slave_sg;
1092 atdma->dma_common.device_terminate_all = atc_terminate_all;
1093 }
1094
1095 dma_writel(atdma, EN, AT_DMA_ENABLE);
1096
1097 dev_info(&pdev->dev, "Atmel AHB DMA Controller ( %s%s), %d channels\n",
1098 dma_has_cap(DMA_MEMCPY, atdma->dma_common.cap_mask) ? "cpy " : "",
1099 dma_has_cap(DMA_SLAVE, atdma->dma_common.cap_mask) ? "slave " : "",
1100 atdma->dma_common.chancnt);
1101
1102 dma_async_device_register(&atdma->dma_common);
1103
1104 return 0;
1105
1106err_pool_create:
1107 platform_set_drvdata(pdev, NULL);
1108 free_irq(platform_get_irq(pdev, 0), atdma);
1109err_irq:
1110 clk_disable(atdma->clk);
1111 clk_put(atdma->clk);
1112err_clk:
1113 iounmap(atdma->regs);
1114 atdma->regs = NULL;
1115err_release_r:
1116 release_mem_region(io->start, size);
1117err_kfree:
1118 kfree(atdma);
1119 return err;
1120}
1121
1122static int __exit at_dma_remove(struct platform_device *pdev)
1123{
1124 struct at_dma *atdma = platform_get_drvdata(pdev);
1125 struct dma_chan *chan, *_chan;
1126 struct resource *io;
1127
1128 at_dma_off(atdma);
1129 dma_async_device_unregister(&atdma->dma_common);
1130
1131 dma_pool_destroy(atdma->dma_desc_pool);
1132 platform_set_drvdata(pdev, NULL);
1133 free_irq(platform_get_irq(pdev, 0), atdma);
1134
1135 list_for_each_entry_safe(chan, _chan, &atdma->dma_common.channels,
1136 device_node) {
1137 struct at_dma_chan *atchan = to_at_dma_chan(chan);
1138
1139 /* Disable interrupts */
1140 atc_disable_irq(atchan);
1141 tasklet_disable(&atchan->tasklet);
1142
1143 tasklet_kill(&atchan->tasklet);
1144 list_del(&chan->device_node);
1145 }
1146
1147 clk_disable(atdma->clk);
1148 clk_put(atdma->clk);
1149
1150 iounmap(atdma->regs);
1151 atdma->regs = NULL;
1152
1153 io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1154 release_mem_region(io->start, io->end - io->start + 1);
1155
1156 kfree(atdma);
1157
1158 return 0;
1159}
1160
1161static void at_dma_shutdown(struct platform_device *pdev)
1162{
1163 struct at_dma *atdma = platform_get_drvdata(pdev);
1164
1165 at_dma_off(platform_get_drvdata(pdev));
1166 clk_disable(atdma->clk);
1167}
1168
1169static int at_dma_suspend_late(struct platform_device *pdev, pm_message_t mesg)
1170{
1171 struct at_dma *atdma = platform_get_drvdata(pdev);
1172
1173 at_dma_off(platform_get_drvdata(pdev));
1174 clk_disable(atdma->clk);
1175 return 0;
1176}
1177
1178static int at_dma_resume_early(struct platform_device *pdev)
1179{
1180 struct at_dma *atdma = platform_get_drvdata(pdev);
1181
1182 clk_enable(atdma->clk);
1183 dma_writel(atdma, EN, AT_DMA_ENABLE);
1184 return 0;
1185
1186}
1187
1188static struct platform_driver at_dma_driver = {
1189 .remove = __exit_p(at_dma_remove),
1190 .shutdown = at_dma_shutdown,
1191 .suspend_late = at_dma_suspend_late,
1192 .resume_early = at_dma_resume_early,
1193 .driver = {
1194 .name = "at_hdmac",
1195 },
1196};
1197
1198static int __init at_dma_init(void)
1199{
1200 return platform_driver_probe(&at_dma_driver, at_dma_probe);
1201}
1202module_init(at_dma_init);
1203
1204static void __exit at_dma_exit(void)
1205{
1206 platform_driver_unregister(&at_dma_driver);
1207}
1208module_exit(at_dma_exit);
1209
1210MODULE_DESCRIPTION("Atmel AHB DMA Controller driver");
1211MODULE_AUTHOR("Nicolas Ferre <nicolas.ferre@atmel.com>");
1212MODULE_LICENSE("GPL");
1213MODULE_ALIAS("platform:at_hdmac");
diff --git a/drivers/dma/at_hdmac_regs.h b/drivers/dma/at_hdmac_regs.h
new file mode 100644
index 00000000000..4c972afc49e
--- /dev/null
+++ b/drivers/dma/at_hdmac_regs.h
@@ -0,0 +1,353 @@
1/*
2 * Header file for the Atmel AHB DMA Controller driver
3 *
4 * Copyright (C) 2008 Atmel Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 */
11#ifndef AT_HDMAC_REGS_H
12#define AT_HDMAC_REGS_H
13
14#include <mach/at_hdmac.h>
15
16#define AT_DMA_MAX_NR_CHANNELS 8
17
18
19#define AT_DMA_GCFG 0x00 /* Global Configuration Register */
20#define AT_DMA_IF_BIGEND(i) (0x1 << (i)) /* AHB-Lite Interface i in Big-endian mode */
21#define AT_DMA_ARB_CFG (0x1 << 4) /* Arbiter mode. */
22#define AT_DMA_ARB_CFG_FIXED (0x0 << 4)
23#define AT_DMA_ARB_CFG_ROUND_ROBIN (0x1 << 4)
24
25#define AT_DMA_EN 0x04 /* Controller Enable Register */
26#define AT_DMA_ENABLE (0x1 << 0)
27
28#define AT_DMA_SREQ 0x08 /* Software Single Request Register */
29#define AT_DMA_SSREQ(x) (0x1 << ((x) << 1)) /* Request a source single transfer on channel x */
30#define AT_DMA_DSREQ(x) (0x1 << (1 + ((x) << 1))) /* Request a destination single transfer on channel x */
31
32#define AT_DMA_CREQ 0x0C /* Software Chunk Transfer Request Register */
33#define AT_DMA_SCREQ(x) (0x1 << ((x) << 1)) /* Request a source chunk transfer on channel x */
34#define AT_DMA_DCREQ(x) (0x1 << (1 + ((x) << 1))) /* Request a destination chunk transfer on channel x */
35
36#define AT_DMA_LAST 0x10 /* Software Last Transfer Flag Register */
37#define AT_DMA_SLAST(x) (0x1 << ((x) << 1)) /* This src rq is last tx of buffer on channel x */
38#define AT_DMA_DLAST(x) (0x1 << (1 + ((x) << 1))) /* This dst rq is last tx of buffer on channel x */
39
40#define AT_DMA_SYNC 0x14 /* Request Synchronization Register */
41#define AT_DMA_SYR(h) (0x1 << (h)) /* Synchronize handshake line h */
42
43/* Error, Chained Buffer transfer completed and Buffer transfer completed Interrupt registers */
44#define AT_DMA_EBCIER 0x18 /* Enable register */
45#define AT_DMA_EBCIDR 0x1C /* Disable register */
46#define AT_DMA_EBCIMR 0x20 /* Mask Register */
47#define AT_DMA_EBCISR 0x24 /* Status Register */
48#define AT_DMA_CBTC_OFFSET 8
49#define AT_DMA_ERR_OFFSET 16
50#define AT_DMA_BTC(x) (0x1 << (x))
51#define AT_DMA_CBTC(x) (0x1 << (AT_DMA_CBTC_OFFSET + (x)))
52#define AT_DMA_ERR(x) (0x1 << (AT_DMA_ERR_OFFSET + (x)))
53
54#define AT_DMA_CHER 0x28 /* Channel Handler Enable Register */
55#define AT_DMA_ENA(x) (0x1 << (x))
56#define AT_DMA_SUSP(x) (0x1 << ( 8 + (x)))
57#define AT_DMA_KEEP(x) (0x1 << (24 + (x)))
58
59#define AT_DMA_CHDR 0x2C /* Channel Handler Disable Register */
60#define AT_DMA_DIS(x) (0x1 << (x))
61#define AT_DMA_RES(x) (0x1 << ( 8 + (x)))
62
63#define AT_DMA_CHSR 0x30 /* Channel Handler Status Register */
64#define AT_DMA_EMPT(x) (0x1 << (16 + (x)))
65#define AT_DMA_STAL(x) (0x1 << (24 + (x)))
66
67
68#define AT_DMA_CH_REGS_BASE 0x3C /* Channel registers base address */
69#define ch_regs(x) (AT_DMA_CH_REGS_BASE + (x) * 0x28) /* Channel x base addr */
70
71/* Hardware register offset for each channel */
72#define ATC_SADDR_OFFSET 0x00 /* Source Address Register */
73#define ATC_DADDR_OFFSET 0x04 /* Destination Address Register */
74#define ATC_DSCR_OFFSET 0x08 /* Descriptor Address Register */
75#define ATC_CTRLA_OFFSET 0x0C /* Control A Register */
76#define ATC_CTRLB_OFFSET 0x10 /* Control B Register */
77#define ATC_CFG_OFFSET 0x14 /* Configuration Register */
78#define ATC_SPIP_OFFSET 0x18 /* Src PIP Configuration Register */
79#define ATC_DPIP_OFFSET 0x1C /* Dst PIP Configuration Register */
80
81
82/* Bitfield definitions */
83
84/* Bitfields in DSCR */
85#define ATC_DSCR_IF(i) (0x3 & (i)) /* Dsc feched via AHB-Lite Interface i */
86
87/* Bitfields in CTRLA */
88#define ATC_BTSIZE_MAX 0xFFFFUL /* Maximum Buffer Transfer Size */
89#define ATC_BTSIZE(x) (ATC_BTSIZE_MAX & (x)) /* Buffer Transfer Size */
90/* Chunck Tranfer size definitions are in at_hdmac.h */
91#define ATC_SRC_WIDTH_MASK (0x3 << 24) /* Source Single Transfer Size */
92#define ATC_SRC_WIDTH(x) ((x) << 24)
93#define ATC_SRC_WIDTH_BYTE (0x0 << 24)
94#define ATC_SRC_WIDTH_HALFWORD (0x1 << 24)
95#define ATC_SRC_WIDTH_WORD (0x2 << 24)
96#define ATC_DST_WIDTH_MASK (0x3 << 28) /* Destination Single Transfer Size */
97#define ATC_DST_WIDTH(x) ((x) << 28)
98#define ATC_DST_WIDTH_BYTE (0x0 << 28)
99#define ATC_DST_WIDTH_HALFWORD (0x1 << 28)
100#define ATC_DST_WIDTH_WORD (0x2 << 28)
101#define ATC_DONE (0x1 << 31) /* Tx Done (only written back in descriptor) */
102
103/* Bitfields in CTRLB */
104#define ATC_SIF(i) (0x3 & (i)) /* Src tx done via AHB-Lite Interface i */
105#define ATC_DIF(i) ((0x3 & (i)) << 4) /* Dst tx done via AHB-Lite Interface i */
106#define ATC_SRC_PIP (0x1 << 8) /* Source Picture-in-Picture enabled */
107#define ATC_DST_PIP (0x1 << 12) /* Destination Picture-in-Picture enabled */
108#define ATC_SRC_DSCR_DIS (0x1 << 16) /* Src Descriptor fetch disable */
109#define ATC_DST_DSCR_DIS (0x1 << 20) /* Dst Descriptor fetch disable */
110#define ATC_FC_MASK (0x7 << 21) /* Choose Flow Controller */
111#define ATC_FC_MEM2MEM (0x0 << 21) /* Mem-to-Mem (DMA) */
112#define ATC_FC_MEM2PER (0x1 << 21) /* Mem-to-Periph (DMA) */
113#define ATC_FC_PER2MEM (0x2 << 21) /* Periph-to-Mem (DMA) */
114#define ATC_FC_PER2PER (0x3 << 21) /* Periph-to-Periph (DMA) */
115#define ATC_FC_PER2MEM_PER (0x4 << 21) /* Periph-to-Mem (Peripheral) */
116#define ATC_FC_MEM2PER_PER (0x5 << 21) /* Mem-to-Periph (Peripheral) */
117#define ATC_FC_PER2PER_SRCPER (0x6 << 21) /* Periph-to-Periph (Src Peripheral) */
118#define ATC_FC_PER2PER_DSTPER (0x7 << 21) /* Periph-to-Periph (Dst Peripheral) */
119#define ATC_SRC_ADDR_MODE_MASK (0x3 << 24)
120#define ATC_SRC_ADDR_MODE_INCR (0x0 << 24) /* Incrementing Mode */
121#define ATC_SRC_ADDR_MODE_DECR (0x1 << 24) /* Decrementing Mode */
122#define ATC_SRC_ADDR_MODE_FIXED (0x2 << 24) /* Fixed Mode */
123#define ATC_DST_ADDR_MODE_MASK (0x3 << 28)
124#define ATC_DST_ADDR_MODE_INCR (0x0 << 28) /* Incrementing Mode */
125#define ATC_DST_ADDR_MODE_DECR (0x1 << 28) /* Decrementing Mode */
126#define ATC_DST_ADDR_MODE_FIXED (0x2 << 28) /* Fixed Mode */
127#define ATC_IEN (0x1 << 30) /* BTC interrupt enable (active low) */
128#define ATC_AUTO (0x1 << 31) /* Auto multiple buffer tx enable */
129
130/* Bitfields in CFG */
131/* are in at_hdmac.h */
132
133/* Bitfields in SPIP */
134#define ATC_SPIP_HOLE(x) (0xFFFFU & (x))
135#define ATC_SPIP_BOUNDARY(x) ((0x3FF & (x)) << 16)
136
137/* Bitfields in DPIP */
138#define ATC_DPIP_HOLE(x) (0xFFFFU & (x))
139#define ATC_DPIP_BOUNDARY(x) ((0x3FF & (x)) << 16)
140
141
142/*-- descriptors -----------------------------------------------------*/
143
144/* LLI == Linked List Item; aka DMA buffer descriptor */
145struct at_lli {
146 /* values that are not changed by hardware */
147 dma_addr_t saddr;
148 dma_addr_t daddr;
149 /* value that may get written back: */
150 u32 ctrla;
151 /* more values that are not changed by hardware */
152 u32 ctrlb;
153 dma_addr_t dscr; /* chain to next lli */
154};
155
156/**
157 * struct at_desc - software descriptor
158 * @at_lli: hardware lli structure
159 * @txd: support for the async_tx api
160 * @desc_node: node on the channed descriptors list
161 * @len: total transaction bytecount
162 */
163struct at_desc {
164 /* FIRST values the hardware uses */
165 struct at_lli lli;
166
167 /* THEN values for driver housekeeping */
168 struct dma_async_tx_descriptor txd;
169 struct list_head desc_node;
170 size_t len;
171};
172
173static inline struct at_desc *
174txd_to_at_desc(struct dma_async_tx_descriptor *txd)
175{
176 return container_of(txd, struct at_desc, txd);
177}
178
179
180/*-- Channels --------------------------------------------------------*/
181
182/**
183 * struct at_dma_chan - internal representation of an Atmel HDMAC channel
184 * @chan_common: common dmaengine channel object members
185 * @device: parent device
186 * @ch_regs: memory mapped register base
187 * @mask: channel index in a mask
188 * @error_status: transmit error status information from irq handler
189 * to tasklet (use atomic operations)
190 * @tasklet: bottom half to finish transaction work
191 * @lock: serializes enqueue/dequeue operations to descriptors lists
192 * @completed_cookie: identifier for the most recently completed operation
193 * @active_list: list of descriptors dmaengine is being running on
194 * @queue: list of descriptors ready to be submitted to engine
195 * @free_list: list of descriptors usable by the channel
196 * @descs_allocated: records the actual size of the descriptor pool
197 */
198struct at_dma_chan {
199 struct dma_chan chan_common;
200 struct at_dma *device;
201 void __iomem *ch_regs;
202 u8 mask;
203 unsigned long error_status;
204 struct tasklet_struct tasklet;
205
206 spinlock_t lock;
207
208 /* these other elements are all protected by lock */
209 dma_cookie_t completed_cookie;
210 struct list_head active_list;
211 struct list_head queue;
212 struct list_head free_list;
213 unsigned int descs_allocated;
214};
215
216#define channel_readl(atchan, name) \
217 __raw_readl((atchan)->ch_regs + ATC_##name##_OFFSET)
218
219#define channel_writel(atchan, name, val) \
220 __raw_writel((val), (atchan)->ch_regs + ATC_##name##_OFFSET)
221
222static inline struct at_dma_chan *to_at_dma_chan(struct dma_chan *dchan)
223{
224 return container_of(dchan, struct at_dma_chan, chan_common);
225}
226
227
228/*-- Controller ------------------------------------------------------*/
229
230/**
231 * struct at_dma - internal representation of an Atmel HDMA Controller
232 * @chan_common: common dmaengine dma_device object members
233 * @ch_regs: memory mapped register base
234 * @clk: dma controller clock
235 * @all_chan_mask: all channels availlable in a mask
236 * @dma_desc_pool: base of DMA descriptor region (DMA address)
237 * @chan: channels table to store at_dma_chan structures
238 */
239struct at_dma {
240 struct dma_device dma_common;
241 void __iomem *regs;
242 struct clk *clk;
243
244 u8 all_chan_mask;
245
246 struct dma_pool *dma_desc_pool;
247 /* AT THE END channels table */
248 struct at_dma_chan chan[0];
249};
250
251#define dma_readl(atdma, name) \
252 __raw_readl((atdma)->regs + AT_DMA_##name)
253#define dma_writel(atdma, name, val) \
254 __raw_writel((val), (atdma)->regs + AT_DMA_##name)
255
256static inline struct at_dma *to_at_dma(struct dma_device *ddev)
257{
258 return container_of(ddev, struct at_dma, dma_common);
259}
260
261
262/*-- Helper functions ------------------------------------------------*/
263
264static struct device *chan2dev(struct dma_chan *chan)
265{
266 return &chan->dev->device;
267}
268static struct device *chan2parent(struct dma_chan *chan)
269{
270 return chan->dev->device.parent;
271}
272
273#if defined(VERBOSE_DEBUG)
274static void vdbg_dump_regs(struct at_dma_chan *atchan)
275{
276 struct at_dma *atdma = to_at_dma(atchan->chan_common.device);
277
278 dev_err(chan2dev(&atchan->chan_common),
279 " channel %d : imr = 0x%x, chsr = 0x%x\n",
280 atchan->chan_common.chan_id,
281 dma_readl(atdma, EBCIMR),
282 dma_readl(atdma, CHSR));
283
284 dev_err(chan2dev(&atchan->chan_common),
285 " channel: s0x%x d0x%x ctrl0x%x:0x%x cfg0x%x l0x%x\n",
286 channel_readl(atchan, SADDR),
287 channel_readl(atchan, DADDR),
288 channel_readl(atchan, CTRLA),
289 channel_readl(atchan, CTRLB),
290 channel_readl(atchan, CFG),
291 channel_readl(atchan, DSCR));
292}
293#else
294static void vdbg_dump_regs(struct at_dma_chan *atchan) {}
295#endif
296
297static void atc_dump_lli(struct at_dma_chan *atchan, struct at_lli *lli)
298{
299 dev_printk(KERN_CRIT, chan2dev(&atchan->chan_common),
300 " desc: s0x%x d0x%x ctrl0x%x:0x%x l0x%x\n",
301 lli->saddr, lli->daddr,
302 lli->ctrla, lli->ctrlb, lli->dscr);
303}
304
305
306static void atc_setup_irq(struct at_dma_chan *atchan, int on)
307{
308 struct at_dma *atdma = to_at_dma(atchan->chan_common.device);
309 u32 ebci;
310
311 /* enable interrupts on buffer chain completion & error */
312 ebci = AT_DMA_CBTC(atchan->chan_common.chan_id)
313 | AT_DMA_ERR(atchan->chan_common.chan_id);
314 if (on)
315 dma_writel(atdma, EBCIER, ebci);
316 else
317 dma_writel(atdma, EBCIDR, ebci);
318}
319
320static inline void atc_enable_irq(struct at_dma_chan *atchan)
321{
322 atc_setup_irq(atchan, 1);
323}
324
325static inline void atc_disable_irq(struct at_dma_chan *atchan)
326{
327 atc_setup_irq(atchan, 0);
328}
329
330
331/**
332 * atc_chan_is_enabled - test if given channel is enabled
333 * @atchan: channel we want to test status
334 */
335static inline int atc_chan_is_enabled(struct at_dma_chan *atchan)
336{
337 struct at_dma *atdma = to_at_dma(atchan->chan_common.device);
338
339 return !!(dma_readl(atdma, CHSR) & atchan->mask);
340}
341
342
343/**
344 * set_desc_eol - set end-of-link to descriptor so it will end transfer
345 * @desc: descriptor, signle or at the end of a chain, to end chain on
346 */
347static void set_desc_eol(struct at_desc *desc)
348{
349 desc->lli.ctrlb |= ATC_SRC_DSCR_DIS | ATC_DST_DSCR_DIS;
350 desc->lli.dscr = 0;
351}
352
353#endif /* AT_HDMAC_REGS_H */
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index fb7da5141e9..d93017fc787 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -38,6 +38,11 @@ module_param(max_channels, uint, S_IRUGO);
38MODULE_PARM_DESC(max_channels, 38MODULE_PARM_DESC(max_channels,
39 "Maximum number of channels to use (default: all)"); 39 "Maximum number of channels to use (default: all)");
40 40
41static unsigned int iterations;
42module_param(iterations, uint, S_IRUGO);
43MODULE_PARM_DESC(iterations,
44 "Iterations before stopping test (default: infinite)");
45
41static unsigned int xor_sources = 3; 46static unsigned int xor_sources = 3;
42module_param(xor_sources, uint, S_IRUGO); 47module_param(xor_sources, uint, S_IRUGO);
43MODULE_PARM_DESC(xor_sources, 48MODULE_PARM_DESC(xor_sources,
@@ -114,7 +119,7 @@ static void dmatest_init_srcs(u8 **bufs, unsigned int start, unsigned int len)
114 buf[i] = PATTERN_SRC | (~i & PATTERN_COUNT_MASK); 119 buf[i] = PATTERN_SRC | (~i & PATTERN_COUNT_MASK);
115 for ( ; i < start + len; i++) 120 for ( ; i < start + len; i++)
116 buf[i] = PATTERN_SRC | PATTERN_COPY 121 buf[i] = PATTERN_SRC | PATTERN_COPY
117 | (~i & PATTERN_COUNT_MASK);; 122 | (~i & PATTERN_COUNT_MASK);
118 for ( ; i < test_buf_size; i++) 123 for ( ; i < test_buf_size; i++)
119 buf[i] = PATTERN_SRC | (~i & PATTERN_COUNT_MASK); 124 buf[i] = PATTERN_SRC | (~i & PATTERN_COUNT_MASK);
120 buf++; 125 buf++;
@@ -270,7 +275,8 @@ static int dmatest_func(void *data)
270 275
271 flags = DMA_CTRL_ACK | DMA_COMPL_SKIP_DEST_UNMAP | DMA_PREP_INTERRUPT; 276 flags = DMA_CTRL_ACK | DMA_COMPL_SKIP_DEST_UNMAP | DMA_PREP_INTERRUPT;
272 277
273 while (!kthread_should_stop()) { 278 while (!kthread_should_stop()
279 && !(iterations && total_tests >= iterations)) {
274 struct dma_device *dev = chan->device; 280 struct dma_device *dev = chan->device;
275 struct dma_async_tx_descriptor *tx = NULL; 281 struct dma_async_tx_descriptor *tx = NULL;
276 dma_addr_t dma_srcs[src_cnt]; 282 dma_addr_t dma_srcs[src_cnt];
@@ -416,6 +422,13 @@ err_srcbuf:
416err_srcs: 422err_srcs:
417 pr_notice("%s: terminating after %u tests, %u failures (status %d)\n", 423 pr_notice("%s: terminating after %u tests, %u failures (status %d)\n",
418 thread_name, total_tests, failed_tests, ret); 424 thread_name, total_tests, failed_tests, ret);
425
426 if (iterations > 0)
427 while (!kthread_should_stop()) {
428 DECLARE_WAIT_QUEUE_HEAD(wait_dmatest_exit);
429 interruptible_sleep_on(&wait_dmatest_exit);
430 }
431
419 return ret; 432 return ret;
420} 433}
421 434
@@ -495,11 +508,11 @@ static int dmatest_add_channel(struct dma_chan *chan)
495 508
496 if (dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask)) { 509 if (dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask)) {
497 cnt = dmatest_add_threads(dtc, DMA_MEMCPY); 510 cnt = dmatest_add_threads(dtc, DMA_MEMCPY);
498 thread_count += cnt > 0 ?: 0; 511 thread_count += cnt > 0 ? cnt : 0;
499 } 512 }
500 if (dma_has_cap(DMA_XOR, dma_dev->cap_mask)) { 513 if (dma_has_cap(DMA_XOR, dma_dev->cap_mask)) {
501 cnt = dmatest_add_threads(dtc, DMA_XOR); 514 cnt = dmatest_add_threads(dtc, DMA_XOR);
502 thread_count += cnt > 0 ?: 0; 515 thread_count += cnt > 0 ? cnt : 0;
503 } 516 }
504 517
505 pr_info("dmatest: Started %u threads using %s\n", 518 pr_info("dmatest: Started %u threads using %s\n",
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index f18d1bde043..ef87a898414 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -12,6 +12,11 @@
12 * also fit for MPC8560, MPC8555, MPC8548, MPC8641, and etc. 12 * also fit for MPC8560, MPC8555, MPC8548, MPC8641, and etc.
13 * The support for MPC8349 DMA contorller is also added. 13 * The support for MPC8349 DMA contorller is also added.
14 * 14 *
15 * This driver instructs the DMA controller to issue the PCI Read Multiple
16 * command for PCI read operations, instead of using the default PCI Read Line
17 * command. Please be aware that this setting may result in read pre-fetching
18 * on some platforms.
19 *
15 * This is free software; you can redistribute it and/or modify 20 * This is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by 21 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or 22 * the Free Software Foundation; either version 2 of the License, or
@@ -49,9 +54,10 @@ static void dma_init(struct fsl_dma_chan *fsl_chan)
49 case FSL_DMA_IP_83XX: 54 case FSL_DMA_IP_83XX:
50 /* Set the channel to below modes: 55 /* Set the channel to below modes:
51 * EOTIE - End-of-transfer interrupt enable 56 * EOTIE - End-of-transfer interrupt enable
57 * PRC_RM - PCI read multiple
52 */ 58 */
53 DMA_OUT(fsl_chan, &fsl_chan->reg_base->mr, FSL_DMA_MR_EOTIE, 59 DMA_OUT(fsl_chan, &fsl_chan->reg_base->mr, FSL_DMA_MR_EOTIE
54 32); 60 | FSL_DMA_MR_PRC_RM, 32);
55 break; 61 break;
56 } 62 }
57 63
@@ -136,15 +142,16 @@ static int dma_is_idle(struct fsl_dma_chan *fsl_chan)
136 142
137static void dma_start(struct fsl_dma_chan *fsl_chan) 143static void dma_start(struct fsl_dma_chan *fsl_chan)
138{ 144{
139 u32 mr_set = 0;; 145 u32 mr_set = 0;
140 146
141 if (fsl_chan->feature & FSL_DMA_CHAN_PAUSE_EXT) { 147 if (fsl_chan->feature & FSL_DMA_CHAN_PAUSE_EXT) {
142 DMA_OUT(fsl_chan, &fsl_chan->reg_base->bcr, 0, 32); 148 DMA_OUT(fsl_chan, &fsl_chan->reg_base->bcr, 0, 32);
143 mr_set |= FSL_DMA_MR_EMP_EN; 149 mr_set |= FSL_DMA_MR_EMP_EN;
144 } else 150 } else if ((fsl_chan->feature & FSL_DMA_IP_MASK) == FSL_DMA_IP_85XX) {
145 DMA_OUT(fsl_chan, &fsl_chan->reg_base->mr, 151 DMA_OUT(fsl_chan, &fsl_chan->reg_base->mr,
146 DMA_IN(fsl_chan, &fsl_chan->reg_base->mr, 32) 152 DMA_IN(fsl_chan, &fsl_chan->reg_base->mr, 32)
147 & ~FSL_DMA_MR_EMP_EN, 32); 153 & ~FSL_DMA_MR_EMP_EN, 32);
154 }
148 155
149 if (fsl_chan->feature & FSL_DMA_CHAN_START_EXT) 156 if (fsl_chan->feature & FSL_DMA_CHAN_START_EXT)
150 mr_set |= FSL_DMA_MR_EMS_EN; 157 mr_set |= FSL_DMA_MR_EMS_EN;
@@ -871,9 +878,9 @@ static int __devinit fsl_dma_chan_probe(struct fsl_dma_device *fdev,
871 878
872 switch (new_fsl_chan->feature & FSL_DMA_IP_MASK) { 879 switch (new_fsl_chan->feature & FSL_DMA_IP_MASK) {
873 case FSL_DMA_IP_85XX: 880 case FSL_DMA_IP_85XX:
874 new_fsl_chan->toggle_ext_start = fsl_chan_toggle_ext_start;
875 new_fsl_chan->toggle_ext_pause = fsl_chan_toggle_ext_pause; 881 new_fsl_chan->toggle_ext_pause = fsl_chan_toggle_ext_pause;
876 case FSL_DMA_IP_83XX: 882 case FSL_DMA_IP_83XX:
883 new_fsl_chan->toggle_ext_start = fsl_chan_toggle_ext_start;
877 new_fsl_chan->set_src_loop_size = fsl_chan_set_src_loop_size; 884 new_fsl_chan->set_src_loop_size = fsl_chan_set_src_loop_size;
878 new_fsl_chan->set_dest_loop_size = fsl_chan_set_dest_loop_size; 885 new_fsl_chan->set_dest_loop_size = fsl_chan_set_dest_loop_size;
879 } 886 }
diff --git a/drivers/dma/fsldma.h b/drivers/dma/fsldma.h
index 4f21a512d84..dc7f2686579 100644
--- a/drivers/dma/fsldma.h
+++ b/drivers/dma/fsldma.h
@@ -38,6 +38,7 @@
38 38
39/* Special MR definition for MPC8349 */ 39/* Special MR definition for MPC8349 */
40#define FSL_DMA_MR_EOTIE 0x00000080 40#define FSL_DMA_MR_EOTIE 0x00000080
41#define FSL_DMA_MR_PRC_RM 0x00000800
41 42
42#define FSL_DMA_SR_CH 0x00000020 43#define FSL_DMA_SR_CH 0x00000020
43#define FSL_DMA_SR_PE 0x00000010 44#define FSL_DMA_SR_PE 0x00000010
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index ddab94f5122..3f23eabe09f 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -1176,7 +1176,7 @@ static int __devinit mv_xor_probe(struct platform_device *pdev)
1176 if (dma_has_cap(DMA_MEMSET, dma_dev->cap_mask)) 1176 if (dma_has_cap(DMA_MEMSET, dma_dev->cap_mask))
1177 dma_dev->device_prep_dma_memset = mv_xor_prep_dma_memset; 1177 dma_dev->device_prep_dma_memset = mv_xor_prep_dma_memset;
1178 if (dma_has_cap(DMA_XOR, dma_dev->cap_mask)) { 1178 if (dma_has_cap(DMA_XOR, dma_dev->cap_mask)) {
1179 dma_dev->max_xor = 8; ; 1179 dma_dev->max_xor = 8;
1180 dma_dev->device_prep_dma_xor = mv_xor_prep_dma_xor; 1180 dma_dev->device_prep_dma_xor = mv_xor_prep_dma_xor;
1181 } 1181 }
1182 1182
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 858fe603722..e2a10bcba7a 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -868,6 +868,8 @@ static void amd64_read_dbam_reg(struct amd64_pvt *pvt)
868 goto err_reg; 868 goto err_reg;
869 } 869 }
870 870
871 return;
872
871err_reg: 873err_reg:
872 debugf0("Error reading F2x%03x.\n", reg); 874 debugf0("Error reading F2x%03x.\n", reg);
873} 875}
@@ -970,7 +972,7 @@ static void amd64_read_dct_base_mask(struct amd64_pvt *pvt)
970 } 972 }
971 973
972 for (cs = 0; cs < pvt->num_dcsm; cs++) { 974 for (cs = 0; cs < pvt->num_dcsm; cs++) {
973 reg = K8_DCSB0 + (cs * 4); 975 reg = K8_DCSM0 + (cs * 4);
974 err = pci_read_config_dword(pvt->dram_f2_ctl, reg, 976 err = pci_read_config_dword(pvt->dram_f2_ctl, reg,
975 &pvt->dcsm0[cs]); 977 &pvt->dcsm0[cs]);
976 if (unlikely(err)) 978 if (unlikely(err))
@@ -2634,6 +2636,8 @@ static void amd64_read_mc_registers(struct amd64_pvt *pvt)
2634 2636
2635 amd64_dump_misc_regs(pvt); 2637 amd64_dump_misc_regs(pvt);
2636 2638
2639 return;
2640
2637err_reg: 2641err_reg:
2638 debugf0("Reading an MC register failed\n"); 2642 debugf0("Reading an MC register failed\n");
2639 2643
@@ -2977,6 +2981,9 @@ static int amd64_check_ecc_enabled(struct amd64_pvt *pvt)
2977 "ECC is enabled by BIOS, Proceeding " 2981 "ECC is enabled by BIOS, Proceeding "
2978 "with EDAC module initialization\n"); 2982 "with EDAC module initialization\n");
2979 2983
2984 /* Signal good ECC status */
2985 ret = 0;
2986
2980 /* CLEAR the override, since BIOS controlled it */ 2987 /* CLEAR the override, since BIOS controlled it */
2981 ecc_enable_override = 0; 2988 ecc_enable_override = 0;
2982 } 2989 }
diff --git a/drivers/edac/x38_edac.c b/drivers/edac/x38_edac.c
index 2406c2ce284..d4ec6059317 100644
--- a/drivers/edac/x38_edac.c
+++ b/drivers/edac/x38_edac.c
@@ -30,7 +30,7 @@
30/* Intel X38 register addresses - device 0 function 0 - DRAM Controller */ 30/* Intel X38 register addresses - device 0 function 0 - DRAM Controller */
31 31
32#define X38_MCHBAR_LOW 0x48 /* MCH Memory Mapped Register BAR */ 32#define X38_MCHBAR_LOW 0x48 /* MCH Memory Mapped Register BAR */
33#define X38_MCHBAR_HIGH 0x4b 33#define X38_MCHBAR_HIGH 0x4c
34#define X38_MCHBAR_MASK 0xfffffc000ULL /* bits 35:14 */ 34#define X38_MCHBAR_MASK 0xfffffc000ULL /* bits 35:14 */
35#define X38_MMR_WINDOW_SIZE 16384 35#define X38_MMR_WINDOW_SIZE 16384
36 36
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 8fab7890a36..33be210d672 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -1461,7 +1461,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
1461 goto out; 1461 goto out;
1462 } 1462 }
1463 1463
1464 if (crtc_req->count_connectors > 0 && !mode && !fb) { 1464 if (crtc_req->count_connectors > 0 && (!mode || !fb)) {
1465 DRM_DEBUG("Count connectors is %d but no mode or fb set\n", 1465 DRM_DEBUG("Count connectors is %d but no mode or fb set\n",
1466 crtc_req->count_connectors); 1466 crtc_req->count_connectors);
1467 ret = -EINVAL; 1467 ret = -EINVAL;
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 3da9cfa3184..6aaa2cb2336 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -706,8 +706,8 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
706 struct drm_encoder **save_encoders, *new_encoder; 706 struct drm_encoder **save_encoders, *new_encoder;
707 struct drm_framebuffer *old_fb = NULL; 707 struct drm_framebuffer *old_fb = NULL;
708 bool save_enabled; 708 bool save_enabled;
709 bool mode_changed = false; 709 bool mode_changed = false; /* if true do a full mode set */
710 bool fb_changed = false; 710 bool fb_changed = false; /* if true and !mode_changed just do a flip */
711 struct drm_connector *connector; 711 struct drm_connector *connector;
712 int count = 0, ro, fail = 0; 712 int count = 0, ro, fail = 0;
713 struct drm_crtc_helper_funcs *crtc_funcs; 713 struct drm_crtc_helper_funcs *crtc_funcs;
@@ -758,6 +758,8 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
758 if (set->crtc->fb == NULL) { 758 if (set->crtc->fb == NULL) {
759 DRM_DEBUG("crtc has no fb, full mode set\n"); 759 DRM_DEBUG("crtc has no fb, full mode set\n");
760 mode_changed = true; 760 mode_changed = true;
761 } else if (set->fb == NULL) {
762 mode_changed = true;
761 } else if ((set->fb->bits_per_pixel != 763 } else if ((set->fb->bits_per_pixel !=
762 set->crtc->fb->bits_per_pixel) || 764 set->crtc->fb->bits_per_pixel) ||
763 set->fb->depth != set->crtc->fb->depth) 765 set->fb->depth != set->crtc->fb->depth)
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index b4a3dbcebe9..f85aaf21e78 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -566,7 +566,7 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
566 566
567 ret = drm_vblank_get(dev, crtc); 567 ret = drm_vblank_get(dev, crtc);
568 if (ret) { 568 if (ret) {
569 DRM_ERROR("failed to acquire vblank counter, %d\n", ret); 569 DRM_DEBUG("failed to acquire vblank counter, %d\n", ret);
570 return ret; 570 return ret;
571 } 571 }
572 seq = drm_vblank_count(dev, crtc); 572 seq = drm_vblank_count(dev, crtc);
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 54f492a488a..7914097b09c 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -566,6 +566,8 @@ void drm_mode_connector_list_update(struct drm_connector *connector)
566 found_it = 1; 566 found_it = 1;
567 /* if equal delete the probed mode */ 567 /* if equal delete the probed mode */
568 mode->status = pmode->status; 568 mode->status = pmode->status;
569 /* Merge type bits together */
570 mode->type |= pmode->type;
569 list_del(&pmode->head); 571 list_del(&pmode->head);
570 drm_mode_destroy(connector->dev, pmode); 572 drm_mode_destroy(connector->dev, pmode);
571 break; 573 break;
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 8c4783180bf..50d1f782768 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1186,6 +1186,13 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
1186 if (ret) 1186 if (ret)
1187 goto out_iomapfree; 1187 goto out_iomapfree;
1188 1188
1189 dev_priv->wq = create_workqueue("i915");
1190 if (dev_priv->wq == NULL) {
1191 DRM_ERROR("Failed to create our workqueue.\n");
1192 ret = -ENOMEM;
1193 goto out_iomapfree;
1194 }
1195
1189 /* enable GEM by default */ 1196 /* enable GEM by default */
1190 dev_priv->has_gem = 1; 1197 dev_priv->has_gem = 1;
1191 1198
@@ -1211,7 +1218,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
1211 if (!I915_NEED_GFX_HWS(dev)) { 1218 if (!I915_NEED_GFX_HWS(dev)) {
1212 ret = i915_init_phys_hws(dev); 1219 ret = i915_init_phys_hws(dev);
1213 if (ret != 0) 1220 if (ret != 0)
1214 goto out_iomapfree; 1221 goto out_workqueue_free;
1215 } 1222 }
1216 1223
1217 i915_get_mem_freq(dev); 1224 i915_get_mem_freq(dev);
@@ -1245,7 +1252,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
1245 ret = i915_load_modeset_init(dev, prealloc_size, agp_size); 1252 ret = i915_load_modeset_init(dev, prealloc_size, agp_size);
1246 if (ret < 0) { 1253 if (ret < 0) {
1247 DRM_ERROR("failed to init modeset\n"); 1254 DRM_ERROR("failed to init modeset\n");
1248 goto out_rmmap; 1255 goto out_workqueue_free;
1249 } 1256 }
1250 } 1257 }
1251 1258
@@ -1256,6 +1263,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
1256 1263
1257 return 0; 1264 return 0;
1258 1265
1266out_workqueue_free:
1267 destroy_workqueue(dev_priv->wq);
1259out_iomapfree: 1268out_iomapfree:
1260 io_mapping_free(dev_priv->mm.gtt_mapping); 1269 io_mapping_free(dev_priv->mm.gtt_mapping);
1261out_rmmap: 1270out_rmmap:
@@ -1269,6 +1278,8 @@ int i915_driver_unload(struct drm_device *dev)
1269{ 1278{
1270 struct drm_i915_private *dev_priv = dev->dev_private; 1279 struct drm_i915_private *dev_priv = dev->dev_private;
1271 1280
1281 destroy_workqueue(dev_priv->wq);
1282
1272 io_mapping_free(dev_priv->mm.gtt_mapping); 1283 io_mapping_free(dev_priv->mm.gtt_mapping);
1273 if (dev_priv->mm.gtt_mtrr >= 0) { 1284 if (dev_priv->mm.gtt_mtrr >= 0) {
1274 mtrr_del(dev_priv->mm.gtt_mtrr, dev->agp->base, 1285 mtrr_del(dev_priv->mm.gtt_mtrr, dev->agp->base,
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index d0875287588..7537f57d8a8 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -219,6 +219,7 @@ typedef struct drm_i915_private {
219 unsigned int lvds_vbt:1; 219 unsigned int lvds_vbt:1;
220 unsigned int int_crt_support:1; 220 unsigned int int_crt_support:1;
221 unsigned int lvds_use_ssc:1; 221 unsigned int lvds_use_ssc:1;
222 unsigned int edp_support:1;
222 int lvds_ssc_freq; 223 int lvds_ssc_freq;
223 224
224 struct drm_i915_fence_reg fence_regs[16]; /* assume 965 */ 225 struct drm_i915_fence_reg fence_regs[16]; /* assume 965 */
@@ -229,6 +230,8 @@ typedef struct drm_i915_private {
229 230
230 spinlock_t error_lock; 231 spinlock_t error_lock;
231 struct drm_i915_error_state *first_error; 232 struct drm_i915_error_state *first_error;
233 struct work_struct error_work;
234 struct workqueue_struct *wq;
232 235
233 /* Register state */ 236 /* Register state */
234 u8 saveLBB; 237 u8 saveLBB;
@@ -888,6 +891,7 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
888 IS_I915GM(dev))) 891 IS_I915GM(dev)))
889#define SUPPORTS_INTEGRATED_HDMI(dev) (IS_G4X(dev) || IS_IGDNG(dev)) 892#define SUPPORTS_INTEGRATED_HDMI(dev) (IS_G4X(dev) || IS_IGDNG(dev))
890#define SUPPORTS_INTEGRATED_DP(dev) (IS_G4X(dev) || IS_IGDNG(dev)) 893#define SUPPORTS_INTEGRATED_DP(dev) (IS_G4X(dev) || IS_IGDNG(dev))
894#define SUPPORTS_EDP(dev) (IS_IGDNG_M(dev))
891#define I915_HAS_HOTPLUG(dev) (IS_I945G(dev) || IS_I945GM(dev) || IS_I965G(dev)) 895#define I915_HAS_HOTPLUG(dev) (IS_I945G(dev) || IS_I945GM(dev) || IS_I965G(dev))
892/* dsparb controlled by hw only */ 896/* dsparb controlled by hw only */
893#define DSPARB_HWCONTROL(dev) (IS_G4X(dev) || IS_IGDNG(dev)) 897#define DSPARB_HWCONTROL(dev) (IS_G4X(dev) || IS_IGDNG(dev))
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 5bf420378b6..140bee142fc 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1570,7 +1570,7 @@ i915_add_request(struct drm_device *dev, struct drm_file *file_priv,
1570 } 1570 }
1571 1571
1572 if (was_empty && !dev_priv->mm.suspended) 1572 if (was_empty && !dev_priv->mm.suspended)
1573 schedule_delayed_work(&dev_priv->mm.retire_work, HZ); 1573 queue_delayed_work(dev_priv->wq, &dev_priv->mm.retire_work, HZ);
1574 return seqno; 1574 return seqno;
1575} 1575}
1576 1576
@@ -1719,7 +1719,7 @@ i915_gem_retire_work_handler(struct work_struct *work)
1719 i915_gem_retire_requests(dev); 1719 i915_gem_retire_requests(dev);
1720 if (!dev_priv->mm.suspended && 1720 if (!dev_priv->mm.suspended &&
1721 !list_empty(&dev_priv->mm.request_list)) 1721 !list_empty(&dev_priv->mm.request_list))
1722 schedule_delayed_work(&dev_priv->mm.retire_work, HZ); 1722 queue_delayed_work(dev_priv->wq, &dev_priv->mm.retire_work, HZ);
1723 mutex_unlock(&dev->struct_mutex); 1723 mutex_unlock(&dev->struct_mutex);
1724} 1724}
1725 1725
diff --git a/drivers/gpu/drm/i915/i915_gem_debugfs.c b/drivers/gpu/drm/i915/i915_gem_debugfs.c
index 9a44bfcb813..cb3b97405fb 100644
--- a/drivers/gpu/drm/i915/i915_gem_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_gem_debugfs.c
@@ -343,6 +343,8 @@ static int i915_error_state(struct seq_file *m, void *unused)
343 343
344 error = dev_priv->first_error; 344 error = dev_priv->first_error;
345 345
346 seq_printf(m, "Time: %ld s %ld us\n", error->time.tv_sec,
347 error->time.tv_usec);
346 seq_printf(m, "EIR: 0x%08x\n", error->eir); 348 seq_printf(m, "EIR: 0x%08x\n", error->eir);
347 seq_printf(m, " PGTBL_ER: 0x%08x\n", error->pgtbl_er); 349 seq_printf(m, " PGTBL_ER: 0x%08x\n", error->pgtbl_er);
348 seq_printf(m, " INSTPM: 0x%08x\n", error->instpm); 350 seq_printf(m, " INSTPM: 0x%08x\n", error->instpm);
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 7ba23a69a0c..7ebc84c2881 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -190,7 +190,7 @@ u32 i915_get_vblank_counter(struct drm_device *dev, int pipe)
190 low_frame = pipe ? PIPEBFRAMEPIXEL : PIPEAFRAMEPIXEL; 190 low_frame = pipe ? PIPEBFRAMEPIXEL : PIPEAFRAMEPIXEL;
191 191
192 if (!i915_pipe_enabled(dev, pipe)) { 192 if (!i915_pipe_enabled(dev, pipe)) {
193 DRM_ERROR("trying to get vblank count for disabled pipe %d\n", pipe); 193 DRM_DEBUG("trying to get vblank count for disabled pipe %d\n", pipe);
194 return 0; 194 return 0;
195 } 195 }
196 196
@@ -219,7 +219,7 @@ u32 gm45_get_vblank_counter(struct drm_device *dev, int pipe)
219 int reg = pipe ? PIPEB_FRMCOUNT_GM45 : PIPEA_FRMCOUNT_GM45; 219 int reg = pipe ? PIPEB_FRMCOUNT_GM45 : PIPEA_FRMCOUNT_GM45;
220 220
221 if (!i915_pipe_enabled(dev, pipe)) { 221 if (!i915_pipe_enabled(dev, pipe)) {
222 DRM_ERROR("trying to get vblank count for disabled pipe %d\n", pipe); 222 DRM_DEBUG("trying to get vblank count for disabled pipe %d\n", pipe);
223 return 0; 223 return 0;
224 } 224 }
225 225
@@ -290,6 +290,35 @@ irqreturn_t igdng_irq_handler(struct drm_device *dev)
290 return ret; 290 return ret;
291} 291}
292 292
293/**
294 * i915_error_work_func - do process context error handling work
295 * @work: work struct
296 *
297 * Fire an error uevent so userspace can see that a hang or error
298 * was detected.
299 */
300static void i915_error_work_func(struct work_struct *work)
301{
302 drm_i915_private_t *dev_priv = container_of(work, drm_i915_private_t,
303 error_work);
304 struct drm_device *dev = dev_priv->dev;
305 char *event_string = "ERROR=1";
306 char *envp[] = { event_string, NULL };
307
308 DRM_DEBUG("generating error event\n");
309
310 kobject_uevent_env(&dev->primary->kdev.kobj, KOBJ_CHANGE, envp);
311}
312
313/**
314 * i915_capture_error_state - capture an error record for later analysis
315 * @dev: drm device
316 *
317 * Should be called when an error is detected (either a hang or an error
318 * interrupt) to capture error state from the time of the error. Fills
319 * out a structure which becomes available in debugfs for user level tools
320 * to pick up.
321 */
293static void i915_capture_error_state(struct drm_device *dev) 322static void i915_capture_error_state(struct drm_device *dev)
294{ 323{
295 struct drm_i915_private *dev_priv = dev->dev_private; 324 struct drm_i915_private *dev_priv = dev->dev_private;
@@ -325,12 +354,137 @@ static void i915_capture_error_state(struct drm_device *dev)
325 error->acthd = I915_READ(ACTHD_I965); 354 error->acthd = I915_READ(ACTHD_I965);
326 } 355 }
327 356
357 do_gettimeofday(&error->time);
358
328 dev_priv->first_error = error; 359 dev_priv->first_error = error;
329 360
330out: 361out:
331 spin_unlock_irqrestore(&dev_priv->error_lock, flags); 362 spin_unlock_irqrestore(&dev_priv->error_lock, flags);
332} 363}
333 364
365/**
366 * i915_handle_error - handle an error interrupt
367 * @dev: drm device
368 *
369 * Do some basic checking of regsiter state at error interrupt time and
370 * dump it to the syslog. Also call i915_capture_error_state() to make
371 * sure we get a record and make it available in debugfs. Fire a uevent
372 * so userspace knows something bad happened (should trigger collection
373 * of a ring dump etc.).
374 */
375static void i915_handle_error(struct drm_device *dev)
376{
377 struct drm_i915_private *dev_priv = dev->dev_private;
378 u32 eir = I915_READ(EIR);
379 u32 pipea_stats = I915_READ(PIPEASTAT);
380 u32 pipeb_stats = I915_READ(PIPEBSTAT);
381
382 i915_capture_error_state(dev);
383
384 printk(KERN_ERR "render error detected, EIR: 0x%08x\n",
385 eir);
386
387 if (IS_G4X(dev)) {
388 if (eir & (GM45_ERROR_MEM_PRIV | GM45_ERROR_CP_PRIV)) {
389 u32 ipeir = I915_READ(IPEIR_I965);
390
391 printk(KERN_ERR " IPEIR: 0x%08x\n",
392 I915_READ(IPEIR_I965));
393 printk(KERN_ERR " IPEHR: 0x%08x\n",
394 I915_READ(IPEHR_I965));
395 printk(KERN_ERR " INSTDONE: 0x%08x\n",
396 I915_READ(INSTDONE_I965));
397 printk(KERN_ERR " INSTPS: 0x%08x\n",
398 I915_READ(INSTPS));
399 printk(KERN_ERR " INSTDONE1: 0x%08x\n",
400 I915_READ(INSTDONE1));
401 printk(KERN_ERR " ACTHD: 0x%08x\n",
402 I915_READ(ACTHD_I965));
403 I915_WRITE(IPEIR_I965, ipeir);
404 (void)I915_READ(IPEIR_I965);
405 }
406 if (eir & GM45_ERROR_PAGE_TABLE) {
407 u32 pgtbl_err = I915_READ(PGTBL_ER);
408 printk(KERN_ERR "page table error\n");
409 printk(KERN_ERR " PGTBL_ER: 0x%08x\n",
410 pgtbl_err);
411 I915_WRITE(PGTBL_ER, pgtbl_err);
412 (void)I915_READ(PGTBL_ER);
413 }
414 }
415
416 if (IS_I9XX(dev)) {
417 if (eir & I915_ERROR_PAGE_TABLE) {
418 u32 pgtbl_err = I915_READ(PGTBL_ER);
419 printk(KERN_ERR "page table error\n");
420 printk(KERN_ERR " PGTBL_ER: 0x%08x\n",
421 pgtbl_err);
422 I915_WRITE(PGTBL_ER, pgtbl_err);
423 (void)I915_READ(PGTBL_ER);
424 }
425 }
426
427 if (eir & I915_ERROR_MEMORY_REFRESH) {
428 printk(KERN_ERR "memory refresh error\n");
429 printk(KERN_ERR "PIPEASTAT: 0x%08x\n",
430 pipea_stats);
431 printk(KERN_ERR "PIPEBSTAT: 0x%08x\n",
432 pipeb_stats);
433 /* pipestat has already been acked */
434 }
435 if (eir & I915_ERROR_INSTRUCTION) {
436 printk(KERN_ERR "instruction error\n");
437 printk(KERN_ERR " INSTPM: 0x%08x\n",
438 I915_READ(INSTPM));
439 if (!IS_I965G(dev)) {
440 u32 ipeir = I915_READ(IPEIR);
441
442 printk(KERN_ERR " IPEIR: 0x%08x\n",
443 I915_READ(IPEIR));
444 printk(KERN_ERR " IPEHR: 0x%08x\n",
445 I915_READ(IPEHR));
446 printk(KERN_ERR " INSTDONE: 0x%08x\n",
447 I915_READ(INSTDONE));
448 printk(KERN_ERR " ACTHD: 0x%08x\n",
449 I915_READ(ACTHD));
450 I915_WRITE(IPEIR, ipeir);
451 (void)I915_READ(IPEIR);
452 } else {
453 u32 ipeir = I915_READ(IPEIR_I965);
454
455 printk(KERN_ERR " IPEIR: 0x%08x\n",
456 I915_READ(IPEIR_I965));
457 printk(KERN_ERR " IPEHR: 0x%08x\n",
458 I915_READ(IPEHR_I965));
459 printk(KERN_ERR " INSTDONE: 0x%08x\n",
460 I915_READ(INSTDONE_I965));
461 printk(KERN_ERR " INSTPS: 0x%08x\n",
462 I915_READ(INSTPS));
463 printk(KERN_ERR " INSTDONE1: 0x%08x\n",
464 I915_READ(INSTDONE1));
465 printk(KERN_ERR " ACTHD: 0x%08x\n",
466 I915_READ(ACTHD_I965));
467 I915_WRITE(IPEIR_I965, ipeir);
468 (void)I915_READ(IPEIR_I965);
469 }
470 }
471
472 I915_WRITE(EIR, eir);
473 (void)I915_READ(EIR);
474 eir = I915_READ(EIR);
475 if (eir) {
476 /*
477 * some errors might have become stuck,
478 * mask them.
479 */
480 DRM_ERROR("EIR stuck: 0x%08x, masking\n", eir);
481 I915_WRITE(EMR, I915_READ(EMR) | eir);
482 I915_WRITE(IIR, I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT);
483 }
484
485 queue_work(dev_priv->wq, &dev_priv->error_work);
486}
487
334irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS) 488irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
335{ 489{
336 struct drm_device *dev = (struct drm_device *) arg; 490 struct drm_device *dev = (struct drm_device *) arg;
@@ -372,6 +526,9 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
372 pipea_stats = I915_READ(PIPEASTAT); 526 pipea_stats = I915_READ(PIPEASTAT);
373 pipeb_stats = I915_READ(PIPEBSTAT); 527 pipeb_stats = I915_READ(PIPEBSTAT);
374 528
529 if (iir & I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT)
530 i915_handle_error(dev);
531
375 /* 532 /*
376 * Clear the PIPE(A|B)STAT regs before the IIR 533 * Clear the PIPE(A|B)STAT regs before the IIR
377 */ 534 */
@@ -403,86 +560,13 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
403 DRM_DEBUG("hotplug event received, stat 0x%08x\n", 560 DRM_DEBUG("hotplug event received, stat 0x%08x\n",
404 hotplug_status); 561 hotplug_status);
405 if (hotplug_status & dev_priv->hotplug_supported_mask) 562 if (hotplug_status & dev_priv->hotplug_supported_mask)
406 schedule_work(&dev_priv->hotplug_work); 563 queue_work(dev_priv->wq,
564 &dev_priv->hotplug_work);
407 565
408 I915_WRITE(PORT_HOTPLUG_STAT, hotplug_status); 566 I915_WRITE(PORT_HOTPLUG_STAT, hotplug_status);
409 I915_READ(PORT_HOTPLUG_STAT); 567 I915_READ(PORT_HOTPLUG_STAT);
410 } 568 }
411 569
412 if (iir & I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT) {
413 u32 eir = I915_READ(EIR);
414
415 i915_capture_error_state(dev);
416
417 printk(KERN_ERR "render error detected, EIR: 0x%08x\n",
418 eir);
419 if (eir & I915_ERROR_PAGE_TABLE) {
420 u32 pgtbl_err = I915_READ(PGTBL_ER);
421 printk(KERN_ERR "page table error\n");
422 printk(KERN_ERR " PGTBL_ER: 0x%08x\n",
423 pgtbl_err);
424 I915_WRITE(PGTBL_ER, pgtbl_err);
425 (void)I915_READ(PGTBL_ER);
426 }
427 if (eir & I915_ERROR_MEMORY_REFRESH) {
428 printk(KERN_ERR "memory refresh error\n");
429 printk(KERN_ERR "PIPEASTAT: 0x%08x\n",
430 pipea_stats);
431 printk(KERN_ERR "PIPEBSTAT: 0x%08x\n",
432 pipeb_stats);
433 /* pipestat has already been acked */
434 }
435 if (eir & I915_ERROR_INSTRUCTION) {
436 printk(KERN_ERR "instruction error\n");
437 printk(KERN_ERR " INSTPM: 0x%08x\n",
438 I915_READ(INSTPM));
439 if (!IS_I965G(dev)) {
440 u32 ipeir = I915_READ(IPEIR);
441
442 printk(KERN_ERR " IPEIR: 0x%08x\n",
443 I915_READ(IPEIR));
444 printk(KERN_ERR " IPEHR: 0x%08x\n",
445 I915_READ(IPEHR));
446 printk(KERN_ERR " INSTDONE: 0x%08x\n",
447 I915_READ(INSTDONE));
448 printk(KERN_ERR " ACTHD: 0x%08x\n",
449 I915_READ(ACTHD));
450 I915_WRITE(IPEIR, ipeir);
451 (void)I915_READ(IPEIR);
452 } else {
453 u32 ipeir = I915_READ(IPEIR_I965);
454
455 printk(KERN_ERR " IPEIR: 0x%08x\n",
456 I915_READ(IPEIR_I965));
457 printk(KERN_ERR " IPEHR: 0x%08x\n",
458 I915_READ(IPEHR_I965));
459 printk(KERN_ERR " INSTDONE: 0x%08x\n",
460 I915_READ(INSTDONE_I965));
461 printk(KERN_ERR " INSTPS: 0x%08x\n",
462 I915_READ(INSTPS));
463 printk(KERN_ERR " INSTDONE1: 0x%08x\n",
464 I915_READ(INSTDONE1));
465 printk(KERN_ERR " ACTHD: 0x%08x\n",
466 I915_READ(ACTHD_I965));
467 I915_WRITE(IPEIR_I965, ipeir);
468 (void)I915_READ(IPEIR_I965);
469 }
470 }
471
472 I915_WRITE(EIR, eir);
473 (void)I915_READ(EIR);
474 eir = I915_READ(EIR);
475 if (eir) {
476 /*
477 * some errors might have become stuck,
478 * mask them.
479 */
480 DRM_ERROR("EIR stuck: 0x%08x, masking\n", eir);
481 I915_WRITE(EMR, I915_READ(EMR) | eir);
482 I915_WRITE(IIR, I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT);
483 }
484 }
485
486 I915_WRITE(IIR, iir); 570 I915_WRITE(IIR, iir);
487 new_iir = I915_READ(IIR); /* Flush posted writes */ 571 new_iir = I915_READ(IIR); /* Flush posted writes */
488 572
@@ -830,6 +914,7 @@ void i915_driver_irq_preinstall(struct drm_device * dev)
830 atomic_set(&dev_priv->irq_received, 0); 914 atomic_set(&dev_priv->irq_received, 0);
831 915
832 INIT_WORK(&dev_priv->hotplug_work, i915_hotplug_work_func); 916 INIT_WORK(&dev_priv->hotplug_work, i915_hotplug_work_func);
917 INIT_WORK(&dev_priv->error_work, i915_error_work_func);
833 918
834 if (IS_IGDNG(dev)) { 919 if (IS_IGDNG(dev)) {
835 igdng_irq_preinstall(dev); 920 igdng_irq_preinstall(dev);
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 6c085848409..2955083aa47 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -1395,6 +1395,7 @@
1395#define TV_V_CHROMA_42 0x684a8 1395#define TV_V_CHROMA_42 0x684a8
1396 1396
1397/* Display Port */ 1397/* Display Port */
1398#define DP_A 0x64000 /* eDP */
1398#define DP_B 0x64100 1399#define DP_B 0x64100
1399#define DP_C 0x64200 1400#define DP_C 0x64200
1400#define DP_D 0x64300 1401#define DP_D 0x64300
@@ -1437,13 +1438,22 @@
1437/* Mystic DPCD version 1.1 special mode */ 1438/* Mystic DPCD version 1.1 special mode */
1438#define DP_ENHANCED_FRAMING (1 << 18) 1439#define DP_ENHANCED_FRAMING (1 << 18)
1439 1440
1441/* eDP */
1442#define DP_PLL_FREQ_270MHZ (0 << 16)
1443#define DP_PLL_FREQ_160MHZ (1 << 16)
1444#define DP_PLL_FREQ_MASK (3 << 16)
1445
1440/** locked once port is enabled */ 1446/** locked once port is enabled */
1441#define DP_PORT_REVERSAL (1 << 15) 1447#define DP_PORT_REVERSAL (1 << 15)
1442 1448
1449/* eDP */
1450#define DP_PLL_ENABLE (1 << 14)
1451
1443/** sends the clock on lane 15 of the PEG for debug */ 1452/** sends the clock on lane 15 of the PEG for debug */
1444#define DP_CLOCK_OUTPUT_ENABLE (1 << 13) 1453#define DP_CLOCK_OUTPUT_ENABLE (1 << 13)
1445 1454
1446#define DP_SCRAMBLING_DISABLE (1 << 12) 1455#define DP_SCRAMBLING_DISABLE (1 << 12)
1456#define DP_SCRAMBLING_DISABLE_IGDNG (1 << 7)
1447 1457
1448/** limit RGB values to avoid confusing TVs */ 1458/** limit RGB values to avoid confusing TVs */
1449#define DP_COLOR_RANGE_16_235 (1 << 8) 1459#define DP_COLOR_RANGE_16_235 (1 << 8)
@@ -1463,6 +1473,13 @@
1463 * is 20 bytes in each direction, hence the 5 fixed 1473 * is 20 bytes in each direction, hence the 5 fixed
1464 * data registers 1474 * data registers
1465 */ 1475 */
1476#define DPA_AUX_CH_CTL 0x64010
1477#define DPA_AUX_CH_DATA1 0x64014
1478#define DPA_AUX_CH_DATA2 0x64018
1479#define DPA_AUX_CH_DATA3 0x6401c
1480#define DPA_AUX_CH_DATA4 0x64020
1481#define DPA_AUX_CH_DATA5 0x64024
1482
1466#define DPB_AUX_CH_CTL 0x64110 1483#define DPB_AUX_CH_CTL 0x64110
1467#define DPB_AUX_CH_DATA1 0x64114 1484#define DPB_AUX_CH_DATA1 0x64114
1468#define DPB_AUX_CH_DATA2 0x64118 1485#define DPB_AUX_CH_DATA2 0x64118
@@ -1618,7 +1635,7 @@
1618#define I830_FIFO_LINE_SIZE 32 1635#define I830_FIFO_LINE_SIZE 32
1619#define I945_FIFO_SIZE 127 /* 945 & 965 */ 1636#define I945_FIFO_SIZE 127 /* 945 & 965 */
1620#define I915_FIFO_SIZE 95 1637#define I915_FIFO_SIZE 95
1621#define I855GM_FIFO_SIZE 255 1638#define I855GM_FIFO_SIZE 127 /* In cachelines */
1622#define I830_FIFO_SIZE 95 1639#define I830_FIFO_SIZE 95
1623#define I915_MAX_WM 0x3f 1640#define I915_MAX_WM 0x3f
1624 1641
@@ -1848,6 +1865,8 @@
1848#define PFA_CTL_1 0x68080 1865#define PFA_CTL_1 0x68080
1849#define PFB_CTL_1 0x68880 1866#define PFB_CTL_1 0x68880
1850#define PF_ENABLE (1<<31) 1867#define PF_ENABLE (1<<31)
1868#define PFA_WIN_SZ 0x68074
1869#define PFB_WIN_SZ 0x68874
1851 1870
1852/* legacy palette */ 1871/* legacy palette */
1853#define LGC_PALETTE_A 0x4a000 1872#define LGC_PALETTE_A 0x4a000
@@ -2208,4 +2227,28 @@
2208#define PCH_PP_OFF_DELAYS 0xc720c 2227#define PCH_PP_OFF_DELAYS 0xc720c
2209#define PCH_PP_DIVISOR 0xc7210 2228#define PCH_PP_DIVISOR 0xc7210
2210 2229
2230#define PCH_DP_B 0xe4100
2231#define PCH_DPB_AUX_CH_CTL 0xe4110
2232#define PCH_DPB_AUX_CH_DATA1 0xe4114
2233#define PCH_DPB_AUX_CH_DATA2 0xe4118
2234#define PCH_DPB_AUX_CH_DATA3 0xe411c
2235#define PCH_DPB_AUX_CH_DATA4 0xe4120
2236#define PCH_DPB_AUX_CH_DATA5 0xe4124
2237
2238#define PCH_DP_C 0xe4200
2239#define PCH_DPC_AUX_CH_CTL 0xe4210
2240#define PCH_DPC_AUX_CH_DATA1 0xe4214
2241#define PCH_DPC_AUX_CH_DATA2 0xe4218
2242#define PCH_DPC_AUX_CH_DATA3 0xe421c
2243#define PCH_DPC_AUX_CH_DATA4 0xe4220
2244#define PCH_DPC_AUX_CH_DATA5 0xe4224
2245
2246#define PCH_DP_D 0xe4300
2247#define PCH_DPD_AUX_CH_CTL 0xe4310
2248#define PCH_DPD_AUX_CH_DATA1 0xe4314
2249#define PCH_DPD_AUX_CH_DATA2 0xe4318
2250#define PCH_DPD_AUX_CH_DATA3 0xe431c
2251#define PCH_DPD_AUX_CH_DATA4 0xe4320
2252#define PCH_DPD_AUX_CH_DATA5 0xe4324
2253
2211#endif /* _I915_REG_H_ */ 2254#endif /* _I915_REG_H_ */
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
index 9e1d16e5c3e..1d04e1904ac 100644
--- a/drivers/gpu/drm/i915/i915_suspend.c
+++ b/drivers/gpu/drm/i915/i915_suspend.c
@@ -598,7 +598,7 @@ int i915_restore_state(struct drm_device *dev)
598 598
599 for (i = 0; i < 16; i++) { 599 for (i = 0; i < 16; i++) {
600 I915_WRITE(SWF00 + (i << 2), dev_priv->saveSWF0[i]); 600 I915_WRITE(SWF00 + (i << 2), dev_priv->saveSWF0[i]);
601 I915_WRITE(SWF10 + (i << 2), dev_priv->saveSWF1[i+7]); 601 I915_WRITE(SWF10 + (i << 2), dev_priv->saveSWF1[i]);
602 } 602 }
603 for (i = 0; i < 3; i++) 603 for (i = 0; i < 3; i++)
604 I915_WRITE(SWF30 + (i << 2), dev_priv->saveSWF2[i]); 604 I915_WRITE(SWF30 + (i << 2), dev_priv->saveSWF2[i]);
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 7cc44719102..300aee3296c 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -97,14 +97,13 @@ static void
97parse_lfp_panel_data(struct drm_i915_private *dev_priv, 97parse_lfp_panel_data(struct drm_i915_private *dev_priv,
98 struct bdb_header *bdb) 98 struct bdb_header *bdb)
99{ 99{
100 struct drm_device *dev = dev_priv->dev;
101 struct bdb_lvds_options *lvds_options; 100 struct bdb_lvds_options *lvds_options;
102 struct bdb_lvds_lfp_data *lvds_lfp_data; 101 struct bdb_lvds_lfp_data *lvds_lfp_data;
103 struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs; 102 struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
104 struct bdb_lvds_lfp_data_entry *entry; 103 struct bdb_lvds_lfp_data_entry *entry;
105 struct lvds_dvo_timing *dvo_timing; 104 struct lvds_dvo_timing *dvo_timing;
106 struct drm_display_mode *panel_fixed_mode; 105 struct drm_display_mode *panel_fixed_mode;
107 int lfp_data_size; 106 int lfp_data_size, dvo_timing_offset;
108 107
109 /* Defaults if we can't find VBT info */ 108 /* Defaults if we can't find VBT info */
110 dev_priv->lvds_dither = 0; 109 dev_priv->lvds_dither = 0;
@@ -133,14 +132,16 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
133 entry = (struct bdb_lvds_lfp_data_entry *) 132 entry = (struct bdb_lvds_lfp_data_entry *)
134 ((uint8_t *)lvds_lfp_data->data + (lfp_data_size * 133 ((uint8_t *)lvds_lfp_data->data + (lfp_data_size *
135 lvds_options->panel_type)); 134 lvds_options->panel_type));
135 dvo_timing_offset = lvds_lfp_data_ptrs->ptr[0].dvo_timing_offset -
136 lvds_lfp_data_ptrs->ptr[0].fp_timing_offset;
136 137
137 /* On IGDNG mobile, LVDS data block removes panel fitting registers. 138 /*
138 So dec 2 dword from dvo_timing offset */ 139 * the size of fp_timing varies on the different platform.
139 if (IS_IGDNG(dev)) 140 * So calculate the DVO timing relative offset in LVDS data
140 dvo_timing = (struct lvds_dvo_timing *) 141 * entry to get the DVO timing entry
141 ((u8 *)&entry->dvo_timing - 8); 142 */
142 else 143 dvo_timing = (struct lvds_dvo_timing *)
143 dvo_timing = &entry->dvo_timing; 144 ((unsigned char *)entry + dvo_timing_offset);
144 145
145 panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL); 146 panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL);
146 147
@@ -295,6 +296,25 @@ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv,
295 } 296 }
296 return; 297 return;
297} 298}
299
300static void
301parse_driver_features(struct drm_i915_private *dev_priv,
302 struct bdb_header *bdb)
303{
304 struct drm_device *dev = dev_priv->dev;
305 struct bdb_driver_features *driver;
306
307 /* set default for chips without eDP */
308 if (!SUPPORTS_EDP(dev)) {
309 dev_priv->edp_support = 0;
310 return;
311 }
312
313 driver = find_section(bdb, BDB_DRIVER_FEATURES);
314 if (driver && driver->lvds_config == BDB_DRIVER_FEATURE_EDP)
315 dev_priv->edp_support = 1;
316}
317
298/** 318/**
299 * intel_init_bios - initialize VBIOS settings & find VBT 319 * intel_init_bios - initialize VBIOS settings & find VBT
300 * @dev: DRM device 320 * @dev: DRM device
@@ -345,6 +365,8 @@ intel_init_bios(struct drm_device *dev)
345 parse_lfp_panel_data(dev_priv, bdb); 365 parse_lfp_panel_data(dev_priv, bdb);
346 parse_sdvo_panel_data(dev_priv, bdb); 366 parse_sdvo_panel_data(dev_priv, bdb);
347 parse_sdvo_device_mapping(dev_priv, bdb); 367 parse_sdvo_device_mapping(dev_priv, bdb);
368 parse_driver_features(dev_priv, bdb);
369
348 pci_unmap_rom(pdev, bios); 370 pci_unmap_rom(pdev, bios);
349 371
350 return 0; 372 return 0;
diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h
index fe72e1c225d..0f8e5f69ac7 100644
--- a/drivers/gpu/drm/i915/intel_bios.h
+++ b/drivers/gpu/drm/i915/intel_bios.h
@@ -381,6 +381,51 @@ struct bdb_sdvo_lvds_options {
381} __attribute__((packed)); 381} __attribute__((packed));
382 382
383 383
384#define BDB_DRIVER_FEATURE_NO_LVDS 0
385#define BDB_DRIVER_FEATURE_INT_LVDS 1
386#define BDB_DRIVER_FEATURE_SDVO_LVDS 2
387#define BDB_DRIVER_FEATURE_EDP 3
388
389struct bdb_driver_features {
390 u8 boot_dev_algorithm:1;
391 u8 block_display_switch:1;
392 u8 allow_display_switch:1;
393 u8 hotplug_dvo:1;
394 u8 dual_view_zoom:1;
395 u8 int15h_hook:1;
396 u8 sprite_in_clone:1;
397 u8 primary_lfp_id:1;
398
399 u16 boot_mode_x;
400 u16 boot_mode_y;
401 u8 boot_mode_bpp;
402 u8 boot_mode_refresh;
403
404 u16 enable_lfp_primary:1;
405 u16 selective_mode_pruning:1;
406 u16 dual_frequency:1;
407 u16 render_clock_freq:1; /* 0: high freq; 1: low freq */
408 u16 nt_clone_support:1;
409 u16 power_scheme_ui:1; /* 0: CUI; 1: 3rd party */
410 u16 sprite_display_assign:1; /* 0: secondary; 1: primary */
411 u16 cui_aspect_scaling:1;
412 u16 preserve_aspect_ratio:1;
413 u16 sdvo_device_power_down:1;
414 u16 crt_hotplug:1;
415 u16 lvds_config:2;
416 u16 tv_hotplug:1;
417 u16 hdmi_config:2;
418
419 u8 static_display:1;
420 u8 reserved2:7;
421 u16 legacy_crt_max_x;
422 u16 legacy_crt_max_y;
423 u8 legacy_crt_max_refresh;
424
425 u8 hdmi_termination;
426 u8 custom_vbt_version;
427} __attribute__((packed));
428
384bool intel_init_bios(struct drm_device *dev); 429bool intel_init_bios(struct drm_device *dev);
385 430
386/* 431/*
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index d6a1a6e5539..4cf8e2e88a4 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -156,6 +156,9 @@ static bool intel_igdng_crt_detect_hotplug(struct drm_connector *connector)
156 156
157 temp = adpa = I915_READ(PCH_ADPA); 157 temp = adpa = I915_READ(PCH_ADPA);
158 158
159 adpa &= ~ADPA_DAC_ENABLE;
160 I915_WRITE(PCH_ADPA, adpa);
161
159 adpa &= ~ADPA_CRT_HOTPLUG_MASK; 162 adpa &= ~ADPA_CRT_HOTPLUG_MASK;
160 163
161 adpa |= (ADPA_CRT_HOTPLUG_PERIOD_128 | 164 adpa |= (ADPA_CRT_HOTPLUG_PERIOD_128 |
@@ -169,13 +172,14 @@ static bool intel_igdng_crt_detect_hotplug(struct drm_connector *connector)
169 DRM_DEBUG("pch crt adpa 0x%x", adpa); 172 DRM_DEBUG("pch crt adpa 0x%x", adpa);
170 I915_WRITE(PCH_ADPA, adpa); 173 I915_WRITE(PCH_ADPA, adpa);
171 174
172 /* This might not be needed as not specified in spec...*/ 175 while ((I915_READ(PCH_ADPA) & ADPA_CRT_HOTPLUG_FORCE_TRIGGER) != 0)
173 udelay(1000); 176 ;
174 177
175 /* Check the status to see if both blue and green are on now */ 178 /* Check the status to see if both blue and green are on now */
176 adpa = I915_READ(PCH_ADPA); 179 adpa = I915_READ(PCH_ADPA);
177 if ((adpa & ADPA_CRT_HOTPLUG_MONITOR_MASK) == 180 adpa &= ADPA_CRT_HOTPLUG_MONITOR_MASK;
178 ADPA_CRT_HOTPLUG_MONITOR_COLOR) 181 if ((adpa == ADPA_CRT_HOTPLUG_MONITOR_COLOR) ||
182 (adpa == ADPA_CRT_HOTPLUG_MONITOR_MONO))
179 ret = true; 183 ret = true;
180 else 184 else
181 ret = false; 185 ret = false;
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 508838ee31e..d6fce213341 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -34,6 +34,8 @@
34 34
35#include "drm_crtc_helper.h" 35#include "drm_crtc_helper.h"
36 36
37#define HAS_eDP (intel_pipe_has_type(crtc, INTEL_OUTPUT_EDP))
38
37bool intel_pipe_has_type (struct drm_crtc *crtc, int type); 39bool intel_pipe_has_type (struct drm_crtc *crtc, int type);
38static void intel_update_watermarks(struct drm_device *dev); 40static void intel_update_watermarks(struct drm_device *dev);
39 41
@@ -88,7 +90,7 @@ struct intel_limit {
88#define I8XX_P2_SLOW 4 90#define I8XX_P2_SLOW 4
89#define I8XX_P2_FAST 2 91#define I8XX_P2_FAST 2
90#define I8XX_P2_LVDS_SLOW 14 92#define I8XX_P2_LVDS_SLOW 14
91#define I8XX_P2_LVDS_FAST 14 /* No fast option */ 93#define I8XX_P2_LVDS_FAST 7
92#define I8XX_P2_SLOW_LIMIT 165000 94#define I8XX_P2_SLOW_LIMIT 165000
93 95
94#define I9XX_DOT_MIN 20000 96#define I9XX_DOT_MIN 20000
@@ -268,6 +270,9 @@ intel_igdng_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
268static bool 270static bool
269intel_find_pll_g4x_dp(const intel_limit_t *, struct drm_crtc *crtc, 271intel_find_pll_g4x_dp(const intel_limit_t *, struct drm_crtc *crtc,
270 int target, int refclk, intel_clock_t *best_clock); 272 int target, int refclk, intel_clock_t *best_clock);
273static bool
274intel_find_pll_igdng_dp(const intel_limit_t *, struct drm_crtc *crtc,
275 int target, int refclk, intel_clock_t *best_clock);
271 276
272static const intel_limit_t intel_limits_i8xx_dvo = { 277static const intel_limit_t intel_limits_i8xx_dvo = {
273 .dot = { .min = I8XX_DOT_MIN, .max = I8XX_DOT_MAX }, 278 .dot = { .min = I8XX_DOT_MIN, .max = I8XX_DOT_MAX },
@@ -598,6 +603,23 @@ bool intel_pipe_has_type (struct drm_crtc *crtc, int type)
598 return false; 603 return false;
599} 604}
600 605
606struct drm_connector *
607intel_pipe_get_output (struct drm_crtc *crtc)
608{
609 struct drm_device *dev = crtc->dev;
610 struct drm_mode_config *mode_config = &dev->mode_config;
611 struct drm_connector *l_entry, *ret = NULL;
612
613 list_for_each_entry(l_entry, &mode_config->connector_list, head) {
614 if (l_entry->encoder &&
615 l_entry->encoder->crtc == crtc) {
616 ret = l_entry;
617 break;
618 }
619 }
620 return ret;
621}
622
601#define INTELPllInvalid(s) do { /* DRM_DEBUG(s); */ return false; } while (0) 623#define INTELPllInvalid(s) do { /* DRM_DEBUG(s); */ return false; } while (0)
602/** 624/**
603 * Returns whether the given set of divisors are valid for a given refclk with 625 * Returns whether the given set of divisors are valid for a given refclk with
@@ -645,7 +667,7 @@ intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
645 int err = target; 667 int err = target;
646 668
647 if (IS_I9XX(dev) && intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS) && 669 if (IS_I9XX(dev) && intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS) &&
648 (I915_READ(LVDS) & LVDS_PORT_EN) != 0) { 670 (I915_READ(LVDS)) != 0) {
649 /* 671 /*
650 * For LVDS, if the panel is on, just rely on its current 672 * For LVDS, if the panel is on, just rely on its current
651 * settings for dual-channel. We haven't figured out how to 673 * settings for dual-channel. We haven't figured out how to
@@ -752,6 +774,30 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
752} 774}
753 775
754static bool 776static bool
777intel_find_pll_igdng_dp(const intel_limit_t *limit, struct drm_crtc *crtc,
778 int target, int refclk, intel_clock_t *best_clock)
779{
780 struct drm_device *dev = crtc->dev;
781 intel_clock_t clock;
782 if (target < 200000) {
783 clock.n = 1;
784 clock.p1 = 2;
785 clock.p2 = 10;
786 clock.m1 = 12;
787 clock.m2 = 9;
788 } else {
789 clock.n = 2;
790 clock.p1 = 1;
791 clock.p2 = 10;
792 clock.m1 = 14;
793 clock.m2 = 8;
794 }
795 intel_clock(dev, refclk, &clock);
796 memcpy(best_clock, &clock, sizeof(intel_clock_t));
797 return true;
798}
799
800static bool
755intel_igdng_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, 801intel_igdng_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
756 int target, int refclk, intel_clock_t *best_clock) 802 int target, int refclk, intel_clock_t *best_clock)
757{ 803{
@@ -763,6 +809,14 @@ intel_igdng_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
763 int err_most = 47; 809 int err_most = 47;
764 found = false; 810 found = false;
765 811
812 /* eDP has only 2 clock choice, no n/m/p setting */
813 if (HAS_eDP)
814 return true;
815
816 if (intel_pipe_has_type(crtc, INTEL_OUTPUT_DISPLAYPORT))
817 return intel_find_pll_igdng_dp(limit, crtc, target,
818 refclk, best_clock);
819
766 if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) { 820 if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) {
767 if ((I915_READ(LVDS) & LVDS_CLKB_POWER_MASK) == 821 if ((I915_READ(LVDS) & LVDS_CLKB_POWER_MASK) ==
768 LVDS_CLKB_POWER_UP) 822 LVDS_CLKB_POWER_UP)
@@ -998,6 +1052,90 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
998 return 0; 1052 return 0;
999} 1053}
1000 1054
1055/* Disable the VGA plane that we never use */
1056static void i915_disable_vga (struct drm_device *dev)
1057{
1058 struct drm_i915_private *dev_priv = dev->dev_private;
1059 u8 sr1;
1060 u32 vga_reg;
1061
1062 if (IS_IGDNG(dev))
1063 vga_reg = CPU_VGACNTRL;
1064 else
1065 vga_reg = VGACNTRL;
1066
1067 if (I915_READ(vga_reg) & VGA_DISP_DISABLE)
1068 return;
1069
1070 I915_WRITE8(VGA_SR_INDEX, 1);
1071 sr1 = I915_READ8(VGA_SR_DATA);
1072 I915_WRITE8(VGA_SR_DATA, sr1 | (1 << 5));
1073 udelay(100);
1074
1075 I915_WRITE(vga_reg, VGA_DISP_DISABLE);
1076}
1077
1078static void igdng_disable_pll_edp (struct drm_crtc *crtc)
1079{
1080 struct drm_device *dev = crtc->dev;
1081 struct drm_i915_private *dev_priv = dev->dev_private;
1082 u32 dpa_ctl;
1083
1084 DRM_DEBUG("\n");
1085 dpa_ctl = I915_READ(DP_A);
1086 dpa_ctl &= ~DP_PLL_ENABLE;
1087 I915_WRITE(DP_A, dpa_ctl);
1088}
1089
1090static void igdng_enable_pll_edp (struct drm_crtc *crtc)
1091{
1092 struct drm_device *dev = crtc->dev;
1093 struct drm_i915_private *dev_priv = dev->dev_private;
1094 u32 dpa_ctl;
1095
1096 dpa_ctl = I915_READ(DP_A);
1097 dpa_ctl |= DP_PLL_ENABLE;
1098 I915_WRITE(DP_A, dpa_ctl);
1099 udelay(200);
1100}
1101
1102
1103static void igdng_set_pll_edp (struct drm_crtc *crtc, int clock)
1104{
1105 struct drm_device *dev = crtc->dev;
1106 struct drm_i915_private *dev_priv = dev->dev_private;
1107 u32 dpa_ctl;
1108
1109 DRM_DEBUG("eDP PLL enable for clock %d\n", clock);
1110 dpa_ctl = I915_READ(DP_A);
1111 dpa_ctl &= ~DP_PLL_FREQ_MASK;
1112
1113 if (clock < 200000) {
1114 u32 temp;
1115 dpa_ctl |= DP_PLL_FREQ_160MHZ;
1116 /* workaround for 160Mhz:
1117 1) program 0x4600c bits 15:0 = 0x8124
1118 2) program 0x46010 bit 0 = 1
1119 3) program 0x46034 bit 24 = 1
1120 4) program 0x64000 bit 14 = 1
1121 */
1122 temp = I915_READ(0x4600c);
1123 temp &= 0xffff0000;
1124 I915_WRITE(0x4600c, temp | 0x8124);
1125
1126 temp = I915_READ(0x46010);
1127 I915_WRITE(0x46010, temp | 1);
1128
1129 temp = I915_READ(0x46034);
1130 I915_WRITE(0x46034, temp | (1 << 24));
1131 } else {
1132 dpa_ctl |= DP_PLL_FREQ_270MHZ;
1133 }
1134 I915_WRITE(DP_A, dpa_ctl);
1135
1136 udelay(500);
1137}
1138
1001static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode) 1139static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1002{ 1140{
1003 struct drm_device *dev = crtc->dev; 1141 struct drm_device *dev = crtc->dev;
@@ -1015,6 +1153,7 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1015 int fdi_rx_imr_reg = (pipe == 0) ? FDI_RXA_IMR : FDI_RXB_IMR; 1153 int fdi_rx_imr_reg = (pipe == 0) ? FDI_RXA_IMR : FDI_RXB_IMR;
1016 int transconf_reg = (pipe == 0) ? TRANSACONF : TRANSBCONF; 1154 int transconf_reg = (pipe == 0) ? TRANSACONF : TRANSBCONF;
1017 int pf_ctl_reg = (pipe == 0) ? PFA_CTL_1 : PFB_CTL_1; 1155 int pf_ctl_reg = (pipe == 0) ? PFA_CTL_1 : PFB_CTL_1;
1156 int pf_win_size = (pipe == 0) ? PFA_WIN_SZ : PFB_WIN_SZ;
1018 int cpu_htot_reg = (pipe == 0) ? HTOTAL_A : HTOTAL_B; 1157 int cpu_htot_reg = (pipe == 0) ? HTOTAL_A : HTOTAL_B;
1019 int cpu_hblank_reg = (pipe == 0) ? HBLANK_A : HBLANK_B; 1158 int cpu_hblank_reg = (pipe == 0) ? HBLANK_A : HBLANK_B;
1020 int cpu_hsync_reg = (pipe == 0) ? HSYNC_A : HSYNC_B; 1159 int cpu_hsync_reg = (pipe == 0) ? HSYNC_A : HSYNC_B;
@@ -1028,7 +1167,7 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1028 int trans_vblank_reg = (pipe == 0) ? TRANS_VBLANK_A : TRANS_VBLANK_B; 1167 int trans_vblank_reg = (pipe == 0) ? TRANS_VBLANK_A : TRANS_VBLANK_B;
1029 int trans_vsync_reg = (pipe == 0) ? TRANS_VSYNC_A : TRANS_VSYNC_B; 1168 int trans_vsync_reg = (pipe == 0) ? TRANS_VSYNC_A : TRANS_VSYNC_B;
1030 u32 temp; 1169 u32 temp;
1031 int tries = 5, j; 1170 int tries = 5, j, n;
1032 1171
1033 /* XXX: When our outputs are all unaware of DPMS modes other than off 1172 /* XXX: When our outputs are all unaware of DPMS modes other than off
1034 * and on, we should map those modes to DRM_MODE_DPMS_OFF in the CRTC. 1173 * and on, we should map those modes to DRM_MODE_DPMS_OFF in the CRTC.
@@ -1038,27 +1177,32 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1038 case DRM_MODE_DPMS_STANDBY: 1177 case DRM_MODE_DPMS_STANDBY:
1039 case DRM_MODE_DPMS_SUSPEND: 1178 case DRM_MODE_DPMS_SUSPEND:
1040 DRM_DEBUG("crtc %d dpms on\n", pipe); 1179 DRM_DEBUG("crtc %d dpms on\n", pipe);
1041 /* enable PCH DPLL */ 1180 if (HAS_eDP) {
1042 temp = I915_READ(pch_dpll_reg); 1181 /* enable eDP PLL */
1043 if ((temp & DPLL_VCO_ENABLE) == 0) { 1182 igdng_enable_pll_edp(crtc);
1044 I915_WRITE(pch_dpll_reg, temp | DPLL_VCO_ENABLE); 1183 } else {
1045 I915_READ(pch_dpll_reg); 1184 /* enable PCH DPLL */
1046 } 1185 temp = I915_READ(pch_dpll_reg);
1047 1186 if ((temp & DPLL_VCO_ENABLE) == 0) {
1048 /* enable PCH FDI RX PLL, wait warmup plus DMI latency */ 1187 I915_WRITE(pch_dpll_reg, temp | DPLL_VCO_ENABLE);
1049 temp = I915_READ(fdi_rx_reg); 1188 I915_READ(pch_dpll_reg);
1050 I915_WRITE(fdi_rx_reg, temp | FDI_RX_PLL_ENABLE | 1189 }
1051 FDI_SEL_PCDCLK |
1052 FDI_DP_PORT_WIDTH_X4); /* default 4 lanes */
1053 I915_READ(fdi_rx_reg);
1054 udelay(200);
1055 1190
1056 /* Enable CPU FDI TX PLL, always on for IGDNG */ 1191 /* enable PCH FDI RX PLL, wait warmup plus DMI latency */
1057 temp = I915_READ(fdi_tx_reg); 1192 temp = I915_READ(fdi_rx_reg);
1058 if ((temp & FDI_TX_PLL_ENABLE) == 0) { 1193 I915_WRITE(fdi_rx_reg, temp | FDI_RX_PLL_ENABLE |
1059 I915_WRITE(fdi_tx_reg, temp | FDI_TX_PLL_ENABLE); 1194 FDI_SEL_PCDCLK |
1060 I915_READ(fdi_tx_reg); 1195 FDI_DP_PORT_WIDTH_X4); /* default 4 lanes */
1061 udelay(100); 1196 I915_READ(fdi_rx_reg);
1197 udelay(200);
1198
1199 /* Enable CPU FDI TX PLL, always on for IGDNG */
1200 temp = I915_READ(fdi_tx_reg);
1201 if ((temp & FDI_TX_PLL_ENABLE) == 0) {
1202 I915_WRITE(fdi_tx_reg, temp | FDI_TX_PLL_ENABLE);
1203 I915_READ(fdi_tx_reg);
1204 udelay(100);
1205 }
1062 } 1206 }
1063 1207
1064 /* Enable CPU pipe */ 1208 /* Enable CPU pipe */
@@ -1077,122 +1221,126 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1077 I915_WRITE(dspbase_reg, I915_READ(dspbase_reg)); 1221 I915_WRITE(dspbase_reg, I915_READ(dspbase_reg));
1078 } 1222 }
1079 1223
1080 /* enable CPU FDI TX and PCH FDI RX */ 1224 if (!HAS_eDP) {
1081 temp = I915_READ(fdi_tx_reg); 1225 /* enable CPU FDI TX and PCH FDI RX */
1082 temp |= FDI_TX_ENABLE; 1226 temp = I915_READ(fdi_tx_reg);
1083 temp |= FDI_DP_PORT_WIDTH_X4; /* default */ 1227 temp |= FDI_TX_ENABLE;
1084 temp &= ~FDI_LINK_TRAIN_NONE; 1228 temp |= FDI_DP_PORT_WIDTH_X4; /* default */
1085 temp |= FDI_LINK_TRAIN_PATTERN_1; 1229 temp &= ~FDI_LINK_TRAIN_NONE;
1086 I915_WRITE(fdi_tx_reg, temp); 1230 temp |= FDI_LINK_TRAIN_PATTERN_1;
1087 I915_READ(fdi_tx_reg); 1231 I915_WRITE(fdi_tx_reg, temp);
1232 I915_READ(fdi_tx_reg);
1088 1233
1089 temp = I915_READ(fdi_rx_reg); 1234 temp = I915_READ(fdi_rx_reg);
1090 temp &= ~FDI_LINK_TRAIN_NONE; 1235 temp &= ~FDI_LINK_TRAIN_NONE;
1091 temp |= FDI_LINK_TRAIN_PATTERN_1; 1236 temp |= FDI_LINK_TRAIN_PATTERN_1;
1092 I915_WRITE(fdi_rx_reg, temp | FDI_RX_ENABLE); 1237 I915_WRITE(fdi_rx_reg, temp | FDI_RX_ENABLE);
1093 I915_READ(fdi_rx_reg); 1238 I915_READ(fdi_rx_reg);
1094 1239
1095 udelay(150); 1240 udelay(150);
1096 1241
1097 /* Train FDI. */ 1242 /* Train FDI. */
1098 /* umask FDI RX Interrupt symbol_lock and bit_lock bit 1243 /* umask FDI RX Interrupt symbol_lock and bit_lock bit
1099 for train result */ 1244 for train result */
1100 temp = I915_READ(fdi_rx_imr_reg); 1245 temp = I915_READ(fdi_rx_imr_reg);
1101 temp &= ~FDI_RX_SYMBOL_LOCK; 1246 temp &= ~FDI_RX_SYMBOL_LOCK;
1102 temp &= ~FDI_RX_BIT_LOCK; 1247 temp &= ~FDI_RX_BIT_LOCK;
1103 I915_WRITE(fdi_rx_imr_reg, temp); 1248 I915_WRITE(fdi_rx_imr_reg, temp);
1104 I915_READ(fdi_rx_imr_reg); 1249 I915_READ(fdi_rx_imr_reg);
1105 udelay(150); 1250 udelay(150);
1106 1251
1107 temp = I915_READ(fdi_rx_iir_reg); 1252 temp = I915_READ(fdi_rx_iir_reg);
1108 DRM_DEBUG("FDI_RX_IIR 0x%x\n", temp); 1253 DRM_DEBUG("FDI_RX_IIR 0x%x\n", temp);
1109 1254
1110 if ((temp & FDI_RX_BIT_LOCK) == 0) { 1255 if ((temp & FDI_RX_BIT_LOCK) == 0) {
1111 for (j = 0; j < tries; j++) { 1256 for (j = 0; j < tries; j++) {
1112 temp = I915_READ(fdi_rx_iir_reg); 1257 temp = I915_READ(fdi_rx_iir_reg);
1113 DRM_DEBUG("FDI_RX_IIR 0x%x\n", temp); 1258 DRM_DEBUG("FDI_RX_IIR 0x%x\n", temp);
1114 if (temp & FDI_RX_BIT_LOCK) 1259 if (temp & FDI_RX_BIT_LOCK)
1115 break; 1260 break;
1116 udelay(200); 1261 udelay(200);
1117 } 1262 }
1118 if (j != tries) 1263 if (j != tries)
1264 I915_WRITE(fdi_rx_iir_reg,
1265 temp | FDI_RX_BIT_LOCK);
1266 else
1267 DRM_DEBUG("train 1 fail\n");
1268 } else {
1119 I915_WRITE(fdi_rx_iir_reg, 1269 I915_WRITE(fdi_rx_iir_reg,
1120 temp | FDI_RX_BIT_LOCK); 1270 temp | FDI_RX_BIT_LOCK);
1121 else 1271 DRM_DEBUG("train 1 ok 2!\n");
1122 DRM_DEBUG("train 1 fail\n"); 1272 }
1123 } else { 1273 temp = I915_READ(fdi_tx_reg);
1124 I915_WRITE(fdi_rx_iir_reg, 1274 temp &= ~FDI_LINK_TRAIN_NONE;
1125 temp | FDI_RX_BIT_LOCK); 1275 temp |= FDI_LINK_TRAIN_PATTERN_2;
1126 DRM_DEBUG("train 1 ok 2!\n"); 1276 I915_WRITE(fdi_tx_reg, temp);
1127 } 1277
1128 temp = I915_READ(fdi_tx_reg); 1278 temp = I915_READ(fdi_rx_reg);
1129 temp &= ~FDI_LINK_TRAIN_NONE; 1279 temp &= ~FDI_LINK_TRAIN_NONE;
1130 temp |= FDI_LINK_TRAIN_PATTERN_2; 1280 temp |= FDI_LINK_TRAIN_PATTERN_2;
1131 I915_WRITE(fdi_tx_reg, temp); 1281 I915_WRITE(fdi_rx_reg, temp);
1132
1133 temp = I915_READ(fdi_rx_reg);
1134 temp &= ~FDI_LINK_TRAIN_NONE;
1135 temp |= FDI_LINK_TRAIN_PATTERN_2;
1136 I915_WRITE(fdi_rx_reg, temp);
1137 1282
1138 udelay(150); 1283 udelay(150);
1139 1284
1140 temp = I915_READ(fdi_rx_iir_reg); 1285 temp = I915_READ(fdi_rx_iir_reg);
1141 DRM_DEBUG("FDI_RX_IIR 0x%x\n", temp); 1286 DRM_DEBUG("FDI_RX_IIR 0x%x\n", temp);
1142 1287
1143 if ((temp & FDI_RX_SYMBOL_LOCK) == 0) { 1288 if ((temp & FDI_RX_SYMBOL_LOCK) == 0) {
1144 for (j = 0; j < tries; j++) { 1289 for (j = 0; j < tries; j++) {
1145 temp = I915_READ(fdi_rx_iir_reg); 1290 temp = I915_READ(fdi_rx_iir_reg);
1146 DRM_DEBUG("FDI_RX_IIR 0x%x\n", temp); 1291 DRM_DEBUG("FDI_RX_IIR 0x%x\n", temp);
1147 if (temp & FDI_RX_SYMBOL_LOCK) 1292 if (temp & FDI_RX_SYMBOL_LOCK)
1148 break; 1293 break;
1149 udelay(200); 1294 udelay(200);
1150 } 1295 }
1151 if (j != tries) { 1296 if (j != tries) {
1297 I915_WRITE(fdi_rx_iir_reg,
1298 temp | FDI_RX_SYMBOL_LOCK);
1299 DRM_DEBUG("train 2 ok 1!\n");
1300 } else
1301 DRM_DEBUG("train 2 fail\n");
1302 } else {
1152 I915_WRITE(fdi_rx_iir_reg, 1303 I915_WRITE(fdi_rx_iir_reg,
1153 temp | FDI_RX_SYMBOL_LOCK); 1304 temp | FDI_RX_SYMBOL_LOCK);
1154 DRM_DEBUG("train 2 ok 1!\n"); 1305 DRM_DEBUG("train 2 ok 2!\n");
1155 } else 1306 }
1156 DRM_DEBUG("train 2 fail\n"); 1307 DRM_DEBUG("train done\n");
1157 } else {
1158 I915_WRITE(fdi_rx_iir_reg, temp | FDI_RX_SYMBOL_LOCK);
1159 DRM_DEBUG("train 2 ok 2!\n");
1160 }
1161 DRM_DEBUG("train done\n");
1162 1308
1163 /* set transcoder timing */ 1309 /* set transcoder timing */
1164 I915_WRITE(trans_htot_reg, I915_READ(cpu_htot_reg)); 1310 I915_WRITE(trans_htot_reg, I915_READ(cpu_htot_reg));
1165 I915_WRITE(trans_hblank_reg, I915_READ(cpu_hblank_reg)); 1311 I915_WRITE(trans_hblank_reg, I915_READ(cpu_hblank_reg));
1166 I915_WRITE(trans_hsync_reg, I915_READ(cpu_hsync_reg)); 1312 I915_WRITE(trans_hsync_reg, I915_READ(cpu_hsync_reg));
1167 1313
1168 I915_WRITE(trans_vtot_reg, I915_READ(cpu_vtot_reg)); 1314 I915_WRITE(trans_vtot_reg, I915_READ(cpu_vtot_reg));
1169 I915_WRITE(trans_vblank_reg, I915_READ(cpu_vblank_reg)); 1315 I915_WRITE(trans_vblank_reg, I915_READ(cpu_vblank_reg));
1170 I915_WRITE(trans_vsync_reg, I915_READ(cpu_vsync_reg)); 1316 I915_WRITE(trans_vsync_reg, I915_READ(cpu_vsync_reg));
1171 1317
1172 /* enable PCH transcoder */ 1318 /* enable PCH transcoder */
1173 temp = I915_READ(transconf_reg); 1319 temp = I915_READ(transconf_reg);
1174 I915_WRITE(transconf_reg, temp | TRANS_ENABLE); 1320 I915_WRITE(transconf_reg, temp | TRANS_ENABLE);
1175 I915_READ(transconf_reg); 1321 I915_READ(transconf_reg);
1176 1322
1177 while ((I915_READ(transconf_reg) & TRANS_STATE_ENABLE) == 0) 1323 while ((I915_READ(transconf_reg) & TRANS_STATE_ENABLE) == 0)
1178 ; 1324 ;
1179 1325
1180 /* enable normal */ 1326 /* enable normal */
1181 1327
1182 temp = I915_READ(fdi_tx_reg); 1328 temp = I915_READ(fdi_tx_reg);
1183 temp &= ~FDI_LINK_TRAIN_NONE; 1329 temp &= ~FDI_LINK_TRAIN_NONE;
1184 I915_WRITE(fdi_tx_reg, temp | FDI_LINK_TRAIN_NONE | 1330 I915_WRITE(fdi_tx_reg, temp | FDI_LINK_TRAIN_NONE |
1185 FDI_TX_ENHANCE_FRAME_ENABLE); 1331 FDI_TX_ENHANCE_FRAME_ENABLE);
1186 I915_READ(fdi_tx_reg); 1332 I915_READ(fdi_tx_reg);
1187 1333
1188 temp = I915_READ(fdi_rx_reg); 1334 temp = I915_READ(fdi_rx_reg);
1189 temp &= ~FDI_LINK_TRAIN_NONE; 1335 temp &= ~FDI_LINK_TRAIN_NONE;
1190 I915_WRITE(fdi_rx_reg, temp | FDI_LINK_TRAIN_NONE | 1336 I915_WRITE(fdi_rx_reg, temp | FDI_LINK_TRAIN_NONE |
1191 FDI_RX_ENHANCE_FRAME_ENABLE); 1337 FDI_RX_ENHANCE_FRAME_ENABLE);
1192 I915_READ(fdi_rx_reg); 1338 I915_READ(fdi_rx_reg);
1193 1339
1194 /* wait one idle pattern time */ 1340 /* wait one idle pattern time */
1195 udelay(100); 1341 udelay(100);
1342
1343 }
1196 1344
1197 intel_crtc_load_lut(crtc); 1345 intel_crtc_load_lut(crtc);
1198 1346
@@ -1200,8 +1348,7 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1200 case DRM_MODE_DPMS_OFF: 1348 case DRM_MODE_DPMS_OFF:
1201 DRM_DEBUG("crtc %d dpms off\n", pipe); 1349 DRM_DEBUG("crtc %d dpms off\n", pipe);
1202 1350
1203 /* Disable the VGA plane that we never use */ 1351 i915_disable_vga(dev);
1204 I915_WRITE(CPU_VGACNTRL, VGA_DISP_DISABLE);
1205 1352
1206 /* Disable display plane */ 1353 /* Disable display plane */
1207 temp = I915_READ(dspcntr_reg); 1354 temp = I915_READ(dspcntr_reg);
@@ -1217,17 +1364,23 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1217 if ((temp & PIPEACONF_ENABLE) != 0) { 1364 if ((temp & PIPEACONF_ENABLE) != 0) {
1218 I915_WRITE(pipeconf_reg, temp & ~PIPEACONF_ENABLE); 1365 I915_WRITE(pipeconf_reg, temp & ~PIPEACONF_ENABLE);
1219 I915_READ(pipeconf_reg); 1366 I915_READ(pipeconf_reg);
1367 n = 0;
1220 /* wait for cpu pipe off, pipe state */ 1368 /* wait for cpu pipe off, pipe state */
1221 while ((I915_READ(pipeconf_reg) & I965_PIPECONF_ACTIVE) != 0) 1369 while ((I915_READ(pipeconf_reg) & I965_PIPECONF_ACTIVE) != 0) {
1222 ; 1370 n++;
1371 if (n < 60) {
1372 udelay(500);
1373 continue;
1374 } else {
1375 DRM_DEBUG("pipe %d off delay\n", pipe);
1376 break;
1377 }
1378 }
1223 } else 1379 } else
1224 DRM_DEBUG("crtc %d is disabled\n", pipe); 1380 DRM_DEBUG("crtc %d is disabled\n", pipe);
1225 1381
1226 /* IGDNG-A : disable cpu panel fitter ? */ 1382 if (HAS_eDP) {
1227 temp = I915_READ(pf_ctl_reg); 1383 igdng_disable_pll_edp(crtc);
1228 if ((temp & PF_ENABLE) != 0) {
1229 I915_WRITE(pf_ctl_reg, temp & ~PF_ENABLE);
1230 I915_READ(pf_ctl_reg);
1231 } 1384 }
1232 1385
1233 /* disable CPU FDI tx and PCH FDI rx */ 1386 /* disable CPU FDI tx and PCH FDI rx */
@@ -1239,6 +1392,8 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1239 I915_WRITE(fdi_rx_reg, temp & ~FDI_RX_ENABLE); 1392 I915_WRITE(fdi_rx_reg, temp & ~FDI_RX_ENABLE);
1240 I915_READ(fdi_rx_reg); 1393 I915_READ(fdi_rx_reg);
1241 1394
1395 udelay(100);
1396
1242 /* still set train pattern 1 */ 1397 /* still set train pattern 1 */
1243 temp = I915_READ(fdi_tx_reg); 1398 temp = I915_READ(fdi_tx_reg);
1244 temp &= ~FDI_LINK_TRAIN_NONE; 1399 temp &= ~FDI_LINK_TRAIN_NONE;
@@ -1250,14 +1405,25 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1250 temp |= FDI_LINK_TRAIN_PATTERN_1; 1405 temp |= FDI_LINK_TRAIN_PATTERN_1;
1251 I915_WRITE(fdi_rx_reg, temp); 1406 I915_WRITE(fdi_rx_reg, temp);
1252 1407
1408 udelay(100);
1409
1253 /* disable PCH transcoder */ 1410 /* disable PCH transcoder */
1254 temp = I915_READ(transconf_reg); 1411 temp = I915_READ(transconf_reg);
1255 if ((temp & TRANS_ENABLE) != 0) { 1412 if ((temp & TRANS_ENABLE) != 0) {
1256 I915_WRITE(transconf_reg, temp & ~TRANS_ENABLE); 1413 I915_WRITE(transconf_reg, temp & ~TRANS_ENABLE);
1257 I915_READ(transconf_reg); 1414 I915_READ(transconf_reg);
1415 n = 0;
1258 /* wait for PCH transcoder off, transcoder state */ 1416 /* wait for PCH transcoder off, transcoder state */
1259 while ((I915_READ(transconf_reg) & TRANS_STATE_ENABLE) != 0) 1417 while ((I915_READ(transconf_reg) & TRANS_STATE_ENABLE) != 0) {
1260 ; 1418 n++;
1419 if (n < 60) {
1420 udelay(500);
1421 continue;
1422 } else {
1423 DRM_DEBUG("transcoder %d off delay\n", pipe);
1424 break;
1425 }
1426 }
1261 } 1427 }
1262 1428
1263 /* disable PCH DPLL */ 1429 /* disable PCH DPLL */
@@ -1275,6 +1441,22 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1275 I915_READ(fdi_rx_reg); 1441 I915_READ(fdi_rx_reg);
1276 } 1442 }
1277 1443
1444 /* Disable CPU FDI TX PLL */
1445 temp = I915_READ(fdi_tx_reg);
1446 if ((temp & FDI_TX_PLL_ENABLE) != 0) {
1447 I915_WRITE(fdi_tx_reg, temp & ~FDI_TX_PLL_ENABLE);
1448 I915_READ(fdi_tx_reg);
1449 udelay(100);
1450 }
1451
1452 /* Disable PF */
1453 temp = I915_READ(pf_ctl_reg);
1454 if ((temp & PF_ENABLE) != 0) {
1455 I915_WRITE(pf_ctl_reg, temp & ~PF_ENABLE);
1456 I915_READ(pf_ctl_reg);
1457 }
1458 I915_WRITE(pf_win_size, 0);
1459
1278 /* Wait for the clocks to turn off. */ 1460 /* Wait for the clocks to turn off. */
1279 udelay(150); 1461 udelay(150);
1280 break; 1462 break;
@@ -1342,7 +1524,7 @@ static void i9xx_crtc_dpms(struct drm_crtc *crtc, int mode)
1342 //intel_crtc_dpms_video(crtc, FALSE); TODO 1524 //intel_crtc_dpms_video(crtc, FALSE); TODO
1343 1525
1344 /* Disable the VGA plane that we never use */ 1526 /* Disable the VGA plane that we never use */
1345 I915_WRITE(VGACNTRL, VGA_DISP_DISABLE); 1527 i915_disable_vga(dev);
1346 1528
1347 /* Disable display plane */ 1529 /* Disable display plane */
1348 temp = I915_READ(dspcntr_reg); 1530 temp = I915_READ(dspcntr_reg);
@@ -1623,48 +1805,72 @@ static struct intel_watermark_params igd_cursor_hplloff_wm = {
1623 IGD_FIFO_LINE_SIZE 1805 IGD_FIFO_LINE_SIZE
1624}; 1806};
1625static struct intel_watermark_params i945_wm_info = { 1807static struct intel_watermark_params i945_wm_info = {
1626 I915_FIFO_LINE_SIZE, 1808 I945_FIFO_SIZE,
1627 I915_MAX_WM, 1809 I915_MAX_WM,
1628 1, 1810 1,
1629 0, 1811 2,
1630 IGD_FIFO_LINE_SIZE 1812 I915_FIFO_LINE_SIZE
1631}; 1813};
1632static struct intel_watermark_params i915_wm_info = { 1814static struct intel_watermark_params i915_wm_info = {
1633 I945_FIFO_SIZE, 1815 I915_FIFO_SIZE,
1634 I915_MAX_WM, 1816 I915_MAX_WM,
1635 1, 1817 1,
1636 0, 1818 2,
1637 I915_FIFO_LINE_SIZE 1819 I915_FIFO_LINE_SIZE
1638}; 1820};
1639static struct intel_watermark_params i855_wm_info = { 1821static struct intel_watermark_params i855_wm_info = {
1640 I855GM_FIFO_SIZE, 1822 I855GM_FIFO_SIZE,
1641 I915_MAX_WM, 1823 I915_MAX_WM,
1642 1, 1824 1,
1643 0, 1825 2,
1644 I830_FIFO_LINE_SIZE 1826 I830_FIFO_LINE_SIZE
1645}; 1827};
1646static struct intel_watermark_params i830_wm_info = { 1828static struct intel_watermark_params i830_wm_info = {
1647 I830_FIFO_SIZE, 1829 I830_FIFO_SIZE,
1648 I915_MAX_WM, 1830 I915_MAX_WM,
1649 1, 1831 1,
1650 0, 1832 2,
1651 I830_FIFO_LINE_SIZE 1833 I830_FIFO_LINE_SIZE
1652}; 1834};
1653 1835
1836/**
1837 * intel_calculate_wm - calculate watermark level
1838 * @clock_in_khz: pixel clock
1839 * @wm: chip FIFO params
1840 * @pixel_size: display pixel size
1841 * @latency_ns: memory latency for the platform
1842 *
1843 * Calculate the watermark level (the level at which the display plane will
1844 * start fetching from memory again). Each chip has a different display
1845 * FIFO size and allocation, so the caller needs to figure that out and pass
1846 * in the correct intel_watermark_params structure.
1847 *
1848 * As the pixel clock runs, the FIFO will be drained at a rate that depends
1849 * on the pixel size. When it reaches the watermark level, it'll start
1850 * fetching FIFO line sized based chunks from memory until the FIFO fills
1851 * past the watermark point. If the FIFO drains completely, a FIFO underrun
1852 * will occur, and a display engine hang could result.
1853 */
1654static unsigned long intel_calculate_wm(unsigned long clock_in_khz, 1854static unsigned long intel_calculate_wm(unsigned long clock_in_khz,
1655 struct intel_watermark_params *wm, 1855 struct intel_watermark_params *wm,
1656 int pixel_size, 1856 int pixel_size,
1657 unsigned long latency_ns) 1857 unsigned long latency_ns)
1658{ 1858{
1659 unsigned long bytes_required, wm_size; 1859 long entries_required, wm_size;
1860
1861 entries_required = (clock_in_khz * pixel_size * latency_ns) / 1000000;
1862 entries_required /= wm->cacheline_size;
1660 1863
1661 bytes_required = (clock_in_khz * pixel_size * latency_ns) / 1000000; 1864 DRM_DEBUG("FIFO entries required for mode: %d\n", entries_required);
1662 bytes_required /= wm->cacheline_size;
1663 wm_size = wm->fifo_size - bytes_required - wm->guard_size;
1664 1865
1665 if (wm_size > wm->max_wm) 1866 wm_size = wm->fifo_size - (entries_required + wm->guard_size);
1867
1868 DRM_DEBUG("FIFO watermark level: %d\n", wm_size);
1869
1870 /* Don't promote wm_size to unsigned... */
1871 if (wm_size > (long)wm->max_wm)
1666 wm_size = wm->max_wm; 1872 wm_size = wm->max_wm;
1667 if (wm_size == 0) 1873 if (wm_size <= 0)
1668 wm_size = wm->default_wm; 1874 wm_size = wm->default_wm;
1669 return wm_size; 1875 return wm_size;
1670} 1876}
@@ -1799,8 +2005,40 @@ static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock,
1799 return; 2005 return;
1800} 2006}
1801 2007
1802const static int latency_ns = 5000; /* default for non-igd platforms */ 2008const static int latency_ns = 3000; /* default for non-igd platforms */
1803 2009
2010static int intel_get_fifo_size(struct drm_device *dev, int plane)
2011{
2012 struct drm_i915_private *dev_priv = dev->dev_private;
2013 uint32_t dsparb = I915_READ(DSPARB);
2014 int size;
2015
2016 if (IS_I9XX(dev)) {
2017 if (plane == 0)
2018 size = dsparb & 0x7f;
2019 else
2020 size = ((dsparb >> DSPARB_CSTART_SHIFT) & 0x7f) -
2021 (dsparb & 0x7f);
2022 } else if (IS_I85X(dev)) {
2023 if (plane == 0)
2024 size = dsparb & 0x1ff;
2025 else
2026 size = ((dsparb >> DSPARB_BEND_SHIFT) & 0x1ff) -
2027 (dsparb & 0x1ff);
2028 size >>= 1; /* Convert to cachelines */
2029 } else if (IS_845G(dev)) {
2030 size = dsparb & 0x7f;
2031 size >>= 2; /* Convert to cachelines */
2032 } else {
2033 size = dsparb & 0x7f;
2034 size >>= 1; /* Convert to cachelines */
2035 }
2036
2037 DRM_DEBUG("FIFO size - (0x%08x) %s: %d\n", dsparb, plane ? "B" : "A",
2038 size);
2039
2040 return size;
2041}
1804 2042
1805static void i965_update_wm(struct drm_device *dev) 2043static void i965_update_wm(struct drm_device *dev)
1806{ 2044{
@@ -1817,101 +2055,89 @@ static void i9xx_update_wm(struct drm_device *dev, int planea_clock,
1817 int planeb_clock, int sr_hdisplay, int pixel_size) 2055 int planeb_clock, int sr_hdisplay, int pixel_size)
1818{ 2056{
1819 struct drm_i915_private *dev_priv = dev->dev_private; 2057 struct drm_i915_private *dev_priv = dev->dev_private;
1820 uint32_t fwater_lo = I915_READ(FW_BLC) & MM_FIFO_WATERMARK; 2058 uint32_t fwater_lo;
1821 uint32_t fwater_hi = I915_READ(FW_BLC2) & LM_FIFO_WATERMARK; 2059 uint32_t fwater_hi;
1822 int bsize, asize, cwm, bwm = 1, awm = 1, srwm = 1; 2060 int total_size, cacheline_size, cwm, srwm = 1;
1823 uint32_t dsparb = I915_READ(DSPARB); 2061 int planea_wm, planeb_wm;
1824 int planea_entries, planeb_entries; 2062 struct intel_watermark_params planea_params, planeb_params;
1825 struct intel_watermark_params *wm_params;
1826 unsigned long line_time_us; 2063 unsigned long line_time_us;
1827 int sr_clock, sr_entries = 0; 2064 int sr_clock, sr_entries = 0;
1828 2065
2066 /* Create copies of the base settings for each pipe */
1829 if (IS_I965GM(dev) || IS_I945GM(dev)) 2067 if (IS_I965GM(dev) || IS_I945GM(dev))
1830 wm_params = &i945_wm_info; 2068 planea_params = planeb_params = i945_wm_info;
1831 else if (IS_I9XX(dev)) 2069 else if (IS_I9XX(dev))
1832 wm_params = &i915_wm_info; 2070 planea_params = planeb_params = i915_wm_info;
1833 else 2071 else
1834 wm_params = &i855_wm_info; 2072 planea_params = planeb_params = i855_wm_info;
1835
1836 planea_entries = intel_calculate_wm(planea_clock, wm_params,
1837 pixel_size, latency_ns);
1838 planeb_entries = intel_calculate_wm(planeb_clock, wm_params,
1839 pixel_size, latency_ns);
1840
1841 DRM_DEBUG("FIFO entries - A: %d, B: %d\n", planea_entries,
1842 planeb_entries);
1843 2073
1844 if (IS_I9XX(dev)) { 2074 /* Grab a couple of global values before we overwrite them */
1845 asize = dsparb & 0x7f; 2075 total_size = planea_params.fifo_size;
1846 bsize = (dsparb >> DSPARB_CSTART_SHIFT) & 0x7f; 2076 cacheline_size = planea_params.cacheline_size;
1847 } else {
1848 asize = dsparb & 0x1ff;
1849 bsize = (dsparb >> DSPARB_BEND_SHIFT) & 0x1ff;
1850 }
1851 DRM_DEBUG("FIFO size - A: %d, B: %d\n", asize, bsize);
1852 2077
1853 /* Two extra entries for padding */ 2078 /* Update per-plane FIFO sizes */
1854 awm = asize - (planea_entries + 2); 2079 planea_params.fifo_size = intel_get_fifo_size(dev, 0);
1855 bwm = bsize - (planeb_entries + 2); 2080 planeb_params.fifo_size = intel_get_fifo_size(dev, 1);
1856 2081
1857 /* Sanity check against potentially bad FIFO allocations */ 2082 planea_wm = intel_calculate_wm(planea_clock, &planea_params,
1858 if (awm <= 0) { 2083 pixel_size, latency_ns);
1859 /* pipe is on but has too few FIFO entries */ 2084 planeb_wm = intel_calculate_wm(planeb_clock, &planeb_params,
1860 if (planea_entries != 0) 2085 pixel_size, latency_ns);
1861 DRM_DEBUG("plane A needs more FIFO entries\n"); 2086 DRM_DEBUG("FIFO watermarks - A: %d, B: %d\n", planea_wm, planeb_wm);
1862 awm = 1;
1863 }
1864 if (bwm <= 0) {
1865 if (planeb_entries != 0)
1866 DRM_DEBUG("plane B needs more FIFO entries\n");
1867 bwm = 1;
1868 }
1869 2087
1870 /* 2088 /*
1871 * Overlay gets an aggressive default since video jitter is bad. 2089 * Overlay gets an aggressive default since video jitter is bad.
1872 */ 2090 */
1873 cwm = 2; 2091 cwm = 2;
1874 2092
1875 /* Calc sr entries for one pipe configs */ 2093 /* Calc sr entries for one plane configs */
1876 if (!planea_clock || !planeb_clock) { 2094 if (sr_hdisplay && (!planea_clock || !planeb_clock)) {
2095 /* self-refresh has much higher latency */
2096 const static int sr_latency_ns = 6000;
2097
1877 sr_clock = planea_clock ? planea_clock : planeb_clock; 2098 sr_clock = planea_clock ? planea_clock : planeb_clock;
1878 line_time_us = (sr_hdisplay * 1000) / sr_clock; 2099 line_time_us = ((sr_hdisplay * 1000) / sr_clock);
1879 sr_entries = (((latency_ns / line_time_us) + 1) * pixel_size * 2100
1880 sr_hdisplay) / 1000; 2101 /* Use ns/us then divide to preserve precision */
1881 sr_entries = roundup(sr_entries / wm_params->cacheline_size, 1); 2102 sr_entries = (((sr_latency_ns / line_time_us) + 1) *
1882 if (sr_entries < wm_params->fifo_size) 2103 pixel_size * sr_hdisplay) / 1000;
1883 srwm = wm_params->fifo_size - sr_entries; 2104 sr_entries = roundup(sr_entries / cacheline_size, 1);
2105 DRM_DEBUG("self-refresh entries: %d\n", sr_entries);
2106 srwm = total_size - sr_entries;
2107 if (srwm < 0)
2108 srwm = 1;
2109 if (IS_I9XX(dev))
2110 I915_WRITE(FW_BLC_SELF, (srwm & 0x3f));
1884 } 2111 }
1885 2112
1886 DRM_DEBUG("Setting FIFO watermarks - A: %d, B: %d, C: %d, SR %d\n", 2113 DRM_DEBUG("Setting FIFO watermarks - A: %d, B: %d, C: %d, SR %d\n",
1887 awm, bwm, cwm, srwm); 2114 planea_wm, planeb_wm, cwm, srwm);
1888 2115
1889 fwater_lo = fwater_lo | ((bwm & 0x3f) << 16) | (awm & 0x3f); 2116 fwater_lo = ((planeb_wm & 0x3f) << 16) | (planea_wm & 0x3f);
1890 fwater_hi = fwater_hi | (cwm & 0x1f); 2117 fwater_hi = (cwm & 0x1f);
2118
2119 /* Set request length to 8 cachelines per fetch */
2120 fwater_lo = fwater_lo | (1 << 24) | (1 << 8);
2121 fwater_hi = fwater_hi | (1 << 8);
1891 2122
1892 I915_WRITE(FW_BLC, fwater_lo); 2123 I915_WRITE(FW_BLC, fwater_lo);
1893 I915_WRITE(FW_BLC2, fwater_hi); 2124 I915_WRITE(FW_BLC2, fwater_hi);
1894 if (IS_I9XX(dev))
1895 I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN | (srwm & 0x3f));
1896} 2125}
1897 2126
1898static void i830_update_wm(struct drm_device *dev, int planea_clock, 2127static void i830_update_wm(struct drm_device *dev, int planea_clock,
1899 int pixel_size) 2128 int pixel_size)
1900{ 2129{
1901 struct drm_i915_private *dev_priv = dev->dev_private; 2130 struct drm_i915_private *dev_priv = dev->dev_private;
1902 uint32_t dsparb = I915_READ(DSPARB); 2131 uint32_t fwater_lo = I915_READ(FW_BLC) & ~0xfff;
1903 uint32_t fwater_lo = I915_READ(FW_BLC) & MM_FIFO_WATERMARK; 2132 int planea_wm;
1904 unsigned int asize, awm;
1905 int planea_entries;
1906
1907 planea_entries = intel_calculate_wm(planea_clock, &i830_wm_info,
1908 pixel_size, latency_ns);
1909 2133
1910 asize = dsparb & 0x7f; 2134 i830_wm_info.fifo_size = intel_get_fifo_size(dev, 0);
1911 2135
1912 awm = asize - planea_entries; 2136 planea_wm = intel_calculate_wm(planea_clock, &i830_wm_info,
2137 pixel_size, latency_ns);
2138 fwater_lo |= (3<<8) | planea_wm;
1913 2139
1914 fwater_lo = fwater_lo | awm; 2140 DRM_DEBUG("Setting FIFO watermarks - A: %d\n", planea_wm);
1915 2141
1916 I915_WRITE(FW_BLC, fwater_lo); 2142 I915_WRITE(FW_BLC, fwater_lo);
1917} 2143}
@@ -1984,7 +2210,7 @@ static void intel_update_watermarks(struct drm_device *dev)
1984 if (enabled <= 0) 2210 if (enabled <= 0)
1985 return; 2211 return;
1986 2212
1987 /* Single pipe configs can enable self refresh */ 2213 /* Single plane configs can enable self refresh */
1988 if (enabled == 1 && IS_IGD(dev)) 2214 if (enabled == 1 && IS_IGD(dev))
1989 igd_enable_cxsr(dev, sr_clock, pixel_size); 2215 igd_enable_cxsr(dev, sr_clock, pixel_size);
1990 else if (IS_IGD(dev)) 2216 else if (IS_IGD(dev))
@@ -2028,6 +2254,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
2028 u32 dpll = 0, fp = 0, dspcntr, pipeconf; 2254 u32 dpll = 0, fp = 0, dspcntr, pipeconf;
2029 bool ok, is_sdvo = false, is_dvo = false; 2255 bool ok, is_sdvo = false, is_dvo = false;
2030 bool is_crt = false, is_lvds = false, is_tv = false, is_dp = false; 2256 bool is_crt = false, is_lvds = false, is_tv = false, is_dp = false;
2257 bool is_edp = false;
2031 struct drm_mode_config *mode_config = &dev->mode_config; 2258 struct drm_mode_config *mode_config = &dev->mode_config;
2032 struct drm_connector *connector; 2259 struct drm_connector *connector;
2033 const intel_limit_t *limit; 2260 const intel_limit_t *limit;
@@ -2043,6 +2270,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
2043 int lvds_reg = LVDS; 2270 int lvds_reg = LVDS;
2044 u32 temp; 2271 u32 temp;
2045 int sdvo_pixel_multiply; 2272 int sdvo_pixel_multiply;
2273 int target_clock;
2046 2274
2047 drm_vblank_pre_modeset(dev, pipe); 2275 drm_vblank_pre_modeset(dev, pipe);
2048 2276
@@ -2074,6 +2302,9 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
2074 case INTEL_OUTPUT_DISPLAYPORT: 2302 case INTEL_OUTPUT_DISPLAYPORT:
2075 is_dp = true; 2303 is_dp = true;
2076 break; 2304 break;
2305 case INTEL_OUTPUT_EDP:
2306 is_edp = true;
2307 break;
2077 } 2308 }
2078 2309
2079 num_outputs++; 2310 num_outputs++;
@@ -2125,11 +2356,29 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
2125 } 2356 }
2126 2357
2127 /* FDI link */ 2358 /* FDI link */
2128 if (IS_IGDNG(dev)) 2359 if (IS_IGDNG(dev)) {
2129 igdng_compute_m_n(3, 4, /* lane num 4 */ 2360 int lane, link_bw;
2130 adjusted_mode->clock, 2361 /* eDP doesn't require FDI link, so just set DP M/N
2131 270000, /* lane clock */ 2362 according to current link config */
2132 &m_n); 2363 if (is_edp) {
2364 struct drm_connector *edp;
2365 target_clock = mode->clock;
2366 edp = intel_pipe_get_output(crtc);
2367 intel_edp_link_config(to_intel_output(edp),
2368 &lane, &link_bw);
2369 } else {
2370 /* DP over FDI requires target mode clock
2371 instead of link clock */
2372 if (is_dp)
2373 target_clock = mode->clock;
2374 else
2375 target_clock = adjusted_mode->clock;
2376 lane = 4;
2377 link_bw = 270000;
2378 }
2379 igdng_compute_m_n(3, lane, target_clock,
2380 link_bw, &m_n);
2381 }
2133 2382
2134 if (IS_IGD(dev)) 2383 if (IS_IGD(dev))
2135 fp = (1 << clock.n) << 16 | clock.m1 << 8 | clock.m2; 2384 fp = (1 << clock.n) << 16 | clock.m1 << 8 | clock.m2;
@@ -2250,29 +2499,15 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
2250 dpll_reg = pch_dpll_reg; 2499 dpll_reg = pch_dpll_reg;
2251 } 2500 }
2252 2501
2253 if (dpll & DPLL_VCO_ENABLE) { 2502 if (is_edp) {
2503 igdng_disable_pll_edp(crtc);
2504 } else if ((dpll & DPLL_VCO_ENABLE)) {
2254 I915_WRITE(fp_reg, fp); 2505 I915_WRITE(fp_reg, fp);
2255 I915_WRITE(dpll_reg, dpll & ~DPLL_VCO_ENABLE); 2506 I915_WRITE(dpll_reg, dpll & ~DPLL_VCO_ENABLE);
2256 I915_READ(dpll_reg); 2507 I915_READ(dpll_reg);
2257 udelay(150); 2508 udelay(150);
2258 } 2509 }
2259 2510
2260 if (IS_IGDNG(dev)) {
2261 /* enable PCH clock reference source */
2262 /* XXX need to change the setting for other outputs */
2263 u32 temp;
2264 temp = I915_READ(PCH_DREF_CONTROL);
2265 temp &= ~DREF_NONSPREAD_SOURCE_MASK;
2266 temp |= DREF_NONSPREAD_CK505_ENABLE;
2267 temp &= ~DREF_SSC_SOURCE_MASK;
2268 temp |= DREF_SSC_SOURCE_ENABLE;
2269 temp &= ~DREF_SSC1_ENABLE;
2270 /* if no eDP, disable source output to CPU */
2271 temp &= ~DREF_CPU_SOURCE_OUTPUT_MASK;
2272 temp |= DREF_CPU_SOURCE_OUTPUT_DISABLE;
2273 I915_WRITE(PCH_DREF_CONTROL, temp);
2274 }
2275
2276 /* The LVDS pin pair needs to be on before the DPLLs are enabled. 2511 /* The LVDS pin pair needs to be on before the DPLLs are enabled.
2277 * This is an exception to the general rule that mode_set doesn't turn 2512 * This is an exception to the general rule that mode_set doesn't turn
2278 * things on. 2513 * things on.
@@ -2304,23 +2539,25 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
2304 if (is_dp) 2539 if (is_dp)
2305 intel_dp_set_m_n(crtc, mode, adjusted_mode); 2540 intel_dp_set_m_n(crtc, mode, adjusted_mode);
2306 2541
2307 I915_WRITE(fp_reg, fp); 2542 if (!is_edp) {
2308 I915_WRITE(dpll_reg, dpll); 2543 I915_WRITE(fp_reg, fp);
2309 I915_READ(dpll_reg);
2310 /* Wait for the clocks to stabilize. */
2311 udelay(150);
2312
2313 if (IS_I965G(dev) && !IS_IGDNG(dev)) {
2314 sdvo_pixel_multiply = adjusted_mode->clock / mode->clock;
2315 I915_WRITE(dpll_md_reg, (0 << DPLL_MD_UDI_DIVIDER_SHIFT) |
2316 ((sdvo_pixel_multiply - 1) << DPLL_MD_UDI_MULTIPLIER_SHIFT));
2317 } else {
2318 /* write it again -- the BIOS does, after all */
2319 I915_WRITE(dpll_reg, dpll); 2544 I915_WRITE(dpll_reg, dpll);
2545 I915_READ(dpll_reg);
2546 /* Wait for the clocks to stabilize. */
2547 udelay(150);
2548
2549 if (IS_I965G(dev) && !IS_IGDNG(dev)) {
2550 sdvo_pixel_multiply = adjusted_mode->clock / mode->clock;
2551 I915_WRITE(dpll_md_reg, (0 << DPLL_MD_UDI_DIVIDER_SHIFT) |
2552 ((sdvo_pixel_multiply - 1) << DPLL_MD_UDI_MULTIPLIER_SHIFT));
2553 } else {
2554 /* write it again -- the BIOS does, after all */
2555 I915_WRITE(dpll_reg, dpll);
2556 }
2557 I915_READ(dpll_reg);
2558 /* Wait for the clocks to stabilize. */
2559 udelay(150);
2320 } 2560 }
2321 I915_READ(dpll_reg);
2322 /* Wait for the clocks to stabilize. */
2323 udelay(150);
2324 2561
2325 I915_WRITE(htot_reg, (adjusted_mode->crtc_hdisplay - 1) | 2562 I915_WRITE(htot_reg, (adjusted_mode->crtc_hdisplay - 1) |
2326 ((adjusted_mode->crtc_htotal - 1) << 16)); 2563 ((adjusted_mode->crtc_htotal - 1) << 16));
@@ -2350,10 +2587,14 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
2350 I915_WRITE(link_m1_reg, m_n.link_m); 2587 I915_WRITE(link_m1_reg, m_n.link_m);
2351 I915_WRITE(link_n1_reg, m_n.link_n); 2588 I915_WRITE(link_n1_reg, m_n.link_n);
2352 2589
2353 /* enable FDI RX PLL too */ 2590 if (is_edp) {
2354 temp = I915_READ(fdi_rx_reg); 2591 igdng_set_pll_edp(crtc, adjusted_mode->clock);
2355 I915_WRITE(fdi_rx_reg, temp | FDI_RX_PLL_ENABLE); 2592 } else {
2356 udelay(200); 2593 /* enable FDI RX PLL too */
2594 temp = I915_READ(fdi_rx_reg);
2595 I915_WRITE(fdi_rx_reg, temp | FDI_RX_PLL_ENABLE);
2596 udelay(200);
2597 }
2357 } 2598 }
2358 2599
2359 I915_WRITE(pipeconf_reg, pipeconf); 2600 I915_WRITE(pipeconf_reg, pipeconf);
@@ -2951,12 +3192,17 @@ static void intel_setup_outputs(struct drm_device *dev)
2951 if (IS_IGDNG(dev)) { 3192 if (IS_IGDNG(dev)) {
2952 int found; 3193 int found;
2953 3194
3195 if (IS_MOBILE(dev) && (I915_READ(DP_A) & DP_DETECTED))
3196 intel_dp_init(dev, DP_A);
3197
2954 if (I915_READ(HDMIB) & PORT_DETECTED) { 3198 if (I915_READ(HDMIB) & PORT_DETECTED) {
2955 /* check SDVOB */ 3199 /* check SDVOB */
2956 /* found = intel_sdvo_init(dev, HDMIB); */ 3200 /* found = intel_sdvo_init(dev, HDMIB); */
2957 found = 0; 3201 found = 0;
2958 if (!found) 3202 if (!found)
2959 intel_hdmi_init(dev, HDMIB); 3203 intel_hdmi_init(dev, HDMIB);
3204 if (!found && (I915_READ(PCH_DP_B) & DP_DETECTED))
3205 intel_dp_init(dev, PCH_DP_B);
2960 } 3206 }
2961 3207
2962 if (I915_READ(HDMIC) & PORT_DETECTED) 3208 if (I915_READ(HDMIC) & PORT_DETECTED)
@@ -2965,6 +3211,12 @@ static void intel_setup_outputs(struct drm_device *dev)
2965 if (I915_READ(HDMID) & PORT_DETECTED) 3211 if (I915_READ(HDMID) & PORT_DETECTED)
2966 intel_hdmi_init(dev, HDMID); 3212 intel_hdmi_init(dev, HDMID);
2967 3213
3214 if (I915_READ(PCH_DP_C) & DP_DETECTED)
3215 intel_dp_init(dev, PCH_DP_C);
3216
3217 if (I915_READ(PCH_DP_D) & DP_DETECTED)
3218 intel_dp_init(dev, PCH_DP_D);
3219
2968 } else if (IS_I9XX(dev)) { 3220 } else if (IS_I9XX(dev)) {
2969 int found; 3221 int found;
2970 u32 reg; 3222 u32 reg;
@@ -3039,6 +3291,10 @@ static void intel_setup_outputs(struct drm_device *dev)
3039 (1 << 1)); 3291 (1 << 1));
3040 clone_mask = (1 << INTEL_OUTPUT_DISPLAYPORT); 3292 clone_mask = (1 << INTEL_OUTPUT_DISPLAYPORT);
3041 break; 3293 break;
3294 case INTEL_OUTPUT_EDP:
3295 crtc_mask = (1 << 1);
3296 clone_mask = (1 << INTEL_OUTPUT_EDP);
3297 break;
3042 } 3298 }
3043 encoder->possible_crtcs = crtc_mask; 3299 encoder->possible_crtcs = crtc_mask;
3044 encoder->possible_clones = intel_connector_clones(dev, clone_mask); 3300 encoder->possible_clones = intel_connector_clones(dev, clone_mask);
@@ -3148,6 +3404,9 @@ void intel_modeset_init(struct drm_device *dev)
3148 if (IS_I965G(dev)) { 3404 if (IS_I965G(dev)) {
3149 dev->mode_config.max_width = 8192; 3405 dev->mode_config.max_width = 8192;
3150 dev->mode_config.max_height = 8192; 3406 dev->mode_config.max_height = 8192;
3407 } else if (IS_I9XX(dev)) {
3408 dev->mode_config.max_width = 4096;
3409 dev->mode_config.max_height = 4096;
3151 } else { 3410 } else {
3152 dev->mode_config.max_width = 2048; 3411 dev->mode_config.max_width = 2048;
3153 dev->mode_config.max_height = 2048; 3412 dev->mode_config.max_height = 2048;
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 6770ae88370..a6ff15ac548 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -40,6 +40,8 @@
40 40
41#define DP_LINK_CONFIGURATION_SIZE 9 41#define DP_LINK_CONFIGURATION_SIZE 9
42 42
43#define IS_eDP(i) ((i)->type == INTEL_OUTPUT_EDP)
44
43struct intel_dp_priv { 45struct intel_dp_priv {
44 uint32_t output_reg; 46 uint32_t output_reg;
45 uint32_t DP; 47 uint32_t DP;
@@ -63,6 +65,19 @@ intel_dp_link_train(struct intel_output *intel_output, uint32_t DP,
63static void 65static void
64intel_dp_link_down(struct intel_output *intel_output, uint32_t DP); 66intel_dp_link_down(struct intel_output *intel_output, uint32_t DP);
65 67
68void
69intel_edp_link_config (struct intel_output *intel_output,
70 int *lane_num, int *link_bw)
71{
72 struct intel_dp_priv *dp_priv = intel_output->dev_priv;
73
74 *lane_num = dp_priv->lane_count;
75 if (dp_priv->link_bw == DP_LINK_BW_1_62)
76 *link_bw = 162000;
77 else if (dp_priv->link_bw == DP_LINK_BW_2_7)
78 *link_bw = 270000;
79}
80
66static int 81static int
67intel_dp_max_lane_count(struct intel_output *intel_output) 82intel_dp_max_lane_count(struct intel_output *intel_output)
68{ 83{
@@ -206,7 +221,13 @@ intel_dp_aux_ch(struct intel_output *intel_output,
206 * and would like to run at 2MHz. So, take the 221 * and would like to run at 2MHz. So, take the
207 * hrawclk value and divide by 2 and use that 222 * hrawclk value and divide by 2 and use that
208 */ 223 */
209 aux_clock_divider = intel_hrawclk(dev) / 2; 224 if (IS_eDP(intel_output))
225 aux_clock_divider = 225; /* eDP input clock at 450Mhz */
226 else if (IS_IGDNG(dev))
227 aux_clock_divider = 62; /* IGDNG: input clock fixed at 125Mhz */
228 else
229 aux_clock_divider = intel_hrawclk(dev) / 2;
230
210 /* Must try at least 3 times according to DP spec */ 231 /* Must try at least 3 times according to DP spec */
211 for (try = 0; try < 5; try++) { 232 for (try = 0; try < 5; try++) {
212 /* Load the send data into the aux channel data registers */ 233 /* Load the send data into the aux channel data registers */
@@ -236,7 +257,7 @@ intel_dp_aux_ch(struct intel_output *intel_output,
236 } 257 }
237 258
238 /* Clear done status and any errors */ 259 /* Clear done status and any errors */
239 I915_WRITE(ch_ctl, (ctl | 260 I915_WRITE(ch_ctl, (status |
240 DP_AUX_CH_CTL_DONE | 261 DP_AUX_CH_CTL_DONE |
241 DP_AUX_CH_CTL_TIME_OUT_ERROR | 262 DP_AUX_CH_CTL_TIME_OUT_ERROR |
242 DP_AUX_CH_CTL_RECEIVE_ERROR)); 263 DP_AUX_CH_CTL_RECEIVE_ERROR));
@@ -295,7 +316,7 @@ intel_dp_aux_native_write(struct intel_output *intel_output,
295 return -1; 316 return -1;
296 msg[0] = AUX_NATIVE_WRITE << 4; 317 msg[0] = AUX_NATIVE_WRITE << 4;
297 msg[1] = address >> 8; 318 msg[1] = address >> 8;
298 msg[2] = address; 319 msg[2] = address & 0xff;
299 msg[3] = send_bytes - 1; 320 msg[3] = send_bytes - 1;
300 memcpy(&msg[4], send, send_bytes); 321 memcpy(&msg[4], send, send_bytes);
301 msg_bytes = send_bytes + 4; 322 msg_bytes = send_bytes + 4;
@@ -387,8 +408,8 @@ intel_dp_i2c_init(struct intel_output *intel_output, const char *name)
387 memset(&dp_priv->adapter, '\0', sizeof (dp_priv->adapter)); 408 memset(&dp_priv->adapter, '\0', sizeof (dp_priv->adapter));
388 dp_priv->adapter.owner = THIS_MODULE; 409 dp_priv->adapter.owner = THIS_MODULE;
389 dp_priv->adapter.class = I2C_CLASS_DDC; 410 dp_priv->adapter.class = I2C_CLASS_DDC;
390 strncpy (dp_priv->adapter.name, name, sizeof dp_priv->adapter.name - 1); 411 strncpy (dp_priv->adapter.name, name, sizeof(dp_priv->adapter.name) - 1);
391 dp_priv->adapter.name[sizeof dp_priv->adapter.name - 1] = '\0'; 412 dp_priv->adapter.name[sizeof(dp_priv->adapter.name) - 1] = '\0';
392 dp_priv->adapter.algo_data = &dp_priv->algo; 413 dp_priv->adapter.algo_data = &dp_priv->algo;
393 dp_priv->adapter.dev.parent = &intel_output->base.kdev; 414 dp_priv->adapter.dev.parent = &intel_output->base.kdev;
394 415
@@ -493,22 +514,40 @@ intel_dp_set_m_n(struct drm_crtc *crtc, struct drm_display_mode *mode,
493 intel_dp_compute_m_n(3, lane_count, 514 intel_dp_compute_m_n(3, lane_count,
494 mode->clock, adjusted_mode->clock, &m_n); 515 mode->clock, adjusted_mode->clock, &m_n);
495 516
496 if (intel_crtc->pipe == 0) { 517 if (IS_IGDNG(dev)) {
497 I915_WRITE(PIPEA_GMCH_DATA_M, 518 if (intel_crtc->pipe == 0) {
498 ((m_n.tu - 1) << PIPE_GMCH_DATA_M_TU_SIZE_SHIFT) | 519 I915_WRITE(TRANSA_DATA_M1,
499 m_n.gmch_m); 520 ((m_n.tu - 1) << PIPE_GMCH_DATA_M_TU_SIZE_SHIFT) |
500 I915_WRITE(PIPEA_GMCH_DATA_N, 521 m_n.gmch_m);
501 m_n.gmch_n); 522 I915_WRITE(TRANSA_DATA_N1, m_n.gmch_n);
502 I915_WRITE(PIPEA_DP_LINK_M, m_n.link_m); 523 I915_WRITE(TRANSA_DP_LINK_M1, m_n.link_m);
503 I915_WRITE(PIPEA_DP_LINK_N, m_n.link_n); 524 I915_WRITE(TRANSA_DP_LINK_N1, m_n.link_n);
525 } else {
526 I915_WRITE(TRANSB_DATA_M1,
527 ((m_n.tu - 1) << PIPE_GMCH_DATA_M_TU_SIZE_SHIFT) |
528 m_n.gmch_m);
529 I915_WRITE(TRANSB_DATA_N1, m_n.gmch_n);
530 I915_WRITE(TRANSB_DP_LINK_M1, m_n.link_m);
531 I915_WRITE(TRANSB_DP_LINK_N1, m_n.link_n);
532 }
504 } else { 533 } else {
505 I915_WRITE(PIPEB_GMCH_DATA_M, 534 if (intel_crtc->pipe == 0) {
506 ((m_n.tu - 1) << PIPE_GMCH_DATA_M_TU_SIZE_SHIFT) | 535 I915_WRITE(PIPEA_GMCH_DATA_M,
507 m_n.gmch_m); 536 ((m_n.tu - 1) << PIPE_GMCH_DATA_M_TU_SIZE_SHIFT) |
508 I915_WRITE(PIPEB_GMCH_DATA_N, 537 m_n.gmch_m);
509 m_n.gmch_n); 538 I915_WRITE(PIPEA_GMCH_DATA_N,
510 I915_WRITE(PIPEB_DP_LINK_M, m_n.link_m); 539 m_n.gmch_n);
511 I915_WRITE(PIPEB_DP_LINK_N, m_n.link_n); 540 I915_WRITE(PIPEA_DP_LINK_M, m_n.link_m);
541 I915_WRITE(PIPEA_DP_LINK_N, m_n.link_n);
542 } else {
543 I915_WRITE(PIPEB_GMCH_DATA_M,
544 ((m_n.tu - 1) << PIPE_GMCH_DATA_M_TU_SIZE_SHIFT) |
545 m_n.gmch_m);
546 I915_WRITE(PIPEB_GMCH_DATA_N,
547 m_n.gmch_n);
548 I915_WRITE(PIPEB_DP_LINK_M, m_n.link_m);
549 I915_WRITE(PIPEB_DP_LINK_N, m_n.link_n);
550 }
512 } 551 }
513} 552}
514 553
@@ -556,8 +595,38 @@ intel_dp_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
556 595
557 if (intel_crtc->pipe == 1) 596 if (intel_crtc->pipe == 1)
558 dp_priv->DP |= DP_PIPEB_SELECT; 597 dp_priv->DP |= DP_PIPEB_SELECT;
598
599 if (IS_eDP(intel_output)) {
600 /* don't miss out required setting for eDP */
601 dp_priv->DP |= DP_PLL_ENABLE;
602 if (adjusted_mode->clock < 200000)
603 dp_priv->DP |= DP_PLL_FREQ_160MHZ;
604 else
605 dp_priv->DP |= DP_PLL_FREQ_270MHZ;
606 }
559} 607}
560 608
609static void igdng_edp_backlight_on (struct drm_device *dev)
610{
611 struct drm_i915_private *dev_priv = dev->dev_private;
612 u32 pp;
613
614 DRM_DEBUG("\n");
615 pp = I915_READ(PCH_PP_CONTROL);
616 pp |= EDP_BLC_ENABLE;
617 I915_WRITE(PCH_PP_CONTROL, pp);
618}
619
620static void igdng_edp_backlight_off (struct drm_device *dev)
621{
622 struct drm_i915_private *dev_priv = dev->dev_private;
623 u32 pp;
624
625 DRM_DEBUG("\n");
626 pp = I915_READ(PCH_PP_CONTROL);
627 pp &= ~EDP_BLC_ENABLE;
628 I915_WRITE(PCH_PP_CONTROL, pp);
629}
561 630
562static void 631static void
563intel_dp_dpms(struct drm_encoder *encoder, int mode) 632intel_dp_dpms(struct drm_encoder *encoder, int mode)
@@ -569,11 +638,17 @@ intel_dp_dpms(struct drm_encoder *encoder, int mode)
569 uint32_t dp_reg = I915_READ(dp_priv->output_reg); 638 uint32_t dp_reg = I915_READ(dp_priv->output_reg);
570 639
571 if (mode != DRM_MODE_DPMS_ON) { 640 if (mode != DRM_MODE_DPMS_ON) {
572 if (dp_reg & DP_PORT_EN) 641 if (dp_reg & DP_PORT_EN) {
573 intel_dp_link_down(intel_output, dp_priv->DP); 642 intel_dp_link_down(intel_output, dp_priv->DP);
643 if (IS_eDP(intel_output))
644 igdng_edp_backlight_off(dev);
645 }
574 } else { 646 } else {
575 if (!(dp_reg & DP_PORT_EN)) 647 if (!(dp_reg & DP_PORT_EN)) {
576 intel_dp_link_train(intel_output, dp_priv->DP, dp_priv->link_configuration); 648 intel_dp_link_train(intel_output, dp_priv->DP, dp_priv->link_configuration);
649 if (IS_eDP(intel_output))
650 igdng_edp_backlight_on(dev);
651 }
577 } 652 }
578 dp_priv->dpms_mode = mode; 653 dp_priv->dpms_mode = mode;
579} 654}
@@ -935,6 +1010,23 @@ intel_dp_link_down(struct intel_output *intel_output, uint32_t DP)
935 struct drm_i915_private *dev_priv = dev->dev_private; 1010 struct drm_i915_private *dev_priv = dev->dev_private;
936 struct intel_dp_priv *dp_priv = intel_output->dev_priv; 1011 struct intel_dp_priv *dp_priv = intel_output->dev_priv;
937 1012
1013 DRM_DEBUG("\n");
1014
1015 if (IS_eDP(intel_output)) {
1016 DP &= ~DP_PLL_ENABLE;
1017 I915_WRITE(dp_priv->output_reg, DP);
1018 POSTING_READ(dp_priv->output_reg);
1019 udelay(100);
1020 }
1021
1022 DP &= ~DP_LINK_TRAIN_MASK;
1023 I915_WRITE(dp_priv->output_reg, DP | DP_LINK_TRAIN_PAT_IDLE);
1024 POSTING_READ(dp_priv->output_reg);
1025
1026 udelay(17000);
1027
1028 if (IS_eDP(intel_output))
1029 DP |= DP_LINK_TRAIN_OFF;
938 I915_WRITE(dp_priv->output_reg, DP & ~DP_PORT_EN); 1030 I915_WRITE(dp_priv->output_reg, DP & ~DP_PORT_EN);
939 POSTING_READ(dp_priv->output_reg); 1031 POSTING_READ(dp_priv->output_reg);
940} 1032}
@@ -978,6 +1070,24 @@ intel_dp_check_link_status(struct intel_output *intel_output)
978 intel_dp_link_train(intel_output, dp_priv->DP, dp_priv->link_configuration); 1070 intel_dp_link_train(intel_output, dp_priv->DP, dp_priv->link_configuration);
979} 1071}
980 1072
1073static enum drm_connector_status
1074igdng_dp_detect(struct drm_connector *connector)
1075{
1076 struct intel_output *intel_output = to_intel_output(connector);
1077 struct intel_dp_priv *dp_priv = intel_output->dev_priv;
1078 enum drm_connector_status status;
1079
1080 status = connector_status_disconnected;
1081 if (intel_dp_aux_native_read(intel_output,
1082 0x000, dp_priv->dpcd,
1083 sizeof (dp_priv->dpcd)) == sizeof (dp_priv->dpcd))
1084 {
1085 if (dp_priv->dpcd[0] != 0)
1086 status = connector_status_connected;
1087 }
1088 return status;
1089}
1090
981/** 1091/**
982 * Uses CRT_HOTPLUG_EN and CRT_HOTPLUG_STAT to detect DP connection. 1092 * Uses CRT_HOTPLUG_EN and CRT_HOTPLUG_STAT to detect DP connection.
983 * 1093 *
@@ -996,6 +1106,9 @@ intel_dp_detect(struct drm_connector *connector)
996 1106
997 dp_priv->has_audio = false; 1107 dp_priv->has_audio = false;
998 1108
1109 if (IS_IGDNG(dev))
1110 return igdng_dp_detect(connector);
1111
999 temp = I915_READ(PORT_HOTPLUG_EN); 1112 temp = I915_READ(PORT_HOTPLUG_EN);
1000 1113
1001 I915_WRITE(PORT_HOTPLUG_EN, 1114 I915_WRITE(PORT_HOTPLUG_EN,
@@ -1039,11 +1152,27 @@ intel_dp_detect(struct drm_connector *connector)
1039static int intel_dp_get_modes(struct drm_connector *connector) 1152static int intel_dp_get_modes(struct drm_connector *connector)
1040{ 1153{
1041 struct intel_output *intel_output = to_intel_output(connector); 1154 struct intel_output *intel_output = to_intel_output(connector);
1155 struct drm_device *dev = intel_output->base.dev;
1156 struct drm_i915_private *dev_priv = dev->dev_private;
1157 int ret;
1042 1158
1043 /* We should parse the EDID data and find out if it has an audio sink 1159 /* We should parse the EDID data and find out if it has an audio sink
1044 */ 1160 */
1045 1161
1046 return intel_ddc_get_modes(intel_output); 1162 ret = intel_ddc_get_modes(intel_output);
1163 if (ret)
1164 return ret;
1165
1166 /* if eDP has no EDID, try to use fixed panel mode from VBT */
1167 if (IS_eDP(intel_output)) {
1168 if (dev_priv->panel_fixed_mode != NULL) {
1169 struct drm_display_mode *mode;
1170 mode = drm_mode_duplicate(dev, dev_priv->panel_fixed_mode);
1171 drm_mode_probed_add(connector, mode);
1172 return 1;
1173 }
1174 }
1175 return 0;
1047} 1176}
1048 1177
1049static void 1178static void
@@ -1106,6 +1235,7 @@ intel_dp_init(struct drm_device *dev, int output_reg)
1106 struct drm_connector *connector; 1235 struct drm_connector *connector;
1107 struct intel_output *intel_output; 1236 struct intel_output *intel_output;
1108 struct intel_dp_priv *dp_priv; 1237 struct intel_dp_priv *dp_priv;
1238 const char *name = NULL;
1109 1239
1110 intel_output = kcalloc(sizeof(struct intel_output) + 1240 intel_output = kcalloc(sizeof(struct intel_output) +
1111 sizeof(struct intel_dp_priv), 1, GFP_KERNEL); 1241 sizeof(struct intel_dp_priv), 1, GFP_KERNEL);
@@ -1119,7 +1249,10 @@ intel_dp_init(struct drm_device *dev, int output_reg)
1119 DRM_MODE_CONNECTOR_DisplayPort); 1249 DRM_MODE_CONNECTOR_DisplayPort);
1120 drm_connector_helper_add(connector, &intel_dp_connector_helper_funcs); 1250 drm_connector_helper_add(connector, &intel_dp_connector_helper_funcs);
1121 1251
1122 intel_output->type = INTEL_OUTPUT_DISPLAYPORT; 1252 if (output_reg == DP_A)
1253 intel_output->type = INTEL_OUTPUT_EDP;
1254 else
1255 intel_output->type = INTEL_OUTPUT_DISPLAYPORT;
1123 1256
1124 connector->interlace_allowed = true; 1257 connector->interlace_allowed = true;
1125 connector->doublescan_allowed = 0; 1258 connector->doublescan_allowed = 0;
@@ -1139,12 +1272,41 @@ intel_dp_init(struct drm_device *dev, int output_reg)
1139 drm_sysfs_connector_add(connector); 1272 drm_sysfs_connector_add(connector);
1140 1273
1141 /* Set up the DDC bus. */ 1274 /* Set up the DDC bus. */
1142 intel_dp_i2c_init(intel_output, 1275 switch (output_reg) {
1143 (output_reg == DP_B) ? "DPDDC-B" : 1276 case DP_A:
1144 (output_reg == DP_C) ? "DPDDC-C" : "DPDDC-D"); 1277 name = "DPDDC-A";
1278 break;
1279 case DP_B:
1280 case PCH_DP_B:
1281 name = "DPDDC-B";
1282 break;
1283 case DP_C:
1284 case PCH_DP_C:
1285 name = "DPDDC-C";
1286 break;
1287 case DP_D:
1288 case PCH_DP_D:
1289 name = "DPDDC-D";
1290 break;
1291 }
1292
1293 intel_dp_i2c_init(intel_output, name);
1294
1145 intel_output->ddc_bus = &dp_priv->adapter; 1295 intel_output->ddc_bus = &dp_priv->adapter;
1146 intel_output->hot_plug = intel_dp_hot_plug; 1296 intel_output->hot_plug = intel_dp_hot_plug;
1147 1297
1298 if (output_reg == DP_A) {
1299 /* initialize panel mode from VBT if available for eDP */
1300 if (dev_priv->lfp_lvds_vbt_mode) {
1301 dev_priv->panel_fixed_mode =
1302 drm_mode_duplicate(dev, dev_priv->lfp_lvds_vbt_mode);
1303 if (dev_priv->panel_fixed_mode) {
1304 dev_priv->panel_fixed_mode->type |=
1305 DRM_MODE_TYPE_PREFERRED;
1306 }
1307 }
1308 }
1309
1148 /* For G4X desktop chip, PEG_BAND_GAP_DATA 3:0 must first be written 1310 /* For G4X desktop chip, PEG_BAND_GAP_DATA 3:0 must first be written
1149 * 0xd. Failure to do so will result in spurious interrupts being 1311 * 0xd. Failure to do so will result in spurious interrupts being
1150 * generated on the port when a cable is not attached. 1312 * generated on the port when a cable is not attached.
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 004541c935a..d6f92ea1b55 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -55,6 +55,7 @@
55#define INTEL_OUTPUT_TVOUT 5 55#define INTEL_OUTPUT_TVOUT 5
56#define INTEL_OUTPUT_HDMI 6 56#define INTEL_OUTPUT_HDMI 6
57#define INTEL_OUTPUT_DISPLAYPORT 7 57#define INTEL_OUTPUT_DISPLAYPORT 7
58#define INTEL_OUTPUT_EDP 8
58 59
59#define INTEL_DVO_CHIP_NONE 0 60#define INTEL_DVO_CHIP_NONE 0
60#define INTEL_DVO_CHIP_LVDS 1 61#define INTEL_DVO_CHIP_LVDS 1
@@ -121,6 +122,8 @@ extern void intel_dp_init(struct drm_device *dev, int dp_reg);
121void 122void
122intel_dp_set_m_n(struct drm_crtc *crtc, struct drm_display_mode *mode, 123intel_dp_set_m_n(struct drm_crtc *crtc, struct drm_display_mode *mode,
123 struct drm_display_mode *adjusted_mode); 124 struct drm_display_mode *adjusted_mode);
125extern void intel_edp_link_config (struct intel_output *, int *, int *);
126
124 127
125extern void intel_crtc_load_lut(struct drm_crtc *crtc); 128extern void intel_crtc_load_lut(struct drm_crtc *crtc);
126extern void intel_encoder_prepare (struct drm_encoder *encoder); 129extern void intel_encoder_prepare (struct drm_encoder *encoder);
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 9e30daae37d..1842290cded 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -130,16 +130,17 @@ static bool intel_hdmi_mode_fixup(struct drm_encoder *encoder,
130} 130}
131 131
132static enum drm_connector_status 132static enum drm_connector_status
133intel_hdmi_edid_detect(struct drm_connector *connector) 133intel_hdmi_detect(struct drm_connector *connector)
134{ 134{
135 struct intel_output *intel_output = to_intel_output(connector); 135 struct intel_output *intel_output = to_intel_output(connector);
136 struct intel_hdmi_priv *hdmi_priv = intel_output->dev_priv; 136 struct intel_hdmi_priv *hdmi_priv = intel_output->dev_priv;
137 struct edid *edid = NULL; 137 struct edid *edid = NULL;
138 enum drm_connector_status status = connector_status_disconnected; 138 enum drm_connector_status status = connector_status_disconnected;
139 139
140 hdmi_priv->has_hdmi_sink = false;
140 edid = drm_get_edid(&intel_output->base, 141 edid = drm_get_edid(&intel_output->base,
141 intel_output->ddc_bus); 142 intel_output->ddc_bus);
142 hdmi_priv->has_hdmi_sink = false; 143
143 if (edid) { 144 if (edid) {
144 if (edid->input & DRM_EDID_INPUT_DIGITAL) { 145 if (edid->input & DRM_EDID_INPUT_DIGITAL) {
145 status = connector_status_connected; 146 status = connector_status_connected;
@@ -148,65 +149,8 @@ intel_hdmi_edid_detect(struct drm_connector *connector)
148 intel_output->base.display_info.raw_edid = NULL; 149 intel_output->base.display_info.raw_edid = NULL;
149 kfree(edid); 150 kfree(edid);
150 } 151 }
151 return status;
152}
153
154static enum drm_connector_status
155igdng_hdmi_detect(struct drm_connector *connector)
156{
157 struct intel_output *intel_output = to_intel_output(connector);
158 struct intel_hdmi_priv *hdmi_priv = intel_output->dev_priv;
159
160 /* FIXME hotplug detect */
161
162 hdmi_priv->has_hdmi_sink = false;
163 return intel_hdmi_edid_detect(connector);
164}
165 152
166static enum drm_connector_status 153 return status;
167intel_hdmi_detect(struct drm_connector *connector)
168{
169 struct drm_device *dev = connector->dev;
170 struct drm_i915_private *dev_priv = dev->dev_private;
171 struct intel_output *intel_output = to_intel_output(connector);
172 struct intel_hdmi_priv *hdmi_priv = intel_output->dev_priv;
173 u32 temp, bit;
174
175 if (IS_IGDNG(dev))
176 return igdng_hdmi_detect(connector);
177
178 temp = I915_READ(PORT_HOTPLUG_EN);
179
180 switch (hdmi_priv->sdvox_reg) {
181 case SDVOB:
182 temp |= HDMIB_HOTPLUG_INT_EN;
183 break;
184 case SDVOC:
185 temp |= HDMIC_HOTPLUG_INT_EN;
186 break;
187 default:
188 return connector_status_unknown;
189 }
190
191 I915_WRITE(PORT_HOTPLUG_EN, temp);
192
193 POSTING_READ(PORT_HOTPLUG_EN);
194
195 switch (hdmi_priv->sdvox_reg) {
196 case SDVOB:
197 bit = HDMIB_HOTPLUG_INT_STATUS;
198 break;
199 case SDVOC:
200 bit = HDMIC_HOTPLUG_INT_STATUS;
201 break;
202 default:
203 return connector_status_unknown;
204 }
205
206 if ((I915_READ(PORT_HOTPLUG_STAT) & bit) != 0)
207 return intel_hdmi_edid_detect(connector);
208 else
209 return connector_status_disconnected;
210} 154}
211 155
212static int intel_hdmi_get_modes(struct drm_connector *connector) 156static int intel_hdmi_get_modes(struct drm_connector *connector)
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 9ab38efffec..3f445a80c55 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -780,6 +780,14 @@ static const struct dmi_system_id intel_no_lvds[] = {
780 }, 780 },
781 { 781 {
782 .callback = intel_no_lvds_dmi_callback, 782 .callback = intel_no_lvds_dmi_callback,
783 .ident = "AOpen Mini PC MP915",
784 .matches = {
785 DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
786 DMI_MATCH(DMI_BOARD_NAME, "i915GMx-F"),
787 },
788 },
789 {
790 .callback = intel_no_lvds_dmi_callback,
783 .ident = "Aopen i945GTt-VFA", 791 .ident = "Aopen i945GTt-VFA",
784 .matches = { 792 .matches = {
785 DMI_MATCH(DMI_PRODUCT_VERSION, "AO00001JW"), 793 DMI_MATCH(DMI_PRODUCT_VERSION, "AO00001JW"),
@@ -884,6 +892,10 @@ void intel_lvds_init(struct drm_device *dev)
884 if (IS_IGDNG(dev)) { 892 if (IS_IGDNG(dev)) {
885 if ((I915_READ(PCH_LVDS) & LVDS_DETECTED) == 0) 893 if ((I915_READ(PCH_LVDS) & LVDS_DETECTED) == 0)
886 return; 894 return;
895 if (dev_priv->edp_support) {
896 DRM_DEBUG("disable LVDS for eDP support\n");
897 return;
898 }
887 gpio = PCH_GPIOC; 899 gpio = PCH_GPIOC;
888 } 900 }
889 901
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 4f0c30948bc..5371d933255 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -31,6 +31,7 @@
31#include "drm.h" 31#include "drm.h"
32#include "drm_crtc.h" 32#include "drm_crtc.h"
33#include "intel_drv.h" 33#include "intel_drv.h"
34#include "drm_edid.h"
34#include "i915_drm.h" 35#include "i915_drm.h"
35#include "i915_drv.h" 36#include "i915_drv.h"
36#include "intel_sdvo_regs.h" 37#include "intel_sdvo_regs.h"
@@ -55,6 +56,12 @@ struct intel_sdvo_priv {
55 /* Pixel clock limitations reported by the SDVO device, in kHz */ 56 /* Pixel clock limitations reported by the SDVO device, in kHz */
56 int pixel_clock_min, pixel_clock_max; 57 int pixel_clock_min, pixel_clock_max;
57 58
59 /*
60 * For multiple function SDVO device,
61 * this is for current attached outputs.
62 */
63 uint16_t attached_output;
64
58 /** 65 /**
59 * This is set if we're going to treat the device as TV-out. 66 * This is set if we're going to treat the device as TV-out.
60 * 67 *
@@ -114,6 +121,9 @@ struct intel_sdvo_priv {
114 u32 save_SDVOX; 121 u32 save_SDVOX;
115}; 122};
116 123
124static bool
125intel_sdvo_output_setup(struct intel_output *intel_output, uint16_t flags);
126
117/** 127/**
118 * Writes the SDVOB or SDVOC with the given value, but always writes both 128 * Writes the SDVOB or SDVOC with the given value, but always writes both
119 * SDVOB and SDVOC to work around apparent hardware issues (according to 129 * SDVOB and SDVOC to work around apparent hardware issues (according to
@@ -1435,41 +1445,96 @@ void intel_sdvo_set_hotplug(struct drm_connector *connector, int on)
1435 intel_sdvo_read_response(intel_output, &response, 2); 1445 intel_sdvo_read_response(intel_output, &response, 2);
1436} 1446}
1437 1447
1438static void 1448static bool
1439intel_sdvo_hdmi_sink_detect(struct drm_connector *connector) 1449intel_sdvo_multifunc_encoder(struct intel_output *intel_output)
1450{
1451 struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
1452 int caps = 0;
1453
1454 if (sdvo_priv->caps.output_flags &
1455 (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1))
1456 caps++;
1457 if (sdvo_priv->caps.output_flags &
1458 (SDVO_OUTPUT_RGB0 | SDVO_OUTPUT_RGB1))
1459 caps++;
1460 if (sdvo_priv->caps.output_flags &
1461 (SDVO_OUTPUT_SVID0 | SDVO_OUTPUT_SVID0))
1462 caps++;
1463 if (sdvo_priv->caps.output_flags &
1464 (SDVO_OUTPUT_CVBS0 | SDVO_OUTPUT_CVBS1))
1465 caps++;
1466 if (sdvo_priv->caps.output_flags &
1467 (SDVO_OUTPUT_YPRPB0 | SDVO_OUTPUT_YPRPB1))
1468 caps++;
1469
1470 if (sdvo_priv->caps.output_flags &
1471 (SDVO_OUTPUT_SCART0 | SDVO_OUTPUT_SCART1))
1472 caps++;
1473
1474 if (sdvo_priv->caps.output_flags &
1475 (SDVO_OUTPUT_LVDS0 | SDVO_OUTPUT_LVDS1))
1476 caps++;
1477
1478 return (caps > 1);
1479}
1480
1481enum drm_connector_status
1482intel_sdvo_hdmi_sink_detect(struct drm_connector *connector, u16 response)
1440{ 1483{
1441 struct intel_output *intel_output = to_intel_output(connector); 1484 struct intel_output *intel_output = to_intel_output(connector);
1442 struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv; 1485 struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
1486 enum drm_connector_status status = connector_status_connected;
1443 struct edid *edid = NULL; 1487 struct edid *edid = NULL;
1444 1488
1445 edid = drm_get_edid(&intel_output->base, 1489 edid = drm_get_edid(&intel_output->base,
1446 intel_output->ddc_bus); 1490 intel_output->ddc_bus);
1447 if (edid != NULL) { 1491 if (edid != NULL) {
1448 sdvo_priv->is_hdmi = drm_detect_hdmi_monitor(edid); 1492 /* Don't report the output as connected if it's a DVI-I
1493 * connector with a non-digital EDID coming out.
1494 */
1495 if (response & (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1)) {
1496 if (edid->input & DRM_EDID_INPUT_DIGITAL)
1497 sdvo_priv->is_hdmi =
1498 drm_detect_hdmi_monitor(edid);
1499 else
1500 status = connector_status_disconnected;
1501 }
1502
1449 kfree(edid); 1503 kfree(edid);
1450 intel_output->base.display_info.raw_edid = NULL; 1504 intel_output->base.display_info.raw_edid = NULL;
1451 } 1505
1506 } else if (response & (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1))
1507 status = connector_status_disconnected;
1508
1509 return status;
1452} 1510}
1453 1511
1454static enum drm_connector_status intel_sdvo_detect(struct drm_connector *connector) 1512static enum drm_connector_status intel_sdvo_detect(struct drm_connector *connector)
1455{ 1513{
1456 u8 response[2]; 1514 uint16_t response;
1457 u8 status; 1515 u8 status;
1458 struct intel_output *intel_output = to_intel_output(connector); 1516 struct intel_output *intel_output = to_intel_output(connector);
1517 struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
1459 1518
1460 intel_sdvo_write_cmd(intel_output, SDVO_CMD_GET_ATTACHED_DISPLAYS, NULL, 0); 1519 intel_sdvo_write_cmd(intel_output, SDVO_CMD_GET_ATTACHED_DISPLAYS, NULL, 0);
1461 status = intel_sdvo_read_response(intel_output, &response, 2); 1520 status = intel_sdvo_read_response(intel_output, &response, 2);
1462 1521
1463 DRM_DEBUG("SDVO response %d %d\n", response[0], response[1]); 1522 DRM_DEBUG("SDVO response %d %d\n", response & 0xff, response >> 8);
1464 1523
1465 if (status != SDVO_CMD_STATUS_SUCCESS) 1524 if (status != SDVO_CMD_STATUS_SUCCESS)
1466 return connector_status_unknown; 1525 return connector_status_unknown;
1467 1526
1468 if ((response[0] != 0) || (response[1] != 0)) { 1527 if (response == 0)
1469 intel_sdvo_hdmi_sink_detect(connector);
1470 return connector_status_connected;
1471 } else
1472 return connector_status_disconnected; 1528 return connector_status_disconnected;
1529
1530 if (intel_sdvo_multifunc_encoder(intel_output) &&
1531 sdvo_priv->attached_output != response) {
1532 if (sdvo_priv->controlled_output != response &&
1533 intel_sdvo_output_setup(intel_output, response) != true)
1534 return connector_status_unknown;
1535 sdvo_priv->attached_output = response;
1536 }
1537 return intel_sdvo_hdmi_sink_detect(connector, response);
1473} 1538}
1474 1539
1475static void intel_sdvo_get_ddc_modes(struct drm_connector *connector) 1540static void intel_sdvo_get_ddc_modes(struct drm_connector *connector)
@@ -1866,16 +1931,101 @@ intel_sdvo_get_slave_addr(struct drm_device *dev, int output_device)
1866 return 0x72; 1931 return 0x72;
1867} 1932}
1868 1933
1934static bool
1935intel_sdvo_output_setup(struct intel_output *intel_output, uint16_t flags)
1936{
1937 struct drm_connector *connector = &intel_output->base;
1938 struct drm_encoder *encoder = &intel_output->enc;
1939 struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
1940 bool ret = true, registered = false;
1941
1942 sdvo_priv->is_tv = false;
1943 intel_output->needs_tv_clock = false;
1944 sdvo_priv->is_lvds = false;
1945
1946 if (device_is_registered(&connector->kdev)) {
1947 drm_sysfs_connector_remove(connector);
1948 registered = true;
1949 }
1950
1951 if (flags &
1952 (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1)) {
1953 if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_TMDS0)
1954 sdvo_priv->controlled_output = SDVO_OUTPUT_TMDS0;
1955 else
1956 sdvo_priv->controlled_output = SDVO_OUTPUT_TMDS1;
1957
1958 encoder->encoder_type = DRM_MODE_ENCODER_TMDS;
1959 connector->connector_type = DRM_MODE_CONNECTOR_DVID;
1960
1961 if (intel_sdvo_get_supp_encode(intel_output,
1962 &sdvo_priv->encode) &&
1963 intel_sdvo_get_digital_encoding_mode(intel_output) &&
1964 sdvo_priv->is_hdmi) {
1965 /* enable hdmi encoding mode if supported */
1966 intel_sdvo_set_encode(intel_output, SDVO_ENCODE_HDMI);
1967 intel_sdvo_set_colorimetry(intel_output,
1968 SDVO_COLORIMETRY_RGB256);
1969 connector->connector_type = DRM_MODE_CONNECTOR_HDMIA;
1970 }
1971 } else if (flags & SDVO_OUTPUT_SVID0) {
1972
1973 sdvo_priv->controlled_output = SDVO_OUTPUT_SVID0;
1974 encoder->encoder_type = DRM_MODE_ENCODER_TVDAC;
1975 connector->connector_type = DRM_MODE_CONNECTOR_SVIDEO;
1976 sdvo_priv->is_tv = true;
1977 intel_output->needs_tv_clock = true;
1978 } else if (flags & SDVO_OUTPUT_RGB0) {
1979
1980 sdvo_priv->controlled_output = SDVO_OUTPUT_RGB0;
1981 encoder->encoder_type = DRM_MODE_ENCODER_DAC;
1982 connector->connector_type = DRM_MODE_CONNECTOR_VGA;
1983 } else if (flags & SDVO_OUTPUT_RGB1) {
1984
1985 sdvo_priv->controlled_output = SDVO_OUTPUT_RGB1;
1986 encoder->encoder_type = DRM_MODE_ENCODER_DAC;
1987 connector->connector_type = DRM_MODE_CONNECTOR_VGA;
1988 } else if (flags & SDVO_OUTPUT_LVDS0) {
1989
1990 sdvo_priv->controlled_output = SDVO_OUTPUT_LVDS0;
1991 encoder->encoder_type = DRM_MODE_ENCODER_LVDS;
1992 connector->connector_type = DRM_MODE_CONNECTOR_LVDS;
1993 sdvo_priv->is_lvds = true;
1994 } else if (flags & SDVO_OUTPUT_LVDS1) {
1995
1996 sdvo_priv->controlled_output = SDVO_OUTPUT_LVDS1;
1997 encoder->encoder_type = DRM_MODE_ENCODER_LVDS;
1998 connector->connector_type = DRM_MODE_CONNECTOR_LVDS;
1999 sdvo_priv->is_lvds = true;
2000 } else {
2001
2002 unsigned char bytes[2];
2003
2004 sdvo_priv->controlled_output = 0;
2005 memcpy(bytes, &sdvo_priv->caps.output_flags, 2);
2006 DRM_DEBUG_KMS(I915_SDVO,
2007 "%s: Unknown SDVO output type (0x%02x%02x)\n",
2008 SDVO_NAME(sdvo_priv),
2009 bytes[0], bytes[1]);
2010 ret = false;
2011 }
2012
2013 if (ret && registered)
2014 ret = drm_sysfs_connector_add(connector) == 0 ? true : false;
2015
2016
2017 return ret;
2018
2019}
2020
1869bool intel_sdvo_init(struct drm_device *dev, int output_device) 2021bool intel_sdvo_init(struct drm_device *dev, int output_device)
1870{ 2022{
1871 struct drm_connector *connector; 2023 struct drm_connector *connector;
1872 struct intel_output *intel_output; 2024 struct intel_output *intel_output;
1873 struct intel_sdvo_priv *sdvo_priv; 2025 struct intel_sdvo_priv *sdvo_priv;
1874 2026
1875 int connector_type;
1876 u8 ch[0x40]; 2027 u8 ch[0x40];
1877 int i; 2028 int i;
1878 int encoder_type;
1879 2029
1880 intel_output = kcalloc(sizeof(struct intel_output)+sizeof(struct intel_sdvo_priv), 1, GFP_KERNEL); 2030 intel_output = kcalloc(sizeof(struct intel_output)+sizeof(struct intel_sdvo_priv), 1, GFP_KERNEL);
1881 if (!intel_output) { 2031 if (!intel_output) {
@@ -1925,88 +2075,28 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
1925 intel_output->ddc_bus->algo = &intel_sdvo_i2c_bit_algo; 2075 intel_output->ddc_bus->algo = &intel_sdvo_i2c_bit_algo;
1926 2076
1927 /* In defaut case sdvo lvds is false */ 2077 /* In defaut case sdvo lvds is false */
1928 sdvo_priv->is_lvds = false;
1929 intel_sdvo_get_capabilities(intel_output, &sdvo_priv->caps); 2078 intel_sdvo_get_capabilities(intel_output, &sdvo_priv->caps);
1930 2079
1931 if (sdvo_priv->caps.output_flags & 2080 if (intel_sdvo_output_setup(intel_output,
1932 (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1)) { 2081 sdvo_priv->caps.output_flags) != true) {
1933 if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_TMDS0) 2082 DRM_DEBUG("SDVO output failed to setup on SDVO%c\n",
1934 sdvo_priv->controlled_output = SDVO_OUTPUT_TMDS0; 2083 output_device == SDVOB ? 'B' : 'C');
1935 else
1936 sdvo_priv->controlled_output = SDVO_OUTPUT_TMDS1;
1937
1938 encoder_type = DRM_MODE_ENCODER_TMDS;
1939 connector_type = DRM_MODE_CONNECTOR_DVID;
1940
1941 if (intel_sdvo_get_supp_encode(intel_output,
1942 &sdvo_priv->encode) &&
1943 intel_sdvo_get_digital_encoding_mode(intel_output) &&
1944 sdvo_priv->is_hdmi) {
1945 /* enable hdmi encoding mode if supported */
1946 intel_sdvo_set_encode(intel_output, SDVO_ENCODE_HDMI);
1947 intel_sdvo_set_colorimetry(intel_output,
1948 SDVO_COLORIMETRY_RGB256);
1949 connector_type = DRM_MODE_CONNECTOR_HDMIA;
1950 }
1951 }
1952 else if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_SVID0)
1953 {
1954 sdvo_priv->controlled_output = SDVO_OUTPUT_SVID0;
1955 encoder_type = DRM_MODE_ENCODER_TVDAC;
1956 connector_type = DRM_MODE_CONNECTOR_SVIDEO;
1957 sdvo_priv->is_tv = true;
1958 intel_output->needs_tv_clock = true;
1959 }
1960 else if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_RGB0)
1961 {
1962 sdvo_priv->controlled_output = SDVO_OUTPUT_RGB0;
1963 encoder_type = DRM_MODE_ENCODER_DAC;
1964 connector_type = DRM_MODE_CONNECTOR_VGA;
1965 }
1966 else if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_RGB1)
1967 {
1968 sdvo_priv->controlled_output = SDVO_OUTPUT_RGB1;
1969 encoder_type = DRM_MODE_ENCODER_DAC;
1970 connector_type = DRM_MODE_CONNECTOR_VGA;
1971 }
1972 else if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_LVDS0)
1973 {
1974 sdvo_priv->controlled_output = SDVO_OUTPUT_LVDS0;
1975 encoder_type = DRM_MODE_ENCODER_LVDS;
1976 connector_type = DRM_MODE_CONNECTOR_LVDS;
1977 sdvo_priv->is_lvds = true;
1978 }
1979 else if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_LVDS1)
1980 {
1981 sdvo_priv->controlled_output = SDVO_OUTPUT_LVDS1;
1982 encoder_type = DRM_MODE_ENCODER_LVDS;
1983 connector_type = DRM_MODE_CONNECTOR_LVDS;
1984 sdvo_priv->is_lvds = true;
1985 }
1986 else
1987 {
1988 unsigned char bytes[2];
1989
1990 sdvo_priv->controlled_output = 0;
1991 memcpy (bytes, &sdvo_priv->caps.output_flags, 2);
1992 DRM_DEBUG_KMS(I915_SDVO,
1993 "%s: Unknown SDVO output type (0x%02x%02x)\n",
1994 SDVO_NAME(sdvo_priv),
1995 bytes[0], bytes[1]);
1996 encoder_type = DRM_MODE_ENCODER_NONE;
1997 connector_type = DRM_MODE_CONNECTOR_Unknown;
1998 goto err_i2c; 2084 goto err_i2c;
1999 } 2085 }
2000 2086
2087
2001 connector = &intel_output->base; 2088 connector = &intel_output->base;
2002 drm_connector_init(dev, connector, &intel_sdvo_connector_funcs, 2089 drm_connector_init(dev, connector, &intel_sdvo_connector_funcs,
2003 connector_type); 2090 connector->connector_type);
2091
2004 drm_connector_helper_add(connector, &intel_sdvo_connector_helper_funcs); 2092 drm_connector_helper_add(connector, &intel_sdvo_connector_helper_funcs);
2005 connector->interlace_allowed = 0; 2093 connector->interlace_allowed = 0;
2006 connector->doublescan_allowed = 0; 2094 connector->doublescan_allowed = 0;
2007 connector->display_info.subpixel_order = SubPixelHorizontalRGB; 2095 connector->display_info.subpixel_order = SubPixelHorizontalRGB;
2008 2096
2009 drm_encoder_init(dev, &intel_output->enc, &intel_sdvo_enc_funcs, encoder_type); 2097 drm_encoder_init(dev, &intel_output->enc,
2098 &intel_sdvo_enc_funcs, intel_output->enc.encoder_type);
2099
2010 drm_encoder_helper_add(&intel_output->enc, &intel_sdvo_helper_funcs); 2100 drm_encoder_helper_add(&intel_output->enc, &intel_sdvo_helper_funcs);
2011 2101
2012 drm_mode_connector_attach_encoder(&intel_output->base, &intel_output->enc); 2102 drm_mode_connector_attach_encoder(&intel_output->base, &intel_output->enc);
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
index a43c98e3f07..da4ab4dc163 100644
--- a/drivers/gpu/drm/i915/intel_tv.c
+++ b/drivers/gpu/drm/i915/intel_tv.c
@@ -1490,6 +1490,27 @@ static struct input_res {
1490 {"1920x1080", 1920, 1080}, 1490 {"1920x1080", 1920, 1080},
1491}; 1491};
1492 1492
1493/*
1494 * Chose preferred mode according to line number of TV format
1495 */
1496static void
1497intel_tv_chose_preferred_modes(struct drm_connector *connector,
1498 struct drm_display_mode *mode_ptr)
1499{
1500 struct intel_output *intel_output = to_intel_output(connector);
1501 const struct tv_mode *tv_mode = intel_tv_mode_find(intel_output);
1502
1503 if (tv_mode->nbr_end < 480 && mode_ptr->vdisplay == 480)
1504 mode_ptr->type |= DRM_MODE_TYPE_PREFERRED;
1505 else if (tv_mode->nbr_end > 480) {
1506 if (tv_mode->progressive == true && tv_mode->nbr_end < 720) {
1507 if (mode_ptr->vdisplay == 720)
1508 mode_ptr->type |= DRM_MODE_TYPE_PREFERRED;
1509 } else if (mode_ptr->vdisplay == 1080)
1510 mode_ptr->type |= DRM_MODE_TYPE_PREFERRED;
1511 }
1512}
1513
1493/** 1514/**
1494 * Stub get_modes function. 1515 * Stub get_modes function.
1495 * 1516 *
@@ -1544,6 +1565,7 @@ intel_tv_get_modes(struct drm_connector *connector)
1544 mode_ptr->clock = (int) tmp; 1565 mode_ptr->clock = (int) tmp;
1545 1566
1546 mode_ptr->type = DRM_MODE_TYPE_DRIVER; 1567 mode_ptr->type = DRM_MODE_TYPE_DRIVER;
1568 intel_tv_chose_preferred_modes(connector, mode_ptr);
1547 drm_mode_probed_add(connector, mode_ptr); 1569 drm_mode_probed_add(connector, mode_ptr);
1548 count++; 1570 count++;
1549 } 1571 }
diff --git a/drivers/gpu/drm/radeon/Makefile b/drivers/gpu/drm/radeon/Makefile
index 5fae1e074b4..013d3805994 100644
--- a/drivers/gpu/drm/radeon/Makefile
+++ b/drivers/gpu/drm/radeon/Makefile
@@ -13,7 +13,8 @@ radeon-$(CONFIG_DRM_RADEON_KMS) += radeon_device.o radeon_kms.o \
13 radeon_encoders.o radeon_display.o radeon_cursor.o radeon_i2c.o \ 13 radeon_encoders.o radeon_display.o radeon_cursor.o radeon_i2c.o \
14 radeon_clocks.o radeon_fb.o radeon_gem.o radeon_ring.o radeon_irq_kms.o \ 14 radeon_clocks.o radeon_fb.o radeon_gem.o radeon_ring.o radeon_irq_kms.o \
15 radeon_cs.o radeon_bios.o radeon_benchmark.o r100.o r300.o r420.o \ 15 radeon_cs.o radeon_bios.o radeon_benchmark.o r100.o r300.o r420.o \
16 rs400.o rs600.o rs690.o rv515.o r520.o r600.o rs780.o rv770.o 16 rs400.o rs600.o rs690.o rv515.o r520.o r600.o rs780.o rv770.o \
17 radeon_test.o
17 18
18radeon-$(CONFIG_COMPAT) += radeon_ioc32.o 19radeon-$(CONFIG_COMPAT) += radeon_ioc32.o
19 20
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index c0080cc9bf8..74d034f77c6 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -31,6 +31,132 @@
31#include "atom.h" 31#include "atom.h"
32#include "atom-bits.h" 32#include "atom-bits.h"
33 33
34static void atombios_overscan_setup(struct drm_crtc *crtc,
35 struct drm_display_mode *mode,
36 struct drm_display_mode *adjusted_mode)
37{
38 struct drm_device *dev = crtc->dev;
39 struct radeon_device *rdev = dev->dev_private;
40 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
41 SET_CRTC_OVERSCAN_PS_ALLOCATION args;
42 int index = GetIndexIntoMasterTable(COMMAND, SetCRTC_OverScan);
43 int a1, a2;
44
45 memset(&args, 0, sizeof(args));
46
47 args.usOverscanRight = 0;
48 args.usOverscanLeft = 0;
49 args.usOverscanBottom = 0;
50 args.usOverscanTop = 0;
51 args.ucCRTC = radeon_crtc->crtc_id;
52
53 switch (radeon_crtc->rmx_type) {
54 case RMX_CENTER:
55 args.usOverscanTop = (adjusted_mode->crtc_vdisplay - mode->crtc_vdisplay) / 2;
56 args.usOverscanBottom = (adjusted_mode->crtc_vdisplay - mode->crtc_vdisplay) / 2;
57 args.usOverscanLeft = (adjusted_mode->crtc_hdisplay - mode->crtc_hdisplay) / 2;
58 args.usOverscanRight = (adjusted_mode->crtc_hdisplay - mode->crtc_hdisplay) / 2;
59 atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);
60 break;
61 case RMX_ASPECT:
62 a1 = mode->crtc_vdisplay * adjusted_mode->crtc_hdisplay;
63 a2 = adjusted_mode->crtc_vdisplay * mode->crtc_hdisplay;
64
65 if (a1 > a2) {
66 args.usOverscanLeft = (adjusted_mode->crtc_hdisplay - (a2 / mode->crtc_vdisplay)) / 2;
67 args.usOverscanRight = (adjusted_mode->crtc_hdisplay - (a2 / mode->crtc_vdisplay)) / 2;
68 } else if (a2 > a1) {
69 args.usOverscanLeft = (adjusted_mode->crtc_vdisplay - (a1 / mode->crtc_hdisplay)) / 2;
70 args.usOverscanRight = (adjusted_mode->crtc_vdisplay - (a1 / mode->crtc_hdisplay)) / 2;
71 }
72 atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);
73 break;
74 case RMX_FULL:
75 default:
76 args.usOverscanRight = 0;
77 args.usOverscanLeft = 0;
78 args.usOverscanBottom = 0;
79 args.usOverscanTop = 0;
80 atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);
81 break;
82 }
83}
84
85static void atombios_scaler_setup(struct drm_crtc *crtc)
86{
87 struct drm_device *dev = crtc->dev;
88 struct radeon_device *rdev = dev->dev_private;
89 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
90 ENABLE_SCALER_PS_ALLOCATION args;
91 int index = GetIndexIntoMasterTable(COMMAND, EnableScaler);
92 /* fixme - fill in enc_priv for atom dac */
93 enum radeon_tv_std tv_std = TV_STD_NTSC;
94
95 if (!ASIC_IS_AVIVO(rdev) && radeon_crtc->crtc_id)
96 return;
97
98 memset(&args, 0, sizeof(args));
99
100 args.ucScaler = radeon_crtc->crtc_id;
101
102 if (radeon_crtc->devices & (ATOM_DEVICE_TV_SUPPORT)) {
103 switch (tv_std) {
104 case TV_STD_NTSC:
105 default:
106 args.ucTVStandard = ATOM_TV_NTSC;
107 break;
108 case TV_STD_PAL:
109 args.ucTVStandard = ATOM_TV_PAL;
110 break;
111 case TV_STD_PAL_M:
112 args.ucTVStandard = ATOM_TV_PALM;
113 break;
114 case TV_STD_PAL_60:
115 args.ucTVStandard = ATOM_TV_PAL60;
116 break;
117 case TV_STD_NTSC_J:
118 args.ucTVStandard = ATOM_TV_NTSCJ;
119 break;
120 case TV_STD_SCART_PAL:
121 args.ucTVStandard = ATOM_TV_PAL; /* ??? */
122 break;
123 case TV_STD_SECAM:
124 args.ucTVStandard = ATOM_TV_SECAM;
125 break;
126 case TV_STD_PAL_CN:
127 args.ucTVStandard = ATOM_TV_PALCN;
128 break;
129 }
130 args.ucEnable = SCALER_ENABLE_MULTITAP_MODE;
131 } else if (radeon_crtc->devices & (ATOM_DEVICE_CV_SUPPORT)) {
132 args.ucTVStandard = ATOM_TV_CV;
133 args.ucEnable = SCALER_ENABLE_MULTITAP_MODE;
134 } else {
135 switch (radeon_crtc->rmx_type) {
136 case RMX_FULL:
137 args.ucEnable = ATOM_SCALER_EXPANSION;
138 break;
139 case RMX_CENTER:
140 args.ucEnable = ATOM_SCALER_CENTER;
141 break;
142 case RMX_ASPECT:
143 args.ucEnable = ATOM_SCALER_EXPANSION;
144 break;
145 default:
146 if (ASIC_IS_AVIVO(rdev))
147 args.ucEnable = ATOM_SCALER_DISABLE;
148 else
149 args.ucEnable = ATOM_SCALER_CENTER;
150 break;
151 }
152 }
153 atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);
154 if (radeon_crtc->devices & (ATOM_DEVICE_CV_SUPPORT | ATOM_DEVICE_TV_SUPPORT)
155 && rdev->family >= CHIP_RV515 && rdev->family <= CHIP_RV570) {
156 atom_rv515_force_tv_scaler(rdev);
157 }
158}
159
34static void atombios_lock_crtc(struct drm_crtc *crtc, int lock) 160static void atombios_lock_crtc(struct drm_crtc *crtc, int lock)
35{ 161{
36 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); 162 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
@@ -203,6 +329,12 @@ void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode *mode)
203 if (ASIC_IS_AVIVO(rdev)) { 329 if (ASIC_IS_AVIVO(rdev)) {
204 uint32_t ss_cntl; 330 uint32_t ss_cntl;
205 331
332 if ((rdev->family == CHIP_RS600) ||
333 (rdev->family == CHIP_RS690) ||
334 (rdev->family == CHIP_RS740))
335 pll_flags |= (RADEON_PLL_USE_FRAC_FB_DIV |
336 RADEON_PLL_PREFER_CLOSEST_LOWER);
337
206 if (ASIC_IS_DCE32(rdev) && mode->clock > 200000) /* range limits??? */ 338 if (ASIC_IS_DCE32(rdev) && mode->clock > 200000) /* range limits??? */
207 pll_flags |= RADEON_PLL_PREFER_HIGH_FB_DIV; 339 pll_flags |= RADEON_PLL_PREFER_HIGH_FB_DIV;
208 else 340 else
@@ -321,7 +453,7 @@ int atombios_crtc_set_base(struct drm_crtc *crtc, int x, int y,
321 struct drm_gem_object *obj; 453 struct drm_gem_object *obj;
322 struct drm_radeon_gem_object *obj_priv; 454 struct drm_radeon_gem_object *obj_priv;
323 uint64_t fb_location; 455 uint64_t fb_location;
324 uint32_t fb_format, fb_pitch_pixels; 456 uint32_t fb_format, fb_pitch_pixels, tiling_flags;
325 457
326 if (!crtc->fb) 458 if (!crtc->fb)
327 return -EINVAL; 459 return -EINVAL;
@@ -358,7 +490,14 @@ int atombios_crtc_set_base(struct drm_crtc *crtc, int x, int y,
358 return -EINVAL; 490 return -EINVAL;
359 } 491 }
360 492
361 /* TODO tiling */ 493 radeon_object_get_tiling_flags(obj->driver_private,
494 &tiling_flags, NULL);
495 if (tiling_flags & RADEON_TILING_MACRO)
496 fb_format |= AVIVO_D1GRPH_MACRO_ADDRESS_MODE;
497
498 if (tiling_flags & RADEON_TILING_MICRO)
499 fb_format |= AVIVO_D1GRPH_TILED;
500
362 if (radeon_crtc->crtc_id == 0) 501 if (radeon_crtc->crtc_id == 0)
363 WREG32(AVIVO_D1VGA_CONTROL, 0); 502 WREG32(AVIVO_D1VGA_CONTROL, 0);
364 else 503 else
@@ -509,6 +648,9 @@ int atombios_crtc_mode_set(struct drm_crtc *crtc,
509 radeon_crtc_set_base(crtc, x, y, old_fb); 648 radeon_crtc_set_base(crtc, x, y, old_fb);
510 radeon_legacy_atom_set_surface(crtc); 649 radeon_legacy_atom_set_surface(crtc);
511 } 650 }
651 atombios_overscan_setup(crtc, mode, adjusted_mode);
652 atombios_scaler_setup(crtc);
653 radeon_bandwidth_update(rdev);
512 return 0; 654 return 0;
513} 655}
514 656
@@ -516,6 +658,8 @@ static bool atombios_crtc_mode_fixup(struct drm_crtc *crtc,
516 struct drm_display_mode *mode, 658 struct drm_display_mode *mode,
517 struct drm_display_mode *adjusted_mode) 659 struct drm_display_mode *adjusted_mode)
518{ 660{
661 if (!radeon_crtc_scaling_mode_fixup(crtc, mode, adjusted_mode))
662 return false;
519 return true; 663 return true;
520} 664}
521 665
@@ -548,148 +692,3 @@ void radeon_atombios_init_crtc(struct drm_device *dev,
548 AVIVO_D2CRTC_H_TOTAL - AVIVO_D1CRTC_H_TOTAL; 692 AVIVO_D2CRTC_H_TOTAL - AVIVO_D1CRTC_H_TOTAL;
549 drm_crtc_helper_add(&radeon_crtc->base, &atombios_helper_funcs); 693 drm_crtc_helper_add(&radeon_crtc->base, &atombios_helper_funcs);
550} 694}
551
552void radeon_init_disp_bw_avivo(struct drm_device *dev,
553 struct drm_display_mode *mode1,
554 uint32_t pixel_bytes1,
555 struct drm_display_mode *mode2,
556 uint32_t pixel_bytes2)
557{
558 struct radeon_device *rdev = dev->dev_private;
559 fixed20_12 min_mem_eff;
560 fixed20_12 peak_disp_bw, mem_bw, pix_clk, pix_clk2, temp_ff;
561 fixed20_12 sclk_ff, mclk_ff;
562 uint32_t dc_lb_memory_split, temp;
563
564 min_mem_eff.full = rfixed_const_8(0);
565 if (rdev->disp_priority == 2) {
566 uint32_t mc_init_misc_lat_timer = 0;
567 if (rdev->family == CHIP_RV515)
568 mc_init_misc_lat_timer =
569 RREG32_MC(RV515_MC_INIT_MISC_LAT_TIMER);
570 else if (rdev->family == CHIP_RS690)
571 mc_init_misc_lat_timer =
572 RREG32_MC(RS690_MC_INIT_MISC_LAT_TIMER);
573
574 mc_init_misc_lat_timer &=
575 ~(R300_MC_DISP1R_INIT_LAT_MASK <<
576 R300_MC_DISP1R_INIT_LAT_SHIFT);
577 mc_init_misc_lat_timer &=
578 ~(R300_MC_DISP0R_INIT_LAT_MASK <<
579 R300_MC_DISP0R_INIT_LAT_SHIFT);
580
581 if (mode2)
582 mc_init_misc_lat_timer |=
583 (1 << R300_MC_DISP1R_INIT_LAT_SHIFT);
584 if (mode1)
585 mc_init_misc_lat_timer |=
586 (1 << R300_MC_DISP0R_INIT_LAT_SHIFT);
587
588 if (rdev->family == CHIP_RV515)
589 WREG32_MC(RV515_MC_INIT_MISC_LAT_TIMER,
590 mc_init_misc_lat_timer);
591 else if (rdev->family == CHIP_RS690)
592 WREG32_MC(RS690_MC_INIT_MISC_LAT_TIMER,
593 mc_init_misc_lat_timer);
594 }
595
596 /*
597 * determine is there is enough bw for current mode
598 */
599 temp_ff.full = rfixed_const(100);
600 mclk_ff.full = rfixed_const(rdev->clock.default_mclk);
601 mclk_ff.full = rfixed_div(mclk_ff, temp_ff);
602 sclk_ff.full = rfixed_const(rdev->clock.default_sclk);
603 sclk_ff.full = rfixed_div(sclk_ff, temp_ff);
604
605 temp = (rdev->mc.vram_width / 8) * (rdev->mc.vram_is_ddr ? 2 : 1);
606 temp_ff.full = rfixed_const(temp);
607 mem_bw.full = rfixed_mul(mclk_ff, temp_ff);
608 mem_bw.full = rfixed_mul(mem_bw, min_mem_eff);
609
610 pix_clk.full = 0;
611 pix_clk2.full = 0;
612 peak_disp_bw.full = 0;
613 if (mode1) {
614 temp_ff.full = rfixed_const(1000);
615 pix_clk.full = rfixed_const(mode1->clock); /* convert to fixed point */
616 pix_clk.full = rfixed_div(pix_clk, temp_ff);
617 temp_ff.full = rfixed_const(pixel_bytes1);
618 peak_disp_bw.full += rfixed_mul(pix_clk, temp_ff);
619 }
620 if (mode2) {
621 temp_ff.full = rfixed_const(1000);
622 pix_clk2.full = rfixed_const(mode2->clock); /* convert to fixed point */
623 pix_clk2.full = rfixed_div(pix_clk2, temp_ff);
624 temp_ff.full = rfixed_const(pixel_bytes2);
625 peak_disp_bw.full += rfixed_mul(pix_clk2, temp_ff);
626 }
627
628 if (peak_disp_bw.full >= mem_bw.full) {
629 DRM_ERROR
630 ("You may not have enough display bandwidth for current mode\n"
631 "If you have flickering problem, try to lower resolution, refresh rate, or color depth\n");
632 printk("peak disp bw %d, mem_bw %d\n",
633 rfixed_trunc(peak_disp_bw), rfixed_trunc(mem_bw));
634 }
635
636 /*
637 * Line Buffer Setup
638 * There is a single line buffer shared by both display controllers.
639 * DC_LB_MEMORY_SPLIT controls how that line buffer is shared between the display
640 * controllers. The paritioning can either be done manually or via one of four
641 * preset allocations specified in bits 1:0:
642 * 0 - line buffer is divided in half and shared between each display controller
643 * 1 - D1 gets 3/4 of the line buffer, D2 gets 1/4
644 * 2 - D1 gets the whole buffer
645 * 3 - D1 gets 1/4 of the line buffer, D2 gets 3/4
646 * Setting bit 2 of DC_LB_MEMORY_SPLIT controls switches to manual allocation mode.
647 * In manual allocation mode, D1 always starts at 0, D1 end/2 is specified in bits
648 * 14:4; D2 allocation follows D1.
649 */
650
651 /* is auto or manual better ? */
652 dc_lb_memory_split =
653 RREG32(AVIVO_DC_LB_MEMORY_SPLIT) & ~AVIVO_DC_LB_MEMORY_SPLIT_MASK;
654 dc_lb_memory_split &= ~AVIVO_DC_LB_MEMORY_SPLIT_SHIFT_MODE;
655#if 1
656 /* auto */
657 if (mode1 && mode2) {
658 if (mode1->hdisplay > mode2->hdisplay) {
659 if (mode1->hdisplay > 2560)
660 dc_lb_memory_split |=
661 AVIVO_DC_LB_MEMORY_SPLIT_D1_3Q_D2_1Q;
662 else
663 dc_lb_memory_split |=
664 AVIVO_DC_LB_MEMORY_SPLIT_D1HALF_D2HALF;
665 } else if (mode2->hdisplay > mode1->hdisplay) {
666 if (mode2->hdisplay > 2560)
667 dc_lb_memory_split |=
668 AVIVO_DC_LB_MEMORY_SPLIT_D1_1Q_D2_3Q;
669 else
670 dc_lb_memory_split |=
671 AVIVO_DC_LB_MEMORY_SPLIT_D1HALF_D2HALF;
672 } else
673 dc_lb_memory_split |=
674 AVIVO_DC_LB_MEMORY_SPLIT_D1HALF_D2HALF;
675 } else if (mode1) {
676 dc_lb_memory_split |= AVIVO_DC_LB_MEMORY_SPLIT_D1_ONLY;
677 } else if (mode2) {
678 dc_lb_memory_split |= AVIVO_DC_LB_MEMORY_SPLIT_D1_1Q_D2_3Q;
679 }
680#else
681 /* manual */
682 dc_lb_memory_split |= AVIVO_DC_LB_MEMORY_SPLIT_SHIFT_MODE;
683 dc_lb_memory_split &=
684 ~(AVIVO_DC_LB_DISP1_END_ADR_MASK <<
685 AVIVO_DC_LB_DISP1_END_ADR_SHIFT);
686 if (mode1) {
687 dc_lb_memory_split |=
688 ((((mode1->hdisplay / 2) + 64) & AVIVO_DC_LB_DISP1_END_ADR_MASK)
689 << AVIVO_DC_LB_DISP1_END_ADR_SHIFT);
690 } else if (mode2) {
691 dc_lb_memory_split |= (0 << AVIVO_DC_LB_DISP1_END_ADR_SHIFT);
692 }
693#endif
694 WREG32(AVIVO_DC_LB_MEMORY_SPLIT, dc_lb_memory_split);
695}
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index c550932a108..f1ba8ff4113 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -110,7 +110,7 @@ int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr)
110 if (i < 0 || i > rdev->gart.num_gpu_pages) { 110 if (i < 0 || i > rdev->gart.num_gpu_pages) {
111 return -EINVAL; 111 return -EINVAL;
112 } 112 }
113 rdev->gart.table.ram.ptr[i] = cpu_to_le32((uint32_t)addr); 113 rdev->gart.table.ram.ptr[i] = cpu_to_le32(lower_32_bits(addr));
114 return 0; 114 return 0;
115} 115}
116 116
@@ -173,8 +173,12 @@ void r100_mc_setup(struct radeon_device *rdev)
173 DRM_ERROR("Failed to register debugfs file for R100 MC !\n"); 173 DRM_ERROR("Failed to register debugfs file for R100 MC !\n");
174 } 174 }
175 /* Write VRAM size in case we are limiting it */ 175 /* Write VRAM size in case we are limiting it */
176 WREG32(RADEON_CONFIG_MEMSIZE, rdev->mc.vram_size); 176 WREG32(RADEON_CONFIG_MEMSIZE, rdev->mc.real_vram_size);
177 tmp = rdev->mc.vram_location + rdev->mc.vram_size - 1; 177 /* Novell bug 204882 for RN50/M6/M7 with 8/16/32MB VRAM,
178 * if the aperture is 64MB but we have 32MB VRAM
179 * we report only 32MB VRAM but we have to set MC_FB_LOCATION
180 * to 64MB, otherwise the gpu accidentially dies */
181 tmp = rdev->mc.vram_location + rdev->mc.mc_vram_size - 1;
178 tmp = REG_SET(RADEON_MC_FB_TOP, tmp >> 16); 182 tmp = REG_SET(RADEON_MC_FB_TOP, tmp >> 16);
179 tmp |= REG_SET(RADEON_MC_FB_START, rdev->mc.vram_location >> 16); 183 tmp |= REG_SET(RADEON_MC_FB_START, rdev->mc.vram_location >> 16);
180 WREG32(RADEON_MC_FB_LOCATION, tmp); 184 WREG32(RADEON_MC_FB_LOCATION, tmp);
@@ -215,7 +219,6 @@ int r100_mc_init(struct radeon_device *rdev)
215 r100_pci_gart_disable(rdev); 219 r100_pci_gart_disable(rdev);
216 220
217 /* Setup GPU memory space */ 221 /* Setup GPU memory space */
218 rdev->mc.vram_location = 0xFFFFFFFFUL;
219 rdev->mc.gtt_location = 0xFFFFFFFFUL; 222 rdev->mc.gtt_location = 0xFFFFFFFFUL;
220 if (rdev->flags & RADEON_IS_AGP) { 223 if (rdev->flags & RADEON_IS_AGP) {
221 r = radeon_agp_init(rdev); 224 r = radeon_agp_init(rdev);
@@ -719,13 +722,14 @@ int r100_cs_packet_parse(struct radeon_cs_parser *p,
719 unsigned idx) 722 unsigned idx)
720{ 723{
721 struct radeon_cs_chunk *ib_chunk = &p->chunks[p->chunk_ib_idx]; 724 struct radeon_cs_chunk *ib_chunk = &p->chunks[p->chunk_ib_idx];
722 uint32_t header = ib_chunk->kdata[idx]; 725 uint32_t header;
723 726
724 if (idx >= ib_chunk->length_dw) { 727 if (idx >= ib_chunk->length_dw) {
725 DRM_ERROR("Can not parse packet at %d after CS end %d !\n", 728 DRM_ERROR("Can not parse packet at %d after CS end %d !\n",
726 idx, ib_chunk->length_dw); 729 idx, ib_chunk->length_dw);
727 return -EINVAL; 730 return -EINVAL;
728 } 731 }
732 header = ib_chunk->kdata[idx];
729 pkt->idx = idx; 733 pkt->idx = idx;
730 pkt->type = CP_PACKET_GET_TYPE(header); 734 pkt->type = CP_PACKET_GET_TYPE(header);
731 pkt->count = CP_PACKET_GET_COUNT(header); 735 pkt->count = CP_PACKET_GET_COUNT(header);
@@ -753,6 +757,102 @@ int r100_cs_packet_parse(struct radeon_cs_parser *p,
753} 757}
754 758
755/** 759/**
760 * r100_cs_packet_next_vline() - parse userspace VLINE packet
761 * @parser: parser structure holding parsing context.
762 *
763 * Userspace sends a special sequence for VLINE waits.
764 * PACKET0 - VLINE_START_END + value
765 * PACKET0 - WAIT_UNTIL +_value
766 * RELOC (P3) - crtc_id in reloc.
767 *
768 * This function parses this and relocates the VLINE START END
769 * and WAIT UNTIL packets to the correct crtc.
770 * It also detects a switched off crtc and nulls out the
771 * wait in that case.
772 */
773int r100_cs_packet_parse_vline(struct radeon_cs_parser *p)
774{
775 struct radeon_cs_chunk *ib_chunk;
776 struct drm_mode_object *obj;
777 struct drm_crtc *crtc;
778 struct radeon_crtc *radeon_crtc;
779 struct radeon_cs_packet p3reloc, waitreloc;
780 int crtc_id;
781 int r;
782 uint32_t header, h_idx, reg;
783
784 ib_chunk = &p->chunks[p->chunk_ib_idx];
785
786 /* parse the wait until */
787 r = r100_cs_packet_parse(p, &waitreloc, p->idx);
788 if (r)
789 return r;
790
791 /* check its a wait until and only 1 count */
792 if (waitreloc.reg != RADEON_WAIT_UNTIL ||
793 waitreloc.count != 0) {
794 DRM_ERROR("vline wait had illegal wait until segment\n");
795 r = -EINVAL;
796 return r;
797 }
798
799 if (ib_chunk->kdata[waitreloc.idx + 1] != RADEON_WAIT_CRTC_VLINE) {
800 DRM_ERROR("vline wait had illegal wait until\n");
801 r = -EINVAL;
802 return r;
803 }
804
805 /* jump over the NOP */
806 r = r100_cs_packet_parse(p, &p3reloc, p->idx);
807 if (r)
808 return r;
809
810 h_idx = p->idx - 2;
811 p->idx += waitreloc.count;
812 p->idx += p3reloc.count;
813
814 header = ib_chunk->kdata[h_idx];
815 crtc_id = ib_chunk->kdata[h_idx + 5];
816 reg = ib_chunk->kdata[h_idx] >> 2;
817 mutex_lock(&p->rdev->ddev->mode_config.mutex);
818 obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC);
819 if (!obj) {
820 DRM_ERROR("cannot find crtc %d\n", crtc_id);
821 r = -EINVAL;
822 goto out;
823 }
824 crtc = obj_to_crtc(obj);
825 radeon_crtc = to_radeon_crtc(crtc);
826 crtc_id = radeon_crtc->crtc_id;
827
828 if (!crtc->enabled) {
829 /* if the CRTC isn't enabled - we need to nop out the wait until */
830 ib_chunk->kdata[h_idx + 2] = PACKET2(0);
831 ib_chunk->kdata[h_idx + 3] = PACKET2(0);
832 } else if (crtc_id == 1) {
833 switch (reg) {
834 case AVIVO_D1MODE_VLINE_START_END:
835 header &= R300_CP_PACKET0_REG_MASK;
836 header |= AVIVO_D2MODE_VLINE_START_END >> 2;
837 break;
838 case RADEON_CRTC_GUI_TRIG_VLINE:
839 header &= R300_CP_PACKET0_REG_MASK;
840 header |= RADEON_CRTC2_GUI_TRIG_VLINE >> 2;
841 break;
842 default:
843 DRM_ERROR("unknown crtc reloc\n");
844 r = -EINVAL;
845 goto out;
846 }
847 ib_chunk->kdata[h_idx] = header;
848 ib_chunk->kdata[h_idx + 3] |= RADEON_ENG_DISPLAY_SELECT_CRTC1;
849 }
850out:
851 mutex_unlock(&p->rdev->ddev->mode_config.mutex);
852 return r;
853}
854
855/**
756 * r100_cs_packet_next_reloc() - parse next packet which should be reloc packet3 856 * r100_cs_packet_next_reloc() - parse next packet which should be reloc packet3
757 * @parser: parser structure holding parsing context. 857 * @parser: parser structure holding parsing context.
758 * @data: pointer to relocation data 858 * @data: pointer to relocation data
@@ -814,6 +914,7 @@ static int r100_packet0_check(struct radeon_cs_parser *p,
814 unsigned idx; 914 unsigned idx;
815 bool onereg; 915 bool onereg;
816 int r; 916 int r;
917 u32 tile_flags = 0;
817 918
818 ib = p->ib->ptr; 919 ib = p->ib->ptr;
819 ib_chunk = &p->chunks[p->chunk_ib_idx]; 920 ib_chunk = &p->chunks[p->chunk_ib_idx];
@@ -825,6 +926,15 @@ static int r100_packet0_check(struct radeon_cs_parser *p,
825 } 926 }
826 for (i = 0; i <= pkt->count; i++, idx++, reg += 4) { 927 for (i = 0; i <= pkt->count; i++, idx++, reg += 4) {
827 switch (reg) { 928 switch (reg) {
929 case RADEON_CRTC_GUI_TRIG_VLINE:
930 r = r100_cs_packet_parse_vline(p);
931 if (r) {
932 DRM_ERROR("No reloc for ib[%d]=0x%04X\n",
933 idx, reg);
934 r100_cs_dump_packet(p, pkt);
935 return r;
936 }
937 break;
828 /* FIXME: only allow PACKET3 blit? easier to check for out of 938 /* FIXME: only allow PACKET3 blit? easier to check for out of
829 * range access */ 939 * range access */
830 case RADEON_DST_PITCH_OFFSET: 940 case RADEON_DST_PITCH_OFFSET:
@@ -838,7 +948,20 @@ static int r100_packet0_check(struct radeon_cs_parser *p,
838 } 948 }
839 tmp = ib_chunk->kdata[idx] & 0x003fffff; 949 tmp = ib_chunk->kdata[idx] & 0x003fffff;
840 tmp += (((u32)reloc->lobj.gpu_offset) >> 10); 950 tmp += (((u32)reloc->lobj.gpu_offset) >> 10);
841 ib[idx] = (ib_chunk->kdata[idx] & 0xffc00000) | tmp; 951
952 if (reloc->lobj.tiling_flags & RADEON_TILING_MACRO)
953 tile_flags |= RADEON_DST_TILE_MACRO;
954 if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO) {
955 if (reg == RADEON_SRC_PITCH_OFFSET) {
956 DRM_ERROR("Cannot src blit from microtiled surface\n");
957 r100_cs_dump_packet(p, pkt);
958 return -EINVAL;
959 }
960 tile_flags |= RADEON_DST_TILE_MICRO;
961 }
962
963 tmp |= tile_flags;
964 ib[idx] = (ib_chunk->kdata[idx] & 0x3fc00000) | tmp;
842 break; 965 break;
843 case RADEON_RB3D_DEPTHOFFSET: 966 case RADEON_RB3D_DEPTHOFFSET:
844 case RADEON_RB3D_COLOROFFSET: 967 case RADEON_RB3D_COLOROFFSET:
@@ -869,6 +992,11 @@ static int r100_packet0_check(struct radeon_cs_parser *p,
869 case R300_TX_OFFSET_0+52: 992 case R300_TX_OFFSET_0+52:
870 case R300_TX_OFFSET_0+56: 993 case R300_TX_OFFSET_0+56:
871 case R300_TX_OFFSET_0+60: 994 case R300_TX_OFFSET_0+60:
995 /* rn50 has no 3D engine so fail on any 3d setup */
996 if (ASIC_IS_RN50(p->rdev)) {
997 DRM_ERROR("attempt to use RN50 3D engine failed\n");
998 return -EINVAL;
999 }
872 r = r100_cs_packet_next_reloc(p, &reloc); 1000 r = r100_cs_packet_next_reloc(p, &reloc);
873 if (r) { 1001 if (r) {
874 DRM_ERROR("No reloc for ib[%d]=0x%04X\n", 1002 DRM_ERROR("No reloc for ib[%d]=0x%04X\n",
@@ -878,6 +1006,25 @@ static int r100_packet0_check(struct radeon_cs_parser *p,
878 } 1006 }
879 ib[idx] = ib_chunk->kdata[idx] + ((u32)reloc->lobj.gpu_offset); 1007 ib[idx] = ib_chunk->kdata[idx] + ((u32)reloc->lobj.gpu_offset);
880 break; 1008 break;
1009 case R300_RB3D_COLORPITCH0:
1010 case RADEON_RB3D_COLORPITCH:
1011 r = r100_cs_packet_next_reloc(p, &reloc);
1012 if (r) {
1013 DRM_ERROR("No reloc for ib[%d]=0x%04X\n",
1014 idx, reg);
1015 r100_cs_dump_packet(p, pkt);
1016 return r;
1017 }
1018
1019 if (reloc->lobj.tiling_flags & RADEON_TILING_MACRO)
1020 tile_flags |= RADEON_COLOR_TILE_ENABLE;
1021 if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO)
1022 tile_flags |= RADEON_COLOR_MICROTILE_ENABLE;
1023
1024 tmp = ib_chunk->kdata[idx] & ~(0x7 << 16);
1025 tmp |= tile_flags;
1026 ib[idx] = tmp;
1027 break;
881 default: 1028 default:
882 /* FIXME: we don't want to allow anyothers packet */ 1029 /* FIXME: we don't want to allow anyothers packet */
883 break; 1030 break;
@@ -1256,29 +1403,100 @@ static void r100_vram_get_type(struct radeon_device *rdev)
1256 } 1403 }
1257} 1404}
1258 1405
1259void r100_vram_info(struct radeon_device *rdev) 1406static u32 r100_get_accessible_vram(struct radeon_device *rdev)
1260{ 1407{
1261 r100_vram_get_type(rdev); 1408 u32 aper_size;
1409 u8 byte;
1410
1411 aper_size = RREG32(RADEON_CONFIG_APER_SIZE);
1412
1413 /* Set HDP_APER_CNTL only on cards that are known not to be broken,
1414 * that is has the 2nd generation multifunction PCI interface
1415 */
1416 if (rdev->family == CHIP_RV280 ||
1417 rdev->family >= CHIP_RV350) {
1418 WREG32_P(RADEON_HOST_PATH_CNTL, RADEON_HDP_APER_CNTL,
1419 ~RADEON_HDP_APER_CNTL);
1420 DRM_INFO("Generation 2 PCI interface, using max accessible memory\n");
1421 return aper_size * 2;
1422 }
1423
1424 /* Older cards have all sorts of funny issues to deal with. First
1425 * check if it's a multifunction card by reading the PCI config
1426 * header type... Limit those to one aperture size
1427 */
1428 pci_read_config_byte(rdev->pdev, 0xe, &byte);
1429 if (byte & 0x80) {
1430 DRM_INFO("Generation 1 PCI interface in multifunction mode\n");
1431 DRM_INFO("Limiting VRAM to one aperture\n");
1432 return aper_size;
1433 }
1434
1435 /* Single function older card. We read HDP_APER_CNTL to see how the BIOS
1436 * have set it up. We don't write this as it's broken on some ASICs but
1437 * we expect the BIOS to have done the right thing (might be too optimistic...)
1438 */
1439 if (RREG32(RADEON_HOST_PATH_CNTL) & RADEON_HDP_APER_CNTL)
1440 return aper_size * 2;
1441 return aper_size;
1442}
1443
1444void r100_vram_init_sizes(struct radeon_device *rdev)
1445{
1446 u64 config_aper_size;
1447 u32 accessible;
1448
1449 config_aper_size = RREG32(RADEON_CONFIG_APER_SIZE);
1262 1450
1263 if (rdev->flags & RADEON_IS_IGP) { 1451 if (rdev->flags & RADEON_IS_IGP) {
1264 uint32_t tom; 1452 uint32_t tom;
1265 /* read NB_TOM to get the amount of ram stolen for the GPU */ 1453 /* read NB_TOM to get the amount of ram stolen for the GPU */
1266 tom = RREG32(RADEON_NB_TOM); 1454 tom = RREG32(RADEON_NB_TOM);
1267 rdev->mc.vram_size = (((tom >> 16) - (tom & 0xffff) + 1) << 16); 1455 rdev->mc.real_vram_size = (((tom >> 16) - (tom & 0xffff) + 1) << 16);
1268 WREG32(RADEON_CONFIG_MEMSIZE, rdev->mc.vram_size); 1456 /* for IGPs we need to keep VRAM where it was put by the BIOS */
1457 rdev->mc.vram_location = (tom & 0xffff) << 16;
1458 WREG32(RADEON_CONFIG_MEMSIZE, rdev->mc.real_vram_size);
1459 rdev->mc.mc_vram_size = rdev->mc.real_vram_size;
1269 } else { 1460 } else {
1270 rdev->mc.vram_size = RREG32(RADEON_CONFIG_MEMSIZE); 1461 rdev->mc.real_vram_size = RREG32(RADEON_CONFIG_MEMSIZE);
1271 /* Some production boards of m6 will report 0 1462 /* Some production boards of m6 will report 0
1272 * if it's 8 MB 1463 * if it's 8 MB
1273 */ 1464 */
1274 if (rdev->mc.vram_size == 0) { 1465 if (rdev->mc.real_vram_size == 0) {
1275 rdev->mc.vram_size = 8192 * 1024; 1466 rdev->mc.real_vram_size = 8192 * 1024;
1276 WREG32(RADEON_CONFIG_MEMSIZE, rdev->mc.vram_size); 1467 WREG32(RADEON_CONFIG_MEMSIZE, rdev->mc.real_vram_size);
1277 } 1468 }
1469 /* let driver place VRAM */
1470 rdev->mc.vram_location = 0xFFFFFFFFUL;
1471 /* Fix for RN50, M6, M7 with 8/16/32(??) MBs of VRAM -
1472 * Novell bug 204882 + along with lots of ubuntu ones */
1473 if (config_aper_size > rdev->mc.real_vram_size)
1474 rdev->mc.mc_vram_size = config_aper_size;
1475 else
1476 rdev->mc.mc_vram_size = rdev->mc.real_vram_size;
1278 } 1477 }
1279 1478
1479 /* work out accessible VRAM */
1480 accessible = r100_get_accessible_vram(rdev);
1481
1280 rdev->mc.aper_base = drm_get_resource_start(rdev->ddev, 0); 1482 rdev->mc.aper_base = drm_get_resource_start(rdev->ddev, 0);
1281 rdev->mc.aper_size = drm_get_resource_len(rdev->ddev, 0); 1483 rdev->mc.aper_size = drm_get_resource_len(rdev->ddev, 0);
1484
1485 if (accessible > rdev->mc.aper_size)
1486 accessible = rdev->mc.aper_size;
1487
1488 if (rdev->mc.mc_vram_size > rdev->mc.aper_size)
1489 rdev->mc.mc_vram_size = rdev->mc.aper_size;
1490
1491 if (rdev->mc.real_vram_size > rdev->mc.aper_size)
1492 rdev->mc.real_vram_size = rdev->mc.aper_size;
1493}
1494
1495void r100_vram_info(struct radeon_device *rdev)
1496{
1497 r100_vram_get_type(rdev);
1498
1499 r100_vram_init_sizes(rdev);
1282} 1500}
1283 1501
1284 1502
@@ -1533,3 +1751,530 @@ int r100_debugfs_mc_info_init(struct radeon_device *rdev)
1533 return 0; 1751 return 0;
1534#endif 1752#endif
1535} 1753}
1754
1755int r100_set_surface_reg(struct radeon_device *rdev, int reg,
1756 uint32_t tiling_flags, uint32_t pitch,
1757 uint32_t offset, uint32_t obj_size)
1758{
1759 int surf_index = reg * 16;
1760 int flags = 0;
1761
1762 /* r100/r200 divide by 16 */
1763 if (rdev->family < CHIP_R300)
1764 flags = pitch / 16;
1765 else
1766 flags = pitch / 8;
1767
1768 if (rdev->family <= CHIP_RS200) {
1769 if ((tiling_flags & (RADEON_TILING_MACRO|RADEON_TILING_MICRO))
1770 == (RADEON_TILING_MACRO|RADEON_TILING_MICRO))
1771 flags |= RADEON_SURF_TILE_COLOR_BOTH;
1772 if (tiling_flags & RADEON_TILING_MACRO)
1773 flags |= RADEON_SURF_TILE_COLOR_MACRO;
1774 } else if (rdev->family <= CHIP_RV280) {
1775 if (tiling_flags & (RADEON_TILING_MACRO))
1776 flags |= R200_SURF_TILE_COLOR_MACRO;
1777 if (tiling_flags & RADEON_TILING_MICRO)
1778 flags |= R200_SURF_TILE_COLOR_MICRO;
1779 } else {
1780 if (tiling_flags & RADEON_TILING_MACRO)
1781 flags |= R300_SURF_TILE_MACRO;
1782 if (tiling_flags & RADEON_TILING_MICRO)
1783 flags |= R300_SURF_TILE_MICRO;
1784 }
1785
1786 DRM_DEBUG("writing surface %d %d %x %x\n", reg, flags, offset, offset+obj_size-1);
1787 WREG32(RADEON_SURFACE0_INFO + surf_index, flags);
1788 WREG32(RADEON_SURFACE0_LOWER_BOUND + surf_index, offset);
1789 WREG32(RADEON_SURFACE0_UPPER_BOUND + surf_index, offset + obj_size - 1);
1790 return 0;
1791}
1792
1793void r100_clear_surface_reg(struct radeon_device *rdev, int reg)
1794{
1795 int surf_index = reg * 16;
1796 WREG32(RADEON_SURFACE0_INFO + surf_index, 0);
1797}
1798
1799void r100_bandwidth_update(struct radeon_device *rdev)
1800{
1801 fixed20_12 trcd_ff, trp_ff, tras_ff, trbs_ff, tcas_ff;
1802 fixed20_12 sclk_ff, mclk_ff, sclk_eff_ff, sclk_delay_ff;
1803 fixed20_12 peak_disp_bw, mem_bw, pix_clk, pix_clk2, temp_ff, crit_point_ff;
1804 uint32_t temp, data, mem_trcd, mem_trp, mem_tras;
1805 fixed20_12 memtcas_ff[8] = {
1806 fixed_init(1),
1807 fixed_init(2),
1808 fixed_init(3),
1809 fixed_init(0),
1810 fixed_init_half(1),
1811 fixed_init_half(2),
1812 fixed_init(0),
1813 };
1814 fixed20_12 memtcas_rs480_ff[8] = {
1815 fixed_init(0),
1816 fixed_init(1),
1817 fixed_init(2),
1818 fixed_init(3),
1819 fixed_init(0),
1820 fixed_init_half(1),
1821 fixed_init_half(2),
1822 fixed_init_half(3),
1823 };
1824 fixed20_12 memtcas2_ff[8] = {
1825 fixed_init(0),
1826 fixed_init(1),
1827 fixed_init(2),
1828 fixed_init(3),
1829 fixed_init(4),
1830 fixed_init(5),
1831 fixed_init(6),
1832 fixed_init(7),
1833 };
1834 fixed20_12 memtrbs[8] = {
1835 fixed_init(1),
1836 fixed_init_half(1),
1837 fixed_init(2),
1838 fixed_init_half(2),
1839 fixed_init(3),
1840 fixed_init_half(3),
1841 fixed_init(4),
1842 fixed_init_half(4)
1843 };
1844 fixed20_12 memtrbs_r4xx[8] = {
1845 fixed_init(4),
1846 fixed_init(5),
1847 fixed_init(6),
1848 fixed_init(7),
1849 fixed_init(8),
1850 fixed_init(9),
1851 fixed_init(10),
1852 fixed_init(11)
1853 };
1854 fixed20_12 min_mem_eff;
1855 fixed20_12 mc_latency_sclk, mc_latency_mclk, k1;
1856 fixed20_12 cur_latency_mclk, cur_latency_sclk;
1857 fixed20_12 disp_latency, disp_latency_overhead, disp_drain_rate,
1858 disp_drain_rate2, read_return_rate;
1859 fixed20_12 time_disp1_drop_priority;
1860 int c;
1861 int cur_size = 16; /* in octawords */
1862 int critical_point = 0, critical_point2;
1863/* uint32_t read_return_rate, time_disp1_drop_priority; */
1864 int stop_req, max_stop_req;
1865 struct drm_display_mode *mode1 = NULL;
1866 struct drm_display_mode *mode2 = NULL;
1867 uint32_t pixel_bytes1 = 0;
1868 uint32_t pixel_bytes2 = 0;
1869
1870 if (rdev->mode_info.crtcs[0]->base.enabled) {
1871 mode1 = &rdev->mode_info.crtcs[0]->base.mode;
1872 pixel_bytes1 = rdev->mode_info.crtcs[0]->base.fb->bits_per_pixel / 8;
1873 }
1874 if (rdev->mode_info.crtcs[1]->base.enabled) {
1875 mode2 = &rdev->mode_info.crtcs[1]->base.mode;
1876 pixel_bytes2 = rdev->mode_info.crtcs[1]->base.fb->bits_per_pixel / 8;
1877 }
1878
1879 min_mem_eff.full = rfixed_const_8(0);
1880 /* get modes */
1881 if ((rdev->disp_priority == 2) && ASIC_IS_R300(rdev)) {
1882 uint32_t mc_init_misc_lat_timer = RREG32(R300_MC_INIT_MISC_LAT_TIMER);
1883 mc_init_misc_lat_timer &= ~(R300_MC_DISP1R_INIT_LAT_MASK << R300_MC_DISP1R_INIT_LAT_SHIFT);
1884 mc_init_misc_lat_timer &= ~(R300_MC_DISP0R_INIT_LAT_MASK << R300_MC_DISP0R_INIT_LAT_SHIFT);
1885 /* check crtc enables */
1886 if (mode2)
1887 mc_init_misc_lat_timer |= (1 << R300_MC_DISP1R_INIT_LAT_SHIFT);
1888 if (mode1)
1889 mc_init_misc_lat_timer |= (1 << R300_MC_DISP0R_INIT_LAT_SHIFT);
1890 WREG32(R300_MC_INIT_MISC_LAT_TIMER, mc_init_misc_lat_timer);
1891 }
1892
1893 /*
1894 * determine is there is enough bw for current mode
1895 */
1896 mclk_ff.full = rfixed_const(rdev->clock.default_mclk);
1897 temp_ff.full = rfixed_const(100);
1898 mclk_ff.full = rfixed_div(mclk_ff, temp_ff);
1899 sclk_ff.full = rfixed_const(rdev->clock.default_sclk);
1900 sclk_ff.full = rfixed_div(sclk_ff, temp_ff);
1901
1902 temp = (rdev->mc.vram_width / 8) * (rdev->mc.vram_is_ddr ? 2 : 1);
1903 temp_ff.full = rfixed_const(temp);
1904 mem_bw.full = rfixed_mul(mclk_ff, temp_ff);
1905
1906 pix_clk.full = 0;
1907 pix_clk2.full = 0;
1908 peak_disp_bw.full = 0;
1909 if (mode1) {
1910 temp_ff.full = rfixed_const(1000);
1911 pix_clk.full = rfixed_const(mode1->clock); /* convert to fixed point */
1912 pix_clk.full = rfixed_div(pix_clk, temp_ff);
1913 temp_ff.full = rfixed_const(pixel_bytes1);
1914 peak_disp_bw.full += rfixed_mul(pix_clk, temp_ff);
1915 }
1916 if (mode2) {
1917 temp_ff.full = rfixed_const(1000);
1918 pix_clk2.full = rfixed_const(mode2->clock); /* convert to fixed point */
1919 pix_clk2.full = rfixed_div(pix_clk2, temp_ff);
1920 temp_ff.full = rfixed_const(pixel_bytes2);
1921 peak_disp_bw.full += rfixed_mul(pix_clk2, temp_ff);
1922 }
1923
1924 mem_bw.full = rfixed_mul(mem_bw, min_mem_eff);
1925 if (peak_disp_bw.full >= mem_bw.full) {
1926 DRM_ERROR("You may not have enough display bandwidth for current mode\n"
1927 "If you have flickering problem, try to lower resolution, refresh rate, or color depth\n");
1928 }
1929
1930 /* Get values from the EXT_MEM_CNTL register...converting its contents. */
1931 temp = RREG32(RADEON_MEM_TIMING_CNTL);
1932 if ((rdev->family == CHIP_RV100) || (rdev->flags & RADEON_IS_IGP)) { /* RV100, M6, IGPs */
1933 mem_trcd = ((temp >> 2) & 0x3) + 1;
1934 mem_trp = ((temp & 0x3)) + 1;
1935 mem_tras = ((temp & 0x70) >> 4) + 1;
1936 } else if (rdev->family == CHIP_R300 ||
1937 rdev->family == CHIP_R350) { /* r300, r350 */
1938 mem_trcd = (temp & 0x7) + 1;
1939 mem_trp = ((temp >> 8) & 0x7) + 1;
1940 mem_tras = ((temp >> 11) & 0xf) + 4;
1941 } else if (rdev->family == CHIP_RV350 ||
1942 rdev->family <= CHIP_RV380) {
1943 /* rv3x0 */
1944 mem_trcd = (temp & 0x7) + 3;
1945 mem_trp = ((temp >> 8) & 0x7) + 3;
1946 mem_tras = ((temp >> 11) & 0xf) + 6;
1947 } else if (rdev->family == CHIP_R420 ||
1948 rdev->family == CHIP_R423 ||
1949 rdev->family == CHIP_RV410) {
1950 /* r4xx */
1951 mem_trcd = (temp & 0xf) + 3;
1952 if (mem_trcd > 15)
1953 mem_trcd = 15;
1954 mem_trp = ((temp >> 8) & 0xf) + 3;
1955 if (mem_trp > 15)
1956 mem_trp = 15;
1957 mem_tras = ((temp >> 12) & 0x1f) + 6;
1958 if (mem_tras > 31)
1959 mem_tras = 31;
1960 } else { /* RV200, R200 */
1961 mem_trcd = (temp & 0x7) + 1;
1962 mem_trp = ((temp >> 8) & 0x7) + 1;
1963 mem_tras = ((temp >> 12) & 0xf) + 4;
1964 }
1965 /* convert to FF */
1966 trcd_ff.full = rfixed_const(mem_trcd);
1967 trp_ff.full = rfixed_const(mem_trp);
1968 tras_ff.full = rfixed_const(mem_tras);
1969
1970 /* Get values from the MEM_SDRAM_MODE_REG register...converting its */
1971 temp = RREG32(RADEON_MEM_SDRAM_MODE_REG);
1972 data = (temp & (7 << 20)) >> 20;
1973 if ((rdev->family == CHIP_RV100) || rdev->flags & RADEON_IS_IGP) {
1974 if (rdev->family == CHIP_RS480) /* don't think rs400 */
1975 tcas_ff = memtcas_rs480_ff[data];
1976 else
1977 tcas_ff = memtcas_ff[data];
1978 } else
1979 tcas_ff = memtcas2_ff[data];
1980
1981 if (rdev->family == CHIP_RS400 ||
1982 rdev->family == CHIP_RS480) {
1983 /* extra cas latency stored in bits 23-25 0-4 clocks */
1984 data = (temp >> 23) & 0x7;
1985 if (data < 5)
1986 tcas_ff.full += rfixed_const(data);
1987 }
1988
1989 if (ASIC_IS_R300(rdev) && !(rdev->flags & RADEON_IS_IGP)) {
1990 /* on the R300, Tcas is included in Trbs.
1991 */
1992 temp = RREG32(RADEON_MEM_CNTL);
1993 data = (R300_MEM_NUM_CHANNELS_MASK & temp);
1994 if (data == 1) {
1995 if (R300_MEM_USE_CD_CH_ONLY & temp) {
1996 temp = RREG32(R300_MC_IND_INDEX);
1997 temp &= ~R300_MC_IND_ADDR_MASK;
1998 temp |= R300_MC_READ_CNTL_CD_mcind;
1999 WREG32(R300_MC_IND_INDEX, temp);
2000 temp = RREG32(R300_MC_IND_DATA);
2001 data = (R300_MEM_RBS_POSITION_C_MASK & temp);
2002 } else {
2003 temp = RREG32(R300_MC_READ_CNTL_AB);
2004 data = (R300_MEM_RBS_POSITION_A_MASK & temp);
2005 }
2006 } else {
2007 temp = RREG32(R300_MC_READ_CNTL_AB);
2008 data = (R300_MEM_RBS_POSITION_A_MASK & temp);
2009 }
2010 if (rdev->family == CHIP_RV410 ||
2011 rdev->family == CHIP_R420 ||
2012 rdev->family == CHIP_R423)
2013 trbs_ff = memtrbs_r4xx[data];
2014 else
2015 trbs_ff = memtrbs[data];
2016 tcas_ff.full += trbs_ff.full;
2017 }
2018
2019 sclk_eff_ff.full = sclk_ff.full;
2020
2021 if (rdev->flags & RADEON_IS_AGP) {
2022 fixed20_12 agpmode_ff;
2023 agpmode_ff.full = rfixed_const(radeon_agpmode);
2024 temp_ff.full = rfixed_const_666(16);
2025 sclk_eff_ff.full -= rfixed_mul(agpmode_ff, temp_ff);
2026 }
2027 /* TODO PCIE lanes may affect this - agpmode == 16?? */
2028
2029 if (ASIC_IS_R300(rdev)) {
2030 sclk_delay_ff.full = rfixed_const(250);
2031 } else {
2032 if ((rdev->family == CHIP_RV100) ||
2033 rdev->flags & RADEON_IS_IGP) {
2034 if (rdev->mc.vram_is_ddr)
2035 sclk_delay_ff.full = rfixed_const(41);
2036 else
2037 sclk_delay_ff.full = rfixed_const(33);
2038 } else {
2039 if (rdev->mc.vram_width == 128)
2040 sclk_delay_ff.full = rfixed_const(57);
2041 else
2042 sclk_delay_ff.full = rfixed_const(41);
2043 }
2044 }
2045
2046 mc_latency_sclk.full = rfixed_div(sclk_delay_ff, sclk_eff_ff);
2047
2048 if (rdev->mc.vram_is_ddr) {
2049 if (rdev->mc.vram_width == 32) {
2050 k1.full = rfixed_const(40);
2051 c = 3;
2052 } else {
2053 k1.full = rfixed_const(20);
2054 c = 1;
2055 }
2056 } else {
2057 k1.full = rfixed_const(40);
2058 c = 3;
2059 }
2060
2061 temp_ff.full = rfixed_const(2);
2062 mc_latency_mclk.full = rfixed_mul(trcd_ff, temp_ff);
2063 temp_ff.full = rfixed_const(c);
2064 mc_latency_mclk.full += rfixed_mul(tcas_ff, temp_ff);
2065 temp_ff.full = rfixed_const(4);
2066 mc_latency_mclk.full += rfixed_mul(tras_ff, temp_ff);
2067 mc_latency_mclk.full += rfixed_mul(trp_ff, temp_ff);
2068 mc_latency_mclk.full += k1.full;
2069
2070 mc_latency_mclk.full = rfixed_div(mc_latency_mclk, mclk_ff);
2071 mc_latency_mclk.full += rfixed_div(temp_ff, sclk_eff_ff);
2072
2073 /*
2074 HW cursor time assuming worst case of full size colour cursor.
2075 */
2076 temp_ff.full = rfixed_const((2 * (cur_size - (rdev->mc.vram_is_ddr + 1))));
2077 temp_ff.full += trcd_ff.full;
2078 if (temp_ff.full < tras_ff.full)
2079 temp_ff.full = tras_ff.full;
2080 cur_latency_mclk.full = rfixed_div(temp_ff, mclk_ff);
2081
2082 temp_ff.full = rfixed_const(cur_size);
2083 cur_latency_sclk.full = rfixed_div(temp_ff, sclk_eff_ff);
2084 /*
2085 Find the total latency for the display data.
2086 */
2087 disp_latency_overhead.full = rfixed_const(80);
2088 disp_latency_overhead.full = rfixed_div(disp_latency_overhead, sclk_ff);
2089 mc_latency_mclk.full += disp_latency_overhead.full + cur_latency_mclk.full;
2090 mc_latency_sclk.full += disp_latency_overhead.full + cur_latency_sclk.full;
2091
2092 if (mc_latency_mclk.full > mc_latency_sclk.full)
2093 disp_latency.full = mc_latency_mclk.full;
2094 else
2095 disp_latency.full = mc_latency_sclk.full;
2096
2097 /* setup Max GRPH_STOP_REQ default value */
2098 if (ASIC_IS_RV100(rdev))
2099 max_stop_req = 0x5c;
2100 else
2101 max_stop_req = 0x7c;
2102
2103 if (mode1) {
2104 /* CRTC1
2105 Set GRPH_BUFFER_CNTL register using h/w defined optimal values.
2106 GRPH_STOP_REQ <= MIN[ 0x7C, (CRTC_H_DISP + 1) * (bit depth) / 0x10 ]
2107 */
2108 stop_req = mode1->hdisplay * pixel_bytes1 / 16;
2109
2110 if (stop_req > max_stop_req)
2111 stop_req = max_stop_req;
2112
2113 /*
2114 Find the drain rate of the display buffer.
2115 */
2116 temp_ff.full = rfixed_const((16/pixel_bytes1));
2117 disp_drain_rate.full = rfixed_div(pix_clk, temp_ff);
2118
2119 /*
2120 Find the critical point of the display buffer.
2121 */
2122 crit_point_ff.full = rfixed_mul(disp_drain_rate, disp_latency);
2123 crit_point_ff.full += rfixed_const_half(0);
2124
2125 critical_point = rfixed_trunc(crit_point_ff);
2126
2127 if (rdev->disp_priority == 2) {
2128 critical_point = 0;
2129 }
2130
2131 /*
2132 The critical point should never be above max_stop_req-4. Setting
2133 GRPH_CRITICAL_CNTL = 0 will thus force high priority all the time.
2134 */
2135 if (max_stop_req - critical_point < 4)
2136 critical_point = 0;
2137
2138 if (critical_point == 0 && mode2 && rdev->family == CHIP_R300) {
2139 /* some R300 cards have problem with this set to 0, when CRTC2 is enabled.*/
2140 critical_point = 0x10;
2141 }
2142
2143 temp = RREG32(RADEON_GRPH_BUFFER_CNTL);
2144 temp &= ~(RADEON_GRPH_STOP_REQ_MASK);
2145 temp |= (stop_req << RADEON_GRPH_STOP_REQ_SHIFT);
2146 temp &= ~(RADEON_GRPH_START_REQ_MASK);
2147 if ((rdev->family == CHIP_R350) &&
2148 (stop_req > 0x15)) {
2149 stop_req -= 0x10;
2150 }
2151 temp |= (stop_req << RADEON_GRPH_START_REQ_SHIFT);
2152 temp |= RADEON_GRPH_BUFFER_SIZE;
2153 temp &= ~(RADEON_GRPH_CRITICAL_CNTL |
2154 RADEON_GRPH_CRITICAL_AT_SOF |
2155 RADEON_GRPH_STOP_CNTL);
2156 /*
2157 Write the result into the register.
2158 */
2159 WREG32(RADEON_GRPH_BUFFER_CNTL, ((temp & ~RADEON_GRPH_CRITICAL_POINT_MASK) |
2160 (critical_point << RADEON_GRPH_CRITICAL_POINT_SHIFT)));
2161
2162#if 0
2163 if ((rdev->family == CHIP_RS400) ||
2164 (rdev->family == CHIP_RS480)) {
2165 /* attempt to program RS400 disp regs correctly ??? */
2166 temp = RREG32(RS400_DISP1_REG_CNTL);
2167 temp &= ~(RS400_DISP1_START_REQ_LEVEL_MASK |
2168 RS400_DISP1_STOP_REQ_LEVEL_MASK);
2169 WREG32(RS400_DISP1_REQ_CNTL1, (temp |
2170 (critical_point << RS400_DISP1_START_REQ_LEVEL_SHIFT) |
2171 (critical_point << RS400_DISP1_STOP_REQ_LEVEL_SHIFT)));
2172 temp = RREG32(RS400_DMIF_MEM_CNTL1);
2173 temp &= ~(RS400_DISP1_CRITICAL_POINT_START_MASK |
2174 RS400_DISP1_CRITICAL_POINT_STOP_MASK);
2175 WREG32(RS400_DMIF_MEM_CNTL1, (temp |
2176 (critical_point << RS400_DISP1_CRITICAL_POINT_START_SHIFT) |
2177 (critical_point << RS400_DISP1_CRITICAL_POINT_STOP_SHIFT)));
2178 }
2179#endif
2180
2181 DRM_DEBUG("GRPH_BUFFER_CNTL from to %x\n",
2182 /* (unsigned int)info->SavedReg->grph_buffer_cntl, */
2183 (unsigned int)RREG32(RADEON_GRPH_BUFFER_CNTL));
2184 }
2185
2186 if (mode2) {
2187 u32 grph2_cntl;
2188 stop_req = mode2->hdisplay * pixel_bytes2 / 16;
2189
2190 if (stop_req > max_stop_req)
2191 stop_req = max_stop_req;
2192
2193 /*
2194 Find the drain rate of the display buffer.
2195 */
2196 temp_ff.full = rfixed_const((16/pixel_bytes2));
2197 disp_drain_rate2.full = rfixed_div(pix_clk2, temp_ff);
2198
2199 grph2_cntl = RREG32(RADEON_GRPH2_BUFFER_CNTL);
2200 grph2_cntl &= ~(RADEON_GRPH_STOP_REQ_MASK);
2201 grph2_cntl |= (stop_req << RADEON_GRPH_STOP_REQ_SHIFT);
2202 grph2_cntl &= ~(RADEON_GRPH_START_REQ_MASK);
2203 if ((rdev->family == CHIP_R350) &&
2204 (stop_req > 0x15)) {
2205 stop_req -= 0x10;
2206 }
2207 grph2_cntl |= (stop_req << RADEON_GRPH_START_REQ_SHIFT);
2208 grph2_cntl |= RADEON_GRPH_BUFFER_SIZE;
2209 grph2_cntl &= ~(RADEON_GRPH_CRITICAL_CNTL |
2210 RADEON_GRPH_CRITICAL_AT_SOF |
2211 RADEON_GRPH_STOP_CNTL);
2212
2213 if ((rdev->family == CHIP_RS100) ||
2214 (rdev->family == CHIP_RS200))
2215 critical_point2 = 0;
2216 else {
2217 temp = (rdev->mc.vram_width * rdev->mc.vram_is_ddr + 1)/128;
2218 temp_ff.full = rfixed_const(temp);
2219 temp_ff.full = rfixed_mul(mclk_ff, temp_ff);
2220 if (sclk_ff.full < temp_ff.full)
2221 temp_ff.full = sclk_ff.full;
2222
2223 read_return_rate.full = temp_ff.full;
2224
2225 if (mode1) {
2226 temp_ff.full = read_return_rate.full - disp_drain_rate.full;
2227 time_disp1_drop_priority.full = rfixed_div(crit_point_ff, temp_ff);
2228 } else {
2229 time_disp1_drop_priority.full = 0;
2230 }
2231 crit_point_ff.full = disp_latency.full + time_disp1_drop_priority.full + disp_latency.full;
2232 crit_point_ff.full = rfixed_mul(crit_point_ff, disp_drain_rate2);
2233 crit_point_ff.full += rfixed_const_half(0);
2234
2235 critical_point2 = rfixed_trunc(crit_point_ff);
2236
2237 if (rdev->disp_priority == 2) {
2238 critical_point2 = 0;
2239 }
2240
2241 if (max_stop_req - critical_point2 < 4)
2242 critical_point2 = 0;
2243
2244 }
2245
2246 if (critical_point2 == 0 && rdev->family == CHIP_R300) {
2247 /* some R300 cards have problem with this set to 0 */
2248 critical_point2 = 0x10;
2249 }
2250
2251 WREG32(RADEON_GRPH2_BUFFER_CNTL, ((grph2_cntl & ~RADEON_GRPH_CRITICAL_POINT_MASK) |
2252 (critical_point2 << RADEON_GRPH_CRITICAL_POINT_SHIFT)));
2253
2254 if ((rdev->family == CHIP_RS400) ||
2255 (rdev->family == CHIP_RS480)) {
2256#if 0
2257 /* attempt to program RS400 disp2 regs correctly ??? */
2258 temp = RREG32(RS400_DISP2_REQ_CNTL1);
2259 temp &= ~(RS400_DISP2_START_REQ_LEVEL_MASK |
2260 RS400_DISP2_STOP_REQ_LEVEL_MASK);
2261 WREG32(RS400_DISP2_REQ_CNTL1, (temp |
2262 (critical_point2 << RS400_DISP1_START_REQ_LEVEL_SHIFT) |
2263 (critical_point2 << RS400_DISP1_STOP_REQ_LEVEL_SHIFT)));
2264 temp = RREG32(RS400_DISP2_REQ_CNTL2);
2265 temp &= ~(RS400_DISP2_CRITICAL_POINT_START_MASK |
2266 RS400_DISP2_CRITICAL_POINT_STOP_MASK);
2267 WREG32(RS400_DISP2_REQ_CNTL2, (temp |
2268 (critical_point2 << RS400_DISP2_CRITICAL_POINT_START_SHIFT) |
2269 (critical_point2 << RS400_DISP2_CRITICAL_POINT_STOP_SHIFT)));
2270#endif
2271 WREG32(RS400_DISP2_REQ_CNTL1, 0x105DC1CC);
2272 WREG32(RS400_DISP2_REQ_CNTL2, 0x2749D000);
2273 WREG32(RS400_DMIF_MEM_CNTL1, 0x29CA71DC);
2274 WREG32(RS400_DISP1_REQ_CNTL1, 0x28FBC3AC);
2275 }
2276
2277 DRM_DEBUG("GRPH2_BUFFER_CNTL from to %x\n",
2278 (unsigned int)RREG32(RADEON_GRPH2_BUFFER_CNTL));
2279 }
2280}
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index e2ed5bc0817..9c8d41534a5 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -30,6 +30,8 @@
30#include "drm.h" 30#include "drm.h"
31#include "radeon_reg.h" 31#include "radeon_reg.h"
32#include "radeon.h" 32#include "radeon.h"
33#include "radeon_drm.h"
34#include "radeon_share.h"
33 35
34/* r300,r350,rv350,rv370,rv380 depends on : */ 36/* r300,r350,rv350,rv370,rv380 depends on : */
35void r100_hdp_reset(struct radeon_device *rdev); 37void r100_hdp_reset(struct radeon_device *rdev);
@@ -44,6 +46,7 @@ int r100_gui_wait_for_idle(struct radeon_device *rdev);
44int r100_cs_packet_parse(struct radeon_cs_parser *p, 46int r100_cs_packet_parse(struct radeon_cs_parser *p,
45 struct radeon_cs_packet *pkt, 47 struct radeon_cs_packet *pkt,
46 unsigned idx); 48 unsigned idx);
49int r100_cs_packet_parse_vline(struct radeon_cs_parser *p);
47int r100_cs_packet_next_reloc(struct radeon_cs_parser *p, 50int r100_cs_packet_next_reloc(struct radeon_cs_parser *p,
48 struct radeon_cs_reloc **cs_reloc); 51 struct radeon_cs_reloc **cs_reloc);
49int r100_cs_parse_packet0(struct radeon_cs_parser *p, 52int r100_cs_parse_packet0(struct radeon_cs_parser *p,
@@ -150,8 +153,13 @@ int rv370_pcie_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr)
150 if (i < 0 || i > rdev->gart.num_gpu_pages) { 153 if (i < 0 || i > rdev->gart.num_gpu_pages) {
151 return -EINVAL; 154 return -EINVAL;
152 } 155 }
153 addr = (((u32)addr) >> 8) | ((upper_32_bits(addr) & 0xff) << 4) | 0xC; 156 addr = (lower_32_bits(addr) >> 8) |
154 writel(cpu_to_le32(addr), ((void __iomem *)ptr) + (i * 4)); 157 ((upper_32_bits(addr) & 0xff) << 24) |
158 0xc;
159 /* on x86 we want this to be CPU endian, on powerpc
160 * on powerpc without HW swappers, it'll get swapped on way
161 * into VRAM - so no need for cpu_to_le32 on VRAM tables */
162 writel(addr, ((void __iomem *)ptr) + (i * 4));
155 return 0; 163 return 0;
156} 164}
157 165
@@ -579,10 +587,8 @@ void r300_vram_info(struct radeon_device *rdev)
579 } else { 587 } else {
580 rdev->mc.vram_width = 64; 588 rdev->mc.vram_width = 64;
581 } 589 }
582 rdev->mc.vram_size = RREG32(RADEON_CONFIG_MEMSIZE);
583 590
584 rdev->mc.aper_base = drm_get_resource_start(rdev->ddev, 0); 591 r100_vram_init_sizes(rdev);
585 rdev->mc.aper_size = drm_get_resource_len(rdev->ddev, 0);
586} 592}
587 593
588 594
@@ -970,7 +976,7 @@ static inline void r300_cs_track_clear(struct r300_cs_track *track)
970 976
971static const unsigned r300_reg_safe_bm[159] = { 977static const unsigned r300_reg_safe_bm[159] = {
972 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 978 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
973 0xFFFFFFBF, 0xFFFFFFFF, 0xFFFFFFBF, 0xFFFFFFFF, 979 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
974 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 980 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
975 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 981 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
976 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 982 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
@@ -1019,7 +1025,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
1019 struct radeon_cs_reloc *reloc; 1025 struct radeon_cs_reloc *reloc;
1020 struct r300_cs_track *track; 1026 struct r300_cs_track *track;
1021 volatile uint32_t *ib; 1027 volatile uint32_t *ib;
1022 uint32_t tmp; 1028 uint32_t tmp, tile_flags = 0;
1023 unsigned i; 1029 unsigned i;
1024 int r; 1030 int r;
1025 1031
@@ -1027,6 +1033,16 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
1027 ib_chunk = &p->chunks[p->chunk_ib_idx]; 1033 ib_chunk = &p->chunks[p->chunk_ib_idx];
1028 track = (struct r300_cs_track*)p->track; 1034 track = (struct r300_cs_track*)p->track;
1029 switch(reg) { 1035 switch(reg) {
1036 case AVIVO_D1MODE_VLINE_START_END:
1037 case RADEON_CRTC_GUI_TRIG_VLINE:
1038 r = r100_cs_packet_parse_vline(p);
1039 if (r) {
1040 DRM_ERROR("No reloc for ib[%d]=0x%04X\n",
1041 idx, reg);
1042 r100_cs_dump_packet(p, pkt);
1043 return r;
1044 }
1045 break;
1030 case RADEON_DST_PITCH_OFFSET: 1046 case RADEON_DST_PITCH_OFFSET:
1031 case RADEON_SRC_PITCH_OFFSET: 1047 case RADEON_SRC_PITCH_OFFSET:
1032 r = r100_cs_packet_next_reloc(p, &reloc); 1048 r = r100_cs_packet_next_reloc(p, &reloc);
@@ -1038,7 +1054,19 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
1038 } 1054 }
1039 tmp = ib_chunk->kdata[idx] & 0x003fffff; 1055 tmp = ib_chunk->kdata[idx] & 0x003fffff;
1040 tmp += (((u32)reloc->lobj.gpu_offset) >> 10); 1056 tmp += (((u32)reloc->lobj.gpu_offset) >> 10);
1041 ib[idx] = (ib_chunk->kdata[idx] & 0xffc00000) | tmp; 1057
1058 if (reloc->lobj.tiling_flags & RADEON_TILING_MACRO)
1059 tile_flags |= RADEON_DST_TILE_MACRO;
1060 if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO) {
1061 if (reg == RADEON_SRC_PITCH_OFFSET) {
1062 DRM_ERROR("Cannot src blit from microtiled surface\n");
1063 r100_cs_dump_packet(p, pkt);
1064 return -EINVAL;
1065 }
1066 tile_flags |= RADEON_DST_TILE_MICRO;
1067 }
1068 tmp |= tile_flags;
1069 ib[idx] = (ib_chunk->kdata[idx] & 0x3fc00000) | tmp;
1042 break; 1070 break;
1043 case R300_RB3D_COLOROFFSET0: 1071 case R300_RB3D_COLOROFFSET0:
1044 case R300_RB3D_COLOROFFSET1: 1072 case R300_RB3D_COLOROFFSET1:
@@ -1127,6 +1155,23 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
1127 /* RB3D_COLORPITCH1 */ 1155 /* RB3D_COLORPITCH1 */
1128 /* RB3D_COLORPITCH2 */ 1156 /* RB3D_COLORPITCH2 */
1129 /* RB3D_COLORPITCH3 */ 1157 /* RB3D_COLORPITCH3 */
1158 r = r100_cs_packet_next_reloc(p, &reloc);
1159 if (r) {
1160 DRM_ERROR("No reloc for ib[%d]=0x%04X\n",
1161 idx, reg);
1162 r100_cs_dump_packet(p, pkt);
1163 return r;
1164 }
1165
1166 if (reloc->lobj.tiling_flags & RADEON_TILING_MACRO)
1167 tile_flags |= R300_COLOR_TILE_ENABLE;
1168 if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO)
1169 tile_flags |= R300_COLOR_MICROTILE_ENABLE;
1170
1171 tmp = ib_chunk->kdata[idx] & ~(0x7 << 16);
1172 tmp |= tile_flags;
1173 ib[idx] = tmp;
1174
1130 i = (reg - 0x4E38) >> 2; 1175 i = (reg - 0x4E38) >> 2;
1131 track->cb[i].pitch = ib_chunk->kdata[idx] & 0x3FFE; 1176 track->cb[i].pitch = ib_chunk->kdata[idx] & 0x3FFE;
1132 switch (((ib_chunk->kdata[idx] >> 21) & 0xF)) { 1177 switch (((ib_chunk->kdata[idx] >> 21) & 0xF)) {
@@ -1182,6 +1227,23 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
1182 break; 1227 break;
1183 case 0x4F24: 1228 case 0x4F24:
1184 /* ZB_DEPTHPITCH */ 1229 /* ZB_DEPTHPITCH */
1230 r = r100_cs_packet_next_reloc(p, &reloc);
1231 if (r) {
1232 DRM_ERROR("No reloc for ib[%d]=0x%04X\n",
1233 idx, reg);
1234 r100_cs_dump_packet(p, pkt);
1235 return r;
1236 }
1237
1238 if (reloc->lobj.tiling_flags & RADEON_TILING_MACRO)
1239 tile_flags |= R300_DEPTHMACROTILE_ENABLE;
1240 if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO)
1241 tile_flags |= R300_DEPTHMICROTILE_TILED;;
1242
1243 tmp = ib_chunk->kdata[idx] & ~(0x7 << 16);
1244 tmp |= tile_flags;
1245 ib[idx] = tmp;
1246
1185 track->zb.pitch = ib_chunk->kdata[idx] & 0x3FFC; 1247 track->zb.pitch = ib_chunk->kdata[idx] & 0x3FFC;
1186 break; 1248 break;
1187 case 0x4104: 1249 case 0x4104:
diff --git a/drivers/gpu/drm/radeon/r300_reg.h b/drivers/gpu/drm/radeon/r300_reg.h
index 70f48609515..4b7afef35a6 100644
--- a/drivers/gpu/drm/radeon/r300_reg.h
+++ b/drivers/gpu/drm/radeon/r300_reg.h
@@ -27,7 +27,9 @@
27#ifndef _R300_REG_H_ 27#ifndef _R300_REG_H_
28#define _R300_REG_H_ 28#define _R300_REG_H_
29 29
30 30#define R300_SURF_TILE_MACRO (1<<16)
31#define R300_SURF_TILE_MICRO (2<<16)
32#define R300_SURF_TILE_BOTH (3<<16)
31 33
32 34
33#define R300_MC_INIT_MISC_LAT_TIMER 0x180 35#define R300_MC_INIT_MISC_LAT_TIMER 0x180
diff --git a/drivers/gpu/drm/radeon/r500_reg.h b/drivers/gpu/drm/radeon/r500_reg.h
index 9070a1c2ce2..036691b38cb 100644
--- a/drivers/gpu/drm/radeon/r500_reg.h
+++ b/drivers/gpu/drm/radeon/r500_reg.h
@@ -445,6 +445,7 @@
445#define AVIVO_D1MODE_DATA_FORMAT 0x6528 445#define AVIVO_D1MODE_DATA_FORMAT 0x6528
446# define AVIVO_D1MODE_INTERLEAVE_EN (1 << 0) 446# define AVIVO_D1MODE_INTERLEAVE_EN (1 << 0)
447#define AVIVO_D1MODE_DESKTOP_HEIGHT 0x652C 447#define AVIVO_D1MODE_DESKTOP_HEIGHT 0x652C
448#define AVIVO_D1MODE_VLINE_START_END 0x6538
448#define AVIVO_D1MODE_VIEWPORT_START 0x6580 449#define AVIVO_D1MODE_VIEWPORT_START 0x6580
449#define AVIVO_D1MODE_VIEWPORT_SIZE 0x6584 450#define AVIVO_D1MODE_VIEWPORT_SIZE 0x6584
450#define AVIVO_D1MODE_EXT_OVERSCAN_LEFT_RIGHT 0x6588 451#define AVIVO_D1MODE_EXT_OVERSCAN_LEFT_RIGHT 0x6588
@@ -496,6 +497,7 @@
496#define AVIVO_D2CUR_SIZE 0x6c10 497#define AVIVO_D2CUR_SIZE 0x6c10
497#define AVIVO_D2CUR_POSITION 0x6c14 498#define AVIVO_D2CUR_POSITION 0x6c14
498 499
500#define AVIVO_D2MODE_VLINE_START_END 0x6d38
499#define AVIVO_D2MODE_VIEWPORT_START 0x6d80 501#define AVIVO_D2MODE_VIEWPORT_START 0x6d80
500#define AVIVO_D2MODE_VIEWPORT_SIZE 0x6d84 502#define AVIVO_D2MODE_VIEWPORT_SIZE 0x6d84
501#define AVIVO_D2MODE_EXT_OVERSCAN_LEFT_RIGHT 0x6d88 503#define AVIVO_D2MODE_EXT_OVERSCAN_LEFT_RIGHT 0x6d88
diff --git a/drivers/gpu/drm/radeon/r520.c b/drivers/gpu/drm/radeon/r520.c
index 570a244bd88..09fb0b6ec7d 100644
--- a/drivers/gpu/drm/radeon/r520.c
+++ b/drivers/gpu/drm/radeon/r520.c
@@ -28,6 +28,7 @@
28#include "drmP.h" 28#include "drmP.h"
29#include "radeon_reg.h" 29#include "radeon_reg.h"
30#include "radeon.h" 30#include "radeon.h"
31#include "radeon_share.h"
31 32
32/* r520,rv530,rv560,rv570,r580 depends on : */ 33/* r520,rv530,rv560,rv570,r580 depends on : */
33void r100_hdp_reset(struct radeon_device *rdev); 34void r100_hdp_reset(struct radeon_device *rdev);
@@ -94,8 +95,8 @@ int r520_mc_init(struct radeon_device *rdev)
94 "programming pipes. Bad things might happen.\n"); 95 "programming pipes. Bad things might happen.\n");
95 } 96 }
96 /* Write VRAM size in case we are limiting it */ 97 /* Write VRAM size in case we are limiting it */
97 WREG32(RADEON_CONFIG_MEMSIZE, rdev->mc.vram_size); 98 WREG32(RADEON_CONFIG_MEMSIZE, rdev->mc.real_vram_size);
98 tmp = rdev->mc.vram_location + rdev->mc.vram_size - 1; 99 tmp = rdev->mc.vram_location + rdev->mc.mc_vram_size - 1;
99 tmp = REG_SET(R520_MC_FB_TOP, tmp >> 16); 100 tmp = REG_SET(R520_MC_FB_TOP, tmp >> 16);
100 tmp |= REG_SET(R520_MC_FB_START, rdev->mc.vram_location >> 16); 101 tmp |= REG_SET(R520_MC_FB_START, rdev->mc.vram_location >> 16);
101 WREG32_MC(R520_MC_FB_LOCATION, tmp); 102 WREG32_MC(R520_MC_FB_LOCATION, tmp);
@@ -226,9 +227,20 @@ static void r520_vram_get_type(struct radeon_device *rdev)
226 227
227void r520_vram_info(struct radeon_device *rdev) 228void r520_vram_info(struct radeon_device *rdev)
228{ 229{
230 fixed20_12 a;
231
229 r520_vram_get_type(rdev); 232 r520_vram_get_type(rdev);
230 rdev->mc.vram_size = RREG32(RADEON_CONFIG_MEMSIZE);
231 233
232 rdev->mc.aper_base = drm_get_resource_start(rdev->ddev, 0); 234 r100_vram_init_sizes(rdev);
233 rdev->mc.aper_size = drm_get_resource_len(rdev->ddev, 0); 235 /* FIXME: we should enforce default clock in case GPU is not in
236 * default setup
237 */
238 a.full = rfixed_const(100);
239 rdev->pm.sclk.full = rfixed_const(rdev->clock.default_sclk);
240 rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a);
241}
242
243void r520_bandwidth_update(struct radeon_device *rdev)
244{
245 rv515_bandwidth_avivo_update(rdev);
234} 246}
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index c45559fc97f..538cd907df6 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -67,7 +67,7 @@ int r600_mc_init(struct radeon_device *rdev)
67 "programming pipes. Bad things might happen.\n"); 67 "programming pipes. Bad things might happen.\n");
68 } 68 }
69 69
70 tmp = rdev->mc.vram_location + rdev->mc.vram_size - 1; 70 tmp = rdev->mc.vram_location + rdev->mc.mc_vram_size - 1;
71 tmp = REG_SET(R600_MC_FB_TOP, tmp >> 24); 71 tmp = REG_SET(R600_MC_FB_TOP, tmp >> 24);
72 tmp |= REG_SET(R600_MC_FB_BASE, rdev->mc.vram_location >> 24); 72 tmp |= REG_SET(R600_MC_FB_BASE, rdev->mc.vram_location >> 24);
73 WREG32(R600_MC_VM_FB_LOCATION, tmp); 73 WREG32(R600_MC_VM_FB_LOCATION, tmp);
@@ -140,7 +140,8 @@ void r600_vram_get_type(struct radeon_device *rdev)
140void r600_vram_info(struct radeon_device *rdev) 140void r600_vram_info(struct radeon_device *rdev)
141{ 141{
142 r600_vram_get_type(rdev); 142 r600_vram_get_type(rdev);
143 rdev->mc.vram_size = RREG32(R600_CONFIG_MEMSIZE); 143 rdev->mc.real_vram_size = RREG32(R600_CONFIG_MEMSIZE);
144 rdev->mc.mc_vram_size = rdev->mc.real_vram_size;
144 145
145 /* Could aper size report 0 ? */ 146 /* Could aper size report 0 ? */
146 rdev->mc.aper_base = drm_get_resource_start(rdev->ddev, 0); 147 rdev->mc.aper_base = drm_get_resource_start(rdev->ddev, 0);
diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c
index 146f3570af8..20f17908b03 100644
--- a/drivers/gpu/drm/radeon/r600_cp.c
+++ b/drivers/gpu/drm/radeon/r600_cp.c
@@ -384,8 +384,9 @@ static void r600_cp_load_microcode(drm_radeon_private_t *dev_priv)
384 DRM_INFO("Loading RV670 PFP Microcode\n"); 384 DRM_INFO("Loading RV670 PFP Microcode\n");
385 for (i = 0; i < PFP_UCODE_SIZE; i++) 385 for (i = 0; i < PFP_UCODE_SIZE; i++)
386 RADEON_WRITE(R600_CP_PFP_UCODE_DATA, RV670_pfp_microcode[i]); 386 RADEON_WRITE(R600_CP_PFP_UCODE_DATA, RV670_pfp_microcode[i]);
387 } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) { 387 } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) ||
388 DRM_INFO("Loading RS780 CP Microcode\n"); 388 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) {
389 DRM_INFO("Loading RS780/RS880 CP Microcode\n");
389 for (i = 0; i < PM4_UCODE_SIZE; i++) { 390 for (i = 0; i < PM4_UCODE_SIZE; i++) {
390 RADEON_WRITE(R600_CP_ME_RAM_DATA, 391 RADEON_WRITE(R600_CP_ME_RAM_DATA,
391 RS780_cp_microcode[i][0]); 392 RS780_cp_microcode[i][0]);
@@ -396,7 +397,7 @@ static void r600_cp_load_microcode(drm_radeon_private_t *dev_priv)
396 } 397 }
397 398
398 RADEON_WRITE(R600_CP_PFP_UCODE_ADDR, 0); 399 RADEON_WRITE(R600_CP_PFP_UCODE_ADDR, 0);
399 DRM_INFO("Loading RS780 PFP Microcode\n"); 400 DRM_INFO("Loading RS780/RS880 PFP Microcode\n");
400 for (i = 0; i < PFP_UCODE_SIZE; i++) 401 for (i = 0; i < PFP_UCODE_SIZE; i++)
401 RADEON_WRITE(R600_CP_PFP_UCODE_DATA, RS780_pfp_microcode[i]); 402 RADEON_WRITE(R600_CP_PFP_UCODE_DATA, RS780_pfp_microcode[i]);
402 } 403 }
@@ -783,6 +784,7 @@ static void r600_gfx_init(struct drm_device *dev,
783 break; 784 break;
784 case CHIP_RV610: 785 case CHIP_RV610:
785 case CHIP_RS780: 786 case CHIP_RS780:
787 case CHIP_RS880:
786 case CHIP_RV620: 788 case CHIP_RV620:
787 dev_priv->r600_max_pipes = 1; 789 dev_priv->r600_max_pipes = 1;
788 dev_priv->r600_max_tile_pipes = 1; 790 dev_priv->r600_max_tile_pipes = 1;
@@ -917,7 +919,8 @@ static void r600_gfx_init(struct drm_device *dev,
917 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV630) || 919 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV630) ||
918 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || 920 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) ||
919 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || 921 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) ||
920 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) 922 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) ||
923 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880))
921 RADEON_WRITE(R600_DB_DEBUG, R600_PREZ_MUST_WAIT_FOR_POSTZ_DONE); 924 RADEON_WRITE(R600_DB_DEBUG, R600_PREZ_MUST_WAIT_FOR_POSTZ_DONE);
922 else 925 else
923 RADEON_WRITE(R600_DB_DEBUG, 0); 926 RADEON_WRITE(R600_DB_DEBUG, 0);
@@ -935,7 +938,8 @@ static void r600_gfx_init(struct drm_device *dev,
935 sq_ms_fifo_sizes = RADEON_READ(R600_SQ_MS_FIFO_SIZES); 938 sq_ms_fifo_sizes = RADEON_READ(R600_SQ_MS_FIFO_SIZES);
936 if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || 939 if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) ||
937 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || 940 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) ||
938 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) { 941 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) ||
942 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) {
939 sq_ms_fifo_sizes = (R600_CACHE_FIFO_SIZE(0xa) | 943 sq_ms_fifo_sizes = (R600_CACHE_FIFO_SIZE(0xa) |
940 R600_FETCH_FIFO_HIWATER(0xa) | 944 R600_FETCH_FIFO_HIWATER(0xa) |
941 R600_DONE_FIFO_HIWATER(0xe0) | 945 R600_DONE_FIFO_HIWATER(0xe0) |
@@ -978,7 +982,8 @@ static void r600_gfx_init(struct drm_device *dev,
978 R600_NUM_ES_STACK_ENTRIES(0)); 982 R600_NUM_ES_STACK_ENTRIES(0));
979 } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || 983 } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) ||
980 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || 984 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) ||
981 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) { 985 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) ||
986 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) {
982 /* no vertex cache */ 987 /* no vertex cache */
983 sq_config &= ~R600_VC_ENABLE; 988 sq_config &= ~R600_VC_ENABLE;
984 989
@@ -1035,7 +1040,8 @@ static void r600_gfx_init(struct drm_device *dev,
1035 1040
1036 if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || 1041 if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) ||
1037 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || 1042 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) ||
1038 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) 1043 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) ||
1044 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880))
1039 RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_TC_ONLY)); 1045 RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_TC_ONLY));
1040 else 1046 else
1041 RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_VC_AND_TC)); 1047 RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_VC_AND_TC));
@@ -1078,6 +1084,7 @@ static void r600_gfx_init(struct drm_device *dev,
1078 break; 1084 break;
1079 case CHIP_RV610: 1085 case CHIP_RV610:
1080 case CHIP_RS780: 1086 case CHIP_RS780:
1087 case CHIP_RS880:
1081 case CHIP_RV620: 1088 case CHIP_RV620:
1082 gs_prim_buffer_depth = 32; 1089 gs_prim_buffer_depth = 32;
1083 break; 1090 break;
@@ -1123,6 +1130,7 @@ static void r600_gfx_init(struct drm_device *dev,
1123 switch (dev_priv->flags & RADEON_FAMILY_MASK) { 1130 switch (dev_priv->flags & RADEON_FAMILY_MASK) {
1124 case CHIP_RV610: 1131 case CHIP_RV610:
1125 case CHIP_RS780: 1132 case CHIP_RS780:
1133 case CHIP_RS880:
1126 case CHIP_RV620: 1134 case CHIP_RV620:
1127 tc_cntl = R600_TC_L2_SIZE(8); 1135 tc_cntl = R600_TC_L2_SIZE(8);
1128 break; 1136 break;
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index d61f2fc61df..b1d945b8ed6 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -64,6 +64,7 @@ extern int radeon_agpmode;
64extern int radeon_vram_limit; 64extern int radeon_vram_limit;
65extern int radeon_gart_size; 65extern int radeon_gart_size;
66extern int radeon_benchmarking; 66extern int radeon_benchmarking;
67extern int radeon_testing;
67extern int radeon_connector_table; 68extern int radeon_connector_table;
68 69
69/* 70/*
@@ -113,6 +114,7 @@ enum radeon_family {
113 CHIP_RV770, 114 CHIP_RV770,
114 CHIP_RV730, 115 CHIP_RV730,
115 CHIP_RV710, 116 CHIP_RV710,
117 CHIP_RS880,
116 CHIP_LAST, 118 CHIP_LAST,
117}; 119};
118 120
@@ -201,6 +203,14 @@ int radeon_fence_wait_last(struct radeon_device *rdev);
201struct radeon_fence *radeon_fence_ref(struct radeon_fence *fence); 203struct radeon_fence *radeon_fence_ref(struct radeon_fence *fence);
202void radeon_fence_unref(struct radeon_fence **fence); 204void radeon_fence_unref(struct radeon_fence **fence);
203 205
206/*
207 * Tiling registers
208 */
209struct radeon_surface_reg {
210 struct radeon_object *robj;
211};
212
213#define RADEON_GEM_MAX_SURFACES 8
204 214
205/* 215/*
206 * Radeon buffer. 216 * Radeon buffer.
@@ -213,6 +223,7 @@ struct radeon_object_list {
213 uint64_t gpu_offset; 223 uint64_t gpu_offset;
214 unsigned rdomain; 224 unsigned rdomain;
215 unsigned wdomain; 225 unsigned wdomain;
226 uint32_t tiling_flags;
216}; 227};
217 228
218int radeon_object_init(struct radeon_device *rdev); 229int radeon_object_init(struct radeon_device *rdev);
@@ -242,8 +253,15 @@ void radeon_object_list_clean(struct list_head *head);
242int radeon_object_fbdev_mmap(struct radeon_object *robj, 253int radeon_object_fbdev_mmap(struct radeon_object *robj,
243 struct vm_area_struct *vma); 254 struct vm_area_struct *vma);
244unsigned long radeon_object_size(struct radeon_object *robj); 255unsigned long radeon_object_size(struct radeon_object *robj);
245 256void radeon_object_clear_surface_reg(struct radeon_object *robj);
246 257int radeon_object_check_tiling(struct radeon_object *robj, bool has_moved,
258 bool force_drop);
259void radeon_object_set_tiling_flags(struct radeon_object *robj,
260 uint32_t tiling_flags, uint32_t pitch);
261void radeon_object_get_tiling_flags(struct radeon_object *robj, uint32_t *tiling_flags, uint32_t *pitch);
262void radeon_bo_move_notify(struct ttm_buffer_object *bo,
263 struct ttm_mem_reg *mem);
264void radeon_bo_fault_reserve_notify(struct ttm_buffer_object *bo);
247/* 265/*
248 * GEM objects. 266 * GEM objects.
249 */ 267 */
@@ -315,8 +333,11 @@ struct radeon_mc {
315 unsigned gtt_location; 333 unsigned gtt_location;
316 unsigned gtt_size; 334 unsigned gtt_size;
317 unsigned vram_location; 335 unsigned vram_location;
318 unsigned vram_size; 336 /* for some chips with <= 32MB we need to lie
337 * about vram size near mc fb location */
338 unsigned mc_vram_size;
319 unsigned vram_width; 339 unsigned vram_width;
340 unsigned real_vram_size;
320 int vram_mtrr; 341 int vram_mtrr;
321 bool vram_is_ddr; 342 bool vram_is_ddr;
322}; 343};
@@ -474,6 +495,39 @@ struct radeon_wb {
474 uint64_t gpu_addr; 495 uint64_t gpu_addr;
475}; 496};
476 497
498/**
499 * struct radeon_pm - power management datas
500 * @max_bandwidth: maximum bandwidth the gpu has (MByte/s)
501 * @igp_sideport_mclk: sideport memory clock Mhz (rs690,rs740,rs780,rs880)
502 * @igp_system_mclk: system clock Mhz (rs690,rs740,rs780,rs880)
503 * @igp_ht_link_clk: ht link clock Mhz (rs690,rs740,rs780,rs880)
504 * @igp_ht_link_width: ht link width in bits (rs690,rs740,rs780,rs880)
505 * @k8_bandwidth: k8 bandwidth the gpu has (MByte/s) (IGP)
506 * @sideport_bandwidth: sideport bandwidth the gpu has (MByte/s) (IGP)
507 * @ht_bandwidth: ht bandwidth the gpu has (MByte/s) (IGP)
508 * @core_bandwidth: core GPU bandwidth the gpu has (MByte/s) (IGP)
509 * @sclk: GPU clock Mhz (core bandwith depends of this clock)
510 * @needed_bandwidth: current bandwidth needs
511 *
512 * It keeps track of various data needed to take powermanagement decision.
513 * Bandwith need is used to determine minimun clock of the GPU and memory.
514 * Equation between gpu/memory clock and available bandwidth is hw dependent
515 * (type of memory, bus size, efficiency, ...)
516 */
517struct radeon_pm {
518 fixed20_12 max_bandwidth;
519 fixed20_12 igp_sideport_mclk;
520 fixed20_12 igp_system_mclk;
521 fixed20_12 igp_ht_link_clk;
522 fixed20_12 igp_ht_link_width;
523 fixed20_12 k8_bandwidth;
524 fixed20_12 sideport_bandwidth;
525 fixed20_12 ht_bandwidth;
526 fixed20_12 core_bandwidth;
527 fixed20_12 sclk;
528 fixed20_12 needed_bandwidth;
529};
530
477 531
478/* 532/*
479 * Benchmarking 533 * Benchmarking
@@ -482,6 +536,12 @@ void radeon_benchmark(struct radeon_device *rdev);
482 536
483 537
484/* 538/*
539 * Testing
540 */
541void radeon_test_moves(struct radeon_device *rdev);
542
543
544/*
485 * Debugfs 545 * Debugfs
486 */ 546 */
487int radeon_debugfs_add_files(struct radeon_device *rdev, 547int radeon_debugfs_add_files(struct radeon_device *rdev,
@@ -535,6 +595,11 @@ struct radeon_asic {
535 void (*set_memory_clock)(struct radeon_device *rdev, uint32_t mem_clock); 595 void (*set_memory_clock)(struct radeon_device *rdev, uint32_t mem_clock);
536 void (*set_pcie_lanes)(struct radeon_device *rdev, int lanes); 596 void (*set_pcie_lanes)(struct radeon_device *rdev, int lanes);
537 void (*set_clock_gating)(struct radeon_device *rdev, int enable); 597 void (*set_clock_gating)(struct radeon_device *rdev, int enable);
598 int (*set_surface_reg)(struct radeon_device *rdev, int reg,
599 uint32_t tiling_flags, uint32_t pitch,
600 uint32_t offset, uint32_t obj_size);
601 int (*clear_surface_reg)(struct radeon_device *rdev, int reg);
602 void (*bandwidth_update)(struct radeon_device *rdev);
538}; 603};
539 604
540union radeon_asic_config { 605union radeon_asic_config {
@@ -566,6 +631,10 @@ int radeon_gem_busy_ioctl(struct drm_device *dev, void *data,
566int radeon_gem_wait_idle_ioctl(struct drm_device *dev, void *data, 631int radeon_gem_wait_idle_ioctl(struct drm_device *dev, void *data,
567 struct drm_file *filp); 632 struct drm_file *filp);
568int radeon_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp); 633int radeon_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp);
634int radeon_gem_set_tiling_ioctl(struct drm_device *dev, void *data,
635 struct drm_file *filp);
636int radeon_gem_get_tiling_ioctl(struct drm_device *dev, void *data,
637 struct drm_file *filp);
569 638
570 639
571/* 640/*
@@ -594,8 +663,8 @@ struct radeon_device {
594 struct radeon_object *fbdev_robj; 663 struct radeon_object *fbdev_robj;
595 struct radeon_framebuffer *fbdev_rfb; 664 struct radeon_framebuffer *fbdev_rfb;
596 /* Register mmio */ 665 /* Register mmio */
597 unsigned long rmmio_base; 666 resource_size_t rmmio_base;
598 unsigned long rmmio_size; 667 resource_size_t rmmio_size;
599 void *rmmio; 668 void *rmmio;
600 radeon_rreg_t mm_rreg; 669 radeon_rreg_t mm_rreg;
601 radeon_wreg_t mm_wreg; 670 radeon_wreg_t mm_wreg;
@@ -619,11 +688,14 @@ struct radeon_device {
619 struct radeon_irq irq; 688 struct radeon_irq irq;
620 struct radeon_asic *asic; 689 struct radeon_asic *asic;
621 struct radeon_gem gem; 690 struct radeon_gem gem;
691 struct radeon_pm pm;
622 struct mutex cs_mutex; 692 struct mutex cs_mutex;
623 struct radeon_wb wb; 693 struct radeon_wb wb;
624 bool gpu_lockup; 694 bool gpu_lockup;
625 bool shutdown; 695 bool shutdown;
626 bool suspend; 696 bool suspend;
697 bool need_dma32;
698 struct radeon_surface_reg surface_regs[RADEON_GEM_MAX_SURFACES];
627}; 699};
628 700
629int radeon_device_init(struct radeon_device *rdev, 701int radeon_device_init(struct radeon_device *rdev,
@@ -670,6 +742,8 @@ void r100_pll_errata_after_index(struct radeon_device *rdev);
670/* 742/*
671 * ASICs helpers. 743 * ASICs helpers.
672 */ 744 */
745#define ASIC_IS_RN50(rdev) ((rdev->pdev->device == 0x515e) || \
746 (rdev->pdev->device == 0x5969))
673#define ASIC_IS_RV100(rdev) ((rdev->family == CHIP_RV100) || \ 747#define ASIC_IS_RV100(rdev) ((rdev->family == CHIP_RV100) || \
674 (rdev->family == CHIP_RV200) || \ 748 (rdev->family == CHIP_RV200) || \
675 (rdev->family == CHIP_RS100) || \ 749 (rdev->family == CHIP_RS100) || \
@@ -796,5 +870,8 @@ static inline void radeon_ring_write(struct radeon_device *rdev, uint32_t v)
796#define radeon_set_memory_clock(rdev, e) (rdev)->asic->set_engine_clock((rdev), (e)) 870#define radeon_set_memory_clock(rdev, e) (rdev)->asic->set_engine_clock((rdev), (e))
797#define radeon_set_pcie_lanes(rdev, l) (rdev)->asic->set_pcie_lanes((rdev), (l)) 871#define radeon_set_pcie_lanes(rdev, l) (rdev)->asic->set_pcie_lanes((rdev), (l))
798#define radeon_set_clock_gating(rdev, e) (rdev)->asic->set_clock_gating((rdev), (e)) 872#define radeon_set_clock_gating(rdev, e) (rdev)->asic->set_clock_gating((rdev), (e))
873#define radeon_set_surface_reg(rdev, r, f, p, o, s) ((rdev)->asic->set_surface_reg((rdev), (r), (f), (p), (o), (s)))
874#define radeon_clear_surface_reg(rdev, r) ((rdev)->asic->clear_surface_reg((rdev), (r)))
875#define radeon_bandwidth_update(rdev) (rdev)->asic->bandwidth_update((rdev))
799 876
800#endif 877#endif
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
index e2e567395df..9a75876e0c3 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.h
+++ b/drivers/gpu/drm/radeon/radeon_asic.h
@@ -71,6 +71,11 @@ int r100_copy_blit(struct radeon_device *rdev,
71 uint64_t dst_offset, 71 uint64_t dst_offset,
72 unsigned num_pages, 72 unsigned num_pages,
73 struct radeon_fence *fence); 73 struct radeon_fence *fence);
74int r100_set_surface_reg(struct radeon_device *rdev, int reg,
75 uint32_t tiling_flags, uint32_t pitch,
76 uint32_t offset, uint32_t obj_size);
77int r100_clear_surface_reg(struct radeon_device *rdev, int reg);
78void r100_bandwidth_update(struct radeon_device *rdev);
74 79
75static struct radeon_asic r100_asic = { 80static struct radeon_asic r100_asic = {
76 .init = &r100_init, 81 .init = &r100_init,
@@ -100,6 +105,9 @@ static struct radeon_asic r100_asic = {
100 .set_memory_clock = NULL, 105 .set_memory_clock = NULL,
101 .set_pcie_lanes = NULL, 106 .set_pcie_lanes = NULL,
102 .set_clock_gating = &radeon_legacy_set_clock_gating, 107 .set_clock_gating = &radeon_legacy_set_clock_gating,
108 .set_surface_reg = r100_set_surface_reg,
109 .clear_surface_reg = r100_clear_surface_reg,
110 .bandwidth_update = &r100_bandwidth_update,
103}; 111};
104 112
105 113
@@ -128,6 +136,7 @@ int r300_copy_dma(struct radeon_device *rdev,
128 uint64_t dst_offset, 136 uint64_t dst_offset,
129 unsigned num_pages, 137 unsigned num_pages,
130 struct radeon_fence *fence); 138 struct radeon_fence *fence);
139
131static struct radeon_asic r300_asic = { 140static struct radeon_asic r300_asic = {
132 .init = &r300_init, 141 .init = &r300_init,
133 .errata = &r300_errata, 142 .errata = &r300_errata,
@@ -156,6 +165,9 @@ static struct radeon_asic r300_asic = {
156 .set_memory_clock = NULL, 165 .set_memory_clock = NULL,
157 .set_pcie_lanes = &rv370_set_pcie_lanes, 166 .set_pcie_lanes = &rv370_set_pcie_lanes,
158 .set_clock_gating = &radeon_legacy_set_clock_gating, 167 .set_clock_gating = &radeon_legacy_set_clock_gating,
168 .set_surface_reg = r100_set_surface_reg,
169 .clear_surface_reg = r100_clear_surface_reg,
170 .bandwidth_update = &r100_bandwidth_update,
159}; 171};
160 172
161/* 173/*
@@ -193,6 +205,9 @@ static struct radeon_asic r420_asic = {
193 .set_memory_clock = &radeon_atom_set_memory_clock, 205 .set_memory_clock = &radeon_atom_set_memory_clock,
194 .set_pcie_lanes = &rv370_set_pcie_lanes, 206 .set_pcie_lanes = &rv370_set_pcie_lanes,
195 .set_clock_gating = &radeon_atom_set_clock_gating, 207 .set_clock_gating = &radeon_atom_set_clock_gating,
208 .set_surface_reg = r100_set_surface_reg,
209 .clear_surface_reg = r100_clear_surface_reg,
210 .bandwidth_update = &r100_bandwidth_update,
196}; 211};
197 212
198 213
@@ -237,6 +252,9 @@ static struct radeon_asic rs400_asic = {
237 .set_memory_clock = NULL, 252 .set_memory_clock = NULL,
238 .set_pcie_lanes = NULL, 253 .set_pcie_lanes = NULL,
239 .set_clock_gating = &radeon_legacy_set_clock_gating, 254 .set_clock_gating = &radeon_legacy_set_clock_gating,
255 .set_surface_reg = r100_set_surface_reg,
256 .clear_surface_reg = r100_clear_surface_reg,
257 .bandwidth_update = &r100_bandwidth_update,
240}; 258};
241 259
242 260
@@ -254,6 +272,7 @@ void rs600_gart_tlb_flush(struct radeon_device *rdev);
254int rs600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); 272int rs600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
255uint32_t rs600_mc_rreg(struct radeon_device *rdev, uint32_t reg); 273uint32_t rs600_mc_rreg(struct radeon_device *rdev, uint32_t reg);
256void rs600_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); 274void rs600_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
275void rs600_bandwidth_update(struct radeon_device *rdev);
257static struct radeon_asic rs600_asic = { 276static struct radeon_asic rs600_asic = {
258 .init = &r300_init, 277 .init = &r300_init,
259 .errata = &rs600_errata, 278 .errata = &rs600_errata,
@@ -282,6 +301,7 @@ static struct radeon_asic rs600_asic = {
282 .set_memory_clock = &radeon_atom_set_memory_clock, 301 .set_memory_clock = &radeon_atom_set_memory_clock,
283 .set_pcie_lanes = NULL, 302 .set_pcie_lanes = NULL,
284 .set_clock_gating = &radeon_atom_set_clock_gating, 303 .set_clock_gating = &radeon_atom_set_clock_gating,
304 .bandwidth_update = &rs600_bandwidth_update,
285}; 305};
286 306
287 307
@@ -294,6 +314,7 @@ int rs690_mc_init(struct radeon_device *rdev);
294void rs690_mc_fini(struct radeon_device *rdev); 314void rs690_mc_fini(struct radeon_device *rdev);
295uint32_t rs690_mc_rreg(struct radeon_device *rdev, uint32_t reg); 315uint32_t rs690_mc_rreg(struct radeon_device *rdev, uint32_t reg);
296void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); 316void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
317void rs690_bandwidth_update(struct radeon_device *rdev);
297static struct radeon_asic rs690_asic = { 318static struct radeon_asic rs690_asic = {
298 .init = &r300_init, 319 .init = &r300_init,
299 .errata = &rs690_errata, 320 .errata = &rs690_errata,
@@ -322,6 +343,9 @@ static struct radeon_asic rs690_asic = {
322 .set_memory_clock = &radeon_atom_set_memory_clock, 343 .set_memory_clock = &radeon_atom_set_memory_clock,
323 .set_pcie_lanes = NULL, 344 .set_pcie_lanes = NULL,
324 .set_clock_gating = &radeon_atom_set_clock_gating, 345 .set_clock_gating = &radeon_atom_set_clock_gating,
346 .set_surface_reg = r100_set_surface_reg,
347 .clear_surface_reg = r100_clear_surface_reg,
348 .bandwidth_update = &rs690_bandwidth_update,
325}; 349};
326 350
327 351
@@ -339,6 +363,7 @@ void rv515_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
339void rv515_ring_start(struct radeon_device *rdev); 363void rv515_ring_start(struct radeon_device *rdev);
340uint32_t rv515_pcie_rreg(struct radeon_device *rdev, uint32_t reg); 364uint32_t rv515_pcie_rreg(struct radeon_device *rdev, uint32_t reg);
341void rv515_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); 365void rv515_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
366void rv515_bandwidth_update(struct radeon_device *rdev);
342static struct radeon_asic rv515_asic = { 367static struct radeon_asic rv515_asic = {
343 .init = &rv515_init, 368 .init = &rv515_init,
344 .errata = &rv515_errata, 369 .errata = &rv515_errata,
@@ -367,6 +392,9 @@ static struct radeon_asic rv515_asic = {
367 .set_memory_clock = &radeon_atom_set_memory_clock, 392 .set_memory_clock = &radeon_atom_set_memory_clock,
368 .set_pcie_lanes = &rv370_set_pcie_lanes, 393 .set_pcie_lanes = &rv370_set_pcie_lanes,
369 .set_clock_gating = &radeon_atom_set_clock_gating, 394 .set_clock_gating = &radeon_atom_set_clock_gating,
395 .set_surface_reg = r100_set_surface_reg,
396 .clear_surface_reg = r100_clear_surface_reg,
397 .bandwidth_update = &rv515_bandwidth_update,
370}; 398};
371 399
372 400
@@ -377,6 +405,7 @@ void r520_errata(struct radeon_device *rdev);
377void r520_vram_info(struct radeon_device *rdev); 405void r520_vram_info(struct radeon_device *rdev);
378int r520_mc_init(struct radeon_device *rdev); 406int r520_mc_init(struct radeon_device *rdev);
379void r520_mc_fini(struct radeon_device *rdev); 407void r520_mc_fini(struct radeon_device *rdev);
408void r520_bandwidth_update(struct radeon_device *rdev);
380static struct radeon_asic r520_asic = { 409static struct radeon_asic r520_asic = {
381 .init = &rv515_init, 410 .init = &rv515_init,
382 .errata = &r520_errata, 411 .errata = &r520_errata,
@@ -405,6 +434,9 @@ static struct radeon_asic r520_asic = {
405 .set_memory_clock = &radeon_atom_set_memory_clock, 434 .set_memory_clock = &radeon_atom_set_memory_clock,
406 .set_pcie_lanes = &rv370_set_pcie_lanes, 435 .set_pcie_lanes = &rv370_set_pcie_lanes,
407 .set_clock_gating = &radeon_atom_set_clock_gating, 436 .set_clock_gating = &radeon_atom_set_clock_gating,
437 .set_surface_reg = r100_set_surface_reg,
438 .clear_surface_reg = r100_clear_surface_reg,
439 .bandwidth_update = &r520_bandwidth_update,
408}; 440};
409 441
410/* 442/*
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 1f5a1a49098..fcfe5c02d74 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -103,7 +103,8 @@ static inline struct radeon_i2c_bus_rec radeon_lookup_gpio(struct drm_device
103static bool radeon_atom_apply_quirks(struct drm_device *dev, 103static bool radeon_atom_apply_quirks(struct drm_device *dev,
104 uint32_t supported_device, 104 uint32_t supported_device,
105 int *connector_type, 105 int *connector_type,
106 struct radeon_i2c_bus_rec *i2c_bus) 106 struct radeon_i2c_bus_rec *i2c_bus,
107 uint8_t *line_mux)
107{ 108{
108 109
109 /* Asus M2A-VM HDMI board lists the DVI port as HDMI */ 110 /* Asus M2A-VM HDMI board lists the DVI port as HDMI */
@@ -127,8 +128,10 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev,
127 if ((dev->pdev->device == 0x5653) && 128 if ((dev->pdev->device == 0x5653) &&
128 (dev->pdev->subsystem_vendor == 0x1462) && 129 (dev->pdev->subsystem_vendor == 0x1462) &&
129 (dev->pdev->subsystem_device == 0x0291)) { 130 (dev->pdev->subsystem_device == 0x0291)) {
130 if (*connector_type == DRM_MODE_CONNECTOR_LVDS) 131 if (*connector_type == DRM_MODE_CONNECTOR_LVDS) {
131 i2c_bus->valid = false; 132 i2c_bus->valid = false;
133 *line_mux = 53;
134 }
132 } 135 }
133 136
134 /* Funky macbooks */ 137 /* Funky macbooks */
@@ -526,7 +529,7 @@ bool radeon_get_atom_connector_info_from_supported_devices_table(struct
526 529
527 if (!radeon_atom_apply_quirks 530 if (!radeon_atom_apply_quirks
528 (dev, (1 << i), &bios_connectors[i].connector_type, 531 (dev, (1 << i), &bios_connectors[i].connector_type,
529 &bios_connectors[i].ddc_bus)) 532 &bios_connectors[i].ddc_bus, &bios_connectors[i].line_mux))
530 continue; 533 continue;
531 534
532 bios_connectors[i].valid = true; 535 bios_connectors[i].valid = true;
diff --git a/drivers/gpu/drm/radeon/radeon_benchmark.c b/drivers/gpu/drm/radeon/radeon_benchmark.c
index c44403a2ca7..2e938f7496f 100644
--- a/drivers/gpu/drm/radeon/radeon_benchmark.c
+++ b/drivers/gpu/drm/radeon/radeon_benchmark.c
@@ -63,7 +63,7 @@ void radeon_benchmark_move(struct radeon_device *rdev, unsigned bsize,
63 if (r) { 63 if (r) {
64 goto out_cleanup; 64 goto out_cleanup;
65 } 65 }
66 r = radeon_copy_dma(rdev, saddr, daddr, size >> 14, fence); 66 r = radeon_copy_dma(rdev, saddr, daddr, size / 4096, fence);
67 if (r) { 67 if (r) {
68 goto out_cleanup; 68 goto out_cleanup;
69 } 69 }
@@ -88,7 +88,7 @@ void radeon_benchmark_move(struct radeon_device *rdev, unsigned bsize,
88 if (r) { 88 if (r) {
89 goto out_cleanup; 89 goto out_cleanup;
90 } 90 }
91 r = radeon_copy_blit(rdev, saddr, daddr, size >> 14, fence); 91 r = radeon_copy_blit(rdev, saddr, daddr, size / 4096, fence);
92 if (r) { 92 if (r) {
93 goto out_cleanup; 93 goto out_cleanup;
94 } 94 }
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index b843f9bdfb1..a169067efc4 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -127,17 +127,23 @@ int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data)
127 sizeof(struct drm_radeon_cs_chunk))) { 127 sizeof(struct drm_radeon_cs_chunk))) {
128 return -EFAULT; 128 return -EFAULT;
129 } 129 }
130 p->chunks[i].length_dw = user_chunk.length_dw;
131 p->chunks[i].kdata = NULL;
130 p->chunks[i].chunk_id = user_chunk.chunk_id; 132 p->chunks[i].chunk_id = user_chunk.chunk_id;
133
131 if (p->chunks[i].chunk_id == RADEON_CHUNK_ID_RELOCS) { 134 if (p->chunks[i].chunk_id == RADEON_CHUNK_ID_RELOCS) {
132 p->chunk_relocs_idx = i; 135 p->chunk_relocs_idx = i;
133 } 136 }
134 if (p->chunks[i].chunk_id == RADEON_CHUNK_ID_IB) { 137 if (p->chunks[i].chunk_id == RADEON_CHUNK_ID_IB) {
135 p->chunk_ib_idx = i; 138 p->chunk_ib_idx = i;
139 /* zero length IB isn't useful */
140 if (p->chunks[i].length_dw == 0)
141 return -EINVAL;
136 } 142 }
143
137 p->chunks[i].length_dw = user_chunk.length_dw; 144 p->chunks[i].length_dw = user_chunk.length_dw;
138 cdata = (uint32_t *)(unsigned long)user_chunk.chunk_data; 145 cdata = (uint32_t *)(unsigned long)user_chunk.chunk_data;
139 146
140 p->chunks[i].kdata = NULL;
141 size = p->chunks[i].length_dw * sizeof(uint32_t); 147 size = p->chunks[i].length_dw * sizeof(uint32_t);
142 p->chunks[i].kdata = kzalloc(size, GFP_KERNEL); 148 p->chunks[i].kdata = kzalloc(size, GFP_KERNEL);
143 if (p->chunks[i].kdata == NULL) { 149 if (p->chunks[i].kdata == NULL) {
diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c
index 5232441f119..b13c79e38bc 100644
--- a/drivers/gpu/drm/radeon/radeon_cursor.c
+++ b/drivers/gpu/drm/radeon/radeon_cursor.c
@@ -111,9 +111,11 @@ static void radeon_set_cursor(struct drm_crtc *crtc, struct drm_gem_object *obj,
111 111
112 if (ASIC_IS_AVIVO(rdev)) 112 if (ASIC_IS_AVIVO(rdev))
113 WREG32(AVIVO_D1CUR_SURFACE_ADDRESS + radeon_crtc->crtc_offset, gpu_addr); 113 WREG32(AVIVO_D1CUR_SURFACE_ADDRESS + radeon_crtc->crtc_offset, gpu_addr);
114 else 114 else {
115 radeon_crtc->legacy_cursor_offset = gpu_addr - radeon_crtc->legacy_display_base_addr;
115 /* offset is from DISP(2)_BASE_ADDRESS */ 116 /* offset is from DISP(2)_BASE_ADDRESS */
116 WREG32(RADEON_CUR_OFFSET + radeon_crtc->crtc_offset, gpu_addr); 117 WREG32(RADEON_CUR_OFFSET + radeon_crtc->crtc_offset, radeon_crtc->legacy_cursor_offset);
118 }
117} 119}
118 120
119int radeon_crtc_cursor_set(struct drm_crtc *crtc, 121int radeon_crtc_cursor_set(struct drm_crtc *crtc,
@@ -245,6 +247,9 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc,
245 (RADEON_CUR_LOCK 247 (RADEON_CUR_LOCK
246 | ((xorigin ? 0 : x) << 16) 248 | ((xorigin ? 0 : x) << 16)
247 | (yorigin ? 0 : y))); 249 | (yorigin ? 0 : y)));
250 /* offset is from DISP(2)_BASE_ADDRESS */
251 WREG32(RADEON_CUR_OFFSET + radeon_crtc->crtc_offset, (radeon_crtc->legacy_cursor_offset +
252 (yorigin * 256)));
248 } 253 }
249 radeon_lock_cursor(crtc, false); 254 radeon_lock_cursor(crtc, false);
250 255
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index f97563db4e5..9ff6dcb97f9 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -48,6 +48,8 @@ static void radeon_surface_init(struct radeon_device *rdev)
48 i * (RADEON_SURFACE1_INFO - RADEON_SURFACE0_INFO), 48 i * (RADEON_SURFACE1_INFO - RADEON_SURFACE0_INFO),
49 0); 49 0);
50 } 50 }
51 /* enable surfaces */
52 WREG32(RADEON_SURFACE_CNTL, 0);
51 } 53 }
52} 54}
53 55
@@ -119,7 +121,7 @@ int radeon_mc_setup(struct radeon_device *rdev)
119 if (rdev->mc.vram_location != 0xFFFFFFFFUL) { 121 if (rdev->mc.vram_location != 0xFFFFFFFFUL) {
120 /* vram location was already setup try to put gtt after 122 /* vram location was already setup try to put gtt after
121 * if it fits */ 123 * if it fits */
122 tmp = rdev->mc.vram_location + rdev->mc.vram_size; 124 tmp = rdev->mc.vram_location + rdev->mc.mc_vram_size;
123 tmp = (tmp + rdev->mc.gtt_size - 1) & ~(rdev->mc.gtt_size - 1); 125 tmp = (tmp + rdev->mc.gtt_size - 1) & ~(rdev->mc.gtt_size - 1);
124 if ((0xFFFFFFFFUL - tmp) >= rdev->mc.gtt_size) { 126 if ((0xFFFFFFFFUL - tmp) >= rdev->mc.gtt_size) {
125 rdev->mc.gtt_location = tmp; 127 rdev->mc.gtt_location = tmp;
@@ -134,13 +136,13 @@ int radeon_mc_setup(struct radeon_device *rdev)
134 } else if (rdev->mc.gtt_location != 0xFFFFFFFFUL) { 136 } else if (rdev->mc.gtt_location != 0xFFFFFFFFUL) {
135 /* gtt location was already setup try to put vram before 137 /* gtt location was already setup try to put vram before
136 * if it fits */ 138 * if it fits */
137 if (rdev->mc.vram_size < rdev->mc.gtt_location) { 139 if (rdev->mc.mc_vram_size < rdev->mc.gtt_location) {
138 rdev->mc.vram_location = 0; 140 rdev->mc.vram_location = 0;
139 } else { 141 } else {
140 tmp = rdev->mc.gtt_location + rdev->mc.gtt_size; 142 tmp = rdev->mc.gtt_location + rdev->mc.gtt_size;
141 tmp += (rdev->mc.vram_size - 1); 143 tmp += (rdev->mc.mc_vram_size - 1);
142 tmp &= ~(rdev->mc.vram_size - 1); 144 tmp &= ~(rdev->mc.mc_vram_size - 1);
143 if ((0xFFFFFFFFUL - tmp) >= rdev->mc.vram_size) { 145 if ((0xFFFFFFFFUL - tmp) >= rdev->mc.mc_vram_size) {
144 rdev->mc.vram_location = tmp; 146 rdev->mc.vram_location = tmp;
145 } else { 147 } else {
146 printk(KERN_ERR "[drm] vram too big to fit " 148 printk(KERN_ERR "[drm] vram too big to fit "
@@ -150,12 +152,16 @@ int radeon_mc_setup(struct radeon_device *rdev)
150 } 152 }
151 } else { 153 } else {
152 rdev->mc.vram_location = 0; 154 rdev->mc.vram_location = 0;
153 rdev->mc.gtt_location = rdev->mc.vram_size; 155 tmp = rdev->mc.mc_vram_size;
156 tmp = (tmp + rdev->mc.gtt_size - 1) & ~(rdev->mc.gtt_size - 1);
157 rdev->mc.gtt_location = tmp;
154 } 158 }
155 DRM_INFO("radeon: VRAM %uM\n", rdev->mc.vram_size >> 20); 159 DRM_INFO("radeon: VRAM %uM\n", rdev->mc.real_vram_size >> 20);
156 DRM_INFO("radeon: VRAM from 0x%08X to 0x%08X\n", 160 DRM_INFO("radeon: VRAM from 0x%08X to 0x%08X\n",
157 rdev->mc.vram_location, 161 rdev->mc.vram_location,
158 rdev->mc.vram_location + rdev->mc.vram_size - 1); 162 rdev->mc.vram_location + rdev->mc.mc_vram_size - 1);
163 if (rdev->mc.real_vram_size != rdev->mc.mc_vram_size)
164 DRM_INFO("radeon: VRAM less than aperture workaround enabled\n");
159 DRM_INFO("radeon: GTT %uM\n", rdev->mc.gtt_size >> 20); 165 DRM_INFO("radeon: GTT %uM\n", rdev->mc.gtt_size >> 20);
160 DRM_INFO("radeon: GTT from 0x%08X to 0x%08X\n", 166 DRM_INFO("radeon: GTT from 0x%08X to 0x%08X\n",
161 rdev->mc.gtt_location, 167 rdev->mc.gtt_location,
@@ -450,6 +456,7 @@ int radeon_device_init(struct radeon_device *rdev,
450 uint32_t flags) 456 uint32_t flags)
451{ 457{
452 int r, ret; 458 int r, ret;
459 int dma_bits;
453 460
454 DRM_INFO("radeon: Initializing kernel modesetting.\n"); 461 DRM_INFO("radeon: Initializing kernel modesetting.\n");
455 rdev->shutdown = false; 462 rdev->shutdown = false;
@@ -492,8 +499,20 @@ int radeon_device_init(struct radeon_device *rdev,
492 return r; 499 return r;
493 } 500 }
494 501
495 /* Report DMA addressing limitation */ 502 /* set DMA mask + need_dma32 flags.
496 r = pci_set_dma_mask(rdev->pdev, DMA_BIT_MASK(32)); 503 * PCIE - can handle 40-bits.
504 * IGP - can handle 40-bits (in theory)
505 * AGP - generally dma32 is safest
506 * PCI - only dma32
507 */
508 rdev->need_dma32 = false;
509 if (rdev->flags & RADEON_IS_AGP)
510 rdev->need_dma32 = true;
511 if (rdev->flags & RADEON_IS_PCI)
512 rdev->need_dma32 = true;
513
514 dma_bits = rdev->need_dma32 ? 32 : 40;
515 r = pci_set_dma_mask(rdev->pdev, DMA_BIT_MASK(dma_bits));
497 if (r) { 516 if (r) {
498 printk(KERN_WARNING "radeon: No suitable DMA available.\n"); 517 printk(KERN_WARNING "radeon: No suitable DMA available.\n");
499 } 518 }
@@ -546,27 +565,22 @@ int radeon_device_init(struct radeon_device *rdev,
546 radeon_combios_asic_init(rdev->ddev); 565 radeon_combios_asic_init(rdev->ddev);
547 } 566 }
548 } 567 }
568 /* Initialize clocks */
569 r = radeon_clocks_init(rdev);
570 if (r) {
571 return r;
572 }
549 /* Get vram informations */ 573 /* Get vram informations */
550 radeon_vram_info(rdev); 574 radeon_vram_info(rdev);
551 /* Device is severly broken if aper size > vram size. 575
552 * for RN50/M6/M7 - Novell bug 204882 ?
553 */
554 if (rdev->mc.vram_size < rdev->mc.aper_size) {
555 rdev->mc.aper_size = rdev->mc.vram_size;
556 }
557 /* Add an MTRR for the VRAM */ 576 /* Add an MTRR for the VRAM */
558 rdev->mc.vram_mtrr = mtrr_add(rdev->mc.aper_base, rdev->mc.aper_size, 577 rdev->mc.vram_mtrr = mtrr_add(rdev->mc.aper_base, rdev->mc.aper_size,
559 MTRR_TYPE_WRCOMB, 1); 578 MTRR_TYPE_WRCOMB, 1);
560 DRM_INFO("Detected VRAM RAM=%uM, BAR=%uM\n", 579 DRM_INFO("Detected VRAM RAM=%uM, BAR=%uM\n",
561 rdev->mc.vram_size >> 20, 580 rdev->mc.real_vram_size >> 20,
562 (unsigned)rdev->mc.aper_size >> 20); 581 (unsigned)rdev->mc.aper_size >> 20);
563 DRM_INFO("RAM width %dbits %cDR\n", 582 DRM_INFO("RAM width %dbits %cDR\n",
564 rdev->mc.vram_width, rdev->mc.vram_is_ddr ? 'D' : 'S'); 583 rdev->mc.vram_width, rdev->mc.vram_is_ddr ? 'D' : 'S');
565 /* Initialize clocks */
566 r = radeon_clocks_init(rdev);
567 if (r) {
568 return r;
569 }
570 /* Initialize memory controller (also test AGP) */ 584 /* Initialize memory controller (also test AGP) */
571 r = radeon_mc_init(rdev); 585 r = radeon_mc_init(rdev);
572 if (r) { 586 if (r) {
@@ -626,6 +640,9 @@ int radeon_device_init(struct radeon_device *rdev,
626 if (!ret) { 640 if (!ret) {
627 DRM_INFO("radeon: kernel modesetting successfully initialized.\n"); 641 DRM_INFO("radeon: kernel modesetting successfully initialized.\n");
628 } 642 }
643 if (radeon_testing) {
644 radeon_test_moves(rdev);
645 }
629 if (radeon_benchmarking) { 646 if (radeon_benchmarking) {
630 radeon_benchmark(rdev); 647 radeon_benchmark(rdev);
631 } 648 }
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 3efcf1a526b..a8fa1bb84cf 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -187,6 +187,7 @@ static void radeon_crtc_init(struct drm_device *dev, int index)
187 187
188 drm_mode_crtc_set_gamma_size(&radeon_crtc->base, 256); 188 drm_mode_crtc_set_gamma_size(&radeon_crtc->base, 256);
189 radeon_crtc->crtc_id = index; 189 radeon_crtc->crtc_id = index;
190 rdev->mode_info.crtcs[index] = radeon_crtc;
190 191
191 radeon_crtc->mode_set.crtc = &radeon_crtc->base; 192 radeon_crtc->mode_set.crtc = &radeon_crtc->base;
192 radeon_crtc->mode_set.connectors = (struct drm_connector **)(radeon_crtc + 1); 193 radeon_crtc->mode_set.connectors = (struct drm_connector **)(radeon_crtc + 1);
@@ -491,7 +492,11 @@ void radeon_compute_pll(struct radeon_pll *pll,
491 tmp += (uint64_t)pll->reference_freq * 1000 * frac_feedback_div; 492 tmp += (uint64_t)pll->reference_freq * 1000 * frac_feedback_div;
492 current_freq = radeon_div(tmp, ref_div * post_div); 493 current_freq = radeon_div(tmp, ref_div * post_div);
493 494
494 error = abs(current_freq - freq); 495 if (flags & RADEON_PLL_PREFER_CLOSEST_LOWER) {
496 error = freq - current_freq;
497 error = error < 0 ? 0xffffffff : error;
498 } else
499 error = abs(current_freq - freq);
495 vco_diff = abs(vco - best_vco); 500 vco_diff = abs(vco - best_vco);
496 501
497 if ((best_vco == 0 && error < best_error) || 502 if ((best_vco == 0 && error < best_error) ||
@@ -657,36 +662,51 @@ void radeon_modeset_fini(struct radeon_device *rdev)
657 } 662 }
658} 663}
659 664
660void radeon_init_disp_bandwidth(struct drm_device *dev) 665bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
666 struct drm_display_mode *mode,
667 struct drm_display_mode *adjusted_mode)
661{ 668{
662 struct radeon_device *rdev = dev->dev_private; 669 struct drm_device *dev = crtc->dev;
663 struct drm_display_mode *modes[2]; 670 struct drm_encoder *encoder;
664 int pixel_bytes[2]; 671 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
665 struct drm_crtc *crtc; 672 struct radeon_encoder *radeon_encoder;
666 673 bool first = true;
667 pixel_bytes[0] = pixel_bytes[1] = 0;
668 modes[0] = modes[1] = NULL;
669
670 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
671 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
672 674
673 if (crtc->enabled && crtc->fb) { 675 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
674 modes[radeon_crtc->crtc_id] = &crtc->mode; 676 radeon_encoder = to_radeon_encoder(encoder);
675 pixel_bytes[radeon_crtc->crtc_id] = crtc->fb->bits_per_pixel / 8; 677 if (encoder->crtc != crtc)
678 continue;
679 if (first) {
680 radeon_crtc->rmx_type = radeon_encoder->rmx_type;
681 radeon_crtc->devices = radeon_encoder->devices;
682 memcpy(&radeon_crtc->native_mode,
683 &radeon_encoder->native_mode,
684 sizeof(struct radeon_native_mode));
685 first = false;
686 } else {
687 if (radeon_crtc->rmx_type != radeon_encoder->rmx_type) {
688 /* WARNING: Right now this can't happen but
689 * in the future we need to check that scaling
690 * are consistent accross different encoder
691 * (ie all encoder can work with the same
692 * scaling).
693 */
694 DRM_ERROR("Scaling not consistent accross encoder.\n");
695 return false;
696 }
676 } 697 }
677 } 698 }
678 699 if (radeon_crtc->rmx_type != RMX_OFF) {
679 if (ASIC_IS_AVIVO(rdev)) { 700 fixed20_12 a, b;
680 radeon_init_disp_bw_avivo(dev, 701 a.full = rfixed_const(crtc->mode.vdisplay);
681 modes[0], 702 b.full = rfixed_const(radeon_crtc->native_mode.panel_xres);
682 pixel_bytes[0], 703 radeon_crtc->vsc.full = rfixed_div(a, b);
683 modes[1], 704 a.full = rfixed_const(crtc->mode.hdisplay);
684 pixel_bytes[1]); 705 b.full = rfixed_const(radeon_crtc->native_mode.panel_yres);
706 radeon_crtc->hsc.full = rfixed_div(a, b);
685 } else { 707 } else {
686 radeon_init_disp_bw_legacy(dev, 708 radeon_crtc->vsc.full = rfixed_const(1);
687 modes[0], 709 radeon_crtc->hsc.full = rfixed_const(1);
688 pixel_bytes[0],
689 modes[1],
690 pixel_bytes[1]);
691 } 710 }
711 return true;
692} 712}
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 84ba69f4878..0bd5879a495 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -89,6 +89,7 @@ int radeon_agpmode = 0;
89int radeon_vram_limit = 0; 89int radeon_vram_limit = 0;
90int radeon_gart_size = 512; /* default gart size */ 90int radeon_gart_size = 512; /* default gart size */
91int radeon_benchmarking = 0; 91int radeon_benchmarking = 0;
92int radeon_testing = 0;
92int radeon_connector_table = 0; 93int radeon_connector_table = 0;
93#endif 94#endif
94 95
@@ -117,6 +118,9 @@ module_param_named(gartsize, radeon_gart_size, int, 0600);
117MODULE_PARM_DESC(benchmark, "Run benchmark"); 118MODULE_PARM_DESC(benchmark, "Run benchmark");
118module_param_named(benchmark, radeon_benchmarking, int, 0444); 119module_param_named(benchmark, radeon_benchmarking, int, 0444);
119 120
121MODULE_PARM_DESC(test, "Run tests");
122module_param_named(test, radeon_testing, int, 0444);
123
120MODULE_PARM_DESC(connector_table, "Force connector table"); 124MODULE_PARM_DESC(connector_table, "Force connector table");
121module_param_named(connector_table, radeon_connector_table, int, 0444); 125module_param_named(connector_table, radeon_connector_table, int, 0444);
122#endif 126#endif
@@ -314,6 +318,14 @@ static int __init radeon_init(void)
314 driver = &driver_old; 318 driver = &driver_old;
315 driver->num_ioctls = radeon_max_ioctl; 319 driver->num_ioctls = radeon_max_ioctl;
316#if defined(CONFIG_DRM_RADEON_KMS) 320#if defined(CONFIG_DRM_RADEON_KMS)
321#ifdef CONFIG_VGA_CONSOLE
322 if (vgacon_text_force() && radeon_modeset == -1) {
323 DRM_INFO("VGACON disable radeon kernel modesetting.\n");
324 driver = &driver_old;
325 driver->driver_features &= ~DRIVER_MODESET;
326 radeon_modeset = 0;
327 }
328#endif
317 /* if enabled by default */ 329 /* if enabled by default */
318 if (radeon_modeset == -1) { 330 if (radeon_modeset == -1) {
319 DRM_INFO("radeon default to kernel modesetting.\n"); 331 DRM_INFO("radeon default to kernel modesetting.\n");
@@ -325,17 +337,8 @@ static int __init radeon_init(void)
325 driver->driver_features |= DRIVER_MODESET; 337 driver->driver_features |= DRIVER_MODESET;
326 driver->num_ioctls = radeon_max_kms_ioctl; 338 driver->num_ioctls = radeon_max_kms_ioctl;
327 } 339 }
328
329 /* if the vga console setting is enabled still 340 /* if the vga console setting is enabled still
330 * let modprobe override it */ 341 * let modprobe override it */
331#ifdef CONFIG_VGA_CONSOLE
332 if (vgacon_text_force() && radeon_modeset == -1) {
333 DRM_INFO("VGACON disable radeon kernel modesetting.\n");
334 driver = &driver_old;
335 driver->driver_features &= ~DRIVER_MODESET;
336 radeon_modeset = 0;
337 }
338#endif
339#endif 342#endif
340 return drm_init(driver); 343 return drm_init(driver);
341} 344}
diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h
index 127d0456f62..3933f8216a3 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.h
+++ b/drivers/gpu/drm/radeon/radeon_drv.h
@@ -143,6 +143,7 @@ enum radeon_family {
143 CHIP_RV635, 143 CHIP_RV635,
144 CHIP_RV670, 144 CHIP_RV670,
145 CHIP_RS780, 145 CHIP_RS780,
146 CHIP_RS880,
146 CHIP_RV770, 147 CHIP_RV770,
147 CHIP_RV730, 148 CHIP_RV730,
148 CHIP_RV710, 149 CHIP_RV710,
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
index c8ef0d14ffa..0a92706eac1 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -154,7 +154,6 @@ void radeon_rmx_mode_fixup(struct drm_encoder *encoder,
154 154
155 if (mode->hdisplay < native_mode->panel_xres || 155 if (mode->hdisplay < native_mode->panel_xres ||
156 mode->vdisplay < native_mode->panel_yres) { 156 mode->vdisplay < native_mode->panel_yres) {
157 radeon_encoder->flags |= RADEON_USE_RMX;
158 if (ASIC_IS_AVIVO(rdev)) { 157 if (ASIC_IS_AVIVO(rdev)) {
159 adjusted_mode->hdisplay = native_mode->panel_xres; 158 adjusted_mode->hdisplay = native_mode->panel_xres;
160 adjusted_mode->vdisplay = native_mode->panel_yres; 159 adjusted_mode->vdisplay = native_mode->panel_yres;
@@ -197,15 +196,13 @@ void radeon_rmx_mode_fixup(struct drm_encoder *encoder,
197 } 196 }
198} 197}
199 198
199
200static bool radeon_atom_mode_fixup(struct drm_encoder *encoder, 200static bool radeon_atom_mode_fixup(struct drm_encoder *encoder,
201 struct drm_display_mode *mode, 201 struct drm_display_mode *mode,
202 struct drm_display_mode *adjusted_mode) 202 struct drm_display_mode *adjusted_mode)
203{ 203{
204
205 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); 204 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
206 205
207 radeon_encoder->flags &= ~RADEON_USE_RMX;
208
209 drm_mode_set_crtcinfo(adjusted_mode, 0); 206 drm_mode_set_crtcinfo(adjusted_mode, 0);
210 207
211 if (radeon_encoder->rmx_type != RMX_OFF) 208 if (radeon_encoder->rmx_type != RMX_OFF)
@@ -808,234 +805,6 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action)
808 805
809} 806}
810 807
811static void atom_rv515_force_tv_scaler(struct radeon_device *rdev)
812{
813
814 WREG32(0x659C, 0x0);
815 WREG32(0x6594, 0x705);
816 WREG32(0x65A4, 0x10001);
817 WREG32(0x65D8, 0x0);
818 WREG32(0x65B0, 0x0);
819 WREG32(0x65C0, 0x0);
820 WREG32(0x65D4, 0x0);
821 WREG32(0x6578, 0x0);
822 WREG32(0x657C, 0x841880A8);
823 WREG32(0x6578, 0x1);
824 WREG32(0x657C, 0x84208680);
825 WREG32(0x6578, 0x2);
826 WREG32(0x657C, 0xBFF880B0);
827 WREG32(0x6578, 0x100);
828 WREG32(0x657C, 0x83D88088);
829 WREG32(0x6578, 0x101);
830 WREG32(0x657C, 0x84608680);
831 WREG32(0x6578, 0x102);
832 WREG32(0x657C, 0xBFF080D0);
833 WREG32(0x6578, 0x200);
834 WREG32(0x657C, 0x83988068);
835 WREG32(0x6578, 0x201);
836 WREG32(0x657C, 0x84A08680);
837 WREG32(0x6578, 0x202);
838 WREG32(0x657C, 0xBFF080F8);
839 WREG32(0x6578, 0x300);
840 WREG32(0x657C, 0x83588058);
841 WREG32(0x6578, 0x301);
842 WREG32(0x657C, 0x84E08660);
843 WREG32(0x6578, 0x302);
844 WREG32(0x657C, 0xBFF88120);
845 WREG32(0x6578, 0x400);
846 WREG32(0x657C, 0x83188040);
847 WREG32(0x6578, 0x401);
848 WREG32(0x657C, 0x85008660);
849 WREG32(0x6578, 0x402);
850 WREG32(0x657C, 0xBFF88150);
851 WREG32(0x6578, 0x500);
852 WREG32(0x657C, 0x82D88030);
853 WREG32(0x6578, 0x501);
854 WREG32(0x657C, 0x85408640);
855 WREG32(0x6578, 0x502);
856 WREG32(0x657C, 0xBFF88180);
857 WREG32(0x6578, 0x600);
858 WREG32(0x657C, 0x82A08018);
859 WREG32(0x6578, 0x601);
860 WREG32(0x657C, 0x85808620);
861 WREG32(0x6578, 0x602);
862 WREG32(0x657C, 0xBFF081B8);
863 WREG32(0x6578, 0x700);
864 WREG32(0x657C, 0x82608010);
865 WREG32(0x6578, 0x701);
866 WREG32(0x657C, 0x85A08600);
867 WREG32(0x6578, 0x702);
868 WREG32(0x657C, 0x800081F0);
869 WREG32(0x6578, 0x800);
870 WREG32(0x657C, 0x8228BFF8);
871 WREG32(0x6578, 0x801);
872 WREG32(0x657C, 0x85E085E0);
873 WREG32(0x6578, 0x802);
874 WREG32(0x657C, 0xBFF88228);
875 WREG32(0x6578, 0x10000);
876 WREG32(0x657C, 0x82A8BF00);
877 WREG32(0x6578, 0x10001);
878 WREG32(0x657C, 0x82A08CC0);
879 WREG32(0x6578, 0x10002);
880 WREG32(0x657C, 0x8008BEF8);
881 WREG32(0x6578, 0x10100);
882 WREG32(0x657C, 0x81F0BF28);
883 WREG32(0x6578, 0x10101);
884 WREG32(0x657C, 0x83608CA0);
885 WREG32(0x6578, 0x10102);
886 WREG32(0x657C, 0x8018BED0);
887 WREG32(0x6578, 0x10200);
888 WREG32(0x657C, 0x8148BF38);
889 WREG32(0x6578, 0x10201);
890 WREG32(0x657C, 0x84408C80);
891 WREG32(0x6578, 0x10202);
892 WREG32(0x657C, 0x8008BEB8);
893 WREG32(0x6578, 0x10300);
894 WREG32(0x657C, 0x80B0BF78);
895 WREG32(0x6578, 0x10301);
896 WREG32(0x657C, 0x85008C20);
897 WREG32(0x6578, 0x10302);
898 WREG32(0x657C, 0x8020BEA0);
899 WREG32(0x6578, 0x10400);
900 WREG32(0x657C, 0x8028BF90);
901 WREG32(0x6578, 0x10401);
902 WREG32(0x657C, 0x85E08BC0);
903 WREG32(0x6578, 0x10402);
904 WREG32(0x657C, 0x8018BE90);
905 WREG32(0x6578, 0x10500);
906 WREG32(0x657C, 0xBFB8BFB0);
907 WREG32(0x6578, 0x10501);
908 WREG32(0x657C, 0x86C08B40);
909 WREG32(0x6578, 0x10502);
910 WREG32(0x657C, 0x8010BE90);
911 WREG32(0x6578, 0x10600);
912 WREG32(0x657C, 0xBF58BFC8);
913 WREG32(0x6578, 0x10601);
914 WREG32(0x657C, 0x87A08AA0);
915 WREG32(0x6578, 0x10602);
916 WREG32(0x657C, 0x8010BE98);
917 WREG32(0x6578, 0x10700);
918 WREG32(0x657C, 0xBF10BFF0);
919 WREG32(0x6578, 0x10701);
920 WREG32(0x657C, 0x886089E0);
921 WREG32(0x6578, 0x10702);
922 WREG32(0x657C, 0x8018BEB0);
923 WREG32(0x6578, 0x10800);
924 WREG32(0x657C, 0xBED8BFE8);
925 WREG32(0x6578, 0x10801);
926 WREG32(0x657C, 0x89408940);
927 WREG32(0x6578, 0x10802);
928 WREG32(0x657C, 0xBFE8BED8);
929 WREG32(0x6578, 0x20000);
930 WREG32(0x657C, 0x80008000);
931 WREG32(0x6578, 0x20001);
932 WREG32(0x657C, 0x90008000);
933 WREG32(0x6578, 0x20002);
934 WREG32(0x657C, 0x80008000);
935 WREG32(0x6578, 0x20003);
936 WREG32(0x657C, 0x80008000);
937 WREG32(0x6578, 0x20100);
938 WREG32(0x657C, 0x80108000);
939 WREG32(0x6578, 0x20101);
940 WREG32(0x657C, 0x8FE0BF70);
941 WREG32(0x6578, 0x20102);
942 WREG32(0x657C, 0xBFE880C0);
943 WREG32(0x6578, 0x20103);
944 WREG32(0x657C, 0x80008000);
945 WREG32(0x6578, 0x20200);
946 WREG32(0x657C, 0x8018BFF8);
947 WREG32(0x6578, 0x20201);
948 WREG32(0x657C, 0x8F80BF08);
949 WREG32(0x6578, 0x20202);
950 WREG32(0x657C, 0xBFD081A0);
951 WREG32(0x6578, 0x20203);
952 WREG32(0x657C, 0xBFF88000);
953 WREG32(0x6578, 0x20300);
954 WREG32(0x657C, 0x80188000);
955 WREG32(0x6578, 0x20301);
956 WREG32(0x657C, 0x8EE0BEC0);
957 WREG32(0x6578, 0x20302);
958 WREG32(0x657C, 0xBFB082A0);
959 WREG32(0x6578, 0x20303);
960 WREG32(0x657C, 0x80008000);
961 WREG32(0x6578, 0x20400);
962 WREG32(0x657C, 0x80188000);
963 WREG32(0x6578, 0x20401);
964 WREG32(0x657C, 0x8E00BEA0);
965 WREG32(0x6578, 0x20402);
966 WREG32(0x657C, 0xBF8883C0);
967 WREG32(0x6578, 0x20403);
968 WREG32(0x657C, 0x80008000);
969 WREG32(0x6578, 0x20500);
970 WREG32(0x657C, 0x80188000);
971 WREG32(0x6578, 0x20501);
972 WREG32(0x657C, 0x8D00BE90);
973 WREG32(0x6578, 0x20502);
974 WREG32(0x657C, 0xBF588500);
975 WREG32(0x6578, 0x20503);
976 WREG32(0x657C, 0x80008008);
977 WREG32(0x6578, 0x20600);
978 WREG32(0x657C, 0x80188000);
979 WREG32(0x6578, 0x20601);
980 WREG32(0x657C, 0x8BC0BE98);
981 WREG32(0x6578, 0x20602);
982 WREG32(0x657C, 0xBF308660);
983 WREG32(0x6578, 0x20603);
984 WREG32(0x657C, 0x80008008);
985 WREG32(0x6578, 0x20700);
986 WREG32(0x657C, 0x80108000);
987 WREG32(0x6578, 0x20701);
988 WREG32(0x657C, 0x8A80BEB0);
989 WREG32(0x6578, 0x20702);
990 WREG32(0x657C, 0xBF0087C0);
991 WREG32(0x6578, 0x20703);
992 WREG32(0x657C, 0x80008008);
993 WREG32(0x6578, 0x20800);
994 WREG32(0x657C, 0x80108000);
995 WREG32(0x6578, 0x20801);
996 WREG32(0x657C, 0x8920BED0);
997 WREG32(0x6578, 0x20802);
998 WREG32(0x657C, 0xBED08920);
999 WREG32(0x6578, 0x20803);
1000 WREG32(0x657C, 0x80008010);
1001 WREG32(0x6578, 0x30000);
1002 WREG32(0x657C, 0x90008000);
1003 WREG32(0x6578, 0x30001);
1004 WREG32(0x657C, 0x80008000);
1005 WREG32(0x6578, 0x30100);
1006 WREG32(0x657C, 0x8FE0BF90);
1007 WREG32(0x6578, 0x30101);
1008 WREG32(0x657C, 0xBFF880A0);
1009 WREG32(0x6578, 0x30200);
1010 WREG32(0x657C, 0x8F60BF40);
1011 WREG32(0x6578, 0x30201);
1012 WREG32(0x657C, 0xBFE88180);
1013 WREG32(0x6578, 0x30300);
1014 WREG32(0x657C, 0x8EC0BF00);
1015 WREG32(0x6578, 0x30301);
1016 WREG32(0x657C, 0xBFC88280);
1017 WREG32(0x6578, 0x30400);
1018 WREG32(0x657C, 0x8DE0BEE0);
1019 WREG32(0x6578, 0x30401);
1020 WREG32(0x657C, 0xBFA083A0);
1021 WREG32(0x6578, 0x30500);
1022 WREG32(0x657C, 0x8CE0BED0);
1023 WREG32(0x6578, 0x30501);
1024 WREG32(0x657C, 0xBF7884E0);
1025 WREG32(0x6578, 0x30600);
1026 WREG32(0x657C, 0x8BA0BED8);
1027 WREG32(0x6578, 0x30601);
1028 WREG32(0x657C, 0xBF508640);
1029 WREG32(0x6578, 0x30700);
1030 WREG32(0x657C, 0x8A60BEE8);
1031 WREG32(0x6578, 0x30701);
1032 WREG32(0x657C, 0xBF2087A0);
1033 WREG32(0x6578, 0x30800);
1034 WREG32(0x657C, 0x8900BF00);
1035 WREG32(0x6578, 0x30801);
1036 WREG32(0x657C, 0xBF008900);
1037}
1038
1039static void 808static void
1040atombios_yuv_setup(struct drm_encoder *encoder, bool enable) 809atombios_yuv_setup(struct drm_encoder *encoder, bool enable)
1041{ 810{
@@ -1074,129 +843,6 @@ atombios_yuv_setup(struct drm_encoder *encoder, bool enable)
1074} 843}
1075 844
1076static void 845static void
1077atombios_overscan_setup(struct drm_encoder *encoder,
1078 struct drm_display_mode *mode,
1079 struct drm_display_mode *adjusted_mode)
1080{
1081 struct drm_device *dev = encoder->dev;
1082 struct radeon_device *rdev = dev->dev_private;
1083 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
1084 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc);
1085 SET_CRTC_OVERSCAN_PS_ALLOCATION args;
1086 int index = GetIndexIntoMasterTable(COMMAND, SetCRTC_OverScan);
1087
1088 memset(&args, 0, sizeof(args));
1089
1090 args.usOverscanRight = 0;
1091 args.usOverscanLeft = 0;
1092 args.usOverscanBottom = 0;
1093 args.usOverscanTop = 0;
1094 args.ucCRTC = radeon_crtc->crtc_id;
1095
1096 if (radeon_encoder->flags & RADEON_USE_RMX) {
1097 if (radeon_encoder->rmx_type == RMX_FULL) {
1098 args.usOverscanRight = 0;
1099 args.usOverscanLeft = 0;
1100 args.usOverscanBottom = 0;
1101 args.usOverscanTop = 0;
1102 } else if (radeon_encoder->rmx_type == RMX_CENTER) {
1103 args.usOverscanTop = (adjusted_mode->crtc_vdisplay - mode->crtc_vdisplay) / 2;
1104 args.usOverscanBottom = (adjusted_mode->crtc_vdisplay - mode->crtc_vdisplay) / 2;
1105 args.usOverscanLeft = (adjusted_mode->crtc_hdisplay - mode->crtc_hdisplay) / 2;
1106 args.usOverscanRight = (adjusted_mode->crtc_hdisplay - mode->crtc_hdisplay) / 2;
1107 } else if (radeon_encoder->rmx_type == RMX_ASPECT) {
1108 int a1 = mode->crtc_vdisplay * adjusted_mode->crtc_hdisplay;
1109 int a2 = adjusted_mode->crtc_vdisplay * mode->crtc_hdisplay;
1110
1111 if (a1 > a2) {
1112 args.usOverscanLeft = (adjusted_mode->crtc_hdisplay - (a2 / mode->crtc_vdisplay)) / 2;
1113 args.usOverscanRight = (adjusted_mode->crtc_hdisplay - (a2 / mode->crtc_vdisplay)) / 2;
1114 } else if (a2 > a1) {
1115 args.usOverscanLeft = (adjusted_mode->crtc_vdisplay - (a1 / mode->crtc_hdisplay)) / 2;
1116 args.usOverscanRight = (adjusted_mode->crtc_vdisplay - (a1 / mode->crtc_hdisplay)) / 2;
1117 }
1118 }
1119 }
1120
1121 atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);
1122
1123}
1124
1125static void
1126atombios_scaler_setup(struct drm_encoder *encoder)
1127{
1128 struct drm_device *dev = encoder->dev;
1129 struct radeon_device *rdev = dev->dev_private;
1130 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
1131 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc);
1132 ENABLE_SCALER_PS_ALLOCATION args;
1133 int index = GetIndexIntoMasterTable(COMMAND, EnableScaler);
1134 /* fixme - fill in enc_priv for atom dac */
1135 enum radeon_tv_std tv_std = TV_STD_NTSC;
1136
1137 if (!ASIC_IS_AVIVO(rdev) && radeon_crtc->crtc_id)
1138 return;
1139
1140 memset(&args, 0, sizeof(args));
1141
1142 args.ucScaler = radeon_crtc->crtc_id;
1143
1144 if (radeon_encoder->devices & (ATOM_DEVICE_TV_SUPPORT)) {
1145 switch (tv_std) {
1146 case TV_STD_NTSC:
1147 default:
1148 args.ucTVStandard = ATOM_TV_NTSC;
1149 break;
1150 case TV_STD_PAL:
1151 args.ucTVStandard = ATOM_TV_PAL;
1152 break;
1153 case TV_STD_PAL_M:
1154 args.ucTVStandard = ATOM_TV_PALM;
1155 break;
1156 case TV_STD_PAL_60:
1157 args.ucTVStandard = ATOM_TV_PAL60;
1158 break;
1159 case TV_STD_NTSC_J:
1160 args.ucTVStandard = ATOM_TV_NTSCJ;
1161 break;
1162 case TV_STD_SCART_PAL:
1163 args.ucTVStandard = ATOM_TV_PAL; /* ??? */
1164 break;
1165 case TV_STD_SECAM:
1166 args.ucTVStandard = ATOM_TV_SECAM;
1167 break;
1168 case TV_STD_PAL_CN:
1169 args.ucTVStandard = ATOM_TV_PALCN;
1170 break;
1171 }
1172 args.ucEnable = SCALER_ENABLE_MULTITAP_MODE;
1173 } else if (radeon_encoder->devices & (ATOM_DEVICE_CV_SUPPORT)) {
1174 args.ucTVStandard = ATOM_TV_CV;
1175 args.ucEnable = SCALER_ENABLE_MULTITAP_MODE;
1176 } else if (radeon_encoder->flags & RADEON_USE_RMX) {
1177 if (radeon_encoder->rmx_type == RMX_FULL)
1178 args.ucEnable = ATOM_SCALER_EXPANSION;
1179 else if (radeon_encoder->rmx_type == RMX_CENTER)
1180 args.ucEnable = ATOM_SCALER_CENTER;
1181 else if (radeon_encoder->rmx_type == RMX_ASPECT)
1182 args.ucEnable = ATOM_SCALER_EXPANSION;
1183 } else {
1184 if (ASIC_IS_AVIVO(rdev))
1185 args.ucEnable = ATOM_SCALER_DISABLE;
1186 else
1187 args.ucEnable = ATOM_SCALER_CENTER;
1188 }
1189
1190 atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);
1191
1192 if (radeon_encoder->devices & (ATOM_DEVICE_CV_SUPPORT | ATOM_DEVICE_TV_SUPPORT)
1193 && rdev->family >= CHIP_RV515 && rdev->family <= CHIP_RV570) {
1194 atom_rv515_force_tv_scaler(rdev);
1195 }
1196
1197}
1198
1199static void
1200radeon_atom_encoder_dpms(struct drm_encoder *encoder, int mode) 846radeon_atom_encoder_dpms(struct drm_encoder *encoder, int mode)
1201{ 847{
1202 struct drm_device *dev = encoder->dev; 848 struct drm_device *dev = encoder->dev;
@@ -1448,8 +1094,6 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder,
1448 radeon_encoder->pixel_clock = adjusted_mode->clock; 1094 radeon_encoder->pixel_clock = adjusted_mode->clock;
1449 1095
1450 radeon_atombios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id); 1096 radeon_atombios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id);
1451 atombios_overscan_setup(encoder, mode, adjusted_mode);
1452 atombios_scaler_setup(encoder);
1453 atombios_set_encoder_crtc_source(encoder); 1097 atombios_set_encoder_crtc_source(encoder);
1454 1098
1455 if (ASIC_IS_AVIVO(rdev)) { 1099 if (ASIC_IS_AVIVO(rdev)) {
@@ -1667,6 +1311,7 @@ radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_id, uint32_t su
1667 1311
1668 radeon_encoder->encoder_id = encoder_id; 1312 radeon_encoder->encoder_id = encoder_id;
1669 radeon_encoder->devices = supported_device; 1313 radeon_encoder->devices = supported_device;
1314 radeon_encoder->rmx_type = RMX_OFF;
1670 1315
1671 switch (radeon_encoder->encoder_id) { 1316 switch (radeon_encoder->encoder_id) {
1672 case ENCODER_OBJECT_ID_INTERNAL_LVDS: 1317 case ENCODER_OBJECT_ID_INTERNAL_LVDS:
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
index 9e8f191eb64..3206c0ad7b6 100644
--- a/drivers/gpu/drm/radeon/radeon_fb.c
+++ b/drivers/gpu/drm/radeon/radeon_fb.c
@@ -101,9 +101,10 @@ static int radeonfb_setcolreg(unsigned regno,
101 break; 101 break;
102 case 24: 102 case 24:
103 case 32: 103 case 32:
104 fb->pseudo_palette[regno] = ((red & 0xff00) << 8) | 104 fb->pseudo_palette[regno] =
105 (green & 0xff00) | 105 (((red >> 8) & 0xff) << info->var.red.offset) |
106 ((blue & 0xff00) >> 8); 106 (((green >> 8) & 0xff) << info->var.green.offset) |
107 (((blue >> 8) & 0xff) << info->var.blue.offset);
107 break; 108 break;
108 } 109 }
109 } 110 }
@@ -154,6 +155,7 @@ static int radeonfb_check_var(struct fb_var_screeninfo *var,
154 var->transp.length = 0; 155 var->transp.length = 0;
155 var->transp.offset = 0; 156 var->transp.offset = 0;
156 break; 157 break;
158#ifdef __LITTLE_ENDIAN
157 case 15: 159 case 15:
158 var->red.offset = 10; 160 var->red.offset = 10;
159 var->green.offset = 5; 161 var->green.offset = 5;
@@ -194,6 +196,28 @@ static int radeonfb_check_var(struct fb_var_screeninfo *var,
194 var->transp.length = 8; 196 var->transp.length = 8;
195 var->transp.offset = 24; 197 var->transp.offset = 24;
196 break; 198 break;
199#else
200 case 24:
201 var->red.offset = 8;
202 var->green.offset = 16;
203 var->blue.offset = 24;
204 var->red.length = 8;
205 var->green.length = 8;
206 var->blue.length = 8;
207 var->transp.length = 0;
208 var->transp.offset = 0;
209 break;
210 case 32:
211 var->red.offset = 8;
212 var->green.offset = 16;
213 var->blue.offset = 24;
214 var->red.length = 8;
215 var->green.length = 8;
216 var->blue.length = 8;
217 var->transp.length = 8;
218 var->transp.offset = 0;
219 break;
220#endif
197 default: 221 default:
198 return -EINVAL; 222 return -EINVAL;
199 } 223 }
@@ -447,10 +471,10 @@ static struct notifier_block paniced = {
447 .notifier_call = radeonfb_panic, 471 .notifier_call = radeonfb_panic,
448}; 472};
449 473
450static int radeon_align_pitch(struct radeon_device *rdev, int width, int bpp) 474static int radeon_align_pitch(struct radeon_device *rdev, int width, int bpp, bool tiled)
451{ 475{
452 int aligned = width; 476 int aligned = width;
453 int align_large = (ASIC_IS_AVIVO(rdev)); 477 int align_large = (ASIC_IS_AVIVO(rdev)) || tiled;
454 int pitch_mask = 0; 478 int pitch_mask = 0;
455 479
456 switch (bpp / 8) { 480 switch (bpp / 8) {
@@ -488,12 +512,13 @@ int radeonfb_create(struct radeon_device *rdev,
488 u64 fb_gpuaddr; 512 u64 fb_gpuaddr;
489 void *fbptr = NULL; 513 void *fbptr = NULL;
490 unsigned long tmp; 514 unsigned long tmp;
515 bool fb_tiled = false; /* useful for testing */
491 516
492 mode_cmd.width = surface_width; 517 mode_cmd.width = surface_width;
493 mode_cmd.height = surface_height; 518 mode_cmd.height = surface_height;
494 mode_cmd.bpp = 32; 519 mode_cmd.bpp = 32;
495 /* need to align pitch with crtc limits */ 520 /* need to align pitch with crtc limits */
496 mode_cmd.pitch = radeon_align_pitch(rdev, mode_cmd.width, mode_cmd.bpp) * ((mode_cmd.bpp + 1) / 8); 521 mode_cmd.pitch = radeon_align_pitch(rdev, mode_cmd.width, mode_cmd.bpp, fb_tiled) * ((mode_cmd.bpp + 1) / 8);
497 mode_cmd.depth = 24; 522 mode_cmd.depth = 24;
498 523
499 size = mode_cmd.pitch * mode_cmd.height; 524 size = mode_cmd.pitch * mode_cmd.height;
@@ -511,6 +536,8 @@ int radeonfb_create(struct radeon_device *rdev,
511 } 536 }
512 robj = gobj->driver_private; 537 robj = gobj->driver_private;
513 538
539 if (fb_tiled)
540 radeon_object_set_tiling_flags(robj, RADEON_TILING_MACRO|RADEON_TILING_SURFACE, mode_cmd.pitch);
514 mutex_lock(&rdev->ddev->struct_mutex); 541 mutex_lock(&rdev->ddev->struct_mutex);
515 fb = radeon_framebuffer_create(rdev->ddev, &mode_cmd, gobj); 542 fb = radeon_framebuffer_create(rdev->ddev, &mode_cmd, gobj);
516 if (fb == NULL) { 543 if (fb == NULL) {
@@ -539,6 +566,9 @@ int radeonfb_create(struct radeon_device *rdev,
539 } 566 }
540 rfbdev = info->par; 567 rfbdev = info->par;
541 568
569 if (fb_tiled)
570 radeon_object_check_tiling(robj, 0, 0);
571
542 ret = radeon_object_kmap(robj, &fbptr); 572 ret = radeon_object_kmap(robj, &fbptr);
543 if (ret) { 573 if (ret) {
544 goto out_unref; 574 goto out_unref;
@@ -572,6 +602,11 @@ int radeonfb_create(struct radeon_device *rdev,
572 info->var.width = -1; 602 info->var.width = -1;
573 info->var.xres = fb_width; 603 info->var.xres = fb_width;
574 info->var.yres = fb_height; 604 info->var.yres = fb_height;
605
606 /* setup aperture base/size for vesafb takeover */
607 info->aperture_base = rdev->ddev->mode_config.fb_base;
608 info->aperture_size = rdev->mc.real_vram_size;
609
575 info->fix.mmio_start = 0; 610 info->fix.mmio_start = 0;
576 info->fix.mmio_len = 0; 611 info->fix.mmio_len = 0;
577 info->pixmap.size = 64*1024; 612 info->pixmap.size = 64*1024;
@@ -600,6 +635,7 @@ int radeonfb_create(struct radeon_device *rdev,
600 info->var.transp.offset = 0; 635 info->var.transp.offset = 0;
601 info->var.transp.length = 0; 636 info->var.transp.length = 0;
602 break; 637 break;
638#ifdef __LITTLE_ENDIAN
603 case 15: 639 case 15:
604 info->var.red.offset = 10; 640 info->var.red.offset = 10;
605 info->var.green.offset = 5; 641 info->var.green.offset = 5;
@@ -639,7 +675,29 @@ int radeonfb_create(struct radeon_device *rdev,
639 info->var.transp.offset = 24; 675 info->var.transp.offset = 24;
640 info->var.transp.length = 8; 676 info->var.transp.length = 8;
641 break; 677 break;
678#else
679 case 24:
680 info->var.red.offset = 8;
681 info->var.green.offset = 16;
682 info->var.blue.offset = 24;
683 info->var.red.length = 8;
684 info->var.green.length = 8;
685 info->var.blue.length = 8;
686 info->var.transp.offset = 0;
687 info->var.transp.length = 0;
688 break;
689 case 32:
690 info->var.red.offset = 8;
691 info->var.green.offset = 16;
692 info->var.blue.offset = 24;
693 info->var.red.length = 8;
694 info->var.green.length = 8;
695 info->var.blue.length = 8;
696 info->var.transp.offset = 0;
697 info->var.transp.length = 8;
698 break;
642 default: 699 default:
700#endif
643 break; 701 break;
644 } 702 }
645 703
diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
index 96afbf5ae2a..b4e48dd2e85 100644
--- a/drivers/gpu/drm/radeon/radeon_fence.c
+++ b/drivers/gpu/drm/radeon/radeon_fence.c
@@ -195,7 +195,7 @@ retry:
195 r = wait_event_interruptible_timeout(rdev->fence_drv.queue, 195 r = wait_event_interruptible_timeout(rdev->fence_drv.queue,
196 radeon_fence_signaled(fence), timeout); 196 radeon_fence_signaled(fence), timeout);
197 if (unlikely(r == -ERESTARTSYS)) { 197 if (unlikely(r == -ERESTARTSYS)) {
198 return -ERESTART; 198 return -EBUSY;
199 } 199 }
200 } else { 200 } else {
201 r = wait_event_timeout(rdev->fence_drv.queue, 201 r = wait_event_timeout(rdev->fence_drv.queue,
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c
index d343a15316e..2977539880f 100644
--- a/drivers/gpu/drm/radeon/radeon_gart.c
+++ b/drivers/gpu/drm/radeon/radeon_gart.c
@@ -177,7 +177,7 @@ int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
177 return -ENOMEM; 177 return -ENOMEM;
178 } 178 }
179 rdev->gart.pages[p] = pagelist[i]; 179 rdev->gart.pages[p] = pagelist[i];
180 page_base = (uint32_t)rdev->gart.pages_addr[p]; 180 page_base = rdev->gart.pages_addr[p];
181 for (j = 0; j < (PAGE_SIZE / 4096); j++, t++) { 181 for (j = 0; j < (PAGE_SIZE / 4096); j++, t++) {
182 radeon_gart_set_page(rdev, t, page_base); 182 radeon_gart_set_page(rdev, t, page_base);
183 page_base += 4096; 183 page_base += 4096;
diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c
index eb516034235..cded5180c75 100644
--- a/drivers/gpu/drm/radeon/radeon_gem.c
+++ b/drivers/gpu/drm/radeon/radeon_gem.c
@@ -157,9 +157,9 @@ int radeon_gem_info_ioctl(struct drm_device *dev, void *data,
157 struct radeon_device *rdev = dev->dev_private; 157 struct radeon_device *rdev = dev->dev_private;
158 struct drm_radeon_gem_info *args = data; 158 struct drm_radeon_gem_info *args = data;
159 159
160 args->vram_size = rdev->mc.vram_size; 160 args->vram_size = rdev->mc.real_vram_size;
161 /* FIXME: report somethings that makes sense */ 161 /* FIXME: report somethings that makes sense */
162 args->vram_visible = rdev->mc.vram_size - (4 * 1024 * 1024); 162 args->vram_visible = rdev->mc.real_vram_size - (4 * 1024 * 1024);
163 args->gart_size = rdev->mc.gtt_size; 163 args->gart_size = rdev->mc.gtt_size;
164 return 0; 164 return 0;
165} 165}
@@ -285,3 +285,44 @@ int radeon_gem_wait_idle_ioctl(struct drm_device *dev, void *data,
285 mutex_unlock(&dev->struct_mutex); 285 mutex_unlock(&dev->struct_mutex);
286 return r; 286 return r;
287} 287}
288
289int radeon_gem_set_tiling_ioctl(struct drm_device *dev, void *data,
290 struct drm_file *filp)
291{
292 struct drm_radeon_gem_set_tiling *args = data;
293 struct drm_gem_object *gobj;
294 struct radeon_object *robj;
295 int r = 0;
296
297 DRM_DEBUG("%d \n", args->handle);
298 gobj = drm_gem_object_lookup(dev, filp, args->handle);
299 if (gobj == NULL)
300 return -EINVAL;
301 robj = gobj->driver_private;
302 radeon_object_set_tiling_flags(robj, args->tiling_flags, args->pitch);
303 mutex_lock(&dev->struct_mutex);
304 drm_gem_object_unreference(gobj);
305 mutex_unlock(&dev->struct_mutex);
306 return r;
307}
308
309int radeon_gem_get_tiling_ioctl(struct drm_device *dev, void *data,
310 struct drm_file *filp)
311{
312 struct drm_radeon_gem_get_tiling *args = data;
313 struct drm_gem_object *gobj;
314 struct radeon_object *robj;
315 int r = 0;
316
317 DRM_DEBUG("\n");
318 gobj = drm_gem_object_lookup(dev, filp, args->handle);
319 if (gobj == NULL)
320 return -EINVAL;
321 robj = gobj->driver_private;
322 radeon_object_get_tiling_flags(robj, &args->tiling_flags,
323 &args->pitch);
324 mutex_lock(&dev->struct_mutex);
325 drm_gem_object_unreference(gobj);
326 mutex_unlock(&dev->struct_mutex);
327 return r;
328}
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 4612a7c146d..3357110e30c 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -58,6 +58,8 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
58 if (r) { 58 if (r) {
59 DRM_ERROR("Failed to initialize radeon, disabling IOCTL\n"); 59 DRM_ERROR("Failed to initialize radeon, disabling IOCTL\n");
60 radeon_device_fini(rdev); 60 radeon_device_fini(rdev);
61 kfree(rdev);
62 dev->dev_private = NULL;
61 return r; 63 return r;
62 } 64 }
63 return 0; 65 return 0;
@@ -291,5 +293,7 @@ struct drm_ioctl_desc radeon_ioctls_kms[] = {
291 DRM_IOCTL_DEF(DRM_RADEON_GEM_WAIT_IDLE, radeon_gem_wait_idle_ioctl, DRM_AUTH), 293 DRM_IOCTL_DEF(DRM_RADEON_GEM_WAIT_IDLE, radeon_gem_wait_idle_ioctl, DRM_AUTH),
292 DRM_IOCTL_DEF(DRM_RADEON_CS, radeon_cs_ioctl, DRM_AUTH), 294 DRM_IOCTL_DEF(DRM_RADEON_CS, radeon_cs_ioctl, DRM_AUTH),
293 DRM_IOCTL_DEF(DRM_RADEON_INFO, radeon_info_ioctl, DRM_AUTH), 295 DRM_IOCTL_DEF(DRM_RADEON_INFO, radeon_info_ioctl, DRM_AUTH),
296 DRM_IOCTL_DEF(DRM_RADEON_GEM_SET_TILING, radeon_gem_set_tiling_ioctl, DRM_AUTH),
297 DRM_IOCTL_DEF(DRM_RADEON_GEM_GET_TILING, radeon_gem_get_tiling_ioctl, DRM_AUTH),
294}; 298};
295int radeon_max_kms_ioctl = DRM_ARRAY_SIZE(radeon_ioctls_kms); 299int radeon_max_kms_ioctl = DRM_ARRAY_SIZE(radeon_ioctls_kms);
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
index 8086ecf7f03..7d06dc98a42 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
@@ -29,6 +29,171 @@
29#include "radeon_fixed.h" 29#include "radeon_fixed.h"
30#include "radeon.h" 30#include "radeon.h"
31 31
32static void radeon_legacy_rmx_mode_set(struct drm_crtc *crtc,
33 struct drm_display_mode *mode,
34 struct drm_display_mode *adjusted_mode)
35{
36 struct drm_device *dev = crtc->dev;
37 struct radeon_device *rdev = dev->dev_private;
38 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
39 int xres = mode->hdisplay;
40 int yres = mode->vdisplay;
41 bool hscale = true, vscale = true;
42 int hsync_wid;
43 int vsync_wid;
44 int hsync_start;
45 int blank_width;
46 u32 scale, inc, crtc_more_cntl;
47 u32 fp_horz_stretch, fp_vert_stretch, fp_horz_vert_active;
48 u32 fp_h_sync_strt_wid, fp_crtc_h_total_disp;
49 u32 fp_v_sync_strt_wid, fp_crtc_v_total_disp;
50 struct radeon_native_mode *native_mode = &radeon_crtc->native_mode;
51
52 fp_vert_stretch = RREG32(RADEON_FP_VERT_STRETCH) &
53 (RADEON_VERT_STRETCH_RESERVED |
54 RADEON_VERT_AUTO_RATIO_INC);
55 fp_horz_stretch = RREG32(RADEON_FP_HORZ_STRETCH) &
56 (RADEON_HORZ_FP_LOOP_STRETCH |
57 RADEON_HORZ_AUTO_RATIO_INC);
58
59 crtc_more_cntl = 0;
60 if ((rdev->family == CHIP_RS100) ||
61 (rdev->family == CHIP_RS200)) {
62 /* This is to workaround the asic bug for RMX, some versions
63 of BIOS dosen't have this register initialized correctly. */
64 crtc_more_cntl |= RADEON_CRTC_H_CUTOFF_ACTIVE_EN;
65 }
66
67
68 fp_crtc_h_total_disp = ((((mode->crtc_htotal / 8) - 1) & 0x3ff)
69 | ((((mode->crtc_hdisplay / 8) - 1) & 0x1ff) << 16));
70
71 hsync_wid = (mode->crtc_hsync_end - mode->crtc_hsync_start) / 8;
72 if (!hsync_wid)
73 hsync_wid = 1;
74 hsync_start = mode->crtc_hsync_start - 8;
75
76 fp_h_sync_strt_wid = ((hsync_start & 0x1fff)
77 | ((hsync_wid & 0x3f) << 16)
78 | ((mode->flags & DRM_MODE_FLAG_NHSYNC)
79 ? RADEON_CRTC_H_SYNC_POL
80 : 0));
81
82 fp_crtc_v_total_disp = (((mode->crtc_vtotal - 1) & 0xffff)
83 | ((mode->crtc_vdisplay - 1) << 16));
84
85 vsync_wid = mode->crtc_vsync_end - mode->crtc_vsync_start;
86 if (!vsync_wid)
87 vsync_wid = 1;
88
89 fp_v_sync_strt_wid = (((mode->crtc_vsync_start - 1) & 0xfff)
90 | ((vsync_wid & 0x1f) << 16)
91 | ((mode->flags & DRM_MODE_FLAG_NVSYNC)
92 ? RADEON_CRTC_V_SYNC_POL
93 : 0));
94
95 fp_horz_vert_active = 0;
96
97 if (native_mode->panel_xres == 0 ||
98 native_mode->panel_yres == 0) {
99 hscale = false;
100 vscale = false;
101 } else {
102 if (xres > native_mode->panel_xres)
103 xres = native_mode->panel_xres;
104 if (yres > native_mode->panel_yres)
105 yres = native_mode->panel_yres;
106
107 if (xres == native_mode->panel_xres)
108 hscale = false;
109 if (yres == native_mode->panel_yres)
110 vscale = false;
111 }
112
113 switch (radeon_crtc->rmx_type) {
114 case RMX_FULL:
115 case RMX_ASPECT:
116 if (!hscale)
117 fp_horz_stretch |= ((xres/8-1) << 16);
118 else {
119 inc = (fp_horz_stretch & RADEON_HORZ_AUTO_RATIO_INC) ? 1 : 0;
120 scale = ((xres + inc) * RADEON_HORZ_STRETCH_RATIO_MAX)
121 / native_mode->panel_xres + 1;
122 fp_horz_stretch |= (((scale) & RADEON_HORZ_STRETCH_RATIO_MASK) |
123 RADEON_HORZ_STRETCH_BLEND |
124 RADEON_HORZ_STRETCH_ENABLE |
125 ((native_mode->panel_xres/8-1) << 16));
126 }
127
128 if (!vscale)
129 fp_vert_stretch |= ((yres-1) << 12);
130 else {
131 inc = (fp_vert_stretch & RADEON_VERT_AUTO_RATIO_INC) ? 1 : 0;
132 scale = ((yres + inc) * RADEON_VERT_STRETCH_RATIO_MAX)
133 / native_mode->panel_yres + 1;
134 fp_vert_stretch |= (((scale) & RADEON_VERT_STRETCH_RATIO_MASK) |
135 RADEON_VERT_STRETCH_ENABLE |
136 RADEON_VERT_STRETCH_BLEND |
137 ((native_mode->panel_yres-1) << 12));
138 }
139 break;
140 case RMX_CENTER:
141 fp_horz_stretch |= ((xres/8-1) << 16);
142 fp_vert_stretch |= ((yres-1) << 12);
143
144 crtc_more_cntl |= (RADEON_CRTC_AUTO_HORZ_CENTER_EN |
145 RADEON_CRTC_AUTO_VERT_CENTER_EN);
146
147 blank_width = (mode->crtc_hblank_end - mode->crtc_hblank_start) / 8;
148 if (blank_width > 110)
149 blank_width = 110;
150
151 fp_crtc_h_total_disp = (((blank_width) & 0x3ff)
152 | ((((mode->crtc_hdisplay / 8) - 1) & 0x1ff) << 16));
153
154 hsync_wid = (mode->crtc_hsync_end - mode->crtc_hsync_start) / 8;
155 if (!hsync_wid)
156 hsync_wid = 1;
157
158 fp_h_sync_strt_wid = ((((mode->crtc_hsync_start - mode->crtc_hblank_start) / 8) & 0x1fff)
159 | ((hsync_wid & 0x3f) << 16)
160 | ((mode->flags & DRM_MODE_FLAG_NHSYNC)
161 ? RADEON_CRTC_H_SYNC_POL
162 : 0));
163
164 fp_crtc_v_total_disp = (((mode->crtc_vblank_end - mode->crtc_vblank_start) & 0xffff)
165 | ((mode->crtc_vdisplay - 1) << 16));
166
167 vsync_wid = mode->crtc_vsync_end - mode->crtc_vsync_start;
168 if (!vsync_wid)
169 vsync_wid = 1;
170
171 fp_v_sync_strt_wid = ((((mode->crtc_vsync_start - mode->crtc_vblank_start) & 0xfff)
172 | ((vsync_wid & 0x1f) << 16)
173 | ((mode->flags & DRM_MODE_FLAG_NVSYNC)
174 ? RADEON_CRTC_V_SYNC_POL
175 : 0)));
176
177 fp_horz_vert_active = (((native_mode->panel_yres) & 0xfff) |
178 (((native_mode->panel_xres / 8) & 0x1ff) << 16));
179 break;
180 case RMX_OFF:
181 default:
182 fp_horz_stretch |= ((xres/8-1) << 16);
183 fp_vert_stretch |= ((yres-1) << 12);
184 break;
185 }
186
187 WREG32(RADEON_FP_HORZ_STRETCH, fp_horz_stretch);
188 WREG32(RADEON_FP_VERT_STRETCH, fp_vert_stretch);
189 WREG32(RADEON_CRTC_MORE_CNTL, crtc_more_cntl);
190 WREG32(RADEON_FP_HORZ_VERT_ACTIVE, fp_horz_vert_active);
191 WREG32(RADEON_FP_H_SYNC_STRT_WID, fp_h_sync_strt_wid);
192 WREG32(RADEON_FP_V_SYNC_STRT_WID, fp_v_sync_strt_wid);
193 WREG32(RADEON_FP_CRTC_H_TOTAL_DISP, fp_crtc_h_total_disp);
194 WREG32(RADEON_FP_CRTC_V_TOTAL_DISP, fp_crtc_v_total_disp);
195}
196
32void radeon_restore_common_regs(struct drm_device *dev) 197void radeon_restore_common_regs(struct drm_device *dev)
33{ 198{
34 /* don't need this yet */ 199 /* don't need this yet */
@@ -235,6 +400,7 @@ int radeon_crtc_set_base(struct drm_crtc *crtc, int x, int y,
235 uint64_t base; 400 uint64_t base;
236 uint32_t crtc_offset, crtc_offset_cntl, crtc_tile_x0_y0 = 0; 401 uint32_t crtc_offset, crtc_offset_cntl, crtc_tile_x0_y0 = 0;
237 uint32_t crtc_pitch, pitch_pixels; 402 uint32_t crtc_pitch, pitch_pixels;
403 uint32_t tiling_flags;
238 404
239 DRM_DEBUG("\n"); 405 DRM_DEBUG("\n");
240 406
@@ -244,7 +410,12 @@ int radeon_crtc_set_base(struct drm_crtc *crtc, int x, int y,
244 if (radeon_gem_object_pin(obj, RADEON_GEM_DOMAIN_VRAM, &base)) { 410 if (radeon_gem_object_pin(obj, RADEON_GEM_DOMAIN_VRAM, &base)) {
245 return -EINVAL; 411 return -EINVAL;
246 } 412 }
247 crtc_offset = (u32)base; 413 /* if scanout was in GTT this really wouldn't work */
414 /* crtc offset is from display base addr not FB location */
415 radeon_crtc->legacy_display_base_addr = rdev->mc.vram_location;
416
417 base -= radeon_crtc->legacy_display_base_addr;
418
248 crtc_offset_cntl = 0; 419 crtc_offset_cntl = 0;
249 420
250 pitch_pixels = crtc->fb->pitch / (crtc->fb->bits_per_pixel / 8); 421 pitch_pixels = crtc->fb->pitch / (crtc->fb->bits_per_pixel / 8);
@@ -253,8 +424,12 @@ int radeon_crtc_set_base(struct drm_crtc *crtc, int x, int y,
253 (crtc->fb->bits_per_pixel * 8)); 424 (crtc->fb->bits_per_pixel * 8));
254 crtc_pitch |= crtc_pitch << 16; 425 crtc_pitch |= crtc_pitch << 16;
255 426
256 /* TODO tiling */ 427 radeon_object_get_tiling_flags(obj->driver_private,
257 if (0) { 428 &tiling_flags, NULL);
429 if (tiling_flags & RADEON_TILING_MICRO)
430 DRM_ERROR("trying to scanout microtiled buffer\n");
431
432 if (tiling_flags & RADEON_TILING_MACRO) {
258 if (ASIC_IS_R300(rdev)) 433 if (ASIC_IS_R300(rdev))
259 crtc_offset_cntl |= (R300_CRTC_X_Y_MODE_EN | 434 crtc_offset_cntl |= (R300_CRTC_X_Y_MODE_EN |
260 R300_CRTC_MICRO_TILE_BUFFER_DIS | 435 R300_CRTC_MICRO_TILE_BUFFER_DIS |
@@ -270,15 +445,13 @@ int radeon_crtc_set_base(struct drm_crtc *crtc, int x, int y,
270 crtc_offset_cntl &= ~RADEON_CRTC_TILE_EN; 445 crtc_offset_cntl &= ~RADEON_CRTC_TILE_EN;
271 } 446 }
272 447
273 448 if (tiling_flags & RADEON_TILING_MACRO) {
274 /* TODO more tiling */
275 if (0) {
276 if (ASIC_IS_R300(rdev)) { 449 if (ASIC_IS_R300(rdev)) {
277 crtc_tile_x0_y0 = x | (y << 16); 450 crtc_tile_x0_y0 = x | (y << 16);
278 base &= ~0x7ff; 451 base &= ~0x7ff;
279 } else { 452 } else {
280 int byteshift = crtc->fb->bits_per_pixel >> 4; 453 int byteshift = crtc->fb->bits_per_pixel >> 4;
281 int tile_addr = (((y >> 3) * crtc->fb->width + x) >> (8 - byteshift)) << 11; 454 int tile_addr = (((y >> 3) * pitch_pixels + x) >> (8 - byteshift)) << 11;
282 base += tile_addr + ((x << byteshift) % 256) + ((y % 8) << 8); 455 base += tile_addr + ((x << byteshift) % 256) + ((y % 8) << 8);
283 crtc_offset_cntl |= (y % 16); 456 crtc_offset_cntl |= (y % 16);
284 } 457 }
@@ -303,11 +476,9 @@ int radeon_crtc_set_base(struct drm_crtc *crtc, int x, int y,
303 476
304 base &= ~7; 477 base &= ~7;
305 478
306 /* update sarea TODO */
307
308 crtc_offset = (u32)base; 479 crtc_offset = (u32)base;
309 480
310 WREG32(RADEON_DISPLAY_BASE_ADDR + radeon_crtc->crtc_offset, rdev->mc.vram_location); 481 WREG32(RADEON_DISPLAY_BASE_ADDR + radeon_crtc->crtc_offset, radeon_crtc->legacy_display_base_addr);
311 482
312 if (ASIC_IS_R300(rdev)) { 483 if (ASIC_IS_R300(rdev)) {
313 if (radeon_crtc->crtc_id) 484 if (radeon_crtc->crtc_id)
@@ -751,6 +922,8 @@ static bool radeon_crtc_mode_fixup(struct drm_crtc *crtc,
751 struct drm_display_mode *mode, 922 struct drm_display_mode *mode,
752 struct drm_display_mode *adjusted_mode) 923 struct drm_display_mode *adjusted_mode)
753{ 924{
925 if (!radeon_crtc_scaling_mode_fixup(crtc, mode, adjusted_mode))
926 return false;
754 return true; 927 return true;
755} 928}
756 929
@@ -759,16 +932,25 @@ static int radeon_crtc_mode_set(struct drm_crtc *crtc,
759 struct drm_display_mode *adjusted_mode, 932 struct drm_display_mode *adjusted_mode,
760 int x, int y, struct drm_framebuffer *old_fb) 933 int x, int y, struct drm_framebuffer *old_fb)
761{ 934{
762 935 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
763 DRM_DEBUG("\n"); 936 struct drm_device *dev = crtc->dev;
937 struct radeon_device *rdev = dev->dev_private;
764 938
765 /* TODO TV */ 939 /* TODO TV */
766
767 radeon_crtc_set_base(crtc, x, y, old_fb); 940 radeon_crtc_set_base(crtc, x, y, old_fb);
768 radeon_set_crtc_timing(crtc, adjusted_mode); 941 radeon_set_crtc_timing(crtc, adjusted_mode);
769 radeon_set_pll(crtc, adjusted_mode); 942 radeon_set_pll(crtc, adjusted_mode);
770 radeon_init_disp_bandwidth(crtc->dev); 943 radeon_bandwidth_update(rdev);
771 944 if (radeon_crtc->crtc_id == 0) {
945 radeon_legacy_rmx_mode_set(crtc, mode, adjusted_mode);
946 } else {
947 if (radeon_crtc->rmx_type != RMX_OFF) {
948 /* FIXME: only first crtc has rmx what should we
949 * do ?
950 */
951 DRM_ERROR("Mode need scaling but only first crtc can do that.\n");
952 }
953 }
772 return 0; 954 return 0;
773} 955}
774 956
@@ -799,478 +981,3 @@ void radeon_legacy_init_crtc(struct drm_device *dev,
799 radeon_crtc->crtc_offset = RADEON_CRTC2_H_TOTAL_DISP - RADEON_CRTC_H_TOTAL_DISP; 981 radeon_crtc->crtc_offset = RADEON_CRTC2_H_TOTAL_DISP - RADEON_CRTC_H_TOTAL_DISP;
800 drm_crtc_helper_add(&radeon_crtc->base, &legacy_helper_funcs); 982 drm_crtc_helper_add(&radeon_crtc->base, &legacy_helper_funcs);
801} 983}
802
803void radeon_init_disp_bw_legacy(struct drm_device *dev,
804 struct drm_display_mode *mode1,
805 uint32_t pixel_bytes1,
806 struct drm_display_mode *mode2,
807 uint32_t pixel_bytes2)
808{
809 struct radeon_device *rdev = dev->dev_private;
810 fixed20_12 trcd_ff, trp_ff, tras_ff, trbs_ff, tcas_ff;
811 fixed20_12 sclk_ff, mclk_ff, sclk_eff_ff, sclk_delay_ff;
812 fixed20_12 peak_disp_bw, mem_bw, pix_clk, pix_clk2, temp_ff, crit_point_ff;
813 uint32_t temp, data, mem_trcd, mem_trp, mem_tras;
814 fixed20_12 memtcas_ff[8] = {
815 fixed_init(1),
816 fixed_init(2),
817 fixed_init(3),
818 fixed_init(0),
819 fixed_init_half(1),
820 fixed_init_half(2),
821 fixed_init(0),
822 };
823 fixed20_12 memtcas_rs480_ff[8] = {
824 fixed_init(0),
825 fixed_init(1),
826 fixed_init(2),
827 fixed_init(3),
828 fixed_init(0),
829 fixed_init_half(1),
830 fixed_init_half(2),
831 fixed_init_half(3),
832 };
833 fixed20_12 memtcas2_ff[8] = {
834 fixed_init(0),
835 fixed_init(1),
836 fixed_init(2),
837 fixed_init(3),
838 fixed_init(4),
839 fixed_init(5),
840 fixed_init(6),
841 fixed_init(7),
842 };
843 fixed20_12 memtrbs[8] = {
844 fixed_init(1),
845 fixed_init_half(1),
846 fixed_init(2),
847 fixed_init_half(2),
848 fixed_init(3),
849 fixed_init_half(3),
850 fixed_init(4),
851 fixed_init_half(4)
852 };
853 fixed20_12 memtrbs_r4xx[8] = {
854 fixed_init(4),
855 fixed_init(5),
856 fixed_init(6),
857 fixed_init(7),
858 fixed_init(8),
859 fixed_init(9),
860 fixed_init(10),
861 fixed_init(11)
862 };
863 fixed20_12 min_mem_eff;
864 fixed20_12 mc_latency_sclk, mc_latency_mclk, k1;
865 fixed20_12 cur_latency_mclk, cur_latency_sclk;
866 fixed20_12 disp_latency, disp_latency_overhead, disp_drain_rate,
867 disp_drain_rate2, read_return_rate;
868 fixed20_12 time_disp1_drop_priority;
869 int c;
870 int cur_size = 16; /* in octawords */
871 int critical_point = 0, critical_point2;
872/* uint32_t read_return_rate, time_disp1_drop_priority; */
873 int stop_req, max_stop_req;
874
875 min_mem_eff.full = rfixed_const_8(0);
876 /* get modes */
877 if ((rdev->disp_priority == 2) && ASIC_IS_R300(rdev)) {
878 uint32_t mc_init_misc_lat_timer = RREG32(R300_MC_INIT_MISC_LAT_TIMER);
879 mc_init_misc_lat_timer &= ~(R300_MC_DISP1R_INIT_LAT_MASK << R300_MC_DISP1R_INIT_LAT_SHIFT);
880 mc_init_misc_lat_timer &= ~(R300_MC_DISP0R_INIT_LAT_MASK << R300_MC_DISP0R_INIT_LAT_SHIFT);
881 /* check crtc enables */
882 if (mode2)
883 mc_init_misc_lat_timer |= (1 << R300_MC_DISP1R_INIT_LAT_SHIFT);
884 if (mode1)
885 mc_init_misc_lat_timer |= (1 << R300_MC_DISP0R_INIT_LAT_SHIFT);
886 WREG32(R300_MC_INIT_MISC_LAT_TIMER, mc_init_misc_lat_timer);
887 }
888
889 /*
890 * determine is there is enough bw for current mode
891 */
892 mclk_ff.full = rfixed_const(rdev->clock.default_mclk);
893 temp_ff.full = rfixed_const(100);
894 mclk_ff.full = rfixed_div(mclk_ff, temp_ff);
895 sclk_ff.full = rfixed_const(rdev->clock.default_sclk);
896 sclk_ff.full = rfixed_div(sclk_ff, temp_ff);
897
898 temp = (rdev->mc.vram_width / 8) * (rdev->mc.vram_is_ddr ? 2 : 1);
899 temp_ff.full = rfixed_const(temp);
900 mem_bw.full = rfixed_mul(mclk_ff, temp_ff);
901
902 pix_clk.full = 0;
903 pix_clk2.full = 0;
904 peak_disp_bw.full = 0;
905 if (mode1) {
906 temp_ff.full = rfixed_const(1000);
907 pix_clk.full = rfixed_const(mode1->clock); /* convert to fixed point */
908 pix_clk.full = rfixed_div(pix_clk, temp_ff);
909 temp_ff.full = rfixed_const(pixel_bytes1);
910 peak_disp_bw.full += rfixed_mul(pix_clk, temp_ff);
911 }
912 if (mode2) {
913 temp_ff.full = rfixed_const(1000);
914 pix_clk2.full = rfixed_const(mode2->clock); /* convert to fixed point */
915 pix_clk2.full = rfixed_div(pix_clk2, temp_ff);
916 temp_ff.full = rfixed_const(pixel_bytes2);
917 peak_disp_bw.full += rfixed_mul(pix_clk2, temp_ff);
918 }
919
920 mem_bw.full = rfixed_mul(mem_bw, min_mem_eff);
921 if (peak_disp_bw.full >= mem_bw.full) {
922 DRM_ERROR("You may not have enough display bandwidth for current mode\n"
923 "If you have flickering problem, try to lower resolution, refresh rate, or color depth\n");
924 }
925
926 /* Get values from the EXT_MEM_CNTL register...converting its contents. */
927 temp = RREG32(RADEON_MEM_TIMING_CNTL);
928 if ((rdev->family == CHIP_RV100) || (rdev->flags & RADEON_IS_IGP)) { /* RV100, M6, IGPs */
929 mem_trcd = ((temp >> 2) & 0x3) + 1;
930 mem_trp = ((temp & 0x3)) + 1;
931 mem_tras = ((temp & 0x70) >> 4) + 1;
932 } else if (rdev->family == CHIP_R300 ||
933 rdev->family == CHIP_R350) { /* r300, r350 */
934 mem_trcd = (temp & 0x7) + 1;
935 mem_trp = ((temp >> 8) & 0x7) + 1;
936 mem_tras = ((temp >> 11) & 0xf) + 4;
937 } else if (rdev->family == CHIP_RV350 ||
938 rdev->family <= CHIP_RV380) {
939 /* rv3x0 */
940 mem_trcd = (temp & 0x7) + 3;
941 mem_trp = ((temp >> 8) & 0x7) + 3;
942 mem_tras = ((temp >> 11) & 0xf) + 6;
943 } else if (rdev->family == CHIP_R420 ||
944 rdev->family == CHIP_R423 ||
945 rdev->family == CHIP_RV410) {
946 /* r4xx */
947 mem_trcd = (temp & 0xf) + 3;
948 if (mem_trcd > 15)
949 mem_trcd = 15;
950 mem_trp = ((temp >> 8) & 0xf) + 3;
951 if (mem_trp > 15)
952 mem_trp = 15;
953 mem_tras = ((temp >> 12) & 0x1f) + 6;
954 if (mem_tras > 31)
955 mem_tras = 31;
956 } else { /* RV200, R200 */
957 mem_trcd = (temp & 0x7) + 1;
958 mem_trp = ((temp >> 8) & 0x7) + 1;
959 mem_tras = ((temp >> 12) & 0xf) + 4;
960 }
961 /* convert to FF */
962 trcd_ff.full = rfixed_const(mem_trcd);
963 trp_ff.full = rfixed_const(mem_trp);
964 tras_ff.full = rfixed_const(mem_tras);
965
966 /* Get values from the MEM_SDRAM_MODE_REG register...converting its */
967 temp = RREG32(RADEON_MEM_SDRAM_MODE_REG);
968 data = (temp & (7 << 20)) >> 20;
969 if ((rdev->family == CHIP_RV100) || rdev->flags & RADEON_IS_IGP) {
970 if (rdev->family == CHIP_RS480) /* don't think rs400 */
971 tcas_ff = memtcas_rs480_ff[data];
972 else
973 tcas_ff = memtcas_ff[data];
974 } else
975 tcas_ff = memtcas2_ff[data];
976
977 if (rdev->family == CHIP_RS400 ||
978 rdev->family == CHIP_RS480) {
979 /* extra cas latency stored in bits 23-25 0-4 clocks */
980 data = (temp >> 23) & 0x7;
981 if (data < 5)
982 tcas_ff.full += rfixed_const(data);
983 }
984
985 if (ASIC_IS_R300(rdev) && !(rdev->flags & RADEON_IS_IGP)) {
986 /* on the R300, Tcas is included in Trbs.
987 */
988 temp = RREG32(RADEON_MEM_CNTL);
989 data = (R300_MEM_NUM_CHANNELS_MASK & temp);
990 if (data == 1) {
991 if (R300_MEM_USE_CD_CH_ONLY & temp) {
992 temp = RREG32(R300_MC_IND_INDEX);
993 temp &= ~R300_MC_IND_ADDR_MASK;
994 temp |= R300_MC_READ_CNTL_CD_mcind;
995 WREG32(R300_MC_IND_INDEX, temp);
996 temp = RREG32(R300_MC_IND_DATA);
997 data = (R300_MEM_RBS_POSITION_C_MASK & temp);
998 } else {
999 temp = RREG32(R300_MC_READ_CNTL_AB);
1000 data = (R300_MEM_RBS_POSITION_A_MASK & temp);
1001 }
1002 } else {
1003 temp = RREG32(R300_MC_READ_CNTL_AB);
1004 data = (R300_MEM_RBS_POSITION_A_MASK & temp);
1005 }
1006 if (rdev->family == CHIP_RV410 ||
1007 rdev->family == CHIP_R420 ||
1008 rdev->family == CHIP_R423)
1009 trbs_ff = memtrbs_r4xx[data];
1010 else
1011 trbs_ff = memtrbs[data];
1012 tcas_ff.full += trbs_ff.full;
1013 }
1014
1015 sclk_eff_ff.full = sclk_ff.full;
1016
1017 if (rdev->flags & RADEON_IS_AGP) {
1018 fixed20_12 agpmode_ff;
1019 agpmode_ff.full = rfixed_const(radeon_agpmode);
1020 temp_ff.full = rfixed_const_666(16);
1021 sclk_eff_ff.full -= rfixed_mul(agpmode_ff, temp_ff);
1022 }
1023 /* TODO PCIE lanes may affect this - agpmode == 16?? */
1024
1025 if (ASIC_IS_R300(rdev)) {
1026 sclk_delay_ff.full = rfixed_const(250);
1027 } else {
1028 if ((rdev->family == CHIP_RV100) ||
1029 rdev->flags & RADEON_IS_IGP) {
1030 if (rdev->mc.vram_is_ddr)
1031 sclk_delay_ff.full = rfixed_const(41);
1032 else
1033 sclk_delay_ff.full = rfixed_const(33);
1034 } else {
1035 if (rdev->mc.vram_width == 128)
1036 sclk_delay_ff.full = rfixed_const(57);
1037 else
1038 sclk_delay_ff.full = rfixed_const(41);
1039 }
1040 }
1041
1042 mc_latency_sclk.full = rfixed_div(sclk_delay_ff, sclk_eff_ff);
1043
1044 if (rdev->mc.vram_is_ddr) {
1045 if (rdev->mc.vram_width == 32) {
1046 k1.full = rfixed_const(40);
1047 c = 3;
1048 } else {
1049 k1.full = rfixed_const(20);
1050 c = 1;
1051 }
1052 } else {
1053 k1.full = rfixed_const(40);
1054 c = 3;
1055 }
1056
1057 temp_ff.full = rfixed_const(2);
1058 mc_latency_mclk.full = rfixed_mul(trcd_ff, temp_ff);
1059 temp_ff.full = rfixed_const(c);
1060 mc_latency_mclk.full += rfixed_mul(tcas_ff, temp_ff);
1061 temp_ff.full = rfixed_const(4);
1062 mc_latency_mclk.full += rfixed_mul(tras_ff, temp_ff);
1063 mc_latency_mclk.full += rfixed_mul(trp_ff, temp_ff);
1064 mc_latency_mclk.full += k1.full;
1065
1066 mc_latency_mclk.full = rfixed_div(mc_latency_mclk, mclk_ff);
1067 mc_latency_mclk.full += rfixed_div(temp_ff, sclk_eff_ff);
1068
1069 /*
1070 HW cursor time assuming worst case of full size colour cursor.
1071 */
1072 temp_ff.full = rfixed_const((2 * (cur_size - (rdev->mc.vram_is_ddr + 1))));
1073 temp_ff.full += trcd_ff.full;
1074 if (temp_ff.full < tras_ff.full)
1075 temp_ff.full = tras_ff.full;
1076 cur_latency_mclk.full = rfixed_div(temp_ff, mclk_ff);
1077
1078 temp_ff.full = rfixed_const(cur_size);
1079 cur_latency_sclk.full = rfixed_div(temp_ff, sclk_eff_ff);
1080 /*
1081 Find the total latency for the display data.
1082 */
1083 disp_latency_overhead.full = rfixed_const(80);
1084 disp_latency_overhead.full = rfixed_div(disp_latency_overhead, sclk_ff);
1085 mc_latency_mclk.full += disp_latency_overhead.full + cur_latency_mclk.full;
1086 mc_latency_sclk.full += disp_latency_overhead.full + cur_latency_sclk.full;
1087
1088 if (mc_latency_mclk.full > mc_latency_sclk.full)
1089 disp_latency.full = mc_latency_mclk.full;
1090 else
1091 disp_latency.full = mc_latency_sclk.full;
1092
1093 /* setup Max GRPH_STOP_REQ default value */
1094 if (ASIC_IS_RV100(rdev))
1095 max_stop_req = 0x5c;
1096 else
1097 max_stop_req = 0x7c;
1098
1099 if (mode1) {
1100 /* CRTC1
1101 Set GRPH_BUFFER_CNTL register using h/w defined optimal values.
1102 GRPH_STOP_REQ <= MIN[ 0x7C, (CRTC_H_DISP + 1) * (bit depth) / 0x10 ]
1103 */
1104 stop_req = mode1->hdisplay * pixel_bytes1 / 16;
1105
1106 if (stop_req > max_stop_req)
1107 stop_req = max_stop_req;
1108
1109 /*
1110 Find the drain rate of the display buffer.
1111 */
1112 temp_ff.full = rfixed_const((16/pixel_bytes1));
1113 disp_drain_rate.full = rfixed_div(pix_clk, temp_ff);
1114
1115 /*
1116 Find the critical point of the display buffer.
1117 */
1118 crit_point_ff.full = rfixed_mul(disp_drain_rate, disp_latency);
1119 crit_point_ff.full += rfixed_const_half(0);
1120
1121 critical_point = rfixed_trunc(crit_point_ff);
1122
1123 if (rdev->disp_priority == 2) {
1124 critical_point = 0;
1125 }
1126
1127 /*
1128 The critical point should never be above max_stop_req-4. Setting
1129 GRPH_CRITICAL_CNTL = 0 will thus force high priority all the time.
1130 */
1131 if (max_stop_req - critical_point < 4)
1132 critical_point = 0;
1133
1134 if (critical_point == 0 && mode2 && rdev->family == CHIP_R300) {
1135 /* some R300 cards have problem with this set to 0, when CRTC2 is enabled.*/
1136 critical_point = 0x10;
1137 }
1138
1139 temp = RREG32(RADEON_GRPH_BUFFER_CNTL);
1140 temp &= ~(RADEON_GRPH_STOP_REQ_MASK);
1141 temp |= (stop_req << RADEON_GRPH_STOP_REQ_SHIFT);
1142 temp &= ~(RADEON_GRPH_START_REQ_MASK);
1143 if ((rdev->family == CHIP_R350) &&
1144 (stop_req > 0x15)) {
1145 stop_req -= 0x10;
1146 }
1147 temp |= (stop_req << RADEON_GRPH_START_REQ_SHIFT);
1148 temp |= RADEON_GRPH_BUFFER_SIZE;
1149 temp &= ~(RADEON_GRPH_CRITICAL_CNTL |
1150 RADEON_GRPH_CRITICAL_AT_SOF |
1151 RADEON_GRPH_STOP_CNTL);
1152 /*
1153 Write the result into the register.
1154 */
1155 WREG32(RADEON_GRPH_BUFFER_CNTL, ((temp & ~RADEON_GRPH_CRITICAL_POINT_MASK) |
1156 (critical_point << RADEON_GRPH_CRITICAL_POINT_SHIFT)));
1157
1158#if 0
1159 if ((rdev->family == CHIP_RS400) ||
1160 (rdev->family == CHIP_RS480)) {
1161 /* attempt to program RS400 disp regs correctly ??? */
1162 temp = RREG32(RS400_DISP1_REG_CNTL);
1163 temp &= ~(RS400_DISP1_START_REQ_LEVEL_MASK |
1164 RS400_DISP1_STOP_REQ_LEVEL_MASK);
1165 WREG32(RS400_DISP1_REQ_CNTL1, (temp |
1166 (critical_point << RS400_DISP1_START_REQ_LEVEL_SHIFT) |
1167 (critical_point << RS400_DISP1_STOP_REQ_LEVEL_SHIFT)));
1168 temp = RREG32(RS400_DMIF_MEM_CNTL1);
1169 temp &= ~(RS400_DISP1_CRITICAL_POINT_START_MASK |
1170 RS400_DISP1_CRITICAL_POINT_STOP_MASK);
1171 WREG32(RS400_DMIF_MEM_CNTL1, (temp |
1172 (critical_point << RS400_DISP1_CRITICAL_POINT_START_SHIFT) |
1173 (critical_point << RS400_DISP1_CRITICAL_POINT_STOP_SHIFT)));
1174 }
1175#endif
1176
1177 DRM_DEBUG("GRPH_BUFFER_CNTL from to %x\n",
1178 /* (unsigned int)info->SavedReg->grph_buffer_cntl, */
1179 (unsigned int)RREG32(RADEON_GRPH_BUFFER_CNTL));
1180 }
1181
1182 if (mode2) {
1183 u32 grph2_cntl;
1184 stop_req = mode2->hdisplay * pixel_bytes2 / 16;
1185
1186 if (stop_req > max_stop_req)
1187 stop_req = max_stop_req;
1188
1189 /*
1190 Find the drain rate of the display buffer.
1191 */
1192 temp_ff.full = rfixed_const((16/pixel_bytes2));
1193 disp_drain_rate2.full = rfixed_div(pix_clk2, temp_ff);
1194
1195 grph2_cntl = RREG32(RADEON_GRPH2_BUFFER_CNTL);
1196 grph2_cntl &= ~(RADEON_GRPH_STOP_REQ_MASK);
1197 grph2_cntl |= (stop_req << RADEON_GRPH_STOP_REQ_SHIFT);
1198 grph2_cntl &= ~(RADEON_GRPH_START_REQ_MASK);
1199 if ((rdev->family == CHIP_R350) &&
1200 (stop_req > 0x15)) {
1201 stop_req -= 0x10;
1202 }
1203 grph2_cntl |= (stop_req << RADEON_GRPH_START_REQ_SHIFT);
1204 grph2_cntl |= RADEON_GRPH_BUFFER_SIZE;
1205 grph2_cntl &= ~(RADEON_GRPH_CRITICAL_CNTL |
1206 RADEON_GRPH_CRITICAL_AT_SOF |
1207 RADEON_GRPH_STOP_CNTL);
1208
1209 if ((rdev->family == CHIP_RS100) ||
1210 (rdev->family == CHIP_RS200))
1211 critical_point2 = 0;
1212 else {
1213 temp = (rdev->mc.vram_width * rdev->mc.vram_is_ddr + 1)/128;
1214 temp_ff.full = rfixed_const(temp);
1215 temp_ff.full = rfixed_mul(mclk_ff, temp_ff);
1216 if (sclk_ff.full < temp_ff.full)
1217 temp_ff.full = sclk_ff.full;
1218
1219 read_return_rate.full = temp_ff.full;
1220
1221 if (mode1) {
1222 temp_ff.full = read_return_rate.full - disp_drain_rate.full;
1223 time_disp1_drop_priority.full = rfixed_div(crit_point_ff, temp_ff);
1224 } else {
1225 time_disp1_drop_priority.full = 0;
1226 }
1227 crit_point_ff.full = disp_latency.full + time_disp1_drop_priority.full + disp_latency.full;
1228 crit_point_ff.full = rfixed_mul(crit_point_ff, disp_drain_rate2);
1229 crit_point_ff.full += rfixed_const_half(0);
1230
1231 critical_point2 = rfixed_trunc(crit_point_ff);
1232
1233 if (rdev->disp_priority == 2) {
1234 critical_point2 = 0;
1235 }
1236
1237 if (max_stop_req - critical_point2 < 4)
1238 critical_point2 = 0;
1239
1240 }
1241
1242 if (critical_point2 == 0 && rdev->family == CHIP_R300) {
1243 /* some R300 cards have problem with this set to 0 */
1244 critical_point2 = 0x10;
1245 }
1246
1247 WREG32(RADEON_GRPH2_BUFFER_CNTL, ((grph2_cntl & ~RADEON_GRPH_CRITICAL_POINT_MASK) |
1248 (critical_point2 << RADEON_GRPH_CRITICAL_POINT_SHIFT)));
1249
1250 if ((rdev->family == CHIP_RS400) ||
1251 (rdev->family == CHIP_RS480)) {
1252#if 0
1253 /* attempt to program RS400 disp2 regs correctly ??? */
1254 temp = RREG32(RS400_DISP2_REQ_CNTL1);
1255 temp &= ~(RS400_DISP2_START_REQ_LEVEL_MASK |
1256 RS400_DISP2_STOP_REQ_LEVEL_MASK);
1257 WREG32(RS400_DISP2_REQ_CNTL1, (temp |
1258 (critical_point2 << RS400_DISP1_START_REQ_LEVEL_SHIFT) |
1259 (critical_point2 << RS400_DISP1_STOP_REQ_LEVEL_SHIFT)));
1260 temp = RREG32(RS400_DISP2_REQ_CNTL2);
1261 temp &= ~(RS400_DISP2_CRITICAL_POINT_START_MASK |
1262 RS400_DISP2_CRITICAL_POINT_STOP_MASK);
1263 WREG32(RS400_DISP2_REQ_CNTL2, (temp |
1264 (critical_point2 << RS400_DISP2_CRITICAL_POINT_START_SHIFT) |
1265 (critical_point2 << RS400_DISP2_CRITICAL_POINT_STOP_SHIFT)));
1266#endif
1267 WREG32(RS400_DISP2_REQ_CNTL1, 0x105DC1CC);
1268 WREG32(RS400_DISP2_REQ_CNTL2, 0x2749D000);
1269 WREG32(RS400_DMIF_MEM_CNTL1, 0x29CA71DC);
1270 WREG32(RS400_DISP1_REQ_CNTL1, 0x28FBC3AC);
1271 }
1272
1273 DRM_DEBUG("GRPH2_BUFFER_CNTL from to %x\n",
1274 (unsigned int)RREG32(RADEON_GRPH2_BUFFER_CNTL));
1275 }
1276}
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
index 2c2f42de1d4..34d0f58eb94 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
@@ -30,170 +30,6 @@
30#include "atom.h" 30#include "atom.h"
31 31
32 32
33static void radeon_legacy_rmx_mode_set(struct drm_encoder *encoder,
34 struct drm_display_mode *mode,
35 struct drm_display_mode *adjusted_mode)
36{
37 struct drm_device *dev = encoder->dev;
38 struct radeon_device *rdev = dev->dev_private;
39 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
40 int xres = mode->hdisplay;
41 int yres = mode->vdisplay;
42 bool hscale = true, vscale = true;
43 int hsync_wid;
44 int vsync_wid;
45 int hsync_start;
46 uint32_t scale, inc;
47 uint32_t fp_horz_stretch, fp_vert_stretch, crtc_more_cntl, fp_horz_vert_active;
48 uint32_t fp_h_sync_strt_wid, fp_v_sync_strt_wid, fp_crtc_h_total_disp, fp_crtc_v_total_disp;
49 struct radeon_native_mode *native_mode = &radeon_encoder->native_mode;
50
51 DRM_DEBUG("\n");
52
53 fp_vert_stretch = RREG32(RADEON_FP_VERT_STRETCH) &
54 (RADEON_VERT_STRETCH_RESERVED |
55 RADEON_VERT_AUTO_RATIO_INC);
56 fp_horz_stretch = RREG32(RADEON_FP_HORZ_STRETCH) &
57 (RADEON_HORZ_FP_LOOP_STRETCH |
58 RADEON_HORZ_AUTO_RATIO_INC);
59
60 crtc_more_cntl = 0;
61 if ((rdev->family == CHIP_RS100) ||
62 (rdev->family == CHIP_RS200)) {
63 /* This is to workaround the asic bug for RMX, some versions
64 of BIOS dosen't have this register initialized correctly. */
65 crtc_more_cntl |= RADEON_CRTC_H_CUTOFF_ACTIVE_EN;
66 }
67
68
69 fp_crtc_h_total_disp = ((((mode->crtc_htotal / 8) - 1) & 0x3ff)
70 | ((((mode->crtc_hdisplay / 8) - 1) & 0x1ff) << 16));
71
72 hsync_wid = (mode->crtc_hsync_end - mode->crtc_hsync_start) / 8;
73 if (!hsync_wid)
74 hsync_wid = 1;
75 hsync_start = mode->crtc_hsync_start - 8;
76
77 fp_h_sync_strt_wid = ((hsync_start & 0x1fff)
78 | ((hsync_wid & 0x3f) << 16)
79 | ((mode->flags & DRM_MODE_FLAG_NHSYNC)
80 ? RADEON_CRTC_H_SYNC_POL
81 : 0));
82
83 fp_crtc_v_total_disp = (((mode->crtc_vtotal - 1) & 0xffff)
84 | ((mode->crtc_vdisplay - 1) << 16));
85
86 vsync_wid = mode->crtc_vsync_end - mode->crtc_vsync_start;
87 if (!vsync_wid)
88 vsync_wid = 1;
89
90 fp_v_sync_strt_wid = (((mode->crtc_vsync_start - 1) & 0xfff)
91 | ((vsync_wid & 0x1f) << 16)
92 | ((mode->flags & DRM_MODE_FLAG_NVSYNC)
93 ? RADEON_CRTC_V_SYNC_POL
94 : 0));
95
96 fp_horz_vert_active = 0;
97
98 if (native_mode->panel_xres == 0 ||
99 native_mode->panel_yres == 0) {
100 hscale = false;
101 vscale = false;
102 } else {
103 if (xres > native_mode->panel_xres)
104 xres = native_mode->panel_xres;
105 if (yres > native_mode->panel_yres)
106 yres = native_mode->panel_yres;
107
108 if (xres == native_mode->panel_xres)
109 hscale = false;
110 if (yres == native_mode->panel_yres)
111 vscale = false;
112 }
113
114 if (radeon_encoder->flags & RADEON_USE_RMX) {
115 if (radeon_encoder->rmx_type != RMX_CENTER) {
116 if (!hscale)
117 fp_horz_stretch |= ((xres/8-1) << 16);
118 else {
119 inc = (fp_horz_stretch & RADEON_HORZ_AUTO_RATIO_INC) ? 1 : 0;
120 scale = ((xres + inc) * RADEON_HORZ_STRETCH_RATIO_MAX)
121 / native_mode->panel_xres + 1;
122 fp_horz_stretch |= (((scale) & RADEON_HORZ_STRETCH_RATIO_MASK) |
123 RADEON_HORZ_STRETCH_BLEND |
124 RADEON_HORZ_STRETCH_ENABLE |
125 ((native_mode->panel_xres/8-1) << 16));
126 }
127
128 if (!vscale)
129 fp_vert_stretch |= ((yres-1) << 12);
130 else {
131 inc = (fp_vert_stretch & RADEON_VERT_AUTO_RATIO_INC) ? 1 : 0;
132 scale = ((yres + inc) * RADEON_VERT_STRETCH_RATIO_MAX)
133 / native_mode->panel_yres + 1;
134 fp_vert_stretch |= (((scale) & RADEON_VERT_STRETCH_RATIO_MASK) |
135 RADEON_VERT_STRETCH_ENABLE |
136 RADEON_VERT_STRETCH_BLEND |
137 ((native_mode->panel_yres-1) << 12));
138 }
139 } else if (radeon_encoder->rmx_type == RMX_CENTER) {
140 int blank_width;
141
142 fp_horz_stretch |= ((xres/8-1) << 16);
143 fp_vert_stretch |= ((yres-1) << 12);
144
145 crtc_more_cntl |= (RADEON_CRTC_AUTO_HORZ_CENTER_EN |
146 RADEON_CRTC_AUTO_VERT_CENTER_EN);
147
148 blank_width = (mode->crtc_hblank_end - mode->crtc_hblank_start) / 8;
149 if (blank_width > 110)
150 blank_width = 110;
151
152 fp_crtc_h_total_disp = (((blank_width) & 0x3ff)
153 | ((((mode->crtc_hdisplay / 8) - 1) & 0x1ff) << 16));
154
155 hsync_wid = (mode->crtc_hsync_end - mode->crtc_hsync_start) / 8;
156 if (!hsync_wid)
157 hsync_wid = 1;
158
159 fp_h_sync_strt_wid = ((((mode->crtc_hsync_start - mode->crtc_hblank_start) / 8) & 0x1fff)
160 | ((hsync_wid & 0x3f) << 16)
161 | ((mode->flags & DRM_MODE_FLAG_NHSYNC)
162 ? RADEON_CRTC_H_SYNC_POL
163 : 0));
164
165 fp_crtc_v_total_disp = (((mode->crtc_vblank_end - mode->crtc_vblank_start) & 0xffff)
166 | ((mode->crtc_vdisplay - 1) << 16));
167
168 vsync_wid = mode->crtc_vsync_end - mode->crtc_vsync_start;
169 if (!vsync_wid)
170 vsync_wid = 1;
171
172 fp_v_sync_strt_wid = ((((mode->crtc_vsync_start - mode->crtc_vblank_start) & 0xfff)
173 | ((vsync_wid & 0x1f) << 16)
174 | ((mode->flags & DRM_MODE_FLAG_NVSYNC)
175 ? RADEON_CRTC_V_SYNC_POL
176 : 0)));
177
178 fp_horz_vert_active = (((native_mode->panel_yres) & 0xfff) |
179 (((native_mode->panel_xres / 8) & 0x1ff) << 16));
180 }
181 } else {
182 fp_horz_stretch |= ((xres/8-1) << 16);
183 fp_vert_stretch |= ((yres-1) << 12);
184 }
185
186 WREG32(RADEON_FP_HORZ_STRETCH, fp_horz_stretch);
187 WREG32(RADEON_FP_VERT_STRETCH, fp_vert_stretch);
188 WREG32(RADEON_CRTC_MORE_CNTL, crtc_more_cntl);
189 WREG32(RADEON_FP_HORZ_VERT_ACTIVE, fp_horz_vert_active);
190 WREG32(RADEON_FP_H_SYNC_STRT_WID, fp_h_sync_strt_wid);
191 WREG32(RADEON_FP_V_SYNC_STRT_WID, fp_v_sync_strt_wid);
192 WREG32(RADEON_FP_CRTC_H_TOTAL_DISP, fp_crtc_h_total_disp);
193 WREG32(RADEON_FP_CRTC_V_TOTAL_DISP, fp_crtc_v_total_disp);
194
195}
196
197static void radeon_legacy_lvds_dpms(struct drm_encoder *encoder, int mode) 33static void radeon_legacy_lvds_dpms(struct drm_encoder *encoder, int mode)
198{ 34{
199 struct drm_device *dev = encoder->dev; 35 struct drm_device *dev = encoder->dev;
@@ -287,9 +123,6 @@ static void radeon_legacy_lvds_mode_set(struct drm_encoder *encoder,
287 123
288 DRM_DEBUG("\n"); 124 DRM_DEBUG("\n");
289 125
290 if (radeon_crtc->crtc_id == 0)
291 radeon_legacy_rmx_mode_set(encoder, mode, adjusted_mode);
292
293 lvds_pll_cntl = RREG32(RADEON_LVDS_PLL_CNTL); 126 lvds_pll_cntl = RREG32(RADEON_LVDS_PLL_CNTL);
294 lvds_pll_cntl &= ~RADEON_LVDS_PLL_EN; 127 lvds_pll_cntl &= ~RADEON_LVDS_PLL_EN;
295 128
@@ -318,7 +151,7 @@ static void radeon_legacy_lvds_mode_set(struct drm_encoder *encoder,
318 151
319 if (radeon_crtc->crtc_id == 0) { 152 if (radeon_crtc->crtc_id == 0) {
320 if (ASIC_IS_R300(rdev)) { 153 if (ASIC_IS_R300(rdev)) {
321 if (radeon_encoder->flags & RADEON_USE_RMX) 154 if (radeon_encoder->rmx_type != RMX_OFF)
322 lvds_pll_cntl |= R300_LVDS_SRC_SEL_RMX; 155 lvds_pll_cntl |= R300_LVDS_SRC_SEL_RMX;
323 } else 156 } else
324 lvds_gen_cntl &= ~RADEON_LVDS_SEL_CRTC2; 157 lvds_gen_cntl &= ~RADEON_LVDS_SEL_CRTC2;
@@ -350,8 +183,6 @@ static bool radeon_legacy_lvds_mode_fixup(struct drm_encoder *encoder,
350 183
351 drm_mode_set_crtcinfo(adjusted_mode, 0); 184 drm_mode_set_crtcinfo(adjusted_mode, 0);
352 185
353 radeon_encoder->flags &= ~RADEON_USE_RMX;
354
355 if (radeon_encoder->rmx_type != RMX_OFF) 186 if (radeon_encoder->rmx_type != RMX_OFF)
356 radeon_rmx_mode_fixup(encoder, mode, adjusted_mode); 187 radeon_rmx_mode_fixup(encoder, mode, adjusted_mode);
357 188
@@ -455,9 +286,6 @@ static void radeon_legacy_primary_dac_mode_set(struct drm_encoder *encoder,
455 286
456 DRM_DEBUG("\n"); 287 DRM_DEBUG("\n");
457 288
458 if (radeon_crtc->crtc_id == 0)
459 radeon_legacy_rmx_mode_set(encoder, mode, adjusted_mode);
460
461 if (radeon_crtc->crtc_id == 0) { 289 if (radeon_crtc->crtc_id == 0) {
462 if (rdev->family == CHIP_R200 || ASIC_IS_R300(rdev)) { 290 if (rdev->family == CHIP_R200 || ASIC_IS_R300(rdev)) {
463 disp_output_cntl = RREG32(RADEON_DISP_OUTPUT_CNTL) & 291 disp_output_cntl = RREG32(RADEON_DISP_OUTPUT_CNTL) &
@@ -653,9 +481,6 @@ static void radeon_legacy_tmds_int_mode_set(struct drm_encoder *encoder,
653 481
654 DRM_DEBUG("\n"); 482 DRM_DEBUG("\n");
655 483
656 if (radeon_crtc->crtc_id == 0)
657 radeon_legacy_rmx_mode_set(encoder, mode, adjusted_mode);
658
659 tmp = tmds_pll_cntl = RREG32(RADEON_TMDS_PLL_CNTL); 484 tmp = tmds_pll_cntl = RREG32(RADEON_TMDS_PLL_CNTL);
660 tmp &= 0xfffff; 485 tmp &= 0xfffff;
661 if (rdev->family == CHIP_RV280) { 486 if (rdev->family == CHIP_RV280) {
@@ -711,7 +536,7 @@ static void radeon_legacy_tmds_int_mode_set(struct drm_encoder *encoder,
711 if (radeon_crtc->crtc_id == 0) { 536 if (radeon_crtc->crtc_id == 0) {
712 if (ASIC_IS_R300(rdev) || rdev->family == CHIP_R200) { 537 if (ASIC_IS_R300(rdev) || rdev->family == CHIP_R200) {
713 fp_gen_cntl &= ~R200_FP_SOURCE_SEL_MASK; 538 fp_gen_cntl &= ~R200_FP_SOURCE_SEL_MASK;
714 if (radeon_encoder->flags & RADEON_USE_RMX) 539 if (radeon_encoder->rmx_type != RMX_OFF)
715 fp_gen_cntl |= R200_FP_SOURCE_SEL_RMX; 540 fp_gen_cntl |= R200_FP_SOURCE_SEL_RMX;
716 else 541 else
717 fp_gen_cntl |= R200_FP_SOURCE_SEL_CRTC1; 542 fp_gen_cntl |= R200_FP_SOURCE_SEL_CRTC1;
@@ -820,9 +645,6 @@ static void radeon_legacy_tmds_ext_mode_set(struct drm_encoder *encoder,
820 645
821 DRM_DEBUG("\n"); 646 DRM_DEBUG("\n");
822 647
823 if (radeon_crtc->crtc_id == 0)
824 radeon_legacy_rmx_mode_set(encoder, mode, adjusted_mode);
825
826 if (rdev->is_atom_bios) { 648 if (rdev->is_atom_bios) {
827 radeon_encoder->pixel_clock = adjusted_mode->clock; 649 radeon_encoder->pixel_clock = adjusted_mode->clock;
828 atombios_external_tmds_setup(encoder, ATOM_ENABLE); 650 atombios_external_tmds_setup(encoder, ATOM_ENABLE);
@@ -856,7 +678,7 @@ static void radeon_legacy_tmds_ext_mode_set(struct drm_encoder *encoder,
856 if (radeon_crtc->crtc_id == 0) { 678 if (radeon_crtc->crtc_id == 0) {
857 if ((rdev->family == CHIP_R200) || ASIC_IS_R300(rdev)) { 679 if ((rdev->family == CHIP_R200) || ASIC_IS_R300(rdev)) {
858 fp2_gen_cntl &= ~R200_FP2_SOURCE_SEL_MASK; 680 fp2_gen_cntl &= ~R200_FP2_SOURCE_SEL_MASK;
859 if (radeon_encoder->flags & RADEON_USE_RMX) 681 if (radeon_encoder->rmx_type != RMX_OFF)
860 fp2_gen_cntl |= R200_FP2_SOURCE_SEL_RMX; 682 fp2_gen_cntl |= R200_FP2_SOURCE_SEL_RMX;
861 else 683 else
862 fp2_gen_cntl |= R200_FP2_SOURCE_SEL_CRTC1; 684 fp2_gen_cntl |= R200_FP2_SOURCE_SEL_CRTC1;
@@ -1014,9 +836,6 @@ static void radeon_legacy_tv_dac_mode_set(struct drm_encoder *encoder,
1014 836
1015 DRM_DEBUG("\n"); 837 DRM_DEBUG("\n");
1016 838
1017 if (radeon_crtc->crtc_id == 0)
1018 radeon_legacy_rmx_mode_set(encoder, mode, adjusted_mode);
1019
1020 if (rdev->family != CHIP_R200) { 839 if (rdev->family != CHIP_R200) {
1021 tv_dac_cntl = RREG32(RADEON_TV_DAC_CNTL); 840 tv_dac_cntl = RREG32(RADEON_TV_DAC_CNTL);
1022 if (rdev->family == CHIP_R420 || 841 if (rdev->family == CHIP_R420 ||
@@ -1243,6 +1062,7 @@ radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_id, uint32_t
1243 1062
1244 radeon_encoder->encoder_id = encoder_id; 1063 radeon_encoder->encoder_id = encoder_id;
1245 radeon_encoder->devices = supported_device; 1064 radeon_encoder->devices = supported_device;
1065 radeon_encoder->rmx_type = RMX_OFF;
1246 1066
1247 switch (radeon_encoder->encoder_id) { 1067 switch (radeon_encoder->encoder_id) {
1248 case ENCODER_OBJECT_ID_INTERNAL_LVDS: 1068 case ENCODER_OBJECT_ID_INTERNAL_LVDS:
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
index 9173b687462..3b09a1f2d8f 100644
--- a/drivers/gpu/drm/radeon/radeon_mode.h
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
@@ -36,6 +36,9 @@
36#include <linux/i2c.h> 36#include <linux/i2c.h>
37#include <linux/i2c-id.h> 37#include <linux/i2c-id.h>
38#include <linux/i2c-algo-bit.h> 38#include <linux/i2c-algo-bit.h>
39#include "radeon_fixed.h"
40
41struct radeon_device;
39 42
40#define to_radeon_crtc(x) container_of(x, struct radeon_crtc, base) 43#define to_radeon_crtc(x) container_of(x, struct radeon_crtc, base)
41#define to_radeon_connector(x) container_of(x, struct radeon_connector, base) 44#define to_radeon_connector(x) container_of(x, struct radeon_connector, base)
@@ -124,6 +127,7 @@ struct radeon_tmds_pll {
124#define RADEON_PLL_PREFER_LOW_POST_DIV (1 << 8) 127#define RADEON_PLL_PREFER_LOW_POST_DIV (1 << 8)
125#define RADEON_PLL_PREFER_HIGH_POST_DIV (1 << 9) 128#define RADEON_PLL_PREFER_HIGH_POST_DIV (1 << 9)
126#define RADEON_PLL_USE_FRAC_FB_DIV (1 << 10) 129#define RADEON_PLL_USE_FRAC_FB_DIV (1 << 10)
130#define RADEON_PLL_PREFER_CLOSEST_LOWER (1 << 11)
127 131
128struct radeon_pll { 132struct radeon_pll {
129 uint16_t reference_freq; 133 uint16_t reference_freq;
@@ -170,6 +174,18 @@ struct radeon_mode_info {
170 struct atom_context *atom_context; 174 struct atom_context *atom_context;
171 enum radeon_connector_table connector_table; 175 enum radeon_connector_table connector_table;
172 bool mode_config_initialized; 176 bool mode_config_initialized;
177 struct radeon_crtc *crtcs[2];
178};
179
180struct radeon_native_mode {
181 /* preferred mode */
182 uint32_t panel_xres, panel_yres;
183 uint32_t hoverplus, hsync_width;
184 uint32_t hblank;
185 uint32_t voverplus, vsync_width;
186 uint32_t vblank;
187 uint32_t dotclock;
188 uint32_t flags;
173}; 189};
174 190
175struct radeon_crtc { 191struct radeon_crtc {
@@ -185,19 +201,13 @@ struct radeon_crtc {
185 uint64_t cursor_addr; 201 uint64_t cursor_addr;
186 int cursor_width; 202 int cursor_width;
187 int cursor_height; 203 int cursor_height;
188}; 204 uint32_t legacy_display_base_addr;
189 205 uint32_t legacy_cursor_offset;
190#define RADEON_USE_RMX 1 206 enum radeon_rmx_type rmx_type;
191 207 uint32_t devices;
192struct radeon_native_mode { 208 fixed20_12 vsc;
193 /* preferred mode */ 209 fixed20_12 hsc;
194 uint32_t panel_xres, panel_yres; 210 struct radeon_native_mode native_mode;
195 uint32_t hoverplus, hsync_width;
196 uint32_t hblank;
197 uint32_t voverplus, vsync_width;
198 uint32_t vblank;
199 uint32_t dotclock;
200 uint32_t flags;
201}; 211};
202 212
203struct radeon_encoder_primary_dac { 213struct radeon_encoder_primary_dac {
@@ -383,16 +393,9 @@ void radeon_enc_destroy(struct drm_encoder *encoder);
383void radeon_copy_fb(struct drm_device *dev, struct drm_gem_object *dst_obj); 393void radeon_copy_fb(struct drm_device *dev, struct drm_gem_object *dst_obj);
384void radeon_combios_asic_init(struct drm_device *dev); 394void radeon_combios_asic_init(struct drm_device *dev);
385extern int radeon_static_clocks_init(struct drm_device *dev); 395extern int radeon_static_clocks_init(struct drm_device *dev);
386void radeon_init_disp_bw_legacy(struct drm_device *dev, 396bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
387 struct drm_display_mode *mode1, 397 struct drm_display_mode *mode,
388 uint32_t pixel_bytes1, 398 struct drm_display_mode *adjusted_mode);
389 struct drm_display_mode *mode2, 399void atom_rv515_force_tv_scaler(struct radeon_device *rdev);
390 uint32_t pixel_bytes2);
391void radeon_init_disp_bw_avivo(struct drm_device *dev,
392 struct drm_display_mode *mode1,
393 uint32_t pixel_bytes1,
394 struct drm_display_mode *mode2,
395 uint32_t pixel_bytes2);
396void radeon_init_disp_bandwidth(struct drm_device *dev);
397 400
398#endif 401#endif
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index bac0d06c52a..e98cae3bf4a 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -44,6 +44,9 @@ struct radeon_object {
44 uint64_t gpu_addr; 44 uint64_t gpu_addr;
45 void *kptr; 45 void *kptr;
46 bool is_iomem; 46 bool is_iomem;
47 uint32_t tiling_flags;
48 uint32_t pitch;
49 int surface_reg;
47}; 50};
48 51
49int radeon_ttm_init(struct radeon_device *rdev); 52int radeon_ttm_init(struct radeon_device *rdev);
@@ -70,6 +73,7 @@ static void radeon_ttm_object_object_destroy(struct ttm_buffer_object *tobj)
70 73
71 robj = container_of(tobj, struct radeon_object, tobj); 74 robj = container_of(tobj, struct radeon_object, tobj);
72 list_del_init(&robj->list); 75 list_del_init(&robj->list);
76 radeon_object_clear_surface_reg(robj);
73 kfree(robj); 77 kfree(robj);
74} 78}
75 79
@@ -99,16 +103,16 @@ static inline uint32_t radeon_object_flags_from_domain(uint32_t domain)
99{ 103{
100 uint32_t flags = 0; 104 uint32_t flags = 0;
101 if (domain & RADEON_GEM_DOMAIN_VRAM) { 105 if (domain & RADEON_GEM_DOMAIN_VRAM) {
102 flags |= TTM_PL_FLAG_VRAM; 106 flags |= TTM_PL_FLAG_VRAM | TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED;
103 } 107 }
104 if (domain & RADEON_GEM_DOMAIN_GTT) { 108 if (domain & RADEON_GEM_DOMAIN_GTT) {
105 flags |= TTM_PL_FLAG_TT; 109 flags |= TTM_PL_FLAG_TT | TTM_PL_MASK_CACHING;
106 } 110 }
107 if (domain & RADEON_GEM_DOMAIN_CPU) { 111 if (domain & RADEON_GEM_DOMAIN_CPU) {
108 flags |= TTM_PL_FLAG_SYSTEM; 112 flags |= TTM_PL_FLAG_SYSTEM | TTM_PL_MASK_CACHING;
109 } 113 }
110 if (!flags) { 114 if (!flags) {
111 flags |= TTM_PL_FLAG_SYSTEM; 115 flags |= TTM_PL_FLAG_SYSTEM | TTM_PL_MASK_CACHING;
112 } 116 }
113 return flags; 117 return flags;
114} 118}
@@ -141,6 +145,7 @@ int radeon_object_create(struct radeon_device *rdev,
141 } 145 }
142 robj->rdev = rdev; 146 robj->rdev = rdev;
143 robj->gobj = gobj; 147 robj->gobj = gobj;
148 robj->surface_reg = -1;
144 INIT_LIST_HEAD(&robj->list); 149 INIT_LIST_HEAD(&robj->list);
145 150
146 flags = radeon_object_flags_from_domain(domain); 151 flags = radeon_object_flags_from_domain(domain);
@@ -304,7 +309,7 @@ int radeon_object_wait(struct radeon_object *robj)
304 } 309 }
305 spin_lock(&robj->tobj.lock); 310 spin_lock(&robj->tobj.lock);
306 if (robj->tobj.sync_obj) { 311 if (robj->tobj.sync_obj) {
307 r = ttm_bo_wait(&robj->tobj, true, false, false); 312 r = ttm_bo_wait(&robj->tobj, true, true, false);
308 } 313 }
309 spin_unlock(&robj->tobj.lock); 314 spin_unlock(&robj->tobj.lock);
310 radeon_object_unreserve(robj); 315 radeon_object_unreserve(robj);
@@ -403,7 +408,6 @@ int radeon_object_list_validate(struct list_head *head, void *fence)
403 struct radeon_object *robj; 408 struct radeon_object *robj;
404 struct radeon_fence *old_fence = NULL; 409 struct radeon_fence *old_fence = NULL;
405 struct list_head *i; 410 struct list_head *i;
406 uint32_t flags;
407 int r; 411 int r;
408 412
409 r = radeon_object_list_reserve(head); 413 r = radeon_object_list_reserve(head);
@@ -414,27 +418,25 @@ int radeon_object_list_validate(struct list_head *head, void *fence)
414 list_for_each(i, head) { 418 list_for_each(i, head) {
415 lobj = list_entry(i, struct radeon_object_list, list); 419 lobj = list_entry(i, struct radeon_object_list, list);
416 robj = lobj->robj; 420 robj = lobj->robj;
417 if (lobj->wdomain) {
418 flags = radeon_object_flags_from_domain(lobj->wdomain);
419 flags |= TTM_PL_FLAG_TT;
420 } else {
421 flags = radeon_object_flags_from_domain(lobj->rdomain);
422 flags |= TTM_PL_FLAG_TT;
423 flags |= TTM_PL_FLAG_VRAM;
424 }
425 if (!robj->pin_count) { 421 if (!robj->pin_count) {
426 robj->tobj.proposed_placement = flags | TTM_PL_MASK_CACHING; 422 if (lobj->wdomain) {
423 robj->tobj.proposed_placement =
424 radeon_object_flags_from_domain(lobj->wdomain);
425 } else {
426 robj->tobj.proposed_placement =
427 radeon_object_flags_from_domain(lobj->rdomain);
428 }
427 r = ttm_buffer_object_validate(&robj->tobj, 429 r = ttm_buffer_object_validate(&robj->tobj,
428 robj->tobj.proposed_placement, 430 robj->tobj.proposed_placement,
429 true, false); 431 true, false);
430 if (unlikely(r)) { 432 if (unlikely(r)) {
431 radeon_object_list_unreserve(head);
432 DRM_ERROR("radeon: failed to validate.\n"); 433 DRM_ERROR("radeon: failed to validate.\n");
433 return r; 434 return r;
434 } 435 }
435 radeon_object_gpu_addr(robj); 436 radeon_object_gpu_addr(robj);
436 } 437 }
437 lobj->gpu_offset = robj->gpu_addr; 438 lobj->gpu_offset = robj->gpu_addr;
439 lobj->tiling_flags = robj->tiling_flags;
438 if (fence) { 440 if (fence) {
439 old_fence = (struct radeon_fence *)robj->tobj.sync_obj; 441 old_fence = (struct radeon_fence *)robj->tobj.sync_obj;
440 robj->tobj.sync_obj = radeon_fence_ref(fence); 442 robj->tobj.sync_obj = radeon_fence_ref(fence);
@@ -479,3 +481,127 @@ unsigned long radeon_object_size(struct radeon_object *robj)
479{ 481{
480 return robj->tobj.num_pages << PAGE_SHIFT; 482 return robj->tobj.num_pages << PAGE_SHIFT;
481} 483}
484
485int radeon_object_get_surface_reg(struct radeon_object *robj)
486{
487 struct radeon_device *rdev = robj->rdev;
488 struct radeon_surface_reg *reg;
489 struct radeon_object *old_object;
490 int steal;
491 int i;
492
493 if (!robj->tiling_flags)
494 return 0;
495
496 if (robj->surface_reg >= 0) {
497 reg = &rdev->surface_regs[robj->surface_reg];
498 i = robj->surface_reg;
499 goto out;
500 }
501
502 steal = -1;
503 for (i = 0; i < RADEON_GEM_MAX_SURFACES; i++) {
504
505 reg = &rdev->surface_regs[i];
506 if (!reg->robj)
507 break;
508
509 old_object = reg->robj;
510 if (old_object->pin_count == 0)
511 steal = i;
512 }
513
514 /* if we are all out */
515 if (i == RADEON_GEM_MAX_SURFACES) {
516 if (steal == -1)
517 return -ENOMEM;
518 /* find someone with a surface reg and nuke their BO */
519 reg = &rdev->surface_regs[steal];
520 old_object = reg->robj;
521 /* blow away the mapping */
522 DRM_DEBUG("stealing surface reg %d from %p\n", steal, old_object);
523 ttm_bo_unmap_virtual(&old_object->tobj);
524 old_object->surface_reg = -1;
525 i = steal;
526 }
527
528 robj->surface_reg = i;
529 reg->robj = robj;
530
531out:
532 radeon_set_surface_reg(rdev, i, robj->tiling_flags, robj->pitch,
533 robj->tobj.mem.mm_node->start << PAGE_SHIFT,
534 robj->tobj.num_pages << PAGE_SHIFT);
535 return 0;
536}
537
538void radeon_object_clear_surface_reg(struct radeon_object *robj)
539{
540 struct radeon_device *rdev = robj->rdev;
541 struct radeon_surface_reg *reg;
542
543 if (robj->surface_reg == -1)
544 return;
545
546 reg = &rdev->surface_regs[robj->surface_reg];
547 radeon_clear_surface_reg(rdev, robj->surface_reg);
548
549 reg->robj = NULL;
550 robj->surface_reg = -1;
551}
552
553void radeon_object_set_tiling_flags(struct radeon_object *robj,
554 uint32_t tiling_flags, uint32_t pitch)
555{
556 robj->tiling_flags = tiling_flags;
557 robj->pitch = pitch;
558}
559
560void radeon_object_get_tiling_flags(struct radeon_object *robj,
561 uint32_t *tiling_flags,
562 uint32_t *pitch)
563{
564 if (tiling_flags)
565 *tiling_flags = robj->tiling_flags;
566 if (pitch)
567 *pitch = robj->pitch;
568}
569
570int radeon_object_check_tiling(struct radeon_object *robj, bool has_moved,
571 bool force_drop)
572{
573 if (!(robj->tiling_flags & RADEON_TILING_SURFACE))
574 return 0;
575
576 if (force_drop) {
577 radeon_object_clear_surface_reg(robj);
578 return 0;
579 }
580
581 if (robj->tobj.mem.mem_type != TTM_PL_VRAM) {
582 if (!has_moved)
583 return 0;
584
585 if (robj->surface_reg >= 0)
586 radeon_object_clear_surface_reg(robj);
587 return 0;
588 }
589
590 if ((robj->surface_reg >= 0) && !has_moved)
591 return 0;
592
593 return radeon_object_get_surface_reg(robj);
594}
595
596void radeon_bo_move_notify(struct ttm_buffer_object *bo,
597 struct ttm_mem_reg *mem)
598{
599 struct radeon_object *robj = container_of(bo, struct radeon_object, tobj);
600 radeon_object_check_tiling(robj, 0, 1);
601}
602
603void radeon_bo_fault_reserve_notify(struct ttm_buffer_object *bo)
604{
605 struct radeon_object *robj = container_of(bo, struct radeon_object, tobj);
606 radeon_object_check_tiling(robj, 0, 0);
607}
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
index a853261d188..60d159308b8 100644
--- a/drivers/gpu/drm/radeon/radeon_ring.c
+++ b/drivers/gpu/drm/radeon/radeon_ring.c
@@ -126,32 +126,19 @@ static void radeon_ib_align(struct radeon_device *rdev, struct radeon_ib *ib)
126 } 126 }
127} 127}
128 128
129static void radeon_ib_cpu_flush(struct radeon_device *rdev,
130 struct radeon_ib *ib)
131{
132 unsigned long tmp;
133 unsigned i;
134
135 /* To force CPU cache flush ugly but seems reliable */
136 for (i = 0; i < ib->length_dw; i += (rdev->cp.align_mask + 1)) {
137 tmp = readl(&ib->ptr[i]);
138 }
139}
140
141int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib) 129int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib)
142{ 130{
143 int r = 0; 131 int r = 0;
144 132
145 mutex_lock(&rdev->ib_pool.mutex); 133 mutex_lock(&rdev->ib_pool.mutex);
146 radeon_ib_align(rdev, ib); 134 radeon_ib_align(rdev, ib);
147 radeon_ib_cpu_flush(rdev, ib);
148 if (!ib->length_dw || !rdev->cp.ready) { 135 if (!ib->length_dw || !rdev->cp.ready) {
149 /* TODO: Nothings in the ib we should report. */ 136 /* TODO: Nothings in the ib we should report. */
150 mutex_unlock(&rdev->ib_pool.mutex); 137 mutex_unlock(&rdev->ib_pool.mutex);
151 DRM_ERROR("radeon: couldn't schedule IB(%lu).\n", ib->idx); 138 DRM_ERROR("radeon: couldn't schedule IB(%lu).\n", ib->idx);
152 return -EINVAL; 139 return -EINVAL;
153 } 140 }
154 /* 64 dwords should be enought for fence too */ 141 /* 64 dwords should be enough for fence too */
155 r = radeon_ring_lock(rdev, 64); 142 r = radeon_ring_lock(rdev, 64);
156 if (r) { 143 if (r) {
157 DRM_ERROR("radeon: scheduling IB failled (%d).\n", r); 144 DRM_ERROR("radeon: scheduling IB failled (%d).\n", r);
diff --git a/drivers/gpu/drm/radeon/radeon_share.h b/drivers/gpu/drm/radeon/radeon_share.h
new file mode 100644
index 00000000000..63a773578f1
--- /dev/null
+++ b/drivers/gpu/drm/radeon/radeon_share.h
@@ -0,0 +1,39 @@
1/*
2 * Copyright 2008 Advanced Micro Devices, Inc.
3 * Copyright 2008 Red Hat Inc.
4 * Copyright 2009 Jerome Glisse.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the 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 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
23 *
24 * Authors: Dave Airlie
25 * Alex Deucher
26 * Jerome Glisse
27 */
28#ifndef __RADEON_SHARE_H__
29#define __RADEON_SHARE_H__
30
31void r100_vram_init_sizes(struct radeon_device *rdev);
32
33void rs690_line_buffer_adjust(struct radeon_device *rdev,
34 struct drm_display_mode *mode1,
35 struct drm_display_mode *mode2);
36
37void rv515_bandwidth_avivo_update(struct radeon_device *rdev);
38
39#endif
diff --git a/drivers/gpu/drm/radeon/radeon_test.c b/drivers/gpu/drm/radeon/radeon_test.c
new file mode 100644
index 00000000000..03c33cf4e14
--- /dev/null
+++ b/drivers/gpu/drm/radeon/radeon_test.c
@@ -0,0 +1,209 @@
1/*
2 * Copyright 2009 VMware, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 * Authors: Michel Dänzer
23 */
24#include <drm/drmP.h>
25#include <drm/radeon_drm.h>
26#include "radeon_reg.h"
27#include "radeon.h"
28
29
30/* Test BO GTT->VRAM and VRAM->GTT GPU copies across the whole GTT aperture */
31void radeon_test_moves(struct radeon_device *rdev)
32{
33 struct radeon_object *vram_obj = NULL;
34 struct radeon_object **gtt_obj = NULL;
35 struct radeon_fence *fence = NULL;
36 uint64_t gtt_addr, vram_addr;
37 unsigned i, n, size;
38 int r;
39
40 size = 1024 * 1024;
41
42 /* Number of tests =
43 * (Total GTT - IB pool - writeback page - ring buffer) / test size
44 */
45 n = (rdev->mc.gtt_size - RADEON_IB_POOL_SIZE*64*1024 - 4096 -
46 rdev->cp.ring_size) / size;
47
48 gtt_obj = kzalloc(n * sizeof(*gtt_obj), GFP_KERNEL);
49 if (!gtt_obj) {
50 DRM_ERROR("Failed to allocate %d pointers\n", n);
51 r = 1;
52 goto out_cleanup;
53 }
54
55 r = radeon_object_create(rdev, NULL, size, true, RADEON_GEM_DOMAIN_VRAM,
56 false, &vram_obj);
57 if (r) {
58 DRM_ERROR("Failed to create VRAM object\n");
59 goto out_cleanup;
60 }
61
62 r = radeon_object_pin(vram_obj, RADEON_GEM_DOMAIN_VRAM, &vram_addr);
63 if (r) {
64 DRM_ERROR("Failed to pin VRAM object\n");
65 goto out_cleanup;
66 }
67
68 for (i = 0; i < n; i++) {
69 void *gtt_map, *vram_map;
70 void **gtt_start, **gtt_end;
71 void **vram_start, **vram_end;
72
73 r = radeon_object_create(rdev, NULL, size, true,
74 RADEON_GEM_DOMAIN_GTT, false, gtt_obj + i);
75 if (r) {
76 DRM_ERROR("Failed to create GTT object %d\n", i);
77 goto out_cleanup;
78 }
79
80 r = radeon_object_pin(gtt_obj[i], RADEON_GEM_DOMAIN_GTT, &gtt_addr);
81 if (r) {
82 DRM_ERROR("Failed to pin GTT object %d\n", i);
83 goto out_cleanup;
84 }
85
86 r = radeon_object_kmap(gtt_obj[i], &gtt_map);
87 if (r) {
88 DRM_ERROR("Failed to map GTT object %d\n", i);
89 goto out_cleanup;
90 }
91
92 for (gtt_start = gtt_map, gtt_end = gtt_map + size;
93 gtt_start < gtt_end;
94 gtt_start++)
95 *gtt_start = gtt_start;
96
97 radeon_object_kunmap(gtt_obj[i]);
98
99 r = radeon_fence_create(rdev, &fence);
100 if (r) {
101 DRM_ERROR("Failed to create GTT->VRAM fence %d\n", i);
102 goto out_cleanup;
103 }
104
105 r = radeon_copy(rdev, gtt_addr, vram_addr, size / 4096, fence);
106 if (r) {
107 DRM_ERROR("Failed GTT->VRAM copy %d\n", i);
108 goto out_cleanup;
109 }
110
111 r = radeon_fence_wait(fence, false);
112 if (r) {
113 DRM_ERROR("Failed to wait for GTT->VRAM fence %d\n", i);
114 goto out_cleanup;
115 }
116
117 radeon_fence_unref(&fence);
118
119 r = radeon_object_kmap(vram_obj, &vram_map);
120 if (r) {
121 DRM_ERROR("Failed to map VRAM object after copy %d\n", i);
122 goto out_cleanup;
123 }
124
125 for (gtt_start = gtt_map, gtt_end = gtt_map + size,
126 vram_start = vram_map, vram_end = vram_map + size;
127 vram_start < vram_end;
128 gtt_start++, vram_start++) {
129 if (*vram_start != gtt_start) {
130 DRM_ERROR("Incorrect GTT->VRAM copy %d: Got 0x%p, "
131 "expected 0x%p (GTT map 0x%p-0x%p)\n",
132 i, *vram_start, gtt_start, gtt_map,
133 gtt_end);
134 radeon_object_kunmap(vram_obj);
135 goto out_cleanup;
136 }
137 *vram_start = vram_start;
138 }
139
140 radeon_object_kunmap(vram_obj);
141
142 r = radeon_fence_create(rdev, &fence);
143 if (r) {
144 DRM_ERROR("Failed to create VRAM->GTT fence %d\n", i);
145 goto out_cleanup;
146 }
147
148 r = radeon_copy(rdev, vram_addr, gtt_addr, size / 4096, fence);
149 if (r) {
150 DRM_ERROR("Failed VRAM->GTT copy %d\n", i);
151 goto out_cleanup;
152 }
153
154 r = radeon_fence_wait(fence, false);
155 if (r) {
156 DRM_ERROR("Failed to wait for VRAM->GTT fence %d\n", i);
157 goto out_cleanup;
158 }
159
160 radeon_fence_unref(&fence);
161
162 r = radeon_object_kmap(gtt_obj[i], &gtt_map);
163 if (r) {
164 DRM_ERROR("Failed to map GTT object after copy %d\n", i);
165 goto out_cleanup;
166 }
167
168 for (gtt_start = gtt_map, gtt_end = gtt_map + size,
169 vram_start = vram_map, vram_end = vram_map + size;
170 gtt_start < gtt_end;
171 gtt_start++, vram_start++) {
172 if (*gtt_start != vram_start) {
173 DRM_ERROR("Incorrect VRAM->GTT copy %d: Got 0x%p, "
174 "expected 0x%p (VRAM map 0x%p-0x%p)\n",
175 i, *gtt_start, vram_start, vram_map,
176 vram_end);
177 radeon_object_kunmap(gtt_obj[i]);
178 goto out_cleanup;
179 }
180 }
181
182 radeon_object_kunmap(gtt_obj[i]);
183
184 DRM_INFO("Tested GTT->VRAM and VRAM->GTT copy for GTT offset 0x%llx\n",
185 gtt_addr - rdev->mc.gtt_location);
186 }
187
188out_cleanup:
189 if (vram_obj) {
190 radeon_object_unpin(vram_obj);
191 radeon_object_unref(&vram_obj);
192 }
193 if (gtt_obj) {
194 for (i = 0; i < n; i++) {
195 if (gtt_obj[i]) {
196 radeon_object_unpin(gtt_obj[i]);
197 radeon_object_unref(&gtt_obj[i]);
198 }
199 }
200 kfree(gtt_obj);
201 }
202 if (fence) {
203 radeon_fence_unref(&fence);
204 }
205 if (r) {
206 printk(KERN_WARNING "Error while testing BO move.\n");
207 }
208}
209
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 1227a97f516..15c3531377e 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -355,23 +355,26 @@ static int radeon_bo_move(struct ttm_buffer_object *bo,
355 if (!rdev->cp.ready) { 355 if (!rdev->cp.ready) {
356 /* use memcpy */ 356 /* use memcpy */
357 DRM_ERROR("CP is not ready use memcpy.\n"); 357 DRM_ERROR("CP is not ready use memcpy.\n");
358 return ttm_bo_move_memcpy(bo, evict, no_wait, new_mem); 358 goto memcpy;
359 } 359 }
360 360
361 if (old_mem->mem_type == TTM_PL_VRAM && 361 if (old_mem->mem_type == TTM_PL_VRAM &&
362 new_mem->mem_type == TTM_PL_SYSTEM) { 362 new_mem->mem_type == TTM_PL_SYSTEM) {
363 return radeon_move_vram_ram(bo, evict, interruptible, 363 r = radeon_move_vram_ram(bo, evict, interruptible,
364 no_wait, new_mem); 364 no_wait, new_mem);
365 } else if (old_mem->mem_type == TTM_PL_SYSTEM && 365 } else if (old_mem->mem_type == TTM_PL_SYSTEM &&
366 new_mem->mem_type == TTM_PL_VRAM) { 366 new_mem->mem_type == TTM_PL_VRAM) {
367 return radeon_move_ram_vram(bo, evict, interruptible, 367 r = radeon_move_ram_vram(bo, evict, interruptible,
368 no_wait, new_mem); 368 no_wait, new_mem);
369 } else { 369 } else {
370 r = radeon_move_blit(bo, evict, no_wait, new_mem, old_mem); 370 r = radeon_move_blit(bo, evict, no_wait, new_mem, old_mem);
371 if (unlikely(r)) {
372 return r;
373 }
374 } 371 }
372
373 if (r) {
374memcpy:
375 r = ttm_bo_move_memcpy(bo, evict, no_wait, new_mem);
376 }
377
375 return r; 378 return r;
376} 379}
377 380
@@ -429,6 +432,8 @@ static struct ttm_bo_driver radeon_bo_driver = {
429 .sync_obj_flush = &radeon_sync_obj_flush, 432 .sync_obj_flush = &radeon_sync_obj_flush,
430 .sync_obj_unref = &radeon_sync_obj_unref, 433 .sync_obj_unref = &radeon_sync_obj_unref,
431 .sync_obj_ref = &radeon_sync_obj_ref, 434 .sync_obj_ref = &radeon_sync_obj_ref,
435 .move_notify = &radeon_bo_move_notify,
436 .fault_reserve_notify = &radeon_bo_fault_reserve_notify,
432}; 437};
433 438
434int radeon_ttm_init(struct radeon_device *rdev) 439int radeon_ttm_init(struct radeon_device *rdev)
@@ -442,13 +447,14 @@ int radeon_ttm_init(struct radeon_device *rdev)
442 /* No others user of address space so set it to 0 */ 447 /* No others user of address space so set it to 0 */
443 r = ttm_bo_device_init(&rdev->mman.bdev, 448 r = ttm_bo_device_init(&rdev->mman.bdev,
444 rdev->mman.mem_global_ref.object, 449 rdev->mman.mem_global_ref.object,
445 &radeon_bo_driver, DRM_FILE_PAGE_OFFSET); 450 &radeon_bo_driver, DRM_FILE_PAGE_OFFSET,
451 rdev->need_dma32);
446 if (r) { 452 if (r) {
447 DRM_ERROR("failed initializing buffer object driver(%d).\n", r); 453 DRM_ERROR("failed initializing buffer object driver(%d).\n", r);
448 return r; 454 return r;
449 } 455 }
450 r = ttm_bo_init_mm(&rdev->mman.bdev, TTM_PL_VRAM, 0, 456 r = ttm_bo_init_mm(&rdev->mman.bdev, TTM_PL_VRAM, 0,
451 ((rdev->mc.aper_size) >> PAGE_SHIFT)); 457 ((rdev->mc.real_vram_size) >> PAGE_SHIFT));
452 if (r) { 458 if (r) {
453 DRM_ERROR("Failed initializing VRAM heap.\n"); 459 DRM_ERROR("Failed initializing VRAM heap.\n");
454 return r; 460 return r;
@@ -465,7 +471,7 @@ int radeon_ttm_init(struct radeon_device *rdev)
465 return r; 471 return r;
466 } 472 }
467 DRM_INFO("radeon: %uM of VRAM memory ready\n", 473 DRM_INFO("radeon: %uM of VRAM memory ready\n",
468 rdev->mc.vram_size / (1024 * 1024)); 474 rdev->mc.real_vram_size / (1024 * 1024));
469 r = ttm_bo_init_mm(&rdev->mman.bdev, TTM_PL_TT, 0, 475 r = ttm_bo_init_mm(&rdev->mman.bdev, TTM_PL_TT, 0,
470 ((rdev->mc.gtt_size) >> PAGE_SHIFT)); 476 ((rdev->mc.gtt_size) >> PAGE_SHIFT));
471 if (r) { 477 if (r) {
diff --git a/drivers/gpu/drm/radeon/rs400.c b/drivers/gpu/drm/radeon/rs400.c
index cc074b5a8f7..b29affd9c5d 100644
--- a/drivers/gpu/drm/radeon/rs400.c
+++ b/drivers/gpu/drm/radeon/rs400.c
@@ -29,6 +29,7 @@
29#include <drm/drmP.h> 29#include <drm/drmP.h>
30#include "radeon_reg.h" 30#include "radeon_reg.h"
31#include "radeon.h" 31#include "radeon.h"
32#include "radeon_share.h"
32 33
33/* rs400,rs480 depends on : */ 34/* rs400,rs480 depends on : */
34void r100_hdp_reset(struct radeon_device *rdev); 35void r100_hdp_reset(struct radeon_device *rdev);
@@ -164,7 +165,9 @@ int rs400_gart_enable(struct radeon_device *rdev)
164 WREG32(RADEON_BUS_CNTL, tmp); 165 WREG32(RADEON_BUS_CNTL, tmp);
165 } 166 }
166 /* Table should be in 32bits address space so ignore bits above. */ 167 /* Table should be in 32bits address space so ignore bits above. */
167 tmp = rdev->gart.table_addr & 0xfffff000; 168 tmp = (u32)rdev->gart.table_addr & 0xfffff000;
169 tmp |= (upper_32_bits(rdev->gart.table_addr) & 0xff) << 4;
170
168 WREG32_MC(RS480_GART_BASE, tmp); 171 WREG32_MC(RS480_GART_BASE, tmp);
169 /* TODO: more tweaking here */ 172 /* TODO: more tweaking here */
170 WREG32_MC(RS480_GART_FEATURE_ID, 173 WREG32_MC(RS480_GART_FEATURE_ID,
@@ -201,10 +204,17 @@ void rs400_gart_disable(struct radeon_device *rdev)
201 204
202int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr) 205int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr)
203{ 206{
207 uint32_t entry;
208
204 if (i < 0 || i > rdev->gart.num_gpu_pages) { 209 if (i < 0 || i > rdev->gart.num_gpu_pages) {
205 return -EINVAL; 210 return -EINVAL;
206 } 211 }
207 rdev->gart.table.ram.ptr[i] = cpu_to_le32(((uint32_t)addr) | 0xC); 212
213 entry = (lower_32_bits(addr) & PAGE_MASK) |
214 ((upper_32_bits(addr) & 0xff) << 4) |
215 0xc;
216 entry = cpu_to_le32(entry);
217 rdev->gart.table.ram.ptr[i] = entry;
208 return 0; 218 return 0;
209} 219}
210 220
@@ -223,10 +233,9 @@ int rs400_mc_init(struct radeon_device *rdev)
223 233
224 rs400_gpu_init(rdev); 234 rs400_gpu_init(rdev);
225 rs400_gart_disable(rdev); 235 rs400_gart_disable(rdev);
226 rdev->mc.gtt_location = rdev->mc.vram_size; 236 rdev->mc.gtt_location = rdev->mc.mc_vram_size;
227 rdev->mc.gtt_location += (rdev->mc.gtt_size - 1); 237 rdev->mc.gtt_location += (rdev->mc.gtt_size - 1);
228 rdev->mc.gtt_location &= ~(rdev->mc.gtt_size - 1); 238 rdev->mc.gtt_location &= ~(rdev->mc.gtt_size - 1);
229 rdev->mc.vram_location = 0xFFFFFFFFUL;
230 r = radeon_mc_setup(rdev); 239 r = radeon_mc_setup(rdev);
231 if (r) { 240 if (r) {
232 return r; 241 return r;
@@ -238,7 +247,7 @@ int rs400_mc_init(struct radeon_device *rdev)
238 "programming pipes. Bad things might happen.\n"); 247 "programming pipes. Bad things might happen.\n");
239 } 248 }
240 249
241 tmp = rdev->mc.vram_location + rdev->mc.vram_size - 1; 250 tmp = rdev->mc.vram_location + rdev->mc.mc_vram_size - 1;
242 tmp = REG_SET(RADEON_MC_FB_TOP, tmp >> 16); 251 tmp = REG_SET(RADEON_MC_FB_TOP, tmp >> 16);
243 tmp |= REG_SET(RADEON_MC_FB_START, rdev->mc.vram_location >> 16); 252 tmp |= REG_SET(RADEON_MC_FB_START, rdev->mc.vram_location >> 16);
244 WREG32(RADEON_MC_FB_LOCATION, tmp); 253 WREG32(RADEON_MC_FB_LOCATION, tmp);
@@ -284,21 +293,12 @@ void rs400_gpu_init(struct radeon_device *rdev)
284 */ 293 */
285void rs400_vram_info(struct radeon_device *rdev) 294void rs400_vram_info(struct radeon_device *rdev)
286{ 295{
287 uint32_t tom;
288
289 rs400_gart_adjust_size(rdev); 296 rs400_gart_adjust_size(rdev);
290 /* DDR for all card after R300 & IGP */ 297 /* DDR for all card after R300 & IGP */
291 rdev->mc.vram_is_ddr = true; 298 rdev->mc.vram_is_ddr = true;
292 rdev->mc.vram_width = 128; 299 rdev->mc.vram_width = 128;
293 300
294 /* read NB_TOM to get the amount of ram stolen for the GPU */ 301 r100_vram_init_sizes(rdev);
295 tom = RREG32(RADEON_NB_TOM);
296 rdev->mc.vram_size = (((tom >> 16) - (tom & 0xffff) + 1) << 16);
297 WREG32(RADEON_CONFIG_MEMSIZE, rdev->mc.vram_size);
298
299 /* Could aper size report 0 ? */
300 rdev->mc.aper_base = drm_get_resource_start(rdev->ddev, 0);
301 rdev->mc.aper_size = drm_get_resource_len(rdev->ddev, 0);
302} 302}
303 303
304 304
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c
index ab0c967553e..bbea6dee4a9 100644
--- a/drivers/gpu/drm/radeon/rs600.c
+++ b/drivers/gpu/drm/radeon/rs600.c
@@ -223,7 +223,7 @@ int rs600_mc_init(struct radeon_device *rdev)
223 printk(KERN_WARNING "Failed to wait MC idle while " 223 printk(KERN_WARNING "Failed to wait MC idle while "
224 "programming pipes. Bad things might happen.\n"); 224 "programming pipes. Bad things might happen.\n");
225 } 225 }
226 tmp = rdev->mc.vram_location + rdev->mc.vram_size - 1; 226 tmp = rdev->mc.vram_location + rdev->mc.mc_vram_size - 1;
227 tmp = REG_SET(RS600_MC_FB_TOP, tmp >> 16); 227 tmp = REG_SET(RS600_MC_FB_TOP, tmp >> 16);
228 tmp |= REG_SET(RS600_MC_FB_START, rdev->mc.vram_location >> 16); 228 tmp |= REG_SET(RS600_MC_FB_START, rdev->mc.vram_location >> 16);
229 WREG32_MC(RS600_MC_FB_LOCATION, tmp); 229 WREG32_MC(RS600_MC_FB_LOCATION, tmp);
@@ -301,6 +301,11 @@ void rs600_vram_info(struct radeon_device *rdev)
301 rdev->mc.vram_width = 128; 301 rdev->mc.vram_width = 128;
302} 302}
303 303
304void rs600_bandwidth_update(struct radeon_device *rdev)
305{
306 /* FIXME: implement, should this be like rs690 ? */
307}
308
304 309
305/* 310/*
306 * Indirect registers accessor 311 * Indirect registers accessor
diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c
index 79ba85042b5..839595b0072 100644
--- a/drivers/gpu/drm/radeon/rs690.c
+++ b/drivers/gpu/drm/radeon/rs690.c
@@ -28,6 +28,9 @@
28#include "drmP.h" 28#include "drmP.h"
29#include "radeon_reg.h" 29#include "radeon_reg.h"
30#include "radeon.h" 30#include "radeon.h"
31#include "rs690r.h"
32#include "atom.h"
33#include "atom-bits.h"
31 34
32/* rs690,rs740 depends on : */ 35/* rs690,rs740 depends on : */
33void r100_hdp_reset(struct radeon_device *rdev); 36void r100_hdp_reset(struct radeon_device *rdev);
@@ -64,7 +67,7 @@ int rs690_mc_init(struct radeon_device *rdev)
64 rs400_gart_disable(rdev); 67 rs400_gart_disable(rdev);
65 68
66 /* Setup GPU memory space */ 69 /* Setup GPU memory space */
67 rdev->mc.gtt_location = rdev->mc.vram_size; 70 rdev->mc.gtt_location = rdev->mc.mc_vram_size;
68 rdev->mc.gtt_location += (rdev->mc.gtt_size - 1); 71 rdev->mc.gtt_location += (rdev->mc.gtt_size - 1);
69 rdev->mc.gtt_location &= ~(rdev->mc.gtt_size - 1); 72 rdev->mc.gtt_location &= ~(rdev->mc.gtt_size - 1);
70 rdev->mc.vram_location = 0xFFFFFFFFUL; 73 rdev->mc.vram_location = 0xFFFFFFFFUL;
@@ -79,7 +82,7 @@ int rs690_mc_init(struct radeon_device *rdev)
79 printk(KERN_WARNING "Failed to wait MC idle while " 82 printk(KERN_WARNING "Failed to wait MC idle while "
80 "programming pipes. Bad things might happen.\n"); 83 "programming pipes. Bad things might happen.\n");
81 } 84 }
82 tmp = rdev->mc.vram_location + rdev->mc.vram_size - 1; 85 tmp = rdev->mc.vram_location + rdev->mc.mc_vram_size - 1;
83 tmp = REG_SET(RS690_MC_FB_TOP, tmp >> 16); 86 tmp = REG_SET(RS690_MC_FB_TOP, tmp >> 16);
84 tmp |= REG_SET(RS690_MC_FB_START, rdev->mc.vram_location >> 16); 87 tmp |= REG_SET(RS690_MC_FB_START, rdev->mc.vram_location >> 16);
85 WREG32_MC(RS690_MCCFG_FB_LOCATION, tmp); 88 WREG32_MC(RS690_MCCFG_FB_LOCATION, tmp);
@@ -138,9 +141,82 @@ void rs690_gpu_init(struct radeon_device *rdev)
138/* 141/*
139 * VRAM info. 142 * VRAM info.
140 */ 143 */
144void rs690_pm_info(struct radeon_device *rdev)
145{
146 int index = GetIndexIntoMasterTable(DATA, IntegratedSystemInfo);
147 struct _ATOM_INTEGRATED_SYSTEM_INFO *info;
148 struct _ATOM_INTEGRATED_SYSTEM_INFO_V2 *info_v2;
149 void *ptr;
150 uint16_t data_offset;
151 uint8_t frev, crev;
152 fixed20_12 tmp;
153
154 atom_parse_data_header(rdev->mode_info.atom_context, index, NULL,
155 &frev, &crev, &data_offset);
156 ptr = rdev->mode_info.atom_context->bios + data_offset;
157 info = (struct _ATOM_INTEGRATED_SYSTEM_INFO *)ptr;
158 info_v2 = (struct _ATOM_INTEGRATED_SYSTEM_INFO_V2 *)ptr;
159 /* Get various system informations from bios */
160 switch (crev) {
161 case 1:
162 tmp.full = rfixed_const(100);
163 rdev->pm.igp_sideport_mclk.full = rfixed_const(info->ulBootUpMemoryClock);
164 rdev->pm.igp_sideport_mclk.full = rfixed_div(rdev->pm.igp_sideport_mclk, tmp);
165 rdev->pm.igp_system_mclk.full = rfixed_const(le16_to_cpu(info->usK8MemoryClock));
166 rdev->pm.igp_ht_link_clk.full = rfixed_const(le16_to_cpu(info->usFSBClock));
167 rdev->pm.igp_ht_link_width.full = rfixed_const(info->ucHTLinkWidth);
168 break;
169 case 2:
170 tmp.full = rfixed_const(100);
171 rdev->pm.igp_sideport_mclk.full = rfixed_const(info_v2->ulBootUpSidePortClock);
172 rdev->pm.igp_sideport_mclk.full = rfixed_div(rdev->pm.igp_sideport_mclk, tmp);
173 rdev->pm.igp_system_mclk.full = rfixed_const(info_v2->ulBootUpUMAClock);
174 rdev->pm.igp_system_mclk.full = rfixed_div(rdev->pm.igp_system_mclk, tmp);
175 rdev->pm.igp_ht_link_clk.full = rfixed_const(info_v2->ulHTLinkFreq);
176 rdev->pm.igp_ht_link_clk.full = rfixed_div(rdev->pm.igp_ht_link_clk, tmp);
177 rdev->pm.igp_ht_link_width.full = rfixed_const(le16_to_cpu(info_v2->usMinHTLinkWidth));
178 break;
179 default:
180 tmp.full = rfixed_const(100);
181 /* We assume the slower possible clock ie worst case */
182 /* DDR 333Mhz */
183 rdev->pm.igp_sideport_mclk.full = rfixed_const(333);
184 /* FIXME: system clock ? */
185 rdev->pm.igp_system_mclk.full = rfixed_const(100);
186 rdev->pm.igp_system_mclk.full = rfixed_div(rdev->pm.igp_system_mclk, tmp);
187 rdev->pm.igp_ht_link_clk.full = rfixed_const(200);
188 rdev->pm.igp_ht_link_width.full = rfixed_const(8);
189 DRM_ERROR("No integrated system info for your GPU, using safe default\n");
190 break;
191 }
192 /* Compute various bandwidth */
193 /* k8_bandwidth = (memory_clk / 2) * 2 * 8 * 0.5 = memory_clk * 4 */
194 tmp.full = rfixed_const(4);
195 rdev->pm.k8_bandwidth.full = rfixed_mul(rdev->pm.igp_system_mclk, tmp);
196 /* ht_bandwidth = ht_clk * 2 * ht_width / 8 * 0.8
197 * = ht_clk * ht_width / 5
198 */
199 tmp.full = rfixed_const(5);
200 rdev->pm.ht_bandwidth.full = rfixed_mul(rdev->pm.igp_ht_link_clk,
201 rdev->pm.igp_ht_link_width);
202 rdev->pm.ht_bandwidth.full = rfixed_div(rdev->pm.ht_bandwidth, tmp);
203 if (tmp.full < rdev->pm.max_bandwidth.full) {
204 /* HT link is a limiting factor */
205 rdev->pm.max_bandwidth.full = tmp.full;
206 }
207 /* sideport_bandwidth = (sideport_clk / 2) * 2 * 2 * 0.7
208 * = (sideport_clk * 14) / 10
209 */
210 tmp.full = rfixed_const(14);
211 rdev->pm.sideport_bandwidth.full = rfixed_mul(rdev->pm.igp_sideport_mclk, tmp);
212 tmp.full = rfixed_const(10);
213 rdev->pm.sideport_bandwidth.full = rfixed_div(rdev->pm.sideport_bandwidth, tmp);
214}
215
141void rs690_vram_info(struct radeon_device *rdev) 216void rs690_vram_info(struct radeon_device *rdev)
142{ 217{
143 uint32_t tmp; 218 uint32_t tmp;
219 fixed20_12 a;
144 220
145 rs400_gart_adjust_size(rdev); 221 rs400_gart_adjust_size(rdev);
146 /* DDR for all card after R300 & IGP */ 222 /* DDR for all card after R300 & IGP */
@@ -152,12 +228,409 @@ void rs690_vram_info(struct radeon_device *rdev)
152 } else { 228 } else {
153 rdev->mc.vram_width = 64; 229 rdev->mc.vram_width = 64;
154 } 230 }
155 rdev->mc.vram_size = RREG32(RADEON_CONFIG_MEMSIZE); 231 rdev->mc.real_vram_size = RREG32(RADEON_CONFIG_MEMSIZE);
232 rdev->mc.mc_vram_size = rdev->mc.real_vram_size;
156 233
157 rdev->mc.aper_base = drm_get_resource_start(rdev->ddev, 0); 234 rdev->mc.aper_base = drm_get_resource_start(rdev->ddev, 0);
158 rdev->mc.aper_size = drm_get_resource_len(rdev->ddev, 0); 235 rdev->mc.aper_size = drm_get_resource_len(rdev->ddev, 0);
236 rs690_pm_info(rdev);
237 /* FIXME: we should enforce default clock in case GPU is not in
238 * default setup
239 */
240 a.full = rfixed_const(100);
241 rdev->pm.sclk.full = rfixed_const(rdev->clock.default_sclk);
242 rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a);
243 a.full = rfixed_const(16);
244 /* core_bandwidth = sclk(Mhz) * 16 */
245 rdev->pm.core_bandwidth.full = rfixed_div(rdev->pm.sclk, a);
246}
247
248void rs690_line_buffer_adjust(struct radeon_device *rdev,
249 struct drm_display_mode *mode1,
250 struct drm_display_mode *mode2)
251{
252 u32 tmp;
253
254 /*
255 * Line Buffer Setup
256 * There is a single line buffer shared by both display controllers.
257 * DC_LB_MEMORY_SPLIT controls how that line buffer is shared between
258 * the display controllers. The paritioning can either be done
259 * manually or via one of four preset allocations specified in bits 1:0:
260 * 0 - line buffer is divided in half and shared between crtc
261 * 1 - D1 gets 3/4 of the line buffer, D2 gets 1/4
262 * 2 - D1 gets the whole buffer
263 * 3 - D1 gets 1/4 of the line buffer, D2 gets 3/4
264 * Setting bit 2 of DC_LB_MEMORY_SPLIT controls switches to manual
265 * allocation mode. In manual allocation mode, D1 always starts at 0,
266 * D1 end/2 is specified in bits 14:4; D2 allocation follows D1.
267 */
268 tmp = RREG32(DC_LB_MEMORY_SPLIT) & ~DC_LB_MEMORY_SPLIT_MASK;
269 tmp &= ~DC_LB_MEMORY_SPLIT_SHIFT_MODE;
270 /* auto */
271 if (mode1 && mode2) {
272 if (mode1->hdisplay > mode2->hdisplay) {
273 if (mode1->hdisplay > 2560)
274 tmp |= DC_LB_MEMORY_SPLIT_D1_3Q_D2_1Q;
275 else
276 tmp |= DC_LB_MEMORY_SPLIT_D1HALF_D2HALF;
277 } else if (mode2->hdisplay > mode1->hdisplay) {
278 if (mode2->hdisplay > 2560)
279 tmp |= DC_LB_MEMORY_SPLIT_D1_1Q_D2_3Q;
280 else
281 tmp |= DC_LB_MEMORY_SPLIT_D1HALF_D2HALF;
282 } else
283 tmp |= AVIVO_DC_LB_MEMORY_SPLIT_D1HALF_D2HALF;
284 } else if (mode1) {
285 tmp |= DC_LB_MEMORY_SPLIT_D1_ONLY;
286 } else if (mode2) {
287 tmp |= DC_LB_MEMORY_SPLIT_D1_1Q_D2_3Q;
288 }
289 WREG32(DC_LB_MEMORY_SPLIT, tmp);
159} 290}
160 291
292struct rs690_watermark {
293 u32 lb_request_fifo_depth;
294 fixed20_12 num_line_pair;
295 fixed20_12 estimated_width;
296 fixed20_12 worst_case_latency;
297 fixed20_12 consumption_rate;
298 fixed20_12 active_time;
299 fixed20_12 dbpp;
300 fixed20_12 priority_mark_max;
301 fixed20_12 priority_mark;
302 fixed20_12 sclk;
303};
304
305void rs690_crtc_bandwidth_compute(struct radeon_device *rdev,
306 struct radeon_crtc *crtc,
307 struct rs690_watermark *wm)
308{
309 struct drm_display_mode *mode = &crtc->base.mode;
310 fixed20_12 a, b, c;
311 fixed20_12 pclk, request_fifo_depth, tolerable_latency, estimated_width;
312 fixed20_12 consumption_time, line_time, chunk_time, read_delay_latency;
313 /* FIXME: detect IGP with sideport memory, i don't think there is any
314 * such product available
315 */
316 bool sideport = false;
317
318 if (!crtc->base.enabled) {
319 /* FIXME: wouldn't it better to set priority mark to maximum */
320 wm->lb_request_fifo_depth = 4;
321 return;
322 }
323
324 if (crtc->vsc.full > rfixed_const(2))
325 wm->num_line_pair.full = rfixed_const(2);
326 else
327 wm->num_line_pair.full = rfixed_const(1);
328
329 b.full = rfixed_const(mode->crtc_hdisplay);
330 c.full = rfixed_const(256);
331 a.full = rfixed_mul(wm->num_line_pair, b);
332 request_fifo_depth.full = rfixed_div(a, c);
333 if (a.full < rfixed_const(4)) {
334 wm->lb_request_fifo_depth = 4;
335 } else {
336 wm->lb_request_fifo_depth = rfixed_trunc(request_fifo_depth);
337 }
338
339 /* Determine consumption rate
340 * pclk = pixel clock period(ns) = 1000 / (mode.clock / 1000)
341 * vtaps = number of vertical taps,
342 * vsc = vertical scaling ratio, defined as source/destination
343 * hsc = horizontal scaling ration, defined as source/destination
344 */
345 a.full = rfixed_const(mode->clock);
346 b.full = rfixed_const(1000);
347 a.full = rfixed_div(a, b);
348 pclk.full = rfixed_div(b, a);
349 if (crtc->rmx_type != RMX_OFF) {
350 b.full = rfixed_const(2);
351 if (crtc->vsc.full > b.full)
352 b.full = crtc->vsc.full;
353 b.full = rfixed_mul(b, crtc->hsc);
354 c.full = rfixed_const(2);
355 b.full = rfixed_div(b, c);
356 consumption_time.full = rfixed_div(pclk, b);
357 } else {
358 consumption_time.full = pclk.full;
359 }
360 a.full = rfixed_const(1);
361 wm->consumption_rate.full = rfixed_div(a, consumption_time);
362
363
364 /* Determine line time
365 * LineTime = total time for one line of displayhtotal
366 * LineTime = total number of horizontal pixels
367 * pclk = pixel clock period(ns)
368 */
369 a.full = rfixed_const(crtc->base.mode.crtc_htotal);
370 line_time.full = rfixed_mul(a, pclk);
371
372 /* Determine active time
373 * ActiveTime = time of active region of display within one line,
374 * hactive = total number of horizontal active pixels
375 * htotal = total number of horizontal pixels
376 */
377 a.full = rfixed_const(crtc->base.mode.crtc_htotal);
378 b.full = rfixed_const(crtc->base.mode.crtc_hdisplay);
379 wm->active_time.full = rfixed_mul(line_time, b);
380 wm->active_time.full = rfixed_div(wm->active_time, a);
381
382 /* Maximun bandwidth is the minimun bandwidth of all component */
383 rdev->pm.max_bandwidth = rdev->pm.core_bandwidth;
384 if (sideport) {
385 if (rdev->pm.max_bandwidth.full > rdev->pm.sideport_bandwidth.full &&
386 rdev->pm.sideport_bandwidth.full)
387 rdev->pm.max_bandwidth = rdev->pm.sideport_bandwidth;
388 read_delay_latency.full = rfixed_const(370 * 800 * 1000);
389 read_delay_latency.full = rfixed_div(read_delay_latency,
390 rdev->pm.igp_sideport_mclk);
391 } else {
392 if (rdev->pm.max_bandwidth.full > rdev->pm.k8_bandwidth.full &&
393 rdev->pm.k8_bandwidth.full)
394 rdev->pm.max_bandwidth = rdev->pm.k8_bandwidth;
395 if (rdev->pm.max_bandwidth.full > rdev->pm.ht_bandwidth.full &&
396 rdev->pm.ht_bandwidth.full)
397 rdev->pm.max_bandwidth = rdev->pm.ht_bandwidth;
398 read_delay_latency.full = rfixed_const(5000);
399 }
400
401 /* sclk = system clocks(ns) = 1000 / max_bandwidth / 16 */
402 a.full = rfixed_const(16);
403 rdev->pm.sclk.full = rfixed_mul(rdev->pm.max_bandwidth, a);
404 a.full = rfixed_const(1000);
405 rdev->pm.sclk.full = rfixed_div(a, rdev->pm.sclk);
406 /* Determine chunk time
407 * ChunkTime = the time it takes the DCP to send one chunk of data
408 * to the LB which consists of pipeline delay and inter chunk gap
409 * sclk = system clock(ns)
410 */
411 a.full = rfixed_const(256 * 13);
412 chunk_time.full = rfixed_mul(rdev->pm.sclk, a);
413 a.full = rfixed_const(10);
414 chunk_time.full = rfixed_div(chunk_time, a);
415
416 /* Determine the worst case latency
417 * NumLinePair = Number of line pairs to request(1=2 lines, 2=4 lines)
418 * WorstCaseLatency = worst case time from urgent to when the MC starts
419 * to return data
420 * READ_DELAY_IDLE_MAX = constant of 1us
421 * ChunkTime = time it takes the DCP to send one chunk of data to the LB
422 * which consists of pipeline delay and inter chunk gap
423 */
424 if (rfixed_trunc(wm->num_line_pair) > 1) {
425 a.full = rfixed_const(3);
426 wm->worst_case_latency.full = rfixed_mul(a, chunk_time);
427 wm->worst_case_latency.full += read_delay_latency.full;
428 } else {
429 a.full = rfixed_const(2);
430 wm->worst_case_latency.full = rfixed_mul(a, chunk_time);
431 wm->worst_case_latency.full += read_delay_latency.full;
432 }
433
434 /* Determine the tolerable latency
435 * TolerableLatency = Any given request has only 1 line time
436 * for the data to be returned
437 * LBRequestFifoDepth = Number of chunk requests the LB can
438 * put into the request FIFO for a display
439 * LineTime = total time for one line of display
440 * ChunkTime = the time it takes the DCP to send one chunk
441 * of data to the LB which consists of
442 * pipeline delay and inter chunk gap
443 */
444 if ((2+wm->lb_request_fifo_depth) >= rfixed_trunc(request_fifo_depth)) {
445 tolerable_latency.full = line_time.full;
446 } else {
447 tolerable_latency.full = rfixed_const(wm->lb_request_fifo_depth - 2);
448 tolerable_latency.full = request_fifo_depth.full - tolerable_latency.full;
449 tolerable_latency.full = rfixed_mul(tolerable_latency, chunk_time);
450 tolerable_latency.full = line_time.full - tolerable_latency.full;
451 }
452 /* We assume worst case 32bits (4 bytes) */
453 wm->dbpp.full = rfixed_const(4 * 8);
454
455 /* Determine the maximum priority mark
456 * width = viewport width in pixels
457 */
458 a.full = rfixed_const(16);
459 wm->priority_mark_max.full = rfixed_const(crtc->base.mode.crtc_hdisplay);
460 wm->priority_mark_max.full = rfixed_div(wm->priority_mark_max, a);
461
462 /* Determine estimated width */
463 estimated_width.full = tolerable_latency.full - wm->worst_case_latency.full;
464 estimated_width.full = rfixed_div(estimated_width, consumption_time);
465 if (rfixed_trunc(estimated_width) > crtc->base.mode.crtc_hdisplay) {
466 wm->priority_mark.full = rfixed_const(10);
467 } else {
468 a.full = rfixed_const(16);
469 wm->priority_mark.full = rfixed_div(estimated_width, a);
470 wm->priority_mark.full = wm->priority_mark_max.full - wm->priority_mark.full;
471 }
472}
473
474void rs690_bandwidth_update(struct radeon_device *rdev)
475{
476 struct drm_display_mode *mode0 = NULL;
477 struct drm_display_mode *mode1 = NULL;
478 struct rs690_watermark wm0;
479 struct rs690_watermark wm1;
480 u32 tmp;
481 fixed20_12 priority_mark02, priority_mark12, fill_rate;
482 fixed20_12 a, b;
483
484 if (rdev->mode_info.crtcs[0]->base.enabled)
485 mode0 = &rdev->mode_info.crtcs[0]->base.mode;
486 if (rdev->mode_info.crtcs[1]->base.enabled)
487 mode1 = &rdev->mode_info.crtcs[1]->base.mode;
488 /*
489 * Set display0/1 priority up in the memory controller for
490 * modes if the user specifies HIGH for displaypriority
491 * option.
492 */
493 if (rdev->disp_priority == 2) {
494 tmp = RREG32_MC(MC_INIT_MISC_LAT_TIMER);
495 tmp &= ~MC_DISP1R_INIT_LAT_MASK;
496 tmp &= ~MC_DISP0R_INIT_LAT_MASK;
497 if (mode1)
498 tmp |= (1 << MC_DISP1R_INIT_LAT_SHIFT);
499 if (mode0)
500 tmp |= (1 << MC_DISP0R_INIT_LAT_SHIFT);
501 WREG32_MC(MC_INIT_MISC_LAT_TIMER, tmp);
502 }
503 rs690_line_buffer_adjust(rdev, mode0, mode1);
504
505 if ((rdev->family == CHIP_RS690) || (rdev->family == CHIP_RS740))
506 WREG32(DCP_CONTROL, 0);
507 if ((rdev->family == CHIP_RS780) || (rdev->family == CHIP_RS880))
508 WREG32(DCP_CONTROL, 2);
509
510 rs690_crtc_bandwidth_compute(rdev, rdev->mode_info.crtcs[0], &wm0);
511 rs690_crtc_bandwidth_compute(rdev, rdev->mode_info.crtcs[1], &wm1);
512
513 tmp = (wm0.lb_request_fifo_depth - 1);
514 tmp |= (wm1.lb_request_fifo_depth - 1) << 16;
515 WREG32(LB_MAX_REQ_OUTSTANDING, tmp);
516
517 if (mode0 && mode1) {
518 if (rfixed_trunc(wm0.dbpp) > 64)
519 a.full = rfixed_mul(wm0.dbpp, wm0.num_line_pair);
520 else
521 a.full = wm0.num_line_pair.full;
522 if (rfixed_trunc(wm1.dbpp) > 64)
523 b.full = rfixed_mul(wm1.dbpp, wm1.num_line_pair);
524 else
525 b.full = wm1.num_line_pair.full;
526 a.full += b.full;
527 fill_rate.full = rfixed_div(wm0.sclk, a);
528 if (wm0.consumption_rate.full > fill_rate.full) {
529 b.full = wm0.consumption_rate.full - fill_rate.full;
530 b.full = rfixed_mul(b, wm0.active_time);
531 a.full = rfixed_mul(wm0.worst_case_latency,
532 wm0.consumption_rate);
533 a.full = a.full + b.full;
534 b.full = rfixed_const(16 * 1000);
535 priority_mark02.full = rfixed_div(a, b);
536 } else {
537 a.full = rfixed_mul(wm0.worst_case_latency,
538 wm0.consumption_rate);
539 b.full = rfixed_const(16 * 1000);
540 priority_mark02.full = rfixed_div(a, b);
541 }
542 if (wm1.consumption_rate.full > fill_rate.full) {
543 b.full = wm1.consumption_rate.full - fill_rate.full;
544 b.full = rfixed_mul(b, wm1.active_time);
545 a.full = rfixed_mul(wm1.worst_case_latency,
546 wm1.consumption_rate);
547 a.full = a.full + b.full;
548 b.full = rfixed_const(16 * 1000);
549 priority_mark12.full = rfixed_div(a, b);
550 } else {
551 a.full = rfixed_mul(wm1.worst_case_latency,
552 wm1.consumption_rate);
553 b.full = rfixed_const(16 * 1000);
554 priority_mark12.full = rfixed_div(a, b);
555 }
556 if (wm0.priority_mark.full > priority_mark02.full)
557 priority_mark02.full = wm0.priority_mark.full;
558 if (rfixed_trunc(priority_mark02) < 0)
559 priority_mark02.full = 0;
560 if (wm0.priority_mark_max.full > priority_mark02.full)
561 priority_mark02.full = wm0.priority_mark_max.full;
562 if (wm1.priority_mark.full > priority_mark12.full)
563 priority_mark12.full = wm1.priority_mark.full;
564 if (rfixed_trunc(priority_mark12) < 0)
565 priority_mark12.full = 0;
566 if (wm1.priority_mark_max.full > priority_mark12.full)
567 priority_mark12.full = wm1.priority_mark_max.full;
568 WREG32(D1MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark02));
569 WREG32(D1MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark02));
570 WREG32(D2MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark12));
571 WREG32(D2MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark12));
572 } else if (mode0) {
573 if (rfixed_trunc(wm0.dbpp) > 64)
574 a.full = rfixed_mul(wm0.dbpp, wm0.num_line_pair);
575 else
576 a.full = wm0.num_line_pair.full;
577 fill_rate.full = rfixed_div(wm0.sclk, a);
578 if (wm0.consumption_rate.full > fill_rate.full) {
579 b.full = wm0.consumption_rate.full - fill_rate.full;
580 b.full = rfixed_mul(b, wm0.active_time);
581 a.full = rfixed_mul(wm0.worst_case_latency,
582 wm0.consumption_rate);
583 a.full = a.full + b.full;
584 b.full = rfixed_const(16 * 1000);
585 priority_mark02.full = rfixed_div(a, b);
586 } else {
587 a.full = rfixed_mul(wm0.worst_case_latency,
588 wm0.consumption_rate);
589 b.full = rfixed_const(16 * 1000);
590 priority_mark02.full = rfixed_div(a, b);
591 }
592 if (wm0.priority_mark.full > priority_mark02.full)
593 priority_mark02.full = wm0.priority_mark.full;
594 if (rfixed_trunc(priority_mark02) < 0)
595 priority_mark02.full = 0;
596 if (wm0.priority_mark_max.full > priority_mark02.full)
597 priority_mark02.full = wm0.priority_mark_max.full;
598 WREG32(D1MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark02));
599 WREG32(D1MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark02));
600 WREG32(D2MODE_PRIORITY_A_CNT, MODE_PRIORITY_OFF);
601 WREG32(D2MODE_PRIORITY_B_CNT, MODE_PRIORITY_OFF);
602 } else {
603 if (rfixed_trunc(wm1.dbpp) > 64)
604 a.full = rfixed_mul(wm1.dbpp, wm1.num_line_pair);
605 else
606 a.full = wm1.num_line_pair.full;
607 fill_rate.full = rfixed_div(wm1.sclk, a);
608 if (wm1.consumption_rate.full > fill_rate.full) {
609 b.full = wm1.consumption_rate.full - fill_rate.full;
610 b.full = rfixed_mul(b, wm1.active_time);
611 a.full = rfixed_mul(wm1.worst_case_latency,
612 wm1.consumption_rate);
613 a.full = a.full + b.full;
614 b.full = rfixed_const(16 * 1000);
615 priority_mark12.full = rfixed_div(a, b);
616 } else {
617 a.full = rfixed_mul(wm1.worst_case_latency,
618 wm1.consumption_rate);
619 b.full = rfixed_const(16 * 1000);
620 priority_mark12.full = rfixed_div(a, b);
621 }
622 if (wm1.priority_mark.full > priority_mark12.full)
623 priority_mark12.full = wm1.priority_mark.full;
624 if (rfixed_trunc(priority_mark12) < 0)
625 priority_mark12.full = 0;
626 if (wm1.priority_mark_max.full > priority_mark12.full)
627 priority_mark12.full = wm1.priority_mark_max.full;
628 WREG32(D1MODE_PRIORITY_A_CNT, MODE_PRIORITY_OFF);
629 WREG32(D1MODE_PRIORITY_B_CNT, MODE_PRIORITY_OFF);
630 WREG32(D2MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark12));
631 WREG32(D2MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark12));
632 }
633}
161 634
162/* 635/*
163 * Indirect registers accessor 636 * Indirect registers accessor
diff --git a/drivers/gpu/drm/radeon/rs690r.h b/drivers/gpu/drm/radeon/rs690r.h
new file mode 100644
index 00000000000..c0d9faa2175
--- /dev/null
+++ b/drivers/gpu/drm/radeon/rs690r.h
@@ -0,0 +1,99 @@
1/*
2 * Copyright 2008 Advanced Micro Devices, Inc.
3 * Copyright 2008 Red Hat Inc.
4 * Copyright 2009 Jerome Glisse.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the 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 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
23 *
24 * Authors: Dave Airlie
25 * Alex Deucher
26 * Jerome Glisse
27 */
28#ifndef RS690R_H
29#define RS690R_H
30
31/* RS690/RS740 registers */
32#define MC_INDEX 0x0078
33# define MC_INDEX_MASK 0x1FF
34# define MC_INDEX_WR_EN (1 << 9)
35# define MC_INDEX_WR_ACK 0x7F
36#define MC_DATA 0x007C
37#define HDP_FB_LOCATION 0x0134
38#define DC_LB_MEMORY_SPLIT 0x6520
39#define DC_LB_MEMORY_SPLIT_MASK 0x00000003
40#define DC_LB_MEMORY_SPLIT_SHIFT 0
41#define DC_LB_MEMORY_SPLIT_D1HALF_D2HALF 0
42#define DC_LB_MEMORY_SPLIT_D1_3Q_D2_1Q 1
43#define DC_LB_MEMORY_SPLIT_D1_ONLY 2
44#define DC_LB_MEMORY_SPLIT_D1_1Q_D2_3Q 3
45#define DC_LB_MEMORY_SPLIT_SHIFT_MODE (1 << 2)
46#define DC_LB_DISP1_END_ADR_SHIFT 4
47#define DC_LB_DISP1_END_ADR_MASK 0x00007FF0
48#define D1MODE_PRIORITY_A_CNT 0x6548
49#define MODE_PRIORITY_MARK_MASK 0x00007FFF
50#define MODE_PRIORITY_OFF (1 << 16)
51#define MODE_PRIORITY_ALWAYS_ON (1 << 20)
52#define MODE_PRIORITY_FORCE_MASK (1 << 24)
53#define D1MODE_PRIORITY_B_CNT 0x654C
54#define LB_MAX_REQ_OUTSTANDING 0x6D58
55#define LB_D1_MAX_REQ_OUTSTANDING_MASK 0x0000000F
56#define LB_D1_MAX_REQ_OUTSTANDING_SHIFT 0
57#define LB_D2_MAX_REQ_OUTSTANDING_MASK 0x000F0000
58#define LB_D2_MAX_REQ_OUTSTANDING_SHIFT 16
59#define DCP_CONTROL 0x6C9C
60#define D2MODE_PRIORITY_A_CNT 0x6D48
61#define D2MODE_PRIORITY_B_CNT 0x6D4C
62
63/* MC indirect registers */
64#define MC_STATUS_IDLE (1 << 0)
65#define MC_MISC_CNTL 0x18
66#define DISABLE_GTW (1 << 1)
67#define GART_INDEX_REG_EN (1 << 12)
68#define BLOCK_GFX_D3_EN (1 << 14)
69#define GART_FEATURE_ID 0x2B
70#define HANG_EN (1 << 11)
71#define TLB_ENABLE (1 << 18)
72#define P2P_ENABLE (1 << 19)
73#define GTW_LAC_EN (1 << 25)
74#define LEVEL2_GART (0 << 30)
75#define LEVEL1_GART (1 << 30)
76#define PDC_EN (1 << 31)
77#define GART_BASE 0x2C
78#define GART_CACHE_CNTRL 0x2E
79# define GART_CACHE_INVALIDATE (1 << 0)
80#define MC_STATUS 0x90
81#define MCCFG_FB_LOCATION 0x100
82#define MC_FB_START_MASK 0x0000FFFF
83#define MC_FB_START_SHIFT 0
84#define MC_FB_TOP_MASK 0xFFFF0000
85#define MC_FB_TOP_SHIFT 16
86#define MCCFG_AGP_LOCATION 0x101
87#define MC_AGP_START_MASK 0x0000FFFF
88#define MC_AGP_START_SHIFT 0
89#define MC_AGP_TOP_MASK 0xFFFF0000
90#define MC_AGP_TOP_SHIFT 16
91#define MCCFG_AGP_BASE 0x102
92#define MCCFG_AGP_BASE_2 0x103
93#define MC_INIT_MISC_LAT_TIMER 0x104
94#define MC_DISP0R_INIT_LAT_SHIFT 8
95#define MC_DISP0R_INIT_LAT_MASK 0x00000F00
96#define MC_DISP1R_INIT_LAT_SHIFT 12
97#define MC_DISP1R_INIT_LAT_MASK 0x0000F000
98
99#endif
diff --git a/drivers/gpu/drm/radeon/rv515.c b/drivers/gpu/drm/radeon/rv515.c
index ffea37b1b3e..fd8f3ca716e 100644
--- a/drivers/gpu/drm/radeon/rv515.c
+++ b/drivers/gpu/drm/radeon/rv515.c
@@ -27,8 +27,9 @@
27 */ 27 */
28#include <linux/seq_file.h> 28#include <linux/seq_file.h>
29#include "drmP.h" 29#include "drmP.h"
30#include "radeon_reg.h" 30#include "rv515r.h"
31#include "radeon.h" 31#include "radeon.h"
32#include "radeon_share.h"
32 33
33/* rv515 depends on : */ 34/* rv515 depends on : */
34void r100_hdp_reset(struct radeon_device *rdev); 35void r100_hdp_reset(struct radeon_device *rdev);
@@ -99,26 +100,26 @@ int rv515_mc_init(struct radeon_device *rdev)
99 "programming pipes. Bad things might happen.\n"); 100 "programming pipes. Bad things might happen.\n");
100 } 101 }
101 /* Write VRAM size in case we are limiting it */ 102 /* Write VRAM size in case we are limiting it */
102 WREG32(RADEON_CONFIG_MEMSIZE, rdev->mc.vram_size); 103 WREG32(RADEON_CONFIG_MEMSIZE, rdev->mc.real_vram_size);
103 tmp = REG_SET(RV515_MC_FB_START, rdev->mc.vram_location >> 16); 104 tmp = REG_SET(MC_FB_START, rdev->mc.vram_location >> 16);
104 WREG32(0x134, tmp); 105 WREG32(0x134, tmp);
105 tmp = rdev->mc.vram_location + rdev->mc.vram_size - 1; 106 tmp = rdev->mc.vram_location + rdev->mc.mc_vram_size - 1;
106 tmp = REG_SET(RV515_MC_FB_TOP, tmp >> 16); 107 tmp = REG_SET(MC_FB_TOP, tmp >> 16);
107 tmp |= REG_SET(RV515_MC_FB_START, rdev->mc.vram_location >> 16); 108 tmp |= REG_SET(MC_FB_START, rdev->mc.vram_location >> 16);
108 WREG32_MC(RV515_MC_FB_LOCATION, tmp); 109 WREG32_MC(MC_FB_LOCATION, tmp);
109 WREG32(RS690_HDP_FB_LOCATION, rdev->mc.vram_location >> 16); 110 WREG32(HDP_FB_LOCATION, rdev->mc.vram_location >> 16);
110 WREG32(0x310, rdev->mc.vram_location); 111 WREG32(0x310, rdev->mc.vram_location);
111 if (rdev->flags & RADEON_IS_AGP) { 112 if (rdev->flags & RADEON_IS_AGP) {
112 tmp = rdev->mc.gtt_location + rdev->mc.gtt_size - 1; 113 tmp = rdev->mc.gtt_location + rdev->mc.gtt_size - 1;
113 tmp = REG_SET(RV515_MC_AGP_TOP, tmp >> 16); 114 tmp = REG_SET(MC_AGP_TOP, tmp >> 16);
114 tmp |= REG_SET(RV515_MC_AGP_START, rdev->mc.gtt_location >> 16); 115 tmp |= REG_SET(MC_AGP_START, rdev->mc.gtt_location >> 16);
115 WREG32_MC(RV515_MC_AGP_LOCATION, tmp); 116 WREG32_MC(MC_AGP_LOCATION, tmp);
116 WREG32_MC(RV515_MC_AGP_BASE, rdev->mc.agp_base); 117 WREG32_MC(MC_AGP_BASE, rdev->mc.agp_base);
117 WREG32_MC(RV515_MC_AGP_BASE_2, 0); 118 WREG32_MC(MC_AGP_BASE_2, 0);
118 } else { 119 } else {
119 WREG32_MC(RV515_MC_AGP_LOCATION, 0x0FFFFFFF); 120 WREG32_MC(MC_AGP_LOCATION, 0x0FFFFFFF);
120 WREG32_MC(RV515_MC_AGP_BASE, 0); 121 WREG32_MC(MC_AGP_BASE, 0);
121 WREG32_MC(RV515_MC_AGP_BASE_2, 0); 122 WREG32_MC(MC_AGP_BASE_2, 0);
122 } 123 }
123 return 0; 124 return 0;
124} 125}
@@ -136,95 +137,67 @@ void rv515_mc_fini(struct radeon_device *rdev)
136 */ 137 */
137void rv515_ring_start(struct radeon_device *rdev) 138void rv515_ring_start(struct radeon_device *rdev)
138{ 139{
139 unsigned gb_tile_config;
140 int r; 140 int r;
141 141
142 /* Sub pixel 1/12 so we can have 4K rendering according to doc */
143 gb_tile_config = R300_ENABLE_TILING | R300_TILE_SIZE_16;
144 switch (rdev->num_gb_pipes) {
145 case 2:
146 gb_tile_config |= R300_PIPE_COUNT_R300;
147 break;
148 case 3:
149 gb_tile_config |= R300_PIPE_COUNT_R420_3P;
150 break;
151 case 4:
152 gb_tile_config |= R300_PIPE_COUNT_R420;
153 break;
154 case 1:
155 default:
156 gb_tile_config |= R300_PIPE_COUNT_RV350;
157 break;
158 }
159
160 r = radeon_ring_lock(rdev, 64); 142 r = radeon_ring_lock(rdev, 64);
161 if (r) { 143 if (r) {
162 return; 144 return;
163 } 145 }
164 radeon_ring_write(rdev, PACKET0(RADEON_ISYNC_CNTL, 0)); 146 radeon_ring_write(rdev, PACKET0(ISYNC_CNTL, 0));
165 radeon_ring_write(rdev,
166 RADEON_ISYNC_ANY2D_IDLE3D |
167 RADEON_ISYNC_ANY3D_IDLE2D |
168 RADEON_ISYNC_WAIT_IDLEGUI |
169 RADEON_ISYNC_CPSCRATCH_IDLEGUI);
170 radeon_ring_write(rdev, PACKET0(R300_GB_TILE_CONFIG, 0));
171 radeon_ring_write(rdev, gb_tile_config);
172 radeon_ring_write(rdev, PACKET0(RADEON_WAIT_UNTIL, 0));
173 radeon_ring_write(rdev, 147 radeon_ring_write(rdev,
174 RADEON_WAIT_2D_IDLECLEAN | 148 ISYNC_ANY2D_IDLE3D |
175 RADEON_WAIT_3D_IDLECLEAN); 149 ISYNC_ANY3D_IDLE2D |
150 ISYNC_WAIT_IDLEGUI |
151 ISYNC_CPSCRATCH_IDLEGUI);
152 radeon_ring_write(rdev, PACKET0(WAIT_UNTIL, 0));
153 radeon_ring_write(rdev, WAIT_2D_IDLECLEAN | WAIT_3D_IDLECLEAN);
176 radeon_ring_write(rdev, PACKET0(0x170C, 0)); 154 radeon_ring_write(rdev, PACKET0(0x170C, 0));
177 radeon_ring_write(rdev, 1 << 31); 155 radeon_ring_write(rdev, 1 << 31);
178 radeon_ring_write(rdev, PACKET0(R300_GB_SELECT, 0)); 156 radeon_ring_write(rdev, PACKET0(GB_SELECT, 0));
179 radeon_ring_write(rdev, 0); 157 radeon_ring_write(rdev, 0);
180 radeon_ring_write(rdev, PACKET0(R300_GB_ENABLE, 0)); 158 radeon_ring_write(rdev, PACKET0(GB_ENABLE, 0));
181 radeon_ring_write(rdev, 0); 159 radeon_ring_write(rdev, 0);
182 radeon_ring_write(rdev, PACKET0(0x42C8, 0)); 160 radeon_ring_write(rdev, PACKET0(0x42C8, 0));
183 radeon_ring_write(rdev, (1 << rdev->num_gb_pipes) - 1); 161 radeon_ring_write(rdev, (1 << rdev->num_gb_pipes) - 1);
184 radeon_ring_write(rdev, PACKET0(R500_VAP_INDEX_OFFSET, 0)); 162 radeon_ring_write(rdev, PACKET0(VAP_INDEX_OFFSET, 0));
185 radeon_ring_write(rdev, 0); 163 radeon_ring_write(rdev, 0);
186 radeon_ring_write(rdev, PACKET0(R300_RB3D_DSTCACHE_CTLSTAT, 0)); 164 radeon_ring_write(rdev, PACKET0(RB3D_DSTCACHE_CTLSTAT, 0));
187 radeon_ring_write(rdev, R300_RB3D_DC_FLUSH | R300_RB3D_DC_FREE); 165 radeon_ring_write(rdev, RB3D_DC_FLUSH | RB3D_DC_FREE);
188 radeon_ring_write(rdev, PACKET0(R300_RB3D_ZCACHE_CTLSTAT, 0)); 166 radeon_ring_write(rdev, PACKET0(ZB_ZCACHE_CTLSTAT, 0));
189 radeon_ring_write(rdev, R300_ZC_FLUSH | R300_ZC_FREE); 167 radeon_ring_write(rdev, ZC_FLUSH | ZC_FREE);
190 radeon_ring_write(rdev, PACKET0(RADEON_WAIT_UNTIL, 0)); 168 radeon_ring_write(rdev, PACKET0(WAIT_UNTIL, 0));
191 radeon_ring_write(rdev, 169 radeon_ring_write(rdev, WAIT_2D_IDLECLEAN | WAIT_3D_IDLECLEAN);
192 RADEON_WAIT_2D_IDLECLEAN | 170 radeon_ring_write(rdev, PACKET0(GB_AA_CONFIG, 0));
193 RADEON_WAIT_3D_IDLECLEAN);
194 radeon_ring_write(rdev, PACKET0(R300_GB_AA_CONFIG, 0));
195 radeon_ring_write(rdev, 0); 171 radeon_ring_write(rdev, 0);
196 radeon_ring_write(rdev, PACKET0(R300_RB3D_DSTCACHE_CTLSTAT, 0)); 172 radeon_ring_write(rdev, PACKET0(RB3D_DSTCACHE_CTLSTAT, 0));
197 radeon_ring_write(rdev, R300_RB3D_DC_FLUSH | R300_RB3D_DC_FREE); 173 radeon_ring_write(rdev, RB3D_DC_FLUSH | RB3D_DC_FREE);
198 radeon_ring_write(rdev, PACKET0(R300_RB3D_ZCACHE_CTLSTAT, 0)); 174 radeon_ring_write(rdev, PACKET0(ZB_ZCACHE_CTLSTAT, 0));
199 radeon_ring_write(rdev, R300_ZC_FLUSH | R300_ZC_FREE); 175 radeon_ring_write(rdev, ZC_FLUSH | ZC_FREE);
200 radeon_ring_write(rdev, PACKET0(R300_GB_MSPOS0, 0)); 176 radeon_ring_write(rdev, PACKET0(GB_MSPOS0, 0));
201 radeon_ring_write(rdev,
202 ((6 << R300_MS_X0_SHIFT) |
203 (6 << R300_MS_Y0_SHIFT) |
204 (6 << R300_MS_X1_SHIFT) |
205 (6 << R300_MS_Y1_SHIFT) |
206 (6 << R300_MS_X2_SHIFT) |
207 (6 << R300_MS_Y2_SHIFT) |
208 (6 << R300_MSBD0_Y_SHIFT) |
209 (6 << R300_MSBD0_X_SHIFT)));
210 radeon_ring_write(rdev, PACKET0(R300_GB_MSPOS1, 0));
211 radeon_ring_write(rdev, 177 radeon_ring_write(rdev,
212 ((6 << R300_MS_X3_SHIFT) | 178 ((6 << MS_X0_SHIFT) |
213 (6 << R300_MS_Y3_SHIFT) | 179 (6 << MS_Y0_SHIFT) |
214 (6 << R300_MS_X4_SHIFT) | 180 (6 << MS_X1_SHIFT) |
215 (6 << R300_MS_Y4_SHIFT) | 181 (6 << MS_Y1_SHIFT) |
216 (6 << R300_MS_X5_SHIFT) | 182 (6 << MS_X2_SHIFT) |
217 (6 << R300_MS_Y5_SHIFT) | 183 (6 << MS_Y2_SHIFT) |
218 (6 << R300_MSBD1_SHIFT))); 184 (6 << MSBD0_Y_SHIFT) |
219 radeon_ring_write(rdev, PACKET0(R300_GA_ENHANCE, 0)); 185 (6 << MSBD0_X_SHIFT)));
220 radeon_ring_write(rdev, R300_GA_DEADLOCK_CNTL | R300_GA_FASTSYNC_CNTL); 186 radeon_ring_write(rdev, PACKET0(GB_MSPOS1, 0));
221 radeon_ring_write(rdev, PACKET0(R300_GA_POLY_MODE, 0));
222 radeon_ring_write(rdev, 187 radeon_ring_write(rdev,
223 R300_FRONT_PTYPE_TRIANGE | R300_BACK_PTYPE_TRIANGE); 188 ((6 << MS_X3_SHIFT) |
224 radeon_ring_write(rdev, PACKET0(R300_GA_ROUND_MODE, 0)); 189 (6 << MS_Y3_SHIFT) |
225 radeon_ring_write(rdev, 190 (6 << MS_X4_SHIFT) |
226 R300_GEOMETRY_ROUND_NEAREST | 191 (6 << MS_Y4_SHIFT) |
227 R300_COLOR_ROUND_NEAREST); 192 (6 << MS_X5_SHIFT) |
193 (6 << MS_Y5_SHIFT) |
194 (6 << MSBD1_SHIFT)));
195 radeon_ring_write(rdev, PACKET0(GA_ENHANCE, 0));
196 radeon_ring_write(rdev, GA_DEADLOCK_CNTL | GA_FASTSYNC_CNTL);
197 radeon_ring_write(rdev, PACKET0(GA_POLY_MODE, 0));
198 radeon_ring_write(rdev, FRONT_PTYPE_TRIANGE | BACK_PTYPE_TRIANGE);
199 radeon_ring_write(rdev, PACKET0(GA_ROUND_MODE, 0));
200 radeon_ring_write(rdev, GEOMETRY_ROUND_NEAREST | COLOR_ROUND_NEAREST);
228 radeon_ring_write(rdev, PACKET0(0x20C8, 0)); 201 radeon_ring_write(rdev, PACKET0(0x20C8, 0));
229 radeon_ring_write(rdev, 0); 202 radeon_ring_write(rdev, 0);
230 radeon_ring_unlock_commit(rdev); 203 radeon_ring_unlock_commit(rdev);
@@ -242,8 +215,8 @@ int rv515_mc_wait_for_idle(struct radeon_device *rdev)
242 215
243 for (i = 0; i < rdev->usec_timeout; i++) { 216 for (i = 0; i < rdev->usec_timeout; i++) {
244 /* read MC_STATUS */ 217 /* read MC_STATUS */
245 tmp = RREG32_MC(RV515_MC_STATUS); 218 tmp = RREG32_MC(MC_STATUS);
246 if (tmp & RV515_MC_STATUS_IDLE) { 219 if (tmp & MC_STATUS_IDLE) {
247 return 0; 220 return 0;
248 } 221 }
249 DRM_UDELAY(1); 222 DRM_UDELAY(1);
@@ -291,33 +264,33 @@ int rv515_ga_reset(struct radeon_device *rdev)
291 reinit_cp = rdev->cp.ready; 264 reinit_cp = rdev->cp.ready;
292 rdev->cp.ready = false; 265 rdev->cp.ready = false;
293 for (i = 0; i < rdev->usec_timeout; i++) { 266 for (i = 0; i < rdev->usec_timeout; i++) {
294 WREG32(RADEON_CP_CSQ_MODE, 0); 267 WREG32(CP_CSQ_MODE, 0);
295 WREG32(RADEON_CP_CSQ_CNTL, 0); 268 WREG32(CP_CSQ_CNTL, 0);
296 WREG32(RADEON_RBBM_SOFT_RESET, 0x32005); 269 WREG32(RBBM_SOFT_RESET, 0x32005);
297 (void)RREG32(RADEON_RBBM_SOFT_RESET); 270 (void)RREG32(RBBM_SOFT_RESET);
298 udelay(200); 271 udelay(200);
299 WREG32(RADEON_RBBM_SOFT_RESET, 0); 272 WREG32(RBBM_SOFT_RESET, 0);
300 /* Wait to prevent race in RBBM_STATUS */ 273 /* Wait to prevent race in RBBM_STATUS */
301 mdelay(1); 274 mdelay(1);
302 tmp = RREG32(RADEON_RBBM_STATUS); 275 tmp = RREG32(RBBM_STATUS);
303 if (tmp & ((1 << 20) | (1 << 26))) { 276 if (tmp & ((1 << 20) | (1 << 26))) {
304 DRM_ERROR("VAP & CP still busy (RBBM_STATUS=0x%08X)\n", tmp); 277 DRM_ERROR("VAP & CP still busy (RBBM_STATUS=0x%08X)\n", tmp);
305 /* GA still busy soft reset it */ 278 /* GA still busy soft reset it */
306 WREG32(0x429C, 0x200); 279 WREG32(0x429C, 0x200);
307 WREG32(R300_VAP_PVS_STATE_FLUSH_REG, 0); 280 WREG32(VAP_PVS_STATE_FLUSH_REG, 0);
308 WREG32(0x43E0, 0); 281 WREG32(0x43E0, 0);
309 WREG32(0x43E4, 0); 282 WREG32(0x43E4, 0);
310 WREG32(0x24AC, 0); 283 WREG32(0x24AC, 0);
311 } 284 }
312 /* Wait to prevent race in RBBM_STATUS */ 285 /* Wait to prevent race in RBBM_STATUS */
313 mdelay(1); 286 mdelay(1);
314 tmp = RREG32(RADEON_RBBM_STATUS); 287 tmp = RREG32(RBBM_STATUS);
315 if (!(tmp & ((1 << 20) | (1 << 26)))) { 288 if (!(tmp & ((1 << 20) | (1 << 26)))) {
316 break; 289 break;
317 } 290 }
318 } 291 }
319 for (i = 0; i < rdev->usec_timeout; i++) { 292 for (i = 0; i < rdev->usec_timeout; i++) {
320 tmp = RREG32(RADEON_RBBM_STATUS); 293 tmp = RREG32(RBBM_STATUS);
321 if (!(tmp & ((1 << 20) | (1 << 26)))) { 294 if (!(tmp & ((1 << 20) | (1 << 26)))) {
322 DRM_INFO("GA reset succeed (RBBM_STATUS=0x%08X)\n", 295 DRM_INFO("GA reset succeed (RBBM_STATUS=0x%08X)\n",
323 tmp); 296 tmp);
@@ -331,7 +304,7 @@ int rv515_ga_reset(struct radeon_device *rdev)
331 } 304 }
332 DRM_UDELAY(1); 305 DRM_UDELAY(1);
333 } 306 }
334 tmp = RREG32(RADEON_RBBM_STATUS); 307 tmp = RREG32(RBBM_STATUS);
335 DRM_ERROR("Failed to reset GA ! (RBBM_STATUS=0x%08X)\n", tmp); 308 DRM_ERROR("Failed to reset GA ! (RBBM_STATUS=0x%08X)\n", tmp);
336 return -1; 309 return -1;
337} 310}
@@ -341,7 +314,7 @@ int rv515_gpu_reset(struct radeon_device *rdev)
341 uint32_t status; 314 uint32_t status;
342 315
343 /* reset order likely matter */ 316 /* reset order likely matter */
344 status = RREG32(RADEON_RBBM_STATUS); 317 status = RREG32(RBBM_STATUS);
345 /* reset HDP */ 318 /* reset HDP */
346 r100_hdp_reset(rdev); 319 r100_hdp_reset(rdev);
347 /* reset rb2d */ 320 /* reset rb2d */
@@ -353,12 +326,12 @@ int rv515_gpu_reset(struct radeon_device *rdev)
353 rv515_ga_reset(rdev); 326 rv515_ga_reset(rdev);
354 } 327 }
355 /* reset CP */ 328 /* reset CP */
356 status = RREG32(RADEON_RBBM_STATUS); 329 status = RREG32(RBBM_STATUS);
357 if (status & (1 << 16)) { 330 if (status & (1 << 16)) {
358 r100_cp_reset(rdev); 331 r100_cp_reset(rdev);
359 } 332 }
360 /* Check if GPU is idle */ 333 /* Check if GPU is idle */
361 status = RREG32(RADEON_RBBM_STATUS); 334 status = RREG32(RBBM_STATUS);
362 if (status & (1 << 31)) { 335 if (status & (1 << 31)) {
363 DRM_ERROR("Failed to reset GPU (RBBM_STATUS=0x%08X)\n", status); 336 DRM_ERROR("Failed to reset GPU (RBBM_STATUS=0x%08X)\n", status);
364 return -1; 337 return -1;
@@ -377,8 +350,7 @@ static void rv515_vram_get_type(struct radeon_device *rdev)
377 350
378 rdev->mc.vram_width = 128; 351 rdev->mc.vram_width = 128;
379 rdev->mc.vram_is_ddr = true; 352 rdev->mc.vram_is_ddr = true;
380 tmp = RREG32_MC(RV515_MC_CNTL); 353 tmp = RREG32_MC(RV515_MC_CNTL) & MEM_NUM_CHANNELS_MASK;
381 tmp &= RV515_MEM_NUM_CHANNELS_MASK;
382 switch (tmp) { 354 switch (tmp) {
383 case 0: 355 case 0:
384 rdev->mc.vram_width = 64; 356 rdev->mc.vram_width = 64;
@@ -394,11 +366,17 @@ static void rv515_vram_get_type(struct radeon_device *rdev)
394 366
395void rv515_vram_info(struct radeon_device *rdev) 367void rv515_vram_info(struct radeon_device *rdev)
396{ 368{
369 fixed20_12 a;
370
397 rv515_vram_get_type(rdev); 371 rv515_vram_get_type(rdev);
398 rdev->mc.vram_size = RREG32(RADEON_CONFIG_MEMSIZE);
399 372
400 rdev->mc.aper_base = drm_get_resource_start(rdev->ddev, 0); 373 r100_vram_init_sizes(rdev);
401 rdev->mc.aper_size = drm_get_resource_len(rdev->ddev, 0); 374 /* FIXME: we should enforce default clock in case GPU is not in
375 * default setup
376 */
377 a.full = rfixed_const(100);
378 rdev->pm.sclk.full = rfixed_const(rdev->clock.default_sclk);
379 rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a);
402} 380}
403 381
404 382
@@ -409,35 +387,35 @@ uint32_t rv515_mc_rreg(struct radeon_device *rdev, uint32_t reg)
409{ 387{
410 uint32_t r; 388 uint32_t r;
411 389
412 WREG32(R520_MC_IND_INDEX, 0x7f0000 | (reg & 0xffff)); 390 WREG32(MC_IND_INDEX, 0x7f0000 | (reg & 0xffff));
413 r = RREG32(R520_MC_IND_DATA); 391 r = RREG32(MC_IND_DATA);
414 WREG32(R520_MC_IND_INDEX, 0); 392 WREG32(MC_IND_INDEX, 0);
415 return r; 393 return r;
416} 394}
417 395
418void rv515_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v) 396void rv515_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
419{ 397{
420 WREG32(R520_MC_IND_INDEX, 0xff0000 | ((reg) & 0xffff)); 398 WREG32(MC_IND_INDEX, 0xff0000 | ((reg) & 0xffff));
421 WREG32(R520_MC_IND_DATA, (v)); 399 WREG32(MC_IND_DATA, (v));
422 WREG32(R520_MC_IND_INDEX, 0); 400 WREG32(MC_IND_INDEX, 0);
423} 401}
424 402
425uint32_t rv515_pcie_rreg(struct radeon_device *rdev, uint32_t reg) 403uint32_t rv515_pcie_rreg(struct radeon_device *rdev, uint32_t reg)
426{ 404{
427 uint32_t r; 405 uint32_t r;
428 406
429 WREG32(RADEON_PCIE_INDEX, ((reg) & 0x7ff)); 407 WREG32(PCIE_INDEX, ((reg) & 0x7ff));
430 (void)RREG32(RADEON_PCIE_INDEX); 408 (void)RREG32(PCIE_INDEX);
431 r = RREG32(RADEON_PCIE_DATA); 409 r = RREG32(PCIE_DATA);
432 return r; 410 return r;
433} 411}
434 412
435void rv515_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v) 413void rv515_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
436{ 414{
437 WREG32(RADEON_PCIE_INDEX, ((reg) & 0x7ff)); 415 WREG32(PCIE_INDEX, ((reg) & 0x7ff));
438 (void)RREG32(RADEON_PCIE_INDEX); 416 (void)RREG32(PCIE_INDEX);
439 WREG32(RADEON_PCIE_DATA, (v)); 417 WREG32(PCIE_DATA, (v));
440 (void)RREG32(RADEON_PCIE_DATA); 418 (void)RREG32(PCIE_DATA);
441} 419}
442 420
443 421
@@ -452,13 +430,13 @@ static int rv515_debugfs_pipes_info(struct seq_file *m, void *data)
452 struct radeon_device *rdev = dev->dev_private; 430 struct radeon_device *rdev = dev->dev_private;
453 uint32_t tmp; 431 uint32_t tmp;
454 432
455 tmp = RREG32(R400_GB_PIPE_SELECT); 433 tmp = RREG32(GB_PIPE_SELECT);
456 seq_printf(m, "GB_PIPE_SELECT 0x%08x\n", tmp); 434 seq_printf(m, "GB_PIPE_SELECT 0x%08x\n", tmp);
457 tmp = RREG32(R500_SU_REG_DEST); 435 tmp = RREG32(SU_REG_DEST);
458 seq_printf(m, "SU_REG_DEST 0x%08x\n", tmp); 436 seq_printf(m, "SU_REG_DEST 0x%08x\n", tmp);
459 tmp = RREG32(R300_GB_TILE_CONFIG); 437 tmp = RREG32(GB_TILE_CONFIG);
460 seq_printf(m, "GB_TILE_CONFIG 0x%08x\n", tmp); 438 seq_printf(m, "GB_TILE_CONFIG 0x%08x\n", tmp);
461 tmp = RREG32(R300_DST_PIPE_CONFIG); 439 tmp = RREG32(DST_PIPE_CONFIG);
462 seq_printf(m, "DST_PIPE_CONFIG 0x%08x\n", tmp); 440 seq_printf(m, "DST_PIPE_CONFIG 0x%08x\n", tmp);
463 return 0; 441 return 0;
464} 442}
@@ -509,9 +487,9 @@ int rv515_debugfs_ga_info_init(struct radeon_device *rdev)
509/* 487/*
510 * Asic initialization 488 * Asic initialization
511 */ 489 */
512static const unsigned r500_reg_safe_bm[159] = { 490static const unsigned r500_reg_safe_bm[219] = {
491 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
513 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 492 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
514 0xFFFFFFBF, 0xFFFFFFFF, 0xFFFFFFBF, 0xFFFFFFFF,
515 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 493 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
516 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 494 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
517 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 495 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
@@ -549,14 +527,575 @@ static const unsigned r500_reg_safe_bm[159] = {
549 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 527 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
550 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF80FFFF, 528 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFF80FFFF,
551 0x00000000, 0x00000000, 0x00000000, 0x00000000, 529 0x00000000, 0x00000000, 0x00000000, 0x00000000,
552 0x0003FC01, 0x3FFFFCF8, 0xFE800B19, 530 0x0003FC01, 0x3FFFFCF8, 0xFE800B19, 0xFFFFFFFF,
531 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
532 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
533 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
534 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
535 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
536 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
537 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
538 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
539 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
540 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
541 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
542 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
543 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
544 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
545 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
553}; 546};
554 547
555
556
557int rv515_init(struct radeon_device *rdev) 548int rv515_init(struct radeon_device *rdev)
558{ 549{
559 rdev->config.r300.reg_safe_bm = r500_reg_safe_bm; 550 rdev->config.r300.reg_safe_bm = r500_reg_safe_bm;
560 rdev->config.r300.reg_safe_bm_size = ARRAY_SIZE(r500_reg_safe_bm); 551 rdev->config.r300.reg_safe_bm_size = ARRAY_SIZE(r500_reg_safe_bm);
561 return 0; 552 return 0;
562} 553}
554
555void atom_rv515_force_tv_scaler(struct radeon_device *rdev)
556{
557
558 WREG32(0x659C, 0x0);
559 WREG32(0x6594, 0x705);
560 WREG32(0x65A4, 0x10001);
561 WREG32(0x65D8, 0x0);
562 WREG32(0x65B0, 0x0);
563 WREG32(0x65C0, 0x0);
564 WREG32(0x65D4, 0x0);
565 WREG32(0x6578, 0x0);
566 WREG32(0x657C, 0x841880A8);
567 WREG32(0x6578, 0x1);
568 WREG32(0x657C, 0x84208680);
569 WREG32(0x6578, 0x2);
570 WREG32(0x657C, 0xBFF880B0);
571 WREG32(0x6578, 0x100);
572 WREG32(0x657C, 0x83D88088);
573 WREG32(0x6578, 0x101);
574 WREG32(0x657C, 0x84608680);
575 WREG32(0x6578, 0x102);
576 WREG32(0x657C, 0xBFF080D0);
577 WREG32(0x6578, 0x200);
578 WREG32(0x657C, 0x83988068);
579 WREG32(0x6578, 0x201);
580 WREG32(0x657C, 0x84A08680);
581 WREG32(0x6578, 0x202);
582 WREG32(0x657C, 0xBFF080F8);
583 WREG32(0x6578, 0x300);
584 WREG32(0x657C, 0x83588058);
585 WREG32(0x6578, 0x301);
586 WREG32(0x657C, 0x84E08660);
587 WREG32(0x6578, 0x302);
588 WREG32(0x657C, 0xBFF88120);
589 WREG32(0x6578, 0x400);
590 WREG32(0x657C, 0x83188040);
591 WREG32(0x6578, 0x401);
592 WREG32(0x657C, 0x85008660);
593 WREG32(0x6578, 0x402);
594 WREG32(0x657C, 0xBFF88150);
595 WREG32(0x6578, 0x500);
596 WREG32(0x657C, 0x82D88030);
597 WREG32(0x6578, 0x501);
598 WREG32(0x657C, 0x85408640);
599 WREG32(0x6578, 0x502);
600 WREG32(0x657C, 0xBFF88180);
601 WREG32(0x6578, 0x600);
602 WREG32(0x657C, 0x82A08018);
603 WREG32(0x6578, 0x601);
604 WREG32(0x657C, 0x85808620);
605 WREG32(0x6578, 0x602);
606 WREG32(0x657C, 0xBFF081B8);
607 WREG32(0x6578, 0x700);
608 WREG32(0x657C, 0x82608010);
609 WREG32(0x6578, 0x701);
610 WREG32(0x657C, 0x85A08600);
611 WREG32(0x6578, 0x702);
612 WREG32(0x657C, 0x800081F0);
613 WREG32(0x6578, 0x800);
614 WREG32(0x657C, 0x8228BFF8);
615 WREG32(0x6578, 0x801);
616 WREG32(0x657C, 0x85E085E0);
617 WREG32(0x6578, 0x802);
618 WREG32(0x657C, 0xBFF88228);
619 WREG32(0x6578, 0x10000);
620 WREG32(0x657C, 0x82A8BF00);
621 WREG32(0x6578, 0x10001);
622 WREG32(0x657C, 0x82A08CC0);
623 WREG32(0x6578, 0x10002);
624 WREG32(0x657C, 0x8008BEF8);
625 WREG32(0x6578, 0x10100);
626 WREG32(0x657C, 0x81F0BF28);
627 WREG32(0x6578, 0x10101);
628 WREG32(0x657C, 0x83608CA0);
629 WREG32(0x6578, 0x10102);
630 WREG32(0x657C, 0x8018BED0);
631 WREG32(0x6578, 0x10200);
632 WREG32(0x657C, 0x8148BF38);
633 WREG32(0x6578, 0x10201);
634 WREG32(0x657C, 0x84408C80);
635 WREG32(0x6578, 0x10202);
636 WREG32(0x657C, 0x8008BEB8);
637 WREG32(0x6578, 0x10300);
638 WREG32(0x657C, 0x80B0BF78);
639 WREG32(0x6578, 0x10301);
640 WREG32(0x657C, 0x85008C20);
641 WREG32(0x6578, 0x10302);
642 WREG32(0x657C, 0x8020BEA0);
643 WREG32(0x6578, 0x10400);
644 WREG32(0x657C, 0x8028BF90);
645 WREG32(0x6578, 0x10401);
646 WREG32(0x657C, 0x85E08BC0);
647 WREG32(0x6578, 0x10402);
648 WREG32(0x657C, 0x8018BE90);
649 WREG32(0x6578, 0x10500);
650 WREG32(0x657C, 0xBFB8BFB0);
651 WREG32(0x6578, 0x10501);
652 WREG32(0x657C, 0x86C08B40);
653 WREG32(0x6578, 0x10502);
654 WREG32(0x657C, 0x8010BE90);
655 WREG32(0x6578, 0x10600);
656 WREG32(0x657C, 0xBF58BFC8);
657 WREG32(0x6578, 0x10601);
658 WREG32(0x657C, 0x87A08AA0);
659 WREG32(0x6578, 0x10602);
660 WREG32(0x657C, 0x8010BE98);
661 WREG32(0x6578, 0x10700);
662 WREG32(0x657C, 0xBF10BFF0);
663 WREG32(0x6578, 0x10701);
664 WREG32(0x657C, 0x886089E0);
665 WREG32(0x6578, 0x10702);
666 WREG32(0x657C, 0x8018BEB0);
667 WREG32(0x6578, 0x10800);
668 WREG32(0x657C, 0xBED8BFE8);
669 WREG32(0x6578, 0x10801);
670 WREG32(0x657C, 0x89408940);
671 WREG32(0x6578, 0x10802);
672 WREG32(0x657C, 0xBFE8BED8);
673 WREG32(0x6578, 0x20000);
674 WREG32(0x657C, 0x80008000);
675 WREG32(0x6578, 0x20001);
676 WREG32(0x657C, 0x90008000);
677 WREG32(0x6578, 0x20002);
678 WREG32(0x657C, 0x80008000);
679 WREG32(0x6578, 0x20003);
680 WREG32(0x657C, 0x80008000);
681 WREG32(0x6578, 0x20100);
682 WREG32(0x657C, 0x80108000);
683 WREG32(0x6578, 0x20101);
684 WREG32(0x657C, 0x8FE0BF70);
685 WREG32(0x6578, 0x20102);
686 WREG32(0x657C, 0xBFE880C0);
687 WREG32(0x6578, 0x20103);
688 WREG32(0x657C, 0x80008000);
689 WREG32(0x6578, 0x20200);
690 WREG32(0x657C, 0x8018BFF8);
691 WREG32(0x6578, 0x20201);
692 WREG32(0x657C, 0x8F80BF08);
693 WREG32(0x6578, 0x20202);
694 WREG32(0x657C, 0xBFD081A0);
695 WREG32(0x6578, 0x20203);
696 WREG32(0x657C, 0xBFF88000);
697 WREG32(0x6578, 0x20300);
698 WREG32(0x657C, 0x80188000);
699 WREG32(0x6578, 0x20301);
700 WREG32(0x657C, 0x8EE0BEC0);
701 WREG32(0x6578, 0x20302);
702 WREG32(0x657C, 0xBFB082A0);
703 WREG32(0x6578, 0x20303);
704 WREG32(0x657C, 0x80008000);
705 WREG32(0x6578, 0x20400);
706 WREG32(0x657C, 0x80188000);
707 WREG32(0x6578, 0x20401);
708 WREG32(0x657C, 0x8E00BEA0);
709 WREG32(0x6578, 0x20402);
710 WREG32(0x657C, 0xBF8883C0);
711 WREG32(0x6578, 0x20403);
712 WREG32(0x657C, 0x80008000);
713 WREG32(0x6578, 0x20500);
714 WREG32(0x657C, 0x80188000);
715 WREG32(0x6578, 0x20501);
716 WREG32(0x657C, 0x8D00BE90);
717 WREG32(0x6578, 0x20502);
718 WREG32(0x657C, 0xBF588500);
719 WREG32(0x6578, 0x20503);
720 WREG32(0x657C, 0x80008008);
721 WREG32(0x6578, 0x20600);
722 WREG32(0x657C, 0x80188000);
723 WREG32(0x6578, 0x20601);
724 WREG32(0x657C, 0x8BC0BE98);
725 WREG32(0x6578, 0x20602);
726 WREG32(0x657C, 0xBF308660);
727 WREG32(0x6578, 0x20603);
728 WREG32(0x657C, 0x80008008);
729 WREG32(0x6578, 0x20700);
730 WREG32(0x657C, 0x80108000);
731 WREG32(0x6578, 0x20701);
732 WREG32(0x657C, 0x8A80BEB0);
733 WREG32(0x6578, 0x20702);
734 WREG32(0x657C, 0xBF0087C0);
735 WREG32(0x6578, 0x20703);
736 WREG32(0x657C, 0x80008008);
737 WREG32(0x6578, 0x20800);
738 WREG32(0x657C, 0x80108000);
739 WREG32(0x6578, 0x20801);
740 WREG32(0x657C, 0x8920BED0);
741 WREG32(0x6578, 0x20802);
742 WREG32(0x657C, 0xBED08920);
743 WREG32(0x6578, 0x20803);
744 WREG32(0x657C, 0x80008010);
745 WREG32(0x6578, 0x30000);
746 WREG32(0x657C, 0x90008000);
747 WREG32(0x6578, 0x30001);
748 WREG32(0x657C, 0x80008000);
749 WREG32(0x6578, 0x30100);
750 WREG32(0x657C, 0x8FE0BF90);
751 WREG32(0x6578, 0x30101);
752 WREG32(0x657C, 0xBFF880A0);
753 WREG32(0x6578, 0x30200);
754 WREG32(0x657C, 0x8F60BF40);
755 WREG32(0x6578, 0x30201);
756 WREG32(0x657C, 0xBFE88180);
757 WREG32(0x6578, 0x30300);
758 WREG32(0x657C, 0x8EC0BF00);
759 WREG32(0x6578, 0x30301);
760 WREG32(0x657C, 0xBFC88280);
761 WREG32(0x6578, 0x30400);
762 WREG32(0x657C, 0x8DE0BEE0);
763 WREG32(0x6578, 0x30401);
764 WREG32(0x657C, 0xBFA083A0);
765 WREG32(0x6578, 0x30500);
766 WREG32(0x657C, 0x8CE0BED0);
767 WREG32(0x6578, 0x30501);
768 WREG32(0x657C, 0xBF7884E0);
769 WREG32(0x6578, 0x30600);
770 WREG32(0x657C, 0x8BA0BED8);
771 WREG32(0x6578, 0x30601);
772 WREG32(0x657C, 0xBF508640);
773 WREG32(0x6578, 0x30700);
774 WREG32(0x657C, 0x8A60BEE8);
775 WREG32(0x6578, 0x30701);
776 WREG32(0x657C, 0xBF2087A0);
777 WREG32(0x6578, 0x30800);
778 WREG32(0x657C, 0x8900BF00);
779 WREG32(0x6578, 0x30801);
780 WREG32(0x657C, 0xBF008900);
781}
782
783struct rv515_watermark {
784 u32 lb_request_fifo_depth;
785 fixed20_12 num_line_pair;
786 fixed20_12 estimated_width;
787 fixed20_12 worst_case_latency;
788 fixed20_12 consumption_rate;
789 fixed20_12 active_time;
790 fixed20_12 dbpp;
791 fixed20_12 priority_mark_max;
792 fixed20_12 priority_mark;
793 fixed20_12 sclk;
794};
795
796void rv515_crtc_bandwidth_compute(struct radeon_device *rdev,
797 struct radeon_crtc *crtc,
798 struct rv515_watermark *wm)
799{
800 struct drm_display_mode *mode = &crtc->base.mode;
801 fixed20_12 a, b, c;
802 fixed20_12 pclk, request_fifo_depth, tolerable_latency, estimated_width;
803 fixed20_12 consumption_time, line_time, chunk_time, read_delay_latency;
804
805 if (!crtc->base.enabled) {
806 /* FIXME: wouldn't it better to set priority mark to maximum */
807 wm->lb_request_fifo_depth = 4;
808 return;
809 }
810
811 if (crtc->vsc.full > rfixed_const(2))
812 wm->num_line_pair.full = rfixed_const(2);
813 else
814 wm->num_line_pair.full = rfixed_const(1);
815
816 b.full = rfixed_const(mode->crtc_hdisplay);
817 c.full = rfixed_const(256);
818 a.full = rfixed_mul(wm->num_line_pair, b);
819 request_fifo_depth.full = rfixed_div(a, c);
820 if (a.full < rfixed_const(4)) {
821 wm->lb_request_fifo_depth = 4;
822 } else {
823 wm->lb_request_fifo_depth = rfixed_trunc(request_fifo_depth);
824 }
825
826 /* Determine consumption rate
827 * pclk = pixel clock period(ns) = 1000 / (mode.clock / 1000)
828 * vtaps = number of vertical taps,
829 * vsc = vertical scaling ratio, defined as source/destination
830 * hsc = horizontal scaling ration, defined as source/destination
831 */
832 a.full = rfixed_const(mode->clock);
833 b.full = rfixed_const(1000);
834 a.full = rfixed_div(a, b);
835 pclk.full = rfixed_div(b, a);
836 if (crtc->rmx_type != RMX_OFF) {
837 b.full = rfixed_const(2);
838 if (crtc->vsc.full > b.full)
839 b.full = crtc->vsc.full;
840 b.full = rfixed_mul(b, crtc->hsc);
841 c.full = rfixed_const(2);
842 b.full = rfixed_div(b, c);
843 consumption_time.full = rfixed_div(pclk, b);
844 } else {
845 consumption_time.full = pclk.full;
846 }
847 a.full = rfixed_const(1);
848 wm->consumption_rate.full = rfixed_div(a, consumption_time);
849
850
851 /* Determine line time
852 * LineTime = total time for one line of displayhtotal
853 * LineTime = total number of horizontal pixels
854 * pclk = pixel clock period(ns)
855 */
856 a.full = rfixed_const(crtc->base.mode.crtc_htotal);
857 line_time.full = rfixed_mul(a, pclk);
858
859 /* Determine active time
860 * ActiveTime = time of active region of display within one line,
861 * hactive = total number of horizontal active pixels
862 * htotal = total number of horizontal pixels
863 */
864 a.full = rfixed_const(crtc->base.mode.crtc_htotal);
865 b.full = rfixed_const(crtc->base.mode.crtc_hdisplay);
866 wm->active_time.full = rfixed_mul(line_time, b);
867 wm->active_time.full = rfixed_div(wm->active_time, a);
868
869 /* Determine chunk time
870 * ChunkTime = the time it takes the DCP to send one chunk of data
871 * to the LB which consists of pipeline delay and inter chunk gap
872 * sclk = system clock(Mhz)
873 */
874 a.full = rfixed_const(600 * 1000);
875 chunk_time.full = rfixed_div(a, rdev->pm.sclk);
876 read_delay_latency.full = rfixed_const(1000);
877
878 /* Determine the worst case latency
879 * NumLinePair = Number of line pairs to request(1=2 lines, 2=4 lines)
880 * WorstCaseLatency = worst case time from urgent to when the MC starts
881 * to return data
882 * READ_DELAY_IDLE_MAX = constant of 1us
883 * ChunkTime = time it takes the DCP to send one chunk of data to the LB
884 * which consists of pipeline delay and inter chunk gap
885 */
886 if (rfixed_trunc(wm->num_line_pair) > 1) {
887 a.full = rfixed_const(3);
888 wm->worst_case_latency.full = rfixed_mul(a, chunk_time);
889 wm->worst_case_latency.full += read_delay_latency.full;
890 } else {
891 wm->worst_case_latency.full = chunk_time.full + read_delay_latency.full;
892 }
893
894 /* Determine the tolerable latency
895 * TolerableLatency = Any given request has only 1 line time
896 * for the data to be returned
897 * LBRequestFifoDepth = Number of chunk requests the LB can
898 * put into the request FIFO for a display
899 * LineTime = total time for one line of display
900 * ChunkTime = the time it takes the DCP to send one chunk
901 * of data to the LB which consists of
902 * pipeline delay and inter chunk gap
903 */
904 if ((2+wm->lb_request_fifo_depth) >= rfixed_trunc(request_fifo_depth)) {
905 tolerable_latency.full = line_time.full;
906 } else {
907 tolerable_latency.full = rfixed_const(wm->lb_request_fifo_depth - 2);
908 tolerable_latency.full = request_fifo_depth.full - tolerable_latency.full;
909 tolerable_latency.full = rfixed_mul(tolerable_latency, chunk_time);
910 tolerable_latency.full = line_time.full - tolerable_latency.full;
911 }
912 /* We assume worst case 32bits (4 bytes) */
913 wm->dbpp.full = rfixed_const(2 * 16);
914
915 /* Determine the maximum priority mark
916 * width = viewport width in pixels
917 */
918 a.full = rfixed_const(16);
919 wm->priority_mark_max.full = rfixed_const(crtc->base.mode.crtc_hdisplay);
920 wm->priority_mark_max.full = rfixed_div(wm->priority_mark_max, a);
921
922 /* Determine estimated width */
923 estimated_width.full = tolerable_latency.full - wm->worst_case_latency.full;
924 estimated_width.full = rfixed_div(estimated_width, consumption_time);
925 if (rfixed_trunc(estimated_width) > crtc->base.mode.crtc_hdisplay) {
926 wm->priority_mark.full = rfixed_const(10);
927 } else {
928 a.full = rfixed_const(16);
929 wm->priority_mark.full = rfixed_div(estimated_width, a);
930 wm->priority_mark.full = wm->priority_mark_max.full - wm->priority_mark.full;
931 }
932}
933
934void rv515_bandwidth_avivo_update(struct radeon_device *rdev)
935{
936 struct drm_display_mode *mode0 = NULL;
937 struct drm_display_mode *mode1 = NULL;
938 struct rv515_watermark wm0;
939 struct rv515_watermark wm1;
940 u32 tmp;
941 fixed20_12 priority_mark02, priority_mark12, fill_rate;
942 fixed20_12 a, b;
943
944 if (rdev->mode_info.crtcs[0]->base.enabled)
945 mode0 = &rdev->mode_info.crtcs[0]->base.mode;
946 if (rdev->mode_info.crtcs[1]->base.enabled)
947 mode1 = &rdev->mode_info.crtcs[1]->base.mode;
948 rs690_line_buffer_adjust(rdev, mode0, mode1);
949
950 rv515_crtc_bandwidth_compute(rdev, rdev->mode_info.crtcs[0], &wm0);
951 rv515_crtc_bandwidth_compute(rdev, rdev->mode_info.crtcs[1], &wm1);
952
953 tmp = wm0.lb_request_fifo_depth;
954 tmp |= wm1.lb_request_fifo_depth << 16;
955 WREG32(LB_MAX_REQ_OUTSTANDING, tmp);
956
957 if (mode0 && mode1) {
958 if (rfixed_trunc(wm0.dbpp) > 64)
959 a.full = rfixed_div(wm0.dbpp, wm0.num_line_pair);
960 else
961 a.full = wm0.num_line_pair.full;
962 if (rfixed_trunc(wm1.dbpp) > 64)
963 b.full = rfixed_div(wm1.dbpp, wm1.num_line_pair);
964 else
965 b.full = wm1.num_line_pair.full;
966 a.full += b.full;
967 fill_rate.full = rfixed_div(wm0.sclk, a);
968 if (wm0.consumption_rate.full > fill_rate.full) {
969 b.full = wm0.consumption_rate.full - fill_rate.full;
970 b.full = rfixed_mul(b, wm0.active_time);
971 a.full = rfixed_const(16);
972 b.full = rfixed_div(b, a);
973 a.full = rfixed_mul(wm0.worst_case_latency,
974 wm0.consumption_rate);
975 priority_mark02.full = a.full + b.full;
976 } else {
977 a.full = rfixed_mul(wm0.worst_case_latency,
978 wm0.consumption_rate);
979 b.full = rfixed_const(16 * 1000);
980 priority_mark02.full = rfixed_div(a, b);
981 }
982 if (wm1.consumption_rate.full > fill_rate.full) {
983 b.full = wm1.consumption_rate.full - fill_rate.full;
984 b.full = rfixed_mul(b, wm1.active_time);
985 a.full = rfixed_const(16);
986 b.full = rfixed_div(b, a);
987 a.full = rfixed_mul(wm1.worst_case_latency,
988 wm1.consumption_rate);
989 priority_mark12.full = a.full + b.full;
990 } else {
991 a.full = rfixed_mul(wm1.worst_case_latency,
992 wm1.consumption_rate);
993 b.full = rfixed_const(16 * 1000);
994 priority_mark12.full = rfixed_div(a, b);
995 }
996 if (wm0.priority_mark.full > priority_mark02.full)
997 priority_mark02.full = wm0.priority_mark.full;
998 if (rfixed_trunc(priority_mark02) < 0)
999 priority_mark02.full = 0;
1000 if (wm0.priority_mark_max.full > priority_mark02.full)
1001 priority_mark02.full = wm0.priority_mark_max.full;
1002 if (wm1.priority_mark.full > priority_mark12.full)
1003 priority_mark12.full = wm1.priority_mark.full;
1004 if (rfixed_trunc(priority_mark12) < 0)
1005 priority_mark12.full = 0;
1006 if (wm1.priority_mark_max.full > priority_mark12.full)
1007 priority_mark12.full = wm1.priority_mark_max.full;
1008 WREG32(D1MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark02));
1009 WREG32(D1MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark02));
1010 WREG32(D2MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark12));
1011 WREG32(D2MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark12));
1012 } else if (mode0) {
1013 if (rfixed_trunc(wm0.dbpp) > 64)
1014 a.full = rfixed_div(wm0.dbpp, wm0.num_line_pair);
1015 else
1016 a.full = wm0.num_line_pair.full;
1017 fill_rate.full = rfixed_div(wm0.sclk, a);
1018 if (wm0.consumption_rate.full > fill_rate.full) {
1019 b.full = wm0.consumption_rate.full - fill_rate.full;
1020 b.full = rfixed_mul(b, wm0.active_time);
1021 a.full = rfixed_const(16);
1022 b.full = rfixed_div(b, a);
1023 a.full = rfixed_mul(wm0.worst_case_latency,
1024 wm0.consumption_rate);
1025 priority_mark02.full = a.full + b.full;
1026 } else {
1027 a.full = rfixed_mul(wm0.worst_case_latency,
1028 wm0.consumption_rate);
1029 b.full = rfixed_const(16);
1030 priority_mark02.full = rfixed_div(a, b);
1031 }
1032 if (wm0.priority_mark.full > priority_mark02.full)
1033 priority_mark02.full = wm0.priority_mark.full;
1034 if (rfixed_trunc(priority_mark02) < 0)
1035 priority_mark02.full = 0;
1036 if (wm0.priority_mark_max.full > priority_mark02.full)
1037 priority_mark02.full = wm0.priority_mark_max.full;
1038 WREG32(D1MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark02));
1039 WREG32(D1MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark02));
1040 WREG32(D2MODE_PRIORITY_A_CNT, MODE_PRIORITY_OFF);
1041 WREG32(D2MODE_PRIORITY_B_CNT, MODE_PRIORITY_OFF);
1042 } else {
1043 if (rfixed_trunc(wm1.dbpp) > 64)
1044 a.full = rfixed_div(wm1.dbpp, wm1.num_line_pair);
1045 else
1046 a.full = wm1.num_line_pair.full;
1047 fill_rate.full = rfixed_div(wm1.sclk, a);
1048 if (wm1.consumption_rate.full > fill_rate.full) {
1049 b.full = wm1.consumption_rate.full - fill_rate.full;
1050 b.full = rfixed_mul(b, wm1.active_time);
1051 a.full = rfixed_const(16);
1052 b.full = rfixed_div(b, a);
1053 a.full = rfixed_mul(wm1.worst_case_latency,
1054 wm1.consumption_rate);
1055 priority_mark12.full = a.full + b.full;
1056 } else {
1057 a.full = rfixed_mul(wm1.worst_case_latency,
1058 wm1.consumption_rate);
1059 b.full = rfixed_const(16 * 1000);
1060 priority_mark12.full = rfixed_div(a, b);
1061 }
1062 if (wm1.priority_mark.full > priority_mark12.full)
1063 priority_mark12.full = wm1.priority_mark.full;
1064 if (rfixed_trunc(priority_mark12) < 0)
1065 priority_mark12.full = 0;
1066 if (wm1.priority_mark_max.full > priority_mark12.full)
1067 priority_mark12.full = wm1.priority_mark_max.full;
1068 WREG32(D1MODE_PRIORITY_A_CNT, MODE_PRIORITY_OFF);
1069 WREG32(D1MODE_PRIORITY_B_CNT, MODE_PRIORITY_OFF);
1070 WREG32(D2MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark12));
1071 WREG32(D2MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark12));
1072 }
1073}
1074
1075void rv515_bandwidth_update(struct radeon_device *rdev)
1076{
1077 uint32_t tmp;
1078 struct drm_display_mode *mode0 = NULL;
1079 struct drm_display_mode *mode1 = NULL;
1080
1081 if (rdev->mode_info.crtcs[0]->base.enabled)
1082 mode0 = &rdev->mode_info.crtcs[0]->base.mode;
1083 if (rdev->mode_info.crtcs[1]->base.enabled)
1084 mode1 = &rdev->mode_info.crtcs[1]->base.mode;
1085 /*
1086 * Set display0/1 priority up in the memory controller for
1087 * modes if the user specifies HIGH for displaypriority
1088 * option.
1089 */
1090 if (rdev->disp_priority == 2) {
1091 tmp = RREG32_MC(MC_MISC_LAT_TIMER);
1092 tmp &= ~MC_DISP1R_INIT_LAT_MASK;
1093 tmp &= ~MC_DISP0R_INIT_LAT_MASK;
1094 if (mode1)
1095 tmp |= (1 << MC_DISP1R_INIT_LAT_SHIFT);
1096 if (mode0)
1097 tmp |= (1 << MC_DISP0R_INIT_LAT_SHIFT);
1098 WREG32_MC(MC_MISC_LAT_TIMER, tmp);
1099 }
1100 rv515_bandwidth_avivo_update(rdev);
1101}
diff --git a/drivers/gpu/drm/radeon/rv515r.h b/drivers/gpu/drm/radeon/rv515r.h
new file mode 100644
index 00000000000..f3cf8403990
--- /dev/null
+++ b/drivers/gpu/drm/radeon/rv515r.h
@@ -0,0 +1,170 @@
1/*
2 * Copyright 2008 Advanced Micro Devices, Inc.
3 * Copyright 2008 Red Hat Inc.
4 * Copyright 2009 Jerome Glisse.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the 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 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
23 *
24 * Authors: Dave Airlie
25 * Alex Deucher
26 * Jerome Glisse
27 */
28#ifndef RV515R_H
29#define RV515R_H
30
31/* RV515 registers */
32#define PCIE_INDEX 0x0030
33#define PCIE_DATA 0x0034
34#define MC_IND_INDEX 0x0070
35#define MC_IND_WR_EN (1 << 24)
36#define MC_IND_DATA 0x0074
37#define RBBM_SOFT_RESET 0x00F0
38#define CONFIG_MEMSIZE 0x00F8
39#define HDP_FB_LOCATION 0x0134
40#define CP_CSQ_CNTL 0x0740
41#define CP_CSQ_MODE 0x0744
42#define CP_CSQ_ADDR 0x07F0
43#define CP_CSQ_DATA 0x07F4
44#define CP_CSQ_STAT 0x07F8
45#define CP_CSQ2_STAT 0x07FC
46#define RBBM_STATUS 0x0E40
47#define DST_PIPE_CONFIG 0x170C
48#define WAIT_UNTIL 0x1720
49#define WAIT_2D_IDLE (1 << 14)
50#define WAIT_3D_IDLE (1 << 15)
51#define WAIT_2D_IDLECLEAN (1 << 16)
52#define WAIT_3D_IDLECLEAN (1 << 17)
53#define ISYNC_CNTL 0x1724
54#define ISYNC_ANY2D_IDLE3D (1 << 0)
55#define ISYNC_ANY3D_IDLE2D (1 << 1)
56#define ISYNC_TRIG2D_IDLE3D (1 << 2)
57#define ISYNC_TRIG3D_IDLE2D (1 << 3)
58#define ISYNC_WAIT_IDLEGUI (1 << 4)
59#define ISYNC_CPSCRATCH_IDLEGUI (1 << 5)
60#define VAP_INDEX_OFFSET 0x208C
61#define VAP_PVS_STATE_FLUSH_REG 0x2284
62#define GB_ENABLE 0x4008
63#define GB_MSPOS0 0x4010
64#define MS_X0_SHIFT 0
65#define MS_Y0_SHIFT 4
66#define MS_X1_SHIFT 8
67#define MS_Y1_SHIFT 12
68#define MS_X2_SHIFT 16
69#define MS_Y2_SHIFT 20
70#define MSBD0_Y_SHIFT 24
71#define MSBD0_X_SHIFT 28
72#define GB_MSPOS1 0x4014
73#define MS_X3_SHIFT 0
74#define MS_Y3_SHIFT 4
75#define MS_X4_SHIFT 8
76#define MS_Y4_SHIFT 12
77#define MS_X5_SHIFT 16
78#define MS_Y5_SHIFT 20
79#define MSBD1_SHIFT 24
80#define GB_TILE_CONFIG 0x4018
81#define ENABLE_TILING (1 << 0)
82#define PIPE_COUNT_MASK 0x0000000E
83#define PIPE_COUNT_SHIFT 1
84#define TILE_SIZE_8 (0 << 4)
85#define TILE_SIZE_16 (1 << 4)
86#define TILE_SIZE_32 (2 << 4)
87#define SUBPIXEL_1_12 (0 << 16)
88#define SUBPIXEL_1_16 (1 << 16)
89#define GB_SELECT 0x401C
90#define GB_AA_CONFIG 0x4020
91#define GB_PIPE_SELECT 0x402C
92#define GA_ENHANCE 0x4274
93#define GA_DEADLOCK_CNTL (1 << 0)
94#define GA_FASTSYNC_CNTL (1 << 1)
95#define GA_POLY_MODE 0x4288
96#define FRONT_PTYPE_POINT (0 << 4)
97#define FRONT_PTYPE_LINE (1 << 4)
98#define FRONT_PTYPE_TRIANGE (2 << 4)
99#define BACK_PTYPE_POINT (0 << 7)
100#define BACK_PTYPE_LINE (1 << 7)
101#define BACK_PTYPE_TRIANGE (2 << 7)
102#define GA_ROUND_MODE 0x428C
103#define GEOMETRY_ROUND_TRUNC (0 << 0)
104#define GEOMETRY_ROUND_NEAREST (1 << 0)
105#define COLOR_ROUND_TRUNC (0 << 2)
106#define COLOR_ROUND_NEAREST (1 << 2)
107#define SU_REG_DEST 0x42C8
108#define RB3D_DSTCACHE_CTLSTAT 0x4E4C
109#define RB3D_DC_FLUSH (2 << 0)
110#define RB3D_DC_FREE (2 << 2)
111#define RB3D_DC_FINISH (1 << 4)
112#define ZB_ZCACHE_CTLSTAT 0x4F18
113#define ZC_FLUSH (1 << 0)
114#define ZC_FREE (1 << 1)
115#define DC_LB_MEMORY_SPLIT 0x6520
116#define DC_LB_MEMORY_SPLIT_MASK 0x00000003
117#define DC_LB_MEMORY_SPLIT_SHIFT 0
118#define DC_LB_MEMORY_SPLIT_D1HALF_D2HALF 0
119#define DC_LB_MEMORY_SPLIT_D1_3Q_D2_1Q 1
120#define DC_LB_MEMORY_SPLIT_D1_ONLY 2
121#define DC_LB_MEMORY_SPLIT_D1_1Q_D2_3Q 3
122#define DC_LB_MEMORY_SPLIT_SHIFT_MODE (1 << 2)
123#define DC_LB_DISP1_END_ADR_SHIFT 4
124#define DC_LB_DISP1_END_ADR_MASK 0x00007FF0
125#define D1MODE_PRIORITY_A_CNT 0x6548
126#define MODE_PRIORITY_MARK_MASK 0x00007FFF
127#define MODE_PRIORITY_OFF (1 << 16)
128#define MODE_PRIORITY_ALWAYS_ON (1 << 20)
129#define MODE_PRIORITY_FORCE_MASK (1 << 24)
130#define D1MODE_PRIORITY_B_CNT 0x654C
131#define LB_MAX_REQ_OUTSTANDING 0x6D58
132#define LB_D1_MAX_REQ_OUTSTANDING_MASK 0x0000000F
133#define LB_D1_MAX_REQ_OUTSTANDING_SHIFT 0
134#define LB_D2_MAX_REQ_OUTSTANDING_MASK 0x000F0000
135#define LB_D2_MAX_REQ_OUTSTANDING_SHIFT 16
136#define D2MODE_PRIORITY_A_CNT 0x6D48
137#define D2MODE_PRIORITY_B_CNT 0x6D4C
138
139/* ix[MC] registers */
140#define MC_FB_LOCATION 0x01
141#define MC_FB_START_MASK 0x0000FFFF
142#define MC_FB_START_SHIFT 0
143#define MC_FB_TOP_MASK 0xFFFF0000
144#define MC_FB_TOP_SHIFT 16
145#define MC_AGP_LOCATION 0x02
146#define MC_AGP_START_MASK 0x0000FFFF
147#define MC_AGP_START_SHIFT 0
148#define MC_AGP_TOP_MASK 0xFFFF0000
149#define MC_AGP_TOP_SHIFT 16
150#define MC_AGP_BASE 0x03
151#define MC_AGP_BASE_2 0x04
152#define MC_CNTL 0x5
153#define MEM_NUM_CHANNELS_MASK 0x00000003
154#define MC_STATUS 0x08
155#define MC_STATUS_IDLE (1 << 4)
156#define MC_MISC_LAT_TIMER 0x09
157#define MC_CPR_INIT_LAT_MASK 0x0000000F
158#define MC_VF_INIT_LAT_MASK 0x000000F0
159#define MC_DISP0R_INIT_LAT_MASK 0x00000F00
160#define MC_DISP0R_INIT_LAT_SHIFT 8
161#define MC_DISP1R_INIT_LAT_MASK 0x0000F000
162#define MC_DISP1R_INIT_LAT_SHIFT 12
163#define MC_FIXED_INIT_LAT_MASK 0x000F0000
164#define MC_E2R_INIT_LAT_MASK 0x00F00000
165#define SAME_PAGE_PRIO_MASK 0x0F000000
166#define MC_GLOBW_INIT_LAT_MASK 0xF0000000
167
168
169#endif
170
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
index da50cc51ede..21d8ffd5730 100644
--- a/drivers/gpu/drm/radeon/rv770.c
+++ b/drivers/gpu/drm/radeon/rv770.c
@@ -67,7 +67,7 @@ int rv770_mc_init(struct radeon_device *rdev)
67 "programming pipes. Bad things might happen.\n"); 67 "programming pipes. Bad things might happen.\n");
68 } 68 }
69 69
70 tmp = rdev->mc.vram_location + rdev->mc.vram_size - 1; 70 tmp = rdev->mc.vram_location + rdev->mc.mc_vram_size - 1;
71 tmp = REG_SET(R700_MC_FB_TOP, tmp >> 24); 71 tmp = REG_SET(R700_MC_FB_TOP, tmp >> 24);
72 tmp |= REG_SET(R700_MC_FB_BASE, rdev->mc.vram_location >> 24); 72 tmp |= REG_SET(R700_MC_FB_BASE, rdev->mc.vram_location >> 24);
73 WREG32(R700_MC_VM_FB_LOCATION, tmp); 73 WREG32(R700_MC_VM_FB_LOCATION, tmp);
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index c1c407f7cca..c2b0d710d10 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -43,7 +43,6 @@
43#define TTM_BO_HASH_ORDER 13 43#define TTM_BO_HASH_ORDER 13
44 44
45static int ttm_bo_setup_vm(struct ttm_buffer_object *bo); 45static int ttm_bo_setup_vm(struct ttm_buffer_object *bo);
46static void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo);
47static int ttm_bo_swapout(struct ttm_mem_shrink *shrink); 46static int ttm_bo_swapout(struct ttm_mem_shrink *shrink);
48 47
49static inline uint32_t ttm_bo_type_flags(unsigned type) 48static inline uint32_t ttm_bo_type_flags(unsigned type)
@@ -224,6 +223,9 @@ static int ttm_bo_add_ttm(struct ttm_buffer_object *bo, bool zero_alloc)
224 TTM_ASSERT_LOCKED(&bo->mutex); 223 TTM_ASSERT_LOCKED(&bo->mutex);
225 bo->ttm = NULL; 224 bo->ttm = NULL;
226 225
226 if (bdev->need_dma32)
227 page_flags |= TTM_PAGE_FLAG_DMA32;
228
227 switch (bo->type) { 229 switch (bo->type) {
228 case ttm_bo_type_device: 230 case ttm_bo_type_device:
229 if (zero_alloc) 231 if (zero_alloc)
@@ -304,6 +306,9 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
304 306
305 } 307 }
306 308
309 if (bdev->driver->move_notify)
310 bdev->driver->move_notify(bo, mem);
311
307 if (!(old_man->flags & TTM_MEMTYPE_FLAG_FIXED) && 312 if (!(old_man->flags & TTM_MEMTYPE_FLAG_FIXED) &&
308 !(new_man->flags & TTM_MEMTYPE_FLAG_FIXED)) 313 !(new_man->flags & TTM_MEMTYPE_FLAG_FIXED))
309 ret = ttm_bo_move_ttm(bo, evict, no_wait, mem); 314 ret = ttm_bo_move_ttm(bo, evict, no_wait, mem);
@@ -655,31 +660,52 @@ retry_pre_get:
655 return 0; 660 return 0;
656} 661}
657 662
663static uint32_t ttm_bo_select_caching(struct ttm_mem_type_manager *man,
664 uint32_t cur_placement,
665 uint32_t proposed_placement)
666{
667 uint32_t caching = proposed_placement & TTM_PL_MASK_CACHING;
668 uint32_t result = proposed_placement & ~TTM_PL_MASK_CACHING;
669
670 /**
671 * Keep current caching if possible.
672 */
673
674 if ((cur_placement & caching) != 0)
675 result |= (cur_placement & caching);
676 else if ((man->default_caching & caching) != 0)
677 result |= man->default_caching;
678 else if ((TTM_PL_FLAG_CACHED & caching) != 0)
679 result |= TTM_PL_FLAG_CACHED;
680 else if ((TTM_PL_FLAG_WC & caching) != 0)
681 result |= TTM_PL_FLAG_WC;
682 else if ((TTM_PL_FLAG_UNCACHED & caching) != 0)
683 result |= TTM_PL_FLAG_UNCACHED;
684
685 return result;
686}
687
688
658static bool ttm_bo_mt_compatible(struct ttm_mem_type_manager *man, 689static bool ttm_bo_mt_compatible(struct ttm_mem_type_manager *man,
659 bool disallow_fixed, 690 bool disallow_fixed,
660 uint32_t mem_type, 691 uint32_t mem_type,
661 uint32_t mask, uint32_t *res_mask) 692 uint32_t proposed_placement,
693 uint32_t *masked_placement)
662{ 694{
663 uint32_t cur_flags = ttm_bo_type_flags(mem_type); 695 uint32_t cur_flags = ttm_bo_type_flags(mem_type);
664 696
665 if ((man->flags & TTM_MEMTYPE_FLAG_FIXED) && disallow_fixed) 697 if ((man->flags & TTM_MEMTYPE_FLAG_FIXED) && disallow_fixed)
666 return false; 698 return false;
667 699
668 if ((cur_flags & mask & TTM_PL_MASK_MEM) == 0) 700 if ((cur_flags & proposed_placement & TTM_PL_MASK_MEM) == 0)
669 return false; 701 return false;
670 702
671 if ((mask & man->available_caching) == 0) 703 if ((proposed_placement & man->available_caching) == 0)
672 return false; 704 return false;
673 if (mask & man->default_caching)
674 cur_flags |= man->default_caching;
675 else if (mask & TTM_PL_FLAG_CACHED)
676 cur_flags |= TTM_PL_FLAG_CACHED;
677 else if (mask & TTM_PL_FLAG_WC)
678 cur_flags |= TTM_PL_FLAG_WC;
679 else
680 cur_flags |= TTM_PL_FLAG_UNCACHED;
681 705
682 *res_mask = cur_flags; 706 cur_flags |= (proposed_placement & man->available_caching);
707
708 *masked_placement = cur_flags;
683 return true; 709 return true;
684} 710}
685 711
@@ -723,6 +749,9 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
723 if (!type_ok) 749 if (!type_ok)
724 continue; 750 continue;
725 751
752 cur_flags = ttm_bo_select_caching(man, bo->mem.placement,
753 cur_flags);
754
726 if (mem_type == TTM_PL_SYSTEM) 755 if (mem_type == TTM_PL_SYSTEM)
727 break; 756 break;
728 757
@@ -779,6 +808,9 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
779 proposed_placement, &cur_flags)) 808 proposed_placement, &cur_flags))
780 continue; 809 continue;
781 810
811 cur_flags = ttm_bo_select_caching(man, bo->mem.placement,
812 cur_flags);
813
782 ret = ttm_bo_mem_force_space(bdev, mem, mem_type, 814 ret = ttm_bo_mem_force_space(bdev, mem, mem_type,
783 interruptible, no_wait); 815 interruptible, no_wait);
784 816
@@ -1150,13 +1182,14 @@ static int ttm_bo_force_list_clean(struct ttm_bo_device *bdev,
1150 1182
1151int ttm_bo_clean_mm(struct ttm_bo_device *bdev, unsigned mem_type) 1183int ttm_bo_clean_mm(struct ttm_bo_device *bdev, unsigned mem_type)
1152{ 1184{
1153 struct ttm_mem_type_manager *man = &bdev->man[mem_type]; 1185 struct ttm_mem_type_manager *man;
1154 int ret = -EINVAL; 1186 int ret = -EINVAL;
1155 1187
1156 if (mem_type >= TTM_NUM_MEM_TYPES) { 1188 if (mem_type >= TTM_NUM_MEM_TYPES) {
1157 printk(KERN_ERR TTM_PFX "Illegal memory type %d\n", mem_type); 1189 printk(KERN_ERR TTM_PFX "Illegal memory type %d\n", mem_type);
1158 return ret; 1190 return ret;
1159 } 1191 }
1192 man = &bdev->man[mem_type];
1160 1193
1161 if (!man->has_type) { 1194 if (!man->has_type) {
1162 printk(KERN_ERR TTM_PFX "Trying to take down uninitialized " 1195 printk(KERN_ERR TTM_PFX "Trying to take down uninitialized "
@@ -1305,7 +1338,8 @@ EXPORT_SYMBOL(ttm_bo_device_release);
1305 1338
1306int ttm_bo_device_init(struct ttm_bo_device *bdev, 1339int ttm_bo_device_init(struct ttm_bo_device *bdev,
1307 struct ttm_mem_global *mem_glob, 1340 struct ttm_mem_global *mem_glob,
1308 struct ttm_bo_driver *driver, uint64_t file_page_offset) 1341 struct ttm_bo_driver *driver, uint64_t file_page_offset,
1342 bool need_dma32)
1309{ 1343{
1310 int ret = -EINVAL; 1344 int ret = -EINVAL;
1311 1345
@@ -1342,6 +1376,7 @@ int ttm_bo_device_init(struct ttm_bo_device *bdev,
1342 INIT_LIST_HEAD(&bdev->ddestroy); 1376 INIT_LIST_HEAD(&bdev->ddestroy);
1343 INIT_LIST_HEAD(&bdev->swap_lru); 1377 INIT_LIST_HEAD(&bdev->swap_lru);
1344 bdev->dev_mapping = NULL; 1378 bdev->dev_mapping = NULL;
1379 bdev->need_dma32 = need_dma32;
1345 ttm_mem_init_shrink(&bdev->shrink, ttm_bo_swapout); 1380 ttm_mem_init_shrink(&bdev->shrink, ttm_bo_swapout);
1346 ret = ttm_mem_register_shrink(mem_glob, &bdev->shrink); 1381 ret = ttm_mem_register_shrink(mem_glob, &bdev->shrink);
1347 if (unlikely(ret != 0)) { 1382 if (unlikely(ret != 0)) {
@@ -1419,6 +1454,7 @@ void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo)
1419 1454
1420 unmap_mapping_range(bdev->dev_mapping, offset, holelen, 1); 1455 unmap_mapping_range(bdev->dev_mapping, offset, holelen, 1);
1421} 1456}
1457EXPORT_SYMBOL(ttm_bo_unmap_virtual);
1422 1458
1423static void ttm_bo_vm_insert_rb(struct ttm_buffer_object *bo) 1459static void ttm_bo_vm_insert_rb(struct ttm_buffer_object *bo)
1424{ 1460{
@@ -1540,6 +1576,10 @@ int ttm_bo_wait(struct ttm_buffer_object *bo,
1540 driver->sync_obj_unref(&sync_obj); 1576 driver->sync_obj_unref(&sync_obj);
1541 driver->sync_obj_unref(&tmp_obj); 1577 driver->sync_obj_unref(&tmp_obj);
1542 spin_lock(&bo->lock); 1578 spin_lock(&bo->lock);
1579 } else {
1580 spin_unlock(&bo->lock);
1581 driver->sync_obj_unref(&sync_obj);
1582 spin_lock(&bo->lock);
1543 } 1583 }
1544 } 1584 }
1545 return 0; 1585 return 0;
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index bdec583901e..ad4ada07c6c 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -136,7 +136,8 @@ static int ttm_copy_io_page(void *dst, void *src, unsigned long page)
136} 136}
137 137
138static int ttm_copy_io_ttm_page(struct ttm_tt *ttm, void *src, 138static int ttm_copy_io_ttm_page(struct ttm_tt *ttm, void *src,
139 unsigned long page) 139 unsigned long page,
140 pgprot_t prot)
140{ 141{
141 struct page *d = ttm_tt_get_page(ttm, page); 142 struct page *d = ttm_tt_get_page(ttm, page);
142 void *dst; 143 void *dst;
@@ -145,17 +146,35 @@ static int ttm_copy_io_ttm_page(struct ttm_tt *ttm, void *src,
145 return -ENOMEM; 146 return -ENOMEM;
146 147
147 src = (void *)((unsigned long)src + (page << PAGE_SHIFT)); 148 src = (void *)((unsigned long)src + (page << PAGE_SHIFT));
148 dst = kmap(d); 149
150#ifdef CONFIG_X86
151 dst = kmap_atomic_prot(d, KM_USER0, prot);
152#else
153 if (pgprot_val(prot) != pgprot_val(PAGE_KERNEL))
154 dst = vmap(&d, 1, 0, prot);
155 else
156 dst = kmap(d);
157#endif
149 if (!dst) 158 if (!dst)
150 return -ENOMEM; 159 return -ENOMEM;
151 160
152 memcpy_fromio(dst, src, PAGE_SIZE); 161 memcpy_fromio(dst, src, PAGE_SIZE);
153 kunmap(d); 162
163#ifdef CONFIG_X86
164 kunmap_atomic(dst, KM_USER0);
165#else
166 if (pgprot_val(prot) != pgprot_val(PAGE_KERNEL))
167 vunmap(dst);
168 else
169 kunmap(d);
170#endif
171
154 return 0; 172 return 0;
155} 173}
156 174
157static int ttm_copy_ttm_io_page(struct ttm_tt *ttm, void *dst, 175static int ttm_copy_ttm_io_page(struct ttm_tt *ttm, void *dst,
158 unsigned long page) 176 unsigned long page,
177 pgprot_t prot)
159{ 178{
160 struct page *s = ttm_tt_get_page(ttm, page); 179 struct page *s = ttm_tt_get_page(ttm, page);
161 void *src; 180 void *src;
@@ -164,12 +183,28 @@ static int ttm_copy_ttm_io_page(struct ttm_tt *ttm, void *dst,
164 return -ENOMEM; 183 return -ENOMEM;
165 184
166 dst = (void *)((unsigned long)dst + (page << PAGE_SHIFT)); 185 dst = (void *)((unsigned long)dst + (page << PAGE_SHIFT));
167 src = kmap(s); 186#ifdef CONFIG_X86
187 src = kmap_atomic_prot(s, KM_USER0, prot);
188#else
189 if (pgprot_val(prot) != pgprot_val(PAGE_KERNEL))
190 src = vmap(&s, 1, 0, prot);
191 else
192 src = kmap(s);
193#endif
168 if (!src) 194 if (!src)
169 return -ENOMEM; 195 return -ENOMEM;
170 196
171 memcpy_toio(dst, src, PAGE_SIZE); 197 memcpy_toio(dst, src, PAGE_SIZE);
172 kunmap(s); 198
199#ifdef CONFIG_X86
200 kunmap_atomic(src, KM_USER0);
201#else
202 if (pgprot_val(prot) != pgprot_val(PAGE_KERNEL))
203 vunmap(src);
204 else
205 kunmap(s);
206#endif
207
173 return 0; 208 return 0;
174} 209}
175 210
@@ -214,11 +249,17 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
214 249
215 for (i = 0; i < new_mem->num_pages; ++i) { 250 for (i = 0; i < new_mem->num_pages; ++i) {
216 page = i * dir + add; 251 page = i * dir + add;
217 if (old_iomap == NULL) 252 if (old_iomap == NULL) {
218 ret = ttm_copy_ttm_io_page(ttm, new_iomap, page); 253 pgprot_t prot = ttm_io_prot(old_mem->placement,
219 else if (new_iomap == NULL) 254 PAGE_KERNEL);
220 ret = ttm_copy_io_ttm_page(ttm, old_iomap, page); 255 ret = ttm_copy_ttm_io_page(ttm, new_iomap, page,
221 else 256 prot);
257 } else if (new_iomap == NULL) {
258 pgprot_t prot = ttm_io_prot(new_mem->placement,
259 PAGE_KERNEL);
260 ret = ttm_copy_io_ttm_page(ttm, old_iomap, page,
261 prot);
262 } else
222 ret = ttm_copy_io_page(new_iomap, old_iomap, page); 263 ret = ttm_copy_io_page(new_iomap, old_iomap, page);
223 if (ret) 264 if (ret)
224 goto out1; 265 goto out1;
@@ -509,8 +550,8 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
509 if (evict) { 550 if (evict) {
510 ret = ttm_bo_wait(bo, false, false, false); 551 ret = ttm_bo_wait(bo, false, false, false);
511 spin_unlock(&bo->lock); 552 spin_unlock(&bo->lock);
512 driver->sync_obj_unref(&bo->sync_obj); 553 if (tmp_obj)
513 554 driver->sync_obj_unref(&tmp_obj);
514 if (ret) 555 if (ret)
515 return ret; 556 return ret;
516 557
@@ -532,6 +573,8 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
532 573
533 set_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags); 574 set_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags);
534 spin_unlock(&bo->lock); 575 spin_unlock(&bo->lock);
576 if (tmp_obj)
577 driver->sync_obj_unref(&tmp_obj);
535 578
536 ret = ttm_buffer_object_transfer(bo, &ghost_obj); 579 ret = ttm_buffer_object_transfer(bo, &ghost_obj);
537 if (ret) 580 if (ret)
diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c
index fe949a12fe4..33de7637c0c 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c
@@ -101,6 +101,9 @@ static int ttm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
101 return VM_FAULT_NOPAGE; 101 return VM_FAULT_NOPAGE;
102 } 102 }
103 103
104 if (bdev->driver->fault_reserve_notify)
105 bdev->driver->fault_reserve_notify(bo);
106
104 /* 107 /*
105 * Wait for buffer data in transit, due to a pipelined 108 * Wait for buffer data in transit, due to a pipelined
106 * move. 109 * move.
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 75dc8bd2459..b8b6c4a5f98 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -86,10 +86,16 @@ void ttm_tt_cache_flush(struct page *pages[], unsigned long num_pages)
86 unsigned long i; 86 unsigned long i;
87 87
88 for (i = 0; i < num_pages; ++i) { 88 for (i = 0; i < num_pages; ++i) {
89 if (pages[i]) { 89 struct page *page = pages[i];
90 unsigned long start = (unsigned long)page_address(pages[i]); 90 void *page_virtual;
91 flush_dcache_range(start, start + PAGE_SIZE); 91
92 } 92 if (unlikely(page == NULL))
93 continue;
94
95 page_virtual = kmap_atomic(page, KM_USER0);
96 flush_dcache_range((unsigned long) page_virtual,
97 (unsigned long) page_virtual + PAGE_SIZE);
98 kunmap_atomic(page_virtual, KM_USER0);
93 } 99 }
94#else 100#else
95 if (on_each_cpu(ttm_tt_ipi_handler, NULL, 1) != 0) 101 if (on_each_cpu(ttm_tt_ipi_handler, NULL, 1) != 0)
@@ -131,10 +137,17 @@ static void ttm_tt_free_page_directory(struct ttm_tt *ttm)
131 137
132static struct page *ttm_tt_alloc_page(unsigned page_flags) 138static struct page *ttm_tt_alloc_page(unsigned page_flags)
133{ 139{
140 gfp_t gfp_flags = GFP_USER;
141
134 if (page_flags & TTM_PAGE_FLAG_ZERO_ALLOC) 142 if (page_flags & TTM_PAGE_FLAG_ZERO_ALLOC)
135 return alloc_page(GFP_HIGHUSER | __GFP_ZERO); 143 gfp_flags |= __GFP_ZERO;
144
145 if (page_flags & TTM_PAGE_FLAG_DMA32)
146 gfp_flags |= __GFP_DMA32;
147 else
148 gfp_flags |= __GFP_HIGHMEM;
136 149
137 return alloc_page(GFP_HIGHUSER); 150 return alloc_page(gfp_flags);
138} 151}
139 152
140static void ttm_tt_free_user_pages(struct ttm_tt *ttm) 153static void ttm_tt_free_user_pages(struct ttm_tt *ttm)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index f2c21d5d24e..5eb10c2ce66 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1075,14 +1075,16 @@ EXPORT_SYMBOL_GPL(hid_report_raw_event);
1075 */ 1075 */
1076int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int interrupt) 1076int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int interrupt)
1077{ 1077{
1078 struct hid_report_enum *report_enum = hid->report_enum + type; 1078 struct hid_report_enum *report_enum;
1079 struct hid_driver *hdrv = hid->driver; 1079 struct hid_driver *hdrv;
1080 struct hid_report *report; 1080 struct hid_report *report;
1081 unsigned int i; 1081 unsigned int i;
1082 int ret; 1082 int ret;
1083 1083
1084 if (!hid || !hid->driver) 1084 if (!hid || !hid->driver)
1085 return -ENODEV; 1085 return -ENODEV;
1086 report_enum = hid->report_enum + type;
1087 hdrv = hid->driver;
1086 1088
1087 if (!size) { 1089 if (!size) {
1088 dbg_hid("empty report\n"); 1090 dbg_hid("empty report\n");
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
index 9e9421525fb..215b2addddb 100644
--- a/drivers/hid/usbhid/hiddev.c
+++ b/drivers/hid/usbhid/hiddev.c
@@ -527,8 +527,10 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd,
527 goto goodreturn; 527 goto goodreturn;
528 528
529 case HIDIOCGCOLLECTIONINDEX: 529 case HIDIOCGCOLLECTIONINDEX:
530 i = field->usage[uref->usage_index].collection_index;
531 unlock_kernel();
530 kfree(uref_multi); 532 kfree(uref_multi);
531 return field->usage[uref->usage_index].collection_index; 533 return i;
532 case HIDIOCGUSAGES: 534 case HIDIOCGUSAGES:
533 for (i = 0; i < uref_multi->num_values; i++) 535 for (i = 0; i < uref_multi->num_values; i++)
534 uref_multi->values[i] = 536 uref_multi->values[i] =
diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c
index bff0103610c..fe4fa29c921 100644
--- a/drivers/hwmon/asus_atk0110.c
+++ b/drivers/hwmon/asus_atk0110.c
@@ -593,7 +593,11 @@ static int atk_add_sensor(struct atk_data *data, union acpi_object *obj)
593 sensor->data = data; 593 sensor->data = data;
594 sensor->id = flags->integer.value; 594 sensor->id = flags->integer.value;
595 sensor->limit1 = limit1->integer.value; 595 sensor->limit1 = limit1->integer.value;
596 sensor->limit2 = limit2->integer.value; 596 if (data->old_interface)
597 sensor->limit2 = limit2->integer.value;
598 else
599 /* The upper limit is expressed as delta from lower limit */
600 sensor->limit2 = sensor->limit1 + limit2->integer.value;
597 601
598 snprintf(sensor->input_attr_name, ATTR_NAME_SIZE, 602 snprintf(sensor->input_attr_name, ATTR_NAME_SIZE,
599 "%s%d_input", base_name, start + *num); 603 "%s%d_input", base_name, start + *num);
diff --git a/drivers/hwmon/smsc47m1.c b/drivers/hwmon/smsc47m1.c
index a92dbb97ee9..ba75bfcf14c 100644
--- a/drivers/hwmon/smsc47m1.c
+++ b/drivers/hwmon/smsc47m1.c
@@ -86,6 +86,7 @@ superio_exit(void)
86#define SUPERIO_REG_ACT 0x30 86#define SUPERIO_REG_ACT 0x30
87#define SUPERIO_REG_BASE 0x60 87#define SUPERIO_REG_BASE 0x60
88#define SUPERIO_REG_DEVID 0x20 88#define SUPERIO_REG_DEVID 0x20
89#define SUPERIO_REG_DEVREV 0x21
89 90
90/* Logical device registers */ 91/* Logical device registers */
91 92
@@ -429,6 +430,9 @@ static int __init smsc47m1_find(unsigned short *addr,
429 * The LPC47M292 (device id 0x6B) is somewhat compatible, but it 430 * The LPC47M292 (device id 0x6B) is somewhat compatible, but it
430 * supports a 3rd fan, and the pin configuration registers are 431 * supports a 3rd fan, and the pin configuration registers are
431 * unfortunately different. 432 * unfortunately different.
433 * The LPC47M233 has the same device id (0x6B) but is not compatible.
434 * We check the high bit of the device revision register to
435 * differentiate them.
432 */ 436 */
433 switch (val) { 437 switch (val) {
434 case 0x51: 438 case 0x51:
@@ -448,6 +452,13 @@ static int __init smsc47m1_find(unsigned short *addr,
448 sio_data->type = smsc47m1; 452 sio_data->type = smsc47m1;
449 break; 453 break;
450 case 0x6B: 454 case 0x6B:
455 if (superio_inb(SUPERIO_REG_DEVREV) & 0x80) {
456 pr_debug(DRVNAME ": "
457 "Found SMSC LPC47M233, unsupported\n");
458 superio_exit();
459 return -ENODEV;
460 }
461
451 pr_info(DRVNAME ": Found SMSC LPC47M292\n"); 462 pr_info(DRVNAME ": Found SMSC LPC47M292\n");
452 sio_data->type = smsc47m2; 463 sio_data->type = smsc47m2;
453 break; 464 break;
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index fdd83277c8a..d258b02aef4 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -672,9 +672,10 @@ omap_i2c_isr(int this_irq, void *dev_id)
672 break; 672 break;
673 } 673 }
674 674
675 err = 0;
676complete:
675 omap_i2c_write_reg(dev, OMAP_I2C_STAT_REG, stat); 677 omap_i2c_write_reg(dev, OMAP_I2C_STAT_REG, stat);
676 678
677 err = 0;
678 if (stat & OMAP_I2C_STAT_NACK) { 679 if (stat & OMAP_I2C_STAT_NACK) {
679 err |= OMAP_I2C_STAT_NACK; 680 err |= OMAP_I2C_STAT_NACK;
680 omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 681 omap_i2c_write_reg(dev, OMAP_I2C_CON_REG,
@@ -685,16 +686,19 @@ omap_i2c_isr(int this_irq, void *dev_id)
685 err |= OMAP_I2C_STAT_AL; 686 err |= OMAP_I2C_STAT_AL;
686 } 687 }
687 if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK | 688 if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK |
688 OMAP_I2C_STAT_AL)) 689 OMAP_I2C_STAT_AL)) {
689 omap_i2c_complete_cmd(dev, err); 690 omap_i2c_complete_cmd(dev, err);
691 return IRQ_HANDLED;
692 }
690 if (stat & (OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR)) { 693 if (stat & (OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR)) {
691 u8 num_bytes = 1; 694 u8 num_bytes = 1;
692 if (dev->fifo_size) { 695 if (dev->fifo_size) {
693 if (stat & OMAP_I2C_STAT_RRDY) 696 if (stat & OMAP_I2C_STAT_RRDY)
694 num_bytes = dev->fifo_size; 697 num_bytes = dev->fifo_size;
695 else 698 else /* read RXSTAT on RDR interrupt */
696 num_bytes = omap_i2c_read_reg(dev, 699 num_bytes = (omap_i2c_read_reg(dev,
697 OMAP_I2C_BUFSTAT_REG); 700 OMAP_I2C_BUFSTAT_REG)
701 >> 8) & 0x3F;
698 } 702 }
699 while (num_bytes) { 703 while (num_bytes) {
700 num_bytes--; 704 num_bytes--;
@@ -731,9 +735,10 @@ omap_i2c_isr(int this_irq, void *dev_id)
731 if (dev->fifo_size) { 735 if (dev->fifo_size) {
732 if (stat & OMAP_I2C_STAT_XRDY) 736 if (stat & OMAP_I2C_STAT_XRDY)
733 num_bytes = dev->fifo_size; 737 num_bytes = dev->fifo_size;
734 else 738 else /* read TXSTAT on XDR interrupt */
735 num_bytes = omap_i2c_read_reg(dev, 739 num_bytes = omap_i2c_read_reg(dev,
736 OMAP_I2C_BUFSTAT_REG); 740 OMAP_I2C_BUFSTAT_REG)
741 & 0x3F;
737 } 742 }
738 while (num_bytes) { 743 while (num_bytes) {
739 num_bytes--; 744 num_bytes--;
@@ -760,6 +765,27 @@ omap_i2c_isr(int this_irq, void *dev_id)
760 "data to send\n"); 765 "data to send\n");
761 break; 766 break;
762 } 767 }
768
769 /*
770 * OMAP3430 Errata 1.153: When an XRDY/XDR
771 * is hit, wait for XUDF before writing data
772 * to DATA_REG. Otherwise some data bytes can
773 * be lost while transferring them from the
774 * memory to the I2C interface.
775 */
776
777 if (cpu_is_omap34xx()) {
778 while (!(stat & OMAP_I2C_STAT_XUDF)) {
779 if (stat & (OMAP_I2C_STAT_NACK | OMAP_I2C_STAT_AL)) {
780 omap_i2c_ack_stat(dev, stat & (OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR));
781 err |= OMAP_I2C_STAT_XUDF;
782 goto complete;
783 }
784 cpu_relax();
785 stat = omap_i2c_read_reg(dev, OMAP_I2C_STAT_REG);
786 }
787 }
788
763 omap_i2c_write_reg(dev, OMAP_I2C_DATA_REG, w); 789 omap_i2c_write_reg(dev, OMAP_I2C_DATA_REG, w);
764 } 790 }
765 omap_i2c_ack_stat(dev, 791 omap_i2c_ack_stat(dev,
@@ -879,7 +905,7 @@ omap_i2c_probe(struct platform_device *pdev)
879 i2c_set_adapdata(adap, dev); 905 i2c_set_adapdata(adap, dev);
880 adap->owner = THIS_MODULE; 906 adap->owner = THIS_MODULE;
881 adap->class = I2C_CLASS_HWMON; 907 adap->class = I2C_CLASS_HWMON;
882 strncpy(adap->name, "OMAP I2C adapter", sizeof(adap->name)); 908 strlcpy(adap->name, "OMAP I2C adapter", sizeof(adap->name));
883 adap->algo = &omap_i2c_algo; 909 adap->algo = &omap_i2c_algo;
884 adap->dev.parent = &pdev->dev; 910 adap->dev.parent = &pdev->dev;
885 911
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 8f42a4536cd..20bb0ceb027 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -763,11 +763,6 @@ static int s3c24xx_i2c_init(struct s3c24xx_i2c *i2c)
763 dev_info(i2c->dev, "bus frequency set to %d KHz\n", freq); 763 dev_info(i2c->dev, "bus frequency set to %d KHz\n", freq);
764 dev_dbg(i2c->dev, "S3C2410_IICCON=0x%02lx\n", iicon); 764 dev_dbg(i2c->dev, "S3C2410_IICCON=0x%02lx\n", iicon);
765 765
766 /* check for s3c2440 i2c controller */
767
768 if (s3c24xx_i2c_is2440(i2c))
769 writel(0x0, i2c->regs + S3C2440_IICLC);
770
771 return 0; 766 return 0;
772} 767}
773 768
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index 4f3d99cd169..820487d0d5c 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -637,7 +637,7 @@ static void __exit sh_mobile_i2c_adap_exit(void)
637 platform_driver_unregister(&sh_mobile_i2c_driver); 637 platform_driver_unregister(&sh_mobile_i2c_driver);
638} 638}
639 639
640module_init(sh_mobile_i2c_adap_init); 640subsys_initcall(sh_mobile_i2c_adap_init);
641module_exit(sh_mobile_i2c_adap_exit); 641module_exit(sh_mobile_i2c_adap_exit);
642 642
643MODULE_DESCRIPTION("SuperH Mobile I2C Bus Controller driver"); 643MODULE_DESCRIPTION("SuperH Mobile I2C Bus Controller driver");
diff --git a/drivers/i2c/chips/tsl2550.c b/drivers/i2c/chips/tsl2550.c
index 1a9cc135219..b96f3025e58 100644
--- a/drivers/i2c/chips/tsl2550.c
+++ b/drivers/i2c/chips/tsl2550.c
@@ -27,7 +27,7 @@
27#include <linux/delay.h> 27#include <linux/delay.h>
28 28
29#define TSL2550_DRV_NAME "tsl2550" 29#define TSL2550_DRV_NAME "tsl2550"
30#define DRIVER_VERSION "1.1.1" 30#define DRIVER_VERSION "1.1.2"
31 31
32/* 32/*
33 * Defines 33 * Defines
@@ -189,13 +189,16 @@ static int tsl2550_calculate_lux(u8 ch0, u8 ch1)
189 u8 r = 128; 189 u8 r = 128;
190 190
191 /* Avoid division by 0 and count 1 cannot be greater than count 0 */ 191 /* Avoid division by 0 and count 1 cannot be greater than count 0 */
192 if (c0 && (c1 <= c0)) 192 if (c1 <= c0)
193 r = c1 * 128 / c0; 193 if (c0) {
194 r = c1 * 128 / c0;
195
196 /* Calculate LUX */
197 lux = ((c0 - c1) * ratio_lut[r]) / 256;
198 } else
199 lux = 0;
194 else 200 else
195 return -1; 201 return -EAGAIN;
196
197 /* Calculate LUX */
198 lux = ((c0 - c1) * ratio_lut[r]) / 256;
199 202
200 /* LUX range check */ 203 /* LUX range check */
201 return lux > TSL2550_MAX_LUX ? TSL2550_MAX_LUX : lux; 204 return lux > TSL2550_MAX_LUX ? TSL2550_MAX_LUX : lux;
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 695181120cd..7f878017b73 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -455,6 +455,7 @@ static void idedisk_prepare_flush(struct request_queue *q, struct request *rq)
455 455
456 rq->cmd_type = REQ_TYPE_ATA_TASKFILE; 456 rq->cmd_type = REQ_TYPE_ATA_TASKFILE;
457 rq->special = cmd; 457 rq->special = cmd;
458 cmd->rq = rq;
458} 459}
459 460
460ide_devset_get(multcount, mult_count); 461ide_devset_get(multcount, mult_count);
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 013dc595fab..bc5fb12b913 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -1064,6 +1064,7 @@ static int idetape_blkdev_ioctl(ide_drive_t *drive, unsigned int cmd,
1064 tape->best_dsc_rw_freq = config.dsc_rw_frequency; 1064 tape->best_dsc_rw_freq = config.dsc_rw_frequency;
1065 break; 1065 break;
1066 case 0x0350: 1066 case 0x0350:
1067 memset(&config, 0, sizeof(config));
1067 config.dsc_rw_frequency = (int) tape->best_dsc_rw_freq; 1068 config.dsc_rw_frequency = (int) tape->best_dsc_rw_freq;
1068 config.nr_stages = 1; 1069 config.nr_stages = 1;
1069 if (copy_to_user(argp, &config, sizeof(config))) 1070 if (copy_to_user(argp, &config, sizeof(config)))
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 114efd8dc8f..1148140d08a 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -608,8 +608,7 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd,
608 p, compat_mode); 608 p, compat_mode);
609 609
610 if (_IOC_NR(cmd) == _IOC_NR(EVIOCGNAME(0))) 610 if (_IOC_NR(cmd) == _IOC_NR(EVIOCGNAME(0)))
611 return str_to_user(dev_name(&evdev->dev), 611 return str_to_user(dev->name, _IOC_SIZE(cmd), p);
612 _IOC_SIZE(cmd), p);
613 612
614 if (_IOC_NR(cmd) == _IOC_NR(EVIOCGPHYS(0))) 613 if (_IOC_NR(cmd) == _IOC_NR(EVIOCGPHYS(0)))
615 return str_to_user(dev->phys, _IOC_SIZE(cmd), p); 614 return str_to_user(dev->phys, _IOC_SIZE(cmd), p);
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
index 0e12f89276a..4cfd084fa89 100644
--- a/drivers/input/joydev.c
+++ b/drivers/input/joydev.c
@@ -536,7 +536,7 @@ static int joydev_ioctl_common(struct joydev *joydev,
536 default: 536 default:
537 if ((cmd & ~IOCSIZE_MASK) == JSIOCGNAME(0)) { 537 if ((cmd & ~IOCSIZE_MASK) == JSIOCGNAME(0)) {
538 int len; 538 int len;
539 const char *name = dev_name(&dev->dev); 539 const char *name = dev->name;
540 540
541 if (!name) 541 if (!name)
542 return 0; 542 return 0;
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index b868b8d5fbb..f155ad8cdae 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -470,20 +470,20 @@ static void xpad_irq_out(struct urb *urb)
470 status = urb->status; 470 status = urb->status;
471 471
472 switch (status) { 472 switch (status) {
473 case 0: 473 case 0:
474 /* success */ 474 /* success */
475 break; 475 return;
476 case -ECONNRESET: 476
477 case -ENOENT: 477 case -ECONNRESET:
478 case -ESHUTDOWN: 478 case -ENOENT:
479 /* this urb is terminated, clean up */ 479 case -ESHUTDOWN:
480 dbg("%s - urb shutting down with status: %d", 480 /* this urb is terminated, clean up */
481 __func__, status); 481 dbg("%s - urb shutting down with status: %d", __func__, status);
482 return; 482 return;
483 default: 483
484 dbg("%s - nonzero urb status received: %d", 484 default:
485 __func__, status); 485 dbg("%s - nonzero urb status received: %d", __func__, status);
486 goto exit; 486 goto exit;
487 } 487 }
488 488
489exit: 489exit:
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index df3f8aa6811..95fe0452dae 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -895,6 +895,13 @@ static unsigned int atkbd_amilo_pa1510_forced_release_keys[] = {
895}; 895};
896 896
897/* 897/*
898 * Amilo Pi 3525 key release for Fn+Volume keys not working
899 */
900static unsigned int atkbd_amilo_pi3525_forced_release_keys[] = {
901 0x20, 0xa0, 0x2e, 0xae, 0x30, 0xb0, -1U
902};
903
904/*
898 * Amilo Xi 3650 key release for light touch bar not working 905 * Amilo Xi 3650 key release for light touch bar not working
899 */ 906 */
900static unsigned int atkbd_amilo_xi3650_forced_release_keys[] = { 907static unsigned int atkbd_amilo_xi3650_forced_release_keys[] = {
@@ -902,6 +909,13 @@ static unsigned int atkbd_amilo_xi3650_forced_release_keys[] = {
902}; 909};
903 910
904/* 911/*
912 * Soltech TA12 system with broken key release on volume keys and mute key
913 */
914static unsigned int atkdb_soltech_ta12_forced_release_keys[] = {
915 0xa0, 0xae, 0xb0, -1U
916};
917
918/*
905 * atkbd_set_keycode_table() initializes keyboard's keycode table 919 * atkbd_set_keycode_table() initializes keyboard's keycode table
906 * according to the selected scancode set 920 * according to the selected scancode set
907 */ 921 */
@@ -1568,6 +1582,15 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = {
1568 .driver_data = atkbd_amilo_pa1510_forced_release_keys, 1582 .driver_data = atkbd_amilo_pa1510_forced_release_keys,
1569 }, 1583 },
1570 { 1584 {
1585 .ident = "Fujitsu Amilo Pi 3525",
1586 .matches = {
1587 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
1588 DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pi 3525"),
1589 },
1590 .callback = atkbd_setup_forced_release,
1591 .driver_data = atkbd_amilo_pi3525_forced_release_keys,
1592 },
1593 {
1571 .ident = "Fujitsu Amilo Xi 3650", 1594 .ident = "Fujitsu Amilo Xi 3650",
1572 .matches = { 1595 .matches = {
1573 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), 1596 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
@@ -1576,6 +1599,15 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = {
1576 .callback = atkbd_setup_forced_release, 1599 .callback = atkbd_setup_forced_release,
1577 .driver_data = atkbd_amilo_xi3650_forced_release_keys, 1600 .driver_data = atkbd_amilo_xi3650_forced_release_keys,
1578 }, 1601 },
1602 {
1603 .ident = "Soltech Corporation TA12",
1604 .matches = {
1605 DMI_MATCH(DMI_SYS_VENDOR, "Soltech Corporation"),
1606 DMI_MATCH(DMI_PRODUCT_NAME, "TA12"),
1607 },
1608 .callback = atkbd_setup_forced_release,
1609 .driver_data = atkdb_soltech_ta12_forced_release_keys,
1610 },
1579 { } 1611 { }
1580}; 1612};
1581 1613
diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c
index e9b2e7cb05b..541b981ff07 100644
--- a/drivers/input/keyboard/matrix_keypad.c
+++ b/drivers/input/keyboard/matrix_keypad.c
@@ -27,6 +27,7 @@ struct matrix_keypad {
27 const struct matrix_keypad_platform_data *pdata; 27 const struct matrix_keypad_platform_data *pdata;
28 struct input_dev *input_dev; 28 struct input_dev *input_dev;
29 unsigned short *keycodes; 29 unsigned short *keycodes;
30 unsigned int row_shift;
30 31
31 uint32_t last_key_state[MATRIX_MAX_COLS]; 32 uint32_t last_key_state[MATRIX_MAX_COLS];
32 struct delayed_work work; 33 struct delayed_work work;
@@ -136,7 +137,7 @@ static void matrix_keypad_scan(struct work_struct *work)
136 if ((bits_changed & (1 << row)) == 0) 137 if ((bits_changed & (1 << row)) == 0)
137 continue; 138 continue;
138 139
139 code = (row << 4) + col; 140 code = MATRIX_SCAN_CODE(row, col, keypad->row_shift);
140 input_event(input_dev, EV_MSC, MSC_SCAN, code); 141 input_event(input_dev, EV_MSC, MSC_SCAN, code);
141 input_report_key(input_dev, 142 input_report_key(input_dev,
142 keypad->keycodes[code], 143 keypad->keycodes[code],
@@ -317,6 +318,7 @@ static int __devinit matrix_keypad_probe(struct platform_device *pdev)
317 struct matrix_keypad *keypad; 318 struct matrix_keypad *keypad;
318 struct input_dev *input_dev; 319 struct input_dev *input_dev;
319 unsigned short *keycodes; 320 unsigned short *keycodes;
321 unsigned int row_shift;
320 int i; 322 int i;
321 int err; 323 int err;
322 324
@@ -332,14 +334,11 @@ static int __devinit matrix_keypad_probe(struct platform_device *pdev)
332 return -EINVAL; 334 return -EINVAL;
333 } 335 }
334 336
335 if (!keymap_data->max_keymap_size) { 337 row_shift = get_count_order(pdata->num_col_gpios);
336 dev_err(&pdev->dev, "invalid keymap data supplied\n");
337 return -EINVAL;
338 }
339 338
340 keypad = kzalloc(sizeof(struct matrix_keypad), GFP_KERNEL); 339 keypad = kzalloc(sizeof(struct matrix_keypad), GFP_KERNEL);
341 keycodes = kzalloc(keymap_data->max_keymap_size * 340 keycodes = kzalloc((pdata->num_row_gpios << row_shift) *
342 sizeof(keypad->keycodes), 341 sizeof(*keycodes),
343 GFP_KERNEL); 342 GFP_KERNEL);
344 input_dev = input_allocate_device(); 343 input_dev = input_allocate_device();
345 if (!keypad || !keycodes || !input_dev) { 344 if (!keypad || !keycodes || !input_dev) {
@@ -350,6 +349,7 @@ static int __devinit matrix_keypad_probe(struct platform_device *pdev)
350 keypad->input_dev = input_dev; 349 keypad->input_dev = input_dev;
351 keypad->pdata = pdata; 350 keypad->pdata = pdata;
352 keypad->keycodes = keycodes; 351 keypad->keycodes = keycodes;
352 keypad->row_shift = row_shift;
353 keypad->stopped = true; 353 keypad->stopped = true;
354 INIT_DELAYED_WORK(&keypad->work, matrix_keypad_scan); 354 INIT_DELAYED_WORK(&keypad->work, matrix_keypad_scan);
355 spin_lock_init(&keypad->lock); 355 spin_lock_init(&keypad->lock);
@@ -363,7 +363,7 @@ static int __devinit matrix_keypad_probe(struct platform_device *pdev)
363 363
364 input_dev->keycode = keycodes; 364 input_dev->keycode = keycodes;
365 input_dev->keycodesize = sizeof(*keycodes); 365 input_dev->keycodesize = sizeof(*keycodes);
366 input_dev->keycodemax = keymap_data->max_keymap_size; 366 input_dev->keycodemax = pdata->num_row_gpios << keypad->row_shift;
367 367
368 for (i = 0; i < keymap_data->keymap_size; i++) { 368 for (i = 0; i < keymap_data->keymap_size; i++) {
369 unsigned int key = keymap_data->keymap[i]; 369 unsigned int key = keymap_data->keymap[i];
@@ -371,7 +371,7 @@ static int __devinit matrix_keypad_probe(struct platform_device *pdev)
371 unsigned int col = KEY_COL(key); 371 unsigned int col = KEY_COL(key);
372 unsigned short code = KEY_VAL(key); 372 unsigned short code = KEY_VAL(key);
373 373
374 keycodes[(row << 4) + col] = code; 374 keycodes[MATRIX_SCAN_CODE(row, col, row_shift)] = code;
375 __set_bit(code, input_dev->keybit); 375 __set_bit(code, input_dev->keybit);
376 } 376 }
377 __clear_bit(KEY_RESERVED, input_dev->keybit); 377 __clear_bit(KEY_RESERVED, input_dev->keybit);
diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c
index 6d67af5387a..21cb755a54f 100644
--- a/drivers/input/misc/pcspkr.c
+++ b/drivers/input/misc/pcspkr.c
@@ -114,7 +114,7 @@ static int __devexit pcspkr_remove(struct platform_device *dev)
114 return 0; 114 return 0;
115} 115}
116 116
117static int pcspkr_suspend(struct platform_device *dev, pm_message_t state) 117static int pcspkr_suspend(struct device *dev)
118{ 118{
119 pcspkr_event(NULL, EV_SND, SND_BELL, 0); 119 pcspkr_event(NULL, EV_SND, SND_BELL, 0);
120 120
@@ -127,14 +127,18 @@ static void pcspkr_shutdown(struct platform_device *dev)
127 pcspkr_event(NULL, EV_SND, SND_BELL, 0); 127 pcspkr_event(NULL, EV_SND, SND_BELL, 0);
128} 128}
129 129
130static struct dev_pm_ops pcspkr_pm_ops = {
131 .suspend = pcspkr_suspend,
132};
133
130static struct platform_driver pcspkr_platform_driver = { 134static struct platform_driver pcspkr_platform_driver = {
131 .driver = { 135 .driver = {
132 .name = "pcspkr", 136 .name = "pcspkr",
133 .owner = THIS_MODULE, 137 .owner = THIS_MODULE,
138 .pm = &pcspkr_pm_ops,
134 }, 139 },
135 .probe = pcspkr_probe, 140 .probe = pcspkr_probe,
136 .remove = __devexit_p(pcspkr_remove), 141 .remove = __devexit_p(pcspkr_remove),
137 .suspend = pcspkr_suspend,
138 .shutdown = pcspkr_shutdown, 142 .shutdown = pcspkr_shutdown,
139}; 143};
140 144
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c
index 7c8957dd22c..27ee976eb54 100644
--- a/drivers/input/misc/wistron_btns.c
+++ b/drivers/input/misc/wistron_btns.c
@@ -611,6 +611,20 @@ static struct key_entry keymap_wistron_generic[] __initdata = {
611 { KE_END, 0 } 611 { KE_END, 0 }
612}; 612};
613 613
614static struct key_entry keymap_prestigio[] __initdata = {
615 { KE_KEY, 0x11, {KEY_PROG1} },
616 { KE_KEY, 0x12, {KEY_PROG2} },
617 { KE_WIFI, 0x30 },
618 { KE_KEY, 0x22, {KEY_REWIND} },
619 { KE_KEY, 0x23, {KEY_FORWARD} },
620 { KE_KEY, 0x24, {KEY_PLAYPAUSE} },
621 { KE_KEY, 0x25, {KEY_STOPCD} },
622 { KE_KEY, 0x31, {KEY_MAIL} },
623 { KE_KEY, 0x36, {KEY_WWW} },
624 { KE_END, 0 }
625};
626
627
614/* 628/*
615 * If your machine is not here (which is currently rather likely), please send 629 * If your machine is not here (which is currently rather likely), please send
616 * a list of buttons and their key codes (reported when loading this module 630 * a list of buttons and their key codes (reported when loading this module
@@ -646,6 +660,15 @@ static struct dmi_system_id dmi_ids[] __initdata = {
646 }, 660 },
647 { 661 {
648 .callback = dmi_matched, 662 .callback = dmi_matched,
663 .ident = "Maxdata Pro 7000 DX",
664 .matches = {
665 DMI_MATCH(DMI_SYS_VENDOR, "MAXDATA"),
666 DMI_MATCH(DMI_PRODUCT_NAME, "Pro 7000"),
667 },
668 .driver_data = keymap_fs_amilo_pro_v2000
669 },
670 {
671 .callback = dmi_matched,
649 .ident = "Fujitsu N3510", 672 .ident = "Fujitsu N3510",
650 .matches = { 673 .matches = {
651 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), 674 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
@@ -962,6 +985,8 @@ static int __init select_keymap(void)
962 if (keymap_name != NULL) { 985 if (keymap_name != NULL) {
963 if (strcmp (keymap_name, "1557/MS2141") == 0) 986 if (strcmp (keymap_name, "1557/MS2141") == 0)
964 keymap = keymap_wistron_ms2141; 987 keymap = keymap_wistron_ms2141;
988 else if (strcmp (keymap_name, "prestigio") == 0)
989 keymap = keymap_prestigio;
965 else if (strcmp (keymap_name, "generic") == 0) 990 else if (strcmp (keymap_name, "generic") == 0)
966 keymap = keymap_wistron_generic; 991 keymap = keymap_wistron_generic;
967 else { 992 else {
diff --git a/drivers/input/serio/hp_sdc_mlc.c b/drivers/input/serio/hp_sdc_mlc.c
index b587e2d576a..820e51673b2 100644
--- a/drivers/input/serio/hp_sdc_mlc.c
+++ b/drivers/input/serio/hp_sdc_mlc.c
@@ -296,7 +296,7 @@ static void hp_sdc_mlc_out(hil_mlc *mlc)
296 priv->tseq[3] = 0; 296 priv->tseq[3] = 0;
297 if (mlc->opacket & HIL_CTRL_APE) { 297 if (mlc->opacket & HIL_CTRL_APE) {
298 priv->tseq[3] |= HP_SDC_LPC_APE_IPF; 298 priv->tseq[3] |= HP_SDC_LPC_APE_IPF;
299 down_trylock(&mlc->csem); 299 BUG_ON(down_trylock(&mlc->csem));
300 } 300 }
301 enqueue: 301 enqueue:
302 hp_sdc_enqueue_transaction(&priv->trans); 302 hp_sdc_enqueue_transaction(&priv->trans);
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index 924e8ed7f2c..ae04d8a494e 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -78,6 +78,14 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
78 }, 78 },
79 }, 79 },
80 { 80 {
81 .ident = "ASUS G1S",
82 .matches = {
83 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc."),
84 DMI_MATCH(DMI_BOARD_NAME, "G1S"),
85 DMI_MATCH(DMI_BOARD_VERSION, "1.0"),
86 },
87 },
88 {
81 /* AUX LOOP command does not raise AUX IRQ */ 89 /* AUX LOOP command does not raise AUX IRQ */
82 .ident = "ASUS P65UP5", 90 .ident = "ASUS P65UP5",
83 .matches = { 91 .matches = {
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c
index 1ebfcab7466..8ff7e35c706 100644
--- a/drivers/isdn/gigaset/interface.c
+++ b/drivers/isdn/gigaset/interface.c
@@ -408,6 +408,8 @@ static int if_write_room(struct tty_struct *tty)
408 return retval; 408 return retval;
409} 409}
410 410
411/* FIXME: This function does not have error returns */
412
411static int if_chars_in_buffer(struct tty_struct *tty) 413static int if_chars_in_buffer(struct tty_struct *tty)
412{ 414{
413 struct cardstate *cs; 415 struct cardstate *cs;
diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c
index 990e6a7e667..7e5f30dbc0a 100644
--- a/drivers/isdn/mISDN/l1oip_core.c
+++ b/drivers/isdn/mISDN/l1oip_core.c
@@ -731,10 +731,10 @@ l1oip_socket_thread(void *data)
731 while (!signal_pending(current)) { 731 while (!signal_pending(current)) {
732 struct kvec iov = { 732 struct kvec iov = {
733 .iov_base = recvbuf, 733 .iov_base = recvbuf,
734 .iov_len = sizeof(recvbuf), 734 .iov_len = recvbuf_size,
735 }; 735 };
736 recvlen = kernel_recvmsg(socket, &msg, &iov, 1, 736 recvlen = kernel_recvmsg(socket, &msg, &iov, 1,
737 sizeof(recvbuf), 0); 737 recvbuf_size, 0);
738 if (recvlen > 0) { 738 if (recvlen > 0) {
739 l1oip_socket_parse(hc, &sin_rx, recvbuf, recvlen); 739 l1oip_socket_parse(hc, &sin_rx, recvbuf, recvlen);
740 } else { 740 } else {
@@ -1480,7 +1480,7 @@ l1oip_init(void)
1480 return -ENOMEM; 1480 return -ENOMEM;
1481 1481
1482 l1oip_cnt = 0; 1482 l1oip_cnt = 0;
1483 while (type[l1oip_cnt] && l1oip_cnt < MAX_CARDS) { 1483 while (l1oip_cnt < MAX_CARDS && type[l1oip_cnt]) {
1484 switch (type[l1oip_cnt] & 0xff) { 1484 switch (type[l1oip_cnt] & 0xff) {
1485 case 1: 1485 case 1:
1486 pri = 0; 1486 pri = 0;
diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c
index a6974e9b8eb..1e2cb846b3c 100644
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -1,6 +1,8 @@
1/*P:400 This contains run_guest() which actually calls into the Host<->Guest 1/*P:400
2 * This contains run_guest() which actually calls into the Host<->Guest
2 * Switcher and analyzes the return, such as determining if the Guest wants the 3 * Switcher and analyzes the return, such as determining if the Guest wants the
3 * Host to do something. This file also contains useful helper routines. :*/ 4 * Host to do something. This file also contains useful helper routines.
5:*/
4#include <linux/module.h> 6#include <linux/module.h>
5#include <linux/stringify.h> 7#include <linux/stringify.h>
6#include <linux/stddef.h> 8#include <linux/stddef.h>
@@ -24,7 +26,8 @@ static struct page **switcher_page;
24/* This One Big lock protects all inter-guest data structures. */ 26/* This One Big lock protects all inter-guest data structures. */
25DEFINE_MUTEX(lguest_lock); 27DEFINE_MUTEX(lguest_lock);
26 28
27/*H:010 We need to set up the Switcher at a high virtual address. Remember the 29/*H:010
30 * We need to set up the Switcher at a high virtual address. Remember the
28 * Switcher is a few hundred bytes of assembler code which actually changes the 31 * Switcher is a few hundred bytes of assembler code which actually changes the
29 * CPU to run the Guest, and then changes back to the Host when a trap or 32 * CPU to run the Guest, and then changes back to the Host when a trap or
30 * interrupt happens. 33 * interrupt happens.
@@ -33,7 +36,8 @@ DEFINE_MUTEX(lguest_lock);
33 * Host since it will be running as the switchover occurs. 36 * Host since it will be running as the switchover occurs.
34 * 37 *
35 * Trying to map memory at a particular address is an unusual thing to do, so 38 * Trying to map memory at a particular address is an unusual thing to do, so
36 * it's not a simple one-liner. */ 39 * it's not a simple one-liner.
40 */
37static __init int map_switcher(void) 41static __init int map_switcher(void)
38{ 42{
39 int i, err; 43 int i, err;
@@ -47,8 +51,10 @@ static __init int map_switcher(void)
47 * easy. 51 * easy.
48 */ 52 */
49 53
50 /* We allocate an array of struct page pointers. map_vm_area() wants 54 /*
51 * this, rather than just an array of pages. */ 55 * We allocate an array of struct page pointers. map_vm_area() wants
56 * this, rather than just an array of pages.
57 */
52 switcher_page = kmalloc(sizeof(switcher_page[0])*TOTAL_SWITCHER_PAGES, 58 switcher_page = kmalloc(sizeof(switcher_page[0])*TOTAL_SWITCHER_PAGES,
53 GFP_KERNEL); 59 GFP_KERNEL);
54 if (!switcher_page) { 60 if (!switcher_page) {
@@ -56,8 +62,10 @@ static __init int map_switcher(void)
56 goto out; 62 goto out;
57 } 63 }
58 64
59 /* Now we actually allocate the pages. The Guest will see these pages, 65 /*
60 * so we make sure they're zeroed. */ 66 * Now we actually allocate the pages. The Guest will see these pages,
67 * so we make sure they're zeroed.
68 */
61 for (i = 0; i < TOTAL_SWITCHER_PAGES; i++) { 69 for (i = 0; i < TOTAL_SWITCHER_PAGES; i++) {
62 unsigned long addr = get_zeroed_page(GFP_KERNEL); 70 unsigned long addr = get_zeroed_page(GFP_KERNEL);
63 if (!addr) { 71 if (!addr) {
@@ -67,19 +75,23 @@ static __init int map_switcher(void)
67 switcher_page[i] = virt_to_page(addr); 75 switcher_page[i] = virt_to_page(addr);
68 } 76 }
69 77
70 /* First we check that the Switcher won't overlap the fixmap area at 78 /*
79 * First we check that the Switcher won't overlap the fixmap area at
71 * the top of memory. It's currently nowhere near, but it could have 80 * the top of memory. It's currently nowhere near, but it could have
72 * very strange effects if it ever happened. */ 81 * very strange effects if it ever happened.
82 */
73 if (SWITCHER_ADDR + (TOTAL_SWITCHER_PAGES+1)*PAGE_SIZE > FIXADDR_START){ 83 if (SWITCHER_ADDR + (TOTAL_SWITCHER_PAGES+1)*PAGE_SIZE > FIXADDR_START){
74 err = -ENOMEM; 84 err = -ENOMEM;
75 printk("lguest: mapping switcher would thwack fixmap\n"); 85 printk("lguest: mapping switcher would thwack fixmap\n");
76 goto free_pages; 86 goto free_pages;
77 } 87 }
78 88
79 /* Now we reserve the "virtual memory area" we want: 0xFFC00000 89 /*
90 * Now we reserve the "virtual memory area" we want: 0xFFC00000
80 * (SWITCHER_ADDR). We might not get it in theory, but in practice 91 * (SWITCHER_ADDR). We might not get it in theory, but in practice
81 * it's worked so far. The end address needs +1 because __get_vm_area 92 * it's worked so far. The end address needs +1 because __get_vm_area
82 * allocates an extra guard page, so we need space for that. */ 93 * allocates an extra guard page, so we need space for that.
94 */
83 switcher_vma = __get_vm_area(TOTAL_SWITCHER_PAGES * PAGE_SIZE, 95 switcher_vma = __get_vm_area(TOTAL_SWITCHER_PAGES * PAGE_SIZE,
84 VM_ALLOC, SWITCHER_ADDR, SWITCHER_ADDR 96 VM_ALLOC, SWITCHER_ADDR, SWITCHER_ADDR
85 + (TOTAL_SWITCHER_PAGES+1) * PAGE_SIZE); 97 + (TOTAL_SWITCHER_PAGES+1) * PAGE_SIZE);
@@ -89,11 +101,13 @@ static __init int map_switcher(void)
89 goto free_pages; 101 goto free_pages;
90 } 102 }
91 103
92 /* This code actually sets up the pages we've allocated to appear at 104 /*
105 * This code actually sets up the pages we've allocated to appear at
93 * SWITCHER_ADDR. map_vm_area() takes the vma we allocated above, the 106 * SWITCHER_ADDR. map_vm_area() takes the vma we allocated above, the
94 * kind of pages we're mapping (kernel pages), and a pointer to our 107 * kind of pages we're mapping (kernel pages), and a pointer to our
95 * array of struct pages. It increments that pointer, but we don't 108 * array of struct pages. It increments that pointer, but we don't
96 * care. */ 109 * care.
110 */
97 pagep = switcher_page; 111 pagep = switcher_page;
98 err = map_vm_area(switcher_vma, PAGE_KERNEL_EXEC, &pagep); 112 err = map_vm_area(switcher_vma, PAGE_KERNEL_EXEC, &pagep);
99 if (err) { 113 if (err) {
@@ -101,8 +115,10 @@ static __init int map_switcher(void)
101 goto free_vma; 115 goto free_vma;
102 } 116 }
103 117
104 /* Now the Switcher is mapped at the right address, we can't fail! 118 /*
105 * Copy in the compiled-in Switcher code (from <arch>_switcher.S). */ 119 * Now the Switcher is mapped at the right address, we can't fail!
120 * Copy in the compiled-in Switcher code (from <arch>_switcher.S).
121 */
106 memcpy(switcher_vma->addr, start_switcher_text, 122 memcpy(switcher_vma->addr, start_switcher_text,
107 end_switcher_text - start_switcher_text); 123 end_switcher_text - start_switcher_text);
108 124
@@ -124,8 +140,7 @@ out:
124} 140}
125/*:*/ 141/*:*/
126 142
127/* Cleaning up the mapping when the module is unloaded is almost... 143/* Cleaning up the mapping when the module is unloaded is almost... too easy. */
128 * too easy. */
129static void unmap_switcher(void) 144static void unmap_switcher(void)
130{ 145{
131 unsigned int i; 146 unsigned int i;
@@ -151,16 +166,19 @@ static void unmap_switcher(void)
151 * But we can't trust the Guest: it might be trying to access the Launcher 166 * But we can't trust the Guest: it might be trying to access the Launcher
152 * code. We have to check that the range is below the pfn_limit the Launcher 167 * code. We have to check that the range is below the pfn_limit the Launcher
153 * gave us. We have to make sure that addr + len doesn't give us a false 168 * gave us. We have to make sure that addr + len doesn't give us a false
154 * positive by overflowing, too. */ 169 * positive by overflowing, too.
170 */
155bool lguest_address_ok(const struct lguest *lg, 171bool lguest_address_ok(const struct lguest *lg,
156 unsigned long addr, unsigned long len) 172 unsigned long addr, unsigned long len)
157{ 173{
158 return (addr+len) / PAGE_SIZE < lg->pfn_limit && (addr+len >= addr); 174 return (addr+len) / PAGE_SIZE < lg->pfn_limit && (addr+len >= addr);
159} 175}
160 176
161/* This routine copies memory from the Guest. Here we can see how useful the 177/*
178 * This routine copies memory from the Guest. Here we can see how useful the
162 * kill_lguest() routine we met in the Launcher can be: we return a random 179 * kill_lguest() routine we met in the Launcher can be: we return a random
163 * value (all zeroes) instead of needing to return an error. */ 180 * value (all zeroes) instead of needing to return an error.
181 */
164void __lgread(struct lg_cpu *cpu, void *b, unsigned long addr, unsigned bytes) 182void __lgread(struct lg_cpu *cpu, void *b, unsigned long addr, unsigned bytes)
165{ 183{
166 if (!lguest_address_ok(cpu->lg, addr, bytes) 184 if (!lguest_address_ok(cpu->lg, addr, bytes)
@@ -181,9 +199,11 @@ void __lgwrite(struct lg_cpu *cpu, unsigned long addr, const void *b,
181} 199}
182/*:*/ 200/*:*/
183 201
184/*H:030 Let's jump straight to the the main loop which runs the Guest. 202/*H:030
203 * Let's jump straight to the the main loop which runs the Guest.
185 * Remember, this is called by the Launcher reading /dev/lguest, and we keep 204 * Remember, this is called by the Launcher reading /dev/lguest, and we keep
186 * going around and around until something interesting happens. */ 205 * going around and around until something interesting happens.
206 */
187int run_guest(struct lg_cpu *cpu, unsigned long __user *user) 207int run_guest(struct lg_cpu *cpu, unsigned long __user *user)
188{ 208{
189 /* We stop running once the Guest is dead. */ 209 /* We stop running once the Guest is dead. */
@@ -195,10 +215,17 @@ int run_guest(struct lg_cpu *cpu, unsigned long __user *user)
195 if (cpu->hcall) 215 if (cpu->hcall)
196 do_hypercalls(cpu); 216 do_hypercalls(cpu);
197 217
198 /* It's possible the Guest did a NOTIFY hypercall to the 218 /*
199 * Launcher, in which case we return from the read() now. */ 219 * It's possible the Guest did a NOTIFY hypercall to the
220 * Launcher.
221 */
200 if (cpu->pending_notify) { 222 if (cpu->pending_notify) {
223 /*
224 * Does it just needs to write to a registered
225 * eventfd (ie. the appropriate virtqueue thread)?
226 */
201 if (!send_notify_to_eventfd(cpu)) { 227 if (!send_notify_to_eventfd(cpu)) {
228 /* OK, we tell the main Laucher. */
202 if (put_user(cpu->pending_notify, user)) 229 if (put_user(cpu->pending_notify, user))
203 return -EFAULT; 230 return -EFAULT;
204 return sizeof(cpu->pending_notify); 231 return sizeof(cpu->pending_notify);
@@ -209,29 +236,39 @@ int run_guest(struct lg_cpu *cpu, unsigned long __user *user)
209 if (signal_pending(current)) 236 if (signal_pending(current))
210 return -ERESTARTSYS; 237 return -ERESTARTSYS;
211 238
212 /* Check if there are any interrupts which can be delivered now: 239 /*
240 * Check if there are any interrupts which can be delivered now:
213 * if so, this sets up the hander to be executed when we next 241 * if so, this sets up the hander to be executed when we next
214 * run the Guest. */ 242 * run the Guest.
243 */
215 irq = interrupt_pending(cpu, &more); 244 irq = interrupt_pending(cpu, &more);
216 if (irq < LGUEST_IRQS) 245 if (irq < LGUEST_IRQS)
217 try_deliver_interrupt(cpu, irq, more); 246 try_deliver_interrupt(cpu, irq, more);
218 247
219 /* All long-lived kernel loops need to check with this horrible 248 /*
249 * All long-lived kernel loops need to check with this horrible
220 * thing called the freezer. If the Host is trying to suspend, 250 * thing called the freezer. If the Host is trying to suspend,
221 * it stops us. */ 251 * it stops us.
252 */
222 try_to_freeze(); 253 try_to_freeze();
223 254
224 /* Just make absolutely sure the Guest is still alive. One of 255 /*
225 * those hypercalls could have been fatal, for example. */ 256 * Just make absolutely sure the Guest is still alive. One of
257 * those hypercalls could have been fatal, for example.
258 */
226 if (cpu->lg->dead) 259 if (cpu->lg->dead)
227 break; 260 break;
228 261
229 /* If the Guest asked to be stopped, we sleep. The Guest's 262 /*
230 * clock timer will wake us. */ 263 * If the Guest asked to be stopped, we sleep. The Guest's
264 * clock timer will wake us.
265 */
231 if (cpu->halted) { 266 if (cpu->halted) {
232 set_current_state(TASK_INTERRUPTIBLE); 267 set_current_state(TASK_INTERRUPTIBLE);
233 /* Just before we sleep, make sure no interrupt snuck in 268 /*
234 * which we should be doing. */ 269 * Just before we sleep, make sure no interrupt snuck in
270 * which we should be doing.
271 */
235 if (interrupt_pending(cpu, &more) < LGUEST_IRQS) 272 if (interrupt_pending(cpu, &more) < LGUEST_IRQS)
236 set_current_state(TASK_RUNNING); 273 set_current_state(TASK_RUNNING);
237 else 274 else
@@ -239,8 +276,10 @@ int run_guest(struct lg_cpu *cpu, unsigned long __user *user)
239 continue; 276 continue;
240 } 277 }
241 278
242 /* OK, now we're ready to jump into the Guest. First we put up 279 /*
243 * the "Do Not Disturb" sign: */ 280 * OK, now we're ready to jump into the Guest. First we put up
281 * the "Do Not Disturb" sign:
282 */
244 local_irq_disable(); 283 local_irq_disable();
245 284
246 /* Actually run the Guest until something happens. */ 285 /* Actually run the Guest until something happens. */
@@ -327,8 +366,10 @@ static void __exit fini(void)
327} 366}
328/*:*/ 367/*:*/
329 368
330/* The Host side of lguest can be a module. This is a nice way for people to 369/*
331 * play with it. */ 370 * The Host side of lguest can be a module. This is a nice way for people to
371 * play with it.
372 */
332module_init(init); 373module_init(init);
333module_exit(fini); 374module_exit(fini);
334MODULE_LICENSE("GPL"); 375MODULE_LICENSE("GPL");
diff --git a/drivers/lguest/hypercalls.c b/drivers/lguest/hypercalls.c
index c29ffa19cb7..83511eb0923 100644
--- a/drivers/lguest/hypercalls.c
+++ b/drivers/lguest/hypercalls.c
@@ -1,8 +1,10 @@
1/*P:500 Just as userspace programs request kernel operations through a system 1/*P:500
2 * Just as userspace programs request kernel operations through a system
2 * call, the Guest requests Host operations through a "hypercall". You might 3 * call, the Guest requests Host operations through a "hypercall". You might
3 * notice this nomenclature doesn't really follow any logic, but the name has 4 * notice this nomenclature doesn't really follow any logic, but the name has
4 * been around for long enough that we're stuck with it. As you'd expect, this 5 * been around for long enough that we're stuck with it. As you'd expect, this
5 * code is basically a one big switch statement. :*/ 6 * code is basically a one big switch statement.
7:*/
6 8
7/* Copyright (C) 2006 Rusty Russell IBM Corporation 9/* Copyright (C) 2006 Rusty Russell IBM Corporation
8 10
@@ -28,30 +30,41 @@
28#include <asm/pgtable.h> 30#include <asm/pgtable.h>
29#include "lg.h" 31#include "lg.h"
30 32
31/*H:120 This is the core hypercall routine: where the Guest gets what it wants. 33/*H:120
32 * Or gets killed. Or, in the case of LHCALL_SHUTDOWN, both. */ 34 * This is the core hypercall routine: where the Guest gets what it wants.
35 * Or gets killed. Or, in the case of LHCALL_SHUTDOWN, both.
36 */
33static void do_hcall(struct lg_cpu *cpu, struct hcall_args *args) 37static void do_hcall(struct lg_cpu *cpu, struct hcall_args *args)
34{ 38{
35 switch (args->arg0) { 39 switch (args->arg0) {
36 case LHCALL_FLUSH_ASYNC: 40 case LHCALL_FLUSH_ASYNC:
37 /* This call does nothing, except by breaking out of the Guest 41 /*
38 * it makes us process all the asynchronous hypercalls. */ 42 * This call does nothing, except by breaking out of the Guest
43 * it makes us process all the asynchronous hypercalls.
44 */
39 break; 45 break;
40 case LHCALL_SEND_INTERRUPTS: 46 case LHCALL_SEND_INTERRUPTS:
41 /* This call does nothing too, but by breaking out of the Guest 47 /*
42 * it makes us process any pending interrupts. */ 48 * This call does nothing too, but by breaking out of the Guest
49 * it makes us process any pending interrupts.
50 */
43 break; 51 break;
44 case LHCALL_LGUEST_INIT: 52 case LHCALL_LGUEST_INIT:
45 /* You can't get here unless you're already initialized. Don't 53 /*
46 * do that. */ 54 * You can't get here unless you're already initialized. Don't
55 * do that.
56 */
47 kill_guest(cpu, "already have lguest_data"); 57 kill_guest(cpu, "already have lguest_data");
48 break; 58 break;
49 case LHCALL_SHUTDOWN: { 59 case LHCALL_SHUTDOWN: {
50 /* Shutdown is such a trivial hypercall that we do it in four
51 * lines right here. */
52 char msg[128]; 60 char msg[128];
53 /* If the lgread fails, it will call kill_guest() itself; the 61 /*
54 * kill_guest() with the message will be ignored. */ 62 * Shutdown is such a trivial hypercall that we do it in five
63 * lines right here.
64 *
65 * If the lgread fails, it will call kill_guest() itself; the
66 * kill_guest() with the message will be ignored.
67 */
55 __lgread(cpu, msg, args->arg1, sizeof(msg)); 68 __lgread(cpu, msg, args->arg1, sizeof(msg));
56 msg[sizeof(msg)-1] = '\0'; 69 msg[sizeof(msg)-1] = '\0';
57 kill_guest(cpu, "CRASH: %s", msg); 70 kill_guest(cpu, "CRASH: %s", msg);
@@ -60,16 +73,17 @@ static void do_hcall(struct lg_cpu *cpu, struct hcall_args *args)
60 break; 73 break;
61 } 74 }
62 case LHCALL_FLUSH_TLB: 75 case LHCALL_FLUSH_TLB:
63 /* FLUSH_TLB comes in two flavors, depending on the 76 /* FLUSH_TLB comes in two flavors, depending on the argument: */
64 * argument: */
65 if (args->arg1) 77 if (args->arg1)
66 guest_pagetable_clear_all(cpu); 78 guest_pagetable_clear_all(cpu);
67 else 79 else
68 guest_pagetable_flush_user(cpu); 80 guest_pagetable_flush_user(cpu);
69 break; 81 break;
70 82
71 /* All these calls simply pass the arguments through to the right 83 /*
72 * routines. */ 84 * All these calls simply pass the arguments through to the right
85 * routines.
86 */
73 case LHCALL_NEW_PGTABLE: 87 case LHCALL_NEW_PGTABLE:
74 guest_new_pagetable(cpu, args->arg1); 88 guest_new_pagetable(cpu, args->arg1);
75 break; 89 break;
@@ -112,15 +126,16 @@ static void do_hcall(struct lg_cpu *cpu, struct hcall_args *args)
112 kill_guest(cpu, "Bad hypercall %li\n", args->arg0); 126 kill_guest(cpu, "Bad hypercall %li\n", args->arg0);
113 } 127 }
114} 128}
115/*:*/
116 129
117/*H:124 Asynchronous hypercalls are easy: we just look in the array in the 130/*H:124
131 * Asynchronous hypercalls are easy: we just look in the array in the
118 * Guest's "struct lguest_data" to see if any new ones are marked "ready". 132 * Guest's "struct lguest_data" to see if any new ones are marked "ready".
119 * 133 *
120 * We are careful to do these in order: obviously we respect the order the 134 * We are careful to do these in order: obviously we respect the order the
121 * Guest put them in the ring, but we also promise the Guest that they will 135 * Guest put them in the ring, but we also promise the Guest that they will
122 * happen before any normal hypercall (which is why we check this before 136 * happen before any normal hypercall (which is why we check this before
123 * checking for a normal hcall). */ 137 * checking for a normal hcall).
138 */
124static void do_async_hcalls(struct lg_cpu *cpu) 139static void do_async_hcalls(struct lg_cpu *cpu)
125{ 140{
126 unsigned int i; 141 unsigned int i;
@@ -133,22 +148,28 @@ static void do_async_hcalls(struct lg_cpu *cpu)
133 /* We process "struct lguest_data"s hcalls[] ring once. */ 148 /* We process "struct lguest_data"s hcalls[] ring once. */
134 for (i = 0; i < ARRAY_SIZE(st); i++) { 149 for (i = 0; i < ARRAY_SIZE(st); i++) {
135 struct hcall_args args; 150 struct hcall_args args;
136 /* We remember where we were up to from last time. This makes 151 /*
152 * We remember where we were up to from last time. This makes
137 * sure that the hypercalls are done in the order the Guest 153 * sure that the hypercalls are done in the order the Guest
138 * places them in the ring. */ 154 * places them in the ring.
155 */
139 unsigned int n = cpu->next_hcall; 156 unsigned int n = cpu->next_hcall;
140 157
141 /* 0xFF means there's no call here (yet). */ 158 /* 0xFF means there's no call here (yet). */
142 if (st[n] == 0xFF) 159 if (st[n] == 0xFF)
143 break; 160 break;
144 161
145 /* OK, we have hypercall. Increment the "next_hcall" cursor, 162 /*
146 * and wrap back to 0 if we reach the end. */ 163 * OK, we have hypercall. Increment the "next_hcall" cursor,
164 * and wrap back to 0 if we reach the end.
165 */
147 if (++cpu->next_hcall == LHCALL_RING_SIZE) 166 if (++cpu->next_hcall == LHCALL_RING_SIZE)
148 cpu->next_hcall = 0; 167 cpu->next_hcall = 0;
149 168
150 /* Copy the hypercall arguments into a local copy of 169 /*
151 * the hcall_args struct. */ 170 * Copy the hypercall arguments into a local copy of the
171 * hcall_args struct.
172 */
152 if (copy_from_user(&args, &cpu->lg->lguest_data->hcalls[n], 173 if (copy_from_user(&args, &cpu->lg->lguest_data->hcalls[n],
153 sizeof(struct hcall_args))) { 174 sizeof(struct hcall_args))) {
154 kill_guest(cpu, "Fetching async hypercalls"); 175 kill_guest(cpu, "Fetching async hypercalls");
@@ -164,19 +185,25 @@ static void do_async_hcalls(struct lg_cpu *cpu)
164 break; 185 break;
165 } 186 }
166 187
167 /* Stop doing hypercalls if they want to notify the Launcher: 188 /*
168 * it needs to service this first. */ 189 * Stop doing hypercalls if they want to notify the Launcher:
190 * it needs to service this first.
191 */
169 if (cpu->pending_notify) 192 if (cpu->pending_notify)
170 break; 193 break;
171 } 194 }
172} 195}
173 196
174/* Last of all, we look at what happens first of all. The very first time the 197/*
175 * Guest makes a hypercall, we end up here to set things up: */ 198 * Last of all, we look at what happens first of all. The very first time the
199 * Guest makes a hypercall, we end up here to set things up:
200 */
176static void initialize(struct lg_cpu *cpu) 201static void initialize(struct lg_cpu *cpu)
177{ 202{
178 /* You can't do anything until you're initialized. The Guest knows the 203 /*
179 * rules, so we're unforgiving here. */ 204 * You can't do anything until you're initialized. The Guest knows the
205 * rules, so we're unforgiving here.
206 */
180 if (cpu->hcall->arg0 != LHCALL_LGUEST_INIT) { 207 if (cpu->hcall->arg0 != LHCALL_LGUEST_INIT) {
181 kill_guest(cpu, "hypercall %li before INIT", cpu->hcall->arg0); 208 kill_guest(cpu, "hypercall %li before INIT", cpu->hcall->arg0);
182 return; 209 return;
@@ -185,32 +212,44 @@ static void initialize(struct lg_cpu *cpu)
185 if (lguest_arch_init_hypercalls(cpu)) 212 if (lguest_arch_init_hypercalls(cpu))
186 kill_guest(cpu, "bad guest page %p", cpu->lg->lguest_data); 213 kill_guest(cpu, "bad guest page %p", cpu->lg->lguest_data);
187 214
188 /* The Guest tells us where we're not to deliver interrupts by putting 215 /*
189 * the range of addresses into "struct lguest_data". */ 216 * The Guest tells us where we're not to deliver interrupts by putting
217 * the range of addresses into "struct lguest_data".
218 */
190 if (get_user(cpu->lg->noirq_start, &cpu->lg->lguest_data->noirq_start) 219 if (get_user(cpu->lg->noirq_start, &cpu->lg->lguest_data->noirq_start)
191 || get_user(cpu->lg->noirq_end, &cpu->lg->lguest_data->noirq_end)) 220 || get_user(cpu->lg->noirq_end, &cpu->lg->lguest_data->noirq_end))
192 kill_guest(cpu, "bad guest page %p", cpu->lg->lguest_data); 221 kill_guest(cpu, "bad guest page %p", cpu->lg->lguest_data);
193 222
194 /* We write the current time into the Guest's data page once so it can 223 /*
195 * set its clock. */ 224 * We write the current time into the Guest's data page once so it can
225 * set its clock.
226 */
196 write_timestamp(cpu); 227 write_timestamp(cpu);
197 228
198 /* page_tables.c will also do some setup. */ 229 /* page_tables.c will also do some setup. */
199 page_table_guest_data_init(cpu); 230 page_table_guest_data_init(cpu);
200 231
201 /* This is the one case where the above accesses might have been the 232 /*
233 * This is the one case where the above accesses might have been the
202 * first write to a Guest page. This may have caused a copy-on-write 234 * first write to a Guest page. This may have caused a copy-on-write
203 * fault, but the old page might be (read-only) in the Guest 235 * fault, but the old page might be (read-only) in the Guest
204 * pagetable. */ 236 * pagetable.
237 */
205 guest_pagetable_clear_all(cpu); 238 guest_pagetable_clear_all(cpu);
206} 239}
207/*:*/ 240/*:*/
208 241
209/*M:013 If a Guest reads from a page (so creates a mapping) that it has never 242/*M:013
243 * If a Guest reads from a page (so creates a mapping) that it has never
210 * written to, and then the Launcher writes to it (ie. the output of a virtual 244 * written to, and then the Launcher writes to it (ie. the output of a virtual
211 * device), the Guest will still see the old page. In practice, this never 245 * device), the Guest will still see the old page. In practice, this never
212 * happens: why would the Guest read a page which it has never written to? But 246 * happens: why would the Guest read a page which it has never written to? But
213 * a similar scenario might one day bite us, so it's worth mentioning. :*/ 247 * a similar scenario might one day bite us, so it's worth mentioning.
248 *
249 * Note that if we used a shared anonymous mapping in the Launcher instead of
250 * mapping /dev/zero private, we wouldn't worry about cop-on-write. And we
251 * need that to switch the Launcher to processes (away from threads) anyway.
252:*/
214 253
215/*H:100 254/*H:100
216 * Hypercalls 255 * Hypercalls
@@ -229,17 +268,22 @@ void do_hypercalls(struct lg_cpu *cpu)
229 return; 268 return;
230 } 269 }
231 270
232 /* The Guest has initialized. 271 /*
272 * The Guest has initialized.
233 * 273 *
234 * Look in the hypercall ring for the async hypercalls: */ 274 * Look in the hypercall ring for the async hypercalls:
275 */
235 do_async_hcalls(cpu); 276 do_async_hcalls(cpu);
236 277
237 /* If we stopped reading the hypercall ring because the Guest did a 278 /*
279 * If we stopped reading the hypercall ring because the Guest did a
238 * NOTIFY to the Launcher, we want to return now. Otherwise we do 280 * NOTIFY to the Launcher, we want to return now. Otherwise we do
239 * the hypercall. */ 281 * the hypercall.
282 */
240 if (!cpu->pending_notify) { 283 if (!cpu->pending_notify) {
241 do_hcall(cpu, cpu->hcall); 284 do_hcall(cpu, cpu->hcall);
242 /* Tricky point: we reset the hcall pointer to mark the 285 /*
286 * Tricky point: we reset the hcall pointer to mark the
243 * hypercall as "done". We use the hcall pointer rather than 287 * hypercall as "done". We use the hcall pointer rather than
244 * the trap number to indicate a hypercall is pending. 288 * the trap number to indicate a hypercall is pending.
245 * Normally it doesn't matter: the Guest will run again and 289 * Normally it doesn't matter: the Guest will run again and
@@ -248,13 +292,16 @@ void do_hypercalls(struct lg_cpu *cpu)
248 * However, if we are signalled or the Guest sends I/O to the 292 * However, if we are signalled or the Guest sends I/O to the
249 * Launcher, the run_guest() loop will exit without running the 293 * Launcher, the run_guest() loop will exit without running the
250 * Guest. When it comes back it would try to re-run the 294 * Guest. When it comes back it would try to re-run the
251 * hypercall. Finding that bug sucked. */ 295 * hypercall. Finding that bug sucked.
296 */
252 cpu->hcall = NULL; 297 cpu->hcall = NULL;
253 } 298 }
254} 299}
255 300
256/* This routine supplies the Guest with time: it's used for wallclock time at 301/*
257 * initial boot and as a rough time source if the TSC isn't available. */ 302 * This routine supplies the Guest with time: it's used for wallclock time at
303 * initial boot and as a rough time source if the TSC isn't available.
304 */
258void write_timestamp(struct lg_cpu *cpu) 305void write_timestamp(struct lg_cpu *cpu)
259{ 306{
260 struct timespec now; 307 struct timespec now;
diff --git a/drivers/lguest/interrupts_and_traps.c b/drivers/lguest/interrupts_and_traps.c
index 0e9067b0d50..18648180db0 100644
--- a/drivers/lguest/interrupts_and_traps.c
+++ b/drivers/lguest/interrupts_and_traps.c
@@ -1,4 +1,5 @@
1/*P:800 Interrupts (traps) are complicated enough to earn their own file. 1/*P:800
2 * Interrupts (traps) are complicated enough to earn their own file.
2 * There are three classes of interrupts: 3 * There are three classes of interrupts:
3 * 4 *
4 * 1) Real hardware interrupts which occur while we're running the Guest, 5 * 1) Real hardware interrupts which occur while we're running the Guest,
@@ -10,7 +11,8 @@
10 * just like real hardware would deliver them. Traps from the Guest can be set 11 * just like real hardware would deliver them. Traps from the Guest can be set
11 * up to go directly back into the Guest, but sometimes the Host wants to see 12 * up to go directly back into the Guest, but sometimes the Host wants to see
12 * them first, so we also have a way of "reflecting" them into the Guest as if 13 * them first, so we also have a way of "reflecting" them into the Guest as if
13 * they had been delivered to it directly. :*/ 14 * they had been delivered to it directly.
15:*/
14#include <linux/uaccess.h> 16#include <linux/uaccess.h>
15#include <linux/interrupt.h> 17#include <linux/interrupt.h>
16#include <linux/module.h> 18#include <linux/module.h>
@@ -26,8 +28,10 @@ static unsigned long idt_address(u32 lo, u32 hi)
26 return (lo & 0x0000FFFF) | (hi & 0xFFFF0000); 28 return (lo & 0x0000FFFF) | (hi & 0xFFFF0000);
27} 29}
28 30
29/* The "type" of the interrupt handler is a 4 bit field: we only support a 31/*
30 * couple of types. */ 32 * The "type" of the interrupt handler is a 4 bit field: we only support a
33 * couple of types.
34 */
31static int idt_type(u32 lo, u32 hi) 35static int idt_type(u32 lo, u32 hi)
32{ 36{
33 return (hi >> 8) & 0xF; 37 return (hi >> 8) & 0xF;
@@ -39,8 +43,10 @@ static bool idt_present(u32 lo, u32 hi)
39 return (hi & 0x8000); 43 return (hi & 0x8000);
40} 44}
41 45
42/* We need a helper to "push" a value onto the Guest's stack, since that's a 46/*
43 * big part of what delivering an interrupt does. */ 47 * We need a helper to "push" a value onto the Guest's stack, since that's a
48 * big part of what delivering an interrupt does.
49 */
44static void push_guest_stack(struct lg_cpu *cpu, unsigned long *gstack, u32 val) 50static void push_guest_stack(struct lg_cpu *cpu, unsigned long *gstack, u32 val)
45{ 51{
46 /* Stack grows upwards: move stack then write value. */ 52 /* Stack grows upwards: move stack then write value. */
@@ -48,7 +54,8 @@ static void push_guest_stack(struct lg_cpu *cpu, unsigned long *gstack, u32 val)
48 lgwrite(cpu, *gstack, u32, val); 54 lgwrite(cpu, *gstack, u32, val);
49} 55}
50 56
51/*H:210 The set_guest_interrupt() routine actually delivers the interrupt or 57/*H:210
58 * The set_guest_interrupt() routine actually delivers the interrupt or
52 * trap. The mechanics of delivering traps and interrupts to the Guest are the 59 * trap. The mechanics of delivering traps and interrupts to the Guest are the
53 * same, except some traps have an "error code" which gets pushed onto the 60 * same, except some traps have an "error code" which gets pushed onto the
54 * stack as well: the caller tells us if this is one. 61 * stack as well: the caller tells us if this is one.
@@ -59,7 +66,8 @@ static void push_guest_stack(struct lg_cpu *cpu, unsigned long *gstack, u32 val)
59 * 66 *
60 * We set up the stack just like the CPU does for a real interrupt, so it's 67 * We set up the stack just like the CPU does for a real interrupt, so it's
61 * identical for the Guest (and the standard "iret" instruction will undo 68 * identical for the Guest (and the standard "iret" instruction will undo
62 * it). */ 69 * it).
70 */
63static void set_guest_interrupt(struct lg_cpu *cpu, u32 lo, u32 hi, 71static void set_guest_interrupt(struct lg_cpu *cpu, u32 lo, u32 hi,
64 bool has_err) 72 bool has_err)
65{ 73{
@@ -67,20 +75,26 @@ static void set_guest_interrupt(struct lg_cpu *cpu, u32 lo, u32 hi,
67 u32 eflags, ss, irq_enable; 75 u32 eflags, ss, irq_enable;
68 unsigned long virtstack; 76 unsigned long virtstack;
69 77
70 /* There are two cases for interrupts: one where the Guest is already 78 /*
79 * There are two cases for interrupts: one where the Guest is already
71 * in the kernel, and a more complex one where the Guest is in 80 * in the kernel, and a more complex one where the Guest is in
72 * userspace. We check the privilege level to find out. */ 81 * userspace. We check the privilege level to find out.
82 */
73 if ((cpu->regs->ss&0x3) != GUEST_PL) { 83 if ((cpu->regs->ss&0x3) != GUEST_PL) {
74 /* The Guest told us their kernel stack with the SET_STACK 84 /*
75 * hypercall: both the virtual address and the segment */ 85 * The Guest told us their kernel stack with the SET_STACK
86 * hypercall: both the virtual address and the segment.
87 */
76 virtstack = cpu->esp1; 88 virtstack = cpu->esp1;
77 ss = cpu->ss1; 89 ss = cpu->ss1;
78 90
79 origstack = gstack = guest_pa(cpu, virtstack); 91 origstack = gstack = guest_pa(cpu, virtstack);
80 /* We push the old stack segment and pointer onto the new 92 /*
93 * We push the old stack segment and pointer onto the new
81 * stack: when the Guest does an "iret" back from the interrupt 94 * stack: when the Guest does an "iret" back from the interrupt
82 * handler the CPU will notice they're dropping privilege 95 * handler the CPU will notice they're dropping privilege
83 * levels and expect these here. */ 96 * levels and expect these here.
97 */
84 push_guest_stack(cpu, &gstack, cpu->regs->ss); 98 push_guest_stack(cpu, &gstack, cpu->regs->ss);
85 push_guest_stack(cpu, &gstack, cpu->regs->esp); 99 push_guest_stack(cpu, &gstack, cpu->regs->esp);
86 } else { 100 } else {
@@ -91,18 +105,22 @@ static void set_guest_interrupt(struct lg_cpu *cpu, u32 lo, u32 hi,
91 origstack = gstack = guest_pa(cpu, virtstack); 105 origstack = gstack = guest_pa(cpu, virtstack);
92 } 106 }
93 107
94 /* Remember that we never let the Guest actually disable interrupts, so 108 /*
109 * Remember that we never let the Guest actually disable interrupts, so
95 * the "Interrupt Flag" bit is always set. We copy that bit from the 110 * the "Interrupt Flag" bit is always set. We copy that bit from the
96 * Guest's "irq_enabled" field into the eflags word: we saw the Guest 111 * Guest's "irq_enabled" field into the eflags word: we saw the Guest
97 * copy it back in "lguest_iret". */ 112 * copy it back in "lguest_iret".
113 */
98 eflags = cpu->regs->eflags; 114 eflags = cpu->regs->eflags;
99 if (get_user(irq_enable, &cpu->lg->lguest_data->irq_enabled) == 0 115 if (get_user(irq_enable, &cpu->lg->lguest_data->irq_enabled) == 0
100 && !(irq_enable & X86_EFLAGS_IF)) 116 && !(irq_enable & X86_EFLAGS_IF))
101 eflags &= ~X86_EFLAGS_IF; 117 eflags &= ~X86_EFLAGS_IF;
102 118
103 /* An interrupt is expected to push three things on the stack: the old 119 /*
120 * An interrupt is expected to push three things on the stack: the old
104 * "eflags" word, the old code segment, and the old instruction 121 * "eflags" word, the old code segment, and the old instruction
105 * pointer. */ 122 * pointer.
123 */
106 push_guest_stack(cpu, &gstack, eflags); 124 push_guest_stack(cpu, &gstack, eflags);
107 push_guest_stack(cpu, &gstack, cpu->regs->cs); 125 push_guest_stack(cpu, &gstack, cpu->regs->cs);
108 push_guest_stack(cpu, &gstack, cpu->regs->eip); 126 push_guest_stack(cpu, &gstack, cpu->regs->eip);
@@ -111,15 +129,19 @@ static void set_guest_interrupt(struct lg_cpu *cpu, u32 lo, u32 hi,
111 if (has_err) 129 if (has_err)
112 push_guest_stack(cpu, &gstack, cpu->regs->errcode); 130 push_guest_stack(cpu, &gstack, cpu->regs->errcode);
113 131
114 /* Now we've pushed all the old state, we change the stack, the code 132 /*
115 * segment and the address to execute. */ 133 * Now we've pushed all the old state, we change the stack, the code
134 * segment and the address to execute.
135 */
116 cpu->regs->ss = ss; 136 cpu->regs->ss = ss;
117 cpu->regs->esp = virtstack + (gstack - origstack); 137 cpu->regs->esp = virtstack + (gstack - origstack);
118 cpu->regs->cs = (__KERNEL_CS|GUEST_PL); 138 cpu->regs->cs = (__KERNEL_CS|GUEST_PL);
119 cpu->regs->eip = idt_address(lo, hi); 139 cpu->regs->eip = idt_address(lo, hi);
120 140
121 /* There are two kinds of interrupt handlers: 0xE is an "interrupt 141 /*
122 * gate" which expects interrupts to be disabled on entry. */ 142 * There are two kinds of interrupt handlers: 0xE is an "interrupt
143 * gate" which expects interrupts to be disabled on entry.
144 */
123 if (idt_type(lo, hi) == 0xE) 145 if (idt_type(lo, hi) == 0xE)
124 if (put_user(0, &cpu->lg->lguest_data->irq_enabled)) 146 if (put_user(0, &cpu->lg->lguest_data->irq_enabled))
125 kill_guest(cpu, "Disabling interrupts"); 147 kill_guest(cpu, "Disabling interrupts");
@@ -130,7 +152,8 @@ static void set_guest_interrupt(struct lg_cpu *cpu, u32 lo, u32 hi,
130 * 152 *
131 * interrupt_pending() returns the first pending interrupt which isn't blocked 153 * interrupt_pending() returns the first pending interrupt which isn't blocked
132 * by the Guest. It is called before every entry to the Guest, and just before 154 * by the Guest. It is called before every entry to the Guest, and just before
133 * we go to sleep when the Guest has halted itself. */ 155 * we go to sleep when the Guest has halted itself.
156 */
134unsigned int interrupt_pending(struct lg_cpu *cpu, bool *more) 157unsigned int interrupt_pending(struct lg_cpu *cpu, bool *more)
135{ 158{
136 unsigned int irq; 159 unsigned int irq;
@@ -140,8 +163,10 @@ unsigned int interrupt_pending(struct lg_cpu *cpu, bool *more)
140 if (!cpu->lg->lguest_data) 163 if (!cpu->lg->lguest_data)
141 return LGUEST_IRQS; 164 return LGUEST_IRQS;
142 165
143 /* Take our "irqs_pending" array and remove any interrupts the Guest 166 /*
144 * wants blocked: the result ends up in "blk". */ 167 * Take our "irqs_pending" array and remove any interrupts the Guest
168 * wants blocked: the result ends up in "blk".
169 */
145 if (copy_from_user(&blk, cpu->lg->lguest_data->blocked_interrupts, 170 if (copy_from_user(&blk, cpu->lg->lguest_data->blocked_interrupts,
146 sizeof(blk))) 171 sizeof(blk)))
147 return LGUEST_IRQS; 172 return LGUEST_IRQS;
@@ -154,16 +179,20 @@ unsigned int interrupt_pending(struct lg_cpu *cpu, bool *more)
154 return irq; 179 return irq;
155} 180}
156 181
157/* This actually diverts the Guest to running an interrupt handler, once an 182/*
158 * interrupt has been identified by interrupt_pending(). */ 183 * This actually diverts the Guest to running an interrupt handler, once an
184 * interrupt has been identified by interrupt_pending().
185 */
159void try_deliver_interrupt(struct lg_cpu *cpu, unsigned int irq, bool more) 186void try_deliver_interrupt(struct lg_cpu *cpu, unsigned int irq, bool more)
160{ 187{
161 struct desc_struct *idt; 188 struct desc_struct *idt;
162 189
163 BUG_ON(irq >= LGUEST_IRQS); 190 BUG_ON(irq >= LGUEST_IRQS);
164 191
165 /* They may be in the middle of an iret, where they asked us never to 192 /*
166 * deliver interrupts. */ 193 * They may be in the middle of an iret, where they asked us never to
194 * deliver interrupts.
195 */
167 if (cpu->regs->eip >= cpu->lg->noirq_start && 196 if (cpu->regs->eip >= cpu->lg->noirq_start &&
168 (cpu->regs->eip < cpu->lg->noirq_end)) 197 (cpu->regs->eip < cpu->lg->noirq_end))
169 return; 198 return;
@@ -187,29 +216,37 @@ void try_deliver_interrupt(struct lg_cpu *cpu, unsigned int irq, bool more)
187 } 216 }
188 } 217 }
189 218
190 /* Look at the IDT entry the Guest gave us for this interrupt. The 219 /*
220 * Look at the IDT entry the Guest gave us for this interrupt. The
191 * first 32 (FIRST_EXTERNAL_VECTOR) entries are for traps, so we skip 221 * first 32 (FIRST_EXTERNAL_VECTOR) entries are for traps, so we skip
192 * over them. */ 222 * over them.
223 */
193 idt = &cpu->arch.idt[FIRST_EXTERNAL_VECTOR+irq]; 224 idt = &cpu->arch.idt[FIRST_EXTERNAL_VECTOR+irq];
194 /* If they don't have a handler (yet?), we just ignore it */ 225 /* If they don't have a handler (yet?), we just ignore it */
195 if (idt_present(idt->a, idt->b)) { 226 if (idt_present(idt->a, idt->b)) {
196 /* OK, mark it no longer pending and deliver it. */ 227 /* OK, mark it no longer pending and deliver it. */
197 clear_bit(irq, cpu->irqs_pending); 228 clear_bit(irq, cpu->irqs_pending);
198 /* set_guest_interrupt() takes the interrupt descriptor and a 229 /*
230 * set_guest_interrupt() takes the interrupt descriptor and a
199 * flag to say whether this interrupt pushes an error code onto 231 * flag to say whether this interrupt pushes an error code onto
200 * the stack as well: virtual interrupts never do. */ 232 * the stack as well: virtual interrupts never do.
233 */
201 set_guest_interrupt(cpu, idt->a, idt->b, false); 234 set_guest_interrupt(cpu, idt->a, idt->b, false);
202 } 235 }
203 236
204 /* Every time we deliver an interrupt, we update the timestamp in the 237 /*
238 * Every time we deliver an interrupt, we update the timestamp in the
205 * Guest's lguest_data struct. It would be better for the Guest if we 239 * Guest's lguest_data struct. It would be better for the Guest if we
206 * did this more often, but it can actually be quite slow: doing it 240 * did this more often, but it can actually be quite slow: doing it
207 * here is a compromise which means at least it gets updated every 241 * here is a compromise which means at least it gets updated every
208 * timer interrupt. */ 242 * timer interrupt.
243 */
209 write_timestamp(cpu); 244 write_timestamp(cpu);
210 245
211 /* If there are no other interrupts we want to deliver, clear 246 /*
212 * the pending flag. */ 247 * If there are no other interrupts we want to deliver, clear
248 * the pending flag.
249 */
213 if (!more) 250 if (!more)
214 put_user(0, &cpu->lg->lguest_data->irq_pending); 251 put_user(0, &cpu->lg->lguest_data->irq_pending);
215} 252}
@@ -217,24 +254,29 @@ void try_deliver_interrupt(struct lg_cpu *cpu, unsigned int irq, bool more)
217/* And this is the routine when we want to set an interrupt for the Guest. */ 254/* And this is the routine when we want to set an interrupt for the Guest. */
218void set_interrupt(struct lg_cpu *cpu, unsigned int irq) 255void set_interrupt(struct lg_cpu *cpu, unsigned int irq)
219{ 256{
220 /* Next time the Guest runs, the core code will see if it can deliver 257 /*
221 * this interrupt. */ 258 * Next time the Guest runs, the core code will see if it can deliver
259 * this interrupt.
260 */
222 set_bit(irq, cpu->irqs_pending); 261 set_bit(irq, cpu->irqs_pending);
223 262
224 /* Make sure it sees it; it might be asleep (eg. halted), or 263 /*
225 * running the Guest right now, in which case kick_process() 264 * Make sure it sees it; it might be asleep (eg. halted), or running
226 * will knock it out. */ 265 * the Guest right now, in which case kick_process() will knock it out.
266 */
227 if (!wake_up_process(cpu->tsk)) 267 if (!wake_up_process(cpu->tsk))
228 kick_process(cpu->tsk); 268 kick_process(cpu->tsk);
229} 269}
230/*:*/ 270/*:*/
231 271
232/* Linux uses trap 128 for system calls. Plan9 uses 64, and Ron Minnich sent 272/*
273 * Linux uses trap 128 for system calls. Plan9 uses 64, and Ron Minnich sent
233 * me a patch, so we support that too. It'd be a big step for lguest if half 274 * me a patch, so we support that too. It'd be a big step for lguest if half
234 * the Plan 9 user base were to start using it. 275 * the Plan 9 user base were to start using it.
235 * 276 *
236 * Actually now I think of it, it's possible that Ron *is* half the Plan 9 277 * Actually now I think of it, it's possible that Ron *is* half the Plan 9
237 * userbase. Oh well. */ 278 * userbase. Oh well.
279 */
238static bool could_be_syscall(unsigned int num) 280static bool could_be_syscall(unsigned int num)
239{ 281{
240 /* Normal Linux SYSCALL_VECTOR or reserved vector? */ 282 /* Normal Linux SYSCALL_VECTOR or reserved vector? */
@@ -274,9 +316,11 @@ void free_interrupts(void)
274 clear_bit(syscall_vector, used_vectors); 316 clear_bit(syscall_vector, used_vectors);
275} 317}
276 318
277/*H:220 Now we've got the routines to deliver interrupts, delivering traps like 319/*H:220
320 * Now we've got the routines to deliver interrupts, delivering traps like
278 * page fault is easy. The only trick is that Intel decided that some traps 321 * page fault is easy. The only trick is that Intel decided that some traps
279 * should have error codes: */ 322 * should have error codes:
323 */
280static bool has_err(unsigned int trap) 324static bool has_err(unsigned int trap)
281{ 325{
282 return (trap == 8 || (trap >= 10 && trap <= 14) || trap == 17); 326 return (trap == 8 || (trap >= 10 && trap <= 14) || trap == 17);
@@ -285,13 +329,17 @@ static bool has_err(unsigned int trap)
285/* deliver_trap() returns true if it could deliver the trap. */ 329/* deliver_trap() returns true if it could deliver the trap. */
286bool deliver_trap(struct lg_cpu *cpu, unsigned int num) 330bool deliver_trap(struct lg_cpu *cpu, unsigned int num)
287{ 331{
288 /* Trap numbers are always 8 bit, but we set an impossible trap number 332 /*
289 * for traps inside the Switcher, so check that here. */ 333 * Trap numbers are always 8 bit, but we set an impossible trap number
334 * for traps inside the Switcher, so check that here.
335 */
290 if (num >= ARRAY_SIZE(cpu->arch.idt)) 336 if (num >= ARRAY_SIZE(cpu->arch.idt))
291 return false; 337 return false;
292 338
293 /* Early on the Guest hasn't set the IDT entries (or maybe it put a 339 /*
294 * bogus one in): if we fail here, the Guest will be killed. */ 340 * Early on the Guest hasn't set the IDT entries (or maybe it put a
341 * bogus one in): if we fail here, the Guest will be killed.
342 */
295 if (!idt_present(cpu->arch.idt[num].a, cpu->arch.idt[num].b)) 343 if (!idt_present(cpu->arch.idt[num].a, cpu->arch.idt[num].b))
296 return false; 344 return false;
297 set_guest_interrupt(cpu, cpu->arch.idt[num].a, 345 set_guest_interrupt(cpu, cpu->arch.idt[num].a,
@@ -299,7 +347,8 @@ bool deliver_trap(struct lg_cpu *cpu, unsigned int num)
299 return true; 347 return true;
300} 348}
301 349
302/*H:250 Here's the hard part: returning to the Host every time a trap happens 350/*H:250
351 * Here's the hard part: returning to the Host every time a trap happens
303 * and then calling deliver_trap() and re-entering the Guest is slow. 352 * and then calling deliver_trap() and re-entering the Guest is slow.
304 * Particularly because Guest userspace system calls are traps (usually trap 353 * Particularly because Guest userspace system calls are traps (usually trap
305 * 128). 354 * 128).
@@ -311,69 +360,87 @@ bool deliver_trap(struct lg_cpu *cpu, unsigned int num)
311 * the other hypervisors would beat it up at lunchtime. 360 * the other hypervisors would beat it up at lunchtime.
312 * 361 *
313 * This routine indicates if a particular trap number could be delivered 362 * This routine indicates if a particular trap number could be delivered
314 * directly. */ 363 * directly.
364 */
315static bool direct_trap(unsigned int num) 365static bool direct_trap(unsigned int num)
316{ 366{
317 /* Hardware interrupts don't go to the Guest at all (except system 367 /*
318 * call). */ 368 * Hardware interrupts don't go to the Guest at all (except system
369 * call).
370 */
319 if (num >= FIRST_EXTERNAL_VECTOR && !could_be_syscall(num)) 371 if (num >= FIRST_EXTERNAL_VECTOR && !could_be_syscall(num))
320 return false; 372 return false;
321 373
322 /* The Host needs to see page faults (for shadow paging and to save the 374 /*
375 * The Host needs to see page faults (for shadow paging and to save the
323 * fault address), general protection faults (in/out emulation) and 376 * fault address), general protection faults (in/out emulation) and
324 * device not available (TS handling), invalid opcode fault (kvm hcall), 377 * device not available (TS handling), invalid opcode fault (kvm hcall),
325 * and of course, the hypercall trap. */ 378 * and of course, the hypercall trap.
379 */
326 return num != 14 && num != 13 && num != 7 && 380 return num != 14 && num != 13 && num != 7 &&
327 num != 6 && num != LGUEST_TRAP_ENTRY; 381 num != 6 && num != LGUEST_TRAP_ENTRY;
328} 382}
329/*:*/ 383/*:*/
330 384
331/*M:005 The Guest has the ability to turn its interrupt gates into trap gates, 385/*M:005
386 * The Guest has the ability to turn its interrupt gates into trap gates,
332 * if it is careful. The Host will let trap gates can go directly to the 387 * if it is careful. The Host will let trap gates can go directly to the
333 * Guest, but the Guest needs the interrupts atomically disabled for an 388 * Guest, but the Guest needs the interrupts atomically disabled for an
334 * interrupt gate. It can do this by pointing the trap gate at instructions 389 * interrupt gate. It can do this by pointing the trap gate at instructions
335 * within noirq_start and noirq_end, where it can safely disable interrupts. */ 390 * within noirq_start and noirq_end, where it can safely disable interrupts.
391 */
336 392
337/*M:006 The Guests do not use the sysenter (fast system call) instruction, 393/*M:006
394 * The Guests do not use the sysenter (fast system call) instruction,
338 * because it's hardcoded to enter privilege level 0 and so can't go direct. 395 * because it's hardcoded to enter privilege level 0 and so can't go direct.
339 * It's about twice as fast as the older "int 0x80" system call, so it might 396 * It's about twice as fast as the older "int 0x80" system call, so it might
340 * still be worthwhile to handle it in the Switcher and lcall down to the 397 * still be worthwhile to handle it in the Switcher and lcall down to the
341 * Guest. The sysenter semantics are hairy tho: search for that keyword in 398 * Guest. The sysenter semantics are hairy tho: search for that keyword in
342 * entry.S :*/ 399 * entry.S
400:*/
343 401
344/*H:260 When we make traps go directly into the Guest, we need to make sure 402/*H:260
403 * When we make traps go directly into the Guest, we need to make sure
345 * the kernel stack is valid (ie. mapped in the page tables). Otherwise, the 404 * the kernel stack is valid (ie. mapped in the page tables). Otherwise, the
346 * CPU trying to deliver the trap will fault while trying to push the interrupt 405 * CPU trying to deliver the trap will fault while trying to push the interrupt
347 * words on the stack: this is called a double fault, and it forces us to kill 406 * words on the stack: this is called a double fault, and it forces us to kill
348 * the Guest. 407 * the Guest.
349 * 408 *
350 * Which is deeply unfair, because (literally!) it wasn't the Guests' fault. */ 409 * Which is deeply unfair, because (literally!) it wasn't the Guests' fault.
410 */
351void pin_stack_pages(struct lg_cpu *cpu) 411void pin_stack_pages(struct lg_cpu *cpu)
352{ 412{
353 unsigned int i; 413 unsigned int i;
354 414
355 /* Depending on the CONFIG_4KSTACKS option, the Guest can have one or 415 /*
356 * two pages of stack space. */ 416 * Depending on the CONFIG_4KSTACKS option, the Guest can have one or
417 * two pages of stack space.
418 */
357 for (i = 0; i < cpu->lg->stack_pages; i++) 419 for (i = 0; i < cpu->lg->stack_pages; i++)
358 /* The stack grows *upwards*, so the address we're given is the 420 /*
421 * The stack grows *upwards*, so the address we're given is the
359 * start of the page after the kernel stack. Subtract one to 422 * start of the page after the kernel stack. Subtract one to
360 * get back onto the first stack page, and keep subtracting to 423 * get back onto the first stack page, and keep subtracting to
361 * get to the rest of the stack pages. */ 424 * get to the rest of the stack pages.
425 */
362 pin_page(cpu, cpu->esp1 - 1 - i * PAGE_SIZE); 426 pin_page(cpu, cpu->esp1 - 1 - i * PAGE_SIZE);
363} 427}
364 428
365/* Direct traps also mean that we need to know whenever the Guest wants to use 429/*
430 * Direct traps also mean that we need to know whenever the Guest wants to use
366 * a different kernel stack, so we can change the IDT entries to use that 431 * a different kernel stack, so we can change the IDT entries to use that
367 * stack. The IDT entries expect a virtual address, so unlike most addresses 432 * stack. The IDT entries expect a virtual address, so unlike most addresses
368 * the Guest gives us, the "esp" (stack pointer) value here is virtual, not 433 * the Guest gives us, the "esp" (stack pointer) value here is virtual, not
369 * physical. 434 * physical.
370 * 435 *
371 * In Linux each process has its own kernel stack, so this happens a lot: we 436 * In Linux each process has its own kernel stack, so this happens a lot: we
372 * change stacks on each context switch. */ 437 * change stacks on each context switch.
438 */
373void guest_set_stack(struct lg_cpu *cpu, u32 seg, u32 esp, unsigned int pages) 439void guest_set_stack(struct lg_cpu *cpu, u32 seg, u32 esp, unsigned int pages)
374{ 440{
375 /* You are not allowed have a stack segment with privilege level 0: bad 441 /*
376 * Guest! */ 442 * You're not allowed a stack segment with privilege level 0: bad Guest!
443 */
377 if ((seg & 0x3) != GUEST_PL) 444 if ((seg & 0x3) != GUEST_PL)
378 kill_guest(cpu, "bad stack segment %i", seg); 445 kill_guest(cpu, "bad stack segment %i", seg);
379 /* We only expect one or two stack pages. */ 446 /* We only expect one or two stack pages. */
@@ -387,11 +454,15 @@ void guest_set_stack(struct lg_cpu *cpu, u32 seg, u32 esp, unsigned int pages)
387 pin_stack_pages(cpu); 454 pin_stack_pages(cpu);
388} 455}
389 456
390/* All this reference to mapping stacks leads us neatly into the other complex 457/*
391 * part of the Host: page table handling. */ 458 * All this reference to mapping stacks leads us neatly into the other complex
459 * part of the Host: page table handling.
460 */
392 461
393/*H:235 This is the routine which actually checks the Guest's IDT entry and 462/*H:235
394 * transfers it into the entry in "struct lguest": */ 463 * This is the routine which actually checks the Guest's IDT entry and
464 * transfers it into the entry in "struct lguest":
465 */
395static void set_trap(struct lg_cpu *cpu, struct desc_struct *trap, 466static void set_trap(struct lg_cpu *cpu, struct desc_struct *trap,
396 unsigned int num, u32 lo, u32 hi) 467 unsigned int num, u32 lo, u32 hi)
397{ 468{
@@ -407,30 +478,38 @@ static void set_trap(struct lg_cpu *cpu, struct desc_struct *trap,
407 if (type != 0xE && type != 0xF) 478 if (type != 0xE && type != 0xF)
408 kill_guest(cpu, "bad IDT type %i", type); 479 kill_guest(cpu, "bad IDT type %i", type);
409 480
410 /* We only copy the handler address, present bit, privilege level and 481 /*
482 * We only copy the handler address, present bit, privilege level and
411 * type. The privilege level controls where the trap can be triggered 483 * type. The privilege level controls where the trap can be triggered
412 * manually with an "int" instruction. This is usually GUEST_PL, 484 * manually with an "int" instruction. This is usually GUEST_PL,
413 * except for system calls which userspace can use. */ 485 * except for system calls which userspace can use.
486 */
414 trap->a = ((__KERNEL_CS|GUEST_PL)<<16) | (lo&0x0000FFFF); 487 trap->a = ((__KERNEL_CS|GUEST_PL)<<16) | (lo&0x0000FFFF);
415 trap->b = (hi&0xFFFFEF00); 488 trap->b = (hi&0xFFFFEF00);
416} 489}
417 490
418/*H:230 While we're here, dealing with delivering traps and interrupts to the 491/*H:230
492 * While we're here, dealing with delivering traps and interrupts to the
419 * Guest, we might as well complete the picture: how the Guest tells us where 493 * Guest, we might as well complete the picture: how the Guest tells us where
420 * it wants them to go. This would be simple, except making traps fast 494 * it wants them to go. This would be simple, except making traps fast
421 * requires some tricks. 495 * requires some tricks.
422 * 496 *
423 * We saw the Guest setting Interrupt Descriptor Table (IDT) entries with the 497 * We saw the Guest setting Interrupt Descriptor Table (IDT) entries with the
424 * LHCALL_LOAD_IDT_ENTRY hypercall before: that comes here. */ 498 * LHCALL_LOAD_IDT_ENTRY hypercall before: that comes here.
499 */
425void load_guest_idt_entry(struct lg_cpu *cpu, unsigned int num, u32 lo, u32 hi) 500void load_guest_idt_entry(struct lg_cpu *cpu, unsigned int num, u32 lo, u32 hi)
426{ 501{
427 /* Guest never handles: NMI, doublefault, spurious interrupt or 502 /*
428 * hypercall. We ignore when it tries to set them. */ 503 * Guest never handles: NMI, doublefault, spurious interrupt or
504 * hypercall. We ignore when it tries to set them.
505 */
429 if (num == 2 || num == 8 || num == 15 || num == LGUEST_TRAP_ENTRY) 506 if (num == 2 || num == 8 || num == 15 || num == LGUEST_TRAP_ENTRY)
430 return; 507 return;
431 508
432 /* Mark the IDT as changed: next time the Guest runs we'll know we have 509 /*
433 * to copy this again. */ 510 * Mark the IDT as changed: next time the Guest runs we'll know we have
511 * to copy this again.
512 */
434 cpu->changed |= CHANGED_IDT; 513 cpu->changed |= CHANGED_IDT;
435 514
436 /* Check that the Guest doesn't try to step outside the bounds. */ 515 /* Check that the Guest doesn't try to step outside the bounds. */
@@ -440,9 +519,11 @@ void load_guest_idt_entry(struct lg_cpu *cpu, unsigned int num, u32 lo, u32 hi)
440 set_trap(cpu, &cpu->arch.idt[num], num, lo, hi); 519 set_trap(cpu, &cpu->arch.idt[num], num, lo, hi);
441} 520}
442 521
443/* The default entry for each interrupt points into the Switcher routines which 522/*
523 * The default entry for each interrupt points into the Switcher routines which
444 * simply return to the Host. The run_guest() loop will then call 524 * simply return to the Host. The run_guest() loop will then call
445 * deliver_trap() to bounce it back into the Guest. */ 525 * deliver_trap() to bounce it back into the Guest.
526 */
446static void default_idt_entry(struct desc_struct *idt, 527static void default_idt_entry(struct desc_struct *idt,
447 int trap, 528 int trap,
448 const unsigned long handler, 529 const unsigned long handler,
@@ -451,13 +532,17 @@ static void default_idt_entry(struct desc_struct *idt,
451 /* A present interrupt gate. */ 532 /* A present interrupt gate. */
452 u32 flags = 0x8e00; 533 u32 flags = 0x8e00;
453 534
454 /* Set the privilege level on the entry for the hypercall: this allows 535 /*
455 * the Guest to use the "int" instruction to trigger it. */ 536 * Set the privilege level on the entry for the hypercall: this allows
537 * the Guest to use the "int" instruction to trigger it.
538 */
456 if (trap == LGUEST_TRAP_ENTRY) 539 if (trap == LGUEST_TRAP_ENTRY)
457 flags |= (GUEST_PL << 13); 540 flags |= (GUEST_PL << 13);
458 else if (base) 541 else if (base)
459 /* Copy priv. level from what Guest asked for. This allows 542 /*
460 * debug (int 3) traps from Guest userspace, for example. */ 543 * Copy privilege level from what Guest asked for. This allows
544 * debug (int 3) traps from Guest userspace, for example.
545 */
461 flags |= (base->b & 0x6000); 546 flags |= (base->b & 0x6000);
462 547
463 /* Now pack it into the IDT entry in its weird format. */ 548 /* Now pack it into the IDT entry in its weird format. */
@@ -475,16 +560,20 @@ void setup_default_idt_entries(struct lguest_ro_state *state,
475 default_idt_entry(&state->guest_idt[i], i, def[i], NULL); 560 default_idt_entry(&state->guest_idt[i], i, def[i], NULL);
476} 561}
477 562
478/*H:240 We don't use the IDT entries in the "struct lguest" directly, instead 563/*H:240
564 * We don't use the IDT entries in the "struct lguest" directly, instead
479 * we copy them into the IDT which we've set up for Guests on this CPU, just 565 * we copy them into the IDT which we've set up for Guests on this CPU, just
480 * before we run the Guest. This routine does that copy. */ 566 * before we run the Guest. This routine does that copy.
567 */
481void copy_traps(const struct lg_cpu *cpu, struct desc_struct *idt, 568void copy_traps(const struct lg_cpu *cpu, struct desc_struct *idt,
482 const unsigned long *def) 569 const unsigned long *def)
483{ 570{
484 unsigned int i; 571 unsigned int i;
485 572
486 /* We can simply copy the direct traps, otherwise we use the default 573 /*
487 * ones in the Switcher: they will return to the Host. */ 574 * We can simply copy the direct traps, otherwise we use the default
575 * ones in the Switcher: they will return to the Host.
576 */
488 for (i = 0; i < ARRAY_SIZE(cpu->arch.idt); i++) { 577 for (i = 0; i < ARRAY_SIZE(cpu->arch.idt); i++) {
489 const struct desc_struct *gidt = &cpu->arch.idt[i]; 578 const struct desc_struct *gidt = &cpu->arch.idt[i];
490 579
@@ -492,14 +581,16 @@ void copy_traps(const struct lg_cpu *cpu, struct desc_struct *idt,
492 if (!direct_trap(i)) 581 if (!direct_trap(i))
493 continue; 582 continue;
494 583
495 /* Only trap gates (type 15) can go direct to the Guest. 584 /*
585 * Only trap gates (type 15) can go direct to the Guest.
496 * Interrupt gates (type 14) disable interrupts as they are 586 * Interrupt gates (type 14) disable interrupts as they are
497 * entered, which we never let the Guest do. Not present 587 * entered, which we never let the Guest do. Not present
498 * entries (type 0x0) also can't go direct, of course. 588 * entries (type 0x0) also can't go direct, of course.
499 * 589 *
500 * If it can't go direct, we still need to copy the priv. level: 590 * If it can't go direct, we still need to copy the priv. level:
501 * they might want to give userspace access to a software 591 * they might want to give userspace access to a software
502 * interrupt. */ 592 * interrupt.
593 */
503 if (idt_type(gidt->a, gidt->b) == 0xF) 594 if (idt_type(gidt->a, gidt->b) == 0xF)
504 idt[i] = *gidt; 595 idt[i] = *gidt;
505 else 596 else
@@ -518,7 +609,8 @@ void copy_traps(const struct lg_cpu *cpu, struct desc_struct *idt,
518 * the next timer interrupt (in nanoseconds). We use the high-resolution timer 609 * the next timer interrupt (in nanoseconds). We use the high-resolution timer
519 * infrastructure to set a callback at that time. 610 * infrastructure to set a callback at that time.
520 * 611 *
521 * 0 means "turn off the clock". */ 612 * 0 means "turn off the clock".
613 */
522void guest_set_clockevent(struct lg_cpu *cpu, unsigned long delta) 614void guest_set_clockevent(struct lg_cpu *cpu, unsigned long delta)
523{ 615{
524 ktime_t expires; 616 ktime_t expires;
@@ -529,9 +621,11 @@ void guest_set_clockevent(struct lg_cpu *cpu, unsigned long delta)
529 return; 621 return;
530 } 622 }
531 623
532 /* We use wallclock time here, so the Guest might not be running for 624 /*
625 * We use wallclock time here, so the Guest might not be running for
533 * all the time between now and the timer interrupt it asked for. This 626 * all the time between now and the timer interrupt it asked for. This
534 * is almost always the right thing to do. */ 627 * is almost always the right thing to do.
628 */
535 expires = ktime_add_ns(ktime_get_real(), delta); 629 expires = ktime_add_ns(ktime_get_real(), delta);
536 hrtimer_start(&cpu->hrt, expires, HRTIMER_MODE_ABS); 630 hrtimer_start(&cpu->hrt, expires, HRTIMER_MODE_ABS);
537} 631}
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h
index 01c59192379..bc28745d05a 100644
--- a/drivers/lguest/lg.h
+++ b/drivers/lguest/lg.h
@@ -16,15 +16,13 @@
16void free_pagetables(void); 16void free_pagetables(void);
17int init_pagetables(struct page **switcher_page, unsigned int pages); 17int init_pagetables(struct page **switcher_page, unsigned int pages);
18 18
19struct pgdir 19struct pgdir {
20{
21 unsigned long gpgdir; 20 unsigned long gpgdir;
22 pgd_t *pgdir; 21 pgd_t *pgdir;
23}; 22};
24 23
25/* We have two pages shared with guests, per cpu. */ 24/* We have two pages shared with guests, per cpu. */
26struct lguest_pages 25struct lguest_pages {
27{
28 /* This is the stack page mapped rw in guest */ 26 /* This is the stack page mapped rw in guest */
29 char spare[PAGE_SIZE - sizeof(struct lguest_regs)]; 27 char spare[PAGE_SIZE - sizeof(struct lguest_regs)];
30 struct lguest_regs regs; 28 struct lguest_regs regs;
@@ -54,13 +52,13 @@ struct lg_cpu {
54 52
55 unsigned long pending_notify; /* pfn from LHCALL_NOTIFY */ 53 unsigned long pending_notify; /* pfn from LHCALL_NOTIFY */
56 54
57 /* At end of a page shared mapped over lguest_pages in guest. */ 55 /* At end of a page shared mapped over lguest_pages in guest. */
58 unsigned long regs_page; 56 unsigned long regs_page;
59 struct lguest_regs *regs; 57 struct lguest_regs *regs;
60 58
61 struct lguest_pages *last_pages; 59 struct lguest_pages *last_pages;
62 60
63 int cpu_pgd; /* which pgd this cpu is currently using */ 61 int cpu_pgd; /* Which pgd this cpu is currently using */
64 62
65 /* If a hypercall was asked for, this points to the arguments. */ 63 /* If a hypercall was asked for, this points to the arguments. */
66 struct hcall_args *hcall; 64 struct hcall_args *hcall;
@@ -89,15 +87,17 @@ struct lg_eventfd_map {
89}; 87};
90 88
91/* The private info the thread maintains about the guest. */ 89/* The private info the thread maintains about the guest. */
92struct lguest 90struct lguest {
93{
94 struct lguest_data __user *lguest_data; 91 struct lguest_data __user *lguest_data;
95 struct lg_cpu cpus[NR_CPUS]; 92 struct lg_cpu cpus[NR_CPUS];
96 unsigned int nr_cpus; 93 unsigned int nr_cpus;
97 94
98 u32 pfn_limit; 95 u32 pfn_limit;
99 /* This provides the offset to the base of guest-physical 96
100 * memory in the Launcher. */ 97 /*
98 * This provides the offset to the base of guest-physical memory in the
99 * Launcher.
100 */
101 void __user *mem_base; 101 void __user *mem_base;
102 unsigned long kernel_address; 102 unsigned long kernel_address;
103 103
@@ -122,11 +122,13 @@ bool lguest_address_ok(const struct lguest *lg,
122void __lgread(struct lg_cpu *, void *, unsigned long, unsigned); 122void __lgread(struct lg_cpu *, void *, unsigned long, unsigned);
123void __lgwrite(struct lg_cpu *, unsigned long, const void *, unsigned); 123void __lgwrite(struct lg_cpu *, unsigned long, const void *, unsigned);
124 124
125/*H:035 Using memory-copy operations like that is usually inconvient, so we 125/*H:035
126 * Using memory-copy operations like that is usually inconvient, so we
126 * have the following helper macros which read and write a specific type (often 127 * have the following helper macros which read and write a specific type (often
127 * an unsigned long). 128 * an unsigned long).
128 * 129 *
129 * This reads into a variable of the given type then returns that. */ 130 * This reads into a variable of the given type then returns that.
131 */
130#define lgread(cpu, addr, type) \ 132#define lgread(cpu, addr, type) \
131 ({ type _v; __lgread((cpu), &_v, (addr), sizeof(_v)); _v; }) 133 ({ type _v; __lgread((cpu), &_v, (addr), sizeof(_v)); _v; })
132 134
@@ -140,9 +142,11 @@ void __lgwrite(struct lg_cpu *, unsigned long, const void *, unsigned);
140 142
141int run_guest(struct lg_cpu *cpu, unsigned long __user *user); 143int run_guest(struct lg_cpu *cpu, unsigned long __user *user);
142 144
143/* Helper macros to obtain the first 12 or the last 20 bits, this is only the 145/*
146 * Helper macros to obtain the first 12 or the last 20 bits, this is only the
144 * first step in the migration to the kernel types. pte_pfn is already defined 147 * first step in the migration to the kernel types. pte_pfn is already defined
145 * in the kernel. */ 148 * in the kernel.
149 */
146#define pgd_flags(x) (pgd_val(x) & ~PAGE_MASK) 150#define pgd_flags(x) (pgd_val(x) & ~PAGE_MASK)
147#define pgd_pfn(x) (pgd_val(x) >> PAGE_SHIFT) 151#define pgd_pfn(x) (pgd_val(x) >> PAGE_SHIFT)
148#define pmd_flags(x) (pmd_val(x) & ~PAGE_MASK) 152#define pmd_flags(x) (pmd_val(x) & ~PAGE_MASK)
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c
index e082cdac88b..b6200bc39b5 100644
--- a/drivers/lguest/lguest_device.c
+++ b/drivers/lguest/lguest_device.c
@@ -1,10 +1,12 @@
1/*P:050 Lguest guests use a very simple method to describe devices. It's a 1/*P:050
2 * Lguest guests use a very simple method to describe devices. It's a
2 * series of device descriptors contained just above the top of normal Guest 3 * series of device descriptors contained just above the top of normal Guest
3 * memory. 4 * memory.
4 * 5 *
5 * We use the standard "virtio" device infrastructure, which provides us with a 6 * We use the standard "virtio" device infrastructure, which provides us with a
6 * console, a network and a block driver. Each one expects some configuration 7 * console, a network and a block driver. Each one expects some configuration
7 * information and a "virtqueue" or two to send and receive data. :*/ 8 * information and a "virtqueue" or two to send and receive data.
9:*/
8#include <linux/init.h> 10#include <linux/init.h>
9#include <linux/bootmem.h> 11#include <linux/bootmem.h>
10#include <linux/lguest_launcher.h> 12#include <linux/lguest_launcher.h>
@@ -20,8 +22,10 @@
20/* The pointer to our (page) of device descriptions. */ 22/* The pointer to our (page) of device descriptions. */
21static void *lguest_devices; 23static void *lguest_devices;
22 24
23/* For Guests, device memory can be used as normal memory, so we cast away the 25/*
24 * __iomem to quieten sparse. */ 26 * For Guests, device memory can be used as normal memory, so we cast away the
27 * __iomem to quieten sparse.
28 */
25static inline void *lguest_map(unsigned long phys_addr, unsigned long pages) 29static inline void *lguest_map(unsigned long phys_addr, unsigned long pages)
26{ 30{
27 return (__force void *)ioremap_cache(phys_addr, PAGE_SIZE*pages); 31 return (__force void *)ioremap_cache(phys_addr, PAGE_SIZE*pages);
@@ -32,8 +36,10 @@ static inline void lguest_unmap(void *addr)
32 iounmap((__force void __iomem *)addr); 36 iounmap((__force void __iomem *)addr);
33} 37}
34 38
35/*D:100 Each lguest device is just a virtio device plus a pointer to its entry 39/*D:100
36 * in the lguest_devices page. */ 40 * Each lguest device is just a virtio device plus a pointer to its entry
41 * in the lguest_devices page.
42 */
37struct lguest_device { 43struct lguest_device {
38 struct virtio_device vdev; 44 struct virtio_device vdev;
39 45
@@ -41,9 +47,11 @@ struct lguest_device {
41 struct lguest_device_desc *desc; 47 struct lguest_device_desc *desc;
42}; 48};
43 49
44/* Since the virtio infrastructure hands us a pointer to the virtio_device all 50/*
51 * Since the virtio infrastructure hands us a pointer to the virtio_device all
45 * the time, it helps to have a curt macro to get a pointer to the struct 52 * the time, it helps to have a curt macro to get a pointer to the struct
46 * lguest_device it's enclosed in. */ 53 * lguest_device it's enclosed in.
54 */
47#define to_lgdev(vd) container_of(vd, struct lguest_device, vdev) 55#define to_lgdev(vd) container_of(vd, struct lguest_device, vdev)
48 56
49/*D:130 57/*D:130
@@ -55,7 +63,8 @@ struct lguest_device {
55 * the driver will look at them during setup. 63 * the driver will look at them during setup.
56 * 64 *
57 * A convenient routine to return the device's virtqueue config array: 65 * A convenient routine to return the device's virtqueue config array:
58 * immediately after the descriptor. */ 66 * immediately after the descriptor.
67 */
59static struct lguest_vqconfig *lg_vq(const struct lguest_device_desc *desc) 68static struct lguest_vqconfig *lg_vq(const struct lguest_device_desc *desc)
60{ 69{
61 return (void *)(desc + 1); 70 return (void *)(desc + 1);
@@ -98,10 +107,12 @@ static u32 lg_get_features(struct virtio_device *vdev)
98 return features; 107 return features;
99} 108}
100 109
101/* The virtio core takes the features the Host offers, and copies the 110/*
102 * ones supported by the driver into the vdev->features array. Once 111 * The virtio core takes the features the Host offers, and copies the ones
103 * that's all sorted out, this routine is called so we can tell the 112 * supported by the driver into the vdev->features array. Once that's all
104 * Host which features we understand and accept. */ 113 * sorted out, this routine is called so we can tell the Host which features we
114 * understand and accept.
115 */
105static void lg_finalize_features(struct virtio_device *vdev) 116static void lg_finalize_features(struct virtio_device *vdev)
106{ 117{
107 unsigned int i, bits; 118 unsigned int i, bits;
@@ -112,10 +123,11 @@ static void lg_finalize_features(struct virtio_device *vdev)
112 /* Give virtio_ring a chance to accept features. */ 123 /* Give virtio_ring a chance to accept features. */
113 vring_transport_features(vdev); 124 vring_transport_features(vdev);
114 125
115 /* The vdev->feature array is a Linux bitmask: this isn't the 126 /*
116 * same as a the simple array of bits used by lguest devices 127 * The vdev->feature array is a Linux bitmask: this isn't the same as a
117 * for features. So we do this slow, manual conversion which is 128 * the simple array of bits used by lguest devices for features. So we
118 * completely general. */ 129 * do this slow, manual conversion which is completely general.
130 */
119 memset(out_features, 0, desc->feature_len); 131 memset(out_features, 0, desc->feature_len);
120 bits = min_t(unsigned, desc->feature_len, sizeof(vdev->features)) * 8; 132 bits = min_t(unsigned, desc->feature_len, sizeof(vdev->features)) * 8;
121 for (i = 0; i < bits; i++) { 133 for (i = 0; i < bits; i++) {
@@ -146,15 +158,19 @@ static void lg_set(struct virtio_device *vdev, unsigned int offset,
146 memcpy(lg_config(desc) + offset, buf, len); 158 memcpy(lg_config(desc) + offset, buf, len);
147} 159}
148 160
149/* The operations to get and set the status word just access the status field 161/*
150 * of the device descriptor. */ 162 * The operations to get and set the status word just access the status field
163 * of the device descriptor.
164 */
151static u8 lg_get_status(struct virtio_device *vdev) 165static u8 lg_get_status(struct virtio_device *vdev)
152{ 166{
153 return to_lgdev(vdev)->desc->status; 167 return to_lgdev(vdev)->desc->status;
154} 168}
155 169
156/* To notify on status updates, we (ab)use the NOTIFY hypercall, with the 170/*
157 * descriptor address of the device. A zero status means "reset". */ 171 * To notify on status updates, we (ab)use the NOTIFY hypercall, with the
172 * descriptor address of the device. A zero status means "reset".
173 */
158static void set_status(struct virtio_device *vdev, u8 status) 174static void set_status(struct virtio_device *vdev, u8 status)
159{ 175{
160 unsigned long offset = (void *)to_lgdev(vdev)->desc - lguest_devices; 176 unsigned long offset = (void *)to_lgdev(vdev)->desc - lguest_devices;
@@ -191,8 +207,7 @@ static void lg_reset(struct virtio_device *vdev)
191 */ 207 */
192 208
193/*D:140 This is the information we remember about each virtqueue. */ 209/*D:140 This is the information we remember about each virtqueue. */
194struct lguest_vq_info 210struct lguest_vq_info {
195{
196 /* A copy of the information contained in the device config. */ 211 /* A copy of the information contained in the device config. */
197 struct lguest_vqconfig config; 212 struct lguest_vqconfig config;
198 213
@@ -200,13 +215,17 @@ struct lguest_vq_info
200 void *pages; 215 void *pages;
201}; 216};
202 217
203/* When the virtio_ring code wants to prod the Host, it calls us here and we 218/*
219 * When the virtio_ring code wants to prod the Host, it calls us here and we
204 * make a hypercall. We hand the physical address of the virtqueue so the Host 220 * make a hypercall. We hand the physical address of the virtqueue so the Host
205 * knows which virtqueue we're talking about. */ 221 * knows which virtqueue we're talking about.
222 */
206static void lg_notify(struct virtqueue *vq) 223static void lg_notify(struct virtqueue *vq)
207{ 224{
208 /* We store our virtqueue information in the "priv" pointer of the 225 /*
209 * virtqueue structure. */ 226 * We store our virtqueue information in the "priv" pointer of the
227 * virtqueue structure.
228 */
210 struct lguest_vq_info *lvq = vq->priv; 229 struct lguest_vq_info *lvq = vq->priv;
211 230
212 kvm_hypercall1(LHCALL_NOTIFY, lvq->config.pfn << PAGE_SHIFT); 231 kvm_hypercall1(LHCALL_NOTIFY, lvq->config.pfn << PAGE_SHIFT);
@@ -215,7 +234,8 @@ static void lg_notify(struct virtqueue *vq)
215/* An extern declaration inside a C file is bad form. Don't do it. */ 234/* An extern declaration inside a C file is bad form. Don't do it. */
216extern void lguest_setup_irq(unsigned int irq); 235extern void lguest_setup_irq(unsigned int irq);
217 236
218/* This routine finds the first virtqueue described in the configuration of 237/*
238 * This routine finds the Nth virtqueue described in the configuration of
219 * this device and sets it up. 239 * this device and sets it up.
220 * 240 *
221 * This is kind of an ugly duckling. It'd be nicer to have a standard 241 * This is kind of an ugly duckling. It'd be nicer to have a standard
@@ -223,9 +243,7 @@ extern void lguest_setup_irq(unsigned int irq);
223 * everyone wants to do it differently. The KVM coders want the Guest to 243 * everyone wants to do it differently. The KVM coders want the Guest to
224 * allocate its own pages and tell the Host where they are, but for lguest it's 244 * allocate its own pages and tell the Host where they are, but for lguest it's
225 * simpler for the Host to simply tell us where the pages are. 245 * simpler for the Host to simply tell us where the pages are.
226 * 246 */
227 * So we provide drivers with a "find the Nth virtqueue and set it up"
228 * function. */
229static struct virtqueue *lg_find_vq(struct virtio_device *vdev, 247static struct virtqueue *lg_find_vq(struct virtio_device *vdev,
230 unsigned index, 248 unsigned index,
231 void (*callback)(struct virtqueue *vq), 249 void (*callback)(struct virtqueue *vq),
@@ -244,9 +262,11 @@ static struct virtqueue *lg_find_vq(struct virtio_device *vdev,
244 if (!lvq) 262 if (!lvq)
245 return ERR_PTR(-ENOMEM); 263 return ERR_PTR(-ENOMEM);
246 264
247 /* Make a copy of the "struct lguest_vqconfig" entry, which sits after 265 /*
266 * Make a copy of the "struct lguest_vqconfig" entry, which sits after
248 * the descriptor. We need a copy because the config space might not 267 * the descriptor. We need a copy because the config space might not
249 * be aligned correctly. */ 268 * be aligned correctly.
269 */
250 memcpy(&lvq->config, lg_vq(ldev->desc)+index, sizeof(lvq->config)); 270 memcpy(&lvq->config, lg_vq(ldev->desc)+index, sizeof(lvq->config));
251 271
252 printk("Mapping virtqueue %i addr %lx\n", index, 272 printk("Mapping virtqueue %i addr %lx\n", index,
@@ -261,8 +281,10 @@ static struct virtqueue *lg_find_vq(struct virtio_device *vdev,
261 goto free_lvq; 281 goto free_lvq;
262 } 282 }
263 283
264 /* OK, tell virtio_ring.c to set up a virtqueue now we know its size 284 /*
265 * and we've got a pointer to its pages. */ 285 * OK, tell virtio_ring.c to set up a virtqueue now we know its size
286 * and we've got a pointer to its pages.
287 */
266 vq = vring_new_virtqueue(lvq->config.num, LGUEST_VRING_ALIGN, 288 vq = vring_new_virtqueue(lvq->config.num, LGUEST_VRING_ALIGN,
267 vdev, lvq->pages, lg_notify, callback, name); 289 vdev, lvq->pages, lg_notify, callback, name);
268 if (!vq) { 290 if (!vq) {
@@ -273,18 +295,23 @@ static struct virtqueue *lg_find_vq(struct virtio_device *vdev,
273 /* Make sure the interrupt is allocated. */ 295 /* Make sure the interrupt is allocated. */
274 lguest_setup_irq(lvq->config.irq); 296 lguest_setup_irq(lvq->config.irq);
275 297
276 /* Tell the interrupt for this virtqueue to go to the virtio_ring 298 /*
277 * interrupt handler. */ 299 * Tell the interrupt for this virtqueue to go to the virtio_ring
278 /* FIXME: We used to have a flag for the Host to tell us we could use 300 * interrupt handler.
301 *
302 * FIXME: We used to have a flag for the Host to tell us we could use
279 * the interrupt as a source of randomness: it'd be nice to have that 303 * the interrupt as a source of randomness: it'd be nice to have that
280 * back.. */ 304 * back.
305 */
281 err = request_irq(lvq->config.irq, vring_interrupt, IRQF_SHARED, 306 err = request_irq(lvq->config.irq, vring_interrupt, IRQF_SHARED,
282 dev_name(&vdev->dev), vq); 307 dev_name(&vdev->dev), vq);
283 if (err) 308 if (err)
284 goto destroy_vring; 309 goto destroy_vring;
285 310
286 /* Last of all we hook up our 'struct lguest_vq_info" to the 311 /*
287 * virtqueue's priv pointer. */ 312 * Last of all we hook up our 'struct lguest_vq_info" to the
313 * virtqueue's priv pointer.
314 */
288 vq->priv = lvq; 315 vq->priv = lvq;
289 return vq; 316 return vq;
290 317
@@ -358,11 +385,14 @@ static struct virtio_config_ops lguest_config_ops = {
358 .del_vqs = lg_del_vqs, 385 .del_vqs = lg_del_vqs,
359}; 386};
360 387
361/* The root device for the lguest virtio devices. This makes them appear as 388/*
362 * /sys/devices/lguest/0,1,2 not /sys/devices/0,1,2. */ 389 * The root device for the lguest virtio devices. This makes them appear as
390 * /sys/devices/lguest/0,1,2 not /sys/devices/0,1,2.
391 */
363static struct device *lguest_root; 392static struct device *lguest_root;
364 393
365/*D:120 This is the core of the lguest bus: actually adding a new device. 394/*D:120
395 * This is the core of the lguest bus: actually adding a new device.
366 * It's a separate function because it's neater that way, and because an 396 * It's a separate function because it's neater that way, and because an
367 * earlier version of the code supported hotplug and unplug. They were removed 397 * earlier version of the code supported hotplug and unplug. They were removed
368 * early on because they were never used. 398 * early on because they were never used.
@@ -371,14 +401,14 @@ static struct device *lguest_root;
371 * 401 *
372 * It's worth reading this carefully: we start with a pointer to the new device 402 * It's worth reading this carefully: we start with a pointer to the new device
373 * descriptor in the "lguest_devices" page, and the offset into the device 403 * descriptor in the "lguest_devices" page, and the offset into the device
374 * descriptor page so we can uniquely identify it if things go badly wrong. */ 404 * descriptor page so we can uniquely identify it if things go badly wrong.
405 */
375static void add_lguest_device(struct lguest_device_desc *d, 406static void add_lguest_device(struct lguest_device_desc *d,
376 unsigned int offset) 407 unsigned int offset)
377{ 408{
378 struct lguest_device *ldev; 409 struct lguest_device *ldev;
379 410
380 /* Start with zeroed memory; Linux's device layer seems to count on 411 /* Start with zeroed memory; Linux's device layer counts on it. */
381 * it. */
382 ldev = kzalloc(sizeof(*ldev), GFP_KERNEL); 412 ldev = kzalloc(sizeof(*ldev), GFP_KERNEL);
383 if (!ldev) { 413 if (!ldev) {
384 printk(KERN_EMERG "Cannot allocate lguest dev %u type %u\n", 414 printk(KERN_EMERG "Cannot allocate lguest dev %u type %u\n",
@@ -388,17 +418,25 @@ static void add_lguest_device(struct lguest_device_desc *d,
388 418
389 /* This devices' parent is the lguest/ dir. */ 419 /* This devices' parent is the lguest/ dir. */
390 ldev->vdev.dev.parent = lguest_root; 420 ldev->vdev.dev.parent = lguest_root;
391 /* We have a unique device index thanks to the dev_index counter. */ 421 /*
422 * The device type comes straight from the descriptor. There's also a
423 * device vendor field in the virtio_device struct, which we leave as
424 * 0.
425 */
392 ldev->vdev.id.device = d->type; 426 ldev->vdev.id.device = d->type;
393 /* We have a simple set of routines for querying the device's 427 /*
394 * configuration information and setting its status. */ 428 * We have a simple set of routines for querying the device's
429 * configuration information and setting its status.
430 */
395 ldev->vdev.config = &lguest_config_ops; 431 ldev->vdev.config = &lguest_config_ops;
396 /* And we remember the device's descriptor for lguest_config_ops. */ 432 /* And we remember the device's descriptor for lguest_config_ops. */
397 ldev->desc = d; 433 ldev->desc = d;
398 434
399 /* register_virtio_device() sets up the generic fields for the struct 435 /*
436 * register_virtio_device() sets up the generic fields for the struct
400 * virtio_device and calls device_register(). This makes the bus 437 * virtio_device and calls device_register(). This makes the bus
401 * infrastructure look for a matching driver. */ 438 * infrastructure look for a matching driver.
439 */
402 if (register_virtio_device(&ldev->vdev) != 0) { 440 if (register_virtio_device(&ldev->vdev) != 0) {
403 printk(KERN_ERR "Failed to register lguest dev %u type %u\n", 441 printk(KERN_ERR "Failed to register lguest dev %u type %u\n",
404 offset, d->type); 442 offset, d->type);
@@ -406,8 +444,10 @@ static void add_lguest_device(struct lguest_device_desc *d,
406 } 444 }
407} 445}
408 446
409/*D:110 scan_devices() simply iterates through the device page. The type 0 is 447/*D:110
410 * reserved to mean "end of devices". */ 448 * scan_devices() simply iterates through the device page. The type 0 is
449 * reserved to mean "end of devices".
450 */
411static void scan_devices(void) 451static void scan_devices(void)
412{ 452{
413 unsigned int i; 453 unsigned int i;
@@ -426,7 +466,8 @@ static void scan_devices(void)
426 } 466 }
427} 467}
428 468
429/*D:105 Fairly early in boot, lguest_devices_init() is called to set up the 469/*D:105
470 * Fairly early in boot, lguest_devices_init() is called to set up the
430 * lguest device infrastructure. We check that we are a Guest by checking 471 * lguest device infrastructure. We check that we are a Guest by checking
431 * pv_info.name: there are other ways of checking, but this seems most 472 * pv_info.name: there are other ways of checking, but this seems most
432 * obvious to me. 473 * obvious to me.
@@ -437,7 +478,8 @@ static void scan_devices(void)
437 * correct sysfs incantation). 478 * correct sysfs incantation).
438 * 479 *
439 * Finally we call scan_devices() which adds all the devices found in the 480 * Finally we call scan_devices() which adds all the devices found in the
440 * lguest_devices page. */ 481 * lguest_devices page.
482 */
441static int __init lguest_devices_init(void) 483static int __init lguest_devices_init(void)
442{ 484{
443 if (strcmp(pv_info.name, "lguest") != 0) 485 if (strcmp(pv_info.name, "lguest") != 0)
@@ -456,11 +498,13 @@ static int __init lguest_devices_init(void)
456/* We do this after core stuff, but before the drivers. */ 498/* We do this after core stuff, but before the drivers. */
457postcore_initcall(lguest_devices_init); 499postcore_initcall(lguest_devices_init);
458 500
459/*D:150 At this point in the journey we used to now wade through the lguest 501/*D:150
502 * At this point in the journey we used to now wade through the lguest
460 * devices themselves: net, block and console. Since they're all now virtio 503 * devices themselves: net, block and console. Since they're all now virtio
461 * devices rather than lguest-specific, I've decided to ignore them. Mostly, 504 * devices rather than lguest-specific, I've decided to ignore them. Mostly,
462 * they're kind of boring. But this does mean you'll never experience the 505 * they're kind of boring. But this does mean you'll never experience the
463 * thrill of reading the forbidden love scene buried deep in the block driver. 506 * thrill of reading the forbidden love scene buried deep in the block driver.
464 * 507 *
465 * "make Launcher" beckons, where we answer questions like "Where do Guests 508 * "make Launcher" beckons, where we answer questions like "Where do Guests
466 * come from?", and "What do you do when someone asks for optimization?". */ 509 * come from?", and "What do you do when someone asks for optimization?".
510 */
diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c
index 9f9a2953b38..b4d3f7ca554 100644
--- a/drivers/lguest/lguest_user.c
+++ b/drivers/lguest/lguest_user.c
@@ -1,8 +1,9 @@
1/*P:200 This contains all the /dev/lguest code, whereby the userspace launcher 1/*P:200 This contains all the /dev/lguest code, whereby the userspace launcher
2 * controls and communicates with the Guest. For example, the first write will 2 * controls and communicates with the Guest. For example, the first write will
3 * tell us the Guest's memory layout, pagetable, entry point and kernel address 3 * tell us the Guest's memory layout and entry point. A read will run the
4 * offset. A read will run the Guest until something happens, such as a signal 4 * Guest until something happens, such as a signal or the Guest doing a NOTIFY
5 * or the Guest doing a NOTIFY out to the Launcher. :*/ 5 * out to the Launcher.
6:*/
6#include <linux/uaccess.h> 7#include <linux/uaccess.h>
7#include <linux/miscdevice.h> 8#include <linux/miscdevice.h>
8#include <linux/fs.h> 9#include <linux/fs.h>
@@ -11,14 +12,41 @@
11#include <linux/file.h> 12#include <linux/file.h>
12#include "lg.h" 13#include "lg.h"
13 14
15/*L:056
16 * Before we move on, let's jump ahead and look at what the kernel does when
17 * it needs to look up the eventfds. That will complete our picture of how we
18 * use RCU.
19 *
20 * The notification value is in cpu->pending_notify: we return true if it went
21 * to an eventfd.
22 */
14bool send_notify_to_eventfd(struct lg_cpu *cpu) 23bool send_notify_to_eventfd(struct lg_cpu *cpu)
15{ 24{
16 unsigned int i; 25 unsigned int i;
17 struct lg_eventfd_map *map; 26 struct lg_eventfd_map *map;
18 27
19 /* lg->eventfds is RCU-protected */ 28 /*
29 * This "rcu_read_lock()" helps track when someone is still looking at
30 * the (RCU-using) eventfds array. It's not actually a lock at all;
31 * indeed it's a noop in many configurations. (You didn't expect me to
32 * explain all the RCU secrets here, did you?)
33 */
20 rcu_read_lock(); 34 rcu_read_lock();
35 /*
36 * rcu_dereference is the counter-side of rcu_assign_pointer(); it
37 * makes sure we don't access the memory pointed to by
38 * cpu->lg->eventfds before cpu->lg->eventfds is set. Sounds crazy,
39 * but Alpha allows this! Paul McKenney points out that a really
40 * aggressive compiler could have the same effect:
41 * http://lists.ozlabs.org/pipermail/lguest/2009-July/001560.html
42 *
43 * So play safe, use rcu_dereference to get the rcu-protected pointer:
44 */
21 map = rcu_dereference(cpu->lg->eventfds); 45 map = rcu_dereference(cpu->lg->eventfds);
46 /*
47 * Simple array search: even if they add an eventfd while we do this,
48 * we'll continue to use the old array and just won't see the new one.
49 */
22 for (i = 0; i < map->num; i++) { 50 for (i = 0; i < map->num; i++) {
23 if (map->map[i].addr == cpu->pending_notify) { 51 if (map->map[i].addr == cpu->pending_notify) {
24 eventfd_signal(map->map[i].event, 1); 52 eventfd_signal(map->map[i].event, 1);
@@ -26,19 +54,50 @@ bool send_notify_to_eventfd(struct lg_cpu *cpu)
26 break; 54 break;
27 } 55 }
28 } 56 }
57 /* We're done with the rcu-protected variable cpu->lg->eventfds. */
29 rcu_read_unlock(); 58 rcu_read_unlock();
59
60 /* If we cleared the notification, it's because we found a match. */
30 return cpu->pending_notify == 0; 61 return cpu->pending_notify == 0;
31} 62}
32 63
64/*L:055
65 * One of the more tricksy tricks in the Linux Kernel is a technique called
66 * Read Copy Update. Since one point of lguest is to teach lguest journeyers
67 * about kernel coding, I use it here. (In case you're curious, other purposes
68 * include learning about virtualization and instilling a deep appreciation for
69 * simplicity and puppies).
70 *
71 * We keep a simple array which maps LHCALL_NOTIFY values to eventfds, but we
72 * add new eventfds without ever blocking readers from accessing the array.
73 * The current Launcher only does this during boot, so that never happens. But
74 * Read Copy Update is cool, and adding a lock risks damaging even more puppies
75 * than this code does.
76 *
77 * We allocate a brand new one-larger array, copy the old one and add our new
78 * element. Then we make the lg eventfd pointer point to the new array.
79 * That's the easy part: now we need to free the old one, but we need to make
80 * sure no slow CPU somewhere is still looking at it. That's what
81 * synchronize_rcu does for us: waits until every CPU has indicated that it has
82 * moved on to know it's no longer using the old one.
83 *
84 * If that's unclear, see http://en.wikipedia.org/wiki/Read-copy-update.
85 */
33static int add_eventfd(struct lguest *lg, unsigned long addr, int fd) 86static int add_eventfd(struct lguest *lg, unsigned long addr, int fd)
34{ 87{
35 struct lg_eventfd_map *new, *old = lg->eventfds; 88 struct lg_eventfd_map *new, *old = lg->eventfds;
36 89
90 /*
91 * We don't allow notifications on value 0 anyway (pending_notify of
92 * 0 means "nothing pending").
93 */
37 if (!addr) 94 if (!addr)
38 return -EINVAL; 95 return -EINVAL;
39 96
40 /* Replace the old array with the new one, carefully: others can 97 /*
41 * be accessing it at the same time */ 98 * Replace the old array with the new one, carefully: others can
99 * be accessing it at the same time.
100 */
42 new = kmalloc(sizeof(*new) + sizeof(new->map[0]) * (old->num + 1), 101 new = kmalloc(sizeof(*new) + sizeof(new->map[0]) * (old->num + 1),
43 GFP_KERNEL); 102 GFP_KERNEL);
44 if (!new) 103 if (!new)
@@ -52,22 +111,41 @@ static int add_eventfd(struct lguest *lg, unsigned long addr, int fd)
52 new->map[new->num].addr = addr; 111 new->map[new->num].addr = addr;
53 new->map[new->num].event = eventfd_ctx_fdget(fd); 112 new->map[new->num].event = eventfd_ctx_fdget(fd);
54 if (IS_ERR(new->map[new->num].event)) { 113 if (IS_ERR(new->map[new->num].event)) {
114 int err = PTR_ERR(new->map[new->num].event);
55 kfree(new); 115 kfree(new);
56 return PTR_ERR(new->map[new->num].event); 116 return err;
57 } 117 }
58 new->num++; 118 new->num++;
59 119
60 /* Now put new one in place. */ 120 /*
121 * Now put new one in place: rcu_assign_pointer() is a fancy way of
122 * doing "lg->eventfds = new", but it uses memory barriers to make
123 * absolutely sure that the contents of "new" written above is nailed
124 * down before we actually do the assignment.
125 *
126 * We have to think about these kinds of things when we're operating on
127 * live data without locks.
128 */
61 rcu_assign_pointer(lg->eventfds, new); 129 rcu_assign_pointer(lg->eventfds, new);
62 130
63 /* We're not in a big hurry. Wait until noone's looking at old 131 /*
64 * version, then delete it. */ 132 * We're not in a big hurry. Wait until noone's looking at old
133 * version, then free it.
134 */
65 synchronize_rcu(); 135 synchronize_rcu();
66 kfree(old); 136 kfree(old);
67 137
68 return 0; 138 return 0;
69} 139}
70 140
141/*L:052
142 * Receiving notifications from the Guest is usually done by attaching a
143 * particular LHCALL_NOTIFY value to an event filedescriptor. The eventfd will
144 * become readable when the Guest does an LHCALL_NOTIFY with that value.
145 *
146 * This is really convenient for processing each virtqueue in a separate
147 * thread.
148 */
71static int attach_eventfd(struct lguest *lg, const unsigned long __user *input) 149static int attach_eventfd(struct lguest *lg, const unsigned long __user *input)
72{ 150{
73 unsigned long addr, fd; 151 unsigned long addr, fd;
@@ -79,15 +157,22 @@ static int attach_eventfd(struct lguest *lg, const unsigned long __user *input)
79 if (get_user(fd, input) != 0) 157 if (get_user(fd, input) != 0)
80 return -EFAULT; 158 return -EFAULT;
81 159
160 /*
161 * Just make sure two callers don't add eventfds at once. We really
162 * only need to lock against callers adding to the same Guest, so using
163 * the Big Lguest Lock is overkill. But this is setup, not a fast path.
164 */
82 mutex_lock(&lguest_lock); 165 mutex_lock(&lguest_lock);
83 err = add_eventfd(lg, addr, fd); 166 err = add_eventfd(lg, addr, fd);
84 mutex_unlock(&lguest_lock); 167 mutex_unlock(&lguest_lock);
85 168
86 return 0; 169 return err;
87} 170}
88 171
89/*L:050 Sending an interrupt is done by writing LHREQ_IRQ and an interrupt 172/*L:050
90 * number to /dev/lguest. */ 173 * Sending an interrupt is done by writing LHREQ_IRQ and an interrupt
174 * number to /dev/lguest.
175 */
91static int user_send_irq(struct lg_cpu *cpu, const unsigned long __user *input) 176static int user_send_irq(struct lg_cpu *cpu, const unsigned long __user *input)
92{ 177{
93 unsigned long irq; 178 unsigned long irq;
@@ -97,12 +182,18 @@ static int user_send_irq(struct lg_cpu *cpu, const unsigned long __user *input)
97 if (irq >= LGUEST_IRQS) 182 if (irq >= LGUEST_IRQS)
98 return -EINVAL; 183 return -EINVAL;
99 184
185 /*
186 * Next time the Guest runs, the core code will see if it can deliver
187 * this interrupt.
188 */
100 set_interrupt(cpu, irq); 189 set_interrupt(cpu, irq);
101 return 0; 190 return 0;
102} 191}
103 192
104/*L:040 Once our Guest is initialized, the Launcher makes it run by reading 193/*L:040
105 * from /dev/lguest. */ 194 * Once our Guest is initialized, the Launcher makes it run by reading
195 * from /dev/lguest.
196 */
106static ssize_t read(struct file *file, char __user *user, size_t size,loff_t*o) 197static ssize_t read(struct file *file, char __user *user, size_t size,loff_t*o)
107{ 198{
108 struct lguest *lg = file->private_data; 199 struct lguest *lg = file->private_data;
@@ -138,8 +229,10 @@ static ssize_t read(struct file *file, char __user *user, size_t size,loff_t*o)
138 return len; 229 return len;
139 } 230 }
140 231
141 /* If we returned from read() last time because the Guest sent I/O, 232 /*
142 * clear the flag. */ 233 * If we returned from read() last time because the Guest sent I/O,
234 * clear the flag.
235 */
143 if (cpu->pending_notify) 236 if (cpu->pending_notify)
144 cpu->pending_notify = 0; 237 cpu->pending_notify = 0;
145 238
@@ -147,8 +240,10 @@ static ssize_t read(struct file *file, char __user *user, size_t size,loff_t*o)
147 return run_guest(cpu, (unsigned long __user *)user); 240 return run_guest(cpu, (unsigned long __user *)user);
148} 241}
149 242
150/*L:025 This actually initializes a CPU. For the moment, a Guest is only 243/*L:025
151 * uniprocessor, so "id" is always 0. */ 244 * This actually initializes a CPU. For the moment, a Guest is only
245 * uniprocessor, so "id" is always 0.
246 */
152static int lg_cpu_start(struct lg_cpu *cpu, unsigned id, unsigned long start_ip) 247static int lg_cpu_start(struct lg_cpu *cpu, unsigned id, unsigned long start_ip)
153{ 248{
154 /* We have a limited number the number of CPUs in the lguest struct. */ 249 /* We have a limited number the number of CPUs in the lguest struct. */
@@ -163,8 +258,10 @@ static int lg_cpu_start(struct lg_cpu *cpu, unsigned id, unsigned long start_ip)
163 /* Each CPU has a timer it can set. */ 258 /* Each CPU has a timer it can set. */
164 init_clockdev(cpu); 259 init_clockdev(cpu);
165 260
166 /* We need a complete page for the Guest registers: they are accessible 261 /*
167 * to the Guest and we can only grant it access to whole pages. */ 262 * We need a complete page for the Guest registers: they are accessible
263 * to the Guest and we can only grant it access to whole pages.
264 */
168 cpu->regs_page = get_zeroed_page(GFP_KERNEL); 265 cpu->regs_page = get_zeroed_page(GFP_KERNEL);
169 if (!cpu->regs_page) 266 if (!cpu->regs_page)
170 return -ENOMEM; 267 return -ENOMEM;
@@ -172,29 +269,38 @@ static int lg_cpu_start(struct lg_cpu *cpu, unsigned id, unsigned long start_ip)
172 /* We actually put the registers at the bottom of the page. */ 269 /* We actually put the registers at the bottom of the page. */
173 cpu->regs = (void *)cpu->regs_page + PAGE_SIZE - sizeof(*cpu->regs); 270 cpu->regs = (void *)cpu->regs_page + PAGE_SIZE - sizeof(*cpu->regs);
174 271
175 /* Now we initialize the Guest's registers, handing it the start 272 /*
176 * address. */ 273 * Now we initialize the Guest's registers, handing it the start
274 * address.
275 */
177 lguest_arch_setup_regs(cpu, start_ip); 276 lguest_arch_setup_regs(cpu, start_ip);
178 277
179 /* We keep a pointer to the Launcher task (ie. current task) for when 278 /*
180 * other Guests want to wake this one (eg. console input). */ 279 * We keep a pointer to the Launcher task (ie. current task) for when
280 * other Guests want to wake this one (eg. console input).
281 */
181 cpu->tsk = current; 282 cpu->tsk = current;
182 283
183 /* We need to keep a pointer to the Launcher's memory map, because if 284 /*
285 * We need to keep a pointer to the Launcher's memory map, because if
184 * the Launcher dies we need to clean it up. If we don't keep a 286 * the Launcher dies we need to clean it up. If we don't keep a
185 * reference, it is destroyed before close() is called. */ 287 * reference, it is destroyed before close() is called.
288 */
186 cpu->mm = get_task_mm(cpu->tsk); 289 cpu->mm = get_task_mm(cpu->tsk);
187 290
188 /* We remember which CPU's pages this Guest used last, for optimization 291 /*
189 * when the same Guest runs on the same CPU twice. */ 292 * We remember which CPU's pages this Guest used last, for optimization
293 * when the same Guest runs on the same CPU twice.
294 */
190 cpu->last_pages = NULL; 295 cpu->last_pages = NULL;
191 296
192 /* No error == success. */ 297 /* No error == success. */
193 return 0; 298 return 0;
194} 299}
195 300
196/*L:020 The initialization write supplies 3 pointer sized (32 or 64 bit) 301/*L:020
197 * values (in addition to the LHREQ_INITIALIZE value). These are: 302 * The initialization write supplies 3 pointer sized (32 or 64 bit) values (in
303 * addition to the LHREQ_INITIALIZE value). These are:
198 * 304 *
199 * base: The start of the Guest-physical memory inside the Launcher memory. 305 * base: The start of the Guest-physical memory inside the Launcher memory.
200 * 306 *
@@ -206,14 +312,15 @@ static int lg_cpu_start(struct lg_cpu *cpu, unsigned id, unsigned long start_ip)
206 */ 312 */
207static int initialize(struct file *file, const unsigned long __user *input) 313static int initialize(struct file *file, const unsigned long __user *input)
208{ 314{
209 /* "struct lguest" contains everything we (the Host) know about a 315 /* "struct lguest" contains all we (the Host) know about a Guest. */
210 * Guest. */
211 struct lguest *lg; 316 struct lguest *lg;
212 int err; 317 int err;
213 unsigned long args[3]; 318 unsigned long args[3];
214 319
215 /* We grab the Big Lguest lock, which protects against multiple 320 /*
216 * simultaneous initializations. */ 321 * We grab the Big Lguest lock, which protects against multiple
322 * simultaneous initializations.
323 */
217 mutex_lock(&lguest_lock); 324 mutex_lock(&lguest_lock);
218 /* You can't initialize twice! Close the device and start again... */ 325 /* You can't initialize twice! Close the device and start again... */
219 if (file->private_data) { 326 if (file->private_data) {
@@ -248,8 +355,10 @@ static int initialize(struct file *file, const unsigned long __user *input)
248 if (err) 355 if (err)
249 goto free_eventfds; 356 goto free_eventfds;
250 357
251 /* Initialize the Guest's shadow page tables, using the toplevel 358 /*
252 * address the Launcher gave us. This allocates memory, so can fail. */ 359 * Initialize the Guest's shadow page tables, using the toplevel
360 * address the Launcher gave us. This allocates memory, so can fail.
361 */
253 err = init_guest_pagetable(lg); 362 err = init_guest_pagetable(lg);
254 if (err) 363 if (err)
255 goto free_regs; 364 goto free_regs;
@@ -274,20 +383,24 @@ unlock:
274 return err; 383 return err;
275} 384}
276 385
277/*L:010 The first operation the Launcher does must be a write. All writes 386/*L:010
387 * The first operation the Launcher does must be a write. All writes
278 * start with an unsigned long number: for the first write this must be 388 * start with an unsigned long number: for the first write this must be
279 * LHREQ_INITIALIZE to set up the Guest. After that the Launcher can use 389 * LHREQ_INITIALIZE to set up the Guest. After that the Launcher can use
280 * writes of other values to send interrupts. 390 * writes of other values to send interrupts or set up receipt of notifications.
281 * 391 *
282 * Note that we overload the "offset" in the /dev/lguest file to indicate what 392 * Note that we overload the "offset" in the /dev/lguest file to indicate what
283 * CPU number we're dealing with. Currently this is always 0, since we only 393 * CPU number we're dealing with. Currently this is always 0 since we only
284 * support uniprocessor Guests, but you can see the beginnings of SMP support 394 * support uniprocessor Guests, but you can see the beginnings of SMP support
285 * here. */ 395 * here.
396 */
286static ssize_t write(struct file *file, const char __user *in, 397static ssize_t write(struct file *file, const char __user *in,
287 size_t size, loff_t *off) 398 size_t size, loff_t *off)
288{ 399{
289 /* Once the Guest is initialized, we hold the "struct lguest" in the 400 /*
290 * file private data. */ 401 * Once the Guest is initialized, we hold the "struct lguest" in the
402 * file private data.
403 */
291 struct lguest *lg = file->private_data; 404 struct lguest *lg = file->private_data;
292 const unsigned long __user *input = (const unsigned long __user *)in; 405 const unsigned long __user *input = (const unsigned long __user *)in;
293 unsigned long req; 406 unsigned long req;
@@ -322,13 +435,15 @@ static ssize_t write(struct file *file, const char __user *in,
322 } 435 }
323} 436}
324 437
325/*L:060 The final piece of interface code is the close() routine. It reverses 438/*L:060
439 * The final piece of interface code is the close() routine. It reverses
326 * everything done in initialize(). This is usually called because the 440 * everything done in initialize(). This is usually called because the
327 * Launcher exited. 441 * Launcher exited.
328 * 442 *
329 * Note that the close routine returns 0 or a negative error number: it can't 443 * Note that the close routine returns 0 or a negative error number: it can't
330 * really fail, but it can whine. I blame Sun for this wart, and K&R C for 444 * really fail, but it can whine. I blame Sun for this wart, and K&R C for
331 * letting them do it. :*/ 445 * letting them do it.
446:*/
332static int close(struct inode *inode, struct file *file) 447static int close(struct inode *inode, struct file *file)
333{ 448{
334 struct lguest *lg = file->private_data; 449 struct lguest *lg = file->private_data;
@@ -338,8 +453,10 @@ static int close(struct inode *inode, struct file *file)
338 if (!lg) 453 if (!lg)
339 return 0; 454 return 0;
340 455
341 /* We need the big lock, to protect from inter-guest I/O and other 456 /*
342 * Launchers initializing guests. */ 457 * We need the big lock, to protect from inter-guest I/O and other
458 * Launchers initializing guests.
459 */
343 mutex_lock(&lguest_lock); 460 mutex_lock(&lguest_lock);
344 461
345 /* Free up the shadow page tables for the Guest. */ 462 /* Free up the shadow page tables for the Guest. */
@@ -350,8 +467,10 @@ static int close(struct inode *inode, struct file *file)
350 hrtimer_cancel(&lg->cpus[i].hrt); 467 hrtimer_cancel(&lg->cpus[i].hrt);
351 /* We can free up the register page we allocated. */ 468 /* We can free up the register page we allocated. */
352 free_page(lg->cpus[i].regs_page); 469 free_page(lg->cpus[i].regs_page);
353 /* Now all the memory cleanups are done, it's safe to release 470 /*
354 * the Launcher's memory management structure. */ 471 * Now all the memory cleanups are done, it's safe to release
472 * the Launcher's memory management structure.
473 */
355 mmput(lg->cpus[i].mm); 474 mmput(lg->cpus[i].mm);
356 } 475 }
357 476
@@ -360,8 +479,10 @@ static int close(struct inode *inode, struct file *file)
360 eventfd_ctx_put(lg->eventfds->map[i].event); 479 eventfd_ctx_put(lg->eventfds->map[i].event);
361 kfree(lg->eventfds); 480 kfree(lg->eventfds);
362 481
363 /* If lg->dead doesn't contain an error code it will be NULL or a 482 /*
364 * kmalloc()ed string, either of which is ok to hand to kfree(). */ 483 * If lg->dead doesn't contain an error code it will be NULL or a
484 * kmalloc()ed string, either of which is ok to hand to kfree().
485 */
365 if (!IS_ERR(lg->dead)) 486 if (!IS_ERR(lg->dead))
366 kfree(lg->dead); 487 kfree(lg->dead);
367 /* Free the memory allocated to the lguest_struct */ 488 /* Free the memory allocated to the lguest_struct */
@@ -385,7 +506,8 @@ static int close(struct inode *inode, struct file *file)
385 * 506 *
386 * We begin our understanding with the Host kernel interface which the Launcher 507 * We begin our understanding with the Host kernel interface which the Launcher
387 * uses: reading and writing a character device called /dev/lguest. All the 508 * uses: reading and writing a character device called /dev/lguest. All the
388 * work happens in the read(), write() and close() routines: */ 509 * work happens in the read(), write() and close() routines:
510 */
389static struct file_operations lguest_fops = { 511static struct file_operations lguest_fops = {
390 .owner = THIS_MODULE, 512 .owner = THIS_MODULE,
391 .release = close, 513 .release = close,
@@ -393,8 +515,10 @@ static struct file_operations lguest_fops = {
393 .read = read, 515 .read = read,
394}; 516};
395 517
396/* This is a textbook example of a "misc" character device. Populate a "struct 518/*
397 * miscdevice" and register it with misc_register(). */ 519 * This is a textbook example of a "misc" character device. Populate a "struct
520 * miscdevice" and register it with misc_register().
521 */
398static struct miscdevice lguest_dev = { 522static struct miscdevice lguest_dev = {
399 .minor = MISC_DYNAMIC_MINOR, 523 .minor = MISC_DYNAMIC_MINOR,
400 .name = "lguest", 524 .name = "lguest",
diff --git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c
index a6fe1abda24..a8d0aee3bc0 100644
--- a/drivers/lguest/page_tables.c
+++ b/drivers/lguest/page_tables.c
@@ -1,9 +1,11 @@
1/*P:700 The pagetable code, on the other hand, still shows the scars of 1/*P:700
2 * The pagetable code, on the other hand, still shows the scars of
2 * previous encounters. It's functional, and as neat as it can be in the 3 * previous encounters. It's functional, and as neat as it can be in the
3 * circumstances, but be wary, for these things are subtle and break easily. 4 * circumstances, but be wary, for these things are subtle and break easily.
4 * The Guest provides a virtual to physical mapping, but we can neither trust 5 * The Guest provides a virtual to physical mapping, but we can neither trust
5 * it nor use it: we verify and convert it here then point the CPU to the 6 * it nor use it: we verify and convert it here then point the CPU to the
6 * converted Guest pages when running the Guest. :*/ 7 * converted Guest pages when running the Guest.
8:*/
7 9
8/* Copyright (C) Rusty Russell IBM Corporation 2006. 10/* Copyright (C) Rusty Russell IBM Corporation 2006.
9 * GPL v2 and any later version */ 11 * GPL v2 and any later version */
@@ -17,18 +19,20 @@
17#include <asm/bootparam.h> 19#include <asm/bootparam.h>
18#include "lg.h" 20#include "lg.h"
19 21
20/*M:008 We hold reference to pages, which prevents them from being swapped. 22/*M:008
23 * We hold reference to pages, which prevents them from being swapped.
21 * It'd be nice to have a callback in the "struct mm_struct" when Linux wants 24 * It'd be nice to have a callback in the "struct mm_struct" when Linux wants
22 * to swap out. If we had this, and a shrinker callback to trim PTE pages, we 25 * to swap out. If we had this, and a shrinker callback to trim PTE pages, we
23 * could probably consider launching Guests as non-root. :*/ 26 * could probably consider launching Guests as non-root.
27:*/
24 28
25/*H:300 29/*H:300
26 * The Page Table Code 30 * The Page Table Code
27 * 31 *
28 * We use two-level page tables for the Guest. If you're not entirely 32 * We use two-level page tables for the Guest, or three-level with PAE. If
29 * comfortable with virtual addresses, physical addresses and page tables then 33 * you're not entirely comfortable with virtual addresses, physical addresses
30 * I recommend you review arch/x86/lguest/boot.c's "Page Table Handling" (with 34 * and page tables then I recommend you review arch/x86/lguest/boot.c's "Page
31 * diagrams!). 35 * Table Handling" (with diagrams!).
32 * 36 *
33 * The Guest keeps page tables, but we maintain the actual ones here: these are 37 * The Guest keeps page tables, but we maintain the actual ones here: these are
34 * called "shadow" page tables. Which is a very Guest-centric name: these are 38 * called "shadow" page tables. Which is a very Guest-centric name: these are
@@ -45,16 +49,18 @@
45 * (v) Flushing (throwing away) page tables, 49 * (v) Flushing (throwing away) page tables,
46 * (vi) Mapping the Switcher when the Guest is about to run, 50 * (vi) Mapping the Switcher when the Guest is about to run,
47 * (vii) Setting up the page tables initially. 51 * (vii) Setting up the page tables initially.
48 :*/ 52:*/
49 53
50 54/*
51/* 1024 entries in a page table page maps 1024 pages: 4MB. The Switcher is 55 * The Switcher uses the complete top PTE page. That's 1024 PTE entries (4MB)
52 * conveniently placed at the top 4MB, so it uses a separate, complete PTE 56 * or 512 PTE entries with PAE (2MB).
53 * page. */ 57 */
54#define SWITCHER_PGD_INDEX (PTRS_PER_PGD - 1) 58#define SWITCHER_PGD_INDEX (PTRS_PER_PGD - 1)
55 59
56/* For PAE we need the PMD index as well. We use the last 2MB, so we 60/*
57 * will need the last pmd entry of the last pmd page. */ 61 * For PAE we need the PMD index as well. We use the last 2MB, so we
62 * will need the last pmd entry of the last pmd page.
63 */
58#ifdef CONFIG_X86_PAE 64#ifdef CONFIG_X86_PAE
59#define SWITCHER_PMD_INDEX (PTRS_PER_PMD - 1) 65#define SWITCHER_PMD_INDEX (PTRS_PER_PMD - 1)
60#define RESERVE_MEM 2U 66#define RESERVE_MEM 2U
@@ -64,14 +70,18 @@
64#define CHECK_GPGD_MASK _PAGE_TABLE 70#define CHECK_GPGD_MASK _PAGE_TABLE
65#endif 71#endif
66 72
67/* We actually need a separate PTE page for each CPU. Remember that after the 73/*
74 * We actually need a separate PTE page for each CPU. Remember that after the
68 * Switcher code itself comes two pages for each CPU, and we don't want this 75 * Switcher code itself comes two pages for each CPU, and we don't want this
69 * CPU's guest to see the pages of any other CPU. */ 76 * CPU's guest to see the pages of any other CPU.
77 */
70static DEFINE_PER_CPU(pte_t *, switcher_pte_pages); 78static DEFINE_PER_CPU(pte_t *, switcher_pte_pages);
71#define switcher_pte_page(cpu) per_cpu(switcher_pte_pages, cpu) 79#define switcher_pte_page(cpu) per_cpu(switcher_pte_pages, cpu)
72 80
73/*H:320 The page table code is curly enough to need helper functions to keep it 81/*H:320
74 * clear and clean. 82 * The page table code is curly enough to need helper functions to keep it
83 * clear and clean. The kernel itself provides many of them; one advantage
84 * of insisting that the Guest and Host use the same CONFIG_PAE setting.
75 * 85 *
76 * There are two functions which return pointers to the shadow (aka "real") 86 * There are two functions which return pointers to the shadow (aka "real")
77 * page tables. 87 * page tables.
@@ -79,7 +89,8 @@ static DEFINE_PER_CPU(pte_t *, switcher_pte_pages);
79 * spgd_addr() takes the virtual address and returns a pointer to the top-level 89 * spgd_addr() takes the virtual address and returns a pointer to the top-level
80 * page directory entry (PGD) for that address. Since we keep track of several 90 * page directory entry (PGD) for that address. Since we keep track of several
81 * page tables, the "i" argument tells us which one we're interested in (it's 91 * page tables, the "i" argument tells us which one we're interested in (it's
82 * usually the current one). */ 92 * usually the current one).
93 */
83static pgd_t *spgd_addr(struct lg_cpu *cpu, u32 i, unsigned long vaddr) 94static pgd_t *spgd_addr(struct lg_cpu *cpu, u32 i, unsigned long vaddr)
84{ 95{
85 unsigned int index = pgd_index(vaddr); 96 unsigned int index = pgd_index(vaddr);
@@ -96,9 +107,11 @@ static pgd_t *spgd_addr(struct lg_cpu *cpu, u32 i, unsigned long vaddr)
96} 107}
97 108
98#ifdef CONFIG_X86_PAE 109#ifdef CONFIG_X86_PAE
99/* This routine then takes the PGD entry given above, which contains the 110/*
111 * This routine then takes the PGD entry given above, which contains the
100 * address of the PMD page. It then returns a pointer to the PMD entry for the 112 * address of the PMD page. It then returns a pointer to the PMD entry for the
101 * given address. */ 113 * given address.
114 */
102static pmd_t *spmd_addr(struct lg_cpu *cpu, pgd_t spgd, unsigned long vaddr) 115static pmd_t *spmd_addr(struct lg_cpu *cpu, pgd_t spgd, unsigned long vaddr)
103{ 116{
104 unsigned int index = pmd_index(vaddr); 117 unsigned int index = pmd_index(vaddr);
@@ -119,9 +132,11 @@ static pmd_t *spmd_addr(struct lg_cpu *cpu, pgd_t spgd, unsigned long vaddr)
119} 132}
120#endif 133#endif
121 134
122/* This routine then takes the page directory entry returned above, which 135/*
136 * This routine then takes the page directory entry returned above, which
123 * contains the address of the page table entry (PTE) page. It then returns a 137 * contains the address of the page table entry (PTE) page. It then returns a
124 * pointer to the PTE entry for the given address. */ 138 * pointer to the PTE entry for the given address.
139 */
125static pte_t *spte_addr(struct lg_cpu *cpu, pgd_t spgd, unsigned long vaddr) 140static pte_t *spte_addr(struct lg_cpu *cpu, pgd_t spgd, unsigned long vaddr)
126{ 141{
127#ifdef CONFIG_X86_PAE 142#ifdef CONFIG_X86_PAE
@@ -139,8 +154,10 @@ static pte_t *spte_addr(struct lg_cpu *cpu, pgd_t spgd, unsigned long vaddr)
139 return &page[pte_index(vaddr)]; 154 return &page[pte_index(vaddr)];
140} 155}
141 156
142/* These two functions just like the above two, except they access the Guest 157/*
143 * page tables. Hence they return a Guest address. */ 158 * These functions are just like the above two, except they access the Guest
159 * page tables. Hence they return a Guest address.
160 */
144static unsigned long gpgd_addr(struct lg_cpu *cpu, unsigned long vaddr) 161static unsigned long gpgd_addr(struct lg_cpu *cpu, unsigned long vaddr)
145{ 162{
146 unsigned int index = vaddr >> (PGDIR_SHIFT); 163 unsigned int index = vaddr >> (PGDIR_SHIFT);
@@ -148,6 +165,7 @@ static unsigned long gpgd_addr(struct lg_cpu *cpu, unsigned long vaddr)
148} 165}
149 166
150#ifdef CONFIG_X86_PAE 167#ifdef CONFIG_X86_PAE
168/* Follow the PGD to the PMD. */
151static unsigned long gpmd_addr(pgd_t gpgd, unsigned long vaddr) 169static unsigned long gpmd_addr(pgd_t gpgd, unsigned long vaddr)
152{ 170{
153 unsigned long gpage = pgd_pfn(gpgd) << PAGE_SHIFT; 171 unsigned long gpage = pgd_pfn(gpgd) << PAGE_SHIFT;
@@ -155,6 +173,7 @@ static unsigned long gpmd_addr(pgd_t gpgd, unsigned long vaddr)
155 return gpage + pmd_index(vaddr) * sizeof(pmd_t); 173 return gpage + pmd_index(vaddr) * sizeof(pmd_t);
156} 174}
157 175
176/* Follow the PMD to the PTE. */
158static unsigned long gpte_addr(struct lg_cpu *cpu, 177static unsigned long gpte_addr(struct lg_cpu *cpu,
159 pmd_t gpmd, unsigned long vaddr) 178 pmd_t gpmd, unsigned long vaddr)
160{ 179{
@@ -164,6 +183,7 @@ static unsigned long gpte_addr(struct lg_cpu *cpu,
164 return gpage + pte_index(vaddr) * sizeof(pte_t); 183 return gpage + pte_index(vaddr) * sizeof(pte_t);
165} 184}
166#else 185#else
186/* Follow the PGD to the PTE (no mid-level for !PAE). */
167static unsigned long gpte_addr(struct lg_cpu *cpu, 187static unsigned long gpte_addr(struct lg_cpu *cpu,
168 pgd_t gpgd, unsigned long vaddr) 188 pgd_t gpgd, unsigned long vaddr)
169{ 189{
@@ -175,17 +195,21 @@ static unsigned long gpte_addr(struct lg_cpu *cpu,
175#endif 195#endif
176/*:*/ 196/*:*/
177 197
178/*M:014 get_pfn is slow: we could probably try to grab batches of pages here as 198/*M:014
179 * an optimization (ie. pre-faulting). :*/ 199 * get_pfn is slow: we could probably try to grab batches of pages here as
200 * an optimization (ie. pre-faulting).
201:*/
180 202
181/*H:350 This routine takes a page number given by the Guest and converts it to 203/*H:350
204 * This routine takes a page number given by the Guest and converts it to
182 * an actual, physical page number. It can fail for several reasons: the 205 * an actual, physical page number. It can fail for several reasons: the
183 * virtual address might not be mapped by the Launcher, the write flag is set 206 * virtual address might not be mapped by the Launcher, the write flag is set
184 * and the page is read-only, or the write flag was set and the page was 207 * and the page is read-only, or the write flag was set and the page was
185 * shared so had to be copied, but we ran out of memory. 208 * shared so had to be copied, but we ran out of memory.
186 * 209 *
187 * This holds a reference to the page, so release_pte() is careful to put that 210 * This holds a reference to the page, so release_pte() is careful to put that
188 * back. */ 211 * back.
212 */
189static unsigned long get_pfn(unsigned long virtpfn, int write) 213static unsigned long get_pfn(unsigned long virtpfn, int write)
190{ 214{
191 struct page *page; 215 struct page *page;
@@ -198,33 +222,41 @@ static unsigned long get_pfn(unsigned long virtpfn, int write)
198 return -1UL; 222 return -1UL;
199} 223}
200 224
201/*H:340 Converting a Guest page table entry to a shadow (ie. real) page table 225/*H:340
226 * Converting a Guest page table entry to a shadow (ie. real) page table
202 * entry can be a little tricky. The flags are (almost) the same, but the 227 * entry can be a little tricky. The flags are (almost) the same, but the
203 * Guest PTE contains a virtual page number: the CPU needs the real page 228 * Guest PTE contains a virtual page number: the CPU needs the real page
204 * number. */ 229 * number.
230 */
205static pte_t gpte_to_spte(struct lg_cpu *cpu, pte_t gpte, int write) 231static pte_t gpte_to_spte(struct lg_cpu *cpu, pte_t gpte, int write)
206{ 232{
207 unsigned long pfn, base, flags; 233 unsigned long pfn, base, flags;
208 234
209 /* The Guest sets the global flag, because it thinks that it is using 235 /*
236 * The Guest sets the global flag, because it thinks that it is using
210 * PGE. We only told it to use PGE so it would tell us whether it was 237 * PGE. We only told it to use PGE so it would tell us whether it was
211 * flushing a kernel mapping or a userspace mapping. We don't actually 238 * flushing a kernel mapping or a userspace mapping. We don't actually
212 * use the global bit, so throw it away. */ 239 * use the global bit, so throw it away.
240 */
213 flags = (pte_flags(gpte) & ~_PAGE_GLOBAL); 241 flags = (pte_flags(gpte) & ~_PAGE_GLOBAL);
214 242
215 /* The Guest's pages are offset inside the Launcher. */ 243 /* The Guest's pages are offset inside the Launcher. */
216 base = (unsigned long)cpu->lg->mem_base / PAGE_SIZE; 244 base = (unsigned long)cpu->lg->mem_base / PAGE_SIZE;
217 245
218 /* We need a temporary "unsigned long" variable to hold the answer from 246 /*
247 * We need a temporary "unsigned long" variable to hold the answer from
219 * get_pfn(), because it returns 0xFFFFFFFF on failure, which wouldn't 248 * get_pfn(), because it returns 0xFFFFFFFF on failure, which wouldn't
220 * fit in spte.pfn. get_pfn() finds the real physical number of the 249 * fit in spte.pfn. get_pfn() finds the real physical number of the
221 * page, given the virtual number. */ 250 * page, given the virtual number.
251 */
222 pfn = get_pfn(base + pte_pfn(gpte), write); 252 pfn = get_pfn(base + pte_pfn(gpte), write);
223 if (pfn == -1UL) { 253 if (pfn == -1UL) {
224 kill_guest(cpu, "failed to get page %lu", pte_pfn(gpte)); 254 kill_guest(cpu, "failed to get page %lu", pte_pfn(gpte));
225 /* When we destroy the Guest, we'll go through the shadow page 255 /*
256 * When we destroy the Guest, we'll go through the shadow page
226 * tables and release_pte() them. Make sure we don't think 257 * tables and release_pte() them. Make sure we don't think
227 * this one is valid! */ 258 * this one is valid!
259 */
228 flags = 0; 260 flags = 0;
229 } 261 }
230 /* Now we assemble our shadow PTE from the page number and flags. */ 262 /* Now we assemble our shadow PTE from the page number and flags. */
@@ -234,8 +266,10 @@ static pte_t gpte_to_spte(struct lg_cpu *cpu, pte_t gpte, int write)
234/*H:460 And to complete the chain, release_pte() looks like this: */ 266/*H:460 And to complete the chain, release_pte() looks like this: */
235static void release_pte(pte_t pte) 267static void release_pte(pte_t pte)
236{ 268{
237 /* Remember that get_user_pages_fast() took a reference to the page, in 269 /*
238 * get_pfn()? We have to put it back now. */ 270 * Remember that get_user_pages_fast() took a reference to the page, in
271 * get_pfn()? We have to put it back now.
272 */
239 if (pte_flags(pte) & _PAGE_PRESENT) 273 if (pte_flags(pte) & _PAGE_PRESENT)
240 put_page(pte_page(pte)); 274 put_page(pte_page(pte));
241} 275}
@@ -273,7 +307,8 @@ static void check_gpmd(struct lg_cpu *cpu, pmd_t gpmd)
273 * and return to the Guest without it knowing. 307 * and return to the Guest without it knowing.
274 * 308 *
275 * If we fixed up the fault (ie. we mapped the address), this routine returns 309 * If we fixed up the fault (ie. we mapped the address), this routine returns
276 * true. Otherwise, it was a real fault and we need to tell the Guest. */ 310 * true. Otherwise, it was a real fault and we need to tell the Guest.
311 */
277bool demand_page(struct lg_cpu *cpu, unsigned long vaddr, int errcode) 312bool demand_page(struct lg_cpu *cpu, unsigned long vaddr, int errcode)
278{ 313{
279 pgd_t gpgd; 314 pgd_t gpgd;
@@ -282,6 +317,7 @@ bool demand_page(struct lg_cpu *cpu, unsigned long vaddr, int errcode)
282 pte_t gpte; 317 pte_t gpte;
283 pte_t *spte; 318 pte_t *spte;
284 319
320 /* Mid level for PAE. */
285#ifdef CONFIG_X86_PAE 321#ifdef CONFIG_X86_PAE
286 pmd_t *spmd; 322 pmd_t *spmd;
287 pmd_t gpmd; 323 pmd_t gpmd;
@@ -298,22 +334,26 @@ bool demand_page(struct lg_cpu *cpu, unsigned long vaddr, int errcode)
298 if (!(pgd_flags(*spgd) & _PAGE_PRESENT)) { 334 if (!(pgd_flags(*spgd) & _PAGE_PRESENT)) {
299 /* No shadow entry: allocate a new shadow PTE page. */ 335 /* No shadow entry: allocate a new shadow PTE page. */
300 unsigned long ptepage = get_zeroed_page(GFP_KERNEL); 336 unsigned long ptepage = get_zeroed_page(GFP_KERNEL);
301 /* This is not really the Guest's fault, but killing it is 337 /*
302 * simple for this corner case. */ 338 * This is not really the Guest's fault, but killing it is
339 * simple for this corner case.
340 */
303 if (!ptepage) { 341 if (!ptepage) {
304 kill_guest(cpu, "out of memory allocating pte page"); 342 kill_guest(cpu, "out of memory allocating pte page");
305 return false; 343 return false;
306 } 344 }
307 /* We check that the Guest pgd is OK. */ 345 /* We check that the Guest pgd is OK. */
308 check_gpgd(cpu, gpgd); 346 check_gpgd(cpu, gpgd);
309 /* And we copy the flags to the shadow PGD entry. The page 347 /*
310 * number in the shadow PGD is the page we just allocated. */ 348 * And we copy the flags to the shadow PGD entry. The page
349 * number in the shadow PGD is the page we just allocated.
350 */
311 set_pgd(spgd, __pgd(__pa(ptepage) | pgd_flags(gpgd))); 351 set_pgd(spgd, __pgd(__pa(ptepage) | pgd_flags(gpgd)));
312 } 352 }
313 353
314#ifdef CONFIG_X86_PAE 354#ifdef CONFIG_X86_PAE
315 gpmd = lgread(cpu, gpmd_addr(gpgd, vaddr), pmd_t); 355 gpmd = lgread(cpu, gpmd_addr(gpgd, vaddr), pmd_t);
316 /* middle level not present? We can't map it in. */ 356 /* Middle level not present? We can't map it in. */
317 if (!(pmd_flags(gpmd) & _PAGE_PRESENT)) 357 if (!(pmd_flags(gpmd) & _PAGE_PRESENT))
318 return false; 358 return false;
319 359
@@ -324,8 +364,10 @@ bool demand_page(struct lg_cpu *cpu, unsigned long vaddr, int errcode)
324 /* No shadow entry: allocate a new shadow PTE page. */ 364 /* No shadow entry: allocate a new shadow PTE page. */
325 unsigned long ptepage = get_zeroed_page(GFP_KERNEL); 365 unsigned long ptepage = get_zeroed_page(GFP_KERNEL);
326 366
327 /* This is not really the Guest's fault, but killing it is 367 /*
328 * simple for this corner case. */ 368 * This is not really the Guest's fault, but killing it is
369 * simple for this corner case.
370 */
329 if (!ptepage) { 371 if (!ptepage) {
330 kill_guest(cpu, "out of memory allocating pte page"); 372 kill_guest(cpu, "out of memory allocating pte page");
331 return false; 373 return false;
@@ -334,27 +376,37 @@ bool demand_page(struct lg_cpu *cpu, unsigned long vaddr, int errcode)
334 /* We check that the Guest pmd is OK. */ 376 /* We check that the Guest pmd is OK. */
335 check_gpmd(cpu, gpmd); 377 check_gpmd(cpu, gpmd);
336 378
337 /* And we copy the flags to the shadow PMD entry. The page 379 /*
338 * number in the shadow PMD is the page we just allocated. */ 380 * And we copy the flags to the shadow PMD entry. The page
381 * number in the shadow PMD is the page we just allocated.
382 */
339 native_set_pmd(spmd, __pmd(__pa(ptepage) | pmd_flags(gpmd))); 383 native_set_pmd(spmd, __pmd(__pa(ptepage) | pmd_flags(gpmd)));
340 } 384 }
341 385
342 /* OK, now we look at the lower level in the Guest page table: keep its 386 /*
343 * address, because we might update it later. */ 387 * OK, now we look at the lower level in the Guest page table: keep its
388 * address, because we might update it later.
389 */
344 gpte_ptr = gpte_addr(cpu, gpmd, vaddr); 390 gpte_ptr = gpte_addr(cpu, gpmd, vaddr);
345#else 391#else
346 /* OK, now we look at the lower level in the Guest page table: keep its 392 /*
347 * address, because we might update it later. */ 393 * OK, now we look at the lower level in the Guest page table: keep its
394 * address, because we might update it later.
395 */
348 gpte_ptr = gpte_addr(cpu, gpgd, vaddr); 396 gpte_ptr = gpte_addr(cpu, gpgd, vaddr);
349#endif 397#endif
398
399 /* Read the actual PTE value. */
350 gpte = lgread(cpu, gpte_ptr, pte_t); 400 gpte = lgread(cpu, gpte_ptr, pte_t);
351 401
352 /* If this page isn't in the Guest page tables, we can't page it in. */ 402 /* If this page isn't in the Guest page tables, we can't page it in. */
353 if (!(pte_flags(gpte) & _PAGE_PRESENT)) 403 if (!(pte_flags(gpte) & _PAGE_PRESENT))
354 return false; 404 return false;
355 405
356 /* Check they're not trying to write to a page the Guest wants 406 /*
357 * read-only (bit 2 of errcode == write). */ 407 * Check they're not trying to write to a page the Guest wants
408 * read-only (bit 2 of errcode == write).
409 */
358 if ((errcode & 2) && !(pte_flags(gpte) & _PAGE_RW)) 410 if ((errcode & 2) && !(pte_flags(gpte) & _PAGE_RW))
359 return false; 411 return false;
360 412
@@ -362,8 +414,10 @@ bool demand_page(struct lg_cpu *cpu, unsigned long vaddr, int errcode)
362 if ((errcode & 4) && !(pte_flags(gpte) & _PAGE_USER)) 414 if ((errcode & 4) && !(pte_flags(gpte) & _PAGE_USER))
363 return false; 415 return false;
364 416
365 /* Check that the Guest PTE flags are OK, and the page number is below 417 /*
366 * the pfn_limit (ie. not mapping the Launcher binary). */ 418 * Check that the Guest PTE flags are OK, and the page number is below
419 * the pfn_limit (ie. not mapping the Launcher binary).
420 */
367 check_gpte(cpu, gpte); 421 check_gpte(cpu, gpte);
368 422
369 /* Add the _PAGE_ACCESSED and (for a write) _PAGE_DIRTY flag */ 423 /* Add the _PAGE_ACCESSED and (for a write) _PAGE_DIRTY flag */
@@ -373,29 +427,40 @@ bool demand_page(struct lg_cpu *cpu, unsigned long vaddr, int errcode)
373 427
374 /* Get the pointer to the shadow PTE entry we're going to set. */ 428 /* Get the pointer to the shadow PTE entry we're going to set. */
375 spte = spte_addr(cpu, *spgd, vaddr); 429 spte = spte_addr(cpu, *spgd, vaddr);
376 /* If there was a valid shadow PTE entry here before, we release it. 430
377 * This can happen with a write to a previously read-only entry. */ 431 /*
432 * If there was a valid shadow PTE entry here before, we release it.
433 * This can happen with a write to a previously read-only entry.
434 */
378 release_pte(*spte); 435 release_pte(*spte);
379 436
380 /* If this is a write, we insist that the Guest page is writable (the 437 /*
381 * final arg to gpte_to_spte()). */ 438 * If this is a write, we insist that the Guest page is writable (the
439 * final arg to gpte_to_spte()).
440 */
382 if (pte_dirty(gpte)) 441 if (pte_dirty(gpte))
383 *spte = gpte_to_spte(cpu, gpte, 1); 442 *spte = gpte_to_spte(cpu, gpte, 1);
384 else 443 else
385 /* If this is a read, don't set the "writable" bit in the page 444 /*
445 * If this is a read, don't set the "writable" bit in the page
386 * table entry, even if the Guest says it's writable. That way 446 * table entry, even if the Guest says it's writable. That way
387 * we will come back here when a write does actually occur, so 447 * we will come back here when a write does actually occur, so
388 * we can update the Guest's _PAGE_DIRTY flag. */ 448 * we can update the Guest's _PAGE_DIRTY flag.
449 */
389 native_set_pte(spte, gpte_to_spte(cpu, pte_wrprotect(gpte), 0)); 450 native_set_pte(spte, gpte_to_spte(cpu, pte_wrprotect(gpte), 0));
390 451
391 /* Finally, we write the Guest PTE entry back: we've set the 452 /*
392 * _PAGE_ACCESSED and maybe the _PAGE_DIRTY flags. */ 453 * Finally, we write the Guest PTE entry back: we've set the
454 * _PAGE_ACCESSED and maybe the _PAGE_DIRTY flags.
455 */
393 lgwrite(cpu, gpte_ptr, pte_t, gpte); 456 lgwrite(cpu, gpte_ptr, pte_t, gpte);
394 457
395 /* The fault is fixed, the page table is populated, the mapping 458 /*
459 * The fault is fixed, the page table is populated, the mapping
396 * manipulated, the result returned and the code complete. A small 460 * manipulated, the result returned and the code complete. A small
397 * delay and a trace of alliteration are the only indications the Guest 461 * delay and a trace of alliteration are the only indications the Guest
398 * has that a page fault occurred at all. */ 462 * has that a page fault occurred at all.
463 */
399 return true; 464 return true;
400} 465}
401 466
@@ -408,7 +473,8 @@ bool demand_page(struct lg_cpu *cpu, unsigned long vaddr, int errcode)
408 * mapped, so it's overkill. 473 * mapped, so it's overkill.
409 * 474 *
410 * This is a quick version which answers the question: is this virtual address 475 * This is a quick version which answers the question: is this virtual address
411 * mapped by the shadow page tables, and is it writable? */ 476 * mapped by the shadow page tables, and is it writable?
477 */
412static bool page_writable(struct lg_cpu *cpu, unsigned long vaddr) 478static bool page_writable(struct lg_cpu *cpu, unsigned long vaddr)
413{ 479{
414 pgd_t *spgd; 480 pgd_t *spgd;
@@ -428,21 +494,26 @@ static bool page_writable(struct lg_cpu *cpu, unsigned long vaddr)
428 return false; 494 return false;
429#endif 495#endif
430 496
431 /* Check the flags on the pte entry itself: it must be present and 497 /*
432 * writable. */ 498 * Check the flags on the pte entry itself: it must be present and
499 * writable.
500 */
433 flags = pte_flags(*(spte_addr(cpu, *spgd, vaddr))); 501 flags = pte_flags(*(spte_addr(cpu, *spgd, vaddr)));
434 502
435 return (flags & (_PAGE_PRESENT|_PAGE_RW)) == (_PAGE_PRESENT|_PAGE_RW); 503 return (flags & (_PAGE_PRESENT|_PAGE_RW)) == (_PAGE_PRESENT|_PAGE_RW);
436} 504}
437 505
438/* So, when pin_stack_pages() asks us to pin a page, we check if it's already 506/*
507 * So, when pin_stack_pages() asks us to pin a page, we check if it's already
439 * in the page tables, and if not, we call demand_page() with error code 2 508 * in the page tables, and if not, we call demand_page() with error code 2
440 * (meaning "write"). */ 509 * (meaning "write").
510 */
441void pin_page(struct lg_cpu *cpu, unsigned long vaddr) 511void pin_page(struct lg_cpu *cpu, unsigned long vaddr)
442{ 512{
443 if (!page_writable(cpu, vaddr) && !demand_page(cpu, vaddr, 2)) 513 if (!page_writable(cpu, vaddr) && !demand_page(cpu, vaddr, 2))
444 kill_guest(cpu, "bad stack page %#lx", vaddr); 514 kill_guest(cpu, "bad stack page %#lx", vaddr);
445} 515}
516/*:*/
446 517
447#ifdef CONFIG_X86_PAE 518#ifdef CONFIG_X86_PAE
448static void release_pmd(pmd_t *spmd) 519static void release_pmd(pmd_t *spmd)
@@ -479,15 +550,21 @@ static void release_pgd(pgd_t *spgd)
479} 550}
480 551
481#else /* !CONFIG_X86_PAE */ 552#else /* !CONFIG_X86_PAE */
482/*H:450 If we chase down the release_pgd() code, it looks like this: */ 553/*H:450
554 * If we chase down the release_pgd() code, the non-PAE version looks like
555 * this. The PAE version is almost identical, but instead of calling
556 * release_pte it calls release_pmd(), which looks much like this.
557 */
483static void release_pgd(pgd_t *spgd) 558static void release_pgd(pgd_t *spgd)
484{ 559{
485 /* If the entry's not present, there's nothing to release. */ 560 /* If the entry's not present, there's nothing to release. */
486 if (pgd_flags(*spgd) & _PAGE_PRESENT) { 561 if (pgd_flags(*spgd) & _PAGE_PRESENT) {
487 unsigned int i; 562 unsigned int i;
488 /* Converting the pfn to find the actual PTE page is easy: turn 563 /*
564 * Converting the pfn to find the actual PTE page is easy: turn
489 * the page number into a physical address, then convert to a 565 * the page number into a physical address, then convert to a
490 * virtual address (easy for kernel pages like this one). */ 566 * virtual address (easy for kernel pages like this one).
567 */
491 pte_t *ptepage = __va(pgd_pfn(*spgd) << PAGE_SHIFT); 568 pte_t *ptepage = __va(pgd_pfn(*spgd) << PAGE_SHIFT);
492 /* For each entry in the page, we might need to release it. */ 569 /* For each entry in the page, we might need to release it. */
493 for (i = 0; i < PTRS_PER_PTE; i++) 570 for (i = 0; i < PTRS_PER_PTE; i++)
@@ -499,9 +576,12 @@ static void release_pgd(pgd_t *spgd)
499 } 576 }
500} 577}
501#endif 578#endif
502/*H:445 We saw flush_user_mappings() twice: once from the flush_user_mappings() 579
580/*H:445
581 * We saw flush_user_mappings() twice: once from the flush_user_mappings()
503 * hypercall and once in new_pgdir() when we re-used a top-level pgdir page. 582 * hypercall and once in new_pgdir() when we re-used a top-level pgdir page.
504 * It simply releases every PTE page from 0 up to the Guest's kernel address. */ 583 * It simply releases every PTE page from 0 up to the Guest's kernel address.
584 */
505static void flush_user_mappings(struct lguest *lg, int idx) 585static void flush_user_mappings(struct lguest *lg, int idx)
506{ 586{
507 unsigned int i; 587 unsigned int i;
@@ -510,10 +590,12 @@ static void flush_user_mappings(struct lguest *lg, int idx)
510 release_pgd(lg->pgdirs[idx].pgdir + i); 590 release_pgd(lg->pgdirs[idx].pgdir + i);
511} 591}
512 592
513/*H:440 (v) Flushing (throwing away) page tables, 593/*H:440
594 * (v) Flushing (throwing away) page tables,
514 * 595 *
515 * The Guest has a hypercall to throw away the page tables: it's used when a 596 * The Guest has a hypercall to throw away the page tables: it's used when a
516 * large number of mappings have been changed. */ 597 * large number of mappings have been changed.
598 */
517void guest_pagetable_flush_user(struct lg_cpu *cpu) 599void guest_pagetable_flush_user(struct lg_cpu *cpu)
518{ 600{
519 /* Drop the userspace part of the current page table. */ 601 /* Drop the userspace part of the current page table. */
@@ -551,9 +633,11 @@ unsigned long guest_pa(struct lg_cpu *cpu, unsigned long vaddr)
551 return pte_pfn(gpte) * PAGE_SIZE | (vaddr & ~PAGE_MASK); 633 return pte_pfn(gpte) * PAGE_SIZE | (vaddr & ~PAGE_MASK);
552} 634}
553 635
554/* We keep several page tables. This is a simple routine to find the page 636/*
637 * We keep several page tables. This is a simple routine to find the page
555 * table (if any) corresponding to this top-level address the Guest has given 638 * table (if any) corresponding to this top-level address the Guest has given
556 * us. */ 639 * us.
640 */
557static unsigned int find_pgdir(struct lguest *lg, unsigned long pgtable) 641static unsigned int find_pgdir(struct lguest *lg, unsigned long pgtable)
558{ 642{
559 unsigned int i; 643 unsigned int i;
@@ -563,9 +647,11 @@ static unsigned int find_pgdir(struct lguest *lg, unsigned long pgtable)
563 return i; 647 return i;
564} 648}
565 649
566/*H:435 And this is us, creating the new page directory. If we really do 650/*H:435
651 * And this is us, creating the new page directory. If we really do
567 * allocate a new one (and so the kernel parts are not there), we set 652 * allocate a new one (and so the kernel parts are not there), we set
568 * blank_pgdir. */ 653 * blank_pgdir.
654 */
569static unsigned int new_pgdir(struct lg_cpu *cpu, 655static unsigned int new_pgdir(struct lg_cpu *cpu,
570 unsigned long gpgdir, 656 unsigned long gpgdir,
571 int *blank_pgdir) 657 int *blank_pgdir)
@@ -575,8 +661,10 @@ static unsigned int new_pgdir(struct lg_cpu *cpu,
575 pmd_t *pmd_table; 661 pmd_t *pmd_table;
576#endif 662#endif
577 663
578 /* We pick one entry at random to throw out. Choosing the Least 664 /*
579 * Recently Used might be better, but this is easy. */ 665 * We pick one entry at random to throw out. Choosing the Least
666 * Recently Used might be better, but this is easy.
667 */
580 next = random32() % ARRAY_SIZE(cpu->lg->pgdirs); 668 next = random32() % ARRAY_SIZE(cpu->lg->pgdirs);
581 /* If it's never been allocated at all before, try now. */ 669 /* If it's never been allocated at all before, try now. */
582 if (!cpu->lg->pgdirs[next].pgdir) { 670 if (!cpu->lg->pgdirs[next].pgdir) {
@@ -587,8 +675,10 @@ static unsigned int new_pgdir(struct lg_cpu *cpu,
587 next = cpu->cpu_pgd; 675 next = cpu->cpu_pgd;
588 else { 676 else {
589#ifdef CONFIG_X86_PAE 677#ifdef CONFIG_X86_PAE
590 /* In PAE mode, allocate a pmd page and populate the 678 /*
591 * last pgd entry. */ 679 * In PAE mode, allocate a pmd page and populate the
680 * last pgd entry.
681 */
592 pmd_table = (pmd_t *)get_zeroed_page(GFP_KERNEL); 682 pmd_table = (pmd_t *)get_zeroed_page(GFP_KERNEL);
593 if (!pmd_table) { 683 if (!pmd_table) {
594 free_page((long)cpu->lg->pgdirs[next].pgdir); 684 free_page((long)cpu->lg->pgdirs[next].pgdir);
@@ -598,8 +688,10 @@ static unsigned int new_pgdir(struct lg_cpu *cpu,
598 set_pgd(cpu->lg->pgdirs[next].pgdir + 688 set_pgd(cpu->lg->pgdirs[next].pgdir +
599 SWITCHER_PGD_INDEX, 689 SWITCHER_PGD_INDEX,
600 __pgd(__pa(pmd_table) | _PAGE_PRESENT)); 690 __pgd(__pa(pmd_table) | _PAGE_PRESENT));
601 /* This is a blank page, so there are no kernel 691 /*
602 * mappings: caller must map the stack! */ 692 * This is a blank page, so there are no kernel
693 * mappings: caller must map the stack!
694 */
603 *blank_pgdir = 1; 695 *blank_pgdir = 1;
604 } 696 }
605#else 697#else
@@ -615,19 +707,23 @@ static unsigned int new_pgdir(struct lg_cpu *cpu,
615 return next; 707 return next;
616} 708}
617 709
618/*H:430 (iv) Switching page tables 710/*H:430
711 * (iv) Switching page tables
619 * 712 *
620 * Now we've seen all the page table setting and manipulation, let's see 713 * Now we've seen all the page table setting and manipulation, let's see
621 * what happens when the Guest changes page tables (ie. changes the top-level 714 * what happens when the Guest changes page tables (ie. changes the top-level
622 * pgdir). This occurs on almost every context switch. */ 715 * pgdir). This occurs on almost every context switch.
716 */
623void guest_new_pagetable(struct lg_cpu *cpu, unsigned long pgtable) 717void guest_new_pagetable(struct lg_cpu *cpu, unsigned long pgtable)
624{ 718{
625 int newpgdir, repin = 0; 719 int newpgdir, repin = 0;
626 720
627 /* Look to see if we have this one already. */ 721 /* Look to see if we have this one already. */
628 newpgdir = find_pgdir(cpu->lg, pgtable); 722 newpgdir = find_pgdir(cpu->lg, pgtable);
629 /* If not, we allocate or mug an existing one: if it's a fresh one, 723 /*
630 * repin gets set to 1. */ 724 * If not, we allocate or mug an existing one: if it's a fresh one,
725 * repin gets set to 1.
726 */
631 if (newpgdir == ARRAY_SIZE(cpu->lg->pgdirs)) 727 if (newpgdir == ARRAY_SIZE(cpu->lg->pgdirs))
632 newpgdir = new_pgdir(cpu, pgtable, &repin); 728 newpgdir = new_pgdir(cpu, pgtable, &repin);
633 /* Change the current pgd index to the new one. */ 729 /* Change the current pgd index to the new one. */
@@ -637,9 +733,11 @@ void guest_new_pagetable(struct lg_cpu *cpu, unsigned long pgtable)
637 pin_stack_pages(cpu); 733 pin_stack_pages(cpu);
638} 734}
639 735
640/*H:470 Finally, a routine which throws away everything: all PGD entries in all 736/*H:470
737 * Finally, a routine which throws away everything: all PGD entries in all
641 * the shadow page tables, including the Guest's kernel mappings. This is used 738 * the shadow page tables, including the Guest's kernel mappings. This is used
642 * when we destroy the Guest. */ 739 * when we destroy the Guest.
740 */
643static void release_all_pagetables(struct lguest *lg) 741static void release_all_pagetables(struct lguest *lg)
644{ 742{
645 unsigned int i, j; 743 unsigned int i, j;
@@ -656,8 +754,10 @@ static void release_all_pagetables(struct lguest *lg)
656 spgd = lg->pgdirs[i].pgdir + SWITCHER_PGD_INDEX; 754 spgd = lg->pgdirs[i].pgdir + SWITCHER_PGD_INDEX;
657 pmdpage = __va(pgd_pfn(*spgd) << PAGE_SHIFT); 755 pmdpage = __va(pgd_pfn(*spgd) << PAGE_SHIFT);
658 756
659 /* And release the pmd entries of that pmd page, 757 /*
660 * except for the switcher pmd. */ 758 * And release the pmd entries of that pmd page,
759 * except for the switcher pmd.
760 */
661 for (k = 0; k < SWITCHER_PMD_INDEX; k++) 761 for (k = 0; k < SWITCHER_PMD_INDEX; k++)
662 release_pmd(&pmdpage[k]); 762 release_pmd(&pmdpage[k]);
663#endif 763#endif
@@ -667,10 +767,12 @@ static void release_all_pagetables(struct lguest *lg)
667 } 767 }
668} 768}
669 769
670/* We also throw away everything when a Guest tells us it's changed a kernel 770/*
771 * We also throw away everything when a Guest tells us it's changed a kernel
671 * mapping. Since kernel mappings are in every page table, it's easiest to 772 * mapping. Since kernel mappings are in every page table, it's easiest to
672 * throw them all away. This traps the Guest in amber for a while as 773 * throw them all away. This traps the Guest in amber for a while as
673 * everything faults back in, but it's rare. */ 774 * everything faults back in, but it's rare.
775 */
674void guest_pagetable_clear_all(struct lg_cpu *cpu) 776void guest_pagetable_clear_all(struct lg_cpu *cpu)
675{ 777{
676 release_all_pagetables(cpu->lg); 778 release_all_pagetables(cpu->lg);
@@ -678,15 +780,19 @@ void guest_pagetable_clear_all(struct lg_cpu *cpu)
678 pin_stack_pages(cpu); 780 pin_stack_pages(cpu);
679} 781}
680/*:*/ 782/*:*/
681/*M:009 Since we throw away all mappings when a kernel mapping changes, our 783
784/*M:009
785 * Since we throw away all mappings when a kernel mapping changes, our
682 * performance sucks for guests using highmem. In fact, a guest with 786 * performance sucks for guests using highmem. In fact, a guest with
683 * PAGE_OFFSET 0xc0000000 (the default) and more than about 700MB of RAM is 787 * PAGE_OFFSET 0xc0000000 (the default) and more than about 700MB of RAM is
684 * usually slower than a Guest with less memory. 788 * usually slower than a Guest with less memory.
685 * 789 *
686 * This, of course, cannot be fixed. It would take some kind of... well, I 790 * This, of course, cannot be fixed. It would take some kind of... well, I
687 * don't know, but the term "puissant code-fu" comes to mind. :*/ 791 * don't know, but the term "puissant code-fu" comes to mind.
792:*/
688 793
689/*H:420 This is the routine which actually sets the page table entry for then 794/*H:420
795 * This is the routine which actually sets the page table entry for then
690 * "idx"'th shadow page table. 796 * "idx"'th shadow page table.
691 * 797 *
692 * Normally, we can just throw out the old entry and replace it with 0: if they 798 * Normally, we can just throw out the old entry and replace it with 0: if they
@@ -715,31 +821,36 @@ static void do_set_pte(struct lg_cpu *cpu, int idx,
715 spmd = spmd_addr(cpu, *spgd, vaddr); 821 spmd = spmd_addr(cpu, *spgd, vaddr);
716 if (pmd_flags(*spmd) & _PAGE_PRESENT) { 822 if (pmd_flags(*spmd) & _PAGE_PRESENT) {
717#endif 823#endif
718 /* Otherwise, we start by releasing 824 /* Otherwise, start by releasing the existing entry. */
719 * the existing entry. */
720 pte_t *spte = spte_addr(cpu, *spgd, vaddr); 825 pte_t *spte = spte_addr(cpu, *spgd, vaddr);
721 release_pte(*spte); 826 release_pte(*spte);
722 827
723 /* If they're setting this entry as dirty or accessed, 828 /*
724 * we might as well put that entry they've given us 829 * If they're setting this entry as dirty or accessed,
725 * in now. This shaves 10% off a 830 * we might as well put that entry they've given us in
726 * copy-on-write micro-benchmark. */ 831 * now. This shaves 10% off a copy-on-write
832 * micro-benchmark.
833 */
727 if (pte_flags(gpte) & (_PAGE_DIRTY | _PAGE_ACCESSED)) { 834 if (pte_flags(gpte) & (_PAGE_DIRTY | _PAGE_ACCESSED)) {
728 check_gpte(cpu, gpte); 835 check_gpte(cpu, gpte);
729 native_set_pte(spte, 836 native_set_pte(spte,
730 gpte_to_spte(cpu, gpte, 837 gpte_to_spte(cpu, gpte,
731 pte_flags(gpte) & _PAGE_DIRTY)); 838 pte_flags(gpte) & _PAGE_DIRTY));
732 } else 839 } else {
733 /* Otherwise kill it and we can demand_page() 840 /*
734 * it in later. */ 841 * Otherwise kill it and we can demand_page()
842 * it in later.
843 */
735 native_set_pte(spte, __pte(0)); 844 native_set_pte(spte, __pte(0));
845 }
736#ifdef CONFIG_X86_PAE 846#ifdef CONFIG_X86_PAE
737 } 847 }
738#endif 848#endif
739 } 849 }
740} 850}
741 851
742/*H:410 Updating a PTE entry is a little trickier. 852/*H:410
853 * Updating a PTE entry is a little trickier.
743 * 854 *
744 * We keep track of several different page tables (the Guest uses one for each 855 * We keep track of several different page tables (the Guest uses one for each
745 * process, so it makes sense to cache at least a few). Each of these have 856 * process, so it makes sense to cache at least a few). Each of these have
@@ -748,12 +859,15 @@ static void do_set_pte(struct lg_cpu *cpu, int idx,
748 * all the page tables, not just the current one. This is rare. 859 * all the page tables, not just the current one. This is rare.
749 * 860 *
750 * The benefit is that when we have to track a new page table, we can keep all 861 * The benefit is that when we have to track a new page table, we can keep all
751 * the kernel mappings. This speeds up context switch immensely. */ 862 * the kernel mappings. This speeds up context switch immensely.
863 */
752void guest_set_pte(struct lg_cpu *cpu, 864void guest_set_pte(struct lg_cpu *cpu,
753 unsigned long gpgdir, unsigned long vaddr, pte_t gpte) 865 unsigned long gpgdir, unsigned long vaddr, pte_t gpte)
754{ 866{
755 /* Kernel mappings must be changed on all top levels. Slow, but doesn't 867 /*
756 * happen often. */ 868 * Kernel mappings must be changed on all top levels. Slow, but doesn't
869 * happen often.
870 */
757 if (vaddr >= cpu->lg->kernel_address) { 871 if (vaddr >= cpu->lg->kernel_address) {
758 unsigned int i; 872 unsigned int i;
759 for (i = 0; i < ARRAY_SIZE(cpu->lg->pgdirs); i++) 873 for (i = 0; i < ARRAY_SIZE(cpu->lg->pgdirs); i++)
@@ -795,19 +909,25 @@ void guest_set_pgd(struct lguest *lg, unsigned long gpgdir, u32 idx)
795 /* ... throw it away. */ 909 /* ... throw it away. */
796 release_pgd(lg->pgdirs[pgdir].pgdir + idx); 910 release_pgd(lg->pgdirs[pgdir].pgdir + idx);
797} 911}
912
798#ifdef CONFIG_X86_PAE 913#ifdef CONFIG_X86_PAE
914/* For setting a mid-level, we just throw everything away. It's easy. */
799void guest_set_pmd(struct lguest *lg, unsigned long pmdp, u32 idx) 915void guest_set_pmd(struct lguest *lg, unsigned long pmdp, u32 idx)
800{ 916{
801 guest_pagetable_clear_all(&lg->cpus[0]); 917 guest_pagetable_clear_all(&lg->cpus[0]);
802} 918}
803#endif 919#endif
804 920
805/* Once we know how much memory we have we can construct simple identity 921/*H:505
806 * (which set virtual == physical) and linear mappings 922 * To get through boot, we construct simple identity page mappings (which
807 * which will get the Guest far enough into the boot to create its own. 923 * set virtual == physical) and linear mappings which will get the Guest far
924 * enough into the boot to create its own. The linear mapping means we
925 * simplify the Guest boot, but it makes assumptions about their PAGE_OFFSET,
926 * as you'll see.
808 * 927 *
809 * We lay them out of the way, just below the initrd (which is why we need to 928 * We lay them out of the way, just below the initrd (which is why we need to
810 * know its size here). */ 929 * know its size here).
930 */
811static unsigned long setup_pagetables(struct lguest *lg, 931static unsigned long setup_pagetables(struct lguest *lg,
812 unsigned long mem, 932 unsigned long mem,
813 unsigned long initrd_size) 933 unsigned long initrd_size)
@@ -825,8 +945,10 @@ static unsigned long setup_pagetables(struct lguest *lg,
825 unsigned int phys_linear; 945 unsigned int phys_linear;
826#endif 946#endif
827 947
828 /* We have mapped_pages frames to map, so we need 948 /*
829 * linear_pages page tables to map them. */ 949 * We have mapped_pages frames to map, so we need linear_pages page
950 * tables to map them.
951 */
830 mapped_pages = mem / PAGE_SIZE; 952 mapped_pages = mem / PAGE_SIZE;
831 linear_pages = (mapped_pages + PTRS_PER_PTE - 1) / PTRS_PER_PTE; 953 linear_pages = (mapped_pages + PTRS_PER_PTE - 1) / PTRS_PER_PTE;
832 954
@@ -837,10 +959,16 @@ static unsigned long setup_pagetables(struct lguest *lg,
837 linear = (void *)pgdir - linear_pages * PAGE_SIZE; 959 linear = (void *)pgdir - linear_pages * PAGE_SIZE;
838 960
839#ifdef CONFIG_X86_PAE 961#ifdef CONFIG_X86_PAE
962 /*
963 * And the single mid page goes below that. We only use one, but
964 * that's enough to map 1G, which definitely gets us through boot.
965 */
840 pmds = (void *)linear - PAGE_SIZE; 966 pmds = (void *)linear - PAGE_SIZE;
841#endif 967#endif
842 /* Linear mapping is easy: put every page's address into the 968 /*
843 * mapping in order. */ 969 * Linear mapping is easy: put every page's address into the
970 * mapping in order.
971 */
844 for (i = 0; i < mapped_pages; i++) { 972 for (i = 0; i < mapped_pages; i++) {
845 pte_t pte; 973 pte_t pte;
846 pte = pfn_pte(i, __pgprot(_PAGE_PRESENT|_PAGE_RW|_PAGE_USER)); 974 pte = pfn_pte(i, __pgprot(_PAGE_PRESENT|_PAGE_RW|_PAGE_USER));
@@ -848,11 +976,14 @@ static unsigned long setup_pagetables(struct lguest *lg,
848 return -EFAULT; 976 return -EFAULT;
849 } 977 }
850 978
851 /* The top level points to the linear page table pages above.
852 * We setup the identity and linear mappings here. */
853#ifdef CONFIG_X86_PAE 979#ifdef CONFIG_X86_PAE
980 /*
981 * Make the Guest PMD entries point to the corresponding place in the
982 * linear mapping (up to one page worth of PMD).
983 */
854 for (i = j = 0; i < mapped_pages && j < PTRS_PER_PMD; 984 for (i = j = 0; i < mapped_pages && j < PTRS_PER_PMD;
855 i += PTRS_PER_PTE, j++) { 985 i += PTRS_PER_PTE, j++) {
986 /* FIXME: native_set_pmd is overkill here. */
856 native_set_pmd(&pmd, __pmd(((unsigned long)(linear + i) 987 native_set_pmd(&pmd, __pmd(((unsigned long)(linear + i)
857 - mem_base) | _PAGE_PRESENT | _PAGE_RW | _PAGE_USER)); 988 - mem_base) | _PAGE_PRESENT | _PAGE_RW | _PAGE_USER));
858 989
@@ -860,18 +991,36 @@ static unsigned long setup_pagetables(struct lguest *lg,
860 return -EFAULT; 991 return -EFAULT;
861 } 992 }
862 993
994 /* One PGD entry, pointing to that PMD page. */
863 set_pgd(&pgd, __pgd(((u32)pmds - mem_base) | _PAGE_PRESENT)); 995 set_pgd(&pgd, __pgd(((u32)pmds - mem_base) | _PAGE_PRESENT));
996 /* Copy it in as the first PGD entry (ie. addresses 0-1G). */
864 if (copy_to_user(&pgdir[0], &pgd, sizeof(pgd)) != 0) 997 if (copy_to_user(&pgdir[0], &pgd, sizeof(pgd)) != 0)
865 return -EFAULT; 998 return -EFAULT;
999 /*
1000 * And the third PGD entry (ie. addresses 3G-4G).
1001 *
1002 * FIXME: This assumes that PAGE_OFFSET for the Guest is 0xC0000000.
1003 */
866 if (copy_to_user(&pgdir[3], &pgd, sizeof(pgd)) != 0) 1004 if (copy_to_user(&pgdir[3], &pgd, sizeof(pgd)) != 0)
867 return -EFAULT; 1005 return -EFAULT;
868#else 1006#else
1007 /*
1008 * The top level points to the linear page table pages above.
1009 * We setup the identity and linear mappings here.
1010 */
869 phys_linear = (unsigned long)linear - mem_base; 1011 phys_linear = (unsigned long)linear - mem_base;
870 for (i = 0; i < mapped_pages; i += PTRS_PER_PTE) { 1012 for (i = 0; i < mapped_pages; i += PTRS_PER_PTE) {
871 pgd_t pgd; 1013 pgd_t pgd;
1014 /*
1015 * Create a PGD entry which points to the right part of the
1016 * linear PTE pages.
1017 */
872 pgd = __pgd((phys_linear + i * sizeof(pte_t)) | 1018 pgd = __pgd((phys_linear + i * sizeof(pte_t)) |
873 (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER)); 1019 (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER));
874 1020
1021 /*
1022 * Copy it into the PGD page at 0 and PAGE_OFFSET.
1023 */
875 if (copy_to_user(&pgdir[i / PTRS_PER_PTE], &pgd, sizeof(pgd)) 1024 if (copy_to_user(&pgdir[i / PTRS_PER_PTE], &pgd, sizeof(pgd))
876 || copy_to_user(&pgdir[pgd_index(PAGE_OFFSET) 1025 || copy_to_user(&pgdir[pgd_index(PAGE_OFFSET)
877 + i / PTRS_PER_PTE], 1026 + i / PTRS_PER_PTE],
@@ -880,15 +1029,19 @@ static unsigned long setup_pagetables(struct lguest *lg,
880 } 1029 }
881#endif 1030#endif
882 1031
883 /* We return the top level (guest-physical) address: remember where 1032 /*
884 * this is. */ 1033 * We return the top level (guest-physical) address: we remember where
1034 * this is to write it into lguest_data when the Guest initializes.
1035 */
885 return (unsigned long)pgdir - mem_base; 1036 return (unsigned long)pgdir - mem_base;
886} 1037}
887 1038
888/*H:500 (vii) Setting up the page tables initially. 1039/*H:500
1040 * (vii) Setting up the page tables initially.
889 * 1041 *
890 * When a Guest is first created, the Launcher tells us where the toplevel of 1042 * When a Guest is first created, the Launcher tells us where the toplevel of
891 * its first page table is. We set some things up here: */ 1043 * its first page table is. We set some things up here:
1044 */
892int init_guest_pagetable(struct lguest *lg) 1045int init_guest_pagetable(struct lguest *lg)
893{ 1046{
894 u64 mem; 1047 u64 mem;
@@ -898,21 +1051,27 @@ int init_guest_pagetable(struct lguest *lg)
898 pgd_t *pgd; 1051 pgd_t *pgd;
899 pmd_t *pmd_table; 1052 pmd_t *pmd_table;
900#endif 1053#endif
901 /* Get the Guest memory size and the ramdisk size from the boot header 1054 /*
902 * located at lg->mem_base (Guest address 0). */ 1055 * Get the Guest memory size and the ramdisk size from the boot header
1056 * located at lg->mem_base (Guest address 0).
1057 */
903 if (copy_from_user(&mem, &boot->e820_map[0].size, sizeof(mem)) 1058 if (copy_from_user(&mem, &boot->e820_map[0].size, sizeof(mem))
904 || get_user(initrd_size, &boot->hdr.ramdisk_size)) 1059 || get_user(initrd_size, &boot->hdr.ramdisk_size))
905 return -EFAULT; 1060 return -EFAULT;
906 1061
907 /* We start on the first shadow page table, and give it a blank PGD 1062 /*
908 * page. */ 1063 * We start on the first shadow page table, and give it a blank PGD
1064 * page.
1065 */
909 lg->pgdirs[0].gpgdir = setup_pagetables(lg, mem, initrd_size); 1066 lg->pgdirs[0].gpgdir = setup_pagetables(lg, mem, initrd_size);
910 if (IS_ERR_VALUE(lg->pgdirs[0].gpgdir)) 1067 if (IS_ERR_VALUE(lg->pgdirs[0].gpgdir))
911 return lg->pgdirs[0].gpgdir; 1068 return lg->pgdirs[0].gpgdir;
912 lg->pgdirs[0].pgdir = (pgd_t *)get_zeroed_page(GFP_KERNEL); 1069 lg->pgdirs[0].pgdir = (pgd_t *)get_zeroed_page(GFP_KERNEL);
913 if (!lg->pgdirs[0].pgdir) 1070 if (!lg->pgdirs[0].pgdir)
914 return -ENOMEM; 1071 return -ENOMEM;
1072
915#ifdef CONFIG_X86_PAE 1073#ifdef CONFIG_X86_PAE
1074 /* For PAE, we also create the initial mid-level. */
916 pgd = lg->pgdirs[0].pgdir; 1075 pgd = lg->pgdirs[0].pgdir;
917 pmd_table = (pmd_t *) get_zeroed_page(GFP_KERNEL); 1076 pmd_table = (pmd_t *) get_zeroed_page(GFP_KERNEL);
918 if (!pmd_table) 1077 if (!pmd_table)
@@ -921,27 +1080,33 @@ int init_guest_pagetable(struct lguest *lg)
921 set_pgd(pgd + SWITCHER_PGD_INDEX, 1080 set_pgd(pgd + SWITCHER_PGD_INDEX,
922 __pgd(__pa(pmd_table) | _PAGE_PRESENT)); 1081 __pgd(__pa(pmd_table) | _PAGE_PRESENT));
923#endif 1082#endif
1083
1084 /* This is the current page table. */
924 lg->cpus[0].cpu_pgd = 0; 1085 lg->cpus[0].cpu_pgd = 0;
925 return 0; 1086 return 0;
926} 1087}
927 1088
928/* When the Guest calls LHCALL_LGUEST_INIT we do more setup. */ 1089/*H:508 When the Guest calls LHCALL_LGUEST_INIT we do more setup. */
929void page_table_guest_data_init(struct lg_cpu *cpu) 1090void page_table_guest_data_init(struct lg_cpu *cpu)
930{ 1091{
931 /* We get the kernel address: above this is all kernel memory. */ 1092 /* We get the kernel address: above this is all kernel memory. */
932 if (get_user(cpu->lg->kernel_address, 1093 if (get_user(cpu->lg->kernel_address,
933 &cpu->lg->lguest_data->kernel_address) 1094 &cpu->lg->lguest_data->kernel_address)
934 /* We tell the Guest that it can't use the top 2 or 4 MB 1095 /*
935 * of virtual addresses used by the Switcher. */ 1096 * We tell the Guest that it can't use the top 2 or 4 MB
1097 * of virtual addresses used by the Switcher.
1098 */
936 || put_user(RESERVE_MEM * 1024 * 1024, 1099 || put_user(RESERVE_MEM * 1024 * 1024,
937 &cpu->lg->lguest_data->reserve_mem) 1100 &cpu->lg->lguest_data->reserve_mem)
938 || put_user(cpu->lg->pgdirs[0].gpgdir, 1101 || put_user(cpu->lg->pgdirs[0].gpgdir,
939 &cpu->lg->lguest_data->pgdir)) 1102 &cpu->lg->lguest_data->pgdir))
940 kill_guest(cpu, "bad guest page %p", cpu->lg->lguest_data); 1103 kill_guest(cpu, "bad guest page %p", cpu->lg->lguest_data);
941 1104
942 /* In flush_user_mappings() we loop from 0 to 1105 /*
1106 * In flush_user_mappings() we loop from 0 to
943 * "pgd_index(lg->kernel_address)". This assumes it won't hit the 1107 * "pgd_index(lg->kernel_address)". This assumes it won't hit the
944 * Switcher mappings, so check that now. */ 1108 * Switcher mappings, so check that now.
1109 */
945#ifdef CONFIG_X86_PAE 1110#ifdef CONFIG_X86_PAE
946 if (pgd_index(cpu->lg->kernel_address) == SWITCHER_PGD_INDEX && 1111 if (pgd_index(cpu->lg->kernel_address) == SWITCHER_PGD_INDEX &&
947 pmd_index(cpu->lg->kernel_address) == SWITCHER_PMD_INDEX) 1112 pmd_index(cpu->lg->kernel_address) == SWITCHER_PMD_INDEX)
@@ -964,12 +1129,14 @@ void free_guest_pagetable(struct lguest *lg)
964 free_page((long)lg->pgdirs[i].pgdir); 1129 free_page((long)lg->pgdirs[i].pgdir);
965} 1130}
966 1131
967/*H:480 (vi) Mapping the Switcher when the Guest is about to run. 1132/*H:480
1133 * (vi) Mapping the Switcher when the Guest is about to run.
968 * 1134 *
969 * The Switcher and the two pages for this CPU need to be visible in the 1135 * The Switcher and the two pages for this CPU need to be visible in the
970 * Guest (and not the pages for other CPUs). We have the appropriate PTE pages 1136 * Guest (and not the pages for other CPUs). We have the appropriate PTE pages
971 * for each CPU already set up, we just need to hook them in now we know which 1137 * for each CPU already set up, we just need to hook them in now we know which
972 * Guest is about to run on this CPU. */ 1138 * Guest is about to run on this CPU.
1139 */
973void map_switcher_in_guest(struct lg_cpu *cpu, struct lguest_pages *pages) 1140void map_switcher_in_guest(struct lg_cpu *cpu, struct lguest_pages *pages)
974{ 1141{
975 pte_t *switcher_pte_page = __get_cpu_var(switcher_pte_pages); 1142 pte_t *switcher_pte_page = __get_cpu_var(switcher_pte_pages);
@@ -980,30 +1147,38 @@ void map_switcher_in_guest(struct lg_cpu *cpu, struct lguest_pages *pages)
980 pmd_t switcher_pmd; 1147 pmd_t switcher_pmd;
981 pmd_t *pmd_table; 1148 pmd_t *pmd_table;
982 1149
1150 /* FIXME: native_set_pmd is overkill here. */
983 native_set_pmd(&switcher_pmd, pfn_pmd(__pa(switcher_pte_page) >> 1151 native_set_pmd(&switcher_pmd, pfn_pmd(__pa(switcher_pte_page) >>
984 PAGE_SHIFT, PAGE_KERNEL_EXEC)); 1152 PAGE_SHIFT, PAGE_KERNEL_EXEC));
985 1153
1154 /* Figure out where the pmd page is, by reading the PGD, and converting
1155 * it to a virtual address. */
986 pmd_table = __va(pgd_pfn(cpu->lg-> 1156 pmd_table = __va(pgd_pfn(cpu->lg->
987 pgdirs[cpu->cpu_pgd].pgdir[SWITCHER_PGD_INDEX]) 1157 pgdirs[cpu->cpu_pgd].pgdir[SWITCHER_PGD_INDEX])
988 << PAGE_SHIFT); 1158 << PAGE_SHIFT);
1159 /* Now write it into the shadow page table. */
989 native_set_pmd(&pmd_table[SWITCHER_PMD_INDEX], switcher_pmd); 1160 native_set_pmd(&pmd_table[SWITCHER_PMD_INDEX], switcher_pmd);
990#else 1161#else
991 pgd_t switcher_pgd; 1162 pgd_t switcher_pgd;
992 1163
993 /* Make the last PGD entry for this Guest point to the Switcher's PTE 1164 /*
994 * page for this CPU (with appropriate flags). */ 1165 * Make the last PGD entry for this Guest point to the Switcher's PTE
1166 * page for this CPU (with appropriate flags).
1167 */
995 switcher_pgd = __pgd(__pa(switcher_pte_page) | __PAGE_KERNEL_EXEC); 1168 switcher_pgd = __pgd(__pa(switcher_pte_page) | __PAGE_KERNEL_EXEC);
996 1169
997 cpu->lg->pgdirs[cpu->cpu_pgd].pgdir[SWITCHER_PGD_INDEX] = switcher_pgd; 1170 cpu->lg->pgdirs[cpu->cpu_pgd].pgdir[SWITCHER_PGD_INDEX] = switcher_pgd;
998 1171
999#endif 1172#endif
1000 /* We also change the Switcher PTE page. When we're running the Guest, 1173 /*
1174 * We also change the Switcher PTE page. When we're running the Guest,
1001 * we want the Guest's "regs" page to appear where the first Switcher 1175 * we want the Guest's "regs" page to appear where the first Switcher
1002 * page for this CPU is. This is an optimization: when the Switcher 1176 * page for this CPU is. This is an optimization: when the Switcher
1003 * saves the Guest registers, it saves them into the first page of this 1177 * saves the Guest registers, it saves them into the first page of this
1004 * CPU's "struct lguest_pages": if we make sure the Guest's register 1178 * CPU's "struct lguest_pages": if we make sure the Guest's register
1005 * page is already mapped there, we don't have to copy them out 1179 * page is already mapped there, we don't have to copy them out
1006 * again. */ 1180 * again.
1181 */
1007 pfn = __pa(cpu->regs_page) >> PAGE_SHIFT; 1182 pfn = __pa(cpu->regs_page) >> PAGE_SHIFT;
1008 native_set_pte(&regs_pte, pfn_pte(pfn, PAGE_KERNEL)); 1183 native_set_pte(&regs_pte, pfn_pte(pfn, PAGE_KERNEL));
1009 native_set_pte(&switcher_pte_page[pte_index((unsigned long)pages)], 1184 native_set_pte(&switcher_pte_page[pte_index((unsigned long)pages)],
@@ -1019,10 +1194,12 @@ static void free_switcher_pte_pages(void)
1019 free_page((long)switcher_pte_page(i)); 1194 free_page((long)switcher_pte_page(i));
1020} 1195}
1021 1196
1022/*H:520 Setting up the Switcher PTE page for given CPU is fairly easy, given 1197/*H:520
1198 * Setting up the Switcher PTE page for given CPU is fairly easy, given
1023 * the CPU number and the "struct page"s for the Switcher code itself. 1199 * the CPU number and the "struct page"s for the Switcher code itself.
1024 * 1200 *
1025 * Currently the Switcher is less than a page long, so "pages" is always 1. */ 1201 * Currently the Switcher is less than a page long, so "pages" is always 1.
1202 */
1026static __init void populate_switcher_pte_page(unsigned int cpu, 1203static __init void populate_switcher_pte_page(unsigned int cpu,
1027 struct page *switcher_page[], 1204 struct page *switcher_page[],
1028 unsigned int pages) 1205 unsigned int pages)
@@ -1043,13 +1220,16 @@ static __init void populate_switcher_pte_page(unsigned int cpu,
1043 native_set_pte(&pte[i], pfn_pte(page_to_pfn(switcher_page[i]), 1220 native_set_pte(&pte[i], pfn_pte(page_to_pfn(switcher_page[i]),
1044 __pgprot(_PAGE_PRESENT|_PAGE_ACCESSED|_PAGE_RW))); 1221 __pgprot(_PAGE_PRESENT|_PAGE_ACCESSED|_PAGE_RW)));
1045 1222
1046 /* The second page contains the "struct lguest_ro_state", and is 1223 /*
1047 * read-only. */ 1224 * The second page contains the "struct lguest_ro_state", and is
1225 * read-only.
1226 */
1048 native_set_pte(&pte[i+1], pfn_pte(page_to_pfn(switcher_page[i+1]), 1227 native_set_pte(&pte[i+1], pfn_pte(page_to_pfn(switcher_page[i+1]),
1049 __pgprot(_PAGE_PRESENT|_PAGE_ACCESSED))); 1228 __pgprot(_PAGE_PRESENT|_PAGE_ACCESSED)));
1050} 1229}
1051 1230
1052/* We've made it through the page table code. Perhaps our tired brains are 1231/*
1232 * We've made it through the page table code. Perhaps our tired brains are
1053 * still processing the details, or perhaps we're simply glad it's over. 1233 * still processing the details, or perhaps we're simply glad it's over.
1054 * 1234 *
1055 * If nothing else, note that all this complexity in juggling shadow page tables 1235 * If nothing else, note that all this complexity in juggling shadow page tables
@@ -1058,10 +1238,13 @@ static __init void populate_switcher_pte_page(unsigned int cpu,
1058 * uses exotic direct Guest pagetable manipulation, and why both Intel and AMD 1238 * uses exotic direct Guest pagetable manipulation, and why both Intel and AMD
1059 * have implemented shadow page table support directly into hardware. 1239 * have implemented shadow page table support directly into hardware.
1060 * 1240 *
1061 * There is just one file remaining in the Host. */ 1241 * There is just one file remaining in the Host.
1242 */
1062 1243
1063/*H:510 At boot or module load time, init_pagetables() allocates and populates 1244/*H:510
1064 * the Switcher PTE page for each CPU. */ 1245 * At boot or module load time, init_pagetables() allocates and populates
1246 * the Switcher PTE page for each CPU.
1247 */
1065__init int init_pagetables(struct page **switcher_page, unsigned int pages) 1248__init int init_pagetables(struct page **switcher_page, unsigned int pages)
1066{ 1249{
1067 unsigned int i; 1250 unsigned int i;
diff --git a/drivers/lguest/segments.c b/drivers/lguest/segments.c
index 482ed5a1875..951c57b0a7e 100644
--- a/drivers/lguest/segments.c
+++ b/drivers/lguest/segments.c
@@ -1,4 +1,5 @@
1/*P:600 The x86 architecture has segments, which involve a table of descriptors 1/*P:600
2 * The x86 architecture has segments, which involve a table of descriptors
2 * which can be used to do funky things with virtual address interpretation. 3 * which can be used to do funky things with virtual address interpretation.
3 * We originally used to use segments so the Guest couldn't alter the 4 * We originally used to use segments so the Guest couldn't alter the
4 * Guest<->Host Switcher, and then we had to trim Guest segments, and restore 5 * Guest<->Host Switcher, and then we had to trim Guest segments, and restore
@@ -8,7 +9,8 @@
8 * 9 *
9 * In these modern times, the segment handling code consists of simple sanity 10 * In these modern times, the segment handling code consists of simple sanity
10 * checks, and the worst you'll experience reading this code is butterfly-rash 11 * checks, and the worst you'll experience reading this code is butterfly-rash
11 * from frolicking through its parklike serenity. :*/ 12 * from frolicking through its parklike serenity.
13:*/
12#include "lg.h" 14#include "lg.h"
13 15
14/*H:600 16/*H:600
@@ -41,10 +43,12 @@
41 * begin. 43 * begin.
42 */ 44 */
43 45
44/* There are several entries we don't let the Guest set. The TSS entry is the 46/*
47 * There are several entries we don't let the Guest set. The TSS entry is the
45 * "Task State Segment" which controls all kinds of delicate things. The 48 * "Task State Segment" which controls all kinds of delicate things. The
46 * LGUEST_CS and LGUEST_DS entries are reserved for the Switcher, and the 49 * LGUEST_CS and LGUEST_DS entries are reserved for the Switcher, and the
47 * the Guest can't be trusted to deal with double faults. */ 50 * the Guest can't be trusted to deal with double faults.
51 */
48static bool ignored_gdt(unsigned int num) 52static bool ignored_gdt(unsigned int num)
49{ 53{
50 return (num == GDT_ENTRY_TSS 54 return (num == GDT_ENTRY_TSS
@@ -53,42 +57,52 @@ static bool ignored_gdt(unsigned int num)
53 || num == GDT_ENTRY_DOUBLEFAULT_TSS); 57 || num == GDT_ENTRY_DOUBLEFAULT_TSS);
54} 58}
55 59
56/*H:630 Once the Guest gave us new GDT entries, we fix them up a little. We 60/*H:630
61 * Once the Guest gave us new GDT entries, we fix them up a little. We
57 * don't care if they're invalid: the worst that can happen is a General 62 * don't care if they're invalid: the worst that can happen is a General
58 * Protection Fault in the Switcher when it restores a Guest segment register 63 * Protection Fault in the Switcher when it restores a Guest segment register
59 * which tries to use that entry. Then we kill the Guest for causing such a 64 * which tries to use that entry. Then we kill the Guest for causing such a
60 * mess: the message will be "unhandled trap 256". */ 65 * mess: the message will be "unhandled trap 256".
66 */
61static void fixup_gdt_table(struct lg_cpu *cpu, unsigned start, unsigned end) 67static void fixup_gdt_table(struct lg_cpu *cpu, unsigned start, unsigned end)
62{ 68{
63 unsigned int i; 69 unsigned int i;
64 70
65 for (i = start; i < end; i++) { 71 for (i = start; i < end; i++) {
66 /* We never copy these ones to real GDT, so we don't care what 72 /*
67 * they say */ 73 * We never copy these ones to real GDT, so we don't care what
74 * they say
75 */
68 if (ignored_gdt(i)) 76 if (ignored_gdt(i))
69 continue; 77 continue;
70 78
71 /* Segment descriptors contain a privilege level: the Guest is 79 /*
80 * Segment descriptors contain a privilege level: the Guest is
72 * sometimes careless and leaves this as 0, even though it's 81 * sometimes careless and leaves this as 0, even though it's
73 * running at privilege level 1. If so, we fix it here. */ 82 * running at privilege level 1. If so, we fix it here.
83 */
74 if ((cpu->arch.gdt[i].b & 0x00006000) == 0) 84 if ((cpu->arch.gdt[i].b & 0x00006000) == 0)
75 cpu->arch.gdt[i].b |= (GUEST_PL << 13); 85 cpu->arch.gdt[i].b |= (GUEST_PL << 13);
76 86
77 /* Each descriptor has an "accessed" bit. If we don't set it 87 /*
88 * Each descriptor has an "accessed" bit. If we don't set it
78 * now, the CPU will try to set it when the Guest first loads 89 * now, the CPU will try to set it when the Guest first loads
79 * that entry into a segment register. But the GDT isn't 90 * that entry into a segment register. But the GDT isn't
80 * writable by the Guest, so bad things can happen. */ 91 * writable by the Guest, so bad things can happen.
92 */
81 cpu->arch.gdt[i].b |= 0x00000100; 93 cpu->arch.gdt[i].b |= 0x00000100;
82 } 94 }
83} 95}
84 96
85/*H:610 Like the IDT, we never simply use the GDT the Guest gives us. We keep 97/*H:610
98 * Like the IDT, we never simply use the GDT the Guest gives us. We keep
86 * a GDT for each CPU, and copy across the Guest's entries each time we want to 99 * a GDT for each CPU, and copy across the Guest's entries each time we want to
87 * run the Guest on that CPU. 100 * run the Guest on that CPU.
88 * 101 *
89 * This routine is called at boot or modprobe time for each CPU to set up the 102 * This routine is called at boot or modprobe time for each CPU to set up the
90 * constant GDT entries: the ones which are the same no matter what Guest we're 103 * constant GDT entries: the ones which are the same no matter what Guest we're
91 * running. */ 104 * running.
105 */
92void setup_default_gdt_entries(struct lguest_ro_state *state) 106void setup_default_gdt_entries(struct lguest_ro_state *state)
93{ 107{
94 struct desc_struct *gdt = state->guest_gdt; 108 struct desc_struct *gdt = state->guest_gdt;
@@ -98,30 +112,37 @@ void setup_default_gdt_entries(struct lguest_ro_state *state)
98 gdt[GDT_ENTRY_LGUEST_CS] = FULL_EXEC_SEGMENT; 112 gdt[GDT_ENTRY_LGUEST_CS] = FULL_EXEC_SEGMENT;
99 gdt[GDT_ENTRY_LGUEST_DS] = FULL_SEGMENT; 113 gdt[GDT_ENTRY_LGUEST_DS] = FULL_SEGMENT;
100 114
101 /* The TSS segment refers to the TSS entry for this particular CPU. 115 /*
116 * The TSS segment refers to the TSS entry for this particular CPU.
102 * Forgive the magic flags: the 0x8900 means the entry is Present, it's 117 * Forgive the magic flags: the 0x8900 means the entry is Present, it's
103 * privilege level 0 Available 386 TSS system segment, and the 0x67 118 * privilege level 0 Available 386 TSS system segment, and the 0x67
104 * means Saturn is eclipsed by Mercury in the twelfth house. */ 119 * means Saturn is eclipsed by Mercury in the twelfth house.
120 */
105 gdt[GDT_ENTRY_TSS].a = 0x00000067 | (tss << 16); 121 gdt[GDT_ENTRY_TSS].a = 0x00000067 | (tss << 16);
106 gdt[GDT_ENTRY_TSS].b = 0x00008900 | (tss & 0xFF000000) 122 gdt[GDT_ENTRY_TSS].b = 0x00008900 | (tss & 0xFF000000)
107 | ((tss >> 16) & 0x000000FF); 123 | ((tss >> 16) & 0x000000FF);
108} 124}
109 125
110/* This routine sets up the initial Guest GDT for booting. All entries start 126/*
111 * as 0 (unusable). */ 127 * This routine sets up the initial Guest GDT for booting. All entries start
128 * as 0 (unusable).
129 */
112void setup_guest_gdt(struct lg_cpu *cpu) 130void setup_guest_gdt(struct lg_cpu *cpu)
113{ 131{
114 /* Start with full 0-4G segments... */ 132 /*
133 * Start with full 0-4G segments...except the Guest is allowed to use
134 * them, so set the privilege level appropriately in the flags.
135 */
115 cpu->arch.gdt[GDT_ENTRY_KERNEL_CS] = FULL_EXEC_SEGMENT; 136 cpu->arch.gdt[GDT_ENTRY_KERNEL_CS] = FULL_EXEC_SEGMENT;
116 cpu->arch.gdt[GDT_ENTRY_KERNEL_DS] = FULL_SEGMENT; 137 cpu->arch.gdt[GDT_ENTRY_KERNEL_DS] = FULL_SEGMENT;
117 /* ...except the Guest is allowed to use them, so set the privilege
118 * level appropriately in the flags. */
119 cpu->arch.gdt[GDT_ENTRY_KERNEL_CS].b |= (GUEST_PL << 13); 138 cpu->arch.gdt[GDT_ENTRY_KERNEL_CS].b |= (GUEST_PL << 13);
120 cpu->arch.gdt[GDT_ENTRY_KERNEL_DS].b |= (GUEST_PL << 13); 139 cpu->arch.gdt[GDT_ENTRY_KERNEL_DS].b |= (GUEST_PL << 13);
121} 140}
122 141
123/*H:650 An optimization of copy_gdt(), for just the three "thead-local storage" 142/*H:650
124 * entries. */ 143 * An optimization of copy_gdt(), for just the three "thead-local storage"
144 * entries.
145 */
125void copy_gdt_tls(const struct lg_cpu *cpu, struct desc_struct *gdt) 146void copy_gdt_tls(const struct lg_cpu *cpu, struct desc_struct *gdt)
126{ 147{
127 unsigned int i; 148 unsigned int i;
@@ -130,26 +151,34 @@ void copy_gdt_tls(const struct lg_cpu *cpu, struct desc_struct *gdt)
130 gdt[i] = cpu->arch.gdt[i]; 151 gdt[i] = cpu->arch.gdt[i];
131} 152}
132 153
133/*H:640 When the Guest is run on a different CPU, or the GDT entries have 154/*H:640
134 * changed, copy_gdt() is called to copy the Guest's GDT entries across to this 155 * When the Guest is run on a different CPU, or the GDT entries have changed,
135 * CPU's GDT. */ 156 * copy_gdt() is called to copy the Guest's GDT entries across to this CPU's
157 * GDT.
158 */
136void copy_gdt(const struct lg_cpu *cpu, struct desc_struct *gdt) 159void copy_gdt(const struct lg_cpu *cpu, struct desc_struct *gdt)
137{ 160{
138 unsigned int i; 161 unsigned int i;
139 162
140 /* The default entries from setup_default_gdt_entries() are not 163 /*
141 * replaced. See ignored_gdt() above. */ 164 * The default entries from setup_default_gdt_entries() are not
165 * replaced. See ignored_gdt() above.
166 */
142 for (i = 0; i < GDT_ENTRIES; i++) 167 for (i = 0; i < GDT_ENTRIES; i++)
143 if (!ignored_gdt(i)) 168 if (!ignored_gdt(i))
144 gdt[i] = cpu->arch.gdt[i]; 169 gdt[i] = cpu->arch.gdt[i];
145} 170}
146 171
147/*H:620 This is where the Guest asks us to load a new GDT entry 172/*H:620
148 * (LHCALL_LOAD_GDT_ENTRY). We tweak the entry and copy it in. */ 173 * This is where the Guest asks us to load a new GDT entry
174 * (LHCALL_LOAD_GDT_ENTRY). We tweak the entry and copy it in.
175 */
149void load_guest_gdt_entry(struct lg_cpu *cpu, u32 num, u32 lo, u32 hi) 176void load_guest_gdt_entry(struct lg_cpu *cpu, u32 num, u32 lo, u32 hi)
150{ 177{
151 /* We assume the Guest has the same number of GDT entries as the 178 /*
152 * Host, otherwise we'd have to dynamically allocate the Guest GDT. */ 179 * We assume the Guest has the same number of GDT entries as the
180 * Host, otherwise we'd have to dynamically allocate the Guest GDT.
181 */
153 if (num >= ARRAY_SIZE(cpu->arch.gdt)) 182 if (num >= ARRAY_SIZE(cpu->arch.gdt))
154 kill_guest(cpu, "too many gdt entries %i", num); 183 kill_guest(cpu, "too many gdt entries %i", num);
155 184
@@ -157,15 +186,19 @@ void load_guest_gdt_entry(struct lg_cpu *cpu, u32 num, u32 lo, u32 hi)
157 cpu->arch.gdt[num].a = lo; 186 cpu->arch.gdt[num].a = lo;
158 cpu->arch.gdt[num].b = hi; 187 cpu->arch.gdt[num].b = hi;
159 fixup_gdt_table(cpu, num, num+1); 188 fixup_gdt_table(cpu, num, num+1);
160 /* Mark that the GDT changed so the core knows it has to copy it again, 189 /*
161 * even if the Guest is run on the same CPU. */ 190 * Mark that the GDT changed so the core knows it has to copy it again,
191 * even if the Guest is run on the same CPU.
192 */
162 cpu->changed |= CHANGED_GDT; 193 cpu->changed |= CHANGED_GDT;
163} 194}
164 195
165/* This is the fast-track version for just changing the three TLS entries. 196/*
197 * This is the fast-track version for just changing the three TLS entries.
166 * Remember that this happens on every context switch, so it's worth 198 * Remember that this happens on every context switch, so it's worth
167 * optimizing. But wouldn't it be neater to have a single hypercall to cover 199 * optimizing. But wouldn't it be neater to have a single hypercall to cover
168 * both cases? */ 200 * both cases?
201 */
169void guest_load_tls(struct lg_cpu *cpu, unsigned long gtls) 202void guest_load_tls(struct lg_cpu *cpu, unsigned long gtls)
170{ 203{
171 struct desc_struct *tls = &cpu->arch.gdt[GDT_ENTRY_TLS_MIN]; 204 struct desc_struct *tls = &cpu->arch.gdt[GDT_ENTRY_TLS_MIN];
@@ -175,7 +208,6 @@ void guest_load_tls(struct lg_cpu *cpu, unsigned long gtls)
175 /* Note that just the TLS entries have changed. */ 208 /* Note that just the TLS entries have changed. */
176 cpu->changed |= CHANGED_GDT_TLS; 209 cpu->changed |= CHANGED_GDT_TLS;
177} 210}
178/*:*/
179 211
180/*H:660 212/*H:660
181 * With this, we have finished the Host. 213 * With this, we have finished the Host.
diff --git a/drivers/lguest/x86/core.c b/drivers/lguest/x86/core.c
index eaf722fe309..6ae388849a3 100644
--- a/drivers/lguest/x86/core.c
+++ b/drivers/lguest/x86/core.c
@@ -17,13 +17,15 @@
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */ 19 */
20/*P:450 This file contains the x86-specific lguest code. It used to be all 20/*P:450
21 * This file contains the x86-specific lguest code. It used to be all
21 * mixed in with drivers/lguest/core.c but several foolhardy code slashers 22 * mixed in with drivers/lguest/core.c but several foolhardy code slashers
22 * wrestled most of the dependencies out to here in preparation for porting 23 * wrestled most of the dependencies out to here in preparation for porting
23 * lguest to other architectures (see what I mean by foolhardy?). 24 * lguest to other architectures (see what I mean by foolhardy?).
24 * 25 *
25 * This also contains a couple of non-obvious setup and teardown pieces which 26 * This also contains a couple of non-obvious setup and teardown pieces which
26 * were implemented after days of debugging pain. :*/ 27 * were implemented after days of debugging pain.
28:*/
27#include <linux/kernel.h> 29#include <linux/kernel.h>
28#include <linux/start_kernel.h> 30#include <linux/start_kernel.h>
29#include <linux/string.h> 31#include <linux/string.h>
@@ -82,25 +84,33 @@ static DEFINE_PER_CPU(struct lg_cpu *, last_cpu);
82 */ 84 */
83static void copy_in_guest_info(struct lg_cpu *cpu, struct lguest_pages *pages) 85static void copy_in_guest_info(struct lg_cpu *cpu, struct lguest_pages *pages)
84{ 86{
85 /* Copying all this data can be quite expensive. We usually run the 87 /*
88 * Copying all this data can be quite expensive. We usually run the
86 * same Guest we ran last time (and that Guest hasn't run anywhere else 89 * same Guest we ran last time (and that Guest hasn't run anywhere else
87 * meanwhile). If that's not the case, we pretend everything in the 90 * meanwhile). If that's not the case, we pretend everything in the
88 * Guest has changed. */ 91 * Guest has changed.
92 */
89 if (__get_cpu_var(last_cpu) != cpu || cpu->last_pages != pages) { 93 if (__get_cpu_var(last_cpu) != cpu || cpu->last_pages != pages) {
90 __get_cpu_var(last_cpu) = cpu; 94 __get_cpu_var(last_cpu) = cpu;
91 cpu->last_pages = pages; 95 cpu->last_pages = pages;
92 cpu->changed = CHANGED_ALL; 96 cpu->changed = CHANGED_ALL;
93 } 97 }
94 98
95 /* These copies are pretty cheap, so we do them unconditionally: */ 99 /*
96 /* Save the current Host top-level page directory. */ 100 * These copies are pretty cheap, so we do them unconditionally: */
101 /* Save the current Host top-level page directory.
102 */
97 pages->state.host_cr3 = __pa(current->mm->pgd); 103 pages->state.host_cr3 = __pa(current->mm->pgd);
98 /* Set up the Guest's page tables to see this CPU's pages (and no 104 /*
99 * other CPU's pages). */ 105 * Set up the Guest's page tables to see this CPU's pages (and no
106 * other CPU's pages).
107 */
100 map_switcher_in_guest(cpu, pages); 108 map_switcher_in_guest(cpu, pages);
101 /* Set up the two "TSS" members which tell the CPU what stack to use 109 /*
110 * Set up the two "TSS" members which tell the CPU what stack to use
102 * for traps which do directly into the Guest (ie. traps at privilege 111 * for traps which do directly into the Guest (ie. traps at privilege
103 * level 1). */ 112 * level 1).
113 */
104 pages->state.guest_tss.sp1 = cpu->esp1; 114 pages->state.guest_tss.sp1 = cpu->esp1;
105 pages->state.guest_tss.ss1 = cpu->ss1; 115 pages->state.guest_tss.ss1 = cpu->ss1;
106 116
@@ -125,97 +135,126 @@ static void run_guest_once(struct lg_cpu *cpu, struct lguest_pages *pages)
125 /* This is a dummy value we need for GCC's sake. */ 135 /* This is a dummy value we need for GCC's sake. */
126 unsigned int clobber; 136 unsigned int clobber;
127 137
128 /* Copy the guest-specific information into this CPU's "struct 138 /*
129 * lguest_pages". */ 139 * Copy the guest-specific information into this CPU's "struct
140 * lguest_pages".
141 */
130 copy_in_guest_info(cpu, pages); 142 copy_in_guest_info(cpu, pages);
131 143
132 /* Set the trap number to 256 (impossible value). If we fault while 144 /*
145 * Set the trap number to 256 (impossible value). If we fault while
133 * switching to the Guest (bad segment registers or bug), this will 146 * switching to the Guest (bad segment registers or bug), this will
134 * cause us to abort the Guest. */ 147 * cause us to abort the Guest.
148 */
135 cpu->regs->trapnum = 256; 149 cpu->regs->trapnum = 256;
136 150
137 /* Now: we push the "eflags" register on the stack, then do an "lcall". 151 /*
152 * Now: we push the "eflags" register on the stack, then do an "lcall".
138 * This is how we change from using the kernel code segment to using 153 * This is how we change from using the kernel code segment to using
139 * the dedicated lguest code segment, as well as jumping into the 154 * the dedicated lguest code segment, as well as jumping into the
140 * Switcher. 155 * Switcher.
141 * 156 *
142 * The lcall also pushes the old code segment (KERNEL_CS) onto the 157 * The lcall also pushes the old code segment (KERNEL_CS) onto the
143 * stack, then the address of this call. This stack layout happens to 158 * stack, then the address of this call. This stack layout happens to
144 * exactly match the stack layout created by an interrupt... */ 159 * exactly match the stack layout created by an interrupt...
160 */
145 asm volatile("pushf; lcall *lguest_entry" 161 asm volatile("pushf; lcall *lguest_entry"
146 /* This is how we tell GCC that %eax ("a") and %ebx ("b") 162 /*
147 * are changed by this routine. The "=" means output. */ 163 * This is how we tell GCC that %eax ("a") and %ebx ("b")
164 * are changed by this routine. The "=" means output.
165 */
148 : "=a"(clobber), "=b"(clobber) 166 : "=a"(clobber), "=b"(clobber)
149 /* %eax contains the pages pointer. ("0" refers to the 167 /*
168 * %eax contains the pages pointer. ("0" refers to the
150 * 0-th argument above, ie "a"). %ebx contains the 169 * 0-th argument above, ie "a"). %ebx contains the
151 * physical address of the Guest's top-level page 170 * physical address of the Guest's top-level page
152 * directory. */ 171 * directory.
172 */
153 : "0"(pages), "1"(__pa(cpu->lg->pgdirs[cpu->cpu_pgd].pgdir)) 173 : "0"(pages), "1"(__pa(cpu->lg->pgdirs[cpu->cpu_pgd].pgdir))
154 /* We tell gcc that all these registers could change, 174 /*
175 * We tell gcc that all these registers could change,
155 * which means we don't have to save and restore them in 176 * which means we don't have to save and restore them in
156 * the Switcher. */ 177 * the Switcher.
178 */
157 : "memory", "%edx", "%ecx", "%edi", "%esi"); 179 : "memory", "%edx", "%ecx", "%edi", "%esi");
158} 180}
159/*:*/ 181/*:*/
160 182
161/*M:002 There are hooks in the scheduler which we can register to tell when we 183/*M:002
184 * There are hooks in the scheduler which we can register to tell when we
162 * get kicked off the CPU (preempt_notifier_register()). This would allow us 185 * get kicked off the CPU (preempt_notifier_register()). This would allow us
163 * to lazily disable SYSENTER which would regain some performance, and should 186 * to lazily disable SYSENTER which would regain some performance, and should
164 * also simplify copy_in_guest_info(). Note that we'd still need to restore 187 * also simplify copy_in_guest_info(). Note that we'd still need to restore
165 * things when we exit to Launcher userspace, but that's fairly easy. 188 * things when we exit to Launcher userspace, but that's fairly easy.
166 * 189 *
167 * We could also try using this hooks for PGE, but that might be too expensive. 190 * We could also try using these hooks for PGE, but that might be too expensive.
168 * 191 *
169 * The hooks were designed for KVM, but we can also put them to good use. :*/ 192 * The hooks were designed for KVM, but we can also put them to good use.
193:*/
170 194
171/*H:040 This is the i386-specific code to setup and run the Guest. Interrupts 195/*H:040
172 * are disabled: we own the CPU. */ 196 * This is the i386-specific code to setup and run the Guest. Interrupts
197 * are disabled: we own the CPU.
198 */
173void lguest_arch_run_guest(struct lg_cpu *cpu) 199void lguest_arch_run_guest(struct lg_cpu *cpu)
174{ 200{
175 /* Remember the awfully-named TS bit? If the Guest has asked to set it 201 /*
202 * Remember the awfully-named TS bit? If the Guest has asked to set it
176 * we set it now, so we can trap and pass that trap to the Guest if it 203 * we set it now, so we can trap and pass that trap to the Guest if it
177 * uses the FPU. */ 204 * uses the FPU.
205 */
178 if (cpu->ts) 206 if (cpu->ts)
179 unlazy_fpu(current); 207 unlazy_fpu(current);
180 208
181 /* SYSENTER is an optimized way of doing system calls. We can't allow 209 /*
210 * 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 211 * it because it always jumps to privilege level 0. A normal Guest
183 * won't try it because we don't advertise it in CPUID, but a malicious 212 * won't try it because we don't advertise it in CPUID, but a malicious
184 * Guest (or malicious Guest userspace program) could, so we tell the 213 * Guest (or malicious Guest userspace program) could, so we tell the
185 * CPU to disable it before running the Guest. */ 214 * CPU to disable it before running the Guest.
215 */
186 if (boot_cpu_has(X86_FEATURE_SEP)) 216 if (boot_cpu_has(X86_FEATURE_SEP))
187 wrmsr(MSR_IA32_SYSENTER_CS, 0, 0); 217 wrmsr(MSR_IA32_SYSENTER_CS, 0, 0);
188 218
189 /* Now we actually run the Guest. It will return when something 219 /*
220 * Now we actually run the Guest. It will return when something
190 * interesting happens, and we can examine its registers to see what it 221 * interesting happens, and we can examine its registers to see what it
191 * was doing. */ 222 * was doing.
223 */
192 run_guest_once(cpu, lguest_pages(raw_smp_processor_id())); 224 run_guest_once(cpu, lguest_pages(raw_smp_processor_id()));
193 225
194 /* Note that the "regs" structure contains two extra entries which are 226 /*
227 * Note that the "regs" structure contains two extra entries which are
195 * not really registers: a trap number which says what interrupt or 228 * not really registers: a trap number which says what interrupt or
196 * trap made the switcher code come back, and an error code which some 229 * trap made the switcher code come back, and an error code which some
197 * traps set. */ 230 * traps set.
231 */
198 232
199 /* Restore SYSENTER if it's supposed to be on. */ 233 /* Restore SYSENTER if it's supposed to be on. */
200 if (boot_cpu_has(X86_FEATURE_SEP)) 234 if (boot_cpu_has(X86_FEATURE_SEP))
201 wrmsr(MSR_IA32_SYSENTER_CS, __KERNEL_CS, 0); 235 wrmsr(MSR_IA32_SYSENTER_CS, __KERNEL_CS, 0);
202 236
203 /* If the Guest page faulted, then the cr2 register will tell us the 237 /*
238 * If the Guest page faulted, then the cr2 register will tell us the
204 * bad virtual address. We have to grab this now, because once we 239 * bad virtual address. We have to grab this now, because once we
205 * re-enable interrupts an interrupt could fault and thus overwrite 240 * re-enable interrupts an interrupt could fault and thus overwrite
206 * cr2, or we could even move off to a different CPU. */ 241 * cr2, or we could even move off to a different CPU.
242 */
207 if (cpu->regs->trapnum == 14) 243 if (cpu->regs->trapnum == 14)
208 cpu->arch.last_pagefault = read_cr2(); 244 cpu->arch.last_pagefault = read_cr2();
209 /* Similarly, if we took a trap because the Guest used the FPU, 245 /*
246 * Similarly, if we took a trap because the Guest used the FPU,
210 * we have to restore the FPU it expects to see. 247 * we have to restore the FPU it expects to see.
211 * math_state_restore() may sleep and we may even move off to 248 * math_state_restore() may sleep and we may even move off to
212 * a different CPU. So all the critical stuff should be done 249 * a different CPU. So all the critical stuff should be done
213 * before this. */ 250 * before this.
251 */
214 else if (cpu->regs->trapnum == 7) 252 else if (cpu->regs->trapnum == 7)
215 math_state_restore(); 253 math_state_restore();
216} 254}
217 255
218/*H:130 Now we've examined the hypercall code; our Guest can make requests. 256/*H:130
257 * Now we've examined the hypercall code; our Guest can make requests.
219 * Our Guest is usually so well behaved; it never tries to do things it isn't 258 * Our Guest is usually so well behaved; it never tries to do things it isn't
220 * allowed to, and uses hypercalls instead. Unfortunately, Linux's paravirtual 259 * allowed to, and uses hypercalls instead. Unfortunately, Linux's paravirtual
221 * infrastructure isn't quite complete, because it doesn't contain replacements 260 * infrastructure isn't quite complete, because it doesn't contain replacements
@@ -225,26 +264,33 @@ void lguest_arch_run_guest(struct lg_cpu *cpu)
225 * 264 *
226 * When the Guest uses one of these instructions, we get a trap (General 265 * When the Guest uses one of these instructions, we get a trap (General
227 * Protection Fault) and come here. We see if it's one of those troublesome 266 * Protection Fault) and come here. We see if it's one of those troublesome
228 * instructions and skip over it. We return true if we did. */ 267 * instructions and skip over it. We return true if we did.
268 */
229static int emulate_insn(struct lg_cpu *cpu) 269static int emulate_insn(struct lg_cpu *cpu)
230{ 270{
231 u8 insn; 271 u8 insn;
232 unsigned int insnlen = 0, in = 0, shift = 0; 272 unsigned int insnlen = 0, in = 0, shift = 0;
233 /* The eip contains the *virtual* address of the Guest's instruction: 273 /*
234 * guest_pa just subtracts the Guest's page_offset. */ 274 * The eip contains the *virtual* address of the Guest's instruction:
275 * guest_pa just subtracts the Guest's page_offset.
276 */
235 unsigned long physaddr = guest_pa(cpu, cpu->regs->eip); 277 unsigned long physaddr = guest_pa(cpu, cpu->regs->eip);
236 278
237 /* This must be the Guest kernel trying to do something, not userspace! 279 /*
280 * This must be the Guest kernel trying to do something, not userspace!
238 * The bottom two bits of the CS segment register are the privilege 281 * The bottom two bits of the CS segment register are the privilege
239 * level. */ 282 * level.
283 */
240 if ((cpu->regs->cs & 3) != GUEST_PL) 284 if ((cpu->regs->cs & 3) != GUEST_PL)
241 return 0; 285 return 0;
242 286
243 /* Decoding x86 instructions is icky. */ 287 /* Decoding x86 instructions is icky. */
244 insn = lgread(cpu, physaddr, u8); 288 insn = lgread(cpu, physaddr, u8);
245 289
246 /* 0x66 is an "operand prefix". It means it's using the upper 16 bits 290 /*
247 of the eax register. */ 291 * 0x66 is an "operand prefix". It means it's using the upper 16 bits
292 * of the eax register.
293 */
248 if (insn == 0x66) { 294 if (insn == 0x66) {
249 shift = 16; 295 shift = 16;
250 /* The instruction is 1 byte so far, read the next byte. */ 296 /* The instruction is 1 byte so far, read the next byte. */
@@ -252,8 +298,10 @@ static int emulate_insn(struct lg_cpu *cpu)
252 insn = lgread(cpu, physaddr + insnlen, u8); 298 insn = lgread(cpu, physaddr + insnlen, u8);
253 } 299 }
254 300
255 /* We can ignore the lower bit for the moment and decode the 4 opcodes 301 /*
256 * we need to emulate. */ 302 * We can ignore the lower bit for the moment and decode the 4 opcodes
303 * we need to emulate.
304 */
257 switch (insn & 0xFE) { 305 switch (insn & 0xFE) {
258 case 0xE4: /* in <next byte>,%al */ 306 case 0xE4: /* in <next byte>,%al */
259 insnlen += 2; 307 insnlen += 2;
@@ -274,9 +322,11 @@ static int emulate_insn(struct lg_cpu *cpu)
274 return 0; 322 return 0;
275 } 323 }
276 324
277 /* If it was an "IN" instruction, they expect the result to be read 325 /*
326 * If it was an "IN" instruction, they expect the result to be read
278 * into %eax, so we change %eax. We always return all-ones, which 327 * into %eax, so we change %eax. We always return all-ones, which
279 * traditionally means "there's nothing there". */ 328 * traditionally means "there's nothing there".
329 */
280 if (in) { 330 if (in) {
281 /* Lower bit tells is whether it's a 16 or 32 bit access */ 331 /* Lower bit tells is whether it's a 16 or 32 bit access */
282 if (insn & 0x1) 332 if (insn & 0x1)
@@ -290,7 +340,8 @@ static int emulate_insn(struct lg_cpu *cpu)
290 return 1; 340 return 1;
291} 341}
292 342
293/* Our hypercalls mechanism used to be based on direct software interrupts. 343/*
344 * Our hypercalls mechanism used to be based on direct software interrupts.
294 * After Anthony's "Refactor hypercall infrastructure" kvm patch, we decided to 345 * After Anthony's "Refactor hypercall infrastructure" kvm patch, we decided to
295 * change over to using kvm hypercalls. 346 * change over to using kvm hypercalls.
296 * 347 *
@@ -318,16 +369,20 @@ static int emulate_insn(struct lg_cpu *cpu)
318 */ 369 */
319static void rewrite_hypercall(struct lg_cpu *cpu) 370static void rewrite_hypercall(struct lg_cpu *cpu)
320{ 371{
321 /* This are the opcodes we use to patch the Guest. The opcode for "int 372 /*
373 * This are the opcodes we use to patch the Guest. The opcode for "int
322 * $0x1f" is "0xcd 0x1f" but vmcall instruction is 3 bytes long, so we 374 * $0x1f" is "0xcd 0x1f" but vmcall instruction is 3 bytes long, so we
323 * complete the sequence with a NOP (0x90). */ 375 * complete the sequence with a NOP (0x90).
376 */
324 u8 insn[3] = {0xcd, 0x1f, 0x90}; 377 u8 insn[3] = {0xcd, 0x1f, 0x90};
325 378
326 __lgwrite(cpu, guest_pa(cpu, cpu->regs->eip), insn, sizeof(insn)); 379 __lgwrite(cpu, guest_pa(cpu, cpu->regs->eip), insn, sizeof(insn));
327 /* The above write might have caused a copy of that page to be made 380 /*
381 * The above write might have caused a copy of that page to be made
328 * (if it was read-only). We need to make sure the Guest has 382 * (if it was read-only). We need to make sure the Guest has
329 * up-to-date pagetables. As this doesn't happen often, we can just 383 * up-to-date pagetables. As this doesn't happen often, we can just
330 * drop them all. */ 384 * drop them all.
385 */
331 guest_pagetable_clear_all(cpu); 386 guest_pagetable_clear_all(cpu);
332} 387}
333 388
@@ -335,9 +390,11 @@ static bool is_hypercall(struct lg_cpu *cpu)
335{ 390{
336 u8 insn[3]; 391 u8 insn[3];
337 392
338 /* This must be the Guest kernel trying to do something. 393 /*
394 * This must be the Guest kernel trying to do something.
339 * The bottom two bits of the CS segment register are the privilege 395 * The bottom two bits of the CS segment register are the privilege
340 * level. */ 396 * level.
397 */
341 if ((cpu->regs->cs & 3) != GUEST_PL) 398 if ((cpu->regs->cs & 3) != GUEST_PL)
342 return false; 399 return false;
343 400
@@ -351,86 +408,105 @@ void lguest_arch_handle_trap(struct lg_cpu *cpu)
351{ 408{
352 switch (cpu->regs->trapnum) { 409 switch (cpu->regs->trapnum) {
353 case 13: /* We've intercepted a General Protection Fault. */ 410 case 13: /* We've intercepted a General Protection Fault. */
354 /* Check if this was one of those annoying IN or OUT 411 /*
412 * Check if this was one of those annoying IN or OUT
355 * instructions which we need to emulate. If so, we just go 413 * instructions which we need to emulate. If so, we just go
356 * back into the Guest after we've done it. */ 414 * back into the Guest after we've done it.
415 */
357 if (cpu->regs->errcode == 0) { 416 if (cpu->regs->errcode == 0) {
358 if (emulate_insn(cpu)) 417 if (emulate_insn(cpu))
359 return; 418 return;
360 } 419 }
361 /* If KVM is active, the vmcall instruction triggers a 420 /*
362 * General Protection Fault. Normally it triggers an 421 * If KVM is active, the vmcall instruction triggers a General
363 * invalid opcode fault (6): */ 422 * Protection Fault. Normally it triggers an invalid opcode
423 * fault (6):
424 */
364 case 6: 425 case 6:
365 /* We need to check if ring == GUEST_PL and 426 /*
366 * faulting instruction == vmcall. */ 427 * We need to check if ring == GUEST_PL and faulting
428 * instruction == vmcall.
429 */
367 if (is_hypercall(cpu)) { 430 if (is_hypercall(cpu)) {
368 rewrite_hypercall(cpu); 431 rewrite_hypercall(cpu);
369 return; 432 return;
370 } 433 }
371 break; 434 break;
372 case 14: /* We've intercepted a Page Fault. */ 435 case 14: /* We've intercepted a Page Fault. */
373 /* The Guest accessed a virtual address that wasn't mapped. 436 /*
437 * The Guest accessed a virtual address that wasn't mapped.
374 * This happens a lot: we don't actually set up most of the page 438 * This happens a lot: we don't actually set up most of the page
375 * tables for the Guest at all when we start: as it runs it asks 439 * tables for the Guest at all when we start: as it runs it asks
376 * for more and more, and we set them up as required. In this 440 * for more and more, and we set them up as required. In this
377 * case, we don't even tell the Guest that the fault happened. 441 * case, we don't even tell the Guest that the fault happened.
378 * 442 *
379 * The errcode tells whether this was a read or a write, and 443 * The errcode tells whether this was a read or a write, and
380 * whether kernel or userspace code. */ 444 * whether kernel or userspace code.
445 */
381 if (demand_page(cpu, cpu->arch.last_pagefault, 446 if (demand_page(cpu, cpu->arch.last_pagefault,
382 cpu->regs->errcode)) 447 cpu->regs->errcode))
383 return; 448 return;
384 449
385 /* OK, it's really not there (or not OK): the Guest needs to 450 /*
451 * OK, it's really not there (or not OK): the Guest needs to
386 * know. We write out the cr2 value so it knows where the 452 * know. We write out the cr2 value so it knows where the
387 * fault occurred. 453 * fault occurred.
388 * 454 *
389 * Note that if the Guest were really messed up, this could 455 * Note that if the Guest were really messed up, this could
390 * happen before it's done the LHCALL_LGUEST_INIT hypercall, so 456 * happen before it's done the LHCALL_LGUEST_INIT hypercall, so
391 * lg->lguest_data could be NULL */ 457 * lg->lguest_data could be NULL
458 */
392 if (cpu->lg->lguest_data && 459 if (cpu->lg->lguest_data &&
393 put_user(cpu->arch.last_pagefault, 460 put_user(cpu->arch.last_pagefault,
394 &cpu->lg->lguest_data->cr2)) 461 &cpu->lg->lguest_data->cr2))
395 kill_guest(cpu, "Writing cr2"); 462 kill_guest(cpu, "Writing cr2");
396 break; 463 break;
397 case 7: /* We've intercepted a Device Not Available fault. */ 464 case 7: /* We've intercepted a Device Not Available fault. */
398 /* If the Guest doesn't want to know, we already restored the 465 /*
399 * Floating Point Unit, so we just continue without telling 466 * If the Guest doesn't want to know, we already restored the
400 * it. */ 467 * Floating Point Unit, so we just continue without telling it.
468 */
401 if (!cpu->ts) 469 if (!cpu->ts)
402 return; 470 return;
403 break; 471 break;
404 case 32 ... 255: 472 case 32 ... 255:
405 /* These values mean a real interrupt occurred, in which case 473 /*
474 * These values mean a real interrupt occurred, in which case
406 * the Host handler has already been run. We just do a 475 * the Host handler has already been run. We just do a
407 * friendly check if another process should now be run, then 476 * friendly check if another process should now be run, then
408 * return to run the Guest again */ 477 * return to run the Guest again
478 */
409 cond_resched(); 479 cond_resched();
410 return; 480 return;
411 case LGUEST_TRAP_ENTRY: 481 case LGUEST_TRAP_ENTRY:
412 /* Our 'struct hcall_args' maps directly over our regs: we set 482 /*
413 * up the pointer now to indicate a hypercall is pending. */ 483 * Our 'struct hcall_args' maps directly over our regs: we set
484 * up the pointer now to indicate a hypercall is pending.
485 */
414 cpu->hcall = (struct hcall_args *)cpu->regs; 486 cpu->hcall = (struct hcall_args *)cpu->regs;
415 return; 487 return;
416 } 488 }
417 489
418 /* We didn't handle the trap, so it needs to go to the Guest. */ 490 /* We didn't handle the trap, so it needs to go to the Guest. */
419 if (!deliver_trap(cpu, cpu->regs->trapnum)) 491 if (!deliver_trap(cpu, cpu->regs->trapnum))
420 /* If the Guest doesn't have a handler (either it hasn't 492 /*
493 * If the Guest doesn't have a handler (either it hasn't
421 * registered any yet, or it's one of the faults we don't let 494 * registered any yet, or it's one of the faults we don't let
422 * it handle), it dies with this cryptic error message. */ 495 * it handle), it dies with this cryptic error message.
496 */
423 kill_guest(cpu, "unhandled trap %li at %#lx (%#lx)", 497 kill_guest(cpu, "unhandled trap %li at %#lx (%#lx)",
424 cpu->regs->trapnum, cpu->regs->eip, 498 cpu->regs->trapnum, cpu->regs->eip,
425 cpu->regs->trapnum == 14 ? cpu->arch.last_pagefault 499 cpu->regs->trapnum == 14 ? cpu->arch.last_pagefault
426 : cpu->regs->errcode); 500 : cpu->regs->errcode);
427} 501}
428 502
429/* Now we can look at each of the routines this calls, in increasing order of 503/*
504 * Now we can look at each of the routines this calls, in increasing order of
430 * complexity: do_hypercalls(), emulate_insn(), maybe_do_interrupt(), 505 * complexity: do_hypercalls(), emulate_insn(), maybe_do_interrupt(),
431 * deliver_trap() and demand_page(). After all those, we'll be ready to 506 * deliver_trap() and demand_page(). After all those, we'll be ready to
432 * examine the Switcher, and our philosophical understanding of the Host/Guest 507 * examine the Switcher, and our philosophical understanding of the Host/Guest
433 * duality will be complete. :*/ 508 * duality will be complete.
509:*/
434static void adjust_pge(void *on) 510static void adjust_pge(void *on)
435{ 511{
436 if (on) 512 if (on)
@@ -439,13 +515,16 @@ static void adjust_pge(void *on)
439 write_cr4(read_cr4() & ~X86_CR4_PGE); 515 write_cr4(read_cr4() & ~X86_CR4_PGE);
440} 516}
441 517
442/*H:020 Now the Switcher is mapped and every thing else is ready, we need to do 518/*H:020
443 * some more i386-specific initialization. */ 519 * Now the Switcher is mapped and every thing else is ready, we need to do
520 * some more i386-specific initialization.
521 */
444void __init lguest_arch_host_init(void) 522void __init lguest_arch_host_init(void)
445{ 523{
446 int i; 524 int i;
447 525
448 /* Most of the i386/switcher.S doesn't care that it's been moved; on 526 /*
527 * Most of the i386/switcher.S doesn't care that it's been moved; on
449 * Intel, jumps are relative, and it doesn't access any references to 528 * Intel, jumps are relative, and it doesn't access any references to
450 * external code or data. 529 * external code or data.
451 * 530 *
@@ -453,7 +532,8 @@ void __init lguest_arch_host_init(void)
453 * addresses are placed in a table (default_idt_entries), so we need to 532 * addresses are placed in a table (default_idt_entries), so we need to
454 * update the table with the new addresses. switcher_offset() is a 533 * update the table with the new addresses. switcher_offset() is a
455 * convenience function which returns the distance between the 534 * convenience function which returns the distance between the
456 * compiled-in switcher code and the high-mapped copy we just made. */ 535 * compiled-in switcher code and the high-mapped copy we just made.
536 */
457 for (i = 0; i < IDT_ENTRIES; i++) 537 for (i = 0; i < IDT_ENTRIES; i++)
458 default_idt_entries[i] += switcher_offset(); 538 default_idt_entries[i] += switcher_offset();
459 539
@@ -468,63 +548,81 @@ void __init lguest_arch_host_init(void)
468 for_each_possible_cpu(i) { 548 for_each_possible_cpu(i) {
469 /* lguest_pages() returns this CPU's two pages. */ 549 /* lguest_pages() returns this CPU's two pages. */
470 struct lguest_pages *pages = lguest_pages(i); 550 struct lguest_pages *pages = lguest_pages(i);
471 /* This is a convenience pointer to make the code fit one 551 /* This is a convenience pointer to make the code neater. */
472 * statement to a line. */
473 struct lguest_ro_state *state = &pages->state; 552 struct lguest_ro_state *state = &pages->state;
474 553
475 /* The Global Descriptor Table: the Host has a different one 554 /*
555 * The Global Descriptor Table: the Host has a different one
476 * for each CPU. We keep a descriptor for the GDT which says 556 * for each CPU. We keep a descriptor for the GDT which says
477 * where it is and how big it is (the size is actually the last 557 * where it is and how big it is (the size is actually the last
478 * byte, not the size, hence the "-1"). */ 558 * byte, not the size, hence the "-1").
559 */
479 state->host_gdt_desc.size = GDT_SIZE-1; 560 state->host_gdt_desc.size = GDT_SIZE-1;
480 state->host_gdt_desc.address = (long)get_cpu_gdt_table(i); 561 state->host_gdt_desc.address = (long)get_cpu_gdt_table(i);
481 562
482 /* All CPUs on the Host use the same Interrupt Descriptor 563 /*
564 * All CPUs on the Host use the same Interrupt Descriptor
483 * Table, so we just use store_idt(), which gets this CPU's IDT 565 * Table, so we just use store_idt(), which gets this CPU's IDT
484 * descriptor. */ 566 * descriptor.
567 */
485 store_idt(&state->host_idt_desc); 568 store_idt(&state->host_idt_desc);
486 569
487 /* The descriptors for the Guest's GDT and IDT can be filled 570 /*
571 * The descriptors for the Guest's GDT and IDT can be filled
488 * out now, too. We copy the GDT & IDT into ->guest_gdt and 572 * out now, too. We copy the GDT & IDT into ->guest_gdt and
489 * ->guest_idt before actually running the Guest. */ 573 * ->guest_idt before actually running the Guest.
574 */
490 state->guest_idt_desc.size = sizeof(state->guest_idt)-1; 575 state->guest_idt_desc.size = sizeof(state->guest_idt)-1;
491 state->guest_idt_desc.address = (long)&state->guest_idt; 576 state->guest_idt_desc.address = (long)&state->guest_idt;
492 state->guest_gdt_desc.size = sizeof(state->guest_gdt)-1; 577 state->guest_gdt_desc.size = sizeof(state->guest_gdt)-1;
493 state->guest_gdt_desc.address = (long)&state->guest_gdt; 578 state->guest_gdt_desc.address = (long)&state->guest_gdt;
494 579
495 /* We know where we want the stack to be when the Guest enters 580 /*
581 * We know where we want the stack to be when the Guest enters
496 * the Switcher: in pages->regs. The stack grows upwards, so 582 * the Switcher: in pages->regs. The stack grows upwards, so
497 * we start it at the end of that structure. */ 583 * we start it at the end of that structure.
584 */
498 state->guest_tss.sp0 = (long)(&pages->regs + 1); 585 state->guest_tss.sp0 = (long)(&pages->regs + 1);
499 /* And this is the GDT entry to use for the stack: we keep a 586 /*
500 * couple of special LGUEST entries. */ 587 * And this is the GDT entry to use for the stack: we keep a
588 * couple of special LGUEST entries.
589 */
501 state->guest_tss.ss0 = LGUEST_DS; 590 state->guest_tss.ss0 = LGUEST_DS;
502 591
503 /* x86 can have a finegrained bitmap which indicates what I/O 592 /*
593 * x86 can have a finegrained bitmap which indicates what I/O
504 * ports the process can use. We set it to the end of our 594 * ports the process can use. We set it to the end of our
505 * structure, meaning "none". */ 595 * structure, meaning "none".
596 */
506 state->guest_tss.io_bitmap_base = sizeof(state->guest_tss); 597 state->guest_tss.io_bitmap_base = sizeof(state->guest_tss);
507 598
508 /* Some GDT entries are the same across all Guests, so we can 599 /*
509 * set them up now. */ 600 * Some GDT entries are the same across all Guests, so we can
601 * set them up now.
602 */
510 setup_default_gdt_entries(state); 603 setup_default_gdt_entries(state);
511 /* Most IDT entries are the same for all Guests, too.*/ 604 /* Most IDT entries are the same for all Guests, too.*/
512 setup_default_idt_entries(state, default_idt_entries); 605 setup_default_idt_entries(state, default_idt_entries);
513 606
514 /* The Host needs to be able to use the LGUEST segments on this 607 /*
515 * CPU, too, so put them in the Host GDT. */ 608 * The Host needs to be able to use the LGUEST segments on this
609 * CPU, too, so put them in the Host GDT.
610 */
516 get_cpu_gdt_table(i)[GDT_ENTRY_LGUEST_CS] = FULL_EXEC_SEGMENT; 611 get_cpu_gdt_table(i)[GDT_ENTRY_LGUEST_CS] = FULL_EXEC_SEGMENT;
517 get_cpu_gdt_table(i)[GDT_ENTRY_LGUEST_DS] = FULL_SEGMENT; 612 get_cpu_gdt_table(i)[GDT_ENTRY_LGUEST_DS] = FULL_SEGMENT;
518 } 613 }
519 614
520 /* In the Switcher, we want the %cs segment register to use the 615 /*
616 * In the Switcher, we want the %cs segment register to use the
521 * LGUEST_CS GDT entry: we've put that in the Host and Guest GDTs, so 617 * LGUEST_CS GDT entry: we've put that in the Host and Guest GDTs, so
522 * it will be undisturbed when we switch. To change %cs and jump we 618 * it will be undisturbed when we switch. To change %cs and jump we
523 * need this structure to feed to Intel's "lcall" instruction. */ 619 * need this structure to feed to Intel's "lcall" instruction.
620 */
524 lguest_entry.offset = (long)switch_to_guest + switcher_offset(); 621 lguest_entry.offset = (long)switch_to_guest + switcher_offset();
525 lguest_entry.segment = LGUEST_CS; 622 lguest_entry.segment = LGUEST_CS;
526 623
527 /* Finally, we need to turn off "Page Global Enable". PGE is an 624 /*
625 * Finally, we need to turn off "Page Global Enable". PGE is an
528 * optimization where page table entries are specially marked to show 626 * optimization where page table entries are specially marked to show
529 * they never change. The Host kernel marks all the kernel pages this 627 * they never change. The Host kernel marks all the kernel pages this
530 * way because it's always present, even when userspace is running. 628 * way because it's always present, even when userspace is running.
@@ -534,16 +632,21 @@ void __init lguest_arch_host_init(void)
534 * you'll get really weird bugs that you'll chase for two days. 632 * you'll get really weird bugs that you'll chase for two days.
535 * 633 *
536 * I used to turn PGE off every time we switched to the Guest and back 634 * I used to turn PGE off every time we switched to the Guest and back
537 * on when we return, but that slowed the Switcher down noticibly. */ 635 * on when we return, but that slowed the Switcher down noticibly.
636 */
538 637
539 /* We don't need the complexity of CPUs coming and going while we're 638 /*
540 * doing this. */ 639 * We don't need the complexity of CPUs coming and going while we're
640 * doing this.
641 */
541 get_online_cpus(); 642 get_online_cpus();
542 if (cpu_has_pge) { /* We have a broader idea of "global". */ 643 if (cpu_has_pge) { /* We have a broader idea of "global". */
543 /* Remember that this was originally set (for cleanup). */ 644 /* Remember that this was originally set (for cleanup). */
544 cpu_had_pge = 1; 645 cpu_had_pge = 1;
545 /* adjust_pge is a helper function which sets or unsets the PGE 646 /*
546 * bit on its CPU, depending on the argument (0 == unset). */ 647 * adjust_pge is a helper function which sets or unsets the PGE
648 * bit on its CPU, depending on the argument (0 == unset).
649 */
547 on_each_cpu(adjust_pge, (void *)0, 1); 650 on_each_cpu(adjust_pge, (void *)0, 1);
548 /* Turn off the feature in the global feature set. */ 651 /* Turn off the feature in the global feature set. */
549 clear_cpu_cap(&boot_cpu_data, X86_FEATURE_PGE); 652 clear_cpu_cap(&boot_cpu_data, X86_FEATURE_PGE);
@@ -590,26 +693,32 @@ int lguest_arch_init_hypercalls(struct lg_cpu *cpu)
590{ 693{
591 u32 tsc_speed; 694 u32 tsc_speed;
592 695
593 /* The pointer to the Guest's "struct lguest_data" is the only argument. 696 /*
594 * We check that address now. */ 697 * The pointer to the Guest's "struct lguest_data" is the only argument.
698 * We check that address now.
699 */
595 if (!lguest_address_ok(cpu->lg, cpu->hcall->arg1, 700 if (!lguest_address_ok(cpu->lg, cpu->hcall->arg1,
596 sizeof(*cpu->lg->lguest_data))) 701 sizeof(*cpu->lg->lguest_data)))
597 return -EFAULT; 702 return -EFAULT;
598 703
599 /* Having checked it, we simply set lg->lguest_data to point straight 704 /*
705 * Having checked it, we simply set lg->lguest_data to point straight
600 * into the Launcher's memory at the right place and then use 706 * into the Launcher's memory at the right place and then use
601 * copy_to_user/from_user from now on, instead of lgread/write. I put 707 * copy_to_user/from_user from now on, instead of lgread/write. I put
602 * this in to show that I'm not immune to writing stupid 708 * this in to show that I'm not immune to writing stupid
603 * optimizations. */ 709 * optimizations.
710 */
604 cpu->lg->lguest_data = cpu->lg->mem_base + cpu->hcall->arg1; 711 cpu->lg->lguest_data = cpu->lg->mem_base + cpu->hcall->arg1;
605 712
606 /* We insist that the Time Stamp Counter exist and doesn't change with 713 /*
714 * We insist that the Time Stamp Counter exist and doesn't change with
607 * cpu frequency. Some devious chip manufacturers decided that TSC 715 * cpu frequency. Some devious chip manufacturers decided that TSC
608 * changes could be handled in software. I decided that time going 716 * changes could be handled in software. I decided that time going
609 * backwards might be good for benchmarks, but it's bad for users. 717 * backwards might be good for benchmarks, but it's bad for users.
610 * 718 *
611 * We also insist that the TSC be stable: the kernel detects unreliable 719 * We also insist that the TSC be stable: the kernel detects unreliable
612 * TSCs for its own purposes, and we use that here. */ 720 * TSCs for its own purposes, and we use that here.
721 */
613 if (boot_cpu_has(X86_FEATURE_CONSTANT_TSC) && !check_tsc_unstable()) 722 if (boot_cpu_has(X86_FEATURE_CONSTANT_TSC) && !check_tsc_unstable())
614 tsc_speed = tsc_khz; 723 tsc_speed = tsc_khz;
615 else 724 else
@@ -625,38 +734,47 @@ int lguest_arch_init_hypercalls(struct lg_cpu *cpu)
625} 734}
626/*:*/ 735/*:*/
627 736
628/*L:030 lguest_arch_setup_regs() 737/*L:030
738 * lguest_arch_setup_regs()
629 * 739 *
630 * Most of the Guest's registers are left alone: we used get_zeroed_page() to 740 * Most of the Guest's registers are left alone: we used get_zeroed_page() to
631 * allocate the structure, so they will be 0. */ 741 * allocate the structure, so they will be 0.
742 */
632void lguest_arch_setup_regs(struct lg_cpu *cpu, unsigned long start) 743void lguest_arch_setup_regs(struct lg_cpu *cpu, unsigned long start)
633{ 744{
634 struct lguest_regs *regs = cpu->regs; 745 struct lguest_regs *regs = cpu->regs;
635 746
636 /* There are four "segment" registers which the Guest needs to boot: 747 /*
748 * There are four "segment" registers which the Guest needs to boot:
637 * The "code segment" register (cs) refers to the kernel code segment 749 * The "code segment" register (cs) refers to the kernel code segment
638 * __KERNEL_CS, and the "data", "extra" and "stack" segment registers 750 * __KERNEL_CS, and the "data", "extra" and "stack" segment registers
639 * refer to the kernel data segment __KERNEL_DS. 751 * refer to the kernel data segment __KERNEL_DS.
640 * 752 *
641 * The privilege level is packed into the lower bits. The Guest runs 753 * The privilege level is packed into the lower bits. The Guest runs
642 * at privilege level 1 (GUEST_PL).*/ 754 * at privilege level 1 (GUEST_PL).
755 */
643 regs->ds = regs->es = regs->ss = __KERNEL_DS|GUEST_PL; 756 regs->ds = regs->es = regs->ss = __KERNEL_DS|GUEST_PL;
644 regs->cs = __KERNEL_CS|GUEST_PL; 757 regs->cs = __KERNEL_CS|GUEST_PL;
645 758
646 /* The "eflags" register contains miscellaneous flags. Bit 1 (0x002) 759 /*
760 * The "eflags" register contains miscellaneous flags. Bit 1 (0x002)
647 * is supposed to always be "1". Bit 9 (0x200) controls whether 761 * is supposed to always be "1". Bit 9 (0x200) controls whether
648 * interrupts are enabled. We always leave interrupts enabled while 762 * interrupts are enabled. We always leave interrupts enabled while
649 * running the Guest. */ 763 * running the Guest.
764 */
650 regs->eflags = X86_EFLAGS_IF | 0x2; 765 regs->eflags = X86_EFLAGS_IF | 0x2;
651 766
652 /* The "Extended Instruction Pointer" register says where the Guest is 767 /*
653 * running. */ 768 * The "Extended Instruction Pointer" register says where the Guest is
769 * running.
770 */
654 regs->eip = start; 771 regs->eip = start;
655 772
656 /* %esi points to our boot information, at physical address 0, so don't 773 /*
657 * touch it. */ 774 * %esi points to our boot information, at physical address 0, so don't
775 * touch it.
776 */
658 777
659 /* There are a couple of GDT entries the Guest expects when first 778 /* There are a couple of GDT entries the Guest expects at boot. */
660 * booting. */
661 setup_guest_gdt(cpu); 779 setup_guest_gdt(cpu);
662} 780}
diff --git a/drivers/lguest/x86/switcher_32.S b/drivers/lguest/x86/switcher_32.S
index 3fc15318a80..40634b0db9f 100644
--- a/drivers/lguest/x86/switcher_32.S
+++ b/drivers/lguest/x86/switcher_32.S
@@ -1,12 +1,15 @@
1/*P:900 This is the Switcher: code which sits at 0xFFC00000 astride both the 1/*P:900
2 * Host and Guest to do the low-level Guest<->Host switch. It is as simple as 2 * This is the Switcher: code which sits at 0xFFC00000 (or 0xFFE00000) astride
3 * it can be made, but it's naturally very specific to x86. 3 * both the Host and Guest to do the low-level Guest<->Host switch. It is as
4 * simple as it can be made, but it's naturally very specific to x86.
4 * 5 *
5 * You have now completed Preparation. If this has whet your appetite; if you 6 * You have now completed Preparation. If this has whet your appetite; if you
6 * are feeling invigorated and refreshed then the next, more challenging stage 7 * are feeling invigorated and refreshed then the next, more challenging stage
7 * can be found in "make Guest". :*/ 8 * can be found in "make Guest".
9 :*/
8 10
9/*M:012 Lguest is meant to be simple: my rule of thumb is that 1% more LOC must 11/*M:012
12 * Lguest is meant to be simple: my rule of thumb is that 1% more LOC must
10 * gain at least 1% more performance. Since neither LOC nor performance can be 13 * gain at least 1% more performance. Since neither LOC nor performance can be
11 * measured beforehand, it generally means implementing a feature then deciding 14 * measured beforehand, it generally means implementing a feature then deciding
12 * if it's worth it. And once it's implemented, who can say no? 15 * if it's worth it. And once it's implemented, who can say no?
@@ -31,11 +34,14 @@
31 * Host (which is actually really easy). 34 * Host (which is actually really easy).
32 * 35 *
33 * Two questions remain. Would the performance gain outweigh the complexity? 36 * Two questions remain. Would the performance gain outweigh the complexity?
34 * And who would write the verse documenting it? :*/ 37 * And who would write the verse documenting it?
38:*/
35 39
36/*M:011 Lguest64 handles NMI. This gave me NMI envy (until I looked at their 40/*M:011
41 * Lguest64 handles NMI. This gave me NMI envy (until I looked at their
37 * code). It's worth doing though, since it would let us use oprofile in the 42 * code). It's worth doing though, since it would let us use oprofile in the
38 * Host when a Guest is running. :*/ 43 * Host when a Guest is running.
44:*/
39 45
40/*S:100 46/*S:100
41 * Welcome to the Switcher itself! 47 * Welcome to the Switcher itself!
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index 529e2ba505c..ed103816401 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -1318,7 +1318,7 @@ static int crypt_iterate_devices(struct dm_target *ti,
1318{ 1318{
1319 struct crypt_config *cc = ti->private; 1319 struct crypt_config *cc = ti->private;
1320 1320
1321 return fn(ti, cc->dev, cc->start, data); 1321 return fn(ti, cc->dev, cc->start, ti->len, data);
1322} 1322}
1323 1323
1324static struct target_type crypt_target = { 1324static struct target_type crypt_target = {
diff --git a/drivers/md/dm-delay.c b/drivers/md/dm-delay.c
index 4e5b843cd4d..ebe7381f47c 100644
--- a/drivers/md/dm-delay.c
+++ b/drivers/md/dm-delay.c
@@ -324,12 +324,12 @@ static int delay_iterate_devices(struct dm_target *ti,
324 struct delay_c *dc = ti->private; 324 struct delay_c *dc = ti->private;
325 int ret = 0; 325 int ret = 0;
326 326
327 ret = fn(ti, dc->dev_read, dc->start_read, data); 327 ret = fn(ti, dc->dev_read, dc->start_read, ti->len, data);
328 if (ret) 328 if (ret)
329 goto out; 329 goto out;
330 330
331 if (dc->dev_write) 331 if (dc->dev_write)
332 ret = fn(ti, dc->dev_write, dc->start_write, data); 332 ret = fn(ti, dc->dev_write, dc->start_write, ti->len, data);
333 333
334out: 334out:
335 return ret; 335 return ret;
diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c
index 9184b6deb86..82f7d6e6b1e 100644
--- a/drivers/md/dm-linear.c
+++ b/drivers/md/dm-linear.c
@@ -139,7 +139,7 @@ static int linear_iterate_devices(struct dm_target *ti,
139{ 139{
140 struct linear_c *lc = ti->private; 140 struct linear_c *lc = ti->private;
141 141
142 return fn(ti, lc->dev, lc->start, data); 142 return fn(ti, lc->dev, lc->start, ti->len, data);
143} 143}
144 144
145static struct target_type linear_target = { 145static struct target_type linear_target = {
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index c70604a2089..6f0d90d4a54 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -1453,7 +1453,7 @@ static int multipath_iterate_devices(struct dm_target *ti,
1453 1453
1454 list_for_each_entry(pg, &m->priority_groups, list) { 1454 list_for_each_entry(pg, &m->priority_groups, list) {
1455 list_for_each_entry(p, &pg->pgpaths, list) { 1455 list_for_each_entry(p, &pg->pgpaths, list) {
1456 ret = fn(ti, p->path.dev, ti->begin, data); 1456 ret = fn(ti, p->path.dev, ti->begin, ti->len, data);
1457 if (ret) 1457 if (ret)
1458 goto out; 1458 goto out;
1459 } 1459 }
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index ce8868c768c..9726577cde4 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -638,6 +638,7 @@ static void do_writes(struct mirror_set *ms, struct bio_list *writes)
638 spin_lock_irq(&ms->lock); 638 spin_lock_irq(&ms->lock);
639 bio_list_merge(&ms->writes, &requeue); 639 bio_list_merge(&ms->writes, &requeue);
640 spin_unlock_irq(&ms->lock); 640 spin_unlock_irq(&ms->lock);
641 delayed_wake(ms);
641 } 642 }
642 643
643 /* 644 /*
@@ -1292,7 +1293,7 @@ static int mirror_iterate_devices(struct dm_target *ti,
1292 1293
1293 for (i = 0; !ret && i < ms->nr_mirrors; i++) 1294 for (i = 0; !ret && i < ms->nr_mirrors; i++)
1294 ret = fn(ti, ms->mirror[i].dev, 1295 ret = fn(ti, ms->mirror[i].dev,
1295 ms->mirror[i].offset, data); 1296 ms->mirror[i].offset, ti->len, data);
1296 1297
1297 return ret; 1298 return ret;
1298} 1299}
diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c
index b240e85ae39..4e0e5937e42 100644
--- a/drivers/md/dm-stripe.c
+++ b/drivers/md/dm-stripe.c
@@ -320,10 +320,11 @@ static int stripe_iterate_devices(struct dm_target *ti,
320 int ret = 0; 320 int ret = 0;
321 unsigned i = 0; 321 unsigned i = 0;
322 322
323 do 323 do {
324 ret = fn(ti, sc->stripe[i].dev, 324 ret = fn(ti, sc->stripe[i].dev,
325 sc->stripe[i].physical_start, data); 325 sc->stripe[i].physical_start,
326 while (!ret && ++i < sc->stripes); 326 sc->stripe_width, data);
327 } while (!ret && ++i < sc->stripes);
327 328
328 return ret; 329 return ret;
329} 330}
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 2cba557d9e6..d952b344191 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -346,7 +346,7 @@ static void close_dev(struct dm_dev_internal *d, struct mapped_device *md)
346 * If possible, this checks an area of a destination device is valid. 346 * If possible, this checks an area of a destination device is valid.
347 */ 347 */
348static int device_area_is_valid(struct dm_target *ti, struct dm_dev *dev, 348static int device_area_is_valid(struct dm_target *ti, struct dm_dev *dev,
349 sector_t start, void *data) 349 sector_t start, sector_t len, void *data)
350{ 350{
351 struct queue_limits *limits = data; 351 struct queue_limits *limits = data;
352 struct block_device *bdev = dev->bdev; 352 struct block_device *bdev = dev->bdev;
@@ -359,7 +359,7 @@ static int device_area_is_valid(struct dm_target *ti, struct dm_dev *dev,
359 if (!dev_size) 359 if (!dev_size)
360 return 1; 360 return 1;
361 361
362 if ((start >= dev_size) || (start + ti->len > dev_size)) { 362 if ((start >= dev_size) || (start + len > dev_size)) {
363 DMWARN("%s: %s too small for target", 363 DMWARN("%s: %s too small for target",
364 dm_device_name(ti->table->md), bdevname(bdev, b)); 364 dm_device_name(ti->table->md), bdevname(bdev, b));
365 return 0; 365 return 0;
@@ -377,11 +377,11 @@ static int device_area_is_valid(struct dm_target *ti, struct dm_dev *dev,
377 return 0; 377 return 0;
378 } 378 }
379 379
380 if (ti->len & (logical_block_size_sectors - 1)) { 380 if (len & (logical_block_size_sectors - 1)) {
381 DMWARN("%s: len=%llu not aligned to h/w " 381 DMWARN("%s: len=%llu not aligned to h/w "
382 "logical block size %hu of %s", 382 "logical block size %hu of %s",
383 dm_device_name(ti->table->md), 383 dm_device_name(ti->table->md),
384 (unsigned long long)ti->len, 384 (unsigned long long)len,
385 limits->logical_block_size, bdevname(bdev, b)); 385 limits->logical_block_size, bdevname(bdev, b));
386 return 0; 386 return 0;
387 } 387 }
@@ -482,7 +482,7 @@ static int __table_get_device(struct dm_table *t, struct dm_target *ti,
482#define min_not_zero(l, r) (l == 0) ? r : ((r == 0) ? l : min(l, r)) 482#define min_not_zero(l, r) (l == 0) ? r : ((r == 0) ? l : min(l, r))
483 483
484int dm_set_device_limits(struct dm_target *ti, struct dm_dev *dev, 484int dm_set_device_limits(struct dm_target *ti, struct dm_dev *dev,
485 sector_t start, void *data) 485 sector_t start, sector_t len, void *data)
486{ 486{
487 struct queue_limits *limits = data; 487 struct queue_limits *limits = data;
488 struct block_device *bdev = dev->bdev; 488 struct block_device *bdev = dev->bdev;
@@ -830,11 +830,6 @@ unsigned dm_table_get_type(struct dm_table *t)
830 return t->type; 830 return t->type;
831} 831}
832 832
833bool dm_table_bio_based(struct dm_table *t)
834{
835 return dm_table_get_type(t) == DM_TYPE_BIO_BASED;
836}
837
838bool dm_table_request_based(struct dm_table *t) 833bool dm_table_request_based(struct dm_table *t)
839{ 834{
840 return dm_table_get_type(t) == DM_TYPE_REQUEST_BASED; 835 return dm_table_get_type(t) == DM_TYPE_REQUEST_BASED;
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 9acd54a5cff..8a311ea0d44 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2203,16 +2203,6 @@ int dm_swap_table(struct mapped_device *md, struct dm_table *table)
2203 goto out; 2203 goto out;
2204 } 2204 }
2205 2205
2206 /*
2207 * It is enought that blk_queue_ordered() is called only once when
2208 * the first bio-based table is bound.
2209 *
2210 * This setting should be moved to alloc_dev() when request-based dm
2211 * supports barrier.
2212 */
2213 if (!md->map && dm_table_bio_based(table))
2214 blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN, NULL);
2215
2216 __unbind(md); 2206 __unbind(md);
2217 r = __bind(md, table, &limits); 2207 r = __bind(md, table, &limits);
2218 2208
diff --git a/drivers/md/dm.h b/drivers/md/dm.h
index 23278ae80f0..a7663eba17e 100644
--- a/drivers/md/dm.h
+++ b/drivers/md/dm.h
@@ -61,7 +61,6 @@ int dm_table_any_congested(struct dm_table *t, int bdi_bits);
61int dm_table_any_busy_target(struct dm_table *t); 61int dm_table_any_busy_target(struct dm_table *t);
62int dm_table_set_type(struct dm_table *t); 62int dm_table_set_type(struct dm_table *t);
63unsigned dm_table_get_type(struct dm_table *t); 63unsigned dm_table_get_type(struct dm_table *t);
64bool dm_table_bio_based(struct dm_table *t);
65bool dm_table_request_based(struct dm_table *t); 64bool dm_table_request_based(struct dm_table *t);
66int dm_table_alloc_md_mempools(struct dm_table *t); 65int dm_table_alloc_md_mempools(struct dm_table *t);
67void dm_table_free_md_mempools(struct dm_table *t); 66void dm_table_free_md_mempools(struct dm_table *t);
diff --git a/drivers/md/linear.c b/drivers/md/linear.c
index 5810fa906af..5fe39c2a3d2 100644
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@ -220,6 +220,7 @@ static int linear_run (mddev_t *mddev)
220 mddev->queue->unplug_fn = linear_unplug; 220 mddev->queue->unplug_fn = linear_unplug;
221 mddev->queue->backing_dev_info.congested_fn = linear_congested; 221 mddev->queue->backing_dev_info.congested_fn = linear_congested;
222 mddev->queue->backing_dev_info.congested_data = mddev; 222 mddev->queue->backing_dev_info.congested_data = mddev;
223 md_integrity_register(mddev);
223 return 0; 224 return 0;
224} 225}
225 226
@@ -256,6 +257,7 @@ static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev)
256 rcu_assign_pointer(mddev->private, newconf); 257 rcu_assign_pointer(mddev->private, newconf);
257 md_set_array_sectors(mddev, linear_size(mddev, 0, 0)); 258 md_set_array_sectors(mddev, linear_size(mddev, 0, 0));
258 set_capacity(mddev->gendisk, mddev->array_sectors); 259 set_capacity(mddev->gendisk, mddev->array_sectors);
260 revalidate_disk(mddev->gendisk);
259 call_rcu(&oldconf->rcu, free_conf); 261 call_rcu(&oldconf->rcu, free_conf);
260 return 0; 262 return 0;
261} 263}
diff --git a/drivers/md/md.c b/drivers/md/md.c
index d4351ff0849..103f2d33fa8 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -359,6 +359,7 @@ static mddev_t * mddev_find(dev_t unit)
359 else 359 else
360 new->md_minor = MINOR(unit) >> MdpMinorShift; 360 new->md_minor = MINOR(unit) >> MdpMinorShift;
361 361
362 mutex_init(&new->open_mutex);
362 mutex_init(&new->reconfig_mutex); 363 mutex_init(&new->reconfig_mutex);
363 INIT_LIST_HEAD(&new->disks); 364 INIT_LIST_HEAD(&new->disks);
364 INIT_LIST_HEAD(&new->all_mddevs); 365 INIT_LIST_HEAD(&new->all_mddevs);
@@ -1308,7 +1309,12 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev)
1308 } 1309 }
1309 if (mddev->level != LEVEL_MULTIPATH) { 1310 if (mddev->level != LEVEL_MULTIPATH) {
1310 int role; 1311 int role;
1311 role = le16_to_cpu(sb->dev_roles[rdev->desc_nr]); 1312 if (rdev->desc_nr < 0 ||
1313 rdev->desc_nr >= le32_to_cpu(sb->max_dev)) {
1314 role = 0xffff;
1315 rdev->desc_nr = -1;
1316 } else
1317 role = le16_to_cpu(sb->dev_roles[rdev->desc_nr]);
1312 switch(role) { 1318 switch(role) {
1313 case 0xffff: /* spare */ 1319 case 0xffff: /* spare */
1314 break; 1320 break;
@@ -1394,8 +1400,14 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev)
1394 if (rdev2->desc_nr+1 > max_dev) 1400 if (rdev2->desc_nr+1 > max_dev)
1395 max_dev = rdev2->desc_nr+1; 1401 max_dev = rdev2->desc_nr+1;
1396 1402
1397 if (max_dev > le32_to_cpu(sb->max_dev)) 1403 if (max_dev > le32_to_cpu(sb->max_dev)) {
1404 int bmask;
1398 sb->max_dev = cpu_to_le32(max_dev); 1405 sb->max_dev = cpu_to_le32(max_dev);
1406 rdev->sb_size = max_dev * 2 + 256;
1407 bmask = queue_logical_block_size(rdev->bdev->bd_disk->queue)-1;
1408 if (rdev->sb_size & bmask)
1409 rdev->sb_size = (rdev->sb_size | bmask) + 1;
1410 }
1399 for (i=0; i<max_dev;i++) 1411 for (i=0; i<max_dev;i++)
1400 sb->dev_roles[i] = cpu_to_le16(0xfffe); 1412 sb->dev_roles[i] = cpu_to_le16(0xfffe);
1401 1413
@@ -1487,37 +1499,76 @@ static int match_mddev_units(mddev_t *mddev1, mddev_t *mddev2)
1487 1499
1488static LIST_HEAD(pending_raid_disks); 1500static LIST_HEAD(pending_raid_disks);
1489 1501
1490static void md_integrity_check(mdk_rdev_t *rdev, mddev_t *mddev) 1502/*
1503 * Try to register data integrity profile for an mddev
1504 *
1505 * This is called when an array is started and after a disk has been kicked
1506 * from the array. It only succeeds if all working and active component devices
1507 * are integrity capable with matching profiles.
1508 */
1509int md_integrity_register(mddev_t *mddev)
1510{
1511 mdk_rdev_t *rdev, *reference = NULL;
1512
1513 if (list_empty(&mddev->disks))
1514 return 0; /* nothing to do */
1515 if (blk_get_integrity(mddev->gendisk))
1516 return 0; /* already registered */
1517 list_for_each_entry(rdev, &mddev->disks, same_set) {
1518 /* skip spares and non-functional disks */
1519 if (test_bit(Faulty, &rdev->flags))
1520 continue;
1521 if (rdev->raid_disk < 0)
1522 continue;
1523 /*
1524 * If at least one rdev is not integrity capable, we can not
1525 * enable data integrity for the md device.
1526 */
1527 if (!bdev_get_integrity(rdev->bdev))
1528 return -EINVAL;
1529 if (!reference) {
1530 /* Use the first rdev as the reference */
1531 reference = rdev;
1532 continue;
1533 }
1534 /* does this rdev's profile match the reference profile? */
1535 if (blk_integrity_compare(reference->bdev->bd_disk,
1536 rdev->bdev->bd_disk) < 0)
1537 return -EINVAL;
1538 }
1539 /*
1540 * All component devices are integrity capable and have matching
1541 * profiles, register the common profile for the md device.
1542 */
1543 if (blk_integrity_register(mddev->gendisk,
1544 bdev_get_integrity(reference->bdev)) != 0) {
1545 printk(KERN_ERR "md: failed to register integrity for %s\n",
1546 mdname(mddev));
1547 return -EINVAL;
1548 }
1549 printk(KERN_NOTICE "md: data integrity on %s enabled\n",
1550 mdname(mddev));
1551 return 0;
1552}
1553EXPORT_SYMBOL(md_integrity_register);
1554
1555/* Disable data integrity if non-capable/non-matching disk is being added */
1556void md_integrity_add_rdev(mdk_rdev_t *rdev, mddev_t *mddev)
1491{ 1557{
1492 struct mdk_personality *pers = mddev->pers;
1493 struct gendisk *disk = mddev->gendisk;
1494 struct blk_integrity *bi_rdev = bdev_get_integrity(rdev->bdev); 1558 struct blk_integrity *bi_rdev = bdev_get_integrity(rdev->bdev);
1495 struct blk_integrity *bi_mddev = blk_get_integrity(disk); 1559 struct blk_integrity *bi_mddev = blk_get_integrity(mddev->gendisk);
1496 1560
1497 /* Data integrity passthrough not supported on RAID 4, 5 and 6 */ 1561 if (!bi_mddev) /* nothing to do */
1498 if (pers && pers->level >= 4 && pers->level <= 6)
1499 return; 1562 return;
1500 1563 if (rdev->raid_disk < 0) /* skip spares */
1501 /* If rdev is integrity capable, register profile for mddev */
1502 if (!bi_mddev && bi_rdev) {
1503 if (blk_integrity_register(disk, bi_rdev))
1504 printk(KERN_ERR "%s: %s Could not register integrity!\n",
1505 __func__, disk->disk_name);
1506 else
1507 printk(KERN_NOTICE "Enabling data integrity on %s\n",
1508 disk->disk_name);
1509 return; 1564 return;
1510 } 1565 if (bi_rdev && blk_integrity_compare(mddev->gendisk,
1511 1566 rdev->bdev->bd_disk) >= 0)
1512 /* Check that mddev and rdev have matching profiles */ 1567 return;
1513 if (blk_integrity_compare(disk, rdev->bdev->bd_disk) < 0) { 1568 printk(KERN_NOTICE "disabling data integrity on %s\n", mdname(mddev));
1514 printk(KERN_ERR "%s: %s/%s integrity mismatch!\n", __func__, 1569 blk_integrity_unregister(mddev->gendisk);
1515 disk->disk_name, rdev->bdev->bd_disk->disk_name);
1516 printk(KERN_NOTICE "Disabling data integrity on %s\n",
1517 disk->disk_name);
1518 blk_integrity_unregister(disk);
1519 }
1520} 1570}
1571EXPORT_SYMBOL(md_integrity_add_rdev);
1521 1572
1522static int bind_rdev_to_array(mdk_rdev_t * rdev, mddev_t * mddev) 1573static int bind_rdev_to_array(mdk_rdev_t * rdev, mddev_t * mddev)
1523{ 1574{
@@ -1591,7 +1642,6 @@ static int bind_rdev_to_array(mdk_rdev_t * rdev, mddev_t * mddev)
1591 /* May as well allow recovery to be retried once */ 1642 /* May as well allow recovery to be retried once */
1592 mddev->recovery_disabled = 0; 1643 mddev->recovery_disabled = 0;
1593 1644
1594 md_integrity_check(rdev, mddev);
1595 return 0; 1645 return 0;
1596 1646
1597 fail: 1647 fail:
@@ -1925,17 +1975,14 @@ repeat:
1925 /* otherwise we have to go forward and ... */ 1975 /* otherwise we have to go forward and ... */
1926 mddev->events ++; 1976 mddev->events ++;
1927 if (!mddev->in_sync || mddev->recovery_cp != MaxSector) { /* not clean */ 1977 if (!mddev->in_sync || mddev->recovery_cp != MaxSector) { /* not clean */
1928 /* .. if the array isn't clean, insist on an odd 'events' */ 1978 /* .. if the array isn't clean, an 'even' event must also go
1929 if ((mddev->events&1)==0) { 1979 * to spares. */
1930 mddev->events++; 1980 if ((mddev->events&1)==0)
1931 nospares = 0; 1981 nospares = 0;
1932 }
1933 } else { 1982 } else {
1934 /* otherwise insist on an even 'events' (for clean states) */ 1983 /* otherwise an 'odd' event must go to spares */
1935 if ((mddev->events&1)) { 1984 if ((mddev->events&1))
1936 mddev->events++;
1937 nospares = 0; 1985 nospares = 0;
1938 }
1939 } 1986 }
1940 } 1987 }
1941 1988
@@ -2657,6 +2704,7 @@ level_store(mddev_t *mddev, const char *buf, size_t len)
2657 ssize_t rv = len; 2704 ssize_t rv = len;
2658 struct mdk_personality *pers; 2705 struct mdk_personality *pers;
2659 void *priv; 2706 void *priv;
2707 mdk_rdev_t *rdev;
2660 2708
2661 if (mddev->pers == NULL) { 2709 if (mddev->pers == NULL) {
2662 if (len == 0) 2710 if (len == 0)
@@ -2736,6 +2784,12 @@ level_store(mddev_t *mddev, const char *buf, size_t len)
2736 mddev_suspend(mddev); 2784 mddev_suspend(mddev);
2737 mddev->pers->stop(mddev); 2785 mddev->pers->stop(mddev);
2738 module_put(mddev->pers->owner); 2786 module_put(mddev->pers->owner);
2787 /* Invalidate devices that are now superfluous */
2788 list_for_each_entry(rdev, &mddev->disks, same_set)
2789 if (rdev->raid_disk >= mddev->raid_disks) {
2790 rdev->raid_disk = -1;
2791 clear_bit(In_sync, &rdev->flags);
2792 }
2739 mddev->pers = pers; 2793 mddev->pers = pers;
2740 mddev->private = priv; 2794 mddev->private = priv;
2741 strlcpy(mddev->clevel, pers->name, sizeof(mddev->clevel)); 2795 strlcpy(mddev->clevel, pers->name, sizeof(mddev->clevel));
@@ -3545,6 +3599,7 @@ max_sync_store(mddev_t *mddev, const char *buf, size_t len)
3545 if (max < mddev->resync_min) 3599 if (max < mddev->resync_min)
3546 return -EINVAL; 3600 return -EINVAL;
3547 if (max < mddev->resync_max && 3601 if (max < mddev->resync_max &&
3602 mddev->ro == 0 &&
3548 test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) 3603 test_bit(MD_RECOVERY_RUNNING, &mddev->recovery))
3549 return -EBUSY; 3604 return -EBUSY;
3550 3605
@@ -3685,17 +3740,8 @@ array_size_store(mddev_t *mddev, const char *buf, size_t len)
3685 3740
3686 mddev->array_sectors = sectors; 3741 mddev->array_sectors = sectors;
3687 set_capacity(mddev->gendisk, mddev->array_sectors); 3742 set_capacity(mddev->gendisk, mddev->array_sectors);
3688 if (mddev->pers) { 3743 if (mddev->pers)
3689 struct block_device *bdev = bdget_disk(mddev->gendisk, 0); 3744 revalidate_disk(mddev->gendisk);
3690
3691 if (bdev) {
3692 mutex_lock(&bdev->bd_inode->i_mutex);
3693 i_size_write(bdev->bd_inode,
3694 (loff_t)mddev->array_sectors << 9);
3695 mutex_unlock(&bdev->bd_inode->i_mutex);
3696 bdput(bdev);
3697 }
3698 }
3699 3745
3700 return len; 3746 return len;
3701} 3747}
@@ -4048,10 +4094,6 @@ static int do_md_run(mddev_t * mddev)
4048 } 4094 }
4049 strlcpy(mddev->clevel, pers->name, sizeof(mddev->clevel)); 4095 strlcpy(mddev->clevel, pers->name, sizeof(mddev->clevel));
4050 4096
4051 if (pers->level >= 4 && pers->level <= 6)
4052 /* Cannot support integrity (yet) */
4053 blk_integrity_unregister(mddev->gendisk);
4054
4055 if (mddev->reshape_position != MaxSector && 4097 if (mddev->reshape_position != MaxSector &&
4056 pers->start_reshape == NULL) { 4098 pers->start_reshape == NULL) {
4057 /* This personality cannot handle reshaping... */ 4099 /* This personality cannot handle reshaping... */
@@ -4189,6 +4231,7 @@ static int do_md_run(mddev_t * mddev)
4189 md_wakeup_thread(mddev->thread); 4231 md_wakeup_thread(mddev->thread);
4190 md_wakeup_thread(mddev->sync_thread); /* possibly kick off a reshape */ 4232 md_wakeup_thread(mddev->sync_thread); /* possibly kick off a reshape */
4191 4233
4234 revalidate_disk(mddev->gendisk);
4192 mddev->changed = 1; 4235 mddev->changed = 1;
4193 md_new_event(mddev); 4236 md_new_event(mddev);
4194 sysfs_notify_dirent(mddev->sysfs_state); 4237 sysfs_notify_dirent(mddev->sysfs_state);
@@ -4260,12 +4303,11 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)
4260 struct gendisk *disk = mddev->gendisk; 4303 struct gendisk *disk = mddev->gendisk;
4261 mdk_rdev_t *rdev; 4304 mdk_rdev_t *rdev;
4262 4305
4306 mutex_lock(&mddev->open_mutex);
4263 if (atomic_read(&mddev->openers) > is_open) { 4307 if (atomic_read(&mddev->openers) > is_open) {
4264 printk("md: %s still in use.\n",mdname(mddev)); 4308 printk("md: %s still in use.\n",mdname(mddev));
4265 return -EBUSY; 4309 err = -EBUSY;
4266 } 4310 } else if (mddev->pers) {
4267
4268 if (mddev->pers) {
4269 4311
4270 if (mddev->sync_thread) { 4312 if (mddev->sync_thread) {
4271 set_bit(MD_RECOVERY_FROZEN, &mddev->recovery); 4313 set_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
@@ -4323,7 +4365,10 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)
4323 set_disk_ro(disk, 1); 4365 set_disk_ro(disk, 1);
4324 clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery); 4366 clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
4325 } 4367 }
4326 4368out:
4369 mutex_unlock(&mddev->open_mutex);
4370 if (err)
4371 return err;
4327 /* 4372 /*
4328 * Free resources if final stop 4373 * Free resources if final stop
4329 */ 4374 */
@@ -4389,7 +4434,6 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)
4389 blk_integrity_unregister(disk); 4434 blk_integrity_unregister(disk);
4390 md_new_event(mddev); 4435 md_new_event(mddev);
4391 sysfs_notify_dirent(mddev->sysfs_state); 4436 sysfs_notify_dirent(mddev->sysfs_state);
4392out:
4393 return err; 4437 return err;
4394} 4438}
4395 4439
@@ -5087,18 +5131,8 @@ static int update_size(mddev_t *mddev, sector_t num_sectors)
5087 return -ENOSPC; 5131 return -ENOSPC;
5088 } 5132 }
5089 rv = mddev->pers->resize(mddev, num_sectors); 5133 rv = mddev->pers->resize(mddev, num_sectors);
5090 if (!rv) { 5134 if (!rv)
5091 struct block_device *bdev; 5135 revalidate_disk(mddev->gendisk);
5092
5093 bdev = bdget_disk(mddev->gendisk, 0);
5094 if (bdev) {
5095 mutex_lock(&bdev->bd_inode->i_mutex);
5096 i_size_write(bdev->bd_inode,
5097 (loff_t)mddev->array_sectors << 9);
5098 mutex_unlock(&bdev->bd_inode->i_mutex);
5099 bdput(bdev);
5100 }
5101 }
5102 return rv; 5136 return rv;
5103} 5137}
5104 5138
@@ -5484,12 +5518,12 @@ static int md_open(struct block_device *bdev, fmode_t mode)
5484 } 5518 }
5485 BUG_ON(mddev != bdev->bd_disk->private_data); 5519 BUG_ON(mddev != bdev->bd_disk->private_data);
5486 5520
5487 if ((err = mutex_lock_interruptible_nested(&mddev->reconfig_mutex, 1))) 5521 if ((err = mutex_lock_interruptible(&mddev->open_mutex)))
5488 goto out; 5522 goto out;
5489 5523
5490 err = 0; 5524 err = 0;
5491 atomic_inc(&mddev->openers); 5525 atomic_inc(&mddev->openers);
5492 mddev_unlock(mddev); 5526 mutex_unlock(&mddev->open_mutex);
5493 5527
5494 check_disk_change(bdev); 5528 check_disk_change(bdev);
5495 out: 5529 out:
diff --git a/drivers/md/md.h b/drivers/md/md.h
index 9430a110db9..f8fc188bc76 100644
--- a/drivers/md/md.h
+++ b/drivers/md/md.h
@@ -223,6 +223,16 @@ struct mddev_s
223 * so we don't loop trying */ 223 * so we don't loop trying */
224 224
225 int in_sync; /* know to not need resync */ 225 int in_sync; /* know to not need resync */
226 /* 'open_mutex' avoids races between 'md_open' and 'do_md_stop', so
227 * that we are never stopping an array while it is open.
228 * 'reconfig_mutex' protects all other reconfiguration.
229 * These locks are separate due to conflicting interactions
230 * with bdev->bd_mutex.
231 * Lock ordering is:
232 * reconfig_mutex -> bd_mutex : e.g. do_md_run -> revalidate_disk
233 * bd_mutex -> open_mutex: e.g. __blkdev_get -> md_open
234 */
235 struct mutex open_mutex;
226 struct mutex reconfig_mutex; 236 struct mutex reconfig_mutex;
227 atomic_t active; /* general refcount */ 237 atomic_t active; /* general refcount */
228 atomic_t openers; /* number of active opens */ 238 atomic_t openers; /* number of active opens */
@@ -431,5 +441,7 @@ extern int md_allow_write(mddev_t *mddev);
431extern void md_wait_for_blocked_rdev(mdk_rdev_t *rdev, mddev_t *mddev); 441extern void md_wait_for_blocked_rdev(mdk_rdev_t *rdev, mddev_t *mddev);
432extern void md_set_array_sectors(mddev_t *mddev, sector_t array_sectors); 442extern void md_set_array_sectors(mddev_t *mddev, sector_t array_sectors);
433extern int md_check_no_bitmap(mddev_t *mddev); 443extern int md_check_no_bitmap(mddev_t *mddev);
444extern int md_integrity_register(mddev_t *mddev);
445void md_integrity_add_rdev(mdk_rdev_t *rdev, mddev_t *mddev);
434 446
435#endif /* _MD_MD_H */ 447#endif /* _MD_MD_H */
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c
index 237fe3fd235..7140909f666 100644
--- a/drivers/md/multipath.c
+++ b/drivers/md/multipath.c
@@ -313,6 +313,7 @@ static int multipath_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
313 set_bit(In_sync, &rdev->flags); 313 set_bit(In_sync, &rdev->flags);
314 rcu_assign_pointer(p->rdev, rdev); 314 rcu_assign_pointer(p->rdev, rdev);
315 err = 0; 315 err = 0;
316 md_integrity_add_rdev(rdev, mddev);
316 break; 317 break;
317 } 318 }
318 319
@@ -345,7 +346,9 @@ static int multipath_remove_disk(mddev_t *mddev, int number)
345 /* lost the race, try later */ 346 /* lost the race, try later */
346 err = -EBUSY; 347 err = -EBUSY;
347 p->rdev = rdev; 348 p->rdev = rdev;
349 goto abort;
348 } 350 }
351 md_integrity_register(mddev);
349 } 352 }
350abort: 353abort:
351 354
@@ -519,7 +522,7 @@ static int multipath_run (mddev_t *mddev)
519 mddev->queue->unplug_fn = multipath_unplug; 522 mddev->queue->unplug_fn = multipath_unplug;
520 mddev->queue->backing_dev_info.congested_fn = multipath_congested; 523 mddev->queue->backing_dev_info.congested_fn = multipath_congested;
521 mddev->queue->backing_dev_info.congested_data = mddev; 524 mddev->queue->backing_dev_info.congested_data = mddev;
522 525 md_integrity_register(mddev);
523 return 0; 526 return 0;
524 527
525out_free_conf: 528out_free_conf:
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index 335f490dcad..898e2bdfee4 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -351,6 +351,7 @@ static int raid0_run(mddev_t *mddev)
351 351
352 blk_queue_merge_bvec(mddev->queue, raid0_mergeable_bvec); 352 blk_queue_merge_bvec(mddev->queue, raid0_mergeable_bvec);
353 dump_zones(mddev); 353 dump_zones(mddev);
354 md_integrity_register(mddev);
354 return 0; 355 return 0;
355} 356}
356 357
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 0569efba0c0..8726fd7ebce 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1144,7 +1144,7 @@ static int raid1_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
1144 rcu_assign_pointer(p->rdev, rdev); 1144 rcu_assign_pointer(p->rdev, rdev);
1145 break; 1145 break;
1146 } 1146 }
1147 1147 md_integrity_add_rdev(rdev, mddev);
1148 print_conf(conf); 1148 print_conf(conf);
1149 return err; 1149 return err;
1150} 1150}
@@ -1178,7 +1178,9 @@ static int raid1_remove_disk(mddev_t *mddev, int number)
1178 /* lost the race, try later */ 1178 /* lost the race, try later */
1179 err = -EBUSY; 1179 err = -EBUSY;
1180 p->rdev = rdev; 1180 p->rdev = rdev;
1181 goto abort;
1181 } 1182 }
1183 md_integrity_register(mddev);
1182 } 1184 }
1183abort: 1185abort:
1184 1186
@@ -2067,7 +2069,7 @@ static int run(mddev_t *mddev)
2067 mddev->queue->unplug_fn = raid1_unplug; 2069 mddev->queue->unplug_fn = raid1_unplug;
2068 mddev->queue->backing_dev_info.congested_fn = raid1_congested; 2070 mddev->queue->backing_dev_info.congested_fn = raid1_congested;
2069 mddev->queue->backing_dev_info.congested_data = mddev; 2071 mddev->queue->backing_dev_info.congested_data = mddev;
2070 2072 md_integrity_register(mddev);
2071 return 0; 2073 return 0;
2072 2074
2073out_no_mem: 2075out_no_mem:
@@ -2132,6 +2134,7 @@ static int raid1_resize(mddev_t *mddev, sector_t sectors)
2132 return -EINVAL; 2134 return -EINVAL;
2133 set_capacity(mddev->gendisk, mddev->array_sectors); 2135 set_capacity(mddev->gendisk, mddev->array_sectors);
2134 mddev->changed = 1; 2136 mddev->changed = 1;
2137 revalidate_disk(mddev->gendisk);
2135 if (sectors > mddev->dev_sectors && 2138 if (sectors > mddev->dev_sectors &&
2136 mddev->recovery_cp == MaxSector) { 2139 mddev->recovery_cp == MaxSector) {
2137 mddev->recovery_cp = mddev->dev_sectors; 2140 mddev->recovery_cp = mddev->dev_sectors;
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 7298a5e5a18..3d9020cf6f6 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1170,6 +1170,7 @@ static int raid10_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
1170 break; 1170 break;
1171 } 1171 }
1172 1172
1173 md_integrity_add_rdev(rdev, mddev);
1173 print_conf(conf); 1174 print_conf(conf);
1174 return err; 1175 return err;
1175} 1176}
@@ -1203,7 +1204,9 @@ static int raid10_remove_disk(mddev_t *mddev, int number)
1203 /* lost the race, try later */ 1204 /* lost the race, try later */
1204 err = -EBUSY; 1205 err = -EBUSY;
1205 p->rdev = rdev; 1206 p->rdev = rdev;
1207 goto abort;
1206 } 1208 }
1209 md_integrity_register(mddev);
1207 } 1210 }
1208abort: 1211abort:
1209 1212
@@ -2225,6 +2228,7 @@ static int run(mddev_t *mddev)
2225 2228
2226 if (conf->near_copies < mddev->raid_disks) 2229 if (conf->near_copies < mddev->raid_disks)
2227 blk_queue_merge_bvec(mddev->queue, raid10_mergeable_bvec); 2230 blk_queue_merge_bvec(mddev->queue, raid10_mergeable_bvec);
2231 md_integrity_register(mddev);
2228 return 0; 2232 return 0;
2229 2233
2230out_free_conf: 2234out_free_conf:
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 37835538b58..b8a2c5dc67b 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3785,7 +3785,7 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
3785 conf->reshape_progress < raid5_size(mddev, 0, 0)) { 3785 conf->reshape_progress < raid5_size(mddev, 0, 0)) {
3786 sector_nr = raid5_size(mddev, 0, 0) 3786 sector_nr = raid5_size(mddev, 0, 0)
3787 - conf->reshape_progress; 3787 - conf->reshape_progress;
3788 } else if (mddev->delta_disks > 0 && 3788 } else if (mddev->delta_disks >= 0 &&
3789 conf->reshape_progress > 0) 3789 conf->reshape_progress > 0)
3790 sector_nr = conf->reshape_progress; 3790 sector_nr = conf->reshape_progress;
3791 sector_div(sector_nr, new_data_disks); 3791 sector_div(sector_nr, new_data_disks);
@@ -3999,6 +3999,9 @@ static inline sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *ski
3999 return 0; 3999 return 0;
4000 } 4000 }
4001 4001
4002 /* Allow raid5_quiesce to complete */
4003 wait_event(conf->wait_for_overlap, conf->quiesce != 2);
4004
4002 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) 4005 if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery))
4003 return reshape_request(mddev, sector_nr, skipped); 4006 return reshape_request(mddev, sector_nr, skipped);
4004 4007
@@ -4316,6 +4319,15 @@ raid5_size(mddev_t *mddev, sector_t sectors, int raid_disks)
4316 return sectors * (raid_disks - conf->max_degraded); 4319 return sectors * (raid_disks - conf->max_degraded);
4317} 4320}
4318 4321
4322static void free_conf(raid5_conf_t *conf)
4323{
4324 shrink_stripes(conf);
4325 safe_put_page(conf->spare_page);
4326 kfree(conf->disks);
4327 kfree(conf->stripe_hashtbl);
4328 kfree(conf);
4329}
4330
4319static raid5_conf_t *setup_conf(mddev_t *mddev) 4331static raid5_conf_t *setup_conf(mddev_t *mddev)
4320{ 4332{
4321 raid5_conf_t *conf; 4333 raid5_conf_t *conf;
@@ -4447,11 +4459,7 @@ static raid5_conf_t *setup_conf(mddev_t *mddev)
4447 4459
4448 abort: 4460 abort:
4449 if (conf) { 4461 if (conf) {
4450 shrink_stripes(conf); 4462 free_conf(conf);
4451 safe_put_page(conf->spare_page);
4452 kfree(conf->disks);
4453 kfree(conf->stripe_hashtbl);
4454 kfree(conf);
4455 return ERR_PTR(-EIO); 4463 return ERR_PTR(-EIO);
4456 } else 4464 } else
4457 return ERR_PTR(-ENOMEM); 4465 return ERR_PTR(-ENOMEM);
@@ -4501,7 +4509,26 @@ static int run(mddev_t *mddev)
4501 (old_disks-max_degraded)); 4509 (old_disks-max_degraded));
4502 /* here_old is the first stripe that we might need to read 4510 /* here_old is the first stripe that we might need to read
4503 * from */ 4511 * from */
4504 if (here_new >= here_old) { 4512 if (mddev->delta_disks == 0) {
4513 /* We cannot be sure it is safe to start an in-place
4514 * reshape. It is only safe if user-space if monitoring
4515 * and taking constant backups.
4516 * mdadm always starts a situation like this in
4517 * readonly mode so it can take control before
4518 * allowing any writes. So just check for that.
4519 */
4520 if ((here_new * mddev->new_chunk_sectors !=
4521 here_old * mddev->chunk_sectors) ||
4522 mddev->ro == 0) {
4523 printk(KERN_ERR "raid5: in-place reshape must be started"
4524 " in read-only mode - aborting\n");
4525 return -EINVAL;
4526 }
4527 } else if (mddev->delta_disks < 0
4528 ? (here_new * mddev->new_chunk_sectors <=
4529 here_old * mddev->chunk_sectors)
4530 : (here_new * mddev->new_chunk_sectors >=
4531 here_old * mddev->chunk_sectors)) {
4505 /* Reading from the same stripe as writing to - bad */ 4532 /* Reading from the same stripe as writing to - bad */
4506 printk(KERN_ERR "raid5: reshape_position too early for " 4533 printk(KERN_ERR "raid5: reshape_position too early for "
4507 "auto-recovery - aborting.\n"); 4534 "auto-recovery - aborting.\n");
@@ -4629,12 +4656,8 @@ abort:
4629 md_unregister_thread(mddev->thread); 4656 md_unregister_thread(mddev->thread);
4630 mddev->thread = NULL; 4657 mddev->thread = NULL;
4631 if (conf) { 4658 if (conf) {
4632 shrink_stripes(conf);
4633 print_raid5_conf(conf); 4659 print_raid5_conf(conf);
4634 safe_put_page(conf->spare_page); 4660 free_conf(conf);
4635 kfree(conf->disks);
4636 kfree(conf->stripe_hashtbl);
4637 kfree(conf);
4638 } 4661 }
4639 mddev->private = NULL; 4662 mddev->private = NULL;
4640 printk(KERN_ALERT "raid5: failed to run raid set %s\n", mdname(mddev)); 4663 printk(KERN_ALERT "raid5: failed to run raid set %s\n", mdname(mddev));
@@ -4649,13 +4672,10 @@ static int stop(mddev_t *mddev)
4649 4672
4650 md_unregister_thread(mddev->thread); 4673 md_unregister_thread(mddev->thread);
4651 mddev->thread = NULL; 4674 mddev->thread = NULL;
4652 shrink_stripes(conf);
4653 kfree(conf->stripe_hashtbl);
4654 mddev->queue->backing_dev_info.congested_fn = NULL; 4675 mddev->queue->backing_dev_info.congested_fn = NULL;
4655 blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ 4676 blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/
4656 sysfs_remove_group(&mddev->kobj, &raid5_attrs_group); 4677 sysfs_remove_group(&mddev->kobj, &raid5_attrs_group);
4657 kfree(conf->disks); 4678 free_conf(conf);
4658 kfree(conf);
4659 mddev->private = NULL; 4679 mddev->private = NULL;
4660 return 0; 4680 return 0;
4661} 4681}
@@ -4857,6 +4877,7 @@ static int raid5_resize(mddev_t *mddev, sector_t sectors)
4857 return -EINVAL; 4877 return -EINVAL;
4858 set_capacity(mddev->gendisk, mddev->array_sectors); 4878 set_capacity(mddev->gendisk, mddev->array_sectors);
4859 mddev->changed = 1; 4879 mddev->changed = 1;
4880 revalidate_disk(mddev->gendisk);
4860 if (sectors > mddev->dev_sectors && mddev->recovery_cp == MaxSector) { 4881 if (sectors > mddev->dev_sectors && mddev->recovery_cp == MaxSector) {
4861 mddev->recovery_cp = mddev->dev_sectors; 4882 mddev->recovery_cp = mddev->dev_sectors;
4862 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); 4883 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
@@ -5002,7 +5023,7 @@ static int raid5_start_reshape(mddev_t *mddev)
5002 spin_unlock_irqrestore(&conf->device_lock, flags); 5023 spin_unlock_irqrestore(&conf->device_lock, flags);
5003 } 5024 }
5004 mddev->raid_disks = conf->raid_disks; 5025 mddev->raid_disks = conf->raid_disks;
5005 mddev->reshape_position = 0; 5026 mddev->reshape_position = conf->reshape_progress;
5006 set_bit(MD_CHANGE_DEVS, &mddev->flags); 5027 set_bit(MD_CHANGE_DEVS, &mddev->flags);
5007 5028
5008 clear_bit(MD_RECOVERY_SYNC, &mddev->recovery); 5029 clear_bit(MD_RECOVERY_SYNC, &mddev->recovery);
@@ -5057,7 +5078,6 @@ static void end_reshape(raid5_conf_t *conf)
5057 */ 5078 */
5058static void raid5_finish_reshape(mddev_t *mddev) 5079static void raid5_finish_reshape(mddev_t *mddev)
5059{ 5080{
5060 struct block_device *bdev;
5061 raid5_conf_t *conf = mddev->private; 5081 raid5_conf_t *conf = mddev->private;
5062 5082
5063 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { 5083 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) {
@@ -5066,15 +5086,7 @@ static void raid5_finish_reshape(mddev_t *mddev)
5066 md_set_array_sectors(mddev, raid5_size(mddev, 0, 0)); 5086 md_set_array_sectors(mddev, raid5_size(mddev, 0, 0));
5067 set_capacity(mddev->gendisk, mddev->array_sectors); 5087 set_capacity(mddev->gendisk, mddev->array_sectors);
5068 mddev->changed = 1; 5088 mddev->changed = 1;
5069 5089 revalidate_disk(mddev->gendisk);
5070 bdev = bdget_disk(mddev->gendisk, 0);
5071 if (bdev) {
5072 mutex_lock(&bdev->bd_inode->i_mutex);
5073 i_size_write(bdev->bd_inode,
5074 (loff_t)mddev->array_sectors << 9);
5075 mutex_unlock(&bdev->bd_inode->i_mutex);
5076 bdput(bdev);
5077 }
5078 } else { 5090 } else {
5079 int d; 5091 int d;
5080 mddev->degraded = conf->raid_disks; 5092 mddev->degraded = conf->raid_disks;
@@ -5085,8 +5097,15 @@ static void raid5_finish_reshape(mddev_t *mddev)
5085 mddev->degraded--; 5097 mddev->degraded--;
5086 for (d = conf->raid_disks ; 5098 for (d = conf->raid_disks ;
5087 d < conf->raid_disks - mddev->delta_disks; 5099 d < conf->raid_disks - mddev->delta_disks;
5088 d++) 5100 d++) {
5089 raid5_remove_disk(mddev, d); 5101 mdk_rdev_t *rdev = conf->disks[d].rdev;
5102 if (rdev && raid5_remove_disk(mddev, d) == 0) {
5103 char nm[20];
5104 sprintf(nm, "rd%d", rdev->raid_disk);
5105 sysfs_remove_link(&mddev->kobj, nm);
5106 rdev->raid_disk = -1;
5107 }
5108 }
5090 } 5109 }
5091 mddev->layout = conf->algorithm; 5110 mddev->layout = conf->algorithm;
5092 mddev->chunk_sectors = conf->chunk_sectors; 5111 mddev->chunk_sectors = conf->chunk_sectors;
@@ -5106,12 +5125,18 @@ static void raid5_quiesce(mddev_t *mddev, int state)
5106 5125
5107 case 1: /* stop all writes */ 5126 case 1: /* stop all writes */
5108 spin_lock_irq(&conf->device_lock); 5127 spin_lock_irq(&conf->device_lock);
5109 conf->quiesce = 1; 5128 /* '2' tells resync/reshape to pause so that all
5129 * active stripes can drain
5130 */
5131 conf->quiesce = 2;
5110 wait_event_lock_irq(conf->wait_for_stripe, 5132 wait_event_lock_irq(conf->wait_for_stripe,
5111 atomic_read(&conf->active_stripes) == 0 && 5133 atomic_read(&conf->active_stripes) == 0 &&
5112 atomic_read(&conf->active_aligned_reads) == 0, 5134 atomic_read(&conf->active_aligned_reads) == 0,
5113 conf->device_lock, /* nothing */); 5135 conf->device_lock, /* nothing */);
5136 conf->quiesce = 1;
5114 spin_unlock_irq(&conf->device_lock); 5137 spin_unlock_irq(&conf->device_lock);
5138 /* allow reshape to continue */
5139 wake_up(&conf->wait_for_overlap);
5115 break; 5140 break;
5116 5141
5117 case 0: /* re-enable writes */ 5142 case 0: /* re-enable writes */
diff --git a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
index efb4a6c2b57..9a6307a347b 100644
--- a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
+++ b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
@@ -20,8 +20,14 @@
20#include "tuner-simple.h" 20#include "tuner-simple.h"
21#include "stv0297.h" 21#include "stv0297.h"
22 22
23
24/* Can we use the specified front-end? Remember that if we are compiled
25 * into the kernel we can't call code that's in modules. */
26#define FE_SUPPORTED(fe) (defined(CONFIG_DVB_##fe) || \
27 (defined(CONFIG_DVB_##fe##_MODULE) && defined(MODULE)))
28
23/* lnb control */ 29/* lnb control */
24#if defined(CONFIG_DVB_MT312_MODULE) || defined(CONFIG_DVB_STV0299_MODULE) 30#if FE_SUPPORTED(MT312) || FE_SUPPORTED(STV0299)
25static int flexcop_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) 31static int flexcop_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
26{ 32{
27 struct flexcop_device *fc = fe->dvb->priv; 33 struct flexcop_device *fc = fe->dvb->priv;
@@ -49,8 +55,7 @@ static int flexcop_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage
49} 55}
50#endif 56#endif
51 57
52#if defined(CONFIG_DVB_S5H1420_MODULE) || defined(CONFIG_DVB_STV0299_MODULE) \ 58#if FE_SUPPORTED(S5H1420) || FE_SUPPORTED(STV0299) || FE_SUPPORTED(MT312)
53 || defined(CONFIG_DVB_MT312_MODULE)
54static int flexcop_sleep(struct dvb_frontend* fe) 59static int flexcop_sleep(struct dvb_frontend* fe)
55{ 60{
56 struct flexcop_device *fc = fe->dvb->priv; 61 struct flexcop_device *fc = fe->dvb->priv;
@@ -61,7 +66,7 @@ static int flexcop_sleep(struct dvb_frontend* fe)
61#endif 66#endif
62 67
63/* SkyStar2 DVB-S rev 2.3 */ 68/* SkyStar2 DVB-S rev 2.3 */
64#if defined(CONFIG_DVB_MT312_MODULE) 69#if FE_SUPPORTED(MT312)
65static int flexcop_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone) 70static int flexcop_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone)
66{ 71{
67/* u16 wz_half_period_for_45_mhz[] = { 0x01ff, 0x0154, 0x00ff, 0x00cc }; */ 72/* u16 wz_half_period_for_45_mhz[] = { 0x01ff, 0x0154, 0x00ff, 0x00cc }; */
@@ -193,10 +198,12 @@ static int skystar2_rev23_attach(struct flexcop_device *fc,
193 } 198 }
194 return 0; 199 return 0;
195} 200}
201#else
202#define skystar2_rev23_attach NULL
196#endif 203#endif
197 204
198/* SkyStar2 DVB-S rev 2.6 */ 205/* SkyStar2 DVB-S rev 2.6 */
199#if defined(CONFIG_DVB_STV0299_MODULE) 206#if FE_SUPPORTED(STV0299)
200static int samsung_tbmu24112_set_symbol_rate(struct dvb_frontend *fe, 207static int samsung_tbmu24112_set_symbol_rate(struct dvb_frontend *fe,
201 u32 srate, u32 ratio) 208 u32 srate, u32 ratio)
202{ 209{
@@ -321,10 +328,12 @@ static int skystar2_rev26_attach(struct flexcop_device *fc,
321 } 328 }
322 return 0; 329 return 0;
323} 330}
331#else
332#define skystar2_rev26_attach NULL
324#endif 333#endif
325 334
326/* SkyStar2 DVB-S rev 2.7 */ 335/* SkyStar2 DVB-S rev 2.7 */
327#if defined(CONFIG_DVB_S5H1420_MODULE) 336#if FE_SUPPORTED(S5H1420) && FE_SUPPORTED(ISL6421) && FE_SUPPORTED(TUNER_ITD1000)
328static struct s5h1420_config skystar2_rev2_7_s5h1420_config = { 337static struct s5h1420_config skystar2_rev2_7_s5h1420_config = {
329 .demod_address = 0x53, 338 .demod_address = 0x53,
330 .invert = 1, 339 .invert = 1,
@@ -385,10 +394,12 @@ fail:
385 fc->fc_i2c_adap[0].no_base_addr = 0; 394 fc->fc_i2c_adap[0].no_base_addr = 0;
386 return 0; 395 return 0;
387} 396}
397#else
398#define skystar2_rev27_attach NULL
388#endif 399#endif
389 400
390/* SkyStar2 rev 2.8 */ 401/* SkyStar2 rev 2.8 */
391#if defined(CONFIG_DVB_CX24123_MODULE) 402#if FE_SUPPORTED(CX24123) && FE_SUPPORTED(ISL6421) && FE_SUPPORTED(TUNER_CX24113)
392static struct cx24123_config skystar2_rev2_8_cx24123_config = { 403static struct cx24123_config skystar2_rev2_8_cx24123_config = {
393 .demod_address = 0x55, 404 .demod_address = 0x55,
394 .dont_use_pll = 1, 405 .dont_use_pll = 1,
@@ -433,10 +444,12 @@ static int skystar2_rev28_attach(struct flexcop_device *fc,
433 * IR-receiver (PIC16F818) - but the card has no input for that ??? */ 444 * IR-receiver (PIC16F818) - but the card has no input for that ??? */
434 return 1; 445 return 1;
435} 446}
447#else
448#define skystar2_rev28_attach NULL
436#endif 449#endif
437 450
438/* AirStar DVB-T */ 451/* AirStar DVB-T */
439#if defined(CONFIG_DVB_MT352_MODULE) 452#if FE_SUPPORTED(MT352)
440static int samsung_tdtc9251dh0_demod_init(struct dvb_frontend *fe) 453static int samsung_tdtc9251dh0_demod_init(struct dvb_frontend *fe)
441{ 454{
442 static u8 mt352_clock_config[] = { 0x89, 0x18, 0x2d }; 455 static u8 mt352_clock_config[] = { 0x89, 0x18, 0x2d };
@@ -495,10 +508,12 @@ static int airstar_dvbt_attach(struct flexcop_device *fc,
495 } 508 }
496 return 0; 509 return 0;
497} 510}
511#else
512#define airstar_dvbt_attach NULL
498#endif 513#endif
499 514
500/* AirStar ATSC 1st generation */ 515/* AirStar ATSC 1st generation */
501#if defined(CONFIG_DVB_BCM3510_MODULE) 516#if FE_SUPPORTED(BCM3510)
502static int flexcop_fe_request_firmware(struct dvb_frontend *fe, 517static int flexcop_fe_request_firmware(struct dvb_frontend *fe,
503 const struct firmware **fw, char* name) 518 const struct firmware **fw, char* name)
504{ 519{
@@ -517,10 +532,12 @@ static int airstar_atsc1_attach(struct flexcop_device *fc,
517 fc->fe = dvb_attach(bcm3510_attach, &air2pc_atsc_first_gen_config, i2c); 532 fc->fe = dvb_attach(bcm3510_attach, &air2pc_atsc_first_gen_config, i2c);
518 return fc->fe != NULL; 533 return fc->fe != NULL;
519} 534}
535#else
536#define airstar_atsc1_attach NULL
520#endif 537#endif
521 538
522/* AirStar ATSC 2nd generation */ 539/* AirStar ATSC 2nd generation */
523#if defined(CONFIG_DVB_NXT200X_MODULE) 540#if FE_SUPPORTED(NXT200X) && FE_SUPPORTED(PLL)
524static struct nxt200x_config samsung_tbmv_config = { 541static struct nxt200x_config samsung_tbmv_config = {
525 .demod_address = 0x0a, 542 .demod_address = 0x0a,
526}; 543};
@@ -535,10 +552,12 @@ static int airstar_atsc2_attach(struct flexcop_device *fc,
535 return !!dvb_attach(dvb_pll_attach, fc->fe, 0x61, NULL, 552 return !!dvb_attach(dvb_pll_attach, fc->fe, 0x61, NULL,
536 DVB_PLL_SAMSUNG_TBMV); 553 DVB_PLL_SAMSUNG_TBMV);
537} 554}
555#else
556#define airstar_atsc2_attach NULL
538#endif 557#endif
539 558
540/* AirStar ATSC 3rd generation */ 559/* AirStar ATSC 3rd generation */
541#if defined(CONFIG_DVB_LGDT330X_MODULE) 560#if FE_SUPPORTED(LGDT330X)
542static struct lgdt330x_config air2pc_atsc_hd5000_config = { 561static struct lgdt330x_config air2pc_atsc_hd5000_config = {
543 .demod_address = 0x59, 562 .demod_address = 0x59,
544 .demod_chip = LGDT3303, 563 .demod_chip = LGDT3303,
@@ -556,10 +575,12 @@ static int airstar_atsc3_attach(struct flexcop_device *fc,
556 return !!dvb_attach(simple_tuner_attach, fc->fe, i2c, 0x61, 575 return !!dvb_attach(simple_tuner_attach, fc->fe, i2c, 0x61,
557 TUNER_LG_TDVS_H06XF); 576 TUNER_LG_TDVS_H06XF);
558} 577}
578#else
579#define airstar_atsc3_attach NULL
559#endif 580#endif
560 581
561/* CableStar2 DVB-C */ 582/* CableStar2 DVB-C */
562#if defined(CONFIG_DVB_STV0297_MODULE) 583#if FE_SUPPORTED(STV0297)
563static int alps_tdee4_stv0297_tuner_set_params(struct dvb_frontend* fe, 584static int alps_tdee4_stv0297_tuner_set_params(struct dvb_frontend* fe,
564 struct dvb_frontend_parameters *fep) 585 struct dvb_frontend_parameters *fep)
565{ 586{
@@ -698,39 +719,23 @@ static int cablestar2_attach(struct flexcop_device *fc,
698 fc->fe->ops.tuner_ops.set_params = alps_tdee4_stv0297_tuner_set_params; 719 fc->fe->ops.tuner_ops.set_params = alps_tdee4_stv0297_tuner_set_params;
699 return 1; 720 return 1;
700} 721}
722#else
723#define cablestar2_attach NULL
701#endif 724#endif
702 725
703static struct { 726static struct {
704 flexcop_device_type_t type; 727 flexcop_device_type_t type;
705 int (*attach)(struct flexcop_device *, struct i2c_adapter *); 728 int (*attach)(struct flexcop_device *, struct i2c_adapter *);
706} flexcop_frontends[] = { 729} flexcop_frontends[] = {
707#if defined(CONFIG_DVB_S5H1420_MODULE)
708 { FC_SKY_REV27, skystar2_rev27_attach }, 730 { FC_SKY_REV27, skystar2_rev27_attach },
709#endif
710#if defined(CONFIG_DVB_CX24123_MODULE)
711 { FC_SKY_REV28, skystar2_rev28_attach }, 731 { FC_SKY_REV28, skystar2_rev28_attach },
712#endif
713#if defined(CONFIG_DVB_STV0299_MODULE)
714 { FC_SKY_REV26, skystar2_rev26_attach }, 732 { FC_SKY_REV26, skystar2_rev26_attach },
715#endif
716#if defined(CONFIG_DVB_MT352_MODULE)
717 { FC_AIR_DVBT, airstar_dvbt_attach }, 733 { FC_AIR_DVBT, airstar_dvbt_attach },
718#endif
719#if defined(CONFIG_DVB_NXT200X_MODULE)
720 { FC_AIR_ATSC2, airstar_atsc2_attach }, 734 { FC_AIR_ATSC2, airstar_atsc2_attach },
721#endif
722#if defined(CONFIG_DVB_LGDT330X_MODULE)
723 { FC_AIR_ATSC3, airstar_atsc3_attach }, 735 { FC_AIR_ATSC3, airstar_atsc3_attach },
724#endif
725#if defined(CONFIG_DVB_BCM3510_MODULE)
726 { FC_AIR_ATSC1, airstar_atsc1_attach }, 736 { FC_AIR_ATSC1, airstar_atsc1_attach },
727#endif
728#if defined(CONFIG_DVB_STV0297_MODULE)
729 { FC_CABLE, cablestar2_attach }, 737 { FC_CABLE, cablestar2_attach },
730#endif
731#if defined(CONFIG_DVB_MT312_MODULE)
732 { FC_SKY_REV23, skystar2_rev23_attach }, 738 { FC_SKY_REV23, skystar2_rev23_attach },
733#endif
734}; 739};
735 740
736/* try to figure out the frontend */ 741/* try to figure out the frontend */
@@ -738,6 +743,8 @@ int flexcop_frontend_init(struct flexcop_device *fc)
738{ 743{
739 int i; 744 int i;
740 for (i = 0; i < ARRAY_SIZE(flexcop_frontends); i++) { 745 for (i = 0; i < ARRAY_SIZE(flexcop_frontends); i++) {
746 if (!flexcop_frontends[i].attach)
747 continue;
741 /* type needs to be set before, because of some workarounds 748 /* type needs to be set before, because of some workarounds
742 * done based on the probed card type */ 749 * done based on the probed card type */
743 fc->dev_type = flexcop_frontends[i].type; 750 fc->dev_type = flexcop_frontends[i].type;
diff --git a/drivers/media/dvb/frontends/af9013.c b/drivers/media/dvb/frontends/af9013.c
index 136c5863d81..12e018b4107 100644
--- a/drivers/media/dvb/frontends/af9013.c
+++ b/drivers/media/dvb/frontends/af9013.c
@@ -527,6 +527,10 @@ static int af9013_set_ofdm_params(struct af9013_state *state,
527 u8 i, buf[3] = {0, 0, 0}; 527 u8 i, buf[3] = {0, 0, 0};
528 *auto_mode = 0; /* set if parameters are requested to auto set */ 528 *auto_mode = 0; /* set if parameters are requested to auto set */
529 529
530 /* Try auto-detect transmission parameters in case of AUTO requested or
531 garbage parameters given by application for compatibility.
532 MPlayer seems to provide garbage parameters currently. */
533
530 switch (params->transmission_mode) { 534 switch (params->transmission_mode) {
531 case TRANSMISSION_MODE_AUTO: 535 case TRANSMISSION_MODE_AUTO:
532 *auto_mode = 1; 536 *auto_mode = 1;
@@ -536,7 +540,8 @@ static int af9013_set_ofdm_params(struct af9013_state *state,
536 buf[0] |= (1 << 0); 540 buf[0] |= (1 << 0);
537 break; 541 break;
538 default: 542 default:
539 return -EINVAL; 543 deb_info("%s: invalid transmission_mode\n", __func__);
544 *auto_mode = 1;
540 } 545 }
541 546
542 switch (params->guard_interval) { 547 switch (params->guard_interval) {
@@ -554,7 +559,8 @@ static int af9013_set_ofdm_params(struct af9013_state *state,
554 buf[0] |= (3 << 2); 559 buf[0] |= (3 << 2);
555 break; 560 break;
556 default: 561 default:
557 return -EINVAL; 562 deb_info("%s: invalid guard_interval\n", __func__);
563 *auto_mode = 1;
558 } 564 }
559 565
560 switch (params->hierarchy_information) { 566 switch (params->hierarchy_information) {
@@ -572,7 +578,8 @@ static int af9013_set_ofdm_params(struct af9013_state *state,
572 buf[0] |= (3 << 4); 578 buf[0] |= (3 << 4);
573 break; 579 break;
574 default: 580 default:
575 return -EINVAL; 581 deb_info("%s: invalid hierarchy_information\n", __func__);
582 *auto_mode = 1;
576 }; 583 };
577 584
578 switch (params->constellation) { 585 switch (params->constellation) {
@@ -587,7 +594,8 @@ static int af9013_set_ofdm_params(struct af9013_state *state,
587 buf[1] |= (2 << 6); 594 buf[1] |= (2 << 6);
588 break; 595 break;
589 default: 596 default:
590 return -EINVAL; 597 deb_info("%s: invalid constellation\n", __func__);
598 *auto_mode = 1;
591 } 599 }
592 600
593 /* Use HP. How and which case we can switch to LP? */ 601 /* Use HP. How and which case we can switch to LP? */
@@ -611,7 +619,8 @@ static int af9013_set_ofdm_params(struct af9013_state *state,
611 buf[2] |= (4 << 0); 619 buf[2] |= (4 << 0);
612 break; 620 break;
613 default: 621 default:
614 return -EINVAL; 622 deb_info("%s: invalid code_rate_HP\n", __func__);
623 *auto_mode = 1;
615 } 624 }
616 625
617 switch (params->code_rate_LP) { 626 switch (params->code_rate_LP) {
@@ -638,7 +647,8 @@ static int af9013_set_ofdm_params(struct af9013_state *state,
638 if (params->hierarchy_information == HIERARCHY_AUTO) 647 if (params->hierarchy_information == HIERARCHY_AUTO)
639 break; 648 break;
640 default: 649 default:
641 return -EINVAL; 650 deb_info("%s: invalid code_rate_LP\n", __func__);
651 *auto_mode = 1;
642 } 652 }
643 653
644 switch (params->bandwidth) { 654 switch (params->bandwidth) {
@@ -651,7 +661,8 @@ static int af9013_set_ofdm_params(struct af9013_state *state,
651 buf[1] |= (2 << 2); 661 buf[1] |= (2 << 2);
652 break; 662 break;
653 default: 663 default:
654 return -EINVAL; 664 deb_info("%s: invalid bandwidth\n", __func__);
665 buf[1] |= (2 << 2); /* cannot auto-detect BW, try 8 MHz */
655 } 666 }
656 667
657 /* program */ 668 /* program */
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c
index fdb4adff3d2..ca6558c394b 100644
--- a/drivers/media/video/bt8xx/bttv-cards.c
+++ b/drivers/media/video/bt8xx/bttv-cards.c
@@ -3324,8 +3324,6 @@ void __devinit bttv_init_card1(struct bttv *btv)
3324/* initialization part two -- after registering i2c bus */ 3324/* initialization part two -- after registering i2c bus */
3325void __devinit bttv_init_card2(struct bttv *btv) 3325void __devinit bttv_init_card2(struct bttv *btv)
3326{ 3326{
3327 int addr=ADDR_UNSET;
3328
3329 btv->tuner_type = UNSET; 3327 btv->tuner_type = UNSET;
3330 3328
3331 if (BTTV_BOARD_UNKNOWN == btv->c.type) { 3329 if (BTTV_BOARD_UNKNOWN == btv->c.type) {
@@ -3470,9 +3468,6 @@ void __devinit bttv_init_card2(struct bttv *btv)
3470 btv->pll.pll_current = -1; 3468 btv->pll.pll_current = -1;
3471 3469
3472 /* tuner configuration (from card list / autodetect / insmod option) */ 3470 /* tuner configuration (from card list / autodetect / insmod option) */
3473 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
3474 addr = bttv_tvcards[btv->c.type].tuner_addr;
3475
3476 if (UNSET != bttv_tvcards[btv->c.type].tuner_type) 3471 if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
3477 if (UNSET == btv->tuner_type) 3472 if (UNSET == btv->tuner_type)
3478 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type; 3473 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
@@ -3496,40 +3491,6 @@ void __devinit bttv_init_card2(struct bttv *btv)
3496 if (UNSET == btv->tuner_type) 3491 if (UNSET == btv->tuner_type)
3497 btv->tuner_type = TUNER_ABSENT; 3492 btv->tuner_type = TUNER_ABSENT;
3498 3493
3499 if (btv->tuner_type != TUNER_ABSENT) {
3500 struct tuner_setup tun_setup;
3501
3502 /* Load tuner module before issuing tuner config call! */
3503 if (bttv_tvcards[btv->c.type].has_radio)
3504 v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
3505 &btv->c.i2c_adap, "tuner", "tuner",
3506 v4l2_i2c_tuner_addrs(ADDRS_RADIO));
3507 v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
3508 &btv->c.i2c_adap, "tuner", "tuner",
3509 v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
3510 v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
3511 &btv->c.i2c_adap, "tuner", "tuner",
3512 v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD));
3513
3514 tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
3515 tun_setup.type = btv->tuner_type;
3516 tun_setup.addr = addr;
3517
3518 if (bttv_tvcards[btv->c.type].has_radio)
3519 tun_setup.mode_mask |= T_RADIO;
3520
3521 bttv_call_all(btv, tuner, s_type_addr, &tun_setup);
3522 }
3523
3524 if (btv->tda9887_conf) {
3525 struct v4l2_priv_tun_config tda9887_cfg;
3526
3527 tda9887_cfg.tuner = TUNER_TDA9887;
3528 tda9887_cfg.priv = &btv->tda9887_conf;
3529
3530 bttv_call_all(btv, tuner, s_config, &tda9887_cfg);
3531 }
3532
3533 btv->dig = bttv_tvcards[btv->c.type].has_dig_in ? 3494 btv->dig = bttv_tvcards[btv->c.type].has_dig_in ?
3534 bttv_tvcards[btv->c.type].video_inputs - 1 : UNSET; 3495 bttv_tvcards[btv->c.type].video_inputs - 1 : UNSET;
3535 btv->svhs = bttv_tvcards[btv->c.type].svhs == NO_SVHS ? 3496 btv->svhs = bttv_tvcards[btv->c.type].svhs == NO_SVHS ?
@@ -3540,15 +3501,15 @@ void __devinit bttv_init_card2(struct bttv *btv)
3540 btv->has_remote = remote[btv->c.nr]; 3501 btv->has_remote = remote[btv->c.nr];
3541 3502
3542 if (bttv_tvcards[btv->c.type].has_radio) 3503 if (bttv_tvcards[btv->c.type].has_radio)
3543 btv->has_radio=1; 3504 btv->has_radio = 1;
3544 if (bttv_tvcards[btv->c.type].has_remote) 3505 if (bttv_tvcards[btv->c.type].has_remote)
3545 btv->has_remote=1; 3506 btv->has_remote = 1;
3546 if (!bttv_tvcards[btv->c.type].no_gpioirq) 3507 if (!bttv_tvcards[btv->c.type].no_gpioirq)
3547 btv->gpioirq=1; 3508 btv->gpioirq = 1;
3548 if (bttv_tvcards[btv->c.type].volume_gpio) 3509 if (bttv_tvcards[btv->c.type].volume_gpio)
3549 btv->volume_gpio=bttv_tvcards[btv->c.type].volume_gpio; 3510 btv->volume_gpio = bttv_tvcards[btv->c.type].volume_gpio;
3550 if (bttv_tvcards[btv->c.type].audio_mode_gpio) 3511 if (bttv_tvcards[btv->c.type].audio_mode_gpio)
3551 btv->audio_mode_gpio=bttv_tvcards[btv->c.type].audio_mode_gpio; 3512 btv->audio_mode_gpio = bttv_tvcards[btv->c.type].audio_mode_gpio;
3552 3513
3553 if (btv->tuner_type == TUNER_ABSENT) 3514 if (btv->tuner_type == TUNER_ABSENT)
3554 return; /* no tuner or related drivers to load */ 3515 return; /* no tuner or related drivers to load */
@@ -3666,6 +3627,49 @@ no_audio:
3666} 3627}
3667 3628
3668 3629
3630/* initialize the tuner */
3631void __devinit bttv_init_tuner(struct bttv *btv)
3632{
3633 int addr = ADDR_UNSET;
3634
3635 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
3636 addr = bttv_tvcards[btv->c.type].tuner_addr;
3637
3638 if (btv->tuner_type != TUNER_ABSENT) {
3639 struct tuner_setup tun_setup;
3640
3641 /* Load tuner module before issuing tuner config call! */
3642 if (bttv_tvcards[btv->c.type].has_radio)
3643 v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
3644 &btv->c.i2c_adap, "tuner", "tuner",
3645 v4l2_i2c_tuner_addrs(ADDRS_RADIO));
3646 v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
3647 &btv->c.i2c_adap, "tuner", "tuner",
3648 v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
3649 v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
3650 &btv->c.i2c_adap, "tuner", "tuner",
3651 v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD));
3652
3653 tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
3654 tun_setup.type = btv->tuner_type;
3655 tun_setup.addr = addr;
3656
3657 if (bttv_tvcards[btv->c.type].has_radio)
3658 tun_setup.mode_mask |= T_RADIO;
3659
3660 bttv_call_all(btv, tuner, s_type_addr, &tun_setup);
3661 }
3662
3663 if (btv->tda9887_conf) {
3664 struct v4l2_priv_tun_config tda9887_cfg;
3665
3666 tda9887_cfg.tuner = TUNER_TDA9887;
3667 tda9887_cfg.priv = &btv->tda9887_conf;
3668
3669 bttv_call_all(btv, tuner, s_config, &tda9887_cfg);
3670 }
3671}
3672
3669/* ----------------------------------------------------------------------- */ 3673/* ----------------------------------------------------------------------- */
3670 3674
3671static void modtec_eeprom(struct bttv *btv) 3675static void modtec_eeprom(struct bttv *btv)
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index d147d29bb0d..8cc6dd28d6a 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -4419,6 +4419,7 @@ static int __devinit bttv_probe(struct pci_dev *dev,
4419 4419
4420 /* some card-specific stuff (needs working i2c) */ 4420 /* some card-specific stuff (needs working i2c) */
4421 bttv_init_card2(btv); 4421 bttv_init_card2(btv);
4422 bttv_init_tuner(btv);
4422 init_irqreg(btv); 4423 init_irqreg(btv);
4423 4424
4424 /* register video4linux + input */ 4425 /* register video4linux + input */
diff --git a/drivers/media/video/bt8xx/bttv.h b/drivers/media/video/bt8xx/bttv.h
index 3d36daf206f..3ec2402c6b4 100644
--- a/drivers/media/video/bt8xx/bttv.h
+++ b/drivers/media/video/bt8xx/bttv.h
@@ -283,6 +283,7 @@ extern struct tvcard bttv_tvcards[];
283extern void bttv_idcard(struct bttv *btv); 283extern void bttv_idcard(struct bttv *btv);
284extern void bttv_init_card1(struct bttv *btv); 284extern void bttv_init_card1(struct bttv *btv);
285extern void bttv_init_card2(struct bttv *btv); 285extern void bttv_init_card2(struct bttv *btv);
286extern void bttv_init_tuner(struct bttv *btv);
286 287
287/* card-specific funtions */ 288/* card-specific funtions */
288extern void tea5757_set_freq(struct bttv *btv, unsigned short freq); 289extern void tea5757_set_freq(struct bttv *btv, unsigned short freq);
diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c
index 428f0c45e6b..e0cf21e0b1b 100644
--- a/drivers/media/video/cx23885/cx23885-417.c
+++ b/drivers/media/video/cx23885/cx23885-417.c
@@ -58,7 +58,8 @@ MODULE_PARM_DESC(v4l_debug, "enable V4L debug messages");
58 58
59#define dprintk(level, fmt, arg...)\ 59#define dprintk(level, fmt, arg...)\
60 do { if (v4l_debug >= level) \ 60 do { if (v4l_debug >= level) \
61 printk(KERN_DEBUG "%s: " fmt, dev->name , ## arg);\ 61 printk(KERN_DEBUG "%s: " fmt, \
62 (dev) ? dev->name : "cx23885[?]", ## arg); \
62 } while (0) 63 } while (0)
63 64
64static struct cx23885_tvnorm cx23885_tvnorms[] = { 65static struct cx23885_tvnorm cx23885_tvnorms[] = {
@@ -1677,6 +1678,7 @@ static struct v4l2_file_operations mpeg_fops = {
1677 .read = mpeg_read, 1678 .read = mpeg_read,
1678 .poll = mpeg_poll, 1679 .poll = mpeg_poll,
1679 .mmap = mpeg_mmap, 1680 .mmap = mpeg_mmap,
1681 .ioctl = video_ioctl2,
1680}; 1682};
1681 1683
1682static const struct v4l2_ioctl_ops mpeg_ioctl_ops = { 1684static const struct v4l2_ioctl_ops mpeg_ioctl_ops = {
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index ebd24a25fb8..320f1f60276 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -58,8 +58,6 @@ static unsigned int card[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET };
58module_param_array(card, int, NULL, 0444); 58module_param_array(card, int, NULL, 0444);
59MODULE_PARM_DESC(card, "card type"); 59MODULE_PARM_DESC(card, "card type");
60 60
61#define MT9V011_VERSION 0x8243
62
63/* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS */ 61/* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS */
64static unsigned long em28xx_devused; 62static unsigned long em28xx_devused;
65 63
@@ -159,6 +157,20 @@ static struct em28xx_reg_seq evga_indtube_digital[] = {
159 { -1, -1, -1, -1}, 157 { -1, -1, -1, -1},
160}; 158};
161 159
160/* Pinnacle Hybrid Pro eb1a:2881 */
161static struct em28xx_reg_seq pinnacle_hybrid_pro_analog[] = {
162 {EM28XX_R08_GPIO, 0xfd, ~EM_GPIO_4, 10},
163 { -1, -1, -1, -1},
164};
165
166static struct em28xx_reg_seq pinnacle_hybrid_pro_digital[] = {
167 {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10},
168 {EM2880_R04_GPO, 0x04, 0xff, 100},/* zl10353 reset */
169 {EM2880_R04_GPO, 0x0c, 0xff, 1},
170 { -1, -1, -1, -1},
171};
172
173
162/* Callback for the most boards */ 174/* Callback for the most boards */
163static struct em28xx_reg_seq default_tuner_gpio[] = { 175static struct em28xx_reg_seq default_tuner_gpio[] = {
164 {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10}, 176 {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10},
@@ -205,13 +217,15 @@ static struct em28xx_reg_seq silvercrest_reg_seq[] = {
205 */ 217 */
206struct em28xx_board em28xx_boards[] = { 218struct em28xx_board em28xx_boards[] = {
207 [EM2750_BOARD_UNKNOWN] = { 219 [EM2750_BOARD_UNKNOWN] = {
208 .name = "Unknown EM2750/EM2751 webcam grabber", 220 .name = "EM2710/EM2750/EM2751 webcam grabber",
209 .xclk = EM28XX_XCLK_FREQUENCY_48MHZ, 221 .xclk = EM28XX_XCLK_FREQUENCY_48MHZ,
210 .tuner_type = TUNER_ABSENT, /* This is a webcam */ 222 .tuner_type = TUNER_ABSENT,
223 .is_webcam = 1,
211 .input = { { 224 .input = { {
212 .type = EM28XX_VMUX_COMPOSITE1, 225 .type = EM28XX_VMUX_COMPOSITE1,
213 .vmux = 0, 226 .vmux = 0,
214 .amux = EM28XX_AMUX_VIDEO, 227 .amux = EM28XX_AMUX_VIDEO,
228 .gpio = silvercrest_reg_seq,
215 } }, 229 } },
216 }, 230 },
217 [EM2800_BOARD_UNKNOWN] = { 231 [EM2800_BOARD_UNKNOWN] = {
@@ -233,13 +247,15 @@ struct em28xx_board em28xx_boards[] = {
233 [EM2820_BOARD_UNKNOWN] = { 247 [EM2820_BOARD_UNKNOWN] = {
234 .name = "Unknown EM2750/28xx video grabber", 248 .name = "Unknown EM2750/28xx video grabber",
235 .tuner_type = TUNER_ABSENT, 249 .tuner_type = TUNER_ABSENT,
250 .is_webcam = 1, /* To enable sensor probe */
236 }, 251 },
237 [EM2750_BOARD_DLCW_130] = { 252 [EM2750_BOARD_DLCW_130] = {
238 /* Beijing Huaqi Information Digital Technology Co., Ltd */ 253 /* Beijing Huaqi Information Digital Technology Co., Ltd */
239 .name = "Huaqi DLCW-130", 254 .name = "Huaqi DLCW-130",
240 .valid = EM28XX_BOARD_NOT_VALIDATED, 255 .valid = EM28XX_BOARD_NOT_VALIDATED,
241 .xclk = EM28XX_XCLK_FREQUENCY_48MHZ, 256 .xclk = EM28XX_XCLK_FREQUENCY_48MHZ,
242 .tuner_type = TUNER_ABSENT, /* This is a webcam */ 257 .tuner_type = TUNER_ABSENT,
258 .is_webcam = 1,
243 .input = { { 259 .input = { {
244 .type = EM28XX_VMUX_COMPOSITE1, 260 .type = EM28XX_VMUX_COMPOSITE1,
245 .vmux = 0, 261 .vmux = 0,
@@ -440,7 +456,8 @@ struct em28xx_board em28xx_boards[] = {
440 [EM2820_BOARD_VIDEOLOGY_20K14XUSB] = { 456 [EM2820_BOARD_VIDEOLOGY_20K14XUSB] = {
441 .name = "Videology 20K14XUSB USB2.0", 457 .name = "Videology 20K14XUSB USB2.0",
442 .valid = EM28XX_BOARD_NOT_VALIDATED, 458 .valid = EM28XX_BOARD_NOT_VALIDATED,
443 .tuner_type = TUNER_ABSENT, /* This is a webcam */ 459 .tuner_type = TUNER_ABSENT,
460 .is_webcam = 1,
444 .input = { { 461 .input = { {
445 .type = EM28XX_VMUX_COMPOSITE1, 462 .type = EM28XX_VMUX_COMPOSITE1,
446 .vmux = 0, 463 .vmux = 0,
@@ -450,8 +467,7 @@ struct em28xx_board em28xx_boards[] = {
450 [EM2820_BOARD_SILVERCREST_WEBCAM] = { 467 [EM2820_BOARD_SILVERCREST_WEBCAM] = {
451 .name = "Silvercrest Webcam 1.3mpix", 468 .name = "Silvercrest Webcam 1.3mpix",
452 .tuner_type = TUNER_ABSENT, 469 .tuner_type = TUNER_ABSENT,
453 .is_27xx = 1, 470 .is_webcam = 1,
454 .decoder = EM28XX_MT9V011,
455 .input = { { 471 .input = { {
456 .type = EM28XX_VMUX_COMPOSITE1, 472 .type = EM28XX_VMUX_COMPOSITE1,
457 .vmux = 0, 473 .vmux = 0,
@@ -500,7 +516,8 @@ struct em28xx_board em28xx_boards[] = {
500 /* Beijing Huaqi Information Digital Technology Co., Ltd */ 516 /* Beijing Huaqi Information Digital Technology Co., Ltd */
501 .name = "NetGMBH Cam", 517 .name = "NetGMBH Cam",
502 .valid = EM28XX_BOARD_NOT_VALIDATED, 518 .valid = EM28XX_BOARD_NOT_VALIDATED,
503 .tuner_type = TUNER_ABSENT, /* This is a webcam */ 519 .tuner_type = TUNER_ABSENT,
520 .is_webcam = 1,
504 .input = { { 521 .input = { {
505 .type = EM28XX_VMUX_COMPOSITE1, 522 .type = EM28XX_VMUX_COMPOSITE1,
506 .vmux = 0, 523 .vmux = 0,
@@ -1250,25 +1267,26 @@ struct em28xx_board em28xx_boards[] = {
1250 }, 1267 },
1251 [EM2881_BOARD_PINNACLE_HYBRID_PRO] = { 1268 [EM2881_BOARD_PINNACLE_HYBRID_PRO] = {
1252 .name = "Pinnacle Hybrid Pro", 1269 .name = "Pinnacle Hybrid Pro",
1253 .valid = EM28XX_BOARD_NOT_VALIDATED,
1254 .tuner_type = TUNER_XC2028, 1270 .tuner_type = TUNER_XC2028,
1255 .tuner_gpio = default_tuner_gpio, 1271 .tuner_gpio = default_tuner_gpio,
1256 .decoder = EM28XX_TVP5150, 1272 .decoder = EM28XX_TVP5150,
1273 .has_dvb = 1,
1274 .dvb_gpio = pinnacle_hybrid_pro_digital,
1257 .input = { { 1275 .input = { {
1258 .type = EM28XX_VMUX_TELEVISION, 1276 .type = EM28XX_VMUX_TELEVISION,
1259 .vmux = TVP5150_COMPOSITE0, 1277 .vmux = TVP5150_COMPOSITE0,
1260 .amux = EM28XX_AMUX_VIDEO, 1278 .amux = EM28XX_AMUX_VIDEO,
1261 .gpio = default_analog, 1279 .gpio = pinnacle_hybrid_pro_analog,
1262 }, { 1280 }, {
1263 .type = EM28XX_VMUX_COMPOSITE1, 1281 .type = EM28XX_VMUX_COMPOSITE1,
1264 .vmux = TVP5150_COMPOSITE1, 1282 .vmux = TVP5150_COMPOSITE1,
1265 .amux = EM28XX_AMUX_LINE_IN, 1283 .amux = EM28XX_AMUX_LINE_IN,
1266 .gpio = default_analog, 1284 .gpio = pinnacle_hybrid_pro_analog,
1267 }, { 1285 }, {
1268 .type = EM28XX_VMUX_SVIDEO, 1286 .type = EM28XX_VMUX_SVIDEO,
1269 .vmux = TVP5150_SVIDEO, 1287 .vmux = TVP5150_SVIDEO,
1270 .amux = EM28XX_AMUX_LINE_IN, 1288 .amux = EM28XX_AMUX_LINE_IN,
1271 .gpio = default_analog, 1289 .gpio = pinnacle_hybrid_pro_analog,
1272 } }, 1290 } },
1273 }, 1291 },
1274 [EM2882_BOARD_PINNACLE_HYBRID_PRO] = { 1292 [EM2882_BOARD_PINNACLE_HYBRID_PRO] = {
@@ -1638,6 +1656,7 @@ static struct em28xx_hash_table em28xx_eeprom_hash[] = {
1638 {0x966a0441, EM2880_BOARD_KWORLD_DVB_310U, TUNER_XC2028}, 1656 {0x966a0441, EM2880_BOARD_KWORLD_DVB_310U, TUNER_XC2028},
1639 {0x9567eb1a, EM2880_BOARD_EMPIRE_DUAL_TV, TUNER_XC2028}, 1657 {0x9567eb1a, EM2880_BOARD_EMPIRE_DUAL_TV, TUNER_XC2028},
1640 {0xcee44a99, EM2882_BOARD_EVGA_INDTUBE, TUNER_XC2028}, 1658 {0xcee44a99, EM2882_BOARD_EVGA_INDTUBE, TUNER_XC2028},
1659 {0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO, TUNER_XC2028},
1641}; 1660};
1642 1661
1643/* I2C devicelist hash table for devices with generic USB IDs */ 1662/* I2C devicelist hash table for devices with generic USB IDs */
@@ -1704,6 +1723,32 @@ static inline void em28xx_set_model(struct em28xx *dev)
1704 EM28XX_I2C_FREQ_100_KHZ; 1723 EM28XX_I2C_FREQ_100_KHZ;
1705} 1724}
1706 1725
1726/* FIXME: Should be replaced by a proper mt9m001 driver */
1727static int em28xx_initialize_mt9m001(struct em28xx *dev)
1728{
1729 int i;
1730 unsigned char regs[][3] = {
1731 { 0x0d, 0x00, 0x01, },
1732 { 0x0d, 0x00, 0x00, },
1733 { 0x04, 0x05, 0x00, }, /* hres = 1280 */
1734 { 0x03, 0x04, 0x00, }, /* vres = 1024 */
1735 { 0x20, 0x11, 0x00, },
1736 { 0x06, 0x00, 0x10, },
1737 { 0x2b, 0x00, 0x24, },
1738 { 0x2e, 0x00, 0x24, },
1739 { 0x35, 0x00, 0x24, },
1740 { 0x2d, 0x00, 0x20, },
1741 { 0x2c, 0x00, 0x20, },
1742 { 0x09, 0x0a, 0xd4, },
1743 { 0x35, 0x00, 0x57, },
1744 };
1745
1746 for (i = 0; i < ARRAY_SIZE(regs); i++)
1747 i2c_master_send(&dev->i2c_client, &regs[i][0], 3);
1748
1749 return 0;
1750}
1751
1707/* HINT method: webcam I2C chips 1752/* HINT method: webcam I2C chips
1708 * 1753 *
1709 * This method work for webcams with Micron sensors 1754 * This method work for webcams with Micron sensors
@@ -1716,9 +1761,6 @@ static int em28xx_hint_sensor(struct em28xx *dev)
1716 __be16 version_be; 1761 __be16 version_be;
1717 u16 version; 1762 u16 version;
1718 1763
1719 if (dev->model != EM2820_BOARD_UNKNOWN)
1720 return 0;
1721
1722 dev->i2c_client.addr = 0xba >> 1; 1764 dev->i2c_client.addr = 0xba >> 1;
1723 cmd = 0; 1765 cmd = 0;
1724 i2c_master_send(&dev->i2c_client, &cmd, 1); 1766 i2c_master_send(&dev->i2c_client, &cmd, 1);
@@ -1729,16 +1771,38 @@ static int em28xx_hint_sensor(struct em28xx *dev)
1729 version = be16_to_cpu(version_be); 1771 version = be16_to_cpu(version_be);
1730 1772
1731 switch (version) { 1773 switch (version) {
1732 case MT9V011_VERSION: 1774 case 0x8243: /* mt9v011 640x480 1.3 Mpix sensor */
1733 dev->model = EM2820_BOARD_SILVERCREST_WEBCAM; 1775 dev->model = EM2820_BOARD_SILVERCREST_WEBCAM;
1734 sensor_name = "mt9v011"; 1776 sensor_name = "mt9v011";
1777 dev->em28xx_sensor = EM28XX_MT9V011;
1778 dev->sensor_xres = 640;
1779 dev->sensor_yres = 480;
1780 dev->sensor_xtal = 6300000;
1781
1782 /* probably means GRGB 16 bit bayer */
1783 dev->vinmode = 0x0d;
1784 dev->vinctl = 0x00;
1785
1786 break;
1787 case 0x8431:
1788 dev->model = EM2750_BOARD_UNKNOWN;
1789 sensor_name = "mt9m001";
1790 dev->em28xx_sensor = EM28XX_MT9M001;
1791 em28xx_initialize_mt9m001(dev);
1792 dev->sensor_xres = 1280;
1793 dev->sensor_yres = 1024;
1794
1795 /* probably means BGGR 16 bit bayer */
1796 dev->vinmode = 0x0c;
1797 dev->vinctl = 0x00;
1798
1735 break; 1799 break;
1736 default: 1800 default:
1737 printk("Unknown Sensor 0x%04x\n", be16_to_cpu(version)); 1801 printk("Unknown Micron Sensor 0x%04x\n", be16_to_cpu(version));
1738 return -EINVAL; 1802 return -EINVAL;
1739 } 1803 }
1740 1804
1741 em28xx_errdev("Sensor is %s, assuming that webcam is %s\n", 1805 em28xx_errdev("Sensor is %s, using model %s entry.\n",
1742 sensor_name, em28xx_boards[dev->model].name); 1806 sensor_name, em28xx_boards[dev->model].name);
1743 1807
1744 return 0; 1808 return 0;
@@ -1772,10 +1836,7 @@ void em28xx_pre_card_setup(struct em28xx *dev)
1772 em28xx_info("chip ID is em2750\n"); 1836 em28xx_info("chip ID is em2750\n");
1773 break; 1837 break;
1774 case CHIP_ID_EM2820: 1838 case CHIP_ID_EM2820:
1775 if (dev->board.is_27xx) 1839 em28xx_info("chip ID is em2710 or em2820\n");
1776 em28xx_info("chip is em2710\n");
1777 else
1778 em28xx_info("chip ID is em2820\n");
1779 break; 1840 break;
1780 case CHIP_ID_EM2840: 1841 case CHIP_ID_EM2840:
1781 em28xx_info("chip ID is em2840\n"); 1842 em28xx_info("chip ID is em2840\n");
@@ -1929,6 +1990,7 @@ static void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl)
1929 ctl->demod = XC3028_FE_ZARLINK456; 1990 ctl->demod = XC3028_FE_ZARLINK456;
1930 break; 1991 break;
1931 case EM2880_BOARD_TERRATEC_HYBRID_XS: 1992 case EM2880_BOARD_TERRATEC_HYBRID_XS:
1993 case EM2881_BOARD_PINNACLE_HYBRID_PRO:
1932 ctl->demod = XC3028_FE_ZARLINK456; 1994 ctl->demod = XC3028_FE_ZARLINK456;
1933 break; 1995 break;
1934 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: 1996 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
@@ -2225,6 +2287,7 @@ void em28xx_card_setup(struct em28xx *dev)
2225 em28xx_set_mode() in em28xx_pre_card_setup() was a no-op, 2287 em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
2226 so make the call now so the analog GPIOs are set properly 2288 so make the call now so the analog GPIOs are set properly
2227 before probing the i2c bus. */ 2289 before probing the i2c bus. */
2290 em28xx_gpio_set(dev, dev->board.tuner_gpio);
2228 em28xx_set_mode(dev, EM28XX_ANALOG_MODE); 2291 em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
2229 break; 2292 break;
2230 case EM2820_BOARD_SILVERCREST_WEBCAM: 2293 case EM2820_BOARD_SILVERCREST_WEBCAM:
@@ -2262,9 +2325,14 @@ void em28xx_card_setup(struct em28xx *dev)
2262 v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, &dev->i2c_adap, 2325 v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, &dev->i2c_adap,
2263 "tvp5150", "tvp5150", tvp5150_addrs); 2326 "tvp5150", "tvp5150", tvp5150_addrs);
2264 2327
2265 if (dev->board.decoder == EM28XX_MT9V011) 2328 if (dev->em28xx_sensor == EM28XX_MT9V011) {
2266 v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, &dev->i2c_adap, 2329 struct v4l2_subdev *sd;
2267 "mt9v011", "mt9v011", mt9v011_addrs); 2330
2331 sd = v4l2_i2c_new_probed_subdev(&dev->v4l2_dev,
2332 &dev->i2c_adap, "mt9v011", "mt9v011", mt9v011_addrs);
2333 v4l2_subdev_call(sd, core, s_config, 0, &dev->sensor_xtal);
2334 }
2335
2268 2336
2269 if (dev->board.adecoder == EM28XX_TVAUDIO) 2337 if (dev->board.adecoder == EM28XX_TVAUDIO)
2270 v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, 2338 v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
@@ -2410,7 +2478,19 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
2410 return errCode; 2478 return errCode;
2411 } 2479 }
2412 2480
2413 em28xx_hint_sensor(dev); 2481 /*
2482 * Default format, used for tvp5150 or saa711x output formats
2483 */
2484 dev->vinmode = 0x10;
2485 dev->vinctl = 0x11;
2486
2487 /*
2488 * If the device can be a webcam, seek for a sensor.
2489 * If sensor is not found, then it isn't a webcam.
2490 */
2491 if (dev->board.is_webcam)
2492 if (em28xx_hint_sensor(dev) < 0)
2493 dev->board.is_webcam = 0;
2414 2494
2415 /* Do board specific init and eeprom reading */ 2495 /* Do board specific init and eeprom reading */
2416 em28xx_card_setup(dev); 2496 em28xx_card_setup(dev);
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c
index 079ab4d563a..5b78e199abd 100644
--- a/drivers/media/video/em28xx/em28xx-core.c
+++ b/drivers/media/video/em28xx/em28xx-core.c
@@ -648,28 +648,17 @@ int em28xx_capture_start(struct em28xx *dev, int start)
648int em28xx_set_outfmt(struct em28xx *dev) 648int em28xx_set_outfmt(struct em28xx *dev)
649{ 649{
650 int ret; 650 int ret;
651 int vinmode, vinctl, outfmt;
652
653 outfmt = dev->format->reg;
654
655 if (dev->board.is_27xx) {
656 vinmode = 0x0d;
657 vinctl = 0x00;
658 } else {
659 vinmode = 0x10;
660 vinctl = 0x11;
661 }
662 651
663 ret = em28xx_write_reg_bits(dev, EM28XX_R27_OUTFMT, 652 ret = em28xx_write_reg_bits(dev, EM28XX_R27_OUTFMT,
664 outfmt | 0x20, 0xff); 653 dev->format->reg | 0x20, 0xff);
665 if (ret < 0) 654 if (ret < 0)
666 return ret; 655 return ret;
667 656
668 ret = em28xx_write_reg(dev, EM28XX_R10_VINMODE, vinmode); 657 ret = em28xx_write_reg(dev, EM28XX_R10_VINMODE, dev->vinmode);
669 if (ret < 0) 658 if (ret < 0)
670 return ret; 659 return ret;
671 660
672 return em28xx_write_reg(dev, EM28XX_R11_VINCTRL, vinctl); 661 return em28xx_write_reg(dev, EM28XX_R11_VINCTRL, dev->vinctl);
673} 662}
674 663
675static int em28xx_accumulator_set(struct em28xx *dev, u8 xmin, u8 xmax, 664static int em28xx_accumulator_set(struct em28xx *dev, u8 xmin, u8 xmax,
@@ -707,10 +696,7 @@ static int em28xx_scaler_set(struct em28xx *dev, u16 h, u16 v)
707 u8 mode; 696 u8 mode;
708 /* the em2800 scaler only supports scaling down to 50% */ 697 /* the em2800 scaler only supports scaling down to 50% */
709 698
710 if (dev->board.is_27xx) { 699 if (dev->board.is_em2800) {
711 /* FIXME: Don't use the scaler yet */
712 mode = 0;
713 } else if (dev->board.is_em2800) {
714 mode = (v ? 0x20 : 0x00) | (h ? 0x10 : 0x00); 700 mode = (v ? 0x20 : 0x00) | (h ? 0x10 : 0x00);
715 } else { 701 } else {
716 u8 buf[2]; 702 u8 buf[2];
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
index 3da97c32b8f..cf0ac7f2a30 100644
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -31,6 +31,8 @@
31#include "lgdt330x.h" 31#include "lgdt330x.h"
32#include "zl10353.h" 32#include "zl10353.h"
33#include "s5h1409.h" 33#include "s5h1409.h"
34#include "mt352.h"
35#include "mt352_priv.h" /* FIXME */
34 36
35MODULE_DESCRIPTION("driver for em28xx based DVB cards"); 37MODULE_DESCRIPTION("driver for em28xx based DVB cards");
36MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>"); 38MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>");
@@ -243,7 +245,7 @@ static struct s5h1409_config em28xx_s5h1409_with_xc3028 = {
243 .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK 245 .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK
244}; 246};
245 247
246static struct zl10353_config em28xx_terratec_xs_zl10353_xc3028 = { 248static struct zl10353_config em28xx_zl10353_xc3028_no_i2c_gate = {
247 .demod_address = (0x1e >> 1), 249 .demod_address = (0x1e >> 1),
248 .no_tuner = 1, 250 .no_tuner = 1,
249 .disable_i2c_gate_ctrl = 1, 251 .disable_i2c_gate_ctrl = 1,
@@ -258,6 +260,41 @@ static struct drx397xD_config em28xx_drx397xD_with_xc3028 = {
258}; 260};
259#endif 261#endif
260 262
263static int mt352_terratec_xs_init(struct dvb_frontend *fe)
264{
265 /* Values extracted from a USB trace of the Terratec Windows driver */
266 static u8 clock_config[] = { CLOCK_CTL, 0x38, 0x2c };
267 static u8 reset[] = { RESET, 0x80 };
268 static u8 adc_ctl_1_cfg[] = { ADC_CTL_1, 0x40 };
269 static u8 agc_cfg[] = { AGC_TARGET, 0x28, 0xa0 };
270 static u8 input_freq_cfg[] = { INPUT_FREQ_1, 0x31, 0xb8 };
271 static u8 rs_err_cfg[] = { RS_ERR_PER_1, 0x00, 0x4d };
272 static u8 capt_range_cfg[] = { CAPT_RANGE, 0x32 };
273 static u8 trl_nom_cfg[] = { TRL_NOMINAL_RATE_1, 0x64, 0x00 };
274 static u8 tps_given_cfg[] = { TPS_GIVEN_1, 0x40, 0x80, 0x50 };
275 static u8 tuner_go[] = { TUNER_GO, 0x01};
276
277 mt352_write(fe, clock_config, sizeof(clock_config));
278 udelay(200);
279 mt352_write(fe, reset, sizeof(reset));
280 mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg));
281 mt352_write(fe, agc_cfg, sizeof(agc_cfg));
282 mt352_write(fe, input_freq_cfg, sizeof(input_freq_cfg));
283 mt352_write(fe, rs_err_cfg, sizeof(rs_err_cfg));
284 mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg));
285 mt352_write(fe, trl_nom_cfg, sizeof(trl_nom_cfg));
286 mt352_write(fe, tps_given_cfg, sizeof(tps_given_cfg));
287 mt352_write(fe, tuner_go, sizeof(tuner_go));
288 return 0;
289}
290
291static struct mt352_config terratec_xs_mt352_cfg = {
292 .demod_address = (0x1e >> 1),
293 .no_tuner = 1,
294 .if2 = 45600,
295 .demod_init = mt352_terratec_xs_init,
296};
297
261/* ------------------------------------------------------------------ */ 298/* ------------------------------------------------------------------ */
262 299
263static int attach_xc3028(u8 addr, struct em28xx *dev) 300static int attach_xc3028(u8 addr, struct em28xx *dev)
@@ -440,7 +477,6 @@ static int dvb_init(struct em28xx *dev)
440 goto out_free; 477 goto out_free;
441 } 478 }
442 break; 479 break;
443 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
444 case EM2880_BOARD_KWORLD_DVB_310U: 480 case EM2880_BOARD_KWORLD_DVB_310U:
445 case EM2880_BOARD_EMPIRE_DUAL_TV: 481 case EM2880_BOARD_EMPIRE_DUAL_TV:
446 dvb->frontend = dvb_attach(zl10353_attach, 482 dvb->frontend = dvb_attach(zl10353_attach,
@@ -451,20 +487,28 @@ static int dvb_init(struct em28xx *dev)
451 goto out_free; 487 goto out_free;
452 } 488 }
453 break; 489 break;
490 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
491 dvb->frontend = dvb_attach(zl10353_attach,
492 &em28xx_zl10353_xc3028_no_i2c_gate,
493 &dev->i2c_adap);
494 if (attach_xc3028(0x61, dev) < 0) {
495 result = -EINVAL;
496 goto out_free;
497 }
498 break;
454 case EM2880_BOARD_TERRATEC_HYBRID_XS: 499 case EM2880_BOARD_TERRATEC_HYBRID_XS:
500 case EM2881_BOARD_PINNACLE_HYBRID_PRO:
455 dvb->frontend = dvb_attach(zl10353_attach, 501 dvb->frontend = dvb_attach(zl10353_attach,
456 &em28xx_terratec_xs_zl10353_xc3028, 502 &em28xx_zl10353_xc3028_no_i2c_gate,
457 &dev->i2c_adap); 503 &dev->i2c_adap);
458 if (dvb->frontend == NULL) { 504 if (dvb->frontend == NULL) {
459 /* This board could have either a zl10353 or a mt352. 505 /* This board could have either a zl10353 or a mt352.
460 If the chip id isn't for zl10353, try mt352 */ 506 If the chip id isn't for zl10353, try mt352 */
461 507 dvb->frontend = dvb_attach(mt352_attach,
462 /* FIXME: make support for mt352 work */ 508 &terratec_xs_mt352_cfg,
463 printk(KERN_ERR "version of this board with mt352 not " 509 &dev->i2c_adap);
464 "currently supported\n");
465 result = -EINVAL;
466 goto out_free;
467 } 510 }
511
468 if (attach_xc3028(0x61, dev) < 0) { 512 if (attach_xc3028(0x61, dev) < 0) {
469 result = -EINVAL; 513 result = -EINVAL;
470 goto out_free; 514 goto out_free;
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 14316c91217..ff37b4c15f4 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -657,8 +657,8 @@ static void get_scale(struct em28xx *dev,
657 unsigned int width, unsigned int height, 657 unsigned int width, unsigned int height,
658 unsigned int *hscale, unsigned int *vscale) 658 unsigned int *hscale, unsigned int *vscale)
659{ 659{
660 unsigned int maxw = norm_maxw(dev); 660 unsigned int maxw = norm_maxw(dev);
661 unsigned int maxh = norm_maxh(dev); 661 unsigned int maxh = norm_maxh(dev);
662 662
663 *hscale = (((unsigned long)maxw) << 12) / width - 4096L; 663 *hscale = (((unsigned long)maxw) << 12) / width - 4096L;
664 if (*hscale >= 0x4000) 664 if (*hscale >= 0x4000)
@@ -726,11 +726,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
726 return -EINVAL; 726 return -EINVAL;
727 } 727 }
728 728
729 if (dev->board.is_27xx) { 729 if (dev->board.is_em2800) {
730 /* FIXME: This is the only supported fmt */
731 width = 640;
732 height = 480;
733 } else if (dev->board.is_em2800) {
734 /* the em2800 can only scale down to 50% */ 730 /* the em2800 can only scale down to 50% */
735 height = height > (3 * maxh / 4) ? maxh : maxh / 2; 731 height = height > (3 * maxh / 4) ? maxh : maxh / 2;
736 width = width > (3 * maxw / 4) ? maxw : maxw / 2; 732 width = width > (3 * maxw / 4) ? maxw : maxw / 2;
@@ -767,12 +763,6 @@ static int em28xx_set_video_format(struct em28xx *dev, unsigned int fourcc,
767{ 763{
768 struct em28xx_fmt *fmt; 764 struct em28xx_fmt *fmt;
769 765
770 /* FIXME: This is the only supported fmt */
771 if (dev->board.is_27xx) {
772 width = 640;
773 height = 480;
774 }
775
776 fmt = format_by_fourcc(fourcc); 766 fmt = format_by_fourcc(fourcc);
777 if (!fmt) 767 if (!fmt)
778 return -EINVAL; 768 return -EINVAL;
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index d90fef46376..45bd513f62d 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -358,10 +358,15 @@ struct em28xx_input {
358#define INPUT(nr) (&em28xx_boards[dev->model].input[nr]) 358#define INPUT(nr) (&em28xx_boards[dev->model].input[nr])
359 359
360enum em28xx_decoder { 360enum em28xx_decoder {
361 EM28XX_NODECODER, 361 EM28XX_NODECODER = 0,
362 EM28XX_TVP5150, 362 EM28XX_TVP5150,
363 EM28XX_SAA711X, 363 EM28XX_SAA711X,
364};
365
366enum em28xx_sensor {
367 EM28XX_NOSENSOR = 0,
364 EM28XX_MT9V011, 368 EM28XX_MT9V011,
369 EM28XX_MT9M001,
365}; 370};
366 371
367enum em28xx_adecoder { 372enum em28xx_adecoder {
@@ -390,7 +395,7 @@ struct em28xx_board {
390 unsigned int max_range_640_480:1; 395 unsigned int max_range_640_480:1;
391 unsigned int has_dvb:1; 396 unsigned int has_dvb:1;
392 unsigned int has_snapshot_button:1; 397 unsigned int has_snapshot_button:1;
393 unsigned int is_27xx:1; 398 unsigned int is_webcam:1;
394 unsigned int valid:1; 399 unsigned int valid:1;
395 400
396 unsigned char xclk, i2c_speed; 401 unsigned char xclk, i2c_speed;
@@ -474,6 +479,14 @@ struct em28xx {
474 struct v4l2_device v4l2_dev; 479 struct v4l2_device v4l2_dev;
475 struct em28xx_board board; 480 struct em28xx_board board;
476 481
482 /* Webcam specific fields */
483 enum em28xx_sensor em28xx_sensor;
484 int sensor_xres, sensor_yres;
485 int sensor_xtal;
486
487 /* Vinmode/Vinctl used at the driver */
488 int vinmode, vinctl;
489
477 unsigned int stream_on:1; /* Locks streams */ 490 unsigned int stream_on:1; /* Locks streams */
478 unsigned int has_audio_class:1; 491 unsigned int has_audio_class:1;
479 unsigned int has_alsa_audio:1; 492 unsigned int has_alsa_audio:1;
@@ -754,17 +767,23 @@ static inline int em28xx_gamma_set(struct em28xx *dev, s32 val)
754/*FIXME: maxw should be dependent of alt mode */ 767/*FIXME: maxw should be dependent of alt mode */
755static inline unsigned int norm_maxw(struct em28xx *dev) 768static inline unsigned int norm_maxw(struct em28xx *dev)
756{ 769{
770 if (dev->board.is_webcam)
771 return dev->sensor_xres;
772
757 if (dev->board.max_range_640_480) 773 if (dev->board.max_range_640_480)
758 return 640; 774 return 640;
759 else 775
760 return 720; 776 return 720;
761} 777}
762 778
763static inline unsigned int norm_maxh(struct em28xx *dev) 779static inline unsigned int norm_maxh(struct em28xx *dev)
764{ 780{
781 if (dev->board.is_webcam)
782 return dev->sensor_yres;
783
765 if (dev->board.max_range_640_480) 784 if (dev->board.max_range_640_480)
766 return 480; 785 return 480;
767 else 786
768 return (dev->norm & V4L2_STD_625_50) ? 576 : 480; 787 return (dev->norm & V4L2_STD_625_50) ? 576 : 480;
769} 788}
770#endif 789#endif
diff --git a/drivers/media/video/gspca/Kconfig b/drivers/media/video/gspca/Kconfig
index 578dc4ffc96..34f46f2bc04 100644
--- a/drivers/media/video/gspca/Kconfig
+++ b/drivers/media/video/gspca/Kconfig
@@ -102,6 +102,22 @@ config USB_GSPCA_PAC7311
102 To compile this driver as a module, choose M here: the 102 To compile this driver as a module, choose M here: the
103 module will be called gspca_pac7311. 103 module will be called gspca_pac7311.
104 104
105config USB_GSPCA_SN9C20X
106 tristate "SN9C20X USB Camera Driver"
107 depends on VIDEO_V4L2 && USB_GSPCA
108 help
109 Say Y here if you want support for cameras based on the
110 sn9c20x chips (SN9C201 and SN9C202).
111
112 To compile this driver as a module, choose M here: the
113 module will be called gspca_sn9c20x.
114
115config USB_GSPCA_SN9C20X_EVDEV
116 bool "Enable evdev support"
117 depends on USB_GSPCA_SN9C20X
118 ---help---
119 Say Y here in order to enable evdev support for sn9c20x webcam button.
120
105config USB_GSPCA_SONIXB 121config USB_GSPCA_SONIXB
106 tristate "SONIX Bayer USB Camera Driver" 122 tristate "SONIX Bayer USB Camera Driver"
107 depends on VIDEO_V4L2 && USB_GSPCA 123 depends on VIDEO_V4L2 && USB_GSPCA
diff --git a/drivers/media/video/gspca/Makefile b/drivers/media/video/gspca/Makefile
index 8a6643e8eb9..f6d3b86e9ad 100644
--- a/drivers/media/video/gspca/Makefile
+++ b/drivers/media/video/gspca/Makefile
@@ -8,6 +8,7 @@ obj-$(CONFIG_USB_GSPCA_OV519) += gspca_ov519.o
8obj-$(CONFIG_USB_GSPCA_OV534) += gspca_ov534.o 8obj-$(CONFIG_USB_GSPCA_OV534) += gspca_ov534.o
9obj-$(CONFIG_USB_GSPCA_PAC207) += gspca_pac207.o 9obj-$(CONFIG_USB_GSPCA_PAC207) += gspca_pac207.o
10obj-$(CONFIG_USB_GSPCA_PAC7311) += gspca_pac7311.o 10obj-$(CONFIG_USB_GSPCA_PAC7311) += gspca_pac7311.o
11obj-$(CONFIG_USB_GSPCA_SN9C20X) += gspca_sn9c20x.o
11obj-$(CONFIG_USB_GSPCA_SONIXB) += gspca_sonixb.o 12obj-$(CONFIG_USB_GSPCA_SONIXB) += gspca_sonixb.o
12obj-$(CONFIG_USB_GSPCA_SONIXJ) += gspca_sonixj.o 13obj-$(CONFIG_USB_GSPCA_SONIXJ) += gspca_sonixj.o
13obj-$(CONFIG_USB_GSPCA_SPCA500) += gspca_spca500.o 14obj-$(CONFIG_USB_GSPCA_SPCA500) += gspca_spca500.o
@@ -35,6 +36,7 @@ gspca_ov519-objs := ov519.o
35gspca_ov534-objs := ov534.o 36gspca_ov534-objs := ov534.o
36gspca_pac207-objs := pac207.o 37gspca_pac207-objs := pac207.o
37gspca_pac7311-objs := pac7311.o 38gspca_pac7311-objs := pac7311.o
39gspca_sn9c20x-objs := sn9c20x.o
38gspca_sonixb-objs := sonixb.o 40gspca_sonixb-objs := sonixb.o
39gspca_sonixj-objs := sonixj.o 41gspca_sonixj-objs := sonixj.o
40gspca_spca500-objs := spca500.o 42gspca_spca500-objs := spca500.o
diff --git a/drivers/media/video/gspca/conex.c b/drivers/media/video/gspca/conex.c
index 219cfa6fb87..8d48ea1742c 100644
--- a/drivers/media/video/gspca/conex.c
+++ b/drivers/media/video/gspca/conex.c
@@ -846,6 +846,8 @@ static int sd_start(struct gspca_dev *gspca_dev)
846 846
847 /* create the JPEG header */ 847 /* create the JPEG header */
848 sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL); 848 sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL);
849 if (!sd->jpeg_hdr)
850 return -ENOMEM;
849 jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width, 851 jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width,
850 0x22); /* JPEG 411 */ 852 0x22); /* JPEG 411 */
851 jpeg_set_qual(sd->jpeg_hdr, sd->quality); 853 jpeg_set_qual(sd->jpeg_hdr, sd->quality);
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 1e89600986c..b8561dfb6c8 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -727,6 +727,74 @@ static int gspca_get_mode(struct gspca_dev *gspca_dev,
727 return -EINVAL; 727 return -EINVAL;
728} 728}
729 729
730#ifdef CONFIG_VIDEO_ADV_DEBUG
731static int vidioc_g_register(struct file *file, void *priv,
732 struct v4l2_dbg_register *reg)
733{
734 int ret;
735 struct gspca_dev *gspca_dev = priv;
736
737 if (!gspca_dev->sd_desc->get_chip_ident)
738 return -EINVAL;
739
740 if (!gspca_dev->sd_desc->get_register)
741 return -EINVAL;
742
743 if (mutex_lock_interruptible(&gspca_dev->usb_lock))
744 return -ERESTARTSYS;
745 if (gspca_dev->present)
746 ret = gspca_dev->sd_desc->get_register(gspca_dev, reg);
747 else
748 ret = -ENODEV;
749 mutex_unlock(&gspca_dev->usb_lock);
750
751 return ret;
752}
753
754static int vidioc_s_register(struct file *file, void *priv,
755 struct v4l2_dbg_register *reg)
756{
757 int ret;
758 struct gspca_dev *gspca_dev = priv;
759
760 if (!gspca_dev->sd_desc->get_chip_ident)
761 return -EINVAL;
762
763 if (!gspca_dev->sd_desc->set_register)
764 return -EINVAL;
765
766 if (mutex_lock_interruptible(&gspca_dev->usb_lock))
767 return -ERESTARTSYS;
768 if (gspca_dev->present)
769 ret = gspca_dev->sd_desc->set_register(gspca_dev, reg);
770 else
771 ret = -ENODEV;
772 mutex_unlock(&gspca_dev->usb_lock);
773
774 return ret;
775}
776#endif
777
778static int vidioc_g_chip_ident(struct file *file, void *priv,
779 struct v4l2_dbg_chip_ident *chip)
780{
781 int ret;
782 struct gspca_dev *gspca_dev = priv;
783
784 if (!gspca_dev->sd_desc->get_chip_ident)
785 return -EINVAL;
786
787 if (mutex_lock_interruptible(&gspca_dev->usb_lock))
788 return -ERESTARTSYS;
789 if (gspca_dev->present)
790 ret = gspca_dev->sd_desc->get_chip_ident(gspca_dev, chip);
791 else
792 ret = -ENODEV;
793 mutex_unlock(&gspca_dev->usb_lock);
794
795 return ret;
796}
797
730static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, 798static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
731 struct v4l2_fmtdesc *fmtdesc) 799 struct v4l2_fmtdesc *fmtdesc)
732{ 800{
@@ -1883,6 +1951,11 @@ static const struct v4l2_ioctl_ops dev_ioctl_ops = {
1883 .vidioc_s_parm = vidioc_s_parm, 1951 .vidioc_s_parm = vidioc_s_parm,
1884 .vidioc_s_std = vidioc_s_std, 1952 .vidioc_s_std = vidioc_s_std,
1885 .vidioc_enum_framesizes = vidioc_enum_framesizes, 1953 .vidioc_enum_framesizes = vidioc_enum_framesizes,
1954#ifdef CONFIG_VIDEO_ADV_DEBUG
1955 .vidioc_g_register = vidioc_g_register,
1956 .vidioc_s_register = vidioc_s_register,
1957#endif
1958 .vidioc_g_chip_ident = vidioc_g_chip_ident,
1886#ifdef CONFIG_VIDEO_V4L1_COMPAT 1959#ifdef CONFIG_VIDEO_V4L1_COMPAT
1887 .vidiocgmbuf = vidiocgmbuf, 1960 .vidiocgmbuf = vidiocgmbuf,
1888#endif 1961#endif
diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h
index bd1faff8864..46c4effdfcd 100644
--- a/drivers/media/video/gspca/gspca.h
+++ b/drivers/media/video/gspca/gspca.h
@@ -69,6 +69,10 @@ typedef void (*cam_v_op) (struct gspca_dev *);
69typedef int (*cam_cf_op) (struct gspca_dev *, const struct usb_device_id *); 69typedef int (*cam_cf_op) (struct gspca_dev *, const struct usb_device_id *);
70typedef int (*cam_jpg_op) (struct gspca_dev *, 70typedef int (*cam_jpg_op) (struct gspca_dev *,
71 struct v4l2_jpegcompression *); 71 struct v4l2_jpegcompression *);
72typedef int (*cam_reg_op) (struct gspca_dev *,
73 struct v4l2_dbg_register *);
74typedef int (*cam_ident_op) (struct gspca_dev *,
75 struct v4l2_dbg_chip_ident *);
72typedef int (*cam_streamparm_op) (struct gspca_dev *, 76typedef int (*cam_streamparm_op) (struct gspca_dev *,
73 struct v4l2_streamparm *); 77 struct v4l2_streamparm *);
74typedef int (*cam_qmnu_op) (struct gspca_dev *, 78typedef int (*cam_qmnu_op) (struct gspca_dev *,
@@ -105,6 +109,11 @@ struct sd_desc {
105 cam_qmnu_op querymenu; 109 cam_qmnu_op querymenu;
106 cam_streamparm_op get_streamparm; 110 cam_streamparm_op get_streamparm;
107 cam_streamparm_op set_streamparm; 111 cam_streamparm_op set_streamparm;
112#ifdef CONFIG_VIDEO_ADV_DEBUG
113 cam_reg_op set_register;
114 cam_reg_op get_register;
115#endif
116 cam_ident_op get_chip_ident;
108}; 117};
109 118
110/* packet types when moving from iso buf to frame buf */ 119/* packet types when moving from iso buf to frame buf */
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c
index 191bcd71897..0163903d1c0 100644
--- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c
+++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c
@@ -476,9 +476,6 @@ static int s5k4aa_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
476 err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1); 476 err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
477 if (err < 0) 477 if (err < 0)
478 return err; 478 return err;
479 err = m5602_write_sensor(sd, S5K4AA_READ_MODE, &data, 1);
480 if (err < 0)
481 return err;
482 479
483 err = m5602_read_sensor(sd, S5K4AA_READ_MODE, &data, 1); 480 err = m5602_read_sensor(sd, S5K4AA_READ_MODE, &data, 1);
484 if (err < 0) 481 if (err < 0)
@@ -524,9 +521,6 @@ static int s5k4aa_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
524 err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1); 521 err = m5602_write_sensor(sd, S5K4AA_PAGE_MAP, &data, 1);
525 if (err < 0) 522 if (err < 0)
526 return err; 523 return err;
527 err = m5602_write_sensor(sd, S5K4AA_READ_MODE, &data, 1);
528 if (err < 0)
529 return err;
530 524
531 err = m5602_read_sensor(sd, S5K4AA_READ_MODE, &data, 1); 525 err = m5602_read_sensor(sd, S5K4AA_READ_MODE, &data, 1);
532 if (err < 0) 526 if (err < 0)
diff --git a/drivers/media/video/gspca/mars.c b/drivers/media/video/gspca/mars.c
index 75e8d14e4ac..de769caf013 100644
--- a/drivers/media/video/gspca/mars.c
+++ b/drivers/media/video/gspca/mars.c
@@ -201,6 +201,8 @@ static int sd_start(struct gspca_dev *gspca_dev)
201 201
202 /* create the JPEG header */ 202 /* create the JPEG header */
203 sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL); 203 sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL);
204 if (!sd->jpeg_hdr)
205 return -ENOMEM;
204 jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width, 206 jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width,
205 0x21); /* JPEG 422 */ 207 0x21); /* JPEG 422 */
206 jpeg_set_qual(sd->jpeg_hdr, sd->quality); 208 jpeg_set_qual(sd->jpeg_hdr, sd->quality);
diff --git a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/video/gspca/sn9c20x.c
new file mode 100644
index 00000000000..fcfbbd329b4
--- /dev/null
+++ b/drivers/media/video/gspca/sn9c20x.c
@@ -0,0 +1,2434 @@
1/*
2 * Sonix sn9c201 sn9c202 library
3 * Copyright (C) 2008-2009 microdia project <microdia@googlegroups.com>
4 * Copyright (C) 2009 Brian Johnson <brijohn@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifdef CONFIG_USB_GSPCA_SN9C20X_EVDEV
22#include <linux/kthread.h>
23#include <linux/freezer.h>
24#include <linux/usb/input.h>
25#include <linux/input.h>
26#endif
27
28#include "gspca.h"
29#include "jpeg.h"
30
31#include <media/v4l2-chip-ident.h>
32
33MODULE_AUTHOR("Brian Johnson <brijohn@gmail.com>, "
34 "microdia project <microdia@googlegroups.com>");
35MODULE_DESCRIPTION("GSPCA/SN9C20X USB Camera Driver");
36MODULE_LICENSE("GPL");
37
38#define MODULE_NAME "sn9c20x"
39
40#define MODE_RAW 0x10
41#define MODE_JPEG 0x20
42#define MODE_SXGA 0x80
43
44#define SENSOR_OV9650 0
45#define SENSOR_OV9655 1
46#define SENSOR_SOI968 2
47#define SENSOR_OV7660 3
48#define SENSOR_OV7670 4
49#define SENSOR_MT9V011 5
50#define SENSOR_MT9V111 6
51#define SENSOR_MT9V112 7
52#define SENSOR_MT9M001 8
53#define SENSOR_MT9M111 9
54#define SENSOR_HV7131R 10
55#define SENSOR_MT9VPRB 20
56
57/* specific webcam descriptor */
58struct sd {
59 struct gspca_dev gspca_dev;
60
61#define MIN_AVG_LUM 80
62#define MAX_AVG_LUM 130
63 atomic_t avg_lum;
64 u8 old_step;
65 u8 older_step;
66 u8 exposure_step;
67
68 u8 brightness;
69 u8 contrast;
70 u8 saturation;
71 s16 hue;
72 u8 gamma;
73 u8 red;
74 u8 blue;
75
76 u8 hflip;
77 u8 vflip;
78 u8 gain;
79 u16 exposure;
80 u8 auto_exposure;
81
82 u8 i2c_addr;
83 u8 sensor;
84 u8 hstart;
85 u8 vstart;
86
87 u8 *jpeg_hdr;
88 u8 quality;
89
90#ifdef CONFIG_USB_GSPCA_SN9C20X_EVDEV
91 struct input_dev *input_dev;
92 u8 input_gpio;
93 struct task_struct *input_task;
94#endif
95};
96
97static int sd_setbrightness(struct gspca_dev *gspca_dev, s32 val);
98static int sd_getbrightness(struct gspca_dev *gspca_dev, s32 *val);
99static int sd_setcontrast(struct gspca_dev *gspca_dev, s32 val);
100static int sd_getcontrast(struct gspca_dev *gspca_dev, s32 *val);
101static int sd_setsaturation(struct gspca_dev *gspca_dev, s32 val);
102static int sd_getsaturation(struct gspca_dev *gspca_dev, s32 *val);
103static int sd_sethue(struct gspca_dev *gspca_dev, s32 val);
104static int sd_gethue(struct gspca_dev *gspca_dev, s32 *val);
105static int sd_setgamma(struct gspca_dev *gspca_dev, s32 val);
106static int sd_getgamma(struct gspca_dev *gspca_dev, s32 *val);
107static int sd_setredbalance(struct gspca_dev *gspca_dev, s32 val);
108static int sd_getredbalance(struct gspca_dev *gspca_dev, s32 *val);
109static int sd_setbluebalance(struct gspca_dev *gspca_dev, s32 val);
110static int sd_getbluebalance(struct gspca_dev *gspca_dev, s32 *val);
111static int sd_setvflip(struct gspca_dev *gspca_dev, s32 val);
112static int sd_getvflip(struct gspca_dev *gspca_dev, s32 *val);
113static int sd_sethflip(struct gspca_dev *gspca_dev, s32 val);
114static int sd_gethflip(struct gspca_dev *gspca_dev, s32 *val);
115static int sd_setgain(struct gspca_dev *gspca_dev, s32 val);
116static int sd_getgain(struct gspca_dev *gspca_dev, s32 *val);
117static int sd_setexposure(struct gspca_dev *gspca_dev, s32 val);
118static int sd_getexposure(struct gspca_dev *gspca_dev, s32 *val);
119static int sd_setautoexposure(struct gspca_dev *gspca_dev, s32 val);
120static int sd_getautoexposure(struct gspca_dev *gspca_dev, s32 *val);
121
122static struct ctrl sd_ctrls[] = {
123 {
124#define BRIGHTNESS_IDX 0
125 {
126 .id = V4L2_CID_BRIGHTNESS,
127 .type = V4L2_CTRL_TYPE_INTEGER,
128 .name = "Brightness",
129 .minimum = 0,
130 .maximum = 0xff,
131 .step = 1,
132#define BRIGHTNESS_DEFAULT 0x7f
133 .default_value = BRIGHTNESS_DEFAULT,
134 },
135 .set = sd_setbrightness,
136 .get = sd_getbrightness,
137 },
138 {
139#define CONTRAST_IDX 1
140 {
141 .id = V4L2_CID_CONTRAST,
142 .type = V4L2_CTRL_TYPE_INTEGER,
143 .name = "Contrast",
144 .minimum = 0,
145 .maximum = 0xff,
146 .step = 1,
147#define CONTRAST_DEFAULT 0x7f
148 .default_value = CONTRAST_DEFAULT,
149 },
150 .set = sd_setcontrast,
151 .get = sd_getcontrast,
152 },
153 {
154#define SATURATION_IDX 2
155 {
156 .id = V4L2_CID_SATURATION,
157 .type = V4L2_CTRL_TYPE_INTEGER,
158 .name = "Saturation",
159 .minimum = 0,
160 .maximum = 0xff,
161 .step = 1,
162#define SATURATION_DEFAULT 0x7f
163 .default_value = SATURATION_DEFAULT,
164 },
165 .set = sd_setsaturation,
166 .get = sd_getsaturation,
167 },
168 {
169#define HUE_IDX 3
170 {
171 .id = V4L2_CID_HUE,
172 .type = V4L2_CTRL_TYPE_INTEGER,
173 .name = "Hue",
174 .minimum = -180,
175 .maximum = 180,
176 .step = 1,
177#define HUE_DEFAULT 0
178 .default_value = HUE_DEFAULT,
179 },
180 .set = sd_sethue,
181 .get = sd_gethue,
182 },
183 {
184#define GAMMA_IDX 4
185 {
186 .id = V4L2_CID_GAMMA,
187 .type = V4L2_CTRL_TYPE_INTEGER,
188 .name = "Gamma",
189 .minimum = 0,
190 .maximum = 0xff,
191 .step = 1,
192#define GAMMA_DEFAULT 0x10
193 .default_value = GAMMA_DEFAULT,
194 },
195 .set = sd_setgamma,
196 .get = sd_getgamma,
197 },
198 {
199#define BLUE_IDX 5
200 {
201 .id = V4L2_CID_BLUE_BALANCE,
202 .type = V4L2_CTRL_TYPE_INTEGER,
203 .name = "Blue Balance",
204 .minimum = 0,
205 .maximum = 0x7f,
206 .step = 1,
207#define BLUE_DEFAULT 0x28
208 .default_value = BLUE_DEFAULT,
209 },
210 .set = sd_setbluebalance,
211 .get = sd_getbluebalance,
212 },
213 {
214#define RED_IDX 6
215 {
216 .id = V4L2_CID_RED_BALANCE,
217 .type = V4L2_CTRL_TYPE_INTEGER,
218 .name = "Red Balance",
219 .minimum = 0,
220 .maximum = 0x7f,
221 .step = 1,
222#define RED_DEFAULT 0x28
223 .default_value = RED_DEFAULT,
224 },
225 .set = sd_setredbalance,
226 .get = sd_getredbalance,
227 },
228 {
229#define HFLIP_IDX 7
230 {
231 .id = V4L2_CID_HFLIP,
232 .type = V4L2_CTRL_TYPE_BOOLEAN,
233 .name = "Horizontal Flip",
234 .minimum = 0,
235 .maximum = 1,
236 .step = 1,
237#define HFLIP_DEFAULT 0
238 .default_value = HFLIP_DEFAULT,
239 },
240 .set = sd_sethflip,
241 .get = sd_gethflip,
242 },
243 {
244#define VFLIP_IDX 8
245 {
246 .id = V4L2_CID_VFLIP,
247 .type = V4L2_CTRL_TYPE_BOOLEAN,
248 .name = "Vertical Flip",
249 .minimum = 0,
250 .maximum = 1,
251 .step = 1,
252#define VFLIP_DEFAULT 0
253 .default_value = VFLIP_DEFAULT,
254 },
255 .set = sd_setvflip,
256 .get = sd_getvflip,
257 },
258 {
259#define EXPOSURE_IDX 9
260 {
261 .id = V4L2_CID_EXPOSURE,
262 .type = V4L2_CTRL_TYPE_INTEGER,
263 .name = "Exposure",
264 .minimum = 0,
265 .maximum = 0x1780,
266 .step = 1,
267#define EXPOSURE_DEFAULT 0x33
268 .default_value = EXPOSURE_DEFAULT,
269 },
270 .set = sd_setexposure,
271 .get = sd_getexposure,
272 },
273 {
274#define GAIN_IDX 10
275 {
276 .id = V4L2_CID_GAIN,
277 .type = V4L2_CTRL_TYPE_INTEGER,
278 .name = "Gain",
279 .minimum = 0,
280 .maximum = 28,
281 .step = 1,
282#define GAIN_DEFAULT 0x00
283 .default_value = GAIN_DEFAULT,
284 },
285 .set = sd_setgain,
286 .get = sd_getgain,
287 },
288 {
289#define AUTOGAIN_IDX 11
290 {
291 .id = V4L2_CID_AUTOGAIN,
292 .type = V4L2_CTRL_TYPE_BOOLEAN,
293 .name = "Auto Exposure",
294 .minimum = 0,
295 .maximum = 1,
296 .step = 1,
297#define AUTO_EXPOSURE_DEFAULT 1
298 .default_value = AUTO_EXPOSURE_DEFAULT,
299 },
300 .set = sd_setautoexposure,
301 .get = sd_getautoexposure,
302 },
303};
304
305static const struct v4l2_pix_format vga_mode[] = {
306 {160, 120, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
307 .bytesperline = 240,
308 .sizeimage = 240 * 120,
309 .colorspace = V4L2_COLORSPACE_JPEG,
310 .priv = 0 | MODE_JPEG},
311 {160, 120, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
312 .bytesperline = 160,
313 .sizeimage = 160 * 120,
314 .colorspace = V4L2_COLORSPACE_SRGB,
315 .priv = 0 | MODE_RAW},
316 {160, 120, V4L2_PIX_FMT_SN9C20X_I420, V4L2_FIELD_NONE,
317 .bytesperline = 240,
318 .sizeimage = 240 * 120,
319 .colorspace = V4L2_COLORSPACE_SRGB,
320 .priv = 0},
321 {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
322 .bytesperline = 480,
323 .sizeimage = 480 * 240 ,
324 .colorspace = V4L2_COLORSPACE_JPEG,
325 .priv = 1 | MODE_JPEG},
326 {320, 240, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
327 .bytesperline = 320,
328 .sizeimage = 320 * 240 ,
329 .colorspace = V4L2_COLORSPACE_SRGB,
330 .priv = 1 | MODE_RAW},
331 {320, 240, V4L2_PIX_FMT_SN9C20X_I420, V4L2_FIELD_NONE,
332 .bytesperline = 480,
333 .sizeimage = 480 * 240 ,
334 .colorspace = V4L2_COLORSPACE_SRGB,
335 .priv = 1},
336 {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
337 .bytesperline = 960,
338 .sizeimage = 960 * 480,
339 .colorspace = V4L2_COLORSPACE_JPEG,
340 .priv = 2 | MODE_JPEG},
341 {640, 480, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
342 .bytesperline = 640,
343 .sizeimage = 640 * 480,
344 .colorspace = V4L2_COLORSPACE_SRGB,
345 .priv = 2 | MODE_RAW},
346 {640, 480, V4L2_PIX_FMT_SN9C20X_I420, V4L2_FIELD_NONE,
347 .bytesperline = 960,
348 .sizeimage = 960 * 480,
349 .colorspace = V4L2_COLORSPACE_SRGB,
350 .priv = 2},
351};
352
353static const struct v4l2_pix_format sxga_mode[] = {
354 {160, 120, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
355 .bytesperline = 240,
356 .sizeimage = 240 * 120,
357 .colorspace = V4L2_COLORSPACE_JPEG,
358 .priv = 0 | MODE_JPEG},
359 {160, 120, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
360 .bytesperline = 160,
361 .sizeimage = 160 * 120,
362 .colorspace = V4L2_COLORSPACE_SRGB,
363 .priv = 0 | MODE_RAW},
364 {160, 120, V4L2_PIX_FMT_SN9C20X_I420, V4L2_FIELD_NONE,
365 .bytesperline = 240,
366 .sizeimage = 240 * 120,
367 .colorspace = V4L2_COLORSPACE_SRGB,
368 .priv = 0},
369 {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
370 .bytesperline = 480,
371 .sizeimage = 480 * 240 ,
372 .colorspace = V4L2_COLORSPACE_JPEG,
373 .priv = 1 | MODE_JPEG},
374 {320, 240, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
375 .bytesperline = 320,
376 .sizeimage = 320 * 240 ,
377 .colorspace = V4L2_COLORSPACE_SRGB,
378 .priv = 1 | MODE_RAW},
379 {320, 240, V4L2_PIX_FMT_SN9C20X_I420, V4L2_FIELD_NONE,
380 .bytesperline = 480,
381 .sizeimage = 480 * 240 ,
382 .colorspace = V4L2_COLORSPACE_SRGB,
383 .priv = 1},
384 {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
385 .bytesperline = 960,
386 .sizeimage = 960 * 480,
387 .colorspace = V4L2_COLORSPACE_JPEG,
388 .priv = 2 | MODE_JPEG},
389 {640, 480, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
390 .bytesperline = 640,
391 .sizeimage = 640 * 480,
392 .colorspace = V4L2_COLORSPACE_SRGB,
393 .priv = 2 | MODE_RAW},
394 {640, 480, V4L2_PIX_FMT_SN9C20X_I420, V4L2_FIELD_NONE,
395 .bytesperline = 960,
396 .sizeimage = 960 * 480,
397 .colorspace = V4L2_COLORSPACE_SRGB,
398 .priv = 2},
399 {1280, 1024, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
400 .bytesperline = 1280,
401 .sizeimage = (1280 * 1024) + 64,
402 .colorspace = V4L2_COLORSPACE_SRGB,
403 .priv = 3 | MODE_RAW | MODE_SXGA},
404};
405
406static const int hsv_red_x[] = {
407 41, 44, 46, 48, 50, 52, 54, 56,
408 58, 60, 62, 64, 66, 68, 70, 72,
409 74, 76, 78, 80, 81, 83, 85, 87,
410 88, 90, 92, 93, 95, 97, 98, 100,
411 101, 102, 104, 105, 107, 108, 109, 110,
412 112, 113, 114, 115, 116, 117, 118, 119,
413 120, 121, 122, 123, 123, 124, 125, 125,
414 126, 127, 127, 128, 128, 129, 129, 129,
415 130, 130, 130, 130, 131, 131, 131, 131,
416 131, 131, 131, 131, 130, 130, 130, 130,
417 129, 129, 129, 128, 128, 127, 127, 126,
418 125, 125, 124, 123, 122, 122, 121, 120,
419 119, 118, 117, 116, 115, 114, 112, 111,
420 110, 109, 107, 106, 105, 103, 102, 101,
421 99, 98, 96, 94, 93, 91, 90, 88,
422 86, 84, 83, 81, 79, 77, 75, 74,
423 72, 70, 68, 66, 64, 62, 60, 58,
424 56, 54, 52, 49, 47, 45, 43, 41,
425 39, 36, 34, 32, 30, 28, 25, 23,
426 21, 19, 16, 14, 12, 9, 7, 5,
427 3, 0, -1, -3, -6, -8, -10, -12,
428 -15, -17, -19, -22, -24, -26, -28, -30,
429 -33, -35, -37, -39, -41, -44, -46, -48,
430 -50, -52, -54, -56, -58, -60, -62, -64,
431 -66, -68, -70, -72, -74, -76, -78, -80,
432 -81, -83, -85, -87, -88, -90, -92, -93,
433 -95, -97, -98, -100, -101, -102, -104, -105,
434 -107, -108, -109, -110, -112, -113, -114, -115,
435 -116, -117, -118, -119, -120, -121, -122, -123,
436 -123, -124, -125, -125, -126, -127, -127, -128,
437 -128, -128, -128, -128, -128, -128, -128, -128,
438 -128, -128, -128, -128, -128, -128, -128, -128,
439 -128, -128, -128, -128, -128, -128, -128, -128,
440 -128, -127, -127, -126, -125, -125, -124, -123,
441 -122, -122, -121, -120, -119, -118, -117, -116,
442 -115, -114, -112, -111, -110, -109, -107, -106,
443 -105, -103, -102, -101, -99, -98, -96, -94,
444 -93, -91, -90, -88, -86, -84, -83, -81,
445 -79, -77, -75, -74, -72, -70, -68, -66,
446 -64, -62, -60, -58, -56, -54, -52, -49,
447 -47, -45, -43, -41, -39, -36, -34, -32,
448 -30, -28, -25, -23, -21, -19, -16, -14,
449 -12, -9, -7, -5, -3, 0, 1, 3,
450 6, 8, 10, 12, 15, 17, 19, 22,
451 24, 26, 28, 30, 33, 35, 37, 39, 41
452};
453
454static const int hsv_red_y[] = {
455 82, 80, 78, 76, 74, 73, 71, 69,
456 67, 65, 63, 61, 58, 56, 54, 52,
457 50, 48, 46, 44, 41, 39, 37, 35,
458 32, 30, 28, 26, 23, 21, 19, 16,
459 14, 12, 10, 7, 5, 3, 0, -1,
460 -3, -6, -8, -10, -13, -15, -17, -19,
461 -22, -24, -26, -29, -31, -33, -35, -38,
462 -40, -42, -44, -46, -48, -51, -53, -55,
463 -57, -59, -61, -63, -65, -67, -69, -71,
464 -73, -75, -77, -79, -81, -82, -84, -86,
465 -88, -89, -91, -93, -94, -96, -98, -99,
466 -101, -102, -104, -105, -106, -108, -109, -110,
467 -112, -113, -114, -115, -116, -117, -119, -120,
468 -120, -121, -122, -123, -124, -125, -126, -126,
469 -127, -128, -128, -128, -128, -128, -128, -128,
470 -128, -128, -128, -128, -128, -128, -128, -128,
471 -128, -128, -128, -128, -128, -128, -128, -128,
472 -128, -128, -128, -128, -128, -128, -128, -128,
473 -127, -127, -126, -125, -125, -124, -123, -122,
474 -121, -120, -119, -118, -117, -116, -115, -114,
475 -113, -111, -110, -109, -107, -106, -105, -103,
476 -102, -100, -99, -97, -96, -94, -92, -91,
477 -89, -87, -85, -84, -82, -80, -78, -76,
478 -74, -73, -71, -69, -67, -65, -63, -61,
479 -58, -56, -54, -52, -50, -48, -46, -44,
480 -41, -39, -37, -35, -32, -30, -28, -26,
481 -23, -21, -19, -16, -14, -12, -10, -7,
482 -5, -3, 0, 1, 3, 6, 8, 10,
483 13, 15, 17, 19, 22, 24, 26, 29,
484 31, 33, 35, 38, 40, 42, 44, 46,
485 48, 51, 53, 55, 57, 59, 61, 63,
486 65, 67, 69, 71, 73, 75, 77, 79,
487 81, 82, 84, 86, 88, 89, 91, 93,
488 94, 96, 98, 99, 101, 102, 104, 105,
489 106, 108, 109, 110, 112, 113, 114, 115,
490 116, 117, 119, 120, 120, 121, 122, 123,
491 124, 125, 126, 126, 127, 128, 128, 129,
492 129, 130, 130, 131, 131, 131, 131, 132,
493 132, 132, 132, 132, 132, 132, 132, 132,
494 132, 132, 132, 131, 131, 131, 130, 130,
495 130, 129, 129, 128, 127, 127, 126, 125,
496 125, 124, 123, 122, 121, 120, 119, 118,
497 117, 116, 115, 114, 113, 111, 110, 109,
498 107, 106, 105, 103, 102, 100, 99, 97,
499 96, 94, 92, 91, 89, 87, 85, 84, 82
500};
501
502static const int hsv_green_x[] = {
503 -124, -124, -125, -125, -125, -125, -125, -125,
504 -125, -126, -126, -125, -125, -125, -125, -125,
505 -125, -124, -124, -124, -123, -123, -122, -122,
506 -121, -121, -120, -120, -119, -118, -117, -117,
507 -116, -115, -114, -113, -112, -111, -110, -109,
508 -108, -107, -105, -104, -103, -102, -100, -99,
509 -98, -96, -95, -93, -92, -91, -89, -87,
510 -86, -84, -83, -81, -79, -77, -76, -74,
511 -72, -70, -69, -67, -65, -63, -61, -59,
512 -57, -55, -53, -51, -49, -47, -45, -43,
513 -41, -39, -37, -35, -33, -30, -28, -26,
514 -24, -22, -20, -18, -15, -13, -11, -9,
515 -7, -4, -2, 0, 1, 3, 6, 8,
516 10, 12, 14, 17, 19, 21, 23, 25,
517 27, 29, 32, 34, 36, 38, 40, 42,
518 44, 46, 48, 50, 52, 54, 56, 58,
519 60, 62, 64, 66, 68, 70, 71, 73,
520 75, 77, 78, 80, 82, 83, 85, 87,
521 88, 90, 91, 93, 94, 96, 97, 98,
522 100, 101, 102, 104, 105, 106, 107, 108,
523 109, 111, 112, 113, 113, 114, 115, 116,
524 117, 118, 118, 119, 120, 120, 121, 122,
525 122, 123, 123, 124, 124, 124, 125, 125,
526 125, 125, 125, 125, 125, 126, 126, 125,
527 125, 125, 125, 125, 125, 124, 124, 124,
528 123, 123, 122, 122, 121, 121, 120, 120,
529 119, 118, 117, 117, 116, 115, 114, 113,
530 112, 111, 110, 109, 108, 107, 105, 104,
531 103, 102, 100, 99, 98, 96, 95, 93,
532 92, 91, 89, 87, 86, 84, 83, 81,
533 79, 77, 76, 74, 72, 70, 69, 67,
534 65, 63, 61, 59, 57, 55, 53, 51,
535 49, 47, 45, 43, 41, 39, 37, 35,
536 33, 30, 28, 26, 24, 22, 20, 18,
537 15, 13, 11, 9, 7, 4, 2, 0,
538 -1, -3, -6, -8, -10, -12, -14, -17,
539 -19, -21, -23, -25, -27, -29, -32, -34,
540 -36, -38, -40, -42, -44, -46, -48, -50,
541 -52, -54, -56, -58, -60, -62, -64, -66,
542 -68, -70, -71, -73, -75, -77, -78, -80,
543 -82, -83, -85, -87, -88, -90, -91, -93,
544 -94, -96, -97, -98, -100, -101, -102, -104,
545 -105, -106, -107, -108, -109, -111, -112, -113,
546 -113, -114, -115, -116, -117, -118, -118, -119,
547 -120, -120, -121, -122, -122, -123, -123, -124, -124
548};
549
550static const int hsv_green_y[] = {
551 -100, -99, -98, -97, -95, -94, -93, -91,
552 -90, -89, -87, -86, -84, -83, -81, -80,
553 -78, -76, -75, -73, -71, -70, -68, -66,
554 -64, -63, -61, -59, -57, -55, -53, -51,
555 -49, -48, -46, -44, -42, -40, -38, -36,
556 -34, -32, -30, -27, -25, -23, -21, -19,
557 -17, -15, -13, -11, -9, -7, -4, -2,
558 0, 1, 3, 5, 7, 9, 11, 14,
559 16, 18, 20, 22, 24, 26, 28, 30,
560 32, 34, 36, 38, 40, 42, 44, 46,
561 48, 50, 52, 54, 56, 58, 59, 61,
562 63, 65, 67, 68, 70, 72, 74, 75,
563 77, 78, 80, 82, 83, 85, 86, 88,
564 89, 90, 92, 93, 95, 96, 97, 98,
565 100, 101, 102, 103, 104, 105, 106, 107,
566 108, 109, 110, 111, 112, 112, 113, 114,
567 115, 115, 116, 116, 117, 117, 118, 118,
568 119, 119, 119, 120, 120, 120, 120, 120,
569 121, 121, 121, 121, 121, 121, 120, 120,
570 120, 120, 120, 119, 119, 119, 118, 118,
571 117, 117, 116, 116, 115, 114, 114, 113,
572 112, 111, 111, 110, 109, 108, 107, 106,
573 105, 104, 103, 102, 100, 99, 98, 97,
574 95, 94, 93, 91, 90, 89, 87, 86,
575 84, 83, 81, 80, 78, 76, 75, 73,
576 71, 70, 68, 66, 64, 63, 61, 59,
577 57, 55, 53, 51, 49, 48, 46, 44,
578 42, 40, 38, 36, 34, 32, 30, 27,
579 25, 23, 21, 19, 17, 15, 13, 11,
580 9, 7, 4, 2, 0, -1, -3, -5,
581 -7, -9, -11, -14, -16, -18, -20, -22,
582 -24, -26, -28, -30, -32, -34, -36, -38,
583 -40, -42, -44, -46, -48, -50, -52, -54,
584 -56, -58, -59, -61, -63, -65, -67, -68,
585 -70, -72, -74, -75, -77, -78, -80, -82,
586 -83, -85, -86, -88, -89, -90, -92, -93,
587 -95, -96, -97, -98, -100, -101, -102, -103,
588 -104, -105, -106, -107, -108, -109, -110, -111,
589 -112, -112, -113, -114, -115, -115, -116, -116,
590 -117, -117, -118, -118, -119, -119, -119, -120,
591 -120, -120, -120, -120, -121, -121, -121, -121,
592 -121, -121, -120, -120, -120, -120, -120, -119,
593 -119, -119, -118, -118, -117, -117, -116, -116,
594 -115, -114, -114, -113, -112, -111, -111, -110,
595 -109, -108, -107, -106, -105, -104, -103, -102, -100
596};
597
598static const int hsv_blue_x[] = {
599 112, 113, 114, 114, 115, 116, 117, 117,
600 118, 118, 119, 119, 120, 120, 120, 121,
601 121, 121, 122, 122, 122, 122, 122, 122,
602 122, 122, 122, 122, 122, 122, 121, 121,
603 121, 120, 120, 120, 119, 119, 118, 118,
604 117, 116, 116, 115, 114, 113, 113, 112,
605 111, 110, 109, 108, 107, 106, 105, 104,
606 103, 102, 100, 99, 98, 97, 95, 94,
607 93, 91, 90, 88, 87, 85, 84, 82,
608 80, 79, 77, 76, 74, 72, 70, 69,
609 67, 65, 63, 61, 60, 58, 56, 54,
610 52, 50, 48, 46, 44, 42, 40, 38,
611 36, 34, 32, 30, 28, 26, 24, 22,
612 19, 17, 15, 13, 11, 9, 7, 5,
613 2, 0, -1, -3, -5, -7, -9, -12,
614 -14, -16, -18, -20, -22, -24, -26, -28,
615 -31, -33, -35, -37, -39, -41, -43, -45,
616 -47, -49, -51, -53, -54, -56, -58, -60,
617 -62, -64, -66, -67, -69, -71, -73, -74,
618 -76, -78, -79, -81, -83, -84, -86, -87,
619 -89, -90, -92, -93, -94, -96, -97, -98,
620 -99, -101, -102, -103, -104, -105, -106, -107,
621 -108, -109, -110, -111, -112, -113, -114, -114,
622 -115, -116, -117, -117, -118, -118, -119, -119,
623 -120, -120, -120, -121, -121, -121, -122, -122,
624 -122, -122, -122, -122, -122, -122, -122, -122,
625 -122, -122, -121, -121, -121, -120, -120, -120,
626 -119, -119, -118, -118, -117, -116, -116, -115,
627 -114, -113, -113, -112, -111, -110, -109, -108,
628 -107, -106, -105, -104, -103, -102, -100, -99,
629 -98, -97, -95, -94, -93, -91, -90, -88,
630 -87, -85, -84, -82, -80, -79, -77, -76,
631 -74, -72, -70, -69, -67, -65, -63, -61,
632 -60, -58, -56, -54, -52, -50, -48, -46,
633 -44, -42, -40, -38, -36, -34, -32, -30,
634 -28, -26, -24, -22, -19, -17, -15, -13,
635 -11, -9, -7, -5, -2, 0, 1, 3,
636 5, 7, 9, 12, 14, 16, 18, 20,
637 22, 24, 26, 28, 31, 33, 35, 37,
638 39, 41, 43, 45, 47, 49, 51, 53,
639 54, 56, 58, 60, 62, 64, 66, 67,
640 69, 71, 73, 74, 76, 78, 79, 81,
641 83, 84, 86, 87, 89, 90, 92, 93,
642 94, 96, 97, 98, 99, 101, 102, 103,
643 104, 105, 106, 107, 108, 109, 110, 111, 112
644};
645
646static const int hsv_blue_y[] = {
647 -11, -13, -15, -17, -19, -21, -23, -25,
648 -27, -29, -31, -33, -35, -37, -39, -41,
649 -43, -45, -46, -48, -50, -52, -54, -55,
650 -57, -59, -61, -62, -64, -66, -67, -69,
651 -71, -72, -74, -75, -77, -78, -80, -81,
652 -83, -84, -86, -87, -88, -90, -91, -92,
653 -93, -95, -96, -97, -98, -99, -100, -101,
654 -102, -103, -104, -105, -106, -106, -107, -108,
655 -109, -109, -110, -111, -111, -112, -112, -113,
656 -113, -114, -114, -114, -115, -115, -115, -115,
657 -116, -116, -116, -116, -116, -116, -116, -116,
658 -116, -115, -115, -115, -115, -114, -114, -114,
659 -113, -113, -112, -112, -111, -111, -110, -110,
660 -109, -108, -108, -107, -106, -105, -104, -103,
661 -102, -101, -100, -99, -98, -97, -96, -95,
662 -94, -93, -91, -90, -89, -88, -86, -85,
663 -84, -82, -81, -79, -78, -76, -75, -73,
664 -71, -70, -68, -67, -65, -63, -62, -60,
665 -58, -56, -55, -53, -51, -49, -47, -45,
666 -44, -42, -40, -38, -36, -34, -32, -30,
667 -28, -26, -24, -22, -20, -18, -16, -14,
668 -12, -10, -8, -6, -4, -2, 0, 1,
669 3, 5, 7, 9, 11, 13, 15, 17,
670 19, 21, 23, 25, 27, 29, 31, 33,
671 35, 37, 39, 41, 43, 45, 46, 48,
672 50, 52, 54, 55, 57, 59, 61, 62,
673 64, 66, 67, 69, 71, 72, 74, 75,
674 77, 78, 80, 81, 83, 84, 86, 87,
675 88, 90, 91, 92, 93, 95, 96, 97,
676 98, 99, 100, 101, 102, 103, 104, 105,
677 106, 106, 107, 108, 109, 109, 110, 111,
678 111, 112, 112, 113, 113, 114, 114, 114,
679 115, 115, 115, 115, 116, 116, 116, 116,
680 116, 116, 116, 116, 116, 115, 115, 115,
681 115, 114, 114, 114, 113, 113, 112, 112,
682 111, 111, 110, 110, 109, 108, 108, 107,
683 106, 105, 104, 103, 102, 101, 100, 99,
684 98, 97, 96, 95, 94, 93, 91, 90,
685 89, 88, 86, 85, 84, 82, 81, 79,
686 78, 76, 75, 73, 71, 70, 68, 67,
687 65, 63, 62, 60, 58, 56, 55, 53,
688 51, 49, 47, 45, 44, 42, 40, 38,
689 36, 34, 32, 30, 28, 26, 24, 22,
690 20, 18, 16, 14, 12, 10, 8, 6,
691 4, 2, 0, -1, -3, -5, -7, -9, -11
692};
693
694static u16 i2c_ident[] = {
695 V4L2_IDENT_OV9650,
696 V4L2_IDENT_OV9655,
697 V4L2_IDENT_SOI968,
698 V4L2_IDENT_OV7660,
699 V4L2_IDENT_OV7670,
700 V4L2_IDENT_MT9V011,
701 V4L2_IDENT_MT9V111,
702 V4L2_IDENT_MT9V112,
703 V4L2_IDENT_MT9M001C12ST,
704 V4L2_IDENT_MT9M111,
705 V4L2_IDENT_HV7131R,
706};
707
708static u16 bridge_init[][2] = {
709 {0x1000, 0x78}, {0x1001, 0x40}, {0x1002, 0x1c},
710 {0x1020, 0x80}, {0x1061, 0x01}, {0x1067, 0x40},
711 {0x1068, 0x30}, {0x1069, 0x20}, {0x106a, 0x10},
712 {0x106b, 0x08}, {0x1188, 0x87}, {0x11a1, 0x00},
713 {0x11a2, 0x00}, {0x11a3, 0x6a}, {0x11a4, 0x50},
714 {0x11ab, 0x00}, {0x11ac, 0x00}, {0x11ad, 0x50},
715 {0x11ae, 0x3c}, {0x118a, 0x04}, {0x0395, 0x04},
716 {0x11b8, 0x3a}, {0x118b, 0x0e}, {0x10f7, 0x05},
717 {0x10f8, 0x14}, {0x10fa, 0xff}, {0x10f9, 0x00},
718 {0x11ba, 0x0a}, {0x11a5, 0x2d}, {0x11a6, 0x2d},
719 {0x11a7, 0x3a}, {0x11a8, 0x05}, {0x11a9, 0x04},
720 {0x11aa, 0x3f}, {0x11af, 0x28}, {0x11b0, 0xd8},
721 {0x11b1, 0x14}, {0x11b2, 0xec}, {0x11b3, 0x32},
722 {0x11b4, 0xdd}, {0x11b5, 0x32}, {0x11b6, 0xdd},
723 {0x10e0, 0x2c}, {0x11bc, 0x40}, {0x11bd, 0x01},
724 {0x11be, 0xf0}, {0x11bf, 0x00}, {0x118c, 0x1f},
725 {0x118d, 0x1f}, {0x118e, 0x1f}, {0x118f, 0x1f},
726 {0x1180, 0x01}, {0x1181, 0x00}, {0x1182, 0x01},
727 {0x1183, 0x00}, {0x1184, 0x50}, {0x1185, 0x80}
728};
729
730/* Gain = (bit[3:0] / 16 + 1) * (bit[4] + 1) * (bit[5] + 1) * (bit[6] + 1) */
731static u8 ov_gain[] = {
732 0x00 /* 1x */, 0x04 /* 1.25x */, 0x08 /* 1.5x */, 0x0c /* 1.75x */,
733 0x10 /* 2x */, 0x12 /* 2.25x */, 0x14 /* 2.5x */, 0x16 /* 2.75x */,
734 0x18 /* 3x */, 0x1a /* 3.25x */, 0x1c /* 3.5x */, 0x1e /* 3.75x */,
735 0x30 /* 4x */, 0x31 /* 4.25x */, 0x32 /* 4.5x */, 0x33 /* 4.75x */,
736 0x34 /* 5x */, 0x35 /* 5.25x */, 0x36 /* 5.5x */, 0x37 /* 5.75x */,
737 0x38 /* 6x */, 0x39 /* 6.25x */, 0x3a /* 6.5x */, 0x3b /* 6.75x */,
738 0x3c /* 7x */, 0x3d /* 7.25x */, 0x3e /* 7.5x */, 0x3f /* 7.75x */,
739 0x70 /* 8x */
740};
741
742/* Gain = (bit[8] + 1) * (bit[7] + 1) * (bit[6:0] * 0.03125) */
743static u16 micron1_gain[] = {
744 /* 1x 1.25x 1.5x 1.75x */
745 0x0020, 0x0028, 0x0030, 0x0038,
746 /* 2x 2.25x 2.5x 2.75x */
747 0x00a0, 0x00a4, 0x00a8, 0x00ac,
748 /* 3x 3.25x 3.5x 3.75x */
749 0x00b0, 0x00b4, 0x00b8, 0x00bc,
750 /* 4x 4.25x 4.5x 4.75x */
751 0x00c0, 0x00c4, 0x00c8, 0x00cc,
752 /* 5x 5.25x 5.5x 5.75x */
753 0x00d0, 0x00d4, 0x00d8, 0x00dc,
754 /* 6x 6.25x 6.5x 6.75x */
755 0x00e0, 0x00e4, 0x00e8, 0x00ec,
756 /* 7x 7.25x 7.5x 7.75x */
757 0x00f0, 0x00f4, 0x00f8, 0x00fc,
758 /* 8x */
759 0x01c0
760};
761
762/* mt9m001 sensor uses a different gain formula then other micron sensors */
763/* Gain = (bit[6] + 1) * (bit[5-0] * 0.125) */
764static u16 micron2_gain[] = {
765 /* 1x 1.25x 1.5x 1.75x */
766 0x0008, 0x000a, 0x000c, 0x000e,
767 /* 2x 2.25x 2.5x 2.75x */
768 0x0010, 0x0012, 0x0014, 0x0016,
769 /* 3x 3.25x 3.5x 3.75x */
770 0x0018, 0x001a, 0x001c, 0x001e,
771 /* 4x 4.25x 4.5x 4.75x */
772 0x0020, 0x0051, 0x0052, 0x0053,
773 /* 5x 5.25x 5.5x 5.75x */
774 0x0054, 0x0055, 0x0056, 0x0057,
775 /* 6x 6.25x 6.5x 6.75x */
776 0x0058, 0x0059, 0x005a, 0x005b,
777 /* 7x 7.25x 7.5x 7.75x */
778 0x005c, 0x005d, 0x005e, 0x005f,
779 /* 8x */
780 0x0060
781};
782
783/* Gain = .5 + bit[7:0] / 16 */
784static u8 hv7131r_gain[] = {
785 0x08 /* 1x */, 0x0c /* 1.25x */, 0x10 /* 1.5x */, 0x14 /* 1.75x */,
786 0x18 /* 2x */, 0x1c /* 2.25x */, 0x20 /* 2.5x */, 0x24 /* 2.75x */,
787 0x28 /* 3x */, 0x2c /* 3.25x */, 0x30 /* 3.5x */, 0x34 /* 3.75x */,
788 0x38 /* 4x */, 0x3c /* 4.25x */, 0x40 /* 4.5x */, 0x44 /* 4.75x */,
789 0x48 /* 5x */, 0x4c /* 5.25x */, 0x50 /* 5.5x */, 0x54 /* 5.75x */,
790 0x58 /* 6x */, 0x5c /* 6.25x */, 0x60 /* 6.5x */, 0x64 /* 6.75x */,
791 0x68 /* 7x */, 0x6c /* 7.25x */, 0x70 /* 7.5x */, 0x74 /* 7.75x */,
792 0x78 /* 8x */
793};
794
795static u8 soi968_init[][2] = {
796 {0x12, 0x80}, {0x0c, 0x00}, {0x0f, 0x1f},
797 {0x11, 0x80}, {0x38, 0x52}, {0x1e, 0x00},
798 {0x33, 0x08}, {0x35, 0x8c}, {0x36, 0x0c},
799 {0x37, 0x04}, {0x45, 0x04}, {0x47, 0xff},
800 {0x3e, 0x00}, {0x3f, 0x00}, {0x3b, 0x20},
801 {0x3a, 0x96}, {0x3d, 0x0a}, {0x14, 0x8e},
802 {0x13, 0x8a}, {0x12, 0x40}, {0x17, 0x13},
803 {0x18, 0x63}, {0x19, 0x01}, {0x1a, 0x79},
804 {0x32, 0x24}, {0x03, 0x00}, {0x11, 0x40},
805 {0x2a, 0x10}, {0x2b, 0xe0}, {0x10, 0x32},
806 {0x00, 0x00}, {0x01, 0x80}, {0x02, 0x80},
807};
808
809static u8 ov7660_init[][2] = {
810 {0x0e, 0x80}, {0x0d, 0x08}, {0x0f, 0xc3},
811 {0x04, 0xc3}, {0x10, 0x40}, {0x11, 0x40},
812 {0x12, 0x05}, {0x13, 0xba}, {0x14, 0x2a},
813 {0x37, 0x0f}, {0x38, 0x02}, {0x39, 0x43},
814 {0x3a, 0x00}, {0x69, 0x90}, {0x2d, 0xf6},
815 {0x2e, 0x0b}, {0x01, 0x78}, {0x02, 0x50},
816};
817
818static u8 ov7670_init[][2] = {
819 {0x12, 0x80}, {0x11, 0x80}, {0x3a, 0x04}, {0x12, 0x01},
820 {0x32, 0xb6}, {0x03, 0x0a}, {0x0c, 0x00}, {0x3e, 0x00},
821 {0x70, 0x3a}, {0x71, 0x35}, {0x72, 0x11}, {0x73, 0xf0},
822 {0xa2, 0x02}, {0x13, 0xe0}, {0x00, 0x00}, {0x10, 0x00},
823 {0x0d, 0x40}, {0x14, 0x28}, {0xa5, 0x05}, {0xab, 0x07},
824 {0x24, 0x95}, {0x25, 0x33}, {0x26, 0xe3}, {0x9f, 0x75},
825 {0xa0, 0x65}, {0xa1, 0x0b}, {0xa6, 0xd8}, {0xa7, 0xd8},
826 {0xa8, 0xf0}, {0xa9, 0x90}, {0xaa, 0x94}, {0x13, 0xe5},
827 {0x0e, 0x61}, {0x0f, 0x4b}, {0x16, 0x02}, {0x1e, 0x27},
828 {0x21, 0x02}, {0x22, 0x91}, {0x29, 0x07}, {0x33, 0x0b},
829 {0x35, 0x0b}, {0x37, 0x1d}, {0x38, 0x71}, {0x39, 0x2a},
830 {0x3c, 0x78}, {0x4d, 0x40}, {0x4e, 0x20}, {0x69, 0x00},
831 {0x74, 0x19}, {0x8d, 0x4f}, {0x8e, 0x00}, {0x8f, 0x00},
832 {0x90, 0x00}, {0x91, 0x00}, {0x96, 0x00}, {0x9a, 0x80},
833 {0xb0, 0x84}, {0xb1, 0x0c}, {0xb2, 0x0e}, {0xb3, 0x82},
834 {0xb8, 0x0a}, {0x43, 0x0a}, {0x44, 0xf0}, {0x45, 0x20},
835 {0x46, 0x7d}, {0x47, 0x29}, {0x48, 0x4a}, {0x59, 0x8c},
836 {0x5a, 0xa5}, {0x5b, 0xde}, {0x5c, 0x96}, {0x5d, 0x66},
837 {0x5e, 0x10}, {0x6c, 0x0a}, {0x6d, 0x55}, {0x6e, 0x11},
838 {0x6f, 0x9e}, {0x6a, 0x40}, {0x01, 0x40}, {0x02, 0x40},
839 {0x13, 0xe7}, {0x4f, 0x6e}, {0x50, 0x70}, {0x51, 0x02},
840 {0x52, 0x1d}, {0x53, 0x56}, {0x54, 0x73}, {0x55, 0x0a},
841 {0x56, 0x55}, {0x57, 0x80}, {0x58, 0x9e}, {0x41, 0x08},
842 {0x3f, 0x02}, {0x75, 0x03}, {0x76, 0x63}, {0x4c, 0x04},
843 {0x77, 0x06}, {0x3d, 0x02}, {0x4b, 0x09}, {0xc9, 0x30},
844 {0x41, 0x08}, {0x56, 0x48}, {0x34, 0x11}, {0xa4, 0x88},
845 {0x96, 0x00}, {0x97, 0x30}, {0x98, 0x20}, {0x99, 0x30},
846 {0x9a, 0x84}, {0x9b, 0x29}, {0x9c, 0x03}, {0x9d, 0x99},
847 {0x9e, 0x7f}, {0x78, 0x04}, {0x79, 0x01}, {0xc8, 0xf0},
848 {0x79, 0x0f}, {0xc8, 0x00}, {0x79, 0x10}, {0xc8, 0x7e},
849 {0x79, 0x0a}, {0xc8, 0x80}, {0x79, 0x0b}, {0xc8, 0x01},
850 {0x79, 0x0c}, {0xc8, 0x0f}, {0x79, 0x0d}, {0xc8, 0x20},
851 {0x79, 0x09}, {0xc8, 0x80}, {0x79, 0x02}, {0xc8, 0xc0},
852 {0x79, 0x03}, {0xc8, 0x40}, {0x79, 0x05}, {0xc8, 0x30},
853 {0x79, 0x26}, {0x62, 0x20}, {0x63, 0x00}, {0x64, 0x06},
854 {0x65, 0x00}, {0x66, 0x05}, {0x94, 0x05}, {0x95, 0x0a},
855 {0x17, 0x13}, {0x18, 0x01}, {0x19, 0x02}, {0x1a, 0x7a},
856 {0x46, 0x59}, {0x47, 0x30}, {0x58, 0x9a}, {0x59, 0x84},
857 {0x5a, 0x91}, {0x5b, 0x57}, {0x5c, 0x75}, {0x5d, 0x6d},
858 {0x5e, 0x13}, {0x64, 0x07}, {0x94, 0x07}, {0x95, 0x0d},
859 {0xa6, 0xdf}, {0xa7, 0xdf}, {0x48, 0x4d}, {0x51, 0x00},
860 {0x6b, 0x0a}, {0x11, 0x80}, {0x2a, 0x00}, {0x2b, 0x00},
861 {0x92, 0x00}, {0x93, 0x00}, {0x55, 0x0a}, {0x56, 0x60},
862 {0x4f, 0x6e}, {0x50, 0x70}, {0x51, 0x00}, {0x52, 0x1d},
863 {0x53, 0x56}, {0x54, 0x73}, {0x58, 0x9a}, {0x4f, 0x6e},
864 {0x50, 0x70}, {0x51, 0x00}, {0x52, 0x1d}, {0x53, 0x56},
865 {0x54, 0x73}, {0x58, 0x9a}, {0x3f, 0x01}, {0x7b, 0x03},
866 {0x7c, 0x09}, {0x7d, 0x16}, {0x7e, 0x38}, {0x7f, 0x47},
867 {0x80, 0x53}, {0x81, 0x5e}, {0x82, 0x6a}, {0x83, 0x74},
868 {0x84, 0x80}, {0x85, 0x8c}, {0x86, 0x9b}, {0x87, 0xb2},
869 {0x88, 0xcc}, {0x89, 0xe5}, {0x7a, 0x24}, {0x3b, 0x00},
870 {0x9f, 0x76}, {0xa0, 0x65}, {0x13, 0xe2}, {0x6b, 0x0a},
871 {0x11, 0x80}, {0x2a, 0x00}, {0x2b, 0x00}, {0x92, 0x00},
872 {0x93, 0x00},
873};
874
875static u8 ov9650_init[][2] = {
876 {0x12, 0x80}, {0x00, 0x00}, {0x01, 0x78},
877 {0x02, 0x78}, {0x03, 0x36}, {0x04, 0x03},
878 {0x05, 0x00}, {0x06, 0x00}, {0x08, 0x00},
879 {0x09, 0x01}, {0x0c, 0x00}, {0x0d, 0x00},
880 {0x0e, 0xa0}, {0x0f, 0x52}, {0x10, 0x7c},
881 {0x11, 0x80}, {0x12, 0x45}, {0x13, 0xc2},
882 {0x14, 0x2e}, {0x15, 0x00}, {0x16, 0x07},
883 {0x17, 0x24}, {0x18, 0xc5}, {0x19, 0x00},
884 {0x1a, 0x3c}, {0x1b, 0x00}, {0x1e, 0x04},
885 {0x1f, 0x00}, {0x24, 0x78}, {0x25, 0x68},
886 {0x26, 0xd4}, {0x27, 0x80}, {0x28, 0x80},
887 {0x29, 0x30}, {0x2a, 0x00}, {0x2b, 0x00},
888 {0x2c, 0x80}, {0x2d, 0x00}, {0x2e, 0x00},
889 {0x2f, 0x00}, {0x30, 0x08}, {0x31, 0x30},
890 {0x32, 0x84}, {0x33, 0xe2}, {0x34, 0xbf},
891 {0x35, 0x81}, {0x36, 0xf9}, {0x37, 0x00},
892 {0x38, 0x93}, {0x39, 0x50}, {0x3a, 0x01},
893 {0x3b, 0x01}, {0x3c, 0x73}, {0x3d, 0x19},
894 {0x3e, 0x0b}, {0x3f, 0x80}, {0x40, 0xc1},
895 {0x41, 0x00}, {0x42, 0x08}, {0x67, 0x80},
896 {0x68, 0x80}, {0x69, 0x40}, {0x6a, 0x00},
897 {0x6b, 0x0a}, {0x8b, 0x06}, {0x8c, 0x20},
898 {0x8d, 0x00}, {0x8e, 0x00}, {0x8f, 0xdf},
899 {0x92, 0x00}, {0x93, 0x00}, {0x94, 0x88},
900 {0x95, 0x88}, {0x96, 0x04}, {0xa1, 0x00},
901 {0xa5, 0x80}, {0xa8, 0x80}, {0xa9, 0xb8},
902 {0xaa, 0x92}, {0xab, 0x0a},
903};
904
905static u8 ov9655_init[][2] = {
906 {0x12, 0x80}, {0x12, 0x01}, {0x0d, 0x00}, {0x0e, 0x61},
907 {0x11, 0x80}, {0x13, 0xba}, {0x14, 0x2e}, {0x16, 0x24},
908 {0x1e, 0x04}, {0x1e, 0x04}, {0x1e, 0x04}, {0x27, 0x08},
909 {0x28, 0x08}, {0x29, 0x15}, {0x2c, 0x08}, {0x32, 0xbf},
910 {0x34, 0x3d}, {0x35, 0x00}, {0x36, 0xf8}, {0x38, 0x12},
911 {0x39, 0x57}, {0x3a, 0x00}, {0x3b, 0xcc}, {0x3c, 0x0c},
912 {0x3d, 0x19}, {0x3e, 0x0c}, {0x3f, 0x01}, {0x41, 0x40},
913 {0x42, 0x80}, {0x45, 0x46}, {0x46, 0x62}, {0x47, 0x2a},
914 {0x48, 0x3c}, {0x4a, 0xf0}, {0x4b, 0xdc}, {0x4c, 0xdc},
915 {0x4d, 0xdc}, {0x4e, 0xdc}, {0x69, 0x02}, {0x6c, 0x04},
916 {0x6f, 0x9e}, {0x70, 0x05}, {0x71, 0x78}, {0x77, 0x02},
917 {0x8a, 0x23}, {0x8c, 0x0d}, {0x90, 0x7e}, {0x91, 0x7c},
918 {0x9f, 0x6e}, {0xa0, 0x6e}, {0xa5, 0x68}, {0xa6, 0x60},
919 {0xa8, 0xc1}, {0xa9, 0xfa}, {0xaa, 0x92}, {0xab, 0x04},
920 {0xac, 0x80}, {0xad, 0x80}, {0xae, 0x80}, {0xaf, 0x80},
921 {0xb2, 0xf2}, {0xb3, 0x20}, {0xb5, 0x00}, {0xb6, 0xaf},
922 {0xbb, 0xae}, {0xbc, 0x44}, {0xbd, 0x44}, {0xbe, 0x3b},
923 {0xbf, 0x3a}, {0xc0, 0xe2}, {0xc1, 0xc8}, {0xc2, 0x01},
924 {0xc4, 0x00}, {0xc6, 0x85}, {0xc7, 0x81}, {0xc9, 0xe0},
925 {0xca, 0xe8}, {0xcc, 0xd8}, {0xcd, 0x93}, {0x12, 0x61},
926 {0x36, 0xfa}, {0x8c, 0x8d}, {0xc0, 0xaa}, {0x69, 0x0a},
927 {0x03, 0x12}, {0x17, 0x14}, {0x18, 0x00}, {0x19, 0x01},
928 {0x1a, 0x3d}, {0x32, 0xbf}, {0x11, 0x80}, {0x2a, 0x10},
929 {0x2b, 0x0a}, {0x92, 0x00}, {0x93, 0x00}, {0x1e, 0x04},
930 {0x1e, 0x04}, {0x10, 0x7c}, {0x04, 0x03}, {0xa1, 0x00},
931 {0x2d, 0x00}, {0x2e, 0x00}, {0x00, 0x00}, {0x01, 0x80},
932 {0x02, 0x80}, {0x12, 0x61}, {0x36, 0xfa}, {0x8c, 0x8d},
933 {0xc0, 0xaa}, {0x69, 0x0a}, {0x03, 0x12}, {0x17, 0x14},
934 {0x18, 0x00}, {0x19, 0x01}, {0x1a, 0x3d}, {0x32, 0xbf},
935 {0x11, 0x80}, {0x2a, 0x10}, {0x2b, 0x0a}, {0x92, 0x00},
936 {0x93, 0x00}, {0x04, 0x01}, {0x10, 0x1f}, {0xa1, 0x00},
937 {0x00, 0x0a}, {0xa1, 0x00}, {0x10, 0x5d}, {0x04, 0x03},
938 {0x00, 0x01}, {0xa1, 0x00}, {0x10, 0x7c}, {0x04, 0x03},
939 {0x00, 0x03}, {0x00, 0x0a}, {0x00, 0x10}, {0x00, 0x13},
940};
941
942static u16 mt9v112_init[][2] = {
943 {0xf0, 0x0000}, {0x0d, 0x0021}, {0x0d, 0x0020},
944 {0x34, 0xc019}, {0x0a, 0x0011}, {0x0b, 0x000b},
945 {0x20, 0x0703}, {0x35, 0x2022}, {0xf0, 0x0001},
946 {0x05, 0x0000}, {0x06, 0x340c}, {0x3b, 0x042a},
947 {0x3c, 0x0400}, {0xf0, 0x0002}, {0x2e, 0x0c58},
948 {0x5b, 0x0001}, {0xc8, 0x9f0b}, {0xf0, 0x0001},
949 {0x9b, 0x5300}, {0xf0, 0x0000}, {0x2b, 0x0020},
950 {0x2c, 0x002a}, {0x2d, 0x0032}, {0x2e, 0x0020},
951 {0x09, 0x01dc}, {0x01, 0x000c}, {0x02, 0x0020},
952 {0x03, 0x01e0}, {0x04, 0x0280}, {0x06, 0x000c},
953 {0x05, 0x0098}, {0x20, 0x0703}, {0x09, 0x01f2},
954 {0x2b, 0x00a0}, {0x2c, 0x00a0}, {0x2d, 0x00a0},
955 {0x2e, 0x00a0}, {0x01, 0x000c}, {0x02, 0x0020},
956 {0x03, 0x01e0}, {0x04, 0x0280}, {0x06, 0x000c},
957 {0x05, 0x0098}, {0x09, 0x01c1}, {0x2b, 0x00ae},
958 {0x2c, 0x00ae}, {0x2d, 0x00ae}, {0x2e, 0x00ae},
959};
960
961static u16 mt9v111_init[][2] = {
962 {0x01, 0x0004}, {0x0d, 0x0001}, {0x0d, 0x0000},
963 {0x01, 0x0001}, {0x02, 0x0016}, {0x03, 0x01e1},
964 {0x04, 0x0281}, {0x05, 0x0004}, {0x07, 0x3002},
965 {0x21, 0x0000}, {0x25, 0x4024}, {0x26, 0xff03},
966 {0x27, 0xff10}, {0x2b, 0x7828}, {0x2c, 0xb43c},
967 {0x2d, 0xf0a0}, {0x2e, 0x0c64}, {0x2f, 0x0064},
968 {0x67, 0x4010}, {0x06, 0x301e}, {0x08, 0x0480},
969 {0x01, 0x0004}, {0x02, 0x0016}, {0x03, 0x01e6},
970 {0x04, 0x0286}, {0x05, 0x0004}, {0x06, 0x0000},
971 {0x07, 0x3002}, {0x08, 0x0008}, {0x0c, 0x0000},
972 {0x0d, 0x0000}, {0x0e, 0x0000}, {0x0f, 0x0000},
973 {0x10, 0x0000}, {0x11, 0x0000}, {0x12, 0x00b0},
974 {0x13, 0x007c}, {0x14, 0x0000}, {0x15, 0x0000},
975 {0x16, 0x0000}, {0x17, 0x0000}, {0x18, 0x0000},
976 {0x19, 0x0000}, {0x1a, 0x0000}, {0x1b, 0x0000},
977 {0x1c, 0x0000}, {0x1d, 0x0000}, {0x30, 0x0000},
978 {0x30, 0x0005}, {0x31, 0x0000}, {0x02, 0x0016},
979 {0x03, 0x01e1}, {0x04, 0x0281}, {0x05, 0x0004},
980 {0x06, 0x0000}, {0x07, 0x3002}, {0x06, 0x002d},
981 {0x05, 0x0004}, {0x09, 0x0064}, {0x2b, 0x00a0},
982 {0x2c, 0x00a0}, {0x2d, 0x00a0}, {0x2e, 0x00a0},
983 {0x02, 0x0016}, {0x03, 0x01e1}, {0x04, 0x0281},
984 {0x05, 0x0004}, {0x06, 0x002d}, {0x07, 0x3002},
985 {0x0e, 0x0008}, {0x06, 0x002d}, {0x05, 0x0004},
986};
987
988static u16 mt9v011_init[][2] = {
989 {0x07, 0x0002}, {0x0d, 0x0001}, {0x0d, 0x0000},
990 {0x01, 0x0008}, {0x02, 0x0016}, {0x03, 0x01e1},
991 {0x04, 0x0281}, {0x05, 0x0083}, {0x06, 0x0006},
992 {0x0d, 0x0002}, {0x0a, 0x0000}, {0x0b, 0x0000},
993 {0x0c, 0x0000}, {0x0d, 0x0000}, {0x0e, 0x0000},
994 {0x0f, 0x0000}, {0x10, 0x0000}, {0x11, 0x0000},
995 {0x12, 0x0000}, {0x13, 0x0000}, {0x14, 0x0000},
996 {0x15, 0x0000}, {0x16, 0x0000}, {0x17, 0x0000},
997 {0x18, 0x0000}, {0x19, 0x0000}, {0x1a, 0x0000},
998 {0x1b, 0x0000}, {0x1c, 0x0000}, {0x1d, 0x0000},
999 {0x32, 0x0000}, {0x20, 0x1101}, {0x21, 0x0000},
1000 {0x22, 0x0000}, {0x23, 0x0000}, {0x24, 0x0000},
1001 {0x25, 0x0000}, {0x26, 0x0000}, {0x27, 0x0024},
1002 {0x2f, 0xf7b0}, {0x30, 0x0005}, {0x31, 0x0000},
1003 {0x32, 0x0000}, {0x33, 0x0000}, {0x34, 0x0100},
1004 {0x3d, 0x068f}, {0x40, 0x01e0}, {0x41, 0x00d1},
1005 {0x44, 0x0082}, {0x5a, 0x0000}, {0x5b, 0x0000},
1006 {0x5c, 0x0000}, {0x5d, 0x0000}, {0x5e, 0x0000},
1007 {0x5f, 0xa31d}, {0x62, 0x0611}, {0x0a, 0x0000},
1008 {0x06, 0x0029}, {0x05, 0x0009}, {0x20, 0x1101},
1009 {0x20, 0x1101}, {0x09, 0x0064}, {0x07, 0x0003},
1010 {0x2b, 0x0033}, {0x2c, 0x00a0}, {0x2d, 0x00a0},
1011 {0x2e, 0x0033}, {0x07, 0x0002}, {0x06, 0x0000},
1012 {0x06, 0x0029}, {0x05, 0x0009},
1013};
1014
1015static u16 mt9m001_init[][2] = {
1016 {0x0d, 0x0001}, {0x0d, 0x0000}, {0x01, 0x000e},
1017 {0x02, 0x0014}, {0x03, 0x03c1}, {0x04, 0x0501},
1018 {0x05, 0x0083}, {0x06, 0x0006}, {0x0d, 0x0002},
1019 {0x0a, 0x0000}, {0x0c, 0x0000}, {0x11, 0x0000},
1020 {0x1e, 0x8000}, {0x5f, 0x8904}, {0x60, 0x0000},
1021 {0x61, 0x0000}, {0x62, 0x0498}, {0x63, 0x0000},
1022 {0x64, 0x0000}, {0x20, 0x111d}, {0x06, 0x00f2},
1023 {0x05, 0x0013}, {0x09, 0x10f2}, {0x07, 0x0003},
1024 {0x2b, 0x002a}, {0x2d, 0x002a}, {0x2c, 0x002a},
1025 {0x2e, 0x0029}, {0x07, 0x0002},
1026};
1027
1028static u16 mt9m111_init[][2] = {
1029 {0xf0, 0x0000}, {0x0d, 0x0008}, {0x0d, 0x0009},
1030 {0x0d, 0x0008}, {0xf0, 0x0001}, {0x3a, 0x4300},
1031 {0x9b, 0x4300}, {0xa1, 0x0280}, {0xa4, 0x0200},
1032 {0x06, 0x308e}, {0xf0, 0x0000},
1033};
1034
1035static u8 hv7131r_init[][2] = {
1036 {0x02, 0x08}, {0x02, 0x00}, {0x01, 0x08},
1037 {0x02, 0x00}, {0x20, 0x00}, {0x21, 0xd0},
1038 {0x22, 0x00}, {0x23, 0x09}, {0x01, 0x08},
1039 {0x01, 0x08}, {0x01, 0x08}, {0x25, 0x07},
1040 {0x26, 0xc3}, {0x27, 0x50}, {0x30, 0x62},
1041 {0x31, 0x10}, {0x32, 0x06}, {0x33, 0x10},
1042 {0x20, 0x00}, {0x21, 0xd0}, {0x22, 0x00},
1043 {0x23, 0x09}, {0x01, 0x08},
1044};
1045
1046int reg_r(struct gspca_dev *gspca_dev, u16 reg, u16 length)
1047{
1048 struct usb_device *dev = gspca_dev->dev;
1049 int result;
1050 result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
1051 0x00,
1052 USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE,
1053 reg,
1054 0x00,
1055 gspca_dev->usb_buf,
1056 length,
1057 500);
1058 if (unlikely(result < 0 || result != length)) {
1059 err("Read register failed 0x%02X", reg);
1060 return -EIO;
1061 }
1062 return 0;
1063}
1064
1065int reg_w(struct gspca_dev *gspca_dev, u16 reg, const u8 *buffer, int length)
1066{
1067 struct usb_device *dev = gspca_dev->dev;
1068 int result;
1069 memcpy(gspca_dev->usb_buf, buffer, length);
1070 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
1071 0x08,
1072 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_INTERFACE,
1073 reg,
1074 0x00,
1075 gspca_dev->usb_buf,
1076 length,
1077 500);
1078 if (unlikely(result < 0 || result != length)) {
1079 err("Write register failed index 0x%02X", reg);
1080 return -EIO;
1081 }
1082 return 0;
1083}
1084
1085int reg_w1(struct gspca_dev *gspca_dev, u16 reg, const u8 value)
1086{
1087 u8 data[1] = {value};
1088 return reg_w(gspca_dev, reg, data, 1);
1089}
1090
1091int i2c_w(struct gspca_dev *gspca_dev, const u8 *buffer)
1092{
1093 int i;
1094 reg_w(gspca_dev, 0x10c0, buffer, 8);
1095 for (i = 0; i < 5; i++) {
1096 reg_r(gspca_dev, 0x10c0, 1);
1097 if (gspca_dev->usb_buf[0] & 0x04) {
1098 if (gspca_dev->usb_buf[0] & 0x08)
1099 return -1;
1100 return 0;
1101 }
1102 msleep(1);
1103 }
1104 return -1;
1105}
1106
1107int i2c_w1(struct gspca_dev *gspca_dev, u8 reg, u8 val)
1108{
1109 struct sd *sd = (struct sd *) gspca_dev;
1110
1111 u8 row[8];
1112
1113 /*
1114 * from the point of view of the bridge, the length
1115 * includes the address
1116 */
1117 row[0] = 0x81 | (2 << 4);
1118 row[1] = sd->i2c_addr;
1119 row[2] = reg;
1120 row[3] = val;
1121 row[4] = 0x00;
1122 row[5] = 0x00;
1123 row[6] = 0x00;
1124 row[7] = 0x10;
1125
1126 return i2c_w(gspca_dev, row);
1127}
1128
1129int i2c_w2(struct gspca_dev *gspca_dev, u8 reg, u16 val)
1130{
1131 struct sd *sd = (struct sd *) gspca_dev;
1132 u8 row[8];
1133
1134 /*
1135 * from the point of view of the bridge, the length
1136 * includes the address
1137 */
1138 row[0] = 0x81 | (3 << 4);
1139 row[1] = sd->i2c_addr;
1140 row[2] = reg;
1141 row[3] = (val >> 8) & 0xff;
1142 row[4] = val & 0xff;
1143 row[5] = 0x00;
1144 row[6] = 0x00;
1145 row[7] = 0x10;
1146
1147 return i2c_w(gspca_dev, row);
1148}
1149
1150int i2c_r1(struct gspca_dev *gspca_dev, u8 reg, u8 *val)
1151{
1152 struct sd *sd = (struct sd *) gspca_dev;
1153 u8 row[8];
1154
1155 row[0] = 0x81 | 0x10;
1156 row[1] = sd->i2c_addr;
1157 row[2] = reg;
1158 row[3] = 0;
1159 row[4] = 0;
1160 row[5] = 0;
1161 row[6] = 0;
1162 row[7] = 0x10;
1163 reg_w(gspca_dev, 0x10c0, row, 8);
1164 msleep(1);
1165 row[0] = 0x81 | (2 << 4) | 0x02;
1166 row[2] = 0;
1167 reg_w(gspca_dev, 0x10c0, row, 8);
1168 msleep(1);
1169 reg_r(gspca_dev, 0x10c2, 5);
1170 *val = gspca_dev->usb_buf[3];
1171 return 0;
1172}
1173
1174int i2c_r2(struct gspca_dev *gspca_dev, u8 reg, u16 *val)
1175{
1176 struct sd *sd = (struct sd *) gspca_dev;
1177 u8 row[8];
1178
1179 row[0] = 0x81 | 0x10;
1180 row[1] = sd->i2c_addr;
1181 row[2] = reg;
1182 row[3] = 0;
1183 row[4] = 0;
1184 row[5] = 0;
1185 row[6] = 0;
1186 row[7] = 0x10;
1187 reg_w(gspca_dev, 0x10c0, row, 8);
1188 msleep(1);
1189 row[0] = 0x81 | (3 << 4) | 0x02;
1190 row[2] = 0;
1191 reg_w(gspca_dev, 0x10c0, row, 8);
1192 msleep(1);
1193 reg_r(gspca_dev, 0x10c2, 5);
1194 *val = (gspca_dev->usb_buf[2] << 8) | gspca_dev->usb_buf[3];
1195 return 0;
1196}
1197
1198static int ov9650_init_sensor(struct gspca_dev *gspca_dev)
1199{
1200 int i;
1201 struct sd *sd = (struct sd *) gspca_dev;
1202
1203 for (i = 0; i < ARRAY_SIZE(ov9650_init); i++) {
1204 if (i2c_w1(gspca_dev, ov9650_init[i][0],
1205 ov9650_init[i][1]) < 0) {
1206 err("OV9650 sensor initialization failed");
1207 return -ENODEV;
1208 }
1209 }
1210 sd->hstart = 1;
1211 sd->vstart = 7;
1212 return 0;
1213}
1214
1215static int ov9655_init_sensor(struct gspca_dev *gspca_dev)
1216{
1217 int i;
1218 struct sd *sd = (struct sd *) gspca_dev;
1219
1220 for (i = 0; i < ARRAY_SIZE(ov9655_init); i++) {
1221 if (i2c_w1(gspca_dev, ov9655_init[i][0],
1222 ov9655_init[i][1]) < 0) {
1223 err("OV9655 sensor initialization failed");
1224 return -ENODEV;
1225 }
1226 }
1227 /* disable hflip and vflip */
1228 gspca_dev->ctrl_dis = (1 << HFLIP_IDX) | (1 << VFLIP_IDX);
1229 sd->hstart = 0;
1230 sd->vstart = 7;
1231 return 0;
1232}
1233
1234static int soi968_init_sensor(struct gspca_dev *gspca_dev)
1235{
1236 int i;
1237 struct sd *sd = (struct sd *) gspca_dev;
1238
1239 for (i = 0; i < ARRAY_SIZE(soi968_init); i++) {
1240 if (i2c_w1(gspca_dev, soi968_init[i][0],
1241 soi968_init[i][1]) < 0) {
1242 err("SOI968 sensor initialization failed");
1243 return -ENODEV;
1244 }
1245 }
1246 /* disable hflip and vflip */
1247 gspca_dev->ctrl_dis = (1 << HFLIP_IDX) | (1 << VFLIP_IDX);
1248 sd->hstart = 60;
1249 sd->vstart = 11;
1250 return 0;
1251}
1252
1253static int ov7660_init_sensor(struct gspca_dev *gspca_dev)
1254{
1255 int i;
1256 struct sd *sd = (struct sd *) gspca_dev;
1257
1258 for (i = 0; i < ARRAY_SIZE(ov7660_init); i++) {
1259 if (i2c_w1(gspca_dev, ov7660_init[i][0],
1260 ov7660_init[i][1]) < 0) {
1261 err("OV7660 sensor initialization failed");
1262 return -ENODEV;
1263 }
1264 }
1265 /* disable hflip and vflip */
1266 gspca_dev->ctrl_dis = (1 << HFLIP_IDX) | (1 << VFLIP_IDX);
1267 sd->hstart = 1;
1268 sd->vstart = 1;
1269 return 0;
1270}
1271
1272static int ov7670_init_sensor(struct gspca_dev *gspca_dev)
1273{
1274 int i;
1275 struct sd *sd = (struct sd *) gspca_dev;
1276
1277 for (i = 0; i < ARRAY_SIZE(ov7670_init); i++) {
1278 if (i2c_w1(gspca_dev, ov7670_init[i][0],
1279 ov7670_init[i][1]) < 0) {
1280 err("OV7670 sensor initialization failed");
1281 return -ENODEV;
1282 }
1283 }
1284 /* disable hflip and vflip */
1285 gspca_dev->ctrl_dis = (1 << HFLIP_IDX) | (1 << VFLIP_IDX);
1286 sd->hstart = 0;
1287 sd->vstart = 1;
1288 return 0;
1289}
1290
1291static int mt9v_init_sensor(struct gspca_dev *gspca_dev)
1292{
1293 struct sd *sd = (struct sd *) gspca_dev;
1294 int i;
1295 u16 value;
1296 int ret;
1297
1298 sd->i2c_addr = 0x5d;
1299 ret = i2c_r2(gspca_dev, 0xff, &value);
1300 if ((ret == 0) && (value == 0x8243)) {
1301 for (i = 0; i < ARRAY_SIZE(mt9v011_init); i++) {
1302 if (i2c_w2(gspca_dev, mt9v011_init[i][0],
1303 mt9v011_init[i][1]) < 0) {
1304 err("MT9V011 sensor initialization failed");
1305 return -ENODEV;
1306 }
1307 }
1308 sd->hstart = 2;
1309 sd->vstart = 2;
1310 sd->sensor = SENSOR_MT9V011;
1311 info("MT9V011 sensor detected");
1312 return 0;
1313 }
1314
1315 sd->i2c_addr = 0x5c;
1316 i2c_w2(gspca_dev, 0x01, 0x0004);
1317 ret = i2c_r2(gspca_dev, 0xff, &value);
1318 if ((ret == 0) && (value == 0x823a)) {
1319 for (i = 0; i < ARRAY_SIZE(mt9v111_init); i++) {
1320 if (i2c_w2(gspca_dev, mt9v111_init[i][0],
1321 mt9v111_init[i][1]) < 0) {
1322 err("MT9V111 sensor initialization failed");
1323 return -ENODEV;
1324 }
1325 }
1326 sd->hstart = 2;
1327 sd->vstart = 2;
1328 sd->sensor = SENSOR_MT9V111;
1329 info("MT9V111 sensor detected");
1330 return 0;
1331 }
1332
1333 sd->i2c_addr = 0x5d;
1334 ret = i2c_w2(gspca_dev, 0xf0, 0x0000);
1335 if (ret < 0) {
1336 sd->i2c_addr = 0x48;
1337 i2c_w2(gspca_dev, 0xf0, 0x0000);
1338 }
1339 ret = i2c_r2(gspca_dev, 0x00, &value);
1340 if ((ret == 0) && (value == 0x1229)) {
1341 for (i = 0; i < ARRAY_SIZE(mt9v112_init); i++) {
1342 if (i2c_w2(gspca_dev, mt9v112_init[i][0],
1343 mt9v112_init[i][1]) < 0) {
1344 err("MT9V112 sensor initialization failed");
1345 return -ENODEV;
1346 }
1347 }
1348 sd->hstart = 6;
1349 sd->vstart = 2;
1350 sd->sensor = SENSOR_MT9V112;
1351 info("MT9V112 sensor detected");
1352 return 0;
1353 }
1354
1355 return -ENODEV;
1356}
1357
1358static int mt9m111_init_sensor(struct gspca_dev *gspca_dev)
1359{
1360 struct sd *sd = (struct sd *) gspca_dev;
1361 int i;
1362 for (i = 0; i < ARRAY_SIZE(mt9m111_init); i++) {
1363 if (i2c_w2(gspca_dev, mt9m111_init[i][0],
1364 mt9m111_init[i][1]) < 0) {
1365 err("MT9M111 sensor initialization failed");
1366 return -ENODEV;
1367 }
1368 }
1369 sd->hstart = 0;
1370 sd->vstart = 2;
1371 return 0;
1372}
1373
1374static int mt9m001_init_sensor(struct gspca_dev *gspca_dev)
1375{
1376 struct sd *sd = (struct sd *) gspca_dev;
1377 int i;
1378 for (i = 0; i < ARRAY_SIZE(mt9m001_init); i++) {
1379 if (i2c_w2(gspca_dev, mt9m001_init[i][0],
1380 mt9m001_init[i][1]) < 0) {
1381 err("MT9M001 sensor initialization failed");
1382 return -ENODEV;
1383 }
1384 }
1385 /* disable hflip and vflip */
1386 gspca_dev->ctrl_dis = (1 << HFLIP_IDX) | (1 << VFLIP_IDX);
1387 sd->hstart = 2;
1388 sd->vstart = 2;
1389 return 0;
1390}
1391
1392static int hv7131r_init_sensor(struct gspca_dev *gspca_dev)
1393{
1394 int i;
1395 struct sd *sd = (struct sd *) gspca_dev;
1396
1397 for (i = 0; i < ARRAY_SIZE(hv7131r_init); i++) {
1398 if (i2c_w1(gspca_dev, hv7131r_init[i][0],
1399 hv7131r_init[i][1]) < 0) {
1400 err("HV7131R Sensor initialization failed");
1401 return -ENODEV;
1402 }
1403 }
1404 sd->hstart = 0;
1405 sd->vstart = 1;
1406 return 0;
1407}
1408
1409#ifdef CONFIG_USB_GSPCA_SN9C20X_EVDEV
1410static int input_kthread(void *data)
1411{
1412 struct gspca_dev *gspca_dev = (struct gspca_dev *)data;
1413 struct sd *sd = (struct sd *) gspca_dev;
1414
1415 DECLARE_WAIT_QUEUE_HEAD(wait);
1416 set_freezable();
1417 for (;;) {
1418 if (kthread_should_stop())
1419 break;
1420
1421 if (reg_r(gspca_dev, 0x1005, 1) < 0)
1422 continue;
1423
1424 input_report_key(sd->input_dev,
1425 KEY_CAMERA,
1426 gspca_dev->usb_buf[0] & sd->input_gpio);
1427 input_sync(sd->input_dev);
1428
1429 wait_event_freezable_timeout(wait,
1430 kthread_should_stop(),
1431 msecs_to_jiffies(100));
1432 }
1433 return 0;
1434}
1435
1436
1437static int sn9c20x_input_init(struct gspca_dev *gspca_dev)
1438{
1439 struct sd *sd = (struct sd *) gspca_dev;
1440 if (sd->input_gpio == 0)
1441 return 0;
1442
1443 sd->input_dev = input_allocate_device();
1444 if (!sd->input_dev)
1445 return -ENOMEM;
1446
1447 sd->input_dev->name = "SN9C20X Webcam";
1448
1449 sd->input_dev->phys = kasprintf(GFP_KERNEL, "usb-%s-%s",
1450 gspca_dev->dev->bus->bus_name,
1451 gspca_dev->dev->devpath);
1452
1453 if (!sd->input_dev->phys)
1454 return -ENOMEM;
1455
1456 usb_to_input_id(gspca_dev->dev, &sd->input_dev->id);
1457 sd->input_dev->dev.parent = &gspca_dev->dev->dev;
1458
1459 set_bit(EV_KEY, sd->input_dev->evbit);
1460 set_bit(KEY_CAMERA, sd->input_dev->keybit);
1461
1462 if (input_register_device(sd->input_dev))
1463 return -EINVAL;
1464
1465 sd->input_task = kthread_run(input_kthread, gspca_dev, "sn9c20x/%d",
1466 gspca_dev->vdev.minor);
1467
1468 if (IS_ERR(sd->input_task))
1469 return -EINVAL;
1470
1471 return 0;
1472}
1473
1474static void sn9c20x_input_cleanup(struct gspca_dev *gspca_dev)
1475{
1476 struct sd *sd = (struct sd *) gspca_dev;
1477 if (sd->input_task != NULL && !IS_ERR(sd->input_task))
1478 kthread_stop(sd->input_task);
1479
1480 if (sd->input_dev != NULL) {
1481 input_unregister_device(sd->input_dev);
1482 kfree(sd->input_dev->phys);
1483 input_free_device(sd->input_dev);
1484 sd->input_dev = NULL;
1485 }
1486}
1487#endif
1488
1489static int set_cmatrix(struct gspca_dev *gspca_dev)
1490{
1491 struct sd *sd = (struct sd *) gspca_dev;
1492 s32 hue_coord, hue_index = 180 + sd->hue;
1493 u8 cmatrix[21];
1494 memset(cmatrix, 0, 21);
1495
1496 cmatrix[2] = (sd->contrast * 0x25 / 0x100) + 0x26;
1497 cmatrix[0] = 0x13 + (cmatrix[2] - 0x26) * 0x13 / 0x25;
1498 cmatrix[4] = 0x07 + (cmatrix[2] - 0x26) * 0x07 / 0x25;
1499 cmatrix[18] = sd->brightness - 0x80;
1500
1501 hue_coord = (hsv_red_x[hue_index] * sd->saturation) >> 8;
1502 cmatrix[6] = (unsigned char)(hue_coord & 0xff);
1503 cmatrix[7] = (unsigned char)((hue_coord >> 8) & 0x0f);
1504
1505 hue_coord = (hsv_red_y[hue_index] * sd->saturation) >> 8;
1506 cmatrix[8] = (unsigned char)(hue_coord & 0xff);
1507 cmatrix[9] = (unsigned char)((hue_coord >> 8) & 0x0f);
1508
1509 hue_coord = (hsv_green_x[hue_index] * sd->saturation) >> 8;
1510 cmatrix[10] = (unsigned char)(hue_coord & 0xff);
1511 cmatrix[11] = (unsigned char)((hue_coord >> 8) & 0x0f);
1512
1513 hue_coord = (hsv_green_y[hue_index] * sd->saturation) >> 8;
1514 cmatrix[12] = (unsigned char)(hue_coord & 0xff);
1515 cmatrix[13] = (unsigned char)((hue_coord >> 8) & 0x0f);
1516
1517 hue_coord = (hsv_blue_x[hue_index] * sd->saturation) >> 8;
1518 cmatrix[14] = (unsigned char)(hue_coord & 0xff);
1519 cmatrix[15] = (unsigned char)((hue_coord >> 8) & 0x0f);
1520
1521 hue_coord = (hsv_blue_y[hue_index] * sd->saturation) >> 8;
1522 cmatrix[16] = (unsigned char)(hue_coord & 0xff);
1523 cmatrix[17] = (unsigned char)((hue_coord >> 8) & 0x0f);
1524
1525 return reg_w(gspca_dev, 0x10e1, cmatrix, 21);
1526}
1527
1528static int set_gamma(struct gspca_dev *gspca_dev)
1529{
1530 struct sd *sd = (struct sd *) gspca_dev;
1531 u8 gamma[17];
1532 u8 gval = sd->gamma * 0xb8 / 0x100;
1533
1534
1535 gamma[0] = 0x0a;
1536 gamma[1] = 0x13 + (gval * (0xcb - 0x13) / 0xb8);
1537 gamma[2] = 0x25 + (gval * (0xee - 0x25) / 0xb8);
1538 gamma[3] = 0x37 + (gval * (0xfa - 0x37) / 0xb8);
1539 gamma[4] = 0x45 + (gval * (0xfc - 0x45) / 0xb8);
1540 gamma[5] = 0x55 + (gval * (0xfb - 0x55) / 0xb8);
1541 gamma[6] = 0x65 + (gval * (0xfc - 0x65) / 0xb8);
1542 gamma[7] = 0x74 + (gval * (0xfd - 0x74) / 0xb8);
1543 gamma[8] = 0x83 + (gval * (0xfe - 0x83) / 0xb8);
1544 gamma[9] = 0x92 + (gval * (0xfc - 0x92) / 0xb8);
1545 gamma[10] = 0xa1 + (gval * (0xfc - 0xa1) / 0xb8);
1546 gamma[11] = 0xb0 + (gval * (0xfc - 0xb0) / 0xb8);
1547 gamma[12] = 0xbf + (gval * (0xfb - 0xbf) / 0xb8);
1548 gamma[13] = 0xce + (gval * (0xfb - 0xce) / 0xb8);
1549 gamma[14] = 0xdf + (gval * (0xfd - 0xdf) / 0xb8);
1550 gamma[15] = 0xea + (gval * (0xf9 - 0xea) / 0xb8);
1551 gamma[16] = 0xf5;
1552
1553 return reg_w(gspca_dev, 0x1190, gamma, 17);
1554}
1555
1556static int set_redblue(struct gspca_dev *gspca_dev)
1557{
1558 struct sd *sd = (struct sd *) gspca_dev;
1559 reg_w1(gspca_dev, 0x118c, sd->red);
1560 reg_w1(gspca_dev, 0x118f, sd->blue);
1561 return 0;
1562}
1563
1564static int set_hvflip(struct gspca_dev *gspca_dev)
1565{
1566 u8 value, tslb;
1567 u16 value2;
1568 struct sd *sd = (struct sd *) gspca_dev;
1569 switch (sd->sensor) {
1570 case SENSOR_OV9650:
1571 i2c_r1(gspca_dev, 0x1e, &value);
1572 value &= ~0x30;
1573 tslb = 0x01;
1574 if (sd->hflip)
1575 value |= 0x20;
1576 if (sd->vflip) {
1577 value |= 0x10;
1578 tslb = 0x49;
1579 }
1580 i2c_w1(gspca_dev, 0x1e, value);
1581 i2c_w1(gspca_dev, 0x3a, tslb);
1582 break;
1583 case SENSOR_MT9V111:
1584 case SENSOR_MT9V011:
1585 i2c_r2(gspca_dev, 0x20, &value2);
1586 value2 &= ~0xc0a0;
1587 if (sd->hflip)
1588 value2 |= 0x8080;
1589 if (sd->vflip)
1590 value2 |= 0x4020;
1591 i2c_w2(gspca_dev, 0x20, value2);
1592 break;
1593 case SENSOR_MT9M111:
1594 case SENSOR_MT9V112:
1595 i2c_r2(gspca_dev, 0x20, &value2);
1596 value2 &= ~0x0003;
1597 if (sd->hflip)
1598 value2 |= 0x0002;
1599 if (sd->vflip)
1600 value2 |= 0x0001;
1601 i2c_w2(gspca_dev, 0x20, value2);
1602 break;
1603 case SENSOR_HV7131R:
1604 i2c_r1(gspca_dev, 0x01, &value);
1605 value &= ~0x03;
1606 if (sd->vflip)
1607 value |= 0x01;
1608 if (sd->hflip)
1609 value |= 0x02;
1610 i2c_w1(gspca_dev, 0x01, value);
1611 break;
1612 }
1613 return 0;
1614}
1615
1616static int set_exposure(struct gspca_dev *gspca_dev)
1617{
1618 struct sd *sd = (struct sd *) gspca_dev;
1619 u8 exp[8] = {0x81, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e};
1620 switch (sd->sensor) {
1621 case SENSOR_OV7660:
1622 case SENSOR_OV7670:
1623 case SENSOR_SOI968:
1624 case SENSOR_OV9655:
1625 case SENSOR_OV9650:
1626 exp[0] |= (3 << 4);
1627 exp[2] = 0x2d;
1628 exp[3] = sd->exposure & 0xff;
1629 exp[4] = sd->exposure >> 8;
1630 break;
1631 case SENSOR_MT9M001:
1632 case SENSOR_MT9M111:
1633 case SENSOR_MT9V112:
1634 case SENSOR_MT9V111:
1635 case SENSOR_MT9V011:
1636 exp[0] |= (3 << 4);
1637 exp[2] = 0x09;
1638 exp[3] = sd->exposure >> 8;
1639 exp[4] = sd->exposure & 0xff;
1640 break;
1641 case SENSOR_HV7131R:
1642 exp[0] |= (4 << 4);
1643 exp[2] = 0x25;
1644 exp[3] = ((sd->exposure * 0xffffff) / 0xffff) >> 16;
1645 exp[4] = ((sd->exposure * 0xffffff) / 0xffff) >> 8;
1646 exp[5] = ((sd->exposure * 0xffffff) / 0xffff) & 0xff;
1647 break;
1648 }
1649 i2c_w(gspca_dev, exp);
1650 return 0;
1651}
1652
1653static int set_gain(struct gspca_dev *gspca_dev)
1654{
1655 struct sd *sd = (struct sd *) gspca_dev;
1656 u8 gain[8] = {0x81, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d};
1657 switch (sd->sensor) {
1658 case SENSOR_OV7660:
1659 case SENSOR_OV7670:
1660 case SENSOR_SOI968:
1661 case SENSOR_OV9655:
1662 case SENSOR_OV9650:
1663 gain[0] |= (2 << 4);
1664 gain[3] = ov_gain[sd->gain];
1665 break;
1666 case SENSOR_MT9V011:
1667 case SENSOR_MT9V111:
1668 gain[0] |= (3 << 4);
1669 gain[2] = 0x35;
1670 gain[3] = micron1_gain[sd->gain] >> 8;
1671 gain[4] = micron1_gain[sd->gain] & 0xff;
1672 break;
1673 case SENSOR_MT9V112:
1674 case SENSOR_MT9M111:
1675 gain[0] |= (3 << 4);
1676 gain[2] = 0x2f;
1677 gain[3] = micron1_gain[sd->gain] >> 8;
1678 gain[4] = micron1_gain[sd->gain] & 0xff;
1679 break;
1680 case SENSOR_MT9M001:
1681 gain[0] |= (3 << 4);
1682 gain[2] = 0x2f;
1683 gain[3] = micron2_gain[sd->gain] >> 8;
1684 gain[4] = micron2_gain[sd->gain] & 0xff;
1685 break;
1686 case SENSOR_HV7131R:
1687 gain[0] |= (2 << 4);
1688 gain[2] = 0x30;
1689 gain[3] = hv7131r_gain[sd->gain];
1690 break;
1691 }
1692 i2c_w(gspca_dev, gain);
1693 return 0;
1694}
1695
1696static int sd_setbrightness(struct gspca_dev *gspca_dev, s32 val)
1697{
1698 struct sd *sd = (struct sd *) gspca_dev;
1699
1700 sd->brightness = val;
1701 if (gspca_dev->streaming)
1702 return set_cmatrix(gspca_dev);
1703 return 0;
1704}
1705
1706static int sd_getbrightness(struct gspca_dev *gspca_dev, s32 *val)
1707{
1708 struct sd *sd = (struct sd *) gspca_dev;
1709 *val = sd->brightness;
1710 return 0;
1711}
1712
1713
1714static int sd_setcontrast(struct gspca_dev *gspca_dev, s32 val)
1715{
1716 struct sd *sd = (struct sd *) gspca_dev;
1717
1718 sd->contrast = val;
1719 if (gspca_dev->streaming)
1720 return set_cmatrix(gspca_dev);
1721 return 0;
1722}
1723
1724static int sd_getcontrast(struct gspca_dev *gspca_dev, s32 *val)
1725{
1726 struct sd *sd = (struct sd *) gspca_dev;
1727 *val = sd->contrast;
1728 return 0;
1729}
1730
1731static int sd_setsaturation(struct gspca_dev *gspca_dev, s32 val)
1732{
1733 struct sd *sd = (struct sd *) gspca_dev;
1734
1735 sd->saturation = val;
1736 if (gspca_dev->streaming)
1737 return set_cmatrix(gspca_dev);
1738 return 0;
1739}
1740
1741static int sd_getsaturation(struct gspca_dev *gspca_dev, s32 *val)
1742{
1743 struct sd *sd = (struct sd *) gspca_dev;
1744 *val = sd->saturation;
1745 return 0;
1746}
1747
1748static int sd_sethue(struct gspca_dev *gspca_dev, s32 val)
1749{
1750 struct sd *sd = (struct sd *) gspca_dev;
1751
1752 sd->hue = val;
1753 if (gspca_dev->streaming)
1754 return set_cmatrix(gspca_dev);
1755 return 0;
1756}
1757
1758static int sd_gethue(struct gspca_dev *gspca_dev, s32 *val)
1759{
1760 struct sd *sd = (struct sd *) gspca_dev;
1761 *val = sd->hue;
1762 return 0;
1763}
1764
1765static int sd_setgamma(struct gspca_dev *gspca_dev, s32 val)
1766{
1767 struct sd *sd = (struct sd *) gspca_dev;
1768
1769 sd->gamma = val;
1770 if (gspca_dev->streaming)
1771 return set_gamma(gspca_dev);
1772 return 0;
1773}
1774
1775static int sd_getgamma(struct gspca_dev *gspca_dev, s32 *val)
1776{
1777 struct sd *sd = (struct sd *) gspca_dev;
1778 *val = sd->gamma;
1779 return 0;
1780}
1781
1782static int sd_setredbalance(struct gspca_dev *gspca_dev, s32 val)
1783{
1784 struct sd *sd = (struct sd *) gspca_dev;
1785
1786 sd->red = val;
1787 if (gspca_dev->streaming)
1788 return set_redblue(gspca_dev);
1789 return 0;
1790}
1791
1792static int sd_getredbalance(struct gspca_dev *gspca_dev, s32 *val)
1793{
1794 struct sd *sd = (struct sd *) gspca_dev;
1795 *val = sd->red;
1796 return 0;
1797}
1798
1799static int sd_setbluebalance(struct gspca_dev *gspca_dev, s32 val)
1800{
1801 struct sd *sd = (struct sd *) gspca_dev;
1802
1803 sd->blue = val;
1804 if (gspca_dev->streaming)
1805 return set_redblue(gspca_dev);
1806 return 0;
1807}
1808
1809static int sd_getbluebalance(struct gspca_dev *gspca_dev, s32 *val)
1810{
1811 struct sd *sd = (struct sd *) gspca_dev;
1812 *val = sd->blue;
1813 return 0;
1814}
1815
1816static int sd_sethflip(struct gspca_dev *gspca_dev, s32 val)
1817{
1818 struct sd *sd = (struct sd *) gspca_dev;
1819
1820 sd->hflip = val;
1821 if (gspca_dev->streaming)
1822 return set_hvflip(gspca_dev);
1823 return 0;
1824}
1825
1826static int sd_gethflip(struct gspca_dev *gspca_dev, s32 *val)
1827{
1828 struct sd *sd = (struct sd *) gspca_dev;
1829 *val = sd->hflip;
1830 return 0;
1831}
1832
1833static int sd_setvflip(struct gspca_dev *gspca_dev, s32 val)
1834{
1835 struct sd *sd = (struct sd *) gspca_dev;
1836
1837 sd->vflip = val;
1838 if (gspca_dev->streaming)
1839 return set_hvflip(gspca_dev);
1840 return 0;
1841}
1842
1843static int sd_getvflip(struct gspca_dev *gspca_dev, s32 *val)
1844{
1845 struct sd *sd = (struct sd *) gspca_dev;
1846 *val = sd->vflip;
1847 return 0;
1848}
1849
1850static int sd_setexposure(struct gspca_dev *gspca_dev, s32 val)
1851{
1852 struct sd *sd = (struct sd *) gspca_dev;
1853
1854 sd->exposure = val;
1855 if (gspca_dev->streaming)
1856 return set_exposure(gspca_dev);
1857 return 0;
1858}
1859
1860static int sd_getexposure(struct gspca_dev *gspca_dev, s32 *val)
1861{
1862 struct sd *sd = (struct sd *) gspca_dev;
1863 *val = sd->exposure;
1864 return 0;
1865}
1866
1867static int sd_setgain(struct gspca_dev *gspca_dev, s32 val)
1868{
1869 struct sd *sd = (struct sd *) gspca_dev;
1870
1871 sd->gain = val;
1872 if (gspca_dev->streaming)
1873 return set_gain(gspca_dev);
1874 return 0;
1875}
1876
1877static int sd_getgain(struct gspca_dev *gspca_dev, s32 *val)
1878{
1879 struct sd *sd = (struct sd *) gspca_dev;
1880 *val = sd->gain;
1881 return 0;
1882}
1883
1884static int sd_setautoexposure(struct gspca_dev *gspca_dev, s32 val)
1885{
1886 struct sd *sd = (struct sd *) gspca_dev;
1887 sd->auto_exposure = val;
1888 return 0;
1889}
1890
1891static int sd_getautoexposure(struct gspca_dev *gspca_dev, s32 *val)
1892{
1893 struct sd *sd = (struct sd *) gspca_dev;
1894 *val = sd->auto_exposure;
1895 return 0;
1896}
1897
1898#ifdef CONFIG_VIDEO_ADV_DEBUG
1899static int sd_dbg_g_register(struct gspca_dev *gspca_dev,
1900 struct v4l2_dbg_register *reg)
1901{
1902 struct sd *sd = (struct sd *) gspca_dev;
1903 switch (reg->match.type) {
1904 case V4L2_CHIP_MATCH_HOST:
1905 if (reg->match.addr != 0)
1906 return -EINVAL;
1907 if (reg->reg < 0x1000 || reg->reg > 0x11ff)
1908 return -EINVAL;
1909 if (reg_r(gspca_dev, reg->reg, 1) < 0)
1910 return -EINVAL;
1911 reg->val = gspca_dev->usb_buf[0];
1912 return 0;
1913 case V4L2_CHIP_MATCH_I2C_ADDR:
1914 if (reg->match.addr != sd->i2c_addr)
1915 return -EINVAL;
1916 if (sd->sensor >= SENSOR_MT9V011 &&
1917 sd->sensor <= SENSOR_MT9M111) {
1918 if (i2c_r2(gspca_dev, reg->reg, (u16 *)&reg->val) < 0)
1919 return -EINVAL;
1920 } else {
1921 if (i2c_r1(gspca_dev, reg->reg, (u8 *)&reg->val) < 0)
1922 return -EINVAL;
1923 }
1924 return 0;
1925 }
1926 return -EINVAL;
1927}
1928
1929static int sd_dbg_s_register(struct gspca_dev *gspca_dev,
1930 struct v4l2_dbg_register *reg)
1931{
1932 struct sd *sd = (struct sd *) gspca_dev;
1933 switch (reg->match.type) {
1934 case V4L2_CHIP_MATCH_HOST:
1935 if (reg->match.addr != 0)
1936 return -EINVAL;
1937 if (reg->reg < 0x1000 || reg->reg > 0x11ff)
1938 return -EINVAL;
1939 if (reg_w1(gspca_dev, reg->reg, reg->val) < 0)
1940 return -EINVAL;
1941 return 0;
1942 case V4L2_CHIP_MATCH_I2C_ADDR:
1943 if (reg->match.addr != sd->i2c_addr)
1944 return -EINVAL;
1945 if (sd->sensor >= SENSOR_MT9V011 &&
1946 sd->sensor <= SENSOR_MT9M111) {
1947 if (i2c_w2(gspca_dev, reg->reg, reg->val) < 0)
1948 return -EINVAL;
1949 } else {
1950 if (i2c_w1(gspca_dev, reg->reg, reg->val) < 0)
1951 return -EINVAL;
1952 }
1953 return 0;
1954 }
1955 return -EINVAL;
1956}
1957#endif
1958
1959static int sd_chip_ident(struct gspca_dev *gspca_dev,
1960 struct v4l2_dbg_chip_ident *chip)
1961{
1962 struct sd *sd = (struct sd *) gspca_dev;
1963
1964 switch (chip->match.type) {
1965 case V4L2_CHIP_MATCH_HOST:
1966 if (chip->match.addr != 0)
1967 return -EINVAL;
1968 chip->revision = 0;
1969 chip->ident = V4L2_IDENT_SN9C20X;
1970 return 0;
1971 case V4L2_CHIP_MATCH_I2C_ADDR:
1972 if (chip->match.addr != sd->i2c_addr)
1973 return -EINVAL;
1974 chip->revision = 0;
1975 chip->ident = i2c_ident[sd->sensor];
1976 return 0;
1977 }
1978 return -EINVAL;
1979}
1980
1981static int sd_config(struct gspca_dev *gspca_dev,
1982 const struct usb_device_id *id)
1983{
1984 struct sd *sd = (struct sd *) gspca_dev;
1985 struct cam *cam;
1986
1987 cam = &gspca_dev->cam;
1988
1989 sd->sensor = (id->driver_info >> 8) & 0xff;
1990 sd->i2c_addr = id->driver_info & 0xff;
1991
1992 switch (sd->sensor) {
1993 case SENSOR_OV9650:
1994 cam->cam_mode = sxga_mode;
1995 cam->nmodes = ARRAY_SIZE(sxga_mode);
1996 break;
1997 default:
1998 cam->cam_mode = vga_mode;
1999 cam->nmodes = ARRAY_SIZE(vga_mode);
2000 }
2001
2002 sd->old_step = 0;
2003 sd->older_step = 0;
2004 sd->exposure_step = 16;
2005
2006 sd->brightness = BRIGHTNESS_DEFAULT;
2007 sd->contrast = CONTRAST_DEFAULT;
2008 sd->saturation = SATURATION_DEFAULT;
2009 sd->hue = HUE_DEFAULT;
2010 sd->gamma = GAMMA_DEFAULT;
2011 sd->red = RED_DEFAULT;
2012 sd->blue = BLUE_DEFAULT;
2013
2014 sd->hflip = HFLIP_DEFAULT;
2015 sd->vflip = VFLIP_DEFAULT;
2016 sd->exposure = EXPOSURE_DEFAULT;
2017 sd->gain = GAIN_DEFAULT;
2018 sd->auto_exposure = AUTO_EXPOSURE_DEFAULT;
2019
2020 sd->quality = 95;
2021
2022#ifdef CONFIG_USB_GSPCA_SN9C20X_EVDEV
2023 sd->input_gpio = (id->driver_info >> 16) & 0xff;
2024 if (sn9c20x_input_init(gspca_dev) < 0)
2025 return -ENODEV;
2026#endif
2027 return 0;
2028}
2029
2030static int sd_init(struct gspca_dev *gspca_dev)
2031{
2032 struct sd *sd = (struct sd *) gspca_dev;
2033 int i;
2034 u8 value;
2035 u8 i2c_init[9] =
2036 {0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03};
2037
2038 for (i = 0; i < ARRAY_SIZE(bridge_init); i++) {
2039 value = bridge_init[i][1];
2040 if (reg_w(gspca_dev, bridge_init[i][0], &value, 1) < 0) {
2041 err("Device initialization failed");
2042 return -ENODEV;
2043 }
2044 }
2045
2046 if (reg_w(gspca_dev, 0x10c0, i2c_init, 9) < 0) {
2047 err("Device initialization failed");
2048 return -ENODEV;
2049 }
2050
2051 switch (sd->sensor) {
2052 case SENSOR_OV9650:
2053 if (ov9650_init_sensor(gspca_dev) < 0)
2054 return -ENODEV;
2055 info("OV9650 sensor detected");
2056 break;
2057 case SENSOR_OV9655:
2058 if (ov9655_init_sensor(gspca_dev) < 0)
2059 return -ENODEV;
2060 info("OV9655 sensor detected");
2061 break;
2062 case SENSOR_SOI968:
2063 if (soi968_init_sensor(gspca_dev) < 0)
2064 return -ENODEV;
2065 info("SOI968 sensor detected");
2066 break;
2067 case SENSOR_OV7660:
2068 if (ov7660_init_sensor(gspca_dev) < 0)
2069 return -ENODEV;
2070 info("OV7660 sensor detected");
2071 break;
2072 case SENSOR_OV7670:
2073 if (ov7670_init_sensor(gspca_dev) < 0)
2074 return -ENODEV;
2075 info("OV7670 sensor detected");
2076 break;
2077 case SENSOR_MT9VPRB:
2078 if (mt9v_init_sensor(gspca_dev) < 0)
2079 return -ENODEV;
2080 break;
2081 case SENSOR_MT9M111:
2082 if (mt9m111_init_sensor(gspca_dev) < 0)
2083 return -ENODEV;
2084 info("MT9M111 sensor detected");
2085 break;
2086 case SENSOR_MT9M001:
2087 if (mt9m001_init_sensor(gspca_dev) < 0)
2088 return -ENODEV;
2089 info("MT9M001 sensor detected");
2090 break;
2091 case SENSOR_HV7131R:
2092 if (hv7131r_init_sensor(gspca_dev) < 0)
2093 return -ENODEV;
2094 info("HV7131R sensor detected");
2095 break;
2096 default:
2097 info("Unsupported Sensor");
2098 return -ENODEV;
2099 }
2100
2101 return 0;
2102}
2103
2104static void configure_sensor_output(struct gspca_dev *gspca_dev, int mode)
2105{
2106 struct sd *sd = (struct sd *) gspca_dev;
2107 u8 value;
2108 switch (sd->sensor) {
2109 case SENSOR_OV9650:
2110 if (mode & MODE_SXGA) {
2111 i2c_w1(gspca_dev, 0x17, 0x1b);
2112 i2c_w1(gspca_dev, 0x18, 0xbc);
2113 i2c_w1(gspca_dev, 0x19, 0x01);
2114 i2c_w1(gspca_dev, 0x1a, 0x82);
2115 i2c_r1(gspca_dev, 0x12, &value);
2116 i2c_w1(gspca_dev, 0x12, value & 0x07);
2117 } else {
2118 i2c_w1(gspca_dev, 0x17, 0x24);
2119 i2c_w1(gspca_dev, 0x18, 0xc5);
2120 i2c_w1(gspca_dev, 0x19, 0x00);
2121 i2c_w1(gspca_dev, 0x1a, 0x3c);
2122 i2c_r1(gspca_dev, 0x12, &value);
2123 i2c_w1(gspca_dev, 0x12, (value & 0x7) | 0x40);
2124 }
2125 break;
2126 }
2127}
2128
2129#define HW_WIN(mode, hstart, vstart) \
2130((const u8 []){hstart & 0xff, hstart >> 8, \
2131vstart & 0xff, vstart >> 8, \
2132(mode & MODE_SXGA ? 1280 >> 4 : 640 >> 4), \
2133(mode & MODE_SXGA ? 1024 >> 3 : 480 >> 3)})
2134
2135#define CLR_WIN(width, height) \
2136((const u8 [])\
2137{0, width >> 2, 0, height >> 1,\
2138((width >> 10) & 0x01) | ((height >> 8) & 0x6)})
2139
2140static int sd_start(struct gspca_dev *gspca_dev)
2141{
2142 struct sd *sd = (struct sd *) gspca_dev;
2143 int mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv;
2144 int width = gspca_dev->width;
2145 int height = gspca_dev->height;
2146 u8 fmt, scale = 0;
2147
2148 sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL);
2149 if (sd->jpeg_hdr == NULL)
2150 return -ENOMEM;
2151
2152 jpeg_define(sd->jpeg_hdr, height, width,
2153 0x21);
2154 jpeg_set_qual(sd->jpeg_hdr, sd->quality);
2155
2156 if (mode & MODE_RAW)
2157 fmt = 0x2d;
2158 else if (mode & MODE_JPEG)
2159 fmt = 0x2c;
2160 else
2161 fmt = 0x2f;
2162
2163 switch (mode & 0x0f) {
2164 case 3:
2165 scale = 0xc0;
2166 info("Set 1280x1024");
2167 break;
2168 case 2:
2169 scale = 0x80;
2170 info("Set 640x480");
2171 break;
2172 case 1:
2173 scale = 0x90;
2174 info("Set 320x240");
2175 break;
2176 case 0:
2177 scale = 0xa0;
2178 info("Set 160x120");
2179 break;
2180 }
2181
2182 configure_sensor_output(gspca_dev, mode);
2183 reg_w(gspca_dev, 0x1100, sd->jpeg_hdr + JPEG_QT0_OFFSET, 64);
2184 reg_w(gspca_dev, 0x1140, sd->jpeg_hdr + JPEG_QT1_OFFSET, 64);
2185 reg_w(gspca_dev, 0x10fb, CLR_WIN(width, height), 5);
2186 reg_w(gspca_dev, 0x1180, HW_WIN(mode, sd->hstart, sd->vstart), 6);
2187 reg_w1(gspca_dev, 0x1189, scale);
2188 reg_w1(gspca_dev, 0x10e0, fmt);
2189
2190 set_cmatrix(gspca_dev);
2191 set_gamma(gspca_dev);
2192 set_redblue(gspca_dev);
2193 set_gain(gspca_dev);
2194 set_exposure(gspca_dev);
2195 set_hvflip(gspca_dev);
2196
2197 reg_r(gspca_dev, 0x1061, 1);
2198 reg_w1(gspca_dev, 0x1061, gspca_dev->usb_buf[0] | 0x02);
2199 return 0;
2200}
2201
2202static void sd_stopN(struct gspca_dev *gspca_dev)
2203{
2204 reg_r(gspca_dev, 0x1061, 1);
2205 reg_w1(gspca_dev, 0x1061, gspca_dev->usb_buf[0] & ~0x02);
2206}
2207
2208static void sd_stop0(struct gspca_dev *gspca_dev)
2209{
2210 struct sd *sd = (struct sd *) gspca_dev;
2211 kfree(sd->jpeg_hdr);
2212}
2213
2214static void do_autoexposure(struct gspca_dev *gspca_dev)
2215{
2216 struct sd *sd = (struct sd *) gspca_dev;
2217 int avg_lum, new_exp;
2218
2219 if (!sd->auto_exposure)
2220 return;
2221
2222 avg_lum = atomic_read(&sd->avg_lum);
2223
2224 /*
2225 * some hardcoded values are present
2226 * like those for maximal/minimal exposure
2227 * and exposure steps
2228 */
2229 if (avg_lum < MIN_AVG_LUM) {
2230 if (sd->exposure > 0x1770)
2231 return;
2232
2233 new_exp = sd->exposure + sd->exposure_step;
2234 if (new_exp > 0x1770)
2235 new_exp = 0x1770;
2236 if (new_exp < 0x10)
2237 new_exp = 0x10;
2238 sd->exposure = new_exp;
2239 set_exposure(gspca_dev);
2240
2241 sd->older_step = sd->old_step;
2242 sd->old_step = 1;
2243
2244 if (sd->old_step ^ sd->older_step)
2245 sd->exposure_step /= 2;
2246 else
2247 sd->exposure_step += 2;
2248 }
2249 if (avg_lum > MAX_AVG_LUM) {
2250 if (sd->exposure < 0x10)
2251 return;
2252 new_exp = sd->exposure - sd->exposure_step;
2253 if (new_exp > 0x1700)
2254 new_exp = 0x1770;
2255 if (new_exp < 0x10)
2256 new_exp = 0x10;
2257 sd->exposure = new_exp;
2258 set_exposure(gspca_dev);
2259 sd->older_step = sd->old_step;
2260 sd->old_step = 0;
2261
2262 if (sd->old_step ^ sd->older_step)
2263 sd->exposure_step /= 2;
2264 else
2265 sd->exposure_step += 2;
2266 }
2267}
2268
2269static void sd_pkt_scan(struct gspca_dev *gspca_dev,
2270 struct gspca_frame *frame, /* target */
2271 u8 *data, /* isoc packet */
2272 int len) /* iso packet length */
2273{
2274 struct sd *sd = (struct sd *) gspca_dev;
2275 int avg_lum;
2276 static unsigned char frame_header[] =
2277 {0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96};
2278 if (len == 64 && memcmp(data, frame_header, 6) == 0) {
2279 avg_lum = ((data[35] >> 2) & 3) |
2280 (data[20] << 2) |
2281 (data[19] << 10);
2282 avg_lum += ((data[35] >> 4) & 3) |
2283 (data[22] << 2) |
2284 (data[21] << 10);
2285 avg_lum += ((data[35] >> 6) & 3) |
2286 (data[24] << 2) |
2287 (data[23] << 10);
2288 avg_lum += (data[36] & 3) |
2289 (data[26] << 2) |
2290 (data[25] << 10);
2291 avg_lum += ((data[36] >> 2) & 3) |
2292 (data[28] << 2) |
2293 (data[27] << 10);
2294 avg_lum += ((data[36] >> 4) & 3) |
2295 (data[30] << 2) |
2296 (data[29] << 10);
2297 avg_lum += ((data[36] >> 6) & 3) |
2298 (data[32] << 2) |
2299 (data[31] << 10);
2300 avg_lum += ((data[44] >> 4) & 3) |
2301 (data[34] << 2) |
2302 (data[33] << 10);
2303 avg_lum >>= 9;
2304 atomic_set(&sd->avg_lum, avg_lum);
2305 gspca_frame_add(gspca_dev, LAST_PACKET,
2306 frame, data, len);
2307 return;
2308 }
2309 if (gspca_dev->last_packet_type == LAST_PACKET) {
2310 if (gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv
2311 & MODE_JPEG) {
2312 gspca_frame_add(gspca_dev, FIRST_PACKET, frame,
2313 sd->jpeg_hdr, JPEG_HDR_SZ);
2314 gspca_frame_add(gspca_dev, INTER_PACKET, frame,
2315 data, len);
2316 } else {
2317 gspca_frame_add(gspca_dev, FIRST_PACKET, frame,
2318 data, len);
2319 }
2320 } else {
2321 gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len);
2322 }
2323}
2324
2325/* sub-driver description */
2326static const struct sd_desc sd_desc = {
2327 .name = MODULE_NAME,
2328 .ctrls = sd_ctrls,
2329 .nctrls = ARRAY_SIZE(sd_ctrls),
2330 .config = sd_config,
2331 .init = sd_init,
2332 .start = sd_start,
2333 .stopN = sd_stopN,
2334 .stop0 = sd_stop0,
2335 .pkt_scan = sd_pkt_scan,
2336 .dq_callback = do_autoexposure,
2337#ifdef CONFIG_VIDEO_ADV_DEBUG
2338 .set_register = sd_dbg_s_register,
2339 .get_register = sd_dbg_g_register,
2340#endif
2341 .get_chip_ident = sd_chip_ident,
2342};
2343
2344#define SN9C20X(sensor, i2c_addr, button_mask) \
2345 .driver_info = (button_mask << 16) \
2346 | (SENSOR_ ## sensor << 8) \
2347 | (i2c_addr)
2348
2349static const __devinitdata struct usb_device_id device_table[] = {
2350 {USB_DEVICE(0x0c45, 0x6240), SN9C20X(MT9M001, 0x5d, 0)},
2351 {USB_DEVICE(0x0c45, 0x6242), SN9C20X(MT9M111, 0x5d, 0)},
2352 {USB_DEVICE(0x0c45, 0x6248), SN9C20X(OV9655, 0x30, 0)},
2353 {USB_DEVICE(0x0c45, 0x624e), SN9C20X(SOI968, 0x30, 0x10)},
2354 {USB_DEVICE(0x0c45, 0x624f), SN9C20X(OV9650, 0x30, 0)},
2355 {USB_DEVICE(0x0c45, 0x6251), SN9C20X(OV9650, 0x30, 0)},
2356 {USB_DEVICE(0x0c45, 0x6253), SN9C20X(OV9650, 0x30, 0)},
2357 {USB_DEVICE(0x0c45, 0x6260), SN9C20X(OV7670, 0x21, 0)},
2358 {USB_DEVICE(0x0c45, 0x6270), SN9C20X(MT9VPRB, 0x00, 0)},
2359 {USB_DEVICE(0x0c45, 0x627b), SN9C20X(OV7660, 0x21, 0)},
2360 {USB_DEVICE(0x0c45, 0x627c), SN9C20X(HV7131R, 0x11, 0)},
2361 {USB_DEVICE(0x0c45, 0x627f), SN9C20X(OV9650, 0x30, 0)},
2362 {USB_DEVICE(0x0c45, 0x6280), SN9C20X(MT9M001, 0x5d, 0)},
2363 {USB_DEVICE(0x0c45, 0x6282), SN9C20X(MT9M111, 0x5d, 0)},
2364 {USB_DEVICE(0x0c45, 0x6288), SN9C20X(OV9655, 0x30, 0)},
2365 {USB_DEVICE(0x0c45, 0x628e), SN9C20X(SOI968, 0x30, 0)},
2366 {USB_DEVICE(0x0c45, 0x628f), SN9C20X(OV9650, 0x30, 0)},
2367 {USB_DEVICE(0x0c45, 0x62a0), SN9C20X(OV7670, 0x21, 0)},
2368 {USB_DEVICE(0x0c45, 0x62b0), SN9C20X(MT9VPRB, 0x00, 0)},
2369 {USB_DEVICE(0x0c45, 0x62b3), SN9C20X(OV9655, 0x30, 0)},
2370 {USB_DEVICE(0x0c45, 0x62bb), SN9C20X(OV7660, 0x21, 0)},
2371 {USB_DEVICE(0x0c45, 0x62bc), SN9C20X(HV7131R, 0x11, 0)},
2372 {USB_DEVICE(0x045e, 0x00f4), SN9C20X(OV9650, 0x30, 0)},
2373 {USB_DEVICE(0x145f, 0x013d), SN9C20X(OV7660, 0x21, 0)},
2374 {USB_DEVICE(0x0458, 0x7029), SN9C20X(HV7131R, 0x11, 0)},
2375 {USB_DEVICE(0xa168, 0x0610), SN9C20X(HV7131R, 0x11, 0)},
2376 {USB_DEVICE(0xa168, 0x0611), SN9C20X(HV7131R, 0x11, 0)},
2377 {USB_DEVICE(0xa168, 0x0613), SN9C20X(HV7131R, 0x11, 0)},
2378 {USB_DEVICE(0xa168, 0x0618), SN9C20X(HV7131R, 0x11, 0)},
2379 {USB_DEVICE(0xa168, 0x0614), SN9C20X(MT9M111, 0x5d, 0)},
2380 {USB_DEVICE(0xa168, 0x0615), SN9C20X(MT9M111, 0x5d, 0)},
2381 {USB_DEVICE(0xa168, 0x0617), SN9C20X(MT9M111, 0x5d, 0)},
2382 {}
2383};
2384MODULE_DEVICE_TABLE(usb, device_table);
2385
2386/* -- device connect -- */
2387static int sd_probe(struct usb_interface *intf,
2388 const struct usb_device_id *id)
2389{
2390 return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
2391 THIS_MODULE);
2392}
2393
2394static void sd_disconnect(struct usb_interface *intf)
2395{
2396#ifdef CONFIG_USB_GSPCA_SN9C20X_EVDEV
2397 struct gspca_dev *gspca_dev = usb_get_intfdata(intf);
2398
2399 sn9c20x_input_cleanup(gspca_dev);
2400#endif
2401
2402 gspca_disconnect(intf);
2403}
2404
2405static struct usb_driver sd_driver = {
2406 .name = MODULE_NAME,
2407 .id_table = device_table,
2408 .probe = sd_probe,
2409 .disconnect = sd_disconnect,
2410#ifdef CONFIG_PM
2411 .suspend = gspca_suspend,
2412 .resume = gspca_resume,
2413 .reset_resume = gspca_resume,
2414#endif
2415};
2416
2417/* -- module insert / remove -- */
2418static int __init sd_mod_init(void)
2419{
2420 int ret;
2421 ret = usb_register(&sd_driver);
2422 if (ret < 0)
2423 return ret;
2424 info("registered");
2425 return 0;
2426}
2427static void __exit sd_mod_exit(void)
2428{
2429 usb_deregister(&sd_driver);
2430 info("deregistered");
2431}
2432
2433module_init(sd_mod_init);
2434module_exit(sd_mod_exit);
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c
index 0d02f41fa7d..d6332ab8066 100644
--- a/drivers/media/video/gspca/sonixj.c
+++ b/drivers/media/video/gspca/sonixj.c
@@ -1634,6 +1634,8 @@ static void setfreq(struct gspca_dev *gspca_dev)
1634{ 1634{
1635 struct sd *sd = (struct sd *) gspca_dev; 1635 struct sd *sd = (struct sd *) gspca_dev;
1636 1636
1637 if (gspca_dev->ctrl_dis & (1 << FREQ_IDX))
1638 return;
1637 if (sd->sensor == SENSOR_OV7660) { 1639 if (sd->sensor == SENSOR_OV7660) {
1638 switch (sd->freq) { 1640 switch (sd->freq) {
1639 case 0: /* Banding filter disabled */ 1641 case 0: /* Banding filter disabled */
@@ -1735,6 +1737,8 @@ static int sd_start(struct gspca_dev *gspca_dev)
1735 1737
1736 /* create the JPEG header */ 1738 /* create the JPEG header */
1737 sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL); 1739 sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL);
1740 if (!sd->jpeg_hdr)
1741 return -ENOMEM;
1738 jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width, 1742 jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width,
1739 0x21); /* JPEG 422 */ 1743 0x21); /* JPEG 422 */
1740 jpeg_set_qual(sd->jpeg_hdr, sd->quality); 1744 jpeg_set_qual(sd->jpeg_hdr, sd->quality);
diff --git a/drivers/media/video/gspca/spca500.c b/drivers/media/video/gspca/spca500.c
index 8806b2ff82b..fab7ef85a6c 100644
--- a/drivers/media/video/gspca/spca500.c
+++ b/drivers/media/video/gspca/spca500.c
@@ -670,6 +670,8 @@ static int sd_start(struct gspca_dev *gspca_dev)
670 670
671 /* create the JPEG header */ 671 /* create the JPEG header */
672 sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL); 672 sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL);
673 if (!sd->jpeg_hdr)
674 return -ENOMEM;
673 jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width, 675 jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width,
674 0x22); /* JPEG 411 */ 676 0x22); /* JPEG 411 */
675 jpeg_set_qual(sd->jpeg_hdr, sd->quality); 677 jpeg_set_qual(sd->jpeg_hdr, sd->quality);
diff --git a/drivers/media/video/gspca/stk014.c b/drivers/media/video/gspca/stk014.c
index f25be20cf1a..47628964801 100644
--- a/drivers/media/video/gspca/stk014.c
+++ b/drivers/media/video/gspca/stk014.c
@@ -333,6 +333,8 @@ static int sd_start(struct gspca_dev *gspca_dev)
333 333
334 /* create the JPEG header */ 334 /* create the JPEG header */
335 sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL); 335 sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL);
336 if (!sd->jpeg_hdr)
337 return -ENOMEM;
336 jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width, 338 jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width,
337 0x22); /* JPEG 411 */ 339 0x22); /* JPEG 411 */
338 jpeg_set_qual(sd->jpeg_hdr, sd->quality); 340 jpeg_set_qual(sd->jpeg_hdr, sd->quality);
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
index 3039ec208f3..e5024c8496e 100644
--- a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
+++ b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
@@ -64,7 +64,7 @@ static struct v4l2_pix_format hdcs1x00_mode[] = {
64 { 64 {
65 HDCS_1X00_DEF_WIDTH, 65 HDCS_1X00_DEF_WIDTH,
66 HDCS_1X00_DEF_HEIGHT, 66 HDCS_1X00_DEF_HEIGHT,
67 V4L2_PIX_FMT_SBGGR8, 67 V4L2_PIX_FMT_SGRBG8,
68 V4L2_FIELD_NONE, 68 V4L2_FIELD_NONE,
69 .sizeimage = 69 .sizeimage =
70 HDCS_1X00_DEF_WIDTH * HDCS_1X00_DEF_HEIGHT, 70 HDCS_1X00_DEF_WIDTH * HDCS_1X00_DEF_HEIGHT,
@@ -80,7 +80,7 @@ static struct v4l2_pix_format hdcs1020_mode[] = {
80 { 80 {
81 HDCS_1020_DEF_WIDTH, 81 HDCS_1020_DEF_WIDTH,
82 HDCS_1020_DEF_HEIGHT, 82 HDCS_1020_DEF_HEIGHT,
83 V4L2_PIX_FMT_SBGGR8, 83 V4L2_PIX_FMT_SGRBG8,
84 V4L2_FIELD_NONE, 84 V4L2_FIELD_NONE,
85 .sizeimage = 85 .sizeimage =
86 HDCS_1020_DEF_WIDTH * HDCS_1020_DEF_HEIGHT, 86 HDCS_1020_DEF_WIDTH * HDCS_1020_DEF_HEIGHT,
@@ -131,9 +131,11 @@ static int hdcs_reg_write_seq(struct sd *sd, u8 reg, u8 *vals, u8 len)
131 (reg + len > 0xff))) 131 (reg + len > 0xff)))
132 return -EINVAL; 132 return -EINVAL;
133 133
134 for (i = 0; i < len; i++, reg++) { 134 for (i = 0; i < len; i++) {
135 regs[2*i] = reg; 135 regs[2 * i] = reg;
136 regs[2*i+1] = vals[i]; 136 regs[2 * i + 1] = vals[i];
137 /* All addresses are shifted left one bit as bit 0 toggles r/w */
138 reg += 2;
137 } 139 }
138 140
139 return stv06xx_write_sensor_bytes(sd, regs, len); 141 return stv06xx_write_sensor_bytes(sd, regs, len);
@@ -174,7 +176,9 @@ static int hdcs_set_state(struct sd *sd, enum hdcs_power_state state)
174 } 176 }
175 177
176 ret = stv06xx_write_sensor(sd, HDCS_REG_CONTROL(sd), val); 178 ret = stv06xx_write_sensor(sd, HDCS_REG_CONTROL(sd), val);
177 if (ret < 0) 179
180 /* Update the state if the write succeeded */
181 if (!ret)
178 hdcs->state = state; 182 hdcs->state = state;
179 183
180 return ret; 184 return ret;
diff --git a/drivers/media/video/gspca/sunplus.c b/drivers/media/video/gspca/sunplus.c
index 9623f294bda..5127bbf9dd2 100644
--- a/drivers/media/video/gspca/sunplus.c
+++ b/drivers/media/video/gspca/sunplus.c
@@ -973,6 +973,8 @@ static int sd_start(struct gspca_dev *gspca_dev)
973 973
974 /* create the JPEG header */ 974 /* create the JPEG header */
975 sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL); 975 sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL);
976 if (!sd->jpeg_hdr)
977 return -ENOMEM;
976 jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width, 978 jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width,
977 0x22); /* JPEG 411 */ 979 0x22); /* JPEG 411 */
978 jpeg_set_qual(sd->jpeg_hdr, sd->quality); 980 jpeg_set_qual(sd->jpeg_hdr, sd->quality);
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c
index 08422d315e6..3d2756f7874 100644
--- a/drivers/media/video/gspca/zc3xx.c
+++ b/drivers/media/video/gspca/zc3xx.c
@@ -7243,6 +7243,8 @@ static int sd_start(struct gspca_dev *gspca_dev)
7243 7243
7244 /* create the JPEG header */ 7244 /* create the JPEG header */
7245 sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL); 7245 sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL);
7246 if (!sd->jpeg_hdr)
7247 return -ENOMEM;
7246 jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width, 7248 jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width,
7247 0x21); /* JPEG 422 */ 7249 0x21); /* JPEG 422 */
7248 jpeg_set_qual(sd->jpeg_hdr, sd->quality); 7250 jpeg_set_qual(sd->jpeg_hdr, sd->quality);
diff --git a/drivers/media/video/mt9v011.c b/drivers/media/video/mt9v011.c
index 1fe8fc9183a..b2260de645f 100644
--- a/drivers/media/video/mt9v011.c
+++ b/drivers/media/video/mt9v011.c
@@ -8,6 +8,7 @@
8#include <linux/i2c.h> 8#include <linux/i2c.h>
9#include <linux/videodev2.h> 9#include <linux/videodev2.h>
10#include <linux/delay.h> 10#include <linux/delay.h>
11#include <asm/div64.h>
11#include <media/v4l2-device.h> 12#include <media/v4l2-device.h>
12#include "mt9v011.h" 13#include "mt9v011.h"
13#include <media/v4l2-i2c-drv.h> 14#include <media/v4l2-i2c-drv.h>
@@ -57,6 +58,7 @@ static struct v4l2_queryctrl mt9v011_qctrl[] = {
57struct mt9v011 { 58struct mt9v011 {
58 struct v4l2_subdev sd; 59 struct v4l2_subdev sd;
59 unsigned width, height; 60 unsigned width, height;
61 unsigned xtal;
60 62
61 u16 global_gain, red_bal, blue_bal; 63 u16 global_gain, red_bal, blue_bal;
62}; 64};
@@ -131,7 +133,7 @@ static const struct i2c_reg_value mt9v011_init_default[] = {
131 { R1E_MT9V011_DIGITAL_ZOOM, 0x0000 }, 133 { R1E_MT9V011_DIGITAL_ZOOM, 0x0000 },
132 { R20_MT9V011_READ_MODE, 0x1000 }, 134 { R20_MT9V011_READ_MODE, 0x1000 },
133 135
134 { R07_MT9V011_OUT_CTRL, 0x000a }, /* chip enable */ 136 { R07_MT9V011_OUT_CTRL, 0x0002 }, /* chip enable */
135}; 137};
136 138
137static void set_balance(struct v4l2_subdev *sd) 139static void set_balance(struct v4l2_subdev *sd)
@@ -154,6 +156,31 @@ static void set_balance(struct v4l2_subdev *sd)
154 mt9v011_write(sd, R2D_MT9V011_RED_GAIN, red_gain); 156 mt9v011_write(sd, R2D_MT9V011_RED_GAIN, red_gain);
155} 157}
156 158
159static void calc_fps(struct v4l2_subdev *sd)
160{
161 struct mt9v011 *core = to_mt9v011(sd);
162 unsigned height, width, hblank, vblank, speed;
163 unsigned row_time, t_time;
164 u64 frames_per_ms;
165 unsigned tmp;
166
167 height = mt9v011_read(sd, R03_MT9V011_HEIGHT);
168 width = mt9v011_read(sd, R04_MT9V011_WIDTH);
169 hblank = mt9v011_read(sd, R05_MT9V011_HBLANK);
170 vblank = mt9v011_read(sd, R06_MT9V011_VBLANK);
171 speed = mt9v011_read(sd, R0A_MT9V011_CLK_SPEED);
172
173 row_time = (width + 113 + hblank) * (speed + 2);
174 t_time = row_time * (height + vblank + 1);
175
176 frames_per_ms = core->xtal * 1000l;
177 do_div(frames_per_ms, t_time);
178 tmp = frames_per_ms;
179
180 v4l2_dbg(1, debug, sd, "Programmed to %u.%03u fps (%d pixel clcks)\n",
181 tmp / 1000, tmp % 1000, t_time);
182}
183
157static void set_res(struct v4l2_subdev *sd) 184static void set_res(struct v4l2_subdev *sd)
158{ 185{
159 struct mt9v011 *core = to_mt9v011(sd); 186 struct mt9v011 *core = to_mt9v011(sd);
@@ -175,10 +202,12 @@ static void set_res(struct v4l2_subdev *sd)
175 mt9v011_write(sd, R04_MT9V011_WIDTH, core->width); 202 mt9v011_write(sd, R04_MT9V011_WIDTH, core->width);
176 mt9v011_write(sd, R05_MT9V011_HBLANK, 771 - core->width); 203 mt9v011_write(sd, R05_MT9V011_HBLANK, 771 - core->width);
177 204
178 vstart = 8 + (640 - core->height) / 2; 205 vstart = 8 + (480 - core->height) / 2;
179 mt9v011_write(sd, R01_MT9V011_ROWSTART, vstart); 206 mt9v011_write(sd, R01_MT9V011_ROWSTART, vstart);
180 mt9v011_write(sd, R03_MT9V011_HEIGHT, core->height); 207 mt9v011_write(sd, R03_MT9V011_HEIGHT, core->height);
181 mt9v011_write(sd, R06_MT9V011_VBLANK, 508 - core->height); 208 mt9v011_write(sd, R06_MT9V011_VBLANK, 508 - core->height);
209
210 calc_fps(sd);
182}; 211};
183 212
184static int mt9v011_reset(struct v4l2_subdev *sd, u32 val) 213static int mt9v011_reset(struct v4l2_subdev *sd, u32 val)
@@ -215,6 +244,23 @@ static int mt9v011_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
215 return -EINVAL; 244 return -EINVAL;
216} 245}
217 246
247static int mt9v011_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc)
248{
249 int i;
250
251 v4l2_dbg(1, debug, sd, "queryctrl called\n");
252
253 for (i = 0; i < ARRAY_SIZE(mt9v011_qctrl); i++)
254 if (qc->id && qc->id == mt9v011_qctrl[i].id) {
255 memcpy(qc, &(mt9v011_qctrl[i]),
256 sizeof(*qc));
257 return 0;
258 }
259
260 return -EINVAL;
261}
262
263
218static int mt9v011_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) 264static int mt9v011_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
219{ 265{
220 struct mt9v011 *core = to_mt9v011(sd); 266 struct mt9v011 *core = to_mt9v011(sd);
@@ -294,6 +340,22 @@ static int mt9v011_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt)
294 return 0; 340 return 0;
295} 341}
296 342
343static int mt9v011_s_config(struct v4l2_subdev *sd, int dumb, void *data)
344{
345 struct mt9v011 *core = to_mt9v011(sd);
346 unsigned *xtal = data;
347
348 v4l2_dbg(1, debug, sd, "s_config called\n");
349
350 if (xtal) {
351 core->xtal = *xtal;
352 v4l2_dbg(1, debug, sd, "xtal set to %d.%03d MHz\n",
353 *xtal / 1000000, (*xtal / 1000) % 1000);
354 }
355
356 return 0;
357}
358
297 359
298#ifdef CONFIG_VIDEO_ADV_DEBUG 360#ifdef CONFIG_VIDEO_ADV_DEBUG
299static int mt9v011_g_register(struct v4l2_subdev *sd, 361static int mt9v011_g_register(struct v4l2_subdev *sd,
@@ -338,9 +400,11 @@ static int mt9v011_g_chip_ident(struct v4l2_subdev *sd,
338} 400}
339 401
340static const struct v4l2_subdev_core_ops mt9v011_core_ops = { 402static const struct v4l2_subdev_core_ops mt9v011_core_ops = {
403 .queryctrl = mt9v011_queryctrl,
341 .g_ctrl = mt9v011_g_ctrl, 404 .g_ctrl = mt9v011_g_ctrl,
342 .s_ctrl = mt9v011_s_ctrl, 405 .s_ctrl = mt9v011_s_ctrl,
343 .reset = mt9v011_reset, 406 .reset = mt9v011_reset,
407 .s_config = mt9v011_s_config,
344 .g_chip_ident = mt9v011_g_chip_ident, 408 .g_chip_ident = mt9v011_g_chip_ident,
345#ifdef CONFIG_VIDEO_ADV_DEBUG 409#ifdef CONFIG_VIDEO_ADV_DEBUG
346 .g_register = mt9v011_g_register, 410 .g_register = mt9v011_g_register,
@@ -395,6 +459,7 @@ static int mt9v011_probe(struct i2c_client *c,
395 core->global_gain = 0x0024; 459 core->global_gain = 0x0024;
396 core->width = 640; 460 core->width = 640;
397 core->height = 480; 461 core->height = 480;
462 core->xtal = 27000000; /* Hz */
398 463
399 v4l_info(c, "chip found @ 0x%02x (%s)\n", 464 v4l_info(c, "chip found @ 0x%02x (%s)\n",
400 c->addr << 1, c->adapter->name); 465 c->addr << 1, c->adapter->name);
diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
index bae61b22501..7d430835655 100644
--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -180,14 +180,9 @@ static struct completion irq_event;
180static int twl4030_irq_thread(void *data) 180static int twl4030_irq_thread(void *data)
181{ 181{
182 long irq = (long)data; 182 long irq = (long)data;
183 struct irq_desc *desc = irq_to_desc(irq);
184 static unsigned i2c_errors; 183 static unsigned i2c_errors;
185 static const unsigned max_i2c_errors = 100; 184 static const unsigned max_i2c_errors = 100;
186 185
187 if (!desc) {
188 pr_err("twl4030: Invalid IRQ: %ld\n", irq);
189 return -EINVAL;
190 }
191 186
192 current->flags |= PF_NOFREEZE; 187 current->flags |= PF_NOFREEZE;
193 188
@@ -240,7 +235,7 @@ static int twl4030_irq_thread(void *data)
240 } 235 }
241 local_irq_enable(); 236 local_irq_enable();
242 237
243 desc->chip->unmask(irq); 238 enable_irq(irq);
244 } 239 }
245 240
246 return 0; 241 return 0;
@@ -255,25 +250,13 @@ static int twl4030_irq_thread(void *data)
255 * thread. All we do here is acknowledge and mask the interrupt and wakeup 250 * thread. All we do here is acknowledge and mask the interrupt and wakeup
256 * the kernel thread. 251 * the kernel thread.
257 */ 252 */
258static void handle_twl4030_pih(unsigned int irq, struct irq_desc *desc) 253static irqreturn_t handle_twl4030_pih(int irq, void *devid)
259{ 254{
260 /* Acknowledge, clear *AND* mask the interrupt... */ 255 /* Acknowledge, clear *AND* mask the interrupt... */
261 desc->chip->ack(irq); 256 disable_irq_nosync(irq);
262 complete(&irq_event); 257 complete(devid);
263} 258 return IRQ_HANDLED;
264
265static struct task_struct *start_twl4030_irq_thread(long irq)
266{
267 struct task_struct *thread;
268
269 init_completion(&irq_event);
270 thread = kthread_run(twl4030_irq_thread, (void *)irq, "twl4030-irq");
271 if (!thread)
272 pr_err("twl4030: could not create irq %ld thread!\n", irq);
273
274 return thread;
275} 259}
276
277/*----------------------------------------------------------------------*/ 260/*----------------------------------------------------------------------*/
278 261
279/* 262/*
@@ -734,18 +717,28 @@ int twl_init_irq(int irq_num, unsigned irq_base, unsigned irq_end)
734 } 717 }
735 718
736 /* install an irq handler to demultiplex the TWL4030 interrupt */ 719 /* install an irq handler to demultiplex the TWL4030 interrupt */
737 task = start_twl4030_irq_thread(irq_num);
738 if (!task) {
739 pr_err("twl4030: irq thread FAIL\n");
740 status = -ESRCH;
741 goto fail;
742 }
743 720
744 set_irq_data(irq_num, task);
745 set_irq_chained_handler(irq_num, handle_twl4030_pih);
746 721
747 return status; 722 init_completion(&irq_event);
748 723
724 status = request_irq(irq_num, handle_twl4030_pih, IRQF_DISABLED,
725 "TWL4030-PIH", &irq_event);
726 if (status < 0) {
727 pr_err("twl4030: could not claim irq%d: %d\n", irq_num, status);
728 goto fail_rqirq;
729 }
730
731 task = kthread_run(twl4030_irq_thread, (void *)irq_num, "twl4030-irq");
732 if (IS_ERR(task)) {
733 pr_err("twl4030: could not create irq %d thread!\n", irq_num);
734 status = PTR_ERR(task);
735 goto fail_kthread;
736 }
737 return status;
738fail_kthread:
739 free_irq(irq_num, &irq_event);
740fail_rqirq:
741 /* clean up twl4030_sih_setup */
749fail: 742fail:
750 for (i = irq_base; i < irq_end; i++) 743 for (i = irq_base; i < irq_end; i++)
751 set_irq_chip_and_handler(i, NULL, NULL); 744 set_irq_chip_and_handler(i, NULL, NULL);
diff --git a/drivers/misc/cb710/sgbuf2.c b/drivers/misc/cb710/sgbuf2.c
index d38a7acdb6e..d019746551f 100644
--- a/drivers/misc/cb710/sgbuf2.c
+++ b/drivers/misc/cb710/sgbuf2.c
@@ -114,7 +114,6 @@ static void sg_dwiter_write_slow(struct sg_mapping_iter *miter, uint32_t data)
114 if (!left) 114 if (!left)
115 return; 115 return;
116 addr += len; 116 addr += len;
117 flush_kernel_dcache_page(miter->page);
118 } while (sg_dwiter_next(miter)); 117 } while (sg_dwiter_next(miter));
119} 118}
120 119
@@ -142,9 +141,6 @@ void cb710_sg_dwiter_write_next_block(struct sg_mapping_iter *miter, uint32_t da
142 return; 141 return;
143 } else 142 } else
144 sg_dwiter_write_slow(miter, data); 143 sg_dwiter_write_slow(miter, data);
145
146 if (miter->length == miter->consumed)
147 flush_kernel_dcache_page(miter->page);
148} 144}
149EXPORT_SYMBOL_GPL(cb710_sg_dwiter_write_next_block); 145EXPORT_SYMBOL_GPL(cb710_sg_dwiter_write_next_block);
150 146
diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c
index b34cb5f79ee..2e535a0ccd5 100644
--- a/drivers/misc/eeprom/at25.c
+++ b/drivers/misc/eeprom/at25.c
@@ -173,6 +173,7 @@ at25_ee_write(struct at25_data *at25, const char *buf, loff_t off,
173 unsigned segment; 173 unsigned segment;
174 unsigned offset = (unsigned) off; 174 unsigned offset = (unsigned) off;
175 u8 *cp = bounce + 1; 175 u8 *cp = bounce + 1;
176 int sr;
176 177
177 *cp = AT25_WREN; 178 *cp = AT25_WREN;
178 status = spi_write(at25->spi, cp, 1); 179 status = spi_write(at25->spi, cp, 1);
@@ -214,7 +215,6 @@ at25_ee_write(struct at25_data *at25, const char *buf, loff_t off,
214 timeout = jiffies + msecs_to_jiffies(EE_TIMEOUT); 215 timeout = jiffies + msecs_to_jiffies(EE_TIMEOUT);
215 retries = 0; 216 retries = 0;
216 do { 217 do {
217 int sr;
218 218
219 sr = spi_w8r8(at25->spi, AT25_RDSR); 219 sr = spi_w8r8(at25->spi, AT25_RDSR);
220 if (sr < 0 || (sr & AT25_SR_nRDY)) { 220 if (sr < 0 || (sr & AT25_SR_nRDY)) {
@@ -228,7 +228,7 @@ at25_ee_write(struct at25_data *at25, const char *buf, loff_t off,
228 break; 228 break;
229 } while (retries++ < 3 || time_before_eq(jiffies, timeout)); 229 } while (retries++ < 3 || time_before_eq(jiffies, timeout));
230 230
231 if (time_after(jiffies, timeout)) { 231 if ((sr < 0) || (sr & AT25_SR_nRDY)) {
232 dev_err(&at25->spi->dev, 232 dev_err(&at25->spi->dev,
233 "write %d bytes offset %d, " 233 "write %d bytes offset %d, "
234 "timeout after %u msecs\n", 234 "timeout after %u msecs\n",
diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c
index 11efefb1af5..4e72964a7b4 100644
--- a/drivers/mmc/host/cb710-mmc.c
+++ b/drivers/mmc/host/cb710-mmc.c
@@ -278,7 +278,7 @@ static int cb710_mmc_receive(struct cb710_slot *slot, struct mmc_data *data)
278 if (unlikely(data->blksz & 15 && (data->blocks != 1 || data->blksz != 8))) 278 if (unlikely(data->blksz & 15 && (data->blocks != 1 || data->blksz != 8)))
279 return -EINVAL; 279 return -EINVAL;
280 280
281 sg_miter_start(&miter, data->sg, data->sg_len, 0); 281 sg_miter_start(&miter, data->sg, data->sg_len, SG_MITER_TO_SG);
282 282
283 cb710_modify_port_8(slot, CB710_MMC_CONFIG2_PORT, 283 cb710_modify_port_8(slot, CB710_MMC_CONFIG2_PORT,
284 15, CB710_MMC_C2_READ_PIO_SIZE_MASK); 284 15, CB710_MMC_C2_READ_PIO_SIZE_MASK);
@@ -307,7 +307,7 @@ static int cb710_mmc_receive(struct cb710_slot *slot, struct mmc_data *data)
307 goto out; 307 goto out;
308 } 308 }
309out: 309out:
310 cb710_sg_miter_stop_writing(&miter); 310 sg_miter_stop(&miter);
311 return err; 311 return err;
312} 312}
313 313
@@ -322,7 +322,7 @@ static int cb710_mmc_send(struct cb710_slot *slot, struct mmc_data *data)
322 if (unlikely(data->blocks > 1 && data->blksz & 15)) 322 if (unlikely(data->blocks > 1 && data->blksz & 15))
323 return -EINVAL; 323 return -EINVAL;
324 324
325 sg_miter_start(&miter, data->sg, data->sg_len, 0); 325 sg_miter_start(&miter, data->sg, data->sg_len, SG_MITER_FROM_SG);
326 326
327 cb710_modify_port_8(slot, CB710_MMC_CONFIG2_PORT, 327 cb710_modify_port_8(slot, CB710_MMC_CONFIG2_PORT,
328 0, CB710_MMC_C2_READ_PIO_SIZE_MASK); 328 0, CB710_MMC_C2_READ_PIO_SIZE_MASK);
diff --git a/drivers/mmc/host/imxmmc.c b/drivers/mmc/host/imxmmc.c
index e0be21a4a69..bf98d7cc928 100644
--- a/drivers/mmc/host/imxmmc.c
+++ b/drivers/mmc/host/imxmmc.c
@@ -652,7 +652,7 @@ static irqreturn_t imxmci_irq(int irq, void *devid)
652 set_bit(IMXMCI_PEND_STARTED_b, &host->pending_events); 652 set_bit(IMXMCI_PEND_STARTED_b, &host->pending_events);
653 tasklet_schedule(&host->tasklet); 653 tasklet_schedule(&host->tasklet);
654 654
655 return IRQ_RETVAL(handled);; 655 return IRQ_RETVAL(handled);
656} 656}
657 657
658static void imxmci_tasklet_fnc(unsigned long data) 658static void imxmci_tasklet_fnc(unsigned long data)
diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
index b56d72ff06e..34e23489811 100644
--- a/drivers/mmc/host/mvsdio.c
+++ b/drivers/mmc/host/mvsdio.c
@@ -384,7 +384,7 @@ static irqreturn_t mvsd_irq(int irq, void *dev)
384 u16 val[2] = {0, 0}; 384 u16 val[2] = {0, 0};
385 val[0] = mvsd_read(MVSD_FIFO); 385 val[0] = mvsd_read(MVSD_FIFO);
386 val[1] = mvsd_read(MVSD_FIFO); 386 val[1] = mvsd_read(MVSD_FIFO);
387 memcpy(p, &val, s); 387 memcpy(p, ((void *)&val) + 4 - s, s);
388 s = 0; 388 s = 0;
389 intr_status = mvsd_read(MVSD_NOR_INTR_STATUS); 389 intr_status = mvsd_read(MVSD_NOR_INTR_STATUS);
390 } 390 }
@@ -423,7 +423,7 @@ static irqreturn_t mvsd_irq(int irq, void *dev)
423 if (s < 4) { 423 if (s < 4) {
424 if (s && (intr_status & MVSD_NOR_TX_AVAIL)) { 424 if (s && (intr_status & MVSD_NOR_TX_AVAIL)) {
425 u16 val[2] = {0, 0}; 425 u16 val[2] = {0, 0};
426 memcpy(&val, p, s); 426 memcpy(((void *)&val) + 4 - s, p, s);
427 mvsd_write(MVSD_FIFO, val[0]); 427 mvsd_write(MVSD_FIFO, val[0]);
428 mvsd_write(MVSD_FIFO, val[1]); 428 mvsd_write(MVSD_FIFO, val[1]);
429 s = 0; 429 s = 0;
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index d7d7109ef47..e55ac792d68 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -168,12 +168,12 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data)
168 168
169 if (data->flags & MMC_DATA_READ) { 169 if (data->flags & MMC_DATA_READ) {
170 host->dma_dir = DMA_FROM_DEVICE; 170 host->dma_dir = DMA_FROM_DEVICE;
171 dcmd = DCMD_INCTRGADDR | DCMD_FLOWTRG; 171 dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC;
172 DRCMR(host->dma_drcmrtx) = 0; 172 DRCMR(host->dma_drcmrtx) = 0;
173 DRCMR(host->dma_drcmrrx) = host->dma | DRCMR_MAPVLD; 173 DRCMR(host->dma_drcmrrx) = host->dma | DRCMR_MAPVLD;
174 } else { 174 } else {
175 host->dma_dir = DMA_TO_DEVICE; 175 host->dma_dir = DMA_TO_DEVICE;
176 dcmd = DCMD_INCSRCADDR | DCMD_FLOWSRC; 176 dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG;
177 DRCMR(host->dma_drcmrrx) = 0; 177 DRCMR(host->dma_drcmrrx) = 0;
178 DRCMR(host->dma_drcmrtx) = host->dma | DRCMR_MAPVLD; 178 DRCMR(host->dma_drcmrtx) = host->dma | DRCMR_MAPVLD;
179 } 179 }
diff --git a/drivers/mmc/host/sdhci-of.c b/drivers/mmc/host/sdhci-of.c
index d79fa55c3b8..1e8aa590bb3 100644
--- a/drivers/mmc/host/sdhci-of.c
+++ b/drivers/mmc/host/sdhci-of.c
@@ -158,6 +158,13 @@ static unsigned int esdhc_get_max_clock(struct sdhci_host *host)
158 return of_host->clock; 158 return of_host->clock;
159} 159}
160 160
161static unsigned int esdhc_get_min_clock(struct sdhci_host *host)
162{
163 struct sdhci_of_host *of_host = sdhci_priv(host);
164
165 return of_host->clock / 256 / 16;
166}
167
161static unsigned int esdhc_get_timeout_clock(struct sdhci_host *host) 168static unsigned int esdhc_get_timeout_clock(struct sdhci_host *host)
162{ 169{
163 struct sdhci_of_host *of_host = sdhci_priv(host); 170 struct sdhci_of_host *of_host = sdhci_priv(host);
@@ -184,6 +191,7 @@ static struct sdhci_of_data sdhci_esdhc = {
184 .set_clock = esdhc_set_clock, 191 .set_clock = esdhc_set_clock,
185 .enable_dma = esdhc_enable_dma, 192 .enable_dma = esdhc_enable_dma,
186 .get_max_clock = esdhc_get_max_clock, 193 .get_max_clock = esdhc_get_max_clock,
194 .get_min_clock = esdhc_get_min_clock,
187 .get_timeout_clock = esdhc_get_timeout_clock, 195 .get_timeout_clock = esdhc_get_timeout_clock,
188 }, 196 },
189}; 197};
@@ -226,7 +234,7 @@ static int __devinit sdhci_of_probe(struct of_device *ofdev,
226 return -ENODEV; 234 return -ENODEV;
227 235
228 host = sdhci_alloc_host(&ofdev->dev, sizeof(*of_host)); 236 host = sdhci_alloc_host(&ofdev->dev, sizeof(*of_host));
229 if (!host) 237 if (IS_ERR(host))
230 return -ENOMEM; 238 return -ENOMEM;
231 239
232 of_host = sdhci_priv(host); 240 of_host = sdhci_priv(host);
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 6779b4ecab1..fc96f8cb9c0 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -773,8 +773,14 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
773 } 773 }
774 774
775 if (!(host->flags & SDHCI_REQ_USE_DMA)) { 775 if (!(host->flags & SDHCI_REQ_USE_DMA)) {
776 sg_miter_start(&host->sg_miter, 776 int flags;
777 data->sg, data->sg_len, SG_MITER_ATOMIC); 777
778 flags = SG_MITER_ATOMIC;
779 if (host->data->flags & MMC_DATA_READ)
780 flags |= SG_MITER_TO_SG;
781 else
782 flags |= SG_MITER_FROM_SG;
783 sg_miter_start(&host->sg_miter, data->sg, data->sg_len, flags);
778 host->blocks = data->blocks; 784 host->blocks = data->blocks;
779 } 785 }
780 786
@@ -1766,7 +1772,10 @@ int sdhci_add_host(struct sdhci_host *host)
1766 * Set host parameters. 1772 * Set host parameters.
1767 */ 1773 */
1768 mmc->ops = &sdhci_ops; 1774 mmc->ops = &sdhci_ops;
1769 mmc->f_min = host->max_clk / 256; 1775 if (host->ops->get_min_clock)
1776 mmc->f_min = host->ops->get_min_clock(host);
1777 else
1778 mmc->f_min = host->max_clk / 256;
1770 mmc->f_max = host->max_clk; 1779 mmc->f_max = host->max_clk;
1771 mmc->caps = MMC_CAP_SDIO_IRQ; 1780 mmc->caps = MMC_CAP_SDIO_IRQ;
1772 1781
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 831ddf7dcb4..c77e9ff3022 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -302,6 +302,7 @@ struct sdhci_ops {
302 302
303 int (*enable_dma)(struct sdhci_host *host); 303 int (*enable_dma)(struct sdhci_host *host);
304 unsigned int (*get_max_clock)(struct sdhci_host *host); 304 unsigned int (*get_max_clock)(struct sdhci_host *host);
305 unsigned int (*get_min_clock)(struct sdhci_host *host);
305 unsigned int (*get_timeout_clock)(struct sdhci_host *host); 306 unsigned int (*get_timeout_clock)(struct sdhci_host *host);
306}; 307};
307 308
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index 0b98654d8ee..7a58bd5522f 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -284,13 +284,6 @@ config MTD_L440GX
284 284
285 BE VERY CAREFUL. 285 BE VERY CAREFUL.
286 286
287config MTD_SBC8240
288 tristate "Flash device on SBC8240"
289 depends on MTD_JEDECPROBE && 8260
290 help
291 Flash access on the SBC8240 board from Wind River. See
292 <http://www.windriver.com/products/sbc8240/>
293
294config MTD_TQM8XXL 287config MTD_TQM8XXL
295 tristate "CFI Flash device mapped on TQM8XXL" 288 tristate "CFI Flash device mapped on TQM8XXL"
296 depends on MTD_CFI && TQM8xxL 289 depends on MTD_CFI && TQM8xxL
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
index 8bae7f9850c..5beb0662d72 100644
--- a/drivers/mtd/maps/Makefile
+++ b/drivers/mtd/maps/Makefile
@@ -50,7 +50,6 @@ obj-$(CONFIG_MTD_UCLINUX) += uclinux.o
50obj-$(CONFIG_MTD_NETtel) += nettel.o 50obj-$(CONFIG_MTD_NETtel) += nettel.o
51obj-$(CONFIG_MTD_SCB2_FLASH) += scb2_flash.o 51obj-$(CONFIG_MTD_SCB2_FLASH) += scb2_flash.o
52obj-$(CONFIG_MTD_H720X) += h720x-flash.o 52obj-$(CONFIG_MTD_H720X) += h720x-flash.o
53obj-$(CONFIG_MTD_SBC8240) += sbc8240.o
54obj-$(CONFIG_MTD_IXP4XX) += ixp4xx.o 53obj-$(CONFIG_MTD_IXP4XX) += ixp4xx.o
55obj-$(CONFIG_MTD_IXP2000) += ixp2000.o 54obj-$(CONFIG_MTD_IXP2000) += ixp2000.o
56obj-$(CONFIG_MTD_WRSBC8260) += wr_sbc82xx_flash.o 55obj-$(CONFIG_MTD_WRSBC8260) += wr_sbc82xx_flash.o
diff --git a/drivers/mtd/maps/sbc8240.c b/drivers/mtd/maps/sbc8240.c
deleted file mode 100644
index d5374cdcb16..00000000000
--- a/drivers/mtd/maps/sbc8240.c
+++ /dev/null
@@ -1,250 +0,0 @@
1/*
2 * Handle mapping of the flash memory access routines on the SBC8240 board.
3 *
4 * Carolyn Smith, Tektronix, Inc.
5 *
6 * This code is GPLed
7 */
8
9/*
10 * The SBC8240 has 2 flash banks.
11 * Bank 0 is a 512 KiB AMD AM29F040B; 8 x 64 KiB sectors.
12 * It contains the U-Boot code (7 sectors) and the environment (1 sector).
13 * Bank 1 is 4 x 1 MiB AMD AM29LV800BT; 15 x 64 KiB sectors, 1 x 32 KiB sector,
14 * 2 x 8 KiB sectors, 1 x 16 KiB sectors.
15 * Both parts are JEDEC compatible.
16 */
17
18#include <linux/module.h>
19#include <linux/types.h>
20#include <linux/kernel.h>
21#include <asm/io.h>
22
23#include <linux/mtd/mtd.h>
24#include <linux/mtd/map.h>
25#include <linux/mtd/cfi.h>
26
27#ifdef CONFIG_MTD_PARTITIONS
28#include <linux/mtd/partitions.h>
29#endif
30
31#define DEBUG
32
33#ifdef DEBUG
34# define debugk(fmt,args...) printk(fmt ,##args)
35#else
36# define debugk(fmt,args...)
37#endif
38
39
40#define WINDOW_ADDR0 0xFFF00000 /* 512 KiB */
41#define WINDOW_SIZE0 0x00080000
42#define BUSWIDTH0 1
43
44#define WINDOW_ADDR1 0xFF000000 /* 4 MiB */
45#define WINDOW_SIZE1 0x00400000
46#define BUSWIDTH1 8
47
48#define MSG_PREFIX "sbc8240:" /* prefix for our printk()'s */
49#define MTDID "sbc8240-%d" /* for mtdparts= partitioning */
50
51
52static struct map_info sbc8240_map[2] = {
53 {
54 .name = "sbc8240 Flash Bank #0",
55 .size = WINDOW_SIZE0,
56 .bankwidth = BUSWIDTH0,
57 },
58 {
59 .name = "sbc8240 Flash Bank #1",
60 .size = WINDOW_SIZE1,
61 .bankwidth = BUSWIDTH1,
62 }
63};
64
65#define NUM_FLASH_BANKS ARRAY_SIZE(sbc8240_map)
66
67/*
68 * The following defines the partition layout of SBC8240 boards.
69 *
70 * See include/linux/mtd/partitions.h for definition of the
71 * mtd_partition structure.
72 *
73 * The *_max_flash_size is the maximum possible mapped flash size
74 * which is not necessarily the actual flash size. It must correspond
75 * to the value specified in the mapping definition defined by the
76 * "struct map_desc *_io_desc" for the corresponding machine.
77 */
78
79#ifdef CONFIG_MTD_PARTITIONS
80
81static struct mtd_partition sbc8240_uboot_partitions [] = {
82 /* Bank 0 */
83 {
84 .name = "U-boot", /* U-Boot Firmware */
85 .offset = 0,
86 .size = 0x00070000, /* 7 x 64 KiB sectors */
87 .mask_flags = MTD_WRITEABLE, /* force read-only */
88 },
89 {
90 .name = "environment", /* U-Boot environment */
91 .offset = 0x00070000,
92 .size = 0x00010000, /* 1 x 64 KiB sector */
93 },
94};
95
96static struct mtd_partition sbc8240_fs_partitions [] = {
97 {
98 .name = "jffs", /* JFFS filesystem */
99 .offset = 0,
100 .size = 0x003C0000, /* 4 * 15 * 64KiB */
101 },
102 {
103 .name = "tmp32",
104 .offset = 0x003C0000,
105 .size = 0x00020000, /* 4 * 32KiB */
106 },
107 {
108 .name = "tmp8a",
109 .offset = 0x003E0000,
110 .size = 0x00008000, /* 4 * 8KiB */
111 },
112 {
113 .name = "tmp8b",
114 .offset = 0x003E8000,
115 .size = 0x00008000, /* 4 * 8KiB */
116 },
117 {
118 .name = "tmp16",
119 .offset = 0x003F0000,
120 .size = 0x00010000, /* 4 * 16KiB */
121 }
122};
123
124/* trivial struct to describe partition information */
125struct mtd_part_def
126{
127 int nums;
128 unsigned char *type;
129 struct mtd_partition* mtd_part;
130};
131
132static struct mtd_info *sbc8240_mtd[NUM_FLASH_BANKS];
133static struct mtd_part_def sbc8240_part_banks[NUM_FLASH_BANKS];
134
135
136#endif /* CONFIG_MTD_PARTITIONS */
137
138
139static int __init init_sbc8240_mtd (void)
140{
141 static struct _cjs {
142 u_long addr;
143 u_long size;
144 } pt[NUM_FLASH_BANKS] = {
145 {
146 .addr = WINDOW_ADDR0,
147 .size = WINDOW_SIZE0
148 },
149 {
150 .addr = WINDOW_ADDR1,
151 .size = WINDOW_SIZE1
152 },
153 };
154
155 int devicesfound = 0;
156 int i,j;
157
158 for (i = 0; i < NUM_FLASH_BANKS; i++) {
159 printk (KERN_NOTICE MSG_PREFIX
160 "Probing 0x%08lx at 0x%08lx\n", pt[i].size, pt[i].addr);
161
162 sbc8240_map[i].map_priv_1 =
163 (unsigned long) ioremap (pt[i].addr, pt[i].size);
164 if (!sbc8240_map[i].map_priv_1) {
165 printk (MSG_PREFIX "failed to ioremap\n");
166 for (j = 0; j < i; j++) {
167 iounmap((void *) sbc8240_map[j].map_priv_1);
168 sbc8240_map[j].map_priv_1 = 0;
169 }
170 return -EIO;
171 }
172 simple_map_init(&sbc8240_mtd[i]);
173
174 sbc8240_mtd[i] = do_map_probe("jedec_probe", &sbc8240_map[i]);
175
176 if (sbc8240_mtd[i]) {
177 sbc8240_mtd[i]->module = THIS_MODULE;
178 devicesfound++;
179 } else {
180 if (sbc8240_map[i].map_priv_1) {
181 iounmap((void *) sbc8240_map[i].map_priv_1);
182 sbc8240_map[i].map_priv_1 = 0;
183 }
184 }
185 }
186
187 if (!devicesfound) {
188 printk(KERN_NOTICE MSG_PREFIX
189 "No suppported flash chips found!\n");
190 return -ENXIO;
191 }
192
193#ifdef CONFIG_MTD_PARTITIONS
194 sbc8240_part_banks[0].mtd_part = sbc8240_uboot_partitions;
195 sbc8240_part_banks[0].type = "static image";
196 sbc8240_part_banks[0].nums = ARRAY_SIZE(sbc8240_uboot_partitions);
197 sbc8240_part_banks[1].mtd_part = sbc8240_fs_partitions;
198 sbc8240_part_banks[1].type = "static file system";
199 sbc8240_part_banks[1].nums = ARRAY_SIZE(sbc8240_fs_partitions);
200
201 for (i = 0; i < NUM_FLASH_BANKS; i++) {
202
203 if (!sbc8240_mtd[i]) continue;
204 if (sbc8240_part_banks[i].nums == 0) {
205 printk (KERN_NOTICE MSG_PREFIX
206 "No partition info available, registering whole device\n");
207 add_mtd_device(sbc8240_mtd[i]);
208 } else {
209 printk (KERN_NOTICE MSG_PREFIX
210 "Using %s partition definition\n", sbc8240_part_banks[i].mtd_part->name);
211 add_mtd_partitions (sbc8240_mtd[i],
212 sbc8240_part_banks[i].mtd_part,
213 sbc8240_part_banks[i].nums);
214 }
215 }
216#else
217 printk(KERN_NOTICE MSG_PREFIX
218 "Registering %d flash banks at once\n", devicesfound);
219
220 for (i = 0; i < devicesfound; i++) {
221 add_mtd_device(sbc8240_mtd[i]);
222 }
223#endif /* CONFIG_MTD_PARTITIONS */
224
225 return devicesfound == 0 ? -ENXIO : 0;
226}
227
228static void __exit cleanup_sbc8240_mtd (void)
229{
230 int i;
231
232 for (i = 0; i < NUM_FLASH_BANKS; i++) {
233 if (sbc8240_mtd[i]) {
234 del_mtd_device (sbc8240_mtd[i]);
235 map_destroy (sbc8240_mtd[i]);
236 }
237 if (sbc8240_map[i].map_priv_1) {
238 iounmap ((void *) sbc8240_map[i].map_priv_1);
239 sbc8240_map[i].map_priv_1 = 0;
240 }
241 }
242}
243
244module_init (init_sbc8240_mtd);
245module_exit (cleanup_sbc8240_mtd);
246
247MODULE_LICENSE ("GPL");
248MODULE_AUTHOR ("Carolyn Smith <carolyn.smith@tektronix.com>");
249MODULE_DESCRIPTION ("MTD map driver for SBC8240 boards");
250
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index c3f62654b6d..7baba40c1ed 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -144,7 +144,7 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)
144 struct mtd_blktrans_ops *tr = dev->tr; 144 struct mtd_blktrans_ops *tr = dev->tr;
145 int ret = -ENODEV; 145 int ret = -ENODEV;
146 146
147 if (!try_module_get(dev->mtd->owner)) 147 if (!get_mtd_device(NULL, dev->mtd->index))
148 goto out; 148 goto out;
149 149
150 if (!try_module_get(tr->owner)) 150 if (!try_module_get(tr->owner))
@@ -158,7 +158,7 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)
158 ret = 0; 158 ret = 0;
159 if (tr->open && (ret = tr->open(dev))) { 159 if (tr->open && (ret = tr->open(dev))) {
160 dev->mtd->usecount--; 160 dev->mtd->usecount--;
161 module_put(dev->mtd->owner); 161 put_mtd_device(dev->mtd);
162 out_tr: 162 out_tr:
163 module_put(tr->owner); 163 module_put(tr->owner);
164 } 164 }
@@ -177,7 +177,7 @@ static int blktrans_release(struct gendisk *disk, fmode_t mode)
177 177
178 if (!ret) { 178 if (!ret) {
179 dev->mtd->usecount--; 179 dev->mtd->usecount--;
180 module_put(dev->mtd->owner); 180 put_mtd_device(dev->mtd);
181 module_put(tr->owner); 181 module_put(tr->owner);
182 } 182 }
183 183
diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c
index 208c6faa035..77db5ce24d9 100644
--- a/drivers/mtd/mtdblock.c
+++ b/drivers/mtd/mtdblock.c
@@ -29,6 +29,8 @@ static struct mtdblk_dev {
29 enum { STATE_EMPTY, STATE_CLEAN, STATE_DIRTY } cache_state; 29 enum { STATE_EMPTY, STATE_CLEAN, STATE_DIRTY } cache_state;
30} *mtdblks[MAX_MTD_DEVICES]; 30} *mtdblks[MAX_MTD_DEVICES];
31 31
32static struct mutex mtdblks_lock;
33
32/* 34/*
33 * Cache stuff... 35 * Cache stuff...
34 * 36 *
@@ -270,15 +272,19 @@ static int mtdblock_open(struct mtd_blktrans_dev *mbd)
270 272
271 DEBUG(MTD_DEBUG_LEVEL1,"mtdblock_open\n"); 273 DEBUG(MTD_DEBUG_LEVEL1,"mtdblock_open\n");
272 274
275 mutex_lock(&mtdblks_lock);
273 if (mtdblks[dev]) { 276 if (mtdblks[dev]) {
274 mtdblks[dev]->count++; 277 mtdblks[dev]->count++;
278 mutex_unlock(&mtdblks_lock);
275 return 0; 279 return 0;
276 } 280 }
277 281
278 /* OK, it's not open. Create cache info for it */ 282 /* OK, it's not open. Create cache info for it */
279 mtdblk = kzalloc(sizeof(struct mtdblk_dev), GFP_KERNEL); 283 mtdblk = kzalloc(sizeof(struct mtdblk_dev), GFP_KERNEL);
280 if (!mtdblk) 284 if (!mtdblk) {
285 mutex_unlock(&mtdblks_lock);
281 return -ENOMEM; 286 return -ENOMEM;
287 }
282 288
283 mtdblk->count = 1; 289 mtdblk->count = 1;
284 mtdblk->mtd = mtd; 290 mtdblk->mtd = mtd;
@@ -291,6 +297,7 @@ static int mtdblock_open(struct mtd_blktrans_dev *mbd)
291 } 297 }
292 298
293 mtdblks[dev] = mtdblk; 299 mtdblks[dev] = mtdblk;
300 mutex_unlock(&mtdblks_lock);
294 301
295 DEBUG(MTD_DEBUG_LEVEL1, "ok\n"); 302 DEBUG(MTD_DEBUG_LEVEL1, "ok\n");
296 303
@@ -304,6 +311,8 @@ static int mtdblock_release(struct mtd_blktrans_dev *mbd)
304 311
305 DEBUG(MTD_DEBUG_LEVEL1, "mtdblock_release\n"); 312 DEBUG(MTD_DEBUG_LEVEL1, "mtdblock_release\n");
306 313
314 mutex_lock(&mtdblks_lock);
315
307 mutex_lock(&mtdblk->cache_mutex); 316 mutex_lock(&mtdblk->cache_mutex);
308 write_cached_data(mtdblk); 317 write_cached_data(mtdblk);
309 mutex_unlock(&mtdblk->cache_mutex); 318 mutex_unlock(&mtdblk->cache_mutex);
@@ -316,6 +325,9 @@ static int mtdblock_release(struct mtd_blktrans_dev *mbd)
316 vfree(mtdblk->cache_data); 325 vfree(mtdblk->cache_data);
317 kfree(mtdblk); 326 kfree(mtdblk);
318 } 327 }
328
329 mutex_unlock(&mtdblks_lock);
330
319 DEBUG(MTD_DEBUG_LEVEL1, "ok\n"); 331 DEBUG(MTD_DEBUG_LEVEL1, "ok\n");
320 332
321 return 0; 333 return 0;
@@ -376,6 +388,8 @@ static struct mtd_blktrans_ops mtdblock_tr = {
376 388
377static int __init init_mtdblock(void) 389static int __init init_mtdblock(void)
378{ 390{
391 mutex_init(&mtdblks_lock);
392
379 return register_mtd_blktrans(&mtdblock_tr); 393 return register_mtd_blktrans(&mtdblock_tr);
380} 394}
381 395
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index fac54a3fa3f..00ebf7af746 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -65,8 +65,8 @@ static void mtd_release(struct device *dev)
65static int mtd_cls_suspend(struct device *dev, pm_message_t state) 65static int mtd_cls_suspend(struct device *dev, pm_message_t state)
66{ 66{
67 struct mtd_info *mtd = dev_to_mtd(dev); 67 struct mtd_info *mtd = dev_to_mtd(dev);
68 68
69 if (mtd->suspend) 69 if (mtd && mtd->suspend)
70 return mtd->suspend(mtd); 70 return mtd->suspend(mtd);
71 else 71 else
72 return 0; 72 return 0;
@@ -76,7 +76,7 @@ static int mtd_cls_resume(struct device *dev)
76{ 76{
77 struct mtd_info *mtd = dev_to_mtd(dev); 77 struct mtd_info *mtd = dev_to_mtd(dev);
78 78
79 if (mtd->resume) 79 if (mtd && mtd->resume)
80 mtd->resume(mtd); 80 mtd->resume(mtd);
81 return 0; 81 return 0;
82} 82}
@@ -298,6 +298,7 @@ int add_mtd_device(struct mtd_info *mtd)
298 mtd->dev.class = &mtd_class; 298 mtd->dev.class = &mtd_class;
299 mtd->dev.devt = MTD_DEVT(i); 299 mtd->dev.devt = MTD_DEVT(i);
300 dev_set_name(&mtd->dev, "mtd%d", i); 300 dev_set_name(&mtd->dev, "mtd%d", i);
301 dev_set_drvdata(&mtd->dev, mtd);
301 if (device_register(&mtd->dev) != 0) { 302 if (device_register(&mtd->dev) != 0) {
302 mtd_table[i] = NULL; 303 mtd_table[i] = NULL;
303 break; 304 break;
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index 38d656b9b2e..0108ed42e87 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -266,7 +266,7 @@ static inline int omap2_onenand_bufferram_offset(struct mtd_info *mtd, int area)
266 266
267 if (ONENAND_CURRENT_BUFFERRAM(this)) { 267 if (ONENAND_CURRENT_BUFFERRAM(this)) {
268 if (area == ONENAND_DATARAM) 268 if (area == ONENAND_DATARAM)
269 return mtd->writesize; 269 return this->writesize;
270 if (area == ONENAND_SPARERAM) 270 if (area == ONENAND_SPARERAM)
271 return mtd->oobsize; 271 return mtd->oobsize;
272 } 272 }
@@ -770,6 +770,7 @@ static int __devexit omap2_onenand_remove(struct platform_device *pdev)
770 } 770 }
771 iounmap(c->onenand.base); 771 iounmap(c->onenand.base);
772 release_mem_region(c->phys_base, ONENAND_IO_SIZE); 772 release_mem_region(c->phys_base, ONENAND_IO_SIZE);
773 gpmc_cs_free(c->gpmc_cs);
773 kfree(c); 774 kfree(c);
774 775
775 return 0; 776 return 0;
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 0f2034c3ed2..e4d9ef0c965 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -1254,6 +1254,7 @@ out_free:
1254 if (!ubi->volumes[i]) 1254 if (!ubi->volumes[i])
1255 continue; 1255 continue;
1256 kfree(ubi->volumes[i]->eba_tbl); 1256 kfree(ubi->volumes[i]->eba_tbl);
1257 ubi->volumes[i]->eba_tbl = NULL;
1257 } 1258 }
1258 return err; 1259 return err;
1259} 1260}
diff --git a/drivers/mtd/ubi/gluebi.c b/drivers/mtd/ubi/gluebi.c
index 95aaac03f93..b5e478fa266 100644
--- a/drivers/mtd/ubi/gluebi.c
+++ b/drivers/mtd/ubi/gluebi.c
@@ -332,6 +332,7 @@ static int gluebi_create(struct ubi_device_info *di,
332 } 332 }
333 333
334 gluebi->vol_id = vi->vol_id; 334 gluebi->vol_id = vi->vol_id;
335 gluebi->ubi_num = vi->ubi_num;
335 mtd->type = MTD_UBIVOLUME; 336 mtd->type = MTD_UBIVOLUME;
336 if (!di->ro_mode) 337 if (!di->ro_mode)
337 mtd->flags = MTD_WRITEABLE; 338 mtd->flags = MTD_WRITEABLE;
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index f60895ee0ae..b847745394b 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -781,11 +781,22 @@ static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si,
781 return -EINVAL; 781 return -EINVAL;
782 } 782 }
783 783
784 image_seq = be32_to_cpu(ech->ec); 784 /*
785 * Make sure that all PEBs have the same image sequence number.
786 * This allows us to detect situations when users flash UBI
787 * images incorrectly, so that the flash has the new UBI image
788 * and leftovers from the old one. This feature was added
789 * relatively recently, and the sequence number was always
790 * zero, because old UBI implementations always set it to zero.
791 * For this reasons, we do not panic if some PEBs have zero
792 * sequence number, while other PEBs have non-zero sequence
793 * number.
794 */
795 image_seq = be32_to_cpu(ech->image_seq);
785 if (!si->image_seq_set) { 796 if (!si->image_seq_set) {
786 ubi->image_seq = image_seq; 797 ubi->image_seq = image_seq;
787 si->image_seq_set = 1; 798 si->image_seq_set = 1;
788 } else if (ubi->image_seq != image_seq) { 799 } else if (ubi->image_seq && ubi->image_seq != image_seq) {
789 ubi_err("bad image sequence number %d in PEB %d, " 800 ubi_err("bad image sequence number %d in PEB %d, "
790 "expected %d", image_seq, pnum, ubi->image_seq); 801 "expected %d", image_seq, pnum, ubi->image_seq);
791 ubi_dbg_dump_ec_hdr(ech); 802 ubi_dbg_dump_ec_hdr(ech);
diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c
index 3e00fa8ea65..4a7c32895be 100644
--- a/drivers/net/3c515.c
+++ b/drivers/net/3c515.c
@@ -832,7 +832,9 @@ static int corkscrew_open(struct net_device *dev)
832 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ 832 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
833 vp->rx_ring[i].addr = isa_virt_to_bus(skb->data); 833 vp->rx_ring[i].addr = isa_virt_to_bus(skb->data);
834 } 834 }
835 vp->rx_ring[i - 1].next = isa_virt_to_bus(&vp->rx_ring[0]); /* Wrap the ring. */ 835 if (i != 0)
836 vp->rx_ring[i - 1].next =
837 isa_virt_to_bus(&vp->rx_ring[0]); /* Wrap the ring. */
836 outl(isa_virt_to_bus(&vp->rx_ring[0]), ioaddr + UpListPtr); 838 outl(isa_virt_to_bus(&vp->rx_ring[0]), ioaddr + UpListPtr);
837 } 839 }
838 if (vp->full_bus_master_tx) { /* Boomerang bus master Tx. */ 840 if (vp->full_bus_master_tx) { /* Boomerang bus master Tx. */
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index c34aee91250..c2041685094 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -2721,13 +2721,15 @@ dump_tx_ring(struct net_device *dev)
2721 &vp->tx_ring[vp->dirty_tx % TX_RING_SIZE]); 2721 &vp->tx_ring[vp->dirty_tx % TX_RING_SIZE]);
2722 issue_and_wait(dev, DownStall); 2722 issue_and_wait(dev, DownStall);
2723 for (i = 0; i < TX_RING_SIZE; i++) { 2723 for (i = 0; i < TX_RING_SIZE; i++) {
2724 pr_err(" %d: @%p length %8.8x status %8.8x\n", i, 2724 unsigned int length;
2725 &vp->tx_ring[i], 2725
2726#if DO_ZEROCOPY 2726#if DO_ZEROCOPY
2727 le32_to_cpu(vp->tx_ring[i].frag[0].length), 2727 length = le32_to_cpu(vp->tx_ring[i].frag[0].length);
2728#else 2728#else
2729 le32_to_cpu(vp->tx_ring[i].length), 2729 length = le32_to_cpu(vp->tx_ring[i].length);
2730#endif 2730#endif
2731 pr_err(" %d: @%p length %8.8x status %8.8x\n",
2732 i, &vp->tx_ring[i], length,
2731 le32_to_cpu(vp->tx_ring[i].status)); 2733 le32_to_cpu(vp->tx_ring[i].status));
2732 } 2734 }
2733 if (!stalled) 2735 if (!stalled)
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index c155bd3ec9f..5f6509a5f64 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -1729,6 +1729,13 @@ config KS8842
1729 help 1729 help
1730 This platform driver is for Micrel KSZ8842 chip. 1730 This platform driver is for Micrel KSZ8842 chip.
1731 1731
1732config KS8851
1733 tristate "Micrel KS8851 SPI"
1734 depends on SPI
1735 select MII
1736 help
1737 SPI driver for Micrel KS8851 SPI attached network chip.
1738
1732config VIA_RHINE 1739config VIA_RHINE
1733 tristate "VIA Rhine support" 1740 tristate "VIA Rhine support"
1734 depends on NET_PCI && PCI 1741 depends on NET_PCI && PCI
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 4b58a59f211..ead8cab3cfe 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -88,6 +88,7 @@ obj-$(CONFIG_SKGE) += skge.o
88obj-$(CONFIG_SKY2) += sky2.o 88obj-$(CONFIG_SKY2) += sky2.o
89obj-$(CONFIG_SKFP) += skfp/ 89obj-$(CONFIG_SKFP) += skfp/
90obj-$(CONFIG_KS8842) += ks8842.o 90obj-$(CONFIG_KS8842) += ks8842.o
91obj-$(CONFIG_KS8851) += ks8851.o
91obj-$(CONFIG_VIA_RHINE) += via-rhine.o 92obj-$(CONFIG_VIA_RHINE) += via-rhine.o
92obj-$(CONFIG_VIA_VELOCITY) += via-velocity.o 93obj-$(CONFIG_VIA_VELOCITY) += via-velocity.o
93obj-$(CONFIG_ADAPTEC_STARFIRE) += starfire.o 94obj-$(CONFIG_ADAPTEC_STARFIRE) += starfire.o
diff --git a/drivers/net/arm/Kconfig b/drivers/net/arm/Kconfig
index 2895db13bfa..c37ee9e6b67 100644
--- a/drivers/net/arm/Kconfig
+++ b/drivers/net/arm/Kconfig
@@ -63,3 +63,11 @@ config IXP4XX_ETH
63 help 63 help
64 Say Y here if you want to use built-in Ethernet ports 64 Say Y here if you want to use built-in Ethernet ports
65 on IXP4xx processor. 65 on IXP4xx processor.
66
67config W90P910_ETH
68 tristate "Nuvoton w90p910 Ethernet support"
69 depends on ARM && ARCH_W90X900
70 select PHYLIB
71 help
72 Say Y here if you want to use built-in Ethernet ports
73 on w90p910 processor.
diff --git a/drivers/net/arm/Makefile b/drivers/net/arm/Makefile
index 811a3ccd14c..303171f589e 100644
--- a/drivers/net/arm/Makefile
+++ b/drivers/net/arm/Makefile
@@ -11,3 +11,4 @@ obj-$(CONFIG_ARM_AT91_ETHER) += at91_ether.o
11obj-$(CONFIG_ARM_KS8695_ETHER) += ks8695net.o 11obj-$(CONFIG_ARM_KS8695_ETHER) += ks8695net.o
12obj-$(CONFIG_EP93XX_ETH) += ep93xx_eth.o 12obj-$(CONFIG_EP93XX_ETH) += ep93xx_eth.o
13obj-$(CONFIG_IXP4XX_ETH) += ixp4xx_eth.o 13obj-$(CONFIG_IXP4XX_ETH) += ixp4xx_eth.o
14obj-$(CONFIG_W90P910_ETH) += w90p910_ether.o
diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c
index 2e7419a6119..5041d10bae9 100644
--- a/drivers/net/arm/at91_ether.c
+++ b/drivers/net/arm/at91_ether.c
@@ -1228,7 +1228,6 @@ static int at91ether_resume(struct platform_device *pdev)
1228#endif 1228#endif
1229 1229
1230static struct platform_driver at91ether_driver = { 1230static struct platform_driver at91ether_driver = {
1231 .probe = at91ether_probe,
1232 .remove = __devexit_p(at91ether_remove), 1231 .remove = __devexit_p(at91ether_remove),
1233 .suspend = at91ether_suspend, 1232 .suspend = at91ether_suspend,
1234 .resume = at91ether_resume, 1233 .resume = at91ether_resume,
@@ -1240,7 +1239,7 @@ static struct platform_driver at91ether_driver = {
1240 1239
1241static int __init at91ether_init(void) 1240static int __init at91ether_init(void)
1242{ 1241{
1243 return platform_driver_register(&at91ether_driver); 1242 return platform_driver_probe(&at91ether_driver, at91ether_probe);
1244} 1243}
1245 1244
1246static void __exit at91ether_exit(void) 1245static void __exit at91ether_exit(void)
diff --git a/drivers/net/arm/w90p910_ether.c b/drivers/net/arm/w90p910_ether.c
new file mode 100644
index 00000000000..616fb7985a3
--- /dev/null
+++ b/drivers/net/arm/w90p910_ether.c
@@ -0,0 +1,1105 @@
1/*
2 * Copyright (c) 2008-2009 Nuvoton technology corporation.
3 *
4 * Wan ZongShun <mcuos.com@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation;version 2 of the License.
9 *
10 */
11
12#include <linux/module.h>
13#include <linux/init.h>
14#include <linux/mii.h>
15#include <linux/netdevice.h>
16#include <linux/etherdevice.h>
17#include <linux/skbuff.h>
18#include <linux/ethtool.h>
19#include <linux/platform_device.h>
20#include <linux/clk.h>
21
22#define DRV_MODULE_NAME "w90p910-emc"
23#define DRV_MODULE_VERSION "0.1"
24
25/* Ethernet MAC Registers */
26#define REG_CAMCMR 0x00
27#define REG_CAMEN 0x04
28#define REG_CAMM_BASE 0x08
29#define REG_CAML_BASE 0x0c
30#define REG_TXDLSA 0x88
31#define REG_RXDLSA 0x8C
32#define REG_MCMDR 0x90
33#define REG_MIID 0x94
34#define REG_MIIDA 0x98
35#define REG_FFTCR 0x9C
36#define REG_TSDR 0xa0
37#define REG_RSDR 0xa4
38#define REG_DMARFC 0xa8
39#define REG_MIEN 0xac
40#define REG_MISTA 0xb0
41#define REG_CTXDSA 0xcc
42#define REG_CTXBSA 0xd0
43#define REG_CRXDSA 0xd4
44#define REG_CRXBSA 0xd8
45
46/* mac controller bit */
47#define MCMDR_RXON 0x01
48#define MCMDR_ACP (0x01 << 3)
49#define MCMDR_SPCRC (0x01 << 5)
50#define MCMDR_TXON (0x01 << 8)
51#define MCMDR_FDUP (0x01 << 18)
52#define MCMDR_ENMDC (0x01 << 19)
53#define MCMDR_OPMOD (0x01 << 20)
54#define SWR (0x01 << 24)
55
56/* cam command regiser */
57#define CAMCMR_AUP 0x01
58#define CAMCMR_AMP (0x01 << 1)
59#define CAMCMR_ABP (0x01 << 2)
60#define CAMCMR_CCAM (0x01 << 3)
61#define CAMCMR_ECMP (0x01 << 4)
62#define CAM0EN 0x01
63
64/* mac mii controller bit */
65#define MDCCR (0x0a << 20)
66#define PHYAD (0x01 << 8)
67#define PHYWR (0x01 << 16)
68#define PHYBUSY (0x01 << 17)
69#define PHYPRESP (0x01 << 18)
70#define CAM_ENTRY_SIZE 0x08
71
72/* rx and tx status */
73#define TXDS_TXCP (0x01 << 19)
74#define RXDS_CRCE (0x01 << 17)
75#define RXDS_PTLE (0x01 << 19)
76#define RXDS_RXGD (0x01 << 20)
77#define RXDS_ALIE (0x01 << 21)
78#define RXDS_RP (0x01 << 22)
79
80/* mac interrupt status*/
81#define MISTA_EXDEF (0x01 << 19)
82#define MISTA_TXBERR (0x01 << 24)
83#define MISTA_TDU (0x01 << 23)
84#define MISTA_RDU (0x01 << 10)
85#define MISTA_RXBERR (0x01 << 11)
86
87#define ENSTART 0x01
88#define ENRXINTR 0x01
89#define ENRXGD (0x01 << 4)
90#define ENRXBERR (0x01 << 11)
91#define ENTXINTR (0x01 << 16)
92#define ENTXCP (0x01 << 18)
93#define ENTXABT (0x01 << 21)
94#define ENTXBERR (0x01 << 24)
95#define ENMDC (0x01 << 19)
96#define PHYBUSY (0x01 << 17)
97#define MDCCR_VAL 0xa00000
98
99/* rx and tx owner bit */
100#define RX_OWEN_DMA (0x01 << 31)
101#define RX_OWEN_CPU (~(0x03 << 30))
102#define TX_OWEN_DMA (0x01 << 31)
103#define TX_OWEN_CPU (~(0x01 << 31))
104
105/* tx frame desc controller bit */
106#define MACTXINTEN 0x04
107#define CRCMODE 0x02
108#define PADDINGMODE 0x01
109
110/* fftcr controller bit */
111#define TXTHD (0x03 << 8)
112#define BLENGTH (0x01 << 20)
113
114/* global setting for driver */
115#define RX_DESC_SIZE 50
116#define TX_DESC_SIZE 10
117#define MAX_RBUFF_SZ 0x600
118#define MAX_TBUFF_SZ 0x600
119#define TX_TIMEOUT 50
120#define DELAY 1000
121#define CAM0 0x0
122
123static int w90p910_mdio_read(struct net_device *dev, int phy_id, int reg);
124
125struct w90p910_rxbd {
126 unsigned int sl;
127 unsigned int buffer;
128 unsigned int reserved;
129 unsigned int next;
130};
131
132struct w90p910_txbd {
133 unsigned int mode;
134 unsigned int buffer;
135 unsigned int sl;
136 unsigned int next;
137};
138
139struct recv_pdesc {
140 struct w90p910_rxbd desclist[RX_DESC_SIZE];
141 char recv_buf[RX_DESC_SIZE][MAX_RBUFF_SZ];
142};
143
144struct tran_pdesc {
145 struct w90p910_txbd desclist[TX_DESC_SIZE];
146 char tran_buf[RX_DESC_SIZE][MAX_TBUFF_SZ];
147};
148
149struct w90p910_ether {
150 struct recv_pdesc *rdesc;
151 struct recv_pdesc *rdesc_phys;
152 struct tran_pdesc *tdesc;
153 struct tran_pdesc *tdesc_phys;
154 struct net_device_stats stats;
155 struct platform_device *pdev;
156 struct sk_buff *skb;
157 struct clk *clk;
158 struct clk *rmiiclk;
159 struct mii_if_info mii;
160 struct timer_list check_timer;
161 void __iomem *reg;
162 unsigned int rxirq;
163 unsigned int txirq;
164 unsigned int cur_tx;
165 unsigned int cur_rx;
166 unsigned int finish_tx;
167 unsigned int rx_packets;
168 unsigned int rx_bytes;
169 unsigned int start_tx_ptr;
170 unsigned int start_rx_ptr;
171 unsigned int linkflag;
172 spinlock_t lock;
173};
174
175static void update_linkspeed_register(struct net_device *dev,
176 unsigned int speed, unsigned int duplex)
177{
178 struct w90p910_ether *ether = netdev_priv(dev);
179 unsigned int val;
180
181 val = __raw_readl(ether->reg + REG_MCMDR);
182
183 if (speed == SPEED_100) {
184 /* 100 full/half duplex */
185 if (duplex == DUPLEX_FULL) {
186 val |= (MCMDR_OPMOD | MCMDR_FDUP);
187 } else {
188 val |= MCMDR_OPMOD;
189 val &= ~MCMDR_FDUP;
190 }
191 } else {
192 /* 10 full/half duplex */
193 if (duplex == DUPLEX_FULL) {
194 val |= MCMDR_FDUP;
195 val &= ~MCMDR_OPMOD;
196 } else {
197 val &= ~(MCMDR_FDUP | MCMDR_OPMOD);
198 }
199 }
200
201 __raw_writel(val, ether->reg + REG_MCMDR);
202}
203
204static void update_linkspeed(struct net_device *dev)
205{
206 struct w90p910_ether *ether = netdev_priv(dev);
207 struct platform_device *pdev;
208 unsigned int bmsr, bmcr, lpa, speed, duplex;
209
210 pdev = ether->pdev;
211
212 if (!mii_link_ok(&ether->mii)) {
213 ether->linkflag = 0x0;
214 netif_carrier_off(dev);
215 dev_warn(&pdev->dev, "%s: Link down.\n", dev->name);
216 return;
217 }
218
219 if (ether->linkflag == 1)
220 return;
221
222 bmsr = w90p910_mdio_read(dev, ether->mii.phy_id, MII_BMSR);
223 bmcr = w90p910_mdio_read(dev, ether->mii.phy_id, MII_BMCR);
224
225 if (bmcr & BMCR_ANENABLE) {
226 if (!(bmsr & BMSR_ANEGCOMPLETE))
227 return;
228
229 lpa = w90p910_mdio_read(dev, ether->mii.phy_id, MII_LPA);
230
231 if ((lpa & LPA_100FULL) || (lpa & LPA_100HALF))
232 speed = SPEED_100;
233 else
234 speed = SPEED_10;
235
236 if ((lpa & LPA_100FULL) || (lpa & LPA_10FULL))
237 duplex = DUPLEX_FULL;
238 else
239 duplex = DUPLEX_HALF;
240
241 } else {
242 speed = (bmcr & BMCR_SPEED100) ? SPEED_100 : SPEED_10;
243 duplex = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF;
244 }
245
246 update_linkspeed_register(dev, speed, duplex);
247
248 dev_info(&pdev->dev, "%s: Link now %i-%s\n", dev->name, speed,
249 (duplex == DUPLEX_FULL) ? "FullDuplex" : "HalfDuplex");
250 ether->linkflag = 0x01;
251
252 netif_carrier_on(dev);
253}
254
255static void w90p910_check_link(unsigned long dev_id)
256{
257 struct net_device *dev = (struct net_device *) dev_id;
258 struct w90p910_ether *ether = netdev_priv(dev);
259
260 update_linkspeed(dev);
261 mod_timer(&ether->check_timer, jiffies + msecs_to_jiffies(1000));
262}
263
264static void w90p910_write_cam(struct net_device *dev,
265 unsigned int x, unsigned char *pval)
266{
267 struct w90p910_ether *ether = netdev_priv(dev);
268 unsigned int msw, lsw;
269
270 msw = (pval[0] << 24) | (pval[1] << 16) | (pval[2] << 8) | pval[3];
271
272 lsw = (pval[4] << 24) | (pval[5] << 16);
273
274 __raw_writel(lsw, ether->reg + REG_CAML_BASE + x * CAM_ENTRY_SIZE);
275 __raw_writel(msw, ether->reg + REG_CAMM_BASE + x * CAM_ENTRY_SIZE);
276}
277
278static void w90p910_init_desc(struct net_device *dev)
279{
280 struct w90p910_ether *ether;
281 struct w90p910_txbd *tdesc, *tdesc_phys;
282 struct w90p910_rxbd *rdesc, *rdesc_phys;
283 unsigned int i, j;
284
285 ether = netdev_priv(dev);
286
287 ether->tdesc = (struct tran_pdesc *)
288 dma_alloc_coherent(NULL, sizeof(struct tran_pdesc),
289 (dma_addr_t *) &ether->tdesc_phys, GFP_KERNEL);
290
291 ether->rdesc = (struct recv_pdesc *)
292 dma_alloc_coherent(NULL, sizeof(struct recv_pdesc),
293 (dma_addr_t *) &ether->rdesc_phys, GFP_KERNEL);
294
295 for (i = 0; i < TX_DESC_SIZE; i++) {
296 tdesc = &(ether->tdesc->desclist[i]);
297
298 j = ((i + 1) / TX_DESC_SIZE);
299
300 if (j != 0) {
301 tdesc_phys = &(ether->tdesc_phys->desclist[0]);
302 ether->start_tx_ptr = (unsigned int)tdesc_phys;
303 tdesc->next = (unsigned int)ether->start_tx_ptr;
304 } else {
305 tdesc_phys = &(ether->tdesc_phys->desclist[i+1]);
306 tdesc->next = (unsigned int)tdesc_phys;
307 }
308
309 tdesc->buffer = (unsigned int)ether->tdesc_phys->tran_buf[i];
310 tdesc->sl = 0;
311 tdesc->mode = 0;
312 }
313
314 for (i = 0; i < RX_DESC_SIZE; i++) {
315 rdesc = &(ether->rdesc->desclist[i]);
316
317 j = ((i + 1) / RX_DESC_SIZE);
318
319 if (j != 0) {
320 rdesc_phys = &(ether->rdesc_phys->desclist[0]);
321 ether->start_rx_ptr = (unsigned int)rdesc_phys;
322 rdesc->next = (unsigned int)ether->start_rx_ptr;
323 } else {
324 rdesc_phys = &(ether->rdesc_phys->desclist[i+1]);
325 rdesc->next = (unsigned int)rdesc_phys;
326 }
327
328 rdesc->sl = RX_OWEN_DMA;
329 rdesc->buffer = (unsigned int)ether->rdesc_phys->recv_buf[i];
330 }
331}
332
333static void w90p910_set_fifo_threshold(struct net_device *dev)
334{
335 struct w90p910_ether *ether = netdev_priv(dev);
336 unsigned int val;
337
338 val = TXTHD | BLENGTH;
339 __raw_writel(val, ether->reg + REG_FFTCR);
340}
341
342static void w90p910_return_default_idle(struct net_device *dev)
343{
344 struct w90p910_ether *ether = netdev_priv(dev);
345 unsigned int val;
346
347 val = __raw_readl(ether->reg + REG_MCMDR);
348 val |= SWR;
349 __raw_writel(val, ether->reg + REG_MCMDR);
350}
351
352static void w90p910_trigger_rx(struct net_device *dev)
353{
354 struct w90p910_ether *ether = netdev_priv(dev);
355
356 __raw_writel(ENSTART, ether->reg + REG_RSDR);
357}
358
359static void w90p910_trigger_tx(struct net_device *dev)
360{
361 struct w90p910_ether *ether = netdev_priv(dev);
362
363 __raw_writel(ENSTART, ether->reg + REG_TSDR);
364}
365
366static void w90p910_enable_mac_interrupt(struct net_device *dev)
367{
368 struct w90p910_ether *ether = netdev_priv(dev);
369 unsigned int val;
370
371 val = ENTXINTR | ENRXINTR | ENRXGD | ENTXCP;
372 val |= ENTXBERR | ENRXBERR | ENTXABT;
373
374 __raw_writel(val, ether->reg + REG_MIEN);
375}
376
377static void w90p910_get_and_clear_int(struct net_device *dev,
378 unsigned int *val)
379{
380 struct w90p910_ether *ether = netdev_priv(dev);
381
382 *val = __raw_readl(ether->reg + REG_MISTA);
383 __raw_writel(*val, ether->reg + REG_MISTA);
384}
385
386static void w90p910_set_global_maccmd(struct net_device *dev)
387{
388 struct w90p910_ether *ether = netdev_priv(dev);
389 unsigned int val;
390
391 val = __raw_readl(ether->reg + REG_MCMDR);
392 val |= MCMDR_SPCRC | MCMDR_ENMDC | MCMDR_ACP | ENMDC;
393 __raw_writel(val, ether->reg + REG_MCMDR);
394}
395
396static void w90p910_enable_cam(struct net_device *dev)
397{
398 struct w90p910_ether *ether = netdev_priv(dev);
399 unsigned int val;
400
401 w90p910_write_cam(dev, CAM0, dev->dev_addr);
402
403 val = __raw_readl(ether->reg + REG_CAMEN);
404 val |= CAM0EN;
405 __raw_writel(val, ether->reg + REG_CAMEN);
406}
407
408static void w90p910_enable_cam_command(struct net_device *dev)
409{
410 struct w90p910_ether *ether = netdev_priv(dev);
411 unsigned int val;
412
413 val = CAMCMR_ECMP | CAMCMR_ABP | CAMCMR_AMP;
414 __raw_writel(val, ether->reg + REG_CAMCMR);
415}
416
417static void w90p910_enable_tx(struct net_device *dev, unsigned int enable)
418{
419 struct w90p910_ether *ether = netdev_priv(dev);
420 unsigned int val;
421
422 val = __raw_readl(ether->reg + REG_MCMDR);
423
424 if (enable)
425 val |= MCMDR_TXON;
426 else
427 val &= ~MCMDR_TXON;
428
429 __raw_writel(val, ether->reg + REG_MCMDR);
430}
431
432static void w90p910_enable_rx(struct net_device *dev, unsigned int enable)
433{
434 struct w90p910_ether *ether = netdev_priv(dev);
435 unsigned int val;
436
437 val = __raw_readl(ether->reg + REG_MCMDR);
438
439 if (enable)
440 val |= MCMDR_RXON;
441 else
442 val &= ~MCMDR_RXON;
443
444 __raw_writel(val, ether->reg + REG_MCMDR);
445}
446
447static void w90p910_set_curdest(struct net_device *dev)
448{
449 struct w90p910_ether *ether = netdev_priv(dev);
450
451 __raw_writel(ether->start_rx_ptr, ether->reg + REG_RXDLSA);
452 __raw_writel(ether->start_tx_ptr, ether->reg + REG_TXDLSA);
453}
454
455static void w90p910_reset_mac(struct net_device *dev)
456{
457 struct w90p910_ether *ether = netdev_priv(dev);
458
459 spin_lock(&ether->lock);
460
461 w90p910_enable_tx(dev, 0);
462 w90p910_enable_rx(dev, 0);
463 w90p910_set_fifo_threshold(dev);
464 w90p910_return_default_idle(dev);
465
466 if (!netif_queue_stopped(dev))
467 netif_stop_queue(dev);
468
469 w90p910_init_desc(dev);
470
471 dev->trans_start = jiffies;
472 ether->cur_tx = 0x0;
473 ether->finish_tx = 0x0;
474 ether->cur_rx = 0x0;
475
476 w90p910_set_curdest(dev);
477 w90p910_enable_cam(dev);
478 w90p910_enable_cam_command(dev);
479 w90p910_enable_mac_interrupt(dev);
480 w90p910_enable_tx(dev, 1);
481 w90p910_enable_rx(dev, 1);
482 w90p910_trigger_tx(dev);
483 w90p910_trigger_rx(dev);
484
485 dev->trans_start = jiffies;
486
487 if (netif_queue_stopped(dev))
488 netif_wake_queue(dev);
489
490 spin_unlock(&ether->lock);
491}
492
493static void w90p910_mdio_write(struct net_device *dev,
494 int phy_id, int reg, int data)
495{
496 struct w90p910_ether *ether = netdev_priv(dev);
497 struct platform_device *pdev;
498 unsigned int val, i;
499
500 pdev = ether->pdev;
501
502 __raw_writel(data, ether->reg + REG_MIID);
503
504 val = (phy_id << 0x08) | reg;
505 val |= PHYBUSY | PHYWR | MDCCR_VAL;
506 __raw_writel(val, ether->reg + REG_MIIDA);
507
508 for (i = 0; i < DELAY; i++) {
509 if ((__raw_readl(ether->reg + REG_MIIDA) & PHYBUSY) == 0)
510 break;
511 }
512
513 if (i == DELAY)
514 dev_warn(&pdev->dev, "mdio write timed out\n");
515}
516
517static int w90p910_mdio_read(struct net_device *dev, int phy_id, int reg)
518{
519 struct w90p910_ether *ether = netdev_priv(dev);
520 struct platform_device *pdev;
521 unsigned int val, i, data;
522
523 pdev = ether->pdev;
524
525 val = (phy_id << 0x08) | reg;
526 val |= PHYBUSY | MDCCR_VAL;
527 __raw_writel(val, ether->reg + REG_MIIDA);
528
529 for (i = 0; i < DELAY; i++) {
530 if ((__raw_readl(ether->reg + REG_MIIDA) & PHYBUSY) == 0)
531 break;
532 }
533
534 if (i == DELAY) {
535 dev_warn(&pdev->dev, "mdio read timed out\n");
536 data = 0xffff;
537 } else {
538 data = __raw_readl(ether->reg + REG_MIID);
539 }
540
541 return data;
542}
543
544static int set_mac_address(struct net_device *dev, void *addr)
545{
546 struct sockaddr *address = addr;
547
548 if (!is_valid_ether_addr(address->sa_data))
549 return -EADDRNOTAVAIL;
550
551 memcpy(dev->dev_addr, address->sa_data, dev->addr_len);
552 w90p910_write_cam(dev, CAM0, dev->dev_addr);
553
554 return 0;
555}
556
557static int w90p910_ether_close(struct net_device *dev)
558{
559 struct w90p910_ether *ether = netdev_priv(dev);
560
561 dma_free_writecombine(NULL, sizeof(struct w90p910_rxbd),
562 ether->rdesc, (dma_addr_t)ether->rdesc_phys);
563 dma_free_writecombine(NULL, sizeof(struct w90p910_txbd),
564 ether->tdesc, (dma_addr_t)ether->tdesc_phys);
565
566 netif_stop_queue(dev);
567
568 del_timer_sync(&ether->check_timer);
569 clk_disable(ether->rmiiclk);
570 clk_disable(ether->clk);
571
572 free_irq(ether->txirq, dev);
573 free_irq(ether->rxirq, dev);
574
575 return 0;
576}
577
578static struct net_device_stats *w90p910_ether_stats(struct net_device *dev)
579{
580 struct w90p910_ether *ether;
581
582 ether = netdev_priv(dev);
583
584 return &ether->stats;
585}
586
587static int w90p910_send_frame(struct net_device *dev,
588 unsigned char *data, int length)
589{
590 struct w90p910_ether *ether;
591 struct w90p910_txbd *txbd;
592 struct platform_device *pdev;
593 unsigned char *buffer;
594
595 ether = netdev_priv(dev);
596 pdev = ether->pdev;
597
598 txbd = &ether->tdesc->desclist[ether->cur_tx];
599 buffer = ether->tdesc->tran_buf[ether->cur_tx];
600 if (length > 1514) {
601 dev_err(&pdev->dev, "send data %d bytes, check it\n", length);
602 length = 1514;
603 }
604
605 txbd->sl = length & 0xFFFF;
606
607 memcpy(buffer, data, length);
608
609 txbd->mode = TX_OWEN_DMA | PADDINGMODE | CRCMODE | MACTXINTEN;
610
611 w90p910_enable_tx(dev, 1);
612
613 w90p910_trigger_tx(dev);
614
615 ether->cur_tx = (ether->cur_tx+1) % TX_DESC_SIZE;
616 txbd = &ether->tdesc->desclist[ether->cur_tx];
617
618 dev->trans_start = jiffies;
619
620 if (txbd->mode & TX_OWEN_DMA)
621 netif_stop_queue(dev);
622
623 return 0;
624}
625
626static int w90p910_ether_start_xmit(struct sk_buff *skb, struct net_device *dev)
627{
628 struct w90p910_ether *ether = netdev_priv(dev);
629
630 if (!(w90p910_send_frame(dev, skb->data, skb->len))) {
631 ether->skb = skb;
632 dev_kfree_skb_irq(skb);
633 return 0;
634 }
635 return -1;
636}
637
638static irqreturn_t w90p910_tx_interrupt(int irq, void *dev_id)
639{
640 struct w90p910_ether *ether;
641 struct w90p910_txbd *txbd;
642 struct platform_device *pdev;
643 struct tran_pdesc *tran_pdesc;
644 struct net_device *dev;
645 unsigned int cur_entry, entry, status;
646
647 dev = (struct net_device *)dev_id;
648 ether = netdev_priv(dev);
649 pdev = ether->pdev;
650
651 spin_lock(&ether->lock);
652
653 w90p910_get_and_clear_int(dev, &status);
654
655 cur_entry = __raw_readl(ether->reg + REG_CTXDSA);
656
657 tran_pdesc = ether->tdesc_phys;
658 entry = (unsigned int)(&tran_pdesc->desclist[ether->finish_tx]);
659
660 while (entry != cur_entry) {
661 txbd = &ether->tdesc->desclist[ether->finish_tx];
662
663 ether->finish_tx = (ether->finish_tx + 1) % TX_DESC_SIZE;
664
665 if (txbd->sl & TXDS_TXCP) {
666 ether->stats.tx_packets++;
667 ether->stats.tx_bytes += txbd->sl & 0xFFFF;
668 } else {
669 ether->stats.tx_errors++;
670 }
671
672 txbd->sl = 0x0;
673 txbd->mode = 0x0;
674
675 if (netif_queue_stopped(dev))
676 netif_wake_queue(dev);
677
678 entry = (unsigned int)(&tran_pdesc->desclist[ether->finish_tx]);
679 }
680
681 if (status & MISTA_EXDEF) {
682 dev_err(&pdev->dev, "emc defer exceed interrupt\n");
683 } else if (status & MISTA_TXBERR) {
684 dev_err(&pdev->dev, "emc bus error interrupt\n");
685 w90p910_reset_mac(dev);
686 } else if (status & MISTA_TDU) {
687 if (netif_queue_stopped(dev))
688 netif_wake_queue(dev);
689 }
690
691 spin_unlock(&ether->lock);
692
693 return IRQ_HANDLED;
694}
695
696static void netdev_rx(struct net_device *dev)
697{
698 struct w90p910_ether *ether;
699 struct w90p910_rxbd *rxbd;
700 struct platform_device *pdev;
701 struct recv_pdesc *rdesc_phys;
702 struct sk_buff *skb;
703 unsigned char *data;
704 unsigned int length, status, val, entry;
705
706 ether = netdev_priv(dev);
707 pdev = ether->pdev;
708 rdesc_phys = ether->rdesc_phys;
709
710 rxbd = &ether->rdesc->desclist[ether->cur_rx];
711
712 do {
713 val = __raw_readl(ether->reg + REG_CRXDSA);
714 entry = (unsigned int)&rdesc_phys->desclist[ether->cur_rx];
715
716 if (val == entry)
717 break;
718
719 status = rxbd->sl;
720 length = status & 0xFFFF;
721
722 if (status & RXDS_RXGD) {
723 data = ether->rdesc->recv_buf[ether->cur_rx];
724 skb = dev_alloc_skb(length+2);
725 if (!skb) {
726 dev_err(&pdev->dev, "get skb buffer error\n");
727 ether->stats.rx_dropped++;
728 return;
729 }
730
731 skb->dev = dev;
732 skb_reserve(skb, 2);
733 skb_put(skb, length);
734 skb_copy_to_linear_data(skb, data, length);
735 skb->protocol = eth_type_trans(skb, dev);
736 ether->stats.rx_packets++;
737 ether->stats.rx_bytes += length;
738 netif_rx(skb);
739 } else {
740 ether->stats.rx_errors++;
741
742 if (status & RXDS_RP) {
743 dev_err(&pdev->dev, "rx runt err\n");
744 ether->stats.rx_length_errors++;
745 } else if (status & RXDS_CRCE) {
746 dev_err(&pdev->dev, "rx crc err\n");
747 ether->stats.rx_crc_errors++;
748 }
749
750 if (status & RXDS_ALIE) {
751 dev_err(&pdev->dev, "rx aligment err\n");
752 ether->stats.rx_frame_errors++;
753 } else if (status & RXDS_PTLE) {
754 dev_err(&pdev->dev, "rx longer err\n");
755 ether->stats.rx_over_errors++;
756 }
757 }
758
759 rxbd->sl = RX_OWEN_DMA;
760 rxbd->reserved = 0x0;
761 ether->cur_rx = (ether->cur_rx+1) % RX_DESC_SIZE;
762 rxbd = &ether->rdesc->desclist[ether->cur_rx];
763
764 dev->last_rx = jiffies;
765 } while (1);
766}
767
768static irqreturn_t w90p910_rx_interrupt(int irq, void *dev_id)
769{
770 struct net_device *dev;
771 struct w90p910_ether *ether;
772 struct platform_device *pdev;
773 unsigned int status;
774
775 dev = (struct net_device *)dev_id;
776 ether = netdev_priv(dev);
777 pdev = ether->pdev;
778
779 spin_lock(&ether->lock);
780
781 w90p910_get_and_clear_int(dev, &status);
782
783 if (status & MISTA_RDU) {
784 netdev_rx(dev);
785
786 w90p910_trigger_rx(dev);
787
788 spin_unlock(&ether->lock);
789 return IRQ_HANDLED;
790 } else if (status & MISTA_RXBERR) {
791 dev_err(&pdev->dev, "emc rx bus error\n");
792 w90p910_reset_mac(dev);
793 }
794
795 netdev_rx(dev);
796 spin_unlock(&ether->lock);
797 return IRQ_HANDLED;
798}
799
800static int w90p910_ether_open(struct net_device *dev)
801{
802 struct w90p910_ether *ether;
803 struct platform_device *pdev;
804
805 ether = netdev_priv(dev);
806 pdev = ether->pdev;
807
808 w90p910_reset_mac(dev);
809 w90p910_set_fifo_threshold(dev);
810 w90p910_set_curdest(dev);
811 w90p910_enable_cam(dev);
812 w90p910_enable_cam_command(dev);
813 w90p910_enable_mac_interrupt(dev);
814 w90p910_set_global_maccmd(dev);
815 w90p910_enable_rx(dev, 1);
816
817 ether->rx_packets = 0x0;
818 ether->rx_bytes = 0x0;
819
820 if (request_irq(ether->txirq, w90p910_tx_interrupt,
821 0x0, pdev->name, dev)) {
822 dev_err(&pdev->dev, "register irq tx failed\n");
823 return -EAGAIN;
824 }
825
826 if (request_irq(ether->rxirq, w90p910_rx_interrupt,
827 0x0, pdev->name, dev)) {
828 dev_err(&pdev->dev, "register irq rx failed\n");
829 return -EAGAIN;
830 }
831
832 mod_timer(&ether->check_timer, jiffies + msecs_to_jiffies(1000));
833 netif_start_queue(dev);
834 w90p910_trigger_rx(dev);
835
836 dev_info(&pdev->dev, "%s is OPENED\n", dev->name);
837
838 return 0;
839}
840
841static void w90p910_ether_set_multicast_list(struct net_device *dev)
842{
843 struct w90p910_ether *ether;
844 unsigned int rx_mode;
845
846 ether = netdev_priv(dev);
847
848 if (dev->flags & IFF_PROMISC)
849 rx_mode = CAMCMR_AUP | CAMCMR_AMP | CAMCMR_ABP | CAMCMR_ECMP;
850 else if ((dev->flags & IFF_ALLMULTI) || dev->mc_list)
851 rx_mode = CAMCMR_AMP | CAMCMR_ABP | CAMCMR_ECMP;
852 else
853 rx_mode = CAMCMR_ECMP | CAMCMR_ABP;
854 __raw_writel(rx_mode, ether->reg + REG_CAMCMR);
855}
856
857static int w90p910_ether_ioctl(struct net_device *dev,
858 struct ifreq *ifr, int cmd)
859{
860 struct w90p910_ether *ether = netdev_priv(dev);
861 struct mii_ioctl_data *data = if_mii(ifr);
862
863 return generic_mii_ioctl(&ether->mii, data, cmd, NULL);
864}
865
866static void w90p910_get_drvinfo(struct net_device *dev,
867 struct ethtool_drvinfo *info)
868{
869 strcpy(info->driver, DRV_MODULE_NAME);
870 strcpy(info->version, DRV_MODULE_VERSION);
871}
872
873static int w90p910_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
874{
875 struct w90p910_ether *ether = netdev_priv(dev);
876 return mii_ethtool_gset(&ether->mii, cmd);
877}
878
879static int w90p910_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
880{
881 struct w90p910_ether *ether = netdev_priv(dev);
882 return mii_ethtool_sset(&ether->mii, cmd);
883}
884
885static int w90p910_nway_reset(struct net_device *dev)
886{
887 struct w90p910_ether *ether = netdev_priv(dev);
888 return mii_nway_restart(&ether->mii);
889}
890
891static u32 w90p910_get_link(struct net_device *dev)
892{
893 struct w90p910_ether *ether = netdev_priv(dev);
894 return mii_link_ok(&ether->mii);
895}
896
897static const struct ethtool_ops w90p910_ether_ethtool_ops = {
898 .get_settings = w90p910_get_settings,
899 .set_settings = w90p910_set_settings,
900 .get_drvinfo = w90p910_get_drvinfo,
901 .nway_reset = w90p910_nway_reset,
902 .get_link = w90p910_get_link,
903};
904
905static const struct net_device_ops w90p910_ether_netdev_ops = {
906 .ndo_open = w90p910_ether_open,
907 .ndo_stop = w90p910_ether_close,
908 .ndo_start_xmit = w90p910_ether_start_xmit,
909 .ndo_get_stats = w90p910_ether_stats,
910 .ndo_set_multicast_list = w90p910_ether_set_multicast_list,
911 .ndo_set_mac_address = set_mac_address,
912 .ndo_do_ioctl = w90p910_ether_ioctl,
913 .ndo_validate_addr = eth_validate_addr,
914 .ndo_change_mtu = eth_change_mtu,
915};
916
917static void __init get_mac_address(struct net_device *dev)
918{
919 struct w90p910_ether *ether = netdev_priv(dev);
920 struct platform_device *pdev;
921 char addr[6];
922
923 pdev = ether->pdev;
924
925 addr[0] = 0x00;
926 addr[1] = 0x02;
927 addr[2] = 0xac;
928 addr[3] = 0x55;
929 addr[4] = 0x88;
930 addr[5] = 0xa8;
931
932 if (is_valid_ether_addr(addr))
933 memcpy(dev->dev_addr, &addr, 0x06);
934 else
935 dev_err(&pdev->dev, "invalid mac address\n");
936}
937
938static int w90p910_ether_setup(struct net_device *dev)
939{
940 struct w90p910_ether *ether = netdev_priv(dev);
941
942 ether_setup(dev);
943 dev->netdev_ops = &w90p910_ether_netdev_ops;
944 dev->ethtool_ops = &w90p910_ether_ethtool_ops;
945
946 dev->tx_queue_len = 16;
947 dev->dma = 0x0;
948 dev->watchdog_timeo = TX_TIMEOUT;
949
950 get_mac_address(dev);
951
952 spin_lock_init(&ether->lock);
953
954 ether->cur_tx = 0x0;
955 ether->cur_rx = 0x0;
956 ether->finish_tx = 0x0;
957 ether->linkflag = 0x0;
958 ether->mii.phy_id = 0x01;
959 ether->mii.phy_id_mask = 0x1f;
960 ether->mii.reg_num_mask = 0x1f;
961 ether->mii.dev = dev;
962 ether->mii.mdio_read = w90p910_mdio_read;
963 ether->mii.mdio_write = w90p910_mdio_write;
964
965 setup_timer(&ether->check_timer, w90p910_check_link,
966 (unsigned long)dev);
967
968 return 0;
969}
970
971static int __devinit w90p910_ether_probe(struct platform_device *pdev)
972{
973 struct w90p910_ether *ether;
974 struct net_device *dev;
975 struct resource *res;
976 int error;
977
978 dev = alloc_etherdev(sizeof(struct w90p910_ether));
979 if (!dev)
980 return -ENOMEM;
981
982 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
983 if (res == NULL) {
984 dev_err(&pdev->dev, "failed to get I/O memory\n");
985 error = -ENXIO;
986 goto failed_free;
987 }
988
989 res = request_mem_region(res->start, resource_size(res), pdev->name);
990 if (res == NULL) {
991 dev_err(&pdev->dev, "failed to request I/O memory\n");
992 error = -EBUSY;
993 goto failed_free;
994 }
995
996 ether = netdev_priv(dev);
997
998 ether->reg = ioremap(res->start, resource_size(res));
999 if (ether->reg == NULL) {
1000 dev_err(&pdev->dev, "failed to remap I/O memory\n");
1001 error = -ENXIO;
1002 goto failed_free_mem;
1003 }
1004
1005 ether->txirq = platform_get_irq(pdev, 0);
1006 if (ether->txirq < 0) {
1007 dev_err(&pdev->dev, "failed to get ether tx irq\n");
1008 error = -ENXIO;
1009 goto failed_free_io;
1010 }
1011
1012 ether->rxirq = platform_get_irq(pdev, 1);
1013 if (ether->rxirq < 0) {
1014 dev_err(&pdev->dev, "failed to get ether rx irq\n");
1015 error = -ENXIO;
1016 goto failed_free_txirq;
1017 }
1018
1019 platform_set_drvdata(pdev, dev);
1020
1021 ether->clk = clk_get(&pdev->dev, NULL);
1022 if (IS_ERR(ether->clk)) {
1023 dev_err(&pdev->dev, "failed to get ether clock\n");
1024 error = PTR_ERR(ether->clk);
1025 goto failed_free_rxirq;
1026 }
1027
1028 ether->rmiiclk = clk_get(&pdev->dev, "RMII");
1029 if (IS_ERR(ether->rmiiclk)) {
1030 dev_err(&pdev->dev, "failed to get ether clock\n");
1031 error = PTR_ERR(ether->rmiiclk);
1032 goto failed_put_clk;
1033 }
1034
1035 ether->pdev = pdev;
1036
1037 w90p910_ether_setup(dev);
1038
1039 error = register_netdev(dev);
1040 if (error != 0) {
1041 dev_err(&pdev->dev, "Regiter EMC w90p910 FAILED\n");
1042 error = -ENODEV;
1043 goto failed_put_rmiiclk;
1044 }
1045
1046 return 0;
1047failed_put_rmiiclk:
1048 clk_put(ether->rmiiclk);
1049failed_put_clk:
1050 clk_put(ether->clk);
1051failed_free_rxirq:
1052 free_irq(ether->rxirq, pdev);
1053 platform_set_drvdata(pdev, NULL);
1054failed_free_txirq:
1055 free_irq(ether->txirq, pdev);
1056failed_free_io:
1057 iounmap(ether->reg);
1058failed_free_mem:
1059 release_mem_region(res->start, resource_size(res));
1060failed_free:
1061 free_netdev(dev);
1062 return error;
1063}
1064
1065static int __devexit w90p910_ether_remove(struct platform_device *pdev)
1066{
1067 struct net_device *dev = platform_get_drvdata(pdev);
1068 struct w90p910_ether *ether = netdev_priv(dev);
1069
1070 unregister_netdev(dev);
1071 clk_put(ether->rmiiclk);
1072 clk_put(ether->clk);
1073 del_timer_sync(&ether->check_timer);
1074 platform_set_drvdata(pdev, NULL);
1075 free_netdev(dev);
1076 return 0;
1077}
1078
1079static struct platform_driver w90p910_ether_driver = {
1080 .probe = w90p910_ether_probe,
1081 .remove = __devexit_p(w90p910_ether_remove),
1082 .driver = {
1083 .name = "w90p910-emc",
1084 .owner = THIS_MODULE,
1085 },
1086};
1087
1088static int __init w90p910_ether_init(void)
1089{
1090 return platform_driver_register(&w90p910_ether_driver);
1091}
1092
1093static void __exit w90p910_ether_exit(void)
1094{
1095 platform_driver_unregister(&w90p910_ether_driver);
1096}
1097
1098module_init(w90p910_ether_init);
1099module_exit(w90p910_ether_exit);
1100
1101MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>");
1102MODULE_DESCRIPTION("w90p910 MAC driver!");
1103MODULE_LICENSE("GPL");
1104MODULE_ALIAS("platform:w90p910-emc");
1105
diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c
index 18b566ad4fd..cf30e278f18 100644
--- a/drivers/net/at1700.c
+++ b/drivers/net/at1700.c
@@ -318,7 +318,7 @@ static int __init at1700_probe1(struct net_device *dev, int ioaddr)
318 pos3 = mca_read_stored_pos( slot, 3 ); 318 pos3 = mca_read_stored_pos( slot, 3 );
319 pos4 = mca_read_stored_pos( slot, 4 ); 319 pos4 = mca_read_stored_pos( slot, 4 );
320 320
321 for (l_i = 0; l_i < 0x09; l_i++) 321 for (l_i = 0; l_i < 8; l_i++)
322 if (( pos3 & 0x07) == at1700_ioaddr_pattern[l_i]) 322 if (( pos3 & 0x07) == at1700_ioaddr_pattern[l_i])
323 break; 323 break;
324 ioaddr = at1700_mca_probe_list[l_i]; 324 ioaddr = at1700_mca_probe_list[l_i];
diff --git a/drivers/net/atl1c/atl1c.h b/drivers/net/atl1c/atl1c.h
index e1658ef3fcd..2a1120ad2e7 100644
--- a/drivers/net/atl1c/atl1c.h
+++ b/drivers/net/atl1c/atl1c.h
@@ -188,14 +188,14 @@ struct atl1c_tpd_ext_desc {
188#define RRS_HDS_TYPE_DATA 2 188#define RRS_HDS_TYPE_DATA 2
189 189
190#define RRS_IS_NO_HDS_TYPE(flag) \ 190#define RRS_IS_NO_HDS_TYPE(flag) \
191 (((flag) >> (RRS_HDS_TYPE_SHIFT)) & RRS_HDS_TYPE_MASK == 0) 191 ((((flag) >> (RRS_HDS_TYPE_SHIFT)) & RRS_HDS_TYPE_MASK) == 0)
192 192
193#define RRS_IS_HDS_HEAD(flag) \ 193#define RRS_IS_HDS_HEAD(flag) \
194 (((flag) >> (RRS_HDS_TYPE_SHIFT)) & RRS_HDS_TYPE_MASK == \ 194 ((((flag) >> (RRS_HDS_TYPE_SHIFT)) & RRS_HDS_TYPE_MASK) == \
195 RRS_HDS_TYPE_HEAD) 195 RRS_HDS_TYPE_HEAD)
196 196
197#define RRS_IS_HDS_DATA(flag) \ 197#define RRS_IS_HDS_DATA(flag) \
198 (((flag) >> (RRS_HDS_TYPE_SHIFT)) & RRS_HDS_TYPE_MASK == \ 198 ((((flag) >> (RRS_HDS_TYPE_SHIFT)) & RRS_HDS_TYPE_MASK) == \
199 RRS_HDS_TYPE_DATA) 199 RRS_HDS_TYPE_DATA)
200 200
201/* rrs word 3 bit 0:31 */ 201/* rrs word 3 bit 0:31 */
@@ -245,7 +245,7 @@ struct atl1c_tpd_ext_desc {
245#define RRS_PACKET_TYPE_802_3 1 245#define RRS_PACKET_TYPE_802_3 1
246#define RRS_PACKET_TYPE_ETH 0 246#define RRS_PACKET_TYPE_ETH 0
247#define RRS_PACKET_IS_ETH(word) \ 247#define RRS_PACKET_IS_ETH(word) \
248 (((word) >> RRS_PACKET_TYPE_SHIFT) & RRS_PACKET_TYPE_MASK == \ 248 ((((word) >> RRS_PACKET_TYPE_SHIFT) & RRS_PACKET_TYPE_MASK) == \
249 RRS_PACKET_TYPE_ETH) 249 RRS_PACKET_TYPE_ETH)
250#define RRS_RXD_IS_VALID(word) \ 250#define RRS_RXD_IS_VALID(word) \
251 ((((word) >> RRS_RXD_UPDATED_SHIFT) & RRS_RXD_UPDATED_MASK) == 1) 251 ((((word) >> RRS_RXD_UPDATED_SHIFT) & RRS_RXD_UPDATED_MASK) == 1)
diff --git a/drivers/net/atl1c/atl1c_main.c b/drivers/net/atl1c/atl1c_main.c
index cd547a205fb..a383122679d 100644
--- a/drivers/net/atl1c/atl1c_main.c
+++ b/drivers/net/atl1c/atl1c_main.c
@@ -1689,7 +1689,7 @@ static void atl1c_clean_rx_irq(struct atl1c_adapter *adapter, u8 que,
1689 if (likely(RRS_RXD_IS_VALID(rrs->word3))) { 1689 if (likely(RRS_RXD_IS_VALID(rrs->word3))) {
1690 rfd_num = (rrs->word0 >> RRS_RX_RFD_CNT_SHIFT) & 1690 rfd_num = (rrs->word0 >> RRS_RX_RFD_CNT_SHIFT) &
1691 RRS_RX_RFD_CNT_MASK; 1691 RRS_RX_RFD_CNT_MASK;
1692 if (unlikely(rfd_num) != 1) 1692 if (unlikely(rfd_num != 1))
1693 /* TODO support mul rfd*/ 1693 /* TODO support mul rfd*/
1694 if (netif_msg_rx_err(adapter)) 1694 if (netif_msg_rx_err(adapter))
1695 dev_warn(&pdev->dev, 1695 dev_warn(&pdev->dev,
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index c43f6a11929..dea3155688b 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -667,7 +667,7 @@ static void skb_fill_rx_data(struct be_adapter *adapter,
667 struct be_queue_info *rxq = &adapter->rx_obj.q; 667 struct be_queue_info *rxq = &adapter->rx_obj.q;
668 struct be_rx_page_info *page_info; 668 struct be_rx_page_info *page_info;
669 u16 rxq_idx, i, num_rcvd, j; 669 u16 rxq_idx, i, num_rcvd, j;
670 u32 pktsize, hdr_len, curr_frag_len; 670 u32 pktsize, hdr_len, curr_frag_len, size;
671 u8 *start; 671 u8 *start;
672 672
673 rxq_idx = AMAP_GET_BITS(struct amap_eth_rx_compl, fragndx, rxcp); 673 rxq_idx = AMAP_GET_BITS(struct amap_eth_rx_compl, fragndx, rxcp);
@@ -708,12 +708,13 @@ static void skb_fill_rx_data(struct be_adapter *adapter,
708 } 708 }
709 709
710 /* More frags present for this completion */ 710 /* More frags present for this completion */
711 pktsize -= curr_frag_len; /* account for above copied frag */ 711 size = pktsize;
712 for (i = 1, j = 0; i < num_rcvd; i++) { 712 for (i = 1, j = 0; i < num_rcvd; i++) {
713 size -= curr_frag_len;
713 index_inc(&rxq_idx, rxq->len); 714 index_inc(&rxq_idx, rxq->len);
714 page_info = get_rx_page_info(adapter, rxq_idx); 715 page_info = get_rx_page_info(adapter, rxq_idx);
715 716
716 curr_frag_len = min(pktsize, rx_frag_size); 717 curr_frag_len = min(size, rx_frag_size);
717 718
718 /* Coalesce all frags from the same physical page in one slot */ 719 /* Coalesce all frags from the same physical page in one slot */
719 if (page_info->page_offset == 0) { 720 if (page_info->page_offset == 0) {
@@ -731,7 +732,6 @@ static void skb_fill_rx_data(struct be_adapter *adapter,
731 skb_shinfo(skb)->frags[j].size += curr_frag_len; 732 skb_shinfo(skb)->frags[j].size += curr_frag_len;
732 skb->len += curr_frag_len; 733 skb->len += curr_frag_len;
733 skb->data_len += curr_frag_len; 734 skb->data_len += curr_frag_len;
734 pktsize -= curr_frag_len;
735 735
736 memset(page_info, 0, sizeof(*page_info)); 736 memset(page_info, 0, sizeof(*page_info));
737 } 737 }
diff --git a/drivers/net/bnx2x_link.c b/drivers/net/bnx2x_link.c
index ed648acef7c..2ee581a2cde 100644
--- a/drivers/net/bnx2x_link.c
+++ b/drivers/net/bnx2x_link.c
@@ -4212,13 +4212,14 @@ static void bnx2x_turn_off_sf(struct bnx2x *bp, u8 port)
4212u8 bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 driver_loaded, 4212u8 bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 driver_loaded,
4213 u8 *version, u16 len) 4213 u8 *version, u16 len)
4214{ 4214{
4215 struct bnx2x *bp = params->bp; 4215 struct bnx2x *bp;
4216 u32 ext_phy_type = 0; 4216 u32 ext_phy_type = 0;
4217 u32 spirom_ver = 0; 4217 u32 spirom_ver = 0;
4218 u8 status = 0 ; 4218 u8 status = 0 ;
4219 4219
4220 if (version == NULL || params == NULL) 4220 if (version == NULL || params == NULL)
4221 return -EINVAL; 4221 return -EINVAL;
4222 bp = params->bp;
4222 4223
4223 spirom_ver = REG_RD(bp, params->shmem_base + 4224 spirom_ver = REG_RD(bp, params->shmem_base +
4224 offsetof(struct shmem_region, 4225 offsetof(struct shmem_region,
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index d927f71af8a..aa1be1fecee 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1459,8 +1459,16 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1459 * ether type (eg ARPHRD_ETHER and ARPHRD_INFINIBAND) share the same bond 1459 * ether type (eg ARPHRD_ETHER and ARPHRD_INFINIBAND) share the same bond
1460 */ 1460 */
1461 if (bond->slave_cnt == 0) { 1461 if (bond->slave_cnt == 0) {
1462 if (slave_dev->type != ARPHRD_ETHER) 1462 if (bond_dev->type != slave_dev->type) {
1463 bond_setup_by_slave(bond_dev, slave_dev); 1463 dev_close(bond_dev);
1464 pr_debug("%s: change device type from %d to %d\n",
1465 bond_dev->name, bond_dev->type, slave_dev->type);
1466 if (slave_dev->type != ARPHRD_ETHER)
1467 bond_setup_by_slave(bond_dev, slave_dev);
1468 else
1469 ether_setup(bond_dev);
1470 dev_open(bond_dev);
1471 }
1464 } else if (bond_dev->type != slave_dev->type) { 1472 } else if (bond_dev->type != slave_dev->type) {
1465 pr_err(DRV_NAME ": %s ether type (%d) is different " 1473 pr_err(DRV_NAME ": %s ether type (%d) is different "
1466 "from other slaves (%d), can not enslave it.\n", 1474 "from other slaves (%d), can not enslave it.\n",
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index 574daddc21b..9e4283aff82 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -346,7 +346,7 @@ void can_restart(unsigned long data)
346 skb = dev_alloc_skb(sizeof(struct can_frame)); 346 skb = dev_alloc_skb(sizeof(struct can_frame));
347 if (skb == NULL) { 347 if (skb == NULL) {
348 err = -ENOMEM; 348 err = -ENOMEM;
349 goto out; 349 goto restart;
350 } 350 }
351 skb->dev = dev; 351 skb->dev = dev;
352 skb->protocol = htons(ETH_P_CAN); 352 skb->protocol = htons(ETH_P_CAN);
@@ -361,13 +361,13 @@ void can_restart(unsigned long data)
361 stats->rx_packets++; 361 stats->rx_packets++;
362 stats->rx_bytes += cf->can_dlc; 362 stats->rx_bytes += cf->can_dlc;
363 363
364restart:
364 dev_dbg(dev->dev.parent, "restarted\n"); 365 dev_dbg(dev->dev.parent, "restarted\n");
365 priv->can_stats.restarts++; 366 priv->can_stats.restarts++;
366 367
367 /* Now restart the device */ 368 /* Now restart the device */
368 err = priv->do_set_mode(dev, CAN_MODE_START); 369 err = priv->do_set_mode(dev, CAN_MODE_START);
369 370
370out:
371 netif_carrier_on(dev); 371 netif_carrier_on(dev);
372 if (err) 372 if (err)
373 dev_err(dev->dev.parent, "Error %d during restart", err); 373 dev_err(dev->dev.parent, "Error %d during restart", err);
@@ -473,6 +473,10 @@ int open_candev(struct net_device *dev)
473 return -EINVAL; 473 return -EINVAL;
474 } 474 }
475 475
476 /* Switch carrier on if device was stopped while in bus-off state */
477 if (!netif_carrier_ok(dev))
478 netif_carrier_on(dev);
479
476 setup_timer(&priv->restart_timer, can_restart, (unsigned long)dev); 480 setup_timer(&priv->restart_timer, can_restart, (unsigned long)dev);
477 481
478 return 0; 482 return 0;
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c
index 571f133a8fe..08ebee79d8a 100644
--- a/drivers/net/can/sja1000/sja1000.c
+++ b/drivers/net/can/sja1000/sja1000.c
@@ -63,7 +63,6 @@
63#include <linux/can.h> 63#include <linux/can.h>
64#include <linux/can/dev.h> 64#include <linux/can/dev.h>
65#include <linux/can/error.h> 65#include <linux/can/error.h>
66#include <linux/can/dev.h>
67 66
68#include "sja1000.h" 67#include "sja1000.h"
69 68
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index 4d1515f45ba..4869d77cbe9 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -227,7 +227,7 @@ static int cnic_send_nlmsg(struct cnic_local *cp, u32 type,
227 } 227 }
228 228
229 rcu_read_lock(); 229 rcu_read_lock();
230 ulp_ops = rcu_dereference(cp->ulp_ops[CNIC_ULP_ISCSI]); 230 ulp_ops = rcu_dereference(cnic_ulp_tbl[CNIC_ULP_ISCSI]);
231 if (ulp_ops) 231 if (ulp_ops)
232 ulp_ops->iscsi_nl_send_msg(cp->dev, msg_type, buf, len); 232 ulp_ops->iscsi_nl_send_msg(cp->dev, msg_type, buf, len);
233 rcu_read_unlock(); 233 rcu_read_unlock();
@@ -319,6 +319,20 @@ static int cnic_abort_prep(struct cnic_sock *csk)
319 return 0; 319 return 0;
320} 320}
321 321
322static void cnic_uio_stop(void)
323{
324 struct cnic_dev *dev;
325
326 read_lock(&cnic_dev_lock);
327 list_for_each_entry(dev, &cnic_dev_list, list) {
328 struct cnic_local *cp = dev->cnic_priv;
329
330 if (cp->cnic_uinfo)
331 cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL);
332 }
333 read_unlock(&cnic_dev_lock);
334}
335
322int cnic_register_driver(int ulp_type, struct cnic_ulp_ops *ulp_ops) 336int cnic_register_driver(int ulp_type, struct cnic_ulp_ops *ulp_ops)
323{ 337{
324 struct cnic_dev *dev; 338 struct cnic_dev *dev;
@@ -390,6 +404,9 @@ int cnic_unregister_driver(int ulp_type)
390 } 404 }
391 read_unlock(&cnic_dev_lock); 405 read_unlock(&cnic_dev_lock);
392 406
407 if (ulp_type == CNIC_ULP_ISCSI)
408 cnic_uio_stop();
409
393 rcu_assign_pointer(cnic_ulp_tbl[ulp_type], NULL); 410 rcu_assign_pointer(cnic_ulp_tbl[ulp_type], NULL);
394 411
395 mutex_unlock(&cnic_lock); 412 mutex_unlock(&cnic_lock);
@@ -632,7 +649,6 @@ static void cnic_free_resc(struct cnic_dev *dev)
632 int i = 0; 649 int i = 0;
633 650
634 if (cp->cnic_uinfo) { 651 if (cp->cnic_uinfo) {
635 cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL);
636 while (cp->uio_dev != -1 && i < 15) { 652 while (cp->uio_dev != -1 && i < 15) {
637 msleep(100); 653 msleep(100);
638 i++; 654 i++;
@@ -1057,6 +1073,9 @@ static void cnic_ulp_stop(struct cnic_dev *dev)
1057 struct cnic_local *cp = dev->cnic_priv; 1073 struct cnic_local *cp = dev->cnic_priv;
1058 int if_type; 1074 int if_type;
1059 1075
1076 if (cp->cnic_uinfo)
1077 cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL);
1078
1060 rcu_read_lock(); 1079 rcu_read_lock();
1061 for (if_type = 0; if_type < MAX_CNIC_ULP_TYPE; if_type++) { 1080 for (if_type = 0; if_type < MAX_CNIC_ULP_TYPE; if_type++) {
1062 struct cnic_ulp_ops *ulp_ops; 1081 struct cnic_ulp_ops *ulp_ops;
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index efa680f4b8d..41b648a67fe 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -1897,6 +1897,9 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
1897 1897
1898 if (ioread8(&nic->csr->scb.status) & rus_no_res) 1898 if (ioread8(&nic->csr->scb.status) & rus_no_res)
1899 nic->ru_running = RU_SUSPENDED; 1899 nic->ru_running = RU_SUSPENDED;
1900 pci_dma_sync_single_for_device(nic->pdev, rx->dma_addr,
1901 sizeof(struct rfd),
1902 PCI_DMA_BIDIRECTIONAL);
1900 return -ENODATA; 1903 return -ENODATA;
1901 } 1904 }
1902 1905
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c
index cc2ab6412c7..4f700348534 100644
--- a/drivers/net/eepro.c
+++ b/drivers/net/eepro.c
@@ -1784,7 +1784,7 @@ int __init init_module(void)
1784 printk(KERN_INFO "eepro_init_module: Auto-detecting boards (May God protect us...)\n"); 1784 printk(KERN_INFO "eepro_init_module: Auto-detecting boards (May God protect us...)\n");
1785 } 1785 }
1786 1786
1787 for (i = 0; io[i] != -1 && i < MAX_EEPRO; i++) { 1787 for (i = 0; i < MAX_EEPRO && io[i] != -1; i++) {
1788 dev = alloc_etherdev(sizeof(struct eepro_local)); 1788 dev = alloc_etherdev(sizeof(struct eepro_local));
1789 if (!dev) 1789 if (!dev)
1790 break; 1790 break;
diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c
index 1686dca2874..1f016d66684 100644
--- a/drivers/net/eexpress.c
+++ b/drivers/net/eexpress.c
@@ -1474,13 +1474,13 @@ static void eexp_hw_init586(struct net_device *dev)
1474 outw(0x0000, ioaddr + 0x800c); 1474 outw(0x0000, ioaddr + 0x800c);
1475 outw(0x0000, ioaddr + 0x800e); 1475 outw(0x0000, ioaddr + 0x800e);
1476 1476
1477 for (i = 0; i < (sizeof(start_code)); i+=32) { 1477 for (i = 0; i < ARRAY_SIZE(start_code) * 2; i+=32) {
1478 int j; 1478 int j;
1479 outw(i, ioaddr + SM_PTR); 1479 outw(i, ioaddr + SM_PTR);
1480 for (j = 0; j < 16; j+=2) 1480 for (j = 0; j < 16 && (i+j)/2 < ARRAY_SIZE(start_code); j+=2)
1481 outw(start_code[(i+j)/2], 1481 outw(start_code[(i+j)/2],
1482 ioaddr+0x4000+j); 1482 ioaddr+0x4000+j);
1483 for (j = 0; j < 16; j+=2) 1483 for (j = 0; j < 16 && (i+j+16)/2 < ARRAY_SIZE(start_code); j+=2)
1484 outw(start_code[(i+j+16)/2], 1484 outw(start_code[(i+j+16)/2],
1485 ioaddr+0x8000+j); 1485 ioaddr+0x8000+j);
1486 } 1486 }
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h
index 78952f8324e..fa311a95099 100644
--- a/drivers/net/ehea/ehea.h
+++ b/drivers/net/ehea/ehea.h
@@ -40,7 +40,7 @@
40#include <asm/io.h> 40#include <asm/io.h>
41 41
42#define DRV_NAME "ehea" 42#define DRV_NAME "ehea"
43#define DRV_VERSION "EHEA_0101" 43#define DRV_VERSION "EHEA_0102"
44 44
45/* eHEA capability flags */ 45/* eHEA capability flags */
46#define DLPAR_PORT_ADD_REM 1 46#define DLPAR_PORT_ADD_REM 1
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index e8d46cc1bec..977c3d35827 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -1545,6 +1545,9 @@ static int ehea_clean_portres(struct ehea_port *port, struct ehea_port_res *pr)
1545{ 1545{
1546 int ret, i; 1546 int ret, i;
1547 1547
1548 if (pr->qp)
1549 netif_napi_del(&pr->napi);
1550
1548 ret = ehea_destroy_qp(pr->qp); 1551 ret = ehea_destroy_qp(pr->qp);
1549 1552
1550 if (!ret) { 1553 if (!ret) {
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c
index 48385c42ab5..160655d2458 100644
--- a/drivers/net/fealnx.c
+++ b/drivers/net/fealnx.c
@@ -584,7 +584,8 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
584 if (np->flags == HAS_MII_XCVR) { 584 if (np->flags == HAS_MII_XCVR) {
585 int phy, phy_idx = 0; 585 int phy, phy_idx = 0;
586 586
587 for (phy = 1; phy < 32 && phy_idx < 4; phy++) { 587 for (phy = 1; phy < 32 && phy_idx < ARRAY_SIZE(np->phys);
588 phy++) {
588 int mii_status = mdio_read(dev, phy, 1); 589 int mii_status = mdio_read(dev, phy, 1);
589 590
590 if (mii_status != 0xffff && mii_status != 0x0000) { 591 if (mii_status != 0xffff && mii_status != 0x0000) {
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index b892c3ad9a7..2bc2d2b2064 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -754,17 +754,16 @@ static int fs_init_phy(struct net_device *dev)
754 fep->oldlink = 0; 754 fep->oldlink = 0;
755 fep->oldspeed = 0; 755 fep->oldspeed = 0;
756 fep->oldduplex = -1; 756 fep->oldduplex = -1;
757 if(fep->fpi->phy_node) 757
758 phydev = of_phy_connect(dev, fep->fpi->phy_node, 758 phydev = of_phy_connect(dev, fep->fpi->phy_node, &fs_adjust_link, 0,
759 &fs_adjust_link, 0, 759 PHY_INTERFACE_MODE_MII);
760 PHY_INTERFACE_MODE_MII); 760 if (!phydev) {
761 else { 761 phydev = of_phy_connect_fixed_link(dev, &fs_adjust_link,
762 printk("No phy bus ID specified in BSP code\n"); 762 PHY_INTERFACE_MODE_MII);
763 return -EINVAL;
764 } 763 }
765 if (IS_ERR(phydev)) { 764 if (!phydev) {
766 printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); 765 dev_err(&dev->dev, "Could not attach to PHY\n");
767 return PTR_ERR(phydev); 766 return -ENODEV;
768 } 767 }
769 768
770 fep->phydev = phydev; 769 fep->phydev = phydev;
@@ -1005,6 +1004,7 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
1005 goto out_free_fpi; 1004 goto out_free_fpi;
1006 } 1005 }
1007 1006
1007 SET_NETDEV_DEV(ndev, &ofdev->dev);
1008 dev_set_drvdata(&ofdev->dev, ndev); 1008 dev_set_drvdata(&ofdev->dev, ndev);
1009 1009
1010 fep = netdev_priv(ndev); 1010 fep = netdev_priv(ndev);
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 43d813ed9f4..f8ffcbf0bc3 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -264,15 +264,6 @@ static int gfar_of_init(struct net_device *dev)
264 priv->device_flags |= FSL_GIANFAR_DEV_HAS_MAGIC_PACKET; 264 priv->device_flags |= FSL_GIANFAR_DEV_HAS_MAGIC_PACKET;
265 265
266 priv->phy_node = of_parse_phandle(np, "phy-handle", 0); 266 priv->phy_node = of_parse_phandle(np, "phy-handle", 0);
267 if (!priv->phy_node) {
268 u32 *fixed_link;
269
270 fixed_link = (u32 *)of_get_property(np, "fixed-link", NULL);
271 if (!fixed_link) {
272 err = -ENODEV;
273 goto err_out;
274 }
275 }
276 267
277 /* Find the TBI PHY. If it's not there, we don't support SGMII */ 268 /* Find the TBI PHY. If it's not there, we don't support SGMII */
278 priv->tbi_node = of_parse_phandle(np, "tbi-handle", 0); 269 priv->tbi_node = of_parse_phandle(np, "tbi-handle", 0);
@@ -659,13 +650,14 @@ static int init_phy(struct net_device *dev)
659 650
660 interface = gfar_get_interface(dev); 651 interface = gfar_get_interface(dev);
661 652
662 if (priv->phy_node) { 653 priv->phydev = of_phy_connect(dev, priv->phy_node, &adjust_link, 0,
663 priv->phydev = of_phy_connect(dev, priv->phy_node, &adjust_link, 654 interface);
664 0, interface); 655 if (!priv->phydev)
665 if (!priv->phydev) { 656 priv->phydev = of_phy_connect_fixed_link(dev, &adjust_link,
666 dev_err(&dev->dev, "error: Could not attach to PHY\n"); 657 interface);
667 return -ENODEV; 658 if (!priv->phydev) {
668 } 659 dev_err(&dev->dev, "could not attach to PHY\n");
660 return -ENODEV;
669 } 661 }
670 662
671 if (interface == PHY_INTERFACE_MODE_SGMII) 663 if (interface == PHY_INTERFACE_MODE_SGMII)
diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c
index dbf06e9313c..2234118eedb 100644
--- a/drivers/net/gianfar_ethtool.c
+++ b/drivers/net/gianfar_ethtool.c
@@ -366,9 +366,8 @@ static int gfar_scoalesce(struct net_device *dev, struct ethtool_coalesce *cvals
366 return -EINVAL; 366 return -EINVAL;
367 } 367 }
368 368
369 priv->rxic = mk_ic_value( 369 priv->rxic = mk_ic_value(cvals->rx_max_coalesced_frames,
370 gfar_usecs2ticks(priv, cvals->rx_coalesce_usecs), 370 gfar_usecs2ticks(priv, cvals->rx_coalesce_usecs));
371 cvals->rx_max_coalesced_frames);
372 371
373 /* Set up tx coalescing */ 372 /* Set up tx coalescing */
374 if ((cvals->tx_coalesce_usecs == 0) || 373 if ((cvals->tx_coalesce_usecs == 0) ||
@@ -390,9 +389,8 @@ static int gfar_scoalesce(struct net_device *dev, struct ethtool_coalesce *cvals
390 return -EINVAL; 389 return -EINVAL;
391 } 390 }
392 391
393 priv->txic = mk_ic_value( 392 priv->txic = mk_ic_value(cvals->tx_max_coalesced_frames,
394 gfar_usecs2ticks(priv, cvals->tx_coalesce_usecs), 393 gfar_usecs2ticks(priv, cvals->tx_coalesce_usecs));
395 cvals->tx_max_coalesced_frames);
396 394
397 gfar_write(&priv->regs->rxic, 0); 395 gfar_write(&priv->regs->rxic, 0);
398 if (priv->rxcoalescing) 396 if (priv->rxcoalescing)
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 155160052c8..981ab530e9a 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -3,7 +3,7 @@
3 * devices like TTY. It interfaces between a raw TTY and the 3 * devices like TTY. It interfaces between a raw TTY and the
4 * kernel's AX.25 protocol layers. 4 * kernel's AX.25 protocol layers.
5 * 5 *
6 * Authors: Andreas Könsgen <ajk@iehk.rwth-aachen.de> 6 * Authors: Andreas Könsgen <ajk@comnets.uni-bremen.de>
7 * Ralf Baechle DL5RB <ralf@linux-mips.org> 7 * Ralf Baechle DL5RB <ralf@linux-mips.org>
8 * 8 *
9 * Quite a lot of stuff "stolen" by Joerg Reuter from slip.c, written by 9 * Quite a lot of stuff "stolen" by Joerg Reuter from slip.c, written by
diff --git a/drivers/net/ibm_newemac/rgmii.c b/drivers/net/ibm_newemac/rgmii.c
index 1d5379de690..8d76cb89dbd 100644
--- a/drivers/net/ibm_newemac/rgmii.c
+++ b/drivers/net/ibm_newemac/rgmii.c
@@ -188,11 +188,12 @@ void rgmii_put_mdio(struct of_device *ofdev, int input)
188void rgmii_detach(struct of_device *ofdev, int input) 188void rgmii_detach(struct of_device *ofdev, int input)
189{ 189{
190 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); 190 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
191 struct rgmii_regs __iomem *p = dev->base; 191 struct rgmii_regs __iomem *p;
192
193 mutex_lock(&dev->lock);
194 192
195 BUG_ON(!dev || dev->users == 0); 193 BUG_ON(!dev || dev->users == 0);
194 p = dev->base;
195
196 mutex_lock(&dev->lock);
196 197
197 RGMII_DBG(dev, "detach(%d)" NL, input); 198 RGMII_DBG(dev, "detach(%d)" NL, input);
198 199
diff --git a/drivers/net/igbvf/vf.c b/drivers/net/igbvf/vf.c
index 2a4faf9ade6..a9a61efa964 100644
--- a/drivers/net/igbvf/vf.c
+++ b/drivers/net/igbvf/vf.c
@@ -274,6 +274,8 @@ static s32 e1000_set_vfta_vf(struct e1000_hw *hw, u16 vid, bool set)
274 274
275 err = mbx->ops.read_posted(hw, msgbuf, 2); 275 err = mbx->ops.read_posted(hw, msgbuf, 2);
276 276
277 msgbuf[0] &= ~E1000_VT_MSGTYPE_CTS;
278
277 /* if nacked the vlan was rejected */ 279 /* if nacked the vlan was rejected */
278 if (!err && (msgbuf[0] == (E1000_VF_SET_VLAN | E1000_VT_MSGTYPE_NACK))) 280 if (!err && (msgbuf[0] == (E1000_VF_SET_VLAN | E1000_VT_MSGTYPE_NACK)))
279 err = -E1000_ERR_MAC_INIT; 281 err = -E1000_ERR_MAC_INIT;
@@ -317,6 +319,8 @@ static void e1000_rar_set_vf(struct e1000_hw *hw, u8 * addr, u32 index)
317 if (!ret_val) 319 if (!ret_val)
318 ret_val = mbx->ops.read_posted(hw, msgbuf, 3); 320 ret_val = mbx->ops.read_posted(hw, msgbuf, 3);
319 321
322 msgbuf[0] &= ~E1000_VT_MSGTYPE_CTS;
323
320 /* if nacked the address was rejected, use "perm_addr" */ 324 /* if nacked the address was rejected, use "perm_addr" */
321 if (!ret_val && 325 if (!ret_val &&
322 (msgbuf[0] == (E1000_VF_SET_MAC_ADDR | E1000_VT_MSGTYPE_NACK))) 326 (msgbuf[0] == (E1000_VF_SET_MAC_ADDR | E1000_VT_MSGTYPE_NACK)))
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h
index cd22323cfd2..e11d83d5852 100644
--- a/drivers/net/ixgbe/ixgbe.h
+++ b/drivers/net/ixgbe/ixgbe.h
@@ -96,6 +96,8 @@
96#define IXGBE_TX_FLAGS_VLAN_PRIO_MASK 0x0000e000 96#define IXGBE_TX_FLAGS_VLAN_PRIO_MASK 0x0000e000
97#define IXGBE_TX_FLAGS_VLAN_SHIFT 16 97#define IXGBE_TX_FLAGS_VLAN_SHIFT 16
98 98
99#define IXGBE_MAX_RSC_INT_RATE 162760
100
99/* wrapper around a pointer to a socket buffer, 101/* wrapper around a pointer to a socket buffer,
100 * so a DMA handle can be stored along with the buffer */ 102 * so a DMA handle can be stored along with the buffer */
101struct ixgbe_tx_buffer { 103struct ixgbe_tx_buffer {
@@ -327,6 +329,7 @@ struct ixgbe_adapter {
327#define IXGBE_FLAG_IN_SFP_MOD_TASK (u32)(1 << 25) 329#define IXGBE_FLAG_IN_SFP_MOD_TASK (u32)(1 << 25)
328#define IXGBE_FLAG_FDIR_HASH_CAPABLE (u32)(1 << 26) 330#define IXGBE_FLAG_FDIR_HASH_CAPABLE (u32)(1 << 26)
329#define IXGBE_FLAG_FDIR_PERFECT_CAPABLE (u32)(1 << 27) 331#define IXGBE_FLAG_FDIR_PERFECT_CAPABLE (u32)(1 << 27)
332#define IXGBE_FLAG_FCOE_CAPABLE (u32)(1 << 28)
330#define IXGBE_FLAG_FCOE_ENABLED (u32)(1 << 29) 333#define IXGBE_FLAG_FCOE_ENABLED (u32)(1 << 29)
331 334
332 u32 flags2; 335 u32 flags2;
diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c
index b9923047ce1..522c03bc1da 100644
--- a/drivers/net/ixgbe/ixgbe_82598.c
+++ b/drivers/net/ixgbe/ixgbe_82598.c
@@ -50,6 +50,51 @@ static s32 ixgbe_read_i2c_eeprom_82598(struct ixgbe_hw *hw, u8 byte_offset,
50 u8 *eeprom_data); 50 u8 *eeprom_data);
51 51
52/** 52/**
53 * ixgbe_set_pcie_completion_timeout - set pci-e completion timeout
54 * @hw: pointer to the HW structure
55 *
56 * The defaults for 82598 should be in the range of 50us to 50ms,
57 * however the hardware default for these parts is 500us to 1ms which is less
58 * than the 10ms recommended by the pci-e spec. To address this we need to
59 * increase the value to either 10ms to 250ms for capability version 1 config,
60 * or 16ms to 55ms for version 2.
61 **/
62void ixgbe_set_pcie_completion_timeout(struct ixgbe_hw *hw)
63{
64 struct ixgbe_adapter *adapter = hw->back;
65 u32 gcr = IXGBE_READ_REG(hw, IXGBE_GCR);
66 u16 pcie_devctl2;
67
68 /* only take action if timeout value is defaulted to 0 */
69 if (gcr & IXGBE_GCR_CMPL_TMOUT_MASK)
70 goto out;
71
72 /*
73 * if capababilities version is type 1 we can write the
74 * timeout of 10ms to 250ms through the GCR register
75 */
76 if (!(gcr & IXGBE_GCR_CAP_VER2)) {
77 gcr |= IXGBE_GCR_CMPL_TMOUT_10ms;
78 goto out;
79 }
80
81 /*
82 * for version 2 capabilities we need to write the config space
83 * directly in order to set the completion timeout value for
84 * 16ms to 55ms
85 */
86 pci_read_config_word(adapter->pdev,
87 IXGBE_PCI_DEVICE_CONTROL2, &pcie_devctl2);
88 pcie_devctl2 |= IXGBE_PCI_DEVICE_CONTROL2_16ms;
89 pci_write_config_word(adapter->pdev,
90 IXGBE_PCI_DEVICE_CONTROL2, pcie_devctl2);
91out:
92 /* disable completion timeout resend */
93 gcr &= ~IXGBE_GCR_CMPL_TMOUT_RESEND;
94 IXGBE_WRITE_REG(hw, IXGBE_GCR, gcr);
95}
96
97/**
53 * ixgbe_get_pcie_msix_count_82598 - Gets MSI-X vector count 98 * ixgbe_get_pcie_msix_count_82598 - Gets MSI-X vector count
54 * @hw: pointer to hardware structure 99 * @hw: pointer to hardware structure
55 * 100 *
@@ -153,6 +198,26 @@ out:
153} 198}
154 199
155/** 200/**
201 * ixgbe_start_hw_82598 - Prepare hardware for Tx/Rx
202 * @hw: pointer to hardware structure
203 *
204 * Starts the hardware using the generic start_hw function.
205 * Then set pcie completion timeout
206 **/
207s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw)
208{
209 s32 ret_val = 0;
210
211 ret_val = ixgbe_start_hw_generic(hw);
212
213 /* set the completion timeout for interface */
214 if (ret_val == 0)
215 ixgbe_set_pcie_completion_timeout(hw);
216
217 return ret_val;
218}
219
220/**
156 * ixgbe_get_link_capabilities_82598 - Determines link capabilities 221 * ixgbe_get_link_capabilities_82598 - Determines link capabilities
157 * @hw: pointer to hardware structure 222 * @hw: pointer to hardware structure
158 * @speed: pointer to link speed 223 * @speed: pointer to link speed
@@ -1085,7 +1150,7 @@ out:
1085static struct ixgbe_mac_operations mac_ops_82598 = { 1150static struct ixgbe_mac_operations mac_ops_82598 = {
1086 .init_hw = &ixgbe_init_hw_generic, 1151 .init_hw = &ixgbe_init_hw_generic,
1087 .reset_hw = &ixgbe_reset_hw_82598, 1152 .reset_hw = &ixgbe_reset_hw_82598,
1088 .start_hw = &ixgbe_start_hw_generic, 1153 .start_hw = &ixgbe_start_hw_82598,
1089 .clear_hw_cntrs = &ixgbe_clear_hw_cntrs_generic, 1154 .clear_hw_cntrs = &ixgbe_clear_hw_cntrs_generic,
1090 .get_media_type = &ixgbe_get_media_type_82598, 1155 .get_media_type = &ixgbe_get_media_type_82598,
1091 .get_supported_physical_layer = &ixgbe_get_supported_physical_layer_82598, 1156 .get_supported_physical_layer = &ixgbe_get_supported_physical_layer_82598,
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c
index 7c5978ad929..1c726573290 100644
--- a/drivers/net/ixgbe/ixgbe_dcb_nl.c
+++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c
@@ -106,8 +106,6 @@ static u8 ixgbe_dcbnl_get_state(struct net_device *netdev)
106{ 106{
107 struct ixgbe_adapter *adapter = netdev_priv(netdev); 107 struct ixgbe_adapter *adapter = netdev_priv(netdev);
108 108
109 DPRINTK(DRV, INFO, "Get DCB Admin Mode.\n");
110
111 return !!(adapter->flags & IXGBE_FLAG_DCB_ENABLED); 109 return !!(adapter->flags & IXGBE_FLAG_DCB_ENABLED);
112} 110}
113 111
@@ -116,8 +114,6 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
116 u8 err = 0; 114 u8 err = 0;
117 struct ixgbe_adapter *adapter = netdev_priv(netdev); 115 struct ixgbe_adapter *adapter = netdev_priv(netdev);
118 116
119 DPRINTK(DRV, INFO, "Set DCB Admin Mode.\n");
120
121 if (state > 0) { 117 if (state > 0) {
122 /* Turn on DCB */ 118 /* Turn on DCB */
123 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) 119 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED)
@@ -143,6 +139,18 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
143 adapter->flags &= ~IXGBE_FLAG_FDIR_PERFECT_CAPABLE; 139 adapter->flags &= ~IXGBE_FLAG_FDIR_PERFECT_CAPABLE;
144 } 140 }
145 adapter->flags |= IXGBE_FLAG_DCB_ENABLED; 141 adapter->flags |= IXGBE_FLAG_DCB_ENABLED;
142#ifdef IXGBE_FCOE
143 /* Turn on FCoE offload */
144 if ((adapter->flags & IXGBE_FLAG_FCOE_CAPABLE) &&
145 (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED))) {
146 adapter->flags |= IXGBE_FLAG_FCOE_ENABLED;
147 adapter->ring_feature[RING_F_FCOE].indices =
148 IXGBE_FCRETA_SIZE;
149 netdev->features |= NETIF_F_FCOE_CRC;
150 netdev->features |= NETIF_F_FSO;
151 netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1;
152 }
153#endif /* IXGBE_FCOE */
146 ixgbe_init_interrupt_scheme(adapter); 154 ixgbe_init_interrupt_scheme(adapter);
147 if (netif_running(netdev)) 155 if (netif_running(netdev))
148 netdev->netdev_ops->ndo_open(netdev); 156 netdev->netdev_ops->ndo_open(netdev);
@@ -160,6 +168,18 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
160 adapter->flags |= IXGBE_FLAG_RSS_ENABLED; 168 adapter->flags |= IXGBE_FLAG_RSS_ENABLED;
161 if (adapter->hw.mac.type == ixgbe_mac_82599EB) 169 if (adapter->hw.mac.type == ixgbe_mac_82599EB)
162 adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE; 170 adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE;
171
172#ifdef IXGBE_FCOE
173 /* Turn off FCoE offload */
174 if (adapter->flags & (IXGBE_FLAG_FCOE_CAPABLE |
175 IXGBE_FLAG_FCOE_ENABLED)) {
176 adapter->flags &= ~IXGBE_FLAG_FCOE_ENABLED;
177 adapter->ring_feature[RING_F_FCOE].indices = 0;
178 netdev->features &= ~NETIF_F_FCOE_CRC;
179 netdev->features &= ~NETIF_F_FSO;
180 netdev->fcoe_ddp_xid = 0;
181 }
182#endif /* IXGBE_FCOE */
163 ixgbe_init_interrupt_scheme(adapter); 183 ixgbe_init_interrupt_scheme(adapter);
164 if (netif_running(netdev)) 184 if (netif_running(netdev))
165 netdev->netdev_ops->ndo_open(netdev); 185 netdev->netdev_ops->ndo_open(netdev);
@@ -175,6 +195,8 @@ static void ixgbe_dcbnl_get_perm_hw_addr(struct net_device *netdev,
175 struct ixgbe_adapter *adapter = netdev_priv(netdev); 195 struct ixgbe_adapter *adapter = netdev_priv(netdev);
176 int i, j; 196 int i, j;
177 197
198 memset(perm_addr, 0xff, MAX_ADDR_LEN);
199
178 for (i = 0; i < netdev->addr_len; i++) 200 for (i = 0; i < netdev->addr_len; i++)
179 perm_addr[i] = adapter->hw.mac.perm_addr[i]; 201 perm_addr[i] = adapter->hw.mac.perm_addr[i];
180 202
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index 2a978008fd6..79144e950a3 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -1975,7 +1975,10 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
1975 * any other value means disable eitr, which is best 1975 * any other value means disable eitr, which is best
1976 * served by setting the interrupt rate very high 1976 * served by setting the interrupt rate very high
1977 */ 1977 */
1978 adapter->eitr_param = IXGBE_MAX_INT_RATE; 1978 if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)
1979 adapter->eitr_param = IXGBE_MAX_RSC_INT_RATE;
1980 else
1981 adapter->eitr_param = IXGBE_MAX_INT_RATE;
1979 adapter->itr_setting = 0; 1982 adapter->itr_setting = 0;
1980 } 1983 }
1981 1984
@@ -1999,13 +2002,13 @@ static int ixgbe_set_flags(struct net_device *netdev, u32 data)
1999 2002
2000 ethtool_op_set_flags(netdev, data); 2003 ethtool_op_set_flags(netdev, data);
2001 2004
2002 if (!(adapter->flags & IXGBE_FLAG2_RSC_CAPABLE)) 2005 if (!(adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE))
2003 return 0; 2006 return 0;
2004 2007
2005 /* if state changes we need to update adapter->flags and reset */ 2008 /* if state changes we need to update adapter->flags and reset */
2006 if ((!!(data & ETH_FLAG_LRO)) != 2009 if ((!!(data & ETH_FLAG_LRO)) !=
2007 (!!(adapter->flags & IXGBE_FLAG2_RSC_ENABLED))) { 2010 (!!(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED))) {
2008 adapter->flags ^= IXGBE_FLAG2_RSC_ENABLED; 2011 adapter->flags2 ^= IXGBE_FLAG2_RSC_ENABLED;
2009 if (netif_running(netdev)) 2012 if (netif_running(netdev))
2010 ixgbe_reinit_locked(adapter); 2013 ixgbe_reinit_locked(adapter);
2011 else 2014 else
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index e3442f47f93..110c65ab5cb 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -34,6 +34,7 @@
34#include <linux/in.h> 34#include <linux/in.h>
35#include <linux/ip.h> 35#include <linux/ip.h>
36#include <linux/tcp.h> 36#include <linux/tcp.h>
37#include <linux/pkt_sched.h>
37#include <linux/ipv6.h> 38#include <linux/ipv6.h>
38#include <net/checksum.h> 39#include <net/checksum.h>
39#include <net/ip6_checksum.h> 40#include <net/ip6_checksum.h>
@@ -510,8 +511,11 @@ static void ixgbe_receive_skb(struct ixgbe_q_vector *q_vector,
510 * @skb: skb currently being received and modified 511 * @skb: skb currently being received and modified
511 **/ 512 **/
512static inline void ixgbe_rx_checksum(struct ixgbe_adapter *adapter, 513static inline void ixgbe_rx_checksum(struct ixgbe_adapter *adapter,
513 u32 status_err, struct sk_buff *skb) 514 union ixgbe_adv_rx_desc *rx_desc,
515 struct sk_buff *skb)
514{ 516{
517 u32 status_err = le32_to_cpu(rx_desc->wb.upper.status_error);
518
515 skb->ip_summed = CHECKSUM_NONE; 519 skb->ip_summed = CHECKSUM_NONE;
516 520
517 /* Rx csum disabled */ 521 /* Rx csum disabled */
@@ -529,6 +533,16 @@ static inline void ixgbe_rx_checksum(struct ixgbe_adapter *adapter,
529 return; 533 return;
530 534
531 if (status_err & IXGBE_RXDADV_ERR_TCPE) { 535 if (status_err & IXGBE_RXDADV_ERR_TCPE) {
536 u16 pkt_info = rx_desc->wb.lower.lo_dword.hs_rss.pkt_info;
537
538 /*
539 * 82599 errata, UDP frames with a 0 checksum can be marked as
540 * checksum errors.
541 */
542 if ((pkt_info & IXGBE_RXDADV_PKTTYPE_UDP) &&
543 (adapter->hw.mac.type == ixgbe_mac_82599EB))
544 return;
545
532 adapter->hw_csum_rx_error++; 546 adapter->hw_csum_rx_error++;
533 return; 547 return;
534 } 548 }
@@ -766,7 +780,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
766 prefetch(next_rxd); 780 prefetch(next_rxd);
767 cleaned_count++; 781 cleaned_count++;
768 782
769 if (adapter->flags & IXGBE_FLAG2_RSC_CAPABLE) 783 if (adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE)
770 rsc_count = ixgbe_get_rsc_count(rx_desc); 784 rsc_count = ixgbe_get_rsc_count(rx_desc);
771 785
772 if (rsc_count) { 786 if (rsc_count) {
@@ -802,7 +816,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
802 goto next_desc; 816 goto next_desc;
803 } 817 }
804 818
805 ixgbe_rx_checksum(adapter, staterr, skb); 819 ixgbe_rx_checksum(adapter, rx_desc, skb);
806 820
807 /* probably a little skewed due to removing CRC */ 821 /* probably a little skewed due to removing CRC */
808 total_rx_bytes += skb->len; 822 total_rx_bytes += skb->len;
@@ -2022,7 +2036,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
2022 IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(0), psrtype); 2036 IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(0), psrtype);
2023 } 2037 }
2024 } else { 2038 } else {
2025 if (!(adapter->flags & IXGBE_FLAG2_RSC_ENABLED) && 2039 if (!(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) &&
2026 (netdev->mtu <= ETH_DATA_LEN)) 2040 (netdev->mtu <= ETH_DATA_LEN))
2027 rx_buf_len = MAXIMUM_ETHERNET_VLAN_SIZE; 2041 rx_buf_len = MAXIMUM_ETHERNET_VLAN_SIZE;
2028 else 2042 else
@@ -2151,7 +2165,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
2151 IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rdrxctl); 2165 IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rdrxctl);
2152 } 2166 }
2153 2167
2154 if (adapter->flags & IXGBE_FLAG2_RSC_ENABLED) { 2168 if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) {
2155 /* Enable 82599 HW-RSC */ 2169 /* Enable 82599 HW-RSC */
2156 for (i = 0; i < adapter->num_rx_queues; i++) { 2170 for (i = 0; i < adapter->num_rx_queues; i++) {
2157 j = adapter->rx_ring[i].reg_idx; 2171 j = adapter->rx_ring[i].reg_idx;
@@ -3798,16 +3812,17 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter)
3798 adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82598; 3812 adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82598;
3799 } else if (hw->mac.type == ixgbe_mac_82599EB) { 3813 } else if (hw->mac.type == ixgbe_mac_82599EB) {
3800 adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82599; 3814 adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82599;
3801 adapter->flags |= IXGBE_FLAG2_RSC_CAPABLE; 3815 adapter->flags2 |= IXGBE_FLAG2_RSC_CAPABLE;
3802 adapter->flags |= IXGBE_FLAG2_RSC_ENABLED; 3816 adapter->flags2 |= IXGBE_FLAG2_RSC_ENABLED;
3803 adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE; 3817 adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE;
3804 adapter->ring_feature[RING_F_FDIR].indices = 3818 adapter->ring_feature[RING_F_FDIR].indices =
3805 IXGBE_MAX_FDIR_INDICES; 3819 IXGBE_MAX_FDIR_INDICES;
3806 adapter->atr_sample_rate = 20; 3820 adapter->atr_sample_rate = 20;
3807 adapter->fdir_pballoc = 0; 3821 adapter->fdir_pballoc = 0;
3808#ifdef IXGBE_FCOE 3822#ifdef IXGBE_FCOE
3809 adapter->flags |= IXGBE_FLAG_FCOE_ENABLED; 3823 adapter->flags |= IXGBE_FLAG_FCOE_CAPABLE;
3810 adapter->ring_feature[RING_F_FCOE].indices = IXGBE_FCRETA_SIZE; 3824 adapter->flags &= ~IXGBE_FLAG_FCOE_ENABLED;
3825 adapter->ring_feature[RING_F_FCOE].indices = 0;
3811#endif /* IXGBE_FCOE */ 3826#endif /* IXGBE_FCOE */
3812 } 3827 }
3813 3828
@@ -5125,9 +5140,6 @@ static int ixgbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
5125 int count = 0; 5140 int count = 0;
5126 unsigned int f; 5141 unsigned int f;
5127 5142
5128 r_idx = skb->queue_mapping;
5129 tx_ring = &adapter->tx_ring[r_idx];
5130
5131 if (adapter->vlgrp && vlan_tx_tag_present(skb)) { 5143 if (adapter->vlgrp && vlan_tx_tag_present(skb)) {
5132 tx_flags |= vlan_tx_tag_get(skb); 5144 tx_flags |= vlan_tx_tag_get(skb);
5133 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { 5145 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
@@ -5137,11 +5149,19 @@ static int ixgbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
5137 tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT; 5149 tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT;
5138 tx_flags |= IXGBE_TX_FLAGS_VLAN; 5150 tx_flags |= IXGBE_TX_FLAGS_VLAN;
5139 } else if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { 5151 } else if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
5140 tx_flags |= (skb->queue_mapping << 13); 5152 if (skb->priority != TC_PRIO_CONTROL) {
5141 tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT; 5153 tx_flags |= (skb->queue_mapping << 13);
5142 tx_flags |= IXGBE_TX_FLAGS_VLAN; 5154 tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT;
5155 tx_flags |= IXGBE_TX_FLAGS_VLAN;
5156 } else {
5157 skb->queue_mapping =
5158 adapter->ring_feature[RING_F_DCB].indices-1;
5159 }
5143 } 5160 }
5144 5161
5162 r_idx = skb->queue_mapping;
5163 tx_ring = &adapter->tx_ring[r_idx];
5164
5145 if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && 5165 if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) &&
5146 (skb->protocol == htons(ETH_P_FCOE))) 5166 (skb->protocol == htons(ETH_P_FCOE)))
5147 tx_flags |= IXGBE_TX_FLAGS_FCOE; 5167 tx_flags |= IXGBE_TX_FLAGS_FCOE;
@@ -5340,12 +5360,19 @@ static int ixgbe_del_sanmac_netdev(struct net_device *dev)
5340static void ixgbe_netpoll(struct net_device *netdev) 5360static void ixgbe_netpoll(struct net_device *netdev)
5341{ 5361{
5342 struct ixgbe_adapter *adapter = netdev_priv(netdev); 5362 struct ixgbe_adapter *adapter = netdev_priv(netdev);
5363 int i;
5343 5364
5344 disable_irq(adapter->pdev->irq);
5345 adapter->flags |= IXGBE_FLAG_IN_NETPOLL; 5365 adapter->flags |= IXGBE_FLAG_IN_NETPOLL;
5346 ixgbe_intr(adapter->pdev->irq, netdev); 5366 if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
5367 int num_q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS;
5368 for (i = 0; i < num_q_vectors; i++) {
5369 struct ixgbe_q_vector *q_vector = adapter->q_vector[i];
5370 ixgbe_msix_clean_many(0, q_vector);
5371 }
5372 } else {
5373 ixgbe_intr(adapter->pdev->irq, netdev);
5374 }
5347 adapter->flags &= ~IXGBE_FLAG_IN_NETPOLL; 5375 adapter->flags &= ~IXGBE_FLAG_IN_NETPOLL;
5348 enable_irq(adapter->pdev->irq);
5349} 5376}
5350#endif 5377#endif
5351 5378
@@ -5580,23 +5607,18 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
5580#endif 5607#endif
5581 5608
5582#ifdef IXGBE_FCOE 5609#ifdef IXGBE_FCOE
5583 if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) { 5610 if (adapter->flags & IXGBE_FLAG_FCOE_CAPABLE) {
5584 if (hw->mac.ops.get_device_caps) { 5611 if (hw->mac.ops.get_device_caps) {
5585 hw->mac.ops.get_device_caps(hw, &device_caps); 5612 hw->mac.ops.get_device_caps(hw, &device_caps);
5586 if (!(device_caps & IXGBE_DEVICE_CAPS_FCOE_OFFLOADS)) { 5613 if (device_caps & IXGBE_DEVICE_CAPS_FCOE_OFFLOADS)
5587 netdev->features |= NETIF_F_FCOE_CRC; 5614 adapter->flags &= ~IXGBE_FLAG_FCOE_CAPABLE;
5588 netdev->features |= NETIF_F_FSO;
5589 netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1;
5590 } else {
5591 adapter->flags &= ~IXGBE_FLAG_FCOE_ENABLED;
5592 }
5593 } 5615 }
5594 } 5616 }
5595#endif /* IXGBE_FCOE */ 5617#endif /* IXGBE_FCOE */
5596 if (pci_using_dac) 5618 if (pci_using_dac)
5597 netdev->features |= NETIF_F_HIGHDMA; 5619 netdev->features |= NETIF_F_HIGHDMA;
5598 5620
5599 if (adapter->flags & IXGBE_FLAG2_RSC_ENABLED) 5621 if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)
5600 netdev->features |= NETIF_F_LRO; 5622 netdev->features |= NETIF_F_LRO;
5601 5623
5602 /* make sure the EEPROM is good */ 5624 /* make sure the EEPROM is good */
@@ -5638,7 +5660,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
5638 adapter->wol = 0; 5660 adapter->wol = 0;
5639 break; 5661 break;
5640 } 5662 }
5641 device_init_wakeup(&adapter->pdev->dev, true);
5642 device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); 5663 device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
5643 5664
5644 /* pick up the PCI bus settings for reporting later */ 5665 /* pick up the PCI bus settings for reporting later */
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h
index fa87309dc08..be90eb4575f 100644
--- a/drivers/net/ixgbe/ixgbe_type.h
+++ b/drivers/net/ixgbe/ixgbe_type.h
@@ -718,6 +718,12 @@
718#define IXGBE_ECC_STATUS_82599 0x110E0 718#define IXGBE_ECC_STATUS_82599 0x110E0
719#define IXGBE_BAR_CTRL_82599 0x110F4 719#define IXGBE_BAR_CTRL_82599 0x110F4
720 720
721/* PCI Express Control */
722#define IXGBE_GCR_CMPL_TMOUT_MASK 0x0000F000
723#define IXGBE_GCR_CMPL_TMOUT_10ms 0x00001000
724#define IXGBE_GCR_CMPL_TMOUT_RESEND 0x00010000
725#define IXGBE_GCR_CAP_VER2 0x00040000
726
721/* Time Sync Registers */ 727/* Time Sync Registers */
722#define IXGBE_TSYNCRXCTL 0x05188 /* Rx Time Sync Control register - RW */ 728#define IXGBE_TSYNCRXCTL 0x05188 /* Rx Time Sync Control register - RW */
723#define IXGBE_TSYNCTXCTL 0x08C00 /* Tx Time Sync Control register - RW */ 729#define IXGBE_TSYNCTXCTL 0x08C00 /* Tx Time Sync Control register - RW */
@@ -1521,6 +1527,7 @@
1521 1527
1522/* PCI Bus Info */ 1528/* PCI Bus Info */
1523#define IXGBE_PCI_LINK_STATUS 0xB2 1529#define IXGBE_PCI_LINK_STATUS 0xB2
1530#define IXGBE_PCI_DEVICE_CONTROL2 0xC8
1524#define IXGBE_PCI_LINK_WIDTH 0x3F0 1531#define IXGBE_PCI_LINK_WIDTH 0x3F0
1525#define IXGBE_PCI_LINK_WIDTH_1 0x10 1532#define IXGBE_PCI_LINK_WIDTH_1 0x10
1526#define IXGBE_PCI_LINK_WIDTH_2 0x20 1533#define IXGBE_PCI_LINK_WIDTH_2 0x20
@@ -1531,6 +1538,7 @@
1531#define IXGBE_PCI_LINK_SPEED_5000 0x2 1538#define IXGBE_PCI_LINK_SPEED_5000 0x2
1532#define IXGBE_PCI_HEADER_TYPE_REGISTER 0x0E 1539#define IXGBE_PCI_HEADER_TYPE_REGISTER 0x0E
1533#define IXGBE_PCI_HEADER_TYPE_MULTIFUNC 0x80 1540#define IXGBE_PCI_HEADER_TYPE_MULTIFUNC 0x80
1541#define IXGBE_PCI_DEVICE_CONTROL2_16ms 0x0005
1534 1542
1535/* Number of 100 microseconds we wait for PCI Express master disable */ 1543/* Number of 100 microseconds we wait for PCI Express master disable */
1536#define IXGBE_PCI_MASTER_DISABLE_TIMEOUT 800 1544#define IXGBE_PCI_MASTER_DISABLE_TIMEOUT 800
diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c
index d12106b47bf..2f286091394 100644
--- a/drivers/net/jazzsonic.c
+++ b/drivers/net/jazzsonic.c
@@ -229,6 +229,7 @@ static int __init jazz_sonic_probe(struct platform_device *pdev)
229 lp = netdev_priv(dev); 229 lp = netdev_priv(dev);
230 lp->device = &pdev->dev; 230 lp->device = &pdev->dev;
231 SET_NETDEV_DEV(dev, &pdev->dev); 231 SET_NETDEV_DEV(dev, &pdev->dev);
232 platform_set_drvdata(pdev, dev);
232 233
233 netdev_boot_setup_check(dev); 234 netdev_boot_setup_check(dev);
234 235
diff --git a/drivers/net/ks8851.c b/drivers/net/ks8851.c
new file mode 100644
index 00000000000..9a1dea60c1c
--- /dev/null
+++ b/drivers/net/ks8851.c
@@ -0,0 +1,1322 @@
1/* drivers/net/ks8651.c
2 *
3 * Copyright 2009 Simtec Electronics
4 * http://www.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#define DEBUG
13
14#include <linux/module.h>
15#include <linux/kernel.h>
16#include <linux/netdevice.h>
17#include <linux/etherdevice.h>
18#include <linux/ethtool.h>
19#include <linux/cache.h>
20#include <linux/crc32.h>
21#include <linux/mii.h>
22
23#include <linux/spi/spi.h>
24
25#include "ks8851.h"
26
27/**
28 * struct ks8851_rxctrl - KS8851 driver rx control
29 * @mchash: Multicast hash-table data.
30 * @rxcr1: KS_RXCR1 register setting
31 * @rxcr2: KS_RXCR2 register setting
32 *
33 * Representation of the settings needs to control the receive filtering
34 * such as the multicast hash-filter and the receive register settings. This
35 * is used to make the job of working out if the receive settings change and
36 * then issuing the new settings to the worker that will send the necessary
37 * commands.
38 */
39struct ks8851_rxctrl {
40 u16 mchash[4];
41 u16 rxcr1;
42 u16 rxcr2;
43};
44
45/**
46 * union ks8851_tx_hdr - tx header data
47 * @txb: The header as bytes
48 * @txw: The header as 16bit, little-endian words
49 *
50 * A dual representation of the tx header data to allow
51 * access to individual bytes, and to allow 16bit accesses
52 * with 16bit alignment.
53 */
54union ks8851_tx_hdr {
55 u8 txb[6];
56 __le16 txw[3];
57};
58
59/**
60 * struct ks8851_net - KS8851 driver private data
61 * @netdev: The network device we're bound to
62 * @spidev: The spi device we're bound to.
63 * @lock: Lock to ensure that the device is not accessed when busy.
64 * @statelock: Lock on this structure for tx list.
65 * @mii: The MII state information for the mii calls.
66 * @rxctrl: RX settings for @rxctrl_work.
67 * @tx_work: Work queue for tx packets
68 * @irq_work: Work queue for servicing interrupts
69 * @rxctrl_work: Work queue for updating RX mode and multicast lists
70 * @txq: Queue of packets for transmission.
71 * @spi_msg1: pre-setup SPI transfer with one message, @spi_xfer1.
72 * @spi_msg2: pre-setup SPI transfer with two messages, @spi_xfer2.
73 * @txh: Space for generating packet TX header in DMA-able data
74 * @rxd: Space for receiving SPI data, in DMA-able space.
75 * @txd: Space for transmitting SPI data, in DMA-able space.
76 * @msg_enable: The message flags controlling driver output (see ethtool).
77 * @fid: Incrementing frame id tag.
78 * @rc_ier: Cached copy of KS_IER.
79 * @rc_rxqcr: Cached copy of KS_RXQCR.
80 *
81 * The @lock ensures that the chip is protected when certain operations are
82 * in progress. When the read or write packet transfer is in progress, most
83 * of the chip registers are not ccessible until the transfer is finished and
84 * the DMA has been de-asserted.
85 *
86 * The @statelock is used to protect information in the structure which may
87 * need to be accessed via several sources, such as the network driver layer
88 * or one of the work queues.
89 *
90 * We align the buffers we may use for rx/tx to ensure that if the SPI driver
91 * wants to DMA map them, it will not have any problems with data the driver
92 * modifies.
93 */
94struct ks8851_net {
95 struct net_device *netdev;
96 struct spi_device *spidev;
97 struct mutex lock;
98 spinlock_t statelock;
99
100 union ks8851_tx_hdr txh ____cacheline_aligned;
101 u8 rxd[8];
102 u8 txd[8];
103
104 u32 msg_enable ____cacheline_aligned;
105 u16 tx_space;
106 u8 fid;
107
108 u16 rc_ier;
109 u16 rc_rxqcr;
110
111 struct mii_if_info mii;
112 struct ks8851_rxctrl rxctrl;
113
114 struct work_struct tx_work;
115 struct work_struct irq_work;
116 struct work_struct rxctrl_work;
117
118 struct sk_buff_head txq;
119
120 struct spi_message spi_msg1;
121 struct spi_message spi_msg2;
122 struct spi_transfer spi_xfer1;
123 struct spi_transfer spi_xfer2[2];
124};
125
126static int msg_enable;
127
128#define ks_info(_ks, _msg...) dev_info(&(_ks)->spidev->dev, _msg)
129#define ks_warn(_ks, _msg...) dev_warn(&(_ks)->spidev->dev, _msg)
130#define ks_dbg(_ks, _msg...) dev_dbg(&(_ks)->spidev->dev, _msg)
131#define ks_err(_ks, _msg...) dev_err(&(_ks)->spidev->dev, _msg)
132
133/* shift for byte-enable data */
134#define BYTE_EN(_x) ((_x) << 2)
135
136/* turn register number and byte-enable mask into data for start of packet */
137#define MK_OP(_byteen, _reg) (BYTE_EN(_byteen) | (_reg) << (8+2) | (_reg) >> 6)
138
139/* SPI register read/write calls.
140 *
141 * All these calls issue SPI transactions to access the chip's registers. They
142 * all require that the necessary lock is held to prevent accesses when the
143 * chip is busy transfering packet data (RX/TX FIFO accesses).
144 */
145
146/**
147 * ks8851_wrreg16 - write 16bit register value to chip
148 * @ks: The chip state
149 * @reg: The register address
150 * @val: The value to write
151 *
152 * Issue a write to put the value @val into the register specified in @reg.
153 */
154static void ks8851_wrreg16(struct ks8851_net *ks, unsigned reg, unsigned val)
155{
156 struct spi_transfer *xfer = &ks->spi_xfer1;
157 struct spi_message *msg = &ks->spi_msg1;
158 __le16 txb[2];
159 int ret;
160
161 txb[0] = cpu_to_le16(MK_OP(reg & 2 ? 0xC : 0x03, reg) | KS_SPIOP_WR);
162 txb[1] = cpu_to_le16(val);
163
164 xfer->tx_buf = txb;
165 xfer->rx_buf = NULL;
166 xfer->len = 4;
167
168 ret = spi_sync(ks->spidev, msg);
169 if (ret < 0)
170 ks_err(ks, "spi_sync() failed\n");
171}
172
173/**
174 * ks8851_rx_1msg - select whether to use one or two messages for spi read
175 * @ks: The device structure
176 *
177 * Return whether to generate a single message with a tx and rx buffer
178 * supplied to spi_sync(), or alternatively send the tx and rx buffers
179 * as separate messages.
180 *
181 * Depending on the hardware in use, a single message may be more efficient
182 * on interrupts or work done by the driver.
183 *
184 * This currently always returns true until we add some per-device data passed
185 * from the platform code to specify which mode is better.
186 */
187static inline bool ks8851_rx_1msg(struct ks8851_net *ks)
188{
189 return true;
190}
191
192/**
193 * ks8851_rdreg - issue read register command and return the data
194 * @ks: The device state
195 * @op: The register address and byte enables in message format.
196 * @rxb: The RX buffer to return the result into
197 * @rxl: The length of data expected.
198 *
199 * This is the low level read call that issues the necessary spi message(s)
200 * to read data from the register specified in @op.
201 */
202static void ks8851_rdreg(struct ks8851_net *ks, unsigned op,
203 u8 *rxb, unsigned rxl)
204{
205 struct spi_transfer *xfer;
206 struct spi_message *msg;
207 __le16 *txb = (__le16 *)ks->txd;
208 u8 *trx = ks->rxd;
209 int ret;
210
211 txb[0] = cpu_to_le16(op | KS_SPIOP_RD);
212
213 if (ks8851_rx_1msg(ks)) {
214 msg = &ks->spi_msg1;
215 xfer = &ks->spi_xfer1;
216
217 xfer->tx_buf = txb;
218 xfer->rx_buf = trx;
219 xfer->len = rxl + 2;
220 } else {
221 msg = &ks->spi_msg2;
222 xfer = ks->spi_xfer2;
223
224 xfer->tx_buf = txb;
225 xfer->rx_buf = NULL;
226 xfer->len = 2;
227
228 xfer++;
229 xfer->tx_buf = NULL;
230 xfer->rx_buf = trx;
231 xfer->len = rxl;
232 }
233
234 ret = spi_sync(ks->spidev, msg);
235 if (ret < 0)
236 ks_err(ks, "read: spi_sync() failed\n");
237 else if (ks8851_rx_1msg(ks))
238 memcpy(rxb, trx + 2, rxl);
239 else
240 memcpy(rxb, trx, rxl);
241}
242
243/**
244 * ks8851_rdreg8 - read 8 bit register from device
245 * @ks: The chip information
246 * @reg: The register address
247 *
248 * Read a 8bit register from the chip, returning the result
249*/
250static unsigned ks8851_rdreg8(struct ks8851_net *ks, unsigned reg)
251{
252 u8 rxb[1];
253
254 ks8851_rdreg(ks, MK_OP(1 << (reg & 3), reg), rxb, 1);
255 return rxb[0];
256}
257
258/**
259 * ks8851_rdreg16 - read 16 bit register from device
260 * @ks: The chip information
261 * @reg: The register address
262 *
263 * Read a 16bit register from the chip, returning the result
264*/
265static unsigned ks8851_rdreg16(struct ks8851_net *ks, unsigned reg)
266{
267 __le16 rx = 0;
268
269 ks8851_rdreg(ks, MK_OP(reg & 2 ? 0xC : 0x3, reg), (u8 *)&rx, 2);
270 return le16_to_cpu(rx);
271}
272
273/**
274 * ks8851_rdreg32 - read 32 bit register from device
275 * @ks: The chip information
276 * @reg: The register address
277 *
278 * Read a 32bit register from the chip.
279 *
280 * Note, this read requires the address be aligned to 4 bytes.
281*/
282static unsigned ks8851_rdreg32(struct ks8851_net *ks, unsigned reg)
283{
284 __le32 rx = 0;
285
286 WARN_ON(reg & 3);
287
288 ks8851_rdreg(ks, MK_OP(0xf, reg), (u8 *)&rx, 4);
289 return le32_to_cpu(rx);
290}
291
292/**
293 * ks8851_soft_reset - issue one of the soft reset to the device
294 * @ks: The device state.
295 * @op: The bit(s) to set in the GRR
296 *
297 * Issue the relevant soft-reset command to the device's GRR register
298 * specified by @op.
299 *
300 * Note, the delays are in there as a caution to ensure that the reset
301 * has time to take effect and then complete. Since the datasheet does
302 * not currently specify the exact sequence, we have chosen something
303 * that seems to work with our device.
304 */
305static void ks8851_soft_reset(struct ks8851_net *ks, unsigned op)
306{
307 ks8851_wrreg16(ks, KS_GRR, op);
308 mdelay(1); /* wait a short time to effect reset */
309 ks8851_wrreg16(ks, KS_GRR, 0);
310 mdelay(1); /* wait for condition to clear */
311}
312
313/**
314 * ks8851_write_mac_addr - write mac address to device registers
315 * @dev: The network device
316 *
317 * Update the KS8851 MAC address registers from the address in @dev.
318 *
319 * This call assumes that the chip is not running, so there is no need to
320 * shutdown the RXQ process whilst setting this.
321*/
322static int ks8851_write_mac_addr(struct net_device *dev)
323{
324 struct ks8851_net *ks = netdev_priv(dev);
325 u16 *mcp = (u16 *)dev->dev_addr;
326
327 mutex_lock(&ks->lock);
328
329 ks8851_wrreg16(ks, KS_MARL, mcp[0]);
330 ks8851_wrreg16(ks, KS_MARM, mcp[1]);
331 ks8851_wrreg16(ks, KS_MARH, mcp[2]);
332
333 mutex_unlock(&ks->lock);
334
335 return 0;
336}
337
338/**
339 * ks8851_init_mac - initialise the mac address
340 * @ks: The device structure
341 *
342 * Get or create the initial mac address for the device and then set that
343 * into the station address register. Currently we assume that the device
344 * does not have a valid mac address in it, and so we use random_ether_addr()
345 * to create a new one.
346 *
347 * In future, the driver should check to see if the device has an EEPROM
348 * attached and whether that has a valid ethernet address in it.
349 */
350static void ks8851_init_mac(struct ks8851_net *ks)
351{
352 struct net_device *dev = ks->netdev;
353
354 random_ether_addr(dev->dev_addr);
355 ks8851_write_mac_addr(dev);
356}
357
358/**
359 * ks8851_irq - device interrupt handler
360 * @irq: Interrupt number passed from the IRQ hnalder.
361 * @pw: The private word passed to register_irq(), our struct ks8851_net.
362 *
363 * Disable the interrupt from happening again until we've processed the
364 * current status by scheduling ks8851_irq_work().
365 */
366static irqreturn_t ks8851_irq(int irq, void *pw)
367{
368 struct ks8851_net *ks = pw;
369
370 disable_irq_nosync(irq);
371 schedule_work(&ks->irq_work);
372 return IRQ_HANDLED;
373}
374
375/**
376 * ks8851_rdfifo - read data from the receive fifo
377 * @ks: The device state.
378 * @buff: The buffer address
379 * @len: The length of the data to read
380 *
381 * Issue an RXQ FIFO read command and read the @len ammount of data from
382 * the FIFO into the buffer specified by @buff.
383 */
384static void ks8851_rdfifo(struct ks8851_net *ks, u8 *buff, unsigned len)
385{
386 struct spi_transfer *xfer = ks->spi_xfer2;
387 struct spi_message *msg = &ks->spi_msg2;
388 u8 txb[1];
389 int ret;
390
391 if (netif_msg_rx_status(ks))
392 ks_dbg(ks, "%s: %d@%p\n", __func__, len, buff);
393
394 /* set the operation we're issuing */
395 txb[0] = KS_SPIOP_RXFIFO;
396
397 xfer->tx_buf = txb;
398 xfer->rx_buf = NULL;
399 xfer->len = 1;
400
401 xfer++;
402 xfer->rx_buf = buff;
403 xfer->tx_buf = NULL;
404 xfer->len = len;
405
406 ret = spi_sync(ks->spidev, msg);
407 if (ret < 0)
408 ks_err(ks, "%s: spi_sync() failed\n", __func__);
409}
410
411/**
412 * ks8851_dbg_dumpkkt - dump initial packet contents to debug
413 * @ks: The device state
414 * @rxpkt: The data for the received packet
415 *
416 * Dump the initial data from the packet to dev_dbg().
417*/
418static void ks8851_dbg_dumpkkt(struct ks8851_net *ks, u8 *rxpkt)
419{
420 ks_dbg(ks, "pkt %02x%02x%02x%02x %02x%02x%02x%02x %02x%02x%02x%02x\n",
421 rxpkt[4], rxpkt[5], rxpkt[6], rxpkt[7],
422 rxpkt[8], rxpkt[9], rxpkt[10], rxpkt[11],
423 rxpkt[12], rxpkt[13], rxpkt[14], rxpkt[15]);
424}
425
426/**
427 * ks8851_rx_pkts - receive packets from the host
428 * @ks: The device information.
429 *
430 * This is called from the IRQ work queue when the system detects that there
431 * are packets in the receive queue. Find out how many packets there are and
432 * read them from the FIFO.
433 */
434static void ks8851_rx_pkts(struct ks8851_net *ks)
435{
436 struct sk_buff *skb;
437 unsigned rxfc;
438 unsigned rxlen;
439 unsigned rxstat;
440 u32 rxh;
441 u8 *rxpkt;
442
443 rxfc = ks8851_rdreg8(ks, KS_RXFC);
444
445 if (netif_msg_rx_status(ks))
446 ks_dbg(ks, "%s: %d packets\n", __func__, rxfc);
447
448 /* Currently we're issuing a read per packet, but we could possibly
449 * improve the code by issuing a single read, getting the receive
450 * header, allocating the packet and then reading the packet data
451 * out in one go.
452 *
453 * This form of operation would require us to hold the SPI bus'
454 * chipselect low during the entie transaction to avoid any
455 * reset to the data stream comming from the chip.
456 */
457
458 for (; rxfc != 0; rxfc--) {
459 rxh = ks8851_rdreg32(ks, KS_RXFHSR);
460 rxstat = rxh & 0xffff;
461 rxlen = rxh >> 16;
462
463 if (netif_msg_rx_status(ks))
464 ks_dbg(ks, "rx: stat 0x%04x, len 0x%04x\n",
465 rxstat, rxlen);
466
467 /* the length of the packet includes the 32bit CRC */
468
469 /* set dma read address */
470 ks8851_wrreg16(ks, KS_RXFDPR, RXFDPR_RXFPAI | 0x00);
471
472 /* start the packet dma process, and set auto-dequeue rx */
473 ks8851_wrreg16(ks, KS_RXQCR,
474 ks->rc_rxqcr | RXQCR_SDA | RXQCR_ADRFE);
475
476 if (rxlen > 0) {
477 skb = netdev_alloc_skb(ks->netdev, rxlen + 2 + 8);
478 if (!skb) {
479 /* todo - dump frame and move on */
480 }
481
482 /* two bytes to ensure ip is aligned, and four bytes
483 * for the status header and 4 bytes of garbage */
484 skb_reserve(skb, 2 + 4 + 4);
485
486 rxpkt = skb_put(skb, rxlen - 4) - 8;
487
488 /* align the packet length to 4 bytes, and add 4 bytes
489 * as we're getting the rx status header as well */
490 ks8851_rdfifo(ks, rxpkt, ALIGN(rxlen, 4) + 8);
491
492 if (netif_msg_pktdata(ks))
493 ks8851_dbg_dumpkkt(ks, rxpkt);
494
495 skb->protocol = eth_type_trans(skb, ks->netdev);
496 netif_rx(skb);
497
498 ks->netdev->stats.rx_packets++;
499 ks->netdev->stats.rx_bytes += rxlen - 4;
500 }
501
502 ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr);
503 }
504}
505
506/**
507 * ks8851_irq_work - work queue handler for dealing with interrupt requests
508 * @work: The work structure that was scheduled by schedule_work()
509 *
510 * This is the handler invoked when the ks8851_irq() is called to find out
511 * what happened, as we cannot allow ourselves to sleep whilst waiting for
512 * anything other process has the chip's lock.
513 *
514 * Read the interrupt status, work out what needs to be done and then clear
515 * any of the interrupts that are not needed.
516 */
517static void ks8851_irq_work(struct work_struct *work)
518{
519 struct ks8851_net *ks = container_of(work, struct ks8851_net, irq_work);
520 unsigned status;
521 unsigned handled = 0;
522
523 mutex_lock(&ks->lock);
524
525 status = ks8851_rdreg16(ks, KS_ISR);
526
527 if (netif_msg_intr(ks))
528 dev_dbg(&ks->spidev->dev, "%s: status 0x%04x\n",
529 __func__, status);
530
531 if (status & IRQ_LCI) {
532 /* should do something about checking link status */
533 handled |= IRQ_LCI;
534 }
535
536 if (status & IRQ_LDI) {
537 u16 pmecr = ks8851_rdreg16(ks, KS_PMECR);
538 pmecr &= ~PMECR_WKEVT_MASK;
539 ks8851_wrreg16(ks, KS_PMECR, pmecr | PMECR_WKEVT_LINK);
540
541 handled |= IRQ_LDI;
542 }
543
544 if (status & IRQ_RXPSI)
545 handled |= IRQ_RXPSI;
546
547 if (status & IRQ_TXI) {
548 handled |= IRQ_TXI;
549
550 /* no lock here, tx queue should have been stopped */
551
552 /* update our idea of how much tx space is available to the
553 * system */
554 ks->tx_space = ks8851_rdreg16(ks, KS_TXMIR);
555
556 if (netif_msg_intr(ks))
557 ks_dbg(ks, "%s: txspace %d\n", __func__, ks->tx_space);
558 }
559
560 if (status & IRQ_RXI)
561 handled |= IRQ_RXI;
562
563 if (status & IRQ_SPIBEI) {
564 dev_err(&ks->spidev->dev, "%s: spi bus error\n", __func__);
565 handled |= IRQ_SPIBEI;
566 }
567
568 ks8851_wrreg16(ks, KS_ISR, handled);
569
570 if (status & IRQ_RXI) {
571 /* the datasheet says to disable the rx interrupt during
572 * packet read-out, however we're masking the interrupt
573 * from the device so do not bother masking just the RX
574 * from the device. */
575
576 ks8851_rx_pkts(ks);
577 }
578
579 /* if something stopped the rx process, probably due to wanting
580 * to change the rx settings, then do something about restarting
581 * it. */
582 if (status & IRQ_RXPSI) {
583 struct ks8851_rxctrl *rxc = &ks->rxctrl;
584
585 /* update the multicast hash table */
586 ks8851_wrreg16(ks, KS_MAHTR0, rxc->mchash[0]);
587 ks8851_wrreg16(ks, KS_MAHTR1, rxc->mchash[1]);
588 ks8851_wrreg16(ks, KS_MAHTR2, rxc->mchash[2]);
589 ks8851_wrreg16(ks, KS_MAHTR3, rxc->mchash[3]);
590
591 ks8851_wrreg16(ks, KS_RXCR2, rxc->rxcr2);
592 ks8851_wrreg16(ks, KS_RXCR1, rxc->rxcr1);
593 }
594
595 mutex_unlock(&ks->lock);
596
597 if (status & IRQ_TXI)
598 netif_wake_queue(ks->netdev);
599
600 enable_irq(ks->netdev->irq);
601}
602
603/**
604 * calc_txlen - calculate size of message to send packet
605 * @len: Lenght of data
606 *
607 * Returns the size of the TXFIFO message needed to send
608 * this packet.
609 */
610static inline unsigned calc_txlen(unsigned len)
611{
612 return ALIGN(len + 4, 4);
613}
614
615/**
616 * ks8851_wrpkt - write packet to TX FIFO
617 * @ks: The device state.
618 * @txp: The sk_buff to transmit.
619 * @irq: IRQ on completion of the packet.
620 *
621 * Send the @txp to the chip. This means creating the relevant packet header
622 * specifying the length of the packet and the other information the chip
623 * needs, such as IRQ on completion. Send the header and the packet data to
624 * the device.
625 */
626static void ks8851_wrpkt(struct ks8851_net *ks, struct sk_buff *txp, bool irq)
627{
628 struct spi_transfer *xfer = ks->spi_xfer2;
629 struct spi_message *msg = &ks->spi_msg2;
630 unsigned fid = 0;
631 int ret;
632
633 if (netif_msg_tx_queued(ks))
634 dev_dbg(&ks->spidev->dev, "%s: skb %p, %d@%p, irq %d\n",
635 __func__, txp, txp->len, txp->data, irq);
636
637 fid = ks->fid++;
638 fid &= TXFR_TXFID_MASK;
639
640 if (irq)
641 fid |= TXFR_TXIC; /* irq on completion */
642
643 /* start header at txb[1] to align txw entries */
644 ks->txh.txb[1] = KS_SPIOP_TXFIFO;
645 ks->txh.txw[1] = cpu_to_le16(fid);
646 ks->txh.txw[2] = cpu_to_le16(txp->len);
647
648 xfer->tx_buf = &ks->txh.txb[1];
649 xfer->rx_buf = NULL;
650 xfer->len = 5;
651
652 xfer++;
653 xfer->tx_buf = txp->data;
654 xfer->rx_buf = NULL;
655 xfer->len = ALIGN(txp->len, 4);
656
657 ret = spi_sync(ks->spidev, msg);
658 if (ret < 0)
659 ks_err(ks, "%s: spi_sync() failed\n", __func__);
660}
661
662/**
663 * ks8851_done_tx - update and then free skbuff after transmitting
664 * @ks: The device state
665 * @txb: The buffer transmitted
666 */
667static void ks8851_done_tx(struct ks8851_net *ks, struct sk_buff *txb)
668{
669 struct net_device *dev = ks->netdev;
670
671 dev->stats.tx_bytes += txb->len;
672 dev->stats.tx_packets++;
673
674 dev_kfree_skb(txb);
675}
676
677/**
678 * ks8851_tx_work - process tx packet(s)
679 * @work: The work strucutre what was scheduled.
680 *
681 * This is called when a number of packets have been scheduled for
682 * transmission and need to be sent to the device.
683 */
684static void ks8851_tx_work(struct work_struct *work)
685{
686 struct ks8851_net *ks = container_of(work, struct ks8851_net, tx_work);
687 struct sk_buff *txb;
688 bool last = false;
689
690 mutex_lock(&ks->lock);
691
692 while (!last) {
693 txb = skb_dequeue(&ks->txq);
694 last = skb_queue_empty(&ks->txq);
695
696 ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr | RXQCR_SDA);
697 ks8851_wrpkt(ks, txb, last);
698 ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr);
699 ks8851_wrreg16(ks, KS_TXQCR, TXQCR_METFE);
700
701 ks8851_done_tx(ks, txb);
702 }
703
704 mutex_unlock(&ks->lock);
705}
706
707/**
708 * ks8851_set_powermode - set power mode of the device
709 * @ks: The device state
710 * @pwrmode: The power mode value to write to KS_PMECR.
711 *
712 * Change the power mode of the chip.
713 */
714static void ks8851_set_powermode(struct ks8851_net *ks, unsigned pwrmode)
715{
716 unsigned pmecr;
717
718 if (netif_msg_hw(ks))
719 ks_dbg(ks, "setting power mode %d\n", pwrmode);
720
721 pmecr = ks8851_rdreg16(ks, KS_PMECR);
722 pmecr &= ~PMECR_PM_MASK;
723 pmecr |= pwrmode;
724
725 ks8851_wrreg16(ks, KS_PMECR, pmecr);
726}
727
728/**
729 * ks8851_net_open - open network device
730 * @dev: The network device being opened.
731 *
732 * Called when the network device is marked active, such as a user executing
733 * 'ifconfig up' on the device.
734 */
735static int ks8851_net_open(struct net_device *dev)
736{
737 struct ks8851_net *ks = netdev_priv(dev);
738
739 /* lock the card, even if we may not actually be doing anything
740 * else at the moment */
741 mutex_lock(&ks->lock);
742
743 if (netif_msg_ifup(ks))
744 ks_dbg(ks, "opening %s\n", dev->name);
745
746 /* bring chip out of any power saving mode it was in */
747 ks8851_set_powermode(ks, PMECR_PM_NORMAL);
748
749 /* issue a soft reset to the RX/TX QMU to put it into a known
750 * state. */
751 ks8851_soft_reset(ks, GRR_QMU);
752
753 /* setup transmission parameters */
754
755 ks8851_wrreg16(ks, KS_TXCR, (TXCR_TXE | /* enable transmit process */
756 TXCR_TXPE | /* pad to min length */
757 TXCR_TXCRC | /* add CRC */
758 TXCR_TXFCE)); /* enable flow control */
759
760 /* auto-increment tx data, reset tx pointer */
761 ks8851_wrreg16(ks, KS_TXFDPR, TXFDPR_TXFPAI);
762
763 /* setup receiver control */
764
765 ks8851_wrreg16(ks, KS_RXCR1, (RXCR1_RXPAFMA | /* from mac filter */
766 RXCR1_RXFCE | /* enable flow control */
767 RXCR1_RXBE | /* broadcast enable */
768 RXCR1_RXUE | /* unicast enable */
769 RXCR1_RXE)); /* enable rx block */
770
771 /* transfer entire frames out in one go */
772 ks8851_wrreg16(ks, KS_RXCR2, RXCR2_SRDBL_FRAME);
773
774 /* set receive counter timeouts */
775 ks8851_wrreg16(ks, KS_RXDTTR, 1000); /* 1ms after first frame to IRQ */
776 ks8851_wrreg16(ks, KS_RXDBCTR, 4096); /* >4Kbytes in buffer to IRQ */
777 ks8851_wrreg16(ks, KS_RXFCTR, 10); /* 10 frames to IRQ */
778
779 ks->rc_rxqcr = (RXQCR_RXFCTE | /* IRQ on frame count exceeded */
780 RXQCR_RXDBCTE | /* IRQ on byte count exceeded */
781 RXQCR_RXDTTE); /* IRQ on time exceeded */
782
783 ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr);
784
785 /* clear then enable interrupts */
786
787#define STD_IRQ (IRQ_LCI | /* Link Change */ \
788 IRQ_TXI | /* TX done */ \
789 IRQ_RXI | /* RX done */ \
790 IRQ_SPIBEI | /* SPI bus error */ \
791 IRQ_TXPSI | /* TX process stop */ \
792 IRQ_RXPSI) /* RX process stop */
793
794 ks->rc_ier = STD_IRQ;
795 ks8851_wrreg16(ks, KS_ISR, STD_IRQ);
796 ks8851_wrreg16(ks, KS_IER, STD_IRQ);
797
798 netif_start_queue(ks->netdev);
799
800 if (netif_msg_ifup(ks))
801 ks_dbg(ks, "network device %s up\n", dev->name);
802
803 mutex_unlock(&ks->lock);
804 return 0;
805}
806
807/**
808 * ks8851_net_stop - close network device
809 * @dev: The device being closed.
810 *
811 * Called to close down a network device which has been active. Cancell any
812 * work, shutdown the RX and TX process and then place the chip into a low
813 * power state whilst it is not being used.
814 */
815static int ks8851_net_stop(struct net_device *dev)
816{
817 struct ks8851_net *ks = netdev_priv(dev);
818
819 if (netif_msg_ifdown(ks))
820 ks_info(ks, "%s: shutting down\n", dev->name);
821
822 netif_stop_queue(dev);
823
824 mutex_lock(&ks->lock);
825
826 /* stop any outstanding work */
827 flush_work(&ks->irq_work);
828 flush_work(&ks->tx_work);
829 flush_work(&ks->rxctrl_work);
830
831 /* turn off the IRQs and ack any outstanding */
832 ks8851_wrreg16(ks, KS_IER, 0x0000);
833 ks8851_wrreg16(ks, KS_ISR, 0xffff);
834
835 /* shutdown RX process */
836 ks8851_wrreg16(ks, KS_RXCR1, 0x0000);
837
838 /* shutdown TX process */
839 ks8851_wrreg16(ks, KS_TXCR, 0x0000);
840
841 /* set powermode to soft power down to save power */
842 ks8851_set_powermode(ks, PMECR_PM_SOFTDOWN);
843
844 /* ensure any queued tx buffers are dumped */
845 while (!skb_queue_empty(&ks->txq)) {
846 struct sk_buff *txb = skb_dequeue(&ks->txq);
847
848 if (netif_msg_ifdown(ks))
849 ks_dbg(ks, "%s: freeing txb %p\n", __func__, txb);
850
851 dev_kfree_skb(txb);
852 }
853
854 mutex_unlock(&ks->lock);
855 return 0;
856}
857
858/**
859 * ks8851_start_xmit - transmit packet
860 * @skb: The buffer to transmit
861 * @dev: The device used to transmit the packet.
862 *
863 * Called by the network layer to transmit the @skb. Queue the packet for
864 * the device and schedule the necessary work to transmit the packet when
865 * it is free.
866 *
867 * We do this to firstly avoid sleeping with the network device locked,
868 * and secondly so we can round up more than one packet to transmit which
869 * means we can try and avoid generating too many transmit done interrupts.
870 */
871static int ks8851_start_xmit(struct sk_buff *skb, struct net_device *dev)
872{
873 struct ks8851_net *ks = netdev_priv(dev);
874 unsigned needed = calc_txlen(skb->len);
875 int ret = NETDEV_TX_OK;
876
877 if (netif_msg_tx_queued(ks))
878 ks_dbg(ks, "%s: skb %p, %d@%p\n", __func__,
879 skb, skb->len, skb->data);
880
881 spin_lock(&ks->statelock);
882
883 if (needed > ks->tx_space) {
884 netif_stop_queue(dev);
885 ret = NETDEV_TX_BUSY;
886 } else {
887 ks->tx_space -= needed;
888 skb_queue_tail(&ks->txq, skb);
889 }
890
891 spin_unlock(&ks->statelock);
892 schedule_work(&ks->tx_work);
893
894 return ret;
895}
896
897/**
898 * ks8851_rxctrl_work - work handler to change rx mode
899 * @work: The work structure this belongs to.
900 *
901 * Lock the device and issue the necessary changes to the receive mode from
902 * the network device layer. This is done so that we can do this without
903 * having to sleep whilst holding the network device lock.
904 *
905 * Since the recommendation from Micrel is that the RXQ is shutdown whilst the
906 * receive parameters are programmed, we issue a write to disable the RXQ and
907 * then wait for the interrupt handler to be triggered once the RXQ shutdown is
908 * complete. The interrupt handler then writes the new values into the chip.
909 */
910static void ks8851_rxctrl_work(struct work_struct *work)
911{
912 struct ks8851_net *ks = container_of(work, struct ks8851_net, rxctrl_work);
913
914 mutex_lock(&ks->lock);
915
916 /* need to shutdown RXQ before modifying filter parameters */
917 ks8851_wrreg16(ks, KS_RXCR1, 0x00);
918
919 mutex_unlock(&ks->lock);
920}
921
922static void ks8851_set_rx_mode(struct net_device *dev)
923{
924 struct ks8851_net *ks = netdev_priv(dev);
925 struct ks8851_rxctrl rxctrl;
926
927 memset(&rxctrl, 0, sizeof(rxctrl));
928
929 if (dev->flags & IFF_PROMISC) {
930 /* interface to receive everything */
931
932 rxctrl.rxcr1 = RXCR1_RXAE | RXCR1_RXINVF;
933 } else if (dev->flags & IFF_ALLMULTI) {
934 /* accept all multicast packets */
935
936 rxctrl.rxcr1 = (RXCR1_RXME | RXCR1_RXAE |
937 RXCR1_RXPAFMA | RXCR1_RXMAFMA);
938 } else if (dev->flags & IFF_MULTICAST && dev->mc_count > 0) {
939 struct dev_mc_list *mcptr = dev->mc_list;
940 u32 crc;
941 int i;
942
943 /* accept some multicast */
944
945 for (i = dev->mc_count; i > 0; i--) {
946 crc = ether_crc(ETH_ALEN, mcptr->dmi_addr);
947 crc >>= (32 - 6); /* get top six bits */
948
949 rxctrl.mchash[crc >> 4] |= (1 << (crc & 0xf));
950 mcptr = mcptr->next;
951 }
952
953 rxctrl.rxcr1 = RXCR1_RXME | RXCR1_RXAE | RXCR1_RXPAFMA;
954 } else {
955 /* just accept broadcast / unicast */
956 rxctrl.rxcr1 = RXCR1_RXPAFMA;
957 }
958
959 rxctrl.rxcr1 |= (RXCR1_RXUE | /* unicast enable */
960 RXCR1_RXBE | /* broadcast enable */
961 RXCR1_RXE | /* RX process enable */
962 RXCR1_RXFCE); /* enable flow control */
963
964 rxctrl.rxcr2 |= RXCR2_SRDBL_FRAME;
965
966 /* schedule work to do the actual set of the data if needed */
967
968 spin_lock(&ks->statelock);
969
970 if (memcmp(&rxctrl, &ks->rxctrl, sizeof(rxctrl)) != 0) {
971 memcpy(&ks->rxctrl, &rxctrl, sizeof(ks->rxctrl));
972 schedule_work(&ks->rxctrl_work);
973 }
974
975 spin_unlock(&ks->statelock);
976}
977
978static int ks8851_set_mac_address(struct net_device *dev, void *addr)
979{
980 struct sockaddr *sa = addr;
981
982 if (netif_running(dev))
983 return -EBUSY;
984
985 if (!is_valid_ether_addr(sa->sa_data))
986 return -EADDRNOTAVAIL;
987
988 memcpy(dev->dev_addr, sa->sa_data, ETH_ALEN);
989 return ks8851_write_mac_addr(dev);
990}
991
992static int ks8851_net_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
993{
994 struct ks8851_net *ks = netdev_priv(dev);
995
996 if (!netif_running(dev))
997 return -EINVAL;
998
999 return generic_mii_ioctl(&ks->mii, if_mii(req), cmd, NULL);
1000}
1001
1002static const struct net_device_ops ks8851_netdev_ops = {
1003 .ndo_open = ks8851_net_open,
1004 .ndo_stop = ks8851_net_stop,
1005 .ndo_do_ioctl = ks8851_net_ioctl,
1006 .ndo_start_xmit = ks8851_start_xmit,
1007 .ndo_set_mac_address = ks8851_set_mac_address,
1008 .ndo_set_rx_mode = ks8851_set_rx_mode,
1009 .ndo_change_mtu = eth_change_mtu,
1010 .ndo_validate_addr = eth_validate_addr,
1011};
1012
1013/* ethtool support */
1014
1015static void ks8851_get_drvinfo(struct net_device *dev,
1016 struct ethtool_drvinfo *di)
1017{
1018 strlcpy(di->driver, "KS8851", sizeof(di->driver));
1019 strlcpy(di->version, "1.00", sizeof(di->version));
1020 strlcpy(di->bus_info, dev_name(dev->dev.parent), sizeof(di->bus_info));
1021}
1022
1023static u32 ks8851_get_msglevel(struct net_device *dev)
1024{
1025 struct ks8851_net *ks = netdev_priv(dev);
1026 return ks->msg_enable;
1027}
1028
1029static void ks8851_set_msglevel(struct net_device *dev, u32 to)
1030{
1031 struct ks8851_net *ks = netdev_priv(dev);
1032 ks->msg_enable = to;
1033}
1034
1035static int ks8851_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
1036{
1037 struct ks8851_net *ks = netdev_priv(dev);
1038 return mii_ethtool_gset(&ks->mii, cmd);
1039}
1040
1041static int ks8851_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
1042{
1043 struct ks8851_net *ks = netdev_priv(dev);
1044 return mii_ethtool_sset(&ks->mii, cmd);
1045}
1046
1047static u32 ks8851_get_link(struct net_device *dev)
1048{
1049 struct ks8851_net *ks = netdev_priv(dev);
1050 return mii_link_ok(&ks->mii);
1051}
1052
1053static int ks8851_nway_reset(struct net_device *dev)
1054{
1055 struct ks8851_net *ks = netdev_priv(dev);
1056 return mii_nway_restart(&ks->mii);
1057}
1058
1059static const struct ethtool_ops ks8851_ethtool_ops = {
1060 .get_drvinfo = ks8851_get_drvinfo,
1061 .get_msglevel = ks8851_get_msglevel,
1062 .set_msglevel = ks8851_set_msglevel,
1063 .get_settings = ks8851_get_settings,
1064 .set_settings = ks8851_set_settings,
1065 .get_link = ks8851_get_link,
1066 .nway_reset = ks8851_nway_reset,
1067};
1068
1069/* MII interface controls */
1070
1071/**
1072 * ks8851_phy_reg - convert MII register into a KS8851 register
1073 * @reg: MII register number.
1074 *
1075 * Return the KS8851 register number for the corresponding MII PHY register
1076 * if possible. Return zero if the MII register has no direct mapping to the
1077 * KS8851 register set.
1078 */
1079static int ks8851_phy_reg(int reg)
1080{
1081 switch (reg) {
1082 case MII_BMCR:
1083 return KS_P1MBCR;
1084 case MII_BMSR:
1085 return KS_P1MBSR;
1086 case MII_PHYSID1:
1087 return KS_PHY1ILR;
1088 case MII_PHYSID2:
1089 return KS_PHY1IHR;
1090 case MII_ADVERTISE:
1091 return KS_P1ANAR;
1092 case MII_LPA:
1093 return KS_P1ANLPR;
1094 }
1095
1096 return 0x0;
1097}
1098
1099/**
1100 * ks8851_phy_read - MII interface PHY register read.
1101 * @dev: The network device the PHY is on.
1102 * @phy_addr: Address of PHY (ignored as we only have one)
1103 * @reg: The register to read.
1104 *
1105 * This call reads data from the PHY register specified in @reg. Since the
1106 * device does not support all the MII registers, the non-existant values
1107 * are always returned as zero.
1108 *
1109 * We return zero for unsupported registers as the MII code does not check
1110 * the value returned for any error status, and simply returns it to the
1111 * caller. The mii-tool that the driver was tested with takes any -ve error
1112 * as real PHY capabilities, thus displaying incorrect data to the user.
1113 */
1114static int ks8851_phy_read(struct net_device *dev, int phy_addr, int reg)
1115{
1116 struct ks8851_net *ks = netdev_priv(dev);
1117 int ksreg;
1118 int result;
1119
1120 ksreg = ks8851_phy_reg(reg);
1121 if (!ksreg)
1122 return 0x0; /* no error return allowed, so use zero */
1123
1124 mutex_lock(&ks->lock);
1125 result = ks8851_rdreg16(ks, ksreg);
1126 mutex_unlock(&ks->lock);
1127
1128 return result;
1129}
1130
1131static void ks8851_phy_write(struct net_device *dev,
1132 int phy, int reg, int value)
1133{
1134 struct ks8851_net *ks = netdev_priv(dev);
1135 int ksreg;
1136
1137 ksreg = ks8851_phy_reg(reg);
1138 if (ksreg) {
1139 mutex_lock(&ks->lock);
1140 ks8851_wrreg16(ks, ksreg, value);
1141 mutex_unlock(&ks->lock);
1142 }
1143}
1144
1145/**
1146 * ks8851_read_selftest - read the selftest memory info.
1147 * @ks: The device state
1148 *
1149 * Read and check the TX/RX memory selftest information.
1150 */
1151static int ks8851_read_selftest(struct ks8851_net *ks)
1152{
1153 unsigned both_done = MBIR_TXMBF | MBIR_RXMBF;
1154 int ret = 0;
1155 unsigned rd;
1156
1157 rd = ks8851_rdreg16(ks, KS_MBIR);
1158
1159 if ((rd & both_done) != both_done) {
1160 ks_warn(ks, "Memory selftest not finished\n");
1161 return 0;
1162 }
1163
1164 if (rd & MBIR_TXMBFA) {
1165 ks_err(ks, "TX memory selftest fail\n");
1166 ret |= 1;
1167 }
1168
1169 if (rd & MBIR_RXMBFA) {
1170 ks_err(ks, "RX memory selftest fail\n");
1171 ret |= 2;
1172 }
1173
1174 return 0;
1175}
1176
1177/* driver bus management functions */
1178
1179static int __devinit ks8851_probe(struct spi_device *spi)
1180{
1181 struct net_device *ndev;
1182 struct ks8851_net *ks;
1183 int ret;
1184
1185 ndev = alloc_etherdev(sizeof(struct ks8851_net));
1186 if (!ndev) {
1187 dev_err(&spi->dev, "failed to alloc ethernet device\n");
1188 return -ENOMEM;
1189 }
1190
1191 spi->bits_per_word = 8;
1192
1193 ks = netdev_priv(ndev);
1194
1195 ks->netdev = ndev;
1196 ks->spidev = spi;
1197 ks->tx_space = 6144;
1198
1199 mutex_init(&ks->lock);
1200 spin_lock_init(&ks->statelock);
1201
1202 INIT_WORK(&ks->tx_work, ks8851_tx_work);
1203 INIT_WORK(&ks->irq_work, ks8851_irq_work);
1204 INIT_WORK(&ks->rxctrl_work, ks8851_rxctrl_work);
1205
1206 /* initialise pre-made spi transfer messages */
1207
1208 spi_message_init(&ks->spi_msg1);
1209 spi_message_add_tail(&ks->spi_xfer1, &ks->spi_msg1);
1210
1211 spi_message_init(&ks->spi_msg2);
1212 spi_message_add_tail(&ks->spi_xfer2[0], &ks->spi_msg2);
1213 spi_message_add_tail(&ks->spi_xfer2[1], &ks->spi_msg2);
1214
1215 /* setup mii state */
1216 ks->mii.dev = ndev;
1217 ks->mii.phy_id = 1,
1218 ks->mii.phy_id_mask = 1;
1219 ks->mii.reg_num_mask = 0xf;
1220 ks->mii.mdio_read = ks8851_phy_read;
1221 ks->mii.mdio_write = ks8851_phy_write;
1222
1223 dev_info(&spi->dev, "message enable is %d\n", msg_enable);
1224
1225 /* set the default message enable */
1226 ks->msg_enable = netif_msg_init(msg_enable, (NETIF_MSG_DRV |
1227 NETIF_MSG_PROBE |
1228 NETIF_MSG_LINK));
1229
1230 skb_queue_head_init(&ks->txq);
1231
1232 SET_ETHTOOL_OPS(ndev, &ks8851_ethtool_ops);
1233 SET_NETDEV_DEV(ndev, &spi->dev);
1234
1235 dev_set_drvdata(&spi->dev, ks);
1236
1237 ndev->if_port = IF_PORT_100BASET;
1238 ndev->netdev_ops = &ks8851_netdev_ops;
1239 ndev->irq = spi->irq;
1240
1241 /* simple check for a valid chip being connected to the bus */
1242
1243 if ((ks8851_rdreg16(ks, KS_CIDER) & ~CIDER_REV_MASK) != CIDER_ID) {
1244 dev_err(&spi->dev, "failed to read device ID\n");
1245 ret = -ENODEV;
1246 goto err_id;
1247 }
1248
1249 ks8851_read_selftest(ks);
1250 ks8851_init_mac(ks);
1251
1252 ret = request_irq(spi->irq, ks8851_irq, IRQF_TRIGGER_LOW,
1253 ndev->name, ks);
1254 if (ret < 0) {
1255 dev_err(&spi->dev, "failed to get irq\n");
1256 goto err_irq;
1257 }
1258
1259 ret = register_netdev(ndev);
1260 if (ret) {
1261 dev_err(&spi->dev, "failed to register network device\n");
1262 goto err_netdev;
1263 }
1264
1265 dev_info(&spi->dev, "revision %d, MAC %pM, IRQ %d\n",
1266 CIDER_REV_GET(ks8851_rdreg16(ks, KS_CIDER)),
1267 ndev->dev_addr, ndev->irq);
1268
1269 return 0;
1270
1271
1272err_netdev:
1273 free_irq(ndev->irq, ndev);
1274
1275err_id:
1276err_irq:
1277 free_netdev(ndev);
1278 return ret;
1279}
1280
1281static int __devexit ks8851_remove(struct spi_device *spi)
1282{
1283 struct ks8851_net *priv = dev_get_drvdata(&spi->dev);
1284
1285 if (netif_msg_drv(priv))
1286 dev_info(&spi->dev, "remove");
1287
1288 unregister_netdev(priv->netdev);
1289 free_irq(spi->irq, priv);
1290 free_netdev(priv->netdev);
1291
1292 return 0;
1293}
1294
1295static struct spi_driver ks8851_driver = {
1296 .driver = {
1297 .name = "ks8851",
1298 .owner = THIS_MODULE,
1299 },
1300 .probe = ks8851_probe,
1301 .remove = __devexit_p(ks8851_remove),
1302};
1303
1304static int __init ks8851_init(void)
1305{
1306 return spi_register_driver(&ks8851_driver);
1307}
1308
1309static void __exit ks8851_exit(void)
1310{
1311 spi_unregister_driver(&ks8851_driver);
1312}
1313
1314module_init(ks8851_init);
1315module_exit(ks8851_exit);
1316
1317MODULE_DESCRIPTION("KS8851 Network driver");
1318MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
1319MODULE_LICENSE("GPL");
1320
1321module_param_named(message, msg_enable, int, 0);
1322MODULE_PARM_DESC(message, "Message verbosity level (0=none, 31=all)");
diff --git a/drivers/net/ks8851.h b/drivers/net/ks8851.h
new file mode 100644
index 00000000000..85abe147afb
--- /dev/null
+++ b/drivers/net/ks8851.h
@@ -0,0 +1,296 @@
1/* drivers/net/ks8851.h
2 *
3 * Copyright 2009 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * KS8851 register definitions
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#define KS_CCR 0x08
14#define CCR_EEPROM (1 << 9)
15#define CCR_SPI (1 << 8)
16#define CCR_32PIN (1 << 0)
17
18/* MAC address registers */
19#define KS_MARL 0x10
20#define KS_MARM 0x12
21#define KS_MARH 0x14
22
23#define KS_OBCR 0x20
24#define OBCR_ODS_16mA (1 << 6)
25
26#define KS_EEPCR 0x22
27#define EEPCR_EESA (1 << 4)
28#define EEPCR_EESB (1 << 3)
29#define EEPCR_EEDO (1 << 2)
30#define EEPCR_EESCK (1 << 1)
31#define EEPCR_EECS (1 << 0)
32
33#define KS_MBIR 0x24
34#define MBIR_TXMBF (1 << 12)
35#define MBIR_TXMBFA (1 << 11)
36#define MBIR_RXMBF (1 << 4)
37#define MBIR_RXMBFA (1 << 3)
38
39#define KS_GRR 0x26
40#define GRR_QMU (1 << 1)
41#define GRR_GSR (1 << 0)
42
43#define KS_WFCR 0x2A
44#define WFCR_MPRXE (1 << 7)
45#define WFCR_WF3E (1 << 3)
46#define WFCR_WF2E (1 << 2)
47#define WFCR_WF1E (1 << 1)
48#define WFCR_WF0E (1 << 0)
49
50#define KS_WF0CRC0 0x30
51#define KS_WF0CRC1 0x32
52#define KS_WF0BM0 0x34
53#define KS_WF0BM1 0x36
54#define KS_WF0BM2 0x38
55#define KS_WF0BM3 0x3A
56
57#define KS_WF1CRC0 0x40
58#define KS_WF1CRC1 0x42
59#define KS_WF1BM0 0x44
60#define KS_WF1BM1 0x46
61#define KS_WF1BM2 0x48
62#define KS_WF1BM3 0x4A
63
64#define KS_WF2CRC0 0x50
65#define KS_WF2CRC1 0x52
66#define KS_WF2BM0 0x54
67#define KS_WF2BM1 0x56
68#define KS_WF2BM2 0x58
69#define KS_WF2BM3 0x5A
70
71#define KS_WF3CRC0 0x60
72#define KS_WF3CRC1 0x62
73#define KS_WF3BM0 0x64
74#define KS_WF3BM1 0x66
75#define KS_WF3BM2 0x68
76#define KS_WF3BM3 0x6A
77
78#define KS_TXCR 0x70
79#define TXCR_TCGICMP (1 << 8)
80#define TXCR_TCGUDP (1 << 7)
81#define TXCR_TCGTCP (1 << 6)
82#define TXCR_TCGIP (1 << 5)
83#define TXCR_FTXQ (1 << 4)
84#define TXCR_TXFCE (1 << 3)
85#define TXCR_TXPE (1 << 2)
86#define TXCR_TXCRC (1 << 1)
87#define TXCR_TXE (1 << 0)
88
89#define KS_TXSR 0x72
90#define TXSR_TXLC (1 << 13)
91#define TXSR_TXMC (1 << 12)
92#define TXSR_TXFID_MASK (0x3f << 0)
93#define TXSR_TXFID_SHIFT (0)
94#define TXSR_TXFID_GET(_v) (((_v) >> 0) & 0x3f)
95
96#define KS_RXCR1 0x74
97#define RXCR1_FRXQ (1 << 15)
98#define RXCR1_RXUDPFCC (1 << 14)
99#define RXCR1_RXTCPFCC (1 << 13)
100#define RXCR1_RXIPFCC (1 << 12)
101#define RXCR1_RXPAFMA (1 << 11)
102#define RXCR1_RXFCE (1 << 10)
103#define RXCR1_RXEFE (1 << 9)
104#define RXCR1_RXMAFMA (1 << 8)
105#define RXCR1_RXBE (1 << 7)
106#define RXCR1_RXME (1 << 6)
107#define RXCR1_RXUE (1 << 5)
108#define RXCR1_RXAE (1 << 4)
109#define RXCR1_RXINVF (1 << 1)
110#define RXCR1_RXE (1 << 0)
111
112#define KS_RXCR2 0x76
113#define RXCR2_SRDBL_MASK (0x7 << 5)
114#define RXCR2_SRDBL_SHIFT (5)
115#define RXCR2_SRDBL_4B (0x0 << 5)
116#define RXCR2_SRDBL_8B (0x1 << 5)
117#define RXCR2_SRDBL_16B (0x2 << 5)
118#define RXCR2_SRDBL_32B (0x3 << 5)
119#define RXCR2_SRDBL_FRAME (0x4 << 5)
120#define RXCR2_IUFFP (1 << 4)
121#define RXCR2_RXIUFCEZ (1 << 3)
122#define RXCR2_UDPLFE (1 << 2)
123#define RXCR2_RXICMPFCC (1 << 1)
124#define RXCR2_RXSAF (1 << 0)
125
126#define KS_TXMIR 0x78
127
128#define KS_RXFHSR 0x7C
129#define RXFSHR_RXFV (1 << 15)
130#define RXFSHR_RXICMPFCS (1 << 13)
131#define RXFSHR_RXIPFCS (1 << 12)
132#define RXFSHR_RXTCPFCS (1 << 11)
133#define RXFSHR_RXUDPFCS (1 << 10)
134#define RXFSHR_RXBF (1 << 7)
135#define RXFSHR_RXMF (1 << 6)
136#define RXFSHR_RXUF (1 << 5)
137#define RXFSHR_RXMR (1 << 4)
138#define RXFSHR_RXFT (1 << 3)
139#define RXFSHR_RXFTL (1 << 2)
140#define RXFSHR_RXRF (1 << 1)
141#define RXFSHR_RXCE (1 << 0)
142
143#define KS_RXFHBCR 0x7E
144#define KS_TXQCR 0x80
145#define TXQCR_AETFE (1 << 2)
146#define TXQCR_TXQMAM (1 << 1)
147#define TXQCR_METFE (1 << 0)
148
149#define KS_RXQCR 0x82
150#define RXQCR_RXDTTS (1 << 12)
151#define RXQCR_RXDBCTS (1 << 11)
152#define RXQCR_RXFCTS (1 << 10)
153#define RXQCR_RXIPHTOE (1 << 9)
154#define RXQCR_RXDTTE (1 << 7)
155#define RXQCR_RXDBCTE (1 << 6)
156#define RXQCR_RXFCTE (1 << 5)
157#define RXQCR_ADRFE (1 << 4)
158#define RXQCR_SDA (1 << 3)
159#define RXQCR_RRXEF (1 << 0)
160
161#define KS_TXFDPR 0x84
162#define TXFDPR_TXFPAI (1 << 14)
163#define TXFDPR_TXFP_MASK (0x7ff << 0)
164#define TXFDPR_TXFP_SHIFT (0)
165
166#define KS_RXFDPR 0x86
167#define RXFDPR_RXFPAI (1 << 14)
168
169#define KS_RXDTTR 0x8C
170#define KS_RXDBCTR 0x8E
171
172#define KS_IER 0x90
173#define KS_ISR 0x92
174#define IRQ_LCI (1 << 15)
175#define IRQ_TXI (1 << 14)
176#define IRQ_RXI (1 << 13)
177#define IRQ_RXOI (1 << 11)
178#define IRQ_TXPSI (1 << 9)
179#define IRQ_RXPSI (1 << 8)
180#define IRQ_TXSAI (1 << 6)
181#define IRQ_RXWFDI (1 << 5)
182#define IRQ_RXMPDI (1 << 4)
183#define IRQ_LDI (1 << 3)
184#define IRQ_EDI (1 << 2)
185#define IRQ_SPIBEI (1 << 1)
186#define IRQ_DEDI (1 << 0)
187
188#define KS_RXFCTR 0x9C
189#define KS_RXFC 0x9D
190#define RXFCTR_RXFC_MASK (0xff << 8)
191#define RXFCTR_RXFC_SHIFT (8)
192#define RXFCTR_RXFC_GET(_v) (((_v) >> 8) & 0xff)
193#define RXFCTR_RXFCT_MASK (0xff << 0)
194#define RXFCTR_RXFCT_SHIFT (0)
195
196#define KS_TXNTFSR 0x9E
197
198#define KS_MAHTR0 0xA0
199#define KS_MAHTR1 0xA2
200#define KS_MAHTR2 0xA4
201#define KS_MAHTR3 0xA6
202
203#define KS_FCLWR 0xB0
204#define KS_FCHWR 0xB2
205#define KS_FCOWR 0xB4
206
207#define KS_CIDER 0xC0
208#define CIDER_ID 0x8870
209#define CIDER_REV_MASK (0x7 << 1)
210#define CIDER_REV_SHIFT (1)
211#define CIDER_REV_GET(_v) (((_v) >> 1) & 0x7)
212
213#define KS_CGCR 0xC6
214
215#define KS_IACR 0xC8
216#define IACR_RDEN (1 << 12)
217#define IACR_TSEL_MASK (0x3 << 10)
218#define IACR_TSEL_SHIFT (10)
219#define IACR_TSEL_MIB (0x3 << 10)
220#define IACR_ADDR_MASK (0x1f << 0)
221#define IACR_ADDR_SHIFT (0)
222
223#define KS_IADLR 0xD0
224#define KS_IAHDR 0xD2
225
226#define KS_PMECR 0xD4
227#define PMECR_PME_DELAY (1 << 14)
228#define PMECR_PME_POL (1 << 12)
229#define PMECR_WOL_WAKEUP (1 << 11)
230#define PMECR_WOL_MAGICPKT (1 << 10)
231#define PMECR_WOL_LINKUP (1 << 9)
232#define PMECR_WOL_ENERGY (1 << 8)
233#define PMECR_AUTO_WAKE_EN (1 << 7)
234#define PMECR_WAKEUP_NORMAL (1 << 6)
235#define PMECR_WKEVT_MASK (0xf << 2)
236#define PMECR_WKEVT_SHIFT (2)
237#define PMECR_WKEVT_GET(_v) (((_v) >> 2) & 0xf)
238#define PMECR_WKEVT_ENERGY (0x1 << 2)
239#define PMECR_WKEVT_LINK (0x2 << 2)
240#define PMECR_WKEVT_MAGICPKT (0x4 << 2)
241#define PMECR_WKEVT_FRAME (0x8 << 2)
242#define PMECR_PM_MASK (0x3 << 0)
243#define PMECR_PM_SHIFT (0)
244#define PMECR_PM_NORMAL (0x0 << 0)
245#define PMECR_PM_ENERGY (0x1 << 0)
246#define PMECR_PM_SOFTDOWN (0x2 << 0)
247#define PMECR_PM_POWERSAVE (0x3 << 0)
248
249/* Standard MII PHY data */
250#define KS_P1MBCR 0xE4
251#define KS_P1MBSR 0xE6
252#define KS_PHY1ILR 0xE8
253#define KS_PHY1IHR 0xEA
254#define KS_P1ANAR 0xEC
255#define KS_P1ANLPR 0xEE
256
257#define KS_P1SCLMD 0xF4
258#define P1SCLMD_LEDOFF (1 << 15)
259#define P1SCLMD_TXIDS (1 << 14)
260#define P1SCLMD_RESTARTAN (1 << 13)
261#define P1SCLMD_DISAUTOMDIX (1 << 10)
262#define P1SCLMD_FORCEMDIX (1 << 9)
263#define P1SCLMD_AUTONEGEN (1 << 7)
264#define P1SCLMD_FORCE100 (1 << 6)
265#define P1SCLMD_FORCEFDX (1 << 5)
266#define P1SCLMD_ADV_FLOW (1 << 4)
267#define P1SCLMD_ADV_100BT_FDX (1 << 3)
268#define P1SCLMD_ADV_100BT_HDX (1 << 2)
269#define P1SCLMD_ADV_10BT_FDX (1 << 1)
270#define P1SCLMD_ADV_10BT_HDX (1 << 0)
271
272#define KS_P1CR 0xF6
273#define P1CR_HP_MDIX (1 << 15)
274#define P1CR_REV_POL (1 << 13)
275#define P1CR_OP_100M (1 << 10)
276#define P1CR_OP_FDX (1 << 9)
277#define P1CR_OP_MDI (1 << 7)
278#define P1CR_AN_DONE (1 << 6)
279#define P1CR_LINK_GOOD (1 << 5)
280#define P1CR_PNTR_FLOW (1 << 4)
281#define P1CR_PNTR_100BT_FDX (1 << 3)
282#define P1CR_PNTR_100BT_HDX (1 << 2)
283#define P1CR_PNTR_10BT_FDX (1 << 1)
284#define P1CR_PNTR_10BT_HDX (1 << 0)
285
286/* TX Frame control */
287
288#define TXFR_TXIC (1 << 15)
289#define TXFR_TXFID_MASK (0x3f << 0)
290#define TXFR_TXFID_SHIFT (0)
291
292/* SPI frame opcodes */
293#define KS_SPIOP_RD (0x00)
294#define KS_SPIOP_WR (0x40)
295#define KS_SPIOP_RXFIFO (0x80)
296#define KS_SPIOP_TXFIFO (0xC0)
diff --git a/drivers/net/macsonic.c b/drivers/net/macsonic.c
index acd143da161..61eabcac734 100644
--- a/drivers/net/macsonic.c
+++ b/drivers/net/macsonic.c
@@ -179,7 +179,7 @@ static const struct net_device_ops macsonic_netdev_ops = {
179 .ndo_set_mac_address = eth_mac_addr, 179 .ndo_set_mac_address = eth_mac_addr,
180}; 180};
181 181
182static int __init macsonic_init(struct net_device *dev) 182static int __devinit macsonic_init(struct net_device *dev)
183{ 183{
184 struct sonic_local* lp = netdev_priv(dev); 184 struct sonic_local* lp = netdev_priv(dev);
185 185
@@ -223,7 +223,7 @@ static int __init macsonic_init(struct net_device *dev)
223 return 0; 223 return 0;
224} 224}
225 225
226static int __init mac_onboard_sonic_ethernet_addr(struct net_device *dev) 226static int __devinit mac_onboard_sonic_ethernet_addr(struct net_device *dev)
227{ 227{
228 struct sonic_local *lp = netdev_priv(dev); 228 struct sonic_local *lp = netdev_priv(dev);
229 const int prom_addr = ONBOARD_SONIC_PROM_BASE; 229 const int prom_addr = ONBOARD_SONIC_PROM_BASE;
@@ -288,7 +288,7 @@ static int __init mac_onboard_sonic_ethernet_addr(struct net_device *dev)
288 } else return 0; 288 } else return 0;
289} 289}
290 290
291static int __init mac_onboard_sonic_probe(struct net_device *dev) 291static int __devinit mac_onboard_sonic_probe(struct net_device *dev)
292{ 292{
293 /* Bwahahaha */ 293 /* Bwahahaha */
294 static int once_is_more_than_enough; 294 static int once_is_more_than_enough;
@@ -409,7 +409,7 @@ static int __init mac_onboard_sonic_probe(struct net_device *dev)
409 return macsonic_init(dev); 409 return macsonic_init(dev);
410} 410}
411 411
412static int __init mac_nubus_sonic_ethernet_addr(struct net_device *dev, 412static int __devinit mac_nubus_sonic_ethernet_addr(struct net_device *dev,
413 unsigned long prom_addr, 413 unsigned long prom_addr,
414 int id) 414 int id)
415{ 415{
@@ -424,7 +424,7 @@ static int __init mac_nubus_sonic_ethernet_addr(struct net_device *dev,
424 return 0; 424 return 0;
425} 425}
426 426
427static int __init macsonic_ident(struct nubus_dev *ndev) 427static int __devinit macsonic_ident(struct nubus_dev *ndev)
428{ 428{
429 if (ndev->dr_hw == NUBUS_DRHW_ASANTE_LC && 429 if (ndev->dr_hw == NUBUS_DRHW_ASANTE_LC &&
430 ndev->dr_sw == NUBUS_DRSW_SONIC_LC) 430 ndev->dr_sw == NUBUS_DRSW_SONIC_LC)
@@ -449,7 +449,7 @@ static int __init macsonic_ident(struct nubus_dev *ndev)
449 return -1; 449 return -1;
450} 450}
451 451
452static int __init mac_nubus_sonic_probe(struct net_device *dev) 452static int __devinit mac_nubus_sonic_probe(struct net_device *dev)
453{ 453{
454 static int slots; 454 static int slots;
455 struct nubus_dev* ndev = NULL; 455 struct nubus_dev* ndev = NULL;
@@ -562,7 +562,7 @@ static int __init mac_nubus_sonic_probe(struct net_device *dev)
562 return macsonic_init(dev); 562 return macsonic_init(dev);
563} 563}
564 564
565static int __init mac_sonic_probe(struct platform_device *pdev) 565static int __devinit mac_sonic_probe(struct platform_device *pdev)
566{ 566{
567 struct net_device *dev; 567 struct net_device *dev;
568 struct sonic_local *lp; 568 struct sonic_local *lp;
@@ -575,6 +575,7 @@ static int __init mac_sonic_probe(struct platform_device *pdev)
575 lp = netdev_priv(dev); 575 lp = netdev_priv(dev);
576 lp->device = &pdev->dev; 576 lp->device = &pdev->dev;
577 SET_NETDEV_DEV(dev, &pdev->dev); 577 SET_NETDEV_DEV(dev, &pdev->dev);
578 platform_set_drvdata(pdev, dev);
578 579
579 /* This will catch fatal stuff like -ENOMEM as well as success */ 580 /* This will catch fatal stuff like -ENOMEM as well as success */
580 err = mac_onboard_sonic_probe(dev); 581 err = mac_onboard_sonic_probe(dev);
diff --git a/drivers/net/mlx4/en_ethtool.c b/drivers/net/mlx4/en_ethtool.c
index 091f99052c9..86467b444ac 100644
--- a/drivers/net/mlx4/en_ethtool.c
+++ b/drivers/net/mlx4/en_ethtool.c
@@ -220,7 +220,7 @@ static int mlx4_en_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
220{ 220{
221 cmd->autoneg = AUTONEG_DISABLE; 221 cmd->autoneg = AUTONEG_DISABLE;
222 cmd->supported = SUPPORTED_10000baseT_Full; 222 cmd->supported = SUPPORTED_10000baseT_Full;
223 cmd->advertising = SUPPORTED_10000baseT_Full; 223 cmd->advertising = ADVERTISED_1000baseT_Full;
224 if (netif_carrier_ok(dev)) { 224 if (netif_carrier_ok(dev)) {
225 cmd->speed = SPEED_10000; 225 cmd->speed = SPEED_10000;
226 cmd->duplex = DUPLEX_FULL; 226 cmd->duplex = DUPLEX_FULL;
diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c
index 08c43f2ae72..5a88b3f5769 100644
--- a/drivers/net/mlx4/en_tx.c
+++ b/drivers/net/mlx4/en_tx.c
@@ -249,6 +249,7 @@ static u32 mlx4_en_free_tx_desc(struct mlx4_en_priv *priv,
249 pci_unmap_page(mdev->pdev, 249 pci_unmap_page(mdev->pdev,
250 (dma_addr_t) be64_to_cpu(data->addr), 250 (dma_addr_t) be64_to_cpu(data->addr),
251 frag->size, PCI_DMA_TODEVICE); 251 frag->size, PCI_DMA_TODEVICE);
252 ++data;
252 } 253 }
253 } 254 }
254 /* Stamp the freed descriptor */ 255 /* Stamp the freed descriptor */
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index e1cdba752e0..f86e05047d1 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -210,6 +210,7 @@
210#define NETXEN_CTX_SIGNATURE 0xdee0 210#define NETXEN_CTX_SIGNATURE 0xdee0
211#define NETXEN_CTX_SIGNATURE_V2 0x0002dee0 211#define NETXEN_CTX_SIGNATURE_V2 0x0002dee0
212#define NETXEN_CTX_RESET 0xbad0 212#define NETXEN_CTX_RESET 0xbad0
213#define NETXEN_CTX_D3_RESET 0xacc0
213#define NETXEN_RCV_PRODUCER(ringid) (ringid) 214#define NETXEN_RCV_PRODUCER(ringid) (ringid)
214 215
215#define PHAN_PEG_RCV_INITIALIZED 0xff01 216#define PHAN_PEG_RCV_INITIALIZED 0xff01
@@ -773,6 +774,8 @@ struct nx_host_tx_ring {
773 u32 crb_cmd_consumer; 774 u32 crb_cmd_consumer;
774 u32 num_desc; 775 u32 num_desc;
775 776
777 struct netdev_queue *txq;
778
776 struct netxen_cmd_buffer *cmd_buf_arr; 779 struct netxen_cmd_buffer *cmd_buf_arr;
777 struct cmd_desc_type0 *desc_head; 780 struct cmd_desc_type0 *desc_head;
778 dma_addr_t phys_addr; 781 dma_addr_t phys_addr;
diff --git a/drivers/net/netxen/netxen_nic_ctx.c b/drivers/net/netxen/netxen_nic_ctx.c
index 4754f5cffad..9f8ae4719e2 100644
--- a/drivers/net/netxen/netxen_nic_ctx.c
+++ b/drivers/net/netxen/netxen_nic_ctx.c
@@ -684,10 +684,8 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
684 goto err_out_free; 684 goto err_out_free;
685 } else { 685 } else {
686 err = netxen_init_old_ctx(adapter); 686 err = netxen_init_old_ctx(adapter);
687 if (err) { 687 if (err)
688 netxen_free_hw_resources(adapter); 688 goto err_out_free;
689 return err;
690 }
691 } 689 }
692 690
693 return 0; 691 return 0;
@@ -708,15 +706,18 @@ void netxen_free_hw_resources(struct netxen_adapter *adapter)
708 int port = adapter->portnum; 706 int port = adapter->portnum;
709 707
710 if (adapter->fw_major >= 4) { 708 if (adapter->fw_major >= 4) {
711 nx_fw_cmd_destroy_tx_ctx(adapter);
712 nx_fw_cmd_destroy_rx_ctx(adapter); 709 nx_fw_cmd_destroy_rx_ctx(adapter);
710 nx_fw_cmd_destroy_tx_ctx(adapter);
713 } else { 711 } else {
714 netxen_api_lock(adapter); 712 netxen_api_lock(adapter);
715 NXWR32(adapter, CRB_CTX_SIGNATURE_REG(port), 713 NXWR32(adapter, CRB_CTX_SIGNATURE_REG(port),
716 NETXEN_CTX_RESET | port); 714 NETXEN_CTX_D3_RESET | port);
717 netxen_api_unlock(adapter); 715 netxen_api_unlock(adapter);
718 } 716 }
719 717
718 /* Allow dma queues to drain after context reset */
719 msleep(20);
720
720 recv_ctx = &adapter->recv_ctx; 721 recv_ctx = &adapter->recv_ctx;
721 722
722 if (recv_ctx->hwctx != NULL) { 723 if (recv_ctx->hwctx != NULL) {
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index ce3b89d2cbb..b9123d445c9 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -461,13 +461,14 @@ netxen_send_cmd_descs(struct netxen_adapter *adapter,
461 i = 0; 461 i = 0;
462 462
463 tx_ring = adapter->tx_ring; 463 tx_ring = adapter->tx_ring;
464 netif_tx_lock_bh(adapter->netdev); 464 __netif_tx_lock_bh(tx_ring->txq);
465 465
466 producer = tx_ring->producer; 466 producer = tx_ring->producer;
467 consumer = tx_ring->sw_consumer; 467 consumer = tx_ring->sw_consumer;
468 468
469 if (nr_desc >= find_diff_among(producer, consumer, tx_ring->num_desc)) { 469 if (nr_desc >= netxen_tx_avail(tx_ring)) {
470 netif_tx_unlock_bh(adapter->netdev); 470 netif_tx_stop_queue(tx_ring->txq);
471 __netif_tx_unlock_bh(tx_ring->txq);
471 return -EBUSY; 472 return -EBUSY;
472 } 473 }
473 474
@@ -490,7 +491,7 @@ netxen_send_cmd_descs(struct netxen_adapter *adapter,
490 491
491 netxen_nic_update_cmd_producer(adapter, tx_ring); 492 netxen_nic_update_cmd_producer(adapter, tx_ring);
492 493
493 netif_tx_unlock_bh(adapter->netdev); 494 __netif_tx_unlock_bh(tx_ring->txq);
494 495
495 return 0; 496 return 0;
496} 497}
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index b899bd51fcd..7acf204e38c 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -184,6 +184,13 @@ void netxen_free_sw_resources(struct netxen_adapter *adapter)
184 kfree(recv_ctx->rds_rings); 184 kfree(recv_ctx->rds_rings);
185 185
186skip_rds: 186skip_rds:
187 if (recv_ctx->sds_rings == NULL)
188 goto skip_sds;
189
190 for(ring = 0; ring < adapter->max_sds_rings; ring++)
191 recv_ctx->sds_rings[ring].consumer = 0;
192
193skip_sds:
187 if (adapter->tx_ring == NULL) 194 if (adapter->tx_ring == NULL)
188 return; 195 return;
189 196
@@ -214,6 +221,7 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter)
214 adapter->tx_ring = tx_ring; 221 adapter->tx_ring = tx_ring;
215 222
216 tx_ring->num_desc = adapter->num_txd; 223 tx_ring->num_desc = adapter->num_txd;
224 tx_ring->txq = netdev_get_tx_queue(netdev, 0);
217 225
218 cmd_buf_arr = vmalloc(TX_BUFF_RINGSIZE(tx_ring)); 226 cmd_buf_arr = vmalloc(TX_BUFF_RINGSIZE(tx_ring));
219 if (cmd_buf_arr == NULL) { 227 if (cmd_buf_arr == NULL) {
@@ -1400,10 +1408,10 @@ int netxen_process_cmd_ring(struct netxen_adapter *adapter)
1400 smp_mb(); 1408 smp_mb();
1401 1409
1402 if (netif_queue_stopped(netdev) && netif_carrier_ok(netdev)) { 1410 if (netif_queue_stopped(netdev) && netif_carrier_ok(netdev)) {
1403 netif_tx_lock(netdev); 1411 __netif_tx_lock(tx_ring->txq, smp_processor_id());
1404 if (netxen_tx_avail(tx_ring) > TX_STOP_THRESH) 1412 if (netxen_tx_avail(tx_ring) > TX_STOP_THRESH)
1405 netif_wake_queue(netdev); 1413 netif_wake_queue(netdev);
1406 netif_tx_unlock(netdev); 1414 __netif_tx_unlock(tx_ring->txq);
1407 } 1415 }
1408 } 1416 }
1409 /* 1417 /*
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 27539ddf94c..3cd8cfcf627 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -215,13 +215,13 @@ netxen_napi_disable(struct netxen_adapter *adapter)
215 215
216 for (ring = 0; ring < adapter->max_sds_rings; ring++) { 216 for (ring = 0; ring < adapter->max_sds_rings; ring++) {
217 sds_ring = &recv_ctx->sds_rings[ring]; 217 sds_ring = &recv_ctx->sds_rings[ring];
218 napi_disable(&sds_ring->napi);
219 netxen_nic_disable_int(sds_ring); 218 netxen_nic_disable_int(sds_ring);
220 synchronize_irq(sds_ring->irq); 219 napi_synchronize(&sds_ring->napi);
220 napi_disable(&sds_ring->napi);
221 } 221 }
222} 222}
223 223
224static int nx_set_dma_mask(struct netxen_adapter *adapter, uint8_t revision_id) 224static int nx_set_dma_mask(struct netxen_adapter *adapter)
225{ 225{
226 struct pci_dev *pdev = adapter->pdev; 226 struct pci_dev *pdev = adapter->pdev;
227 uint64_t mask, cmask; 227 uint64_t mask, cmask;
@@ -229,19 +229,17 @@ static int nx_set_dma_mask(struct netxen_adapter *adapter, uint8_t revision_id)
229 adapter->pci_using_dac = 0; 229 adapter->pci_using_dac = 0;
230 230
231 mask = DMA_BIT_MASK(32); 231 mask = DMA_BIT_MASK(32);
232 /*
233 * Consistent DMA mask is set to 32 bit because it cannot be set to
234 * 35 bits. For P3 also leave it at 32 bits for now. Only the rings
235 * come off this pool.
236 */
237 cmask = DMA_BIT_MASK(32); 232 cmask = DMA_BIT_MASK(32);
238 233
234 if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) {
239#ifndef CONFIG_IA64 235#ifndef CONFIG_IA64
240 if (revision_id >= NX_P3_B0)
241 mask = DMA_BIT_MASK(39);
242 else if (revision_id == NX_P2_C1)
243 mask = DMA_BIT_MASK(35); 236 mask = DMA_BIT_MASK(35);
244#endif 237#endif
238 } else {
239 mask = DMA_BIT_MASK(39);
240 cmask = mask;
241 }
242
245 if (pci_set_dma_mask(pdev, mask) == 0 && 243 if (pci_set_dma_mask(pdev, mask) == 0 &&
246 pci_set_consistent_dma_mask(pdev, cmask) == 0) { 244 pci_set_consistent_dma_mask(pdev, cmask) == 0) {
247 adapter->pci_using_dac = 1; 245 adapter->pci_using_dac = 1;
@@ -256,7 +254,7 @@ static int
256nx_update_dma_mask(struct netxen_adapter *adapter) 254nx_update_dma_mask(struct netxen_adapter *adapter)
257{ 255{
258 int change, shift, err; 256 int change, shift, err;
259 uint64_t mask, old_mask; 257 uint64_t mask, old_mask, old_cmask;
260 struct pci_dev *pdev = adapter->pdev; 258 struct pci_dev *pdev = adapter->pdev;
261 259
262 change = 0; 260 change = 0;
@@ -272,14 +270,29 @@ nx_update_dma_mask(struct netxen_adapter *adapter)
272 270
273 if (change) { 271 if (change) {
274 old_mask = pdev->dma_mask; 272 old_mask = pdev->dma_mask;
273 old_cmask = pdev->dev.coherent_dma_mask;
274
275 mask = (1ULL<<(32+shift)) - 1; 275 mask = (1ULL<<(32+shift)) - 1;
276 276
277 err = pci_set_dma_mask(pdev, mask); 277 err = pci_set_dma_mask(pdev, mask);
278 if (err) 278 if (err)
279 return pci_set_dma_mask(pdev, old_mask); 279 goto err_out;
280
281 if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) {
282
283 err = pci_set_consistent_dma_mask(pdev, mask);
284 if (err)
285 goto err_out;
286 }
287 dev_info(&pdev->dev, "using %d-bit dma mask\n", 32+shift);
280 } 288 }
281 289
282 return 0; 290 return 0;
291
292err_out:
293 pci_set_dma_mask(pdev, old_mask);
294 pci_set_consistent_dma_mask(pdev, old_cmask);
295 return err;
283} 296}
284 297
285static void netxen_check_options(struct netxen_adapter *adapter) 298static void netxen_check_options(struct netxen_adapter *adapter)
@@ -833,11 +846,11 @@ netxen_nic_up(struct netxen_adapter *adapter, struct net_device *netdev)
833 846
834 adapter->ahw.linkup = 0; 847 adapter->ahw.linkup = 0;
835 848
836 netxen_napi_enable(adapter);
837
838 if (adapter->max_sds_rings > 1) 849 if (adapter->max_sds_rings > 1)
839 netxen_config_rss(adapter, 1); 850 netxen_config_rss(adapter, 1);
840 851
852 netxen_napi_enable(adapter);
853
841 if (adapter->capabilities & NX_FW_CAPABILITY_LINK_NOTIFICATION) 854 if (adapter->capabilities & NX_FW_CAPABILITY_LINK_NOTIFICATION)
842 netxen_linkevent_request(adapter, 1); 855 netxen_linkevent_request(adapter, 1);
843 else 856 else
@@ -851,8 +864,9 @@ netxen_nic_up(struct netxen_adapter *adapter, struct net_device *netdev)
851static void 864static void
852netxen_nic_down(struct netxen_adapter *adapter, struct net_device *netdev) 865netxen_nic_down(struct netxen_adapter *adapter, struct net_device *netdev)
853{ 866{
867 spin_lock(&adapter->tx_clean_lock);
854 netif_carrier_off(netdev); 868 netif_carrier_off(netdev);
855 netif_stop_queue(netdev); 869 netif_tx_disable(netdev);
856 870
857 if (adapter->stop_port) 871 if (adapter->stop_port)
858 adapter->stop_port(adapter); 872 adapter->stop_port(adapter);
@@ -863,9 +877,10 @@ netxen_nic_down(struct netxen_adapter *adapter, struct net_device *netdev)
863 netxen_napi_disable(adapter); 877 netxen_napi_disable(adapter);
864 878
865 netxen_release_tx_buffers(adapter); 879 netxen_release_tx_buffers(adapter);
880 spin_unlock(&adapter->tx_clean_lock);
866 881
867 FLUSH_SCHEDULED_WORK();
868 del_timer_sync(&adapter->watchdog_timer); 882 del_timer_sync(&adapter->watchdog_timer);
883 FLUSH_SCHEDULED_WORK();
869} 884}
870 885
871 886
@@ -943,8 +958,8 @@ err_out_free_sw:
943static void 958static void
944netxen_nic_detach(struct netxen_adapter *adapter) 959netxen_nic_detach(struct netxen_adapter *adapter)
945{ 960{
946 netxen_release_rx_buffers(adapter);
947 netxen_free_hw_resources(adapter); 961 netxen_free_hw_resources(adapter);
962 netxen_release_rx_buffers(adapter);
948 netxen_nic_free_irq(adapter); 963 netxen_nic_free_irq(adapter);
949 netxen_free_sw_resources(adapter); 964 netxen_free_sw_resources(adapter);
950 965
@@ -1004,7 +1019,7 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1004 revision_id = pdev->revision; 1019 revision_id = pdev->revision;
1005 adapter->ahw.revision_id = revision_id; 1020 adapter->ahw.revision_id = revision_id;
1006 1021
1007 err = nx_set_dma_mask(adapter, revision_id); 1022 err = nx_set_dma_mask(adapter);
1008 if (err) 1023 if (err)
1009 goto err_out_free_netdev; 1024 goto err_out_free_netdev;
1010 1025
@@ -1533,10 +1548,12 @@ static int netxen_nic_check_temp(struct netxen_adapter *adapter)
1533 printk(KERN_ALERT 1548 printk(KERN_ALERT
1534 "%s: Device temperature %d degrees C exceeds" 1549 "%s: Device temperature %d degrees C exceeds"
1535 " maximum allowed. Hardware has been shut down.\n", 1550 " maximum allowed. Hardware has been shut down.\n",
1536 netxen_nic_driver_name, temp_val); 1551 netdev->name, temp_val);
1552
1553 netif_device_detach(netdev);
1554 netxen_nic_down(adapter, netdev);
1555 netxen_nic_detach(adapter);
1537 1556
1538 netif_carrier_off(netdev);
1539 netif_stop_queue(netdev);
1540 rv = 1; 1557 rv = 1;
1541 } else if (temp_state == NX_TEMP_WARN) { 1558 } else if (temp_state == NX_TEMP_WARN) {
1542 if (adapter->temp == NX_TEMP_NORMAL) { 1559 if (adapter->temp == NX_TEMP_NORMAL) {
@@ -1544,13 +1561,13 @@ static int netxen_nic_check_temp(struct netxen_adapter *adapter)
1544 "%s: Device temperature %d degrees C " 1561 "%s: Device temperature %d degrees C "
1545 "exceeds operating range." 1562 "exceeds operating range."
1546 " Immediate action needed.\n", 1563 " Immediate action needed.\n",
1547 netxen_nic_driver_name, temp_val); 1564 netdev->name, temp_val);
1548 } 1565 }
1549 } else { 1566 } else {
1550 if (adapter->temp == NX_TEMP_WARN) { 1567 if (adapter->temp == NX_TEMP_WARN) {
1551 printk(KERN_INFO 1568 printk(KERN_INFO
1552 "%s: Device temperature is now %d degrees C" 1569 "%s: Device temperature is now %d degrees C"
1553 " in normal range.\n", netxen_nic_driver_name, 1570 " in normal range.\n", netdev->name,
1554 temp_val); 1571 temp_val);
1555 } 1572 }
1556 } 1573 }
@@ -1623,7 +1640,7 @@ void netxen_watchdog_task(struct work_struct *work)
1623 struct netxen_adapter *adapter = 1640 struct netxen_adapter *adapter =
1624 container_of(work, struct netxen_adapter, watchdog_task); 1641 container_of(work, struct netxen_adapter, watchdog_task);
1625 1642
1626 if ((adapter->portnum == 0) && netxen_nic_check_temp(adapter)) 1643 if (netxen_nic_check_temp(adapter))
1627 return; 1644 return;
1628 1645
1629 if (!adapter->has_link_events) 1646 if (!adapter->has_link_events)
@@ -1645,6 +1662,9 @@ static void netxen_tx_timeout_task(struct work_struct *work)
1645 struct netxen_adapter *adapter = 1662 struct netxen_adapter *adapter =
1646 container_of(work, struct netxen_adapter, tx_timeout_task); 1663 container_of(work, struct netxen_adapter, tx_timeout_task);
1647 1664
1665 if (!netif_running(adapter->netdev))
1666 return;
1667
1648 printk(KERN_ERR "%s %s: transmit timeout, resetting.\n", 1668 printk(KERN_ERR "%s %s: transmit timeout, resetting.\n",
1649 netxen_nic_driver_name, adapter->netdev->name); 1669 netxen_nic_driver_name, adapter->netdev->name);
1650 1670
@@ -1757,7 +1777,8 @@ static int netxen_nic_poll(struct napi_struct *napi, int budget)
1757 1777
1758 if ((work_done < budget) && tx_complete) { 1778 if ((work_done < budget) && tx_complete) {
1759 napi_complete(&sds_ring->napi); 1779 napi_complete(&sds_ring->napi);
1760 netxen_nic_enable_int(sds_ring); 1780 if (netif_running(adapter->netdev))
1781 netxen_nic_enable_int(sds_ring);
1761 } 1782 }
1762 1783
1763 return work_done; 1784 return work_done;
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c
index ec7cf5ac4f0..690b9c76d34 100644
--- a/drivers/net/pcmcia/3c589_cs.c
+++ b/drivers/net/pcmcia/3c589_cs.c
@@ -156,6 +156,7 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev);
156static int el3_rx(struct net_device *dev); 156static int el3_rx(struct net_device *dev);
157static int el3_close(struct net_device *dev); 157static int el3_close(struct net_device *dev);
158static void el3_tx_timeout(struct net_device *dev); 158static void el3_tx_timeout(struct net_device *dev);
159static void set_rx_mode(struct net_device *dev);
159static void set_multicast_list(struct net_device *dev); 160static void set_multicast_list(struct net_device *dev);
160static const struct ethtool_ops netdev_ethtool_ops; 161static const struct ethtool_ops netdev_ethtool_ops;
161 162
@@ -488,8 +489,7 @@ static void tc589_reset(struct net_device *dev)
488 /* Switch to register set 1 for normal use. */ 489 /* Switch to register set 1 for normal use. */
489 EL3WINDOW(1); 490 EL3WINDOW(1);
490 491
491 /* Accept b-cast and phys addr only. */ 492 set_rx_mode(dev);
492 outw(SetRxFilter | RxStation | RxBroadcast, ioaddr + EL3_CMD);
493 outw(StatsEnable, ioaddr + EL3_CMD); /* Turn on statistics. */ 493 outw(StatsEnable, ioaddr + EL3_CMD); /* Turn on statistics. */
494 outw(RxEnable, ioaddr + EL3_CMD); /* Enable the receiver. */ 494 outw(RxEnable, ioaddr + EL3_CMD); /* Enable the receiver. */
495 outw(TxEnable, ioaddr + EL3_CMD); /* Enable transmitter. */ 495 outw(TxEnable, ioaddr + EL3_CMD); /* Enable transmitter. */
@@ -700,7 +700,7 @@ static irqreturn_t el3_interrupt(int irq, void *dev_id)
700 if (fifo_diag & 0x2000) { 700 if (fifo_diag & 0x2000) {
701 /* Rx underrun */ 701 /* Rx underrun */
702 tc589_wait_for_completion(dev, RxReset); 702 tc589_wait_for_completion(dev, RxReset);
703 set_multicast_list(dev); 703 set_rx_mode(dev);
704 outw(RxEnable, ioaddr + EL3_CMD); 704 outw(RxEnable, ioaddr + EL3_CMD);
705 } 705 }
706 outw(AckIntr | AdapterFailure, ioaddr + EL3_CMD); 706 outw(AckIntr | AdapterFailure, ioaddr + EL3_CMD);
@@ -905,14 +905,11 @@ static int el3_rx(struct net_device *dev)
905 return 0; 905 return 0;
906} 906}
907 907
908static void set_multicast_list(struct net_device *dev) 908static void set_rx_mode(struct net_device *dev)
909{ 909{
910 struct el3_private *lp = netdev_priv(dev);
911 struct pcmcia_device *link = lp->p_dev;
912 unsigned int ioaddr = dev->base_addr; 910 unsigned int ioaddr = dev->base_addr;
913 u16 opts = SetRxFilter | RxStation | RxBroadcast; 911 u16 opts = SetRxFilter | RxStation | RxBroadcast;
914 912
915 if (!pcmcia_dev_present(link)) return;
916 if (dev->flags & IFF_PROMISC) 913 if (dev->flags & IFF_PROMISC)
917 opts |= RxMulticast | RxProm; 914 opts |= RxMulticast | RxProm;
918 else if (dev->mc_count || (dev->flags & IFF_ALLMULTI)) 915 else if (dev->mc_count || (dev->flags & IFF_ALLMULTI))
@@ -920,6 +917,16 @@ static void set_multicast_list(struct net_device *dev)
920 outw(opts, ioaddr + EL3_CMD); 917 outw(opts, ioaddr + EL3_CMD);
921} 918}
922 919
920static void set_multicast_list(struct net_device *dev)
921{
922 struct el3_private *priv = netdev_priv(dev);
923 unsigned long flags;
924
925 spin_lock_irqsave(&priv->lock, flags);
926 set_rx_mode(dev);
927 spin_unlock_irqrestore(&priv->lock, flags);
928}
929
923static int el3_close(struct net_device *dev) 930static int el3_close(struct net_device *dev)
924{ 931{
925 struct el3_private *lp = netdev_priv(dev); 932 struct el3_private *lp = netdev_priv(dev);
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index 28368157dac..a646a445fda 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -1611,8 +1611,11 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
1611 if (pcnet32_dwio_read_csr(ioaddr, 0) == 4 1611 if (pcnet32_dwio_read_csr(ioaddr, 0) == 4
1612 && pcnet32_dwio_check(ioaddr)) { 1612 && pcnet32_dwio_check(ioaddr)) {
1613 a = &pcnet32_dwio; 1613 a = &pcnet32_dwio;
1614 } else 1614 } else {
1615 if (pcnet32_debug & NETIF_MSG_PROBE)
1616 printk(KERN_ERR PFX "No access methods\n");
1615 goto err_release_region; 1617 goto err_release_region;
1618 }
1616 } 1619 }
1617 1620
1618 chip_version = 1621 chip_version =
@@ -1719,7 +1722,9 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
1719 ret = -ENOMEM; 1722 ret = -ENOMEM;
1720 goto err_release_region; 1723 goto err_release_region;
1721 } 1724 }
1722 SET_NETDEV_DEV(dev, &pdev->dev); 1725
1726 if (pdev)
1727 SET_NETDEV_DEV(dev, &pdev->dev);
1723 1728
1724 if (pcnet32_debug & NETIF_MSG_PROBE) 1729 if (pcnet32_debug & NETIF_MSG_PROBE)
1725 printk(KERN_INFO PFX "%s at %#3lx,", chipname, ioaddr); 1730 printk(KERN_INFO PFX "%s at %#3lx,", chipname, ioaddr);
@@ -1818,7 +1823,6 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
1818 1823
1819 spin_lock_init(&lp->lock); 1824 spin_lock_init(&lp->lock);
1820 1825
1821 SET_NETDEV_DEV(dev, &pdev->dev);
1822 lp->name = chipname; 1826 lp->name = chipname;
1823 lp->shared_irq = shared; 1827 lp->shared_irq = shared;
1824 lp->tx_ring_size = TX_RING_SIZE; /* default tx ring size */ 1828 lp->tx_ring_size = TX_RING_SIZE; /* default tx ring size */
@@ -1852,12 +1856,6 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
1852 ((cards_found >= MAX_UNITS) || full_duplex[cards_found])) 1856 ((cards_found >= MAX_UNITS) || full_duplex[cards_found]))
1853 lp->options |= PCNET32_PORT_FD; 1857 lp->options |= PCNET32_PORT_FD;
1854 1858
1855 if (!a) {
1856 if (pcnet32_debug & NETIF_MSG_PROBE)
1857 printk(KERN_ERR PFX "No access methods\n");
1858 ret = -ENODEV;
1859 goto err_free_consistent;
1860 }
1861 lp->a = *a; 1859 lp->a = *a;
1862 1860
1863 /* prior to register_netdev, dev->name is not yet correct */ 1861 /* prior to register_netdev, dev->name is not yet correct */
@@ -1973,14 +1971,13 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
1973 1971
1974 return 0; 1972 return 0;
1975 1973
1976 err_free_ring: 1974err_free_ring:
1977 pcnet32_free_ring(dev); 1975 pcnet32_free_ring(dev);
1978 err_free_consistent:
1979 pci_free_consistent(lp->pci_dev, sizeof(*lp->init_block), 1976 pci_free_consistent(lp->pci_dev, sizeof(*lp->init_block),
1980 lp->init_block, lp->init_dma_addr); 1977 lp->init_block, lp->init_dma_addr);
1981 err_free_netdev: 1978err_free_netdev:
1982 free_netdev(dev); 1979 free_netdev(dev);
1983 err_release_region: 1980err_release_region:
1984 release_region(ioaddr, PCNET32_TOTAL_SIZE); 1981 release_region(ioaddr, PCNET32_TOTAL_SIZE);
1985 return ret; 1982 return ret;
1986} 1983}
@@ -2089,6 +2086,7 @@ static void pcnet32_free_ring(struct net_device *dev)
2089static int pcnet32_open(struct net_device *dev) 2086static int pcnet32_open(struct net_device *dev)
2090{ 2087{
2091 struct pcnet32_private *lp = netdev_priv(dev); 2088 struct pcnet32_private *lp = netdev_priv(dev);
2089 struct pci_dev *pdev = lp->pci_dev;
2092 unsigned long ioaddr = dev->base_addr; 2090 unsigned long ioaddr = dev->base_addr;
2093 u16 val; 2091 u16 val;
2094 int i; 2092 int i;
@@ -2149,9 +2147,9 @@ static int pcnet32_open(struct net_device *dev)
2149 lp->a.write_csr(ioaddr, 124, val); 2147 lp->a.write_csr(ioaddr, 124, val);
2150 2148
2151 /* Allied Telesyn AT 2700/2701 FX are 100Mbit only and do not negotiate */ 2149 /* Allied Telesyn AT 2700/2701 FX are 100Mbit only and do not negotiate */
2152 if (lp->pci_dev->subsystem_vendor == PCI_VENDOR_ID_AT && 2150 if (pdev && pdev->subsystem_vendor == PCI_VENDOR_ID_AT &&
2153 (lp->pci_dev->subsystem_device == PCI_SUBDEVICE_ID_AT_2700FX || 2151 (pdev->subsystem_device == PCI_SUBDEVICE_ID_AT_2700FX ||
2154 lp->pci_dev->subsystem_device == PCI_SUBDEVICE_ID_AT_2701FX)) { 2152 pdev->subsystem_device == PCI_SUBDEVICE_ID_AT_2701FX)) {
2155 if (lp->options & PCNET32_PORT_ASEL) { 2153 if (lp->options & PCNET32_PORT_ASEL) {
2156 lp->options = PCNET32_PORT_FD | PCNET32_PORT_100; 2154 lp->options = PCNET32_PORT_FD | PCNET32_PORT_100;
2157 if (netif_msg_link(lp)) 2155 if (netif_msg_link(lp))
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
index 33984b73723..22cdd451fb8 100644
--- a/drivers/net/phy/mdio-gpio.c
+++ b/drivers/net/phy/mdio-gpio.c
@@ -30,6 +30,7 @@
30 30
31#ifdef CONFIG_OF_GPIO 31#ifdef CONFIG_OF_GPIO
32#include <linux/of_gpio.h> 32#include <linux/of_gpio.h>
33#include <linux/of_mdio.h>
33#include <linux/of_platform.h> 34#include <linux/of_platform.h>
34#endif 35#endif
35 36
@@ -81,13 +82,12 @@ static struct mdiobb_ops mdio_gpio_ops = {
81 .get_mdio_data = mdio_get, 82 .get_mdio_data = mdio_get,
82}; 83};
83 84
84static int __devinit mdio_gpio_bus_init(struct device *dev, 85static struct mii_bus * __devinit mdio_gpio_bus_init(struct device *dev,
85 struct mdio_gpio_platform_data *pdata, 86 struct mdio_gpio_platform_data *pdata,
86 int bus_id) 87 int bus_id)
87{ 88{
88 struct mii_bus *new_bus; 89 struct mii_bus *new_bus;
89 struct mdio_gpio_info *bitbang; 90 struct mdio_gpio_info *bitbang;
90 int ret = -ENOMEM;
91 int i; 91 int i;
92 92
93 bitbang = kzalloc(sizeof(*bitbang), GFP_KERNEL); 93 bitbang = kzalloc(sizeof(*bitbang), GFP_KERNEL);
@@ -104,8 +104,6 @@ static int __devinit mdio_gpio_bus_init(struct device *dev,
104 104
105 new_bus->name = "GPIO Bitbanged MDIO", 105 new_bus->name = "GPIO Bitbanged MDIO",
106 106
107 ret = -ENODEV;
108
109 new_bus->phy_mask = pdata->phy_mask; 107 new_bus->phy_mask = pdata->phy_mask;
110 new_bus->irq = pdata->irqs; 108 new_bus->irq = pdata->irqs;
111 new_bus->parent = dev; 109 new_bus->parent = dev;
@@ -129,15 +127,8 @@ static int __devinit mdio_gpio_bus_init(struct device *dev,
129 127
130 dev_set_drvdata(dev, new_bus); 128 dev_set_drvdata(dev, new_bus);
131 129
132 ret = mdiobus_register(new_bus); 130 return new_bus;
133 if (ret)
134 goto out_free_all;
135
136 return 0;
137 131
138out_free_all:
139 dev_set_drvdata(dev, NULL);
140 gpio_free(bitbang->mdio);
141out_free_mdc: 132out_free_mdc:
142 gpio_free(bitbang->mdc); 133 gpio_free(bitbang->mdc);
143out_free_bus: 134out_free_bus:
@@ -145,30 +136,47 @@ out_free_bus:
145out_free_bitbang: 136out_free_bitbang:
146 kfree(bitbang); 137 kfree(bitbang);
147out: 138out:
148 return ret; 139 return NULL;
149} 140}
150 141
151static void __devexit mdio_gpio_bus_destroy(struct device *dev) 142static void __devinit mdio_gpio_bus_deinit(struct device *dev)
152{ 143{
153 struct mii_bus *bus = dev_get_drvdata(dev); 144 struct mii_bus *bus = dev_get_drvdata(dev);
154 struct mdio_gpio_info *bitbang = bus->priv; 145 struct mdio_gpio_info *bitbang = bus->priv;
155 146
156 mdiobus_unregister(bus);
157 free_mdio_bitbang(bus);
158 dev_set_drvdata(dev, NULL); 147 dev_set_drvdata(dev, NULL);
159 gpio_free(bitbang->mdc);
160 gpio_free(bitbang->mdio); 148 gpio_free(bitbang->mdio);
149 gpio_free(bitbang->mdc);
150 free_mdio_bitbang(bus);
161 kfree(bitbang); 151 kfree(bitbang);
162} 152}
163 153
154static void __devexit mdio_gpio_bus_destroy(struct device *dev)
155{
156 struct mii_bus *bus = dev_get_drvdata(dev);
157
158 mdiobus_unregister(bus);
159 mdio_gpio_bus_deinit(dev);
160}
161
164static int __devinit mdio_gpio_probe(struct platform_device *pdev) 162static int __devinit mdio_gpio_probe(struct platform_device *pdev)
165{ 163{
166 struct mdio_gpio_platform_data *pdata = pdev->dev.platform_data; 164 struct mdio_gpio_platform_data *pdata = pdev->dev.platform_data;
165 struct mii_bus *new_bus;
166 int ret;
167 167
168 if (!pdata) 168 if (!pdata)
169 return -ENODEV; 169 return -ENODEV;
170 170
171 return mdio_gpio_bus_init(&pdev->dev, pdata, pdev->id); 171 new_bus = mdio_gpio_bus_init(&pdev->dev, pdata, pdev->id);
172 if (!new_bus)
173 return -ENODEV;
174
175 ret = mdiobus_register(new_bus);
176 if (ret)
177 mdio_gpio_bus_deinit(&pdev->dev);
178
179 return ret;
172} 180}
173 181
174static int __devexit mdio_gpio_remove(struct platform_device *pdev) 182static int __devexit mdio_gpio_remove(struct platform_device *pdev)
@@ -179,29 +187,12 @@ static int __devexit mdio_gpio_remove(struct platform_device *pdev)
179} 187}
180 188
181#ifdef CONFIG_OF_GPIO 189#ifdef CONFIG_OF_GPIO
182static void __devinit add_phy(struct mdio_gpio_platform_data *pdata,
183 struct device_node *np)
184{
185 const u32 *data;
186 int len, id, irq;
187
188 data = of_get_property(np, "reg", &len);
189 if (!data || len != 4)
190 return;
191
192 id = *data;
193 pdata->phy_mask &= ~(1 << id);
194
195 irq = of_irq_to_resource(np, 0, NULL);
196 if (irq)
197 pdata->irqs[id] = irq;
198}
199 190
200static int __devinit mdio_ofgpio_probe(struct of_device *ofdev, 191static int __devinit mdio_ofgpio_probe(struct of_device *ofdev,
201 const struct of_device_id *match) 192 const struct of_device_id *match)
202{ 193{
203 struct device_node *np = NULL;
204 struct mdio_gpio_platform_data *pdata; 194 struct mdio_gpio_platform_data *pdata;
195 struct mii_bus *new_bus;
205 int ret; 196 int ret;
206 197
207 pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); 198 pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
@@ -215,14 +206,18 @@ static int __devinit mdio_ofgpio_probe(struct of_device *ofdev,
215 206
216 ret = of_get_gpio(ofdev->node, 1); 207 ret = of_get_gpio(ofdev->node, 1);
217 if (ret < 0) 208 if (ret < 0)
218 goto out_free; 209 goto out_free;
219 pdata->mdio = ret; 210 pdata->mdio = ret;
220 211
221 while ((np = of_get_next_child(ofdev->node, np))) 212 new_bus = mdio_gpio_bus_init(&ofdev->dev, pdata, pdata->mdc);
222 if (!strcmp(np->type, "ethernet-phy")) 213 if (!new_bus)
223 add_phy(pdata, np); 214 return -ENODEV;
224 215
225 return mdio_gpio_bus_init(&ofdev->dev, pdata, pdata->mdc); 216 ret = of_mdiobus_register(new_bus, ofdev->node);
217 if (ret)
218 mdio_gpio_bus_deinit(&ofdev->dev);
219
220 return ret;
226 221
227out_free: 222out_free:
228 kfree(pdata); 223 kfree(pdata);
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index 639d11bc444..cd37d739ac7 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -1384,7 +1384,7 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
1384 1384
1385 /* create a fragment for each channel */ 1385 /* create a fragment for each channel */
1386 bits = B; 1386 bits = B;
1387 while (nfree > 0 && len > 0) { 1387 while (len > 0) {
1388 list = list->next; 1388 list = list->next;
1389 if (list == &ppp->channels) { 1389 if (list == &ppp->channels) {
1390 i = 0; 1390 i = 0;
@@ -1431,29 +1431,31 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
1431 *otherwise divide it according to the speed 1431 *otherwise divide it according to the speed
1432 *of the channel we are going to transmit on 1432 *of the channel we are going to transmit on
1433 */ 1433 */
1434 if (pch->speed == 0) { 1434 if (nfree > 0) {
1435 flen = totlen/nfree ; 1435 if (pch->speed == 0) {
1436 if (nbigger > 0) { 1436 flen = totlen/nfree ;
1437 flen++; 1437 if (nbigger > 0) {
1438 nbigger--; 1438 flen++;
1439 } 1439 nbigger--;
1440 } else { 1440 }
1441 flen = (((totfree - nzero)*(totlen + hdrlen*totfree)) / 1441 } else {
1442 ((totspeed*totfree)/pch->speed)) - hdrlen; 1442 flen = (((totfree - nzero)*(totlen + hdrlen*totfree)) /
1443 if (nbigger > 0) { 1443 ((totspeed*totfree)/pch->speed)) - hdrlen;
1444 flen += ((totfree - nzero)*pch->speed)/totspeed; 1444 if (nbigger > 0) {
1445 nbigger -= ((totfree - nzero)*pch->speed)/ 1445 flen += ((totfree - nzero)*pch->speed)/totspeed;
1446 nbigger -= ((totfree - nzero)*pch->speed)/
1446 totspeed; 1447 totspeed;
1448 }
1447 } 1449 }
1450 nfree--;
1448 } 1451 }
1449 nfree--;
1450 1452
1451 /* 1453 /*
1452 *check if we are on the last channel or 1454 *check if we are on the last channel or
1453 *we exceded the lenght of the data to 1455 *we exceded the lenght of the data to
1454 *fragment 1456 *fragment
1455 */ 1457 */
1456 if ((nfree == 0) || (flen > len)) 1458 if ((nfree <= 0) || (flen > len))
1457 flen = len; 1459 flen = len;
1458 /* 1460 /*
1459 *it is not worth to tx on slow channels: 1461 *it is not worth to tx on slow channels:
@@ -1467,7 +1469,7 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
1467 continue; 1469 continue;
1468 } 1470 }
1469 1471
1470 mtu = pch->chan->mtu + 2 - hdrlen; 1472 mtu = pch->chan->mtu - hdrlen;
1471 if (mtu < 4) 1473 if (mtu < 4)
1472 mtu = 4; 1474 mtu = 4;
1473 if (flen > mtu) 1475 if (flen > mtu)
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index f0031f1f97e..5f2090233d7 100644
--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -1063,6 +1063,7 @@ static void *pppoe_seq_next(struct seq_file *seq, void *v, loff_t *pos)
1063 else { 1063 else {
1064 int hash = hash_item(po->pppoe_pa.sid, po->pppoe_pa.remote); 1064 int hash = hash_item(po->pppoe_pa.sid, po->pppoe_pa.remote);
1065 1065
1066 po = NULL;
1066 while (++hash < PPPOE_HASH_SIZE) { 1067 while (++hash < PPPOE_HASH_SIZE) {
1067 po = pn->hash_table[hash]; 1068 po = pn->hash_table[hash];
1068 if (po) 1069 if (po)
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c
index e7935d09c89..e0f9219a0ae 100644
--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -2680,6 +2680,7 @@ out_unregister_pppol2tp_proto:
2680static void __exit pppol2tp_exit(void) 2680static void __exit pppol2tp_exit(void)
2681{ 2681{
2682 unregister_pppox_proto(PX_PROTO_OL2TP); 2682 unregister_pppox_proto(PX_PROTO_OL2TP);
2683 unregister_pernet_gen_device(pppol2tp_net_id, &pppol2tp_net_ops);
2683 proto_unregister(&pppol2tp_sk_proto); 2684 proto_unregister(&pppol2tp_sk_proto);
2684} 2685}
2685 2686
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 4b53b58d75f..b82780d805f 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2060,8 +2060,6 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2060 } 2060 }
2061 } 2061 }
2062 2062
2063 pci_set_master(pdev);
2064
2065 /* ioremap MMIO region */ 2063 /* ioremap MMIO region */
2066 ioaddr = ioremap(pci_resource_start(pdev, region), R8169_REGS_SIZE); 2064 ioaddr = ioremap(pci_resource_start(pdev, region), R8169_REGS_SIZE);
2067 if (!ioaddr) { 2065 if (!ioaddr) {
@@ -2089,6 +2087,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2089 2087
2090 RTL_W16(IntrStatus, 0xffff); 2088 RTL_W16(IntrStatus, 0xffff);
2091 2089
2090 pci_set_master(pdev);
2091
2092 /* Identify chip attached to board */ 2092 /* Identify chip attached to board */
2093 rtl8169_get_mac_version(tp, ioaddr); 2093 rtl8169_get_mac_version(tp, ioaddr);
2094 2094
@@ -3874,6 +3874,15 @@ static void rtl_shutdown(struct pci_dev *pdev)
3874 spin_unlock_irq(&tp->lock); 3874 spin_unlock_irq(&tp->lock);
3875 3875
3876 if (system_state == SYSTEM_POWER_OFF) { 3876 if (system_state == SYSTEM_POWER_OFF) {
3877 /* WoL fails with some 8168 when the receiver is disabled. */
3878 if (tp->features & RTL_FEATURE_WOL) {
3879 pci_clear_master(pdev);
3880
3881 RTL_W8(ChipCmd, CmdRxEnb);
3882 /* PCI commit */
3883 RTL_R8(ChipCmd);
3884 }
3885
3877 pci_wake_from_d3(pdev, true); 3886 pci_wake_from_d3(pdev, true);
3878 pci_set_power_state(pdev, PCI_D3hot); 3887 pci_set_power_state(pdev, PCI_D3hot);
3879 } 3888 }
diff --git a/drivers/net/s6gmac.c b/drivers/net/s6gmac.c
index 5345e47b35a..4525cbe8dd6 100644
--- a/drivers/net/s6gmac.c
+++ b/drivers/net/s6gmac.c
@@ -793,7 +793,7 @@ static inline int s6gmac_phy_start(struct net_device *dev)
793 struct s6gmac *pd = netdev_priv(dev); 793 struct s6gmac *pd = netdev_priv(dev);
794 int i = 0; 794 int i = 0;
795 struct phy_device *p = NULL; 795 struct phy_device *p = NULL;
796 while ((!(p = pd->mii.bus->phy_map[i])) && (i < PHY_MAX_ADDR)) 796 while ((i < PHY_MAX_ADDR) && (!(p = pd->mii.bus->phy_map[i])))
797 i++; 797 i++;
798 p = phy_connect(dev, dev_name(&p->dev), &s6gmac_adjust_link, 0, 798 p = phy_connect(dev, dev_name(&p->dev), &s6gmac_adjust_link, 0,
799 PHY_INTERFACE_MODE_RGMII); 799 PHY_INTERFACE_MODE_RGMII);
diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c
index 18821f217e1..e3156c97bb5 100644
--- a/drivers/net/sc92031.c
+++ b/drivers/net/sc92031.c
@@ -1593,6 +1593,7 @@ out:
1593static struct pci_device_id sc92031_pci_device_id_table[] __devinitdata = { 1593static struct pci_device_id sc92031_pci_device_id_table[] __devinitdata = {
1594 { PCI_DEVICE(PCI_VENDOR_ID_SILAN, 0x2031) }, 1594 { PCI_DEVICE(PCI_VENDOR_ID_SILAN, 0x2031) },
1595 { PCI_DEVICE(PCI_VENDOR_ID_SILAN, 0x8139) }, 1595 { PCI_DEVICE(PCI_VENDOR_ID_SILAN, 0x8139) },
1596 { PCI_DEVICE(0x1088, 0x2031) },
1596 { 0, } 1597 { 0, }
1597}; 1598};
1598MODULE_DEVICE_TABLE(pci, sc92031_pci_device_id_table); 1599MODULE_DEVICE_TABLE(pci, sc92031_pci_device_id_table);
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 60d502eef4f..543af2044f4 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -3854,8 +3854,10 @@ static struct net_device *skge_devinit(struct skge_hw *hw, int port,
3854 skge->speed = -1; 3854 skge->speed = -1;
3855 skge->advertising = skge_supported_modes(hw); 3855 skge->advertising = skge_supported_modes(hw);
3856 3856
3857 if (device_may_wakeup(&hw->pdev->dev)) 3857 if (device_can_wakeup(&hw->pdev->dev)) {
3858 skge->wol = wol_supported(hw) & WAKE_MAGIC; 3858 skge->wol = wol_supported(hw) & WAKE_MAGIC;
3859 device_set_wakeup_enable(&hw->pdev->dev, skge->wol);
3860 }
3859 3861
3860 hw->dev[port] = dev; 3862 hw->dev[port] = dev;
3861 3863
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index daf961ab68b..0a551d8f5d9 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1151,14 +1151,7 @@ stopped:
1151 1151
1152 /* reset the Rx prefetch unit */ 1152 /* reset the Rx prefetch unit */
1153 sky2_write32(hw, Y2_QADDR(rxq, PREF_UNIT_CTRL), PREF_UNIT_RST_SET); 1153 sky2_write32(hw, Y2_QADDR(rxq, PREF_UNIT_CTRL), PREF_UNIT_RST_SET);
1154 1154 mmiowb();
1155 /* Reset the RAM Buffer receive queue */
1156 sky2_write8(hw, RB_ADDR(rxq, RB_CTRL), RB_RST_SET);
1157
1158 /* Reset Rx MAC FIFO */
1159 sky2_write8(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), GMF_RST_SET);
1160
1161 sky2_read8(hw, B0_CTST);
1162} 1155}
1163 1156
1164/* Clean out receive buffer area, assumes receiver hardware stopped */ 1157/* Clean out receive buffer area, assumes receiver hardware stopped */
@@ -1495,6 +1488,8 @@ static int sky2_up(struct net_device *dev)
1495 sky2_set_vlan_mode(hw, port, sky2->vlgrp != NULL); 1488 sky2_set_vlan_mode(hw, port, sky2->vlgrp != NULL);
1496#endif 1489#endif
1497 1490
1491 sky2->restarting = 0;
1492
1498 err = sky2_rx_start(sky2); 1493 err = sky2_rx_start(sky2);
1499 if (err) 1494 if (err)
1500 goto err_out; 1495 goto err_out;
@@ -1507,6 +1502,9 @@ static int sky2_up(struct net_device *dev)
1507 1502
1508 sky2_set_multicast(dev); 1503 sky2_set_multicast(dev);
1509 1504
1505 /* wake queue incase we are restarting */
1506 netif_wake_queue(dev);
1507
1510 if (netif_msg_ifup(sky2)) 1508 if (netif_msg_ifup(sky2))
1511 printk(KERN_INFO PFX "%s: enabling interface\n", dev->name); 1509 printk(KERN_INFO PFX "%s: enabling interface\n", dev->name);
1512 return 0; 1510 return 0;
@@ -1540,6 +1538,8 @@ static inline int tx_dist(unsigned tail, unsigned head)
1540/* Number of list elements available for next tx */ 1538/* Number of list elements available for next tx */
1541static inline int tx_avail(const struct sky2_port *sky2) 1539static inline int tx_avail(const struct sky2_port *sky2)
1542{ 1540{
1541 if (unlikely(sky2->restarting))
1542 return 0;
1543 return sky2->tx_pending - tx_dist(sky2->tx_cons, sky2->tx_prod); 1543 return sky2->tx_pending - tx_dist(sky2->tx_cons, sky2->tx_prod);
1544} 1544}
1545 1545
@@ -1825,11 +1825,9 @@ static int sky2_down(struct net_device *dev)
1825 if (netif_msg_ifdown(sky2)) 1825 if (netif_msg_ifdown(sky2))
1826 printk(KERN_INFO PFX "%s: disabling interface\n", dev->name); 1826 printk(KERN_INFO PFX "%s: disabling interface\n", dev->name);
1827 1827
1828 /* Disable port IRQ */ 1828 /* explicitly shut off tx incase we're restarting */
1829 imask = sky2_read32(hw, B0_IMSK); 1829 sky2->restarting = 1;
1830 imask &= ~portirq_msk[port]; 1830 netif_tx_disable(dev);
1831 sky2_write32(hw, B0_IMSK, imask);
1832 sky2_read32(hw, B0_IMSK);
1833 1831
1834 /* Force flow control off */ 1832 /* Force flow control off */
1835 sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_PAUSE_OFF); 1833 sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_PAUSE_OFF);
@@ -1870,8 +1868,6 @@ static int sky2_down(struct net_device *dev)
1870 1868
1871 sky2_write32(hw, RB_ADDR(txqaddr[port], RB_CTRL), RB_RST_SET); 1869 sky2_write32(hw, RB_ADDR(txqaddr[port], RB_CTRL), RB_RST_SET);
1872 1870
1873 sky2_rx_stop(sky2);
1874
1875 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET); 1871 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET);
1876 sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_SET); 1872 sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_SET);
1877 1873
@@ -1881,6 +1877,14 @@ static int sky2_down(struct net_device *dev)
1881 sky2_write32(hw, STAT_ISR_TIMER_CNT, 0); 1877 sky2_write32(hw, STAT_ISR_TIMER_CNT, 0);
1882 sky2_read8(hw, STAT_ISR_TIMER_CTRL); 1878 sky2_read8(hw, STAT_ISR_TIMER_CTRL);
1883 1879
1880 sky2_rx_stop(sky2);
1881
1882 /* Disable port IRQ */
1883 imask = sky2_read32(hw, B0_IMSK);
1884 imask &= ~portirq_msk[port];
1885 sky2_write32(hw, B0_IMSK, imask);
1886 sky2_read32(hw, B0_IMSK);
1887
1884 synchronize_irq(hw->pdev->irq); 1888 synchronize_irq(hw->pdev->irq);
1885 napi_synchronize(&hw->napi); 1889 napi_synchronize(&hw->napi);
1886 1890
@@ -2366,7 +2370,7 @@ static inline void sky2_tx_done(struct net_device *dev, u16 last)
2366{ 2370{
2367 struct sky2_port *sky2 = netdev_priv(dev); 2371 struct sky2_port *sky2 = netdev_priv(dev);
2368 2372
2369 if (netif_running(dev)) { 2373 if (likely(netif_running(dev) && !sky2->restarting)) {
2370 netif_tx_lock(dev); 2374 netif_tx_lock(dev);
2371 sky2_tx_complete(sky2, last); 2375 sky2_tx_complete(sky2, last);
2372 netif_tx_unlock(dev); 2376 netif_tx_unlock(dev);
@@ -4290,6 +4294,7 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw,
4290 spin_lock_init(&sky2->phy_lock); 4294 spin_lock_init(&sky2->phy_lock);
4291 sky2->tx_pending = TX_DEF_PENDING; 4295 sky2->tx_pending = TX_DEF_PENDING;
4292 sky2->rx_pending = RX_DEF_PENDING; 4296 sky2->rx_pending = RX_DEF_PENDING;
4297 sky2->restarting = 0;
4293 4298
4294 hw->dev[port] = dev; 4299 hw->dev[port] = dev;
4295 4300
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
index b5549c9e510..4486b066b43 100644
--- a/drivers/net/sky2.h
+++ b/drivers/net/sky2.h
@@ -2051,6 +2051,7 @@ struct sky2_port {
2051 u8 duplex; /* DUPLEX_HALF, DUPLEX_FULL */ 2051 u8 duplex; /* DUPLEX_HALF, DUPLEX_FULL */
2052 u8 rx_csum; 2052 u8 rx_csum;
2053 u8 wol; 2053 u8 wol;
2054 u8 restarting;
2054 enum flow_control flow_mode; 2055 enum flow_control flow_mode;
2055 enum flow_control flow_status; 2056 enum flow_control flow_status;
2056 2057
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index f1f773b17fe..57a159fac99 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -186,7 +186,8 @@ static inline void SMC_outw(u16 val, void __iomem *ioaddr, int reg)
186#define SMC_outsb(a, r, p, l) writesb((a) + (r), p, (l)) 186#define SMC_outsb(a, r, p, l) writesb((a) + (r), p, (l))
187#define SMC_IRQ_FLAGS (-1) /* from resource */ 187#define SMC_IRQ_FLAGS (-1) /* from resource */
188 188
189#elif defined(CONFIG_MACH_LOGICPD_PXA270) 189#elif defined(CONFIG_MACH_LOGICPD_PXA270) \
190 || defined(CONFIG_MACH_NOMADIK_8815NHK)
190 191
191#define SMC_CAN_USE_8BIT 0 192#define SMC_CAN_USE_8BIT 0
192#define SMC_CAN_USE_16BIT 1 193#define SMC_CAN_USE_16BIT 1
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c
index 9d896116cf7..08a6c41c159 100644
--- a/drivers/net/tokenring/ibmtr.c
+++ b/drivers/net/tokenring/ibmtr.c
@@ -1912,7 +1912,7 @@ static int __init ibmtr_init(void)
1912 1912
1913 find_turbo_adapters(io); 1913 find_turbo_adapters(io);
1914 1914
1915 for (i = 0; io[i] && (i < IBMTR_MAX_ADAPTERS); i++) { 1915 for (i = 0; i < IBMTR_MAX_ADAPTERS && io[i]; i++) {
1916 struct net_device *dev; 1916 struct net_device *dev;
1917 irq[i] = 0; 1917 irq[i] = 0;
1918 mem[i] = 0; 1918 mem[i] = 0;
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
index eb72d2e9ab3..acfdccd4456 100644
--- a/drivers/net/tulip/de4x5.c
+++ b/drivers/net/tulip/de4x5.c
@@ -5059,7 +5059,7 @@ mii_get_phy(struct net_device *dev)
5059 if ((id == 0) || (id == 65535)) continue; /* Valid ID? */ 5059 if ((id == 0) || (id == 65535)) continue; /* Valid ID? */
5060 for (j=0; j<limit; j++) { /* Search PHY table */ 5060 for (j=0; j<limit; j++) { /* Search PHY table */
5061 if (id != phy_info[j].id) continue; /* ID match? */ 5061 if (id != phy_info[j].id) continue; /* ID match? */
5062 for (k=0; lp->phy[k].id && (k < DE4X5_MAX_PHY); k++); 5062 for (k=0; k < DE4X5_MAX_PHY && lp->phy[k].id; k++);
5063 if (k < DE4X5_MAX_PHY) { 5063 if (k < DE4X5_MAX_PHY) {
5064 memcpy((char *)&lp->phy[k], 5064 memcpy((char *)&lp->phy[k],
5065 (char *)&phy_info[j], sizeof(struct phy_table)); 5065 (char *)&phy_info[j], sizeof(struct phy_table));
@@ -5072,7 +5072,7 @@ mii_get_phy(struct net_device *dev)
5072 break; 5072 break;
5073 } 5073 }
5074 if ((j == limit) && (i < DE4X5_MAX_MII)) { 5074 if ((j == limit) && (i < DE4X5_MAX_MII)) {
5075 for (k=0; lp->phy[k].id && (k < DE4X5_MAX_PHY); k++); 5075 for (k=0; k < DE4X5_MAX_PHY && lp->phy[k].id; k++);
5076 lp->phy[k].addr = i; 5076 lp->phy[k].addr = i;
5077 lp->phy[k].id = id; 5077 lp->phy[k].id = id;
5078 lp->phy[k].spd.reg = GENERIC_REG; /* ANLPA register */ 5078 lp->phy[k].spd.reg = GENERIC_REG; /* ANLPA register */
@@ -5091,7 +5091,7 @@ mii_get_phy(struct net_device *dev)
5091 purgatory: 5091 purgatory:
5092 lp->active = 0; 5092 lp->active = 0;
5093 if (lp->phy[0].id) { /* Reset the PHY devices */ 5093 if (lp->phy[0].id) { /* Reset the PHY devices */
5094 for (k=0; lp->phy[k].id && (k < DE4X5_MAX_PHY); k++) { /*For each PHY*/ 5094 for (k=0; k < DE4X5_MAX_PHY && lp->phy[k].id; k++) { /*For each PHY*/
5095 mii_wr(MII_CR_RST, MII_CR, lp->phy[k].addr, DE4X5_MII); 5095 mii_wr(MII_CR_RST, MII_CR, lp->phy[k].addr, DE4X5_MII);
5096 while (mii_rd(MII_CR, lp->phy[k].addr, DE4X5_MII) & MII_CR_RST); 5096 while (mii_rd(MII_CR, lp->phy[k].addr, DE4X5_MII) & MII_CR_RST);
5097 5097
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 40c6eba775c..3b957e6412e 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -1590,13 +1590,13 @@ static int init_phy(struct net_device *dev)
1590 priv->oldspeed = 0; 1590 priv->oldspeed = 0;
1591 priv->oldduplex = -1; 1591 priv->oldduplex = -1;
1592 1592
1593 if (!ug_info->phy_node)
1594 return 0;
1595
1596 phydev = of_phy_connect(dev, ug_info->phy_node, &adjust_link, 0, 1593 phydev = of_phy_connect(dev, ug_info->phy_node, &adjust_link, 0,
1597 priv->phy_interface); 1594 priv->phy_interface);
1595 if (!phydev)
1596 phydev = of_phy_connect_fixed_link(dev, &adjust_link,
1597 priv->phy_interface);
1598 if (!phydev) { 1598 if (!phydev) {
1599 printk("%s: Could not attach to PHY\n", dev->name); 1599 dev_err(&dev->dev, "Could not attach to PHY\n");
1600 return -ENODEV; 1600 return -ENODEV;
1601 } 1601 }
1602 1602
@@ -3608,9 +3608,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
3608 struct ucc_geth_private *ugeth = NULL; 3608 struct ucc_geth_private *ugeth = NULL;
3609 struct ucc_geth_info *ug_info; 3609 struct ucc_geth_info *ug_info;
3610 struct resource res; 3610 struct resource res;
3611 struct device_node *phy;
3612 int err, ucc_num, max_speed = 0; 3611 int err, ucc_num, max_speed = 0;
3613 const u32 *fixed_link;
3614 const unsigned int *prop; 3612 const unsigned int *prop;
3615 const char *sprop; 3613 const char *sprop;
3616 const void *mac_addr; 3614 const void *mac_addr;
@@ -3708,15 +3706,8 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
3708 3706
3709 ug_info->uf_info.regs = res.start; 3707 ug_info->uf_info.regs = res.start;
3710 ug_info->uf_info.irq = irq_of_parse_and_map(np, 0); 3708 ug_info->uf_info.irq = irq_of_parse_and_map(np, 0);
3711 fixed_link = of_get_property(np, "fixed-link", NULL); 3709
3712 if (fixed_link) { 3710 ug_info->phy_node = of_parse_phandle(np, "phy-handle", 0);
3713 phy = NULL;
3714 } else {
3715 phy = of_parse_phandle(np, "phy-handle", 0);
3716 if (phy == NULL)
3717 return -ENODEV;
3718 }
3719 ug_info->phy_node = phy;
3720 3711
3721 /* Find the TBI PHY node. If it's not there, we don't support SGMII */ 3712 /* Find the TBI PHY node. If it's not there, we don't support SGMII */
3722 ug_info->tbi_node = of_parse_phandle(np, "tbi-handle", 0); 3713 ug_info->tbi_node = of_parse_phandle(np, "tbi-handle", 0);
@@ -3725,7 +3716,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
3725 prop = of_get_property(np, "phy-connection-type", NULL); 3716 prop = of_get_property(np, "phy-connection-type", NULL);
3726 if (!prop) { 3717 if (!prop) {
3727 /* handle interface property present in old trees */ 3718 /* handle interface property present in old trees */
3728 prop = of_get_property(phy, "interface", NULL); 3719 prop = of_get_property(ug_info->phy_node, "interface", NULL);
3729 if (prop != NULL) { 3720 if (prop != NULL) {
3730 phy_interface = enet_to_phy_interface[*prop]; 3721 phy_interface = enet_to_phy_interface[*prop];
3731 max_speed = enet_to_speed[*prop]; 3722 max_speed = enet_to_speed[*prop];
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
index a906d399813..c47237c2d63 100644
--- a/drivers/net/usb/Kconfig
+++ b/drivers/net/usb/Kconfig
@@ -369,4 +369,12 @@ config USB_NET_INT51X1
369 (Powerline Communications) solution with an Intellon 369 (Powerline Communications) solution with an Intellon
370 INT51x1/INT5200 chip, like the "devolo dLan duo". 370 INT51x1/INT5200 chip, like the "devolo dLan duo".
371 371
372config USB_CDC_PHONET
373 tristate "CDC Phonet support"
374 depends on PHONET
375 help
376 Choose this option to support the Phonet interface to a Nokia
377 cellular modem, as found on most Nokia handsets with the
378 "PC suite" USB profile.
379
372endmenu 380endmenu
diff --git a/drivers/net/usb/Makefile b/drivers/net/usb/Makefile
index b870b0b1cbe..e17afb78f37 100644
--- a/drivers/net/usb/Makefile
+++ b/drivers/net/usb/Makefile
@@ -21,4 +21,5 @@ obj-$(CONFIG_USB_NET_ZAURUS) += zaurus.o
21obj-$(CONFIG_USB_NET_MCS7830) += mcs7830.o 21obj-$(CONFIG_USB_NET_MCS7830) += mcs7830.o
22obj-$(CONFIG_USB_USBNET) += usbnet.o 22obj-$(CONFIG_USB_USBNET) += usbnet.o
23obj-$(CONFIG_USB_NET_INT51X1) += int51x1.o 23obj-$(CONFIG_USB_NET_INT51X1) += int51x1.o
24obj-$(CONFIG_USB_CDC_PHONET) += cdc-phonet.o
24 25
diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c
new file mode 100644
index 00000000000..792af72da8a
--- /dev/null
+++ b/drivers/net/usb/cdc-phonet.c
@@ -0,0 +1,461 @@
1/*
2 * phonet.c -- USB CDC Phonet host driver
3 *
4 * Copyright (C) 2008-2009 Nokia Corporation. All rights reserved.
5 *
6 * Author: Rémi Denis-Courmont
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
21 */
22
23#include <linux/kernel.h>
24#include <linux/module.h>
25#include <linux/usb.h>
26#include <linux/usb/cdc.h>
27#include <linux/netdevice.h>
28#include <linux/if_arp.h>
29#include <linux/if_phonet.h>
30
31#define PN_MEDIA_USB 0x1B
32
33static const unsigned rxq_size = 17;
34
35struct usbpn_dev {
36 struct net_device *dev;
37
38 struct usb_interface *intf, *data_intf;
39 struct usb_device *usb;
40 unsigned int tx_pipe, rx_pipe;
41 u8 active_setting;
42 u8 disconnected;
43
44 unsigned tx_queue;
45 spinlock_t tx_lock;
46
47 spinlock_t rx_lock;
48 struct sk_buff *rx_skb;
49 struct urb *urbs[0];
50};
51
52static void tx_complete(struct urb *req);
53static void rx_complete(struct urb *req);
54
55/*
56 * Network device callbacks
57 */
58static int usbpn_xmit(struct sk_buff *skb, struct net_device *dev)
59{
60 struct usbpn_dev *pnd = netdev_priv(dev);
61 struct urb *req = NULL;
62 unsigned long flags;
63 int err;
64
65 if (skb->protocol != htons(ETH_P_PHONET))
66 goto drop;
67
68 req = usb_alloc_urb(0, GFP_ATOMIC);
69 if (!req)
70 goto drop;
71 usb_fill_bulk_urb(req, pnd->usb, pnd->tx_pipe, skb->data, skb->len,
72 tx_complete, skb);
73 req->transfer_flags = URB_ZERO_PACKET;
74 err = usb_submit_urb(req, GFP_ATOMIC);
75 if (err) {
76 usb_free_urb(req);
77 goto drop;
78 }
79
80 spin_lock_irqsave(&pnd->tx_lock, flags);
81 pnd->tx_queue++;
82 if (pnd->tx_queue >= dev->tx_queue_len)
83 netif_stop_queue(dev);
84 spin_unlock_irqrestore(&pnd->tx_lock, flags);
85 return 0;
86
87drop:
88 dev_kfree_skb(skb);
89 dev->stats.tx_dropped++;
90 return 0;
91}
92
93static void tx_complete(struct urb *req)
94{
95 struct sk_buff *skb = req->context;
96 struct net_device *dev = skb->dev;
97 struct usbpn_dev *pnd = netdev_priv(dev);
98
99 switch (req->status) {
100 case 0:
101 dev->stats.tx_bytes += skb->len;
102 break;
103
104 case -ENOENT:
105 case -ECONNRESET:
106 case -ESHUTDOWN:
107 dev->stats.tx_aborted_errors++;
108 default:
109 dev->stats.tx_errors++;
110 dev_dbg(&dev->dev, "TX error (%d)\n", req->status);
111 }
112 dev->stats.tx_packets++;
113
114 spin_lock(&pnd->tx_lock);
115 pnd->tx_queue--;
116 netif_wake_queue(dev);
117 spin_unlock(&pnd->tx_lock);
118
119 dev_kfree_skb_any(skb);
120 usb_free_urb(req);
121}
122
123static int rx_submit(struct usbpn_dev *pnd, struct urb *req, gfp_t gfp_flags)
124{
125 struct net_device *dev = pnd->dev;
126 struct page *page;
127 int err;
128
129 page = __netdev_alloc_page(dev, gfp_flags);
130 if (!page)
131 return -ENOMEM;
132
133 usb_fill_bulk_urb(req, pnd->usb, pnd->rx_pipe, page_address(page),
134 PAGE_SIZE, rx_complete, dev);
135 req->transfer_flags = 0;
136 err = usb_submit_urb(req, gfp_flags);
137 if (unlikely(err)) {
138 dev_dbg(&dev->dev, "RX submit error (%d)\n", err);
139 netdev_free_page(dev, page);
140 }
141 return err;
142}
143
144static void rx_complete(struct urb *req)
145{
146 struct net_device *dev = req->context;
147 struct usbpn_dev *pnd = netdev_priv(dev);
148 struct page *page = virt_to_page(req->transfer_buffer);
149 struct sk_buff *skb;
150 unsigned long flags;
151
152 switch (req->status) {
153 case 0:
154 spin_lock_irqsave(&pnd->rx_lock, flags);
155 skb = pnd->rx_skb;
156 if (!skb) {
157 skb = pnd->rx_skb = netdev_alloc_skb(dev, 12);
158 if (likely(skb)) {
159 /* Can't use pskb_pull() on page in IRQ */
160 memcpy(skb_put(skb, 1), page_address(page), 1);
161 skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
162 page, 1, req->actual_length);
163 page = NULL;
164 }
165 } else {
166 skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
167 page, 0, req->actual_length);
168 page = NULL;
169 }
170 if (req->actual_length < PAGE_SIZE)
171 pnd->rx_skb = NULL; /* Last fragment */
172 else
173 skb = NULL;
174 spin_unlock_irqrestore(&pnd->rx_lock, flags);
175 if (skb) {
176 skb->protocol = htons(ETH_P_PHONET);
177 skb_reset_mac_header(skb);
178 __skb_pull(skb, 1);
179 skb->dev = dev;
180 dev->stats.rx_packets++;
181 dev->stats.rx_bytes += skb->len;
182
183 netif_rx(skb);
184 }
185 goto resubmit;
186
187 case -ENOENT:
188 case -ECONNRESET:
189 case -ESHUTDOWN:
190 req = NULL;
191 break;
192
193 case -EOVERFLOW:
194 dev->stats.rx_over_errors++;
195 dev_dbg(&dev->dev, "RX overflow\n");
196 break;
197
198 case -EILSEQ:
199 dev->stats.rx_crc_errors++;
200 break;
201 }
202
203 dev->stats.rx_errors++;
204resubmit:
205 if (page)
206 netdev_free_page(dev, page);
207 if (req)
208 rx_submit(pnd, req, GFP_ATOMIC);
209}
210
211static int usbpn_close(struct net_device *dev);
212
213static int usbpn_open(struct net_device *dev)
214{
215 struct usbpn_dev *pnd = netdev_priv(dev);
216 int err;
217 unsigned i;
218 unsigned num = pnd->data_intf->cur_altsetting->desc.bInterfaceNumber;
219
220 err = usb_set_interface(pnd->usb, num, pnd->active_setting);
221 if (err)
222 return err;
223
224 for (i = 0; i < rxq_size; i++) {
225 struct urb *req = usb_alloc_urb(0, GFP_KERNEL);
226
227 if (!req || rx_submit(pnd, req, GFP_KERNEL)) {
228 usbpn_close(dev);
229 return -ENOMEM;
230 }
231 pnd->urbs[i] = req;
232 }
233
234 netif_wake_queue(dev);
235 return 0;
236}
237
238static int usbpn_close(struct net_device *dev)
239{
240 struct usbpn_dev *pnd = netdev_priv(dev);
241 unsigned i;
242 unsigned num = pnd->data_intf->cur_altsetting->desc.bInterfaceNumber;
243
244 netif_stop_queue(dev);
245
246 for (i = 0; i < rxq_size; i++) {
247 struct urb *req = pnd->urbs[i];
248
249 if (!req)
250 continue;
251 usb_kill_urb(req);
252 usb_free_urb(req);
253 pnd->urbs[i] = NULL;
254 }
255
256 return usb_set_interface(pnd->usb, num, !pnd->active_setting);
257}
258
259static int usbpn_set_mtu(struct net_device *dev, int new_mtu)
260{
261 if ((new_mtu < PHONET_MIN_MTU) || (new_mtu > PHONET_MAX_MTU))
262 return -EINVAL;
263
264 dev->mtu = new_mtu;
265 return 0;
266}
267
268static const struct net_device_ops usbpn_ops = {
269 .ndo_open = usbpn_open,
270 .ndo_stop = usbpn_close,
271 .ndo_start_xmit = usbpn_xmit,
272 .ndo_change_mtu = usbpn_set_mtu,
273};
274
275static void usbpn_setup(struct net_device *dev)
276{
277 dev->features = 0;
278 dev->netdev_ops = &usbpn_ops,
279 dev->header_ops = &phonet_header_ops;
280 dev->type = ARPHRD_PHONET;
281 dev->flags = IFF_POINTOPOINT | IFF_NOARP;
282 dev->mtu = PHONET_MAX_MTU;
283 dev->hard_header_len = 1;
284 dev->dev_addr[0] = PN_MEDIA_USB;
285 dev->addr_len = 1;
286 dev->tx_queue_len = 3;
287
288 dev->destructor = free_netdev;
289}
290
291/*
292 * USB driver callbacks
293 */
294static struct usb_device_id usbpn_ids[] = {
295 {
296 .match_flags = USB_DEVICE_ID_MATCH_VENDOR
297 | USB_DEVICE_ID_MATCH_INT_CLASS
298 | USB_DEVICE_ID_MATCH_INT_SUBCLASS,
299 .idVendor = 0x0421, /* Nokia */
300 .bInterfaceClass = USB_CLASS_COMM,
301 .bInterfaceSubClass = 0xFE,
302 },
303 { },
304};
305
306MODULE_DEVICE_TABLE(usb, usbpn_ids);
307
308static struct usb_driver usbpn_driver;
309
310int usbpn_probe(struct usb_interface *intf, const struct usb_device_id *id)
311{
312 static const char ifname[] = "usbpn%d";
313 const struct usb_cdc_union_desc *union_header = NULL;
314 const struct usb_cdc_header_desc *phonet_header = NULL;
315 const struct usb_host_interface *data_desc;
316 struct usb_interface *data_intf;
317 struct usb_device *usbdev = interface_to_usbdev(intf);
318 struct net_device *dev;
319 struct usbpn_dev *pnd;
320 u8 *data;
321 int len, err;
322
323 data = intf->altsetting->extra;
324 len = intf->altsetting->extralen;
325 while (len >= 3) {
326 u8 dlen = data[0];
327 if (dlen < 3)
328 return -EINVAL;
329
330 /* bDescriptorType */
331 if (data[1] == USB_DT_CS_INTERFACE) {
332 /* bDescriptorSubType */
333 switch (data[2]) {
334 case USB_CDC_UNION_TYPE:
335 if (union_header || dlen < 5)
336 break;
337 union_header =
338 (struct usb_cdc_union_desc *)data;
339 break;
340 case 0xAB:
341 if (phonet_header || dlen < 5)
342 break;
343 phonet_header =
344 (struct usb_cdc_header_desc *)data;
345 break;
346 }
347 }
348 data += dlen;
349 len -= dlen;
350 }
351
352 if (!union_header || !phonet_header)
353 return -EINVAL;
354
355 data_intf = usb_ifnum_to_if(usbdev, union_header->bSlaveInterface0);
356 if (data_intf == NULL)
357 return -ENODEV;
358 /* Data interface has one inactive and one active setting */
359 if (data_intf->num_altsetting != 2)
360 return -EINVAL;
361 if (data_intf->altsetting[0].desc.bNumEndpoints == 0
362 && data_intf->altsetting[1].desc.bNumEndpoints == 2)
363 data_desc = data_intf->altsetting + 1;
364 else
365 if (data_intf->altsetting[0].desc.bNumEndpoints == 2
366 && data_intf->altsetting[1].desc.bNumEndpoints == 0)
367 data_desc = data_intf->altsetting;
368 else
369 return -EINVAL;
370
371 dev = alloc_netdev(sizeof(*pnd) + sizeof(pnd->urbs[0]) * rxq_size,
372 ifname, usbpn_setup);
373 if (!dev)
374 return -ENOMEM;
375
376 pnd = netdev_priv(dev);
377 SET_NETDEV_DEV(dev, &intf->dev);
378 netif_stop_queue(dev);
379
380 pnd->dev = dev;
381 pnd->usb = usb_get_dev(usbdev);
382 pnd->intf = intf;
383 pnd->data_intf = data_intf;
384 spin_lock_init(&pnd->tx_lock);
385 spin_lock_init(&pnd->rx_lock);
386 /* Endpoints */
387 if (usb_pipein(data_desc->endpoint[0].desc.bEndpointAddress)) {
388 pnd->rx_pipe = usb_rcvbulkpipe(usbdev,
389 data_desc->endpoint[0].desc.bEndpointAddress);
390 pnd->tx_pipe = usb_sndbulkpipe(usbdev,
391 data_desc->endpoint[1].desc.bEndpointAddress);
392 } else {
393 pnd->rx_pipe = usb_rcvbulkpipe(usbdev,
394 data_desc->endpoint[1].desc.bEndpointAddress);
395 pnd->tx_pipe = usb_sndbulkpipe(usbdev,
396 data_desc->endpoint[0].desc.bEndpointAddress);
397 }
398 pnd->active_setting = data_desc - data_intf->altsetting;
399
400 err = usb_driver_claim_interface(&usbpn_driver, data_intf, pnd);
401 if (err)
402 goto out;
403
404 /* Force inactive mode until the network device is brought UP */
405 usb_set_interface(usbdev, union_header->bSlaveInterface0,
406 !pnd->active_setting);
407 usb_set_intfdata(intf, pnd);
408
409 err = register_netdev(dev);
410 if (err) {
411 usb_driver_release_interface(&usbpn_driver, data_intf);
412 goto out;
413 }
414
415 dev_dbg(&dev->dev, "USB CDC Phonet device found\n");
416 return 0;
417
418out:
419 usb_set_intfdata(intf, NULL);
420 free_netdev(dev);
421 return err;
422}
423
424static void usbpn_disconnect(struct usb_interface *intf)
425{
426 struct usbpn_dev *pnd = usb_get_intfdata(intf);
427 struct usb_device *usb = pnd->usb;
428
429 if (pnd->disconnected)
430 return;
431
432 pnd->disconnected = 1;
433 usb_driver_release_interface(&usbpn_driver,
434 (pnd->intf == intf) ? pnd->data_intf : pnd->intf);
435 unregister_netdev(pnd->dev);
436 usb_put_dev(usb);
437}
438
439static struct usb_driver usbpn_driver = {
440 .name = "cdc_phonet",
441 .probe = usbpn_probe,
442 .disconnect = usbpn_disconnect,
443 .id_table = usbpn_ids,
444};
445
446static int __init usbpn_init(void)
447{
448 return usb_register(&usbpn_driver);
449}
450
451static void __exit usbpn_exit(void)
452{
453 usb_deregister(&usbpn_driver);
454}
455
456module_init(usbpn_init);
457module_exit(usbpn_exit);
458
459MODULE_AUTHOR("Remi Denis-Courmont");
460MODULE_DESCRIPTION("USB CDC Phonet host interface");
461MODULE_LICENSE("GPL");
diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c
index cd35d50e46d..45cebfb302c 100644
--- a/drivers/net/usb/cdc_eem.c
+++ b/drivers/net/usb/cdc_eem.c
@@ -311,7 +311,7 @@ static int eem_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
311 * bmCRC = 0 : CRC = 0xDEADBEEF 311 * bmCRC = 0 : CRC = 0xDEADBEEF
312 */ 312 */
313 if (header & BIT(14)) 313 if (header & BIT(14))
314 crc2 = ~crc32_le(~0, skb2->data, len); 314 crc2 = ~crc32_le(~0, skb2->data, skb2->len);
315 else 315 else
316 crc2 = 0xdeadbeef; 316 crc2 = 0xdeadbeef;
317 317
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index c70604f0329..8ce5e4cee16 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -5918,20 +5918,19 @@ static int airo_set_essid(struct net_device *dev,
5918 readSsidRid(local, &SSID_rid); 5918 readSsidRid(local, &SSID_rid);
5919 5919
5920 /* Check if we asked for `any' */ 5920 /* Check if we asked for `any' */
5921 if(dwrq->flags == 0) { 5921 if (dwrq->flags == 0) {
5922 /* Just send an empty SSID list */ 5922 /* Just send an empty SSID list */
5923 memset(&SSID_rid, 0, sizeof(SSID_rid)); 5923 memset(&SSID_rid, 0, sizeof(SSID_rid));
5924 } else { 5924 } else {
5925 int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; 5925 unsigned index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
5926 5926
5927 /* Check the size of the string */ 5927 /* Check the size of the string */
5928 if(dwrq->length > IW_ESSID_MAX_SIZE) { 5928 if (dwrq->length > IW_ESSID_MAX_SIZE)
5929 return -E2BIG ; 5929 return -E2BIG ;
5930 } 5930
5931 /* Check if index is valid */ 5931 /* Check if index is valid */
5932 if((index < 0) || (index >= 4)) { 5932 if (index >= ARRAY_SIZE(SSID_rid.ssids))
5933 return -EINVAL; 5933 return -EINVAL;
5934 }
5935 5934
5936 /* Set the SSID */ 5935 /* Set the SSID */
5937 memset(SSID_rid.ssids[index].ssid, 0, 5936 memset(SSID_rid.ssids[index].ssid, 0,
@@ -6819,7 +6818,7 @@ static int airo_set_txpow(struct net_device *dev,
6819 return -EINVAL; 6818 return -EINVAL;
6820 } 6819 }
6821 clear_bit (FLAG_RADIO_OFF, &local->flags); 6820 clear_bit (FLAG_RADIO_OFF, &local->flags);
6822 for (i = 0; cap_rid.txPowerLevels[i] && (i < 8); i++) 6821 for (i = 0; i < 8 && cap_rid.txPowerLevels[i]; i++)
6823 if (v == cap_rid.txPowerLevels[i]) { 6822 if (v == cap_rid.txPowerLevels[i]) {
6824 readConfigRid(local, 1); 6823 readConfigRid(local, 1);
6825 local->config.txPower = v; 6824 local->config.txPower = v;
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index ea045151f95..029c1bc7468 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -2970,6 +2970,9 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
2970 if (modparam_nohwcrypt) 2970 if (modparam_nohwcrypt)
2971 return -EOPNOTSUPP; 2971 return -EOPNOTSUPP;
2972 2972
2973 if (sc->opmode == NL80211_IFTYPE_AP)
2974 return -EOPNOTSUPP;
2975
2973 switch (key->alg) { 2976 switch (key->alg) {
2974 case ALG_WEP: 2977 case ALG_WEP:
2975 case ALG_TKIP: 2978 case ALG_TKIP:
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
index 1aeafb511dd..aad259b4c19 100644
--- a/drivers/net/wireless/ath/ath9k/ani.c
+++ b/drivers/net/wireless/ath/ath9k/ani.c
@@ -478,6 +478,18 @@ void ath9k_ani_reset(struct ath_hw *ah)
478 "Reset ANI state opmode %u\n", ah->opmode); 478 "Reset ANI state opmode %u\n", ah->opmode);
479 ah->stats.ast_ani_reset++; 479 ah->stats.ast_ani_reset++;
480 480
481 if (ah->opmode == NL80211_IFTYPE_AP) {
482 /*
483 * ath9k_hw_ani_control() will only process items set on
484 * ah->ani_function
485 */
486 if (IS_CHAN_2GHZ(chan))
487 ah->ani_function = (ATH9K_ANI_SPUR_IMMUNITY_LEVEL |
488 ATH9K_ANI_FIRSTEP_LEVEL);
489 else
490 ah->ani_function = 0;
491 }
492
481 ath9k_hw_ani_control(ah, ATH9K_ANI_NOISE_IMMUNITY_LEVEL, 0); 493 ath9k_hw_ani_control(ah, ATH9K_ANI_NOISE_IMMUNITY_LEVEL, 0);
482 ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL, 0); 494 ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL, 0);
483 ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL, 0); 495 ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL, 0);
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c
index a2fda702b62..ce0e86c36a8 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom.c
@@ -460,7 +460,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah)
460 integer = swab32(eep->modalHeader.antCtrlCommon); 460 integer = swab32(eep->modalHeader.antCtrlCommon);
461 eep->modalHeader.antCtrlCommon = integer; 461 eep->modalHeader.antCtrlCommon = integer;
462 462
463 for (i = 0; i < AR5416_MAX_CHAINS; i++) { 463 for (i = 0; i < AR5416_EEP4K_MAX_CHAINS; i++) {
464 integer = swab32(eep->modalHeader.antCtrlChain[i]); 464 integer = swab32(eep->modalHeader.antCtrlChain[i]);
465 eep->modalHeader.antCtrlChain[i] = integer; 465 eep->modalHeader.antCtrlChain[i] = integer;
466 } 466 }
@@ -914,7 +914,7 @@ static void ath9k_hw_set_4k_power_per_rate_table(struct ath_hw *ah,
914 ctlMode, numCtlModes, isHt40CtlMode, 914 ctlMode, numCtlModes, isHt40CtlMode,
915 (pCtlMode[ctlMode] & EXT_ADDITIVE)); 915 (pCtlMode[ctlMode] & EXT_ADDITIVE));
916 916
917 for (i = 0; (i < AR5416_NUM_CTLS) && 917 for (i = 0; (i < AR5416_EEP4K_NUM_CTLS) &&
918 pEepData->ctlIndex[i]; i++) { 918 pEepData->ctlIndex[i]; i++) {
919 DPRINTF(ah->ah_sc, ATH_DBG_EEPROM, 919 DPRINTF(ah->ah_sc, ATH_DBG_EEPROM,
920 " LOOP-Ctlidx %d: cfgCtl 0x%2.2x " 920 " LOOP-Ctlidx %d: cfgCtl 0x%2.2x "
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
index eef370bd121..bf3d25ba7be 100644
--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -474,6 +474,21 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
474 return 0; 474 return 0;
475} 475}
476 476
477/*
478 * Some users have reported their EEPROM programmed with
479 * 0x8000 set, this is not a supported regulatory domain
480 * but since we have more than one user with it we need
481 * a solution for them. We default to 0x64, which is the
482 * default Atheros world regulatory domain.
483 */
484static void ath_regd_sanitize(struct ath_regulatory *reg)
485{
486 if (reg->current_rd != COUNTRY_ERD_FLAG)
487 return;
488 printk(KERN_DEBUG "ath: EEPROM regdomain sanitized\n");
489 reg->current_rd = 0x64;
490}
491
477int 492int
478ath_regd_init(struct ath_regulatory *reg, 493ath_regd_init(struct ath_regulatory *reg,
479 struct wiphy *wiphy, 494 struct wiphy *wiphy,
@@ -486,6 +501,8 @@ ath_regd_init(struct ath_regulatory *reg,
486 if (!reg) 501 if (!reg)
487 return -EINVAL; 502 return -EINVAL;
488 503
504 ath_regd_sanitize(reg);
505
489 printk(KERN_DEBUG "ath: EEPROM regdomain: 0x%0x\n", reg->current_rd); 506 printk(KERN_DEBUG "ath: EEPROM regdomain: 0x%0x\n", reg->current_rd);
490 507
491 if (!ath_regd_is_eeprom_valid(reg)) { 508 if (!ath_regd_is_eeprom_valid(reg)) {
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h
index fbb3a573463..2de6471d4be 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.h
@@ -112,7 +112,7 @@ enum iwl3945_antenna {
112#define IWL_TX_FIFO_NONE 7 112#define IWL_TX_FIFO_NONE 7
113 113
114/* Minimum number of queues. MAX_NUM is defined in hw specific files */ 114/* Minimum number of queues. MAX_NUM is defined in hw specific files */
115#define IWL_MIN_NUM_QUEUES 4 115#define IWL39_MIN_NUM_QUEUES 4
116 116
117#define IEEE80211_DATA_LEN 2304 117#define IEEE80211_DATA_LEN 2304
118#define IEEE80211_4ADDR_LEN 30 118#define IEEE80211_4ADDR_LEN 30
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 6d1519e1f01..355f50ea7fe 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2675,12 +2675,10 @@ static ssize_t show_power_level(struct device *d,
2675 struct device_attribute *attr, char *buf) 2675 struct device_attribute *attr, char *buf)
2676{ 2676{
2677 struct iwl_priv *priv = dev_get_drvdata(d); 2677 struct iwl_priv *priv = dev_get_drvdata(d);
2678 int mode = priv->power_data.user_power_setting;
2679 int level = priv->power_data.power_mode; 2678 int level = priv->power_data.power_mode;
2680 char *p = buf; 2679 char *p = buf;
2681 2680
2682 p += sprintf(p, "INDEX:%d\t", level); 2681 p += sprintf(p, "%d\n", level);
2683 p += sprintf(p, "USER:%d\n", mode);
2684 return p - buf + 1; 2682 return p - buf + 1;
2685} 2683}
2686 2684
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 6ab07165ea2..18b135f510e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1332,6 +1332,9 @@ int iwl_setup_mac(struct iwl_priv *priv)
1332 1332
1333 hw->wiphy->custom_regulatory = true; 1333 hw->wiphy->custom_regulatory = true;
1334 1334
1335 /* Firmware does not support this */
1336 hw->wiphy->disable_beacon_hints = true;
1337
1335 hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX; 1338 hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX;
1336 /* we create the 802.11 header and a zero-length SSID element */ 1339 /* we create the 802.11 header and a zero-length SSID element */
1337 hw->wiphy->max_scan_ie_len = IWL_MAX_PROBE_REQUEST - 24 - 2; 1340 hw->wiphy->max_scan_ie_len = IWL_MAX_PROBE_REQUEST - 24 - 2;
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index 11e08c06891..ca00cc8ad4c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -308,18 +308,18 @@ static ssize_t iwl_dbgfs_nvm_read(struct file *file,
308 return -ENODATA; 308 return -ENODATA;
309 } 309 }
310 310
311 ptr = priv->eeprom;
312 if (!ptr) {
313 IWL_ERR(priv, "Invalid EEPROM/OTP memory\n");
314 return -ENOMEM;
315 }
316
311 /* 4 characters for byte 0xYY */ 317 /* 4 characters for byte 0xYY */
312 buf = kzalloc(buf_size, GFP_KERNEL); 318 buf = kzalloc(buf_size, GFP_KERNEL);
313 if (!buf) { 319 if (!buf) {
314 IWL_ERR(priv, "Can not allocate Buffer\n"); 320 IWL_ERR(priv, "Can not allocate Buffer\n");
315 return -ENOMEM; 321 return -ENOMEM;
316 } 322 }
317
318 ptr = priv->eeprom;
319 if (!ptr) {
320 IWL_ERR(priv, "Invalid EEPROM/OTP memory\n");
321 return -ENOMEM;
322 }
323 pos += scnprintf(buf + pos, buf_size - pos, "NVM Type: %s\n", 323 pos += scnprintf(buf + pos, buf_size - pos, "NVM Type: %s\n",
324 (priv->nvm_device_type == NVM_DEVICE_TYPE_OTP) 324 (priv->nvm_device_type == NVM_DEVICE_TYPE_OTP)
325 ? "OTP" : "EEPROM"); 325 ? "OTP" : "EEPROM");
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index e2d620f0b6e..650e20af20f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -258,8 +258,10 @@ struct iwl_channel_info {
258#define IWL_TX_FIFO_HCCA_2 6 258#define IWL_TX_FIFO_HCCA_2 6
259#define IWL_TX_FIFO_NONE 7 259#define IWL_TX_FIFO_NONE 7
260 260
261/* Minimum number of queues. MAX_NUM is defined in hw specific files */ 261/* Minimum number of queues. MAX_NUM is defined in hw specific files.
262#define IWL_MIN_NUM_QUEUES 4 262 * Set the minimum to accommodate the 4 standard TX queues, 1 command
263 * queue, 2 (unused) HCCA queues, and 4 HT queues (one for each AC) */
264#define IWL_MIN_NUM_QUEUES 10
263 265
264/* Power management (not Tx power) structures */ 266/* Power management (not Tx power) structures */
265 267
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index 2addf735b19..ffd5c61a755 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -566,6 +566,8 @@ int iwl_remove_default_wep_key(struct iwl_priv *priv,
566 unsigned long flags; 566 unsigned long flags;
567 567
568 spin_lock_irqsave(&priv->sta_lock, flags); 568 spin_lock_irqsave(&priv->sta_lock, flags);
569 IWL_DEBUG_WEP(priv, "Removing default WEP key: idx=%d\n",
570 keyconf->keyidx);
569 571
570 if (!test_and_clear_bit(keyconf->keyidx, &priv->ucode_key_table)) 572 if (!test_and_clear_bit(keyconf->keyidx, &priv->ucode_key_table))
571 IWL_ERR(priv, "index %d not used in uCode key table.\n", 573 IWL_ERR(priv, "index %d not used in uCode key table.\n",
@@ -573,6 +575,11 @@ int iwl_remove_default_wep_key(struct iwl_priv *priv,
573 575
574 priv->default_wep_key--; 576 priv->default_wep_key--;
575 memset(&priv->wep_keys[keyconf->keyidx], 0, sizeof(priv->wep_keys[0])); 577 memset(&priv->wep_keys[keyconf->keyidx], 0, sizeof(priv->wep_keys[0]));
578 if (iwl_is_rfkill(priv)) {
579 IWL_DEBUG_WEP(priv, "Not sending REPLY_WEPKEY command due to RFKILL.\n");
580 spin_unlock_irqrestore(&priv->sta_lock, flags);
581 return 0;
582 }
576 ret = iwl_send_static_wepkey_cmd(priv, 1); 583 ret = iwl_send_static_wepkey_cmd(priv, 1);
577 IWL_DEBUG_WEP(priv, "Remove default WEP key: idx=%d ret=%d\n", 584 IWL_DEBUG_WEP(priv, "Remove default WEP key: idx=%d ret=%d\n",
578 keyconf->keyidx, ret); 585 keyconf->keyidx, ret);
@@ -853,6 +860,11 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
853 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK; 860 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
854 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; 861 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
855 862
863 if (iwl_is_rfkill(priv)) {
864 IWL_DEBUG_WEP(priv, "Not sending REPLY_ADD_STA command because RFKILL enabled. \n");
865 spin_unlock_irqrestore(&priv->sta_lock, flags);
866 return 0;
867 }
856 ret = iwl_send_add_sta(priv, &priv->stations[sta_id].sta, CMD_ASYNC); 868 ret = iwl_send_add_sta(priv, &priv->stations[sta_id].sta, CMD_ASYNC);
857 spin_unlock_irqrestore(&priv->sta_lock, flags); 869 spin_unlock_irqrestore(&priv->sta_lock, flags);
858 return ret; 870 return ret;
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 85ae7a62109..2e89040e63b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -720,8 +720,6 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
720 goto drop_unlock; 720 goto drop_unlock;
721 } 721 }
722 722
723 spin_unlock_irqrestore(&priv->lock, flags);
724
725 hdr_len = ieee80211_hdrlen(fc); 723 hdr_len = ieee80211_hdrlen(fc);
726 724
727 /* Find (or create) index into station table for destination station */ 725 /* Find (or create) index into station table for destination station */
@@ -729,7 +727,7 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
729 if (sta_id == IWL_INVALID_STATION) { 727 if (sta_id == IWL_INVALID_STATION) {
730 IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", 728 IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
731 hdr->addr1); 729 hdr->addr1);
732 goto drop; 730 goto drop_unlock;
733 } 731 }
734 732
735 IWL_DEBUG_TX(priv, "station Id %d\n", sta_id); 733 IWL_DEBUG_TX(priv, "station Id %d\n", sta_id);
@@ -750,14 +748,17 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
750 txq_id = priv->stations[sta_id].tid[tid].agg.txq_id; 748 txq_id = priv->stations[sta_id].tid[tid].agg.txq_id;
751 swq_id = iwl_virtual_agg_queue_num(swq_id, txq_id); 749 swq_id = iwl_virtual_agg_queue_num(swq_id, txq_id);
752 } 750 }
753 priv->stations[sta_id].tid[tid].tfds_in_queue++;
754 } 751 }
755 752
756 txq = &priv->txq[txq_id]; 753 txq = &priv->txq[txq_id];
757 q = &txq->q; 754 q = &txq->q;
758 txq->swq_id = swq_id; 755 txq->swq_id = swq_id;
759 756
760 spin_lock_irqsave(&priv->lock, flags); 757 if (unlikely(iwl_queue_space(q) < q->high_mark))
758 goto drop_unlock;
759
760 if (ieee80211_is_data_qos(fc))
761 priv->stations[sta_id].tid[tid].tfds_in_queue++;
761 762
762 /* Set up driver data for this TFD */ 763 /* Set up driver data for this TFD */
763 memset(&(txq->txb[q->write_ptr]), 0, sizeof(struct iwl_tx_info)); 764 memset(&(txq->txb[q->write_ptr]), 0, sizeof(struct iwl_tx_info));
@@ -872,7 +873,8 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
872 iwl_print_hex_dump(priv, IWL_DL_TX, (u8 *)tx_cmd->hdr, hdr_len); 873 iwl_print_hex_dump(priv, IWL_DL_TX, (u8 *)tx_cmd->hdr, hdr_len);
873 874
874 /* Set up entry for this TFD in Tx byte-count array */ 875 /* Set up entry for this TFD in Tx byte-count array */
875 priv->cfg->ops->lib->txq_update_byte_cnt_tbl(priv, txq, 876 if (info->flags & IEEE80211_TX_CTL_AMPDU)
877 priv->cfg->ops->lib->txq_update_byte_cnt_tbl(priv, txq,
876 le16_to_cpu(tx_cmd->len)); 878 le16_to_cpu(tx_cmd->len));
877 879
878 pci_dma_sync_single_for_device(priv->pci_dev, txcmd_phys, 880 pci_dma_sync_single_for_device(priv->pci_dev, txcmd_phys,
@@ -901,7 +903,6 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
901 903
902drop_unlock: 904drop_unlock:
903 spin_unlock_irqrestore(&priv->lock, flags); 905 spin_unlock_irqrestore(&priv->lock, flags);
904drop:
905 return -1; 906 return -1;
906} 907}
907EXPORT_SYMBOL(iwl_tx_skb); 908EXPORT_SYMBOL(iwl_tx_skb);
@@ -1170,6 +1171,8 @@ int iwl_tx_agg_start(struct iwl_priv *priv, const u8 *ra, u16 tid, u16 *ssn)
1170 IWL_ERR(priv, "Start AGG on invalid station\n"); 1171 IWL_ERR(priv, "Start AGG on invalid station\n");
1171 return -ENXIO; 1172 return -ENXIO;
1172 } 1173 }
1174 if (unlikely(tid >= MAX_TID_COUNT))
1175 return -EINVAL;
1173 1176
1174 if (priv->stations[sta_id].tid[tid].agg.state != IWL_AGG_OFF) { 1177 if (priv->stations[sta_id].tid[tid].agg.state != IWL_AGG_OFF) {
1175 IWL_ERR(priv, "Start AGG when state is not IWL_AGG_OFF !\n"); 1178 IWL_ERR(priv, "Start AGG when state is not IWL_AGG_OFF !\n");
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index cb9bd4c8f25..523843369ca 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -3643,12 +3643,10 @@ static ssize_t show_power_level(struct device *d,
3643 struct device_attribute *attr, char *buf) 3643 struct device_attribute *attr, char *buf)
3644{ 3644{
3645 struct iwl_priv *priv = dev_get_drvdata(d); 3645 struct iwl_priv *priv = dev_get_drvdata(d);
3646 int mode = priv->power_data.user_power_setting;
3647 int level = priv->power_data.power_mode; 3646 int level = priv->power_data.power_mode;
3648 char *p = buf; 3647 char *p = buf;
3649 3648
3650 p += sprintf(p, "INDEX:%d\t", level); 3649 p += sprintf(p, "%d\n", level);
3651 p += sprintf(p, "USER:%d\n", mode);
3652 return p - buf + 1; 3650 return p - buf + 1;
3653} 3651}
3654 3652
@@ -3970,6 +3968,9 @@ static int iwl3945_setup_mac(struct iwl_priv *priv)
3970 3968
3971 hw->wiphy->custom_regulatory = true; 3969 hw->wiphy->custom_regulatory = true;
3972 3970
3971 /* Firmware does not support this */
3972 hw->wiphy->disable_beacon_hints = true;
3973
3973 hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX_3945; 3974 hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX_3945;
3974 /* we create the 802.11 header and a zero-length SSID element */ 3975 /* we create the 802.11 header and a zero-length SSID element */
3975 hw->wiphy->max_scan_ie_len = IWL_MAX_PROBE_REQUEST - 24 - 2; 3976 hw->wiphy->max_scan_ie_len = IWL_MAX_PROBE_REQUEST - 24 - 2;
@@ -4020,10 +4021,10 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
4020 SET_IEEE80211_DEV(hw, &pdev->dev); 4021 SET_IEEE80211_DEV(hw, &pdev->dev);
4021 4022
4022 if ((iwl3945_mod_params.num_of_queues > IWL39_MAX_NUM_QUEUES) || 4023 if ((iwl3945_mod_params.num_of_queues > IWL39_MAX_NUM_QUEUES) ||
4023 (iwl3945_mod_params.num_of_queues < IWL_MIN_NUM_QUEUES)) { 4024 (iwl3945_mod_params.num_of_queues < IWL39_MIN_NUM_QUEUES)) {
4024 IWL_ERR(priv, 4025 IWL_ERR(priv,
4025 "invalid queues_num, should be between %d and %d\n", 4026 "invalid queues_num, should be between %d and %d\n",
4026 IWL_MIN_NUM_QUEUES, IWL39_MAX_NUM_QUEUES); 4027 IWL39_MIN_NUM_QUEUES, IWL39_MAX_NUM_QUEUES);
4027 err = -EINVAL; 4028 err = -EINVAL;
4028 goto out_ieee80211_free_hw; 4029 goto out_ieee80211_free_hw;
4029 } 4030 }
diff --git a/drivers/net/wireless/iwmc3200wifi/commands.c b/drivers/net/wireless/iwmc3200wifi/commands.c
index 834a7f544e5..e2334d12359 100644
--- a/drivers/net/wireless/iwmc3200wifi/commands.c
+++ b/drivers/net/wireless/iwmc3200wifi/commands.c
@@ -220,6 +220,7 @@ int iwm_store_rxiq_calib_result(struct iwm_priv *iwm)
220 eeprom_rxiq = iwm_eeprom_access(iwm, IWM_EEPROM_CALIB_RXIQ); 220 eeprom_rxiq = iwm_eeprom_access(iwm, IWM_EEPROM_CALIB_RXIQ);
221 if (IS_ERR(eeprom_rxiq)) { 221 if (IS_ERR(eeprom_rxiq)) {
222 IWM_ERR(iwm, "Couldn't access EEPROM RX IQ entry\n"); 222 IWM_ERR(iwm, "Couldn't access EEPROM RX IQ entry\n");
223 kfree(rxiq);
223 return PTR_ERR(eeprom_rxiq); 224 return PTR_ERR(eeprom_rxiq);
224 } 225 }
225 226
diff --git a/drivers/net/wireless/iwmc3200wifi/netdev.c b/drivers/net/wireless/iwmc3200wifi/netdev.c
index aaa20c6885c..bf294e41753 100644
--- a/drivers/net/wireless/iwmc3200wifi/netdev.c
+++ b/drivers/net/wireless/iwmc3200wifi/netdev.c
@@ -106,10 +106,8 @@ void *iwm_if_alloc(int sizeof_bus, struct device *dev,
106 int ret = 0; 106 int ret = 0;
107 107
108 wdev = iwm_wdev_alloc(sizeof_bus, dev); 108 wdev = iwm_wdev_alloc(sizeof_bus, dev);
109 if (!wdev) { 109 if (IS_ERR(wdev))
110 dev_err(dev, "no memory for wireless device instance\n"); 110 return wdev;
111 return ERR_PTR(-ENOMEM);
112 }
113 111
114 iwm = wdev_to_iwm(wdev); 112 iwm = wdev_to_iwm(wdev);
115 iwm->bus_ops = if_ops; 113 iwm->bus_ops = if_ops;
@@ -151,8 +149,8 @@ void iwm_if_free(struct iwm_priv *iwm)
151 return; 149 return;
152 150
153 free_netdev(iwm_to_ndev(iwm)); 151 free_netdev(iwm_to_ndev(iwm));
154 iwm_wdev_free(iwm);
155 iwm_priv_deinit(iwm); 152 iwm_priv_deinit(iwm);
153 iwm_wdev_free(iwm);
156} 154}
157 155
158int iwm_if_add(struct iwm_priv *iwm) 156int iwm_if_add(struct iwm_priv *iwm)
diff --git a/drivers/net/wireless/libertas/11d.c b/drivers/net/wireless/libertas/11d.c
index 9a5408e7d94..5c6968101f0 100644
--- a/drivers/net/wireless/libertas/11d.c
+++ b/drivers/net/wireless/libertas/11d.c
@@ -47,7 +47,7 @@ static u8 lbs_region_2_code(u8 *region)
47{ 47{
48 u8 i; 48 u8 i;
49 49
50 for (i = 0; region[i] && i < COUNTRY_CODE_LEN; i++) 50 for (i = 0; i < COUNTRY_CODE_LEN && region[i]; i++)
51 region[i] = toupper(region[i]); 51 region[i] = toupper(region[i]);
52 52
53 for (i = 0; i < ARRAY_SIZE(region_code_mapping); i++) { 53 for (i = 0; i < ARRAY_SIZE(region_code_mapping); i++) {
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index b9b37411903..d6997371c27 100644
--- a/drivers/net/wireless/libertas/assoc.c
+++ b/drivers/net/wireless/libertas/assoc.c
@@ -1,6 +1,7 @@
1/* Copyright (C) 2006, Red Hat, Inc. */ 1/* Copyright (C) 2006, Red Hat, Inc. */
2 2
3#include <linux/types.h> 3#include <linux/types.h>
4#include <linux/kernel.h>
4#include <linux/etherdevice.h> 5#include <linux/etherdevice.h>
5#include <linux/ieee80211.h> 6#include <linux/ieee80211.h>
6#include <linux/if_arp.h> 7#include <linux/if_arp.h>
@@ -43,21 +44,21 @@ static int get_common_rates(struct lbs_private *priv,
43 u16 *rates_size) 44 u16 *rates_size)
44{ 45{
45 u8 *card_rates = lbs_bg_rates; 46 u8 *card_rates = lbs_bg_rates;
46 size_t num_card_rates = sizeof(lbs_bg_rates);
47 int ret = 0, i, j; 47 int ret = 0, i, j;
48 u8 tmp[30]; 48 u8 tmp[(ARRAY_SIZE(lbs_bg_rates) - 1) * (*rates_size - 1)];
49 size_t tmp_size = 0; 49 size_t tmp_size = 0;
50 50
51 /* For each rate in card_rates that exists in rate1, copy to tmp */ 51 /* For each rate in card_rates that exists in rate1, copy to tmp */
52 for (i = 0; card_rates[i] && (i < num_card_rates); i++) { 52 for (i = 0; i < ARRAY_SIZE(lbs_bg_rates) && card_rates[i]; i++) {
53 for (j = 0; rates[j] && (j < *rates_size); j++) { 53 for (j = 0; j < *rates_size && rates[j]; j++) {
54 if (rates[j] == card_rates[i]) 54 if (rates[j] == card_rates[i])
55 tmp[tmp_size++] = card_rates[i]; 55 tmp[tmp_size++] = card_rates[i];
56 } 56 }
57 } 57 }
58 58
59 lbs_deb_hex(LBS_DEB_JOIN, "AP rates ", rates, *rates_size); 59 lbs_deb_hex(LBS_DEB_JOIN, "AP rates ", rates, *rates_size);
60 lbs_deb_hex(LBS_DEB_JOIN, "card rates ", card_rates, num_card_rates); 60 lbs_deb_hex(LBS_DEB_JOIN, "card rates ", card_rates,
61 ARRAY_SIZE(lbs_bg_rates));
61 lbs_deb_hex(LBS_DEB_JOIN, "common rates", tmp, tmp_size); 62 lbs_deb_hex(LBS_DEB_JOIN, "common rates", tmp, tmp_size);
62 lbs_deb_join("TX data rate 0x%02x\n", priv->cur_rate); 63 lbs_deb_join("TX data rate 0x%02x\n", priv->cur_rate);
63 64
@@ -69,10 +70,7 @@ static int get_common_rates(struct lbs_private *priv,
69 lbs_pr_alert("Previously set fixed data rate %#x isn't " 70 lbs_pr_alert("Previously set fixed data rate %#x isn't "
70 "compatible with the network.\n", priv->cur_rate); 71 "compatible with the network.\n", priv->cur_rate);
71 ret = -1; 72 ret = -1;
72 goto done;
73 } 73 }
74 ret = 0;
75
76done: 74done:
77 memset(rates, 0, *rates_size); 75 memset(rates, 0, *rates_size);
78 *rates_size = min_t(int, tmp_size, *rates_size); 76 *rates_size = min_t(int, tmp_size, *rates_size);
@@ -322,7 +320,7 @@ static int lbs_associate(struct lbs_private *priv,
322 rates = (struct mrvl_ie_rates_param_set *) pos; 320 rates = (struct mrvl_ie_rates_param_set *) pos;
323 rates->header.type = cpu_to_le16(TLV_TYPE_RATES); 321 rates->header.type = cpu_to_le16(TLV_TYPE_RATES);
324 memcpy(&rates->rates, &bss->rates, MAX_RATES); 322 memcpy(&rates->rates, &bss->rates, MAX_RATES);
325 tmplen = MAX_RATES; 323 tmplen = min_t(u16, ARRAY_SIZE(rates->rates), MAX_RATES);
326 if (get_common_rates(priv, rates->rates, &tmplen)) { 324 if (get_common_rates(priv, rates->rates, &tmplen)) {
327 ret = -1; 325 ret = -1;
328 goto done; 326 goto done;
@@ -598,7 +596,7 @@ static int lbs_adhoc_join(struct lbs_private *priv,
598 596
599 /* Copy Data rates from the rates recorded in scan response */ 597 /* Copy Data rates from the rates recorded in scan response */
600 memset(cmd.bss.rates, 0, sizeof(cmd.bss.rates)); 598 memset(cmd.bss.rates, 0, sizeof(cmd.bss.rates));
601 ratesize = min_t(u16, sizeof(cmd.bss.rates), MAX_RATES); 599 ratesize = min_t(u16, ARRAY_SIZE(cmd.bss.rates), MAX_RATES);
602 memcpy(cmd.bss.rates, bss->rates, ratesize); 600 memcpy(cmd.bss.rates, bss->rates, ratesize);
603 if (get_common_rates(priv, cmd.bss.rates, &ratesize)) { 601 if (get_common_rates(priv, cmd.bss.rates, &ratesize)) {
604 lbs_deb_join("ADHOC_JOIN: get_common_rates returned error.\n"); 602 lbs_deb_join("ADHOC_JOIN: get_common_rates returned error.\n");
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 01db705a38e..685098148e1 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -135,8 +135,14 @@ int lbs_update_hw_spec(struct lbs_private *priv)
135 /* Clamp region code to 8-bit since FW spec indicates that it should 135 /* Clamp region code to 8-bit since FW spec indicates that it should
136 * only ever be 8-bit, even though the field size is 16-bit. Some firmware 136 * only ever be 8-bit, even though the field size is 16-bit. Some firmware
137 * returns non-zero high 8 bits here. 137 * returns non-zero high 8 bits here.
138 *
139 * Firmware version 4.0.102 used in CF8381 has region code shifted. We
140 * need to check for this problem and handle it properly.
138 */ 141 */
139 priv->regioncode = le16_to_cpu(cmd.regioncode) & 0xFF; 142 if (MRVL_FW_MAJOR_REV(priv->fwrelease) == MRVL_FW_V4)
143 priv->regioncode = (le16_to_cpu(cmd.regioncode) >> 8) & 0xFF;
144 else
145 priv->regioncode = le16_to_cpu(cmd.regioncode) & 0xFF;
140 146
141 for (i = 0; i < MRVDRV_MAX_REGION_CODE; i++) { 147 for (i = 0; i < MRVDRV_MAX_REGION_CODE; i++) {
142 /* use the region code to search for the index */ 148 /* use the region code to search for the index */
diff --git a/drivers/net/wireless/libertas/defs.h b/drivers/net/wireless/libertas/defs.h
index 48da157d6cd..72f3479a4d7 100644
--- a/drivers/net/wireless/libertas/defs.h
+++ b/drivers/net/wireless/libertas/defs.h
@@ -234,6 +234,8 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
234/** Mesh enable bit in FW capability */ 234/** Mesh enable bit in FW capability */
235#define MESH_CAPINFO_ENABLE_MASK (1<<16) 235#define MESH_CAPINFO_ENABLE_MASK (1<<16)
236 236
237/** FW definition from Marvell v4 */
238#define MRVL_FW_V4 (0x04)
237/** FW definition from Marvell v5 */ 239/** FW definition from Marvell v5 */
238#define MRVL_FW_V5 (0x05) 240#define MRVL_FW_V5 (0x05)
239/** FW definition from Marvell v10 */ 241/** FW definition from Marvell v10 */
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index 601b5424967..6c95af3023c 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -5,6 +5,7 @@
5 * for sending scan commands to the firmware. 5 * for sending scan commands to the firmware.
6 */ 6 */
7#include <linux/types.h> 7#include <linux/types.h>
8#include <linux/kernel.h>
8#include <linux/etherdevice.h> 9#include <linux/etherdevice.h>
9#include <linux/if_arp.h> 10#include <linux/if_arp.h>
10#include <asm/unaligned.h> 11#include <asm/unaligned.h>
@@ -876,7 +877,7 @@ static inline char *lbs_translate_scan(struct lbs_private *priv,
876 iwe.u.bitrate.disabled = 0; 877 iwe.u.bitrate.disabled = 0;
877 iwe.u.bitrate.value = 0; 878 iwe.u.bitrate.value = 0;
878 879
879 for (j = 0; bss->rates[j] && (j < sizeof(bss->rates)); j++) { 880 for (j = 0; j < ARRAY_SIZE(bss->rates) && bss->rates[j]; j++) {
880 /* Bit rate given in 500 kb/s units */ 881 /* Bit rate given in 500 kb/s units */
881 iwe.u.bitrate.value = bss->rates[j] * 500000; 882 iwe.u.bitrate.value = bss->rates[j] * 500000;
882 current_val = iwe_stream_add_value(info, start, current_val, 883 current_val = iwe_stream_add_value(info, start, current_val,
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index a111bda392e..7916ca3f84c 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -709,7 +709,7 @@ static const struct ieee80211_ops mac80211_hwsim_ops =
709static void mac80211_hwsim_free(void) 709static void mac80211_hwsim_free(void)
710{ 710{
711 struct list_head tmplist, *i, *tmp; 711 struct list_head tmplist, *i, *tmp;
712 struct mac80211_hwsim_data *data; 712 struct mac80211_hwsim_data *data, *tmpdata;
713 713
714 INIT_LIST_HEAD(&tmplist); 714 INIT_LIST_HEAD(&tmplist);
715 715
@@ -718,7 +718,7 @@ static void mac80211_hwsim_free(void)
718 list_move(i, &tmplist); 718 list_move(i, &tmplist);
719 spin_unlock_bh(&hwsim_radio_lock); 719 spin_unlock_bh(&hwsim_radio_lock);
720 720
721 list_for_each_entry(data, &tmplist, list) { 721 list_for_each_entry_safe(data, tmpdata, &tmplist, list) {
722 debugfs_remove(data->debugfs_group); 722 debugfs_remove(data->debugfs_group);
723 debugfs_remove(data->debugfs_ps); 723 debugfs_remove(data->debugfs_ps);
724 debugfs_remove(data->debugfs); 724 debugfs_remove(data->debugfs);
@@ -1167,8 +1167,8 @@ static void __exit exit_mac80211_hwsim(void)
1167{ 1167{
1168 printk(KERN_DEBUG "mac80211_hwsim: unregister radios\n"); 1168 printk(KERN_DEBUG "mac80211_hwsim: unregister radios\n");
1169 1169
1170 unregister_netdev(hwsim_mon);
1171 mac80211_hwsim_free(); 1170 mac80211_hwsim_free();
1171 unregister_netdev(hwsim_mon);
1172} 1172}
1173 1173
1174 1174
diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c
index 83116baeb11..72c7dbd39d0 100644
--- a/drivers/net/wireless/p54/p54spi.c
+++ b/drivers/net/wireless/p54/p54spi.c
@@ -635,7 +635,7 @@ static int __devinit p54spi_probe(struct spi_device *spi)
635 635
636 hw = p54_init_common(sizeof(*priv)); 636 hw = p54_init_common(sizeof(*priv));
637 if (!hw) { 637 if (!hw) {
638 dev_err(&priv->spi->dev, "could not alloc ieee80211_hw"); 638 dev_err(&spi->dev, "could not alloc ieee80211_hw");
639 return -ENOMEM; 639 return -ENOMEM;
640 } 640 }
641 641
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 66daf68ff0e..ce75426764a 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -1550,7 +1550,9 @@ static int rt2500usb_init_eeprom(struct rt2x00_dev *rt2x00dev)
1550 rt2500usb_register_read(rt2x00dev, MAC_CSR0, &reg); 1550 rt2500usb_register_read(rt2x00dev, MAC_CSR0, &reg);
1551 rt2x00_set_chip(rt2x00dev, RT2570, value, reg); 1551 rt2x00_set_chip(rt2x00dev, RT2570, value, reg);
1552 1552
1553 if (!rt2x00_check_rev(&rt2x00dev->chip, 0x000ffff0, 0)) { 1553 if (!rt2x00_check_rev(&rt2x00dev->chip, 0x000ffff0, 0) ||
1554 rt2x00_check_rev(&rt2x00dev->chip, 0x0000000f, 0)) {
1555
1554 ERROR(rt2x00dev, "Invalid RT chipset detected.\n"); 1556 ERROR(rt2x00dev, "Invalid RT chipset detected.\n");
1555 return -ENODEV; 1557 return -ENODEV;
1556 } 1558 }
diff --git a/drivers/net/wireless/rtl818x/rtl8187_leds.c b/drivers/net/wireless/rtl818x/rtl8187_leds.c
index b4425359224..cf9f899fe0e 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_leds.c
+++ b/drivers/net/wireless/rtl818x/rtl8187_leds.c
@@ -208,11 +208,12 @@ void rtl8187_leds_exit(struct ieee80211_hw *dev)
208{ 208{
209 struct rtl8187_priv *priv = dev->priv; 209 struct rtl8187_priv *priv = dev->priv;
210 210
211 rtl8187_unregister_led(&priv->led_tx);
212 /* turn the LED off before exiting */ 211 /* turn the LED off before exiting */
213 queue_delayed_work(dev->workqueue, &priv->led_off, 0); 212 queue_delayed_work(dev->workqueue, &priv->led_off, 0);
214 cancel_delayed_work_sync(&priv->led_off); 213 cancel_delayed_work_sync(&priv->led_off);
214 cancel_delayed_work_sync(&priv->led_on);
215 rtl8187_unregister_led(&priv->led_rx); 215 rtl8187_unregister_led(&priv->led_rx);
216 rtl8187_unregister_led(&priv->led_tx);
216} 217}
217#endif /* def CONFIG_RTL8187_LED */ 218#endif /* def CONFIG_RTL8187_LED */
218 219
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index 40b07b98822..3bd3c779fff 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -698,7 +698,7 @@ int zd_mac_rx(struct ieee80211_hw *hw, const u8 *buffer, unsigned int length)
698 && !mac->pass_ctrl) 698 && !mac->pass_ctrl)
699 return 0; 699 return 0;
700 700
701 fc = *(__le16 *)buffer; 701 fc = get_unaligned((__le16*)buffer);
702 need_padding = ieee80211_is_data_qos(fc) ^ ieee80211_has_a4(fc); 702 need_padding = ieee80211_is_data_qos(fc) ^ ieee80211_has_a4(fc);
703 703
704 skb = dev_alloc_skb(length + (need_padding ? 2 : 0)); 704 skb = dev_alloc_skb(length + (need_padding ? 2 : 0));
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index aee967d7f76..bacaa536fd5 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -9,6 +9,10 @@
9 * out of the OpenFirmware device tree and using it to populate an mii_bus. 9 * out of the OpenFirmware device tree and using it to populate an mii_bus.
10 */ 10 */
11 11
12#include <linux/kernel.h>
13#include <linux/device.h>
14#include <linux/netdevice.h>
15#include <linux/err.h>
12#include <linux/phy.h> 16#include <linux/phy.h>
13#include <linux/of.h> 17#include <linux/of.h>
14#include <linux/of_mdio.h> 18#include <linux/of_mdio.h>
@@ -137,3 +141,41 @@ struct phy_device *of_phy_connect(struct net_device *dev,
137 return phy_connect_direct(dev, phy, hndlr, flags, iface) ? NULL : phy; 141 return phy_connect_direct(dev, phy, hndlr, flags, iface) ? NULL : phy;
138} 142}
139EXPORT_SYMBOL(of_phy_connect); 143EXPORT_SYMBOL(of_phy_connect);
144
145/**
146 * of_phy_connect_fixed_link - Parse fixed-link property and return a dummy phy
147 * @dev: pointer to net_device claiming the phy
148 * @hndlr: Link state callback for the network device
149 * @iface: PHY data interface type
150 *
151 * This function is a temporary stop-gap and will be removed soon. It is
152 * only to support the fs_enet, ucc_geth and gianfar Ethernet drivers. Do
153 * not call this function from new drivers.
154 */
155struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
156 void (*hndlr)(struct net_device *),
157 phy_interface_t iface)
158{
159 struct device_node *net_np;
160 char bus_id[MII_BUS_ID_SIZE + 3];
161 struct phy_device *phy;
162 const u32 *phy_id;
163 int sz;
164
165 if (!dev->dev.parent)
166 return NULL;
167
168 net_np = dev_archdata_get_node(&dev->dev.parent->archdata);
169 if (!net_np)
170 return NULL;
171
172 phy_id = of_get_property(net_np, "fixed-link", &sz);
173 if (!phy_id || sz < sizeof(*phy_id))
174 return NULL;
175
176 sprintf(bus_id, PHY_ID_FMT, "0", phy_id[0]);
177
178 phy = phy_connect(dev, bus_id, hndlr, 0, iface);
179 return IS_ERR(phy) ? NULL : phy;
180}
181EXPORT_SYMBOL(of_phy_connect_fixed_link);
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c
index 0f0e0b919ef..a45b0c0d574 100644
--- a/drivers/parisc/ccio-dma.c
+++ b/drivers/parisc/ccio-dma.c
@@ -70,7 +70,6 @@
70#undef CCIO_COLLECT_STATS 70#undef CCIO_COLLECT_STATS
71#endif 71#endif
72 72
73#include <linux/proc_fs.h>
74#include <asm/runway.h> /* for proc_runway_root */ 73#include <asm/runway.h> /* for proc_runway_root */
75 74
76#ifdef DEBUG_CCIO_INIT 75#ifdef DEBUG_CCIO_INIT
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c
index c590974e981..d69bde6a234 100644
--- a/drivers/parisc/dino.c
+++ b/drivers/parisc/dino.c
@@ -614,7 +614,7 @@ dino_fixup_bus(struct pci_bus *bus)
614 dev_name(&bus->self->dev), i, 614 dev_name(&bus->self->dev), i,
615 bus->self->resource[i].start, 615 bus->self->resource[i].start,
616 bus->self->resource[i].end); 616 bus->self->resource[i].end);
617 pci_assign_resource(bus->self, i); 617 WARN_ON(pci_assign_resource(bus->self, i));
618 DBG("DEBUG %s after assign %d [0x%lx,0x%lx]\n", 618 DBG("DEBUG %s after assign %d [0x%lx,0x%lx]\n",
619 dev_name(&bus->self->dev), i, 619 dev_name(&bus->self->dev), i,
620 bus->self->resource[i].start, 620 bus->self->resource[i].start,
diff --git a/drivers/parisc/eisa_eeprom.c b/drivers/parisc/eisa_eeprom.c
index 685d94e69d4..8c0b26e9b98 100644
--- a/drivers/parisc/eisa_eeprom.c
+++ b/drivers/parisc/eisa_eeprom.c
@@ -55,7 +55,7 @@ static ssize_t eisa_eeprom_read(struct file * file,
55 ssize_t ret; 55 ssize_t ret;
56 int i; 56 int i;
57 57
58 if (*ppos >= HPEE_MAX_LENGTH) 58 if (*ppos < 0 || *ppos >= HPEE_MAX_LENGTH)
59 return 0; 59 return 0;
60 60
61 count = *ppos + count < HPEE_MAX_LENGTH ? count : HPEE_MAX_LENGTH - *ppos; 61 count = *ppos + count < HPEE_MAX_LENGTH ? count : HPEE_MAX_LENGTH - *ppos;
diff --git a/drivers/parisc/hppb.c b/drivers/parisc/hppb.c
index 13856415b43..815db175d42 100644
--- a/drivers/parisc/hppb.c
+++ b/drivers/parisc/hppb.c
@@ -62,7 +62,8 @@ static int hppb_probe(struct parisc_device *dev)
62 } 62 }
63 card = card->next; 63 card = card->next;
64 } 64 }
65 printk(KERN_INFO "Found GeckoBoa at 0x%x\n", dev->hpa.start); 65 printk(KERN_INFO "Found GeckoBoa at 0x%llx\n",
66 (unsigned long long) dev->hpa.start);
66 67
67 card->hpa = dev->hpa.start; 68 card->hpa = dev->hpa.start;
68 card->mmio_region.name = "HP-PB Bus"; 69 card->mmio_region.name = "HP-PB Bus";
@@ -73,8 +74,10 @@ static int hppb_probe(struct parisc_device *dev)
73 74
74 status = ccio_request_resource(dev, &card->mmio_region); 75 status = ccio_request_resource(dev, &card->mmio_region);
75 if(status < 0) { 76 if(status < 0) {
76 printk(KERN_ERR "%s: failed to claim HP-PB bus space (%08x, %08x)\n", 77 printk(KERN_ERR "%s: failed to claim HP-PB "
77 __FILE__, card->mmio_region.start, card->mmio_region.end); 78 "bus space (0x%08llx, 0x%08llx)\n",
79 __FILE__, (unsigned long long) card->mmio_region.start,
80 (unsigned long long) card->mmio_region.end);
78 } 81 }
79 82
80 return 0; 83 return 0;
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c
index ede614616f8..3aeb3279c92 100644
--- a/drivers/parisc/lba_pci.c
+++ b/drivers/parisc/lba_pci.c
@@ -992,7 +992,7 @@ lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
992 return; 992 return;
993 993
994 io_pdc_cell = kzalloc(sizeof(pdc_pat_cell_mod_maddr_block_t), GFP_KERNEL); 994 io_pdc_cell = kzalloc(sizeof(pdc_pat_cell_mod_maddr_block_t), GFP_KERNEL);
995 if (!pa_pdc_cell) { 995 if (!io_pdc_cell) {
996 kfree(pa_pdc_cell); 996 kfree(pa_pdc_cell);
997 return; 997 return;
998 } 998 }
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c
index f9f9a5f1bbd..13a64bc081b 100644
--- a/drivers/parisc/pdc_stable.c
+++ b/drivers/parisc/pdc_stable.c
@@ -370,7 +370,7 @@ pdcspath_layer_read(struct pdcspath_entry *entry, char *buf)
370 if (!i) /* entry is not ready */ 370 if (!i) /* entry is not ready */
371 return -ENODATA; 371 return -ENODATA;
372 372
373 for (i = 0; devpath->layers[i] && (likely(i < 6)); i++) 373 for (i = 0; i < 6 && devpath->layers[i]; i++)
374 out += sprintf(out, "%u ", devpath->layers[i]); 374 out += sprintf(out, "%u ", devpath->layers[i]);
375 375
376 out += sprintf(out, "\n"); 376 out += sprintf(out, "\n");
diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c
index a4494d78e7c..8aebe1e9d3d 100644
--- a/drivers/pci/hotplug/sgi_hotplug.c
+++ b/drivers/pci/hotplug/sgi_hotplug.c
@@ -90,11 +90,10 @@ static struct hotplug_slot_ops sn_hotplug_slot_ops = {
90 90
91static DEFINE_MUTEX(sn_hotplug_mutex); 91static DEFINE_MUTEX(sn_hotplug_mutex);
92 92
93static ssize_t path_show (struct hotplug_slot *bss_hotplug_slot, 93static ssize_t path_show(struct pci_slot *pci_slot, char *buf)
94 char *buf)
95{ 94{
96 int retval = -ENOENT; 95 int retval = -ENOENT;
97 struct slot *slot = bss_hotplug_slot->private; 96 struct slot *slot = pci_slot->hotplug->private;
98 97
99 if (!slot) 98 if (!slot)
100 return retval; 99 return retval;
@@ -103,7 +102,7 @@ static ssize_t path_show (struct hotplug_slot *bss_hotplug_slot,
103 return retval; 102 return retval;
104} 103}
105 104
106static struct hotplug_slot_attribute sn_slot_path_attr = __ATTR_RO(path); 105static struct pci_slot_attribute sn_slot_path_attr = __ATTR_RO(path);
107 106
108static int sn_pci_slot_valid(struct pci_bus *pci_bus, int device) 107static int sn_pci_slot_valid(struct pci_bus *pci_bus, int device)
109{ 108{
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index ebc9b8dca88..2314ad7ee5f 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -1505,7 +1505,6 @@ static int domain_context_mapping_one(struct dmar_domain *domain, int segment,
1505 } 1505 }
1506 1506
1507 set_bit(num, iommu->domain_ids); 1507 set_bit(num, iommu->domain_ids);
1508 set_bit(iommu->seq_id, &domain->iommu_bmp);
1509 iommu->domains[num] = domain; 1508 iommu->domains[num] = domain;
1510 id = num; 1509 id = num;
1511 } 1510 }
@@ -1648,6 +1647,14 @@ static int domain_context_mapped(struct pci_dev *pdev)
1648 tmp->devfn); 1647 tmp->devfn);
1649} 1648}
1650 1649
1650/* Returns a number of VTD pages, but aligned to MM page size */
1651static inline unsigned long aligned_nrpages(unsigned long host_addr,
1652 size_t size)
1653{
1654 host_addr &= ~PAGE_MASK;
1655 return PAGE_ALIGN(host_addr + size) >> VTD_PAGE_SHIFT;
1656}
1657
1651static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn, 1658static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn,
1652 struct scatterlist *sg, unsigned long phys_pfn, 1659 struct scatterlist *sg, unsigned long phys_pfn,
1653 unsigned long nr_pages, int prot) 1660 unsigned long nr_pages, int prot)
@@ -1675,7 +1682,7 @@ static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn,
1675 uint64_t tmp; 1682 uint64_t tmp;
1676 1683
1677 if (!sg_res) { 1684 if (!sg_res) {
1678 sg_res = (sg->offset + sg->length + VTD_PAGE_SIZE - 1) >> VTD_PAGE_SHIFT; 1685 sg_res = aligned_nrpages(sg->offset, sg->length);
1679 sg->dma_address = ((dma_addr_t)iov_pfn << VTD_PAGE_SHIFT) + sg->offset; 1686 sg->dma_address = ((dma_addr_t)iov_pfn << VTD_PAGE_SHIFT) + sg->offset;
1680 sg->dma_length = sg->length; 1687 sg->dma_length = sg->length;
1681 pteval = page_to_phys(sg_page(sg)) | prot; 1688 pteval = page_to_phys(sg_page(sg)) | prot;
@@ -2415,14 +2422,6 @@ error:
2415 return ret; 2422 return ret;
2416} 2423}
2417 2424
2418/* Returns a number of VTD pages, but aligned to MM page size */
2419static inline unsigned long aligned_nrpages(unsigned long host_addr,
2420 size_t size)
2421{
2422 host_addr &= ~PAGE_MASK;
2423 return PAGE_ALIGN(host_addr + size) >> VTD_PAGE_SHIFT;
2424}
2425
2426/* This takes a number of _MM_ pages, not VTD pages */ 2425/* This takes a number of _MM_ pages, not VTD pages */
2427static struct iova *intel_alloc_iova(struct device *dev, 2426static struct iova *intel_alloc_iova(struct device *dev,
2428 struct dmar_domain *domain, 2427 struct dmar_domain *domain,
@@ -2551,6 +2550,7 @@ static dma_addr_t __intel_map_single(struct device *hwdev, phys_addr_t paddr,
2551 int prot = 0; 2550 int prot = 0;
2552 int ret; 2551 int ret;
2553 struct intel_iommu *iommu; 2552 struct intel_iommu *iommu;
2553 unsigned long paddr_pfn = paddr >> PAGE_SHIFT;
2554 2554
2555 BUG_ON(dir == DMA_NONE); 2555 BUG_ON(dir == DMA_NONE);
2556 2556
@@ -2585,7 +2585,7 @@ static dma_addr_t __intel_map_single(struct device *hwdev, phys_addr_t paddr,
2585 * is not a big problem 2585 * is not a big problem
2586 */ 2586 */
2587 ret = domain_pfn_mapping(domain, mm_to_dma_pfn(iova->pfn_lo), 2587 ret = domain_pfn_mapping(domain, mm_to_dma_pfn(iova->pfn_lo),
2588 paddr >> VTD_PAGE_SHIFT, size, prot); 2588 mm_to_dma_pfn(paddr_pfn), size, prot);
2589 if (ret) 2589 if (ret)
2590 goto error; 2590 goto error;
2591 2591
@@ -2875,7 +2875,7 @@ static int intel_map_sg(struct device *hwdev, struct scatterlist *sglist, int ne
2875 2875
2876 start_vpfn = mm_to_dma_pfn(iova->pfn_lo); 2876 start_vpfn = mm_to_dma_pfn(iova->pfn_lo);
2877 2877
2878 ret = domain_sg_mapping(domain, start_vpfn, sglist, mm_to_dma_pfn(size), prot); 2878 ret = domain_sg_mapping(domain, start_vpfn, sglist, size, prot);
2879 if (unlikely(ret)) { 2879 if (unlikely(ret)) {
2880 /* clear the page */ 2880 /* clear the page */
2881 dma_pte_clear_range(domain, start_vpfn, 2881 dma_pte_clear_range(domain, start_vpfn,
@@ -3408,6 +3408,7 @@ static int md_domain_init(struct dmar_domain *domain, int guest_width)
3408 3408
3409 domain->iommu_count = 0; 3409 domain->iommu_count = 0;
3410 domain->iommu_coherency = 0; 3410 domain->iommu_coherency = 0;
3411 domain->iommu_snooping = 0;
3411 domain->max_addr = 0; 3412 domain->max_addr = 0;
3412 3413
3413 /* always allocate the top pgd */ 3414 /* always allocate the top pgd */
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index b711fb7181e..1898c7b4790 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -100,16 +100,16 @@ int pci_claim_resource(struct pci_dev *dev, int resource)
100{ 100{
101 struct resource *res = &dev->resource[resource]; 101 struct resource *res = &dev->resource[resource];
102 struct resource *root; 102 struct resource *root;
103 char *dtype = resource < PCI_BRIDGE_RESOURCES ? "device" : "bridge";
104 int err; 103 int err;
105 104
106 root = pci_find_parent_resource(dev, res); 105 root = pci_find_parent_resource(dev, res);
107 106
108 err = -EINVAL; 107 err = -EINVAL;
109 if (root != NULL) 108 if (root != NULL)
110 err = insert_resource(root, res); 109 err = request_resource(root, res);
111 110
112 if (err) { 111 if (err) {
112 const char *dtype = resource < PCI_BRIDGE_RESOURCES ? "device" : "bridge";
113 dev_err(&dev->dev, "BAR %d: %s of %s %pR\n", 113 dev_err(&dev->dev, "BAR %d: %s of %s %pR\n",
114 resource, 114 resource,
115 root ? "address space collision on" : 115 root ? "address space collision on" :
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 46dad12f952..77c6097ced8 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -277,31 +277,6 @@ config THINKPAD_ACPI_UNSAFE_LEDS
277 Say N here, unless you are building a kernel for your own 277 Say N here, unless you are building a kernel for your own
278 use, and need to control the important firmware LEDs. 278 use, and need to control the important firmware LEDs.
279 279
280config THINKPAD_ACPI_DOCK
281 bool "Legacy Docking Station Support"
282 depends on THINKPAD_ACPI
283 depends on ACPI_DOCK=n
284 default n
285 ---help---
286 Allows the thinkpad_acpi driver to handle docking station events.
287 This support was made obsolete by the generic ACPI docking station
288 support (CONFIG_ACPI_DOCK). It will allow locking and removing the
289 laptop from the docking station, but will not properly connect PCI
290 devices.
291
292 If you are not sure, say N here.
293
294config THINKPAD_ACPI_BAY
295 bool "Legacy Removable Bay Support"
296 depends on THINKPAD_ACPI
297 default y
298 ---help---
299 Allows the thinkpad_acpi driver to handle removable bays. It will
300 electrically disable the device in the bay, and also generate
301 notifications when the bay lever is ejected or inserted.
302
303 If you are not sure, say Y here.
304
305config THINKPAD_ACPI_VIDEO 280config THINKPAD_ACPI_VIDEO
306 bool "Video output control support" 281 bool "Video output control support"
307 depends on THINKPAD_ACPI 282 depends on THINKPAD_ACPI
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index be2fd6f9163..fb45f5ee8df 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -973,7 +973,7 @@ static int acer_rfkill_set(void *data, bool blocked)
973{ 973{
974 acpi_status status; 974 acpi_status status;
975 u32 cap = (unsigned long)data; 975 u32 cap = (unsigned long)data;
976 status = set_u32(!!blocked, cap); 976 status = set_u32(!blocked, cap);
977 if (ACPI_FAILURE(status)) 977 if (ACPI_FAILURE(status))
978 return -ENODEV; 978 return -ENODEV;
979 return 0; 979 return 0;
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index ec560f16d72..222ffb892f2 100644
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -143,6 +143,7 @@ struct eeepc_hotk {
143 struct rfkill *bluetooth_rfkill; 143 struct rfkill *bluetooth_rfkill;
144 struct rfkill *wwan3g_rfkill; 144 struct rfkill *wwan3g_rfkill;
145 struct hotplug_slot *hotplug_slot; 145 struct hotplug_slot *hotplug_slot;
146 struct work_struct hotplug_work;
146}; 147};
147 148
148/* The actual device the driver binds to */ 149/* The actual device the driver binds to */
@@ -660,7 +661,7 @@ static int eeepc_get_adapter_status(struct hotplug_slot *hotplug_slot,
660 return 0; 661 return 0;
661} 662}
662 663
663static void eeepc_rfkill_hotplug(void) 664static void eeepc_hotplug_work(struct work_struct *work)
664{ 665{
665 struct pci_dev *dev; 666 struct pci_dev *dev;
666 struct pci_bus *bus = pci_find_bus(0, 1); 667 struct pci_bus *bus = pci_find_bus(0, 1);
@@ -701,7 +702,7 @@ static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data)
701 if (event != ACPI_NOTIFY_BUS_CHECK) 702 if (event != ACPI_NOTIFY_BUS_CHECK)
702 return; 703 return;
703 704
704 eeepc_rfkill_hotplug(); 705 schedule_work(&ehotk->hotplug_work);
705} 706}
706 707
707static void eeepc_hotk_notify(struct acpi_device *device, u32 event) 708static void eeepc_hotk_notify(struct acpi_device *device, u32 event)
@@ -892,7 +893,7 @@ static int eeepc_hotk_resume(struct acpi_device *device)
892 893
893 rfkill_set_sw_state(ehotk->wlan_rfkill, wlan != 1); 894 rfkill_set_sw_state(ehotk->wlan_rfkill, wlan != 1);
894 895
895 eeepc_rfkill_hotplug(); 896 schedule_work(&ehotk->hotplug_work);
896 } 897 }
897 898
898 if (ehotk->bluetooth_rfkill) 899 if (ehotk->bluetooth_rfkill)
@@ -1093,6 +1094,8 @@ static int eeepc_rfkill_init(struct device *dev)
1093{ 1094{
1094 int result = 0; 1095 int result = 0;
1095 1096
1097 INIT_WORK(&ehotk->hotplug_work, eeepc_hotplug_work);
1098
1096 eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P6"); 1099 eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P6");
1097 eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P7"); 1100 eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P7");
1098 1101
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index ca508564a18..a2ad53e1587 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -520,11 +520,13 @@ static int hp_wmi_resume_handler(struct platform_device *device)
520 * the input layer will only actually pass it on if the state 520 * the input layer will only actually pass it on if the state
521 * changed. 521 * changed.
522 */ 522 */
523 523 if (hp_wmi_input_dev) {
524 input_report_switch(hp_wmi_input_dev, SW_DOCK, hp_wmi_dock_state()); 524 input_report_switch(hp_wmi_input_dev, SW_DOCK,
525 input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE, 525 hp_wmi_dock_state());
526 hp_wmi_tablet_state()); 526 input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
527 input_sync(hp_wmi_input_dev); 527 hp_wmi_tablet_state());
528 input_sync(hp_wmi_input_dev);
529 }
528 530
529 return 0; 531 return 0;
530} 532}
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index a463fd72c49..e8560085250 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -239,12 +239,6 @@ struct ibm_init_struct {
239}; 239};
240 240
241static struct { 241static struct {
242#ifdef CONFIG_THINKPAD_ACPI_BAY
243 u32 bay_status:1;
244 u32 bay_eject:1;
245 u32 bay_status2:1;
246 u32 bay_eject2:1;
247#endif
248 u32 bluetooth:1; 242 u32 bluetooth:1;
249 u32 hotkey:1; 243 u32 hotkey:1;
250 u32 hotkey_mask:1; 244 u32 hotkey_mask:1;
@@ -589,18 +583,6 @@ static int acpi_ec_write(int i, u8 v)
589 return 1; 583 return 1;
590} 584}
591 585
592#if defined(CONFIG_THINKPAD_ACPI_DOCK) || defined(CONFIG_THINKPAD_ACPI_BAY)
593static int _sta(acpi_handle handle)
594{
595 int status;
596
597 if (!handle || !acpi_evalf(handle, &status, "_STA", "d"))
598 status = 0;
599
600 return status;
601}
602#endif
603
604static int issue_thinkpad_cmos_command(int cmos_cmd) 586static int issue_thinkpad_cmos_command(int cmos_cmd)
605{ 587{
606 if (!cmos_handle) 588 if (!cmos_handle)
@@ -784,6 +766,8 @@ static int dispatch_procfs_write(struct file *file,
784 766
785 if (!ibm || !ibm->write) 767 if (!ibm || !ibm->write)
786 return -EINVAL; 768 return -EINVAL;
769 if (count > PAGE_SIZE - 2)
770 return -EINVAL;
787 771
788 kernbuf = kmalloc(count + 2, GFP_KERNEL); 772 kernbuf = kmalloc(count + 2, GFP_KERNEL);
789 if (!kernbuf) 773 if (!kernbuf)
@@ -4442,293 +4426,6 @@ static struct ibm_struct light_driver_data = {
4442}; 4426};
4443 4427
4444/************************************************************************* 4428/*************************************************************************
4445 * Dock subdriver
4446 */
4447
4448#ifdef CONFIG_THINKPAD_ACPI_DOCK
4449
4450static void dock_notify(struct ibm_struct *ibm, u32 event);
4451static int dock_read(char *p);
4452static int dock_write(char *buf);
4453
4454TPACPI_HANDLE(dock, root, "\\_SB.GDCK", /* X30, X31, X40 */
4455 "\\_SB.PCI0.DOCK", /* 600e/x,770e,770x,A2xm/p,T20-22,X20-21 */
4456 "\\_SB.PCI0.PCI1.DOCK", /* all others */
4457 "\\_SB.PCI.ISA.SLCE", /* 570 */
4458 ); /* A21e,G4x,R30,R31,R32,R40,R40e,R50e */
4459
4460/* don't list other alternatives as we install a notify handler on the 570 */
4461TPACPI_HANDLE(pci, root, "\\_SB.PCI"); /* 570 */
4462
4463static const struct acpi_device_id ibm_pci_device_ids[] = {
4464 {PCI_ROOT_HID_STRING, 0},
4465 {"", 0},
4466};
4467
4468static struct tp_acpi_drv_struct ibm_dock_acpidriver[2] = {
4469 {
4470 .notify = dock_notify,
4471 .handle = &dock_handle,
4472 .type = ACPI_SYSTEM_NOTIFY,
4473 },
4474 {
4475 /* THIS ONE MUST NEVER BE USED FOR DRIVER AUTOLOADING.
4476 * We just use it to get notifications of dock hotplug
4477 * in very old thinkpads */
4478 .hid = ibm_pci_device_ids,
4479 .notify = dock_notify,
4480 .handle = &pci_handle,
4481 .type = ACPI_SYSTEM_NOTIFY,
4482 },
4483};
4484
4485static struct ibm_struct dock_driver_data[2] = {
4486 {
4487 .name = "dock",
4488 .read = dock_read,
4489 .write = dock_write,
4490 .acpi = &ibm_dock_acpidriver[0],
4491 },
4492 {
4493 .name = "dock",
4494 .acpi = &ibm_dock_acpidriver[1],
4495 },
4496};
4497
4498#define dock_docked() (_sta(dock_handle) & 1)
4499
4500static int __init dock_init(struct ibm_init_struct *iibm)
4501{
4502 vdbg_printk(TPACPI_DBG_INIT, "initializing dock subdriver\n");
4503
4504 TPACPI_ACPIHANDLE_INIT(dock);
4505
4506 vdbg_printk(TPACPI_DBG_INIT, "dock is %s\n",
4507 str_supported(dock_handle != NULL));
4508
4509 return (dock_handle)? 0 : 1;
4510}
4511
4512static int __init dock_init2(struct ibm_init_struct *iibm)
4513{
4514 int dock2_needed;
4515
4516 vdbg_printk(TPACPI_DBG_INIT, "initializing dock subdriver part 2\n");
4517
4518 if (dock_driver_data[0].flags.acpi_driver_registered &&
4519 dock_driver_data[0].flags.acpi_notify_installed) {
4520 TPACPI_ACPIHANDLE_INIT(pci);
4521 dock2_needed = (pci_handle != NULL);
4522 vdbg_printk(TPACPI_DBG_INIT,
4523 "dock PCI handler for the TP 570 is %s\n",
4524 str_supported(dock2_needed));
4525 } else {
4526 vdbg_printk(TPACPI_DBG_INIT,
4527 "dock subdriver part 2 not required\n");
4528 dock2_needed = 0;
4529 }
4530
4531 return (dock2_needed)? 0 : 1;
4532}
4533
4534static void dock_notify(struct ibm_struct *ibm, u32 event)
4535{
4536 int docked = dock_docked();
4537 int pci = ibm->acpi->hid && ibm->acpi->device &&
4538 acpi_match_device_ids(ibm->acpi->device, ibm_pci_device_ids);
4539 int data;
4540
4541 if (event == 1 && !pci) /* 570 */
4542 data = 1; /* button */
4543 else if (event == 1 && pci) /* 570 */
4544 data = 3; /* dock */
4545 else if (event == 3 && docked)
4546 data = 1; /* button */
4547 else if (event == 3 && !docked)
4548 data = 2; /* undock */
4549 else if (event == 0 && docked)
4550 data = 3; /* dock */
4551 else {
4552 printk(TPACPI_ERR "unknown dock event %d, status %d\n",
4553 event, _sta(dock_handle));
4554 data = 0; /* unknown */
4555 }
4556 acpi_bus_generate_proc_event(ibm->acpi->device, event, data);
4557 acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class,
4558 dev_name(&ibm->acpi->device->dev),
4559 event, data);
4560}
4561
4562static int dock_read(char *p)
4563{
4564 int len = 0;
4565 int docked = dock_docked();
4566
4567 if (!dock_handle)
4568 len += sprintf(p + len, "status:\t\tnot supported\n");
4569 else if (!docked)
4570 len += sprintf(p + len, "status:\t\tundocked\n");
4571 else {
4572 len += sprintf(p + len, "status:\t\tdocked\n");
4573 len += sprintf(p + len, "commands:\tdock, undock\n");
4574 }
4575
4576 return len;
4577}
4578
4579static int dock_write(char *buf)
4580{
4581 char *cmd;
4582
4583 if (!dock_docked())
4584 return -ENODEV;
4585
4586 while ((cmd = next_cmd(&buf))) {
4587 if (strlencmp(cmd, "undock") == 0) {
4588 if (!acpi_evalf(dock_handle, NULL, "_DCK", "vd", 0) ||
4589 !acpi_evalf(dock_handle, NULL, "_EJ0", "vd", 1))
4590 return -EIO;
4591 } else if (strlencmp(cmd, "dock") == 0) {
4592 if (!acpi_evalf(dock_handle, NULL, "_DCK", "vd", 1))
4593 return -EIO;
4594 } else
4595 return -EINVAL;
4596 }
4597
4598 return 0;
4599}
4600
4601#endif /* CONFIG_THINKPAD_ACPI_DOCK */
4602
4603/*************************************************************************
4604 * Bay subdriver
4605 */
4606
4607#ifdef CONFIG_THINKPAD_ACPI_BAY
4608
4609TPACPI_HANDLE(bay, root, "\\_SB.PCI.IDE.SECN.MAST", /* 570 */
4610 "\\_SB.PCI0.IDE0.IDES.IDSM", /* 600e/x, 770e, 770x */
4611 "\\_SB.PCI0.SATA.SCND.MSTR", /* T60, X60, Z60 */
4612 "\\_SB.PCI0.IDE0.SCND.MSTR", /* all others */
4613 ); /* A21e, R30, R31 */
4614TPACPI_HANDLE(bay_ej, bay, "_EJ3", /* 600e/x, A2xm/p, A3x */
4615 "_EJ0", /* all others */
4616 ); /* 570,A21e,G4x,R30,R31,R32,R40e,R50e */
4617TPACPI_HANDLE(bay2, root, "\\_SB.PCI0.IDE0.PRIM.SLAV", /* A3x, R32 */
4618 "\\_SB.PCI0.IDE0.IDEP.IDPS", /* 600e/x, 770e, 770x */
4619 ); /* all others */
4620TPACPI_HANDLE(bay2_ej, bay2, "_EJ3", /* 600e/x, 770e, A3x */
4621 "_EJ0", /* 770x */
4622 ); /* all others */
4623
4624static int __init bay_init(struct ibm_init_struct *iibm)
4625{
4626 vdbg_printk(TPACPI_DBG_INIT, "initializing bay subdriver\n");
4627
4628 TPACPI_ACPIHANDLE_INIT(bay);
4629 if (bay_handle)
4630 TPACPI_ACPIHANDLE_INIT(bay_ej);
4631 TPACPI_ACPIHANDLE_INIT(bay2);
4632 if (bay2_handle)
4633 TPACPI_ACPIHANDLE_INIT(bay2_ej);
4634
4635 tp_features.bay_status = bay_handle &&
4636 acpi_evalf(bay_handle, NULL, "_STA", "qv");
4637 tp_features.bay_status2 = bay2_handle &&
4638 acpi_evalf(bay2_handle, NULL, "_STA", "qv");
4639
4640 tp_features.bay_eject = bay_handle && bay_ej_handle &&
4641 (strlencmp(bay_ej_path, "_EJ0") == 0 || experimental);
4642 tp_features.bay_eject2 = bay2_handle && bay2_ej_handle &&
4643 (strlencmp(bay2_ej_path, "_EJ0") == 0 || experimental);
4644
4645 vdbg_printk(TPACPI_DBG_INIT,
4646 "bay 1: status %s, eject %s; bay 2: status %s, eject %s\n",
4647 str_supported(tp_features.bay_status),
4648 str_supported(tp_features.bay_eject),
4649 str_supported(tp_features.bay_status2),
4650 str_supported(tp_features.bay_eject2));
4651
4652 return (tp_features.bay_status || tp_features.bay_eject ||
4653 tp_features.bay_status2 || tp_features.bay_eject2)? 0 : 1;
4654}
4655
4656static void bay_notify(struct ibm_struct *ibm, u32 event)
4657{
4658 acpi_bus_generate_proc_event(ibm->acpi->device, event, 0);
4659 acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class,
4660 dev_name(&ibm->acpi->device->dev),
4661 event, 0);
4662}
4663
4664#define bay_occupied(b) (_sta(b##_handle) & 1)
4665
4666static int bay_read(char *p)
4667{
4668 int len = 0;
4669 int occupied = bay_occupied(bay);
4670 int occupied2 = bay_occupied(bay2);
4671 int eject, eject2;
4672
4673 len += sprintf(p + len, "status:\t\t%s\n",
4674 tp_features.bay_status ?
4675 (occupied ? "occupied" : "unoccupied") :
4676 "not supported");
4677 if (tp_features.bay_status2)
4678 len += sprintf(p + len, "status2:\t%s\n", occupied2 ?
4679 "occupied" : "unoccupied");
4680
4681 eject = tp_features.bay_eject && occupied;
4682 eject2 = tp_features.bay_eject2 && occupied2;
4683
4684 if (eject && eject2)
4685 len += sprintf(p + len, "commands:\teject, eject2\n");
4686 else if (eject)
4687 len += sprintf(p + len, "commands:\teject\n");
4688 else if (eject2)
4689 len += sprintf(p + len, "commands:\teject2\n");
4690
4691 return len;
4692}
4693
4694static int bay_write(char *buf)
4695{
4696 char *cmd;
4697
4698 if (!tp_features.bay_eject && !tp_features.bay_eject2)
4699 return -ENODEV;
4700
4701 while ((cmd = next_cmd(&buf))) {
4702 if (tp_features.bay_eject && strlencmp(cmd, "eject") == 0) {
4703 if (!acpi_evalf(bay_ej_handle, NULL, NULL, "vd", 1))
4704 return -EIO;
4705 } else if (tp_features.bay_eject2 &&
4706 strlencmp(cmd, "eject2") == 0) {
4707 if (!acpi_evalf(bay2_ej_handle, NULL, NULL, "vd", 1))
4708 return -EIO;
4709 } else
4710 return -EINVAL;
4711 }
4712
4713 return 0;
4714}
4715
4716static struct tp_acpi_drv_struct ibm_bay_acpidriver = {
4717 .notify = bay_notify,
4718 .handle = &bay_handle,
4719 .type = ACPI_SYSTEM_NOTIFY,
4720};
4721
4722static struct ibm_struct bay_driver_data = {
4723 .name = "bay",
4724 .read = bay_read,
4725 .write = bay_write,
4726 .acpi = &ibm_bay_acpidriver,
4727};
4728
4729#endif /* CONFIG_THINKPAD_ACPI_BAY */
4730
4731/*************************************************************************
4732 * CMOS subdriver 4429 * CMOS subdriver
4733 */ 4430 */
4734 4431
@@ -5945,14 +5642,48 @@ static struct backlight_ops ibm_backlight_data = {
5945 5642
5946/* --------------------------------------------------------------------- */ 5643/* --------------------------------------------------------------------- */
5947 5644
5645/*
5646 * These are only useful for models that have only one possibility
5647 * of GPU. If the BIOS model handles both ATI and Intel, don't use
5648 * these quirks.
5649 */
5650#define TPACPI_BRGHT_Q_NOEC 0x0001 /* Must NOT use EC HBRV */
5651#define TPACPI_BRGHT_Q_EC 0x0002 /* Should or must use EC HBRV */
5652#define TPACPI_BRGHT_Q_ASK 0x8000 /* Ask for user report */
5653
5654static const struct tpacpi_quirk brightness_quirk_table[] __initconst = {
5655 /* Models with ATI GPUs known to require ECNVRAM mode */
5656 TPACPI_Q_IBM('1', 'Y', TPACPI_BRGHT_Q_EC), /* T43/p ATI */
5657
5658 /* Models with ATI GPUs (waiting confirmation) */
5659 TPACPI_Q_IBM('1', 'R', TPACPI_BRGHT_Q_ASK|TPACPI_BRGHT_Q_EC),
5660 TPACPI_Q_IBM('1', 'Q', TPACPI_BRGHT_Q_ASK|TPACPI_BRGHT_Q_EC),
5661 TPACPI_Q_IBM('7', '6', TPACPI_BRGHT_Q_ASK|TPACPI_BRGHT_Q_EC),
5662 TPACPI_Q_IBM('7', '8', TPACPI_BRGHT_Q_ASK|TPACPI_BRGHT_Q_EC),
5663
5664 /* Models with Intel Extreme Graphics 2 (waiting confirmation) */
5665 TPACPI_Q_IBM('1', 'V', TPACPI_BRGHT_Q_ASK|TPACPI_BRGHT_Q_NOEC),
5666 TPACPI_Q_IBM('1', 'W', TPACPI_BRGHT_Q_ASK|TPACPI_BRGHT_Q_NOEC),
5667 TPACPI_Q_IBM('1', 'U', TPACPI_BRGHT_Q_ASK|TPACPI_BRGHT_Q_NOEC),
5668
5669 /* Models with Intel GMA900 */
5670 TPACPI_Q_IBM('7', '0', TPACPI_BRGHT_Q_NOEC), /* T43, R52 */
5671 TPACPI_Q_IBM('7', '4', TPACPI_BRGHT_Q_NOEC), /* X41 */
5672 TPACPI_Q_IBM('7', '5', TPACPI_BRGHT_Q_NOEC), /* X41 Tablet */
5673};
5674
5948static int __init brightness_init(struct ibm_init_struct *iibm) 5675static int __init brightness_init(struct ibm_init_struct *iibm)
5949{ 5676{
5950 int b; 5677 int b;
5678 unsigned long quirks;
5951 5679
5952 vdbg_printk(TPACPI_DBG_INIT, "initializing brightness subdriver\n"); 5680 vdbg_printk(TPACPI_DBG_INIT, "initializing brightness subdriver\n");
5953 5681
5954 mutex_init(&brightness_mutex); 5682 mutex_init(&brightness_mutex);
5955 5683
5684 quirks = tpacpi_check_quirks(brightness_quirk_table,
5685 ARRAY_SIZE(brightness_quirk_table));
5686
5956 /* 5687 /*
5957 * We always attempt to detect acpi support, so as to switch 5688 * We always attempt to detect acpi support, so as to switch
5958 * Lenovo Vista BIOS to ACPI brightness mode even if we are not 5689 * Lenovo Vista BIOS to ACPI brightness mode even if we are not
@@ -6009,23 +5740,13 @@ static int __init brightness_init(struct ibm_init_struct *iibm)
6009 /* TPACPI_BRGHT_MODE_AUTO not implemented yet, just use default */ 5740 /* TPACPI_BRGHT_MODE_AUTO not implemented yet, just use default */
6010 if (brightness_mode == TPACPI_BRGHT_MODE_AUTO || 5741 if (brightness_mode == TPACPI_BRGHT_MODE_AUTO ||
6011 brightness_mode == TPACPI_BRGHT_MODE_MAX) { 5742 brightness_mode == TPACPI_BRGHT_MODE_MAX) {
6012 if (thinkpad_id.vendor == PCI_VENDOR_ID_IBM) { 5743 if (quirks & TPACPI_BRGHT_Q_EC)
6013 /* 5744 brightness_mode = TPACPI_BRGHT_MODE_ECNVRAM;
6014 * IBM models that define HBRV probably have 5745 else
6015 * EC-based backlight level control
6016 */
6017 if (acpi_evalf(ec_handle, NULL, "HBRV", "qd"))
6018 /* T40-T43, R50-R52, R50e, R51e, X31-X41 */
6019 brightness_mode = TPACPI_BRGHT_MODE_ECNVRAM;
6020 else
6021 /* all other IBM ThinkPads */
6022 brightness_mode = TPACPI_BRGHT_MODE_UCMS_STEP;
6023 } else
6024 /* All Lenovo ThinkPads */
6025 brightness_mode = TPACPI_BRGHT_MODE_UCMS_STEP; 5746 brightness_mode = TPACPI_BRGHT_MODE_UCMS_STEP;
6026 5747
6027 dbg_printk(TPACPI_DBG_BRGHT, 5748 dbg_printk(TPACPI_DBG_BRGHT,
6028 "selected brightness_mode=%d\n", 5749 "driver auto-selected brightness_mode=%d\n",
6029 brightness_mode); 5750 brightness_mode);
6030 } 5751 }
6031 5752
@@ -6052,6 +5773,15 @@ static int __init brightness_init(struct ibm_init_struct *iibm)
6052 vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_BRGHT, 5773 vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_BRGHT,
6053 "brightness is supported\n"); 5774 "brightness is supported\n");
6054 5775
5776 if (quirks & TPACPI_BRGHT_Q_ASK) {
5777 printk(TPACPI_NOTICE
5778 "brightness: will use unverified default: "
5779 "brightness_mode=%d\n", brightness_mode);
5780 printk(TPACPI_NOTICE
5781 "brightness: please report to %s whether it works well "
5782 "or not on your ThinkPad\n", TPACPI_MAIL);
5783 }
5784
6055 ibm_backlight_device->props.max_brightness = 5785 ibm_backlight_device->props.max_brightness =
6056 (tp_features.bright_16levels)? 15 : 7; 5786 (tp_features.bright_16levels)? 15 : 7;
6057 ibm_backlight_device->props.brightness = b & TP_EC_BACKLIGHT_LVLMSK; 5787 ibm_backlight_device->props.brightness = b & TP_EC_BACKLIGHT_LVLMSK;
@@ -7854,22 +7584,6 @@ static struct ibm_init_struct ibms_init[] __initdata = {
7854 .init = light_init, 7584 .init = light_init,
7855 .data = &light_driver_data, 7585 .data = &light_driver_data,
7856 }, 7586 },
7857#ifdef CONFIG_THINKPAD_ACPI_DOCK
7858 {
7859 .init = dock_init,
7860 .data = &dock_driver_data[0],
7861 },
7862 {
7863 .init = dock_init2,
7864 .data = &dock_driver_data[1],
7865 },
7866#endif
7867#ifdef CONFIG_THINKPAD_ACPI_BAY
7868 {
7869 .init = bay_init,
7870 .data = &bay_driver_data,
7871 },
7872#endif
7873 { 7587 {
7874 .init = cmos_init, 7588 .init = cmos_init,
7875 .data = &cmos_driver_data, 7589 .data = &cmos_driver_data,
@@ -7968,12 +7682,6 @@ TPACPI_PARAM(hotkey);
7968TPACPI_PARAM(bluetooth); 7682TPACPI_PARAM(bluetooth);
7969TPACPI_PARAM(video); 7683TPACPI_PARAM(video);
7970TPACPI_PARAM(light); 7684TPACPI_PARAM(light);
7971#ifdef CONFIG_THINKPAD_ACPI_DOCK
7972TPACPI_PARAM(dock);
7973#endif
7974#ifdef CONFIG_THINKPAD_ACPI_BAY
7975TPACPI_PARAM(bay);
7976#endif /* CONFIG_THINKPAD_ACPI_BAY */
7977TPACPI_PARAM(cmos); 7685TPACPI_PARAM(cmos);
7978TPACPI_PARAM(led); 7686TPACPI_PARAM(led);
7979TPACPI_PARAM(beep); 7687TPACPI_PARAM(beep);
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 7eda34838bf..bdbc4f73fcd 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -43,6 +43,13 @@ config BATTERY_DS2760
43 help 43 help
44 Say Y here to enable support for batteries with ds2760 chip. 44 Say Y here to enable support for batteries with ds2760 chip.
45 45
46config BATTERY_DS2782
47 tristate "DS2782 standalone gas-gauge"
48 depends on I2C
49 help
50 Say Y here to enable support for the DS2782 standalone battery
51 gas-gauge.
52
46config BATTERY_PMU 53config BATTERY_PMU
47 tristate "Apple PMU battery" 54 tristate "Apple PMU battery"
48 depends on PPC32 && ADB_PMU 55 depends on PPC32 && ADB_PMU
diff --git a/drivers/power/Makefile b/drivers/power/Makefile
index daf3179689a..380d17c9ae2 100644
--- a/drivers/power/Makefile
+++ b/drivers/power/Makefile
@@ -19,6 +19,7 @@ obj-$(CONFIG_APM_POWER) += apm_power.o
19obj-$(CONFIG_WM8350_POWER) += wm8350_power.o 19obj-$(CONFIG_WM8350_POWER) += wm8350_power.o
20 20
21obj-$(CONFIG_BATTERY_DS2760) += ds2760_battery.o 21obj-$(CONFIG_BATTERY_DS2760) += ds2760_battery.o
22obj-$(CONFIG_BATTERY_DS2782) += ds2782_battery.o
22obj-$(CONFIG_BATTERY_PMU) += pmu_battery.o 23obj-$(CONFIG_BATTERY_PMU) += pmu_battery.o
23obj-$(CONFIG_BATTERY_OLPC) += olpc_battery.o 24obj-$(CONFIG_BATTERY_OLPC) += olpc_battery.o
24obj-$(CONFIG_BATTERY_TOSA) += tosa_battery.o 25obj-$(CONFIG_BATTERY_TOSA) += tosa_battery.o
diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c
new file mode 100644
index 00000000000..da14f374cb6
--- /dev/null
+++ b/drivers/power/ds2782_battery.c
@@ -0,0 +1,330 @@
1/*
2 * I2C client/driver for the Maxim/Dallas DS2782 Stand-Alone Fuel Gauge IC
3 *
4 * Copyright (C) 2009 Bluewater Systems Ltd
5 *
6 * Author: Ryan Mallon <ryan@bluewatersys.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 version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
14#include <linux/kernel.h>
15#include <linux/module.h>
16#include <linux/types.h>
17#include <linux/errno.h>
18#include <linux/swab.h>
19#include <linux/i2c.h>
20#include <linux/idr.h>
21#include <linux/power_supply.h>
22
23#define DS2782_REG_RARC 0x06 /* Remaining active relative capacity */
24
25#define DS2782_REG_VOLT_MSB 0x0c
26#define DS2782_REG_TEMP_MSB 0x0a
27#define DS2782_REG_CURRENT_MSB 0x0e
28
29/* EEPROM Block */
30#define DS2782_REG_RSNSP 0x69 /* Sense resistor value */
31
32/* Current unit measurement in uA for a 1 milli-ohm sense resistor */
33#define DS2782_CURRENT_UNITS 1563
34
35#define to_ds2782_info(x) container_of(x, struct ds2782_info, battery)
36
37struct ds2782_info {
38 struct i2c_client *client;
39 struct power_supply battery;
40 int id;
41};
42
43static DEFINE_IDR(battery_id);
44static DEFINE_MUTEX(battery_lock);
45
46static inline int ds2782_read_reg(struct ds2782_info *info, int reg, u8 *val)
47{
48 int ret;
49
50 ret = i2c_smbus_read_byte_data(info->client, reg);
51 if (ret < 0) {
52 dev_err(&info->client->dev, "register read failed\n");
53 return ret;
54 }
55
56 *val = ret;
57 return 0;
58}
59
60static inline int ds2782_read_reg16(struct ds2782_info *info, int reg_msb,
61 s16 *val)
62{
63 int ret;
64
65 ret = swab16(i2c_smbus_read_word_data(info->client, reg_msb));
66 if (ret < 0) {
67 dev_err(&info->client->dev, "register read failed\n");
68 return ret;
69 }
70
71 *val = ret;
72 return 0;
73}
74
75static int ds2782_get_temp(struct ds2782_info *info, int *temp)
76{
77 s16 raw;
78 int err;
79
80 /*
81 * Temperature is measured in units of 0.125 degrees celcius, the
82 * power_supply class measures temperature in tenths of degrees
83 * celsius. The temperature value is stored as a 10 bit number, plus
84 * sign in the upper bits of a 16 bit register.
85 */
86 err = ds2782_read_reg16(info, DS2782_REG_TEMP_MSB, &raw);
87 if (err)
88 return err;
89 *temp = ((raw / 32) * 125) / 100;
90 return 0;
91}
92
93static int ds2782_get_current(struct ds2782_info *info, int *current_uA)
94{
95 int sense_res;
96 int err;
97 u8 sense_res_raw;
98 s16 raw;
99
100 /*
101 * The units of measurement for current are dependent on the value of
102 * the sense resistor.
103 */
104 err = ds2782_read_reg(info, DS2782_REG_RSNSP, &sense_res_raw);
105 if (err)
106 return err;
107 if (sense_res_raw == 0) {
108 dev_err(&info->client->dev, "sense resistor value is 0\n");
109 return -ENXIO;
110 }
111 sense_res = 1000 / sense_res_raw;
112
113 dev_dbg(&info->client->dev, "sense resistor = %d milli-ohms\n",
114 sense_res);
115 err = ds2782_read_reg16(info, DS2782_REG_CURRENT_MSB, &raw);
116 if (err)
117 return err;
118 *current_uA = raw * (DS2782_CURRENT_UNITS / sense_res);
119 return 0;
120}
121
122static int ds2782_get_voltage(struct ds2782_info *info, int *voltage_uA)
123{
124 s16 raw;
125 int err;
126
127 /*
128 * Voltage is measured in units of 4.88mV. The voltage is stored as
129 * a 10-bit number plus sign, in the upper bits of a 16-bit register
130 */
131 err = ds2782_read_reg16(info, DS2782_REG_VOLT_MSB, &raw);
132 if (err)
133 return err;
134 *voltage_uA = (raw / 32) * 4800;
135 return 0;
136}
137
138static int ds2782_get_capacity(struct ds2782_info *info, int *capacity)
139{
140 int err;
141 u8 raw;
142
143 err = ds2782_read_reg(info, DS2782_REG_RARC, &raw);
144 if (err)
145 return err;
146 *capacity = raw;
147 return raw;
148}
149
150static int ds2782_get_status(struct ds2782_info *info, int *status)
151{
152 int err;
153 int current_uA;
154 int capacity;
155
156 err = ds2782_get_current(info, &current_uA);
157 if (err)
158 return err;
159
160 err = ds2782_get_capacity(info, &capacity);
161 if (err)
162 return err;
163
164 if (capacity == 100)
165 *status = POWER_SUPPLY_STATUS_FULL;
166 else if (current_uA == 0)
167 *status = POWER_SUPPLY_STATUS_NOT_CHARGING;
168 else if (current_uA < 0)
169 *status = POWER_SUPPLY_STATUS_DISCHARGING;
170 else
171 *status = POWER_SUPPLY_STATUS_CHARGING;
172
173 return 0;
174}
175
176static int ds2782_battery_get_property(struct power_supply *psy,
177 enum power_supply_property prop,
178 union power_supply_propval *val)
179{
180 struct ds2782_info *info = to_ds2782_info(psy);
181 int ret;
182
183 switch (prop) {
184 case POWER_SUPPLY_PROP_STATUS:
185 ret = ds2782_get_status(info, &val->intval);
186 break;
187
188 case POWER_SUPPLY_PROP_CAPACITY:
189 ret = ds2782_get_capacity(info, &val->intval);
190 break;
191
192 case POWER_SUPPLY_PROP_VOLTAGE_NOW:
193 ret = ds2782_get_voltage(info, &val->intval);
194 break;
195
196 case POWER_SUPPLY_PROP_CURRENT_NOW:
197 ret = ds2782_get_current(info, &val->intval);
198 break;
199
200 case POWER_SUPPLY_PROP_TEMP:
201 ret = ds2782_get_temp(info, &val->intval);
202 break;
203
204 default:
205 ret = -EINVAL;
206 }
207
208 return ret;
209}
210
211static enum power_supply_property ds2782_battery_props[] = {
212 POWER_SUPPLY_PROP_STATUS,
213 POWER_SUPPLY_PROP_CAPACITY,
214 POWER_SUPPLY_PROP_VOLTAGE_NOW,
215 POWER_SUPPLY_PROP_CURRENT_NOW,
216 POWER_SUPPLY_PROP_TEMP,
217};
218
219static void ds2782_power_supply_init(struct power_supply *battery)
220{
221 battery->type = POWER_SUPPLY_TYPE_BATTERY;
222 battery->properties = ds2782_battery_props;
223 battery->num_properties = ARRAY_SIZE(ds2782_battery_props);
224 battery->get_property = ds2782_battery_get_property;
225 battery->external_power_changed = NULL;
226}
227
228static int ds2782_battery_remove(struct i2c_client *client)
229{
230 struct ds2782_info *info = i2c_get_clientdata(client);
231
232 power_supply_unregister(&info->battery);
233 kfree(info->battery.name);
234
235 mutex_lock(&battery_lock);
236 idr_remove(&battery_id, info->id);
237 mutex_unlock(&battery_lock);
238
239 i2c_set_clientdata(client, info);
240
241 kfree(info);
242 return 0;
243}
244
245static int ds2782_battery_probe(struct i2c_client *client,
246 const struct i2c_device_id *id)
247{
248 struct ds2782_info *info;
249 int ret;
250 int num;
251
252 /* Get an ID for this battery */
253 ret = idr_pre_get(&battery_id, GFP_KERNEL);
254 if (ret == 0) {
255 ret = -ENOMEM;
256 goto fail_id;
257 }
258
259 mutex_lock(&battery_lock);
260 ret = idr_get_new(&battery_id, client, &num);
261 mutex_unlock(&battery_lock);
262 if (ret < 0)
263 goto fail_id;
264
265 info = kzalloc(sizeof(*info), GFP_KERNEL);
266 if (!info) {
267 ret = -ENOMEM;
268 goto fail_info;
269 }
270
271 info->battery.name = kasprintf(GFP_KERNEL, "ds2782-%d", num);
272 if (!info->battery.name) {
273 ret = -ENOMEM;
274 goto fail_name;
275 }
276
277 i2c_set_clientdata(client, info);
278 info->client = client;
279 ds2782_power_supply_init(&info->battery);
280
281 ret = power_supply_register(&client->dev, &info->battery);
282 if (ret) {
283 dev_err(&client->dev, "failed to register battery\n");
284 goto fail_register;
285 }
286
287 return 0;
288
289fail_register:
290 kfree(info->battery.name);
291fail_name:
292 i2c_set_clientdata(client, info);
293 kfree(info);
294fail_info:
295 mutex_lock(&battery_lock);
296 idr_remove(&battery_id, num);
297 mutex_unlock(&battery_lock);
298fail_id:
299 return ret;
300}
301
302static const struct i2c_device_id ds2782_id[] = {
303 {"ds2782", 0},
304 {},
305};
306
307static struct i2c_driver ds2782_battery_driver = {
308 .driver = {
309 .name = "ds2782-battery",
310 },
311 .probe = ds2782_battery_probe,
312 .remove = ds2782_battery_remove,
313 .id_table = ds2782_id,
314};
315
316static int __init ds2782_init(void)
317{
318 return i2c_add_driver(&ds2782_battery_driver);
319}
320module_init(ds2782_init);
321
322static void __exit ds2782_exit(void)
323{
324 i2c_del_driver(&ds2782_battery_driver);
325}
326module_exit(ds2782_exit);
327
328MODULE_AUTHOR("Ryan Mallon <ryan@bluewatersys.com>");
329MODULE_DESCRIPTION("Maxim/Dallas DS2782 Stand-Alone Fuel Gauage IC driver");
330MODULE_LICENSE("GPL");
diff --git a/drivers/power/olpc_battery.c b/drivers/power/olpc_battery.c
index 5fbca2681ba..58e419299cd 100644
--- a/drivers/power/olpc_battery.c
+++ b/drivers/power/olpc_battery.c
@@ -8,6 +8,7 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
11#include <linux/kernel.h>
11#include <linux/module.h> 12#include <linux/module.h>
12#include <linux/err.h> 13#include <linux/err.h>
13#include <linux/platform_device.h> 14#include <linux/platform_device.h>
@@ -35,6 +36,7 @@
35#define BAT_STAT_AC 0x10 36#define BAT_STAT_AC 0x10
36#define BAT_STAT_CHARGING 0x20 37#define BAT_STAT_CHARGING 0x20
37#define BAT_STAT_DISCHARGING 0x40 38#define BAT_STAT_DISCHARGING 0x40
39#define BAT_STAT_TRICKLE 0x80
38 40
39#define BAT_ERR_INFOFAIL 0x02 41#define BAT_ERR_INFOFAIL 0x02
40#define BAT_ERR_OVERVOLTAGE 0x04 42#define BAT_ERR_OVERVOLTAGE 0x04
@@ -89,7 +91,7 @@ static char bat_serial[17]; /* Ick */
89static int olpc_bat_get_status(union power_supply_propval *val, uint8_t ec_byte) 91static int olpc_bat_get_status(union power_supply_propval *val, uint8_t ec_byte)
90{ 92{
91 if (olpc_platform_info.ecver > 0x44) { 93 if (olpc_platform_info.ecver > 0x44) {
92 if (ec_byte & BAT_STAT_CHARGING) 94 if (ec_byte & (BAT_STAT_CHARGING | BAT_STAT_TRICKLE))
93 val->intval = POWER_SUPPLY_STATUS_CHARGING; 95 val->intval = POWER_SUPPLY_STATUS_CHARGING;
94 else if (ec_byte & BAT_STAT_DISCHARGING) 96 else if (ec_byte & BAT_STAT_DISCHARGING)
95 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; 97 val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
@@ -219,7 +221,8 @@ static int olpc_bat_get_property(struct power_supply *psy,
219 It doesn't matter though -- the EC will return the last-known 221 It doesn't matter though -- the EC will return the last-known
220 information, and it's as if we just ran that _little_ bit faster 222 information, and it's as if we just ran that _little_ bit faster
221 and managed to read it out before the battery went away. */ 223 and managed to read it out before the battery went away. */
222 if (!(ec_byte & BAT_STAT_PRESENT) && psp != POWER_SUPPLY_PROP_PRESENT) 224 if (!(ec_byte & (BAT_STAT_PRESENT | BAT_STAT_TRICKLE)) &&
225 psp != POWER_SUPPLY_PROP_PRESENT)
223 return -ENODEV; 226 return -ENODEV;
224 227
225 switch (psp) { 228 switch (psp) {
@@ -229,7 +232,8 @@ static int olpc_bat_get_property(struct power_supply *psy,
229 return ret; 232 return ret;
230 break; 233 break;
231 case POWER_SUPPLY_PROP_PRESENT: 234 case POWER_SUPPLY_PROP_PRESENT:
232 val->intval = !!(ec_byte & BAT_STAT_PRESENT); 235 val->intval = !!(ec_byte & (BAT_STAT_PRESENT |
236 BAT_STAT_TRICKLE));
233 break; 237 break;
234 238
235 case POWER_SUPPLY_PROP_HEALTH: 239 case POWER_SUPPLY_PROP_HEALTH:
@@ -334,21 +338,21 @@ static ssize_t olpc_bat_eeprom_read(struct kobject *kobj,
334 struct bin_attribute *attr, char *buf, loff_t off, size_t count) 338 struct bin_attribute *attr, char *buf, loff_t off, size_t count)
335{ 339{
336 uint8_t ec_byte; 340 uint8_t ec_byte;
337 int ret, end; 341 int ret;
342 int i;
338 343
339 if (off >= EEPROM_SIZE) 344 if (off >= EEPROM_SIZE)
340 return 0; 345 return 0;
341 if (off + count > EEPROM_SIZE) 346 if (off + count > EEPROM_SIZE)
342 count = EEPROM_SIZE - off; 347 count = EEPROM_SIZE - off;
343 348
344 end = EEPROM_START + off + count; 349 for (i = 0; i < count; i++) {
345 for (ec_byte = EEPROM_START + off; ec_byte < end; ec_byte++) { 350 ec_byte = EEPROM_START + off + i;
346 ret = olpc_ec_cmd(EC_BAT_EEPROM, &ec_byte, 1, 351 ret = olpc_ec_cmd(EC_BAT_EEPROM, &ec_byte, 1, &buf[i], 1);
347 &buf[ec_byte - EEPROM_START], 1);
348 if (ret) { 352 if (ret) {
349 printk(KERN_ERR "olpc-battery: EC command " 353 pr_err("olpc-battery: "
350 "EC_BAT_EEPROM @ 0x%x failed -" 354 "EC_BAT_EEPROM cmd @ 0x%x failed - %d!\n",
351 " %d!\n", ec_byte, ret); 355 ec_byte, ret);
352 return -EIO; 356 return -EIO;
353 } 357 }
354 } 358 }
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 23e10b6263d..f7a4701bf86 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -1174,23 +1174,34 @@ static struct platform_driver cmos_platform_driver = {
1174 } 1174 }
1175}; 1175};
1176 1176
1177#ifdef CONFIG_PNP
1178static bool pnp_driver_registered;
1179#endif
1180static bool platform_driver_registered;
1181
1177static int __init cmos_init(void) 1182static int __init cmos_init(void)
1178{ 1183{
1179 int retval = 0; 1184 int retval = 0;
1180 1185
1181#ifdef CONFIG_PNP 1186#ifdef CONFIG_PNP
1182 pnp_register_driver(&cmos_pnp_driver); 1187 retval = pnp_register_driver(&cmos_pnp_driver);
1188 if (retval == 0)
1189 pnp_driver_registered = true;
1183#endif 1190#endif
1184 1191
1185 if (!cmos_rtc.dev) 1192 if (!cmos_rtc.dev) {
1186 retval = platform_driver_probe(&cmos_platform_driver, 1193 retval = platform_driver_probe(&cmos_platform_driver,
1187 cmos_platform_probe); 1194 cmos_platform_probe);
1195 if (retval == 0)
1196 platform_driver_registered = true;
1197 }
1188 1198
1189 if (retval == 0) 1199 if (retval == 0)
1190 return 0; 1200 return 0;
1191 1201
1192#ifdef CONFIG_PNP 1202#ifdef CONFIG_PNP
1193 pnp_unregister_driver(&cmos_pnp_driver); 1203 if (pnp_driver_registered)
1204 pnp_unregister_driver(&cmos_pnp_driver);
1194#endif 1205#endif
1195 return retval; 1206 return retval;
1196} 1207}
@@ -1199,9 +1210,11 @@ module_init(cmos_init);
1199static void __exit cmos_exit(void) 1210static void __exit cmos_exit(void)
1200{ 1211{
1201#ifdef CONFIG_PNP 1212#ifdef CONFIG_PNP
1202 pnp_unregister_driver(&cmos_pnp_driver); 1213 if (pnp_driver_registered)
1214 pnp_unregister_driver(&cmos_pnp_driver);
1203#endif 1215#endif
1204 platform_driver_unregister(&cmos_platform_driver); 1216 if (platform_driver_registered)
1217 platform_driver_unregister(&cmos_platform_driver);
1205} 1218}
1206module_exit(cmos_exit); 1219module_exit(cmos_exit);
1207 1220
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index 727a809636d..ed3dcdea7fe 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -1145,12 +1145,17 @@ ap_config_timeout(unsigned long ptr)
1145 */ 1145 */
1146static inline void ap_schedule_poll_timer(void) 1146static inline void ap_schedule_poll_timer(void)
1147{ 1147{
1148 ktime_t hr_time;
1148 if (ap_using_interrupts() || ap_suspend_flag) 1149 if (ap_using_interrupts() || ap_suspend_flag)
1149 return; 1150 return;
1150 if (hrtimer_is_queued(&ap_poll_timer)) 1151 if (hrtimer_is_queued(&ap_poll_timer))
1151 return; 1152 return;
1152 hrtimer_start(&ap_poll_timer, ktime_set(0, poll_timeout), 1153 if (ktime_to_ns(hrtimer_expires_remaining(&ap_poll_timer)) <= 0) {
1153 HRTIMER_MODE_ABS); 1154 hr_time = ktime_set(0, poll_timeout);
1155 hrtimer_forward_now(&ap_poll_timer, hr_time);
1156 hrtimer_restart(&ap_poll_timer);
1157 }
1158 return;
1154} 1159}
1155 1160
1156/** 1161/**
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index 8030e25152f..c75d6f35cb5 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -553,40 +553,35 @@ static void _zfcp_erp_unit_reopen_all(struct zfcp_port *port, int clear,
553 _zfcp_erp_unit_reopen(unit, clear, id, ref); 553 _zfcp_erp_unit_reopen(unit, clear, id, ref);
554} 554}
555 555
556static void zfcp_erp_strategy_followup_actions(struct zfcp_erp_action *act) 556static void zfcp_erp_strategy_followup_failed(struct zfcp_erp_action *act)
557{ 557{
558 struct zfcp_adapter *adapter = act->adapter;
559 struct zfcp_port *port = act->port;
560 struct zfcp_unit *unit = act->unit;
561 u32 status = act->status;
562
563 /* initiate follow-up actions depending on success of finished action */
564 switch (act->action) { 558 switch (act->action) {
565
566 case ZFCP_ERP_ACTION_REOPEN_ADAPTER: 559 case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
567 if (status == ZFCP_ERP_SUCCEEDED) 560 _zfcp_erp_adapter_reopen(act->adapter, 0, "ersff_1", NULL);
568 _zfcp_erp_port_reopen_all(adapter, 0, "ersfa_1", NULL);
569 else
570 _zfcp_erp_adapter_reopen(adapter, 0, "ersfa_2", NULL);
571 break; 561 break;
572
573 case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: 562 case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED:
574 if (status == ZFCP_ERP_SUCCEEDED) 563 _zfcp_erp_port_forced_reopen(act->port, 0, "ersff_2", NULL);
575 _zfcp_erp_port_reopen(port, 0, "ersfa_3", NULL);
576 else
577 _zfcp_erp_adapter_reopen(adapter, 0, "ersfa_4", NULL);
578 break; 564 break;
579
580 case ZFCP_ERP_ACTION_REOPEN_PORT: 565 case ZFCP_ERP_ACTION_REOPEN_PORT:
581 if (status == ZFCP_ERP_SUCCEEDED) 566 _zfcp_erp_port_reopen(act->port, 0, "ersff_3", NULL);
582 _zfcp_erp_unit_reopen_all(port, 0, "ersfa_5", NULL);
583 else
584 _zfcp_erp_port_forced_reopen(port, 0, "ersfa_6", NULL);
585 break; 567 break;
586
587 case ZFCP_ERP_ACTION_REOPEN_UNIT: 568 case ZFCP_ERP_ACTION_REOPEN_UNIT:
588 if (status != ZFCP_ERP_SUCCEEDED) 569 _zfcp_erp_unit_reopen(act->unit, 0, "ersff_4", NULL);
589 _zfcp_erp_port_reopen(unit->port, 0, "ersfa_7", NULL); 570 break;
571 }
572}
573
574static void zfcp_erp_strategy_followup_success(struct zfcp_erp_action *act)
575{
576 switch (act->action) {
577 case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
578 _zfcp_erp_port_reopen_all(act->adapter, 0, "ersfs_1", NULL);
579 break;
580 case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED:
581 _zfcp_erp_port_reopen(act->port, 0, "ersfs_2", NULL);
582 break;
583 case ZFCP_ERP_ACTION_REOPEN_PORT:
584 _zfcp_erp_unit_reopen_all(act->port, 0, "ersfs_3", NULL);
590 break; 585 break;
591 } 586 }
592} 587}
@@ -801,7 +796,7 @@ static int zfcp_erp_port_forced_strategy(struct zfcp_erp_action *erp_action)
801 return ZFCP_ERP_FAILED; 796 return ZFCP_ERP_FAILED;
802 797
803 case ZFCP_ERP_STEP_PHYS_PORT_CLOSING: 798 case ZFCP_ERP_STEP_PHYS_PORT_CLOSING:
804 if (status & ZFCP_STATUS_PORT_PHYS_OPEN) 799 if (!(status & ZFCP_STATUS_PORT_PHYS_OPEN))
805 return ZFCP_ERP_SUCCEEDED; 800 return ZFCP_ERP_SUCCEEDED;
806 } 801 }
807 return ZFCP_ERP_FAILED; 802 return ZFCP_ERP_FAILED;
@@ -853,11 +848,17 @@ void zfcp_erp_port_strategy_open_lookup(struct work_struct *work)
853 gid_pn_work); 848 gid_pn_work);
854 849
855 retval = zfcp_fc_ns_gid_pn(&port->erp_action); 850 retval = zfcp_fc_ns_gid_pn(&port->erp_action);
856 if (retval == -ENOMEM) 851 if (!retval) {
857 zfcp_erp_notify(&port->erp_action, ZFCP_ERP_NOMEM); 852 port->erp_action.step = ZFCP_ERP_STEP_NAMESERVER_LOOKUP;
858 port->erp_action.step = ZFCP_ERP_STEP_NAMESERVER_LOOKUP; 853 goto out;
859 if (retval) 854 }
860 zfcp_erp_notify(&port->erp_action, ZFCP_ERP_FAILED); 855 if (retval == -ENOMEM) {
856 zfcp_erp_notify(&port->erp_action, ZFCP_STATUS_ERP_LOWMEM);
857 goto out;
858 }
859 /* all other error condtions */
860 zfcp_erp_notify(&port->erp_action, 0);
861out:
861 zfcp_port_put(port); 862 zfcp_port_put(port);
862} 863}
863 864
@@ -1289,7 +1290,10 @@ static int zfcp_erp_strategy(struct zfcp_erp_action *erp_action)
1289 retval = zfcp_erp_strategy_statechange(erp_action, retval); 1290 retval = zfcp_erp_strategy_statechange(erp_action, retval);
1290 if (retval == ZFCP_ERP_EXIT) 1291 if (retval == ZFCP_ERP_EXIT)
1291 goto unlock; 1292 goto unlock;
1292 zfcp_erp_strategy_followup_actions(erp_action); 1293 if (retval == ZFCP_ERP_SUCCEEDED)
1294 zfcp_erp_strategy_followup_success(erp_action);
1295 if (retval == ZFCP_ERP_FAILED)
1296 zfcp_erp_strategy_followup_failed(erp_action);
1293 1297
1294 unlock: 1298 unlock:
1295 write_unlock(&adapter->erp_lock); 1299 write_unlock(&adapter->erp_lock);
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c
index 2f0705d76b7..47daebfa7e5 100644
--- a/drivers/s390/scsi/zfcp_fc.c
+++ b/drivers/s390/scsi/zfcp_fc.c
@@ -79,11 +79,9 @@ static int zfcp_wka_port_get(struct zfcp_wka_port *wka_port)
79 79
80 mutex_unlock(&wka_port->mutex); 80 mutex_unlock(&wka_port->mutex);
81 81
82 wait_event_timeout( 82 wait_event(wka_port->completion_wq,
83 wka_port->completion_wq, 83 wka_port->status == ZFCP_WKA_PORT_ONLINE ||
84 wka_port->status == ZFCP_WKA_PORT_ONLINE || 84 wka_port->status == ZFCP_WKA_PORT_OFFLINE);
85 wka_port->status == ZFCP_WKA_PORT_OFFLINE,
86 HZ >> 1);
87 85
88 if (wka_port->status == ZFCP_WKA_PORT_ONLINE) { 86 if (wka_port->status == ZFCP_WKA_PORT_ONLINE) {
89 atomic_inc(&wka_port->refcount); 87 atomic_inc(&wka_port->refcount);
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index c57658f3d34..47795fbf081 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -670,8 +670,11 @@ static int zfcp_fsf_req_sbal_get(struct zfcp_adapter *adapter)
670 zfcp_fsf_sbal_check(adapter), 5 * HZ); 670 zfcp_fsf_sbal_check(adapter), 5 * HZ);
671 if (ret > 0) 671 if (ret > 0)
672 return 0; 672 return 0;
673 if (!ret) 673 if (!ret) {
674 atomic_inc(&adapter->qdio_outb_full); 674 atomic_inc(&adapter->qdio_outb_full);
675 /* assume hanging outbound queue, try queue recovery */
676 zfcp_erp_adapter_reopen(adapter, 0, "fsrsg_1", NULL);
677 }
675 678
676 spin_lock_bh(&adapter->req_q_lock); 679 spin_lock_bh(&adapter->req_q_lock);
677 return -EIO; 680 return -EIO;
@@ -722,7 +725,7 @@ static struct zfcp_fsf_req *zfcp_fsf_req_create(struct zfcp_adapter *adapter,
722 req = zfcp_fsf_alloc_qtcb(pool); 725 req = zfcp_fsf_alloc_qtcb(pool);
723 726
724 if (unlikely(!req)) 727 if (unlikely(!req))
725 return ERR_PTR(-EIO); 728 return ERR_PTR(-ENOMEM);
726 729
727 if (adapter->req_no == 0) 730 if (adapter->req_no == 0)
728 adapter->req_no++; 731 adapter->req_no++;
@@ -1010,6 +1013,23 @@ skip_fsfstatus:
1010 send_ct->handler(send_ct->handler_data); 1013 send_ct->handler(send_ct->handler_data);
1011} 1014}
1012 1015
1016static void zfcp_fsf_setup_ct_els_unchained(struct qdio_buffer_element *sbale,
1017 struct scatterlist *sg_req,
1018 struct scatterlist *sg_resp)
1019{
1020 sbale[0].flags |= SBAL_FLAGS0_TYPE_WRITE_READ;
1021 sbale[2].addr = sg_virt(sg_req);
1022 sbale[2].length = sg_req->length;
1023 sbale[3].addr = sg_virt(sg_resp);
1024 sbale[3].length = sg_resp->length;
1025 sbale[3].flags |= SBAL_FLAGS_LAST_ENTRY;
1026}
1027
1028static int zfcp_fsf_one_sbal(struct scatterlist *sg)
1029{
1030 return sg_is_last(sg) && sg->length <= PAGE_SIZE;
1031}
1032
1013static int zfcp_fsf_setup_ct_els_sbals(struct zfcp_fsf_req *req, 1033static int zfcp_fsf_setup_ct_els_sbals(struct zfcp_fsf_req *req,
1014 struct scatterlist *sg_req, 1034 struct scatterlist *sg_req,
1015 struct scatterlist *sg_resp, 1035 struct scatterlist *sg_resp,
@@ -1020,30 +1040,30 @@ static int zfcp_fsf_setup_ct_els_sbals(struct zfcp_fsf_req *req,
1020 int bytes; 1040 int bytes;
1021 1041
1022 if (!(feat & FSF_FEATURE_ELS_CT_CHAINED_SBALS)) { 1042 if (!(feat & FSF_FEATURE_ELS_CT_CHAINED_SBALS)) {
1023 if (sg_req->length > PAGE_SIZE || sg_resp->length > PAGE_SIZE || 1043 if (!zfcp_fsf_one_sbal(sg_req) || !zfcp_fsf_one_sbal(sg_resp))
1024 !sg_is_last(sg_req) || !sg_is_last(sg_resp))
1025 return -EOPNOTSUPP; 1044 return -EOPNOTSUPP;
1026 1045
1027 sbale[0].flags |= SBAL_FLAGS0_TYPE_WRITE_READ; 1046 zfcp_fsf_setup_ct_els_unchained(sbale, sg_req, sg_resp);
1028 sbale[2].addr = sg_virt(sg_req); 1047 return 0;
1029 sbale[2].length = sg_req->length; 1048 }
1030 sbale[3].addr = sg_virt(sg_resp); 1049
1031 sbale[3].length = sg_resp->length; 1050 /* use single, unchained SBAL if it can hold the request */
1032 sbale[3].flags |= SBAL_FLAGS_LAST_ENTRY; 1051 if (zfcp_fsf_one_sbal(sg_req) && zfcp_fsf_one_sbal(sg_resp)) {
1052 zfcp_fsf_setup_ct_els_unchained(sbale, sg_req, sg_resp);
1033 return 0; 1053 return 0;
1034 } 1054 }
1035 1055
1036 bytes = zfcp_qdio_sbals_from_sg(req, SBAL_FLAGS0_TYPE_WRITE_READ, 1056 bytes = zfcp_qdio_sbals_from_sg(req, SBAL_FLAGS0_TYPE_WRITE_READ,
1037 sg_req, max_sbals); 1057 sg_req, max_sbals);
1038 if (bytes <= 0) 1058 if (bytes <= 0)
1039 return -ENOMEM; 1059 return -EIO;
1040 req->qtcb->bottom.support.req_buf_length = bytes; 1060 req->qtcb->bottom.support.req_buf_length = bytes;
1041 req->sbale_curr = ZFCP_LAST_SBALE_PER_SBAL; 1061 req->sbale_curr = ZFCP_LAST_SBALE_PER_SBAL;
1042 1062
1043 bytes = zfcp_qdio_sbals_from_sg(req, SBAL_FLAGS0_TYPE_WRITE_READ, 1063 bytes = zfcp_qdio_sbals_from_sg(req, SBAL_FLAGS0_TYPE_WRITE_READ,
1044 sg_resp, max_sbals); 1064 sg_resp, max_sbals);
1045 if (bytes <= 0) 1065 if (bytes <= 0)
1046 return -ENOMEM; 1066 return -EIO;
1047 req->qtcb->bottom.support.resp_buf_length = bytes; 1067 req->qtcb->bottom.support.resp_buf_length = bytes;
1048 1068
1049 return 0; 1069 return 0;
@@ -1607,10 +1627,10 @@ static void zfcp_fsf_open_wka_port_handler(struct zfcp_fsf_req *req)
1607 case FSF_ACCESS_DENIED: 1627 case FSF_ACCESS_DENIED:
1608 wka_port->status = ZFCP_WKA_PORT_OFFLINE; 1628 wka_port->status = ZFCP_WKA_PORT_OFFLINE;
1609 break; 1629 break;
1610 case FSF_PORT_ALREADY_OPEN:
1611 break;
1612 case FSF_GOOD: 1630 case FSF_GOOD:
1613 wka_port->handle = header->port_handle; 1631 wka_port->handle = header->port_handle;
1632 /* fall through */
1633 case FSF_PORT_ALREADY_OPEN:
1614 wka_port->status = ZFCP_WKA_PORT_ONLINE; 1634 wka_port->status = ZFCP_WKA_PORT_ONLINE;
1615 } 1635 }
1616out: 1636out:
@@ -1731,15 +1751,16 @@ static void zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *req)
1731 zfcp_fsf_access_denied_port(req, port); 1751 zfcp_fsf_access_denied_port(req, port);
1732 break; 1752 break;
1733 case FSF_PORT_BOXED: 1753 case FSF_PORT_BOXED:
1734 zfcp_erp_port_boxed(port, "fscpph2", req);
1735 req->status |= ZFCP_STATUS_FSFREQ_ERROR |
1736 ZFCP_STATUS_FSFREQ_RETRY;
1737 /* can't use generic zfcp_erp_modify_port_status because 1754 /* can't use generic zfcp_erp_modify_port_status because
1738 * ZFCP_STATUS_COMMON_OPEN must not be reset for the port */ 1755 * ZFCP_STATUS_COMMON_OPEN must not be reset for the port */
1739 atomic_clear_mask(ZFCP_STATUS_PORT_PHYS_OPEN, &port->status); 1756 atomic_clear_mask(ZFCP_STATUS_PORT_PHYS_OPEN, &port->status);
1740 list_for_each_entry(unit, &port->unit_list_head, list) 1757 list_for_each_entry(unit, &port->unit_list_head, list)
1741 atomic_clear_mask(ZFCP_STATUS_COMMON_OPEN, 1758 atomic_clear_mask(ZFCP_STATUS_COMMON_OPEN,
1742 &unit->status); 1759 &unit->status);
1760 zfcp_erp_port_boxed(port, "fscpph2", req);
1761 req->status |= ZFCP_STATUS_FSFREQ_ERROR |
1762 ZFCP_STATUS_FSFREQ_RETRY;
1763
1743 break; 1764 break;
1744 case FSF_ADAPTER_STATUS_AVAILABLE: 1765 case FSF_ADAPTER_STATUS_AVAILABLE:
1745 switch (header->fsf_status_qual.word[0]) { 1766 switch (header->fsf_status_qual.word[0]) {
@@ -2541,7 +2562,6 @@ struct zfcp_fsf_req *zfcp_fsf_control_file(struct zfcp_adapter *adapter,
2541 bytes = zfcp_qdio_sbals_from_sg(req, direction, fsf_cfdc->sg, 2562 bytes = zfcp_qdio_sbals_from_sg(req, direction, fsf_cfdc->sg,
2542 FSF_MAX_SBALS_PER_REQ); 2563 FSF_MAX_SBALS_PER_REQ);
2543 if (bytes != ZFCP_CFDC_MAX_SIZE) { 2564 if (bytes != ZFCP_CFDC_MAX_SIZE) {
2544 retval = -ENOMEM;
2545 zfcp_fsf_req_free(req); 2565 zfcp_fsf_req_free(req);
2546 goto out; 2566 goto out;
2547 } 2567 }
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index 967ede73f4c..6925a178468 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -167,20 +167,21 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
167 struct zfcp_unit *unit = scpnt->device->hostdata; 167 struct zfcp_unit *unit = scpnt->device->hostdata;
168 struct zfcp_fsf_req *old_req, *abrt_req; 168 struct zfcp_fsf_req *old_req, *abrt_req;
169 unsigned long flags; 169 unsigned long flags;
170 unsigned long old_req_id = (unsigned long) scpnt->host_scribble; 170 unsigned long old_reqid = (unsigned long) scpnt->host_scribble;
171 int retval = SUCCESS; 171 int retval = SUCCESS;
172 int retry = 3; 172 int retry = 3;
173 char *dbf_tag;
173 174
174 /* avoid race condition between late normal completion and abort */ 175 /* avoid race condition between late normal completion and abort */
175 write_lock_irqsave(&adapter->abort_lock, flags); 176 write_lock_irqsave(&adapter->abort_lock, flags);
176 177
177 spin_lock(&adapter->req_list_lock); 178 spin_lock(&adapter->req_list_lock);
178 old_req = zfcp_reqlist_find(adapter, old_req_id); 179 old_req = zfcp_reqlist_find(adapter, old_reqid);
179 spin_unlock(&adapter->req_list_lock); 180 spin_unlock(&adapter->req_list_lock);
180 if (!old_req) { 181 if (!old_req) {
181 write_unlock_irqrestore(&adapter->abort_lock, flags); 182 write_unlock_irqrestore(&adapter->abort_lock, flags);
182 zfcp_scsi_dbf_event_abort("lte1", adapter, scpnt, NULL, 183 zfcp_scsi_dbf_event_abort("lte1", adapter, scpnt, NULL,
183 old_req_id); 184 old_reqid);
184 return FAILED; /* completion could be in progress */ 185 return FAILED; /* completion could be in progress */
185 } 186 }
186 old_req->data = NULL; 187 old_req->data = NULL;
@@ -189,7 +190,7 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
189 write_unlock_irqrestore(&adapter->abort_lock, flags); 190 write_unlock_irqrestore(&adapter->abort_lock, flags);
190 191
191 while (retry--) { 192 while (retry--) {
192 abrt_req = zfcp_fsf_abort_fcp_command(old_req_id, unit); 193 abrt_req = zfcp_fsf_abort_fcp_command(old_reqid, unit);
193 if (abrt_req) 194 if (abrt_req)
194 break; 195 break;
195 196
@@ -197,7 +198,7 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
197 if (!(atomic_read(&adapter->status) & 198 if (!(atomic_read(&adapter->status) &
198 ZFCP_STATUS_COMMON_RUNNING)) { 199 ZFCP_STATUS_COMMON_RUNNING)) {
199 zfcp_scsi_dbf_event_abort("nres", adapter, scpnt, NULL, 200 zfcp_scsi_dbf_event_abort("nres", adapter, scpnt, NULL,
200 old_req_id); 201 old_reqid);
201 return SUCCESS; 202 return SUCCESS;
202 } 203 }
203 } 204 }
@@ -208,13 +209,14 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
208 abrt_req->status & ZFCP_STATUS_FSFREQ_COMPLETED); 209 abrt_req->status & ZFCP_STATUS_FSFREQ_COMPLETED);
209 210
210 if (abrt_req->status & ZFCP_STATUS_FSFREQ_ABORTSUCCEEDED) 211 if (abrt_req->status & ZFCP_STATUS_FSFREQ_ABORTSUCCEEDED)
211 zfcp_scsi_dbf_event_abort("okay", adapter, scpnt, abrt_req, 0); 212 dbf_tag = "okay";
212 else if (abrt_req->status & ZFCP_STATUS_FSFREQ_ABORTNOTNEEDED) 213 else if (abrt_req->status & ZFCP_STATUS_FSFREQ_ABORTNOTNEEDED)
213 zfcp_scsi_dbf_event_abort("lte2", adapter, scpnt, abrt_req, 0); 214 dbf_tag = "lte2";
214 else { 215 else {
215 zfcp_scsi_dbf_event_abort("fail", adapter, scpnt, abrt_req, 0); 216 dbf_tag = "fail";
216 retval = FAILED; 217 retval = FAILED;
217 } 218 }
219 zfcp_scsi_dbf_event_abort(dbf_tag, adapter, scpnt, abrt_req, old_reqid);
218 zfcp_fsf_req_free(abrt_req); 220 zfcp_fsf_req_free(abrt_req);
219 return retval; 221 return retval;
220} 222}
@@ -534,6 +536,9 @@ static void zfcp_scsi_rport_register(struct zfcp_port *port)
534 struct fc_rport_identifiers ids; 536 struct fc_rport_identifiers ids;
535 struct fc_rport *rport; 537 struct fc_rport *rport;
536 538
539 if (port->rport)
540 return;
541
537 ids.node_name = port->wwnn; 542 ids.node_name = port->wwnn;
538 ids.port_name = port->wwpn; 543 ids.port_name = port->wwpn;
539 ids.port_id = port->d_id; 544 ids.port_id = port->d_id;
@@ -557,8 +562,10 @@ static void zfcp_scsi_rport_block(struct zfcp_port *port)
557{ 562{
558 struct fc_rport *rport = port->rport; 563 struct fc_rport *rport = port->rport;
559 564
560 if (rport) 565 if (rport) {
561 fc_remote_port_delete(rport); 566 fc_remote_port_delete(rport);
567 port->rport = NULL;
568 }
562} 569}
563 570
564void zfcp_scsi_schedule_rport_register(struct zfcp_port *port) 571void zfcp_scsi_schedule_rport_register(struct zfcp_port *port)
diff --git a/drivers/s390/scsi/zfcp_sysfs.c b/drivers/s390/scsi/zfcp_sysfs.c
index 3e51e64d110..0fe5cce818c 100644
--- a/drivers/s390/scsi/zfcp_sysfs.c
+++ b/drivers/s390/scsi/zfcp_sysfs.c
@@ -494,9 +494,14 @@ static ssize_t zfcp_sysfs_adapter_q_full_show(struct device *dev,
494 struct Scsi_Host *scsi_host = class_to_shost(dev); 494 struct Scsi_Host *scsi_host = class_to_shost(dev);
495 struct zfcp_adapter *adapter = 495 struct zfcp_adapter *adapter =
496 (struct zfcp_adapter *) scsi_host->hostdata[0]; 496 (struct zfcp_adapter *) scsi_host->hostdata[0];
497 u64 util;
498
499 spin_lock_bh(&adapter->qdio_stat_lock);
500 util = adapter->req_q_util;
501 spin_unlock_bh(&adapter->qdio_stat_lock);
497 502
498 return sprintf(buf, "%d %llu\n", atomic_read(&adapter->qdio_outb_full), 503 return sprintf(buf, "%d %llu\n", atomic_read(&adapter->qdio_outb_full),
499 (unsigned long long)adapter->req_q_util); 504 (unsigned long long)util);
500} 505}
501static DEVICE_ATTR(queue_full, S_IRUGO, zfcp_sysfs_adapter_q_full_show, NULL); 506static DEVICE_ATTR(queue_full, S_IRUGO, zfcp_sysfs_adapter_q_full_show, NULL);
502 507
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index 2bc22be5f84..145ab9ba55e 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -415,9 +415,9 @@ static void fc_exch_timeout(struct work_struct *work)
415 e_stat = ep->esb_stat; 415 e_stat = ep->esb_stat;
416 if (e_stat & ESB_ST_COMPLETE) { 416 if (e_stat & ESB_ST_COMPLETE) {
417 ep->esb_stat = e_stat & ~ESB_ST_REC_QUAL; 417 ep->esb_stat = e_stat & ~ESB_ST_REC_QUAL;
418 spin_unlock_bh(&ep->ex_lock);
418 if (e_stat & ESB_ST_REC_QUAL) 419 if (e_stat & ESB_ST_REC_QUAL)
419 fc_exch_rrq(ep); 420 fc_exch_rrq(ep);
420 spin_unlock_bh(&ep->ex_lock);
421 goto done; 421 goto done;
422 } else { 422 } else {
423 resp = ep->resp; 423 resp = ep->resp;
@@ -1624,14 +1624,14 @@ static void fc_exch_rrq(struct fc_exch *ep)
1624 struct fc_lport *lp; 1624 struct fc_lport *lp;
1625 struct fc_els_rrq *rrq; 1625 struct fc_els_rrq *rrq;
1626 struct fc_frame *fp; 1626 struct fc_frame *fp;
1627 struct fc_seq *rrq_sp;
1628 u32 did; 1627 u32 did;
1629 1628
1630 lp = ep->lp; 1629 lp = ep->lp;
1631 1630
1632 fp = fc_frame_alloc(lp, sizeof(*rrq)); 1631 fp = fc_frame_alloc(lp, sizeof(*rrq));
1633 if (!fp) 1632 if (!fp)
1634 return; 1633 goto retry;
1634
1635 rrq = fc_frame_payload_get(fp, sizeof(*rrq)); 1635 rrq = fc_frame_payload_get(fp, sizeof(*rrq));
1636 memset(rrq, 0, sizeof(*rrq)); 1636 memset(rrq, 0, sizeof(*rrq));
1637 rrq->rrq_cmd = ELS_RRQ; 1637 rrq->rrq_cmd = ELS_RRQ;
@@ -1647,13 +1647,20 @@ static void fc_exch_rrq(struct fc_exch *ep)
1647 fc_host_port_id(lp->host), FC_TYPE_ELS, 1647 fc_host_port_id(lp->host), FC_TYPE_ELS,
1648 FC_FC_FIRST_SEQ | FC_FC_END_SEQ | FC_FC_SEQ_INIT, 0); 1648 FC_FC_FIRST_SEQ | FC_FC_END_SEQ | FC_FC_SEQ_INIT, 0);
1649 1649
1650 rrq_sp = fc_exch_seq_send(lp, fp, fc_exch_rrq_resp, NULL, ep, 1650 if (fc_exch_seq_send(lp, fp, fc_exch_rrq_resp, NULL, ep, lp->e_d_tov))
1651 lp->e_d_tov); 1651 return;
1652 if (!rrq_sp) { 1652
1653 ep->esb_stat |= ESB_ST_REC_QUAL; 1653retry:
1654 fc_exch_timer_set_locked(ep, ep->r_a_tov); 1654 spin_lock_bh(&ep->ex_lock);
1655 if (ep->state & (FC_EX_RST_CLEANUP | FC_EX_DONE)) {
1656 spin_unlock_bh(&ep->ex_lock);
1657 /* drop hold for rec qual */
1658 fc_exch_release(ep);
1655 return; 1659 return;
1656 } 1660 }
1661 ep->esb_stat |= ESB_ST_REC_QUAL;
1662 fc_exch_timer_set_locked(ep, ep->r_a_tov);
1663 spin_unlock_bh(&ep->ex_lock);
1657} 1664}
1658 1665
1659 1666
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 716cc344c5d..a751f6230c2 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1974,10 +1974,10 @@ int iscsi_eh_abort(struct scsi_cmnd *sc)
1974 * good and have never sent us a successful tmf response 1974 * good and have never sent us a successful tmf response
1975 * then sent more data for the cmd. 1975 * then sent more data for the cmd.
1976 */ 1976 */
1977 spin_lock(&session->lock); 1977 spin_lock_bh(&session->lock);
1978 fail_scsi_task(task, DID_ABORT); 1978 fail_scsi_task(task, DID_ABORT);
1979 conn->tmf_state = TMF_INITIAL; 1979 conn->tmf_state = TMF_INITIAL;
1980 spin_unlock(&session->lock); 1980 spin_unlock_bh(&session->lock);
1981 iscsi_start_tx(conn); 1981 iscsi_start_tx(conn);
1982 goto success_unlocked; 1982 goto success_unlocked;
1983 case TMF_TIMEDOUT: 1983 case TMF_TIMEDOUT:
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index 54fa1e42dc4..b3381959acc 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -766,6 +766,7 @@ static int sas_ex_join_wide_port(struct domain_device *parent, int phy_id)
766 if (!memcmp(phy->attached_sas_addr, ephy->attached_sas_addr, 766 if (!memcmp(phy->attached_sas_addr, ephy->attached_sas_addr,
767 SAS_ADDR_SIZE) && ephy->port) { 767 SAS_ADDR_SIZE) && ephy->port) {
768 sas_port_add_phy(ephy->port, phy->phy); 768 sas_port_add_phy(ephy->port, phy->phy);
769 phy->port = ephy->port;
769 phy->phy_state = PHY_DEVICE_DISCOVERED; 770 phy->phy_state = PHY_DEVICE_DISCOVERED;
770 return 0; 771 return 0;
771 } 772 }
@@ -945,11 +946,21 @@ static int sas_ex_discover_dev(struct domain_device *dev, int phy_id)
945 if (ex->ex_phy[i].phy_state == PHY_VACANT || 946 if (ex->ex_phy[i].phy_state == PHY_VACANT ||
946 ex->ex_phy[i].phy_state == PHY_NOT_PRESENT) 947 ex->ex_phy[i].phy_state == PHY_NOT_PRESENT)
947 continue; 948 continue;
948 949 /*
950 * Due to races, the phy might not get added to the
951 * wide port, so we add the phy to the wide port here.
952 */
949 if (SAS_ADDR(ex->ex_phy[i].attached_sas_addr) == 953 if (SAS_ADDR(ex->ex_phy[i].attached_sas_addr) ==
950 SAS_ADDR(child->sas_addr)) 954 SAS_ADDR(child->sas_addr)) {
951 ex->ex_phy[i].phy_state= PHY_DEVICE_DISCOVERED; 955 ex->ex_phy[i].phy_state= PHY_DEVICE_DISCOVERED;
956 res = sas_ex_join_wide_port(dev, i);
957 if (!res)
958 SAS_DPRINTK("Attaching ex phy%d to wide port %016llx\n",
959 i, SAS_ADDR(ex->ex_phy[i].attached_sas_addr));
960
961 }
952 } 962 }
963 res = 0;
953 } 964 }
954 965
955 return res; 966 return res;
@@ -1598,7 +1609,7 @@ static int sas_get_phy_attached_sas_addr(struct domain_device *dev,
1598} 1609}
1599 1610
1600static int sas_find_bcast_phy(struct domain_device *dev, int *phy_id, 1611static int sas_find_bcast_phy(struct domain_device *dev, int *phy_id,
1601 int from_phy) 1612 int from_phy, bool update)
1602{ 1613{
1603 struct expander_device *ex = &dev->ex_dev; 1614 struct expander_device *ex = &dev->ex_dev;
1604 int res = 0; 1615 int res = 0;
@@ -1611,7 +1622,9 @@ static int sas_find_bcast_phy(struct domain_device *dev, int *phy_id,
1611 if (res) 1622 if (res)
1612 goto out; 1623 goto out;
1613 else if (phy_change_count != ex->ex_phy[i].phy_change_count) { 1624 else if (phy_change_count != ex->ex_phy[i].phy_change_count) {
1614 ex->ex_phy[i].phy_change_count = phy_change_count; 1625 if (update)
1626 ex->ex_phy[i].phy_change_count =
1627 phy_change_count;
1615 *phy_id = i; 1628 *phy_id = i;
1616 return 0; 1629 return 0;
1617 } 1630 }
@@ -1653,31 +1666,52 @@ out:
1653 kfree(rg_req); 1666 kfree(rg_req);
1654 return res; 1667 return res;
1655} 1668}
1669/**
1670 * sas_find_bcast_dev - find the device issue BROADCAST(CHANGE).
1671 * @dev:domain device to be detect.
1672 * @src_dev: the device which originated BROADCAST(CHANGE).
1673 *
1674 * Add self-configuration expander suport. Suppose two expander cascading,
1675 * when the first level expander is self-configuring, hotplug the disks in
1676 * second level expander, BROADCAST(CHANGE) will not only be originated
1677 * in the second level expander, but also be originated in the first level
1678 * expander (see SAS protocol SAS 2r-14, 7.11 for detail), it is to say,
1679 * expander changed count in two level expanders will all increment at least
1680 * once, but the phy which chang count has changed is the source device which
1681 * we concerned.
1682 */
1656 1683
1657static int sas_find_bcast_dev(struct domain_device *dev, 1684static int sas_find_bcast_dev(struct domain_device *dev,
1658 struct domain_device **src_dev) 1685 struct domain_device **src_dev)
1659{ 1686{
1660 struct expander_device *ex = &dev->ex_dev; 1687 struct expander_device *ex = &dev->ex_dev;
1661 int ex_change_count = -1; 1688 int ex_change_count = -1;
1689 int phy_id = -1;
1662 int res; 1690 int res;
1691 struct domain_device *ch;
1663 1692
1664 res = sas_get_ex_change_count(dev, &ex_change_count); 1693 res = sas_get_ex_change_count(dev, &ex_change_count);
1665 if (res) 1694 if (res)
1666 goto out; 1695 goto out;
1667 if (ex_change_count != -1 && 1696 if (ex_change_count != -1 && ex_change_count != ex->ex_change_count) {
1668 ex_change_count != ex->ex_change_count) { 1697 /* Just detect if this expander phys phy change count changed,
1669 *src_dev = dev; 1698 * in order to determine if this expander originate BROADCAST,
1670 ex->ex_change_count = ex_change_count; 1699 * and do not update phy change count field in our structure.
1671 } else { 1700 */
1672 struct domain_device *ch; 1701 res = sas_find_bcast_phy(dev, &phy_id, 0, false);
1673 1702 if (phy_id != -1) {
1674 list_for_each_entry(ch, &ex->children, siblings) { 1703 *src_dev = dev;
1675 if (ch->dev_type == EDGE_DEV || 1704 ex->ex_change_count = ex_change_count;
1676 ch->dev_type == FANOUT_DEV) { 1705 SAS_DPRINTK("Expander phy change count has changed\n");
1677 res = sas_find_bcast_dev(ch, src_dev); 1706 return res;
1678 if (src_dev) 1707 } else
1679 return res; 1708 SAS_DPRINTK("Expander phys DID NOT change\n");
1680 } 1709 }
1710 list_for_each_entry(ch, &ex->children, siblings) {
1711 if (ch->dev_type == EDGE_DEV || ch->dev_type == FANOUT_DEV) {
1712 res = sas_find_bcast_dev(ch, src_dev);
1713 if (src_dev)
1714 return res;
1681 } 1715 }
1682 } 1716 }
1683out: 1717out:
@@ -1700,24 +1734,26 @@ static void sas_unregister_ex_tree(struct domain_device *dev)
1700} 1734}
1701 1735
1702static void sas_unregister_devs_sas_addr(struct domain_device *parent, 1736static void sas_unregister_devs_sas_addr(struct domain_device *parent,
1703 int phy_id) 1737 int phy_id, bool last)
1704{ 1738{
1705 struct expander_device *ex_dev = &parent->ex_dev; 1739 struct expander_device *ex_dev = &parent->ex_dev;
1706 struct ex_phy *phy = &ex_dev->ex_phy[phy_id]; 1740 struct ex_phy *phy = &ex_dev->ex_phy[phy_id];
1707 struct domain_device *child, *n; 1741 struct domain_device *child, *n;
1708 1742 if (last) {
1709 list_for_each_entry_safe(child, n, &ex_dev->children, siblings) { 1743 list_for_each_entry_safe(child, n,
1710 if (SAS_ADDR(child->sas_addr) == 1744 &ex_dev->children, siblings) {
1711 SAS_ADDR(phy->attached_sas_addr)) { 1745 if (SAS_ADDR(child->sas_addr) ==
1712 if (child->dev_type == EDGE_DEV || 1746 SAS_ADDR(phy->attached_sas_addr)) {
1713 child->dev_type == FANOUT_DEV) 1747 if (child->dev_type == EDGE_DEV ||
1714 sas_unregister_ex_tree(child); 1748 child->dev_type == FANOUT_DEV)
1715 else 1749 sas_unregister_ex_tree(child);
1716 sas_unregister_dev(child); 1750 else
1717 break; 1751 sas_unregister_dev(child);
1752 break;
1753 }
1718 } 1754 }
1755 sas_disable_routing(parent, phy->attached_sas_addr);
1719 } 1756 }
1720 sas_disable_routing(parent, phy->attached_sas_addr);
1721 memset(phy->attached_sas_addr, 0, SAS_ADDR_SIZE); 1757 memset(phy->attached_sas_addr, 0, SAS_ADDR_SIZE);
1722 sas_port_delete_phy(phy->port, phy->phy); 1758 sas_port_delete_phy(phy->port, phy->phy);
1723 if (phy->port->num_phys == 0) 1759 if (phy->port->num_phys == 0)
@@ -1770,15 +1806,31 @@ static int sas_discover_new(struct domain_device *dev, int phy_id)
1770{ 1806{
1771 struct ex_phy *ex_phy = &dev->ex_dev.ex_phy[phy_id]; 1807 struct ex_phy *ex_phy = &dev->ex_dev.ex_phy[phy_id];
1772 struct domain_device *child; 1808 struct domain_device *child;
1773 int res; 1809 bool found = false;
1810 int res, i;
1774 1811
1775 SAS_DPRINTK("ex %016llx phy%d new device attached\n", 1812 SAS_DPRINTK("ex %016llx phy%d new device attached\n",
1776 SAS_ADDR(dev->sas_addr), phy_id); 1813 SAS_ADDR(dev->sas_addr), phy_id);
1777 res = sas_ex_phy_discover(dev, phy_id); 1814 res = sas_ex_phy_discover(dev, phy_id);
1778 if (res) 1815 if (res)
1779 goto out; 1816 goto out;
1817 /* to support the wide port inserted */
1818 for (i = 0; i < dev->ex_dev.num_phys; i++) {
1819 struct ex_phy *ex_phy_temp = &dev->ex_dev.ex_phy[i];
1820 if (i == phy_id)
1821 continue;
1822 if (SAS_ADDR(ex_phy_temp->attached_sas_addr) ==
1823 SAS_ADDR(ex_phy->attached_sas_addr)) {
1824 found = true;
1825 break;
1826 }
1827 }
1828 if (found) {
1829 sas_ex_join_wide_port(dev, phy_id);
1830 return 0;
1831 }
1780 res = sas_ex_discover_devices(dev, phy_id); 1832 res = sas_ex_discover_devices(dev, phy_id);
1781 if (res) 1833 if (!res)
1782 goto out; 1834 goto out;
1783 list_for_each_entry(child, &dev->ex_dev.children, siblings) { 1835 list_for_each_entry(child, &dev->ex_dev.children, siblings) {
1784 if (SAS_ADDR(child->sas_addr) == 1836 if (SAS_ADDR(child->sas_addr) ==
@@ -1793,7 +1845,7 @@ out:
1793 return res; 1845 return res;
1794} 1846}
1795 1847
1796static int sas_rediscover_dev(struct domain_device *dev, int phy_id) 1848static int sas_rediscover_dev(struct domain_device *dev, int phy_id, bool last)
1797{ 1849{
1798 struct expander_device *ex = &dev->ex_dev; 1850 struct expander_device *ex = &dev->ex_dev;
1799 struct ex_phy *phy = &ex->ex_phy[phy_id]; 1851 struct ex_phy *phy = &ex->ex_phy[phy_id];
@@ -1804,11 +1856,11 @@ static int sas_rediscover_dev(struct domain_device *dev, int phy_id)
1804 switch (res) { 1856 switch (res) {
1805 case SMP_RESP_NO_PHY: 1857 case SMP_RESP_NO_PHY:
1806 phy->phy_state = PHY_NOT_PRESENT; 1858 phy->phy_state = PHY_NOT_PRESENT;
1807 sas_unregister_devs_sas_addr(dev, phy_id); 1859 sas_unregister_devs_sas_addr(dev, phy_id, last);
1808 goto out; break; 1860 goto out; break;
1809 case SMP_RESP_PHY_VACANT: 1861 case SMP_RESP_PHY_VACANT:
1810 phy->phy_state = PHY_VACANT; 1862 phy->phy_state = PHY_VACANT;
1811 sas_unregister_devs_sas_addr(dev, phy_id); 1863 sas_unregister_devs_sas_addr(dev, phy_id, last);
1812 goto out; break; 1864 goto out; break;
1813 case SMP_RESP_FUNC_ACC: 1865 case SMP_RESP_FUNC_ACC:
1814 break; 1866 break;
@@ -1816,7 +1868,7 @@ static int sas_rediscover_dev(struct domain_device *dev, int phy_id)
1816 1868
1817 if (SAS_ADDR(attached_sas_addr) == 0) { 1869 if (SAS_ADDR(attached_sas_addr) == 0) {
1818 phy->phy_state = PHY_EMPTY; 1870 phy->phy_state = PHY_EMPTY;
1819 sas_unregister_devs_sas_addr(dev, phy_id); 1871 sas_unregister_devs_sas_addr(dev, phy_id, last);
1820 } else if (SAS_ADDR(attached_sas_addr) == 1872 } else if (SAS_ADDR(attached_sas_addr) ==
1821 SAS_ADDR(phy->attached_sas_addr)) { 1873 SAS_ADDR(phy->attached_sas_addr)) {
1822 SAS_DPRINTK("ex %016llx phy 0x%x broadcast flutter\n", 1874 SAS_DPRINTK("ex %016llx phy 0x%x broadcast flutter\n",
@@ -1828,12 +1880,27 @@ out:
1828 return res; 1880 return res;
1829} 1881}
1830 1882
1883/**
1884 * sas_rediscover - revalidate the domain.
1885 * @dev:domain device to be detect.
1886 * @phy_id: the phy id will be detected.
1887 *
1888 * NOTE: this process _must_ quit (return) as soon as any connection
1889 * errors are encountered. Connection recovery is done elsewhere.
1890 * Discover process only interrogates devices in order to discover the
1891 * domain.For plugging out, we un-register the device only when it is
1892 * the last phy in the port, for other phys in this port, we just delete it
1893 * from the port.For inserting, we do discovery when it is the
1894 * first phy,for other phys in this port, we add it to the port to
1895 * forming the wide-port.
1896 */
1831static int sas_rediscover(struct domain_device *dev, const int phy_id) 1897static int sas_rediscover(struct domain_device *dev, const int phy_id)
1832{ 1898{
1833 struct expander_device *ex = &dev->ex_dev; 1899 struct expander_device *ex = &dev->ex_dev;
1834 struct ex_phy *changed_phy = &ex->ex_phy[phy_id]; 1900 struct ex_phy *changed_phy = &ex->ex_phy[phy_id];
1835 int res = 0; 1901 int res = 0;
1836 int i; 1902 int i;
1903 bool last = true; /* is this the last phy of the port */
1837 1904
1838 SAS_DPRINTK("ex %016llx phy%d originated BROADCAST(CHANGE)\n", 1905 SAS_DPRINTK("ex %016llx phy%d originated BROADCAST(CHANGE)\n",
1839 SAS_ADDR(dev->sas_addr), phy_id); 1906 SAS_ADDR(dev->sas_addr), phy_id);
@@ -1848,13 +1915,13 @@ static int sas_rediscover(struct domain_device *dev, const int phy_id)
1848 SAS_ADDR(changed_phy->attached_sas_addr)) { 1915 SAS_ADDR(changed_phy->attached_sas_addr)) {
1849 SAS_DPRINTK("phy%d part of wide port with " 1916 SAS_DPRINTK("phy%d part of wide port with "
1850 "phy%d\n", phy_id, i); 1917 "phy%d\n", phy_id, i);
1851 goto out; 1918 last = false;
1919 break;
1852 } 1920 }
1853 } 1921 }
1854 res = sas_rediscover_dev(dev, phy_id); 1922 res = sas_rediscover_dev(dev, phy_id, last);
1855 } else 1923 } else
1856 res = sas_discover_new(dev, phy_id); 1924 res = sas_discover_new(dev, phy_id);
1857out:
1858 return res; 1925 return res;
1859} 1926}
1860 1927
@@ -1881,7 +1948,7 @@ int sas_ex_revalidate_domain(struct domain_device *port_dev)
1881 1948
1882 do { 1949 do {
1883 phy_id = -1; 1950 phy_id = -1;
1884 res = sas_find_bcast_phy(dev, &phy_id, i); 1951 res = sas_find_bcast_phy(dev, &phy_id, i, true);
1885 if (phy_id == -1) 1952 if (phy_id == -1)
1886 break; 1953 break;
1887 res = sas_rediscover(dev, phy_id); 1954 res = sas_rediscover(dev, phy_id);
diff --git a/drivers/scsi/libsas/sas_port.c b/drivers/scsi/libsas/sas_port.c
index e6ac59c023f..fe8b74c706d 100644
--- a/drivers/scsi/libsas/sas_port.c
+++ b/drivers/scsi/libsas/sas_port.c
@@ -56,7 +56,7 @@ static void sas_form_port(struct asd_sas_phy *phy)
56 } 56 }
57 } 57 }
58 58
59 /* find a port */ 59 /* see if the phy should be part of a wide port */
60 spin_lock_irqsave(&sas_ha->phy_port_lock, flags); 60 spin_lock_irqsave(&sas_ha->phy_port_lock, flags);
61 for (i = 0; i < sas_ha->num_phys; i++) { 61 for (i = 0; i < sas_ha->num_phys; i++) {
62 port = sas_ha->sas_port[i]; 62 port = sas_ha->sas_port[i];
@@ -69,12 +69,23 @@ static void sas_form_port(struct asd_sas_phy *phy)
69 SAS_DPRINTK("phy%d matched wide port%d\n", phy->id, 69 SAS_DPRINTK("phy%d matched wide port%d\n", phy->id,
70 port->id); 70 port->id);
71 break; 71 break;
72 } else if (*(u64 *) port->sas_addr == 0 && port->num_phys==0) {
73 memcpy(port->sas_addr, phy->sas_addr, SAS_ADDR_SIZE);
74 break;
75 } 72 }
76 spin_unlock(&port->phy_list_lock); 73 spin_unlock(&port->phy_list_lock);
77 } 74 }
75 /* The phy does not match any existing port, create a new one */
76 if (i == sas_ha->num_phys) {
77 for (i = 0; i < sas_ha->num_phys; i++) {
78 port = sas_ha->sas_port[i];
79 spin_lock(&port->phy_list_lock);
80 if (*(u64 *)port->sas_addr == 0
81 && port->num_phys == 0) {
82 memcpy(port->sas_addr, phy->sas_addr,
83 SAS_ADDR_SIZE);
84 break;
85 }
86 spin_unlock(&port->phy_list_lock);
87 }
88 }
78 89
79 if (i >= sas_ha->num_phys) { 90 if (i >= sas_ha->num_phys) {
80 printk(KERN_NOTICE "%s: couldn't find a free port, bug?\n", 91 printk(KERN_NOTICE "%s: couldn't find a free port, bug?\n",
diff --git a/drivers/scsi/qla4xxx/ql4_dbg.c b/drivers/scsi/qla4xxx/ql4_dbg.c
index fcc184cd066..cbceb0ebabf 100644
--- a/drivers/scsi/qla4xxx/ql4_dbg.c
+++ b/drivers/scsi/qla4xxx/ql4_dbg.c
@@ -15,19 +15,18 @@ void qla4xxx_dump_buffer(void *b, uint32_t size)
15 uint32_t cnt; 15 uint32_t cnt;
16 uint8_t *c = b; 16 uint8_t *c = b;
17 17
18 printk(" 0 1 2 3 4 5 6 7 8 9 Ah Bh Ch Dh Eh " 18 printk(" 0 1 2 3 4 5 6 7 8 9 Ah Bh Ch Dh Eh "
19 "Fh\n"); 19 "Fh\n");
20 printk("------------------------------------------------------------" 20 printk("------------------------------------------------------------"
21 "--\n"); 21 "--\n");
22 for (cnt = 0; cnt < size; cnt++, c++) { 22 for (cnt = 0; cnt < size; c++) {
23 printk(KERN_DEBUG "%02x", *c); 23 printk(KERN_INFO "%02x", *c);
24 if (!(cnt % 16)) 24 if (!(++cnt % 16))
25 printk(KERN_DEBUG "\n"); 25 printk(KERN_INFO "\n");
26 26
27 else 27 else
28 printk(KERN_DEBUG " "); 28 printk(KERN_INFO " ");
29 } 29 }
30 if (cnt % 16) 30 printk(KERN_INFO "\n");
31 printk(KERN_DEBUG "\n");
32} 31}
33 32
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
index b586f27c3bd..81b5f29254e 100644
--- a/drivers/scsi/qla4xxx/ql4_def.h
+++ b/drivers/scsi/qla4xxx/ql4_def.h
@@ -100,7 +100,6 @@
100#define MAX_SRBS MAX_CMDS_TO_RISC 100#define MAX_SRBS MAX_CMDS_TO_RISC
101#define MBOX_AEN_REG_COUNT 5 101#define MBOX_AEN_REG_COUNT 5
102#define MAX_INIT_RETRIES 5 102#define MAX_INIT_RETRIES 5
103#define IOCB_HIWAT_CUSHION 16
104 103
105/* 104/*
106 * Buffer sizes 105 * Buffer sizes
@@ -184,6 +183,11 @@ struct srb {
184 uint16_t cc_stat; 183 uint16_t cc_stat;
185 u_long r_start; /* Time we recieve a cmd from OS */ 184 u_long r_start; /* Time we recieve a cmd from OS */
186 u_long u_start; /* Time when we handed the cmd to F/W */ 185 u_long u_start; /* Time when we handed the cmd to F/W */
186
187 /* Used for extended sense / status continuation */
188 uint8_t *req_sense_ptr;
189 uint16_t req_sense_len;
190 uint16_t reserved2;
187}; 191};
188 192
189/* 193/*
@@ -302,7 +306,6 @@ struct scsi_qla_host {
302 uint32_t tot_ddbs; 306 uint32_t tot_ddbs;
303 307
304 uint16_t iocb_cnt; 308 uint16_t iocb_cnt;
305 uint16_t iocb_hiwat;
306 309
307 /* SRB cache. */ 310 /* SRB cache. */
308#define SRB_MIN_REQ 128 311#define SRB_MIN_REQ 128
@@ -436,6 +439,8 @@ struct scsi_qla_host {
436 /* Map ddb_list entry by FW ddb index */ 439 /* Map ddb_list entry by FW ddb index */
437 struct ddb_entry *fw_ddb_index_map[MAX_DDB_ENTRIES]; 440 struct ddb_entry *fw_ddb_index_map[MAX_DDB_ENTRIES];
438 441
442 /* Saved srb for status continuation entry processing */
443 struct srb *status_srb;
439}; 444};
440 445
441static inline int is_qla4010(struct scsi_qla_host *ha) 446static inline int is_qla4010(struct scsi_qla_host *ha)
diff --git a/drivers/scsi/qla4xxx/ql4_fw.h b/drivers/scsi/qla4xxx/ql4_fw.h
index 1b667a70cff..9cd7a608df3 100644
--- a/drivers/scsi/qla4xxx/ql4_fw.h
+++ b/drivers/scsi/qla4xxx/ql4_fw.h
@@ -572,6 +572,7 @@ struct conn_event_log_entry {
572 *************************************************************************/ 572 *************************************************************************/
573#define IOCB_MAX_CDB_LEN 16 /* Bytes in a CBD */ 573#define IOCB_MAX_CDB_LEN 16 /* Bytes in a CBD */
574#define IOCB_MAX_SENSEDATA_LEN 32 /* Bytes of sense data */ 574#define IOCB_MAX_SENSEDATA_LEN 32 /* Bytes of sense data */
575#define IOCB_MAX_EXT_SENSEDATA_LEN 60 /* Bytes of extended sense data */
575 576
576/* IOCB header structure */ 577/* IOCB header structure */
577struct qla4_header { 578struct qla4_header {
@@ -733,6 +734,12 @@ struct status_entry {
733 734
734}; 735};
735 736
737/* Status Continuation entry */
738struct status_cont_entry {
739 struct qla4_header hdr; /* 00-03 */
740 uint8_t ext_sense_data[IOCB_MAX_EXT_SENSEDATA_LEN]; /* 04-63 */
741};
742
736struct passthru0 { 743struct passthru0 {
737 struct qla4_header hdr; /* 00-03 */ 744 struct qla4_header hdr; /* 00-03 */
738 uint32_t handle; /* 04-07 */ 745 uint32_t handle; /* 04-07 */
diff --git a/drivers/scsi/qla4xxx/ql4_iocb.c b/drivers/scsi/qla4xxx/ql4_iocb.c
index 912a67494ad..e0c32159749 100644
--- a/drivers/scsi/qla4xxx/ql4_iocb.c
+++ b/drivers/scsi/qla4xxx/ql4_iocb.c
@@ -10,9 +10,42 @@
10#include "ql4_dbg.h" 10#include "ql4_dbg.h"
11#include "ql4_inline.h" 11#include "ql4_inline.h"
12 12
13
14#include <scsi/scsi_tcq.h> 13#include <scsi/scsi_tcq.h>
15 14
15static int
16qla4xxx_space_in_req_ring(struct scsi_qla_host *ha, uint16_t req_cnt)
17{
18 uint16_t cnt;
19
20 /* Calculate number of free request entries. */
21 if ((req_cnt + 2) >= ha->req_q_count) {
22 cnt = (uint16_t) le32_to_cpu(ha->shadow_regs->req_q_out);
23 if (ha->request_in < cnt)
24 ha->req_q_count = cnt - ha->request_in;
25 else
26 ha->req_q_count = REQUEST_QUEUE_DEPTH -
27 (ha->request_in - cnt);
28 }
29
30 /* Check if room for request in request ring. */
31 if ((req_cnt + 2) < ha->req_q_count)
32 return 1;
33 else
34 return 0;
35}
36
37static void qla4xxx_advance_req_ring_ptr(struct scsi_qla_host *ha)
38{
39 /* Advance request queue pointer */
40 if (ha->request_in == (REQUEST_QUEUE_DEPTH - 1)) {
41 ha->request_in = 0;
42 ha->request_ptr = ha->request_ring;
43 } else {
44 ha->request_in++;
45 ha->request_ptr++;
46 }
47}
48
16/** 49/**
17 * qla4xxx_get_req_pkt - returns a valid entry in request queue. 50 * qla4xxx_get_req_pkt - returns a valid entry in request queue.
18 * @ha: Pointer to host adapter structure. 51 * @ha: Pointer to host adapter structure.
@@ -26,35 +59,18 @@
26static int qla4xxx_get_req_pkt(struct scsi_qla_host *ha, 59static int qla4xxx_get_req_pkt(struct scsi_qla_host *ha,
27 struct queue_entry **queue_entry) 60 struct queue_entry **queue_entry)
28{ 61{
29 uint16_t request_in; 62 uint16_t req_cnt = 1;
30 uint8_t status = QLA_SUCCESS;
31
32 *queue_entry = ha->request_ptr;
33 63
34 /* get the latest request_in and request_out index */ 64 if (qla4xxx_space_in_req_ring(ha, req_cnt)) {
35 request_in = ha->request_in; 65 *queue_entry = ha->request_ptr;
36 ha->request_out = (uint16_t) le32_to_cpu(ha->shadow_regs->req_q_out);
37
38 /* Advance request queue pointer and check for queue full */
39 if (request_in == (REQUEST_QUEUE_DEPTH - 1)) {
40 request_in = 0;
41 ha->request_ptr = ha->request_ring;
42 } else {
43 request_in++;
44 ha->request_ptr++;
45 }
46
47 /* request queue is full, try again later */
48 if ((ha->iocb_cnt + 1) >= ha->iocb_hiwat) {
49 /* restore request pointer */
50 ha->request_ptr = *queue_entry;
51 status = QLA_ERROR;
52 } else {
53 ha->request_in = request_in;
54 memset(*queue_entry, 0, sizeof(**queue_entry)); 66 memset(*queue_entry, 0, sizeof(**queue_entry));
67
68 qla4xxx_advance_req_ring_ptr(ha);
69 ha->req_q_count -= req_cnt;
70 return QLA_SUCCESS;
55 } 71 }
56 72
57 return status; 73 return QLA_ERROR;
58} 74}
59 75
60/** 76/**
@@ -100,21 +116,14 @@ exit_send_marker:
100 return status; 116 return status;
101} 117}
102 118
103static struct continuation_t1_entry* qla4xxx_alloc_cont_entry( 119static struct continuation_t1_entry *
104 struct scsi_qla_host *ha) 120qla4xxx_alloc_cont_entry(struct scsi_qla_host *ha)
105{ 121{
106 struct continuation_t1_entry *cont_entry; 122 struct continuation_t1_entry *cont_entry;
107 123
108 cont_entry = (struct continuation_t1_entry *)ha->request_ptr; 124 cont_entry = (struct continuation_t1_entry *)ha->request_ptr;
109 125
110 /* Advance request queue pointer */ 126 qla4xxx_advance_req_ring_ptr(ha);
111 if (ha->request_in == (REQUEST_QUEUE_DEPTH - 1)) {
112 ha->request_in = 0;
113 ha->request_ptr = ha->request_ring;
114 } else {
115 ha->request_in++;
116 ha->request_ptr++;
117 }
118 127
119 /* Load packet defaults */ 128 /* Load packet defaults */
120 cont_entry->hdr.entryType = ET_CONTINUE; 129 cont_entry->hdr.entryType = ET_CONTINUE;
@@ -197,13 +206,10 @@ int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb * srb)
197 struct scsi_cmnd *cmd = srb->cmd; 206 struct scsi_cmnd *cmd = srb->cmd;
198 struct ddb_entry *ddb_entry; 207 struct ddb_entry *ddb_entry;
199 struct command_t3_entry *cmd_entry; 208 struct command_t3_entry *cmd_entry;
200
201 int nseg; 209 int nseg;
202 uint16_t tot_dsds; 210 uint16_t tot_dsds;
203 uint16_t req_cnt; 211 uint16_t req_cnt;
204
205 unsigned long flags; 212 unsigned long flags;
206 uint16_t cnt;
207 uint32_t index; 213 uint32_t index;
208 char tag[2]; 214 char tag[2];
209 215
@@ -217,6 +223,19 @@ int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb * srb)
217 223
218 index = (uint32_t)cmd->request->tag; 224 index = (uint32_t)cmd->request->tag;
219 225
226 /*
227 * Check to see if adapter is online before placing request on
228 * request queue. If a reset occurs and a request is in the queue,
229 * the firmware will still attempt to process the request, retrieving
230 * garbage for pointers.
231 */
232 if (!test_bit(AF_ONLINE, &ha->flags)) {
233 DEBUG2(printk("scsi%ld: %s: Adapter OFFLINE! "
234 "Do not issue command.\n",
235 ha->host_no, __func__));
236 goto queuing_error;
237 }
238
220 /* Calculate the number of request entries needed. */ 239 /* Calculate the number of request entries needed. */
221 nseg = scsi_dma_map(cmd); 240 nseg = scsi_dma_map(cmd);
222 if (nseg < 0) 241 if (nseg < 0)
@@ -224,17 +243,7 @@ int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb * srb)
224 tot_dsds = nseg; 243 tot_dsds = nseg;
225 244
226 req_cnt = qla4xxx_calc_request_entries(tot_dsds); 245 req_cnt = qla4xxx_calc_request_entries(tot_dsds);
227 246 if (!qla4xxx_space_in_req_ring(ha, req_cnt))
228 if (ha->req_q_count < (req_cnt + 2)) {
229 cnt = (uint16_t) le32_to_cpu(ha->shadow_regs->req_q_out);
230 if (ha->request_in < cnt)
231 ha->req_q_count = cnt - ha->request_in;
232 else
233 ha->req_q_count = REQUEST_QUEUE_DEPTH -
234 (ha->request_in - cnt);
235 }
236
237 if (ha->req_q_count < (req_cnt + 2))
238 goto queuing_error; 247 goto queuing_error;
239 248
240 /* total iocbs active */ 249 /* total iocbs active */
@@ -286,32 +295,10 @@ int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb * srb)
286 break; 295 break;
287 } 296 }
288 297
289 298 qla4xxx_advance_req_ring_ptr(ha);
290 /* Advance request queue pointer */
291 ha->request_in++;
292 if (ha->request_in == REQUEST_QUEUE_DEPTH) {
293 ha->request_in = 0;
294 ha->request_ptr = ha->request_ring;
295 } else
296 ha->request_ptr++;
297
298
299 qla4xxx_build_scsi_iocbs(srb, cmd_entry, tot_dsds); 299 qla4xxx_build_scsi_iocbs(srb, cmd_entry, tot_dsds);
300 wmb(); 300 wmb();
301 301
302 /*
303 * Check to see if adapter is online before placing request on
304 * request queue. If a reset occurs and a request is in the queue,
305 * the firmware will still attempt to process the request, retrieving
306 * garbage for pointers.
307 */
308 if (!test_bit(AF_ONLINE, &ha->flags)) {
309 DEBUG2(printk("scsi%ld: %s: Adapter OFFLINE! "
310 "Do not issue command.\n",
311 ha->host_no, __func__));
312 goto queuing_error;
313 }
314
315 srb->cmd->host_scribble = (unsigned char *)srb; 302 srb->cmd->host_scribble = (unsigned char *)srb;
316 303
317 /* update counters */ 304 /* update counters */
diff --git a/drivers/scsi/qla4xxx/ql4_isr.c b/drivers/scsi/qla4xxx/ql4_isr.c
index 799120fcb9b..8025ee16588 100644
--- a/drivers/scsi/qla4xxx/ql4_isr.c
+++ b/drivers/scsi/qla4xxx/ql4_isr.c
@@ -11,6 +11,98 @@
11#include "ql4_inline.h" 11#include "ql4_inline.h"
12 12
13/** 13/**
14 * qla4xxx_copy_sense - copy sense data into cmd sense buffer
15 * @ha: Pointer to host adapter structure.
16 * @sts_entry: Pointer to status entry structure.
17 * @srb: Pointer to srb structure.
18 **/
19static void qla4xxx_copy_sense(struct scsi_qla_host *ha,
20 struct status_entry *sts_entry,
21 struct srb *srb)
22{
23 struct scsi_cmnd *cmd = srb->cmd;
24 uint16_t sense_len;
25
26 memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
27 sense_len = le16_to_cpu(sts_entry->senseDataByteCnt);
28 if (sense_len == 0)
29 return;
30
31 /* Save total available sense length,
32 * not to exceed cmd's sense buffer size */
33 sense_len = min_t(uint16_t, sense_len, SCSI_SENSE_BUFFERSIZE);
34 srb->req_sense_ptr = cmd->sense_buffer;
35 srb->req_sense_len = sense_len;
36
37 /* Copy sense from sts_entry pkt */
38 sense_len = min_t(uint16_t, sense_len, IOCB_MAX_SENSEDATA_LEN);
39 memcpy(cmd->sense_buffer, sts_entry->senseData, sense_len);
40
41 DEBUG2(printk(KERN_INFO "scsi%ld:%d:%d:%d: %s: sense key = %x, "
42 "ASL= %02x, ASC/ASCQ = %02x/%02x\n", ha->host_no,
43 cmd->device->channel, cmd->device->id,
44 cmd->device->lun, __func__,
45 sts_entry->senseData[2] & 0x0f,
46 sts_entry->senseData[7],
47 sts_entry->senseData[12],
48 sts_entry->senseData[13]));
49
50 DEBUG5(qla4xxx_dump_buffer(cmd->sense_buffer, sense_len));
51 srb->flags |= SRB_GOT_SENSE;
52
53 /* Update srb, in case a sts_cont pkt follows */
54 srb->req_sense_ptr += sense_len;
55 srb->req_sense_len -= sense_len;
56 if (srb->req_sense_len != 0)
57 ha->status_srb = srb;
58 else
59 ha->status_srb = NULL;
60}
61
62/**
63 * qla4xxx_status_cont_entry - Process a Status Continuations entry.
64 * @ha: SCSI driver HA context
65 * @sts_cont: Entry pointer
66 *
67 * Extended sense data.
68 */
69static void
70qla4xxx_status_cont_entry(struct scsi_qla_host *ha,
71 struct status_cont_entry *sts_cont)
72{
73 struct srb *srb = ha->status_srb;
74 struct scsi_cmnd *cmd;
75 uint8_t sense_len;
76
77 if (srb == NULL)
78 return;
79
80 cmd = srb->cmd;
81 if (cmd == NULL) {
82 DEBUG2(printk(KERN_INFO "scsi%ld: %s: Cmd already returned "
83 "back to OS srb=%p srb->state:%d\n", ha->host_no,
84 __func__, srb, srb->state));
85 ha->status_srb = NULL;
86 return;
87 }
88
89 /* Copy sense data. */
90 sense_len = min_t(uint16_t, srb->req_sense_len,
91 IOCB_MAX_EXT_SENSEDATA_LEN);
92 memcpy(srb->req_sense_ptr, sts_cont->ext_sense_data, sense_len);
93 DEBUG5(qla4xxx_dump_buffer(srb->req_sense_ptr, sense_len));
94
95 srb->req_sense_ptr += sense_len;
96 srb->req_sense_len -= sense_len;
97
98 /* Place command on done queue. */
99 if (srb->req_sense_len == 0) {
100 qla4xxx_srb_compl(ha, srb);
101 ha->status_srb = NULL;
102 }
103}
104
105/**
14 * qla4xxx_status_entry - processes status IOCBs 106 * qla4xxx_status_entry - processes status IOCBs
15 * @ha: Pointer to host adapter structure. 107 * @ha: Pointer to host adapter structure.
16 * @sts_entry: Pointer to status entry structure. 108 * @sts_entry: Pointer to status entry structure.
@@ -23,7 +115,6 @@ static void qla4xxx_status_entry(struct scsi_qla_host *ha,
23 struct srb *srb; 115 struct srb *srb;
24 struct ddb_entry *ddb_entry; 116 struct ddb_entry *ddb_entry;
25 uint32_t residual; 117 uint32_t residual;
26 uint16_t sensebytecnt;
27 118
28 srb = qla4xxx_del_from_active_array(ha, le32_to_cpu(sts_entry->handle)); 119 srb = qla4xxx_del_from_active_array(ha, le32_to_cpu(sts_entry->handle));
29 if (!srb) { 120 if (!srb) {
@@ -92,24 +183,7 @@ static void qla4xxx_status_entry(struct scsi_qla_host *ha,
92 break; 183 break;
93 184
94 /* Copy Sense Data into sense buffer. */ 185 /* Copy Sense Data into sense buffer. */
95 memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); 186 qla4xxx_copy_sense(ha, sts_entry, srb);
96
97 sensebytecnt = le16_to_cpu(sts_entry->senseDataByteCnt);
98 if (sensebytecnt == 0)
99 break;
100
101 memcpy(cmd->sense_buffer, sts_entry->senseData,
102 min_t(uint16_t, sensebytecnt, SCSI_SENSE_BUFFERSIZE));
103
104 DEBUG2(printk("scsi%ld:%d:%d:%d: %s: sense key = %x, "
105 "ASC/ASCQ = %02x/%02x\n", ha->host_no,
106 cmd->device->channel, cmd->device->id,
107 cmd->device->lun, __func__,
108 sts_entry->senseData[2] & 0x0f,
109 sts_entry->senseData[12],
110 sts_entry->senseData[13]));
111
112 srb->flags |= SRB_GOT_SENSE;
113 break; 187 break;
114 188
115 case SCS_INCOMPLETE: 189 case SCS_INCOMPLETE:
@@ -176,23 +250,7 @@ static void qla4xxx_status_entry(struct scsi_qla_host *ha,
176 break; 250 break;
177 251
178 /* Copy Sense Data into sense buffer. */ 252 /* Copy Sense Data into sense buffer. */
179 memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); 253 qla4xxx_copy_sense(ha, sts_entry, srb);
180
181 sensebytecnt =
182 le16_to_cpu(sts_entry->senseDataByteCnt);
183 if (sensebytecnt == 0)
184 break;
185
186 memcpy(cmd->sense_buffer, sts_entry->senseData,
187 min_t(uint16_t, sensebytecnt, SCSI_SENSE_BUFFERSIZE));
188
189 DEBUG2(printk("scsi%ld:%d:%d:%d: %s: sense key = %x, "
190 "ASC/ASCQ = %02x/%02x\n", ha->host_no,
191 cmd->device->channel, cmd->device->id,
192 cmd->device->lun, __func__,
193 sts_entry->senseData[2] & 0x0f,
194 sts_entry->senseData[12],
195 sts_entry->senseData[13]));
196 } else { 254 } else {
197 /* 255 /*
198 * If RISC reports underrun and target does not 256 * If RISC reports underrun and target does not
@@ -268,9 +326,10 @@ static void qla4xxx_status_entry(struct scsi_qla_host *ha,
268 326
269status_entry_exit: 327status_entry_exit:
270 328
271 /* complete the request */ 329 /* complete the request, if not waiting for status_continuation pkt */
272 srb->cc_stat = sts_entry->completionStatus; 330 srb->cc_stat = sts_entry->completionStatus;
273 qla4xxx_srb_compl(ha, srb); 331 if (ha->status_srb == NULL)
332 qla4xxx_srb_compl(ha, srb);
274} 333}
275 334
276/** 335/**
@@ -305,10 +364,7 @@ static void qla4xxx_process_response_queue(struct scsi_qla_host * ha)
305 /* process entry */ 364 /* process entry */
306 switch (sts_entry->hdr.entryType) { 365 switch (sts_entry->hdr.entryType) {
307 case ET_STATUS: 366 case ET_STATUS:
308 /* 367 /* Common status */
309 * Common status - Single completion posted in single
310 * IOSB.
311 */
312 qla4xxx_status_entry(ha, sts_entry); 368 qla4xxx_status_entry(ha, sts_entry);
313 break; 369 break;
314 370
@@ -316,9 +372,8 @@ static void qla4xxx_process_response_queue(struct scsi_qla_host * ha)
316 break; 372 break;
317 373
318 case ET_STATUS_CONTINUATION: 374 case ET_STATUS_CONTINUATION:
319 /* Just throw away the status continuation entries */ 375 qla4xxx_status_cont_entry(ha,
320 DEBUG2(printk("scsi%ld: %s: Status Continuation entry " 376 (struct status_cont_entry *) sts_entry);
321 "- ignoring\n", ha->host_no, __func__));
322 break; 377 break;
323 378
324 case ET_COMMAND: 379 case ET_COMMAND:
diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c
index 051b0f5e8c8..09d6d4b76f3 100644
--- a/drivers/scsi/qla4xxx/ql4_mbx.c
+++ b/drivers/scsi/qla4xxx/ql4_mbx.c
@@ -385,16 +385,6 @@ int qla4xxx_get_firmware_status(struct scsi_qla_host * ha)
385 mbox_sts[0])); 385 mbox_sts[0]));
386 return QLA_ERROR; 386 return QLA_ERROR;
387 } 387 }
388
389 /* High-water mark of IOCBs */
390 ha->iocb_hiwat = mbox_sts[2];
391 if (ha->iocb_hiwat > IOCB_HIWAT_CUSHION)
392 ha->iocb_hiwat -= IOCB_HIWAT_CUSHION;
393 else
394 dev_info(&ha->pdev->dev, "WARNING!!! You have less than %d "
395 "firmware IOCBs available (%d).\n",
396 IOCB_HIWAT_CUSHION, ha->iocb_hiwat);
397
398 return QLA_SUCCESS; 388 return QLA_SUCCESS;
399} 389}
400 390
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index ec9da6ce848..40e3cafb3a9 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -66,6 +66,7 @@ static int qla4xxx_sess_get_param(struct iscsi_cls_session *sess,
66static int qla4xxx_host_get_param(struct Scsi_Host *shost, 66static int qla4xxx_host_get_param(struct Scsi_Host *shost,
67 enum iscsi_host_param param, char *buf); 67 enum iscsi_host_param param, char *buf);
68static void qla4xxx_recovery_timedout(struct iscsi_cls_session *session); 68static void qla4xxx_recovery_timedout(struct iscsi_cls_session *session);
69static enum blk_eh_timer_return qla4xxx_eh_cmd_timed_out(struct scsi_cmnd *sc);
69 70
70/* 71/*
71 * SCSI host template entry points 72 * SCSI host template entry points
@@ -89,6 +90,7 @@ static struct scsi_host_template qla4xxx_driver_template = {
89 .eh_device_reset_handler = qla4xxx_eh_device_reset, 90 .eh_device_reset_handler = qla4xxx_eh_device_reset,
90 .eh_target_reset_handler = qla4xxx_eh_target_reset, 91 .eh_target_reset_handler = qla4xxx_eh_target_reset,
91 .eh_host_reset_handler = qla4xxx_eh_host_reset, 92 .eh_host_reset_handler = qla4xxx_eh_host_reset,
93 .eh_timed_out = qla4xxx_eh_cmd_timed_out,
92 94
93 .slave_configure = qla4xxx_slave_configure, 95 .slave_configure = qla4xxx_slave_configure,
94 .slave_alloc = qla4xxx_slave_alloc, 96 .slave_alloc = qla4xxx_slave_alloc,
@@ -124,6 +126,21 @@ static struct iscsi_transport qla4xxx_iscsi_transport = {
124 126
125static struct scsi_transport_template *qla4xxx_scsi_transport; 127static struct scsi_transport_template *qla4xxx_scsi_transport;
126 128
129static enum blk_eh_timer_return qla4xxx_eh_cmd_timed_out(struct scsi_cmnd *sc)
130{
131 struct iscsi_cls_session *session;
132 struct ddb_entry *ddb_entry;
133
134 session = starget_to_session(scsi_target(sc->device));
135 ddb_entry = session->dd_data;
136
137 /* if we are not logged in then the LLD is going to clean up the cmd */
138 if (atomic_read(&ddb_entry->state) != DDB_STATE_ONLINE)
139 return BLK_EH_RESET_TIMER;
140 else
141 return BLK_EH_NOT_HANDLED;
142}
143
127static void qla4xxx_recovery_timedout(struct iscsi_cls_session *session) 144static void qla4xxx_recovery_timedout(struct iscsi_cls_session *session)
128{ 145{
129 struct ddb_entry *ddb_entry = session->dd_data; 146 struct ddb_entry *ddb_entry = session->dd_data;
@@ -904,18 +921,17 @@ static int qla4xxx_recover_adapter(struct scsi_qla_host *ha,
904 /* Flush any pending ddb changed AENs */ 921 /* Flush any pending ddb changed AENs */
905 qla4xxx_process_aen(ha, FLUSH_DDB_CHANGED_AENS); 922 qla4xxx_process_aen(ha, FLUSH_DDB_CHANGED_AENS);
906 923
924 qla4xxx_flush_active_srbs(ha);
925
907 /* Reset the firmware. If successful, function 926 /* Reset the firmware. If successful, function
908 * returns with ISP interrupts enabled. 927 * returns with ISP interrupts enabled.
909 */ 928 */
910 if (status == QLA_SUCCESS) { 929 DEBUG2(printk("scsi%ld: %s - Performing soft reset..\n",
911 DEBUG2(printk("scsi%ld: %s - Performing soft reset..\n", 930 ha->host_no, __func__));
912 ha->host_no, __func__)); 931 if (ql4xxx_lock_drvr_wait(ha) == QLA_SUCCESS)
913 qla4xxx_flush_active_srbs(ha); 932 status = qla4xxx_soft_reset(ha);
914 if (ql4xxx_lock_drvr_wait(ha) == QLA_SUCCESS) 933 else
915 status = qla4xxx_soft_reset(ha); 934 status = QLA_ERROR;
916 else
917 status = QLA_ERROR;
918 }
919 935
920 /* Flush any pending ddb changed AENs */ 936 /* Flush any pending ddb changed AENs */
921 qla4xxx_process_aen(ha, FLUSH_DDB_CHANGED_AENS); 937 qla4xxx_process_aen(ha, FLUSH_DDB_CHANGED_AENS);
@@ -1527,11 +1543,9 @@ static int qla4xxx_eh_device_reset(struct scsi_cmnd *cmd)
1527{ 1543{
1528 struct scsi_qla_host *ha = to_qla_host(cmd->device->host); 1544 struct scsi_qla_host *ha = to_qla_host(cmd->device->host);
1529 struct ddb_entry *ddb_entry = cmd->device->hostdata; 1545 struct ddb_entry *ddb_entry = cmd->device->hostdata;
1530 struct srb *sp;
1531 int ret = FAILED, stat; 1546 int ret = FAILED, stat;
1532 1547
1533 sp = (struct srb *) cmd->SCp.ptr; 1548 if (!ddb_entry)
1534 if (!sp || !ddb_entry)
1535 return ret; 1549 return ret;
1536 1550
1537 dev_info(&ha->pdev->dev, 1551 dev_info(&ha->pdev->dev,
@@ -1644,7 +1658,7 @@ static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd)
1644 ha = (struct scsi_qla_host *) cmd->device->host->hostdata; 1658 ha = (struct scsi_qla_host *) cmd->device->host->hostdata;
1645 1659
1646 dev_info(&ha->pdev->dev, 1660 dev_info(&ha->pdev->dev,
1647 "scsi(%ld:%d:%d:%d): ADAPTER RESET ISSUED.\n", ha->host_no, 1661 "scsi(%ld:%d:%d:%d): HOST RESET ISSUED.\n", ha->host_no,
1648 cmd->device->channel, cmd->device->id, cmd->device->lun); 1662 cmd->device->channel, cmd->device->id, cmd->device->lun);
1649 1663
1650 if (qla4xxx_wait_for_hba_online(ha) != QLA_SUCCESS) { 1664 if (qla4xxx_wait_for_hba_online(ha) != QLA_SUCCESS) {
diff --git a/drivers/scsi/qla4xxx/ql4_version.h b/drivers/scsi/qla4xxx/ql4_version.h
index ab984cb89ce..6980cb279c8 100644
--- a/drivers/scsi/qla4xxx/ql4_version.h
+++ b/drivers/scsi/qla4xxx/ql4_version.h
@@ -5,5 +5,5 @@
5 * See LICENSE.qla4xxx for copyright and licensing details. 5 * See LICENSE.qla4xxx for copyright and licensing details.
6 */ 6 */
7 7
8#define QLA4XXX_DRIVER_VERSION "5.01.00-k8" 8#define QLA4XXX_DRIVER_VERSION "5.01.00-k9"
9 9
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 783e33c65eb..b47240ca4b1 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -990,7 +990,7 @@ int iscsi_offload_mesg(struct Scsi_Host *shost,
990 struct iscsi_uevent *ev; 990 struct iscsi_uevent *ev;
991 int len = NLMSG_SPACE(sizeof(*ev) + data_size); 991 int len = NLMSG_SPACE(sizeof(*ev) + data_size);
992 992
993 skb = alloc_skb(len, GFP_NOIO); 993 skb = alloc_skb(len, GFP_ATOMIC);
994 if (!skb) { 994 if (!skb) {
995 printk(KERN_ERR "can not deliver iscsi offload message:OOM\n"); 995 printk(KERN_ERR "can not deliver iscsi offload message:OOM\n");
996 return -ENOMEM; 996 return -ENOMEM;
@@ -1012,7 +1012,7 @@ int iscsi_offload_mesg(struct Scsi_Host *shost,
1012 1012
1013 memcpy((char *)ev + sizeof(*ev), data, data_size); 1013 memcpy((char *)ev + sizeof(*ev), data, data_size);
1014 1014
1015 return iscsi_multicast_skb(skb, ISCSI_NL_GRP_UIP, GFP_NOIO); 1015 return iscsi_multicast_skb(skb, ISCSI_NL_GRP_UIP, GFP_ATOMIC);
1016} 1016}
1017EXPORT_SYMBOL_GPL(iscsi_offload_mesg); 1017EXPORT_SYMBOL_GPL(iscsi_offload_mesg);
1018 1018
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 5616cd780ff..b7b9fec67a9 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1840,6 +1840,18 @@ static void sd_read_block_characteristics(struct scsi_disk *sdkp)
1840 kfree(buffer); 1840 kfree(buffer);
1841} 1841}
1842 1842
1843static int sd_try_extended_inquiry(struct scsi_device *sdp)
1844{
1845 /*
1846 * Although VPD inquiries can go to SCSI-2 type devices,
1847 * some USB ones crash on receiving them, and the pages
1848 * we currently ask for are for SPC-3 and beyond
1849 */
1850 if (sdp->scsi_level > SCSI_SPC_2)
1851 return 1;
1852 return 0;
1853}
1854
1843/** 1855/**
1844 * sd_revalidate_disk - called the first time a new disk is seen, 1856 * sd_revalidate_disk - called the first time a new disk is seen,
1845 * performs disk spin up, read_capacity, etc. 1857 * performs disk spin up, read_capacity, etc.
@@ -1877,8 +1889,12 @@ static int sd_revalidate_disk(struct gendisk *disk)
1877 */ 1889 */
1878 if (sdkp->media_present) { 1890 if (sdkp->media_present) {
1879 sd_read_capacity(sdkp, buffer); 1891 sd_read_capacity(sdkp, buffer);
1880 sd_read_block_limits(sdkp); 1892
1881 sd_read_block_characteristics(sdkp); 1893 if (sd_try_extended_inquiry(sdp)) {
1894 sd_read_block_limits(sdkp);
1895 sd_read_block_characteristics(sdkp);
1896 }
1897
1882 sd_read_write_protect_flag(sdkp, buffer); 1898 sd_read_write_protect_flag(sdkp, buffer);
1883 sd_read_cache_type(sdkp, buffer); 1899 sd_read_cache_type(sdkp, buffer);
1884 sd_read_app_tag_own(sdkp, buffer); 1900 sd_read_app_tag_own(sdkp, buffer);
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index 338b15c0a54..607d43a3104 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -1551,6 +1551,7 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)
1551 if (ret) 1551 if (ret)
1552 goto err_add_port; 1552 goto err_add_port;
1553 1553
1554#ifdef CONFIG_SERIAL_ATMEL_CONSOLE
1554 if (atmel_is_console_port(&port->uart) 1555 if (atmel_is_console_port(&port->uart)
1555 && ATMEL_CONSOLE_DEVICE->flags & CON_ENABLED) { 1556 && ATMEL_CONSOLE_DEVICE->flags & CON_ENABLED) {
1556 /* 1557 /*
@@ -1559,6 +1560,7 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)
1559 */ 1560 */
1560 clk_disable(port->clk); 1561 clk_disable(port->clk);
1561 } 1562 }
1563#endif
1562 1564
1563 device_init_wakeup(&pdev->dev, 1); 1565 device_init_wakeup(&pdev->dev, 1);
1564 platform_set_drvdata(pdev, port); 1566 platform_set_drvdata(pdev, port);
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
index 141c0a3333a..a9802e76b5f 100644
--- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c
+++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
@@ -132,7 +132,7 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con)
132 memsz = L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize) + 132 memsz = L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize) +
133 L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize); 133 L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize);
134 if (is_con) { 134 if (is_con) {
135 mem_addr = alloc_bootmem(memsz); 135 mem_addr = kzalloc(memsz, GFP_NOWAIT);
136 dma_addr = virt_to_bus(mem_addr); 136 dma_addr = virt_to_bus(mem_addr);
137 } 137 }
138 else 138 else
diff --git a/drivers/serial/s3c2400.c b/drivers/serial/s3c2400.c
index fb00ed5296e..fed1a9a1ffb 100644
--- a/drivers/serial/s3c2400.c
+++ b/drivers/serial/s3c2400.c
@@ -76,7 +76,7 @@ static int s3c2400_serial_probe(struct platform_device *dev)
76 return s3c24xx_serial_probe(dev, &s3c2400_uart_inf); 76 return s3c24xx_serial_probe(dev, &s3c2400_uart_inf);
77} 77}
78 78
79static struct platform_driver s3c2400_serial_drv = { 79static struct platform_driver s3c2400_serial_driver = {
80 .probe = s3c2400_serial_probe, 80 .probe = s3c2400_serial_probe,
81 .remove = __devexit_p(s3c24xx_serial_remove), 81 .remove = __devexit_p(s3c24xx_serial_remove),
82 .driver = { 82 .driver = {
@@ -85,16 +85,16 @@ static struct platform_driver s3c2400_serial_drv = {
85 }, 85 },
86}; 86};
87 87
88s3c24xx_console_init(&s3c2400_serial_drv, &s3c2400_uart_inf); 88s3c24xx_console_init(&s3c2400_serial_driver, &s3c2400_uart_inf);
89 89
90static inline int s3c2400_serial_init(void) 90static inline int s3c2400_serial_init(void)
91{ 91{
92 return s3c24xx_serial_init(&s3c2400_serial_drv, &s3c2400_uart_inf); 92 return s3c24xx_serial_init(&s3c2400_serial_driver, &s3c2400_uart_inf);
93} 93}
94 94
95static inline void s3c2400_serial_exit(void) 95static inline void s3c2400_serial_exit(void)
96{ 96{
97 platform_driver_unregister(&s3c2400_serial_drv); 97 platform_driver_unregister(&s3c2400_serial_driver);
98} 98}
99 99
100module_init(s3c2400_serial_init); 100module_init(s3c2400_serial_init);
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
index b5d7cbcba2a..c99f0821cae 100644
--- a/drivers/serial/s3c2410.c
+++ b/drivers/serial/s3c2410.c
@@ -88,7 +88,7 @@ static int s3c2410_serial_probe(struct platform_device *dev)
88 return s3c24xx_serial_probe(dev, &s3c2410_uart_inf); 88 return s3c24xx_serial_probe(dev, &s3c2410_uart_inf);
89} 89}
90 90
91static struct platform_driver s3c2410_serial_drv = { 91static struct platform_driver s3c2410_serial_driver = {
92 .probe = s3c2410_serial_probe, 92 .probe = s3c2410_serial_probe,
93 .remove = __devexit_p(s3c24xx_serial_remove), 93 .remove = __devexit_p(s3c24xx_serial_remove),
94 .driver = { 94 .driver = {
@@ -97,16 +97,16 @@ static struct platform_driver s3c2410_serial_drv = {
97 }, 97 },
98}; 98};
99 99
100s3c24xx_console_init(&s3c2410_serial_drv, &s3c2410_uart_inf); 100s3c24xx_console_init(&s3c2410_serial_driver, &s3c2410_uart_inf);
101 101
102static int __init s3c2410_serial_init(void) 102static int __init s3c2410_serial_init(void)
103{ 103{
104 return s3c24xx_serial_init(&s3c2410_serial_drv, &s3c2410_uart_inf); 104 return s3c24xx_serial_init(&s3c2410_serial_driver, &s3c2410_uart_inf);
105} 105}
106 106
107static void __exit s3c2410_serial_exit(void) 107static void __exit s3c2410_serial_exit(void)
108{ 108{
109 platform_driver_unregister(&s3c2410_serial_drv); 109 platform_driver_unregister(&s3c2410_serial_driver);
110} 110}
111 111
112module_init(s3c2410_serial_init); 112module_init(s3c2410_serial_init);
diff --git a/drivers/serial/s3c2412.c b/drivers/serial/s3c2412.c
index 11dcb90bdfe..6e057d8809d 100644
--- a/drivers/serial/s3c2412.c
+++ b/drivers/serial/s3c2412.c
@@ -121,7 +121,7 @@ static int s3c2412_serial_probe(struct platform_device *dev)
121 return s3c24xx_serial_probe(dev, &s3c2412_uart_inf); 121 return s3c24xx_serial_probe(dev, &s3c2412_uart_inf);
122} 122}
123 123
124static struct platform_driver s3c2412_serial_drv = { 124static struct platform_driver s3c2412_serial_driver = {
125 .probe = s3c2412_serial_probe, 125 .probe = s3c2412_serial_probe,
126 .remove = __devexit_p(s3c24xx_serial_remove), 126 .remove = __devexit_p(s3c24xx_serial_remove),
127 .driver = { 127 .driver = {
@@ -130,16 +130,16 @@ static struct platform_driver s3c2412_serial_drv = {
130 }, 130 },
131}; 131};
132 132
133s3c24xx_console_init(&s3c2412_serial_drv, &s3c2412_uart_inf); 133s3c24xx_console_init(&s3c2412_serial_driver, &s3c2412_uart_inf);
134 134
135static inline int s3c2412_serial_init(void) 135static inline int s3c2412_serial_init(void)
136{ 136{
137 return s3c24xx_serial_init(&s3c2412_serial_drv, &s3c2412_uart_inf); 137 return s3c24xx_serial_init(&s3c2412_serial_driver, &s3c2412_uart_inf);
138} 138}
139 139
140static inline void s3c2412_serial_exit(void) 140static inline void s3c2412_serial_exit(void)
141{ 141{
142 platform_driver_unregister(&s3c2412_serial_drv); 142 platform_driver_unregister(&s3c2412_serial_driver);
143} 143}
144 144
145module_init(s3c2412_serial_init); 145module_init(s3c2412_serial_init);
diff --git a/drivers/serial/s3c2440.c b/drivers/serial/s3c2440.c
index 06c5b0cc47a..69ff5d340f0 100644
--- a/drivers/serial/s3c2440.c
+++ b/drivers/serial/s3c2440.c
@@ -151,7 +151,7 @@ static int s3c2440_serial_probe(struct platform_device *dev)
151 return s3c24xx_serial_probe(dev, &s3c2440_uart_inf); 151 return s3c24xx_serial_probe(dev, &s3c2440_uart_inf);
152} 152}
153 153
154static struct platform_driver s3c2440_serial_drv = { 154static struct platform_driver s3c2440_serial_driver = {
155 .probe = s3c2440_serial_probe, 155 .probe = s3c2440_serial_probe,
156 .remove = __devexit_p(s3c24xx_serial_remove), 156 .remove = __devexit_p(s3c24xx_serial_remove),
157 .driver = { 157 .driver = {
@@ -160,16 +160,16 @@ static struct platform_driver s3c2440_serial_drv = {
160 }, 160 },
161}; 161};
162 162
163s3c24xx_console_init(&s3c2440_serial_drv, &s3c2440_uart_inf); 163s3c24xx_console_init(&s3c2440_serial_driver, &s3c2440_uart_inf);
164 164
165static int __init s3c2440_serial_init(void) 165static int __init s3c2440_serial_init(void)
166{ 166{
167 return s3c24xx_serial_init(&s3c2440_serial_drv, &s3c2440_uart_inf); 167 return s3c24xx_serial_init(&s3c2440_serial_driver, &s3c2440_uart_inf);
168} 168}
169 169
170static void __exit s3c2440_serial_exit(void) 170static void __exit s3c2440_serial_exit(void)
171{ 171{
172 platform_driver_unregister(&s3c2440_serial_drv); 172 platform_driver_unregister(&s3c2440_serial_driver);
173} 173}
174 174
175module_init(s3c2440_serial_init); 175module_init(s3c2440_serial_init);
diff --git a/drivers/serial/s3c24a0.c b/drivers/serial/s3c24a0.c
index 786a067d62a..26c49e18bdd 100644
--- a/drivers/serial/s3c24a0.c
+++ b/drivers/serial/s3c24a0.c
@@ -92,7 +92,7 @@ static int s3c24a0_serial_probe(struct platform_device *dev)
92 return s3c24xx_serial_probe(dev, &s3c24a0_uart_inf); 92 return s3c24xx_serial_probe(dev, &s3c24a0_uart_inf);
93} 93}
94 94
95static struct platform_driver s3c24a0_serial_drv = { 95static struct platform_driver s3c24a0_serial_driver = {
96 .probe = s3c24a0_serial_probe, 96 .probe = s3c24a0_serial_probe,
97 .remove = __devexit_p(s3c24xx_serial_remove), 97 .remove = __devexit_p(s3c24xx_serial_remove),
98 .driver = { 98 .driver = {
@@ -101,16 +101,16 @@ static struct platform_driver s3c24a0_serial_drv = {
101 }, 101 },
102}; 102};
103 103
104s3c24xx_console_init(&s3c24a0_serial_drv, &s3c24a0_uart_inf); 104s3c24xx_console_init(&s3c24a0_serial_driver, &s3c24a0_uart_inf);
105 105
106static int __init s3c24a0_serial_init(void) 106static int __init s3c24a0_serial_init(void)
107{ 107{
108 return s3c24xx_serial_init(&s3c24a0_serial_drv, &s3c24a0_uart_inf); 108 return s3c24xx_serial_init(&s3c24a0_serial_driver, &s3c24a0_uart_inf);
109} 109}
110 110
111static void __exit s3c24a0_serial_exit(void) 111static void __exit s3c24a0_serial_exit(void)
112{ 112{
113 platform_driver_unregister(&s3c24a0_serial_drv); 113 platform_driver_unregister(&s3c24a0_serial_driver);
114} 114}
115 115
116module_init(s3c24a0_serial_init); 116module_init(s3c24a0_serial_init);
diff --git a/drivers/serial/s3c6400.c b/drivers/serial/s3c6400.c
index 48f1a3781f0..4be92ab5005 100644
--- a/drivers/serial/s3c6400.c
+++ b/drivers/serial/s3c6400.c
@@ -122,7 +122,7 @@ static int s3c6400_serial_probe(struct platform_device *dev)
122 return s3c24xx_serial_probe(dev, &s3c6400_uart_inf); 122 return s3c24xx_serial_probe(dev, &s3c6400_uart_inf);
123} 123}
124 124
125static struct platform_driver s3c6400_serial_drv = { 125static struct platform_driver s3c6400_serial_driver = {
126 .probe = s3c6400_serial_probe, 126 .probe = s3c6400_serial_probe,
127 .remove = __devexit_p(s3c24xx_serial_remove), 127 .remove = __devexit_p(s3c24xx_serial_remove),
128 .driver = { 128 .driver = {
@@ -131,16 +131,16 @@ static struct platform_driver s3c6400_serial_drv = {
131 }, 131 },
132}; 132};
133 133
134s3c24xx_console_init(&s3c6400_serial_drv, &s3c6400_uart_inf); 134s3c24xx_console_init(&s3c6400_serial_driver, &s3c6400_uart_inf);
135 135
136static int __init s3c6400_serial_init(void) 136static int __init s3c6400_serial_init(void)
137{ 137{
138 return s3c24xx_serial_init(&s3c6400_serial_drv, &s3c6400_uart_inf); 138 return s3c24xx_serial_init(&s3c6400_serial_driver, &s3c6400_uart_inf);
139} 139}
140 140
141static void __exit s3c6400_serial_exit(void) 141static void __exit s3c6400_serial_exit(void)
142{ 142{
143 platform_driver_unregister(&s3c6400_serial_drv); 143 platform_driver_unregister(&s3c6400_serial_driver);
144} 144}
145 145
146module_init(s3c6400_serial_init); 146module_init(s3c6400_serial_init);
diff --git a/drivers/serial/serial_ks8695.c b/drivers/serial/serial_ks8695.c
index 998e89dc5aa..e0665630e4d 100644
--- a/drivers/serial/serial_ks8695.c
+++ b/drivers/serial/serial_ks8695.c
@@ -549,7 +549,7 @@ static struct uart_port ks8695uart_ports[SERIAL_KS8695_NR] = {
549 .mapbase = KS8695_UART_VA, 549 .mapbase = KS8695_UART_VA,
550 .iotype = SERIAL_IO_MEM, 550 .iotype = SERIAL_IO_MEM,
551 .irq = KS8695_IRQ_UART_TX, 551 .irq = KS8695_IRQ_UART_TX,
552 .uartclk = CLOCK_TICK_RATE * 16, 552 .uartclk = KS8695_CLOCK_RATE * 16,
553 .fifosize = 16, 553 .fifosize = 16,
554 .ops = &ks8695uart_pops, 554 .ops = &ks8695uart_pops,
555 .flags = ASYNC_BOOT_AUTOCONF, 555 .flags = ASYNC_BOOT_AUTOCONF,
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
index eee4b6e0af2..9b80ad36dbb 100644
--- a/drivers/spi/omap2_mcspi.c
+++ b/drivers/spi/omap2_mcspi.c
@@ -59,6 +59,8 @@
59 59
60/* per-register bitmasks: */ 60/* per-register bitmasks: */
61 61
62#define OMAP2_MCSPI_SYSCONFIG_SMARTIDLE (2 << 3)
63#define OMAP2_MCSPI_SYSCONFIG_ENAWAKEUP (1 << 2)
62#define OMAP2_MCSPI_SYSCONFIG_AUTOIDLE (1 << 0) 64#define OMAP2_MCSPI_SYSCONFIG_AUTOIDLE (1 << 0)
63#define OMAP2_MCSPI_SYSCONFIG_SOFTRESET (1 << 1) 65#define OMAP2_MCSPI_SYSCONFIG_SOFTRESET (1 << 1)
64 66
@@ -90,6 +92,7 @@
90 92
91#define OMAP2_MCSPI_CHCTRL_EN (1 << 0) 93#define OMAP2_MCSPI_CHCTRL_EN (1 << 0)
92 94
95#define OMAP2_MCSPI_WAKEUPENABLE_WKEN (1 << 0)
93 96
94/* We have 2 DMA channels per CS, one for RX and one for TX */ 97/* We have 2 DMA channels per CS, one for RX and one for TX */
95struct omap2_mcspi_dma { 98struct omap2_mcspi_dma {
@@ -269,7 +272,7 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer)
269 272
270 if (rx != NULL) { 273 if (rx != NULL) {
271 omap_set_dma_transfer_params(mcspi_dma->dma_rx_channel, 274 omap_set_dma_transfer_params(mcspi_dma->dma_rx_channel,
272 data_type, element_count, 1, 275 data_type, element_count - 1, 1,
273 OMAP_DMA_SYNC_ELEMENT, 276 OMAP_DMA_SYNC_ELEMENT,
274 mcspi_dma->dma_rx_sync_dev, 1); 277 mcspi_dma->dma_rx_sync_dev, 1);
275 278
@@ -300,6 +303,25 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer)
300 if (rx != NULL) { 303 if (rx != NULL) {
301 wait_for_completion(&mcspi_dma->dma_rx_completion); 304 wait_for_completion(&mcspi_dma->dma_rx_completion);
302 dma_unmap_single(NULL, xfer->rx_dma, count, DMA_FROM_DEVICE); 305 dma_unmap_single(NULL, xfer->rx_dma, count, DMA_FROM_DEVICE);
306 omap2_mcspi_set_enable(spi, 0);
307 if (likely(mcspi_read_cs_reg(spi, OMAP2_MCSPI_CHSTAT0)
308 & OMAP2_MCSPI_CHSTAT_RXS)) {
309 u32 w;
310
311 w = mcspi_read_cs_reg(spi, OMAP2_MCSPI_RX0);
312 if (word_len <= 8)
313 ((u8 *)xfer->rx_buf)[element_count - 1] = w;
314 else if (word_len <= 16)
315 ((u16 *)xfer->rx_buf)[element_count - 1] = w;
316 else /* word_len <= 32 */
317 ((u32 *)xfer->rx_buf)[element_count - 1] = w;
318 } else {
319 dev_err(&spi->dev, "DMA RX last word empty");
320 count -= (word_len <= 8) ? 1 :
321 (word_len <= 16) ? 2 :
322 /* word_len <= 32 */ 4;
323 }
324 omap2_mcspi_set_enable(spi, 1);
303 } 325 }
304 return count; 326 return count;
305} 327}
@@ -873,8 +895,12 @@ static int __init omap2_mcspi_reset(struct omap2_mcspi *mcspi)
873 } while (!(tmp & OMAP2_MCSPI_SYSSTATUS_RESETDONE)); 895 } while (!(tmp & OMAP2_MCSPI_SYSSTATUS_RESETDONE));
874 896
875 mcspi_write_reg(master, OMAP2_MCSPI_SYSCONFIG, 897 mcspi_write_reg(master, OMAP2_MCSPI_SYSCONFIG,
876 /* (3 << 8) | (2 << 3) | */ 898 OMAP2_MCSPI_SYSCONFIG_AUTOIDLE |
877 OMAP2_MCSPI_SYSCONFIG_AUTOIDLE); 899 OMAP2_MCSPI_SYSCONFIG_ENAWAKEUP |
900 OMAP2_MCSPI_SYSCONFIG_SMARTIDLE);
901
902 mcspi_write_reg(master, OMAP2_MCSPI_WAKEUPENABLE,
903 OMAP2_MCSPI_WAKEUPENABLE_WKEN);
878 904
879 omap2_mcspi_set_master_mode(master); 905 omap2_mcspi_set_master_mode(master);
880 906
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index 348bf61a8fe..975ecddbce3 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -103,8 +103,6 @@ source "drivers/staging/pohmelfs/Kconfig"
103 103
104source "drivers/staging/stlc45xx/Kconfig" 104source "drivers/staging/stlc45xx/Kconfig"
105 105
106source "drivers/staging/uc2322/Kconfig"
107
108source "drivers/staging/b3dfg/Kconfig" 106source "drivers/staging/b3dfg/Kconfig"
109 107
110source "drivers/staging/phison/Kconfig" 108source "drivers/staging/phison/Kconfig"
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 8d61d7b4deb..2241ae1b21e 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -34,7 +34,6 @@ obj-$(CONFIG_ANDROID) += android/
34obj-$(CONFIG_DST) += dst/ 34obj-$(CONFIG_DST) += dst/
35obj-$(CONFIG_POHMELFS) += pohmelfs/ 35obj-$(CONFIG_POHMELFS) += pohmelfs/
36obj-$(CONFIG_STLC45XX) += stlc45xx/ 36obj-$(CONFIG_STLC45XX) += stlc45xx/
37obj-$(CONFIG_USB_SERIAL_ATEN2011) += uc2322/
38obj-$(CONFIG_B3DFG) += b3dfg/ 37obj-$(CONFIG_B3DFG) += b3dfg/
39obj-$(CONFIG_IDE_PHISON) += phison/ 38obj-$(CONFIG_IDE_PHISON) += phison/
40obj-$(CONFIG_PLAN9AUTH) += p9auth/ 39obj-$(CONFIG_PLAN9AUTH) += p9auth/
diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index fe72240f5a9..f934393f395 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -96,19 +96,21 @@ static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask)
96 96
97 read_lock(&tasklist_lock); 97 read_lock(&tasklist_lock);
98 for_each_process(p) { 98 for_each_process(p) {
99 struct mm_struct *mm;
99 int oom_adj; 100 int oom_adj;
100 101
101 task_lock(p); 102 task_lock(p);
102 if (!p->mm) { 103 mm = p->mm;
104 if (!mm) {
103 task_unlock(p); 105 task_unlock(p);
104 continue; 106 continue;
105 } 107 }
106 oom_adj = p->oomkilladj; 108 oom_adj = mm->oom_adj;
107 if (oom_adj < min_adj) { 109 if (oom_adj < min_adj) {
108 task_unlock(p); 110 task_unlock(p);
109 continue; 111 continue;
110 } 112 }
111 tasksize = get_mm_rss(p->mm); 113 tasksize = get_mm_rss(mm);
112 task_unlock(p); 114 task_unlock(p);
113 if (tasksize <= 0) 115 if (tasksize <= 0)
114 continue; 116 continue;
diff --git a/drivers/staging/b3dfg/Kconfig b/drivers/staging/b3dfg/Kconfig
index 524231047de..9e6573cf97d 100644
--- a/drivers/staging/b3dfg/Kconfig
+++ b/drivers/staging/b3dfg/Kconfig
@@ -1,5 +1,6 @@
1config B3DFG 1config B3DFG
2 tristate "Brontes 3d Frame Framegrabber" 2 tristate "Brontes 3d Frame Framegrabber"
3 depends on PCI
3 default n 4 default n
4 ---help--- 5 ---help---
5 This driver provides support for the Brontes 3d Framegrabber 6 This driver provides support for the Brontes 3d Framegrabber
diff --git a/drivers/staging/heci/Kconfig b/drivers/staging/heci/Kconfig
index ae8d588d3a2..c7206f8bcd9 100644
--- a/drivers/staging/heci/Kconfig
+++ b/drivers/staging/heci/Kconfig
@@ -1,5 +1,6 @@
1config HECI 1config HECI
2 tristate "Intel Management Engine Interface (MEI) Support" 2 tristate "Intel Management Engine Interface (MEI) Support"
3 depends on PCI
3 ---help--- 4 ---help---
4 The Intel Management Engine Interface (Intel MEI) driver allows 5 The Intel Management Engine Interface (Intel MEI) driver allows
5 applications to access the Active Management Technology 6 applications to access the Active Management Technology
diff --git a/drivers/staging/rspiusb/rspiusb.c b/drivers/staging/rspiusb/rspiusb.c
index 2f8155c1968..04e2f92c0f6 100644
--- a/drivers/staging/rspiusb/rspiusb.c
+++ b/drivers/staging/rspiusb/rspiusb.c
@@ -716,6 +716,8 @@ static int MapUserBuffer(struct ioctl_struct *io, struct device_extension *pdx)
716 pdx->PixelUrb[frameInfo][i]->transfer_flags = 716 pdx->PixelUrb[frameInfo][i]->transfer_flags =
717 URB_NO_TRANSFER_DMA_MAP | URB_NO_INTERRUPT; 717 URB_NO_TRANSFER_DMA_MAP | URB_NO_INTERRUPT;
718 } 718 }
719 if (i == 0)
720 return -EINVAL;
719 /* only interrupt when last URB completes */ 721 /* only interrupt when last URB completes */
720 pdx->PixelUrb[frameInfo][--i]->transfer_flags &= ~URB_NO_INTERRUPT; 722 pdx->PixelUrb[frameInfo][--i]->transfer_flags &= ~URB_NO_INTERRUPT;
721 pdx->pendedPixelUrbs[frameInfo] = 723 pdx->pendedPixelUrbs[frameInfo] =
diff --git a/drivers/staging/rt2860/rt_linux.h b/drivers/staging/rt2860/rt_linux.h
index 85175c18243..25b53ac3f82 100644
--- a/drivers/staging/rt2860/rt_linux.h
+++ b/drivers/staging/rt2860/rt_linux.h
@@ -43,9 +43,6 @@
43#include "rtmp_type.h" 43#include "rtmp_type.h"
44#include <linux/module.h> 44#include <linux/module.h>
45#include <linux/kernel.h> 45#include <linux/kernel.h>
46#if !defined(RT2860) && !defined(RT30xx)
47#include <linux/kthread.h>
48#endif
49 46
50#include <linux/spinlock.h> 47#include <linux/spinlock.h>
51#include <linux/init.h> 48#include <linux/init.h>
@@ -166,9 +163,7 @@ typedef int (*HARD_START_XMIT_FUNC)(struct sk_buff *skb, struct net_device *net_
166 163
167#ifndef RT30xx 164#ifndef RT30xx
168typedef struct pid * THREAD_PID; 165typedef struct pid * THREAD_PID;
169#ifdef RT2860
170#define THREAD_PID_INIT_VALUE NULL 166#define THREAD_PID_INIT_VALUE NULL
171#endif
172#define GET_PID(_v) find_get_pid(_v) 167#define GET_PID(_v) find_get_pid(_v)
173#define GET_PID_NUMBER(_v) pid_nr(_v) 168#define GET_PID_NUMBER(_v) pid_nr(_v)
174#define CHECK_PID_LEGALITY(_pid) if (pid_nr(_pid) >= 0) 169#define CHECK_PID_LEGALITY(_pid) if (pid_nr(_pid) >= 0)
@@ -188,12 +183,12 @@ struct os_cookie {
188 dma_addr_t pAd_pa; 183 dma_addr_t pAd_pa;
189#endif 184#endif
190#ifdef RT2870 185#ifdef RT2870
191 struct usb_device *pUsb_Dev; 186 struct usb_device *pUsb_Dev;
192 187
193#ifndef RT30xx 188#ifndef RT30xx
194 struct task_struct *MLMEThr_task; 189 THREAD_PID MLMEThr_pid;
195 struct task_struct *RTUSBCmdThr_task; 190 THREAD_PID RTUSBCmdThr_pid;
196 struct task_struct *TimerQThr_task; 191 THREAD_PID TimerQThr_pid;
197#endif 192#endif
198#ifdef RT30xx 193#ifdef RT30xx
199 struct pid *MLMEThr_pid; 194 struct pid *MLMEThr_pid;
diff --git a/drivers/staging/rt2870/2870_main_dev.c b/drivers/staging/rt2870/2870_main_dev.c
index dd01c64fbf6..a4e8696ca39 100644
--- a/drivers/staging/rt2870/2870_main_dev.c
+++ b/drivers/staging/rt2870/2870_main_dev.c
@@ -235,7 +235,7 @@ INT MlmeThread(
235 DBGPRINT(RT_DEBUG_TRACE,( "<---%s\n",__func__)); 235 DBGPRINT(RT_DEBUG_TRACE,( "<---%s\n",__func__));
236 236
237#ifndef RT30xx 237#ifndef RT30xx
238 pObj->MLMEThr_task = NULL; 238 pObj->MLMEThr_pid = THREAD_PID_INIT_VALUE;
239#endif 239#endif
240#ifdef RT30xx 240#ifdef RT30xx
241 pObj->MLMEThr_pid = NULL; 241 pObj->MLMEThr_pid = NULL;
@@ -348,7 +348,7 @@ INT RTUSBCmdThread(
348 DBGPRINT(RT_DEBUG_TRACE,( "<---RTUSBCmdThread\n")); 348 DBGPRINT(RT_DEBUG_TRACE,( "<---RTUSBCmdThread\n"));
349 349
350#ifndef RT30xx 350#ifndef RT30xx
351 pObj->RTUSBCmdThr_task = NULL; 351 pObj->RTUSBCmdThr_pid = THREAD_PID_INIT_VALUE;
352#endif 352#endif
353#ifdef RT30xx 353#ifdef RT30xx
354 pObj->RTUSBCmdThr_pid = NULL; 354 pObj->RTUSBCmdThr_pid = NULL;
@@ -447,7 +447,7 @@ INT TimerQThread(
447 DBGPRINT(RT_DEBUG_TRACE,( "<---%s\n",__func__)); 447 DBGPRINT(RT_DEBUG_TRACE,( "<---%s\n",__func__));
448 448
449#ifndef RT30xx 449#ifndef RT30xx
450 pObj->TimerQThr_task = NULL; 450 pObj->TimerQThr_pid = THREAD_PID_INIT_VALUE;
451#endif 451#endif
452#ifdef RT30xx 452#ifdef RT30xx
453 pObj->TimerQThr_pid = NULL; 453 pObj->TimerQThr_pid = NULL;
@@ -883,46 +883,69 @@ VOID RT28xxThreadTerminate(
883 883
884 // Terminate Threads 884 // Terminate Threads
885#ifndef RT30xx 885#ifndef RT30xx
886 BUG_ON(pObj->TimerQThr_task == NULL); 886 CHECK_PID_LEGALITY(pObj->TimerQThr_pid)
887 CHECK_PID_LEGALITY(task_pid(pObj->TimerQThr_task))
888 { 887 {
889 POS_COOKIE pObj = (POS_COOKIE)pAd->OS_Cookie; 888 POS_COOKIE pObj = (POS_COOKIE)pAd->OS_Cookie;
890 889
891 printk(KERN_DEBUG "Terminate the TimerQThr pid=%d!\n", 890 printk("Terminate the TimerQThr_pid=%d!\n", GET_PID_NUMBER(pObj->TimerQThr_pid));
892 pid_nr(task_pid(pObj->TimerQThr_task)));
893 mb(); 891 mb();
894 pAd->TimerFunc_kill = 1; 892 pAd->TimerFunc_kill = 1;
895 mb(); 893 mb();
896 kthread_stop(pObj->TimerQThr_task); 894 ret = KILL_THREAD_PID(pObj->TimerQThr_pid, SIGTERM, 1);
897 pObj->TimerQThr_task = NULL; 895 if (ret)
896 {
897 printk(KERN_WARNING "%s: unable to stop TimerQThread, pid=%d, ret=%d!\n",
898 pAd->net_dev->name, GET_PID_NUMBER(pObj->TimerQThr_pid), ret);
899 }
900 else
901 {
902 wait_for_completion(&pAd->TimerQComplete);
903 pObj->TimerQThr_pid = THREAD_PID_INIT_VALUE;
904 }
898 } 905 }
899 906
900 BUG_ON(pObj->MLMEThr_task == NULL); 907 CHECK_PID_LEGALITY(pObj->MLMEThr_pid)
901 CHECK_PID_LEGALITY(task_pid(pObj->MLMEThr_task))
902 { 908 {
903 printk(KERN_DEBUG "Terminate the MLMEThr pid=%d!\n", 909 printk("Terminate the MLMEThr_pid=%d!\n", GET_PID_NUMBER(pObj->MLMEThr_pid));
904 pid_nr(task_pid(pObj->MLMEThr_task)));
905 mb(); 910 mb();
906 pAd->mlme_kill = 1; 911 pAd->mlme_kill = 1;
907 //RT28XX_MLME_HANDLER(pAd); 912 //RT28XX_MLME_HANDLER(pAd);
908 mb(); 913 mb();
909 kthread_stop(pObj->MLMEThr_task); 914 ret = KILL_THREAD_PID(pObj->MLMEThr_pid, SIGTERM, 1);
910 pObj->MLMEThr_task = NULL; 915 if (ret)
916 {
917 printk (KERN_WARNING "%s: unable to Mlme thread, pid=%d, ret=%d!\n",
918 pAd->net_dev->name, GET_PID_NUMBER(pObj->MLMEThr_pid), ret);
919 }
920 else
921 {
922 //wait_for_completion (&pAd->notify);
923 wait_for_completion (&pAd->mlmeComplete);
924 pObj->MLMEThr_pid = THREAD_PID_INIT_VALUE;
925 }
911 } 926 }
912 927
913 BUG_ON(pObj->RTUSBCmdThr_task == NULL); 928 CHECK_PID_LEGALITY(pObj->RTUSBCmdThr_pid)
914 CHECK_PID_LEGALITY(task_pid(pObj->RTUSBCmdThr_task))
915 { 929 {
916 printk(KERN_DEBUG "Terminate the RTUSBCmdThr pid=%d!\n", 930 printk("Terminate the RTUSBCmdThr_pid=%d!\n", GET_PID_NUMBER(pObj->RTUSBCmdThr_pid));
917 pid_nr(task_pid(pObj->RTUSBCmdThr_task)));
918 mb(); 931 mb();
919 NdisAcquireSpinLock(&pAd->CmdQLock); 932 NdisAcquireSpinLock(&pAd->CmdQLock);
920 pAd->CmdQ.CmdQState = RT2870_THREAD_STOPED; 933 pAd->CmdQ.CmdQState = RT2870_THREAD_STOPED;
921 NdisReleaseSpinLock(&pAd->CmdQLock); 934 NdisReleaseSpinLock(&pAd->CmdQLock);
922 mb(); 935 mb();
923 //RTUSBCMDUp(pAd); 936 //RTUSBCMDUp(pAd);
924 kthread_stop(pObj->RTUSBCmdThr_task); 937 ret = KILL_THREAD_PID(pObj->RTUSBCmdThr_pid, SIGTERM, 1);
925 pObj->RTUSBCmdThr_task = NULL; 938 if (ret)
939 {
940 printk(KERN_WARNING "%s: unable to RTUSBCmd thread, pid=%d, ret=%d!\n",
941 pAd->net_dev->name, GET_PID_NUMBER(pObj->RTUSBCmdThr_pid), ret);
942 }
943 else
944 {
945 //wait_for_completion (&pAd->notify);
946 wait_for_completion (&pAd->CmdQComplete);
947 pObj->RTUSBCmdThr_pid = THREAD_PID_INIT_VALUE;
948 }
926 } 949 }
927#endif 950#endif
928#ifdef RT30xx 951#ifdef RT30xx
@@ -1045,7 +1068,7 @@ BOOLEAN RT28XXChipsetCheck(
1045 dev_p->descriptor.idProduct == rtusb_usb_id[i].idProduct) 1068 dev_p->descriptor.idProduct == rtusb_usb_id[i].idProduct)
1046 { 1069 {
1047#ifndef RT30xx 1070#ifndef RT30xx
1048 printk(KERN_DEBUG "rt2870: idVendor = 0x%x, idProduct = 0x%x\n", 1071 printk("rt2870: idVendor = 0x%x, idProduct = 0x%x\n",
1049#endif 1072#endif
1050#ifdef RT30xx 1073#ifdef RT30xx
1051 printk("rt2870: idVendor = 0x%x, idProduct = 0x%x\n", 1074 printk("rt2870: idVendor = 0x%x, idProduct = 0x%x\n",
diff --git a/drivers/staging/rt2870/common/2870_rtmp_init.c b/drivers/staging/rt2870/common/2870_rtmp_init.c
index 0f4c8af97e4..80909e9ab5a 100644
--- a/drivers/staging/rt2870/common/2870_rtmp_init.c
+++ b/drivers/staging/rt2870/common/2870_rtmp_init.c
@@ -700,8 +700,8 @@ NDIS_STATUS AdapterBlockAllocateMemory(
700 usb_dev = pObj->pUsb_Dev; 700 usb_dev = pObj->pUsb_Dev;
701 701
702#ifndef RT30xx 702#ifndef RT30xx
703 pObj->MLMEThr_task = NULL; 703 pObj->MLMEThr_pid = THREAD_PID_INIT_VALUE;
704 pObj->RTUSBCmdThr_task = NULL; 704 pObj->RTUSBCmdThr_pid = THREAD_PID_INIT_VALUE;
705#endif 705#endif
706#ifdef RT30xx 706#ifdef RT30xx
707 pObj->MLMEThr_pid = NULL; 707 pObj->MLMEThr_pid = NULL;
@@ -743,7 +743,7 @@ NDIS_STATUS CreateThreads(
743 PRTMP_ADAPTER pAd = net_dev->ml_priv; 743 PRTMP_ADAPTER pAd = net_dev->ml_priv;
744 POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; 744 POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie;
745#ifndef RT30xx 745#ifndef RT30xx
746 struct task_struct *tsk; 746 pid_t pid_number = -1;
747#endif 747#endif
748#ifdef RT30xx 748#ifdef RT30xx
749 pid_t pid_number; 749 pid_t pid_number;
@@ -762,10 +762,10 @@ NDIS_STATUS CreateThreads(
762 762
763 // Creat MLME Thread 763 // Creat MLME Thread
764#ifndef RT30xx 764#ifndef RT30xx
765 pObj->MLMEThr_task = NULL; 765 pObj->MLMEThr_pid= THREAD_PID_INIT_VALUE;
766 tsk = kthread_run(MlmeThread, pAd, "%s", pAd->net_dev->name); 766 pid_number = kernel_thread(MlmeThread, pAd, CLONE_VM);
767 767 if (pid_number < 0)
768 if (IS_ERR(tsk)) { 768 {
769#endif 769#endif
770#ifdef RT30xx 770#ifdef RT30xx
771 pObj->MLMEThr_pid = NULL; 771 pObj->MLMEThr_pid = NULL;
@@ -778,7 +778,7 @@ NDIS_STATUS CreateThreads(
778 } 778 }
779 779
780#ifndef RT30xx 780#ifndef RT30xx
781 pObj->MLMEThr_task = tsk; 781 pObj->MLMEThr_pid = GET_PID(pid_number);
782#endif 782#endif
783#ifdef RT30xx 783#ifdef RT30xx
784 pObj->MLMEThr_pid = find_get_pid(pid_number); 784 pObj->MLMEThr_pid = find_get_pid(pid_number);
@@ -788,10 +788,9 @@ NDIS_STATUS CreateThreads(
788 788
789 // Creat Command Thread 789 // Creat Command Thread
790#ifndef RT30xx 790#ifndef RT30xx
791 pObj->RTUSBCmdThr_task = NULL; 791 pObj->RTUSBCmdThr_pid= THREAD_PID_INIT_VALUE;
792 tsk = kthread_run(RTUSBCmdThread, pAd, "%s", pAd->net_dev->name); 792 pid_number = kernel_thread(RTUSBCmdThread, pAd, CLONE_VM);
793 793 if (pid_number < 0)
794 if (IS_ERR(tsk) < 0)
795#endif 794#endif
796#ifdef RT30xx 795#ifdef RT30xx
797 pObj->RTUSBCmdThr_pid = NULL; 796 pObj->RTUSBCmdThr_pid = NULL;
@@ -804,7 +803,7 @@ NDIS_STATUS CreateThreads(
804 } 803 }
805 804
806#ifndef RT30xx 805#ifndef RT30xx
807 pObj->RTUSBCmdThr_task = tsk; 806 pObj->RTUSBCmdThr_pid = GET_PID(pid_number);
808#endif 807#endif
809#ifdef RT30xx 808#ifdef RT30xx
810 pObj->RTUSBCmdThr_pid = find_get_pid(pid_number); 809 pObj->RTUSBCmdThr_pid = find_get_pid(pid_number);
@@ -812,9 +811,9 @@ NDIS_STATUS CreateThreads(
812 wait_for_completion(&(pAd->CmdQComplete)); 811 wait_for_completion(&(pAd->CmdQComplete));
813 812
814#ifndef RT30xx 813#ifndef RT30xx
815 pObj->TimerQThr_task = NULL; 814 pObj->TimerQThr_pid= THREAD_PID_INIT_VALUE;
816 tsk = kthread_run(TimerQThread, pAd, "%s", pAd->net_dev->name); 815 pid_number = kernel_thread(TimerQThread, pAd, CLONE_VM);
817 if (IS_ERR(tsk) < 0) 816 if (pid_number < 0)
818#endif 817#endif
819#ifdef RT30xx 818#ifdef RT30xx
820 pObj->TimerQThr_pid = NULL; 819 pObj->TimerQThr_pid = NULL;
@@ -826,7 +825,7 @@ NDIS_STATUS CreateThreads(
826 return NDIS_STATUS_FAILURE; 825 return NDIS_STATUS_FAILURE;
827 } 826 }
828#ifndef RT30xx 827#ifndef RT30xx
829 pObj->TimerQThr_task = tsk; 828 pObj->TimerQThr_pid = GET_PID(pid_number);
830#endif 829#endif
831#ifdef RT30xx 830#ifdef RT30xx
832 pObj->TimerQThr_pid = find_get_pid(pid_number); 831 pObj->TimerQThr_pid = find_get_pid(pid_number);
diff --git a/drivers/staging/rt2870/common/rtusb_io.c b/drivers/staging/rt2870/common/rtusb_io.c
index fd1b0c18f2a..704b5c2d509 100644
--- a/drivers/staging/rt2870/common/rtusb_io.c
+++ b/drivers/staging/rt2870/common/rtusb_io.c
@@ -984,8 +984,7 @@ NDIS_STATUS RTUSBEnqueueCmdFromNdis(
984 POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; 984 POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie;
985 985
986#ifndef RT30xx 986#ifndef RT30xx
987 BUG_ON(pObj->RTUSBCmdThr_task == NULL); 987 CHECK_PID_LEGALITY(pObj->RTUSBCmdThr_pid)
988 CHECK_PID_LEGALITY(task_pid(pObj->RTUSBCmdThr_task))
989#endif 988#endif
990#ifdef RT30xx 989#ifdef RT30xx
991 if (pObj->RTUSBCmdThr_pid < 0) 990 if (pObj->RTUSBCmdThr_pid < 0)
diff --git a/drivers/staging/rt2870/rt2870.h b/drivers/staging/rt2870/rt2870.h
index 29e3b53e52a..2b8872b2fd9 100644
--- a/drivers/staging/rt2870/rt2870.h
+++ b/drivers/staging/rt2870/rt2870.h
@@ -79,6 +79,7 @@
79{ \ 79{ \
80 {USB_DEVICE(0x148F,0x2770)}, /* Ralink */ \ 80 {USB_DEVICE(0x148F,0x2770)}, /* Ralink */ \
81 {USB_DEVICE(0x1737,0x0071)}, /* Linksys WUSB600N */ \ 81 {USB_DEVICE(0x1737,0x0071)}, /* Linksys WUSB600N */ \
82 {USB_DEVICE(0x1737,0x0070)}, /* Linksys */ \
82 {USB_DEVICE(0x148F,0x2870)}, /* Ralink */ \ 83 {USB_DEVICE(0x148F,0x2870)}, /* Ralink */ \
83 {USB_DEVICE(0x148F,0x3070)}, /* Ralink */ \ 84 {USB_DEVICE(0x148F,0x3070)}, /* Ralink */ \
84 {USB_DEVICE(0x0B05,0x1731)}, /* Asus */ \ 85 {USB_DEVICE(0x0B05,0x1731)}, /* Asus */ \
@@ -93,12 +94,14 @@
93 {USB_DEVICE(0x14B2,0x3C06)}, /* Conceptronic */ \ 94 {USB_DEVICE(0x14B2,0x3C06)}, /* Conceptronic */ \
94 {USB_DEVICE(0x14B2,0x3C28)}, /* Conceptronic */ \ 95 {USB_DEVICE(0x14B2,0x3C28)}, /* Conceptronic */ \
95 {USB_DEVICE(0x2019,0xED06)}, /* Planex Communications, Inc. */ \ 96 {USB_DEVICE(0x2019,0xED06)}, /* Planex Communications, Inc. */ \
97 {USB_DEVICE(0x2019,0xED14)}, /* Planex Communications, Inc. */ \
96 {USB_DEVICE(0x2019,0xAB25)}, /* Planex Communications, Inc. RT3070 */ \ 98 {USB_DEVICE(0x2019,0xAB25)}, /* Planex Communications, Inc. RT3070 */ \
97 {USB_DEVICE(0x07D1,0x3C09)}, /* D-Link */ \ 99 {USB_DEVICE(0x07D1,0x3C09)}, /* D-Link */ \
98 {USB_DEVICE(0x07D1,0x3C11)}, /* D-Link */ \ 100 {USB_DEVICE(0x07D1,0x3C11)}, /* D-Link */ \
99 {USB_DEVICE(0x14B2,0x3C07)}, /* AL */ \ 101 {USB_DEVICE(0x14B2,0x3C07)}, /* AL */ \
100 {USB_DEVICE(0x14B2,0x3C12)}, /* AL */ \ 102 {USB_DEVICE(0x14B2,0x3C12)}, /* AL */ \
101 {USB_DEVICE(0x050D,0x8053)}, /* Belkin */ \ 103 {USB_DEVICE(0x050D,0x8053)}, /* Belkin */ \
104 {USB_DEVICE(0x050D,0x815C)}, /* Belkin */ \
102 {USB_DEVICE(0x14B2,0x3C23)}, /* Airlink */ \ 105 {USB_DEVICE(0x14B2,0x3C23)}, /* Airlink */ \
103 {USB_DEVICE(0x14B2,0x3C27)}, /* Airlink */ \ 106 {USB_DEVICE(0x14B2,0x3C27)}, /* Airlink */ \
104 {USB_DEVICE(0x07AA,0x002F)}, /* Corega */ \ 107 {USB_DEVICE(0x07AA,0x002F)}, /* Corega */ \
@@ -587,16 +590,14 @@ VOID RTUSBBulkRxComplete(purbb_t pUrb, struct pt_regs *pt_regs);
587#define RTUSBMlmeUp(pAd) \ 590#define RTUSBMlmeUp(pAd) \
588{ \ 591{ \
589 POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; \ 592 POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; \
590 BUG_ON(pObj->MLMEThr_task == NULL); \ 593 CHECK_PID_LEGALITY(pObj->MLMEThr_pid) \
591 CHECK_PID_LEGALITY(task_pid(pObj->MLMEThr_task)) \
592 up(&(pAd->mlme_semaphore)); \ 594 up(&(pAd->mlme_semaphore)); \
593} 595}
594 596
595#define RTUSBCMDUp(pAd) \ 597#define RTUSBCMDUp(pAd) \
596{ \ 598{ \
597 POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; \ 599 POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; \
598 BUG_ON(pObj->RTUSBCmdThr_task == NULL); \ 600 CHECK_PID_LEGALITY(pObj->RTUSBCmdThr_pid) \
599 CHECK_PID_LEGALITY(task_pid(pObj->RTUSBCmdThr_task)) \
600 up(&(pAd->RTUSBCmd_semaphore)); \ 601 up(&(pAd->RTUSBCmd_semaphore)); \
601} 602}
602#endif 603#endif
diff --git a/drivers/staging/rtl8192su/ieee80211.h b/drivers/staging/rtl8192su/ieee80211.h
index 0edb09a536f..ea973931803 100644
--- a/drivers/staging/rtl8192su/ieee80211.h
+++ b/drivers/staging/rtl8192su/ieee80211.h
@@ -2645,7 +2645,7 @@ extern int ieee80211_encrypt_fragment(
2645 struct sk_buff *frag, 2645 struct sk_buff *frag,
2646 int hdr_len); 2646 int hdr_len);
2647 2647
2648extern int ieee80211_xmit(struct sk_buff *skb, 2648extern int rtl8192_ieee80211_xmit(struct sk_buff *skb,
2649 struct net_device *dev); 2649 struct net_device *dev);
2650extern void ieee80211_txb_free(struct ieee80211_txb *); 2650extern void ieee80211_txb_free(struct ieee80211_txb *);
2651 2651
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211.h b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
index 720bfcbfadc..5e3a2cbed2b 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
@@ -2645,7 +2645,7 @@ extern int ieee80211_encrypt_fragment(
2645 struct sk_buff *frag, 2645 struct sk_buff *frag,
2646 int hdr_len); 2646 int hdr_len);
2647 2647
2648extern int ieee80211_xmit(struct sk_buff *skb, 2648extern int rtl8192_ieee80211_xmit(struct sk_buff *skb,
2649 struct net_device *dev); 2649 struct net_device *dev);
2650extern void ieee80211_txb_free(struct ieee80211_txb *); 2650extern void ieee80211_txb_free(struct ieee80211_txb *);
2651 2651
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c
index 7294572b990..cba12b84be5 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c
@@ -618,7 +618,7 @@ void ieee80211_query_seqnum(struct ieee80211_device*ieee, struct sk_buff* skb, u
618 } 618 }
619} 619}
620 620
621int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) 621int rtl8192_ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
622{ 622{
623#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) 623#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
624 struct ieee80211_device *ieee = netdev_priv(dev); 624 struct ieee80211_device *ieee = netdev_priv(dev);
@@ -943,5 +943,6 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
943 return 1; 943 return 1;
944 944
945} 945}
946EXPORT_SYMBOL(rtl8192_ieee80211_xmit);
946 947
947EXPORT_SYMBOL(ieee80211_txb_free); 948EXPORT_SYMBOL(ieee80211_txb_free);
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c
index 4ab250743e8..70f81a8f129 100644
--- a/drivers/staging/rtl8192su/r8192U_core.c
+++ b/drivers/staging/rtl8192su/r8192U_core.c
@@ -12142,7 +12142,7 @@ static const struct net_device_ops rtl8192_netdev_ops = {
12142 .ndo_set_mac_address = r8192_set_mac_adr, 12142 .ndo_set_mac_address = r8192_set_mac_adr,
12143 .ndo_validate_addr = eth_validate_addr, 12143 .ndo_validate_addr = eth_validate_addr,
12144 .ndo_change_mtu = eth_change_mtu, 12144 .ndo_change_mtu = eth_change_mtu,
12145 .ndo_start_xmit = ieee80211_xmit, 12145 .ndo_start_xmit = rtl8192_ieee80211_xmit,
12146}; 12146};
12147 12147
12148#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) 12148#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
diff --git a/drivers/staging/serqt_usb2/serqt_usb2.c b/drivers/staging/serqt_usb2/serqt_usb2.c
index a9bd4106beb..0fdf8c6dc64 100644
--- a/drivers/staging/serqt_usb2/serqt_usb2.c
+++ b/drivers/staging/serqt_usb2/serqt_usb2.c
@@ -360,18 +360,18 @@ static void qt_read_bulk_callback(struct urb *urb)
360 if (port_paranoia_check(port, __func__) != 0) { 360 if (port_paranoia_check(port, __func__) != 0) {
361 dbg("%s - port_paranoia_check, exiting\n", __func__); 361 dbg("%s - port_paranoia_check, exiting\n", __func__);
362 qt_port->ReadBulkStopped = 1; 362 qt_port->ReadBulkStopped = 1;
363 return; 363 goto exit;
364 } 364 }
365 365
366 if (!serial) { 366 if (!serial) {
367 dbg("%s - bad serial pointer, exiting\n", __func__); 367 dbg("%s - bad serial pointer, exiting\n", __func__);
368 return; 368 goto exit;
369 } 369 }
370 if (qt_port->closePending == 1) { 370 if (qt_port->closePending == 1) {
371 /* Were closing , stop reading */ 371 /* Were closing , stop reading */
372 dbg("%s - (qt_port->closepending == 1\n", __func__); 372 dbg("%s - (qt_port->closepending == 1\n", __func__);
373 qt_port->ReadBulkStopped = 1; 373 qt_port->ReadBulkStopped = 1;
374 return; 374 goto exit;
375 } 375 }
376 376
377 /* 377 /*
@@ -381,7 +381,7 @@ static void qt_read_bulk_callback(struct urb *urb)
381 */ 381 */
382 if (qt_port->RxHolding == 1) { 382 if (qt_port->RxHolding == 1) {
383 qt_port->ReadBulkStopped = 1; 383 qt_port->ReadBulkStopped = 1;
384 return; 384 goto exit;
385 } 385 }
386 386
387 if (urb->status) { 387 if (urb->status) {
@@ -389,7 +389,7 @@ static void qt_read_bulk_callback(struct urb *urb)
389 389
390 dbg("%s - nonzero read bulk status received: %d\n", 390 dbg("%s - nonzero read bulk status received: %d\n",
391 __func__, urb->status); 391 __func__, urb->status);
392 return; 392 goto exit;
393 } 393 }
394 394
395 if (tty && RxCount) { 395 if (tty && RxCount) {
@@ -463,6 +463,8 @@ static void qt_read_bulk_callback(struct urb *urb)
463 } 463 }
464 464
465 schedule_work(&port->work); 465 schedule_work(&port->work);
466exit:
467 tty_kref_put(tty);
466} 468}
467 469
468/* 470/*
@@ -736,6 +738,11 @@ static int qt_startup(struct usb_serial *serial)
736 if (!qt_port) { 738 if (!qt_port) {
737 dbg("%s: kmalloc for quatech_port (%d) failed!.", 739 dbg("%s: kmalloc for quatech_port (%d) failed!.",
738 __func__, i); 740 __func__, i);
741 for(--i; i >= 0; i--) {
742 port = serial->port[i];
743 kfree(usb_get_serial_port_data(port));
744 usb_set_serial_port_data(port, NULL);
745 }
739 return -ENOMEM; 746 return -ENOMEM;
740 } 747 }
741 spin_lock_init(&qt_port->lock); 748 spin_lock_init(&qt_port->lock);
@@ -1041,7 +1048,7 @@ static void qt_block_until_empty(struct tty_struct *tty,
1041 } 1048 }
1042} 1049}
1043 1050
1044static void qt_close( struct usb_serial_port *port) 1051static void qt_close(struct usb_serial_port *port)
1045{ 1052{
1046 struct usb_serial *serial = port->serial; 1053 struct usb_serial *serial = port->serial;
1047 struct quatech_port *qt_port; 1054 struct quatech_port *qt_port;
@@ -1068,6 +1075,7 @@ static void qt_close( struct usb_serial_port *port)
1068 /* wait up to for transmitter to empty */ 1075 /* wait up to for transmitter to empty */
1069 if (serial->dev) 1076 if (serial->dev)
1070 qt_block_until_empty(tty, qt_port); 1077 qt_block_until_empty(tty, qt_port);
1078 tty_kref_put(tty);
1071 1079
1072 /* Close uart channel */ 1080 /* Close uart channel */
1073 status = qt_close_channel(serial, index); 1081 status = qt_close_channel(serial, index);
diff --git a/drivers/staging/uc2322/Kconfig b/drivers/staging/uc2322/Kconfig
deleted file mode 100644
index 2e0c6e79df2..00000000000
--- a/drivers/staging/uc2322/Kconfig
+++ /dev/null
@@ -1,10 +0,0 @@
1config USB_SERIAL_ATEN2011
2 tristate "ATEN 2011 USB to serial device support"
3 depends on USB_SERIAL
4 default N
5 ---help---
6 Say Y here if you want to use a ATEN 2011 dual port USB to serial
7 adapter.
8
9 To compile this driver as a module, choose M here: the module will be
10 called aten2011.
diff --git a/drivers/staging/uc2322/Makefile b/drivers/staging/uc2322/Makefile
deleted file mode 100644
index 49c18d6e579..00000000000
--- a/drivers/staging/uc2322/Makefile
+++ /dev/null
@@ -1 +0,0 @@
1obj-$(CONFIG_USB_SERIAL_ATEN2011) += aten2011.o
diff --git a/drivers/staging/uc2322/TODO b/drivers/staging/uc2322/TODO
deleted file mode 100644
index c189a64c418..00000000000
--- a/drivers/staging/uc2322/TODO
+++ /dev/null
@@ -1,7 +0,0 @@
1TODO:
2 - checkpatch.pl cleanups
3 - remove dead and useless code (auditing the tty ioctls to
4 verify that they really are correct and needed.)
5
6Please send any patches to Greg Kroah-Hartman <greg@kroah.com> and
7Russell Lang <gsview@ghostgum.com.au>.
diff --git a/drivers/staging/uc2322/aten2011.c b/drivers/staging/uc2322/aten2011.c
deleted file mode 100644
index 39d0926d1a9..00000000000
--- a/drivers/staging/uc2322/aten2011.c
+++ /dev/null
@@ -1,2430 +0,0 @@
1/*
2 * Aten 2011 USB serial driver for 4 port devices
3 *
4 * Copyright (C) 2000 Inside Out Networks
5 * Copyright (C) 2001-2002, 2009 Greg Kroah-Hartman <greg@kroah.com>
6 * Copyright (C) 2009 Novell Inc.
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 */
14
15#include <linux/kernel.h>
16#include <linux/errno.h>
17#include <linux/init.h>
18#include <linux/slab.h>
19#include <linux/tty.h>
20#include <linux/tty_driver.h>
21#include <linux/tty_flip.h>
22#include <linux/module.h>
23#include <linux/serial.h>
24#include <linux/uaccess.h>
25#include <linux/usb.h>
26#include <linux/usb/serial.h>
27
28
29#define ZLP_REG1 0x3A /* Zero_Flag_Reg1 58 */
30#define ZLP_REG2 0x3B /* Zero_Flag_Reg2 59 */
31#define ZLP_REG3 0x3C /* Zero_Flag_Reg3 60 */
32#define ZLP_REG4 0x3D /* Zero_Flag_Reg4 61 */
33#define ZLP_REG5 0x3E /* Zero_Flag_Reg5 62 */
34
35/* Interrupt Rotinue Defines */
36#define SERIAL_IIR_RLS 0x06
37#define SERIAL_IIR_RDA 0x04
38#define SERIAL_IIR_CTI 0x0c
39#define SERIAL_IIR_THR 0x02
40#define SERIAL_IIR_MS 0x00
41
42/* Emulation of the bit mask on the LINE STATUS REGISTER. */
43#define SERIAL_LSR_DR 0x0001
44#define SERIAL_LSR_OE 0x0002
45#define SERIAL_LSR_PE 0x0004
46#define SERIAL_LSR_FE 0x0008
47#define SERIAL_LSR_BI 0x0010
48#define SERIAL_LSR_THRE 0x0020
49#define SERIAL_LSR_TEMT 0x0040
50#define SERIAL_LSR_FIFOERR 0x0080
51
52/* MSR bit defines(place holders) */
53#define ATEN_MSR_DELTA_CTS 0x10
54#define ATEN_MSR_DELTA_DSR 0x20
55#define ATEN_MSR_DELTA_RI 0x40
56#define ATEN_MSR_DELTA_CD 0x80
57
58/* Serial Port register Address */
59#define RECEIVE_BUFFER_REGISTER ((__u16)(0x00))
60#define TRANSMIT_HOLDING_REGISTER ((__u16)(0x00))
61#define INTERRUPT_ENABLE_REGISTER ((__u16)(0x01))
62#define INTERRUPT_IDENT_REGISTER ((__u16)(0x02))
63#define FIFO_CONTROL_REGISTER ((__u16)(0x02))
64#define LINE_CONTROL_REGISTER ((__u16)(0x03))
65#define MODEM_CONTROL_REGISTER ((__u16)(0x04))
66#define LINE_STATUS_REGISTER ((__u16)(0x05))
67#define MODEM_STATUS_REGISTER ((__u16)(0x06))
68#define SCRATCH_PAD_REGISTER ((__u16)(0x07))
69#define DIVISOR_LATCH_LSB ((__u16)(0x00))
70#define DIVISOR_LATCH_MSB ((__u16)(0x01))
71
72#define SP1_REGISTER ((__u16)(0x00))
73#define CONTROL1_REGISTER ((__u16)(0x01))
74#define CLK_MULTI_REGISTER ((__u16)(0x02))
75#define CLK_START_VALUE_REGISTER ((__u16)(0x03))
76#define DCR1_REGISTER ((__u16)(0x04))
77#define GPIO_REGISTER ((__u16)(0x07))
78
79#define SERIAL_LCR_DLAB ((__u16)(0x0080))
80
81/*
82 * URB POOL related defines
83 */
84#define NUM_URBS 16 /* URB Count */
85#define URB_TRANSFER_BUFFER_SIZE 32 /* URB Size */
86
87#define USB_VENDOR_ID_ATENINTL 0x0557
88#define ATENINTL_DEVICE_ID_2011 0x2011
89#define ATENINTL_DEVICE_ID_7820 0x7820
90
91static struct usb_device_id id_table[] = {
92 { USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_2011) },
93 { USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_7820) },
94 { } /* terminating entry */
95};
96MODULE_DEVICE_TABLE(usb, id_table);
97
98/* This structure holds all of the local port information */
99struct ATENINTL_port {
100 int port_num; /*Actual port number in the device(1,2,etc)*/
101 __u8 bulk_out_endpoint; /* the bulk out endpoint handle */
102 unsigned char *bulk_out_buffer; /* buffer used for the bulk out endpoint */
103 struct urb *write_urb; /* write URB for this port */
104 __u8 bulk_in_endpoint; /* the bulk in endpoint handle */
105 unsigned char *bulk_in_buffer; /* the buffer we use for the bulk in endpoint */
106 struct urb *read_urb; /* read URB for this port */
107 __u8 shadowLCR; /* last LCR value received */
108 __u8 shadowMCR; /* last MCR value received */
109 char open;
110 char chaseResponsePending;
111 wait_queue_head_t wait_chase; /* for handling sleeping while waiting for chase to finish */
112 wait_queue_head_t wait_command; /* for handling sleeping while waiting for command to finish */
113 struct async_icount icount;
114 struct usb_serial_port *port; /* loop back to the owner of this object */
115 /*Offsets*/
116 __u8 SpRegOffset;
117 __u8 ControlRegOffset;
118 __u8 DcrRegOffset;
119 /* for processing control URBS in interrupt context */
120 struct urb *control_urb;
121 char *ctrl_buf;
122 int MsrLsr;
123
124 struct urb *write_urb_pool[NUM_URBS];
125 /* we pass a pointer to this as the arguement sent to cypress_set_termios old_termios */
126 struct ktermios tmp_termios; /* stores the old termios settings */
127 spinlock_t lock; /* private lock */
128};
129
130/* This structure holds all of the individual serial device information */
131struct ATENINTL_serial {
132 __u8 interrupt_in_endpoint; /* the interrupt endpoint handle */
133 unsigned char *interrupt_in_buffer; /* the buffer we use for the interrupt endpoint */
134 struct urb *interrupt_read_urb; /* our interrupt urb */
135 __u8 bulk_in_endpoint; /* the bulk in endpoint handle */
136 unsigned char *bulk_in_buffer; /* the buffer we use for the bulk in endpoint */
137 struct urb *read_urb; /* our bulk read urb */
138 __u8 bulk_out_endpoint; /* the bulk out endpoint handle */
139 struct usb_serial *serial; /* loop back to the owner of this object */
140 int ATEN2011_spectrum_2or4ports; /* this says the number of ports in the device */
141 /* Indicates about the no.of opened ports of an individual USB-serial adapater. */
142 unsigned int NoOfOpenPorts;
143 /* a flag for Status endpoint polling */
144 unsigned char status_polling_started;
145};
146
147static void ATEN2011_set_termios(struct tty_struct *tty,
148 struct usb_serial_port *port,
149 struct ktermios *old_termios);
150static void ATEN2011_change_port_settings(struct tty_struct *tty,
151 struct ATENINTL_port *ATEN2011_port,
152 struct ktermios *old_termios);
153
154/*************************************
155 * Bit definitions for each register *
156 *************************************/
157#define LCR_BITS_5 0x00 /* 5 bits/char */
158#define LCR_BITS_6 0x01 /* 6 bits/char */
159#define LCR_BITS_7 0x02 /* 7 bits/char */
160#define LCR_BITS_8 0x03 /* 8 bits/char */
161#define LCR_BITS_MASK 0x03 /* Mask for bits/char field */
162
163#define LCR_STOP_1 0x00 /* 1 stop bit */
164#define LCR_STOP_1_5 0x04 /* 1.5 stop bits (if 5 bits/char) */
165#define LCR_STOP_2 0x04 /* 2 stop bits (if 6-8 bits/char) */
166#define LCR_STOP_MASK 0x04 /* Mask for stop bits field */
167
168#define LCR_PAR_NONE 0x00 /* No parity */
169#define LCR_PAR_ODD 0x08 /* Odd parity */
170#define LCR_PAR_EVEN 0x18 /* Even parity */
171#define LCR_PAR_MARK 0x28 /* Force parity bit to 1 */
172#define LCR_PAR_SPACE 0x38 /* Force parity bit to 0 */
173#define LCR_PAR_MASK 0x38 /* Mask for parity field */
174
175#define LCR_SET_BREAK 0x40 /* Set Break condition */
176#define LCR_DL_ENABLE 0x80 /* Enable access to divisor latch */
177
178#define MCR_DTR 0x01 /* Assert DTR */
179#define MCR_RTS 0x02 /* Assert RTS */
180#define MCR_OUT1 0x04 /* Loopback only: Sets state of RI */
181#define MCR_MASTER_IE 0x08 /* Enable interrupt outputs */
182#define MCR_LOOPBACK 0x10 /* Set internal (digital) loopback mode */
183#define MCR_XON_ANY 0x20 /* Enable any char to exit XOFF mode */
184
185#define ATEN2011_MSR_CTS 0x10 /* Current state of CTS */
186#define ATEN2011_MSR_DSR 0x20 /* Current state of DSR */
187#define ATEN2011_MSR_RI 0x40 /* Current state of RI */
188#define ATEN2011_MSR_CD 0x80 /* Current state of CD */
189
190
191static int debug;
192
193/*
194 * Version Information
195 */
196#define DRIVER_VERSION "2.0"
197#define DRIVER_DESC "ATENINTL 2011 USB Serial Adapter"
198
199/*
200 * Defines used for sending commands to port
201 */
202
203#define ATEN_WDR_TIMEOUT (50) /* default urb timeout */
204
205/* Requests */
206#define ATEN_RD_RTYPE 0xC0
207#define ATEN_WR_RTYPE 0x40
208#define ATEN_RDREQ 0x0D
209#define ATEN_WRREQ 0x0E
210#define ATEN_CTRL_TIMEOUT 500
211#define VENDOR_READ_LENGTH (0x01)
212
213/* set to 1 for RS485 mode and 0 for RS232 mode */
214/* FIXME make this somehow dynamic and not build time specific */
215static int RS485mode;
216
217static int set_reg_sync(struct usb_serial_port *port, __u16 reg, __u16 val)
218{
219 struct usb_device *dev = port->serial->dev;
220 val = val & 0x00ff;
221
222 dbg("%s: is %x, value %x", __func__, reg, val);
223
224 return usb_control_msg(dev, usb_sndctrlpipe(dev, 0), ATEN_WRREQ,
225 ATEN_WR_RTYPE, val, reg, NULL, 0,
226 ATEN_WDR_TIMEOUT);
227}
228
229static int get_reg_sync(struct usb_serial_port *port, __u16 reg, __u16 *val)
230{
231 struct usb_device *dev = port->serial->dev;
232 int ret;
233
234 ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), ATEN_RDREQ,
235 ATEN_RD_RTYPE, 0, reg, val, VENDOR_READ_LENGTH,
236 ATEN_WDR_TIMEOUT);
237 dbg("%s: offset is %x, return val %x", __func__, reg, *val);
238 *val = (*val) & 0x00ff;
239 return ret;
240}
241
242static int set_uart_reg(struct usb_serial_port *port, __u16 reg, __u16 val)
243{
244 struct usb_device *dev = port->serial->dev;
245 struct ATENINTL_serial *a_serial;
246 __u16 minor;
247
248 a_serial = usb_get_serial_data(port->serial);
249 minor = port->serial->minor;
250 if (minor == SERIAL_TTY_NO_MINOR)
251 minor = 0;
252 val = val & 0x00ff;
253
254 /*
255 * For the UART control registers,
256 * the application number need to be Or'ed
257 */
258 if (a_serial->ATEN2011_spectrum_2or4ports == 4)
259 val |= (((__u16)port->number - minor) + 1) << 8;
260 else {
261 if (((__u16) port->number - minor) == 0)
262 val |= (((__u16)port->number - minor) + 1) << 8;
263 else
264 val |= (((__u16)port->number - minor) + 2) << 8;
265 }
266 dbg("%s: application number is %x", __func__, val);
267
268 return usb_control_msg(dev, usb_sndctrlpipe(dev, 0), ATEN_WRREQ,
269 ATEN_WR_RTYPE, val, reg, NULL, 0,
270 ATEN_WDR_TIMEOUT);
271}
272
273static int get_uart_reg(struct usb_serial_port *port, __u16 reg, __u16 *val)
274{
275 struct usb_device *dev = port->serial->dev;
276 int ret = 0;
277 __u16 wval;
278 struct ATENINTL_serial *a_serial;
279 __u16 minor = port->serial->minor;
280
281 a_serial = usb_get_serial_data(port->serial);
282 if (minor == SERIAL_TTY_NO_MINOR)
283 minor = 0;
284
285 /* wval is same as application number */
286 if (a_serial->ATEN2011_spectrum_2or4ports == 4)
287 wval = (((__u16)port->number - minor) + 1) << 8;
288 else {
289 if (((__u16) port->number - minor) == 0)
290 wval = (((__u16) port->number - minor) + 1) << 8;
291 else
292 wval = (((__u16) port->number - minor) + 2) << 8;
293 }
294 dbg("%s: application number is %x", __func__, wval);
295 ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), ATEN_RDREQ,
296 ATEN_RD_RTYPE, wval, reg, val, VENDOR_READ_LENGTH,
297 ATEN_WDR_TIMEOUT);
298 *val = (*val) & 0x00ff;
299 return ret;
300}
301
302static int handle_newMsr(struct ATENINTL_port *port, __u8 newMsr)
303{
304 struct ATENINTL_port *ATEN2011_port;
305 struct async_icount *icount;
306 ATEN2011_port = port;
307 icount = &ATEN2011_port->icount;
308 if (newMsr &
309 (ATEN_MSR_DELTA_CTS | ATEN_MSR_DELTA_DSR | ATEN_MSR_DELTA_RI |
310 ATEN_MSR_DELTA_CD)) {
311 icount = &ATEN2011_port->icount;
312
313 /* update input line counters */
314 if (newMsr & ATEN_MSR_DELTA_CTS)
315 icount->cts++;
316 if (newMsr & ATEN_MSR_DELTA_DSR)
317 icount->dsr++;
318 if (newMsr & ATEN_MSR_DELTA_CD)
319 icount->dcd++;
320 if (newMsr & ATEN_MSR_DELTA_RI)
321 icount->rng++;
322 }
323
324 return 0;
325}
326
327static int handle_newLsr(struct ATENINTL_port *port, __u8 newLsr)
328{
329 struct async_icount *icount;
330
331 dbg("%s - %02x", __func__, newLsr);
332
333 if (newLsr & SERIAL_LSR_BI) {
334 /*
335 * Parity and Framing errors only count if they occur exclusive
336 * of a break being received.
337 */
338 newLsr &= (__u8) (SERIAL_LSR_OE | SERIAL_LSR_BI);
339 }
340
341 /* update input line counters */
342 icount = &port->icount;
343 if (newLsr & SERIAL_LSR_BI)
344 icount->brk++;
345 if (newLsr & SERIAL_LSR_OE)
346 icount->overrun++;
347 if (newLsr & SERIAL_LSR_PE)
348 icount->parity++;
349 if (newLsr & SERIAL_LSR_FE)
350 icount->frame++;
351
352 return 0;
353}
354
355static void ATEN2011_control_callback(struct urb *urb)
356{
357 unsigned char *data;
358 struct ATENINTL_port *ATEN2011_port;
359 __u8 regval = 0x0;
360
361 switch (urb->status) {
362 case 0:
363 /* success */
364 break;
365 case -ECONNRESET:
366 case -ENOENT:
367 case -ESHUTDOWN:
368 /* this urb is terminated, clean up */
369 dbg("%s - urb shutting down with status: %d", __func__,
370 urb->status);
371 return;
372 default:
373 dbg("%s - nonzero urb status received: %d", __func__,
374 urb->status);
375 goto exit;
376 }
377
378 ATEN2011_port = (struct ATENINTL_port *)urb->context;
379
380 dbg("%s urb buffer size is %d", __func__, urb->actual_length);
381 dbg("%s ATEN2011_port->MsrLsr is %d port %d", __func__,
382 ATEN2011_port->MsrLsr, ATEN2011_port->port_num);
383 data = urb->transfer_buffer;
384 regval = (__u8) data[0];
385 dbg("%s data is %x", __func__, regval);
386 if (ATEN2011_port->MsrLsr == 0)
387 handle_newMsr(ATEN2011_port, regval);
388 else if (ATEN2011_port->MsrLsr == 1)
389 handle_newLsr(ATEN2011_port, regval);
390
391exit:
392 return;
393}
394
395static int ATEN2011_get_reg(struct ATENINTL_port *ATEN, __u16 Wval, __u16 reg,
396 __u16 *val)
397{
398 struct usb_device *dev = ATEN->port->serial->dev;
399 struct usb_ctrlrequest *dr = NULL;
400 unsigned char *buffer = NULL;
401 int ret = 0;
402 buffer = (__u8 *) ATEN->ctrl_buf;
403
404 dr = (void *)(buffer + 2);
405 dr->bRequestType = ATEN_RD_RTYPE;
406 dr->bRequest = ATEN_RDREQ;
407 dr->wValue = cpu_to_le16(Wval);
408 dr->wIndex = cpu_to_le16(reg);
409 dr->wLength = cpu_to_le16(2);
410
411 usb_fill_control_urb(ATEN->control_urb, dev, usb_rcvctrlpipe(dev, 0),
412 (unsigned char *)dr, buffer, 2,
413 ATEN2011_control_callback, ATEN);
414 ATEN->control_urb->transfer_buffer_length = 2;
415 ret = usb_submit_urb(ATEN->control_urb, GFP_ATOMIC);
416 return ret;
417}
418
419static void ATEN2011_interrupt_callback(struct urb *urb)
420{
421 int result;
422 int length;
423 struct ATENINTL_port *ATEN2011_port;
424 struct ATENINTL_serial *ATEN2011_serial;
425 struct usb_serial *serial;
426 __u16 Data;
427 unsigned char *data;
428 __u8 sp[5], st;
429 int i;
430 __u16 wval;
431 int minor;
432
433 dbg("%s", " : Entering");
434
435 ATEN2011_serial = (struct ATENINTL_serial *)urb->context;
436
437 switch (urb->status) {
438 case 0:
439 /* success */
440 break;
441 case -ECONNRESET:
442 case -ENOENT:
443 case -ESHUTDOWN:
444 /* this urb is terminated, clean up */
445 dbg("%s - urb shutting down with status: %d", __func__,
446 urb->status);
447 return;
448 default:
449 dbg("%s - nonzero urb status received: %d", __func__,
450 urb->status);
451 goto exit;
452 }
453 length = urb->actual_length;
454 data = urb->transfer_buffer;
455
456 serial = ATEN2011_serial->serial;
457
458 /* ATENINTL get 5 bytes
459 * Byte 1 IIR Port 1 (port.number is 0)
460 * Byte 2 IIR Port 2 (port.number is 1)
461 * Byte 3 IIR Port 3 (port.number is 2)
462 * Byte 4 IIR Port 4 (port.number is 3)
463 * Byte 5 FIFO status for both */
464
465 if (length && length > 5) {
466 dbg("%s", "Wrong data !!!");
467 return;
468 }
469
470 /* MATRIX */
471 if (ATEN2011_serial->ATEN2011_spectrum_2or4ports == 4) {
472 sp[0] = (__u8) data[0];
473 sp[1] = (__u8) data[1];
474 sp[2] = (__u8) data[2];
475 sp[3] = (__u8) data[3];
476 st = (__u8) data[4];
477 } else {
478 sp[0] = (__u8) data[0];
479 sp[1] = (__u8) data[2];
480 /* sp[2]=(__u8)data[2]; */
481 /* sp[3]=(__u8)data[3]; */
482 st = (__u8) data[4];
483
484 }
485 for (i = 0; i < serial->num_ports; i++) {
486 ATEN2011_port = usb_get_serial_port_data(serial->port[i]);
487 minor = serial->minor;
488 if (minor == SERIAL_TTY_NO_MINOR)
489 minor = 0;
490 if ((ATEN2011_serial->ATEN2011_spectrum_2or4ports == 2)
491 && (i != 0))
492 wval =
493 (((__u16) serial->port[i]->number -
494 (__u16) (minor)) + 2) << 8;
495 else
496 wval =
497 (((__u16) serial->port[i]->number -
498 (__u16) (minor)) + 1) << 8;
499 if (ATEN2011_port->open != 0) {
500 if (sp[i] & 0x01) {
501 dbg("SP%d No Interrupt !!!", i);
502 } else {
503 switch (sp[i] & 0x0f) {
504 case SERIAL_IIR_RLS:
505 dbg("Serial Port %d: Receiver status error or address bit detected in 9-bit mode", i);
506 ATEN2011_port->MsrLsr = 1;
507 ATEN2011_get_reg(ATEN2011_port, wval,
508 LINE_STATUS_REGISTER,
509 &Data);
510 break;
511 case SERIAL_IIR_MS:
512 dbg("Serial Port %d: Modem status change", i);
513 ATEN2011_port->MsrLsr = 0;
514 ATEN2011_get_reg(ATEN2011_port, wval,
515 MODEM_STATUS_REGISTER,
516 &Data);
517 break;
518 }
519 }
520 }
521
522 }
523exit:
524 if (ATEN2011_serial->status_polling_started == 0)
525 return;
526
527 result = usb_submit_urb(urb, GFP_ATOMIC);
528 if (result) {
529 dev_err(&urb->dev->dev,
530 "%s - Error %d submitting interrupt urb\n",
531 __func__, result);
532 }
533
534 return;
535}
536
537static void ATEN2011_bulk_in_callback(struct urb *urb)
538{
539 int status;
540 unsigned char *data;
541 struct usb_serial *serial;
542 struct usb_serial_port *port;
543 struct ATENINTL_serial *ATEN2011_serial;
544 struct ATENINTL_port *ATEN2011_port;
545 struct tty_struct *tty;
546
547 if (urb->status) {
548 dbg("nonzero read bulk status received: %d", urb->status);
549 return;
550 }
551
552 ATEN2011_port = (struct ATENINTL_port *)urb->context;
553
554 port = (struct usb_serial_port *)ATEN2011_port->port;
555 serial = port->serial;
556
557 dbg("%s", "Entering...");
558
559 data = urb->transfer_buffer;
560 ATEN2011_serial = usb_get_serial_data(serial);
561
562 if (urb->actual_length) {
563 tty = tty_port_tty_get(&ATEN2011_port->port->port);
564 if (tty) {
565 tty_buffer_request_room(tty, urb->actual_length);
566 tty_insert_flip_string(tty, data, urb->actual_length);
567 tty_flip_buffer_push(tty);
568 tty_kref_put(tty);
569 }
570
571 ATEN2011_port->icount.rx += urb->actual_length;
572 dbg("ATEN2011_port->icount.rx is %d:",
573 ATEN2011_port->icount.rx);
574 }
575
576 if (!ATEN2011_port->read_urb) {
577 dbg("%s", "URB KILLED !!!");
578 return;
579 }
580
581 if (ATEN2011_port->read_urb->status != -EINPROGRESS) {
582 ATEN2011_port->read_urb->dev = serial->dev;
583
584 status = usb_submit_urb(ATEN2011_port->read_urb, GFP_ATOMIC);
585 if (status)
586 dbg("usb_submit_urb(read bulk) failed, status = %d", status);
587 }
588}
589
590static void ATEN2011_bulk_out_data_callback(struct urb *urb)
591{
592 struct ATENINTL_port *ATEN2011_port;
593 struct tty_struct *tty;
594
595 if (urb->status) {
596 dbg("nonzero write bulk status received:%d", urb->status);
597 return;
598 }
599
600 ATEN2011_port = (struct ATENINTL_port *)urb->context;
601
602 dbg("%s", "Entering .........");
603
604 tty = tty_port_tty_get(&ATEN2011_port->port->port);
605
606 if (tty && ATEN2011_port->open)
607 /* tell the tty driver that something has changed */
608 tty_wakeup(tty);
609
610 /* schedule_work(&ATEN2011_port->port->work); */
611 tty_kref_put(tty);
612
613}
614
615#ifdef ATENSerialProbe
616static int ATEN2011_serial_probe(struct usb_serial *serial,
617 const struct usb_device_id *id)
618{
619
620 /*need to implement the mode_reg reading and updating\
621 structures usb_serial_ device_type\
622 (i.e num_ports, num_bulkin,bulkout etc) */
623 /* Also we can update the changes attach */
624 return 1;
625}
626#endif
627
628static int ATEN2011_open(struct tty_struct *tty, struct usb_serial_port *port,
629 struct file *filp)
630{
631 int response;
632 int j;
633 struct usb_serial *serial;
634 struct urb *urb;
635 __u16 Data;
636 int status;
637 struct ATENINTL_serial *ATEN2011_serial;
638 struct ATENINTL_port *ATEN2011_port;
639 struct ktermios tmp_termios;
640 int minor;
641
642 serial = port->serial;
643
644 ATEN2011_port = usb_get_serial_port_data(port);
645
646 if (ATEN2011_port == NULL)
647 return -ENODEV;
648
649 ATEN2011_serial = usb_get_serial_data(serial);
650 if (ATEN2011_serial == NULL)
651 return -ENODEV;
652
653 /* increment the number of opened ports counter here */
654 ATEN2011_serial->NoOfOpenPorts++;
655
656 usb_clear_halt(serial->dev, port->write_urb->pipe);
657 usb_clear_halt(serial->dev, port->read_urb->pipe);
658
659 /* Initialising the write urb pool */
660 for (j = 0; j < NUM_URBS; ++j) {
661 urb = usb_alloc_urb(0, GFP_ATOMIC);
662 ATEN2011_port->write_urb_pool[j] = urb;
663
664 if (urb == NULL) {
665 err("No more urbs???");
666 continue;
667 }
668
669 urb->transfer_buffer = NULL;
670 urb->transfer_buffer =
671 kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
672 if (!urb->transfer_buffer) {
673 err("%s-out of memory for urb buffers.", __func__);
674 continue;
675 }
676 }
677
678/*****************************************************************************
679 * Initialize ATEN2011 -- Write Init values to corresponding Registers
680 *
681 * Register Index
682 * 1 : IER
683 * 2 : FCR
684 * 3 : LCR
685 * 4 : MCR
686 *
687 * 0x08 : SP1/2 Control Reg
688 *****************************************************************************/
689
690/* NEED to check the fallowing Block */
691
692 Data = 0x0;
693 status = get_reg_sync(port, ATEN2011_port->SpRegOffset, &Data);
694 if (status < 0) {
695 dbg("Reading Spreg failed");
696 return -1;
697 }
698 Data |= 0x80;
699 status = set_reg_sync(port, ATEN2011_port->SpRegOffset, Data);
700 if (status < 0) {
701 dbg("writing Spreg failed");
702 return -1;
703 }
704
705 Data &= ~0x80;
706 status = set_reg_sync(port, ATEN2011_port->SpRegOffset, Data);
707 if (status < 0) {
708 dbg("writing Spreg failed");
709 return -1;
710 }
711
712/* End of block to be checked */
713/**************************CHECK***************************/
714
715 if (RS485mode == 0)
716 Data = 0xC0;
717 else
718 Data = 0x00;
719 status = set_uart_reg(port, SCRATCH_PAD_REGISTER, Data);
720 if (status < 0) {
721 dbg("Writing SCRATCH_PAD_REGISTER failed status-0x%x", status);
722 return -1;
723 } else
724 dbg("SCRATCH_PAD_REGISTER Writing success status%d", status);
725
726/**************************CHECK***************************/
727
728 Data = 0x0;
729 status = get_reg_sync(port, ATEN2011_port->ControlRegOffset, &Data);
730 if (status < 0) {
731 dbg("Reading Controlreg failed");
732 return -1;
733 }
734 Data |= 0x08; /* Driver done bit */
735 Data |= 0x20; /* rx_disable */
736 status = 0;
737 status =
738 set_reg_sync(port, ATEN2011_port->ControlRegOffset, Data);
739 if (status < 0) {
740 dbg("writing Controlreg failed");
741 return -1;
742 }
743 /*
744 * do register settings here
745 * Set all regs to the device default values.
746 * First Disable all interrupts.
747 */
748
749 Data = 0x00;
750 status = set_uart_reg(port, INTERRUPT_ENABLE_REGISTER, Data);
751 if (status < 0) {
752 dbg("disableing interrupts failed");
753 return -1;
754 }
755 /* Set FIFO_CONTROL_REGISTER to the default value */
756 Data = 0x00;
757 status = set_uart_reg(port, FIFO_CONTROL_REGISTER, Data);
758 if (status < 0) {
759 dbg("Writing FIFO_CONTROL_REGISTER failed");
760 return -1;
761 }
762
763 Data = 0xcf; /* chk */
764 status = set_uart_reg(port, FIFO_CONTROL_REGISTER, Data);
765 if (status < 0) {
766 dbg("Writing FIFO_CONTROL_REGISTER failed");
767 return -1;
768 }
769
770 Data = 0x03; /* LCR_BITS_8 */
771 status = set_uart_reg(port, LINE_CONTROL_REGISTER, Data);
772 ATEN2011_port->shadowLCR = Data;
773
774 Data = 0x0b; /* MCR_DTR|MCR_RTS|MCR_MASTER_IE */
775 status = set_uart_reg(port, MODEM_CONTROL_REGISTER, Data);
776 ATEN2011_port->shadowMCR = Data;
777
778#ifdef Check
779 Data = 0x00;
780 status = get_uart_reg(port, LINE_CONTROL_REGISTER, &Data);
781 ATEN2011_port->shadowLCR = Data;
782
783 Data |= SERIAL_LCR_DLAB; /* data latch enable in LCR 0x80 */
784 status = set_uart_reg(port, LINE_CONTROL_REGISTER, Data);
785
786 Data = 0x0c;
787 status = set_uart_reg(port, DIVISOR_LATCH_LSB, Data);
788
789 Data = 0x0;
790 status = set_uart_reg(port, DIVISOR_LATCH_MSB, Data);
791
792 Data = 0x00;
793 status = get_uart_reg(port, LINE_CONTROL_REGISTER, &Data);
794
795/* Data = ATEN2011_port->shadowLCR; */ /* data latch disable */
796 Data = Data & ~SERIAL_LCR_DLAB;
797 status = set_uart_reg(port, LINE_CONTROL_REGISTER, Data);
798 ATEN2011_port->shadowLCR = Data;
799#endif
800 /* clearing Bulkin and Bulkout Fifo */
801 Data = 0x0;
802 status = get_reg_sync(port, ATEN2011_port->SpRegOffset, &Data);
803
804 Data = Data | 0x0c;
805 status = set_reg_sync(port, ATEN2011_port->SpRegOffset, Data);
806
807 Data = Data & ~0x0c;
808 status = set_reg_sync(port, ATEN2011_port->SpRegOffset, Data);
809 /* Finally enable all interrupts */
810 Data = 0x0;
811 Data = 0x0c;
812 status = set_uart_reg(port, INTERRUPT_ENABLE_REGISTER, Data);
813
814 /* clearing rx_disable */
815 Data = 0x0;
816 status = get_reg_sync(port, ATEN2011_port->ControlRegOffset, &Data);
817 Data = Data & ~0x20;
818 status = set_reg_sync(port, ATEN2011_port->ControlRegOffset, Data);
819
820 /* rx_negate */
821 Data = 0x0;
822 status = get_reg_sync(port, ATEN2011_port->ControlRegOffset, &Data);
823 Data = Data | 0x10;
824 status = 0;
825 status = set_reg_sync(port, ATEN2011_port->ControlRegOffset, Data);
826
827 /*
828 * Check to see if we've set up our endpoint info yet
829 * (can't set it up in ATEN2011_startup as the structures
830 * were not set up at that time.)
831 */
832 if (ATEN2011_serial->NoOfOpenPorts == 1) {
833 /* start the status polling here */
834 ATEN2011_serial->status_polling_started = 1;
835 /* If not yet set, Set here */
836 ATEN2011_serial->interrupt_in_buffer =
837 serial->port[0]->interrupt_in_buffer;
838 ATEN2011_serial->interrupt_in_endpoint =
839 serial->port[0]->interrupt_in_endpointAddress;
840 ATEN2011_serial->interrupt_read_urb =
841 serial->port[0]->interrupt_in_urb;
842
843 /* set up interrupt urb */
844 usb_fill_int_urb(ATEN2011_serial->interrupt_read_urb,
845 serial->dev,
846 usb_rcvintpipe(serial->dev,
847 ATEN2011_serial->
848 interrupt_in_endpoint),
849 ATEN2011_serial->interrupt_in_buffer,
850 ATEN2011_serial->interrupt_read_urb->
851 transfer_buffer_length,
852 ATEN2011_interrupt_callback, ATEN2011_serial,
853 ATEN2011_serial->interrupt_read_urb->interval);
854
855 /* start interrupt read for ATEN2011 *
856 * will continue as long as ATEN2011 is connected */
857
858 response =
859 usb_submit_urb(ATEN2011_serial->interrupt_read_urb,
860 GFP_KERNEL);
861 if (response) {
862 dbg("%s - Error %d submitting interrupt urb",
863 __func__, response);
864 }
865
866 }
867
868 /*
869 * See if we've set up our endpoint info yet
870 * (can't set it up in ATEN2011_startup as the
871 * structures were not set up at that time.)
872 */
873
874 dbg("port number is %d", port->number);
875 dbg("serial number is %d", port->serial->minor);
876 dbg("Bulkin endpoint is %d", port->bulk_in_endpointAddress);
877 dbg("BulkOut endpoint is %d", port->bulk_out_endpointAddress);
878 dbg("Interrupt endpoint is %d",
879 port->interrupt_in_endpointAddress);
880 dbg("port's number in the device is %d", ATEN2011_port->port_num);
881 ATEN2011_port->bulk_in_buffer = port->bulk_in_buffer;
882 ATEN2011_port->bulk_in_endpoint = port->bulk_in_endpointAddress;
883 ATEN2011_port->read_urb = port->read_urb;
884 ATEN2011_port->bulk_out_endpoint = port->bulk_out_endpointAddress;
885
886 minor = port->serial->minor;
887 if (minor == SERIAL_TTY_NO_MINOR)
888 minor = 0;
889
890 /* set up our bulk in urb */
891 if ((ATEN2011_serial->ATEN2011_spectrum_2or4ports == 2)
892 && (((__u16) port->number - (__u16) (minor)) != 0)) {
893 usb_fill_bulk_urb(ATEN2011_port->read_urb, serial->dev,
894 usb_rcvbulkpipe(serial->dev,
895 (port->
896 bulk_in_endpointAddress +
897 2)), port->bulk_in_buffer,
898 ATEN2011_port->read_urb->
899 transfer_buffer_length,
900 ATEN2011_bulk_in_callback, ATEN2011_port);
901 } else
902 usb_fill_bulk_urb(ATEN2011_port->read_urb,
903 serial->dev,
904 usb_rcvbulkpipe(serial->dev,
905 port->
906 bulk_in_endpointAddress),
907 port->bulk_in_buffer,
908 ATEN2011_port->read_urb->
909 transfer_buffer_length,
910 ATEN2011_bulk_in_callback, ATEN2011_port);
911
912 dbg("ATEN2011_open: bulkin endpoint is %d",
913 port->bulk_in_endpointAddress);
914 response = usb_submit_urb(ATEN2011_port->read_urb, GFP_KERNEL);
915 if (response) {
916 err("%s - Error %d submitting control urb", __func__,
917 response);
918 }
919
920 /* initialize our wait queues */
921 init_waitqueue_head(&ATEN2011_port->wait_chase);
922 init_waitqueue_head(&ATEN2011_port->wait_command);
923
924 /* initialize our icount structure */
925 memset(&(ATEN2011_port->icount), 0x00, sizeof(ATEN2011_port->icount));
926
927 /* initialize our port settings */
928 ATEN2011_port->shadowMCR = MCR_MASTER_IE; /* Must set to enable ints! */
929 ATEN2011_port->chaseResponsePending = 0;
930 /* send a open port command */
931 ATEN2011_port->open = 1;
932 /* ATEN2011_change_port_settings(ATEN2011_port,old_termios); */
933 /* Setup termios */
934 ATEN2011_set_termios(tty, port, &tmp_termios);
935 ATEN2011_port->icount.tx = 0;
936 ATEN2011_port->icount.rx = 0;
937
938 dbg("usb_serial serial:%x ATEN2011_port:%x\nATEN2011_serial:%x usb_serial_port port:%x",
939 (unsigned int)serial, (unsigned int)ATEN2011_port,
940 (unsigned int)ATEN2011_serial, (unsigned int)port);
941
942 return 0;
943
944}
945
946static int ATEN2011_chars_in_buffer(struct tty_struct *tty)
947{
948 struct usb_serial_port *port = tty->driver_data;
949 int i;
950 int chars = 0;
951 struct ATENINTL_port *ATEN2011_port;
952
953 /* dbg("%s"," ATEN2011_chars_in_buffer:entering ..........."); */
954
955 ATEN2011_port = usb_get_serial_port_data(port);
956 if (ATEN2011_port == NULL) {
957 dbg("%s", "ATEN2011_break:leaving ...........");
958 return -1;
959 }
960
961 for (i = 0; i < NUM_URBS; ++i)
962 if (ATEN2011_port->write_urb_pool[i]->status == -EINPROGRESS)
963 chars += URB_TRANSFER_BUFFER_SIZE;
964
965 dbg("%s - returns %d", __func__, chars);
966 return chars;
967
968}
969
970static void ATEN2011_block_until_tx_empty(struct tty_struct *tty,
971 struct ATENINTL_port *ATEN2011_port)
972{
973 int timeout = HZ / 10;
974 int wait = 30;
975 int count;
976
977 while (1) {
978 count = ATEN2011_chars_in_buffer(tty);
979
980 /* Check for Buffer status */
981 if (count <= 0)
982 return;
983
984 /* Block the thread for a while */
985 interruptible_sleep_on_timeout(&ATEN2011_port->wait_chase,
986 timeout);
987
988 /* No activity.. count down section */
989 wait--;
990 if (wait == 0) {
991 dbg("%s - TIMEOUT", __func__);
992 return;
993 } else {
994 /* Reset timout value back to seconds */
995 wait = 30;
996 }
997 }
998}
999
1000static void ATEN2011_close(struct tty_struct *tty, struct usb_serial_port *port,
1001 struct file *filp)
1002{
1003 struct usb_serial *serial;
1004 struct ATENINTL_serial *ATEN2011_serial;
1005 struct ATENINTL_port *ATEN2011_port;
1006 int no_urbs;
1007 __u16 Data;
1008
1009 dbg("%s", "ATEN2011_close:entering...");
1010 serial = port->serial;
1011
1012 /* take the Adpater and port's private data */
1013 ATEN2011_serial = usb_get_serial_data(serial);
1014 ATEN2011_port = usb_get_serial_port_data(port);
1015 if ((ATEN2011_serial == NULL) || (ATEN2011_port == NULL))
1016 return;
1017
1018 if (serial->dev) {
1019 /* flush and block(wait) until tx is empty */
1020 ATEN2011_block_until_tx_empty(tty, ATEN2011_port);
1021 }
1022 /* kill the ports URB's */
1023 for (no_urbs = 0; no_urbs < NUM_URBS; no_urbs++)
1024 usb_kill_urb(ATEN2011_port->write_urb_pool[no_urbs]);
1025 /* Freeing Write URBs */
1026 for (no_urbs = 0; no_urbs < NUM_URBS; ++no_urbs) {
1027 kfree(ATEN2011_port->write_urb_pool[no_urbs]->transfer_buffer);
1028 usb_free_urb(ATEN2011_port->write_urb_pool[no_urbs]);
1029 }
1030 /* While closing port, shutdown all bulk read, write *
1031 * and interrupt read if they exists */
1032 if (serial->dev) {
1033 if (ATEN2011_port->write_urb) {
1034 dbg("%s", "Shutdown bulk write");
1035 usb_kill_urb(ATEN2011_port->write_urb);
1036 }
1037 if (ATEN2011_port->read_urb) {
1038 dbg("%s", "Shutdown bulk read");
1039 usb_kill_urb(ATEN2011_port->read_urb);
1040 }
1041 if ((&ATEN2011_port->control_urb)) {
1042 dbg("%s", "Shutdown control read");
1043 /* usb_kill_urb (ATEN2011_port->control_urb); */
1044
1045 }
1046 }
1047 /* if(ATEN2011_port->ctrl_buf != NULL) */
1048 /* kfree(ATEN2011_port->ctrl_buf); */
1049 /* decrement the no.of open ports counter of an individual USB-serial adapter. */
1050 ATEN2011_serial->NoOfOpenPorts--;
1051 dbg("NoOfOpenPorts in close%d:in port%d",
1052 ATEN2011_serial->NoOfOpenPorts, port->number);
1053 if (ATEN2011_serial->NoOfOpenPorts == 0) {
1054 /* stop the stus polling here */
1055 ATEN2011_serial->status_polling_started = 0;
1056 if (ATEN2011_serial->interrupt_read_urb) {
1057 dbg("%s", "Shutdown interrupt_read_urb");
1058 /* ATEN2011_serial->interrupt_in_buffer=NULL; */
1059 /* usb_kill_urb (ATEN2011_serial->interrupt_read_urb); */
1060 }
1061 }
1062 if (ATEN2011_port->write_urb) {
1063 /* if this urb had a transfer buffer already (old tx) free it */
1064 kfree(ATEN2011_port->write_urb->transfer_buffer);
1065 usb_free_urb(ATEN2011_port->write_urb);
1066 }
1067
1068 /* clear the MCR & IER */
1069 Data = 0x00;
1070 set_uart_reg(port, MODEM_CONTROL_REGISTER, Data);
1071 Data = 0x00;
1072 set_uart_reg(port, INTERRUPT_ENABLE_REGISTER, Data);
1073
1074 ATEN2011_port->open = 0;
1075 dbg("%s", "Leaving ............");
1076
1077}
1078
1079static void ATEN2011_block_until_chase_response(struct tty_struct *tty,
1080 struct ATENINTL_port
1081 *ATEN2011_port)
1082{
1083 int timeout = 1 * HZ;
1084 int wait = 10;
1085 int count;
1086
1087 while (1) {
1088 count = ATEN2011_chars_in_buffer(tty);
1089
1090 /* Check for Buffer status */
1091 if (count <= 0) {
1092 ATEN2011_port->chaseResponsePending = 0;
1093 return;
1094 }
1095
1096 /* Block the thread for a while */
1097 interruptible_sleep_on_timeout(&ATEN2011_port->wait_chase,
1098 timeout);
1099 /* No activity.. count down section */
1100 wait--;
1101 if (wait == 0) {
1102 dbg("%s - TIMEOUT", __func__);
1103 return;
1104 } else {
1105 /* Reset timout value back to seconds */
1106 wait = 10;
1107 }
1108 }
1109
1110}
1111
1112static void ATEN2011_break(struct tty_struct *tty, int break_state)
1113{
1114 struct usb_serial_port *port = tty->driver_data;
1115 unsigned char data;
1116 struct usb_serial *serial;
1117 struct ATENINTL_serial *ATEN2011_serial;
1118 struct ATENINTL_port *ATEN2011_port;
1119
1120 dbg("%s", "Entering ...........");
1121 dbg("ATEN2011_break: Start");
1122
1123 serial = port->serial;
1124
1125 ATEN2011_serial = usb_get_serial_data(serial);
1126 ATEN2011_port = usb_get_serial_port_data(port);
1127
1128 if ((ATEN2011_serial == NULL) || (ATEN2011_port == NULL))
1129 return;
1130
1131 /* flush and chase */
1132 ATEN2011_port->chaseResponsePending = 1;
1133
1134 if (serial->dev) {
1135 /* flush and block until tx is empty */
1136 ATEN2011_block_until_chase_response(tty, ATEN2011_port);
1137 }
1138
1139 if (break_state == -1)
1140 data = ATEN2011_port->shadowLCR | LCR_SET_BREAK;
1141 else
1142 data = ATEN2011_port->shadowLCR & ~LCR_SET_BREAK;
1143
1144 ATEN2011_port->shadowLCR = data;
1145 dbg("ATEN2011_break ATEN2011_port->shadowLCR is %x",
1146 ATEN2011_port->shadowLCR);
1147 set_uart_reg(port, LINE_CONTROL_REGISTER, ATEN2011_port->shadowLCR);
1148
1149 return;
1150}
1151
1152static int ATEN2011_write_room(struct tty_struct *tty)
1153{
1154 struct usb_serial_port *port = tty->driver_data;
1155 int i;
1156 int room = 0;
1157 struct ATENINTL_port *ATEN2011_port;
1158
1159 ATEN2011_port = usb_get_serial_port_data(port);
1160 if (ATEN2011_port == NULL) {
1161 dbg("%s", "ATEN2011_break:leaving ...........");
1162 return -1;
1163 }
1164
1165 for (i = 0; i < NUM_URBS; ++i)
1166 if (ATEN2011_port->write_urb_pool[i]->status != -EINPROGRESS)
1167 room += URB_TRANSFER_BUFFER_SIZE;
1168
1169 dbg("%s - returns %d", __func__, room);
1170 return room;
1171
1172}
1173
1174static int ATEN2011_write(struct tty_struct *tty, struct usb_serial_port *port,
1175 const unsigned char *data, int count)
1176{
1177 int status;
1178 int i;
1179 int bytes_sent = 0;
1180 int transfer_size;
1181 int minor;
1182
1183 struct ATENINTL_port *ATEN2011_port;
1184 struct usb_serial *serial;
1185 struct ATENINTL_serial *ATEN2011_serial;
1186 struct urb *urb;
1187 const unsigned char *current_position = data;
1188 unsigned char *data1;
1189 dbg("%s", "entering ...........");
1190
1191 serial = port->serial;
1192
1193 ATEN2011_port = usb_get_serial_port_data(port);
1194 if (ATEN2011_port == NULL) {
1195 dbg("%s", "ATEN2011_port is NULL");
1196 return -1;
1197 }
1198
1199 ATEN2011_serial = usb_get_serial_data(serial);
1200 if (ATEN2011_serial == NULL) {
1201 dbg("%s", "ATEN2011_serial is NULL");
1202 return -1;
1203 }
1204
1205 /* try to find a free urb in the list */
1206 urb = NULL;
1207
1208 for (i = 0; i < NUM_URBS; ++i) {
1209 if (ATEN2011_port->write_urb_pool[i]->status != -EINPROGRESS) {
1210 urb = ATEN2011_port->write_urb_pool[i];
1211 dbg("URB:%d", i);
1212 break;
1213 }
1214 }
1215
1216 if (urb == NULL) {
1217 dbg("%s - no more free urbs", __func__);
1218 goto exit;
1219 }
1220
1221 if (urb->transfer_buffer == NULL) {
1222 urb->transfer_buffer =
1223 kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
1224
1225 if (urb->transfer_buffer == NULL) {
1226 err("%s no more kernel memory...", __func__);
1227 goto exit;
1228 }
1229 }
1230 transfer_size = min(count, URB_TRANSFER_BUFFER_SIZE);
1231
1232 memcpy(urb->transfer_buffer, current_position, transfer_size);
1233 /* usb_serial_debug_data (__FILE__, __func__, transfer_size, urb->transfer_buffer); */
1234
1235 /* fill urb with data and submit */
1236 minor = port->serial->minor;
1237 if (minor == SERIAL_TTY_NO_MINOR)
1238 minor = 0;
1239 if ((ATEN2011_serial->ATEN2011_spectrum_2or4ports == 2)
1240 && (((__u16) port->number - (__u16) (minor)) != 0)) {
1241 usb_fill_bulk_urb(urb, ATEN2011_serial->serial->dev,
1242 usb_sndbulkpipe(ATEN2011_serial->serial->dev,
1243 (port->
1244 bulk_out_endpointAddress) +
1245 2), urb->transfer_buffer,
1246 transfer_size,
1247 ATEN2011_bulk_out_data_callback,
1248 ATEN2011_port);
1249 } else
1250
1251 usb_fill_bulk_urb(urb,
1252 ATEN2011_serial->serial->dev,
1253 usb_sndbulkpipe(ATEN2011_serial->serial->dev,
1254 port->
1255 bulk_out_endpointAddress),
1256 urb->transfer_buffer, transfer_size,
1257 ATEN2011_bulk_out_data_callback,
1258 ATEN2011_port);
1259
1260 data1 = urb->transfer_buffer;
1261 dbg("bulkout endpoint is %d", port->bulk_out_endpointAddress);
1262 /* for(i=0;i < urb->actual_length;i++) */
1263 /* dbg("Data is %c ",data1[i]); */
1264
1265 /* send it down the pipe */
1266 status = usb_submit_urb(urb, GFP_ATOMIC);
1267
1268 if (status) {
1269 err("%s - usb_submit_urb(write bulk) failed with status = %d",
1270 __func__, status);
1271 bytes_sent = status;
1272 goto exit;
1273 }
1274 bytes_sent = transfer_size;
1275 ATEN2011_port->icount.tx += transfer_size;
1276 dbg("ATEN2011_port->icount.tx is %d:", ATEN2011_port->icount.tx);
1277
1278exit:
1279 return bytes_sent;
1280}
1281
1282static void ATEN2011_throttle(struct tty_struct *tty)
1283{
1284 struct usb_serial_port *port = tty->driver_data;
1285 struct ATENINTL_port *ATEN2011_port;
1286 int status;
1287
1288 dbg("- port %d", port->number);
1289
1290 ATEN2011_port = usb_get_serial_port_data(port);
1291
1292 if (ATEN2011_port == NULL)
1293 return;
1294
1295 if (!ATEN2011_port->open) {
1296 dbg("%s", "port not opened");
1297 return;
1298 }
1299
1300 dbg("%s", "Entering .......... ");
1301
1302 if (!tty) {
1303 dbg("%s - no tty available", __func__);
1304 return;
1305 }
1306
1307 /* if we are implementing XON/XOFF, send the stop character */
1308 if (I_IXOFF(tty)) {
1309 unsigned char stop_char = STOP_CHAR(tty);
1310 status = ATEN2011_write(tty, port, &stop_char, 1);
1311 if (status <= 0)
1312 return;
1313 }
1314
1315 /* if we are implementing RTS/CTS, toggle that line */
1316 if (tty->termios->c_cflag & CRTSCTS) {
1317 ATEN2011_port->shadowMCR &= ~MCR_RTS;
1318 status = set_uart_reg(port, MODEM_CONTROL_REGISTER,
1319 ATEN2011_port->shadowMCR);
1320 if (status < 0)
1321 return;
1322 }
1323
1324 return;
1325}
1326
1327static void ATEN2011_unthrottle(struct tty_struct *tty)
1328{
1329 struct usb_serial_port *port = tty->driver_data;
1330 int status;
1331 struct ATENINTL_port *ATEN2011_port = usb_get_serial_port_data(port);
1332
1333 if (ATEN2011_port == NULL)
1334 return;
1335
1336 if (!ATEN2011_port->open) {
1337 dbg("%s - port not opened", __func__);
1338 return;
1339 }
1340
1341 dbg("%s", "Entering .......... ");
1342
1343 if (!tty) {
1344 dbg("%s - no tty available", __func__);
1345 return;
1346 }
1347
1348 /* if we are implementing XON/XOFF, send the start character */
1349 if (I_IXOFF(tty)) {
1350 unsigned char start_char = START_CHAR(tty);
1351 status = ATEN2011_write(tty, port, &start_char, 1);
1352 if (status <= 0)
1353 return;
1354 }
1355
1356 /* if we are implementing RTS/CTS, toggle that line */
1357 if (tty->termios->c_cflag & CRTSCTS) {
1358 ATEN2011_port->shadowMCR |= MCR_RTS;
1359 status = set_uart_reg(port, MODEM_CONTROL_REGISTER,
1360 ATEN2011_port->shadowMCR);
1361 if (status < 0)
1362 return;
1363 }
1364
1365 return;
1366}
1367
1368static int ATEN2011_tiocmget(struct tty_struct *tty, struct file *file)
1369{
1370 struct usb_serial_port *port = tty->driver_data;
1371 struct ATENINTL_port *ATEN2011_port;
1372 unsigned int result;
1373 __u16 msr;
1374 __u16 mcr;
1375 /* unsigned int mcr; */
1376 int status = 0;
1377 ATEN2011_port = usb_get_serial_port_data(port);
1378
1379 dbg("%s - port %d", __func__, port->number);
1380
1381 if (ATEN2011_port == NULL)
1382 return -ENODEV;
1383
1384 status = get_uart_reg(port, MODEM_STATUS_REGISTER, &msr);
1385 status = get_uart_reg(port, MODEM_CONTROL_REGISTER, &mcr);
1386 /* mcr = ATEN2011_port->shadowMCR; */
1387 /* COMMENT2: the Fallowing three line are commented for updating only MSR values */
1388 result = ((mcr & MCR_DTR) ? TIOCM_DTR : 0)
1389 | ((mcr & MCR_RTS) ? TIOCM_RTS : 0)
1390 | ((mcr & MCR_LOOPBACK) ? TIOCM_LOOP : 0)
1391 | ((msr & ATEN2011_MSR_CTS) ? TIOCM_CTS : 0)
1392 | ((msr & ATEN2011_MSR_CD) ? TIOCM_CAR : 0)
1393 | ((msr & ATEN2011_MSR_RI) ? TIOCM_RI : 0)
1394 | ((msr & ATEN2011_MSR_DSR) ? TIOCM_DSR : 0);
1395
1396 dbg("%s - 0x%04X", __func__, result);
1397
1398 return result;
1399}
1400
1401static int ATEN2011_tiocmset(struct tty_struct *tty, struct file *file,
1402 unsigned int set, unsigned int clear)
1403{
1404 struct usb_serial_port *port = tty->driver_data;
1405 struct ATENINTL_port *ATEN2011_port;
1406 unsigned int mcr;
1407 unsigned int status;
1408
1409 dbg("%s - port %d", __func__, port->number);
1410
1411 ATEN2011_port = usb_get_serial_port_data(port);
1412
1413 if (ATEN2011_port == NULL)
1414 return -ENODEV;
1415
1416 mcr = ATEN2011_port->shadowMCR;
1417 if (clear & TIOCM_RTS)
1418 mcr &= ~MCR_RTS;
1419 if (clear & TIOCM_DTR)
1420 mcr &= ~MCR_DTR;
1421 if (clear & TIOCM_LOOP)
1422 mcr &= ~MCR_LOOPBACK;
1423
1424 if (set & TIOCM_RTS)
1425 mcr |= MCR_RTS;
1426 if (set & TIOCM_DTR)
1427 mcr |= MCR_DTR;
1428 if (set & TIOCM_LOOP)
1429 mcr |= MCR_LOOPBACK;
1430
1431 ATEN2011_port->shadowMCR = mcr;
1432
1433 status = set_uart_reg(port, MODEM_CONTROL_REGISTER, mcr);
1434 if (status < 0) {
1435 dbg("setting MODEM_CONTROL_REGISTER Failed");
1436 return -1;
1437 }
1438
1439 return 0;
1440}
1441
1442static void ATEN2011_set_termios(struct tty_struct *tty,
1443 struct usb_serial_port *port,
1444 struct ktermios *old_termios)
1445{
1446 int status;
1447 unsigned int cflag;
1448 struct usb_serial *serial;
1449 struct ATENINTL_port *ATEN2011_port;
1450
1451 dbg("ATEN2011_set_termios: START");
1452
1453 serial = port->serial;
1454
1455 ATEN2011_port = usb_get_serial_port_data(port);
1456
1457 if (ATEN2011_port == NULL)
1458 return;
1459
1460 if (!ATEN2011_port->open) {
1461 dbg("%s - port not opened", __func__);
1462 return;
1463 }
1464
1465 dbg("%s", "setting termios - ");
1466
1467 cflag = tty->termios->c_cflag;
1468
1469 dbg("%s - cflag %08x iflag %08x", __func__,
1470 tty->termios->c_cflag, RELEVANT_IFLAG(tty->termios->c_iflag));
1471
1472 if (old_termios) {
1473 dbg("%s - old clfag %08x old iflag %08x", __func__,
1474 old_termios->c_cflag, RELEVANT_IFLAG(old_termios->c_iflag));
1475 }
1476
1477 dbg("%s - port %d", __func__, port->number);
1478
1479 /* change the port settings to the new ones specified */
1480
1481 ATEN2011_change_port_settings(tty, ATEN2011_port, old_termios);
1482
1483 if (!ATEN2011_port->read_urb) {
1484 dbg("%s", "URB KILLED !!!!!");
1485 return;
1486 }
1487
1488 if (ATEN2011_port->read_urb->status != -EINPROGRESS) {
1489 ATEN2011_port->read_urb->dev = serial->dev;
1490 status = usb_submit_urb(ATEN2011_port->read_urb, GFP_ATOMIC);
1491 if (status) {
1492 dbg
1493 (" usb_submit_urb(read bulk) failed, status = %d",
1494 status);
1495 }
1496 }
1497 return;
1498}
1499
1500static int get_lsr_info(struct tty_struct *tty,
1501 struct ATENINTL_port *ATEN2011_port,
1502 unsigned int __user *value)
1503{
1504 int count;
1505 unsigned int result = 0;
1506
1507 count = ATEN2011_chars_in_buffer(tty);
1508 if (count == 0) {
1509 dbg("%s -- Empty", __func__);
1510 result = TIOCSER_TEMT;
1511 }
1512
1513 if (copy_to_user(value, &result, sizeof(int)))
1514 return -EFAULT;
1515 return 0;
1516}
1517
1518static int get_number_bytes_avail(struct tty_struct *tty,
1519 struct ATENINTL_port *ATEN2011_port,
1520 unsigned int __user *value)
1521{
1522 unsigned int result = 0;
1523
1524 if (!tty)
1525 return -ENOIOCTLCMD;
1526
1527 result = tty->read_cnt;
1528
1529 dbg("%s(%d) = %d", __func__, ATEN2011_port->port->number, result);
1530 if (copy_to_user(value, &result, sizeof(int)))
1531 return -EFAULT;
1532
1533 return -ENOIOCTLCMD;
1534}
1535
1536static int set_modem_info(struct ATENINTL_port *ATEN2011_port, unsigned int cmd,
1537 unsigned int __user *value)
1538{
1539 unsigned int mcr;
1540 unsigned int arg;
1541 __u16 Data;
1542 int status;
1543 struct usb_serial_port *port;
1544
1545 if (ATEN2011_port == NULL)
1546 return -1;
1547
1548 port = (struct usb_serial_port *)ATEN2011_port->port;
1549
1550 mcr = ATEN2011_port->shadowMCR;
1551
1552 if (copy_from_user(&arg, value, sizeof(int)))
1553 return -EFAULT;
1554
1555 switch (cmd) {
1556 case TIOCMBIS:
1557 if (arg & TIOCM_RTS)
1558 mcr |= MCR_RTS;
1559 if (arg & TIOCM_DTR)
1560 mcr |= MCR_RTS;
1561 if (arg & TIOCM_LOOP)
1562 mcr |= MCR_LOOPBACK;
1563 break;
1564
1565 case TIOCMBIC:
1566 if (arg & TIOCM_RTS)
1567 mcr &= ~MCR_RTS;
1568 if (arg & TIOCM_DTR)
1569 mcr &= ~MCR_RTS;
1570 if (arg & TIOCM_LOOP)
1571 mcr &= ~MCR_LOOPBACK;
1572 break;
1573
1574 case TIOCMSET:
1575 /* turn off the RTS and DTR and LOOPBACK
1576 * and then only turn on what was asked to */
1577 mcr &= ~(MCR_RTS | MCR_DTR | MCR_LOOPBACK);
1578 mcr |= ((arg & TIOCM_RTS) ? MCR_RTS : 0);
1579 mcr |= ((arg & TIOCM_DTR) ? MCR_DTR : 0);
1580 mcr |= ((arg & TIOCM_LOOP) ? MCR_LOOPBACK : 0);
1581 break;
1582 }
1583
1584 ATEN2011_port->shadowMCR = mcr;
1585
1586 Data = ATEN2011_port->shadowMCR;
1587 status = set_uart_reg(port, MODEM_CONTROL_REGISTER, Data);
1588 if (status < 0) {
1589 dbg("setting MODEM_CONTROL_REGISTER Failed");
1590 return -1;
1591 }
1592
1593 return 0;
1594}
1595
1596static int get_modem_info(struct ATENINTL_port *ATEN2011_port,
1597 unsigned int __user *value)
1598{
1599 unsigned int result = 0;
1600 __u16 msr;
1601 unsigned int mcr = ATEN2011_port->shadowMCR;
1602 int status;
1603
1604 status = get_uart_reg(ATEN2011_port->port, MODEM_STATUS_REGISTER, &msr);
1605 result = ((mcr & MCR_DTR) ? TIOCM_DTR : 0) /* 0x002 */
1606 |((mcr & MCR_RTS) ? TIOCM_RTS : 0) /* 0x004 */
1607 |((msr & ATEN2011_MSR_CTS) ? TIOCM_CTS : 0) /* 0x020 */
1608 |((msr & ATEN2011_MSR_CD) ? TIOCM_CAR : 0) /* 0x040 */
1609 |((msr & ATEN2011_MSR_RI) ? TIOCM_RI : 0) /* 0x080 */
1610 |((msr & ATEN2011_MSR_DSR) ? TIOCM_DSR : 0); /* 0x100 */
1611
1612 dbg("%s -- %x", __func__, result);
1613
1614 if (copy_to_user(value, &result, sizeof(int)))
1615 return -EFAULT;
1616 return 0;
1617}
1618
1619static int get_serial_info(struct ATENINTL_port *ATEN2011_port,
1620 struct serial_struct __user *retinfo)
1621{
1622 struct serial_struct tmp;
1623
1624 if (ATEN2011_port == NULL)
1625 return -1;
1626
1627 if (!retinfo)
1628 return -EFAULT;
1629
1630 memset(&tmp, 0, sizeof(tmp));
1631
1632 tmp.type = PORT_16550A;
1633 tmp.line = ATEN2011_port->port->serial->minor;
1634 if (tmp.line == SERIAL_TTY_NO_MINOR)
1635 tmp.line = 0;
1636 tmp.port = ATEN2011_port->port->number;
1637 tmp.irq = 0;
1638 tmp.flags = ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ;
1639 tmp.xmit_fifo_size = NUM_URBS * URB_TRANSFER_BUFFER_SIZE;
1640 tmp.baud_base = 9600;
1641 tmp.close_delay = 5 * HZ;
1642 tmp.closing_wait = 30 * HZ;
1643
1644 if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
1645 return -EFAULT;
1646 return 0;
1647}
1648
1649static int ATEN2011_ioctl(struct tty_struct *tty, struct file *file,
1650 unsigned int cmd, unsigned long arg)
1651{
1652 struct usb_serial_port *port = tty->driver_data;
1653 struct ATENINTL_port *ATEN2011_port;
1654 struct async_icount cnow;
1655 struct async_icount cprev;
1656 struct serial_icounter_struct icount;
1657 int ATENret = 0;
1658 unsigned int __user *user_arg = (unsigned int __user *)arg;
1659
1660 ATEN2011_port = usb_get_serial_port_data(port);
1661
1662 if (ATEN2011_port == NULL)
1663 return -1;
1664
1665 dbg("%s - port %d, cmd = 0x%x", __func__, port->number, cmd);
1666
1667 switch (cmd) {
1668 /* return number of bytes available */
1669
1670 case TIOCINQ:
1671 dbg("%s (%d) TIOCINQ", __func__, port->number);
1672 return get_number_bytes_avail(tty, ATEN2011_port, user_arg);
1673 break;
1674
1675 case TIOCOUTQ:
1676 dbg("%s (%d) TIOCOUTQ", __func__, port->number);
1677 return put_user(ATEN2011_chars_in_buffer(tty), user_arg);
1678 break;
1679
1680 case TIOCSERGETLSR:
1681 dbg("%s (%d) TIOCSERGETLSR", __func__, port->number);
1682 return get_lsr_info(tty, ATEN2011_port, user_arg);
1683 return 0;
1684
1685 case TIOCMBIS:
1686 case TIOCMBIC:
1687 case TIOCMSET:
1688 dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __func__,
1689 port->number);
1690 ATENret = set_modem_info(ATEN2011_port, cmd, user_arg);
1691 return ATENret;
1692
1693 case TIOCMGET:
1694 dbg("%s (%d) TIOCMGET", __func__, port->number);
1695 return get_modem_info(ATEN2011_port, user_arg);
1696
1697 case TIOCGSERIAL:
1698 dbg("%s (%d) TIOCGSERIAL", __func__, port->number);
1699 return get_serial_info(ATEN2011_port,
1700 (struct serial_struct __user *)arg);
1701
1702 case TIOCSSERIAL:
1703 dbg("%s (%d) TIOCSSERIAL", __func__, port->number);
1704 break;
1705
1706 case TIOCMIWAIT:
1707 dbg("%s (%d) TIOCMIWAIT", __func__, port->number);
1708 cprev = ATEN2011_port->icount;
1709 while (1) {
1710 /* see if a signal did it */
1711 if (signal_pending(current))
1712 return -ERESTARTSYS;
1713 cnow = ATEN2011_port->icount;
1714 if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr &&
1715 cnow.dcd == cprev.dcd && cnow.cts == cprev.cts)
1716 return -EIO; /* no change => error */
1717 if (((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
1718 ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
1719 ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) ||
1720 ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts))) {
1721 return 0;
1722 }
1723 cprev = cnow;
1724 }
1725 /* NOTREACHED */
1726 break;
1727
1728 case TIOCGICOUNT:
1729 cnow = ATEN2011_port->icount;
1730 icount.cts = cnow.cts;
1731 icount.dsr = cnow.dsr;
1732 icount.rng = cnow.rng;
1733 icount.dcd = cnow.dcd;
1734 icount.rx = cnow.rx;
1735 icount.tx = cnow.tx;
1736 icount.frame = cnow.frame;
1737 icount.overrun = cnow.overrun;
1738 icount.parity = cnow.parity;
1739 icount.brk = cnow.brk;
1740 icount.buf_overrun = cnow.buf_overrun;
1741
1742 dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __func__,
1743 port->number, icount.rx, icount.tx);
1744 if (copy_to_user((void __user *)arg, &icount, sizeof(icount)))
1745 return -EFAULT;
1746 return 0;
1747
1748 default:
1749 break;
1750 }
1751
1752 return -ENOIOCTLCMD;
1753}
1754
1755static int ATEN2011_calc_baud_rate_divisor(int baudRate, int *divisor,
1756 __u16 *clk_sel_val)
1757{
1758 dbg("%s - %d", __func__, baudRate);
1759
1760 if (baudRate <= 115200) {
1761 *divisor = 115200 / baudRate;
1762 *clk_sel_val = 0x0;
1763 }
1764 if ((baudRate > 115200) && (baudRate <= 230400)) {
1765 *divisor = 230400 / baudRate;
1766 *clk_sel_val = 0x10;
1767 } else if ((baudRate > 230400) && (baudRate <= 403200)) {
1768 *divisor = 403200 / baudRate;
1769 *clk_sel_val = 0x20;
1770 } else if ((baudRate > 403200) && (baudRate <= 460800)) {
1771 *divisor = 460800 / baudRate;
1772 *clk_sel_val = 0x30;
1773 } else if ((baudRate > 460800) && (baudRate <= 806400)) {
1774 *divisor = 806400 / baudRate;
1775 *clk_sel_val = 0x40;
1776 } else if ((baudRate > 806400) && (baudRate <= 921600)) {
1777 *divisor = 921600 / baudRate;
1778 *clk_sel_val = 0x50;
1779 } else if ((baudRate > 921600) && (baudRate <= 1572864)) {
1780 *divisor = 1572864 / baudRate;
1781 *clk_sel_val = 0x60;
1782 } else if ((baudRate > 1572864) && (baudRate <= 3145728)) {
1783 *divisor = 3145728 / baudRate;
1784 *clk_sel_val = 0x70;
1785 }
1786 return 0;
1787}
1788
1789static int ATEN2011_send_cmd_write_baud_rate(struct ATENINTL_port
1790 *ATEN2011_port, int baudRate)
1791{
1792 int divisor = 0;
1793 int status;
1794 __u16 Data;
1795 unsigned char number;
1796 __u16 clk_sel_val;
1797 struct usb_serial_port *port;
1798 int minor;
1799
1800 if (ATEN2011_port == NULL)
1801 return -1;
1802
1803 port = (struct usb_serial_port *)ATEN2011_port->port;
1804
1805 dbg("%s", "Entering .......... ");
1806
1807 minor = ATEN2011_port->port->serial->minor;
1808 if (minor == SERIAL_TTY_NO_MINOR)
1809 minor = 0;
1810 number = ATEN2011_port->port->number - minor;
1811
1812 dbg("%s - port = %d, baud = %d", __func__,
1813 ATEN2011_port->port->number, baudRate);
1814 /* reset clk_uart_sel in spregOffset */
1815 if (baudRate > 115200) {
1816#ifdef HW_flow_control
1817 /*
1818 * NOTE: need to see the pther register to modify
1819 * setting h/w flow control bit to 1;
1820 */
1821 /* Data = ATEN2011_port->shadowMCR; */
1822 Data = 0x2b;
1823 ATEN2011_port->shadowMCR = Data;
1824 status = set_uart_reg(port, MODEM_CONTROL_REGISTER, Data);
1825 if (status < 0) {
1826 dbg("Writing spreg failed in set_serial_baud");
1827 return -1;
1828 }
1829#endif
1830
1831 } else {
1832#ifdef HW_flow_control
1833 /* setting h/w flow control bit to 0; */
1834 /* Data = ATEN2011_port->shadowMCR; */
1835 Data = 0xb;
1836 ATEN2011_port->shadowMCR = Data;
1837 status = set_uart_reg(port, MODEM_CONTROL_REGISTER, Data);
1838 if (status < 0) {
1839 dbg("Writing spreg failed in set_serial_baud");
1840 return -1;
1841 }
1842#endif
1843
1844 }
1845
1846 if (1) /* baudRate <= 115200) */ {
1847 clk_sel_val = 0x0;
1848 Data = 0x0;
1849 status =
1850 ATEN2011_calc_baud_rate_divisor(baudRate, &divisor,
1851 &clk_sel_val);
1852 status = get_reg_sync(port, ATEN2011_port->SpRegOffset, &Data);
1853 if (status < 0) {
1854 dbg("reading spreg failed in set_serial_baud");
1855 return -1;
1856 }
1857 Data = (Data & 0x8f) | clk_sel_val;
1858 status = set_reg_sync(port, ATEN2011_port->SpRegOffset, Data);
1859 if (status < 0) {
1860 dbg("Writing spreg failed in set_serial_baud");
1861 return -1;
1862 }
1863 /* Calculate the Divisor */
1864
1865 if (status) {
1866 err("%s - bad baud rate", __func__);
1867 dbg("%s", "bad baud rate");
1868 return status;
1869 }
1870 /* Enable access to divisor latch */
1871 Data = ATEN2011_port->shadowLCR | SERIAL_LCR_DLAB;
1872 ATEN2011_port->shadowLCR = Data;
1873 set_uart_reg(port, LINE_CONTROL_REGISTER, Data);
1874
1875 /* Write the divisor */
1876 Data = (unsigned char)(divisor & 0xff);
1877 dbg("set_serial_baud Value to write DLL is %x", Data);
1878 set_uart_reg(port, DIVISOR_LATCH_LSB, Data);
1879
1880 Data = (unsigned char)((divisor & 0xff00) >> 8);
1881 dbg("set_serial_baud Value to write DLM is %x", Data);
1882 set_uart_reg(port, DIVISOR_LATCH_MSB, Data);
1883
1884 /* Disable access to divisor latch */
1885 Data = ATEN2011_port->shadowLCR & ~SERIAL_LCR_DLAB;
1886 ATEN2011_port->shadowLCR = Data;
1887 set_uart_reg(port, LINE_CONTROL_REGISTER, Data);
1888
1889 }
1890
1891 return status;
1892}
1893
1894static void ATEN2011_change_port_settings(struct tty_struct *tty,
1895 struct ATENINTL_port *ATEN2011_port,
1896 struct ktermios *old_termios)
1897{
1898 int baud;
1899 unsigned cflag;
1900 unsigned iflag;
1901 __u8 lData;
1902 __u8 lParity;
1903 __u8 lStop;
1904 int status;
1905 __u16 Data;
1906 struct usb_serial_port *port;
1907 struct usb_serial *serial;
1908
1909 if (ATEN2011_port == NULL)
1910 return;
1911
1912 port = (struct usb_serial_port *)ATEN2011_port->port;
1913
1914 serial = port->serial;
1915
1916 dbg("%s - port %d", __func__, ATEN2011_port->port->number);
1917
1918 if (!ATEN2011_port->open) {
1919 dbg("%s - port not opened", __func__);
1920 return;
1921 }
1922
1923 if ((!tty) || (!tty->termios)) {
1924 dbg("%s - no tty structures", __func__);
1925 return;
1926 }
1927
1928 dbg("%s", "Entering .......... ");
1929
1930 lData = LCR_BITS_8;
1931 lStop = LCR_STOP_1;
1932 lParity = LCR_PAR_NONE;
1933
1934 cflag = tty->termios->c_cflag;
1935 iflag = tty->termios->c_iflag;
1936
1937 /* Change the number of bits */
1938
1939 /* COMMENT1: the below Line"if(cflag & CSIZE)" is added for the errors we get for serial loop data test i.e serial_loopback.pl -v */
1940 /* if(cflag & CSIZE) */
1941 {
1942 switch (cflag & CSIZE) {
1943 case CS5:
1944 lData = LCR_BITS_5;
1945 break;
1946
1947 case CS6:
1948 lData = LCR_BITS_6;
1949 break;
1950
1951 case CS7:
1952 lData = LCR_BITS_7;
1953 break;
1954 default:
1955 case CS8:
1956 lData = LCR_BITS_8;
1957 break;
1958 }
1959 }
1960 /* Change the Parity bit */
1961 if (cflag & PARENB) {
1962 if (cflag & PARODD) {
1963 lParity = LCR_PAR_ODD;
1964 dbg("%s - parity = odd", __func__);
1965 } else {
1966 lParity = LCR_PAR_EVEN;
1967 dbg("%s - parity = even", __func__);
1968 }
1969
1970 } else {
1971 dbg("%s - parity = none", __func__);
1972 }
1973
1974 if (cflag & CMSPAR)
1975 lParity = lParity | 0x20;
1976
1977 /* Change the Stop bit */
1978 if (cflag & CSTOPB) {
1979 lStop = LCR_STOP_2;
1980 dbg("%s - stop bits = 2", __func__);
1981 } else {
1982 lStop = LCR_STOP_1;
1983 dbg("%s - stop bits = 1", __func__);
1984 }
1985
1986 /* Update the LCR with the correct value */
1987 ATEN2011_port->shadowLCR &=
1988 ~(LCR_BITS_MASK | LCR_STOP_MASK | LCR_PAR_MASK);
1989 ATEN2011_port->shadowLCR |= (lData | lParity | lStop);
1990
1991 dbg
1992 ("ATEN2011_change_port_settings ATEN2011_port->shadowLCR is %x",
1993 ATEN2011_port->shadowLCR);
1994 /* Disable Interrupts */
1995 Data = 0x00;
1996 set_uart_reg(port, INTERRUPT_ENABLE_REGISTER, Data);
1997
1998 Data = 0x00;
1999 set_uart_reg(port, FIFO_CONTROL_REGISTER, Data);
2000
2001 Data = 0xcf;
2002 set_uart_reg(port, FIFO_CONTROL_REGISTER, Data);
2003
2004 /* Send the updated LCR value to the ATEN2011 */
2005 Data = ATEN2011_port->shadowLCR;
2006
2007 set_uart_reg(port, LINE_CONTROL_REGISTER, Data);
2008
2009 Data = 0x00b;
2010 ATEN2011_port->shadowMCR = Data;
2011 set_uart_reg(port, MODEM_CONTROL_REGISTER, Data);
2012 Data = 0x00b;
2013 set_uart_reg(port, MODEM_CONTROL_REGISTER, Data);
2014
2015 /* set up the MCR register and send it to the ATEN2011 */
2016
2017 ATEN2011_port->shadowMCR = MCR_MASTER_IE;
2018 if (cflag & CBAUD)
2019 ATEN2011_port->shadowMCR |= (MCR_DTR | MCR_RTS);
2020
2021 if (cflag & CRTSCTS)
2022 ATEN2011_port->shadowMCR |= (MCR_XON_ANY);
2023 else
2024 ATEN2011_port->shadowMCR &= ~(MCR_XON_ANY);
2025
2026 Data = ATEN2011_port->shadowMCR;
2027 set_uart_reg(port, MODEM_CONTROL_REGISTER, Data);
2028
2029 /* Determine divisor based on baud rate */
2030 baud = tty_get_baud_rate(tty);
2031
2032 if (!baud) {
2033 /* pick a default, any default... */
2034 dbg("%s", "Picked default baud...");
2035 baud = 9600;
2036 }
2037
2038 dbg("%s - baud rate = %d", __func__, baud);
2039 status = ATEN2011_send_cmd_write_baud_rate(ATEN2011_port, baud);
2040
2041 /* Enable Interrupts */
2042 Data = 0x0c;
2043 set_uart_reg(port, INTERRUPT_ENABLE_REGISTER, Data);
2044
2045 if (ATEN2011_port->read_urb->status != -EINPROGRESS) {
2046 ATEN2011_port->read_urb->dev = serial->dev;
2047
2048 status = usb_submit_urb(ATEN2011_port->read_urb, GFP_ATOMIC);
2049
2050 if (status) {
2051 dbg
2052 (" usb_submit_urb(read bulk) failed, status = %d",
2053 status);
2054 }
2055 }
2056 dbg
2057 ("ATEN2011_change_port_settings ATEN2011_port->shadowLCR is End %x",
2058 ATEN2011_port->shadowLCR);
2059
2060 return;
2061}
2062
2063static int ATEN2011_calc_num_ports(struct usb_serial *serial)
2064{
2065
2066 __u16 Data = 0x00;
2067 int ret = 0;
2068 int ATEN2011_2or4ports;
2069 ret = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
2070 ATEN_RDREQ, ATEN_RD_RTYPE, 0, GPIO_REGISTER,
2071 &Data, VENDOR_READ_LENGTH, ATEN_WDR_TIMEOUT);
2072
2073/* ghostgum: here is where the problem appears to bet */
2074/* Which of the following are needed? */
2075/* Greg used the serial->type->num_ports=2 */
2076/* But the code in the ATEN2011_open relies on serial->num_ports=2 */
2077 if ((Data & 0x01) == 0) {
2078 ATEN2011_2or4ports = 2;
2079 serial->type->num_ports = 2;
2080 serial->num_ports = 2;
2081 }
2082 /* else if(serial->interface->cur_altsetting->desc.bNumEndpoints == 9) */
2083 else {
2084 ATEN2011_2or4ports = 4;
2085 serial->type->num_ports = 4;
2086 serial->num_ports = 4;
2087
2088 }
2089
2090 return ATEN2011_2or4ports;
2091}
2092
2093static int ATEN2011_startup(struct usb_serial *serial)
2094{
2095 struct ATENINTL_serial *ATEN2011_serial;
2096 struct ATENINTL_port *ATEN2011_port;
2097 struct usb_device *dev;
2098 int i, status;
2099 int minor;
2100
2101 __u16 Data;
2102 dbg("%s", " ATEN2011_startup :entering..........");
2103
2104 if (!serial) {
2105 dbg("%s", "Invalid Handler");
2106 return -1;
2107 }
2108
2109 dev = serial->dev;
2110
2111 dbg("%s", "Entering...");
2112
2113 /* create our private serial structure */
2114 ATEN2011_serial = kzalloc(sizeof(struct ATENINTL_serial), GFP_KERNEL);
2115 if (ATEN2011_serial == NULL) {
2116 err("%s - Out of memory", __func__);
2117 return -ENOMEM;
2118 }
2119
2120 /* resetting the private structure field values to zero */
2121 memset(ATEN2011_serial, 0, sizeof(struct ATENINTL_serial));
2122
2123 ATEN2011_serial->serial = serial;
2124 /* initilize status polling flag to 0 */
2125 ATEN2011_serial->status_polling_started = 0;
2126
2127 usb_set_serial_data(serial, ATEN2011_serial);
2128 ATEN2011_serial->ATEN2011_spectrum_2or4ports =
2129 ATEN2011_calc_num_ports(serial);
2130 /* we set up the pointers to the endpoints in the ATEN2011_open *
2131 * function, as the structures aren't created yet. */
2132
2133 /* set up port private structures */
2134 for (i = 0; i < serial->num_ports; ++i) {
2135 ATEN2011_port =
2136 kmalloc(sizeof(struct ATENINTL_port), GFP_KERNEL);
2137 if (ATEN2011_port == NULL) {
2138 err("%s - Out of memory", __func__);
2139 usb_set_serial_data(serial, NULL);
2140 kfree(ATEN2011_serial);
2141 return -ENOMEM;
2142 }
2143 memset(ATEN2011_port, 0, sizeof(struct ATENINTL_port));
2144
2145 /*
2146 * Initialize all port interrupt end point to port 0
2147 * int endpoint. Our device has only one interrupt end point
2148 * comman to all port
2149 */
2150 /* serial->port[i]->interrupt_in_endpointAddress = serial->port[0]->interrupt_in_endpointAddress; */
2151
2152 ATEN2011_port->port = serial->port[i];
2153 usb_set_serial_port_data(serial->port[i], ATEN2011_port);
2154
2155 minor = serial->port[i]->serial->minor;
2156 if (minor == SERIAL_TTY_NO_MINOR)
2157 minor = 0;
2158 ATEN2011_port->port_num =
2159 ((serial->port[i]->number - minor) + 1);
2160
2161 if (ATEN2011_port->port_num == 1) {
2162 ATEN2011_port->SpRegOffset = 0x0;
2163 ATEN2011_port->ControlRegOffset = 0x1;
2164 ATEN2011_port->DcrRegOffset = 0x4;
2165 } else if ((ATEN2011_port->port_num == 2)
2166 && (ATEN2011_serial->ATEN2011_spectrum_2or4ports ==
2167 4)) {
2168 ATEN2011_port->SpRegOffset = 0x8;
2169 ATEN2011_port->ControlRegOffset = 0x9;
2170 ATEN2011_port->DcrRegOffset = 0x16;
2171 } else if ((ATEN2011_port->port_num == 2)
2172 && (ATEN2011_serial->ATEN2011_spectrum_2or4ports ==
2173 2)) {
2174 ATEN2011_port->SpRegOffset = 0xa;
2175 ATEN2011_port->ControlRegOffset = 0xb;
2176 ATEN2011_port->DcrRegOffset = 0x19;
2177 } else if ((ATEN2011_port->port_num == 3)
2178 && (ATEN2011_serial->ATEN2011_spectrum_2or4ports ==
2179 4)) {
2180 ATEN2011_port->SpRegOffset = 0xa;
2181 ATEN2011_port->ControlRegOffset = 0xb;
2182 ATEN2011_port->DcrRegOffset = 0x19;
2183 } else if ((ATEN2011_port->port_num == 4)
2184 && (ATEN2011_serial->ATEN2011_spectrum_2or4ports ==
2185 4)) {
2186 ATEN2011_port->SpRegOffset = 0xc;
2187 ATEN2011_port->ControlRegOffset = 0xd;
2188 ATEN2011_port->DcrRegOffset = 0x1c;
2189 }
2190
2191 usb_set_serial_port_data(serial->port[i], ATEN2011_port);
2192
2193 /* enable rx_disable bit in control register */
2194
2195 status = get_reg_sync(serial->port[i],
2196 ATEN2011_port->ControlRegOffset, &Data);
2197 if (status < 0) {
2198 dbg("Reading ControlReg failed status-0x%x",
2199 status);
2200 break;
2201 } else
2202 dbg
2203 ("ControlReg Reading success val is %x, status%d",
2204 Data, status);
2205 Data |= 0x08; /* setting driver done bit */
2206 Data |= 0x04; /* sp1_bit to have cts change reflect in modem status reg */
2207
2208 /* Data |= 0x20; */ /* rx_disable bit */
2209 status = set_reg_sync(serial->port[i],
2210 ATEN2011_port->ControlRegOffset, Data);
2211 if (status < 0) {
2212 dbg
2213 ("Writing ControlReg failed(rx_disable) status-0x%x",
2214 status);
2215 break;
2216 } else
2217 dbg
2218 ("ControlReg Writing success(rx_disable) status%d",
2219 status);
2220
2221 /*
2222 * Write default values in DCR (i.e 0x01 in DCR0, 0x05 in DCR2
2223 * and 0x24 in DCR3
2224 */
2225 Data = 0x01;
2226 status = set_reg_sync(serial->port[i],
2227 (__u16)(ATEN2011_port->DcrRegOffset + 0),
2228 Data);
2229 if (status < 0) {
2230 dbg("Writing DCR0 failed status-0x%x", status);
2231 break;
2232 } else
2233 dbg("DCR0 Writing success status%d", status);
2234
2235 Data = 0x05;
2236 status = set_reg_sync(serial->port[i],
2237 (__u16)(ATEN2011_port->DcrRegOffset + 1),
2238 Data);
2239 if (status < 0) {
2240 dbg("Writing DCR1 failed status-0x%x", status);
2241 break;
2242 } else
2243 dbg("DCR1 Writing success status%d", status);
2244
2245 Data = 0x24;
2246 status = set_reg_sync(serial->port[i],
2247 (__u16)(ATEN2011_port->DcrRegOffset + 2),
2248 Data);
2249 if (status < 0) {
2250 dbg("Writing DCR2 failed status-0x%x", status);
2251 break;
2252 } else
2253 dbg("DCR2 Writing success status%d", status);
2254
2255 /* write values in clkstart0x0 and clkmulti 0x20 */
2256 Data = 0x0;
2257 status = set_reg_sync(serial->port[i], CLK_START_VALUE_REGISTER,
2258 Data);
2259 if (status < 0) {
2260 dbg
2261 ("Writing CLK_START_VALUE_REGISTER failed status-0x%x",
2262 status);
2263 break;
2264 } else
2265 dbg
2266 ("CLK_START_VALUE_REGISTER Writing success status%d",
2267 status);
2268
2269 Data = 0x20;
2270 status = set_reg_sync(serial->port[i], CLK_MULTI_REGISTER,
2271 Data);
2272 if (status < 0) {
2273 dbg
2274 ("Writing CLK_MULTI_REGISTER failed status-0x%x",
2275 status);
2276 break;
2277 } else
2278 dbg("CLK_MULTI_REGISTER Writing success status%d",
2279 status);
2280
2281 /* Zero Length flag register */
2282 if ((ATEN2011_port->port_num != 1)
2283 && (ATEN2011_serial->ATEN2011_spectrum_2or4ports == 2)) {
2284
2285 Data = 0xff;
2286 status = set_reg_sync(serial->port[i],
2287 (__u16)(ZLP_REG1 + ((__u16)ATEN2011_port->port_num)),
2288 Data);
2289 dbg("ZLIP offset%x",
2290 (__u16) (ZLP_REG1 +
2291 ((__u16) ATEN2011_port->port_num)));
2292 if (status < 0) {
2293 dbg
2294 ("Writing ZLP_REG%d failed status-0x%x",
2295 i + 2, status);
2296 break;
2297 } else
2298 dbg("ZLP_REG%d Writing success status%d",
2299 i + 2, status);
2300 } else {
2301 Data = 0xff;
2302 status = set_reg_sync(serial->port[i],
2303 (__u16)(ZLP_REG1 + ((__u16)ATEN2011_port->port_num) - 0x1),
2304 Data);
2305 dbg("ZLIP offset%x",
2306 (__u16) (ZLP_REG1 +
2307 ((__u16) ATEN2011_port->port_num) -
2308 0x1));
2309 if (status < 0) {
2310 dbg
2311 ("Writing ZLP_REG%d failed status-0x%x",
2312 i + 1, status);
2313 break;
2314 } else
2315 dbg("ZLP_REG%d Writing success status%d",
2316 i + 1, status);
2317
2318 }
2319 ATEN2011_port->control_urb = usb_alloc_urb(0, GFP_ATOMIC);
2320 ATEN2011_port->ctrl_buf = kmalloc(16, GFP_KERNEL);
2321
2322 }
2323
2324 /* Zero Length flag enable */
2325 Data = 0x0f;
2326 status = set_reg_sync(serial->port[0], ZLP_REG5, Data);
2327 if (status < 0) {
2328 dbg("Writing ZLP_REG5 failed status-0x%x", status);
2329 return -1;
2330 } else
2331 dbg("ZLP_REG5 Writing success status%d", status);
2332
2333 /* setting configuration feature to one */
2334 usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
2335 (__u8) 0x03, 0x00, 0x01, 0x00, NULL, 0x00, 5 * HZ);
2336 return 0;
2337}
2338
2339static void ATEN2011_release(struct usb_serial *serial)
2340{
2341 int i;
2342 struct ATENINTL_port *ATEN2011_port;
2343
2344 /* check for the ports to be closed,close the ports and disconnect */
2345
2346 /* free private structure allocated for serial port *
2347 * stop reads and writes on all ports */
2348
2349 for (i = 0; i < serial->num_ports; ++i) {
2350 ATEN2011_port = usb_get_serial_port_data(serial->port[i]);
2351 kfree(ATEN2011_port->ctrl_buf);
2352 usb_kill_urb(ATEN2011_port->control_urb);
2353 kfree(ATEN2011_port);
2354 usb_set_serial_port_data(serial->port[i], NULL);
2355 }
2356
2357 /* free private structure allocated for serial device */
2358
2359 kfree(usb_get_serial_data(serial));
2360 usb_set_serial_data(serial, NULL);
2361}
2362
2363static struct usb_serial_driver aten_serial_driver = {
2364 .driver = {
2365 .owner = THIS_MODULE,
2366 .name = "aten2011",
2367 },
2368 .description = DRIVER_DESC,
2369 .id_table = id_table,
2370 .open = ATEN2011_open,
2371 .close = ATEN2011_close,
2372 .write = ATEN2011_write,
2373 .write_room = ATEN2011_write_room,
2374 .chars_in_buffer = ATEN2011_chars_in_buffer,
2375 .throttle = ATEN2011_throttle,
2376 .unthrottle = ATEN2011_unthrottle,
2377 .calc_num_ports = ATEN2011_calc_num_ports,
2378
2379 .ioctl = ATEN2011_ioctl,
2380 .set_termios = ATEN2011_set_termios,
2381 .break_ctl = ATEN2011_break,
2382 .tiocmget = ATEN2011_tiocmget,
2383 .tiocmset = ATEN2011_tiocmset,
2384 .attach = ATEN2011_startup,
2385 .release = ATEN2011_release,
2386 .read_bulk_callback = ATEN2011_bulk_in_callback,
2387 .read_int_callback = ATEN2011_interrupt_callback,
2388};
2389
2390static struct usb_driver aten_driver = {
2391 .name = "aten2011",
2392 .probe = usb_serial_probe,
2393 .disconnect = usb_serial_disconnect,
2394 .id_table = id_table,
2395};
2396
2397static int __init aten_init(void)
2398{
2399 int retval;
2400
2401 /* Register with the usb serial */
2402 retval = usb_serial_register(&aten_serial_driver);
2403 if (retval)
2404 return retval;
2405
2406 printk(KERN_INFO KBUILD_MODNAME ":"
2407 DRIVER_DESC " " DRIVER_VERSION "\n");
2408
2409 /* Register with the usb */
2410 retval = usb_register(&aten_driver);
2411 if (retval)
2412 usb_serial_deregister(&aten_serial_driver);
2413
2414 return retval;
2415}
2416
2417static void __exit aten_exit(void)
2418{
2419 usb_deregister(&aten_driver);
2420 usb_serial_deregister(&aten_serial_driver);
2421}
2422
2423module_init(aten_init);
2424module_exit(aten_exit);
2425
2426/* Module information */
2427MODULE_DESCRIPTION(DRIVER_DESC);
2428MODULE_LICENSE("GPL");
2429
2430MODULE_PARM_DESC(debug, "Debug enabled or not");
diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c
index 0ab9d15f343..f5416af1e90 100644
--- a/drivers/staging/udlfb/udlfb.c
+++ b/drivers/staging/udlfb/udlfb.c
@@ -21,6 +21,7 @@
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <linux/fb.h> 22#include <linux/fb.h>
23#include <linux/mutex.h> 23#include <linux/mutex.h>
24#include <linux/vmalloc.h>
24 25
25#include "udlfb.h" 26#include "udlfb.h"
26 27
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 5b15d9d8896..2bfc41ece0e 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -387,7 +387,6 @@ static void acm_rx_tasklet(unsigned long _acm)
387 struct acm_ru *rcv; 387 struct acm_ru *rcv;
388 unsigned long flags; 388 unsigned long flags;
389 unsigned char throttled; 389 unsigned char throttled;
390 struct usb_host_endpoint *ep;
391 390
392 dbg("Entering acm_rx_tasklet"); 391 dbg("Entering acm_rx_tasklet");
393 392
@@ -463,14 +462,12 @@ urbs:
463 462
464 rcv->buffer = buf; 463 rcv->buffer = buf;
465 464
466 ep = (usb_pipein(acm->rx_endpoint) ? acm->dev->ep_in : acm->dev->ep_out) 465 if (acm->is_int_ep)
467 [usb_pipeendpoint(acm->rx_endpoint)];
468 if (usb_endpoint_xfer_int(&ep->desc))
469 usb_fill_int_urb(rcv->urb, acm->dev, 466 usb_fill_int_urb(rcv->urb, acm->dev,
470 acm->rx_endpoint, 467 acm->rx_endpoint,
471 buf->base, 468 buf->base,
472 acm->readsize, 469 acm->readsize,
473 acm_read_bulk, rcv, ep->desc.bInterval); 470 acm_read_bulk, rcv, acm->bInterval);
474 else 471 else
475 usb_fill_bulk_urb(rcv->urb, acm->dev, 472 usb_fill_bulk_urb(rcv->urb, acm->dev,
476 acm->rx_endpoint, 473 acm->rx_endpoint,
@@ -750,7 +747,7 @@ static int acm_tty_chars_in_buffer(struct tty_struct *tty)
750{ 747{
751 struct acm *acm = tty->driver_data; 748 struct acm *acm = tty->driver_data;
752 if (!ACM_READY(acm)) 749 if (!ACM_READY(acm))
753 return -EINVAL; 750 return 0;
754 /* 751 /*
755 * This is inaccurate (overcounts), but it works. 752 * This is inaccurate (overcounts), but it works.
756 */ 753 */
@@ -1183,6 +1180,9 @@ made_compressed_probe:
1183 spin_lock_init(&acm->read_lock); 1180 spin_lock_init(&acm->read_lock);
1184 mutex_init(&acm->mutex); 1181 mutex_init(&acm->mutex);
1185 acm->rx_endpoint = usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress); 1182 acm->rx_endpoint = usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress);
1183 acm->is_int_ep = usb_endpoint_xfer_int(epread);
1184 if (acm->is_int_ep)
1185 acm->bInterval = epread->bInterval;
1186 tty_port_init(&acm->port); 1186 tty_port_init(&acm->port);
1187 acm->port.ops = &acm_port_ops; 1187 acm->port.ops = &acm_port_ops;
1188 1188
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
index 1602324808b..c4a0ee8ffcc 100644
--- a/drivers/usb/class/cdc-acm.h
+++ b/drivers/usb/class/cdc-acm.h
@@ -126,6 +126,8 @@ struct acm {
126 unsigned int ctrl_caps; /* control capabilities from the class specific header */ 126 unsigned int ctrl_caps; /* control capabilities from the class specific header */
127 unsigned int susp_count; /* number of suspended interfaces */ 127 unsigned int susp_count; /* number of suspended interfaces */
128 int combined_interfaces:1; /* control and data collapsed */ 128 int combined_interfaces:1; /* control and data collapsed */
129 int is_int_ep:1; /* interrupt endpoints contrary to spec used */
130 u8 bInterval;
129 struct acm_wb *delayed_wb; /* write queued for a device about to be woken */ 131 struct acm_wb *delayed_wb; /* write queued for a device about to be woken */
130}; 132};
131 133
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index 24dfb33f90c..a16c538d013 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -80,38 +80,18 @@ static int usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno,
80 int max_tx; 80 int max_tx;
81 int i; 81 int i;
82 82
83 /* Allocate space for the SS endpoint companion descriptor */
84 ep->ss_ep_comp = kzalloc(sizeof(struct usb_host_ss_ep_comp),
85 GFP_KERNEL);
86 if (!ep->ss_ep_comp)
87 return -ENOMEM;
88 desc = (struct usb_ss_ep_comp_descriptor *) buffer; 83 desc = (struct usb_ss_ep_comp_descriptor *) buffer;
89 if (desc->bDescriptorType != USB_DT_SS_ENDPOINT_COMP) { 84 if (desc->bDescriptorType != USB_DT_SS_ENDPOINT_COMP) {
90 dev_warn(ddev, "No SuperSpeed endpoint companion for config %d " 85 dev_warn(ddev, "No SuperSpeed endpoint companion for config %d "
91 " interface %d altsetting %d ep %d: " 86 " interface %d altsetting %d ep %d: "
92 "using minimum values\n", 87 "using minimum values\n",
93 cfgno, inum, asnum, ep->desc.bEndpointAddress); 88 cfgno, inum, asnum, ep->desc.bEndpointAddress);
94 ep->ss_ep_comp->desc.bLength = USB_DT_SS_EP_COMP_SIZE;
95 ep->ss_ep_comp->desc.bDescriptorType = USB_DT_SS_ENDPOINT_COMP;
96 ep->ss_ep_comp->desc.bMaxBurst = 0;
97 /*
98 * Leave bmAttributes as zero, which will mean no streams for
99 * bulk, and isoc won't support multiple bursts of packets.
100 * With bursts of only one packet, and a Mult of 1, the max
101 * amount of data moved per endpoint service interval is one
102 * packet.
103 */
104 if (usb_endpoint_xfer_isoc(&ep->desc) ||
105 usb_endpoint_xfer_int(&ep->desc))
106 ep->ss_ep_comp->desc.wBytesPerInterval =
107 ep->desc.wMaxPacketSize;
108 /* 89 /*
109 * The next descriptor is for an Endpoint or Interface, 90 * The next descriptor is for an Endpoint or Interface,
110 * no extra descriptors to copy into the companion structure, 91 * no extra descriptors to copy into the companion structure,
111 * and we didn't eat up any of the buffer. 92 * and we didn't eat up any of the buffer.
112 */ 93 */
113 retval = 0; 94 return 0;
114 goto valid;
115 } 95 }
116 memcpy(&ep->ss_ep_comp->desc, desc, USB_DT_SS_EP_COMP_SIZE); 96 memcpy(&ep->ss_ep_comp->desc, desc, USB_DT_SS_EP_COMP_SIZE);
117 desc = &ep->ss_ep_comp->desc; 97 desc = &ep->ss_ep_comp->desc;
@@ -320,6 +300,28 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,
320 buffer += i; 300 buffer += i;
321 size -= i; 301 size -= i;
322 302
303 /* Allocate space for the SS endpoint companion descriptor */
304 endpoint->ss_ep_comp = kzalloc(sizeof(struct usb_host_ss_ep_comp),
305 GFP_KERNEL);
306 if (!endpoint->ss_ep_comp)
307 return -ENOMEM;
308
309 /* Fill in some default values (may be overwritten later) */
310 endpoint->ss_ep_comp->desc.bLength = USB_DT_SS_EP_COMP_SIZE;
311 endpoint->ss_ep_comp->desc.bDescriptorType = USB_DT_SS_ENDPOINT_COMP;
312 endpoint->ss_ep_comp->desc.bMaxBurst = 0;
313 /*
314 * Leave bmAttributes as zero, which will mean no streams for
315 * bulk, and isoc won't support multiple bursts of packets.
316 * With bursts of only one packet, and a Mult of 1, the max
317 * amount of data moved per endpoint service interval is one
318 * packet.
319 */
320 if (usb_endpoint_xfer_isoc(&endpoint->desc) ||
321 usb_endpoint_xfer_int(&endpoint->desc))
322 endpoint->ss_ep_comp->desc.wBytesPerInterval =
323 endpoint->desc.wMaxPacketSize;
324
323 if (size > 0) { 325 if (size > 0) {
324 retval = usb_parse_ss_endpoint_companion(ddev, cfgno, 326 retval = usb_parse_ss_endpoint_companion(ddev, cfgno,
325 inum, asnum, endpoint, num_ep, buffer, 327 inum, asnum, endpoint, num_ep, buffer,
@@ -329,6 +331,10 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,
329 retval = buffer - buffer0; 331 retval = buffer - buffer0;
330 } 332 }
331 } else { 333 } else {
334 dev_warn(ddev, "config %d interface %d altsetting %d "
335 "endpoint 0x%X has no "
336 "SuperSpeed companion descriptor\n",
337 cfgno, inum, asnum, d->bEndpointAddress);
332 retval = buffer - buffer0; 338 retval = buffer - buffer0;
333 } 339 }
334 } else { 340 } else {
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 38b8bce782d..4247eccf858 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -595,7 +595,7 @@ static int usbdev_open(struct inode *inode, struct file *file)
595 if (!ps) 595 if (!ps)
596 goto out; 596 goto out;
597 597
598 ret = -ENOENT; 598 ret = -ENODEV;
599 599
600 /* usbdev device-node */ 600 /* usbdev device-node */
601 if (imajor(inode) == USB_DEVICE_MAJOR) 601 if (imajor(inode) == USB_DEVICE_MAJOR)
@@ -1321,7 +1321,8 @@ static int get_urb32(struct usbdevfs_urb *kurb,
1321 struct usbdevfs_urb32 __user *uurb) 1321 struct usbdevfs_urb32 __user *uurb)
1322{ 1322{
1323 __u32 uptr; 1323 __u32 uptr;
1324 if (get_user(kurb->type, &uurb->type) || 1324 if (!access_ok(VERIFY_READ, uurb, sizeof(*uurb)) ||
1325 __get_user(kurb->type, &uurb->type) ||
1325 __get_user(kurb->endpoint, &uurb->endpoint) || 1326 __get_user(kurb->endpoint, &uurb->endpoint) ||
1326 __get_user(kurb->status, &uurb->status) || 1327 __get_user(kurb->status, &uurb->status) ||
1327 __get_user(kurb->flags, &uurb->flags) || 1328 __get_user(kurb->flags, &uurb->flags) ||
@@ -1536,8 +1537,9 @@ static int proc_ioctl_compat(struct dev_state *ps, compat_uptr_t arg)
1536 u32 udata; 1537 u32 udata;
1537 1538
1538 uioc = compat_ptr((long)arg); 1539 uioc = compat_ptr((long)arg);
1539 if (get_user(ctrl.ifno, &uioc->ifno) || 1540 if (!access_ok(VERIFY_READ, uioc, sizeof(*uioc)) ||
1540 get_user(ctrl.ioctl_code, &uioc->ioctl_code) || 1541 __get_user(ctrl.ifno, &uioc->ifno) ||
1542 __get_user(ctrl.ioctl_code, &uioc->ioctl_code) ||
1541 __get_user(udata, &uioc->data)) 1543 __get_user(udata, &uioc->data))
1542 return -EFAULT; 1544 return -EFAULT;
1543 ctrl.data = compat_ptr(udata); 1545 ctrl.data = compat_ptr(udata);
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 7d03549c333..11c627ce602 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -903,7 +903,8 @@ static int ehci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
903 /* already started */ 903 /* already started */
904 break; 904 break;
905 case QH_STATE_IDLE: 905 case QH_STATE_IDLE:
906 WARN_ON(1); 906 /* QH might be waiting for a Clear-TT-Buffer */
907 qh_completions(ehci, qh);
907 break; 908 break;
908 } 909 }
909 break; 910 break;
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c
index dc2ac613a9d..1d283e1b2b8 100644
--- a/drivers/usb/host/ehci-orion.c
+++ b/drivers/usb/host/ehci-orion.c
@@ -105,6 +105,7 @@ static int ehci_orion_setup(struct usb_hcd *hcd)
105 struct ehci_hcd *ehci = hcd_to_ehci(hcd); 105 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
106 int retval; 106 int retval;
107 107
108 ehci_reset(ehci);
108 retval = ehci_halt(ehci); 109 retval = ehci_halt(ehci);
109 if (retval) 110 if (retval)
110 return retval; 111 return retval;
@@ -118,7 +119,6 @@ static int ehci_orion_setup(struct usb_hcd *hcd)
118 119
119 hcd->has_tt = 1; 120 hcd->has_tt = 1;
120 121
121 ehci_reset(ehci);
122 ehci_port_power(ehci, 0); 122 ehci_port_power(ehci, 0);
123 123
124 return retval; 124 return retval;
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index 9a1384747f3..7673554fa64 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -375,12 +375,11 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh)
375 */ 375 */
376 if ((token & QTD_STS_XACT) && 376 if ((token & QTD_STS_XACT) &&
377 QTD_CERR(token) == 0 && 377 QTD_CERR(token) == 0 &&
378 --qh->xacterrs > 0 && 378 ++qh->xacterrs < QH_XACTERR_MAX &&
379 !urb->unlinked) { 379 !urb->unlinked) {
380 ehci_dbg(ehci, 380 ehci_dbg(ehci,
381 "detected XactErr len %zu/%zu retry %d\n", 381 "detected XactErr len %zu/%zu retry %d\n",
382 qtd->length - QTD_LENGTH(token), qtd->length, 382 qtd->length - QTD_LENGTH(token), qtd->length, qh->xacterrs);
383 QH_XACTERR_MAX - qh->xacterrs);
384 383
385 /* reset the token in the qtd and the 384 /* reset the token in the qtd and the
386 * qh overlay (which still contains 385 * qh overlay (which still contains
@@ -494,7 +493,7 @@ halt:
494 last = qtd; 493 last = qtd;
495 494
496 /* reinit the xacterr counter for the next qtd */ 495 /* reinit the xacterr counter for the next qtd */
497 qh->xacterrs = QH_XACTERR_MAX; 496 qh->xacterrs = 0;
498 } 497 }
499 498
500 /* last urb's completion might still need calling */ 499 /* last urb's completion might still need calling */
@@ -940,7 +939,8 @@ static void qh_link_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
940 head->qh_next.qh = qh; 939 head->qh_next.qh = qh;
941 head->hw_next = dma; 940 head->hw_next = dma;
942 941
943 qh->xacterrs = QH_XACTERR_MAX; 942 qh_get(qh);
943 qh->xacterrs = 0;
944 qh->qh_state = QH_STATE_LINKED; 944 qh->qh_state = QH_STATE_LINKED;
945 /* qtd completions reported later by interrupt */ 945 /* qtd completions reported later by interrupt */
946} 946}
@@ -1080,7 +1080,7 @@ submit_async (
1080 * the HC and TT handle it when the TT has a buffer ready. 1080 * the HC and TT handle it when the TT has a buffer ready.
1081 */ 1081 */
1082 if (likely (qh->qh_state == QH_STATE_IDLE)) 1082 if (likely (qh->qh_state == QH_STATE_IDLE))
1083 qh_link_async (ehci, qh_get (qh)); 1083 qh_link_async(ehci, qh);
1084 done: 1084 done:
1085 spin_unlock_irqrestore (&ehci->lock, flags); 1085 spin_unlock_irqrestore (&ehci->lock, flags);
1086 if (unlikely (qh == NULL)) 1086 if (unlikely (qh == NULL))
@@ -1115,8 +1115,6 @@ static void end_unlink_async (struct ehci_hcd *ehci)
1115 && HC_IS_RUNNING (ehci_to_hcd(ehci)->state)) 1115 && HC_IS_RUNNING (ehci_to_hcd(ehci)->state))
1116 qh_link_async (ehci, qh); 1116 qh_link_async (ehci, qh);
1117 else { 1117 else {
1118 qh_put (qh); // refcount from async list
1119
1120 /* it's not free to turn the async schedule on/off; leave it 1118 /* it's not free to turn the async schedule on/off; leave it
1121 * active but idle for a while once it empties. 1119 * active but idle for a while once it empties.
1122 */ 1120 */
@@ -1124,6 +1122,7 @@ static void end_unlink_async (struct ehci_hcd *ehci)
1124 && ehci->async->qh_next.qh == NULL) 1122 && ehci->async->qh_next.qh == NULL)
1125 timer_action (ehci, TIMER_ASYNC_OFF); 1123 timer_action (ehci, TIMER_ASYNC_OFF);
1126 } 1124 }
1125 qh_put(qh); /* refcount from async list */
1127 1126
1128 if (next) { 1127 if (next) {
1129 ehci->reclaim = NULL; 1128 ehci->reclaim = NULL;
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index 74f7f83b29a..edd61ee9032 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -542,6 +542,7 @@ static int qh_link_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh)
542 } 542 }
543 } 543 }
544 qh->qh_state = QH_STATE_LINKED; 544 qh->qh_state = QH_STATE_LINKED;
545 qh->xacterrs = 0;
545 qh_get (qh); 546 qh_get (qh);
546 547
547 /* update per-qh bandwidth for usbfs */ 548 /* update per-qh bandwidth for usbfs */
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index f3aaba35e91..83cbecd2a1e 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -282,6 +282,7 @@ static int ohci_omap_init(struct usb_hcd *hcd)
282static void ohci_omap_stop(struct usb_hcd *hcd) 282static void ohci_omap_stop(struct usb_hcd *hcd)
283{ 283{
284 dev_dbg(hcd->self.controller, "stopping USB Controller\n"); 284 dev_dbg(hcd->self.controller, "stopping USB Controller\n");
285 ohci_stop(hcd);
285 omap_ohci_clock_power(0); 286 omap_ohci_clock_power(0);
286} 287}
287 288
diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 2501c571f85..705e3432415 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -173,6 +173,7 @@ void xhci_print_ir_set(struct xhci_hcd *xhci, struct xhci_intr_reg *ir_set, int
173{ 173{
174 void *addr; 174 void *addr;
175 u32 temp; 175 u32 temp;
176 u64 temp_64;
176 177
177 addr = &ir_set->irq_pending; 178 addr = &ir_set->irq_pending;
178 temp = xhci_readl(xhci, addr); 179 temp = xhci_readl(xhci, addr);
@@ -200,25 +201,15 @@ void xhci_print_ir_set(struct xhci_hcd *xhci, struct xhci_intr_reg *ir_set, int
200 xhci_dbg(xhci, " WARN: %p: ir_set.rsvd = 0x%x\n", 201 xhci_dbg(xhci, " WARN: %p: ir_set.rsvd = 0x%x\n",
201 addr, (unsigned int)temp); 202 addr, (unsigned int)temp);
202 203
203 addr = &ir_set->erst_base[0]; 204 addr = &ir_set->erst_base;
204 temp = xhci_readl(xhci, addr); 205 temp_64 = xhci_read_64(xhci, addr);
205 xhci_dbg(xhci, " %p: ir_set.erst_base[0] = 0x%x\n", 206 xhci_dbg(xhci, " %p: ir_set.erst_base = @%08llx\n",
206 addr, (unsigned int) temp); 207 addr, temp_64);
207
208 addr = &ir_set->erst_base[1];
209 temp = xhci_readl(xhci, addr);
210 xhci_dbg(xhci, " %p: ir_set.erst_base[1] = 0x%x\n",
211 addr, (unsigned int) temp);
212 208
213 addr = &ir_set->erst_dequeue[0]; 209 addr = &ir_set->erst_dequeue;
214 temp = xhci_readl(xhci, addr); 210 temp_64 = xhci_read_64(xhci, addr);
215 xhci_dbg(xhci, " %p: ir_set.erst_dequeue[0] = 0x%x\n", 211 xhci_dbg(xhci, " %p: ir_set.erst_dequeue = @%08llx\n",
216 addr, (unsigned int) temp); 212 addr, temp_64);
217
218 addr = &ir_set->erst_dequeue[1];
219 temp = xhci_readl(xhci, addr);
220 xhci_dbg(xhci, " %p: ir_set.erst_dequeue[1] = 0x%x\n",
221 addr, (unsigned int) temp);
222} 213}
223 214
224void xhci_print_run_regs(struct xhci_hcd *xhci) 215void xhci_print_run_regs(struct xhci_hcd *xhci)
@@ -268,8 +259,7 @@ void xhci_debug_trb(struct xhci_hcd *xhci, union xhci_trb *trb)
268 xhci_dbg(xhci, "Link TRB:\n"); 259 xhci_dbg(xhci, "Link TRB:\n");
269 xhci_print_trb_offsets(xhci, trb); 260 xhci_print_trb_offsets(xhci, trb);
270 261
271 address = trb->link.segment_ptr[0] + 262 address = trb->link.segment_ptr;
272 (((u64) trb->link.segment_ptr[1]) << 32);
273 xhci_dbg(xhci, "Next ring segment DMA address = 0x%llx\n", address); 263 xhci_dbg(xhci, "Next ring segment DMA address = 0x%llx\n", address);
274 264
275 xhci_dbg(xhci, "Interrupter target = 0x%x\n", 265 xhci_dbg(xhci, "Interrupter target = 0x%x\n",
@@ -282,8 +272,7 @@ void xhci_debug_trb(struct xhci_hcd *xhci, union xhci_trb *trb)
282 (unsigned int) (trb->link.control & TRB_NO_SNOOP)); 272 (unsigned int) (trb->link.control & TRB_NO_SNOOP));
283 break; 273 break;
284 case TRB_TYPE(TRB_TRANSFER): 274 case TRB_TYPE(TRB_TRANSFER):
285 address = trb->trans_event.buffer[0] + 275 address = trb->trans_event.buffer;
286 (((u64) trb->trans_event.buffer[1]) << 32);
287 /* 276 /*
288 * FIXME: look at flags to figure out if it's an address or if 277 * FIXME: look at flags to figure out if it's an address or if
289 * the data is directly in the buffer field. 278 * the data is directly in the buffer field.
@@ -291,8 +280,7 @@ void xhci_debug_trb(struct xhci_hcd *xhci, union xhci_trb *trb)
291 xhci_dbg(xhci, "DMA address or buffer contents= %llu\n", address); 280 xhci_dbg(xhci, "DMA address or buffer contents= %llu\n", address);
292 break; 281 break;
293 case TRB_TYPE(TRB_COMPLETION): 282 case TRB_TYPE(TRB_COMPLETION):
294 address = trb->event_cmd.cmd_trb[0] + 283 address = trb->event_cmd.cmd_trb;
295 (((u64) trb->event_cmd.cmd_trb[1]) << 32);
296 xhci_dbg(xhci, "Command TRB pointer = %llu\n", address); 284 xhci_dbg(xhci, "Command TRB pointer = %llu\n", address);
297 xhci_dbg(xhci, "Completion status = %u\n", 285 xhci_dbg(xhci, "Completion status = %u\n",
298 (unsigned int) GET_COMP_CODE(trb->event_cmd.status)); 286 (unsigned int) GET_COMP_CODE(trb->event_cmd.status));
@@ -328,8 +316,8 @@ void xhci_debug_segment(struct xhci_hcd *xhci, struct xhci_segment *seg)
328 for (i = 0; i < TRBS_PER_SEGMENT; ++i) { 316 for (i = 0; i < TRBS_PER_SEGMENT; ++i) {
329 trb = &seg->trbs[i]; 317 trb = &seg->trbs[i];
330 xhci_dbg(xhci, "@%08x %08x %08x %08x %08x\n", addr, 318 xhci_dbg(xhci, "@%08x %08x %08x %08x %08x\n", addr,
331 (unsigned int) trb->link.segment_ptr[0], 319 lower_32_bits(trb->link.segment_ptr),
332 (unsigned int) trb->link.segment_ptr[1], 320 upper_32_bits(trb->link.segment_ptr),
333 (unsigned int) trb->link.intr_target, 321 (unsigned int) trb->link.intr_target,
334 (unsigned int) trb->link.control); 322 (unsigned int) trb->link.control);
335 addr += sizeof(*trb); 323 addr += sizeof(*trb);
@@ -386,8 +374,8 @@ void xhci_dbg_erst(struct xhci_hcd *xhci, struct xhci_erst *erst)
386 entry = &erst->entries[i]; 374 entry = &erst->entries[i];
387 xhci_dbg(xhci, "@%08x %08x %08x %08x %08x\n", 375 xhci_dbg(xhci, "@%08x %08x %08x %08x %08x\n",
388 (unsigned int) addr, 376 (unsigned int) addr,
389 (unsigned int) entry->seg_addr[0], 377 lower_32_bits(entry->seg_addr),
390 (unsigned int) entry->seg_addr[1], 378 upper_32_bits(entry->seg_addr),
391 (unsigned int) entry->seg_size, 379 (unsigned int) entry->seg_size,
392 (unsigned int) entry->rsvd); 380 (unsigned int) entry->rsvd);
393 addr += sizeof(*entry); 381 addr += sizeof(*entry);
@@ -396,90 +384,147 @@ void xhci_dbg_erst(struct xhci_hcd *xhci, struct xhci_erst *erst)
396 384
397void xhci_dbg_cmd_ptrs(struct xhci_hcd *xhci) 385void xhci_dbg_cmd_ptrs(struct xhci_hcd *xhci)
398{ 386{
399 u32 val; 387 u64 val;
400 388
401 val = xhci_readl(xhci, &xhci->op_regs->cmd_ring[0]); 389 val = xhci_read_64(xhci, &xhci->op_regs->cmd_ring);
402 xhci_dbg(xhci, "// xHC command ring deq ptr low bits + flags = 0x%x\n", val); 390 xhci_dbg(xhci, "// xHC command ring deq ptr low bits + flags = @%08x\n",
403 val = xhci_readl(xhci, &xhci->op_regs->cmd_ring[1]); 391 lower_32_bits(val));
404 xhci_dbg(xhci, "// xHC command ring deq ptr high bits = 0x%x\n", val); 392 xhci_dbg(xhci, "// xHC command ring deq ptr high bits = @%08x\n",
393 upper_32_bits(val));
405} 394}
406 395
407void xhci_dbg_ctx(struct xhci_hcd *xhci, struct xhci_device_control *ctx, dma_addr_t dma, unsigned int last_ep) 396/* Print the last 32 bytes for 64-byte contexts */
397static void dbg_rsvd64(struct xhci_hcd *xhci, u64 *ctx, dma_addr_t dma)
398{
399 int i;
400 for (i = 0; i < 4; ++i) {
401 xhci_dbg(xhci, "@%p (virt) @%08llx "
402 "(dma) %#08llx - rsvd64[%d]\n",
403 &ctx[4 + i], (unsigned long long)dma,
404 ctx[4 + i], i);
405 dma += 8;
406 }
407}
408
409void xhci_dbg_slot_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx)
408{ 410{
409 int i, j;
410 int last_ep_ctx = 31;
411 /* Fields are 32 bits wide, DMA addresses are in bytes */ 411 /* Fields are 32 bits wide, DMA addresses are in bytes */
412 int field_size = 32 / 8; 412 int field_size = 32 / 8;
413 int i;
413 414
414 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - drop flags\n", 415 struct xhci_slot_ctx *slot_ctx = xhci_get_slot_ctx(xhci, ctx);
415 &ctx->drop_flags, (unsigned long long)dma, 416 dma_addr_t dma = ctx->dma + ((unsigned long)slot_ctx - (unsigned long)ctx);
416 ctx->drop_flags); 417 int csz = HCC_64BYTE_CONTEXT(xhci->hcc_params);
417 dma += field_size;
418 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - add flags\n",
419 &ctx->add_flags, (unsigned long long)dma,
420 ctx->add_flags);
421 dma += field_size;
422 for (i = 0; i > 6; ++i) {
423 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - rsvd[%d]\n",
424 &ctx->rsvd[i], (unsigned long long)dma,
425 ctx->rsvd[i], i);
426 dma += field_size;
427 }
428 418
429 xhci_dbg(xhci, "Slot Context:\n"); 419 xhci_dbg(xhci, "Slot Context:\n");
430 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - dev_info\n", 420 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - dev_info\n",
431 &ctx->slot.dev_info, 421 &slot_ctx->dev_info,
432 (unsigned long long)dma, ctx->slot.dev_info); 422 (unsigned long long)dma, slot_ctx->dev_info);
433 dma += field_size; 423 dma += field_size;
434 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - dev_info2\n", 424 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - dev_info2\n",
435 &ctx->slot.dev_info2, 425 &slot_ctx->dev_info2,
436 (unsigned long long)dma, ctx->slot.dev_info2); 426 (unsigned long long)dma, slot_ctx->dev_info2);
437 dma += field_size; 427 dma += field_size;
438 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - tt_info\n", 428 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - tt_info\n",
439 &ctx->slot.tt_info, 429 &slot_ctx->tt_info,
440 (unsigned long long)dma, ctx->slot.tt_info); 430 (unsigned long long)dma, slot_ctx->tt_info);
441 dma += field_size; 431 dma += field_size;
442 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - dev_state\n", 432 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - dev_state\n",
443 &ctx->slot.dev_state, 433 &slot_ctx->dev_state,
444 (unsigned long long)dma, ctx->slot.dev_state); 434 (unsigned long long)dma, slot_ctx->dev_state);
445 dma += field_size; 435 dma += field_size;
446 for (i = 0; i > 4; ++i) { 436 for (i = 0; i < 4; ++i) {
447 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - rsvd[%d]\n", 437 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - rsvd[%d]\n",
448 &ctx->slot.reserved[i], (unsigned long long)dma, 438 &slot_ctx->reserved[i], (unsigned long long)dma,
449 ctx->slot.reserved[i], i); 439 slot_ctx->reserved[i], i);
450 dma += field_size; 440 dma += field_size;
451 } 441 }
452 442
443 if (csz)
444 dbg_rsvd64(xhci, (u64 *)slot_ctx, dma);
445}
446
447void xhci_dbg_ep_ctx(struct xhci_hcd *xhci,
448 struct xhci_container_ctx *ctx,
449 unsigned int last_ep)
450{
451 int i, j;
452 int last_ep_ctx = 31;
453 /* Fields are 32 bits wide, DMA addresses are in bytes */
454 int field_size = 32 / 8;
455 int csz = HCC_64BYTE_CONTEXT(xhci->hcc_params);
456
453 if (last_ep < 31) 457 if (last_ep < 31)
454 last_ep_ctx = last_ep + 1; 458 last_ep_ctx = last_ep + 1;
455 for (i = 0; i < last_ep_ctx; ++i) { 459 for (i = 0; i < last_ep_ctx; ++i) {
460 struct xhci_ep_ctx *ep_ctx = xhci_get_ep_ctx(xhci, ctx, i);
461 dma_addr_t dma = ctx->dma +
462 ((unsigned long)ep_ctx - (unsigned long)ctx);
463
456 xhci_dbg(xhci, "Endpoint %02d Context:\n", i); 464 xhci_dbg(xhci, "Endpoint %02d Context:\n", i);
457 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - ep_info\n", 465 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - ep_info\n",
458 &ctx->ep[i].ep_info, 466 &ep_ctx->ep_info,
459 (unsigned long long)dma, ctx->ep[i].ep_info); 467 (unsigned long long)dma, ep_ctx->ep_info);
460 dma += field_size; 468 dma += field_size;
461 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - ep_info2\n", 469 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - ep_info2\n",
462 &ctx->ep[i].ep_info2, 470 &ep_ctx->ep_info2,
463 (unsigned long long)dma, ctx->ep[i].ep_info2); 471 (unsigned long long)dma, ep_ctx->ep_info2);
464 dma += field_size;
465 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - deq[0]\n",
466 &ctx->ep[i].deq[0],
467 (unsigned long long)dma, ctx->ep[i].deq[0]);
468 dma += field_size;
469 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - deq[1]\n",
470 &ctx->ep[i].deq[1],
471 (unsigned long long)dma, ctx->ep[i].deq[1]);
472 dma += field_size; 472 dma += field_size;
473 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08llx - deq\n",
474 &ep_ctx->deq,
475 (unsigned long long)dma, ep_ctx->deq);
476 dma += 2*field_size;
473 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - tx_info\n", 477 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - tx_info\n",
474 &ctx->ep[i].tx_info, 478 &ep_ctx->tx_info,
475 (unsigned long long)dma, ctx->ep[i].tx_info); 479 (unsigned long long)dma, ep_ctx->tx_info);
476 dma += field_size; 480 dma += field_size;
477 for (j = 0; j < 3; ++j) { 481 for (j = 0; j < 3; ++j) {
478 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - rsvd[%d]\n", 482 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - rsvd[%d]\n",
479 &ctx->ep[i].reserved[j], 483 &ep_ctx->reserved[j],
480 (unsigned long long)dma, 484 (unsigned long long)dma,
481 ctx->ep[i].reserved[j], j); 485 ep_ctx->reserved[j], j);
486 dma += field_size;
487 }
488
489 if (csz)
490 dbg_rsvd64(xhci, (u64 *)ep_ctx, dma);
491 }
492}
493
494void xhci_dbg_ctx(struct xhci_hcd *xhci,
495 struct xhci_container_ctx *ctx,
496 unsigned int last_ep)
497{
498 int i;
499 /* Fields are 32 bits wide, DMA addresses are in bytes */
500 int field_size = 32 / 8;
501 struct xhci_slot_ctx *slot_ctx;
502 dma_addr_t dma = ctx->dma;
503 int csz = HCC_64BYTE_CONTEXT(xhci->hcc_params);
504
505 if (ctx->type == XHCI_CTX_TYPE_INPUT) {
506 struct xhci_input_control_ctx *ctrl_ctx =
507 xhci_get_input_control_ctx(xhci, ctx);
508 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - drop flags\n",
509 &ctrl_ctx->drop_flags, (unsigned long long)dma,
510 ctrl_ctx->drop_flags);
511 dma += field_size;
512 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - add flags\n",
513 &ctrl_ctx->add_flags, (unsigned long long)dma,
514 ctrl_ctx->add_flags);
515 dma += field_size;
516 for (i = 0; i < 6; ++i) {
517 xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - rsvd2[%d]\n",
518 &ctrl_ctx->rsvd2[i], (unsigned long long)dma,
519 ctrl_ctx->rsvd2[i], i);
482 dma += field_size; 520 dma += field_size;
483 } 521 }
522
523 if (csz)
524 dbg_rsvd64(xhci, (u64 *)ctrl_ctx, dma);
484 } 525 }
526
527 slot_ctx = xhci_get_slot_ctx(xhci, ctx);
528 xhci_dbg_slot_ctx(xhci, ctx);
529 xhci_dbg_ep_ctx(xhci, ctx, last_ep);
485} 530}
diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c
index dba3e07ccd0..816c39caca1 100644
--- a/drivers/usb/host/xhci-hcd.c
+++ b/drivers/usb/host/xhci-hcd.c
@@ -103,7 +103,10 @@ int xhci_reset(struct xhci_hcd *xhci)
103 u32 state; 103 u32 state;
104 104
105 state = xhci_readl(xhci, &xhci->op_regs->status); 105 state = xhci_readl(xhci, &xhci->op_regs->status);
106 BUG_ON((state & STS_HALT) == 0); 106 if ((state & STS_HALT) == 0) {
107 xhci_warn(xhci, "Host controller not halted, aborting reset.\n");
108 return 0;
109 }
107 110
108 xhci_dbg(xhci, "// Reset the HC\n"); 111 xhci_dbg(xhci, "// Reset the HC\n");
109 command = xhci_readl(xhci, &xhci->op_regs->command); 112 command = xhci_readl(xhci, &xhci->op_regs->command);
@@ -226,6 +229,7 @@ int xhci_init(struct usb_hcd *hcd)
226static void xhci_work(struct xhci_hcd *xhci) 229static void xhci_work(struct xhci_hcd *xhci)
227{ 230{
228 u32 temp; 231 u32 temp;
232 u64 temp_64;
229 233
230 /* 234 /*
231 * Clear the op reg interrupt status first, 235 * Clear the op reg interrupt status first,
@@ -248,9 +252,9 @@ static void xhci_work(struct xhci_hcd *xhci)
248 /* FIXME this should be a delayed service routine that clears the EHB */ 252 /* FIXME this should be a delayed service routine that clears the EHB */
249 xhci_handle_event(xhci); 253 xhci_handle_event(xhci);
250 254
251 /* Clear the event handler busy flag; the event ring should be empty. */ 255 /* Clear the event handler busy flag (RW1C); the event ring should be empty. */
252 temp = xhci_readl(xhci, &xhci->ir_set->erst_dequeue[0]); 256 temp_64 = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue);
253 xhci_writel(xhci, temp & ~ERST_EHB, &xhci->ir_set->erst_dequeue[0]); 257 xhci_write_64(xhci, temp_64 | ERST_EHB, &xhci->ir_set->erst_dequeue);
254 /* Flush posted writes -- FIXME is this necessary? */ 258 /* Flush posted writes -- FIXME is this necessary? */
255 xhci_readl(xhci, &xhci->ir_set->irq_pending); 259 xhci_readl(xhci, &xhci->ir_set->irq_pending);
256} 260}
@@ -266,19 +270,34 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd)
266{ 270{
267 struct xhci_hcd *xhci = hcd_to_xhci(hcd); 271 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
268 u32 temp, temp2; 272 u32 temp, temp2;
273 union xhci_trb *trb;
269 274
270 spin_lock(&xhci->lock); 275 spin_lock(&xhci->lock);
276 trb = xhci->event_ring->dequeue;
271 /* Check if the xHC generated the interrupt, or the irq is shared */ 277 /* Check if the xHC generated the interrupt, or the irq is shared */
272 temp = xhci_readl(xhci, &xhci->op_regs->status); 278 temp = xhci_readl(xhci, &xhci->op_regs->status);
273 temp2 = xhci_readl(xhci, &xhci->ir_set->irq_pending); 279 temp2 = xhci_readl(xhci, &xhci->ir_set->irq_pending);
280 if (temp == 0xffffffff && temp2 == 0xffffffff)
281 goto hw_died;
282
274 if (!(temp & STS_EINT) && !ER_IRQ_PENDING(temp2)) { 283 if (!(temp & STS_EINT) && !ER_IRQ_PENDING(temp2)) {
275 spin_unlock(&xhci->lock); 284 spin_unlock(&xhci->lock);
276 return IRQ_NONE; 285 return IRQ_NONE;
277 } 286 }
287 xhci_dbg(xhci, "op reg status = %08x\n", temp);
288 xhci_dbg(xhci, "ir set irq_pending = %08x\n", temp2);
289 xhci_dbg(xhci, "Event ring dequeue ptr:\n");
290 xhci_dbg(xhci, "@%llx %08x %08x %08x %08x\n",
291 (unsigned long long)xhci_trb_virt_to_dma(xhci->event_ring->deq_seg, trb),
292 lower_32_bits(trb->link.segment_ptr),
293 upper_32_bits(trb->link.segment_ptr),
294 (unsigned int) trb->link.intr_target,
295 (unsigned int) trb->link.control);
278 296
279 if (temp & STS_FATAL) { 297 if (temp & STS_FATAL) {
280 xhci_warn(xhci, "WARNING: Host System Error\n"); 298 xhci_warn(xhci, "WARNING: Host System Error\n");
281 xhci_halt(xhci); 299 xhci_halt(xhci);
300hw_died:
282 xhci_to_hcd(xhci)->state = HC_STATE_HALT; 301 xhci_to_hcd(xhci)->state = HC_STATE_HALT;
283 spin_unlock(&xhci->lock); 302 spin_unlock(&xhci->lock);
284 return -ESHUTDOWN; 303 return -ESHUTDOWN;
@@ -295,6 +314,7 @@ void xhci_event_ring_work(unsigned long arg)
295{ 314{
296 unsigned long flags; 315 unsigned long flags;
297 int temp; 316 int temp;
317 u64 temp_64;
298 struct xhci_hcd *xhci = (struct xhci_hcd *) arg; 318 struct xhci_hcd *xhci = (struct xhci_hcd *) arg;
299 int i, j; 319 int i, j;
300 320
@@ -311,9 +331,9 @@ void xhci_event_ring_work(unsigned long arg)
311 xhci_dbg(xhci, "Event ring:\n"); 331 xhci_dbg(xhci, "Event ring:\n");
312 xhci_debug_segment(xhci, xhci->event_ring->deq_seg); 332 xhci_debug_segment(xhci, xhci->event_ring->deq_seg);
313 xhci_dbg_ring_ptrs(xhci, xhci->event_ring); 333 xhci_dbg_ring_ptrs(xhci, xhci->event_ring);
314 temp = xhci_readl(xhci, &xhci->ir_set->erst_dequeue[0]); 334 temp_64 = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue);
315 temp &= ERST_PTR_MASK; 335 temp_64 &= ~ERST_PTR_MASK;
316 xhci_dbg(xhci, "ERST deq = 0x%x\n", temp); 336 xhci_dbg(xhci, "ERST deq = 64'h%0lx\n", (long unsigned int) temp_64);
317 xhci_dbg(xhci, "Command ring:\n"); 337 xhci_dbg(xhci, "Command ring:\n");
318 xhci_debug_segment(xhci, xhci->cmd_ring->deq_seg); 338 xhci_debug_segment(xhci, xhci->cmd_ring->deq_seg);
319 xhci_dbg_ring_ptrs(xhci, xhci->cmd_ring); 339 xhci_dbg_ring_ptrs(xhci, xhci->cmd_ring);
@@ -356,6 +376,7 @@ void xhci_event_ring_work(unsigned long arg)
356int xhci_run(struct usb_hcd *hcd) 376int xhci_run(struct usb_hcd *hcd)
357{ 377{
358 u32 temp; 378 u32 temp;
379 u64 temp_64;
359 struct xhci_hcd *xhci = hcd_to_xhci(hcd); 380 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
360 void (*doorbell)(struct xhci_hcd *) = NULL; 381 void (*doorbell)(struct xhci_hcd *) = NULL;
361 382
@@ -382,6 +403,20 @@ int xhci_run(struct usb_hcd *hcd)
382 add_timer(&xhci->event_ring_timer); 403 add_timer(&xhci->event_ring_timer);
383#endif 404#endif
384 405
406 xhci_dbg(xhci, "Command ring memory map follows:\n");
407 xhci_debug_ring(xhci, xhci->cmd_ring);
408 xhci_dbg_ring_ptrs(xhci, xhci->cmd_ring);
409 xhci_dbg_cmd_ptrs(xhci);
410
411 xhci_dbg(xhci, "ERST memory map follows:\n");
412 xhci_dbg_erst(xhci, &xhci->erst);
413 xhci_dbg(xhci, "Event ring:\n");
414 xhci_debug_ring(xhci, xhci->event_ring);
415 xhci_dbg_ring_ptrs(xhci, xhci->event_ring);
416 temp_64 = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue);
417 temp_64 &= ~ERST_PTR_MASK;
418 xhci_dbg(xhci, "ERST deq = 64'h%0lx\n", (long unsigned int) temp_64);
419
385 xhci_dbg(xhci, "// Set the interrupt modulation register\n"); 420 xhci_dbg(xhci, "// Set the interrupt modulation register\n");
386 temp = xhci_readl(xhci, &xhci->ir_set->irq_control); 421 temp = xhci_readl(xhci, &xhci->ir_set->irq_control);
387 temp &= ~ER_IRQ_INTERVAL_MASK; 422 temp &= ~ER_IRQ_INTERVAL_MASK;
@@ -406,22 +441,6 @@ int xhci_run(struct usb_hcd *hcd)
406 if (NUM_TEST_NOOPS > 0) 441 if (NUM_TEST_NOOPS > 0)
407 doorbell = xhci_setup_one_noop(xhci); 442 doorbell = xhci_setup_one_noop(xhci);
408 443
409 xhci_dbg(xhci, "Command ring memory map follows:\n");
410 xhci_debug_ring(xhci, xhci->cmd_ring);
411 xhci_dbg_ring_ptrs(xhci, xhci->cmd_ring);
412 xhci_dbg_cmd_ptrs(xhci);
413
414 xhci_dbg(xhci, "ERST memory map follows:\n");
415 xhci_dbg_erst(xhci, &xhci->erst);
416 xhci_dbg(xhci, "Event ring:\n");
417 xhci_debug_ring(xhci, xhci->event_ring);
418 xhci_dbg_ring_ptrs(xhci, xhci->event_ring);
419 temp = xhci_readl(xhci, &xhci->ir_set->erst_dequeue[0]);
420 temp &= ERST_PTR_MASK;
421 xhci_dbg(xhci, "ERST deq = 0x%x\n", temp);
422 temp = xhci_readl(xhci, &xhci->ir_set->erst_dequeue[1]);
423 xhci_dbg(xhci, "ERST deq upper = 0x%x\n", temp);
424
425 temp = xhci_readl(xhci, &xhci->op_regs->command); 444 temp = xhci_readl(xhci, &xhci->op_regs->command);
426 temp |= (CMD_RUN); 445 temp |= (CMD_RUN);
427 xhci_dbg(xhci, "// Turn on HC, cmd = 0x%x.\n", 446 xhci_dbg(xhci, "// Turn on HC, cmd = 0x%x.\n",
@@ -601,10 +620,13 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags)
601 goto exit; 620 goto exit;
602 } 621 }
603 if (usb_endpoint_xfer_control(&urb->ep->desc)) 622 if (usb_endpoint_xfer_control(&urb->ep->desc))
604 ret = xhci_queue_ctrl_tx(xhci, mem_flags, urb, 623 /* We have a spinlock and interrupts disabled, so we must pass
624 * atomic context to this function, which may allocate memory.
625 */
626 ret = xhci_queue_ctrl_tx(xhci, GFP_ATOMIC, urb,
605 slot_id, ep_index); 627 slot_id, ep_index);
606 else if (usb_endpoint_xfer_bulk(&urb->ep->desc)) 628 else if (usb_endpoint_xfer_bulk(&urb->ep->desc))
607 ret = xhci_queue_bulk_tx(xhci, mem_flags, urb, 629 ret = xhci_queue_bulk_tx(xhci, GFP_ATOMIC, urb,
608 slot_id, ep_index); 630 slot_id, ep_index);
609 else 631 else
610 ret = -EINVAL; 632 ret = -EINVAL;
@@ -661,8 +683,12 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
661 goto done; 683 goto done;
662 684
663 xhci_dbg(xhci, "Cancel URB %p\n", urb); 685 xhci_dbg(xhci, "Cancel URB %p\n", urb);
686 xhci_dbg(xhci, "Event ring:\n");
687 xhci_debug_ring(xhci, xhci->event_ring);
664 ep_index = xhci_get_endpoint_index(&urb->ep->desc); 688 ep_index = xhci_get_endpoint_index(&urb->ep->desc);
665 ep_ring = xhci->devs[urb->dev->slot_id]->ep_rings[ep_index]; 689 ep_ring = xhci->devs[urb->dev->slot_id]->ep_rings[ep_index];
690 xhci_dbg(xhci, "Endpoint ring:\n");
691 xhci_debug_ring(xhci, ep_ring);
666 td = (struct xhci_td *) urb->hcpriv; 692 td = (struct xhci_td *) urb->hcpriv;
667 693
668 ep_ring->cancels_pending++; 694 ep_ring->cancels_pending++;
@@ -696,7 +722,9 @@ int xhci_drop_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
696 struct usb_host_endpoint *ep) 722 struct usb_host_endpoint *ep)
697{ 723{
698 struct xhci_hcd *xhci; 724 struct xhci_hcd *xhci;
699 struct xhci_device_control *in_ctx; 725 struct xhci_container_ctx *in_ctx, *out_ctx;
726 struct xhci_input_control_ctx *ctrl_ctx;
727 struct xhci_slot_ctx *slot_ctx;
700 unsigned int last_ctx; 728 unsigned int last_ctx;
701 unsigned int ep_index; 729 unsigned int ep_index;
702 struct xhci_ep_ctx *ep_ctx; 730 struct xhci_ep_ctx *ep_ctx;
@@ -724,31 +752,34 @@ int xhci_drop_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
724 } 752 }
725 753
726 in_ctx = xhci->devs[udev->slot_id]->in_ctx; 754 in_ctx = xhci->devs[udev->slot_id]->in_ctx;
755 out_ctx = xhci->devs[udev->slot_id]->out_ctx;
756 ctrl_ctx = xhci_get_input_control_ctx(xhci, in_ctx);
727 ep_index = xhci_get_endpoint_index(&ep->desc); 757 ep_index = xhci_get_endpoint_index(&ep->desc);
728 ep_ctx = &xhci->devs[udev->slot_id]->out_ctx->ep[ep_index]; 758 ep_ctx = xhci_get_ep_ctx(xhci, out_ctx, ep_index);
729 /* If the HC already knows the endpoint is disabled, 759 /* If the HC already knows the endpoint is disabled,
730 * or the HCD has noted it is disabled, ignore this request 760 * or the HCD has noted it is disabled, ignore this request
731 */ 761 */
732 if ((ep_ctx->ep_info & EP_STATE_MASK) == EP_STATE_DISABLED || 762 if ((ep_ctx->ep_info & EP_STATE_MASK) == EP_STATE_DISABLED ||
733 in_ctx->drop_flags & xhci_get_endpoint_flag(&ep->desc)) { 763 ctrl_ctx->drop_flags & xhci_get_endpoint_flag(&ep->desc)) {
734 xhci_warn(xhci, "xHCI %s called with disabled ep %p\n", 764 xhci_warn(xhci, "xHCI %s called with disabled ep %p\n",
735 __func__, ep); 765 __func__, ep);
736 return 0; 766 return 0;
737 } 767 }
738 768
739 in_ctx->drop_flags |= drop_flag; 769 ctrl_ctx->drop_flags |= drop_flag;
740 new_drop_flags = in_ctx->drop_flags; 770 new_drop_flags = ctrl_ctx->drop_flags;
741 771
742 in_ctx->add_flags = ~drop_flag; 772 ctrl_ctx->add_flags = ~drop_flag;
743 new_add_flags = in_ctx->add_flags; 773 new_add_flags = ctrl_ctx->add_flags;
744 774
745 last_ctx = xhci_last_valid_endpoint(in_ctx->add_flags); 775 last_ctx = xhci_last_valid_endpoint(ctrl_ctx->add_flags);
776 slot_ctx = xhci_get_slot_ctx(xhci, in_ctx);
746 /* Update the last valid endpoint context, if we deleted the last one */ 777 /* Update the last valid endpoint context, if we deleted the last one */
747 if ((in_ctx->slot.dev_info & LAST_CTX_MASK) > LAST_CTX(last_ctx)) { 778 if ((slot_ctx->dev_info & LAST_CTX_MASK) > LAST_CTX(last_ctx)) {
748 in_ctx->slot.dev_info &= ~LAST_CTX_MASK; 779 slot_ctx->dev_info &= ~LAST_CTX_MASK;
749 in_ctx->slot.dev_info |= LAST_CTX(last_ctx); 780 slot_ctx->dev_info |= LAST_CTX(last_ctx);
750 } 781 }
751 new_slot_info = in_ctx->slot.dev_info; 782 new_slot_info = slot_ctx->dev_info;
752 783
753 xhci_endpoint_zero(xhci, xhci->devs[udev->slot_id], ep); 784 xhci_endpoint_zero(xhci, xhci->devs[udev->slot_id], ep);
754 785
@@ -778,17 +809,22 @@ int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
778 struct usb_host_endpoint *ep) 809 struct usb_host_endpoint *ep)
779{ 810{
780 struct xhci_hcd *xhci; 811 struct xhci_hcd *xhci;
781 struct xhci_device_control *in_ctx; 812 struct xhci_container_ctx *in_ctx, *out_ctx;
782 unsigned int ep_index; 813 unsigned int ep_index;
783 struct xhci_ep_ctx *ep_ctx; 814 struct xhci_ep_ctx *ep_ctx;
815 struct xhci_slot_ctx *slot_ctx;
816 struct xhci_input_control_ctx *ctrl_ctx;
784 u32 added_ctxs; 817 u32 added_ctxs;
785 unsigned int last_ctx; 818 unsigned int last_ctx;
786 u32 new_add_flags, new_drop_flags, new_slot_info; 819 u32 new_add_flags, new_drop_flags, new_slot_info;
787 int ret = 0; 820 int ret = 0;
788 821
789 ret = xhci_check_args(hcd, udev, ep, 1, __func__); 822 ret = xhci_check_args(hcd, udev, ep, 1, __func__);
790 if (ret <= 0) 823 if (ret <= 0) {
824 /* So we won't queue a reset ep command for a root hub */
825 ep->hcpriv = NULL;
791 return ret; 826 return ret;
827 }
792 xhci = hcd_to_xhci(hcd); 828 xhci = hcd_to_xhci(hcd);
793 829
794 added_ctxs = xhci_get_endpoint_flag(&ep->desc); 830 added_ctxs = xhci_get_endpoint_flag(&ep->desc);
@@ -810,12 +846,14 @@ int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
810 } 846 }
811 847
812 in_ctx = xhci->devs[udev->slot_id]->in_ctx; 848 in_ctx = xhci->devs[udev->slot_id]->in_ctx;
849 out_ctx = xhci->devs[udev->slot_id]->out_ctx;
850 ctrl_ctx = xhci_get_input_control_ctx(xhci, in_ctx);
813 ep_index = xhci_get_endpoint_index(&ep->desc); 851 ep_index = xhci_get_endpoint_index(&ep->desc);
814 ep_ctx = &xhci->devs[udev->slot_id]->out_ctx->ep[ep_index]; 852 ep_ctx = xhci_get_ep_ctx(xhci, out_ctx, ep_index);
815 /* If the HCD has already noted the endpoint is enabled, 853 /* If the HCD has already noted the endpoint is enabled,
816 * ignore this request. 854 * ignore this request.
817 */ 855 */
818 if (in_ctx->add_flags & xhci_get_endpoint_flag(&ep->desc)) { 856 if (ctrl_ctx->add_flags & xhci_get_endpoint_flag(&ep->desc)) {
819 xhci_warn(xhci, "xHCI %s called with enabled ep %p\n", 857 xhci_warn(xhci, "xHCI %s called with enabled ep %p\n",
820 __func__, ep); 858 __func__, ep);
821 return 0; 859 return 0;
@@ -833,8 +871,8 @@ int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
833 return -ENOMEM; 871 return -ENOMEM;
834 } 872 }
835 873
836 in_ctx->add_flags |= added_ctxs; 874 ctrl_ctx->add_flags |= added_ctxs;
837 new_add_flags = in_ctx->add_flags; 875 new_add_flags = ctrl_ctx->add_flags;
838 876
839 /* If xhci_endpoint_disable() was called for this endpoint, but the 877 /* If xhci_endpoint_disable() was called for this endpoint, but the
840 * xHC hasn't been notified yet through the check_bandwidth() call, 878 * xHC hasn't been notified yet through the check_bandwidth() call,
@@ -842,14 +880,18 @@ int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
842 * descriptors. We must drop and re-add this endpoint, so we leave the 880 * descriptors. We must drop and re-add this endpoint, so we leave the
843 * drop flags alone. 881 * drop flags alone.
844 */ 882 */
845 new_drop_flags = in_ctx->drop_flags; 883 new_drop_flags = ctrl_ctx->drop_flags;
846 884
885 slot_ctx = xhci_get_slot_ctx(xhci, in_ctx);
847 /* Update the last valid endpoint context, if we just added one past */ 886 /* Update the last valid endpoint context, if we just added one past */
848 if ((in_ctx->slot.dev_info & LAST_CTX_MASK) < LAST_CTX(last_ctx)) { 887 if ((slot_ctx->dev_info & LAST_CTX_MASK) < LAST_CTX(last_ctx)) {
849 in_ctx->slot.dev_info &= ~LAST_CTX_MASK; 888 slot_ctx->dev_info &= ~LAST_CTX_MASK;
850 in_ctx->slot.dev_info |= LAST_CTX(last_ctx); 889 slot_ctx->dev_info |= LAST_CTX(last_ctx);
851 } 890 }
852 new_slot_info = in_ctx->slot.dev_info; 891 new_slot_info = slot_ctx->dev_info;
892
893 /* Store the usb_device pointer for later use */
894 ep->hcpriv = udev;
853 895
854 xhci_dbg(xhci, "add ep 0x%x, slot id %d, new drop flags = %#x, new add flags = %#x, new slot info = %#x\n", 896 xhci_dbg(xhci, "add ep 0x%x, slot id %d, new drop flags = %#x, new add flags = %#x, new slot info = %#x\n",
855 (unsigned int) ep->desc.bEndpointAddress, 897 (unsigned int) ep->desc.bEndpointAddress,
@@ -860,9 +902,11 @@ int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
860 return 0; 902 return 0;
861} 903}
862 904
863static void xhci_zero_in_ctx(struct xhci_virt_device *virt_dev) 905static void xhci_zero_in_ctx(struct xhci_hcd *xhci, struct xhci_virt_device *virt_dev)
864{ 906{
907 struct xhci_input_control_ctx *ctrl_ctx;
865 struct xhci_ep_ctx *ep_ctx; 908 struct xhci_ep_ctx *ep_ctx;
909 struct xhci_slot_ctx *slot_ctx;
866 int i; 910 int i;
867 911
868 /* When a device's add flag and drop flag are zero, any subsequent 912 /* When a device's add flag and drop flag are zero, any subsequent
@@ -870,17 +914,18 @@ static void xhci_zero_in_ctx(struct xhci_virt_device *virt_dev)
870 * untouched. Make sure we don't leave any old state in the input 914 * untouched. Make sure we don't leave any old state in the input
871 * endpoint contexts. 915 * endpoint contexts.
872 */ 916 */
873 virt_dev->in_ctx->drop_flags = 0; 917 ctrl_ctx = xhci_get_input_control_ctx(xhci, virt_dev->in_ctx);
874 virt_dev->in_ctx->add_flags = 0; 918 ctrl_ctx->drop_flags = 0;
875 virt_dev->in_ctx->slot.dev_info &= ~LAST_CTX_MASK; 919 ctrl_ctx->add_flags = 0;
920 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->in_ctx);
921 slot_ctx->dev_info &= ~LAST_CTX_MASK;
876 /* Endpoint 0 is always valid */ 922 /* Endpoint 0 is always valid */
877 virt_dev->in_ctx->slot.dev_info |= LAST_CTX(1); 923 slot_ctx->dev_info |= LAST_CTX(1);
878 for (i = 1; i < 31; ++i) { 924 for (i = 1; i < 31; ++i) {
879 ep_ctx = &virt_dev->in_ctx->ep[i]; 925 ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, i);
880 ep_ctx->ep_info = 0; 926 ep_ctx->ep_info = 0;
881 ep_ctx->ep_info2 = 0; 927 ep_ctx->ep_info2 = 0;
882 ep_ctx->deq[0] = 0; 928 ep_ctx->deq = 0;
883 ep_ctx->deq[1] = 0;
884 ep_ctx->tx_info = 0; 929 ep_ctx->tx_info = 0;
885 } 930 }
886} 931}
@@ -903,6 +948,8 @@ int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev)
903 unsigned long flags; 948 unsigned long flags;
904 struct xhci_hcd *xhci; 949 struct xhci_hcd *xhci;
905 struct xhci_virt_device *virt_dev; 950 struct xhci_virt_device *virt_dev;
951 struct xhci_input_control_ctx *ctrl_ctx;
952 struct xhci_slot_ctx *slot_ctx;
906 953
907 ret = xhci_check_args(hcd, udev, NULL, 0, __func__); 954 ret = xhci_check_args(hcd, udev, NULL, 0, __func__);
908 if (ret <= 0) 955 if (ret <= 0)
@@ -918,16 +965,18 @@ int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev)
918 virt_dev = xhci->devs[udev->slot_id]; 965 virt_dev = xhci->devs[udev->slot_id];
919 966
920 /* See section 4.6.6 - A0 = 1; A1 = D0 = D1 = 0 */ 967 /* See section 4.6.6 - A0 = 1; A1 = D0 = D1 = 0 */
921 virt_dev->in_ctx->add_flags |= SLOT_FLAG; 968 ctrl_ctx = xhci_get_input_control_ctx(xhci, virt_dev->in_ctx);
922 virt_dev->in_ctx->add_flags &= ~EP0_FLAG; 969 ctrl_ctx->add_flags |= SLOT_FLAG;
923 virt_dev->in_ctx->drop_flags &= ~SLOT_FLAG; 970 ctrl_ctx->add_flags &= ~EP0_FLAG;
924 virt_dev->in_ctx->drop_flags &= ~EP0_FLAG; 971 ctrl_ctx->drop_flags &= ~SLOT_FLAG;
972 ctrl_ctx->drop_flags &= ~EP0_FLAG;
925 xhci_dbg(xhci, "New Input Control Context:\n"); 973 xhci_dbg(xhci, "New Input Control Context:\n");
926 xhci_dbg_ctx(xhci, virt_dev->in_ctx, virt_dev->in_ctx_dma, 974 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->in_ctx);
927 LAST_CTX_TO_EP_NUM(virt_dev->in_ctx->slot.dev_info)); 975 xhci_dbg_ctx(xhci, virt_dev->in_ctx,
976 LAST_CTX_TO_EP_NUM(slot_ctx->dev_info));
928 977
929 spin_lock_irqsave(&xhci->lock, flags); 978 spin_lock_irqsave(&xhci->lock, flags);
930 ret = xhci_queue_configure_endpoint(xhci, virt_dev->in_ctx_dma, 979 ret = xhci_queue_configure_endpoint(xhci, virt_dev->in_ctx->dma,
931 udev->slot_id); 980 udev->slot_id);
932 if (ret < 0) { 981 if (ret < 0) {
933 spin_unlock_irqrestore(&xhci->lock, flags); 982 spin_unlock_irqrestore(&xhci->lock, flags);
@@ -982,10 +1031,10 @@ int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev)
982 } 1031 }
983 1032
984 xhci_dbg(xhci, "Output context after successful config ep cmd:\n"); 1033 xhci_dbg(xhci, "Output context after successful config ep cmd:\n");
985 xhci_dbg_ctx(xhci, virt_dev->out_ctx, virt_dev->out_ctx_dma, 1034 xhci_dbg_ctx(xhci, virt_dev->out_ctx,
986 LAST_CTX_TO_EP_NUM(virt_dev->in_ctx->slot.dev_info)); 1035 LAST_CTX_TO_EP_NUM(slot_ctx->dev_info));
987 1036
988 xhci_zero_in_ctx(virt_dev); 1037 xhci_zero_in_ctx(xhci, virt_dev);
989 /* Free any old rings */ 1038 /* Free any old rings */
990 for (i = 1; i < 31; ++i) { 1039 for (i = 1; i < 31; ++i) {
991 if (virt_dev->new_ep_rings[i]) { 1040 if (virt_dev->new_ep_rings[i]) {
@@ -1023,7 +1072,67 @@ void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev)
1023 virt_dev->new_ep_rings[i] = NULL; 1072 virt_dev->new_ep_rings[i] = NULL;
1024 } 1073 }
1025 } 1074 }
1026 xhci_zero_in_ctx(virt_dev); 1075 xhci_zero_in_ctx(xhci, virt_dev);
1076}
1077
1078/* Deal with stalled endpoints. The core should have sent the control message
1079 * to clear the halt condition. However, we need to make the xHCI hardware
1080 * reset its sequence number, since a device will expect a sequence number of
1081 * zero after the halt condition is cleared.
1082 * Context: in_interrupt
1083 */
1084void xhci_endpoint_reset(struct usb_hcd *hcd,
1085 struct usb_host_endpoint *ep)
1086{
1087 struct xhci_hcd *xhci;
1088 struct usb_device *udev;
1089 unsigned int ep_index;
1090 unsigned long flags;
1091 int ret;
1092 struct xhci_dequeue_state deq_state;
1093 struct xhci_ring *ep_ring;
1094
1095 xhci = hcd_to_xhci(hcd);
1096 udev = (struct usb_device *) ep->hcpriv;
1097 /* Called with a root hub endpoint (or an endpoint that wasn't added
1098 * with xhci_add_endpoint()
1099 */
1100 if (!ep->hcpriv)
1101 return;
1102 ep_index = xhci_get_endpoint_index(&ep->desc);
1103 ep_ring = xhci->devs[udev->slot_id]->ep_rings[ep_index];
1104 if (!ep_ring->stopped_td) {
1105 xhci_dbg(xhci, "Endpoint 0x%x not halted, refusing to reset.\n",
1106 ep->desc.bEndpointAddress);
1107 return;
1108 }
1109
1110 xhci_dbg(xhci, "Queueing reset endpoint command\n");
1111 spin_lock_irqsave(&xhci->lock, flags);
1112 ret = xhci_queue_reset_ep(xhci, udev->slot_id, ep_index);
1113 /*
1114 * Can't change the ring dequeue pointer until it's transitioned to the
1115 * stopped state, which is only upon a successful reset endpoint
1116 * command. Better hope that last command worked!
1117 */
1118 if (!ret) {
1119 xhci_dbg(xhci, "Cleaning up stalled endpoint ring\n");
1120 /* We need to move the HW's dequeue pointer past this TD,
1121 * or it will attempt to resend it on the next doorbell ring.
1122 */
1123 xhci_find_new_dequeue_state(xhci, udev->slot_id,
1124 ep_index, ep_ring->stopped_td, &deq_state);
1125 xhci_dbg(xhci, "Queueing new dequeue state\n");
1126 xhci_queue_new_dequeue_state(xhci, ep_ring,
1127 udev->slot_id,
1128 ep_index, &deq_state);
1129 kfree(ep_ring->stopped_td);
1130 xhci_ring_cmd_db(xhci);
1131 }
1132 spin_unlock_irqrestore(&xhci->lock, flags);
1133
1134 if (ret)
1135 xhci_warn(xhci, "FIXME allocate a new ring segment\n");
1027} 1136}
1028 1137
1029/* 1138/*
@@ -1120,7 +1229,9 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)
1120 struct xhci_virt_device *virt_dev; 1229 struct xhci_virt_device *virt_dev;
1121 int ret = 0; 1230 int ret = 0;
1122 struct xhci_hcd *xhci = hcd_to_xhci(hcd); 1231 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
1123 u32 temp; 1232 struct xhci_slot_ctx *slot_ctx;
1233 struct xhci_input_control_ctx *ctrl_ctx;
1234 u64 temp_64;
1124 1235
1125 if (!udev->slot_id) { 1236 if (!udev->slot_id) {
1126 xhci_dbg(xhci, "Bad Slot ID %d\n", udev->slot_id); 1237 xhci_dbg(xhci, "Bad Slot ID %d\n", udev->slot_id);
@@ -1133,10 +1244,12 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)
1133 if (!udev->config) 1244 if (!udev->config)
1134 xhci_setup_addressable_virt_dev(xhci, udev); 1245 xhci_setup_addressable_virt_dev(xhci, udev);
1135 /* Otherwise, assume the core has the device configured how it wants */ 1246 /* Otherwise, assume the core has the device configured how it wants */
1247 xhci_dbg(xhci, "Slot ID %d Input Context:\n", udev->slot_id);
1248 xhci_dbg_ctx(xhci, virt_dev->in_ctx, 2);
1136 1249
1137 spin_lock_irqsave(&xhci->lock, flags); 1250 spin_lock_irqsave(&xhci->lock, flags);
1138 ret = xhci_queue_address_device(xhci, virt_dev->in_ctx_dma, 1251 ret = xhci_queue_address_device(xhci, virt_dev->in_ctx->dma,
1139 udev->slot_id); 1252 udev->slot_id);
1140 if (ret) { 1253 if (ret) {
1141 spin_unlock_irqrestore(&xhci->lock, flags); 1254 spin_unlock_irqrestore(&xhci->lock, flags);
1142 xhci_dbg(xhci, "FIXME: allocate a command ring segment\n"); 1255 xhci_dbg(xhci, "FIXME: allocate a command ring segment\n");
@@ -1176,41 +1289,37 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)
1176 default: 1289 default:
1177 xhci_err(xhci, "ERROR: unexpected command completion " 1290 xhci_err(xhci, "ERROR: unexpected command completion "
1178 "code 0x%x.\n", virt_dev->cmd_status); 1291 "code 0x%x.\n", virt_dev->cmd_status);
1292 xhci_dbg(xhci, "Slot ID %d Output Context:\n", udev->slot_id);
1293 xhci_dbg_ctx(xhci, virt_dev->out_ctx, 2);
1179 ret = -EINVAL; 1294 ret = -EINVAL;
1180 break; 1295 break;
1181 } 1296 }
1182 if (ret) { 1297 if (ret) {
1183 return ret; 1298 return ret;
1184 } 1299 }
1185 temp = xhci_readl(xhci, &xhci->op_regs->dcbaa_ptr[0]); 1300 temp_64 = xhci_read_64(xhci, &xhci->op_regs->dcbaa_ptr);
1186 xhci_dbg(xhci, "Op regs DCBAA ptr[0] = %#08x\n", temp); 1301 xhci_dbg(xhci, "Op regs DCBAA ptr = %#016llx\n", temp_64);
1187 temp = xhci_readl(xhci, &xhci->op_regs->dcbaa_ptr[1]); 1302 xhci_dbg(xhci, "Slot ID %d dcbaa entry @%p = %#016llx\n",
1188 xhci_dbg(xhci, "Op regs DCBAA ptr[1] = %#08x\n", temp);
1189 xhci_dbg(xhci, "Slot ID %d dcbaa entry[0] @%p = %#08x\n",
1190 udev->slot_id,
1191 &xhci->dcbaa->dev_context_ptrs[2*udev->slot_id],
1192 xhci->dcbaa->dev_context_ptrs[2*udev->slot_id]);
1193 xhci_dbg(xhci, "Slot ID %d dcbaa entry[1] @%p = %#08x\n",
1194 udev->slot_id, 1303 udev->slot_id,
1195 &xhci->dcbaa->dev_context_ptrs[2*udev->slot_id+1], 1304 &xhci->dcbaa->dev_context_ptrs[udev->slot_id],
1196 xhci->dcbaa->dev_context_ptrs[2*udev->slot_id+1]); 1305 (unsigned long long)
1306 xhci->dcbaa->dev_context_ptrs[udev->slot_id]);
1197 xhci_dbg(xhci, "Output Context DMA address = %#08llx\n", 1307 xhci_dbg(xhci, "Output Context DMA address = %#08llx\n",
1198 (unsigned long long)virt_dev->out_ctx_dma); 1308 (unsigned long long)virt_dev->out_ctx->dma);
1199 xhci_dbg(xhci, "Slot ID %d Input Context:\n", udev->slot_id); 1309 xhci_dbg(xhci, "Slot ID %d Input Context:\n", udev->slot_id);
1200 xhci_dbg_ctx(xhci, virt_dev->in_ctx, virt_dev->in_ctx_dma, 2); 1310 xhci_dbg_ctx(xhci, virt_dev->in_ctx, 2);
1201 xhci_dbg(xhci, "Slot ID %d Output Context:\n", udev->slot_id); 1311 xhci_dbg(xhci, "Slot ID %d Output Context:\n", udev->slot_id);
1202 xhci_dbg_ctx(xhci, virt_dev->out_ctx, virt_dev->out_ctx_dma, 2); 1312 xhci_dbg_ctx(xhci, virt_dev->out_ctx, 2);
1203 /* 1313 /*
1204 * USB core uses address 1 for the roothubs, so we add one to the 1314 * USB core uses address 1 for the roothubs, so we add one to the
1205 * address given back to us by the HC. 1315 * address given back to us by the HC.
1206 */ 1316 */
1207 udev->devnum = (virt_dev->out_ctx->slot.dev_state & DEV_ADDR_MASK) + 1; 1317 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->out_ctx);
1318 udev->devnum = (slot_ctx->dev_state & DEV_ADDR_MASK) + 1;
1208 /* Zero the input context control for later use */ 1319 /* Zero the input context control for later use */
1209 virt_dev->in_ctx->add_flags = 0; 1320 ctrl_ctx = xhci_get_input_control_ctx(xhci, virt_dev->in_ctx);
1210 virt_dev->in_ctx->drop_flags = 0; 1321 ctrl_ctx->add_flags = 0;
1211 /* Mirror flags in the output context for future ep enable/disable */ 1322 ctrl_ctx->drop_flags = 0;
1212 virt_dev->out_ctx->add_flags = SLOT_FLAG | EP0_FLAG;
1213 virt_dev->out_ctx->drop_flags = 0;
1214 1323
1215 xhci_dbg(xhci, "Device address = %d\n", udev->devnum); 1324 xhci_dbg(xhci, "Device address = %d\n", udev->devnum);
1216 /* XXX Meh, not sure if anyone else but choose_address uses this. */ 1325 /* XXX Meh, not sure if anyone else but choose_address uses this. */
@@ -1252,7 +1361,6 @@ static int __init xhci_hcd_init(void)
1252 /* xhci_device_control has eight fields, and also 1361 /* xhci_device_control has eight fields, and also
1253 * embeds one xhci_slot_ctx and 31 xhci_ep_ctx 1362 * embeds one xhci_slot_ctx and 31 xhci_ep_ctx
1254 */ 1363 */
1255 BUILD_BUG_ON(sizeof(struct xhci_device_control) != (8+8+8*31)*32/8);
1256 BUILD_BUG_ON(sizeof(struct xhci_stream_ctx) != 4*32/8); 1364 BUILD_BUG_ON(sizeof(struct xhci_stream_ctx) != 4*32/8);
1257 BUILD_BUG_ON(sizeof(union xhci_trb) != 4*32/8); 1365 BUILD_BUG_ON(sizeof(union xhci_trb) != 4*32/8);
1258 BUILD_BUG_ON(sizeof(struct xhci_erst_entry) != 4*32/8); 1366 BUILD_BUG_ON(sizeof(struct xhci_erst_entry) != 4*32/8);
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index c8a72de1c50..e6b9a1c6002 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -88,7 +88,7 @@ static void xhci_link_segments(struct xhci_hcd *xhci, struct xhci_segment *prev,
88 return; 88 return;
89 prev->next = next; 89 prev->next = next;
90 if (link_trbs) { 90 if (link_trbs) {
91 prev->trbs[TRBS_PER_SEGMENT-1].link.segment_ptr[0] = next->dma; 91 prev->trbs[TRBS_PER_SEGMENT-1].link.segment_ptr = next->dma;
92 92
93 /* Set the last TRB in the segment to have a TRB type ID of Link TRB */ 93 /* Set the last TRB in the segment to have a TRB type ID of Link TRB */
94 val = prev->trbs[TRBS_PER_SEGMENT-1].link.control; 94 val = prev->trbs[TRBS_PER_SEGMENT-1].link.control;
@@ -189,6 +189,63 @@ fail:
189 return 0; 189 return 0;
190} 190}
191 191
192#define CTX_SIZE(_hcc) (HCC_64BYTE_CONTEXT(_hcc) ? 64 : 32)
193
194struct xhci_container_ctx *xhci_alloc_container_ctx(struct xhci_hcd *xhci,
195 int type, gfp_t flags)
196{
197 struct xhci_container_ctx *ctx = kzalloc(sizeof(*ctx), flags);
198 if (!ctx)
199 return NULL;
200
201 BUG_ON((type != XHCI_CTX_TYPE_DEVICE) && (type != XHCI_CTX_TYPE_INPUT));
202 ctx->type = type;
203 ctx->size = HCC_64BYTE_CONTEXT(xhci->hcc_params) ? 2048 : 1024;
204 if (type == XHCI_CTX_TYPE_INPUT)
205 ctx->size += CTX_SIZE(xhci->hcc_params);
206
207 ctx->bytes = dma_pool_alloc(xhci->device_pool, flags, &ctx->dma);
208 memset(ctx->bytes, 0, ctx->size);
209 return ctx;
210}
211
212void xhci_free_container_ctx(struct xhci_hcd *xhci,
213 struct xhci_container_ctx *ctx)
214{
215 dma_pool_free(xhci->device_pool, ctx->bytes, ctx->dma);
216 kfree(ctx);
217}
218
219struct xhci_input_control_ctx *xhci_get_input_control_ctx(struct xhci_hcd *xhci,
220 struct xhci_container_ctx *ctx)
221{
222 BUG_ON(ctx->type != XHCI_CTX_TYPE_INPUT);
223 return (struct xhci_input_control_ctx *)ctx->bytes;
224}
225
226struct xhci_slot_ctx *xhci_get_slot_ctx(struct xhci_hcd *xhci,
227 struct xhci_container_ctx *ctx)
228{
229 if (ctx->type == XHCI_CTX_TYPE_DEVICE)
230 return (struct xhci_slot_ctx *)ctx->bytes;
231
232 return (struct xhci_slot_ctx *)
233 (ctx->bytes + CTX_SIZE(xhci->hcc_params));
234}
235
236struct xhci_ep_ctx *xhci_get_ep_ctx(struct xhci_hcd *xhci,
237 struct xhci_container_ctx *ctx,
238 unsigned int ep_index)
239{
240 /* increment ep index by offset of start of ep ctx array */
241 ep_index++;
242 if (ctx->type == XHCI_CTX_TYPE_INPUT)
243 ep_index++;
244
245 return (struct xhci_ep_ctx *)
246 (ctx->bytes + (ep_index * CTX_SIZE(xhci->hcc_params)));
247}
248
192/* All the xhci_tds in the ring's TD list should be freed at this point */ 249/* All the xhci_tds in the ring's TD list should be freed at this point */
193void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id) 250void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id)
194{ 251{
@@ -200,8 +257,7 @@ void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id)
200 return; 257 return;
201 258
202 dev = xhci->devs[slot_id]; 259 dev = xhci->devs[slot_id];
203 xhci->dcbaa->dev_context_ptrs[2*slot_id] = 0; 260 xhci->dcbaa->dev_context_ptrs[slot_id] = 0;
204 xhci->dcbaa->dev_context_ptrs[2*slot_id + 1] = 0;
205 if (!dev) 261 if (!dev)
206 return; 262 return;
207 263
@@ -210,11 +266,10 @@ void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id)
210 xhci_ring_free(xhci, dev->ep_rings[i]); 266 xhci_ring_free(xhci, dev->ep_rings[i]);
211 267
212 if (dev->in_ctx) 268 if (dev->in_ctx)
213 dma_pool_free(xhci->device_pool, 269 xhci_free_container_ctx(xhci, dev->in_ctx);
214 dev->in_ctx, dev->in_ctx_dma);
215 if (dev->out_ctx) 270 if (dev->out_ctx)
216 dma_pool_free(xhci->device_pool, 271 xhci_free_container_ctx(xhci, dev->out_ctx);
217 dev->out_ctx, dev->out_ctx_dma); 272
218 kfree(xhci->devs[slot_id]); 273 kfree(xhci->devs[slot_id]);
219 xhci->devs[slot_id] = 0; 274 xhci->devs[slot_id] = 0;
220} 275}
@@ -222,7 +277,6 @@ void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id)
222int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id, 277int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id,
223 struct usb_device *udev, gfp_t flags) 278 struct usb_device *udev, gfp_t flags)
224{ 279{
225 dma_addr_t dma;
226 struct xhci_virt_device *dev; 280 struct xhci_virt_device *dev;
227 281
228 /* Slot ID 0 is reserved */ 282 /* Slot ID 0 is reserved */
@@ -236,23 +290,21 @@ int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id,
236 return 0; 290 return 0;
237 dev = xhci->devs[slot_id]; 291 dev = xhci->devs[slot_id];
238 292
239 /* Allocate the (output) device context that will be used in the HC */ 293 /* Allocate the (output) device context that will be used in the HC. */
240 dev->out_ctx = dma_pool_alloc(xhci->device_pool, flags, &dma); 294 dev->out_ctx = xhci_alloc_container_ctx(xhci, XHCI_CTX_TYPE_DEVICE, flags);
241 if (!dev->out_ctx) 295 if (!dev->out_ctx)
242 goto fail; 296 goto fail;
243 dev->out_ctx_dma = dma; 297
244 xhci_dbg(xhci, "Slot %d output ctx = 0x%llx (dma)\n", slot_id, 298 xhci_dbg(xhci, "Slot %d output ctx = 0x%llx (dma)\n", slot_id,
245 (unsigned long long)dma); 299 (unsigned long long)dev->out_ctx->dma);
246 memset(dev->out_ctx, 0, sizeof(*dev->out_ctx));
247 300
248 /* Allocate the (input) device context for address device command */ 301 /* Allocate the (input) device context for address device command */
249 dev->in_ctx = dma_pool_alloc(xhci->device_pool, flags, &dma); 302 dev->in_ctx = xhci_alloc_container_ctx(xhci, XHCI_CTX_TYPE_INPUT, flags);
250 if (!dev->in_ctx) 303 if (!dev->in_ctx)
251 goto fail; 304 goto fail;
252 dev->in_ctx_dma = dma; 305
253 xhci_dbg(xhci, "Slot %d input ctx = 0x%llx (dma)\n", slot_id, 306 xhci_dbg(xhci, "Slot %d input ctx = 0x%llx (dma)\n", slot_id,
254 (unsigned long long)dma); 307 (unsigned long long)dev->in_ctx->dma);
255 memset(dev->in_ctx, 0, sizeof(*dev->in_ctx));
256 308
257 /* Allocate endpoint 0 ring */ 309 /* Allocate endpoint 0 ring */
258 dev->ep_rings[0] = xhci_ring_alloc(xhci, 1, true, flags); 310 dev->ep_rings[0] = xhci_ring_alloc(xhci, 1, true, flags);
@@ -261,17 +313,12 @@ int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id,
261 313
262 init_completion(&dev->cmd_completion); 314 init_completion(&dev->cmd_completion);
263 315
264 /* 316 /* Point to output device context in dcbaa. */
265 * Point to output device context in dcbaa; skip the output control 317 xhci->dcbaa->dev_context_ptrs[slot_id] = dev->out_ctx->dma;
266 * context, which is eight 32 bit fields (or 32 bytes long)
267 */
268 xhci->dcbaa->dev_context_ptrs[2*slot_id] =
269 (u32) dev->out_ctx_dma + (32);
270 xhci_dbg(xhci, "Set slot id %d dcbaa entry %p to 0x%llx\n", 318 xhci_dbg(xhci, "Set slot id %d dcbaa entry %p to 0x%llx\n",
271 slot_id, 319 slot_id,
272 &xhci->dcbaa->dev_context_ptrs[2*slot_id], 320 &xhci->dcbaa->dev_context_ptrs[slot_id],
273 (unsigned long long)dev->out_ctx_dma); 321 (unsigned long long) xhci->dcbaa->dev_context_ptrs[slot_id]);
274 xhci->dcbaa->dev_context_ptrs[2*slot_id + 1] = 0;
275 322
276 return 1; 323 return 1;
277fail: 324fail:
@@ -285,6 +332,8 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud
285 struct xhci_virt_device *dev; 332 struct xhci_virt_device *dev;
286 struct xhci_ep_ctx *ep0_ctx; 333 struct xhci_ep_ctx *ep0_ctx;
287 struct usb_device *top_dev; 334 struct usb_device *top_dev;
335 struct xhci_slot_ctx *slot_ctx;
336 struct xhci_input_control_ctx *ctrl_ctx;
288 337
289 dev = xhci->devs[udev->slot_id]; 338 dev = xhci->devs[udev->slot_id];
290 /* Slot ID 0 is reserved */ 339 /* Slot ID 0 is reserved */
@@ -293,27 +342,29 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud
293 udev->slot_id); 342 udev->slot_id);
294 return -EINVAL; 343 return -EINVAL;
295 } 344 }
296 ep0_ctx = &dev->in_ctx->ep[0]; 345 ep0_ctx = xhci_get_ep_ctx(xhci, dev->in_ctx, 0);
346 ctrl_ctx = xhci_get_input_control_ctx(xhci, dev->in_ctx);
347 slot_ctx = xhci_get_slot_ctx(xhci, dev->in_ctx);
297 348
298 /* 2) New slot context and endpoint 0 context are valid*/ 349 /* 2) New slot context and endpoint 0 context are valid*/
299 dev->in_ctx->add_flags = SLOT_FLAG | EP0_FLAG; 350 ctrl_ctx->add_flags = SLOT_FLAG | EP0_FLAG;
300 351
301 /* 3) Only the control endpoint is valid - one endpoint context */ 352 /* 3) Only the control endpoint is valid - one endpoint context */
302 dev->in_ctx->slot.dev_info |= LAST_CTX(1); 353 slot_ctx->dev_info |= LAST_CTX(1);
303 354
304 switch (udev->speed) { 355 switch (udev->speed) {
305 case USB_SPEED_SUPER: 356 case USB_SPEED_SUPER:
306 dev->in_ctx->slot.dev_info |= (u32) udev->route; 357 slot_ctx->dev_info |= (u32) udev->route;
307 dev->in_ctx->slot.dev_info |= (u32) SLOT_SPEED_SS; 358 slot_ctx->dev_info |= (u32) SLOT_SPEED_SS;
308 break; 359 break;
309 case USB_SPEED_HIGH: 360 case USB_SPEED_HIGH:
310 dev->in_ctx->slot.dev_info |= (u32) SLOT_SPEED_HS; 361 slot_ctx->dev_info |= (u32) SLOT_SPEED_HS;
311 break; 362 break;
312 case USB_SPEED_FULL: 363 case USB_SPEED_FULL:
313 dev->in_ctx->slot.dev_info |= (u32) SLOT_SPEED_FS; 364 slot_ctx->dev_info |= (u32) SLOT_SPEED_FS;
314 break; 365 break;
315 case USB_SPEED_LOW: 366 case USB_SPEED_LOW:
316 dev->in_ctx->slot.dev_info |= (u32) SLOT_SPEED_LS; 367 slot_ctx->dev_info |= (u32) SLOT_SPEED_LS;
317 break; 368 break;
318 case USB_SPEED_VARIABLE: 369 case USB_SPEED_VARIABLE:
319 xhci_dbg(xhci, "FIXME xHCI doesn't support wireless speeds\n"); 370 xhci_dbg(xhci, "FIXME xHCI doesn't support wireless speeds\n");
@@ -327,7 +378,7 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud
327 for (top_dev = udev; top_dev->parent && top_dev->parent->parent; 378 for (top_dev = udev; top_dev->parent && top_dev->parent->parent;
328 top_dev = top_dev->parent) 379 top_dev = top_dev->parent)
329 /* Found device below root hub */; 380 /* Found device below root hub */;
330 dev->in_ctx->slot.dev_info2 |= (u32) ROOT_HUB_PORT(top_dev->portnum); 381 slot_ctx->dev_info2 |= (u32) ROOT_HUB_PORT(top_dev->portnum);
331 xhci_dbg(xhci, "Set root hub portnum to %d\n", top_dev->portnum); 382 xhci_dbg(xhci, "Set root hub portnum to %d\n", top_dev->portnum);
332 383
333 /* Is this a LS/FS device under a HS hub? */ 384 /* Is this a LS/FS device under a HS hub? */
@@ -337,8 +388,8 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud
337 */ 388 */
338 if ((udev->speed == USB_SPEED_LOW || udev->speed == USB_SPEED_FULL) && 389 if ((udev->speed == USB_SPEED_LOW || udev->speed == USB_SPEED_FULL) &&
339 udev->tt) { 390 udev->tt) {
340 dev->in_ctx->slot.tt_info = udev->tt->hub->slot_id; 391 slot_ctx->tt_info = udev->tt->hub->slot_id;
341 dev->in_ctx->slot.tt_info |= udev->ttport << 8; 392 slot_ctx->tt_info |= udev->ttport << 8;
342 } 393 }
343 xhci_dbg(xhci, "udev->tt = %p\n", udev->tt); 394 xhci_dbg(xhci, "udev->tt = %p\n", udev->tt);
344 xhci_dbg(xhci, "udev->ttport = 0x%x\n", udev->ttport); 395 xhci_dbg(xhci, "udev->ttport = 0x%x\n", udev->ttport);
@@ -360,10 +411,9 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud
360 ep0_ctx->ep_info2 |= MAX_BURST(0); 411 ep0_ctx->ep_info2 |= MAX_BURST(0);
361 ep0_ctx->ep_info2 |= ERROR_COUNT(3); 412 ep0_ctx->ep_info2 |= ERROR_COUNT(3);
362 413
363 ep0_ctx->deq[0] = 414 ep0_ctx->deq =
364 dev->ep_rings[0]->first_seg->dma; 415 dev->ep_rings[0]->first_seg->dma;
365 ep0_ctx->deq[0] |= dev->ep_rings[0]->cycle_state; 416 ep0_ctx->deq |= dev->ep_rings[0]->cycle_state;
366 ep0_ctx->deq[1] = 0;
367 417
368 /* Steps 7 and 8 were done in xhci_alloc_virt_device() */ 418 /* Steps 7 and 8 were done in xhci_alloc_virt_device() */
369 419
@@ -470,25 +520,26 @@ int xhci_endpoint_init(struct xhci_hcd *xhci,
470 unsigned int max_burst; 520 unsigned int max_burst;
471 521
472 ep_index = xhci_get_endpoint_index(&ep->desc); 522 ep_index = xhci_get_endpoint_index(&ep->desc);
473 ep_ctx = &virt_dev->in_ctx->ep[ep_index]; 523 ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index);
474 524
475 /* Set up the endpoint ring */ 525 /* Set up the endpoint ring */
476 virt_dev->new_ep_rings[ep_index] = xhci_ring_alloc(xhci, 1, true, mem_flags); 526 virt_dev->new_ep_rings[ep_index] = xhci_ring_alloc(xhci, 1, true, mem_flags);
477 if (!virt_dev->new_ep_rings[ep_index]) 527 if (!virt_dev->new_ep_rings[ep_index])
478 return -ENOMEM; 528 return -ENOMEM;
479 ep_ring = virt_dev->new_ep_rings[ep_index]; 529 ep_ring = virt_dev->new_ep_rings[ep_index];
480 ep_ctx->deq[0] = ep_ring->first_seg->dma | ep_ring->cycle_state; 530 ep_ctx->deq = ep_ring->first_seg->dma | ep_ring->cycle_state;
481 ep_ctx->deq[1] = 0;
482 531
483 ep_ctx->ep_info = xhci_get_endpoint_interval(udev, ep); 532 ep_ctx->ep_info = xhci_get_endpoint_interval(udev, ep);
484 533
485 /* FIXME dig Mult and streams info out of ep companion desc */ 534 /* FIXME dig Mult and streams info out of ep companion desc */
486 535
487 /* Allow 3 retries for everything but isoc */ 536 /* Allow 3 retries for everything but isoc;
537 * error count = 0 means infinite retries.
538 */
488 if (!usb_endpoint_xfer_isoc(&ep->desc)) 539 if (!usb_endpoint_xfer_isoc(&ep->desc))
489 ep_ctx->ep_info2 = ERROR_COUNT(3); 540 ep_ctx->ep_info2 = ERROR_COUNT(3);
490 else 541 else
491 ep_ctx->ep_info2 = ERROR_COUNT(0); 542 ep_ctx->ep_info2 = ERROR_COUNT(1);
492 543
493 ep_ctx->ep_info2 |= xhci_get_endpoint_type(udev, ep); 544 ep_ctx->ep_info2 |= xhci_get_endpoint_type(udev, ep);
494 545
@@ -498,7 +549,12 @@ int xhci_endpoint_init(struct xhci_hcd *xhci,
498 max_packet = ep->desc.wMaxPacketSize; 549 max_packet = ep->desc.wMaxPacketSize;
499 ep_ctx->ep_info2 |= MAX_PACKET(max_packet); 550 ep_ctx->ep_info2 |= MAX_PACKET(max_packet);
500 /* dig out max burst from ep companion desc */ 551 /* dig out max burst from ep companion desc */
501 max_packet = ep->ss_ep_comp->desc.bMaxBurst; 552 if (!ep->ss_ep_comp) {
553 xhci_warn(xhci, "WARN no SS endpoint companion descriptor.\n");
554 max_packet = 0;
555 } else {
556 max_packet = ep->ss_ep_comp->desc.bMaxBurst;
557 }
502 ep_ctx->ep_info2 |= MAX_BURST(max_packet); 558 ep_ctx->ep_info2 |= MAX_BURST(max_packet);
503 break; 559 break;
504 case USB_SPEED_HIGH: 560 case USB_SPEED_HIGH:
@@ -531,18 +587,114 @@ void xhci_endpoint_zero(struct xhci_hcd *xhci,
531 struct xhci_ep_ctx *ep_ctx; 587 struct xhci_ep_ctx *ep_ctx;
532 588
533 ep_index = xhci_get_endpoint_index(&ep->desc); 589 ep_index = xhci_get_endpoint_index(&ep->desc);
534 ep_ctx = &virt_dev->in_ctx->ep[ep_index]; 590 ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index);
535 591
536 ep_ctx->ep_info = 0; 592 ep_ctx->ep_info = 0;
537 ep_ctx->ep_info2 = 0; 593 ep_ctx->ep_info2 = 0;
538 ep_ctx->deq[0] = 0; 594 ep_ctx->deq = 0;
539 ep_ctx->deq[1] = 0;
540 ep_ctx->tx_info = 0; 595 ep_ctx->tx_info = 0;
541 /* Don't free the endpoint ring until the set interface or configuration 596 /* Don't free the endpoint ring until the set interface or configuration
542 * request succeeds. 597 * request succeeds.
543 */ 598 */
544} 599}
545 600
601/* Set up the scratchpad buffer array and scratchpad buffers, if needed. */
602static int scratchpad_alloc(struct xhci_hcd *xhci, gfp_t flags)
603{
604 int i;
605 struct device *dev = xhci_to_hcd(xhci)->self.controller;
606 int num_sp = HCS_MAX_SCRATCHPAD(xhci->hcs_params2);
607
608 xhci_dbg(xhci, "Allocating %d scratchpad buffers\n", num_sp);
609
610 if (!num_sp)
611 return 0;
612
613 xhci->scratchpad = kzalloc(sizeof(*xhci->scratchpad), flags);
614 if (!xhci->scratchpad)
615 goto fail_sp;
616
617 xhci->scratchpad->sp_array =
618 pci_alloc_consistent(to_pci_dev(dev),
619 num_sp * sizeof(u64),
620 &xhci->scratchpad->sp_dma);
621 if (!xhci->scratchpad->sp_array)
622 goto fail_sp2;
623
624 xhci->scratchpad->sp_buffers = kzalloc(sizeof(void *) * num_sp, flags);
625 if (!xhci->scratchpad->sp_buffers)
626 goto fail_sp3;
627
628 xhci->scratchpad->sp_dma_buffers =
629 kzalloc(sizeof(dma_addr_t) * num_sp, flags);
630
631 if (!xhci->scratchpad->sp_dma_buffers)
632 goto fail_sp4;
633
634 xhci->dcbaa->dev_context_ptrs[0] = xhci->scratchpad->sp_dma;
635 for (i = 0; i < num_sp; i++) {
636 dma_addr_t dma;
637 void *buf = pci_alloc_consistent(to_pci_dev(dev),
638 xhci->page_size, &dma);
639 if (!buf)
640 goto fail_sp5;
641
642 xhci->scratchpad->sp_array[i] = dma;
643 xhci->scratchpad->sp_buffers[i] = buf;
644 xhci->scratchpad->sp_dma_buffers[i] = dma;
645 }
646
647 return 0;
648
649 fail_sp5:
650 for (i = i - 1; i >= 0; i--) {
651 pci_free_consistent(to_pci_dev(dev), xhci->page_size,
652 xhci->scratchpad->sp_buffers[i],
653 xhci->scratchpad->sp_dma_buffers[i]);
654 }
655 kfree(xhci->scratchpad->sp_dma_buffers);
656
657 fail_sp4:
658 kfree(xhci->scratchpad->sp_buffers);
659
660 fail_sp3:
661 pci_free_consistent(to_pci_dev(dev), num_sp * sizeof(u64),
662 xhci->scratchpad->sp_array,
663 xhci->scratchpad->sp_dma);
664
665 fail_sp2:
666 kfree(xhci->scratchpad);
667 xhci->scratchpad = NULL;
668
669 fail_sp:
670 return -ENOMEM;
671}
672
673static void scratchpad_free(struct xhci_hcd *xhci)
674{
675 int num_sp;
676 int i;
677 struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller);
678
679 if (!xhci->scratchpad)
680 return;
681
682 num_sp = HCS_MAX_SCRATCHPAD(xhci->hcs_params2);
683
684 for (i = 0; i < num_sp; i++) {
685 pci_free_consistent(pdev, xhci->page_size,
686 xhci->scratchpad->sp_buffers[i],
687 xhci->scratchpad->sp_dma_buffers[i]);
688 }
689 kfree(xhci->scratchpad->sp_dma_buffers);
690 kfree(xhci->scratchpad->sp_buffers);
691 pci_free_consistent(pdev, num_sp * sizeof(u64),
692 xhci->scratchpad->sp_array,
693 xhci->scratchpad->sp_dma);
694 kfree(xhci->scratchpad);
695 xhci->scratchpad = NULL;
696}
697
546void xhci_mem_cleanup(struct xhci_hcd *xhci) 698void xhci_mem_cleanup(struct xhci_hcd *xhci)
547{ 699{
548 struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller); 700 struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller);
@@ -551,10 +703,8 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
551 703
552 /* Free the Event Ring Segment Table and the actual Event Ring */ 704 /* Free the Event Ring Segment Table and the actual Event Ring */
553 xhci_writel(xhci, 0, &xhci->ir_set->erst_size); 705 xhci_writel(xhci, 0, &xhci->ir_set->erst_size);
554 xhci_writel(xhci, 0, &xhci->ir_set->erst_base[0]); 706 xhci_write_64(xhci, 0, &xhci->ir_set->erst_base);
555 xhci_writel(xhci, 0, &xhci->ir_set->erst_base[1]); 707 xhci_write_64(xhci, 0, &xhci->ir_set->erst_dequeue);
556 xhci_writel(xhci, 0, &xhci->ir_set->erst_dequeue[0]);
557 xhci_writel(xhci, 0, &xhci->ir_set->erst_dequeue[1]);
558 size = sizeof(struct xhci_erst_entry)*(xhci->erst.num_entries); 708 size = sizeof(struct xhci_erst_entry)*(xhci->erst.num_entries);
559 if (xhci->erst.entries) 709 if (xhci->erst.entries)
560 pci_free_consistent(pdev, size, 710 pci_free_consistent(pdev, size,
@@ -566,8 +716,7 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
566 xhci->event_ring = NULL; 716 xhci->event_ring = NULL;
567 xhci_dbg(xhci, "Freed event ring\n"); 717 xhci_dbg(xhci, "Freed event ring\n");
568 718
569 xhci_writel(xhci, 0, &xhci->op_regs->cmd_ring[0]); 719 xhci_write_64(xhci, 0, &xhci->op_regs->cmd_ring);
570 xhci_writel(xhci, 0, &xhci->op_regs->cmd_ring[1]);
571 if (xhci->cmd_ring) 720 if (xhci->cmd_ring)
572 xhci_ring_free(xhci, xhci->cmd_ring); 721 xhci_ring_free(xhci, xhci->cmd_ring);
573 xhci->cmd_ring = NULL; 722 xhci->cmd_ring = NULL;
@@ -586,8 +735,7 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
586 xhci->device_pool = NULL; 735 xhci->device_pool = NULL;
587 xhci_dbg(xhci, "Freed device context pool\n"); 736 xhci_dbg(xhci, "Freed device context pool\n");
588 737
589 xhci_writel(xhci, 0, &xhci->op_regs->dcbaa_ptr[0]); 738 xhci_write_64(xhci, 0, &xhci->op_regs->dcbaa_ptr);
590 xhci_writel(xhci, 0, &xhci->op_regs->dcbaa_ptr[1]);
591 if (xhci->dcbaa) 739 if (xhci->dcbaa)
592 pci_free_consistent(pdev, sizeof(*xhci->dcbaa), 740 pci_free_consistent(pdev, sizeof(*xhci->dcbaa),
593 xhci->dcbaa, xhci->dcbaa->dma); 741 xhci->dcbaa, xhci->dcbaa->dma);
@@ -595,6 +743,7 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
595 743
596 xhci->page_size = 0; 744 xhci->page_size = 0;
597 xhci->page_shift = 0; 745 xhci->page_shift = 0;
746 scratchpad_free(xhci);
598} 747}
599 748
600int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) 749int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
@@ -602,6 +751,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
602 dma_addr_t dma; 751 dma_addr_t dma;
603 struct device *dev = xhci_to_hcd(xhci)->self.controller; 752 struct device *dev = xhci_to_hcd(xhci)->self.controller;
604 unsigned int val, val2; 753 unsigned int val, val2;
754 u64 val_64;
605 struct xhci_segment *seg; 755 struct xhci_segment *seg;
606 u32 page_size; 756 u32 page_size;
607 int i; 757 int i;
@@ -647,8 +797,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
647 xhci->dcbaa->dma = dma; 797 xhci->dcbaa->dma = dma;
648 xhci_dbg(xhci, "// Device context base array address = 0x%llx (DMA), %p (virt)\n", 798 xhci_dbg(xhci, "// Device context base array address = 0x%llx (DMA), %p (virt)\n",
649 (unsigned long long)xhci->dcbaa->dma, xhci->dcbaa); 799 (unsigned long long)xhci->dcbaa->dma, xhci->dcbaa);
650 xhci_writel(xhci, dma, &xhci->op_regs->dcbaa_ptr[0]); 800 xhci_write_64(xhci, dma, &xhci->op_regs->dcbaa_ptr);
651 xhci_writel(xhci, (u32) 0, &xhci->op_regs->dcbaa_ptr[1]);
652 801
653 /* 802 /*
654 * Initialize the ring segment pool. The ring must be a contiguous 803 * Initialize the ring segment pool. The ring must be a contiguous
@@ -658,11 +807,10 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
658 */ 807 */
659 xhci->segment_pool = dma_pool_create("xHCI ring segments", dev, 808 xhci->segment_pool = dma_pool_create("xHCI ring segments", dev,
660 SEGMENT_SIZE, 64, xhci->page_size); 809 SEGMENT_SIZE, 64, xhci->page_size);
810
661 /* See Table 46 and Note on Figure 55 */ 811 /* See Table 46 and Note on Figure 55 */
662 /* FIXME support 64-byte contexts */
663 xhci->device_pool = dma_pool_create("xHCI input/output contexts", dev, 812 xhci->device_pool = dma_pool_create("xHCI input/output contexts", dev,
664 sizeof(struct xhci_device_control), 813 2112, 64, xhci->page_size);
665 64, xhci->page_size);
666 if (!xhci->segment_pool || !xhci->device_pool) 814 if (!xhci->segment_pool || !xhci->device_pool)
667 goto fail; 815 goto fail;
668 816
@@ -675,14 +823,12 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
675 (unsigned long long)xhci->cmd_ring->first_seg->dma); 823 (unsigned long long)xhci->cmd_ring->first_seg->dma);
676 824
677 /* Set the address in the Command Ring Control register */ 825 /* Set the address in the Command Ring Control register */
678 val = xhci_readl(xhci, &xhci->op_regs->cmd_ring[0]); 826 val_64 = xhci_read_64(xhci, &xhci->op_regs->cmd_ring);
679 val = (val & ~CMD_RING_ADDR_MASK) | 827 val_64 = (val_64 & (u64) CMD_RING_RSVD_BITS) |
680 (xhci->cmd_ring->first_seg->dma & CMD_RING_ADDR_MASK) | 828 (xhci->cmd_ring->first_seg->dma & (u64) ~CMD_RING_RSVD_BITS) |
681 xhci->cmd_ring->cycle_state; 829 xhci->cmd_ring->cycle_state;
682 xhci_dbg(xhci, "// Setting command ring address low bits to 0x%x\n", val); 830 xhci_dbg(xhci, "// Setting command ring address to 0x%x\n", val);
683 xhci_writel(xhci, val, &xhci->op_regs->cmd_ring[0]); 831 xhci_write_64(xhci, val_64, &xhci->op_regs->cmd_ring);
684 xhci_dbg(xhci, "// Setting command ring address high bits to 0x0\n");
685 xhci_writel(xhci, (u32) 0, &xhci->op_regs->cmd_ring[1]);
686 xhci_dbg_cmd_ptrs(xhci); 832 xhci_dbg_cmd_ptrs(xhci);
687 833
688 val = xhci_readl(xhci, &xhci->cap_regs->db_off); 834 val = xhci_readl(xhci, &xhci->cap_regs->db_off);
@@ -722,8 +868,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
722 /* set ring base address and size for each segment table entry */ 868 /* set ring base address and size for each segment table entry */
723 for (val = 0, seg = xhci->event_ring->first_seg; val < ERST_NUM_SEGS; val++) { 869 for (val = 0, seg = xhci->event_ring->first_seg; val < ERST_NUM_SEGS; val++) {
724 struct xhci_erst_entry *entry = &xhci->erst.entries[val]; 870 struct xhci_erst_entry *entry = &xhci->erst.entries[val];
725 entry->seg_addr[0] = seg->dma; 871 entry->seg_addr = seg->dma;
726 entry->seg_addr[1] = 0;
727 entry->seg_size = TRBS_PER_SEGMENT; 872 entry->seg_size = TRBS_PER_SEGMENT;
728 entry->rsvd = 0; 873 entry->rsvd = 0;
729 seg = seg->next; 874 seg = seg->next;
@@ -741,11 +886,10 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
741 /* set the segment table base address */ 886 /* set the segment table base address */
742 xhci_dbg(xhci, "// Set ERST base address for ir_set 0 = 0x%llx\n", 887 xhci_dbg(xhci, "// Set ERST base address for ir_set 0 = 0x%llx\n",
743 (unsigned long long)xhci->erst.erst_dma_addr); 888 (unsigned long long)xhci->erst.erst_dma_addr);
744 val = xhci_readl(xhci, &xhci->ir_set->erst_base[0]); 889 val_64 = xhci_read_64(xhci, &xhci->ir_set->erst_base);
745 val &= ERST_PTR_MASK; 890 val_64 &= ERST_PTR_MASK;
746 val |= (xhci->erst.erst_dma_addr & ~ERST_PTR_MASK); 891 val_64 |= (xhci->erst.erst_dma_addr & (u64) ~ERST_PTR_MASK);
747 xhci_writel(xhci, val, &xhci->ir_set->erst_base[0]); 892 xhci_write_64(xhci, val_64, &xhci->ir_set->erst_base);
748 xhci_writel(xhci, 0, &xhci->ir_set->erst_base[1]);
749 893
750 /* Set the event ring dequeue address */ 894 /* Set the event ring dequeue address */
751 xhci_set_hc_event_deq(xhci); 895 xhci_set_hc_event_deq(xhci);
@@ -761,7 +905,11 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
761 for (i = 0; i < MAX_HC_SLOTS; ++i) 905 for (i = 0; i < MAX_HC_SLOTS; ++i)
762 xhci->devs[i] = 0; 906 xhci->devs[i] = 0;
763 907
908 if (scratchpad_alloc(xhci, flags))
909 goto fail;
910
764 return 0; 911 return 0;
912
765fail: 913fail:
766 xhci_warn(xhci, "Couldn't initialize memory\n"); 914 xhci_warn(xhci, "Couldn't initialize memory\n");
767 xhci_mem_cleanup(xhci); 915 xhci_mem_cleanup(xhci);
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 1462709e26c..592fe7e623f 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -117,6 +117,7 @@ static const struct hc_driver xhci_pci_hc_driver = {
117 .free_dev = xhci_free_dev, 117 .free_dev = xhci_free_dev,
118 .add_endpoint = xhci_add_endpoint, 118 .add_endpoint = xhci_add_endpoint,
119 .drop_endpoint = xhci_drop_endpoint, 119 .drop_endpoint = xhci_drop_endpoint,
120 .endpoint_reset = xhci_endpoint_reset,
120 .check_bandwidth = xhci_check_bandwidth, 121 .check_bandwidth = xhci_check_bandwidth,
121 .reset_bandwidth = xhci_reset_bandwidth, 122 .reset_bandwidth = xhci_reset_bandwidth,
122 .address_device = xhci_address_device, 123 .address_device = xhci_address_device,
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 02d81985c45..aa88a067148 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -135,6 +135,7 @@ static void next_trb(struct xhci_hcd *xhci,
135static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring, bool consumer) 135static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring, bool consumer)
136{ 136{
137 union xhci_trb *next = ++(ring->dequeue); 137 union xhci_trb *next = ++(ring->dequeue);
138 unsigned long long addr;
138 139
139 ring->deq_updates++; 140 ring->deq_updates++;
140 /* Update the dequeue pointer further if that was a link TRB or we're at 141 /* Update the dequeue pointer further if that was a link TRB or we're at
@@ -152,6 +153,13 @@ static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring, bool consumer
152 ring->dequeue = ring->deq_seg->trbs; 153 ring->dequeue = ring->deq_seg->trbs;
153 next = ring->dequeue; 154 next = ring->dequeue;
154 } 155 }
156 addr = (unsigned long long) xhci_trb_virt_to_dma(ring->deq_seg, ring->dequeue);
157 if (ring == xhci->event_ring)
158 xhci_dbg(xhci, "Event ring deq = 0x%llx (DMA)\n", addr);
159 else if (ring == xhci->cmd_ring)
160 xhci_dbg(xhci, "Command ring deq = 0x%llx (DMA)\n", addr);
161 else
162 xhci_dbg(xhci, "Ring deq = 0x%llx (DMA)\n", addr);
155} 163}
156 164
157/* 165/*
@@ -171,6 +179,7 @@ static void inc_enq(struct xhci_hcd *xhci, struct xhci_ring *ring, bool consumer
171{ 179{
172 u32 chain; 180 u32 chain;
173 union xhci_trb *next; 181 union xhci_trb *next;
182 unsigned long long addr;
174 183
175 chain = ring->enqueue->generic.field[3] & TRB_CHAIN; 184 chain = ring->enqueue->generic.field[3] & TRB_CHAIN;
176 next = ++(ring->enqueue); 185 next = ++(ring->enqueue);
@@ -204,6 +213,13 @@ static void inc_enq(struct xhci_hcd *xhci, struct xhci_ring *ring, bool consumer
204 ring->enqueue = ring->enq_seg->trbs; 213 ring->enqueue = ring->enq_seg->trbs;
205 next = ring->enqueue; 214 next = ring->enqueue;
206 } 215 }
216 addr = (unsigned long long) xhci_trb_virt_to_dma(ring->enq_seg, ring->enqueue);
217 if (ring == xhci->event_ring)
218 xhci_dbg(xhci, "Event ring enq = 0x%llx (DMA)\n", addr);
219 else if (ring == xhci->cmd_ring)
220 xhci_dbg(xhci, "Command ring enq = 0x%llx (DMA)\n", addr);
221 else
222 xhci_dbg(xhci, "Ring enq = 0x%llx (DMA)\n", addr);
207} 223}
208 224
209/* 225/*
@@ -237,7 +253,7 @@ static int room_on_ring(struct xhci_hcd *xhci, struct xhci_ring *ring,
237 253
238void xhci_set_hc_event_deq(struct xhci_hcd *xhci) 254void xhci_set_hc_event_deq(struct xhci_hcd *xhci)
239{ 255{
240 u32 temp; 256 u64 temp;
241 dma_addr_t deq; 257 dma_addr_t deq;
242 258
243 deq = xhci_trb_virt_to_dma(xhci->event_ring->deq_seg, 259 deq = xhci_trb_virt_to_dma(xhci->event_ring->deq_seg,
@@ -246,13 +262,15 @@ void xhci_set_hc_event_deq(struct xhci_hcd *xhci)
246 xhci_warn(xhci, "WARN something wrong with SW event ring " 262 xhci_warn(xhci, "WARN something wrong with SW event ring "
247 "dequeue ptr.\n"); 263 "dequeue ptr.\n");
248 /* Update HC event ring dequeue pointer */ 264 /* Update HC event ring dequeue pointer */
249 temp = xhci_readl(xhci, &xhci->ir_set->erst_dequeue[0]); 265 temp = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue);
250 temp &= ERST_PTR_MASK; 266 temp &= ERST_PTR_MASK;
251 if (!in_interrupt()) 267 /* Don't clear the EHB bit (which is RW1C) because
252 xhci_dbg(xhci, "// Write event ring dequeue pointer\n"); 268 * there might be more events to service.
253 xhci_writel(xhci, 0, &xhci->ir_set->erst_dequeue[1]); 269 */
254 xhci_writel(xhci, (deq & ~ERST_PTR_MASK) | temp, 270 temp &= ~ERST_EHB;
255 &xhci->ir_set->erst_dequeue[0]); 271 xhci_dbg(xhci, "// Write event ring dequeue pointer, preserving EHB bit\n");
272 xhci_write_64(xhci, ((u64) deq & (u64) ~ERST_PTR_MASK) | temp,
273 &xhci->ir_set->erst_dequeue);
256} 274}
257 275
258/* Ring the host controller doorbell after placing a command on the ring */ 276/* Ring the host controller doorbell after placing a command on the ring */
@@ -279,7 +297,8 @@ static void ring_ep_doorbell(struct xhci_hcd *xhci,
279 /* Don't ring the doorbell for this endpoint if there are pending 297 /* Don't ring the doorbell for this endpoint if there are pending
280 * cancellations because the we don't want to interrupt processing. 298 * cancellations because the we don't want to interrupt processing.
281 */ 299 */
282 if (!ep_ring->cancels_pending && !(ep_ring->state & SET_DEQ_PENDING)) { 300 if (!ep_ring->cancels_pending && !(ep_ring->state & SET_DEQ_PENDING)
301 && !(ep_ring->state & EP_HALTED)) {
283 field = xhci_readl(xhci, db_addr) & DB_MASK; 302 field = xhci_readl(xhci, db_addr) & DB_MASK;
284 xhci_writel(xhci, field | EPI_TO_DB(ep_index), db_addr); 303 xhci_writel(xhci, field | EPI_TO_DB(ep_index), db_addr);
285 /* Flush PCI posted writes - FIXME Matthew Wilcox says this 304 /* Flush PCI posted writes - FIXME Matthew Wilcox says this
@@ -316,12 +335,6 @@ static struct xhci_segment *find_trb_seg(
316 return cur_seg; 335 return cur_seg;
317} 336}
318 337
319struct dequeue_state {
320 struct xhci_segment *new_deq_seg;
321 union xhci_trb *new_deq_ptr;
322 int new_cycle_state;
323};
324
325/* 338/*
326 * Move the xHC's endpoint ring dequeue pointer past cur_td. 339 * Move the xHC's endpoint ring dequeue pointer past cur_td.
327 * Record the new state of the xHC's endpoint ring dequeue segment, 340 * Record the new state of the xHC's endpoint ring dequeue segment,
@@ -336,24 +349,30 @@ struct dequeue_state {
336 * - Finally we move the dequeue state one TRB further, toggling the cycle bit 349 * - Finally we move the dequeue state one TRB further, toggling the cycle bit
337 * if we've moved it past a link TRB with the toggle cycle bit set. 350 * if we've moved it past a link TRB with the toggle cycle bit set.
338 */ 351 */
339static void find_new_dequeue_state(struct xhci_hcd *xhci, 352void xhci_find_new_dequeue_state(struct xhci_hcd *xhci,
340 unsigned int slot_id, unsigned int ep_index, 353 unsigned int slot_id, unsigned int ep_index,
341 struct xhci_td *cur_td, struct dequeue_state *state) 354 struct xhci_td *cur_td, struct xhci_dequeue_state *state)
342{ 355{
343 struct xhci_virt_device *dev = xhci->devs[slot_id]; 356 struct xhci_virt_device *dev = xhci->devs[slot_id];
344 struct xhci_ring *ep_ring = dev->ep_rings[ep_index]; 357 struct xhci_ring *ep_ring = dev->ep_rings[ep_index];
345 struct xhci_generic_trb *trb; 358 struct xhci_generic_trb *trb;
359 struct xhci_ep_ctx *ep_ctx;
360 dma_addr_t addr;
346 361
347 state->new_cycle_state = 0; 362 state->new_cycle_state = 0;
363 xhci_dbg(xhci, "Finding segment containing stopped TRB.\n");
348 state->new_deq_seg = find_trb_seg(cur_td->start_seg, 364 state->new_deq_seg = find_trb_seg(cur_td->start_seg,
349 ep_ring->stopped_trb, 365 ep_ring->stopped_trb,
350 &state->new_cycle_state); 366 &state->new_cycle_state);
351 if (!state->new_deq_seg) 367 if (!state->new_deq_seg)
352 BUG(); 368 BUG();
353 /* Dig out the cycle state saved by the xHC during the stop ep cmd */ 369 /* Dig out the cycle state saved by the xHC during the stop ep cmd */
354 state->new_cycle_state = 0x1 & dev->out_ctx->ep[ep_index].deq[0]; 370 xhci_dbg(xhci, "Finding endpoint context\n");
371 ep_ctx = xhci_get_ep_ctx(xhci, dev->out_ctx, ep_index);
372 state->new_cycle_state = 0x1 & ep_ctx->deq;
355 373
356 state->new_deq_ptr = cur_td->last_trb; 374 state->new_deq_ptr = cur_td->last_trb;
375 xhci_dbg(xhci, "Finding segment containing last TRB in TD.\n");
357 state->new_deq_seg = find_trb_seg(state->new_deq_seg, 376 state->new_deq_seg = find_trb_seg(state->new_deq_seg,
358 state->new_deq_ptr, 377 state->new_deq_ptr,
359 &state->new_cycle_state); 378 &state->new_cycle_state);
@@ -367,6 +386,12 @@ static void find_new_dequeue_state(struct xhci_hcd *xhci,
367 next_trb(xhci, ep_ring, &state->new_deq_seg, &state->new_deq_ptr); 386 next_trb(xhci, ep_ring, &state->new_deq_seg, &state->new_deq_ptr);
368 387
369 /* Don't update the ring cycle state for the producer (us). */ 388 /* Don't update the ring cycle state for the producer (us). */
389 xhci_dbg(xhci, "New dequeue segment = %p (virtual)\n",
390 state->new_deq_seg);
391 addr = xhci_trb_virt_to_dma(state->new_deq_seg, state->new_deq_ptr);
392 xhci_dbg(xhci, "New dequeue pointer = 0x%llx (DMA)\n",
393 (unsigned long long) addr);
394 xhci_dbg(xhci, "Setting dequeue pointer in internal ring state.\n");
370 ep_ring->dequeue = state->new_deq_ptr; 395 ep_ring->dequeue = state->new_deq_ptr;
371 ep_ring->deq_seg = state->new_deq_seg; 396 ep_ring->deq_seg = state->new_deq_seg;
372} 397}
@@ -416,6 +441,30 @@ static int queue_set_tr_deq(struct xhci_hcd *xhci, int slot_id,
416 unsigned int ep_index, struct xhci_segment *deq_seg, 441 unsigned int ep_index, struct xhci_segment *deq_seg,
417 union xhci_trb *deq_ptr, u32 cycle_state); 442 union xhci_trb *deq_ptr, u32 cycle_state);
418 443
444void xhci_queue_new_dequeue_state(struct xhci_hcd *xhci,
445 struct xhci_ring *ep_ring, unsigned int slot_id,
446 unsigned int ep_index, struct xhci_dequeue_state *deq_state)
447{
448 xhci_dbg(xhci, "Set TR Deq Ptr cmd, new deq seg = %p (0x%llx dma), "
449 "new deq ptr = %p (0x%llx dma), new cycle = %u\n",
450 deq_state->new_deq_seg,
451 (unsigned long long)deq_state->new_deq_seg->dma,
452 deq_state->new_deq_ptr,
453 (unsigned long long)xhci_trb_virt_to_dma(deq_state->new_deq_seg, deq_state->new_deq_ptr),
454 deq_state->new_cycle_state);
455 queue_set_tr_deq(xhci, slot_id, ep_index,
456 deq_state->new_deq_seg,
457 deq_state->new_deq_ptr,
458 (u32) deq_state->new_cycle_state);
459 /* Stop the TD queueing code from ringing the doorbell until
460 * this command completes. The HC won't set the dequeue pointer
461 * if the ring is running, and ringing the doorbell starts the
462 * ring running.
463 */
464 ep_ring->state |= SET_DEQ_PENDING;
465 xhci_ring_cmd_db(xhci);
466}
467
419/* 468/*
420 * When we get a command completion for a Stop Endpoint Command, we need to 469 * When we get a command completion for a Stop Endpoint Command, we need to
421 * unlink any cancelled TDs from the ring. There are two ways to do that: 470 * unlink any cancelled TDs from the ring. There are two ways to do that:
@@ -436,7 +485,7 @@ static void handle_stopped_endpoint(struct xhci_hcd *xhci,
436 struct xhci_td *cur_td = 0; 485 struct xhci_td *cur_td = 0;
437 struct xhci_td *last_unlinked_td; 486 struct xhci_td *last_unlinked_td;
438 487
439 struct dequeue_state deq_state; 488 struct xhci_dequeue_state deq_state;
440#ifdef CONFIG_USB_HCD_STAT 489#ifdef CONFIG_USB_HCD_STAT
441 ktime_t stop_time = ktime_get(); 490 ktime_t stop_time = ktime_get();
442#endif 491#endif
@@ -464,7 +513,7 @@ static void handle_stopped_endpoint(struct xhci_hcd *xhci,
464 * move the xHC endpoint ring dequeue pointer past this TD. 513 * move the xHC endpoint ring dequeue pointer past this TD.
465 */ 514 */
466 if (cur_td == ep_ring->stopped_td) 515 if (cur_td == ep_ring->stopped_td)
467 find_new_dequeue_state(xhci, slot_id, ep_index, cur_td, 516 xhci_find_new_dequeue_state(xhci, slot_id, ep_index, cur_td,
468 &deq_state); 517 &deq_state);
469 else 518 else
470 td_to_noop(xhci, ep_ring, cur_td); 519 td_to_noop(xhci, ep_ring, cur_td);
@@ -480,24 +529,8 @@ static void handle_stopped_endpoint(struct xhci_hcd *xhci,
480 529
481 /* If necessary, queue a Set Transfer Ring Dequeue Pointer command */ 530 /* If necessary, queue a Set Transfer Ring Dequeue Pointer command */
482 if (deq_state.new_deq_ptr && deq_state.new_deq_seg) { 531 if (deq_state.new_deq_ptr && deq_state.new_deq_seg) {
483 xhci_dbg(xhci, "Set TR Deq Ptr cmd, new deq seg = %p (0x%llx dma), " 532 xhci_queue_new_dequeue_state(xhci, ep_ring,
484 "new deq ptr = %p (0x%llx dma), new cycle = %u\n", 533 slot_id, ep_index, &deq_state);
485 deq_state.new_deq_seg,
486 (unsigned long long)deq_state.new_deq_seg->dma,
487 deq_state.new_deq_ptr,
488 (unsigned long long)xhci_trb_virt_to_dma(deq_state.new_deq_seg, deq_state.new_deq_ptr),
489 deq_state.new_cycle_state);
490 queue_set_tr_deq(xhci, slot_id, ep_index,
491 deq_state.new_deq_seg,
492 deq_state.new_deq_ptr,
493 (u32) deq_state.new_cycle_state);
494 /* Stop the TD queueing code from ringing the doorbell until
495 * this command completes. The HC won't set the dequeue pointer
496 * if the ring is running, and ringing the doorbell starts the
497 * ring running.
498 */
499 ep_ring->state |= SET_DEQ_PENDING;
500 xhci_ring_cmd_db(xhci);
501 } else { 534 } else {
502 /* Otherwise just ring the doorbell to restart the ring */ 535 /* Otherwise just ring the doorbell to restart the ring */
503 ring_ep_doorbell(xhci, slot_id, ep_index); 536 ring_ep_doorbell(xhci, slot_id, ep_index);
@@ -551,11 +584,15 @@ static void handle_set_deq_completion(struct xhci_hcd *xhci,
551 unsigned int ep_index; 584 unsigned int ep_index;
552 struct xhci_ring *ep_ring; 585 struct xhci_ring *ep_ring;
553 struct xhci_virt_device *dev; 586 struct xhci_virt_device *dev;
587 struct xhci_ep_ctx *ep_ctx;
588 struct xhci_slot_ctx *slot_ctx;
554 589
555 slot_id = TRB_TO_SLOT_ID(trb->generic.field[3]); 590 slot_id = TRB_TO_SLOT_ID(trb->generic.field[3]);
556 ep_index = TRB_TO_EP_INDEX(trb->generic.field[3]); 591 ep_index = TRB_TO_EP_INDEX(trb->generic.field[3]);
557 dev = xhci->devs[slot_id]; 592 dev = xhci->devs[slot_id];
558 ep_ring = dev->ep_rings[ep_index]; 593 ep_ring = dev->ep_rings[ep_index];
594 ep_ctx = xhci_get_ep_ctx(xhci, dev->out_ctx, ep_index);
595 slot_ctx = xhci_get_slot_ctx(xhci, dev->out_ctx);
559 596
560 if (GET_COMP_CODE(event->status) != COMP_SUCCESS) { 597 if (GET_COMP_CODE(event->status) != COMP_SUCCESS) {
561 unsigned int ep_state; 598 unsigned int ep_state;
@@ -569,9 +606,9 @@ static void handle_set_deq_completion(struct xhci_hcd *xhci,
569 case COMP_CTX_STATE: 606 case COMP_CTX_STATE:
570 xhci_warn(xhci, "WARN Set TR Deq Ptr cmd failed due " 607 xhci_warn(xhci, "WARN Set TR Deq Ptr cmd failed due "
571 "to incorrect slot or ep state.\n"); 608 "to incorrect slot or ep state.\n");
572 ep_state = dev->out_ctx->ep[ep_index].ep_info; 609 ep_state = ep_ctx->ep_info;
573 ep_state &= EP_STATE_MASK; 610 ep_state &= EP_STATE_MASK;
574 slot_state = dev->out_ctx->slot.dev_state; 611 slot_state = slot_ctx->dev_state;
575 slot_state = GET_SLOT_STATE(slot_state); 612 slot_state = GET_SLOT_STATE(slot_state);
576 xhci_dbg(xhci, "Slot state = %u, EP state = %u\n", 613 xhci_dbg(xhci, "Slot state = %u, EP state = %u\n",
577 slot_state, ep_state); 614 slot_state, ep_state);
@@ -593,16 +630,33 @@ static void handle_set_deq_completion(struct xhci_hcd *xhci,
593 * cancelling URBs, which might not be an error... 630 * cancelling URBs, which might not be an error...
594 */ 631 */
595 } else { 632 } else {
596 xhci_dbg(xhci, "Successful Set TR Deq Ptr cmd, deq[0] = 0x%x, " 633 xhci_dbg(xhci, "Successful Set TR Deq Ptr cmd, deq = @%08llx\n",
597 "deq[1] = 0x%x.\n", 634 ep_ctx->deq);
598 dev->out_ctx->ep[ep_index].deq[0],
599 dev->out_ctx->ep[ep_index].deq[1]);
600 } 635 }
601 636
602 ep_ring->state &= ~SET_DEQ_PENDING; 637 ep_ring->state &= ~SET_DEQ_PENDING;
603 ring_ep_doorbell(xhci, slot_id, ep_index); 638 ring_ep_doorbell(xhci, slot_id, ep_index);
604} 639}
605 640
641static void handle_reset_ep_completion(struct xhci_hcd *xhci,
642 struct xhci_event_cmd *event,
643 union xhci_trb *trb)
644{
645 int slot_id;
646 unsigned int ep_index;
647
648 slot_id = TRB_TO_SLOT_ID(trb->generic.field[3]);
649 ep_index = TRB_TO_EP_INDEX(trb->generic.field[3]);
650 /* This command will only fail if the endpoint wasn't halted,
651 * but we don't care.
652 */
653 xhci_dbg(xhci, "Ignoring reset ep completion code of %u\n",
654 (unsigned int) GET_COMP_CODE(event->status));
655
656 /* Clear our internal halted state and restart the ring */
657 xhci->devs[slot_id]->ep_rings[ep_index]->state &= ~EP_HALTED;
658 ring_ep_doorbell(xhci, slot_id, ep_index);
659}
606 660
607static void handle_cmd_completion(struct xhci_hcd *xhci, 661static void handle_cmd_completion(struct xhci_hcd *xhci,
608 struct xhci_event_cmd *event) 662 struct xhci_event_cmd *event)
@@ -611,7 +665,7 @@ static void handle_cmd_completion(struct xhci_hcd *xhci,
611 u64 cmd_dma; 665 u64 cmd_dma;
612 dma_addr_t cmd_dequeue_dma; 666 dma_addr_t cmd_dequeue_dma;
613 667
614 cmd_dma = (((u64) event->cmd_trb[1]) << 32) + event->cmd_trb[0]; 668 cmd_dma = event->cmd_trb;
615 cmd_dequeue_dma = xhci_trb_virt_to_dma(xhci->cmd_ring->deq_seg, 669 cmd_dequeue_dma = xhci_trb_virt_to_dma(xhci->cmd_ring->deq_seg,
616 xhci->cmd_ring->dequeue); 670 xhci->cmd_ring->dequeue);
617 /* Is the command ring deq ptr out of sync with the deq seg ptr? */ 671 /* Is the command ring deq ptr out of sync with the deq seg ptr? */
@@ -653,6 +707,9 @@ static void handle_cmd_completion(struct xhci_hcd *xhci,
653 case TRB_TYPE(TRB_CMD_NOOP): 707 case TRB_TYPE(TRB_CMD_NOOP):
654 ++xhci->noops_handled; 708 ++xhci->noops_handled;
655 break; 709 break;
710 case TRB_TYPE(TRB_RESET_EP):
711 handle_reset_ep_completion(xhci, event, xhci->cmd_ring->dequeue);
712 break;
656 default: 713 default:
657 /* Skip over unknown commands on the event ring */ 714 /* Skip over unknown commands on the event ring */
658 xhci->error_bitmask |= 1 << 6; 715 xhci->error_bitmask |= 1 << 6;
@@ -756,7 +813,9 @@ static int handle_tx_event(struct xhci_hcd *xhci,
756 union xhci_trb *event_trb; 813 union xhci_trb *event_trb;
757 struct urb *urb = 0; 814 struct urb *urb = 0;
758 int status = -EINPROGRESS; 815 int status = -EINPROGRESS;
816 struct xhci_ep_ctx *ep_ctx;
759 817
818 xhci_dbg(xhci, "In %s\n", __func__);
760 xdev = xhci->devs[TRB_TO_SLOT_ID(event->flags)]; 819 xdev = xhci->devs[TRB_TO_SLOT_ID(event->flags)];
761 if (!xdev) { 820 if (!xdev) {
762 xhci_err(xhci, "ERROR Transfer event pointed to bad slot\n"); 821 xhci_err(xhci, "ERROR Transfer event pointed to bad slot\n");
@@ -765,17 +824,17 @@ static int handle_tx_event(struct xhci_hcd *xhci,
765 824
766 /* Endpoint ID is 1 based, our index is zero based */ 825 /* Endpoint ID is 1 based, our index is zero based */
767 ep_index = TRB_TO_EP_ID(event->flags) - 1; 826 ep_index = TRB_TO_EP_ID(event->flags) - 1;
827 xhci_dbg(xhci, "%s - ep index = %d\n", __func__, ep_index);
768 ep_ring = xdev->ep_rings[ep_index]; 828 ep_ring = xdev->ep_rings[ep_index];
769 if (!ep_ring || (xdev->out_ctx->ep[ep_index].ep_info & EP_STATE_MASK) == EP_STATE_DISABLED) { 829 ep_ctx = xhci_get_ep_ctx(xhci, xdev->out_ctx, ep_index);
830 if (!ep_ring || (ep_ctx->ep_info & EP_STATE_MASK) == EP_STATE_DISABLED) {
770 xhci_err(xhci, "ERROR Transfer event pointed to disabled endpoint\n"); 831 xhci_err(xhci, "ERROR Transfer event pointed to disabled endpoint\n");
771 return -ENODEV; 832 return -ENODEV;
772 } 833 }
773 834
774 event_dma = event->buffer[0]; 835 event_dma = event->buffer;
775 if (event->buffer[1] != 0)
776 xhci_warn(xhci, "WARN ignoring upper 32-bits of 64-bit TRB dma address\n");
777
778 /* This TRB should be in the TD at the head of this ring's TD list */ 836 /* This TRB should be in the TD at the head of this ring's TD list */
837 xhci_dbg(xhci, "%s - checking for list empty\n", __func__);
779 if (list_empty(&ep_ring->td_list)) { 838 if (list_empty(&ep_ring->td_list)) {
780 xhci_warn(xhci, "WARN Event TRB for slot %d ep %d with no TDs queued?\n", 839 xhci_warn(xhci, "WARN Event TRB for slot %d ep %d with no TDs queued?\n",
781 TRB_TO_SLOT_ID(event->flags), ep_index); 840 TRB_TO_SLOT_ID(event->flags), ep_index);
@@ -785,11 +844,14 @@ static int handle_tx_event(struct xhci_hcd *xhci,
785 urb = NULL; 844 urb = NULL;
786 goto cleanup; 845 goto cleanup;
787 } 846 }
847 xhci_dbg(xhci, "%s - getting list entry\n", __func__);
788 td = list_entry(ep_ring->td_list.next, struct xhci_td, td_list); 848 td = list_entry(ep_ring->td_list.next, struct xhci_td, td_list);
789 849
790 /* Is this a TRB in the currently executing TD? */ 850 /* Is this a TRB in the currently executing TD? */
851 xhci_dbg(xhci, "%s - looking for TD\n", __func__);
791 event_seg = trb_in_td(ep_ring->deq_seg, ep_ring->dequeue, 852 event_seg = trb_in_td(ep_ring->deq_seg, ep_ring->dequeue,
792 td->last_trb, event_dma); 853 td->last_trb, event_dma);
854 xhci_dbg(xhci, "%s - found event_seg = %p\n", __func__, event_seg);
793 if (!event_seg) { 855 if (!event_seg) {
794 /* HC is busted, give up! */ 856 /* HC is busted, give up! */
795 xhci_err(xhci, "ERROR Transfer event TRB DMA ptr not part of current TD\n"); 857 xhci_err(xhci, "ERROR Transfer event TRB DMA ptr not part of current TD\n");
@@ -798,10 +860,10 @@ static int handle_tx_event(struct xhci_hcd *xhci,
798 event_trb = &event_seg->trbs[(event_dma - event_seg->dma) / sizeof(*event_trb)]; 860 event_trb = &event_seg->trbs[(event_dma - event_seg->dma) / sizeof(*event_trb)];
799 xhci_dbg(xhci, "Event TRB with TRB type ID %u\n", 861 xhci_dbg(xhci, "Event TRB with TRB type ID %u\n",
800 (unsigned int) (event->flags & TRB_TYPE_BITMASK)>>10); 862 (unsigned int) (event->flags & TRB_TYPE_BITMASK)>>10);
801 xhci_dbg(xhci, "Offset 0x00 (buffer[0]) = 0x%x\n", 863 xhci_dbg(xhci, "Offset 0x00 (buffer lo) = 0x%x\n",
802 (unsigned int) event->buffer[0]); 864 lower_32_bits(event->buffer));
803 xhci_dbg(xhci, "Offset 0x04 (buffer[0]) = 0x%x\n", 865 xhci_dbg(xhci, "Offset 0x04 (buffer hi) = 0x%x\n",
804 (unsigned int) event->buffer[1]); 866 upper_32_bits(event->buffer));
805 xhci_dbg(xhci, "Offset 0x08 (transfer length) = 0x%x\n", 867 xhci_dbg(xhci, "Offset 0x08 (transfer length) = 0x%x\n",
806 (unsigned int) event->transfer_len); 868 (unsigned int) event->transfer_len);
807 xhci_dbg(xhci, "Offset 0x0C (flags) = 0x%x\n", 869 xhci_dbg(xhci, "Offset 0x0C (flags) = 0x%x\n",
@@ -823,6 +885,7 @@ static int handle_tx_event(struct xhci_hcd *xhci,
823 break; 885 break;
824 case COMP_STALL: 886 case COMP_STALL:
825 xhci_warn(xhci, "WARN: Stalled endpoint\n"); 887 xhci_warn(xhci, "WARN: Stalled endpoint\n");
888 ep_ring->state |= EP_HALTED;
826 status = -EPIPE; 889 status = -EPIPE;
827 break; 890 break;
828 case COMP_TRB_ERR: 891 case COMP_TRB_ERR:
@@ -833,6 +896,10 @@ static int handle_tx_event(struct xhci_hcd *xhci,
833 xhci_warn(xhci, "WARN: transfer error on endpoint\n"); 896 xhci_warn(xhci, "WARN: transfer error on endpoint\n");
834 status = -EPROTO; 897 status = -EPROTO;
835 break; 898 break;
899 case COMP_BABBLE:
900 xhci_warn(xhci, "WARN: babble error on endpoint\n");
901 status = -EOVERFLOW;
902 break;
836 case COMP_DB_ERR: 903 case COMP_DB_ERR:
837 xhci_warn(xhci, "WARN: HC couldn't access mem fast enough\n"); 904 xhci_warn(xhci, "WARN: HC couldn't access mem fast enough\n");
838 status = -ENOSR; 905 status = -ENOSR;
@@ -874,15 +941,26 @@ static int handle_tx_event(struct xhci_hcd *xhci,
874 if (event_trb != ep_ring->dequeue) { 941 if (event_trb != ep_ring->dequeue) {
875 /* The event was for the status stage */ 942 /* The event was for the status stage */
876 if (event_trb == td->last_trb) { 943 if (event_trb == td->last_trb) {
877 td->urb->actual_length = 944 if (td->urb->actual_length != 0) {
878 td->urb->transfer_buffer_length; 945 /* Don't overwrite a previously set error code */
946 if (status == -EINPROGRESS || status == 0)
947 /* Did we already see a short data stage? */
948 status = -EREMOTEIO;
949 } else {
950 td->urb->actual_length =
951 td->urb->transfer_buffer_length;
952 }
879 } else { 953 } else {
880 /* Maybe the event was for the data stage? */ 954 /* Maybe the event was for the data stage? */
881 if (GET_COMP_CODE(event->transfer_len) != COMP_STOP_INVAL) 955 if (GET_COMP_CODE(event->transfer_len) != COMP_STOP_INVAL) {
882 /* We didn't stop on a link TRB in the middle */ 956 /* We didn't stop on a link TRB in the middle */
883 td->urb->actual_length = 957 td->urb->actual_length =
884 td->urb->transfer_buffer_length - 958 td->urb->transfer_buffer_length -
885 TRB_LEN(event->transfer_len); 959 TRB_LEN(event->transfer_len);
960 xhci_dbg(xhci, "Waiting for status stage event\n");
961 urb = NULL;
962 goto cleanup;
963 }
886 } 964 }
887 } 965 }
888 } else { 966 } else {
@@ -929,16 +1007,20 @@ static int handle_tx_event(struct xhci_hcd *xhci,
929 TRB_LEN(event->transfer_len)); 1007 TRB_LEN(event->transfer_len));
930 td->urb->actual_length = 0; 1008 td->urb->actual_length = 0;
931 } 1009 }
932 if (td->urb->transfer_flags & URB_SHORT_NOT_OK) 1010 /* Don't overwrite a previously set error code */
933 status = -EREMOTEIO; 1011 if (status == -EINPROGRESS) {
934 else 1012 if (td->urb->transfer_flags & URB_SHORT_NOT_OK)
935 status = 0; 1013 status = -EREMOTEIO;
1014 else
1015 status = 0;
1016 }
936 } else { 1017 } else {
937 td->urb->actual_length = td->urb->transfer_buffer_length; 1018 td->urb->actual_length = td->urb->transfer_buffer_length;
938 /* Ignore a short packet completion if the 1019 /* Ignore a short packet completion if the
939 * untransferred length was zero. 1020 * untransferred length was zero.
940 */ 1021 */
941 status = 0; 1022 if (status == -EREMOTEIO)
1023 status = 0;
942 } 1024 }
943 } else { 1025 } else {
944 /* Slow path - walk the list, starting from the dequeue 1026 /* Slow path - walk the list, starting from the dequeue
@@ -965,19 +1047,30 @@ static int handle_tx_event(struct xhci_hcd *xhci,
965 TRB_LEN(event->transfer_len); 1047 TRB_LEN(event->transfer_len);
966 } 1048 }
967 } 1049 }
968 /* The Endpoint Stop Command completion will take care of
969 * any stopped TDs. A stopped TD may be restarted, so don't update the
970 * ring dequeue pointer or take this TD off any lists yet.
971 */
972 if (GET_COMP_CODE(event->transfer_len) == COMP_STOP_INVAL || 1050 if (GET_COMP_CODE(event->transfer_len) == COMP_STOP_INVAL ||
973 GET_COMP_CODE(event->transfer_len) == COMP_STOP) { 1051 GET_COMP_CODE(event->transfer_len) == COMP_STOP) {
1052 /* The Endpoint Stop Command completion will take care of any
1053 * stopped TDs. A stopped TD may be restarted, so don't update
1054 * the ring dequeue pointer or take this TD off any lists yet.
1055 */
974 ep_ring->stopped_td = td; 1056 ep_ring->stopped_td = td;
975 ep_ring->stopped_trb = event_trb; 1057 ep_ring->stopped_trb = event_trb;
976 } else { 1058 } else {
977 /* Update ring dequeue pointer */ 1059 if (GET_COMP_CODE(event->transfer_len) == COMP_STALL) {
978 while (ep_ring->dequeue != td->last_trb) 1060 /* The transfer is completed from the driver's
1061 * perspective, but we need to issue a set dequeue
1062 * command for this stalled endpoint to move the dequeue
1063 * pointer past the TD. We can't do that here because
1064 * the halt condition must be cleared first.
1065 */
1066 ep_ring->stopped_td = td;
1067 ep_ring->stopped_trb = event_trb;
1068 } else {
1069 /* Update ring dequeue pointer */
1070 while (ep_ring->dequeue != td->last_trb)
1071 inc_deq(xhci, ep_ring, false);
979 inc_deq(xhci, ep_ring, false); 1072 inc_deq(xhci, ep_ring, false);
980 inc_deq(xhci, ep_ring, false); 1073 }
981 1074
982 /* Clean up the endpoint's TD list */ 1075 /* Clean up the endpoint's TD list */
983 urb = td->urb; 1076 urb = td->urb;
@@ -987,7 +1080,10 @@ static int handle_tx_event(struct xhci_hcd *xhci,
987 list_del(&td->cancelled_td_list); 1080 list_del(&td->cancelled_td_list);
988 ep_ring->cancels_pending--; 1081 ep_ring->cancels_pending--;
989 } 1082 }
990 kfree(td); 1083 /* Leave the TD around for the reset endpoint function to use */
1084 if (GET_COMP_CODE(event->transfer_len) != COMP_STALL) {
1085 kfree(td);
1086 }
991 urb->hcpriv = NULL; 1087 urb->hcpriv = NULL;
992 } 1088 }
993cleanup: 1089cleanup:
@@ -997,6 +1093,8 @@ cleanup:
997 /* FIXME for multi-TD URBs (who have buffers bigger than 64MB) */ 1093 /* FIXME for multi-TD URBs (who have buffers bigger than 64MB) */
998 if (urb) { 1094 if (urb) {
999 usb_hcd_unlink_urb_from_ep(xhci_to_hcd(xhci), urb); 1095 usb_hcd_unlink_urb_from_ep(xhci_to_hcd(xhci), urb);
1096 xhci_dbg(xhci, "Giveback URB %p, len = %d, status = %d\n",
1097 urb, td->urb->actual_length, status);
1000 spin_unlock(&xhci->lock); 1098 spin_unlock(&xhci->lock);
1001 usb_hcd_giveback_urb(xhci_to_hcd(xhci), urb, status); 1099 usb_hcd_giveback_urb(xhci_to_hcd(xhci), urb, status);
1002 spin_lock(&xhci->lock); 1100 spin_lock(&xhci->lock);
@@ -1014,6 +1112,7 @@ void xhci_handle_event(struct xhci_hcd *xhci)
1014 int update_ptrs = 1; 1112 int update_ptrs = 1;
1015 int ret; 1113 int ret;
1016 1114
1115 xhci_dbg(xhci, "In %s\n", __func__);
1017 if (!xhci->event_ring || !xhci->event_ring->dequeue) { 1116 if (!xhci->event_ring || !xhci->event_ring->dequeue) {
1018 xhci->error_bitmask |= 1 << 1; 1117 xhci->error_bitmask |= 1 << 1;
1019 return; 1118 return;
@@ -1026,18 +1125,25 @@ void xhci_handle_event(struct xhci_hcd *xhci)
1026 xhci->error_bitmask |= 1 << 2; 1125 xhci->error_bitmask |= 1 << 2;
1027 return; 1126 return;
1028 } 1127 }
1128 xhci_dbg(xhci, "%s - OS owns TRB\n", __func__);
1029 1129
1030 /* FIXME: Handle more event types. */ 1130 /* FIXME: Handle more event types. */
1031 switch ((event->event_cmd.flags & TRB_TYPE_BITMASK)) { 1131 switch ((event->event_cmd.flags & TRB_TYPE_BITMASK)) {
1032 case TRB_TYPE(TRB_COMPLETION): 1132 case TRB_TYPE(TRB_COMPLETION):
1133 xhci_dbg(xhci, "%s - calling handle_cmd_completion\n", __func__);
1033 handle_cmd_completion(xhci, &event->event_cmd); 1134 handle_cmd_completion(xhci, &event->event_cmd);
1135 xhci_dbg(xhci, "%s - returned from handle_cmd_completion\n", __func__);
1034 break; 1136 break;
1035 case TRB_TYPE(TRB_PORT_STATUS): 1137 case TRB_TYPE(TRB_PORT_STATUS):
1138 xhci_dbg(xhci, "%s - calling handle_port_status\n", __func__);
1036 handle_port_status(xhci, event); 1139 handle_port_status(xhci, event);
1140 xhci_dbg(xhci, "%s - returned from handle_port_status\n", __func__);
1037 update_ptrs = 0; 1141 update_ptrs = 0;
1038 break; 1142 break;
1039 case TRB_TYPE(TRB_TRANSFER): 1143 case TRB_TYPE(TRB_TRANSFER):
1144 xhci_dbg(xhci, "%s - calling handle_tx_event\n", __func__);
1040 ret = handle_tx_event(xhci, &event->trans_event); 1145 ret = handle_tx_event(xhci, &event->trans_event);
1146 xhci_dbg(xhci, "%s - returned from handle_tx_event\n", __func__);
1041 if (ret < 0) 1147 if (ret < 0)
1042 xhci->error_bitmask |= 1 << 9; 1148 xhci->error_bitmask |= 1 << 9;
1043 else 1149 else
@@ -1093,13 +1199,13 @@ static int prepare_ring(struct xhci_hcd *xhci, struct xhci_ring *ep_ring,
1093 */ 1199 */
1094 xhci_warn(xhci, "WARN urb submitted to disabled ep\n"); 1200 xhci_warn(xhci, "WARN urb submitted to disabled ep\n");
1095 return -ENOENT; 1201 return -ENOENT;
1096 case EP_STATE_HALTED:
1097 case EP_STATE_ERROR: 1202 case EP_STATE_ERROR:
1098 xhci_warn(xhci, "WARN waiting for halt or error on ep " 1203 xhci_warn(xhci, "WARN waiting for error on ep to be cleared\n");
1099 "to be cleared\n");
1100 /* FIXME event handling code for error needs to clear it */ 1204 /* FIXME event handling code for error needs to clear it */
1101 /* XXX not sure if this should be -ENOENT or not */ 1205 /* XXX not sure if this should be -ENOENT or not */
1102 return -EINVAL; 1206 return -EINVAL;
1207 case EP_STATE_HALTED:
1208 xhci_dbg(xhci, "WARN halted endpoint, queueing URB anyway.\n");
1103 case EP_STATE_STOPPED: 1209 case EP_STATE_STOPPED:
1104 case EP_STATE_RUNNING: 1210 case EP_STATE_RUNNING:
1105 break; 1211 break;
@@ -1128,9 +1234,9 @@ static int prepare_transfer(struct xhci_hcd *xhci,
1128 gfp_t mem_flags) 1234 gfp_t mem_flags)
1129{ 1235{
1130 int ret; 1236 int ret;
1131 1237 struct xhci_ep_ctx *ep_ctx = xhci_get_ep_ctx(xhci, xdev->out_ctx, ep_index);
1132 ret = prepare_ring(xhci, xdev->ep_rings[ep_index], 1238 ret = prepare_ring(xhci, xdev->ep_rings[ep_index],
1133 xdev->out_ctx->ep[ep_index].ep_info & EP_STATE_MASK, 1239 ep_ctx->ep_info & EP_STATE_MASK,
1134 num_trbs, mem_flags); 1240 num_trbs, mem_flags);
1135 if (ret) 1241 if (ret)
1136 return ret; 1242 return ret;
@@ -1285,6 +1391,7 @@ static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
1285 /* Queue the first TRB, even if it's zero-length */ 1391 /* Queue the first TRB, even if it's zero-length */
1286 do { 1392 do {
1287 u32 field = 0; 1393 u32 field = 0;
1394 u32 length_field = 0;
1288 1395
1289 /* Don't change the cycle bit of the first TRB until later */ 1396 /* Don't change the cycle bit of the first TRB until later */
1290 if (first_trb) 1397 if (first_trb)
@@ -1314,10 +1421,13 @@ static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
1314 (unsigned int) (addr + TRB_MAX_BUFF_SIZE) & ~(TRB_MAX_BUFF_SIZE - 1), 1421 (unsigned int) (addr + TRB_MAX_BUFF_SIZE) & ~(TRB_MAX_BUFF_SIZE - 1),
1315 (unsigned int) addr + trb_buff_len); 1422 (unsigned int) addr + trb_buff_len);
1316 } 1423 }
1424 length_field = TRB_LEN(trb_buff_len) |
1425 TD_REMAINDER(urb->transfer_buffer_length - running_total) |
1426 TRB_INTR_TARGET(0);
1317 queue_trb(xhci, ep_ring, false, 1427 queue_trb(xhci, ep_ring, false,
1318 (u32) addr, 1428 lower_32_bits(addr),
1319 (u32) ((u64) addr >> 32), 1429 upper_32_bits(addr),
1320 TRB_LEN(trb_buff_len) | TRB_INTR_TARGET(0), 1430 length_field,
1321 /* We always want to know if the TRB was short, 1431 /* We always want to know if the TRB was short,
1322 * or we won't get an event when it completes. 1432 * or we won't get an event when it completes.
1323 * (Unless we use event data TRBs, which are a 1433 * (Unless we use event data TRBs, which are a
@@ -1365,7 +1475,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
1365 struct xhci_generic_trb *start_trb; 1475 struct xhci_generic_trb *start_trb;
1366 bool first_trb; 1476 bool first_trb;
1367 int start_cycle; 1477 int start_cycle;
1368 u32 field; 1478 u32 field, length_field;
1369 1479
1370 int running_total, trb_buff_len, ret; 1480 int running_total, trb_buff_len, ret;
1371 u64 addr; 1481 u64 addr;
@@ -1443,10 +1553,13 @@ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
1443 td->last_trb = ep_ring->enqueue; 1553 td->last_trb = ep_ring->enqueue;
1444 field |= TRB_IOC; 1554 field |= TRB_IOC;
1445 } 1555 }
1556 length_field = TRB_LEN(trb_buff_len) |
1557 TD_REMAINDER(urb->transfer_buffer_length - running_total) |
1558 TRB_INTR_TARGET(0);
1446 queue_trb(xhci, ep_ring, false, 1559 queue_trb(xhci, ep_ring, false,
1447 (u32) addr, 1560 lower_32_bits(addr),
1448 (u32) ((u64) addr >> 32), 1561 upper_32_bits(addr),
1449 TRB_LEN(trb_buff_len) | TRB_INTR_TARGET(0), 1562 length_field,
1450 /* We always want to know if the TRB was short, 1563 /* We always want to know if the TRB was short,
1451 * or we won't get an event when it completes. 1564 * or we won't get an event when it completes.
1452 * (Unless we use event data TRBs, which are a 1565 * (Unless we use event data TRBs, which are a
@@ -1478,7 +1591,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
1478 struct usb_ctrlrequest *setup; 1591 struct usb_ctrlrequest *setup;
1479 struct xhci_generic_trb *start_trb; 1592 struct xhci_generic_trb *start_trb;
1480 int start_cycle; 1593 int start_cycle;
1481 u32 field; 1594 u32 field, length_field;
1482 struct xhci_td *td; 1595 struct xhci_td *td;
1483 1596
1484 ep_ring = xhci->devs[slot_id]->ep_rings[ep_index]; 1597 ep_ring = xhci->devs[slot_id]->ep_rings[ep_index];
@@ -1528,13 +1641,16 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
1528 1641
1529 /* If there's data, queue data TRBs */ 1642 /* If there's data, queue data TRBs */
1530 field = 0; 1643 field = 0;
1644 length_field = TRB_LEN(urb->transfer_buffer_length) |
1645 TD_REMAINDER(urb->transfer_buffer_length) |
1646 TRB_INTR_TARGET(0);
1531 if (urb->transfer_buffer_length > 0) { 1647 if (urb->transfer_buffer_length > 0) {
1532 if (setup->bRequestType & USB_DIR_IN) 1648 if (setup->bRequestType & USB_DIR_IN)
1533 field |= TRB_DIR_IN; 1649 field |= TRB_DIR_IN;
1534 queue_trb(xhci, ep_ring, false, 1650 queue_trb(xhci, ep_ring, false,
1535 lower_32_bits(urb->transfer_dma), 1651 lower_32_bits(urb->transfer_dma),
1536 upper_32_bits(urb->transfer_dma), 1652 upper_32_bits(urb->transfer_dma),
1537 TRB_LEN(urb->transfer_buffer_length) | TRB_INTR_TARGET(0), 1653 length_field,
1538 /* Event on short tx */ 1654 /* Event on short tx */
1539 field | TRB_ISP | TRB_TYPE(TRB_DATA) | ep_ring->cycle_state); 1655 field | TRB_ISP | TRB_TYPE(TRB_DATA) | ep_ring->cycle_state);
1540 } 1656 }
@@ -1603,7 +1719,8 @@ int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id)
1603int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, 1719int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr,
1604 u32 slot_id) 1720 u32 slot_id)
1605{ 1721{
1606 return queue_command(xhci, in_ctx_ptr, 0, 0, 1722 return queue_command(xhci, lower_32_bits(in_ctx_ptr),
1723 upper_32_bits(in_ctx_ptr), 0,
1607 TRB_TYPE(TRB_ADDR_DEV) | SLOT_ID_FOR_TRB(slot_id)); 1724 TRB_TYPE(TRB_ADDR_DEV) | SLOT_ID_FOR_TRB(slot_id));
1608} 1725}
1609 1726
@@ -1611,7 +1728,8 @@ int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr,
1611int xhci_queue_configure_endpoint(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, 1728int xhci_queue_configure_endpoint(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr,
1612 u32 slot_id) 1729 u32 slot_id)
1613{ 1730{
1614 return queue_command(xhci, in_ctx_ptr, 0, 0, 1731 return queue_command(xhci, lower_32_bits(in_ctx_ptr),
1732 upper_32_bits(in_ctx_ptr), 0,
1615 TRB_TYPE(TRB_CONFIG_EP) | SLOT_ID_FOR_TRB(slot_id)); 1733 TRB_TYPE(TRB_CONFIG_EP) | SLOT_ID_FOR_TRB(slot_id));
1616} 1734}
1617 1735
@@ -1639,10 +1757,23 @@ static int queue_set_tr_deq(struct xhci_hcd *xhci, int slot_id,
1639 u32 type = TRB_TYPE(TRB_SET_DEQ); 1757 u32 type = TRB_TYPE(TRB_SET_DEQ);
1640 1758
1641 addr = xhci_trb_virt_to_dma(deq_seg, deq_ptr); 1759 addr = xhci_trb_virt_to_dma(deq_seg, deq_ptr);
1642 if (addr == 0) 1760 if (addr == 0) {
1643 xhci_warn(xhci, "WARN Cannot submit Set TR Deq Ptr\n"); 1761 xhci_warn(xhci, "WARN Cannot submit Set TR Deq Ptr\n");
1644 xhci_warn(xhci, "WARN deq seg = %p, deq pt = %p\n", 1762 xhci_warn(xhci, "WARN deq seg = %p, deq pt = %p\n",
1645 deq_seg, deq_ptr); 1763 deq_seg, deq_ptr);
1646 return queue_command(xhci, (u32) addr | cycle_state, 0, 0, 1764 return 0;
1765 }
1766 return queue_command(xhci, lower_32_bits(addr) | cycle_state,
1767 upper_32_bits(addr), 0,
1647 trb_slot_id | trb_ep_index | type); 1768 trb_slot_id | trb_ep_index | type);
1648} 1769}
1770
1771int xhci_queue_reset_ep(struct xhci_hcd *xhci, int slot_id,
1772 unsigned int ep_index)
1773{
1774 u32 trb_slot_id = SLOT_ID_FOR_TRB(slot_id);
1775 u32 trb_ep_index = EP_ID_FOR_TRB(ep_index);
1776 u32 type = TRB_TYPE(TRB_RESET_EP);
1777
1778 return queue_command(xhci, 0, 0, 0, trb_slot_id | trb_ep_index | type);
1779}
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 8936eeb5588..d31d32206ba 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -25,6 +25,7 @@
25 25
26#include <linux/usb.h> 26#include <linux/usb.h>
27#include <linux/timer.h> 27#include <linux/timer.h>
28#include <linux/kernel.h>
28 29
29#include "../core/hcd.h" 30#include "../core/hcd.h"
30/* Code sharing between pci-quirks and xhci hcd */ 31/* Code sharing between pci-quirks and xhci hcd */
@@ -42,14 +43,6 @@
42 * xHCI register interface. 43 * xHCI register interface.
43 * This corresponds to the eXtensible Host Controller Interface (xHCI) 44 * This corresponds to the eXtensible Host Controller Interface (xHCI)
44 * Revision 0.95 specification 45 * Revision 0.95 specification
45 *
46 * Registers should always be accessed with double word or quad word accesses.
47 *
48 * Some xHCI implementations may support 64-bit address pointers. Registers
49 * with 64-bit address pointers should be written to with dword accesses by
50 * writing the low dword first (ptr[0]), then the high dword (ptr[1]) second.
51 * xHCI implementations that do not support 64-bit address pointers will ignore
52 * the high dword, and write order is irrelevant.
53 */ 46 */
54 47
55/** 48/**
@@ -96,6 +89,7 @@ struct xhci_cap_regs {
96#define HCS_ERST_MAX(p) (((p) >> 4) & 0xf) 89#define HCS_ERST_MAX(p) (((p) >> 4) & 0xf)
97/* bit 26 Scratchpad restore - for save/restore HW state - not used yet */ 90/* bit 26 Scratchpad restore - for save/restore HW state - not used yet */
98/* bits 27:31 number of Scratchpad buffers SW must allocate for the HW */ 91/* bits 27:31 number of Scratchpad buffers SW must allocate for the HW */
92#define HCS_MAX_SCRATCHPAD(p) (((p) >> 27) & 0x1f)
99 93
100/* HCSPARAMS3 - hcs_params3 - bitmasks */ 94/* HCSPARAMS3 - hcs_params3 - bitmasks */
101/* bits 0:7, Max U1 to U0 latency for the roothub ports */ 95/* bits 0:7, Max U1 to U0 latency for the roothub ports */
@@ -166,10 +160,10 @@ struct xhci_op_regs {
166 u32 reserved1; 160 u32 reserved1;
167 u32 reserved2; 161 u32 reserved2;
168 u32 dev_notification; 162 u32 dev_notification;
169 u32 cmd_ring[2]; 163 u64 cmd_ring;
170 /* rsvd: offset 0x20-2F */ 164 /* rsvd: offset 0x20-2F */
171 u32 reserved3[4]; 165 u32 reserved3[4];
172 u32 dcbaa_ptr[2]; 166 u64 dcbaa_ptr;
173 u32 config_reg; 167 u32 config_reg;
174 /* rsvd: offset 0x3C-3FF */ 168 /* rsvd: offset 0x3C-3FF */
175 u32 reserved4[241]; 169 u32 reserved4[241];
@@ -254,7 +248,7 @@ struct xhci_op_regs {
254#define CMD_RING_RUNNING (1 << 3) 248#define CMD_RING_RUNNING (1 << 3)
255/* bits 4:5 reserved and should be preserved */ 249/* bits 4:5 reserved and should be preserved */
256/* Command Ring pointer - bit mask for the lower 32 bits. */ 250/* Command Ring pointer - bit mask for the lower 32 bits. */
257#define CMD_RING_ADDR_MASK (0xffffffc0) 251#define CMD_RING_RSVD_BITS (0x3f)
258 252
259/* CONFIG - Configure Register - config_reg bitmasks */ 253/* CONFIG - Configure Register - config_reg bitmasks */
260/* bits 0:7 - maximum number of device slots enabled (NumSlotsEn) */ 254/* bits 0:7 - maximum number of device slots enabled (NumSlotsEn) */
@@ -382,8 +376,8 @@ struct xhci_intr_reg {
382 u32 irq_control; 376 u32 irq_control;
383 u32 erst_size; 377 u32 erst_size;
384 u32 rsvd; 378 u32 rsvd;
385 u32 erst_base[2]; 379 u64 erst_base;
386 u32 erst_dequeue[2]; 380 u64 erst_dequeue;
387}; 381};
388 382
389/* irq_pending bitmasks */ 383/* irq_pending bitmasks */
@@ -453,6 +447,27 @@ struct xhci_doorbell_array {
453 447
454 448
455/** 449/**
450 * struct xhci_container_ctx
451 * @type: Type of context. Used to calculated offsets to contained contexts.
452 * @size: Size of the context data
453 * @bytes: The raw context data given to HW
454 * @dma: dma address of the bytes
455 *
456 * Represents either a Device or Input context. Holds a pointer to the raw
457 * memory used for the context (bytes) and dma address of it (dma).
458 */
459struct xhci_container_ctx {
460 unsigned type;
461#define XHCI_CTX_TYPE_DEVICE 0x1
462#define XHCI_CTX_TYPE_INPUT 0x2
463
464 int size;
465
466 u8 *bytes;
467 dma_addr_t dma;
468};
469
470/**
456 * struct xhci_slot_ctx 471 * struct xhci_slot_ctx
457 * @dev_info: Route string, device speed, hub info, and last valid endpoint 472 * @dev_info: Route string, device speed, hub info, and last valid endpoint
458 * @dev_info2: Max exit latency for device number, root hub port number 473 * @dev_info2: Max exit latency for device number, root hub port number
@@ -538,7 +553,7 @@ struct xhci_slot_ctx {
538struct xhci_ep_ctx { 553struct xhci_ep_ctx {
539 u32 ep_info; 554 u32 ep_info;
540 u32 ep_info2; 555 u32 ep_info2;
541 u32 deq[2]; 556 u64 deq;
542 u32 tx_info; 557 u32 tx_info;
543 /* offset 0x14 - 0x1f reserved for HC internal use */ 558 /* offset 0x14 - 0x1f reserved for HC internal use */
544 u32 reserved[3]; 559 u32 reserved[3];
@@ -589,18 +604,16 @@ struct xhci_ep_ctx {
589 604
590 605
591/** 606/**
592 * struct xhci_device_control 607 * struct xhci_input_control_context
593 * Input/Output context; see section 6.2.5. 608 * Input control context; see section 6.2.5.
594 * 609 *
595 * @drop_context: set the bit of the endpoint context you want to disable 610 * @drop_context: set the bit of the endpoint context you want to disable
596 * @add_context: set the bit of the endpoint context you want to enable 611 * @add_context: set the bit of the endpoint context you want to enable
597 */ 612 */
598struct xhci_device_control { 613struct xhci_input_control_ctx {
599 u32 drop_flags; 614 u32 drop_flags;
600 u32 add_flags; 615 u32 add_flags;
601 u32 rsvd[6]; 616 u32 rsvd2[6];
602 struct xhci_slot_ctx slot;
603 struct xhci_ep_ctx ep[31];
604}; 617};
605 618
606/* drop context bitmasks */ 619/* drop context bitmasks */
@@ -608,7 +621,6 @@ struct xhci_device_control {
608/* add context bitmasks */ 621/* add context bitmasks */
609#define ADD_EP(x) (0x1 << x) 622#define ADD_EP(x) (0x1 << x)
610 623
611
612struct xhci_virt_device { 624struct xhci_virt_device {
613 /* 625 /*
614 * Commands to the hardware are passed an "input context" that 626 * Commands to the hardware are passed an "input context" that
@@ -618,11 +630,10 @@ struct xhci_virt_device {
618 * track of input and output contexts separately because 630 * track of input and output contexts separately because
619 * these commands might fail and we don't trust the hardware. 631 * these commands might fail and we don't trust the hardware.
620 */ 632 */
621 struct xhci_device_control *out_ctx; 633 struct xhci_container_ctx *out_ctx;
622 dma_addr_t out_ctx_dma;
623 /* Used for addressing devices and configuration changes */ 634 /* Used for addressing devices and configuration changes */
624 struct xhci_device_control *in_ctx; 635 struct xhci_container_ctx *in_ctx;
625 dma_addr_t in_ctx_dma; 636
626 /* FIXME when stream support is added */ 637 /* FIXME when stream support is added */
627 struct xhci_ring *ep_rings[31]; 638 struct xhci_ring *ep_rings[31];
628 /* Temporary storage in case the configure endpoint command fails and we 639 /* Temporary storage in case the configure endpoint command fails and we
@@ -641,7 +652,7 @@ struct xhci_virt_device {
641 */ 652 */
642struct xhci_device_context_array { 653struct xhci_device_context_array {
643 /* 64-bit device addresses; we only write 32-bit addresses */ 654 /* 64-bit device addresses; we only write 32-bit addresses */
644 u32 dev_context_ptrs[2*MAX_HC_SLOTS]; 655 u64 dev_context_ptrs[MAX_HC_SLOTS];
645 /* private xHCD pointers */ 656 /* private xHCD pointers */
646 dma_addr_t dma; 657 dma_addr_t dma;
647}; 658};
@@ -654,7 +665,7 @@ struct xhci_device_context_array {
654 665
655struct xhci_stream_ctx { 666struct xhci_stream_ctx {
656 /* 64-bit stream ring address, cycle state, and stream type */ 667 /* 64-bit stream ring address, cycle state, and stream type */
657 u32 stream_ring[2]; 668 u64 stream_ring;
658 /* offset 0x14 - 0x1f reserved for HC internal use */ 669 /* offset 0x14 - 0x1f reserved for HC internal use */
659 u32 reserved[2]; 670 u32 reserved[2];
660}; 671};
@@ -662,7 +673,7 @@ struct xhci_stream_ctx {
662 673
663struct xhci_transfer_event { 674struct xhci_transfer_event {
664 /* 64-bit buffer address, or immediate data */ 675 /* 64-bit buffer address, or immediate data */
665 u32 buffer[2]; 676 u64 buffer;
666 u32 transfer_len; 677 u32 transfer_len;
667 /* This field is interpreted differently based on the type of TRB */ 678 /* This field is interpreted differently based on the type of TRB */
668 u32 flags; 679 u32 flags;
@@ -744,7 +755,7 @@ struct xhci_transfer_event {
744 755
745struct xhci_link_trb { 756struct xhci_link_trb {
746 /* 64-bit segment pointer*/ 757 /* 64-bit segment pointer*/
747 u32 segment_ptr[2]; 758 u64 segment_ptr;
748 u32 intr_target; 759 u32 intr_target;
749 u32 control; 760 u32 control;
750}; 761};
@@ -755,7 +766,7 @@ struct xhci_link_trb {
755/* Command completion event TRB */ 766/* Command completion event TRB */
756struct xhci_event_cmd { 767struct xhci_event_cmd {
757 /* Pointer to command TRB, or the value passed by the event data trb */ 768 /* Pointer to command TRB, or the value passed by the event data trb */
758 u32 cmd_trb[2]; 769 u64 cmd_trb;
759 u32 status; 770 u32 status;
760 u32 flags; 771 u32 flags;
761}; 772};
@@ -848,8 +859,8 @@ union xhci_trb {
848#define TRB_CONFIG_EP 12 859#define TRB_CONFIG_EP 12
849/* Evaluate Context Command */ 860/* Evaluate Context Command */
850#define TRB_EVAL_CONTEXT 13 861#define TRB_EVAL_CONTEXT 13
851/* Reset Transfer Ring Command */ 862/* Reset Endpoint Command */
852#define TRB_RESET_RING 14 863#define TRB_RESET_EP 14
853/* Stop Transfer Ring Command */ 864/* Stop Transfer Ring Command */
854#define TRB_STOP_RING 15 865#define TRB_STOP_RING 15
855/* Set Transfer Ring Dequeue Pointer Command */ 866/* Set Transfer Ring Dequeue Pointer Command */
@@ -929,6 +940,7 @@ struct xhci_ring {
929 unsigned int cancels_pending; 940 unsigned int cancels_pending;
930 unsigned int state; 941 unsigned int state;
931#define SET_DEQ_PENDING (1 << 0) 942#define SET_DEQ_PENDING (1 << 0)
943#define EP_HALTED (1 << 1)
932 /* The TRB that was last reported in a stopped endpoint ring */ 944 /* The TRB that was last reported in a stopped endpoint ring */
933 union xhci_trb *stopped_trb; 945 union xhci_trb *stopped_trb;
934 struct xhci_td *stopped_td; 946 struct xhci_td *stopped_td;
@@ -940,9 +952,15 @@ struct xhci_ring {
940 u32 cycle_state; 952 u32 cycle_state;
941}; 953};
942 954
955struct xhci_dequeue_state {
956 struct xhci_segment *new_deq_seg;
957 union xhci_trb *new_deq_ptr;
958 int new_cycle_state;
959};
960
943struct xhci_erst_entry { 961struct xhci_erst_entry {
944 /* 64-bit event ring segment address */ 962 /* 64-bit event ring segment address */
945 u32 seg_addr[2]; 963 u64 seg_addr;
946 u32 seg_size; 964 u32 seg_size;
947 /* Set to zero */ 965 /* Set to zero */
948 u32 rsvd; 966 u32 rsvd;
@@ -957,6 +975,13 @@ struct xhci_erst {
957 unsigned int erst_size; 975 unsigned int erst_size;
958}; 976};
959 977
978struct xhci_scratchpad {
979 u64 *sp_array;
980 dma_addr_t sp_dma;
981 void **sp_buffers;
982 dma_addr_t *sp_dma_buffers;
983};
984
960/* 985/*
961 * Each segment table entry is 4*32bits long. 1K seems like an ok size: 986 * Each segment table entry is 4*32bits long. 1K seems like an ok size:
962 * (1K bytes * 8bytes/bit) / (4*32 bits) = 64 segment entries in the table, 987 * (1K bytes * 8bytes/bit) / (4*32 bits) = 64 segment entries in the table,
@@ -1011,6 +1036,9 @@ struct xhci_hcd {
1011 struct xhci_ring *cmd_ring; 1036 struct xhci_ring *cmd_ring;
1012 struct xhci_ring *event_ring; 1037 struct xhci_ring *event_ring;
1013 struct xhci_erst erst; 1038 struct xhci_erst erst;
1039 /* Scratchpad */
1040 struct xhci_scratchpad *scratchpad;
1041
1014 /* slot enabling and address device helpers */ 1042 /* slot enabling and address device helpers */
1015 struct completion addr_dev; 1043 struct completion addr_dev;
1016 int slot_id; 1044 int slot_id;
@@ -1071,13 +1099,43 @@ static inline unsigned int xhci_readl(const struct xhci_hcd *xhci,
1071static inline void xhci_writel(struct xhci_hcd *xhci, 1099static inline void xhci_writel(struct xhci_hcd *xhci,
1072 const unsigned int val, __u32 __iomem *regs) 1100 const unsigned int val, __u32 __iomem *regs)
1073{ 1101{
1074 if (!in_interrupt()) 1102 xhci_dbg(xhci,
1075 xhci_dbg(xhci, 1103 "`MEM_WRITE_DWORD(3'b000, 32'h%p, 32'h%0x, 4'hf);\n",
1076 "`MEM_WRITE_DWORD(3'b000, 32'h%p, 32'h%0x, 4'hf);\n", 1104 regs, val);
1077 regs, val);
1078 writel(val, regs); 1105 writel(val, regs);
1079} 1106}
1080 1107
1108/*
1109 * Registers should always be accessed with double word or quad word accesses.
1110 *
1111 * Some xHCI implementations may support 64-bit address pointers. Registers
1112 * with 64-bit address pointers should be written to with dword accesses by
1113 * writing the low dword first (ptr[0]), then the high dword (ptr[1]) second.
1114 * xHCI implementations that do not support 64-bit address pointers will ignore
1115 * the high dword, and write order is irrelevant.
1116 */
1117static inline u64 xhci_read_64(const struct xhci_hcd *xhci,
1118 __u64 __iomem *regs)
1119{
1120 __u32 __iomem *ptr = (__u32 __iomem *) regs;
1121 u64 val_lo = readl(ptr);
1122 u64 val_hi = readl(ptr + 1);
1123 return val_lo + (val_hi << 32);
1124}
1125static inline void xhci_write_64(struct xhci_hcd *xhci,
1126 const u64 val, __u64 __iomem *regs)
1127{
1128 __u32 __iomem *ptr = (__u32 __iomem *) regs;
1129 u32 val_lo = lower_32_bits(val);
1130 u32 val_hi = upper_32_bits(val);
1131
1132 xhci_dbg(xhci,
1133 "`MEM_WRITE_DWORD(3'b000, 64'h%p, 64'h%0lx, 4'hf);\n",
1134 regs, (long unsigned int) val);
1135 writel(val_lo, ptr);
1136 writel(val_hi, ptr + 1);
1137}
1138
1081/* xHCI debugging */ 1139/* xHCI debugging */
1082void xhci_print_ir_set(struct xhci_hcd *xhci, struct xhci_intr_reg *ir_set, int set_num); 1140void xhci_print_ir_set(struct xhci_hcd *xhci, struct xhci_intr_reg *ir_set, int set_num);
1083void xhci_print_registers(struct xhci_hcd *xhci); 1141void xhci_print_registers(struct xhci_hcd *xhci);
@@ -1090,7 +1148,7 @@ void xhci_debug_ring(struct xhci_hcd *xhci, struct xhci_ring *ring);
1090void xhci_dbg_erst(struct xhci_hcd *xhci, struct xhci_erst *erst); 1148void xhci_dbg_erst(struct xhci_hcd *xhci, struct xhci_erst *erst);
1091void xhci_dbg_cmd_ptrs(struct xhci_hcd *xhci); 1149void xhci_dbg_cmd_ptrs(struct xhci_hcd *xhci);
1092void xhci_dbg_ring_ptrs(struct xhci_hcd *xhci, struct xhci_ring *ring); 1150void xhci_dbg_ring_ptrs(struct xhci_hcd *xhci, struct xhci_ring *ring);
1093void xhci_dbg_ctx(struct xhci_hcd *xhci, struct xhci_device_control *ctx, dma_addr_t dma, unsigned int last_ep); 1151void xhci_dbg_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, unsigned int last_ep);
1094 1152
1095/* xHCI memory managment */ 1153/* xHCI memory managment */
1096void xhci_mem_cleanup(struct xhci_hcd *xhci); 1154void xhci_mem_cleanup(struct xhci_hcd *xhci);
@@ -1128,6 +1186,7 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags);
1128int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status); 1186int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status);
1129int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev, struct usb_host_endpoint *ep); 1187int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev, struct usb_host_endpoint *ep);
1130int xhci_drop_endpoint(struct usb_hcd *hcd, struct usb_device *udev, struct usb_host_endpoint *ep); 1188int xhci_drop_endpoint(struct usb_hcd *hcd, struct usb_device *udev, struct usb_host_endpoint *ep);
1189void xhci_endpoint_reset(struct usb_hcd *hcd, struct usb_host_endpoint *ep);
1131int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev); 1190int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev);
1132void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev); 1191void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev);
1133 1192
@@ -1148,10 +1207,23 @@ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb,
1148 int slot_id, unsigned int ep_index); 1207 int slot_id, unsigned int ep_index);
1149int xhci_queue_configure_endpoint(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, 1208int xhci_queue_configure_endpoint(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr,
1150 u32 slot_id); 1209 u32 slot_id);
1210int xhci_queue_reset_ep(struct xhci_hcd *xhci, int slot_id,
1211 unsigned int ep_index);
1212void xhci_find_new_dequeue_state(struct xhci_hcd *xhci,
1213 unsigned int slot_id, unsigned int ep_index,
1214 struct xhci_td *cur_td, struct xhci_dequeue_state *state);
1215void xhci_queue_new_dequeue_state(struct xhci_hcd *xhci,
1216 struct xhci_ring *ep_ring, unsigned int slot_id,
1217 unsigned int ep_index, struct xhci_dequeue_state *deq_state);
1151 1218
1152/* xHCI roothub code */ 1219/* xHCI roothub code */
1153int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, 1220int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex,
1154 char *buf, u16 wLength); 1221 char *buf, u16 wLength);
1155int xhci_hub_status_data(struct usb_hcd *hcd, char *buf); 1222int xhci_hub_status_data(struct usb_hcd *hcd, char *buf);
1156 1223
1224/* xHCI contexts */
1225struct xhci_input_control_ctx *xhci_get_input_control_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx);
1226struct xhci_slot_ctx *xhci_get_slot_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx);
1227struct xhci_ep_ctx *xhci_get_ep_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, unsigned int ep_index);
1228
1157#endif /* __LINUX_XHCI_HCD_H */ 1229#endif /* __LINUX_XHCI_HCD_H */
diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig
index a68d91a11be..abe3aa67ed0 100644
--- a/drivers/usb/misc/Kconfig
+++ b/drivers/usb/misc/Kconfig
@@ -220,7 +220,7 @@ config USB_IOWARRIOR
220 220
221config USB_TEST 221config USB_TEST
222 tristate "USB testing driver" 222 tristate "USB testing driver"
223 depends on USB && USB_DEVICEFS 223 depends on USB
224 help 224 help
225 This driver is for testing host controller software. It is used 225 This driver is for testing host controller software. It is used
226 with specialized device firmware for regression and stress testing, 226 with specialized device firmware for regression and stress testing,
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index 70073b157f0..803adcb5ac1 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -12,6 +12,7 @@ config USB_MUSB_HDRC
12 depends on !SUPERH 12 depends on !SUPERH
13 select NOP_USB_XCEIV if ARCH_DAVINCI 13 select NOP_USB_XCEIV if ARCH_DAVINCI
14 select TWL4030_USB if MACH_OMAP_3430SDP 14 select TWL4030_USB if MACH_OMAP_3430SDP
15 select NOP_USB_XCEIV if MACH_OMAP3EVM
15 select USB_OTG_UTILS 16 select USB_OTG_UTILS
16 tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)' 17 tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
17 help 18 help
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 554a414f65d..c7c1ca0494c 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1326,7 +1326,6 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb)
1326 int i; 1326 int i;
1327 1327
1328 /* log core options (read using indexed model) */ 1328 /* log core options (read using indexed model) */
1329 musb_ep_select(mbase, 0);
1330 reg = musb_read_configdata(mbase); 1329 reg = musb_read_configdata(mbase);
1331 1330
1332 strcpy(aInfo, (reg & MUSB_CONFIGDATA_UTMIDW) ? "UTMI-16" : "UTMI-8"); 1331 strcpy(aInfo, (reg & MUSB_CONFIGDATA_UTMIDW) ? "UTMI-16" : "UTMI-8");
@@ -1990,7 +1989,7 @@ bad_config:
1990 if (status < 0) 1989 if (status < 0)
1991 goto fail2; 1990 goto fail2;
1992 1991
1993#ifdef CONFIG_USB_OTG 1992#ifdef CONFIG_USB_MUSB_OTG
1994 setup_timer(&musb->otg_timer, musb_otg_timer_func, (unsigned long) musb); 1993 setup_timer(&musb->otg_timer, musb_otg_timer_func, (unsigned long) musb);
1995#endif 1994#endif
1996 1995
diff --git a/drivers/usb/musb/musb_gadget_ep0.c b/drivers/usb/musb/musb_gadget_ep0.c
index 40ed50ecedf..7a6778675ad 100644
--- a/drivers/usb/musb/musb_gadget_ep0.c
+++ b/drivers/usb/musb/musb_gadget_ep0.c
@@ -407,7 +407,7 @@ stall:
407 csr |= MUSB_RXCSR_P_SENDSTALL 407 csr |= MUSB_RXCSR_P_SENDSTALL
408 | MUSB_RXCSR_FLUSHFIFO 408 | MUSB_RXCSR_FLUSHFIFO
409 | MUSB_RXCSR_CLRDATATOG 409 | MUSB_RXCSR_CLRDATATOG
410 | MUSB_TXCSR_P_WZC_BITS; 410 | MUSB_RXCSR_P_WZC_BITS;
411 musb_writew(regs, MUSB_RXCSR, 411 musb_writew(regs, MUSB_RXCSR,
412 csr); 412 csr);
413 } 413 }
diff --git a/drivers/usb/musb/musb_regs.h b/drivers/usb/musb/musb_regs.h
index de3b2f18db4..fbfd3fd9ce1 100644
--- a/drivers/usb/musb/musb_regs.h
+++ b/drivers/usb/musb/musb_regs.h
@@ -323,6 +323,7 @@ static inline void musb_write_rxfifoadd(void __iomem *mbase, u16 c_off)
323 323
324static inline u8 musb_read_configdata(void __iomem *mbase) 324static inline u8 musb_read_configdata(void __iomem *mbase)
325{ 325{
326 musb_writeb(mbase, MUSB_INDEX, 0);
326 return musb_readb(mbase, 0x10 + MUSB_CONFIGDATA); 327 return musb_readb(mbase, 0x10 + MUSB_CONFIGDATA);
327} 328}
328 329
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index e9a40b820fd..985cbcf48bd 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -80,6 +80,7 @@ static struct usb_device_id id_table [] = {
80 { USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */ 80 { USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */
81 { USB_DEVICE(0x10C4, 0x8115) }, /* Arygon NFC/Mifare Reader */ 81 { USB_DEVICE(0x10C4, 0x8115) }, /* Arygon NFC/Mifare Reader */
82 { USB_DEVICE(0x10C4, 0x813D) }, /* Burnside Telecom Deskmobile */ 82 { USB_DEVICE(0x10C4, 0x813D) }, /* Burnside Telecom Deskmobile */
83 { USB_DEVICE(0x10C4, 0x813F) }, /* Tams Master Easy Control */
83 { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ 84 { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */
84 { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ 85 { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */
85 { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ 86 { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */
@@ -96,7 +97,9 @@ static struct usb_device_id id_table [] = {
96 { USB_DEVICE(0x10c4, 0x8293) }, /* Telegesys ETRX2USB */ 97 { USB_DEVICE(0x10c4, 0x8293) }, /* Telegesys ETRX2USB */
97 { USB_DEVICE(0x10C4, 0x82F9) }, /* Procyon AVS */ 98 { USB_DEVICE(0x10C4, 0x82F9) }, /* Procyon AVS */
98 { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */ 99 { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */
100 { USB_DEVICE(0x10C4, 0x8382) }, /* Cygnal Integrated Products, Inc. */
99 { USB_DEVICE(0x10C4, 0x83A8) }, /* Amber Wireless AMB2560 */ 101 { USB_DEVICE(0x10C4, 0x83A8) }, /* Amber Wireless AMB2560 */
102 { USB_DEVICE(0x10C4, 0x8411) }, /* Kyocera GPS Module */
100 { USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */ 103 { USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */
101 { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ 104 { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
102 { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ 105 { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 60c64cc5be2..8fec5d4455c 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -698,6 +698,10 @@ static struct usb_device_id id_table_combined [] = {
698 { USB_DEVICE(MARVELL_VID, MARVELL_SHEEVAPLUG_PID), 698 { USB_DEVICE(MARVELL_VID, MARVELL_SHEEVAPLUG_PID),
699 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, 699 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
700 { USB_DEVICE(LARSENBRUSGAARD_VID, LB_ALTITRACK_PID) }, 700 { USB_DEVICE(LARSENBRUSGAARD_VID, LB_ALTITRACK_PID) },
701 { USB_DEVICE(GN_OTOMETRICS_VID, AURICAL_USB_PID) },
702 { USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) },
703 { USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID),
704 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
701 { }, /* Optional parameter entry */ 705 { }, /* Optional parameter entry */
702 { } /* Terminating entry */ 706 { } /* Terminating entry */
703}; 707};
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
index c9fbd741509..8c92b88166a 100644
--- a/drivers/usb/serial/ftdi_sio.h
+++ b/drivers/usb/serial/ftdi_sio.h
@@ -947,6 +947,27 @@
947#define FTDI_TURTELIZER_PID 0xBDC8 /* JTAG/RS-232 adapter by egnite GmBH */ 947#define FTDI_TURTELIZER_PID 0xBDC8 /* JTAG/RS-232 adapter by egnite GmBH */
948 948
949/* 949/*
950 * GN Otometrics (http://www.otometrics.com)
951 * Submitted by Ville Sundberg.
952 */
953#define GN_OTOMETRICS_VID 0x0c33 /* Vendor ID */
954#define AURICAL_USB_PID 0x0010 /* Aurical USB Audiometer */
955
956/*
957 * Bayer Ascensia Contour blood glucose meter USB-converter cable.
958 * http://winglucofacts.com/cables/
959 */
960#define BAYER_VID 0x1A79
961#define BAYER_CONTOUR_CABLE_PID 0x6001
962
963/*
964 * Marvell OpenRD Base, Client
965 * http://www.open-rd.org
966 * OpenRD Base, Client use VID 0x0403
967 */
968#define MARVELL_OPENRD_PID 0x9e90
969
970/*
950 * BmRequestType: 1100 0000b 971 * BmRequestType: 1100 0000b
951 * bRequest: FTDI_E2_READ 972 * bRequest: FTDI_E2_READ
952 * wValue: 0 973 * wValue: 0
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index bfc5ce000ef..ccd4dd340d2 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -521,7 +521,7 @@ static int mos7720_chars_in_buffer(struct tty_struct *tty)
521 mos7720_port = usb_get_serial_port_data(port); 521 mos7720_port = usb_get_serial_port_data(port);
522 if (mos7720_port == NULL) { 522 if (mos7720_port == NULL) {
523 dbg("%s:leaving ...........", __func__); 523 dbg("%s:leaving ...........", __func__);
524 return -ENODEV; 524 return 0;
525 } 525 }
526 526
527 for (i = 0; i < NUM_URBS; ++i) { 527 for (i = 0; i < NUM_URBS; ++i) {
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index c31940a307f..270009afdf7 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -124,10 +124,13 @@
124#define BANDB_DEVICE_ID_USOPTL4_4 0xAC44 124#define BANDB_DEVICE_ID_USOPTL4_4 0xAC44
125#define BANDB_DEVICE_ID_USOPTL4_2 0xAC42 125#define BANDB_DEVICE_ID_USOPTL4_2 0xAC42
126 126
127/* This driver also supports the ATEN UC2324 device since it is mos7840 based 127/* This driver also supports
128 * - if I knew the device id it would also support the ATEN UC2322 */ 128 * ATEN UC2324 device using Moschip MCS7840
129 * ATEN UC2322 device using Moschip MCS7820
130 */
129#define USB_VENDOR_ID_ATENINTL 0x0557 131#define USB_VENDOR_ID_ATENINTL 0x0557
130#define ATENINTL_DEVICE_ID_UC2324 0x2011 132#define ATENINTL_DEVICE_ID_UC2324 0x2011
133#define ATENINTL_DEVICE_ID_UC2322 0x7820
131 134
132/* Interrupt Routine Defines */ 135/* Interrupt Routine Defines */
133 136
@@ -177,6 +180,7 @@ static struct usb_device_id moschip_port_id_table[] = {
177 {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4)}, 180 {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4)},
178 {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2)}, 181 {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2)},
179 {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2324)}, 182 {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2324)},
183 {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2322)},
180 {} /* terminating entry */ 184 {} /* terminating entry */
181}; 185};
182 186
@@ -186,6 +190,7 @@ static __devinitdata struct usb_device_id moschip_id_table_combined[] = {
186 {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4)}, 190 {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4)},
187 {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2)}, 191 {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2)},
188 {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2324)}, 192 {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2324)},
193 {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2322)},
189 {} /* terminating entry */ 194 {} /* terminating entry */
190}; 195};
191 196
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 98262dd552b..c784ddbe7b6 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -66,8 +66,10 @@ static int option_tiocmget(struct tty_struct *tty, struct file *file);
66static int option_tiocmset(struct tty_struct *tty, struct file *file, 66static int option_tiocmset(struct tty_struct *tty, struct file *file,
67 unsigned int set, unsigned int clear); 67 unsigned int set, unsigned int clear);
68static int option_send_setup(struct usb_serial_port *port); 68static int option_send_setup(struct usb_serial_port *port);
69#ifdef CONFIG_PM
69static int option_suspend(struct usb_serial *serial, pm_message_t message); 70static int option_suspend(struct usb_serial *serial, pm_message_t message);
70static int option_resume(struct usb_serial *serial); 71static int option_resume(struct usb_serial *serial);
72#endif
71 73
72/* Vendor and product IDs */ 74/* Vendor and product IDs */
73#define OPTION_VENDOR_ID 0x0AF0 75#define OPTION_VENDOR_ID 0x0AF0
@@ -205,6 +207,7 @@ static int option_resume(struct usb_serial *serial);
205#define NOVATELWIRELESS_PRODUCT_MC727 0x4100 207#define NOVATELWIRELESS_PRODUCT_MC727 0x4100
206#define NOVATELWIRELESS_PRODUCT_MC950D 0x4400 208#define NOVATELWIRELESS_PRODUCT_MC950D 0x4400
207#define NOVATELWIRELESS_PRODUCT_U727 0x5010 209#define NOVATELWIRELESS_PRODUCT_U727 0x5010
210#define NOVATELWIRELESS_PRODUCT_MC727_NEW 0x5100
208#define NOVATELWIRELESS_PRODUCT_MC760 0x6000 211#define NOVATELWIRELESS_PRODUCT_MC760 0x6000
209#define NOVATELWIRELESS_PRODUCT_OVMC760 0x6002 212#define NOVATELWIRELESS_PRODUCT_OVMC760 0x6002
210 213
@@ -259,11 +262,6 @@ static int option_resume(struct usb_serial *serial);
259#define AXESSTEL_VENDOR_ID 0x1726 262#define AXESSTEL_VENDOR_ID 0x1726
260#define AXESSTEL_PRODUCT_MV110H 0x1000 263#define AXESSTEL_PRODUCT_MV110H 0x1000
261 264
262#define ONDA_VENDOR_ID 0x19d2
263#define ONDA_PRODUCT_MSA501HS 0x0001
264#define ONDA_PRODUCT_ET502HS 0x0002
265#define ONDA_PRODUCT_MT503HS 0x2000
266
267#define BANDRICH_VENDOR_ID 0x1A8D 265#define BANDRICH_VENDOR_ID 0x1A8D
268#define BANDRICH_PRODUCT_C100_1 0x1002 266#define BANDRICH_PRODUCT_C100_1 0x1002
269#define BANDRICH_PRODUCT_C100_2 0x1003 267#define BANDRICH_PRODUCT_C100_2 0x1003
@@ -301,6 +299,7 @@ static int option_resume(struct usb_serial *serial);
301#define ZTE_PRODUCT_MF628 0x0015 299#define ZTE_PRODUCT_MF628 0x0015
302#define ZTE_PRODUCT_MF626 0x0031 300#define ZTE_PRODUCT_MF626 0x0031
303#define ZTE_PRODUCT_CDMA_TECH 0xfffe 301#define ZTE_PRODUCT_CDMA_TECH 0xfffe
302#define ZTE_PRODUCT_AC8710 0xfff1
304 303
305#define BENQ_VENDOR_ID 0x04a5 304#define BENQ_VENDOR_ID 0x04a5
306#define BENQ_PRODUCT_H10 0x4068 305#define BENQ_PRODUCT_H10 0x4068
@@ -322,6 +321,11 @@ static int option_resume(struct usb_serial *serial);
322#define ALINK_VENDOR_ID 0x1e0e 321#define ALINK_VENDOR_ID 0x1e0e
323#define ALINK_PRODUCT_3GU 0x9200 322#define ALINK_PRODUCT_3GU 0x9200
324 323
324/* ALCATEL PRODUCTS */
325#define ALCATEL_VENDOR_ID 0x1bbb
326#define ALCATEL_PRODUCT_X060S 0x0000
327
328
325static struct usb_device_id option_ids[] = { 329static struct usb_device_id option_ids[] = {
326 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, 330 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
327 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, 331 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
@@ -438,6 +442,7 @@ static struct usb_device_id option_ids[] = {
438 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) }, /* Novatel EU850D/EU860D/EU870D */ 442 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) }, /* Novatel EU850D/EU860D/EU870D */
439 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) }, /* Novatel MC930D/MC950D */ 443 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) }, /* Novatel MC930D/MC950D */
440 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */ 444 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */
445 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727_NEW) }, /* Novatel MC727/U727/USB727 refresh */
441 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U727) }, /* Novatel MC727/U727/USB727 */ 446 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U727) }, /* Novatel MC727/U727/USB727 */
442 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC760) }, /* Novatel MC760/U760/USB760 */ 447 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC760) }, /* Novatel MC760/U760/USB760 */
443 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_OVMC760) }, /* Novatel Ovation MC760 */ 448 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_OVMC760) }, /* Novatel Ovation MC760 */
@@ -474,42 +479,6 @@ static struct usb_device_id option_ids[] = {
474 { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, 479 { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) },
475 { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) }, 480 { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) },
476 { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) }, 481 { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) },
477 { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MSA501HS) },
478 { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) },
479 { USB_DEVICE(ONDA_VENDOR_ID, 0x0003) },
480 { USB_DEVICE(ONDA_VENDOR_ID, 0x0004) },
481 { USB_DEVICE(ONDA_VENDOR_ID, 0x0005) },
482 { USB_DEVICE(ONDA_VENDOR_ID, 0x0006) },
483 { USB_DEVICE(ONDA_VENDOR_ID, 0x0007) },
484 { USB_DEVICE(ONDA_VENDOR_ID, 0x0008) },
485 { USB_DEVICE(ONDA_VENDOR_ID, 0x0009) },
486 { USB_DEVICE(ONDA_VENDOR_ID, 0x000a) },
487 { USB_DEVICE(ONDA_VENDOR_ID, 0x000b) },
488 { USB_DEVICE(ONDA_VENDOR_ID, 0x000c) },
489 { USB_DEVICE(ONDA_VENDOR_ID, 0x000d) },
490 { USB_DEVICE(ONDA_VENDOR_ID, 0x000e) },
491 { USB_DEVICE(ONDA_VENDOR_ID, 0x000f) },
492 { USB_DEVICE(ONDA_VENDOR_ID, 0x0010) },
493 { USB_DEVICE(ONDA_VENDOR_ID, 0x0011) },
494 { USB_DEVICE(ONDA_VENDOR_ID, 0x0012) },
495 { USB_DEVICE(ONDA_VENDOR_ID, 0x0013) },
496 { USB_DEVICE(ONDA_VENDOR_ID, 0x0014) },
497 { USB_DEVICE(ONDA_VENDOR_ID, 0x0015) },
498 { USB_DEVICE(ONDA_VENDOR_ID, 0x0016) },
499 { USB_DEVICE(ONDA_VENDOR_ID, 0x0017) },
500 { USB_DEVICE(ONDA_VENDOR_ID, 0x0018) },
501 { USB_DEVICE(ONDA_VENDOR_ID, 0x0019) },
502 { USB_DEVICE(ONDA_VENDOR_ID, 0x0020) },
503 { USB_DEVICE(ONDA_VENDOR_ID, 0x0021) },
504 { USB_DEVICE(ONDA_VENDOR_ID, 0x0022) },
505 { USB_DEVICE(ONDA_VENDOR_ID, 0x0023) },
506 { USB_DEVICE(ONDA_VENDOR_ID, 0x0024) },
507 { USB_DEVICE(ONDA_VENDOR_ID, 0x0025) },
508 { USB_DEVICE(ONDA_VENDOR_ID, 0x0026) },
509 { USB_DEVICE(ONDA_VENDOR_ID, 0x0027) },
510 { USB_DEVICE(ONDA_VENDOR_ID, 0x0028) },
511 { USB_DEVICE(ONDA_VENDOR_ID, 0x0029) },
512 { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MT503HS) },
513 { USB_DEVICE(YISO_VENDOR_ID, YISO_PRODUCT_U893) }, 482 { USB_DEVICE(YISO_VENDOR_ID, YISO_PRODUCT_U893) },
514 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, 483 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) },
515 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, 484 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) },
@@ -534,10 +503,75 @@ static struct usb_device_id option_ids[] = {
534 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ 503 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
535 { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */ 504 { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */
536 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) }, 505 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
537 { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622) }, 506 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */
538 { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626) }, 507 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0002, 0xff, 0xff, 0xff) },
539 { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628) }, 508 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0003, 0xff, 0xff, 0xff) },
540 { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH) }, 509 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0004, 0xff, 0xff, 0xff) },
510 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0005, 0xff, 0xff, 0xff) },
511 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0006, 0xff, 0xff, 0xff) },
512 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0007, 0xff, 0xff, 0xff) },
513 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0008, 0xff, 0xff, 0xff) },
514 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0009, 0xff, 0xff, 0xff) },
515 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x000a, 0xff, 0xff, 0xff) },
516 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x000b, 0xff, 0xff, 0xff) },
517 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x000c, 0xff, 0xff, 0xff) },
518 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x000d, 0xff, 0xff, 0xff) },
519 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x000e, 0xff, 0xff, 0xff) },
520 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x000f, 0xff, 0xff, 0xff) },
521 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0010, 0xff, 0xff, 0xff) },
522 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0011, 0xff, 0xff, 0xff) },
523 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0012, 0xff, 0xff, 0xff) },
524 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0013, 0xff, 0xff, 0xff) },
525 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628, 0xff, 0xff, 0xff) },
526 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0016, 0xff, 0xff, 0xff) },
527 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff) },
528 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0018, 0xff, 0xff, 0xff) },
529 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0019, 0xff, 0xff, 0xff) },
530 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0020, 0xff, 0xff, 0xff) },
531 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0021, 0xff, 0xff, 0xff) },
532 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0022, 0xff, 0xff, 0xff) },
533 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0023, 0xff, 0xff, 0xff) },
534 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0024, 0xff, 0xff, 0xff) },
535 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0025, 0xff, 0xff, 0xff) },
536 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0026, 0xff, 0xff, 0xff) },
537 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) },
538 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) },
539 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) },
540 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626, 0xff, 0xff, 0xff) },
541 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0032, 0xff, 0xff, 0xff) },
542 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0033, 0xff, 0xff, 0xff) },
543 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0037, 0xff, 0xff, 0xff) },
544 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0039, 0xff, 0xff, 0xff) },
545 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0042, 0xff, 0xff, 0xff) },
546 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0043, 0xff, 0xff, 0xff) },
547 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0048, 0xff, 0xff, 0xff) },
548 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0049, 0xff, 0xff, 0xff) },
549 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0051, 0xff, 0xff, 0xff) },
550 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0052, 0xff, 0xff, 0xff) },
551 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0054, 0xff, 0xff, 0xff) },
552 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0055, 0xff, 0xff, 0xff) },
553 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0057, 0xff, 0xff, 0xff) },
554 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0058, 0xff, 0xff, 0xff) },
555 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0061, 0xff, 0xff, 0xff) },
556 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0062, 0xff, 0xff, 0xff) },
557 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0063, 0xff, 0xff, 0xff) },
558 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0064, 0xff, 0xff, 0xff) },
559 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0066, 0xff, 0xff, 0xff) },
560 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0069, 0xff, 0xff, 0xff) },
561 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0076, 0xff, 0xff, 0xff) },
562 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0078, 0xff, 0xff, 0xff) },
563 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0082, 0xff, 0xff, 0xff) },
564 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0086, 0xff, 0xff, 0xff) },
565 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, 0xff, 0xff) },
566 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) },
567 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, /* ZTE CDMA products */
568 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0027, 0xff, 0xff, 0xff) },
569 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) },
570 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0060, 0xff, 0xff, 0xff) },
571 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) },
572 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) },
573 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) },
574 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) },
541 { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, 575 { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) },
542 { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, 576 { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) },
543 { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4512) }, 577 { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4512) },
@@ -547,6 +581,7 @@ static struct usb_device_id option_ids[] = {
547 { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_HSDPA_MINICARD ) }, /* Toshiba 3G HSDPA == Novatel Expedite EU870D MiniCard */ 581 { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_HSDPA_MINICARD ) }, /* Toshiba 3G HSDPA == Novatel Expedite EU870D MiniCard */
548 { USB_DEVICE(ALINK_VENDOR_ID, 0x9000) }, 582 { USB_DEVICE(ALINK_VENDOR_ID, 0x9000) },
549 { USB_DEVICE_AND_INTERFACE_INFO(ALINK_VENDOR_ID, ALINK_PRODUCT_3GU, 0xff, 0xff, 0xff) }, 583 { USB_DEVICE_AND_INTERFACE_INFO(ALINK_VENDOR_ID, ALINK_PRODUCT_3GU, 0xff, 0xff, 0xff) },
584 { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S) },
550 { } /* Terminating entry */ 585 { } /* Terminating entry */
551}; 586};
552MODULE_DEVICE_TABLE(usb, option_ids); 587MODULE_DEVICE_TABLE(usb, option_ids);
@@ -555,8 +590,10 @@ static struct usb_driver option_driver = {
555 .name = "option", 590 .name = "option",
556 .probe = usb_serial_probe, 591 .probe = usb_serial_probe,
557 .disconnect = usb_serial_disconnect, 592 .disconnect = usb_serial_disconnect,
593#ifdef CONFIG_PM
558 .suspend = usb_serial_suspend, 594 .suspend = usb_serial_suspend,
559 .resume = usb_serial_resume, 595 .resume = usb_serial_resume,
596#endif
560 .id_table = option_ids, 597 .id_table = option_ids,
561 .no_dynamic_id = 1, 598 .no_dynamic_id = 1,
562}; 599};
@@ -588,8 +625,10 @@ static struct usb_serial_driver option_1port_device = {
588 .disconnect = option_disconnect, 625 .disconnect = option_disconnect,
589 .release = option_release, 626 .release = option_release,
590 .read_int_callback = option_instat_callback, 627 .read_int_callback = option_instat_callback,
628#ifdef CONFIG_PM
591 .suspend = option_suspend, 629 .suspend = option_suspend,
592 .resume = option_resume, 630 .resume = option_resume,
631#endif
593}; 632};
594 633
595static int debug; 634static int debug;
@@ -831,7 +870,6 @@ static void option_instat_callback(struct urb *urb)
831 int status = urb->status; 870 int status = urb->status;
832 struct usb_serial_port *port = urb->context; 871 struct usb_serial_port *port = urb->context;
833 struct option_port_private *portdata = usb_get_serial_port_data(port); 872 struct option_port_private *portdata = usb_get_serial_port_data(port);
834 struct usb_serial *serial = port->serial;
835 873
836 dbg("%s", __func__); 874 dbg("%s", __func__);
837 dbg("%s: urb %p port %p has data %p", __func__, urb, port, portdata); 875 dbg("%s: urb %p port %p has data %p", __func__, urb, port, portdata);
@@ -927,7 +965,6 @@ static int option_open(struct tty_struct *tty,
927 struct usb_serial_port *port, struct file *filp) 965 struct usb_serial_port *port, struct file *filp)
928{ 966{
929 struct option_port_private *portdata; 967 struct option_port_private *portdata;
930 struct usb_serial *serial = port->serial;
931 int i, err; 968 int i, err;
932 struct urb *urb; 969 struct urb *urb;
933 970
@@ -1187,6 +1224,7 @@ static void option_release(struct usb_serial *serial)
1187 } 1224 }
1188} 1225}
1189 1226
1227#ifdef CONFIG_PM
1190static int option_suspend(struct usb_serial *serial, pm_message_t message) 1228static int option_suspend(struct usb_serial *serial, pm_message_t message)
1191{ 1229{
1192 dbg("%s entered", __func__); 1230 dbg("%s entered", __func__);
@@ -1245,6 +1283,7 @@ static int option_resume(struct usb_serial *serial)
1245 } 1283 }
1246 return 0; 1284 return 0;
1247} 1285}
1286#endif
1248 1287
1249MODULE_AUTHOR(DRIVER_AUTHOR); 1288MODULE_AUTHOR(DRIVER_AUTHOR);
1250MODULE_DESCRIPTION(DRIVER_DESC); 1289MODULE_DESCRIPTION(DRIVER_DESC);
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 7d15bfa7c2d..3e86815b270 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -95,6 +95,7 @@ static struct usb_device_id id_table [] = {
95 { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) }, 95 { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) },
96 { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) }, 96 { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) },
97 { USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) }, 97 { USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) },
98 { USB_DEVICE(SONY_VENDOR_ID, SONY_QN3USB_PRODUCT_ID) },
98 { } /* Terminating entry */ 99 { } /* Terminating entry */
99}; 100};
100 101
diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h
index 12aac7d2462..ee9505e1dd9 100644
--- a/drivers/usb/serial/pl2303.h
+++ b/drivers/usb/serial/pl2303.h
@@ -126,3 +126,7 @@
126/* Cressi Edy (diving computer) PC interface */ 126/* Cressi Edy (diving computer) PC interface */
127#define CRESSI_VENDOR_ID 0x04b8 127#define CRESSI_VENDOR_ID 0x04b8
128#define CRESSI_EDY_PRODUCT_ID 0x0521 128#define CRESSI_EDY_PRODUCT_ID 0x0521
129
130/* Sony, USB data cable for CMD-Jxx mobile phones */
131#define SONY_VENDOR_ID 0x054c
132#define SONY_QN3USB_PRODUCT_ID 0x0437
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index 14971a92699..3bc609fe224 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -727,7 +727,7 @@ static int ti_write_room(struct tty_struct *tty)
727 dbg("%s - port %d", __func__, port->number); 727 dbg("%s - port %d", __func__, port->number);
728 728
729 if (tport == NULL) 729 if (tport == NULL)
730 return -ENODEV; 730 return 0;
731 731
732 spin_lock_irqsave(&tport->tp_lock, flags); 732 spin_lock_irqsave(&tport->tp_lock, flags);
733 room = ti_buf_space_avail(tport->tp_write_buf); 733 room = ti_buf_space_avail(tport->tp_write_buf);
@@ -748,7 +748,7 @@ static int ti_chars_in_buffer(struct tty_struct *tty)
748 dbg("%s - port %d", __func__, port->number); 748 dbg("%s - port %d", __func__, port->number);
749 749
750 if (tport == NULL) 750 if (tport == NULL)
751 return -ENODEV; 751 return 0;
752 752
753 spin_lock_irqsave(&tport->tp_lock, flags); 753 spin_lock_irqsave(&tport->tp_lock, flags);
754 chars = ti_buf_data_avail(tport->tp_write_buf); 754 chars = ti_buf_data_avail(tport->tp_write_buf);
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index bd7581b3a48..99188c92068 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -32,6 +32,7 @@
32#include <linux/mutex.h> 32#include <linux/mutex.h>
33#include <linux/list.h> 33#include <linux/list.h>
34#include <linux/uaccess.h> 34#include <linux/uaccess.h>
35#include <linux/serial.h>
35#include <linux/usb.h> 36#include <linux/usb.h>
36#include <linux/usb/serial.h> 37#include <linux/usb/serial.h>
37#include "pl2303.h" 38#include "pl2303.h"
@@ -184,6 +185,7 @@ static int serial_open (struct tty_struct *tty, struct file *filp)
184 struct usb_serial_port *port; 185 struct usb_serial_port *port;
185 unsigned int portNumber; 186 unsigned int portNumber;
186 int retval = 0; 187 int retval = 0;
188 int first = 0;
187 189
188 dbg("%s", __func__); 190 dbg("%s", __func__);
189 191
@@ -223,7 +225,7 @@ static int serial_open (struct tty_struct *tty, struct file *filp)
223 225
224 /* If the console is attached, the device is already open */ 226 /* If the console is attached, the device is already open */
225 if (port->port.count == 1 && !port->console) { 227 if (port->port.count == 1 && !port->console) {
226 228 first = 1;
227 /* lock this module before we call it 229 /* lock this module before we call it
228 * this may fail, which means we must bail out, 230 * this may fail, which means we must bail out,
229 * safe because we are called with BKL held */ 231 * safe because we are called with BKL held */
@@ -246,13 +248,21 @@ static int serial_open (struct tty_struct *tty, struct file *filp)
246 if (retval) 248 if (retval)
247 goto bailout_interface_put; 249 goto bailout_interface_put;
248 mutex_unlock(&serial->disc_mutex); 250 mutex_unlock(&serial->disc_mutex);
251 set_bit(ASYNCB_INITIALIZED, &port->port.flags);
249 } 252 }
250 mutex_unlock(&port->mutex); 253 mutex_unlock(&port->mutex);
251 /* Now do the correct tty layer semantics */ 254 /* Now do the correct tty layer semantics */
252 retval = tty_port_block_til_ready(&port->port, tty, filp); 255 retval = tty_port_block_til_ready(&port->port, tty, filp);
253 if (retval == 0) 256 if (retval == 0) {
257 if (!first)
258 usb_serial_put(serial);
254 return 0; 259 return 0;
255 260 }
261 mutex_lock(&port->mutex);
262 if (first == 0)
263 goto bailout_mutex_unlock;
264 /* Undo the initial port actions */
265 mutex_lock(&serial->disc_mutex);
256bailout_interface_put: 266bailout_interface_put:
257 usb_autopm_put_interface(serial->interface); 267 usb_autopm_put_interface(serial->interface);
258bailout_module_put: 268bailout_module_put:
@@ -340,6 +350,22 @@ static void serial_close(struct tty_struct *tty, struct file *filp)
340 350
341 dbg("%s - port %d", __func__, port->number); 351 dbg("%s - port %d", __func__, port->number);
342 352
353 /* FIXME:
354 This leaves a very narrow race. Really we should do the
355 serial_do_free() on tty->shutdown(), but tty->shutdown can
356 be called from IRQ context and serial_do_free can sleep.
357
358 The right fix is probably to make the tty free (which is rare)
359 and thus tty->shutdown() occur via a work queue and simplify all
360 the drivers that use it.
361 */
362 if (tty_hung_up_p(filp)) {
363 /* serial_hangup already called serial_down at this point.
364 Another user may have already reopened the port but
365 serial_do_free is refcounted */
366 serial_do_free(port);
367 return;
368 }
343 369
344 if (tty_port_close_start(&port->port, tty, filp) == 0) 370 if (tty_port_close_start(&port->port, tty, filp) == 0)
345 return; 371 return;
@@ -355,7 +381,8 @@ static void serial_hangup(struct tty_struct *tty)
355 struct usb_serial_port *port = tty->driver_data; 381 struct usb_serial_port *port = tty->driver_data;
356 serial_do_down(port); 382 serial_do_down(port);
357 tty_port_hangup(&port->port); 383 tty_port_hangup(&port->port);
358 serial_do_free(port); 384 /* We must not free port yet - the USB serial layer depends on it's
385 continued existence */
359} 386}
360 387
361static int serial_write(struct tty_struct *tty, const unsigned char *buf, 388static int serial_write(struct tty_struct *tty, const unsigned char *buf,
@@ -394,7 +421,6 @@ static int serial_chars_in_buffer(struct tty_struct *tty)
394 struct usb_serial_port *port = tty->driver_data; 421 struct usb_serial_port *port = tty->driver_data;
395 dbg("%s = port %d", __func__, port->number); 422 dbg("%s = port %d", __func__, port->number);
396 423
397 WARN_ON(!port->port.count);
398 /* if the device was unplugged then any remaining characters 424 /* if the device was unplugged then any remaining characters
399 fell out of the connector ;) */ 425 fell out of the connector ;) */
400 if (port->serial->disconnected) 426 if (port->serial->disconnected)
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
index fcb32021721..e20dc525d17 100644
--- a/drivers/usb/storage/transport.c
+++ b/drivers/usb/storage/transport.c
@@ -961,7 +961,7 @@ int usb_stor_Bulk_max_lun(struct us_data *us)
961 US_BULK_GET_MAX_LUN, 961 US_BULK_GET_MAX_LUN,
962 USB_DIR_IN | USB_TYPE_CLASS | 962 USB_DIR_IN | USB_TYPE_CLASS |
963 USB_RECIP_INTERFACE, 963 USB_RECIP_INTERFACE,
964 0, us->ifnum, us->iobuf, 1, HZ); 964 0, us->ifnum, us->iobuf, 1, 10*HZ);
965 965
966 US_DEBUGP("GetMaxLUN command result is %d, data is %d\n", 966 US_DEBUGP("GetMaxLUN command result is %d, data is %d\n",
967 result, us->iobuf[0]); 967 result, us->iobuf[0]);
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index 1b9c5dd0fb2..7477d411959 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -838,6 +838,13 @@ UNUSUAL_DEV( 0x066f, 0x8000, 0x0001, 0x0001,
838 US_SC_DEVICE, US_PR_DEVICE, NULL, 838 US_SC_DEVICE, US_PR_DEVICE, NULL,
839 US_FL_FIX_CAPACITY ), 839 US_FL_FIX_CAPACITY ),
840 840
841/* Reported by Rogerio Brito <rbrito@ime.usp.br> */
842UNUSUAL_DEV( 0x067b, 0x2317, 0x0001, 0x001,
843 "Prolific Technology, Inc.",
844 "Mass Storage Device",
845 US_SC_DEVICE, US_PR_DEVICE, NULL,
846 US_FL_NOT_LOCKABLE ),
847
841/* Reported by Richard -=[]=- <micro_flyer@hotmail.com> */ 848/* Reported by Richard -=[]=- <micro_flyer@hotmail.com> */
842/* Change to bcdDeviceMin (0x0100 to 0x0001) reported by 849/* Change to bcdDeviceMin (0x0100 to 0x0001) reported by
843 * Thomas Bartosik <tbartdev@gmx-topmail.de> */ 850 * Thomas Bartosik <tbartdev@gmx-topmail.de> */
diff --git a/drivers/video/backlight/jornada720_bl.c b/drivers/video/backlight/jornada720_bl.c
index c3ebb6b41ce..7aed2565c1b 100644
--- a/drivers/video/backlight/jornada720_bl.c
+++ b/drivers/video/backlight/jornada720_bl.c
@@ -72,7 +72,7 @@ static int jornada_bl_update_status(struct backlight_device *bd)
72 if (jornada_ssp_byte(SETBRIGHTNESS) != TXDUMMY) { 72 if (jornada_ssp_byte(SETBRIGHTNESS) != TXDUMMY) {
73 printk(KERN_INFO "bl : failed to set brightness\n"); 73 printk(KERN_INFO "bl : failed to set brightness\n");
74 ret = -ETIMEDOUT; 74 ret = -ETIMEDOUT;
75 goto out 75 goto out;
76 } 76 }
77 77
78 /* at this point we expect that the mcu has accepted 78 /* at this point we expect that the mcu has accepted
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index e641584e212..88716626744 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -145,6 +145,8 @@ static int pwm_backlight_suspend(struct platform_device *pdev,
145 struct backlight_device *bl = platform_get_drvdata(pdev); 145 struct backlight_device *bl = platform_get_drvdata(pdev);
146 struct pwm_bl_data *pb = dev_get_drvdata(&bl->dev); 146 struct pwm_bl_data *pb = dev_get_drvdata(&bl->dev);
147 147
148 if (pb->notify)
149 pb->notify(0);
148 pwm_config(pb->pwm, 0, pb->period); 150 pwm_config(pb->pwm, 0, pb->period);
149 pwm_disable(pb->pwm); 151 pwm_disable(pb->pwm);
150 return 0; 152 return 0;
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 471a9a60376..3a44695b9c0 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -1082,7 +1082,6 @@ static void fbcon_init(struct vc_data *vc, int init)
1082 new_rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres); 1082 new_rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
1083 new_cols /= vc->vc_font.width; 1083 new_cols /= vc->vc_font.width;
1084 new_rows /= vc->vc_font.height; 1084 new_rows /= vc->vc_font.height;
1085 vc_resize(vc, new_cols, new_rows);
1086 1085
1087 /* 1086 /*
1088 * We must always set the mode. The mode of the previous console 1087 * We must always set the mode. The mode of the previous console
@@ -1111,10 +1110,11 @@ static void fbcon_init(struct vc_data *vc, int init)
1111 * vc_{cols,rows}, but we must not set those if we are only 1110 * vc_{cols,rows}, but we must not set those if we are only
1112 * resizing the console. 1111 * resizing the console.
1113 */ 1112 */
1114 if (!init) { 1113 if (init) {
1115 vc->vc_cols = new_cols; 1114 vc->vc_cols = new_cols;
1116 vc->vc_rows = new_rows; 1115 vc->vc_rows = new_rows;
1117 } 1116 } else
1117 vc_resize(vc, new_cols, new_rows);
1118 1118
1119 if (logo) 1119 if (logo)
1120 fbcon_prepare_logo(vc, info, cols, rows, new_cols, new_rows); 1120 fbcon_prepare_logo(vc, info, cols, rows, new_cols, new_rows);
diff --git a/drivers/video/console/fbcon_rotate.h b/drivers/video/console/fbcon_rotate.h
index 75be5ce53dc..e233444cda6 100644
--- a/drivers/video/console/fbcon_rotate.h
+++ b/drivers/video/console/fbcon_rotate.h
@@ -45,7 +45,7 @@ static inline void rotate_ud(const char *in, char *out, u32 width, u32 height)
45 width = (width + 7) & ~7; 45 width = (width + 7) & ~7;
46 46
47 for (i = 0; i < height; i++) { 47 for (i = 0; i < height; i++) {
48 for (j = 0; j < width; j++) { 48 for (j = 0; j < width - shift; j++) {
49 if (pattern_test_bit(j, i, width, in)) 49 if (pattern_test_bit(j, i, width, in))
50 pattern_set_bit(width - (1 + j + shift), 50 pattern_set_bit(width - (1 + j + shift),
51 height - (1 + i), 51 height - (1 + i),
diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c
index ef7870f5ea0..857b3668b3b 100644
--- a/drivers/video/console/sticore.c
+++ b/drivers/video/console/sticore.c
@@ -957,9 +957,14 @@ static int __devinit sticore_pci_init(struct pci_dev *pd,
957#ifdef CONFIG_PCI 957#ifdef CONFIG_PCI
958 unsigned long fb_base, rom_base; 958 unsigned long fb_base, rom_base;
959 unsigned int fb_len, rom_len; 959 unsigned int fb_len, rom_len;
960 int err;
960 struct sti_struct *sti; 961 struct sti_struct *sti;
961 962
962 pci_enable_device(pd); 963 err = pci_enable_device(pd);
964 if (err < 0) {
965 dev_err(&pd->dev, "Cannot enable PCI device\n");
966 return err;
967 }
963 968
964 fb_base = pci_resource_start(pd, 0); 969 fb_base = pci_resource_start(pd, 0);
965 fb_len = pci_resource_len(pd, 0); 970 fb_len = pci_resource_len(pd, 0);
@@ -1048,7 +1053,7 @@ static void __devinit sti_init_roms(void)
1048 1053
1049 /* Register drivers for native & PCI cards */ 1054 /* Register drivers for native & PCI cards */
1050 register_parisc_driver(&pa_sti_driver); 1055 register_parisc_driver(&pa_sti_driver);
1051 pci_register_driver(&pci_sti_driver); 1056 WARN_ON(pci_register_driver(&pci_sti_driver));
1052 1057
1053 /* if we didn't find the given default sti, take the first one */ 1058 /* if we didn't find the given default sti, take the first one */
1054 if (!default_sti) 1059 if (!default_sti)
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
index 5c1a2c01778..9ae9cd32bd0 100644
--- a/drivers/video/fbmon.c
+++ b/drivers/video/fbmon.c
@@ -256,8 +256,8 @@ static void fix_edid(unsigned char *edid, int fix)
256 256
257static int edid_checksum(unsigned char *edid) 257static int edid_checksum(unsigned char *edid)
258{ 258{
259 unsigned char i, csum = 0, all_null = 0; 259 unsigned char csum = 0, all_null = 0;
260 int err = 0, fix = check_edid(edid); 260 int i, err = 0, fix = check_edid(edid);
261 261
262 if (fix) 262 if (fix)
263 fix_edid(edid, fix); 263 fix_edid(edid, fix);
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
index f8778cde218..054ef29be47 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -669,7 +669,8 @@ static uint32_t bpp_to_pixfmt(int bpp)
669} 669}
670 670
671static int mx3fb_blank(int blank, struct fb_info *fbi); 671static int mx3fb_blank(int blank, struct fb_info *fbi);
672static int mx3fb_map_video_memory(struct fb_info *fbi, unsigned int mem_len); 672static int mx3fb_map_video_memory(struct fb_info *fbi, unsigned int mem_len,
673 bool lock);
673static int mx3fb_unmap_video_memory(struct fb_info *fbi); 674static int mx3fb_unmap_video_memory(struct fb_info *fbi);
674 675
675/** 676/**
@@ -711,12 +712,7 @@ static void mx3fb_dma_done(void *arg)
711 complete(&mx3_fbi->flip_cmpl); 712 complete(&mx3_fbi->flip_cmpl);
712} 713}
713 714
714/** 715static int __set_par(struct fb_info *fbi, bool lock)
715 * mx3fb_set_par() - set framebuffer parameters and change the operating mode.
716 * @fbi: framebuffer information pointer.
717 * @return: 0 on success or negative error code on failure.
718 */
719static int mx3fb_set_par(struct fb_info *fbi)
720{ 716{
721 u32 mem_len; 717 u32 mem_len;
722 struct ipu_di_signal_cfg sig_cfg; 718 struct ipu_di_signal_cfg sig_cfg;
@@ -727,10 +723,6 @@ static int mx3fb_set_par(struct fb_info *fbi)
727 struct idmac_video_param *video = &ichan->params.video; 723 struct idmac_video_param *video = &ichan->params.video;
728 struct scatterlist *sg = mx3_fbi->sg; 724 struct scatterlist *sg = mx3_fbi->sg;
729 725
730 dev_dbg(mx3fb->dev, "%s [%c]\n", __func__, list_empty(&ichan->queue) ? '-' : '+');
731
732 mutex_lock(&mx3_fbi->mutex);
733
734 /* Total cleanup */ 726 /* Total cleanup */
735 if (mx3_fbi->txd) 727 if (mx3_fbi->txd)
736 sdc_disable_channel(mx3_fbi); 728 sdc_disable_channel(mx3_fbi);
@@ -742,10 +734,8 @@ static int mx3fb_set_par(struct fb_info *fbi)
742 if (fbi->fix.smem_start) 734 if (fbi->fix.smem_start)
743 mx3fb_unmap_video_memory(fbi); 735 mx3fb_unmap_video_memory(fbi);
744 736
745 if (mx3fb_map_video_memory(fbi, mem_len) < 0) { 737 if (mx3fb_map_video_memory(fbi, mem_len, lock) < 0)
746 mutex_unlock(&mx3_fbi->mutex);
747 return -ENOMEM; 738 return -ENOMEM;
748 }
749 } 739 }
750 740
751 sg_init_table(&sg[0], 1); 741 sg_init_table(&sg[0], 1);
@@ -791,7 +781,6 @@ static int mx3fb_set_par(struct fb_info *fbi)
791 fbi->var.vsync_len, 781 fbi->var.vsync_len,
792 fbi->var.lower_margin + 782 fbi->var.lower_margin +
793 fbi->var.vsync_len, sig_cfg) != 0) { 783 fbi->var.vsync_len, sig_cfg) != 0) {
794 mutex_unlock(&mx3_fbi->mutex);
795 dev_err(fbi->device, 784 dev_err(fbi->device,
796 "mx3fb: Error initializing panel.\n"); 785 "mx3fb: Error initializing panel.\n");
797 return -EINVAL; 786 return -EINVAL;
@@ -810,9 +799,30 @@ static int mx3fb_set_par(struct fb_info *fbi)
810 if (mx3_fbi->blank == FB_BLANK_UNBLANK) 799 if (mx3_fbi->blank == FB_BLANK_UNBLANK)
811 sdc_enable_channel(mx3_fbi); 800 sdc_enable_channel(mx3_fbi);
812 801
802 return 0;
803}
804
805/**
806 * mx3fb_set_par() - set framebuffer parameters and change the operating mode.
807 * @fbi: framebuffer information pointer.
808 * @return: 0 on success or negative error code on failure.
809 */
810static int mx3fb_set_par(struct fb_info *fbi)
811{
812 struct mx3fb_info *mx3_fbi = fbi->par;
813 struct mx3fb_data *mx3fb = mx3_fbi->mx3fb;
814 struct idmac_channel *ichan = mx3_fbi->idmac_channel;
815 int ret;
816
817 dev_dbg(mx3fb->dev, "%s [%c]\n", __func__, list_empty(&ichan->queue) ? '-' : '+');
818
819 mutex_lock(&mx3_fbi->mutex);
820
821 ret = __set_par(fbi, true);
822
813 mutex_unlock(&mx3_fbi->mutex); 823 mutex_unlock(&mx3_fbi->mutex);
814 824
815 return 0; 825 return ret;
816} 826}
817 827
818/** 828/**
@@ -966,21 +976,11 @@ static int mx3fb_setcolreg(unsigned int regno, unsigned int red,
966 return ret; 976 return ret;
967} 977}
968 978
969/** 979static void __blank(int blank, struct fb_info *fbi)
970 * mx3fb_blank() - blank the display.
971 */
972static int mx3fb_blank(int blank, struct fb_info *fbi)
973{ 980{
974 struct mx3fb_info *mx3_fbi = fbi->par; 981 struct mx3fb_info *mx3_fbi = fbi->par;
975 struct mx3fb_data *mx3fb = mx3_fbi->mx3fb; 982 struct mx3fb_data *mx3fb = mx3_fbi->mx3fb;
976 983
977 dev_dbg(fbi->device, "%s, blank = %d, base %p, len %u\n", __func__,
978 blank, fbi->screen_base, fbi->fix.smem_len);
979
980 if (mx3_fbi->blank == blank)
981 return 0;
982
983 mutex_lock(&mx3_fbi->mutex);
984 mx3_fbi->blank = blank; 984 mx3_fbi->blank = blank;
985 985
986 switch (blank) { 986 switch (blank) {
@@ -999,6 +999,23 @@ static int mx3fb_blank(int blank, struct fb_info *fbi)
999 sdc_set_brightness(mx3fb, mx3fb->backlight_level); 999 sdc_set_brightness(mx3fb, mx3fb->backlight_level);
1000 break; 1000 break;
1001 } 1001 }
1002}
1003
1004/**
1005 * mx3fb_blank() - blank the display.
1006 */
1007static int mx3fb_blank(int blank, struct fb_info *fbi)
1008{
1009 struct mx3fb_info *mx3_fbi = fbi->par;
1010
1011 dev_dbg(fbi->device, "%s, blank = %d, base %p, len %u\n", __func__,
1012 blank, fbi->screen_base, fbi->fix.smem_len);
1013
1014 if (mx3_fbi->blank == blank)
1015 return 0;
1016
1017 mutex_lock(&mx3_fbi->mutex);
1018 __blank(blank, fbi);
1002 mutex_unlock(&mx3_fbi->mutex); 1019 mutex_unlock(&mx3_fbi->mutex);
1003 1020
1004 return 0; 1021 return 0;
@@ -1198,6 +1215,7 @@ static int mx3fb_resume(struct platform_device *pdev)
1198 * mx3fb_map_video_memory() - allocates the DRAM memory for the frame buffer. 1215 * mx3fb_map_video_memory() - allocates the DRAM memory for the frame buffer.
1199 * @fbi: framebuffer information pointer 1216 * @fbi: framebuffer information pointer
1200 * @mem_len: length of mapped memory 1217 * @mem_len: length of mapped memory
1218 * @lock: do not lock during initialisation
1201 * @return: Error code indicating success or failure 1219 * @return: Error code indicating success or failure
1202 * 1220 *
1203 * This buffer is remapped into a non-cached, non-buffered, memory region to 1221 * This buffer is remapped into a non-cached, non-buffered, memory region to
@@ -1205,7 +1223,8 @@ static int mx3fb_resume(struct platform_device *pdev)
1205 * area is remapped, all virtual memory access to the video memory should occur 1223 * area is remapped, all virtual memory access to the video memory should occur
1206 * at the new region. 1224 * at the new region.
1207 */ 1225 */
1208static int mx3fb_map_video_memory(struct fb_info *fbi, unsigned int mem_len) 1226static int mx3fb_map_video_memory(struct fb_info *fbi, unsigned int mem_len,
1227 bool lock)
1209{ 1228{
1210 int retval = 0; 1229 int retval = 0;
1211 dma_addr_t addr; 1230 dma_addr_t addr;
@@ -1221,10 +1240,12 @@ static int mx3fb_map_video_memory(struct fb_info *fbi, unsigned int mem_len)
1221 goto err0; 1240 goto err0;
1222 } 1241 }
1223 1242
1224 mutex_lock(&fbi->mm_lock); 1243 if (lock)
1244 mutex_lock(&fbi->mm_lock);
1225 fbi->fix.smem_start = addr; 1245 fbi->fix.smem_start = addr;
1226 fbi->fix.smem_len = mem_len; 1246 fbi->fix.smem_len = mem_len;
1227 mutex_unlock(&fbi->mm_lock); 1247 if (lock)
1248 mutex_unlock(&fbi->mm_lock);
1228 1249
1229 dev_dbg(fbi->device, "allocated fb @ p=0x%08x, v=0x%p, size=%d.\n", 1250 dev_dbg(fbi->device, "allocated fb @ p=0x%08x, v=0x%p, size=%d.\n",
1230 (uint32_t) fbi->fix.smem_start, fbi->screen_base, fbi->fix.smem_len); 1251 (uint32_t) fbi->fix.smem_start, fbi->screen_base, fbi->fix.smem_len);
@@ -1365,6 +1386,11 @@ static int init_fb_chan(struct mx3fb_data *mx3fb, struct idmac_channel *ichan)
1365 init_completion(&mx3fbi->flip_cmpl); 1386 init_completion(&mx3fbi->flip_cmpl);
1366 disable_irq(ichan->eof_irq); 1387 disable_irq(ichan->eof_irq);
1367 dev_dbg(mx3fb->dev, "disabling irq %d\n", ichan->eof_irq); 1388 dev_dbg(mx3fb->dev, "disabling irq %d\n", ichan->eof_irq);
1389 ret = __set_par(fbi, false);
1390 if (ret < 0)
1391 goto esetpar;
1392
1393 __blank(FB_BLANK_UNBLANK, fbi);
1368 1394
1369 dev_info(dev, "registered, using mode %s\n", fb_mode); 1395 dev_info(dev, "registered, using mode %s\n", fb_mode);
1370 1396
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index bb63c07e13d..5a72083dc67 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -964,7 +964,7 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev)
964 struct s3c_fb *sfb = platform_get_drvdata(pdev); 964 struct s3c_fb *sfb = platform_get_drvdata(pdev);
965 int win; 965 int win;
966 966
967 for (win = 0; win <= S3C_FB_MAX_WIN; win++) 967 for (win = 0; win < S3C_FB_MAX_WIN; win++)
968 if (sfb->windows[win]) 968 if (sfb->windows[win])
969 s3c_fb_release_win(sfb, sfb->windows[win]); 969 s3c_fb_release_win(sfb, sfb->windows[win]);
970 970
@@ -988,7 +988,7 @@ static int s3c_fb_suspend(struct platform_device *pdev, pm_message_t state)
988 struct s3c_fb_win *win; 988 struct s3c_fb_win *win;
989 int win_no; 989 int win_no;
990 990
991 for (win_no = S3C_FB_MAX_WIN; win_no >= 0; win_no--) { 991 for (win_no = S3C_FB_MAX_WIN - 1; win_no >= 0; win_no--) {
992 win = sfb->windows[win_no]; 992 win = sfb->windows[win_no];
993 if (!win) 993 if (!win)
994 continue; 994 continue;
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index fcd53ceb88f..c8960003f47 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -2407,14 +2407,14 @@ int viafb_setmode(int vmode_index, int hor_res, int ver_res, int video_bpp,
2407 viafb_dvi_set_mode(viafb_get_mode_index 2407 viafb_dvi_set_mode(viafb_get_mode_index
2408 (viaparinfo->tmds_setting_info->h_active, 2408 (viaparinfo->tmds_setting_info->h_active,
2409 viaparinfo->tmds_setting_info-> 2409 viaparinfo->tmds_setting_info->
2410 v_active, 1), 2410 v_active),
2411 video_bpp1, viaparinfo-> 2411 video_bpp1, viaparinfo->
2412 tmds_setting_info->iga_path); 2412 tmds_setting_info->iga_path);
2413 } else { 2413 } else {
2414 viafb_dvi_set_mode(viafb_get_mode_index 2414 viafb_dvi_set_mode(viafb_get_mode_index
2415 (viaparinfo->tmds_setting_info->h_active, 2415 (viaparinfo->tmds_setting_info->h_active,
2416 viaparinfo-> 2416 viaparinfo->
2417 tmds_setting_info->v_active, 0), 2417 tmds_setting_info->v_active),
2418 video_bpp, viaparinfo-> 2418 video_bpp, viaparinfo->
2419 tmds_setting_info->iga_path); 2419 tmds_setting_info->iga_path);
2420 } 2420 }
diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c
index 6c7290a6a44..78c6b338794 100644
--- a/drivers/video/via/lcd.c
+++ b/drivers/video/via/lcd.c
@@ -580,10 +580,7 @@ static void load_lcd_k400_patch_tbl(int set_hres, int set_vres,
580 int reg_num = 0; 580 int reg_num = 0;
581 struct io_reg *lcd_patch_reg = NULL; 581 struct io_reg *lcd_patch_reg = NULL;
582 582
583 if (viaparinfo->lvds_setting_info->iga_path == IGA2) 583 vmode_index = viafb_get_mode_index(set_hres, set_vres);
584 vmode_index = viafb_get_mode_index(set_hres, set_vres, 1);
585 else
586 vmode_index = viafb_get_mode_index(set_hres, set_vres, 0);
587 switch (panel_id) { 584 switch (panel_id) {
588 /* LCD 800x600 */ 585 /* LCD 800x600 */
589 case LCD_PANEL_ID1_800X600: 586 case LCD_PANEL_ID1_800X600:
@@ -761,10 +758,7 @@ static void load_lcd_p880_patch_tbl(int set_hres, int set_vres,
761 int reg_num = 0; 758 int reg_num = 0;
762 struct io_reg *lcd_patch_reg = NULL; 759 struct io_reg *lcd_patch_reg = NULL;
763 760
764 if (viaparinfo->lvds_setting_info->iga_path == IGA2) 761 vmode_index = viafb_get_mode_index(set_hres, set_vres);
765 vmode_index = viafb_get_mode_index(set_hres, set_vres, 1);
766 else
767 vmode_index = viafb_get_mode_index(set_hres, set_vres, 0);
768 762
769 switch (panel_id) { 763 switch (panel_id) {
770 case LCD_PANEL_ID5_1400X1050: 764 case LCD_PANEL_ID5_1400X1050:
@@ -832,10 +826,7 @@ static void load_lcd_patch_regs(int set_hres, int set_vres,
832{ 826{
833 int vmode_index; 827 int vmode_index;
834 828
835 if (viaparinfo->lvds_setting_info->iga_path == IGA2) 829 vmode_index = viafb_get_mode_index(set_hres, set_vres);
836 vmode_index = viafb_get_mode_index(set_hres, set_vres, 1);
837 else
838 vmode_index = viafb_get_mode_index(set_hres, set_vres, 0);
839 830
840 viafb_unlock_crt(); 831 viafb_unlock_crt();
841 832
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index a0fec298216..72833f3334b 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -32,7 +32,6 @@ static u32 pseudo_pal[17];
32/* video mode */ 32/* video mode */
33static char *viafb_mode = "640x480"; 33static char *viafb_mode = "640x480";
34static char *viafb_mode1 = "640x480"; 34static char *viafb_mode1 = "640x480";
35static int viafb_resMode = VIA_RES_640X480;
36 35
37/* Added for specifying active devices.*/ 36/* Added for specifying active devices.*/
38char *viafb_active_dev = ""; 37char *viafb_active_dev = "";
@@ -56,47 +55,47 @@ static void viafb_get_video_device(u32 *video_dev_info);
56 55
57/* Mode information */ 56/* Mode information */
58static const struct viafb_modeinfo viafb_modentry[] = { 57static const struct viafb_modeinfo viafb_modentry[] = {
59 {480, 640, VIA_RES_480X640, "480x640"}, 58 {480, 640, VIA_RES_480X640},
60 {640, 480, VIA_RES_640X480, "640x480"}, 59 {640, 480, VIA_RES_640X480},
61 {800, 480, VIA_RES_800X480, "800x480"}, 60 {800, 480, VIA_RES_800X480},
62 {800, 600, VIA_RES_800X600, "800x600"}, 61 {800, 600, VIA_RES_800X600},
63 {1024, 768, VIA_RES_1024X768, "1024x768"}, 62 {1024, 768, VIA_RES_1024X768},
64 {1152, 864, VIA_RES_1152X864, "1152x864"}, 63 {1152, 864, VIA_RES_1152X864},
65 {1280, 1024, VIA_RES_1280X1024, "1280x1024"}, 64 {1280, 1024, VIA_RES_1280X1024},
66 {1600, 1200, VIA_RES_1600X1200, "1600x1200"}, 65 {1600, 1200, VIA_RES_1600X1200},
67 {1440, 1050, VIA_RES_1440X1050, "1440x1050"}, 66 {1440, 1050, VIA_RES_1440X1050},
68 {1280, 768, VIA_RES_1280X768, "1280x768"}, 67 {1280, 768, VIA_RES_1280X768,},
69 {1280, 800, VIA_RES_1280X800, "1280x800"}, 68 {1280, 800, VIA_RES_1280X800},
70 {1280, 960, VIA_RES_1280X960, "1280x960"}, 69 {1280, 960, VIA_RES_1280X960},
71 {1920, 1440, VIA_RES_1920X1440, "1920x1440"}, 70 {1920, 1440, VIA_RES_1920X1440},
72 {848, 480, VIA_RES_848X480, "848x480"}, 71 {848, 480, VIA_RES_848X480},
73 {1400, 1050, VIA_RES_1400X1050, "1400x1050"}, 72 {1400, 1050, VIA_RES_1400X1050},
74 {720, 480, VIA_RES_720X480, "720x480"}, 73 {720, 480, VIA_RES_720X480},
75 {720, 576, VIA_RES_720X576, "720x576"}, 74 {720, 576, VIA_RES_720X576},
76 {1024, 512, VIA_RES_1024X512, "1024x512"}, 75 {1024, 512, VIA_RES_1024X512},
77 {1024, 576, VIA_RES_1024X576, "1024x576"}, 76 {1024, 576, VIA_RES_1024X576},
78 {1024, 600, VIA_RES_1024X600, "1024x600"}, 77 {1024, 600, VIA_RES_1024X600},
79 {1280, 720, VIA_RES_1280X720, "1280x720"}, 78 {1280, 720, VIA_RES_1280X720},
80 {1920, 1080, VIA_RES_1920X1080, "1920x1080"}, 79 {1920, 1080, VIA_RES_1920X1080},
81 {1366, 768, VIA_RES_1368X768, "1368x768"}, 80 {1366, 768, VIA_RES_1368X768},
82 {1680, 1050, VIA_RES_1680X1050, "1680x1050"}, 81 {1680, 1050, VIA_RES_1680X1050},
83 {960, 600, VIA_RES_960X600, "960x600"}, 82 {960, 600, VIA_RES_960X600},
84 {1000, 600, VIA_RES_1000X600, "1000x600"}, 83 {1000, 600, VIA_RES_1000X600},
85 {1024, 576, VIA_RES_1024X576, "1024x576"}, 84 {1024, 576, VIA_RES_1024X576},
86 {1024, 600, VIA_RES_1024X600, "1024x600"}, 85 {1024, 600, VIA_RES_1024X600},
87 {1088, 612, VIA_RES_1088X612, "1088x612"}, 86 {1088, 612, VIA_RES_1088X612},
88 {1152, 720, VIA_RES_1152X720, "1152x720"}, 87 {1152, 720, VIA_RES_1152X720},
89 {1200, 720, VIA_RES_1200X720, "1200x720"}, 88 {1200, 720, VIA_RES_1200X720},
90 {1280, 600, VIA_RES_1280X600, "1280x600"}, 89 {1280, 600, VIA_RES_1280X600},
91 {1360, 768, VIA_RES_1360X768, "1360x768"}, 90 {1360, 768, VIA_RES_1360X768},
92 {1440, 900, VIA_RES_1440X900, "1440x900"}, 91 {1440, 900, VIA_RES_1440X900},
93 {1600, 900, VIA_RES_1600X900, "1600x900"}, 92 {1600, 900, VIA_RES_1600X900},
94 {1600, 1024, VIA_RES_1600X1024, "1600x1024"}, 93 {1600, 1024, VIA_RES_1600X1024},
95 {1792, 1344, VIA_RES_1792X1344, "1792x1344"}, 94 {1792, 1344, VIA_RES_1792X1344},
96 {1856, 1392, VIA_RES_1856X1392, "1856x1392"}, 95 {1856, 1392, VIA_RES_1856X1392},
97 {1920, 1200, VIA_RES_1920X1200, "1920x1200"}, 96 {1920, 1200, VIA_RES_1920X1200},
98 {2048, 1536, VIA_RES_2048X1536, "2048x1536"}, 97 {2048, 1536, VIA_RES_2048X1536},
99 {0, 0, VIA_RES_INVALID, "640x480"} 98 {0, 0, VIA_RES_INVALID}
100}; 99};
101 100
102static struct fb_ops viafb_ops; 101static struct fb_ops viafb_ops;
@@ -177,7 +176,7 @@ static int viafb_check_var(struct fb_var_screeninfo *var,
177 if (var->vmode & FB_VMODE_INTERLACED || var->vmode & FB_VMODE_DOUBLE) 176 if (var->vmode & FB_VMODE_INTERLACED || var->vmode & FB_VMODE_DOUBLE)
178 return -EINVAL; 177 return -EINVAL;
179 178
180 vmode_index = viafb_get_mode_index(var->xres, var->yres, 0); 179 vmode_index = viafb_get_mode_index(var->xres, var->yres);
181 if (vmode_index == VIA_RES_INVALID) { 180 if (vmode_index == VIA_RES_INVALID) {
182 DEBUG_MSG(KERN_INFO 181 DEBUG_MSG(KERN_INFO
183 "viafb: Mode %dx%dx%d not supported!!\n", 182 "viafb: Mode %dx%dx%d not supported!!\n",
@@ -233,14 +232,14 @@ static int viafb_set_par(struct fb_info *info)
233 viafb_update_device_setting(info->var.xres, info->var.yres, 232 viafb_update_device_setting(info->var.xres, info->var.yres,
234 info->var.bits_per_pixel, viafb_refresh, 0); 233 info->var.bits_per_pixel, viafb_refresh, 0);
235 234
236 vmode_index = viafb_get_mode_index(info->var.xres, info->var.yres, 0); 235 vmode_index = viafb_get_mode_index(info->var.xres, info->var.yres);
237 236
238 if (viafb_SAMM_ON == 1) { 237 if (viafb_SAMM_ON == 1) {
239 DEBUG_MSG(KERN_INFO 238 DEBUG_MSG(KERN_INFO
240 "viafb_second_xres = %d, viafb_second_yres = %d, bpp = %d\n", 239 "viafb_second_xres = %d, viafb_second_yres = %d, bpp = %d\n",
241 viafb_second_xres, viafb_second_yres, viafb_bpp1); 240 viafb_second_xres, viafb_second_yres, viafb_bpp1);
242 vmode_index1 = viafb_get_mode_index(viafb_second_xres, 241 vmode_index1 = viafb_get_mode_index(viafb_second_xres,
243 viafb_second_yres, 1); 242 viafb_second_yres);
244 DEBUG_MSG(KERN_INFO "->viafb_SAMM_ON: index=%d\n", 243 DEBUG_MSG(KERN_INFO "->viafb_SAMM_ON: index=%d\n",
245 vmode_index1); 244 vmode_index1);
246 245
@@ -1262,7 +1261,7 @@ static int viafb_sync(struct fb_info *info)
1262 return 0; 1261 return 0;
1263} 1262}
1264 1263
1265int viafb_get_mode_index(int hres, int vres, int flag) 1264int viafb_get_mode_index(int hres, int vres)
1266{ 1265{
1267 u32 i; 1266 u32 i;
1268 DEBUG_MSG(KERN_INFO "viafb_get_mode_index!\n"); 1267 DEBUG_MSG(KERN_INFO "viafb_get_mode_index!\n");
@@ -1272,13 +1271,7 @@ int viafb_get_mode_index(int hres, int vres, int flag)
1272 viafb_modentry[i].yres == vres) 1271 viafb_modentry[i].yres == vres)
1273 break; 1272 break;
1274 1273
1275 viafb_resMode = viafb_modentry[i].mode_index; 1274 return viafb_modentry[i].mode_index;
1276 if (flag)
1277 viafb_mode1 = viafb_modentry[i].mode_res;
1278 else
1279 viafb_mode = viafb_modentry[i].mode_res;
1280
1281 return viafb_resMode;
1282} 1275}
1283 1276
1284static void check_available_device_to_enable(int device_id) 1277static void check_available_device_to_enable(int device_id)
@@ -2199,7 +2192,7 @@ static int __devinit via_pci_probe(void)
2199 strict_strtoul(tmpc, 0, &default_xres); 2192 strict_strtoul(tmpc, 0, &default_xres);
2200 strict_strtoul(tmpm, 0, &default_yres); 2193 strict_strtoul(tmpm, 0, &default_yres);
2201 2194
2202 vmode_index = viafb_get_mode_index(default_xres, default_yres, 0); 2195 vmode_index = viafb_get_mode_index(default_xres, default_yres);
2203 DEBUG_MSG(KERN_INFO "0->index=%d\n", vmode_index); 2196 DEBUG_MSG(KERN_INFO "0->index=%d\n", vmode_index);
2204 2197
2205 if (viafb_SAMM_ON == 1) { 2198 if (viafb_SAMM_ON == 1) {
diff --git a/drivers/video/via/viafbdev.h b/drivers/video/via/viafbdev.h
index a4158e87287..227b000feb3 100644
--- a/drivers/video/via/viafbdev.h
+++ b/drivers/video/via/viafbdev.h
@@ -81,7 +81,6 @@ struct viafb_modeinfo {
81 u32 xres; 81 u32 xres;
82 u32 yres; 82 u32 yres;
83 int mode_index; 83 int mode_index;
84 char *mode_res;
85}; 84};
86extern unsigned int viafb_second_virtual_yres; 85extern unsigned int viafb_second_virtual_yres;
87extern unsigned int viafb_second_virtual_xres; 86extern unsigned int viafb_second_virtual_xres;
@@ -102,7 +101,7 @@ extern int strict_strtoul(const char *cp, unsigned int base,
102void viafb_memory_pitch_patch(struct fb_info *info); 101void viafb_memory_pitch_patch(struct fb_info *info);
103void viafb_fill_var_timing_info(struct fb_var_screeninfo *var, int refresh, 102void viafb_fill_var_timing_info(struct fb_var_screeninfo *var, int refresh,
104 int mode_index); 103 int mode_index);
105int viafb_get_mode_index(int hres, int vres, int flag); 104int viafb_get_mode_index(int hres, int vres);
106u8 viafb_gpio_i2c_read_lvds(struct lvds_setting_information 105u8 viafb_gpio_i2c_read_lvds(struct lvds_setting_information
107 *plvds_setting_info, struct lvds_chip_information 106 *plvds_setting_info, struct lvds_chip_information
108 *plvds_chip_info, u8 index); 107 *plvds_chip_info, u8 index);
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index bcec78ffc76..248e00ec4dc 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -52,8 +52,10 @@ struct virtio_pci_device
52 char (*msix_names)[256]; 52 char (*msix_names)[256];
53 /* Number of available vectors */ 53 /* Number of available vectors */
54 unsigned msix_vectors; 54 unsigned msix_vectors;
55 /* Vectors allocated */ 55 /* Vectors allocated, excluding per-vq vectors if any */
56 unsigned msix_used_vectors; 56 unsigned msix_used_vectors;
57 /* Whether we have vector per vq */
58 bool per_vq_vectors;
57}; 59};
58 60
59/* Constants for MSI-X */ 61/* Constants for MSI-X */
@@ -258,7 +260,6 @@ static void vp_free_vectors(struct virtio_device *vdev)
258 260
259 for (i = 0; i < vp_dev->msix_used_vectors; ++i) 261 for (i = 0; i < vp_dev->msix_used_vectors; ++i)
260 free_irq(vp_dev->msix_entries[i].vector, vp_dev); 262 free_irq(vp_dev->msix_entries[i].vector, vp_dev);
261 vp_dev->msix_used_vectors = 0;
262 263
263 if (vp_dev->msix_enabled) { 264 if (vp_dev->msix_enabled) {
264 /* Disable the vector used for configuration */ 265 /* Disable the vector used for configuration */
@@ -267,80 +268,77 @@ static void vp_free_vectors(struct virtio_device *vdev)
267 /* Flush the write out to device */ 268 /* Flush the write out to device */
268 ioread16(vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR); 269 ioread16(vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);
269 270
270 vp_dev->msix_enabled = 0;
271 pci_disable_msix(vp_dev->pci_dev); 271 pci_disable_msix(vp_dev->pci_dev);
272 vp_dev->msix_enabled = 0;
273 vp_dev->msix_vectors = 0;
272 } 274 }
273}
274 275
275static int vp_enable_msix(struct pci_dev *dev, struct msix_entry *entries, 276 vp_dev->msix_used_vectors = 0;
276 int *options, int noptions) 277 kfree(vp_dev->msix_names);
277{ 278 vp_dev->msix_names = NULL;
278 int i; 279 kfree(vp_dev->msix_entries);
279 for (i = 0; i < noptions; ++i) 280 vp_dev->msix_entries = NULL;
280 if (!pci_enable_msix(dev, entries, options[i]))
281 return options[i];
282 return -EBUSY;
283} 281}
284 282
285static int vp_request_vectors(struct virtio_device *vdev, unsigned max_vqs) 283static int vp_request_vectors(struct virtio_device *vdev, int nvectors,
284 bool per_vq_vectors)
286{ 285{
287 struct virtio_pci_device *vp_dev = to_vp_device(vdev); 286 struct virtio_pci_device *vp_dev = to_vp_device(vdev);
288 const char *name = dev_name(&vp_dev->vdev.dev); 287 const char *name = dev_name(&vp_dev->vdev.dev);
289 unsigned i, v; 288 unsigned i, v;
290 int err = -ENOMEM; 289 int err = -ENOMEM;
291 /* We want at most one vector per queue and one for config changes. 290
292 * Fallback to separate vectors for config and a shared for queues. 291 if (!nvectors) {
293 * Finally fall back to regular interrupts. */ 292 /* Can't allocate MSI-X vectors, use regular interrupt */
294 int options[] = { max_vqs + 1, 2 }; 293 vp_dev->msix_vectors = 0;
295 int nvectors = max(options[0], options[1]); 294 err = request_irq(vp_dev->pci_dev->irq, vp_interrupt,
295 IRQF_SHARED, name, vp_dev);
296 if (err)
297 return err;
298 vp_dev->intx_enabled = 1;
299 return 0;
300 }
296 301
297 vp_dev->msix_entries = kmalloc(nvectors * sizeof *vp_dev->msix_entries, 302 vp_dev->msix_entries = kmalloc(nvectors * sizeof *vp_dev->msix_entries,
298 GFP_KERNEL); 303 GFP_KERNEL);
299 if (!vp_dev->msix_entries) 304 if (!vp_dev->msix_entries)
300 goto error_entries; 305 goto error;
301 vp_dev->msix_names = kmalloc(nvectors * sizeof *vp_dev->msix_names, 306 vp_dev->msix_names = kmalloc(nvectors * sizeof *vp_dev->msix_names,
302 GFP_KERNEL); 307 GFP_KERNEL);
303 if (!vp_dev->msix_names) 308 if (!vp_dev->msix_names)
304 goto error_names; 309 goto error;
305 310
306 for (i = 0; i < nvectors; ++i) 311 for (i = 0; i < nvectors; ++i)
307 vp_dev->msix_entries[i].entry = i; 312 vp_dev->msix_entries[i].entry = i;
308 313
309 err = vp_enable_msix(vp_dev->pci_dev, vp_dev->msix_entries, 314 err = pci_enable_msix(vp_dev->pci_dev, vp_dev->msix_entries, nvectors);
310 options, ARRAY_SIZE(options)); 315 if (err > 0)
311 if (err < 0) { 316 err = -ENOSPC;
312 /* Can't allocate enough MSI-X vectors, use regular interrupt */ 317 if (err)
313 vp_dev->msix_vectors = 0; 318 goto error;
314 err = request_irq(vp_dev->pci_dev->irq, vp_interrupt, 319 vp_dev->msix_vectors = nvectors;
315 IRQF_SHARED, name, vp_dev); 320 vp_dev->msix_enabled = 1;
316 if (err) 321
317 goto error_irq; 322 /* Set the vector used for configuration */
318 vp_dev->intx_enabled = 1; 323 v = vp_dev->msix_used_vectors;
319 } else { 324 snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names,
320 vp_dev->msix_vectors = err; 325 "%s-config", name);
321 vp_dev->msix_enabled = 1; 326 err = request_irq(vp_dev->msix_entries[v].vector,
322 327 vp_config_changed, 0, vp_dev->msix_names[v],
323 /* Set the vector used for configuration */ 328 vp_dev);
324 v = vp_dev->msix_used_vectors; 329 if (err)
325 snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names, 330 goto error;
326 "%s-config", name); 331 ++vp_dev->msix_used_vectors;
327 err = request_irq(vp_dev->msix_entries[v].vector, 332
328 vp_config_changed, 0, vp_dev->msix_names[v], 333 iowrite16(v, vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);
329 vp_dev); 334 /* Verify we had enough resources to assign the vector */
330 if (err) 335 v = ioread16(vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);
331 goto error_irq; 336 if (v == VIRTIO_MSI_NO_VECTOR) {
332 ++vp_dev->msix_used_vectors; 337 err = -EBUSY;
333 338 goto error;
334 iowrite16(v, vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);
335 /* Verify we had enough resources to assign the vector */
336 v = ioread16(vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR);
337 if (v == VIRTIO_MSI_NO_VECTOR) {
338 err = -EBUSY;
339 goto error_irq;
340 }
341 } 339 }
342 340
343 if (vp_dev->msix_vectors && vp_dev->msix_vectors != max_vqs + 1) { 341 if (!per_vq_vectors) {
344 /* Shared vector for all VQs */ 342 /* Shared vector for all VQs */
345 v = vp_dev->msix_used_vectors; 343 v = vp_dev->msix_used_vectors;
346 snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names, 344 snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names,
@@ -349,28 +347,25 @@ static int vp_request_vectors(struct virtio_device *vdev, unsigned max_vqs)
349 vp_vring_interrupt, 0, vp_dev->msix_names[v], 347 vp_vring_interrupt, 0, vp_dev->msix_names[v],
350 vp_dev); 348 vp_dev);
351 if (err) 349 if (err)
352 goto error_irq; 350 goto error;
353 ++vp_dev->msix_used_vectors; 351 ++vp_dev->msix_used_vectors;
354 } 352 }
355 return 0; 353 return 0;
356error_irq: 354error:
357 vp_free_vectors(vdev); 355 vp_free_vectors(vdev);
358 kfree(vp_dev->msix_names);
359error_names:
360 kfree(vp_dev->msix_entries);
361error_entries:
362 return err; 356 return err;
363} 357}
364 358
365static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index, 359static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
366 void (*callback)(struct virtqueue *vq), 360 void (*callback)(struct virtqueue *vq),
367 const char *name) 361 const char *name,
362 u16 vector)
368{ 363{
369 struct virtio_pci_device *vp_dev = to_vp_device(vdev); 364 struct virtio_pci_device *vp_dev = to_vp_device(vdev);
370 struct virtio_pci_vq_info *info; 365 struct virtio_pci_vq_info *info;
371 struct virtqueue *vq; 366 struct virtqueue *vq;
372 unsigned long flags, size; 367 unsigned long flags, size;
373 u16 num, vector; 368 u16 num;
374 int err; 369 int err;
375 370
376 /* Select the queue we're interested in */ 371 /* Select the queue we're interested in */
@@ -389,7 +384,7 @@ static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
389 384
390 info->queue_index = index; 385 info->queue_index = index;
391 info->num = num; 386 info->num = num;
392 info->vector = VIRTIO_MSI_NO_VECTOR; 387 info->vector = vector;
393 388
394 size = PAGE_ALIGN(vring_size(num, VIRTIO_PCI_VRING_ALIGN)); 389 size = PAGE_ALIGN(vring_size(num, VIRTIO_PCI_VRING_ALIGN));
395 info->queue = alloc_pages_exact(size, GFP_KERNEL|__GFP_ZERO); 390 info->queue = alloc_pages_exact(size, GFP_KERNEL|__GFP_ZERO);
@@ -413,22 +408,7 @@ static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
413 vq->priv = info; 408 vq->priv = info;
414 info->vq = vq; 409 info->vq = vq;
415 410
416 /* allocate per-vq vector if available and necessary */ 411 if (vector != VIRTIO_MSI_NO_VECTOR) {
417 if (callback && vp_dev->msix_used_vectors < vp_dev->msix_vectors) {
418 vector = vp_dev->msix_used_vectors;
419 snprintf(vp_dev->msix_names[vector], sizeof *vp_dev->msix_names,
420 "%s-%s", dev_name(&vp_dev->vdev.dev), name);
421 err = request_irq(vp_dev->msix_entries[vector].vector,
422 vring_interrupt, 0,
423 vp_dev->msix_names[vector], vq);
424 if (err)
425 goto out_request_irq;
426 info->vector = vector;
427 ++vp_dev->msix_used_vectors;
428 } else
429 vector = VP_MSIX_VQ_VECTOR;
430
431 if (callback && vp_dev->msix_enabled) {
432 iowrite16(vector, vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR); 412 iowrite16(vector, vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR);
433 vector = ioread16(vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR); 413 vector = ioread16(vp_dev->ioaddr + VIRTIO_MSI_QUEUE_VECTOR);
434 if (vector == VIRTIO_MSI_NO_VECTOR) { 414 if (vector == VIRTIO_MSI_NO_VECTOR) {
@@ -444,11 +424,6 @@ static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
444 return vq; 424 return vq;
445 425
446out_assign: 426out_assign:
447 if (info->vector != VIRTIO_MSI_NO_VECTOR) {
448 free_irq(vp_dev->msix_entries[info->vector].vector, vq);
449 --vp_dev->msix_used_vectors;
450 }
451out_request_irq:
452 vring_del_virtqueue(vq); 427 vring_del_virtqueue(vq);
453out_activate_queue: 428out_activate_queue:
454 iowrite32(0, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN); 429 iowrite32(0, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
@@ -462,12 +437,13 @@ static void vp_del_vq(struct virtqueue *vq)
462{ 437{
463 struct virtio_pci_device *vp_dev = to_vp_device(vq->vdev); 438 struct virtio_pci_device *vp_dev = to_vp_device(vq->vdev);
464 struct virtio_pci_vq_info *info = vq->priv; 439 struct virtio_pci_vq_info *info = vq->priv;
465 unsigned long size; 440 unsigned long flags, size;
466 441
467 iowrite16(info->queue_index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_SEL); 442 spin_lock_irqsave(&vp_dev->lock, flags);
443 list_del(&info->node);
444 spin_unlock_irqrestore(&vp_dev->lock, flags);
468 445
469 if (info->vector != VIRTIO_MSI_NO_VECTOR) 446 iowrite16(info->queue_index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_SEL);
470 free_irq(vp_dev->msix_entries[info->vector].vector, vq);
471 447
472 if (vp_dev->msix_enabled) { 448 if (vp_dev->msix_enabled) {
473 iowrite16(VIRTIO_MSI_NO_VECTOR, 449 iowrite16(VIRTIO_MSI_NO_VECTOR,
@@ -489,36 +465,62 @@ static void vp_del_vq(struct virtqueue *vq)
489/* the config->del_vqs() implementation */ 465/* the config->del_vqs() implementation */
490static void vp_del_vqs(struct virtio_device *vdev) 466static void vp_del_vqs(struct virtio_device *vdev)
491{ 467{
468 struct virtio_pci_device *vp_dev = to_vp_device(vdev);
492 struct virtqueue *vq, *n; 469 struct virtqueue *vq, *n;
470 struct virtio_pci_vq_info *info;
493 471
494 list_for_each_entry_safe(vq, n, &vdev->vqs, list) 472 list_for_each_entry_safe(vq, n, &vdev->vqs, list) {
473 info = vq->priv;
474 if (vp_dev->per_vq_vectors)
475 free_irq(vp_dev->msix_entries[info->vector].vector, vq);
495 vp_del_vq(vq); 476 vp_del_vq(vq);
477 }
478 vp_dev->per_vq_vectors = false;
496 479
497 vp_free_vectors(vdev); 480 vp_free_vectors(vdev);
498} 481}
499 482
500/* the config->find_vqs() implementation */ 483static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs,
501static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, 484 struct virtqueue *vqs[],
502 struct virtqueue *vqs[], 485 vq_callback_t *callbacks[],
503 vq_callback_t *callbacks[], 486 const char *names[],
504 const char *names[]) 487 int nvectors,
488 bool per_vq_vectors)
505{ 489{
506 int vectors = 0; 490 struct virtio_pci_device *vp_dev = to_vp_device(vdev);
507 int i, err; 491 u16 vector;
508 492 int i, err, allocated_vectors;
509 /* How many vectors would we like? */
510 for (i = 0; i < nvqs; ++i)
511 if (callbacks[i])
512 ++vectors;
513 493
514 err = vp_request_vectors(vdev, vectors); 494 err = vp_request_vectors(vdev, nvectors, per_vq_vectors);
515 if (err) 495 if (err)
516 goto error_request; 496 goto error_request;
517 497
498 vp_dev->per_vq_vectors = per_vq_vectors;
499 allocated_vectors = vp_dev->msix_used_vectors;
518 for (i = 0; i < nvqs; ++i) { 500 for (i = 0; i < nvqs; ++i) {
519 vqs[i] = vp_find_vq(vdev, i, callbacks[i], names[i]); 501 if (!callbacks[i] || !vp_dev->msix_enabled)
520 if (IS_ERR(vqs[i])) 502 vector = VIRTIO_MSI_NO_VECTOR;
503 else if (vp_dev->per_vq_vectors)
504 vector = allocated_vectors++;
505 else
506 vector = VP_MSIX_VQ_VECTOR;
507 vqs[i] = vp_find_vq(vdev, i, callbacks[i], names[i], vector);
508 if (IS_ERR(vqs[i])) {
509 err = PTR_ERR(vqs[i]);
521 goto error_find; 510 goto error_find;
511 }
512 /* allocate per-vq irq if available and necessary */
513 if (vp_dev->per_vq_vectors && vector != VIRTIO_MSI_NO_VECTOR) {
514 snprintf(vp_dev->msix_names[vector], sizeof *vp_dev->msix_names,
515 "%s-%s", dev_name(&vp_dev->vdev.dev), names[i]);
516 err = request_irq(vp_dev->msix_entries[vector].vector,
517 vring_interrupt, 0,
518 vp_dev->msix_names[vector], vqs[i]);
519 if (err) {
520 vp_del_vq(vqs[i]);
521 goto error_find;
522 }
523 }
522 } 524 }
523 return 0; 525 return 0;
524 526
@@ -526,7 +528,37 @@ error_find:
526 vp_del_vqs(vdev); 528 vp_del_vqs(vdev);
527 529
528error_request: 530error_request:
529 return PTR_ERR(vqs[i]); 531 return err;
532}
533
534/* the config->find_vqs() implementation */
535static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs,
536 struct virtqueue *vqs[],
537 vq_callback_t *callbacks[],
538 const char *names[])
539{
540 int vectors = 0;
541 int i, uninitialized_var(err);
542
543 /* How many vectors would we like? */
544 for (i = 0; i < nvqs; ++i)
545 if (callbacks[i])
546 ++vectors;
547
548 /* We want at most one vector per queue and one for config changes. */
549 err = vp_try_to_find_vqs(vdev, nvqs, vqs, callbacks, names,
550 vectors + 1, true);
551 if (!err)
552 return 0;
553 /* Fallback to separate vectors for config and a shared for queues. */
554 err = vp_try_to_find_vqs(vdev, nvqs, vqs, callbacks, names,
555 2, false);
556 if (!err)
557 return 0;
558 /* Finally fall back to regular interrupts. */
559 err = vp_try_to_find_vqs(vdev, nvqs, vqs, callbacks, names,
560 0, false);
561 return err;
530} 562}
531 563
532static struct virtio_config_ops virtio_pci_config_ops = { 564static struct virtio_config_ops virtio_pci_config_ops = {
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index a7e3b706b9d..0d92969404c 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -687,6 +687,7 @@ static int omap_hdq_remove(struct platform_device *pdev)
687 687
688 if (hdq_data->hdq_usecount) { 688 if (hdq_data->hdq_usecount) {
689 dev_dbg(&pdev->dev, "removed when use count is not zero\n"); 689 dev_dbg(&pdev->dev, "removed when use count is not zero\n");
690 mutex_unlock(&hdq_data->hdq_mutex);
690 return -EBUSY; 691 return -EBUSY;
691 } 692 }
692 693
diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c
index fecb307d28e..aec7cefdef2 100644
--- a/drivers/watchdog/coh901327_wdt.c
+++ b/drivers/watchdog/coh901327_wdt.c
@@ -18,6 +18,7 @@
18#include <linux/bitops.h> 18#include <linux/bitops.h>
19#include <linux/uaccess.h> 19#include <linux/uaccess.h>
20#include <linux/clk.h> 20#include <linux/clk.h>
21#include <linux/delay.h>
21 22
22#define DRV_NAME "WDOG COH 901 327" 23#define DRV_NAME "WDOG COH 901 327"
23 24
@@ -92,6 +93,8 @@ static struct clk *clk;
92static void coh901327_enable(u16 timeout) 93static void coh901327_enable(u16 timeout)
93{ 94{
94 u16 val; 95 u16 val;
96 unsigned long freq;
97 unsigned long delay_ns;
95 98
96 clk_enable(clk); 99 clk_enable(clk);
97 /* Restart timer if it is disabled */ 100 /* Restart timer if it is disabled */
@@ -102,6 +105,14 @@ static void coh901327_enable(u16 timeout)
102 /* Acknowledge any pending interrupt so it doesn't just fire off */ 105 /* Acknowledge any pending interrupt so it doesn't just fire off */
103 writew(U300_WDOG_IER_WILL_BARK_IRQ_ACK_ENABLE, 106 writew(U300_WDOG_IER_WILL_BARK_IRQ_ACK_ENABLE,
104 virtbase + U300_WDOG_IER); 107 virtbase + U300_WDOG_IER);
108 /*
109 * The interrupt is cleared in the 32 kHz clock domain.
110 * Wait 3 32 kHz cycles for it to take effect
111 */
112 freq = clk_get_rate(clk);
113 delay_ns = (1000000000 + freq - 1) / freq; /* Freq to ns and round up */
114 delay_ns = 3 * delay_ns; /* Wait 3 cycles */
115 ndelay(delay_ns);
105 /* Enable the watchdog interrupt */ 116 /* Enable the watchdog interrupt */
106 writew(U300_WDOG_IMR_WILL_BARK_IRQ_ENABLE, virtbase + U300_WDOG_IMR); 117 writew(U300_WDOG_IMR_WILL_BARK_IRQ_ENABLE, virtbase + U300_WDOG_IMR);
107 /* Activate the watchdog timer */ 118 /* Activate the watchdog timer */
diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c
index e9f950ff86e..cdd55e0d09f 100644
--- a/drivers/watchdog/ep93xx_wdt.c
+++ b/drivers/watchdog/ep93xx_wdt.c
@@ -29,6 +29,7 @@
29#include <linux/watchdog.h> 29#include <linux/watchdog.h>
30#include <linux/timer.h> 30#include <linux/timer.h>
31#include <linux/uaccess.h> 31#include <linux/uaccess.h>
32#include <linux/io.h>
32#include <mach/hardware.h> 33#include <mach/hardware.h>
33 34
34#define WDT_VERSION "0.3" 35#define WDT_VERSION "0.3"
diff --git a/drivers/watchdog/ks8695_wdt.c b/drivers/watchdog/ks8695_wdt.c
index 00b03eb43bf..e1c82769b08 100644
--- a/drivers/watchdog/ks8695_wdt.c
+++ b/drivers/watchdog/ks8695_wdt.c
@@ -66,7 +66,7 @@ static inline void ks8695_wdt_stop(void)
66static inline void ks8695_wdt_start(void) 66static inline void ks8695_wdt_start(void)
67{ 67{
68 unsigned long tmcon; 68 unsigned long tmcon;
69 unsigned long tval = wdt_time * CLOCK_TICK_RATE; 69 unsigned long tval = wdt_time * KS8695_CLOCK_RATE;
70 70
71 spin_lock(&ks8695_lock); 71 spin_lock(&ks8695_lock);
72 /* disable timer0 */ 72 /* disable timer0 */
@@ -103,7 +103,7 @@ static inline void ks8695_wdt_reload(void)
103static int ks8695_wdt_settimeout(int new_time) 103static int ks8695_wdt_settimeout(int new_time)
104{ 104{
105 /* 105 /*
106 * All counting occurs at SLOW_CLOCK / 128 = 0.256 Hz 106 * All counting occurs at KS8695_CLOCK_RATE / 128 = 0.256 Hz
107 * 107 *
108 * Since WDV is a 16-bit counter, the maximum period is 108 * Since WDV is a 16-bit counter, the maximum period is
109 * 65536 / 0.256 = 256 seconds. 109 * 65536 / 0.256 = 256 seconds.
diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
index 6fcb1e7095c..92828281a30 100644
--- a/fs/9p/vfs_addr.c
+++ b/fs/9p/vfs_addr.c
@@ -57,7 +57,7 @@ static int v9fs_vfs_readpage(struct file *filp, struct page *page)
57 buffer = kmap(page); 57 buffer = kmap(page);
58 offset = page_offset(page); 58 offset = page_offset(page);
59 59
60 retval = v9fs_file_readn(filp, buffer, NULL, offset, PAGE_CACHE_SIZE); 60 retval = v9fs_file_readn(filp, buffer, NULL, PAGE_CACHE_SIZE, offset);
61 if (retval < 0) 61 if (retval < 0)
62 goto done; 62 goto done;
63 63
diff --git a/fs/Kconfig b/fs/Kconfig
index a97263be6a9..0e7da7bb5d9 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -186,32 +186,7 @@ source "fs/romfs/Kconfig"
186source "fs/sysv/Kconfig" 186source "fs/sysv/Kconfig"
187source "fs/ufs/Kconfig" 187source "fs/ufs/Kconfig"
188source "fs/exofs/Kconfig" 188source "fs/exofs/Kconfig"
189 189source "fs/nilfs2/Kconfig"
190config NILFS2_FS
191 tristate "NILFS2 file system support (EXPERIMENTAL)"
192 depends on BLOCK && EXPERIMENTAL
193 select CRC32
194 help
195 NILFS2 is a log-structured file system (LFS) supporting continuous
196 snapshotting. In addition to versioning capability of the entire
197 file system, users can even restore files mistakenly overwritten or
198 destroyed just a few seconds ago. Since this file system can keep
199 consistency like conventional LFS, it achieves quick recovery after
200 system crashes.
201
202 NILFS2 creates a number of checkpoints every few seconds or per
203 synchronous write basis (unless there is no change). Users can
204 select significant versions among continuously created checkpoints,
205 and can change them into snapshots which will be preserved for long
206 periods until they are changed back to checkpoints. Each
207 snapshot is mountable as a read-only file system concurrently with
208 its writable mount, and this feature is convenient for online backup.
209
210 Some features including atime, extended attributes, and POSIX ACLs,
211 are not supported yet.
212
213 To compile this file system support as a module, choose M here: the
214 module will be called nilfs2. If unsure, say N.
215 190
216endif # MISC_FILESYSTEMS 191endif # MISC_FILESYSTEMS
217 192
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
index 697f6b5f131..e92f229e3c6 100644
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -828,15 +828,22 @@ static int load_flat_shared_library(int id, struct lib_info *libs)
828 if (IS_ERR(bprm.file)) 828 if (IS_ERR(bprm.file))
829 return res; 829 return res;
830 830
831 bprm.cred = prepare_exec_creds();
832 res = -ENOMEM;
833 if (!bprm.cred)
834 goto out;
835
831 res = prepare_binprm(&bprm); 836 res = prepare_binprm(&bprm);
832 837
833 if (res <= (unsigned long)-4096) 838 if (res <= (unsigned long)-4096)
834 res = load_flat_file(&bprm, libs, id, NULL); 839 res = load_flat_file(&bprm, libs, id, NULL);
835 if (bprm.file) { 840
836 allow_write_access(bprm.file); 841 abort_creds(bprm.cred);
837 fput(bprm.file); 842
838 bprm.file = NULL; 843out:
839 } 844 allow_write_access(bprm.file);
845 fput(bprm.file);
846
840 return(res); 847 return(res);
841} 848}
842 849
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 3a6d4fb2a32..94dfda24c06 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -564,6 +564,16 @@ struct block_device *bdget(dev_t dev)
564 564
565EXPORT_SYMBOL(bdget); 565EXPORT_SYMBOL(bdget);
566 566
567/**
568 * bdgrab -- Grab a reference to an already referenced block device
569 * @bdev: Block device to grab a reference to.
570 */
571struct block_device *bdgrab(struct block_device *bdev)
572{
573 atomic_inc(&bdev->bd_inode->i_count);
574 return bdev;
575}
576
567long nr_blockdev_pages(void) 577long nr_blockdev_pages(void)
568{ 578{
569 struct block_device *bdev; 579 struct block_device *bdev;
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c
index 6e4f6c50a12..019e8af449a 100644
--- a/fs/btrfs/async-thread.c
+++ b/fs/btrfs/async-thread.c
@@ -424,11 +424,11 @@ int btrfs_requeue_work(struct btrfs_work *work)
424 * list 424 * list
425 */ 425 */
426 if (worker->idle) { 426 if (worker->idle) {
427 spin_lock_irqsave(&worker->workers->lock, flags); 427 spin_lock(&worker->workers->lock);
428 worker->idle = 0; 428 worker->idle = 0;
429 list_move_tail(&worker->worker_list, 429 list_move_tail(&worker->worker_list,
430 &worker->workers->worker_list); 430 &worker->workers->worker_list);
431 spin_unlock_irqrestore(&worker->workers->lock, flags); 431 spin_unlock(&worker->workers->lock);
432 } 432 }
433 if (!worker->working) { 433 if (!worker->working) {
434 wake = 1; 434 wake = 1;
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 60a45f3a4e9..3fdcc0512d3 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -557,19 +557,7 @@ static int comp_keys(struct btrfs_disk_key *disk, struct btrfs_key *k2)
557 557
558 btrfs_disk_key_to_cpu(&k1, disk); 558 btrfs_disk_key_to_cpu(&k1, disk);
559 559
560 if (k1.objectid > k2->objectid) 560 return btrfs_comp_cpu_keys(&k1, k2);
561 return 1;
562 if (k1.objectid < k2->objectid)
563 return -1;
564 if (k1.type > k2->type)
565 return 1;
566 if (k1.type < k2->type)
567 return -1;
568 if (k1.offset > k2->offset)
569 return 1;
570 if (k1.offset < k2->offset)
571 return -1;
572 return 0;
573} 561}
574 562
575/* 563/*
@@ -1052,9 +1040,6 @@ static noinline int balance_level(struct btrfs_trans_handle *trans,
1052 BTRFS_NODEPTRS_PER_BLOCK(root) / 4) 1040 BTRFS_NODEPTRS_PER_BLOCK(root) / 4)
1053 return 0; 1041 return 0;
1054 1042
1055 if (btrfs_header_nritems(mid) > 2)
1056 return 0;
1057
1058 if (btrfs_header_nritems(mid) < 2) 1043 if (btrfs_header_nritems(mid) < 2)
1059 err_on_enospc = 1; 1044 err_on_enospc = 1;
1060 1045
@@ -1701,6 +1686,7 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root
1701 struct extent_buffer *b; 1686 struct extent_buffer *b;
1702 int slot; 1687 int slot;
1703 int ret; 1688 int ret;
1689 int err;
1704 int level; 1690 int level;
1705 int lowest_unlock = 1; 1691 int lowest_unlock = 1;
1706 u8 lowest_level = 0; 1692 u8 lowest_level = 0;
@@ -1737,8 +1723,6 @@ again:
1737 p->locks[level] = 1; 1723 p->locks[level] = 1;
1738 1724
1739 if (cow) { 1725 if (cow) {
1740 int wret;
1741
1742 /* 1726 /*
1743 * if we don't really need to cow this block 1727 * if we don't really need to cow this block
1744 * then we don't want to set the path blocking, 1728 * then we don't want to set the path blocking,
@@ -1749,12 +1733,12 @@ again:
1749 1733
1750 btrfs_set_path_blocking(p); 1734 btrfs_set_path_blocking(p);
1751 1735
1752 wret = btrfs_cow_block(trans, root, b, 1736 err = btrfs_cow_block(trans, root, b,
1753 p->nodes[level + 1], 1737 p->nodes[level + 1],
1754 p->slots[level + 1], &b); 1738 p->slots[level + 1], &b);
1755 if (wret) { 1739 if (err) {
1756 free_extent_buffer(b); 1740 free_extent_buffer(b);
1757 ret = wret; 1741 ret = err;
1758 goto done; 1742 goto done;
1759 } 1743 }
1760 } 1744 }
@@ -1793,41 +1777,45 @@ cow_done:
1793 ret = bin_search(b, key, level, &slot); 1777 ret = bin_search(b, key, level, &slot);
1794 1778
1795 if (level != 0) { 1779 if (level != 0) {
1796 if (ret && slot > 0) 1780 int dec = 0;
1781 if (ret && slot > 0) {
1782 dec = 1;
1797 slot -= 1; 1783 slot -= 1;
1784 }
1798 p->slots[level] = slot; 1785 p->slots[level] = slot;
1799 ret = setup_nodes_for_search(trans, root, p, b, level, 1786 err = setup_nodes_for_search(trans, root, p, b, level,
1800 ins_len); 1787 ins_len);
1801 if (ret == -EAGAIN) 1788 if (err == -EAGAIN)
1802 goto again; 1789 goto again;
1803 else if (ret) 1790 if (err) {
1791 ret = err;
1804 goto done; 1792 goto done;
1793 }
1805 b = p->nodes[level]; 1794 b = p->nodes[level];
1806 slot = p->slots[level]; 1795 slot = p->slots[level];
1807 1796
1808 unlock_up(p, level, lowest_unlock); 1797 unlock_up(p, level, lowest_unlock);
1809 1798
1810 /* this is only true while dropping a snapshot */
1811 if (level == lowest_level) { 1799 if (level == lowest_level) {
1812 ret = 0; 1800 if (dec)
1801 p->slots[level]++;
1813 goto done; 1802 goto done;
1814 } 1803 }
1815 1804
1816 ret = read_block_for_search(trans, root, p, 1805 err = read_block_for_search(trans, root, p,
1817 &b, level, slot, key); 1806 &b, level, slot, key);
1818 if (ret == -EAGAIN) 1807 if (err == -EAGAIN)
1819 goto again; 1808 goto again;
1820 1809 if (err) {
1821 if (ret == -EIO) 1810 ret = err;
1822 goto done; 1811 goto done;
1812 }
1823 1813
1824 if (!p->skip_locking) { 1814 if (!p->skip_locking) {
1825 int lret;
1826
1827 btrfs_clear_path_blocking(p, NULL); 1815 btrfs_clear_path_blocking(p, NULL);
1828 lret = btrfs_try_spin_lock(b); 1816 err = btrfs_try_spin_lock(b);
1829 1817
1830 if (!lret) { 1818 if (!err) {
1831 btrfs_set_path_blocking(p); 1819 btrfs_set_path_blocking(p);
1832 btrfs_tree_lock(b); 1820 btrfs_tree_lock(b);
1833 btrfs_clear_path_blocking(p, b); 1821 btrfs_clear_path_blocking(p, b);
@@ -1837,16 +1825,14 @@ cow_done:
1837 p->slots[level] = slot; 1825 p->slots[level] = slot;
1838 if (ins_len > 0 && 1826 if (ins_len > 0 &&
1839 btrfs_leaf_free_space(root, b) < ins_len) { 1827 btrfs_leaf_free_space(root, b) < ins_len) {
1840 int sret;
1841
1842 btrfs_set_path_blocking(p); 1828 btrfs_set_path_blocking(p);
1843 sret = split_leaf(trans, root, key, 1829 err = split_leaf(trans, root, key,
1844 p, ins_len, ret == 0); 1830 p, ins_len, ret == 0);
1845 btrfs_clear_path_blocking(p, NULL); 1831 btrfs_clear_path_blocking(p, NULL);
1846 1832
1847 BUG_ON(sret > 0); 1833 BUG_ON(err > 0);
1848 if (sret) { 1834 if (err) {
1849 ret = sret; 1835 ret = err;
1850 goto done; 1836 goto done;
1851 } 1837 }
1852 } 1838 }
@@ -3807,7 +3793,7 @@ int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root,
3807 } 3793 }
3808 3794
3809 /* delete the leaf if it is mostly empty */ 3795 /* delete the leaf if it is mostly empty */
3810 if (used < BTRFS_LEAF_DATA_SIZE(root) / 2) { 3796 if (used < BTRFS_LEAF_DATA_SIZE(root) / 3) {
3811 /* push_leaf_left fixes the path. 3797 /* push_leaf_left fixes the path.
3812 * make sure the path still points to our leaf 3798 * make sure the path still points to our leaf
3813 * for possible call to del_ptr below 3799 * for possible call to del_ptr below
@@ -4042,10 +4028,9 @@ out:
4042 * calling this function. 4028 * calling this function.
4043 */ 4029 */
4044int btrfs_find_next_key(struct btrfs_root *root, struct btrfs_path *path, 4030int btrfs_find_next_key(struct btrfs_root *root, struct btrfs_path *path,
4045 struct btrfs_key *key, int lowest_level, 4031 struct btrfs_key *key, int level,
4046 int cache_only, u64 min_trans) 4032 int cache_only, u64 min_trans)
4047{ 4033{
4048 int level = lowest_level;
4049 int slot; 4034 int slot;
4050 struct extent_buffer *c; 4035 struct extent_buffer *c;
4051 4036
@@ -4058,11 +4043,40 @@ int btrfs_find_next_key(struct btrfs_root *root, struct btrfs_path *path,
4058 c = path->nodes[level]; 4043 c = path->nodes[level];
4059next: 4044next:
4060 if (slot >= btrfs_header_nritems(c)) { 4045 if (slot >= btrfs_header_nritems(c)) {
4061 level++; 4046 int ret;
4062 if (level == BTRFS_MAX_LEVEL) 4047 int orig_lowest;
4048 struct btrfs_key cur_key;
4049 if (level + 1 >= BTRFS_MAX_LEVEL ||
4050 !path->nodes[level + 1])
4063 return 1; 4051 return 1;
4064 continue; 4052
4053 if (path->locks[level + 1]) {
4054 level++;
4055 continue;
4056 }
4057
4058 slot = btrfs_header_nritems(c) - 1;
4059 if (level == 0)
4060 btrfs_item_key_to_cpu(c, &cur_key, slot);
4061 else
4062 btrfs_node_key_to_cpu(c, &cur_key, slot);
4063
4064 orig_lowest = path->lowest_level;
4065 btrfs_release_path(root, path);
4066 path->lowest_level = level;
4067 ret = btrfs_search_slot(NULL, root, &cur_key, path,
4068 0, 0);
4069 path->lowest_level = orig_lowest;
4070 if (ret < 0)
4071 return ret;
4072
4073 c = path->nodes[level];
4074 slot = path->slots[level];
4075 if (ret == 0)
4076 slot++;
4077 goto next;
4065 } 4078 }
4079
4066 if (level == 0) 4080 if (level == 0)
4067 btrfs_item_key_to_cpu(c, key, slot); 4081 btrfs_item_key_to_cpu(c, key, slot);
4068 else { 4082 else {
@@ -4146,7 +4160,8 @@ again:
4146 * advance the path if there are now more items available. 4160 * advance the path if there are now more items available.
4147 */ 4161 */
4148 if (nritems > 0 && path->slots[0] < nritems - 1) { 4162 if (nritems > 0 && path->slots[0] < nritems - 1) {
4149 path->slots[0]++; 4163 if (ret == 0)
4164 path->slots[0]++;
4150 ret = 0; 4165 ret = 0;
4151 goto done; 4166 goto done;
4152 } 4167 }
@@ -4278,10 +4293,10 @@ int btrfs_previous_item(struct btrfs_root *root,
4278 path->slots[0]--; 4293 path->slots[0]--;
4279 4294
4280 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); 4295 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]);
4281 if (found_key.type == type)
4282 return 0;
4283 if (found_key.objectid < min_objectid) 4296 if (found_key.objectid < min_objectid)
4284 break; 4297 break;
4298 if (found_key.type == type)
4299 return 0;
4285 if (found_key.objectid == min_objectid && 4300 if (found_key.objectid == min_objectid &&
4286 found_key.type < type) 4301 found_key.type < type)
4287 break; 4302 break;
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 98a87383871..837435ce84c 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -481,7 +481,7 @@ struct btrfs_shared_data_ref {
481 481
482struct btrfs_extent_inline_ref { 482struct btrfs_extent_inline_ref {
483 u8 type; 483 u8 type;
484 u64 offset; 484 __le64 offset;
485} __attribute__ ((__packed__)); 485} __attribute__ ((__packed__));
486 486
487/* old style backrefs item */ 487/* old style backrefs item */
@@ -689,6 +689,7 @@ struct btrfs_space_info {
689 struct list_head block_groups; 689 struct list_head block_groups;
690 spinlock_t lock; 690 spinlock_t lock;
691 struct rw_semaphore groups_sem; 691 struct rw_semaphore groups_sem;
692 atomic_t caching_threads;
692}; 693};
693 694
694/* 695/*
@@ -707,6 +708,9 @@ struct btrfs_free_cluster {
707 /* first extent starting offset */ 708 /* first extent starting offset */
708 u64 window_start; 709 u64 window_start;
709 710
711 /* if this cluster simply points at a bitmap in the block group */
712 bool points_to_bitmap;
713
710 struct btrfs_block_group_cache *block_group; 714 struct btrfs_block_group_cache *block_group;
711 /* 715 /*
712 * when a cluster is allocated from a block group, we put the 716 * when a cluster is allocated from a block group, we put the
@@ -716,24 +720,37 @@ struct btrfs_free_cluster {
716 struct list_head block_group_list; 720 struct list_head block_group_list;
717}; 721};
718 722
723enum btrfs_caching_type {
724 BTRFS_CACHE_NO = 0,
725 BTRFS_CACHE_STARTED = 1,
726 BTRFS_CACHE_FINISHED = 2,
727};
728
719struct btrfs_block_group_cache { 729struct btrfs_block_group_cache {
720 struct btrfs_key key; 730 struct btrfs_key key;
721 struct btrfs_block_group_item item; 731 struct btrfs_block_group_item item;
732 struct btrfs_fs_info *fs_info;
722 spinlock_t lock; 733 spinlock_t lock;
723 struct mutex cache_mutex;
724 u64 pinned; 734 u64 pinned;
725 u64 reserved; 735 u64 reserved;
726 u64 flags; 736 u64 flags;
727 int cached; 737 u64 sectorsize;
738 int extents_thresh;
739 int free_extents;
740 int total_bitmaps;
728 int ro; 741 int ro;
729 int dirty; 742 int dirty;
730 743
744 /* cache tracking stuff */
745 wait_queue_head_t caching_q;
746 int cached;
747
731 struct btrfs_space_info *space_info; 748 struct btrfs_space_info *space_info;
732 749
733 /* free space cache stuff */ 750 /* free space cache stuff */
734 spinlock_t tree_lock; 751 spinlock_t tree_lock;
735 struct rb_root free_space_bytes;
736 struct rb_root free_space_offset; 752 struct rb_root free_space_offset;
753 u64 free_space;
737 754
738 /* block group cache stuff */ 755 /* block group cache stuff */
739 struct rb_node cache_node; 756 struct rb_node cache_node;
@@ -808,6 +825,7 @@ struct btrfs_fs_info {
808 struct mutex drop_mutex; 825 struct mutex drop_mutex;
809 struct mutex volume_mutex; 826 struct mutex volume_mutex;
810 struct mutex tree_reloc_mutex; 827 struct mutex tree_reloc_mutex;
828 struct rw_semaphore extent_commit_sem;
811 829
812 /* 830 /*
813 * this protects the ordered operations list only while we are 831 * this protects the ordered operations list only while we are
@@ -1988,6 +2006,7 @@ void btrfs_delalloc_reserve_space(struct btrfs_root *root, struct inode *inode,
1988 u64 bytes); 2006 u64 bytes);
1989void btrfs_delalloc_free_space(struct btrfs_root *root, struct inode *inode, 2007void btrfs_delalloc_free_space(struct btrfs_root *root, struct inode *inode,
1990 u64 bytes); 2008 u64 bytes);
2009void btrfs_free_pinned_extents(struct btrfs_fs_info *info);
1991/* ctree.c */ 2010/* ctree.c */
1992int btrfs_bin_search(struct extent_buffer *eb, struct btrfs_key *key, 2011int btrfs_bin_search(struct extent_buffer *eb, struct btrfs_key *key,
1993 int level, int *slot); 2012 int level, int *slot);
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index d28d29c95f7..e83be2e4602 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1639,6 +1639,7 @@ struct btrfs_root *open_ctree(struct super_block *sb,
1639 mutex_init(&fs_info->cleaner_mutex); 1639 mutex_init(&fs_info->cleaner_mutex);
1640 mutex_init(&fs_info->volume_mutex); 1640 mutex_init(&fs_info->volume_mutex);
1641 mutex_init(&fs_info->tree_reloc_mutex); 1641 mutex_init(&fs_info->tree_reloc_mutex);
1642 init_rwsem(&fs_info->extent_commit_sem);
1642 1643
1643 btrfs_init_free_cluster(&fs_info->meta_alloc_cluster); 1644 btrfs_init_free_cluster(&fs_info->meta_alloc_cluster);
1644 btrfs_init_free_cluster(&fs_info->data_alloc_cluster); 1645 btrfs_init_free_cluster(&fs_info->data_alloc_cluster);
@@ -1799,6 +1800,11 @@ struct btrfs_root *open_ctree(struct super_block *sb,
1799 btrfs_super_chunk_root(disk_super), 1800 btrfs_super_chunk_root(disk_super),
1800 blocksize, generation); 1801 blocksize, generation);
1801 BUG_ON(!chunk_root->node); 1802 BUG_ON(!chunk_root->node);
1803 if (!test_bit(EXTENT_BUFFER_UPTODATE, &chunk_root->node->bflags)) {
1804 printk(KERN_WARNING "btrfs: failed to read chunk root on %s\n",
1805 sb->s_id);
1806 goto fail_chunk_root;
1807 }
1802 btrfs_set_root_node(&chunk_root->root_item, chunk_root->node); 1808 btrfs_set_root_node(&chunk_root->root_item, chunk_root->node);
1803 chunk_root->commit_root = btrfs_root_node(chunk_root); 1809 chunk_root->commit_root = btrfs_root_node(chunk_root);
1804 1810
@@ -1826,6 +1832,11 @@ struct btrfs_root *open_ctree(struct super_block *sb,
1826 blocksize, generation); 1832 blocksize, generation);
1827 if (!tree_root->node) 1833 if (!tree_root->node)
1828 goto fail_chunk_root; 1834 goto fail_chunk_root;
1835 if (!test_bit(EXTENT_BUFFER_UPTODATE, &tree_root->node->bflags)) {
1836 printk(KERN_WARNING "btrfs: failed to read tree root on %s\n",
1837 sb->s_id);
1838 goto fail_tree_root;
1839 }
1829 btrfs_set_root_node(&tree_root->root_item, tree_root->node); 1840 btrfs_set_root_node(&tree_root->root_item, tree_root->node);
1830 tree_root->commit_root = btrfs_root_node(tree_root); 1841 tree_root->commit_root = btrfs_root_node(tree_root);
1831 1842
@@ -2322,6 +2333,9 @@ int close_ctree(struct btrfs_root *root)
2322 printk(KERN_ERR "btrfs: commit super ret %d\n", ret); 2333 printk(KERN_ERR "btrfs: commit super ret %d\n", ret);
2323 } 2334 }
2324 2335
2336 fs_info->closing = 2;
2337 smp_mb();
2338
2325 if (fs_info->delalloc_bytes) { 2339 if (fs_info->delalloc_bytes) {
2326 printk(KERN_INFO "btrfs: at unmount delalloc count %llu\n", 2340 printk(KERN_INFO "btrfs: at unmount delalloc count %llu\n",
2327 (unsigned long long)fs_info->delalloc_bytes); 2341 (unsigned long long)fs_info->delalloc_bytes);
@@ -2343,6 +2357,7 @@ int close_ctree(struct btrfs_root *root)
2343 free_extent_buffer(root->fs_info->csum_root->commit_root); 2357 free_extent_buffer(root->fs_info->csum_root->commit_root);
2344 2358
2345 btrfs_free_block_groups(root->fs_info); 2359 btrfs_free_block_groups(root->fs_info);
2360 btrfs_free_pinned_extents(root->fs_info);
2346 2361
2347 del_fs_roots(fs_info); 2362 del_fs_roots(fs_info);
2348 2363
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index a5aca3997d4..72a2b9c28e9 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -21,6 +21,7 @@
21#include <linux/blkdev.h> 21#include <linux/blkdev.h>
22#include <linux/sort.h> 22#include <linux/sort.h>
23#include <linux/rcupdate.h> 23#include <linux/rcupdate.h>
24#include <linux/kthread.h>
24#include "compat.h" 25#include "compat.h"
25#include "hash.h" 26#include "hash.h"
26#include "ctree.h" 27#include "ctree.h"
@@ -61,6 +62,13 @@ static int do_chunk_alloc(struct btrfs_trans_handle *trans,
61 struct btrfs_root *extent_root, u64 alloc_bytes, 62 struct btrfs_root *extent_root, u64 alloc_bytes,
62 u64 flags, int force); 63 u64 flags, int force);
63 64
65static noinline int
66block_group_cache_done(struct btrfs_block_group_cache *cache)
67{
68 smp_mb();
69 return cache->cached == BTRFS_CACHE_FINISHED;
70}
71
64static int block_group_bits(struct btrfs_block_group_cache *cache, u64 bits) 72static int block_group_bits(struct btrfs_block_group_cache *cache, u64 bits)
65{ 73{
66 return (cache->flags & bits) == bits; 74 return (cache->flags & bits) == bits;
@@ -146,20 +154,70 @@ block_group_cache_tree_search(struct btrfs_fs_info *info, u64 bytenr,
146} 154}
147 155
148/* 156/*
157 * We always set EXTENT_LOCKED for the super mirror extents so we don't
158 * overwrite them, so those bits need to be unset. Also, if we are unmounting
159 * with pinned extents still sitting there because we had a block group caching,
160 * we need to clear those now, since we are done.
161 */
162void btrfs_free_pinned_extents(struct btrfs_fs_info *info)
163{
164 u64 start, end, last = 0;
165 int ret;
166
167 while (1) {
168 ret = find_first_extent_bit(&info->pinned_extents, last,
169 &start, &end,
170 EXTENT_LOCKED|EXTENT_DIRTY);
171 if (ret)
172 break;
173
174 clear_extent_bits(&info->pinned_extents, start, end,
175 EXTENT_LOCKED|EXTENT_DIRTY, GFP_NOFS);
176 last = end+1;
177 }
178}
179
180static int remove_sb_from_cache(struct btrfs_root *root,
181 struct btrfs_block_group_cache *cache)
182{
183 struct btrfs_fs_info *fs_info = root->fs_info;
184 u64 bytenr;
185 u64 *logical;
186 int stripe_len;
187 int i, nr, ret;
188
189 for (i = 0; i < BTRFS_SUPER_MIRROR_MAX; i++) {
190 bytenr = btrfs_sb_offset(i);
191 ret = btrfs_rmap_block(&root->fs_info->mapping_tree,
192 cache->key.objectid, bytenr,
193 0, &logical, &nr, &stripe_len);
194 BUG_ON(ret);
195 while (nr--) {
196 try_lock_extent(&fs_info->pinned_extents,
197 logical[nr],
198 logical[nr] + stripe_len - 1, GFP_NOFS);
199 }
200 kfree(logical);
201 }
202
203 return 0;
204}
205
206/*
149 * this is only called by cache_block_group, since we could have freed extents 207 * this is only called by cache_block_group, since we could have freed extents
150 * we need to check the pinned_extents for any extents that can't be used yet 208 * we need to check the pinned_extents for any extents that can't be used yet
151 * since their free space will be released as soon as the transaction commits. 209 * since their free space will be released as soon as the transaction commits.
152 */ 210 */
153static int add_new_free_space(struct btrfs_block_group_cache *block_group, 211static u64 add_new_free_space(struct btrfs_block_group_cache *block_group,
154 struct btrfs_fs_info *info, u64 start, u64 end) 212 struct btrfs_fs_info *info, u64 start, u64 end)
155{ 213{
156 u64 extent_start, extent_end, size; 214 u64 extent_start, extent_end, size, total_added = 0;
157 int ret; 215 int ret;
158 216
159 while (start < end) { 217 while (start < end) {
160 ret = find_first_extent_bit(&info->pinned_extents, start, 218 ret = find_first_extent_bit(&info->pinned_extents, start,
161 &extent_start, &extent_end, 219 &extent_start, &extent_end,
162 EXTENT_DIRTY); 220 EXTENT_DIRTY|EXTENT_LOCKED);
163 if (ret) 221 if (ret)
164 break; 222 break;
165 223
@@ -167,6 +225,7 @@ static int add_new_free_space(struct btrfs_block_group_cache *block_group,
167 start = extent_end + 1; 225 start = extent_end + 1;
168 } else if (extent_start > start && extent_start < end) { 226 } else if (extent_start > start && extent_start < end) {
169 size = extent_start - start; 227 size = extent_start - start;
228 total_added += size;
170 ret = btrfs_add_free_space(block_group, start, 229 ret = btrfs_add_free_space(block_group, start,
171 size); 230 size);
172 BUG_ON(ret); 231 BUG_ON(ret);
@@ -178,84 +237,93 @@ static int add_new_free_space(struct btrfs_block_group_cache *block_group,
178 237
179 if (start < end) { 238 if (start < end) {
180 size = end - start; 239 size = end - start;
240 total_added += size;
181 ret = btrfs_add_free_space(block_group, start, size); 241 ret = btrfs_add_free_space(block_group, start, size);
182 BUG_ON(ret); 242 BUG_ON(ret);
183 } 243 }
184 244
185 return 0; 245 return total_added;
186}
187
188static int remove_sb_from_cache(struct btrfs_root *root,
189 struct btrfs_block_group_cache *cache)
190{
191 u64 bytenr;
192 u64 *logical;
193 int stripe_len;
194 int i, nr, ret;
195
196 for (i = 0; i < BTRFS_SUPER_MIRROR_MAX; i++) {
197 bytenr = btrfs_sb_offset(i);
198 ret = btrfs_rmap_block(&root->fs_info->mapping_tree,
199 cache->key.objectid, bytenr, 0,
200 &logical, &nr, &stripe_len);
201 BUG_ON(ret);
202 while (nr--) {
203 btrfs_remove_free_space(cache, logical[nr],
204 stripe_len);
205 }
206 kfree(logical);
207 }
208 return 0;
209} 246}
210 247
211static int cache_block_group(struct btrfs_root *root, 248static int caching_kthread(void *data)
212 struct btrfs_block_group_cache *block_group)
213{ 249{
250 struct btrfs_block_group_cache *block_group = data;
251 struct btrfs_fs_info *fs_info = block_group->fs_info;
252 u64 last = 0;
214 struct btrfs_path *path; 253 struct btrfs_path *path;
215 int ret = 0; 254 int ret = 0;
216 struct btrfs_key key; 255 struct btrfs_key key;
217 struct extent_buffer *leaf; 256 struct extent_buffer *leaf;
218 int slot; 257 int slot;
219 u64 last; 258 u64 total_found = 0;
220
221 if (!block_group)
222 return 0;
223
224 root = root->fs_info->extent_root;
225 259
226 if (block_group->cached) 260 BUG_ON(!fs_info);
227 return 0;
228 261
229 path = btrfs_alloc_path(); 262 path = btrfs_alloc_path();
230 if (!path) 263 if (!path)
231 return -ENOMEM; 264 return -ENOMEM;
232 265
233 path->reada = 2; 266 atomic_inc(&block_group->space_info->caching_threads);
267 last = max_t(u64, block_group->key.objectid, BTRFS_SUPER_INFO_OFFSET);
234 /* 268 /*
235 * we get into deadlocks with paths held by callers of this function. 269 * We don't want to deadlock with somebody trying to allocate a new
236 * since the alloc_mutex is protecting things right now, just 270 * extent for the extent root while also trying to search the extent
237 * skip the locking here 271 * root to add free space. So we skip locking and search the commit
272 * root, since its read-only
238 */ 273 */
239 path->skip_locking = 1; 274 path->skip_locking = 1;
240 last = max_t(u64, block_group->key.objectid, BTRFS_SUPER_INFO_OFFSET); 275 path->search_commit_root = 1;
276 path->reada = 2;
277
241 key.objectid = last; 278 key.objectid = last;
242 key.offset = 0; 279 key.offset = 0;
243 btrfs_set_key_type(&key, BTRFS_EXTENT_ITEM_KEY); 280 btrfs_set_key_type(&key, BTRFS_EXTENT_ITEM_KEY);
244 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); 281again:
282 /* need to make sure the commit_root doesn't disappear */
283 down_read(&fs_info->extent_commit_sem);
284
285 ret = btrfs_search_slot(NULL, fs_info->extent_root, &key, path, 0, 0);
245 if (ret < 0) 286 if (ret < 0)
246 goto err; 287 goto err;
247 288
248 while (1) { 289 while (1) {
290 smp_mb();
291 if (block_group->fs_info->closing > 1) {
292 last = (u64)-1;
293 break;
294 }
295
249 leaf = path->nodes[0]; 296 leaf = path->nodes[0];
250 slot = path->slots[0]; 297 slot = path->slots[0];
251 if (slot >= btrfs_header_nritems(leaf)) { 298 if (slot >= btrfs_header_nritems(leaf)) {
252 ret = btrfs_next_leaf(root, path); 299 ret = btrfs_next_leaf(fs_info->extent_root, path);
253 if (ret < 0) 300 if (ret < 0)
254 goto err; 301 goto err;
255 if (ret == 0) 302 else if (ret)
256 continue;
257 else
258 break; 303 break;
304
305 if (need_resched() ||
306 btrfs_transaction_in_commit(fs_info)) {
307 leaf = path->nodes[0];
308
309 /* this shouldn't happen, but if the
310 * leaf is empty just move on.
311 */
312 if (btrfs_header_nritems(leaf) == 0)
313 break;
314 /*
315 * we need to copy the key out so that
316 * we are sure the next search advances
317 * us forward in the btree.
318 */
319 btrfs_item_key_to_cpu(leaf, &key, 0);
320 btrfs_release_path(fs_info->extent_root, path);
321 up_read(&fs_info->extent_commit_sem);
322 schedule_timeout(1);
323 goto again;
324 }
325
326 continue;
259 } 327 }
260 btrfs_item_key_to_cpu(leaf, &key, slot); 328 btrfs_item_key_to_cpu(leaf, &key, slot);
261 if (key.objectid < block_group->key.objectid) 329 if (key.objectid < block_group->key.objectid)
@@ -266,24 +334,59 @@ static int cache_block_group(struct btrfs_root *root,
266 break; 334 break;
267 335
268 if (btrfs_key_type(&key) == BTRFS_EXTENT_ITEM_KEY) { 336 if (btrfs_key_type(&key) == BTRFS_EXTENT_ITEM_KEY) {
269 add_new_free_space(block_group, root->fs_info, last, 337 total_found += add_new_free_space(block_group,
270 key.objectid); 338 fs_info, last,
271 339 key.objectid);
272 last = key.objectid + key.offset; 340 last = key.objectid + key.offset;
273 } 341 }
342
343 if (total_found > (1024 * 1024 * 2)) {
344 total_found = 0;
345 wake_up(&block_group->caching_q);
346 }
274next: 347next:
275 path->slots[0]++; 348 path->slots[0]++;
276 } 349 }
350 ret = 0;
277 351
278 add_new_free_space(block_group, root->fs_info, last, 352 total_found += add_new_free_space(block_group, fs_info, last,
279 block_group->key.objectid + 353 block_group->key.objectid +
280 block_group->key.offset); 354 block_group->key.offset);
355
356 spin_lock(&block_group->lock);
357 block_group->cached = BTRFS_CACHE_FINISHED;
358 spin_unlock(&block_group->lock);
281 359
282 block_group->cached = 1;
283 remove_sb_from_cache(root, block_group);
284 ret = 0;
285err: 360err:
286 btrfs_free_path(path); 361 btrfs_free_path(path);
362 up_read(&fs_info->extent_commit_sem);
363 atomic_dec(&block_group->space_info->caching_threads);
364 wake_up(&block_group->caching_q);
365
366 return 0;
367}
368
369static int cache_block_group(struct btrfs_block_group_cache *cache)
370{
371 struct task_struct *tsk;
372 int ret = 0;
373
374 spin_lock(&cache->lock);
375 if (cache->cached != BTRFS_CACHE_NO) {
376 spin_unlock(&cache->lock);
377 return ret;
378 }
379 cache->cached = BTRFS_CACHE_STARTED;
380 spin_unlock(&cache->lock);
381
382 tsk = kthread_run(caching_kthread, cache, "btrfs-cache-%llu\n",
383 cache->key.objectid);
384 if (IS_ERR(tsk)) {
385 ret = PTR_ERR(tsk);
386 printk(KERN_ERR "error running thread %d\n", ret);
387 BUG();
388 }
389
287 return ret; 390 return ret;
288} 391}
289 392
@@ -2387,13 +2490,29 @@ fail:
2387 2490
2388} 2491}
2389 2492
2493static struct btrfs_block_group_cache *
2494next_block_group(struct btrfs_root *root,
2495 struct btrfs_block_group_cache *cache)
2496{
2497 struct rb_node *node;
2498 spin_lock(&root->fs_info->block_group_cache_lock);
2499 node = rb_next(&cache->cache_node);
2500 btrfs_put_block_group(cache);
2501 if (node) {
2502 cache = rb_entry(node, struct btrfs_block_group_cache,
2503 cache_node);
2504 atomic_inc(&cache->count);
2505 } else
2506 cache = NULL;
2507 spin_unlock(&root->fs_info->block_group_cache_lock);
2508 return cache;
2509}
2510
2390int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans, 2511int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans,
2391 struct btrfs_root *root) 2512 struct btrfs_root *root)
2392{ 2513{
2393 struct btrfs_block_group_cache *cache, *entry; 2514 struct btrfs_block_group_cache *cache;
2394 struct rb_node *n;
2395 int err = 0; 2515 int err = 0;
2396 int werr = 0;
2397 struct btrfs_path *path; 2516 struct btrfs_path *path;
2398 u64 last = 0; 2517 u64 last = 0;
2399 2518
@@ -2402,39 +2521,35 @@ int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans,
2402 return -ENOMEM; 2521 return -ENOMEM;
2403 2522
2404 while (1) { 2523 while (1) {
2405 cache = NULL; 2524 if (last == 0) {
2406 spin_lock(&root->fs_info->block_group_cache_lock); 2525 err = btrfs_run_delayed_refs(trans, root,
2407 for (n = rb_first(&root->fs_info->block_group_cache_tree); 2526 (unsigned long)-1);
2408 n; n = rb_next(n)) { 2527 BUG_ON(err);
2409 entry = rb_entry(n, struct btrfs_block_group_cache,
2410 cache_node);
2411 if (entry->dirty) {
2412 cache = entry;
2413 break;
2414 }
2415 } 2528 }
2416 spin_unlock(&root->fs_info->block_group_cache_lock);
2417 2529
2418 if (!cache) 2530 cache = btrfs_lookup_first_block_group(root->fs_info, last);
2419 break; 2531 while (cache) {
2532 if (cache->dirty)
2533 break;
2534 cache = next_block_group(root, cache);
2535 }
2536 if (!cache) {
2537 if (last == 0)
2538 break;
2539 last = 0;
2540 continue;
2541 }
2420 2542
2421 cache->dirty = 0; 2543 cache->dirty = 0;
2422 last += cache->key.offset; 2544 last = cache->key.objectid + cache->key.offset;
2423 2545
2424 err = write_one_cache_group(trans, root, 2546 err = write_one_cache_group(trans, root, path, cache);
2425 path, cache); 2547 BUG_ON(err);
2426 /* 2548 btrfs_put_block_group(cache);
2427 * if we fail to write the cache group, we want
2428 * to keep it marked dirty in hopes that a later
2429 * write will work
2430 */
2431 if (err) {
2432 werr = err;
2433 continue;
2434 }
2435 } 2549 }
2550
2436 btrfs_free_path(path); 2551 btrfs_free_path(path);
2437 return werr; 2552 return 0;
2438} 2553}
2439 2554
2440int btrfs_extent_readonly(struct btrfs_root *root, u64 bytenr) 2555int btrfs_extent_readonly(struct btrfs_root *root, u64 bytenr)
@@ -2484,6 +2599,7 @@ static int update_space_info(struct btrfs_fs_info *info, u64 flags,
2484 found->force_alloc = 0; 2599 found->force_alloc = 0;
2485 *space_info = found; 2600 *space_info = found;
2486 list_add_rcu(&found->list, &info->space_info); 2601 list_add_rcu(&found->list, &info->space_info);
2602 atomic_set(&found->caching_threads, 0);
2487 return 0; 2603 return 0;
2488} 2604}
2489 2605
@@ -2947,13 +3063,9 @@ int btrfs_update_pinned_extents(struct btrfs_root *root,
2947 struct btrfs_block_group_cache *cache; 3063 struct btrfs_block_group_cache *cache;
2948 struct btrfs_fs_info *fs_info = root->fs_info; 3064 struct btrfs_fs_info *fs_info = root->fs_info;
2949 3065
2950 if (pin) { 3066 if (pin)
2951 set_extent_dirty(&fs_info->pinned_extents, 3067 set_extent_dirty(&fs_info->pinned_extents,
2952 bytenr, bytenr + num - 1, GFP_NOFS); 3068 bytenr, bytenr + num - 1, GFP_NOFS);
2953 } else {
2954 clear_extent_dirty(&fs_info->pinned_extents,
2955 bytenr, bytenr + num - 1, GFP_NOFS);
2956 }
2957 3069
2958 while (num > 0) { 3070 while (num > 0) {
2959 cache = btrfs_lookup_block_group(fs_info, bytenr); 3071 cache = btrfs_lookup_block_group(fs_info, bytenr);
@@ -2969,14 +3081,34 @@ int btrfs_update_pinned_extents(struct btrfs_root *root,
2969 spin_unlock(&cache->space_info->lock); 3081 spin_unlock(&cache->space_info->lock);
2970 fs_info->total_pinned += len; 3082 fs_info->total_pinned += len;
2971 } else { 3083 } else {
3084 int unpin = 0;
3085
3086 /*
3087 * in order to not race with the block group caching, we
3088 * only want to unpin the extent if we are cached. If
3089 * we aren't cached, we want to start async caching this
3090 * block group so we can free the extent the next time
3091 * around.
3092 */
2972 spin_lock(&cache->space_info->lock); 3093 spin_lock(&cache->space_info->lock);
2973 spin_lock(&cache->lock); 3094 spin_lock(&cache->lock);
2974 cache->pinned -= len; 3095 unpin = (cache->cached == BTRFS_CACHE_FINISHED);
2975 cache->space_info->bytes_pinned -= len; 3096 if (likely(unpin)) {
3097 cache->pinned -= len;
3098 cache->space_info->bytes_pinned -= len;
3099 fs_info->total_pinned -= len;
3100 }
2976 spin_unlock(&cache->lock); 3101 spin_unlock(&cache->lock);
2977 spin_unlock(&cache->space_info->lock); 3102 spin_unlock(&cache->space_info->lock);
2978 fs_info->total_pinned -= len; 3103
2979 if (cache->cached) 3104 if (likely(unpin))
3105 clear_extent_dirty(&fs_info->pinned_extents,
3106 bytenr, bytenr + len -1,
3107 GFP_NOFS);
3108 else
3109 cache_block_group(cache);
3110
3111 if (unpin)
2980 btrfs_add_free_space(cache, bytenr, len); 3112 btrfs_add_free_space(cache, bytenr, len);
2981 } 3113 }
2982 btrfs_put_block_group(cache); 3114 btrfs_put_block_group(cache);
@@ -3030,6 +3162,7 @@ int btrfs_copy_pinned(struct btrfs_root *root, struct extent_io_tree *copy)
3030 &start, &end, EXTENT_DIRTY); 3162 &start, &end, EXTENT_DIRTY);
3031 if (ret) 3163 if (ret)
3032 break; 3164 break;
3165
3033 set_extent_dirty(copy, start, end, GFP_NOFS); 3166 set_extent_dirty(copy, start, end, GFP_NOFS);
3034 last = end + 1; 3167 last = end + 1;
3035 } 3168 }
@@ -3058,6 +3191,7 @@ int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans,
3058 3191
3059 cond_resched(); 3192 cond_resched();
3060 } 3193 }
3194
3061 return ret; 3195 return ret;
3062} 3196}
3063 3197
@@ -3436,6 +3570,45 @@ static u64 stripe_align(struct btrfs_root *root, u64 val)
3436} 3570}
3437 3571
3438/* 3572/*
3573 * when we wait for progress in the block group caching, its because
3574 * our allocation attempt failed at least once. So, we must sleep
3575 * and let some progress happen before we try again.
3576 *
3577 * This function will sleep at least once waiting for new free space to
3578 * show up, and then it will check the block group free space numbers
3579 * for our min num_bytes. Another option is to have it go ahead
3580 * and look in the rbtree for a free extent of a given size, but this
3581 * is a good start.
3582 */
3583static noinline int
3584wait_block_group_cache_progress(struct btrfs_block_group_cache *cache,
3585 u64 num_bytes)
3586{
3587 DEFINE_WAIT(wait);
3588
3589 prepare_to_wait(&cache->caching_q, &wait, TASK_UNINTERRUPTIBLE);
3590
3591 if (block_group_cache_done(cache)) {
3592 finish_wait(&cache->caching_q, &wait);
3593 return 0;
3594 }
3595 schedule();
3596 finish_wait(&cache->caching_q, &wait);
3597
3598 wait_event(cache->caching_q, block_group_cache_done(cache) ||
3599 (cache->free_space >= num_bytes));
3600 return 0;
3601}
3602
3603enum btrfs_loop_type {
3604 LOOP_CACHED_ONLY = 0,
3605 LOOP_CACHING_NOWAIT = 1,
3606 LOOP_CACHING_WAIT = 2,
3607 LOOP_ALLOC_CHUNK = 3,
3608 LOOP_NO_EMPTY_SIZE = 4,
3609};
3610
3611/*
3439 * walks the btree of allocated extents and find a hole of a given size. 3612 * walks the btree of allocated extents and find a hole of a given size.
3440 * The key ins is changed to record the hole: 3613 * The key ins is changed to record the hole:
3441 * ins->objectid == block start 3614 * ins->objectid == block start
@@ -3460,6 +3633,7 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans,
3460 struct btrfs_space_info *space_info; 3633 struct btrfs_space_info *space_info;
3461 int last_ptr_loop = 0; 3634 int last_ptr_loop = 0;
3462 int loop = 0; 3635 int loop = 0;
3636 bool found_uncached_bg = false;
3463 3637
3464 WARN_ON(num_bytes < root->sectorsize); 3638 WARN_ON(num_bytes < root->sectorsize);
3465 btrfs_set_key_type(ins, BTRFS_EXTENT_ITEM_KEY); 3639 btrfs_set_key_type(ins, BTRFS_EXTENT_ITEM_KEY);
@@ -3491,15 +3665,18 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans,
3491 search_start = max(search_start, first_logical_byte(root, 0)); 3665 search_start = max(search_start, first_logical_byte(root, 0));
3492 search_start = max(search_start, hint_byte); 3666 search_start = max(search_start, hint_byte);
3493 3667
3494 if (!last_ptr) { 3668 if (!last_ptr)
3495 empty_cluster = 0; 3669 empty_cluster = 0;
3496 loop = 1;
3497 }
3498 3670
3499 if (search_start == hint_byte) { 3671 if (search_start == hint_byte) {
3500 block_group = btrfs_lookup_block_group(root->fs_info, 3672 block_group = btrfs_lookup_block_group(root->fs_info,
3501 search_start); 3673 search_start);
3502 if (block_group && block_group_bits(block_group, data)) { 3674 /*
3675 * we don't want to use the block group if it doesn't match our
3676 * allocation bits, or if its not cached.
3677 */
3678 if (block_group && block_group_bits(block_group, data) &&
3679 block_group_cache_done(block_group)) {
3503 down_read(&space_info->groups_sem); 3680 down_read(&space_info->groups_sem);
3504 if (list_empty(&block_group->list) || 3681 if (list_empty(&block_group->list) ||
3505 block_group->ro) { 3682 block_group->ro) {
@@ -3522,21 +3699,35 @@ search:
3522 down_read(&space_info->groups_sem); 3699 down_read(&space_info->groups_sem);
3523 list_for_each_entry(block_group, &space_info->block_groups, list) { 3700 list_for_each_entry(block_group, &space_info->block_groups, list) {
3524 u64 offset; 3701 u64 offset;
3702 int cached;
3525 3703
3526 atomic_inc(&block_group->count); 3704 atomic_inc(&block_group->count);
3527 search_start = block_group->key.objectid; 3705 search_start = block_group->key.objectid;
3528 3706
3529have_block_group: 3707have_block_group:
3530 if (unlikely(!block_group->cached)) { 3708 if (unlikely(block_group->cached == BTRFS_CACHE_NO)) {
3531 mutex_lock(&block_group->cache_mutex); 3709 /*
3532 ret = cache_block_group(root, block_group); 3710 * we want to start caching kthreads, but not too many
3533 mutex_unlock(&block_group->cache_mutex); 3711 * right off the bat so we don't overwhelm the system,
3534 if (ret) { 3712 * so only start them if there are less than 2 and we're
3535 btrfs_put_block_group(block_group); 3713 * in the initial allocation phase.
3536 break; 3714 */
3715 if (loop > LOOP_CACHING_NOWAIT ||
3716 atomic_read(&space_info->caching_threads) < 2) {
3717 ret = cache_block_group(block_group);
3718 BUG_ON(ret);
3537 } 3719 }
3538 } 3720 }
3539 3721
3722 cached = block_group_cache_done(block_group);
3723 if (unlikely(!cached)) {
3724 found_uncached_bg = true;
3725
3726 /* if we only want cached bgs, loop */
3727 if (loop == LOOP_CACHED_ONLY)
3728 goto loop;
3729 }
3730
3540 if (unlikely(block_group->ro)) 3731 if (unlikely(block_group->ro))
3541 goto loop; 3732 goto loop;
3542 3733
@@ -3615,14 +3806,21 @@ refill_cluster:
3615 spin_unlock(&last_ptr->refill_lock); 3806 spin_unlock(&last_ptr->refill_lock);
3616 goto checks; 3807 goto checks;
3617 } 3808 }
3809 } else if (!cached && loop > LOOP_CACHING_NOWAIT) {
3810 spin_unlock(&last_ptr->refill_lock);
3811
3812 wait_block_group_cache_progress(block_group,
3813 num_bytes + empty_cluster + empty_size);
3814 goto have_block_group;
3618 } 3815 }
3816
3619 /* 3817 /*
3620 * at this point we either didn't find a cluster 3818 * at this point we either didn't find a cluster
3621 * or we weren't able to allocate a block from our 3819 * or we weren't able to allocate a block from our
3622 * cluster. Free the cluster we've been trying 3820 * cluster. Free the cluster we've been trying
3623 * to use, and go to the next block group 3821 * to use, and go to the next block group
3624 */ 3822 */
3625 if (loop < 2) { 3823 if (loop < LOOP_NO_EMPTY_SIZE) {
3626 btrfs_return_cluster_to_free_space(NULL, 3824 btrfs_return_cluster_to_free_space(NULL,
3627 last_ptr); 3825 last_ptr);
3628 spin_unlock(&last_ptr->refill_lock); 3826 spin_unlock(&last_ptr->refill_lock);
@@ -3633,11 +3831,17 @@ refill_cluster:
3633 3831
3634 offset = btrfs_find_space_for_alloc(block_group, search_start, 3832 offset = btrfs_find_space_for_alloc(block_group, search_start,
3635 num_bytes, empty_size); 3833 num_bytes, empty_size);
3636 if (!offset) 3834 if (!offset && (cached || (!cached &&
3835 loop == LOOP_CACHING_NOWAIT))) {
3637 goto loop; 3836 goto loop;
3837 } else if (!offset && (!cached &&
3838 loop > LOOP_CACHING_NOWAIT)) {
3839 wait_block_group_cache_progress(block_group,
3840 num_bytes + empty_size);
3841 goto have_block_group;
3842 }
3638checks: 3843checks:
3639 search_start = stripe_align(root, offset); 3844 search_start = stripe_align(root, offset);
3640
3641 /* move on to the next group */ 3845 /* move on to the next group */
3642 if (search_start + num_bytes >= search_end) { 3846 if (search_start + num_bytes >= search_end) {
3643 btrfs_add_free_space(block_group, offset, num_bytes); 3847 btrfs_add_free_space(block_group, offset, num_bytes);
@@ -3683,13 +3887,26 @@ loop:
3683 } 3887 }
3684 up_read(&space_info->groups_sem); 3888 up_read(&space_info->groups_sem);
3685 3889
3686 /* loop == 0, try to find a clustered alloc in every block group 3890 /* LOOP_CACHED_ONLY, only search fully cached block groups
3687 * loop == 1, try again after forcing a chunk allocation 3891 * LOOP_CACHING_NOWAIT, search partially cached block groups, but
3688 * loop == 2, set empty_size and empty_cluster to 0 and try again 3892 * dont wait foR them to finish caching
3893 * LOOP_CACHING_WAIT, search everything, and wait if our bg is caching
3894 * LOOP_ALLOC_CHUNK, force a chunk allocation and try again
3895 * LOOP_NO_EMPTY_SIZE, set empty_size and empty_cluster to 0 and try
3896 * again
3689 */ 3897 */
3690 if (!ins->objectid && loop < 3 && 3898 if (!ins->objectid && loop < LOOP_NO_EMPTY_SIZE &&
3691 (empty_size || empty_cluster || allowed_chunk_alloc)) { 3899 (found_uncached_bg || empty_size || empty_cluster ||
3692 if (loop >= 2) { 3900 allowed_chunk_alloc)) {
3901 if (found_uncached_bg) {
3902 found_uncached_bg = false;
3903 if (loop < LOOP_CACHING_WAIT) {
3904 loop++;
3905 goto search;
3906 }
3907 }
3908
3909 if (loop == LOOP_ALLOC_CHUNK) {
3693 empty_size = 0; 3910 empty_size = 0;
3694 empty_cluster = 0; 3911 empty_cluster = 0;
3695 } 3912 }
@@ -3702,7 +3919,7 @@ loop:
3702 space_info->force_alloc = 1; 3919 space_info->force_alloc = 1;
3703 } 3920 }
3704 3921
3705 if (loop < 3) { 3922 if (loop < LOOP_NO_EMPTY_SIZE) {
3706 loop++; 3923 loop++;
3707 goto search; 3924 goto search;
3708 } 3925 }
@@ -3798,7 +4015,7 @@ again:
3798 num_bytes, data, 1); 4015 num_bytes, data, 1);
3799 goto again; 4016 goto again;
3800 } 4017 }
3801 if (ret) { 4018 if (ret == -ENOSPC) {
3802 struct btrfs_space_info *sinfo; 4019 struct btrfs_space_info *sinfo;
3803 4020
3804 sinfo = __find_space_info(root->fs_info, data); 4021 sinfo = __find_space_info(root->fs_info, data);
@@ -3806,7 +4023,6 @@ again:
3806 "wanted %llu\n", (unsigned long long)data, 4023 "wanted %llu\n", (unsigned long long)data,
3807 (unsigned long long)num_bytes); 4024 (unsigned long long)num_bytes);
3808 dump_space_info(sinfo, num_bytes); 4025 dump_space_info(sinfo, num_bytes);
3809 BUG();
3810 } 4026 }
3811 4027
3812 return ret; 4028 return ret;
@@ -3844,7 +4060,9 @@ int btrfs_reserve_extent(struct btrfs_trans_handle *trans,
3844 ret = __btrfs_reserve_extent(trans, root, num_bytes, min_alloc_size, 4060 ret = __btrfs_reserve_extent(trans, root, num_bytes, min_alloc_size,
3845 empty_size, hint_byte, search_end, ins, 4061 empty_size, hint_byte, search_end, ins,
3846 data); 4062 data);
3847 update_reserved_extents(root, ins->objectid, ins->offset, 1); 4063 if (!ret)
4064 update_reserved_extents(root, ins->objectid, ins->offset, 1);
4065
3848 return ret; 4066 return ret;
3849} 4067}
3850 4068
@@ -4006,9 +4224,9 @@ int btrfs_alloc_logged_file_extent(struct btrfs_trans_handle *trans,
4006 struct btrfs_block_group_cache *block_group; 4224 struct btrfs_block_group_cache *block_group;
4007 4225
4008 block_group = btrfs_lookup_block_group(root->fs_info, ins->objectid); 4226 block_group = btrfs_lookup_block_group(root->fs_info, ins->objectid);
4009 mutex_lock(&block_group->cache_mutex); 4227 cache_block_group(block_group);
4010 cache_block_group(root, block_group); 4228 wait_event(block_group->caching_q,
4011 mutex_unlock(&block_group->cache_mutex); 4229 block_group_cache_done(block_group));
4012 4230
4013 ret = btrfs_remove_free_space(block_group, ins->objectid, 4231 ret = btrfs_remove_free_space(block_group, ins->objectid,
4014 ins->offset); 4232 ins->offset);
@@ -4039,7 +4257,8 @@ static int alloc_tree_block(struct btrfs_trans_handle *trans,
4039 ret = __btrfs_reserve_extent(trans, root, num_bytes, num_bytes, 4257 ret = __btrfs_reserve_extent(trans, root, num_bytes, num_bytes,
4040 empty_size, hint_byte, search_end, 4258 empty_size, hint_byte, search_end,
4041 ins, 0); 4259 ins, 0);
4042 BUG_ON(ret); 4260 if (ret)
4261 return ret;
4043 4262
4044 if (root_objectid == BTRFS_TREE_RELOC_OBJECTID) { 4263 if (root_objectid == BTRFS_TREE_RELOC_OBJECTID) {
4045 if (parent == 0) 4264 if (parent == 0)
@@ -6955,11 +7174,16 @@ int btrfs_free_block_groups(struct btrfs_fs_info *info)
6955 &info->block_group_cache_tree); 7174 &info->block_group_cache_tree);
6956 spin_unlock(&info->block_group_cache_lock); 7175 spin_unlock(&info->block_group_cache_lock);
6957 7176
6958 btrfs_remove_free_space_cache(block_group);
6959 down_write(&block_group->space_info->groups_sem); 7177 down_write(&block_group->space_info->groups_sem);
6960 list_del(&block_group->list); 7178 list_del(&block_group->list);
6961 up_write(&block_group->space_info->groups_sem); 7179 up_write(&block_group->space_info->groups_sem);
6962 7180
7181 if (block_group->cached == BTRFS_CACHE_STARTED)
7182 wait_event(block_group->caching_q,
7183 block_group_cache_done(block_group));
7184
7185 btrfs_remove_free_space_cache(block_group);
7186
6963 WARN_ON(atomic_read(&block_group->count) != 1); 7187 WARN_ON(atomic_read(&block_group->count) != 1);
6964 kfree(block_group); 7188 kfree(block_group);
6965 7189
@@ -7025,9 +7249,19 @@ int btrfs_read_block_groups(struct btrfs_root *root)
7025 atomic_set(&cache->count, 1); 7249 atomic_set(&cache->count, 1);
7026 spin_lock_init(&cache->lock); 7250 spin_lock_init(&cache->lock);
7027 spin_lock_init(&cache->tree_lock); 7251 spin_lock_init(&cache->tree_lock);
7028 mutex_init(&cache->cache_mutex); 7252 cache->fs_info = info;
7253 init_waitqueue_head(&cache->caching_q);
7029 INIT_LIST_HEAD(&cache->list); 7254 INIT_LIST_HEAD(&cache->list);
7030 INIT_LIST_HEAD(&cache->cluster_list); 7255 INIT_LIST_HEAD(&cache->cluster_list);
7256
7257 /*
7258 * we only want to have 32k of ram per block group for keeping
7259 * track of free space, and if we pass 1/2 of that we want to
7260 * start converting things over to using bitmaps
7261 */
7262 cache->extents_thresh = ((1024 * 32) / 2) /
7263 sizeof(struct btrfs_free_space);
7264
7031 read_extent_buffer(leaf, &cache->item, 7265 read_extent_buffer(leaf, &cache->item,
7032 btrfs_item_ptr_offset(leaf, path->slots[0]), 7266 btrfs_item_ptr_offset(leaf, path->slots[0]),
7033 sizeof(cache->item)); 7267 sizeof(cache->item));
@@ -7036,6 +7270,26 @@ int btrfs_read_block_groups(struct btrfs_root *root)
7036 key.objectid = found_key.objectid + found_key.offset; 7270 key.objectid = found_key.objectid + found_key.offset;
7037 btrfs_release_path(root, path); 7271 btrfs_release_path(root, path);
7038 cache->flags = btrfs_block_group_flags(&cache->item); 7272 cache->flags = btrfs_block_group_flags(&cache->item);
7273 cache->sectorsize = root->sectorsize;
7274
7275 remove_sb_from_cache(root, cache);
7276
7277 /*
7278 * check for two cases, either we are full, and therefore
7279 * don't need to bother with the caching work since we won't
7280 * find any space, or we are empty, and we can just add all
7281 * the space in and be done with it. This saves us _alot_ of
7282 * time, particularly in the full case.
7283 */
7284 if (found_key.offset == btrfs_block_group_used(&cache->item)) {
7285 cache->cached = BTRFS_CACHE_FINISHED;
7286 } else if (btrfs_block_group_used(&cache->item) == 0) {
7287 cache->cached = BTRFS_CACHE_FINISHED;
7288 add_new_free_space(cache, root->fs_info,
7289 found_key.objectid,
7290 found_key.objectid +
7291 found_key.offset);
7292 }
7039 7293
7040 ret = update_space_info(info, cache->flags, found_key.offset, 7294 ret = update_space_info(info, cache->flags, found_key.offset,
7041 btrfs_block_group_used(&cache->item), 7295 btrfs_block_group_used(&cache->item),
@@ -7079,10 +7333,19 @@ int btrfs_make_block_group(struct btrfs_trans_handle *trans,
7079 cache->key.objectid = chunk_offset; 7333 cache->key.objectid = chunk_offset;
7080 cache->key.offset = size; 7334 cache->key.offset = size;
7081 cache->key.type = BTRFS_BLOCK_GROUP_ITEM_KEY; 7335 cache->key.type = BTRFS_BLOCK_GROUP_ITEM_KEY;
7336 cache->sectorsize = root->sectorsize;
7337
7338 /*
7339 * we only want to have 32k of ram per block group for keeping track
7340 * of free space, and if we pass 1/2 of that we want to start
7341 * converting things over to using bitmaps
7342 */
7343 cache->extents_thresh = ((1024 * 32) / 2) /
7344 sizeof(struct btrfs_free_space);
7082 atomic_set(&cache->count, 1); 7345 atomic_set(&cache->count, 1);
7083 spin_lock_init(&cache->lock); 7346 spin_lock_init(&cache->lock);
7084 spin_lock_init(&cache->tree_lock); 7347 spin_lock_init(&cache->tree_lock);
7085 mutex_init(&cache->cache_mutex); 7348 init_waitqueue_head(&cache->caching_q);
7086 INIT_LIST_HEAD(&cache->list); 7349 INIT_LIST_HEAD(&cache->list);
7087 INIT_LIST_HEAD(&cache->cluster_list); 7350 INIT_LIST_HEAD(&cache->cluster_list);
7088 7351
@@ -7091,6 +7354,12 @@ int btrfs_make_block_group(struct btrfs_trans_handle *trans,
7091 cache->flags = type; 7354 cache->flags = type;
7092 btrfs_set_block_group_flags(&cache->item, type); 7355 btrfs_set_block_group_flags(&cache->item, type);
7093 7356
7357 cache->cached = BTRFS_CACHE_FINISHED;
7358 remove_sb_from_cache(root, cache);
7359
7360 add_new_free_space(cache, root->fs_info, chunk_offset,
7361 chunk_offset + size);
7362
7094 ret = update_space_info(root->fs_info, cache->flags, size, bytes_used, 7363 ret = update_space_info(root->fs_info, cache->flags, size, bytes_used,
7095 &cache->space_info); 7364 &cache->space_info);
7096 BUG_ON(ret); 7365 BUG_ON(ret);
@@ -7149,7 +7418,7 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans,
7149 rb_erase(&block_group->cache_node, 7418 rb_erase(&block_group->cache_node,
7150 &root->fs_info->block_group_cache_tree); 7419 &root->fs_info->block_group_cache_tree);
7151 spin_unlock(&root->fs_info->block_group_cache_lock); 7420 spin_unlock(&root->fs_info->block_group_cache_lock);
7152 btrfs_remove_free_space_cache(block_group); 7421
7153 down_write(&block_group->space_info->groups_sem); 7422 down_write(&block_group->space_info->groups_sem);
7154 /* 7423 /*
7155 * we must use list_del_init so people can check to see if they 7424 * we must use list_del_init so people can check to see if they
@@ -7158,11 +7427,18 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans,
7158 list_del_init(&block_group->list); 7427 list_del_init(&block_group->list);
7159 up_write(&block_group->space_info->groups_sem); 7428 up_write(&block_group->space_info->groups_sem);
7160 7429
7430 if (block_group->cached == BTRFS_CACHE_STARTED)
7431 wait_event(block_group->caching_q,
7432 block_group_cache_done(block_group));
7433
7434 btrfs_remove_free_space_cache(block_group);
7435
7161 spin_lock(&block_group->space_info->lock); 7436 spin_lock(&block_group->space_info->lock);
7162 block_group->space_info->total_bytes -= block_group->key.offset; 7437 block_group->space_info->total_bytes -= block_group->key.offset;
7163 block_group->space_info->bytes_readonly -= block_group->key.offset; 7438 block_group->space_info->bytes_readonly -= block_group->key.offset;
7164 spin_unlock(&block_group->space_info->lock); 7439 spin_unlock(&block_group->space_info->lock);
7165 block_group->space_info->full = 0; 7440
7441 btrfs_clear_space_info_full(root->fs_info);
7166 7442
7167 btrfs_put_block_group(block_group); 7443 btrfs_put_block_group(block_group);
7168 btrfs_put_block_group(block_group); 7444 btrfs_put_block_group(block_group);
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 4538e48581a..5edcee3a617 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -16,45 +16,46 @@
16 * Boston, MA 021110-1307, USA. 16 * Boston, MA 021110-1307, USA.
17 */ 17 */
18 18
19#include <linux/pagemap.h>
19#include <linux/sched.h> 20#include <linux/sched.h>
21#include <linux/math64.h>
20#include "ctree.h" 22#include "ctree.h"
21#include "free-space-cache.h" 23#include "free-space-cache.h"
22#include "transaction.h" 24#include "transaction.h"
23 25
24struct btrfs_free_space { 26#define BITS_PER_BITMAP (PAGE_CACHE_SIZE * 8)
25 struct rb_node bytes_index; 27#define MAX_CACHE_BYTES_PER_GIG (32 * 1024)
26 struct rb_node offset_index;
27 u64 offset;
28 u64 bytes;
29};
30 28
31static int tree_insert_offset(struct rb_root *root, u64 offset, 29static inline unsigned long offset_to_bit(u64 bitmap_start, u64 sectorsize,
32 struct rb_node *node) 30 u64 offset)
33{ 31{
34 struct rb_node **p = &root->rb_node; 32 BUG_ON(offset < bitmap_start);
35 struct rb_node *parent = NULL; 33 offset -= bitmap_start;
36 struct btrfs_free_space *info; 34 return (unsigned long)(div64_u64(offset, sectorsize));
35}
37 36
38 while (*p) { 37static inline unsigned long bytes_to_bits(u64 bytes, u64 sectorsize)
39 parent = *p; 38{
40 info = rb_entry(parent, struct btrfs_free_space, offset_index); 39 return (unsigned long)(div64_u64(bytes, sectorsize));
40}
41 41
42 if (offset < info->offset) 42static inline u64 offset_to_bitmap(struct btrfs_block_group_cache *block_group,
43 p = &(*p)->rb_left; 43 u64 offset)
44 else if (offset > info->offset) 44{
45 p = &(*p)->rb_right; 45 u64 bitmap_start;
46 else 46 u64 bytes_per_bitmap;
47 return -EEXIST;
48 }
49 47
50 rb_link_node(node, parent, p); 48 bytes_per_bitmap = BITS_PER_BITMAP * block_group->sectorsize;
51 rb_insert_color(node, root); 49 bitmap_start = offset - block_group->key.objectid;
50 bitmap_start = div64_u64(bitmap_start, bytes_per_bitmap);
51 bitmap_start *= bytes_per_bitmap;
52 bitmap_start += block_group->key.objectid;
52 53
53 return 0; 54 return bitmap_start;
54} 55}
55 56
56static int tree_insert_bytes(struct rb_root *root, u64 bytes, 57static int tree_insert_offset(struct rb_root *root, u64 offset,
57 struct rb_node *node) 58 struct rb_node *node, int bitmap)
58{ 59{
59 struct rb_node **p = &root->rb_node; 60 struct rb_node **p = &root->rb_node;
60 struct rb_node *parent = NULL; 61 struct rb_node *parent = NULL;
@@ -62,12 +63,34 @@ static int tree_insert_bytes(struct rb_root *root, u64 bytes,
62 63
63 while (*p) { 64 while (*p) {
64 parent = *p; 65 parent = *p;
65 info = rb_entry(parent, struct btrfs_free_space, bytes_index); 66 info = rb_entry(parent, struct btrfs_free_space, offset_index);
66 67
67 if (bytes < info->bytes) 68 if (offset < info->offset) {
68 p = &(*p)->rb_left; 69 p = &(*p)->rb_left;
69 else 70 } else if (offset > info->offset) {
70 p = &(*p)->rb_right; 71 p = &(*p)->rb_right;
72 } else {
73 /*
74 * we could have a bitmap entry and an extent entry
75 * share the same offset. If this is the case, we want
76 * the extent entry to always be found first if we do a
77 * linear search through the tree, since we want to have
78 * the quickest allocation time, and allocating from an
79 * extent is faster than allocating from a bitmap. So
80 * if we're inserting a bitmap and we find an entry at
81 * this offset, we want to go right, or after this entry
82 * logically. If we are inserting an extent and we've
83 * found a bitmap, we want to go left, or before
84 * logically.
85 */
86 if (bitmap) {
87 WARN_ON(info->bitmap);
88 p = &(*p)->rb_right;
89 } else {
90 WARN_ON(!info->bitmap);
91 p = &(*p)->rb_left;
92 }
93 }
71 } 94 }
72 95
73 rb_link_node(node, parent, p); 96 rb_link_node(node, parent, p);
@@ -79,110 +102,143 @@ static int tree_insert_bytes(struct rb_root *root, u64 bytes,
79/* 102/*
80 * searches the tree for the given offset. 103 * searches the tree for the given offset.
81 * 104 *
82 * fuzzy == 1: this is used for allocations where we are given a hint of where 105 * fuzzy - If this is set, then we are trying to make an allocation, and we just
83 * to look for free space. Because the hint may not be completely on an offset 106 * want a section that has at least bytes size and comes at or after the given
84 * mark, or the hint may no longer point to free space we need to fudge our 107 * offset.
85 * results a bit. So we look for free space starting at or after offset with at
86 * least bytes size. We prefer to find as close to the given offset as we can.
87 * Also if the offset is within a free space range, then we will return the free
88 * space that contains the given offset, which means we can return a free space
89 * chunk with an offset before the provided offset.
90 *
91 * fuzzy == 0: this is just a normal tree search. Give us the free space that
92 * starts at the given offset which is at least bytes size, and if its not there
93 * return NULL.
94 */ 108 */
95static struct btrfs_free_space *tree_search_offset(struct rb_root *root, 109static struct btrfs_free_space *
96 u64 offset, u64 bytes, 110tree_search_offset(struct btrfs_block_group_cache *block_group,
97 int fuzzy) 111 u64 offset, int bitmap_only, int fuzzy)
98{ 112{
99 struct rb_node *n = root->rb_node; 113 struct rb_node *n = block_group->free_space_offset.rb_node;
100 struct btrfs_free_space *entry, *ret = NULL; 114 struct btrfs_free_space *entry, *prev = NULL;
115
116 /* find entry that is closest to the 'offset' */
117 while (1) {
118 if (!n) {
119 entry = NULL;
120 break;
121 }
101 122
102 while (n) {
103 entry = rb_entry(n, struct btrfs_free_space, offset_index); 123 entry = rb_entry(n, struct btrfs_free_space, offset_index);
124 prev = entry;
104 125
105 if (offset < entry->offset) { 126 if (offset < entry->offset)
106 if (fuzzy &&
107 (!ret || entry->offset < ret->offset) &&
108 (bytes <= entry->bytes))
109 ret = entry;
110 n = n->rb_left; 127 n = n->rb_left;
111 } else if (offset > entry->offset) { 128 else if (offset > entry->offset)
112 if (fuzzy &&
113 (entry->offset + entry->bytes - 1) >= offset &&
114 bytes <= entry->bytes) {
115 ret = entry;
116 break;
117 }
118 n = n->rb_right; 129 n = n->rb_right;
119 } else { 130 else
120 if (bytes > entry->bytes) {
121 n = n->rb_right;
122 continue;
123 }
124 ret = entry;
125 break; 131 break;
126 }
127 } 132 }
128 133
129 return ret; 134 if (bitmap_only) {
130} 135 if (!entry)
136 return NULL;
137 if (entry->bitmap)
138 return entry;
131 139
132/* 140 /*
133 * return a chunk at least bytes size, as close to offset that we can get. 141 * bitmap entry and extent entry may share same offset,
134 */ 142 * in that case, bitmap entry comes after extent entry.
135static struct btrfs_free_space *tree_search_bytes(struct rb_root *root, 143 */
136 u64 offset, u64 bytes) 144 n = rb_next(n);
137{ 145 if (!n)
138 struct rb_node *n = root->rb_node; 146 return NULL;
139 struct btrfs_free_space *entry, *ret = NULL; 147 entry = rb_entry(n, struct btrfs_free_space, offset_index);
140 148 if (entry->offset != offset)
141 while (n) { 149 return NULL;
142 entry = rb_entry(n, struct btrfs_free_space, bytes_index);
143 150
144 if (bytes < entry->bytes) { 151 WARN_ON(!entry->bitmap);
152 return entry;
153 } else if (entry) {
154 if (entry->bitmap) {
145 /* 155 /*
146 * We prefer to get a hole size as close to the size we 156 * if previous extent entry covers the offset,
147 * are asking for so we don't take small slivers out of 157 * we should return it instead of the bitmap entry
148 * huge holes, but we also want to get as close to the
149 * offset as possible so we don't have a whole lot of
150 * fragmentation.
151 */ 158 */
152 if (offset <= entry->offset) { 159 n = &entry->offset_index;
153 if (!ret) 160 while (1) {
154 ret = entry; 161 n = rb_prev(n);
155 else if (entry->bytes < ret->bytes) 162 if (!n)
156 ret = entry; 163 break;
157 else if (entry->offset < ret->offset) 164 prev = rb_entry(n, struct btrfs_free_space,
158 ret = entry; 165 offset_index);
166 if (!prev->bitmap) {
167 if (prev->offset + prev->bytes > offset)
168 entry = prev;
169 break;
170 }
159 } 171 }
160 n = n->rb_left; 172 }
161 } else if (bytes > entry->bytes) { 173 return entry;
162 n = n->rb_right; 174 }
175
176 if (!prev)
177 return NULL;
178
179 /* find last entry before the 'offset' */
180 entry = prev;
181 if (entry->offset > offset) {
182 n = rb_prev(&entry->offset_index);
183 if (n) {
184 entry = rb_entry(n, struct btrfs_free_space,
185 offset_index);
186 BUG_ON(entry->offset > offset);
163 } else { 187 } else {
164 /* 188 if (fuzzy)
165 * Ok we may have multiple chunks of the wanted size, 189 return entry;
166 * so we don't want to take the first one we find, we 190 else
167 * want to take the one closest to our given offset, so 191 return NULL;
168 * keep searching just in case theres a better match.
169 */
170 n = n->rb_right;
171 if (offset > entry->offset)
172 continue;
173 else if (!ret || entry->offset < ret->offset)
174 ret = entry;
175 } 192 }
176 } 193 }
177 194
178 return ret; 195 if (entry->bitmap) {
196 n = &entry->offset_index;
197 while (1) {
198 n = rb_prev(n);
199 if (!n)
200 break;
201 prev = rb_entry(n, struct btrfs_free_space,
202 offset_index);
203 if (!prev->bitmap) {
204 if (prev->offset + prev->bytes > offset)
205 return prev;
206 break;
207 }
208 }
209 if (entry->offset + BITS_PER_BITMAP *
210 block_group->sectorsize > offset)
211 return entry;
212 } else if (entry->offset + entry->bytes > offset)
213 return entry;
214
215 if (!fuzzy)
216 return NULL;
217
218 while (1) {
219 if (entry->bitmap) {
220 if (entry->offset + BITS_PER_BITMAP *
221 block_group->sectorsize > offset)
222 break;
223 } else {
224 if (entry->offset + entry->bytes > offset)
225 break;
226 }
227
228 n = rb_next(&entry->offset_index);
229 if (!n)
230 return NULL;
231 entry = rb_entry(n, struct btrfs_free_space, offset_index);
232 }
233 return entry;
179} 234}
180 235
181static void unlink_free_space(struct btrfs_block_group_cache *block_group, 236static void unlink_free_space(struct btrfs_block_group_cache *block_group,
182 struct btrfs_free_space *info) 237 struct btrfs_free_space *info)
183{ 238{
184 rb_erase(&info->offset_index, &block_group->free_space_offset); 239 rb_erase(&info->offset_index, &block_group->free_space_offset);
185 rb_erase(&info->bytes_index, &block_group->free_space_bytes); 240 block_group->free_extents--;
241 block_group->free_space -= info->bytes;
186} 242}
187 243
188static int link_free_space(struct btrfs_block_group_cache *block_group, 244static int link_free_space(struct btrfs_block_group_cache *block_group,
@@ -190,17 +246,353 @@ static int link_free_space(struct btrfs_block_group_cache *block_group,
190{ 246{
191 int ret = 0; 247 int ret = 0;
192 248
193 249 BUG_ON(!info->bitmap && !info->bytes);
194 BUG_ON(!info->bytes);
195 ret = tree_insert_offset(&block_group->free_space_offset, info->offset, 250 ret = tree_insert_offset(&block_group->free_space_offset, info->offset,
196 &info->offset_index); 251 &info->offset_index, (info->bitmap != NULL));
197 if (ret) 252 if (ret)
198 return ret; 253 return ret;
199 254
200 ret = tree_insert_bytes(&block_group->free_space_bytes, info->bytes, 255 block_group->free_space += info->bytes;
201 &info->bytes_index); 256 block_group->free_extents++;
202 if (ret) 257 return ret;
203 return ret; 258}
259
260static void recalculate_thresholds(struct btrfs_block_group_cache *block_group)
261{
262 u64 max_bytes, possible_bytes;
263
264 /*
265 * The goal is to keep the total amount of memory used per 1gb of space
266 * at or below 32k, so we need to adjust how much memory we allow to be
267 * used by extent based free space tracking
268 */
269 max_bytes = MAX_CACHE_BYTES_PER_GIG *
270 (div64_u64(block_group->key.offset, 1024 * 1024 * 1024));
271
272 possible_bytes = (block_group->total_bitmaps * PAGE_CACHE_SIZE) +
273 (sizeof(struct btrfs_free_space) *
274 block_group->extents_thresh);
275
276 if (possible_bytes > max_bytes) {
277 int extent_bytes = max_bytes -
278 (block_group->total_bitmaps * PAGE_CACHE_SIZE);
279
280 if (extent_bytes <= 0) {
281 block_group->extents_thresh = 0;
282 return;
283 }
284
285 block_group->extents_thresh = extent_bytes /
286 (sizeof(struct btrfs_free_space));
287 }
288}
289
290static void bitmap_clear_bits(struct btrfs_block_group_cache *block_group,
291 struct btrfs_free_space *info, u64 offset,
292 u64 bytes)
293{
294 unsigned long start, end;
295 unsigned long i;
296
297 start = offset_to_bit(info->offset, block_group->sectorsize, offset);
298 end = start + bytes_to_bits(bytes, block_group->sectorsize);
299 BUG_ON(end > BITS_PER_BITMAP);
300
301 for (i = start; i < end; i++)
302 clear_bit(i, info->bitmap);
303
304 info->bytes -= bytes;
305 block_group->free_space -= bytes;
306}
307
308static void bitmap_set_bits(struct btrfs_block_group_cache *block_group,
309 struct btrfs_free_space *info, u64 offset,
310 u64 bytes)
311{
312 unsigned long start, end;
313 unsigned long i;
314
315 start = offset_to_bit(info->offset, block_group->sectorsize, offset);
316 end = start + bytes_to_bits(bytes, block_group->sectorsize);
317 BUG_ON(end > BITS_PER_BITMAP);
318
319 for (i = start; i < end; i++)
320 set_bit(i, info->bitmap);
321
322 info->bytes += bytes;
323 block_group->free_space += bytes;
324}
325
326static int search_bitmap(struct btrfs_block_group_cache *block_group,
327 struct btrfs_free_space *bitmap_info, u64 *offset,
328 u64 *bytes)
329{
330 unsigned long found_bits = 0;
331 unsigned long bits, i;
332 unsigned long next_zero;
333
334 i = offset_to_bit(bitmap_info->offset, block_group->sectorsize,
335 max_t(u64, *offset, bitmap_info->offset));
336 bits = bytes_to_bits(*bytes, block_group->sectorsize);
337
338 for (i = find_next_bit(bitmap_info->bitmap, BITS_PER_BITMAP, i);
339 i < BITS_PER_BITMAP;
340 i = find_next_bit(bitmap_info->bitmap, BITS_PER_BITMAP, i + 1)) {
341 next_zero = find_next_zero_bit(bitmap_info->bitmap,
342 BITS_PER_BITMAP, i);
343 if ((next_zero - i) >= bits) {
344 found_bits = next_zero - i;
345 break;
346 }
347 i = next_zero;
348 }
349
350 if (found_bits) {
351 *offset = (u64)(i * block_group->sectorsize) +
352 bitmap_info->offset;
353 *bytes = (u64)(found_bits) * block_group->sectorsize;
354 return 0;
355 }
356
357 return -1;
358}
359
360static struct btrfs_free_space *find_free_space(struct btrfs_block_group_cache
361 *block_group, u64 *offset,
362 u64 *bytes, int debug)
363{
364 struct btrfs_free_space *entry;
365 struct rb_node *node;
366 int ret;
367
368 if (!block_group->free_space_offset.rb_node)
369 return NULL;
370
371 entry = tree_search_offset(block_group,
372 offset_to_bitmap(block_group, *offset),
373 0, 1);
374 if (!entry)
375 return NULL;
376
377 for (node = &entry->offset_index; node; node = rb_next(node)) {
378 entry = rb_entry(node, struct btrfs_free_space, offset_index);
379 if (entry->bytes < *bytes)
380 continue;
381
382 if (entry->bitmap) {
383 ret = search_bitmap(block_group, entry, offset, bytes);
384 if (!ret)
385 return entry;
386 continue;
387 }
388
389 *offset = entry->offset;
390 *bytes = entry->bytes;
391 return entry;
392 }
393
394 return NULL;
395}
396
397static void add_new_bitmap(struct btrfs_block_group_cache *block_group,
398 struct btrfs_free_space *info, u64 offset)
399{
400 u64 bytes_per_bg = BITS_PER_BITMAP * block_group->sectorsize;
401 int max_bitmaps = (int)div64_u64(block_group->key.offset +
402 bytes_per_bg - 1, bytes_per_bg);
403 BUG_ON(block_group->total_bitmaps >= max_bitmaps);
404
405 info->offset = offset_to_bitmap(block_group, offset);
406 link_free_space(block_group, info);
407 block_group->total_bitmaps++;
408
409 recalculate_thresholds(block_group);
410}
411
412static noinline int remove_from_bitmap(struct btrfs_block_group_cache *block_group,
413 struct btrfs_free_space *bitmap_info,
414 u64 *offset, u64 *bytes)
415{
416 u64 end;
417 u64 search_start, search_bytes;
418 int ret;
419
420again:
421 end = bitmap_info->offset +
422 (u64)(BITS_PER_BITMAP * block_group->sectorsize) - 1;
423
424 /*
425 * XXX - this can go away after a few releases.
426 *
427 * since the only user of btrfs_remove_free_space is the tree logging
428 * stuff, and the only way to test that is under crash conditions, we
429 * want to have this debug stuff here just in case somethings not
430 * working. Search the bitmap for the space we are trying to use to
431 * make sure its actually there. If its not there then we need to stop
432 * because something has gone wrong.
433 */
434 search_start = *offset;
435 search_bytes = *bytes;
436 ret = search_bitmap(block_group, bitmap_info, &search_start,
437 &search_bytes);
438 BUG_ON(ret < 0 || search_start != *offset);
439
440 if (*offset > bitmap_info->offset && *offset + *bytes > end) {
441 bitmap_clear_bits(block_group, bitmap_info, *offset,
442 end - *offset + 1);
443 *bytes -= end - *offset + 1;
444 *offset = end + 1;
445 } else if (*offset >= bitmap_info->offset && *offset + *bytes <= end) {
446 bitmap_clear_bits(block_group, bitmap_info, *offset, *bytes);
447 *bytes = 0;
448 }
449
450 if (*bytes) {
451 struct rb_node *next = rb_next(&bitmap_info->offset_index);
452 if (!bitmap_info->bytes) {
453 unlink_free_space(block_group, bitmap_info);
454 kfree(bitmap_info->bitmap);
455 kfree(bitmap_info);
456 block_group->total_bitmaps--;
457 recalculate_thresholds(block_group);
458 }
459
460 /*
461 * no entry after this bitmap, but we still have bytes to
462 * remove, so something has gone wrong.
463 */
464 if (!next)
465 return -EINVAL;
466
467 bitmap_info = rb_entry(next, struct btrfs_free_space,
468 offset_index);
469
470 /*
471 * if the next entry isn't a bitmap we need to return to let the
472 * extent stuff do its work.
473 */
474 if (!bitmap_info->bitmap)
475 return -EAGAIN;
476
477 /*
478 * Ok the next item is a bitmap, but it may not actually hold
479 * the information for the rest of this free space stuff, so
480 * look for it, and if we don't find it return so we can try
481 * everything over again.
482 */
483 search_start = *offset;
484 search_bytes = *bytes;
485 ret = search_bitmap(block_group, bitmap_info, &search_start,
486 &search_bytes);
487 if (ret < 0 || search_start != *offset)
488 return -EAGAIN;
489
490 goto again;
491 } else if (!bitmap_info->bytes) {
492 unlink_free_space(block_group, bitmap_info);
493 kfree(bitmap_info->bitmap);
494 kfree(bitmap_info);
495 block_group->total_bitmaps--;
496 recalculate_thresholds(block_group);
497 }
498
499 return 0;
500}
501
502static int insert_into_bitmap(struct btrfs_block_group_cache *block_group,
503 struct btrfs_free_space *info)
504{
505 struct btrfs_free_space *bitmap_info;
506 int added = 0;
507 u64 bytes, offset, end;
508 int ret;
509
510 /*
511 * If we are below the extents threshold then we can add this as an
512 * extent, and don't have to deal with the bitmap
513 */
514 if (block_group->free_extents < block_group->extents_thresh &&
515 info->bytes > block_group->sectorsize * 4)
516 return 0;
517
518 /*
519 * some block groups are so tiny they can't be enveloped by a bitmap, so
520 * don't even bother to create a bitmap for this
521 */
522 if (BITS_PER_BITMAP * block_group->sectorsize >
523 block_group->key.offset)
524 return 0;
525
526 bytes = info->bytes;
527 offset = info->offset;
528
529again:
530 bitmap_info = tree_search_offset(block_group,
531 offset_to_bitmap(block_group, offset),
532 1, 0);
533 if (!bitmap_info) {
534 BUG_ON(added);
535 goto new_bitmap;
536 }
537
538 end = bitmap_info->offset +
539 (u64)(BITS_PER_BITMAP * block_group->sectorsize);
540
541 if (offset >= bitmap_info->offset && offset + bytes > end) {
542 bitmap_set_bits(block_group, bitmap_info, offset,
543 end - offset);
544 bytes -= end - offset;
545 offset = end;
546 added = 0;
547 } else if (offset >= bitmap_info->offset && offset + bytes <= end) {
548 bitmap_set_bits(block_group, bitmap_info, offset, bytes);
549 bytes = 0;
550 } else {
551 BUG();
552 }
553
554 if (!bytes) {
555 ret = 1;
556 goto out;
557 } else
558 goto again;
559
560new_bitmap:
561 if (info && info->bitmap) {
562 add_new_bitmap(block_group, info, offset);
563 added = 1;
564 info = NULL;
565 goto again;
566 } else {
567 spin_unlock(&block_group->tree_lock);
568
569 /* no pre-allocated info, allocate a new one */
570 if (!info) {
571 info = kzalloc(sizeof(struct btrfs_free_space),
572 GFP_NOFS);
573 if (!info) {
574 spin_lock(&block_group->tree_lock);
575 ret = -ENOMEM;
576 goto out;
577 }
578 }
579
580 /* allocate the bitmap */
581 info->bitmap = kzalloc(PAGE_CACHE_SIZE, GFP_NOFS);
582 spin_lock(&block_group->tree_lock);
583 if (!info->bitmap) {
584 ret = -ENOMEM;
585 goto out;
586 }
587 goto again;
588 }
589
590out:
591 if (info) {
592 if (info->bitmap)
593 kfree(info->bitmap);
594 kfree(info);
595 }
204 596
205 return ret; 597 return ret;
206} 598}
@@ -208,8 +600,8 @@ static int link_free_space(struct btrfs_block_group_cache *block_group,
208int btrfs_add_free_space(struct btrfs_block_group_cache *block_group, 600int btrfs_add_free_space(struct btrfs_block_group_cache *block_group,
209 u64 offset, u64 bytes) 601 u64 offset, u64 bytes)
210{ 602{
211 struct btrfs_free_space *right_info; 603 struct btrfs_free_space *right_info = NULL;
212 struct btrfs_free_space *left_info; 604 struct btrfs_free_space *left_info = NULL;
213 struct btrfs_free_space *info = NULL; 605 struct btrfs_free_space *info = NULL;
214 int ret = 0; 606 int ret = 0;
215 607
@@ -227,18 +619,38 @@ int btrfs_add_free_space(struct btrfs_block_group_cache *block_group,
227 * are adding, if there is remove that struct and add a new one to 619 * are adding, if there is remove that struct and add a new one to
228 * cover the entire range 620 * cover the entire range
229 */ 621 */
230 right_info = tree_search_offset(&block_group->free_space_offset, 622 right_info = tree_search_offset(block_group, offset + bytes, 0, 0);
231 offset+bytes, 0, 0); 623 if (right_info && rb_prev(&right_info->offset_index))
232 left_info = tree_search_offset(&block_group->free_space_offset, 624 left_info = rb_entry(rb_prev(&right_info->offset_index),
233 offset-1, 0, 1); 625 struct btrfs_free_space, offset_index);
626 else
627 left_info = tree_search_offset(block_group, offset - 1, 0, 0);
628
629 /*
630 * If there was no extent directly to the left or right of this new
631 * extent then we know we're going to have to allocate a new extent, so
632 * before we do that see if we need to drop this into a bitmap
633 */
634 if ((!left_info || left_info->bitmap) &&
635 (!right_info || right_info->bitmap)) {
636 ret = insert_into_bitmap(block_group, info);
637
638 if (ret < 0) {
639 goto out;
640 } else if (ret) {
641 ret = 0;
642 goto out;
643 }
644 }
234 645
235 if (right_info) { 646 if (right_info && !right_info->bitmap) {
236 unlink_free_space(block_group, right_info); 647 unlink_free_space(block_group, right_info);
237 info->bytes += right_info->bytes; 648 info->bytes += right_info->bytes;
238 kfree(right_info); 649 kfree(right_info);
239 } 650 }
240 651
241 if (left_info && left_info->offset + left_info->bytes == offset) { 652 if (left_info && !left_info->bitmap &&
653 left_info->offset + left_info->bytes == offset) {
242 unlink_free_space(block_group, left_info); 654 unlink_free_space(block_group, left_info);
243 info->offset = left_info->offset; 655 info->offset = left_info->offset;
244 info->bytes += left_info->bytes; 656 info->bytes += left_info->bytes;
@@ -248,11 +660,11 @@ int btrfs_add_free_space(struct btrfs_block_group_cache *block_group,
248 ret = link_free_space(block_group, info); 660 ret = link_free_space(block_group, info);
249 if (ret) 661 if (ret)
250 kfree(info); 662 kfree(info);
251 663out:
252 spin_unlock(&block_group->tree_lock); 664 spin_unlock(&block_group->tree_lock);
253 665
254 if (ret) { 666 if (ret) {
255 printk(KERN_ERR "btrfs: unable to add free space :%d\n", ret); 667 printk(KERN_CRIT "btrfs: unable to add free space :%d\n", ret);
256 BUG_ON(ret == -EEXIST); 668 BUG_ON(ret == -EEXIST);
257 } 669 }
258 670
@@ -263,40 +675,74 @@ int btrfs_remove_free_space(struct btrfs_block_group_cache *block_group,
263 u64 offset, u64 bytes) 675 u64 offset, u64 bytes)
264{ 676{
265 struct btrfs_free_space *info; 677 struct btrfs_free_space *info;
678 struct btrfs_free_space *next_info = NULL;
266 int ret = 0; 679 int ret = 0;
267 680
268 spin_lock(&block_group->tree_lock); 681 spin_lock(&block_group->tree_lock);
269 682
270 info = tree_search_offset(&block_group->free_space_offset, offset, 0, 683again:
271 1); 684 info = tree_search_offset(block_group, offset, 0, 0);
272 if (info && info->offset == offset) { 685 if (!info) {
273 if (info->bytes < bytes) { 686 /*
274 printk(KERN_ERR "Found free space at %llu, size %llu," 687 * oops didn't find an extent that matched the space we wanted
275 "trying to use %llu\n", 688 * to remove, look for a bitmap instead
276 (unsigned long long)info->offset, 689 */
277 (unsigned long long)info->bytes, 690 info = tree_search_offset(block_group,
278 (unsigned long long)bytes); 691 offset_to_bitmap(block_group, offset),
692 1, 0);
693 if (!info) {
694 WARN_ON(1);
695 goto out_lock;
696 }
697 }
698
699 if (info->bytes < bytes && rb_next(&info->offset_index)) {
700 u64 end;
701 next_info = rb_entry(rb_next(&info->offset_index),
702 struct btrfs_free_space,
703 offset_index);
704
705 if (next_info->bitmap)
706 end = next_info->offset + BITS_PER_BITMAP *
707 block_group->sectorsize - 1;
708 else
709 end = next_info->offset + next_info->bytes;
710
711 if (next_info->bytes < bytes ||
712 next_info->offset > offset || offset > end) {
713 printk(KERN_CRIT "Found free space at %llu, size %llu,"
714 " trying to use %llu\n",
715 (unsigned long long)info->offset,
716 (unsigned long long)info->bytes,
717 (unsigned long long)bytes);
279 WARN_ON(1); 718 WARN_ON(1);
280 ret = -EINVAL; 719 ret = -EINVAL;
281 spin_unlock(&block_group->tree_lock); 720 goto out_lock;
282 goto out;
283 } 721 }
284 unlink_free_space(block_group, info);
285 722
286 if (info->bytes == bytes) { 723 info = next_info;
287 kfree(info); 724 }
288 spin_unlock(&block_group->tree_lock); 725
289 goto out; 726 if (info->bytes == bytes) {
727 unlink_free_space(block_group, info);
728 if (info->bitmap) {
729 kfree(info->bitmap);
730 block_group->total_bitmaps--;
290 } 731 }
732 kfree(info);
733 goto out_lock;
734 }
291 735
736 if (!info->bitmap && info->offset == offset) {
737 unlink_free_space(block_group, info);
292 info->offset += bytes; 738 info->offset += bytes;
293 info->bytes -= bytes; 739 info->bytes -= bytes;
740 link_free_space(block_group, info);
741 goto out_lock;
742 }
294 743
295 ret = link_free_space(block_group, info); 744 if (!info->bitmap && info->offset <= offset &&
296 spin_unlock(&block_group->tree_lock); 745 info->offset + info->bytes >= offset + bytes) {
297 BUG_ON(ret);
298 } else if (info && info->offset < offset &&
299 info->offset + info->bytes >= offset + bytes) {
300 u64 old_start = info->offset; 746 u64 old_start = info->offset;
301 /* 747 /*
302 * we're freeing space in the middle of the info, 748 * we're freeing space in the middle of the info,
@@ -312,7 +758,9 @@ int btrfs_remove_free_space(struct btrfs_block_group_cache *block_group,
312 info->offset = offset + bytes; 758 info->offset = offset + bytes;
313 info->bytes = old_end - info->offset; 759 info->bytes = old_end - info->offset;
314 ret = link_free_space(block_group, info); 760 ret = link_free_space(block_group, info);
315 BUG_ON(ret); 761 WARN_ON(ret);
762 if (ret)
763 goto out_lock;
316 } else { 764 } else {
317 /* the hole we're creating ends at the end 765 /* the hole we're creating ends at the end
318 * of the info struct, just free the info 766 * of the info struct, just free the info
@@ -320,32 +768,22 @@ int btrfs_remove_free_space(struct btrfs_block_group_cache *block_group,
320 kfree(info); 768 kfree(info);
321 } 769 }
322 spin_unlock(&block_group->tree_lock); 770 spin_unlock(&block_group->tree_lock);
323 /* step two, insert a new info struct to cover anything 771
324 * before the hole 772 /* step two, insert a new info struct to cover
773 * anything before the hole
325 */ 774 */
326 ret = btrfs_add_free_space(block_group, old_start, 775 ret = btrfs_add_free_space(block_group, old_start,
327 offset - old_start); 776 offset - old_start);
328 BUG_ON(ret); 777 WARN_ON(ret);
329 } else { 778 goto out;
330 spin_unlock(&block_group->tree_lock);
331 if (!info) {
332 printk(KERN_ERR "couldn't find space %llu to free\n",
333 (unsigned long long)offset);
334 printk(KERN_ERR "cached is %d, offset %llu bytes %llu\n",
335 block_group->cached,
336 (unsigned long long)block_group->key.objectid,
337 (unsigned long long)block_group->key.offset);
338 btrfs_dump_free_space(block_group, bytes);
339 } else if (info) {
340 printk(KERN_ERR "hmm, found offset=%llu bytes=%llu, "
341 "but wanted offset=%llu bytes=%llu\n",
342 (unsigned long long)info->offset,
343 (unsigned long long)info->bytes,
344 (unsigned long long)offset,
345 (unsigned long long)bytes);
346 }
347 WARN_ON(1);
348 } 779 }
780
781 ret = remove_from_bitmap(block_group, info, &offset, &bytes);
782 if (ret == -EAGAIN)
783 goto again;
784 BUG_ON(ret);
785out_lock:
786 spin_unlock(&block_group->tree_lock);
349out: 787out:
350 return ret; 788 return ret;
351} 789}
@@ -361,10 +799,13 @@ void btrfs_dump_free_space(struct btrfs_block_group_cache *block_group,
361 info = rb_entry(n, struct btrfs_free_space, offset_index); 799 info = rb_entry(n, struct btrfs_free_space, offset_index);
362 if (info->bytes >= bytes) 800 if (info->bytes >= bytes)
363 count++; 801 count++;
364 printk(KERN_ERR "entry offset %llu, bytes %llu\n", 802 printk(KERN_CRIT "entry offset %llu, bytes %llu, bitmap %s\n",
365 (unsigned long long)info->offset, 803 (unsigned long long)info->offset,
366 (unsigned long long)info->bytes); 804 (unsigned long long)info->bytes,
805 (info->bitmap) ? "yes" : "no");
367 } 806 }
807 printk(KERN_INFO "block group has cluster?: %s\n",
808 list_empty(&block_group->cluster_list) ? "no" : "yes");
368 printk(KERN_INFO "%d blocks of free space at or bigger than bytes is" 809 printk(KERN_INFO "%d blocks of free space at or bigger than bytes is"
369 "\n", count); 810 "\n", count);
370} 811}
@@ -397,26 +838,35 @@ __btrfs_return_cluster_to_free_space(
397{ 838{
398 struct btrfs_free_space *entry; 839 struct btrfs_free_space *entry;
399 struct rb_node *node; 840 struct rb_node *node;
841 bool bitmap;
400 842
401 spin_lock(&cluster->lock); 843 spin_lock(&cluster->lock);
402 if (cluster->block_group != block_group) 844 if (cluster->block_group != block_group)
403 goto out; 845 goto out;
404 846
847 bitmap = cluster->points_to_bitmap;
848 cluster->block_group = NULL;
405 cluster->window_start = 0; 849 cluster->window_start = 0;
850 list_del_init(&cluster->block_group_list);
851 cluster->points_to_bitmap = false;
852
853 if (bitmap)
854 goto out;
855
406 node = rb_first(&cluster->root); 856 node = rb_first(&cluster->root);
407 while(node) { 857 while (node) {
408 entry = rb_entry(node, struct btrfs_free_space, offset_index); 858 entry = rb_entry(node, struct btrfs_free_space, offset_index);
409 node = rb_next(&entry->offset_index); 859 node = rb_next(&entry->offset_index);
410 rb_erase(&entry->offset_index, &cluster->root); 860 rb_erase(&entry->offset_index, &cluster->root);
411 link_free_space(block_group, entry); 861 BUG_ON(entry->bitmap);
862 tree_insert_offset(&block_group->free_space_offset,
863 entry->offset, &entry->offset_index, 0);
412 } 864 }
413 list_del_init(&cluster->block_group_list);
414
415 btrfs_put_block_group(cluster->block_group);
416 cluster->block_group = NULL;
417 cluster->root.rb_node = NULL; 865 cluster->root.rb_node = NULL;
866
418out: 867out:
419 spin_unlock(&cluster->lock); 868 spin_unlock(&cluster->lock);
869 btrfs_put_block_group(block_group);
420 return 0; 870 return 0;
421} 871}
422 872
@@ -425,20 +875,28 @@ void btrfs_remove_free_space_cache(struct btrfs_block_group_cache *block_group)
425 struct btrfs_free_space *info; 875 struct btrfs_free_space *info;
426 struct rb_node *node; 876 struct rb_node *node;
427 struct btrfs_free_cluster *cluster; 877 struct btrfs_free_cluster *cluster;
428 struct btrfs_free_cluster *safe; 878 struct list_head *head;
429 879
430 spin_lock(&block_group->tree_lock); 880 spin_lock(&block_group->tree_lock);
431 881 while ((head = block_group->cluster_list.next) !=
432 list_for_each_entry_safe(cluster, safe, &block_group->cluster_list, 882 &block_group->cluster_list) {
433 block_group_list) { 883 cluster = list_entry(head, struct btrfs_free_cluster,
884 block_group_list);
434 885
435 WARN_ON(cluster->block_group != block_group); 886 WARN_ON(cluster->block_group != block_group);
436 __btrfs_return_cluster_to_free_space(block_group, cluster); 887 __btrfs_return_cluster_to_free_space(block_group, cluster);
888 if (need_resched()) {
889 spin_unlock(&block_group->tree_lock);
890 cond_resched();
891 spin_lock(&block_group->tree_lock);
892 }
437 } 893 }
438 894
439 while ((node = rb_last(&block_group->free_space_bytes)) != NULL) { 895 while ((node = rb_last(&block_group->free_space_offset)) != NULL) {
440 info = rb_entry(node, struct btrfs_free_space, bytes_index); 896 info = rb_entry(node, struct btrfs_free_space, offset_index);
441 unlink_free_space(block_group, info); 897 unlink_free_space(block_group, info);
898 if (info->bitmap)
899 kfree(info->bitmap);
442 kfree(info); 900 kfree(info);
443 if (need_resched()) { 901 if (need_resched()) {
444 spin_unlock(&block_group->tree_lock); 902 spin_unlock(&block_group->tree_lock);
@@ -446,6 +904,7 @@ void btrfs_remove_free_space_cache(struct btrfs_block_group_cache *block_group)
446 spin_lock(&block_group->tree_lock); 904 spin_lock(&block_group->tree_lock);
447 } 905 }
448 } 906 }
907
449 spin_unlock(&block_group->tree_lock); 908 spin_unlock(&block_group->tree_lock);
450} 909}
451 910
@@ -453,25 +912,35 @@ u64 btrfs_find_space_for_alloc(struct btrfs_block_group_cache *block_group,
453 u64 offset, u64 bytes, u64 empty_size) 912 u64 offset, u64 bytes, u64 empty_size)
454{ 913{
455 struct btrfs_free_space *entry = NULL; 914 struct btrfs_free_space *entry = NULL;
915 u64 bytes_search = bytes + empty_size;
456 u64 ret = 0; 916 u64 ret = 0;
457 917
458 spin_lock(&block_group->tree_lock); 918 spin_lock(&block_group->tree_lock);
459 entry = tree_search_offset(&block_group->free_space_offset, offset, 919 entry = find_free_space(block_group, &offset, &bytes_search, 0);
460 bytes + empty_size, 1);
461 if (!entry) 920 if (!entry)
462 entry = tree_search_bytes(&block_group->free_space_bytes, 921 goto out;
463 offset, bytes + empty_size); 922
464 if (entry) { 923 ret = offset;
924 if (entry->bitmap) {
925 bitmap_clear_bits(block_group, entry, offset, bytes);
926 if (!entry->bytes) {
927 unlink_free_space(block_group, entry);
928 kfree(entry->bitmap);
929 kfree(entry);
930 block_group->total_bitmaps--;
931 recalculate_thresholds(block_group);
932 }
933 } else {
465 unlink_free_space(block_group, entry); 934 unlink_free_space(block_group, entry);
466 ret = entry->offset;
467 entry->offset += bytes; 935 entry->offset += bytes;
468 entry->bytes -= bytes; 936 entry->bytes -= bytes;
469
470 if (!entry->bytes) 937 if (!entry->bytes)
471 kfree(entry); 938 kfree(entry);
472 else 939 else
473 link_free_space(block_group, entry); 940 link_free_space(block_group, entry);
474 } 941 }
942
943out:
475 spin_unlock(&block_group->tree_lock); 944 spin_unlock(&block_group->tree_lock);
476 945
477 return ret; 946 return ret;
@@ -517,6 +986,54 @@ int btrfs_return_cluster_to_free_space(
517 return ret; 986 return ret;
518} 987}
519 988
989static u64 btrfs_alloc_from_bitmap(struct btrfs_block_group_cache *block_group,
990 struct btrfs_free_cluster *cluster,
991 u64 bytes, u64 min_start)
992{
993 struct btrfs_free_space *entry;
994 int err;
995 u64 search_start = cluster->window_start;
996 u64 search_bytes = bytes;
997 u64 ret = 0;
998
999 spin_lock(&block_group->tree_lock);
1000 spin_lock(&cluster->lock);
1001
1002 if (!cluster->points_to_bitmap)
1003 goto out;
1004
1005 if (cluster->block_group != block_group)
1006 goto out;
1007
1008 /*
1009 * search_start is the beginning of the bitmap, but at some point it may
1010 * be a good idea to point to the actual start of the free area in the
1011 * bitmap, so do the offset_to_bitmap trick anyway, and set bitmap_only
1012 * to 1 to make sure we get the bitmap entry
1013 */
1014 entry = tree_search_offset(block_group,
1015 offset_to_bitmap(block_group, search_start),
1016 1, 0);
1017 if (!entry || !entry->bitmap)
1018 goto out;
1019
1020 search_start = min_start;
1021 search_bytes = bytes;
1022
1023 err = search_bitmap(block_group, entry, &search_start,
1024 &search_bytes);
1025 if (err)
1026 goto out;
1027
1028 ret = search_start;
1029 bitmap_clear_bits(block_group, entry, ret, bytes);
1030out:
1031 spin_unlock(&cluster->lock);
1032 spin_unlock(&block_group->tree_lock);
1033
1034 return ret;
1035}
1036
520/* 1037/*
521 * given a cluster, try to allocate 'bytes' from it, returns 0 1038 * given a cluster, try to allocate 'bytes' from it, returns 0
522 * if it couldn't find anything suitably large, or a logical disk offset 1039 * if it couldn't find anything suitably large, or a logical disk offset
@@ -530,6 +1047,10 @@ u64 btrfs_alloc_from_cluster(struct btrfs_block_group_cache *block_group,
530 struct rb_node *node; 1047 struct rb_node *node;
531 u64 ret = 0; 1048 u64 ret = 0;
532 1049
1050 if (cluster->points_to_bitmap)
1051 return btrfs_alloc_from_bitmap(block_group, cluster, bytes,
1052 min_start);
1053
533 spin_lock(&cluster->lock); 1054 spin_lock(&cluster->lock);
534 if (bytes > cluster->max_size) 1055 if (bytes > cluster->max_size)
535 goto out; 1056 goto out;
@@ -567,9 +1088,73 @@ u64 btrfs_alloc_from_cluster(struct btrfs_block_group_cache *block_group,
567 } 1088 }
568out: 1089out:
569 spin_unlock(&cluster->lock); 1090 spin_unlock(&cluster->lock);
1091
570 return ret; 1092 return ret;
571} 1093}
572 1094
1095static int btrfs_bitmap_cluster(struct btrfs_block_group_cache *block_group,
1096 struct btrfs_free_space *entry,
1097 struct btrfs_free_cluster *cluster,
1098 u64 offset, u64 bytes, u64 min_bytes)
1099{
1100 unsigned long next_zero;
1101 unsigned long i;
1102 unsigned long search_bits;
1103 unsigned long total_bits;
1104 unsigned long found_bits;
1105 unsigned long start = 0;
1106 unsigned long total_found = 0;
1107 bool found = false;
1108
1109 i = offset_to_bit(entry->offset, block_group->sectorsize,
1110 max_t(u64, offset, entry->offset));
1111 search_bits = bytes_to_bits(min_bytes, block_group->sectorsize);
1112 total_bits = bytes_to_bits(bytes, block_group->sectorsize);
1113
1114again:
1115 found_bits = 0;
1116 for (i = find_next_bit(entry->bitmap, BITS_PER_BITMAP, i);
1117 i < BITS_PER_BITMAP;
1118 i = find_next_bit(entry->bitmap, BITS_PER_BITMAP, i + 1)) {
1119 next_zero = find_next_zero_bit(entry->bitmap,
1120 BITS_PER_BITMAP, i);
1121 if (next_zero - i >= search_bits) {
1122 found_bits = next_zero - i;
1123 break;
1124 }
1125 i = next_zero;
1126 }
1127
1128 if (!found_bits)
1129 return -1;
1130
1131 if (!found) {
1132 start = i;
1133 found = true;
1134 }
1135
1136 total_found += found_bits;
1137
1138 if (cluster->max_size < found_bits * block_group->sectorsize)
1139 cluster->max_size = found_bits * block_group->sectorsize;
1140
1141 if (total_found < total_bits) {
1142 i = find_next_bit(entry->bitmap, BITS_PER_BITMAP, next_zero);
1143 if (i - start > total_bits * 2) {
1144 total_found = 0;
1145 cluster->max_size = 0;
1146 found = false;
1147 }
1148 goto again;
1149 }
1150
1151 cluster->window_start = start * block_group->sectorsize +
1152 entry->offset;
1153 cluster->points_to_bitmap = true;
1154
1155 return 0;
1156}
1157
573/* 1158/*
574 * here we try to find a cluster of blocks in a block group. The goal 1159 * here we try to find a cluster of blocks in a block group. The goal
575 * is to find at least bytes free and up to empty_size + bytes free. 1160 * is to find at least bytes free and up to empty_size + bytes free.
@@ -587,12 +1172,12 @@ int btrfs_find_space_cluster(struct btrfs_trans_handle *trans,
587 struct btrfs_free_space *entry = NULL; 1172 struct btrfs_free_space *entry = NULL;
588 struct rb_node *node; 1173 struct rb_node *node;
589 struct btrfs_free_space *next; 1174 struct btrfs_free_space *next;
590 struct btrfs_free_space *last; 1175 struct btrfs_free_space *last = NULL;
591 u64 min_bytes; 1176 u64 min_bytes;
592 u64 window_start; 1177 u64 window_start;
593 u64 window_free; 1178 u64 window_free;
594 u64 max_extent = 0; 1179 u64 max_extent = 0;
595 int total_retries = 0; 1180 bool found_bitmap = false;
596 int ret; 1181 int ret;
597 1182
598 /* for metadata, allow allocates with more holes */ 1183 /* for metadata, allow allocates with more holes */
@@ -620,31 +1205,80 @@ int btrfs_find_space_cluster(struct btrfs_trans_handle *trans,
620 goto out; 1205 goto out;
621 } 1206 }
622again: 1207again:
623 min_bytes = min(min_bytes, bytes + empty_size); 1208 entry = tree_search_offset(block_group, offset, found_bitmap, 1);
624 entry = tree_search_bytes(&block_group->free_space_bytes,
625 offset, min_bytes);
626 if (!entry) { 1209 if (!entry) {
627 ret = -ENOSPC; 1210 ret = -ENOSPC;
628 goto out; 1211 goto out;
629 } 1212 }
1213
1214 /*
1215 * If found_bitmap is true, we exhausted our search for extent entries,
1216 * and we just want to search all of the bitmaps that we can find, and
1217 * ignore any extent entries we find.
1218 */
1219 while (entry->bitmap || found_bitmap ||
1220 (!entry->bitmap && entry->bytes < min_bytes)) {
1221 struct rb_node *node = rb_next(&entry->offset_index);
1222
1223 if (entry->bitmap && entry->bytes > bytes + empty_size) {
1224 ret = btrfs_bitmap_cluster(block_group, entry, cluster,
1225 offset, bytes + empty_size,
1226 min_bytes);
1227 if (!ret)
1228 goto got_it;
1229 }
1230
1231 if (!node) {
1232 ret = -ENOSPC;
1233 goto out;
1234 }
1235 entry = rb_entry(node, struct btrfs_free_space, offset_index);
1236 }
1237
1238 /*
1239 * We already searched all the extent entries from the passed in offset
1240 * to the end and didn't find enough space for the cluster, and we also
1241 * didn't find any bitmaps that met our criteria, just go ahead and exit
1242 */
1243 if (found_bitmap) {
1244 ret = -ENOSPC;
1245 goto out;
1246 }
1247
1248 cluster->points_to_bitmap = false;
630 window_start = entry->offset; 1249 window_start = entry->offset;
631 window_free = entry->bytes; 1250 window_free = entry->bytes;
632 last = entry; 1251 last = entry;
633 max_extent = entry->bytes; 1252 max_extent = entry->bytes;
634 1253
635 while(1) { 1254 while (1) {
636 /* out window is just right, lets fill it */ 1255 /* out window is just right, lets fill it */
637 if (window_free >= bytes + empty_size) 1256 if (window_free >= bytes + empty_size)
638 break; 1257 break;
639 1258
640 node = rb_next(&last->offset_index); 1259 node = rb_next(&last->offset_index);
641 if (!node) { 1260 if (!node) {
1261 if (found_bitmap)
1262 goto again;
642 ret = -ENOSPC; 1263 ret = -ENOSPC;
643 goto out; 1264 goto out;
644 } 1265 }
645 next = rb_entry(node, struct btrfs_free_space, offset_index); 1266 next = rb_entry(node, struct btrfs_free_space, offset_index);
646 1267
647 /* 1268 /*
1269 * we found a bitmap, so if this search doesn't result in a
1270 * cluster, we know to go and search again for the bitmaps and
1271 * start looking for space there
1272 */
1273 if (next->bitmap) {
1274 if (!found_bitmap)
1275 offset = next->offset;
1276 found_bitmap = true;
1277 last = next;
1278 continue;
1279 }
1280
1281 /*
648 * we haven't filled the empty size and the window is 1282 * we haven't filled the empty size and the window is
649 * very large. reset and try again 1283 * very large. reset and try again
650 */ 1284 */
@@ -655,19 +1289,6 @@ again:
655 window_free = entry->bytes; 1289 window_free = entry->bytes;
656 last = entry; 1290 last = entry;
657 max_extent = 0; 1291 max_extent = 0;
658 total_retries++;
659 if (total_retries % 64 == 0) {
660 if (min_bytes >= (bytes + empty_size)) {
661 ret = -ENOSPC;
662 goto out;
663 }
664 /*
665 * grow our allocation a bit, we're not having
666 * much luck
667 */
668 min_bytes *= 2;
669 goto again;
670 }
671 } else { 1292 } else {
672 last = next; 1293 last = next;
673 window_free += next->bytes; 1294 window_free += next->bytes;
@@ -685,11 +1306,19 @@ again:
685 * The cluster includes an rbtree, but only uses the offset index 1306 * The cluster includes an rbtree, but only uses the offset index
686 * of each free space cache entry. 1307 * of each free space cache entry.
687 */ 1308 */
688 while(1) { 1309 while (1) {
689 node = rb_next(&entry->offset_index); 1310 node = rb_next(&entry->offset_index);
690 unlink_free_space(block_group, entry); 1311 if (entry->bitmap && node) {
1312 entry = rb_entry(node, struct btrfs_free_space,
1313 offset_index);
1314 continue;
1315 } else if (entry->bitmap && !node) {
1316 break;
1317 }
1318
1319 rb_erase(&entry->offset_index, &block_group->free_space_offset);
691 ret = tree_insert_offset(&cluster->root, entry->offset, 1320 ret = tree_insert_offset(&cluster->root, entry->offset,
692 &entry->offset_index); 1321 &entry->offset_index, 0);
693 BUG_ON(ret); 1322 BUG_ON(ret);
694 1323
695 if (!node || entry == last) 1324 if (!node || entry == last)
@@ -697,8 +1326,10 @@ again:
697 1326
698 entry = rb_entry(node, struct btrfs_free_space, offset_index); 1327 entry = rb_entry(node, struct btrfs_free_space, offset_index);
699 } 1328 }
700 ret = 0; 1329
701 cluster->max_size = max_extent; 1330 cluster->max_size = max_extent;
1331got_it:
1332 ret = 0;
702 atomic_inc(&block_group->count); 1333 atomic_inc(&block_group->count);
703 list_add_tail(&cluster->block_group_list, &block_group->cluster_list); 1334 list_add_tail(&cluster->block_group_list, &block_group->cluster_list);
704 cluster->block_group = block_group; 1335 cluster->block_group = block_group;
@@ -718,6 +1349,7 @@ void btrfs_init_free_cluster(struct btrfs_free_cluster *cluster)
718 spin_lock_init(&cluster->refill_lock); 1349 spin_lock_init(&cluster->refill_lock);
719 cluster->root.rb_node = NULL; 1350 cluster->root.rb_node = NULL;
720 cluster->max_size = 0; 1351 cluster->max_size = 0;
1352 cluster->points_to_bitmap = false;
721 INIT_LIST_HEAD(&cluster->block_group_list); 1353 INIT_LIST_HEAD(&cluster->block_group_list);
722 cluster->block_group = NULL; 1354 cluster->block_group = NULL;
723} 1355}
diff --git a/fs/btrfs/free-space-cache.h b/fs/btrfs/free-space-cache.h
index 266fb876405..890a8e79011 100644
--- a/fs/btrfs/free-space-cache.h
+++ b/fs/btrfs/free-space-cache.h
@@ -19,6 +19,14 @@
19#ifndef __BTRFS_FREE_SPACE_CACHE 19#ifndef __BTRFS_FREE_SPACE_CACHE
20#define __BTRFS_FREE_SPACE_CACHE 20#define __BTRFS_FREE_SPACE_CACHE
21 21
22struct btrfs_free_space {
23 struct rb_node offset_index;
24 u64 offset;
25 u64 bytes;
26 unsigned long *bitmap;
27 struct list_head list;
28};
29
22int btrfs_add_free_space(struct btrfs_block_group_cache *block_group, 30int btrfs_add_free_space(struct btrfs_block_group_cache *block_group,
23 u64 bytenr, u64 size); 31 u64 bytenr, u64 size);
24int btrfs_remove_free_space(struct btrfs_block_group_cache *block_group, 32int btrfs_remove_free_space(struct btrfs_block_group_cache *block_group,
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 791eab19e33..272b9b2bea8 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2603,8 +2603,8 @@ noinline int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans,
2603 if (root->ref_cows) 2603 if (root->ref_cows)
2604 btrfs_drop_extent_cache(inode, new_size & (~mask), (u64)-1, 0); 2604 btrfs_drop_extent_cache(inode, new_size & (~mask), (u64)-1, 0);
2605 path = btrfs_alloc_path(); 2605 path = btrfs_alloc_path();
2606 path->reada = -1;
2607 BUG_ON(!path); 2606 BUG_ON(!path);
2607 path->reada = -1;
2608 2608
2609 /* FIXME, add redo link to tree so we don't leak on crash */ 2609 /* FIXME, add redo link to tree so we don't leak on crash */
2610 key.objectid = inode->i_ino; 2610 key.objectid = inode->i_ino;
@@ -4785,8 +4785,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
4785 * and the replacement file is large. Start IO on it now so 4785 * and the replacement file is large. Start IO on it now so
4786 * we don't add too much work to the end of the transaction 4786 * we don't add too much work to the end of the transaction
4787 */ 4787 */
4788 if (new_inode && old_inode && S_ISREG(old_inode->i_mode) && 4788 if (new_inode && S_ISREG(old_inode->i_mode) && new_inode->i_size &&
4789 new_inode->i_size &&
4790 old_inode->i_size > BTRFS_ORDERED_OPERATIONS_FLUSH_LIMIT) 4789 old_inode->i_size > BTRFS_ORDERED_OPERATIONS_FLUSH_LIMIT)
4791 filemap_flush(old_inode->i_mapping); 4790 filemap_flush(old_inode->i_mapping);
4792 4791
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c
index 6d6523da0a3..0d126be22b6 100644
--- a/fs/btrfs/print-tree.c
+++ b/fs/btrfs/print-tree.c
@@ -309,7 +309,7 @@ void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *c)
309 } 309 }
310 printk(KERN_INFO "node %llu level %d total ptrs %d free spc %u\n", 310 printk(KERN_INFO "node %llu level %d total ptrs %d free spc %u\n",
311 (unsigned long long)btrfs_header_bytenr(c), 311 (unsigned long long)btrfs_header_bytenr(c),
312 btrfs_header_level(c), nr, 312 level, nr,
313 (u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr); 313 (u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr);
314 for (i = 0; i < nr; i++) { 314 for (i = 0; i < nr; i++) {
315 btrfs_node_key_to_cpu(c, &key, i); 315 btrfs_node_key_to_cpu(c, &key, i);
@@ -326,10 +326,10 @@ void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *c)
326 btrfs_level_size(root, level - 1), 326 btrfs_level_size(root, level - 1),
327 btrfs_node_ptr_generation(c, i)); 327 btrfs_node_ptr_generation(c, i));
328 if (btrfs_is_leaf(next) && 328 if (btrfs_is_leaf(next) &&
329 btrfs_header_level(c) != 1) 329 level != 1)
330 BUG(); 330 BUG();
331 if (btrfs_header_level(next) != 331 if (btrfs_header_level(next) !=
332 btrfs_header_level(c) - 1) 332 level - 1)
333 BUG(); 333 BUG();
334 btrfs_print_tree(root, next); 334 btrfs_print_tree(root, next);
335 free_extent_buffer(next); 335 free_extent_buffer(next);
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 00839793477..c04f7f21260 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -670,6 +670,8 @@ again:
670 err = ret; 670 err = ret;
671 goto out; 671 goto out;
672 } 672 }
673 if (ret > 0 && path2->slots[level] > 0)
674 path2->slots[level]--;
673 675
674 eb = path2->nodes[level]; 676 eb = path2->nodes[level];
675 WARN_ON(btrfs_node_blockptr(eb, path2->slots[level]) != 677 WARN_ON(btrfs_node_blockptr(eb, path2->slots[level]) !=
@@ -1609,6 +1611,7 @@ static noinline_for_stack int merge_reloc_root(struct reloc_control *rc,
1609 BUG_ON(level == 0); 1611 BUG_ON(level == 0);
1610 path->lowest_level = level; 1612 path->lowest_level = level;
1611 ret = btrfs_search_slot(NULL, reloc_root, &key, path, 0, 0); 1613 ret = btrfs_search_slot(NULL, reloc_root, &key, path, 0, 0);
1614 path->lowest_level = 0;
1612 if (ret < 0) { 1615 if (ret < 0) {
1613 btrfs_free_path(path); 1616 btrfs_free_path(path);
1614 return ret; 1617 return ret;
@@ -2550,8 +2553,13 @@ int relocate_inode_pages(struct inode *inode, u64 start, u64 len)
2550 last_index = (start + len - 1) >> PAGE_CACHE_SHIFT; 2553 last_index = (start + len - 1) >> PAGE_CACHE_SHIFT;
2551 2554
2552 /* make sure the dirty trick played by the caller work */ 2555 /* make sure the dirty trick played by the caller work */
2553 ret = invalidate_inode_pages2_range(inode->i_mapping, 2556 while (1) {
2554 first_index, last_index); 2557 ret = invalidate_inode_pages2_range(inode->i_mapping,
2558 first_index, last_index);
2559 if (ret != -EBUSY)
2560 break;
2561 schedule_timeout(HZ/10);
2562 }
2555 if (ret) 2563 if (ret)
2556 goto out_unlock; 2564 goto out_unlock;
2557 2565
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 2dbf1c1f56e..cdbb5022da5 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -40,6 +40,12 @@ static noinline void put_transaction(struct btrfs_transaction *transaction)
40 } 40 }
41} 41}
42 42
43static noinline void switch_commit_root(struct btrfs_root *root)
44{
45 free_extent_buffer(root->commit_root);
46 root->commit_root = btrfs_root_node(root);
47}
48
43/* 49/*
44 * either allocate a new transaction or hop into the existing one 50 * either allocate a new transaction or hop into the existing one
45 */ 51 */
@@ -444,9 +450,6 @@ static int update_cowonly_root(struct btrfs_trans_handle *trans,
444 450
445 btrfs_write_dirty_block_groups(trans, root); 451 btrfs_write_dirty_block_groups(trans, root);
446 452
447 ret = btrfs_run_delayed_refs(trans, root, (unsigned long)-1);
448 BUG_ON(ret);
449
450 while (1) { 453 while (1) {
451 old_root_bytenr = btrfs_root_bytenr(&root->root_item); 454 old_root_bytenr = btrfs_root_bytenr(&root->root_item);
452 if (old_root_bytenr == root->node->start) 455 if (old_root_bytenr == root->node->start)
@@ -457,13 +460,14 @@ static int update_cowonly_root(struct btrfs_trans_handle *trans,
457 &root->root_key, 460 &root->root_key,
458 &root->root_item); 461 &root->root_item);
459 BUG_ON(ret); 462 BUG_ON(ret);
460 btrfs_write_dirty_block_groups(trans, root);
461 463
462 ret = btrfs_run_delayed_refs(trans, root, (unsigned long)-1); 464 ret = btrfs_write_dirty_block_groups(trans, root);
463 BUG_ON(ret); 465 BUG_ON(ret);
464 } 466 }
465 free_extent_buffer(root->commit_root); 467
466 root->commit_root = btrfs_root_node(root); 468 if (root != root->fs_info->extent_root)
469 switch_commit_root(root);
470
467 return 0; 471 return 0;
468} 472}
469 473
@@ -495,10 +499,12 @@ static noinline int commit_cowonly_roots(struct btrfs_trans_handle *trans,
495 root = list_entry(next, struct btrfs_root, dirty_list); 499 root = list_entry(next, struct btrfs_root, dirty_list);
496 500
497 update_cowonly_root(trans, root); 501 update_cowonly_root(trans, root);
498
499 ret = btrfs_run_delayed_refs(trans, root, (unsigned long)-1);
500 BUG_ON(ret);
501 } 502 }
503
504 down_write(&fs_info->extent_commit_sem);
505 switch_commit_root(fs_info->extent_root);
506 up_write(&fs_info->extent_commit_sem);
507
502 return 0; 508 return 0;
503} 509}
504 510
@@ -544,8 +550,7 @@ static noinline int commit_fs_roots(struct btrfs_trans_handle *trans,
544 btrfs_update_reloc_root(trans, root); 550 btrfs_update_reloc_root(trans, root);
545 551
546 if (root->commit_root != root->node) { 552 if (root->commit_root != root->node) {
547 free_extent_buffer(root->commit_root); 553 switch_commit_root(root);
548 root->commit_root = btrfs_root_node(root);
549 btrfs_set_root_node(&root->root_item, 554 btrfs_set_root_node(&root->root_item,
550 root->node); 555 root->node);
551 } 556 }
@@ -852,6 +857,16 @@ static void update_super_roots(struct btrfs_root *root)
852 super->root_level = root_item->level; 857 super->root_level = root_item->level;
853} 858}
854 859
860int btrfs_transaction_in_commit(struct btrfs_fs_info *info)
861{
862 int ret = 0;
863 spin_lock(&info->new_trans_lock);
864 if (info->running_transaction)
865 ret = info->running_transaction->in_commit;
866 spin_unlock(&info->new_trans_lock);
867 return ret;
868}
869
855int btrfs_commit_transaction(struct btrfs_trans_handle *trans, 870int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
856 struct btrfs_root *root) 871 struct btrfs_root *root)
857{ 872{
@@ -943,9 +958,11 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
943 958
944 mutex_unlock(&root->fs_info->trans_mutex); 959 mutex_unlock(&root->fs_info->trans_mutex);
945 960
946 if (flush_on_commit || snap_pending) { 961 if (flush_on_commit) {
947 if (flush_on_commit) 962 btrfs_start_delalloc_inodes(root);
948 btrfs_start_delalloc_inodes(root); 963 ret = btrfs_wait_ordered_extents(root, 0);
964 BUG_ON(ret);
965 } else if (snap_pending) {
949 ret = btrfs_wait_ordered_extents(root, 1); 966 ret = btrfs_wait_ordered_extents(root, 1);
950 BUG_ON(ret); 967 BUG_ON(ret);
951 } 968 }
@@ -1009,15 +1026,11 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
1009 1026
1010 btrfs_set_root_node(&root->fs_info->tree_root->root_item, 1027 btrfs_set_root_node(&root->fs_info->tree_root->root_item,
1011 root->fs_info->tree_root->node); 1028 root->fs_info->tree_root->node);
1012 free_extent_buffer(root->fs_info->tree_root->commit_root); 1029 switch_commit_root(root->fs_info->tree_root);
1013 root->fs_info->tree_root->commit_root =
1014 btrfs_root_node(root->fs_info->tree_root);
1015 1030
1016 btrfs_set_root_node(&root->fs_info->chunk_root->root_item, 1031 btrfs_set_root_node(&root->fs_info->chunk_root->root_item,
1017 root->fs_info->chunk_root->node); 1032 root->fs_info->chunk_root->node);
1018 free_extent_buffer(root->fs_info->chunk_root->commit_root); 1033 switch_commit_root(root->fs_info->chunk_root);
1019 root->fs_info->chunk_root->commit_root =
1020 btrfs_root_node(root->fs_info->chunk_root);
1021 1034
1022 update_super_roots(root); 1035 update_super_roots(root);
1023 1036
@@ -1057,6 +1070,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
1057 cur_trans->commit_done = 1; 1070 cur_trans->commit_done = 1;
1058 1071
1059 root->fs_info->last_trans_committed = cur_trans->transid; 1072 root->fs_info->last_trans_committed = cur_trans->transid;
1073
1060 wake_up(&cur_trans->commit_wait); 1074 wake_up(&cur_trans->commit_wait);
1061 1075
1062 put_transaction(cur_trans); 1076 put_transaction(cur_trans);
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h
index 961c3ee5a2e..663c6740491 100644
--- a/fs/btrfs/transaction.h
+++ b/fs/btrfs/transaction.h
@@ -107,4 +107,5 @@ int btrfs_record_root_in_trans(struct btrfs_trans_handle *trans,
107 struct btrfs_root *root); 107 struct btrfs_root *root);
108int btrfs_write_and_wait_marked_extents(struct btrfs_root *root, 108int btrfs_write_and_wait_marked_extents(struct btrfs_root *root,
109 struct extent_io_tree *dirty_pages); 109 struct extent_io_tree *dirty_pages);
110int btrfs_transaction_in_commit(struct btrfs_fs_info *info);
110#endif 111#endif
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index c13922206d1..d91b0de7c50 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -797,7 +797,7 @@ static noinline int add_inode_ref(struct btrfs_trans_handle *trans,
797 return -ENOENT; 797 return -ENOENT;
798 798
799 inode = read_one_inode(root, key->objectid); 799 inode = read_one_inode(root, key->objectid);
800 BUG_ON(!dir); 800 BUG_ON(!inode);
801 801
802 ref_ptr = btrfs_item_ptr_offset(eb, slot); 802 ref_ptr = btrfs_item_ptr_offset(eb, slot);
803 ref_end = ref_ptr + btrfs_item_size_nr(eb, slot); 803 ref_end = ref_ptr + btrfs_item_size_nr(eb, slot);
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 3ab80e9cd76..5dbefd11b4a 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -721,7 +721,8 @@ error:
721 */ 721 */
722static noinline int find_free_dev_extent(struct btrfs_trans_handle *trans, 722static noinline int find_free_dev_extent(struct btrfs_trans_handle *trans,
723 struct btrfs_device *device, 723 struct btrfs_device *device,
724 u64 num_bytes, u64 *start) 724 u64 num_bytes, u64 *start,
725 u64 *max_avail)
725{ 726{
726 struct btrfs_key key; 727 struct btrfs_key key;
727 struct btrfs_root *root = device->dev_root; 728 struct btrfs_root *root = device->dev_root;
@@ -758,9 +759,13 @@ static noinline int find_free_dev_extent(struct btrfs_trans_handle *trans,
758 ret = btrfs_search_slot(trans, root, &key, path, 0, 0); 759 ret = btrfs_search_slot(trans, root, &key, path, 0, 0);
759 if (ret < 0) 760 if (ret < 0)
760 goto error; 761 goto error;
761 ret = btrfs_previous_item(root, path, 0, key.type); 762 if (ret > 0) {
762 if (ret < 0) 763 ret = btrfs_previous_item(root, path, key.objectid, key.type);
763 goto error; 764 if (ret < 0)
765 goto error;
766 if (ret > 0)
767 start_found = 1;
768 }
764 l = path->nodes[0]; 769 l = path->nodes[0];
765 btrfs_item_key_to_cpu(l, &key, path->slots[0]); 770 btrfs_item_key_to_cpu(l, &key, path->slots[0]);
766 while (1) { 771 while (1) {
@@ -803,6 +808,10 @@ no_more_items:
803 if (last_byte < search_start) 808 if (last_byte < search_start)
804 last_byte = search_start; 809 last_byte = search_start;
805 hole_size = key.offset - last_byte; 810 hole_size = key.offset - last_byte;
811
812 if (hole_size > *max_avail)
813 *max_avail = hole_size;
814
806 if (key.offset > last_byte && 815 if (key.offset > last_byte &&
807 hole_size >= num_bytes) { 816 hole_size >= num_bytes) {
808 *start = last_byte; 817 *start = last_byte;
@@ -1621,6 +1630,7 @@ static int __btrfs_grow_device(struct btrfs_trans_handle *trans,
1621 device->fs_devices->total_rw_bytes += diff; 1630 device->fs_devices->total_rw_bytes += diff;
1622 1631
1623 device->total_bytes = new_size; 1632 device->total_bytes = new_size;
1633 device->disk_total_bytes = new_size;
1624 btrfs_clear_space_info_full(device->dev_root->fs_info); 1634 btrfs_clear_space_info_full(device->dev_root->fs_info);
1625 1635
1626 return btrfs_update_device(trans, device); 1636 return btrfs_update_device(trans, device);
@@ -2007,7 +2017,7 @@ int btrfs_shrink_device(struct btrfs_device *device, u64 new_size)
2007 goto done; 2017 goto done;
2008 if (ret) { 2018 if (ret) {
2009 ret = 0; 2019 ret = 0;
2010 goto done; 2020 break;
2011 } 2021 }
2012 2022
2013 l = path->nodes[0]; 2023 l = path->nodes[0];
@@ -2015,7 +2025,7 @@ int btrfs_shrink_device(struct btrfs_device *device, u64 new_size)
2015 btrfs_item_key_to_cpu(l, &key, path->slots[0]); 2025 btrfs_item_key_to_cpu(l, &key, path->slots[0]);
2016 2026
2017 if (key.objectid != device->devid) 2027 if (key.objectid != device->devid)
2018 goto done; 2028 break;
2019 2029
2020 dev_extent = btrfs_item_ptr(l, slot, struct btrfs_dev_extent); 2030 dev_extent = btrfs_item_ptr(l, slot, struct btrfs_dev_extent);
2021 length = btrfs_dev_extent_length(l, dev_extent); 2031 length = btrfs_dev_extent_length(l, dev_extent);
@@ -2171,6 +2181,7 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
2171 max_chunk_size); 2181 max_chunk_size);
2172 2182
2173again: 2183again:
2184 max_avail = 0;
2174 if (!map || map->num_stripes != num_stripes) { 2185 if (!map || map->num_stripes != num_stripes) {
2175 kfree(map); 2186 kfree(map);
2176 map = kmalloc(map_lookup_size(num_stripes), GFP_NOFS); 2187 map = kmalloc(map_lookup_size(num_stripes), GFP_NOFS);
@@ -2219,7 +2230,8 @@ again:
2219 2230
2220 if (device->in_fs_metadata && avail >= min_free) { 2231 if (device->in_fs_metadata && avail >= min_free) {
2221 ret = find_free_dev_extent(trans, device, 2232 ret = find_free_dev_extent(trans, device,
2222 min_free, &dev_offset); 2233 min_free, &dev_offset,
2234 &max_avail);
2223 if (ret == 0) { 2235 if (ret == 0) {
2224 list_move_tail(&device->dev_alloc_list, 2236 list_move_tail(&device->dev_alloc_list,
2225 &private_devs); 2237 &private_devs);
@@ -2795,26 +2807,6 @@ int btrfs_rmap_block(struct btrfs_mapping_tree *map_tree,
2795 } 2807 }
2796 } 2808 }
2797 2809
2798 for (i = 0; i > nr; i++) {
2799 struct btrfs_multi_bio *multi;
2800 struct btrfs_bio_stripe *stripe;
2801 int ret;
2802
2803 length = 1;
2804 ret = btrfs_map_block(map_tree, WRITE, buf[i],
2805 &length, &multi, 0);
2806 BUG_ON(ret);
2807
2808 stripe = multi->stripes;
2809 for (j = 0; j < multi->num_stripes; j++) {
2810 if (stripe->physical >= physical &&
2811 physical < stripe->physical + length)
2812 break;
2813 }
2814 BUG_ON(j >= multi->num_stripes);
2815 kfree(multi);
2816 }
2817
2818 *logical = buf; 2810 *logical = buf;
2819 *naddrs = nr; 2811 *naddrs = nr;
2820 *stripe_len = map->stripe_len; 2812 *stripe_len = map->stripe_len;
diff --git a/fs/btrfs/zlib.c b/fs/btrfs/zlib.c
index ecfbce836d3..3e2b90eaa23 100644
--- a/fs/btrfs/zlib.c
+++ b/fs/btrfs/zlib.c
@@ -208,7 +208,7 @@ int btrfs_zlib_compress_pages(struct address_space *mapping,
208 *total_in = 0; 208 *total_in = 0;
209 209
210 workspace = find_zlib_workspace(); 210 workspace = find_zlib_workspace();
211 if (!workspace) 211 if (IS_ERR(workspace))
212 return -1; 212 return -1;
213 213
214 if (Z_OK != zlib_deflateInit(&workspace->def_strm, 3)) { 214 if (Z_OK != zlib_deflateInit(&workspace->def_strm, 3)) {
@@ -366,7 +366,7 @@ int btrfs_zlib_decompress_biovec(struct page **pages_in,
366 char *kaddr; 366 char *kaddr;
367 367
368 workspace = find_zlib_workspace(); 368 workspace = find_zlib_workspace();
369 if (!workspace) 369 if (IS_ERR(workspace))
370 return -ENOMEM; 370 return -ENOMEM;
371 371
372 data_in = kmap(pages_in[page_in_index]); 372 data_in = kmap(pages_in[page_in_index]);
@@ -547,7 +547,7 @@ int btrfs_zlib_decompress(unsigned char *data_in,
547 return -ENOMEM; 547 return -ENOMEM;
548 548
549 workspace = find_zlib_workspace(); 549 workspace = find_zlib_workspace();
550 if (!workspace) 550 if (IS_ERR(workspace))
551 return -ENOMEM; 551 return -ENOMEM;
552 552
553 workspace->inf_strm.next_in = data_in; 553 workspace->inf_strm.next_in = data_in;
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES
index 92888aa9074..e85b1e4389e 100644
--- a/fs/cifs/CHANGES
+++ b/fs/cifs/CHANGES
@@ -1,3 +1,10 @@
1Version 1.60
2-------------
3Fix memory leak in reconnect. Fix oops in DFS mount error path.
4Set s_maxbytes to smaller (the max that vfs can handle) so that
5sendfile will now work over cifs mounts again. Add noforcegid
6and noforceuid mount parameters.
7
1Version 1.59 8Version 1.59
2------------ 9------------
3Client uses server inode numbers (which are persistent) rather than 10Client uses server inode numbers (which are persistent) rather than
diff --git a/fs/cifs/README b/fs/cifs/README
index ad92921dbde..79c1a93400b 100644
--- a/fs/cifs/README
+++ b/fs/cifs/README
@@ -262,11 +262,11 @@ A partial list of the supported mount options follows:
262 mount. 262 mount.
263 domain Set the SMB/CIFS workgroup name prepended to the 263 domain Set the SMB/CIFS workgroup name prepended to the
264 username during CIFS session establishment 264 username during CIFS session establishment
265 forceuid Set the default uid for inodes based on the uid 265 forceuid Set the default uid for inodes to the uid
266 passed in. For mounts to servers 266 passed in on mount. For mounts to servers
267 which do support the CIFS Unix extensions, such as a 267 which do support the CIFS Unix extensions, such as a
268 properly configured Samba server, the server provides 268 properly configured Samba server, the server provides
269 the uid, gid and mode so this parameter should not be 269 the uid, gid and mode so this parameter should not be
270 specified unless the server and clients uid and gid 270 specified unless the server and clients uid and gid
271 numbering differ. If the server and client are in the 271 numbering differ. If the server and client are in the
272 same domain (e.g. running winbind or nss_ldap) and 272 same domain (e.g. running winbind or nss_ldap) and
@@ -278,11 +278,7 @@ A partial list of the supported mount options follows:
278 of existing files will be the uid (gid) of the person 278 of existing files will be the uid (gid) of the person
279 who executed the mount (root, except when mount.cifs 279 who executed the mount (root, except when mount.cifs
280 is configured setuid for user mounts) unless the "uid=" 280 is configured setuid for user mounts) unless the "uid="
281 (gid) mount option is specified. For the uid (gid) of newly 281 (gid) mount option is specified. Also note that permission
282 created files and directories, ie files created since
283 the last mount of the server share, the expected uid
284 (gid) is cached as long as the inode remains in
285 memory on the client. Also note that permission
286 checks (authorization checks) on accesses to a file occur 282 checks (authorization checks) on accesses to a file occur
287 at the server, but there are cases in which an administrator 283 at the server, but there are cases in which an administrator
288 may want to restrict at the client as well. For those 284 may want to restrict at the client as well. For those
@@ -290,12 +286,15 @@ A partial list of the supported mount options follows:
290 (such as Windows), permissions can also be checked at the 286 (such as Windows), permissions can also be checked at the
291 client, and a crude form of client side permission checking 287 client, and a crude form of client side permission checking
292 can be enabled by specifying file_mode and dir_mode on 288 can be enabled by specifying file_mode and dir_mode on
293 the client. Note that the mount.cifs helper must be 289 the client. (default)
294 at version 1.10 or higher to support specifying the uid 290 forcegid (similar to above but for the groupid instead of uid) (default)
295 (or gid) in non-numeric form. 291 noforceuid Fill in file owner information (uid) by requesting it from
296 forcegid (similar to above but for the groupid instead of uid) 292 the server if possible. With this option, the value given in
293 the uid= option (on mount) will only be used if the server
294 can not support returning uids on inodes.
295 noforcegid (similar to above but for the group owner, gid, instead of uid)
297 uid Set the default uid for inodes, and indicate to the 296 uid Set the default uid for inodes, and indicate to the
298 cifs kernel driver which local user mounted . If the server 297 cifs kernel driver which local user mounted. If the server
299 supports the unix extensions the default uid is 298 supports the unix extensions the default uid is
300 not used to fill in the owner fields of inodes (files) 299 not used to fill in the owner fields of inodes (files)
301 unless the "forceuid" parameter is specified. 300 unless the "forceuid" parameter is specified.
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index 7f19fefd3d4..42cec2a7c0c 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -261,6 +261,8 @@ static ssize_t cifs_stats_proc_write(struct file *file,
261 atomic_set(&tcon->num_reads, 0); 261 atomic_set(&tcon->num_reads, 0);
262 atomic_set(&tcon->num_oplock_brks, 0); 262 atomic_set(&tcon->num_oplock_brks, 0);
263 atomic_set(&tcon->num_opens, 0); 263 atomic_set(&tcon->num_opens, 0);
264 atomic_set(&tcon->num_posixopens, 0);
265 atomic_set(&tcon->num_posixmkdirs, 0);
264 atomic_set(&tcon->num_closes, 0); 266 atomic_set(&tcon->num_closes, 0);
265 atomic_set(&tcon->num_deletes, 0); 267 atomic_set(&tcon->num_deletes, 0);
266 atomic_set(&tcon->num_mkdirs, 0); 268 atomic_set(&tcon->num_mkdirs, 0);
@@ -347,11 +349,15 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
347 atomic_read(&tcon->num_locks), 349 atomic_read(&tcon->num_locks),
348 atomic_read(&tcon->num_hardlinks), 350 atomic_read(&tcon->num_hardlinks),
349 atomic_read(&tcon->num_symlinks)); 351 atomic_read(&tcon->num_symlinks));
350 seq_printf(m, "\nOpens: %d Closes: %d" 352 seq_printf(m, "\nOpens: %d Closes: %d "
351 "Deletes: %d", 353 "Deletes: %d",
352 atomic_read(&tcon->num_opens), 354 atomic_read(&tcon->num_opens),
353 atomic_read(&tcon->num_closes), 355 atomic_read(&tcon->num_closes),
354 atomic_read(&tcon->num_deletes)); 356 atomic_read(&tcon->num_deletes));
357 seq_printf(m, "\nPosix Opens: %d "
358 "Posix Mkdirs: %d",
359 atomic_read(&tcon->num_posixopens),
360 atomic_read(&tcon->num_posixmkdirs));
355 seq_printf(m, "\nMkdirs: %d Rmdirs: %d", 361 seq_printf(m, "\nMkdirs: %d Rmdirs: %d",
356 atomic_read(&tcon->num_mkdirs), 362 atomic_read(&tcon->num_mkdirs),
357 atomic_read(&tcon->num_rmdirs)); 363 atomic_read(&tcon->num_rmdirs));
diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c
index 3bb11be8b6a..606912d8f2a 100644
--- a/fs/cifs/cifs_dfs_ref.c
+++ b/fs/cifs/cifs_dfs_ref.c
@@ -55,7 +55,7 @@ void cifs_dfs_release_automount_timer(void)
55 * i.e. strips from UNC trailing path that is not part of share 55 * i.e. strips from UNC trailing path that is not part of share
56 * name and fixup missing '\' in the begining of DFS node refferal 56 * name and fixup missing '\' in the begining of DFS node refferal
57 * if neccessary. 57 * if neccessary.
58 * Returns pointer to share name on success or NULL on error. 58 * Returns pointer to share name on success or ERR_PTR on error.
59 * Caller is responsible for freeing returned string. 59 * Caller is responsible for freeing returned string.
60 */ 60 */
61static char *cifs_get_share_name(const char *node_name) 61static char *cifs_get_share_name(const char *node_name)
@@ -68,7 +68,7 @@ static char *cifs_get_share_name(const char *node_name)
68 UNC = kmalloc(len+2 /*for term null and additional \ if it's missed */, 68 UNC = kmalloc(len+2 /*for term null and additional \ if it's missed */,
69 GFP_KERNEL); 69 GFP_KERNEL);
70 if (!UNC) 70 if (!UNC)
71 return NULL; 71 return ERR_PTR(-ENOMEM);
72 72
73 /* get share name and server name */ 73 /* get share name and server name */
74 if (node_name[1] != '\\') { 74 if (node_name[1] != '\\') {
@@ -87,7 +87,7 @@ static char *cifs_get_share_name(const char *node_name)
87 cERROR(1, ("%s: no server name end in node name: %s", 87 cERROR(1, ("%s: no server name end in node name: %s",
88 __func__, node_name)); 88 __func__, node_name));
89 kfree(UNC); 89 kfree(UNC);
90 return NULL; 90 return ERR_PTR(-EINVAL);
91 } 91 }
92 92
93 /* find sharename end */ 93 /* find sharename end */
@@ -133,6 +133,12 @@ char *cifs_compose_mount_options(const char *sb_mountdata,
133 return ERR_PTR(-EINVAL); 133 return ERR_PTR(-EINVAL);
134 134
135 *devname = cifs_get_share_name(ref->node_name); 135 *devname = cifs_get_share_name(ref->node_name);
136 if (IS_ERR(*devname)) {
137 rc = PTR_ERR(*devname);
138 *devname = NULL;
139 goto compose_mount_options_err;
140 }
141
136 rc = dns_resolve_server_name_to_ip(*devname, &srvIP); 142 rc = dns_resolve_server_name_to_ip(*devname, &srvIP);
137 if (rc != 0) { 143 if (rc != 0) {
138 cERROR(1, ("%s: Failed to resolve server part of %s to IP: %d", 144 cERROR(1, ("%s: Failed to resolve server part of %s to IP: %d",
diff --git a/fs/cifs/cifs_unicode.c b/fs/cifs/cifs_unicode.c
index 60e3c4253de..714a542cbaf 100644
--- a/fs/cifs/cifs_unicode.c
+++ b/fs/cifs/cifs_unicode.c
@@ -44,7 +44,7 @@ cifs_ucs2_bytes(const __le16 *from, int maxbytes,
44 int maxwords = maxbytes / 2; 44 int maxwords = maxbytes / 2;
45 char tmp[NLS_MAX_CHARSET_SIZE]; 45 char tmp[NLS_MAX_CHARSET_SIZE];
46 46
47 for (i = 0; from[i] && i < maxwords; i++) { 47 for (i = 0; i < maxwords && from[i]; i++) {
48 charlen = codepage->uni2char(le16_to_cpu(from[i]), tmp, 48 charlen = codepage->uni2char(le16_to_cpu(from[i]), tmp,
49 NLS_MAX_CHARSET_SIZE); 49 NLS_MAX_CHARSET_SIZE);
50 if (charlen > 0) 50 if (charlen > 0)
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 44f30504b82..84b75253b05 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -376,10 +376,14 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
376 seq_printf(s, ",uid=%d", cifs_sb->mnt_uid); 376 seq_printf(s, ",uid=%d", cifs_sb->mnt_uid);
377 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_UID) 377 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_UID)
378 seq_printf(s, ",forceuid"); 378 seq_printf(s, ",forceuid");
379 else
380 seq_printf(s, ",noforceuid");
379 381
380 seq_printf(s, ",gid=%d", cifs_sb->mnt_gid); 382 seq_printf(s, ",gid=%d", cifs_sb->mnt_gid);
381 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID) 383 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID)
382 seq_printf(s, ",forcegid"); 384 seq_printf(s, ",forcegid");
385 else
386 seq_printf(s, ",noforcegid");
383 387
384 cifs_show_address(s, tcon->ses->server); 388 cifs_show_address(s, tcon->ses->server);
385 389
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 63f6cdfa563..6084d6379c0 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -260,6 +260,8 @@ struct cifsTconInfo {
260 atomic_t num_closes; 260 atomic_t num_closes;
261 atomic_t num_deletes; 261 atomic_t num_deletes;
262 atomic_t num_mkdirs; 262 atomic_t num_mkdirs;
263 atomic_t num_posixopens;
264 atomic_t num_posixmkdirs;
263 atomic_t num_rmdirs; 265 atomic_t num_rmdirs;
264 atomic_t num_renames; 266 atomic_t num_renames;
265 atomic_t num_t2renames; 267 atomic_t num_t2renames;
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 922f5fe2084..1866bc2927d 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -1113,7 +1113,10 @@ PsxCreat:
1113psx_create_err: 1113psx_create_err:
1114 cifs_buf_release(pSMB); 1114 cifs_buf_release(pSMB);
1115 1115
1116 cifs_stats_inc(&tcon->num_mkdirs); 1116 if (posix_flags & SMB_O_DIRECTORY)
1117 cifs_stats_inc(&tcon->num_posixmkdirs);
1118 else
1119 cifs_stats_inc(&tcon->num_posixopens);
1117 1120
1118 if (rc == -EAGAIN) 1121 if (rc == -EAGAIN)
1119 goto PsxCreat; 1122 goto PsxCreat;
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index e16d7592116..1f3345d7fa7 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -803,6 +803,10 @@ cifs_parse_mount_options(char *options, const char *devname,
803 char *data; 803 char *data;
804 unsigned int temp_len, i, j; 804 unsigned int temp_len, i, j;
805 char separator[2]; 805 char separator[2];
806 short int override_uid = -1;
807 short int override_gid = -1;
808 bool uid_specified = false;
809 bool gid_specified = false;
806 810
807 separator[0] = ','; 811 separator[0] = ',';
808 separator[1] = 0; 812 separator[1] = 0;
@@ -1093,18 +1097,20 @@ cifs_parse_mount_options(char *options, const char *devname,
1093 "too long.\n"); 1097 "too long.\n");
1094 return 1; 1098 return 1;
1095 } 1099 }
1096 } else if (strnicmp(data, "uid", 3) == 0) { 1100 } else if (!strnicmp(data, "uid", 3) && value && *value) {
1097 if (value && *value) 1101 vol->linux_uid = simple_strtoul(value, &value, 0);
1098 vol->linux_uid = 1102 uid_specified = true;
1099 simple_strtoul(value, &value, 0); 1103 } else if (!strnicmp(data, "forceuid", 8)) {
1100 } else if (strnicmp(data, "forceuid", 8) == 0) { 1104 override_uid = 1;
1101 vol->override_uid = 1; 1105 } else if (!strnicmp(data, "noforceuid", 10)) {
1102 } else if (strnicmp(data, "gid", 3) == 0) { 1106 override_uid = 0;
1103 if (value && *value) 1107 } else if (!strnicmp(data, "gid", 3) && value && *value) {
1104 vol->linux_gid = 1108 vol->linux_gid = simple_strtoul(value, &value, 0);
1105 simple_strtoul(value, &value, 0); 1109 gid_specified = true;
1106 } else if (strnicmp(data, "forcegid", 8) == 0) { 1110 } else if (!strnicmp(data, "forcegid", 8)) {
1107 vol->override_gid = 1; 1111 override_gid = 1;
1112 } else if (!strnicmp(data, "noforcegid", 10)) {
1113 override_gid = 0;
1108 } else if (strnicmp(data, "file_mode", 4) == 0) { 1114 } else if (strnicmp(data, "file_mode", 4) == 0) {
1109 if (value && *value) { 1115 if (value && *value) {
1110 vol->file_mode = 1116 vol->file_mode =
@@ -1355,6 +1361,18 @@ cifs_parse_mount_options(char *options, const char *devname,
1355 if (vol->UNCip == NULL) 1361 if (vol->UNCip == NULL)
1356 vol->UNCip = &vol->UNC[2]; 1362 vol->UNCip = &vol->UNC[2];
1357 1363
1364 if (uid_specified)
1365 vol->override_uid = override_uid;
1366 else if (override_uid == 1)
1367 printk(KERN_NOTICE "CIFS: ignoring forceuid mount option "
1368 "specified with no uid= option.\n");
1369
1370 if (gid_specified)
1371 vol->override_gid = override_gid;
1372 else if (override_gid == 1)
1373 printk(KERN_NOTICE "CIFS: ignoring forcegid mount option "
1374 "specified with no gid= option.\n");
1375
1358 return 0; 1376 return 0;
1359} 1377}
1360 1378
@@ -2452,10 +2470,10 @@ try_mount_again:
2452 tcon->local_lease = volume_info->local_lease; 2470 tcon->local_lease = volume_info->local_lease;
2453 } 2471 }
2454 if (pSesInfo) { 2472 if (pSesInfo) {
2455 if (pSesInfo->capabilities & CAP_LARGE_FILES) { 2473 if (pSesInfo->capabilities & CAP_LARGE_FILES)
2456 sb->s_maxbytes = (u64) 1 << 63; 2474 sb->s_maxbytes = MAX_LFS_FILESIZE;
2457 } else 2475 else
2458 sb->s_maxbytes = (u64) 1 << 31; /* 2 GB */ 2476 sb->s_maxbytes = MAX_NON_LFS;
2459 } 2477 }
2460 2478
2461 /* BB FIXME fix time_gran to be larger for LANMAN sessions */ 2479 /* BB FIXME fix time_gran to be larger for LANMAN sessions */
@@ -2544,11 +2562,20 @@ remote_path_check:
2544 2562
2545 if (mount_data != mount_data_global) 2563 if (mount_data != mount_data_global)
2546 kfree(mount_data); 2564 kfree(mount_data);
2565
2547 mount_data = cifs_compose_mount_options( 2566 mount_data = cifs_compose_mount_options(
2548 cifs_sb->mountdata, full_path + 1, 2567 cifs_sb->mountdata, full_path + 1,
2549 referrals, &fake_devname); 2568 referrals, &fake_devname);
2550 kfree(fake_devname); 2569
2551 free_dfs_info_array(referrals, num_referrals); 2570 free_dfs_info_array(referrals, num_referrals);
2571 kfree(fake_devname);
2572 kfree(full_path);
2573
2574 if (IS_ERR(mount_data)) {
2575 rc = PTR_ERR(mount_data);
2576 mount_data = NULL;
2577 goto mount_fail_check;
2578 }
2552 2579
2553 if (tcon) 2580 if (tcon)
2554 cifs_put_tcon(tcon); 2581 cifs_put_tcon(tcon);
@@ -2556,8 +2583,6 @@ remote_path_check:
2556 cifs_put_smb_ses(pSesInfo); 2583 cifs_put_smb_ses(pSesInfo);
2557 2584
2558 cleanup_volume_info(&volume_info); 2585 cleanup_volume_info(&volume_info);
2559 FreeXid(xid);
2560 kfree(full_path);
2561 referral_walks_count++; 2586 referral_walks_count++;
2562 goto try_mount_again; 2587 goto try_mount_again;
2563 } 2588 }
@@ -2726,6 +2751,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
2726 strncpy(tcon->treeName, tree, MAX_TREE_SIZE); 2751 strncpy(tcon->treeName, tree, MAX_TREE_SIZE);
2727 2752
2728 /* mostly informational -- no need to fail on error here */ 2753 /* mostly informational -- no need to fail on error here */
2754 kfree(tcon->nativeFileSystem);
2729 tcon->nativeFileSystem = cifs_strndup_from_ucs(bcc_ptr, 2755 tcon->nativeFileSystem = cifs_strndup_from_ucs(bcc_ptr,
2730 bytes_left, is_unicode, 2756 bytes_left, is_unicode,
2731 nls_codepage); 2757 nls_codepage);
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 18afe57b246..82d83839655 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -212,7 +212,7 @@ cifs_unix_basic_to_fattr(struct cifs_fattr *fattr, FILE_UNIX_BASIC_INFO *info,
212 * junction to the new submount (ie to setup the fake directory 212 * junction to the new submount (ie to setup the fake directory
213 * which represents a DFS referral). 213 * which represents a DFS referral).
214 */ 214 */
215void 215static void
216cifs_create_dfs_fattr(struct cifs_fattr *fattr, struct super_block *sb) 216cifs_create_dfs_fattr(struct cifs_fattr *fattr, struct super_block *sb)
217{ 217{
218 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 218 struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
@@ -388,7 +388,7 @@ static int cifs_sfu_mode(struct cifs_fattr *fattr, const unsigned char *path,
388} 388}
389 389
390/* Fill a cifs_fattr struct with info from FILE_ALL_INFO */ 390/* Fill a cifs_fattr struct with info from FILE_ALL_INFO */
391void 391static void
392cifs_all_info_to_fattr(struct cifs_fattr *fattr, FILE_ALL_INFO *info, 392cifs_all_info_to_fattr(struct cifs_fattr *fattr, FILE_ALL_INFO *info,
393 struct cifs_sb_info *cifs_sb, bool adjust_tz) 393 struct cifs_sb_info *cifs_sb, bool adjust_tz)
394{ 394{
@@ -513,9 +513,12 @@ int cifs_get_inode_info(struct inode **pinode,
513 cifs_sb->mnt_cifs_flags & 513 cifs_sb->mnt_cifs_flags &
514 CIFS_MOUNT_MAP_SPECIAL_CHR); 514 CIFS_MOUNT_MAP_SPECIAL_CHR);
515 if (rc1) { 515 if (rc1) {
516 /* BB EOPNOSUPP disable SERVER_INUM? */
517 cFYI(1, ("GetSrvInodeNum rc %d", rc1)); 516 cFYI(1, ("GetSrvInodeNum rc %d", rc1));
518 fattr.cf_uniqueid = iunique(sb, ROOT_I); 517 fattr.cf_uniqueid = iunique(sb, ROOT_I);
518 /* disable serverino if call not supported */
519 if (rc1 == -EINVAL)
520 cifs_sb->mnt_cifs_flags &=
521 ~CIFS_MOUNT_SERVER_INUM;
519 } 522 }
520 } else { 523 } else {
521 fattr.cf_uniqueid = iunique(sb, ROOT_I); 524 fattr.cf_uniqueid = iunique(sb, ROOT_I);
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index f28f070a60f..f91fd51b32e 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -1905,6 +1905,7 @@ COMPATIBLE_IOCTL(FIONCLEX)
1905COMPATIBLE_IOCTL(FIOASYNC) 1905COMPATIBLE_IOCTL(FIOASYNC)
1906COMPATIBLE_IOCTL(FIONBIO) 1906COMPATIBLE_IOCTL(FIONBIO)
1907COMPATIBLE_IOCTL(FIONREAD) /* This is also TIOCINQ */ 1907COMPATIBLE_IOCTL(FIONREAD) /* This is also TIOCINQ */
1908COMPATIBLE_IOCTL(FS_IOC_FIEMAP)
1908/* 0x00 */ 1909/* 0x00 */
1909COMPATIBLE_IOCTL(FIBMAP) 1910COMPATIBLE_IOCTL(FIBMAP)
1910COMPATIBLE_IOCTL(FIGETBSZ) 1911COMPATIBLE_IOCTL(FIGETBSZ)
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c
index af737bb56cb..259525c9abb 100644
--- a/fs/ecryptfs/keystore.c
+++ b/fs/ecryptfs/keystore.c
@@ -1303,6 +1303,13 @@ parse_tag_3_packet(struct ecryptfs_crypt_stat *crypt_stat,
1303 } 1303 }
1304 (*new_auth_tok)->session_key.encrypted_key_size = 1304 (*new_auth_tok)->session_key.encrypted_key_size =
1305 (body_size - (ECRYPTFS_SALT_SIZE + 5)); 1305 (body_size - (ECRYPTFS_SALT_SIZE + 5));
1306 if ((*new_auth_tok)->session_key.encrypted_key_size
1307 > ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES) {
1308 printk(KERN_WARNING "Tag 3 packet contains key larger "
1309 "than ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES\n");
1310 rc = -EINVAL;
1311 goto out_free;
1312 }
1306 if (unlikely(data[(*packet_size)++] != 0x04)) { 1313 if (unlikely(data[(*packet_size)++] != 0x04)) {
1307 printk(KERN_WARNING "Unknown version number [%d]\n", 1314 printk(KERN_WARNING "Unknown version number [%d]\n",
1308 data[(*packet_size) - 1]); 1315 data[(*packet_size) - 1]);
@@ -1449,6 +1456,12 @@ parse_tag_11_packet(unsigned char *data, unsigned char *contents,
1449 rc = -EINVAL; 1456 rc = -EINVAL;
1450 goto out; 1457 goto out;
1451 } 1458 }
1459 if (unlikely((*tag_11_contents_size) > max_contents_bytes)) {
1460 printk(KERN_ERR "Literal data section in tag 11 packet exceeds "
1461 "expected size\n");
1462 rc = -EINVAL;
1463 goto out;
1464 }
1452 if (data[(*packet_size)++] != 0x62) { 1465 if (data[(*packet_size)++] != 0x62) {
1453 printk(KERN_WARNING "Unrecognizable packet\n"); 1466 printk(KERN_WARNING "Unrecognizable packet\n");
1454 rc = -EINVAL; 1467 rc = -EINVAL;
diff --git a/fs/ext3/dir.c b/fs/ext3/dir.c
index 3d724a95882..373fa90c796 100644
--- a/fs/ext3/dir.c
+++ b/fs/ext3/dir.c
@@ -130,8 +130,7 @@ static int ext3_readdir(struct file * filp,
130 struct buffer_head *bh = NULL; 130 struct buffer_head *bh = NULL;
131 131
132 map_bh.b_state = 0; 132 map_bh.b_state = 0;
133 err = ext3_get_blocks_handle(NULL, inode, blk, 1, 133 err = ext3_get_blocks_handle(NULL, inode, blk, 1, &map_bh, 0);
134 &map_bh, 0, 0);
135 if (err > 0) { 134 if (err > 0) {
136 pgoff_t index = map_bh.b_blocknr >> 135 pgoff_t index = map_bh.b_blocknr >>
137 (PAGE_CACHE_SHIFT - inode->i_blkbits); 136 (PAGE_CACHE_SHIFT - inode->i_blkbits);
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index 5f51fed5c75..b49908a167a 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -788,7 +788,7 @@ err_out:
788int ext3_get_blocks_handle(handle_t *handle, struct inode *inode, 788int ext3_get_blocks_handle(handle_t *handle, struct inode *inode,
789 sector_t iblock, unsigned long maxblocks, 789 sector_t iblock, unsigned long maxblocks,
790 struct buffer_head *bh_result, 790 struct buffer_head *bh_result,
791 int create, int extend_disksize) 791 int create)
792{ 792{
793 int err = -EIO; 793 int err = -EIO;
794 int offsets[4]; 794 int offsets[4];
@@ -911,13 +911,6 @@ int ext3_get_blocks_handle(handle_t *handle, struct inode *inode,
911 if (!err) 911 if (!err)
912 err = ext3_splice_branch(handle, inode, iblock, 912 err = ext3_splice_branch(handle, inode, iblock,
913 partial, indirect_blks, count); 913 partial, indirect_blks, count);
914 /*
915 * i_disksize growing is protected by truncate_mutex. Don't forget to
916 * protect it if you're about to implement concurrent
917 * ext3_get_block() -bzzz
918 */
919 if (!err && extend_disksize && inode->i_size > ei->i_disksize)
920 ei->i_disksize = inode->i_size;
921 mutex_unlock(&ei->truncate_mutex); 914 mutex_unlock(&ei->truncate_mutex);
922 if (err) 915 if (err)
923 goto cleanup; 916 goto cleanup;
@@ -972,7 +965,7 @@ static int ext3_get_block(struct inode *inode, sector_t iblock,
972 } 965 }
973 966
974 ret = ext3_get_blocks_handle(handle, inode, iblock, 967 ret = ext3_get_blocks_handle(handle, inode, iblock,
975 max_blocks, bh_result, create, 0); 968 max_blocks, bh_result, create);
976 if (ret > 0) { 969 if (ret > 0) {
977 bh_result->b_size = (ret << inode->i_blkbits); 970 bh_result->b_size = (ret << inode->i_blkbits);
978 ret = 0; 971 ret = 0;
@@ -1005,7 +998,7 @@ struct buffer_head *ext3_getblk(handle_t *handle, struct inode *inode,
1005 dummy.b_blocknr = -1000; 998 dummy.b_blocknr = -1000;
1006 buffer_trace_init(&dummy.b_history); 999 buffer_trace_init(&dummy.b_history);
1007 err = ext3_get_blocks_handle(handle, inode, block, 1, 1000 err = ext3_get_blocks_handle(handle, inode, block, 1,
1008 &dummy, create, 1); 1001 &dummy, create);
1009 /* 1002 /*
1010 * ext3_get_blocks_handle() returns number of blocks 1003 * ext3_get_blocks_handle() returns number of blocks
1011 * mapped. 0 in case of a HOLE. 1004 * mapped. 0 in case of a HOLE.
@@ -1193,15 +1186,16 @@ write_begin_failed:
1193 * i_size_read because we hold i_mutex. 1186 * i_size_read because we hold i_mutex.
1194 * 1187 *
1195 * Add inode to orphan list in case we crash before truncate 1188 * Add inode to orphan list in case we crash before truncate
1196 * finishes. 1189 * finishes. Do this only if ext3_can_truncate() agrees so
1190 * that orphan processing code is happy.
1197 */ 1191 */
1198 if (pos + len > inode->i_size) 1192 if (pos + len > inode->i_size && ext3_can_truncate(inode))
1199 ext3_orphan_add(handle, inode); 1193 ext3_orphan_add(handle, inode);
1200 ext3_journal_stop(handle); 1194 ext3_journal_stop(handle);
1201 unlock_page(page); 1195 unlock_page(page);
1202 page_cache_release(page); 1196 page_cache_release(page);
1203 if (pos + len > inode->i_size) 1197 if (pos + len > inode->i_size)
1204 vmtruncate(inode, inode->i_size); 1198 ext3_truncate(inode);
1205 } 1199 }
1206 if (ret == -ENOSPC && ext3_should_retry_alloc(inode->i_sb, &retries)) 1200 if (ret == -ENOSPC && ext3_should_retry_alloc(inode->i_sb, &retries))
1207 goto retry; 1201 goto retry;
@@ -1287,7 +1281,7 @@ static int ext3_ordered_write_end(struct file *file,
1287 * There may be allocated blocks outside of i_size because 1281 * There may be allocated blocks outside of i_size because
1288 * we failed to copy some data. Prepare for truncate. 1282 * we failed to copy some data. Prepare for truncate.
1289 */ 1283 */
1290 if (pos + len > inode->i_size) 1284 if (pos + len > inode->i_size && ext3_can_truncate(inode))
1291 ext3_orphan_add(handle, inode); 1285 ext3_orphan_add(handle, inode);
1292 ret2 = ext3_journal_stop(handle); 1286 ret2 = ext3_journal_stop(handle);
1293 if (!ret) 1287 if (!ret)
@@ -1296,7 +1290,7 @@ static int ext3_ordered_write_end(struct file *file,
1296 page_cache_release(page); 1290 page_cache_release(page);
1297 1291
1298 if (pos + len > inode->i_size) 1292 if (pos + len > inode->i_size)
1299 vmtruncate(inode, inode->i_size); 1293 ext3_truncate(inode);
1300 return ret ? ret : copied; 1294 return ret ? ret : copied;
1301} 1295}
1302 1296
@@ -1315,14 +1309,14 @@ static int ext3_writeback_write_end(struct file *file,
1315 * There may be allocated blocks outside of i_size because 1309 * There may be allocated blocks outside of i_size because
1316 * we failed to copy some data. Prepare for truncate. 1310 * we failed to copy some data. Prepare for truncate.
1317 */ 1311 */
1318 if (pos + len > inode->i_size) 1312 if (pos + len > inode->i_size && ext3_can_truncate(inode))
1319 ext3_orphan_add(handle, inode); 1313 ext3_orphan_add(handle, inode);
1320 ret = ext3_journal_stop(handle); 1314 ret = ext3_journal_stop(handle);
1321 unlock_page(page); 1315 unlock_page(page);
1322 page_cache_release(page); 1316 page_cache_release(page);
1323 1317
1324 if (pos + len > inode->i_size) 1318 if (pos + len > inode->i_size)
1325 vmtruncate(inode, inode->i_size); 1319 ext3_truncate(inode);
1326 return ret ? ret : copied; 1320 return ret ? ret : copied;
1327} 1321}
1328 1322
@@ -1358,7 +1352,7 @@ static int ext3_journalled_write_end(struct file *file,
1358 * There may be allocated blocks outside of i_size because 1352 * There may be allocated blocks outside of i_size because
1359 * we failed to copy some data. Prepare for truncate. 1353 * we failed to copy some data. Prepare for truncate.
1360 */ 1354 */
1361 if (pos + len > inode->i_size) 1355 if (pos + len > inode->i_size && ext3_can_truncate(inode))
1362 ext3_orphan_add(handle, inode); 1356 ext3_orphan_add(handle, inode);
1363 EXT3_I(inode)->i_state |= EXT3_STATE_JDATA; 1357 EXT3_I(inode)->i_state |= EXT3_STATE_JDATA;
1364 if (inode->i_size > EXT3_I(inode)->i_disksize) { 1358 if (inode->i_size > EXT3_I(inode)->i_disksize) {
@@ -1375,7 +1369,7 @@ static int ext3_journalled_write_end(struct file *file,
1375 page_cache_release(page); 1369 page_cache_release(page);
1376 1370
1377 if (pos + len > inode->i_size) 1371 if (pos + len > inode->i_size)
1378 vmtruncate(inode, inode->i_size); 1372 ext3_truncate(inode);
1379 return ret ? ret : copied; 1373 return ret ? ret : copied;
1380} 1374}
1381 1375
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index 03ebb439ace..7ebae9a4ecc 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -624,6 +624,7 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping,
624{ 624{
625 struct gfs2_inode *ip = GFS2_I(mapping->host); 625 struct gfs2_inode *ip = GFS2_I(mapping->host);
626 struct gfs2_sbd *sdp = GFS2_SB(mapping->host); 626 struct gfs2_sbd *sdp = GFS2_SB(mapping->host);
627 struct gfs2_inode *m_ip = GFS2_I(sdp->sd_statfs_inode);
627 unsigned int data_blocks = 0, ind_blocks = 0, rblocks; 628 unsigned int data_blocks = 0, ind_blocks = 0, rblocks;
628 int alloc_required; 629 int alloc_required;
629 int error = 0; 630 int error = 0;
@@ -637,6 +638,14 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping,
637 error = gfs2_glock_nq(&ip->i_gh); 638 error = gfs2_glock_nq(&ip->i_gh);
638 if (unlikely(error)) 639 if (unlikely(error))
639 goto out_uninit; 640 goto out_uninit;
641 if (&ip->i_inode == sdp->sd_rindex) {
642 error = gfs2_glock_nq_init(m_ip->i_gl, LM_ST_EXCLUSIVE,
643 GL_NOCACHE, &m_ip->i_gh);
644 if (unlikely(error)) {
645 gfs2_glock_dq(&ip->i_gh);
646 goto out_uninit;
647 }
648 }
640 649
641 error = gfs2_write_alloc_required(ip, pos, len, &alloc_required); 650 error = gfs2_write_alloc_required(ip, pos, len, &alloc_required);
642 if (error) 651 if (error)
@@ -667,6 +676,8 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping,
667 rblocks += data_blocks ? data_blocks : 1; 676 rblocks += data_blocks ? data_blocks : 1;
668 if (ind_blocks || data_blocks) 677 if (ind_blocks || data_blocks)
669 rblocks += RES_STATFS + RES_QUOTA; 678 rblocks += RES_STATFS + RES_QUOTA;
679 if (&ip->i_inode == sdp->sd_rindex)
680 rblocks += 2 * RES_STATFS;
670 681
671 error = gfs2_trans_begin(sdp, rblocks, 682 error = gfs2_trans_begin(sdp, rblocks,
672 PAGE_CACHE_SIZE/sdp->sd_sb.sb_bsize); 683 PAGE_CACHE_SIZE/sdp->sd_sb.sb_bsize);
@@ -712,6 +723,10 @@ out_alloc_put:
712 gfs2_alloc_put(ip); 723 gfs2_alloc_put(ip);
713 } 724 }
714out_unlock: 725out_unlock:
726 if (&ip->i_inode == sdp->sd_rindex) {
727 gfs2_glock_dq(&m_ip->i_gh);
728 gfs2_holder_uninit(&m_ip->i_gh);
729 }
715 gfs2_glock_dq(&ip->i_gh); 730 gfs2_glock_dq(&ip->i_gh);
716out_uninit: 731out_uninit:
717 gfs2_holder_uninit(&ip->i_gh); 732 gfs2_holder_uninit(&ip->i_gh);
@@ -725,14 +740,21 @@ out_uninit:
725static void adjust_fs_space(struct inode *inode) 740static void adjust_fs_space(struct inode *inode)
726{ 741{
727 struct gfs2_sbd *sdp = inode->i_sb->s_fs_info; 742 struct gfs2_sbd *sdp = inode->i_sb->s_fs_info;
743 struct gfs2_inode *m_ip = GFS2_I(sdp->sd_statfs_inode);
744 struct gfs2_inode *l_ip = GFS2_I(sdp->sd_sc_inode);
728 struct gfs2_statfs_change_host *m_sc = &sdp->sd_statfs_master; 745 struct gfs2_statfs_change_host *m_sc = &sdp->sd_statfs_master;
729 struct gfs2_statfs_change_host *l_sc = &sdp->sd_statfs_local; 746 struct gfs2_statfs_change_host *l_sc = &sdp->sd_statfs_local;
747 struct buffer_head *m_bh, *l_bh;
730 u64 fs_total, new_free; 748 u64 fs_total, new_free;
731 749
732 /* Total up the file system space, according to the latest rindex. */ 750 /* Total up the file system space, according to the latest rindex. */
733 fs_total = gfs2_ri_total(sdp); 751 fs_total = gfs2_ri_total(sdp);
752 if (gfs2_meta_inode_buffer(m_ip, &m_bh) != 0)
753 return;
734 754
735 spin_lock(&sdp->sd_statfs_spin); 755 spin_lock(&sdp->sd_statfs_spin);
756 gfs2_statfs_change_in(m_sc, m_bh->b_data +
757 sizeof(struct gfs2_dinode));
736 if (fs_total > (m_sc->sc_total + l_sc->sc_total)) 758 if (fs_total > (m_sc->sc_total + l_sc->sc_total))
737 new_free = fs_total - (m_sc->sc_total + l_sc->sc_total); 759 new_free = fs_total - (m_sc->sc_total + l_sc->sc_total);
738 else 760 else
@@ -741,6 +763,13 @@ static void adjust_fs_space(struct inode *inode)
741 fs_warn(sdp, "File system extended by %llu blocks.\n", 763 fs_warn(sdp, "File system extended by %llu blocks.\n",
742 (unsigned long long)new_free); 764 (unsigned long long)new_free);
743 gfs2_statfs_change(sdp, new_free, new_free, 0); 765 gfs2_statfs_change(sdp, new_free, new_free, 0);
766
767 if (gfs2_meta_inode_buffer(l_ip, &l_bh) != 0)
768 goto out;
769 update_statfs(sdp, m_bh, l_bh);
770 brelse(l_bh);
771out:
772 brelse(m_bh);
744} 773}
745 774
746/** 775/**
@@ -763,6 +792,7 @@ static int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh,
763{ 792{
764 struct gfs2_inode *ip = GFS2_I(inode); 793 struct gfs2_inode *ip = GFS2_I(inode);
765 struct gfs2_sbd *sdp = GFS2_SB(inode); 794 struct gfs2_sbd *sdp = GFS2_SB(inode);
795 struct gfs2_inode *m_ip = GFS2_I(sdp->sd_statfs_inode);
766 u64 to = pos + copied; 796 u64 to = pos + copied;
767 void *kaddr; 797 void *kaddr;
768 unsigned char *buf = dibh->b_data + sizeof(struct gfs2_dinode); 798 unsigned char *buf = dibh->b_data + sizeof(struct gfs2_dinode);
@@ -794,6 +824,10 @@ static int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh,
794 824
795 brelse(dibh); 825 brelse(dibh);
796 gfs2_trans_end(sdp); 826 gfs2_trans_end(sdp);
827 if (inode == sdp->sd_rindex) {
828 gfs2_glock_dq(&m_ip->i_gh);
829 gfs2_holder_uninit(&m_ip->i_gh);
830 }
797 gfs2_glock_dq(&ip->i_gh); 831 gfs2_glock_dq(&ip->i_gh);
798 gfs2_holder_uninit(&ip->i_gh); 832 gfs2_holder_uninit(&ip->i_gh);
799 return copied; 833 return copied;
@@ -823,6 +857,7 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping,
823 struct inode *inode = page->mapping->host; 857 struct inode *inode = page->mapping->host;
824 struct gfs2_inode *ip = GFS2_I(inode); 858 struct gfs2_inode *ip = GFS2_I(inode);
825 struct gfs2_sbd *sdp = GFS2_SB(inode); 859 struct gfs2_sbd *sdp = GFS2_SB(inode);
860 struct gfs2_inode *m_ip = GFS2_I(sdp->sd_statfs_inode);
826 struct buffer_head *dibh; 861 struct buffer_head *dibh;
827 struct gfs2_alloc *al = ip->i_alloc; 862 struct gfs2_alloc *al = ip->i_alloc;
828 unsigned int from = pos & (PAGE_CACHE_SIZE - 1); 863 unsigned int from = pos & (PAGE_CACHE_SIZE - 1);
@@ -865,6 +900,10 @@ failed:
865 gfs2_quota_unlock(ip); 900 gfs2_quota_unlock(ip);
866 gfs2_alloc_put(ip); 901 gfs2_alloc_put(ip);
867 } 902 }
903 if (inode == sdp->sd_rindex) {
904 gfs2_glock_dq(&m_ip->i_gh);
905 gfs2_holder_uninit(&m_ip->i_gh);
906 }
868 gfs2_glock_dq(&ip->i_gh); 907 gfs2_glock_dq(&ip->i_gh);
869 gfs2_holder_uninit(&ip->i_gh); 908 gfs2_holder_uninit(&ip->i_gh);
870 return ret; 909 return ret;
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 297421c0427..8b674b1f3a5 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -63,6 +63,7 @@ static void do_xmote(struct gfs2_glock *gl, struct gfs2_holder *gh, unsigned int
63static DECLARE_RWSEM(gfs2_umount_flush_sem); 63static DECLARE_RWSEM(gfs2_umount_flush_sem);
64static struct dentry *gfs2_root; 64static struct dentry *gfs2_root;
65static struct workqueue_struct *glock_workqueue; 65static struct workqueue_struct *glock_workqueue;
66struct workqueue_struct *gfs2_delete_workqueue;
66static LIST_HEAD(lru_list); 67static LIST_HEAD(lru_list);
67static atomic_t lru_count = ATOMIC_INIT(0); 68static atomic_t lru_count = ATOMIC_INIT(0);
68static DEFINE_SPINLOCK(lru_lock); 69static DEFINE_SPINLOCK(lru_lock);
@@ -167,13 +168,33 @@ static void glock_free(struct gfs2_glock *gl)
167 * 168 *
168 */ 169 */
169 170
170static void gfs2_glock_hold(struct gfs2_glock *gl) 171void gfs2_glock_hold(struct gfs2_glock *gl)
171{ 172{
172 GLOCK_BUG_ON(gl, atomic_read(&gl->gl_ref) == 0); 173 GLOCK_BUG_ON(gl, atomic_read(&gl->gl_ref) == 0);
173 atomic_inc(&gl->gl_ref); 174 atomic_inc(&gl->gl_ref);
174} 175}
175 176
176/** 177/**
178 * demote_ok - Check to see if it's ok to unlock a glock
179 * @gl: the glock
180 *
181 * Returns: 1 if it's ok
182 */
183
184static int demote_ok(const struct gfs2_glock *gl)
185{
186 const struct gfs2_glock_operations *glops = gl->gl_ops;
187
188 if (gl->gl_state == LM_ST_UNLOCKED)
189 return 0;
190 if (!list_empty(&gl->gl_holders))
191 return 0;
192 if (glops->go_demote_ok)
193 return glops->go_demote_ok(gl);
194 return 1;
195}
196
197/**
177 * gfs2_glock_schedule_for_reclaim - Add a glock to the reclaim list 198 * gfs2_glock_schedule_for_reclaim - Add a glock to the reclaim list
178 * @gl: the glock 199 * @gl: the glock
179 * 200 *
@@ -181,8 +202,13 @@ static void gfs2_glock_hold(struct gfs2_glock *gl)
181 202
182static void gfs2_glock_schedule_for_reclaim(struct gfs2_glock *gl) 203static void gfs2_glock_schedule_for_reclaim(struct gfs2_glock *gl)
183{ 204{
205 int may_reclaim;
206 may_reclaim = (demote_ok(gl) &&
207 (atomic_read(&gl->gl_ref) == 1 ||
208 (gl->gl_name.ln_type == LM_TYPE_INODE &&
209 atomic_read(&gl->gl_ref) <= 2)));
184 spin_lock(&lru_lock); 210 spin_lock(&lru_lock);
185 if (list_empty(&gl->gl_lru) && gl->gl_state != LM_ST_UNLOCKED) { 211 if (list_empty(&gl->gl_lru) && may_reclaim) {
186 list_add_tail(&gl->gl_lru, &lru_list); 212 list_add_tail(&gl->gl_lru, &lru_list);
187 atomic_inc(&lru_count); 213 atomic_inc(&lru_count);
188 } 214 }
@@ -190,6 +216,21 @@ static void gfs2_glock_schedule_for_reclaim(struct gfs2_glock *gl)
190} 216}
191 217
192/** 218/**
219 * gfs2_glock_put_nolock() - Decrement reference count on glock
220 * @gl: The glock to put
221 *
222 * This function should only be used if the caller has its own reference
223 * to the glock, in addition to the one it is dropping.
224 */
225
226void gfs2_glock_put_nolock(struct gfs2_glock *gl)
227{
228 if (atomic_dec_and_test(&gl->gl_ref))
229 GLOCK_BUG_ON(gl, 1);
230 gfs2_glock_schedule_for_reclaim(gl);
231}
232
233/**
193 * gfs2_glock_put() - Decrement reference count on glock 234 * gfs2_glock_put() - Decrement reference count on glock
194 * @gl: The glock to put 235 * @gl: The glock to put
195 * 236 *
@@ -214,9 +255,9 @@ int gfs2_glock_put(struct gfs2_glock *gl)
214 rv = 1; 255 rv = 1;
215 goto out; 256 goto out;
216 } 257 }
217 /* 1 for being hashed, 1 for having state != LM_ST_UNLOCKED */ 258 spin_lock(&gl->gl_spin);
218 if (atomic_read(&gl->gl_ref) == 2) 259 gfs2_glock_schedule_for_reclaim(gl);
219 gfs2_glock_schedule_for_reclaim(gl); 260 spin_unlock(&gl->gl_spin);
220 write_unlock(gl_lock_addr(gl->gl_hash)); 261 write_unlock(gl_lock_addr(gl->gl_hash));
221out: 262out:
222 return rv; 263 return rv;
@@ -398,7 +439,7 @@ static void state_change(struct gfs2_glock *gl, unsigned int new_state)
398 if (held2) 439 if (held2)
399 gfs2_glock_hold(gl); 440 gfs2_glock_hold(gl);
400 else 441 else
401 gfs2_glock_put(gl); 442 gfs2_glock_put_nolock(gl);
402 } 443 }
403 444
404 gl->gl_state = new_state; 445 gl->gl_state = new_state;
@@ -633,12 +674,35 @@ out:
633out_sched: 674out_sched:
634 gfs2_glock_hold(gl); 675 gfs2_glock_hold(gl);
635 if (queue_delayed_work(glock_workqueue, &gl->gl_work, 0) == 0) 676 if (queue_delayed_work(glock_workqueue, &gl->gl_work, 0) == 0)
636 gfs2_glock_put(gl); 677 gfs2_glock_put_nolock(gl);
637out_unlock: 678out_unlock:
638 clear_bit(GLF_LOCK, &gl->gl_flags); 679 clear_bit(GLF_LOCK, &gl->gl_flags);
639 goto out; 680 goto out;
640} 681}
641 682
683static void delete_work_func(struct work_struct *work)
684{
685 struct gfs2_glock *gl = container_of(work, struct gfs2_glock, gl_delete);
686 struct gfs2_sbd *sdp = gl->gl_sbd;
687 struct gfs2_inode *ip = NULL;
688 struct inode *inode;
689 u64 no_addr = 0;
690
691 spin_lock(&gl->gl_spin);
692 ip = (struct gfs2_inode *)gl->gl_object;
693 if (ip)
694 no_addr = ip->i_no_addr;
695 spin_unlock(&gl->gl_spin);
696 if (ip) {
697 inode = gfs2_ilookup(sdp->sd_vfs, no_addr);
698 if (inode) {
699 d_prune_aliases(inode);
700 iput(inode);
701 }
702 }
703 gfs2_glock_put(gl);
704}
705
642static void glock_work_func(struct work_struct *work) 706static void glock_work_func(struct work_struct *work)
643{ 707{
644 unsigned long delay = 0; 708 unsigned long delay = 0;
@@ -717,6 +781,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number,
717 gl->gl_sbd = sdp; 781 gl->gl_sbd = sdp;
718 gl->gl_aspace = NULL; 782 gl->gl_aspace = NULL;
719 INIT_DELAYED_WORK(&gl->gl_work, glock_work_func); 783 INIT_DELAYED_WORK(&gl->gl_work, glock_work_func);
784 INIT_WORK(&gl->gl_delete, delete_work_func);
720 785
721 /* If this glock protects actual on-disk data or metadata blocks, 786 /* If this glock protects actual on-disk data or metadata blocks,
722 create a VFS inode to manage the pages/buffers holding them. */ 787 create a VFS inode to manage the pages/buffers holding them. */
@@ -858,6 +923,8 @@ static void handle_callback(struct gfs2_glock *gl, unsigned int state,
858 gl->gl_demote_state != state) { 923 gl->gl_demote_state != state) {
859 gl->gl_demote_state = LM_ST_UNLOCKED; 924 gl->gl_demote_state = LM_ST_UNLOCKED;
860 } 925 }
926 if (gl->gl_ops->go_callback)
927 gl->gl_ops->go_callback(gl);
861 trace_gfs2_demote_rq(gl); 928 trace_gfs2_demote_rq(gl);
862} 929}
863 930
@@ -1274,33 +1341,12 @@ void gfs2_glock_complete(struct gfs2_glock *gl, int ret)
1274 gfs2_glock_put(gl); 1341 gfs2_glock_put(gl);
1275} 1342}
1276 1343
1277/**
1278 * demote_ok - Check to see if it's ok to unlock a glock
1279 * @gl: the glock
1280 *
1281 * Returns: 1 if it's ok
1282 */
1283
1284static int demote_ok(const struct gfs2_glock *gl)
1285{
1286 const struct gfs2_glock_operations *glops = gl->gl_ops;
1287
1288 if (gl->gl_state == LM_ST_UNLOCKED)
1289 return 0;
1290 if (!list_empty(&gl->gl_holders))
1291 return 0;
1292 if (glops->go_demote_ok)
1293 return glops->go_demote_ok(gl);
1294 return 1;
1295}
1296
1297 1344
1298static int gfs2_shrink_glock_memory(int nr, gfp_t gfp_mask) 1345static int gfs2_shrink_glock_memory(int nr, gfp_t gfp_mask)
1299{ 1346{
1300 struct gfs2_glock *gl; 1347 struct gfs2_glock *gl;
1301 int may_demote; 1348 int may_demote;
1302 int nr_skipped = 0; 1349 int nr_skipped = 0;
1303 int got_ref = 0;
1304 LIST_HEAD(skipped); 1350 LIST_HEAD(skipped);
1305 1351
1306 if (nr == 0) 1352 if (nr == 0)
@@ -1315,37 +1361,29 @@ static int gfs2_shrink_glock_memory(int nr, gfp_t gfp_mask)
1315 list_del_init(&gl->gl_lru); 1361 list_del_init(&gl->gl_lru);
1316 atomic_dec(&lru_count); 1362 atomic_dec(&lru_count);
1317 1363
1364 /* Check if glock is about to be freed */
1365 if (atomic_read(&gl->gl_ref) == 0)
1366 continue;
1367
1318 /* Test for being demotable */ 1368 /* Test for being demotable */
1319 if (!test_and_set_bit(GLF_LOCK, &gl->gl_flags)) { 1369 if (!test_and_set_bit(GLF_LOCK, &gl->gl_flags)) {
1320 gfs2_glock_hold(gl); 1370 gfs2_glock_hold(gl);
1321 got_ref = 1;
1322 spin_unlock(&lru_lock); 1371 spin_unlock(&lru_lock);
1323 spin_lock(&gl->gl_spin); 1372 spin_lock(&gl->gl_spin);
1324 may_demote = demote_ok(gl); 1373 may_demote = demote_ok(gl);
1325 spin_unlock(&gl->gl_spin);
1326 clear_bit(GLF_LOCK, &gl->gl_flags);
1327 if (may_demote) { 1374 if (may_demote) {
1328 handle_callback(gl, LM_ST_UNLOCKED, 0); 1375 handle_callback(gl, LM_ST_UNLOCKED, 0);
1329 nr--; 1376 nr--;
1330 if (queue_delayed_work(glock_workqueue, &gl->gl_work, 0) == 0)
1331 gfs2_glock_put(gl);
1332 got_ref = 0;
1333 } 1377 }
1378 if (queue_delayed_work(glock_workqueue, &gl->gl_work, 0) == 0)
1379 gfs2_glock_put_nolock(gl);
1380 spin_unlock(&gl->gl_spin);
1381 clear_bit(GLF_LOCK, &gl->gl_flags);
1334 spin_lock(&lru_lock); 1382 spin_lock(&lru_lock);
1335 if (may_demote) 1383 continue;
1336 continue;
1337 }
1338 if (list_empty(&gl->gl_lru) &&
1339 (atomic_read(&gl->gl_ref) <= (2 + got_ref))) {
1340 nr_skipped++;
1341 list_add(&gl->gl_lru, &skipped);
1342 }
1343 if (got_ref) {
1344 spin_unlock(&lru_lock);
1345 gfs2_glock_put(gl);
1346 spin_lock(&lru_lock);
1347 got_ref = 0;
1348 } 1384 }
1385 nr_skipped++;
1386 list_add(&gl->gl_lru, &skipped);
1349 } 1387 }
1350 list_splice(&skipped, &lru_list); 1388 list_splice(&skipped, &lru_list);
1351 atomic_add(nr_skipped, &lru_count); 1389 atomic_add(nr_skipped, &lru_count);
@@ -1727,6 +1765,11 @@ int __init gfs2_glock_init(void)
1727 glock_workqueue = create_workqueue("glock_workqueue"); 1765 glock_workqueue = create_workqueue("glock_workqueue");
1728 if (IS_ERR(glock_workqueue)) 1766 if (IS_ERR(glock_workqueue))
1729 return PTR_ERR(glock_workqueue); 1767 return PTR_ERR(glock_workqueue);
1768 gfs2_delete_workqueue = create_workqueue("delete_workqueue");
1769 if (IS_ERR(gfs2_delete_workqueue)) {
1770 destroy_workqueue(glock_workqueue);
1771 return PTR_ERR(gfs2_delete_workqueue);
1772 }
1730 1773
1731 register_shrinker(&glock_shrinker); 1774 register_shrinker(&glock_shrinker);
1732 1775
@@ -1737,6 +1780,7 @@ void gfs2_glock_exit(void)
1737{ 1780{
1738 unregister_shrinker(&glock_shrinker); 1781 unregister_shrinker(&glock_shrinker);
1739 destroy_workqueue(glock_workqueue); 1782 destroy_workqueue(glock_workqueue);
1783 destroy_workqueue(gfs2_delete_workqueue);
1740} 1784}
1741 1785
1742static int gfs2_glock_iter_next(struct gfs2_glock_iter *gi) 1786static int gfs2_glock_iter_next(struct gfs2_glock_iter *gi)
diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h
index a602a28f6f0..c609894ec0d 100644
--- a/fs/gfs2/glock.h
+++ b/fs/gfs2/glock.h
@@ -143,6 +143,7 @@ struct lm_lockops {
143 143
144#define GLR_TRYFAILED 13 144#define GLR_TRYFAILED 13
145 145
146extern struct workqueue_struct *gfs2_delete_workqueue;
146static inline struct gfs2_holder *gfs2_glock_is_locked_by_me(struct gfs2_glock *gl) 147static inline struct gfs2_holder *gfs2_glock_is_locked_by_me(struct gfs2_glock *gl)
147{ 148{
148 struct gfs2_holder *gh; 149 struct gfs2_holder *gh;
@@ -191,6 +192,8 @@ static inline int gfs2_glock_is_blocking(struct gfs2_glock *gl)
191int gfs2_glock_get(struct gfs2_sbd *sdp, 192int gfs2_glock_get(struct gfs2_sbd *sdp,
192 u64 number, const struct gfs2_glock_operations *glops, 193 u64 number, const struct gfs2_glock_operations *glops,
193 int create, struct gfs2_glock **glp); 194 int create, struct gfs2_glock **glp);
195void gfs2_glock_hold(struct gfs2_glock *gl);
196void gfs2_glock_put_nolock(struct gfs2_glock *gl);
194int gfs2_glock_put(struct gfs2_glock *gl); 197int gfs2_glock_put(struct gfs2_glock *gl);
195void gfs2_holder_init(struct gfs2_glock *gl, unsigned int state, unsigned flags, 198void gfs2_holder_init(struct gfs2_glock *gl, unsigned int state, unsigned flags,
196 struct gfs2_holder *gh); 199 struct gfs2_holder *gh);
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index d5e4ab155ca..6985eef06c3 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -323,6 +323,7 @@ static void trans_go_sync(struct gfs2_glock *gl)
323 323
324 if (gl->gl_state != LM_ST_UNLOCKED && 324 if (gl->gl_state != LM_ST_UNLOCKED &&
325 test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)) { 325 test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)) {
326 flush_workqueue(gfs2_delete_workqueue);
326 gfs2_meta_syncfs(sdp); 327 gfs2_meta_syncfs(sdp);
327 gfs2_log_shutdown(sdp); 328 gfs2_log_shutdown(sdp);
328 } 329 }
@@ -372,6 +373,25 @@ static int trans_go_demote_ok(const struct gfs2_glock *gl)
372 return 0; 373 return 0;
373} 374}
374 375
376/**
377 * iopen_go_callback - schedule the dcache entry for the inode to be deleted
378 * @gl: the glock
379 *
380 * gl_spin lock is held while calling this
381 */
382static void iopen_go_callback(struct gfs2_glock *gl)
383{
384 struct gfs2_inode *ip = (struct gfs2_inode *)gl->gl_object;
385
386 if (gl->gl_demote_state == LM_ST_UNLOCKED &&
387 gl->gl_state == LM_ST_SHARED &&
388 ip && test_bit(GIF_USER, &ip->i_flags)) {
389 gfs2_glock_hold(gl);
390 if (queue_work(gfs2_delete_workqueue, &gl->gl_delete) == 0)
391 gfs2_glock_put_nolock(gl);
392 }
393}
394
375const struct gfs2_glock_operations gfs2_meta_glops = { 395const struct gfs2_glock_operations gfs2_meta_glops = {
376 .go_type = LM_TYPE_META, 396 .go_type = LM_TYPE_META,
377}; 397};
@@ -406,6 +426,7 @@ const struct gfs2_glock_operations gfs2_trans_glops = {
406 426
407const struct gfs2_glock_operations gfs2_iopen_glops = { 427const struct gfs2_glock_operations gfs2_iopen_glops = {
408 .go_type = LM_TYPE_IOPEN, 428 .go_type = LM_TYPE_IOPEN,
429 .go_callback = iopen_go_callback,
409}; 430};
410 431
411const struct gfs2_glock_operations gfs2_flock_glops = { 432const struct gfs2_glock_operations gfs2_flock_glops = {
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 225347fbff3..61801ada36f 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -159,6 +159,7 @@ struct gfs2_glock_operations {
159 int (*go_lock) (struct gfs2_holder *gh); 159 int (*go_lock) (struct gfs2_holder *gh);
160 void (*go_unlock) (struct gfs2_holder *gh); 160 void (*go_unlock) (struct gfs2_holder *gh);
161 int (*go_dump)(struct seq_file *seq, const struct gfs2_glock *gl); 161 int (*go_dump)(struct seq_file *seq, const struct gfs2_glock *gl);
162 void (*go_callback) (struct gfs2_glock *gl);
162 const int go_type; 163 const int go_type;
163 const unsigned long go_min_hold_time; 164 const unsigned long go_min_hold_time;
164}; 165};
@@ -228,6 +229,7 @@ struct gfs2_glock {
228 struct list_head gl_ail_list; 229 struct list_head gl_ail_list;
229 atomic_t gl_ail_count; 230 atomic_t gl_ail_count;
230 struct delayed_work gl_work; 231 struct delayed_work gl_work;
232 struct work_struct gl_delete;
231}; 233};
232 234
233#define GFS2_MIN_LVB_SIZE 32 /* Min size of LVB that gfs2 supports */ 235#define GFS2_MIN_LVB_SIZE 32 /* Min size of LVB that gfs2 supports */
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index daa4ae341a2..fba795798d3 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -285,27 +285,19 @@ void gfs2_rgrp_verify(struct gfs2_rgrpd *rgd)
285 } 285 }
286 286
287 tmp = rgd->rd_data - rgd->rd_free - rgd->rd_dinodes; 287 tmp = rgd->rd_data - rgd->rd_free - rgd->rd_dinodes;
288 if (count[1] + count[2] != tmp) { 288 if (count[1] != tmp) {
289 if (gfs2_consist_rgrpd(rgd)) 289 if (gfs2_consist_rgrpd(rgd))
290 fs_err(sdp, "used data mismatch: %u != %u\n", 290 fs_err(sdp, "used data mismatch: %u != %u\n",
291 count[1], tmp); 291 count[1], tmp);
292 return; 292 return;
293 } 293 }
294 294
295 if (count[3] != rgd->rd_dinodes) { 295 if (count[2] + count[3] != rgd->rd_dinodes) {
296 if (gfs2_consist_rgrpd(rgd)) 296 if (gfs2_consist_rgrpd(rgd))
297 fs_err(sdp, "used metadata mismatch: %u != %u\n", 297 fs_err(sdp, "used metadata mismatch: %u != %u\n",
298 count[3], rgd->rd_dinodes); 298 count[2] + count[3], rgd->rd_dinodes);
299 return; 299 return;
300 } 300 }
301
302 if (count[2] > count[3]) {
303 if (gfs2_consist_rgrpd(rgd))
304 fs_err(sdp, "unlinked inodes > inodes: %u\n",
305 count[2]);
306 return;
307 }
308
309} 301}
310 302
311static inline int rgrp_contains_block(struct gfs2_rgrpd *rgd, u64 block) 303static inline int rgrp_contains_block(struct gfs2_rgrpd *rgd, u64 block)
@@ -961,7 +953,8 @@ static int try_rgrp_fit(struct gfs2_rgrpd *rgd, struct gfs2_alloc *al)
961 * Returns: The inode, if one has been found 953 * Returns: The inode, if one has been found
962 */ 954 */
963 955
964static struct inode *try_rgrp_unlink(struct gfs2_rgrpd *rgd, u64 *last_unlinked) 956static struct inode *try_rgrp_unlink(struct gfs2_rgrpd *rgd, u64 *last_unlinked,
957 u64 skip)
965{ 958{
966 struct inode *inode; 959 struct inode *inode;
967 u32 goal = 0, block; 960 u32 goal = 0, block;
@@ -985,6 +978,8 @@ static struct inode *try_rgrp_unlink(struct gfs2_rgrpd *rgd, u64 *last_unlinked)
985 goal++; 978 goal++;
986 if (*last_unlinked != NO_BLOCK && no_addr <= *last_unlinked) 979 if (*last_unlinked != NO_BLOCK && no_addr <= *last_unlinked)
987 continue; 980 continue;
981 if (no_addr == skip)
982 continue;
988 *last_unlinked = no_addr; 983 *last_unlinked = no_addr;
989 inode = gfs2_inode_lookup(rgd->rd_sbd->sd_vfs, DT_UNKNOWN, 984 inode = gfs2_inode_lookup(rgd->rd_sbd->sd_vfs, DT_UNKNOWN,
990 no_addr, -1, 1); 985 no_addr, -1, 1);
@@ -1104,7 +1099,7 @@ static struct inode *get_local_rgrp(struct gfs2_inode *ip, u64 *last_unlinked)
1104 if (try_rgrp_fit(rgd, al)) 1099 if (try_rgrp_fit(rgd, al))
1105 goto out; 1100 goto out;
1106 if (rgd->rd_flags & GFS2_RDF_CHECK) 1101 if (rgd->rd_flags & GFS2_RDF_CHECK)
1107 inode = try_rgrp_unlink(rgd, last_unlinked); 1102 inode = try_rgrp_unlink(rgd, last_unlinked, ip->i_no_addr);
1108 if (!rg_locked) 1103 if (!rg_locked)
1109 gfs2_glock_dq_uninit(&al->al_rgd_gh); 1104 gfs2_glock_dq_uninit(&al->al_rgd_gh);
1110 if (inode) 1105 if (inode)
@@ -1138,7 +1133,7 @@ static struct inode *get_local_rgrp(struct gfs2_inode *ip, u64 *last_unlinked)
1138 if (try_rgrp_fit(rgd, al)) 1133 if (try_rgrp_fit(rgd, al))
1139 goto out; 1134 goto out;
1140 if (rgd->rd_flags & GFS2_RDF_CHECK) 1135 if (rgd->rd_flags & GFS2_RDF_CHECK)
1141 inode = try_rgrp_unlink(rgd, last_unlinked); 1136 inode = try_rgrp_unlink(rgd, last_unlinked, ip->i_no_addr);
1142 if (!rg_locked) 1137 if (!rg_locked)
1143 gfs2_glock_dq_uninit(&al->al_rgd_gh); 1138 gfs2_glock_dq_uninit(&al->al_rgd_gh);
1144 if (inode) 1139 if (inode)
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 0a680133647..f522bb01797 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -353,7 +353,7 @@ fail:
353 return error; 353 return error;
354} 354}
355 355
356static void gfs2_statfs_change_in(struct gfs2_statfs_change_host *sc, const void *buf) 356void gfs2_statfs_change_in(struct gfs2_statfs_change_host *sc, const void *buf)
357{ 357{
358 const struct gfs2_statfs_change *str = buf; 358 const struct gfs2_statfs_change *str = buf;
359 359
@@ -441,6 +441,29 @@ void gfs2_statfs_change(struct gfs2_sbd *sdp, s64 total, s64 free,
441 brelse(l_bh); 441 brelse(l_bh);
442} 442}
443 443
444void update_statfs(struct gfs2_sbd *sdp, struct buffer_head *m_bh,
445 struct buffer_head *l_bh)
446{
447 struct gfs2_inode *m_ip = GFS2_I(sdp->sd_statfs_inode);
448 struct gfs2_inode *l_ip = GFS2_I(sdp->sd_sc_inode);
449 struct gfs2_statfs_change_host *m_sc = &sdp->sd_statfs_master;
450 struct gfs2_statfs_change_host *l_sc = &sdp->sd_statfs_local;
451
452 gfs2_trans_add_bh(l_ip->i_gl, l_bh, 1);
453
454 spin_lock(&sdp->sd_statfs_spin);
455 m_sc->sc_total += l_sc->sc_total;
456 m_sc->sc_free += l_sc->sc_free;
457 m_sc->sc_dinodes += l_sc->sc_dinodes;
458 memset(l_sc, 0, sizeof(struct gfs2_statfs_change));
459 memset(l_bh->b_data + sizeof(struct gfs2_dinode),
460 0, sizeof(struct gfs2_statfs_change));
461 spin_unlock(&sdp->sd_statfs_spin);
462
463 gfs2_trans_add_bh(m_ip->i_gl, m_bh, 1);
464 gfs2_statfs_change_out(m_sc, m_bh->b_data + sizeof(struct gfs2_dinode));
465}
466
444int gfs2_statfs_sync(struct gfs2_sbd *sdp) 467int gfs2_statfs_sync(struct gfs2_sbd *sdp)
445{ 468{
446 struct gfs2_inode *m_ip = GFS2_I(sdp->sd_statfs_inode); 469 struct gfs2_inode *m_ip = GFS2_I(sdp->sd_statfs_inode);
@@ -477,19 +500,7 @@ int gfs2_statfs_sync(struct gfs2_sbd *sdp)
477 if (error) 500 if (error)
478 goto out_bh2; 501 goto out_bh2;
479 502
480 gfs2_trans_add_bh(l_ip->i_gl, l_bh, 1); 503 update_statfs(sdp, m_bh, l_bh);
481
482 spin_lock(&sdp->sd_statfs_spin);
483 m_sc->sc_total += l_sc->sc_total;
484 m_sc->sc_free += l_sc->sc_free;
485 m_sc->sc_dinodes += l_sc->sc_dinodes;
486 memset(l_sc, 0, sizeof(struct gfs2_statfs_change));
487 memset(l_bh->b_data + sizeof(struct gfs2_dinode),
488 0, sizeof(struct gfs2_statfs_change));
489 spin_unlock(&sdp->sd_statfs_spin);
490
491 gfs2_trans_add_bh(m_ip->i_gl, m_bh, 1);
492 gfs2_statfs_change_out(m_sc, m_bh->b_data + sizeof(struct gfs2_dinode));
493 504
494 gfs2_trans_end(sdp); 505 gfs2_trans_end(sdp);
495 506
@@ -680,6 +691,7 @@ static int gfs2_make_fs_ro(struct gfs2_sbd *sdp)
680 struct gfs2_holder t_gh; 691 struct gfs2_holder t_gh;
681 int error; 692 int error;
682 693
694 flush_workqueue(gfs2_delete_workqueue);
683 gfs2_quota_sync(sdp); 695 gfs2_quota_sync(sdp);
684 gfs2_statfs_sync(sdp); 696 gfs2_statfs_sync(sdp);
685 697
diff --git a/fs/gfs2/super.h b/fs/gfs2/super.h
index b56413e3e40..22e0417ed99 100644
--- a/fs/gfs2/super.h
+++ b/fs/gfs2/super.h
@@ -40,6 +40,10 @@ extern int gfs2_make_fs_rw(struct gfs2_sbd *sdp);
40extern int gfs2_statfs_init(struct gfs2_sbd *sdp); 40extern int gfs2_statfs_init(struct gfs2_sbd *sdp);
41extern void gfs2_statfs_change(struct gfs2_sbd *sdp, s64 total, s64 free, 41extern void gfs2_statfs_change(struct gfs2_sbd *sdp, s64 total, s64 free,
42 s64 dinodes); 42 s64 dinodes);
43extern void gfs2_statfs_change_in(struct gfs2_statfs_change_host *sc,
44 const void *buf);
45extern void update_statfs(struct gfs2_sbd *sdp, struct buffer_head *m_bh,
46 struct buffer_head *l_bh);
43extern int gfs2_statfs_sync(struct gfs2_sbd *sdp); 47extern int gfs2_statfs_sync(struct gfs2_sbd *sdp);
44 48
45extern int gfs2_freeze_fs(struct gfs2_sbd *sdp); 49extern int gfs2_freeze_fs(struct gfs2_sbd *sdp);
diff --git a/fs/inode.c b/fs/inode.c
index 901bad1e5f1..ae7b67e4866 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -120,12 +120,11 @@ static void wake_up_inode(struct inode *inode)
120 * These are initializations that need to be done on every inode 120 * These are initializations that need to be done on every inode
121 * allocation as the fields are not initialised by slab allocation. 121 * allocation as the fields are not initialised by slab allocation.
122 */ 122 */
123struct inode *inode_init_always(struct super_block *sb, struct inode *inode) 123int inode_init_always(struct super_block *sb, struct inode *inode)
124{ 124{
125 static const struct address_space_operations empty_aops; 125 static const struct address_space_operations empty_aops;
126 static struct inode_operations empty_iops; 126 static struct inode_operations empty_iops;
127 static const struct file_operations empty_fops; 127 static const struct file_operations empty_fops;
128
129 struct address_space *const mapping = &inode->i_data; 128 struct address_space *const mapping = &inode->i_data;
130 129
131 inode->i_sb = sb; 130 inode->i_sb = sb;
@@ -152,7 +151,7 @@ struct inode *inode_init_always(struct super_block *sb, struct inode *inode)
152 inode->dirtied_when = 0; 151 inode->dirtied_when = 0;
153 152
154 if (security_inode_alloc(inode)) 153 if (security_inode_alloc(inode))
155 goto out_free_inode; 154 goto out;
156 155
157 /* allocate and initialize an i_integrity */ 156 /* allocate and initialize an i_integrity */
158 if (ima_inode_alloc(inode)) 157 if (ima_inode_alloc(inode))
@@ -198,16 +197,12 @@ struct inode *inode_init_always(struct super_block *sb, struct inode *inode)
198 inode->i_fsnotify_mask = 0; 197 inode->i_fsnotify_mask = 0;
199#endif 198#endif
200 199
201 return inode; 200 return 0;
202 201
203out_free_security: 202out_free_security:
204 security_inode_free(inode); 203 security_inode_free(inode);
205out_free_inode: 204out:
206 if (inode->i_sb->s_op->destroy_inode) 205 return -ENOMEM;
207 inode->i_sb->s_op->destroy_inode(inode);
208 else
209 kmem_cache_free(inode_cachep, (inode));
210 return NULL;
211} 206}
212EXPORT_SYMBOL(inode_init_always); 207EXPORT_SYMBOL(inode_init_always);
213 208
@@ -220,12 +215,21 @@ static struct inode *alloc_inode(struct super_block *sb)
220 else 215 else
221 inode = kmem_cache_alloc(inode_cachep, GFP_KERNEL); 216 inode = kmem_cache_alloc(inode_cachep, GFP_KERNEL);
222 217
223 if (inode) 218 if (!inode)
224 return inode_init_always(sb, inode); 219 return NULL;
225 return NULL; 220
221 if (unlikely(inode_init_always(sb, inode))) {
222 if (inode->i_sb->s_op->destroy_inode)
223 inode->i_sb->s_op->destroy_inode(inode);
224 else
225 kmem_cache_free(inode_cachep, inode);
226 return NULL;
227 }
228
229 return inode;
226} 230}
227 231
228void destroy_inode(struct inode *inode) 232void __destroy_inode(struct inode *inode)
229{ 233{
230 BUG_ON(inode_has_buffers(inode)); 234 BUG_ON(inode_has_buffers(inode));
231 ima_inode_free(inode); 235 ima_inode_free(inode);
@@ -237,13 +241,17 @@ void destroy_inode(struct inode *inode)
237 if (inode->i_default_acl && inode->i_default_acl != ACL_NOT_CACHED) 241 if (inode->i_default_acl && inode->i_default_acl != ACL_NOT_CACHED)
238 posix_acl_release(inode->i_default_acl); 242 posix_acl_release(inode->i_default_acl);
239#endif 243#endif
244}
245EXPORT_SYMBOL(__destroy_inode);
246
247void destroy_inode(struct inode *inode)
248{
249 __destroy_inode(inode);
240 if (inode->i_sb->s_op->destroy_inode) 250 if (inode->i_sb->s_op->destroy_inode)
241 inode->i_sb->s_op->destroy_inode(inode); 251 inode->i_sb->s_op->destroy_inode(inode);
242 else 252 else
243 kmem_cache_free(inode_cachep, (inode)); 253 kmem_cache_free(inode_cachep, (inode));
244} 254}
245EXPORT_SYMBOL(destroy_inode);
246
247 255
248/* 256/*
249 * These are initializations that only need to be done 257 * These are initializations that only need to be done
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
index 737f7246a4b..f96f85092d1 100644
--- a/fs/jbd/journal.c
+++ b/fs/jbd/journal.c
@@ -287,6 +287,7 @@ int journal_write_metadata_buffer(transaction_t *transaction,
287 struct page *new_page; 287 struct page *new_page;
288 unsigned int new_offset; 288 unsigned int new_offset;
289 struct buffer_head *bh_in = jh2bh(jh_in); 289 struct buffer_head *bh_in = jh2bh(jh_in);
290 journal_t *journal = transaction->t_journal;
290 291
291 /* 292 /*
292 * The buffer really shouldn't be locked: only the current committing 293 * The buffer really shouldn't be locked: only the current committing
@@ -300,6 +301,11 @@ int journal_write_metadata_buffer(transaction_t *transaction,
300 J_ASSERT_BH(bh_in, buffer_jbddirty(bh_in)); 301 J_ASSERT_BH(bh_in, buffer_jbddirty(bh_in));
301 302
302 new_bh = alloc_buffer_head(GFP_NOFS|__GFP_NOFAIL); 303 new_bh = alloc_buffer_head(GFP_NOFS|__GFP_NOFAIL);
304 /* keep subsequent assertions sane */
305 new_bh->b_state = 0;
306 init_buffer(new_bh, NULL, NULL);
307 atomic_set(&new_bh->b_count, 1);
308 new_jh = journal_add_journal_head(new_bh); /* This sleeps */
303 309
304 /* 310 /*
305 * If a new transaction has already done a buffer copy-out, then 311 * If a new transaction has already done a buffer copy-out, then
@@ -361,14 +367,6 @@ repeat:
361 kunmap_atomic(mapped_data, KM_USER0); 367 kunmap_atomic(mapped_data, KM_USER0);
362 } 368 }
363 369
364 /* keep subsequent assertions sane */
365 new_bh->b_state = 0;
366 init_buffer(new_bh, NULL, NULL);
367 atomic_set(&new_bh->b_count, 1);
368 jbd_unlock_bh_state(bh_in);
369
370 new_jh = journal_add_journal_head(new_bh); /* This sleeps */
371
372 set_bh_page(new_bh, new_page, new_offset); 370 set_bh_page(new_bh, new_page, new_offset);
373 new_jh->b_transaction = NULL; 371 new_jh->b_transaction = NULL;
374 new_bh->b_size = jh2bh(jh_in)->b_size; 372 new_bh->b_size = jh2bh(jh_in)->b_size;
@@ -385,7 +383,11 @@ repeat:
385 * copying is moved to the transaction's shadow queue. 383 * copying is moved to the transaction's shadow queue.
386 */ 384 */
387 JBUFFER_TRACE(jh_in, "file as BJ_Shadow"); 385 JBUFFER_TRACE(jh_in, "file as BJ_Shadow");
388 journal_file_buffer(jh_in, transaction, BJ_Shadow); 386 spin_lock(&journal->j_list_lock);
387 __journal_file_buffer(jh_in, transaction, BJ_Shadow);
388 spin_unlock(&journal->j_list_lock);
389 jbd_unlock_bh_state(bh_in);
390
389 JBUFFER_TRACE(new_jh, "file as BJ_IO"); 391 JBUFFER_TRACE(new_jh, "file as BJ_IO");
390 journal_file_buffer(new_jh, transaction, BJ_IO); 392 journal_file_buffer(new_jh, transaction, BJ_IO);
391 393
@@ -848,6 +850,12 @@ static int journal_reset(journal_t *journal)
848 850
849 first = be32_to_cpu(sb->s_first); 851 first = be32_to_cpu(sb->s_first);
850 last = be32_to_cpu(sb->s_maxlen); 852 last = be32_to_cpu(sb->s_maxlen);
853 if (first + JFS_MIN_JOURNAL_BLOCKS > last + 1) {
854 printk(KERN_ERR "JBD: Journal too short (blocks %lu-%lu).\n",
855 first, last);
856 journal_fail_superblock(journal);
857 return -EINVAL;
858 }
851 859
852 journal->j_first = first; 860 journal->j_first = first;
853 journal->j_last = last; 861 journal->j_last = last;
diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
index 73242ba7c7b..c03ac11f74b 100644
--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -489,34 +489,15 @@ void journal_unlock_updates (journal_t *journal)
489 wake_up(&journal->j_wait_transaction_locked); 489 wake_up(&journal->j_wait_transaction_locked);
490} 490}
491 491
492/* 492static void warn_dirty_buffer(struct buffer_head *bh)
493 * Report any unexpected dirty buffers which turn up. Normally those
494 * indicate an error, but they can occur if the user is running (say)
495 * tune2fs to modify the live filesystem, so we need the option of
496 * continuing as gracefully as possible. #
497 *
498 * The caller should already hold the journal lock and
499 * j_list_lock spinlock: most callers will need those anyway
500 * in order to probe the buffer's journaling state safely.
501 */
502static void jbd_unexpected_dirty_buffer(struct journal_head *jh)
503{ 493{
504 int jlist; 494 char b[BDEVNAME_SIZE];
505
506 /* If this buffer is one which might reasonably be dirty
507 * --- ie. data, or not part of this journal --- then
508 * we're OK to leave it alone, but otherwise we need to
509 * move the dirty bit to the journal's own internal
510 * JBDDirty bit. */
511 jlist = jh->b_jlist;
512 495
513 if (jlist == BJ_Metadata || jlist == BJ_Reserved || 496 printk(KERN_WARNING
514 jlist == BJ_Shadow || jlist == BJ_Forget) { 497 "JBD: Spotted dirty metadata buffer (dev = %s, blocknr = %llu). "
515 struct buffer_head *bh = jh2bh(jh); 498 "There's a risk of filesystem corruption in case of system "
516 499 "crash.\n",
517 if (test_clear_buffer_dirty(bh)) 500 bdevname(bh->b_bdev, b), (unsigned long long)bh->b_blocknr);
518 set_buffer_jbddirty(bh);
519 }
520} 501}
521 502
522/* 503/*
@@ -583,14 +564,16 @@ repeat:
583 if (jh->b_next_transaction) 564 if (jh->b_next_transaction)
584 J_ASSERT_JH(jh, jh->b_next_transaction == 565 J_ASSERT_JH(jh, jh->b_next_transaction ==
585 transaction); 566 transaction);
567 warn_dirty_buffer(bh);
586 } 568 }
587 /* 569 /*
588 * In any case we need to clean the dirty flag and we must 570 * In any case we need to clean the dirty flag and we must
589 * do it under the buffer lock to be sure we don't race 571 * do it under the buffer lock to be sure we don't race
590 * with running write-out. 572 * with running write-out.
591 */ 573 */
592 JBUFFER_TRACE(jh, "Unexpected dirty buffer"); 574 JBUFFER_TRACE(jh, "Journalling dirty buffer");
593 jbd_unexpected_dirty_buffer(jh); 575 clear_buffer_dirty(bh);
576 set_buffer_jbddirty(bh);
594 } 577 }
595 578
596 unlock_buffer(bh); 579 unlock_buffer(bh);
@@ -826,6 +809,15 @@ int journal_get_create_access(handle_t *handle, struct buffer_head *bh)
826 J_ASSERT_JH(jh, buffer_locked(jh2bh(jh))); 809 J_ASSERT_JH(jh, buffer_locked(jh2bh(jh)));
827 810
828 if (jh->b_transaction == NULL) { 811 if (jh->b_transaction == NULL) {
812 /*
813 * Previous journal_forget() could have left the buffer
814 * with jbddirty bit set because it was being committed. When
815 * the commit finished, we've filed the buffer for
816 * checkpointing and marked it dirty. Now we are reallocating
817 * the buffer so the transaction freeing it must have
818 * committed and so it's safe to clear the dirty bit.
819 */
820 clear_buffer_dirty(jh2bh(jh));
829 jh->b_transaction = transaction; 821 jh->b_transaction = transaction;
830 822
831 /* first access by this transaction */ 823 /* first access by this transaction */
@@ -1782,8 +1774,13 @@ static int __dispose_buffer(struct journal_head *jh, transaction_t *transaction)
1782 1774
1783 if (jh->b_cp_transaction) { 1775 if (jh->b_cp_transaction) {
1784 JBUFFER_TRACE(jh, "on running+cp transaction"); 1776 JBUFFER_TRACE(jh, "on running+cp transaction");
1777 /*
1778 * We don't want to write the buffer anymore, clear the
1779 * bit so that we don't confuse checks in
1780 * __journal_file_buffer
1781 */
1782 clear_buffer_dirty(bh);
1785 __journal_file_buffer(jh, transaction, BJ_Forget); 1783 __journal_file_buffer(jh, transaction, BJ_Forget);
1786 clear_buffer_jbddirty(bh);
1787 may_free = 0; 1784 may_free = 0;
1788 } else { 1785 } else {
1789 JBUFFER_TRACE(jh, "on running transaction"); 1786 JBUFFER_TRACE(jh, "on running transaction");
@@ -2041,12 +2038,17 @@ void __journal_file_buffer(struct journal_head *jh,
2041 if (jh->b_transaction && jh->b_jlist == jlist) 2038 if (jh->b_transaction && jh->b_jlist == jlist)
2042 return; 2039 return;
2043 2040
2044 /* The following list of buffer states needs to be consistent
2045 * with __jbd_unexpected_dirty_buffer()'s handling of dirty
2046 * state. */
2047
2048 if (jlist == BJ_Metadata || jlist == BJ_Reserved || 2041 if (jlist == BJ_Metadata || jlist == BJ_Reserved ||
2049 jlist == BJ_Shadow || jlist == BJ_Forget) { 2042 jlist == BJ_Shadow || jlist == BJ_Forget) {
2043 /*
2044 * For metadata buffers, we track dirty bit in buffer_jbddirty
2045 * instead of buffer_dirty. We should not see a dirty bit set
2046 * here because we clear it in do_get_write_access but e.g.
2047 * tune2fs can modify the sb and set the dirty bit at any time
2048 * so we try to gracefully handle that.
2049 */
2050 if (buffer_dirty(bh))
2051 warn_dirty_buffer(bh);
2050 if (test_clear_buffer_dirty(bh) || 2052 if (test_clear_buffer_dirty(bh) ||
2051 test_clear_buffer_jbddirty(bh)) 2053 test_clear_buffer_jbddirty(bh))
2052 was_dirty = 1; 2054 was_dirty = 1;
diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c
index 5edc2bf2058..23c94753986 100644
--- a/fs/jffs2/file.c
+++ b/fs/jffs2/file.c
@@ -99,7 +99,7 @@ static int jffs2_do_readpage_nolock (struct inode *inode, struct page *pg)
99 kunmap(pg); 99 kunmap(pg);
100 100
101 D2(printk(KERN_DEBUG "readpage finished\n")); 101 D2(printk(KERN_DEBUG "readpage finished\n"));
102 return 0; 102 return ret;
103} 103}
104 104
105int jffs2_do_readpage_unlock(struct inode *inode, struct page *pg) 105int jffs2_do_readpage_unlock(struct inode *inode, struct page *pg)
diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c
index 91fa3ad6e8c..a29c7c3e3fb 100644
--- a/fs/jfs/acl.c
+++ b/fs/jfs/acl.c
@@ -67,10 +67,8 @@ static struct posix_acl *jfs_get_acl(struct inode *inode, int type)
67 acl = posix_acl_from_xattr(value, size); 67 acl = posix_acl_from_xattr(value, size);
68 } 68 }
69 kfree(value); 69 kfree(value);
70 if (!IS_ERR(acl)) { 70 if (!IS_ERR(acl))
71 set_cached_acl(inode, type, acl); 71 set_cached_acl(inode, type, acl);
72 posix_acl_release(acl);
73 }
74 return acl; 72 return acl;
75} 73}
76 74
diff --git a/fs/namespace.c b/fs/namespace.c
index 277c28a63ea..7230787d18b 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -316,7 +316,8 @@ EXPORT_SYMBOL_GPL(mnt_clone_write);
316 */ 316 */
317int mnt_want_write_file(struct file *file) 317int mnt_want_write_file(struct file *file)
318{ 318{
319 if (!(file->f_mode & FMODE_WRITE)) 319 struct inode *inode = file->f_dentry->d_inode;
320 if (!(file->f_mode & FMODE_WRITE) || special_file(inode->i_mode))
320 return mnt_want_write(file->f_path.mnt); 321 return mnt_want_write(file->f_path.mnt);
321 else 322 else
322 return mnt_clone_write(file->f_path.mnt); 323 return mnt_clone_write(file->f_path.mnt);
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index c2d061675d8..8d25ccb2d51 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1242,20 +1242,6 @@ error:
1242 return error; 1242 return error;
1243} 1243}
1244 1244
1245/*
1246 * Initialize a session.
1247 * Note: save the mount rsize and wsize for create_server negotiation.
1248 */
1249static void nfs4_init_session(struct nfs_client *clp,
1250 unsigned int wsize, unsigned int rsize)
1251{
1252#if defined(CONFIG_NFS_V4_1)
1253 if (nfs4_has_session(clp)) {
1254 clp->cl_session->fc_attrs.max_rqst_sz = wsize;
1255 clp->cl_session->fc_attrs.max_resp_sz = rsize;
1256 }
1257#endif /* CONFIG_NFS_V4_1 */
1258}
1259 1245
1260/* 1246/*
1261 * Session has been established, and the client marked ready. 1247 * Session has been established, and the client marked ready.
@@ -1350,7 +1336,9 @@ struct nfs_server *nfs4_create_server(const struct nfs_parsed_mount_data *data,
1350 BUG_ON(!server->nfs_client->rpc_ops); 1336 BUG_ON(!server->nfs_client->rpc_ops);
1351 BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops); 1337 BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops);
1352 1338
1353 nfs4_init_session(server->nfs_client, server->wsize, server->rsize); 1339 error = nfs4_init_session(server);
1340 if (error < 0)
1341 goto error;
1354 1342
1355 /* Probe the root fh to retrieve its FSID */ 1343 /* Probe the root fh to retrieve its FSID */
1356 error = nfs4_path_walk(server, mntfh, data->nfs_server.export_path); 1344 error = nfs4_path_walk(server, mntfh, data->nfs_server.export_path);
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 38d42c29fb9..32062c33c85 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1025,12 +1025,12 @@ static struct dentry *nfs_atomic_lookup(struct inode *dir, struct dentry *dentry
1025 res = NULL; 1025 res = NULL;
1026 goto out; 1026 goto out;
1027 /* This turned out not to be a regular file */ 1027 /* This turned out not to be a regular file */
1028 case -EISDIR:
1029 case -ENOTDIR: 1028 case -ENOTDIR:
1030 goto no_open; 1029 goto no_open;
1031 case -ELOOP: 1030 case -ELOOP:
1032 if (!(nd->intent.open.flags & O_NOFOLLOW)) 1031 if (!(nd->intent.open.flags & O_NOFOLLOW))
1033 goto no_open; 1032 goto no_open;
1033 /* case -EISDIR: */
1034 /* case -EINVAL: */ 1034 /* case -EINVAL: */
1035 default: 1035 default:
1036 goto out; 1036 goto out;
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 489fc01a320..e4e089a8f29 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -255,7 +255,7 @@ static void nfs_direct_read_release(void *calldata)
255 255
256 if (put_dreq(dreq)) 256 if (put_dreq(dreq))
257 nfs_direct_complete(dreq); 257 nfs_direct_complete(dreq);
258 nfs_readdata_release(calldata); 258 nfs_readdata_free(data);
259} 259}
260 260
261static const struct rpc_call_ops nfs_read_direct_ops = { 261static const struct rpc_call_ops nfs_read_direct_ops = {
@@ -314,14 +314,14 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_direct_req *dreq,
314 data->npages, 1, 0, data->pagevec, NULL); 314 data->npages, 1, 0, data->pagevec, NULL);
315 up_read(&current->mm->mmap_sem); 315 up_read(&current->mm->mmap_sem);
316 if (result < 0) { 316 if (result < 0) {
317 nfs_readdata_release(data); 317 nfs_readdata_free(data);
318 break; 318 break;
319 } 319 }
320 if ((unsigned)result < data->npages) { 320 if ((unsigned)result < data->npages) {
321 bytes = result * PAGE_SIZE; 321 bytes = result * PAGE_SIZE;
322 if (bytes <= pgbase) { 322 if (bytes <= pgbase) {
323 nfs_direct_release_pages(data->pagevec, result); 323 nfs_direct_release_pages(data->pagevec, result);
324 nfs_readdata_release(data); 324 nfs_readdata_free(data);
325 break; 325 break;
326 } 326 }
327 bytes -= pgbase; 327 bytes -= pgbase;
@@ -334,7 +334,7 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_direct_req *dreq,
334 data->inode = inode; 334 data->inode = inode;
335 data->cred = msg.rpc_cred; 335 data->cred = msg.rpc_cred;
336 data->args.fh = NFS_FH(inode); 336 data->args.fh = NFS_FH(inode);
337 data->args.context = get_nfs_open_context(ctx); 337 data->args.context = ctx;
338 data->args.offset = pos; 338 data->args.offset = pos;
339 data->args.pgbase = pgbase; 339 data->args.pgbase = pgbase;
340 data->args.pages = data->pagevec; 340 data->args.pages = data->pagevec;
@@ -441,7 +441,7 @@ static void nfs_direct_free_writedata(struct nfs_direct_req *dreq)
441 struct nfs_write_data *data = list_entry(dreq->rewrite_list.next, struct nfs_write_data, pages); 441 struct nfs_write_data *data = list_entry(dreq->rewrite_list.next, struct nfs_write_data, pages);
442 list_del(&data->pages); 442 list_del(&data->pages);
443 nfs_direct_release_pages(data->pagevec, data->npages); 443 nfs_direct_release_pages(data->pagevec, data->npages);
444 nfs_writedata_release(data); 444 nfs_writedata_free(data);
445 } 445 }
446} 446}
447 447
@@ -534,7 +534,7 @@ static void nfs_direct_commit_release(void *calldata)
534 534
535 dprintk("NFS: %5u commit returned %d\n", data->task.tk_pid, status); 535 dprintk("NFS: %5u commit returned %d\n", data->task.tk_pid, status);
536 nfs_direct_write_complete(dreq, data->inode); 536 nfs_direct_write_complete(dreq, data->inode);
537 nfs_commitdata_release(calldata); 537 nfs_commit_free(data);
538} 538}
539 539
540static const struct rpc_call_ops nfs_commit_direct_ops = { 540static const struct rpc_call_ops nfs_commit_direct_ops = {
@@ -570,7 +570,7 @@ static void nfs_direct_commit_schedule(struct nfs_direct_req *dreq)
570 data->args.fh = NFS_FH(data->inode); 570 data->args.fh = NFS_FH(data->inode);
571 data->args.offset = 0; 571 data->args.offset = 0;
572 data->args.count = 0; 572 data->args.count = 0;
573 data->args.context = get_nfs_open_context(dreq->ctx); 573 data->args.context = dreq->ctx;
574 data->res.count = 0; 574 data->res.count = 0;
575 data->res.fattr = &data->fattr; 575 data->res.fattr = &data->fattr;
576 data->res.verf = &data->verf; 576 data->res.verf = &data->verf;
@@ -734,14 +734,14 @@ static ssize_t nfs_direct_write_schedule_segment(struct nfs_direct_req *dreq,
734 data->npages, 0, 0, data->pagevec, NULL); 734 data->npages, 0, 0, data->pagevec, NULL);
735 up_read(&current->mm->mmap_sem); 735 up_read(&current->mm->mmap_sem);
736 if (result < 0) { 736 if (result < 0) {
737 nfs_writedata_release(data); 737 nfs_writedata_free(data);
738 break; 738 break;
739 } 739 }
740 if ((unsigned)result < data->npages) { 740 if ((unsigned)result < data->npages) {
741 bytes = result * PAGE_SIZE; 741 bytes = result * PAGE_SIZE;
742 if (bytes <= pgbase) { 742 if (bytes <= pgbase) {
743 nfs_direct_release_pages(data->pagevec, result); 743 nfs_direct_release_pages(data->pagevec, result);
744 nfs_writedata_release(data); 744 nfs_writedata_free(data);
745 break; 745 break;
746 } 746 }
747 bytes -= pgbase; 747 bytes -= pgbase;
@@ -756,7 +756,7 @@ static ssize_t nfs_direct_write_schedule_segment(struct nfs_direct_req *dreq,
756 data->inode = inode; 756 data->inode = inode;
757 data->cred = msg.rpc_cred; 757 data->cred = msg.rpc_cred;
758 data->args.fh = NFS_FH(inode); 758 data->args.fh = NFS_FH(inode);
759 data->args.context = get_nfs_open_context(ctx); 759 data->args.context = ctx;
760 data->args.offset = pos; 760 data->args.offset = pos;
761 data->args.pgbase = pgbase; 761 data->args.pgbase = pgbase;
762 data->args.pages = data->pagevec; 762 data->args.pages = data->pagevec;
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index 61bc3a32e1e..6ea07a3c75d 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -220,6 +220,7 @@ extern void nfs4_destroy_session(struct nfs4_session *session);
220extern struct nfs4_session *nfs4_alloc_session(struct nfs_client *clp); 220extern struct nfs4_session *nfs4_alloc_session(struct nfs_client *clp);
221extern int nfs4_proc_create_session(struct nfs_client *, int reset); 221extern int nfs4_proc_create_session(struct nfs_client *, int reset);
222extern int nfs4_proc_destroy_session(struct nfs4_session *); 222extern int nfs4_proc_destroy_session(struct nfs4_session *);
223extern int nfs4_init_session(struct nfs_server *server);
223#else /* CONFIG_NFS_v4_1 */ 224#else /* CONFIG_NFS_v4_1 */
224static inline int nfs4_setup_sequence(struct nfs_client *clp, 225static inline int nfs4_setup_sequence(struct nfs_client *clp,
225 struct nfs4_sequence_args *args, struct nfs4_sequence_res *res, 226 struct nfs4_sequence_args *args, struct nfs4_sequence_res *res,
@@ -227,6 +228,11 @@ static inline int nfs4_setup_sequence(struct nfs_client *clp,
227{ 228{
228 return 0; 229 return 0;
229} 230}
231
232static inline int nfs4_init_session(struct nfs_server *server)
233{
234 return 0;
235}
230#endif /* CONFIG_NFS_V4_1 */ 236#endif /* CONFIG_NFS_V4_1 */
231 237
232extern struct nfs4_state_maintenance_ops *nfs4_state_renewal_ops[]; 238extern struct nfs4_state_maintenance_ops *nfs4_state_renewal_ops[];
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index ff0c080db59..6917311f201 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2040,15 +2040,9 @@ static int _nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle,
2040 .rpc_argp = &args, 2040 .rpc_argp = &args,
2041 .rpc_resp = &res, 2041 .rpc_resp = &res,
2042 }; 2042 };
2043 int status;
2044 2043
2045 nfs_fattr_init(info->fattr); 2044 nfs_fattr_init(info->fattr);
2046 status = nfs4_recover_expired_lease(server); 2045 return nfs4_call_sync(server, &msg, &args, &res, 0);
2047 if (!status)
2048 status = nfs4_check_client_ready(server->nfs_client);
2049 if (!status)
2050 status = nfs4_call_sync(server, &msg, &args, &res, 0);
2051 return status;
2052} 2046}
2053 2047
2054static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle, 2048static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle,
@@ -4099,15 +4093,23 @@ nfs4_proc_lock(struct file *filp, int cmd, struct file_lock *request)
4099 if (request->fl_start < 0 || request->fl_end < 0) 4093 if (request->fl_start < 0 || request->fl_end < 0)
4100 return -EINVAL; 4094 return -EINVAL;
4101 4095
4102 if (IS_GETLK(cmd)) 4096 if (IS_GETLK(cmd)) {
4103 return nfs4_proc_getlk(state, F_GETLK, request); 4097 if (state != NULL)
4098 return nfs4_proc_getlk(state, F_GETLK, request);
4099 return 0;
4100 }
4104 4101
4105 if (!(IS_SETLK(cmd) || IS_SETLKW(cmd))) 4102 if (!(IS_SETLK(cmd) || IS_SETLKW(cmd)))
4106 return -EINVAL; 4103 return -EINVAL;
4107 4104
4108 if (request->fl_type == F_UNLCK) 4105 if (request->fl_type == F_UNLCK) {
4109 return nfs4_proc_unlck(state, cmd, request); 4106 if (state != NULL)
4107 return nfs4_proc_unlck(state, cmd, request);
4108 return 0;
4109 }
4110 4110
4111 if (state == NULL)
4112 return -ENOLCK;
4111 do { 4113 do {
4112 status = nfs4_proc_setlk(state, cmd, request); 4114 status = nfs4_proc_setlk(state, cmd, request);
4113 if ((status != -EAGAIN) || IS_SETLK(cmd)) 4115 if ((status != -EAGAIN) || IS_SETLK(cmd))
@@ -4793,6 +4795,22 @@ int nfs4_proc_destroy_session(struct nfs4_session *session)
4793 return status; 4795 return status;
4794} 4796}
4795 4797
4798int nfs4_init_session(struct nfs_server *server)
4799{
4800 struct nfs_client *clp = server->nfs_client;
4801 int ret;
4802
4803 if (!nfs4_has_session(clp))
4804 return 0;
4805
4806 clp->cl_session->fc_attrs.max_rqst_sz = server->wsize;
4807 clp->cl_session->fc_attrs.max_resp_sz = server->rsize;
4808 ret = nfs4_recover_expired_lease(server);
4809 if (!ret)
4810 ret = nfs4_check_client_ready(clp);
4811 return ret;
4812}
4813
4796/* 4814/*
4797 * Renew the cl_session lease. 4815 * Renew the cl_session lease.
4798 */ 4816 */
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index b73c5a72865..65ca8c18476 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -553,6 +553,7 @@ static struct nfs4_lock_state *nfs4_alloc_lock_state(struct nfs4_state *state, f
553 INIT_LIST_HEAD(&lsp->ls_sequence.list); 553 INIT_LIST_HEAD(&lsp->ls_sequence.list);
554 lsp->ls_seqid.sequence = &lsp->ls_sequence; 554 lsp->ls_seqid.sequence = &lsp->ls_sequence;
555 atomic_set(&lsp->ls_count, 1); 555 atomic_set(&lsp->ls_count, 1);
556 lsp->ls_state = state;
556 lsp->ls_owner = fl_owner; 557 lsp->ls_owner = fl_owner;
557 spin_lock(&clp->cl_lock); 558 spin_lock(&clp->cl_lock);
558 nfs_alloc_unique_id(&clp->cl_lockowner_id, &lsp->ls_id, 1, 64); 559 nfs_alloc_unique_id(&clp->cl_lockowner_id, &lsp->ls_id, 1, 64);
@@ -587,7 +588,6 @@ static struct nfs4_lock_state *nfs4_get_lock_state(struct nfs4_state *state, fl_
587 if (lsp != NULL) 588 if (lsp != NULL)
588 break; 589 break;
589 if (new != NULL) { 590 if (new != NULL) {
590 new->ls_state = state;
591 list_add(&new->ls_locks, &state->lock_states); 591 list_add(&new->ls_locks, &state->lock_states);
592 set_bit(LK_STATE_IN_USE, &state->flags); 592 set_bit(LK_STATE_IN_USE, &state->flags);
593 lsp = new; 593 lsp = new;
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index 73ea5e8d66c..12c9e66d3f1 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -60,17 +60,15 @@ struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount)
60 return p; 60 return p;
61} 61}
62 62
63static void nfs_readdata_free(struct nfs_read_data *p) 63void nfs_readdata_free(struct nfs_read_data *p)
64{ 64{
65 if (p && (p->pagevec != &p->page_array[0])) 65 if (p && (p->pagevec != &p->page_array[0]))
66 kfree(p->pagevec); 66 kfree(p->pagevec);
67 mempool_free(p, nfs_rdata_mempool); 67 mempool_free(p, nfs_rdata_mempool);
68} 68}
69 69
70void nfs_readdata_release(void *data) 70static void nfs_readdata_release(struct nfs_read_data *rdata)
71{ 71{
72 struct nfs_read_data *rdata = data;
73
74 put_nfs_open_context(rdata->args.context); 72 put_nfs_open_context(rdata->args.context);
75 nfs_readdata_free(rdata); 73 nfs_readdata_free(rdata);
76} 74}
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 0a0a2ff767c..a34fae21fe1 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -87,17 +87,15 @@ struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount)
87 return p; 87 return p;
88} 88}
89 89
90static void nfs_writedata_free(struct nfs_write_data *p) 90void nfs_writedata_free(struct nfs_write_data *p)
91{ 91{
92 if (p && (p->pagevec != &p->page_array[0])) 92 if (p && (p->pagevec != &p->page_array[0]))
93 kfree(p->pagevec); 93 kfree(p->pagevec);
94 mempool_free(p, nfs_wdata_mempool); 94 mempool_free(p, nfs_wdata_mempool);
95} 95}
96 96
97void nfs_writedata_release(void *data) 97static void nfs_writedata_release(struct nfs_write_data *wdata)
98{ 98{
99 struct nfs_write_data *wdata = data;
100
101 put_nfs_open_context(wdata->args.context); 99 put_nfs_open_context(wdata->args.context);
102 nfs_writedata_free(wdata); 100 nfs_writedata_free(wdata);
103} 101}
diff --git a/fs/nilfs2/Kconfig b/fs/nilfs2/Kconfig
new file mode 100644
index 00000000000..72da095d400
--- /dev/null
+++ b/fs/nilfs2/Kconfig
@@ -0,0 +1,25 @@
1config NILFS2_FS
2 tristate "NILFS2 file system support (EXPERIMENTAL)"
3 depends on BLOCK && EXPERIMENTAL
4 select CRC32
5 help
6 NILFS2 is a log-structured file system (LFS) supporting continuous
7 snapshotting. In addition to versioning capability of the entire
8 file system, users can even restore files mistakenly overwritten or
9 destroyed just a few seconds ago. Since this file system can keep
10 consistency like conventional LFS, it achieves quick recovery after
11 system crashes.
12
13 NILFS2 creates a number of checkpoints every few seconds or per
14 synchronous write basis (unless there is no change). Users can
15 select significant versions among continuously created checkpoints,
16 and can change them into snapshots which will be preserved for long
17 periods until they are changed back to checkpoints. Each
18 snapshot is mountable as a read-only file system concurrently with
19 its writable mount, and this feature is convenient for online backup.
20
21 Some features including atime, extended attributes, and POSIX ACLs,
22 are not supported yet.
23
24 To compile this file system support as a module, choose M here: the
25 module will be called nilfs2. If unsure, say N.
diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c
index 3d3ddb3f517..2dfd47714ae 100644
--- a/fs/nilfs2/mdt.c
+++ b/fs/nilfs2/mdt.c
@@ -412,8 +412,10 @@ nilfs_mdt_write_page(struct page *page, struct writeback_control *wbc)
412 return 0; /* Do not request flush for shadow page cache */ 412 return 0; /* Do not request flush for shadow page cache */
413 if (!sb) { 413 if (!sb) {
414 writer = nilfs_get_writer(NILFS_MDT(inode)->mi_nilfs); 414 writer = nilfs_get_writer(NILFS_MDT(inode)->mi_nilfs);
415 if (!writer) 415 if (!writer) {
416 nilfs_put_writer(NILFS_MDT(inode)->mi_nilfs);
416 return -EROFS; 417 return -EROFS;
418 }
417 sb = writer->s_super; 419 sb = writer->s_super;
418 } 420 }
419 421
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index 8b5e4778cf2..51ff3d0a4ee 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -1859,12 +1859,26 @@ static void nilfs_end_page_io(struct page *page, int err)
1859 if (!page) 1859 if (!page)
1860 return; 1860 return;
1861 1861
1862 if (buffer_nilfs_node(page_buffers(page)) && !PageWriteback(page)) 1862 if (buffer_nilfs_node(page_buffers(page)) && !PageWriteback(page)) {
1863 /* 1863 /*
1864 * For b-tree node pages, this function may be called twice 1864 * For b-tree node pages, this function may be called twice
1865 * or more because they might be split in a segment. 1865 * or more because they might be split in a segment.
1866 */ 1866 */
1867 if (PageDirty(page)) {
1868 /*
1869 * For pages holding split b-tree node buffers, dirty
1870 * flag on the buffers may be cleared discretely.
1871 * In that case, the page is once redirtied for
1872 * remaining buffers, and it must be cancelled if
1873 * all the buffers get cleaned later.
1874 */
1875 lock_page(page);
1876 if (nilfs_page_buffers_clean(page))
1877 __nilfs_clear_page_dirty(page);
1878 unlock_page(page);
1879 }
1867 return; 1880 return;
1881 }
1868 1882
1869 __nilfs_end_page_io(page, err); 1883 __nilfs_end_page_io(page, err);
1870} 1884}
diff --git a/fs/notify/Kconfig b/fs/notify/Kconfig
index 31dac7e3b0f..dffbb0911d0 100644
--- a/fs/notify/Kconfig
+++ b/fs/notify/Kconfig
@@ -1,15 +1,5 @@
1config FSNOTIFY 1config FSNOTIFY
2 bool "Filesystem notification backend" 2 def_bool n
3 default y
4 ---help---
5 fsnotify is a backend for filesystem notification. fsnotify does
6 not provide any userspace interface but does provide the basis
7 needed for other notification schemes such as dnotify, inotify,
8 and fanotify.
9
10 Say Y here to enable fsnotify suport.
11
12 If unsure, say Y.
13 3
14source "fs/notify/dnotify/Kconfig" 4source "fs/notify/dnotify/Kconfig"
15source "fs/notify/inotify/Kconfig" 5source "fs/notify/inotify/Kconfig"
diff --git a/fs/notify/dnotify/Kconfig b/fs/notify/dnotify/Kconfig
index 904ff8d5405..f9c1ca139d8 100644
--- a/fs/notify/dnotify/Kconfig
+++ b/fs/notify/dnotify/Kconfig
@@ -1,6 +1,6 @@
1config DNOTIFY 1config DNOTIFY
2 bool "Dnotify support" 2 bool "Dnotify support"
3 depends on FSNOTIFY 3 select FSNOTIFY
4 default y 4 default y
5 help 5 help
6 Dnotify is a directory-based per-fd file change notification system 6 Dnotify is a directory-based per-fd file change notification system
diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
index ec2f7bd7681..037e878e03f 100644
--- a/fs/notify/fsnotify.c
+++ b/fs/notify/fsnotify.c
@@ -159,7 +159,9 @@ void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is, const
159 if (!group->ops->should_send_event(group, to_tell, mask)) 159 if (!group->ops->should_send_event(group, to_tell, mask))
160 continue; 160 continue;
161 if (!event) { 161 if (!event) {
162 event = fsnotify_create_event(to_tell, mask, data, data_is, file_name, cookie); 162 event = fsnotify_create_event(to_tell, mask, data,
163 data_is, file_name, cookie,
164 GFP_KERNEL);
163 /* shit, we OOM'd and now we can't tell, maybe 165 /* shit, we OOM'd and now we can't tell, maybe
164 * someday someone else will want to do something 166 * someday someone else will want to do something
165 * here */ 167 * here */
diff --git a/fs/notify/inotify/Kconfig b/fs/notify/inotify/Kconfig
index 5356884289a..3e56dbffe72 100644
--- a/fs/notify/inotify/Kconfig
+++ b/fs/notify/inotify/Kconfig
@@ -15,7 +15,7 @@ config INOTIFY
15 15
16config INOTIFY_USER 16config INOTIFY_USER
17 bool "Inotify support for userspace" 17 bool "Inotify support for userspace"
18 depends on FSNOTIFY 18 select FSNOTIFY
19 default y 19 default y
20 ---help--- 20 ---help---
21 Say Y here to enable inotify support for userspace, including the 21 Say Y here to enable inotify support for userspace, including the
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index ff27a296584..f30d9bbc2e1 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -57,7 +57,6 @@ int inotify_max_user_watches __read_mostly;
57 57
58static struct kmem_cache *inotify_inode_mark_cachep __read_mostly; 58static struct kmem_cache *inotify_inode_mark_cachep __read_mostly;
59struct kmem_cache *event_priv_cachep __read_mostly; 59struct kmem_cache *event_priv_cachep __read_mostly;
60static struct fsnotify_event *inotify_ignored_event;
61 60
62/* 61/*
63 * When inotify registers a new group it increments this and uses that 62 * When inotify registers a new group it increments this and uses that
@@ -365,6 +364,17 @@ static int inotify_find_inode(const char __user *dirname, struct path *path, uns
365 return error; 364 return error;
366} 365}
367 366
367static void inotify_remove_from_idr(struct fsnotify_group *group,
368 struct inotify_inode_mark_entry *ientry)
369{
370 struct idr *idr;
371
372 spin_lock(&group->inotify_data.idr_lock);
373 idr = &group->inotify_data.idr;
374 idr_remove(idr, ientry->wd);
375 spin_unlock(&group->inotify_data.idr_lock);
376 ientry->wd = -1;
377}
368/* 378/*
369 * Send IN_IGNORED for this wd, remove this wd from the idr, and drop the 379 * Send IN_IGNORED for this wd, remove this wd from the idr, and drop the
370 * internal reference help on the mark because it is in the idr. 380 * internal reference help on the mark because it is in the idr.
@@ -373,13 +383,19 @@ void inotify_ignored_and_remove_idr(struct fsnotify_mark_entry *entry,
373 struct fsnotify_group *group) 383 struct fsnotify_group *group)
374{ 384{
375 struct inotify_inode_mark_entry *ientry; 385 struct inotify_inode_mark_entry *ientry;
386 struct fsnotify_event *ignored_event;
376 struct inotify_event_private_data *event_priv; 387 struct inotify_event_private_data *event_priv;
377 struct fsnotify_event_private_data *fsn_event_priv; 388 struct fsnotify_event_private_data *fsn_event_priv;
378 struct idr *idr; 389
390 ignored_event = fsnotify_create_event(NULL, FS_IN_IGNORED, NULL,
391 FSNOTIFY_EVENT_NONE, NULL, 0,
392 GFP_NOFS);
393 if (!ignored_event)
394 return;
379 395
380 ientry = container_of(entry, struct inotify_inode_mark_entry, fsn_entry); 396 ientry = container_of(entry, struct inotify_inode_mark_entry, fsn_entry);
381 397
382 event_priv = kmem_cache_alloc(event_priv_cachep, GFP_KERNEL); 398 event_priv = kmem_cache_alloc(event_priv_cachep, GFP_NOFS);
383 if (unlikely(!event_priv)) 399 if (unlikely(!event_priv))
384 goto skip_send_ignore; 400 goto skip_send_ignore;
385 401
@@ -388,7 +404,7 @@ void inotify_ignored_and_remove_idr(struct fsnotify_mark_entry *entry,
388 fsn_event_priv->group = group; 404 fsn_event_priv->group = group;
389 event_priv->wd = ientry->wd; 405 event_priv->wd = ientry->wd;
390 406
391 fsnotify_add_notify_event(group, inotify_ignored_event, fsn_event_priv); 407 fsnotify_add_notify_event(group, ignored_event, fsn_event_priv);
392 408
393 /* did the private data get added? */ 409 /* did the private data get added? */
394 if (list_empty(&fsn_event_priv->event_list)) 410 if (list_empty(&fsn_event_priv->event_list))
@@ -396,14 +412,16 @@ void inotify_ignored_and_remove_idr(struct fsnotify_mark_entry *entry,
396 412
397skip_send_ignore: 413skip_send_ignore:
398 414
415 /* matches the reference taken when the event was created */
416 fsnotify_put_event(ignored_event);
417
399 /* remove this entry from the idr */ 418 /* remove this entry from the idr */
400 spin_lock(&group->inotify_data.idr_lock); 419 inotify_remove_from_idr(group, ientry);
401 idr = &group->inotify_data.idr;
402 idr_remove(idr, ientry->wd);
403 spin_unlock(&group->inotify_data.idr_lock);
404 420
405 /* removed from idr, drop that reference */ 421 /* removed from idr, drop that reference */
406 fsnotify_put_mark(entry); 422 fsnotify_put_mark(entry);
423
424 atomic_dec(&group->inotify_data.user->inotify_watches);
407} 425}
408 426
409/* ding dong the mark is dead */ 427/* ding dong the mark is dead */
@@ -418,6 +436,7 @@ static int inotify_update_watch(struct fsnotify_group *group, struct inode *inod
418{ 436{
419 struct fsnotify_mark_entry *entry = NULL; 437 struct fsnotify_mark_entry *entry = NULL;
420 struct inotify_inode_mark_entry *ientry; 438 struct inotify_inode_mark_entry *ientry;
439 struct inotify_inode_mark_entry *tmp_ientry;
421 int ret = 0; 440 int ret = 0;
422 int add = (arg & IN_MASK_ADD); 441 int add = (arg & IN_MASK_ADD);
423 __u32 mask; 442 __u32 mask;
@@ -428,54 +447,66 @@ static int inotify_update_watch(struct fsnotify_group *group, struct inode *inod
428 if (unlikely(!mask)) 447 if (unlikely(!mask))
429 return -EINVAL; 448 return -EINVAL;
430 449
431 ientry = kmem_cache_alloc(inotify_inode_mark_cachep, GFP_KERNEL); 450 tmp_ientry = kmem_cache_alloc(inotify_inode_mark_cachep, GFP_KERNEL);
432 if (unlikely(!ientry)) 451 if (unlikely(!tmp_ientry))
433 return -ENOMEM; 452 return -ENOMEM;
434 /* we set the mask at the end after attaching it */ 453 /* we set the mask at the end after attaching it */
435 fsnotify_init_mark(&ientry->fsn_entry, inotify_free_mark); 454 fsnotify_init_mark(&tmp_ientry->fsn_entry, inotify_free_mark);
436 ientry->wd = 0; 455 tmp_ientry->wd = -1;
437 456
438find_entry: 457find_entry:
439 spin_lock(&inode->i_lock); 458 spin_lock(&inode->i_lock);
440 entry = fsnotify_find_mark_entry(group, inode); 459 entry = fsnotify_find_mark_entry(group, inode);
441 spin_unlock(&inode->i_lock); 460 spin_unlock(&inode->i_lock);
442 if (entry) { 461 if (entry) {
443 kmem_cache_free(inotify_inode_mark_cachep, ientry);
444 ientry = container_of(entry, struct inotify_inode_mark_entry, fsn_entry); 462 ientry = container_of(entry, struct inotify_inode_mark_entry, fsn_entry);
445 } else { 463 } else {
446 if (atomic_read(&group->inotify_data.user->inotify_watches) >= inotify_max_user_watches) { 464 ret = -ENOSPC;
447 ret = -ENOSPC; 465 if (atomic_read(&group->inotify_data.user->inotify_watches) >= inotify_max_user_watches)
448 goto out_err;
449 }
450
451 ret = fsnotify_add_mark(&ientry->fsn_entry, group, inode);
452 if (ret == -EEXIST)
453 goto find_entry;
454 else if (ret)
455 goto out_err; 466 goto out_err;
456
457 entry = &ientry->fsn_entry;
458retry: 467retry:
459 ret = -ENOMEM; 468 ret = -ENOMEM;
460 if (unlikely(!idr_pre_get(&group->inotify_data.idr, GFP_KERNEL))) 469 if (unlikely(!idr_pre_get(&group->inotify_data.idr, GFP_KERNEL)))
461 goto out_err; 470 goto out_err;
462 471
463 spin_lock(&group->inotify_data.idr_lock); 472 spin_lock(&group->inotify_data.idr_lock);
464 /* if entry is added to the idr we keep the reference obtained 473 ret = idr_get_new_above(&group->inotify_data.idr, &tmp_ientry->fsn_entry,
465 * through fsnotify_mark_add. remember to drop this reference 474 group->inotify_data.last_wd,
466 * when entry is removed from idr */ 475 &tmp_ientry->wd);
467 ret = idr_get_new_above(&group->inotify_data.idr, entry,
468 ++group->inotify_data.last_wd,
469 &ientry->wd);
470 spin_unlock(&group->inotify_data.idr_lock); 476 spin_unlock(&group->inotify_data.idr_lock);
471 if (ret) { 477 if (ret) {
472 if (ret == -EAGAIN) 478 if (ret == -EAGAIN)
473 goto retry; 479 goto retry;
474 goto out_err; 480 goto out_err;
475 } 481 }
482
483 ret = fsnotify_add_mark(&tmp_ientry->fsn_entry, group, inode);
484 if (ret) {
485 inotify_remove_from_idr(group, tmp_ientry);
486 if (ret == -EEXIST)
487 goto find_entry;
488 goto out_err;
489 }
490
491 /* tmp_ientry has been added to the inode, so we are all set up.
492 * now we just need to make sure tmp_ientry doesn't get freed and
493 * we need to set up entry and ientry so the generic code can
494 * do its thing. */
495 ientry = tmp_ientry;
496 entry = &ientry->fsn_entry;
497 tmp_ientry = NULL;
498
476 atomic_inc(&group->inotify_data.user->inotify_watches); 499 atomic_inc(&group->inotify_data.user->inotify_watches);
500
501 /* update the idr hint */
502 group->inotify_data.last_wd = ientry->wd;
503
504 /* we put the mark on the idr, take a reference */
505 fsnotify_get_mark(entry);
477 } 506 }
478 507
508 ret = ientry->wd;
509
479 spin_lock(&entry->lock); 510 spin_lock(&entry->lock);
480 511
481 old_mask = entry->mask; 512 old_mask = entry->mask;
@@ -506,14 +537,19 @@ retry:
506 fsnotify_recalc_group_mask(group); 537 fsnotify_recalc_group_mask(group);
507 } 538 }
508 539
509 return ientry->wd; 540 /* this either matches fsnotify_find_mark_entry, or init_mark_entry
541 * depending on which path we took... */
542 fsnotify_put_mark(entry);
510 543
511out_err: 544out_err:
512 /* see this isn't supposed to happen, just kill the watch */ 545 /* could be an error, could be that we found an existing mark */
513 if (entry) { 546 if (tmp_ientry) {
514 fsnotify_destroy_mark_by_entry(entry); 547 /* on the idr but didn't make it on the inode */
515 fsnotify_put_mark(entry); 548 if (tmp_ientry->wd != -1)
549 inotify_remove_from_idr(group, tmp_ientry);
550 kmem_cache_free(inotify_inode_mark_cachep, tmp_ientry);
516 } 551 }
552
517 return ret; 553 return ret;
518} 554}
519 555
@@ -721,9 +757,6 @@ static int __init inotify_user_setup(void)
721 757
722 inotify_inode_mark_cachep = KMEM_CACHE(inotify_inode_mark_entry, SLAB_PANIC); 758 inotify_inode_mark_cachep = KMEM_CACHE(inotify_inode_mark_entry, SLAB_PANIC);
723 event_priv_cachep = KMEM_CACHE(inotify_event_private_data, SLAB_PANIC); 759 event_priv_cachep = KMEM_CACHE(inotify_event_private_data, SLAB_PANIC);
724 inotify_ignored_event = fsnotify_create_event(NULL, FS_IN_IGNORED, NULL, FSNOTIFY_EVENT_NONE, NULL, 0);
725 if (!inotify_ignored_event)
726 panic("unable to allocate the inotify ignored event\n");
727 760
728 inotify_max_queued_events = 16384; 761 inotify_max_queued_events = 16384;
729 inotify_max_user_instances = 128; 762 inotify_max_user_instances = 128;
diff --git a/fs/notify/notification.c b/fs/notify/notification.c
index 959b73e756f..521368574e9 100644
--- a/fs/notify/notification.c
+++ b/fs/notify/notification.c
@@ -136,18 +136,24 @@ static bool event_compare(struct fsnotify_event *old, struct fsnotify_event *new
136{ 136{
137 if ((old->mask == new->mask) && 137 if ((old->mask == new->mask) &&
138 (old->to_tell == new->to_tell) && 138 (old->to_tell == new->to_tell) &&
139 (old->data_type == new->data_type)) { 139 (old->data_type == new->data_type) &&
140 (old->name_len == new->name_len)) {
140 switch (old->data_type) { 141 switch (old->data_type) {
141 case (FSNOTIFY_EVENT_INODE): 142 case (FSNOTIFY_EVENT_INODE):
142 if (old->inode == new->inode) 143 /* remember, after old was put on the wait_q we aren't
144 * allowed to look at the inode any more, only thing
145 * left to check was if the file_name is the same */
146 if (old->name_len &&
147 !strcmp(old->file_name, new->file_name))
143 return true; 148 return true;
144 break; 149 break;
145 case (FSNOTIFY_EVENT_PATH): 150 case (FSNOTIFY_EVENT_PATH):
146 if ((old->path.mnt == new->path.mnt) && 151 if ((old->path.mnt == new->path.mnt) &&
147 (old->path.dentry == new->path.dentry)) 152 (old->path.dentry == new->path.dentry))
148 return true; 153 return true;
154 break;
149 case (FSNOTIFY_EVENT_NONE): 155 case (FSNOTIFY_EVENT_NONE):
150 return true; 156 return false;
151 }; 157 };
152 } 158 }
153 return false; 159 return false;
@@ -339,18 +345,19 @@ static void initialize_event(struct fsnotify_event *event)
339 * @name the filename, if available 345 * @name the filename, if available
340 */ 346 */
341struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask, void *data, 347struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask, void *data,
342 int data_type, const char *name, u32 cookie) 348 int data_type, const char *name, u32 cookie,
349 gfp_t gfp)
343{ 350{
344 struct fsnotify_event *event; 351 struct fsnotify_event *event;
345 352
346 event = kmem_cache_alloc(fsnotify_event_cachep, GFP_KERNEL); 353 event = kmem_cache_alloc(fsnotify_event_cachep, gfp);
347 if (!event) 354 if (!event)
348 return NULL; 355 return NULL;
349 356
350 initialize_event(event); 357 initialize_event(event);
351 358
352 if (name) { 359 if (name) {
353 event->file_name = kstrdup(name, GFP_KERNEL); 360 event->file_name = kstrdup(name, gfp);
354 if (!event->file_name) { 361 if (!event->file_name) {
355 kmem_cache_free(fsnotify_event_cachep, event); 362 kmem_cache_free(fsnotify_event_cachep, event);
356 return NULL; 363 return NULL;
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index 9edcde4974a..f9a3e894266 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -1914,7 +1914,8 @@ static void ocfs2_adjust_adjacent_records(struct ocfs2_extent_rec *left_rec,
1914 * immediately to their right. 1914 * immediately to their right.
1915 */ 1915 */
1916 left_clusters = le32_to_cpu(right_child_el->l_recs[0].e_cpos); 1916 left_clusters = le32_to_cpu(right_child_el->l_recs[0].e_cpos);
1917 if (ocfs2_is_empty_extent(&right_child_el->l_recs[0])) { 1917 if (!ocfs2_rec_clusters(right_child_el, &right_child_el->l_recs[0])) {
1918 BUG_ON(right_child_el->l_tree_depth);
1918 BUG_ON(le16_to_cpu(right_child_el->l_next_free_rec) <= 1); 1919 BUG_ON(le16_to_cpu(right_child_el->l_next_free_rec) <= 1);
1919 left_clusters = le32_to_cpu(right_child_el->l_recs[1].e_cpos); 1920 left_clusters = le32_to_cpu(right_child_el->l_recs[1].e_cpos);
1920 } 1921 }
@@ -2476,15 +2477,37 @@ out_ret_path:
2476 return ret; 2477 return ret;
2477} 2478}
2478 2479
2479static void ocfs2_update_edge_lengths(struct inode *inode, handle_t *handle, 2480static int ocfs2_update_edge_lengths(struct inode *inode, handle_t *handle,
2480 struct ocfs2_path *path) 2481 int subtree_index, struct ocfs2_path *path)
2481{ 2482{
2482 int i, idx; 2483 int i, idx, ret;
2483 struct ocfs2_extent_rec *rec; 2484 struct ocfs2_extent_rec *rec;
2484 struct ocfs2_extent_list *el; 2485 struct ocfs2_extent_list *el;
2485 struct ocfs2_extent_block *eb; 2486 struct ocfs2_extent_block *eb;
2486 u32 range; 2487 u32 range;
2487 2488
2489 /*
2490 * In normal tree rotation process, we will never touch the
2491 * tree branch above subtree_index and ocfs2_extend_rotate_transaction
2492 * doesn't reserve the credits for them either.
2493 *
2494 * But we do have a special case here which will update the rightmost
2495 * records for all the bh in the path.
2496 * So we have to allocate extra credits and access them.
2497 */
2498 ret = ocfs2_extend_trans(handle,
2499 handle->h_buffer_credits + subtree_index);
2500 if (ret) {
2501 mlog_errno(ret);
2502 goto out;
2503 }
2504
2505 ret = ocfs2_journal_access_path(inode, handle, path);
2506 if (ret) {
2507 mlog_errno(ret);
2508 goto out;
2509 }
2510
2488 /* Path should always be rightmost. */ 2511 /* Path should always be rightmost. */
2489 eb = (struct ocfs2_extent_block *)path_leaf_bh(path)->b_data; 2512 eb = (struct ocfs2_extent_block *)path_leaf_bh(path)->b_data;
2490 BUG_ON(eb->h_next_leaf_blk != 0ULL); 2513 BUG_ON(eb->h_next_leaf_blk != 0ULL);
@@ -2505,6 +2528,8 @@ static void ocfs2_update_edge_lengths(struct inode *inode, handle_t *handle,
2505 2528
2506 ocfs2_journal_dirty(handle, path->p_node[i].bh); 2529 ocfs2_journal_dirty(handle, path->p_node[i].bh);
2507 } 2530 }
2531out:
2532 return ret;
2508} 2533}
2509 2534
2510static void ocfs2_unlink_path(struct inode *inode, handle_t *handle, 2535static void ocfs2_unlink_path(struct inode *inode, handle_t *handle,
@@ -2717,7 +2742,12 @@ static int ocfs2_rotate_subtree_left(struct inode *inode, handle_t *handle,
2717 if (del_right_subtree) { 2742 if (del_right_subtree) {
2718 ocfs2_unlink_subtree(inode, handle, left_path, right_path, 2743 ocfs2_unlink_subtree(inode, handle, left_path, right_path,
2719 subtree_index, dealloc); 2744 subtree_index, dealloc);
2720 ocfs2_update_edge_lengths(inode, handle, left_path); 2745 ret = ocfs2_update_edge_lengths(inode, handle, subtree_index,
2746 left_path);
2747 if (ret) {
2748 mlog_errno(ret);
2749 goto out;
2750 }
2721 2751
2722 eb = (struct ocfs2_extent_block *)path_leaf_bh(left_path)->b_data; 2752 eb = (struct ocfs2_extent_block *)path_leaf_bh(left_path)->b_data;
2723 ocfs2_et_set_last_eb_blk(et, le64_to_cpu(eb->h_blkno)); 2753 ocfs2_et_set_last_eb_blk(et, le64_to_cpu(eb->h_blkno));
@@ -3034,7 +3064,12 @@ static int ocfs2_remove_rightmost_path(struct inode *inode, handle_t *handle,
3034 3064
3035 ocfs2_unlink_subtree(inode, handle, left_path, path, 3065 ocfs2_unlink_subtree(inode, handle, left_path, path,
3036 subtree_index, dealloc); 3066 subtree_index, dealloc);
3037 ocfs2_update_edge_lengths(inode, handle, left_path); 3067 ret = ocfs2_update_edge_lengths(inode, handle, subtree_index,
3068 left_path);
3069 if (ret) {
3070 mlog_errno(ret);
3071 goto out;
3072 }
3038 3073
3039 eb = (struct ocfs2_extent_block *)path_leaf_bh(left_path)->b_data; 3074 eb = (struct ocfs2_extent_block *)path_leaf_bh(left_path)->b_data;
3040 ocfs2_et_set_last_eb_blk(et, le64_to_cpu(eb->h_blkno)); 3075 ocfs2_et_set_last_eb_blk(et, le64_to_cpu(eb->h_blkno));
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index b2c52b3a148..b401654011a 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -193,6 +193,7 @@ static int ocfs2_get_block(struct inode *inode, sector_t iblock,
193 (unsigned long long)OCFS2_I(inode)->ip_blkno); 193 (unsigned long long)OCFS2_I(inode)->ip_blkno);
194 mlog(ML_ERROR, "Size %llu, clusters %u\n", (unsigned long long)i_size_read(inode), OCFS2_I(inode)->ip_clusters); 194 mlog(ML_ERROR, "Size %llu, clusters %u\n", (unsigned long long)i_size_read(inode), OCFS2_I(inode)->ip_clusters);
195 dump_stack(); 195 dump_stack();
196 goto bail;
196 } 197 }
197 198
198 past_eof = ocfs2_blocks_for_bytes(inode->i_sb, i_size_read(inode)); 199 past_eof = ocfs2_blocks_for_bytes(inode->i_sb, i_size_read(inode));
@@ -894,18 +895,17 @@ struct ocfs2_write_cluster_desc {
894 */ 895 */
895 unsigned c_new; 896 unsigned c_new;
896 unsigned c_unwritten; 897 unsigned c_unwritten;
898 unsigned c_needs_zero;
897}; 899};
898 900
899static inline int ocfs2_should_zero_cluster(struct ocfs2_write_cluster_desc *d)
900{
901 return d->c_new || d->c_unwritten;
902}
903
904struct ocfs2_write_ctxt { 901struct ocfs2_write_ctxt {
905 /* Logical cluster position / len of write */ 902 /* Logical cluster position / len of write */
906 u32 w_cpos; 903 u32 w_cpos;
907 u32 w_clen; 904 u32 w_clen;
908 905
906 /* First cluster allocated in a nonsparse extend */
907 u32 w_first_new_cpos;
908
909 struct ocfs2_write_cluster_desc w_desc[OCFS2_MAX_CLUSTERS_PER_PAGE]; 909 struct ocfs2_write_cluster_desc w_desc[OCFS2_MAX_CLUSTERS_PER_PAGE];
910 910
911 /* 911 /*
@@ -983,6 +983,7 @@ static int ocfs2_alloc_write_ctxt(struct ocfs2_write_ctxt **wcp,
983 return -ENOMEM; 983 return -ENOMEM;
984 984
985 wc->w_cpos = pos >> osb->s_clustersize_bits; 985 wc->w_cpos = pos >> osb->s_clustersize_bits;
986 wc->w_first_new_cpos = UINT_MAX;
986 cend = (pos + len - 1) >> osb->s_clustersize_bits; 987 cend = (pos + len - 1) >> osb->s_clustersize_bits;
987 wc->w_clen = cend - wc->w_cpos + 1; 988 wc->w_clen = cend - wc->w_cpos + 1;
988 get_bh(di_bh); 989 get_bh(di_bh);
@@ -1217,20 +1218,18 @@ out:
1217 */ 1218 */
1218static int ocfs2_write_cluster(struct address_space *mapping, 1219static int ocfs2_write_cluster(struct address_space *mapping,
1219 u32 phys, unsigned int unwritten, 1220 u32 phys, unsigned int unwritten,
1221 unsigned int should_zero,
1220 struct ocfs2_alloc_context *data_ac, 1222 struct ocfs2_alloc_context *data_ac,
1221 struct ocfs2_alloc_context *meta_ac, 1223 struct ocfs2_alloc_context *meta_ac,
1222 struct ocfs2_write_ctxt *wc, u32 cpos, 1224 struct ocfs2_write_ctxt *wc, u32 cpos,
1223 loff_t user_pos, unsigned user_len) 1225 loff_t user_pos, unsigned user_len)
1224{ 1226{
1225 int ret, i, new, should_zero = 0; 1227 int ret, i, new;
1226 u64 v_blkno, p_blkno; 1228 u64 v_blkno, p_blkno;
1227 struct inode *inode = mapping->host; 1229 struct inode *inode = mapping->host;
1228 struct ocfs2_extent_tree et; 1230 struct ocfs2_extent_tree et;
1229 1231
1230 new = phys == 0 ? 1 : 0; 1232 new = phys == 0 ? 1 : 0;
1231 if (new || unwritten)
1232 should_zero = 1;
1233
1234 if (new) { 1233 if (new) {
1235 u32 tmp_pos; 1234 u32 tmp_pos;
1236 1235
@@ -1301,7 +1300,7 @@ static int ocfs2_write_cluster(struct address_space *mapping,
1301 if (tmpret) { 1300 if (tmpret) {
1302 mlog_errno(tmpret); 1301 mlog_errno(tmpret);
1303 if (ret == 0) 1302 if (ret == 0)
1304 tmpret = ret; 1303 ret = tmpret;
1305 } 1304 }
1306 } 1305 }
1307 1306
@@ -1341,7 +1340,9 @@ static int ocfs2_write_cluster_by_desc(struct address_space *mapping,
1341 local_len = osb->s_clustersize - cluster_off; 1340 local_len = osb->s_clustersize - cluster_off;
1342 1341
1343 ret = ocfs2_write_cluster(mapping, desc->c_phys, 1342 ret = ocfs2_write_cluster(mapping, desc->c_phys,
1344 desc->c_unwritten, data_ac, meta_ac, 1343 desc->c_unwritten,
1344 desc->c_needs_zero,
1345 data_ac, meta_ac,
1345 wc, desc->c_cpos, pos, local_len); 1346 wc, desc->c_cpos, pos, local_len);
1346 if (ret) { 1347 if (ret) {
1347 mlog_errno(ret); 1348 mlog_errno(ret);
@@ -1391,14 +1392,14 @@ static void ocfs2_set_target_boundaries(struct ocfs2_super *osb,
1391 * newly allocated cluster. 1392 * newly allocated cluster.
1392 */ 1393 */
1393 desc = &wc->w_desc[0]; 1394 desc = &wc->w_desc[0];
1394 if (ocfs2_should_zero_cluster(desc)) 1395 if (desc->c_needs_zero)
1395 ocfs2_figure_cluster_boundaries(osb, 1396 ocfs2_figure_cluster_boundaries(osb,
1396 desc->c_cpos, 1397 desc->c_cpos,
1397 &wc->w_target_from, 1398 &wc->w_target_from,
1398 NULL); 1399 NULL);
1399 1400
1400 desc = &wc->w_desc[wc->w_clen - 1]; 1401 desc = &wc->w_desc[wc->w_clen - 1];
1401 if (ocfs2_should_zero_cluster(desc)) 1402 if (desc->c_needs_zero)
1402 ocfs2_figure_cluster_boundaries(osb, 1403 ocfs2_figure_cluster_boundaries(osb,
1403 desc->c_cpos, 1404 desc->c_cpos,
1404 NULL, 1405 NULL,
@@ -1466,13 +1467,28 @@ static int ocfs2_populate_write_desc(struct inode *inode,
1466 phys++; 1467 phys++;
1467 } 1468 }
1468 1469
1470 /*
1471 * If w_first_new_cpos is < UINT_MAX, we have a non-sparse
1472 * file that got extended. w_first_new_cpos tells us
1473 * where the newly allocated clusters are so we can
1474 * zero them.
1475 */
1476 if (desc->c_cpos >= wc->w_first_new_cpos) {
1477 BUG_ON(phys == 0);
1478 desc->c_needs_zero = 1;
1479 }
1480
1469 desc->c_phys = phys; 1481 desc->c_phys = phys;
1470 if (phys == 0) { 1482 if (phys == 0) {
1471 desc->c_new = 1; 1483 desc->c_new = 1;
1484 desc->c_needs_zero = 1;
1472 *clusters_to_alloc = *clusters_to_alloc + 1; 1485 *clusters_to_alloc = *clusters_to_alloc + 1;
1473 } 1486 }
1474 if (ext_flags & OCFS2_EXT_UNWRITTEN) 1487
1488 if (ext_flags & OCFS2_EXT_UNWRITTEN) {
1475 desc->c_unwritten = 1; 1489 desc->c_unwritten = 1;
1490 desc->c_needs_zero = 1;
1491 }
1476 1492
1477 num_clusters--; 1493 num_clusters--;
1478 } 1494 }
@@ -1632,10 +1648,13 @@ static int ocfs2_expand_nonsparse_inode(struct inode *inode, loff_t pos,
1632 if (newsize <= i_size_read(inode)) 1648 if (newsize <= i_size_read(inode))
1633 return 0; 1649 return 0;
1634 1650
1635 ret = ocfs2_extend_no_holes(inode, newsize, newsize - len); 1651 ret = ocfs2_extend_no_holes(inode, newsize, pos);
1636 if (ret) 1652 if (ret)
1637 mlog_errno(ret); 1653 mlog_errno(ret);
1638 1654
1655 wc->w_first_new_cpos =
1656 ocfs2_clusters_for_bytes(inode->i_sb, i_size_read(inode));
1657
1639 return ret; 1658 return ret;
1640} 1659}
1641 1660
@@ -1644,7 +1663,7 @@ int ocfs2_write_begin_nolock(struct address_space *mapping,
1644 struct page **pagep, void **fsdata, 1663 struct page **pagep, void **fsdata,
1645 struct buffer_head *di_bh, struct page *mmap_page) 1664 struct buffer_head *di_bh, struct page *mmap_page)
1646{ 1665{
1647 int ret, credits = OCFS2_INODE_UPDATE_CREDITS; 1666 int ret, cluster_of_pages, credits = OCFS2_INODE_UPDATE_CREDITS;
1648 unsigned int clusters_to_alloc, extents_to_split; 1667 unsigned int clusters_to_alloc, extents_to_split;
1649 struct ocfs2_write_ctxt *wc; 1668 struct ocfs2_write_ctxt *wc;
1650 struct inode *inode = mapping->host; 1669 struct inode *inode = mapping->host;
@@ -1722,8 +1741,19 @@ int ocfs2_write_begin_nolock(struct address_space *mapping,
1722 1741
1723 } 1742 }
1724 1743
1725 ocfs2_set_target_boundaries(osb, wc, pos, len, 1744 /*
1726 clusters_to_alloc + extents_to_split); 1745 * We have to zero sparse allocated clusters, unwritten extent clusters,
1746 * and non-sparse clusters we just extended. For non-sparse writes,
1747 * we know zeros will only be needed in the first and/or last cluster.
1748 */
1749 if (clusters_to_alloc || extents_to_split ||
1750 wc->w_desc[0].c_needs_zero ||
1751 wc->w_desc[wc->w_clen - 1].c_needs_zero)
1752 cluster_of_pages = 1;
1753 else
1754 cluster_of_pages = 0;
1755
1756 ocfs2_set_target_boundaries(osb, wc, pos, len, cluster_of_pages);
1727 1757
1728 handle = ocfs2_start_trans(osb, credits); 1758 handle = ocfs2_start_trans(osb, credits);
1729 if (IS_ERR(handle)) { 1759 if (IS_ERR(handle)) {
@@ -1756,8 +1786,7 @@ int ocfs2_write_begin_nolock(struct address_space *mapping,
1756 * extent. 1786 * extent.
1757 */ 1787 */
1758 ret = ocfs2_grab_pages_for_write(mapping, wc, wc->w_cpos, pos, 1788 ret = ocfs2_grab_pages_for_write(mapping, wc, wc->w_cpos, pos,
1759 clusters_to_alloc + extents_to_split, 1789 cluster_of_pages, mmap_page);
1760 mmap_page);
1761 if (ret) { 1790 if (ret) {
1762 mlog_errno(ret); 1791 mlog_errno(ret);
1763 goto out_quota; 1792 goto out_quota;
diff --git a/fs/ocfs2/dcache.c b/fs/ocfs2/dcache.c
index b574431a031..2f28b7de2c8 100644
--- a/fs/ocfs2/dcache.c
+++ b/fs/ocfs2/dcache.c
@@ -310,22 +310,19 @@ out_attach:
310 return ret; 310 return ret;
311} 311}
312 312
313static DEFINE_SPINLOCK(dentry_list_lock); 313DEFINE_SPINLOCK(dentry_list_lock);
314 314
315/* We limit the number of dentry locks to drop in one go. We have 315/* We limit the number of dentry locks to drop in one go. We have
316 * this limit so that we don't starve other users of ocfs2_wq. */ 316 * this limit so that we don't starve other users of ocfs2_wq. */
317#define DL_INODE_DROP_COUNT 64 317#define DL_INODE_DROP_COUNT 64
318 318
319/* Drop inode references from dentry locks */ 319/* Drop inode references from dentry locks */
320void ocfs2_drop_dl_inodes(struct work_struct *work) 320static void __ocfs2_drop_dl_inodes(struct ocfs2_super *osb, int drop_count)
321{ 321{
322 struct ocfs2_super *osb = container_of(work, struct ocfs2_super,
323 dentry_lock_work);
324 struct ocfs2_dentry_lock *dl; 322 struct ocfs2_dentry_lock *dl;
325 int drop_count = DL_INODE_DROP_COUNT;
326 323
327 spin_lock(&dentry_list_lock); 324 spin_lock(&dentry_list_lock);
328 while (osb->dentry_lock_list && drop_count--) { 325 while (osb->dentry_lock_list && (drop_count < 0 || drop_count--)) {
329 dl = osb->dentry_lock_list; 326 dl = osb->dentry_lock_list;
330 osb->dentry_lock_list = dl->dl_next; 327 osb->dentry_lock_list = dl->dl_next;
331 spin_unlock(&dentry_list_lock); 328 spin_unlock(&dentry_list_lock);
@@ -333,11 +330,32 @@ void ocfs2_drop_dl_inodes(struct work_struct *work)
333 kfree(dl); 330 kfree(dl);
334 spin_lock(&dentry_list_lock); 331 spin_lock(&dentry_list_lock);
335 } 332 }
336 if (osb->dentry_lock_list) 333 spin_unlock(&dentry_list_lock);
334}
335
336void ocfs2_drop_dl_inodes(struct work_struct *work)
337{
338 struct ocfs2_super *osb = container_of(work, struct ocfs2_super,
339 dentry_lock_work);
340
341 __ocfs2_drop_dl_inodes(osb, DL_INODE_DROP_COUNT);
342 /*
343 * Don't queue dropping if umount is in progress. We flush the
344 * list in ocfs2_dismount_volume
345 */
346 spin_lock(&dentry_list_lock);
347 if (osb->dentry_lock_list &&
348 !ocfs2_test_osb_flag(osb, OCFS2_OSB_DROP_DENTRY_LOCK_IMMED))
337 queue_work(ocfs2_wq, &osb->dentry_lock_work); 349 queue_work(ocfs2_wq, &osb->dentry_lock_work);
338 spin_unlock(&dentry_list_lock); 350 spin_unlock(&dentry_list_lock);
339} 351}
340 352
353/* Flush the whole work queue */
354void ocfs2_drop_all_dl_inodes(struct ocfs2_super *osb)
355{
356 __ocfs2_drop_dl_inodes(osb, -1);
357}
358
341/* 359/*
342 * ocfs2_dentry_iput() and friends. 360 * ocfs2_dentry_iput() and friends.
343 * 361 *
@@ -368,7 +386,8 @@ static void ocfs2_drop_dentry_lock(struct ocfs2_super *osb,
368 /* We leave dropping of inode reference to ocfs2_wq as that can 386 /* We leave dropping of inode reference to ocfs2_wq as that can
369 * possibly lead to inode deletion which gets tricky */ 387 * possibly lead to inode deletion which gets tricky */
370 spin_lock(&dentry_list_lock); 388 spin_lock(&dentry_list_lock);
371 if (!osb->dentry_lock_list) 389 if (!osb->dentry_lock_list &&
390 !ocfs2_test_osb_flag(osb, OCFS2_OSB_DROP_DENTRY_LOCK_IMMED))
372 queue_work(ocfs2_wq, &osb->dentry_lock_work); 391 queue_work(ocfs2_wq, &osb->dentry_lock_work);
373 dl->dl_next = osb->dentry_lock_list; 392 dl->dl_next = osb->dentry_lock_list;
374 osb->dentry_lock_list = dl; 393 osb->dentry_lock_list = dl;
diff --git a/fs/ocfs2/dcache.h b/fs/ocfs2/dcache.h
index faa12e75f98..f5dd1789acf 100644
--- a/fs/ocfs2/dcache.h
+++ b/fs/ocfs2/dcache.h
@@ -49,10 +49,13 @@ struct ocfs2_dentry_lock {
49int ocfs2_dentry_attach_lock(struct dentry *dentry, struct inode *inode, 49int ocfs2_dentry_attach_lock(struct dentry *dentry, struct inode *inode,
50 u64 parent_blkno); 50 u64 parent_blkno);
51 51
52extern spinlock_t dentry_list_lock;
53
52void ocfs2_dentry_lock_put(struct ocfs2_super *osb, 54void ocfs2_dentry_lock_put(struct ocfs2_super *osb,
53 struct ocfs2_dentry_lock *dl); 55 struct ocfs2_dentry_lock *dl);
54 56
55void ocfs2_drop_dl_inodes(struct work_struct *work); 57void ocfs2_drop_dl_inodes(struct work_struct *work);
58void ocfs2_drop_all_dl_inodes(struct ocfs2_super *osb);
56 59
57struct dentry *ocfs2_find_local_alias(struct inode *inode, u64 parent_blkno, 60struct dentry *ocfs2_find_local_alias(struct inode *inode, u64 parent_blkno,
58 int skip_unhashed); 61 int skip_unhashed);
diff --git a/fs/ocfs2/dlm/dlmast.c b/fs/ocfs2/dlm/dlmast.c
index d07ddbe4b28..81eff8e5832 100644
--- a/fs/ocfs2/dlm/dlmast.c
+++ b/fs/ocfs2/dlm/dlmast.c
@@ -103,7 +103,6 @@ static void __dlm_queue_ast(struct dlm_ctxt *dlm, struct dlm_lock *lock)
103 lock->ast_pending, lock->ml.type); 103 lock->ast_pending, lock->ml.type);
104 BUG(); 104 BUG();
105 } 105 }
106 BUG_ON(!list_empty(&lock->ast_list));
107 if (lock->ast_pending) 106 if (lock->ast_pending)
108 mlog(0, "lock has an ast getting flushed right now\n"); 107 mlog(0, "lock has an ast getting flushed right now\n");
109 108
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index bcb9260c373..43e6e328056 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -1118,7 +1118,7 @@ static int dlm_send_mig_lockres_msg(struct dlm_ctxt *dlm,
1118 1118
1119 mlog(0, "%s:%.*s: sending mig lockres (%s) to %u\n", 1119 mlog(0, "%s:%.*s: sending mig lockres (%s) to %u\n",
1120 dlm->name, res->lockname.len, res->lockname.name, 1120 dlm->name, res->lockname.len, res->lockname.name,
1121 orig_flags & DLM_MRES_MIGRATION ? "migrate" : "recovery", 1121 orig_flags & DLM_MRES_MIGRATION ? "migration" : "recovery",
1122 send_to); 1122 send_to);
1123 1123
1124 /* send it */ 1124 /* send it */
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 62442e413a0..aa501d3f93f 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1851,6 +1851,7 @@ relock:
1851 if (ret) 1851 if (ret)
1852 goto out_dio; 1852 goto out_dio;
1853 1853
1854 count = ocount;
1854 ret = generic_write_checks(file, ppos, &count, 1855 ret = generic_write_checks(file, ppos, &count,
1855 S_ISBLK(inode->i_mode)); 1856 S_ISBLK(inode->i_mode));
1856 if (ret) 1857 if (ret)
@@ -1918,8 +1919,10 @@ out_sems:
1918 1919
1919 mutex_unlock(&inode->i_mutex); 1920 mutex_unlock(&inode->i_mutex);
1920 1921
1922 if (written)
1923 ret = written;
1921 mlog_exit(ret); 1924 mlog_exit(ret);
1922 return written ? written : ret; 1925 return ret;
1923} 1926}
1924 1927
1925static int ocfs2_splice_to_file(struct pipe_inode_info *pipe, 1928static int ocfs2_splice_to_file(struct pipe_inode_info *pipe,
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index f033760ecbe..c48b93ac6b6 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -1954,10 +1954,16 @@ void ocfs2_orphan_scan_init(struct ocfs2_super *osb)
1954 os->os_osb = osb; 1954 os->os_osb = osb;
1955 os->os_count = 0; 1955 os->os_count = 0;
1956 os->os_seqno = 0; 1956 os->os_seqno = 0;
1957 os->os_scantime = CURRENT_TIME;
1958 mutex_init(&os->os_lock); 1957 mutex_init(&os->os_lock);
1959 INIT_DELAYED_WORK(&os->os_orphan_scan_work, ocfs2_orphan_scan_work); 1958 INIT_DELAYED_WORK(&os->os_orphan_scan_work, ocfs2_orphan_scan_work);
1959}
1960 1960
1961void ocfs2_orphan_scan_start(struct ocfs2_super *osb)
1962{
1963 struct ocfs2_orphan_scan *os;
1964
1965 os = &osb->osb_orphan_scan;
1966 os->os_scantime = CURRENT_TIME;
1961 if (ocfs2_is_hard_readonly(osb) || ocfs2_mount_local(osb)) 1967 if (ocfs2_is_hard_readonly(osb) || ocfs2_mount_local(osb))
1962 atomic_set(&os->os_state, ORPHAN_SCAN_INACTIVE); 1968 atomic_set(&os->os_state, ORPHAN_SCAN_INACTIVE);
1963 else { 1969 else {
diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h
index 5432c7f79cc..2c3222aec62 100644
--- a/fs/ocfs2/journal.h
+++ b/fs/ocfs2/journal.h
@@ -145,6 +145,7 @@ static inline void ocfs2_inode_set_new(struct ocfs2_super *osb,
145 145
146/* Exported only for the journal struct init code in super.c. Do not call. */ 146/* Exported only for the journal struct init code in super.c. Do not call. */
147void ocfs2_orphan_scan_init(struct ocfs2_super *osb); 147void ocfs2_orphan_scan_init(struct ocfs2_super *osb);
148void ocfs2_orphan_scan_start(struct ocfs2_super *osb);
148void ocfs2_orphan_scan_stop(struct ocfs2_super *osb); 149void ocfs2_orphan_scan_stop(struct ocfs2_super *osb);
149void ocfs2_orphan_scan_exit(struct ocfs2_super *osb); 150void ocfs2_orphan_scan_exit(struct ocfs2_super *osb);
150 151
@@ -329,20 +330,27 @@ int ocfs2_journal_dirty(handle_t *handle,
329/* extended attribute block update */ 330/* extended attribute block update */
330#define OCFS2_XATTR_BLOCK_UPDATE_CREDITS 1 331#define OCFS2_XATTR_BLOCK_UPDATE_CREDITS 1
331 332
333/* Update of a single quota block */
334#define OCFS2_QUOTA_BLOCK_UPDATE_CREDITS 1
335
332/* global quotafile inode update, data block */ 336/* global quotafile inode update, data block */
333#define OCFS2_QINFO_WRITE_CREDITS (OCFS2_INODE_UPDATE_CREDITS + 1) 337#define OCFS2_QINFO_WRITE_CREDITS (OCFS2_INODE_UPDATE_CREDITS + \
338 OCFS2_QUOTA_BLOCK_UPDATE_CREDITS)
334 339
340#define OCFS2_LOCAL_QINFO_WRITE_CREDITS OCFS2_QUOTA_BLOCK_UPDATE_CREDITS
335/* 341/*
336 * The two writes below can accidentally see global info dirty due 342 * The two writes below can accidentally see global info dirty due
337 * to set_info() quotactl so make them prepared for the writes. 343 * to set_info() quotactl so make them prepared for the writes.
338 */ 344 */
339/* quota data block, global info */ 345/* quota data block, global info */
340/* Write to local quota file */ 346/* Write to local quota file */
341#define OCFS2_QWRITE_CREDITS (OCFS2_QINFO_WRITE_CREDITS + 1) 347#define OCFS2_QWRITE_CREDITS (OCFS2_QINFO_WRITE_CREDITS + \
348 OCFS2_QUOTA_BLOCK_UPDATE_CREDITS)
342 349
343/* global quota data block, local quota data block, global quota inode, 350/* global quota data block, local quota data block, global quota inode,
344 * global quota info */ 351 * global quota info */
345#define OCFS2_QSYNC_CREDITS (OCFS2_INODE_UPDATE_CREDITS + 3) 352#define OCFS2_QSYNC_CREDITS (OCFS2_QINFO_WRITE_CREDITS + \
353 2 * OCFS2_QUOTA_BLOCK_UPDATE_CREDITS)
346 354
347static inline int ocfs2_quota_trans_credits(struct super_block *sb) 355static inline int ocfs2_quota_trans_credits(struct super_block *sb)
348{ 356{
@@ -355,11 +363,6 @@ static inline int ocfs2_quota_trans_credits(struct super_block *sb)
355 return credits; 363 return credits;
356} 364}
357 365
358/* Number of credits needed for removing quota structure from file */
359int ocfs2_calc_qdel_credits(struct super_block *sb, int type);
360/* Number of credits needed for initialization of new quota structure */
361int ocfs2_calc_qinit_credits(struct super_block *sb, int type);
362
363/* group extend. inode update and last group update. */ 366/* group extend. inode update and last group update. */
364#define OCFS2_GROUP_EXTEND_CREDITS (OCFS2_INODE_UPDATE_CREDITS + 1) 367#define OCFS2_GROUP_EXTEND_CREDITS (OCFS2_INODE_UPDATE_CREDITS + 1)
365 368
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
index c9345ebb849..39e1d5a3950 100644
--- a/fs/ocfs2/ocfs2.h
+++ b/fs/ocfs2/ocfs2.h
@@ -224,10 +224,12 @@ enum ocfs2_mount_options
224 OCFS2_MOUNT_GRPQUOTA = 1 << 10, /* We support group quotas */ 224 OCFS2_MOUNT_GRPQUOTA = 1 << 10, /* We support group quotas */
225}; 225};
226 226
227#define OCFS2_OSB_SOFT_RO 0x0001 227#define OCFS2_OSB_SOFT_RO 0x0001
228#define OCFS2_OSB_HARD_RO 0x0002 228#define OCFS2_OSB_HARD_RO 0x0002
229#define OCFS2_OSB_ERROR_FS 0x0004 229#define OCFS2_OSB_ERROR_FS 0x0004
230#define OCFS2_DEFAULT_ATIME_QUANTUM 60 230#define OCFS2_OSB_DROP_DENTRY_LOCK_IMMED 0x0008
231
232#define OCFS2_DEFAULT_ATIME_QUANTUM 60
231 233
232struct ocfs2_journal; 234struct ocfs2_journal;
233struct ocfs2_slot_info; 235struct ocfs2_slot_info;
@@ -490,6 +492,18 @@ static inline void ocfs2_set_osb_flag(struct ocfs2_super *osb,
490 spin_unlock(&osb->osb_lock); 492 spin_unlock(&osb->osb_lock);
491} 493}
492 494
495
496static inline unsigned long ocfs2_test_osb_flag(struct ocfs2_super *osb,
497 unsigned long flag)
498{
499 unsigned long ret;
500
501 spin_lock(&osb->osb_lock);
502 ret = osb->osb_flags & flag;
503 spin_unlock(&osb->osb_lock);
504 return ret;
505}
506
493static inline void ocfs2_set_ro_flag(struct ocfs2_super *osb, 507static inline void ocfs2_set_ro_flag(struct ocfs2_super *osb,
494 int hard) 508 int hard)
495{ 509{
diff --git a/fs/ocfs2/quota.h b/fs/ocfs2/quota.h
index 7365e2e0870..3fb96fcd4c8 100644
--- a/fs/ocfs2/quota.h
+++ b/fs/ocfs2/quota.h
@@ -50,7 +50,6 @@ struct ocfs2_mem_dqinfo {
50 unsigned int dqi_chunks; /* Number of chunks in local quota file */ 50 unsigned int dqi_chunks; /* Number of chunks in local quota file */
51 unsigned int dqi_blocks; /* Number of blocks allocated for local quota file */ 51 unsigned int dqi_blocks; /* Number of blocks allocated for local quota file */
52 unsigned int dqi_syncms; /* How often should we sync with other nodes */ 52 unsigned int dqi_syncms; /* How often should we sync with other nodes */
53 unsigned int dqi_syncjiff; /* Precomputed dqi_syncms in jiffies */
54 struct list_head dqi_chunk; /* List of chunks */ 53 struct list_head dqi_chunk; /* List of chunks */
55 struct inode *dqi_gqinode; /* Global quota file inode */ 54 struct inode *dqi_gqinode; /* Global quota file inode */
56 struct ocfs2_lock_res dqi_gqlock; /* Lock protecting quota information structure */ 55 struct ocfs2_lock_res dqi_gqlock; /* Lock protecting quota information structure */
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c
index edfa60cd155..bf7742d0ee3 100644
--- a/fs/ocfs2/quota_global.c
+++ b/fs/ocfs2/quota_global.c
@@ -69,6 +69,7 @@ static void ocfs2_global_mem2diskdqb(void *dp, struct dquot *dquot)
69 d->dqb_curspace = cpu_to_le64(m->dqb_curspace); 69 d->dqb_curspace = cpu_to_le64(m->dqb_curspace);
70 d->dqb_btime = cpu_to_le64(m->dqb_btime); 70 d->dqb_btime = cpu_to_le64(m->dqb_btime);
71 d->dqb_itime = cpu_to_le64(m->dqb_itime); 71 d->dqb_itime = cpu_to_le64(m->dqb_itime);
72 d->dqb_pad1 = d->dqb_pad2 = 0;
72} 73}
73 74
74static int ocfs2_global_is_id(void *dp, struct dquot *dquot) 75static int ocfs2_global_is_id(void *dp, struct dquot *dquot)
@@ -211,14 +212,13 @@ ssize_t ocfs2_quota_write(struct super_block *sb, int type,
211 212
212 mutex_lock_nested(&gqinode->i_mutex, I_MUTEX_QUOTA); 213 mutex_lock_nested(&gqinode->i_mutex, I_MUTEX_QUOTA);
213 if (gqinode->i_size < off + len) { 214 if (gqinode->i_size < off + len) {
214 down_write(&OCFS2_I(gqinode)->ip_alloc_sem); 215 loff_t rounded_end =
215 err = ocfs2_extend_no_holes(gqinode, off + len, off); 216 ocfs2_align_bytes_to_blocks(sb, off + len);
216 up_write(&OCFS2_I(gqinode)->ip_alloc_sem); 217
217 if (err < 0) 218 /* Space is already allocated in ocfs2_global_read_dquot() */
218 goto out;
219 err = ocfs2_simple_size_update(gqinode, 219 err = ocfs2_simple_size_update(gqinode,
220 oinfo->dqi_gqi_bh, 220 oinfo->dqi_gqi_bh,
221 off + len); 221 rounded_end);
222 if (err < 0) 222 if (err < 0)
223 goto out; 223 goto out;
224 new = 1; 224 new = 1;
@@ -234,7 +234,7 @@ ssize_t ocfs2_quota_write(struct super_block *sb, int type,
234 } 234 }
235 if (err) { 235 if (err) {
236 mlog_errno(err); 236 mlog_errno(err);
237 return err; 237 goto out;
238 } 238 }
239 lock_buffer(bh); 239 lock_buffer(bh);
240 if (new) 240 if (new)
@@ -342,7 +342,6 @@ int ocfs2_global_read_info(struct super_block *sb, int type)
342 info->dqi_bgrace = le32_to_cpu(dinfo.dqi_bgrace); 342 info->dqi_bgrace = le32_to_cpu(dinfo.dqi_bgrace);
343 info->dqi_igrace = le32_to_cpu(dinfo.dqi_igrace); 343 info->dqi_igrace = le32_to_cpu(dinfo.dqi_igrace);
344 oinfo->dqi_syncms = le32_to_cpu(dinfo.dqi_syncms); 344 oinfo->dqi_syncms = le32_to_cpu(dinfo.dqi_syncms);
345 oinfo->dqi_syncjiff = msecs_to_jiffies(oinfo->dqi_syncms);
346 oinfo->dqi_gi.dqi_blocks = le32_to_cpu(dinfo.dqi_blocks); 345 oinfo->dqi_gi.dqi_blocks = le32_to_cpu(dinfo.dqi_blocks);
347 oinfo->dqi_gi.dqi_free_blk = le32_to_cpu(dinfo.dqi_free_blk); 346 oinfo->dqi_gi.dqi_free_blk = le32_to_cpu(dinfo.dqi_free_blk);
348 oinfo->dqi_gi.dqi_free_entry = le32_to_cpu(dinfo.dqi_free_entry); 347 oinfo->dqi_gi.dqi_free_entry = le32_to_cpu(dinfo.dqi_free_entry);
@@ -352,7 +351,7 @@ int ocfs2_global_read_info(struct super_block *sb, int type)
352 oinfo->dqi_gi.dqi_qtree_depth = qtree_depth(&oinfo->dqi_gi); 351 oinfo->dqi_gi.dqi_qtree_depth = qtree_depth(&oinfo->dqi_gi);
353 INIT_DELAYED_WORK(&oinfo->dqi_sync_work, qsync_work_fn); 352 INIT_DELAYED_WORK(&oinfo->dqi_sync_work, qsync_work_fn);
354 queue_delayed_work(ocfs2_quota_wq, &oinfo->dqi_sync_work, 353 queue_delayed_work(ocfs2_quota_wq, &oinfo->dqi_sync_work,
355 oinfo->dqi_syncjiff); 354 msecs_to_jiffies(oinfo->dqi_syncms));
356 355
357out_err: 356out_err:
358 mlog_exit(status); 357 mlog_exit(status);
@@ -402,13 +401,36 @@ int ocfs2_global_write_info(struct super_block *sb, int type)
402 return err; 401 return err;
403} 402}
404 403
404static int ocfs2_global_qinit_alloc(struct super_block *sb, int type)
405{
406 struct ocfs2_mem_dqinfo *oinfo = sb_dqinfo(sb, type)->dqi_priv;
407
408 /*
409 * We may need to allocate tree blocks and a leaf block but not the
410 * root block
411 */
412 return oinfo->dqi_gi.dqi_qtree_depth;
413}
414
415static int ocfs2_calc_global_qinit_credits(struct super_block *sb, int type)
416{
417 /* We modify all the allocated blocks, tree root, and info block */
418 return (ocfs2_global_qinit_alloc(sb, type) + 2) *
419 OCFS2_QUOTA_BLOCK_UPDATE_CREDITS;
420}
421
405/* Read in information from global quota file and acquire a reference to it. 422/* Read in information from global quota file and acquire a reference to it.
406 * dquot_acquire() has already started the transaction and locked quota file */ 423 * dquot_acquire() has already started the transaction and locked quota file */
407int ocfs2_global_read_dquot(struct dquot *dquot) 424int ocfs2_global_read_dquot(struct dquot *dquot)
408{ 425{
409 int err, err2, ex = 0; 426 int err, err2, ex = 0;
410 struct ocfs2_mem_dqinfo *info = 427 struct super_block *sb = dquot->dq_sb;
411 sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv; 428 int type = dquot->dq_type;
429 struct ocfs2_mem_dqinfo *info = sb_dqinfo(sb, type)->dqi_priv;
430 struct ocfs2_super *osb = OCFS2_SB(sb);
431 struct inode *gqinode = info->dqi_gqinode;
432 int need_alloc = ocfs2_global_qinit_alloc(sb, type);
433 handle_t *handle = NULL;
412 434
413 err = ocfs2_qinfo_lock(info, 0); 435 err = ocfs2_qinfo_lock(info, 0);
414 if (err < 0) 436 if (err < 0)
@@ -419,14 +441,33 @@ int ocfs2_global_read_dquot(struct dquot *dquot)
419 OCFS2_DQUOT(dquot)->dq_use_count++; 441 OCFS2_DQUOT(dquot)->dq_use_count++;
420 OCFS2_DQUOT(dquot)->dq_origspace = dquot->dq_dqb.dqb_curspace; 442 OCFS2_DQUOT(dquot)->dq_origspace = dquot->dq_dqb.dqb_curspace;
421 OCFS2_DQUOT(dquot)->dq_originodes = dquot->dq_dqb.dqb_curinodes; 443 OCFS2_DQUOT(dquot)->dq_originodes = dquot->dq_dqb.dqb_curinodes;
444 ocfs2_qinfo_unlock(info, 0);
445
422 if (!dquot->dq_off) { /* No real quota entry? */ 446 if (!dquot->dq_off) { /* No real quota entry? */
423 /* Upgrade to exclusive lock for allocation */
424 ocfs2_qinfo_unlock(info, 0);
425 err = ocfs2_qinfo_lock(info, 1);
426 if (err < 0)
427 goto out_qlock;
428 ex = 1; 447 ex = 1;
448 /*
449 * Add blocks to quota file before we start a transaction since
450 * locking allocators ranks above a transaction start
451 */
452 WARN_ON(journal_current_handle());
453 down_write(&OCFS2_I(gqinode)->ip_alloc_sem);
454 err = ocfs2_extend_no_holes(gqinode,
455 gqinode->i_size + (need_alloc << sb->s_blocksize_bits),
456 gqinode->i_size);
457 up_write(&OCFS2_I(gqinode)->ip_alloc_sem);
458 if (err < 0)
459 goto out;
429 } 460 }
461
462 handle = ocfs2_start_trans(osb,
463 ocfs2_calc_global_qinit_credits(sb, type));
464 if (IS_ERR(handle)) {
465 err = PTR_ERR(handle);
466 goto out;
467 }
468 err = ocfs2_qinfo_lock(info, ex);
469 if (err < 0)
470 goto out_trans;
430 err = qtree_write_dquot(&info->dqi_gi, dquot); 471 err = qtree_write_dquot(&info->dqi_gi, dquot);
431 if (ex && info_dirty(sb_dqinfo(dquot->dq_sb, dquot->dq_type))) { 472 if (ex && info_dirty(sb_dqinfo(dquot->dq_sb, dquot->dq_type))) {
432 err2 = __ocfs2_global_write_info(dquot->dq_sb, dquot->dq_type); 473 err2 = __ocfs2_global_write_info(dquot->dq_sb, dquot->dq_type);
@@ -438,6 +479,9 @@ out_qlock:
438 ocfs2_qinfo_unlock(info, 1); 479 ocfs2_qinfo_unlock(info, 1);
439 else 480 else
440 ocfs2_qinfo_unlock(info, 0); 481 ocfs2_qinfo_unlock(info, 0);
482out_trans:
483 if (handle)
484 ocfs2_commit_trans(osb, handle);
441out: 485out:
442 if (err < 0) 486 if (err < 0)
443 mlog_errno(err); 487 mlog_errno(err);
@@ -607,7 +651,7 @@ static void qsync_work_fn(struct work_struct *work)
607 651
608 dquot_scan_active(sb, ocfs2_sync_dquot_helper, oinfo->dqi_type); 652 dquot_scan_active(sb, ocfs2_sync_dquot_helper, oinfo->dqi_type);
609 queue_delayed_work(ocfs2_quota_wq, &oinfo->dqi_sync_work, 653 queue_delayed_work(ocfs2_quota_wq, &oinfo->dqi_sync_work,
610 oinfo->dqi_syncjiff); 654 msecs_to_jiffies(oinfo->dqi_syncms));
611} 655}
612 656
613/* 657/*
@@ -635,20 +679,18 @@ out:
635 return status; 679 return status;
636} 680}
637 681
638int ocfs2_calc_qdel_credits(struct super_block *sb, int type) 682static int ocfs2_calc_qdel_credits(struct super_block *sb, int type)
639{ 683{
640 struct ocfs2_mem_dqinfo *oinfo; 684 struct ocfs2_mem_dqinfo *oinfo = sb_dqinfo(sb, type)->dqi_priv;
641 int features[MAXQUOTAS] = { OCFS2_FEATURE_RO_COMPAT_USRQUOTA, 685 /*
642 OCFS2_FEATURE_RO_COMPAT_GRPQUOTA }; 686 * We modify tree, leaf block, global info, local chunk header,
643 687 * global and local inode; OCFS2_QINFO_WRITE_CREDITS already
644 if (!OCFS2_HAS_RO_COMPAT_FEATURE(sb, features[type])) 688 * accounts for inode update
645 return 0; 689 */
646 690 return (oinfo->dqi_gi.dqi_qtree_depth + 2) *
647 oinfo = sb_dqinfo(sb, type)->dqi_priv; 691 OCFS2_QUOTA_BLOCK_UPDATE_CREDITS +
648 /* We modify tree, leaf block, global info, local chunk header, 692 OCFS2_QINFO_WRITE_CREDITS +
649 * global and local inode */ 693 OCFS2_INODE_UPDATE_CREDITS;
650 return oinfo->dqi_gi.dqi_qtree_depth + 2 + 1 +
651 2 * OCFS2_INODE_UPDATE_CREDITS;
652} 694}
653 695
654static int ocfs2_release_dquot(struct dquot *dquot) 696static int ocfs2_release_dquot(struct dquot *dquot)
@@ -680,33 +722,10 @@ out:
680 return status; 722 return status;
681} 723}
682 724
683int ocfs2_calc_qinit_credits(struct super_block *sb, int type)
684{
685 struct ocfs2_mem_dqinfo *oinfo;
686 int features[MAXQUOTAS] = { OCFS2_FEATURE_RO_COMPAT_USRQUOTA,
687 OCFS2_FEATURE_RO_COMPAT_GRPQUOTA };
688 struct ocfs2_dinode *lfe, *gfe;
689
690 if (!OCFS2_HAS_RO_COMPAT_FEATURE(sb, features[type]))
691 return 0;
692
693 oinfo = sb_dqinfo(sb, type)->dqi_priv;
694 gfe = (struct ocfs2_dinode *)oinfo->dqi_gqi_bh->b_data;
695 lfe = (struct ocfs2_dinode *)oinfo->dqi_lqi_bh->b_data;
696 /* We can extend local file + global file. In local file we
697 * can modify info, chunk header block and dquot block. In
698 * global file we can modify info, tree and leaf block */
699 return ocfs2_calc_extend_credits(sb, &lfe->id2.i_list, 0) +
700 ocfs2_calc_extend_credits(sb, &gfe->id2.i_list, 0) +
701 3 + oinfo->dqi_gi.dqi_qtree_depth + 2;
702}
703
704static int ocfs2_acquire_dquot(struct dquot *dquot) 725static int ocfs2_acquire_dquot(struct dquot *dquot)
705{ 726{
706 handle_t *handle;
707 struct ocfs2_mem_dqinfo *oinfo = 727 struct ocfs2_mem_dqinfo *oinfo =
708 sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv; 728 sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv;
709 struct ocfs2_super *osb = OCFS2_SB(dquot->dq_sb);
710 int status = 0; 729 int status = 0;
711 730
712 mlog_entry("id=%u, type=%d", dquot->dq_id, dquot->dq_type); 731 mlog_entry("id=%u, type=%d", dquot->dq_id, dquot->dq_type);
@@ -715,16 +734,7 @@ static int ocfs2_acquire_dquot(struct dquot *dquot)
715 status = ocfs2_lock_global_qf(oinfo, 1); 734 status = ocfs2_lock_global_qf(oinfo, 1);
716 if (status < 0) 735 if (status < 0)
717 goto out; 736 goto out;
718 handle = ocfs2_start_trans(osb,
719 ocfs2_calc_qinit_credits(dquot->dq_sb, dquot->dq_type));
720 if (IS_ERR(handle)) {
721 status = PTR_ERR(handle);
722 mlog_errno(status);
723 goto out_ilock;
724 }
725 status = dquot_acquire(dquot); 737 status = dquot_acquire(dquot);
726 ocfs2_commit_trans(osb, handle);
727out_ilock:
728 ocfs2_unlock_global_qf(oinfo, 1); 738 ocfs2_unlock_global_qf(oinfo, 1);
729out: 739out:
730 mlog_exit(status); 740 mlog_exit(status);
diff --git a/fs/ocfs2/quota_local.c b/fs/ocfs2/quota_local.c
index 5a460fa8255..bdb09cb6e1f 100644
--- a/fs/ocfs2/quota_local.c
+++ b/fs/ocfs2/quota_local.c
@@ -20,6 +20,7 @@
20#include "sysfile.h" 20#include "sysfile.h"
21#include "dlmglue.h" 21#include "dlmglue.h"
22#include "quota.h" 22#include "quota.h"
23#include "uptodate.h"
23 24
24/* Number of local quota structures per block */ 25/* Number of local quota structures per block */
25static inline unsigned int ol_quota_entries_per_block(struct super_block *sb) 26static inline unsigned int ol_quota_entries_per_block(struct super_block *sb)
@@ -100,7 +101,8 @@ static int ocfs2_modify_bh(struct inode *inode, struct buffer_head *bh,
100 handle_t *handle; 101 handle_t *handle;
101 int status; 102 int status;
102 103
103 handle = ocfs2_start_trans(OCFS2_SB(sb), 1); 104 handle = ocfs2_start_trans(OCFS2_SB(sb),
105 OCFS2_QUOTA_BLOCK_UPDATE_CREDITS);
104 if (IS_ERR(handle)) { 106 if (IS_ERR(handle)) {
105 status = PTR_ERR(handle); 107 status = PTR_ERR(handle);
106 mlog_errno(status); 108 mlog_errno(status);
@@ -610,7 +612,8 @@ int ocfs2_finish_quota_recovery(struct ocfs2_super *osb,
610 goto out_bh; 612 goto out_bh;
611 /* Mark quota file as clean if we are recovering quota file of 613 /* Mark quota file as clean if we are recovering quota file of
612 * some other node. */ 614 * some other node. */
613 handle = ocfs2_start_trans(osb, 1); 615 handle = ocfs2_start_trans(osb,
616 OCFS2_LOCAL_QINFO_WRITE_CREDITS);
614 if (IS_ERR(handle)) { 617 if (IS_ERR(handle)) {
615 status = PTR_ERR(handle); 618 status = PTR_ERR(handle);
616 mlog_errno(status); 619 mlog_errno(status);
@@ -940,7 +943,7 @@ static struct ocfs2_quota_chunk *ocfs2_local_quota_add_chunk(
940 struct ocfs2_local_disk_chunk *dchunk; 943 struct ocfs2_local_disk_chunk *dchunk;
941 int status; 944 int status;
942 handle_t *handle; 945 handle_t *handle;
943 struct buffer_head *bh = NULL; 946 struct buffer_head *bh = NULL, *dbh = NULL;
944 u64 p_blkno; 947 u64 p_blkno;
945 948
946 /* We are protected by dqio_sem so no locking needed */ 949 /* We are protected by dqio_sem so no locking needed */
@@ -964,32 +967,35 @@ static struct ocfs2_quota_chunk *ocfs2_local_quota_add_chunk(
964 mlog_errno(status); 967 mlog_errno(status);
965 goto out; 968 goto out;
966 } 969 }
970 /* Local quota info and two new blocks we initialize */
971 handle = ocfs2_start_trans(OCFS2_SB(sb),
972 OCFS2_LOCAL_QINFO_WRITE_CREDITS +
973 2 * OCFS2_QUOTA_BLOCK_UPDATE_CREDITS);
974 if (IS_ERR(handle)) {
975 status = PTR_ERR(handle);
976 mlog_errno(status);
977 goto out;
978 }
967 979
980 /* Initialize chunk header */
968 down_read(&OCFS2_I(lqinode)->ip_alloc_sem); 981 down_read(&OCFS2_I(lqinode)->ip_alloc_sem);
969 status = ocfs2_extent_map_get_blocks(lqinode, oinfo->dqi_blocks, 982 status = ocfs2_extent_map_get_blocks(lqinode, oinfo->dqi_blocks,
970 &p_blkno, NULL, NULL); 983 &p_blkno, NULL, NULL);
971 up_read(&OCFS2_I(lqinode)->ip_alloc_sem); 984 up_read(&OCFS2_I(lqinode)->ip_alloc_sem);
972 if (status < 0) { 985 if (status < 0) {
973 mlog_errno(status); 986 mlog_errno(status);
974 goto out; 987 goto out_trans;
975 } 988 }
976 bh = sb_getblk(sb, p_blkno); 989 bh = sb_getblk(sb, p_blkno);
977 if (!bh) { 990 if (!bh) {
978 status = -ENOMEM; 991 status = -ENOMEM;
979 mlog_errno(status); 992 mlog_errno(status);
980 goto out; 993 goto out_trans;
981 } 994 }
982 dchunk = (struct ocfs2_local_disk_chunk *)bh->b_data; 995 dchunk = (struct ocfs2_local_disk_chunk *)bh->b_data;
983 996 ocfs2_set_new_buffer_uptodate(lqinode, bh);
984 handle = ocfs2_start_trans(OCFS2_SB(sb), 2);
985 if (IS_ERR(handle)) {
986 status = PTR_ERR(handle);
987 mlog_errno(status);
988 goto out;
989 }
990
991 status = ocfs2_journal_access_dq(handle, lqinode, bh, 997 status = ocfs2_journal_access_dq(handle, lqinode, bh,
992 OCFS2_JOURNAL_ACCESS_WRITE); 998 OCFS2_JOURNAL_ACCESS_CREATE);
993 if (status < 0) { 999 if (status < 0) {
994 mlog_errno(status); 1000 mlog_errno(status);
995 goto out_trans; 1001 goto out_trans;
@@ -999,7 +1005,6 @@ static struct ocfs2_quota_chunk *ocfs2_local_quota_add_chunk(
999 memset(dchunk->dqc_bitmap, 0, 1005 memset(dchunk->dqc_bitmap, 0,
1000 sb->s_blocksize - sizeof(struct ocfs2_local_disk_chunk) - 1006 sb->s_blocksize - sizeof(struct ocfs2_local_disk_chunk) -
1001 OCFS2_QBLK_RESERVED_SPACE); 1007 OCFS2_QBLK_RESERVED_SPACE);
1002 set_buffer_uptodate(bh);
1003 unlock_buffer(bh); 1008 unlock_buffer(bh);
1004 status = ocfs2_journal_dirty(handle, bh); 1009 status = ocfs2_journal_dirty(handle, bh);
1005 if (status < 0) { 1010 if (status < 0) {
@@ -1007,6 +1012,38 @@ static struct ocfs2_quota_chunk *ocfs2_local_quota_add_chunk(
1007 goto out_trans; 1012 goto out_trans;
1008 } 1013 }
1009 1014
1015 /* Initialize new block with structures */
1016 down_read(&OCFS2_I(lqinode)->ip_alloc_sem);
1017 status = ocfs2_extent_map_get_blocks(lqinode, oinfo->dqi_blocks + 1,
1018 &p_blkno, NULL, NULL);
1019 up_read(&OCFS2_I(lqinode)->ip_alloc_sem);
1020 if (status < 0) {
1021 mlog_errno(status);
1022 goto out_trans;
1023 }
1024 dbh = sb_getblk(sb, p_blkno);
1025 if (!dbh) {
1026 status = -ENOMEM;
1027 mlog_errno(status);
1028 goto out_trans;
1029 }
1030 ocfs2_set_new_buffer_uptodate(lqinode, dbh);
1031 status = ocfs2_journal_access_dq(handle, lqinode, dbh,
1032 OCFS2_JOURNAL_ACCESS_CREATE);
1033 if (status < 0) {
1034 mlog_errno(status);
1035 goto out_trans;
1036 }
1037 lock_buffer(dbh);
1038 memset(dbh->b_data, 0, sb->s_blocksize - OCFS2_QBLK_RESERVED_SPACE);
1039 unlock_buffer(dbh);
1040 status = ocfs2_journal_dirty(handle, dbh);
1041 if (status < 0) {
1042 mlog_errno(status);
1043 goto out_trans;
1044 }
1045
1046 /* Update local quotafile info */
1010 oinfo->dqi_blocks += 2; 1047 oinfo->dqi_blocks += 2;
1011 oinfo->dqi_chunks++; 1048 oinfo->dqi_chunks++;
1012 status = ocfs2_local_write_info(sb, type); 1049 status = ocfs2_local_write_info(sb, type);
@@ -1031,6 +1068,7 @@ out_trans:
1031 ocfs2_commit_trans(OCFS2_SB(sb), handle); 1068 ocfs2_commit_trans(OCFS2_SB(sb), handle);
1032out: 1069out:
1033 brelse(bh); 1070 brelse(bh);
1071 brelse(dbh);
1034 kmem_cache_free(ocfs2_qf_chunk_cachep, chunk); 1072 kmem_cache_free(ocfs2_qf_chunk_cachep, chunk);
1035 return ERR_PTR(status); 1073 return ERR_PTR(status);
1036} 1074}
@@ -1048,6 +1086,8 @@ static struct ocfs2_quota_chunk *ocfs2_extend_local_quota_file(
1048 struct ocfs2_local_disk_chunk *dchunk; 1086 struct ocfs2_local_disk_chunk *dchunk;
1049 int epb = ol_quota_entries_per_block(sb); 1087 int epb = ol_quota_entries_per_block(sb);
1050 unsigned int chunk_blocks; 1088 unsigned int chunk_blocks;
1089 struct buffer_head *bh;
1090 u64 p_blkno;
1051 int status; 1091 int status;
1052 handle_t *handle; 1092 handle_t *handle;
1053 1093
@@ -1075,12 +1115,49 @@ static struct ocfs2_quota_chunk *ocfs2_extend_local_quota_file(
1075 mlog_errno(status); 1115 mlog_errno(status);
1076 goto out; 1116 goto out;
1077 } 1117 }
1078 handle = ocfs2_start_trans(OCFS2_SB(sb), 2); 1118
1119 /* Get buffer from the just added block */
1120 down_read(&OCFS2_I(lqinode)->ip_alloc_sem);
1121 status = ocfs2_extent_map_get_blocks(lqinode, oinfo->dqi_blocks,
1122 &p_blkno, NULL, NULL);
1123 up_read(&OCFS2_I(lqinode)->ip_alloc_sem);
1124 if (status < 0) {
1125 mlog_errno(status);
1126 goto out;
1127 }
1128 bh = sb_getblk(sb, p_blkno);
1129 if (!bh) {
1130 status = -ENOMEM;
1131 mlog_errno(status);
1132 goto out;
1133 }
1134 ocfs2_set_new_buffer_uptodate(lqinode, bh);
1135
1136 /* Local quota info, chunk header and the new block we initialize */
1137 handle = ocfs2_start_trans(OCFS2_SB(sb),
1138 OCFS2_LOCAL_QINFO_WRITE_CREDITS +
1139 2 * OCFS2_QUOTA_BLOCK_UPDATE_CREDITS);
1079 if (IS_ERR(handle)) { 1140 if (IS_ERR(handle)) {
1080 status = PTR_ERR(handle); 1141 status = PTR_ERR(handle);
1081 mlog_errno(status); 1142 mlog_errno(status);
1082 goto out; 1143 goto out;
1083 } 1144 }
1145 /* Zero created block */
1146 status = ocfs2_journal_access_dq(handle, lqinode, bh,
1147 OCFS2_JOURNAL_ACCESS_CREATE);
1148 if (status < 0) {
1149 mlog_errno(status);
1150 goto out_trans;
1151 }
1152 lock_buffer(bh);
1153 memset(bh->b_data, 0, sb->s_blocksize);
1154 unlock_buffer(bh);
1155 status = ocfs2_journal_dirty(handle, bh);
1156 if (status < 0) {
1157 mlog_errno(status);
1158 goto out_trans;
1159 }
1160 /* Update chunk header */
1084 status = ocfs2_journal_access_dq(handle, lqinode, chunk->qc_headerbh, 1161 status = ocfs2_journal_access_dq(handle, lqinode, chunk->qc_headerbh,
1085 OCFS2_JOURNAL_ACCESS_WRITE); 1162 OCFS2_JOURNAL_ACCESS_WRITE);
1086 if (status < 0) { 1163 if (status < 0) {
@@ -1097,6 +1174,7 @@ static struct ocfs2_quota_chunk *ocfs2_extend_local_quota_file(
1097 mlog_errno(status); 1174 mlog_errno(status);
1098 goto out_trans; 1175 goto out_trans;
1099 } 1176 }
1177 /* Update file header */
1100 oinfo->dqi_blocks++; 1178 oinfo->dqi_blocks++;
1101 status = ocfs2_local_write_info(sb, type); 1179 status = ocfs2_local_write_info(sb, type);
1102 if (status < 0) { 1180 if (status < 0) {
diff --git a/fs/ocfs2/stack_o2cb.c b/fs/ocfs2/stack_o2cb.c
index 3f661376a2d..e49c4105026 100644
--- a/fs/ocfs2/stack_o2cb.c
+++ b/fs/ocfs2/stack_o2cb.c
@@ -17,6 +17,7 @@
17 * General Public License for more details. 17 * General Public License for more details.
18 */ 18 */
19 19
20#include <linux/kernel.h>
20#include <linux/crc32.h> 21#include <linux/crc32.h>
21#include <linux/module.h> 22#include <linux/module.h>
22 23
@@ -153,7 +154,7 @@ static int status_map[] = {
153 154
154static int dlm_status_to_errno(enum dlm_status status) 155static int dlm_status_to_errno(enum dlm_status status)
155{ 156{
156 BUG_ON(status > (sizeof(status_map) / sizeof(status_map[0]))); 157 BUG_ON(status < 0 || status >= ARRAY_SIZE(status_map));
157 158
158 return status_map[status]; 159 return status_map[status];
159} 160}
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 7efb349fb9b..b0ee0fdf799 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -777,6 +777,7 @@ static int ocfs2_sb_probe(struct super_block *sb,
777 } 777 }
778 di = (struct ocfs2_dinode *) (*bh)->b_data; 778 di = (struct ocfs2_dinode *) (*bh)->b_data;
779 memset(stats, 0, sizeof(struct ocfs2_blockcheck_stats)); 779 memset(stats, 0, sizeof(struct ocfs2_blockcheck_stats));
780 spin_lock_init(&stats->b_lock);
780 status = ocfs2_verify_volume(di, *bh, blksize, stats); 781 status = ocfs2_verify_volume(di, *bh, blksize, stats);
781 if (status >= 0) 782 if (status >= 0)
782 goto bail; 783 goto bail;
@@ -1182,7 +1183,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
1182 wake_up(&osb->osb_mount_event); 1183 wake_up(&osb->osb_mount_event);
1183 1184
1184 /* Start this when the mount is almost sure of being successful */ 1185 /* Start this when the mount is almost sure of being successful */
1185 ocfs2_orphan_scan_init(osb); 1186 ocfs2_orphan_scan_start(osb);
1186 1187
1187 mlog_exit(status); 1188 mlog_exit(status);
1188 return status; 1189 return status;
@@ -1213,14 +1214,27 @@ static int ocfs2_get_sb(struct file_system_type *fs_type,
1213 mnt); 1214 mnt);
1214} 1215}
1215 1216
1217static void ocfs2_kill_sb(struct super_block *sb)
1218{
1219 struct ocfs2_super *osb = OCFS2_SB(sb);
1220
1221 /* Prevent further queueing of inode drop events */
1222 spin_lock(&dentry_list_lock);
1223 ocfs2_set_osb_flag(osb, OCFS2_OSB_DROP_DENTRY_LOCK_IMMED);
1224 spin_unlock(&dentry_list_lock);
1225 /* Wait for work to finish and/or remove it */
1226 cancel_work_sync(&osb->dentry_lock_work);
1227
1228 kill_block_super(sb);
1229}
1230
1216static struct file_system_type ocfs2_fs_type = { 1231static struct file_system_type ocfs2_fs_type = {
1217 .owner = THIS_MODULE, 1232 .owner = THIS_MODULE,
1218 .name = "ocfs2", 1233 .name = "ocfs2",
1219 .get_sb = ocfs2_get_sb, /* is this called when we mount 1234 .get_sb = ocfs2_get_sb, /* is this called when we mount
1220 * the fs? */ 1235 * the fs? */
1221 .kill_sb = kill_block_super, /* set to the generic one 1236 .kill_sb = ocfs2_kill_sb,
1222 * right now, but do we 1237
1223 * need to change that? */
1224 .fs_flags = FS_REQUIRES_DEV|FS_RENAME_DOES_D_MOVE, 1238 .fs_flags = FS_REQUIRES_DEV|FS_RENAME_DOES_D_MOVE,
1225 .next = NULL 1239 .next = NULL
1226}; 1240};
@@ -1819,6 +1833,12 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err)
1819 1833
1820 debugfs_remove(osb->osb_ctxt); 1834 debugfs_remove(osb->osb_ctxt);
1821 1835
1836 /*
1837 * Flush inode dropping work queue so that deletes are
1838 * performed while the filesystem is still working
1839 */
1840 ocfs2_drop_all_dl_inodes(osb);
1841
1822 /* Orphan scan should be stopped as early as possible */ 1842 /* Orphan scan should be stopped as early as possible */
1823 ocfs2_orphan_scan_stop(osb); 1843 ocfs2_orphan_scan_stop(osb);
1824 1844
@@ -1981,6 +2001,8 @@ static int ocfs2_initialize_super(struct super_block *sb,
1981 snprintf(osb->dev_str, sizeof(osb->dev_str), "%u,%u", 2001 snprintf(osb->dev_str, sizeof(osb->dev_str), "%u,%u",
1982 MAJOR(osb->sb->s_dev), MINOR(osb->sb->s_dev)); 2002 MAJOR(osb->sb->s_dev), MINOR(osb->sb->s_dev));
1983 2003
2004 ocfs2_orphan_scan_init(osb);
2005
1984 status = ocfs2_recovery_init(osb); 2006 status = ocfs2_recovery_init(osb);
1985 if (status) { 2007 if (status) {
1986 mlog(ML_ERROR, "Unable to initialize recovery state\n"); 2008 mlog(ML_ERROR, "Unable to initialize recovery state\n");
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index ba320e25074..d1a27cda984 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1052,7 +1052,8 @@ static int ocfs2_xattr_block_get(struct inode *inode,
1052 struct ocfs2_xattr_block *xb; 1052 struct ocfs2_xattr_block *xb;
1053 struct ocfs2_xattr_value_root *xv; 1053 struct ocfs2_xattr_value_root *xv;
1054 size_t size; 1054 size_t size;
1055 int ret = -ENODATA, name_offset, name_len, block_off, i; 1055 int ret = -ENODATA, name_offset, name_len, i;
1056 int uninitialized_var(block_off);
1056 1057
1057 xs->bucket = ocfs2_xattr_bucket_new(inode); 1058 xs->bucket = ocfs2_xattr_bucket_new(inode);
1058 if (!xs->bucket) { 1059 if (!xs->bucket) {
diff --git a/fs/pipe.c b/fs/pipe.c
index f7dd21ad85a..52c41511483 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -68,8 +68,8 @@ void pipe_double_lock(struct pipe_inode_info *pipe1,
68 pipe_lock_nested(pipe1, I_MUTEX_PARENT); 68 pipe_lock_nested(pipe1, I_MUTEX_PARENT);
69 pipe_lock_nested(pipe2, I_MUTEX_CHILD); 69 pipe_lock_nested(pipe2, I_MUTEX_CHILD);
70 } else { 70 } else {
71 pipe_lock_nested(pipe2, I_MUTEX_CHILD); 71 pipe_lock_nested(pipe2, I_MUTEX_PARENT);
72 pipe_lock_nested(pipe1, I_MUTEX_PARENT); 72 pipe_lock_nested(pipe1, I_MUTEX_CHILD);
73 } 73 }
74} 74}
75 75
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 3ce5ae9e3d2..175db258942 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -234,23 +234,20 @@ static int check_mem_permission(struct task_struct *task)
234 234
235struct mm_struct *mm_for_maps(struct task_struct *task) 235struct mm_struct *mm_for_maps(struct task_struct *task)
236{ 236{
237 struct mm_struct *mm = get_task_mm(task); 237 struct mm_struct *mm;
238 if (!mm) 238
239 if (mutex_lock_killable(&task->cred_guard_mutex))
239 return NULL; 240 return NULL;
240 down_read(&mm->mmap_sem); 241
241 task_lock(task); 242 mm = get_task_mm(task);
242 if (task->mm != mm) 243 if (mm && mm != current->mm &&
243 goto out; 244 !ptrace_may_access(task, PTRACE_MODE_READ)) {
244 if (task->mm != current->mm && 245 mmput(mm);
245 __ptrace_may_access(task, PTRACE_MODE_READ) < 0) 246 mm = NULL;
246 goto out; 247 }
247 task_unlock(task); 248 mutex_unlock(&task->cred_guard_mutex);
249
248 return mm; 250 return mm;
249out:
250 task_unlock(task);
251 up_read(&mm->mmap_sem);
252 mmput(mm);
253 return NULL;
254} 251}
255 252
256static int proc_pid_cmdline(struct task_struct *task, char * buffer) 253static int proc_pid_cmdline(struct task_struct *task, char * buffer)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 6f61b7cc32e..9bd8be1d235 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -119,6 +119,7 @@ static void *m_start(struct seq_file *m, loff_t *pos)
119 mm = mm_for_maps(priv->task); 119 mm = mm_for_maps(priv->task);
120 if (!mm) 120 if (!mm)
121 return NULL; 121 return NULL;
122 down_read(&mm->mmap_sem);
122 123
123 tail_vma = get_gate_vma(priv->task); 124 tail_vma = get_gate_vma(priv->task);
124 priv->tail_vma = tail_vma; 125 priv->tail_vma = tail_vma;
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index 64a72e2e765..8f5c05d3dbd 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -189,6 +189,7 @@ static void *m_start(struct seq_file *m, loff_t *pos)
189 priv->task = NULL; 189 priv->task = NULL;
190 return NULL; 190 return NULL;
191 } 191 }
192 down_read(&mm->mmap_sem);
192 193
193 /* start from the Nth VMA */ 194 /* start from the Nth VMA */
194 for (p = rb_first(&mm->mm_rb); p; p = rb_next(p)) 195 for (p = rb_first(&mm->mm_rb); p; p = rb_next(p))
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 70f36c043d6..38f7bd559f3 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -2043,7 +2043,6 @@ static int vfs_load_quota_inode(struct inode *inode, int type, int format_id,
2043 invalidate_bdev(sb->s_bdev); 2043 invalidate_bdev(sb->s_bdev);
2044 } 2044 }
2045 mutex_lock(&dqopt->dqonoff_mutex); 2045 mutex_lock(&dqopt->dqonoff_mutex);
2046 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA);
2047 if (sb_has_quota_loaded(sb, type)) { 2046 if (sb_has_quota_loaded(sb, type)) {
2048 error = -EBUSY; 2047 error = -EBUSY;
2049 goto out_lock; 2048 goto out_lock;
@@ -2054,9 +2053,11 @@ static int vfs_load_quota_inode(struct inode *inode, int type, int format_id,
2054 * possible) Also nobody should write to the file - we use 2053 * possible) Also nobody should write to the file - we use
2055 * special IO operations which ignore the immutable bit. */ 2054 * special IO operations which ignore the immutable bit. */
2056 down_write(&dqopt->dqptr_sem); 2055 down_write(&dqopt->dqptr_sem);
2056 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA);
2057 oldflags = inode->i_flags & (S_NOATIME | S_IMMUTABLE | 2057 oldflags = inode->i_flags & (S_NOATIME | S_IMMUTABLE |
2058 S_NOQUOTA); 2058 S_NOQUOTA);
2059 inode->i_flags |= S_NOQUOTA | S_NOATIME | S_IMMUTABLE; 2059 inode->i_flags |= S_NOQUOTA | S_NOATIME | S_IMMUTABLE;
2060 mutex_unlock(&inode->i_mutex);
2060 up_write(&dqopt->dqptr_sem); 2061 up_write(&dqopt->dqptr_sem);
2061 sb->dq_op->drop(inode); 2062 sb->dq_op->drop(inode);
2062 } 2063 }
@@ -2080,7 +2081,6 @@ static int vfs_load_quota_inode(struct inode *inode, int type, int format_id,
2080 goto out_file_init; 2081 goto out_file_init;
2081 } 2082 }
2082 mutex_unlock(&dqopt->dqio_mutex); 2083 mutex_unlock(&dqopt->dqio_mutex);
2083 mutex_unlock(&inode->i_mutex);
2084 spin_lock(&dq_state_lock); 2084 spin_lock(&dq_state_lock);
2085 dqopt->flags |= dquot_state_flag(flags, type); 2085 dqopt->flags |= dquot_state_flag(flags, type);
2086 spin_unlock(&dq_state_lock); 2086 spin_unlock(&dq_state_lock);
@@ -2096,13 +2096,14 @@ out_file_init:
2096out_lock: 2096out_lock:
2097 if (oldflags != -1) { 2097 if (oldflags != -1) {
2098 down_write(&dqopt->dqptr_sem); 2098 down_write(&dqopt->dqptr_sem);
2099 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA);
2099 /* Set the flags back (in the case of accidental quotaon() 2100 /* Set the flags back (in the case of accidental quotaon()
2100 * on a wrong file we don't want to mess up the flags) */ 2101 * on a wrong file we don't want to mess up the flags) */
2101 inode->i_flags &= ~(S_NOATIME | S_NOQUOTA | S_IMMUTABLE); 2102 inode->i_flags &= ~(S_NOATIME | S_NOQUOTA | S_IMMUTABLE);
2102 inode->i_flags |= oldflags; 2103 inode->i_flags |= oldflags;
2104 mutex_unlock(&inode->i_mutex);
2103 up_write(&dqopt->dqptr_sem); 2105 up_write(&dqopt->dqptr_sem);
2104 } 2106 }
2105 mutex_unlock(&inode->i_mutex);
2106 mutex_unlock(&dqopt->dqonoff_mutex); 2107 mutex_unlock(&dqopt->dqonoff_mutex);
2107out_fmt: 2108out_fmt:
2108 put_quota_format(fmt); 2109 put_quota_format(fmt);
diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c
index ebb2c417912..11f0c06316d 100644
--- a/fs/ramfs/file-nommu.c
+++ b/fs/ramfs/file-nommu.c
@@ -20,6 +20,7 @@
20#include <linux/ramfs.h> 20#include <linux/ramfs.h>
21#include <linux/pagevec.h> 21#include <linux/pagevec.h>
22#include <linux/mman.h> 22#include <linux/mman.h>
23#include <linux/sched.h>
23 24
24#include <asm/uaccess.h> 25#include <asm/uaccess.h>
25#include "internal.h" 26#include "internal.h"
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index d88d0fac9fa..14f2d71ea3c 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -939,8 +939,10 @@ again:
939 /* Remove from old parent's list and insert into new parent's list. */ 939 /* Remove from old parent's list and insert into new parent's list. */
940 sysfs_unlink_sibling(sd); 940 sysfs_unlink_sibling(sd);
941 sysfs_get(new_parent_sd); 941 sysfs_get(new_parent_sd);
942 drop_nlink(old_parent->d_inode);
942 sysfs_put(sd->s_parent); 943 sysfs_put(sd->s_parent);
943 sd->s_parent = new_parent_sd; 944 sd->s_parent = new_parent_sd;
945 inc_nlink(new_parent->d_inode);
944 sysfs_link_sibling(sd); 946 sysfs_link_sibling(sd);
945 947
946 out_unlock: 948 out_unlock:
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 6832135159b..9d1b8c2e6c4 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -1087,11 +1087,23 @@ static int udf_load_vat(struct super_block *sb, int p_index, int type1_index)
1087 struct udf_inode_info *vati; 1087 struct udf_inode_info *vati;
1088 uint32_t pos; 1088 uint32_t pos;
1089 struct virtualAllocationTable20 *vat20; 1089 struct virtualAllocationTable20 *vat20;
1090 sector_t blocks = sb->s_bdev->bd_inode->i_size >> sb->s_blocksize_bits;
1090 1091
1091 /* VAT file entry is in the last recorded block */ 1092 /* VAT file entry is in the last recorded block */
1092 ino.partitionReferenceNum = type1_index; 1093 ino.partitionReferenceNum = type1_index;
1093 ino.logicalBlockNum = sbi->s_last_block - map->s_partition_root; 1094 ino.logicalBlockNum = sbi->s_last_block - map->s_partition_root;
1094 sbi->s_vat_inode = udf_iget(sb, &ino); 1095 sbi->s_vat_inode = udf_iget(sb, &ino);
1096 if (!sbi->s_vat_inode &&
1097 sbi->s_last_block != blocks - 1) {
1098 printk(KERN_NOTICE "UDF-fs: Failed to read VAT inode from the"
1099 " last recorded block (%lu), retrying with the last "
1100 "block of the device (%lu).\n",
1101 (unsigned long)sbi->s_last_block,
1102 (unsigned long)blocks - 1);
1103 ino.partitionReferenceNum = type1_index;
1104 ino.logicalBlockNum = blocks - 1 - map->s_partition_root;
1105 sbi->s_vat_inode = udf_iget(sb, &ino);
1106 }
1095 if (!sbi->s_vat_inode) 1107 if (!sbi->s_vat_inode)
1096 return 1; 1108 return 1;
1097 1109
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index 7ec89fc05b2..aecf2519db7 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -1268,6 +1268,14 @@ xfs_vm_writepage(
1268 if (!page_has_buffers(page)) 1268 if (!page_has_buffers(page))
1269 create_empty_buffers(page, 1 << inode->i_blkbits, 0); 1269 create_empty_buffers(page, 1 << inode->i_blkbits, 0);
1270 1270
1271
1272 /*
1273 * VM calculation for nr_to_write seems off. Bump it way
1274 * up, this gets simple streaming writes zippy again.
1275 * To be reviewed again after Jens' writeback changes.
1276 */
1277 wbc->nr_to_write *= 4;
1278
1271 /* 1279 /*
1272 * Convert delayed allocate, unwritten or unmapped space 1280 * Convert delayed allocate, unwritten or unmapped space
1273 * to real space and flush out to disk. 1281 * to real space and flush out to disk.
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index 0c93c7ef3d1..965df1227d6 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -770,7 +770,7 @@ xfs_buf_associate_memory(
770 bp->b_pages = NULL; 770 bp->b_pages = NULL;
771 bp->b_addr = mem; 771 bp->b_addr = mem;
772 772
773 rval = _xfs_buf_get_pages(bp, page_count, 0); 773 rval = _xfs_buf_get_pages(bp, page_count, XBF_DONT_BLOCK);
774 if (rval) 774 if (rval)
775 return rval; 775 return rval;
776 776
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
index 58973bb4603..8070b34cc28 100644
--- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -680,8 +680,8 @@ xfs_vn_fiemap(
680 else 680 else
681 bm.bmv_length = BTOBB(length); 681 bm.bmv_length = BTOBB(length);
682 682
683 /* our formatter will tell xfs_getbmap when to stop. */ 683 /* We add one because in getbmap world count includes the header */
684 bm.bmv_count = MAXEXTNUM; 684 bm.bmv_count = fieinfo->fi_extents_max + 1;
685 bm.bmv_iflags = BMV_IF_PREALLOC; 685 bm.bmv_iflags = BMV_IF_PREALLOC;
686 if (fieinfo->fi_flags & FIEMAP_FLAG_XATTR) 686 if (fieinfo->fi_flags & FIEMAP_FLAG_XATTR)
687 bm.bmv_iflags |= BMV_IF_ATTRFORK; 687 bm.bmv_iflags |= BMV_IF_ATTRFORK;
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c
index db15feb906f..4ece1906bd4 100644
--- a/fs/xfs/xfs_attr.c
+++ b/fs/xfs/xfs_attr.c
@@ -2010,7 +2010,9 @@ xfs_attr_rmtval_get(xfs_da_args_t *args)
2010 dblkno = XFS_FSB_TO_DADDR(mp, map[i].br_startblock); 2010 dblkno = XFS_FSB_TO_DADDR(mp, map[i].br_startblock);
2011 blkcnt = XFS_FSB_TO_BB(mp, map[i].br_blockcount); 2011 blkcnt = XFS_FSB_TO_BB(mp, map[i].br_blockcount);
2012 error = xfs_read_buf(mp, mp->m_ddev_targp, dblkno, 2012 error = xfs_read_buf(mp, mp->m_ddev_targp, dblkno,
2013 blkcnt, XFS_BUF_LOCK, &bp); 2013 blkcnt,
2014 XFS_BUF_LOCK | XBF_DONT_BLOCK,
2015 &bp);
2014 if (error) 2016 if (error)
2015 return(error); 2017 return(error);
2016 2018
@@ -2141,8 +2143,8 @@ xfs_attr_rmtval_set(xfs_da_args_t *args)
2141 dblkno = XFS_FSB_TO_DADDR(mp, map.br_startblock), 2143 dblkno = XFS_FSB_TO_DADDR(mp, map.br_startblock),
2142 blkcnt = XFS_FSB_TO_BB(mp, map.br_blockcount); 2144 blkcnt = XFS_FSB_TO_BB(mp, map.br_blockcount);
2143 2145
2144 bp = xfs_buf_get_flags(mp->m_ddev_targp, dblkno, 2146 bp = xfs_buf_get_flags(mp->m_ddev_targp, dblkno, blkcnt,
2145 blkcnt, XFS_BUF_LOCK); 2147 XFS_BUF_LOCK | XBF_DONT_BLOCK);
2146 ASSERT(bp); 2148 ASSERT(bp);
2147 ASSERT(!XFS_BUF_GETERROR(bp)); 2149 ASSERT(!XFS_BUF_GETERROR(bp));
2148 2150
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index 7928b9983c1..8ee5b5a76a2 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -6009,7 +6009,7 @@ xfs_getbmap(
6009 */ 6009 */
6010 error = ENOMEM; 6010 error = ENOMEM;
6011 subnex = 16; 6011 subnex = 16;
6012 map = kmem_alloc(subnex * sizeof(*map), KM_MAYFAIL); 6012 map = kmem_alloc(subnex * sizeof(*map), KM_MAYFAIL | KM_NOFS);
6013 if (!map) 6013 if (!map)
6014 goto out_unlock_ilock; 6014 goto out_unlock_ilock;
6015 6015
diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c
index e9df9957482..26717388acf 100644
--- a/fs/xfs/xfs_btree.c
+++ b/fs/xfs/xfs_btree.c
@@ -120,8 +120,8 @@ xfs_btree_check_sblock(
120 XFS_RANDOM_BTREE_CHECK_SBLOCK))) { 120 XFS_RANDOM_BTREE_CHECK_SBLOCK))) {
121 if (bp) 121 if (bp)
122 xfs_buftrace("SBTREE ERROR", bp); 122 xfs_buftrace("SBTREE ERROR", bp);
123 XFS_ERROR_REPORT("xfs_btree_check_sblock", XFS_ERRLEVEL_LOW, 123 XFS_CORRUPTION_ERROR("xfs_btree_check_sblock",
124 cur->bc_mp); 124 XFS_ERRLEVEL_LOW, cur->bc_mp, block);
125 return XFS_ERROR(EFSCORRUPTED); 125 return XFS_ERROR(EFSCORRUPTED);
126 } 126 }
127 return 0; 127 return 0;
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c
index 9ff6e57a507..2847bbc1c53 100644
--- a/fs/xfs/xfs_da_btree.c
+++ b/fs/xfs/xfs_da_btree.c
@@ -2201,7 +2201,7 @@ kmem_zone_t *xfs_dabuf_zone; /* dabuf zone */
2201xfs_da_state_t * 2201xfs_da_state_t *
2202xfs_da_state_alloc(void) 2202xfs_da_state_alloc(void)
2203{ 2203{
2204 return kmem_zone_zalloc(xfs_da_state_zone, KM_SLEEP); 2204 return kmem_zone_zalloc(xfs_da_state_zone, KM_NOFS);
2205} 2205}
2206 2206
2207/* 2207/*
@@ -2261,9 +2261,9 @@ xfs_da_buf_make(int nbuf, xfs_buf_t **bps, inst_t *ra)
2261 int off; 2261 int off;
2262 2262
2263 if (nbuf == 1) 2263 if (nbuf == 1)
2264 dabuf = kmem_zone_alloc(xfs_dabuf_zone, KM_SLEEP); 2264 dabuf = kmem_zone_alloc(xfs_dabuf_zone, KM_NOFS);
2265 else 2265 else
2266 dabuf = kmem_alloc(XFS_DA_BUF_SIZE(nbuf), KM_SLEEP); 2266 dabuf = kmem_alloc(XFS_DA_BUF_SIZE(nbuf), KM_NOFS);
2267 dabuf->dirty = 0; 2267 dabuf->dirty = 0;
2268#ifdef XFS_DABUF_DEBUG 2268#ifdef XFS_DABUF_DEBUG
2269 dabuf->ra = ra; 2269 dabuf->ra = ra;
diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c
index c657bec6d95..bb1d58eb398 100644
--- a/fs/xfs/xfs_dir2.c
+++ b/fs/xfs/xfs_dir2.c
@@ -256,7 +256,7 @@ xfs_dir_cilookup_result(
256 !(args->op_flags & XFS_DA_OP_CILOOKUP)) 256 !(args->op_flags & XFS_DA_OP_CILOOKUP))
257 return EEXIST; 257 return EEXIST;
258 258
259 args->value = kmem_alloc(len, KM_MAYFAIL); 259 args->value = kmem_alloc(len, KM_NOFS | KM_MAYFAIL);
260 if (!args->value) 260 if (!args->value)
261 return ENOMEM; 261 return ENOMEM;
262 262
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index cbd451bb484..2d0b3e1da9e 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -167,17 +167,25 @@ xfs_growfs_data_private(
167 new = nb - mp->m_sb.sb_dblocks; 167 new = nb - mp->m_sb.sb_dblocks;
168 oagcount = mp->m_sb.sb_agcount; 168 oagcount = mp->m_sb.sb_agcount;
169 if (nagcount > oagcount) { 169 if (nagcount > oagcount) {
170 void *new_perag, *old_perag;
171
170 xfs_filestream_flush(mp); 172 xfs_filestream_flush(mp);
173
174 new_perag = kmem_zalloc(sizeof(xfs_perag_t) * nagcount,
175 KM_MAYFAIL);
176 if (!new_perag)
177 return XFS_ERROR(ENOMEM);
178
171 down_write(&mp->m_peraglock); 179 down_write(&mp->m_peraglock);
172 mp->m_perag = kmem_realloc(mp->m_perag, 180 memcpy(new_perag, mp->m_perag, sizeof(xfs_perag_t) * oagcount);
173 sizeof(xfs_perag_t) * nagcount, 181 old_perag = mp->m_perag;
174 sizeof(xfs_perag_t) * oagcount, 182 mp->m_perag = new_perag;
175 KM_SLEEP); 183
176 memset(&mp->m_perag[oagcount], 0,
177 (nagcount - oagcount) * sizeof(xfs_perag_t));
178 mp->m_flags |= XFS_MOUNT_32BITINODES; 184 mp->m_flags |= XFS_MOUNT_32BITINODES;
179 nagimax = xfs_initialize_perag(mp, nagcount); 185 nagimax = xfs_initialize_perag(mp, nagcount);
180 up_write(&mp->m_peraglock); 186 up_write(&mp->m_peraglock);
187
188 kmem_free(old_perag);
181 } 189 }
182 tp = xfs_trans_alloc(mp, XFS_TRANS_GROWFS); 190 tp = xfs_trans_alloc(mp, XFS_TRANS_GROWFS);
183 tp->t_flags |= XFS_TRANS_RESERVE; 191 tp->t_flags |= XFS_TRANS_RESERVE;
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c
index 5fcec6f020a..34ec86923f7 100644
--- a/fs/xfs/xfs_iget.c
+++ b/fs/xfs/xfs_iget.c
@@ -64,6 +64,10 @@ xfs_inode_alloc(
64 ip = kmem_zone_alloc(xfs_inode_zone, KM_SLEEP); 64 ip = kmem_zone_alloc(xfs_inode_zone, KM_SLEEP);
65 if (!ip) 65 if (!ip)
66 return NULL; 66 return NULL;
67 if (inode_init_always(mp->m_super, VFS_I(ip))) {
68 kmem_zone_free(xfs_inode_zone, ip);
69 return NULL;
70 }
67 71
68 ASSERT(atomic_read(&ip->i_iocount) == 0); 72 ASSERT(atomic_read(&ip->i_iocount) == 0);
69 ASSERT(atomic_read(&ip->i_pincount) == 0); 73 ASSERT(atomic_read(&ip->i_pincount) == 0);
@@ -105,17 +109,6 @@ xfs_inode_alloc(
105#ifdef XFS_DIR2_TRACE 109#ifdef XFS_DIR2_TRACE
106 ip->i_dir_trace = ktrace_alloc(XFS_DIR2_KTRACE_SIZE, KM_NOFS); 110 ip->i_dir_trace = ktrace_alloc(XFS_DIR2_KTRACE_SIZE, KM_NOFS);
107#endif 111#endif
108 /*
109 * Now initialise the VFS inode. We do this after the xfs_inode
110 * initialisation as internal failures will result in ->destroy_inode
111 * being called and that will pass down through the reclaim path and
112 * free the XFS inode. This path requires the XFS inode to already be
113 * initialised. Hence if this call fails, the xfs_inode has already
114 * been freed and we should not reference it at all in the error
115 * handling.
116 */
117 if (!inode_init_always(mp->m_super, VFS_I(ip)))
118 return NULL;
119 112
120 /* prevent anyone from using this yet */ 113 /* prevent anyone from using this yet */
121 VFS_I(ip)->i_state = I_NEW|I_LOCK; 114 VFS_I(ip)->i_state = I_NEW|I_LOCK;
@@ -123,6 +116,71 @@ xfs_inode_alloc(
123 return ip; 116 return ip;
124} 117}
125 118
119STATIC void
120xfs_inode_free(
121 struct xfs_inode *ip)
122{
123 switch (ip->i_d.di_mode & S_IFMT) {
124 case S_IFREG:
125 case S_IFDIR:
126 case S_IFLNK:
127 xfs_idestroy_fork(ip, XFS_DATA_FORK);
128 break;
129 }
130
131 if (ip->i_afp)
132 xfs_idestroy_fork(ip, XFS_ATTR_FORK);
133
134#ifdef XFS_INODE_TRACE
135 ktrace_free(ip->i_trace);
136#endif
137#ifdef XFS_BMAP_TRACE
138 ktrace_free(ip->i_xtrace);
139#endif
140#ifdef XFS_BTREE_TRACE
141 ktrace_free(ip->i_btrace);
142#endif
143#ifdef XFS_RW_TRACE
144 ktrace_free(ip->i_rwtrace);
145#endif
146#ifdef XFS_ILOCK_TRACE
147 ktrace_free(ip->i_lock_trace);
148#endif
149#ifdef XFS_DIR2_TRACE
150 ktrace_free(ip->i_dir_trace);
151#endif
152
153 if (ip->i_itemp) {
154 /*
155 * Only if we are shutting down the fs will we see an
156 * inode still in the AIL. If it is there, we should remove
157 * it to prevent a use-after-free from occurring.
158 */
159 xfs_log_item_t *lip = &ip->i_itemp->ili_item;
160 struct xfs_ail *ailp = lip->li_ailp;
161
162 ASSERT(((lip->li_flags & XFS_LI_IN_AIL) == 0) ||
163 XFS_FORCED_SHUTDOWN(ip->i_mount));
164 if (lip->li_flags & XFS_LI_IN_AIL) {
165 spin_lock(&ailp->xa_lock);
166 if (lip->li_flags & XFS_LI_IN_AIL)
167 xfs_trans_ail_delete(ailp, lip);
168 else
169 spin_unlock(&ailp->xa_lock);
170 }
171 xfs_inode_item_destroy(ip);
172 ip->i_itemp = NULL;
173 }
174
175 /* asserts to verify all state is correct here */
176 ASSERT(atomic_read(&ip->i_iocount) == 0);
177 ASSERT(atomic_read(&ip->i_pincount) == 0);
178 ASSERT(!spin_is_locked(&ip->i_flags_lock));
179 ASSERT(completion_done(&ip->i_flush));
180
181 kmem_zone_free(xfs_inode_zone, ip);
182}
183
126/* 184/*
127 * Check the validity of the inode we just found it the cache 185 * Check the validity of the inode we just found it the cache
128 */ 186 */
@@ -167,7 +225,7 @@ xfs_iget_cache_hit(
167 * errors cleanly, then tag it so it can be set up correctly 225 * errors cleanly, then tag it so it can be set up correctly
168 * later. 226 * later.
169 */ 227 */
170 if (!inode_init_always(mp->m_super, VFS_I(ip))) { 228 if (inode_init_always(mp->m_super, VFS_I(ip))) {
171 error = ENOMEM; 229 error = ENOMEM;
172 goto out_error; 230 goto out_error;
173 } 231 }
@@ -299,7 +357,8 @@ out_preload_end:
299 if (lock_flags) 357 if (lock_flags)
300 xfs_iunlock(ip, lock_flags); 358 xfs_iunlock(ip, lock_flags);
301out_destroy: 359out_destroy:
302 xfs_destroy_inode(ip); 360 __destroy_inode(VFS_I(ip));
361 xfs_inode_free(ip);
303 return error; 362 return error;
304} 363}
305 364
@@ -504,62 +563,7 @@ xfs_ireclaim(
504 xfs_qm_dqdetach(ip); 563 xfs_qm_dqdetach(ip);
505 xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL); 564 xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
506 565
507 switch (ip->i_d.di_mode & S_IFMT) { 566 xfs_inode_free(ip);
508 case S_IFREG:
509 case S_IFDIR:
510 case S_IFLNK:
511 xfs_idestroy_fork(ip, XFS_DATA_FORK);
512 break;
513 }
514
515 if (ip->i_afp)
516 xfs_idestroy_fork(ip, XFS_ATTR_FORK);
517
518#ifdef XFS_INODE_TRACE
519 ktrace_free(ip->i_trace);
520#endif
521#ifdef XFS_BMAP_TRACE
522 ktrace_free(ip->i_xtrace);
523#endif
524#ifdef XFS_BTREE_TRACE
525 ktrace_free(ip->i_btrace);
526#endif
527#ifdef XFS_RW_TRACE
528 ktrace_free(ip->i_rwtrace);
529#endif
530#ifdef XFS_ILOCK_TRACE
531 ktrace_free(ip->i_lock_trace);
532#endif
533#ifdef XFS_DIR2_TRACE
534 ktrace_free(ip->i_dir_trace);
535#endif
536 if (ip->i_itemp) {
537 /*
538 * Only if we are shutting down the fs will we see an
539 * inode still in the AIL. If it is there, we should remove
540 * it to prevent a use-after-free from occurring.
541 */
542 xfs_log_item_t *lip = &ip->i_itemp->ili_item;
543 struct xfs_ail *ailp = lip->li_ailp;
544
545 ASSERT(((lip->li_flags & XFS_LI_IN_AIL) == 0) ||
546 XFS_FORCED_SHUTDOWN(ip->i_mount));
547 if (lip->li_flags & XFS_LI_IN_AIL) {
548 spin_lock(&ailp->xa_lock);
549 if (lip->li_flags & XFS_LI_IN_AIL)
550 xfs_trans_ail_delete(ailp, lip);
551 else
552 spin_unlock(&ailp->xa_lock);
553 }
554 xfs_inode_item_destroy(ip);
555 ip->i_itemp = NULL;
556 }
557 /* asserts to verify all state is correct here */
558 ASSERT(atomic_read(&ip->i_iocount) == 0);
559 ASSERT(atomic_read(&ip->i_pincount) == 0);
560 ASSERT(!spin_is_locked(&ip->i_flags_lock));
561 ASSERT(completion_done(&ip->i_flush));
562 kmem_zone_free(xfs_inode_zone, ip);
563} 567}
564 568
565/* 569/*
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 1f22d65fed0..da428b3fe0f 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -343,6 +343,16 @@ xfs_iformat(
343 return XFS_ERROR(EFSCORRUPTED); 343 return XFS_ERROR(EFSCORRUPTED);
344 } 344 }
345 345
346 if (unlikely((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) &&
347 !ip->i_mount->m_rtdev_targp)) {
348 xfs_fs_repair_cmn_err(CE_WARN, ip->i_mount,
349 "corrupt dinode %Lu, has realtime flag set.",
350 ip->i_ino);
351 XFS_CORRUPTION_ERROR("xfs_iformat(realtime)",
352 XFS_ERRLEVEL_LOW, ip->i_mount, dip);
353 return XFS_ERROR(EFSCORRUPTED);
354 }
355
346 switch (ip->i_d.di_mode & S_IFMT) { 356 switch (ip->i_d.di_mode & S_IFMT) {
347 case S_IFIFO: 357 case S_IFIFO:
348 case S_IFCHR: 358 case S_IFCHR:
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
index 1804f866a71..65f24a3cc99 100644
--- a/fs/xfs/xfs_inode.h
+++ b/fs/xfs/xfs_inode.h
@@ -310,23 +310,6 @@ static inline struct inode *VFS_I(struct xfs_inode *ip)
310} 310}
311 311
312/* 312/*
313 * Get rid of a partially initialized inode.
314 *
315 * We have to go through destroy_inode to make sure allocations
316 * from init_inode_always like the security data are undone.
317 *
318 * We mark the inode bad so that it takes the short cut in
319 * the reclaim path instead of going through the flush path
320 * which doesn't make sense for an inode that has never seen the
321 * light of day.
322 */
323static inline void xfs_destroy_inode(struct xfs_inode *ip)
324{
325 make_bad_inode(VFS_I(ip));
326 return destroy_inode(VFS_I(ip));
327}
328
329/*
330 * i_flags helper functions 313 * i_flags helper functions
331 */ 314 */
332static inline void 315static inline void
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 3750f04ede0..9dbdff3ea48 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -3180,7 +3180,7 @@ try_again:
3180STATIC void 3180STATIC void
3181xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog) 3181xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog)
3182{ 3182{
3183 ASSERT(spin_is_locked(&log->l_icloglock)); 3183 assert_spin_locked(&log->l_icloglock);
3184 3184
3185 if (iclog->ic_state == XLOG_STATE_ACTIVE) { 3185 if (iclog->ic_state == XLOG_STATE_ACTIVE) {
3186 xlog_state_switch_iclogs(log, iclog, 0); 3186 xlog_state_switch_iclogs(log, iclog, 0);
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index c4eca5ed5da..492d75bae2b 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -538,7 +538,9 @@ xfs_readlink_bmap(
538 d = XFS_FSB_TO_DADDR(mp, mval[n].br_startblock); 538 d = XFS_FSB_TO_DADDR(mp, mval[n].br_startblock);
539 byte_cnt = XFS_FSB_TO_B(mp, mval[n].br_blockcount); 539 byte_cnt = XFS_FSB_TO_B(mp, mval[n].br_blockcount);
540 540
541 bp = xfs_buf_read(mp->m_ddev_targp, d, BTOBB(byte_cnt), 0); 541 bp = xfs_buf_read_flags(mp->m_ddev_targp, d, BTOBB(byte_cnt),
542 XBF_LOCK | XBF_MAPPED |
543 XBF_DONT_BLOCK);
542 error = XFS_BUF_GETERROR(bp); 544 error = XFS_BUF_GETERROR(bp);
543 if (error) { 545 if (error) {
544 xfs_ioerror_alert("xfs_readlink", 546 xfs_ioerror_alert("xfs_readlink",
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 3e798593b17..ab0b85cf21f 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -242,6 +242,10 @@ acpi_os_derive_pci_id(acpi_handle rhandle,
242acpi_status acpi_os_validate_interface(char *interface); 242acpi_status acpi_os_validate_interface(char *interface);
243acpi_status acpi_osi_invalidate(char* interface); 243acpi_status acpi_osi_invalidate(char* interface);
244 244
245acpi_status
246acpi_os_validate_address(u8 space_id, acpi_physical_address address,
247 acpi_size length, char *name);
248
245u64 acpi_os_get_timer(void); 249u64 acpi_os_get_timer(void);
246 250
247acpi_status acpi_os_signal(u32 function, void *info); 251acpi_status acpi_os_signal(u32 function, void *info);
diff --git a/include/asm-generic/4level-fixup.h b/include/asm-generic/4level-fixup.h
index 9d40e879f99..77ff547730a 100644
--- a/include/asm-generic/4level-fixup.h
+++ b/include/asm-generic/4level-fixup.h
@@ -27,9 +27,9 @@
27#define pud_page_vaddr(pud) pgd_page_vaddr(pud) 27#define pud_page_vaddr(pud) pgd_page_vaddr(pud)
28 28
29#undef pud_free_tlb 29#undef pud_free_tlb
30#define pud_free_tlb(tlb, x) do { } while (0) 30#define pud_free_tlb(tlb, x, addr) do { } while (0)
31#define pud_free(mm, x) do { } while (0) 31#define pud_free(mm, x) do { } while (0)
32#define __pud_free_tlb(tlb, x) do { } while (0) 32#define __pud_free_tlb(tlb, x, addr) do { } while (0)
33 33
34#undef pud_addr_end 34#undef pud_addr_end
35#define pud_addr_end(addr, end) (end) 35#define pud_addr_end(addr, end) (end)
diff --git a/include/asm-generic/pgtable-nopmd.h b/include/asm-generic/pgtable-nopmd.h
index a7cdc48e8b7..725612b793c 100644
--- a/include/asm-generic/pgtable-nopmd.h
+++ b/include/asm-generic/pgtable-nopmd.h
@@ -59,7 +59,7 @@ static inline pmd_t * pmd_offset(pud_t * pud, unsigned long address)
59static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) 59static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
60{ 60{
61} 61}
62#define __pmd_free_tlb(tlb, x) do { } while (0) 62#define __pmd_free_tlb(tlb, x, a) do { } while (0)
63 63
64#undef pmd_addr_end 64#undef pmd_addr_end
65#define pmd_addr_end(addr, end) (end) 65#define pmd_addr_end(addr, end) (end)
diff --git a/include/asm-generic/pgtable-nopud.h b/include/asm-generic/pgtable-nopud.h
index 87cf449a6df..810431d8351 100644
--- a/include/asm-generic/pgtable-nopud.h
+++ b/include/asm-generic/pgtable-nopud.h
@@ -52,7 +52,7 @@ static inline pud_t * pud_offset(pgd_t * pgd, unsigned long address)
52 */ 52 */
53#define pud_alloc_one(mm, address) NULL 53#define pud_alloc_one(mm, address) NULL
54#define pud_free(mm, x) do { } while (0) 54#define pud_free(mm, x) do { } while (0)
55#define __pud_free_tlb(tlb, x) do { } while (0) 55#define __pud_free_tlb(tlb, x, a) do { } while (0)
56 56
57#undef pud_addr_end 57#undef pud_addr_end
58#define pud_addr_end(addr, end) (end) 58#define pud_addr_end(addr, end) (end)
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
index f490e43a90b..e43f9766259 100644
--- a/include/asm-generic/tlb.h
+++ b/include/asm-generic/tlb.h
@@ -123,24 +123,24 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
123 __tlb_remove_tlb_entry(tlb, ptep, address); \ 123 __tlb_remove_tlb_entry(tlb, ptep, address); \
124 } while (0) 124 } while (0)
125 125
126#define pte_free_tlb(tlb, ptep) \ 126#define pte_free_tlb(tlb, ptep, address) \
127 do { \ 127 do { \
128 tlb->need_flush = 1; \ 128 tlb->need_flush = 1; \
129 __pte_free_tlb(tlb, ptep); \ 129 __pte_free_tlb(tlb, ptep, address); \
130 } while (0) 130 } while (0)
131 131
132#ifndef __ARCH_HAS_4LEVEL_HACK 132#ifndef __ARCH_HAS_4LEVEL_HACK
133#define pud_free_tlb(tlb, pudp) \ 133#define pud_free_tlb(tlb, pudp, address) \
134 do { \ 134 do { \
135 tlb->need_flush = 1; \ 135 tlb->need_flush = 1; \
136 __pud_free_tlb(tlb, pudp); \ 136 __pud_free_tlb(tlb, pudp, address); \
137 } while (0) 137 } while (0)
138#endif 138#endif
139 139
140#define pmd_free_tlb(tlb, pmdp) \ 140#define pmd_free_tlb(tlb, pmdp, address) \
141 do { \ 141 do { \
142 tlb->need_flush = 1; \ 142 tlb->need_flush = 1; \
143 __pmd_free_tlb(tlb, pmdp); \ 143 __pmd_free_tlb(tlb, pmdp, address); \
144 } while (0) 144 } while (0)
145 145
146#define tlb_migrate_finish(mm) do {} while (0) 146#define tlb_migrate_finish(mm) do {} while (0)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index a553f1041cf..6ad76bf5fb4 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -30,9 +30,7 @@
30 * EXCEPTION_TABLE(...) 30 * EXCEPTION_TABLE(...)
31 * NOTES 31 * NOTES
32 * 32 *
33 * __bss_start = .; 33 * BSS_SECTION(0, 0, 0)
34 * BSS_SECTION(0, 0)
35 * __bss_stop = .;
36 * _end = .; 34 * _end = .;
37 * 35 *
38 * /DISCARD/ : { 36 * /DISCARD/ : {
@@ -489,7 +487,8 @@
489 * bss (Block Started by Symbol) - uninitialized data 487 * bss (Block Started by Symbol) - uninitialized data
490 * zeroed during startup 488 * zeroed during startup
491 */ 489 */
492#define SBSS \ 490#define SBSS(sbss_align) \
491 . = ALIGN(sbss_align); \
493 .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) { \ 492 .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) { \
494 *(.sbss) \ 493 *(.sbss) \
495 *(.scommon) \ 494 *(.scommon) \
@@ -498,12 +497,10 @@
498#define BSS(bss_align) \ 497#define BSS(bss_align) \
499 . = ALIGN(bss_align); \ 498 . = ALIGN(bss_align); \
500 .bss : AT(ADDR(.bss) - LOAD_OFFSET) { \ 499 .bss : AT(ADDR(.bss) - LOAD_OFFSET) { \
501 VMLINUX_SYMBOL(__bss_start) = .; \
502 *(.bss.page_aligned) \ 500 *(.bss.page_aligned) \
503 *(.dynbss) \ 501 *(.dynbss) \
504 *(.bss) \ 502 *(.bss) \
505 *(COMMON) \ 503 *(COMMON) \
506 VMLINUX_SYMBOL(__bss_stop) = .; \
507 } 504 }
508 505
509/* 506/*
@@ -735,8 +732,10 @@
735 INIT_RAM_FS \ 732 INIT_RAM_FS \
736 } 733 }
737 734
738#define BSS_SECTION(sbss_align, bss_align) \ 735#define BSS_SECTION(sbss_align, bss_align, stop_align) \
739 SBSS \ 736 . = ALIGN(sbss_align); \
737 VMLINUX_SYMBOL(__bss_start) = .; \
738 SBSS(sbss_align) \
740 BSS(bss_align) \ 739 BSS(bss_align) \
741 . = ALIGN(4); 740 . = ALIGN(stop_align); \
742 741 VMLINUX_SYMBOL(__bss_stop) = .;
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h
index 7174818c2c1..853508499d2 100644
--- a/include/drm/drm_pciids.h
+++ b/include/drm/drm_pciids.h
@@ -257,9 +257,12 @@
257 {0x1002, 0x940F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R600|RADEON_NEW_MEMMAP}, \ 257 {0x1002, 0x940F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R600|RADEON_NEW_MEMMAP}, \
258 {0x1002, 0x94A0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 258 {0x1002, 0x94A0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
259 {0x1002, 0x94A1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 259 {0x1002, 0x94A1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
260 {0x1002, 0x94A3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
260 {0x1002, 0x94B1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \ 261 {0x1002, 0x94B1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \
261 {0x1002, 0x94B3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \ 262 {0x1002, 0x94B3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \
263 {0x1002, 0x94B4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \
262 {0x1002, 0x94B5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \ 264 {0x1002, 0x94B5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \
265 {0x1002, 0x94B9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
263 {0x1002, 0x9440, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ 266 {0x1002, 0x9440, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \
264 {0x1002, 0x9441, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ 267 {0x1002, 0x9441, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \
265 {0x1002, 0x9442, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ 268 {0x1002, 0x9442, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \
@@ -288,6 +291,7 @@
288 {0x1002, 0x948F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ 291 {0x1002, 0x948F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \
289 {0x1002, 0x9490, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ 292 {0x1002, 0x9490, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \
290 {0x1002, 0x9491, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 293 {0x1002, 0x9491, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
294 {0x1002, 0x9495, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \
291 {0x1002, 0x9498, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ 295 {0x1002, 0x9498, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \
292 {0x1002, 0x949C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ 296 {0x1002, 0x949C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \
293 {0x1002, 0x949E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ 297 {0x1002, 0x949E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \
@@ -325,6 +329,7 @@
325 {0x1002, 0x9552, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 329 {0x1002, 0x9552, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
326 {0x1002, 0x9553, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 330 {0x1002, 0x9553, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
327 {0x1002, 0x9555, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 331 {0x1002, 0x9555, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
332 {0x1002, 0x9557, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
328 {0x1002, 0x9580, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_NEW_MEMMAP}, \ 333 {0x1002, 0x9580, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_NEW_MEMMAP}, \
329 {0x1002, 0x9581, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 334 {0x1002, 0x9581, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
330 {0x1002, 0x9583, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 335 {0x1002, 0x9583, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
@@ -365,6 +370,11 @@
365 {0x1002, 0x9614, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 370 {0x1002, 0x9614, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
366 {0x1002, 0x9615, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 371 {0x1002, 0x9615, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
367 {0x1002, 0x9616, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 372 {0x1002, 0x9616, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
373 {0x1002, 0x9710, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
374 {0x1002, 0x9711, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
375 {0x1002, 0x9712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
376 {0x1002, 0x9713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
377 {0x1002, 0x9714, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
368 {0, 0, 0} 378 {0, 0, 0}
369 379
370#define r128_PCI_IDS \ 380#define r128_PCI_IDS \
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h
index 41862e9a4c2..af4b4826997 100644
--- a/include/drm/radeon_drm.h
+++ b/include/drm/radeon_drm.h
@@ -506,6 +506,8 @@ typedef struct {
506#define DRM_RADEON_GEM_WAIT_IDLE 0x24 506#define DRM_RADEON_GEM_WAIT_IDLE 0x24
507#define DRM_RADEON_CS 0x26 507#define DRM_RADEON_CS 0x26
508#define DRM_RADEON_INFO 0x27 508#define DRM_RADEON_INFO 0x27
509#define DRM_RADEON_GEM_SET_TILING 0x28
510#define DRM_RADEON_GEM_GET_TILING 0x29
509 511
510#define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t) 512#define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t)
511#define DRM_IOCTL_RADEON_CP_START DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_START) 513#define DRM_IOCTL_RADEON_CP_START DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_START)
@@ -544,7 +546,8 @@ typedef struct {
544#define DRM_IOCTL_RADEON_GEM_WAIT_IDLE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_IDLE, struct drm_radeon_gem_wait_idle) 546#define DRM_IOCTL_RADEON_GEM_WAIT_IDLE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_IDLE, struct drm_radeon_gem_wait_idle)
545#define DRM_IOCTL_RADEON_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs) 547#define DRM_IOCTL_RADEON_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs)
546#define DRM_IOCTL_RADEON_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info) 548#define DRM_IOCTL_RADEON_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info)
547 549#define DRM_IOCTL_RADEON_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, struct drm_radeon_gem_set_tiling)
550#define DRM_IOCTL_RADEON_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, struct drm_radeon_gem_get_tiling)
548 551
549typedef struct drm_radeon_init { 552typedef struct drm_radeon_init {
550 enum { 553 enum {
@@ -796,6 +799,24 @@ struct drm_radeon_gem_create {
796 uint32_t flags; 799 uint32_t flags;
797}; 800};
798 801
802#define RADEON_TILING_MACRO 0x1
803#define RADEON_TILING_MICRO 0x2
804#define RADEON_TILING_SWAP 0x4
805#define RADEON_TILING_SURFACE 0x8 /* this object requires a surface
806 * when mapped - i.e. front buffer */
807
808struct drm_radeon_gem_set_tiling {
809 uint32_t handle;
810 uint32_t tiling_flags;
811 uint32_t pitch;
812};
813
814struct drm_radeon_gem_get_tiling {
815 uint32_t handle;
816 uint32_t tiling_flags;
817 uint32_t pitch;
818};
819
799struct drm_radeon_gem_mmap { 820struct drm_radeon_gem_mmap {
800 uint32_t handle; 821 uint32_t handle;
801 uint32_t pad; 822 uint32_t pad;
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index 62ed733c52a..a68829db381 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -121,6 +121,7 @@ struct ttm_backend {
121#define TTM_PAGE_FLAG_SWAPPED (1 << 4) 121#define TTM_PAGE_FLAG_SWAPPED (1 << 4)
122#define TTM_PAGE_FLAG_PERSISTANT_SWAP (1 << 5) 122#define TTM_PAGE_FLAG_PERSISTANT_SWAP (1 << 5)
123#define TTM_PAGE_FLAG_ZERO_ALLOC (1 << 6) 123#define TTM_PAGE_FLAG_ZERO_ALLOC (1 << 6)
124#define TTM_PAGE_FLAG_DMA32 (1 << 7)
124 125
125enum ttm_caching_state { 126enum ttm_caching_state {
126 tt_uncached, 127 tt_uncached,
@@ -353,6 +354,14 @@ struct ttm_bo_driver {
353 int (*sync_obj_flush) (void *sync_obj, void *sync_arg); 354 int (*sync_obj_flush) (void *sync_obj, void *sync_arg);
354 void (*sync_obj_unref) (void **sync_obj); 355 void (*sync_obj_unref) (void **sync_obj);
355 void *(*sync_obj_ref) (void *sync_obj); 356 void *(*sync_obj_ref) (void *sync_obj);
357
358 /* hook to notify driver about a driver move so it
359 * can do tiling things */
360 void (*move_notify)(struct ttm_buffer_object *bo,
361 struct ttm_mem_reg *new_mem);
362 /* notify the driver we are taking a fault on this BO
363 * and have reserved it */
364 void (*fault_reserve_notify)(struct ttm_buffer_object *bo);
356}; 365};
357 366
358#define TTM_NUM_MEM_TYPES 8 367#define TTM_NUM_MEM_TYPES 8
@@ -429,6 +438,8 @@ struct ttm_bo_device {
429 */ 438 */
430 439
431 struct delayed_work wq; 440 struct delayed_work wq;
441
442 bool need_dma32;
432}; 443};
433 444
434/** 445/**
@@ -648,7 +659,14 @@ extern int ttm_bo_device_release(struct ttm_bo_device *bdev);
648extern int ttm_bo_device_init(struct ttm_bo_device *bdev, 659extern int ttm_bo_device_init(struct ttm_bo_device *bdev,
649 struct ttm_mem_global *mem_glob, 660 struct ttm_mem_global *mem_glob,
650 struct ttm_bo_driver *driver, 661 struct ttm_bo_driver *driver,
651 uint64_t file_page_offset); 662 uint64_t file_page_offset, bool need_dma32);
663
664/**
665 * ttm_bo_unmap_virtual
666 *
667 * @bo: tear down the virtual mappings for this BO
668 */
669extern void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo);
652 670
653/** 671/**
654 * ttm_bo_reserve: 672 * ttm_bo_reserve:
diff --git a/include/drm/ttm/ttm_module.h b/include/drm/ttm/ttm_module.h
index 889a4c7958a..d1d433834e4 100644
--- a/include/drm/ttm/ttm_module.h
+++ b/include/drm/ttm/ttm_module.h
@@ -33,7 +33,7 @@
33 33
34#include <linux/kernel.h> 34#include <linux/kernel.h>
35 35
36#define TTM_PFX "[TTM]" 36#define TTM_PFX "[TTM] "
37 37
38enum ttm_global_types { 38enum ttm_global_types {
39 TTM_GLOBAL_TTM_MEM = 0, 39 TTM_GLOBAL_TTM_MEM = 0,
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index e7cb5dbf6c2..69103e053c9 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -913,6 +913,7 @@ extern void blk_queue_logical_block_size(struct request_queue *, unsigned short)
913extern void blk_queue_physical_block_size(struct request_queue *, unsigned short); 913extern void blk_queue_physical_block_size(struct request_queue *, unsigned short);
914extern void blk_queue_alignment_offset(struct request_queue *q, 914extern void blk_queue_alignment_offset(struct request_queue *q,
915 unsigned int alignment); 915 unsigned int alignment);
916extern void blk_limits_io_min(struct queue_limits *limits, unsigned int min);
916extern void blk_queue_io_min(struct request_queue *q, unsigned int min); 917extern void blk_queue_io_min(struct request_queue *q, unsigned int min);
917extern void blk_queue_io_opt(struct request_queue *q, unsigned int opt); 918extern void blk_queue_io_opt(struct request_queue *q, unsigned int opt);
918extern void blk_set_default_limits(struct queue_limits *lim); 919extern void blk_set_default_limits(struct queue_limits *lim);
diff --git a/include/linux/cb710.h b/include/linux/cb710.h
index 63bc9a4d292..8cc10411bab 100644
--- a/include/linux/cb710.h
+++ b/include/linux/cb710.h
@@ -140,29 +140,6 @@ void cb710_dump_regs(struct cb710_chip *chip, unsigned dump);
140#include <linux/highmem.h> 140#include <linux/highmem.h>
141#include <linux/scatterlist.h> 141#include <linux/scatterlist.h>
142 142
143/**
144 * cb710_sg_miter_stop_writing - stop mapping iteration after writing
145 * @miter: sg mapping iter to be stopped
146 *
147 * Description:
148 * Stops mapping iterator @miter. @miter should have been started
149 * started using sg_miter_start(). A stopped iteration can be
150 * resumed by calling sg_miter_next() on it. This is useful when
151 * resources (kmap) need to be released during iteration.
152 *
153 * This is a convenience wrapper that will be optimized out for arches
154 * that don't need flush_kernel_dcache_page().
155 *
156 * Context:
157 * IRQ disabled if the SG_MITER_ATOMIC is set. Don't care otherwise.
158 */
159static inline void cb710_sg_miter_stop_writing(struct sg_mapping_iter *miter)
160{
161 if (miter->page)
162 flush_kernel_dcache_page(miter->page);
163 sg_miter_stop(miter);
164}
165
166/* 143/*
167 * 32-bit PIO mapping sg iterator 144 * 32-bit PIO mapping sg iterator
168 * 145 *
@@ -171,12 +148,12 @@ static inline void cb710_sg_miter_stop_writing(struct sg_mapping_iter *miter)
171 * without DMA support). 148 * without DMA support).
172 * 149 *
173 * Best-case reading (transfer from device): 150 * Best-case reading (transfer from device):
174 * sg_miter_start(); 151 * sg_miter_start(, SG_MITER_TO_SG);
175 * cb710_sg_dwiter_write_from_io(); 152 * cb710_sg_dwiter_write_from_io();
176 * cb710_sg_miter_stop_writing(); 153 * sg_miter_stop();
177 * 154 *
178 * Best-case writing (transfer to device): 155 * Best-case writing (transfer to device):
179 * sg_miter_start(); 156 * sg_miter_start(, SG_MITER_FROM_SG);
180 * cb710_sg_dwiter_read_to_io(); 157 * cb710_sg_dwiter_read_to_io();
181 * sg_miter_stop(); 158 * sg_miter_stop();
182 */ 159 */
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 665fa70e409..90bba9e6228 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -179,14 +179,11 @@ struct cgroup {
179 */ 179 */
180 struct list_head release_list; 180 struct list_head release_list;
181 181
182 /* pids_mutex protects the fields below */ 182 /* pids_mutex protects pids_list and cached pid arrays. */
183 struct rw_semaphore pids_mutex; 183 struct rw_semaphore pids_mutex;
184 /* Array of process ids in the cgroup */ 184
185 pid_t *tasks_pids; 185 /* Linked list of struct cgroup_pids */
186 /* How many files are using the current tasks_pids array */ 186 struct list_head pids_list;
187 int pids_use_count;
188 /* Length of the current tasks_pids array */
189 int pids_length;
190 187
191 /* For RCU-protected deletion */ 188 /* For RCU-protected deletion */
192 struct rcu_head rcu_head; 189 struct rcu_head rcu_head;
@@ -366,6 +363,23 @@ int cgroup_task_count(const struct cgroup *cgrp);
366int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task); 363int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task);
367 364
368/* 365/*
366 * When the subsys has to access css and may add permanent refcnt to css,
367 * it should take care of racy conditions with rmdir(). Following set of
368 * functions, is for stop/restart rmdir if necessary.
369 * Because these will call css_get/put, "css" should be alive css.
370 *
371 * cgroup_exclude_rmdir();
372 * ...do some jobs which may access arbitrary empty cgroup
373 * cgroup_release_and_wakeup_rmdir();
374 *
375 * When someone removes a cgroup while cgroup_exclude_rmdir() holds it,
376 * it sleeps and cgroup_release_and_wakeup_rmdir() will wake him up.
377 */
378
379void cgroup_exclude_rmdir(struct cgroup_subsys_state *css);
380void cgroup_release_and_wakeup_rmdir(struct cgroup_subsys_state *css);
381
382/*
369 * Control Group subsystem type. 383 * Control Group subsystem type.
370 * See Documentation/cgroups/cgroups.txt for details 384 * See Documentation/cgroups/cgroups.txt for details
371 */ 385 */
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index c56457c8334..1219be4fb42 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -293,7 +293,12 @@ static inline int clocksource_enable(struct clocksource *cs)
293 if (cs->enable) 293 if (cs->enable)
294 ret = cs->enable(cs); 294 ret = cs->enable(cs);
295 295
296 /* save mult_orig on enable */ 296 /*
297 * The frequency may have changed while the clocksource
298 * was disabled. If so the code in ->enable() must update
299 * the mult value to reflect the new frequency. Make sure
300 * mult_orig follows this change.
301 */
297 cs->mult_orig = cs->mult; 302 cs->mult_orig = cs->mult;
298 303
299 return ret; 304 return ret;
@@ -309,6 +314,13 @@ static inline int clocksource_enable(struct clocksource *cs)
309 */ 314 */
310static inline void clocksource_disable(struct clocksource *cs) 315static inline void clocksource_disable(struct clocksource *cs)
311{ 316{
317 /*
318 * Save mult_orig in mult so clocksource_enable() can
319 * restore the value regardless if ->enable() updates
320 * the value of mult or not.
321 */
322 cs->mult = cs->mult_orig;
323
312 if (cs->disable) 324 if (cs->disable)
313 cs->disable(cs); 325 cs->disable(cs);
314} 326}
diff --git a/include/linux/decompress/generic.h b/include/linux/decompress/generic.h
index 6dfb856327b..0c7111a55a1 100644
--- a/include/linux/decompress/generic.h
+++ b/include/linux/decompress/generic.h
@@ -1,31 +1,37 @@
1#ifndef DECOMPRESS_GENERIC_H 1#ifndef DECOMPRESS_GENERIC_H
2#define DECOMPRESS_GENERIC_H 2#define DECOMPRESS_GENERIC_H
3 3
4/* Minimal chunksize to be read.
5 *Bzip2 prefers at least 4096
6 *Lzma prefers 0x10000 */
7#define COMPR_IOBUF_SIZE 4096
8
9typedef int (*decompress_fn) (unsigned char *inbuf, int len, 4typedef int (*decompress_fn) (unsigned char *inbuf, int len,
10 int(*fill)(void*, unsigned int), 5 int(*fill)(void*, unsigned int),
11 int(*writebb)(void*, unsigned int), 6 int(*flush)(void*, unsigned int),
12 unsigned char *output, 7 unsigned char *outbuf,
13 int *posp, 8 int *posp,
14 void(*error)(char *x)); 9 void(*error)(char *x));
15 10
16/* inbuf - input buffer 11/* inbuf - input buffer
17 *len - len of pre-read data in inbuf 12 *len - len of pre-read data in inbuf
18 *fill - function to fill inbuf if empty 13 *fill - function to fill inbuf when empty
19 *writebb - function to write out outbug 14 *flush - function to write out outbuf
15 *outbuf - output buffer
20 *posp - if non-null, input position (number of bytes read) will be 16 *posp - if non-null, input position (number of bytes read) will be
21 * returned here 17 * returned here
22 * 18 *
23 *If len != 0, the inbuf is initialized (with as much data), and fill 19 *If len != 0, inbuf should contain all the necessary input data, and fill
24 *should not be called 20 *should be NULL
25 *If len = 0, the inbuf is allocated, but empty. Its size is IOBUF_SIZE 21 *If len = 0, inbuf can be NULL, in which case the decompressor will allocate
26 *fill should be called (repeatedly...) to read data, at most IOBUF_SIZE 22 *the input buffer. If inbuf != NULL it must be at least XXX_IOBUF_SIZE bytes.
23 *fill will be called (repeatedly...) to read data, at most XXX_IOBUF_SIZE
24 *bytes should be read per call. Replace XXX with the appropriate decompressor
25 *name, i.e. LZMA_IOBUF_SIZE.
26 *
27 *If flush = NULL, outbuf must be large enough to buffer all the expected
28 *output. If flush != NULL, the output buffer will be allocated by the
29 *decompressor (outbuf = NULL), and the flush function will be called to
30 *flush the output buffer at the appropriate time (decompressor and stream
31 *dependent).
27 */ 32 */
28 33
34
29/* Utility routine to detect the decompression method */ 35/* Utility routine to detect the decompression method */
30decompress_fn decompress_method(const unsigned char *inbuf, int len, 36decompress_fn decompress_method(const unsigned char *inbuf, int len,
31 const char **name); 37 const char **name);
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 0d6310657f3..655e7721580 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -84,7 +84,7 @@ typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm,
84 84
85typedef int (*iterate_devices_callout_fn) (struct dm_target *ti, 85typedef int (*iterate_devices_callout_fn) (struct dm_target *ti,
86 struct dm_dev *dev, 86 struct dm_dev *dev,
87 sector_t physical_start, 87 sector_t start, sector_t len,
88 void *data); 88 void *data);
89 89
90typedef int (*dm_iterate_devices_fn) (struct dm_target *ti, 90typedef int (*dm_iterate_devices_fn) (struct dm_target *ti,
@@ -104,7 +104,7 @@ void dm_error(const char *message);
104 * Combine device limits. 104 * Combine device limits.
105 */ 105 */
106int dm_set_device_limits(struct dm_target *ti, struct dm_dev *dev, 106int dm_set_device_limits(struct dm_target *ti, struct dm_dev *dev,
107 sector_t start, void *data); 107 sector_t start, sector_t len, void *data);
108 108
109struct dm_dev { 109struct dm_dev {
110 struct block_device *bdev; 110 struct block_device *bdev;
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h
index 634a5e5aba3..7499b366779 100644
--- a/include/linux/ext3_fs.h
+++ b/include/linux/ext3_fs.h
@@ -874,7 +874,7 @@ struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
874struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *); 874struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
875int ext3_get_blocks_handle(handle_t *handle, struct inode *inode, 875int ext3_get_blocks_handle(handle_t *handle, struct inode *inode,
876 sector_t iblock, unsigned long maxblocks, struct buffer_head *bh_result, 876 sector_t iblock, unsigned long maxblocks, struct buffer_head *bh_result,
877 int create, int extend_disksize); 877 int create);
878 878
879extern struct inode *ext3_iget(struct super_block *, unsigned long); 879extern struct inode *ext3_iget(struct super_block *, unsigned long);
880extern int ext3_write_inode (struct inode *, int); 880extern int ext3_write_inode (struct inode *, int);
diff --git a/include/linux/flex_array.h b/include/linux/flex_array.h
new file mode 100644
index 00000000000..23c1ec79a31
--- /dev/null
+++ b/include/linux/flex_array.h
@@ -0,0 +1,47 @@
1#ifndef _FLEX_ARRAY_H
2#define _FLEX_ARRAY_H
3
4#include <linux/types.h>
5#include <asm/page.h>
6
7#define FLEX_ARRAY_PART_SIZE PAGE_SIZE
8#define FLEX_ARRAY_BASE_SIZE PAGE_SIZE
9
10struct flex_array_part;
11
12/*
13 * This is meant to replace cases where an array-like
14 * structure has gotten too big to fit into kmalloc()
15 * and the developer is getting tempted to use
16 * vmalloc().
17 */
18
19struct flex_array {
20 union {
21 struct {
22 int element_size;
23 int total_nr_elements;
24 struct flex_array_part *parts[0];
25 };
26 /*
27 * This little trick makes sure that
28 * sizeof(flex_array) == PAGE_SIZE
29 */
30 char padding[FLEX_ARRAY_BASE_SIZE];
31 };
32};
33
34#define FLEX_ARRAY_INIT(size, total) { { {\
35 .element_size = (size), \
36 .total_nr_elements = (total), \
37} } }
38
39struct flex_array *flex_array_alloc(int element_size, int total, gfp_t flags);
40int flex_array_prealloc(struct flex_array *fa, int start, int end, gfp_t flags);
41void flex_array_free(struct flex_array *fa);
42void flex_array_free_parts(struct flex_array *fa);
43int flex_array_put(struct flex_array *fa, int element_nr, void *src,
44 gfp_t flags);
45void *flex_array_get(struct flex_array *fa, int element_nr);
46
47#endif /* _FLEX_ARRAY_H */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 0872372184f..67888a9e065 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1946,6 +1946,7 @@ extern void putname(const char *name);
1946extern int register_blkdev(unsigned int, const char *); 1946extern int register_blkdev(unsigned int, const char *);
1947extern void unregister_blkdev(unsigned int, const char *); 1947extern void unregister_blkdev(unsigned int, const char *);
1948extern struct block_device *bdget(dev_t); 1948extern struct block_device *bdget(dev_t);
1949extern struct block_device *bdgrab(struct block_device *bdev);
1949extern void bd_set_size(struct block_device *, loff_t size); 1950extern void bd_set_size(struct block_device *, loff_t size);
1950extern void bd_forget(struct inode *inode); 1951extern void bd_forget(struct inode *inode);
1951extern void bdput(struct block_device *); 1952extern void bdput(struct block_device *);
@@ -2136,7 +2137,7 @@ extern loff_t default_llseek(struct file *file, loff_t offset, int origin);
2136 2137
2137extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin); 2138extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin);
2138 2139
2139extern struct inode * inode_init_always(struct super_block *, struct inode *); 2140extern int inode_init_always(struct super_block *, struct inode *);
2140extern void inode_init_once(struct inode *); 2141extern void inode_init_once(struct inode *);
2141extern void inode_add_to_lists(struct super_block *, struct inode *); 2142extern void inode_add_to_lists(struct super_block *, struct inode *);
2142extern void iput(struct inode *); 2143extern void iput(struct inode *);
@@ -2163,6 +2164,7 @@ extern void __iget(struct inode * inode);
2163extern void iget_failed(struct inode *); 2164extern void iget_failed(struct inode *);
2164extern void clear_inode(struct inode *); 2165extern void clear_inode(struct inode *);
2165extern void destroy_inode(struct inode *); 2166extern void destroy_inode(struct inode *);
2167extern void __destroy_inode(struct inode *);
2166extern struct inode *new_inode(struct super_block *); 2168extern struct inode *new_inode(struct super_block *);
2167extern int should_remove_suid(struct dentry *); 2169extern int should_remove_suid(struct dentry *);
2168extern int file_remove_suid(struct file *); 2170extern int file_remove_suid(struct file *);
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index 6c3de999fb3..4d6f47b5118 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -352,7 +352,7 @@ extern void fsnotify_unmount_inodes(struct list_head *list);
352/* put here because inotify does some weird stuff when destroying watches */ 352/* put here because inotify does some weird stuff when destroying watches */
353extern struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask, 353extern struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask,
354 void *data, int data_is, const char *name, 354 void *data, int data_is, const char *name,
355 u32 cookie); 355 u32 cookie, gfp_t gfp);
356 356
357#else 357#else
358 358
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index 5c093ffc655..a81170de7f6 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -89,7 +89,9 @@ enum print_line_t {
89 TRACE_TYPE_NO_CONSUME = 3 /* Handled but ask to not consume */ 89 TRACE_TYPE_NO_CONSUME = 3 /* Handled but ask to not consume */
90}; 90};
91 91
92 92void tracing_generic_entry_update(struct trace_entry *entry,
93 unsigned long flags,
94 int pc);
93struct ring_buffer_event * 95struct ring_buffer_event *
94trace_current_buffer_lock_reserve(int type, unsigned long len, 96trace_current_buffer_lock_reserve(int type, unsigned long len,
95 unsigned long flags, int pc); 97 unsigned long flags, int pc);
@@ -119,11 +121,9 @@ struct ftrace_event_call {
119 void *filter; 121 void *filter;
120 void *mod; 122 void *mod;
121 123
122#ifdef CONFIG_EVENT_PROFILE 124 atomic_t profile_count;
123 atomic_t profile_count; 125 int (*profile_enable)(struct ftrace_event_call *);
124 int (*profile_enable)(struct ftrace_event_call *); 126 void (*profile_disable)(struct ftrace_event_call *);
125 void (*profile_disable)(struct ftrace_event_call *);
126#endif
127}; 127};
128 128
129#define MAX_FILTER_PRED 32 129#define MAX_FILTER_PRED 32
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index acef2a770b6..ad27c7da879 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -82,7 +82,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev)
82 82
83#define IN_DEV_FORWARD(in_dev) IN_DEV_CONF_GET((in_dev), FORWARDING) 83#define IN_DEV_FORWARD(in_dev) IN_DEV_CONF_GET((in_dev), FORWARDING)
84#define IN_DEV_MFORWARD(in_dev) IN_DEV_ANDCONF((in_dev), MC_FORWARDING) 84#define IN_DEV_MFORWARD(in_dev) IN_DEV_ANDCONF((in_dev), MC_FORWARDING)
85#define IN_DEV_RPFILTER(in_dev) IN_DEV_ANDCONF((in_dev), RP_FILTER) 85#define IN_DEV_RPFILTER(in_dev) IN_DEV_MAXCONF((in_dev), RP_FILTER)
86#define IN_DEV_SOURCE_ROUTE(in_dev) IN_DEV_ANDCONF((in_dev), \ 86#define IN_DEV_SOURCE_ROUTE(in_dev) IN_DEV_ANDCONF((in_dev), \
87 ACCEPT_SOURCE_ROUTE) 87 ACCEPT_SOURCE_ROUTE)
88#define IN_DEV_BOOTP_RELAY(in_dev) IN_DEV_ANDCONF((in_dev), BOOTP_RELAY) 88#define IN_DEV_BOOTP_RELAY(in_dev) IN_DEV_ANDCONF((in_dev), BOOTP_RELAY)
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h
index 7964516c695..15d5903af2d 100644
--- a/include/linux/input/matrix_keypad.h
+++ b/include/linux/input/matrix_keypad.h
@@ -15,12 +15,13 @@
15#define KEY_COL(k) (((k) >> 16) & 0xff) 15#define KEY_COL(k) (((k) >> 16) & 0xff)
16#define KEY_VAL(k) ((k) & 0xffff) 16#define KEY_VAL(k) ((k) & 0xffff)
17 17
18#define MATRIX_SCAN_CODE(row, col, row_shift) (((row) << (row_shift)) + (col))
19
18/** 20/**
19 * struct matrix_keymap_data - keymap for matrix keyboards 21 * struct matrix_keymap_data - keymap for matrix keyboards
20 * @keymap: pointer to array of uint32 values encoded with KEY() macro 22 * @keymap: pointer to array of uint32 values encoded with KEY() macro
21 * representing keymap 23 * representing keymap
22 * @keymap_size: number of entries (initialized) in this keymap 24 * @keymap_size: number of entries (initialized) in this keymap
23 * @max_keymap_size: maximum size of keymap supported by the device
24 * 25 *
25 * This structure is supposed to be used by platform code to supply 26 * This structure is supposed to be used by platform code to supply
26 * keymaps to drivers that implement matrix-like keypads/keyboards. 27 * keymaps to drivers that implement matrix-like keypads/keyboards.
@@ -28,14 +29,13 @@
28struct matrix_keymap_data { 29struct matrix_keymap_data {
29 const uint32_t *keymap; 30 const uint32_t *keymap;
30 unsigned int keymap_size; 31 unsigned int keymap_size;
31 unsigned int max_keymap_size;
32}; 32};
33 33
34/** 34/**
35 * struct matrix_keypad_platform_data - platform-dependent keypad data 35 * struct matrix_keypad_platform_data - platform-dependent keypad data
36 * @keymap_data: pointer to &matrix_keymap_data 36 * @keymap_data: pointer to &matrix_keymap_data
37 * @row_gpios: array of gpio numbers reporesenting rows 37 * @row_gpios: pointer to array of gpio numbers representing rows
38 * @col_gpios: array of gpio numbers reporesenting colums 38 * @col_gpios: pointer to array of gpio numbers reporesenting colums
39 * @num_row_gpios: actual number of row gpios used by device 39 * @num_row_gpios: actual number of row gpios used by device
40 * @num_col_gpios: actual number of col gpios used by device 40 * @num_col_gpios: actual number of col gpios used by device
41 * @col_scan_delay_us: delay, measured in microseconds, that is 41 * @col_scan_delay_us: delay, measured in microseconds, that is
@@ -48,8 +48,9 @@ struct matrix_keymap_data {
48struct matrix_keypad_platform_data { 48struct matrix_keypad_platform_data {
49 const struct matrix_keymap_data *keymap_data; 49 const struct matrix_keymap_data *keymap_data;
50 50
51 unsigned int row_gpios[MATRIX_MAX_ROWS]; 51 const unsigned int *row_gpios;
52 unsigned int col_gpios[MATRIX_MAX_COLS]; 52 const unsigned int *col_gpios;
53
53 unsigned int num_row_gpios; 54 unsigned int num_row_gpios;
54 unsigned int num_col_gpios; 55 unsigned int num_col_gpios;
55 56
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 2721f07e935..35e7df1e9f3 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -14,6 +14,7 @@
14#include <linux/irqflags.h> 14#include <linux/irqflags.h>
15#include <linux/smp.h> 15#include <linux/smp.h>
16#include <linux/percpu.h> 16#include <linux/percpu.h>
17#include <linux/hrtimer.h>
17 18
18#include <asm/atomic.h> 19#include <asm/atomic.h>
19#include <asm/ptrace.h> 20#include <asm/ptrace.h>
@@ -64,11 +65,13 @@
64 * IRQTF_RUNTHREAD - signals that the interrupt handler thread should run 65 * IRQTF_RUNTHREAD - signals that the interrupt handler thread should run
65 * IRQTF_DIED - handler thread died 66 * IRQTF_DIED - handler thread died
66 * IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed 67 * IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed
68 * IRQTF_AFFINITY - irq thread is requested to adjust affinity
67 */ 69 */
68enum { 70enum {
69 IRQTF_RUNTHREAD, 71 IRQTF_RUNTHREAD,
70 IRQTF_DIED, 72 IRQTF_DIED,
71 IRQTF_WARNED, 73 IRQTF_WARNED,
74 IRQTF_AFFINITY,
72}; 75};
73 76
74typedef irqreturn_t (*irq_handler_t)(int, void *); 77typedef irqreturn_t (*irq_handler_t)(int, void *);
@@ -517,6 +520,31 @@ extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu);
517extern void tasklet_init(struct tasklet_struct *t, 520extern void tasklet_init(struct tasklet_struct *t,
518 void (*func)(unsigned long), unsigned long data); 521 void (*func)(unsigned long), unsigned long data);
519 522
523struct tasklet_hrtimer {
524 struct hrtimer timer;
525 struct tasklet_struct tasklet;
526 enum hrtimer_restart (*function)(struct hrtimer *);
527};
528
529extern void
530tasklet_hrtimer_init(struct tasklet_hrtimer *ttimer,
531 enum hrtimer_restart (*function)(struct hrtimer *),
532 clockid_t which_clock, enum hrtimer_mode mode);
533
534static inline
535int tasklet_hrtimer_start(struct tasklet_hrtimer *ttimer, ktime_t time,
536 const enum hrtimer_mode mode)
537{
538 return hrtimer_start(&ttimer->timer, time, mode);
539}
540
541static inline
542void tasklet_hrtimer_cancel(struct tasklet_hrtimer *ttimer)
543{
544 hrtimer_cancel(&ttimer->timer);
545 tasklet_kill(&ttimer->tasklet);
546}
547
520/* 548/*
521 * Autoprobing for irqs: 549 * Autoprobing for irqs:
522 * 550 *
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h
index dd05434fa45..4da4a75c3f1 100644
--- a/include/linux/iocontext.h
+++ b/include/linux/iocontext.h
@@ -92,7 +92,7 @@ static inline struct io_context *ioc_task_link(struct io_context *ioc)
92 * a race). 92 * a race).
93 */ 93 */
94 if (ioc && atomic_long_inc_not_zero(&ioc->refcount)) { 94 if (ioc && atomic_long_inc_not_zero(&ioc->refcount)) {
95 atomic_long_inc(&ioc->refcount); 95 atomic_inc(&ioc->nr_tasks);
96 return ioc; 96 return ioc;
97 } 97 }
98 98
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 16713dc672e..3060bdc35ff 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -110,6 +110,7 @@ struct kvm_memory_slot {
110 110
111struct kvm_kernel_irq_routing_entry { 111struct kvm_kernel_irq_routing_entry {
112 u32 gsi; 112 u32 gsi;
113 u32 type;
113 int (*set)(struct kvm_kernel_irq_routing_entry *e, 114 int (*set)(struct kvm_kernel_irq_routing_entry *e,
114 struct kvm *kvm, int level); 115 struct kvm *kvm, int level);
115 union { 116 union {
diff --git a/include/linux/lguest.h b/include/linux/lguest.h
index dbf2479e808..2fb1dcbcb5a 100644
--- a/include/linux/lguest.h
+++ b/include/linux/lguest.h
@@ -1,5 +1,7 @@
1/* Things the lguest guest needs to know. Note: like all lguest interfaces, 1/*
2 * this is subject to wild and random change between versions. */ 2 * Things the lguest guest needs to know. Note: like all lguest interfaces,
3 * this is subject to wild and random change between versions.
4 */
3#ifndef _LINUX_LGUEST_H 5#ifndef _LINUX_LGUEST_H
4#define _LINUX_LGUEST_H 6#define _LINUX_LGUEST_H
5 7
@@ -11,32 +13,41 @@
11#define LG_CLOCK_MIN_DELTA 100UL 13#define LG_CLOCK_MIN_DELTA 100UL
12#define LG_CLOCK_MAX_DELTA ULONG_MAX 14#define LG_CLOCK_MAX_DELTA ULONG_MAX
13 15
14/*G:031 The second method of communicating with the Host is to via "struct 16/*G:031
17 * The second method of communicating with the Host is to via "struct
15 * lguest_data". Once the Guest's initialization hypercall tells the Host where 18 * lguest_data". Once the Guest's initialization hypercall tells the Host where
16 * this is, the Guest and Host both publish information in it. :*/ 19 * this is, the Guest and Host both publish information in it.
17struct lguest_data 20:*/
18{ 21struct lguest_data {
19 /* 512 == enabled (same as eflags in normal hardware). The Guest 22 /*
20 * changes interrupts so often that a hypercall is too slow. */ 23 * 512 == enabled (same as eflags in normal hardware). The Guest
24 * changes interrupts so often that a hypercall is too slow.
25 */
21 unsigned int irq_enabled; 26 unsigned int irq_enabled;
22 /* Fine-grained interrupt disabling by the Guest */ 27 /* Fine-grained interrupt disabling by the Guest */
23 DECLARE_BITMAP(blocked_interrupts, LGUEST_IRQS); 28 DECLARE_BITMAP(blocked_interrupts, LGUEST_IRQS);
24 29
25 /* The Host writes the virtual address of the last page fault here, 30 /*
31 * The Host writes the virtual address of the last page fault here,
26 * which saves the Guest a hypercall. CR2 is the native register where 32 * which saves the Guest a hypercall. CR2 is the native register where
27 * this address would normally be found. */ 33 * this address would normally be found.
34 */
28 unsigned long cr2; 35 unsigned long cr2;
29 36
30 /* Wallclock time set by the Host. */ 37 /* Wallclock time set by the Host. */
31 struct timespec time; 38 struct timespec time;
32 39
33 /* Interrupt pending set by the Host. The Guest should do a hypercall 40 /*
34 * if it re-enables interrupts and sees this set (to X86_EFLAGS_IF). */ 41 * Interrupt pending set by the Host. The Guest should do a hypercall
42 * if it re-enables interrupts and sees this set (to X86_EFLAGS_IF).
43 */
35 int irq_pending; 44 int irq_pending;
36 45
37 /* Async hypercall ring. Instead of directly making hypercalls, we can 46 /*
47 * Async hypercall ring. Instead of directly making hypercalls, we can
38 * place them in here for processing the next time the Host wants. 48 * place them in here for processing the next time the Host wants.
39 * This batching can be quite efficient. */ 49 * This batching can be quite efficient.
50 */
40 51
41 /* 0xFF == done (set by Host), 0 == pending (set by Guest). */ 52 /* 0xFF == done (set by Host), 0 == pending (set by Guest). */
42 u8 hcall_status[LHCALL_RING_SIZE]; 53 u8 hcall_status[LHCALL_RING_SIZE];
diff --git a/include/linux/lguest_launcher.h b/include/linux/lguest_launcher.h
index bfefbdf7498..495203ff221 100644
--- a/include/linux/lguest_launcher.h
+++ b/include/linux/lguest_launcher.h
@@ -29,8 +29,10 @@ struct lguest_device_desc {
29 __u8 type; 29 __u8 type;
30 /* The number of virtqueues (first in config array) */ 30 /* The number of virtqueues (first in config array) */
31 __u8 num_vq; 31 __u8 num_vq;
32 /* The number of bytes of feature bits. Multiply by 2: one for host 32 /*
33 * features and one for Guest acknowledgements. */ 33 * The number of bytes of feature bits. Multiply by 2: one for host
34 * features and one for Guest acknowledgements.
35 */
34 __u8 feature_len; 36 __u8 feature_len;
35 /* The number of bytes of the config array after virtqueues. */ 37 /* The number of bytes of the config array after virtqueues. */
36 __u8 config_len; 38 __u8 config_len;
@@ -39,8 +41,10 @@ struct lguest_device_desc {
39 __u8 config[0]; 41 __u8 config[0];
40}; 42};
41 43
42/*D:135 This is how we expect the device configuration field for a virtqueue 44/*D:135
43 * to be laid out in config space. */ 45 * This is how we expect the device configuration field for a virtqueue
46 * to be laid out in config space.
47 */
44struct lguest_vqconfig { 48struct lguest_vqconfig {
45 /* The number of entries in the virtio_ring */ 49 /* The number of entries in the virtio_ring */
46 __u16 num; 50 __u16 num;
@@ -61,7 +65,9 @@ enum lguest_req
61 LHREQ_EVENTFD, /* + address, fd. */ 65 LHREQ_EVENTFD, /* + address, fd. */
62}; 66};
63 67
64/* The alignment to use between consumer and producer parts of vring. 68/*
65 * x86 pagesize for historical reasons. */ 69 * The alignment to use between consumer and producer parts of vring.
70 * x86 pagesize for historical reasons.
71 */
66#define LGUEST_VRING_ALIGN 4096 72#define LGUEST_VRING_ALIGN 4096
67#endif /* _LINUX_LGUEST_LAUNCHER */ 73#endif /* _LINUX_LGUEST_LAUNCHER */
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 79b6d7fd4ac..e5b6e33c657 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -589,6 +589,7 @@ struct ata_device {
589#endif 589#endif
590 /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ 590 /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */
591 u64 n_sectors; /* size of device, if ATA */ 591 u64 n_sectors; /* size of device, if ATA */
592 u64 n_native_sectors; /* native size, if ATA */
592 unsigned int class; /* ATA_DEV_xxx */ 593 unsigned int class; /* ATA_DEV_xxx */
593 unsigned long unpark_deadline; 594 unsigned long unpark_deadline;
594 595
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 5675b63a063..0f32a9b6ff5 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -251,7 +251,7 @@ struct mtd_info {
251 251
252static inline struct mtd_info *dev_to_mtd(struct device *dev) 252static inline struct mtd_info *dev_to_mtd(struct device *dev)
253{ 253{
254 return dev ? container_of(dev, struct mtd_info, dev) : NULL; 254 return dev ? dev_get_drvdata(dev) : NULL;
255} 255}
256 256
257static inline uint32_t mtd_div_by_eb(uint64_t sz, struct mtd_info *mtd) 257static inline uint32_t mtd_div_by_eb(uint64_t sz, struct mtd_info *mtd)
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h
index af6dcb992bc..b70313d33ff 100644
--- a/include/linux/mtd/partitions.h
+++ b/include/linux/mtd/partitions.h
@@ -47,6 +47,8 @@ struct mtd_partition {
47#define MTDPART_SIZ_FULL (0) 47#define MTDPART_SIZ_FULL (0)
48 48
49 49
50struct mtd_info;
51
50int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int); 52int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int);
51int del_mtd_partitions(struct mtd_info *); 53int del_mtd_partitions(struct mtd_info *);
52 54
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index fdffb413b19..f6b90240dd4 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -473,7 +473,6 @@ extern int nfs_writepages(struct address_space *, struct writeback_control *);
473extern int nfs_flush_incompatible(struct file *file, struct page *page); 473extern int nfs_flush_incompatible(struct file *file, struct page *page);
474extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int); 474extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int);
475extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *); 475extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *);
476extern void nfs_writedata_release(void *);
477 476
478/* 477/*
479 * Try to write back everything synchronously (but check the 478 * Try to write back everything synchronously (but check the
@@ -488,7 +487,6 @@ extern int nfs_wb_page_cancel(struct inode *inode, struct page* page);
488extern int nfs_commit_inode(struct inode *, int); 487extern int nfs_commit_inode(struct inode *, int);
489extern struct nfs_write_data *nfs_commitdata_alloc(void); 488extern struct nfs_write_data *nfs_commitdata_alloc(void);
490extern void nfs_commit_free(struct nfs_write_data *wdata); 489extern void nfs_commit_free(struct nfs_write_data *wdata);
491extern void nfs_commitdata_release(void *wdata);
492#else 490#else
493static inline int 491static inline int
494nfs_commit_inode(struct inode *inode, int how) 492nfs_commit_inode(struct inode *inode, int how)
@@ -507,6 +505,7 @@ nfs_have_writebacks(struct inode *inode)
507 * Allocate nfs_write_data structures 505 * Allocate nfs_write_data structures
508 */ 506 */
509extern struct nfs_write_data *nfs_writedata_alloc(unsigned int npages); 507extern struct nfs_write_data *nfs_writedata_alloc(unsigned int npages);
508extern void nfs_writedata_free(struct nfs_write_data *);
510 509
511/* 510/*
512 * linux/fs/nfs/read.c 511 * linux/fs/nfs/read.c
@@ -515,7 +514,6 @@ extern int nfs_readpage(struct file *, struct page *);
515extern int nfs_readpages(struct file *, struct address_space *, 514extern int nfs_readpages(struct file *, struct address_space *,
516 struct list_head *, unsigned); 515 struct list_head *, unsigned);
517extern int nfs_readpage_result(struct rpc_task *, struct nfs_read_data *); 516extern int nfs_readpage_result(struct rpc_task *, struct nfs_read_data *);
518extern void nfs_readdata_release(void *data);
519extern int nfs_readpage_async(struct nfs_open_context *, struct inode *, 517extern int nfs_readpage_async(struct nfs_open_context *, struct inode *,
520 struct page *); 518 struct page *);
521 519
@@ -523,6 +521,7 @@ extern int nfs_readpage_async(struct nfs_open_context *, struct inode *,
523 * Allocate nfs_read_data structures 521 * Allocate nfs_read_data structures
524 */ 522 */
525extern struct nfs_read_data *nfs_readdata_alloc(unsigned int npages); 523extern struct nfs_read_data *nfs_readdata_alloc(unsigned int npages);
524extern void nfs_readdata_free(struct nfs_read_data *);
526 525
527/* 526/*
528 * linux/fs/nfs3proc.c 527 * linux/fs/nfs3proc.c
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
index 829b94b156f..b359c4a9ec9 100644
--- a/include/linux/nodemask.h
+++ b/include/linux/nodemask.h
@@ -82,6 +82,12 @@
82 * to generate slightly worse code. So use a simple one-line #define 82 * to generate slightly worse code. So use a simple one-line #define
83 * for node_isset(), instead of wrapping an inline inside a macro, the 83 * for node_isset(), instead of wrapping an inline inside a macro, the
84 * way we do the other calls. 84 * way we do the other calls.
85 *
86 * NODEMASK_SCRATCH
87 * When doing above logical AND, OR, XOR, Remap operations the callers tend to
88 * need temporary nodemask_t's on the stack. But if NODES_SHIFT is large,
89 * nodemask_t's consume too much stack space. NODEMASK_SCRATCH is a helper
90 * for such situations. See below and CPUMASK_ALLOC also.
85 */ 91 */
86 92
87#include <linux/kernel.h> 93#include <linux/kernel.h>
@@ -473,4 +479,26 @@ static inline int num_node_state(enum node_states state)
473#define for_each_node(node) for_each_node_state(node, N_POSSIBLE) 479#define for_each_node(node) for_each_node_state(node, N_POSSIBLE)
474#define for_each_online_node(node) for_each_node_state(node, N_ONLINE) 480#define for_each_online_node(node) for_each_node_state(node, N_ONLINE)
475 481
482/*
483 * For nodemask scrach area.(See CPUMASK_ALLOC() in cpumask.h)
484 */
485
486#if NODES_SHIFT > 8 /* nodemask_t > 64 bytes */
487#define NODEMASK_ALLOC(x, m) struct x *m = kmalloc(sizeof(*m), GFP_KERNEL)
488#define NODEMASK_FREE(m) kfree(m)
489#else
490#define NODEMASK_ALLOC(x, m) struct x _m, *m = &_m
491#define NODEMASK_FREE(m)
492#endif
493
494/* A example struture for using NODEMASK_ALLOC, used in mempolicy. */
495struct nodemask_scratch {
496 nodemask_t mask1;
497 nodemask_t mask2;
498};
499
500#define NODEMASK_SCRATCH(x) NODEMASK_ALLOC(nodemask_scratch, x)
501#define NODEMASK_SCRATCH_FREE(x) NODEMASK_FREE(x)
502
503
476#endif /* __LINUX_NODEMASK_H */ 504#endif /* __LINUX_NODEMASK_H */
diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h
index c9663c69030..53b94e025c7 100644
--- a/include/linux/of_mdio.h
+++ b/include/linux/of_mdio.h
@@ -18,5 +18,8 @@ extern struct phy_device *of_phy_connect(struct net_device *dev,
18 struct device_node *phy_np, 18 struct device_node *phy_np,
19 void (*hndlr)(struct net_device *), 19 void (*hndlr)(struct net_device *),
20 u32 flags, phy_interface_t iface); 20 u32 flags, phy_interface_t iface);
21extern struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
22 void (*hndlr)(struct net_device *),
23 phy_interface_t iface);
21 24
22#endif /* __LINUX_OF_MDIO_H */ 25#endif /* __LINUX_OF_MDIO_H */
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index 5e970c7d3fd..b53f7006cc4 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -115,26 +115,44 @@ enum perf_counter_sample_format {
115 PERF_SAMPLE_TID = 1U << 1, 115 PERF_SAMPLE_TID = 1U << 1,
116 PERF_SAMPLE_TIME = 1U << 2, 116 PERF_SAMPLE_TIME = 1U << 2,
117 PERF_SAMPLE_ADDR = 1U << 3, 117 PERF_SAMPLE_ADDR = 1U << 3,
118 PERF_SAMPLE_GROUP = 1U << 4, 118 PERF_SAMPLE_READ = 1U << 4,
119 PERF_SAMPLE_CALLCHAIN = 1U << 5, 119 PERF_SAMPLE_CALLCHAIN = 1U << 5,
120 PERF_SAMPLE_ID = 1U << 6, 120 PERF_SAMPLE_ID = 1U << 6,
121 PERF_SAMPLE_CPU = 1U << 7, 121 PERF_SAMPLE_CPU = 1U << 7,
122 PERF_SAMPLE_PERIOD = 1U << 8, 122 PERF_SAMPLE_PERIOD = 1U << 8,
123 PERF_SAMPLE_STREAM_ID = 1U << 9,
124 PERF_SAMPLE_RAW = 1U << 10,
123 125
124 PERF_SAMPLE_MAX = 1U << 9, /* non-ABI */ 126 PERF_SAMPLE_MAX = 1U << 11, /* non-ABI */
125}; 127};
126 128
127/* 129/*
128 * Bits that can be set in attr.read_format to request that 130 * The format of the data returned by read() on a perf counter fd,
129 * reads on the counter should return the indicated quantities, 131 * as specified by attr.read_format:
130 * in increasing order of bit value, after the counter value. 132 *
133 * struct read_format {
134 * { u64 value;
135 * { u64 time_enabled; } && PERF_FORMAT_ENABLED
136 * { u64 time_running; } && PERF_FORMAT_RUNNING
137 * { u64 id; } && PERF_FORMAT_ID
138 * } && !PERF_FORMAT_GROUP
139 *
140 * { u64 nr;
141 * { u64 time_enabled; } && PERF_FORMAT_ENABLED
142 * { u64 time_running; } && PERF_FORMAT_RUNNING
143 * { u64 value;
144 * { u64 id; } && PERF_FORMAT_ID
145 * } cntr[nr];
146 * } && PERF_FORMAT_GROUP
147 * };
131 */ 148 */
132enum perf_counter_read_format { 149enum perf_counter_read_format {
133 PERF_FORMAT_TOTAL_TIME_ENABLED = 1U << 0, 150 PERF_FORMAT_TOTAL_TIME_ENABLED = 1U << 0,
134 PERF_FORMAT_TOTAL_TIME_RUNNING = 1U << 1, 151 PERF_FORMAT_TOTAL_TIME_RUNNING = 1U << 1,
135 PERF_FORMAT_ID = 1U << 2, 152 PERF_FORMAT_ID = 1U << 2,
153 PERF_FORMAT_GROUP = 1U << 3,
136 154
137 PERF_FORMAT_MAX = 1U << 3, /* non-ABI */ 155 PERF_FORMAT_MAX = 1U << 4, /* non-ABI */
138}; 156};
139 157
140#define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */ 158#define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */
@@ -180,8 +198,9 @@ struct perf_counter_attr {
180 freq : 1, /* use freq, not period */ 198 freq : 1, /* use freq, not period */
181 inherit_stat : 1, /* per task counts */ 199 inherit_stat : 1, /* per task counts */
182 enable_on_exec : 1, /* next exec enables */ 200 enable_on_exec : 1, /* next exec enables */
201 task : 1, /* trace fork/exit */
183 202
184 __reserved_1 : 51; 203 __reserved_1 : 50;
185 204
186 __u32 wakeup_events; /* wakeup every n events */ 205 __u32 wakeup_events; /* wakeup every n events */
187 __u32 __reserved_2; 206 __u32 __reserved_2;
@@ -310,18 +329,18 @@ enum perf_event_type {
310 /* 329 /*
311 * struct { 330 * struct {
312 * struct perf_event_header header; 331 * struct perf_event_header header;
313 * u64 time; 332 * u32 pid, ppid;
314 * u64 id; 333 * u32 tid, ptid;
315 * u64 sample_period;
316 * }; 334 * };
317 */ 335 */
318 PERF_EVENT_PERIOD = 4, 336 PERF_EVENT_EXIT = 4,
319 337
320 /* 338 /*
321 * struct { 339 * struct {
322 * struct perf_event_header header; 340 * struct perf_event_header header;
323 * u64 time; 341 * u64 time;
324 * u64 id; 342 * u64 id;
343 * u64 stream_id;
325 * }; 344 * };
326 */ 345 */
327 PERF_EVENT_THROTTLE = 5, 346 PERF_EVENT_THROTTLE = 5,
@@ -331,6 +350,7 @@ enum perf_event_type {
331 * struct { 350 * struct {
332 * struct perf_event_header header; 351 * struct perf_event_header header;
333 * u32 pid, ppid; 352 * u32 pid, ppid;
353 * u32 tid, ptid;
334 * }; 354 * };
335 */ 355 */
336 PERF_EVENT_FORK = 7, 356 PERF_EVENT_FORK = 7,
@@ -339,10 +359,8 @@ enum perf_event_type {
339 * struct { 359 * struct {
340 * struct perf_event_header header; 360 * struct perf_event_header header;
341 * u32 pid, tid; 361 * u32 pid, tid;
342 * u64 value; 362 *
343 * { u64 time_enabled; } && PERF_FORMAT_ENABLED 363 * struct read_format values;
344 * { u64 time_running; } && PERF_FORMAT_RUNNING
345 * { u64 parent_id; } && PERF_FORMAT_ID
346 * }; 364 * };
347 */ 365 */
348 PERF_EVENT_READ = 8, 366 PERF_EVENT_READ = 8,
@@ -356,14 +374,28 @@ enum perf_event_type {
356 * { u64 time; } && PERF_SAMPLE_TIME 374 * { u64 time; } && PERF_SAMPLE_TIME
357 * { u64 addr; } && PERF_SAMPLE_ADDR 375 * { u64 addr; } && PERF_SAMPLE_ADDR
358 * { u64 id; } && PERF_SAMPLE_ID 376 * { u64 id; } && PERF_SAMPLE_ID
377 * { u64 stream_id;} && PERF_SAMPLE_STREAM_ID
359 * { u32 cpu, res; } && PERF_SAMPLE_CPU 378 * { u32 cpu, res; } && PERF_SAMPLE_CPU
360 * { u64 period; } && PERF_SAMPLE_PERIOD 379 * { u64 period; } && PERF_SAMPLE_PERIOD
361 * 380 *
362 * { u64 nr; 381 * { struct read_format values; } && PERF_SAMPLE_READ
363 * { u64 id, val; } cnt[nr]; } && PERF_SAMPLE_GROUP
364 * 382 *
365 * { u64 nr, 383 * { u64 nr,
366 * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN 384 * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN
385 *
386 * #
387 * # The RAW record below is opaque data wrt the ABI
388 * #
389 * # That is, the ABI doesn't make any promises wrt to
390 * # the stability of its content, it may vary depending
391 * # on event, hardware, kernel version and phase of
392 * # the moon.
393 * #
394 * # In other words, PERF_SAMPLE_RAW contents are not an ABI.
395 * #
396 *
397 * { u32 size;
398 * char data[size];}&& PERF_SAMPLE_RAW
367 * }; 399 * };
368 */ 400 */
369 PERF_EVENT_SAMPLE = 9, 401 PERF_EVENT_SAMPLE = 9,
@@ -409,6 +441,11 @@ struct perf_callchain_entry {
409 __u64 ip[PERF_MAX_STACK_DEPTH]; 441 __u64 ip[PERF_MAX_STACK_DEPTH];
410}; 442};
411 443
444struct perf_raw_record {
445 u32 size;
446 void *data;
447};
448
412struct task_struct; 449struct task_struct;
413 450
414/** 451/**
@@ -677,10 +714,13 @@ struct perf_sample_data {
677 struct pt_regs *regs; 714 struct pt_regs *regs;
678 u64 addr; 715 u64 addr;
679 u64 period; 716 u64 period;
717 struct perf_raw_record *raw;
680}; 718};
681 719
682extern int perf_counter_overflow(struct perf_counter *counter, int nmi, 720extern int perf_counter_overflow(struct perf_counter *counter, int nmi,
683 struct perf_sample_data *data); 721 struct perf_sample_data *data);
722extern void perf_counter_output(struct perf_counter *counter, int nmi,
723 struct perf_sample_data *data);
684 724
685/* 725/*
686 * Return 1 for a software counter, 0 for a hardware counter 726 * Return 1 for a software counter, 0 for a hardware counter
diff --git a/include/linux/pps.h b/include/linux/pps.h
index cfe5c7214ec..0194ab06177 100644
--- a/include/linux/pps.h
+++ b/include/linux/pps.h
@@ -22,6 +22,8 @@
22#ifndef _PPS_H_ 22#ifndef _PPS_H_
23#define _PPS_H_ 23#define _PPS_H_
24 24
25#include <linux/types.h>
26
25#define PPS_VERSION "5.3.6" 27#define PPS_VERSION "5.3.6"
26#define PPS_MAX_SOURCES 16 /* should be enough... */ 28#define PPS_MAX_SOURCES 16 /* should be enough... */
27 29
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
index 2ce29831feb..278777fa8a3 100644
--- a/include/linux/rfkill.h
+++ b/include/linux/rfkill.h
@@ -224,7 +224,7 @@ void rfkill_destroy(struct rfkill *rfkill);
224 * should be blocked) so that drivers need not keep track of the soft 224 * should be blocked) so that drivers need not keep track of the soft
225 * block state -- which they might not be able to. 225 * block state -- which they might not be able to.
226 */ 226 */
227bool __must_check rfkill_set_hw_state(struct rfkill *rfkill, bool blocked); 227bool rfkill_set_hw_state(struct rfkill *rfkill, bool blocked);
228 228
229/** 229/**
230 * rfkill_set_sw_state - Set the internal rfkill software block state 230 * rfkill_set_sw_state - Set the internal rfkill software block state
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
index e5996984ddd..9aaf5bfdad1 100644
--- a/include/linux/scatterlist.h
+++ b/include/linux/scatterlist.h
@@ -242,6 +242,8 @@ size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents,
242 */ 242 */
243 243
244#define SG_MITER_ATOMIC (1 << 0) /* use kmap_atomic */ 244#define SG_MITER_ATOMIC (1 << 0) /* use kmap_atomic */
245#define SG_MITER_TO_SG (1 << 1) /* flush back to phys on unmap */
246#define SG_MITER_FROM_SG (1 << 2) /* nop */
245 247
246struct sg_mapping_iter { 248struct sg_mapping_iter {
247 /* the following three fields can be accessed directly */ 249 /* the following three fields can be accessed directly */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 16a982e389f..3ab08e4bb6b 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -209,7 +209,7 @@ extern unsigned long long time_sync_thresh;
209 ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0) 209 ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0)
210#define task_contributes_to_load(task) \ 210#define task_contributes_to_load(task) \
211 ((task->state & TASK_UNINTERRUPTIBLE) != 0 && \ 211 ((task->state & TASK_UNINTERRUPTIBLE) != 0 && \
212 (task->flags & PF_FROZEN) == 0) 212 (task->flags & PF_FREEZING) == 0)
213 213
214#define __set_task_state(tsk, state_value) \ 214#define __set_task_state(tsk, state_value) \
215 do { (tsk)->state = (state_value); } while (0) 215 do { (tsk)->state = (state_value); } while (0)
@@ -1680,6 +1680,7 @@ extern cputime_t task_gtime(struct task_struct *p);
1680#define PF_MEMALLOC 0x00000800 /* Allocating memory */ 1680#define PF_MEMALLOC 0x00000800 /* Allocating memory */
1681#define PF_FLUSHER 0x00001000 /* responsible for disk writeback */ 1681#define PF_FLUSHER 0x00001000 /* responsible for disk writeback */
1682#define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ 1682#define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */
1683#define PF_FREEZING 0x00004000 /* freeze in progress. do not account to load */
1683#define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ 1684#define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */
1684#define PF_FROZEN 0x00010000 /* frozen for system suspend */ 1685#define PF_FROZEN 0x00010000 /* frozen for system suspend */
1685#define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */ 1686#define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 1488d8c81aa..e8c6c9136c9 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -394,6 +394,7 @@ extern void __do_SAK(struct tty_struct *tty);
394extern void disassociate_ctty(int priv); 394extern void disassociate_ctty(int priv);
395extern void no_tty(void); 395extern void no_tty(void);
396extern void tty_flip_buffer_push(struct tty_struct *tty); 396extern void tty_flip_buffer_push(struct tty_struct *tty);
397extern void tty_flush_to_ldisc(struct tty_struct *tty);
397extern void tty_buffer_free_all(struct tty_struct *tty); 398extern void tty_buffer_free_all(struct tty_struct *tty);
398extern void tty_buffer_flush(struct tty_struct *tty); 399extern void tty_buffer_flush(struct tty_struct *tty);
399extern void tty_buffer_init(struct tty_struct *tty); 400extern void tty_buffer_init(struct tty_struct *tty);
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h
index 40f38d89677..0c4ee9b88f8 100644
--- a/include/linux/tty_ldisc.h
+++ b/include/linux/tty_ldisc.h
@@ -144,7 +144,7 @@ struct tty_ldisc_ops {
144 144
145struct tty_ldisc { 145struct tty_ldisc {
146 struct tty_ldisc_ops *ops; 146 struct tty_ldisc_ops *ops;
147 int refcount; 147 atomic_t users;
148}; 148};
149 149
150#define TTY_LDISC_MAGIC 0x5403 150#define TTY_LDISC_MAGIC 0x5403
diff --git a/include/linux/uio.h b/include/linux/uio.h
index b7fe13883bd..98c114323a8 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -19,15 +19,6 @@ struct iovec
19 __kernel_size_t iov_len; /* Must be size_t (1003.1g) */ 19 __kernel_size_t iov_len; /* Must be size_t (1003.1g) */
20}; 20};
21 21
22#ifdef __KERNEL__
23
24struct kvec {
25 void *iov_base; /* and that should *never* hold a userland pointer */
26 size_t iov_len;
27};
28
29#endif
30
31/* 22/*
32 * UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1) 23 * UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1)
33 */ 24 */
@@ -35,6 +26,13 @@ struct kvec {
35#define UIO_FASTIOV 8 26#define UIO_FASTIOV 8
36#define UIO_MAXIOV 1024 27#define UIO_MAXIOV 1024
37 28
29#ifdef __KERNEL__
30
31struct kvec {
32 void *iov_base; /* and that should *never* hold a userland pointer */
33 size_t iov_len;
34};
35
38/* 36/*
39 * Total number of bytes covered by an iovec. 37 * Total number of bytes covered by an iovec.
40 * 38 *
@@ -53,5 +51,6 @@ static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs)
53} 51}
54 52
55unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to); 53unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);
54#endif
56 55
57#endif 56#endif
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 95846d98801..74f16876f38 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -338,6 +338,7 @@ struct v4l2_pix_format {
338/* Vendor-specific formats */ 338/* Vendor-specific formats */
339#define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ 339#define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */
340#define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */ 340#define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */
341#define V4L2_PIX_FMT_SN9C20X_I420 v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */
341#define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P', 'W', 'C', '1') /* pwc older webcam */ 342#define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P', 'W', 'C', '1') /* pwc older webcam */
342#define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P', 'W', 'C', '2') /* pwc newer webcam */ 343#define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P', 'W', 'C', '2') /* pwc newer webcam */
343#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E', '6', '2', '5') /* ET61X251 compression */ 344#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E', '6', '2', '5') /* ET61X251 compression */
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h
index be7d255fc7c..8dab9f2b883 100644
--- a/include/linux/virtio_blk.h
+++ b/include/linux/virtio_blk.h
@@ -20,8 +20,7 @@
20 20
21#define VIRTIO_BLK_ID_BYTES (sizeof(__u16[256])) /* IDENTIFY DATA */ 21#define VIRTIO_BLK_ID_BYTES (sizeof(__u16[256])) /* IDENTIFY DATA */
22 22
23struct virtio_blk_config 23struct virtio_blk_config {
24{
25 /* The capacity (in 512-byte sectors). */ 24 /* The capacity (in 512-byte sectors). */
26 __u64 capacity; 25 __u64 capacity;
27 /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ 26 /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */
@@ -50,8 +49,7 @@ struct virtio_blk_config
50#define VIRTIO_BLK_T_BARRIER 0x80000000 49#define VIRTIO_BLK_T_BARRIER 0x80000000
51 50
52/* This is the first element of the read scatter-gather list. */ 51/* This is the first element of the read scatter-gather list. */
53struct virtio_blk_outhdr 52struct virtio_blk_outhdr {
54{
55 /* VIRTIO_BLK_T* */ 53 /* VIRTIO_BLK_T* */
56 __u32 type; 54 __u32 type;
57 /* io priority. */ 55 /* io priority. */
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 99f514575f6..e547e3c8ee9 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -79,8 +79,7 @@
79 * the dev->feature bits if it wants. 79 * the dev->feature bits if it wants.
80 */ 80 */
81typedef void vq_callback_t(struct virtqueue *); 81typedef void vq_callback_t(struct virtqueue *);
82struct virtio_config_ops 82struct virtio_config_ops {
83{
84 void (*get)(struct virtio_device *vdev, unsigned offset, 83 void (*get)(struct virtio_device *vdev, unsigned offset,
85 void *buf, unsigned len); 84 void *buf, unsigned len);
86 void (*set)(struct virtio_device *vdev, unsigned offset, 85 void (*set)(struct virtio_device *vdev, unsigned offset,
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
index 9c543d6ac53..d8dd539c9f4 100644
--- a/include/linux/virtio_net.h
+++ b/include/linux/virtio_net.h
@@ -31,8 +31,7 @@
31 31
32#define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ 32#define VIRTIO_NET_S_LINK_UP 1 /* Link is up */
33 33
34struct virtio_net_config 34struct virtio_net_config {
35{
36 /* The config defining mac address (if VIRTIO_NET_F_MAC) */ 35 /* The config defining mac address (if VIRTIO_NET_F_MAC) */
37 __u8 mac[6]; 36 __u8 mac[6];
38 /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ 37 /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */
@@ -41,8 +40,7 @@ struct virtio_net_config
41 40
42/* This is the first element of the scatter-gather list. If you don't 41/* This is the first element of the scatter-gather list. If you don't
43 * specify GSO or CSUM features, you can simply ignore the header. */ 42 * specify GSO or CSUM features, you can simply ignore the header. */
44struct virtio_net_hdr 43struct virtio_net_hdr {
45{
46#define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start, csum_offset 44#define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start, csum_offset
47 __u8 flags; 45 __u8 flags;
48#define VIRTIO_NET_HDR_GSO_NONE 0 // Not a GSO frame 46#define VIRTIO_NET_HDR_GSO_NONE 0 // Not a GSO frame
diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h
index 693e0ec5afa..e4d144b132b 100644
--- a/include/linux/virtio_ring.h
+++ b/include/linux/virtio_ring.h
@@ -30,8 +30,7 @@
30#define VIRTIO_RING_F_INDIRECT_DESC 28 30#define VIRTIO_RING_F_INDIRECT_DESC 28
31 31
32/* Virtio ring descriptors: 16 bytes. These can chain together via "next". */ 32/* Virtio ring descriptors: 16 bytes. These can chain together via "next". */
33struct vring_desc 33struct vring_desc {
34{
35 /* Address (guest-physical). */ 34 /* Address (guest-physical). */
36 __u64 addr; 35 __u64 addr;
37 /* Length. */ 36 /* Length. */
@@ -42,24 +41,21 @@ struct vring_desc
42 __u16 next; 41 __u16 next;
43}; 42};
44 43
45struct vring_avail 44struct vring_avail {
46{
47 __u16 flags; 45 __u16 flags;
48 __u16 idx; 46 __u16 idx;
49 __u16 ring[]; 47 __u16 ring[];
50}; 48};
51 49
52/* u32 is used here for ids for padding reasons. */ 50/* u32 is used here for ids for padding reasons. */
53struct vring_used_elem 51struct vring_used_elem {
54{
55 /* Index of start of used descriptor chain. */ 52 /* Index of start of used descriptor chain. */
56 __u32 id; 53 __u32 id;
57 /* Total length of the descriptor chain which was used (written to) */ 54 /* Total length of the descriptor chain which was used (written to) */
58 __u32 len; 55 __u32 len;
59}; 56};
60 57
61struct vring_used 58struct vring_used {
62{
63 __u16 flags; 59 __u16 flags;
64 __u16 idx; 60 __u16 idx;
65 struct vring_used_elem ring[]; 61 struct vring_used_elem ring[];
diff --git a/include/linux/wait.h b/include/linux/wait.h
index 6788e1a4d4c..cf3c2f5dba5 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -77,7 +77,14 @@ struct task_struct;
77#define __WAIT_BIT_KEY_INITIALIZER(word, bit) \ 77#define __WAIT_BIT_KEY_INITIALIZER(word, bit) \
78 { .flags = word, .bit_nr = bit, } 78 { .flags = word, .bit_nr = bit, }
79 79
80extern void init_waitqueue_head(wait_queue_head_t *q); 80extern void __init_waitqueue_head(wait_queue_head_t *q, struct lock_class_key *);
81
82#define init_waitqueue_head(q) \
83 do { \
84 static struct lock_class_key __key; \
85 \
86 __init_waitqueue_head((q), &__key); \
87 } while (0)
81 88
82#ifdef CONFIG_LOCKDEP 89#ifdef CONFIG_LOCKDEP
83# define __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) \ 90# define __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) \
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h
index 11a4a2d3e36..94e908c0d7a 100644
--- a/include/media/v4l2-chip-ident.h
+++ b/include/media/v4l2-chip-ident.h
@@ -60,6 +60,10 @@ enum {
60 V4L2_IDENT_OV7670 = 250, 60 V4L2_IDENT_OV7670 = 250,
61 V4L2_IDENT_OV7720 = 251, 61 V4L2_IDENT_OV7720 = 251,
62 V4L2_IDENT_OV7725 = 252, 62 V4L2_IDENT_OV7725 = 252,
63 V4L2_IDENT_OV7660 = 253,
64 V4L2_IDENT_OV9650 = 254,
65 V4L2_IDENT_OV9655 = 255,
66 V4L2_IDENT_SOI968 = 256,
63 67
64 /* module saa7146: reserved range 300-309 */ 68 /* module saa7146: reserved range 300-309 */
65 V4L2_IDENT_SAA7146 = 300, 69 V4L2_IDENT_SAA7146 = 300,
@@ -161,6 +165,9 @@ enum {
161 /* module tw9910: just ident 9910 */ 165 /* module tw9910: just ident 9910 */
162 V4L2_IDENT_TW9910 = 9910, 166 V4L2_IDENT_TW9910 = 9910,
163 167
168 /* module sn9c20x: just ident 10000 */
169 V4L2_IDENT_SN9C20X = 10000,
170
164 /* module msp3400: reserved range 34000-34999 and 44000-44999 */ 171 /* module msp3400: reserved range 34000-34999 and 44000-44999 */
165 V4L2_IDENT_MSPX4XX = 34000, /* generic MSPX4XX identifier, only 172 V4L2_IDENT_MSPX4XX = 34000, /* generic MSPX4XX identifier, only
166 use internally (tveeprom.c). */ 173 use internally (tveeprom.c). */
@@ -237,6 +244,11 @@ enum {
237 V4L2_IDENT_MT9V022IX7ATC = 45010, /* No way to detect "normal" I77ATx */ 244 V4L2_IDENT_MT9V022IX7ATC = 45010, /* No way to detect "normal" I77ATx */
238 V4L2_IDENT_MT9V022IX7ATM = 45015, /* and "lead free" IA7ATx chips */ 245 V4L2_IDENT_MT9V022IX7ATM = 45015, /* and "lead free" IA7ATx chips */
239 V4L2_IDENT_MT9T031 = 45020, 246 V4L2_IDENT_MT9T031 = 45020,
247 V4L2_IDENT_MT9V111 = 45031,
248 V4L2_IDENT_MT9V112 = 45032,
249
250 /* HV7131R CMOS sensor: just ident 46000 */
251 V4L2_IDENT_HV7131R = 46000,
240 252
241 /* module cs53132a: just ident 53132 */ 253 /* module cs53132a: just ident 53132 */
242 V4L2_IDENT_CS53l32A = 53132, 254 V4L2_IDENT_CS53l32A = 53132,
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h
index 80072611d26..c274993234e 100644
--- a/include/net/bluetooth/rfcomm.h
+++ b/include/net/bluetooth/rfcomm.h
@@ -355,7 +355,17 @@ struct rfcomm_dev_list_req {
355}; 355};
356 356
357int rfcomm_dev_ioctl(struct sock *sk, unsigned int cmd, void __user *arg); 357int rfcomm_dev_ioctl(struct sock *sk, unsigned int cmd, void __user *arg);
358
359#ifdef CONFIG_BT_RFCOMM_TTY
358int rfcomm_init_ttys(void); 360int rfcomm_init_ttys(void);
359void rfcomm_cleanup_ttys(void); 361void rfcomm_cleanup_ttys(void);
360 362#else
363static inline int rfcomm_init_ttys(void)
364{
365 return 0;
366}
367static inline void rfcomm_cleanup_ttys(void)
368{
369}
370#endif
361#endif /* __RFCOMM_H */ 371#endif /* __RFCOMM_H */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 1a21895b732..d1892d66701 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -979,6 +979,10 @@ struct cfg80211_ops {
979 * channels at a later time. This can be used for devices which do not 979 * channels at a later time. This can be used for devices which do not
980 * have calibration information gauranteed for frequencies or settings 980 * have calibration information gauranteed for frequencies or settings
981 * outside of its regulatory domain. 981 * outside of its regulatory domain.
982 * @disable_beacon_hints: enable this if your driver needs to ensure that
983 * passive scan flags and beaconing flags may not be lifted by cfg80211
984 * due to regulatory beacon hints. For more information on beacon
985 * hints read the documenation for regulatory_hint_found_beacon()
982 * @reg_notifier: the driver's regulatory notification callback 986 * @reg_notifier: the driver's regulatory notification callback
983 * @regd: the driver's regulatory domain, if one was requested via 987 * @regd: the driver's regulatory domain, if one was requested via
984 * the regulatory_hint() API. This can be used by the driver 988 * the regulatory_hint() API. This can be used by the driver
@@ -1004,6 +1008,7 @@ struct wiphy {
1004 1008
1005 bool custom_regulatory; 1009 bool custom_regulatory;
1006 bool strict_regulatory; 1010 bool strict_regulatory;
1011 bool disable_beacon_hints;
1007 1012
1008 enum cfg80211_signal_type signal_type; 1013 enum cfg80211_signal_type signal_type;
1009 1014
diff --git a/include/net/rose.h b/include/net/rose.h
index cbd5364b2c8..5ba9f02731e 100644
--- a/include/net/rose.h
+++ b/include/net/rose.h
@@ -156,7 +156,7 @@ extern int sysctl_rose_maximum_vcs;
156extern int sysctl_rose_window_size; 156extern int sysctl_rose_window_size;
157extern int rosecmp(rose_address *, rose_address *); 157extern int rosecmp(rose_address *, rose_address *);
158extern int rosecmpm(rose_address *, rose_address *, unsigned short); 158extern int rosecmpm(rose_address *, rose_address *, unsigned short);
159extern const char *rose2asc(const rose_address *); 159extern char *rose2asc(char *buf, const rose_address *);
160extern struct sock *rose_find_socket(unsigned int, struct rose_neigh *); 160extern struct sock *rose_find_socket(unsigned int, struct rose_neigh *);
161extern void rose_kill_by_neigh(struct rose_neigh *); 161extern void rose_kill_by_neigh(struct rose_neigh *);
162extern unsigned int rose_new_lci(struct rose_neigh *); 162extern unsigned int rose_new_lci(struct rose_neigh *);
diff --git a/include/net/sock.h b/include/net/sock.h
index 2c0da9239b9..950409dcec3 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -104,15 +104,15 @@ struct net;
104 104
105/** 105/**
106 * struct sock_common - minimal network layer representation of sockets 106 * struct sock_common - minimal network layer representation of sockets
107 * @skc_node: main hash linkage for various protocol lookup tables
108 * @skc_nulls_node: main hash linkage for UDP/UDP-Lite protocol
109 * @skc_refcnt: reference count
110 * @skc_hash: hash value used with various protocol lookup tables
107 * @skc_family: network address family 111 * @skc_family: network address family
108 * @skc_state: Connection state 112 * @skc_state: Connection state
109 * @skc_reuse: %SO_REUSEADDR setting 113 * @skc_reuse: %SO_REUSEADDR setting
110 * @skc_bound_dev_if: bound device index if != 0 114 * @skc_bound_dev_if: bound device index if != 0
111 * @skc_node: main hash linkage for various protocol lookup tables
112 * @skc_nulls_node: main hash linkage for UDP/UDP-Lite protocol
113 * @skc_bind_node: bind hash linkage for various protocol lookup tables 115 * @skc_bind_node: bind hash linkage for various protocol lookup tables
114 * @skc_refcnt: reference count
115 * @skc_hash: hash value used with various protocol lookup tables
116 * @skc_prot: protocol handlers inside a network family 116 * @skc_prot: protocol handlers inside a network family
117 * @skc_net: reference to the network namespace of this socket 117 * @skc_net: reference to the network namespace of this socket
118 * 118 *
@@ -120,17 +120,21 @@ struct net;
120 * for struct sock and struct inet_timewait_sock. 120 * for struct sock and struct inet_timewait_sock.
121 */ 121 */
122struct sock_common { 122struct sock_common {
123 unsigned short skc_family; 123 /*
124 volatile unsigned char skc_state; 124 * first fields are not copied in sock_copy()
125 unsigned char skc_reuse; 125 */
126 int skc_bound_dev_if;
127 union { 126 union {
128 struct hlist_node skc_node; 127 struct hlist_node skc_node;
129 struct hlist_nulls_node skc_nulls_node; 128 struct hlist_nulls_node skc_nulls_node;
130 }; 129 };
131 struct hlist_node skc_bind_node;
132 atomic_t skc_refcnt; 130 atomic_t skc_refcnt;
131
133 unsigned int skc_hash; 132 unsigned int skc_hash;
133 unsigned short skc_family;
134 volatile unsigned char skc_state;
135 unsigned char skc_reuse;
136 int skc_bound_dev_if;
137 struct hlist_node skc_bind_node;
134 struct proto *skc_prot; 138 struct proto *skc_prot;
135#ifdef CONFIG_NET_NS 139#ifdef CONFIG_NET_NS
136 struct net *skc_net; 140 struct net *skc_net;
@@ -208,15 +212,17 @@ struct sock {
208 * don't add nothing before this first member (__sk_common) --acme 212 * don't add nothing before this first member (__sk_common) --acme
209 */ 213 */
210 struct sock_common __sk_common; 214 struct sock_common __sk_common;
215#define sk_node __sk_common.skc_node
216#define sk_nulls_node __sk_common.skc_nulls_node
217#define sk_refcnt __sk_common.skc_refcnt
218
219#define sk_copy_start __sk_common.skc_hash
220#define sk_hash __sk_common.skc_hash
211#define sk_family __sk_common.skc_family 221#define sk_family __sk_common.skc_family
212#define sk_state __sk_common.skc_state 222#define sk_state __sk_common.skc_state
213#define sk_reuse __sk_common.skc_reuse 223#define sk_reuse __sk_common.skc_reuse
214#define sk_bound_dev_if __sk_common.skc_bound_dev_if 224#define sk_bound_dev_if __sk_common.skc_bound_dev_if
215#define sk_node __sk_common.skc_node
216#define sk_nulls_node __sk_common.skc_nulls_node
217#define sk_bind_node __sk_common.skc_bind_node 225#define sk_bind_node __sk_common.skc_bind_node
218#define sk_refcnt __sk_common.skc_refcnt
219#define sk_hash __sk_common.skc_hash
220#define sk_prot __sk_common.skc_prot 226#define sk_prot __sk_common.skc_prot
221#define sk_net __sk_common.skc_net 227#define sk_net __sk_common.skc_net
222 kmemcheck_bitfield_begin(flags); 228 kmemcheck_bitfield_begin(flags);
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 19f4150f4d4..88af8430647 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1425,6 +1425,11 @@ struct tcp_request_sock_ops {
1425#ifdef CONFIG_TCP_MD5SIG 1425#ifdef CONFIG_TCP_MD5SIG
1426 struct tcp_md5sig_key *(*md5_lookup) (struct sock *sk, 1426 struct tcp_md5sig_key *(*md5_lookup) (struct sock *sk,
1427 struct request_sock *req); 1427 struct request_sock *req);
1428 int (*calc_md5_hash) (char *location,
1429 struct tcp_md5sig_key *md5,
1430 struct sock *sk,
1431 struct request_sock *req,
1432 struct sk_buff *skb);
1428#endif 1433#endif
1429}; 1434};
1430 1435
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 1867553c61e..f64fbaae781 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -144,6 +144,9 @@
144#undef TP_fast_assign 144#undef TP_fast_assign
145#define TP_fast_assign(args...) args 145#define TP_fast_assign(args...) args
146 146
147#undef TP_perf_assign
148#define TP_perf_assign(args...)
149
147#undef TRACE_EVENT 150#undef TRACE_EVENT
148#define TRACE_EVENT(call, proto, args, tstruct, func, print) \ 151#define TRACE_EVENT(call, proto, args, tstruct, func, print) \
149static int \ 152static int \
@@ -345,6 +348,56 @@ static inline int ftrace_get_offsets_##call( \
345 348
346#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) 349#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
347 350
351#ifdef CONFIG_EVENT_PROFILE
352
353/*
354 * Generate the functions needed for tracepoint perf_counter support.
355 *
356 * NOTE: The insertion profile callback (ftrace_profile_<call>) is defined later
357 *
358 * static int ftrace_profile_enable_<call>(struct ftrace_event_call *event_call)
359 * {
360 * int ret = 0;
361 *
362 * if (!atomic_inc_return(&event_call->profile_count))
363 * ret = register_trace_<call>(ftrace_profile_<call>);
364 *
365 * return ret;
366 * }
367 *
368 * static void ftrace_profile_disable_<call>(struct ftrace_event_call *event_call)
369 * {
370 * if (atomic_add_negative(-1, &event->call->profile_count))
371 * unregister_trace_<call>(ftrace_profile_<call>);
372 * }
373 *
374 */
375
376#undef TRACE_EVENT
377#define TRACE_EVENT(call, proto, args, tstruct, assign, print) \
378 \
379static void ftrace_profile_##call(proto); \
380 \
381static int ftrace_profile_enable_##call(struct ftrace_event_call *event_call) \
382{ \
383 int ret = 0; \
384 \
385 if (!atomic_inc_return(&event_call->profile_count)) \
386 ret = register_trace_##call(ftrace_profile_##call); \
387 \
388 return ret; \
389} \
390 \
391static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\
392{ \
393 if (atomic_add_negative(-1, &event_call->profile_count)) \
394 unregister_trace_##call(ftrace_profile_##call); \
395}
396
397#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
398
399#endif
400
348/* 401/*
349 * Stage 4 of the trace events. 402 * Stage 4 of the trace events.
350 * 403 *
@@ -447,28 +500,6 @@ static inline int ftrace_get_offsets_##call( \
447#define TP_FMT(fmt, args...) fmt "\n", ##args 500#define TP_FMT(fmt, args...) fmt "\n", ##args
448 501
449#ifdef CONFIG_EVENT_PROFILE 502#ifdef CONFIG_EVENT_PROFILE
450#define _TRACE_PROFILE(call, proto, args) \
451static void ftrace_profile_##call(proto) \
452{ \
453 extern void perf_tpcounter_event(int); \
454 perf_tpcounter_event(event_##call.id); \
455} \
456 \
457static int ftrace_profile_enable_##call(struct ftrace_event_call *event_call) \
458{ \
459 int ret = 0; \
460 \
461 if (!atomic_inc_return(&event_call->profile_count)) \
462 ret = register_trace_##call(ftrace_profile_##call); \
463 \
464 return ret; \
465} \
466 \
467static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\
468{ \
469 if (atomic_add_negative(-1, &event_call->profile_count)) \
470 unregister_trace_##call(ftrace_profile_##call); \
471}
472 503
473#define _TRACE_PROFILE_INIT(call) \ 504#define _TRACE_PROFILE_INIT(call) \
474 .profile_count = ATOMIC_INIT(-1), \ 505 .profile_count = ATOMIC_INIT(-1), \
@@ -476,7 +507,6 @@ static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\
476 .profile_disable = ftrace_profile_disable_##call, 507 .profile_disable = ftrace_profile_disable_##call,
477 508
478#else 509#else
479#define _TRACE_PROFILE(call, proto, args)
480#define _TRACE_PROFILE_INIT(call) 510#define _TRACE_PROFILE_INIT(call)
481#endif 511#endif
482 512
@@ -502,7 +532,6 @@ static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\
502 532
503#undef TRACE_EVENT 533#undef TRACE_EVENT
504#define TRACE_EVENT(call, proto, args, tstruct, assign, print) \ 534#define TRACE_EVENT(call, proto, args, tstruct, assign, print) \
505_TRACE_PROFILE(call, PARAMS(proto), PARAMS(args)) \
506 \ 535 \
507static struct ftrace_event_call event_##call; \ 536static struct ftrace_event_call event_##call; \
508 \ 537 \
@@ -586,6 +615,110 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
586 615
587#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) 616#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
588 617
589#undef _TRACE_PROFILE 618/*
619 * Define the insertion callback to profile events
620 *
621 * The job is very similar to ftrace_raw_event_<call> except that we don't
622 * insert in the ring buffer but in a perf counter.
623 *
624 * static void ftrace_profile_<call>(proto)
625 * {
626 * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets;
627 * struct ftrace_event_call *event_call = &event_<call>;
628 * extern void perf_tpcounter_event(int, u64, u64, void *, int);
629 * struct ftrace_raw_##call *entry;
630 * u64 __addr = 0, __count = 1;
631 * unsigned long irq_flags;
632 * int __entry_size;
633 * int __data_size;
634 * int pc;
635 *
636 * local_save_flags(irq_flags);
637 * pc = preempt_count();
638 *
639 * __data_size = ftrace_get_offsets_<call>(&__data_offsets, args);
640 *
641 * // Below we want to get the aligned size by taking into account
642 * // the u32 field that will later store the buffer size
643 * __entry_size = ALIGN(__data_size + sizeof(*entry) + sizeof(u32),
644 * sizeof(u64));
645 * __entry_size -= sizeof(u32);
646 *
647 * do {
648 * char raw_data[__entry_size]; <- allocate our sample in the stack
649 * struct trace_entry *ent;
650 *
651 * zero dead bytes from alignment to avoid stack leak to userspace:
652 *
653 * *(u64 *)(&raw_data[__entry_size - sizeof(u64)]) = 0ULL;
654 * entry = (struct ftrace_raw_<call> *)raw_data;
655 * ent = &entry->ent;
656 * tracing_generic_entry_update(ent, irq_flags, pc);
657 * ent->type = event_call->id;
658 *
659 * <tstruct> <- do some jobs with dynamic arrays
660 *
661 * <assign> <- affect our values
662 *
663 * perf_tpcounter_event(event_call->id, __addr, __count, entry,
664 * __entry_size); <- submit them to perf counter
665 * } while (0);
666 *
667 * }
668 */
669
670#ifdef CONFIG_EVENT_PROFILE
671
672#undef __perf_addr
673#define __perf_addr(a) __addr = (a)
674
675#undef __perf_count
676#define __perf_count(c) __count = (c)
677
678#undef TRACE_EVENT
679#define TRACE_EVENT(call, proto, args, tstruct, assign, print) \
680static void ftrace_profile_##call(proto) \
681{ \
682 struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\
683 struct ftrace_event_call *event_call = &event_##call; \
684 extern void perf_tpcounter_event(int, u64, u64, void *, int); \
685 struct ftrace_raw_##call *entry; \
686 u64 __addr = 0, __count = 1; \
687 unsigned long irq_flags; \
688 int __entry_size; \
689 int __data_size; \
690 int pc; \
691 \
692 local_save_flags(irq_flags); \
693 pc = preempt_count(); \
694 \
695 __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \
696 __entry_size = ALIGN(__data_size + sizeof(*entry) + sizeof(u32),\
697 sizeof(u64)); \
698 __entry_size -= sizeof(u32); \
699 \
700 do { \
701 char raw_data[__entry_size]; \
702 struct trace_entry *ent; \
703 \
704 *(u64 *)(&raw_data[__entry_size - sizeof(u64)]) = 0ULL; \
705 entry = (struct ftrace_raw_##call *)raw_data; \
706 ent = &entry->ent; \
707 tracing_generic_entry_update(ent, irq_flags, pc); \
708 ent->type = event_call->id; \
709 \
710 tstruct \
711 \
712 { assign; } \
713 \
714 perf_tpcounter_event(event_call->id, __addr, __count, entry,\
715 __entry_size); \
716 } while (0); \
717 \
718}
719
720#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
721#endif /* CONFIG_EVENT_PROFILE */
722
590#undef _TRACE_PROFILE_INIT 723#undef _TRACE_PROFILE_INIT
591 724
diff --git a/init/Kconfig b/init/Kconfig
index 1ce05a4cb5f..3f7e60995c8 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -940,6 +940,7 @@ menu "Performance Counters"
940 940
941config PERF_COUNTERS 941config PERF_COUNTERS
942 bool "Kernel Performance Counters" 942 bool "Kernel Performance Counters"
943 default y if PROFILING
943 depends on HAVE_PERF_COUNTERS 944 depends on HAVE_PERF_COUNTERS
944 select ANON_INODES 945 select ANON_INODES
945 help 946 help
@@ -961,9 +962,17 @@ config PERF_COUNTERS
961 Say Y if unsure. 962 Say Y if unsure.
962 963
963config EVENT_PROFILE 964config EVENT_PROFILE
964 bool "Tracepoint profile sources" 965 bool "Tracepoint profiling sources"
965 depends on PERF_COUNTERS && EVENT_TRACER 966 depends on PERF_COUNTERS && EVENT_TRACING
966 default y 967 default y
968 help
969 Allow the use of tracepoints as software performance counters.
970
971 When this is enabled, you can create perf counters based on
972 tracepoints using PERF_TYPE_TRACEPOINT and the tracepoint ID
973 found in debugfs://tracing/events/*/*/id. (The -e/--events
974 option to the perf tool can parse and interpret symbolic
975 tracepoints, in the subsystem:tracepoint_name format.)
967 976
968endmenu 977endmenu
969 978
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 3737a682cdf..b6eadfe30e7 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -47,6 +47,7 @@
47#include <linux/hash.h> 47#include <linux/hash.h>
48#include <linux/namei.h> 48#include <linux/namei.h>
49#include <linux/smp_lock.h> 49#include <linux/smp_lock.h>
50#include <linux/pid_namespace.h>
50 51
51#include <asm/atomic.h> 52#include <asm/atomic.h>
52 53
@@ -734,16 +735,28 @@ static void cgroup_d_remove_dir(struct dentry *dentry)
734 * reference to css->refcnt. In general, this refcnt is expected to goes down 735 * reference to css->refcnt. In general, this refcnt is expected to goes down
735 * to zero, soon. 736 * to zero, soon.
736 * 737 *
737 * CGRP_WAIT_ON_RMDIR flag is modified under cgroup's inode->i_mutex; 738 * CGRP_WAIT_ON_RMDIR flag is set under cgroup's inode->i_mutex;
738 */ 739 */
739DECLARE_WAIT_QUEUE_HEAD(cgroup_rmdir_waitq); 740DECLARE_WAIT_QUEUE_HEAD(cgroup_rmdir_waitq);
740 741
741static void cgroup_wakeup_rmdir_waiters(const struct cgroup *cgrp) 742static void cgroup_wakeup_rmdir_waiter(struct cgroup *cgrp)
742{ 743{
743 if (unlikely(test_bit(CGRP_WAIT_ON_RMDIR, &cgrp->flags))) 744 if (unlikely(test_and_clear_bit(CGRP_WAIT_ON_RMDIR, &cgrp->flags)))
744 wake_up_all(&cgroup_rmdir_waitq); 745 wake_up_all(&cgroup_rmdir_waitq);
745} 746}
746 747
748void cgroup_exclude_rmdir(struct cgroup_subsys_state *css)
749{
750 css_get(css);
751}
752
753void cgroup_release_and_wakeup_rmdir(struct cgroup_subsys_state *css)
754{
755 cgroup_wakeup_rmdir_waiter(css->cgroup);
756 css_put(css);
757}
758
759
747static int rebind_subsystems(struct cgroupfs_root *root, 760static int rebind_subsystems(struct cgroupfs_root *root,
748 unsigned long final_bits) 761 unsigned long final_bits)
749{ 762{
@@ -960,6 +973,7 @@ static void init_cgroup_housekeeping(struct cgroup *cgrp)
960 INIT_LIST_HEAD(&cgrp->children); 973 INIT_LIST_HEAD(&cgrp->children);
961 INIT_LIST_HEAD(&cgrp->css_sets); 974 INIT_LIST_HEAD(&cgrp->css_sets);
962 INIT_LIST_HEAD(&cgrp->release_list); 975 INIT_LIST_HEAD(&cgrp->release_list);
976 INIT_LIST_HEAD(&cgrp->pids_list);
963 init_rwsem(&cgrp->pids_mutex); 977 init_rwsem(&cgrp->pids_mutex);
964} 978}
965static void init_cgroup_root(struct cgroupfs_root *root) 979static void init_cgroup_root(struct cgroupfs_root *root)
@@ -1357,7 +1371,7 @@ int cgroup_attach_task(struct cgroup *cgrp, struct task_struct *tsk)
1357 * wake up rmdir() waiter. the rmdir should fail since the cgroup 1371 * wake up rmdir() waiter. the rmdir should fail since the cgroup
1358 * is no longer empty. 1372 * is no longer empty.
1359 */ 1373 */
1360 cgroup_wakeup_rmdir_waiters(cgrp); 1374 cgroup_wakeup_rmdir_waiter(cgrp);
1361 return 0; 1375 return 0;
1362} 1376}
1363 1377
@@ -2201,12 +2215,30 @@ err:
2201 return ret; 2215 return ret;
2202} 2216}
2203 2217
2218/*
2219 * Cache pids for all threads in the same pid namespace that are
2220 * opening the same "tasks" file.
2221 */
2222struct cgroup_pids {
2223 /* The node in cgrp->pids_list */
2224 struct list_head list;
2225 /* The cgroup those pids belong to */
2226 struct cgroup *cgrp;
2227 /* The namepsace those pids belong to */
2228 struct pid_namespace *ns;
2229 /* Array of process ids in the cgroup */
2230 pid_t *tasks_pids;
2231 /* How many files are using the this tasks_pids array */
2232 int use_count;
2233 /* Length of the current tasks_pids array */
2234 int length;
2235};
2236
2204static int cmppid(const void *a, const void *b) 2237static int cmppid(const void *a, const void *b)
2205{ 2238{
2206 return *(pid_t *)a - *(pid_t *)b; 2239 return *(pid_t *)a - *(pid_t *)b;
2207} 2240}
2208 2241
2209
2210/* 2242/*
2211 * seq_file methods for the "tasks" file. The seq_file position is the 2243 * seq_file methods for the "tasks" file. The seq_file position is the
2212 * next pid to display; the seq_file iterator is a pointer to the pid 2244 * next pid to display; the seq_file iterator is a pointer to the pid
@@ -2221,45 +2253,47 @@ static void *cgroup_tasks_start(struct seq_file *s, loff_t *pos)
2221 * after a seek to the start). Use a binary-search to find the 2253 * after a seek to the start). Use a binary-search to find the
2222 * next pid to display, if any 2254 * next pid to display, if any
2223 */ 2255 */
2224 struct cgroup *cgrp = s->private; 2256 struct cgroup_pids *cp = s->private;
2257 struct cgroup *cgrp = cp->cgrp;
2225 int index = 0, pid = *pos; 2258 int index = 0, pid = *pos;
2226 int *iter; 2259 int *iter;
2227 2260
2228 down_read(&cgrp->pids_mutex); 2261 down_read(&cgrp->pids_mutex);
2229 if (pid) { 2262 if (pid) {
2230 int end = cgrp->pids_length; 2263 int end = cp->length;
2231 2264
2232 while (index < end) { 2265 while (index < end) {
2233 int mid = (index + end) / 2; 2266 int mid = (index + end) / 2;
2234 if (cgrp->tasks_pids[mid] == pid) { 2267 if (cp->tasks_pids[mid] == pid) {
2235 index = mid; 2268 index = mid;
2236 break; 2269 break;
2237 } else if (cgrp->tasks_pids[mid] <= pid) 2270 } else if (cp->tasks_pids[mid] <= pid)
2238 index = mid + 1; 2271 index = mid + 1;
2239 else 2272 else
2240 end = mid; 2273 end = mid;
2241 } 2274 }
2242 } 2275 }
2243 /* If we're off the end of the array, we're done */ 2276 /* If we're off the end of the array, we're done */
2244 if (index >= cgrp->pids_length) 2277 if (index >= cp->length)
2245 return NULL; 2278 return NULL;
2246 /* Update the abstract position to be the actual pid that we found */ 2279 /* Update the abstract position to be the actual pid that we found */
2247 iter = cgrp->tasks_pids + index; 2280 iter = cp->tasks_pids + index;
2248 *pos = *iter; 2281 *pos = *iter;
2249 return iter; 2282 return iter;
2250} 2283}
2251 2284
2252static void cgroup_tasks_stop(struct seq_file *s, void *v) 2285static void cgroup_tasks_stop(struct seq_file *s, void *v)
2253{ 2286{
2254 struct cgroup *cgrp = s->private; 2287 struct cgroup_pids *cp = s->private;
2288 struct cgroup *cgrp = cp->cgrp;
2255 up_read(&cgrp->pids_mutex); 2289 up_read(&cgrp->pids_mutex);
2256} 2290}
2257 2291
2258static void *cgroup_tasks_next(struct seq_file *s, void *v, loff_t *pos) 2292static void *cgroup_tasks_next(struct seq_file *s, void *v, loff_t *pos)
2259{ 2293{
2260 struct cgroup *cgrp = s->private; 2294 struct cgroup_pids *cp = s->private;
2261 int *p = v; 2295 int *p = v;
2262 int *end = cgrp->tasks_pids + cgrp->pids_length; 2296 int *end = cp->tasks_pids + cp->length;
2263 2297
2264 /* 2298 /*
2265 * Advance to the next pid in the array. If this goes off the 2299 * Advance to the next pid in the array. If this goes off the
@@ -2286,26 +2320,33 @@ static struct seq_operations cgroup_tasks_seq_operations = {
2286 .show = cgroup_tasks_show, 2320 .show = cgroup_tasks_show,
2287}; 2321};
2288 2322
2289static void release_cgroup_pid_array(struct cgroup *cgrp) 2323static void release_cgroup_pid_array(struct cgroup_pids *cp)
2290{ 2324{
2325 struct cgroup *cgrp = cp->cgrp;
2326
2291 down_write(&cgrp->pids_mutex); 2327 down_write(&cgrp->pids_mutex);
2292 BUG_ON(!cgrp->pids_use_count); 2328 BUG_ON(!cp->use_count);
2293 if (!--cgrp->pids_use_count) { 2329 if (!--cp->use_count) {
2294 kfree(cgrp->tasks_pids); 2330 list_del(&cp->list);
2295 cgrp->tasks_pids = NULL; 2331 put_pid_ns(cp->ns);
2296 cgrp->pids_length = 0; 2332 kfree(cp->tasks_pids);
2333 kfree(cp);
2297 } 2334 }
2298 up_write(&cgrp->pids_mutex); 2335 up_write(&cgrp->pids_mutex);
2299} 2336}
2300 2337
2301static int cgroup_tasks_release(struct inode *inode, struct file *file) 2338static int cgroup_tasks_release(struct inode *inode, struct file *file)
2302{ 2339{
2303 struct cgroup *cgrp = __d_cgrp(file->f_dentry->d_parent); 2340 struct seq_file *seq;
2341 struct cgroup_pids *cp;
2304 2342
2305 if (!(file->f_mode & FMODE_READ)) 2343 if (!(file->f_mode & FMODE_READ))
2306 return 0; 2344 return 0;
2307 2345
2308 release_cgroup_pid_array(cgrp); 2346 seq = file->private_data;
2347 cp = seq->private;
2348
2349 release_cgroup_pid_array(cp);
2309 return seq_release(inode, file); 2350 return seq_release(inode, file);
2310} 2351}
2311 2352
@@ -2324,6 +2365,8 @@ static struct file_operations cgroup_tasks_operations = {
2324static int cgroup_tasks_open(struct inode *unused, struct file *file) 2365static int cgroup_tasks_open(struct inode *unused, struct file *file)
2325{ 2366{
2326 struct cgroup *cgrp = __d_cgrp(file->f_dentry->d_parent); 2367 struct cgroup *cgrp = __d_cgrp(file->f_dentry->d_parent);
2368 struct pid_namespace *ns = current->nsproxy->pid_ns;
2369 struct cgroup_pids *cp;
2327 pid_t *pidarray; 2370 pid_t *pidarray;
2328 int npids; 2371 int npids;
2329 int retval; 2372 int retval;
@@ -2350,20 +2393,37 @@ static int cgroup_tasks_open(struct inode *unused, struct file *file)
2350 * array if necessary 2393 * array if necessary
2351 */ 2394 */
2352 down_write(&cgrp->pids_mutex); 2395 down_write(&cgrp->pids_mutex);
2353 kfree(cgrp->tasks_pids); 2396
2354 cgrp->tasks_pids = pidarray; 2397 list_for_each_entry(cp, &cgrp->pids_list, list) {
2355 cgrp->pids_length = npids; 2398 if (ns == cp->ns)
2356 cgrp->pids_use_count++; 2399 goto found;
2400 }
2401
2402 cp = kzalloc(sizeof(*cp), GFP_KERNEL);
2403 if (!cp) {
2404 up_write(&cgrp->pids_mutex);
2405 kfree(pidarray);
2406 return -ENOMEM;
2407 }
2408 cp->cgrp = cgrp;
2409 cp->ns = ns;
2410 get_pid_ns(ns);
2411 list_add(&cp->list, &cgrp->pids_list);
2412found:
2413 kfree(cp->tasks_pids);
2414 cp->tasks_pids = pidarray;
2415 cp->length = npids;
2416 cp->use_count++;
2357 up_write(&cgrp->pids_mutex); 2417 up_write(&cgrp->pids_mutex);
2358 2418
2359 file->f_op = &cgroup_tasks_operations; 2419 file->f_op = &cgroup_tasks_operations;
2360 2420
2361 retval = seq_open(file, &cgroup_tasks_seq_operations); 2421 retval = seq_open(file, &cgroup_tasks_seq_operations);
2362 if (retval) { 2422 if (retval) {
2363 release_cgroup_pid_array(cgrp); 2423 release_cgroup_pid_array(cp);
2364 return retval; 2424 return retval;
2365 } 2425 }
2366 ((struct seq_file *)file->private_data)->private = cgrp; 2426 ((struct seq_file *)file->private_data)->private = cp;
2367 return 0; 2427 return 0;
2368} 2428}
2369 2429
@@ -2696,33 +2756,42 @@ again:
2696 mutex_unlock(&cgroup_mutex); 2756 mutex_unlock(&cgroup_mutex);
2697 2757
2698 /* 2758 /*
2759 * In general, subsystem has no css->refcnt after pre_destroy(). But
2760 * in racy cases, subsystem may have to get css->refcnt after
2761 * pre_destroy() and it makes rmdir return with -EBUSY. This sometimes
2762 * make rmdir return -EBUSY too often. To avoid that, we use waitqueue
2763 * for cgroup's rmdir. CGRP_WAIT_ON_RMDIR is for synchronizing rmdir
2764 * and subsystem's reference count handling. Please see css_get/put
2765 * and css_tryget() and cgroup_wakeup_rmdir_waiter() implementation.
2766 */
2767 set_bit(CGRP_WAIT_ON_RMDIR, &cgrp->flags);
2768
2769 /*
2699 * Call pre_destroy handlers of subsys. Notify subsystems 2770 * Call pre_destroy handlers of subsys. Notify subsystems
2700 * that rmdir() request comes. 2771 * that rmdir() request comes.
2701 */ 2772 */
2702 ret = cgroup_call_pre_destroy(cgrp); 2773 ret = cgroup_call_pre_destroy(cgrp);
2703 if (ret) 2774 if (ret) {
2775 clear_bit(CGRP_WAIT_ON_RMDIR, &cgrp->flags);
2704 return ret; 2776 return ret;
2777 }
2705 2778
2706 mutex_lock(&cgroup_mutex); 2779 mutex_lock(&cgroup_mutex);
2707 parent = cgrp->parent; 2780 parent = cgrp->parent;
2708 if (atomic_read(&cgrp->count) || !list_empty(&cgrp->children)) { 2781 if (atomic_read(&cgrp->count) || !list_empty(&cgrp->children)) {
2782 clear_bit(CGRP_WAIT_ON_RMDIR, &cgrp->flags);
2709 mutex_unlock(&cgroup_mutex); 2783 mutex_unlock(&cgroup_mutex);
2710 return -EBUSY; 2784 return -EBUSY;
2711 } 2785 }
2712 /*
2713 * css_put/get is provided for subsys to grab refcnt to css. In typical
2714 * case, subsystem has no reference after pre_destroy(). But, under
2715 * hierarchy management, some *temporal* refcnt can be hold.
2716 * To avoid returning -EBUSY to a user, waitqueue is used. If subsys
2717 * is really busy, it should return -EBUSY at pre_destroy(). wake_up
2718 * is called when css_put() is called and refcnt goes down to 0.
2719 */
2720 set_bit(CGRP_WAIT_ON_RMDIR, &cgrp->flags);
2721 prepare_to_wait(&cgroup_rmdir_waitq, &wait, TASK_INTERRUPTIBLE); 2786 prepare_to_wait(&cgroup_rmdir_waitq, &wait, TASK_INTERRUPTIBLE);
2722
2723 if (!cgroup_clear_css_refs(cgrp)) { 2787 if (!cgroup_clear_css_refs(cgrp)) {
2724 mutex_unlock(&cgroup_mutex); 2788 mutex_unlock(&cgroup_mutex);
2725 schedule(); 2789 /*
2790 * Because someone may call cgroup_wakeup_rmdir_waiter() before
2791 * prepare_to_wait(), we need to check this flag.
2792 */
2793 if (test_bit(CGRP_WAIT_ON_RMDIR, &cgrp->flags))
2794 schedule();
2726 finish_wait(&cgroup_rmdir_waitq, &wait); 2795 finish_wait(&cgroup_rmdir_waitq, &wait);
2727 clear_bit(CGRP_WAIT_ON_RMDIR, &cgrp->flags); 2796 clear_bit(CGRP_WAIT_ON_RMDIR, &cgrp->flags);
2728 if (signal_pending(current)) 2797 if (signal_pending(current))
@@ -3294,7 +3363,7 @@ void __css_put(struct cgroup_subsys_state *css)
3294 set_bit(CGRP_RELEASABLE, &cgrp->flags); 3363 set_bit(CGRP_RELEASABLE, &cgrp->flags);
3295 check_for_release(cgrp); 3364 check_for_release(cgrp);
3296 } 3365 }
3297 cgroup_wakeup_rmdir_waiters(cgrp); 3366 cgroup_wakeup_rmdir_waiter(cgrp);
3298 } 3367 }
3299 rcu_read_unlock(); 3368 rcu_read_unlock();
3300} 3369}
diff --git a/kernel/fork.c b/kernel/fork.c
index bd295922887..021e1138556 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -426,6 +426,7 @@ static struct mm_struct * mm_init(struct mm_struct * mm, struct task_struct *p)
426 init_rwsem(&mm->mmap_sem); 426 init_rwsem(&mm->mmap_sem);
427 INIT_LIST_HEAD(&mm->mmlist); 427 INIT_LIST_HEAD(&mm->mmlist);
428 mm->flags = (current->mm) ? current->mm->flags : default_dump_filter; 428 mm->flags = (current->mm) ? current->mm->flags : default_dump_filter;
429 mm->oom_adj = (current->mm) ? current->mm->oom_adj : 0;
429 mm->core_state = NULL; 430 mm->core_state = NULL;
430 mm->nr_ptes = 0; 431 mm->nr_ptes = 0;
431 set_mm_counter(mm, file_rss, 0); 432 set_mm_counter(mm, file_rss, 0);
@@ -567,18 +568,18 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm)
567 * the value intact in a core dump, and to save the unnecessary 568 * the value intact in a core dump, and to save the unnecessary
568 * trouble otherwise. Userland only wants this done for a sys_exit. 569 * trouble otherwise. Userland only wants this done for a sys_exit.
569 */ 570 */
570 if (tsk->clear_child_tid 571 if (tsk->clear_child_tid) {
571 && !(tsk->flags & PF_SIGNALED) 572 if (!(tsk->flags & PF_SIGNALED) &&
572 && atomic_read(&mm->mm_users) > 1) { 573 atomic_read(&mm->mm_users) > 1) {
573 u32 __user * tidptr = tsk->clear_child_tid; 574 /*
575 * We don't check the error code - if userspace has
576 * not set up a proper pointer then tough luck.
577 */
578 put_user(0, tsk->clear_child_tid);
579 sys_futex(tsk->clear_child_tid, FUTEX_WAKE,
580 1, NULL, NULL, 0);
581 }
574 tsk->clear_child_tid = NULL; 582 tsk->clear_child_tid = NULL;
575
576 /*
577 * We don't check the error code - if userspace has
578 * not set up a proper pointer then tough luck.
579 */
580 put_user(0, tidptr);
581 sys_futex(tidptr, FUTEX_WAKE, 1, NULL, NULL, 0);
582 } 583 }
583} 584}
584 585
@@ -1268,6 +1269,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1268 write_unlock_irq(&tasklist_lock); 1269 write_unlock_irq(&tasklist_lock);
1269 proc_fork_connector(p); 1270 proc_fork_connector(p);
1270 cgroup_post_fork(p); 1271 cgroup_post_fork(p);
1272 perf_counter_fork(p);
1271 return p; 1273 return p;
1272 1274
1273bad_fork_free_pid: 1275bad_fork_free_pid:
@@ -1407,12 +1409,6 @@ long do_fork(unsigned long clone_flags,
1407 if (clone_flags & CLONE_VFORK) { 1409 if (clone_flags & CLONE_VFORK) {
1408 p->vfork_done = &vfork; 1410 p->vfork_done = &vfork;
1409 init_completion(&vfork); 1411 init_completion(&vfork);
1410 } else if (!(clone_flags & CLONE_VM)) {
1411 /*
1412 * vfork will do an exec which will call
1413 * set_task_comm()
1414 */
1415 perf_counter_fork(p);
1416 } 1412 }
1417 1413
1418 audit_finish_fork(p); 1414 audit_finish_fork(p);
diff --git a/kernel/freezer.c b/kernel/freezer.c
index 2f4936cf708..bd1d42b17cb 100644
--- a/kernel/freezer.c
+++ b/kernel/freezer.c
@@ -44,12 +44,19 @@ void refrigerator(void)
44 recalc_sigpending(); /* We sent fake signal, clean it up */ 44 recalc_sigpending(); /* We sent fake signal, clean it up */
45 spin_unlock_irq(&current->sighand->siglock); 45 spin_unlock_irq(&current->sighand->siglock);
46 46
47 /* prevent accounting of that task to load */
48 current->flags |= PF_FREEZING;
49
47 for (;;) { 50 for (;;) {
48 set_current_state(TASK_UNINTERRUPTIBLE); 51 set_current_state(TASK_UNINTERRUPTIBLE);
49 if (!frozen(current)) 52 if (!frozen(current))
50 break; 53 break;
51 schedule(); 54 schedule();
52 } 55 }
56
57 /* Remove the accounting blocker */
58 current->flags &= ~PF_FREEZING;
59
53 pr_debug("%s left refrigerator\n", current->comm); 60 pr_debug("%s left refrigerator\n", current->comm);
54 __set_current_state(save); 61 __set_current_state(save);
55} 62}
diff --git a/kernel/futex.c b/kernel/futex.c
index 0672ff88f15..e18cfbdc719 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1010,15 +1010,19 @@ void requeue_futex(struct futex_q *q, struct futex_hash_bucket *hb1,
1010 * requeue_pi_wake_futex() - Wake a task that acquired the lock during requeue 1010 * requeue_pi_wake_futex() - Wake a task that acquired the lock during requeue
1011 * q: the futex_q 1011 * q: the futex_q
1012 * key: the key of the requeue target futex 1012 * key: the key of the requeue target futex
1013 * hb: the hash_bucket of the requeue target futex
1013 * 1014 *
1014 * During futex_requeue, with requeue_pi=1, it is possible to acquire the 1015 * During futex_requeue, with requeue_pi=1, it is possible to acquire the
1015 * target futex if it is uncontended or via a lock steal. Set the futex_q key 1016 * target futex if it is uncontended or via a lock steal. Set the futex_q key
1016 * to the requeue target futex so the waiter can detect the wakeup on the right 1017 * to the requeue target futex so the waiter can detect the wakeup on the right
1017 * futex, but remove it from the hb and NULL the rt_waiter so it can detect 1018 * futex, but remove it from the hb and NULL the rt_waiter so it can detect
1018 * atomic lock acquisition. Must be called with the q->lock_ptr held. 1019 * atomic lock acquisition. Set the q->lock_ptr to the requeue target hb->lock
1020 * to protect access to the pi_state to fixup the owner later. Must be called
1021 * with both q->lock_ptr and hb->lock held.
1019 */ 1022 */
1020static inline 1023static inline
1021void requeue_pi_wake_futex(struct futex_q *q, union futex_key *key) 1024void requeue_pi_wake_futex(struct futex_q *q, union futex_key *key,
1025 struct futex_hash_bucket *hb)
1022{ 1026{
1023 drop_futex_key_refs(&q->key); 1027 drop_futex_key_refs(&q->key);
1024 get_futex_key_refs(key); 1028 get_futex_key_refs(key);
@@ -1030,6 +1034,11 @@ void requeue_pi_wake_futex(struct futex_q *q, union futex_key *key)
1030 WARN_ON(!q->rt_waiter); 1034 WARN_ON(!q->rt_waiter);
1031 q->rt_waiter = NULL; 1035 q->rt_waiter = NULL;
1032 1036
1037 q->lock_ptr = &hb->lock;
1038#ifdef CONFIG_DEBUG_PI_LIST
1039 q->list.plist.lock = &hb->lock;
1040#endif
1041
1033 wake_up_state(q->task, TASK_NORMAL); 1042 wake_up_state(q->task, TASK_NORMAL);
1034} 1043}
1035 1044
@@ -1088,7 +1097,7 @@ static int futex_proxy_trylock_atomic(u32 __user *pifutex,
1088 ret = futex_lock_pi_atomic(pifutex, hb2, key2, ps, top_waiter->task, 1097 ret = futex_lock_pi_atomic(pifutex, hb2, key2, ps, top_waiter->task,
1089 set_waiters); 1098 set_waiters);
1090 if (ret == 1) 1099 if (ret == 1)
1091 requeue_pi_wake_futex(top_waiter, key2); 1100 requeue_pi_wake_futex(top_waiter, key2, hb2);
1092 1101
1093 return ret; 1102 return ret;
1094} 1103}
@@ -1247,8 +1256,15 @@ retry_private:
1247 if (!match_futex(&this->key, &key1)) 1256 if (!match_futex(&this->key, &key1))
1248 continue; 1257 continue;
1249 1258
1250 WARN_ON(!requeue_pi && this->rt_waiter); 1259 /*
1251 WARN_ON(requeue_pi && !this->rt_waiter); 1260 * FUTEX_WAIT_REQEUE_PI and FUTEX_CMP_REQUEUE_PI should always
1261 * be paired with each other and no other futex ops.
1262 */
1263 if ((requeue_pi && !this->rt_waiter) ||
1264 (!requeue_pi && this->rt_waiter)) {
1265 ret = -EINVAL;
1266 break;
1267 }
1252 1268
1253 /* 1269 /*
1254 * Wake nr_wake waiters. For requeue_pi, if we acquired the 1270 * Wake nr_wake waiters. For requeue_pi, if we acquired the
@@ -1273,7 +1289,7 @@ retry_private:
1273 this->task, 1); 1289 this->task, 1);
1274 if (ret == 1) { 1290 if (ret == 1) {
1275 /* We got the lock. */ 1291 /* We got the lock. */
1276 requeue_pi_wake_futex(this, &key2); 1292 requeue_pi_wake_futex(this, &key2, hb2);
1277 continue; 1293 continue;
1278 } else if (ret) { 1294 } else if (ret) {
1279 /* -EDEADLK */ 1295 /* -EDEADLK */
diff --git a/kernel/futex_compat.c b/kernel/futex_compat.c
index d607a5b9ee2..235716556bf 100644
--- a/kernel/futex_compat.c
+++ b/kernel/futex_compat.c
@@ -180,7 +180,8 @@ asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val,
180 int cmd = op & FUTEX_CMD_MASK; 180 int cmd = op & FUTEX_CMD_MASK;
181 181
182 if (utime && (cmd == FUTEX_WAIT || cmd == FUTEX_LOCK_PI || 182 if (utime && (cmd == FUTEX_WAIT || cmd == FUTEX_LOCK_PI ||
183 cmd == FUTEX_WAIT_BITSET)) { 183 cmd == FUTEX_WAIT_BITSET ||
184 cmd == FUTEX_WAIT_REQUEUE_PI)) {
184 if (get_compat_timespec(&ts, utime)) 185 if (get_compat_timespec(&ts, utime))
185 return -EFAULT; 186 return -EFAULT;
186 if (!timespec_valid(&ts)) 187 if (!timespec_valid(&ts))
@@ -191,7 +192,8 @@ asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val,
191 t = ktime_add_safe(ktime_get(), t); 192 t = ktime_add_safe(ktime_get(), t);
192 tp = &t; 193 tp = &t;
193 } 194 }
194 if (cmd == FUTEX_REQUEUE || cmd == FUTEX_CMP_REQUEUE) 195 if (cmd == FUTEX_REQUEUE || cmd == FUTEX_CMP_REQUEUE ||
196 cmd == FUTEX_CMP_REQUEUE_PI || cmd == FUTEX_WAKE_OP)
195 val2 = (int) (unsigned long) utime; 197 val2 = (int) (unsigned long) utime;
196 198
197 return do_futex(uaddr, op, val, tp, uaddr2, val2, val3); 199 return do_futex(uaddr, op, val, tp, uaddr2, val2, val3);
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h
index 73468253143..e70ed5592eb 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -42,8 +42,7 @@ static inline void unregister_handler_proc(unsigned int irq,
42 42
43extern int irq_select_affinity_usr(unsigned int irq); 43extern int irq_select_affinity_usr(unsigned int irq);
44 44
45extern void 45extern void irq_set_thread_affinity(struct irq_desc *desc);
46irq_set_thread_affinity(struct irq_desc *desc, const struct cpumask *cpumask);
47 46
48/* 47/*
49 * Debugging printout: 48 * Debugging printout:
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 50da6767290..d222515a5a0 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -80,14 +80,22 @@ int irq_can_set_affinity(unsigned int irq)
80 return 1; 80 return 1;
81} 81}
82 82
83void 83/**
84irq_set_thread_affinity(struct irq_desc *desc, const struct cpumask *cpumask) 84 * irq_set_thread_affinity - Notify irq threads to adjust affinity
85 * @desc: irq descriptor which has affitnity changed
86 *
87 * We just set IRQTF_AFFINITY and delegate the affinity setting
88 * to the interrupt thread itself. We can not call
89 * set_cpus_allowed_ptr() here as we hold desc->lock and this
90 * code can be called from hard interrupt context.
91 */
92void irq_set_thread_affinity(struct irq_desc *desc)
85{ 93{
86 struct irqaction *action = desc->action; 94 struct irqaction *action = desc->action;
87 95
88 while (action) { 96 while (action) {
89 if (action->thread) 97 if (action->thread)
90 set_cpus_allowed_ptr(action->thread, cpumask); 98 set_bit(IRQTF_AFFINITY, &action->thread_flags);
91 action = action->next; 99 action = action->next;
92 } 100 }
93} 101}
@@ -112,7 +120,7 @@ int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask)
112 if (desc->status & IRQ_MOVE_PCNTXT) { 120 if (desc->status & IRQ_MOVE_PCNTXT) {
113 if (!desc->chip->set_affinity(irq, cpumask)) { 121 if (!desc->chip->set_affinity(irq, cpumask)) {
114 cpumask_copy(desc->affinity, cpumask); 122 cpumask_copy(desc->affinity, cpumask);
115 irq_set_thread_affinity(desc, cpumask); 123 irq_set_thread_affinity(desc);
116 } 124 }
117 } 125 }
118 else { 126 else {
@@ -122,7 +130,7 @@ int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask)
122#else 130#else
123 if (!desc->chip->set_affinity(irq, cpumask)) { 131 if (!desc->chip->set_affinity(irq, cpumask)) {
124 cpumask_copy(desc->affinity, cpumask); 132 cpumask_copy(desc->affinity, cpumask);
125 irq_set_thread_affinity(desc, cpumask); 133 irq_set_thread_affinity(desc);
126 } 134 }
127#endif 135#endif
128 desc->status |= IRQ_AFFINITY_SET; 136 desc->status |= IRQ_AFFINITY_SET;
@@ -176,7 +184,7 @@ int irq_select_affinity_usr(unsigned int irq)
176 spin_lock_irqsave(&desc->lock, flags); 184 spin_lock_irqsave(&desc->lock, flags);
177 ret = setup_affinity(irq, desc); 185 ret = setup_affinity(irq, desc);
178 if (!ret) 186 if (!ret)
179 irq_set_thread_affinity(desc, desc->affinity); 187 irq_set_thread_affinity(desc);
180 spin_unlock_irqrestore(&desc->lock, flags); 188 spin_unlock_irqrestore(&desc->lock, flags);
181 189
182 return ret; 190 return ret;
@@ -443,6 +451,39 @@ static int irq_wait_for_interrupt(struct irqaction *action)
443 return -1; 451 return -1;
444} 452}
445 453
454#ifdef CONFIG_SMP
455/*
456 * Check whether we need to change the affinity of the interrupt thread.
457 */
458static void
459irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action)
460{
461 cpumask_var_t mask;
462
463 if (!test_and_clear_bit(IRQTF_AFFINITY, &action->thread_flags))
464 return;
465
466 /*
467 * In case we are out of memory we set IRQTF_AFFINITY again and
468 * try again next time
469 */
470 if (!alloc_cpumask_var(&mask, GFP_KERNEL)) {
471 set_bit(IRQTF_AFFINITY, &action->thread_flags);
472 return;
473 }
474
475 spin_lock_irq(&desc->lock);
476 cpumask_copy(mask, desc->affinity);
477 spin_unlock_irq(&desc->lock);
478
479 set_cpus_allowed_ptr(current, mask);
480 free_cpumask_var(mask);
481}
482#else
483static inline void
484irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action) { }
485#endif
486
446/* 487/*
447 * Interrupt handler thread 488 * Interrupt handler thread
448 */ 489 */
@@ -458,6 +499,8 @@ static int irq_thread(void *data)
458 499
459 while (!irq_wait_for_interrupt(action)) { 500 while (!irq_wait_for_interrupt(action)) {
460 501
502 irq_thread_check_affinity(desc, action);
503
461 atomic_inc(&desc->threads_active); 504 atomic_inc(&desc->threads_active);
462 505
463 spin_lock_irq(&desc->lock); 506 spin_lock_irq(&desc->lock);
@@ -718,7 +761,6 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)
718{ 761{
719 struct irq_desc *desc = irq_to_desc(irq); 762 struct irq_desc *desc = irq_to_desc(irq);
720 struct irqaction *action, **action_ptr; 763 struct irqaction *action, **action_ptr;
721 struct task_struct *irqthread;
722 unsigned long flags; 764 unsigned long flags;
723 765
724 WARN(in_interrupt(), "Trying to free IRQ %d from IRQ context!\n", irq); 766 WARN(in_interrupt(), "Trying to free IRQ %d from IRQ context!\n", irq);
@@ -766,9 +808,6 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)
766 desc->chip->disable(irq); 808 desc->chip->disable(irq);
767 } 809 }
768 810
769 irqthread = action->thread;
770 action->thread = NULL;
771
772 spin_unlock_irqrestore(&desc->lock, flags); 811 spin_unlock_irqrestore(&desc->lock, flags);
773 812
774 unregister_handler_proc(irq, action); 813 unregister_handler_proc(irq, action);
@@ -776,12 +815,6 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)
776 /* Make sure it's not being used on another CPU: */ 815 /* Make sure it's not being used on another CPU: */
777 synchronize_irq(irq); 816 synchronize_irq(irq);
778 817
779 if (irqthread) {
780 if (!test_bit(IRQTF_DIED, &action->thread_flags))
781 kthread_stop(irqthread);
782 put_task_struct(irqthread);
783 }
784
785#ifdef CONFIG_DEBUG_SHIRQ 818#ifdef CONFIG_DEBUG_SHIRQ
786 /* 819 /*
787 * It's a shared IRQ -- the driver ought to be prepared for an IRQ 820 * It's a shared IRQ -- the driver ought to be prepared for an IRQ
@@ -797,6 +830,13 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)
797 local_irq_restore(flags); 830 local_irq_restore(flags);
798 } 831 }
799#endif 832#endif
833
834 if (action->thread) {
835 if (!test_bit(IRQTF_DIED, &action->thread_flags))
836 kthread_stop(action->thread);
837 put_task_struct(action->thread);
838 }
839
800 return action; 840 return action;
801} 841}
802 842
diff --git a/kernel/irq/migration.c b/kernel/irq/migration.c
index cfe767ca154..fcb6c96f262 100644
--- a/kernel/irq/migration.c
+++ b/kernel/irq/migration.c
@@ -45,7 +45,7 @@ void move_masked_irq(int irq)
45 < nr_cpu_ids)) 45 < nr_cpu_ids))
46 if (!desc->chip->set_affinity(irq, desc->pending_mask)) { 46 if (!desc->chip->set_affinity(irq, desc->pending_mask)) {
47 cpumask_copy(desc->affinity, desc->pending_mask); 47 cpumask_copy(desc->affinity, desc->pending_mask);
48 irq_set_thread_affinity(desc, desc->pending_mask); 48 irq_set_thread_affinity(desc);
49 } 49 }
50 50
51 cpumask_clear(desc->pending_mask); 51 cpumask_clear(desc->pending_mask);
diff --git a/kernel/irq/numa_migrate.c b/kernel/irq/numa_migrate.c
index 2f69bee57bf..3fd30197da2 100644
--- a/kernel/irq/numa_migrate.c
+++ b/kernel/irq/numa_migrate.c
@@ -107,8 +107,8 @@ out_unlock:
107 107
108struct irq_desc *move_irq_desc(struct irq_desc *desc, int node) 108struct irq_desc *move_irq_desc(struct irq_desc *desc, int node)
109{ 109{
110 /* those all static, do move them */ 110 /* those static or target node is -1, do not move them */
111 if (desc->irq < NR_IRQS_LEGACY) 111 if (desc->irq < NR_IRQS_LEGACY || node == -1)
112 return desc; 112 return desc;
113 113
114 if (desc->node != node) 114 if (desc->node != node)
diff --git a/kernel/kexec.c b/kernel/kexec.c
index ae1c35201cc..f336e2107f9 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1228,7 +1228,7 @@ static int __init parse_crashkernel_mem(char *cmdline,
1228 } while (*cur++ == ','); 1228 } while (*cur++ == ',');
1229 1229
1230 if (*crash_size > 0) { 1230 if (*crash_size > 0) {
1231 while (*cur != ' ' && *cur != '@') 1231 while (*cur && *cur != ' ' && *cur != '@')
1232 cur++; 1232 cur++;
1233 if (*cur == '@') { 1233 if (*cur == '@') {
1234 cur++; 1234 cur++;
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 16b5739c516..0540948e29a 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -694,7 +694,7 @@ int __kprobes register_kprobe(struct kprobe *p)
694 p->addr = addr; 694 p->addr = addr;
695 695
696 preempt_disable(); 696 preempt_disable();
697 if (!__kernel_text_address((unsigned long) p->addr) || 697 if (!kernel_text_address((unsigned long) p->addr) ||
698 in_kprobes_functions((unsigned long) p->addr)) { 698 in_kprobes_functions((unsigned long) p->addr)) {
699 preempt_enable(); 699 preempt_enable();
700 return -EINVAL; 700 return -EINVAL;
diff --git a/kernel/kthread.c b/kernel/kthread.c
index 9b1a7de2697..eb8751aa041 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -180,10 +180,12 @@ EXPORT_SYMBOL(kthread_bind);
180 * @k: thread created by kthread_create(). 180 * @k: thread created by kthread_create().
181 * 181 *
182 * Sets kthread_should_stop() for @k to return true, wakes it, and 182 * Sets kthread_should_stop() for @k to return true, wakes it, and
183 * waits for it to exit. Your threadfn() must not call do_exit() 183 * waits for it to exit. This can also be called after kthread_create()
184 * itself if you use this function! This can also be called after 184 * instead of calling wake_up_process(): the thread will exit without
185 * kthread_create() instead of calling wake_up_process(): the thread 185 * calling threadfn().
186 * will exit without calling threadfn(). 186 *
187 * If threadfn() may call do_exit() itself, the caller must ensure
188 * task_struct can't go away.
187 * 189 *
188 * Returns the result of threadfn(), or %-EINTR if wake_up_process() 190 * Returns the result of threadfn(), or %-EINTR if wake_up_process()
189 * was never called. 191 * was never called.
diff --git a/kernel/lockdep_proc.c b/kernel/lockdep_proc.c
index d7135aa2d2c..e94caa666db 100644
--- a/kernel/lockdep_proc.c
+++ b/kernel/lockdep_proc.c
@@ -758,7 +758,8 @@ static int __init lockdep_proc_init(void)
758 &proc_lockdep_stats_operations); 758 &proc_lockdep_stats_operations);
759 759
760#ifdef CONFIG_LOCK_STAT 760#ifdef CONFIG_LOCK_STAT
761 proc_create("lock_stat", S_IRUSR, NULL, &proc_lock_stat_operations); 761 proc_create("lock_stat", S_IRUSR | S_IWUSR, NULL,
762 &proc_lock_stat_operations);
762#endif 763#endif
763 764
764 return 0; 765 return 0;
diff --git a/kernel/module.c b/kernel/module.c
index 0a049837008..fd141140355 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1068,7 +1068,8 @@ static inline int check_modstruct_version(Elf_Shdr *sechdrs,
1068{ 1068{
1069 const unsigned long *crc; 1069 const unsigned long *crc;
1070 1070
1071 if (!find_symbol("module_layout", NULL, &crc, true, false)) 1071 if (!find_symbol(MODULE_SYMBOL_PREFIX "module_layout", NULL,
1072 &crc, true, false))
1072 BUG(); 1073 BUG();
1073 return check_version(sechdrs, versindex, "module_layout", mod, crc); 1074 return check_version(sechdrs, versindex, "module_layout", mod, crc);
1074} 1075}
diff --git a/kernel/panic.c b/kernel/panic.c
index 984b3ecbd72..512ab73b0ca 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -301,6 +301,7 @@ int oops_may_print(void)
301 */ 301 */
302void oops_enter(void) 302void oops_enter(void)
303{ 303{
304 tracing_off();
304 /* can't trust the integrity of the kernel anymore: */ 305 /* can't trust the integrity of the kernel anymore: */
305 debug_locks_off(); 306 debug_locks_off();
306 do_oops_enter_exit(); 307 do_oops_enter_exit();
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index a641eb753b8..534e20d14d6 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -42,6 +42,7 @@ static int perf_overcommit __read_mostly = 1;
42static atomic_t nr_counters __read_mostly; 42static atomic_t nr_counters __read_mostly;
43static atomic_t nr_mmap_counters __read_mostly; 43static atomic_t nr_mmap_counters __read_mostly;
44static atomic_t nr_comm_counters __read_mostly; 44static atomic_t nr_comm_counters __read_mostly;
45static atomic_t nr_task_counters __read_mostly;
45 46
46/* 47/*
47 * perf counter paranoia level: 48 * perf counter paranoia level:
@@ -87,6 +88,7 @@ void __weak hw_perf_disable(void) { barrier(); }
87void __weak hw_perf_enable(void) { barrier(); } 88void __weak hw_perf_enable(void) { barrier(); }
88 89
89void __weak hw_perf_counter_setup(int cpu) { barrier(); } 90void __weak hw_perf_counter_setup(int cpu) { barrier(); }
91void __weak hw_perf_counter_setup_online(int cpu) { barrier(); }
90 92
91int __weak 93int __weak
92hw_perf_group_sched_in(struct perf_counter *group_leader, 94hw_perf_group_sched_in(struct perf_counter *group_leader,
@@ -146,6 +148,28 @@ static void put_ctx(struct perf_counter_context *ctx)
146 } 148 }
147} 149}
148 150
151static void unclone_ctx(struct perf_counter_context *ctx)
152{
153 if (ctx->parent_ctx) {
154 put_ctx(ctx->parent_ctx);
155 ctx->parent_ctx = NULL;
156 }
157}
158
159/*
160 * If we inherit counters we want to return the parent counter id
161 * to userspace.
162 */
163static u64 primary_counter_id(struct perf_counter *counter)
164{
165 u64 id = counter->id;
166
167 if (counter->parent)
168 id = counter->parent->id;
169
170 return id;
171}
172
149/* 173/*
150 * Get the perf_counter_context for a task and lock it. 174 * Get the perf_counter_context for a task and lock it.
151 * This has to cope with with the fact that until it is locked, 175 * This has to cope with with the fact that until it is locked,
@@ -283,6 +307,10 @@ counter_sched_out(struct perf_counter *counter,
283 return; 307 return;
284 308
285 counter->state = PERF_COUNTER_STATE_INACTIVE; 309 counter->state = PERF_COUNTER_STATE_INACTIVE;
310 if (counter->pending_disable) {
311 counter->pending_disable = 0;
312 counter->state = PERF_COUNTER_STATE_OFF;
313 }
286 counter->tstamp_stopped = ctx->time; 314 counter->tstamp_stopped = ctx->time;
287 counter->pmu->disable(counter); 315 counter->pmu->disable(counter);
288 counter->oncpu = -1; 316 counter->oncpu = -1;
@@ -1081,7 +1109,7 @@ static void perf_counter_sync_stat(struct perf_counter_context *ctx,
1081 __perf_counter_sync_stat(counter, next_counter); 1109 __perf_counter_sync_stat(counter, next_counter);
1082 1110
1083 counter = list_next_entry(counter, event_entry); 1111 counter = list_next_entry(counter, event_entry);
1084 next_counter = list_next_entry(counter, event_entry); 1112 next_counter = list_next_entry(next_counter, event_entry);
1085 } 1113 }
1086} 1114}
1087 1115
@@ -1288,7 +1316,6 @@ static void perf_counter_cpu_sched_in(struct perf_cpu_context *cpuctx, int cpu)
1288#define MAX_INTERRUPTS (~0ULL) 1316#define MAX_INTERRUPTS (~0ULL)
1289 1317
1290static void perf_log_throttle(struct perf_counter *counter, int enable); 1318static void perf_log_throttle(struct perf_counter *counter, int enable);
1291static void perf_log_period(struct perf_counter *counter, u64 period);
1292 1319
1293static void perf_adjust_period(struct perf_counter *counter, u64 events) 1320static void perf_adjust_period(struct perf_counter *counter, u64 events)
1294{ 1321{
@@ -1307,8 +1334,6 @@ static void perf_adjust_period(struct perf_counter *counter, u64 events)
1307 if (!sample_period) 1334 if (!sample_period)
1308 sample_period = 1; 1335 sample_period = 1;
1309 1336
1310 perf_log_period(counter, sample_period);
1311
1312 hwc->sample_period = sample_period; 1337 hwc->sample_period = sample_period;
1313} 1338}
1314 1339
@@ -1463,10 +1488,8 @@ static void perf_counter_enable_on_exec(struct task_struct *task)
1463 /* 1488 /*
1464 * Unclone this context if we enabled any counter. 1489 * Unclone this context if we enabled any counter.
1465 */ 1490 */
1466 if (enabled && ctx->parent_ctx) { 1491 if (enabled)
1467 put_ctx(ctx->parent_ctx); 1492 unclone_ctx(ctx);
1468 ctx->parent_ctx = NULL;
1469 }
1470 1493
1471 spin_unlock(&ctx->lock); 1494 spin_unlock(&ctx->lock);
1472 1495
@@ -1526,7 +1549,6 @@ __perf_counter_init_context(struct perf_counter_context *ctx,
1526 1549
1527static struct perf_counter_context *find_get_context(pid_t pid, int cpu) 1550static struct perf_counter_context *find_get_context(pid_t pid, int cpu)
1528{ 1551{
1529 struct perf_counter_context *parent_ctx;
1530 struct perf_counter_context *ctx; 1552 struct perf_counter_context *ctx;
1531 struct perf_cpu_context *cpuctx; 1553 struct perf_cpu_context *cpuctx;
1532 struct task_struct *task; 1554 struct task_struct *task;
@@ -1586,11 +1608,7 @@ static struct perf_counter_context *find_get_context(pid_t pid, int cpu)
1586 retry: 1608 retry:
1587 ctx = perf_lock_task_context(task, &flags); 1609 ctx = perf_lock_task_context(task, &flags);
1588 if (ctx) { 1610 if (ctx) {
1589 parent_ctx = ctx->parent_ctx; 1611 unclone_ctx(ctx);
1590 if (parent_ctx) {
1591 put_ctx(parent_ctx);
1592 ctx->parent_ctx = NULL; /* no longer a clone */
1593 }
1594 spin_unlock_irqrestore(&ctx->lock, flags); 1612 spin_unlock_irqrestore(&ctx->lock, flags);
1595 } 1613 }
1596 1614
@@ -1642,6 +1660,8 @@ static void free_counter(struct perf_counter *counter)
1642 atomic_dec(&nr_mmap_counters); 1660 atomic_dec(&nr_mmap_counters);
1643 if (counter->attr.comm) 1661 if (counter->attr.comm)
1644 atomic_dec(&nr_comm_counters); 1662 atomic_dec(&nr_comm_counters);
1663 if (counter->attr.task)
1664 atomic_dec(&nr_task_counters);
1645 } 1665 }
1646 1666
1647 if (counter->destroy) 1667 if (counter->destroy)
@@ -1676,14 +1696,133 @@ static int perf_release(struct inode *inode, struct file *file)
1676 return 0; 1696 return 0;
1677} 1697}
1678 1698
1699static int perf_counter_read_size(struct perf_counter *counter)
1700{
1701 int entry = sizeof(u64); /* value */
1702 int size = 0;
1703 int nr = 1;
1704
1705 if (counter->attr.read_format & PERF_FORMAT_TOTAL_TIME_ENABLED)
1706 size += sizeof(u64);
1707
1708 if (counter->attr.read_format & PERF_FORMAT_TOTAL_TIME_RUNNING)
1709 size += sizeof(u64);
1710
1711 if (counter->attr.read_format & PERF_FORMAT_ID)
1712 entry += sizeof(u64);
1713
1714 if (counter->attr.read_format & PERF_FORMAT_GROUP) {
1715 nr += counter->group_leader->nr_siblings;
1716 size += sizeof(u64);
1717 }
1718
1719 size += entry * nr;
1720
1721 return size;
1722}
1723
1724static u64 perf_counter_read_value(struct perf_counter *counter)
1725{
1726 struct perf_counter *child;
1727 u64 total = 0;
1728
1729 total += perf_counter_read(counter);
1730 list_for_each_entry(child, &counter->child_list, child_list)
1731 total += perf_counter_read(child);
1732
1733 return total;
1734}
1735
1736static int perf_counter_read_entry(struct perf_counter *counter,
1737 u64 read_format, char __user *buf)
1738{
1739 int n = 0, count = 0;
1740 u64 values[2];
1741
1742 values[n++] = perf_counter_read_value(counter);
1743 if (read_format & PERF_FORMAT_ID)
1744 values[n++] = primary_counter_id(counter);
1745
1746 count = n * sizeof(u64);
1747
1748 if (copy_to_user(buf, values, count))
1749 return -EFAULT;
1750
1751 return count;
1752}
1753
1754static int perf_counter_read_group(struct perf_counter *counter,
1755 u64 read_format, char __user *buf)
1756{
1757 struct perf_counter *leader = counter->group_leader, *sub;
1758 int n = 0, size = 0, err = -EFAULT;
1759 u64 values[3];
1760
1761 values[n++] = 1 + leader->nr_siblings;
1762 if (read_format & PERF_FORMAT_TOTAL_TIME_ENABLED) {
1763 values[n++] = leader->total_time_enabled +
1764 atomic64_read(&leader->child_total_time_enabled);
1765 }
1766 if (read_format & PERF_FORMAT_TOTAL_TIME_RUNNING) {
1767 values[n++] = leader->total_time_running +
1768 atomic64_read(&leader->child_total_time_running);
1769 }
1770
1771 size = n * sizeof(u64);
1772
1773 if (copy_to_user(buf, values, size))
1774 return -EFAULT;
1775
1776 err = perf_counter_read_entry(leader, read_format, buf + size);
1777 if (err < 0)
1778 return err;
1779
1780 size += err;
1781
1782 list_for_each_entry(sub, &leader->sibling_list, list_entry) {
1783 err = perf_counter_read_entry(counter, read_format,
1784 buf + size);
1785 if (err < 0)
1786 return err;
1787
1788 size += err;
1789 }
1790
1791 return size;
1792}
1793
1794static int perf_counter_read_one(struct perf_counter *counter,
1795 u64 read_format, char __user *buf)
1796{
1797 u64 values[4];
1798 int n = 0;
1799
1800 values[n++] = perf_counter_read_value(counter);
1801 if (read_format & PERF_FORMAT_TOTAL_TIME_ENABLED) {
1802 values[n++] = counter->total_time_enabled +
1803 atomic64_read(&counter->child_total_time_enabled);
1804 }
1805 if (read_format & PERF_FORMAT_TOTAL_TIME_RUNNING) {
1806 values[n++] = counter->total_time_running +
1807 atomic64_read(&counter->child_total_time_running);
1808 }
1809 if (read_format & PERF_FORMAT_ID)
1810 values[n++] = primary_counter_id(counter);
1811
1812 if (copy_to_user(buf, values, n * sizeof(u64)))
1813 return -EFAULT;
1814
1815 return n * sizeof(u64);
1816}
1817
1679/* 1818/*
1680 * Read the performance counter - simple non blocking version for now 1819 * Read the performance counter - simple non blocking version for now
1681 */ 1820 */
1682static ssize_t 1821static ssize_t
1683perf_read_hw(struct perf_counter *counter, char __user *buf, size_t count) 1822perf_read_hw(struct perf_counter *counter, char __user *buf, size_t count)
1684{ 1823{
1685 u64 values[4]; 1824 u64 read_format = counter->attr.read_format;
1686 int n; 1825 int ret;
1687 1826
1688 /* 1827 /*
1689 * Return end-of-file for a read on a counter that is in 1828 * Return end-of-file for a read on a counter that is in
@@ -1693,28 +1832,18 @@ perf_read_hw(struct perf_counter *counter, char __user *buf, size_t count)
1693 if (counter->state == PERF_COUNTER_STATE_ERROR) 1832 if (counter->state == PERF_COUNTER_STATE_ERROR)
1694 return 0; 1833 return 0;
1695 1834
1835 if (count < perf_counter_read_size(counter))
1836 return -ENOSPC;
1837
1696 WARN_ON_ONCE(counter->ctx->parent_ctx); 1838 WARN_ON_ONCE(counter->ctx->parent_ctx);
1697 mutex_lock(&counter->child_mutex); 1839 mutex_lock(&counter->child_mutex);
1698 values[0] = perf_counter_read(counter); 1840 if (read_format & PERF_FORMAT_GROUP)
1699 n = 1; 1841 ret = perf_counter_read_group(counter, read_format, buf);
1700 if (counter->attr.read_format & PERF_FORMAT_TOTAL_TIME_ENABLED) 1842 else
1701 values[n++] = counter->total_time_enabled + 1843 ret = perf_counter_read_one(counter, read_format, buf);
1702 atomic64_read(&counter->child_total_time_enabled);
1703 if (counter->attr.read_format & PERF_FORMAT_TOTAL_TIME_RUNNING)
1704 values[n++] = counter->total_time_running +
1705 atomic64_read(&counter->child_total_time_running);
1706 if (counter->attr.read_format & PERF_FORMAT_ID)
1707 values[n++] = counter->id;
1708 mutex_unlock(&counter->child_mutex); 1844 mutex_unlock(&counter->child_mutex);
1709 1845
1710 if (count < n * sizeof(u64)) 1846 return ret;
1711 return -EINVAL;
1712 count = n * sizeof(u64);
1713
1714 if (copy_to_user(buf, values, count))
1715 return -EFAULT;
1716
1717 return count;
1718} 1847}
1719 1848
1720static ssize_t 1849static ssize_t
@@ -1811,8 +1940,6 @@ static int perf_counter_period(struct perf_counter *counter, u64 __user *arg)
1811 1940
1812 counter->attr.sample_freq = value; 1941 counter->attr.sample_freq = value;
1813 } else { 1942 } else {
1814 perf_log_period(counter, value);
1815
1816 counter->attr.sample_period = value; 1943 counter->attr.sample_period = value;
1817 counter->hw.sample_period = value; 1944 counter->hw.sample_period = value;
1818 } 1945 }
@@ -2220,7 +2347,7 @@ static void perf_pending_counter(struct perf_pending_entry *entry)
2220 2347
2221 if (counter->pending_disable) { 2348 if (counter->pending_disable) {
2222 counter->pending_disable = 0; 2349 counter->pending_disable = 0;
2223 perf_counter_disable(counter); 2350 __perf_counter_disable(counter);
2224 } 2351 }
2225 2352
2226 if (counter->pending_wakeup) { 2353 if (counter->pending_wakeup) {
@@ -2605,7 +2732,80 @@ static u32 perf_counter_tid(struct perf_counter *counter, struct task_struct *p)
2605 return task_pid_nr_ns(p, counter->ns); 2732 return task_pid_nr_ns(p, counter->ns);
2606} 2733}
2607 2734
2608static void perf_counter_output(struct perf_counter *counter, int nmi, 2735static void perf_output_read_one(struct perf_output_handle *handle,
2736 struct perf_counter *counter)
2737{
2738 u64 read_format = counter->attr.read_format;
2739 u64 values[4];
2740 int n = 0;
2741
2742 values[n++] = atomic64_read(&counter->count);
2743 if (read_format & PERF_FORMAT_TOTAL_TIME_ENABLED) {
2744 values[n++] = counter->total_time_enabled +
2745 atomic64_read(&counter->child_total_time_enabled);
2746 }
2747 if (read_format & PERF_FORMAT_TOTAL_TIME_RUNNING) {
2748 values[n++] = counter->total_time_running +
2749 atomic64_read(&counter->child_total_time_running);
2750 }
2751 if (read_format & PERF_FORMAT_ID)
2752 values[n++] = primary_counter_id(counter);
2753
2754 perf_output_copy(handle, values, n * sizeof(u64));
2755}
2756
2757/*
2758 * XXX PERF_FORMAT_GROUP vs inherited counters seems difficult.
2759 */
2760static void perf_output_read_group(struct perf_output_handle *handle,
2761 struct perf_counter *counter)
2762{
2763 struct perf_counter *leader = counter->group_leader, *sub;
2764 u64 read_format = counter->attr.read_format;
2765 u64 values[5];
2766 int n = 0;
2767
2768 values[n++] = 1 + leader->nr_siblings;
2769
2770 if (read_format & PERF_FORMAT_TOTAL_TIME_ENABLED)
2771 values[n++] = leader->total_time_enabled;
2772
2773 if (read_format & PERF_FORMAT_TOTAL_TIME_RUNNING)
2774 values[n++] = leader->total_time_running;
2775
2776 if (leader != counter)
2777 leader->pmu->read(leader);
2778
2779 values[n++] = atomic64_read(&leader->count);
2780 if (read_format & PERF_FORMAT_ID)
2781 values[n++] = primary_counter_id(leader);
2782
2783 perf_output_copy(handle, values, n * sizeof(u64));
2784
2785 list_for_each_entry(sub, &leader->sibling_list, list_entry) {
2786 n = 0;
2787
2788 if (sub != counter)
2789 sub->pmu->read(sub);
2790
2791 values[n++] = atomic64_read(&sub->count);
2792 if (read_format & PERF_FORMAT_ID)
2793 values[n++] = primary_counter_id(sub);
2794
2795 perf_output_copy(handle, values, n * sizeof(u64));
2796 }
2797}
2798
2799static void perf_output_read(struct perf_output_handle *handle,
2800 struct perf_counter *counter)
2801{
2802 if (counter->attr.read_format & PERF_FORMAT_GROUP)
2803 perf_output_read_group(handle, counter);
2804 else
2805 perf_output_read_one(handle, counter);
2806}
2807
2808void perf_counter_output(struct perf_counter *counter, int nmi,
2609 struct perf_sample_data *data) 2809 struct perf_sample_data *data)
2610{ 2810{
2611 int ret; 2811 int ret;
@@ -2616,10 +2816,6 @@ static void perf_counter_output(struct perf_counter *counter, int nmi,
2616 struct { 2816 struct {
2617 u32 pid, tid; 2817 u32 pid, tid;
2618 } tid_entry; 2818 } tid_entry;
2619 struct {
2620 u64 id;
2621 u64 counter;
2622 } group_entry;
2623 struct perf_callchain_entry *callchain = NULL; 2819 struct perf_callchain_entry *callchain = NULL;
2624 int callchain_size = 0; 2820 int callchain_size = 0;
2625 u64 time; 2821 u64 time;
@@ -2661,19 +2857,21 @@ static void perf_counter_output(struct perf_counter *counter, int nmi,
2661 if (sample_type & PERF_SAMPLE_ID) 2857 if (sample_type & PERF_SAMPLE_ID)
2662 header.size += sizeof(u64); 2858 header.size += sizeof(u64);
2663 2859
2860 if (sample_type & PERF_SAMPLE_STREAM_ID)
2861 header.size += sizeof(u64);
2862
2664 if (sample_type & PERF_SAMPLE_CPU) { 2863 if (sample_type & PERF_SAMPLE_CPU) {
2665 header.size += sizeof(cpu_entry); 2864 header.size += sizeof(cpu_entry);
2666 2865
2667 cpu_entry.cpu = raw_smp_processor_id(); 2866 cpu_entry.cpu = raw_smp_processor_id();
2867 cpu_entry.reserved = 0;
2668 } 2868 }
2669 2869
2670 if (sample_type & PERF_SAMPLE_PERIOD) 2870 if (sample_type & PERF_SAMPLE_PERIOD)
2671 header.size += sizeof(u64); 2871 header.size += sizeof(u64);
2672 2872
2673 if (sample_type & PERF_SAMPLE_GROUP) { 2873 if (sample_type & PERF_SAMPLE_READ)
2674 header.size += sizeof(u64) + 2874 header.size += perf_counter_read_size(counter);
2675 counter->nr_siblings * sizeof(group_entry);
2676 }
2677 2875
2678 if (sample_type & PERF_SAMPLE_CALLCHAIN) { 2876 if (sample_type & PERF_SAMPLE_CALLCHAIN) {
2679 callchain = perf_callchain(data->regs); 2877 callchain = perf_callchain(data->regs);
@@ -2685,6 +2883,18 @@ static void perf_counter_output(struct perf_counter *counter, int nmi,
2685 header.size += sizeof(u64); 2883 header.size += sizeof(u64);
2686 } 2884 }
2687 2885
2886 if (sample_type & PERF_SAMPLE_RAW) {
2887 int size = sizeof(u32);
2888
2889 if (data->raw)
2890 size += data->raw->size;
2891 else
2892 size += sizeof(u32);
2893
2894 WARN_ON_ONCE(size & (sizeof(u64)-1));
2895 header.size += size;
2896 }
2897
2688 ret = perf_output_begin(&handle, counter, header.size, nmi, 1); 2898 ret = perf_output_begin(&handle, counter, header.size, nmi, 1);
2689 if (ret) 2899 if (ret)
2690 return; 2900 return;
@@ -2703,7 +2913,13 @@ static void perf_counter_output(struct perf_counter *counter, int nmi,
2703 if (sample_type & PERF_SAMPLE_ADDR) 2913 if (sample_type & PERF_SAMPLE_ADDR)
2704 perf_output_put(&handle, data->addr); 2914 perf_output_put(&handle, data->addr);
2705 2915
2706 if (sample_type & PERF_SAMPLE_ID) 2916 if (sample_type & PERF_SAMPLE_ID) {
2917 u64 id = primary_counter_id(counter);
2918
2919 perf_output_put(&handle, id);
2920 }
2921
2922 if (sample_type & PERF_SAMPLE_STREAM_ID)
2707 perf_output_put(&handle, counter->id); 2923 perf_output_put(&handle, counter->id);
2708 2924
2709 if (sample_type & PERF_SAMPLE_CPU) 2925 if (sample_type & PERF_SAMPLE_CPU)
@@ -2712,26 +2928,8 @@ static void perf_counter_output(struct perf_counter *counter, int nmi,
2712 if (sample_type & PERF_SAMPLE_PERIOD) 2928 if (sample_type & PERF_SAMPLE_PERIOD)
2713 perf_output_put(&handle, data->period); 2929 perf_output_put(&handle, data->period);
2714 2930
2715 /* 2931 if (sample_type & PERF_SAMPLE_READ)
2716 * XXX PERF_SAMPLE_GROUP vs inherited counters seems difficult. 2932 perf_output_read(&handle, counter);
2717 */
2718 if (sample_type & PERF_SAMPLE_GROUP) {
2719 struct perf_counter *leader, *sub;
2720 u64 nr = counter->nr_siblings;
2721
2722 perf_output_put(&handle, nr);
2723
2724 leader = counter->group_leader;
2725 list_for_each_entry(sub, &leader->sibling_list, list_entry) {
2726 if (sub != counter)
2727 sub->pmu->read(sub);
2728
2729 group_entry.id = sub->id;
2730 group_entry.counter = atomic64_read(&sub->count);
2731
2732 perf_output_put(&handle, group_entry);
2733 }
2734 }
2735 2933
2736 if (sample_type & PERF_SAMPLE_CALLCHAIN) { 2934 if (sample_type & PERF_SAMPLE_CALLCHAIN) {
2737 if (callchain) 2935 if (callchain)
@@ -2742,6 +2940,22 @@ static void perf_counter_output(struct perf_counter *counter, int nmi,
2742 } 2940 }
2743 } 2941 }
2744 2942
2943 if (sample_type & PERF_SAMPLE_RAW) {
2944 if (data->raw) {
2945 perf_output_put(&handle, data->raw->size);
2946 perf_output_copy(&handle, data->raw->data, data->raw->size);
2947 } else {
2948 struct {
2949 u32 size;
2950 u32 data;
2951 } raw = {
2952 .size = sizeof(u32),
2953 .data = 0,
2954 };
2955 perf_output_put(&handle, raw);
2956 }
2957 }
2958
2745 perf_output_end(&handle); 2959 perf_output_end(&handle);
2746} 2960}
2747 2961
@@ -2754,8 +2968,6 @@ struct perf_read_event {
2754 2968
2755 u32 pid; 2969 u32 pid;
2756 u32 tid; 2970 u32 tid;
2757 u64 value;
2758 u64 format[3];
2759}; 2971};
2760 2972
2761static void 2973static void
@@ -2767,87 +2979,74 @@ perf_counter_read_event(struct perf_counter *counter,
2767 .header = { 2979 .header = {
2768 .type = PERF_EVENT_READ, 2980 .type = PERF_EVENT_READ,
2769 .misc = 0, 2981 .misc = 0,
2770 .size = sizeof(event) - sizeof(event.format), 2982 .size = sizeof(event) + perf_counter_read_size(counter),
2771 }, 2983 },
2772 .pid = perf_counter_pid(counter, task), 2984 .pid = perf_counter_pid(counter, task),
2773 .tid = perf_counter_tid(counter, task), 2985 .tid = perf_counter_tid(counter, task),
2774 .value = atomic64_read(&counter->count),
2775 }; 2986 };
2776 int ret, i = 0; 2987 int ret;
2777
2778 if (counter->attr.read_format & PERF_FORMAT_TOTAL_TIME_ENABLED) {
2779 event.header.size += sizeof(u64);
2780 event.format[i++] = counter->total_time_enabled;
2781 }
2782
2783 if (counter->attr.read_format & PERF_FORMAT_TOTAL_TIME_RUNNING) {
2784 event.header.size += sizeof(u64);
2785 event.format[i++] = counter->total_time_running;
2786 }
2787
2788 if (counter->attr.read_format & PERF_FORMAT_ID) {
2789 u64 id;
2790
2791 event.header.size += sizeof(u64);
2792 if (counter->parent)
2793 id = counter->parent->id;
2794 else
2795 id = counter->id;
2796
2797 event.format[i++] = id;
2798 }
2799 2988
2800 ret = perf_output_begin(&handle, counter, event.header.size, 0, 0); 2989 ret = perf_output_begin(&handle, counter, event.header.size, 0, 0);
2801 if (ret) 2990 if (ret)
2802 return; 2991 return;
2803 2992
2804 perf_output_copy(&handle, &event, event.header.size); 2993 perf_output_put(&handle, event);
2994 perf_output_read(&handle, counter);
2995
2805 perf_output_end(&handle); 2996 perf_output_end(&handle);
2806} 2997}
2807 2998
2808/* 2999/*
2809 * fork tracking 3000 * task tracking -- fork/exit
3001 *
3002 * enabled by: attr.comm | attr.mmap | attr.task
2810 */ 3003 */
2811 3004
2812struct perf_fork_event { 3005struct perf_task_event {
2813 struct task_struct *task; 3006 struct task_struct *task;
3007 struct perf_counter_context *task_ctx;
2814 3008
2815 struct { 3009 struct {
2816 struct perf_event_header header; 3010 struct perf_event_header header;
2817 3011
2818 u32 pid; 3012 u32 pid;
2819 u32 ppid; 3013 u32 ppid;
3014 u32 tid;
3015 u32 ptid;
2820 } event; 3016 } event;
2821}; 3017};
2822 3018
2823static void perf_counter_fork_output(struct perf_counter *counter, 3019static void perf_counter_task_output(struct perf_counter *counter,
2824 struct perf_fork_event *fork_event) 3020 struct perf_task_event *task_event)
2825{ 3021{
2826 struct perf_output_handle handle; 3022 struct perf_output_handle handle;
2827 int size = fork_event->event.header.size; 3023 int size = task_event->event.header.size;
2828 struct task_struct *task = fork_event->task; 3024 struct task_struct *task = task_event->task;
2829 int ret = perf_output_begin(&handle, counter, size, 0, 0); 3025 int ret = perf_output_begin(&handle, counter, size, 0, 0);
2830 3026
2831 if (ret) 3027 if (ret)
2832 return; 3028 return;
2833 3029
2834 fork_event->event.pid = perf_counter_pid(counter, task); 3030 task_event->event.pid = perf_counter_pid(counter, task);
2835 fork_event->event.ppid = perf_counter_pid(counter, task->real_parent); 3031 task_event->event.ppid = perf_counter_pid(counter, current);
3032
3033 task_event->event.tid = perf_counter_tid(counter, task);
3034 task_event->event.ptid = perf_counter_tid(counter, current);
2836 3035
2837 perf_output_put(&handle, fork_event->event); 3036 perf_output_put(&handle, task_event->event);
2838 perf_output_end(&handle); 3037 perf_output_end(&handle);
2839} 3038}
2840 3039
2841static int perf_counter_fork_match(struct perf_counter *counter) 3040static int perf_counter_task_match(struct perf_counter *counter)
2842{ 3041{
2843 if (counter->attr.comm || counter->attr.mmap) 3042 if (counter->attr.comm || counter->attr.mmap || counter->attr.task)
2844 return 1; 3043 return 1;
2845 3044
2846 return 0; 3045 return 0;
2847} 3046}
2848 3047
2849static void perf_counter_fork_ctx(struct perf_counter_context *ctx, 3048static void perf_counter_task_ctx(struct perf_counter_context *ctx,
2850 struct perf_fork_event *fork_event) 3049 struct perf_task_event *task_event)
2851{ 3050{
2852 struct perf_counter *counter; 3051 struct perf_counter *counter;
2853 3052
@@ -2856,51 +3055,62 @@ static void perf_counter_fork_ctx(struct perf_counter_context *ctx,
2856 3055
2857 rcu_read_lock(); 3056 rcu_read_lock();
2858 list_for_each_entry_rcu(counter, &ctx->event_list, event_entry) { 3057 list_for_each_entry_rcu(counter, &ctx->event_list, event_entry) {
2859 if (perf_counter_fork_match(counter)) 3058 if (perf_counter_task_match(counter))
2860 perf_counter_fork_output(counter, fork_event); 3059 perf_counter_task_output(counter, task_event);
2861 } 3060 }
2862 rcu_read_unlock(); 3061 rcu_read_unlock();
2863} 3062}
2864 3063
2865static void perf_counter_fork_event(struct perf_fork_event *fork_event) 3064static void perf_counter_task_event(struct perf_task_event *task_event)
2866{ 3065{
2867 struct perf_cpu_context *cpuctx; 3066 struct perf_cpu_context *cpuctx;
2868 struct perf_counter_context *ctx; 3067 struct perf_counter_context *ctx = task_event->task_ctx;
2869 3068
2870 cpuctx = &get_cpu_var(perf_cpu_context); 3069 cpuctx = &get_cpu_var(perf_cpu_context);
2871 perf_counter_fork_ctx(&cpuctx->ctx, fork_event); 3070 perf_counter_task_ctx(&cpuctx->ctx, task_event);
2872 put_cpu_var(perf_cpu_context); 3071 put_cpu_var(perf_cpu_context);
2873 3072
2874 rcu_read_lock(); 3073 rcu_read_lock();
2875 /* 3074 if (!ctx)
2876 * doesn't really matter which of the child contexts the 3075 ctx = rcu_dereference(task_event->task->perf_counter_ctxp);
2877 * events ends up in.
2878 */
2879 ctx = rcu_dereference(current->perf_counter_ctxp);
2880 if (ctx) 3076 if (ctx)
2881 perf_counter_fork_ctx(ctx, fork_event); 3077 perf_counter_task_ctx(ctx, task_event);
2882 rcu_read_unlock(); 3078 rcu_read_unlock();
2883} 3079}
2884 3080
2885void perf_counter_fork(struct task_struct *task) 3081static void perf_counter_task(struct task_struct *task,
3082 struct perf_counter_context *task_ctx,
3083 int new)
2886{ 3084{
2887 struct perf_fork_event fork_event; 3085 struct perf_task_event task_event;
2888 3086
2889 if (!atomic_read(&nr_comm_counters) && 3087 if (!atomic_read(&nr_comm_counters) &&
2890 !atomic_read(&nr_mmap_counters)) 3088 !atomic_read(&nr_mmap_counters) &&
3089 !atomic_read(&nr_task_counters))
2891 return; 3090 return;
2892 3091
2893 fork_event = (struct perf_fork_event){ 3092 task_event = (struct perf_task_event){
2894 .task = task, 3093 .task = task,
2895 .event = { 3094 .task_ctx = task_ctx,
3095 .event = {
2896 .header = { 3096 .header = {
2897 .type = PERF_EVENT_FORK, 3097 .type = new ? PERF_EVENT_FORK : PERF_EVENT_EXIT,
2898 .size = sizeof(fork_event.event), 3098 .misc = 0,
3099 .size = sizeof(task_event.event),
2899 }, 3100 },
3101 /* .pid */
3102 /* .ppid */
3103 /* .tid */
3104 /* .ptid */
2900 }, 3105 },
2901 }; 3106 };
2902 3107
2903 perf_counter_fork_event(&fork_event); 3108 perf_counter_task_event(&task_event);
3109}
3110
3111void perf_counter_fork(struct task_struct *task)
3112{
3113 perf_counter_task(task, NULL, 1);
2904} 3114}
2905 3115
2906/* 3116/*
@@ -2968,8 +3178,10 @@ static void perf_counter_comm_event(struct perf_comm_event *comm_event)
2968 struct perf_cpu_context *cpuctx; 3178 struct perf_cpu_context *cpuctx;
2969 struct perf_counter_context *ctx; 3179 struct perf_counter_context *ctx;
2970 unsigned int size; 3180 unsigned int size;
2971 char *comm = comm_event->task->comm; 3181 char comm[TASK_COMM_LEN];
2972 3182
3183 memset(comm, 0, sizeof(comm));
3184 strncpy(comm, comm_event->task->comm, sizeof(comm));
2973 size = ALIGN(strlen(comm)+1, sizeof(u64)); 3185 size = ALIGN(strlen(comm)+1, sizeof(u64));
2974 3186
2975 comm_event->comm = comm; 3187 comm_event->comm = comm;
@@ -3004,8 +3216,16 @@ void perf_counter_comm(struct task_struct *task)
3004 3216
3005 comm_event = (struct perf_comm_event){ 3217 comm_event = (struct perf_comm_event){
3006 .task = task, 3218 .task = task,
3219 /* .comm */
3220 /* .comm_size */
3007 .event = { 3221 .event = {
3008 .header = { .type = PERF_EVENT_COMM, }, 3222 .header = {
3223 .type = PERF_EVENT_COMM,
3224 .misc = 0,
3225 /* .size */
3226 },
3227 /* .pid */
3228 /* .tid */
3009 }, 3229 },
3010 }; 3230 };
3011 3231
@@ -3088,8 +3308,15 @@ static void perf_counter_mmap_event(struct perf_mmap_event *mmap_event)
3088 char *buf = NULL; 3308 char *buf = NULL;
3089 const char *name; 3309 const char *name;
3090 3310
3311 memset(tmp, 0, sizeof(tmp));
3312
3091 if (file) { 3313 if (file) {
3092 buf = kzalloc(PATH_MAX, GFP_KERNEL); 3314 /*
3315 * d_path works from the end of the buffer backwards, so we
3316 * need to add enough zero bytes after the string to handle
3317 * the 64bit alignment we do later.
3318 */
3319 buf = kzalloc(PATH_MAX + sizeof(u64), GFP_KERNEL);
3093 if (!buf) { 3320 if (!buf) {
3094 name = strncpy(tmp, "//enomem", sizeof(tmp)); 3321 name = strncpy(tmp, "//enomem", sizeof(tmp));
3095 goto got_name; 3322 goto got_name;
@@ -3100,9 +3327,11 @@ static void perf_counter_mmap_event(struct perf_mmap_event *mmap_event)
3100 goto got_name; 3327 goto got_name;
3101 } 3328 }
3102 } else { 3329 } else {
3103 name = arch_vma_name(mmap_event->vma); 3330 if (arch_vma_name(mmap_event->vma)) {
3104 if (name) 3331 name = strncpy(tmp, arch_vma_name(mmap_event->vma),
3332 sizeof(tmp));
3105 goto got_name; 3333 goto got_name;
3334 }
3106 3335
3107 if (!vma->vm_mm) { 3336 if (!vma->vm_mm) {
3108 name = strncpy(tmp, "[vdso]", sizeof(tmp)); 3337 name = strncpy(tmp, "[vdso]", sizeof(tmp));
@@ -3147,8 +3376,16 @@ void __perf_counter_mmap(struct vm_area_struct *vma)
3147 3376
3148 mmap_event = (struct perf_mmap_event){ 3377 mmap_event = (struct perf_mmap_event){
3149 .vma = vma, 3378 .vma = vma,
3379 /* .file_name */
3380 /* .file_size */
3150 .event = { 3381 .event = {
3151 .header = { .type = PERF_EVENT_MMAP, }, 3382 .header = {
3383 .type = PERF_EVENT_MMAP,
3384 .misc = 0,
3385 /* .size */
3386 },
3387 /* .pid */
3388 /* .tid */
3152 .start = vma->vm_start, 3389 .start = vma->vm_start,
3153 .len = vma->vm_end - vma->vm_start, 3390 .len = vma->vm_end - vma->vm_start,
3154 .pgoff = vma->vm_pgoff, 3391 .pgoff = vma->vm_pgoff,
@@ -3159,49 +3396,6 @@ void __perf_counter_mmap(struct vm_area_struct *vma)
3159} 3396}
3160 3397
3161/* 3398/*
3162 * Log sample_period changes so that analyzing tools can re-normalize the
3163 * event flow.
3164 */
3165
3166struct freq_event {
3167 struct perf_event_header header;
3168 u64 time;
3169 u64 id;
3170 u64 period;
3171};
3172
3173static void perf_log_period(struct perf_counter *counter, u64 period)
3174{
3175 struct perf_output_handle handle;
3176 struct freq_event event;
3177 int ret;
3178
3179 if (counter->hw.sample_period == period)
3180 return;
3181
3182 if (counter->attr.sample_type & PERF_SAMPLE_PERIOD)
3183 return;
3184
3185 event = (struct freq_event) {
3186 .header = {
3187 .type = PERF_EVENT_PERIOD,
3188 .misc = 0,
3189 .size = sizeof(event),
3190 },
3191 .time = sched_clock(),
3192 .id = counter->id,
3193 .period = period,
3194 };
3195
3196 ret = perf_output_begin(&handle, counter, sizeof(event), 1, 0);
3197 if (ret)
3198 return;
3199
3200 perf_output_put(&handle, event);
3201 perf_output_end(&handle);
3202}
3203
3204/*
3205 * IRQ throttle logging 3399 * IRQ throttle logging
3206 */ 3400 */
3207 3401
@@ -3214,16 +3408,21 @@ static void perf_log_throttle(struct perf_counter *counter, int enable)
3214 struct perf_event_header header; 3408 struct perf_event_header header;
3215 u64 time; 3409 u64 time;
3216 u64 id; 3410 u64 id;
3411 u64 stream_id;
3217 } throttle_event = { 3412 } throttle_event = {
3218 .header = { 3413 .header = {
3219 .type = PERF_EVENT_THROTTLE + 1, 3414 .type = PERF_EVENT_THROTTLE,
3220 .misc = 0, 3415 .misc = 0,
3221 .size = sizeof(throttle_event), 3416 .size = sizeof(throttle_event),
3222 }, 3417 },
3223 .time = sched_clock(), 3418 .time = sched_clock(),
3224 .id = counter->id, 3419 .id = primary_counter_id(counter),
3420 .stream_id = counter->id,
3225 }; 3421 };
3226 3422
3423 if (enable)
3424 throttle_event.header.type = PERF_EVENT_UNTHROTTLE;
3425
3227 ret = perf_output_begin(&handle, counter, sizeof(throttle_event), 1, 0); 3426 ret = perf_output_begin(&handle, counter, sizeof(throttle_event), 1, 0);
3228 if (ret) 3427 if (ret)
3229 return; 3428 return;
@@ -3300,125 +3499,111 @@ int perf_counter_overflow(struct perf_counter *counter, int nmi,
3300 * Generic software counter infrastructure 3499 * Generic software counter infrastructure
3301 */ 3500 */
3302 3501
3303static void perf_swcounter_update(struct perf_counter *counter) 3502/*
3503 * We directly increment counter->count and keep a second value in
3504 * counter->hw.period_left to count intervals. This period counter
3505 * is kept in the range [-sample_period, 0] so that we can use the
3506 * sign as trigger.
3507 */
3508
3509static u64 perf_swcounter_set_period(struct perf_counter *counter)
3304{ 3510{
3305 struct hw_perf_counter *hwc = &counter->hw; 3511 struct hw_perf_counter *hwc = &counter->hw;
3306 u64 prev, now; 3512 u64 period = hwc->last_period;
3307 s64 delta; 3513 u64 nr, offset;
3514 s64 old, val;
3515
3516 hwc->last_period = hwc->sample_period;
3308 3517
3309again: 3518again:
3310 prev = atomic64_read(&hwc->prev_count); 3519 old = val = atomic64_read(&hwc->period_left);
3311 now = atomic64_read(&hwc->count); 3520 if (val < 0)
3312 if (atomic64_cmpxchg(&hwc->prev_count, prev, now) != prev) 3521 return 0;
3313 goto again;
3314 3522
3315 delta = now - prev; 3523 nr = div64_u64(period + val, period);
3524 offset = nr * period;
3525 val -= offset;
3526 if (atomic64_cmpxchg(&hwc->period_left, old, val) != old)
3527 goto again;
3316 3528
3317 atomic64_add(delta, &counter->count); 3529 return nr;
3318 atomic64_sub(delta, &hwc->period_left);
3319} 3530}
3320 3531
3321static void perf_swcounter_set_period(struct perf_counter *counter) 3532static void perf_swcounter_overflow(struct perf_counter *counter,
3533 int nmi, struct perf_sample_data *data)
3322{ 3534{
3323 struct hw_perf_counter *hwc = &counter->hw; 3535 struct hw_perf_counter *hwc = &counter->hw;
3324 s64 left = atomic64_read(&hwc->period_left); 3536 u64 overflow;
3325 s64 period = hwc->sample_period;
3326 3537
3327 if (unlikely(left <= -period)) { 3538 data->period = counter->hw.last_period;
3328 left = period; 3539 overflow = perf_swcounter_set_period(counter);
3329 atomic64_set(&hwc->period_left, left);
3330 hwc->last_period = period;
3331 }
3332 3540
3333 if (unlikely(left <= 0)) { 3541 if (hwc->interrupts == MAX_INTERRUPTS)
3334 left += period; 3542 return;
3335 atomic64_add(period, &hwc->period_left);
3336 hwc->last_period = period;
3337 }
3338 3543
3339 atomic64_set(&hwc->prev_count, -left); 3544 for (; overflow; overflow--) {
3340 atomic64_set(&hwc->count, -left); 3545 if (perf_counter_overflow(counter, nmi, data)) {
3546 /*
3547 * We inhibit the overflow from happening when
3548 * hwc->interrupts == MAX_INTERRUPTS.
3549 */
3550 break;
3551 }
3552 }
3341} 3553}
3342 3554
3343static enum hrtimer_restart perf_swcounter_hrtimer(struct hrtimer *hrtimer) 3555static void perf_swcounter_unthrottle(struct perf_counter *counter)
3344{ 3556{
3345 enum hrtimer_restart ret = HRTIMER_RESTART;
3346 struct perf_sample_data data;
3347 struct perf_counter *counter;
3348 u64 period;
3349
3350 counter = container_of(hrtimer, struct perf_counter, hw.hrtimer);
3351 counter->pmu->read(counter);
3352
3353 data.addr = 0;
3354 data.regs = get_irq_regs();
3355 /* 3557 /*
3356 * In case we exclude kernel IPs or are somehow not in interrupt 3558 * Nothing to do, we already reset hwc->interrupts.
3357 * context, provide the next best thing, the user IP.
3358 */ 3559 */
3359 if ((counter->attr.exclude_kernel || !data.regs) && 3560}
3360 !counter->attr.exclude_user)
3361 data.regs = task_pt_regs(current);
3362 3561
3363 if (data.regs) { 3562static void perf_swcounter_add(struct perf_counter *counter, u64 nr,
3364 if (perf_counter_overflow(counter, 0, &data)) 3563 int nmi, struct perf_sample_data *data)
3365 ret = HRTIMER_NORESTART; 3564{
3366 } 3565 struct hw_perf_counter *hwc = &counter->hw;
3367 3566
3368 period = max_t(u64, 10000, counter->hw.sample_period); 3567 atomic64_add(nr, &counter->count);
3369 hrtimer_forward_now(hrtimer, ns_to_ktime(period));
3370 3568
3371 return ret; 3569 if (!hwc->sample_period)
3372} 3570 return;
3373 3571
3374static void perf_swcounter_overflow(struct perf_counter *counter, 3572 if (!data->regs)
3375 int nmi, struct perf_sample_data *data) 3573 return;
3376{
3377 data->period = counter->hw.last_period;
3378 3574
3379 perf_swcounter_update(counter); 3575 if (!atomic64_add_negative(nr, &hwc->period_left))
3380 perf_swcounter_set_period(counter); 3576 perf_swcounter_overflow(counter, nmi, data);
3381 if (perf_counter_overflow(counter, nmi, data))
3382 /* soft-disable the counter */
3383 ;
3384} 3577}
3385 3578
3386static int perf_swcounter_is_counting(struct perf_counter *counter) 3579static int perf_swcounter_is_counting(struct perf_counter *counter)
3387{ 3580{
3388 struct perf_counter_context *ctx; 3581 /*
3389 unsigned long flags; 3582 * The counter is active, we're good!
3390 int count; 3583 */
3391
3392 if (counter->state == PERF_COUNTER_STATE_ACTIVE) 3584 if (counter->state == PERF_COUNTER_STATE_ACTIVE)
3393 return 1; 3585 return 1;
3394 3586
3587 /*
3588 * The counter is off/error, not counting.
3589 */
3395 if (counter->state != PERF_COUNTER_STATE_INACTIVE) 3590 if (counter->state != PERF_COUNTER_STATE_INACTIVE)
3396 return 0; 3591 return 0;
3397 3592
3398 /* 3593 /*
3399 * If the counter is inactive, it could be just because 3594 * The counter is inactive, if the context is active
3400 * its task is scheduled out, or because it's in a group 3595 * we're part of a group that didn't make it on the 'pmu',
3401 * which could not go on the PMU. We want to count in 3596 * not counting.
3402 * the first case but not the second. If the context is
3403 * currently active then an inactive software counter must
3404 * be the second case. If it's not currently active then
3405 * we need to know whether the counter was active when the
3406 * context was last active, which we can determine by
3407 * comparing counter->tstamp_stopped with ctx->time.
3408 *
3409 * We are within an RCU read-side critical section,
3410 * which protects the existence of *ctx.
3411 */ 3597 */
3412 ctx = counter->ctx; 3598 if (counter->ctx->is_active)
3413 spin_lock_irqsave(&ctx->lock, flags); 3599 return 0;
3414 count = 1; 3600
3415 /* Re-check state now we have the lock */ 3601 /*
3416 if (counter->state < PERF_COUNTER_STATE_INACTIVE || 3602 * We're inactive and the context is too, this means the
3417 counter->ctx->is_active || 3603 * task is scheduled out, we're counting events that happen
3418 counter->tstamp_stopped < ctx->time) 3604 * to us, like migration events.
3419 count = 0; 3605 */
3420 spin_unlock_irqrestore(&ctx->lock, flags); 3606 return 1;
3421 return count;
3422} 3607}
3423 3608
3424static int perf_swcounter_match(struct perf_counter *counter, 3609static int perf_swcounter_match(struct perf_counter *counter,
@@ -3444,15 +3629,6 @@ static int perf_swcounter_match(struct perf_counter *counter,
3444 return 1; 3629 return 1;
3445} 3630}
3446 3631
3447static void perf_swcounter_add(struct perf_counter *counter, u64 nr,
3448 int nmi, struct perf_sample_data *data)
3449{
3450 int neg = atomic64_add_negative(nr, &counter->hw.count);
3451
3452 if (counter->hw.sample_period && !neg && data->regs)
3453 perf_swcounter_overflow(counter, nmi, data);
3454}
3455
3456static void perf_swcounter_ctx_event(struct perf_counter_context *ctx, 3632static void perf_swcounter_ctx_event(struct perf_counter_context *ctx,
3457 enum perf_type_id type, 3633 enum perf_type_id type,
3458 u32 event, u64 nr, int nmi, 3634 u32 event, u64 nr, int nmi,
@@ -3531,27 +3707,66 @@ void __perf_swcounter_event(u32 event, u64 nr, int nmi,
3531 3707
3532static void perf_swcounter_read(struct perf_counter *counter) 3708static void perf_swcounter_read(struct perf_counter *counter)
3533{ 3709{
3534 perf_swcounter_update(counter);
3535} 3710}
3536 3711
3537static int perf_swcounter_enable(struct perf_counter *counter) 3712static int perf_swcounter_enable(struct perf_counter *counter)
3538{ 3713{
3539 perf_swcounter_set_period(counter); 3714 struct hw_perf_counter *hwc = &counter->hw;
3715
3716 if (hwc->sample_period) {
3717 hwc->last_period = hwc->sample_period;
3718 perf_swcounter_set_period(counter);
3719 }
3540 return 0; 3720 return 0;
3541} 3721}
3542 3722
3543static void perf_swcounter_disable(struct perf_counter *counter) 3723static void perf_swcounter_disable(struct perf_counter *counter)
3544{ 3724{
3545 perf_swcounter_update(counter);
3546} 3725}
3547 3726
3548static const struct pmu perf_ops_generic = { 3727static const struct pmu perf_ops_generic = {
3549 .enable = perf_swcounter_enable, 3728 .enable = perf_swcounter_enable,
3550 .disable = perf_swcounter_disable, 3729 .disable = perf_swcounter_disable,
3551 .read = perf_swcounter_read, 3730 .read = perf_swcounter_read,
3731 .unthrottle = perf_swcounter_unthrottle,
3552}; 3732};
3553 3733
3554/* 3734/*
3735 * hrtimer based swcounter callback
3736 */
3737
3738static enum hrtimer_restart perf_swcounter_hrtimer(struct hrtimer *hrtimer)
3739{
3740 enum hrtimer_restart ret = HRTIMER_RESTART;
3741 struct perf_sample_data data;
3742 struct perf_counter *counter;
3743 u64 period;
3744
3745 counter = container_of(hrtimer, struct perf_counter, hw.hrtimer);
3746 counter->pmu->read(counter);
3747
3748 data.addr = 0;
3749 data.regs = get_irq_regs();
3750 /*
3751 * In case we exclude kernel IPs or are somehow not in interrupt
3752 * context, provide the next best thing, the user IP.
3753 */
3754 if ((counter->attr.exclude_kernel || !data.regs) &&
3755 !counter->attr.exclude_user)
3756 data.regs = task_pt_regs(current);
3757
3758 if (data.regs) {
3759 if (perf_counter_overflow(counter, 0, &data))
3760 ret = HRTIMER_NORESTART;
3761 }
3762
3763 period = max_t(u64, 10000, counter->hw.sample_period);
3764 hrtimer_forward_now(hrtimer, ns_to_ktime(period));
3765
3766 return ret;
3767}
3768
3769/*
3555 * Software counter: cpu wall time clock 3770 * Software counter: cpu wall time clock
3556 */ 3771 */
3557 3772
@@ -3668,17 +3883,24 @@ static const struct pmu perf_ops_task_clock = {
3668}; 3883};
3669 3884
3670#ifdef CONFIG_EVENT_PROFILE 3885#ifdef CONFIG_EVENT_PROFILE
3671void perf_tpcounter_event(int event_id) 3886void perf_tpcounter_event(int event_id, u64 addr, u64 count, void *record,
3887 int entry_size)
3672{ 3888{
3889 struct perf_raw_record raw = {
3890 .size = entry_size,
3891 .data = record,
3892 };
3893
3673 struct perf_sample_data data = { 3894 struct perf_sample_data data = {
3674 .regs = get_irq_regs(); 3895 .regs = get_irq_regs(),
3675 .addr = 0, 3896 .addr = addr,
3897 .raw = &raw,
3676 }; 3898 };
3677 3899
3678 if (!data.regs) 3900 if (!data.regs)
3679 data.regs = task_pt_regs(current); 3901 data.regs = task_pt_regs(current);
3680 3902
3681 do_perf_swcounter_event(PERF_TYPE_TRACEPOINT, event_id, 1, 1, &data); 3903 do_perf_swcounter_event(PERF_TYPE_TRACEPOINT, event_id, count, 1, &data);
3682} 3904}
3683EXPORT_SYMBOL_GPL(perf_tpcounter_event); 3905EXPORT_SYMBOL_GPL(perf_tpcounter_event);
3684 3906
@@ -3687,16 +3909,20 @@ extern void ftrace_profile_disable(int);
3687 3909
3688static void tp_perf_counter_destroy(struct perf_counter *counter) 3910static void tp_perf_counter_destroy(struct perf_counter *counter)
3689{ 3911{
3690 ftrace_profile_disable(perf_event_id(&counter->attr)); 3912 ftrace_profile_disable(counter->attr.config);
3691} 3913}
3692 3914
3693static const struct pmu *tp_perf_counter_init(struct perf_counter *counter) 3915static const struct pmu *tp_perf_counter_init(struct perf_counter *counter)
3694{ 3916{
3695 int event_id = perf_event_id(&counter->attr); 3917 /*
3696 int ret; 3918 * Raw tracepoint data is a severe data leak, only allow root to
3919 * have these.
3920 */
3921 if ((counter->attr.sample_type & PERF_SAMPLE_RAW) &&
3922 !capable(CAP_SYS_ADMIN))
3923 return ERR_PTR(-EPERM);
3697 3924
3698 ret = ftrace_profile_enable(event_id); 3925 if (ftrace_profile_enable(counter->attr.config))
3699 if (ret)
3700 return NULL; 3926 return NULL;
3701 3927
3702 counter->destroy = tp_perf_counter_destroy; 3928 counter->destroy = tp_perf_counter_destroy;
@@ -3829,9 +4055,9 @@ perf_counter_alloc(struct perf_counter_attr *attr,
3829 atomic64_set(&hwc->period_left, hwc->sample_period); 4055 atomic64_set(&hwc->period_left, hwc->sample_period);
3830 4056
3831 /* 4057 /*
3832 * we currently do not support PERF_SAMPLE_GROUP on inherited counters 4058 * we currently do not support PERF_FORMAT_GROUP on inherited counters
3833 */ 4059 */
3834 if (attr->inherit && (attr->sample_type & PERF_SAMPLE_GROUP)) 4060 if (attr->inherit && (attr->read_format & PERF_FORMAT_GROUP))
3835 goto done; 4061 goto done;
3836 4062
3837 switch (attr->type) { 4063 switch (attr->type) {
@@ -3874,6 +4100,8 @@ done:
3874 atomic_inc(&nr_mmap_counters); 4100 atomic_inc(&nr_mmap_counters);
3875 if (counter->attr.comm) 4101 if (counter->attr.comm)
3876 atomic_inc(&nr_comm_counters); 4102 atomic_inc(&nr_comm_counters);
4103 if (counter->attr.task)
4104 atomic_inc(&nr_task_counters);
3877 } 4105 }
3878 4106
3879 return counter; 4107 return counter;
@@ -4235,8 +4463,10 @@ void perf_counter_exit_task(struct task_struct *child)
4235 struct perf_counter_context *child_ctx; 4463 struct perf_counter_context *child_ctx;
4236 unsigned long flags; 4464 unsigned long flags;
4237 4465
4238 if (likely(!child->perf_counter_ctxp)) 4466 if (likely(!child->perf_counter_ctxp)) {
4467 perf_counter_task(child, NULL, 0);
4239 return; 4468 return;
4469 }
4240 4470
4241 local_irq_save(flags); 4471 local_irq_save(flags);
4242 /* 4472 /*
@@ -4255,17 +4485,20 @@ void perf_counter_exit_task(struct task_struct *child)
4255 */ 4485 */
4256 spin_lock(&child_ctx->lock); 4486 spin_lock(&child_ctx->lock);
4257 child->perf_counter_ctxp = NULL; 4487 child->perf_counter_ctxp = NULL;
4258 if (child_ctx->parent_ctx) { 4488 /*
4259 /* 4489 * If this context is a clone; unclone it so it can't get
4260 * This context is a clone; unclone it so it can't get 4490 * swapped to another process while we're removing all
4261 * swapped to another process while we're removing all 4491 * the counters from it.
4262 * the counters from it. 4492 */
4263 */ 4493 unclone_ctx(child_ctx);
4264 put_ctx(child_ctx->parent_ctx); 4494 spin_unlock_irqrestore(&child_ctx->lock, flags);
4265 child_ctx->parent_ctx = NULL; 4495
4266 } 4496 /*
4267 spin_unlock(&child_ctx->lock); 4497 * Report the task dead after unscheduling the counters so that we
4268 local_irq_restore(flags); 4498 * won't get any samples after PERF_EVENT_EXIT. We can however still
4499 * get a few PERF_EVENT_READ events.
4500 */
4501 perf_counter_task(child, child_ctx, 0);
4269 4502
4270 /* 4503 /*
4271 * We can recurse on the same lock type through: 4504 * We can recurse on the same lock type through:
@@ -4486,6 +4719,11 @@ perf_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu)
4486 perf_counter_init_cpu(cpu); 4719 perf_counter_init_cpu(cpu);
4487 break; 4720 break;
4488 4721
4722 case CPU_ONLINE:
4723 case CPU_ONLINE_FROZEN:
4724 hw_perf_counter_setup_online(cpu);
4725 break;
4726
4489 case CPU_DOWN_PREPARE: 4727 case CPU_DOWN_PREPARE:
4490 case CPU_DOWN_PREPARE_FROZEN: 4728 case CPU_DOWN_PREPARE_FROZEN:
4491 perf_counter_exit_cpu(cpu); 4729 perf_counter_exit_cpu(cpu);
@@ -4510,6 +4748,8 @@ void __init perf_counter_init(void)
4510{ 4748{
4511 perf_cpu_notify(&perf_cpu_nb, (unsigned long)CPU_UP_PREPARE, 4749 perf_cpu_notify(&perf_cpu_nb, (unsigned long)CPU_UP_PREPARE,
4512 (void *)(long)smp_processor_id()); 4750 (void *)(long)smp_processor_id());
4751 perf_cpu_notify(&perf_cpu_nb, (unsigned long)CPU_ONLINE,
4752 (void *)(long)smp_processor_id());
4513 register_cpu_notifier(&perf_cpu_nb); 4753 register_cpu_notifier(&perf_cpu_nb);
4514} 4754}
4515 4755
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
index bece7c0b67b..e33a21cb940 100644
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@ -521,11 +521,12 @@ void posix_cpu_timers_exit(struct task_struct *tsk)
521} 521}
522void posix_cpu_timers_exit_group(struct task_struct *tsk) 522void posix_cpu_timers_exit_group(struct task_struct *tsk)
523{ 523{
524 struct task_cputime cputime; 524 struct signal_struct *const sig = tsk->signal;
525 525
526 thread_group_cputimer(tsk, &cputime);
527 cleanup_timers(tsk->signal->cpu_timers, 526 cleanup_timers(tsk->signal->cpu_timers,
528 cputime.utime, cputime.stime, cputime.sum_exec_runtime); 527 cputime_add(tsk->utime, sig->utime),
528 cputime_add(tsk->stime, sig->stime),
529 tsk->se.sum_exec_runtime + sig->sum_sched_runtime);
529} 530}
530 531
531static void clear_dead_task(struct k_itimer *timer, union cpu_time_count now) 532static void clear_dead_task(struct k_itimer *timer, union cpu_time_count now)
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index 052ec4d195c..d089d052c4a 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -202,6 +202,12 @@ static int no_timer_create(struct k_itimer *new_timer)
202 return -EOPNOTSUPP; 202 return -EOPNOTSUPP;
203} 203}
204 204
205static int no_nsleep(const clockid_t which_clock, int flags,
206 struct timespec *tsave, struct timespec __user *rmtp)
207{
208 return -EOPNOTSUPP;
209}
210
205/* 211/*
206 * Return nonzero if we know a priori this clockid_t value is bogus. 212 * Return nonzero if we know a priori this clockid_t value is bogus.
207 */ 213 */
@@ -254,6 +260,7 @@ static __init int init_posix_timers(void)
254 .clock_get = posix_get_monotonic_raw, 260 .clock_get = posix_get_monotonic_raw,
255 .clock_set = do_posix_clock_nosettime, 261 .clock_set = do_posix_clock_nosettime,
256 .timer_create = no_timer_create, 262 .timer_create = no_timer_create,
263 .nsleep = no_nsleep,
257 }; 264 };
258 265
259 register_posix_clock(CLOCK_REALTIME, &clock_realtime); 266 register_posix_clock(CLOCK_REALTIME, &clock_realtime);
diff --git a/kernel/profile.c b/kernel/profile.c
index 69911b5745e..419250ebec4 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -117,11 +117,12 @@ int __ref profile_init(void)
117 117
118 cpumask_copy(prof_cpu_mask, cpu_possible_mask); 118 cpumask_copy(prof_cpu_mask, cpu_possible_mask);
119 119
120 prof_buffer = kzalloc(buffer_bytes, GFP_KERNEL); 120 prof_buffer = kzalloc(buffer_bytes, GFP_KERNEL|__GFP_NOWARN);
121 if (prof_buffer) 121 if (prof_buffer)
122 return 0; 122 return 0;
123 123
124 prof_buffer = alloc_pages_exact(buffer_bytes, GFP_KERNEL|__GFP_ZERO); 124 prof_buffer = alloc_pages_exact(buffer_bytes,
125 GFP_KERNEL|__GFP_ZERO|__GFP_NOWARN);
125 if (prof_buffer) 126 if (prof_buffer)
126 return 0; 127 return 0;
127 128
diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c
index fcd107a78c5..29bd4baf9e7 100644
--- a/kernel/rtmutex.c
+++ b/kernel/rtmutex.c
@@ -1039,16 +1039,14 @@ int rt_mutex_start_proxy_lock(struct rt_mutex *lock,
1039 if (!rt_mutex_owner(lock) || try_to_steal_lock(lock, task)) { 1039 if (!rt_mutex_owner(lock) || try_to_steal_lock(lock, task)) {
1040 /* We got the lock for task. */ 1040 /* We got the lock for task. */
1041 debug_rt_mutex_lock(lock); 1041 debug_rt_mutex_lock(lock);
1042
1043 rt_mutex_set_owner(lock, task, 0); 1042 rt_mutex_set_owner(lock, task, 0);
1044 1043 spin_unlock(&lock->wait_lock);
1045 rt_mutex_deadlock_account_lock(lock, task); 1044 rt_mutex_deadlock_account_lock(lock, task);
1046 return 1; 1045 return 1;
1047 } 1046 }
1048 1047
1049 ret = task_blocks_on_rt_mutex(lock, waiter, task, detect_deadlock); 1048 ret = task_blocks_on_rt_mutex(lock, waiter, task, detect_deadlock);
1050 1049
1051
1052 if (ret && !waiter->task) { 1050 if (ret && !waiter->task) {
1053 /* 1051 /*
1054 * Reset the return value. We might have 1052 * Reset the return value. We might have
diff --git a/kernel/sched.c b/kernel/sched.c
index 98972d366fd..1b59e265273 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7289,6 +7289,7 @@ static void migrate_dead_tasks(unsigned int dead_cpu)
7289static void calc_global_load_remove(struct rq *rq) 7289static void calc_global_load_remove(struct rq *rq)
7290{ 7290{
7291 atomic_long_sub(rq->calc_load_active, &calc_load_tasks); 7291 atomic_long_sub(rq->calc_load_active, &calc_load_tasks);
7292 rq->calc_load_active = 0;
7292} 7293}
7293#endif /* CONFIG_HOTPLUG_CPU */ 7294#endif /* CONFIG_HOTPLUG_CPU */
7294 7295
@@ -7515,6 +7516,7 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
7515 task_rq_unlock(rq, &flags); 7516 task_rq_unlock(rq, &flags);
7516 get_task_struct(p); 7517 get_task_struct(p);
7517 cpu_rq(cpu)->migration_thread = p; 7518 cpu_rq(cpu)->migration_thread = p;
7519 rq->calc_load_update = calc_load_update;
7518 break; 7520 break;
7519 7521
7520 case CPU_ONLINE: 7522 case CPU_ONLINE:
@@ -7525,8 +7527,6 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
7525 /* Update our root-domain */ 7527 /* Update our root-domain */
7526 rq = cpu_rq(cpu); 7528 rq = cpu_rq(cpu);
7527 spin_lock_irqsave(&rq->lock, flags); 7529 spin_lock_irqsave(&rq->lock, flags);
7528 rq->calc_load_update = calc_load_update;
7529 rq->calc_load_active = 0;
7530 if (rq->rd) { 7530 if (rq->rd) {
7531 BUG_ON(!cpumask_test_cpu(cpu, rq->rd->span)); 7531 BUG_ON(!cpumask_test_cpu(cpu, rq->rd->span));
7532 7532
diff --git a/kernel/sched_cpupri.c b/kernel/sched_cpupri.c
index e6c251790dd..d014efbf947 100644
--- a/kernel/sched_cpupri.c
+++ b/kernel/sched_cpupri.c
@@ -81,8 +81,21 @@ int cpupri_find(struct cpupri *cp, struct task_struct *p,
81 if (cpumask_any_and(&p->cpus_allowed, vec->mask) >= nr_cpu_ids) 81 if (cpumask_any_and(&p->cpus_allowed, vec->mask) >= nr_cpu_ids)
82 continue; 82 continue;
83 83
84 if (lowest_mask) 84 if (lowest_mask) {
85 cpumask_and(lowest_mask, &p->cpus_allowed, vec->mask); 85 cpumask_and(lowest_mask, &p->cpus_allowed, vec->mask);
86
87 /*
88 * We have to ensure that we have at least one bit
89 * still set in the array, since the map could have
90 * been concurrently emptied between the first and
91 * second reads of vec->mask. If we hit this
92 * condition, simply act as though we never hit this
93 * priority level and continue on.
94 */
95 if (cpumask_any(lowest_mask) >= nr_cpu_ids)
96 continue;
97 }
98
86 return 1; 99 return 1;
87 } 100 }
88 101
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 7c248dc30f4..652e8bdef9a 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -266,6 +266,12 @@ static inline u64 min_vruntime(u64 min_vruntime, u64 vruntime)
266 return min_vruntime; 266 return min_vruntime;
267} 267}
268 268
269static inline int entity_before(struct sched_entity *a,
270 struct sched_entity *b)
271{
272 return (s64)(a->vruntime - b->vruntime) < 0;
273}
274
269static inline s64 entity_key(struct cfs_rq *cfs_rq, struct sched_entity *se) 275static inline s64 entity_key(struct cfs_rq *cfs_rq, struct sched_entity *se)
270{ 276{
271 return se->vruntime - cfs_rq->min_vruntime; 277 return se->vruntime - cfs_rq->min_vruntime;
@@ -605,9 +611,13 @@ account_entity_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se)
605static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se) 611static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se)
606{ 612{
607#ifdef CONFIG_SCHEDSTATS 613#ifdef CONFIG_SCHEDSTATS
614 struct task_struct *tsk = NULL;
615
616 if (entity_is_task(se))
617 tsk = task_of(se);
618
608 if (se->sleep_start) { 619 if (se->sleep_start) {
609 u64 delta = rq_of(cfs_rq)->clock - se->sleep_start; 620 u64 delta = rq_of(cfs_rq)->clock - se->sleep_start;
610 struct task_struct *tsk = task_of(se);
611 621
612 if ((s64)delta < 0) 622 if ((s64)delta < 0)
613 delta = 0; 623 delta = 0;
@@ -618,11 +628,11 @@ static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se)
618 se->sleep_start = 0; 628 se->sleep_start = 0;
619 se->sum_sleep_runtime += delta; 629 se->sum_sleep_runtime += delta;
620 630
621 account_scheduler_latency(tsk, delta >> 10, 1); 631 if (tsk)
632 account_scheduler_latency(tsk, delta >> 10, 1);
622 } 633 }
623 if (se->block_start) { 634 if (se->block_start) {
624 u64 delta = rq_of(cfs_rq)->clock - se->block_start; 635 u64 delta = rq_of(cfs_rq)->clock - se->block_start;
625 struct task_struct *tsk = task_of(se);
626 636
627 if ((s64)delta < 0) 637 if ((s64)delta < 0)
628 delta = 0; 638 delta = 0;
@@ -633,17 +643,19 @@ static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se)
633 se->block_start = 0; 643 se->block_start = 0;
634 se->sum_sleep_runtime += delta; 644 se->sum_sleep_runtime += delta;
635 645
636 /* 646 if (tsk) {
637 * Blocking time is in units of nanosecs, so shift by 20 to 647 /*
638 * get a milliseconds-range estimation of the amount of 648 * Blocking time is in units of nanosecs, so shift by
639 * time that the task spent sleeping: 649 * 20 to get a milliseconds-range estimation of the
640 */ 650 * amount of time that the task spent sleeping:
641 if (unlikely(prof_on == SLEEP_PROFILING)) { 651 */
642 652 if (unlikely(prof_on == SLEEP_PROFILING)) {
643 profile_hits(SLEEP_PROFILING, (void *)get_wchan(tsk), 653 profile_hits(SLEEP_PROFILING,
644 delta >> 20); 654 (void *)get_wchan(tsk),
655 delta >> 20);
656 }
657 account_scheduler_latency(tsk, delta >> 10, 0);
645 } 658 }
646 account_scheduler_latency(tsk, delta >> 10, 0);
647 } 659 }
648#endif 660#endif
649} 661}
@@ -1017,7 +1029,7 @@ static void yield_task_fair(struct rq *rq)
1017 /* 1029 /*
1018 * Already in the rightmost position? 1030 * Already in the rightmost position?
1019 */ 1031 */
1020 if (unlikely(!rightmost || rightmost->vruntime < se->vruntime)) 1032 if (unlikely(!rightmost || entity_before(rightmost, se)))
1021 return; 1033 return;
1022 1034
1023 /* 1035 /*
@@ -1713,7 +1725,7 @@ static void task_new_fair(struct rq *rq, struct task_struct *p)
1713 1725
1714 /* 'curr' will be NULL if the child belongs to a different group */ 1726 /* 'curr' will be NULL if the child belongs to a different group */
1715 if (sysctl_sched_child_runs_first && this_cpu == task_cpu(p) && 1727 if (sysctl_sched_child_runs_first && this_cpu == task_cpu(p) &&
1716 curr && curr->vruntime < se->vruntime) { 1728 curr && entity_before(curr, se)) {
1717 /* 1729 /*
1718 * Upon rescheduling, sched_class::put_prev_task() will place 1730 * Upon rescheduling, sched_class::put_prev_task() will place
1719 * 'current' within the tree based on its new key value. 1731 * 'current' within the tree based on its new key value.
diff --git a/kernel/signal.c b/kernel/signal.c
index ccf1ceedaeb..64c5deeaca5 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2454,11 +2454,9 @@ do_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, unsigned long s
2454 stack_t oss; 2454 stack_t oss;
2455 int error; 2455 int error;
2456 2456
2457 if (uoss) { 2457 oss.ss_sp = (void __user *) current->sas_ss_sp;
2458 oss.ss_sp = (void __user *) current->sas_ss_sp; 2458 oss.ss_size = current->sas_ss_size;
2459 oss.ss_size = current->sas_ss_size; 2459 oss.ss_flags = sas_ss_flags(sp);
2460 oss.ss_flags = sas_ss_flags(sp);
2461 }
2462 2460
2463 if (uss) { 2461 if (uss) {
2464 void __user *ss_sp; 2462 void __user *ss_sp;
@@ -2466,10 +2464,12 @@ do_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, unsigned long s
2466 int ss_flags; 2464 int ss_flags;
2467 2465
2468 error = -EFAULT; 2466 error = -EFAULT;
2469 if (!access_ok(VERIFY_READ, uss, sizeof(*uss)) 2467 if (!access_ok(VERIFY_READ, uss, sizeof(*uss)))
2470 || __get_user(ss_sp, &uss->ss_sp) 2468 goto out;
2471 || __get_user(ss_flags, &uss->ss_flags) 2469 error = __get_user(ss_sp, &uss->ss_sp) |
2472 || __get_user(ss_size, &uss->ss_size)) 2470 __get_user(ss_flags, &uss->ss_flags) |
2471 __get_user(ss_size, &uss->ss_size);
2472 if (error)
2473 goto out; 2473 goto out;
2474 2474
2475 error = -EPERM; 2475 error = -EPERM;
@@ -2501,13 +2501,16 @@ do_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, unsigned long s
2501 current->sas_ss_size = ss_size; 2501 current->sas_ss_size = ss_size;
2502 } 2502 }
2503 2503
2504 error = 0;
2504 if (uoss) { 2505 if (uoss) {
2505 error = -EFAULT; 2506 error = -EFAULT;
2506 if (copy_to_user(uoss, &oss, sizeof(oss))) 2507 if (!access_ok(VERIFY_WRITE, uoss, sizeof(*uoss)))
2507 goto out; 2508 goto out;
2509 error = __put_user(oss.ss_sp, &uoss->ss_sp) |
2510 __put_user(oss.ss_size, &uoss->ss_size) |
2511 __put_user(oss.ss_flags, &uoss->ss_flags);
2508 } 2512 }
2509 2513
2510 error = 0;
2511out: 2514out:
2512 return error; 2515 return error;
2513} 2516}
diff --git a/kernel/smp.c b/kernel/smp.c
index ad63d850120..94188b8ecc3 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -57,7 +57,7 @@ hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)
57 return NOTIFY_BAD; 57 return NOTIFY_BAD;
58 break; 58 break;
59 59
60#ifdef CONFIG_CPU_HOTPLUG 60#ifdef CONFIG_HOTPLUG_CPU
61 case CPU_UP_CANCELED: 61 case CPU_UP_CANCELED:
62 case CPU_UP_CANCELED_FROZEN: 62 case CPU_UP_CANCELED_FROZEN:
63 63
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 3a94905fa5d..eb5e131a048 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -345,7 +345,9 @@ void open_softirq(int nr, void (*action)(struct softirq_action *))
345 softirq_vec[nr].action = action; 345 softirq_vec[nr].action = action;
346} 346}
347 347
348/* Tasklets */ 348/*
349 * Tasklets
350 */
349struct tasklet_head 351struct tasklet_head
350{ 352{
351 struct tasklet_struct *head; 353 struct tasklet_struct *head;
@@ -493,6 +495,66 @@ void tasklet_kill(struct tasklet_struct *t)
493 495
494EXPORT_SYMBOL(tasklet_kill); 496EXPORT_SYMBOL(tasklet_kill);
495 497
498/*
499 * tasklet_hrtimer
500 */
501
502/*
503 * The trampoline is called when the hrtimer expires. If this is
504 * called from the hrtimer interrupt then we schedule the tasklet as
505 * the timer callback function expects to run in softirq context. If
506 * it's called in softirq context anyway (i.e. high resolution timers
507 * disabled) then the hrtimer callback is called right away.
508 */
509static enum hrtimer_restart __hrtimer_tasklet_trampoline(struct hrtimer *timer)
510{
511 struct tasklet_hrtimer *ttimer =
512 container_of(timer, struct tasklet_hrtimer, timer);
513
514 if (hrtimer_is_hres_active(timer)) {
515 tasklet_hi_schedule(&ttimer->tasklet);
516 return HRTIMER_NORESTART;
517 }
518 return ttimer->function(timer);
519}
520
521/*
522 * Helper function which calls the hrtimer callback from
523 * tasklet/softirq context
524 */
525static void __tasklet_hrtimer_trampoline(unsigned long data)
526{
527 struct tasklet_hrtimer *ttimer = (void *)data;
528 enum hrtimer_restart restart;
529
530 restart = ttimer->function(&ttimer->timer);
531 if (restart != HRTIMER_NORESTART)
532 hrtimer_restart(&ttimer->timer);
533}
534
535/**
536 * tasklet_hrtimer_init - Init a tasklet/hrtimer combo for softirq callbacks
537 * @ttimer: tasklet_hrtimer which is initialized
538 * @function: hrtimer callback funtion which gets called from softirq context
539 * @which_clock: clock id (CLOCK_MONOTONIC/CLOCK_REALTIME)
540 * @mode: hrtimer mode (HRTIMER_MODE_ABS/HRTIMER_MODE_REL)
541 */
542void tasklet_hrtimer_init(struct tasklet_hrtimer *ttimer,
543 enum hrtimer_restart (*function)(struct hrtimer *),
544 clockid_t which_clock, enum hrtimer_mode mode)
545{
546 hrtimer_init(&ttimer->timer, which_clock, mode);
547 ttimer->timer.function = __hrtimer_tasklet_trampoline;
548 tasklet_init(&ttimer->tasklet, __tasklet_hrtimer_trampoline,
549 (unsigned long)ttimer);
550 ttimer->function = function;
551}
552EXPORT_SYMBOL_GPL(tasklet_hrtimer_init);
553
554/*
555 * Remote softirq bits
556 */
557
496DEFINE_PER_CPU(struct list_head [NR_SOFTIRQS], softirq_work_list); 558DEFINE_PER_CPU(struct list_head [NR_SOFTIRQS], softirq_work_list);
497EXPORT_PER_CPU_SYMBOL(softirq_work_list); 559EXPORT_PER_CPU_SYMBOL(softirq_work_list);
498 560
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 592bf584d1d..7466cb81125 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -513,7 +513,7 @@ static ssize_t sysfs_override_clocksource(struct sys_device *dev,
513 * Check to make sure we don't switch to a non-highres capable 513 * Check to make sure we don't switch to a non-highres capable
514 * clocksource if the tick code is in oneshot mode (highres or nohz) 514 * clocksource if the tick code is in oneshot mode (highres or nohz)
515 */ 515 */
516 if (tick_oneshot_mode_active() && 516 if (tick_oneshot_mode_active() && ovr &&
517 !(ovr->flags & CLOCK_SOURCE_VALID_FOR_HRES)) { 517 !(ovr->flags & CLOCK_SOURCE_VALID_FOR_HRES)) {
518 printk(KERN_WARNING "%s clocksource is not HRT compatible. " 518 printk(KERN_WARNING "%s clocksource is not HRT compatible. "
519 "Cannot switch while in HRT/NOHZ mode\n", ovr->name); 519 "Cannot switch while in HRT/NOHZ mode\n", ovr->name);
diff --git a/kernel/timer.c b/kernel/timer.c
index 0b36b9e5cc8..a7f07d5a624 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -714,7 +714,7 @@ int mod_timer(struct timer_list *timer, unsigned long expires)
714 * networking code - if the timer is re-modified 714 * networking code - if the timer is re-modified
715 * to be the same thing then just return: 715 * to be the same thing then just return:
716 */ 716 */
717 if (timer->expires == expires && timer_pending(timer)) 717 if (timer_pending(timer) && timer->expires == expires)
718 return 1; 718 return 1;
719 719
720 return __mod_timer(timer, expires, false, TIMER_NOT_PINNED); 720 return __mod_timer(timer, expires, false, TIMER_NOT_PINNED);
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 1090b0aed9b..7a34cb563fe 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -267,8 +267,8 @@ static void blk_trace_free(struct blk_trace *bt)
267{ 267{
268 debugfs_remove(bt->msg_file); 268 debugfs_remove(bt->msg_file);
269 debugfs_remove(bt->dropped_file); 269 debugfs_remove(bt->dropped_file);
270 debugfs_remove(bt->dir);
271 relay_close(bt->rchan); 270 relay_close(bt->rchan);
271 debugfs_remove(bt->dir);
272 free_percpu(bt->sequence); 272 free_percpu(bt->sequence);
273 free_percpu(bt->msg_data); 273 free_percpu(bt->msg_data);
274 kfree(bt); 274 kfree(bt);
@@ -378,18 +378,8 @@ static int blk_subbuf_start_callback(struct rchan_buf *buf, void *subbuf,
378 378
379static int blk_remove_buf_file_callback(struct dentry *dentry) 379static int blk_remove_buf_file_callback(struct dentry *dentry)
380{ 380{
381 struct dentry *parent = dentry->d_parent;
382 debugfs_remove(dentry); 381 debugfs_remove(dentry);
383 382
384 /*
385 * this will fail for all but the last file, but that is ok. what we
386 * care about is the top level buts->name directory going away, when
387 * the last trace file is gone. Then we don't have to rmdir() that
388 * manually on trace stop, so it nicely solves the issue with
389 * force killing of running traces.
390 */
391
392 debugfs_remove(parent);
393 return 0; 383 return 0;
394} 384}
395 385
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 4521c77d1a1..1e1d23c2630 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1662,7 +1662,7 @@ ftrace_regex_open(struct inode *inode, struct file *file, int enable)
1662 1662
1663 mutex_lock(&ftrace_regex_lock); 1663 mutex_lock(&ftrace_regex_lock);
1664 if ((file->f_mode & FMODE_WRITE) && 1664 if ((file->f_mode & FMODE_WRITE) &&
1665 !(file->f_flags & O_APPEND)) 1665 (file->f_flags & O_TRUNC))
1666 ftrace_filter_reset(enable); 1666 ftrace_filter_reset(enable);
1667 1667
1668 if (file->f_mode & FMODE_READ) { 1668 if (file->f_mode & FMODE_READ) {
@@ -2577,7 +2577,7 @@ ftrace_graph_open(struct inode *inode, struct file *file)
2577 2577
2578 mutex_lock(&graph_lock); 2578 mutex_lock(&graph_lock);
2579 if ((file->f_mode & FMODE_WRITE) && 2579 if ((file->f_mode & FMODE_WRITE) &&
2580 !(file->f_flags & O_APPEND)) { 2580 (file->f_flags & O_TRUNC)) {
2581 ftrace_graph_count = 0; 2581 ftrace_graph_count = 0;
2582 memset(ftrace_graph_funcs, 0, sizeof(ftrace_graph_funcs)); 2582 memset(ftrace_graph_funcs, 0, sizeof(ftrace_graph_funcs));
2583 } 2583 }
@@ -2596,6 +2596,14 @@ ftrace_graph_open(struct inode *inode, struct file *file)
2596} 2596}
2597 2597
2598static int 2598static int
2599ftrace_graph_release(struct inode *inode, struct file *file)
2600{
2601 if (file->f_mode & FMODE_READ)
2602 seq_release(inode, file);
2603 return 0;
2604}
2605
2606static int
2599ftrace_set_func(unsigned long *array, int *idx, char *buffer) 2607ftrace_set_func(unsigned long *array, int *idx, char *buffer)
2600{ 2608{
2601 struct dyn_ftrace *rec; 2609 struct dyn_ftrace *rec;
@@ -2724,9 +2732,10 @@ ftrace_graph_write(struct file *file, const char __user *ubuf,
2724} 2732}
2725 2733
2726static const struct file_operations ftrace_graph_fops = { 2734static const struct file_operations ftrace_graph_fops = {
2727 .open = ftrace_graph_open, 2735 .open = ftrace_graph_open,
2728 .read = seq_read, 2736 .read = seq_read,
2729 .write = ftrace_graph_write, 2737 .write = ftrace_graph_write,
2738 .release = ftrace_graph_release,
2730}; 2739};
2731#endif /* CONFIG_FUNCTION_GRAPH_TRACER */ 2740#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
2732 2741
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index bf27bb7a63e..a330513d96c 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -735,6 +735,7 @@ ring_buffer_free(struct ring_buffer *buffer)
735 735
736 put_online_cpus(); 736 put_online_cpus();
737 737
738 kfree(buffer->buffers);
738 free_cpumask_var(buffer->cpumask); 739 free_cpumask_var(buffer->cpumask);
739 740
740 kfree(buffer); 741 kfree(buffer);
@@ -1785,7 +1786,7 @@ void ring_buffer_discard_commit(struct ring_buffer *buffer,
1785 */ 1786 */
1786 RB_WARN_ON(buffer, !local_read(&cpu_buffer->committing)); 1787 RB_WARN_ON(buffer, !local_read(&cpu_buffer->committing));
1787 1788
1788 if (!rb_try_to_discard(cpu_buffer, event)) 1789 if (rb_try_to_discard(cpu_buffer, event))
1789 goto out; 1790 goto out;
1790 1791
1791 /* 1792 /*
@@ -2383,7 +2384,6 @@ rb_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts)
2383 * the box. Return the padding, and we will release 2384 * the box. Return the padding, and we will release
2384 * the current locks, and try again. 2385 * the current locks, and try again.
2385 */ 2386 */
2386 rb_advance_reader(cpu_buffer);
2387 return event; 2387 return event;
2388 2388
2389 case RINGBUF_TYPE_TIME_EXTEND: 2389 case RINGBUF_TYPE_TIME_EXTEND:
@@ -2486,7 +2486,7 @@ static inline int rb_ok_to_lock(void)
2486 * buffer too. A one time deal is all you get from reading 2486 * buffer too. A one time deal is all you get from reading
2487 * the ring buffer from an NMI. 2487 * the ring buffer from an NMI.
2488 */ 2488 */
2489 if (likely(!in_nmi() && !oops_in_progress)) 2489 if (likely(!in_nmi()))
2490 return 1; 2490 return 1;
2491 2491
2492 tracing_off_permanent(); 2492 tracing_off_permanent();
@@ -2519,6 +2519,8 @@ ring_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts)
2519 if (dolock) 2519 if (dolock)
2520 spin_lock(&cpu_buffer->reader_lock); 2520 spin_lock(&cpu_buffer->reader_lock);
2521 event = rb_buffer_peek(buffer, cpu, ts); 2521 event = rb_buffer_peek(buffer, cpu, ts);
2522 if (event && event->type_len == RINGBUF_TYPE_PADDING)
2523 rb_advance_reader(cpu_buffer);
2522 if (dolock) 2524 if (dolock)
2523 spin_unlock(&cpu_buffer->reader_lock); 2525 spin_unlock(&cpu_buffer->reader_lock);
2524 local_irq_restore(flags); 2526 local_irq_restore(flags);
@@ -2590,12 +2592,9 @@ ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts)
2590 spin_lock(&cpu_buffer->reader_lock); 2592 spin_lock(&cpu_buffer->reader_lock);
2591 2593
2592 event = rb_buffer_peek(buffer, cpu, ts); 2594 event = rb_buffer_peek(buffer, cpu, ts);
2593 if (!event) 2595 if (event)
2594 goto out_unlock; 2596 rb_advance_reader(cpu_buffer);
2595
2596 rb_advance_reader(cpu_buffer);
2597 2597
2598 out_unlock:
2599 if (dolock) 2598 if (dolock)
2600 spin_unlock(&cpu_buffer->reader_lock); 2599 spin_unlock(&cpu_buffer->reader_lock);
2601 local_irq_restore(flags); 2600 local_irq_restore(flags);
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 8bc8d8afea6..c22b40f8f57 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -848,6 +848,7 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags,
848 ((pc & SOFTIRQ_MASK) ? TRACE_FLAG_SOFTIRQ : 0) | 848 ((pc & SOFTIRQ_MASK) ? TRACE_FLAG_SOFTIRQ : 0) |
849 (need_resched() ? TRACE_FLAG_NEED_RESCHED : 0); 849 (need_resched() ? TRACE_FLAG_NEED_RESCHED : 0);
850} 850}
851EXPORT_SYMBOL_GPL(tracing_generic_entry_update);
851 852
852struct ring_buffer_event *trace_buffer_lock_reserve(struct trace_array *tr, 853struct ring_buffer_event *trace_buffer_lock_reserve(struct trace_array *tr,
853 int type, 854 int type,
@@ -2031,7 +2032,7 @@ static int tracing_open(struct inode *inode, struct file *file)
2031 2032
2032 /* If this file was open for write, then erase contents */ 2033 /* If this file was open for write, then erase contents */
2033 if ((file->f_mode & FMODE_WRITE) && 2034 if ((file->f_mode & FMODE_WRITE) &&
2034 !(file->f_flags & O_APPEND)) { 2035 (file->f_flags & O_TRUNC)) {
2035 long cpu = (long) inode->i_private; 2036 long cpu = (long) inode->i_private;
2036 2037
2037 if (cpu == TRACE_PIPE_ALL_CPU) 2038 if (cpu == TRACE_PIPE_ALL_CPU)
@@ -3085,7 +3086,8 @@ tracing_fill_pipe_page(size_t rem, struct trace_iterator *iter)
3085 break; 3086 break;
3086 } 3087 }
3087 3088
3088 trace_consume(iter); 3089 if (ret != TRACE_TYPE_NO_CONSUME)
3090 trace_consume(iter);
3089 rem -= count; 3091 rem -= count;
3090 if (!find_next_entry_inc(iter)) { 3092 if (!find_next_entry_inc(iter)) {
3091 rem = 0; 3093 rem = 0;
@@ -4233,8 +4235,11 @@ static void __ftrace_dump(bool disable_tracing)
4233 iter.pos = -1; 4235 iter.pos = -1;
4234 4236
4235 if (find_next_entry_inc(&iter) != NULL) { 4237 if (find_next_entry_inc(&iter) != NULL) {
4236 print_trace_line(&iter); 4238 int ret;
4237 trace_consume(&iter); 4239
4240 ret = print_trace_line(&iter);
4241 if (ret != TRACE_TYPE_NO_CONSUME)
4242 trace_consume(&iter);
4238 } 4243 }
4239 4244
4240 trace_printk_seq(&iter.seq); 4245 trace_printk_seq(&iter.seq);
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 3548ae5cc78..8b9f4f6e955 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -438,10 +438,6 @@ struct trace_entry *tracing_get_trace_entry(struct trace_array *tr,
438struct trace_entry *trace_find_next_entry(struct trace_iterator *iter, 438struct trace_entry *trace_find_next_entry(struct trace_iterator *iter,
439 int *ent_cpu, u64 *ent_ts); 439 int *ent_cpu, u64 *ent_ts);
440 440
441void tracing_generic_entry_update(struct trace_entry *entry,
442 unsigned long flags,
443 int pc);
444
445void default_wait_pipe(struct trace_iterator *iter); 441void default_wait_pipe(struct trace_iterator *iter);
446void poll_wait_pipe(struct trace_iterator *iter); 442void poll_wait_pipe(struct trace_iterator *iter);
447 443
diff --git a/kernel/trace/trace_event_profile.c b/kernel/trace/trace_event_profile.c
index 5b5895afecf..11ba5bb4ed0 100644
--- a/kernel/trace/trace_event_profile.c
+++ b/kernel/trace/trace_event_profile.c
@@ -14,7 +14,7 @@ int ftrace_profile_enable(int event_id)
14 14
15 mutex_lock(&event_mutex); 15 mutex_lock(&event_mutex);
16 list_for_each_entry(event, &ftrace_events, list) { 16 list_for_each_entry(event, &ftrace_events, list) {
17 if (event->id == event_id) { 17 if (event->id == event_id && event->profile_enable) {
18 ret = event->profile_enable(event); 18 ret = event->profile_enable(event);
19 break; 19 break;
20 } 20 }
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 53c8fd376a8..e75276a49cf 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -376,7 +376,7 @@ ftrace_event_seq_open(struct inode *inode, struct file *file)
376 const struct seq_operations *seq_ops; 376 const struct seq_operations *seq_ops;
377 377
378 if ((file->f_mode & FMODE_WRITE) && 378 if ((file->f_mode & FMODE_WRITE) &&
379 !(file->f_flags & O_APPEND)) 379 (file->f_flags & O_TRUNC))
380 ftrace_clear_events(); 380 ftrace_clear_events();
381 381
382 seq_ops = inode->i_private; 382 seq_ops = inode->i_private;
@@ -940,7 +940,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
940 entry = trace_create_file("enable", 0644, call->dir, call, 940 entry = trace_create_file("enable", 0644, call->dir, call,
941 enable); 941 enable);
942 942
943 if (call->id) 943 if (call->id && call->profile_enable)
944 entry = trace_create_file("id", 0444, call->dir, call, 944 entry = trace_create_file("id", 0444, call->dir, call,
945 id); 945 id);
946 946
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index 936c621bbf4..f32dc9d1ea7 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -624,9 +624,6 @@ static int filter_add_subsystem_pred(struct filter_parse_state *ps,
624 return -ENOSPC; 624 return -ENOSPC;
625 } 625 }
626 626
627 filter->preds[filter->n_preds] = pred;
628 filter->n_preds++;
629
630 list_for_each_entry(call, &ftrace_events, list) { 627 list_for_each_entry(call, &ftrace_events, list) {
631 628
632 if (!call->define_fields) 629 if (!call->define_fields)
@@ -643,6 +640,9 @@ static int filter_add_subsystem_pred(struct filter_parse_state *ps,
643 } 640 }
644 replace_filter_string(call->filter, filter_string); 641 replace_filter_string(call->filter, filter_string);
645 } 642 }
643
644 filter->preds[filter->n_preds] = pred;
645 filter->n_preds++;
646out: 646out:
647 return err; 647 return err;
648} 648}
@@ -1029,12 +1029,17 @@ static int replace_preds(struct event_subsystem *system,
1029 1029
1030 if (elt->op == OP_AND || elt->op == OP_OR) { 1030 if (elt->op == OP_AND || elt->op == OP_OR) {
1031 pred = create_logical_pred(elt->op); 1031 pred = create_logical_pred(elt->op);
1032 if (!pred)
1033 return -ENOMEM;
1032 if (call) { 1034 if (call) {
1033 err = filter_add_pred(ps, call, pred); 1035 err = filter_add_pred(ps, call, pred);
1034 filter_free_pred(pred); 1036 filter_free_pred(pred);
1035 } else 1037 } else {
1036 err = filter_add_subsystem_pred(ps, system, 1038 err = filter_add_subsystem_pred(ps, system,
1037 pred, filter_string); 1039 pred, filter_string);
1040 if (err)
1041 filter_free_pred(pred);
1042 }
1038 if (err) 1043 if (err)
1039 return err; 1044 return err;
1040 1045
@@ -1048,12 +1053,17 @@ static int replace_preds(struct event_subsystem *system,
1048 } 1053 }
1049 1054
1050 pred = create_pred(elt->op, operand1, operand2); 1055 pred = create_pred(elt->op, operand1, operand2);
1056 if (!pred)
1057 return -ENOMEM;
1051 if (call) { 1058 if (call) {
1052 err = filter_add_pred(ps, call, pred); 1059 err = filter_add_pred(ps, call, pred);
1053 filter_free_pred(pred); 1060 filter_free_pred(pred);
1054 } else 1061 } else {
1055 err = filter_add_subsystem_pred(ps, system, pred, 1062 err = filter_add_subsystem_pred(ps, system, pred,
1056 filter_string); 1063 filter_string);
1064 if (err)
1065 filter_free_pred(pred);
1066 }
1057 if (err) 1067 if (err)
1058 return err; 1068 return err;
1059 1069
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index d2249abafb5..420ec348757 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -843,9 +843,16 @@ print_graph_function(struct trace_iterator *iter)
843 843
844 switch (entry->type) { 844 switch (entry->type) {
845 case TRACE_GRAPH_ENT: { 845 case TRACE_GRAPH_ENT: {
846 struct ftrace_graph_ent_entry *field; 846 /*
847 * print_graph_entry() may consume the current event,
848 * thus @field may become invalid, so we need to save it.
849 * sizeof(struct ftrace_graph_ent_entry) is very small,
850 * it can be safely saved at the stack.
851 */
852 struct ftrace_graph_ent_entry *field, saved;
847 trace_assign_type(field, entry); 853 trace_assign_type(field, entry);
848 return print_graph_entry(field, s, iter); 854 saved = *field;
855 return print_graph_entry(&saved, s, iter);
849 } 856 }
850 case TRACE_GRAPH_RET: { 857 case TRACE_GRAPH_RET: {
851 struct ftrace_graph_ret_entry *field; 858 struct ftrace_graph_ret_entry *field;
diff --git a/kernel/trace/trace_printk.c b/kernel/trace/trace_printk.c
index 7b627811082..687699d365a 100644
--- a/kernel/trace/trace_printk.c
+++ b/kernel/trace/trace_printk.c
@@ -176,7 +176,7 @@ static int t_show(struct seq_file *m, void *v)
176 const char *str = *fmt; 176 const char *str = *fmt;
177 int i; 177 int i;
178 178
179 seq_printf(m, "0x%lx : \"", (unsigned long)fmt); 179 seq_printf(m, "0x%lx : \"", *(unsigned long *)fmt);
180 180
181 /* 181 /*
182 * Tabs and new lines need to be converted. 182 * Tabs and new lines need to be converted.
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
index e644af91012..6a2a9d484cd 100644
--- a/kernel/trace/trace_stack.c
+++ b/kernel/trace/trace_stack.c
@@ -301,17 +301,14 @@ static const struct seq_operations stack_trace_seq_ops = {
301 301
302static int stack_trace_open(struct inode *inode, struct file *file) 302static int stack_trace_open(struct inode *inode, struct file *file)
303{ 303{
304 int ret; 304 return seq_open(file, &stack_trace_seq_ops);
305
306 ret = seq_open(file, &stack_trace_seq_ops);
307
308 return ret;
309} 305}
310 306
311static const struct file_operations stack_trace_fops = { 307static const struct file_operations stack_trace_fops = {
312 .open = stack_trace_open, 308 .open = stack_trace_open,
313 .read = seq_read, 309 .read = seq_read,
314 .llseek = seq_lseek, 310 .llseek = seq_lseek,
311 .release = seq_release,
315}; 312};
316 313
317int 314int
diff --git a/kernel/trace/trace_stat.c b/kernel/trace/trace_stat.c
index e66f5e49334..aea321c82fa 100644
--- a/kernel/trace/trace_stat.c
+++ b/kernel/trace/trace_stat.c
@@ -73,7 +73,7 @@ static struct rb_node *release_next(struct rb_node *node)
73 } 73 }
74} 74}
75 75
76static void reset_stat_session(struct stat_session *session) 76static void __reset_stat_session(struct stat_session *session)
77{ 77{
78 struct rb_node *node = session->stat_root.rb_node; 78 struct rb_node *node = session->stat_root.rb_node;
79 79
@@ -83,10 +83,17 @@ static void reset_stat_session(struct stat_session *session)
83 session->stat_root = RB_ROOT; 83 session->stat_root = RB_ROOT;
84} 84}
85 85
86static void reset_stat_session(struct stat_session *session)
87{
88 mutex_lock(&session->stat_mutex);
89 __reset_stat_session(session);
90 mutex_unlock(&session->stat_mutex);
91}
92
86static void destroy_session(struct stat_session *session) 93static void destroy_session(struct stat_session *session)
87{ 94{
88 debugfs_remove(session->file); 95 debugfs_remove(session->file);
89 reset_stat_session(session); 96 __reset_stat_session(session);
90 mutex_destroy(&session->stat_mutex); 97 mutex_destroy(&session->stat_mutex);
91 kfree(session); 98 kfree(session);
92} 99}
@@ -150,7 +157,7 @@ static int stat_seq_init(struct stat_session *session)
150 int i; 157 int i;
151 158
152 mutex_lock(&session->stat_mutex); 159 mutex_lock(&session->stat_mutex);
153 reset_stat_session(session); 160 __reset_stat_session(session);
154 161
155 if (!ts->stat_cmp) 162 if (!ts->stat_cmp)
156 ts->stat_cmp = dummy_cmp; 163 ts->stat_cmp = dummy_cmp;
@@ -183,7 +190,7 @@ exit:
183 return ret; 190 return ret;
184 191
185exit_free_rbtree: 192exit_free_rbtree:
186 reset_stat_session(session); 193 __reset_stat_session(session);
187 mutex_unlock(&session->stat_mutex); 194 mutex_unlock(&session->stat_mutex);
188 return ret; 195 return ret;
189} 196}
@@ -250,16 +257,21 @@ static const struct seq_operations trace_stat_seq_ops = {
250static int tracing_stat_open(struct inode *inode, struct file *file) 257static int tracing_stat_open(struct inode *inode, struct file *file)
251{ 258{
252 int ret; 259 int ret;
253 260 struct seq_file *m;
254 struct stat_session *session = inode->i_private; 261 struct stat_session *session = inode->i_private;
255 262
263 ret = stat_seq_init(session);
264 if (ret)
265 return ret;
266
256 ret = seq_open(file, &trace_stat_seq_ops); 267 ret = seq_open(file, &trace_stat_seq_ops);
257 if (!ret) { 268 if (ret) {
258 struct seq_file *m = file->private_data; 269 reset_stat_session(session);
259 m->private = session; 270 return ret;
260 ret = stat_seq_init(session);
261 } 271 }
262 272
273 m = file->private_data;
274 m->private = session;
263 return ret; 275 return ret;
264} 276}
265 277
@@ -270,11 +282,9 @@ static int tracing_stat_release(struct inode *i, struct file *f)
270{ 282{
271 struct stat_session *session = i->i_private; 283 struct stat_session *session = i->i_private;
272 284
273 mutex_lock(&session->stat_mutex);
274 reset_stat_session(session); 285 reset_stat_session(session);
275 mutex_unlock(&session->stat_mutex);
276 286
277 return 0; 287 return seq_release(i, f);
278} 288}
279 289
280static const struct file_operations tracing_stat_fops = { 290static const struct file_operations tracing_stat_fops = {
diff --git a/kernel/wait.c b/kernel/wait.c
index ea7c3b4275c..c4bd3d825f3 100644
--- a/kernel/wait.c
+++ b/kernel/wait.c
@@ -10,13 +10,14 @@
10#include <linux/wait.h> 10#include <linux/wait.h>
11#include <linux/hash.h> 11#include <linux/hash.h>
12 12
13void init_waitqueue_head(wait_queue_head_t *q) 13void __init_waitqueue_head(wait_queue_head_t *q, struct lock_class_key *key)
14{ 14{
15 spin_lock_init(&q->lock); 15 spin_lock_init(&q->lock);
16 lockdep_set_class(&q->lock, key);
16 INIT_LIST_HEAD(&q->task_list); 17 INIT_LIST_HEAD(&q->task_list);
17} 18}
18 19
19EXPORT_SYMBOL(init_waitqueue_head); 20EXPORT_SYMBOL(__init_waitqueue_head);
20 21
21void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait) 22void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait)
22{ 23{
diff --git a/lib/Makefile b/lib/Makefile
index b6d1857bbf0..2e78277eff9 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -12,7 +12,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
12 idr.o int_sqrt.o extable.o prio_tree.o \ 12 idr.o int_sqrt.o extable.o prio_tree.o \
13 sha1.o irq_regs.o reciprocal_div.o argv_split.o \ 13 sha1.o irq_regs.o reciprocal_div.o argv_split.o \
14 proportions.o prio_heap.o ratelimit.o show_mem.o \ 14 proportions.o prio_heap.o ratelimit.o show_mem.o \
15 is_single_threaded.o plist.o decompress.o 15 is_single_threaded.o plist.o decompress.o flex_array.o
16 16
17lib-$(CONFIG_MMU) += ioremap.o 17lib-$(CONFIG_MMU) += ioremap.o
18lib-$(CONFIG_SMP) += cpumask.o 18lib-$(CONFIG_SMP) += cpumask.o
diff --git a/lib/atomic64.c b/lib/atomic64.c
index c5e72556241..8bee16ec752 100644
--- a/lib/atomic64.c
+++ b/lib/atomic64.c
@@ -13,6 +13,7 @@
13#include <linux/cache.h> 13#include <linux/cache.h>
14#include <linux/spinlock.h> 14#include <linux/spinlock.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/module.h>
16#include <asm/atomic.h> 17#include <asm/atomic.h>
17 18
18/* 19/*
@@ -52,6 +53,7 @@ long long atomic64_read(const atomic64_t *v)
52 spin_unlock_irqrestore(lock, flags); 53 spin_unlock_irqrestore(lock, flags);
53 return val; 54 return val;
54} 55}
56EXPORT_SYMBOL(atomic64_read);
55 57
56void atomic64_set(atomic64_t *v, long long i) 58void atomic64_set(atomic64_t *v, long long i)
57{ 59{
@@ -62,6 +64,7 @@ void atomic64_set(atomic64_t *v, long long i)
62 v->counter = i; 64 v->counter = i;
63 spin_unlock_irqrestore(lock, flags); 65 spin_unlock_irqrestore(lock, flags);
64} 66}
67EXPORT_SYMBOL(atomic64_set);
65 68
66void atomic64_add(long long a, atomic64_t *v) 69void atomic64_add(long long a, atomic64_t *v)
67{ 70{
@@ -72,6 +75,7 @@ void atomic64_add(long long a, atomic64_t *v)
72 v->counter += a; 75 v->counter += a;
73 spin_unlock_irqrestore(lock, flags); 76 spin_unlock_irqrestore(lock, flags);
74} 77}
78EXPORT_SYMBOL(atomic64_add);
75 79
76long long atomic64_add_return(long long a, atomic64_t *v) 80long long atomic64_add_return(long long a, atomic64_t *v)
77{ 81{
@@ -84,6 +88,7 @@ long long atomic64_add_return(long long a, atomic64_t *v)
84 spin_unlock_irqrestore(lock, flags); 88 spin_unlock_irqrestore(lock, flags);
85 return val; 89 return val;
86} 90}
91EXPORT_SYMBOL(atomic64_add_return);
87 92
88void atomic64_sub(long long a, atomic64_t *v) 93void atomic64_sub(long long a, atomic64_t *v)
89{ 94{
@@ -94,6 +99,7 @@ void atomic64_sub(long long a, atomic64_t *v)
94 v->counter -= a; 99 v->counter -= a;
95 spin_unlock_irqrestore(lock, flags); 100 spin_unlock_irqrestore(lock, flags);
96} 101}
102EXPORT_SYMBOL(atomic64_sub);
97 103
98long long atomic64_sub_return(long long a, atomic64_t *v) 104long long atomic64_sub_return(long long a, atomic64_t *v)
99{ 105{
@@ -106,6 +112,7 @@ long long atomic64_sub_return(long long a, atomic64_t *v)
106 spin_unlock_irqrestore(lock, flags); 112 spin_unlock_irqrestore(lock, flags);
107 return val; 113 return val;
108} 114}
115EXPORT_SYMBOL(atomic64_sub_return);
109 116
110long long atomic64_dec_if_positive(atomic64_t *v) 117long long atomic64_dec_if_positive(atomic64_t *v)
111{ 118{
@@ -120,6 +127,7 @@ long long atomic64_dec_if_positive(atomic64_t *v)
120 spin_unlock_irqrestore(lock, flags); 127 spin_unlock_irqrestore(lock, flags);
121 return val; 128 return val;
122} 129}
130EXPORT_SYMBOL(atomic64_dec_if_positive);
123 131
124long long atomic64_cmpxchg(atomic64_t *v, long long o, long long n) 132long long atomic64_cmpxchg(atomic64_t *v, long long o, long long n)
125{ 133{
@@ -134,6 +142,7 @@ long long atomic64_cmpxchg(atomic64_t *v, long long o, long long n)
134 spin_unlock_irqrestore(lock, flags); 142 spin_unlock_irqrestore(lock, flags);
135 return val; 143 return val;
136} 144}
145EXPORT_SYMBOL(atomic64_cmpxchg);
137 146
138long long atomic64_xchg(atomic64_t *v, long long new) 147long long atomic64_xchg(atomic64_t *v, long long new)
139{ 148{
@@ -147,6 +156,7 @@ long long atomic64_xchg(atomic64_t *v, long long new)
147 spin_unlock_irqrestore(lock, flags); 156 spin_unlock_irqrestore(lock, flags);
148 return val; 157 return val;
149} 158}
159EXPORT_SYMBOL(atomic64_xchg);
150 160
151int atomic64_add_unless(atomic64_t *v, long long a, long long u) 161int atomic64_add_unless(atomic64_t *v, long long a, long long u)
152{ 162{
@@ -162,6 +172,7 @@ int atomic64_add_unless(atomic64_t *v, long long a, long long u)
162 spin_unlock_irqrestore(lock, flags); 172 spin_unlock_irqrestore(lock, flags);
163 return ret; 173 return ret;
164} 174}
175EXPORT_SYMBOL(atomic64_add_unless);
165 176
166static int init_atomic64_lock(void) 177static int init_atomic64_lock(void)
167{ 178{
diff --git a/lib/decompress_bunzip2.c b/lib/decompress_bunzip2.c
index 708e2a86d87..600f473a561 100644
--- a/lib/decompress_bunzip2.c
+++ b/lib/decompress_bunzip2.c
@@ -45,12 +45,14 @@
45*/ 45*/
46 46
47 47
48#ifndef STATIC 48#ifdef STATIC
49#define PREBOOT
50#else
49#include <linux/decompress/bunzip2.h> 51#include <linux/decompress/bunzip2.h>
50#endif /* !STATIC */ 52#include <linux/slab.h>
53#endif /* STATIC */
51 54
52#include <linux/decompress/mm.h> 55#include <linux/decompress/mm.h>
53#include <linux/slab.h>
54 56
55#ifndef INT_MAX 57#ifndef INT_MAX
56#define INT_MAX 0x7fffffff 58#define INT_MAX 0x7fffffff
@@ -681,9 +683,7 @@ STATIC int INIT bunzip2(unsigned char *buf, int len,
681 set_error_fn(error_fn); 683 set_error_fn(error_fn);
682 if (flush) 684 if (flush)
683 outbuf = malloc(BZIP2_IOBUF_SIZE); 685 outbuf = malloc(BZIP2_IOBUF_SIZE);
684 else 686
685 len -= 4; /* Uncompressed size hack active in pre-boot
686 environment */
687 if (!outbuf) { 687 if (!outbuf) {
688 error("Could not allocate output bufer"); 688 error("Could not allocate output bufer");
689 return -1; 689 return -1;
@@ -733,4 +733,14 @@ exit_0:
733 return i; 733 return i;
734} 734}
735 735
736#define decompress bunzip2 736#ifdef PREBOOT
737STATIC int INIT decompress(unsigned char *buf, int len,
738 int(*fill)(void*, unsigned int),
739 int(*flush)(void*, unsigned int),
740 unsigned char *outbuf,
741 int *pos,
742 void(*error_fn)(char *x))
743{
744 return bunzip2(buf, len - 4, fill, flush, outbuf, pos, error_fn);
745}
746#endif
diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c
index e36b296fc9f..68dfce59c1b 100644
--- a/lib/decompress_inflate.c
+++ b/lib/decompress_inflate.c
@@ -19,13 +19,13 @@
19#include "zlib_inflate/inflate.h" 19#include "zlib_inflate/inflate.h"
20 20
21#include "zlib_inflate/infutil.h" 21#include "zlib_inflate/infutil.h"
22#include <linux/slab.h>
22 23
23#endif /* STATIC */ 24#endif /* STATIC */
24 25
25#include <linux/decompress/mm.h> 26#include <linux/decompress/mm.h>
26#include <linux/slab.h>
27 27
28#define INBUF_LEN (16*1024) 28#define GZIP_IOBUF_SIZE (16*1024)
29 29
30/* Included from initramfs et al code */ 30/* Included from initramfs et al code */
31STATIC int INIT gunzip(unsigned char *buf, int len, 31STATIC int INIT gunzip(unsigned char *buf, int len,
@@ -55,7 +55,7 @@ STATIC int INIT gunzip(unsigned char *buf, int len,
55 if (buf) 55 if (buf)
56 zbuf = buf; 56 zbuf = buf;
57 else { 57 else {
58 zbuf = malloc(INBUF_LEN); 58 zbuf = malloc(GZIP_IOBUF_SIZE);
59 len = 0; 59 len = 0;
60 } 60 }
61 if (!zbuf) { 61 if (!zbuf) {
@@ -77,7 +77,7 @@ STATIC int INIT gunzip(unsigned char *buf, int len,
77 } 77 }
78 78
79 if (len == 0) 79 if (len == 0)
80 len = fill(zbuf, INBUF_LEN); 80 len = fill(zbuf, GZIP_IOBUF_SIZE);
81 81
82 /* verify the gzip header */ 82 /* verify the gzip header */
83 if (len < 10 || 83 if (len < 10 ||
@@ -113,7 +113,7 @@ STATIC int INIT gunzip(unsigned char *buf, int len,
113 while (rc == Z_OK) { 113 while (rc == Z_OK) {
114 if (strm->avail_in == 0) { 114 if (strm->avail_in == 0) {
115 /* TODO: handle case where both pos and fill are set */ 115 /* TODO: handle case where both pos and fill are set */
116 len = fill(zbuf, INBUF_LEN); 116 len = fill(zbuf, GZIP_IOBUF_SIZE);
117 if (len < 0) { 117 if (len < 0) {
118 rc = -1; 118 rc = -1;
119 error("read error"); 119 error("read error");
diff --git a/lib/decompress_unlzma.c b/lib/decompress_unlzma.c
index 32123a1340e..0b954e04bd3 100644
--- a/lib/decompress_unlzma.c
+++ b/lib/decompress_unlzma.c
@@ -29,12 +29,14 @@
29 *Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 29 *Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 */ 30 */
31 31
32#ifndef STATIC 32#ifdef STATIC
33#define PREBOOT
34#else
33#include <linux/decompress/unlzma.h> 35#include <linux/decompress/unlzma.h>
36#include <linux/slab.h>
34#endif /* STATIC */ 37#endif /* STATIC */
35 38
36#include <linux/decompress/mm.h> 39#include <linux/decompress/mm.h>
37#include <linux/slab.h>
38 40
39#define MIN(a, b) (((a) < (b)) ? (a) : (b)) 41#define MIN(a, b) (((a) < (b)) ? (a) : (b))
40 42
@@ -543,9 +545,7 @@ STATIC inline int INIT unlzma(unsigned char *buf, int in_len,
543 int ret = -1; 545 int ret = -1;
544 546
545 set_error_fn(error_fn); 547 set_error_fn(error_fn);
546 if (!flush) 548
547 in_len -= 4; /* Uncompressed size hack active in pre-boot
548 environment */
549 if (buf) 549 if (buf)
550 inbuf = buf; 550 inbuf = buf;
551 else 551 else
@@ -645,4 +645,15 @@ exit_0:
645 return ret; 645 return ret;
646} 646}
647 647
648#define decompress unlzma 648#ifdef PREBOOT
649STATIC int INIT decompress(unsigned char *buf, int in_len,
650 int(*fill)(void*, unsigned int),
651 int(*flush)(void*, unsigned int),
652 unsigned char *output,
653 int *posp,
654 void(*error_fn)(char *x)
655 )
656{
657 return unlzma(buf, in_len - 4, fill, flush, output, posp, error_fn);
658}
659#endif
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 833139ce1e2..e22c148e4b7 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -164,7 +164,7 @@ static void ddebug_change(const struct ddebug_query *query,
164 164
165 if (!newflags) 165 if (!newflags)
166 dt->num_enabled--; 166 dt->num_enabled--;
167 else if (!dp-flags) 167 else if (!dp->flags)
168 dt->num_enabled++; 168 dt->num_enabled++;
169 dp->flags = newflags; 169 dp->flags = newflags;
170 if (newflags) { 170 if (newflags) {
diff --git a/lib/flex_array.c b/lib/flex_array.c
new file mode 100644
index 00000000000..08f1636d296
--- /dev/null
+++ b/lib/flex_array.c
@@ -0,0 +1,267 @@
1/*
2 * Flexible array managed in PAGE_SIZE parts
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 * Copyright IBM Corporation, 2009
19 *
20 * Author: Dave Hansen <dave@linux.vnet.ibm.com>
21 */
22
23#include <linux/flex_array.h>
24#include <linux/slab.h>
25#include <linux/stddef.h>
26
27struct flex_array_part {
28 char elements[FLEX_ARRAY_PART_SIZE];
29};
30
31static inline int __elements_per_part(int element_size)
32{
33 return FLEX_ARRAY_PART_SIZE / element_size;
34}
35
36static inline int bytes_left_in_base(void)
37{
38 int element_offset = offsetof(struct flex_array, parts);
39 int bytes_left = FLEX_ARRAY_BASE_SIZE - element_offset;
40 return bytes_left;
41}
42
43static inline int nr_base_part_ptrs(void)
44{
45 return bytes_left_in_base() / sizeof(struct flex_array_part *);
46}
47
48/*
49 * If a user requests an allocation which is small
50 * enough, we may simply use the space in the
51 * flex_array->parts[] array to store the user
52 * data.
53 */
54static inline int elements_fit_in_base(struct flex_array *fa)
55{
56 int data_size = fa->element_size * fa->total_nr_elements;
57 if (data_size <= bytes_left_in_base())
58 return 1;
59 return 0;
60}
61
62/**
63 * flex_array_alloc - allocate a new flexible array
64 * @element_size: the size of individual elements in the array
65 * @total: total number of elements that this should hold
66 *
67 * Note: all locking must be provided by the caller.
68 *
69 * @total is used to size internal structures. If the user ever
70 * accesses any array indexes >=@total, it will produce errors.
71 *
72 * The maximum number of elements is defined as: the number of
73 * elements that can be stored in a page times the number of
74 * page pointers that we can fit in the base structure or (using
75 * integer math):
76 *
77 * (PAGE_SIZE/element_size) * (PAGE_SIZE-8)/sizeof(void *)
78 *
79 * Here's a table showing example capacities. Note that the maximum
80 * index that the get/put() functions is just nr_objects-1. This
81 * basically means that you get 4MB of storage on 32-bit and 2MB on
82 * 64-bit.
83 *
84 *
85 * Element size | Objects | Objects |
86 * PAGE_SIZE=4k | 32-bit | 64-bit |
87 * ---------------------------------|
88 * 1 bytes | 4186112 | 2093056 |
89 * 2 bytes | 2093056 | 1046528 |
90 * 3 bytes | 1395030 | 697515 |
91 * 4 bytes | 1046528 | 523264 |
92 * 32 bytes | 130816 | 65408 |
93 * 33 bytes | 126728 | 63364 |
94 * 2048 bytes | 2044 | 1022 |
95 * 2049 bytes | 1022 | 511 |
96 * void * | 1046528 | 261632 |
97 *
98 * Since 64-bit pointers are twice the size, we lose half the
99 * capacity in the base structure. Also note that no effort is made
100 * to efficiently pack objects across page boundaries.
101 */
102struct flex_array *flex_array_alloc(int element_size, int total, gfp_t flags)
103{
104 struct flex_array *ret;
105 int max_size = nr_base_part_ptrs() * __elements_per_part(element_size);
106
107 /* max_size will end up 0 if element_size > PAGE_SIZE */
108 if (total > max_size)
109 return NULL;
110 ret = kzalloc(sizeof(struct flex_array), flags);
111 if (!ret)
112 return NULL;
113 ret->element_size = element_size;
114 ret->total_nr_elements = total;
115 return ret;
116}
117
118static int fa_element_to_part_nr(struct flex_array *fa, int element_nr)
119{
120 return element_nr / __elements_per_part(fa->element_size);
121}
122
123/**
124 * flex_array_free_parts - just free the second-level pages
125 * @src: address of data to copy into the array
126 * @element_nr: index of the position in which to insert
127 * the new element.
128 *
129 * This is to be used in cases where the base 'struct flex_array'
130 * has been statically allocated and should not be free.
131 */
132void flex_array_free_parts(struct flex_array *fa)
133{
134 int part_nr;
135 int max_part = nr_base_part_ptrs();
136
137 if (elements_fit_in_base(fa))
138 return;
139 for (part_nr = 0; part_nr < max_part; part_nr++)
140 kfree(fa->parts[part_nr]);
141}
142
143void flex_array_free(struct flex_array *fa)
144{
145 flex_array_free_parts(fa);
146 kfree(fa);
147}
148
149static int fa_index_inside_part(struct flex_array *fa, int element_nr)
150{
151 return element_nr % __elements_per_part(fa->element_size);
152}
153
154static int index_inside_part(struct flex_array *fa, int element_nr)
155{
156 int part_offset = fa_index_inside_part(fa, element_nr);
157 return part_offset * fa->element_size;
158}
159
160static struct flex_array_part *
161__fa_get_part(struct flex_array *fa, int part_nr, gfp_t flags)
162{
163 struct flex_array_part *part = fa->parts[part_nr];
164 if (!part) {
165 /*
166 * This leaves the part pages uninitialized
167 * and with potentially random data, just
168 * as if the user had kmalloc()'d the whole.
169 * __GFP_ZERO can be used to zero it.
170 */
171 part = kmalloc(FLEX_ARRAY_PART_SIZE, flags);
172 if (!part)
173 return NULL;
174 fa->parts[part_nr] = part;
175 }
176 return part;
177}
178
179/**
180 * flex_array_put - copy data into the array at @element_nr
181 * @src: address of data to copy into the array
182 * @element_nr: index of the position in which to insert
183 * the new element.
184 *
185 * Note that this *copies* the contents of @src into
186 * the array. If you are trying to store an array of
187 * pointers, make sure to pass in &ptr instead of ptr.
188 *
189 * Locking must be provided by the caller.
190 */
191int flex_array_put(struct flex_array *fa, int element_nr, void *src, gfp_t flags)
192{
193 int part_nr = fa_element_to_part_nr(fa, element_nr);
194 struct flex_array_part *part;
195 void *dst;
196
197 if (element_nr >= fa->total_nr_elements)
198 return -ENOSPC;
199 if (elements_fit_in_base(fa))
200 part = (struct flex_array_part *)&fa->parts[0];
201 else
202 part = __fa_get_part(fa, part_nr, flags);
203 if (!part)
204 return -ENOMEM;
205 dst = &part->elements[index_inside_part(fa, element_nr)];
206 memcpy(dst, src, fa->element_size);
207 return 0;
208}
209
210/**
211 * flex_array_prealloc - guarantee that array space exists
212 * @start: index of first array element for which space is allocated
213 * @end: index of last (inclusive) element for which space is allocated
214 *
215 * This will guarantee that no future calls to flex_array_put()
216 * will allocate memory. It can be used if you are expecting to
217 * be holding a lock or in some atomic context while writing
218 * data into the array.
219 *
220 * Locking must be provided by the caller.
221 */
222int flex_array_prealloc(struct flex_array *fa, int start, int end, gfp_t flags)
223{
224 int start_part;
225 int end_part;
226 int part_nr;
227 struct flex_array_part *part;
228
229 if (start >= fa->total_nr_elements || end >= fa->total_nr_elements)
230 return -ENOSPC;
231 if (elements_fit_in_base(fa))
232 return 0;
233 start_part = fa_element_to_part_nr(fa, start);
234 end_part = fa_element_to_part_nr(fa, end);
235 for (part_nr = start_part; part_nr <= end_part; part_nr++) {
236 part = __fa_get_part(fa, part_nr, flags);
237 if (!part)
238 return -ENOMEM;
239 }
240 return 0;
241}
242
243/**
244 * flex_array_get - pull data back out of the array
245 * @element_nr: index of the element to fetch from the array
246 *
247 * Returns a pointer to the data at index @element_nr. Note
248 * that this is a copy of the data that was passed in. If you
249 * are using this to store pointers, you'll get back &ptr.
250 *
251 * Locking must be provided by the caller.
252 */
253void *flex_array_get(struct flex_array *fa, int element_nr)
254{
255 int part_nr = fa_element_to_part_nr(fa, element_nr);
256 struct flex_array_part *part;
257
258 if (element_nr >= fa->total_nr_elements)
259 return NULL;
260 if (!fa->parts[part_nr])
261 return NULL;
262 if (elements_fit_in_base(fa))
263 part = (struct flex_array_part *)&fa->parts[0];
264 else
265 part = fa->parts[part_nr];
266 return &part->elements[index_inside_part(fa, element_nr)];
267}
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index a295e404e90..0d475d8167b 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -314,6 +314,7 @@ void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl,
314 miter->__sg = sgl; 314 miter->__sg = sgl;
315 miter->__nents = nents; 315 miter->__nents = nents;
316 miter->__offset = 0; 316 miter->__offset = 0;
317 WARN_ON(!(flags & (SG_MITER_TO_SG | SG_MITER_FROM_SG)));
317 miter->__flags = flags; 318 miter->__flags = flags;
318} 319}
319EXPORT_SYMBOL(sg_miter_start); 320EXPORT_SYMBOL(sg_miter_start);
@@ -394,6 +395,9 @@ void sg_miter_stop(struct sg_mapping_iter *miter)
394 if (miter->addr) { 395 if (miter->addr) {
395 miter->__offset += miter->consumed; 396 miter->__offset += miter->consumed;
396 397
398 if (miter->__flags & SG_MITER_TO_SG)
399 flush_kernel_dcache_page(miter->page);
400
397 if (miter->__flags & SG_MITER_ATOMIC) { 401 if (miter->__flags & SG_MITER_ATOMIC) {
398 WARN_ON(!irqs_disabled()); 402 WARN_ON(!irqs_disabled());
399 kunmap_atomic(miter->addr, KM_BIO_SRC_IRQ); 403 kunmap_atomic(miter->addr, KM_BIO_SRC_IRQ);
@@ -426,8 +430,14 @@ static size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents,
426 unsigned int offset = 0; 430 unsigned int offset = 0;
427 struct sg_mapping_iter miter; 431 struct sg_mapping_iter miter;
428 unsigned long flags; 432 unsigned long flags;
433 unsigned int sg_flags = SG_MITER_ATOMIC;
434
435 if (to_buffer)
436 sg_flags |= SG_MITER_FROM_SG;
437 else
438 sg_flags |= SG_MITER_TO_SG;
429 439
430 sg_miter_start(&miter, sgl, nents, SG_MITER_ATOMIC); 440 sg_miter_start(&miter, sgl, nents, sg_flags);
431 441
432 local_irq_save(flags); 442 local_irq_save(flags);
433 443
@@ -438,10 +448,8 @@ static size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents,
438 448
439 if (to_buffer) 449 if (to_buffer)
440 memcpy(buf + offset, miter.addr, len); 450 memcpy(buf + offset, miter.addr, len);
441 else { 451 else
442 memcpy(miter.addr, buf + offset, len); 452 memcpy(miter.addr, buf + offset, len);
443 flush_kernel_dcache_page(miter.page);
444 }
445 453
446 offset += len; 454 offset += len;
447 } 455 }
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index d0351e31f47..cafdcee154e 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -2370,7 +2370,7 @@ void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed)
2370 long chg = region_truncate(&inode->i_mapping->private_list, offset); 2370 long chg = region_truncate(&inode->i_mapping->private_list, offset);
2371 2371
2372 spin_lock(&inode->i_lock); 2372 spin_lock(&inode->i_lock);
2373 inode->i_blocks -= blocks_per_huge_page(h); 2373 inode->i_blocks -= (blocks_per_huge_page(h) * freed);
2374 spin_unlock(&inode->i_lock); 2374 spin_unlock(&inode->i_lock);
2375 2375
2376 hugetlb_put_quota(inode->i_mapping, (chg - freed)); 2376 hugetlb_put_quota(inode->i_mapping, (chg - freed));
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 5aabd41ffb8..487267310a8 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1217,7 +1217,6 @@ static void *kmemleak_seq_start(struct seq_file *seq, loff_t *pos)
1217 } 1217 }
1218 object = NULL; 1218 object = NULL;
1219out: 1219out:
1220 rcu_read_unlock();
1221 return object; 1220 return object;
1222} 1221}
1223 1222
@@ -1233,13 +1232,11 @@ static void *kmemleak_seq_next(struct seq_file *seq, void *v, loff_t *pos)
1233 1232
1234 ++(*pos); 1233 ++(*pos);
1235 1234
1236 rcu_read_lock();
1237 list_for_each_continue_rcu(n, &object_list) { 1235 list_for_each_continue_rcu(n, &object_list) {
1238 next_obj = list_entry(n, struct kmemleak_object, object_list); 1236 next_obj = list_entry(n, struct kmemleak_object, object_list);
1239 if (get_object(next_obj)) 1237 if (get_object(next_obj))
1240 break; 1238 break;
1241 } 1239 }
1242 rcu_read_unlock();
1243 1240
1244 put_object(prev_obj); 1241 put_object(prev_obj);
1245 return next_obj; 1242 return next_obj;
@@ -1255,6 +1252,7 @@ static void kmemleak_seq_stop(struct seq_file *seq, void *v)
1255 * kmemleak_seq_start may return ERR_PTR if the scan_mutex 1252 * kmemleak_seq_start may return ERR_PTR if the scan_mutex
1256 * waiting was interrupted, so only release it if !IS_ERR. 1253 * waiting was interrupted, so only release it if !IS_ERR.
1257 */ 1254 */
1255 rcu_read_unlock();
1258 mutex_unlock(&scan_mutex); 1256 mutex_unlock(&scan_mutex);
1259 if (v) 1257 if (v)
1260 put_object(v); 1258 put_object(v);
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index e717964cb5a..fd4529d86de 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1207,6 +1207,12 @@ static int mem_cgroup_move_account(struct page_cgroup *pc,
1207 ret = 0; 1207 ret = 0;
1208out: 1208out:
1209 unlock_page_cgroup(pc); 1209 unlock_page_cgroup(pc);
1210 /*
1211 * We charges against "to" which may not have any tasks. Then, "to"
1212 * can be under rmdir(). But in current implementation, caller of
1213 * this function is just force_empty() and it's garanteed that
1214 * "to" is never removed. So, we don't check rmdir status here.
1215 */
1210 return ret; 1216 return ret;
1211} 1217}
1212 1218
@@ -1428,6 +1434,7 @@ __mem_cgroup_commit_charge_swapin(struct page *page, struct mem_cgroup *ptr,
1428 return; 1434 return;
1429 if (!ptr) 1435 if (!ptr)
1430 return; 1436 return;
1437 cgroup_exclude_rmdir(&ptr->css);
1431 pc = lookup_page_cgroup(page); 1438 pc = lookup_page_cgroup(page);
1432 mem_cgroup_lru_del_before_commit_swapcache(page); 1439 mem_cgroup_lru_del_before_commit_swapcache(page);
1433 __mem_cgroup_commit_charge(ptr, pc, ctype); 1440 __mem_cgroup_commit_charge(ptr, pc, ctype);
@@ -1457,8 +1464,12 @@ __mem_cgroup_commit_charge_swapin(struct page *page, struct mem_cgroup *ptr,
1457 } 1464 }
1458 rcu_read_unlock(); 1465 rcu_read_unlock();
1459 } 1466 }
1460 /* add this page(page_cgroup) to the LRU we want. */ 1467 /*
1461 1468 * At swapin, we may charge account against cgroup which has no tasks.
1469 * So, rmdir()->pre_destroy() can be called while we do this charge.
1470 * In that case, we need to call pre_destroy() again. check it here.
1471 */
1472 cgroup_release_and_wakeup_rmdir(&ptr->css);
1462} 1473}
1463 1474
1464void mem_cgroup_commit_charge_swapin(struct page *page, struct mem_cgroup *ptr) 1475void mem_cgroup_commit_charge_swapin(struct page *page, struct mem_cgroup *ptr)
@@ -1664,7 +1675,7 @@ void mem_cgroup_end_migration(struct mem_cgroup *mem,
1664 1675
1665 if (!mem) 1676 if (!mem)
1666 return; 1677 return;
1667 1678 cgroup_exclude_rmdir(&mem->css);
1668 /* at migration success, oldpage->mapping is NULL. */ 1679 /* at migration success, oldpage->mapping is NULL. */
1669 if (oldpage->mapping) { 1680 if (oldpage->mapping) {
1670 target = oldpage; 1681 target = oldpage;
@@ -1704,6 +1715,12 @@ void mem_cgroup_end_migration(struct mem_cgroup *mem,
1704 */ 1715 */
1705 if (ctype == MEM_CGROUP_CHARGE_TYPE_MAPPED) 1716 if (ctype == MEM_CGROUP_CHARGE_TYPE_MAPPED)
1706 mem_cgroup_uncharge_page(target); 1717 mem_cgroup_uncharge_page(target);
1718 /*
1719 * At migration, we may charge account against cgroup which has no tasks
1720 * So, rmdir()->pre_destroy() can be called while we do this charge.
1721 * In that case, we need to call pre_destroy() again. check it here.
1722 */
1723 cgroup_release_and_wakeup_rmdir(&mem->css);
1707} 1724}
1708 1725
1709/* 1726/*
diff --git a/mm/memory.c b/mm/memory.c
index 65216194eb8..aede2ce3aba 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -135,11 +135,12 @@ void pmd_clear_bad(pmd_t *pmd)
135 * Note: this doesn't free the actual pages themselves. That 135 * Note: this doesn't free the actual pages themselves. That
136 * has been handled earlier when unmapping all the memory regions. 136 * has been handled earlier when unmapping all the memory regions.
137 */ 137 */
138static void free_pte_range(struct mmu_gather *tlb, pmd_t *pmd) 138static void free_pte_range(struct mmu_gather *tlb, pmd_t *pmd,
139 unsigned long addr)
139{ 140{
140 pgtable_t token = pmd_pgtable(*pmd); 141 pgtable_t token = pmd_pgtable(*pmd);
141 pmd_clear(pmd); 142 pmd_clear(pmd);
142 pte_free_tlb(tlb, token); 143 pte_free_tlb(tlb, token, addr);
143 tlb->mm->nr_ptes--; 144 tlb->mm->nr_ptes--;
144} 145}
145 146
@@ -157,7 +158,7 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
157 next = pmd_addr_end(addr, end); 158 next = pmd_addr_end(addr, end);
158 if (pmd_none_or_clear_bad(pmd)) 159 if (pmd_none_or_clear_bad(pmd))
159 continue; 160 continue;
160 free_pte_range(tlb, pmd); 161 free_pte_range(tlb, pmd, addr);
161 } while (pmd++, addr = next, addr != end); 162 } while (pmd++, addr = next, addr != end);
162 163
163 start &= PUD_MASK; 164 start &= PUD_MASK;
@@ -173,7 +174,7 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
173 174
174 pmd = pmd_offset(pud, start); 175 pmd = pmd_offset(pud, start);
175 pud_clear(pud); 176 pud_clear(pud);
176 pmd_free_tlb(tlb, pmd); 177 pmd_free_tlb(tlb, pmd, start);
177} 178}
178 179
179static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd, 180static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
@@ -206,7 +207,7 @@ static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
206 207
207 pud = pud_offset(pgd, start); 208 pud = pud_offset(pgd, start);
208 pgd_clear(pgd); 209 pgd_clear(pgd);
209 pud_free_tlb(tlb, pud); 210 pud_free_tlb(tlb, pud, start);
210} 211}
211 212
212/* 213/*
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index e08e2c4da63..7dd9d9f8069 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -191,25 +191,27 @@ static int mpol_new_bind(struct mempolicy *pol, const nodemask_t *nodes)
191 * Must be called holding task's alloc_lock to protect task's mems_allowed 191 * Must be called holding task's alloc_lock to protect task's mems_allowed
192 * and mempolicy. May also be called holding the mmap_semaphore for write. 192 * and mempolicy. May also be called holding the mmap_semaphore for write.
193 */ 193 */
194static int mpol_set_nodemask(struct mempolicy *pol, const nodemask_t *nodes) 194static int mpol_set_nodemask(struct mempolicy *pol,
195 const nodemask_t *nodes, struct nodemask_scratch *nsc)
195{ 196{
196 nodemask_t cpuset_context_nmask;
197 int ret; 197 int ret;
198 198
199 /* if mode is MPOL_DEFAULT, pol is NULL. This is right. */ 199 /* if mode is MPOL_DEFAULT, pol is NULL. This is right. */
200 if (pol == NULL) 200 if (pol == NULL)
201 return 0; 201 return 0;
202 /* Check N_HIGH_MEMORY */
203 nodes_and(nsc->mask1,
204 cpuset_current_mems_allowed, node_states[N_HIGH_MEMORY]);
202 205
203 VM_BUG_ON(!nodes); 206 VM_BUG_ON(!nodes);
204 if (pol->mode == MPOL_PREFERRED && nodes_empty(*nodes)) 207 if (pol->mode == MPOL_PREFERRED && nodes_empty(*nodes))
205 nodes = NULL; /* explicit local allocation */ 208 nodes = NULL; /* explicit local allocation */
206 else { 209 else {
207 if (pol->flags & MPOL_F_RELATIVE_NODES) 210 if (pol->flags & MPOL_F_RELATIVE_NODES)
208 mpol_relative_nodemask(&cpuset_context_nmask, nodes, 211 mpol_relative_nodemask(&nsc->mask2, nodes,&nsc->mask1);
209 &cpuset_current_mems_allowed);
210 else 212 else
211 nodes_and(cpuset_context_nmask, *nodes, 213 nodes_and(nsc->mask2, *nodes, nsc->mask1);
212 cpuset_current_mems_allowed); 214
213 if (mpol_store_user_nodemask(pol)) 215 if (mpol_store_user_nodemask(pol))
214 pol->w.user_nodemask = *nodes; 216 pol->w.user_nodemask = *nodes;
215 else 217 else
@@ -217,8 +219,10 @@ static int mpol_set_nodemask(struct mempolicy *pol, const nodemask_t *nodes)
217 cpuset_current_mems_allowed; 219 cpuset_current_mems_allowed;
218 } 220 }
219 221
220 ret = mpol_ops[pol->mode].create(pol, 222 if (nodes)
221 nodes ? &cpuset_context_nmask : NULL); 223 ret = mpol_ops[pol->mode].create(pol, &nsc->mask2);
224 else
225 ret = mpol_ops[pol->mode].create(pol, NULL);
222 return ret; 226 return ret;
223} 227}
224 228
@@ -620,12 +624,17 @@ static long do_set_mempolicy(unsigned short mode, unsigned short flags,
620{ 624{
621 struct mempolicy *new, *old; 625 struct mempolicy *new, *old;
622 struct mm_struct *mm = current->mm; 626 struct mm_struct *mm = current->mm;
627 NODEMASK_SCRATCH(scratch);
623 int ret; 628 int ret;
624 629
625 new = mpol_new(mode, flags, nodes); 630 if (!scratch)
626 if (IS_ERR(new)) 631 return -ENOMEM;
627 return PTR_ERR(new);
628 632
633 new = mpol_new(mode, flags, nodes);
634 if (IS_ERR(new)) {
635 ret = PTR_ERR(new);
636 goto out;
637 }
629 /* 638 /*
630 * prevent changing our mempolicy while show_numa_maps() 639 * prevent changing our mempolicy while show_numa_maps()
631 * is using it. 640 * is using it.
@@ -635,13 +644,13 @@ static long do_set_mempolicy(unsigned short mode, unsigned short flags,
635 if (mm) 644 if (mm)
636 down_write(&mm->mmap_sem); 645 down_write(&mm->mmap_sem);
637 task_lock(current); 646 task_lock(current);
638 ret = mpol_set_nodemask(new, nodes); 647 ret = mpol_set_nodemask(new, nodes, scratch);
639 if (ret) { 648 if (ret) {
640 task_unlock(current); 649 task_unlock(current);
641 if (mm) 650 if (mm)
642 up_write(&mm->mmap_sem); 651 up_write(&mm->mmap_sem);
643 mpol_put(new); 652 mpol_put(new);
644 return ret; 653 goto out;
645 } 654 }
646 old = current->mempolicy; 655 old = current->mempolicy;
647 current->mempolicy = new; 656 current->mempolicy = new;
@@ -654,7 +663,10 @@ static long do_set_mempolicy(unsigned short mode, unsigned short flags,
654 up_write(&mm->mmap_sem); 663 up_write(&mm->mmap_sem);
655 664
656 mpol_put(old); 665 mpol_put(old);
657 return 0; 666 ret = 0;
667out:
668 NODEMASK_SCRATCH_FREE(scratch);
669 return ret;
658} 670}
659 671
660/* 672/*
@@ -1014,12 +1026,20 @@ static long do_mbind(unsigned long start, unsigned long len,
1014 if (err) 1026 if (err)
1015 return err; 1027 return err;
1016 } 1028 }
1017 down_write(&mm->mmap_sem); 1029 {
1018 task_lock(current); 1030 NODEMASK_SCRATCH(scratch);
1019 err = mpol_set_nodemask(new, nmask); 1031 if (scratch) {
1020 task_unlock(current); 1032 down_write(&mm->mmap_sem);
1033 task_lock(current);
1034 err = mpol_set_nodemask(new, nmask, scratch);
1035 task_unlock(current);
1036 if (err)
1037 up_write(&mm->mmap_sem);
1038 } else
1039 err = -ENOMEM;
1040 NODEMASK_SCRATCH_FREE(scratch);
1041 }
1021 if (err) { 1042 if (err) {
1022 up_write(&mm->mmap_sem);
1023 mpol_put(new); 1043 mpol_put(new);
1024 return err; 1044 return err;
1025 } 1045 }
@@ -1891,6 +1911,7 @@ restart:
1891 * Install non-NULL @mpol in inode's shared policy rb-tree. 1911 * Install non-NULL @mpol in inode's shared policy rb-tree.
1892 * On entry, the current task has a reference on a non-NULL @mpol. 1912 * On entry, the current task has a reference on a non-NULL @mpol.
1893 * This must be released on exit. 1913 * This must be released on exit.
1914 * This is called at get_inode() calls and we can use GFP_KERNEL.
1894 */ 1915 */
1895void mpol_shared_policy_init(struct shared_policy *sp, struct mempolicy *mpol) 1916void mpol_shared_policy_init(struct shared_policy *sp, struct mempolicy *mpol)
1896{ 1917{
@@ -1902,19 +1923,24 @@ void mpol_shared_policy_init(struct shared_policy *sp, struct mempolicy *mpol)
1902 if (mpol) { 1923 if (mpol) {
1903 struct vm_area_struct pvma; 1924 struct vm_area_struct pvma;
1904 struct mempolicy *new; 1925 struct mempolicy *new;
1926 NODEMASK_SCRATCH(scratch);
1905 1927
1928 if (!scratch)
1929 return;
1906 /* contextualize the tmpfs mount point mempolicy */ 1930 /* contextualize the tmpfs mount point mempolicy */
1907 new = mpol_new(mpol->mode, mpol->flags, &mpol->w.user_nodemask); 1931 new = mpol_new(mpol->mode, mpol->flags, &mpol->w.user_nodemask);
1908 if (IS_ERR(new)) { 1932 if (IS_ERR(new)) {
1909 mpol_put(mpol); /* drop our ref on sb mpol */ 1933 mpol_put(mpol); /* drop our ref on sb mpol */
1934 NODEMASK_SCRATCH_FREE(scratch);
1910 return; /* no valid nodemask intersection */ 1935 return; /* no valid nodemask intersection */
1911 } 1936 }
1912 1937
1913 task_lock(current); 1938 task_lock(current);
1914 ret = mpol_set_nodemask(new, &mpol->w.user_nodemask); 1939 ret = mpol_set_nodemask(new, &mpol->w.user_nodemask, scratch);
1915 task_unlock(current); 1940 task_unlock(current);
1916 mpol_put(mpol); /* drop our ref on sb mpol */ 1941 mpol_put(mpol); /* drop our ref on sb mpol */
1917 if (ret) { 1942 if (ret) {
1943 NODEMASK_SCRATCH_FREE(scratch);
1918 mpol_put(new); 1944 mpol_put(new);
1919 return; 1945 return;
1920 } 1946 }
@@ -1924,6 +1950,7 @@ void mpol_shared_policy_init(struct shared_policy *sp, struct mempolicy *mpol)
1924 pvma.vm_end = TASK_SIZE; /* policy covers entire file */ 1950 pvma.vm_end = TASK_SIZE; /* policy covers entire file */
1925 mpol_set_shared_policy(sp, &pvma, new); /* adds ref */ 1951 mpol_set_shared_policy(sp, &pvma, new); /* adds ref */
1926 mpol_put(new); /* drop initial ref */ 1952 mpol_put(new); /* drop initial ref */
1953 NODEMASK_SCRATCH_FREE(scratch);
1927 } 1954 }
1928} 1955}
1929 1956
@@ -2140,13 +2167,18 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context)
2140 err = 1; 2167 err = 1;
2141 else { 2168 else {
2142 int ret; 2169 int ret;
2143 2170 NODEMASK_SCRATCH(scratch);
2144 task_lock(current); 2171 if (scratch) {
2145 ret = mpol_set_nodemask(new, &nodes); 2172 task_lock(current);
2146 task_unlock(current); 2173 ret = mpol_set_nodemask(new, &nodes, scratch);
2147 if (ret) 2174 task_unlock(current);
2175 } else
2176 ret = -ENOMEM;
2177 NODEMASK_SCRATCH_FREE(scratch);
2178 if (ret) {
2148 err = 1; 2179 err = 1;
2149 else if (no_context) { 2180 mpol_put(new);
2181 } else if (no_context) {
2150 /* save for contextualization */ 2182 /* save for contextualization */
2151 new->w.user_nodemask = nodes; 2183 new->w.user_nodemask = nodes;
2152 } 2184 }
diff --git a/mm/mempool.c b/mm/mempool.c
index a46eb1b4bb6..32e75d40050 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -303,14 +303,14 @@ EXPORT_SYMBOL(mempool_free_slab);
303 */ 303 */
304void *mempool_kmalloc(gfp_t gfp_mask, void *pool_data) 304void *mempool_kmalloc(gfp_t gfp_mask, void *pool_data)
305{ 305{
306 size_t size = (size_t)(long)pool_data; 306 size_t size = (size_t)pool_data;
307 return kmalloc(size, gfp_mask); 307 return kmalloc(size, gfp_mask);
308} 308}
309EXPORT_SYMBOL(mempool_kmalloc); 309EXPORT_SYMBOL(mempool_kmalloc);
310 310
311void *mempool_kzalloc(gfp_t gfp_mask, void *pool_data) 311void *mempool_kzalloc(gfp_t gfp_mask, void *pool_data)
312{ 312{
313 size_t size = (size_t) pool_data; 313 size_t size = (size_t)pool_data;
314 return kzalloc(size, gfp_mask); 314 return kzalloc(size, gfp_mask);
315} 315}
316EXPORT_SYMBOL(mempool_kzalloc); 316EXPORT_SYMBOL(mempool_kzalloc);
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index caa92689aac..d052abbe306 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -882,7 +882,7 @@ retry_reserve:
882 */ 882 */
883static int rmqueue_bulk(struct zone *zone, unsigned int order, 883static int rmqueue_bulk(struct zone *zone, unsigned int order,
884 unsigned long count, struct list_head *list, 884 unsigned long count, struct list_head *list,
885 int migratetype) 885 int migratetype, int cold)
886{ 886{
887 int i; 887 int i;
888 888
@@ -901,7 +901,10 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order,
901 * merge IO requests if the physical pages are ordered 901 * merge IO requests if the physical pages are ordered
902 * properly. 902 * properly.
903 */ 903 */
904 list_add(&page->lru, list); 904 if (likely(cold == 0))
905 list_add(&page->lru, list);
906 else
907 list_add_tail(&page->lru, list);
905 set_page_private(page, migratetype); 908 set_page_private(page, migratetype);
906 list = &page->lru; 909 list = &page->lru;
907 } 910 }
@@ -1119,7 +1122,8 @@ again:
1119 local_irq_save(flags); 1122 local_irq_save(flags);
1120 if (!pcp->count) { 1123 if (!pcp->count) {
1121 pcp->count = rmqueue_bulk(zone, 0, 1124 pcp->count = rmqueue_bulk(zone, 0,
1122 pcp->batch, &pcp->list, migratetype); 1125 pcp->batch, &pcp->list,
1126 migratetype, cold);
1123 if (unlikely(!pcp->count)) 1127 if (unlikely(!pcp->count))
1124 goto failed; 1128 goto failed;
1125 } 1129 }
@@ -1138,7 +1142,8 @@ again:
1138 /* Allocate more to the pcp list if necessary */ 1142 /* Allocate more to the pcp list if necessary */
1139 if (unlikely(&page->lru == &pcp->list)) { 1143 if (unlikely(&page->lru == &pcp->list)) {
1140 pcp->count += rmqueue_bulk(zone, 0, 1144 pcp->count += rmqueue_bulk(zone, 0,
1141 pcp->batch, &pcp->list, migratetype); 1145 pcp->batch, &pcp->list,
1146 migratetype, cold);
1142 page = list_entry(pcp->list.next, struct page, lru); 1147 page = list_entry(pcp->list.next, struct page, lru);
1143 } 1148 }
1144 1149
@@ -1740,8 +1745,10 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
1740 * be using allocators in order of preference for an area that is 1745 * be using allocators in order of preference for an area that is
1741 * too large. 1746 * too large.
1742 */ 1747 */
1743 if (WARN_ON_ONCE(order >= MAX_ORDER)) 1748 if (order >= MAX_ORDER) {
1749 WARN_ON_ONCE(!(gfp_mask & __GFP_NOWARN));
1744 return NULL; 1750 return NULL;
1751 }
1745 1752
1746 /* 1753 /*
1747 * GFP_THISNODE (meaning __GFP_THISNODE, __GFP_NORETRY and 1754 * GFP_THISNODE (meaning __GFP_THISNODE, __GFP_NORETRY and
@@ -1789,6 +1796,10 @@ rebalance:
1789 if (p->flags & PF_MEMALLOC) 1796 if (p->flags & PF_MEMALLOC)
1790 goto nopage; 1797 goto nopage;
1791 1798
1799 /* Avoid allocations with no watermarks from looping endlessly */
1800 if (test_thread_flag(TIF_MEMDIE) && !(gfp_mask & __GFP_NOFAIL))
1801 goto nopage;
1802
1792 /* Try direct reclaim and then allocating */ 1803 /* Try direct reclaim and then allocating */
1793 page = __alloc_pages_direct_reclaim(gfp_mask, order, 1804 page = __alloc_pages_direct_reclaim(gfp_mask, order,
1794 zonelist, high_zoneidx, 1805 zonelist, high_zoneidx,
diff --git a/mm/swapfile.c b/mm/swapfile.c
index d1ade1a48ee..8ffdc0d23c5 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -753,7 +753,7 @@ int swap_type_of(dev_t device, sector_t offset, struct block_device **bdev_p)
753 753
754 if (!bdev) { 754 if (!bdev) {
755 if (bdev_p) 755 if (bdev_p)
756 *bdev_p = bdget(sis->bdev->bd_dev); 756 *bdev_p = bdgrab(sis->bdev);
757 757
758 spin_unlock(&swap_lock); 758 spin_unlock(&swap_lock);
759 return i; 759 return i;
@@ -765,7 +765,7 @@ int swap_type_of(dev_t device, sector_t offset, struct block_device **bdev_p)
765 struct swap_extent, list); 765 struct swap_extent, list);
766 if (se->start_block == offset) { 766 if (se->start_block == offset) {
767 if (bdev_p) 767 if (bdev_p)
768 *bdev_p = bdget(sis->bdev->bd_dev); 768 *bdev_p = bdgrab(sis->bdev);
769 769
770 spin_unlock(&swap_lock); 770 spin_unlock(&swap_lock);
771 bdput(bdev); 771 bdput(bdev);
diff --git a/net/9p/client.c b/net/9p/client.c
index dd43a8289b0..787ccddb85e 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -117,9 +117,6 @@ static int parse_opts(char *opts, struct p9_client *clnt)
117 } 117 }
118 } 118 }
119 119
120 if (!clnt->trans_mod)
121 clnt->trans_mod = v9fs_get_default_trans();
122
123 kfree(options); 120 kfree(options);
124 return ret; 121 return ret;
125} 122}
@@ -689,6 +686,9 @@ struct p9_client *p9_client_create(const char *dev_name, char *options)
689 if (err < 0) 686 if (err < 0)
690 goto error; 687 goto error;
691 688
689 if (!clnt->trans_mod)
690 clnt->trans_mod = v9fs_get_default_trans();
691
692 if (clnt->trans_mod == NULL) { 692 if (clnt->trans_mod == NULL) {
693 err = -EPROTONOSUPPORT; 693 err = -EPROTONOSUPPORT;
694 P9_DPRINTK(P9_DEBUG_ERROR, 694 P9_DPRINTK(P9_DEBUG_ERROR,
@@ -1098,7 +1098,6 @@ p9_client_read(struct p9_fid *fid, char *data, char __user *udata, u64 offset,
1098 1098
1099 if (data) { 1099 if (data) {
1100 memmove(data, dataptr, count); 1100 memmove(data, dataptr, count);
1101 data += count;
1102 } 1101 }
1103 1102
1104 if (udata) { 1103 if (udata) {
@@ -1192,9 +1191,9 @@ struct p9_wstat *p9_client_stat(struct p9_fid *fid)
1192 1191
1193 err = p9pdu_readf(req->rc, clnt->dotu, "wS", &ignored, ret); 1192 err = p9pdu_readf(req->rc, clnt->dotu, "wS", &ignored, ret);
1194 if (err) { 1193 if (err) {
1195 ret = ERR_PTR(err);
1196 p9pdu_dump(1, req->rc); 1194 p9pdu_dump(1, req->rc);
1197 goto free_and_error; 1195 p9_free_req(clnt, req);
1196 goto error;
1198 } 1197 }
1199 1198
1200 P9_DPRINTK(P9_DEBUG_9P, 1199 P9_DPRINTK(P9_DEBUG_9P,
@@ -1211,8 +1210,6 @@ struct p9_wstat *p9_client_stat(struct p9_fid *fid)
1211 p9_free_req(clnt, req); 1210 p9_free_req(clnt, req);
1212 return ret; 1211 return ret;
1213 1212
1214free_and_error:
1215 p9_free_req(clnt, req);
1216error: 1213error:
1217 kfree(ret); 1214 kfree(ret);
1218 return ERR_PTR(err); 1215 return ERR_PTR(err);
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index e50566ebf9f..94b3388c188 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -2080,28 +2080,41 @@ static CLASS_ATTR(rfcomm_dlc, S_IRUGO, rfcomm_dlc_sysfs_show, NULL);
2080/* ---- Initialization ---- */ 2080/* ---- Initialization ---- */
2081static int __init rfcomm_init(void) 2081static int __init rfcomm_init(void)
2082{ 2082{
2083 int ret;
2084
2083 l2cap_load(); 2085 l2cap_load();
2084 2086
2085 hci_register_cb(&rfcomm_cb); 2087 hci_register_cb(&rfcomm_cb);
2086 2088
2087 rfcomm_thread = kthread_run(rfcomm_run, NULL, "krfcommd"); 2089 rfcomm_thread = kthread_run(rfcomm_run, NULL, "krfcommd");
2088 if (IS_ERR(rfcomm_thread)) { 2090 if (IS_ERR(rfcomm_thread)) {
2089 hci_unregister_cb(&rfcomm_cb); 2091 ret = PTR_ERR(rfcomm_thread);
2090 return PTR_ERR(rfcomm_thread); 2092 goto out_thread;
2091 } 2093 }
2092 2094
2093 if (class_create_file(bt_class, &class_attr_rfcomm_dlc) < 0) 2095 if (class_create_file(bt_class, &class_attr_rfcomm_dlc) < 0)
2094 BT_ERR("Failed to create RFCOMM info file"); 2096 BT_ERR("Failed to create RFCOMM info file");
2095 2097
2096 rfcomm_init_sockets(); 2098 ret = rfcomm_init_ttys();
2099 if (ret)
2100 goto out_tty;
2097 2101
2098#ifdef CONFIG_BT_RFCOMM_TTY 2102 ret = rfcomm_init_sockets();
2099 rfcomm_init_ttys(); 2103 if (ret)
2100#endif 2104 goto out_sock;
2101 2105
2102 BT_INFO("RFCOMM ver %s", VERSION); 2106 BT_INFO("RFCOMM ver %s", VERSION);
2103 2107
2104 return 0; 2108 return 0;
2109
2110out_sock:
2111 rfcomm_cleanup_ttys();
2112out_tty:
2113 kthread_stop(rfcomm_thread);
2114out_thread:
2115 hci_unregister_cb(&rfcomm_cb);
2116
2117 return ret;
2105} 2118}
2106 2119
2107static void __exit rfcomm_exit(void) 2120static void __exit rfcomm_exit(void)
@@ -2112,9 +2125,7 @@ static void __exit rfcomm_exit(void)
2112 2125
2113 kthread_stop(rfcomm_thread); 2126 kthread_stop(rfcomm_thread);
2114 2127
2115#ifdef CONFIG_BT_RFCOMM_TTY
2116 rfcomm_cleanup_ttys(); 2128 rfcomm_cleanup_ttys();
2117#endif
2118 2129
2119 rfcomm_cleanup_sockets(); 2130 rfcomm_cleanup_sockets();
2120} 2131}
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
index 7f482784e9f..0b85e811685 100644
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -1132,7 +1132,7 @@ error:
1132 return err; 1132 return err;
1133} 1133}
1134 1134
1135void __exit rfcomm_cleanup_sockets(void) 1135void rfcomm_cleanup_sockets(void)
1136{ 1136{
1137 class_remove_file(bt_class, &class_attr_rfcomm); 1137 class_remove_file(bt_class, &class_attr_rfcomm);
1138 1138
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 8a96672e2c5..eb404dc3ed6 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -424,7 +424,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
424err2: 424err2:
425 br_fdb_delete_by_port(br, p, 1); 425 br_fdb_delete_by_port(br, p, 1);
426err1: 426err1:
427 kobject_del(&p->kobj); 427 kobject_put(&p->kobj);
428err0: 428err0:
429 dev_set_promiscuity(dev, -1); 429 dev_set_promiscuity(dev, -1);
430put_back: 430put_back:
diff --git a/net/can/bcm.c b/net/can/bcm.c
index 95d7f32643a..72720c71035 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -75,6 +75,7 @@ static __initdata const char banner[] = KERN_INFO
75MODULE_DESCRIPTION("PF_CAN broadcast manager protocol"); 75MODULE_DESCRIPTION("PF_CAN broadcast manager protocol");
76MODULE_LICENSE("Dual BSD/GPL"); 76MODULE_LICENSE("Dual BSD/GPL");
77MODULE_AUTHOR("Oliver Hartkopp <oliver.hartkopp@volkswagen.de>"); 77MODULE_AUTHOR("Oliver Hartkopp <oliver.hartkopp@volkswagen.de>");
78MODULE_ALIAS("can-proto-2");
78 79
79/* easy access to can_frame payload */ 80/* easy access to can_frame payload */
80static inline u64 GET_U64(const struct can_frame *cp) 81static inline u64 GET_U64(const struct can_frame *cp)
@@ -1469,6 +1470,9 @@ static int bcm_release(struct socket *sock)
1469 bo->ifindex = 0; 1470 bo->ifindex = 0;
1470 } 1471 }
1471 1472
1473 sock_orphan(sk);
1474 sock->sk = NULL;
1475
1472 release_sock(sk); 1476 release_sock(sk);
1473 sock_put(sk); 1477 sock_put(sk);
1474 1478
diff --git a/net/can/raw.c b/net/can/raw.c
index 6aa154e806a..f4cc44548bd 100644
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -62,6 +62,7 @@ static __initdata const char banner[] =
62MODULE_DESCRIPTION("PF_CAN raw protocol"); 62MODULE_DESCRIPTION("PF_CAN raw protocol");
63MODULE_LICENSE("Dual BSD/GPL"); 63MODULE_LICENSE("Dual BSD/GPL");
64MODULE_AUTHOR("Urs Thuermann <urs.thuermann@volkswagen.de>"); 64MODULE_AUTHOR("Urs Thuermann <urs.thuermann@volkswagen.de>");
65MODULE_ALIAS("can-proto-1");
65 66
66#define MASK_ALL 0 67#define MASK_ALL 0
67 68
@@ -306,6 +307,9 @@ static int raw_release(struct socket *sock)
306 ro->bound = 0; 307 ro->bound = 0;
307 ro->count = 0; 308 ro->count = 0;
308 309
310 sock_orphan(sk);
311 sock->sk = NULL;
312
309 release_sock(sk); 313 release_sock(sk);
310 sock_put(sk); 314 sock_put(sk);
311 315
diff --git a/net/core/dev.c b/net/core/dev.c
index 70c27e0c7c3..6a94475aee8 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3865,10 +3865,12 @@ int dev_unicast_delete(struct net_device *dev, void *addr)
3865 3865
3866 ASSERT_RTNL(); 3866 ASSERT_RTNL();
3867 3867
3868 netif_addr_lock_bh(dev);
3868 err = __hw_addr_del(&dev->uc, addr, dev->addr_len, 3869 err = __hw_addr_del(&dev->uc, addr, dev->addr_len,
3869 NETDEV_HW_ADDR_T_UNICAST); 3870 NETDEV_HW_ADDR_T_UNICAST);
3870 if (!err) 3871 if (!err)
3871 __dev_set_rx_mode(dev); 3872 __dev_set_rx_mode(dev);
3873 netif_addr_unlock_bh(dev);
3872 return err; 3874 return err;
3873} 3875}
3874EXPORT_SYMBOL(dev_unicast_delete); 3876EXPORT_SYMBOL(dev_unicast_delete);
@@ -3889,10 +3891,12 @@ int dev_unicast_add(struct net_device *dev, void *addr)
3889 3891
3890 ASSERT_RTNL(); 3892 ASSERT_RTNL();
3891 3893
3894 netif_addr_lock_bh(dev);
3892 err = __hw_addr_add(&dev->uc, addr, dev->addr_len, 3895 err = __hw_addr_add(&dev->uc, addr, dev->addr_len,
3893 NETDEV_HW_ADDR_T_UNICAST); 3896 NETDEV_HW_ADDR_T_UNICAST);
3894 if (!err) 3897 if (!err)
3895 __dev_set_rx_mode(dev); 3898 __dev_set_rx_mode(dev);
3899 netif_addr_unlock_bh(dev);
3896 return err; 3900 return err;
3897} 3901}
3898EXPORT_SYMBOL(dev_unicast_add); 3902EXPORT_SYMBOL(dev_unicast_add);
@@ -3949,7 +3953,8 @@ void __dev_addr_unsync(struct dev_addr_list **to, int *to_count,
3949 * @from: source device 3953 * @from: source device
3950 * 3954 *
3951 * Add newly added addresses to the destination device and release 3955 * Add newly added addresses to the destination device and release
3952 * addresses that have no users left. 3956 * addresses that have no users left. The source device must be
3957 * locked by netif_tx_lock_bh.
3953 * 3958 *
3954 * This function is intended to be called from the dev->set_rx_mode 3959 * This function is intended to be called from the dev->set_rx_mode
3955 * function of layered software devices. 3960 * function of layered software devices.
@@ -3958,14 +3963,14 @@ int dev_unicast_sync(struct net_device *to, struct net_device *from)
3958{ 3963{
3959 int err = 0; 3964 int err = 0;
3960 3965
3961 ASSERT_RTNL();
3962
3963 if (to->addr_len != from->addr_len) 3966 if (to->addr_len != from->addr_len)
3964 return -EINVAL; 3967 return -EINVAL;
3965 3968
3969 netif_addr_lock_bh(to);
3966 err = __hw_addr_sync(&to->uc, &from->uc, to->addr_len); 3970 err = __hw_addr_sync(&to->uc, &from->uc, to->addr_len);
3967 if (!err) 3971 if (!err)
3968 __dev_set_rx_mode(to); 3972 __dev_set_rx_mode(to);
3973 netif_addr_unlock_bh(to);
3969 return err; 3974 return err;
3970} 3975}
3971EXPORT_SYMBOL(dev_unicast_sync); 3976EXPORT_SYMBOL(dev_unicast_sync);
@@ -3981,27 +3986,27 @@ EXPORT_SYMBOL(dev_unicast_sync);
3981 */ 3986 */
3982void dev_unicast_unsync(struct net_device *to, struct net_device *from) 3987void dev_unicast_unsync(struct net_device *to, struct net_device *from)
3983{ 3988{
3984 ASSERT_RTNL();
3985
3986 if (to->addr_len != from->addr_len) 3989 if (to->addr_len != from->addr_len)
3987 return; 3990 return;
3988 3991
3992 netif_addr_lock_bh(from);
3993 netif_addr_lock(to);
3989 __hw_addr_unsync(&to->uc, &from->uc, to->addr_len); 3994 __hw_addr_unsync(&to->uc, &from->uc, to->addr_len);
3990 __dev_set_rx_mode(to); 3995 __dev_set_rx_mode(to);
3996 netif_addr_unlock(to);
3997 netif_addr_unlock_bh(from);
3991} 3998}
3992EXPORT_SYMBOL(dev_unicast_unsync); 3999EXPORT_SYMBOL(dev_unicast_unsync);
3993 4000
3994static void dev_unicast_flush(struct net_device *dev) 4001static void dev_unicast_flush(struct net_device *dev)
3995{ 4002{
3996 /* rtnl_mutex must be held here */ 4003 netif_addr_lock_bh(dev);
3997
3998 __hw_addr_flush(&dev->uc); 4004 __hw_addr_flush(&dev->uc);
4005 netif_addr_unlock_bh(dev);
3999} 4006}
4000 4007
4001static void dev_unicast_init(struct net_device *dev) 4008static void dev_unicast_init(struct net_device *dev)
4002{ 4009{
4003 /* rtnl_mutex must be held here */
4004
4005 __hw_addr_init(&dev->uc); 4010 __hw_addr_init(&dev->uc);
4006} 4011}
4007 4012
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index b7292a2719d..197283072cc 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -488,7 +488,7 @@ int net_assign_generic(struct net *net, int id, void *data)
488 */ 488 */
489 489
490 ng->len = id; 490 ng->len = id;
491 memcpy(&ng->ptr, &old_ng->ptr, old_ng->len); 491 memcpy(&ng->ptr, &old_ng->ptr, old_ng->len * sizeof(void*));
492 492
493 rcu_assign_pointer(net->gen, ng); 493 rcu_assign_pointer(net->gen, ng);
494 call_rcu(&old_ng->rcu, net_generic_release); 494 call_rcu(&old_ng->rcu, net_generic_release);
diff --git a/net/core/sock.c b/net/core/sock.c
index ba5d2116aea..bbb25be7ddf 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -631,7 +631,7 @@ set_rcvbuf:
631 631
632 case SO_TIMESTAMPING: 632 case SO_TIMESTAMPING:
633 if (val & ~SOF_TIMESTAMPING_MASK) { 633 if (val & ~SOF_TIMESTAMPING_MASK) {
634 ret = EINVAL; 634 ret = -EINVAL;
635 break; 635 break;
636 } 636 }
637 sock_valbool_flag(sk, SOCK_TIMESTAMPING_TX_HARDWARE, 637 sock_valbool_flag(sk, SOCK_TIMESTAMPING_TX_HARDWARE,
@@ -919,13 +919,19 @@ static inline void sock_lock_init(struct sock *sk)
919 af_family_keys + sk->sk_family); 919 af_family_keys + sk->sk_family);
920} 920}
921 921
922/*
923 * Copy all fields from osk to nsk but nsk->sk_refcnt must not change yet,
924 * even temporarly, because of RCU lookups. sk_node should also be left as is.
925 */
922static void sock_copy(struct sock *nsk, const struct sock *osk) 926static void sock_copy(struct sock *nsk, const struct sock *osk)
923{ 927{
924#ifdef CONFIG_SECURITY_NETWORK 928#ifdef CONFIG_SECURITY_NETWORK
925 void *sptr = nsk->sk_security; 929 void *sptr = nsk->sk_security;
926#endif 930#endif
927 931 BUILD_BUG_ON(offsetof(struct sock, sk_copy_start) !=
928 memcpy(nsk, osk, osk->sk_prot->obj_size); 932 sizeof(osk->sk_node) + sizeof(osk->sk_refcnt));
933 memcpy(&nsk->sk_copy_start, &osk->sk_copy_start,
934 osk->sk_prot->obj_size - offsetof(struct sock, sk_copy_start));
929#ifdef CONFIG_SECURITY_NETWORK 935#ifdef CONFIG_SECURITY_NETWORK
930 nsk->sk_security = sptr; 936 nsk->sk_security = sptr;
931 security_sk_clone(osk, nsk); 937 security_sk_clone(osk, nsk);
@@ -1140,6 +1146,11 @@ struct sock *sk_clone(const struct sock *sk, const gfp_t priority)
1140 1146
1141 newsk->sk_err = 0; 1147 newsk->sk_err = 0;
1142 newsk->sk_priority = 0; 1148 newsk->sk_priority = 0;
1149 /*
1150 * Before updating sk_refcnt, we must commit prior changes to memory
1151 * (Documentation/RCU/rculist_nulls.txt for details)
1152 */
1153 smp_wmb();
1143 atomic_set(&newsk->sk_refcnt, 2); 1154 atomic_set(&newsk->sk_refcnt, 2);
1144 1155
1145 /* 1156 /*
@@ -1855,6 +1866,11 @@ void sock_init_data(struct socket *sock, struct sock *sk)
1855 1866
1856 sk->sk_stamp = ktime_set(-1L, 0); 1867 sk->sk_stamp = ktime_set(-1L, 0);
1857 1868
1869 /*
1870 * Before updating sk_refcnt, we must commit prior changes to memory
1871 * (Documentation/RCU/rculist_nulls.txt for details)
1872 */
1873 smp_wmb();
1858 atomic_set(&sk->sk_refcnt, 1); 1874 atomic_set(&sk->sk_refcnt, 1);
1859 atomic_set(&sk->sk_wmem_alloc, 1); 1875 atomic_set(&sk->sk_wmem_alloc, 1);
1860 atomic_set(&sk->sk_drops, 0); 1876 atomic_set(&sk->sk_drops, 0);
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 94ca8eaace7..3281013ce03 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -1066,7 +1066,7 @@ static int __init dccp_init(void)
1066 (dccp_hashinfo.ehash_size - 1)) 1066 (dccp_hashinfo.ehash_size - 1))
1067 dccp_hashinfo.ehash_size--; 1067 dccp_hashinfo.ehash_size--;
1068 dccp_hashinfo.ehash = (struct inet_ehash_bucket *) 1068 dccp_hashinfo.ehash = (struct inet_ehash_bucket *)
1069 __get_free_pages(GFP_ATOMIC, ehash_order); 1069 __get_free_pages(GFP_ATOMIC|__GFP_NOWARN, ehash_order);
1070 } while (!dccp_hashinfo.ehash && --ehash_order > 0); 1070 } while (!dccp_hashinfo.ehash && --ehash_order > 0);
1071 1071
1072 if (!dccp_hashinfo.ehash) { 1072 if (!dccp_hashinfo.ehash) {
@@ -1091,7 +1091,7 @@ static int __init dccp_init(void)
1091 bhash_order > 0) 1091 bhash_order > 0)
1092 continue; 1092 continue;
1093 dccp_hashinfo.bhash = (struct inet_bind_hashbucket *) 1093 dccp_hashinfo.bhash = (struct inet_bind_hashbucket *)
1094 __get_free_pages(GFP_ATOMIC, bhash_order); 1094 __get_free_pages(GFP_ATOMIC|__GFP_NOWARN, bhash_order);
1095 } while (!dccp_hashinfo.bhash && --bhash_order >= 0); 1095 } while (!dccp_hashinfo.bhash && --bhash_order >= 0);
1096 1096
1097 if (!dccp_hashinfo.bhash) { 1097 if (!dccp_hashinfo.bhash) {
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index c29d75d8f1b..090e9991ac2 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -1304,7 +1304,9 @@ static void arp_format_neigh_entry(struct seq_file *seq,
1304 hbuffer[k++] = hex_asc_lo(n->ha[j]); 1304 hbuffer[k++] = hex_asc_lo(n->ha[j]);
1305 hbuffer[k++] = ':'; 1305 hbuffer[k++] = ':';
1306 } 1306 }
1307 hbuffer[--k] = 0; 1307 if (k != 0)
1308 --k;
1309 hbuffer[k] = 0;
1308#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) 1310#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
1309 } 1311 }
1310#endif 1312#endif
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 5a1ca2698c8..6d88219c5e2 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1160,6 +1160,7 @@ struct request_sock_ops tcp_request_sock_ops __read_mostly = {
1160#ifdef CONFIG_TCP_MD5SIG 1160#ifdef CONFIG_TCP_MD5SIG
1161static struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = { 1161static struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = {
1162 .md5_lookup = tcp_v4_reqsk_md5_lookup, 1162 .md5_lookup = tcp_v4_reqsk_md5_lookup,
1163 .calc_md5_hash = tcp_v4_md5_hash_skb,
1163}; 1164};
1164#endif 1165#endif
1165 1166
@@ -1373,7 +1374,7 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
1373 */ 1374 */
1374 char *newkey = kmemdup(key->key, key->keylen, GFP_ATOMIC); 1375 char *newkey = kmemdup(key->key, key->keylen, GFP_ATOMIC);
1375 if (newkey != NULL) 1376 if (newkey != NULL)
1376 tcp_v4_md5_do_add(newsk, inet_sk(sk)->daddr, 1377 tcp_v4_md5_do_add(newsk, newinet->daddr,
1377 newkey, key->keylen); 1378 newkey, key->keylen);
1378 newsk->sk_route_caps &= ~NETIF_F_GSO_MASK; 1379 newsk->sk_route_caps &= ~NETIF_F_GSO_MASK;
1379 } 1380 }
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 5bdf08d312d..bd62712848f 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2261,7 +2261,7 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
2261#ifdef CONFIG_TCP_MD5SIG 2261#ifdef CONFIG_TCP_MD5SIG
2262 /* Okay, we have all we need - do the md5 hash if needed */ 2262 /* Okay, we have all we need - do the md5 hash if needed */
2263 if (md5) { 2263 if (md5) {
2264 tp->af_specific->calc_md5_hash(md5_hash_location, 2264 tcp_rsk(req)->af_specific->calc_md5_hash(md5_hash_location,
2265 md5, NULL, req, skb); 2265 md5, NULL, req, skb);
2266 } 2266 }
2267#endif 2267#endif
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 58810c65b63..d849dd53b78 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -896,6 +896,7 @@ struct request_sock_ops tcp6_request_sock_ops __read_mostly = {
896#ifdef CONFIG_TCP_MD5SIG 896#ifdef CONFIG_TCP_MD5SIG
897static struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = { 897static struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = {
898 .md5_lookup = tcp_v6_reqsk_md5_lookup, 898 .md5_lookup = tcp_v6_reqsk_md5_lookup,
899 .calc_md5_hash = tcp_v6_md5_hash_skb,
899}; 900};
900#endif 901#endif
901 902
@@ -1441,7 +1442,7 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
1441 */ 1442 */
1442 char *newkey = kmemdup(key->key, key->keylen, GFP_ATOMIC); 1443 char *newkey = kmemdup(key->key, key->keylen, GFP_ATOMIC);
1443 if (newkey != NULL) 1444 if (newkey != NULL)
1444 tcp_v6_md5_do_add(newsk, &inet6_sk(sk)->daddr, 1445 tcp_v6_md5_do_add(newsk, &newnp->daddr,
1445 newkey, key->keylen); 1446 newkey, key->keylen);
1446 } 1447 }
1447#endif 1448#endif
diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index ecf4eb2717c..9cb79f95bf6 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -1453,6 +1453,7 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance)
1453 } 1453 }
1454 /* Dup */ 1454 /* Dup */
1455 memcpy(new, orig, sizeof(struct tsap_cb)); 1455 memcpy(new, orig, sizeof(struct tsap_cb));
1456 spin_lock_init(&new->lock);
1456 1457
1457 /* We don't need the old instance any more */ 1458 /* We don't need the old instance any more */
1458 spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags); 1459 spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags);
diff --git a/net/mac80211/Kconfig b/net/mac80211/Kconfig
index ba2643a43c7..7836ee92898 100644
--- a/net/mac80211/Kconfig
+++ b/net/mac80211/Kconfig
@@ -83,6 +83,7 @@ endmenu
83config MAC80211_MESH 83config MAC80211_MESH
84 bool "Enable mac80211 mesh networking (pre-802.11s) support" 84 bool "Enable mac80211 mesh networking (pre-802.11s) support"
85 depends on MAC80211 && EXPERIMENTAL 85 depends on MAC80211 && EXPERIMENTAL
86 depends on BROKEN
86 ---help--- 87 ---help---
87 This options enables support of Draft 802.11s mesh networking. 88 This options enables support of Draft 802.11s mesh networking.
88 The implementation is based on Draft 1.08 of the Mesh Networking 89 The implementation is based on Draft 1.08 of the Mesh Networking
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index 3c72557df45..479597e8858 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -175,6 +175,8 @@ int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata)
175 int err = 0; 175 int err = 0;
176 u32 hash_idx; 176 u32 hash_idx;
177 177
178 might_sleep();
179
178 if (memcmp(dst, sdata->dev->dev_addr, ETH_ALEN) == 0) 180 if (memcmp(dst, sdata->dev->dev_addr, ETH_ALEN) == 0)
179 /* never add ourselves as neighbours */ 181 /* never add ourselves as neighbours */
180 return -ENOTSUPP; 182 return -ENOTSUPP;
@@ -265,6 +267,7 @@ int mpp_path_add(u8 *dst, u8 *mpp, struct ieee80211_sub_if_data *sdata)
265 int err = 0; 267 int err = 0;
266 u32 hash_idx; 268 u32 hash_idx;
267 269
270 might_sleep();
268 271
269 if (memcmp(dst, sdata->dev->dev_addr, ETH_ALEN) == 0) 272 if (memcmp(dst, sdata->dev->dev_addr, ETH_ALEN) == 0)
270 /* never add ourselves as neighbours */ 273 /* never add ourselves as neighbours */
@@ -491,8 +494,10 @@ void mesh_path_tx_pending(struct mesh_path *mpath)
491 * @skb: frame to discard 494 * @skb: frame to discard
492 * @sdata: network subif the frame was to be sent through 495 * @sdata: network subif the frame was to be sent through
493 * 496 *
494 * If the frame was beign forwarded from another MP, a PERR frame will be sent 497 * If the frame was being forwarded from another MP, a PERR frame will be sent
495 * to the precursor. 498 * to the precursor. The precursor's address (i.e. the previous hop) was saved
499 * in addr1 of the frame-to-be-forwarded, and would only be overwritten once
500 * the destination is successfully resolved.
496 * 501 *
497 * Locking: the function must me called within a rcu_read_lock region 502 * Locking: the function must me called within a rcu_read_lock region
498 */ 503 */
@@ -507,7 +512,7 @@ void mesh_path_discard_frame(struct sk_buff *skb,
507 u8 *ra, *da; 512 u8 *ra, *da;
508 513
509 da = hdr->addr3; 514 da = hdr->addr3;
510 ra = hdr->addr2; 515 ra = hdr->addr1;
511 mpath = mesh_path_lookup(da, sdata); 516 mpath = mesh_path_lookup(da, sdata);
512 if (mpath) 517 if (mpath)
513 dsn = ++mpath->dsn; 518 dsn = ++mpath->dsn;
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index aca22b00b6a..07e7e41816b 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -721,7 +721,7 @@ void ieee80211_dynamic_ps_timer(unsigned long data)
721{ 721{
722 struct ieee80211_local *local = (void *) data; 722 struct ieee80211_local *local = (void *) data;
723 723
724 if (local->quiescing) 724 if (local->quiescing || local->suspended)
725 return; 725 return;
726 726
727 queue_work(local->hw.workqueue, &local->dynamic_ps_enable_work); 727 queue_work(local->hw.workqueue, &local->dynamic_ps_enable_work);
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index 7a549f9deb9..5e3d476972f 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -55,15 +55,6 @@ int __ieee80211_suspend(struct ieee80211_hw *hw)
55 55
56 rcu_read_unlock(); 56 rcu_read_unlock();
57 57
58 /* flush again, in case driver queued work */
59 flush_workqueue(local->hw.workqueue);
60
61 /* stop hardware - this must stop RX */
62 if (local->open_count) {
63 ieee80211_led_radio(local, false);
64 drv_stop(local);
65 }
66
67 /* remove STAs */ 58 /* remove STAs */
68 spin_lock_irqsave(&local->sta_lock, flags); 59 spin_lock_irqsave(&local->sta_lock, flags);
69 list_for_each_entry(sta, &local->sta_list, list) { 60 list_for_each_entry(sta, &local->sta_list, list) {
@@ -111,7 +102,22 @@ int __ieee80211_suspend(struct ieee80211_hw *hw)
111 drv_remove_interface(local, &conf); 102 drv_remove_interface(local, &conf);
112 } 103 }
113 104
105 /* stop hardware - this must stop RX */
106 if (local->open_count) {
107 ieee80211_led_radio(local, false);
108 drv_stop(local);
109 }
110
111 /*
112 * flush again, in case driver queued work -- it
113 * shouldn't be doing (or cancel everything in the
114 * stop callback) that but better safe than sorry.
115 */
116 flush_workqueue(local->hw.workqueue);
117
114 local->suspended = true; 118 local->suspended = true;
119 /* need suspended to be visible before quiescing is false */
120 barrier();
115 local->quiescing = false; 121 local->quiescing = false;
116 122
117 return 0; 123 return 0;
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index de5bba7f910..0936fc24942 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2453,6 +2453,18 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb,
2453 return; 2453 return;
2454 } 2454 }
2455 2455
2456 /*
2457 * If we're suspending, it is possible although not too likely
2458 * that we'd be receiving frames after having already partially
2459 * quiesced the stack. We can't process such frames then since
2460 * that might, for example, cause stations to be added or other
2461 * driver callbacks be invoked.
2462 */
2463 if (unlikely(local->quiescing || local->suspended)) {
2464 kfree_skb(skb);
2465 return;
2466 }
2467
2456 if (status->flag & RX_FLAG_HT) { 2468 if (status->flag & RX_FLAG_HT) {
2457 /* rate_idx is MCS index */ 2469 /* rate_idx is MCS index */
2458 if (WARN_ON(status->rate_idx < 0 || 2470 if (WARN_ON(status->rate_idx < 0 ||
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index d238a8939a0..3a8922cd103 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1455,7 +1455,7 @@ int ieee80211_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
1455 monitor_iface = UNKNOWN_ADDRESS; 1455 monitor_iface = UNKNOWN_ADDRESS;
1456 1456
1457 len_rthdr = ieee80211_get_radiotap_len(skb->data); 1457 len_rthdr = ieee80211_get_radiotap_len(skb->data);
1458 hdr = (struct ieee80211_hdr *)skb->data + len_rthdr; 1458 hdr = (struct ieee80211_hdr *)(skb->data + len_rthdr);
1459 hdrlen = ieee80211_hdrlen(hdr->frame_control); 1459 hdrlen = ieee80211_hdrlen(hdr->frame_control);
1460 1460
1461 /* check the header is complete in the frame */ 1461 /* check the header is complete in the frame */
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 7508f11c5b3..b5869b9574b 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -561,23 +561,38 @@ struct nf_conn *nf_conntrack_alloc(struct net *net,
561 } 561 }
562 } 562 }
563 563
564 ct = kmem_cache_zalloc(nf_conntrack_cachep, gfp); 564 /*
565 * Do not use kmem_cache_zalloc(), as this cache uses
566 * SLAB_DESTROY_BY_RCU.
567 */
568 ct = kmem_cache_alloc(nf_conntrack_cachep, gfp);
565 if (ct == NULL) { 569 if (ct == NULL) {
566 pr_debug("nf_conntrack_alloc: Can't alloc conntrack.\n"); 570 pr_debug("nf_conntrack_alloc: Can't alloc conntrack.\n");
567 atomic_dec(&net->ct.count); 571 atomic_dec(&net->ct.count);
568 return ERR_PTR(-ENOMEM); 572 return ERR_PTR(-ENOMEM);
569 } 573 }
570 574 /*
575 * Let ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode.next
576 * and ct->tuplehash[IP_CT_DIR_REPLY].hnnode.next unchanged.
577 */
578 memset(&ct->tuplehash[IP_CT_DIR_MAX], 0,
579 sizeof(*ct) - offsetof(struct nf_conn, tuplehash[IP_CT_DIR_MAX]));
571 spin_lock_init(&ct->lock); 580 spin_lock_init(&ct->lock);
572 atomic_set(&ct->ct_general.use, 1);
573 ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple = *orig; 581 ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple = *orig;
582 ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode.pprev = NULL;
574 ct->tuplehash[IP_CT_DIR_REPLY].tuple = *repl; 583 ct->tuplehash[IP_CT_DIR_REPLY].tuple = *repl;
584 ct->tuplehash[IP_CT_DIR_REPLY].hnnode.pprev = NULL;
575 /* Don't set timer yet: wait for confirmation */ 585 /* Don't set timer yet: wait for confirmation */
576 setup_timer(&ct->timeout, death_by_timeout, (unsigned long)ct); 586 setup_timer(&ct->timeout, death_by_timeout, (unsigned long)ct);
577#ifdef CONFIG_NET_NS 587#ifdef CONFIG_NET_NS
578 ct->ct_net = net; 588 ct->ct_net = net;
579#endif 589#endif
580 590
591 /*
592 * changes to lookup keys must be done before setting refcnt to 1
593 */
594 smp_wmb();
595 atomic_set(&ct->ct_general.use, 1);
581 return ct; 596 return ct;
582} 597}
583EXPORT_SYMBOL_GPL(nf_conntrack_alloc); 598EXPORT_SYMBOL_GPL(nf_conntrack_alloc);
diff --git a/net/netfilter/xt_osf.c b/net/netfilter/xt_osf.c
index 863e40977a4..0f482e2440b 100644
--- a/net/netfilter/xt_osf.c
+++ b/net/netfilter/xt_osf.c
@@ -330,7 +330,8 @@ static bool xt_osf_match_packet(const struct sk_buff *skb,
330 fcount++; 330 fcount++;
331 331
332 if (info->flags & XT_OSF_LOG) 332 if (info->flags & XT_OSF_LOG)
333 nf_log_packet(p->hooknum, 0, skb, p->in, p->out, NULL, 333 nf_log_packet(p->family, p->hooknum, skb,
334 p->in, p->out, NULL,
334 "%s [%s:%s] : %pi4:%d -> %pi4:%d hops=%d\n", 335 "%s [%s:%s] : %pi4:%d -> %pi4:%d hops=%d\n",
335 f->genre, f->version, f->subtype, 336 f->genre, f->version, f->subtype,
336 &ip->saddr, ntohs(tcp->source), 337 &ip->saddr, ntohs(tcp->source),
@@ -345,7 +346,7 @@ static bool xt_osf_match_packet(const struct sk_buff *skb,
345 rcu_read_unlock(); 346 rcu_read_unlock();
346 347
347 if (!fcount && (info->flags & XT_OSF_LOG)) 348 if (!fcount && (info->flags & XT_OSF_LOG))
348 nf_log_packet(p->hooknum, 0, skb, p->in, p->out, NULL, 349 nf_log_packet(p->family, p->hooknum, skb, p->in, p->out, NULL,
349 "Remote OS is not known: %pi4:%u -> %pi4:%u\n", 350 "Remote OS is not known: %pi4:%u -> %pi4:%u\n",
350 &ip->saddr, ntohs(tcp->source), 351 &ip->saddr, ntohs(tcp->source),
351 &ip->daddr, ntohs(tcp->dest)); 352 &ip->daddr, ntohs(tcp->dest));
diff --git a/net/netlabel/netlabel_kapi.c b/net/netlabel/netlabel_kapi.c
index b0e582f2d37..16e6c4378ff 100644
--- a/net/netlabel/netlabel_kapi.c
+++ b/net/netlabel/netlabel_kapi.c
@@ -151,7 +151,7 @@ int netlbl_cfg_unlbl_map_add(const char *domain,
151 addr6 = addr; 151 addr6 = addr;
152 mask6 = mask; 152 mask6 = mask;
153 map6 = kzalloc(sizeof(*map6), GFP_ATOMIC); 153 map6 = kzalloc(sizeof(*map6), GFP_ATOMIC);
154 if (map4 == NULL) 154 if (map6 == NULL)
155 goto cfg_unlbl_map_add_failure; 155 goto cfg_unlbl_map_add_failure;
156 map6->type = NETLBL_NLTYPE_UNLABELED; 156 map6->type = NETLBL_NLTYPE_UNLABELED;
157 ipv6_addr_copy(&map6->list.addr, addr6); 157 ipv6_addr_copy(&map6->list.addr, addr6);
diff --git a/net/rfkill/core.c b/net/rfkill/core.c
index 79693fe2001..2fc4a1724eb 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -549,6 +549,10 @@ void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw)
549 swprev = !!(rfkill->state & RFKILL_BLOCK_SW); 549 swprev = !!(rfkill->state & RFKILL_BLOCK_SW);
550 hwprev = !!(rfkill->state & RFKILL_BLOCK_HW); 550 hwprev = !!(rfkill->state & RFKILL_BLOCK_HW);
551 __rfkill_set_sw_state(rfkill, sw); 551 __rfkill_set_sw_state(rfkill, sw);
552 if (hw)
553 rfkill->state |= RFKILL_BLOCK_HW;
554 else
555 rfkill->state &= ~RFKILL_BLOCK_HW;
552 556
553 spin_unlock_irqrestore(&rfkill->lock, flags); 557 spin_unlock_irqrestore(&rfkill->lock, flags);
554 558
@@ -648,15 +652,26 @@ static ssize_t rfkill_state_store(struct device *dev,
648 struct device_attribute *attr, 652 struct device_attribute *attr,
649 const char *buf, size_t count) 653 const char *buf, size_t count)
650{ 654{
651 /* 655 struct rfkill *rfkill = to_rfkill(dev);
652 * The intention was that userspace can only take control over 656 unsigned long state;
653 * a given device when/if rfkill-input doesn't control it due 657 int err;
654 * to user_claim. Since user_claim is currently unsupported, 658
655 * we never support changing the state from userspace -- this 659 if (!capable(CAP_NET_ADMIN))
656 * can be implemented again later. 660 return -EPERM;
657 */ 661
662 err = strict_strtoul(buf, 0, &state);
663 if (err)
664 return err;
665
666 if (state != RFKILL_USER_STATE_SOFT_BLOCKED &&
667 state != RFKILL_USER_STATE_UNBLOCKED)
668 return -EINVAL;
669
670 mutex_lock(&rfkill_global_mutex);
671 rfkill_set_block(rfkill, state == RFKILL_USER_STATE_SOFT_BLOCKED);
672 mutex_unlock(&rfkill_global_mutex);
658 673
659 return -EPERM; 674 return err ?: count;
660} 675}
661 676
662static ssize_t rfkill_claim_show(struct device *dev, 677static ssize_t rfkill_claim_show(struct device *dev,
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index 6bd8e93869e..f0a76f6bca7 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -92,23 +92,21 @@ static void rose_set_lockdep_key(struct net_device *dev)
92/* 92/*
93 * Convert a ROSE address into text. 93 * Convert a ROSE address into text.
94 */ 94 */
95const char *rose2asc(const rose_address *addr) 95char *rose2asc(char *buf, const rose_address *addr)
96{ 96{
97 static char buffer[11];
98
99 if (addr->rose_addr[0] == 0x00 && addr->rose_addr[1] == 0x00 && 97 if (addr->rose_addr[0] == 0x00 && addr->rose_addr[1] == 0x00 &&
100 addr->rose_addr[2] == 0x00 && addr->rose_addr[3] == 0x00 && 98 addr->rose_addr[2] == 0x00 && addr->rose_addr[3] == 0x00 &&
101 addr->rose_addr[4] == 0x00) { 99 addr->rose_addr[4] == 0x00) {
102 strcpy(buffer, "*"); 100 strcpy(buf, "*");
103 } else { 101 } else {
104 sprintf(buffer, "%02X%02X%02X%02X%02X", addr->rose_addr[0] & 0xFF, 102 sprintf(buf, "%02X%02X%02X%02X%02X", addr->rose_addr[0] & 0xFF,
105 addr->rose_addr[1] & 0xFF, 103 addr->rose_addr[1] & 0xFF,
106 addr->rose_addr[2] & 0xFF, 104 addr->rose_addr[2] & 0xFF,
107 addr->rose_addr[3] & 0xFF, 105 addr->rose_addr[3] & 0xFF,
108 addr->rose_addr[4] & 0xFF); 106 addr->rose_addr[4] & 0xFF);
109 } 107 }
110 108
111 return buffer; 109 return buf;
112} 110}
113 111
114/* 112/*
@@ -1437,7 +1435,7 @@ static void rose_info_stop(struct seq_file *seq, void *v)
1437 1435
1438static int rose_info_show(struct seq_file *seq, void *v) 1436static int rose_info_show(struct seq_file *seq, void *v)
1439{ 1437{
1440 char buf[11]; 1438 char buf[11], rsbuf[11];
1441 1439
1442 if (v == SEQ_START_TOKEN) 1440 if (v == SEQ_START_TOKEN)
1443 seq_puts(seq, 1441 seq_puts(seq,
@@ -1455,8 +1453,8 @@ static int rose_info_show(struct seq_file *seq, void *v)
1455 devname = dev->name; 1453 devname = dev->name;
1456 1454
1457 seq_printf(seq, "%-10s %-9s ", 1455 seq_printf(seq, "%-10s %-9s ",
1458 rose2asc(&rose->dest_addr), 1456 rose2asc(rsbuf, &rose->dest_addr),
1459 ax2asc(buf, &rose->dest_call)); 1457 ax2asc(buf, &rose->dest_call));
1460 1458
1461 if (ax25cmp(&rose->source_call, &null_ax25_address) == 0) 1459 if (ax25cmp(&rose->source_call, &null_ax25_address) == 0)
1462 callsign = "??????-?"; 1460 callsign = "??????-?";
@@ -1465,7 +1463,7 @@ static int rose_info_show(struct seq_file *seq, void *v)
1465 1463
1466 seq_printf(seq, 1464 seq_printf(seq,
1467 "%-10s %-9s %-5s %3.3X %05d %d %d %d %d %3lu %3lu %3lu %3lu %3lu %3lu/%03lu %5d %5d %ld\n", 1465 "%-10s %-9s %-5s %3.3X %05d %d %d %d %d %3lu %3lu %3lu %3lu %3lu %3lu/%03lu %5d %5d %ld\n",
1468 rose2asc(&rose->source_addr), 1466 rose2asc(rsbuf, &rose->source_addr),
1469 callsign, 1467 callsign,
1470 devname, 1468 devname,
1471 rose->lci & 0x0FFF, 1469 rose->lci & 0x0FFF,
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index a81066a1010..9478d9b3d97 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -1104,6 +1104,7 @@ static void rose_node_stop(struct seq_file *seq, void *v)
1104 1104
1105static int rose_node_show(struct seq_file *seq, void *v) 1105static int rose_node_show(struct seq_file *seq, void *v)
1106{ 1106{
1107 char rsbuf[11];
1107 int i; 1108 int i;
1108 1109
1109 if (v == SEQ_START_TOKEN) 1110 if (v == SEQ_START_TOKEN)
@@ -1112,13 +1113,13 @@ static int rose_node_show(struct seq_file *seq, void *v)
1112 const struct rose_node *rose_node = v; 1113 const struct rose_node *rose_node = v;
1113 /* if (rose_node->loopback) { 1114 /* if (rose_node->loopback) {
1114 seq_printf(seq, "%-10s %04d 1 loopback\n", 1115 seq_printf(seq, "%-10s %04d 1 loopback\n",
1115 rose2asc(&rose_node->address), 1116 rose2asc(rsbuf, &rose_node->address),
1116 rose_node->mask); 1117 rose_node->mask);
1117 } else { */ 1118 } else { */
1118 seq_printf(seq, "%-10s %04d %d", 1119 seq_printf(seq, "%-10s %04d %d",
1119 rose2asc(&rose_node->address), 1120 rose2asc(rsbuf, &rose_node->address),
1120 rose_node->mask, 1121 rose_node->mask,
1121 rose_node->count); 1122 rose_node->count);
1122 1123
1123 for (i = 0; i < rose_node->count; i++) 1124 for (i = 0; i < rose_node->count; i++)
1124 seq_printf(seq, " %05d", 1125 seq_printf(seq, " %05d",
@@ -1267,7 +1268,7 @@ static void rose_route_stop(struct seq_file *seq, void *v)
1267 1268
1268static int rose_route_show(struct seq_file *seq, void *v) 1269static int rose_route_show(struct seq_file *seq, void *v)
1269{ 1270{
1270 char buf[11]; 1271 char buf[11], rsbuf[11];
1271 1272
1272 if (v == SEQ_START_TOKEN) 1273 if (v == SEQ_START_TOKEN)
1273 seq_puts(seq, 1274 seq_puts(seq,
@@ -1279,7 +1280,7 @@ static int rose_route_show(struct seq_file *seq, void *v)
1279 seq_printf(seq, 1280 seq_printf(seq,
1280 "%3.3X %-10s %-9s %05d ", 1281 "%3.3X %-10s %-9s %05d ",
1281 rose_route->lci1, 1282 rose_route->lci1,
1282 rose2asc(&rose_route->src_addr), 1283 rose2asc(rsbuf, &rose_route->src_addr),
1283 ax2asc(buf, &rose_route->src_call), 1284 ax2asc(buf, &rose_route->src_call),
1284 rose_route->neigh1->number); 1285 rose_route->neigh1->number);
1285 else 1286 else
@@ -1289,10 +1290,10 @@ static int rose_route_show(struct seq_file *seq, void *v)
1289 if (rose_route->neigh2) 1290 if (rose_route->neigh2)
1290 seq_printf(seq, 1291 seq_printf(seq,
1291 "%3.3X %-10s %-9s %05d\n", 1292 "%3.3X %-10s %-9s %05d\n",
1292 rose_route->lci2, 1293 rose_route->lci2,
1293 rose2asc(&rose_route->dest_addr), 1294 rose2asc(rsbuf, &rose_route->dest_addr),
1294 ax2asc(buf, &rose_route->dest_call), 1295 ax2asc(buf, &rose_route->dest_call),
1295 rose_route->neigh2->number); 1296 rose_route->neigh2->number);
1296 else 1297 else
1297 seq_puts(seq, 1298 seq_puts(seq,
1298 "000 * * 00000\n"); 1299 "000 * * 00000\n");
diff --git a/net/socket.c b/net/socket.c
index 791d71a36a9..6d471655904 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -736,7 +736,7 @@ static ssize_t sock_sendpage(struct file *file, struct page *page,
736 if (more) 736 if (more)
737 flags |= MSG_MORE; 737 flags |= MSG_MORE;
738 738
739 return sock->ops->sendpage(sock, page, offset, size, flags); 739 return kernel_sendpage(sock, page, offset, size, flags);
740} 740}
741 741
742static ssize_t sock_splice_read(struct file *file, loff_t *ppos, 742static ssize_t sock_splice_read(struct file *file, loff_t *ppos,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 43bdb1372ca..634496b3ed7 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -997,7 +997,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info)
997 997
998 if (IS_ERR(hdr)) { 998 if (IS_ERR(hdr)) {
999 err = PTR_ERR(hdr); 999 err = PTR_ERR(hdr);
1000 goto out; 1000 goto free_msg;
1001 } 1001 }
1002 1002
1003 cookie.msg = msg; 1003 cookie.msg = msg;
@@ -1011,7 +1011,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info)
1011 &cookie, get_key_callback); 1011 &cookie, get_key_callback);
1012 1012
1013 if (err) 1013 if (err)
1014 goto out; 1014 goto free_msg;
1015 1015
1016 if (cookie.error) 1016 if (cookie.error)
1017 goto nla_put_failure; 1017 goto nla_put_failure;
@@ -1022,6 +1022,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info)
1022 1022
1023 nla_put_failure: 1023 nla_put_failure:
1024 err = -ENOBUFS; 1024 err = -ENOBUFS;
1025 free_msg:
1025 nlmsg_free(msg); 1026 nlmsg_free(msg);
1026 out: 1027 out:
1027 cfg80211_put_dev(drv); 1028 cfg80211_put_dev(drv);
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 5e14371cda7..75a406d3361 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1089,17 +1089,18 @@ static void handle_reg_beacon(struct wiphy *wiphy,
1089 1089
1090 chan->beacon_found = true; 1090 chan->beacon_found = true;
1091 1091
1092 if (wiphy->disable_beacon_hints)
1093 return;
1094
1092 chan_before.center_freq = chan->center_freq; 1095 chan_before.center_freq = chan->center_freq;
1093 chan_before.flags = chan->flags; 1096 chan_before.flags = chan->flags;
1094 1097
1095 if ((chan->flags & IEEE80211_CHAN_PASSIVE_SCAN) && 1098 if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN) {
1096 !(chan->orig_flags & IEEE80211_CHAN_PASSIVE_SCAN)) {
1097 chan->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN; 1099 chan->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
1098 channel_changed = true; 1100 channel_changed = true;
1099 } 1101 }
1100 1102
1101 if ((chan->flags & IEEE80211_CHAN_NO_IBSS) && 1103 if (chan->flags & IEEE80211_CHAN_NO_IBSS) {
1102 !(chan->orig_flags & IEEE80211_CHAN_NO_IBSS)) {
1103 chan->flags &= ~IEEE80211_CHAN_NO_IBSS; 1104 chan->flags &= ~IEEE80211_CHAN_NO_IBSS;
1104 channel_changed = true; 1105 channel_changed = true;
1105 } 1106 }
diff --git a/net/wireless/reg.h b/net/wireless/reg.h
index e37829a49dc..4e167a8e11b 100644
--- a/net/wireless/reg.h
+++ b/net/wireless/reg.h
@@ -30,7 +30,8 @@ int set_regdom(const struct ieee80211_regdomain *rd);
30 * non-radar 5 GHz channels. 30 * non-radar 5 GHz channels.
31 * 31 *
32 * Drivers do not need to call this, cfg80211 will do it for after a scan 32 * Drivers do not need to call this, cfg80211 will do it for after a scan
33 * on a newly found BSS. 33 * on a newly found BSS. If you cannot make use of this feature you can
34 * set the wiphy->disable_beacon_hints to true.
34 */ 35 */
35int regulatory_hint_found_beacon(struct wiphy *wiphy, 36int regulatory_hint_found_beacon(struct wiphy *wiphy,
36 struct ieee80211_channel *beacon_chan, 37 struct ieee80211_channel *beacon_chan,
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index f8e71b30000..7e595ce24ee 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -35,8 +35,6 @@ void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted)
35 else 35 else
36 nl80211_send_scan_done(wiphy_to_dev(request->wiphy), dev); 36 nl80211_send_scan_done(wiphy_to_dev(request->wiphy), dev);
37 37
38 wiphy_to_dev(request->wiphy)->scan_req = NULL;
39
40#ifdef CONFIG_WIRELESS_EXT 38#ifdef CONFIG_WIRELESS_EXT
41 if (!aborted) { 39 if (!aborted) {
42 memset(&wrqu, 0, sizeof(wrqu)); 40 memset(&wrqu, 0, sizeof(wrqu));
@@ -48,6 +46,7 @@ void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted)
48 dev_put(dev); 46 dev_put(dev);
49 47
50 out: 48 out:
49 wiphy_to_dev(request->wiphy)->scan_req = NULL;
51 kfree(request); 50 kfree(request);
52} 51}
53EXPORT_SYMBOL(cfg80211_scan_done); 52EXPORT_SYMBOL(cfg80211_scan_done);
@@ -119,7 +118,7 @@ static int cmp_ies(u8 num, u8 *ies1, size_t len1, u8 *ies2, size_t len2)
119 118
120 if (!ie1 && !ie2) 119 if (!ie1 && !ie2)
121 return 0; 120 return 0;
122 if (!ie1) 121 if (!ie1 || !ie2)
123 return -1; 122 return -1;
124 123
125 r = memcmp(ie1 + 2, ie2 + 2, min(ie1[1], ie2[1])); 124 r = memcmp(ie1 + 2, ie2 + 2, min(ie1[1], ie2[1]));
@@ -172,6 +171,8 @@ static bool is_mesh(struct cfg80211_bss *a,
172 ie = find_ie(WLAN_EID_MESH_CONFIG, 171 ie = find_ie(WLAN_EID_MESH_CONFIG,
173 a->information_elements, 172 a->information_elements,
174 a->len_information_elements); 173 a->len_information_elements);
174 if (!ie)
175 return false;
175 if (ie[1] != IEEE80211_MESH_CONFIG_LEN) 176 if (ie[1] != IEEE80211_MESH_CONFIG_LEN)
176 return false; 177 return false;
177 178
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 3e733146cd5..278a45bd45a 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -13,7 +13,7 @@
13use strict; 13use strict;
14 14
15my $P = $0; 15my $P = $0;
16my $V = '0.16'; 16my $V = '0.17';
17 17
18use Getopt::Long qw(:config no_auto_abbrev); 18use Getopt::Long qw(:config no_auto_abbrev);
19 19
@@ -27,6 +27,7 @@ my $email_git = 1;
27my $email_git_penguin_chiefs = 0; 27my $email_git_penguin_chiefs = 0;
28my $email_git_min_signatures = 1; 28my $email_git_min_signatures = 1;
29my $email_git_max_maintainers = 5; 29my $email_git_max_maintainers = 5;
30my $email_git_min_percent = 5;
30my $email_git_since = "1-year-ago"; 31my $email_git_since = "1-year-ago";
31my $output_multiline = 1; 32my $output_multiline = 1;
32my $output_separator = ", "; 33my $output_separator = ", ";
@@ -65,6 +66,7 @@ if (!GetOptions(
65 'git-chief-penguins!' => \$email_git_penguin_chiefs, 66 'git-chief-penguins!' => \$email_git_penguin_chiefs,
66 'git-min-signatures=i' => \$email_git_min_signatures, 67 'git-min-signatures=i' => \$email_git_min_signatures,
67 'git-max-maintainers=i' => \$email_git_max_maintainers, 68 'git-max-maintainers=i' => \$email_git_max_maintainers,
69 'git-min-percent=i' => \$email_git_min_percent,
68 'git-since=s' => \$email_git_since, 70 'git-since=s' => \$email_git_since,
69 'm!' => \$email_maintainer, 71 'm!' => \$email_maintainer,
70 'n!' => \$email_usename, 72 'n!' => \$email_usename,
@@ -132,6 +134,10 @@ while (<MAINT>) {
132 $value =~ s@\.@\\\.@g; ##Convert . to \. 134 $value =~ s@\.@\\\.@g; ##Convert . to \.
133 $value =~ s/\*/\.\*/g; ##Convert * to .* 135 $value =~ s/\*/\.\*/g; ##Convert * to .*
134 $value =~ s/\?/\./g; ##Convert ? to . 136 $value =~ s/\?/\./g; ##Convert ? to .
137 ##if pattern is a directory and it lacks a trailing slash, add one
138 if ((-d $value)) {
139 $value =~ s@([^/])$@$1/@;
140 }
135 } 141 }
136 push(@typevalue, "$type:$value"); 142 push(@typevalue, "$type:$value");
137 } elsif (!/^(\s)*$/) { 143 } elsif (!/^(\s)*$/) {
@@ -146,8 +152,10 @@ close(MAINT);
146my @files = (); 152my @files = ();
147 153
148foreach my $file (@ARGV) { 154foreach my $file (@ARGV) {
149 next if ((-d $file)); 155 ##if $file is a directory and it lacks a trailing slash, add one
150 if (!(-f $file)) { 156 if ((-d $file)) {
157 $file =~ s@([^/])$@$1/@;
158 } elsif (!(-f $file)) {
151 die "$P: file '${file}' not found\n"; 159 die "$P: file '${file}' not found\n";
152 } 160 }
153 if ($from_filename) { 161 if ($from_filename) {
@@ -292,7 +300,7 @@ sub file_match_pattern {
292sub usage { 300sub usage {
293 print <<EOT; 301 print <<EOT;
294usage: $P [options] patchfile 302usage: $P [options] patchfile
295 $P [options] -f file 303 $P [options] -f file|directory
296version: $V 304version: $V
297 305
298MAINTAINER field selection options: 306MAINTAINER field selection options:
@@ -301,6 +309,7 @@ MAINTAINER field selection options:
301 --git-chief-penguins => include ${penguin_chiefs} 309 --git-chief-penguins => include ${penguin_chiefs}
302 --git-min-signatures => number of signatures required (default: 1) 310 --git-min-signatures => number of signatures required (default: 1)
303 --git-max-maintainers => maximum maintainers to add (default: 5) 311 --git-max-maintainers => maximum maintainers to add (default: 5)
312 --git-min-percent => minimum percentage of commits required (default: 5)
304 --git-since => git history to use (default: 1-year-ago) 313 --git-since => git history to use (default: 1-year-ago)
305 --m => include maintainer(s) if any 314 --m => include maintainer(s) if any
306 --n => include name 'Full Name <addr\@domain.tld>' 315 --n => include name 'Full Name <addr\@domain.tld>'
@@ -322,6 +331,15 @@ Other options:
322 --version => show version 331 --version => show version
323 --help => show this help information 332 --help => show this help information
324 333
334Notes:
335 Using "-f directory" may give unexpected results:
336
337 Used with "--git", git signators for _all_ files in and below
338 directory are examined as git recurses directories.
339 Any specified X: (exclude) pattern matches are _not_ ignored.
340 Used with "--nogit", directory is used as a pattern match,
341 no individual file within the directory or subdirectory
342 is matched.
325EOT 343EOT
326} 344}
327 345
@@ -482,6 +500,7 @@ sub recent_git_signoffs {
482 my $output = ""; 500 my $output = "";
483 my $count = 0; 501 my $count = 0;
484 my @lines = (); 502 my @lines = ();
503 my $total_sign_offs;
485 504
486 if (which("git") eq "") { 505 if (which("git") eq "") {
487 warn("$P: git not found. Add --nogit to options?\n"); 506 warn("$P: git not found. Add --nogit to options?\n");
@@ -505,17 +524,26 @@ sub recent_git_signoffs {
505 $output =~ s/^\s*//gm; 524 $output =~ s/^\s*//gm;
506 525
507 @lines = split("\n", $output); 526 @lines = split("\n", $output);
527
528 $total_sign_offs = 0;
529 foreach my $line (@lines) {
530 if ($line =~ m/([0-9]+)\s+(.*)/) {
531 $total_sign_offs += $1;
532 } else {
533 die("$P: Unexpected git output: ${line}\n");
534 }
535 }
536
508 foreach my $line (@lines) { 537 foreach my $line (@lines) {
509 if ($line =~ m/([0-9]+)\s+(.*)/) { 538 if ($line =~ m/([0-9]+)\s+(.*)/) {
510 my $sign_offs = $1; 539 my $sign_offs = $1;
511 $line = $2; 540 $line = $2;
512 $count++; 541 $count++;
513 if ($sign_offs < $email_git_min_signatures || 542 if ($sign_offs < $email_git_min_signatures ||
514 $count > $email_git_max_maintainers) { 543 $count > $email_git_max_maintainers ||
544 $sign_offs * 100 / $total_sign_offs < $email_git_min_percent) {
515 last; 545 last;
516 } 546 }
517 } else {
518 die("$P: Unexpected git output: ${line}\n");
519 } 547 }
520 if ($line =~ m/(.+)<(.+)>/) { 548 if ($line =~ m/(.+)<(.+)>/) {
521 my $git_name = $1; 549 my $git_name = $1;
diff --git a/scripts/kconfig/lxdialog/util.c b/scripts/kconfig/lxdialog/util.c
index 86d95cca46a..f2375ad7ebc 100644
--- a/scripts/kconfig/lxdialog/util.c
+++ b/scripts/kconfig/lxdialog/util.c
@@ -19,6 +19,8 @@
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */ 20 */
21 21
22#include <stdarg.h>
23
22#include "dialog.h" 24#include "dialog.h"
23 25
24struct dialog_info dlg; 26struct dialog_info dlg;
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 3bcacb4bfd3..25b60bc117f 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -888,6 +888,8 @@ int main(int ac, char **av)
888 single_menu_mode = 1; 888 single_menu_mode = 1;
889 } 889 }
890 890
891 initscr();
892
891 getyx(stdscr, saved_y, saved_x); 893 getyx(stdscr, saved_y, saved_x);
892 if (init_dialog(NULL)) { 894 if (init_dialog(NULL)) {
893 fprintf(stderr, N_("Your display is too small to run Menuconfig!\n")); 895 fprintf(stderr, N_("Your display is too small to run Menuconfig!\n"));
diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl
index 528492bcba5..89774011965 100644
--- a/scripts/markup_oops.pl
+++ b/scripts/markup_oops.pl
@@ -1,6 +1,7 @@
1#!/usr/bin/perl 1#!/usr/bin/perl
2 2
3use File::Basename; 3use File::Basename;
4use Math::BigInt;
4 5
5# Copyright 2008, Intel Corporation 6# Copyright 2008, Intel Corporation
6# 7#
@@ -172,8 +173,8 @@ while (<STDIN>) {
172 parse_x86_regs($line); 173 parse_x86_regs($line);
173} 174}
174 175
175my $decodestart = hex($target) - hex($func_offset); 176my $decodestart = Math::BigInt->from_hex("0x$target") - Math::BigInt->from_hex("0x$func_offset");
176my $decodestop = hex($target) + 8192; 177my $decodestop = Math::BigInt->from_hex("0x$target") + 8192;
177if ($target eq "0") { 178if ($target eq "0") {
178 print "No oops found!\n"; 179 print "No oops found!\n";
179 print "Usage: \n"; 180 print "Usage: \n";
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index b19f1f4962e..8b357b0bd25 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -89,7 +89,7 @@ for script in postinst postrm preinst prerm ; do
89set -e 89set -e
90 90
91# Pass maintainer script parameters to hook scripts 91# Pass maintainer script parameters to hook scripts
92export DEB_MAINT_PARAMS="\$@" 92export DEB_MAINT_PARAMS="\$*"
93 93
94test -d $debhookdir/$script.d && run-parts --arg="$version" $debhookdir/$script.d 94test -d $debhookdir/$script.d && run-parts --arg="$version" $debhookdir/$script.d
95exit 0 95exit 0
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 7109e2b5bc0..911ba7ffab8 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -393,7 +393,7 @@ while (<IN>) {
393 $read_function = 0; 393 $read_function = 0;
394 } 394 }
395 # print out any recorded offsets 395 # print out any recorded offsets
396 update_funcs() if ($text_found); 396 update_funcs() if (defined($ref_func));
397 397
398 # reset all markers and arrays 398 # reset all markers and arrays
399 $text_found = 0; 399 $text_found = 0;
@@ -403,7 +403,6 @@ while (<IN>) {
403 # section found, now is this a start of a function? 403 # section found, now is this a start of a function?
404 } elsif ($read_function && /$function_regex/) { 404 } elsif ($read_function && /$function_regex/) {
405 $text_found = 1; 405 $text_found = 1;
406 $offset = hex $1;
407 $text = $2; 406 $text = $2;
408 407
409 # if this is either a local function or a weak function 408 # if this is either a local function or a weak function
@@ -412,10 +411,15 @@ while (<IN>) {
412 if (!defined($locals{$text}) && !defined($weak{$text})) { 411 if (!defined($locals{$text}) && !defined($weak{$text})) {
413 $ref_func = $text; 412 $ref_func = $text;
414 $read_function = 0; 413 $read_function = 0;
414 $offset = hex $1;
415 } else { 415 } else {
416 # if we already have a function, and this is weak, skip it 416 # if we already have a function, and this is weak, skip it
417 if (!defined($ref_func) || !defined($weak{$text})) { 417 if (!defined($ref_func) && !defined($weak{$text}) &&
418 # PPC64 can have symbols that start with .L and
419 # gcc considers these special. Don't use them!
420 $text !~ /^\.L/) {
418 $ref_func = $text; 421 $ref_func = $text;
422 $offset = hex $1;
419 } 423 }
420 } 424 }
421 } elsif ($read_headers && /$mcount_section/) { 425 } elsif ($read_headers && /$mcount_section/) {
@@ -440,7 +444,7 @@ while (<IN>) {
440} 444}
441 445
442# dump out anymore offsets that may have been found 446# dump out anymore offsets that may have been found
443update_funcs() if ($text_found); 447update_funcs() if (defined($ref_func));
444 448
445# If we did not find any mcount callers, we are done (do nothing). 449# If we did not find any mcount callers, we are done (do nothing).
446if (!$opened) { 450if (!$opened) {
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 15c2a08a66f..1e8cfc4c2ed 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -1285,6 +1285,8 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
1285 rc = inode->i_op->getxattr(dentry, XATTR_NAME_SELINUX, 1285 rc = inode->i_op->getxattr(dentry, XATTR_NAME_SELINUX,
1286 context, len); 1286 context, len);
1287 if (rc == -ERANGE) { 1287 if (rc == -ERANGE) {
1288 kfree(context);
1289
1288 /* Need a larger buffer. Query for the right size. */ 1290 /* Need a larger buffer. Query for the right size. */
1289 rc = inode->i_op->getxattr(dentry, XATTR_NAME_SELINUX, 1291 rc = inode->i_op->getxattr(dentry, XATTR_NAME_SELINUX,
1290 NULL, 0); 1292 NULL, 0);
@@ -1292,7 +1294,6 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
1292 dput(dentry); 1294 dput(dentry);
1293 goto out_unlock; 1295 goto out_unlock;
1294 } 1296 }
1295 kfree(context);
1296 len = rc; 1297 len = rc;
1297 context = kmalloc(len+1, GFP_NOFS); 1298 context = kmalloc(len+1, GFP_NOFS);
1298 if (!context) { 1299 if (!context) {
diff --git a/sound/aoa/core/gpio-pmf.c b/sound/aoa/core/gpio-pmf.c
index 5ca2220eac7..1dd0c28d1fb 100644
--- a/sound/aoa/core/gpio-pmf.c
+++ b/sound/aoa/core/gpio-pmf.c
@@ -182,6 +182,10 @@ static int pmf_set_notify(struct gpio_runtime *rt,
182 if (!old && notify) { 182 if (!old && notify) {
183 irq_client = kzalloc(sizeof(struct pmf_irq_client), 183 irq_client = kzalloc(sizeof(struct pmf_irq_client),
184 GFP_KERNEL); 184 GFP_KERNEL);
185 if (!irq_client) {
186 err = -ENOMEM;
187 goto out_unlock;
188 }
185 irq_client->data = notif; 189 irq_client->data = notif;
186 irq_client->handler = pmf_handle_notify_irq; 190 irq_client->handler = pmf_handle_notify_irq;
187 irq_client->owner = THIS_MODULE; 191 irq_client->owner = THIS_MODULE;
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 333e4dd2945..72cfd47af6b 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -233,6 +233,18 @@ static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream)
233 xrun(substream); 233 xrun(substream);
234 return -EPIPE; 234 return -EPIPE;
235 } 235 }
236 if (xrun_debug(substream, 8)) {
237 char name[16];
238 pcm_debug_name(substream, name, sizeof(name));
239 snd_printd("period_update: %s: pos=0x%x/0x%x/0x%x, "
240 "hwptr=0x%lx, hw_base=0x%lx, hw_intr=0x%lx\n",
241 name, (unsigned int)pos,
242 (unsigned int)runtime->period_size,
243 (unsigned int)runtime->buffer_size,
244 (unsigned long)old_hw_ptr,
245 (unsigned long)runtime->hw_ptr_base,
246 (unsigned long)runtime->hw_ptr_interrupt);
247 }
236 hw_base = runtime->hw_ptr_base; 248 hw_base = runtime->hw_ptr_base;
237 new_hw_ptr = hw_base + pos; 249 new_hw_ptr = hw_base + pos;
238 hw_ptr_interrupt = runtime->hw_ptr_interrupt + runtime->period_size; 250 hw_ptr_interrupt = runtime->hw_ptr_interrupt + runtime->period_size;
@@ -244,18 +256,27 @@ static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream)
244 delta = new_hw_ptr - hw_ptr_interrupt; 256 delta = new_hw_ptr - hw_ptr_interrupt;
245 } 257 }
246 if (delta < 0) { 258 if (delta < 0) {
247 delta += runtime->buffer_size; 259 if (runtime->periods == 1 || new_hw_ptr < old_hw_ptr)
260 delta += runtime->buffer_size;
248 if (delta < 0) { 261 if (delta < 0) {
249 hw_ptr_error(substream, 262 hw_ptr_error(substream,
250 "Unexpected hw_pointer value " 263 "Unexpected hw_pointer value "
251 "(stream=%i, pos=%ld, intr_ptr=%ld)\n", 264 "(stream=%i, pos=%ld, intr_ptr=%ld)\n",
252 substream->stream, (long)pos, 265 substream->stream, (long)pos,
253 (long)hw_ptr_interrupt); 266 (long)hw_ptr_interrupt);
267#if 1
268 /* simply skipping the hwptr update seems more
269 * robust in some cases, e.g. on VMware with
270 * inaccurate timer source
271 */
272 return 0; /* skip this update */
273#else
254 /* rebase to interrupt position */ 274 /* rebase to interrupt position */
255 hw_base = new_hw_ptr = hw_ptr_interrupt; 275 hw_base = new_hw_ptr = hw_ptr_interrupt;
256 /* align hw_base to buffer_size */ 276 /* align hw_base to buffer_size */
257 hw_base -= hw_base % runtime->buffer_size; 277 hw_base -= hw_base % runtime->buffer_size;
258 delta = 0; 278 delta = 0;
279#endif
259 } else { 280 } else {
260 hw_base += runtime->buffer_size; 281 hw_base += runtime->buffer_size;
261 if (hw_base >= runtime->boundary) 282 if (hw_base >= runtime->boundary)
@@ -344,6 +365,19 @@ int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream)
344 xrun(substream); 365 xrun(substream);
345 return -EPIPE; 366 return -EPIPE;
346 } 367 }
368 if (xrun_debug(substream, 16)) {
369 char name[16];
370 pcm_debug_name(substream, name, sizeof(name));
371 snd_printd("hw_update: %s: pos=0x%x/0x%x/0x%x, "
372 "hwptr=0x%lx, hw_base=0x%lx, hw_intr=0x%lx\n",
373 name, (unsigned int)pos,
374 (unsigned int)runtime->period_size,
375 (unsigned int)runtime->buffer_size,
376 (unsigned long)old_hw_ptr,
377 (unsigned long)runtime->hw_ptr_base,
378 (unsigned long)runtime->hw_ptr_interrupt);
379 }
380
347 hw_base = runtime->hw_ptr_base; 381 hw_base = runtime->hw_ptr_base;
348 new_hw_ptr = hw_base + pos; 382 new_hw_ptr = hw_base + pos;
349 383
diff --git a/sound/core/seq/Makefile b/sound/core/seq/Makefile
index 1bcb360330e..941f64a853e 100644
--- a/sound/core/seq/Makefile
+++ b/sound/core/seq/Makefile
@@ -3,10 +3,6 @@
3# Copyright (c) 1999 by Jaroslav Kysela <perex@perex.cz> 3# Copyright (c) 1999 by Jaroslav Kysela <perex@perex.cz>
4# 4#
5 5
6ifeq ($(CONFIG_SND_SEQUENCER_OSS),y)
7 obj-$(CONFIG_SND_SEQUENCER) += oss/
8endif
9
10snd-seq-device-objs := seq_device.o 6snd-seq-device-objs := seq_device.o
11snd-seq-objs := seq.o seq_lock.o seq_clientmgr.o seq_memory.o seq_queue.o \ 7snd-seq-objs := seq.o seq_lock.o seq_clientmgr.o seq_memory.o seq_queue.o \
12 seq_fifo.o seq_prioq.o seq_timer.o \ 8 seq_fifo.o seq_prioq.o seq_timer.o \
@@ -19,7 +15,8 @@ snd-seq-virmidi-objs := seq_virmidi.o
19 15
20obj-$(CONFIG_SND_SEQUENCER) += snd-seq.o snd-seq-device.o 16obj-$(CONFIG_SND_SEQUENCER) += snd-seq.o snd-seq-device.o
21ifeq ($(CONFIG_SND_SEQUENCER_OSS),y) 17ifeq ($(CONFIG_SND_SEQUENCER_OSS),y)
22obj-$(CONFIG_SND_SEQUENCER) += snd-seq-midi-event.o 18 obj-$(CONFIG_SND_SEQUENCER) += snd-seq-midi-event.o
19 obj-$(CONFIG_SND_SEQUENCER) += oss/
23endif 20endif
24obj-$(CONFIG_SND_SEQ_DUMMY) += snd-seq-dummy.o 21obj-$(CONFIG_SND_SEQ_DUMMY) += snd-seq-dummy.o
25 22
diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c
index edb11eefdfe..2dcf45bf729 100644
--- a/sound/isa/gus/gus_pcm.c
+++ b/sound/isa/gus/gus_pcm.c
@@ -795,13 +795,13 @@ static int snd_gf1_pcm_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_
795 if (!(pcmp->flags & SNDRV_GF1_PCM_PFLG_ACTIVE)) 795 if (!(pcmp->flags & SNDRV_GF1_PCM_PFLG_ACTIVE))
796 continue; 796 continue;
797 /* load real volume - better precision */ 797 /* load real volume - better precision */
798 spin_lock_irqsave(&gus->reg_lock, flags); 798 spin_lock(&gus->reg_lock);
799 snd_gf1_select_voice(gus, pvoice->number); 799 snd_gf1_select_voice(gus, pvoice->number);
800 snd_gf1_ctrl_stop(gus, SNDRV_GF1_VB_VOLUME_CONTROL); 800 snd_gf1_ctrl_stop(gus, SNDRV_GF1_VB_VOLUME_CONTROL);
801 vol = pvoice == pcmp->pvoices[0] ? gus->gf1.pcm_volume_level_left : gus->gf1.pcm_volume_level_right; 801 vol = pvoice == pcmp->pvoices[0] ? gus->gf1.pcm_volume_level_left : gus->gf1.pcm_volume_level_right;
802 snd_gf1_write16(gus, SNDRV_GF1_VW_VOLUME, vol); 802 snd_gf1_write16(gus, SNDRV_GF1_VW_VOLUME, vol);
803 pcmp->final_volume = 1; 803 pcmp->final_volume = 1;
804 spin_unlock_irqrestore(&gus->reg_lock, flags); 804 spin_unlock(&gus->reg_lock);
805 } 805 }
806 spin_unlock_irqrestore(&gus->voice_alloc, flags); 806 spin_unlock_irqrestore(&gus->voice_alloc, flags);
807 return change; 807 return change;
diff --git a/sound/oss/aedsp16.c b/sound/oss/aedsp16.c
index 3ee9900ffd7..35b5912cf3f 100644
--- a/sound/oss/aedsp16.c
+++ b/sound/oss/aedsp16.c
@@ -325,8 +325,9 @@
325/* 325/*
326 * Size of character arrays that store name and version of sound card 326 * Size of character arrays that store name and version of sound card
327 */ 327 */
328#define CARDNAMELEN 15 /* Size of the card's name in chars */ 328#define CARDNAMELEN 15 /* Size of the card's name in chars */
329#define CARDVERLEN 2 /* Size of the card's version in chars */ 329#define CARDVERLEN 10 /* Size of the card's version in chars */
330#define CARDVERDIGITS 2 /* Number of digits in the version */
330 331
331#if defined(CONFIG_SC6600) 332#if defined(CONFIG_SC6600)
332/* 333/*
@@ -410,7 +411,7 @@
410 411
411static int soft_cfg __initdata = 0; /* bitmapped config */ 412static int soft_cfg __initdata = 0; /* bitmapped config */
412static int soft_cfg_mss __initdata = 0; /* bitmapped mss config */ 413static int soft_cfg_mss __initdata = 0; /* bitmapped mss config */
413static int ver[CARDVERLEN] __initdata = {0, 0}; /* DSP Ver: 414static int ver[CARDVERDIGITS] __initdata = {0, 0}; /* DSP Ver:
414 hi->ver[0] lo->ver[1] */ 415 hi->ver[0] lo->ver[1] */
415 416
416#if defined(CONFIG_SC6600) 417#if defined(CONFIG_SC6600)
@@ -957,7 +958,7 @@ static int __init aedsp16_dsp_version(int port)
957 * string is finished. 958 * string is finished.
958 */ 959 */
959 ver[len++] = ret; 960 ver[len++] = ret;
960 } while (len < CARDVERLEN); 961 } while (len < CARDVERDIGITS);
961 sprintf(DSPVersion, "%d.%d", ver[0], ver[1]); 962 sprintf(DSPVersion, "%d.%d", ver[0], ver[1]);
962 963
963 DBG(("success.\n")); 964 DBG(("success.\n"));
diff --git a/sound/oss/mpu401.c b/sound/oss/mpu401.c
index 1b2316f35b1..734b8f9e2f7 100644
--- a/sound/oss/mpu401.c
+++ b/sound/oss/mpu401.c
@@ -1074,7 +1074,7 @@ int attach_mpu401(struct address_info *hw_config, struct module *owner)
1074 sprintf(mpu_synth_info[m].name, "%s (MPU401)", hw_config->name); 1074 sprintf(mpu_synth_info[m].name, "%s (MPU401)", hw_config->name);
1075 else 1075 else
1076 sprintf(mpu_synth_info[m].name, 1076 sprintf(mpu_synth_info[m].name,
1077 "MPU-401 %d.%d%c Midi interface #%d", 1077 "MPU-401 %d.%d%c MIDI #%d",
1078 (int) (devc->version & 0xf0) >> 4, 1078 (int) (devc->version & 0xf0) >> 4,
1079 devc->version & 0x0f, 1079 devc->version & 0x0f,
1080 revision_char, 1080 revision_char,
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index f24bf1ecb36..15e4138bce1 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -325,9 +325,9 @@ static struct snd_pcm_hardware snd_ca0106_capture_hw = {
325 .rate_max = 192000, 325 .rate_max = 192000,
326 .channels_min = 2, 326 .channels_min = 2,
327 .channels_max = 2, 327 .channels_max = 2,
328 .buffer_bytes_max = ((65536 - 64) * 8), 328 .buffer_bytes_max = 65536 - 128,
329 .period_bytes_min = 64, 329 .period_bytes_min = 64,
330 .period_bytes_max = (65536 - 64), 330 .period_bytes_max = 32768 - 64,
331 .periods_min = 2, 331 .periods_min = 2,
332 .periods_max = 2, 332 .periods_max = 2,
333 .fifo_size = 0, 333 .fifo_size = 0,
diff --git a/sound/pci/ctxfi/ctamixer.c b/sound/pci/ctxfi/ctamixer.c
index a1db51b3ead..a7f4a671f7b 100644
--- a/sound/pci/ctxfi/ctamixer.c
+++ b/sound/pci/ctxfi/ctamixer.c
@@ -242,13 +242,12 @@ static int get_amixer_rsc(struct amixer_mgr *mgr,
242 242
243 /* Allocate mem for amixer resource */ 243 /* Allocate mem for amixer resource */
244 amixer = kzalloc(sizeof(*amixer), GFP_KERNEL); 244 amixer = kzalloc(sizeof(*amixer), GFP_KERNEL);
245 if (NULL == amixer) { 245 if (!amixer)
246 err = -ENOMEM; 246 return -ENOMEM;
247 return err;
248 }
249 247
250 /* Check whether there are sufficient 248 /* Check whether there are sufficient
251 * amixer resources to meet request. */ 249 * amixer resources to meet request. */
250 err = 0;
252 spin_lock_irqsave(&mgr->mgr_lock, flags); 251 spin_lock_irqsave(&mgr->mgr_lock, flags);
253 for (i = 0; i < desc->msr; i++) { 252 for (i = 0; i < desc->msr; i++) {
254 err = mgr_get_resource(&mgr->mgr, 1, &idx); 253 err = mgr_get_resource(&mgr->mgr, 1, &idx);
@@ -397,12 +396,11 @@ static int get_sum_rsc(struct sum_mgr *mgr,
397 396
398 /* Allocate mem for sum resource */ 397 /* Allocate mem for sum resource */
399 sum = kzalloc(sizeof(*sum), GFP_KERNEL); 398 sum = kzalloc(sizeof(*sum), GFP_KERNEL);
400 if (NULL == sum) { 399 if (!sum)
401 err = -ENOMEM; 400 return -ENOMEM;
402 return err;
403 }
404 401
405 /* Check whether there are sufficient sum resources to meet request. */ 402 /* Check whether there are sufficient sum resources to meet request. */
403 err = 0;
406 spin_lock_irqsave(&mgr->mgr_lock, flags); 404 spin_lock_irqsave(&mgr->mgr_lock, flags);
407 for (i = 0; i < desc->msr; i++) { 405 for (i = 0; i < desc->msr; i++) {
408 err = mgr_get_resource(&mgr->mgr, 1, &idx); 406 err = mgr_get_resource(&mgr->mgr, 1, &idx);
diff --git a/sound/pci/ctxfi/ctdaio.c b/sound/pci/ctxfi/ctdaio.c
index 082e35c08c0..deb6cfa7360 100644
--- a/sound/pci/ctxfi/ctdaio.c
+++ b/sound/pci/ctxfi/ctdaio.c
@@ -57,9 +57,9 @@ struct daio_rsc_idx idx_20k1[NUM_DAIOTYP] = {
57 57
58struct daio_rsc_idx idx_20k2[NUM_DAIOTYP] = { 58struct daio_rsc_idx idx_20k2[NUM_DAIOTYP] = {
59 [LINEO1] = {.left = 0x40, .right = 0x41}, 59 [LINEO1] = {.left = 0x40, .right = 0x41},
60 [LINEO2] = {.left = 0x70, .right = 0x71}, 60 [LINEO2] = {.left = 0x60, .right = 0x61},
61 [LINEO3] = {.left = 0x50, .right = 0x51}, 61 [LINEO3] = {.left = 0x50, .right = 0x51},
62 [LINEO4] = {.left = 0x60, .right = 0x61}, 62 [LINEO4] = {.left = 0x70, .right = 0x71},
63 [LINEIM] = {.left = 0x45, .right = 0xc5}, 63 [LINEIM] = {.left = 0x45, .right = 0xc5},
64 [SPDIFOO] = {.left = 0x00, .right = 0x01}, 64 [SPDIFOO] = {.left = 0x00, .right = 0x01},
65 [SPDIFIO] = {.left = 0x05, .right = 0x85}, 65 [SPDIFIO] = {.left = 0x05, .right = 0x85},
diff --git a/sound/pci/ctxfi/ctsrc.c b/sound/pci/ctxfi/ctsrc.c
index e1c145d8b70..df43a5cd393 100644
--- a/sound/pci/ctxfi/ctsrc.c
+++ b/sound/pci/ctxfi/ctsrc.c
@@ -724,12 +724,11 @@ static int get_srcimp_rsc(struct srcimp_mgr *mgr,
724 724
725 /* Allocate mem for SRCIMP resource */ 725 /* Allocate mem for SRCIMP resource */
726 srcimp = kzalloc(sizeof(*srcimp), GFP_KERNEL); 726 srcimp = kzalloc(sizeof(*srcimp), GFP_KERNEL);
727 if (NULL == srcimp) { 727 if (!srcimp)
728 err = -ENOMEM; 728 return -ENOMEM;
729 return err;
730 }
731 729
732 /* Check whether there are sufficient SRCIMP resources. */ 730 /* Check whether there are sufficient SRCIMP resources. */
731 err = 0;
733 spin_lock_irqsave(&mgr->mgr_lock, flags); 732 spin_lock_irqsave(&mgr->mgr_lock, flags);
734 for (i = 0; i < desc->msr; i++) { 733 for (i = 0; i < desc->msr; i++) {
735 err = mgr_get_resource(&mgr->mgr, 1, &idx); 734 err = mgr_get_resource(&mgr->mgr, 1, &idx);
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 26d255de6be..c7df01b72ca 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -174,7 +174,7 @@ static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd,
174 mutex_lock(&bus->cmd_mutex); 174 mutex_lock(&bus->cmd_mutex);
175 err = bus->ops.command(bus, cmd); 175 err = bus->ops.command(bus, cmd);
176 if (!err && res) 176 if (!err && res)
177 *res = bus->ops.get_response(bus); 177 *res = bus->ops.get_response(bus, codec->addr);
178 mutex_unlock(&bus->cmd_mutex); 178 mutex_unlock(&bus->cmd_mutex);
179 snd_hda_power_down(codec); 179 snd_hda_power_down(codec);
180 if (res && *res == -1 && bus->rirb_error) { 180 if (res && *res == -1 && bus->rirb_error) {
@@ -332,6 +332,12 @@ int snd_hda_get_connections(struct hda_codec *codec, hda_nid_t nid,
332 AC_VERB_GET_CONNECT_LIST, i); 332 AC_VERB_GET_CONNECT_LIST, i);
333 range_val = !!(parm & (1 << (shift-1))); /* ranges */ 333 range_val = !!(parm & (1 << (shift-1))); /* ranges */
334 val = parm & mask; 334 val = parm & mask;
335 if (val == 0) {
336 snd_printk(KERN_WARNING "hda_codec: "
337 "invalid CONNECT_LIST verb %x[%i]:%x\n",
338 nid, i, parm);
339 return 0;
340 }
335 parm >>= shift; 341 parm >>= shift;
336 if (range_val) { 342 if (range_val) {
337 /* ranges between the previous and this one */ 343 /* ranges between the previous and this one */
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index cad79efaabc..1b75f28ed09 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -568,7 +568,7 @@ struct hda_bus_ops {
568 /* send a single command */ 568 /* send a single command */
569 int (*command)(struct hda_bus *bus, unsigned int cmd); 569 int (*command)(struct hda_bus *bus, unsigned int cmd);
570 /* get a response from the last command */ 570 /* get a response from the last command */
571 unsigned int (*get_response)(struct hda_bus *bus); 571 unsigned int (*get_response)(struct hda_bus *bus, unsigned int addr);
572 /* free the private data */ 572 /* free the private data */
573 void (*private_free)(struct hda_bus *); 573 void (*private_free)(struct hda_bus *);
574 /* attach a PCM stream */ 574 /* attach a PCM stream */
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c
index fcad5ec3177..9446a5abea1 100644
--- a/sound/pci/hda/hda_eld.c
+++ b/sound/pci/hda/hda_eld.c
@@ -508,7 +508,7 @@ static void hdmi_write_eld_info(struct snd_info_entry *entry,
508 char name[64]; 508 char name[64];
509 char *sname; 509 char *sname;
510 long long val; 510 long long val;
511 int n; 511 unsigned int n;
512 512
513 while (!snd_info_get_line(buffer, line, sizeof(line))) { 513 while (!snd_info_get_line(buffer, line, sizeof(line))) {
514 if (sscanf(line, "%s %llx", name, &val) != 2) 514 if (sscanf(line, "%s %llx", name, &val) != 2)
@@ -539,7 +539,7 @@ static void hdmi_write_eld_info(struct snd_info_entry *entry,
539 sname++; 539 sname++;
540 n = 10 * n + name[4] - '0'; 540 n = 10 * n + name[4] - '0';
541 } 541 }
542 if (n < 0 || n > 31) /* double the CEA limit */ 542 if (n >= ELD_MAX_SAD)
543 continue; 543 continue;
544 if (!strcmp(sname, "_coding_type")) 544 if (!strcmp(sname, "_coding_type"))
545 e->sad[n].format = val; 545 e->sad[n].format = val;
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 77c1b840ca8..175f07a381b 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -253,7 +253,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
253 253
254/* STATESTS int mask: S3,SD2,SD1,SD0 */ 254/* STATESTS int mask: S3,SD2,SD1,SD0 */
255#define AZX_MAX_CODECS 4 255#define AZX_MAX_CODECS 4
256#define STATESTS_INT_MASK 0x0f 256#define STATESTS_INT_MASK ((1 << AZX_MAX_CODECS) - 1)
257 257
258/* SD_CTL bits */ 258/* SD_CTL bits */
259#define SD_CTL_STREAM_RESET 0x01 /* stream reset bit */ 259#define SD_CTL_STREAM_RESET 0x01 /* stream reset bit */
@@ -361,8 +361,8 @@ struct azx_rb {
361 dma_addr_t addr; /* physical address of CORB/RIRB buffer */ 361 dma_addr_t addr; /* physical address of CORB/RIRB buffer */
362 /* for RIRB */ 362 /* for RIRB */
363 unsigned short rp, wp; /* read/write pointers */ 363 unsigned short rp, wp; /* read/write pointers */
364 int cmds; /* number of pending requests */ 364 int cmds[AZX_MAX_CODECS]; /* number of pending requests */
365 u32 res; /* last read value */ 365 u32 res[AZX_MAX_CODECS]; /* last read value */
366}; 366};
367 367
368struct azx { 368struct azx {
@@ -418,7 +418,7 @@ struct azx {
418 unsigned int probing :1; /* codec probing phase */ 418 unsigned int probing :1; /* codec probing phase */
419 419
420 /* for debugging */ 420 /* for debugging */
421 unsigned int last_cmd; /* last issued command (to sync) */ 421 unsigned int last_cmd[AZX_MAX_CODECS];
422 422
423 /* for pending irqs */ 423 /* for pending irqs */
424 struct work_struct irq_pending_work; 424 struct work_struct irq_pending_work;
@@ -513,6 +513,7 @@ static int azx_alloc_cmd_io(struct azx *chip)
513 513
514static void azx_init_cmd_io(struct azx *chip) 514static void azx_init_cmd_io(struct azx *chip)
515{ 515{
516 spin_lock_irq(&chip->reg_lock);
516 /* CORB set up */ 517 /* CORB set up */
517 chip->corb.addr = chip->rb.addr; 518 chip->corb.addr = chip->rb.addr;
518 chip->corb.buf = (u32 *)chip->rb.area; 519 chip->corb.buf = (u32 *)chip->rb.area;
@@ -531,7 +532,8 @@ static void azx_init_cmd_io(struct azx *chip)
531 /* RIRB set up */ 532 /* RIRB set up */
532 chip->rirb.addr = chip->rb.addr + 2048; 533 chip->rirb.addr = chip->rb.addr + 2048;
533 chip->rirb.buf = (u32 *)(chip->rb.area + 2048); 534 chip->rirb.buf = (u32 *)(chip->rb.area + 2048);
534 chip->rirb.wp = chip->rirb.rp = chip->rirb.cmds = 0; 535 chip->rirb.wp = chip->rirb.rp = 0;
536 memset(chip->rirb.cmds, 0, sizeof(chip->rirb.cmds));
535 azx_writel(chip, RIRBLBASE, (u32)chip->rirb.addr); 537 azx_writel(chip, RIRBLBASE, (u32)chip->rirb.addr);
536 azx_writel(chip, RIRBUBASE, upper_32_bits(chip->rirb.addr)); 538 azx_writel(chip, RIRBUBASE, upper_32_bits(chip->rirb.addr));
537 539
@@ -543,30 +545,60 @@ static void azx_init_cmd_io(struct azx *chip)
543 azx_writew(chip, RINTCNT, 1); 545 azx_writew(chip, RINTCNT, 1);
544 /* enable rirb dma and response irq */ 546 /* enable rirb dma and response irq */
545 azx_writeb(chip, RIRBCTL, ICH6_RBCTL_DMA_EN | ICH6_RBCTL_IRQ_EN); 547 azx_writeb(chip, RIRBCTL, ICH6_RBCTL_DMA_EN | ICH6_RBCTL_IRQ_EN);
548 spin_unlock_irq(&chip->reg_lock);
546} 549}
547 550
548static void azx_free_cmd_io(struct azx *chip) 551static void azx_free_cmd_io(struct azx *chip)
549{ 552{
553 spin_lock_irq(&chip->reg_lock);
550 /* disable ringbuffer DMAs */ 554 /* disable ringbuffer DMAs */
551 azx_writeb(chip, RIRBCTL, 0); 555 azx_writeb(chip, RIRBCTL, 0);
552 azx_writeb(chip, CORBCTL, 0); 556 azx_writeb(chip, CORBCTL, 0);
557 spin_unlock_irq(&chip->reg_lock);
558}
559
560static unsigned int azx_command_addr(u32 cmd)
561{
562 unsigned int addr = cmd >> 28;
563
564 if (addr >= AZX_MAX_CODECS) {
565 snd_BUG();
566 addr = 0;
567 }
568
569 return addr;
570}
571
572static unsigned int azx_response_addr(u32 res)
573{
574 unsigned int addr = res & 0xf;
575
576 if (addr >= AZX_MAX_CODECS) {
577 snd_BUG();
578 addr = 0;
579 }
580
581 return addr;
553} 582}
554 583
555/* send a command */ 584/* send a command */
556static int azx_corb_send_cmd(struct hda_bus *bus, u32 val) 585static int azx_corb_send_cmd(struct hda_bus *bus, u32 val)
557{ 586{
558 struct azx *chip = bus->private_data; 587 struct azx *chip = bus->private_data;
588 unsigned int addr = azx_command_addr(val);
559 unsigned int wp; 589 unsigned int wp;
560 590
591 spin_lock_irq(&chip->reg_lock);
592
561 /* add command to corb */ 593 /* add command to corb */
562 wp = azx_readb(chip, CORBWP); 594 wp = azx_readb(chip, CORBWP);
563 wp++; 595 wp++;
564 wp %= ICH6_MAX_CORB_ENTRIES; 596 wp %= ICH6_MAX_CORB_ENTRIES;
565 597
566 spin_lock_irq(&chip->reg_lock); 598 chip->rirb.cmds[addr]++;
567 chip->rirb.cmds++;
568 chip->corb.buf[wp] = cpu_to_le32(val); 599 chip->corb.buf[wp] = cpu_to_le32(val);
569 azx_writel(chip, CORBWP, wp); 600 azx_writel(chip, CORBWP, wp);
601
570 spin_unlock_irq(&chip->reg_lock); 602 spin_unlock_irq(&chip->reg_lock);
571 603
572 return 0; 604 return 0;
@@ -578,13 +610,14 @@ static int azx_corb_send_cmd(struct hda_bus *bus, u32 val)
578static void azx_update_rirb(struct azx *chip) 610static void azx_update_rirb(struct azx *chip)
579{ 611{
580 unsigned int rp, wp; 612 unsigned int rp, wp;
613 unsigned int addr;
581 u32 res, res_ex; 614 u32 res, res_ex;
582 615
583 wp = azx_readb(chip, RIRBWP); 616 wp = azx_readb(chip, RIRBWP);
584 if (wp == chip->rirb.wp) 617 if (wp == chip->rirb.wp)
585 return; 618 return;
586 chip->rirb.wp = wp; 619 chip->rirb.wp = wp;
587 620
588 while (chip->rirb.rp != wp) { 621 while (chip->rirb.rp != wp) {
589 chip->rirb.rp++; 622 chip->rirb.rp++;
590 chip->rirb.rp %= ICH6_MAX_RIRB_ENTRIES; 623 chip->rirb.rp %= ICH6_MAX_RIRB_ENTRIES;
@@ -592,18 +625,24 @@ static void azx_update_rirb(struct azx *chip)
592 rp = chip->rirb.rp << 1; /* an RIRB entry is 8-bytes */ 625 rp = chip->rirb.rp << 1; /* an RIRB entry is 8-bytes */
593 res_ex = le32_to_cpu(chip->rirb.buf[rp + 1]); 626 res_ex = le32_to_cpu(chip->rirb.buf[rp + 1]);
594 res = le32_to_cpu(chip->rirb.buf[rp]); 627 res = le32_to_cpu(chip->rirb.buf[rp]);
628 addr = azx_response_addr(res_ex);
595 if (res_ex & ICH6_RIRB_EX_UNSOL_EV) 629 if (res_ex & ICH6_RIRB_EX_UNSOL_EV)
596 snd_hda_queue_unsol_event(chip->bus, res, res_ex); 630 snd_hda_queue_unsol_event(chip->bus, res, res_ex);
597 else if (chip->rirb.cmds) { 631 else if (chip->rirb.cmds[addr]) {
598 chip->rirb.res = res; 632 chip->rirb.res[addr] = res;
599 smp_wmb(); 633 smp_wmb();
600 chip->rirb.cmds--; 634 chip->rirb.cmds[addr]--;
601 } 635 } else
636 snd_printk(KERN_ERR SFX "spurious response %#x:%#x, "
637 "last cmd=%#08x\n",
638 res, res_ex,
639 chip->last_cmd[addr]);
602 } 640 }
603} 641}
604 642
605/* receive a response */ 643/* receive a response */
606static unsigned int azx_rirb_get_response(struct hda_bus *bus) 644static unsigned int azx_rirb_get_response(struct hda_bus *bus,
645 unsigned int addr)
607{ 646{
608 struct azx *chip = bus->private_data; 647 struct azx *chip = bus->private_data;
609 unsigned long timeout; 648 unsigned long timeout;
@@ -616,10 +655,10 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus)
616 azx_update_rirb(chip); 655 azx_update_rirb(chip);
617 spin_unlock_irq(&chip->reg_lock); 656 spin_unlock_irq(&chip->reg_lock);
618 } 657 }
619 if (!chip->rirb.cmds) { 658 if (!chip->rirb.cmds[addr]) {
620 smp_rmb(); 659 smp_rmb();
621 bus->rirb_error = 0; 660 bus->rirb_error = 0;
622 return chip->rirb.res; /* the last value */ 661 return chip->rirb.res[addr]; /* the last value */
623 } 662 }
624 if (time_after(jiffies, timeout)) 663 if (time_after(jiffies, timeout))
625 break; 664 break;
@@ -633,7 +672,8 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus)
633 672
634 if (chip->msi) { 673 if (chip->msi) {
635 snd_printk(KERN_WARNING SFX "No response from codec, " 674 snd_printk(KERN_WARNING SFX "No response from codec, "
636 "disabling MSI: last cmd=0x%08x\n", chip->last_cmd); 675 "disabling MSI: last cmd=0x%08x\n",
676 chip->last_cmd[addr]);
637 free_irq(chip->irq, chip); 677 free_irq(chip->irq, chip);
638 chip->irq = -1; 678 chip->irq = -1;
639 pci_disable_msi(chip->pci); 679 pci_disable_msi(chip->pci);
@@ -648,7 +688,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus)
648 if (!chip->polling_mode) { 688 if (!chip->polling_mode) {
649 snd_printk(KERN_WARNING SFX "azx_get_response timeout, " 689 snd_printk(KERN_WARNING SFX "azx_get_response timeout, "
650 "switching to polling mode: last cmd=0x%08x\n", 690 "switching to polling mode: last cmd=0x%08x\n",
651 chip->last_cmd); 691 chip->last_cmd[addr]);
652 chip->polling_mode = 1; 692 chip->polling_mode = 1;
653 goto again; 693 goto again;
654 } 694 }
@@ -672,7 +712,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus)
672 712
673 snd_printk(KERN_ERR "hda_intel: azx_get_response timeout, " 713 snd_printk(KERN_ERR "hda_intel: azx_get_response timeout, "
674 "switching to single_cmd mode: last cmd=0x%08x\n", 714 "switching to single_cmd mode: last cmd=0x%08x\n",
675 chip->last_cmd); 715 chip->last_cmd[addr]);
676 chip->single_cmd = 1; 716 chip->single_cmd = 1;
677 bus->response_reset = 0; 717 bus->response_reset = 0;
678 /* re-initialize CORB/RIRB */ 718 /* re-initialize CORB/RIRB */
@@ -692,7 +732,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus)
692 */ 732 */
693 733
694/* receive a response */ 734/* receive a response */
695static int azx_single_wait_for_response(struct azx *chip) 735static int azx_single_wait_for_response(struct azx *chip, unsigned int addr)
696{ 736{
697 int timeout = 50; 737 int timeout = 50;
698 738
@@ -700,7 +740,7 @@ static int azx_single_wait_for_response(struct azx *chip)
700 /* check IRV busy bit */ 740 /* check IRV busy bit */
701 if (azx_readw(chip, IRS) & ICH6_IRS_VALID) { 741 if (azx_readw(chip, IRS) & ICH6_IRS_VALID) {
702 /* reuse rirb.res as the response return value */ 742 /* reuse rirb.res as the response return value */
703 chip->rirb.res = azx_readl(chip, IR); 743 chip->rirb.res[addr] = azx_readl(chip, IR);
704 return 0; 744 return 0;
705 } 745 }
706 udelay(1); 746 udelay(1);
@@ -708,7 +748,7 @@ static int azx_single_wait_for_response(struct azx *chip)
708 if (printk_ratelimit()) 748 if (printk_ratelimit())
709 snd_printd(SFX "get_response timeout: IRS=0x%x\n", 749 snd_printd(SFX "get_response timeout: IRS=0x%x\n",
710 azx_readw(chip, IRS)); 750 azx_readw(chip, IRS));
711 chip->rirb.res = -1; 751 chip->rirb.res[addr] = -1;
712 return -EIO; 752 return -EIO;
713} 753}
714 754
@@ -716,6 +756,7 @@ static int azx_single_wait_for_response(struct azx *chip)
716static int azx_single_send_cmd(struct hda_bus *bus, u32 val) 756static int azx_single_send_cmd(struct hda_bus *bus, u32 val)
717{ 757{
718 struct azx *chip = bus->private_data; 758 struct azx *chip = bus->private_data;
759 unsigned int addr = azx_command_addr(val);
719 int timeout = 50; 760 int timeout = 50;
720 761
721 bus->rirb_error = 0; 762 bus->rirb_error = 0;
@@ -728,7 +769,7 @@ static int azx_single_send_cmd(struct hda_bus *bus, u32 val)
728 azx_writel(chip, IC, val); 769 azx_writel(chip, IC, val);
729 azx_writew(chip, IRS, azx_readw(chip, IRS) | 770 azx_writew(chip, IRS, azx_readw(chip, IRS) |
730 ICH6_IRS_BUSY); 771 ICH6_IRS_BUSY);
731 return azx_single_wait_for_response(chip); 772 return azx_single_wait_for_response(chip, addr);
732 } 773 }
733 udelay(1); 774 udelay(1);
734 } 775 }
@@ -739,10 +780,11 @@ static int azx_single_send_cmd(struct hda_bus *bus, u32 val)
739} 780}
740 781
741/* receive a response */ 782/* receive a response */
742static unsigned int azx_single_get_response(struct hda_bus *bus) 783static unsigned int azx_single_get_response(struct hda_bus *bus,
784 unsigned int addr)
743{ 785{
744 struct azx *chip = bus->private_data; 786 struct azx *chip = bus->private_data;
745 return chip->rirb.res; 787 return chip->rirb.res[addr];
746} 788}
747 789
748/* 790/*
@@ -757,7 +799,7 @@ static int azx_send_cmd(struct hda_bus *bus, unsigned int val)
757{ 799{
758 struct azx *chip = bus->private_data; 800 struct azx *chip = bus->private_data;
759 801
760 chip->last_cmd = val; 802 chip->last_cmd[azx_command_addr(val)] = val;
761 if (chip->single_cmd) 803 if (chip->single_cmd)
762 return azx_single_send_cmd(bus, val); 804 return azx_single_send_cmd(bus, val);
763 else 805 else
@@ -765,13 +807,14 @@ static int azx_send_cmd(struct hda_bus *bus, unsigned int val)
765} 807}
766 808
767/* get a response */ 809/* get a response */
768static unsigned int azx_get_response(struct hda_bus *bus) 810static unsigned int azx_get_response(struct hda_bus *bus,
811 unsigned int addr)
769{ 812{
770 struct azx *chip = bus->private_data; 813 struct azx *chip = bus->private_data;
771 if (chip->single_cmd) 814 if (chip->single_cmd)
772 return azx_single_get_response(bus); 815 return azx_single_get_response(bus, addr);
773 else 816 else
774 return azx_rirb_get_response(bus); 817 return azx_rirb_get_response(bus, addr);
775} 818}
776 819
777#ifdef CONFIG_SND_HDA_POWER_SAVE 820#ifdef CONFIG_SND_HDA_POWER_SAVE
@@ -1243,10 +1286,12 @@ static int probe_codec(struct azx *chip, int addr)
1243 (AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID; 1286 (AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID;
1244 unsigned int res; 1287 unsigned int res;
1245 1288
1289 mutex_lock(&chip->bus->cmd_mutex);
1246 chip->probing = 1; 1290 chip->probing = 1;
1247 azx_send_cmd(chip->bus, cmd); 1291 azx_send_cmd(chip->bus, cmd);
1248 res = azx_get_response(chip->bus); 1292 res = azx_get_response(chip->bus, addr);
1249 chip->probing = 0; 1293 chip->probing = 0;
1294 mutex_unlock(&chip->bus->cmd_mutex);
1250 if (res == -1) 1295 if (res == -1)
1251 return -EIO; 1296 return -EIO;
1252 snd_printdd(SFX "codec #%d probed OK\n", addr); 1297 snd_printdd(SFX "codec #%d probed OK\n", addr);
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index be7d25fa7f3..3da85caf8af 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -3754,7 +3754,7 @@ static int ad1884a_mobile_master_sw_put(struct snd_kcontrol *kcontrol,
3754 int mute = (!ucontrol->value.integer.value[0] && 3754 int mute = (!ucontrol->value.integer.value[0] &&
3755 !ucontrol->value.integer.value[1]); 3755 !ucontrol->value.integer.value[1]);
3756 /* toggle GPIO1 according to the mute state */ 3756 /* toggle GPIO1 according to the mute state */
3757 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, 3757 snd_hda_codec_write_cache(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
3758 mute ? 0x02 : 0x0); 3758 mute ? 0x02 : 0x0);
3759 return ret; 3759 return ret;
3760} 3760}
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 7e99763ca52..fea976793ae 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -275,13 +275,13 @@ struct alc_spec {
275 */ 275 */
276 unsigned int num_init_verbs; 276 unsigned int num_init_verbs;
277 277
278 char stream_name_analog[16]; /* analog PCM stream */ 278 char stream_name_analog[32]; /* analog PCM stream */
279 struct hda_pcm_stream *stream_analog_playback; 279 struct hda_pcm_stream *stream_analog_playback;
280 struct hda_pcm_stream *stream_analog_capture; 280 struct hda_pcm_stream *stream_analog_capture;
281 struct hda_pcm_stream *stream_analog_alt_playback; 281 struct hda_pcm_stream *stream_analog_alt_playback;
282 struct hda_pcm_stream *stream_analog_alt_capture; 282 struct hda_pcm_stream *stream_analog_alt_capture;
283 283
284 char stream_name_digital[16]; /* digital PCM stream */ 284 char stream_name_digital[32]; /* digital PCM stream */
285 struct hda_pcm_stream *stream_digital_playback; 285 struct hda_pcm_stream *stream_digital_playback;
286 struct hda_pcm_stream *stream_digital_capture; 286 struct hda_pcm_stream *stream_digital_capture;
287 287
@@ -559,7 +559,7 @@ static int alc_pin_mode_get(struct snd_kcontrol *kcontrol,
559 559
560 /* Find enumerated value for current pinctl setting */ 560 /* Find enumerated value for current pinctl setting */
561 i = alc_pin_mode_min(dir); 561 i = alc_pin_mode_min(dir);
562 while (alc_pin_mode_values[i] != pinctl && i <= alc_pin_mode_max(dir)) 562 while (i <= alc_pin_mode_max(dir) && alc_pin_mode_values[i] != pinctl)
563 i++; 563 i++;
564 *valp = i <= alc_pin_mode_max(dir) ? i: alc_pin_mode_min(dir); 564 *valp = i <= alc_pin_mode_max(dir) ? i: alc_pin_mode_min(dir);
565 return 0; 565 return 0;
@@ -10631,6 +10631,18 @@ static void alc262_lenovo_3000_unsol_event(struct hda_codec *codec,
10631 alc262_lenovo_3000_automute(codec, 1); 10631 alc262_lenovo_3000_automute(codec, 1);
10632} 10632}
10633 10633
10634static int amp_stereo_mute_update(struct hda_codec *codec, hda_nid_t nid,
10635 int dir, int idx, long *valp)
10636{
10637 int i, change = 0;
10638
10639 for (i = 0; i < 2; i++, valp++)
10640 change |= snd_hda_codec_amp_update(codec, nid, i, dir, idx,
10641 HDA_AMP_MUTE,
10642 *valp ? 0 : HDA_AMP_MUTE);
10643 return change;
10644}
10645
10634/* bind hp and internal speaker mute (with plug check) */ 10646/* bind hp and internal speaker mute (with plug check) */
10635static int alc262_fujitsu_master_sw_put(struct snd_kcontrol *kcontrol, 10647static int alc262_fujitsu_master_sw_put(struct snd_kcontrol *kcontrol,
10636 struct snd_ctl_elem_value *ucontrol) 10648 struct snd_ctl_elem_value *ucontrol)
@@ -10639,13 +10651,8 @@ static int alc262_fujitsu_master_sw_put(struct snd_kcontrol *kcontrol,
10639 long *valp = ucontrol->value.integer.value; 10651 long *valp = ucontrol->value.integer.value;
10640 int change; 10652 int change;
10641 10653
10642 change = snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0, 10654 change = amp_stereo_mute_update(codec, 0x14, HDA_OUTPUT, 0, valp);
10643 HDA_AMP_MUTE, 10655 change |= amp_stereo_mute_update(codec, 0x1b, HDA_OUTPUT, 0, valp);
10644 valp ? 0 : HDA_AMP_MUTE);
10645 change |= snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0,
10646 HDA_AMP_MUTE,
10647 valp ? 0 : HDA_AMP_MUTE);
10648
10649 if (change) 10656 if (change)
10650 alc262_fujitsu_automute(codec, 0); 10657 alc262_fujitsu_automute(codec, 0);
10651 return change; 10658 return change;
@@ -10680,10 +10687,7 @@ static int alc262_lenovo_3000_master_sw_put(struct snd_kcontrol *kcontrol,
10680 long *valp = ucontrol->value.integer.value; 10687 long *valp = ucontrol->value.integer.value;
10681 int change; 10688 int change;
10682 10689
10683 change = snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0, 10690 change = amp_stereo_mute_update(codec, 0x1b, HDA_OUTPUT, 0, valp);
10684 HDA_AMP_MUTE,
10685 valp ? 0 : HDA_AMP_MUTE);
10686
10687 if (change) 10691 if (change)
10688 alc262_lenovo_3000_automute(codec, 0); 10692 alc262_lenovo_3000_automute(codec, 0);
10689 return change; 10693 return change;
@@ -11854,12 +11858,7 @@ static int alc268_acer_master_sw_put(struct snd_kcontrol *kcontrol,
11854 long *valp = ucontrol->value.integer.value; 11858 long *valp = ucontrol->value.integer.value;
11855 int change; 11859 int change;
11856 11860
11857 change = snd_hda_codec_amp_update(codec, 0x14, 0, HDA_OUTPUT, 0, 11861 change = amp_stereo_mute_update(codec, 0x14, HDA_OUTPUT, 0, valp);
11858 HDA_AMP_MUTE,
11859 valp[0] ? 0 : HDA_AMP_MUTE);
11860 change |= snd_hda_codec_amp_update(codec, 0x14, 1, HDA_OUTPUT, 0,
11861 HDA_AMP_MUTE,
11862 valp[1] ? 0 : HDA_AMP_MUTE);
11863 if (change) 11862 if (change)
11864 alc268_acer_automute(codec, 0); 11863 alc268_acer_automute(codec, 0);
11865 return change; 11864 return change;
@@ -13564,6 +13563,8 @@ static int patch_alc269(struct hda_codec *codec)
13564 set_capture_mixer(spec); 13563 set_capture_mixer(spec);
13565 set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); 13564 set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT);
13566 13565
13566 spec->vmaster_nid = 0x02;
13567
13567 codec->patch_ops = alc_patch_ops; 13568 codec->patch_ops = alc_patch_ops;
13568 if (board_config == ALC269_AUTO) 13569 if (board_config == ALC269_AUTO)
13569 spec->init_hook = alc269_auto_init; 13570 spec->init_hook = alc269_auto_init;
@@ -15158,7 +15159,7 @@ static struct snd_pci_quirk alc861vd_cfg_tbl[] = {
15158 SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST), 15159 SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST),
15159 SND_PCI_QUIRK(0x1179, 0xff00, "Toshiba A135", ALC861VD_LENOVO), 15160 SND_PCI_QUIRK(0x1179, 0xff00, "Toshiba A135", ALC861VD_LENOVO),
15160 /*SND_PCI_QUIRK(0x1179, 0xff00, "DALLAS", ALC861VD_DALLAS),*/ /*lenovo*/ 15161 /*SND_PCI_QUIRK(0x1179, 0xff00, "DALLAS", ALC861VD_DALLAS),*/ /*lenovo*/
15161 SND_PCI_QUIRK(0x1179, 0xff01, "DALLAS", ALC861VD_DALLAS), 15162 SND_PCI_QUIRK(0x1179, 0xff01, "Toshiba A135", ALC861VD_LENOVO),
15162 SND_PCI_QUIRK(0x1179, 0xff03, "Toshiba P205", ALC861VD_LENOVO), 15163 SND_PCI_QUIRK(0x1179, 0xff03, "Toshiba P205", ALC861VD_LENOVO),
15163 SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_DALLAS), 15164 SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_DALLAS),
15164 SND_PCI_QUIRK(0x1565, 0x820d, "Biostar NF61S SE", ALC861VD_6ST_DIG), 15165 SND_PCI_QUIRK(0x1565, 0x820d, "Biostar NF61S SE", ALC861VD_6ST_DIG),
@@ -15578,9 +15579,12 @@ static int patch_alc861vd(struct hda_codec *codec)
15578 spec->stream_digital_playback = &alc861vd_pcm_digital_playback; 15579 spec->stream_digital_playback = &alc861vd_pcm_digital_playback;
15579 spec->stream_digital_capture = &alc861vd_pcm_digital_capture; 15580 spec->stream_digital_capture = &alc861vd_pcm_digital_capture;
15580 15581
15581 spec->adc_nids = alc861vd_adc_nids; 15582 if (!spec->adc_nids) {
15582 spec->num_adc_nids = ARRAY_SIZE(alc861vd_adc_nids); 15583 spec->adc_nids = alc861vd_adc_nids;
15583 spec->capsrc_nids = alc861vd_capsrc_nids; 15584 spec->num_adc_nids = ARRAY_SIZE(alc861vd_adc_nids);
15585 }
15586 if (!spec->capsrc_nids)
15587 spec->capsrc_nids = alc861vd_capsrc_nids;
15584 15588
15585 set_capture_mixer(spec); 15589 set_capture_mixer(spec);
15586 set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 15590 set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
@@ -17497,9 +17501,12 @@ static int patch_alc662(struct hda_codec *codec)
17497 spec->stream_digital_playback = &alc662_pcm_digital_playback; 17501 spec->stream_digital_playback = &alc662_pcm_digital_playback;
17498 spec->stream_digital_capture = &alc662_pcm_digital_capture; 17502 spec->stream_digital_capture = &alc662_pcm_digital_capture;
17499 17503
17500 spec->adc_nids = alc662_adc_nids; 17504 if (!spec->adc_nids) {
17501 spec->num_adc_nids = ARRAY_SIZE(alc662_adc_nids); 17505 spec->adc_nids = alc662_adc_nids;
17502 spec->capsrc_nids = alc662_capsrc_nids; 17506 spec->num_adc_nids = ARRAY_SIZE(alc662_adc_nids);
17507 }
17508 if (!spec->capsrc_nids)
17509 spec->capsrc_nids = alc662_capsrc_nids;
17503 17510
17504 if (!spec->cap_mixer) 17511 if (!spec->cap_mixer)
17505 set_capture_mixer(spec); 17512 set_capture_mixer(spec);
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 41b5b3a18c1..456ef6ac12e 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -1809,6 +1809,8 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = {
1809 "Dell Studio 1537", STAC_DELL_M6_DMIC), 1809 "Dell Studio 1537", STAC_DELL_M6_DMIC),
1810 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a0, 1810 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a0,
1811 "Dell Studio 17", STAC_DELL_M6_DMIC), 1811 "Dell Studio 17", STAC_DELL_M6_DMIC),
1812 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02be,
1813 "Dell Studio 1555", STAC_DELL_M6_DMIC),
1812 {} /* terminator */ 1814 {} /* terminator */
1813}; 1815};
1814 1816
@@ -2264,7 +2266,7 @@ static struct snd_pci_quirk stac927x_cfg_tbl[] = {
2264 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS), 2266 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS),
2265 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0227, "Dell Vostro 1400 ", STAC_DELL_BIOS), 2267 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0227, "Dell Vostro 1400 ", STAC_DELL_BIOS),
2266 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022e, "Dell ", STAC_DELL_BIOS), 2268 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022e, "Dell ", STAC_DELL_BIOS),
2267 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell Inspiron 1525", STAC_DELL_3ST), 2269 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell Inspiron 1525", STAC_DELL_BIOS),
2268 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0242, "Dell ", STAC_DELL_BIOS), 2270 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0242, "Dell ", STAC_DELL_BIOS),
2269 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0243, "Dell ", STAC_DELL_BIOS), 2271 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0243, "Dell ", STAC_DELL_BIOS),
2270 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ff, "Dell ", STAC_DELL_BIOS), 2272 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ff, "Dell ", STAC_DELL_BIOS),
@@ -2378,6 +2380,7 @@ static struct snd_pci_quirk stac9205_cfg_tbl[] = {
2378 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0228, 2380 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0228,
2379 "Dell Vostro 1500", STAC_9205_DELL_M42), 2381 "Dell Vostro 1500", STAC_9205_DELL_M42),
2380 /* Gateway */ 2382 /* Gateway */
2383 SND_PCI_QUIRK(0x107b, 0x0560, "Gateway T6834c", STAC_9205_EAPD),
2381 SND_PCI_QUIRK(0x107b, 0x0565, "Gateway T1616", STAC_9205_EAPD), 2384 SND_PCI_QUIRK(0x107b, 0x0565, "Gateway T1616", STAC_9205_EAPD),
2382 {} /* terminator */ 2385 {} /* terminator */
2383}; 2386};
@@ -4065,7 +4068,7 @@ static int stac92xx_add_jack(struct hda_codec *codec,
4065 jack->nid = nid; 4068 jack->nid = nid;
4066 jack->type = type; 4069 jack->type = type;
4067 4070
4068 sprintf(name, "%s at %s %s Jack", 4071 snprintf(name, sizeof(name), "%s at %s %s Jack",
4069 snd_hda_get_jack_type(def_conf), 4072 snd_hda_get_jack_type(def_conf),
4070 snd_hda_get_jack_connectivity(def_conf), 4073 snd_hda_get_jack_connectivity(def_conf),
4071 snd_hda_get_jack_location(def_conf)); 4074 snd_hda_get_jack_location(def_conf));
@@ -5642,6 +5645,13 @@ static int patch_stac927x(struct hda_codec *codec)
5642 /* GPIO2 High = Enable EAPD */ 5645 /* GPIO2 High = Enable EAPD */
5643 spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x04; 5646 spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x04;
5644 spec->gpio_data = 0x04; 5647 spec->gpio_data = 0x04;
5648 switch (codec->subsystem_id) {
5649 case 0x1028022f:
5650 /* correct EAPD to be GPIO0 */
5651 spec->eapd_mask = spec->gpio_mask = 0x01;
5652 spec->gpio_dir = spec->gpio_data = 0x01;
5653 break;
5654 };
5645 spec->dmic_nids = stac927x_dmic_nids; 5655 spec->dmic_nids = stac927x_dmic_nids;
5646 spec->num_dmics = STAC927X_NUM_DMICS; 5656 spec->num_dmics = STAC927X_NUM_DMICS;
5647 5657
@@ -5854,6 +5864,8 @@ static unsigned int *stac9872_brd_tbl[STAC_9872_MODELS] = {
5854}; 5864};
5855 5865
5856static struct snd_pci_quirk stac9872_cfg_tbl[] = { 5866static struct snd_pci_quirk stac9872_cfg_tbl[] = {
5867 SND_PCI_QUIRK_MASK(0x104d, 0xfff0, 0x81e0,
5868 "Sony VAIO F/S", STAC_9872_VAIO),
5857 {} /* terminator */ 5869 {} /* terminator */
5858}; 5870};
5859 5871
@@ -5866,6 +5878,8 @@ static int patch_stac9872(struct hda_codec *codec)
5866 if (spec == NULL) 5878 if (spec == NULL)
5867 return -ENOMEM; 5879 return -ENOMEM;
5868 codec->spec = spec; 5880 codec->spec = spec;
5881 spec->num_pins = ARRAY_SIZE(stac9872_pin_nids);
5882 spec->pin_nids = stac9872_pin_nids;
5869 5883
5870 spec->board_config = snd_hda_check_board_config(codec, STAC_9872_MODELS, 5884 spec->board_config = snd_hda_check_board_config(codec, STAC_9872_MODELS,
5871 stac9872_models, 5885 stac9872_models,
@@ -5877,8 +5891,6 @@ static int patch_stac9872(struct hda_codec *codec)
5877 stac92xx_set_config_regs(codec, 5891 stac92xx_set_config_regs(codec,
5878 stac9872_brd_tbl[spec->board_config]); 5892 stac9872_brd_tbl[spec->board_config]);
5879 5893
5880 spec->num_pins = ARRAY_SIZE(stac9872_pin_nids);
5881 spec->pin_nids = stac9872_pin_nids;
5882 spec->multiout.dac_nids = spec->dac_nids; 5894 spec->multiout.dac_nids = spec->dac_nids;
5883 spec->num_adcs = ARRAY_SIZE(stac9872_adc_nids); 5895 spec->num_adcs = ARRAY_SIZE(stac9872_adc_nids);
5884 spec->adc_nids = stac9872_adc_nids; 5896 spec->adc_nids = stac9872_adc_nids;
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index ab099f48248..cb0d1bf34b5 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -767,6 +767,7 @@ static int aic3x_hw_params(struct snd_pcm_substream *substream,
767 int codec_clk = 0, bypass_pll = 0, fsref, last_clk = 0; 767 int codec_clk = 0, bypass_pll = 0, fsref, last_clk = 0;
768 u8 data, r, p, pll_q, pll_p = 1, pll_r = 1, pll_j = 1; 768 u8 data, r, p, pll_q, pll_p = 1, pll_r = 1, pll_j = 1;
769 u16 pll_d = 1; 769 u16 pll_d = 1;
770 u8 reg;
770 771
771 /* select data word length */ 772 /* select data word length */
772 data = 773 data =
@@ -801,8 +802,16 @@ static int aic3x_hw_params(struct snd_pcm_substream *substream,
801 pll_q &= 0xf; 802 pll_q &= 0xf;
802 aic3x_write(codec, AIC3X_PLL_PROGA_REG, pll_q << PLLQ_SHIFT); 803 aic3x_write(codec, AIC3X_PLL_PROGA_REG, pll_q << PLLQ_SHIFT);
803 aic3x_write(codec, AIC3X_GPIOB_REG, CODEC_CLKIN_CLKDIV); 804 aic3x_write(codec, AIC3X_GPIOB_REG, CODEC_CLKIN_CLKDIV);
804 } else 805 /* disable PLL if it is bypassed */
806 reg = aic3x_read_reg_cache(codec, AIC3X_PLL_PROGA_REG);
807 aic3x_write(codec, AIC3X_PLL_PROGA_REG, reg & ~PLL_ENABLE);
808
809 } else {
805 aic3x_write(codec, AIC3X_GPIOB_REG, CODEC_CLKIN_PLLDIV); 810 aic3x_write(codec, AIC3X_GPIOB_REG, CODEC_CLKIN_PLLDIV);
811 /* enable PLL when it is used */
812 reg = aic3x_read_reg_cache(codec, AIC3X_PLL_PROGA_REG);
813 aic3x_write(codec, AIC3X_PLL_PROGA_REG, reg | PLL_ENABLE);
814 }
806 815
807 /* Route Left DAC to left channel input and 816 /* Route Left DAC to left channel input and
808 * right DAC to right channel input */ 817 * right DAC to right channel input */
diff --git a/sound/soc/fsl/efika-audio-fabric.c b/sound/soc/fsl/efika-audio-fabric.c
index 85b0e756950..3326e2a1e86 100644
--- a/sound/soc/fsl/efika-audio-fabric.c
+++ b/sound/soc/fsl/efika-audio-fabric.c
@@ -30,6 +30,8 @@
30#include "mpc5200_psc_ac97.h" 30#include "mpc5200_psc_ac97.h"
31#include "../codecs/stac9766.h" 31#include "../codecs/stac9766.h"
32 32
33#define DRV_NAME "efika-audio-fabric"
34
33static struct snd_soc_device device; 35static struct snd_soc_device device;
34static struct snd_soc_card card; 36static struct snd_soc_card card;
35 37
diff --git a/sound/soc/fsl/pcm030-audio-fabric.c b/sound/soc/fsl/pcm030-audio-fabric.c
index 8766f7a3893..b928ef7d28e 100644
--- a/sound/soc/fsl/pcm030-audio-fabric.c
+++ b/sound/soc/fsl/pcm030-audio-fabric.c
@@ -30,6 +30,8 @@
30#include "mpc5200_psc_ac97.h" 30#include "mpc5200_psc_ac97.h"
31#include "../codecs/wm9712.h" 31#include "../codecs/wm9712.h"
32 32
33#define DRV_NAME "pcm030-audio-fabric"
34
33static struct snd_soc_device device; 35static struct snd_soc_device device;
34static struct snd_soc_card card; 36static struct snd_soc_card card;
35 37
diff --git a/sound/usb/Kconfig b/sound/usb/Kconfig
index 523aec188cc..73525c048e7 100644
--- a/sound/usb/Kconfig
+++ b/sound/usb/Kconfig
@@ -48,6 +48,7 @@ config SND_USB_CAIAQ
48 * Native Instruments Kore Controller 48 * Native Instruments Kore Controller
49 * Native Instruments Kore Controller 2 49 * Native Instruments Kore Controller 2
50 * Native Instruments Audio Kontrol 1 50 * Native Instruments Audio Kontrol 1
51 * Native Instruments Audio 2 DJ
51 * Native Instruments Audio 4 DJ 52 * Native Instruments Audio 4 DJ
52 * Native Instruments Audio 8 DJ 53 * Native Instruments Audio 8 DJ
53 * Native Instruments Guitar Rig Session I/O 54 * Native Instruments Guitar Rig Session I/O
diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c
index 8f9b60c5d74..121af0644fd 100644
--- a/sound/usb/caiaq/audio.c
+++ b/sound/usb/caiaq/audio.c
@@ -646,6 +646,7 @@ int snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *dev)
646 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_GUITARRIGMOBILE): 646 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_GUITARRIGMOBILE):
647 dev->samplerates |= SNDRV_PCM_RATE_192000; 647 dev->samplerates |= SNDRV_PCM_RATE_192000;
648 /* fall thru */ 648 /* fall thru */
649 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO2DJ):
649 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ): 650 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ):
650 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO8DJ): 651 case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO8DJ):
651 dev->samplerates |= SNDRV_PCM_RATE_88200; 652 dev->samplerates |= SNDRV_PCM_RATE_88200;
diff --git a/sound/usb/caiaq/device.c b/sound/usb/caiaq/device.c
index de38108f0b2..83e6c1312d4 100644
--- a/sound/usb/caiaq/device.c
+++ b/sound/usb/caiaq/device.c
@@ -35,13 +35,14 @@
35#include "input.h" 35#include "input.h"
36 36
37MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); 37MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>");
38MODULE_DESCRIPTION("caiaq USB audio, version 1.3.18"); 38MODULE_DESCRIPTION("caiaq USB audio, version 1.3.19");
39MODULE_LICENSE("GPL"); 39MODULE_LICENSE("GPL");
40MODULE_SUPPORTED_DEVICE("{{Native Instruments, RigKontrol2}," 40MODULE_SUPPORTED_DEVICE("{{Native Instruments, RigKontrol2},"
41 "{Native Instruments, RigKontrol3}," 41 "{Native Instruments, RigKontrol3},"
42 "{Native Instruments, Kore Controller}," 42 "{Native Instruments, Kore Controller},"
43 "{Native Instruments, Kore Controller 2}," 43 "{Native Instruments, Kore Controller 2},"
44 "{Native Instruments, Audio Kontrol 1}," 44 "{Native Instruments, Audio Kontrol 1},"
45 "{Native Instruments, Audio 2 DJ},"
45 "{Native Instruments, Audio 4 DJ}," 46 "{Native Instruments, Audio 4 DJ},"
46 "{Native Instruments, Audio 8 DJ}," 47 "{Native Instruments, Audio 8 DJ},"
47 "{Native Instruments, Session I/O}," 48 "{Native Instruments, Session I/O},"
@@ -121,6 +122,11 @@ static struct usb_device_id snd_usb_id_table[] = {
121 .idVendor = USB_VID_NATIVEINSTRUMENTS, 122 .idVendor = USB_VID_NATIVEINSTRUMENTS,
122 .idProduct = USB_PID_AUDIO4DJ 123 .idProduct = USB_PID_AUDIO4DJ
123 }, 124 },
125 {
126 .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
127 .idVendor = USB_VID_NATIVEINSTRUMENTS,
128 .idProduct = USB_PID_AUDIO2DJ
129 },
124 { /* terminator */ } 130 { /* terminator */ }
125}; 131};
126 132
diff --git a/sound/usb/caiaq/device.h b/sound/usb/caiaq/device.h
index ece73514854..44e3edf88be 100644
--- a/sound/usb/caiaq/device.h
+++ b/sound/usb/caiaq/device.h
@@ -10,6 +10,7 @@
10#define USB_PID_KORECONTROLLER 0x4711 10#define USB_PID_KORECONTROLLER 0x4711
11#define USB_PID_KORECONTROLLER2 0x4712 11#define USB_PID_KORECONTROLLER2 0x4712
12#define USB_PID_AK1 0x0815 12#define USB_PID_AK1 0x0815
13#define USB_PID_AUDIO2DJ 0x041c
13#define USB_PID_AUDIO4DJ 0x0839 14#define USB_PID_AUDIO4DJ 0x0839
14#define USB_PID_AUDIO8DJ 0x1978 15#define USB_PID_AUDIO8DJ 0x1978
15#define USB_PID_SESSIONIO 0x1915 16#define USB_PID_SESSIONIO 0x1915
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c
index 4bd3a7a0edc..ec9cdf98692 100644
--- a/sound/usb/usbmixer.c
+++ b/sound/usb/usbmixer.c
@@ -990,20 +990,35 @@ static void build_feature_ctl(struct mixer_build *state, unsigned char *desc,
990 break; 990 break;
991 } 991 }
992 992
993 /* quirk for UDA1321/N101 */ 993 /* volume control quirks */
994 /* note that detection between firmware 2.1.1.7 (N101) and later 2.1.1.21 */
995 /* is not very clear from datasheets */
996 /* I hope that the min value is -15360 for newer firmware --jk */
997 switch (state->chip->usb_id) { 994 switch (state->chip->usb_id) {
998 case USB_ID(0x0471, 0x0101): 995 case USB_ID(0x0471, 0x0101):
999 case USB_ID(0x0471, 0x0104): 996 case USB_ID(0x0471, 0x0104):
1000 case USB_ID(0x0471, 0x0105): 997 case USB_ID(0x0471, 0x0105):
1001 case USB_ID(0x0672, 0x1041): 998 case USB_ID(0x0672, 0x1041):
999 /* quirk for UDA1321/N101.
1000 * note that detection between firmware 2.1.1.7 (N101)
1001 * and later 2.1.1.21 is not very clear from datasheets.
1002 * I hope that the min value is -15360 for newer firmware --jk
1003 */
1002 if (!strcmp(kctl->id.name, "PCM Playback Volume") && 1004 if (!strcmp(kctl->id.name, "PCM Playback Volume") &&
1003 cval->min == -15616) { 1005 cval->min == -15616) {
1004 snd_printk(KERN_INFO "using volume control quirk for the UDA1321/N101 chip\n"); 1006 snd_printk(KERN_INFO
1007 "set volume quirk for UDA1321/N101 chip\n");
1005 cval->max = -256; 1008 cval->max = -256;
1006 } 1009 }
1010 break;
1011
1012 case USB_ID(0x046d, 0x09a4):
1013 if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
1014 snd_printk(KERN_INFO
1015 "set volume quirk for QuickCam E3500\n");
1016 cval->min = 6080;
1017 cval->max = 8768;
1018 cval->res = 192;
1019 }
1020 break;
1021
1007 } 1022 }
1008 1023
1009 snd_printdd(KERN_INFO "[%d] FU [%s] ch = %d, val = %d/%d/%d\n", 1024 snd_printdd(KERN_INFO "[%d] FU [%s] ch = %d, val = %d/%d/%d\n",
diff --git a/tools/perf/Documentation/perf-examples.txt b/tools/perf/Documentation/perf-examples.txt
new file mode 100644
index 00000000000..8eb6c489fb1
--- /dev/null
+++ b/tools/perf/Documentation/perf-examples.txt
@@ -0,0 +1,225 @@
1
2 ------------------------------
3 ****** perf by examples ******
4 ------------------------------
5
6[ From an e-mail by Ingo Molnar, http://lkml.org/lkml/2009/8/4/346 ]
7
8
9First, discovery/enumeration of available counters can be done via
10'perf list':
11
12titan:~> perf list
13 [...]
14 kmem:kmalloc [Tracepoint event]
15 kmem:kmem_cache_alloc [Tracepoint event]
16 kmem:kmalloc_node [Tracepoint event]
17 kmem:kmem_cache_alloc_node [Tracepoint event]
18 kmem:kfree [Tracepoint event]
19 kmem:kmem_cache_free [Tracepoint event]
20 kmem:mm_page_free_direct [Tracepoint event]
21 kmem:mm_pagevec_free [Tracepoint event]
22 kmem:mm_page_alloc [Tracepoint event]
23 kmem:mm_page_alloc_zone_locked [Tracepoint event]
24 kmem:mm_page_pcpu_drain [Tracepoint event]
25 kmem:mm_page_alloc_extfrag [Tracepoint event]
26
27Then any (or all) of the above event sources can be activated and
28measured. For example the page alloc/free properties of a 'hackbench
29run' are:
30
31 titan:~> perf stat -e kmem:mm_page_pcpu_drain -e kmem:mm_page_alloc
32 -e kmem:mm_pagevec_free -e kmem:mm_page_free_direct ./hackbench 10
33 Time: 0.575
34
35 Performance counter stats for './hackbench 10':
36
37 13857 kmem:mm_page_pcpu_drain
38 27576 kmem:mm_page_alloc
39 6025 kmem:mm_pagevec_free
40 20934 kmem:mm_page_free_direct
41
42 0.613972165 seconds time elapsed
43
44You can observe the statistical properties as well, by using the
45'repeat the workload N times' feature of perf stat:
46
47 titan:~> perf stat --repeat 5 -e kmem:mm_page_pcpu_drain -e
48 kmem:mm_page_alloc -e kmem:mm_pagevec_free -e
49 kmem:mm_page_free_direct ./hackbench 10
50 Time: 0.627
51 Time: 0.644
52 Time: 0.564
53 Time: 0.559
54 Time: 0.626
55
56 Performance counter stats for './hackbench 10' (5 runs):
57
58 12920 kmem:mm_page_pcpu_drain ( +- 3.359% )
59 25035 kmem:mm_page_alloc ( +- 3.783% )
60 6104 kmem:mm_pagevec_free ( +- 0.934% )
61 18376 kmem:mm_page_free_direct ( +- 4.941% )
62
63 0.643954516 seconds time elapsed ( +- 2.363% )
64
65Furthermore, these tracepoints can be used to sample the workload as
66well. For example the page allocations done by a 'git gc' can be
67captured the following way:
68
69 titan:~/git> perf record -f -e kmem:mm_page_alloc -c 1 ./git gc
70 Counting objects: 1148, done.
71 Delta compression using up to 2 threads.
72 Compressing objects: 100% (450/450), done.
73 Writing objects: 100% (1148/1148), done.
74 Total 1148 (delta 690), reused 1148 (delta 690)
75 [ perf record: Captured and wrote 0.267 MB perf.data (~11679 samples) ]
76
77To check which functions generated page allocations:
78
79 titan:~/git> perf report
80 # Samples: 10646
81 #
82 # Overhead Command Shared Object
83 # ........ ............... ..........................
84 #
85 23.57% git-repack /lib64/libc-2.5.so
86 21.81% git /lib64/libc-2.5.so
87 14.59% git ./git
88 11.79% git-repack ./git
89 7.12% git /lib64/ld-2.5.so
90 3.16% git-repack /lib64/libpthread-2.5.so
91 2.09% git-repack /bin/bash
92 1.97% rm /lib64/libc-2.5.so
93 1.39% mv /lib64/ld-2.5.so
94 1.37% mv /lib64/libc-2.5.so
95 1.12% git-repack /lib64/ld-2.5.so
96 0.95% rm /lib64/ld-2.5.so
97 0.90% git-update-serv /lib64/libc-2.5.so
98 0.73% git-update-serv /lib64/ld-2.5.so
99 0.68% perf /lib64/libpthread-2.5.so
100 0.64% git-repack /usr/lib64/libz.so.1.2.3
101
102Or to see it on a more finegrained level:
103
104titan:~/git> perf report --sort comm,dso,symbol
105# Samples: 10646
106#
107# Overhead Command Shared Object Symbol
108# ........ ............... .......................... ......
109#
110 9.35% git-repack ./git [.] insert_obj_hash
111 9.12% git ./git [.] insert_obj_hash
112 7.31% git /lib64/libc-2.5.so [.] memcpy
113 6.34% git-repack /lib64/libc-2.5.so [.] _int_malloc
114 6.24% git-repack /lib64/libc-2.5.so [.] memcpy
115 5.82% git-repack /lib64/libc-2.5.so [.] __GI___fork
116 5.47% git /lib64/libc-2.5.so [.] _int_malloc
117 2.99% git /lib64/libc-2.5.so [.] memset
118
119Furthermore, call-graph sampling can be done too, of page
120allocations - to see precisely what kind of page allocations there
121are:
122
123 titan:~/git> perf record -f -g -e kmem:mm_page_alloc -c 1 ./git gc
124 Counting objects: 1148, done.
125 Delta compression using up to 2 threads.
126 Compressing objects: 100% (450/450), done.
127 Writing objects: 100% (1148/1148), done.
128 Total 1148 (delta 690), reused 1148 (delta 690)
129 [ perf record: Captured and wrote 0.963 MB perf.data (~42069 samples) ]
130
131 titan:~/git> perf report -g
132 # Samples: 10686
133 #
134 # Overhead Command Shared Object
135 # ........ ............... ..........................
136 #
137 23.25% git-repack /lib64/libc-2.5.so
138 |
139 |--50.00%-- _int_free
140 |
141 |--37.50%-- __GI___fork
142 | make_child
143 |
144 |--12.50%-- ptmalloc_unlock_all2
145 | make_child
146 |
147 --6.25%-- __GI_strcpy
148 21.61% git /lib64/libc-2.5.so
149 |
150 |--30.00%-- __GI_read
151 | |
152 | --83.33%-- git_config_from_file
153 | git_config
154 | |
155 [...]
156
157Or you can observe the whole system's page allocations for 10
158seconds:
159
160titan:~/git> perf stat -a -e kmem:mm_page_pcpu_drain -e
161kmem:mm_page_alloc -e kmem:mm_pagevec_free -e
162kmem:mm_page_free_direct sleep 10
163
164 Performance counter stats for 'sleep 10':
165
166 171585 kmem:mm_page_pcpu_drain
167 322114 kmem:mm_page_alloc
168 73623 kmem:mm_pagevec_free
169 254115 kmem:mm_page_free_direct
170
171 10.000591410 seconds time elapsed
172
173Or observe how fluctuating the page allocations are, via statistical
174analysis done over ten 1-second intervals:
175
176 titan:~/git> perf stat --repeat 10 -a -e kmem:mm_page_pcpu_drain -e
177 kmem:mm_page_alloc -e kmem:mm_pagevec_free -e
178 kmem:mm_page_free_direct sleep 1
179
180 Performance counter stats for 'sleep 1' (10 runs):
181
182 17254 kmem:mm_page_pcpu_drain ( +- 3.709% )
183 34394 kmem:mm_page_alloc ( +- 4.617% )
184 7509 kmem:mm_pagevec_free ( +- 4.820% )
185 25653 kmem:mm_page_free_direct ( +- 3.672% )
186
187 1.058135029 seconds time elapsed ( +- 3.089% )
188
189Or you can annotate the recorded 'git gc' run on a per symbol basis
190and check which instructions/source-code generated page allocations:
191
192 titan:~/git> perf annotate __GI___fork
193 ------------------------------------------------
194 Percent | Source code & Disassembly of libc-2.5.so
195 ------------------------------------------------
196 :
197 :
198 : Disassembly of section .plt:
199 : Disassembly of section .text:
200 :
201 : 00000031a2e95560 <__fork>:
202 [...]
203 0.00 : 31a2e95602: b8 38 00 00 00 mov $0x38,%eax
204 0.00 : 31a2e95607: 0f 05 syscall
205 83.42 : 31a2e95609: 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax
206 0.00 : 31a2e9560f: 0f 87 4d 01 00 00 ja 31a2e95762 <__fork+0x202>
207 0.00 : 31a2e95615: 85 c0 test %eax,%eax
208
209( this shows that 83.42% of __GI___fork's page allocations come from
210 the 0x38 system call it performs. )
211
212etc. etc. - a lot more is possible. I could list a dozen of
213other different usecases straight away - neither of which is
214possible via /proc/vmstat.
215
216/proc/vmstat is not in the same league really, in terms of
217expressive power of system analysis and performance
218analysis.
219
220All that the above results needed were those new tracepoints
221in include/tracing/events/kmem.h.
222
223 Ingo
224
225
diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index 1dbc1eeb4c0..6be696b0a2b 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -29,13 +29,67 @@ OPTIONS
29 Select the PMU event. Selection can be a symbolic event name 29 Select the PMU event. Selection can be a symbolic event name
30 (use 'perf list' to list all events) or a raw PMU 30 (use 'perf list' to list all events) or a raw PMU
31 event (eventsel+umask) in the form of rNNN where NNN is a 31 event (eventsel+umask) in the form of rNNN where NNN is a
32 hexadecimal event descriptor. 32 hexadecimal event descriptor.
33 33
34-a:: 34-a::
35 system-wide collection 35 System-wide collection.
36 36
37-l:: 37-l::
38 scale counter values 38 Scale counter values.
39
40-p::
41--pid=::
42 Record events on existing pid.
43
44-r::
45--realtime=::
46 Collect data with this RT SCHED_FIFO priority.
47-A::
48--append::
49 Append to the output file to do incremental profiling.
50
51-f::
52--force::
53 Overwrite existing data file.
54
55-c::
56--count=::
57 Event period to sample.
58
59-o::
60--output=::
61 Output file name.
62
63-i::
64--inherit::
65 Child tasks inherit counters.
66-F::
67--freq=::
68 Profile at this frequency.
69
70-m::
71--mmap-pages=::
72 Number of mmap data pages.
73
74-g::
75--call-graph::
76 Do call-graph (stack chain/backtrace) recording.
77
78-v::
79--verbose::
80 Be more verbose (show counter open errors, etc).
81
82-s::
83--stat::
84 Per thread counts.
85
86-d::
87--data::
88 Sample addresses.
89
90-n::
91--no-samples::
92 Don't sample.
39 93
40SEE ALSO 94SEE ALSO
41-------- 95--------
diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index 8aa3f8c8870..e72e9311078 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -24,6 +24,9 @@ OPTIONS
24--dsos=:: 24--dsos=::
25 Only consider symbols in these dsos. CSV that understands 25 Only consider symbols in these dsos. CSV that understands
26 file://filename entries. 26 file://filename entries.
27-n
28--show-nr-samples
29 Show the number of samples for each symbol
27-C:: 30-C::
28--comms=:: 31--comms=::
29 Only consider symbols in these comms. CSV that understands 32 Only consider symbols in these comms. CSV that understands
@@ -33,6 +36,18 @@ OPTIONS
33 Only consider these symbols. CSV that understands 36 Only consider these symbols. CSV that understands
34 file://filename entries. 37 file://filename entries.
35 38
39-w::
40--field-width=::
41 Force each column width to the provided list, for large terminal
42 readability.
43
44-t::
45--field-separator=::
46
47 Use a special separator character and don't pad with spaces, replacing
48 all occurances of this separator in symbol names (and other output)
49 with a '.' character, that thus it's the only non valid separator.
50
36SEE ALSO 51SEE ALSO
37-------- 52--------
38linkperf:perf-stat[1] 53linkperf:perf-stat[1]
diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt
index 0d74346d21a..484080dd5b6 100644
--- a/tools/perf/Documentation/perf-stat.txt
+++ b/tools/perf/Documentation/perf-stat.txt
@@ -40,7 +40,7 @@ OPTIONS
40-a:: 40-a::
41 system-wide collection 41 system-wide collection
42 42
43-S:: 43-c::
44 scale counter values 44 scale counter values
45 45
46EXAMPLES 46EXAMPLES
diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt
index 539d0128972..4a7d558dc30 100644
--- a/tools/perf/Documentation/perf-top.txt
+++ b/tools/perf/Documentation/perf-top.txt
@@ -3,36 +3,122 @@ perf-top(1)
3 3
4NAME 4NAME
5---- 5----
6perf-top - Run a command and profile it 6perf-top - System profiling tool.
7 7
8SYNOPSIS 8SYNOPSIS
9-------- 9--------
10[verse] 10[verse]
11'perf top' [-e <EVENT> | --event=EVENT] [-l] [-a] <command> 11'perf top' [-e <EVENT> | --event=EVENT] [<options>]
12 12
13DESCRIPTION 13DESCRIPTION
14----------- 14-----------
15This command runs a command and gathers a performance counter profile 15This command generates and displays a performance counter profile in realtime.
16from it.
17 16
18 17
19OPTIONS 18OPTIONS
20------- 19-------
21<command>...:: 20-a::
22 Any command you can specify in a shell. 21--all-cpus::
22 System-wide collection. (default)
23
24-c <count>::
25--count=<count>::
26 Event period to sample.
27
28-C <cpu>::
29--CPU=<cpu>::
30 CPU to profile.
31
32-d <seconds>::
33--delay=<seconds>::
34 Number of seconds to delay between refreshes.
23 35
24-e:: 36-e <event>::
25--event=:: 37--event=<event>::
26 Select the PMU event. Selection can be a symbolic event name 38 Select the PMU event. Selection can be a symbolic event name
27 (use 'perf list' to list all events) or a raw PMU 39 (use 'perf list' to list all events) or a raw PMU
28 event (eventsel+umask) in the form of rNNN where NNN is a 40 event (eventsel+umask) in the form of rNNN where NNN is a
29 hexadecimal event descriptor. 41 hexadecimal event descriptor.
30 42
31-a:: 43-E <entries>::
32 system-wide collection 44--entries=<entries>::
45 Display this many functions.
46
47-f <count>::
48--count-filter=<count>::
49 Only display functions with more events than this.
50
51-F <freq>::
52--freq=<freq>::
53 Profile at this frequency.
54
55-i::
56--inherit::
57 Child tasks inherit counters, only makes sens with -p option.
58
59-k <path>::
60--vmlinux=<path>::
61 Path to vmlinux. Required for annotation functionality.
62
63-m <pages>::
64--mmap-pages=<pages>::
65 Number of mmapped data pages.
66
67-p <pid>::
68--pid=<pid>::
69 Profile events on existing pid.
70
71-r <priority>::
72--realtime=<priority>::
73 Collect data with this RT SCHED_FIFO priority.
74
75-s <symbol>::
76--sym-annotate=<symbol>::
77 Annotate this symbol. Requires -k option.
78
79-v::
80--verbose::
81 Be more verbose (show counter open errors, etc).
82
83-z::
84--zero::
85 Zero history across display updates.
86
87INTERACTIVE PROMPTING KEYS
88--------------------------
89
90[d]::
91 Display refresh delay.
92
93[e]::
94 Number of entries to display.
95
96[E]::
97 Event to display when multiple counters are active.
98
99[f]::
100 Profile display filter (>= hit count).
101
102[F]::
103 Annotation display filter (>= % of total).
104
105[s]::
106 Annotate symbol.
107
108[S]::
109 Stop annotation, return to full profile display.
110
111[w]::
112 Toggle between weighted sum and individual count[E]r profile.
113
114[z]::
115 Toggle event count zeroing across display updates.
116
117[qQ]::
118 Quit.
119
120Pressing any unmapped key displays a menu, and prompts for input.
33 121
34-l::
35 scale counter values
36 122
37SEE ALSO 123SEE ALSO
38-------- 124--------
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 7822b3d6bac..c045b4271e5 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -158,8 +158,10 @@ uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
158uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') 158uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
159 159
160# If we're on a 64-bit kernel, use -m64 160# If we're on a 64-bit kernel, use -m64
161ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M)) 161ifndef NO_64BIT
162 M64 := -m64 162 ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M))
163 M64 := -m64
164 endif
163endif 165endif
164 166
165# CFLAGS and LDFLAGS are for the users to override from the command line. 167# CFLAGS and LDFLAGS are for the users to override from the command line.
@@ -345,7 +347,6 @@ BUILTIN_OBJS += builtin-stat.o
345BUILTIN_OBJS += builtin-top.o 347BUILTIN_OBJS += builtin-top.o
346 348
347PERFLIBS = $(LIB_FILE) 349PERFLIBS = $(LIB_FILE)
348EXTLIBS =
349 350
350# 351#
351# Platform specific tweaks 352# Platform specific tweaks
@@ -374,6 +375,39 @@ ifeq ($(uname_S),Darwin)
374 PTHREAD_LIBS = 375 PTHREAD_LIBS =
375endif 376endif
376 377
378ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y)
379 msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel);
380endif
381
382ifdef NO_DEMANGLE
383 BASIC_CFLAGS += -DNO_DEMANGLE
384else
385 has_bfd := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) -lbfd > /dev/null 2>&1 && echo y")
386
387 ifeq ($(has_bfd),y)
388 EXTLIBS += -lbfd
389 else
390 has_bfd_iberty := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) -lbfd -liberty > /dev/null 2>&1 && echo y")
391 ifeq ($(has_bfd_iberty),y)
392 EXTLIBS += -lbfd -liberty
393 else
394 has_bfd_iberty_z := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) -lbfd -liberty -lz > /dev/null 2>&1 && echo y")
395 ifeq ($(has_bfd_iberty_z),y)
396 EXTLIBS += -lbfd -liberty -lz
397 else
398 has_cplus_demangle := $(shell sh -c "(echo 'extern char *cplus_demangle(const char *, int);'; echo 'int main(void) { cplus_demangle(0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) -liberty > /dev/null 2>&1 && echo y")
399 ifeq ($(has_cplus_demangle),y)
400 EXTLIBS += -liberty
401 BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
402 else
403 msg := $(warning No bfd.h/libbfd found, install binutils-dev[el] to gain symbol demangling)
404 BASIC_CFLAGS += -DNO_DEMANGLE
405 endif
406 endif
407 endif
408 endif
409endif
410
377ifndef CC_LD_DYNPATH 411ifndef CC_LD_DYNPATH
378 ifdef NO_R_TO_GCC_LINKER 412 ifdef NO_R_TO_GCC_LINKER
379 # Some gcc does not accept and pass -R to the linker to specify 413 # Some gcc does not accept and pass -R to the linker to specify
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 5f9eefecc57..1dba568e194 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -74,20 +74,12 @@ struct fork_event {
74 u32 pid, ppid; 74 u32 pid, ppid;
75}; 75};
76 76
77struct period_event {
78 struct perf_event_header header;
79 u64 time;
80 u64 id;
81 u64 sample_period;
82};
83
84typedef union event_union { 77typedef union event_union {
85 struct perf_event_header header; 78 struct perf_event_header header;
86 struct ip_event ip; 79 struct ip_event ip;
87 struct mmap_event mmap; 80 struct mmap_event mmap;
88 struct comm_event comm; 81 struct comm_event comm;
89 struct fork_event fork; 82 struct fork_event fork;
90 struct period_event period;
91} event_t; 83} event_t;
92 84
93 85
@@ -998,19 +990,6 @@ process_fork_event(event_t *event, unsigned long offset, unsigned long head)
998} 990}
999 991
1000static int 992static int
1001process_period_event(event_t *event, unsigned long offset, unsigned long head)
1002{
1003 dprintf("%p [%p]: PERF_EVENT_PERIOD: time:%Ld, id:%Ld: period:%Ld\n",
1004 (void *)(offset + head),
1005 (void *)(long)(event->header.size),
1006 event->period.time,
1007 event->period.id,
1008 event->period.sample_period);
1009
1010 return 0;
1011}
1012
1013static int
1014process_event(event_t *event, unsigned long offset, unsigned long head) 993process_event(event_t *event, unsigned long offset, unsigned long head)
1015{ 994{
1016 switch (event->header.type) { 995 switch (event->header.type) {
@@ -1025,9 +1004,6 @@ process_event(event_t *event, unsigned long offset, unsigned long head)
1025 1004
1026 case PERF_EVENT_FORK: 1005 case PERF_EVENT_FORK:
1027 return process_fork_event(event, offset, head); 1006 return process_fork_event(event, offset, head);
1028
1029 case PERF_EVENT_PERIOD:
1030 return process_period_event(event, offset, head);
1031 /* 1007 /*
1032 * We dont process them right now but they are fine: 1008 * We dont process them right now but they are fine:
1033 */ 1009 */
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index f990fa8a35c..d88c6961274 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -10,11 +10,12 @@
10 10
11#include "perf.h" 11#include "perf.h"
12 12
13#include "util/parse-options.h"
14#include "util/parse-events.h" 13#include "util/parse-events.h"
14#include "util/cache.h"
15 15
16int cmd_list(int argc __used, const char **argv __used, const char *prefix __used) 16int cmd_list(int argc __used, const char **argv __used, const char *prefix __used)
17{ 17{
18 setup_pager();
18 print_events(); 19 print_events();
19 return 0; 20 return 0;
20} 21}
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 4ef78a5e6f3..3d051b9cf25 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -34,7 +34,9 @@ static int output;
34static const char *output_name = "perf.data"; 34static const char *output_name = "perf.data";
35static int group = 0; 35static int group = 0;
36static unsigned int realtime_prio = 0; 36static unsigned int realtime_prio = 0;
37static int raw_samples = 0;
37static int system_wide = 0; 38static int system_wide = 0;
39static int profile_cpu = -1;
38static pid_t target_pid = -1; 40static pid_t target_pid = -1;
39static int inherit = 1; 41static int inherit = 1;
40static int force = 0; 42static int force = 0;
@@ -43,6 +45,7 @@ static int call_graph = 0;
43static int verbose = 0; 45static int verbose = 0;
44static int inherit_stat = 0; 46static int inherit_stat = 0;
45static int no_samples = 0; 47static int no_samples = 0;
48static int sample_address = 0;
46 49
47static long samples; 50static long samples;
48static struct timeval last_read; 51static struct timeval last_read;
@@ -202,46 +205,48 @@ static void sig_atexit(void)
202 kill(getpid(), signr); 205 kill(getpid(), signr);
203} 206}
204 207
205static void pid_synthesize_comm_event(pid_t pid, int full) 208static pid_t pid_synthesize_comm_event(pid_t pid, int full)
206{ 209{
207 struct comm_event comm_ev; 210 struct comm_event comm_ev;
208 char filename[PATH_MAX]; 211 char filename[PATH_MAX];
209 char bf[BUFSIZ]; 212 char bf[BUFSIZ];
210 int fd; 213 FILE *fp;
211 size_t size; 214 size_t size = 0;
212 char *field, *sep;
213 DIR *tasks; 215 DIR *tasks;
214 struct dirent dirent, *next; 216 struct dirent dirent, *next;
217 pid_t tgid = 0;
215 218
216 snprintf(filename, sizeof(filename), "/proc/%d/stat", pid); 219 snprintf(filename, sizeof(filename), "/proc/%d/status", pid);
217 220
218 fd = open(filename, O_RDONLY); 221 fp = fopen(filename, "r");
219 if (fd < 0) { 222 if (fd == NULL) {
220 /* 223 /*
221 * We raced with a task exiting - just return: 224 * We raced with a task exiting - just return:
222 */ 225 */
223 if (verbose) 226 if (verbose)
224 fprintf(stderr, "couldn't open %s\n", filename); 227 fprintf(stderr, "couldn't open %s\n", filename);
225 return; 228 return 0;
226 } 229 }
227 if (read(fd, bf, sizeof(bf)) < 0) {
228 fprintf(stderr, "couldn't read %s\n", filename);
229 exit(EXIT_FAILURE);
230 }
231 close(fd);
232 230
233 /* 9027 (cat) R 6747 9027 6747 34816 9027 ... */
234 memset(&comm_ev, 0, sizeof(comm_ev)); 231 memset(&comm_ev, 0, sizeof(comm_ev));
235 field = strchr(bf, '('); 232 while (!comm_ev.comm[0] || !comm_ev.pid) {
236 if (field == NULL) 233 if (fgets(bf, sizeof(bf), fp) == NULL)
237 goto out_failure; 234 goto out_failure;
238 sep = strchr(++field, ')'); 235
239 if (sep == NULL) 236 if (memcmp(bf, "Name:", 5) == 0) {
240 goto out_failure; 237 char *name = bf + 5;
241 size = sep - field; 238 while (*name && isspace(*name))
242 memcpy(comm_ev.comm, field, size++); 239 ++name;
243 240 size = strlen(name) - 1;
244 comm_ev.pid = pid; 241 memcpy(comm_ev.comm, name, size++);
242 } else if (memcmp(bf, "Tgid:", 5) == 0) {
243 char *tgids = bf + 5;
244 while (*tgids && isspace(*tgids))
245 ++tgids;
246 tgid = comm_ev.pid = atoi(tgids);
247 }
248 }
249
245 comm_ev.header.type = PERF_EVENT_COMM; 250 comm_ev.header.type = PERF_EVENT_COMM;
246 size = ALIGN(size, sizeof(u64)); 251 size = ALIGN(size, sizeof(u64));
247 comm_ev.header.size = sizeof(comm_ev) - (sizeof(comm_ev.comm) - size); 252 comm_ev.header.size = sizeof(comm_ev) - (sizeof(comm_ev.comm) - size);
@@ -250,7 +255,7 @@ static void pid_synthesize_comm_event(pid_t pid, int full)
250 comm_ev.tid = pid; 255 comm_ev.tid = pid;
251 256
252 write_output(&comm_ev, comm_ev.header.size); 257 write_output(&comm_ev, comm_ev.header.size);
253 return; 258 goto out_fclose;
254 } 259 }
255 260
256 snprintf(filename, sizeof(filename), "/proc/%d/task", pid); 261 snprintf(filename, sizeof(filename), "/proc/%d/task", pid);
@@ -267,7 +272,10 @@ static void pid_synthesize_comm_event(pid_t pid, int full)
267 write_output(&comm_ev, comm_ev.header.size); 272 write_output(&comm_ev, comm_ev.header.size);
268 } 273 }
269 closedir(tasks); 274 closedir(tasks);
270 return; 275
276out_fclose:
277 fclose(fp);
278 return tgid;
271 279
272out_failure: 280out_failure:
273 fprintf(stderr, "couldn't get COMM and pgid, malformed %s\n", 281 fprintf(stderr, "couldn't get COMM and pgid, malformed %s\n",
@@ -275,7 +283,7 @@ out_failure:
275 exit(EXIT_FAILURE); 283 exit(EXIT_FAILURE);
276} 284}
277 285
278static void pid_synthesize_mmap_samples(pid_t pid) 286static void pid_synthesize_mmap_samples(pid_t pid, pid_t tgid)
279{ 287{
280 char filename[PATH_MAX]; 288 char filename[PATH_MAX];
281 FILE *fp; 289 FILE *fp;
@@ -313,6 +321,10 @@ static void pid_synthesize_mmap_samples(pid_t pid)
313 if (*pbf == 'x') { /* vm_exec */ 321 if (*pbf == 'x') { /* vm_exec */
314 char *execname = strchr(bf, '/'); 322 char *execname = strchr(bf, '/');
315 323
324 /* Catch VDSO */
325 if (execname == NULL)
326 execname = strstr(bf, "[vdso]");
327
316 if (execname == NULL) 328 if (execname == NULL)
317 continue; 329 continue;
318 330
@@ -323,7 +335,7 @@ static void pid_synthesize_mmap_samples(pid_t pid)
323 mmap_ev.len -= mmap_ev.start; 335 mmap_ev.len -= mmap_ev.start;
324 mmap_ev.header.size = (sizeof(mmap_ev) - 336 mmap_ev.header.size = (sizeof(mmap_ev) -
325 (sizeof(mmap_ev.filename) - size)); 337 (sizeof(mmap_ev.filename) - size));
326 mmap_ev.pid = pid; 338 mmap_ev.pid = tgid;
327 mmap_ev.tid = pid; 339 mmap_ev.tid = pid;
328 340
329 write_output(&mmap_ev, mmap_ev.header.size); 341 write_output(&mmap_ev, mmap_ev.header.size);
@@ -342,14 +354,14 @@ static void synthesize_all(void)
342 354
343 while (!readdir_r(proc, &dirent, &next) && next) { 355 while (!readdir_r(proc, &dirent, &next) && next) {
344 char *end; 356 char *end;
345 pid_t pid; 357 pid_t pid, tgid;
346 358
347 pid = strtol(dirent.d_name, &end, 10); 359 pid = strtol(dirent.d_name, &end, 10);
348 if (*end) /* only interested in proper numerical dirents */ 360 if (*end) /* only interested in proper numerical dirents */
349 continue; 361 continue;
350 362
351 pid_synthesize_comm_event(pid, 1); 363 tgid = pid_synthesize_comm_event(pid, 1);
352 pid_synthesize_mmap_samples(pid); 364 pid_synthesize_mmap_samples(pid, tgid);
353 } 365 }
354 366
355 closedir(proc); 367 closedir(proc);
@@ -387,7 +399,7 @@ static void create_counter(int counter, int cpu, pid_t pid)
387 PERF_FORMAT_TOTAL_TIME_RUNNING | 399 PERF_FORMAT_TOTAL_TIME_RUNNING |
388 PERF_FORMAT_ID; 400 PERF_FORMAT_ID;
389 401
390 attr->sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID; 402 attr->sample_type |= PERF_SAMPLE_IP | PERF_SAMPLE_TID;
391 403
392 if (freq) { 404 if (freq) {
393 attr->sample_type |= PERF_SAMPLE_PERIOD; 405 attr->sample_type |= PERF_SAMPLE_PERIOD;
@@ -401,9 +413,15 @@ static void create_counter(int counter, int cpu, pid_t pid)
401 if (inherit_stat) 413 if (inherit_stat)
402 attr->inherit_stat = 1; 414 attr->inherit_stat = 1;
403 415
416 if (sample_address)
417 attr->sample_type |= PERF_SAMPLE_ADDR;
418
404 if (call_graph) 419 if (call_graph)
405 attr->sample_type |= PERF_SAMPLE_CALLCHAIN; 420 attr->sample_type |= PERF_SAMPLE_CALLCHAIN;
406 421
422 if (raw_samples)
423 attr->sample_type |= PERF_SAMPLE_RAW;
424
407 attr->mmap = track; 425 attr->mmap = track;
408 attr->comm = track; 426 attr->comm = track;
409 attr->inherit = (cpu < 0) && inherit; 427 attr->inherit = (cpu < 0) && inherit;
@@ -417,6 +435,8 @@ try_again:
417 435
418 if (err == EPERM) 436 if (err == EPERM)
419 die("Permission error - are you root?\n"); 437 die("Permission error - are you root?\n");
438 else if (err == ENODEV && profile_cpu != -1)
439 die("No such device - did you specify an out-of-range profile CPU?\n");
420 440
421 /* 441 /*
422 * If it's cycles then fall back to hrtimer 442 * If it's cycles then fall back to hrtimer
@@ -516,10 +536,14 @@ static int __cmd_record(int argc, const char **argv)
516 signal(SIGCHLD, sig_handler); 536 signal(SIGCHLD, sig_handler);
517 signal(SIGINT, sig_handler); 537 signal(SIGINT, sig_handler);
518 538
519 if (!stat(output_name, &st) && !force && !append_file) { 539 if (!stat(output_name, &st) && st.st_size) {
520 fprintf(stderr, "Error, output file %s exists, use -A to append or -f to overwrite.\n", 540 if (!force && !append_file) {
521 output_name); 541 fprintf(stderr, "Error, output file %s exists, use -A to append or -f to overwrite.\n",
522 exit(-1); 542 output_name);
543 exit(-1);
544 }
545 } else {
546 append_file = 0;
523 } 547 }
524 548
525 flags = O_CREAT|O_RDWR; 549 flags = O_CREAT|O_RDWR;
@@ -546,16 +570,22 @@ static int __cmd_record(int argc, const char **argv)
546 if (pid == -1) 570 if (pid == -1)
547 pid = getpid(); 571 pid = getpid();
548 572
549 open_counters(-1, pid); 573 open_counters(profile_cpu, pid);
550 } else for (i = 0; i < nr_cpus; i++) 574 } else {
551 open_counters(i, target_pid); 575 if (profile_cpu != -1) {
576 open_counters(profile_cpu, target_pid);
577 } else {
578 for (i = 0; i < nr_cpus; i++)
579 open_counters(i, target_pid);
580 }
581 }
552 582
553 if (file_new) 583 if (file_new)
554 perf_header__write(header, output); 584 perf_header__write(header, output);
555 585
556 if (!system_wide) { 586 if (!system_wide) {
557 pid_synthesize_comm_event(pid, 0); 587 pid_t tgid = pid_synthesize_comm_event(pid, 0);
558 pid_synthesize_mmap_samples(pid); 588 pid_synthesize_mmap_samples(pid, tgid);
559 } else 589 } else
560 synthesize_all(); 590 synthesize_all();
561 591
@@ -623,10 +653,14 @@ static const struct option options[] = {
623 "record events on existing pid"), 653 "record events on existing pid"),
624 OPT_INTEGER('r', "realtime", &realtime_prio, 654 OPT_INTEGER('r', "realtime", &realtime_prio,
625 "collect data with this RT SCHED_FIFO priority"), 655 "collect data with this RT SCHED_FIFO priority"),
656 OPT_BOOLEAN('R', "raw-samples", &raw_samples,
657 "collect raw sample records from all opened counters"),
626 OPT_BOOLEAN('a', "all-cpus", &system_wide, 658 OPT_BOOLEAN('a', "all-cpus", &system_wide,
627 "system-wide collection from all CPUs"), 659 "system-wide collection from all CPUs"),
628 OPT_BOOLEAN('A', "append", &append_file, 660 OPT_BOOLEAN('A', "append", &append_file,
629 "append to the output file to do incremental profiling"), 661 "append to the output file to do incremental profiling"),
662 OPT_INTEGER('C', "profile_cpu", &profile_cpu,
663 "CPU to profile on"),
630 OPT_BOOLEAN('f', "force", &force, 664 OPT_BOOLEAN('f', "force", &force,
631 "overwrite existing data file"), 665 "overwrite existing data file"),
632 OPT_LONG('c', "count", &default_interval, 666 OPT_LONG('c', "count", &default_interval,
@@ -645,6 +679,8 @@ static const struct option options[] = {
645 "be more verbose (show counter open errors, etc)"), 679 "be more verbose (show counter open errors, etc)"),
646 OPT_BOOLEAN('s', "stat", &inherit_stat, 680 OPT_BOOLEAN('s', "stat", &inherit_stat,
647 "per thread counts"), 681 "per thread counts"),
682 OPT_BOOLEAN('d', "data", &sample_address,
683 "Sample addresses"),
648 OPT_BOOLEAN('n', "no-samples", &no_samples, 684 OPT_BOOLEAN('n', "no-samples", &no_samples,
649 "don't sample"), 685 "don't sample"),
650 OPT_END() 686 OPT_END()
@@ -654,7 +690,8 @@ int cmd_record(int argc, const char **argv, const char *prefix __used)
654{ 690{
655 int counter; 691 int counter;
656 692
657 argc = parse_options(argc, argv, options, record_usage, 0); 693 argc = parse_options(argc, argv, options, record_usage,
694 PARSE_OPT_STOP_AT_NON_OPTION);
658 if (!argc && target_pid == -1 && !system_wide) 695 if (!argc && target_pid == -1 && !system_wide)
659 usage_with_options(record_usage, options); 696 usage_with_options(record_usage, options);
660 697
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 4e5cc266311..b53a60fc12d 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -31,10 +31,12 @@
31static char const *input_name = "perf.data"; 31static char const *input_name = "perf.data";
32static char *vmlinux = NULL; 32static char *vmlinux = NULL;
33 33
34static char default_sort_order[] = "comm,dso"; 34static char default_sort_order[] = "comm,dso,symbol";
35static char *sort_order = default_sort_order; 35static char *sort_order = default_sort_order;
36static char *dso_list_str, *comm_list_str, *sym_list_str; 36static char *dso_list_str, *comm_list_str, *sym_list_str,
37 *col_width_list_str;
37static struct strlist *dso_list, *comm_list, *sym_list; 38static struct strlist *dso_list, *comm_list, *sym_list;
39static char *field_sep;
38 40
39static int input; 41static int input;
40static int show_mask = SHOW_KERNEL | SHOW_USER | SHOW_HV; 42static int show_mask = SHOW_KERNEL | SHOW_USER | SHOW_HV;
@@ -49,6 +51,7 @@ static int verbose;
49static int modules; 51static int modules;
50 52
51static int full_paths; 53static int full_paths;
54static int show_nr_samples;
52 55
53static unsigned long page_size; 56static unsigned long page_size;
54static unsigned long mmap_window = 32; 57static unsigned long mmap_window = 32;
@@ -65,7 +68,7 @@ static int callchain;
65 68
66static 69static
67struct callchain_param callchain_param = { 70struct callchain_param callchain_param = {
68 .mode = CHAIN_GRAPH_ABS, 71 .mode = CHAIN_GRAPH_REL,
69 .min_percent = 0.5 72 .min_percent = 0.5
70}; 73};
71 74
@@ -96,13 +99,7 @@ struct comm_event {
96struct fork_event { 99struct fork_event {
97 struct perf_event_header header; 100 struct perf_event_header header;
98 u32 pid, ppid; 101 u32 pid, ppid;
99}; 102 u32 tid, ptid;
100
101struct period_event {
102 struct perf_event_header header;
103 u64 time;
104 u64 id;
105 u64 sample_period;
106}; 103};
107 104
108struct lost_event { 105struct lost_event {
@@ -115,7 +112,9 @@ struct read_event {
115 struct perf_event_header header; 112 struct perf_event_header header;
116 u32 pid,tid; 113 u32 pid,tid;
117 u64 value; 114 u64 value;
118 u64 format[3]; 115 u64 time_enabled;
116 u64 time_running;
117 u64 id;
119}; 118};
120 119
121typedef union event_union { 120typedef union event_union {
@@ -124,11 +123,37 @@ typedef union event_union {
124 struct mmap_event mmap; 123 struct mmap_event mmap;
125 struct comm_event comm; 124 struct comm_event comm;
126 struct fork_event fork; 125 struct fork_event fork;
127 struct period_event period;
128 struct lost_event lost; 126 struct lost_event lost;
129 struct read_event read; 127 struct read_event read;
130} event_t; 128} event_t;
131 129
130static int repsep_fprintf(FILE *fp, const char *fmt, ...)
131{
132 int n;
133 va_list ap;
134
135 va_start(ap, fmt);
136 if (!field_sep)
137 n = vfprintf(fp, fmt, ap);
138 else {
139 char *bf = NULL;
140 n = vasprintf(&bf, fmt, ap);
141 if (n > 0) {
142 char *sep = bf;
143 while (1) {
144 sep = strchr(sep, *field_sep);
145 if (sep == NULL)
146 break;
147 *sep = '.';
148 }
149 }
150 fputs(bf, fp);
151 free(bf);
152 }
153 va_end(ap);
154 return n;
155}
156
132static LIST_HEAD(dsos); 157static LIST_HEAD(dsos);
133static struct dso *kernel_dso; 158static struct dso *kernel_dso;
134static struct dso *vdso; 159static struct dso *vdso;
@@ -230,7 +255,7 @@ static int strcommon(const char *pathname)
230{ 255{
231 int n = 0; 256 int n = 0;
232 257
233 while (pathname[n] == cwd[n] && n < cwdlen) 258 while (n < cwdlen && pathname[n] == cwd[n])
234 ++n; 259 ++n;
235 260
236 return n; 261 return n;
@@ -360,12 +385,28 @@ static struct thread *thread__new(pid_t pid)
360 return self; 385 return self;
361} 386}
362 387
388static unsigned int dsos__col_width,
389 comms__col_width,
390 threads__col_width;
391
363static int thread__set_comm(struct thread *self, const char *comm) 392static int thread__set_comm(struct thread *self, const char *comm)
364{ 393{
365 if (self->comm) 394 if (self->comm)
366 free(self->comm); 395 free(self->comm);
367 self->comm = strdup(comm); 396 self->comm = strdup(comm);
368 return self->comm ? 0 : -ENOMEM; 397 if (!self->comm)
398 return -ENOMEM;
399
400 if (!col_width_list_str && !field_sep &&
401 (!comm_list || strlist__has_entry(comm_list, comm))) {
402 unsigned int slen = strlen(comm);
403 if (slen > comms__col_width) {
404 comms__col_width = slen;
405 threads__col_width = slen + 6;
406 }
407 }
408
409 return 0;
369} 410}
370 411
371static size_t thread__fprintf(struct thread *self, FILE *fp) 412static size_t thread__fprintf(struct thread *self, FILE *fp)
@@ -536,7 +577,9 @@ struct sort_entry {
536 577
537 int64_t (*cmp)(struct hist_entry *, struct hist_entry *); 578 int64_t (*cmp)(struct hist_entry *, struct hist_entry *);
538 int64_t (*collapse)(struct hist_entry *, struct hist_entry *); 579 int64_t (*collapse)(struct hist_entry *, struct hist_entry *);
539 size_t (*print)(FILE *fp, struct hist_entry *); 580 size_t (*print)(FILE *fp, struct hist_entry *, unsigned int width);
581 unsigned int *width;
582 bool elide;
540}; 583};
541 584
542static int64_t cmp_null(void *l, void *r) 585static int64_t cmp_null(void *l, void *r)
@@ -558,15 +601,17 @@ sort__thread_cmp(struct hist_entry *left, struct hist_entry *right)
558} 601}
559 602
560static size_t 603static size_t
561sort__thread_print(FILE *fp, struct hist_entry *self) 604sort__thread_print(FILE *fp, struct hist_entry *self, unsigned int width)
562{ 605{
563 return fprintf(fp, "%16s:%5d", self->thread->comm ?: "", self->thread->pid); 606 return repsep_fprintf(fp, "%*s:%5d", width - 6,
607 self->thread->comm ?: "", self->thread->pid);
564} 608}
565 609
566static struct sort_entry sort_thread = { 610static struct sort_entry sort_thread = {
567 .header = " Command: Pid", 611 .header = "Command: Pid",
568 .cmp = sort__thread_cmp, 612 .cmp = sort__thread_cmp,
569 .print = sort__thread_print, 613 .print = sort__thread_print,
614 .width = &threads__col_width,
570}; 615};
571 616
572/* --sort comm */ 617/* --sort comm */
@@ -590,16 +635,17 @@ sort__comm_collapse(struct hist_entry *left, struct hist_entry *right)
590} 635}
591 636
592static size_t 637static size_t
593sort__comm_print(FILE *fp, struct hist_entry *self) 638sort__comm_print(FILE *fp, struct hist_entry *self, unsigned int width)
594{ 639{
595 return fprintf(fp, "%16s", self->thread->comm); 640 return repsep_fprintf(fp, "%*s", width, self->thread->comm);
596} 641}
597 642
598static struct sort_entry sort_comm = { 643static struct sort_entry sort_comm = {
599 .header = " Command", 644 .header = "Command",
600 .cmp = sort__comm_cmp, 645 .cmp = sort__comm_cmp,
601 .collapse = sort__comm_collapse, 646 .collapse = sort__comm_collapse,
602 .print = sort__comm_print, 647 .print = sort__comm_print,
648 .width = &comms__col_width,
603}; 649};
604 650
605/* --sort dso */ 651/* --sort dso */
@@ -617,18 +663,19 @@ sort__dso_cmp(struct hist_entry *left, struct hist_entry *right)
617} 663}
618 664
619static size_t 665static size_t
620sort__dso_print(FILE *fp, struct hist_entry *self) 666sort__dso_print(FILE *fp, struct hist_entry *self, unsigned int width)
621{ 667{
622 if (self->dso) 668 if (self->dso)
623 return fprintf(fp, "%-25s", self->dso->name); 669 return repsep_fprintf(fp, "%-*s", width, self->dso->name);
624 670
625 return fprintf(fp, "%016llx ", (u64)self->ip); 671 return repsep_fprintf(fp, "%*llx", width, (u64)self->ip);
626} 672}
627 673
628static struct sort_entry sort_dso = { 674static struct sort_entry sort_dso = {
629 .header = "Shared Object ", 675 .header = "Shared Object",
630 .cmp = sort__dso_cmp, 676 .cmp = sort__dso_cmp,
631 .print = sort__dso_print, 677 .print = sort__dso_print,
678 .width = &dsos__col_width,
632}; 679};
633 680
634/* --sort symbol */ 681/* --sort symbol */
@@ -648,22 +695,23 @@ sort__sym_cmp(struct hist_entry *left, struct hist_entry *right)
648} 695}
649 696
650static size_t 697static size_t
651sort__sym_print(FILE *fp, struct hist_entry *self) 698sort__sym_print(FILE *fp, struct hist_entry *self, unsigned int width __used)
652{ 699{
653 size_t ret = 0; 700 size_t ret = 0;
654 701
655 if (verbose) 702 if (verbose)
656 ret += fprintf(fp, "%#018llx ", (u64)self->ip); 703 ret += repsep_fprintf(fp, "%#018llx %c ", (u64)self->ip,
704 dso__symtab_origin(self->dso));
657 705
706 ret += repsep_fprintf(fp, "[%c] ", self->level);
658 if (self->sym) { 707 if (self->sym) {
659 ret += fprintf(fp, "[%c] %s", 708 ret += repsep_fprintf(fp, "%s", self->sym->name);
660 self->dso == kernel_dso ? 'k' :
661 self->dso == hypervisor_dso ? 'h' : '.', self->sym->name);
662 709
663 if (self->sym->module) 710 if (self->sym->module)
664 ret += fprintf(fp, "\t[%s]", self->sym->module->name); 711 ret += repsep_fprintf(fp, "\t[%s]",
712 self->sym->module->name);
665 } else { 713 } else {
666 ret += fprintf(fp, "%#016llx", (u64)self->ip); 714 ret += repsep_fprintf(fp, "%#016llx", (u64)self->ip);
667 } 715 }
668 716
669 return ret; 717 return ret;
@@ -690,19 +738,19 @@ sort__parent_cmp(struct hist_entry *left, struct hist_entry *right)
690} 738}
691 739
692static size_t 740static size_t
693sort__parent_print(FILE *fp, struct hist_entry *self) 741sort__parent_print(FILE *fp, struct hist_entry *self, unsigned int width)
694{ 742{
695 size_t ret = 0; 743 return repsep_fprintf(fp, "%-*s", width,
696 744 self->parent ? self->parent->name : "[other]");
697 ret += fprintf(fp, "%-20s", self->parent ? self->parent->name : "[other]");
698
699 return ret;
700} 745}
701 746
747static unsigned int parent_symbol__col_width;
748
702static struct sort_entry sort_parent = { 749static struct sort_entry sort_parent = {
703 .header = "Parent symbol ", 750 .header = "Parent symbol",
704 .cmp = sort__parent_cmp, 751 .cmp = sort__parent_cmp,
705 .print = sort__parent_print, 752 .print = sort__parent_print,
753 .width = &parent_symbol__col_width,
706}; 754};
707 755
708static int sort__need_collapse = 0; 756static int sort__need_collapse = 0;
@@ -843,6 +891,21 @@ ipchain__fprintf_graph(FILE *fp, struct callchain_list *chain, int depth,
843 return ret; 891 return ret;
844} 892}
845 893
894static struct symbol *rem_sq_bracket;
895static struct callchain_list rem_hits;
896
897static void init_rem_hits(void)
898{
899 rem_sq_bracket = malloc(sizeof(*rem_sq_bracket) + 6);
900 if (!rem_sq_bracket) {
901 fprintf(stderr, "Not enough memory to display remaining hits\n");
902 return;
903 }
904
905 strcpy(rem_sq_bracket->name, "[...]");
906 rem_hits.sym = rem_sq_bracket;
907}
908
846static size_t 909static size_t
847callchain__fprintf_graph(FILE *fp, struct callchain_node *self, 910callchain__fprintf_graph(FILE *fp, struct callchain_node *self,
848 u64 total_samples, int depth, int depth_mask) 911 u64 total_samples, int depth, int depth_mask)
@@ -852,25 +915,34 @@ callchain__fprintf_graph(FILE *fp, struct callchain_node *self,
852 struct callchain_list *chain; 915 struct callchain_list *chain;
853 int new_depth_mask = depth_mask; 916 int new_depth_mask = depth_mask;
854 u64 new_total; 917 u64 new_total;
918 u64 remaining;
855 size_t ret = 0; 919 size_t ret = 0;
856 int i; 920 int i;
857 921
858 if (callchain_param.mode == CHAIN_GRAPH_REL) 922 if (callchain_param.mode == CHAIN_GRAPH_REL)
859 new_total = self->cumul_hit; 923 new_total = self->children_hit;
860 else 924 else
861 new_total = total_samples; 925 new_total = total_samples;
862 926
927 remaining = new_total;
928
863 node = rb_first(&self->rb_root); 929 node = rb_first(&self->rb_root);
864 while (node) { 930 while (node) {
931 u64 cumul;
932
865 child = rb_entry(node, struct callchain_node, rb_node); 933 child = rb_entry(node, struct callchain_node, rb_node);
934 cumul = cumul_hits(child);
935 remaining -= cumul;
866 936
867 /* 937 /*
868 * The depth mask manages the output of pipes that show 938 * The depth mask manages the output of pipes that show
869 * the depth. We don't want to keep the pipes of the current 939 * the depth. We don't want to keep the pipes of the current
870 * level for the last child of this depth 940 * level for the last child of this depth.
941 * Except if we have remaining filtered hits. They will
942 * supersede the last child
871 */ 943 */
872 next = rb_next(node); 944 next = rb_next(node);
873 if (!next) 945 if (!next && (callchain_param.mode != CHAIN_GRAPH_REL || !remaining))
874 new_depth_mask &= ~(1 << (depth - 1)); 946 new_depth_mask &= ~(1 << (depth - 1));
875 947
876 /* 948 /*
@@ -885,7 +957,7 @@ callchain__fprintf_graph(FILE *fp, struct callchain_node *self,
885 ret += ipchain__fprintf_graph(fp, chain, depth, 957 ret += ipchain__fprintf_graph(fp, chain, depth,
886 new_depth_mask, i++, 958 new_depth_mask, i++,
887 new_total, 959 new_total,
888 child->cumul_hit); 960 cumul);
889 } 961 }
890 ret += callchain__fprintf_graph(fp, child, new_total, 962 ret += callchain__fprintf_graph(fp, child, new_total,
891 depth + 1, 963 depth + 1,
@@ -893,6 +965,19 @@ callchain__fprintf_graph(FILE *fp, struct callchain_node *self,
893 node = next; 965 node = next;
894 } 966 }
895 967
968 if (callchain_param.mode == CHAIN_GRAPH_REL &&
969 remaining && remaining != new_total) {
970
971 if (!rem_sq_bracket)
972 return ret;
973
974 new_depth_mask &= ~(1 << (depth - 1));
975
976 ret += ipchain__fprintf_graph(fp, &rem_hits, depth,
977 new_depth_mask, 0, new_total,
978 remaining);
979 }
980
896 return ret; 981 return ret;
897} 982}
898 983
@@ -967,17 +1052,25 @@ hist_entry__fprintf(FILE *fp, struct hist_entry *self, u64 total_samples)
967 return 0; 1052 return 0;
968 1053
969 if (total_samples) 1054 if (total_samples)
970 ret = percent_color_fprintf(fp, " %6.2f%%", 1055 ret = percent_color_fprintf(fp,
971 (self->count * 100.0) / total_samples); 1056 field_sep ? "%.2f" : " %6.2f%%",
1057 (self->count * 100.0) / total_samples);
972 else 1058 else
973 ret = fprintf(fp, "%12Ld ", self->count); 1059 ret = fprintf(fp, field_sep ? "%lld" : "%12lld ", self->count);
1060
1061 if (show_nr_samples) {
1062 if (field_sep)
1063 fprintf(fp, "%c%lld", *field_sep, self->count);
1064 else
1065 fprintf(fp, "%11lld", self->count);
1066 }
974 1067
975 list_for_each_entry(se, &hist_entry__sort_list, list) { 1068 list_for_each_entry(se, &hist_entry__sort_list, list) {
976 if (exclude_other && (se == &sort_parent)) 1069 if (se->elide)
977 continue; 1070 continue;
978 1071
979 fprintf(fp, " "); 1072 fprintf(fp, "%s", field_sep ?: " ");
980 ret += se->print(fp, self); 1073 ret += se->print(fp, self, se->width ? *se->width : 0);
981 } 1074 }
982 1075
983 ret += fprintf(fp, "\n"); 1076 ret += fprintf(fp, "\n");
@@ -992,6 +1085,18 @@ hist_entry__fprintf(FILE *fp, struct hist_entry *self, u64 total_samples)
992 * 1085 *
993 */ 1086 */
994 1087
1088static void dso__calc_col_width(struct dso *self)
1089{
1090 if (!col_width_list_str && !field_sep &&
1091 (!dso_list || strlist__has_entry(dso_list, self->name))) {
1092 unsigned int slen = strlen(self->name);
1093 if (slen > dsos__col_width)
1094 dsos__col_width = slen;
1095 }
1096
1097 self->slen_calculated = 1;
1098}
1099
995static struct symbol * 1100static struct symbol *
996resolve_symbol(struct thread *thread, struct map **mapp, 1101resolve_symbol(struct thread *thread, struct map **mapp,
997 struct dso **dsop, u64 *ipp) 1102 struct dso **dsop, u64 *ipp)
@@ -1011,6 +1116,14 @@ resolve_symbol(struct thread *thread, struct map **mapp,
1011 1116
1012 map = thread__find_map(thread, ip); 1117 map = thread__find_map(thread, ip);
1013 if (map != NULL) { 1118 if (map != NULL) {
1119 /*
1120 * We have to do this here as we may have a dso
1121 * with no symbol hit that has a name longer than
1122 * the ones with symbols sampled.
1123 */
1124 if (!sort_dso.elide && !map->dso->slen_calculated)
1125 dso__calc_col_width(map->dso);
1126
1014 if (mapp) 1127 if (mapp)
1015 *mapp = map; 1128 *mapp = map;
1016got_map: 1129got_map:
@@ -1282,35 +1395,69 @@ static size_t output__fprintf(FILE *fp, u64 total_samples)
1282 struct sort_entry *se; 1395 struct sort_entry *se;
1283 struct rb_node *nd; 1396 struct rb_node *nd;
1284 size_t ret = 0; 1397 size_t ret = 0;
1398 unsigned int width;
1399 char *col_width = col_width_list_str;
1285 1400
1286 fprintf(fp, "\n"); 1401 init_rem_hits();
1287 fprintf(fp, "#\n"); 1402
1288 fprintf(fp, "# (%Ld samples)\n", (u64)total_samples); 1403 fprintf(fp, "# Samples: %Ld\n", (u64)total_samples);
1289 fprintf(fp, "#\n"); 1404 fprintf(fp, "#\n");
1290 1405
1291 fprintf(fp, "# Overhead"); 1406 fprintf(fp, "# Overhead");
1407 if (show_nr_samples) {
1408 if (field_sep)
1409 fprintf(fp, "%cSamples", *field_sep);
1410 else
1411 fputs(" Samples ", fp);
1412 }
1292 list_for_each_entry(se, &hist_entry__sort_list, list) { 1413 list_for_each_entry(se, &hist_entry__sort_list, list) {
1293 if (exclude_other && (se == &sort_parent)) 1414 if (se->elide)
1415 continue;
1416 if (field_sep) {
1417 fprintf(fp, "%c%s", *field_sep, se->header);
1294 continue; 1418 continue;
1295 fprintf(fp, " %s", se->header); 1419 }
1420 width = strlen(se->header);
1421 if (se->width) {
1422 if (col_width_list_str) {
1423 if (col_width) {
1424 *se->width = atoi(col_width);
1425 col_width = strchr(col_width, ',');
1426 if (col_width)
1427 ++col_width;
1428 }
1429 }
1430 width = *se->width = max(*se->width, width);
1431 }
1432 fprintf(fp, " %*s", width, se->header);
1296 } 1433 }
1297 fprintf(fp, "\n"); 1434 fprintf(fp, "\n");
1298 1435
1436 if (field_sep)
1437 goto print_entries;
1438
1299 fprintf(fp, "# ........"); 1439 fprintf(fp, "# ........");
1440 if (show_nr_samples)
1441 fprintf(fp, " ..........");
1300 list_for_each_entry(se, &hist_entry__sort_list, list) { 1442 list_for_each_entry(se, &hist_entry__sort_list, list) {
1301 unsigned int i; 1443 unsigned int i;
1302 1444
1303 if (exclude_other && (se == &sort_parent)) 1445 if (se->elide)
1304 continue; 1446 continue;
1305 1447
1306 fprintf(fp, " "); 1448 fprintf(fp, " ");
1307 for (i = 0; i < strlen(se->header); i++) 1449 if (se->width)
1450 width = *se->width;
1451 else
1452 width = strlen(se->header);
1453 for (i = 0; i < width; i++)
1308 fprintf(fp, "."); 1454 fprintf(fp, ".");
1309 } 1455 }
1310 fprintf(fp, "\n"); 1456 fprintf(fp, "\n");
1311 1457
1312 fprintf(fp, "#\n"); 1458 fprintf(fp, "#\n");
1313 1459
1460print_entries:
1314 for (nd = rb_first(&output_hists); nd; nd = rb_next(nd)) { 1461 for (nd = rb_first(&output_hists); nd; nd = rb_next(nd)) {
1315 pos = rb_entry(nd, struct hist_entry, rb_node); 1462 pos = rb_entry(nd, struct hist_entry, rb_node);
1316 ret += hist_entry__fprintf(fp, pos, total_samples); 1463 ret += hist_entry__fprintf(fp, pos, total_samples);
@@ -1319,11 +1466,13 @@ static size_t output__fprintf(FILE *fp, u64 total_samples)
1319 if (sort_order == default_sort_order && 1466 if (sort_order == default_sort_order &&
1320 parent_pattern == default_parent_pattern) { 1467 parent_pattern == default_parent_pattern) {
1321 fprintf(fp, "#\n"); 1468 fprintf(fp, "#\n");
1322 fprintf(fp, "# (For more details, try: perf report --sort comm,dso,symbol)\n"); 1469 fprintf(fp, "# (For a higher level overview, try: perf report --sort comm,dso)\n");
1323 fprintf(fp, "#\n"); 1470 fprintf(fp, "#\n");
1324 } 1471 }
1325 fprintf(fp, "\n"); 1472 fprintf(fp, "\n");
1326 1473
1474 free(rem_sq_bracket);
1475
1327 return ret; 1476 return ret;
1328} 1477}
1329 1478
@@ -1377,11 +1526,11 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head)
1377 more_data += sizeof(u64); 1526 more_data += sizeof(u64);
1378 } 1527 }
1379 1528
1380 dprintf("%p [%p]: PERF_EVENT_SAMPLE (IP, %d): %d: %p period: %Ld\n", 1529 dprintf("%p [%p]: PERF_EVENT_SAMPLE (IP, %d): %d/%d: %p period: %Ld\n",
1381 (void *)(offset + head), 1530 (void *)(offset + head),
1382 (void *)(long)(event->header.size), 1531 (void *)(long)(event->header.size),
1383 event->header.misc, 1532 event->header.misc,
1384 event->ip.pid, 1533 event->ip.pid, event->ip.tid,
1385 (void *)(long)ip, 1534 (void *)(long)ip,
1386 (long long)period); 1535 (long long)period);
1387 1536
@@ -1441,10 +1590,11 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head)
1441 if (show & show_mask) { 1590 if (show & show_mask) {
1442 struct symbol *sym = resolve_symbol(thread, &map, &dso, &ip); 1591 struct symbol *sym = resolve_symbol(thread, &map, &dso, &ip);
1443 1592
1444 if (dso_list && dso && dso->name && !strlist__has_entry(dso_list, dso->name)) 1593 if (dso_list && (!dso || !dso->name ||
1594 !strlist__has_entry(dso_list, dso->name)))
1445 return 0; 1595 return 0;
1446 1596
1447 if (sym_list && sym && !strlist__has_entry(sym_list, sym->name)) 1597 if (sym_list && (!sym || !strlist__has_entry(sym_list, sym->name)))
1448 return 0; 1598 return 0;
1449 1599
1450 if (hist_entry__add(thread, map, dso, sym, ip, chain, level, period)) { 1600 if (hist_entry__add(thread, map, dso, sym, ip, chain, level, period)) {
@@ -1463,10 +1613,11 @@ process_mmap_event(event_t *event, unsigned long offset, unsigned long head)
1463 struct thread *thread = threads__findnew(event->mmap.pid); 1613 struct thread *thread = threads__findnew(event->mmap.pid);
1464 struct map *map = map__new(&event->mmap); 1614 struct map *map = map__new(&event->mmap);
1465 1615
1466 dprintf("%p [%p]: PERF_EVENT_MMAP %d: [%p(%p) @ %p]: %s\n", 1616 dprintf("%p [%p]: PERF_EVENT_MMAP %d/%d: [%p(%p) @ %p]: %s\n",
1467 (void *)(offset + head), 1617 (void *)(offset + head),
1468 (void *)(long)(event->header.size), 1618 (void *)(long)(event->header.size),
1469 event->mmap.pid, 1619 event->mmap.pid,
1620 event->mmap.tid,
1470 (void *)(long)event->mmap.start, 1621 (void *)(long)event->mmap.start,
1471 (void *)(long)event->mmap.len, 1622 (void *)(long)event->mmap.len,
1472 (void *)(long)event->mmap.pgoff, 1623 (void *)(long)event->mmap.pgoff,
@@ -1504,15 +1655,27 @@ process_comm_event(event_t *event, unsigned long offset, unsigned long head)
1504} 1655}
1505 1656
1506static int 1657static int
1507process_fork_event(event_t *event, unsigned long offset, unsigned long head) 1658process_task_event(event_t *event, unsigned long offset, unsigned long head)
1508{ 1659{
1509 struct thread *thread = threads__findnew(event->fork.pid); 1660 struct thread *thread = threads__findnew(event->fork.pid);
1510 struct thread *parent = threads__findnew(event->fork.ppid); 1661 struct thread *parent = threads__findnew(event->fork.ppid);
1511 1662
1512 dprintf("%p [%p]: PERF_EVENT_FORK: %d:%d\n", 1663 dprintf("%p [%p]: PERF_EVENT_%s: (%d:%d):(%d:%d)\n",
1513 (void *)(offset + head), 1664 (void *)(offset + head),
1514 (void *)(long)(event->header.size), 1665 (void *)(long)(event->header.size),
1515 event->fork.pid, event->fork.ppid); 1666 event->header.type == PERF_EVENT_FORK ? "FORK" : "EXIT",
1667 event->fork.pid, event->fork.tid,
1668 event->fork.ppid, event->fork.ptid);
1669
1670 /*
1671 * A thread clone will have the same PID for both
1672 * parent and child.
1673 */
1674 if (thread == parent)
1675 return 0;
1676
1677 if (event->header.type == PERF_EVENT_EXIT)
1678 return 0;
1516 1679
1517 if (!thread || !parent || thread__fork(thread, parent)) { 1680 if (!thread || !parent || thread__fork(thread, parent)) {
1518 dprintf("problem processing PERF_EVENT_FORK, skipping event.\n"); 1681 dprintf("problem processing PERF_EVENT_FORK, skipping event.\n");
@@ -1524,19 +1687,6 @@ process_fork_event(event_t *event, unsigned long offset, unsigned long head)
1524} 1687}
1525 1688
1526static int 1689static int
1527process_period_event(event_t *event, unsigned long offset, unsigned long head)
1528{
1529 dprintf("%p [%p]: PERF_EVENT_PERIOD: time:%Ld, id:%Ld: period:%Ld\n",
1530 (void *)(offset + head),
1531 (void *)(long)(event->header.size),
1532 event->period.time,
1533 event->period.id,
1534 event->period.sample_period);
1535
1536 return 0;
1537}
1538
1539static int
1540process_lost_event(event_t *event, unsigned long offset, unsigned long head) 1690process_lost_event(event_t *event, unsigned long offset, unsigned long head)
1541{ 1691{
1542 dprintf("%p [%p]: PERF_EVENT_LOST: id:%Ld: lost:%Ld\n", 1692 dprintf("%p [%p]: PERF_EVENT_LOST: id:%Ld: lost:%Ld\n",
@@ -1586,14 +1736,37 @@ static void trace_event(event_t *event)
1586 dprintf(".\n"); 1736 dprintf(".\n");
1587} 1737}
1588 1738
1739static struct perf_header *header;
1740
1741static struct perf_counter_attr *perf_header__find_attr(u64 id)
1742{
1743 int i;
1744
1745 for (i = 0; i < header->attrs; i++) {
1746 struct perf_header_attr *attr = header->attr[i];
1747 int j;
1748
1749 for (j = 0; j < attr->ids; j++) {
1750 if (attr->id[j] == id)
1751 return &attr->attr;
1752 }
1753 }
1754
1755 return NULL;
1756}
1757
1589static int 1758static int
1590process_read_event(event_t *event, unsigned long offset, unsigned long head) 1759process_read_event(event_t *event, unsigned long offset, unsigned long head)
1591{ 1760{
1592 dprintf("%p [%p]: PERF_EVENT_READ: %d %d %Lu\n", 1761 struct perf_counter_attr *attr = perf_header__find_attr(event->read.id);
1762
1763 dprintf("%p [%p]: PERF_EVENT_READ: %d %d %s %Lu\n",
1593 (void *)(offset + head), 1764 (void *)(offset + head),
1594 (void *)(long)(event->header.size), 1765 (void *)(long)(event->header.size),
1595 event->read.pid, 1766 event->read.pid,
1596 event->read.tid, 1767 event->read.tid,
1768 attr ? __event_name(attr->type, attr->config)
1769 : "FAIL",
1597 event->read.value); 1770 event->read.value);
1598 1771
1599 return 0; 1772 return 0;
@@ -1615,10 +1788,8 @@ process_event(event_t *event, unsigned long offset, unsigned long head)
1615 return process_comm_event(event, offset, head); 1788 return process_comm_event(event, offset, head);
1616 1789
1617 case PERF_EVENT_FORK: 1790 case PERF_EVENT_FORK:
1618 return process_fork_event(event, offset, head); 1791 case PERF_EVENT_EXIT:
1619 1792 return process_task_event(event, offset, head);
1620 case PERF_EVENT_PERIOD:
1621 return process_period_event(event, offset, head);
1622 1793
1623 case PERF_EVENT_LOST: 1794 case PERF_EVENT_LOST:
1624 return process_lost_event(event, offset, head); 1795 return process_lost_event(event, offset, head);
@@ -1641,8 +1812,6 @@ process_event(event_t *event, unsigned long offset, unsigned long head)
1641 return 0; 1812 return 0;
1642} 1813}
1643 1814
1644static struct perf_header *header;
1645
1646static u64 perf_header__sample_type(void) 1815static u64 perf_header__sample_type(void)
1647{ 1816{
1648 u64 sample_type = 0; 1817 u64 sample_type = 0;
@@ -1710,6 +1879,13 @@ static int __cmd_report(void)
1710 " -g?\n"); 1879 " -g?\n");
1711 exit(-1); 1880 exit(-1);
1712 } 1881 }
1882 } else if (callchain_param.mode != CHAIN_NONE && !callchain) {
1883 callchain = 1;
1884 if (register_callchain_param(&callchain_param) < 0) {
1885 fprintf(stderr, "Can't register callchain"
1886 " params\n");
1887 exit(-1);
1888 }
1713 } 1889 }
1714 1890
1715 if (load_kernel() < 0) { 1891 if (load_kernel() < 0) {
@@ -1848,6 +2024,13 @@ parse_callchain_opt(const struct option *opt __used, const char *arg,
1848 else if (!strncmp(tok, "fractal", strlen(arg))) 2024 else if (!strncmp(tok, "fractal", strlen(arg)))
1849 callchain_param.mode = CHAIN_GRAPH_REL; 2025 callchain_param.mode = CHAIN_GRAPH_REL;
1850 2026
2027 else if (!strncmp(tok, "none", strlen(arg))) {
2028 callchain_param.mode = CHAIN_NONE;
2029 callchain = 0;
2030
2031 return 0;
2032 }
2033
1851 else 2034 else
1852 return -1; 2035 return -1;
1853 2036
@@ -1883,6 +2066,8 @@ static const struct option options[] = {
1883 OPT_STRING('k', "vmlinux", &vmlinux, "file", "vmlinux pathname"), 2066 OPT_STRING('k', "vmlinux", &vmlinux, "file", "vmlinux pathname"),
1884 OPT_BOOLEAN('m', "modules", &modules, 2067 OPT_BOOLEAN('m', "modules", &modules,
1885 "load module symbols - WARNING: use only with -k and LIVE kernel"), 2068 "load module symbols - WARNING: use only with -k and LIVE kernel"),
2069 OPT_BOOLEAN('n', "show-nr-samples", &show_nr_samples,
2070 "Show a column with the number of samples"),
1886 OPT_STRING('s', "sort", &sort_order, "key[,key2...]", 2071 OPT_STRING('s', "sort", &sort_order, "key[,key2...]",
1887 "sort by key(s): pid, comm, dso, symbol, parent"), 2072 "sort by key(s): pid, comm, dso, symbol, parent"),
1888 OPT_BOOLEAN('P', "full-paths", &full_paths, 2073 OPT_BOOLEAN('P', "full-paths", &full_paths,
@@ -1891,15 +2076,21 @@ static const struct option options[] = {
1891 "regex filter to identify parent, see: '--sort parent'"), 2076 "regex filter to identify parent, see: '--sort parent'"),
1892 OPT_BOOLEAN('x', "exclude-other", &exclude_other, 2077 OPT_BOOLEAN('x', "exclude-other", &exclude_other,
1893 "Only display entries with parent-match"), 2078 "Only display entries with parent-match"),
1894 OPT_CALLBACK_DEFAULT('c', "callchain", NULL, "output_type,min_percent", 2079 OPT_CALLBACK_DEFAULT('g', "call-graph", NULL, "output_type,min_percent",
1895 "Display callchains using output_type and min percent threshold. " 2080 "Display callchains using output_type and min percent threshold. "
1896 "Default: flat,0", &parse_callchain_opt, callchain_default_opt), 2081 "Default: fractal,0.5", &parse_callchain_opt, callchain_default_opt),
1897 OPT_STRING('d', "dsos", &dso_list_str, "dso[,dso...]", 2082 OPT_STRING('d', "dsos", &dso_list_str, "dso[,dso...]",
1898 "only consider symbols in these dsos"), 2083 "only consider symbols in these dsos"),
1899 OPT_STRING('C', "comms", &comm_list_str, "comm[,comm...]", 2084 OPT_STRING('C', "comms", &comm_list_str, "comm[,comm...]",
1900 "only consider symbols in these comms"), 2085 "only consider symbols in these comms"),
1901 OPT_STRING('S', "symbols", &sym_list_str, "symbol[,symbol...]", 2086 OPT_STRING('S', "symbols", &sym_list_str, "symbol[,symbol...]",
1902 "only consider these symbols"), 2087 "only consider these symbols"),
2088 OPT_STRING('w', "column-widths", &col_width_list_str,
2089 "width[,width...]",
2090 "don't try to adjust column width, use these fixed values"),
2091 OPT_STRING('t', "field-separator", &field_sep, "separator",
2092 "separator for columns, no spaces will be added between "
2093 "columns '.' is reserved."),
1903 OPT_END() 2094 OPT_END()
1904}; 2095};
1905 2096
@@ -1919,7 +2110,8 @@ static void setup_sorting(void)
1919} 2110}
1920 2111
1921static void setup_list(struct strlist **list, const char *list_str, 2112static void setup_list(struct strlist **list, const char *list_str,
1922 const char *list_name) 2113 struct sort_entry *se, const char *list_name,
2114 FILE *fp)
1923{ 2115{
1924 if (list_str) { 2116 if (list_str) {
1925 *list = strlist__new(true, list_str); 2117 *list = strlist__new(true, list_str);
@@ -1928,6 +2120,11 @@ static void setup_list(struct strlist **list, const char *list_str,
1928 list_name); 2120 list_name);
1929 exit(129); 2121 exit(129);
1930 } 2122 }
2123 if (strlist__nr_entries(*list) == 1) {
2124 fprintf(fp, "# %s: %s\n", list_name,
2125 strlist__entry(*list, 0)->s);
2126 se->elide = true;
2127 }
1931 } 2128 }
1932} 2129}
1933 2130
@@ -1941,9 +2138,10 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
1941 2138
1942 setup_sorting(); 2139 setup_sorting();
1943 2140
1944 if (parent_pattern != default_parent_pattern) 2141 if (parent_pattern != default_parent_pattern) {
1945 sort_dimension__add("parent"); 2142 sort_dimension__add("parent");
1946 else 2143 sort_parent.elide = 1;
2144 } else
1947 exclude_other = 0; 2145 exclude_other = 0;
1948 2146
1949 /* 2147 /*
@@ -1952,11 +2150,17 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
1952 if (argc) 2150 if (argc)
1953 usage_with_options(report_usage, options); 2151 usage_with_options(report_usage, options);
1954 2152
1955 setup_list(&dso_list, dso_list_str, "dso");
1956 setup_list(&comm_list, comm_list_str, "comm");
1957 setup_list(&sym_list, sym_list_str, "symbol");
1958
1959 setup_pager(); 2153 setup_pager();
1960 2154
2155 setup_list(&dso_list, dso_list_str, &sort_dso, "dso", stdout);
2156 setup_list(&comm_list, comm_list_str, &sort_comm, "comm", stdout);
2157 setup_list(&sym_list, sym_list_str, &sort_sym, "symbol", stdout);
2158
2159 if (field_sep && *field_sep == '.') {
2160 fputs("'.' is the only non valid --field-separator argument\n",
2161 stderr);
2162 exit(129);
2163 }
2164
1961 return __cmd_report(); 2165 return __cmd_report();
1962} 2166}
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 27921a8ce1a..b4b06c7903e 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -496,7 +496,7 @@ static const struct option options[] = {
496 "stat events on existing pid"), 496 "stat events on existing pid"),
497 OPT_BOOLEAN('a', "all-cpus", &system_wide, 497 OPT_BOOLEAN('a', "all-cpus", &system_wide,
498 "system-wide collection from all CPUs"), 498 "system-wide collection from all CPUs"),
499 OPT_BOOLEAN('S', "scale", &scale, 499 OPT_BOOLEAN('c', "scale", &scale,
500 "scale/normalize counters"), 500 "scale/normalize counters"),
501 OPT_BOOLEAN('v', "verbose", &verbose, 501 OPT_BOOLEAN('v', "verbose", &verbose,
502 "be more verbose (show counter open errors, etc)"), 502 "be more verbose (show counter open errors, etc)"),
@@ -511,7 +511,8 @@ int cmd_stat(int argc, const char **argv, const char *prefix __used)
511{ 511{
512 int status; 512 int status;
513 513
514 argc = parse_options(argc, argv, options, stat_usage, 0); 514 argc = parse_options(argc, argv, options, stat_usage,
515 PARSE_OPT_STOP_AT_NON_OPTION);
515 if (!argc) 516 if (!argc)
516 usage_with_options(stat_usage, options); 517 usage_with_options(stat_usage, options);
517 if (run_count <= 0 || run_count > MAX_RUN) 518 if (run_count <= 0 || run_count > MAX_RUN)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 95d5c0ae375..7de28ce9ca2 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -31,6 +31,8 @@
31#include <fcntl.h> 31#include <fcntl.h>
32 32
33#include <stdio.h> 33#include <stdio.h>
34#include <termios.h>
35#include <unistd.h>
34 36
35#include <errno.h> 37#include <errno.h>
36#include <time.h> 38#include <time.h>
@@ -54,10 +56,11 @@ static int system_wide = 0;
54 56
55static int default_interval = 100000; 57static int default_interval = 100000;
56 58
57static u64 count_filter = 5; 59static int count_filter = 5;
58static int print_entries = 15; 60static int print_entries = 15;
59 61
60static int target_pid = -1; 62static int target_pid = -1;
63static int inherit = 0;
61static int profile_cpu = -1; 64static int profile_cpu = -1;
62static int nr_cpus = 0; 65static int nr_cpus = 0;
63static unsigned int realtime_prio = 0; 66static unsigned int realtime_prio = 0;
@@ -68,15 +71,28 @@ static int freq = 0;
68static int verbose = 0; 71static int verbose = 0;
69static char *vmlinux = NULL; 72static char *vmlinux = NULL;
70 73
71static char *sym_filter;
72static unsigned long filter_start;
73static unsigned long filter_end;
74
75static int delay_secs = 2; 74static int delay_secs = 2;
76static int zero; 75static int zero;
77static int dump_symtab; 76static int dump_symtab;
78 77
79/* 78/*
79 * Source
80 */
81
82struct source_line {
83 u64 eip;
84 unsigned long count[MAX_COUNTERS];
85 char *line;
86 struct source_line *next;
87};
88
89static char *sym_filter = NULL;
90struct sym_entry *sym_filter_entry = NULL;
91static int sym_pcnt_filter = 5;
92static int sym_counter = 0;
93static int display_weighted = -1;
94
95/*
80 * Symbols 96 * Symbols
81 */ 97 */
82 98
@@ -90,9 +106,237 @@ struct sym_entry {
90 unsigned long snap_count; 106 unsigned long snap_count;
91 double weight; 107 double weight;
92 int skip; 108 int skip;
109 struct source_line *source;
110 struct source_line *lines;
111 struct source_line **lines_tail;
112 pthread_mutex_t source_lock;
93}; 113};
94 114
95struct sym_entry *sym_filter_entry; 115/*
116 * Source functions
117 */
118
119static void parse_source(struct sym_entry *syme)
120{
121 struct symbol *sym;
122 struct module *module;
123 struct section *section = NULL;
124 FILE *file;
125 char command[PATH_MAX*2], *path = vmlinux;
126 u64 start, end, len;
127
128 if (!syme)
129 return;
130
131 if (syme->lines) {
132 pthread_mutex_lock(&syme->source_lock);
133 goto out_assign;
134 }
135
136 sym = (struct symbol *)(syme + 1);
137 module = sym->module;
138
139 if (module)
140 path = module->path;
141 if (!path)
142 return;
143
144 start = sym->obj_start;
145 if (!start)
146 start = sym->start;
147
148 if (module) {
149 section = module->sections->find_section(module->sections, ".text");
150 if (section)
151 start -= section->vma;
152 }
153
154 end = start + sym->end - sym->start + 1;
155 len = sym->end - sym->start;
156
157 sprintf(command, "objdump --start-address=0x%016Lx --stop-address=0x%016Lx -dS %s", start, end, path);
158
159 file = popen(command, "r");
160 if (!file)
161 return;
162
163 pthread_mutex_lock(&syme->source_lock);
164 syme->lines_tail = &syme->lines;
165 while (!feof(file)) {
166 struct source_line *src;
167 size_t dummy = 0;
168 char *c;
169
170 src = malloc(sizeof(struct source_line));
171 assert(src != NULL);
172 memset(src, 0, sizeof(struct source_line));
173
174 if (getline(&src->line, &dummy, file) < 0)
175 break;
176 if (!src->line)
177 break;
178
179 c = strchr(src->line, '\n');
180 if (c)
181 *c = 0;
182
183 src->next = NULL;
184 *syme->lines_tail = src;
185 syme->lines_tail = &src->next;
186
187 if (strlen(src->line)>8 && src->line[8] == ':') {
188 src->eip = strtoull(src->line, NULL, 16);
189 if (section)
190 src->eip += section->vma;
191 }
192 if (strlen(src->line)>8 && src->line[16] == ':') {
193 src->eip = strtoull(src->line, NULL, 16);
194 if (section)
195 src->eip += section->vma;
196 }
197 }
198 pclose(file);
199out_assign:
200 sym_filter_entry = syme;
201 pthread_mutex_unlock(&syme->source_lock);
202}
203
204static void __zero_source_counters(struct sym_entry *syme)
205{
206 int i;
207 struct source_line *line;
208
209 line = syme->lines;
210 while (line) {
211 for (i = 0; i < nr_counters; i++)
212 line->count[i] = 0;
213 line = line->next;
214 }
215}
216
217static void record_precise_ip(struct sym_entry *syme, int counter, u64 ip)
218{
219 struct source_line *line;
220
221 if (syme != sym_filter_entry)
222 return;
223
224 if (pthread_mutex_trylock(&syme->source_lock))
225 return;
226
227 if (!syme->source)
228 goto out_unlock;
229
230 for (line = syme->lines; line; line = line->next) {
231 if (line->eip == ip) {
232 line->count[counter]++;
233 break;
234 }
235 if (line->eip > ip)
236 break;
237 }
238out_unlock:
239 pthread_mutex_unlock(&syme->source_lock);
240}
241
242static void lookup_sym_source(struct sym_entry *syme)
243{
244 struct symbol *symbol = (struct symbol *)(syme + 1);
245 struct source_line *line;
246 char pattern[PATH_MAX];
247 char *idx;
248
249 sprintf(pattern, "<%s>:", symbol->name);
250
251 if (symbol->module) {
252 idx = strstr(pattern, "\t");
253 if (idx)
254 *idx = 0;
255 }
256
257 pthread_mutex_lock(&syme->source_lock);
258 for (line = syme->lines; line; line = line->next) {
259 if (strstr(line->line, pattern)) {
260 syme->source = line;
261 break;
262 }
263 }
264 pthread_mutex_unlock(&syme->source_lock);
265}
266
267static void show_lines(struct source_line *queue, int count, int total)
268{
269 int i;
270 struct source_line *line;
271
272 line = queue;
273 for (i = 0; i < count; i++) {
274 float pcnt = 100.0*(float)line->count[sym_counter]/(float)total;
275
276 printf("%8li %4.1f%%\t%s\n", line->count[sym_counter], pcnt, line->line);
277 line = line->next;
278 }
279}
280
281#define TRACE_COUNT 3
282
283static void show_details(struct sym_entry *syme)
284{
285 struct symbol *symbol;
286 struct source_line *line;
287 struct source_line *line_queue = NULL;
288 int displayed = 0;
289 int line_queue_count = 0, total = 0, more = 0;
290
291 if (!syme)
292 return;
293
294 if (!syme->source)
295 lookup_sym_source(syme);
296
297 if (!syme->source)
298 return;
299
300 symbol = (struct symbol *)(syme + 1);
301 printf("Showing %s for %s\n", event_name(sym_counter), symbol->name);
302 printf(" Events Pcnt (>=%d%%)\n", sym_pcnt_filter);
303
304 pthread_mutex_lock(&syme->source_lock);
305 line = syme->source;
306 while (line) {
307 total += line->count[sym_counter];
308 line = line->next;
309 }
310
311 line = syme->source;
312 while (line) {
313 float pcnt = 0.0;
314
315 if (!line_queue_count)
316 line_queue = line;
317 line_queue_count++;
318
319 if (line->count[sym_counter])
320 pcnt = 100.0 * line->count[sym_counter] / (float)total;
321 if (pcnt >= (float)sym_pcnt_filter) {
322 if (displayed <= print_entries)
323 show_lines(line_queue, line_queue_count, total);
324 else more++;
325 displayed += line_queue_count;
326 line_queue_count = 0;
327 line_queue = NULL;
328 } else if (line_queue_count > TRACE_COUNT) {
329 line_queue = line_queue->next;
330 line_queue_count--;
331 }
332
333 line->count[sym_counter] = zero ? 0 : line->count[sym_counter] * 7 / 8;
334 line = line->next;
335 }
336 pthread_mutex_unlock(&syme->source_lock);
337 if (more)
338 printf("%d lines not displayed, maybe increase display entries [e]\n", more);
339}
96 340
97struct dso *kernel_dso; 341struct dso *kernel_dso;
98 342
@@ -111,6 +355,9 @@ static double sym_weight(const struct sym_entry *sym)
111 double weight = sym->snap_count; 355 double weight = sym->snap_count;
112 int counter; 356 int counter;
113 357
358 if (!display_weighted)
359 return weight;
360
114 for (counter = 1; counter < nr_counters-1; counter++) 361 for (counter = 1; counter < nr_counters-1; counter++)
115 weight *= sym->count[counter]; 362 weight *= sym->count[counter];
116 363
@@ -158,7 +405,7 @@ static void rb_insert_active_sym(struct rb_root *tree, struct sym_entry *se)
158static void print_sym_table(void) 405static void print_sym_table(void)
159{ 406{
160 int printed = 0, j; 407 int printed = 0, j;
161 int counter; 408 int counter, snap = !display_weighted ? sym_counter : 0;
162 float samples_per_sec = samples/delay_secs; 409 float samples_per_sec = samples/delay_secs;
163 float ksamples_per_sec = (samples-userspace_samples)/delay_secs; 410 float ksamples_per_sec = (samples-userspace_samples)/delay_secs;
164 float sum_ksamples = 0.0; 411 float sum_ksamples = 0.0;
@@ -174,7 +421,7 @@ static void print_sym_table(void)
174 pthread_mutex_unlock(&active_symbols_lock); 421 pthread_mutex_unlock(&active_symbols_lock);
175 422
176 list_for_each_entry_safe_from(syme, n, &active_symbols, node) { 423 list_for_each_entry_safe_from(syme, n, &active_symbols, node) {
177 syme->snap_count = syme->count[0]; 424 syme->snap_count = syme->count[snap];
178 if (syme->snap_count != 0) { 425 if (syme->snap_count != 0) {
179 syme->weight = sym_weight(syme); 426 syme->weight = sym_weight(syme);
180 rb_insert_active_sym(&tmp, syme); 427 rb_insert_active_sym(&tmp, syme);
@@ -194,7 +441,7 @@ static void print_sym_table(void)
194 samples_per_sec, 441 samples_per_sec,
195 100.0 - (100.0*((samples_per_sec-ksamples_per_sec)/samples_per_sec))); 442 100.0 - (100.0*((samples_per_sec-ksamples_per_sec)/samples_per_sec)));
196 443
197 if (nr_counters == 1) { 444 if (nr_counters == 1 || !display_weighted) {
198 printf("%Ld", (u64)attrs[0].sample_period); 445 printf("%Ld", (u64)attrs[0].sample_period);
199 if (freq) 446 if (freq)
200 printf("Hz "); 447 printf("Hz ");
@@ -202,7 +449,9 @@ static void print_sym_table(void)
202 printf(" "); 449 printf(" ");
203 } 450 }
204 451
205 for (counter = 0; counter < nr_counters; counter++) { 452 if (!display_weighted)
453 printf("%s", event_name(sym_counter));
454 else for (counter = 0; counter < nr_counters; counter++) {
206 if (counter) 455 if (counter)
207 printf("/"); 456 printf("/");
208 457
@@ -227,6 +476,11 @@ static void print_sym_table(void)
227 476
228 printf("------------------------------------------------------------------------------\n\n"); 477 printf("------------------------------------------------------------------------------\n\n");
229 478
479 if (sym_filter_entry) {
480 show_details(sym_filter_entry);
481 return;
482 }
483
230 if (nr_counters == 1) 484 if (nr_counters == 1)
231 printf(" samples pcnt"); 485 printf(" samples pcnt");
232 else 486 else
@@ -241,13 +495,13 @@ static void print_sym_table(void)
241 struct symbol *sym = (struct symbol *)(syme + 1); 495 struct symbol *sym = (struct symbol *)(syme + 1);
242 double pcnt; 496 double pcnt;
243 497
244 if (++printed > print_entries || syme->snap_count < count_filter) 498 if (++printed > print_entries || (int)syme->snap_count < count_filter)
245 continue; 499 continue;
246 500
247 pcnt = 100.0 - (100.0 * ((sum_ksamples - syme->snap_count) / 501 pcnt = 100.0 - (100.0 * ((sum_ksamples - syme->snap_count) /
248 sum_ksamples)); 502 sum_ksamples));
249 503
250 if (nr_counters == 1) 504 if (nr_counters == 1 || !display_weighted)
251 printf("%20.2f - ", syme->weight); 505 printf("%20.2f - ", syme->weight);
252 else 506 else
253 printf("%9.1f %10ld - ", syme->weight, syme->snap_count); 507 printf("%9.1f %10ld - ", syme->weight, syme->snap_count);
@@ -260,19 +514,250 @@ static void print_sym_table(void)
260 } 514 }
261} 515}
262 516
517static void prompt_integer(int *target, const char *msg)
518{
519 char *buf = malloc(0), *p;
520 size_t dummy = 0;
521 int tmp;
522
523 fprintf(stdout, "\n%s: ", msg);
524 if (getline(&buf, &dummy, stdin) < 0)
525 return;
526
527 p = strchr(buf, '\n');
528 if (p)
529 *p = 0;
530
531 p = buf;
532 while(*p) {
533 if (!isdigit(*p))
534 goto out_free;
535 p++;
536 }
537 tmp = strtoul(buf, NULL, 10);
538 *target = tmp;
539out_free:
540 free(buf);
541}
542
543static void prompt_percent(int *target, const char *msg)
544{
545 int tmp = 0;
546
547 prompt_integer(&tmp, msg);
548 if (tmp >= 0 && tmp <= 100)
549 *target = tmp;
550}
551
552static void prompt_symbol(struct sym_entry **target, const char *msg)
553{
554 char *buf = malloc(0), *p;
555 struct sym_entry *syme = *target, *n, *found = NULL;
556 size_t dummy = 0;
557
558 /* zero counters of active symbol */
559 if (syme) {
560 pthread_mutex_lock(&syme->source_lock);
561 __zero_source_counters(syme);
562 *target = NULL;
563 pthread_mutex_unlock(&syme->source_lock);
564 }
565
566 fprintf(stdout, "\n%s: ", msg);
567 if (getline(&buf, &dummy, stdin) < 0)
568 goto out_free;
569
570 p = strchr(buf, '\n');
571 if (p)
572 *p = 0;
573
574 pthread_mutex_lock(&active_symbols_lock);
575 syme = list_entry(active_symbols.next, struct sym_entry, node);
576 pthread_mutex_unlock(&active_symbols_lock);
577
578 list_for_each_entry_safe_from(syme, n, &active_symbols, node) {
579 struct symbol *sym = (struct symbol *)(syme + 1);
580
581 if (!strcmp(buf, sym->name)) {
582 found = syme;
583 break;
584 }
585 }
586
587 if (!found) {
588 fprintf(stderr, "Sorry, %s is not active.\n", sym_filter);
589 sleep(1);
590 return;
591 } else
592 parse_source(found);
593
594out_free:
595 free(buf);
596}
597
598static void print_mapped_keys(void)
599{
600 char *name = NULL;
601
602 if (sym_filter_entry) {
603 struct symbol *sym = (struct symbol *)(sym_filter_entry+1);
604 name = sym->name;
605 }
606
607 fprintf(stdout, "\nMapped keys:\n");
608 fprintf(stdout, "\t[d] display refresh delay. \t(%d)\n", delay_secs);
609 fprintf(stdout, "\t[e] display entries (lines). \t(%d)\n", print_entries);
610
611 if (nr_counters > 1)
612 fprintf(stdout, "\t[E] active event counter. \t(%s)\n", event_name(sym_counter));
613
614 fprintf(stdout, "\t[f] profile display filter (count). \t(%d)\n", count_filter);
615
616 if (vmlinux) {
617 fprintf(stdout, "\t[F] annotate display filter (percent). \t(%d%%)\n", sym_pcnt_filter);
618 fprintf(stdout, "\t[s] annotate symbol. \t(%s)\n", name?: "NULL");
619 fprintf(stdout, "\t[S] stop annotation.\n");
620 }
621
622 if (nr_counters > 1)
623 fprintf(stdout, "\t[w] toggle display weighted/count[E]r. \t(%d)\n", display_weighted ? 1 : 0);
624
625 fprintf(stdout, "\t[z] toggle sample zeroing. \t(%d)\n", zero ? 1 : 0);
626 fprintf(stdout, "\t[qQ] quit.\n");
627}
628
629static int key_mapped(int c)
630{
631 switch (c) {
632 case 'd':
633 case 'e':
634 case 'f':
635 case 'z':
636 case 'q':
637 case 'Q':
638 return 1;
639 case 'E':
640 case 'w':
641 return nr_counters > 1 ? 1 : 0;
642 case 'F':
643 case 's':
644 case 'S':
645 return vmlinux ? 1 : 0;
646 }
647
648 return 0;
649}
650
651static void handle_keypress(int c)
652{
653 if (!key_mapped(c)) {
654 struct pollfd stdin_poll = { .fd = 0, .events = POLLIN };
655 struct termios tc, save;
656
657 print_mapped_keys();
658 fprintf(stdout, "\nEnter selection, or unmapped key to continue: ");
659 fflush(stdout);
660
661 tcgetattr(0, &save);
662 tc = save;
663 tc.c_lflag &= ~(ICANON | ECHO);
664 tc.c_cc[VMIN] = 0;
665 tc.c_cc[VTIME] = 0;
666 tcsetattr(0, TCSANOW, &tc);
667
668 poll(&stdin_poll, 1, -1);
669 c = getc(stdin);
670
671 tcsetattr(0, TCSAFLUSH, &save);
672 if (!key_mapped(c))
673 return;
674 }
675
676 switch (c) {
677 case 'd':
678 prompt_integer(&delay_secs, "Enter display delay");
679 break;
680 case 'e':
681 prompt_integer(&print_entries, "Enter display entries (lines)");
682 break;
683 case 'E':
684 if (nr_counters > 1) {
685 int i;
686
687 fprintf(stderr, "\nAvailable events:");
688 for (i = 0; i < nr_counters; i++)
689 fprintf(stderr, "\n\t%d %s", i, event_name(i));
690
691 prompt_integer(&sym_counter, "Enter details event counter");
692
693 if (sym_counter >= nr_counters) {
694 fprintf(stderr, "Sorry, no such event, using %s.\n", event_name(0));
695 sym_counter = 0;
696 sleep(1);
697 }
698 } else sym_counter = 0;
699 break;
700 case 'f':
701 prompt_integer(&count_filter, "Enter display event count filter");
702 break;
703 case 'F':
704 prompt_percent(&sym_pcnt_filter, "Enter details display event filter (percent)");
705 break;
706 case 'q':
707 case 'Q':
708 printf("exiting.\n");
709 exit(0);
710 case 's':
711 prompt_symbol(&sym_filter_entry, "Enter details symbol");
712 break;
713 case 'S':
714 if (!sym_filter_entry)
715 break;
716 else {
717 struct sym_entry *syme = sym_filter_entry;
718
719 pthread_mutex_lock(&syme->source_lock);
720 sym_filter_entry = NULL;
721 __zero_source_counters(syme);
722 pthread_mutex_unlock(&syme->source_lock);
723 }
724 break;
725 case 'w':
726 display_weighted = ~display_weighted;
727 break;
728 case 'z':
729 zero = ~zero;
730 break;
731 }
732}
733
263static void *display_thread(void *arg __used) 734static void *display_thread(void *arg __used)
264{ 735{
265 struct pollfd stdin_poll = { .fd = 0, .events = POLLIN }; 736 struct pollfd stdin_poll = { .fd = 0, .events = POLLIN };
266 int delay_msecs = delay_secs * 1000; 737 struct termios tc, save;
738 int delay_msecs, c;
739
740 tcgetattr(0, &save);
741 tc = save;
742 tc.c_lflag &= ~(ICANON | ECHO);
743 tc.c_cc[VMIN] = 0;
744 tc.c_cc[VTIME] = 0;
267 745
268 printf("PerfTop refresh period: %d seconds\n", delay_secs); 746repeat:
747 delay_msecs = delay_secs * 1000;
748 tcsetattr(0, TCSANOW, &tc);
749 /* trash return*/
750 getc(stdin);
269 751
270 do { 752 do {
271 print_sym_table(); 753 print_sym_table();
272 } while (!poll(&stdin_poll, 1, delay_msecs) == 1); 754 } while (!poll(&stdin_poll, 1, delay_msecs) == 1);
273 755
274 printf("key pressed - exiting.\n"); 756 c = getc(stdin);
275 exit(0); 757 tcsetattr(0, TCSAFLUSH, &save);
758
759 handle_keypress(c);
760 goto repeat;
276 761
277 return NULL; 762 return NULL;
278} 763}
@@ -284,6 +769,7 @@ static const char *skip_symbols[] = {
284 "enter_idle", 769 "enter_idle",
285 "exit_idle", 770 "exit_idle",
286 "mwait_idle", 771 "mwait_idle",
772 "mwait_idle_with_hints",
287 "ppc64_runlatch_off", 773 "ppc64_runlatch_off",
288 "pseries_dedicated_idle_sleep", 774 "pseries_dedicated_idle_sleep",
289 NULL 775 NULL
@@ -291,7 +777,6 @@ static const char *skip_symbols[] = {
291 777
292static int symbol_filter(struct dso *self, struct symbol *sym) 778static int symbol_filter(struct dso *self, struct symbol *sym)
293{ 779{
294 static int filter_match;
295 struct sym_entry *syme; 780 struct sym_entry *syme;
296 const char *name = sym->name; 781 const char *name = sym->name;
297 int i; 782 int i;
@@ -313,6 +798,10 @@ static int symbol_filter(struct dso *self, struct symbol *sym)
313 return 1; 798 return 1;
314 799
315 syme = dso__sym_priv(self, sym); 800 syme = dso__sym_priv(self, sym);
801 pthread_mutex_init(&syme->source_lock, NULL);
802 if (!sym_filter_entry && sym_filter && !strcmp(name, sym_filter))
803 sym_filter_entry = syme;
804
316 for (i = 0; skip_symbols[i]; i++) { 805 for (i = 0; skip_symbols[i]; i++) {
317 if (!strcmp(skip_symbols[i], name)) { 806 if (!strcmp(skip_symbols[i], name)) {
318 syme->skip = 1; 807 syme->skip = 1;
@@ -320,29 +809,6 @@ static int symbol_filter(struct dso *self, struct symbol *sym)
320 } 809 }
321 } 810 }
322 811
323 if (filter_match == 1) {
324 filter_end = sym->start;
325 filter_match = -1;
326 if (filter_end - filter_start > 10000) {
327 fprintf(stderr,
328 "hm, too large filter symbol <%s> - skipping.\n",
329 sym_filter);
330 fprintf(stderr, "symbol filter start: %016lx\n",
331 filter_start);
332 fprintf(stderr, " end: %016lx\n",
333 filter_end);
334 filter_end = filter_start = 0;
335 sym_filter = NULL;
336 sleep(1);
337 }
338 }
339
340 if (filter_match == 0 && sym_filter && !strcmp(name, sym_filter)) {
341 filter_match = 1;
342 filter_start = sym->start;
343 }
344
345
346 return 0; 812 return 0;
347} 813}
348 814
@@ -378,8 +844,6 @@ out_delete_dso:
378 return -1; 844 return -1;
379} 845}
380 846
381#define TRACE_COUNT 3
382
383/* 847/*
384 * Binary search in the histogram table and record the hit: 848 * Binary search in the histogram table and record the hit:
385 */ 849 */
@@ -392,6 +856,7 @@ static void record_ip(u64 ip, int counter)
392 856
393 if (!syme->skip) { 857 if (!syme->skip) {
394 syme->count[counter]++; 858 syme->count[counter]++;
859 record_precise_ip(syme, counter, ip);
395 pthread_mutex_lock(&active_symbols_lock); 860 pthread_mutex_lock(&active_symbols_lock);
396 if (list_empty(&syme->node) || !syme->node.next) 861 if (list_empty(&syme->node) || !syme->node.next)
397 __list_insert_active_sym(syme); 862 __list_insert_active_sym(syme);
@@ -549,7 +1014,7 @@ int group_fd;
549static void start_counter(int i, int counter) 1014static void start_counter(int i, int counter)
550{ 1015{
551 struct perf_counter_attr *attr; 1016 struct perf_counter_attr *attr;
552 unsigned int cpu; 1017 int cpu;
553 1018
554 cpu = profile_cpu; 1019 cpu = profile_cpu;
555 if (target_pid == -1 && profile_cpu == -1) 1020 if (target_pid == -1 && profile_cpu == -1)
@@ -559,6 +1024,7 @@ static void start_counter(int i, int counter)
559 1024
560 attr->sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID; 1025 attr->sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID;
561 attr->freq = freq; 1026 attr->freq = freq;
1027 attr->inherit = (cpu < 0) && inherit;
562 1028
563try_again: 1029try_again:
564 fd[i][counter] = sys_perf_counter_open(attr, target_pid, cpu, group_fd, 0); 1030 fd[i][counter] = sys_perf_counter_open(attr, target_pid, cpu, group_fd, 0);
@@ -685,8 +1151,10 @@ static const struct option options[] = {
685 "only display functions with more events than this"), 1151 "only display functions with more events than this"),
686 OPT_BOOLEAN('g', "group", &group, 1152 OPT_BOOLEAN('g', "group", &group,
687 "put the counters into a counter group"), 1153 "put the counters into a counter group"),
688 OPT_STRING('s', "sym-filter", &sym_filter, "pattern", 1154 OPT_BOOLEAN('i', "inherit", &inherit,
689 "only display symbols matchig this pattern"), 1155 "child tasks inherit counters"),
1156 OPT_STRING('s', "sym-annotate", &sym_filter, "symbol name",
1157 "symbol to annotate - requires -k option"),
690 OPT_BOOLEAN('z', "zero", &zero, 1158 OPT_BOOLEAN('z', "zero", &zero,
691 "zero history across updates"), 1159 "zero history across updates"),
692 OPT_INTEGER('F', "freq", &freq, 1160 OPT_INTEGER('F', "freq", &freq,
@@ -729,6 +1197,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __used)
729 delay_secs = 1; 1197 delay_secs = 1;
730 1198
731 parse_symbols(); 1199 parse_symbols();
1200 parse_source(sym_filter_entry);
732 1201
733 /* 1202 /*
734 * Fill in the ones not specifically initialized via -c: 1203 * Fill in the ones not specifically initialized via -c:
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index c5656784c61..31982ad064b 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -12,6 +12,8 @@
12#include "util/cache.h" 12#include "util/cache.h"
13#include "util/quote.h" 13#include "util/quote.h"
14#include "util/run-command.h" 14#include "util/run-command.h"
15#include "util/parse-events.h"
16#include "util/string.h"
15 17
16const char perf_usage_string[] = 18const char perf_usage_string[] =
17 "perf [--version] [--help] COMMAND [ARGS]"; 19 "perf [--version] [--help] COMMAND [ARGS]";
@@ -25,6 +27,8 @@ struct pager_config {
25 int val; 27 int val;
26}; 28};
27 29
30static char debugfs_mntpt[MAXPATHLEN];
31
28static int pager_command_config(const char *var, const char *value, void *data) 32static int pager_command_config(const char *var, const char *value, void *data)
29{ 33{
30 struct pager_config *c = data; 34 struct pager_config *c = data;
@@ -56,6 +60,15 @@ static void commit_pager_choice(void) {
56 } 60 }
57} 61}
58 62
63static void set_debugfs_path(void)
64{
65 char *path;
66
67 path = getenv(PERF_DEBUGFS_ENVIRONMENT);
68 snprintf(debugfs_path, MAXPATHLEN, "%s/%s", path ?: debugfs_mntpt,
69 "tracing/events");
70}
71
59static int handle_options(const char*** argv, int* argc, int* envchanged) 72static int handle_options(const char*** argv, int* argc, int* envchanged)
60{ 73{
61 int handled = 0; 74 int handled = 0;
@@ -122,6 +135,22 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
122 setenv(PERF_WORK_TREE_ENVIRONMENT, cmd + 12, 1); 135 setenv(PERF_WORK_TREE_ENVIRONMENT, cmd + 12, 1);
123 if (envchanged) 136 if (envchanged)
124 *envchanged = 1; 137 *envchanged = 1;
138 } else if (!strcmp(cmd, "--debugfs-dir")) {
139 if (*argc < 2) {
140 fprintf(stderr, "No directory given for --debugfs-dir.\n");
141 usage(perf_usage_string);
142 }
143 strncpy(debugfs_mntpt, (*argv)[1], MAXPATHLEN);
144 debugfs_mntpt[MAXPATHLEN - 1] = '\0';
145 if (envchanged)
146 *envchanged = 1;
147 (*argv)++;
148 (*argc)--;
149 } else if (!prefixcmp(cmd, "--debugfs-dir=")) {
150 strncpy(debugfs_mntpt, cmd + 14, MAXPATHLEN);
151 debugfs_mntpt[MAXPATHLEN - 1] = '\0';
152 if (envchanged)
153 *envchanged = 1;
125 } else { 154 } else {
126 fprintf(stderr, "Unknown option: %s\n", cmd); 155 fprintf(stderr, "Unknown option: %s\n", cmd);
127 usage(perf_usage_string); 156 usage(perf_usage_string);
@@ -228,6 +257,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
228 if (use_pager == -1 && p->option & USE_PAGER) 257 if (use_pager == -1 && p->option & USE_PAGER)
229 use_pager = 1; 258 use_pager = 1;
230 commit_pager_choice(); 259 commit_pager_choice();
260 set_debugfs_path();
231 261
232 status = p->fn(argc, argv, prefix); 262 status = p->fn(argc, argv, prefix);
233 if (status) 263 if (status)
@@ -346,6 +376,49 @@ static int run_argv(int *argcp, const char ***argv)
346 return done_alias; 376 return done_alias;
347} 377}
348 378
379/* mini /proc/mounts parser: searching for "^blah /mount/point debugfs" */
380static void get_debugfs_mntpt(void)
381{
382 FILE *file;
383 char fs_type[100];
384 char debugfs[MAXPATHLEN];
385
386 /*
387 * try the standard location
388 */
389 if (valid_debugfs_mount("/sys/kernel/debug/") == 0) {
390 strcpy(debugfs_mntpt, "/sys/kernel/debug/");
391 return;
392 }
393
394 /*
395 * try the sane location
396 */
397 if (valid_debugfs_mount("/debug/") == 0) {
398 strcpy(debugfs_mntpt, "/debug/");
399 return;
400 }
401
402 /*
403 * give up and parse /proc/mounts
404 */
405 file = fopen("/proc/mounts", "r");
406 if (file == NULL)
407 return;
408
409 while (fscanf(file, "%*s %"
410 STR(MAXPATHLEN)
411 "s %99s %*s %*d %*d\n",
412 debugfs, fs_type) == 2) {
413 if (strcmp(fs_type, "debugfs") == 0)
414 break;
415 }
416 fclose(file);
417 if (strcmp(fs_type, "debugfs") == 0) {
418 strncpy(debugfs_mntpt, debugfs, MAXPATHLEN);
419 debugfs_mntpt[MAXPATHLEN - 1] = '\0';
420 }
421}
349 422
350int main(int argc, const char **argv) 423int main(int argc, const char **argv)
351{ 424{
@@ -354,7 +427,8 @@ int main(int argc, const char **argv)
354 cmd = perf_extract_argv0_path(argv[0]); 427 cmd = perf_extract_argv0_path(argv[0]);
355 if (!cmd) 428 if (!cmd)
356 cmd = "perf-help"; 429 cmd = "perf-help";
357 430 /* get debugfs mount point from /proc/mounts */
431 get_debugfs_mntpt();
358 /* 432 /*
359 * "perf-xxxx" is the same as "perf xxxx", but we obviously: 433 * "perf-xxxx" is the same as "perf xxxx", but we obviously:
360 * 434 *
@@ -377,6 +451,7 @@ int main(int argc, const char **argv)
377 argc--; 451 argc--;
378 handle_options(&argv, &argc, NULL); 452 handle_options(&argv, &argc, NULL);
379 commit_pager_choice(); 453 commit_pager_choice();
454 set_debugfs_path();
380 if (argc > 0) { 455 if (argc > 0) {
381 if (!prefixcmp(argv[0], "--")) 456 if (!prefixcmp(argv[0], "--"))
382 argv[0] += 2; 457 argv[0] += 2;
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 63e67cc5487..e5148e2b613 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -1,7 +1,13 @@
1#ifndef _PERF_PERF_H 1#ifndef _PERF_PERF_H
2#define _PERF_PERF_H 2#define _PERF_PERF_H
3 3
4#if defined(__x86_64__) || defined(__i386__) 4#if defined(__i386__)
5#include "../../arch/x86/include/asm/unistd.h"
6#define rmb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
7#define cpu_relax() asm volatile("rep; nop" ::: "memory");
8#endif
9
10#if defined(__x86_64__)
5#include "../../arch/x86/include/asm/unistd.h" 11#include "../../arch/x86/include/asm/unistd.h"
6#define rmb() asm volatile("lfence" ::: "memory") 12#define rmb() asm volatile("lfence" ::: "memory")
7#define cpu_relax() asm volatile("rep; nop" ::: "memory"); 13#define cpu_relax() asm volatile("rep; nop" ::: "memory");
diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h
index 161d5f413e2..4b50c412b9c 100644
--- a/tools/perf/util/cache.h
+++ b/tools/perf/util/cache.h
@@ -18,6 +18,7 @@
18#define PERFATTRIBUTES_FILE ".perfattributes" 18#define PERFATTRIBUTES_FILE ".perfattributes"
19#define INFOATTRIBUTES_FILE "info/attributes" 19#define INFOATTRIBUTES_FILE "info/attributes"
20#define ATTRIBUTE_MACRO_PREFIX "[attr]" 20#define ATTRIBUTE_MACRO_PREFIX "[attr]"
21#define PERF_DEBUGFS_ENVIRONMENT "PERF_DEBUGFS_DIR"
21 22
22typedef int (*config_fn_t)(const char *, const char *, void *); 23typedef int (*config_fn_t)(const char *, const char *, void *);
23extern int perf_default_config(const char *, const char *, void *); 24extern int perf_default_config(const char *, const char *, void *);
diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index 9d3c8141b8c..01147341164 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -13,6 +13,7 @@
13#include <stdio.h> 13#include <stdio.h>
14#include <stdbool.h> 14#include <stdbool.h>
15#include <errno.h> 15#include <errno.h>
16#include <math.h>
16 17
17#include "callchain.h" 18#include "callchain.h"
18 19
@@ -26,10 +27,14 @@ rb_insert_callchain(struct rb_root *root, struct callchain_node *chain,
26 struct rb_node **p = &root->rb_node; 27 struct rb_node **p = &root->rb_node;
27 struct rb_node *parent = NULL; 28 struct rb_node *parent = NULL;
28 struct callchain_node *rnode; 29 struct callchain_node *rnode;
30 u64 chain_cumul = cumul_hits(chain);
29 31
30 while (*p) { 32 while (*p) {
33 u64 rnode_cumul;
34
31 parent = *p; 35 parent = *p;
32 rnode = rb_entry(parent, struct callchain_node, rb_node); 36 rnode = rb_entry(parent, struct callchain_node, rb_node);
37 rnode_cumul = cumul_hits(rnode);
33 38
34 switch (mode) { 39 switch (mode) {
35 case CHAIN_FLAT: 40 case CHAIN_FLAT:
@@ -40,7 +45,7 @@ rb_insert_callchain(struct rb_root *root, struct callchain_node *chain,
40 break; 45 break;
41 case CHAIN_GRAPH_ABS: /* Falldown */ 46 case CHAIN_GRAPH_ABS: /* Falldown */
42 case CHAIN_GRAPH_REL: 47 case CHAIN_GRAPH_REL:
43 if (rnode->cumul_hit < chain->cumul_hit) 48 if (rnode_cumul < chain_cumul)
44 p = &(*p)->rb_left; 49 p = &(*p)->rb_left;
45 else 50 else
46 p = &(*p)->rb_right; 51 p = &(*p)->rb_right;
@@ -87,7 +92,7 @@ static void __sort_chain_graph_abs(struct callchain_node *node,
87 92
88 chain_for_each_child(child, node) { 93 chain_for_each_child(child, node) {
89 __sort_chain_graph_abs(child, min_hit); 94 __sort_chain_graph_abs(child, min_hit);
90 if (child->cumul_hit >= min_hit) 95 if (cumul_hits(child) >= min_hit)
91 rb_insert_callchain(&node->rb_root, child, 96 rb_insert_callchain(&node->rb_root, child,
92 CHAIN_GRAPH_ABS); 97 CHAIN_GRAPH_ABS);
93 } 98 }
@@ -108,11 +113,11 @@ static void __sort_chain_graph_rel(struct callchain_node *node,
108 u64 min_hit; 113 u64 min_hit;
109 114
110 node->rb_root = RB_ROOT; 115 node->rb_root = RB_ROOT;
111 min_hit = node->cumul_hit * min_percent / 100.0; 116 min_hit = ceil(node->children_hit * min_percent);
112 117
113 chain_for_each_child(child, node) { 118 chain_for_each_child(child, node) {
114 __sort_chain_graph_rel(child, min_percent); 119 __sort_chain_graph_rel(child, min_percent);
115 if (child->cumul_hit >= min_hit) 120 if (cumul_hits(child) >= min_hit)
116 rb_insert_callchain(&node->rb_root, child, 121 rb_insert_callchain(&node->rb_root, child,
117 CHAIN_GRAPH_REL); 122 CHAIN_GRAPH_REL);
118 } 123 }
@@ -122,7 +127,7 @@ static void
122sort_chain_graph_rel(struct rb_root *rb_root, struct callchain_node *chain_root, 127sort_chain_graph_rel(struct rb_root *rb_root, struct callchain_node *chain_root,
123 u64 min_hit __used, struct callchain_param *param) 128 u64 min_hit __used, struct callchain_param *param)
124{ 129{
125 __sort_chain_graph_rel(chain_root, param->min_percent); 130 __sort_chain_graph_rel(chain_root, param->min_percent / 100.0);
126 rb_root->rb_node = chain_root->rb_root.rb_node; 131 rb_root->rb_node = chain_root->rb_root.rb_node;
127} 132}
128 133
@@ -211,7 +216,8 @@ add_child(struct callchain_node *parent, struct ip_callchain *chain,
211 new = create_child(parent, false); 216 new = create_child(parent, false);
212 fill_node(new, chain, start, syms); 217 fill_node(new, chain, start, syms);
213 218
214 new->cumul_hit = new->hit = 1; 219 new->children_hit = 0;
220 new->hit = 1;
215} 221}
216 222
217/* 223/*
@@ -241,7 +247,8 @@ split_add_child(struct callchain_node *parent, struct ip_callchain *chain,
241 247
242 /* split the hits */ 248 /* split the hits */
243 new->hit = parent->hit; 249 new->hit = parent->hit;
244 new->cumul_hit = parent->cumul_hit; 250 new->children_hit = parent->children_hit;
251 parent->children_hit = cumul_hits(new);
245 new->val_nr = parent->val_nr - idx_local; 252 new->val_nr = parent->val_nr - idx_local;
246 parent->val_nr = idx_local; 253 parent->val_nr = idx_local;
247 254
@@ -249,6 +256,7 @@ split_add_child(struct callchain_node *parent, struct ip_callchain *chain,
249 if (idx_total < chain->nr) { 256 if (idx_total < chain->nr) {
250 parent->hit = 0; 257 parent->hit = 0;
251 add_child(parent, chain, idx_total, syms); 258 add_child(parent, chain, idx_total, syms);
259 parent->children_hit++;
252 } else { 260 } else {
253 parent->hit = 1; 261 parent->hit = 1;
254 } 262 }
@@ -269,13 +277,13 @@ __append_chain_children(struct callchain_node *root, struct ip_callchain *chain,
269 unsigned int ret = __append_chain(rnode, chain, start, syms); 277 unsigned int ret = __append_chain(rnode, chain, start, syms);
270 278
271 if (!ret) 279 if (!ret)
272 goto cumul; 280 goto inc_children_hit;
273 } 281 }
274 /* nothing in children, add to the current node */ 282 /* nothing in children, add to the current node */
275 add_child(root, chain, start, syms); 283 add_child(root, chain, start, syms);
276 284
277cumul: 285inc_children_hit:
278 root->cumul_hit++; 286 root->children_hit++;
279} 287}
280 288
281static int 289static int
@@ -317,8 +325,6 @@ __append_chain(struct callchain_node *root, struct ip_callchain *chain,
317 /* we match 100% of the path, increment the hit */ 325 /* we match 100% of the path, increment the hit */
318 if (i - start == root->val_nr && i == chain->nr) { 326 if (i - start == root->val_nr && i == chain->nr) {
319 root->hit++; 327 root->hit++;
320 root->cumul_hit++;
321
322 return 0; 328 return 0;
323 } 329 }
324 330
@@ -331,5 +337,7 @@ __append_chain(struct callchain_node *root, struct ip_callchain *chain,
331void append_chain(struct callchain_node *root, struct ip_callchain *chain, 337void append_chain(struct callchain_node *root, struct ip_callchain *chain,
332 struct symbol **syms) 338 struct symbol **syms)
333{ 339{
340 if (!chain->nr)
341 return;
334 __append_chain_children(root, chain, syms, 0); 342 __append_chain_children(root, chain, syms, 0);
335} 343}
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h
index 7812122bea1..a926ae4f5a1 100644
--- a/tools/perf/util/callchain.h
+++ b/tools/perf/util/callchain.h
@@ -7,6 +7,7 @@
7#include "symbol.h" 7#include "symbol.h"
8 8
9enum chain_mode { 9enum chain_mode {
10 CHAIN_NONE,
10 CHAIN_FLAT, 11 CHAIN_FLAT,
11 CHAIN_GRAPH_ABS, 12 CHAIN_GRAPH_ABS,
12 CHAIN_GRAPH_REL 13 CHAIN_GRAPH_REL
@@ -21,7 +22,7 @@ struct callchain_node {
21 struct rb_root rb_root; /* sorted tree of children */ 22 struct rb_root rb_root; /* sorted tree of children */
22 unsigned int val_nr; 23 unsigned int val_nr;
23 u64 hit; 24 u64 hit;
24 u64 cumul_hit; /* hit + hits of children */ 25 u64 children_hit;
25}; 26};
26 27
27struct callchain_param; 28struct callchain_param;
@@ -48,6 +49,11 @@ static inline void callchain_init(struct callchain_node *node)
48 INIT_LIST_HEAD(&node->val); 49 INIT_LIST_HEAD(&node->val);
49} 50}
50 51
52static inline u64 cumul_hits(struct callchain_node *node)
53{
54 return node->hit + node->children_hit;
55}
56
51int register_callchain_param(struct callchain_param *param); 57int register_callchain_param(struct callchain_param *param);
52void append_chain(struct callchain_node *root, struct ip_callchain *chain, 58void append_chain(struct callchain_node *root, struct ip_callchain *chain,
53 struct symbol **syms); 59 struct symbol **syms);
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 450384b3bbe..b92a457ca32 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -185,6 +185,8 @@ static void do_read(int fd, void *buf, size_t size)
185 185
186 if (ret < 0) 186 if (ret < 0)
187 die("failed to read"); 187 die("failed to read");
188 if (ret == 0)
189 die("failed to read: missing data");
188 190
189 size -= ret; 191 size -= ret;
190 buf += ret; 192 buf += ret;
@@ -213,9 +215,10 @@ struct perf_header *perf_header__read(int fd)
213 215
214 for (i = 0; i < nr_attrs; i++) { 216 for (i = 0; i < nr_attrs; i++) {
215 struct perf_header_attr *attr; 217 struct perf_header_attr *attr;
216 off_t tmp = lseek(fd, 0, SEEK_CUR); 218 off_t tmp;
217 219
218 do_read(fd, &f_attr, sizeof(f_attr)); 220 do_read(fd, &f_attr, sizeof(f_attr));
221 tmp = lseek(fd, 0, SEEK_CUR);
219 222
220 attr = perf_header_attr__new(&f_attr.attr); 223 attr = perf_header_attr__new(&f_attr.attr);
221 224
diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h
index b5ef53ad4c7..bf280449fcf 100644
--- a/tools/perf/util/header.h
+++ b/tools/perf/util/header.h
@@ -16,7 +16,7 @@ struct perf_header {
16 int frozen; 16 int frozen;
17 int attrs, size; 17 int attrs, size;
18 struct perf_header_attr **attr; 18 struct perf_header_attr **attr;
19 off_t attr_offset; 19 s64 attr_offset;
20 u64 data_offset; 20 u64 data_offset;
21 u64 data_size; 21 u64 data_size;
22}; 22};
diff --git a/tools/perf/util/include/linux/kernel.h b/tools/perf/util/include/linux/kernel.h
index 99c1b3d1edd..a6b87390cb5 100644
--- a/tools/perf/util/include/linux/kernel.h
+++ b/tools/perf/util/include/linux/kernel.h
@@ -18,4 +18,12 @@
18 (type *)((char *)__mptr - offsetof(type, member)); }) 18 (type *)((char *)__mptr - offsetof(type, member)); })
19#endif 19#endif
20 20
21#ifndef max
22#define max(x, y) ({ \
23 typeof(x) _max1 = (x); \
24 typeof(y) _max2 = (y); \
25 (void) (&_max1 == &_max2); \
26 _max1 > _max2 ? _max1 : _max2; })
27#endif
28
21#endif 29#endif
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 5184959e061..04417840878 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -5,6 +5,7 @@
5#include "parse-events.h" 5#include "parse-events.h"
6#include "exec_cmd.h" 6#include "exec_cmd.h"
7#include "string.h" 7#include "string.h"
8#include "cache.h"
8 9
9extern char *strcasestr(const char *haystack, const char *needle); 10extern char *strcasestr(const char *haystack, const char *needle);
10 11
@@ -19,6 +20,8 @@ struct event_symbol {
19 char *alias; 20 char *alias;
20}; 21};
21 22
23char debugfs_path[MAXPATHLEN];
24
22#define CHW(x) .type = PERF_TYPE_HARDWARE, .config = PERF_COUNT_HW_##x 25#define CHW(x) .type = PERF_TYPE_HARDWARE, .config = PERF_COUNT_HW_##x
23#define CSW(x) .type = PERF_TYPE_SOFTWARE, .config = PERF_COUNT_SW_##x 26#define CSW(x) .type = PERF_TYPE_SOFTWARE, .config = PERF_COUNT_SW_##x
24 27
@@ -71,8 +74,8 @@ static char *sw_event_names[] = {
71#define MAX_ALIASES 8 74#define MAX_ALIASES 8
72 75
73static char *hw_cache[][MAX_ALIASES] = { 76static char *hw_cache[][MAX_ALIASES] = {
74 { "L1-d$", "l1-d", "l1d", "L1-data", }, 77 { "L1-dcache", "l1-d", "l1d", "L1-data", },
75 { "L1-i$", "l1-i", "l1i", "L1-instruction", }, 78 { "L1-icache", "l1-i", "l1i", "L1-instruction", },
76 { "LLC", "L2" }, 79 { "LLC", "L2" },
77 { "dTLB", "d-tlb", "Data-TLB", }, 80 { "dTLB", "d-tlb", "Data-TLB", },
78 { "iTLB", "i-tlb", "Instruction-TLB", }, 81 { "iTLB", "i-tlb", "Instruction-TLB", },
@@ -110,6 +113,104 @@ static unsigned long hw_cache_stat[C(MAX)] = {
110 [C(BPU)] = (CACHE_READ), 113 [C(BPU)] = (CACHE_READ),
111}; 114};
112 115
116#define for_each_subsystem(sys_dir, sys_dirent, sys_next, file, st) \
117 while (!readdir_r(sys_dir, &sys_dirent, &sys_next) && sys_next) \
118 if (snprintf(file, MAXPATHLEN, "%s/%s", debugfs_path, \
119 sys_dirent.d_name) && \
120 (!stat(file, &st)) && (S_ISDIR(st.st_mode)) && \
121 (strcmp(sys_dirent.d_name, ".")) && \
122 (strcmp(sys_dirent.d_name, "..")))
123
124static int tp_event_has_id(struct dirent *sys_dir, struct dirent *evt_dir)
125{
126 char evt_path[MAXPATHLEN];
127 int fd;
128
129 snprintf(evt_path, MAXPATHLEN, "%s/%s/%s/id", debugfs_path,
130 sys_dir->d_name, evt_dir->d_name);
131 fd = open(evt_path, O_RDONLY);
132 if (fd < 0)
133 return -EINVAL;
134 close(fd);
135
136 return 0;
137}
138
139#define for_each_event(sys_dirent, evt_dir, evt_dirent, evt_next, file, st) \
140 while (!readdir_r(evt_dir, &evt_dirent, &evt_next) && evt_next) \
141 if (snprintf(file, MAXPATHLEN, "%s/%s/%s", debugfs_path, \
142 sys_dirent.d_name, evt_dirent.d_name) && \
143 (!stat(file, &st)) && (S_ISDIR(st.st_mode)) && \
144 (strcmp(evt_dirent.d_name, ".")) && \
145 (strcmp(evt_dirent.d_name, "..")) && \
146 (!tp_event_has_id(&sys_dirent, &evt_dirent)))
147
148#define MAX_EVENT_LENGTH 30
149
150int valid_debugfs_mount(const char *debugfs)
151{
152 struct statfs st_fs;
153
154 if (statfs(debugfs, &st_fs) < 0)
155 return -ENOENT;
156 else if (st_fs.f_type != (long) DEBUGFS_MAGIC)
157 return -ENOENT;
158 return 0;
159}
160
161static char *tracepoint_id_to_name(u64 config)
162{
163 static char tracepoint_name[2 * MAX_EVENT_LENGTH];
164 DIR *sys_dir, *evt_dir;
165 struct dirent *sys_next, *evt_next, sys_dirent, evt_dirent;
166 struct stat st;
167 char id_buf[4];
168 int fd;
169 u64 id;
170 char evt_path[MAXPATHLEN];
171
172 if (valid_debugfs_mount(debugfs_path))
173 return "unkown";
174
175 sys_dir = opendir(debugfs_path);
176 if (!sys_dir)
177 goto cleanup;
178
179 for_each_subsystem(sys_dir, sys_dirent, sys_next, evt_path, st) {
180 evt_dir = opendir(evt_path);
181 if (!evt_dir)
182 goto cleanup;
183 for_each_event(sys_dirent, evt_dir, evt_dirent, evt_next,
184 evt_path, st) {
185 snprintf(evt_path, MAXPATHLEN, "%s/%s/%s/id",
186 debugfs_path, sys_dirent.d_name,
187 evt_dirent.d_name);
188 fd = open(evt_path, O_RDONLY);
189 if (fd < 0)
190 continue;
191 if (read(fd, id_buf, sizeof(id_buf)) < 0) {
192 close(fd);
193 continue;
194 }
195 close(fd);
196 id = atoll(id_buf);
197 if (id == config) {
198 closedir(evt_dir);
199 closedir(sys_dir);
200 snprintf(tracepoint_name, 2 * MAX_EVENT_LENGTH,
201 "%s:%s", sys_dirent.d_name,
202 evt_dirent.d_name);
203 return tracepoint_name;
204 }
205 }
206 closedir(evt_dir);
207 }
208
209cleanup:
210 closedir(sys_dir);
211 return "unkown";
212}
213
113static int is_cache_op_valid(u8 cache_type, u8 cache_op) 214static int is_cache_op_valid(u8 cache_type, u8 cache_op)
114{ 215{
115 if (hw_cache_stat[cache_type] & COP(cache_op)) 216 if (hw_cache_stat[cache_type] & COP(cache_op))
@@ -138,9 +239,15 @@ char *event_name(int counter)
138{ 239{
139 u64 config = attrs[counter].config; 240 u64 config = attrs[counter].config;
140 int type = attrs[counter].type; 241 int type = attrs[counter].type;
242
243 return __event_name(type, config);
244}
245
246char *__event_name(int type, u64 config)
247{
141 static char buf[32]; 248 static char buf[32];
142 249
143 if (attrs[counter].type == PERF_TYPE_RAW) { 250 if (type == PERF_TYPE_RAW) {
144 sprintf(buf, "raw 0x%llx", config); 251 sprintf(buf, "raw 0x%llx", config);
145 return buf; 252 return buf;
146 } 253 }
@@ -177,6 +284,9 @@ char *event_name(int counter)
177 return sw_event_names[config]; 284 return sw_event_names[config];
178 return "unknown-software"; 285 return "unknown-software";
179 286
287 case PERF_TYPE_TRACEPOINT:
288 return tracepoint_id_to_name(config);
289
180 default: 290 default:
181 break; 291 break;
182 } 292 }
@@ -265,6 +375,63 @@ parse_generic_hw_event(const char **str, struct perf_counter_attr *attr)
265 return 1; 375 return 1;
266} 376}
267 377
378static int parse_tracepoint_event(const char **strp,
379 struct perf_counter_attr *attr)
380{
381 const char *evt_name;
382 char *flags;
383 char sys_name[MAX_EVENT_LENGTH];
384 char id_buf[4];
385 int fd;
386 unsigned int sys_length, evt_length;
387 u64 id;
388 char evt_path[MAXPATHLEN];
389
390 if (valid_debugfs_mount(debugfs_path))
391 return 0;
392
393 evt_name = strchr(*strp, ':');
394 if (!evt_name)
395 return 0;
396
397 sys_length = evt_name - *strp;
398 if (sys_length >= MAX_EVENT_LENGTH)
399 return 0;
400
401 strncpy(sys_name, *strp, sys_length);
402 sys_name[sys_length] = '\0';
403 evt_name = evt_name + 1;
404
405 flags = strchr(evt_name, ':');
406 if (flags) {
407 *flags = '\0';
408 flags++;
409 if (!strncmp(flags, "record", strlen(flags)))
410 attr->sample_type |= PERF_SAMPLE_RAW;
411 }
412
413 evt_length = strlen(evt_name);
414 if (evt_length >= MAX_EVENT_LENGTH)
415 return 0;
416
417 snprintf(evt_path, MAXPATHLEN, "%s/%s/%s/id", debugfs_path,
418 sys_name, evt_name);
419 fd = open(evt_path, O_RDONLY);
420 if (fd < 0)
421 return 0;
422
423 if (read(fd, id_buf, sizeof(id_buf)) < 0) {
424 close(fd);
425 return 0;
426 }
427 close(fd);
428 id = atoll(id_buf);
429 attr->config = id;
430 attr->type = PERF_TYPE_TRACEPOINT;
431 *strp = evt_name + evt_length;
432 return 1;
433}
434
268static int check_events(const char *str, unsigned int i) 435static int check_events(const char *str, unsigned int i)
269{ 436{
270 int n; 437 int n;
@@ -374,7 +541,8 @@ parse_event_modifier(const char **strp, struct perf_counter_attr *attr)
374 */ 541 */
375static int parse_event_symbols(const char **str, struct perf_counter_attr *attr) 542static int parse_event_symbols(const char **str, struct perf_counter_attr *attr)
376{ 543{
377 if (!(parse_raw_event(str, attr) || 544 if (!(parse_tracepoint_event(str, attr) ||
545 parse_raw_event(str, attr) ||
378 parse_numeric_event(str, attr) || 546 parse_numeric_event(str, attr) ||
379 parse_symbolic_event(str, attr) || 547 parse_symbolic_event(str, attr) ||
380 parse_generic_hw_event(str, attr))) 548 parse_generic_hw_event(str, attr)))
@@ -423,6 +591,42 @@ static const char * const event_type_descriptors[] = {
423}; 591};
424 592
425/* 593/*
594 * Print the events from <debugfs_mount_point>/tracing/events
595 */
596
597static void print_tracepoint_events(void)
598{
599 DIR *sys_dir, *evt_dir;
600 struct dirent *sys_next, *evt_next, sys_dirent, evt_dirent;
601 struct stat st;
602 char evt_path[MAXPATHLEN];
603
604 if (valid_debugfs_mount(debugfs_path))
605 return;
606
607 sys_dir = opendir(debugfs_path);
608 if (!sys_dir)
609 goto cleanup;
610
611 for_each_subsystem(sys_dir, sys_dirent, sys_next, evt_path, st) {
612 evt_dir = opendir(evt_path);
613 if (!evt_dir)
614 goto cleanup;
615 for_each_event(sys_dirent, evt_dir, evt_dirent, evt_next,
616 evt_path, st) {
617 snprintf(evt_path, MAXPATHLEN, "%s:%s",
618 sys_dirent.d_name, evt_dirent.d_name);
619 fprintf(stderr, " %-40s [%s]\n", evt_path,
620 event_type_descriptors[PERF_TYPE_TRACEPOINT+1]);
621 }
622 closedir(evt_dir);
623 }
624
625cleanup:
626 closedir(sys_dir);
627}
628
629/*
426 * Print the help text for the event symbols: 630 * Print the help text for the event symbols:
427 */ 631 */
428void print_events(void) 632void print_events(void)
@@ -436,7 +640,7 @@ void print_events(void)
436 640
437 for (i = 0; i < ARRAY_SIZE(event_symbols); i++, syms++) { 641 for (i = 0; i < ARRAY_SIZE(event_symbols); i++, syms++) {
438 type = syms->type + 1; 642 type = syms->type + 1;
439 if (type > ARRAY_SIZE(event_type_descriptors)) 643 if (type >= ARRAY_SIZE(event_type_descriptors))
440 type = 0; 644 type = 0;
441 645
442 if (type != prev_type) 646 if (type != prev_type)
@@ -472,5 +676,7 @@ void print_events(void)
472 "rNNN"); 676 "rNNN");
473 fprintf(stderr, "\n"); 677 fprintf(stderr, "\n");
474 678
679 print_tracepoint_events();
680
475 exit(129); 681 exit(129);
476} 682}
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index e3d552908e6..192a962e3a0 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -3,11 +3,14 @@
3 * Parse symbolic events/counts passed in as options: 3 * Parse symbolic events/counts passed in as options:
4 */ 4 */
5 5
6struct option;
7
6extern int nr_counters; 8extern int nr_counters;
7 9
8extern struct perf_counter_attr attrs[MAX_COUNTERS]; 10extern struct perf_counter_attr attrs[MAX_COUNTERS];
9 11
10extern char *event_name(int ctr); 12extern char *event_name(int ctr);
13extern char *__event_name(int type, u64 config);
11 14
12extern int parse_events(const struct option *opt, const char *str, int unset); 15extern int parse_events(const struct option *opt, const char *str, int unset);
13 16
@@ -15,3 +18,6 @@ extern int parse_events(const struct option *opt, const char *str, int unset);
15 18
16extern void print_events(void); 19extern void print_events(void);
17 20
21extern char debugfs_path[];
22extern int valid_debugfs_mount(const char *debugfs);
23
diff --git a/tools/perf/util/quote.c b/tools/perf/util/quote.c
index c6e5dc0dc82..2726fe40eb5 100644
--- a/tools/perf/util/quote.c
+++ b/tools/perf/util/quote.c
@@ -318,7 +318,7 @@ char *quote_path_relative(const char *in, int len,
318 strbuf_addch(out, '"'); 318 strbuf_addch(out, '"');
319 if (prefix) { 319 if (prefix) {
320 int off = 0; 320 int off = 0;
321 while (prefix[off] && off < len && prefix[off] == in[off]) 321 while (off < len && prefix[off] && prefix[off] == in[off])
322 if (prefix[off] == '/') { 322 if (prefix[off] == '/') {
323 prefix += off + 1; 323 prefix += off + 1;
324 in += off + 1; 324 in += off + 1;
diff --git a/tools/perf/util/string.h b/tools/perf/util/string.h
index 3dca2f654cd..bf39dfadfd2 100644
--- a/tools/perf/util/string.h
+++ b/tools/perf/util/string.h
@@ -5,4 +5,7 @@
5 5
6int hex2u64(const char *ptr, u64 *val); 6int hex2u64(const char *ptr, u64 *val);
7 7
8#define _STR(x) #x
9#define STR(x) _STR(x)
10
8#endif 11#endif
diff --git a/tools/perf/util/strlist.c b/tools/perf/util/strlist.c
index 025a78edfff..7ad38171dc2 100644
--- a/tools/perf/util/strlist.c
+++ b/tools/perf/util/strlist.c
@@ -64,6 +64,7 @@ int strlist__add(struct strlist *self, const char *new_entry)
64 64
65 rb_link_node(&sn->rb_node, parent, p); 65 rb_link_node(&sn->rb_node, parent, p);
66 rb_insert_color(&sn->rb_node, &self->entries); 66 rb_insert_color(&sn->rb_node, &self->entries);
67 ++self->nr_entries;
67 68
68 return 0; 69 return 0;
69} 70}
@@ -155,8 +156,9 @@ struct strlist *strlist__new(bool dupstr, const char *slist)
155 struct strlist *self = malloc(sizeof(*self)); 156 struct strlist *self = malloc(sizeof(*self));
156 157
157 if (self != NULL) { 158 if (self != NULL) {
158 self->entries = RB_ROOT; 159 self->entries = RB_ROOT;
159 self->dupstr = dupstr; 160 self->dupstr = dupstr;
161 self->nr_entries = 0;
160 if (slist && strlist__parse_list(self, slist) != 0) 162 if (slist && strlist__parse_list(self, slist) != 0)
161 goto out_error; 163 goto out_error;
162 } 164 }
@@ -182,3 +184,17 @@ void strlist__delete(struct strlist *self)
182 free(self); 184 free(self);
183 } 185 }
184} 186}
187
188struct str_node *strlist__entry(const struct strlist *self, unsigned int idx)
189{
190 struct rb_node *nd;
191
192 for (nd = rb_first(&self->entries); nd; nd = rb_next(nd)) {
193 struct str_node *pos = rb_entry(nd, struct str_node, rb_node);
194
195 if (!idx--)
196 return pos;
197 }
198
199 return NULL;
200}
diff --git a/tools/perf/util/strlist.h b/tools/perf/util/strlist.h
index 2fdcfee8758..921818e44a5 100644
--- a/tools/perf/util/strlist.h
+++ b/tools/perf/util/strlist.h
@@ -11,7 +11,8 @@ struct str_node {
11 11
12struct strlist { 12struct strlist {
13 struct rb_root entries; 13 struct rb_root entries;
14 bool dupstr; 14 unsigned int nr_entries;
15 bool dupstr;
15}; 16};
16 17
17struct strlist *strlist__new(bool dupstr, const char *slist); 18struct strlist *strlist__new(bool dupstr, const char *slist);
@@ -21,11 +22,17 @@ void strlist__remove(struct strlist *self, struct str_node *sn);
21int strlist__load(struct strlist *self, const char *filename); 22int strlist__load(struct strlist *self, const char *filename);
22int strlist__add(struct strlist *self, const char *str); 23int strlist__add(struct strlist *self, const char *str);
23 24
25struct str_node *strlist__entry(const struct strlist *self, unsigned int idx);
24bool strlist__has_entry(struct strlist *self, const char *entry); 26bool strlist__has_entry(struct strlist *self, const char *entry);
25 27
26static inline bool strlist__empty(const struct strlist *self) 28static inline bool strlist__empty(const struct strlist *self)
27{ 29{
28 return rb_first(&self->entries) == NULL; 30 return self->nr_entries == 0;
31}
32
33static inline unsigned int strlist__nr_entries(const struct strlist *self)
34{
35 return self->nr_entries;
29} 36}
30 37
31int strlist__parse_list(struct strlist *self, const char *s); 38int strlist__parse_list(struct strlist *self, const char *s);
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 4683b67b5ee..5c0f42e6b33 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -9,6 +9,16 @@
9 9
10const char *sym_hist_filter; 10const char *sym_hist_filter;
11 11
12enum dso_origin {
13 DSO__ORIG_KERNEL = 0,
14 DSO__ORIG_JAVA_JIT,
15 DSO__ORIG_FEDORA,
16 DSO__ORIG_UBUNTU,
17 DSO__ORIG_BUILDID,
18 DSO__ORIG_DSO,
19 DSO__ORIG_NOT_FOUND,
20};
21
12static struct symbol *symbol__new(u64 start, u64 len, 22static struct symbol *symbol__new(u64 start, u64 len,
13 const char *name, unsigned int priv_size, 23 const char *name, unsigned int priv_size,
14 u64 obj_start, int verbose) 24 u64 obj_start, int verbose)
@@ -65,6 +75,8 @@ struct dso *dso__new(const char *name, unsigned int sym_priv_size)
65 self->syms = RB_ROOT; 75 self->syms = RB_ROOT;
66 self->sym_priv_size = sym_priv_size; 76 self->sym_priv_size = sym_priv_size;
67 self->find_symbol = dso__find_symbol; 77 self->find_symbol = dso__find_symbol;
78 self->slen_calculated = 0;
79 self->origin = DSO__ORIG_NOT_FOUND;
68 } 80 }
69 81
70 return self; 82 return self;
@@ -373,36 +385,61 @@ static Elf_Scn *elf_section_by_name(Elf *elf, GElf_Ehdr *ep,
373 idx < nr_entries; \ 385 idx < nr_entries; \
374 ++idx, pos = gelf_getrela(reldata, idx, &pos_mem)) 386 ++idx, pos = gelf_getrela(reldata, idx, &pos_mem))
375 387
376static int dso__synthesize_plt_symbols(struct dso *self, Elf *elf, 388/*
377 GElf_Ehdr *ehdr, Elf_Scn *scn_dynsym, 389 * We need to check if we have a .dynsym, so that we can handle the
378 GElf_Shdr *shdr_dynsym, 390 * .plt, synthesizing its symbols, that aren't on the symtabs (be it
379 size_t dynsym_idx, int verbose) 391 * .dynsym or .symtab).
392 * And always look at the original dso, not at debuginfo packages, that
393 * have the PLT data stripped out (shdr_rel_plt.sh_type == SHT_NOBITS).
394 */
395static int dso__synthesize_plt_symbols(struct dso *self, int verbose)
380{ 396{
381 uint32_t nr_rel_entries, idx; 397 uint32_t nr_rel_entries, idx;
382 GElf_Sym sym; 398 GElf_Sym sym;
383 u64 plt_offset; 399 u64 plt_offset;
384 GElf_Shdr shdr_plt; 400 GElf_Shdr shdr_plt;
385 struct symbol *f; 401 struct symbol *f;
386 GElf_Shdr shdr_rel_plt; 402 GElf_Shdr shdr_rel_plt, shdr_dynsym;
387 Elf_Data *reldata, *syms, *symstrs; 403 Elf_Data *reldata, *syms, *symstrs;
388 Elf_Scn *scn_plt_rel, *scn_symstrs; 404 Elf_Scn *scn_plt_rel, *scn_symstrs, *scn_dynsym;
405 size_t dynsym_idx;
406 GElf_Ehdr ehdr;
389 char sympltname[1024]; 407 char sympltname[1024];
390 int nr = 0, symidx; 408 Elf *elf;
409 int nr = 0, symidx, fd, err = 0;
410
411 fd = open(self->name, O_RDONLY);
412 if (fd < 0)
413 goto out;
391 414
392 scn_plt_rel = elf_section_by_name(elf, ehdr, &shdr_rel_plt, 415 elf = elf_begin(fd, ELF_C_READ_MMAP, NULL);
416 if (elf == NULL)
417 goto out_close;
418
419 if (gelf_getehdr(elf, &ehdr) == NULL)
420 goto out_elf_end;
421
422 scn_dynsym = elf_section_by_name(elf, &ehdr, &shdr_dynsym,
423 ".dynsym", &dynsym_idx);
424 if (scn_dynsym == NULL)
425 goto out_elf_end;
426
427 scn_plt_rel = elf_section_by_name(elf, &ehdr, &shdr_rel_plt,
393 ".rela.plt", NULL); 428 ".rela.plt", NULL);
394 if (scn_plt_rel == NULL) { 429 if (scn_plt_rel == NULL) {
395 scn_plt_rel = elf_section_by_name(elf, ehdr, &shdr_rel_plt, 430 scn_plt_rel = elf_section_by_name(elf, &ehdr, &shdr_rel_plt,
396 ".rel.plt", NULL); 431 ".rel.plt", NULL);
397 if (scn_plt_rel == NULL) 432 if (scn_plt_rel == NULL)
398 return 0; 433 goto out_elf_end;
399 } 434 }
400 435
436 err = -1;
437
401 if (shdr_rel_plt.sh_link != dynsym_idx) 438 if (shdr_rel_plt.sh_link != dynsym_idx)
402 return 0; 439 goto out_elf_end;
403 440
404 if (elf_section_by_name(elf, ehdr, &shdr_plt, ".plt", NULL) == NULL) 441 if (elf_section_by_name(elf, &ehdr, &shdr_plt, ".plt", NULL) == NULL)
405 return 0; 442 goto out_elf_end;
406 443
407 /* 444 /*
408 * Fetch the relocation section to find the indexes to the GOT 445 * Fetch the relocation section to find the indexes to the GOT
@@ -410,19 +447,19 @@ static int dso__synthesize_plt_symbols(struct dso *self, Elf *elf,
410 */ 447 */
411 reldata = elf_getdata(scn_plt_rel, NULL); 448 reldata = elf_getdata(scn_plt_rel, NULL);
412 if (reldata == NULL) 449 if (reldata == NULL)
413 return -1; 450 goto out_elf_end;
414 451
415 syms = elf_getdata(scn_dynsym, NULL); 452 syms = elf_getdata(scn_dynsym, NULL);
416 if (syms == NULL) 453 if (syms == NULL)
417 return -1; 454 goto out_elf_end;
418 455
419 scn_symstrs = elf_getscn(elf, shdr_dynsym->sh_link); 456 scn_symstrs = elf_getscn(elf, shdr_dynsym.sh_link);
420 if (scn_symstrs == NULL) 457 if (scn_symstrs == NULL)
421 return -1; 458 goto out_elf_end;
422 459
423 symstrs = elf_getdata(scn_symstrs, NULL); 460 symstrs = elf_getdata(scn_symstrs, NULL);
424 if (symstrs == NULL) 461 if (symstrs == NULL)
425 return -1; 462 goto out_elf_end;
426 463
427 nr_rel_entries = shdr_rel_plt.sh_size / shdr_rel_plt.sh_entsize; 464 nr_rel_entries = shdr_rel_plt.sh_size / shdr_rel_plt.sh_entsize;
428 plt_offset = shdr_plt.sh_offset; 465 plt_offset = shdr_plt.sh_offset;
@@ -441,7 +478,7 @@ static int dso__synthesize_plt_symbols(struct dso *self, Elf *elf,
441 f = symbol__new(plt_offset, shdr_plt.sh_entsize, 478 f = symbol__new(plt_offset, shdr_plt.sh_entsize,
442 sympltname, self->sym_priv_size, 0, verbose); 479 sympltname, self->sym_priv_size, 0, verbose);
443 if (!f) 480 if (!f)
444 return -1; 481 goto out_elf_end;
445 482
446 dso__insert_symbol(self, f); 483 dso__insert_symbol(self, f);
447 ++nr; 484 ++nr;
@@ -459,19 +496,25 @@ static int dso__synthesize_plt_symbols(struct dso *self, Elf *elf,
459 f = symbol__new(plt_offset, shdr_plt.sh_entsize, 496 f = symbol__new(plt_offset, shdr_plt.sh_entsize,
460 sympltname, self->sym_priv_size, 0, verbose); 497 sympltname, self->sym_priv_size, 0, verbose);
461 if (!f) 498 if (!f)
462 return -1; 499 goto out_elf_end;
463 500
464 dso__insert_symbol(self, f); 501 dso__insert_symbol(self, f);
465 ++nr; 502 ++nr;
466 } 503 }
467 } else {
468 /*
469 * TODO: There are still one more shdr_rel_plt.sh_type
470 * I have to investigate, but probably should be ignored.
471 */
472 } 504 }
473 505
474 return nr; 506 err = 0;
507out_elf_end:
508 elf_end(elf);
509out_close:
510 close(fd);
511
512 if (err == 0)
513 return nr;
514out:
515 fprintf(stderr, "%s: problems reading %s PLT info.\n",
516 __func__, self->name);
517 return 0;
475} 518}
476 519
477static int dso__load_sym(struct dso *self, int fd, const char *name, 520static int dso__load_sym(struct dso *self, int fd, const char *name,
@@ -485,10 +528,9 @@ static int dso__load_sym(struct dso *self, int fd, const char *name,
485 GElf_Shdr shdr; 528 GElf_Shdr shdr;
486 Elf_Data *syms; 529 Elf_Data *syms;
487 GElf_Sym sym; 530 GElf_Sym sym;
488 Elf_Scn *sec, *sec_dynsym, *sec_strndx; 531 Elf_Scn *sec, *sec_strndx;
489 Elf *elf; 532 Elf *elf;
490 size_t dynsym_idx; 533 int nr = 0, kernel = !strcmp("[kernel]", self->name);
491 int nr = 0;
492 534
493 elf = elf_begin(fd, ELF_C_READ_MMAP, NULL); 535 elf = elf_begin(fd, ELF_C_READ_MMAP, NULL);
494 if (elf == NULL) { 536 if (elf == NULL) {
@@ -504,32 +546,11 @@ static int dso__load_sym(struct dso *self, int fd, const char *name,
504 goto out_elf_end; 546 goto out_elf_end;
505 } 547 }
506 548
507 /*
508 * We need to check if we have a .dynsym, so that we can handle the
509 * .plt, synthesizing its symbols, that aren't on the symtabs (be it
510 * .dynsym or .symtab)
511 */
512 sec_dynsym = elf_section_by_name(elf, &ehdr, &shdr,
513 ".dynsym", &dynsym_idx);
514 if (sec_dynsym != NULL) {
515 nr = dso__synthesize_plt_symbols(self, elf, &ehdr,
516 sec_dynsym, &shdr,
517 dynsym_idx, verbose);
518 if (nr < 0)
519 goto out_elf_end;
520 }
521
522 /*
523 * But if we have a full .symtab (that is a superset of .dynsym) we
524 * should add the symbols not in the .dynsyn
525 */
526 sec = elf_section_by_name(elf, &ehdr, &shdr, ".symtab", NULL); 549 sec = elf_section_by_name(elf, &ehdr, &shdr, ".symtab", NULL);
527 if (sec == NULL) { 550 if (sec == NULL) {
528 if (sec_dynsym == NULL) 551 sec = elf_section_by_name(elf, &ehdr, &shdr, ".dynsym", NULL);
552 if (sec == NULL)
529 goto out_elf_end; 553 goto out_elf_end;
530
531 sec = sec_dynsym;
532 gelf_getshdr(sec, &shdr);
533 } 554 }
534 555
535 syms = elf_getdata(sec, NULL); 556 syms = elf_getdata(sec, NULL);
@@ -549,18 +570,23 @@ static int dso__load_sym(struct dso *self, int fd, const char *name,
549 goto out_elf_end; 570 goto out_elf_end;
550 571
551 secstrs = elf_getdata(sec_strndx, NULL); 572 secstrs = elf_getdata(sec_strndx, NULL);
552 if (symstrs == NULL) 573 if (secstrs == NULL)
553 goto out_elf_end; 574 goto out_elf_end;
554 575
555 nr_syms = shdr.sh_size / shdr.sh_entsize; 576 nr_syms = shdr.sh_size / shdr.sh_entsize;
556 577
557 memset(&sym, 0, sizeof(sym)); 578 memset(&sym, 0, sizeof(sym));
558 self->adjust_symbols = (ehdr.e_type == ET_EXEC || 579 if (!kernel) {
580 self->adjust_symbols = (ehdr.e_type == ET_EXEC ||
559 elf_section_by_name(elf, &ehdr, &shdr, 581 elf_section_by_name(elf, &ehdr, &shdr,
560 ".gnu.prelink_undo", 582 ".gnu.prelink_undo",
561 NULL) != NULL); 583 NULL) != NULL);
584 } else self->adjust_symbols = 0;
585
562 elf_symtab__for_each_symbol(syms, nr_syms, index, sym) { 586 elf_symtab__for_each_symbol(syms, nr_syms, index, sym) {
563 struct symbol *f; 587 struct symbol *f;
588 const char *name;
589 char *demangled;
564 u64 obj_start; 590 u64 obj_start;
565 struct section *section = NULL; 591 struct section *section = NULL;
566 int is_label = elf_sym__is_label(&sym); 592 int is_label = elf_sym__is_label(&sym);
@@ -599,10 +625,19 @@ static int dso__load_sym(struct dso *self, int fd, const char *name,
599 goto out_elf_end; 625 goto out_elf_end;
600 } 626 }
601 } 627 }
628 /*
629 * We need to figure out if the object was created from C++ sources
630 * DWARF DW_compile_unit has this, but we don't always have access
631 * to it...
632 */
633 name = elf_sym__name(&sym, symstrs);
634 demangled = bfd_demangle(NULL, name, DMGL_PARAMS | DMGL_ANSI);
635 if (demangled != NULL)
636 name = demangled;
602 637
603 f = symbol__new(sym.st_value, sym.st_size, 638 f = symbol__new(sym.st_value, sym.st_size, name,
604 elf_sym__name(&sym, symstrs),
605 self->sym_priv_size, obj_start, verbose); 639 self->sym_priv_size, obj_start, verbose);
640 free(demangled);
606 if (!f) 641 if (!f)
607 goto out_elf_end; 642 goto out_elf_end;
608 643
@@ -622,11 +657,85 @@ out_close:
622 return err; 657 return err;
623} 658}
624 659
660#define BUILD_ID_SIZE 128
661
662static char *dso__read_build_id(struct dso *self, int verbose)
663{
664 int i;
665 GElf_Ehdr ehdr;
666 GElf_Shdr shdr;
667 Elf_Data *build_id_data;
668 Elf_Scn *sec;
669 char *build_id = NULL, *bid;
670 unsigned char *raw;
671 Elf *elf;
672 int fd = open(self->name, O_RDONLY);
673
674 if (fd < 0)
675 goto out;
676
677 elf = elf_begin(fd, ELF_C_READ_MMAP, NULL);
678 if (elf == NULL) {
679 if (verbose)
680 fprintf(stderr, "%s: cannot read %s ELF file.\n",
681 __func__, self->name);
682 goto out_close;
683 }
684
685 if (gelf_getehdr(elf, &ehdr) == NULL) {
686 if (verbose)
687 fprintf(stderr, "%s: cannot get elf header.\n", __func__);
688 goto out_elf_end;
689 }
690
691 sec = elf_section_by_name(elf, &ehdr, &shdr, ".note.gnu.build-id", NULL);
692 if (sec == NULL)
693 goto out_elf_end;
694
695 build_id_data = elf_getdata(sec, NULL);
696 if (build_id_data == NULL)
697 goto out_elf_end;
698 build_id = malloc(BUILD_ID_SIZE);
699 if (build_id == NULL)
700 goto out_elf_end;
701 raw = build_id_data->d_buf + 16;
702 bid = build_id;
703
704 for (i = 0; i < 20; ++i) {
705 sprintf(bid, "%02x", *raw);
706 ++raw;
707 bid += 2;
708 }
709 if (verbose >= 2)
710 printf("%s(%s): %s\n", __func__, self->name, build_id);
711out_elf_end:
712 elf_end(elf);
713out_close:
714 close(fd);
715out:
716 return build_id;
717}
718
719char dso__symtab_origin(const struct dso *self)
720{
721 static const char origin[] = {
722 [DSO__ORIG_KERNEL] = 'k',
723 [DSO__ORIG_JAVA_JIT] = 'j',
724 [DSO__ORIG_FEDORA] = 'f',
725 [DSO__ORIG_UBUNTU] = 'u',
726 [DSO__ORIG_BUILDID] = 'b',
727 [DSO__ORIG_DSO] = 'd',
728 };
729
730 if (self == NULL || self->origin == DSO__ORIG_NOT_FOUND)
731 return '!';
732 return origin[self->origin];
733}
734
625int dso__load(struct dso *self, symbol_filter_t filter, int verbose) 735int dso__load(struct dso *self, symbol_filter_t filter, int verbose)
626{ 736{
627 int size = strlen(self->name) + sizeof("/usr/lib/debug%s.debug"); 737 int size = PATH_MAX;
628 char *name = malloc(size); 738 char *name = malloc(size), *build_id = NULL;
629 int variant = 0;
630 int ret = -1; 739 int ret = -1;
631 int fd; 740 int fd;
632 741
@@ -635,26 +744,43 @@ int dso__load(struct dso *self, symbol_filter_t filter, int verbose)
635 744
636 self->adjust_symbols = 0; 745 self->adjust_symbols = 0;
637 746
638 if (strncmp(self->name, "/tmp/perf-", 10) == 0) 747 if (strncmp(self->name, "/tmp/perf-", 10) == 0) {
639 return dso__load_perf_map(self, filter, verbose); 748 ret = dso__load_perf_map(self, filter, verbose);
749 self->origin = ret > 0 ? DSO__ORIG_JAVA_JIT :
750 DSO__ORIG_NOT_FOUND;
751 return ret;
752 }
753
754 self->origin = DSO__ORIG_FEDORA - 1;
640 755
641more: 756more:
642 do { 757 do {
643 switch (variant) { 758 self->origin++;
644 case 0: /* Fedora */ 759 switch (self->origin) {
760 case DSO__ORIG_FEDORA:
645 snprintf(name, size, "/usr/lib/debug%s.debug", self->name); 761 snprintf(name, size, "/usr/lib/debug%s.debug", self->name);
646 break; 762 break;
647 case 1: /* Ubuntu */ 763 case DSO__ORIG_UBUNTU:
648 snprintf(name, size, "/usr/lib/debug%s", self->name); 764 snprintf(name, size, "/usr/lib/debug%s", self->name);
649 break; 765 break;
650 case 2: /* Sane people */ 766 case DSO__ORIG_BUILDID:
767 build_id = dso__read_build_id(self, verbose);
768 if (build_id != NULL) {
769 snprintf(name, size,
770 "/usr/lib/debug/.build-id/%.2s/%s.debug",
771 build_id, build_id + 2);
772 free(build_id);
773 break;
774 }
775 self->origin++;
776 /* Fall thru */
777 case DSO__ORIG_DSO:
651 snprintf(name, size, "%s", self->name); 778 snprintf(name, size, "%s", self->name);
652 break; 779 break;
653 780
654 default: 781 default:
655 goto out; 782 goto out;
656 } 783 }
657 variant++;
658 784
659 fd = open(name, O_RDONLY); 785 fd = open(name, O_RDONLY);
660 } while (fd < 0); 786 } while (fd < 0);
@@ -668,8 +794,15 @@ more:
668 if (!ret) 794 if (!ret)
669 goto more; 795 goto more;
670 796
797 if (ret > 0) {
798 int nr_plt = dso__synthesize_plt_symbols(self, verbose);
799 if (nr_plt > 0)
800 ret += nr_plt;
801 }
671out: 802out:
672 free(name); 803 free(name);
804 if (ret < 0 && strstr(self->name, " (deleted)") != NULL)
805 return 0;
673 return ret; 806 return ret;
674} 807}
675 808
@@ -785,6 +918,9 @@ int dso__load_kernel(struct dso *self, const char *vmlinux,
785 if (err <= 0) 918 if (err <= 0)
786 err = dso__load_kallsyms(self, filter, verbose); 919 err = dso__load_kallsyms(self, filter, verbose);
787 920
921 if (err > 0)
922 self->origin = DSO__ORIG_KERNEL;
923
788 return err; 924 return err;
789} 925}
790 926
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 7918cffb23c..b53bf0125c1 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -7,6 +7,30 @@
7#include <linux/rbtree.h> 7#include <linux/rbtree.h>
8#include "module.h" 8#include "module.h"
9 9
10#ifdef HAVE_CPLUS_DEMANGLE
11extern char *cplus_demangle(const char *, int);
12
13static inline char *bfd_demangle(void __used *v, const char *c, int i)
14{
15 return cplus_demangle(c, i);
16}
17#else
18#ifdef NO_DEMANGLE
19static inline char *bfd_demangle(void __used *v, const char __used *c,
20 int __used i)
21{
22 return NULL;
23}
24#else
25#include <bfd.h>
26#endif
27#endif
28
29#ifndef DMGL_PARAMS
30#define DMGL_PARAMS (1 << 0) /* Include function args */
31#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
32#endif
33
10struct symbol { 34struct symbol {
11 struct rb_node rb_node; 35 struct rb_node rb_node;
12 u64 start; 36 u64 start;
@@ -25,6 +49,8 @@ struct dso {
25 struct symbol *(*find_symbol)(struct dso *, u64 ip); 49 struct symbol *(*find_symbol)(struct dso *, u64 ip);
26 unsigned int sym_priv_size; 50 unsigned int sym_priv_size;
27 unsigned char adjust_symbols; 51 unsigned char adjust_symbols;
52 unsigned char slen_calculated;
53 unsigned char origin;
28 char name[0]; 54 char name[0];
29}; 55};
30 56
@@ -48,6 +74,7 @@ int dso__load_modules(struct dso *self, symbol_filter_t filter, int verbose);
48int dso__load(struct dso *self, symbol_filter_t filter, int verbose); 74int dso__load(struct dso *self, symbol_filter_t filter, int verbose);
49 75
50size_t dso__fprintf(struct dso *self, FILE *fp); 76size_t dso__fprintf(struct dso *self, FILE *fp);
77char dso__symtab_origin(const struct dso *self);
51 78
52void symbol__init(void); 79void symbol__init(void);
53#endif /* _PERF_SYMBOL_ */ 80#endif /* _PERF_SYMBOL_ */
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index b4be6071c10..68fe157d72f 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -50,6 +50,7 @@
50#include <unistd.h> 50#include <unistd.h>
51#include <stdio.h> 51#include <stdio.h>
52#include <sys/stat.h> 52#include <sys/stat.h>
53#include <sys/statfs.h>
53#include <fcntl.h> 54#include <fcntl.h>
54#include <stddef.h> 55#include <stddef.h>
55#include <stdlib.h> 56#include <stdlib.h>
@@ -80,6 +81,7 @@
80#include <netdb.h> 81#include <netdb.h>
81#include <pwd.h> 82#include <pwd.h>
82#include <inttypes.h> 83#include <inttypes.h>
84#include "../../../include/linux/magic.h"
83 85
84#ifndef NO_ICONV 86#ifndef NO_ICONV
85#include <iconv.h> 87#include <iconv.h>
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c
index 1eddae94bab..1150c6d5c7b 100644
--- a/virt/kvm/ioapic.c
+++ b/virt/kvm/ioapic.c
@@ -95,8 +95,6 @@ static int ioapic_service(struct kvm_ioapic *ioapic, unsigned int idx)
95 if (injected && pent->fields.trig_mode == IOAPIC_LEVEL_TRIG) 95 if (injected && pent->fields.trig_mode == IOAPIC_LEVEL_TRIG)
96 pent->fields.remote_irr = 1; 96 pent->fields.remote_irr = 1;
97 } 97 }
98 if (!pent->fields.trig_mode)
99 ioapic->irr &= ~(1 << idx);
100 98
101 return injected; 99 return injected;
102} 100}
@@ -136,7 +134,8 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val)
136 mask_after = ioapic->redirtbl[index].fields.mask; 134 mask_after = ioapic->redirtbl[index].fields.mask;
137 if (mask_before != mask_after) 135 if (mask_before != mask_after)
138 kvm_fire_mask_notifiers(ioapic->kvm, index, mask_after); 136 kvm_fire_mask_notifiers(ioapic->kvm, index, mask_after);
139 if (ioapic->irr & (1 << index)) 137 if (ioapic->redirtbl[index].fields.trig_mode == IOAPIC_LEVEL_TRIG
138 && ioapic->irr & (1 << index))
140 ioapic_service(ioapic, index); 139 ioapic_service(ioapic, index);
141 break; 140 break;
142 } 141 }
@@ -184,9 +183,10 @@ int kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level)
184 if (!level) 183 if (!level)
185 ioapic->irr &= ~mask; 184 ioapic->irr &= ~mask;
186 else { 185 else {
186 int edge = (entry.fields.trig_mode == IOAPIC_EDGE_TRIG);
187 ioapic->irr |= mask; 187 ioapic->irr |= mask;
188 if ((!entry.fields.trig_mode && old_irr != ioapic->irr) 188 if ((edge && old_irr != ioapic->irr) ||
189 || !entry.fields.remote_irr) 189 (!edge && !entry.fields.remote_irr))
190 ret = ioapic_service(ioapic, irq); 190 ret = ioapic_service(ioapic, irq);
191 } 191 }
192 } 192 }
diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c
index a8bd466d00c..ddc17f0e2f3 100644
--- a/virt/kvm/irq_comm.c
+++ b/virt/kvm/irq_comm.c
@@ -160,7 +160,8 @@ void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin)
160 unsigned gsi = pin; 160 unsigned gsi = pin;
161 161
162 list_for_each_entry(e, &kvm->irq_routing, link) 162 list_for_each_entry(e, &kvm->irq_routing, link)
163 if (e->irqchip.irqchip == irqchip && 163 if (e->type == KVM_IRQ_ROUTING_IRQCHIP &&
164 e->irqchip.irqchip == irqchip &&
164 e->irqchip.pin == pin) { 165 e->irqchip.pin == pin) {
165 gsi = e->gsi; 166 gsi = e->gsi;
166 break; 167 break;
@@ -259,6 +260,7 @@ static int setup_routing_entry(struct kvm_kernel_irq_routing_entry *e,
259 int delta; 260 int delta;
260 261
261 e->gsi = ue->gsi; 262 e->gsi = ue->gsi;
263 e->type = ue->type;
262 switch (ue->type) { 264 switch (ue->type) {
263 case KVM_IRQ_ROUTING_IRQCHIP: 265 case KVM_IRQ_ROUTING_IRQCHIP:
264 delta = 0; 266 delta = 0;