Merge branches 'x86/apic', 'x86/cleanups', 'x86/cpufeature', 'x86/crashdump', 'x86...
authorIngo Molnar <mingo@elte.hu>
Tue, 23 Dec 2008 15:27:23 +0000 (16:27 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 23 Dec 2008 15:27:23 +0000 (16:27 +0100)
1218 files changed:
Documentation/00-INDEX
Documentation/ABI/testing/sysfs-c2port [new file with mode: 0644]
Documentation/ABI/testing/sysfs-firmware-acpi
Documentation/DMA-API.txt
Documentation/PCI/00-INDEX
Documentation/PCI/MSI-HOWTO.txt [moved from Documentation/MSI-HOWTO.txt with 100% similarity]
Documentation/acpi/debug.txt [new file with mode: 0644]
Documentation/arm/mem_alignment
Documentation/blockdev/00-INDEX [new file with mode: 0644]
Documentation/blockdev/README.DAC960 [moved from Documentation/README.DAC960 with 100% similarity]
Documentation/blockdev/cciss.txt [moved from Documentation/cciss.txt with 100% similarity]
Documentation/blockdev/cpqarray.txt [moved from Documentation/cpqarray.txt with 100% similarity]
Documentation/blockdev/floppy.txt [moved from Documentation/floppy.txt with 100% similarity]
Documentation/blockdev/nbd.txt [moved from Documentation/nbd.txt with 100% similarity]
Documentation/blockdev/paride.txt [moved from Documentation/paride.txt with 100% similarity]
Documentation/blockdev/ramdisk.txt [moved from Documentation/ramdisk.txt with 100% similarity]
Documentation/c2port.txt [new file with mode: 0644]
Documentation/cgroups/freezer-subsystem.txt
Documentation/cpu-freq/user-guide.txt
Documentation/feature-removal-schedule.txt
Documentation/filesystems/ocfs2.txt
Documentation/filesystems/proc.txt
Documentation/filesystems/ramfs-rootfs-initramfs.txt
Documentation/filesystems/xip.txt
Documentation/hwmon/adt7462 [new file with mode: 0644]
Documentation/hwmon/lis3lv02d [new file with mode: 0644]
Documentation/ics932s401 [new file with mode: 0644]
Documentation/input/input-programming.txt
Documentation/ioctl/00-INDEX [new file with mode: 0644]
Documentation/ioctl/ioctl-number.txt [moved from Documentation/ioctl-number.txt with 100% similarity]
Documentation/kernel-parameters.txt
Documentation/local_ops.txt
Documentation/networking/phy.txt
Documentation/nmi_watchdog.txt
Documentation/printk-formats.txt [new file with mode: 0644]
Documentation/serial/00-INDEX [new file with mode: 0644]
Documentation/serial/README.cycladesZ [moved from Documentation/README.cycladesZ with 100% similarity]
Documentation/serial/computone.txt [moved from Documentation/computone.txt with 99% similarity]
Documentation/serial/digiepca.txt [moved from Documentation/digiepca.txt with 100% similarity]
Documentation/serial/hayes-esp.txt [moved from Documentation/hayes-esp.txt with 100% similarity]
Documentation/serial/moxa-smartio [moved from Documentation/moxa-smartio with 100% similarity]
Documentation/serial/riscom8.txt [moved from Documentation/riscom8.txt with 100% similarity]
Documentation/serial/rocket.txt [moved from Documentation/rocket.txt with 100% similarity]
Documentation/serial/specialix.txt [moved from Documentation/specialix.txt with 100% similarity]
Documentation/serial/stallion.txt [moved from Documentation/stallion.txt with 100% similarity]
Documentation/serial/sx.txt [moved from Documentation/sx.txt with 100% similarity]
Documentation/serial/tty.txt [moved from Documentation/tty.txt with 100% similarity]
Documentation/sound/alsa/ALSA-Configuration.txt
Documentation/spi/spi-summary
Documentation/tracers/mmiotrace.txt
Documentation/usb/gadget_serial.txt
Documentation/usb/proc_usb_info.txt
Documentation/usb/usbmon.txt
Documentation/w1/masters/omap-hdq [new file with mode: 0644]
Documentation/x86/boot.txt
Documentation/x86/pat.txt
Documentation/x86/x86_64/boot-options.txt
Documentation/x86/x86_64/mm.txt
MAINTAINERS
Makefile
arch/Kconfig
arch/alpha/kernel/pci.c
arch/alpha/kernel/smp.c
arch/alpha/kernel/traps.c
arch/arm/common/sa1111.c
arch/arm/configs/corgi_defconfig
arch/arm/include/asm/bitops.h
arch/arm/include/asm/dma-mapping.h
arch/arm/include/asm/hardware/iop3xx-adma.h
arch/arm/include/asm/hardware/iop_adma.h
arch/arm/include/asm/mach/map.h
arch/arm/include/asm/processor.h
arch/arm/kernel/armksyms.c
arch/arm/kernel/traps.c
arch/arm/mach-clps711x/include/mach/hardware.h
arch/arm/mach-clps7500/core.c
arch/arm/mach-clps7500/include/mach/hardware.h
arch/arm/mach-h720x/include/mach/boards.h
arch/arm/mach-integrator/include/mach/platform.h
arch/arm/mach-iop13xx/include/mach/adma.h
arch/arm/mach-omap1/io.c
arch/arm/mach-pxa/include/mach/pxafb.h
arch/arm/mach-pxa/include/mach/reset.h
arch/arm/mach-pxa/mioa701.c
arch/arm/mach-pxa/mioa701_bootresume.S
arch/arm/mach-pxa/palmtx.c
arch/arm/mach-pxa/pcm990-baseboard.c
arch/arm/mach-pxa/reset.c
arch/arm/mach-pxa/spitz.c
arch/arm/mach-realview/clock.c
arch/arm/mach-realview/include/mach/platform.h
arch/arm/mach-s3c2410/include/mach/spi-gpio.h
arch/arm/mach-versatile/clock.c
arch/arm/mach-versatile/include/mach/platform.h
arch/arm/mm/alignment.c
arch/arm/mm/cache-feroceon-l2.c
arch/arm/mm/fault.c
arch/arm/mm/mmu.c
arch/arm/plat-iop/setup.c
arch/arm/plat-omap/gpio.c
arch/arm/plat-omap/include/mach/omapfb.h
arch/arm/plat-omap/include/mach/pm.h
arch/arm/plat-omap/sram.c
arch/arm/plat-orion/pcie.c
arch/avr32/boards/favr-32/flash.c
arch/avr32/boards/favr-32/setup.c
arch/avr32/boot/images/Makefile
arch/avr32/configs/atstk1006_defconfig
arch/avr32/mach-at32ap/at32ap700x.c
arch/blackfin/include/asm/bfin-global.h
arch/blackfin/include/asm/dma-mapping.h
arch/blackfin/kernel/bfin_gpio.c
arch/blackfin/kernel/cplb-nompu/cplbinit.c
arch/blackfin/kernel/process.c
arch/blackfin/kernel/setup.c
arch/blackfin/kernel/traps.c
arch/blackfin/mach-common/cache.S
arch/blackfin/mach-common/cpufreq.c
arch/blackfin/mach-common/entry.S
arch/blackfin/mm/sram-alloc.c
arch/frv/kernel/sys_frv.c
arch/ia64/configs/generic_defconfig
arch/ia64/hp/sim/Kconfig
arch/ia64/include/asm/intrinsics.h
arch/ia64/include/asm/paravirt_privop.h
arch/ia64/include/asm/ptrace.h
arch/ia64/kernel/entry.S
arch/ia64/kernel/head.S
arch/ia64/kernel/mca.c
arch/ia64/kernel/paravirt.c
arch/ia64/kernel/pci-dma.c
arch/ia64/kernel/topology.c
arch/ia64/kvm/Kconfig
arch/ia64/kvm/Makefile
arch/ia64/kvm/kvm-ia64.c
arch/ia64/kvm/optvfault.S
arch/ia64/kvm/vcpu.h
arch/ia64/sn/kernel/io_init.c
arch/ia64/sn/kernel/irq.c
arch/ia64/sn/kernel/setup.c
arch/ia64/xen/hypercall.S
arch/m32r/kernel/head.S
arch/m32r/kernel/vmlinux.lds.S
arch/m68k/configs/amiga_defconfig
arch/m68k/configs/apollo_defconfig
arch/m68k/configs/atari_defconfig
arch/m68k/configs/bvme6000_defconfig
arch/m68k/configs/hp300_defconfig
arch/m68k/configs/mac_defconfig
arch/m68k/configs/multi_defconfig
arch/m68k/configs/mvme147_defconfig
arch/m68k/configs/mvme16x_defconfig
arch/m68k/configs/q40_defconfig
arch/m68k/configs/sun3_defconfig
arch/m68k/configs/sun3x_defconfig
arch/m68k/kernel/ints.c
arch/mips/Kconfig.debug
arch/mips/configs/fulong_defconfig
arch/mips/configs/ip22_defconfig
arch/mips/configs/ip32_defconfig
arch/mips/configs/malta_defconfig
arch/mips/include/asm/asmmacro.h
arch/mips/include/asm/bug.h
arch/mips/include/asm/mach-rc32434/gpio.h
arch/mips/include/asm/mach-rc32434/rb.h
arch/mips/include/asm/pci.h
arch/mips/include/asm/ptrace.h
arch/mips/include/asm/time.h
arch/mips/kernel/csrc-r4k.c
arch/mips/kernel/scall32-o32.S
arch/mips/kernel/scall64-n32.S
arch/mips/kernel/scall64-o32.S
arch/mips/kernel/vpe.c
arch/mips/mm/dma-default.c
arch/mips/mm/sc-ip22.c
arch/mips/mti-malta/Makefile
arch/mips/mti-malta/malta-amon.c
arch/mips/mti-malta/malta-mtd.c [deleted file]
arch/mips/mti-malta/malta-platform.c
arch/mips/pci/pci.c
arch/mips/rb532/devices.c
arch/mips/rb532/gpio.c
arch/mn10300/Kconfig.debug
arch/mn10300/kernel/entry.S
arch/mn10300/kernel/gdb-io-serial.c
arch/mn10300/kernel/gdb-stub.c
arch/mn10300/kernel/mn10300-serial.c
arch/mn10300/kernel/module.c
arch/mn10300/kernel/setup.c
arch/mn10300/kernel/vmlinux.lds.S
arch/mn10300/mm/misalignment.c
arch/parisc/include/asm/parisc-device.h
arch/parisc/include/asm/posix_types.h
arch/parisc/include/asm/ptrace.h
arch/parisc/include/asm/smp.h
arch/parisc/kernel/drivers.c
arch/parisc/kernel/ptrace.c
arch/parisc/kernel/traps.c
arch/powerpc/boot/Makefile
arch/powerpc/boot/dts/mpc832x_rdb.dts
arch/powerpc/boot/dts/mpc8349emitx.dts
arch/powerpc/boot/dts/mpc8572ds.dts
arch/powerpc/configs/40x/virtex_defconfig [new file with mode: 0644]
arch/powerpc/configs/44x/virtex5_defconfig
arch/powerpc/configs/52xx/cm5200_defconfig
arch/powerpc/configs/52xx/lite5200b_defconfig
arch/powerpc/configs/52xx/motionpro_defconfig
arch/powerpc/configs/52xx/pcm030_defconfig
arch/powerpc/configs/52xx/tqm5200_defconfig
arch/powerpc/configs/83xx/mpc834x_itx_defconfig
arch/powerpc/configs/86xx/gef_sbc610_defconfig
arch/powerpc/configs/mpc5200_defconfig
arch/powerpc/configs/mpc83xx_defconfig
arch/powerpc/configs/ppc40x_defconfig
arch/powerpc/configs/ppc44x_defconfig
arch/powerpc/include/asm/kvm_ppc.h
arch/powerpc/include/asm/mmu-hash64.h
arch/powerpc/include/asm/ptrace.h
arch/powerpc/kernel/cpu_setup_44x.S
arch/powerpc/kernel/cputable.c
arch/powerpc/kernel/dma.c
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/misc_32.S
arch/powerpc/kernel/prom_parse.c
arch/powerpc/kernel/sysfs.c
arch/powerpc/kvm/44x_tlb.c
arch/powerpc/kvm/powerpc.c
arch/powerpc/lib/rheap.c
arch/powerpc/mm/40x_mmu.c
arch/powerpc/mm/hugetlbpage.c
arch/powerpc/mm/numa.c
arch/powerpc/platforms/cell/axon_msi.c
arch/powerpc/platforms/cell/smp.c
arch/powerpc/platforms/cell/spufs/file.c
arch/powerpc/sysdev/bestcomm/Kconfig
arch/powerpc/sysdev/mpic.c
arch/powerpc/sysdev/xilinx_intc.c
arch/s390/defconfig
arch/s390/include/asm/pgtable.h
arch/s390/include/asm/ptrace.h
arch/s390/include/asm/syscall.h
arch/s390/kernel/asm-offsets.c
arch/s390/kernel/compat_signal.c
arch/s390/kernel/entry.S
arch/s390/kernel/entry64.S
arch/s390/kernel/init_task.c
arch/s390/kernel/process.c
arch/s390/kernel/ptrace.c
arch/s390/kernel/setup.c
arch/s390/kernel/signal.c
arch/s390/kernel/sys_s390.c
arch/s390/kernel/time.c
arch/s390/kernel/topology.c
arch/s390/kernel/vmlinux.lds.S
arch/s390/kvm/sigp.c
arch/sh/Kconfig
arch/sh/include/asm/io.h
arch/sh/include/asm/pgtable.h
arch/sh/kernel/cpu/sh4a/setup-sh7723.c
arch/sh/kernel/early_printk.c
arch/sh/kernel/timers/timer-tmu.c
arch/sh/lib/copy_page.S
arch/sh/mm/Makefile_32
arch/sh/mm/Makefile_64
arch/sh/mm/init.c
arch/sh/mm/mmap.c [new file with mode: 0644]
arch/sh/mm/pg-sh4.c
arch/sparc/include/asm/bitops_32.h
arch/sparc/include/asm/ptrace_32.h
arch/sparc/include/asm/ptrace_64.h
arch/sparc/include/asm/termbits.h
arch/sparc/include/asm/unistd_32.h
arch/sparc/include/asm/unistd_64.h
arch/sparc/kernel/cpu.c
arch/sparc/kernel/head.S
arch/sparc/kernel/of_device.c
arch/sparc/kernel/smp.c
arch/sparc/kernel/sun4d_smp.c
arch/sparc/kernel/sun4m_smp.c
arch/sparc/kernel/systbls.S
arch/sparc/kernel/trampoline.S
arch/sparc/kernel/vmlinux.lds.S
arch/sparc/mm/srmmu.c
arch/sparc64/kernel/ptrace.c
arch/sparc64/kernel/smp.c
arch/sparc64/kernel/sys32.S
arch/sparc64/kernel/systbls.S
arch/sparc64/kernel/visemul.c
arch/sparc64/lib/user_fixup.c
arch/sparc64/mm/init.c
arch/um/drivers/mconsole_kern.c
arch/x86/Kconfig
arch/x86/Kconfig.debug
arch/x86/boot/tty.c
arch/x86/boot/video-vga.c
arch/x86/boot/video.c
arch/x86/configs/i386_defconfig
arch/x86/configs/x86_64_defconfig
arch/x86/ia32/ia32_signal.c
arch/x86/include/asm/acpi.h
arch/x86/include/asm/amd_iommu_types.h
arch/x86/include/asm/apic.h
arch/x86/include/asm/bigsmp/apic.h
arch/x86/include/asm/bitops.h
arch/x86/include/asm/bug.h
arch/x86/include/asm/byteorder.h
arch/x86/include/asm/cpufeature.h
arch/x86/include/asm/dma-mapping.h
arch/x86/include/asm/ds.h
arch/x86/include/asm/emergency-restart.h
arch/x86/include/asm/es7000/apic.h
arch/x86/include/asm/es7000/wakecpu.h
arch/x86/include/asm/genapic_32.h
arch/x86/include/asm/genapic_64.h
arch/x86/include/asm/hypervisor.h [new file with mode: 0644]
arch/x86/include/asm/ia32.h
arch/x86/include/asm/idle.h
arch/x86/include/asm/io.h
arch/x86/include/asm/io_apic.h
arch/x86/include/asm/iomap.h [moved from include/asm-x86/iomap.h with 100% similarity]
arch/x86/include/asm/iommu.h
arch/x86/include/asm/irq.h
arch/x86/include/asm/irq_regs_32.h
arch/x86/include/asm/mach-default/mach_apic.h
arch/x86/include/asm/mach-default/mach_wakecpu.h
arch/x86/include/asm/mach-default/smpboot_hooks.h
arch/x86/include/asm/mach-generic/mach_apic.h
arch/x86/include/asm/mach-generic/mach_wakecpu.h [new file with mode: 0644]
arch/x86/include/asm/mmu_context_32.h
arch/x86/include/asm/mmzone_32.h
arch/x86/include/asm/msr-index.h
arch/x86/include/asm/msr.h
arch/x86/include/asm/numaq/wakecpu.h
arch/x86/include/asm/pci.h
arch/x86/include/asm/pci_64.h
arch/x86/include/asm/pgtable-2level.h
arch/x86/include/asm/pgtable-3level.h
arch/x86/include/asm/pgtable.h
arch/x86/include/asm/pgtable_32.h
arch/x86/include/asm/pgtable_64.h
arch/x86/include/asm/prctl.h
arch/x86/include/asm/processor.h
arch/x86/include/asm/ptrace.h
arch/x86/include/asm/setup.h
arch/x86/include/asm/sigframe.h [new file with mode: 0644]
arch/x86/include/asm/signal.h
arch/x86/include/asm/sparsemem.h
arch/x86/include/asm/syscalls.h
arch/x86/include/asm/system.h
arch/x86/include/asm/thread_info.h
arch/x86/include/asm/topology.h
arch/x86/include/asm/trampoline.h
arch/x86/include/asm/traps.h
arch/x86/include/asm/tsc.h
arch/x86/include/asm/uaccess.h
arch/x86/include/asm/uaccess_64.h
arch/x86/include/asm/unistd_64.h
arch/x86/include/asm/uv/bios.h
arch/x86/include/asm/uv/uv_hub.h
arch/x86/include/asm/vmi.h
arch/x86/include/asm/vmware.h [new file with mode: 0644]
arch/x86/include/asm/xen/hypercall.h
arch/x86/include/asm/xen/hypervisor.h
arch/x86/include/asm/xen/page.h
arch/x86/kernel/Makefile
arch/x86/kernel/acpi/boot.c
arch/x86/kernel/amd_iommu.c
arch/x86/kernel/amd_iommu_init.c
arch/x86/kernel/apic.c
arch/x86/kernel/apm_32.c
arch/x86/kernel/asm-offsets_32.c
arch/x86/kernel/asm-offsets_64.c
arch/x86/kernel/bios_uv.c
arch/x86/kernel/check.c [new file with mode: 0644]
arch/x86/kernel/cpu/Makefile
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/cpufreq/powernow-k8.c
arch/x86/kernel/cpu/cpufreq/powernow-k8.h
arch/x86/kernel/cpu/hypervisor.c [new file with mode: 0644]
arch/x86/kernel/cpu/intel.c
arch/x86/kernel/cpu/intel_cacheinfo.c
arch/x86/kernel/cpu/mcheck/mce_64.c
arch/x86/kernel/cpu/mtrr/main.c
arch/x86/kernel/cpu/vmware.c [new file with mode: 0644]
arch/x86/kernel/ds.c
arch/x86/kernel/dumpstack.c [new file with mode: 0644]
arch/x86/kernel/dumpstack.h [new file with mode: 0644]
arch/x86/kernel/dumpstack_32.c
arch/x86/kernel/dumpstack_64.c
arch/x86/kernel/e820.c
arch/x86/kernel/early-quirks.c
arch/x86/kernel/early_printk.c
arch/x86/kernel/entry_32.S
arch/x86/kernel/entry_64.S
arch/x86/kernel/es7000_32.c
arch/x86/kernel/genapic_64.c
arch/x86/kernel/genx2apic_uv_x.c
arch/x86/kernel/head.c
arch/x86/kernel/head32.c
arch/x86/kernel/head64.c
arch/x86/kernel/hpet.c
arch/x86/kernel/i387.c
arch/x86/kernel/init_task.c
arch/x86/kernel/io_apic.c
arch/x86/kernel/irq_64.c
arch/x86/kernel/kvmclock.c
arch/x86/kernel/microcode_amd.c
arch/x86/kernel/microcode_core.c
arch/x86/kernel/microcode_intel.c
arch/x86/kernel/mpparse.c
arch/x86/kernel/nmi.c
arch/x86/kernel/numaq_32.c
arch/x86/kernel/paravirt-spinlocks.c
arch/x86/kernel/pci-calgary_64.c
arch/x86/kernel/pci-dma.c
arch/x86/kernel/pci-gart_64.c
arch/x86/kernel/process.c
arch/x86/kernel/ptrace.c
arch/x86/kernel/reboot.c
arch/x86/kernel/setup.c
arch/x86/kernel/sigframe.h [deleted file]
arch/x86/kernel/signal.c [moved from arch/x86/kernel/signal_32.c with 73% similarity]
arch/x86/kernel/signal_64.c [deleted file]
arch/x86/kernel/smp.c
arch/x86/kernel/smpboot.c
arch/x86/kernel/time_64.c
arch/x86/kernel/tlb_32.c
arch/x86/kernel/tlb_uv.c
arch/x86/kernel/trampoline.c
arch/x86/kernel/traps.c
arch/x86/kernel/tsc.c
arch/x86/kernel/tsc_sync.c
arch/x86/kernel/vmi_32.c
arch/x86/kernel/vsyscall_64.c
arch/x86/kernel/xsave.c
arch/x86/kvm/Kconfig
arch/x86/kvm/i8254.c
arch/x86/kvm/mmu.c
arch/x86/kvm/paging_tmpl.h
arch/x86/kvm/vmx.c
arch/x86/kvm/vmx.h
arch/x86/mach-generic/bigsmp.c
arch/x86/mach-generic/default.c
arch/x86/mach-generic/es7000.c
arch/x86/mach-generic/probe.c
arch/x86/mach-generic/summit.c
arch/x86/mach-voyager/voyager_smp.c
arch/x86/mm/fault.c
arch/x86/mm/init_32.c
arch/x86/mm/init_64.c
arch/x86/mm/ioremap.c
arch/x86/mm/numa_32.c
arch/x86/mm/pat.c
arch/x86/oprofile/nmi_int.c
arch/x86/oprofile/op_model_ppro.c
arch/x86/pci/common.c
arch/x86/pci/direct.c
arch/x86/pci/fixup.c
arch/x86/pci/pci.h
arch/x86/power/hibernate_32.c
arch/x86/xen/enlighten.c
arch/x86/xen/mmu.c
arch/x86/xen/multicalls.c
arch/x86/xen/setup.c
arch/x86/xen/smp.c
arch/x86/xen/xen-ops.h
block/blk-barrier.c
block/blk-core.c
block/blk-map.c
block/blk-settings.c
block/bsg.c
block/compat_ioctl.c
block/elevator.c
block/genhd.c
block/ioctl.c
block/scsi_ioctl.c
crypto/Kconfig
crypto/Makefile
crypto/async_tx/async_xor.c
drivers/acpi/Kconfig
drivers/acpi/Makefile
drivers/acpi/ac.c
drivers/acpi/acpi_memhotplug.c
drivers/acpi/battery.c
drivers/acpi/blacklist.c
drivers/acpi/bus.c
drivers/acpi/button.c
drivers/acpi/cm_sbs.c
drivers/acpi/container.c
drivers/acpi/debug.c
drivers/acpi/ec.c
drivers/acpi/events/evgpe.c
drivers/acpi/events/evxfevnt.c
drivers/acpi/fan.c
drivers/acpi/glue.c
drivers/acpi/osl.c
drivers/acpi/pci_irq.c
drivers/acpi/pci_link.c
drivers/acpi/pci_root.c
drivers/acpi/power.c
drivers/acpi/processor_core.c
drivers/acpi/processor_idle.c
drivers/acpi/processor_perflib.c
drivers/acpi/processor_thermal.c
drivers/acpi/processor_throttling.c
drivers/acpi/reboot.c
drivers/acpi/scan.c
drivers/acpi/sleep/main.c
drivers/acpi/sleep/proc.c
drivers/acpi/sleep/wakeup.c
drivers/acpi/system.c
drivers/acpi/tables/tbfadt.c
drivers/acpi/thermal.c
drivers/acpi/toshiba_acpi.c
drivers/acpi/utils.c
drivers/acpi/video.c
drivers/acpi/video_detect.c [new file with mode: 0644]
drivers/acpi/wmi.c
drivers/ata/Kconfig
drivers/ata/ata_piix.c
drivers/ata/libata-core.c
drivers/ata/libata-sff.c
drivers/ata/pata_hpt366.c
drivers/ata/pata_ninja32.c
drivers/ata/pata_rb532_cf.c
drivers/ata/pata_sis.c
drivers/atm/horizon.c
drivers/block/Kconfig
drivers/block/cciss.c
drivers/block/floppy.c
drivers/block/pktcdvd.c
drivers/block/ub.c
drivers/block/xen-blkfront.c
drivers/block/xsysace.c
drivers/cdrom/cdrom.c
drivers/char/Kconfig
drivers/char/agp/uninorth-agp.c
drivers/char/cp437.uni
drivers/char/ipmi/ipmi_msghandler.c
drivers/char/ipmi/ipmi_si_intf.c
drivers/char/istallion.c
drivers/char/serial167.c
drivers/char/sonypi.c
drivers/char/specialix.c
drivers/char/tty_io.c
drivers/char/vt.c
drivers/char/xilinx_hwicap/buffer_icap.c
drivers/char/xilinx_hwicap/buffer_icap.h
drivers/char/xilinx_hwicap/fifo_icap.c
drivers/char/xilinx_hwicap/fifo_icap.h
drivers/char/xilinx_hwicap/xilinx_hwicap.c
drivers/char/xilinx_hwicap/xilinx_hwicap.h
drivers/crypto/talitos.c
drivers/dma/dmaengine.c
drivers/dma/dmatest.c
drivers/dma/ioat_dma.c
drivers/dma/iop-adma.c
drivers/dma/mv_xor.c
drivers/edac/i5000_edac.c
drivers/edac/i82875p_edac.c
drivers/firewire/fw-ohci.c
drivers/firewire/fw-sbp2.c
drivers/firewire/fw-transaction.c
drivers/firewire/fw-transaction.h
drivers/firmware/dmi_scan.c
drivers/gpio/Kconfig
drivers/gpio/Makefile
drivers/gpio/gpiolib.c
drivers/gpio/xilinx_gpio.c [new file with mode: 0644]
drivers/gpu/drm/drm_drv.c
drivers/gpu/drm/drm_irq.c
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_proc.c
drivers/gpu/drm/i915/i915_gem_tiling.c
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/i915_opregion.c
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/i915_suspend.c
drivers/gpu/drm/mga/mga_dma.c
drivers/gpu/drm/mga/mga_irq.c
drivers/gpu/drm/r128/r128_drv.c
drivers/gpu/drm/r128/r128_drv.h
drivers/gpu/drm/r128/r128_irq.c
drivers/gpu/drm/radeon/radeon_cp.c
drivers/gpu/drm/radeon/radeon_drv.h
drivers/gpu/drm/radeon/radeon_irq.c
drivers/gpu/drm/via/via_irq.c
drivers/gpu/drm/via/via_map.c
drivers/hid/hid-apple.c
drivers/hid/hid-core.c
drivers/hid/hid-ids.h
drivers/hid/hid-pl.c
drivers/hid/hidraw.c
drivers/hid/usbhid/hid-core.c
drivers/hid/usbhid/usbhid.h
drivers/hwmon/Kconfig
drivers/hwmon/Makefile
drivers/hwmon/adt7462.c [new file with mode: 0644]
drivers/hwmon/adt7470.c
drivers/hwmon/adt7473.c
drivers/hwmon/applesmc.c
drivers/hwmon/ibmaem.c
drivers/hwmon/lis3lv02d.c [new file with mode: 0644]
drivers/hwmon/lis3lv02d.h [new file with mode: 0644]
drivers/hwmon/lm85.c
drivers/i2c/busses/i2c-cpm.c
drivers/i2c/busses/i2c-highlander.c
drivers/i2c/busses/i2c-parport.c
drivers/i2c/busses/i2c-pmcmsp.c
drivers/i2c/busses/i2c-s3c2410.c
drivers/i2c/busses/i2c-sh_mobile.c
drivers/i2c/chips/isp1301_omap.c
drivers/i2c/i2c-core.c
drivers/ide/Kconfig
drivers/ide/alim15x3.c
drivers/ide/amd74xx.c
drivers/ide/icside.c
drivers/ide/ide-cs.c
drivers/ide/ide-io.c
drivers/ide/ide-iops.c
drivers/ide/ide-probe.c
drivers/ide/pmac.c
drivers/ide/sgiioc4.c
drivers/idle/Kconfig
drivers/ieee1394/highlevel.c
drivers/ieee1394/hosts.h
drivers/ieee1394/nodemgr.c
drivers/ieee1394/sbp2.c
drivers/infiniband/hw/cxgb3/iwch_provider.c
drivers/infiniband/hw/cxgb3/iwch_qp.c
drivers/infiniband/hw/ehca/ehca_classes.h
drivers/infiniband/hw/ehca/ehca_irq.c
drivers/infiniband/hw/ehca/ehca_main.c
drivers/infiniband/hw/ehca/ehca_qp.c
drivers/infiniband/hw/ehca/ehca_reqs.c
drivers/infiniband/hw/ipath/ipath_ruc.c
drivers/infiniband/hw/mlx4/cq.c
drivers/infiniband/hw/mlx4/mr.c
drivers/infiniband/hw/nes/nes.c
drivers/infiniband/hw/nes/nes_hw.h
drivers/infiniband/hw/nes/nes_verbs.c
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/input/ff-memless.c
drivers/input/keyboard/atkbd.c
drivers/input/misc/cm109.c
drivers/input/mouse/hgpk.c
drivers/input/serio/i8042-x86ia64io.h
drivers/input/tablet/wacom.h
drivers/input/tablet/wacom_sys.c
drivers/input/tablet/wacom_wac.c
drivers/input/tablet/wacom_wac.h
drivers/input/touchscreen/elo.c
drivers/input/xen-kbdfront.c
drivers/isdn/hardware/avm/b1isa.c
drivers/isdn/hisax/config.c
drivers/isdn/hysdn/hysdn_net.c
drivers/isdn/i4l/isdn_net.c
drivers/macintosh/rack-meter.c
drivers/md/bitmap.c
drivers/md/dm-mpath.c
drivers/md/dm-raid1.c
drivers/md/dm-stripe.c
drivers/md/dm-table.c
drivers/md/dm.c
drivers/media/dvb/dm1105/dm1105.c
drivers/media/dvb/dvb-core/dvb_frontend.c
drivers/media/dvb/dvb-usb/af9015.c
drivers/media/dvb/dvb-usb/dib0700.h
drivers/media/dvb/dvb-usb/dib0700_core.c
drivers/media/dvb/dvb-usb/dib0700_devices.c
drivers/media/dvb/dvb-usb/usb-urb.c
drivers/media/dvb/siano/sms-cards.c
drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
drivers/media/dvb/ttusb-dec/ttusb_dec.c
drivers/media/video/em28xx/em28xx-audio.c
drivers/media/video/em28xx/em28xx-core.c
drivers/media/video/em28xx/em28xx-i2c.c
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/em28xx/em28xx.h
drivers/media/video/gspca/conex.c
drivers/media/video/gspca/finepix.c
drivers/media/video/gspca/gspca.c
drivers/media/video/gspca/gspca.h
drivers/media/video/gspca/pac7311.c
drivers/media/video/gspca/spca501.c
drivers/media/video/gspca/spca505.c
drivers/media/video/gspca/spca561.c
drivers/media/video/gspca/vc032x.c
drivers/media/video/gspca/zc3xx.c
drivers/media/video/s2255drv.c
drivers/media/video/tvaudio.c
drivers/message/fusion/mptscsih.c
drivers/message/i2o/i2o_block.c
drivers/message/i2o/iop.c
drivers/mfd/da903x.c
drivers/mfd/wm8350-i2c.c
drivers/misc/Kconfig
drivers/misc/Makefile
drivers/misc/acer-wmi.c
drivers/misc/asus-laptop.c
drivers/misc/c2port/Kconfig [new file with mode: 0644]
drivers/misc/c2port/Makefile [new file with mode: 0644]
drivers/misc/c2port/c2port-duramar2150.c [new file with mode: 0644]
drivers/misc/c2port/core.c [new file with mode: 0644]
drivers/misc/compal-laptop.c
drivers/misc/eeepc-laptop.c
drivers/misc/fujitsu-laptop.c
drivers/misc/ics932s401.c [new file with mode: 0644]
drivers/misc/intel_menlow.c
drivers/misc/msi-laptop.c
drivers/misc/sgi-gru/Makefile
drivers/misc/sgi-gru/grufault.c
drivers/misc/sgi-gru/grufile.c
drivers/misc/sgi-gru/gruprocfs.c
drivers/misc/sgi-xp/xp.h
drivers/misc/sgi-xp/xp_main.c
drivers/misc/sgi-xp/xp_sn2.c
drivers/misc/sgi-xp/xp_uv.c
drivers/misc/sgi-xp/xpc.h
drivers/misc/sgi-xp/xpc_sn2.c
drivers/misc/sgi-xp/xpc_uv.c
drivers/misc/sony-laptop.c
drivers/misc/thinkpad_acpi.c
drivers/mtd/devices/m25p80.c
drivers/mtd/maps/cdb89712.c
drivers/mtd/maps/h720x-flash.c
drivers/mtd/maps/physmap.c
drivers/mtd/nand/fsl_upm.c
drivers/mtd/nand/pasemi_nand.c
drivers/mtd/nand/pxa3xx_nand.c
drivers/mtd/onenand/omap2.c
drivers/mtd/ubi/eba.c
drivers/mtd/ubi/scan.c
drivers/mtd/ubi/wl.c
drivers/net/Kconfig
drivers/net/Makefile
drivers/net/atl1e/atl1e_hw.c
drivers/net/atlx/atl1.c
drivers/net/atlx/atl2.c
drivers/net/bnx2.c
drivers/net/bnx2.h
drivers/net/chelsio/sge.c
drivers/net/cxgb3/cxgb3_main.c
drivers/net/cxgb3/t3_hw.c
drivers/net/e100.c
drivers/net/e1000/e1000_ethtool.c
drivers/net/e1000/e1000_main.c
drivers/net/e1000e/e1000.h
drivers/net/e1000e/ethtool.c
drivers/net/e1000e/ich8lan.c
drivers/net/e1000e/netdev.c
drivers/net/e1000e/param.c
drivers/net/enc28j60.c
drivers/net/gianfar.c
drivers/net/hp-plus.c
drivers/net/igb/igb_ethtool.c
drivers/net/igb/igb_main.c
drivers/net/ipg.c
drivers/net/ixgbe/ixgbe_main.c
drivers/net/jme.c
drivers/net/jme.h
drivers/net/macvlan.c
drivers/net/mlx4/en_netdev.c
drivers/net/mlx4/en_params.c
drivers/net/mlx4/main.c
drivers/net/mlx4/mlx4.h
drivers/net/mlx4/mlx4_en.h
drivers/net/mlx4/port.c
drivers/net/mv643xx_eth.c
drivers/net/myri10ge/myri10ge.c
drivers/net/netx-eth.c
drivers/net/niu.c
drivers/net/niu.h
drivers/net/pcmcia/axnet_cs.c
drivers/net/pcmcia/ibmtr_cs.c
drivers/net/pcmcia/pcnet_cs.c
drivers/net/phy/marvell.c
drivers/net/phy/mdio_bus.c
drivers/net/phy/phy_device.c
drivers/net/phy/vitesse.c
drivers/net/pppol2tp.c
drivers/net/qla3xxx.c
drivers/net/sh_eth.c
drivers/net/sis900.c
drivers/net/smc911x.c
drivers/net/smc91x.c
drivers/net/spider_net.c
drivers/net/starfire.c
drivers/net/sungem.c
drivers/net/tlan.c
drivers/net/ucc_geth_ethtool.c
drivers/net/usb/asix.c
drivers/net/via-velocity.c
drivers/net/wireless/ath5k/base.c
drivers/net/wireless/ath5k/base.h
drivers/net/wireless/ath5k/debug.c
drivers/net/wireless/ath9k/beacon.c
drivers/net/wireless/ath9k/recv.c
drivers/net/wireless/hostap/hostap_wlan.h
drivers/net/wireless/ipw2200.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-dev.h
drivers/net/wireless/iwlwifi/iwl-rx.c
drivers/net/wireless/iwlwifi/iwl-sta.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/libertas_tf/if_usb.c
drivers/net/wireless/rtl8187_dev.c
drivers/net/wireless/zd1211rw/zd_mac.c
drivers/net/xen-netfront.c
drivers/parport/Kconfig
drivers/parport/parport_serial.c
drivers/pci/hotplug/acpiphp.h
drivers/pci/hotplug/acpiphp_core.c
drivers/pci/hotplug/acpiphp_glue.c
drivers/pci/hotplug/ibmphp_core.c
drivers/pci/hotplug/pciehp_core.c
drivers/pci/intel-iommu.c
drivers/pci/pci-acpi.c
drivers/pci/pci.c
drivers/pci/pcie/aer/aerdrv_core.c
drivers/pci/pcie/aspm.c
drivers/pci/quirks.c
drivers/pci/slot.c
drivers/pcmcia/bfin_cf_pcmcia.c
drivers/pcmcia/cistpl.c
drivers/pcmcia/cs.c
drivers/pcmcia/ds.c
drivers/pcmcia/pcmcia_resource.c
drivers/pcmcia/rsrc_nonstatic.c
drivers/rapidio/rio-scan.c
drivers/rapidio/rio.c
drivers/rtc/Kconfig
drivers/rtc/Makefile
drivers/rtc/rtc-ds1390.c [new file with mode: 0644]
drivers/rtc/rtc-ds1672.c
drivers/rtc/rtc-max6900.c
drivers/rtc/rtc-rx8581.c [new file with mode: 0644]
drivers/rtc/rtc-starfire.c
drivers/rtc/rtc-sun4v.c
drivers/rtc/rtc-twl4030.c
drivers/rtc/rtc-wm8350.c [new file with mode: 0644]
drivers/s390/block/dasd.c
drivers/s390/char/sclp_cmd.c
drivers/s390/cio/device.c
drivers/s390/kvm/kvm_virtio.c
drivers/s390/scsi/zfcp_aux.c
drivers/s390/scsi/zfcp_ccw.c
drivers/s390/scsi/zfcp_dbf.c
drivers/s390/scsi/zfcp_dbf.h
drivers/s390/scsi/zfcp_erp.c
drivers/s390/scsi/zfcp_fc.c
drivers/s390/scsi/zfcp_fsf.c
drivers/s390/scsi/zfcp_scsi.c
drivers/scsi/aacraid/linit.c
drivers/scsi/advansys.c
drivers/scsi/device_handler/scsi_dh_hp_sw.c
drivers/scsi/dpt_i2o.c
drivers/scsi/gdth.c
drivers/scsi/ibmvscsi/ibmvscsi.c
drivers/scsi/ibmvscsi/ibmvstgt.c
drivers/scsi/libiscsi.c
drivers/scsi/megaraid.c
drivers/scsi/megaraid.h
drivers/scsi/megaraid/megaraid_sas.c
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_mbx.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla2xxx/qla_sup.c
drivers/scsi/qla2xxx/qla_version.h
drivers/scsi/scsi_error.c
drivers/scsi/scsi_lib.c
drivers/scsi/sd.c
drivers/scsi/sr.c
drivers/scsi/stex.c
drivers/serial/ioc3_serial.c
drivers/serial/mpc52xx_uart.c
drivers/serial/s3c2440.c
drivers/serial/sh-sci.c
drivers/serial/sh-sci.h
drivers/serial/uartlite.c
drivers/sh/maple/maple.c
drivers/spi/atmel_spi.c
drivers/spi/au1550_spi.c
drivers/spi/mpc52xx_psc_spi.c
drivers/spi/pxa2xx_spi.c
drivers/spi/spi_imx.c
drivers/spi/spi_s3c24xx_gpio.c
drivers/spi/spidev.c
drivers/staging/Kconfig
drivers/usb/class/cdc-acm.c
drivers/usb/class/usbtmc.c
drivers/usb/core/driver.c
drivers/usb/core/message.c
drivers/usb/core/sysfs.c
drivers/usb/core/urb.c
drivers/usb/gadget/f_acm.c
drivers/usb/gadget/f_rndis.c
drivers/usb/gadget/fsl_qe_udc.c
drivers/usb/gadget/fsl_usb2_udc.c
drivers/usb/gadget/pxa25x_udc.c
drivers/usb/host/Kconfig
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-pci.c
drivers/usb/host/ehci-ps3.c
drivers/usb/host/ehci-sched.c
drivers/usb/host/ehci.h
drivers/usb/host/isp1760-if.c
drivers/usb/host/ohci-ps3.c
drivers/usb/host/r8a66597-hcd.c
drivers/usb/misc/sisusbvga/sisusb.c
drivers/usb/misc/vstusb.c
drivers/usb/mon/mon_bin.c
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_debug.h
drivers/usb/musb/musb_host.c
drivers/usb/musb/musb_host.h
drivers/usb/musb/omap2430.c
drivers/usb/musb/tusb6010.c
drivers/usb/serial/console.c
drivers/usb/serial/cp2101.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio.h
drivers/usb/serial/option.c
drivers/usb/serial/pl2303.c
drivers/usb/serial/pl2303.h
drivers/usb/serial/ti_usb_3410_5052.c
drivers/usb/storage/Kconfig
drivers/usb/storage/unusual_devs.h
drivers/video/atmel_lcdfb.c
drivers/video/aty/radeon_accel.c
drivers/video/aty/radeon_backlight.c
drivers/video/aty/radeon_base.c
drivers/video/aty/radeon_pm.c
drivers/video/aty/radeonfb.h
drivers/video/backlight/da903x.c
drivers/video/backlight/lcd.c
drivers/video/cirrusfb.c
drivers/video/console/fbcon.c
drivers/video/fbmem.c
drivers/video/macfb.c
drivers/video/mb862xx/mb862xxfb.c
drivers/video/omap/Makefile
drivers/video/omap/lcd_sx1.c [deleted file]
drivers/video/omap/omapfb_main.c
drivers/video/pxafb.c
drivers/video/tmiofb.c
drivers/video/via/viafbdev.c
drivers/video/xen-fbfront.c
drivers/video/xilinxfb.c
drivers/w1/masters/Kconfig
drivers/w1/masters/Makefile
drivers/w1/masters/omap_hdq.c [new file with mode: 0644]
drivers/w1/slaves/Kconfig
drivers/w1/slaves/Makefile
drivers/w1/slaves/w1_bq27000.c [new file with mode: 0644]
drivers/w1/w1.h
drivers/w1/w1_io.c
drivers/watchdog/hpwdt.c
drivers/watchdog/iTCO_vendor_support.c
drivers/watchdog/iTCO_wdt.c
drivers/watchdog/mtx-1_wdt.c
drivers/xen/balloon.c
drivers/xen/features.c
drivers/xen/grant-table.c
fs/9p/fid.c
fs/9p/v9fs.c
fs/9p/vfs_dentry.c
fs/9p/vfs_inode.c
fs/block_dev.c
fs/buffer.c
fs/cifs/CHANGES
fs/cifs/cifs_debug.c
fs/cifs/cifs_dfs_ref.c
fs/cifs/cifs_spnego.c
fs/cifs/cifsfs.c
fs/cifs/cifsglob.h
fs/cifs/cifssmb.c
fs/cifs/connect.c
fs/cifs/file.c
fs/cifs/misc.c
fs/cifs/readdir.c
fs/dlm/lockspace.c
fs/ecryptfs/keystore.c
fs/eventpoll.c
fs/exec.c
fs/exportfs/expfs.c
fs/ext3/super.c
fs/ext4/balloc.c
fs/fcntl.c
fs/hostfs/hostfs.h
fs/hostfs/hostfs_kern.c
fs/hostfs/hostfs_user.c
fs/inotify.c
fs/ioctl.c
fs/lockd/host.c
fs/lockd/svc.c
fs/namei.c
fs/namespace.c
fs/nfsd/nfs4recover.c
fs/nfsd/nfs4state.c
fs/ntfs/debug.h
fs/ocfs2/buffer_head_io.c
fs/ocfs2/dlm/dlmfs.c
fs/ocfs2/dlm/userdlm.h
fs/ocfs2/dlmglue.c
fs/ocfs2/ocfs2.h
fs/ocfs2/ocfs2_fs.h
fs/ocfs2/stack_user.c
fs/ocfs2/xattr.c
fs/partitions/check.c
fs/proc/base.c
fs/proc/proc_sysctl.c
fs/proc/task_mmu.c
fs/ubifs/commit.c
fs/ubifs/debug.c
fs/ubifs/dir.c
fs/ubifs/file.c
fs/ubifs/journal.c
fs/ubifs/key.h
fs/ubifs/lpt_commit.c
fs/ubifs/orphan.c
fs/ubifs/recovery.c
fs/ubifs/replay.c
fs/ubifs/sb.c
fs/ubifs/super.c
fs/ubifs/tnc.c
fs/ubifs/ubifs.h
fs/udf/inode.c
fs/xfs/xfs_rename.c
include/acpi/acpi_bus.h
include/acpi/acpi_drivers.h
include/acpi/acpixf.h
include/acpi/acpredef.h
include/acpi/actypes.h
include/asm-generic/atomic.h
include/asm-generic/audit_write.h
include/asm-generic/bug.h
include/asm-generic/pgtable.h
include/asm-mn10300/uaccess.h
include/drm/drmP.h
include/linux/acpi.h
include/linux/audit.h
include/linux/blkdev.h
include/linux/c2port.h [new file with mode: 0644]
include/linux/can/core.h
include/linux/compat.h
include/linux/cpuset.h
include/linux/dmi.h
include/linux/fs.h
include/linux/ftrace.h
include/linux/genhd.h
include/linux/highmem.h
include/linux/hrtimer.h
include/linux/ide.h
include/linux/idr.h
include/linux/inotify.h
include/linux/input.h
include/linux/irq.h
include/linux/kernel.h
include/linux/libata.h
include/linux/lockdep.h
include/linux/memory.h
include/linux/mfd/wm8350/rtc.h
include/linux/mlx4/device.h
include/linux/mm.h
include/linux/net.h
include/linux/netdevice.h
include/linux/netfilter/nfnetlink_conntrack.h
include/linux/netfilter/x_tables.h
include/linux/page_cgroup.h
include/linux/pci.h
include/linux/pci_ids.h
include/linux/ratelimit.h
include/linux/ring_buffer.h
include/linux/sched.h
include/linux/security.h
include/linux/serial_core.h
include/linux/slab.h
include/linux/smp.h
include/linux/syscalls.h
include/linux/usb.h
include/linux/usb/ch9.h
include/net/af_unix.h
include/net/irda/irda_device.h
include/net/mac80211.h
include/net/request_sock.h
include/net/sock.h
include/net/timewait_sock.h
include/scsi/scsi_transport_fc.h
include/video/atmel_lcdc.h
include/video/radeon.h
include/xen/interface/event_channel.h
init/Kconfig
ipc/util.c
kernel/Makefile
kernel/audit.c
kernel/audit_tree.c
kernel/auditfilter.c
kernel/auditsc.c
kernel/cgroup.c
kernel/cgroup_freezer.c
kernel/cpu.c
kernel/cpuset.c
kernel/exit.c
kernel/fork.c
kernel/hrtimer.c
kernel/irq/internals.h
kernel/irq/manage.c
kernel/irq/migration.c
kernel/irq/proc.c
kernel/kallsyms.c
kernel/kprobes.c
kernel/latencytop.c
kernel/lockdep.c
kernel/panic.c
kernel/posix-cpu-timers.c
kernel/posix-timers.c
kernel/power/main.c
kernel/power/swap.c
kernel/profile.c
kernel/ptrace.c
kernel/relay.c
kernel/sched.c
kernel/sched_clock.c
kernel/sched_debug.c
kernel/sched_stats.h
kernel/softlockup.c
kernel/stop_machine.c
kernel/sys_ni.c
kernel/sysctl.c
kernel/time/timekeeping.c
kernel/trace/ftrace.c
kernel/trace/ring_buffer.c
kernel/trace/trace.c
kernel/trace/trace_mmiotrace.c
kernel/trace/trace_stack.c
lib/bug.c
lib/dynamic_printk.c
lib/idr.c
lib/percpu_counter.c
lib/scatterlist.c
lib/swiotlb.c
mm/backing-dev.c
mm/hugetlb.c
mm/memory.c
mm/memory_hotplug.c
mm/migrate.c
mm/mlock.c
mm/mmap.c
mm/page_alloc.c
mm/page_cgroup.c
mm/slob.c
mm/slub.c
mm/sparse.c
mm/swap.c
mm/swapfile.c
mm/vmalloc.c
mm/vmscan.c
net/9p/Kconfig
net/atm/svc.c
net/bridge/br_netfilter.c
net/can/af_can.c
net/can/bcm.c
net/compat.c
net/core/netpoll.c
net/core/pktgen.c
net/core/rtnetlink.c
net/core/scm.c
net/core/skbuff.c
net/core/sock.c
net/ipv4/af_inet.c
net/ipv4/ip_input.c
net/ipv4/ipmr.c
net/ipv4/netfilter/nf_nat_rule.c
net/ipv4/tcp_htcp.c
net/ipv4/tcp_output.c
net/ipv4/tcp_vegas.c
net/ipv4/udp.c
net/ipv6/datagram.c
net/ipv6/ip6mr.c
net/ipv6/ipv6_sockglue.c
net/ipv6/ndisc.c
net/ipv6/proc.c
net/mac80211/mlme.c
net/mac80211/sta_info.c
net/mac80211/wext.c
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_netlink.c
net/netfilter/xt_socket.c
net/netlabel/netlabel_unlabeled.c
net/phonet/af_phonet.c
net/phonet/pep-gprs.c
net/phonet/pn_dev.c
net/phonet/pn_netlink.c
net/rose/af_rose.c
net/sched/sch_api.c
net/sched/sch_generic.c
net/sched/sch_netem.c
net/socket.c
net/sunrpc/auth_generic.c
net/sunrpc/svcsock.c
net/unix/af_unix.c
net/unix/garbage.c
net/wireless/reg.c
net/xfrm/xfrm_policy.c
scripts/kernel-doc
sound/pci/hda/hda_beep.c
sound/pci/hda/hda_beep.h
sound/pci/hda/hda_codec.c
sound/pci/hda/patch_sigmatel.c
sound/pci/pcxhr/pcxhr.c
sound/soc/fsl/Kconfig
sound/soc/omap/omap-pcm.c
sound/sound_core.c

index edef85ce1195e0a0e98f2f135d4051c1b5844947..2a39aeba1464b8f66ed9cfe1dc7f20d40bbeb15f 100644 (file)
@@ -42,14 +42,8 @@ IRQ.txt
        - description of what an IRQ is.
 ManagementStyle
        - how to (attempt to) manage kernel hackers.
-MSI-HOWTO.txt
-       - the Message Signaled Interrupts (MSI) Driver Guide HOWTO and FAQ.
 RCU/
        - directory with info on RCU (read-copy update).
-README.DAC960
-       - info on Mylex DAC960/DAC1100 PCI RAID Controller Driver for Linux.
-README.cycladesZ
-       - info on Cyclades-Z firmware loading.
 SAK.txt
        - info on Secure Attention Keys.
 SM501.txt
@@ -86,20 +80,16 @@ blackfin/
        - directory with documentation for the Blackfin arch.
 block/
        - info on the Block I/O (BIO) layer.
+blockdev/
+       - info on block devices & drivers
 cachetlb.txt
        - describes the cache/TLB flushing interfaces Linux uses.
-cciss.txt
-       - info, major/minor #'s for Compaq's SMART Array Controllers.
 cdrom/
        - directory with information on the CD-ROM drivers that Linux has.
-computone.txt
-       - info on Computone Intelliport II/Plus Multiport Serial Driver.
 connector/
        - docs on the netlink based userspace<->kernel space communication mod.
 console/
        - documentation on Linux console drivers.
-cpqarray.txt
-       - info on using Compaq's SMART2 Intelligent Disk Array Controllers.
 cpu-freq/
        - info on CPU frequency and voltage scaling.
 cpu-hotplug.txt
@@ -126,8 +116,6 @@ device-mapper/
        - directory with info on Device Mapper.
 devices.txt
        - plain ASCII listing of all the nodes in /dev/ with major minor #'s.
-digiepca.txt
-       - info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards.
 dontdiff
        - file containing a list of files that should never be diff'ed.
 driver-model/
@@ -152,14 +140,10 @@ filesystems/
        - info on the vfs and the various filesystems that Linux supports.
 firmware_class/
        - request_firmware() hotplug interface info.
-floppy.txt
-       - notes and driver options for the floppy disk driver.
 frv/
        - Fujitsu FR-V Linux documentation.
 gpio.txt
        - overview of GPIO (General Purpose Input/Output) access conventions.
-hayes-esp.txt
-       - info on using the Hayes ESP serial driver.
 highuid.txt
        - notes on the change from 16 bit to 32 bit user/group IDs.
 timers/
@@ -186,8 +170,6 @@ io_ordering.txt
        - info on ordering I/O writes to memory-mapped addresses.
 ioctl/
        - directory with documents describing various IOCTL calls.
-ioctl-number.txt
-       - how to implement and register device/driver ioctl calls.
 iostats.txt
        - info on I/O statistics Linux kernel provides.
 irqflags-tracing.txt
@@ -250,14 +232,10 @@ mips/
        - directory with info about Linux on MIPS architecture.
 mono.txt
        - how to execute Mono-based .NET binaries with the help of BINFMT_MISC.
-moxa-smartio
-       - file with info on installing/using Moxa multiport serial driver.
 mutex-design.txt
        - info on the generic mutex subsystem.
 namespaces/
        - directory with various information about namespaces
-nbd.txt
-       - info on a TCP implementation of a network block device.
 netlabel/
        - directory with information on the NetLabel subsystem.
 networking/
@@ -270,8 +248,6 @@ numastat.txt
        - info on how to read Numa policy hit/miss statistics in sysfs.
 oops-tracing.txt
        - how to decode those nasty internal kernel error dump messages.
-paride.txt
-       - information about the parallel port IDE subsystem.
 parisc/
        - directory with info on using Linux on PA-RISC architecture.
 parport.txt
@@ -290,20 +266,16 @@ powerpc/
        - directory with info on using Linux with the PowerPC.
 preempt-locking.txt
        - info on locking under a preemptive kernel.
+printk-formats.txt
+       - how to get printk format specifiers right
 prio_tree.txt
        - info on radix-priority-search-tree use for indexing vmas.
-ramdisk.txt
-       - short guide on how to set up and use the RAM disk.
 rbtree.txt
        - info on what red-black trees are and what they are for.
-riscom8.txt
-       - notes on using the RISCom/8 multi-port serial driver.
 robust-futex-ABI.txt
        - documentation of the robust futex ABI.
 robust-futexes.txt
        - a description of what robust futexes are.
-rocket.txt
-       - info on the Comtrol RocketPort multiport serial driver.
 rt-mutex-design.txt
        - description of the RealTime mutex implementation design.
 rt-mutex.txt
@@ -332,8 +304,6 @@ sparc/
        - directory with info on using Linux on Sparc architecture.
 sparse.txt
        - info on how to obtain and use the sparse tool for typechecking.
-specialix.txt
-       - info on hardware/driver for specialix IO8+ multiport serial card.
 spi/
        - overview of Linux kernel Serial Peripheral Interface (SPI) support.
 spinlocks.txt
@@ -342,14 +312,10 @@ stable_api_nonsense.txt
        - info on why the kernel does not have a stable in-kernel api or abi.
 stable_kernel_rules.txt
        - rules and procedures for the -stable kernel releases.
-stallion.txt
-       - info on using the Stallion multiport serial driver.
 svga.txt
        - short guide on selecting video modes at boot via VGA BIOS.
 sysfs-rules.txt
        - How not to use sysfs.
-sx.txt
-       - info on the Specialix SX/SI multiport serial driver.
 sysctl/
        - directory with info on the /proc/sys/* files.
 sysrq.txt
@@ -358,8 +324,6 @@ telephony/
        - directory with info on telephony (e.g. voice over IP) support.
 time_interpolators.txt
        - info on time interpolators.
-tty.txt
-       - guide to the locking policies of the tty layer.
 uml/
        - directory with information about User Mode Linux.
 unicode.txt
diff --git a/Documentation/ABI/testing/sysfs-c2port b/Documentation/ABI/testing/sysfs-c2port
new file mode 100644 (file)
index 0000000..716cffc
--- /dev/null
@@ -0,0 +1,88 @@
+What:          /sys/class/c2port/
+Date:          October 2008
+Contact:       Rodolfo Giometti <giometti@linux.it>
+Description:
+               The /sys/class/c2port/ directory will contain files and
+               directories that will provide a unified interface to
+               the C2 port interface.
+
+What:          /sys/class/c2port/c2portX
+Date:          October 2008
+Contact:       Rodolfo Giometti <giometti@linux.it>
+Description:
+               The /sys/class/c2port/c2portX/ directory is related to X-th
+               C2 port into the system. Each directory will contain files to
+               manage and control its C2 port.
+
+What:          /sys/class/c2port/c2portX/access
+Date:          October 2008
+Contact:       Rodolfo Giometti <giometti@linux.it>
+Description:
+               The /sys/class/c2port/c2portX/access file enable the access
+               to the C2 port from the system. No commands can be sent
+               till this entry is set to 0.
+
+What:          /sys/class/c2port/c2portX/dev_id
+Date:          October 2008
+Contact:       Rodolfo Giometti <giometti@linux.it>
+Description:
+               The /sys/class/c2port/c2portX/dev_id file show the device ID
+               of the connected micro.
+
+What:          /sys/class/c2port/c2portX/flash_access
+Date:          October 2008
+Contact:       Rodolfo Giometti <giometti@linux.it>
+Description:
+               The /sys/class/c2port/c2portX/flash_access file enable the
+               access to the on-board flash of the connected micro.
+               No commands can be sent till this entry is set to 0.
+
+What:          /sys/class/c2port/c2portX/flash_block_size
+Date:          October 2008
+Contact:       Rodolfo Giometti <giometti@linux.it>
+Description:
+               The /sys/class/c2port/c2portX/flash_block_size file show
+               the on-board flash block size of the connected micro.
+
+What:          /sys/class/c2port/c2portX/flash_blocks_num
+Date:          October 2008
+Contact:       Rodolfo Giometti <giometti@linux.it>
+Description:
+               The /sys/class/c2port/c2portX/flash_blocks_num file show
+               the on-board flash blocks number of the connected micro.
+
+What:          /sys/class/c2port/c2portX/flash_data
+Date:          October 2008
+Contact:       Rodolfo Giometti <giometti@linux.it>
+Description:
+               The /sys/class/c2port/c2portX/flash_data file export
+               the content of the on-board flash of the connected micro.
+
+What:          /sys/class/c2port/c2portX/flash_erase
+Date:          October 2008
+Contact:       Rodolfo Giometti <giometti@linux.it>
+Description:
+               The /sys/class/c2port/c2portX/flash_erase file execute
+               the "erase" command on the on-board flash of the connected
+               micro.
+
+What:          /sys/class/c2port/c2portX/flash_erase
+Date:          October 2008
+Contact:       Rodolfo Giometti <giometti@linux.it>
+Description:
+               The /sys/class/c2port/c2portX/flash_erase file show the
+               on-board flash size of the connected micro.
+
+What:          /sys/class/c2port/c2portX/reset
+Date:          October 2008
+Contact:       Rodolfo Giometti <giometti@linux.it>
+Description:
+               The /sys/class/c2port/c2portX/reset file execute a "reset"
+               command on the connected micro.
+
+What:          /sys/class/c2port/c2portX/rev_id
+Date:          October 2008
+Contact:       Rodolfo Giometti <giometti@linux.it>
+Description:
+               The /sys/class/c2port/c2portX/rev_id file show the revision ID
+               of the connected micro.
index f27be7d1a49f4038951827c583734b1cf1be3125..e8ffc70ffe1234981a296f5488b2e133f23a0670 100644 (file)
@@ -89,7 +89,7 @@ Description:
 
                error - an interrupt that can't be accounted for above.
 
-               invalid: it's either a wakeup GPE or a GPE/Fixed Event that
+               invalid: it's either a GPE or a Fixed Event that
                        doesn't have an event handler.
 
                disable: the GPE/Fixed Event is valid but disabled.
@@ -117,30 +117,30 @@ Description:
                and other user space applications so that the machine won't shutdown
                when pressing the power button.
                # cat ff_pwr_btn
-               0
+               0       enabled
                # press the power button for 3 times;
                # cat ff_pwr_btn
-               3
+               3       enabled
                # echo disable > ff_pwr_btn
                # cat ff_pwr_btn
-               disable
+               3       disabled
                # press the power button for 3 times;
                # cat ff_pwr_btn
-               disable
+               3       disabled
                # echo enable > ff_pwr_btn
                # cat ff_pwr_btn
-               4
+               4       enabled
                /*
                 * this is because the status bit is set even if the enable bit is cleared,
                 * and it triggers an ACPI fixed event when the enable bit is set again
                 */
                # press the power button for 3 times;
                # cat ff_pwr_btn
-               7
+               7       enabled
                # echo disable > ff_pwr_btn
                # press the power button for 3 times;
                # echo clear > ff_pwr_btn       /* clear the status bit */
                # echo disable > ff_pwr_btn
                # cat ff_pwr_btn
-               7
+               7       enabled
 
index b8e86460046e7ee3dba003c12de57ae2d6f7fb36..b462bb1495438b4854564151cdddb9b3c98e91a2 100644 (file)
@@ -316,12 +316,10 @@ reduce current DMA mapping usage or delay and try again later).
        pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
                int nents, int direction)
 
-Maps a scatter gather list from the block layer.
-
 Returns: the number of physical segments mapped (this may be shorter
-than <nents> passed in if the block layer determines that some
-elements of the scatter/gather list are physically adjacent and thus
-may be mapped with a single entry).
+than <nents> passed in if some elements of the scatter/gather list are
+physically or virtually adjacent and an IOMMU maps them with a single
+entry).
 
 Please note that the sg cannot be mapped again if it has been mapped once.
 The mapping process is allowed to destroy information in the sg.
index 49f43946c6b62b0ce8ca4e58c1a66281c324cf2c..812b17fe3ed0d55703d188e3a03b24937c1f1abc 100644 (file)
@@ -1,5 +1,7 @@
 00-INDEX
        - this file
+MSI-HOWTO.txt
+       - the Message Signaled Interrupts (MSI) Driver Guide HOWTO and FAQ.
 PCI-DMA-mapping.txt
        - info for PCI drivers using DMA portably across all platforms
 PCIEBUS-HOWTO.txt
diff --git a/Documentation/acpi/debug.txt b/Documentation/acpi/debug.txt
new file mode 100644 (file)
index 0000000..65bf47c
--- /dev/null
@@ -0,0 +1,148 @@
+                       ACPI Debug Output
+
+
+The ACPI CA, the Linux ACPI core, and some ACPI drivers can generate debug
+output.  This document describes how to use this facility.
+
+Compile-time configuration
+--------------------------
+
+ACPI debug output is globally enabled by CONFIG_ACPI_DEBUG.  If this config
+option is turned off, the debug messages are not even built into the
+kernel.
+
+Boot- and run-time configuration
+--------------------------------
+
+When CONFIG_ACPI_DEBUG=y, you can select the component and level of messages
+you're interested in.  At boot-time, use the acpi.debug_layer and
+acpi.debug_level kernel command line options.  After boot, you can use the
+debug_layer and debug_level files in /sys/module/acpi/parameters/ to control
+the debug messages.
+
+debug_layer (component)
+-----------------------
+
+The "debug_layer" is a mask that selects components of interest, e.g., a
+specific driver or part of the ACPI interpreter.  To build the debug_layer
+bitmask, look for the "#define _COMPONENT" in an ACPI source file.
+
+You can set the debug_layer mask at boot-time using the acpi.debug_layer
+command line argument, and you can change it after boot by writing values
+to /sys/module/acpi/parameters/debug_layer.
+
+The possible components are defined in include/acpi/acoutput.h and
+include/acpi/acpi_drivers.h.  Reading /sys/module/acpi/parameters/debug_layer
+shows the supported mask values, currently these:
+
+    ACPI_UTILITIES                  0x00000001
+    ACPI_HARDWARE                   0x00000002
+    ACPI_EVENTS                     0x00000004
+    ACPI_TABLES                     0x00000008
+    ACPI_NAMESPACE                  0x00000010
+    ACPI_PARSER                     0x00000020
+    ACPI_DISPATCHER                 0x00000040
+    ACPI_EXECUTER                   0x00000080
+    ACPI_RESOURCES                  0x00000100
+    ACPI_CA_DEBUGGER                0x00000200
+    ACPI_OS_SERVICES                0x00000400
+    ACPI_CA_DISASSEMBLER            0x00000800
+    ACPI_COMPILER                   0x00001000
+    ACPI_TOOLS                      0x00002000
+    ACPI_BUS_COMPONENT              0x00010000
+    ACPI_AC_COMPONENT               0x00020000
+    ACPI_BATTERY_COMPONENT          0x00040000
+    ACPI_BUTTON_COMPONENT           0x00080000
+    ACPI_SBS_COMPONENT              0x00100000
+    ACPI_FAN_COMPONENT              0x00200000
+    ACPI_PCI_COMPONENT              0x00400000
+    ACPI_POWER_COMPONENT            0x00800000
+    ACPI_CONTAINER_COMPONENT        0x01000000
+    ACPI_SYSTEM_COMPONENT           0x02000000
+    ACPI_THERMAL_COMPONENT          0x04000000
+    ACPI_MEMORY_DEVICE_COMPONENT    0x08000000
+    ACPI_VIDEO_COMPONENT            0x10000000
+    ACPI_PROCESSOR_COMPONENT        0x20000000
+
+debug_level
+-----------
+
+The "debug_level" is a mask that selects different types of messages, e.g.,
+those related to initialization, method execution, informational messages, etc.
+To build debug_level, look at the level specified in an ACPI_DEBUG_PRINT()
+statement.
+
+The ACPI interpreter uses several different levels, but the Linux
+ACPI core and ACPI drivers generally only use ACPI_LV_INFO.
+
+You can set the debug_level mask at boot-time using the acpi.debug_level
+command line argument, and you can change it after boot by writing values
+to /sys/module/acpi/parameters/debug_level.
+
+The possible levels are defined in include/acpi/acoutput.h.  Reading
+/sys/module/acpi/parameters/debug_level shows the supported mask values,
+currently these:
+
+    ACPI_LV_INIT                    0x00000001
+    ACPI_LV_DEBUG_OBJECT            0x00000002
+    ACPI_LV_INFO                    0x00000004
+    ACPI_LV_INIT_NAMES              0x00000020
+    ACPI_LV_PARSE                   0x00000040
+    ACPI_LV_LOAD                    0x00000080
+    ACPI_LV_DISPATCH                0x00000100
+    ACPI_LV_EXEC                    0x00000200
+    ACPI_LV_NAMES                   0x00000400
+    ACPI_LV_OPREGION                0x00000800
+    ACPI_LV_BFIELD                  0x00001000
+    ACPI_LV_TABLES                  0x00002000
+    ACPI_LV_VALUES                  0x00004000
+    ACPI_LV_OBJECTS                 0x00008000
+    ACPI_LV_RESOURCES               0x00010000
+    ACPI_LV_USER_REQUESTS           0x00020000
+    ACPI_LV_PACKAGE                 0x00040000
+    ACPI_LV_ALLOCATIONS             0x00100000
+    ACPI_LV_FUNCTIONS               0x00200000
+    ACPI_LV_OPTIMIZATIONS           0x00400000
+    ACPI_LV_MUTEX                   0x01000000
+    ACPI_LV_THREADS                 0x02000000
+    ACPI_LV_IO                      0x04000000
+    ACPI_LV_INTERRUPTS              0x08000000
+    ACPI_LV_AML_DISASSEMBLE         0x10000000
+    ACPI_LV_VERBOSE_INFO            0x20000000
+    ACPI_LV_FULL_TABLES             0x40000000
+    ACPI_LV_EVENTS                  0x80000000
+
+Examples
+--------
+
+For example, drivers/acpi/bus.c contains this:
+
+    #define _COMPONENT              ACPI_BUS_COMPONENT
+    ...
+    ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device insertion detected\n"));
+
+To turn on this message, set the ACPI_BUS_COMPONENT bit in acpi.debug_layer
+and the ACPI_LV_INFO bit in acpi.debug_level.  (The ACPI_DEBUG_PRINT
+statement uses ACPI_DB_INFO, which is macro based on the ACPI_LV_INFO
+definition.)
+
+Enable all AML "Debug" output (stores to the Debug object while interpreting
+AML) during boot:
+
+    acpi.debug_layer=0xffffffff acpi.debug_level=0x2
+
+Enable PCI and PCI interrupt routing debug messages:
+
+    acpi.debug_layer=0x400000 acpi.debug_level=0x4
+
+Enable all ACPI hardware-related messages:
+
+    acpi.debug_layer=0x2 acpi.debug_level=0xffffffff
+
+Enable all ACPI_DB_INFO messages after boot:
+
+    # echo 0x4 > /sys/module/acpi/parameters/debug_level
+
+Show all valid component values:
+
+    # cat /sys/module/acpi/parameters/debug_layer
index d145ccca169a37aa3ff42b06c734d9068525d9d7..c7c7a114c78c795c702f8543c57c7558466a9a4b 100644 (file)
@@ -24,7 +24,7 @@ real bad - it changes the behaviour of all unaligned instructions in user
 space, and might cause programs to fail unexpectedly.
 
 To change the alignment trap behavior, simply echo a number into
-/proc/sys/debug/alignment.  The number is made up from various bits:
+/proc/cpu/alignment.  The number is made up from various bits:
 
 bit            behavior when set
 ---            -----------------
diff --git a/Documentation/blockdev/00-INDEX b/Documentation/blockdev/00-INDEX
new file mode 100644 (file)
index 0000000..86f054c
--- /dev/null
@@ -0,0 +1,16 @@
+00-INDEX
+       - this file
+README.DAC960
+       - info on Mylex DAC960/DAC1100 PCI RAID Controller Driver for Linux.
+cciss.txt
+       - info, major/minor #'s for Compaq's SMART Array Controllers.
+cpqarray.txt
+       - info on using Compaq's SMART2 Intelligent Disk Array Controllers.
+floppy.txt
+       - notes and driver options for the floppy disk driver.
+nbd.txt
+       - info on a TCP implementation of a network block device.
+paride.txt
+       - information about the parallel port IDE subsystem.
+ramdisk.txt
+       - short guide on how to set up and use the RAM disk.
diff --git a/Documentation/c2port.txt b/Documentation/c2port.txt
new file mode 100644 (file)
index 0000000..d9bf93e
--- /dev/null
@@ -0,0 +1,90 @@
+                       C2 port support
+                       ---------------
+
+(C) Copyright 2007 Rodolfo Giometti <giometti@enneenne.com>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+
+
+Overview
+--------
+
+This driver implements the support for Linux of Silicon Labs (Silabs)
+C2 Interface used for in-system programming of micro controllers.
+
+By using this driver you can reprogram the in-system flash without EC2
+or EC3 debug adapter. This solution is also useful in those systems
+where the micro controller is connected via special GPIOs pins.
+
+References
+----------
+
+The C2 Interface main references are at (http://www.silabs.com)
+Silicon Laboratories site], see:
+
+- AN127: FLASH Programming via the C2 Interface at
+http://www.silabs.com/public/documents/tpub_doc/anote/Microcontrollers/Small_Form_Factor/en/an127.pdf, and
+
+- C2 Specification at
+http://www.silabs.com/public/documents/tpub_doc/spec/Microcontrollers/en/C2spec.pdf,
+
+however it implements a two wire serial communication protocol (bit
+banging) designed to enable in-system programming, debugging, and
+boundary-scan testing on low pin-count Silicon Labs devices. Currently
+this code supports only flash programming but extensions are easy to
+add.
+
+Using the driver
+----------------
+
+Once the driver is loaded you can use sysfs support to get C2port's
+info or read/write in-system flash.
+
+# ls /sys/class/c2port/c2port0/
+access            flash_block_size  flash_erase       rev_id
+dev_id            flash_blocks_num  flash_size        subsystem/
+flash_access      flash_data        reset             uevent
+
+Initially the C2port access is disabled since you hardware may have
+such lines multiplexed with other devices so, to get access to the
+C2port, you need the command:
+
+# echo 1 > /sys/class/c2port/c2port0/access
+
+after that you should read the device ID and revision ID of the
+connected micro controller:
+
+# cat /sys/class/c2port/c2port0/dev_id
+8
+# cat /sys/class/c2port/c2port0/rev_id
+1
+
+However, for security reasons, the in-system flash access in not
+enabled yet, to do so you need the command:
+
+# echo 1 > /sys/class/c2port/c2port0/flash_access
+
+After that you can read the whole flash:
+
+# cat /sys/class/c2port/c2port0/flash_data > image
+
+erase it:
+
+# echo 1 > /sys/class/c2port/c2port0/flash_erase
+
+and write it:
+
+# cat image > /sys/class/c2port/c2port0/flash_data
+
+after writing you have to reset the device to execute the new code:
+
+# echo 1 > /sys/class/c2port/c2port0/reset
index c50ab58b72ebc26e0b03124f970e4d038f6df39e..41f37fea1276839b80cd4c220af27963f52c6a1d 100644 (file)
@@ -1,4 +1,4 @@
-       The cgroup freezer is useful to batch job management system which start
+The cgroup freezer is useful to batch job management system which start
 and stop sets of tasks in order to schedule the resources of a machine
 according to the desires of a system administrator. This sort of program
 is often used on HPC clusters to schedule access to the cluster as a
@@ -6,7 +6,7 @@ whole. The cgroup freezer uses cgroups to describe the set of tasks to
 be started/stopped by the batch job management system. It also provides
 a means to start and stop the tasks composing the job.
 
-       The cgroup freezer will also be useful for checkpointing running groups
+The cgroup freezer will also be useful for checkpointing running groups
 of tasks. The freezer allows the checkpoint code to obtain a consistent
 image of the tasks by attempting to force the tasks in a cgroup into a
 quiescent state. Once the tasks are quiescent another task can
@@ -16,7 +16,7 @@ recoverable error occur. This also allows the checkpointed tasks to be
 migrated between nodes in a cluster by copying the gathered information
 to another node and restarting the tasks there.
 
-       Sequences of SIGSTOP and SIGCONT are not always sufficient for stopping
+Sequences of SIGSTOP and SIGCONT are not always sufficient for stopping
 and resuming tasks in userspace. Both of these signals are observable
 from within the tasks we wish to freeze. While SIGSTOP cannot be caught,
 blocked, or ignored it can be seen by waiting or ptracing parent tasks.
@@ -37,26 +37,29 @@ demonstrate this problem using nested bash shells:
 
        <at this point 16990 exits and causes 16644 to exit too>
 
-       This happens because bash can observe both signals and choose how it
+This happens because bash can observe both signals and choose how it
 responds to them.
 
-       Another example of a program which catches and responds to these
+Another example of a program which catches and responds to these
 signals is gdb. In fact any program designed to use ptrace is likely to
 have a problem with this method of stopping and resuming tasks.
 
-        In contrast, the cgroup freezer uses the kernel freezer code to
+In contrast, the cgroup freezer uses the kernel freezer code to
 prevent the freeze/unfreeze cycle from becoming visible to the tasks
 being frozen. This allows the bash example above and gdb to run as
 expected.
 
-       The freezer subsystem in the container filesystem defines a file named
+The freezer subsystem in the container filesystem defines a file named
 freezer.state. Writing "FROZEN" to the state file will freeze all tasks in the
 cgroup. Subsequently writing "THAWED" will unfreeze the tasks in the cgroup.
 Reading will return the current state.
 
+Note freezer.state doesn't exist in root cgroup, which means root cgroup
+is non-freezable.
+
 * Examples of usage :
 
-   # mkdir /containers/freezer
+   # mkdir /containers
    # mount -t cgroup -ofreezer freezer  /containers
    # mkdir /containers/0
    # echo $some_pid > /containers/0/tasks
@@ -94,6 +97,6 @@ things happens:
                the freezer.state file
        2) Userspace retries the freezing operation by writing "FROZEN" to
                the freezer.state file (writing "FREEZING" is not legal
-               and returns EIO)
+               and returns EINVAL)
        3) The tasks that blocked the cgroup from entering the "FROZEN"
                state disappear from the cgroup's set of tasks.
index 6c442d8426b5928569918ebd149f4818c5657ab1..4f3f3840320e30eaa0650e9197725b7d6e811b4e 100644 (file)
@@ -23,6 +23,7 @@ Contents:
 1.3 sparc64
 1.4 ppc
 1.5 SuperH
+1.6 Blackfin
 
 2. "Policy" / "Governor"?
 2.1 Policy
@@ -97,6 +98,17 @@ The following SuperH processors are supported by cpufreq:
 SH-3
 SH-4
 
+1.6 Blackfin
+------------
+
+The following Blackfin processors are supported by cpufreq:
+
+BF522, BF523, BF524, BF525, BF526, BF527, Rev 0.1 or higher
+BF531, BF532, BF533, Rev 0.3 or higher
+BF534, BF536, BF537, Rev 0.2 or higher
+BF561, Rev 0.3 or higher
+BF542, BF544, BF547, BF548, BF549, Rev 0.1 or higher
+
 
 2. "Policy" / "Governor" ?
 ==========================
index c28a2ac88f9d9ed1457ab0c04324e3cf20fe986f..1a8af7354e799843721c3fb7ac40ab2df9352671 100644 (file)
@@ -244,18 +244,6 @@ Who:       Michael Buesch <mb@bu3sch.de>
 
 ---------------------------
 
-What:  init_mm export
-When:  2.6.26
-Why:   Not used in-tree. The current out-of-tree users used it to
-       work around problems in the CPA code which should be resolved
-       by now. One usecase was described to provide verification code
-       of the CPA operation. That's a good idea in general, but such
-       code / infrastructure should be in the kernel and not in some
-       out-of-tree driver.
-Who:   Thomas Gleixner <tglx@linutronix.de>
-
-----------------------------
-
 What:  usedac i386 kernel parameter
 When:  2.6.27
 Why:   replaced by allowdac and no dac combination
index 4340cc825796e87d0af97df690ef4ae13fd4e320..67310fbbb7dfe86e62f9ae28ebf1b188b4c1d4e2 100644 (file)
@@ -28,10 +28,7 @@ Manish Singh  <manish.singh@oracle.com>
 Caveats
 =======
 Features which OCFS2 does not support yet:
-       - extended attributes
        - quotas
-       - cluster aware flock
-       - cluster aware lockf
        - Directory change notification (F_NOTIFY)
        - Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease)
        - POSIX ACLs
index bcceb99b81dd8038130fd9b1032b3e4ba80dc113..71df353e367c9e8c3f2833fe7114c875a6d49d3b 100644 (file)
@@ -44,6 +44,7 @@ Table of Contents
   2.14 /proc/<pid>/io - Display the IO accounting fields
   2.15 /proc/<pid>/coredump_filter - Core dump filtering settings
   2.16 /proc/<pid>/mountinfo - Information about mounts
+  2.17 /proc/sys/fs/epoll - Configuration options for the epoll interface
 
 ------------------------------------------------------------------------------
 Preface
@@ -1338,10 +1339,13 @@ nmi_watchdog
 
 Enables/Disables the NMI watchdog on x86 systems.  When the value is non-zero
 the NMI watchdog is enabled and will continuously test all online cpus to
-determine whether or not they are still functioning properly.
+determine whether or not they are still functioning properly. Currently,
+passing "nmi_watchdog=" parameter at boot time is required for this function
+to work.
 
-Because the NMI watchdog shares registers with oprofile, by disabling the NMI
-watchdog, oprofile may have more registers to utilize.
+If LAPIC NMI watchdog method is in use (nmi_watchdog=2 kernel parameter), the
+NMI watchdog shares registers with oprofile. By disabling the NMI watchdog,
+oprofile may have more registers to utilize.
 
 msgmni
 ------
@@ -2483,4 +2487,30 @@ For more information on mount propagation see:
 
   Documentation/filesystems/sharedsubtree.txt
 
+2.17   /proc/sys/fs/epoll - Configuration options for the epoll interface
+--------------------------------------------------------
+
+This directory contains configuration options for the epoll(7) interface.
+
+max_user_instances
+------------------
+
+This is the maximum number of epoll file descriptors that a single user can
+have open at a given time. The default value is 128, and should be enough
+for normal users.
+
+max_user_watches
+----------------
+
+Every epoll file descriptor can store a number of files to be monitored
+for event readiness. Each one of these monitored files constitutes a "watch".
+This configuration option sets the maximum number of "watches" that are
+allowed for each user.
+Each "watch" costs roughly 90 bytes on a 32bit kernel, and roughly 160 bytes
+on a 64bit one.
+The current default value for  max_user_watches  is the 1/32 of the available
+low memory, divided for the "watch" cost in bytes.
+
+
 ------------------------------------------------------------------------------
+
index 62fe9b1e089031c2e30153e9dc1be6f15d30aa6c..a8273d5fad209b4ab4393c0667c03b549c83091c 100644 (file)
@@ -130,12 +130,12 @@ The 2.6 kernel build process always creates a gzipped cpio format initramfs
 archive and links it into the resulting kernel binary.  By default, this
 archive is empty (consuming 134 bytes on x86).
 
-The config option CONFIG_INITRAMFS_SOURCE (for some reason buried under
-devices->block devices in menuconfig, and living in usr/Kconfig) can be used
-to specify a source for the initramfs archive, which will automatically be
-incorporated into the resulting binary.  This option can point to an existing
-gzipped cpio archive, a directory containing files to be archived, or a text
-file specification such as the following example:
+The config option CONFIG_INITRAMFS_SOURCE (in General Setup in menuconfig,
+and living in usr/Kconfig) can be used to specify a source for the
+initramfs archive, which will automatically be incorporated into the
+resulting binary.  This option can point to an existing gzipped cpio
+archive, a directory containing files to be archived, or a text file
+specification such as the following example:
 
   dir /dev 755 0 0
   nod /dev/console 644 0 0 c 5 1
index 3cc4010521a019562e68eb070aa83ad78b0e8c4b..0466ee569278e43b2ccf80d444ab3c38d1ad5e44 100644 (file)
@@ -39,10 +39,11 @@ The block device operation is optional, these block devices support it as of
 today:
 - dcssblk: s390 dcss block device driver
 
-An address space operation named get_xip_page is used to retrieve reference
-to a struct page. To address the target page, a reference to an address_space,
-and a sector number is provided. A 3rd argument indicates whether the
-function should allocate blocks if needed.
+An address space operation named get_xip_mem is used to retrieve references
+to a page frame number and a kernel address. To obtain these values a reference
+to an address_space is provided. This function assigns values to the kmem and
+pfn parameters. The third argument indicates whether the function should allocate
+blocks if needed.
 
 This address space operation is mutually exclusive with readpage&writepage that
 do page cache read/write operations.
diff --git a/Documentation/hwmon/adt7462 b/Documentation/hwmon/adt7462
new file mode 100644 (file)
index 0000000..ec660b3
--- /dev/null
@@ -0,0 +1,67 @@
+Kernel driver adt7462
+======================
+
+Supported chips:
+  * Analog Devices ADT7462
+    Prefix: 'adt7462'
+    Addresses scanned: I2C 0x58, 0x5C
+    Datasheet: Publicly available at the Analog Devices website
+
+Author: Darrick J. Wong
+
+Description
+-----------
+
+This driver implements support for the Analog Devices ADT7462 chip family.
+
+This chip is a bit of a beast.  It has 8 counters for measuring fan speed.  It
+can also measure 13 voltages or 4 temperatures, or various combinations of the
+two.  See the chip documentation for more details about the exact set of
+configurations.  This driver does not allow one to configure the chip; that is
+left to the system designer.
+
+A sophisticated control system for the PWM outputs is designed into the ADT7462
+that allows fan speed to be adjusted automatically based on any of the three
+temperature sensors. Each PWM output is individually adjustable and
+programmable. Once configured, the ADT7462 will adjust the PWM outputs in
+response to the measured temperatures without further host intervention.  This
+feature can also be disabled for manual control of the PWM's.
+
+Each of the measured inputs (voltage, temperature, fan speed) has
+corresponding high/low limit values. The ADT7462 will signal an ALARM if
+any measured value exceeds either limit.
+
+The ADT7462 samples all inputs continuously. The driver will not read
+the registers more often than once every other second. Further,
+configuration data is only read once per minute.
+
+Special Features
+----------------
+
+The ADT7462 have a 10-bit ADC and can therefore measure temperatures
+with 0.25 degC resolution.
+
+The Analog Devices datasheet is very detailed and describes a procedure for
+determining an optimal configuration for the automatic PWM control.
+
+The driver will report sensor labels when it is able to determine that
+information from the configuration registers.
+
+Configuration Notes
+-------------------
+
+Besides standard interfaces driver adds the following:
+
+* PWM Control
+
+* pwm#_auto_point1_pwm and temp#_auto_point1_temp and
+* pwm#_auto_point2_pwm and temp#_auto_point2_temp -
+
+point1: Set the pwm speed at a lower temperature bound.
+point2: Set the pwm speed at a higher temperature bound.
+
+The ADT7462 will scale the pwm between the lower and higher pwm speed when
+the temperature is between the two temperature boundaries.  PWM values range
+from 0 (off) to 255 (full speed).  Fan speed will be set to maximum when the
+temperature sensor associated with the PWM control exceeds temp#_max.
+
diff --git a/Documentation/hwmon/lis3lv02d b/Documentation/hwmon/lis3lv02d
new file mode 100644 (file)
index 0000000..65dfb0c
--- /dev/null
@@ -0,0 +1,49 @@
+Kernel driver lis3lv02d
+==================
+
+Supported chips:
+
+  * STMicroelectronics LIS3LV02DL and LIS3LV02DQ
+
+Author:
+        Yan Burman <burman.yan@gmail.com>
+       Eric Piel <eric.piel@tremplin-utc.net>
+
+
+Description
+-----------
+
+This driver provides support for the accelerometer found in various HP laptops
+sporting the feature officially called "HP Mobile Data Protection System 3D" or
+"HP 3D DriveGuard". It detect automatically laptops with this sensor. Known models
+(for now the HP 2133, nc6420, nc2510, nc8510, nc84x0, nw9440 and nx9420) will
+have their axis automatically oriented on standard way (eg: you can directly
+play neverball).  The accelerometer data is readable via
+/sys/devices/platform/lis3lv02d.
+
+Sysfs attributes under /sys/devices/platform/lis3lv02d/:
+position - 3D position that the accelerometer reports. Format: "(x,y,z)"
+calibrate - read: values (x, y, z) that are used as the base for input class device operation.
+            write: forces the base to be recalibrated with the current position.
+rate - reports the sampling rate of the accelerometer device in HZ
+
+This driver also provides an absolute input class device, allowing
+the laptop to act as a pinball machine-esque joystick.
+
+Axes orientation
+----------------
+
+For better compatibility between the various laptops. The values reported by
+the accelerometer are converted into a "standard" organisation of the axes
+(aka "can play neverball out of the box"):
+ * When the laptop is horizontal the position reported is about 0 for X and Y
+and a positive value for Z
+ * If the left side is elevated, X increases (becomes positive)
+ * If the front side (where the touchpad is) is elevated, Y decreases (becomes negative)
+ * If the laptop is put upside-down, Z becomes negative
+
+If your laptop model is not recognized (cf "dmesg"), you can send an email to the
+authors to add it to the database.  When reporting a new laptop, please include
+the output of "dmidecode" plus the value of /sys/devices/platform/lis3lv02d/position
+in these four cases.
+
diff --git a/Documentation/ics932s401 b/Documentation/ics932s401
new file mode 100644 (file)
index 0000000..07a739f
--- /dev/null
@@ -0,0 +1,31 @@
+Kernel driver ics932s401
+======================
+
+Supported chips:
+  * IDT ICS932S401
+    Prefix: 'ics932s401'
+    Addresses scanned: I2C 0x69
+    Datasheet: Publically available at the IDT website
+
+Author: Darrick J. Wong
+
+Description
+-----------
+
+This driver implements support for the IDT ICS932S401 chip family.
+
+This chip has 4 clock outputs--a base clock for the CPU (which is likely
+multiplied to get the real CPU clock), a system clock, a PCI clock, a USB
+clock, and a reference clock.  The driver reports selected and actual
+frequency.  If spread spectrum mode is enabled, the driver also reports by what
+percent the clock signal is being spread, which should be between 0 and -0.5%.
+All frequencies are reported in KHz.
+
+The ICS932S401 monitors all inputs continuously. The driver will not read
+the registers more often than once every other second.
+
+Special Features
+----------------
+
+The clocks could be reprogrammed to increase system speed.  I will not help you
+do this, as you risk damaging your system!
index 81905e81585e2de04f9b80a658fb087013acd147..7f8b9d97bc47d32359150822eaa16b23acfc13be 100644 (file)
@@ -20,10 +20,11 @@ pressed or released a BUTTON_IRQ happens. The driver could look like:
 
 static struct input_dev *button_dev;
 
-static void button_interrupt(int irq, void *dummy, struct pt_regs *fp)
+static irqreturn_t button_interrupt(int irq, void *dummy)
 {
        input_report_key(button_dev, BTN_0, inb(BUTTON_PORT) & 1);
        input_sync(button_dev);
+       return IRQ_HANDLED;
 }
 
 static int __init button_init(void)
diff --git a/Documentation/ioctl/00-INDEX b/Documentation/ioctl/00-INDEX
new file mode 100644 (file)
index 0000000..d2fe4d4
--- /dev/null
@@ -0,0 +1,10 @@
+00-INDEX
+       - this file
+cdrom.txt
+       - summary of CDROM ioctl calls
+hdio.txt
+       - summary of HDIO_ ioctl calls
+ioctl-decoding.txt
+       - how to decode the bits of an IOCTL code
+ioctl-number.txt
+       - how to implement and register device/driver ioctl calls
index c86c074597129a5b4434b0e35c432a0a28636b11..d5418d52891027c6ef25277b253b98965be94451 100644 (file)
@@ -198,59 +198,42 @@ and is between 256 and 4096 characters. It is defined in the file
                        that require a timer override, but don't have
                        HPET
 
-       acpi.debug_layer=       [HW,ACPI]
+       acpi_backlight= [HW,ACPI]
+                       acpi_backlight=vendor
+                       acpi_backlight=video
+                       If set to vendor, prefer vendor specific driver
+                       (e.g. thinkpad_acpi, sony_acpi, etc.) instead
+                       of the ACPI video.ko driver.
+
+       acpi_display_output=    [HW,ACPI]
+                       acpi_display_output=vendor
+                       acpi_display_output=video
+                       See above.
+
+       acpi.debug_layer=       [HW,ACPI,ACPI_DEBUG]
+       acpi.debug_level=       [HW,ACPI,ACPI_DEBUG]
                        Format: <int>
-                       Each bit of the <int> indicates an ACPI debug layer,
-                       1: enable, 0: disable. It is useful for boot time
-                       debugging. After system has booted up, it can be set
-                       via /sys/module/acpi/parameters/debug_layer.
-                       CONFIG_ACPI_DEBUG must be enabled for this to produce any output.
-                       Available bits (add the numbers together) to enable debug output
-                       for specific parts of the ACPI subsystem:
-                       0x01 utilities 0x02 hardware 0x04 events 0x08 tables
-                       0x10 namespace 0x20 parser 0x40 dispatcher
-                       0x80 executer 0x100 resources 0x200 acpica debugger
-                       0x400 os services 0x800 acpica disassembler.
-                       The number can be in decimal or prefixed with 0x in hex.
-                       Warning: Many of these options can produce a lot of
-                       output and make your system unusable. Be very careful.
-
-       acpi.debug_level=       [HW,ACPI]
-                       Format: <int>
-                       Each bit of the <int> indicates an ACPI debug level,
-                       which corresponds to the level in an ACPI_DEBUG_PRINT
-                       statement.  After system has booted up, this mask
-                       can be set via /sys/module/acpi/parameters/debug_level.
-
-                       CONFIG_ACPI_DEBUG must be enabled for this to produce
-                       any output.  The number can be in decimal or prefixed
-                       with 0x in hex.  Some of these options produce so much
-                       output that the system is unusable.
-
-                       The following global components are defined by the
-                       ACPI CA:
-                              0x01 error
-                              0x02 warn
-                              0x04 init
-                              0x08 debug object
-                              0x10 info
-                              0x20 init names
-                              0x40 parse
-                              0x80 load
-                             0x100 dispatch
-                             0x200 execute
-                             0x400 names
-                             0x800 operation region
-                            0x1000 bfield
-                            0x2000 tables
-                            0x4000 values
-                            0x8000 objects
-                           0x10000 resources
-                           0x20000 user requests
-                           0x40000 package
-                       The number can be in decimal or prefixed with 0x in hex.
-                       Warning: Many of these options can produce a lot of
-                       output and make your system unusable. Be very careful.
+                       CONFIG_ACPI_DEBUG must be enabled to produce any ACPI
+                       debug output.  Bits in debug_layer correspond to a
+                       _COMPONENT in an ACPI source file, e.g.,
+                           #define _COMPONENT ACPI_PCI_COMPONENT
+                       Bits in debug_level correspond to a level in
+                       ACPI_DEBUG_PRINT statements, e.g.,
+                           ACPI_DEBUG_PRINT((ACPI_DB_INFO, ...
+                       See Documentation/acpi/debug.txt for more information
+                       about debug layers and levels.
+
+                       Enable AML "Debug" output, i.e., stores to the Debug
+                       object while interpreting AML:
+                           acpi.debug_layer=0xffffffff acpi.debug_level=0x2
+                       Enable PCI/PCI interrupt routing info messages:
+                           acpi.debug_layer=0x400000 acpi.debug_level=0x4
+                       Enable all messages related to ACPI hardware:
+                           acpi.debug_layer=0x2 acpi.debug_level=0xffffffff
+
+                       Some values produce so much output that the system is
+                       unusable.  The "log_buf_len" parameter may be useful
+                       if you need to capture more output.
 
        acpi.power_nocheck=     [HW,ACPI]
                        Format: 1/0 enable/disable the check of power state.
@@ -311,7 +294,9 @@ and is between 256 and 4096 characters. It is defined in the file
                        Possible values are:
                        isolate - enable device isolation (each device, as far
                                  as possible, will get its own protection
-                                 domain)
+                                 domain) [default]
+                       share - put every device behind one IOMMU into the
+                               same protection domain
                        fullflush - enable flushing of IO/TLB entries when
                                    they are unmapped. Otherwise they are
                                    flushed before they will be reused, which
@@ -646,7 +631,7 @@ and is between 256 and 4096 characters. It is defined in the file
 
        digiepca=       [HW,SERIAL]
                        See drivers/char/README.epca and
-                       Documentation/digiepca.txt.
+                       Documentation/serial/digiepca.txt.
 
        disable_mtrr_cleanup [X86]
        enable_mtrr_cleanup [X86]
@@ -757,7 +742,7 @@ and is between 256 and 4096 characters. It is defined in the file
                        See header of drivers/scsi/fdomain.c.
 
        floppy=         [HW]
-                       See Documentation/floppy.txt.
+                       See Documentation/blockdev/floppy.txt.
 
        force_pal_cache_flush
                        [IA-64] Avoid check_sal_cache_flush which may hang on
@@ -1118,7 +1103,7 @@ and is between 256 and 4096 characters. It is defined in the file
                        the same attribute, the last one is used.
 
        load_ramdisk=   [RAM] List of ramdisks to load from floppy
-                       See Documentation/ramdisk.txt.
+                       See Documentation/blockdev/ramdisk.txt.
 
        lockd.nlm_grace_period=P  [NFS] Assign grace period.
                        Format: <integer>
@@ -1210,8 +1195,8 @@ and is between 256 and 4096 characters. It is defined in the file
                        it is equivalent to "nosmp", which also disables
                        the IO APIC.
 
-       max_addr=[KMG]  [KNL,BOOT,ia64] All physical memory greater than or
-                       equal to this physical address is ignored.
+       max_addr=nn[KMG]        [KNL,BOOT,ia64] All physical memory greater than
+                       or equal to this physical address is ignored.
 
        max_luns=       [SCSI] Maximum number of LUNs to probe.
                        Should be between 1 and 2^32-1.
@@ -1311,6 +1296,9 @@ and is between 256 and 4096 characters. It is defined in the file
 
        mga=            [HW,DRM]
 
+       min_addr=nn[KMG]        [KNL,BOOT,ia64] All physical memory below this
+                       physical address is ignored.
+
        mminit_loglevel=
                        [KNL] When CONFIG_DEBUG_MEMORY_INIT is set, this
                        parameter allows control of the logging verbosity for
@@ -1405,7 +1393,20 @@ and is between 256 and 4096 characters. It is defined in the file
                        when a NMI is triggered.
                        Format: [state][,regs][,debounce][,die]
 
-       nmi_watchdog=   [KNL,BUGS=X86-32] Debugging features for SMP kernels
+       nmi_watchdog=   [KNL,BUGS=X86-32,X86-64] Debugging features for SMP kernels
+                       Format: [panic,][num]
+                       Valid num: 0,1,2
+                       0 - turn nmi_watchdog off
+                       1 - use the IO-APIC timer for the NMI watchdog
+                       2 - use the local APIC for the NMI watchdog using
+                       a performance counter. Note: This will use one performance
+                       counter and the local APIC's performance vector.
+                       When panic is specified panic when an NMI watchdog timeout occurs.
+                       This is useful when you use a panic=... timeout and need the box
+                       quickly up again.
+                       Instead of 1 and 2 it is possible to use the following
+                       symbolic names: lapic and ioapic
+                       Example: nmi_watchdog=2 or nmi_watchdog=panic,lapic
 
        no387           [BUGS=X86-32] Tells the kernel to use the 387 maths
                        emulation library even if a 387 maths coprocessor
@@ -1613,7 +1614,7 @@ and is between 256 and 4096 characters. It is defined in the file
 
        pcd.            [PARIDE]
                        See header of drivers/block/paride/pcd.c.
-                       See also Documentation/paride.txt.
+                       See also Documentation/blockdev/paride.txt.
 
        pci=option[,option...]  [PCI] various PCI subsystem options:
                off             [X86] don't probe for the PCI bus
@@ -1638,6 +1639,17 @@ and is between 256 and 4096 characters. It is defined in the file
                nomsi           [MSI] If the PCI_MSI kernel config parameter is
                                enabled, this kernel boot option can be used to
                                disable the use of MSI interrupts system-wide.
+               noioapicquirk   [APIC] Disable all boot interrupt quirks.
+                               Safety option to keep boot IRQs enabled. This
+                               should never be necessary.
+               ioapicreroute   [APIC] Enable rerouting of boot IRQs to the
+                               primary IO-APIC for bridges that cannot disable
+                               boot IRQs. This fixes a source of spurious IRQs
+                               when the system masks IRQs.
+               noioapicreroute [APIC] Disable workaround that uses the
+                               boot IRQ equivalent of an IRQ that connects to
+                               a chipset where boot IRQs cannot be disabled.
+                               The opposite of ioapicreroute.
                biosirq         [X86-32] Use PCI BIOS calls to get the interrupt
                                routing table. These calls are known to be buggy
                                on several machines and they hang the machine
@@ -1714,7 +1726,7 @@ and is between 256 and 4096 characters. It is defined in the file
        pcmv=           [HW,PCMCIA] BadgePAD 4
 
        pd.             [PARIDE]
-                       See Documentation/paride.txt.
+                       See Documentation/blockdev/paride.txt.
 
        pdcchassis=     [PARISC,HW] Disable/Enable PDC Chassis Status codes at
                        boot time.
@@ -1722,10 +1734,10 @@ and is between 256 and 4096 characters. It is defined in the file
                        See arch/parisc/kernel/pdc_chassis.c
 
        pf.             [PARIDE]
-                       See Documentation/paride.txt.
+                       See Documentation/blockdev/paride.txt.
 
        pg.             [PARIDE]
-                       See Documentation/paride.txt.
+                       See Documentation/blockdev/paride.txt.
 
        pirq=           [SMP,APIC] Manual mp-table setup
                        See Documentation/x86/i386/IO-APIC.txt.
@@ -1795,7 +1807,7 @@ and is between 256 and 4096 characters. It is defined in the file
 
        prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk
                        before loading.
-                       See Documentation/ramdisk.txt.
+                       See Documentation/blockdev/ramdisk.txt.
 
        psmouse.proto=  [HW,MOUSE] Highest PS2 mouse protocol extension to
                        probe for; one of (bare|imps|exps|lifebook|any).
@@ -1815,7 +1827,7 @@ and is between 256 and 4096 characters. It is defined in the file
                        <io>,<mss_io>,<mss_irq>,<mss_dma>,<mpu_io>,<mpu_irq>
 
        pt.             [PARIDE]
-                       See Documentation/paride.txt.
+                       See Documentation/blockdev/paride.txt.
 
        pty.legacy_count=
                        [KNL] Number of legacy pty's. Overwrites compiled-in
@@ -1829,10 +1841,10 @@ and is between 256 and 4096 characters. It is defined in the file
                        See Documentation/md.txt.
 
        ramdisk_blocksize=      [RAM]
-                       See Documentation/ramdisk.txt.
+                       See Documentation/blockdev/ramdisk.txt.
 
        ramdisk_size=   [RAM] Sizes of RAM disks in kilobytes
-                       See Documentation/ramdisk.txt.
+                       See Documentation/blockdev/ramdisk.txt.
 
        rcupdate.blimit=        [KNL,BOOT]
                        Set maximum number of finished RCU callbacks to process
@@ -2164,7 +2176,7 @@ and is between 256 and 4096 characters. It is defined in the file
                        See Documentation/sonypi.txt
 
        specialix=      [HW,SERIAL] Specialix multi-serial port adapter
-                       See Documentation/specialix.txt.
+                       See Documentation/serial/specialix.txt.
 
        spia_io_base=   [HW,MTD]
        spia_fio_base=
@@ -2267,6 +2279,13 @@ and is between 256 and 4096 characters. It is defined in the file
                        Format:
                        <io>,<irq>,<dma>,<dma2>,<sb_io>,<sb_irq>,<sb_dma>,<mpu_io>,<mpu_irq>
 
+       tsc=            Disable clocksource-must-verify flag for TSC.
+                       Format: <string>
+                       [x86] reliable: mark tsc clocksource as reliable, this
+                       disables clocksource verification at runtime.
+                       Used to enable high-resolution timer mode on older
+                       hardware, and in virtualized environment.
+
        turbografx.map[2|3]=    [HW,JOY]
                        TurboGraFX parallel port interface
                        Format:
index f4f8b1c6c8ba45ba6ec351aa92c40e798024983c..23045b8b50f090ff806624c763fb2313c1ad9494 100644 (file)
@@ -149,7 +149,7 @@ static void do_test_timer(unsigned long data)
        int cpu;
 
        /* Increment the counters */
-       on_each_cpu(test_each, NULL, 0, 1);
+       on_each_cpu(test_each, NULL, 1);
        /* Read all the counters */
        printk("Counters read from CPU %d\n", smp_processor_id());
        for_each_online_cpu(cpu) {
index 8df6a7b0e66cdfd3b1de96ed038a062b71be8008..88bb71b46da4217b8704bf10b8ccae68d1ad832d 100644 (file)
@@ -96,7 +96,7 @@ Letting the PHY Abstraction Layer do Everything
    static void adjust_link(struct net_device *dev);
  
  Next, you need to know the device name of the PHY connected to this device. 
- The name will look something like, "phy0:0", where the first number is the
+ The name will look something like, "0:00", where the first number is the
  bus id, and the second is the PHY's address on that bus.  Typically,
  the bus is responsible for making its ID unique.
  
index 90aa4531cb67343b03b396610aa0db77c1d1e0ba..bf9f80a982829ae06062e9cc118762335936ad4a 100644 (file)
@@ -69,6 +69,11 @@ to the overall system performance.
 On x86 nmi_watchdog is disabled by default so you have to enable it with
 a boot time parameter.
 
+It's possible to disable the NMI watchdog in run-time by writing "0" to
+/proc/sys/kernel/nmi_watchdog. Writing "1" to the same file will re-enable
+the NMI watchdog. Notice that you still need to use "nmi_watchdog=" parameter
+at boot time.
+
 NOTE: In kernels prior to 2.4.2-ac18 the NMI-oopser is enabled unconditionally
 on x86 SMP boxes.
 
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt
new file mode 100644 (file)
index 0000000..1b5a5dd
--- /dev/null
@@ -0,0 +1,35 @@
+If variable is of Type,                use printk format specifier:
+---------------------------------------------------------
+               int                     %d or %x
+               unsigned int            %u or %x
+               long                    %ld or %lx
+               unsigned long           %lu or %lx
+               long long               %lld or %llx
+               unsigned long long      %llu or %llx
+               size_t                  %zu or %zx
+               ssize_t                 %zd or %zx
+
+Raw pointer value SHOULD be printed with %p.
+
+u64 SHOULD be printed with %llu/%llx, (unsigned long long):
+
+       printk("%llu", (unsigned long long)u64_var);
+
+s64 SHOULD be printed with %lld/%llx, (long long):
+
+       printk("%lld", (long long)s64_var);
+
+If <type> is dependent on a config option for its size (e.g., sector_t,
+blkcnt_t, phys_addr_t, resource_size_t) or is architecture-dependent
+for its size (e.g., tcflag_t), use a format specifier of its largest
+possible type and explicitly cast to it.  Example:
+
+       printk("test: sector number/total blocks: %llu/%llu\n",
+               (unsigned long long)sector, (unsigned long long)blockcount);
+
+Reminder: sizeof() result is of type size_t.
+
+Thank you for your cooperation and attention.
+
+
+By Randy Dunlap <rdunlap@xenotime.net>
diff --git a/Documentation/serial/00-INDEX b/Documentation/serial/00-INDEX
new file mode 100644 (file)
index 0000000..07dcdb0
--- /dev/null
@@ -0,0 +1,24 @@
+00-INDEX
+       - this file.
+README.cycladesZ
+       - info on Cyclades-Z firmware loading.
+computone.txt
+       - info on Computone Intelliport II/Plus Multiport Serial Driver.
+digiepca.txt
+       - info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards.
+hayes-esp.txt
+       - info on using the Hayes ESP serial driver.
+moxa-smartio
+       - file with info on installing/using Moxa multiport serial driver.
+riscom8.txt
+       - notes on using the RISCom/8 multi-port serial driver.
+rocket.txt
+       - info on the Comtrol RocketPort multiport serial driver.
+specialix.txt
+       - info on hardware/driver for specialix IO8+ multiport serial card.
+stallion.txt
+       - info on using the Stallion multiport serial driver.
+sx.txt
+       - info on the Specialix SX/SI multiport serial driver.
+tty.txt
+       - guide to the locking policies of the tty layer.
similarity index 99%
rename from Documentation/computone.txt
rename to Documentation/serial/computone.txt
index 5e2a0c76bfa0b61a697772496a281ed42b6f13c4..c57ea4781e5d7426631eaf308b145fb05b921eef 100644 (file)
@@ -247,7 +247,7 @@ shar archive to make it easier to extract the script from the documentation.
 To create the ip2mkdev shell script change to a convenient directory (/tmp
 works just fine) and run the following command:
 
-       unshar Documentation/computone.txt
+       unshar Documentation/serial/computone.txt
                (This file)
 
 You should now have a file ip2mkdev in your current working directory with
index e0e54a27fc10905a62bd649605ad2dbe8f8bfdbf..394d7d378dc74daf6899621d2bca0c37cdd598cf 100644 (file)
@@ -1063,6 +1063,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
 
        STAC9227/9228/9229/927x
          ref           Reference board
+         ref-no-jd     Reference board without HP/Mic jack detection
          3stack        D965 3stack
          5stack        D965 5stack + SPDIF
          dell-3stack   Dell Dimension E520
@@ -1072,10 +1073,14 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
          ref           Reference board
          dell-m4-1     Dell desktops
          dell-m4-2     Dell desktops
+         dell-m4-3     Dell desktops
 
        STAC92HD73*
          ref           Reference board
-         dell-m6       Dell desktops
+         no-jd         BIOS setup but without jack-detection
+         dell-m6-amic  Dell desktops/laptops with analog mics
+         dell-m6-dmic  Dell desktops/laptops with digital mics
+         dell-m6       Dell desktops/laptops with both type of mics
 
        STAC9872
          vaio          Setup for VAIO FE550G/SZ110
index 8bae2f018d342cf6f027ec5a2dc3ace9ad709bb8..0f5122eb282bad1616b4bff089af95ac35e33a1f 100644 (file)
@@ -215,7 +215,7 @@ So for example arch/.../mach-*/board-*.c files might have code like:
        /* if your mach-* infrastructure doesn't support kernels that can
         * run on multiple boards, pdata wouldn't benefit from "__init".
         */
-       static struct mysoc_spi_data __init pdata = { ... };
+       static struct mysoc_spi_data __initdata pdata = { ... };
 
        static __init board_init(void)
        {
index 5bbbe2096223f69bc1f0d7007f6d07a3385e4fd4..cde23b4a12a19a9306464ec1296cb4fee19eb9c0 100644 (file)
@@ -37,7 +37,7 @@ $ echo mmiotrace > /debug/tracing/current_tracer
 $ cat /debug/tracing/trace_pipe > mydump.txt &
 Start X or whatever.
 $ echo "X is up" > /debug/tracing/trace_marker
-$ echo none > /debug/tracing/current_tracer
+$ echo nop > /debug/tracing/current_tracer
 Check for lost events.
 
 
@@ -66,7 +66,7 @@ which action. It is recommended to place descriptive markers about what you
 do.
 
 Shut down mmiotrace (requires root privileges):
-$ echo none > /debug/tracing/current_tracer
+$ echo nop > /debug/tracing/current_tracer
 The 'cat' process exits. If it does not, kill it by issuing 'fg' command and
 pressing ctrl+c.
 
@@ -81,7 +81,9 @@ are:
 $ cat /debug/tracing/trace_entries
 gives you a number. Approximately double this number and write it back, for
 instance:
+$ echo 0 > /debug/tracing/tracing_enabled
 $ echo 128000 > /debug/tracing/trace_entries
+$ echo 1 > /debug/tracing/tracing_enabled
 Then start again from the top.
 
 If you are doing a trace for a driver project, e.g. Nouveau, you should also
index 9b22bd14c3481789ac126c34842002ef7093a72a..eac7df94d8e3b7a9367e47f0c74e690502969be7 100644 (file)
@@ -114,11 +114,11 @@ modules.
 Then you must load the gadget serial driver.  To load it as an
 ACM device (recommended for interoperability), do this:
 
-  modprobe g_serial use_acm=1
+  modprobe g_serial
 
 To load it as a vendor specific bulk in/out device, do this:
 
-  modprobe g_serial
+  modprobe g_serial use_acm=0
 
 This will also automatically load the underlying gadget peripheral
 controller driver.  This must be done each time you reboot the gadget
index 077e9032d0cda17b08be1e8f85b496f37cef6b85..fafcd47232600a1a80351fcd5dfc79492e6ce8e9 100644 (file)
@@ -49,8 +49,10 @@ it and 002/048 sometime later.
 
 These files can be read as binary data.  The binary data consists
 of first the device descriptor, then the descriptors for each
-configuration of the device.  That information is also shown in
-text form by the /proc/bus/usb/devices file, described later.
+configuration of the device.  Multi-byte fields in the device and
+configuration descriptors, but not other descriptors, are converted
+to host endianness by the kernel.  This information is also shown
+in text form by the /proc/bus/usb/devices file, described later.
 
 These files may also be used to write user-level drivers for the USB
 devices.  You would open the /proc/bus/usb/BBB/DDD file read/write,
index 2917ce4ffdc4f5df267bdc9b5f239a9679c2e6d4..270481906dc80d1b25a0c29f607ef55e83ae16be 100644 (file)
@@ -34,11 +34,12 @@ if usbmon is built into the kernel.
 Verify that bus sockets are present.
 
 # ls /sys/kernel/debug/usbmon
-0s  0t  0u  1s  1t  1u  2s  2t  2u  3s  3t  3u  4s  4t  4u
+0s  0u  1s  1t  1u  2s  2t  2u  3s  3t  3u  4s  4t  4u
 #
 
-Now you can choose to either use the sockets numbered '0' (to capture packets on
-all buses), and skip to step #3, or find the bus used by your device with step #2.
+Now you can choose to either use the socket '0u' (to capture packets on all
+buses), and skip to step #3, or find the bus used by your device with step #2.
+This allows to filter away annoying devices that talk continuously.
 
 2. Find which bus connects to the desired device
 
@@ -99,8 +100,9 @@ on the event type, but there is a set of words, common for all types.
 
 Here is the list of words, from left to right:
 
-- URB Tag. This is used to identify URBs is normally a kernel mode address
- of the URB structure in hexadecimal.
+- URB Tag. This is used to identify URBs, and is normally an in-kernel address
+  of the URB structure in hexadecimal, but can be a sequence number or any
+  other unique string, within reason.
 
 - Timestamp in microseconds, a decimal number. The timestamp's resolution
   depends on available clock, and so it can be much worse than a microsecond
diff --git a/Documentation/w1/masters/omap-hdq b/Documentation/w1/masters/omap-hdq
new file mode 100644 (file)
index 0000000..ca722e0
--- /dev/null
@@ -0,0 +1,46 @@
+Kernel driver for omap HDQ/1-wire module.
+========================================
+
+Supported chips:
+================
+       HDQ/1-wire controller on the TI OMAP 2430/3430 platforms.
+
+A useful link about HDQ basics:
+===============================
+http://focus.ti.com/lit/an/slua408/slua408.pdf
+
+Description:
+============
+The HDQ/1-Wire module of TI OMAP2430/3430 platforms implement the hardware
+protocol of the master functions of the Benchmark HDQ and the Dallas
+Semiconductor 1-Wire protocols. These protocols use a single wire for
+communication between the master (HDQ/1-Wire controller) and the slave
+(HDQ/1-Wire external compliant device).
+
+A typical application of the HDQ/1-Wire module is the communication with battery
+monitor (gas gauge) integrated circuits.
+
+The controller supports operation in both HDQ and 1-wire mode. The essential
+difference between the HDQ and 1-wire mode is how the slave device responds to
+initialization pulse.In HDQ mode, the firmware does not require the host to
+create an initialization pulse to the slave.However, the slave can be reset by
+using an initialization pulse (also referred to as a break pulse).The slave
+does not respond with a presence pulse as it does in the 1-Wire protocol.
+
+Remarks:
+========
+The driver (drivers/w1/masters/omap_hdq.c) supports the HDQ mode of the
+controller. In this mode, as we can not read the ID which obeys the W1
+spec(family:id:crc), a module parameter can be passed to the driver which will
+be used to calculate the CRC and pass back an appropriate slave ID to the W1
+core.
+
+By default the master driver and the BQ slave i/f
+driver(drivers/w1/slaves/w1_bq27000.c) sets the ID to 1.
+Please note to load both the modules with a different ID if required, but note
+that the ID used should be same for both master and slave driver loading.
+
+e.g:
+insmod omap_hdq.ko W1_ID=2
+inamod w1_bq27000.ko F_ID=2
+
index 83c0033ee9e01d26866494b58115a1da9b2c429a..fcdc62b3c3d8d8d1b826c04ce70a3bf9ea0b2a9b 100644 (file)
@@ -349,7 +349,7 @@ Protocol:   2.00+
        3  SYSLINUX
        4  EtherBoot
        5  ELILO
-       7  GRuB
+       7  GRUB
        8  U-BOOT
        9  Xen
        A  Gujin
@@ -537,8 +537,8 @@ Type:               read
 Offset/size:   0x248/4
 Protocol:      2.08+
 
-  If non-zero then this field contains the offset from the end of the
-  real-mode code to the payload.
+  If non-zero then this field contains the offset from the beginning
+  of the protected-mode code to the payload.
 
   The payload may be compressed. The format of both the compressed and
   uncompressed data should be determined using the standard magic
index c93ff5f4c0ddc0e979daa1ad0e950c8c1c6e31c1..cf08c9fff3cdaa62b2217f8e4526d9a7cc88fbec 100644 (file)
@@ -80,6 +80,30 @@ pci proc               |    --    |    --      |       WC         |
                        |          |            |                  |
 -------------------------------------------------------------------
 
+Advanced APIs for drivers
+-------------------------
+A. Exporting pages to users with remap_pfn_range, io_remap_pfn_range,
+vm_insert_pfn
+
+Drivers wanting to export some pages to userspace do it by using mmap
+interface and a combination of
+1) pgprot_noncached()
+2) io_remap_pfn_range() or remap_pfn_range() or vm_insert_pfn()
+
+With PAT support, a new API pgprot_writecombine is being added. So, drivers can
+continue to use the above sequence, with either pgprot_noncached() or
+pgprot_writecombine() in step 1, followed by step 2.
+
+In addition, step 2 internally tracks the region as UC or WC in memtype
+list in order to ensure no conflicting mapping.
+
+Note that this set of APIs only works with IO (non RAM) regions. If driver
+wants to export a RAM region, it has to do set_memory_uc() or set_memory_wc()
+as step 0 above and also track the usage of those pages and use set_memory_wb()
+before the page is freed to free pool.
+
+
+
 Notes:
 
 -- in the above table mean "Not suggested usage for the API". Some of the --'s
index f6d561a1a9b2d3d022baf17bb05138485fb32130..34c13040a718f6febbccadc1f32bc24f4a060664 100644 (file)
@@ -79,17 +79,6 @@ Timing
   Report when timer interrupts are lost because some code turned off
   interrupts for too long.
 
-  nmi_watchdog=NUMBER[,panic]
-  NUMBER can be:
-  0 don't use an NMI watchdog
-  1 use the IO-APIC timer for the NMI watchdog
-  2 use the local APIC for the NMI watchdog using a performance counter. Note
-  This will use one performance counter and the local APIC's performance
-  vector.
-  When panic is specified panic when an NMI watchdog timeout occurs.
-  This is useful when you use a panic=... timeout and need the box
-  quickly up again.
-
   nohpet
   Don't use the HPET timer.
 
index efce7509736911434e299d0fe63e344c70d7b1e3..29b52b14d0b43950fa79f3948b1fbe4789396fbf 100644 (file)
@@ -6,7 +6,7 @@ Virtual memory map with 4 level page tables:
 0000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm
 hole caused by [48:63] sign extension
 ffff800000000000 - ffff80ffffffffff (=40 bits) guard hole
-ffff810000000000 - ffffc0ffffffffff (=46 bits) direct mapping of all phys. memory
+ffff880000000000 - ffffc0ffffffffff (=57 TB) direct mapping of all phys. memory
 ffffc10000000000 - ffffc1ffffffffff (=40 bits) hole
 ffffc20000000000 - ffffe1ffffffffff (=45 bits) vmalloc/ioremap space
 ffffe20000000000 - ffffe2ffffffffff (=40 bits) virtual memory map (1TB)
index 53e78c83cc7a83e8ac7cf126a7edf6883c819315..c42a567e010c7db73ef761370179e346867aaf3e 100644 (file)
@@ -779,6 +779,7 @@ ATM
 P:     Chas Williams
 M:     chas@cmf.nrl.navy.mil
 L:     linux-atm-general@lists.sourceforge.net (subscribers-only)
+L:     netdev@vger.kernel.org
 W:     http://linux-atm.sourceforge.net
 S:     Maintained
 
@@ -1526,10 +1527,10 @@ W:      http://ebtables.sourceforge.net/
 S:     Maintained
 
 ECRYPT FILE SYSTEM
-P:     Mike Halcrow, Phillip Hellewell
-M:     mhalcrow@us.ibm.com, phillip@hellewell.homeip.net
-L:     ecryptfs-devel@lists.sourceforge.net
-W:     http://ecryptfs.sourceforge.net/
+P:     Tyler Hicks, Dustin Kirkland
+M:     tyhicks@linux.vnet.ibm.com, kirkland@canonical.com
+L:     ecryptfs-devel@lists.launchpad.net
+W:     https://launchpad.net/ecryptfs
 S:     Supported
 
 EDAC-CORE
@@ -1809,7 +1810,7 @@ S:        Maintained
 
 FTRACE
 P:     Steven Rostedt
-M:     srostedt@redhat.com
+M:     rostedt@goodmis.org
 S:     Maintained
 
 FUJITSU FR-V (FRV) PORT
@@ -2190,9 +2191,9 @@ S:        Supported
 
 INOTIFY
 P:     John McCutchan
-M:     ttb@tentacle.dhs.org
+M:     john@johnmccutchan.com
 P:     Robert Love
-M:     rml@novell.com
+M:     rlove@rlove.org
 L:     linux-kernel@vger.kernel.org
 S:     Maintained
 
@@ -2216,6 +2217,13 @@ M:       adaplas@gmail.com
 L:     linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers)
 S:     Maintained
 
+INTEL MENLOW THERMAL DRIVER
+P:     Sujith Thomas
+M:     sujith.thomas@intel.com
+L:     linux-acpi@vger.kernel.org
+W:     http://www.lesswatts.org/projects/acpi/
+S:     Supported
+
 INTEL IA32 MICROCODE UPDATE SUPPORT
 P:     Tigran Aivazian
 M:     tigran@aivazian.fsnet.co.uk
@@ -2696,6 +2704,11 @@ P:       Arnaldo Carvalho de Melo
 M:     acme@ghostprotocols.net
 S:     Maintained
 
+LIS3LV02D ACCELEROMETER DRIVER
+P:     Eric Piel
+M:     eric.piel@tremplin-utc.net
+S:     Maintained
+
 LM83 HARDWARE MONITOR DRIVER
 P:     Jean Delvare
 M:     khali@linux-fr.org
@@ -3377,7 +3390,9 @@ S:        Maintained
 
 PNP SUPPORT
 P:     Adam Belay
-M:     ambx1@neo.rr.com
+M:     abelay@mit.edu
+P:     Bjorn Helgaas
+M:     bjorn.helgaas@hp.com
 S:     Maintained
 
 PNXxxxx I2C DRIVER
@@ -3744,6 +3759,15 @@ M:       drzeus-sdhci@drzeus.cx
 L:     sdhci-devel@list.drzeus.cx
 S:     Maintained
 
+SECURITY SUBSYSTEM
+F:     security/
+P:     James Morris
+M:     jmorris@namei.org
+L:     linux-kernel@vger.kernel.org
+L:     linux-security-module@vger.kernel.org (suggested Cc:)
+T:     git kernel.org:pub/scm/linux/kernel/git/jmorris/security-testing-2.6.git
+S:     Supported
+
 SECURITY CONTACT
 P:     Security Officers
 M:     security@kernel.org
@@ -3914,8 +3938,6 @@ M:        bootc@bootc.net
 S:     Maintained
 
 SOFTWARE RAID (Multiple Disks) SUPPORT
-P:     Ingo Molnar
-M:     mingo@redhat.com
 P:     Neil Brown
 M:     neilb@suse.de
 L:     linux-raid@vger.kernel.org
@@ -4223,7 +4245,7 @@ M:        dedekind@infradead.org
 P:     Adrian Hunter
 M:     ext-adrian.hunter@nokia.com
 L:     linux-mtd@lists.infradead.org
-T:     git git://git.infradead.org/~dedekind/ubifs-2.6.git
+T:     git git://git.infradead.org/ubifs-2.6.git
 W:     http://www.linux-mtd.infradead.org/doc/ubifs.html
 S:     Maintained
 
@@ -4277,7 +4299,7 @@ P:        Artem Bityutskiy
 M:     dedekind@infradead.org
 W:     http://www.linux-mtd.infradead.org/
 L:     linux-mtd@lists.infradead.org
-T:     git git://git.infradead.org/~dedekind/ubi-2.6.git
+T:     git git://git.infradead.org/ubi-2.6.git
 S:     Maintained
 
 USB ACM DRIVER
index 7f9ff9bf1544049db441f9d0be0da6df628cd0d5..4c8d79710b84b9c6d58b36cd2269e3c5622765f0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 28
-EXTRAVERSION = -rc4
-NAME = Killer Bat of Doom
+EXTRAVERSION = -rc9
+NAME = Erotic Pickled Herring
 
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
index 8977d99987cb31b4b7bc5a6b4ccc2fa333b267cd..471e72dbaf8b123ce235b470303b56f2852209f0 100644 (file)
@@ -79,8 +79,6 @@ config HAVE_KRETPROBES
 #      task_pt_regs()          in asm/processor.h or asm/ptrace.h
 #      arch_has_single_step()  if there is hardware single-step support
 #      arch_has_block_step()   if there is hardware block-step support
-#      arch_ptrace()           and not #define __ARCH_SYS_PTRACE
-#      compat_arch_ptrace()    and #define __ARCH_WANT_COMPAT_SYS_PTRACE
 #      asm/syscall.h           supplying asm-generic/syscall.h interface
 #      linux/regset.h          user_regset interfaces
 #      CORE_DUMP_USE_REGSET    #define'd in linux/elf.h
index 5cf45fc5134315bdc930d1a36dad08e4dc4c6dac..ff8cb638472e54cfbcb298cefb536cdfcfa0dd03 100644 (file)
@@ -338,7 +338,7 @@ common_swizzle(struct pci_dev *dev, u8 *pinp)
        return PCI_SLOT(dev->devfn);
 }
 
-void __devinit
+void
 pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
                         struct resource *res)
 {
index e657c45d91d27c5a62f7d542ab9d36f3adcb9109..cf7da10097bb29d5f8fb69aaefc9107a3419783a 100644 (file)
@@ -121,7 +121,7 @@ wait_boot_cpu_to_stop(int cpuid)
 /*
  * Where secondaries begin a life of C.
  */
-void __init
+void __cpuinit
 smp_callin(void)
 {
        int cpuid = hard_smp_processor_id();
@@ -198,7 +198,7 @@ wait_for_txrdy (unsigned long cpumask)
  * Send a message to a secondary's console.  "START" is one such
  * interesting message.  ;-)
  */
-static void __init
+static void __cpuinit
 send_secondary_console_msg(char *str, int cpuid)
 {
        struct percpu_struct *cpu;
@@ -289,7 +289,7 @@ recv_secondary_console_msg(void)
 /*
  * Convince the console to have a secondary cpu begin execution.
  */
-static int __init
+static int __cpuinit
 secondary_cpu_start(int cpuid, struct task_struct *idle)
 {
        struct percpu_struct *cpu;
index c778779007fc58339abb11bc7f42f1299d5d65c1..cefc5a355ef9645233bfec5535e71e1d96e47e54 100644 (file)
@@ -31,7 +31,7 @@
 
 static int opDEC_fix;
 
-static void __init
+static void __cpuinit
 opDEC_check(void)
 {
        __asm__ __volatile__ (
@@ -1072,7 +1072,7 @@ give_sigbus:
        return;
 }
 
-void __init
+void __cpuinit
 trap_init(void)
 {
        /* Tell PAL-code what global pointer we want in the kernel.  */
index 47ccec95f3e867ce5141f7e0db7bdb7f2e57667d..ef12794c3c68f7f2d6be4ec3dcda643540ed091d 100644 (file)
@@ -630,7 +630,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
                return -ENOMEM;
 
        sachip->clk = clk_get(me, "SA1111_CLK");
-       if (!sachip->clk) {
+       if (IS_ERR(sachip->clk)) {
                ret = PTR_ERR(sachip->clk);
                goto err_free;
        }
index f3af0b593eb08ab5149acca798ca53acbb8b2c47..98765438048da09d663ad18c5356e961ae3bd769 100644 (file)
@@ -179,7 +179,7 @@ CONFIG_MACH_HUSKY=y
 # CONFIG_MACH_AKITA is not set
 # CONFIG_MACH_SPITZ is not set
 # CONFIG_MACH_BORZOI is not set
-CONFIG_MACH_TOSA=y
+# CONFIG_MACH_TOSA is not set
 # CONFIG_ARCH_VIPER is not set
 # CONFIG_ARCH_PXA_ESERIES is not set
 # CONFIG_TRIZEPS_PXA is not set
index 9a1db20e032a07eb744aba50c1c60a28d0a0b381..63a481fbbed43ed12ecc9802ffc729a06e8d23c6 100644 (file)
@@ -237,6 +237,7 @@ extern int _find_next_bit_be(const unsigned long *p, int size, int offset);
 #if __LINUX_ARM_ARCH__ < 5
 
 #include <asm-generic/bitops/ffz.h>
+#include <asm-generic/bitops/__fls.h>
 #include <asm-generic/bitops/__ffs.h>
 #include <asm-generic/bitops/fls.h>
 #include <asm-generic/bitops/ffs.h>
@@ -277,16 +278,19 @@ static inline int constant_fls(int x)
  * the clz instruction for much better code efficiency.
  */
 
-#define __fls(x) \
-       ( __builtin_constant_p(x) ? constant_fls(x) : \
-         ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }) )
-
-/* Implement fls() in C so that 64-bit args are suitably truncated */
 static inline int fls(int x)
 {
-       return __fls(x);
+       int ret;
+
+       if (__builtin_constant_p(x))
+              return constant_fls(x);
+
+       asm("clz\t%0, %1" : "=r" (ret) : "r" (x) : "cc");
+               ret = 32 - ret;
+       return ret;
 }
 
+#define __fls(x) (fls(x) - 1)
 #define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); })
 #define __ffs(x) (ffs(x) - 1)
 #define ffz(x) __ffs( ~(x) )
index 1cb8602dd9d5f5b0a29c56b3c8ac80c35f874e85..4ed149cbb32a401c26a6d91f062aa25151d994bf 100644 (file)
@@ -256,8 +256,17 @@ int dmabounce_sync_for_cpu(struct device *, dma_addr_t, unsigned long,
 int dmabounce_sync_for_device(struct device *, dma_addr_t, unsigned long,
                size_t, enum dma_data_direction);
 #else
-#define dmabounce_sync_for_cpu(dev,dma,off,sz,dir)     (1)
-#define dmabounce_sync_for_device(dev,dma,off,sz,dir)  (1)
+static inline int dmabounce_sync_for_cpu(struct device *d, dma_addr_t addr,
+       unsigned long offset, size_t size, enum dma_data_direction dir)
+{
+       return 1;
+}
+
+static inline int dmabounce_sync_for_device(struct device *d, dma_addr_t addr,
+       unsigned long offset, size_t size, enum dma_data_direction dir)
+{
+       return 1;
+}
 
 
 /**
index 87bff09633aac50bdcffcdc0aae2891000cda161..83e6ba338e2c4c9c13c6e05cd0aadeea5ce461fc 100644 (file)
@@ -730,7 +730,8 @@ static inline void iop_desc_set_next_desc(struct iop_adma_desc_slot *desc,
 {
        /* hw_desc->next_desc is the same location for all channels */
        union iop3xx_desc hw_desc = { .ptr = desc->hw_desc, };
-       BUG_ON(hw_desc.dma->next_desc);
+
+       iop_paranoia(hw_desc.dma->next_desc);
        hw_desc.dma->next_desc = next_desc_addr;
 }
 
@@ -760,7 +761,7 @@ static inline int iop_desc_get_zero_result(struct iop_adma_desc_slot *desc)
        struct iop3xx_desc_aau *hw_desc = desc->hw_desc;
        struct iop3xx_aau_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field;
 
-       BUG_ON(!(desc_ctrl.tx_complete && desc_ctrl.zero_result_en));
+       iop_paranoia(!(desc_ctrl.tx_complete && desc_ctrl.zero_result_en));
        return desc_ctrl.zero_result_err;
 }
 
index cb7e3611bcba748352d4227c19104e46fc47d08e..385c6e8cbbd214357e798270ccac8845cb672cec 100644 (file)
 
 #define IOP_ADMA_SLOT_SIZE 32
 #define IOP_ADMA_THRESHOLD 4
+#ifdef DEBUG
+#define IOP_PARANOIA 1
+#else
+#define IOP_PARANOIA 0
+#endif
+#define iop_paranoia(x) BUG_ON(IOP_PARANOIA && (x))
 
 /**
  * struct iop_adma_device - internal representation of an ADMA device
index cb1139ac19432f555b32ccc188b12f838f1ee9d4..39d949b63e80bc0cb23a59b086a2bb24711493ef 100644 (file)
@@ -19,12 +19,13 @@ struct map_desc {
 };
 
 /* types 0-3 are defined in asm/io.h */
-#define MT_CACHECLEAN          4
-#define MT_MINICLEAN           5
-#define MT_LOW_VECTORS         6
-#define MT_HIGH_VECTORS                7
-#define MT_MEMORY              8
-#define MT_ROM                 9
+#define MT_UNCACHED            4
+#define MT_CACHECLEAN          5
+#define MT_MINICLEAN           6
+#define MT_LOW_VECTORS         7
+#define MT_HIGH_VECTORS                8
+#define MT_MEMORY              9
+#define MT_ROM                 10
 
 #ifdef CONFIG_MMU
 extern void iotable_init(struct map_desc *, int);
index 517a4d6ffc74b791691a3a2f65099bb6352e5e64..6ff33790f47b16d91054c4907edb09616a21f5d8 100644 (file)
@@ -23,7 +23,7 @@
 #include <asm/types.h>
 
 #ifdef __KERNEL__
-#define STACK_TOP      ((current->personality == PER_LINUX_32BIT) ? \
+#define STACK_TOP      ((current->personality & ADDR_LIMIT_32BIT) ? \
                         TASK_SIZE : TASK_SIZE_26)
 #define STACK_TOP_MAX  TASK_SIZE
 #endif
index c74f766ffc124406e56ab76918db8bdf4c1e30ec..23af3c972c9a7d202c0a71a340e29067d4ac8d74 100644 (file)
@@ -115,6 +115,8 @@ EXPORT_SYMBOL(__strnlen_user);
 EXPORT_SYMBOL(__strncpy_from_user);
 
 #ifdef CONFIG_MMU
+EXPORT_SYMBOL(copy_page);
+
 EXPORT_SYMBOL(__copy_from_user);
 EXPORT_SYMBOL(__copy_to_user);
 EXPORT_SYMBOL(__clear_user);
@@ -181,8 +183,6 @@ EXPORT_SYMBOL(_find_first_bit_be);
 EXPORT_SYMBOL(_find_next_bit_be);
 #endif
 
-EXPORT_SYMBOL(copy_page);
-
 #ifdef CONFIG_FUNCTION_TRACER
 EXPORT_SYMBOL(mcount);
 #endif
index 57e6874d0b809a21a27afe21d436fa8dca9046e9..79abc4ddc0cf602cf8ae77728fefd8d2080ea826 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/personality.h>
 #include <linux/kallsyms.h>
 #include <linux/delay.h>
+#include <linux/hardirq.h>
 #include <linux/init.h>
 #include <linux/uaccess.h>
 
index 4c3e101b96c9582fcaf6473a5824fa9e10705f56..b3ebe9e4871fe938585e5cad55eb7390424d25b3 100644 (file)
 #include <asm/hardware/ep7212.h>
 #include <asm/hardware/cs89712.h>
 
-/* dynamic ioremap() areas */
-#define FLASH_START      0x00000000
-#define FLASH_SIZE       0x800000
-#define FLASH_WIDTH      4
-
-#define SRAM_START       0x60000000
-#define SRAM_SIZE        0xc000
-#define SRAM_WIDTH       4
-
-#define BOOTROM_START    0x70000000
-#define BOOTROM_SIZE     0x80
-#define BOOTROM_WIDTH    4
-
-
 /* static cdb89712_map_io() areas */
 #define REGISTER_START   0x80000000
 #define REGISTER_SIZE    0x4000
 #define CEIVA_FLASH_SIZE        0x100000
 #define CEIVA_FLASH_WIDTH       2
 
-#define SRAM_START       0x60000000
-#define SRAM_SIZE        0xc000
-#define SRAM_WIDTH       4
-
-#define BOOTROM_START    0x70000000
-#define BOOTROM_SIZE     0x80
-#define BOOTROM_WIDTH    4
-
 /*
  * SED1355 LCD controller
  */
index c3a33b8a5aacc8406d3bcb7279e824cc7500513f..7e247c04d41c471312ff10161654ecc35b441c46 100644 (file)
@@ -275,9 +275,9 @@ static struct map_desc cl7500_io_desc[] __initdata = {
                .length         = ISA_SIZE,
                .type           = MT_DEVICE
        }, {    /* Flash        */
-               .virtual        = FLASH_BASE,
-               .pfn            = __phys_to_pfn(FLASH_START),
-               .length         = FLASH_SIZE,
+               .virtual        = CLPS7500_FLASH_BASE,
+               .pfn            = __phys_to_pfn(CLPS7500_FLASH_START),
+               .length         = CLPS7500_FLASH_SIZE,
                .type           = MT_DEVICE
        }, {    /* LED          */
                .virtual        = LED_BASE,
index d66578a3371c9f0a972a8266497e37519446875e..a6ad1d44badfd44e1fe140297517259652e3c63a 100644 (file)
@@ -39,9 +39,9 @@
 #define ISA_SIZE               0x00010000
 #define ISA_BASE               0xe1000000
 
-#define FLASH_START            0x01000000      /* XXX */
-#define FLASH_SIZE             0x01000000
-#define FLASH_BASE             0xe2000000
+#define CLPS7500_FLASH_START   0x01000000      /* XXX */
+#define CLPS7500_FLASH_SIZE    0x01000000
+#define CLPS7500_FLASH_BASE    0xe2000000
 
 #define LED_START              0x0302B000
 #define LED_SIZE               0x00001000
index 079b279e1242f8f681c0a0d7995cbe3d4cd1602c..38b8e0d61fbfc93f5d3b6cc89b8211bca0dae5c4 100644 (file)
@@ -19,9 +19,9 @@
 #ifdef CONFIG_ARCH_H7202
 
 /* FLASH */
-#define FLASH_VIRT             0xd0000000
-#define FLASH_PHYS             0x00000000
-#define FLASH_SIZE             0x02000000
+#define H720X_FLASH_VIRT       0xd0000000
+#define H720X_FLASH_PHYS       0x00000000
+#define H720X_FLASH_SIZE       0x02000000
 
 /* onboard LAN controller */
 # define ETH0_PHYS             0x08000000
index 028b87839c0f64b3ef421ee488b9e4c149d75899..e00a2624f269922d579cee9d154acb2d4852bfa9 100644 (file)
  */
 #define uHAL_MEMORY_SIZE                INTEGRATOR_SSRAM_SIZE
 
-/*
- *  Application Flash
- *
- */
-#define FLASH_BASE                      INTEGRATOR_FLASH_BASE
-#define FLASH_SIZE                      INTEGRATOR_FLASH_SIZE
-#define FLASH_END                       (FLASH_BASE + FLASH_SIZE - 1)
-#define FLASH_BLOCK_SIZE                SZ_128K
-
-/*
- *  Boot Flash
- *
- */
-#define EPROM_BASE                      INTEGRATOR_BOOT_ROM_HI
-#define EPROM_SIZE                      INTEGRATOR_BOOT_ROM_SIZE
-#define EPROM_END                       (EPROM_BASE + EPROM_SIZE - 1)
-
 /*
  *  Clean base - dummy
  *
  */
-#define CLEAN_BASE                      EPROM_BASE
+#define CLEAN_BASE                      INTEGRATOR_BOOT_ROM_HI
 
 /*
  *  Timer definitions
index 60019c8e6465f420be5d958ca7dd7432f4bc205d..5722e86f2174a93aa4b91975f2c2b608a5b4a1af 100644 (file)
@@ -404,7 +404,8 @@ static inline void iop_desc_set_next_desc(struct iop_adma_desc_slot *desc,
                                        u32 next_desc_addr)
 {
        struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
-       BUG_ON(hw_desc->next_desc);
+
+       iop_paranoia(hw_desc->next_desc);
        hw_desc->next_desc = next_desc_addr;
 }
 
index b3bd8ca85118babd632c353c20cfec92fa811108..4c3e582f3d3cc37e7d4db3338d62828f84e10d93 100644 (file)
@@ -128,7 +128,7 @@ void __init omap1_map_common_io(void)
  * Common low-level hardware init for omap1. This should only get called from
  * board specific init.
  */
-void __init omap1_init_common_hw()
+void __init omap1_init_common_hw(void)
 {
        /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort
         * on a Posted Write in the TIPB Bridge".
index 8e591118371e36adaf365b52db1104e92f60154c..cbda4d35c42130d44eca008fce11cc03ac9f9ba2 100644 (file)
@@ -33,6 +33,7 @@
 #define LCD_CONN_TYPE(_x)      ((_x) & 0x0f)
 #define LCD_CONN_WIDTH(_x)     (((_x) >> 4) & 0x1f)
 
+#define LCD_TYPE_MASK          0xf
 #define LCD_TYPE_UNKNOWN       0
 #define LCD_TYPE_MONO_STN      1
 #define LCD_TYPE_MONO_DSTN     2
index 7b8842cfa5fce30753914f538a0d125d2d1a349d..31e6a7b6ad80d27f055b9ce49da0b7e036e06755 100644 (file)
@@ -12,9 +12,8 @@ extern void clear_reset_status(unsigned int mask);
 
 /**
  * init_gpio_reset() - register GPIO as reset generator
- *
- * @gpio - gpio nr
- * @output - set gpio as out/low instead of input during normal work
+ * @gpio: gpio nr
+ * @output: set gpio as out/low instead of input during normal work
  */
 extern int init_gpio_reset(int gpio, int output);
 
index 0842c531ee4df990f0e7a822e2938593cd9047de..782903fe9c6c2d5900e77efdfe2bc2e664acd4bd 100644 (file)
@@ -565,7 +565,7 @@ static int mioa701_sys_suspend(struct sys_device *sysdev, pm_message_t state)
        u32 *mem_resume_unknown = phys_to_virt(RESUME_UNKNOWN_ADDR);
 
        /* Devices prepare suspend */
-       is_bt_on = gpio_get_value(GPIO83_BT_ON);
+       is_bt_on = !!gpio_get_value(GPIO83_BT_ON);
        pxa2xx_mfp_set_lpm(GPIO83_BT_ON,
                           is_bt_on ? MFP_LPM_DRIVE_HIGH : MFP_LPM_DRIVE_LOW);
 
index a647693d98568ff6890c7e86d519ad52b4d534f6..324d25a48c85cd363f31810226d392fbb9a8f5da 100644 (file)
@@ -24,6 +24,7 @@ ENTRY(mioa701_jumpaddr)
 1:
        mov     r0,     #0xa0000000     @ Don't suppose memory access works
        orr     r0, r0, #0x00200000     @ even if it's supposed to
+       orr     r0, r0, #0x0000b000
        mov     r1, #0
        str     r1, [r0]                @ Early disable resume for next boot
        ldr     r0, mioa701_jumpaddr    @ (Murphy's Law)
index 4447711c9fc61bc09267f355a82ac0195a3e5952..a9d94f5dbec4b2adaa71345881605f153b687a05 100644 (file)
@@ -56,6 +56,9 @@ static unsigned long palmtx_pin_config[] __initdata = {
        GPIO110_MMC_DAT_2,
        GPIO111_MMC_DAT_3,
        GPIO112_MMC_CMD,
+       GPIO14_GPIO,    /* SD detect */
+       GPIO114_GPIO,   /* SD power */
+       GPIO115_GPIO,   /* SD r/o switch */
 
        /* AC97 */
        GPIO28_AC97_BITCLK,
@@ -64,6 +67,7 @@ static unsigned long palmtx_pin_config[] __initdata = {
        GPIO31_AC97_SYNC,
 
        /* IrDA */
+       GPIO40_GPIO,    /* ir disable */
        GPIO46_FICP_RXD,
        GPIO47_FICP_TXD,
 
@@ -71,7 +75,8 @@ static unsigned long palmtx_pin_config[] __initdata = {
        GPIO16_PWM0_OUT,
 
        /* USB */
-       GPIO13_GPIO,
+       GPIO13_GPIO,    /* usb detect */
+       GPIO95_GPIO,    /* usb power */
 
        /* PCMCIA */
        GPIO48_nPOE,
@@ -84,6 +89,45 @@ static unsigned long palmtx_pin_config[] __initdata = {
        GPIO55_nPREG,
        GPIO56_nPWAIT,
        GPIO57_nIOIS16,
+       GPIO94_GPIO,    /* wifi power 1 */
+       GPIO108_GPIO,   /* wifi power 2 */
+       GPIO116_GPIO,   /* wifi ready */
+
+       /* MATRIX KEYPAD */
+       GPIO100_KP_MKIN_0,
+       GPIO101_KP_MKIN_1,
+       GPIO102_KP_MKIN_2,
+       GPIO97_KP_MKIN_3,
+       GPIO103_KP_MKOUT_0,
+       GPIO104_KP_MKOUT_1,
+       GPIO105_KP_MKOUT_2,
+
+       /* LCD */
+       GPIO58_LCD_LDD_0,
+       GPIO59_LCD_LDD_1,
+       GPIO60_LCD_LDD_2,
+       GPIO61_LCD_LDD_3,
+       GPIO62_LCD_LDD_4,
+       GPIO63_LCD_LDD_5,
+       GPIO64_LCD_LDD_6,
+       GPIO65_LCD_LDD_7,
+       GPIO66_LCD_LDD_8,
+       GPIO67_LCD_LDD_9,
+       GPIO68_LCD_LDD_10,
+       GPIO69_LCD_LDD_11,
+       GPIO70_LCD_LDD_12,
+       GPIO71_LCD_LDD_13,
+       GPIO72_LCD_LDD_14,
+       GPIO73_LCD_LDD_15,
+       GPIO74_LCD_FCLK,
+       GPIO75_LCD_LCLK,
+       GPIO76_LCD_PCLK,
+       GPIO77_LCD_BIAS,
+
+       /* MISC. */
+       GPIO10_GPIO,    /* hotsync button */
+       GPIO12_GPIO,    /* power detect */
+       GPIO107_GPIO,   /* earphone detect */
 };
 
 /******************************************************************************
@@ -95,32 +139,49 @@ static int palmtx_mci_init(struct device *dev, irq_handler_t palmtx_detect_int,
        int err = 0;
 
        /* Setup an interrupt for detecting card insert/remove events */
-       err = request_irq(IRQ_GPIO_PALMTX_SD_DETECT_N, palmtx_detect_int,
-                       IRQF_DISABLED | IRQF_SAMPLE_RANDOM |
+       err = gpio_request(GPIO_NR_PALMTX_SD_DETECT_N, "SD IRQ");
+       if (err)
+               goto err;
+       err = gpio_direction_input(GPIO_NR_PALMTX_SD_DETECT_N);
+       if (err)
+               goto err2;
+       err = request_irq(gpio_to_irq(GPIO_NR_PALMTX_SD_DETECT_N),
+                       palmtx_detect_int, IRQF_DISABLED | IRQF_SAMPLE_RANDOM |
                        IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
                        "SD/MMC card detect", data);
        if (err) {
                printk(KERN_ERR "%s: cannot request SD/MMC card detect IRQ\n",
                                __func__);
-               return err;
+               goto err2;
        }
 
        err = gpio_request(GPIO_NR_PALMTX_SD_POWER, "SD_POWER");
        if (err)
-               goto pwr_err;
+               goto err3;
+       err = gpio_direction_output(GPIO_NR_PALMTX_SD_POWER, 0);
+       if (err)
+               goto err4;
 
        err = gpio_request(GPIO_NR_PALMTX_SD_READONLY, "SD_READONLY");
        if (err)
-               goto ro_err;
+               goto err4;
+       err = gpio_direction_input(GPIO_NR_PALMTX_SD_READONLY);
+       if (err)
+               goto err5;
 
        printk(KERN_DEBUG "%s: irq registered\n", __func__);
 
        return 0;
 
-ro_err:
+err5:
+       gpio_free(GPIO_NR_PALMTX_SD_READONLY);
+err4:
        gpio_free(GPIO_NR_PALMTX_SD_POWER);
-pwr_err:
-       free_irq(IRQ_GPIO_PALMTX_SD_DETECT_N, data);
+err3:
+       free_irq(gpio_to_irq(GPIO_NR_PALMTX_SD_DETECT_N), data);
+err2:
+       gpio_free(GPIO_NR_PALMTX_SD_DETECT_N);
+err:
        return err;
 }
 
@@ -128,7 +189,8 @@ static void palmtx_mci_exit(struct device *dev, void *data)
 {
        gpio_free(GPIO_NR_PALMTX_SD_READONLY);
        gpio_free(GPIO_NR_PALMTX_SD_POWER);
-       free_irq(IRQ_GPIO_PALMTX_SD_DETECT_N, data);
+       free_irq(gpio_to_irq(GPIO_NR_PALMTX_SD_DETECT_N), data);
+       gpio_free(GPIO_NR_PALMTX_SD_DETECT_N);
 }
 
 static void palmtx_mci_power(struct device *dev, unsigned int vdd)
@@ -167,7 +229,6 @@ static unsigned int palmtx_matrix_keys[] = {
 
        KEY(3, 0, KEY_RIGHT),
        KEY(3, 2, KEY_LEFT),
-
 };
 
 static struct pxa27x_keypad_platform_data palmtx_keypad_platform_data = {
@@ -209,11 +270,19 @@ static int palmtx_backlight_init(struct device *dev)
        ret = gpio_request(GPIO_NR_PALMTX_BL_POWER, "BL POWER");
        if (ret)
                goto err;
+       ret = gpio_direction_output(GPIO_NR_PALMTX_BL_POWER, 0);
+       if (ret)
+               goto err2;
        ret = gpio_request(GPIO_NR_PALMTX_LCD_POWER, "LCD POWER");
        if (ret)
                goto err2;
+       ret = gpio_direction_output(GPIO_NR_PALMTX_LCD_POWER, 0);
+       if (ret)
+               goto err3;
 
        return 0;
+err3:
+       gpio_free(GPIO_NR_PALMTX_LCD_POWER);
 err2:
        gpio_free(GPIO_NR_PALMTX_BL_POWER);
 err:
@@ -254,6 +323,24 @@ static struct platform_device palmtx_backlight = {
 /******************************************************************************
  * IrDA
  ******************************************************************************/
+static int palmtx_irda_startup(struct device *dev)
+{
+       int err;
+       err = gpio_request(GPIO_NR_PALMTX_IR_DISABLE, "IR DISABLE");
+       if (err)
+               goto err;
+       err = gpio_direction_output(GPIO_NR_PALMTX_IR_DISABLE, 1);
+       if (err)
+               gpio_free(GPIO_NR_PALMTX_IR_DISABLE);
+err:
+       return err;
+}
+
+static void palmtx_irda_shutdown(struct device *dev)
+{
+       gpio_free(GPIO_NR_PALMTX_IR_DISABLE);
+}
+
 static void palmtx_irda_transceiver_mode(struct device *dev, int mode)
 {
        gpio_set_value(GPIO_NR_PALMTX_IR_DISABLE, mode & IR_OFF);
@@ -261,6 +348,8 @@ static void palmtx_irda_transceiver_mode(struct device *dev, int mode)
 }
 
 static struct pxaficp_platform_data palmtx_ficp_platform_data = {
+       .startup                = palmtx_irda_startup,
+       .shutdown               = palmtx_irda_shutdown,
        .transceiver_cap        = IR_SIRMODE | IR_FIRMODE | IR_OFF,
        .transceiver_mode       = palmtx_irda_transceiver_mode,
 };
@@ -268,17 +357,11 @@ static struct pxaficp_platform_data palmtx_ficp_platform_data = {
 /******************************************************************************
  * UDC
  ******************************************************************************/
-static void palmtx_udc_command(int cmd)
-{
-       gpio_set_value(GPIO_NR_PALMTX_USB_POWER, !cmd);
-       udelay(50);
-       gpio_set_value(GPIO_NR_PALMTX_USB_PULLUP, !cmd);
-}
-
 static struct pxa2xx_udc_mach_info palmtx_udc_info __initdata = {
        .gpio_vbus              = GPIO_NR_PALMTX_USB_DETECT_N,
        .gpio_vbus_inverted     = 1,
-       .udc_command            = palmtx_udc_command,
+       .gpio_pullup            = GPIO_NR_PALMTX_USB_POWER,
+       .gpio_pullup_inverted   = 0,
 };
 
 /******************************************************************************
@@ -290,17 +373,16 @@ static int power_supply_init(struct device *dev)
 
        ret = gpio_request(GPIO_NR_PALMTX_POWER_DETECT, "CABLE_STATE_AC");
        if (ret)
-               goto err_cs_ac;
-
-       ret = gpio_request(GPIO_NR_PALMTX_USB_DETECT_N, "CABLE_STATE_USB");
+               goto err1;
+       ret = gpio_direction_input(GPIO_NR_PALMTX_POWER_DETECT);
        if (ret)
-               goto err_cs_usb;
+               goto err2;
 
        return 0;
 
-err_cs_usb:
+err2:
        gpio_free(GPIO_NR_PALMTX_POWER_DETECT);
-err_cs_ac:
+err1:
        return ret;
 }
 
@@ -309,14 +391,8 @@ static int palmtx_is_ac_online(void)
        return gpio_get_value(GPIO_NR_PALMTX_POWER_DETECT);
 }
 
-static int palmtx_is_usb_online(void)
-{
-       return !gpio_get_value(GPIO_NR_PALMTX_USB_DETECT_N);
-}
-
 static void power_supply_exit(struct device *dev)
 {
-       gpio_free(GPIO_NR_PALMTX_USB_DETECT_N);
        gpio_free(GPIO_NR_PALMTX_POWER_DETECT);
 }
 
@@ -327,7 +403,6 @@ static char *palmtx_supplicants[] = {
 static struct pda_power_pdata power_supply_info = {
        .init            = power_supply_init,
        .is_ac_online    = palmtx_is_ac_online,
-       .is_usb_online   = palmtx_is_usb_online,
        .exit            = power_supply_exit,
        .supplied_to     = palmtx_supplicants,
        .num_supplicants = ARRAY_SIZE(palmtx_supplicants),
@@ -410,12 +485,23 @@ static void __init palmtx_map_io(void)
        iotable_init(palmtx_io_desc, ARRAY_SIZE(palmtx_io_desc));
 }
 
+/* setup udc GPIOs initial state */
+static void __init palmtx_udc_init(void)
+{
+       if (!gpio_request(GPIO_NR_PALMTX_USB_POWER, "UDC Vbus")) {
+               gpio_direction_output(GPIO_NR_PALMTX_USB_POWER, 1);
+               gpio_free(GPIO_NR_PALMTX_USB_POWER);
+       }
+}
+
+
 static void __init palmtx_init(void)
 {
        pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtx_pin_config));
 
        set_pxa_fb_info(&palmtx_lcd_screen);
        pxa_set_mci_info(&palmtx_mci_platform_data);
+       palmtx_udc_init();
        pxa_set_udc_info(&palmtx_udc_info);
        pxa_set_ac97_info(NULL);
        pxa_set_ficp_info(&palmtx_ficp_platform_data);
index f601425f1b1eaa31b3307c4fea3e36785f920244..b36cec5c9eed528b1d595fe1b4085a5dfcd7dccc 100644 (file)
@@ -385,6 +385,7 @@ static struct soc_camera_link iclink[] = {
                .gpio   = NR_BUILTIN_GPIO + 1,
        }, {
                .bus_id = 0, /* Must match with the camera ID above */
+               .gpio   = -ENXIO,
        }
 };
 
index 1b2af575c40fdacb47cba208a450a27a99375e1f..00b2dc2a10747b5f87d04d02f82d9f74bdd1b356 100644 (file)
@@ -90,12 +90,13 @@ void arch_reset(char mode)
                /* Jump into ROM at address 0 */
                cpu_reset(0);
                break;
-       case 'h':
-               do_hw_reset();
-               break;
        case 'g':
                do_gpio_reset();
                break;
+       case 'h':
+       default:
+               do_hw_reset();
+               break;
        }
 }
 
index f0a5bbae0b45d32966d3f61f00c77ccf738bde16..3be76ee2bdbfd759b83eee07151ba7cf7917cc42 100644 (file)
@@ -67,6 +67,7 @@
 static unsigned long spitz_pin_config[] __initdata = {
        /* Chip Selects */
        GPIO78_nCS_2,   /* SCOOP #2 */
+       GPIO79_nCS_3,   /* NAND */
        GPIO80_nCS_4,   /* SCOOP #1 */
 
        /* LCD - 16bpp Active TFT */
@@ -97,10 +98,10 @@ static unsigned long spitz_pin_config[] __initdata = {
        GPIO51_nPIOW,
        GPIO85_nPCE_1,
        GPIO54_nPCE_2,
-       GPIO79_PSKTSEL,
        GPIO55_nPREG,
        GPIO56_nPWAIT,
        GPIO57_nIOIS16,
+       GPIO104_PSKTSEL,
 
        /* MMC */
        GPIO32_MMC_CLK,
@@ -686,7 +687,6 @@ static void __init akita_init(void)
        spitz_pcmcia_config.num_devs = 1;
        platform_scoop_config = &spitz_pcmcia_config;
 
-       pxa_set_i2c_info(NULL);
        i2c_register_board_info(0, ARRAY_AND_SIZE(akita_i2c_board_info));
 
        common_init();
index 3e706c57833aebc16a39e0f61a1fa1356e4ed730..3347c4236a60bd6cb2b34cbadc09d0d966614ebf 100644 (file)
@@ -104,7 +104,7 @@ static struct clk uart_clk = {
 
 static struct clk mmci_clk = {
        .name   = "MCLK",
-       .rate   = 33000000,
+       .rate   = 24000000,
 };
 
 int clk_register(struct clk *clk)
index 4034b54950c26d9d811856aceb9d77f5802c113e..793a3a3327121152072645828237c9d3f17c9e8d 100644 (file)
 #define REALVIEW_INTREG_OFFSET         0x8     /* Interrupt control */
 #define REALVIEW_DECODE_OFFSET         0xC     /* Fitted logic modules */
 
-/* 
- *  Application Flash
- * 
- */
-#define FLASH_BASE                      REALVIEW_FLASH_BASE
-#define FLASH_SIZE                      REALVIEW_FLASH_SIZE
-#define FLASH_END                       (FLASH_BASE + FLASH_SIZE - 1)
-#define FLASH_BLOCK_SIZE                SZ_128K
-
-/* 
- *  Boot Flash
- * 
- */
-#define EPROM_BASE                      REALVIEW_BOOT_ROM_HI
-#define EPROM_SIZE                      REALVIEW_BOOT_ROM_SIZE
-#define EPROM_END                       (EPROM_BASE + EPROM_SIZE - 1)
-
 /* 
  *  Clean base - dummy
  * 
  */
-#define CLEAN_BASE                      EPROM_BASE
+#define CLEAN_BASE                      REALVIEW_BOOT_ROM_HI
 
 /*
  * System controller bit assignment
index 3fe8be9ca110e8bf40bf486a2e196b1e70ce869d..980a099e209cf26840724828d90c3b68eff7123c 100644 (file)
@@ -18,6 +18,7 @@ struct s3c2410_spigpio_info {
        unsigned long            pin_mosi;
        unsigned long            pin_miso;
 
+       int                      num_chipselect;
        int                      bus_num;
 
        void (*chip_select)(struct s3c2410_spigpio_info *spi, int cs);
index 9336508ec0b2b1311bbf6c0ceda0fdaa40d8910d..58937f1fb38ce7b4d805f86771d1ccdac9383457 100644 (file)
@@ -105,7 +105,7 @@ static struct clk uart_clk = {
 
 static struct clk mmci_clk = {
        .name   = "MCLK",
-       .rate   = 33000000,
+       .rate   = 24000000,
 };
 
 int clk_register(struct clk *clk)
index 27cbe6a3f2208f5abf4e4f33ce024b8c1498023e..f91ba930ca8a45221b8cb60074ec9bd186731eab 100644 (file)
 #define SIC_INTMASK_PCI1                (1 << SIC_INT_PCI1)
 #define SIC_INTMASK_PCI2                (1 << SIC_INT_PCI2)
 #define SIC_INTMASK_PCI3                (1 << SIC_INT_PCI3)
-/* 
- *  Application Flash
- * 
- */
-#define FLASH_BASE                      VERSATILE_FLASH_BASE
-#define FLASH_SIZE                      VERSATILE_FLASH_SIZE
-#define FLASH_END                       (FLASH_BASE + FLASH_SIZE - 1)
-#define FLASH_BLOCK_SIZE                SZ_128K
-
-/* 
- *  Boot Flash
- * 
- */
-#define EPROM_BASE                      VERSATILE_BOOT_ROM_HI
-#define EPROM_SIZE                      VERSATILE_BOOT_ROM_SIZE
-#define EPROM_END                       (EPROM_BASE + EPROM_SIZE - 1)
 
 /* 
  *  Clean base - dummy
  * 
  */
-#define CLEAN_BASE                      EPROM_BASE
+#define CLEAN_BASE                      VERSATILE_BOOT_ROM_HI
 
 /*
  * System controller bit assignment
index 133e65d166b315b0e54aba959846a162643bc927..2d5884ce0435fb436a57bee6d314284b9101e87e 100644 (file)
@@ -70,6 +70,10 @@ static unsigned long ai_dword;
 static unsigned long ai_multi;
 static int ai_usermode;
 
+#define UM_WARN                (1 << 0)
+#define UM_FIXUP       (1 << 1)
+#define UM_SIGNAL      (1 << 2)
+
 #ifdef CONFIG_PROC_FS
 static const char *usermode_action[] = {
        "ignored",
@@ -754,7 +758,7 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
  user:
        ai_user += 1;
 
-       if (ai_usermode & 1)
+       if (ai_usermode & UM_WARN)
                printk("Alignment trap: %s (%d) PC=0x%08lx Instr=0x%0*lx "
                       "Address=0x%08lx FSR 0x%03x\n", current->comm,
                        task_pid_nr(current), instrptr,
@@ -762,10 +766,10 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
                        thumb_mode(regs) ? tinstr : instr,
                        addr, fsr);
 
-       if (ai_usermode & 2)
+       if (ai_usermode & UM_FIXUP)
                goto fixup;
 
-       if (ai_usermode & 4)
+       if (ai_usermode & UM_SIGNAL)
                force_sig(SIGBUS, current);
        else
                set_cr(cr_no_alignment);
@@ -796,6 +800,22 @@ static int __init alignment_init(void)
        res->write_proc = proc_alignment_write;
 #endif
 
+       /*
+        * ARMv6 and later CPUs can perform unaligned accesses for
+        * most single load and store instructions up to word size.
+        * LDM, STM, LDRD and STRD still need to be handled.
+        *
+        * Ignoring the alignment fault is not an option on these
+        * CPUs since we spin re-faulting the instruction without
+        * making any progress.
+        */
+       if (cpu_architecture() >= CPU_ARCH_ARMv6 && (cr_alignment & CR_U)) {
+               cr_alignment &= ~CR_A;
+               cr_no_alignment &= ~CR_A;
+               set_cr(cr_alignment);
+               ai_usermode = UM_FIXUP;
+       }
+
        hook_fault_code(1, do_alignment, SIGILL, "alignment exception");
        hook_fault_code(3, do_alignment, SIGILL, "alignment exception");
 
index 13cdae8b0d44192107bdb0c626b9e6a3162d8b93..80cd207cbaea14c282e368fe08791d1ebcf09b2c 100644 (file)
@@ -150,7 +150,7 @@ static void feroceon_l2_inv_range(unsigned long start, unsigned long end)
        /*
         * Clean and invalidate partial last cache line.
         */
-       if (end & (CACHE_LINE_SIZE - 1)) {
+       if (start < end && end & (CACHE_LINE_SIZE - 1)) {
                l2_clean_inv_pa(end & ~(CACHE_LINE_SIZE - 1));
                end &= ~(CACHE_LINE_SIZE - 1);
        }
@@ -158,7 +158,7 @@ static void feroceon_l2_inv_range(unsigned long start, unsigned long end)
        /*
         * Invalidate all full cache lines between 'start' and 'end'.
         */
-       while (start != end) {
+       while (start < end) {
                unsigned long range_end = calc_range_end(start, end);
                l2_inv_pa_range(start, range_end - CACHE_LINE_SIZE);
                start = range_end;
index 2df8d9facf5741c060bb9f028c93b7c3bbe33a6e..22c9530e91e2fd8568fa78e1e5aec95ed7a72a24 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/signal.h>
 #include <linux/mm.h>
+#include <linux/hardirq.h>
 #include <linux/init.h>
 #include <linux/kprobes.h>
 #include <linux/uaccess.h>
index e63db11f16a808fc0de3b73ea841ad2797ca597b..7f36c825718d37e6f424c57d8e81e2547692a0e4 100644 (file)
@@ -208,6 +208,12 @@ static struct mem_type mem_types[] = {
                .prot_sect      = PROT_SECT_DEVICE,
                .domain         = DOMAIN_IO,
        },
+       [MT_UNCACHED] = {
+               .prot_pte       = PROT_PTE_DEVICE,
+               .prot_l1        = PMD_TYPE_TABLE,
+               .prot_sect      = PMD_TYPE_SECT | PMD_SECT_XN,
+               .domain         = DOMAIN_IO,
+       },
        [MT_CACHECLEAN] = {
                .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN,
                .domain    = DOMAIN_KERNEL,
index 4689db638e95216ebcf1008767e6f8acbcddb4e4..9e573e78176a65d4bfdb93ae19235f5e39d4ca2b 100644 (file)
 #include <asm/hardware/iop3xx.h>
 
 /*
- * Standard IO mapping for all IOP3xx based systems
+ * Standard IO mapping for all IOP3xx based systems.  Note that
+ * the IOP3xx OCCDR must be mapped uncached and unbuffered.
  */
 static struct map_desc iop3xx_std_desc[] __initdata = {
         {      /* mem mapped registers */
                .virtual        = IOP3XX_PERIPHERAL_VIRT_BASE,
                .pfn            = __phys_to_pfn(IOP3XX_PERIPHERAL_PHYS_BASE),
                .length         = IOP3XX_PERIPHERAL_SIZE,
-               .type           = MT_DEVICE,
+               .type           = MT_UNCACHED,
         }, {   /* PCI IO space */
                .virtual        = IOP3XX_PCI_LOWER_IO_VA,
                .pfn            = __phys_to_pfn(IOP3XX_PCI_LOWER_IO_PA),
index 8679fbca6bbec4ec3d5e5561b92c633cf1e6f298..424049d83fbeb42b63e66286642b35ecbf3bd661 100644 (file)
 #define OMAP24XX_GPIO_IRQSTATUS2       0x0028
 #define OMAP24XX_GPIO_IRQENABLE2       0x002c
 #define OMAP24XX_GPIO_IRQENABLE1       0x001c
+#define OMAP24XX_GPIO_WAKE_EN          0x0020
 #define OMAP24XX_GPIO_CTRL             0x0030
 #define OMAP24XX_GPIO_OE               0x0034
 #define OMAP24XX_GPIO_DATAIN           0x0038
@@ -1551,7 +1552,7 @@ static int omap_gpio_suspend(struct sys_device *dev, pm_message_t mesg)
 #endif
 #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)
                case METHOD_GPIO_24XX:
-                       wake_status = bank->base + OMAP24XX_GPIO_SETWKUENA;
+                       wake_status = bank->base + OMAP24XX_GPIO_WAKE_EN;
                        wake_clear = bank->base + OMAP24XX_GPIO_CLEARWKUENA;
                        wake_set = bank->base + OMAP24XX_GPIO_SETWKUENA;
                        break;
@@ -1574,7 +1575,7 @@ static int omap_gpio_resume(struct sys_device *dev)
 {
        int i;
 
-       if (!cpu_is_omap24xx() && !cpu_is_omap16xx())
+       if (!cpu_class_is_omap2() && !cpu_is_omap16xx())
                return 0;
 
        for (i = 0; i < gpio_bank_count; i++) {
index ec67fb428607c55ba7d4e452db241cd048e7028c..7b74d1255e0b93c7531e607a77188a148bda980b 100644 (file)
@@ -353,8 +353,8 @@ struct omapfb_device {
        u32                     pseudo_palette[17];
 
        struct lcd_panel        *panel;                 /* LCD panel */
-       struct lcd_ctrl         *ctrl;                  /* LCD controller */
-       struct lcd_ctrl         *int_ctrl;              /* internal LCD ctrl */
+       const struct lcd_ctrl   *ctrl;                  /* LCD controller */
+       const struct lcd_ctrl   *int_ctrl;              /* internal LCD ctrl */
        struct lcd_ctrl_extif   *ext_if;                /* LCD ctrl external
                                                           interface */
        struct device           *dev;
index 768eb6e7abcfb719e83a3f085e3955e4b65d07fb..2a9c27ad4c373b349ae85db6fb7f06dd6b0f0035 100644 (file)
@@ -128,7 +128,7 @@ void clk_deny_idle(struct clk *clk);
  * clk_allow_idle - Counters previous clk_deny_idle
  * @clk: clock signal handle
  */
-void clk_deny_idle(struct clk *clk);
+void clk_allow_idle(struct clk *clk);
 
 extern void omap_pm_idle(void);
 extern void omap_pm_suspend(void);
index 9f9a921829c00686f5b8a658c89bef8e084558d0..dcd9d16da2e9f5f0df6e36484e09edaed84139e9 100644 (file)
@@ -255,7 +255,7 @@ void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl)
        if (!_omap_sram_reprogram_clock)
                omap_sram_error();
 
-       return _omap_sram_reprogram_clock(dpllctl, ckctl);
+       _omap_sram_reprogram_clock(dpllctl, ckctl);
 }
 
 int __init omap1_sram_init(void)
@@ -282,8 +282,8 @@ void omap2_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl,
        if (!_omap2_sram_ddr_init)
                omap_sram_error();
 
-       return _omap2_sram_ddr_init(slow_dll_ctrl, fast_dll_ctrl,
-                                   base_cs, force_unlock);
+       _omap2_sram_ddr_init(slow_dll_ctrl, fast_dll_ctrl,
+                            base_cs, force_unlock);
 }
 
 static void (*_omap2_sram_reprogram_sdrc)(u32 perf_level, u32 dll_val,
@@ -294,7 +294,7 @@ void omap2_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, u32 mem_type)
        if (!_omap2_sram_reprogram_sdrc)
                omap_sram_error();
 
-       return _omap2_sram_reprogram_sdrc(perf_level, dll_val, mem_type);
+       _omap2_sram_reprogram_sdrc(perf_level, dll_val, mem_type);
 }
 
 static u32 (*_omap2_set_prcm)(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass);
index 883902fead8928f9ff24cdfd781fa28b3013470c..d41d41d78ad98676dea41aeb6466fb1ebf2bb811 100644 (file)
@@ -35,7 +35,7 @@
 #define  PCIE_CONF_REG(r)              ((((r) & 0xf00) << 16) | ((r) & 0xfc))
 #define  PCIE_CONF_BUS(b)              (((b) & 0xff) << 16)
 #define  PCIE_CONF_DEV(d)              (((d) & 0x1f) << 11)
-#define  PCIE_CONF_FUNC(f)             (((f) & 0x3) << 8)
+#define  PCIE_CONF_FUNC(f)             (((f) & 0x7) << 8)
 #define PCIE_CONF_DATA_OFF     0x18fc
 #define PCIE_MASK_OFF          0x1910
 #define PCIE_CTRL_OFF          0x1a00
index 5f139b7cb5f7c0aeb22d7b9b2cdba3b3682702f1..604bbd5e41d9b6c6c98dd7ceec835a345e1b22fd 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
 
-#include <asm/arch/smc.h>
+#include <mach/smc.h>
 
 static struct smc_timing flash_timing __initdata = {
        .ncs_read_setup         = 0,
index 7538f3d2b9e0742a4a5647cc37a5b1fa7f6e611d..1ee4faf0742dba057a8dd6db0eb589e9758d5936 100644 (file)
 
 #include <asm/setup.h>
 
-#include <asm/arch/at32ap700x.h>
-#include <asm/arch/init.h>
-#include <asm/arch/board.h>
-#include <asm/arch/portmux.h>
+#include <mach/at32ap700x.h>
+#include <mach/init.h>
+#include <mach/board.h>
+#include <mach/portmux.h>
 
 /* Oscillator frequencies. These are board-specific */
 unsigned long at32_board_osc_rates[3] = {
index 219720a47bf93772c77d8a57787fe46812bbb006..1848bf0d7f62642568356ded4833102e91724216 100644 (file)
@@ -10,7 +10,7 @@ MKIMAGE               := $(srctree)/scripts/mkuboot.sh
 
 extra-y                := vmlinux.bin vmlinux.gz
 
-OBJCOPYFLAGS_vmlinux.bin := -O binary
+OBJCOPYFLAGS_vmlinux.bin := -O binary -R .note.gnu.build-id
 $(obj)/vmlinux.bin: vmlinux FORCE
        $(call if_changed,objcopy)
 
index 8b6e54c9946aa835c1afb055350b8c3d166f839c..6c45a3b77aa3a877dc327ae0b978c7b42cae2d07 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc1
-# Tue Aug  5 15:40:26 2008
+# Linux kernel version: 2.6.28-rc8
+# Thu Dec 18 11:22:23 2008
 #
 CONFIG_AVR32=y
 CONFIG_GENERIC_GPIO=y
@@ -67,6 +67,7 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLUB_DEBUG=y
 # CONFIG_SLAB is not set
@@ -77,15 +78,8 @@ CONFIG_PROFILING=y
 CONFIG_OPROFILE=m
 CONFIG_HAVE_OPROFILE=y
 CONFIG_KPROBES=y
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
 CONFIG_HAVE_KPROBES=y
-# CONFIG_HAVE_KRETPROBES is not set
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
 CONFIG_HAVE_CLK=y
-CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -118,6 +112,7 @@ CONFIG_DEFAULT_CFQ=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="cfq"
 CONFIG_CLASSIC_RCU=y
+CONFIG_FREEZER=y
 
 #
 # System Type and features
@@ -134,6 +129,8 @@ CONFIG_CPU_AT32AP700X=y
 CONFIG_CPU_AT32AP7000=y
 CONFIG_BOARD_ATSTK1000=y
 # CONFIG_BOARD_ATNGW100 is not set
+# CONFIG_BOARD_FAVR_32 is not set
+# CONFIG_BOARD_MIMC200 is not set
 # CONFIG_BOARD_ATSTK1002 is not set
 # CONFIG_BOARD_ATSTK1003 is not set
 # CONFIG_BOARD_ATSTK1004 is not set
@@ -171,14 +168,14 @@ CONFIG_FLATMEM_MANUAL=y
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=0
 CONFIG_NR_QUICK=2
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 # CONFIG_OWNERSHIP_TRACE is not set
 CONFIG_NMI_DEBUGGING=y
 # CONFIG_HZ_100 is not set
@@ -186,7 +183,7 @@ CONFIG_HZ_250=y
 # CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
-# CONFIG_SCHED_HRTICK is not set
+CONFIG_SCHED_HRTICK=y
 CONFIG_CMDLINE=""
 
 #
@@ -228,6 +225,8 @@ CONFIG_CPU_FREQ_AT32AP=y
 # Executable file formats
 #
 CONFIG_BINFMT_ELF=y
+CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
+# CONFIG_HAVE_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
 CONFIG_NET=y
 
@@ -299,6 +298,7 @@ CONFIG_IPV6_TUNNEL=m
 # CONFIG_ATM is not set
 CONFIG_STP=m
 CONFIG_BRIDGE=m
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 CONFIG_LLC=m
@@ -321,14 +321,8 @@ CONFIG_LLC=m
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-# CONFIG_WIRELESS_EXT is not set
-# CONFIG_MAC80211 is not set
-# CONFIG_IEEE80211 is not set
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -359,6 +353,7 @@ CONFIG_MTD_CMDLINE_PARTS=y
 # User Modules And Translation Layers
 #
 CONFIG_MTD_CHAR=y
+CONFIG_HAVE_MTD_OTP=y
 CONFIG_MTD_BLKDEVS=y
 CONFIG_MTD_BLOCK=y
 # CONFIG_FTL is not set
@@ -407,6 +402,8 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
 # Self-contained MTD device drivers
 #
 CONFIG_MTD_DATAFLASH=m
+# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
+CONFIG_MTD_DATAFLASH_OTP=y
 CONFIG_MTD_M25P80=m
 CONFIG_M25PXX_USE_FAST_READ=y
 # CONFIG_MTD_SLRAM is not set
@@ -464,9 +461,10 @@ CONFIG_ATMEL_TCLIB=y
 CONFIG_ATMEL_TCB_CLKSRC=y
 CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
 # CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ICS932S401 is not set
 CONFIG_ATMEL_SSC=m
 # CONFIG_ENCLOSURE_SERVICES is not set
-# CONFIG_HAVE_IDE is not set
+# CONFIG_C2PORT is not set
 
 #
 # SCSI device support
@@ -548,6 +546,9 @@ CONFIG_MACB=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_B44 is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
@@ -653,6 +654,7 @@ CONFIG_UNIX98_PTYS=y
 CONFIG_I2C=m
 CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=m
+CONFIG_I2C_HELPER_AUTO=y
 CONFIG_I2C_ALGOBIT=m
 
 #
@@ -716,6 +718,10 @@ CONFIG_GPIOLIB=y
 # CONFIG_DEBUG_GPIO is not set
 CONFIG_GPIO_SYSFS=y
 
+#
+# Memory mapped GPIO expanders:
+#
+
 #
 # I2C GPIO expanders:
 #
@@ -745,11 +751,11 @@ CONFIG_WATCHDOG=y
 #
 # CONFIG_SOFT_WATCHDOG is not set
 CONFIG_AT32AP700X_WDT=y
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -758,6 +764,10 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -783,6 +793,7 @@ CONFIG_SSB_POSSIBLE=y
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -804,10 +815,13 @@ CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_S1D13XXX is not set
 CONFIG_FB_ATMEL=y
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_LCD_CLASS_DEVICE=y
 CONFIG_LCD_LTV350QV=y
 # CONFIG_LCD_ILI9320 is not set
+# CONFIG_LCD_TDO24M is not set
 # CONFIG_LCD_VGG2432A4 is not set
 # CONFIG_LCD_PLATFORM is not set
 # CONFIG_BACKLIGHT_CLASS_DEVICE is not set
@@ -818,6 +832,7 @@ CONFIG_LCD_LTV350QV=y
 # CONFIG_DISPLAY_SUPPORT is not set
 # CONFIG_LOGO is not set
 CONFIG_SOUND=m
+CONFIG_SOUND_OSS_CORE=y
 CONFIG_SND=m
 CONFIG_SND_TIMER=m
 CONFIG_SND_PCM=m
@@ -848,28 +863,32 @@ CONFIG_USB_SUPPORT=y
 # CONFIG_USB_ARCH_HAS_EHCI is not set
 # CONFIG_USB_OTG_WHITELIST is not set
 # CONFIG_USB_OTG_BLACKLIST_HUB is not set
+# CONFIG_USB_MUSB_HDRC is not set
+# CONFIG_USB_GADGET_MUSB_HDRC is not set
 
 #
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
 #
 CONFIG_USB_GADGET=y
 # CONFIG_USB_GADGET_DEBUG is not set
 # CONFIG_USB_GADGET_DEBUG_FILES is not set
 # CONFIG_USB_GADGET_DEBUG_FS is not set
+CONFIG_USB_GADGET_VBUS_DRAW=2
 CONFIG_USB_GADGET_SELECTED=y
-# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_AT91 is not set
 CONFIG_USB_GADGET_ATMEL_USBA=y
 CONFIG_USB_ATMEL_USBA=y
 # CONFIG_USB_GADGET_FSL_USB2 is not set
-# CONFIG_USB_GADGET_NET2280 is not set
-# CONFIG_USB_GADGET_PXA25X is not set
-# CONFIG_USB_GADGET_M66592 is not set
-# CONFIG_USB_GADGET_PXA27X is not set
-# CONFIG_USB_GADGET_GOKU is not set
 # CONFIG_USB_GADGET_LH7A40X is not set
 # CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_PXA25X is not set
+# CONFIG_USB_GADGET_PXA27X is not set
 # CONFIG_USB_GADGET_S3C2410 is not set
-# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
 # CONFIG_USB_GADGET_DUMMY_HCD is not set
 CONFIG_USB_GADGET_DUALSPEED=y
 CONFIG_USB_ZERO=m
@@ -887,7 +906,7 @@ CONFIG_MMC=y
 # CONFIG_MMC_UNSAFE_RESUME is not set
 
 #
-# MMC/SD Card Drivers
+# MMC/SD/SDIO Card Drivers
 #
 CONFIG_MMC_BLOCK=y
 CONFIG_MMC_BLOCK_BOUNCE=y
@@ -895,10 +914,11 @@ CONFIG_MMC_BLOCK_BOUNCE=y
 # CONFIG_MMC_TEST is not set
 
 #
-# MMC/SD Host Controller Drivers
+# MMC/SD/SDIO Host Controller Drivers
 #
 # CONFIG_MMC_SDHCI is not set
 CONFIG_MMC_ATMELMCI=y
+# CONFIG_MMC_ATMELMCI_DMA is not set
 CONFIG_MMC_SPI=m
 # CONFIG_MEMSTICK is not set
 CONFIG_NEW_LEDS=y
@@ -918,6 +938,7 @@ CONFIG_LEDS_GPIO=m
 CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=m
 CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
 CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
 # CONFIG_ACCESSIBILITY is not set
 CONFIG_RTC_LIB=y
@@ -950,25 +971,31 @@ CONFIG_RTC_INTF_DEV=y
 # CONFIG_RTC_DRV_M41T80 is not set
 # CONFIG_RTC_DRV_S35390A is not set
 # CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
 
 #
 # SPI RTC drivers
 #
 # CONFIG_RTC_DRV_M41T94 is not set
 # CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
 # CONFIG_RTC_DRV_MAX6902 is not set
 # CONFIG_RTC_DRV_R9701 is not set
 # CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
 
 #
 # Platform RTC drivers
 #
+# CONFIG_RTC_DRV_DS1286 is not set
 # CONFIG_RTC_DRV_DS1511 is not set
 # CONFIG_RTC_DRV_DS1553 is not set
 # CONFIG_RTC_DRV_DS1742 is not set
 # CONFIG_RTC_DRV_STK17TA8 is not set
 # CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
 # CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
 # CONFIG_RTC_DRV_V3020 is not set
 
 #
@@ -989,6 +1016,8 @@ CONFIG_DMA_ENGINE=y
 # CONFIG_NET_DMA is not set
 CONFIG_DMATEST=m
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
@@ -998,12 +1027,17 @@ CONFIG_EXT2_FS=m
 # CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=m
 # CONFIG_EXT3_FS_XATTR is not set
-# CONFIG_EXT4DEV_FS is not set
+CONFIG_EXT4_FS=m
+CONFIG_EXT4DEV_COMPAT=y
+# CONFIG_EXT4_FS_XATTR is not set
 CONFIG_JBD=m
 # CONFIG_JBD_DEBUG is not set
+CONFIG_JBD2=m
+# CONFIG_JBD2_DEBUG is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_DNOTIFY is not set
@@ -1036,6 +1070,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -1054,7 +1089,8 @@ CONFIG_TMPFS=y
 # CONFIG_EFS_FS is not set
 CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_FS_DEBUG=0
-# CONFIG_JFFS2_FS_WRITEBUFFER is not set
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
 # CONFIG_JFFS2_SUMMARY is not set
 # CONFIG_JFFS2_FS_XATTR is not set
 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
@@ -1088,6 +1124,7 @@ CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -1185,10 +1222,21 @@ CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_FRAME_POINTER=y
 # CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_KPROBES_SANITY_TEST is not set
 # CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
 # CONFIG_LKDTM is not set
 # CONFIG_FAULT_INJECTION is not set
+
+#
+# Tracers
+#
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 
 #
@@ -1196,17 +1244,26 @@ CONFIG_FRAME_POINTER=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
 
 #
 # Crypto core or helper
 #
+CONFIG_CRYPTO_FIPS=y
 CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
 CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD2=y
 CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_BLKCIPHER2=y
 CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG=m
+CONFIG_CRYPTO_RNG2=y
 CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_MANAGER2=y
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_NULL is not set
 # CONFIG_CRYPTO_CRYPTD is not set
@@ -1257,7 +1314,7 @@ CONFIG_CRYPTO_SHA1=m
 #
 # Ciphers
 #
-# CONFIG_CRYPTO_AES is not set
+CONFIG_CRYPTO_AES=m
 # CONFIG_CRYPTO_ANUBIS is not set
 # CONFIG_CRYPTO_ARC4 is not set
 # CONFIG_CRYPTO_BLOWFISH is not set
@@ -1278,14 +1335,17 @@ CONFIG_CRYPTO_DES=m
 #
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+CONFIG_CRYPTO_ANSI_CPRNG=m
 # CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
 CONFIG_CRC_CCITT=m
 CONFIG_CRC16=y
 CONFIG_CRC_T10DIF=m
index 0c6e02f80a31ce6cd562aa2147d0144a3e89b913..066252eebf614e98ffb96c1c58705cbb9e35840b 100644 (file)
@@ -967,28 +967,28 @@ static inline void configure_usart0_pins(void)
 {
        u32 pin_mask = (1 << 8) | (1 << 9); /* RXD & TXD */
 
-       select_peripheral(PIOA, pin_mask, PERIPH_B, 0);
+       select_peripheral(PIOA, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
 }
 
 static inline void configure_usart1_pins(void)
 {
        u32 pin_mask = (1 << 17) | (1 << 18); /* RXD & TXD */
 
-       select_peripheral(PIOA, pin_mask, PERIPH_A, 0);
+       select_peripheral(PIOA, pin_mask, PERIPH_A, AT32_GPIOF_PULLUP);
 }
 
 static inline void configure_usart2_pins(void)
 {
        u32 pin_mask = (1 << 26) | (1 << 27); /* RXD & TXD */
 
-       select_peripheral(PIOB, pin_mask, PERIPH_B, 0);
+       select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
 }
 
 static inline void configure_usart3_pins(void)
 {
        u32 pin_mask = (1 << 18) | (1 << 17); /* RXD & TXD */
 
-       select_peripheral(PIOB, pin_mask, PERIPH_B, 0);
+       select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
 }
 
 static struct platform_device *__initdata at32_usarts[4];
index 56dcb0a2d2449ced3d11097a889be0cde31d3017..77295666c34be11411d2f16c6833f5cd995f65ac 100644 (file)
@@ -101,7 +101,7 @@ extern u16 _bfin_swrst; /* shadow for Software Reset Register (SWRST) */
 extern unsigned long _ramstart, _ramend, _rambase;
 extern unsigned long memory_start, memory_end, physical_mem_end;
 extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[],
-       _ebss_l1[], _l1_lma_start[], _sdata_b_l1[], _ebss_b_l1[],
+       _ebss_l1[], _l1_lma_start[], _sdata_b_l1[], _sbss_b_l1[], _ebss_b_l1[],
        _stext_l2[], _etext_l2[], _sdata_l2[], _edata_l2[], _sbss_l2[],
        _ebss_l2[], _l2_lma_start[];
 
index ede748d67efdc6bed10051a746a9fa53499e7469..d7d9148e433c7aa7d567f0ab5fe346897b07fae9 100644 (file)
@@ -15,7 +15,11 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
 #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
 #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
 
-#define dma_mapping_error
+static inline
+int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
+{
+       return 0;
+}
 
 /*
  * Map a single buffer of the indicated size for DMA in streaming mode.
index 6e08f425bb44076fa39443e23ab75d1db429afa1..5c0800adb4ddc428658f50c6f8aa29fd839ede65 100644 (file)
@@ -218,7 +218,7 @@ inline int check_gpio(unsigned gpio)
        if (gpio == GPIO_PB15 || gpio == GPIO_PC14 || gpio == GPIO_PC15
            || gpio == GPIO_PH14 || gpio == GPIO_PH15
            || gpio == GPIO_PJ14 || gpio == GPIO_PJ15
-           || gpio > MAX_BLACKFIN_GPIOS)
+           || gpio >= MAX_BLACKFIN_GPIOS)
                return -EINVAL;
        return 0;
 }
index 512f8c92ead511f2286a4a9f688763becd9ca8ed..2debc900e246d2ae7d5fe81e55bf18b0437de4d3 100644 (file)
@@ -188,10 +188,11 @@ static struct cplb_desc cplb_data[] = {
 
 static u16 __init lock_kernel_check(u32 start, u32 end)
 {
-       if ((end   <= (u32) _end && end   >= (u32)_stext) ||
-           (start <= (u32) _end && start >= (u32)_stext))
-               return IN_KERNEL;
-       return 0;
+       if (start >= (u32)_end || end <= (u32)_stext)
+               return 0;
+
+       /* This cplb block overlapped with kernel area. */
+       return IN_KERNEL;
 }
 
 static unsigned short __init
index 77800dd83e578d49844edaceaec7fc4f3bcfe728..0c3ea118b657563f6486d6b2554180d1db0c2886 100644 (file)
@@ -351,9 +351,14 @@ int _access_ok(unsigned long addr, unsigned long size)
                return 1;
 #endif
 #if L1_DATA_B_LENGTH != 0
-       if (addr >= L1_DATA_B_START
+       if (addr >= L1_DATA_B_START + (_ebss_b_l1 - _sdata_b_l1)
            && addr + size <= L1_DATA_B_START + L1_DATA_B_LENGTH)
                return 1;
+#endif
+#if L2_LENGTH != 0
+       if (addr >= L2_START + (_ebss_l2 - _stext_l2)
+           && addr + size <= L2_START + L2_LENGTH)
+               return 1;
 #endif
        return 0;
 }
index 7f35d1046cd87d1062df7520b577b72eac4bcdf7..71a9a8c53ceab8cd2456f578599267697f3d2bd3 100644 (file)
@@ -119,23 +119,23 @@ void __init bfin_relocate_l1_mem(void)
        /* Copy _stext_l1 to _etext_l1 to L1 instruction SRAM */
        dma_memcpy(_stext_l1, _l1_lma_start, l1_code_length);
 
-       l1_data_a_length = _ebss_l1 - _sdata_l1;
+       l1_data_a_length = _sbss_l1 - _sdata_l1;
        if (l1_data_a_length > L1_DATA_A_LENGTH)
                panic("L1 Data SRAM Bank A Overflow\n");
 
-       /* Copy _sdata_l1 to _ebss_l1 to L1 data bank A SRAM */
+       /* Copy _sdata_l1 to _sbss_l1 to L1 data bank A SRAM */
        dma_memcpy(_sdata_l1, _l1_lma_start + l1_code_length, l1_data_a_length);
 
-       l1_data_b_length = _ebss_b_l1 - _sdata_b_l1;
+       l1_data_b_length = _sbss_b_l1 - _sdata_b_l1;
        if (l1_data_b_length > L1_DATA_B_LENGTH)
                panic("L1 Data SRAM Bank B Overflow\n");
 
-       /* Copy _sdata_b_l1 to _ebss_b_l1 to L1 data bank B SRAM */
+       /* Copy _sdata_b_l1 to _sbss_b_l1 to L1 data bank B SRAM */
        dma_memcpy(_sdata_b_l1, _l1_lma_start + l1_code_length +
                        l1_data_a_length, l1_data_b_length);
 
        if (L2_LENGTH != 0) {
-               l2_length = _ebss_l2 - _stext_l2;
+               l2_length = _sbss_l2 - _stext_l2;
                if (l2_length > L2_LENGTH)
                        panic("L2 SRAM Overflow\n");
 
@@ -827,7 +827,7 @@ void __init setup_arch(char **cmdline_p)
                                printk(KERN_ERR "Warning: Compiled for Rev %d, but running on Rev %d\n",
                                       bfin_compiled_revid(), bfin_revid());
                }
-               if (bfin_revid() <= CONFIG_BF_REV_MIN || bfin_revid() > CONFIG_BF_REV_MAX)
+               if (bfin_revid() < CONFIG_BF_REV_MIN || bfin_revid() > CONFIG_BF_REV_MAX)
                        printk(KERN_ERR "Warning: Unsupported Chip Revision ADSP-%s Rev 0.%d detected\n",
                               CPU, bfin_revid());
        }
index 1aa2c788e228399f3ab00912fc50296e052cbf71..bef025b074432d467f30bb5e56c79a099492c0ff 100644 (file)
@@ -59,7 +59,7 @@
 #endif
 
 
-#ifdef CONFIG_VERBOSE_DEBUG
+#ifdef CONFIG_DEBUG_VERBOSE
 #define verbose_printk(fmt, arg...) \
        printk(fmt, ##arg)
 #else
@@ -147,9 +147,12 @@ static void decode_address(char *buf, unsigned long address)
                                char *name = p->comm;
                                struct file *file = vma->vm_file;
 
-                               if (file)
-                                       name = d_path(&file->f_path, _tmpbuf,
+                               if (file) {
+                                       char *d_name = d_path(&file->f_path, _tmpbuf,
                                                      sizeof(_tmpbuf));
+                                       if (!IS_ERR(d_name))
+                                               name = d_name;
+                               }
 
                                /* FLAT does not have its text aligned to the start of
                                 * the map while FDPIC ELF does ...
@@ -571,7 +574,7 @@ asmlinkage void trap_c(struct pt_regs *fp)
 #endif
                        panic("Kernel exception");
                } else {
-#ifdef CONFIG_VERBOSE_DEBUG
+#ifdef CONFIG_DEBUG_VERBOSE
                        unsigned long *stack;
                        /* Dump the user space stack */
                        stack = (unsigned long *)rdusp();
index db532181fbdeb9200a6d445b6f7fd940cd088830..a028e9450419b498c1f4741ec64e9a69dc945374 100644 (file)
  */
 .macro do_flush flushins:req optflushins optnopins label
 
+       R2 = -L1_CACHE_BYTES;
+
+       /* start = (start & -L1_CACHE_BYTES) */
+       R0 = R0 & R2;
+
        /* end = ((end - 1) & -L1_CACHE_BYTES) + L1_CACHE_BYTES; */
        R1 += -1;
-       R2 = -L1_CACHE_BYTES;
        R1 = R1 & R2;
        R1 += L1_CACHE_BYTES;
 
@@ -63,7 +67,7 @@ ENDPROC(_blackfin_icache_flush_range)
 
 /* Flush all cache lines assocoiated with this area of memory. */
 ENTRY(_blackfin_icache_dcache_flush_range)
-       do_flush IFLUSH, FLUSH
+       do_flush FLUSH, IFLUSH
 ENDPROC(_blackfin_icache_dcache_flush_range)
 
 /* Throw away all D-cached data in specified region without any obligation to
index c22c47b601273771d71306bbfbb264a6c66b8605..dda5443b37ed7ef6ad0bb30d8d4c0f6621f54373 100644 (file)
@@ -72,13 +72,13 @@ unsigned int __bfin_cycles_mod;
 
 /**************************************************************************/
 
-static unsigned int bfin_getfreq(unsigned int cpu)
+static unsigned int bfin_getfreq_khz(unsigned int cpu)
 {
        /* The driver only support single cpu */
        if (cpu != 0)
                return -1;
 
-       return get_cclk();
+       return get_cclk() / 1000;
 }
 
 
@@ -96,7 +96,7 @@ static int bfin_target(struct cpufreq_policy *policy,
 
        cclk_hz = bfin_freq_table[index].frequency;
 
-       freqs.old = bfin_getfreq(0);
+       freqs.old = bfin_getfreq_khz(0);
        freqs.new = cclk_hz;
        freqs.cpu = 0;
 
@@ -137,8 +137,8 @@ static int __init __bfin_cpu_init(struct cpufreq_policy *policy)
        if (policy->cpu != 0)
                return -EINVAL;
 
-       cclk = get_cclk();
-       sclk = get_sclk();
+       cclk = get_cclk() / 1000;
+       sclk = get_sclk() / 1000;
 
 #if ANOMALY_05000273 || (!defined(CONFIG_BF54x) && defined(CONFIG_BFIN_DCACHE))
        min_cclk = sclk * 2;
@@ -152,7 +152,7 @@ static int __init __bfin_cpu_init(struct cpufreq_policy *policy)
                dpm_state_table[index].csel = csel << 4; /* Shift now into PLL_DIV bitpos */
                dpm_state_table[index].tscale =  (TIME_SCALE / (1 << csel)) - 1;
 
-               pr_debug("cpufreq: freq:%d csel:%d tscale:%d\n",
+               pr_debug("cpufreq: freq:%d csel:0x%x tscale:%d\n",
                                                 bfin_freq_table[index].frequency,
                                                 dpm_state_table[index].csel,
                                                 dpm_state_table[index].tscale);
@@ -173,7 +173,7 @@ static struct freq_attr *bfin_freq_attr[] = {
 static struct cpufreq_driver bfin_driver = {
        .verify = bfin_verify_speed,
        .target = bfin_target,
-       .get = bfin_getfreq,
+       .get = bfin_getfreq_khz,
        .init = __bfin_cpu_init,
        .name = "bfin cpufreq",
        .owner = THIS_MODULE,
index c13fa8da28c7fbbd7aae0377358e9e10f9babff5..bde6dc4e2614d45e1d39bf6dfc27430a4952dab1 100644 (file)
@@ -277,7 +277,7 @@ ENTRY(_bfin_return_from_exception)
        p5.h = hi(ILAT);
        r6 = [p5];
        r7 = 0x20;              /* Did I just cause anther HW error? */
-       r7 = r7 & r1;
+       r6 = r7 & r6;
        CC = R7 == R6;
        if CC JUMP _double_fault;
 #endif
index 0f1ca6930c16bc651529c814a1727694943b5f78..cc6f336e7313b483f1b9b98af708e043409c31ce 100644 (file)
@@ -183,10 +183,10 @@ static void __init l2_sram_init(void)
                return;
        }
 
-       free_l2_sram_head.next->paddr = (void *)L2_START +
-               (_etext_l2 - _stext_l2) + (_edata_l2 - _sdata_l2);
-       free_l2_sram_head.next->size = L2_LENGTH -
-               (_etext_l2 - _stext_l2) + (_edata_l2 - _sdata_l2);
+       free_l2_sram_head.next->paddr =
+               (void *)L2_START + (_ebss_l2 - _stext_l2);
+       free_l2_sram_head.next->size =
+               L2_LENGTH - (_ebss_l2 - _stext_l2);
        free_l2_sram_head.next->pid = 0;
        free_l2_sram_head.next->next = NULL;
 
index 49b2cf2c38f3d313e9136dfdeaf84ef675b7b53f..baadc97f86278ff2060f64932d60977c80d04abc 100644 (file)
@@ -35,22 +35,21 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
        int error = -EBADF;
        struct file * file = NULL;
 
-       flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
-       if (!(flags & MAP_ANONYMOUS)) {
-               file = fget(fd);
-               if (!file)
-                       goto out;
-       }
-
        /* As with sparc32, make sure the shift for mmap2 is constant
           (12), no matter what PAGE_SIZE we have.... */
 
        /* But unlike sparc32, don't just silently break if we're
           trying to map something we can't */
-       if (pgoff & ((1<<(PAGE_SHIFT-12))-1))
+       if (pgoff & ((1 << (PAGE_SHIFT - 12)) - 1))
                return -EINVAL;
+       pgoff >>= PAGE_SHIFT - 12;
 
-       pgoff >>= (PAGE_SHIFT - 12);
+       flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+       if (!(flags & MAP_ANONYMOUS)) {
+               file = fget(fd);
+               if (!file)
+                       goto out;
+       }
 
        down_write(&current->mm->mmap_sem);
        error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
index e05f9e1d3faaa7d0d1449d60766f4c7efb18f231..27eb67604c53bf2915dd725691a447dcd2f19903 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc1
-# Mon Aug  4 15:38:01 2008
+# Linux kernel version: 2.6.28-rc7
+# Mon Dec  8 08:12:07 2008
 #
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -26,6 +26,7 @@ CONFIG_LOG_BUF_SHIFT=20
 CONFIG_CGROUPS=y
 # CONFIG_CGROUP_DEBUG is not set
 # CONFIG_CGROUP_NS is not set
+# CONFIG_CGROUP_FREEZER is not set
 # CONFIG_CGROUP_DEVICE is not set
 CONFIG_CPUSETS=y
 # CONFIG_GROUP_SCHED is not set
@@ -46,7 +47,6 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
 # CONFIG_EMBEDDED is not set
 CONFIG_SYSCTL_SYSCALL=y
-CONFIG_SYSCTL_SYSCALL_CHECK=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -63,7 +63,9 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_PCI_QUIRKS=y
 CONFIG_SLUB_DEBUG=y
 # CONFIG_SLAB is not set
 CONFIG_SLUB=y
@@ -72,15 +74,11 @@ CONFIG_SLUB=y
 # CONFIG_MARKERS is not set
 CONFIG_HAVE_OPROFILE=y
 # CONFIG_KPROBES is not set
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
+CONFIG_HAVE_ARCH_TRACEHOOK=y
 CONFIG_HAVE_DMA_ATTRS=y
 CONFIG_USE_GENERIC_SMP_HELPERS=y
-# CONFIG_HAVE_CLK is not set
-CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -113,6 +111,7 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Processor type and features
@@ -125,8 +124,6 @@ CONFIG_MMU=y
 CONFIG_SWIOTLB=y
 CONFIG_IOMMU_HELPER=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-# CONFIG_ARCH_HAS_ILOG2_U32 is not set
-# CONFIG_ARCH_HAS_ILOG2_U64 is not set
 CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
@@ -139,13 +136,16 @@ CONFIG_GENERIC_IOMAP=y
 CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_IA64_UNCACHED_ALLOCATOR=y
 CONFIG_AUDIT_ARCH=y
+# CONFIG_PARAVIRT_GUEST is not set
 CONFIG_IA64_GENERIC=y
 # CONFIG_IA64_DIG is not set
+# CONFIG_IA64_DIG_VTD is not set
 # CONFIG_IA64_HP_ZX1 is not set
 # CONFIG_IA64_HP_ZX1_SWIOTLB is not set
 # CONFIG_IA64_SGI_SN2 is not set
 # CONFIG_IA64_SGI_UV is not set
 # CONFIG_IA64_HP_SIM is not set
+# CONFIG_IA64_XEN_GUEST is not set
 # CONFIG_ITANIUM is not set
 CONFIG_MCKINLEY=y
 # CONFIG_IA64_PAGE_SIZE_4KB is not set
@@ -182,16 +182,17 @@ CONFIG_DISCONTIGMEM_MANUAL=y
 CONFIG_DISCONTIGMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
-# CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_MIGRATION=y
 CONFIG_RESOURCES_64BIT=y
+CONFIG_PHYS_ADDR_T_64BIT=y
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_NR_QUICK=1
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 CONFIG_MMU_NOTIFIER=y
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
@@ -231,12 +232,12 @@ CONFIG_EFI_VARS=y
 CONFIG_EFI_PCDP=y
 CONFIG_DMIID=y
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
 CONFIG_BINFMT_MISC=m
 
-# CONFIG_DMAR is not set
-
 #
-# Power management and ACPI
+# Power management and ACPI options
 #
 CONFIG_PM=y
 # CONFIG_PM_DEBUG is not set
@@ -248,7 +249,6 @@ CONFIG_ACPI_PROC_EVENT=y
 CONFIG_ACPI_BUTTON=m
 CONFIG_ACPI_FAN=m
 CONFIG_ACPI_DOCK=y
-# CONFIG_ACPI_BAY is not set
 CONFIG_ACPI_PROCESSOR=m
 CONFIG_ACPI_HOTPLUG_CPU=y
 CONFIG_ACPI_THERMAL=m
@@ -256,9 +256,7 @@ CONFIG_ACPI_NUMA=y
 # CONFIG_ACPI_CUSTOM_DSDT is not set
 CONFIG_ACPI_BLACKLIST_YEAR=0
 # CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
 # CONFIG_ACPI_PCI_SLOT is not set
-CONFIG_ACPI_POWER=y
 CONFIG_ACPI_SYSTEM=y
 CONFIG_ACPI_CONTAINER=m
 
@@ -275,7 +273,7 @@ CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_SYSCALL=y
 # CONFIG_PCIEPORTBUS is not set
 CONFIG_ARCH_SUPPORTS_MSI=y
-# CONFIG_PCI_MSI is not set
+CONFIG_PCI_MSI=y
 CONFIG_PCI_LEGACY=y
 # CONFIG_PCI_DEBUG is not set
 CONFIG_HOTPLUG_PCI=m
@@ -286,6 +284,7 @@ CONFIG_HOTPLUG_PCI_ACPI=m
 # CONFIG_HOTPLUG_PCI_SHPC is not set
 # CONFIG_HOTPLUG_PCI_SGI is not set
 # CONFIG_PCCARD is not set
+CONFIG_DMAR=y
 CONFIG_NET=y
 
 #
@@ -333,6 +332,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
@@ -353,11 +353,10 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
 # CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_OLD_REGULATORY=y
 # CONFIG_WIRELESS_EXT is not set
 # CONFIG_MAC80211 is not set
 # CONFIG_IEEE80211 is not set
@@ -385,7 +384,7 @@ CONFIG_PROC_EVENTS=y
 # CONFIG_MTD is not set
 # CONFIG_PARPORT is not set
 CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
+# CONFIG_PNP_DEBUG_MESSAGES is not set
 
 #
 # Protocols
@@ -419,10 +418,9 @@ CONFIG_SGI_XP=m
 # CONFIG_HP_ILO is not set
 CONFIG_SGI_GRU=m
 # CONFIG_SGI_GRU_DEBUG is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 CONFIG_IDE=y
-CONFIG_IDE_MAX_HWIFS=4
-CONFIG_BLK_DEV_IDE=y
 
 #
 # Please see Documentation/ide/ide.txt for help/info on IDE drives
@@ -430,12 +428,12 @@ CONFIG_BLK_DEV_IDE=y
 CONFIG_IDE_TIMINGS=y
 CONFIG_IDE_ATAPI=y
 # CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=y
-# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
 CONFIG_BLK_DEV_IDECD=y
 CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
 # CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
 CONFIG_BLK_DEV_IDESCSI=m
 # CONFIG_BLK_DEV_IDEACPI is not set
 # CONFIG_IDE_TASK_IOCTL is not set
@@ -705,6 +703,9 @@ CONFIG_TULIP=m
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 CONFIG_NET_PCI=y
 # CONFIG_PCNET32 is not set
 # CONFIG_AMD8111_ETH is not set
@@ -725,11 +726,11 @@ CONFIG_E100=m
 # CONFIG_TLAN is not set
 # CONFIG_VIA_RHINE is not set
 # CONFIG_SC92031 is not set
+# CONFIG_ATL2 is not set
 CONFIG_NETDEV_1000=y
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
 CONFIG_E1000=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 # CONFIG_E1000E is not set
 # CONFIG_IP1000 is not set
 CONFIG_IGB=y
@@ -747,18 +748,22 @@ CONFIG_TIGON3=y
 # CONFIG_QLA3XXX is not set
 # CONFIG_ATL1 is not set
 # CONFIG_ATL1E is not set
+# CONFIG_JME is not set
 CONFIG_NETDEV_10000=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_CHELSIO_T3 is not set
+# CONFIG_ENIC is not set
 # CONFIG_IXGBE is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
 # CONFIG_NETXEN_NIC is not set
 # CONFIG_NIU is not set
+# CONFIG_MLX4_EN is not set
 # CONFIG_MLX4_CORE is not set
 # CONFIG_TEHUTI is not set
 # CONFIG_BNX2X is not set
+# CONFIG_QLGE is not set
 # CONFIG_SFC is not set
 # CONFIG_TR is not set
 
@@ -826,9 +831,11 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
 CONFIG_MOUSE_PS2_SYNAPTICS=y
 CONFIG_MOUSE_PS2_LIFEBOOK=y
 CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
 # CONFIG_MOUSE_PS2_TOUCHKIT is not set
 # CONFIG_MOUSE_SERIAL is not set
 # CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_BCM5974 is not set
 # CONFIG_MOUSE_VSXXXAA is not set
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_INPUT_TABLET is not set
@@ -942,15 +949,16 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_VT8231 is not set
 # CONFIG_SENSORS_W83627HF is not set
 # CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_SENSORS_LIS3LV02D is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
 CONFIG_THERMAL=m
 # CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -959,6 +967,8 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -1009,6 +1019,7 @@ CONFIG_VGA_CONSOLE=y
 # CONFIG_VGACON_SOFT_SCROLLBACK is not set
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_SOUND=m
+CONFIG_SOUND_OSS_CORE=y
 CONFIG_SND=m
 CONFIG_SND_TIMER=m
 CONFIG_SND_PCM=m
@@ -1113,8 +1124,7 @@ CONFIG_HID=y
 # USB Input Devices
 #
 CONFIG_USB_HID=m
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-# CONFIG_HID_FF is not set
+# CONFIG_HID_PID is not set
 # CONFIG_USB_HIDDEV is not set
 
 #
@@ -1122,6 +1132,34 @@ CONFIG_USB_HID=m
 #
 # CONFIG_USB_KBD is not set
 # CONFIG_USB_MOUSE is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
+CONFIG_HID_A4TECH=m
+CONFIG_HID_APPLE=m
+CONFIG_HID_BELKIN=m
+CONFIG_HID_BRIGHT=m
+CONFIG_HID_CHERRY=m
+CONFIG_HID_CHICONY=m
+CONFIG_HID_CYPRESS=m
+CONFIG_HID_DELL=m
+CONFIG_HID_EZKEY=m
+CONFIG_HID_GYRATION=m
+CONFIG_HID_LOGITECH=m
+# CONFIG_LOGITECH_FF is not set
+# CONFIG_LOGIRUMBLEPAD2_FF is not set
+CONFIG_HID_MICROSOFT=m
+CONFIG_HID_MONTEREY=m
+CONFIG_HID_PANTHERLORD=m
+# CONFIG_PANTHERLORD_FF is not set
+CONFIG_HID_PETALYNX=m
+CONFIG_HID_SAMSUNG=m
+CONFIG_HID_SONY=m
+CONFIG_HID_SUNPLUS=m
+# CONFIG_THRUSTMASTER_FF is not set
+# CONFIG_ZEROPLUS_FF is not set
 CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1138,6 +1176,9 @@ CONFIG_USB_DEVICE_CLASS=y
 # CONFIG_USB_DYNAMIC_MINORS is not set
 # CONFIG_USB_SUSPEND is not set
 # CONFIG_USB_OTG is not set
+CONFIG_USB_MON=y
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
 
 #
 # USB Host Controller Drivers
@@ -1155,6 +1196,12 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
 CONFIG_USB_UHCI_HCD=m
 # CONFIG_USB_SL811_HCD is not set
 # CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_WHCI_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+
+#
+# Enable Host or Gadget support to see Inventra options
+#
 
 #
 # USB Device Class drivers
@@ -1162,13 +1209,14 @@ CONFIG_USB_UHCI_HCD=m
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_PRINTER is not set
 # CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
 
 #
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
 #
 
 #
-# may also be needed; see USB_STORAGE Help for more information
+# see USB_STORAGE Help for more information
 #
 CONFIG_USB_STORAGE=m
 # CONFIG_USB_STORAGE_DEBUG is not set
@@ -1191,7 +1239,6 @@ CONFIG_USB_STORAGE=m
 #
 # CONFIG_USB_MDC800 is not set
 # CONFIG_USB_MICROTEK is not set
-CONFIG_USB_MON=y
 
 #
 # USB port drivers
@@ -1204,7 +1251,7 @@ CONFIG_USB_MON=y
 # CONFIG_USB_EMI62 is not set
 # CONFIG_USB_EMI26 is not set
 # CONFIG_USB_ADUTUX is not set
-# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_SEVSEG is not set
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
@@ -1222,7 +1269,9 @@ CONFIG_USB_MON=y
 # CONFIG_USB_IOWARRIOR is not set
 # CONFIG_USB_TEST is not set
 # CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
 # CONFIG_USB_GADGET is not set
+# CONFIG_UWB is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
 # CONFIG_NEW_LEDS is not set
@@ -1246,6 +1295,15 @@ CONFIG_INFINIBAND_IPOIB_DEBUG=y
 # CONFIG_RTC_CLASS is not set
 # CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
+
+#
+# HP Simulator drivers
+#
+# CONFIG_HP_SIMETH is not set
+# CONFIG_HP_SIMSERIAL is not set
+# CONFIG_HP_SIMSCSI is not set
 CONFIG_MSPEC=m
 
 #
@@ -1260,7 +1318,7 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
 CONFIG_FS_MBCACHE=y
 CONFIG_REISERFS_FS=y
@@ -1271,6 +1329,7 @@ CONFIG_REISERFS_FS_POSIX_ACL=y
 CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
 CONFIG_XFS_FS=y
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_POSIX_ACL is not set
@@ -1282,8 +1341,8 @@ CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
-CONFIG_AUTOFS_FS=y
-CONFIG_AUTOFS4_FS=y
+CONFIG_AUTOFS_FS=m
+CONFIG_AUTOFS4_FS=m
 # CONFIG_FUSE_FS is not set
 
 #
@@ -1314,6 +1373,7 @@ CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_VMCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -1356,6 +1416,7 @@ CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=m
 CONFIG_SUNRPC_GSS=m
 CONFIG_SUNRPC_XPRT_RDMA=m
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=m
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 CONFIG_SMB_FS=m
@@ -1433,38 +1494,6 @@ CONFIG_NLS_KOI8_R=m
 CONFIG_NLS_KOI8_U=m
 CONFIG_NLS_UTF8=m
 # CONFIG_DLM is not set
-CONFIG_HAVE_KVM=y
-CONFIG_VIRTUALIZATION=y
-# CONFIG_KVM is not set
-
-#
-# Library routines
-#
-CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_CRC_CCITT is not set
-# CONFIG_CRC16 is not set
-CONFIG_CRC_T10DIF=y
-CONFIG_CRC_ITU_T=m
-CONFIG_CRC32=y
-# CONFIG_CRC7 is not set
-# CONFIG_LIBCRC32C is not set
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_PLIST=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_GENERIC_PENDING_IRQ=y
-CONFIG_IRQ_PER_CPU=y
-
-#
-# HP Simulator drivers
-#
-# CONFIG_HP_SIMETH is not set
-# CONFIG_HP_SIMSERIAL is not set
-# CONFIG_HP_SIMSCSI is not set
 
 #
 # Kernel hacking
@@ -1503,8 +1532,19 @@ CONFIG_DEBUG_MEMORY_INIT=y
 # CONFIG_DEBUG_SG is not set
 # CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
 # CONFIG_FAULT_INJECTION is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 CONFIG_IA64_GRANULE_16MB=y
 # CONFIG_IA64_GRANULE_64MB is not set
@@ -1519,14 +1559,19 @@ CONFIG_SYSVIPC_COMPAT=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
 
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_AEAD=m
 CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_RNG=m
 CONFIG_CRYPTO_MANAGER=m
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_NULL is not set
@@ -1599,5 +1644,36 @@ CONFIG_CRYPTO_DES=m
 #
 # CONFIG_CRYPTO_DEFLATE is not set
 # CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 CONFIG_CRYPTO_HW=y
 # CONFIG_CRYPTO_DEV_HIFN_795X is not set
+CONFIG_HAVE_KVM=y
+CONFIG_VIRTUALIZATION=y
+# CONFIG_KVM is not set
+# CONFIG_VIRTIO_PCI is not set
+# CONFIG_VIRTIO_BALLOON is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC_T10DIF=y
+CONFIG_CRC_ITU_T=m
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_GENERIC_PENDING_IRQ=y
+CONFIG_IRQ_PER_CPU=y
index f92306bbedb848eb146ece3afde7729abdddac13..8d513a8c5266b4db31ef1cb6fd6eb75777c7dda3 100644 (file)
@@ -4,6 +4,7 @@ menu "HP Simulator drivers"
 
 config HP_SIMETH
        bool "Simulated Ethernet "
+       depends on NET
 
 config HP_SIMSERIAL
        bool "Simulated serial driver support"
index 47d686dba1ebf5b91dae6a2e906de3477c691851..a3e44a5ed497dc6c84d1a6fc701c9884c2d0e40c 100644 (file)
@@ -226,7 +226,7 @@ extern long ia64_cmpxchg_called_with_bad_pointer (void);
 /************************************************/
 #define ia64_ssm                       IA64_INTRINSIC_MACRO(ssm)
 #define ia64_rsm                       IA64_INTRINSIC_MACRO(rsm)
-#define ia64_getreg                    IA64_INTRINSIC_API(getreg)
+#define ia64_getreg                    IA64_INTRINSIC_MACRO(getreg)
 #define ia64_setreg                    IA64_INTRINSIC_API(setreg)
 #define ia64_set_rr                    IA64_INTRINSIC_API(set_rr)
 #define ia64_get_rr                    IA64_INTRINSIC_API(get_rr)
index d577aac1183571c02db0f527e899495c1bf29cdb..33c8e55f5775f7e12330ffe8e37e61568f937f00 100644 (file)
@@ -78,6 +78,18 @@ extern unsigned long ia64_native_getreg_func(int regnum);
                        ia64_native_rsm(mask);  \
        } while (0)
 
+/* returned ip value should be the one in the caller,
+ * not in __paravirt_getreg() */
+#define paravirt_getreg(reg)                                   \
+       ({                                                      \
+               unsigned long res;                              \
+               if ((reg) == _IA64_REG_IP)                      \
+                       res = ia64_native_getreg(_IA64_REG_IP); \
+               else                                            \
+                       res = pv_cpu_ops.getreg(reg);           \
+               res;                                            \
+       })
+
 /******************************************************************************
  * replacement of hand written assembly codes.
  */
index 6417c1ecb44ec47192f70ec6a2f009a502b5022a..14055c636adf24a4f16c80e2fc123f678bbb9edd 100644 (file)
@@ -325,8 +325,6 @@ static inline unsigned long user_stack_pointer(struct pt_regs *regs)
   #define arch_has_block_step()   (1)
   extern void user_enable_block_step(struct task_struct *);
 
-#define __ARCH_WANT_COMPAT_SYS_PTRACE
-
 #endif /* !__KERNEL__ */
 
 /* pt_all_user_regs is used for PTRACE_GETREGS PTRACE_SETREGS */
index 7ef0c594f5ed9a7e618101770d6b9a5469936d69..d435f4a7a96c0f83203a3e4be44b099694b26311 100644 (file)
@@ -499,6 +499,7 @@ GLOBAL_ENTRY(prefetch_stack)
 END(prefetch_stack)
 
 GLOBAL_ENTRY(kernel_execve)
+       rum psr.ac
        mov r15=__NR_execve                     // put syscall number in place
        break __BREAK_SYSCALL
        br.ret.sptk.many rp
index 66e491d8baac3130a4dd68581662395b94a951b4..59301c4728009ecb410516fb0e737107eda42d67 100644 (file)
@@ -260,7 +260,7 @@ start_ap:
         * Switch into virtual mode:
         */
        movl r16=(IA64_PSR_IT|IA64_PSR_IC|IA64_PSR_DT|IA64_PSR_RT|IA64_PSR_DFH|IA64_PSR_BN \
-                 |IA64_PSR_DI)
+                 |IA64_PSR_DI|IA64_PSR_AC)
        ;;
        mov cr.ipsr=r16
        movl r17=1f
index 7dd96c127177ab0e8e0a835849c4cda44ff0e4a7..bab1de2d2f6a0920f40c76a5c36359d56ed2af87 100644 (file)
@@ -1139,7 +1139,7 @@ ia64_mca_modify_original_stack(struct pt_regs *regs,
        return previous_current;
 
 no_mod:
-       printk(KERN_INFO "cpu %d, %s %s, original stack not modified\n",
+       mprintk(KERN_INFO "cpu %d, %s %s, original stack not modified\n",
                        smp_processor_id(), type, msg);
        return previous_current;
 }
index de35d8e8b7d27360fac4ccd7e05256701c27ee9d..9f14c16f63693794445645753ff6d61443151b61 100644 (file)
@@ -130,7 +130,7 @@ ia64_native_getreg_func(int regnum)
        unsigned long res = -1;
        switch (regnum) {
        CASE_GET_REG(GP);
-       CASE_GET_REG(IP);
+       /*CASE_GET_REG(IP);*/ /* returned ip value shouldn't be constant */
        CASE_GET_REG(PSR);
        CASE_GET_REG(TP);
        CASE_GET_REG(SP);
index dbdb778efa055f3a94298105d9eeeba3b9d086a1..2a92f637431d77f0ddeba81c89643c332a3ddac4 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/kernel.h>
 
 #include <asm/page.h>
-#include <asm/iommu.h>
 
 dma_addr_t bad_dma_address __read_mostly;
 EXPORT_SYMBOL(bad_dma_address);
index 26228e2d01ae472bcab1e5917b0c973d826f6f3a..c75b914f2d6bb587c413990663e864f573c9368a 100644 (file)
@@ -53,10 +53,12 @@ int __ref arch_register_cpu(int num)
 }
 EXPORT_SYMBOL(arch_register_cpu);
 
-void arch_unregister_cpu(int num)
+void __ref arch_unregister_cpu(int num)
 {
        unregister_cpu(&sysfs_cpus[num].cpu);
+#ifdef CONFIG_ACPI
        unmap_cpu_from_node(num, cpu_to_node(num));
+#endif
 }
 EXPORT_SYMBOL(arch_unregister_cpu);
 #else
index 8e99fed6b3fd932a61b8d2de2537710748717b2d..f833a0b4188df833650ed4a621172f9765269e85 100644 (file)
@@ -20,6 +20,8 @@ if VIRTUALIZATION
 config KVM
        tristate "Kernel-based Virtual Machine (KVM) support"
        depends on HAVE_KVM && EXPERIMENTAL
+       # for device assignment:
+       depends on PCI
        select PREEMPT_NOTIFIERS
        select ANON_INODES
        ---help---
index 3ab4d6d507045379fc139836e2091560e4483a5a..92cef66ca268b8631db5b3b72b9887cb8f7dc446 100644 (file)
@@ -58,7 +58,7 @@ endif
 kvm-objs := $(common-objs) kvm-ia64.o kvm_fw.o
 obj-$(CONFIG_KVM) += kvm.o
 
-EXTRA_CFLAGS_vcpu.o += -mfixed-range=f2-f5,f12-f127
+CFLAGS_vcpu.o += -mfixed-range=f2-f5,f12-f127
 kvm-intel-objs = vmm.o vmm_ivt.o trampoline.o vcpu.o optvfault.o mmio.o \
        vtlb.o process.o
 #Add link memcpy and memset to avoid possible structure assignment error
index 3caac477de9ebc563f7d125f78e81023c33dba01..af1464f7a6ad270ae6de3783f7d6096aba726294 100644 (file)
@@ -673,16 +673,16 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
 
        vcpu_load(vcpu);
 
+       if (vcpu->sigset_active)
+               sigprocmask(SIG_SETMASK, &vcpu->sigset, &sigsaved);
+
        if (unlikely(vcpu->arch.mp_state == KVM_MP_STATE_UNINITIALIZED)) {
                kvm_vcpu_block(vcpu);
                clear_bit(KVM_REQ_UNHALT, &vcpu->requests);
-               vcpu_put(vcpu);
-               return -EAGAIN;
+               r = -EAGAIN;
+               goto out;
        }
 
-       if (vcpu->sigset_active)
-               sigprocmask(SIG_SETMASK, &vcpu->sigset, &sigsaved);
-
        if (vcpu->mmio_needed) {
                memcpy(vcpu->mmio_data, kvm_run->mmio.data, 8);
                kvm_set_mmio_data(vcpu);
@@ -690,7 +690,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
                vcpu->mmio_needed = 0;
        }
        r = __vcpu_run(vcpu, kvm_run);
-
+out:
        if (vcpu->sigset_active)
                sigprocmask(SIG_SETMASK, &sigsaved, NULL);
 
index 634abad979b5143953e6eae5191eff3b4a673bc1..32254ce9a1bda61a25f3edce6143206a7d651aa1 100644 (file)
@@ -107,10 +107,10 @@ END(kvm_vps_resume_normal)
 GLOBAL_ENTRY(kvm_vps_resume_handler)
        movl r30 = PAL_VPS_RESUME_HANDLER
        ;;
-       ld8 r27=[r25]
+       ld8 r26=[r25]
        shr r17=r17,IA64_ISR_IR_BIT
        ;;
-       dep r27=r17,r27,63,1   // bit 63 of r27 indicate whether enable CFLE
+       dep r26=r17,r26,63,1   // bit 63 of r26 indicate whether enable CFLE
        mov pr=r23,-2
        br.sptk.many kvm_vps_entry
 END(kvm_vps_resume_handler)
@@ -894,12 +894,15 @@ ENTRY(kvm_resume_to_guest)
        ;;
        ld8 r19=[r19]
        mov b0=r29
-       cmp.ne p6,p7 = r0,r0
+       mov r27=cr.isr
        ;;
-       tbit.z p6,p7 = r19,IA64_PSR_IC_BIT              // p1=vpsr.ic
+       tbit.z p6,p7 = r19,IA64_PSR_IC_BIT              // p7=vpsr.ic
+       shr r27=r27,IA64_ISR_IR_BIT
        ;;
        (p6) ld8 r26=[r25]
        (p7) mov b0=r28
+       ;;
+       (p6) dep r26=r27,r26,63,1
        mov pr=r31,-2
        br.sptk.many b0             // call pal service
        ;;
index 341e3fee280cd502cbb270aaea00218548fcdbff..e9b2a4e121c052636745927e40964417c5955812 100644 (file)
@@ -384,6 +384,10 @@ static inline u64 __gpfn_is_io(u64 gpfn)
 #define MODE_IND(psr)  \
        (((psr).it << 2) + ((psr).dt << 1) + (psr).rt)
 
+#ifndef CONFIG_SMP
+#define _vmm_raw_spin_lock(x)   do {}while(0)
+#define _vmm_raw_spin_unlock(x) do {}while(0)
+#else
 #define _vmm_raw_spin_lock(x)                                          \
        do {                                                            \
                __u32 *ia64_spinlock_ptr = (__u32 *) (x);               \
@@ -403,6 +407,7 @@ static inline u64 __gpfn_is_io(u64 gpfn)
        do { barrier();                         \
                ((spinlock_t *)x)->raw_lock.lock = 0; } \
 while (0)
+#endif
 
 void vmm_spin_lock(spinlock_t *lock);
 void vmm_spin_unlock(spinlock_t *lock);
index c3aa851d1ca60278c9897859ba9a6740976ae6c9..4e1801bad83a7fdc171a90af0ff3c2df4277f62f 100644 (file)
@@ -292,7 +292,7 @@ EXPORT_SYMBOL(sn_io_slot_fixup);
  * sn_pci_controller_fixup() - This routine sets up a bus's resources
  *                            consistent with the Linux PCI abstraction layer.
  */
-static void
+static void __init
 sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
 {
        s64 status = 0;
index 96c31b4180c349b00b400c73daf670227f957051..0c66dbdd1d728d0cd826b865a0d0ffe0cdd8b2cc 100644 (file)
@@ -5,7 +5,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (c) 2000-2007 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2008 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 #include <linux/irq.h>
@@ -375,6 +375,7 @@ void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info)
        int cpu = nasid_slice_to_cpuid(nasid, slice);
 #ifdef CONFIG_SMP
        int cpuphys;
+       irq_desc_t *desc;
 #endif
 
        pci_dev_get(pci_dev);
@@ -391,6 +392,12 @@ void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info)
 #ifdef CONFIG_SMP
        cpuphys = cpu_physical_id(cpu);
        set_irq_affinity_info(sn_irq_info->irq_irq, cpuphys, 0);
+       desc = irq_to_desc(sn_irq_info->irq_irq);
+       /*
+        * Affinity was set by the PROM, prevent it from
+        * being reset by the request_irq() path.
+        */
+       desc->status |= IRQ_AFFINITY_SET;
 #endif
 }
 
index bb1d249296408d3def799a759ee48e5b0b415378..02c5b8a9fb6061037e8c35551a4881198cf1d4fc 100644 (file)
@@ -200,7 +200,7 @@ static int __cpuinitdata shub_1_1_found;
  * Set flag for enabling shub specific wars
  */
 
-static inline int __init is_shub_1_1(int nasid)
+static inline int __cpuinit is_shub_1_1(int nasid)
 {
        unsigned long id;
        int rev;
@@ -212,7 +212,7 @@ static inline int __init is_shub_1_1(int nasid)
        return rev <= 2;
 }
 
-static void __init sn_check_for_wars(void)
+static void __cpuinit sn_check_for_wars(void)
 {
        int cnode;
 
@@ -512,7 +512,6 @@ static void __init sn_init_pdas(char **cmdline_p)
        for_each_online_node(cnode) {
                nodepdaindr[cnode] =
                    alloc_bootmem_node(NODE_DATA(cnode), sizeof(nodepda_t));
-               memset(nodepdaindr[cnode], 0, sizeof(nodepda_t));
                memset(nodepdaindr[cnode]->phys_cpuid, -1,
                    sizeof(nodepdaindr[cnode]->phys_cpuid));
                spin_lock_init(&nodepdaindr[cnode]->ptc_lock);
@@ -521,11 +520,9 @@ static void __init sn_init_pdas(char **cmdline_p)
        /*
         * Allocate & initialize nodepda for TIOs.  For now, put them on node 0.
         */
-       for (cnode = num_online_nodes(); cnode < num_cnodes; cnode++) {
+       for (cnode = num_online_nodes(); cnode < num_cnodes; cnode++)
                nodepdaindr[cnode] =
                    alloc_bootmem_node(NODE_DATA(0), sizeof(nodepda_t));
-               memset(nodepdaindr[cnode], 0, sizeof(nodepda_t));
-       }
 
        /*
         * Now copy the array of nodepda pointers to each nodepda.
index d4ff0b9e79f194c9335b627b42e1748d00173dca..45e02bb64a92353137b484cd1d9d1d364f60ca63 100644 (file)
@@ -58,7 +58,7 @@ __HCALL2(xen_set_rr, HYPERPRIVOP_SET_RR)
 __HCALL2(xen_set_kr, HYPERPRIVOP_SET_KR)
 
 #ifdef CONFIG_IA32_SUPPORT
-__HCALL1(xen_get_eflag, HYPERPRIVOP_GET_EFLAG)
+__HCALL0(xen_get_eflag, HYPERPRIVOP_GET_EFLAG)
 __HCALL1(xen_set_eflag, HYPERPRIVOP_SET_EFLAG) // refer SDM vol1 3.1.8
 #endif /* CONFIG_IA32_SUPPORT */
 
index 40180778a5c723e069cfc96739a0600f10b6e02b..90916067b9c17d766c33cb7e8033ced06943602a 100644 (file)
@@ -23,7 +23,7 @@ __INITDATA
 /*
  * References to members of the boot_cpu_data structure.
  */
-       .text
+.section .text.head, "ax"
        .global start_kernel
        .global __bss_start
        .global _end
@@ -133,7 +133,6 @@ loop1:
 /*
  * AP startup routine
  */
-       .text
        .global eit_vector
 ENTRY(startup_AP)
 ;; setup EVB
@@ -230,6 +229,7 @@ ENTRY(startup_AP)
        nop
 #endif  /* CONFIG_SMP */
 
+       .text
 ENTRY(stack_start)
        .long   init_thread_union+8192
        .long   __KERNEL_DS
index 15a6f36c06db9c7c84db8d4698339f3f8d9ba413..9db05df20c0ef0a5bba249282604bbcc2b1763e9 100644 (file)
@@ -27,6 +27,7 @@ SECTIONS
   _text = .;                   /* Text and read-only data */
   .boot : { *(.boot) } = 0
   .text : {
+       *(.text.head)
        TEXT_TEXT
        SCHED_TEXT
        LOCK_TEXT
index 8bd61a640fc9dde53b4e92f5e9efe53fbd6d5507..23597beb66c118cc6e569952b605a2e6af3f7825 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc6
-# Wed Sep 10 09:02:00 2008
+# Linux kernel version: 2.6.28-rc7
+# Tue Dec  2 20:27:42 2008
 #
 CONFIG_M68K=y
 CONFIG_MMU=y
@@ -14,7 +14,6 @@ CONFIG_TIME_LOW_RES=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_NO_IOPORT=y
 # CONFIG_NO_DMA is not set
-CONFIG_ARCH_SUPPORTS_AOUT=y
 CONFIG_HZ=100
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -67,22 +66,13 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
 # CONFIG_PROFILING is not set
 # CONFIG_MARKERS is not set
-# CONFIG_HAVE_OPROFILE is not set
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
-# CONFIG_HAVE_KPROBES is not set
-# CONFIG_HAVE_KRETPROBES is not set
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
-# CONFIG_HAVE_CLK is not set
-CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -115,11 +105,11 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Platform dependent setup
 #
-# CONFIG_SUN3 is not set
 CONFIG_AMIGA=y
 # CONFIG_ATARI is not set
 # CONFIG_MAC is not set
@@ -148,19 +138,21 @@ CONFIG_DISCONTIGMEM_MANUAL=y
 CONFIG_DISCONTIGMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 
 #
 # General setup
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 CONFIG_BINFMT_AOUT=m
 CONFIG_BINFMT_MISC=m
 CONFIG_ZORRO=y
@@ -212,7 +204,6 @@ CONFIG_INET_TCP_DIAG=m
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-# CONFIG_IP_VS is not set
 CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
@@ -262,13 +253,14 @@ CONFIG_NF_CONNTRACK_SANE=m
 CONFIG_NF_CONNTRACK_SIP=m
 CONFIG_NF_CONNTRACK_TFTP=m
 # CONFIG_NF_CT_NETLINK is not set
+# CONFIG_NETFILTER_TPROXY is not set
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
 CONFIG_NETFILTER_XT_TARGET_RATEEST=m
 CONFIG_NETFILTER_XT_TARGET_TRACE=m
@@ -282,19 +274,22 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_HELPER=m
 CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_OWNER=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_RATEEST=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
 CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
@@ -302,20 +297,20 @@ CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 CONFIG_NETFILTER_XT_MATCH_TIME=m
 CONFIG_NETFILTER_XT_MATCH_U32=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+# CONFIG_IP_VS is not set
 
 #
 # IP: Netfilter Configuration
 #
+CONFIG_NF_DEFRAG_IPV4=m
 CONFIG_NF_CONNTRACK_IPV4=m
 CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
@@ -323,8 +318,8 @@ CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_NF_NAT=m
 CONFIG_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_NF_NAT_SNMP_BASIC=m
 CONFIG_NF_NAT_PROTO_GRE=m
 CONFIG_NF_NAT_PROTO_UDPLITE=m
@@ -337,9 +332,9 @@ CONFIG_NF_NAT_PPTP=m
 CONFIG_NF_NAT_H323=m
 CONFIG_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
@@ -351,16 +346,16 @@ CONFIG_IP_NF_ARP_MANGLE=m
 CONFIG_NF_CONNTRACK_IPV6=m
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
 CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_HL=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
 CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_REJECT=m
 CONFIG_IP6_NF_MANGLE=m
 CONFIG_IP6_NF_TARGET_HL=m
@@ -387,6 +382,7 @@ CONFIG_SCTP_HMAC_MD5=y
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 CONFIG_LLC=m
@@ -410,19 +406,8 @@ CONFIG_NET_CLS_ROUTE=y
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-CONFIG_WIRELESS_EXT=y
-# CONFIG_WIRELESS_EXT_SYSFS is not set
-# CONFIG_MAC80211 is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -470,21 +455,20 @@ CONFIG_ATA_OVER_ETH=m
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
 
 #
 # Please see Documentation/ide/ide.txt for help/info on IDE drives
 #
-CONFIG_IDE_ATAPI=y
 # CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=y
-# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
 CONFIG_BLK_DEV_IDECD=y
 CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
 # CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=m
 # CONFIG_BLK_DEV_IDESCSI is not set
 # CONFIG_IDE_TASK_IOCTL is not set
 CONFIG_IDE_PROC_FS=y
@@ -609,8 +593,12 @@ CONFIG_APNE=m
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_NET_PCI is not set
 # CONFIG_B44 is not set
+# CONFIG_CS89x0 is not set
 # CONFIG_NET_POCKET is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
@@ -763,11 +751,11 @@ CONFIG_GEN_RTC_X=y
 # CONFIG_THERMAL is not set
 # CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -777,6 +765,7 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
 # CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -802,6 +791,7 @@ CONFIG_SSB_POSSIBLE=y
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -829,6 +819,8 @@ CONFIG_FB_FM2=y
 # CONFIG_FB_UVESA is not set
 # CONFIG_FB_S1D13XXX is not set
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -852,12 +844,19 @@ CONFIG_LOGO_LINUX_MONO=y
 CONFIG_LOGO_LINUX_VGA16=y
 CONFIG_LOGO_LINUX_CLUT224=y
 CONFIG_SOUND=m
+CONFIG_SOUND_OSS_CORE=y
 CONFIG_DMASOUND_PAULA=m
 CONFIG_DMASOUND=m
 CONFIG_HID_SUPPORT=y
 CONFIG_HID=m
 # CONFIG_HID_DEBUG is not set
 CONFIG_HIDRAW=y
+# CONFIG_HID_PID is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
@@ -867,6 +866,8 @@ CONFIG_HIDRAW=y
 # CONFIG_DMADEVICES is not set
 # CONFIG_AUXDISPLAY is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # Character devices
@@ -883,8 +884,9 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
+CONFIG_JBD2=m
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
@@ -895,6 +897,7 @@ CONFIG_JFS_FS=m
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 CONFIG_XFS_FS=m
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_POSIX_ACL is not set
@@ -906,6 +909,7 @@ CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
 # CONFIG_OCFS2_FS_STATS is not set
 # CONFIG_OCFS2_DEBUG_MASKLOG is not set
 # CONFIG_OCFS2_DEBUG_FS is not set
+# CONFIG_OCFS2_COMPAT_JBD is not set
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -944,6 +948,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -986,6 +991,7 @@ CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=m
 CONFIG_SUNRPC_GSS=m
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=m
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 CONFIG_SMB_FS=m
@@ -1059,7 +1065,13 @@ CONFIG_MAGIC_SYSRQ=y
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 
 #
@@ -1067,6 +1079,7 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_XOR_BLOCKS=m
 CONFIG_ASYNC_CORE=m
@@ -1077,10 +1090,12 @@ CONFIG_CRYPTO=y
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_AEAD=m
-CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_AEAD=y
+CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_GF128MUL=m
 CONFIG_CRYPTO_NULL=m
@@ -1154,14 +1169,17 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m
 #
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 # CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
 CONFIG_CRC_CCITT=m
 CONFIG_CRC16=m
 CONFIG_CRC_T10DIF=y
index c41b854c028425fda2c4ffda83f892c78038de98..935108d115a05d96210f3e6663426ccc25798034 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc6
-# Wed Sep 10 09:02:01 2008
+# Linux kernel version: 2.6.28-rc7
+# Tue Dec  2 20:27:43 2008
 #
 CONFIG_M68K=y
 CONFIG_MMU=y
@@ -14,7 +14,6 @@ CONFIG_TIME_LOW_RES=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_NO_IOPORT=y
 # CONFIG_NO_DMA is not set
-CONFIG_ARCH_SUPPORTS_AOUT=y
 CONFIG_HZ=100
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -67,22 +66,13 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
 # CONFIG_PROFILING is not set
 # CONFIG_MARKERS is not set
-# CONFIG_HAVE_OPROFILE is not set
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
-# CONFIG_HAVE_KPROBES is not set
-# CONFIG_HAVE_KRETPROBES is not set
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
-# CONFIG_HAVE_CLK is not set
-CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -115,11 +105,11 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Platform dependent setup
 #
-# CONFIG_SUN3 is not set
 # CONFIG_AMIGA is not set
 # CONFIG_ATARI is not set
 # CONFIG_MAC is not set
@@ -148,19 +138,21 @@ CONFIG_DISCONTIGMEM_MANUAL=y
 CONFIG_DISCONTIGMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 
 #
 # General setup
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 CONFIG_BINFMT_AOUT=m
 CONFIG_BINFMT_MISC=m
 CONFIG_HEARTBEAT=y
@@ -210,7 +202,6 @@ CONFIG_INET_TCP_DIAG=m
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-# CONFIG_IP_VS is not set
 CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
@@ -260,13 +251,14 @@ CONFIG_NF_CONNTRACK_SANE=m
 CONFIG_NF_CONNTRACK_SIP=m
 CONFIG_NF_CONNTRACK_TFTP=m
 # CONFIG_NF_CT_NETLINK is not set
+# CONFIG_NETFILTER_TPROXY is not set
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
 CONFIG_NETFILTER_XT_TARGET_RATEEST=m
 CONFIG_NETFILTER_XT_TARGET_TRACE=m
@@ -280,19 +272,22 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_HELPER=m
 CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_OWNER=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_RATEEST=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
 CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
@@ -300,20 +295,20 @@ CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 CONFIG_NETFILTER_XT_MATCH_TIME=m
 CONFIG_NETFILTER_XT_MATCH_U32=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+# CONFIG_IP_VS is not set
 
 #
 # IP: Netfilter Configuration
 #
+CONFIG_NF_DEFRAG_IPV4=m
 CONFIG_NF_CONNTRACK_IPV4=m
 CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
@@ -321,8 +316,8 @@ CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_NF_NAT=m
 CONFIG_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_NF_NAT_SNMP_BASIC=m
 CONFIG_NF_NAT_PROTO_GRE=m
 CONFIG_NF_NAT_PROTO_UDPLITE=m
@@ -335,9 +330,9 @@ CONFIG_NF_NAT_PPTP=m
 CONFIG_NF_NAT_H323=m
 CONFIG_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
@@ -349,16 +344,16 @@ CONFIG_IP_NF_ARP_MANGLE=m
 CONFIG_NF_CONNTRACK_IPV6=m
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
 CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_HL=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
 CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_REJECT=m
 CONFIG_IP6_NF_MANGLE=m
 CONFIG_IP6_NF_TARGET_HL=m
@@ -385,6 +380,7 @@ CONFIG_SCTP_HMAC_MD5=y
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 CONFIG_LLC=m
@@ -408,19 +404,8 @@ CONFIG_NET_CLS_ROUTE=y
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-CONFIG_WIRELESS_EXT=y
-# CONFIG_WIRELESS_EXT_SYSFS is not set
-# CONFIG_MAC80211 is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -458,6 +443,7 @@ CONFIG_ATA_OVER_ETH=m
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
@@ -540,6 +526,9 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_B44 is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
@@ -609,6 +598,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
 CONFIG_MOUSE_PS2_SYNAPTICS=y
 CONFIG_MOUSE_PS2_LIFEBOOK=y
 CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
 # CONFIG_MOUSE_PS2_TOUCHKIT is not set
 CONFIG_MOUSE_SERIAL=m
 # CONFIG_MOUSE_VSXXXAA is not set
@@ -663,11 +653,11 @@ CONFIG_GEN_RTC_X=y
 # CONFIG_THERMAL is not set
 # CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -677,6 +667,7 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
 # CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -702,6 +693,7 @@ CONFIG_SSB_POSSIBLE=y
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 CONFIG_FB_CFB_FILLRECT=y
 # CONFIG_FB_CFB_COPYAREA is not set
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -724,6 +716,8 @@ CONFIG_FB_APOLLO=y
 # CONFIG_FB_UVESA is not set
 # CONFIG_FB_S1D13XXX is not set
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -750,6 +744,12 @@ CONFIG_HID_SUPPORT=y
 CONFIG_HID=m
 # CONFIG_HID_DEBUG is not set
 CONFIG_HIDRAW=y
+# CONFIG_HID_PID is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
@@ -758,6 +758,8 @@ CONFIG_HIDRAW=y
 # CONFIG_RTC_CLASS is not set
 # CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # Character devices
@@ -773,8 +775,9 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
+CONFIG_JBD2=m
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
@@ -785,6 +788,7 @@ CONFIG_JFS_FS=m
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 CONFIG_XFS_FS=m
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_POSIX_ACL is not set
@@ -796,6 +800,7 @@ CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
 # CONFIG_OCFS2_FS_STATS is not set
 # CONFIG_OCFS2_DEBUG_MASKLOG is not set
 # CONFIG_OCFS2_DEBUG_FS is not set
+# CONFIG_OCFS2_COMPAT_JBD is not set
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -834,6 +839,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -877,6 +883,7 @@ CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 CONFIG_SMB_FS=m
@@ -949,7 +956,13 @@ CONFIG_MAGIC_SYSRQ=y
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 
 #
@@ -957,6 +970,7 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_XOR_BLOCKS=m
 CONFIG_ASYNC_CORE=m
@@ -967,10 +981,12 @@ CONFIG_CRYPTO=y
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_GF128MUL=m
 CONFIG_CRYPTO_NULL=m
@@ -1044,14 +1060,17 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m
 #
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 # CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
 CONFIG_CRC_CCITT=m
 CONFIG_CRC16=m
 CONFIG_CRC_T10DIF=y
index 654c5acb9e86ea9fc0a2e748e8c4192231eacc1a..a594a1d47b62bc8e7f125a61c7d71faba5cdc245 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc6
-# Wed Sep 10 09:02:02 2008
+# Linux kernel version: 2.6.28-rc7
+# Tue Dec  2 20:27:44 2008
 #
 CONFIG_M68K=y
 CONFIG_MMU=y
@@ -14,7 +14,6 @@ CONFIG_TIME_LOW_RES=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_NO_IOPORT=y
 # CONFIG_NO_DMA is not set
-CONFIG_ARCH_SUPPORTS_AOUT=y
 CONFIG_HZ=100
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -67,22 +66,13 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
 # CONFIG_PROFILING is not set
 # CONFIG_MARKERS is not set
-# CONFIG_HAVE_OPROFILE is not set
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
-# CONFIG_HAVE_KPROBES is not set
-# CONFIG_HAVE_KRETPROBES is not set
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
-# CONFIG_HAVE_CLK is not set
-CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -115,11 +105,11 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Platform dependent setup
 #
-# CONFIG_SUN3 is not set
 # CONFIG_AMIGA is not set
 CONFIG_ATARI=y
 # CONFIG_MAC is not set
@@ -148,19 +138,21 @@ CONFIG_DISCONTIGMEM_MANUAL=y
 CONFIG_DISCONTIGMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 
 #
 # General setup
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 CONFIG_BINFMT_AOUT=m
 CONFIG_BINFMT_MISC=m
 CONFIG_STRAM_PROC=y
@@ -208,7 +200,6 @@ CONFIG_INET_TCP_DIAG=m
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-# CONFIG_IP_VS is not set
 CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
@@ -258,13 +249,14 @@ CONFIG_NF_CONNTRACK_SANE=m
 CONFIG_NF_CONNTRACK_SIP=m
 CONFIG_NF_CONNTRACK_TFTP=m
 # CONFIG_NF_CT_NETLINK is not set
+# CONFIG_NETFILTER_TPROXY is not set
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
 CONFIG_NETFILTER_XT_TARGET_RATEEST=m
 CONFIG_NETFILTER_XT_TARGET_TRACE=m
@@ -278,19 +270,22 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_HELPER=m
 CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_OWNER=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_RATEEST=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
 CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
@@ -298,20 +293,20 @@ CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 CONFIG_NETFILTER_XT_MATCH_TIME=m
 CONFIG_NETFILTER_XT_MATCH_U32=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+# CONFIG_IP_VS is not set
 
 #
 # IP: Netfilter Configuration
 #
+CONFIG_NF_DEFRAG_IPV4=m
 CONFIG_NF_CONNTRACK_IPV4=m
 CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
@@ -319,8 +314,8 @@ CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_NF_NAT=m
 CONFIG_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_NF_NAT_SNMP_BASIC=m
 CONFIG_NF_NAT_PROTO_GRE=m
 CONFIG_NF_NAT_PROTO_UDPLITE=m
@@ -333,9 +328,9 @@ CONFIG_NF_NAT_PPTP=m
 CONFIG_NF_NAT_H323=m
 CONFIG_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
@@ -347,16 +342,16 @@ CONFIG_IP_NF_ARP_MANGLE=m
 CONFIG_NF_CONNTRACK_IPV6=m
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
 CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_HL=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
 CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_REJECT=m
 CONFIG_IP6_NF_MANGLE=m
 CONFIG_IP6_NF_TARGET_HL=m
@@ -383,6 +378,7 @@ CONFIG_SCTP_HMAC_MD5=y
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 CONFIG_LLC=m
@@ -406,19 +402,8 @@ CONFIG_NET_CLS_ROUTE=y
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-CONFIG_WIRELESS_EXT=y
-# CONFIG_WIRELESS_EXT_SYSFS is not set
-# CONFIG_MAC80211 is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -462,21 +447,20 @@ CONFIG_ATA_OVER_ETH=m
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
 
 #
 # Please see Documentation/ide/ide.txt for help/info on IDE drives
 #
-CONFIG_IDE_ATAPI=y
 # CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=y
-# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
 CONFIG_BLK_DEV_IDECD=y
 CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
 # CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=m
 # CONFIG_BLK_DEV_IDESCSI is not set
 # CONFIG_IDE_TASK_IOCTL is not set
 CONFIG_IDE_PROC_FS=y
@@ -565,12 +549,15 @@ CONFIG_EQUALIZER=m
 CONFIG_VETH=m
 # CONFIG_PHYLIB is not set
 CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
+CONFIG_MII=y
 CONFIG_ATARILANCE=m
 # CONFIG_IBM_NEW_EMAC_ZMII is not set
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_B44 is not set
 # CONFIG_NET_POCKET is not set
 # CONFIG_NETDEV_1000 is not set
@@ -644,6 +631,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
 CONFIG_MOUSE_PS2_SYNAPTICS=y
 CONFIG_MOUSE_PS2_LIFEBOOK=y
 CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
 # CONFIG_MOUSE_PS2_TOUCHKIT is not set
 # CONFIG_MOUSE_SERIAL is not set
 CONFIG_MOUSE_ATARI=m
@@ -706,11 +694,11 @@ CONFIG_GEN_RTC_X=y
 # CONFIG_THERMAL is not set
 # CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -720,6 +708,7 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
 # CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -745,6 +734,7 @@ CONFIG_SSB_POSSIBLE=y
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -768,6 +758,8 @@ CONFIG_FB_ATARI=y
 # CONFIG_FB_S1D13XXX is not set
 # CONFIG_FB_ATY is not set
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -790,12 +782,19 @@ CONFIG_LOGO_LINUX_MONO=y
 CONFIG_LOGO_LINUX_VGA16=y
 CONFIG_LOGO_LINUX_CLUT224=y
 CONFIG_SOUND=m
+CONFIG_SOUND_OSS_CORE=y
 CONFIG_DMASOUND_ATARI=m
 CONFIG_DMASOUND=m
 CONFIG_HID_SUPPORT=y
 CONFIG_HID=m
 # CONFIG_HID_DEBUG is not set
 CONFIG_HIDRAW=y
+# CONFIG_HID_PID is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
@@ -805,6 +804,8 @@ CONFIG_HIDRAW=y
 # CONFIG_DMADEVICES is not set
 # CONFIG_AUXDISPLAY is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # Character devices
@@ -821,10 +822,9 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
-CONFIG_EXT4DEV_FS=y
-# CONFIG_EXT4DEV_FS_XATTR is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
-CONFIG_JBD2=y
+CONFIG_JBD2=m
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
@@ -835,6 +835,7 @@ CONFIG_JFS_FS=m
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 CONFIG_XFS_FS=m
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_POSIX_ACL is not set
@@ -846,6 +847,7 @@ CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
 # CONFIG_OCFS2_FS_STATS is not set
 # CONFIG_OCFS2_DEBUG_MASKLOG is not set
 # CONFIG_OCFS2_DEBUG_FS is not set
+# CONFIG_OCFS2_COMPAT_JBD is not set
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -884,6 +886,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -925,6 +928,7 @@ CONFIG_LOCKD_V4=y
 CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=m
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 CONFIG_SMB_FS=m
@@ -998,7 +1002,13 @@ CONFIG_MAGIC_SYSRQ=y
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 
 #
@@ -1006,6 +1016,7 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_XOR_BLOCKS=m
 CONFIG_ASYNC_CORE=m
@@ -1016,10 +1027,12 @@ CONFIG_CRYPTO=y
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_AEAD=m
-CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_AEAD=y
+CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_GF128MUL=m
 CONFIG_CRYPTO_NULL=m
@@ -1093,14 +1106,17 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m
 #
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 # CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
 CONFIG_CRC_CCITT=m
 CONFIG_CRC16=y
 CONFIG_CRC_T10DIF=y
index 2e44af0fe54a16b59eed806776384f8efbf6f406..d3d9814a91de73d659b8df0fe0d5e8a16cc2c42a 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc6
-# Wed Sep 10 09:02:03 2008
+# Linux kernel version: 2.6.28-rc7
+# Tue Dec  2 20:27:45 2008
 #
 CONFIG_M68K=y
 CONFIG_MMU=y
@@ -14,7 +14,6 @@ CONFIG_TIME_LOW_RES=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_NO_IOPORT=y
 # CONFIG_NO_DMA is not set
-CONFIG_ARCH_SUPPORTS_AOUT=y
 CONFIG_HZ=100
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -67,22 +66,13 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
 # CONFIG_PROFILING is not set
 # CONFIG_MARKERS is not set
-# CONFIG_HAVE_OPROFILE is not set
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
-# CONFIG_HAVE_KPROBES is not set
-# CONFIG_HAVE_KRETPROBES is not set
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
-# CONFIG_HAVE_CLK is not set
-CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -115,11 +105,11 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Platform dependent setup
 #
-# CONFIG_SUN3 is not set
 # CONFIG_AMIGA is not set
 # CONFIG_ATARI is not set
 # CONFIG_MAC is not set
@@ -151,19 +141,21 @@ CONFIG_DISCONTIGMEM_MANUAL=y
 CONFIG_DISCONTIGMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 
 #
 # General setup
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 CONFIG_BINFMT_AOUT=m
 CONFIG_BINFMT_MISC=m
 CONFIG_PROC_HARDWARE=y
@@ -212,7 +204,6 @@ CONFIG_INET_TCP_DIAG=m
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-# CONFIG_IP_VS is not set
 CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
@@ -262,13 +253,14 @@ CONFIG_NF_CONNTRACK_SANE=m
 CONFIG_NF_CONNTRACK_SIP=m
 CONFIG_NF_CONNTRACK_TFTP=m
 # CONFIG_NF_CT_NETLINK is not set
+# CONFIG_NETFILTER_TPROXY is not set
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
 CONFIG_NETFILTER_XT_TARGET_RATEEST=m
 CONFIG_NETFILTER_XT_TARGET_TRACE=m
@@ -282,19 +274,22 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_HELPER=m
 CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_OWNER=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_RATEEST=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
 CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
@@ -302,20 +297,20 @@ CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 CONFIG_NETFILTER_XT_MATCH_TIME=m
 CONFIG_NETFILTER_XT_MATCH_U32=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+# CONFIG_IP_VS is not set
 
 #
 # IP: Netfilter Configuration
 #
+CONFIG_NF_DEFRAG_IPV4=m
 CONFIG_NF_CONNTRACK_IPV4=m
 CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
@@ -323,8 +318,8 @@ CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_NF_NAT=m
 CONFIG_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_NF_NAT_SNMP_BASIC=m
 CONFIG_NF_NAT_PROTO_GRE=m
 CONFIG_NF_NAT_PROTO_UDPLITE=m
@@ -337,9 +332,9 @@ CONFIG_NF_NAT_PPTP=m
 CONFIG_NF_NAT_H323=m
 CONFIG_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
@@ -351,16 +346,16 @@ CONFIG_IP_NF_ARP_MANGLE=m
 CONFIG_NF_CONNTRACK_IPV6=m
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
 CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_HL=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
 CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_REJECT=m
 CONFIG_IP6_NF_MANGLE=m
 CONFIG_IP6_NF_TARGET_HL=m
@@ -387,6 +382,7 @@ CONFIG_SCTP_HMAC_MD5=y
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 CONFIG_LLC=m
@@ -410,19 +406,8 @@ CONFIG_NET_CLS_ROUTE=y
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-CONFIG_WIRELESS_EXT=y
-# CONFIG_WIRELESS_EXT_SYSFS is not set
-# CONFIG_MAC80211 is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -460,6 +445,7 @@ CONFIG_ATA_OVER_ETH=m
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
@@ -545,6 +531,9 @@ CONFIG_BVME6000_NET=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_B44 is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
@@ -614,6 +603,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
 CONFIG_MOUSE_PS2_SYNAPTICS=y
 CONFIG_MOUSE_PS2_LIFEBOOK=y
 CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
 # CONFIG_MOUSE_PS2_TOUCHKIT is not set
 CONFIG_MOUSE_SERIAL=m
 # CONFIG_MOUSE_VSXXXAA is not set
@@ -668,11 +658,11 @@ CONFIG_GEN_RTC_X=y
 # CONFIG_THERMAL is not set
 # CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -682,6 +672,7 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
 # CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -721,6 +712,12 @@ CONFIG_HID_SUPPORT=y
 CONFIG_HID=m
 # CONFIG_HID_DEBUG is not set
 CONFIG_HIDRAW=y
+# CONFIG_HID_PID is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
@@ -729,6 +726,8 @@ CONFIG_HIDRAW=y
 # CONFIG_RTC_CLASS is not set
 # CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # Character devices
@@ -744,8 +743,9 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
+CONFIG_JBD2=m
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
@@ -756,6 +756,7 @@ CONFIG_JFS_FS=m
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 CONFIG_XFS_FS=m
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_POSIX_ACL is not set
@@ -767,6 +768,7 @@ CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
 # CONFIG_OCFS2_FS_STATS is not set
 # CONFIG_OCFS2_DEBUG_MASKLOG is not set
 # CONFIG_OCFS2_DEBUG_FS is not set
+# CONFIG_OCFS2_COMPAT_JBD is not set
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -805,6 +807,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -848,6 +851,7 @@ CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 CONFIG_SMB_FS=m
@@ -921,7 +925,13 @@ CONFIG_MAGIC_SYSRQ=y
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 
 #
@@ -929,6 +939,7 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_XOR_BLOCKS=m
 CONFIG_ASYNC_CORE=m
@@ -939,10 +950,12 @@ CONFIG_CRYPTO=y
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_GF128MUL=m
 CONFIG_CRYPTO_NULL=m
@@ -1016,14 +1029,17 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m
 #
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 # CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=m
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
 CONFIG_CRC_CCITT=m
 CONFIG_CRC16=m
 CONFIG_CRC_T10DIF=y
index 3570fc89b089f15f157ea4e1b35c90e33614bf40..5556ef088d04051aef7d625ccc5ad590b4916151 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc6
-# Wed Sep 10 09:02:04 2008
+# Linux kernel version: 2.6.28-rc7
+# Tue Dec  2 20:27:46 2008
 #
 CONFIG_M68K=y
 CONFIG_MMU=y
@@ -14,7 +14,6 @@ CONFIG_TIME_LOW_RES=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_NO_IOPORT=y
 # CONFIG_NO_DMA is not set
-CONFIG_ARCH_SUPPORTS_AOUT=y
 CONFIG_HZ=100
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -67,22 +66,13 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
 # CONFIG_PROFILING is not set
 # CONFIG_MARKERS is not set
-# CONFIG_HAVE_OPROFILE is not set
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
-# CONFIG_HAVE_KPROBES is not set
-# CONFIG_HAVE_KRETPROBES is not set
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
-# CONFIG_HAVE_CLK is not set
-CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -115,11 +105,11 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Platform dependent setup
 #
-# CONFIG_SUN3 is not set
 # CONFIG_AMIGA is not set
 # CONFIG_ATARI is not set
 # CONFIG_MAC is not set
@@ -149,19 +139,21 @@ CONFIG_DISCONTIGMEM_MANUAL=y
 CONFIG_DISCONTIGMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 
 #
 # General setup
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 CONFIG_BINFMT_AOUT=m
 CONFIG_BINFMT_MISC=m
 CONFIG_HEARTBEAT=y
@@ -211,7 +203,6 @@ CONFIG_INET_TCP_DIAG=m
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-# CONFIG_IP_VS is not set
 CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
@@ -261,13 +252,14 @@ CONFIG_NF_CONNTRACK_SANE=m
 CONFIG_NF_CONNTRACK_SIP=m
 CONFIG_NF_CONNTRACK_TFTP=m
 # CONFIG_NF_CT_NETLINK is not set
+# CONFIG_NETFILTER_TPROXY is not set
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
 CONFIG_NETFILTER_XT_TARGET_RATEEST=m
 CONFIG_NETFILTER_XT_TARGET_TRACE=m
@@ -281,19 +273,22 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_HELPER=m
 CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_OWNER=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_RATEEST=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
 CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
@@ -301,20 +296,20 @@ CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 CONFIG_NETFILTER_XT_MATCH_TIME=m
 CONFIG_NETFILTER_XT_MATCH_U32=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+# CONFIG_IP_VS is not set
 
 #
 # IP: Netfilter Configuration
 #
+CONFIG_NF_DEFRAG_IPV4=m
 CONFIG_NF_CONNTRACK_IPV4=m
 CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
@@ -322,8 +317,8 @@ CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_NF_NAT=m
 CONFIG_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_NF_NAT_SNMP_BASIC=m
 CONFIG_NF_NAT_PROTO_GRE=m
 CONFIG_NF_NAT_PROTO_UDPLITE=m
@@ -336,9 +331,9 @@ CONFIG_NF_NAT_PPTP=m
 CONFIG_NF_NAT_H323=m
 CONFIG_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
@@ -350,16 +345,16 @@ CONFIG_IP_NF_ARP_MANGLE=m
 CONFIG_NF_CONNTRACK_IPV6=m
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
 CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_HL=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
 CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_REJECT=m
 CONFIG_IP6_NF_MANGLE=m
 CONFIG_IP6_NF_TARGET_HL=m
@@ -386,6 +381,7 @@ CONFIG_SCTP_HMAC_MD5=y
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 CONFIG_LLC=m
@@ -409,19 +405,8 @@ CONFIG_NET_CLS_ROUTE=y
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-CONFIG_WIRELESS_EXT=y
-# CONFIG_WIRELESS_EXT_SYSFS is not set
-# CONFIG_MAC80211 is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -459,6 +444,7 @@ CONFIG_ATA_OVER_ETH=m
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
@@ -542,6 +528,9 @@ CONFIG_HPLANCE=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_B44 is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
@@ -613,6 +602,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
 CONFIG_MOUSE_PS2_SYNAPTICS=y
 CONFIG_MOUSE_PS2_LIFEBOOK=y
 CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
 # CONFIG_MOUSE_PS2_TOUCHKIT is not set
 CONFIG_MOUSE_SERIAL=m
 # CONFIG_MOUSE_VSXXXAA is not set
@@ -673,11 +663,11 @@ CONFIG_GEN_RTC_X=y
 # CONFIG_THERMAL is not set
 # CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -687,6 +677,7 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
 # CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -712,6 +703,7 @@ CONFIG_SSB_POSSIBLE=y
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 # CONFIG_FB_CFB_FILLRECT is not set
 # CONFIG_FB_CFB_COPYAREA is not set
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -734,6 +726,8 @@ CONFIG_FB_HP300=y
 # CONFIG_FB_UVESA is not set
 # CONFIG_FB_S1D13XXX is not set
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -760,6 +754,12 @@ CONFIG_HID_SUPPORT=y
 CONFIG_HID=m
 # CONFIG_HID_DEBUG is not set
 CONFIG_HIDRAW=y
+# CONFIG_HID_PID is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
@@ -768,6 +768,8 @@ CONFIG_HIDRAW=y
 # CONFIG_RTC_CLASS is not set
 # CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # Character devices
@@ -781,8 +783,9 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
+CONFIG_JBD2=m
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
@@ -793,6 +796,7 @@ CONFIG_JFS_FS=m
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 CONFIG_XFS_FS=m
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_POSIX_ACL is not set
@@ -804,6 +808,7 @@ CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
 # CONFIG_OCFS2_FS_STATS is not set
 # CONFIG_OCFS2_DEBUG_MASKLOG is not set
 # CONFIG_OCFS2_DEBUG_FS is not set
+# CONFIG_OCFS2_COMPAT_JBD is not set
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -842,6 +847,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -885,6 +891,7 @@ CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 CONFIG_SMB_FS=m
@@ -957,7 +964,13 @@ CONFIG_MAGIC_SYSRQ=y
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 
 #
@@ -965,6 +978,7 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_XOR_BLOCKS=m
 CONFIG_ASYNC_CORE=m
@@ -975,10 +989,12 @@ CONFIG_CRYPTO=y
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_GF128MUL=m
 CONFIG_CRYPTO_NULL=m
@@ -1052,14 +1068,17 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m
 #
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 # CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
 CONFIG_CRC_CCITT=m
 CONFIG_CRC16=m
 CONFIG_CRC_T10DIF=y
index db6e8822594a47896154e8ba45b1f2f82f4a57ab..c6de25724a2503e3d7c68512de55ffbd7eb2dfb8 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc6
-# Wed Sep 10 09:02:06 2008
+# Linux kernel version: 2.6.28-rc7
+# Tue Dec  2 20:27:47 2008
 #
 CONFIG_M68K=y
 CONFIG_MMU=y
@@ -14,7 +14,6 @@ CONFIG_TIME_LOW_RES=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_NO_IOPORT=y
 # CONFIG_NO_DMA is not set
-CONFIG_ARCH_SUPPORTS_AOUT=y
 CONFIG_HZ=100
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -67,22 +66,13 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
 # CONFIG_PROFILING is not set
 # CONFIG_MARKERS is not set
-# CONFIG_HAVE_OPROFILE is not set
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
-# CONFIG_HAVE_KPROBES is not set
-# CONFIG_HAVE_KRETPROBES is not set
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
-# CONFIG_HAVE_CLK is not set
-CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -115,11 +105,11 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Platform dependent setup
 #
-# CONFIG_SUN3 is not set
 # CONFIG_AMIGA is not set
 # CONFIG_ATARI is not set
 CONFIG_MAC=y
@@ -150,19 +140,21 @@ CONFIG_DISCONTIGMEM_MANUAL=y
 CONFIG_DISCONTIGMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 
 #
 # General setup
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 CONFIG_BINFMT_AOUT=m
 CONFIG_BINFMT_MISC=m
 # CONFIG_HEARTBEAT is not set
@@ -209,7 +201,6 @@ CONFIG_INET_TCP_DIAG=m
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-# CONFIG_IP_VS is not set
 CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
@@ -259,13 +250,14 @@ CONFIG_NF_CONNTRACK_SANE=m
 CONFIG_NF_CONNTRACK_SIP=m
 CONFIG_NF_CONNTRACK_TFTP=m
 # CONFIG_NF_CT_NETLINK is not set
+# CONFIG_NETFILTER_TPROXY is not set
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
 CONFIG_NETFILTER_XT_TARGET_RATEEST=m
 CONFIG_NETFILTER_XT_TARGET_TRACE=m
@@ -279,19 +271,22 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_HELPER=m
 CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_OWNER=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_RATEEST=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
 CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
@@ -299,20 +294,20 @@ CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 CONFIG_NETFILTER_XT_MATCH_TIME=m
 CONFIG_NETFILTER_XT_MATCH_U32=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+# CONFIG_IP_VS is not set
 
 #
 # IP: Netfilter Configuration
 #
+CONFIG_NF_DEFRAG_IPV4=m
 CONFIG_NF_CONNTRACK_IPV4=m
 CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
@@ -320,8 +315,8 @@ CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_NF_NAT=m
 CONFIG_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_NF_NAT_SNMP_BASIC=m
 CONFIG_NF_NAT_PROTO_GRE=m
 CONFIG_NF_NAT_PROTO_UDPLITE=m
@@ -334,9 +329,9 @@ CONFIG_NF_NAT_PPTP=m
 CONFIG_NF_NAT_H323=m
 CONFIG_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
@@ -348,16 +343,16 @@ CONFIG_IP_NF_ARP_MANGLE=m
 CONFIG_NF_CONNTRACK_IPV6=m
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
 CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_HL=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
 CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_REJECT=m
 CONFIG_IP6_NF_MANGLE=m
 CONFIG_IP6_NF_TARGET_HL=m
@@ -384,6 +379,7 @@ CONFIG_SCTP_HMAC_MD5=y
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 CONFIG_LLC=m
@@ -410,19 +406,8 @@ CONFIG_NET_CLS_ROUTE=y
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-CONFIG_WIRELESS_EXT=y
-# CONFIG_WIRELESS_EXT_SYSFS is not set
-# CONFIG_MAC80211 is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -460,21 +445,20 @@ CONFIG_ATA_OVER_ETH=m
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
 
 #
 # Please see Documentation/ide/ide.txt for help/info on IDE drives
 #
-CONFIG_IDE_ATAPI=y
 # CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=y
-# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
 CONFIG_BLK_DEV_IDECD=y
 CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
 # CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=m
 # CONFIG_BLK_DEV_IDESCSI is not set
 # CONFIG_IDE_TASK_IOCTL is not set
 CONFIG_IDE_PROC_FS=y
@@ -581,6 +565,9 @@ CONFIG_MACMACE=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_B44 is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
@@ -650,6 +637,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
 CONFIG_MOUSE_PS2_SYNAPTICS=y
 CONFIG_MOUSE_PS2_LIFEBOOK=y
 CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
 # CONFIG_MOUSE_PS2_TOUCHKIT is not set
 CONFIG_MOUSE_SERIAL=m
 # CONFIG_MOUSE_VSXXXAA is not set
@@ -706,11 +694,11 @@ CONFIG_GEN_RTC_X=y
 # CONFIG_THERMAL is not set
 # CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -720,6 +708,7 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
 # CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -745,6 +734,7 @@ CONFIG_SSB_POSSIBLE=y
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -768,6 +758,8 @@ CONFIG_FB_MAC=y
 # CONFIG_FB_UVESA is not set
 # CONFIG_FB_S1D13XXX is not set
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -796,6 +788,12 @@ CONFIG_HID_SUPPORT=y
 CONFIG_HID=m
 # CONFIG_HID_DEBUG is not set
 CONFIG_HIDRAW=y
+# CONFIG_HID_PID is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
@@ -804,6 +802,8 @@ CONFIG_HIDRAW=y
 # CONFIG_RTC_CLASS is not set
 # CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # Character devices
@@ -820,8 +820,9 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
+CONFIG_JBD2=m
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
@@ -832,6 +833,7 @@ CONFIG_JFS_FS=m
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 CONFIG_XFS_FS=m
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_POSIX_ACL is not set
@@ -843,6 +845,7 @@ CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
 # CONFIG_OCFS2_FS_STATS is not set
 # CONFIG_OCFS2_DEBUG_MASKLOG is not set
 # CONFIG_OCFS2_DEBUG_FS is not set
+# CONFIG_OCFS2_COMPAT_JBD is not set
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -881,6 +884,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -923,6 +927,7 @@ CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=m
 CONFIG_SUNRPC_GSS=m
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=m
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 CONFIG_SMB_FS=m
@@ -996,7 +1001,13 @@ CONFIG_MAGIC_SYSRQ=y
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 
 #
@@ -1004,6 +1015,7 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_XOR_BLOCKS=m
 CONFIG_ASYNC_CORE=m
@@ -1014,10 +1026,12 @@ CONFIG_CRYPTO=y
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_AEAD=m
-CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_AEAD=y
+CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_GF128MUL=m
 CONFIG_CRYPTO_NULL=m
@@ -1091,14 +1105,17 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m
 #
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 # CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
 CONFIG_CRC_CCITT=m
 CONFIG_CRC16=m
 CONFIG_CRC_T10DIF=y
index 1a806102b999234a669805e231dccc4d599db5ac..70693588031ea615c99b62042322e1dfdbb10ecf 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc6
-# Wed Sep 10 09:02:07 2008
+# Linux kernel version: 2.6.28-rc7
+# Tue Dec  2 20:27:48 2008
 #
 CONFIG_M68K=y
 CONFIG_MMU=y
@@ -14,7 +14,6 @@ CONFIG_TIME_LOW_RES=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_NO_IOPORT=y
 # CONFIG_NO_DMA is not set
-CONFIG_ARCH_SUPPORTS_AOUT=y
 CONFIG_HZ=100
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -67,22 +66,13 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
 # CONFIG_PROFILING is not set
 # CONFIG_MARKERS is not set
-# CONFIG_HAVE_OPROFILE is not set
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
-# CONFIG_HAVE_KPROBES is not set
-# CONFIG_HAVE_KRETPROBES is not set
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
-# CONFIG_HAVE_CLK is not set
-CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -115,11 +105,11 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Platform dependent setup
 #
-# CONFIG_SUN3 is not set
 CONFIG_AMIGA=y
 CONFIG_ATARI=y
 CONFIG_MAC=y
@@ -154,19 +144,21 @@ CONFIG_DISCONTIGMEM_MANUAL=y
 CONFIG_DISCONTIGMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 
 #
 # General setup
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 CONFIG_BINFMT_AOUT=m
 CONFIG_BINFMT_MISC=m
 CONFIG_ZORRO=y
@@ -222,7 +214,6 @@ CONFIG_INET_TCP_DIAG=m
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-# CONFIG_IP_VS is not set
 CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
@@ -272,13 +263,14 @@ CONFIG_NF_CONNTRACK_SANE=m
 CONFIG_NF_CONNTRACK_SIP=m
 CONFIG_NF_CONNTRACK_TFTP=m
 # CONFIG_NF_CT_NETLINK is not set
+# CONFIG_NETFILTER_TPROXY is not set
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
 CONFIG_NETFILTER_XT_TARGET_RATEEST=m
 CONFIG_NETFILTER_XT_TARGET_TRACE=m
@@ -292,19 +284,22 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_HELPER=m
 CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_OWNER=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_RATEEST=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
 CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
@@ -312,20 +307,20 @@ CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 CONFIG_NETFILTER_XT_MATCH_TIME=m
 CONFIG_NETFILTER_XT_MATCH_U32=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+# CONFIG_IP_VS is not set
 
 #
 # IP: Netfilter Configuration
 #
+CONFIG_NF_DEFRAG_IPV4=m
 CONFIG_NF_CONNTRACK_IPV4=m
 CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
@@ -333,8 +328,8 @@ CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_NF_NAT=m
 CONFIG_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_NF_NAT_SNMP_BASIC=m
 CONFIG_NF_NAT_PROTO_GRE=m
 CONFIG_NF_NAT_PROTO_UDPLITE=m
@@ -347,9 +342,9 @@ CONFIG_NF_NAT_PPTP=m
 CONFIG_NF_NAT_H323=m
 CONFIG_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
@@ -361,16 +356,16 @@ CONFIG_IP_NF_ARP_MANGLE=m
 CONFIG_NF_CONNTRACK_IPV6=m
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
 CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_HL=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
 CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_REJECT=m
 CONFIG_IP6_NF_MANGLE=m
 CONFIG_IP6_NF_TARGET_HL=m
@@ -397,6 +392,7 @@ CONFIG_SCTP_HMAC_MD5=y
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 CONFIG_LLC=m
@@ -424,19 +420,8 @@ CONFIG_NET_CLS_ROUTE=y
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-CONFIG_WIRELESS_EXT=y
-# CONFIG_WIRELESS_EXT_SYSFS is not set
-# CONFIG_MAC80211 is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -486,21 +471,20 @@ CONFIG_ATA_OVER_ETH=m
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
 
 #
 # Please see Documentation/ide/ide.txt for help/info on IDE drives
 #
-CONFIG_IDE_ATAPI=y
 # CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=y
-# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
 CONFIG_BLK_DEV_IDECD=y
 CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
 # CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=m
 # CONFIG_BLK_DEV_IDESCSI is not set
 # CONFIG_IDE_TASK_IOCTL is not set
 CONFIG_IDE_PROC_FS=y
@@ -629,7 +613,7 @@ CONFIG_VETH=m
 # CONFIG_ARCNET is not set
 # CONFIG_PHYLIB is not set
 CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
+CONFIG_MII=y
 CONFIG_ARIADNE=m
 CONFIG_A2065=m
 CONFIG_HYDRA=m
@@ -657,8 +641,12 @@ CONFIG_NE2000=m
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_NET_PCI is not set
 # CONFIG_B44 is not set
+# CONFIG_CS89x0 is not set
 # CONFIG_NET_POCKET is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
@@ -735,6 +723,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
 CONFIG_MOUSE_PS2_SYNAPTICS=y
 CONFIG_MOUSE_PS2_LIFEBOOK=y
 CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
 # CONFIG_MOUSE_PS2_TOUCHKIT is not set
 CONFIG_MOUSE_SERIAL=m
 # CONFIG_MOUSE_INPORT is not set
@@ -832,11 +821,11 @@ CONFIG_GEN_RTC_X=y
 # CONFIG_THERMAL is not set
 # CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -846,6 +835,7 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
 # CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -871,6 +861,7 @@ CONFIG_SSB_POSSIBLE=y
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -905,6 +896,8 @@ CONFIG_FB_HP300=y
 # CONFIG_FB_S1D13XXX is not set
 # CONFIG_FB_ATY is not set
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -930,6 +923,7 @@ CONFIG_LOGO_LINUX_VGA16=y
 CONFIG_LOGO_LINUX_CLUT224=y
 CONFIG_LOGO_MAC_CLUT224=y
 CONFIG_SOUND=m
+CONFIG_SOUND_OSS_CORE=y
 CONFIG_DMASOUND_ATARI=m
 CONFIG_DMASOUND_PAULA=m
 CONFIG_DMASOUND_Q40=m
@@ -938,6 +932,12 @@ CONFIG_HID_SUPPORT=y
 CONFIG_HID=m
 # CONFIG_HID_DEBUG is not set
 CONFIG_HIDRAW=y
+# CONFIG_HID_PID is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
@@ -947,6 +947,8 @@ CONFIG_HIDRAW=y
 # CONFIG_DMADEVICES is not set
 # CONFIG_AUXDISPLAY is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # Character devices
@@ -973,10 +975,9 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
-CONFIG_EXT4DEV_FS=y
-# CONFIG_EXT4DEV_FS_XATTR is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
-CONFIG_JBD2=y
+CONFIG_JBD2=m
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
@@ -987,6 +988,7 @@ CONFIG_JFS_FS=m
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 CONFIG_XFS_FS=m
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_POSIX_ACL is not set
@@ -998,6 +1000,7 @@ CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
 # CONFIG_OCFS2_FS_STATS is not set
 # CONFIG_OCFS2_DEBUG_MASKLOG is not set
 # CONFIG_OCFS2_DEBUG_FS is not set
+# CONFIG_OCFS2_COMPAT_JBD is not set
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -1036,6 +1039,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -1079,6 +1083,7 @@ CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 CONFIG_SMB_FS=m
@@ -1156,7 +1161,13 @@ CONFIG_MAGIC_SYSRQ=y
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 
 #
@@ -1164,6 +1175,7 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_XOR_BLOCKS=m
 CONFIG_ASYNC_CORE=m
@@ -1174,10 +1186,12 @@ CONFIG_CRYPTO=y
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_GF128MUL=m
 CONFIG_CRYPTO_NULL=m
@@ -1251,14 +1265,17 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m
 #
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 # CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
 CONFIG_CRC_CCITT=m
 CONFIG_CRC16=y
 CONFIG_CRC_T10DIF=y
index cacb5aef6a37e865c76caad27116f08539a30157..52d42715bd0bc5fcbb20fad583227da91547eece 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc6
-# Wed Sep 10 09:02:08 2008
+# Linux kernel version: 2.6.28-rc7
+# Tue Dec  2 20:27:50 2008
 #
 CONFIG_M68K=y
 CONFIG_MMU=y
@@ -14,7 +14,6 @@ CONFIG_TIME_LOW_RES=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_NO_IOPORT=y
 # CONFIG_NO_DMA is not set
-CONFIG_ARCH_SUPPORTS_AOUT=y
 CONFIG_HZ=100
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -67,22 +66,13 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
 # CONFIG_PROFILING is not set
 # CONFIG_MARKERS is not set
-# CONFIG_HAVE_OPROFILE is not set
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
-# CONFIG_HAVE_KPROBES is not set
-# CONFIG_HAVE_KRETPROBES is not set
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
-# CONFIG_HAVE_CLK is not set
-CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -115,11 +105,11 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Platform dependent setup
 #
-# CONFIG_SUN3 is not set
 # CONFIG_AMIGA is not set
 # CONFIG_ATARI is not set
 # CONFIG_MAC is not set
@@ -151,19 +141,21 @@ CONFIG_DISCONTIGMEM_MANUAL=y
 CONFIG_DISCONTIGMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 
 #
 # General setup
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 CONFIG_BINFMT_AOUT=m
 CONFIG_BINFMT_MISC=m
 CONFIG_PROC_HARDWARE=y
@@ -212,7 +204,6 @@ CONFIG_INET_TCP_DIAG=m
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-# CONFIG_IP_VS is not set
 CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
@@ -262,13 +253,14 @@ CONFIG_NF_CONNTRACK_SANE=m
 CONFIG_NF_CONNTRACK_SIP=m
 CONFIG_NF_CONNTRACK_TFTP=m
 # CONFIG_NF_CT_NETLINK is not set
+# CONFIG_NETFILTER_TPROXY is not set
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
 CONFIG_NETFILTER_XT_TARGET_RATEEST=m
 CONFIG_NETFILTER_XT_TARGET_TRACE=m
@@ -282,19 +274,22 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_HELPER=m
 CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_OWNER=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_RATEEST=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
 CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
@@ -302,20 +297,20 @@ CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 CONFIG_NETFILTER_XT_MATCH_TIME=m
 CONFIG_NETFILTER_XT_MATCH_U32=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+# CONFIG_IP_VS is not set
 
 #
 # IP: Netfilter Configuration
 #
+CONFIG_NF_DEFRAG_IPV4=m
 CONFIG_NF_CONNTRACK_IPV4=m
 CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
@@ -323,8 +318,8 @@ CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_NF_NAT=m
 CONFIG_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_NF_NAT_SNMP_BASIC=m
 CONFIG_NF_NAT_PROTO_GRE=m
 CONFIG_NF_NAT_PROTO_UDPLITE=m
@@ -337,9 +332,9 @@ CONFIG_NF_NAT_PPTP=m
 CONFIG_NF_NAT_H323=m
 CONFIG_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
@@ -351,16 +346,16 @@ CONFIG_IP_NF_ARP_MANGLE=m
 CONFIG_NF_CONNTRACK_IPV6=m
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
 CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_HL=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
 CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_REJECT=m
 CONFIG_IP6_NF_MANGLE=m
 CONFIG_IP6_NF_TARGET_HL=m
@@ -387,6 +382,7 @@ CONFIG_SCTP_HMAC_MD5=y
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 CONFIG_LLC=m
@@ -410,19 +406,8 @@ CONFIG_NET_CLS_ROUTE=y
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-CONFIG_WIRELESS_EXT=y
-# CONFIG_WIRELESS_EXT_SYSFS is not set
-# CONFIG_MAC80211 is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -460,6 +445,7 @@ CONFIG_ATA_OVER_ETH=m
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
@@ -544,6 +530,9 @@ CONFIG_MVME147_NET=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_B44 is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
@@ -613,6 +602,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
 CONFIG_MOUSE_PS2_SYNAPTICS=y
 CONFIG_MOUSE_PS2_LIFEBOOK=y
 CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
 # CONFIG_MOUSE_PS2_TOUCHKIT is not set
 CONFIG_MOUSE_SERIAL=m
 # CONFIG_MOUSE_VSXXXAA is not set
@@ -667,11 +657,11 @@ CONFIG_GEN_RTC_X=y
 # CONFIG_THERMAL is not set
 # CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -681,6 +671,7 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
 # CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -720,6 +711,12 @@ CONFIG_HID_SUPPORT=y
 CONFIG_HID=m
 # CONFIG_HID_DEBUG is not set
 CONFIG_HIDRAW=y
+# CONFIG_HID_PID is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
@@ -728,6 +725,8 @@ CONFIG_HIDRAW=y
 # CONFIG_RTC_CLASS is not set
 # CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # Character devices
@@ -743,8 +742,9 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
+CONFIG_JBD2=m
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
@@ -755,6 +755,7 @@ CONFIG_JFS_FS=m
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 CONFIG_XFS_FS=m
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_POSIX_ACL is not set
@@ -766,6 +767,7 @@ CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
 # CONFIG_OCFS2_FS_STATS is not set
 # CONFIG_OCFS2_DEBUG_MASKLOG is not set
 # CONFIG_OCFS2_DEBUG_FS is not set
+# CONFIG_OCFS2_COMPAT_JBD is not set
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -804,6 +806,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -847,6 +850,7 @@ CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 CONFIG_SMB_FS=m
@@ -920,7 +924,13 @@ CONFIG_MAGIC_SYSRQ=y
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 
 #
@@ -928,6 +938,7 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_XOR_BLOCKS=m
 CONFIG_ASYNC_CORE=m
@@ -938,10 +949,12 @@ CONFIG_CRYPTO=y
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_GF128MUL=m
 CONFIG_CRYPTO_NULL=m
@@ -1015,14 +1028,17 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m
 #
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 # CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
 CONFIG_CRC_CCITT=m
 CONFIG_CRC16=m
 CONFIG_CRC_T10DIF=y
index a183e25e348d2a93b7b9e0be16f977a64854848a..3403ed2eda796ace98478d3ea55bd981043b02a2 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc6
-# Wed Sep 10 09:02:09 2008
+# Linux kernel version: 2.6.28-rc7
+# Tue Dec  2 20:27:51 2008
 #
 CONFIG_M68K=y
 CONFIG_MMU=y
@@ -14,7 +14,6 @@ CONFIG_TIME_LOW_RES=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_NO_IOPORT=y
 # CONFIG_NO_DMA is not set
-CONFIG_ARCH_SUPPORTS_AOUT=y
 CONFIG_HZ=100
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -67,22 +66,13 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
 # CONFIG_PROFILING is not set
 # CONFIG_MARKERS is not set
-# CONFIG_HAVE_OPROFILE is not set
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
-# CONFIG_HAVE_KPROBES is not set
-# CONFIG_HAVE_KRETPROBES is not set
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
-# CONFIG_HAVE_CLK is not set
-CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -115,11 +105,11 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Platform dependent setup
 #
-# CONFIG_SUN3 is not set
 # CONFIG_AMIGA is not set
 # CONFIG_ATARI is not set
 # CONFIG_MAC is not set
@@ -151,19 +141,21 @@ CONFIG_DISCONTIGMEM_MANUAL=y
 CONFIG_DISCONTIGMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 
 #
 # General setup
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 CONFIG_BINFMT_AOUT=m
 CONFIG_BINFMT_MISC=m
 CONFIG_PROC_HARDWARE=y
@@ -212,7 +204,6 @@ CONFIG_INET_TCP_DIAG=m
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-# CONFIG_IP_VS is not set
 CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
@@ -262,13 +253,14 @@ CONFIG_NF_CONNTRACK_SANE=m
 CONFIG_NF_CONNTRACK_SIP=m
 CONFIG_NF_CONNTRACK_TFTP=m
 # CONFIG_NF_CT_NETLINK is not set
+# CONFIG_NETFILTER_TPROXY is not set
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
 CONFIG_NETFILTER_XT_TARGET_RATEEST=m
 CONFIG_NETFILTER_XT_TARGET_TRACE=m
@@ -282,19 +274,22 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_HELPER=m
 CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_OWNER=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_RATEEST=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
 CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
@@ -302,20 +297,20 @@ CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 CONFIG_NETFILTER_XT_MATCH_TIME=m
 CONFIG_NETFILTER_XT_MATCH_U32=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+# CONFIG_IP_VS is not set
 
 #
 # IP: Netfilter Configuration
 #
+CONFIG_NF_DEFRAG_IPV4=m
 CONFIG_NF_CONNTRACK_IPV4=m
 CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
@@ -323,8 +318,8 @@ CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_NF_NAT=m
 CONFIG_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_NF_NAT_SNMP_BASIC=m
 CONFIG_NF_NAT_PROTO_GRE=m
 CONFIG_NF_NAT_PROTO_UDPLITE=m
@@ -337,9 +332,9 @@ CONFIG_NF_NAT_PPTP=m
 CONFIG_NF_NAT_H323=m
 CONFIG_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
@@ -351,16 +346,16 @@ CONFIG_IP_NF_ARP_MANGLE=m
 CONFIG_NF_CONNTRACK_IPV6=m
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
 CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_HL=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
 CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_REJECT=m
 CONFIG_IP6_NF_MANGLE=m
 CONFIG_IP6_NF_TARGET_HL=m
@@ -387,6 +382,7 @@ CONFIG_SCTP_HMAC_MD5=y
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 CONFIG_LLC=m
@@ -410,19 +406,8 @@ CONFIG_NET_CLS_ROUTE=y
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-CONFIG_WIRELESS_EXT=y
-# CONFIG_WIRELESS_EXT_SYSFS is not set
-# CONFIG_MAC80211 is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -460,6 +445,7 @@ CONFIG_ATA_OVER_ETH=m
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
@@ -545,6 +531,9 @@ CONFIG_MVME16x_NET=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_B44 is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
@@ -614,6 +603,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
 CONFIG_MOUSE_PS2_SYNAPTICS=y
 CONFIG_MOUSE_PS2_LIFEBOOK=y
 CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
 # CONFIG_MOUSE_PS2_TOUCHKIT is not set
 CONFIG_MOUSE_SERIAL=m
 # CONFIG_MOUSE_VSXXXAA is not set
@@ -668,11 +658,11 @@ CONFIG_GEN_RTC_X=y
 # CONFIG_THERMAL is not set
 # CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -682,6 +672,7 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
 # CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -721,6 +712,12 @@ CONFIG_HID_SUPPORT=y
 CONFIG_HID=m
 # CONFIG_HID_DEBUG is not set
 CONFIG_HIDRAW=y
+# CONFIG_HID_PID is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
@@ -729,6 +726,8 @@ CONFIG_HIDRAW=y
 # CONFIG_RTC_CLASS is not set
 # CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # Character devices
@@ -745,8 +744,9 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
+CONFIG_JBD2=m
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
@@ -757,6 +757,7 @@ CONFIG_JFS_FS=m
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 CONFIG_XFS_FS=m
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_POSIX_ACL is not set
@@ -768,6 +769,7 @@ CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
 # CONFIG_OCFS2_FS_STATS is not set
 # CONFIG_OCFS2_DEBUG_MASKLOG is not set
 # CONFIG_OCFS2_DEBUG_FS is not set
+# CONFIG_OCFS2_COMPAT_JBD is not set
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -806,6 +808,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -849,6 +852,7 @@ CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 CONFIG_SMB_FS=m
@@ -922,7 +926,13 @@ CONFIG_MAGIC_SYSRQ=y
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 
 #
@@ -930,6 +940,7 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_XOR_BLOCKS=m
 CONFIG_ASYNC_CORE=m
@@ -940,10 +951,12 @@ CONFIG_CRYPTO=y
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_GF128MUL=m
 CONFIG_CRYPTO_NULL=m
@@ -1017,14 +1030,17 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m
 #
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 # CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
 CONFIG_CRC_CCITT=m
 CONFIG_CRC16=m
 CONFIG_CRC_T10DIF=y
index 72eaff0776b80ca5dcea68a7911d62054111f86d..3459c594194bb9070c416b54f413d95f5731c856 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc6
-# Wed Sep 10 09:02:10 2008
+# Linux kernel version: 2.6.28-rc7
+# Tue Dec  2 20:27:52 2008
 #
 CONFIG_M68K=y
 CONFIG_MMU=y
@@ -14,7 +14,6 @@ CONFIG_TIME_LOW_RES=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_NO_IOPORT=y
 # CONFIG_NO_DMA is not set
-CONFIG_ARCH_SUPPORTS_AOUT=y
 CONFIG_HZ=100
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -67,22 +66,13 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
 # CONFIG_PROFILING is not set
 # CONFIG_MARKERS is not set
-# CONFIG_HAVE_OPROFILE is not set
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
-# CONFIG_HAVE_KPROBES is not set
-# CONFIG_HAVE_KRETPROBES is not set
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
-# CONFIG_HAVE_CLK is not set
-CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -115,11 +105,11 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Platform dependent setup
 #
-# CONFIG_SUN3 is not set
 # CONFIG_AMIGA is not set
 # CONFIG_ATARI is not set
 # CONFIG_MAC is not set
@@ -148,19 +138,21 @@ CONFIG_DISCONTIGMEM_MANUAL=y
 CONFIG_DISCONTIGMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 
 #
 # General setup
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 CONFIG_BINFMT_AOUT=m
 CONFIG_BINFMT_MISC=m
 CONFIG_HEARTBEAT=y
@@ -209,7 +201,6 @@ CONFIG_INET_TCP_DIAG=m
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-# CONFIG_IP_VS is not set
 CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
@@ -259,13 +250,14 @@ CONFIG_NF_CONNTRACK_SANE=m
 CONFIG_NF_CONNTRACK_SIP=m
 CONFIG_NF_CONNTRACK_TFTP=m
 # CONFIG_NF_CT_NETLINK is not set
+# CONFIG_NETFILTER_TPROXY is not set
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
 CONFIG_NETFILTER_XT_TARGET_RATEEST=m
 CONFIG_NETFILTER_XT_TARGET_TRACE=m
@@ -279,19 +271,22 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_HELPER=m
 CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_OWNER=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_RATEEST=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
 CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
@@ -299,20 +294,20 @@ CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 CONFIG_NETFILTER_XT_MATCH_TIME=m
 CONFIG_NETFILTER_XT_MATCH_U32=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+# CONFIG_IP_VS is not set
 
 #
 # IP: Netfilter Configuration
 #
+CONFIG_NF_DEFRAG_IPV4=m
 CONFIG_NF_CONNTRACK_IPV4=m
 CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
@@ -320,8 +315,8 @@ CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_NF_NAT=m
 CONFIG_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_NF_NAT_SNMP_BASIC=m
 CONFIG_NF_NAT_PROTO_GRE=m
 CONFIG_NF_NAT_PROTO_UDPLITE=m
@@ -334,9 +329,9 @@ CONFIG_NF_NAT_PPTP=m
 CONFIG_NF_NAT_H323=m
 CONFIG_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
@@ -348,16 +343,16 @@ CONFIG_IP_NF_ARP_MANGLE=m
 CONFIG_NF_CONNTRACK_IPV6=m
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
 CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_HL=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
 CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_REJECT=m
 CONFIG_IP6_NF_MANGLE=m
 CONFIG_IP6_NF_TARGET_HL=m
@@ -384,6 +379,7 @@ CONFIG_SCTP_HMAC_MD5=y
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 CONFIG_LLC=m
@@ -407,19 +403,8 @@ CONFIG_NET_CLS_ROUTE=y
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-CONFIG_WIRELESS_EXT=y
-# CONFIG_WIRELESS_EXT_SYSFS is not set
-# CONFIG_MAC80211 is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -458,21 +443,20 @@ CONFIG_ATA_OVER_ETH=m
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
 
 #
 # Please see Documentation/ide/ide.txt for help/info on IDE drives
 #
-CONFIG_IDE_ATAPI=y
 # CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=y
-# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
 CONFIG_BLK_DEV_IDECD=y
 CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
 # CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=m
 # CONFIG_BLK_DEV_IDESCSI is not set
 # CONFIG_IDE_TASK_IOCTL is not set
 CONFIG_IDE_PROC_FS=y
@@ -585,8 +569,12 @@ CONFIG_NE2000=m
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_NET_PCI is not set
 # CONFIG_B44 is not set
+# CONFIG_CS89x0 is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
 # CONFIG_TR is not set
@@ -656,6 +644,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
 CONFIG_MOUSE_PS2_SYNAPTICS=y
 CONFIG_MOUSE_PS2_LIFEBOOK=y
 CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
 # CONFIG_MOUSE_PS2_TOUCHKIT is not set
 CONFIG_MOUSE_SERIAL=m
 # CONFIG_MOUSE_INPORT is not set
@@ -717,11 +706,11 @@ CONFIG_GEN_RTC_X=y
 # CONFIG_THERMAL is not set
 # CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -731,6 +720,7 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
 # CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -756,6 +746,7 @@ CONFIG_SSB_POSSIBLE=y
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -778,6 +769,8 @@ CONFIG_FB_Q40=y
 # CONFIG_FB_UVESA is not set
 # CONFIG_FB_S1D13XXX is not set
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -800,12 +793,19 @@ CONFIG_LOGO_LINUX_MONO=y
 CONFIG_LOGO_LINUX_VGA16=y
 CONFIG_LOGO_LINUX_CLUT224=y
 CONFIG_SOUND=m
+CONFIG_SOUND_OSS_CORE=y
 CONFIG_DMASOUND_Q40=m
 CONFIG_DMASOUND=m
 CONFIG_HID_SUPPORT=y
 CONFIG_HID=m
 # CONFIG_HID_DEBUG is not set
 CONFIG_HIDRAW=y
+# CONFIG_HID_PID is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
@@ -814,6 +814,8 @@ CONFIG_HIDRAW=y
 # CONFIG_RTC_CLASS is not set
 # CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # Character devices
@@ -827,8 +829,9 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
+CONFIG_JBD2=m
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
@@ -839,6 +842,7 @@ CONFIG_JFS_FS=m
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 CONFIG_XFS_FS=m
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_POSIX_ACL is not set
@@ -850,6 +854,7 @@ CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
 # CONFIG_OCFS2_FS_STATS is not set
 # CONFIG_OCFS2_DEBUG_MASKLOG is not set
 # CONFIG_OCFS2_DEBUG_FS is not set
+# CONFIG_OCFS2_COMPAT_JBD is not set
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -888,6 +893,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -930,6 +936,7 @@ CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 CONFIG_SMB_FS=m
@@ -1002,7 +1009,13 @@ CONFIG_MAGIC_SYSRQ=y
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 
 #
@@ -1010,6 +1023,7 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_XOR_BLOCKS=m
 CONFIG_ASYNC_CORE=m
@@ -1020,10 +1034,12 @@ CONFIG_CRYPTO=y
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_GF128MUL=m
 CONFIG_CRYPTO_NULL=m
@@ -1097,14 +1113,17 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m
 #
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 # CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
 CONFIG_CRC_CCITT=m
 CONFIG_CRC16=m
 CONFIG_CRC_T10DIF=y
index cb62b96d766ed5493b8bfc9806b31227be91b715..f404917429faefef7258b5b309374f4b7f8bf9d9 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc6
-# Wed Sep 10 09:02:11 2008
+# Linux kernel version: 2.6.28-rc7
+# Tue Dec  2 20:27:53 2008
 #
 CONFIG_M68K=y
 CONFIG_MMU=y
@@ -14,7 +14,6 @@ CONFIG_TIME_LOW_RES=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_NO_IOPORT=y
 CONFIG_NO_DMA=y
-CONFIG_ARCH_SUPPORTS_AOUT=y
 CONFIG_HZ=100
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -67,22 +66,13 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
 # CONFIG_PROFILING is not set
 # CONFIG_MARKERS is not set
-# CONFIG_HAVE_OPROFILE is not set
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
-# CONFIG_HAVE_KPROBES is not set
-# CONFIG_HAVE_KRETPROBES is not set
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
-# CONFIG_HAVE_CLK is not set
-CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -115,10 +105,19 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Platform dependent setup
 #
+# CONFIG_AMIGA is not set
+# CONFIG_ATARI is not set
+# CONFIG_MAC is not set
+# CONFIG_APOLLO is not set
+# CONFIG_VME is not set
+# CONFIG_HP300 is not set
+# CONFIG_SUN3X is not set
+# CONFIG_Q40 is not set
 CONFIG_SUN3=y
 
 #
@@ -137,19 +136,21 @@ CONFIG_FLATMEM_MANUAL=y
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 
 #
 # General setup
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 CONFIG_BINFMT_AOUT=m
 CONFIG_BINFMT_MISC=m
 CONFIG_PROC_HARDWARE=y
@@ -198,7 +199,6 @@ CONFIG_INET_TCP_DIAG=m
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-# CONFIG_IP_VS is not set
 CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
@@ -248,13 +248,14 @@ CONFIG_NF_CONNTRACK_SANE=m
 CONFIG_NF_CONNTRACK_SIP=m
 CONFIG_NF_CONNTRACK_TFTP=m
 # CONFIG_NF_CT_NETLINK is not set
+# CONFIG_NETFILTER_TPROXY is not set
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
 CONFIG_NETFILTER_XT_TARGET_RATEEST=m
 CONFIG_NETFILTER_XT_TARGET_TRACE=m
@@ -268,19 +269,22 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_HELPER=m
 CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_OWNER=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_RATEEST=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
 CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
@@ -288,20 +292,20 @@ CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 CONFIG_NETFILTER_XT_MATCH_TIME=m
 CONFIG_NETFILTER_XT_MATCH_U32=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+# CONFIG_IP_VS is not set
 
 #
 # IP: Netfilter Configuration
 #
+CONFIG_NF_DEFRAG_IPV4=m
 CONFIG_NF_CONNTRACK_IPV4=m
 CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
@@ -309,8 +313,8 @@ CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_NF_NAT=m
 CONFIG_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_NF_NAT_SNMP_BASIC=m
 CONFIG_NF_NAT_PROTO_GRE=m
 CONFIG_NF_NAT_PROTO_UDPLITE=m
@@ -323,9 +327,9 @@ CONFIG_NF_NAT_PPTP=m
 CONFIG_NF_NAT_H323=m
 CONFIG_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
@@ -337,16 +341,16 @@ CONFIG_IP_NF_ARP_MANGLE=m
 CONFIG_NF_CONNTRACK_IPV6=m
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
 CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_HL=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
 CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_REJECT=m
 CONFIG_IP6_NF_MANGLE=m
 CONFIG_IP6_NF_TARGET_HL=m
@@ -373,6 +377,7 @@ CONFIG_SCTP_HMAC_MD5=y
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 CONFIG_LLC=m
@@ -396,19 +401,8 @@ CONFIG_NET_CLS_ROUTE=y
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-CONFIG_WIRELESS_EXT=y
-# CONFIG_WIRELESS_EXT_SYSFS is not set
-# CONFIG_MAC80211 is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -446,6 +440,7 @@ CONFIG_ATA_OVER_ETH=m
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
@@ -531,6 +526,9 @@ CONFIG_SUN3_82586=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
 
@@ -599,6 +597,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
 CONFIG_MOUSE_PS2_SYNAPTICS=y
 CONFIG_MOUSE_PS2_LIFEBOOK=y
 CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
 # CONFIG_MOUSE_PS2_TOUCHKIT is not set
 CONFIG_MOUSE_SERIAL=m
 # CONFIG_MOUSE_VSXXXAA is not set
@@ -654,10 +653,6 @@ CONFIG_GEN_RTC_X=y
 # CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
 
-#
-# Sonics Silicon Backplane
-#
-
 #
 # Multifunction device drivers
 #
@@ -665,6 +660,7 @@ CONFIG_GEN_RTC_X=y
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
 # CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -690,6 +686,7 @@ CONFIG_GEN_RTC_X=y
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 # CONFIG_FB_CFB_FILLRECT is not set
 # CONFIG_FB_CFB_COPYAREA is not set
 # CONFIG_FB_CFB_IMAGEBLIT is not set
@@ -711,6 +708,8 @@ CONFIG_FB=y
 # CONFIG_FB_UVESA is not set
 # CONFIG_FB_S1D13XXX is not set
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -737,6 +736,12 @@ CONFIG_HID_SUPPORT=y
 CONFIG_HID=m
 # CONFIG_HID_DEBUG is not set
 CONFIG_HIDRAW=y
+# CONFIG_HID_PID is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
@@ -744,6 +749,8 @@ CONFIG_HIDRAW=y
 # CONFIG_ACCESSIBILITY is not set
 # CONFIG_RTC_CLASS is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # Character devices
@@ -757,8 +764,9 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
+CONFIG_JBD2=m
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
@@ -769,6 +777,7 @@ CONFIG_JFS_FS=m
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 CONFIG_XFS_FS=m
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_POSIX_ACL is not set
@@ -780,6 +789,7 @@ CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
 # CONFIG_OCFS2_FS_STATS is not set
 # CONFIG_OCFS2_DEBUG_MASKLOG is not set
 # CONFIG_OCFS2_DEBUG_FS is not set
+# CONFIG_OCFS2_COMPAT_JBD is not set
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -818,6 +828,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -861,6 +872,7 @@ CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 CONFIG_SMB_FS=m
@@ -934,7 +946,13 @@ CONFIG_MAGIC_SYSRQ=y
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 
 #
@@ -942,6 +960,7 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_XOR_BLOCKS=m
 CONFIG_ASYNC_CORE=m
@@ -952,10 +971,12 @@ CONFIG_CRYPTO=y
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_GF128MUL=m
 CONFIG_CRYPTO_NULL=m
@@ -1029,14 +1050,17 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m
 #
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 # CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
 CONFIG_CRC_CCITT=m
 CONFIG_CRC16=m
 CONFIG_CRC_T10DIF=y
index 04b4363a70503d5fa50948cd678ed3d3f56dcaa2..4d8a1e84e39fc930b6235c243751823272ab8fea 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc6
-# Wed Sep 10 09:02:12 2008
+# Linux kernel version: 2.6.28-rc7
+# Tue Dec  2 20:27:54 2008
 #
 CONFIG_M68K=y
 CONFIG_MMU=y
@@ -14,7 +14,6 @@ CONFIG_TIME_LOW_RES=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_NO_IOPORT=y
 # CONFIG_NO_DMA is not set
-CONFIG_ARCH_SUPPORTS_AOUT=y
 CONFIG_HZ=100
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -67,22 +66,13 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
 # CONFIG_PROFILING is not set
 # CONFIG_MARKERS is not set
-# CONFIG_HAVE_OPROFILE is not set
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
-# CONFIG_HAVE_KPROBES is not set
-# CONFIG_HAVE_KRETPROBES is not set
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
-# CONFIG_HAVE_CLK is not set
-CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -115,11 +105,11 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Platform dependent setup
 #
-# CONFIG_SUN3 is not set
 # CONFIG_AMIGA is not set
 # CONFIG_ATARI is not set
 # CONFIG_MAC is not set
@@ -148,19 +138,21 @@ CONFIG_DISCONTIGMEM_MANUAL=y
 CONFIG_DISCONTIGMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 
 #
 # General setup
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
 CONFIG_BINFMT_AOUT=m
 CONFIG_BINFMT_MISC=m
 CONFIG_PROC_HARDWARE=y
@@ -209,7 +201,6 @@ CONFIG_INET_TCP_DIAG=m
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-# CONFIG_IP_VS is not set
 CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
@@ -259,13 +250,14 @@ CONFIG_NF_CONNTRACK_SANE=m
 CONFIG_NF_CONNTRACK_SIP=m
 CONFIG_NF_CONNTRACK_TFTP=m
 # CONFIG_NF_CT_NETLINK is not set
+# CONFIG_NETFILTER_TPROXY is not set
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
 CONFIG_NETFILTER_XT_TARGET_RATEEST=m
 CONFIG_NETFILTER_XT_TARGET_TRACE=m
@@ -279,19 +271,22 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_HELPER=m
 CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_OWNER=m
 CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 CONFIG_NETFILTER_XT_MATCH_QUOTA=m
 CONFIG_NETFILTER_XT_MATCH_RATEEST=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
 CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
@@ -299,20 +294,20 @@ CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 CONFIG_NETFILTER_XT_MATCH_TIME=m
 CONFIG_NETFILTER_XT_MATCH_U32=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+# CONFIG_IP_VS is not set
 
 #
 # IP: Netfilter Configuration
 #
+CONFIG_NF_DEFRAG_IPV4=m
 CONFIG_NF_CONNTRACK_IPV4=m
 CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
@@ -320,8 +315,8 @@ CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_NF_NAT=m
 CONFIG_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_NF_NAT_SNMP_BASIC=m
 CONFIG_NF_NAT_PROTO_GRE=m
 CONFIG_NF_NAT_PROTO_UDPLITE=m
@@ -334,9 +329,9 @@ CONFIG_NF_NAT_PPTP=m
 CONFIG_NF_NAT_H323=m
 CONFIG_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
@@ -348,16 +343,16 @@ CONFIG_IP_NF_ARP_MANGLE=m
 CONFIG_NF_CONNTRACK_IPV6=m
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
 CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_HL=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
 CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_REJECT=m
 CONFIG_IP6_NF_MANGLE=m
 CONFIG_IP6_NF_TARGET_HL=m
@@ -384,6 +379,7 @@ CONFIG_SCTP_HMAC_MD5=y
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 CONFIG_LLC=m
@@ -407,19 +403,8 @@ CONFIG_NET_CLS_ROUTE=y
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-CONFIG_WIRELESS_EXT=y
-# CONFIG_WIRELESS_EXT_SYSFS is not set
-# CONFIG_MAC80211 is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -457,6 +442,7 @@ CONFIG_ATA_OVER_ETH=m
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
@@ -541,6 +527,9 @@ CONFIG_SUN3LANCE=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_B44 is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
@@ -610,6 +599,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
 CONFIG_MOUSE_PS2_SYNAPTICS=y
 CONFIG_MOUSE_PS2_LIFEBOOK=y
 CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
 # CONFIG_MOUSE_PS2_TOUCHKIT is not set
 CONFIG_MOUSE_SERIAL=m
 # CONFIG_MOUSE_VSXXXAA is not set
@@ -664,11 +654,11 @@ CONFIG_GEN_RTC_X=y
 # CONFIG_THERMAL is not set
 # CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -678,6 +668,7 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
 # CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -703,6 +694,7 @@ CONFIG_SSB_POSSIBLE=y
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 # CONFIG_FB_CFB_FILLRECT is not set
 # CONFIG_FB_CFB_COPYAREA is not set
 # CONFIG_FB_CFB_IMAGEBLIT is not set
@@ -724,6 +716,8 @@ CONFIG_FB=y
 # CONFIG_FB_UVESA is not set
 # CONFIG_FB_S1D13XXX is not set
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -750,6 +744,12 @@ CONFIG_HID_SUPPORT=y
 CONFIG_HID=m
 # CONFIG_HID_DEBUG is not set
 CONFIG_HIDRAW=y
+# CONFIG_HID_PID is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
@@ -758,6 +758,8 @@ CONFIG_HIDRAW=y
 # CONFIG_RTC_CLASS is not set
 # CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # Character devices
@@ -771,8 +773,9 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
+CONFIG_JBD2=m
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
@@ -783,6 +786,7 @@ CONFIG_JFS_FS=m
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 CONFIG_XFS_FS=m
 # CONFIG_XFS_QUOTA is not set
 # CONFIG_XFS_POSIX_ACL is not set
@@ -794,6 +798,7 @@ CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
 # CONFIG_OCFS2_FS_STATS is not set
 # CONFIG_OCFS2_DEBUG_MASKLOG is not set
 # CONFIG_OCFS2_DEBUG_FS is not set
+# CONFIG_OCFS2_COMPAT_JBD is not set
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -832,6 +837,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -875,6 +881,7 @@ CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 CONFIG_SMB_FS=m
@@ -948,7 +955,13 @@ CONFIG_MAGIC_SYSRQ=y
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 
 #
@@ -956,6 +969,7 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_XOR_BLOCKS=m
 CONFIG_ASYNC_CORE=m
@@ -966,10 +980,12 @@ CONFIG_CRYPTO=y
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_GF128MUL=m
 CONFIG_CRYPTO_NULL=m
@@ -1043,14 +1059,17 @@ CONFIG_CRYPTO_TWOFISH_COMMON=m
 #
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 # CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
 CONFIG_CRC_CCITT=m
 CONFIG_CRC16=m
 CONFIG_CRC_T10DIF=y
index 7e8a0d394e6184cbf63a5fb257befa4082ce0148..761ee0440c996a29d4fe784f56571e2cab3358ee 100644 (file)
@@ -133,7 +133,7 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
 {
        int i;
 
-       BUG_ON(IRQ_USER + cnt >= NR_IRQS);
+       BUG_ON(IRQ_USER + cnt > NR_IRQS);
        m68k_first_user_vec = vec;
        for (i = 0; i < cnt; i++)
                irq_controller[IRQ_USER + i] = &user_irq_controller;
index 765c8e287d2b2b45f2687f607c61ecc1d1096cad..364ca89388072bdef9c9083183b329cec5828af7 100644 (file)
@@ -48,7 +48,7 @@ config RUNTIME_DEBUG
        help
          If you say Y here, some debugging macros will do run-time checking.
          If you say N here, those macros will mostly turn to no-ops.  See
-         include/asm-mips/debug.h for debuging macros.
+         arch/mips/include/asm/debug.h for debugging macros.
          If unsure, say N.
 
 endmenu
index 620980081a308080323d48db08328d8c170d370f..b6698a232ae93e8c65e8247ddc5075f3c260dea7 100644 (file)
@@ -1,63 +1,78 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.22-rc4
-# Mon Jun 11 00:23:51 2007
+# Linux kernel version: 2.6.28-rc6
+# Fri Nov 28 17:53:48 2008
 #
 CONFIG_MIPS=y
 
 #
 # Machine selection
 #
-CONFIG_LEMOTE_FULONG=y
 # CONFIG_MACH_ALCHEMY is not set
 # CONFIG_BASLER_EXCITE is not set
+# CONFIG_BCM47XX is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MACH_JAZZ is not set
+# CONFIG_LASAT is not set
+CONFIG_LEMOTE_FULONG=y
 # CONFIG_MIPS_MALTA is not set
-# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
+# CONFIG_MACH_EMMA is not set
+# CONFIG_MACH_VR41XX is not set
+# CONFIG_NXP_STB220 is not set
+# CONFIG_NXP_STB225 is not set
 # CONFIG_PNX8550_JBS is not set
 # CONFIG_PNX8550_STB810 is not set
-# CONFIG_MACH_VR41XX is not set
+# CONFIG_PMC_MSP is not set
 # CONFIG_PMC_YOSEMITE is not set
-# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
+# CONFIG_SGI_IP28 is not set
 # CONFIG_SGI_IP32 is not set
-# CONFIG_SIBYTE_BIGSUR is not set
-# CONFIG_SIBYTE_SWARM is not set
-# CONFIG_SIBYTE_SENTOSA is not set
-# CONFIG_SIBYTE_RHONE is not set
-# CONFIG_SIBYTE_CARMEL is not set
-# CONFIG_SIBYTE_LITTLESUR is not set
 # CONFIG_SIBYTE_CRHINE is not set
+# CONFIG_SIBYTE_CARMEL is not set
 # CONFIG_SIBYTE_CRHONE is not set
+# CONFIG_SIBYTE_RHONE is not set
+# CONFIG_SIBYTE_SWARM is not set
+# CONFIG_SIBYTE_LITTLESUR is not set
+# CONFIG_SIBYTE_SENTOSA is not set
+# CONFIG_SIBYTE_BIGSUR is not set
 # CONFIG_SNI_RM is not set
-# CONFIG_TOSHIBA_JMR3927 is not set
-# CONFIG_TOSHIBA_RBTX4927 is not set
-# CONFIG_TOSHIBA_RBTX4938 is not set
+# CONFIG_MACH_TX39XX is not set
+# CONFIG_MACH_TX49XX is not set
+# CONFIG_MIKROTIK_RB532 is not set
+# CONFIG_WR_PPMC is not set
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_ARCH_HAS_ILOG2_U32 is not set
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_SUPPORTS_OPROFILE=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_CEVT_R4K=y
+CONFIG_CSRC_R4K=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_SYS_HAS_EARLY_PRINTK=y
+# CONFIG_HOTPLUG_CPU is not set
 CONFIG_I8259=y
 # CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_ISA_DMA_SUPPORT_BROKEN=y
 # CONFIG_CPU_BIG_ENDIAN is not set
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
 CONFIG_IRQ_CPU=y
 CONFIG_BOOT_ELF32=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
+CONFIG_HAVE_STD_PC_SERIAL_PORT=y
 
 #
 # CPU selection
@@ -75,6 +90,7 @@ CONFIG_CPU_LOONGSON2=y
 # CONFIG_CPU_TX49XX is not set
 # CONFIG_CPU_R5000 is not set
 # CONFIG_CPU_R5432 is not set
+# CONFIG_CPU_R5500 is not set
 # CONFIG_CPU_R6000 is not set
 # CONFIG_CPU_NEVADA is not set
 # CONFIG_CPU_R8000 is not set
@@ -101,7 +117,6 @@ CONFIG_BOARD_SCACHE=y
 CONFIG_MIPS_MT_DISABLED=y
 # CONFIG_MIPS_MT_SMP is not set
 # CONFIG_MIPS_MT_SMTC is not set
-# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_WB=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
@@ -109,6 +124,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_SYS_SUPPORTS_HIGHMEM=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
@@ -117,9 +133,17 @@ CONFIG_FLATMEM_MANUAL=y
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_SPARSEMEM_STATIC=y
+CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_RESOURCES_64BIT=y
+CONFIG_PHYS_ADDR_T_64BIT=y
 CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -133,37 +157,40 @@ CONFIG_HZ=250
 CONFIG_PREEMPT_VOLUNTARY=y
 # CONFIG_PREEMPT is not set
 # CONFIG_KEXEC is not set
+CONFIG_SECCOMP=y
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_STACKTRACE_SUPPORT=y
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
-# Code maturity level options
+# General setup
 #
 CONFIG_EXPERIMENTAL=y
 CONFIG_BROKEN_ON_SMP=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
 CONFIG_LOCALVERSION="lm32"
 # CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
-# CONFIG_IPC_NS is not set
 CONFIG_SYSVIPC_SYSCTL=y
 CONFIG_POSIX_MQUEUE=y
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 # CONFIG_TASKSTATS is not set
-# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
 CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
 # CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+CONFIG_USER_NS=y
+CONFIG_PID_NS=y
 # CONFIG_BLK_DEV_INITRD is not set
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_SYSCTL=y
@@ -175,6 +202,8 @@ CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
+# CONFIG_PCSPKR_PLATFORM is not set
+# CONFIG_COMPAT_BRK is not set
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_ANON_INODES=y
@@ -183,29 +212,33 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_PCI_QUIRKS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+# CONFIG_MARKERS is not set
+CONFIG_OPROFILE=m
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
-
-#
-# Loadable module support
-#
 CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
 CONFIG_MODULE_UNLOAD=y
 CONFIG_MODULE_FORCE_UNLOAD=y
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
-
-#
-# Block layer
-#
 CONFIG_BLOCK=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
+CONFIG_BLK_DEV_BSG=y
+# CONFIG_BLK_DEV_INTEGRITY is not set
+CONFIG_BLOCK_COMPAT=y
 
 #
 # IO Schedulers
@@ -219,19 +252,19 @@ CONFIG_IOSCHED_CFQ=y
 CONFIG_DEFAULT_CFQ=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="cfq"
+CONFIG_CLASSIC_RCU=y
+CONFIG_FREEZER=y
 
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
 CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
 # CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCI_LEGACY=y
 CONFIG_ISA=y
 CONFIG_MMU=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
 # CONFIG_PCCARD is not set
 # CONFIG_HOTPLUG_PCI is not set
 
@@ -239,8 +272,9 @@ CONFIG_MMU=y
 # Executable file formats
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
 CONFIG_BINFMT_MISC=y
-# CONFIG_BUILD_ELF64 is not set
 CONFIG_MIPS32_COMPAT=y
 CONFIG_COMPAT=y
 CONFIG_SYSVIPC_COMPAT=y
@@ -251,14 +285,12 @@ CONFIG_BINFMT_ELF32=y
 #
 # Power management options
 #
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_PM=y
-# CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
-# CONFIG_PM_SYSFS_DEPRECATED is not set
-
-#
-# Networking
-#
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
 CONFIG_NET=y
 
 #
@@ -271,6 +303,7 @@ CONFIG_XFRM=y
 # CONFIG_XFRM_USER is not set
 # CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -294,18 +327,17 @@ CONFIG_INET_TUNNEL=m
 # CONFIG_INET_XFRM_MODE_TRANSPORT is not set
 # CONFIG_INET_XFRM_MODE_TUNNEL is not set
 CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
 # CONFIG_INET_DIAG is not set
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-# CONFIG_IP_VS is not set
 # CONFIG_IPV6 is not set
-# CONFIG_INET6_XFRM_TUNNEL is not set
-# CONFIG_INET6_TUNNEL is not set
 # CONFIG_NETWORK_SECMARK is not set
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
+CONFIG_NETFILTER_ADVANCED=y
 
 #
 # Core Netfilter Configuration
@@ -313,53 +345,59 @@ CONFIG_NETFILTER=y
 CONFIG_NETFILTER_NETLINK=m
 CONFIG_NETFILTER_NETLINK_QUEUE=m
 CONFIG_NETFILTER_NETLINK_LOG=m
-# CONFIG_NF_CONNTRACK_ENABLED is not set
 # CONFIG_NF_CONNTRACK is not set
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 # CONFIG_NETFILTER_XT_TARGET_DSCP is not set
 CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 # CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_RATEEST=m
+CONFIG_NETFILTER_XT_TARGET_TRACE=m
 # CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 # CONFIG_NETFILTER_XT_MATCH_DSCP is not set
 CONFIG_NETFILTER_XT_MATCH_ESP=m
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
-# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_OWNER=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 CONFIG_NETFILTER_XT_MATCH_QUOTA=m
+CONFIG_NETFILTER_XT_MATCH_RATEEST=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
 CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+CONFIG_NETFILTER_XT_MATCH_TIME=m
+CONFIG_NETFILTER_XT_MATCH_U32=m
+# CONFIG_IP_VS is not set
 
 #
 # IP: Netfilter Configuration
 #
+# CONFIG_NF_DEFRAG_IPV4 is not set
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
 CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_TTL=m
 CONFIG_IP_NF_RAW=m
@@ -371,6 +409,7 @@ CONFIG_IP_NF_ARP_MANGLE=m
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
@@ -380,10 +419,6 @@ CONFIG_IP_NF_ARP_MANGLE=m
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
 # CONFIG_NET_SCHED is not set
 CONFIG_NET_CLS_ROUTE=y
 
@@ -392,23 +427,25 @@ CONFIG_NET_CLS_ROUTE=y
 #
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
+CONFIG_PHONET=m
+CONFIG_WIRELESS=y
 # CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_OLD_REGULATORY=y
 CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
 # CONFIG_MAC80211 is not set
 CONFIG_IEEE80211=m
 # CONFIG_IEEE80211_DEBUG is not set
 CONFIG_IEEE80211_CRYPT_WEP=m
 # CONFIG_IEEE80211_CRYPT_CCMP is not set
 # CONFIG_IEEE80211_CRYPT_TKIP is not set
-# CONFIG_IEEE80211_SOFTMAC is not set
 # CONFIG_RFKILL is not set
+CONFIG_NET_9P=m
+# CONFIG_NET_9P_DEBUG is not set
 
 #
 # Device Drivers
@@ -417,14 +454,13 @@ CONFIG_IEEE80211_CRYPT_WEP=m
 #
 # Generic Driver Options
 #
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
 # CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
 # CONFIG_CONNECTOR is not set
 CONFIG_MTD=m
 # CONFIG_MTD_DEBUG is not set
@@ -443,6 +479,7 @@ CONFIG_MTD_BLOCK=m
 # CONFIG_INFTL is not set
 # CONFIG_RFD_FTL is not set
 # CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
 
 #
 # RAM/ROM/Flash chip drivers
@@ -482,6 +519,7 @@ CONFIG_MTD_PHYSMAP=m
 CONFIG_MTD_PHYSMAP_START=0x1fc00000
 CONFIG_MTD_PHYSMAP_LEN=0x80000
 CONFIG_MTD_PHYSMAP_BANKWIDTH=1
+# CONFIG_MTD_INTEL_VR_NOR is not set
 # CONFIG_MTD_PLATRAM is not set
 
 #
@@ -506,21 +544,9 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
 # UBI - Unsorted block images
 #
 # CONFIG_MTD_UBI is not set
-
-#
-# Parallel port support
-#
 # CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
 # CONFIG_PNP is not set
-# CONFIG_PNPACPI is not set
-
-#
-# Block devices
-#
+CONFIG_BLK_DEV=y
 # CONFIG_BLK_CPQ_DA is not set
 # CONFIG_BLK_CPQ_CISS_DA is not set
 # CONFIG_BLK_DEV_DAC960 is not set
@@ -534,32 +560,28 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m
 CONFIG_BLK_DEV_RAM=m
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_BLK_DEV_XIP is not set
 CONFIG_CDROM_PKTCDVD=m
 CONFIG_CDROM_PKTCDVD_BUFFERS=8
 # CONFIG_CDROM_PKTCDVD_WCACHE is not set
 CONFIG_ATA_OVER_ETH=m
-
-#
-# Misc devices
-#
-# CONFIG_PHANTOM is not set
-# CONFIG_SGI_IOC4 is not set
-# CONFIG_TIFM_CORE is not set
-# CONFIG_BLINK is not set
+# CONFIG_BLK_DEV_HD is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
 CONFIG_IDE=y
-CONFIG_IDE_MAX_HWIFS=4
-CONFIG_BLK_DEV_IDE=y
 
 #
-# Please see Documentation/ide.txt for help/info on IDE drives
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
 #
+CONFIG_IDE_TIMINGS=y
+CONFIG_IDE_ATAPI=y
 # CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
 CONFIG_BLK_DEV_IDECD=y
+CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
 # CONFIG_BLK_DEV_IDETAPE is not set
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
 CONFIG_BLK_DEV_IDESCSI=y
 CONFIG_IDE_TASK_IOCTL=y
 CONFIG_IDE_PROC_FS=y
@@ -568,24 +590,25 @@ CONFIG_IDE_PROC_FS=y
 # IDE chipset support/bugfixes
 #
 CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+CONFIG_BLK_DEV_IDEDMA_SFF=y
+
+#
+# PCI IDE chipsets support
+#
 CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
 CONFIG_IDEPCI_PCIBUS_ORDER=y
 # CONFIG_BLK_DEV_OFFBOARD is not set
 CONFIG_BLK_DEV_GENERIC=y
 # CONFIG_BLK_DEV_OPTI621 is not set
 CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-# CONFIG_IDEDMA_ONLYDISK is not set
 # CONFIG_BLK_DEV_AEC62XX is not set
 # CONFIG_BLK_DEV_ALI15X3 is not set
 # CONFIG_BLK_DEV_AMD74XX is not set
 # CONFIG_BLK_DEV_CMD64X is not set
 # CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
 # CONFIG_BLK_DEV_CS5520 is not set
 # CONFIG_BLK_DEV_CS5530 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
 # CONFIG_BLK_DEV_HPT366 is not set
 # CONFIG_BLK_DEV_JMICRON is not set
 # CONFIG_BLK_DEV_SC1200 is not set
@@ -601,17 +624,28 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
 # CONFIG_BLK_DEV_TRM290 is not set
 CONFIG_BLK_DEV_VIA82CXXX=y
 # CONFIG_BLK_DEV_TC86C001 is not set
-# CONFIG_IDE_ARM is not set
-# CONFIG_IDE_CHIPSETS is not set
+
+#
+# Other IDE chipsets support
+#
+
+#
+# Note: most of these also require special kernel boot parameters
+#
+# CONFIG_BLK_DEV_4DRIVES is not set
+# CONFIG_BLK_DEV_ALI14XX is not set
+# CONFIG_BLK_DEV_DTC2278 is not set
+# CONFIG_BLK_DEV_HT6560B is not set
+# CONFIG_BLK_DEV_QD65XX is not set
+# CONFIG_BLK_DEV_UMC8672 is not set
 CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-# CONFIG_BLK_DEV_HD is not set
 
 #
 # SCSI device support
 #
 # CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
 # CONFIG_SCSI_TGT is not set
 # CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
@@ -644,88 +678,30 @@ CONFIG_SCSI_WAIT_SCAN=m
 # CONFIG_SCSI_ISCSI_ATTRS is not set
 # CONFIG_SCSI_SAS_ATTRS is not set
 # CONFIG_SCSI_SAS_LIBSAS is not set
-
-#
-# SCSI low-level drivers
-#
-# CONFIG_ISCSI_TCP is not set
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_3W_9XXX is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_AIC94XX is not set
-# CONFIG_SCSI_IN2000 is not set
-# CONFIG_SCSI_ARCMSR is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_MEGARAID_SAS is not set
-# CONFIG_SCSI_HPTIOP is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_GENERIC_NCR5380 is not set
-# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_NCR53C406A is not set
-# CONFIG_SCSI_STEX is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_PAS16 is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_QLA_FC is not set
-# CONFIG_SCSI_QLA_ISCSI is not set
-# CONFIG_SCSI_LPFC is not set
-# CONFIG_SCSI_SYM53C416 is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
-# CONFIG_SCSI_DEBUG is not set
-# CONFIG_SCSI_SRP is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+# CONFIG_SCSI_LOWLEVEL is not set
+# CONFIG_SCSI_DH is not set
 # CONFIG_ATA is not set
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
 # CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
 # CONFIG_FUSION is not set
-# CONFIG_FUSION_SPI is not set
-# CONFIG_FUSION_FC is not set
-# CONFIG_FUSION_SAS is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
-# CONFIG_FIREWIRE is not set
-# CONFIG_IEEE1394 is not set
 
 #
-# I2O device support
+# Enable only one of the two stacks, unless you know what you are doing
 #
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
 # CONFIG_I2O is not set
-
-#
-# Network device support
-#
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
+CONFIG_MACVLAN=m
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
+CONFIG_VETH=m
 # CONFIG_ARCNET is not set
 CONFIG_PHYLIB=m
 
@@ -740,29 +716,32 @@ CONFIG_CICADA_PHY=m
 # CONFIG_VITESSE_PHY is not set
 # CONFIG_SMSC_PHY is not set
 # CONFIG_BROADCOM_PHY is not set
-# CONFIG_FIXED_PHY is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
+# CONFIG_AX88796 is not set
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_CASSINI is not set
 # CONFIG_NET_VENDOR_3COM is not set
 # CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_SMC91X is not set
 # CONFIG_DM9000 is not set
 # CONFIG_NET_VENDOR_RACAL is not set
-
-#
-# Tulip family network device support
-#
 # CONFIG_NET_TULIP is not set
 # CONFIG_AT1700 is not set
 # CONFIG_DEPCA is not set
 # CONFIG_HP100 is not set
 # CONFIG_NET_ISA is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 CONFIG_NET_PCI=y
 # CONFIG_PCNET32 is not set
 # CONFIG_AMD8111_ETH is not set
@@ -773,7 +752,6 @@ CONFIG_NET_PCI=y
 # CONFIG_FORCEDETH is not set
 # CONFIG_CS89x0 is not set
 # CONFIG_TC35815 is not set
-# CONFIG_DGRS is not set
 # CONFIG_EEPRO100 is not set
 # CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
@@ -785,15 +763,21 @@ CONFIG_8139TOO=y
 # CONFIG_8139TOO_TUNE_TWISTER is not set
 # CONFIG_8139TOO_8129 is not set
 # CONFIG_8139_OLD_RX_RESET is not set
+# CONFIG_R6040 is not set
 # CONFIG_SIS900 is not set
 # CONFIG_EPIC100 is not set
 # CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
 # CONFIG_VIA_RHINE is not set
 # CONFIG_SC92031 is not set
+# CONFIG_ATL2 is not set
 CONFIG_NETDEV_1000=y
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
 # CONFIG_E1000 is not set
+# CONFIG_E1000E is not set
+# CONFIG_IP1000 is not set
+# CONFIG_IGB is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -801,20 +785,29 @@ CONFIG_NETDEV_1000=y
 # CONFIG_SIS190 is not set
 # CONFIG_SKGE is not set
 # CONFIG_SKY2 is not set
-# CONFIG_SK98LIN is not set
 # CONFIG_VIA_VELOCITY is not set
 # CONFIG_TIGON3 is not set
 # CONFIG_BNX2 is not set
 # CONFIG_QLA3XXX is not set
 # CONFIG_ATL1 is not set
+# CONFIG_ATL1E is not set
+# CONFIG_JME is not set
 CONFIG_NETDEV_10000=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_CHELSIO_T3 is not set
+# CONFIG_ENIC is not set
+# CONFIG_IXGBE is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
 # CONFIG_NETXEN_NIC is not set
+# CONFIG_NIU is not set
+# CONFIG_MLX4_EN is not set
 # CONFIG_MLX4_CORE is not set
+# CONFIG_TEHUTI is not set
+# CONFIG_BNX2X is not set
+# CONFIG_QLGE is not set
+# CONFIG_SFC is not set
 # CONFIG_TR is not set
 
 #
@@ -822,6 +815,7 @@ CONFIG_NETDEV_10000=y
 #
 # CONFIG_WLAN_PRE80211 is not set
 # CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
 
 #
 # USB Network Adapters
@@ -830,7 +824,6 @@ CONFIG_NETDEV_10000=y
 # CONFIG_USB_KAWETH is not set
 # CONFIG_USB_PEGASUS is not set
 # CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET_MII is not set
 # CONFIG_USB_USBNET is not set
 # CONFIG_WAN is not set
 # CONFIG_FDDI is not set
@@ -844,25 +837,17 @@ CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_MPPE=m
 CONFIG_PPPOE=m
+CONFIG_PPPOL2TP=m
 CONFIG_SLIP=m
 CONFIG_SLIP_COMPRESSED=y
 CONFIG_SLHC=m
 CONFIG_SLIP_SMART=y
 CONFIG_SLIP_MODE_SLIP6=y
 CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 # CONFIG_NETPOLL is not set
 # CONFIG_NET_POLL_CONTROLLER is not set
-
-#
-# ISDN subsystem
-#
 # CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
 # CONFIG_PHONE is not set
 
 #
@@ -870,6 +855,7 @@ CONFIG_NET_FC=y
 #
 CONFIG_INPUT=y
 CONFIG_INPUT_FF_MEMLESS=y
+# CONFIG_INPUT_POLLDEV is not set
 
 #
 # Userland interfaces
@@ -879,7 +865,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
 # CONFIG_INPUT_EVDEV is not set
 # CONFIG_INPUT_EVBUG is not set
 
@@ -900,9 +885,11 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
 CONFIG_MOUSE_PS2_SYNAPTICS=y
 CONFIG_MOUSE_PS2_LIFEBOOK=y
 CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
 # CONFIG_MOUSE_PS2_TOUCHKIT is not set
 CONFIG_MOUSE_SERIAL=y
 # CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_BCM5974 is not set
 # CONFIG_MOUSE_INPORT is not set
 # CONFIG_MOUSE_LOGIBM is not set
 # CONFIG_MOUSE_PC110PAD is not set
@@ -927,10 +914,13 @@ CONFIG_SERIO_LIBPS2=y
 # Character devices
 #
 CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
 # CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_NOZOMI is not set
 
 #
 # Serial drivers
@@ -951,105 +941,152 @@ CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
-
-#
-# IPMI
-#
 # CONFIG_IPMI_HANDLER is not set
-# CONFIG_WATCHDOG is not set
 CONFIG_HW_RANDOM=y
-CONFIG_RTC=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
-# CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
-
-#
-# TPM devices
-#
 # CONFIG_TCG_TPM is not set
 CONFIG_DEVPORT=y
 CONFIG_I2C=m
 CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=m
+CONFIG_I2C_HELPER_AUTO=y
 
 #
-# I2C Algorithms
+# I2C Hardware Bus support
 #
-# CONFIG_I2C_ALGOBIT is not set
-# CONFIG_I2C_ALGOPCF is not set
-# CONFIG_I2C_ALGOPCA is not set
 
 #
-# I2C Hardware Bus support
+# PC SMBus host controller drivers
 #
 # CONFIG_I2C_ALI1535 is not set
 # CONFIG_I2C_ALI1563 is not set
 # CONFIG_I2C_ALI15X3 is not set
 # CONFIG_I2C_AMD756 is not set
 # CONFIG_I2C_AMD8111 is not set
-# CONFIG_I2C_ELEKTOR is not set
 # CONFIG_I2C_I801 is not set
-# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_ISCH is not set
 # CONFIG_I2C_PIIX4 is not set
 # CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_OCORES is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_PROSAVAGE is not set
-# CONFIG_I2C_SAVAGE4 is not set
-# CONFIG_I2C_SIMTEC is not set
 # CONFIG_I2C_SIS5595 is not set
 # CONFIG_I2C_SIS630 is not set
 # CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_STUB is not set
-# CONFIG_I2C_TINY_USB is not set
 # CONFIG_I2C_VIA is not set
 CONFIG_I2C_VIAPRO=m
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Graphics adapter I2C/DDC channel drivers
+#
 # CONFIG_I2C_VOODOO3 is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_ELEKTOR is not set
 # CONFIG_I2C_PCA_ISA is not set
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
 
 #
 # Miscellaneous I2C Chip support
 #
-# CONFIG_SENSORS_DS1337 is not set
-# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
 # CONFIG_SENSORS_EEPROM is not set
 # CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
 # CONFIG_SENSORS_PCA9539 is not set
 # CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
 # CONFIG_I2C_DEBUG_CORE is not set
 # CONFIG_I2C_DEBUG_ALGO is not set
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
 # CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
-# Dallas's 1-wire bus
+# Sonics Silicon Backplane
 #
-# CONFIG_W1 is not set
-# CONFIG_HWMON is not set
+# CONFIG_SSB is not set
 
 #
 # Multifunction device drivers
 #
+# CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
 #
+
+#
+# Multimedia core support
+#
 CONFIG_VIDEO_DEV=m
-CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L2_COMMON=m
+CONFIG_VIDEO_ALLOW_V4L1=y
 CONFIG_VIDEO_V4L1_COMPAT=y
-CONFIG_VIDEO_V4L2=y
+# CONFIG_DVB_CORE is not set
+CONFIG_VIDEO_MEDIA=m
+
+#
+# Multimedia drivers
+#
+CONFIG_MEDIA_ATTACH=y
+CONFIG_MEDIA_TUNER=m
+CONFIG_MEDIA_TUNER_CUSTOMIZE=y
+CONFIG_MEDIA_TUNER_SIMPLE=m
+CONFIG_MEDIA_TUNER_TDA8290=m
+CONFIG_MEDIA_TUNER_TDA827X=m
+CONFIG_MEDIA_TUNER_TDA18271=m
+CONFIG_MEDIA_TUNER_TDA9887=m
+CONFIG_MEDIA_TUNER_TEA5761=m
+CONFIG_MEDIA_TUNER_TEA5767=m
+CONFIG_MEDIA_TUNER_MT20XX=m
+CONFIG_MEDIA_TUNER_MT2060=m
+CONFIG_MEDIA_TUNER_MT2266=m
+CONFIG_MEDIA_TUNER_MT2131=m
+CONFIG_MEDIA_TUNER_QT1010=m
+CONFIG_MEDIA_TUNER_XC2028=m
+CONFIG_MEDIA_TUNER_XC5000=m
+CONFIG_MEDIA_TUNER_MXL5005S=m
+CONFIG_MEDIA_TUNER_MXL5007T=m
+CONFIG_VIDEO_V4L2=m
+CONFIG_VIDEO_V4L1=m
+CONFIG_VIDEOBUF_GEN=m
+CONFIG_VIDEOBUF_VMALLOC=m
+CONFIG_VIDEOBUF_DMA_CONTIG=m
 CONFIG_VIDEO_CAPTURE_DRIVERS=y
 # CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
 CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
 # CONFIG_VIDEO_VIVI is not set
 # CONFIG_VIDEO_BT848 is not set
@@ -1058,17 +1095,46 @@ CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
 # CONFIG_VIDEO_CPIA2 is not set
 # CONFIG_VIDEO_SAA5246A is not set
 # CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
 # CONFIG_VIDEO_STRADIS is not set
 # CONFIG_VIDEO_SAA7134 is not set
 # CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
 # CONFIG_VIDEO_HEXIUM_ORION is not set
 # CONFIG_VIDEO_HEXIUM_GEMINI is not set
 # CONFIG_VIDEO_CX88 is not set
 # CONFIG_VIDEO_IVTV is not set
 # CONFIG_VIDEO_CAFE_CCIC is not set
+CONFIG_SOC_CAMERA=m
+CONFIG_SOC_CAMERA_MT9M001=m
+CONFIG_SOC_CAMERA_MT9M111=m
+CONFIG_SOC_CAMERA_MT9V022=m
+CONFIG_SOC_CAMERA_PLATFORM=m
+CONFIG_VIDEO_SH_MOBILE_CEU=m
 CONFIG_V4L_USB_DRIVERS=y
+CONFIG_USB_VIDEO_CLASS=m
+CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
+CONFIG_USB_GSPCA=m
+CONFIG_USB_M5602=m
+CONFIG_USB_GSPCA_CONEX=m
+CONFIG_USB_GSPCA_ETOMS=m
+CONFIG_USB_GSPCA_FINEPIX=m
+CONFIG_USB_GSPCA_MARS=m
+CONFIG_USB_GSPCA_OV519=m
+CONFIG_USB_GSPCA_PAC207=m
+CONFIG_USB_GSPCA_PAC7311=m
+CONFIG_USB_GSPCA_SONIXB=m
+CONFIG_USB_GSPCA_SONIXJ=m
+CONFIG_USB_GSPCA_SPCA500=m
+CONFIG_USB_GSPCA_SPCA501=m
+CONFIG_USB_GSPCA_SPCA505=m
+CONFIG_USB_GSPCA_SPCA506=m
+CONFIG_USB_GSPCA_SPCA508=m
+CONFIG_USB_GSPCA_SPCA561=m
+CONFIG_USB_GSPCA_STK014=m
+CONFIG_USB_GSPCA_SUNPLUS=m
+CONFIG_USB_GSPCA_T613=m
+CONFIG_USB_GSPCA_TV8532=m
+CONFIG_USB_GSPCA_VC032X=m
+CONFIG_USB_GSPCA_ZC3XX=m
 # CONFIG_VIDEO_PVRUSB2 is not set
 # CONFIG_VIDEO_EM28XX is not set
 # CONFIG_VIDEO_USBVISION is not set
@@ -1079,7 +1145,6 @@ CONFIG_USB_KONICAWC=m
 CONFIG_USB_QUICKCAM_MESSENGER=m
 CONFIG_USB_ET61X251=m
 # CONFIG_VIDEO_OVCAMCHIP is not set
-# CONFIG_USB_W9968CF is not set
 CONFIG_USB_OV511=m
 CONFIG_USB_SE401=m
 CONFIG_USB_SN9C102=m
@@ -1088,6 +1153,8 @@ CONFIG_USB_ZC0301=m
 CONFIG_USB_PWC=m
 # CONFIG_USB_PWC_DEBUG is not set
 # CONFIG_USB_ZR364XX is not set
+CONFIG_USB_STKWEBCAM=m
+CONFIG_USB_S2255=m
 CONFIG_RADIO_ADAPTERS=y
 # CONFIG_RADIO_CADET is not set
 # CONFIG_RADIO_RTRACK is not set
@@ -1104,33 +1171,30 @@ CONFIG_RADIO_ADAPTERS=y
 # CONFIG_RADIO_TYPHOON is not set
 # CONFIG_RADIO_ZOLTRIX is not set
 # CONFIG_USB_DSBR is not set
-# CONFIG_DVB_CORE is not set
+CONFIG_USB_SI470X=m
+CONFIG_USB_MR800=m
 CONFIG_DAB=y
 # CONFIG_USB_DABUSB is not set
 
 #
 # Graphics support
 #
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-
-#
-# Display device support
-#
-# CONFIG_DISPLAY_SUPPORT is not set
+# CONFIG_DRM is not set
 # CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
 # CONFIG_FB_SYS_FILLRECT is not set
 # CONFIG_FB_SYS_COPYAREA is not set
 # CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
 # CONFIG_FB_SYS_FOPS is not set
-CONFIG_FB_DEFERRED_IO=y
 # CONFIG_FB_SVGALIB is not set
 # CONFIG_FB_MACMODES is not set
 CONFIG_FB_BACKLIGHT=y
@@ -1158,16 +1222,30 @@ CONFIG_FB_RADEON_BACKLIGHT=y
 # CONFIG_FB_S3 is not set
 # CONFIG_FB_SAVAGE is not set
 # CONFIG_FB_SIS is not set
+# CONFIG_FB_VIA is not set
 # CONFIG_FB_NEOMAGIC is not set
 # CONFIG_FB_KYRO is not set
 # CONFIG_FB_3DFX is not set
 # CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_SMIVGX is not set
 # CONFIG_FB_VT8623 is not set
 # CONFIG_FB_TRIDENT is not set
 # CONFIG_FB_ARK is not set
 # CONFIG_FB_PM3 is not set
+# CONFIG_FB_CARMINE is not set
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=m
+# CONFIG_LCD_ILI9320 is not set
+# CONFIG_LCD_PLATFORM is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_CORGI is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
 
 #
 # Console display driver support
@@ -1176,20 +1254,14 @@ CONFIG_FB_RADEON_BACKLIGHT=y
 # CONFIG_MDA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
 # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
 # CONFIG_FONTS is not set
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
 # CONFIG_LOGO is not set
-
-#
-# Sound
-#
 CONFIG_SOUND=y
-
-#
-# Advanced Linux Sound Architecture
-#
+CONFIG_SOUND_OSS_CORE=y
 CONFIG_SND=m
 CONFIG_SND_TIMER=m
 CONFIG_SND_PCM=m
@@ -1201,28 +1273,22 @@ CONFIG_SND_MIXER_OSS=m
 CONFIG_SND_PCM_OSS=m
 CONFIG_SND_PCM_OSS_PLUGINS=y
 CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
 # CONFIG_SND_DYNAMIC_MINORS is not set
 CONFIG_SND_SUPPORT_OLD_API=y
 CONFIG_SND_VERBOSE_PROCFS=y
 # CONFIG_SND_VERBOSE_PRINTK is not set
 # CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
+CONFIG_SND_VMASTER=y
 CONFIG_SND_MPU401_UART=m
 CONFIG_SND_AC97_CODEC=m
+CONFIG_SND_DRIVERS=y
 # CONFIG_SND_DUMMY is not set
 # CONFIG_SND_VIRMIDI is not set
 # CONFIG_SND_MTPAV is not set
 # CONFIG_SND_SERIAL_U16550 is not set
 # CONFIG_SND_MPU401 is not set
-
-#
-# PCI devices
-#
+# CONFIG_SND_AC97_POWER_SAVE is not set
+CONFIG_SND_PCI=y
 # CONFIG_SND_AD1889 is not set
 # CONFIG_SND_ALS300 is not set
 # CONFIG_SND_ALI5451 is not set
@@ -1231,10 +1297,12 @@ CONFIG_SND_AC97_CODEC=m
 # CONFIG_SND_AU8810 is not set
 # CONFIG_SND_AU8820 is not set
 # CONFIG_SND_AU8830 is not set
+# CONFIG_SND_AW2 is not set
 # CONFIG_SND_AZT3328 is not set
 # CONFIG_SND_BT87X is not set
 # CONFIG_SND_CA0106 is not set
 # CONFIG_SND_CMIPCI is not set
+# CONFIG_SND_OXYGEN is not set
 # CONFIG_SND_CS4281 is not set
 # CONFIG_SND_CS46XX is not set
 # CONFIG_SND_DARLA20 is not set
@@ -1259,6 +1327,7 @@ CONFIG_SND_AC97_CODEC=m
 # CONFIG_SND_HDA_INTEL is not set
 # CONFIG_SND_HDSP is not set
 # CONFIG_SND_HDSPM is not set
+# CONFIG_SND_HIFIER is not set
 # CONFIG_SND_ICE1712 is not set
 # CONFIG_SND_ICE1724 is not set
 # CONFIG_SND_INTEL8X0 is not set
@@ -1276,43 +1345,26 @@ CONFIG_SND_AC97_CODEC=m
 # CONFIG_SND_TRIDENT is not set
 CONFIG_SND_VIA82XX=m
 # CONFIG_SND_VIA82XX_MODEM is not set
+# CONFIG_SND_VIRTUOSO is not set
 # CONFIG_SND_VX222 is not set
 # CONFIG_SND_YMFPCI is not set
-# CONFIG_SND_AC97_POWER_SAVE is not set
-
-#
-# ALSA MIPS devices
-#
-
-#
-# USB devices
-#
+CONFIG_SND_MIPS=y
+CONFIG_SND_USB=y
 # CONFIG_SND_USB_AUDIO is not set
 # CONFIG_SND_USB_CAIAQ is not set
-
-#
-# System on Chip audio support
-#
 # CONFIG_SND_SOC is not set
-
-#
-# Open Sound System
-#
 # CONFIG_SOUND_PRIME is not set
 CONFIG_AC97_BUS=m
-
-#
-# HID Devices
-#
+CONFIG_HID_SUPPORT=y
 CONFIG_HID=y
 # CONFIG_HID_DEBUG is not set
+CONFIG_HIDRAW=y
 
 #
 # USB Input Devices
 #
 CONFIG_USB_HID=m
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-# CONFIG_HID_FF is not set
+CONFIG_HID_PID=y
 CONFIG_USB_HIDDEV=y
 
 #
@@ -1322,13 +1374,39 @@ CONFIG_USB_HIDDEV=y
 # CONFIG_USB_MOUSE is not set
 
 #
-# USB support
-#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
+CONFIG_HID_A4TECH=m
+CONFIG_HID_APPLE=m
+CONFIG_HID_BELKIN=m
+CONFIG_HID_BRIGHT=m
+CONFIG_HID_CHERRY=m
+CONFIG_HID_CHICONY=m
+CONFIG_HID_CYPRESS=m
+CONFIG_HID_DELL=m
+CONFIG_HID_EZKEY=m
+CONFIG_HID_GYRATION=m
+CONFIG_HID_LOGITECH=m
+CONFIG_LOGITECH_FF=y
+CONFIG_LOGIRUMBLEPAD2_FF=y
+CONFIG_HID_MICROSOFT=m
+CONFIG_HID_MONTEREY=m
+CONFIG_HID_PANTHERLORD=m
+# CONFIG_PANTHERLORD_FF is not set
+CONFIG_HID_PETALYNX=m
+CONFIG_HID_SAMSUNG=m
+CONFIG_HID_SONY=m
+CONFIG_HID_SUNPLUS=m
+# CONFIG_THRUSTMASTER_FF is not set
+CONFIG_ZEROPLUS_FF=m
+CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
 CONFIG_USB_ARCH_HAS_EHCI=y
 CONFIG_USB=y
 # CONFIG_USB_DEBUG is not set
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
 
 #
 # Miscellaneous USB options
@@ -1338,35 +1416,46 @@ CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_DYNAMIC_MINORS is not set
 # CONFIG_USB_SUSPEND is not set
 # CONFIG_USB_OTG is not set
+CONFIG_USB_OTG_WHITELIST=y
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+# CONFIG_USB_MON is not set
+# CONFIG_USB_WUSB is not set
+CONFIG_USB_WUSB_CBAF=m
+# CONFIG_USB_WUSB_CBAF_DEBUG is not set
 
 #
 # USB Host Controller Drivers
 #
+CONFIG_USB_C67X00_HCD=m
 CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_EHCI_SPLIT_ISO=y
 CONFIG_USB_EHCI_ROOT_HUB_TT=y
 CONFIG_USB_EHCI_TT_NEWSCHED=y
-# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
 # CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_ISP1760_HCD=m
 CONFIG_USB_OHCI_HCD=y
 # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
 # CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
 CONFIG_USB_OHCI_LITTLE_ENDIAN=y
 CONFIG_USB_UHCI_HCD=m
 # CONFIG_USB_SL811_HCD is not set
+CONFIG_USB_R8A66597_HCD=m
+# CONFIG_USB_WHCI_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
 
 #
 # USB Device Class drivers
 #
 CONFIG_USB_ACM=y
 CONFIG_USB_PRINTER=y
+CONFIG_USB_WDM=m
+CONFIG_USB_TMC=m
 
 #
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
 #
 
 #
-# may also be needed; see USB_STORAGE Help for more information
+# see USB_STORAGE Help for more information
 #
 CONFIG_USB_STORAGE=y
 # CONFIG_USB_STORAGE_DEBUG is not set
@@ -1379,7 +1468,9 @@ CONFIG_USB_STORAGE=y
 # CONFIG_USB_STORAGE_SDDR55 is not set
 # CONFIG_USB_STORAGE_JUMPSHOT is not set
 # CONFIG_USB_STORAGE_ALAUDA is not set
+CONFIG_USB_STORAGE_ONETOUCH=y
 # CONFIG_USB_STORAGE_KARMA is not set
+CONFIG_USB_STORAGE_CYPRESS_ATACB=y
 CONFIG_USB_LIBUSUAL=y
 
 #
@@ -1387,15 +1478,10 @@ CONFIG_USB_LIBUSUAL=y
 #
 # CONFIG_USB_MDC800 is not set
 # CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_MON is not set
 
 #
 # USB port drivers
 #
-
-#
-# USB Serial Converter support
-#
 # CONFIG_USB_SERIAL is not set
 
 #
@@ -1404,7 +1490,7 @@ CONFIG_USB_LIBUSUAL=y
 # CONFIG_USB_EMI62 is not set
 # CONFIG_USB_EMI26 is not set
 # CONFIG_USB_ADUTUX is not set
-# CONFIG_USB_AUERSWALD is not set
+CONFIG_USB_SEVSEG=m
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
@@ -1421,56 +1507,75 @@ CONFIG_USB_LIBUSUAL=y
 # CONFIG_USB_TRANCEVIBRATOR is not set
 # CONFIG_USB_IOWARRIOR is not set
 # CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-
-#
-# USB Gadget Support
-#
+CONFIG_USB_ISIGHTFW=m
+CONFIG_USB_VST=m
 # CONFIG_USB_GADGET is not set
+# CONFIG_UWB is not set
 # CONFIG_MMC is not set
-
-#
-# LED devices
-#
+# CONFIG_MEMSTICK is not set
 # CONFIG_NEW_LEDS is not set
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-
-#
-# InfiniBand support
-#
+# CONFIG_ACCESSIBILITY is not set
 # CONFIG_INFINIBAND is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=m
 
 #
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+# RTC interfaces
 #
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+CONFIG_RTC_INTF_DEV_UIE_EMUL=y
+# CONFIG_RTC_DRV_TEST is not set
 
 #
-# Real Time Clock
+# I2C RTC drivers
 #
-# CONFIG_RTC_CLASS is not set
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
 
 #
-# DMA Engine support
+# SPI RTC drivers
 #
-# CONFIG_DMA_ENGINE is not set
 
 #
-# DMA Clients
+# Platform RTC drivers
 #
+CONFIG_RTC_DRV_CMOS=m
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
 
 #
-# DMA Devices
+# on-CPU RTC drivers
 #
+# CONFIG_DMADEVICES is not set
+CONFIG_UIO=m
+CONFIG_UIO_CIF=m
+# CONFIG_UIO_PDRV is not set
+# CONFIG_UIO_PDRV_GENIRQ is not set
+# CONFIG_UIO_SMX is not set
+# CONFIG_UIO_SERCOS3 is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
@@ -1478,27 +1583,31 @@ CONFIG_USB_LIBUSUAL=y
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
 CONFIG_EXT2_FS_XIP=y
-CONFIG_FS_XIP=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
-# CONFIG_EXT4DEV_FS is not set
+CONFIG_EXT4_FS=m
+CONFIG_EXT4DEV_COMPAT=y
+CONFIG_EXT4_FS_XATTR=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
+CONFIG_FS_XIP=y
 CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
+CONFIG_JBD2=m
+CONFIG_FS_MBCACHE=m
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_REISERFS_FS_XATTR is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
 # CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
+CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=y
 CONFIG_AUTOFS4_FS=y
 CONFIG_FUSE_FS=y
@@ -1530,11 +1639,11 @@ CONFIG_NTFS_RW=y
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
 # CONFIG_CONFIGFS_FS is not set
 
 #
@@ -1550,25 +1659,23 @@ CONFIG_RAMFS=y
 # CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+CONFIG_OMFS_FS=m
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
+CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=m
 CONFIG_NFS_V3=y
 CONFIG_NFS_V3_ACL=y
 CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
 CONFIG_NFSD=m
 CONFIG_NFSD_V2_ACL=y
 CONFIG_NFSD_V3=y
 CONFIG_NFSD_V3_ACL=y
 CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
 CONFIG_LOCKD=m
 CONFIG_LOCKD_V4=y
 CONFIG_EXPORTFS=m
@@ -1576,7 +1683,7 @@ CONFIG_NFS_ACL_SUPPORT=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=m
 CONFIG_SUNRPC_GSS=m
-# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=m
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 CONFIG_SMB_FS=m
@@ -1616,10 +1723,6 @@ CONFIG_MSDOS_PARTITION=y
 # CONFIG_KARMA_PARTITION is not set
 # CONFIG_EFI_PARTITION is not set
 # CONFIG_SYSV68_PARTITION is not set
-
-#
-# Native Language Support
-#
 CONFIG_NLS=y
 CONFIG_NLS_DEFAULT="utf8"
 # CONFIG_NLS_CODEPAGE_437 is not set
@@ -1660,30 +1763,31 @@ CONFIG_NLS_ISO8859_1=y
 # CONFIG_NLS_KOI8_R is not set
 # CONFIG_NLS_KOI8_U is not set
 CONFIG_NLS_UTF8=y
-
-#
-# Distributed Lock Manager
-#
 # CONFIG_DLM is not set
 
-#
-# Profiling support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-
 #
 # Kernel hacking
 #
 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
 # CONFIG_ENABLE_MUST_CHECK is not set
+CONFIG_FRAME_WARN=2048
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_FS is not set
 # CONFIG_HEADERS_CHECK is not set
 # CONFIG_DEBUG_KERNEL is not set
-CONFIG_CROSSCOMPILE=y
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+CONFIG_DYNAMIC_PRINTK_DEBUG=y
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
 CONFIG_CMDLINE=""
 
 #
@@ -1691,64 +1795,113 @@ CONFIG_CMDLINE=""
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+CONFIG_SECURITY_FILE_CAPABILITIES=y
+CONFIG_CRYPTO=y
 
 #
-# Cryptographic options
+# Crypto core or helper
 #
-CONFIG_CRYPTO=y
+CONFIG_CRYPTO_FIPS=y
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_AEAD=y
+CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_GF128MUL=m
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_AUTHENC=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+CONFIG_CRYPTO_CCM=m
+CONFIG_CRYPTO_GCM=m
+CONFIG_CRYPTO_SEQIV=m
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_CTR=m
+CONFIG_CRYPTO_CTS=m
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_XTS=m
+
+#
+# Hash modes
+#
 CONFIG_CRYPTO_HMAC=y
 # CONFIG_CRYPTO_XCBC is not set
-# CONFIG_CRYPTO_NULL is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
 # CONFIG_CRYPTO_MD4 is not set
 CONFIG_CRYPTO_MD5=m
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+CONFIG_CRYPTO_RMD128=m
+CONFIG_CRYPTO_RMD160=m
+CONFIG_CRYPTO_RMD256=m
+CONFIG_CRYPTO_RMD320=m
 CONFIG_CRYPTO_SHA1=m
 # CONFIG_CRYPTO_SHA256 is not set
 # CONFIG_CRYPTO_SHA512 is not set
-# CONFIG_CRYPTO_WP512 is not set
 # CONFIG_CRYPTO_TGR192 is not set
-# CONFIG_CRYPTO_GF128MUL is not set
-CONFIG_CRYPTO_ECB=m
-CONFIG_CRYPTO_CBC=m
-CONFIG_CRYPTO_PCBC=m
-# CONFIG_CRYPTO_LRW is not set
-# CONFIG_CRYPTO_CRYPTD is not set
-CONFIG_CRYPTO_DES=m
-# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_ARC4=m
 # CONFIG_CRYPTO_BLOWFISH is not set
-# CONFIG_CRYPTO_TWOFISH is not set
-# CONFIG_CRYPTO_SERPENT is not set
-# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
 # CONFIG_CRYPTO_CAST5 is not set
 # CONFIG_CRYPTO_CAST6 is not set
-# CONFIG_CRYPTO_TEA is not set
-CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
 # CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_SALSA20=m
+CONFIG_CRYPTO_SEED=m
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
 CONFIG_CRYPTO_DEFLATE=m
-# CONFIG_CRYPTO_MICHAEL_MIC is not set
-# CONFIG_CRYPTO_CRC32C is not set
-# CONFIG_CRYPTO_CAMELLIA is not set
-# CONFIG_CRYPTO_TEST is not set
+CONFIG_CRYPTO_LZO=m
 
 #
-# Hardware crypto devices
+# Random Number Generation
 #
+CONFIG_CRYPTO_ANSI_CPRNG=m
+# CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
 CONFIG_CRC_CCITT=y
-# CONFIG_CRC16 is not set
-# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC16=m
+# CONFIG_CRC_T10DIF is not set
+CONFIG_CRC_ITU_T=m
 CONFIG_CRC32=y
+CONFIG_CRC7=m
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
+CONFIG_LZO_COMPRESS=m
+CONFIG_LZO_DECOMPRESS=m
 CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
index f719bf5e01aa4b2a64b9c630beba112591f23308..1158228764175bd98dced751c530f25ee7a74332 100644 (file)
@@ -1,30 +1,34 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.23-rc2
-# Tue Aug  7 12:39:49 2007
+# Linux kernel version: 2.6.28-rc6
+# Fri Nov 28 15:41:33 2008
 #
 CONFIG_MIPS=y
 
 #
 # Machine selection
 #
-CONFIG_ZONE_DMA=y
 # CONFIG_MACH_ALCHEMY is not set
 # CONFIG_BASLER_EXCITE is not set
+# CONFIG_BCM47XX is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MACH_JAZZ is not set
+# CONFIG_LASAT is not set
 # CONFIG_LEMOTE_FULONG is not set
 # CONFIG_MIPS_MALTA is not set
 # CONFIG_MIPS_SIM is not set
-# CONFIG_MARKEINS is not set
+# CONFIG_MACH_EMMA is not set
 # CONFIG_MACH_VR41XX is not set
+# CONFIG_NXP_STB220 is not set
+# CONFIG_NXP_STB225 is not set
 # CONFIG_PNX8550_JBS is not set
 # CONFIG_PNX8550_STB810 is not set
 # CONFIG_PMC_MSP is not set
 # CONFIG_PMC_YOSEMITE is not set
 CONFIG_SGI_IP22=y
 # CONFIG_SGI_IP27 is not set
+# CONFIG_SGI_IP28 is not set
 # CONFIG_SGI_IP32 is not set
 # CONFIG_SIBYTE_CRHINE is not set
 # CONFIG_SIBYTE_CARMEL is not set
@@ -35,34 +39,49 @@ CONFIG_SGI_IP22=y
 # CONFIG_SIBYTE_SENTOSA is not set
 # CONFIG_SIBYTE_BIGSUR is not set
 # CONFIG_SNI_RM is not set
-# CONFIG_TOSHIBA_JMR3927 is not set
-# CONFIG_TOSHIBA_RBTX4927 is not set
-# CONFIG_TOSHIBA_RBTX4938 is not set
+# CONFIG_MACH_TX39XX is not set
+# CONFIG_MACH_TX49XX is not set
+# CONFIG_MIKROTIK_RB532 is not set
 # CONFIG_WR_PPMC is not set
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_ARCH_HAS_ILOG2_U32 is not set
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_SUPPORTS_OPROFILE=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 # CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
 CONFIG_ARC=y
+CONFIG_CEVT_R4K=y
+CONFIG_CSRC_R4K=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_SYS_HAS_EARLY_PRINTK=y
+# CONFIG_HOTPLUG_CPU is not set
+CONFIG_I8259=y
 # CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_ISA_DMA_SUPPORT_BROKEN=y
 CONFIG_CPU_BIG_ENDIAN=y
 # CONFIG_CPU_LITTLE_ENDIAN is not set
 CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
 CONFIG_IRQ_CPU=y
 CONFIG_SWAP_IO_SPACE=y
+CONFIG_SGI_HAS_INDYDOG=y
+CONFIG_SGI_HAS_HAL2=y
+CONFIG_SGI_HAS_SEEQ=y
+CONFIG_SGI_HAS_WD93=y
+CONFIG_SGI_HAS_ZILOG=y
+CONFIG_SGI_HAS_I8042=y
+CONFIG_DEFAULT_SGI_PARTITION=y
 CONFIG_ARC32=y
 CONFIG_BOOT_ELF32=y
-CONFIG_MIPS_L1_CACHE_SHIFT=5
+CONFIG_MIPS_L1_CACHE_SHIFT=7
 CONFIG_ARC_CONSOLE=y
 CONFIG_ARC_PROMLIB=y
 
@@ -82,6 +101,7 @@ CONFIG_ARC_PROMLIB=y
 # CONFIG_CPU_TX49XX is not set
 CONFIG_CPU_R5000=y
 # CONFIG_CPU_R5432 is not set
+# CONFIG_CPU_R5500 is not set
 # CONFIG_CPU_R6000 is not set
 # CONFIG_CPU_NEVADA is not set
 # CONFIG_CPU_R8000 is not set
@@ -115,18 +135,24 @@ CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
-CONFIG_ZONE_DMA_FLAG=1
-CONFIG_BOUNCE=y
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
@@ -159,13 +185,20 @@ CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-# CONFIG_USER_NS is not set
 # CONFIG_AUDIT is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
 CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
 CONFIG_RELAY=y
+CONFIG_NAMESPACES=y
+CONFIG_UTS_NS=y
+CONFIG_IPC_NS=y
+CONFIG_USER_NS=y
+CONFIG_PID_NS=y
 # CONFIG_BLK_DEV_INITRD is not set
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_SYSCTL=y
@@ -177,6 +210,8 @@ CONFIG_KALLSYMS=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
+# CONFIG_PCSPKR_PLATFORM is not set
+# CONFIG_COMPAT_BRK is not set
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_ANON_INODES=y
@@ -185,14 +220,21 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
 CONFIG_MODVERSIONS=y
@@ -203,6 +245,7 @@ CONFIG_BLOCK=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
 # CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
 
 #
 # IO Schedulers
@@ -216,6 +259,8 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_CFQ is not set
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
@@ -224,29 +269,24 @@ CONFIG_HW_HAS_EISA=y
 # CONFIG_ARCH_SUPPORTS_MSI is not set
 # CONFIG_EISA is not set
 CONFIG_MMU=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
+CONFIG_I8253=y
 
 #
 # Executable file formats
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
 CONFIG_BINFMT_MISC=m
 CONFIG_TRAD_SIGNALS=y
 
 #
 # Power management options
 #
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_PM=y
-# CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
 # CONFIG_SUSPEND is not set
-
-#
-# Networking
-#
 CONFIG_NET=y
 
 #
@@ -259,6 +299,8 @@ CONFIG_XFRM=y
 CONFIG_XFRM_USER=m
 # CONFIG_XFRM_SUB_POLICY is not set
 CONFIG_XFRM_MIGRATE=y
+# CONFIG_XFRM_STATISTICS is not set
+CONFIG_XFRM_IPCOMP=m
 CONFIG_NET_KEY=y
 CONFIG_NET_KEY_MIGRATE=y
 CONFIG_INET=y
@@ -282,42 +324,13 @@ CONFIG_INET_TUNNEL=m
 CONFIG_INET_XFRM_MODE_TRANSPORT=m
 CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 CONFIG_TCP_MD5SIG=y
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
 CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
@@ -334,12 +347,16 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
 CONFIG_INET6_XFRM_MODE_BEET=m
 CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
 CONFIG_IPV6_SIT=m
+CONFIG_IPV6_NDISC_NODETYPE=y
 CONFIG_IPV6_TUNNEL=m
 CONFIG_IPV6_MULTIPLE_TABLES=y
 CONFIG_IPV6_SUBTREES=y
+CONFIG_IPV6_MROUTE=y
+CONFIG_IPV6_PIMSM_V2=y
 CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
+CONFIG_NETFILTER_ADVANCED=y
 
 #
 # Core Netfilter Configuration
@@ -347,12 +364,12 @@ CONFIG_NETFILTER=y
 CONFIG_NETFILTER_NETLINK=m
 CONFIG_NETFILTER_NETLINK_QUEUE=m
 CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NF_CONNTRACK_ENABLED=m
 CONFIG_NF_CONNTRACK=m
 CONFIG_NF_CT_ACCT=y
 CONFIG_NF_CONNTRACK_MARK=y
 CONFIG_NF_CONNTRACK_SECMARK=y
 CONFIG_NF_CONNTRACK_EVENTS=y
+CONFIG_NF_CT_PROTO_DCCP=m
 CONFIG_NF_CT_PROTO_GRE=m
 CONFIG_NF_CT_PROTO_SCTP=m
 CONFIG_NF_CT_PROTO_UDPLITE=m
@@ -366,18 +383,22 @@ CONFIG_NF_CONNTRACK_SANE=m
 CONFIG_NF_CONNTRACK_SIP=m
 CONFIG_NF_CONNTRACK_TFTP=m
 CONFIG_NF_CT_NETLINK=m
+CONFIG_NETFILTER_TPROXY=m
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
+CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
 CONFIG_NETFILTER_XT_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+CONFIG_NETFILTER_XT_TARGET_RATEEST=m
+CONFIG_NETFILTER_XT_TARGET_TPROXY=m
 CONFIG_NETFILTER_XT_TARGET_TRACE=m
 CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
 CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
+CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
 CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
@@ -386,39 +407,75 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 CONFIG_NETFILTER_XT_MATCH_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_OWNER=m
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 CONFIG_NETFILTER_XT_MATCH_QUOTA=m
+CONFIG_NETFILTER_XT_MATCH_RATEEST=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT=y
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_SOCKET=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
 CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+CONFIG_NETFILTER_XT_MATCH_TIME=m
 CONFIG_NETFILTER_XT_MATCH_U32=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+CONFIG_IP_VS=m
+CONFIG_IP_VS_IPV6=y
+# CONFIG_IP_VS_DEBUG is not set
+CONFIG_IP_VS_TAB_BITS=12
+
+#
+# IPVS transport protocol load balancing support
+#
+CONFIG_IP_VS_PROTO_TCP=y
+CONFIG_IP_VS_PROTO_UDP=y
+CONFIG_IP_VS_PROTO_AH_ESP=y
+CONFIG_IP_VS_PROTO_ESP=y
+CONFIG_IP_VS_PROTO_AH=y
+
+#
+# IPVS scheduler
+#
+CONFIG_IP_VS_RR=m
+CONFIG_IP_VS_WRR=m
+CONFIG_IP_VS_LC=m
+CONFIG_IP_VS_WLC=m
+CONFIG_IP_VS_LBLC=m
+CONFIG_IP_VS_LBLCR=m
+CONFIG_IP_VS_DH=m
+CONFIG_IP_VS_SH=m
+CONFIG_IP_VS_SED=m
+CONFIG_IP_VS_NQ=m
+
+#
+# IPVS application helper
+#
+CONFIG_IP_VS_FTP=m
 
 #
 # IP: Netfilter Configuration
 #
+CONFIG_NF_DEFRAG_IPV4=m
 CONFIG_NF_CONNTRACK_IPV4=m
 CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
@@ -426,11 +483,13 @@ CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_NF_NAT=m
 CONFIG_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_NF_NAT_SNMP_BASIC=m
+CONFIG_NF_NAT_PROTO_DCCP=m
 CONFIG_NF_NAT_PROTO_GRE=m
+CONFIG_NF_NAT_PROTO_UDPLITE=m
+CONFIG_NF_NAT_PROTO_SCTP=m
 CONFIG_NF_NAT_FTP=m
 CONFIG_NF_NAT_IRC=m
 CONFIG_NF_NAT_TFTP=m
@@ -439,32 +498,30 @@ CONFIG_NF_NAT_PPTP=m
 CONFIG_NF_NAT_H323=m
 CONFIG_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
 CONFIG_IP_NF_ARP_MANGLE=m
 
 #
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
+# IPv6: Netfilter Configuration
 #
 CONFIG_NF_CONNTRACK_IPV6=m
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
 CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
 CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_REJECT=m
 CONFIG_IP6_NF_MANGLE=m
 CONFIG_IP6_NF_TARGET_HL=m
@@ -479,6 +536,7 @@ CONFIG_SCTP_HMAC_MD5=y
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
@@ -488,12 +546,7 @@ CONFIG_SCTP_HMAC_MD5=y
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
 CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_FIFO=y
 
 #
 # Queueing/Scheduling
@@ -502,7 +555,7 @@ CONFIG_NET_SCH_CBQ=m
 CONFIG_NET_SCH_HTB=m
 CONFIG_NET_SCH_HFSC=m
 CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RR=m
+# CONFIG_NET_SCH_MULTIQ is not set
 CONFIG_NET_SCH_RED=m
 CONFIG_NET_SCH_SFQ=m
 CONFIG_NET_SCH_TEQL=m
@@ -526,6 +579,7 @@ CONFIG_NET_CLS_U32=m
 # CONFIG_CLS_U32_MARK is not set
 CONFIG_NET_CLS_RSVP=m
 CONFIG_NET_CLS_RSVP6=m
+CONFIG_NET_CLS_FLOW=m
 # CONFIG_NET_EMATCH is not set
 CONFIG_NET_CLS_ACT=y
 CONFIG_NET_ACT_POLICE=y
@@ -533,35 +587,28 @@ CONFIG_NET_ACT_GACT=m
 CONFIG_GACT_PROB=y
 CONFIG_NET_ACT_MIRRED=m
 CONFIG_NET_ACT_IPT=m
+CONFIG_NET_ACT_NAT=m
 CONFIG_NET_ACT_PEDIT=m
 CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_CLS_POLICE=y
+CONFIG_NET_ACT_SKBEDIT=m
 # CONFIG_NET_CLS_IND is not set
+CONFIG_NET_SCH_FIFO=y
 
 #
 # Network testing
 #
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
+CONFIG_PHONET=m
 CONFIG_FIB_RULES=y
-
-#
-# Wireless
-#
-CONFIG_CFG80211=m
+# CONFIG_WIRELESS is not set
 CONFIG_WIRELESS_EXT=y
-CONFIG_MAC80211=m
-# CONFIG_MAC80211_DEBUG is not set
 CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
 CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
 CONFIG_RFKILL=m
 CONFIG_RFKILL_INPUT=m
 # CONFIG_NET_9P is not set
@@ -588,7 +635,9 @@ CONFIG_CDROM_PKTCDVD=m
 CONFIG_CDROM_PKTCDVD_BUFFERS=8
 # CONFIG_CDROM_PKTCDVD_WCACHE is not set
 CONFIG_ATA_OVER_ETH=m
+# CONFIG_BLK_DEV_HD is not set
 # CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
 #
@@ -628,20 +677,22 @@ CONFIG_SCSI_SPI_ATTRS=m
 # CONFIG_SCSI_FC_ATTRS is not set
 CONFIG_SCSI_ISCSI_ATTRS=m
 # CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
 CONFIG_SCSI_LOWLEVEL=y
 CONFIG_ISCSI_TCP=m
 CONFIG_SGIWD93_SCSI=y
 # CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_DH is not set
 # CONFIG_ATA is not set
 # CONFIG_MD is not set
 CONFIG_NETDEVICES=y
-# CONFIG_NETDEVICES_MULTIQUEUE is not set
 # CONFIG_IFB is not set
 CONFIG_DUMMY=m
 CONFIG_BONDING=m
 CONFIG_MACVLAN=m
 CONFIG_EQUALIZER=m
 CONFIG_TUN=m
+CONFIG_VETH=m
 CONFIG_PHYLIB=m
 
 #
@@ -656,11 +707,21 @@ CONFIG_CICADA_PHY=m
 # CONFIG_SMSC_PHY is not set
 # CONFIG_BROADCOM_PHY is not set
 # CONFIG_ICPLUS_PHY is not set
-# CONFIG_FIXED_PHY is not set
+CONFIG_REALTEK_PHY=m
+CONFIG_MDIO_BITBANG=m
 CONFIG_NET_ETHERNET=y
-# CONFIG_MII is not set
+CONFIG_MII=m
 # CONFIG_AX88796 is not set
+CONFIG_SMC91X=m
 # CONFIG_DM9000 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
 CONFIG_SGISEEQ=y
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
@@ -672,12 +733,12 @@ CONFIG_WLAN_PRE80211=y
 CONFIG_STRIP=m
 CONFIG_WLAN_80211=y
 # CONFIG_LIBERTAS is not set
+# CONFIG_IWLWIFI_LEDS is not set
 CONFIG_HOSTAP=m
 # CONFIG_HOSTAP_FIRMWARE is not set
 # CONFIG_WAN is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 # CONFIG_NETPOLL is not set
 # CONFIG_NET_POLL_CONTROLLER is not set
@@ -699,7 +760,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
 # CONFIG_INPUT_EVDEV is not set
 # CONFIG_INPUT_EVBUG is not set
 
@@ -720,6 +780,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
 # CONFIG_MOUSE_PS2_SYNAPTICS is not set
 # CONFIG_MOUSE_PS2_LIFEBOOK is not set
 CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
 # CONFIG_MOUSE_PS2_TOUCHKIT is not set
 CONFIG_MOUSE_SERIAL=m
 # CONFIG_MOUSE_VSXXXAA is not set
@@ -742,9 +803,11 @@ CONFIG_SERIO_RAW=m
 # Character devices
 #
 CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
 CONFIG_VT_HW_CONSOLE_BINDING=y
+CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -761,6 +824,17 @@ CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
 # CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_R3964 is not set
+CONFIG_RAW_DRIVER=m
+CONFIG_MAX_RAW_DEVS=256
+# CONFIG_TCG_TPM is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+CONFIG_THERMAL=m
 CONFIG_WATCHDOG=y
 # CONFIG_WATCHDOG_NOWAYOUT is not set
 
@@ -769,47 +843,50 @@ CONFIG_WATCHDOG=y
 #
 # CONFIG_SOFT_WATCHDOG is not set
 CONFIG_INDYDOG=m
-# CONFIG_HW_RANDOM is not set
-# CONFIG_RTC is not set
-# CONFIG_R3964 is not set
-CONFIG_RAW_DRIVER=m
-CONFIG_MAX_RAW_DEVS=256
-# CONFIG_TCG_TPM is not set
-# CONFIG_I2C is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
-# SPI support
+# Sonics Silicon Backplane
 #
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-# CONFIG_W1 is not set
-# CONFIG_POWER_SUPPLY is not set
-# CONFIG_HWMON is not set
+# CONFIG_SSB is not set
 
 #
 # Multifunction device drivers
 #
+# CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
 #
+
+#
+# Multimedia core support
+#
 # CONFIG_VIDEO_DEV is not set
 # CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
 # CONFIG_DAB is not set
 
 #
 # Graphics support
 #
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Display device support
 #
 # CONFIG_DISPLAY_SUPPORT is not set
-# CONFIG_VGASTATE is not set
-# CONFIG_VIDEO_OUTPUT_CONTROL is not set
-# CONFIG_FB is not set
 
 #
 # Console display driver support
@@ -823,48 +900,77 @@ CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_VGA16 is not set
 # CONFIG_LOGO_LINUX_CLUT224 is not set
 CONFIG_LOGO_SGI_CLUT224=y
-
-#
-# Sound
-#
 # CONFIG_SOUND is not set
 CONFIG_HID_SUPPORT=y
 CONFIG_HID=y
 # CONFIG_HID_DEBUG is not set
+CONFIG_HIDRAW=y
+CONFIG_HID_PID=y
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
 CONFIG_USB_SUPPORT=y
 # CONFIG_USB_ARCH_HAS_HCD is not set
 # CONFIG_USB_ARCH_HAS_OHCI is not set
 # CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
 
 #
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+# Enable Host or Gadget support to see Inventra options
 #
 
 #
-# USB Gadget Support
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
 #
 # CONFIG_USB_GADGET is not set
 # CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
 # CONFIG_NEW_LEDS is not set
-# CONFIG_RTC_CLASS is not set
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
 
 #
-# DMA Engine support
+# RTC interfaces
 #
-# CONFIG_DMA_ENGINE is not set
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+CONFIG_RTC_INTF_DEV_UIE_EMUL=y
+# CONFIG_RTC_DRV_TEST is not set
 
 #
-# DMA Clients
+# SPI RTC drivers
 #
 
 #
-# DMA Devices
+# Platform RTC drivers
 #
+# CONFIG_RTC_DRV_CMOS is not set
+CONFIG_RTC_DRV_DS1286=y
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
 
 #
-# Userspace I/O
+# on-CPU RTC drivers
 #
+# CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
@@ -876,29 +982,33 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
-# CONFIG_EXT4DEV_FS is not set
+CONFIG_EXT4_FS=m
+CONFIG_EXT4DEV_COMPAT=y
+CONFIG_EXT4_FS_XATTR=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
 CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
+CONFIG_JBD2=m
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
 CONFIG_XFS_FS=m
 CONFIG_XFS_QUOTA=y
-CONFIG_XFS_SECURITY=y
 # CONFIG_XFS_POSIX_ACL is not set
 # CONFIG_XFS_RT is not set
-# CONFIG_GFS2_FS is not set
+# CONFIG_XFS_DEBUG is not set
 # CONFIG_OCFS2_FS is not set
-CONFIG_MINIX_FS=m
-# CONFIG_ROMFS_FS is not set
+CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
 CONFIG_QUOTA=y
+CONFIG_QUOTA_NETLINK_INTERFACE=y
+# CONFIG_PRINT_QUOTA_WARNING is not set
 # CONFIG_QFMT_V1 is not set
 CONFIG_QFMT_V2=m
 CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=m
 CONFIG_AUTOFS4_FS=m
 CONFIG_FUSE_FS=m
@@ -929,11 +1039,11 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 CONFIG_TMPFS_POSIX_ACL=y
 # CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
 CONFIG_CONFIGFS_FS=m
 
 #
@@ -949,27 +1059,25 @@ CONFIG_CONFIGFS_FS=m
 CONFIG_EFS_FS=m
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
+CONFIG_MINIX_FS=m
+CONFIG_OMFS_FS=m
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 CONFIG_UFS_FS=m
 # CONFIG_UFS_FS_WRITE is not set
 # CONFIG_UFS_DEBUG is not set
-
-#
-# Network File Systems
-#
+CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=m
 CONFIG_NFS_V3=y
 CONFIG_NFS_V3_ACL=y
 # CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
 CONFIG_NFSD=m
 CONFIG_NFSD_V2_ACL=y
 CONFIG_NFSD_V3=y
 CONFIG_NFSD_V3_ACL=y
 # CONFIG_NFSD_V4 is not set
-CONFIG_NFSD_TCP=y
 CONFIG_LOCKD=m
 CONFIG_LOCKD_V4=y
 CONFIG_EXPORTFS=m
@@ -977,7 +1085,7 @@ CONFIG_NFS_ACL_SUPPORT=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=m
 CONFIG_SUNRPC_GSS=m
-# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=m
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 CONFIG_SMB_FS=m
@@ -986,12 +1094,12 @@ CONFIG_SMB_NLS_REMOTE="cp437"
 CONFIG_CIFS=m
 # CONFIG_CIFS_STATS is not set
 # CONFIG_CIFS_WEAK_PW_HASH is not set
+CONFIG_CIFS_UPCALL=y
 # CONFIG_CIFS_XATTR is not set
 # CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_CIFS_EXPERIMENTAL is not set
 # CONFIG_NCP_FS is not set
 CONFIG_CODA_FS=m
-# CONFIG_CODA_FS_OLD_API is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -1015,10 +1123,6 @@ CONFIG_SGI_PARTITION=y
 # CONFIG_KARMA_PARTITION is not set
 # CONFIG_EFI_PARTITION is not set
 # CONFIG_SYSV68_PARTITION is not set
-
-#
-# Native Language Support
-#
 CONFIG_NLS=m
 CONFIG_NLS_DEFAULT="iso8859-1"
 CONFIG_NLS_CODEPAGE_437=m
@@ -1059,30 +1163,32 @@ CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_KOI8_R=m
 CONFIG_NLS_KOI8_U=m
 CONFIG_NLS_UTF8=m
-
-#
-# Distributed Lock Manager
-#
 CONFIG_DLM=m
 # CONFIG_DLM_DEBUG is not set
 
-#
-# Profiling support
-#
-# CONFIG_PROFILING is not set
-
 #
 # Kernel hacking
 #
 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
 CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_FS is not set
 # CONFIG_HEADERS_CHECK is not set
 # CONFIG_DEBUG_KERNEL is not set
-CONFIG_CROSSCOMPILE=y
+CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+
+#
+# Tracers
+#
+CONFIG_DYNAMIC_PRINTK_DEBUG=y
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
 CONFIG_CMDLINE=""
 
 #
@@ -1091,46 +1197,97 @@ CONFIG_CMDLINE=""
 CONFIG_KEYS=y
 CONFIG_KEYS_DEBUG_PROC_KEYS=y
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+CONFIG_SECURITY_FILE_CAPABILITIES=y
 CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+CONFIG_CRYPTO_FIPS=y
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_ABLKCIPHER=m
-CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_AEAD=y
+CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_CRYPTD=m
+CONFIG_CRYPTO_AUTHENC=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+CONFIG_CRYPTO_CCM=m
+CONFIG_CRYPTO_GCM=m
+CONFIG_CRYPTO_SEQIV=m
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_CTR=m
+CONFIG_CRYPTO_CTS=m
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_LRW=m
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_XTS=m
+
+#
+# Hash modes
+#
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_XCBC=m
-CONFIG_CRYPTO_NULL=m
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=m
 CONFIG_CRYPTO_MD4=m
 CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_RMD128=m
+CONFIG_CRYPTO_RMD160=m
+CONFIG_CRYPTO_RMD256=m
+CONFIG_CRYPTO_RMD320=m
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SHA256=m
 CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_GF128MUL=m
-CONFIG_CRYPTO_ECB=m
-CONFIG_CRYPTO_CBC=m
-CONFIG_CRYPTO_PCBC=m
-CONFIG_CRYPTO_LRW=m
-CONFIG_CRYPTO_CRYPTD=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_FCRYPT=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_TWOFISH_COMMON=m
-CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_WP512=m
+
+#
+# Ciphers
+#
 CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_CAMELLIA=m
 CONFIG_CRYPTO_CAST5=m
 CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_FCRYPT=m
 CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_SALSA20=m
+CONFIG_CRYPTO_SEED=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+
+#
+# Compression
+#
 CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-CONFIG_CRYPTO_CAMELLIA=m
-# CONFIG_CRYPTO_TEST is not set
+CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+CONFIG_CRYPTO_ANSI_CPRNG=m
 # CONFIG_CRYPTO_HW is not set
 
 #
@@ -1139,12 +1296,15 @@ CONFIG_CRYPTO_CAMELLIA=m
 CONFIG_BITREVERSE=m
 # CONFIG_CRC_CCITT is not set
 CONFIG_CRC16=m
-# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC_T10DIF=m
+CONFIG_CRC_ITU_T=m
 CONFIG_CRC32=m
 # CONFIG_CRC7 is not set
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
+CONFIG_LZO_COMPRESS=m
+CONFIG_LZO_DECOMPRESS=m
 CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
index fe4699df9626c27fc1113c0d6d9e09c36c7277e8..de4c7a0a96ddde228e6b2806ea5f5a48a8758a4c 100644 (file)
@@ -1,71 +1,71 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.20
-# Tue Feb 20 21:47:33 2007
+# Linux kernel version: 2.6.28-rc7
+# Wed Dec 10 14:39:08 2008
 #
 CONFIG_MIPS=y
 
 #
 # Machine selection
 #
-CONFIG_ZONE_DMA=y
-# CONFIG_MIPS_MTX1 is not set
-# CONFIG_MIPS_BOSPORUS is not set
-# CONFIG_MIPS_PB1000 is not set
-# CONFIG_MIPS_PB1100 is not set
-# CONFIG_MIPS_PB1500 is not set
-# CONFIG_MIPS_PB1550 is not set
-# CONFIG_MIPS_PB1200 is not set
-# CONFIG_MIPS_DB1000 is not set
-# CONFIG_MIPS_DB1100 is not set
-# CONFIG_MIPS_DB1500 is not set
-# CONFIG_MIPS_DB1550 is not set
-# CONFIG_MIPS_DB1200 is not set
-# CONFIG_MIPS_MIRAGE is not set
+# CONFIG_MACH_ALCHEMY is not set
 # CONFIG_BASLER_EXCITE is not set
+# CONFIG_BCM47XX is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MACH_JAZZ is not set
+# CONFIG_LASAT is not set
+# CONFIG_LEMOTE_FULONG is not set
 # CONFIG_MIPS_MALTA is not set
-# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
-# CONFIG_MOMENCO_JAGUAR_ATX is not set
-# CONFIG_MIPS_XXS1500 is not set
+# CONFIG_MACH_EMMA is not set
+# CONFIG_MACH_VR41XX is not set
+# CONFIG_NXP_STB220 is not set
+# CONFIG_NXP_STB225 is not set
 # CONFIG_PNX8550_JBS is not set
 # CONFIG_PNX8550_STB810 is not set
-# CONFIG_MACH_VR41XX is not set
+# CONFIG_PMC_MSP is not set
 # CONFIG_PMC_YOSEMITE is not set
-# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
+# CONFIG_SGI_IP28 is not set
 CONFIG_SGI_IP32=y
-# CONFIG_SIBYTE_BIGSUR is not set
-# CONFIG_SIBYTE_SWARM is not set
-# CONFIG_SIBYTE_SENTOSA is not set
-# CONFIG_SIBYTE_RHONE is not set
-# CONFIG_SIBYTE_CARMEL is not set
-# CONFIG_SIBYTE_LITTLESUR is not set
 # CONFIG_SIBYTE_CRHINE is not set
+# CONFIG_SIBYTE_CARMEL is not set
 # CONFIG_SIBYTE_CRHONE is not set
+# CONFIG_SIBYTE_RHONE is not set
+# CONFIG_SIBYTE_SWARM is not set
+# CONFIG_SIBYTE_LITTLESUR is not set
+# CONFIG_SIBYTE_SENTOSA is not set
+# CONFIG_SIBYTE_BIGSUR is not set
 # CONFIG_SNI_RM is not set
-# CONFIG_TOSHIBA_JMR3927 is not set
-# CONFIG_TOSHIBA_RBTX4927 is not set
-# CONFIG_TOSHIBA_RBTX4938 is not set
+# CONFIG_MACH_TX39XX is not set
+# CONFIG_MACH_TX49XX is not set
+# CONFIG_MIKROTIK_RB532 is not set
+# CONFIG_WR_PPMC is not set
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_ARCH_HAS_ILOG2_U32 is not set
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_SUPPORTS_OPROFILE=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 # CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
 CONFIG_ARC=y
+CONFIG_CEVT_R4K=y
+CONFIG_CSRC_R4K=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
+# CONFIG_HOTPLUG_CPU is not set
+# CONFIG_NO_IOPORT is not set
 CONFIG_CPU_BIG_ENDIAN=y
 # CONFIG_CPU_LITTLE_ENDIAN is not set
 CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
+CONFIG_IRQ_CPU=y
 CONFIG_ARC32=y
 CONFIG_BOOT_ELF32=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
@@ -75,6 +75,7 @@ CONFIG_ARC_PROMLIB=y
 #
 # CPU selection
 #
+# CONFIG_CPU_LOONGSON2 is not set
 # CONFIG_CPU_MIPS32_R1 is not set
 # CONFIG_CPU_MIPS32_R2 is not set
 # CONFIG_CPU_MIPS64_R1 is not set
@@ -87,6 +88,7 @@ CONFIG_ARC_PROMLIB=y
 # CONFIG_CPU_TX49XX is not set
 CONFIG_CPU_R5000=y
 # CONFIG_CPU_R5432 is not set
+# CONFIG_CPU_R5500 is not set
 # CONFIG_CPU_R6000 is not set
 # CONFIG_CPU_NEVADA is not set
 # CONFIG_CPU_R8000 is not set
@@ -116,65 +118,73 @@ CONFIG_RM7000_CPU_SCACHE=y
 CONFIG_MIPS_MT_DISABLED=y
 # CONFIG_MIPS_MT_SMP is not set
 # CONFIG_MIPS_MT_SMTC is not set
-# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_RESOURCES_64BIT=y
-CONFIG_ZONE_DMA_FLAG=1
+CONFIG_PHYS_ADDR_T_64BIT=y
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
-# CONFIG_HZ_250 is not set
+CONFIG_HZ_250=y
 # CONFIG_HZ_256 is not set
-CONFIG_HZ_1000=y
+# CONFIG_HZ_1000 is not set
 # CONFIG_HZ_1024 is not set
 CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
-CONFIG_HZ=1000
-# CONFIG_PREEMPT_NONE is not set
-CONFIG_PREEMPT_VOLUNTARY=y
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 # CONFIG_KEXEC is not set
+# CONFIG_SECCOMP is not set
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_STACKTRACE_SUPPORT=y
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
-# Code maturity level options
+# General setup
 #
 CONFIG_EXPERIMENTAL=y
 CONFIG_BROKEN_ON_SMP=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
 CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
-# CONFIG_IPC_NS is not set
 CONFIG_SYSVIPC_SYSCTL=y
-# CONFIG_POSIX_MQUEUE is not set
+CONFIG_POSIX_MQUEUE=y
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 # CONFIG_TASKSTATS is not set
-# CONFIG_UTS_NS is not set
-# CONFIG_AUDIT is not set
-# CONFIG_IKCONFIG is not set
+CONFIG_AUDIT=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
 CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
 CONFIG_RELAY=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+# CONFIG_NAMESPACES is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
 CONFIG_SYSCTL_SYSCALL=y
@@ -184,27 +194,43 @@ CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
+CONFIG_PCSPKR_PLATFORM=y
+CONFIG_COMPAT_BRK=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
-CONFIG_SLAB=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_PCI_QUIRKS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+# CONFIG_MARKERS is not set
+CONFIG_OPROFILE=m
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-# CONFIG_MODULES is not set
-
-#
-# Block layer
-#
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
 CONFIG_BLOCK=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+CONFIG_BLOCK_COMPAT=y
 
 #
 # IO Schedulers
@@ -213,59 +239,50 @@ CONFIG_IOSCHED_NOOP=y
 CONFIG_IOSCHED_AS=y
 CONFIG_IOSCHED_DEADLINE=y
 CONFIG_IOSCHED_CFQ=y
-CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_AS is not set
 # CONFIG_DEFAULT_DEADLINE is not set
-# CONFIG_DEFAULT_CFQ is not set
+CONFIG_DEFAULT_CFQ=y
 # CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_DEFAULT_IOSCHED="cfq"
+CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
 CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCI_LEGACY is not set
 CONFIG_MMU=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
 # CONFIG_PCCARD is not set
-
-#
-# PCI Hotplug Support
-#
 # CONFIG_HOTPLUG_PCI is not set
 
 #
 # Executable file formats
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
 CONFIG_BINFMT_MISC=y
-# CONFIG_BUILD_ELF64 is not set
 CONFIG_MIPS32_COMPAT=y
 CONFIG_COMPAT=y
 CONFIG_SYSVIPC_COMPAT=y
 CONFIG_MIPS32_O32=y
-# CONFIG_MIPS32_N32 is not set
+CONFIG_MIPS32_N32=y
 CONFIG_BINFMT_ELF32=y
 
 #
 # Power management options
 #
-CONFIG_PM=y
-# CONFIG_PM_LEGACY is not set
-# CONFIG_PM_DEBUG is not set
-# CONFIG_PM_SYSFS_DEPRECATED is not set
-
-#
-# Networking
-#
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_PM is not set
 CONFIG_NET=y
 
 #
 # Networking options
 #
-# CONFIG_NETDEBUG is not set
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
@@ -273,56 +290,83 @@ CONFIG_XFRM=y
 CONFIG_XFRM_USER=y
 # CONFIG_XFRM_SUB_POLICY is not set
 CONFIG_XFRM_MIGRATE=y
+# CONFIG_XFRM_STATISTICS is not set
+CONFIG_XFRM_IPCOMP=m
 CONFIG_NET_KEY=y
 CONFIG_NET_KEY_MIGRATE=y
 CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
+CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_FIB_HASH=y
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_DHCP=y
 CONFIG_IP_PNP_BOOTP=y
 # CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+# CONFIG_NET_IPGRE_BROADCAST is not set
+# CONFIG_IP_MROUTE is not set
 # CONFIG_ARPD is not set
 # CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_XFRM_TUNNEL is not set
-# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_XFRM_TUNNEL=m
+CONFIG_INET_TUNNEL=m
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
-# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_ADVANCED=y
+CONFIG_TCP_CONG_BIC=m
 CONFIG_TCP_CONG_CUBIC=y
+CONFIG_TCP_CONG_WESTWOOD=m
+CONFIG_TCP_CONG_HTCP=m
+# CONFIG_TCP_CONG_HSTCP is not set
+# CONFIG_TCP_CONG_HYBLA is not set
+# CONFIG_TCP_CONG_VEGAS is not set
+# CONFIG_TCP_CONG_SCALABLE is not set
+# CONFIG_TCP_CONG_LP is not set
+# CONFIG_TCP_CONG_VENO is not set
+# CONFIG_TCP_CONG_YEAH is not set
+# CONFIG_TCP_CONG_ILLINOIS is not set
+# CONFIG_DEFAULT_BIC is not set
+CONFIG_DEFAULT_CUBIC=y
+# CONFIG_DEFAULT_HTCP is not set
+# CONFIG_DEFAULT_VEGAS is not set
+# CONFIG_DEFAULT_WESTWOOD is not set
+# CONFIG_DEFAULT_RENO is not set
 CONFIG_DEFAULT_TCP_CONG="cubic"
 CONFIG_TCP_MD5SIG=y
-# CONFIG_IPV6 is not set
-# CONFIG_INET6_XFRM_TUNNEL is not set
-# CONFIG_INET6_TUNNEL is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_NDISC_NODETYPE=y
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_IPV6_MROUTE is not set
 CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
 # CONFIG_IP_DCCP is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
 # CONFIG_IP_SCTP is not set
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
@@ -332,10 +376,6 @@ CONFIG_NETWORK_SECMARK=y
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
 # CONFIG_NET_SCHED is not set
 
 #
@@ -343,15 +383,14 @@ CONFIG_NETWORK_SECMARK=y
 #
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
-CONFIG_IEEE80211=y
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=y
-CONFIG_IEEE80211_CRYPT_CCMP=y
-CONFIG_IEEE80211_SOFTMAC=y
-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
-CONFIG_WIRELESS_EXT=y
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
 
 #
 # Device Drivers
@@ -360,60 +399,40 @@ CONFIG_WIRELESS_EXT=y
 #
 # Generic Driver Options
 #
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
 # CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
 CONFIG_CONNECTOR=y
 CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
 # CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
 # CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNPACPI is not set
-
-#
-# Block devices
-#
+CONFIG_BLK_DEV=y
 # CONFIG_BLK_CPQ_DA is not set
 # CONFIG_BLK_CPQ_CISS_DA is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=y
-# CONFIG_BLK_DEV_CRYPTOLOOP is not set
-# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_LOOP=m
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+CONFIG_BLK_DEV_NBD=m
 # CONFIG_BLK_DEV_SX8 is not set
 # CONFIG_BLK_DEV_RAM is not set
-# CONFIG_BLK_DEV_INITRD is not set
-CONFIG_CDROM_PKTCDVD=y
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=y
-
-#
-# Misc devices
-#
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
 CONFIG_SGI_IOC4=y
 # CONFIG_TIFM_CORE is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_HP_ILO is not set
+# CONFIG_C2PORT is not set
+CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
 #
@@ -421,19 +440,20 @@ CONFIG_SGI_IOC4=y
 #
 CONFIG_RAID_ATTRS=y
 CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
 CONFIG_SCSI_TGT=y
-CONFIG_SCSI_NETLINK=y
+# CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
 
 #
 # SCSI support type (disk, tape, CD-ROM)
 #
 CONFIG_BLK_DEV_SD=y
-CONFIG_CHR_DEV_ST=y
-CONFIG_CHR_DEV_OSST=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
 CONFIG_BLK_DEV_SR=y
 CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=y
+CONFIG_CHR_DEV_SG=m
 # CONFIG_CHR_DEV_SCH is not set
 
 #
@@ -443,35 +463,36 @@ CONFIG_SCSI_MULTI_LUN=y
 CONFIG_SCSI_CONSTANTS=y
 CONFIG_SCSI_LOGGING=y
 CONFIG_SCSI_SCAN_ASYNC=y
+CONFIG_SCSI_WAIT_SCAN=m
 
 #
 # SCSI Transports
 #
 CONFIG_SCSI_SPI_ATTRS=y
-CONFIG_SCSI_FC_ATTRS=y
+# CONFIG_SCSI_FC_ATTRS is not set
 # CONFIG_SCSI_ISCSI_ATTRS is not set
 CONFIG_SCSI_SAS_ATTRS=y
 CONFIG_SCSI_SAS_LIBSAS=y
+CONFIG_SCSI_SAS_HOST_SMP=y
 # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-
-#
-# SCSI low-level drivers
-#
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
 # CONFIG_ISCSI_TCP is not set
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
 # CONFIG_SCSI_3W_9XXX is not set
 # CONFIG_SCSI_ACARD is not set
 # CONFIG_SCSI_AACRAID is not set
 CONFIG_SCSI_AIC7XXX=y
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
 CONFIG_AIC7XXX_DEBUG_ENABLE=y
 CONFIG_AIC7XXX_DEBUG_MASK=0
 CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
-CONFIG_SCSI_AIC94XX=y
-# CONFIG_AIC94XX_DEBUG is not set
+# CONFIG_SCSI_AIC94XX is not set
+# CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_ARCMSR is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
@@ -482,6 +503,7 @@ CONFIG_SCSI_AIC94XX=y
 # CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_MVSAS is not set
 # CONFIG_SCSI_STEX is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
@@ -492,147 +514,81 @@ CONFIG_SCSI_AIC94XX=y
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_DEBUG is not set
 # CONFIG_SCSI_SRP is not set
-
-#
-# Serial ATA (prod) and Parallel ATA (experimental) drivers
-#
+# CONFIG_SCSI_DH is not set
 # CONFIG_ATA is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
 # CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
 # CONFIG_FUSION is not set
-# CONFIG_FUSION_SPI is not set
-# CONFIG_FUSION_FC is not set
-# CONFIG_FUSION_SAS is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
-# CONFIG_IEEE1394 is not set
 
 #
-# I2O device support
+# Enable only one of the two stacks, unless you know what you are doing
 #
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
 # CONFIG_I2O is not set
-
-#
-# Network device support
-#
 CONFIG_NETDEVICES=y
-# CONFIG_DUMMY is not set
-# CONFIG_BONDING is not set
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+# CONFIG_MACVLAN is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
-
-#
-# ARCnet devices
-#
+# CONFIG_VETH is not set
 # CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-CONFIG_PHYLIB=y
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=y
-CONFIG_DAVICOM_PHY=y
-CONFIG_QSEMI_PHY=y
-CONFIG_LXT_PHY=y
-CONFIG_CICADA_PHY=y
-CONFIG_VITESSE_PHY=y
-CONFIG_SMSC_PHY=y
-# CONFIG_BROADCOM_PHY is not set
-# CONFIG_FIXED_PHY is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
+# CONFIG_PHYLIB is not set
 CONFIG_NET_ETHERNET=y
-# CONFIG_MII is not set
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
 CONFIG_SGI_O2MACE_ETH=y
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_CASSINI is not set
 # CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_SMC91X is not set
 # CONFIG_DM9000 is not set
-
-#
-# Tulip family network device support
-#
-# CONFIG_NET_TULIP is not set
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=m
+CONFIG_TULIP=m
+# CONFIG_TULIP_MWI is not set
+CONFIG_TULIP_MMIO=y
+# CONFIG_TULIP_NAPI is not set
+# CONFIG_DE4X5 is not set
+# CONFIG_WINBOND_840 is not set
+# CONFIG_DM9102 is not set
+# CONFIG_ULI526X is not set
 # CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_NET_PCI is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SIS190 is not set
-# CONFIG_SKGE is not set
-# CONFIG_SKY2 is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_TIGON3 is not set
-# CONFIG_BNX2 is not set
-CONFIG_QLA3XXX=y
-# CONFIG_ATL1 is not set
-
-#
-# Ethernet (10000 Mbit)
-#
-# CONFIG_CHELSIO_T1 is not set
-CONFIG_CHELSIO_T3=y
-# CONFIG_IXGB is not set
-# CONFIG_S2IO is not set
-# CONFIG_MYRI10GE is not set
-CONFIG_NETXEN_NIC=y
-
-#
-# Token Ring devices
-#
+# CONFIG_B44 is not set
+# CONFIG_ATL2 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
 # CONFIG_TR is not set
 
 #
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Wan interfaces
+# Wireless LAN
 #
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
 # CONFIG_WAN is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 # CONFIG_NET_FC is not set
-# CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 # CONFIG_NETPOLL is not set
 # CONFIG_NET_POLL_CONTROLLER is not set
-
-#
-# ISDN subsystem
-#
 # CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
 # CONFIG_PHONE is not set
 
 #
@@ -640,6 +596,7 @@ CONFIG_NETXEN_NIC=y
 #
 CONFIG_INPUT=y
 # CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
 
 #
 # Userland interfaces
@@ -649,16 +606,32 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
-# CONFIG_INPUT_EVDEV is not set
+CONFIG_INPUT_EVDEV=m
 # CONFIG_INPUT_EVBUG is not set
 
 #
 # Input Device Drivers
 #
-# CONFIG_INPUT_KEYBOARD is not set
-# CONFIG_INPUT_MOUSE is not set
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_LIFEBOOK=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_VSXXXAA is not set
 # CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
 # CONFIG_INPUT_TOUCHSCREEN is not set
 # CONFIG_INPUT_MISC is not set
 
@@ -669,8 +642,8 @@ CONFIG_SERIO=y
 # CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
-# CONFIG_SERIO_MACEPS2 is not set
-# CONFIG_SERIO_LIBPS2 is not set
+CONFIG_SERIO_MACEPS2=y
+CONFIG_SERIO_LIBPS2=y
 CONFIG_SERIO_RAW=y
 # CONFIG_GAMEPORT is not set
 
@@ -678,10 +651,13 @@ CONFIG_SERIO_RAW=y
 # Character devices
 #
 CONFIG_VT=y
+# CONFIG_CONSOLE_TRANSLATIONS is not set
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_NOZOMI is not set
 
 #
 # Serial drivers
@@ -702,192 +678,304 @@ CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
-
-#
-# IPMI
-#
 # CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-# CONFIG_WATCHDOG is not set
-# CONFIG_HW_RANDOM is not set
-# CONFIG_RTC is not set
-# CONFIG_GEN_RTC is not set
-# CONFIG_DTLK is not set
+CONFIG_HW_RANDOM=y
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
-# CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
-
-#
-# TPM devices
-#
 # CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_I5K_AMB is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SIS5595 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_VT8231 is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
 
 #
-# I2C support
+# Watchdog Device Drivers
 #
-# CONFIG_I2C is not set
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_ALIM7101_WDT is not set
 
 #
-# SPI support
+# PCI-based Watchdog Cards
 #
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
+# CONFIG_PCIPCWATCHDOG is not set
+# CONFIG_WDTPCI is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
-# Dallas's 1-wire bus
+# Sonics Silicon Backplane
 #
-# CONFIG_W1 is not set
+# CONFIG_SSB is not set
 
 #
-# Hardware Monitoring support
+# Multifunction device drivers
 #
-# CONFIG_HWMON is not set
-# CONFIG_HWMON_VID is not set
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
 #
-# CONFIG_VIDEO_DEV is not set
 
 #
-# Digital Video Broadcasting Devices
+# Multimedia core support
 #
-# CONFIG_DVB is not set
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L2_COMMON=m
+CONFIG_VIDEO_ALLOW_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+# CONFIG_DVB_CORE is not set
+CONFIG_VIDEO_MEDIA=m
 
 #
-# Graphics support
+# Multimedia drivers
 #
-# CONFIG_FIRMWARE_EDID is not set
-# CONFIG_FB is not set
+# CONFIG_MEDIA_ATTACH is not set
+CONFIG_VIDEO_V4L2=m
+CONFIG_VIDEO_V4L1=m
+CONFIG_VIDEOBUF_GEN=m
+CONFIG_VIDEOBUF_VMALLOC=m
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+CONFIG_VIDEO_VIVI=m
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_STRADIS is not set
+# CONFIG_SOC_CAMERA is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_RADIO_GEMTEK_PCI is not set
+# CONFIG_RADIO_MAXIRADIO is not set
+# CONFIG_RADIO_MAESTRO is not set
+CONFIG_DAB=y
 
 #
-# Console display driver support
+# Graphics support
 #
-# CONFIG_VGA_CONSOLE is not set
-CONFIG_DUMMY_CONSOLE=y
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=y
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_UVESA is not set
+CONFIG_FB_GBE=y
+CONFIG_FB_GBE_MEM=4
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_VIA is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_CARMINE is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
-# Sound
+# Display device support
 #
-# CONFIG_SOUND is not set
+# CONFIG_DISPLAY_SUPPORT is not set
 
 #
-# HID Devices
+# Console display driver support
 #
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_SGI_CLUT224=y
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
 CONFIG_HID=y
 # CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+# CONFIG_HID_PID is not set
 
 #
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-# CONFIG_USB is not set
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
+# Special HID drivers
 #
+CONFIG_HID_COMPAT=y
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_UWB is not set
 # CONFIG_MMC is not set
-
-#
-# LED devices
-#
+# CONFIG_MEMSTICK is not set
 # CONFIG_NEW_LEDS is not set
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-
-#
-# InfiniBand support
-#
+# CONFIG_ACCESSIBILITY is not set
 # CONFIG_INFINIBAND is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+# CONFIG_RTC_HCTOSYS is not set
+# CONFIG_RTC_DEBUG is not set
 
 #
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+# RTC interfaces
 #
+# CONFIG_RTC_INTF_SYSFS is not set
+# CONFIG_RTC_INTF_PROC is not set
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
 
 #
-# Real Time Clock
+# SPI RTC drivers
 #
-# CONFIG_RTC_CLASS is not set
 
 #
-# DMA Engine support
+# Platform RTC drivers
 #
-# CONFIG_DMA_ENGINE is not set
+CONFIG_RTC_DRV_CMOS=y
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
 
 #
-# DMA Clients
-#
-
-#
-# DMA Devices
-#
-
-#
-# Auxiliary Display support
-#
-
-#
-# Virtualization
+# on-CPU RTC drivers
 #
+# CONFIG_DMADEVICES is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
 #
 CONFIG_EXT2_FS=y
-# CONFIG_EXT2_FS_XATTR is not set
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
 # CONFIG_EXT2_FS_XIP is not set
-# CONFIG_EXT3_FS is not set
-# CONFIG_EXT4DEV_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+# CONFIG_EXT4_FS is not set
+CONFIG_JBD=y
+CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
 # CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
+CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
-# CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
-CONFIG_FUSE_FS=y
+CONFIG_QUOTA=y
+# CONFIG_QUOTA_NETLINK_INTERFACE is not set
+CONFIG_PRINT_QUOTA_WARNING=y
+CONFIG_QFMT_V1=m
+CONFIG_QFMT_V2=m
+CONFIG_QUOTACTL=y
+CONFIG_AUTOFS_FS=m
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
 CONFIG_GENERIC_ACL=y
 
 #
 # CD-ROM/DVD Filesystems
 #
-# CONFIG_ISO9660_FS is not set
-# CONFIG_UDF_FS is not set
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
 
 #
 # DOS/FAT/NT Filesystems
 #
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 # CONFIG_NTFS_FS is not set
 
 #
@@ -896,11 +984,11 @@ CONFIG_GENERIC_ACL=y
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 CONFIG_TMPFS_POSIX_ACL=y
 # CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
 CONFIG_CONFIGFS_FS=y
 
 #
@@ -916,33 +1004,42 @@ CONFIG_CONFIGFS_FS=y
 # CONFIG_EFS_FS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
+CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
-# CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
-# CONFIG_CIFS is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_UPCALL is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
 
 #
 # Partition Types
@@ -953,45 +1050,83 @@ CONFIG_PARTITION_ADVANCED=y
 # CONFIG_AMIGA_PARTITION is not set
 # CONFIG_ATARI_PARTITION is not set
 # CONFIG_MAC_PARTITION is not set
-# CONFIG_MSDOS_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
 # CONFIG_LDM_PARTITION is not set
 CONFIG_SGI_PARTITION=y
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
 # CONFIG_KARMA_PARTITION is not set
 # CONFIG_EFI_PARTITION is not set
-
-#
-# Native Language Support
-#
-# CONFIG_NLS is not set
-
-#
-# Distributed Lock Manager
-#
-CONFIG_DLM=y
-CONFIG_DLM_TCP=y
-# CONFIG_DLM_SCTP is not set
-# CONFIG_DLM_DEBUG is not set
-
-#
-# Profiling support
-#
-# CONFIG_PROFILING is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+# CONFIG_DLM is not set
 
 #
 # Kernel hacking
 #
 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
 CONFIG_ENABLE_MUST_CHECK=y
-# CONFIG_MAGIC_SYSRQ is not set
+CONFIG_FRAME_WARN=2048
+CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_FS is not set
 # CONFIG_HEADERS_CHECK is not set
 # CONFIG_DEBUG_KERNEL is not set
-CONFIG_LOG_BUF_SHIFT=14
-CONFIG_CROSSCOMPILE=y
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
 CONFIG_CMDLINE=""
 
 #
@@ -1000,51 +1135,99 @@ CONFIG_CMDLINE=""
 CONFIG_KEYS=y
 CONFIG_KEYS_DEBUG_PROC_KEYS=y
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
 
 #
-# Cryptographic options
+# Crypto core or helper
 #
-CONFIG_CRYPTO=y
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_GF128MUL=y
+CONFIG_CRYPTO_NULL=y
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_AUTHENC=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_LRW=y
+CONFIG_CRYPTO_PCBC=y
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_XCBC=y
-CONFIG_CRYPTO_NULL=y
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=y
 CONFIG_CRYPTO_MD4=y
 CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=y
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
 CONFIG_CRYPTO_SHA1=y
 CONFIG_CRYPTO_SHA256=y
 CONFIG_CRYPTO_SHA512=y
-CONFIG_CRYPTO_WP512=y
 CONFIG_CRYPTO_TGR192=y
-CONFIG_CRYPTO_GF128MUL=y
-CONFIG_CRYPTO_ECB=y
-CONFIG_CRYPTO_CBC=y
-CONFIG_CRYPTO_PCBC=y
-CONFIG_CRYPTO_LRW=y
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_FCRYPT=y
-CONFIG_CRYPTO_BLOWFISH=y
-CONFIG_CRYPTO_TWOFISH=y
-CONFIG_CRYPTO_TWOFISH_COMMON=y
-CONFIG_CRYPTO_SERPENT=y
+CONFIG_CRYPTO_WP512=y
+
+#
+# Ciphers
+#
 CONFIG_CRYPTO_AES=y
+CONFIG_CRYPTO_ANUBIS=y
+CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_BLOWFISH=y
+CONFIG_CRYPTO_CAMELLIA=y
 CONFIG_CRYPTO_CAST5=y
 CONFIG_CRYPTO_CAST6=y
-CONFIG_CRYPTO_TEA=y
-CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_FCRYPT=y
 CONFIG_CRYPTO_KHAZAD=y
-CONFIG_CRYPTO_ANUBIS=y
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_SERPENT=y
+CONFIG_CRYPTO_TEA=y
+CONFIG_CRYPTO_TWOFISH=y
+CONFIG_CRYPTO_TWOFISH_COMMON=y
+
+#
+# Compression
+#
 CONFIG_CRYPTO_DEFLATE=y
-CONFIG_CRYPTO_MICHAEL_MIC=y
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_CAMELLIA=y
+# CONFIG_CRYPTO_LZO is not set
 
 #
-# Hardware crypto devices
+# Random Number Generation
 #
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+# CONFIG_CRYPTO_DEV_HIFN_795X is not set
 
 #
 # Library routines
@@ -1052,10 +1235,15 @@ CONFIG_CRYPTO_CAMELLIA=y
 CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 CONFIG_CRC16=y
+CONFIG_CRC_T10DIF=y
+CONFIG_CRC_ITU_T=m
 CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
 CONFIG_LIBCRC32C=y
+CONFIG_AUDIT_GENERIC=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_PLIST=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
index 74daa0cf87e6800cea3a7c3e71b7bf8b9801e5d5..1ecdd3b65dc7bc7f9e11c1e29aa09bc514a55da7 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.23-rc2
-# Tue Aug  7 12:59:29 2007
+# Linux kernel version: 2.6.28-rc6
+# Mon Dec  1 08:08:19 2008
 #
 CONFIG_MIPS=y
 
@@ -11,20 +11,25 @@ CONFIG_MIPS=y
 CONFIG_ZONE_DMA=y
 # CONFIG_MACH_ALCHEMY is not set
 # CONFIG_BASLER_EXCITE is not set
+# CONFIG_BCM47XX is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MACH_JAZZ is not set
+# CONFIG_LASAT is not set
 # CONFIG_LEMOTE_FULONG is not set
 CONFIG_MIPS_MALTA=y
 # CONFIG_MIPS_SIM is not set
-# CONFIG_MARKEINS is not set
+# CONFIG_MACH_EMMA is not set
 # CONFIG_MACH_VR41XX is not set
+# CONFIG_NXP_STB220 is not set
+# CONFIG_NXP_STB225 is not set
 # CONFIG_PNX8550_JBS is not set
 # CONFIG_PNX8550_STB810 is not set
 # CONFIG_PMC_MSP is not set
 # CONFIG_PMC_YOSEMITE is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
+# CONFIG_SGI_IP28 is not set
 # CONFIG_SGI_IP32 is not set
 # CONFIG_SIBYTE_CRHINE is not set
 # CONFIG_SIBYTE_CARMEL is not set
@@ -35,13 +40,14 @@ CONFIG_MIPS_MALTA=y
 # CONFIG_SIBYTE_SENTOSA is not set
 # CONFIG_SIBYTE_BIGSUR is not set
 # CONFIG_SNI_RM is not set
-# CONFIG_TOSHIBA_JMR3927 is not set
-# CONFIG_TOSHIBA_RBTX4927 is not set
-# CONFIG_TOSHIBA_RBTX4938 is not set
+# CONFIG_MACH_TX39XX is not set
+# CONFIG_MACH_TX49XX is not set
+# CONFIG_MIKROTIK_RB532 is not set
 # CONFIG_WR_PPMC is not set
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_ARCH_HAS_ILOG2_U32 is not set
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_SUPPORTS_OPROFILE=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
@@ -51,21 +57,26 @@ CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 # CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_BOOT_RAW=y
 CONFIG_CEVT_R4K=y
+CONFIG_CSRC_R4K=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_SYS_HAS_EARLY_PRINTK=y
-CONFIG_GENERIC_ISA_DMA=y
+# CONFIG_HOTPLUG_CPU is not set
 CONFIG_I8259=y
 CONFIG_MIPS_BONITO64=y
 CONFIG_MIPS_MSC=y
 # CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_ISA_DMA=y
 # CONFIG_CPU_BIG_ENDIAN is not set
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
 CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
 CONFIG_IRQ_CPU=y
+CONFIG_IRQ_GIC=y
+CONFIG_MIPS_BOARDS_GEN=y
 CONFIG_PCI_GT64XXX_PCI0=y
 CONFIG_SWAP_IO_SPACE=y
 CONFIG_BOOT_ELF32=y
@@ -74,10 +85,6 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
 #
 # CPU selection
 #
-CONFIG_TICK_ONESHOT=y
-CONFIG_NO_HZ=y
-CONFIG_HIGH_RES_TIMERS=y
-CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 # CONFIG_CPU_LOONGSON2 is not set
 # CONFIG_CPU_MIPS32_R1 is not set
 CONFIG_CPU_MIPS32_R2=y
@@ -91,6 +98,7 @@ CONFIG_CPU_MIPS32_R2=y
 # CONFIG_CPU_TX49XX is not set
 # CONFIG_CPU_R5000 is not set
 # CONFIG_CPU_R5432 is not set
+# CONFIG_CPU_R5500 is not set
 # CONFIG_CPU_R6000 is not set
 # CONFIG_CPU_NEVADA is not set
 # CONFIG_CPU_R8000 is not set
@@ -108,6 +116,7 @@ CONFIG_CPU_MIPSR2=y
 CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
 CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
 CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_HARDWARE_WATCHPOINTS=y
 
 #
 # Kernel type
@@ -125,6 +134,8 @@ CONFIG_CPU_HAS_PREFETCH=y
 CONFIG_MIPS_MT_SMP=y
 # CONFIG_MIPS_MT_SMTC is not set
 CONFIG_MIPS_MT=y
+# CONFIG_SCHED_SMT is not set
+CONFIG_SYS_SUPPORTS_SCHED_SMT=y
 CONFIG_SYS_SUPPORTS_MULTITHREADING=y
 CONFIG_MIPS_MT_FPAFF=y
 # CONFIG_MIPS_VPE_LOADER is not set
@@ -132,7 +143,6 @@ CONFIG_CPU_HAS_LLSC=y
 # CONFIG_CPU_HAS_SMARTMIPS is not set
 CONFIG_CPU_MIPSR2_IRQ_VI=y
 CONFIG_CPU_MIPSR2_IRQ_EI=y
-CONFIG_CPU_MIPSR2_SRS=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
@@ -140,22 +150,30 @@ CONFIG_IRQ_PER_CPU=y
 CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_SYS_SUPPORTS_SMARTMIPS=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 CONFIG_SMP=y
+CONFIG_SMP_UP=y
 CONFIG_SYS_SUPPORTS_SMP=y
 CONFIG_NR_CPUS_DEFAULT_2=y
 CONFIG_NR_CPUS=2
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 # CONFIG_HZ_48 is not set
 CONFIG_HZ_100=y
 # CONFIG_HZ_128 is not set
@@ -168,7 +186,6 @@ CONFIG_HZ=100
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
-CONFIG_PREEMPT_BKL=y
 # CONFIG_KEXEC is not set
 CONFIG_SECCOMP=y
 CONFIG_LOCKDEP_SUPPORT=y
@@ -189,13 +206,19 @@ CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-# CONFIG_USER_NS is not set
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
 CONFIG_LOG_BUF_SHIFT=15
-# CONFIG_CPUSETS is not set
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
 CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
 CONFIG_RELAY=y
+CONFIG_NAMESPACES=y
+CONFIG_UTS_NS=y
+CONFIG_IPC_NS=y
+# CONFIG_USER_NS is not set
+CONFIG_PID_NS=y
 # CONFIG_BLK_DEV_INITRD is not set
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_SYSCTL=y
@@ -207,6 +230,8 @@ CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
+CONFIG_PCSPKR_PLATFORM=y
+# CONFIG_COMPAT_BRK is not set
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_ANON_INODES=y
@@ -215,14 +240,23 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_PCI_QUIRKS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_USE_GENERIC_SMP_HELPERS=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
 CONFIG_MODVERSIONS=y
@@ -234,6 +268,7 @@ CONFIG_BLOCK=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
 # CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
 
 #
 # IO Schedulers
@@ -247,19 +282,19 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_CFQ is not set
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
 CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
 # CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCI_LEGACY=y
 CONFIG_MMU=y
 CONFIG_I8253=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
 # CONFIG_PCCARD is not set
 # CONFIG_HOTPLUG_PCI is not set
 
@@ -267,6 +302,8 @@ CONFIG_I8253=y
 # Executable file formats
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
 CONFIG_TRAD_SIGNALS=y
 
@@ -274,12 +311,7 @@ CONFIG_TRAD_SIGNALS=y
 # Power management options
 #
 CONFIG_PM=y
-# CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
-
-#
-# Networking
-#
 CONFIG_NET=y
 
 #
@@ -292,6 +324,8 @@ CONFIG_XFRM=y
 CONFIG_XFRM_USER=m
 # CONFIG_XFRM_SUB_POLICY is not set
 CONFIG_XFRM_MIGRATE=y
+# CONFIG_XFRM_STATISTICS is not set
+CONFIG_XFRM_IPCOMP=m
 CONFIG_NET_KEY=y
 CONFIG_NET_KEY_MIGRATE=y
 CONFIG_INET=y
@@ -323,42 +357,13 @@ CONFIG_INET_TUNNEL=m
 CONFIG_INET_XFRM_MODE_TRANSPORT=m
 CONFIG_INET_XFRM_MODE_TUNNEL=m
 CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_LRO=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 CONFIG_TCP_MD5SIG=y
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
 CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
@@ -375,11 +380,15 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
 CONFIG_INET6_XFRM_MODE_BEET=m
 # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
 CONFIG_IPV6_SIT=m
+CONFIG_IPV6_NDISC_NODETYPE=y
 CONFIG_IPV6_TUNNEL=m
 # CONFIG_IPV6_MULTIPLE_TABLES is not set
+CONFIG_IPV6_MROUTE=y
+CONFIG_IPV6_PIMSM_V2=y
 CONFIG_NETWORK_SECMARK=y
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
+CONFIG_NETFILTER_ADVANCED=y
 CONFIG_BRIDGE_NETFILTER=y
 
 #
@@ -388,12 +397,12 @@ CONFIG_BRIDGE_NETFILTER=y
 CONFIG_NETFILTER_NETLINK=m
 CONFIG_NETFILTER_NETLINK_QUEUE=m
 CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NF_CONNTRACK_ENABLED=m
 CONFIG_NF_CONNTRACK=m
 CONFIG_NF_CT_ACCT=y
 CONFIG_NF_CONNTRACK_MARK=y
 CONFIG_NF_CONNTRACK_SECMARK=y
 CONFIG_NF_CONNTRACK_EVENTS=y
+CONFIG_NF_CT_PROTO_DCCP=m
 CONFIG_NF_CT_PROTO_GRE=m
 CONFIG_NF_CT_PROTO_SCTP=m
 CONFIG_NF_CT_PROTO_UDPLITE=m
@@ -407,18 +416,22 @@ CONFIG_NF_CONNTRACK_SANE=m
 CONFIG_NF_CONNTRACK_SIP=m
 CONFIG_NF_CONNTRACK_TFTP=m
 CONFIG_NF_CT_NETLINK=m
+CONFIG_NETFILTER_TPROXY=m
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
+# CONFIG_NETFILTER_XT_TARGET_CONNSECMARK is not set
 # CONFIG_NETFILTER_XT_TARGET_DSCP is not set
 CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+CONFIG_NETFILTER_XT_TARGET_RATEEST=m
+CONFIG_NETFILTER_XT_TARGET_TPROXY=m
 CONFIG_NETFILTER_XT_TARGET_TRACE=m
 CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-# CONFIG_NETFILTER_XT_TARGET_CONNSECMARK is not set
 CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
+CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
 CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
@@ -427,40 +440,76 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
 # CONFIG_NETFILTER_XT_MATCH_DSCP is not set
 CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
 CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
 CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_OWNER=m
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
 # CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
 CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 CONFIG_NETFILTER_XT_MATCH_QUOTA=m
+CONFIG_NETFILTER_XT_MATCH_RATEEST=m
 CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_SOCKET=m
 CONFIG_NETFILTER_XT_MATCH_STATE=m
 CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+CONFIG_NETFILTER_XT_MATCH_TIME=m
 CONFIG_NETFILTER_XT_MATCH_U32=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+CONFIG_IP_VS=m
+CONFIG_IP_VS_IPV6=y
+# CONFIG_IP_VS_DEBUG is not set
+CONFIG_IP_VS_TAB_BITS=12
+
+#
+# IPVS transport protocol load balancing support
+#
+CONFIG_IP_VS_PROTO_TCP=y
+CONFIG_IP_VS_PROTO_UDP=y
+CONFIG_IP_VS_PROTO_AH_ESP=y
+CONFIG_IP_VS_PROTO_ESP=y
+CONFIG_IP_VS_PROTO_AH=y
+
+#
+# IPVS scheduler
+#
+CONFIG_IP_VS_RR=m
+CONFIG_IP_VS_WRR=m
+CONFIG_IP_VS_LC=m
+CONFIG_IP_VS_WLC=m
+CONFIG_IP_VS_LBLC=m
+CONFIG_IP_VS_LBLCR=m
+CONFIG_IP_VS_DH=m
+CONFIG_IP_VS_SH=m
+CONFIG_IP_VS_SED=m
+CONFIG_IP_VS_NQ=m
+
+#
+# IPVS application helper
+#
+CONFIG_IP_VS_FTP=m
 
 #
 # IP: Netfilter Configuration
 #
+CONFIG_NF_DEFRAG_IPV4=m
 CONFIG_NF_CONNTRACK_IPV4=m
 CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
@@ -468,11 +517,13 @@ CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_NF_NAT=m
 CONFIG_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
 CONFIG_NF_NAT_SNMP_BASIC=m
+CONFIG_NF_NAT_PROTO_DCCP=m
 CONFIG_NF_NAT_PROTO_GRE=m
+CONFIG_NF_NAT_PROTO_UDPLITE=m
+CONFIG_NF_NAT_PROTO_SCTP=m
 CONFIG_NF_NAT_FTP=m
 CONFIG_NF_NAT_IRC=m
 CONFIG_NF_NAT_TFTP=m
@@ -481,40 +532,34 @@ CONFIG_NF_NAT_PPTP=m
 CONFIG_NF_NAT_H323=m
 CONFIG_NF_NAT_SIP=m
 CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
 CONFIG_IP_NF_ARP_MANGLE=m
 
 #
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
+# IPv6: Netfilter Configuration
 #
 CONFIG_NF_CONNTRACK_IPV6=m
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
 CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
 CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_REJECT=m
 CONFIG_IP6_NF_MANGLE=m
 CONFIG_IP6_NF_TARGET_HL=m
 CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
 CONFIG_BRIDGE_NF_EBTABLES=m
 CONFIG_BRIDGE_EBT_BROUTE=m
 CONFIG_BRIDGE_EBT_T_FILTER=m
@@ -523,6 +568,7 @@ CONFIG_BRIDGE_EBT_802_3=m
 CONFIG_BRIDGE_EBT_AMONG=m
 CONFIG_BRIDGE_EBT_ARP=m
 CONFIG_BRIDGE_EBT_IP=m
+CONFIG_BRIDGE_EBT_IP6=m
 CONFIG_BRIDGE_EBT_LIMIT=m
 CONFIG_BRIDGE_EBT_MARK=m
 CONFIG_BRIDGE_EBT_PKTTYPE=m
@@ -535,6 +581,7 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
 CONFIG_BRIDGE_EBT_SNAT=m
 CONFIG_BRIDGE_EBT_LOG=m
 CONFIG_BRIDGE_EBT_ULOG=m
+CONFIG_BRIDGE_EBT_NFLOG=m
 # CONFIG_IP_DCCP is not set
 CONFIG_IP_SCTP=m
 # CONFIG_SCTP_DBG_MSG is not set
@@ -544,8 +591,12 @@ CONFIG_IP_SCTP=m
 CONFIG_SCTP_HMAC_MD5=y
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
+CONFIG_STP=m
+CONFIG_GARP=m
 CONFIG_BRIDGE=m
+# CONFIG_NET_DSA is not set
 CONFIG_VLAN_8021Q=m
+CONFIG_VLAN_8021Q_GVRP=y
 # CONFIG_DECNET is not set
 CONFIG_LLC=m
 # CONFIG_LLC2 is not set
@@ -559,12 +610,7 @@ CONFIG_IPDDP_DECAP=y
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
 CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_FIFO=y
 
 #
 # Queueing/Scheduling
@@ -573,7 +619,7 @@ CONFIG_NET_SCH_CBQ=m
 CONFIG_NET_SCH_HTB=m
 CONFIG_NET_SCH_HFSC=m
 CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RR=m
+# CONFIG_NET_SCH_MULTIQ is not set
 CONFIG_NET_SCH_RED=m
 CONFIG_NET_SCH_SFQ=m
 CONFIG_NET_SCH_TEQL=m
@@ -597,6 +643,7 @@ CONFIG_NET_CLS_U32=m
 # CONFIG_CLS_U32_MARK is not set
 CONFIG_NET_CLS_RSVP=m
 CONFIG_NET_CLS_RSVP6=m
+CONFIG_NET_CLS_FLOW=m
 # CONFIG_NET_EMATCH is not set
 CONFIG_NET_CLS_ACT=y
 CONFIG_NET_ACT_POLICE=y
@@ -604,37 +651,51 @@ CONFIG_NET_ACT_GACT=m
 CONFIG_GACT_PROB=y
 CONFIG_NET_ACT_MIRRED=m
 CONFIG_NET_ACT_IPT=m
+CONFIG_NET_ACT_NAT=m
 CONFIG_NET_ACT_PEDIT=m
 CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_CLS_POLICE=y
+CONFIG_NET_ACT_SKBEDIT=m
 CONFIG_NET_CLS_IND=y
+CONFIG_NET_SCH_FIFO=y
 
 #
 # Network testing
 #
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
+CONFIG_PHONET=m
 CONFIG_FIB_RULES=y
-
-#
-# Wireless
-#
+CONFIG_WIRELESS=y
 CONFIG_CFG80211=m
+CONFIG_NL80211=y
+CONFIG_WIRELESS_OLD_REGULATORY=y
 CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
 CONFIG_MAC80211=m
-# CONFIG_MAC80211_DEBUG is not set
+
+#
+# Rate control algorithm selection
+#
+CONFIG_MAC80211_RC_PID=y
+CONFIG_MAC80211_RC_MINSTREL=y
+CONFIG_MAC80211_RC_DEFAULT_PID=y
+# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set
+CONFIG_MAC80211_RC_DEFAULT="pid"
+CONFIG_MAC80211_MESH=y
+CONFIG_MAC80211_LEDS=y
+# CONFIG_MAC80211_DEBUG_MENU is not set
 CONFIG_IEEE80211=m
 # CONFIG_IEEE80211_DEBUG is not set
 CONFIG_IEEE80211_CRYPT_WEP=m
 CONFIG_IEEE80211_CRYPT_CCMP=m
 CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
 CONFIG_RFKILL=m
 CONFIG_RFKILL_INPUT=m
+CONFIG_RFKILL_LEDS=y
 # CONFIG_NET_9P is not set
 
 #
@@ -644,9 +705,12 @@ CONFIG_RFKILL_INPUT=m
 #
 # Generic Driver Options
 #
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
 # CONFIG_SYS_HYPERVISOR is not set
 CONFIG_CONNECTOR=m
 CONFIG_MTD=y
@@ -655,6 +719,7 @@ CONFIG_MTD=y
 CONFIG_MTD_PARTITIONS=y
 # CONFIG_MTD_REDBOOT_PARTS is not set
 # CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
 
 #
 # User Modules And Translation Layers
@@ -667,6 +732,7 @@ CONFIG_MTD_BLOCK=y
 # CONFIG_INFTL is not set
 # CONFIG_RFD_FTL is not set
 # CONFIG_SSFDC is not set
+CONFIG_MTD_OOPS=m
 
 #
 # RAM/ROM/Flash chip drivers
@@ -701,6 +767,7 @@ CONFIG_MTD_PHYSMAP=y
 CONFIG_MTD_PHYSMAP_START=0x0
 CONFIG_MTD_PHYSMAP_LEN=0x0
 CONFIG_MTD_PHYSMAP_BANKWIDTH=0
+# CONFIG_MTD_INTEL_VR_NOR is not set
 # CONFIG_MTD_PLATRAM is not set
 
 #
@@ -748,25 +815,26 @@ CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_BLK_DEV_XIP is not set
 CONFIG_CDROM_PKTCDVD=m
 CONFIG_CDROM_PKTCDVD_BUFFERS=8
 # CONFIG_CDROM_PKTCDVD_WCACHE is not set
 CONFIG_ATA_OVER_ETH=m
+# CONFIG_BLK_DEV_HD is not set
 # CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
 CONFIG_IDE=y
-CONFIG_IDE_MAX_HWIFS=4
-CONFIG_BLK_DEV_IDE=y
 
 #
-# Please see Documentation/ide.txt for help/info on IDE drives
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
 #
 # CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=y
-# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
 CONFIG_BLK_DEV_IDECD=y
+CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
 # CONFIG_BLK_DEV_IDETAPE is not set
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
 # CONFIG_BLK_DEV_IDESCSI is not set
 # CONFIG_IDE_TASK_IOCTL is not set
 CONFIG_IDE_PROC_FS=y
@@ -775,24 +843,25 @@ CONFIG_IDE_PROC_FS=y
 # IDE chipset support/bugfixes
 #
 CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+CONFIG_BLK_DEV_IDEDMA_SFF=y
+
+#
+# PCI IDE chipsets support
+#
 CONFIG_BLK_DEV_IDEPCI=y
-# CONFIG_IDEPCI_SHARE_IRQ is not set
 CONFIG_IDEPCI_PCIBUS_ORDER=y
 # CONFIG_BLK_DEV_OFFBOARD is not set
 CONFIG_BLK_DEV_GENERIC=y
 # CONFIG_BLK_DEV_OPTI621 is not set
 CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-# CONFIG_IDEDMA_ONLYDISK is not set
 # CONFIG_BLK_DEV_AEC62XX is not set
 # CONFIG_BLK_DEV_ALI15X3 is not set
 # CONFIG_BLK_DEV_AMD74XX is not set
 # CONFIG_BLK_DEV_CMD64X is not set
 # CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
 # CONFIG_BLK_DEV_CS5520 is not set
 # CONFIG_BLK_DEV_CS5530 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
 # CONFIG_BLK_DEV_HPT366 is not set
 # CONFIG_BLK_DEV_JMICRON is not set
 # CONFIG_BLK_DEV_SC1200 is not set
@@ -808,10 +877,7 @@ CONFIG_BLK_DEV_IT8213=m
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
 CONFIG_BLK_DEV_TC86C001=m
-# CONFIG_IDE_ARM is not set
 CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-# CONFIG_BLK_DEV_HD is not set
 
 #
 # SCSI device support
@@ -848,8 +914,10 @@ CONFIG_SCSI_WAIT_SCAN=m
 #
 CONFIG_SCSI_SPI_ATTRS=m
 CONFIG_SCSI_FC_ATTRS=m
+# CONFIG_SCSI_FC_TGT_ATTRS is not set
 CONFIG_SCSI_ISCSI_ATTRS=m
 # CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
 CONFIG_SCSI_LOWLEVEL=y
 CONFIG_ISCSI_TCP=m
 CONFIG_BLK_DEV_3W_XXXX_RAID=m
@@ -866,6 +934,7 @@ CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
 # CONFIG_SCSI_AIC79XX is not set
 # CONFIG_SCSI_AIC94XX is not set
 # CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_ARCMSR is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
@@ -876,6 +945,7 @@ CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
 # CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_MVSAS is not set
 # CONFIG_SCSI_STEX is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
@@ -887,6 +957,7 @@ CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
 # CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 # CONFIG_SCSI_SRP is not set
+# CONFIG_SCSI_DH is not set
 # CONFIG_ATA is not set
 CONFIG_MD=y
 CONFIG_BLK_DEV_MD=m
@@ -905,32 +976,28 @@ CONFIG_DM_SNAPSHOT=m
 CONFIG_DM_MIRROR=m
 CONFIG_DM_ZERO=m
 CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_MULTIPATH_RDAC=m
 # CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+# CONFIG_FUSION is not set
 
 #
-# Fusion MPT device support
+# IEEE 1394 (FireWire) support
 #
-# CONFIG_FUSION is not set
-# CONFIG_FUSION_SPI is not set
-# CONFIG_FUSION_FC is not set
-# CONFIG_FUSION_SAS is not set
 
 #
-# IEEE 1394 (FireWire) support
+# Enable only one of the two stacks, unless you know what you are doing
 #
 # CONFIG_FIREWIRE is not set
 # CONFIG_IEEE1394 is not set
 # CONFIG_I2O is not set
 CONFIG_NETDEVICES=y
-CONFIG_NETDEVICES_MULTIQUEUE=y
 CONFIG_IFB=m
 CONFIG_DUMMY=m
 CONFIG_BONDING=m
 CONFIG_MACVLAN=m
 CONFIG_EQUALIZER=m
 CONFIG_TUN=m
+CONFIG_VETH=m
 # CONFIG_ARCNET is not set
 CONFIG_PHYLIB=m
 
@@ -946,26 +1013,34 @@ CONFIG_VITESSE_PHY=m
 CONFIG_SMSC_PHY=m
 CONFIG_BROADCOM_PHY=m
 CONFIG_ICPLUS_PHY=m
-# CONFIG_FIXED_PHY is not set
+CONFIG_REALTEK_PHY=m
+CONFIG_MDIO_BITBANG=m
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
 CONFIG_AX88796=m
+# CONFIG_AX88796_93CX6 is not set
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_CASSINI is not set
 # CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_SMC91X is not set
 # CONFIG_DM9000 is not set
 # CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 CONFIG_NET_PCI=y
 CONFIG_PCNET32=y
-# CONFIG_PCNET32_NAPI is not set
 # CONFIG_AMD8111_ETH is not set
 # CONFIG_ADAPTEC_STARFIRE is not set
 # CONFIG_B44 is not set
 # CONFIG_FORCEDETH is not set
 CONFIG_TC35815=m
-# CONFIG_DGRS is not set
 # CONFIG_EEPRO100 is not set
 # CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
@@ -973,16 +1048,21 @@ CONFIG_TC35815=m
 # CONFIG_NE2K_PCI is not set
 # CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
+# CONFIG_R6040 is not set
 # CONFIG_SIS900 is not set
 # CONFIG_EPIC100 is not set
 # CONFIG_SUNDANCE is not set
 # CONFIG_TLAN is not set
 # CONFIG_VIA_RHINE is not set
 # CONFIG_SC92031 is not set
+# CONFIG_ATL2 is not set
 CONFIG_NETDEV_1000=y
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
 # CONFIG_E1000 is not set
+# CONFIG_E1000E is not set
+# CONFIG_IP1000 is not set
+# CONFIG_IGB is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -995,14 +1075,24 @@ CONFIG_NETDEV_1000=y
 # CONFIG_BNX2 is not set
 # CONFIG_QLA3XXX is not set
 # CONFIG_ATL1 is not set
+# CONFIG_ATL1E is not set
+# CONFIG_JME is not set
 CONFIG_NETDEV_10000=y
 # CONFIG_CHELSIO_T1 is not set
 CONFIG_CHELSIO_T3=m
+# CONFIG_ENIC is not set
+# CONFIG_IXGBE is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
 CONFIG_NETXEN_NIC=m
+# CONFIG_NIU is not set
+# CONFIG_MLX4_EN is not set
 # CONFIG_MLX4_CORE is not set
+# CONFIG_TEHUTI is not set
+# CONFIG_BNX2X is not set
+# CONFIG_QLGE is not set
+# CONFIG_SFC is not set
 # CONFIG_TR is not set
 
 #
@@ -1022,6 +1112,7 @@ CONFIG_IPW2200_QOS=y
 # CONFIG_IPW2200_DEBUG is not set
 CONFIG_LIBERTAS=m
 # CONFIG_LIBERTAS_DEBUG is not set
+# CONFIG_LIBERTAS_THINFIRM is not set
 CONFIG_HERMES=m
 CONFIG_PLX_HERMES=m
 CONFIG_TMD_HERMES=m
@@ -1030,25 +1121,30 @@ CONFIG_PCI_HERMES=m
 CONFIG_ATMEL=m
 CONFIG_PCI_ATMEL=m
 CONFIG_PRISM54=m
+# CONFIG_RTL8180 is not set
+# CONFIG_ADM8211 is not set
+# CONFIG_MAC80211_HWSIM is not set
+# CONFIG_P54_COMMON is not set
+# CONFIG_ATH5K is not set
+# CONFIG_ATH9K is not set
+# CONFIG_IWLCORE is not set
+# CONFIG_IWLWIFI_LEDS is not set
+# CONFIG_IWLAGN is not set
+# CONFIG_IWL3945 is not set
 CONFIG_HOSTAP=m
 CONFIG_HOSTAP_FIRMWARE=y
 CONFIG_HOSTAP_FIRMWARE_NVRAM=y
 CONFIG_HOSTAP_PLX=m
 CONFIG_HOSTAP_PCI=m
-CONFIG_BCM43XX=m
-CONFIG_BCM43XX_DEBUG=y
-CONFIG_BCM43XX_DMA=y
-CONFIG_BCM43XX_PIO=y
-CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
-# CONFIG_BCM43XX_DMA_MODE is not set
-# CONFIG_BCM43XX_PIO_MODE is not set
+# CONFIG_B43 is not set
+# CONFIG_B43LEGACY is not set
+# CONFIG_RT2X00 is not set
 # CONFIG_WAN is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 # CONFIG_NET_FC is not set
-# CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 # CONFIG_NETPOLL is not set
 # CONFIG_NET_POLL_CONTROLLER is not set
@@ -1070,7 +1166,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
 # CONFIG_INPUT_EVDEV is not set
 # CONFIG_INPUT_EVBUG is not set
 
@@ -1099,10 +1194,13 @@ CONFIG_SERIO_SERPORT=y
 # Character devices
 #
 CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
 CONFIG_VT_HW_CONSOLE_BINDING=y
+CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_NOZOMI is not set
 
 #
 # Serial drivers
@@ -1124,101 +1222,165 @@ CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
 # CONFIG_IPMI_HANDLER is not set
-# CONFIG_WATCHDOG is not set
 CONFIG_HW_RANDOM=m
-CONFIG_RTC=y
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
-# CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
 # CONFIG_TCG_TPM is not set
 CONFIG_DEVPORT=y
 # CONFIG_I2C is not set
-
-#
-# SPI support
-#
 # CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
 # CONFIG_W1 is not set
 # CONFIG_POWER_SUPPLY is not set
 # CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
 
 #
 # Multifunction device drivers
 #
+# CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
 #
+
+#
+# Multimedia core support
+#
 # CONFIG_VIDEO_DEV is not set
 # CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
 # CONFIG_DAB is not set
 
 #
 # Graphics support
 #
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Display device support
 #
 # CONFIG_DISPLAY_SUPPORT is not set
-# CONFIG_VGASTATE is not set
-# CONFIG_VIDEO_OUTPUT_CONTROL is not set
-# CONFIG_FB is not set
 
 #
 # Console display driver support
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-
-#
-# Sound
-#
 # CONFIG_SOUND is not set
 CONFIG_HID_SUPPORT=y
 CONFIG_HID=m
 # CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+# CONFIG_HID_PID is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
 CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
 CONFIG_USB_ARCH_HAS_EHCI=y
 # CONFIG_USB is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
 
 #
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+# Enable Host or Gadget support to see Inventra options
 #
 
 #
-# USB Gadget Support
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
 #
 # CONFIG_USB_GADGET is not set
+# CONFIG_UWB is not set
 # CONFIG_MMC is not set
-# CONFIG_NEW_LEDS is not set
+# CONFIG_MEMSTICK is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=m
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+CONFIG_LEDS_TRIGGER_BACKLIGHT=m
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
+# CONFIG_ACCESSIBILITY is not set
 # CONFIG_INFINIBAND is not set
-# CONFIG_RTC_CLASS is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
 
 #
-# DMA Engine support
+# RTC interfaces
 #
-# CONFIG_DMA_ENGINE is not set
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
 
 #
-# DMA Clients
+# SPI RTC drivers
 #
 
 #
-# DMA Devices
+# Platform RTC drivers
 #
+CONFIG_RTC_DRV_CMOS=y
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
 
 #
-# Userspace I/O
+# on-CPU RTC drivers
 #
+# CONFIG_DMADEVICES is not set
 CONFIG_UIO=m
 CONFIG_UIO_CIF=m
+# CONFIG_UIO_PDRV is not set
+# CONFIG_UIO_PDRV_GENIRQ is not set
+# CONFIG_UIO_SMX is not set
+# CONFIG_UIO_SERCOS3 is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
@@ -1230,9 +1392,8 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
 CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
@@ -1246,22 +1407,22 @@ CONFIG_JFS_SECURITY=y
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
 CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
 CONFIG_XFS_FS=m
 CONFIG_XFS_QUOTA=y
-CONFIG_XFS_SECURITY=y
 CONFIG_XFS_POSIX_ACL=y
 # CONFIG_XFS_RT is not set
-# CONFIG_GFS2_FS is not set
+# CONFIG_XFS_DEBUG is not set
 # CONFIG_OCFS2_FS is not set
-CONFIG_MINIX_FS=m
-CONFIG_ROMFS_FS=m
+CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
 CONFIG_QUOTA=y
+# CONFIG_QUOTA_NETLINK_INTERFACE is not set
+CONFIG_PRINT_QUOTA_WARNING=y
 # CONFIG_QFMT_V1 is not set
 CONFIG_QFMT_V2=y
 CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=y
 # CONFIG_AUTOFS4_FS is not set
 CONFIG_FUSE_FS=m
@@ -1291,11 +1452,11 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
 # CONFIG_CONFIGFS_FS is not set
 
 #
@@ -1312,46 +1473,48 @@ CONFIG_EFS_FS=m
 CONFIG_JFFS2_FS=m
 CONFIG_JFFS2_FS_DEBUG=0
 CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
 # CONFIG_JFFS2_SUMMARY is not set
 CONFIG_JFFS2_FS_XATTR=y
 CONFIG_JFFS2_FS_POSIX_ACL=y
 CONFIG_JFFS2_FS_SECURITY=y
 CONFIG_JFFS2_COMPRESSION_OPTIONS=y
 CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
 CONFIG_JFFS2_RTIME=y
 CONFIG_JFFS2_RUBIN=y
 # CONFIG_JFFS2_CMODE_NONE is not set
 CONFIG_JFFS2_CMODE_PRIORITY=y
 # CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+# CONFIG_UBIFS_FS is not set
 CONFIG_CRAMFS=m
 CONFIG_VXFS_FS=m
+CONFIG_MINIX_FS=m
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
+CONFIG_ROMFS_FS=m
 CONFIG_SYSV_FS=m
 CONFIG_UFS_FS=m
 # CONFIG_UFS_FS_WRITE is not set
 # CONFIG_UFS_DEBUG is not set
-
-#
-# Network File Systems
-#
+CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
+CONFIG_ROOT_NFS=y
 CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
 # CONFIG_NFSD_V3_ACL is not set
 # CONFIG_NFSD_V4 is not set
-# CONFIG_NFSD_TCP is not set
-CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_EXPORTFS=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
-# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -1365,10 +1528,6 @@ CONFIG_SUNRPC=y
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-
-#
-# Native Language Support
-#
 CONFIG_NLS=m
 CONFIG_NLS_DEFAULT="iso8859-1"
 CONFIG_NLS_CODEPAGE_437=m
@@ -1409,29 +1568,30 @@ CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_KOI8_R=m
 CONFIG_NLS_KOI8_U=m
 CONFIG_NLS_UTF8=m
-
-#
-# Distributed Lock Manager
-#
 # CONFIG_DLM is not set
 
-#
-# Profiling support
-#
-# CONFIG_PROFILING is not set
-
 #
 # Kernel hacking
 #
 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
 CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_FS is not set
 # CONFIG_HEADERS_CHECK is not set
 # CONFIG_DEBUG_KERNEL is not set
-CONFIG_CROSSCOMPILE=y
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
 CONFIG_CMDLINE=""
 
 #
@@ -1439,51 +1599,103 @@ CONFIG_CMDLINE=""
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_XOR_BLOCKS=m
 CONFIG_ASYNC_CORE=m
 CONFIG_ASYNC_MEMCPY=m
 CONFIG_ASYNC_XOR=m
 CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_ABLKCIPHER=m
-CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_AEAD=y
+CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_CRYPTD=m
+CONFIG_CRYPTO_AUTHENC=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=m
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_LRW=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_XCBC=m
-CONFIG_CRYPTO_NULL=m
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=m
 CONFIG_CRYPTO_MD4=m
 CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=m
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SHA256=m
 CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_GF128MUL=m
-CONFIG_CRYPTO_ECB=m
-CONFIG_CRYPTO_CBC=m
-CONFIG_CRYPTO_PCBC=m
-CONFIG_CRYPTO_LRW=m
-CONFIG_CRYPTO_CRYPTD=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_FCRYPT=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_TWOFISH_COMMON=m
-CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_WP512=m
+
+#
+# Ciphers
+#
 CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_CAMELLIA=m
 CONFIG_CRYPTO_CAST5=m
 CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_FCRYPT=m
 CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+
+#
+# Compression
+#
 CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-CONFIG_CRYPTO_CAMELLIA=m
-# CONFIG_CRYPTO_TEST is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 CONFIG_CRYPTO_HW=y
+# CONFIG_CRYPTO_DEV_HIFN_795X is not set
 
 #
 # Library routines
@@ -1491,7 +1703,8 @@ CONFIG_CRYPTO_HW=y
 CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 CONFIG_CRC16=m
-# CONFIG_CRC_ITU_T is not set
+# CONFIG_CRC_T10DIF is not set
+CONFIG_CRC_ITU_T=m
 CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
 CONFIG_LIBCRC32C=m
index 7a881755800f94a4be165b989a9f2f54fb6ffaa1..6c8342ae74db88cd3187d1964274aa03c6031165 100644 (file)
        mtc0    \reg, CP0_TCSTATUS
        _ehb
        .endm
+#elif defined(CONFIG_CPU_MIPSR2)
+       .macro  local_irq_enable reg=t0
+       ei
+       irq_enable_hazard
+       .endm
+
+       .macro  local_irq_disable reg=t0
+       di
+       irq_disable_hazard
+       .endm
 #else
        .macro  local_irq_enable reg=t0
        mfc0    \reg, CP0_STATUS
index 7eb63de808bc153cf3f14ed5b2f180365f0f168b..08ea46863fe5ca8ce6683fe71f527a6c4346b690 100644 (file)
@@ -7,20 +7,31 @@
 
 #include <asm/break.h>
 
-#define BUG()                                                          \
-do {                                                                   \
-       __asm__ __volatile__("break %0" : : "i" (BRK_BUG));             \
-} while (0)
+static inline void __noreturn BUG(void)
+{
+       __asm__ __volatile__("break %0" : : "i" (BRK_BUG));
+       /* Fool GCC into thinking the function doesn't return. */
+       while (1)
+               ;
+}
 
 #define HAVE_ARCH_BUG
 
 #if (_MIPS_ISA > _MIPS_ISA_MIPS1)
 
-#define BUG_ON(condition)                                              \
-do {                                                                   \
-       __asm__ __volatile__("tne $0, %0, %1"                           \
-                            : : "r" (condition), "i" (BRK_BUG));       \
-} while (0)
+static inline void  __BUG_ON(unsigned long condition)
+{
+       if (__builtin_constant_p(condition)) {
+               if (condition)
+                       BUG();
+               else
+                       return;
+       }
+       __asm__ __volatile__("tne $0, %0, %1"
+                            : : "r" (condition), "i" (BRK_BUG));
+}
+
+#define BUG_ON(C) __BUG_ON((unsigned long)(C))
 
 #define HAVE_ARCH_BUG_ON
 
index c8e554eafce355775c96f96e898ebc7ed168ece7..b5cf6457305a5812bf4a973a03453a6bc53b0527 100644 (file)
@@ -84,5 +84,7 @@ extern void set_434_reg(unsigned reg_offs, unsigned bit, unsigned len, unsigned
 extern unsigned get_434_reg(unsigned reg_offs);
 extern void set_latch_u5(unsigned char or_mask, unsigned char nand_mask);
 extern unsigned char get_latch_u5(void);
+extern void rb532_gpio_set_ilevel(int bit, unsigned gpio);
+extern void rb532_gpio_set_istat(int bit, unsigned gpio);
 
 #endif /* _RC32434_GPIO_H_ */
index 79e8ef67d0d397eb38ce223cd27160bec0a8a548..f25a8491670329ec0298e97bb8685bea31a7a02b 100644 (file)
 #define BTCS           0x010040
 #define BTCOMPARE      0x010044
 #define GPIOBASE       0x050000
-#define GPIOCFG                0x050004
-#define GPIOD          0x050008
-#define GPIOILEVEL     0x05000C
-#define GPIOISTAT      0x050010
-#define GPIONMIEN      0x050014
-#define IMASK6         0x038038
+/* Offsets relative to GPIOBASE */
+#define GPIOFUNC       0x00
+#define GPIOCFG                0x04
+#define GPIOD          0x08
+#define GPIOILEVEL     0x0C
+#define GPIOISTAT      0x10
+#define GPIONMIEN      0x14
+#define IMASK6         0x38
 #define LO_WPX         (1 << 0)
 #define LO_ALE         (1 << 1)
 #define LO_CLE         (1 << 2)
index 5510c53b7feb7f5b7d2e721b70c763d055f8ef0d..053e4634acee61b78ca8e3d4cd2fded4c4e2aa06 100644 (file)
@@ -79,6 +79,11 @@ static inline void pcibios_penalize_isa_irq(int irq, int active)
        /* We don't do dynamic PCI IRQ allocation */
 }
 
+#define HAVE_PCI_MMAP
+
+extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
+       enum pci_mmap_state mmap_state, int write_combine);
+
 /*
  * Dynamic DMA mapping stuff.
  * MIPS has everything mapped statically.
index 813abd16255d13322d27130f52df281ae48b8b78..c2c8bac43307570cd444daaa321b548025844697 100644 (file)
@@ -9,10 +9,6 @@
 #ifndef _ASM_PTRACE_H
 #define _ASM_PTRACE_H
 
-#ifdef CONFIG_64BIT
-#define __ARCH_WANT_COMPAT_SYS_PTRACE
-#endif
-
 /* 0 - 31 are integer registers, 32 - 63 are fp registers.  */
 #define FPR_BASE       32
 #define PC             64
index d3bd5c5aa2ecd0ae1fa34c9083debcac6c4107e0..9601ea95054283dc3d3ed42fb14930da9f426c01 100644 (file)
@@ -63,7 +63,7 @@ static inline int mips_clockevent_init(void)
 /*
  * Initialize the count register as a clocksource
  */
-#ifdef CONFIG_CEVT_R4K
+#ifdef CONFIG_CSRC_R4K
 extern int init_mips_clocksource(void);
 #else
 static inline int init_mips_clocksource(void)
index 86e026f067bc566c2bbd9620763e2ab6428e836a..74fb74583b4e7e83eec6fdb7d328be7436dd4398 100644 (file)
@@ -27,7 +27,7 @@ int __init init_mips_clocksource(void)
        if (!cpu_has_counter || !mips_hpt_frequency)
                return -ENXIO;
 
-       /* Calclate a somewhat reasonable rating value */
+       /* Calculate a somewhat reasonable rating value */
        clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000;
 
        clocksource_set_clock(&clocksource_mips, mips_hpt_frequency);
index 759f68066b5d529991dea584758d46c26ef1887b..d0916a55cd775f09f54826eb9358c626ba19dd7d 100644 (file)
@@ -262,14 +262,11 @@ bad_alignment:
        LEAF(sys_syscall)
        subu    t0, a0, __NR_O32_Linux  # check syscall number
        sltiu   v0, t0, __NR_O32_Linux_syscalls + 1
+       beqz    t0, einval              # do not recurse
        sll     t1, t0, 3
        beqz    v0, einval
-
        lw      t2, sys_call_table(t1)          # syscall routine
 
-       li      v1, 4000 - __NR_O32_Linux       # index of sys_syscall
-       beq     t0, v1, einval                  # do not recurse
-
        /* Some syscalls like execve get their arguments from struct pt_regs
           and claim zero arguments in the syscall table. Thus we have to
           assume the worst case and shuffle around all potential arguments.
@@ -627,7 +624,7 @@ einval:     li      v0, -ENOSYS
        sys     sys_pselect6            6
        sys     sys_ppoll               5
        sys     sys_unshare             1
-       sys     sys_splice              4
+       sys     sys_splice              6
        sys     sys_sync_file_range     7       /* 4305 */
        sys     sys_tee                 4
        sys     sys_vmsplice            4
index e266b3aa6560fa8de6e3b0fd607bee6a714685a8..30f3b6317a83f1ec7d753cdb49b96d1aedce1186 100644 (file)
@@ -390,7 +390,7 @@ EXPORT(sysn32_call_table)
        PTR     sys_splice
        PTR     sys_sync_file_range
        PTR     sys_tee
-       PTR     sys_vmsplice                    /* 6270 */
+       PTR     compat_sys_vmsplice             /* 6270 */
        PTR     sys_move_pages
        PTR     compat_sys_set_robust_list
        PTR     compat_sys_get_robust_list
index 6c7ef8313ebd702dde4997d225f06189fdb560a0..fefef4af8595493ec3c5414f3fb0fcaff14869b1 100644 (file)
@@ -174,14 +174,12 @@ not_o32_scall:
        END(handle_sys)
 
 LEAF(sys32_syscall)
-       sltu    v0, a0, __NR_O32_Linux + __NR_O32_Linux_syscalls + 1
+       subu    t0, a0, __NR_O32_Linux  # check syscall number
+       sltiu   v0, t0, __NR_O32_Linux_syscalls + 1
+       beqz    t0, einval              # do not recurse
+       dsll    t1, t0, 3
        beqz    v0, einval
-
-       dsll    v0, a0, 3
-       ld      t2, (sys_call_table - (__NR_O32_Linux * 8))(v0)
-
-       li      v1, 4000                # indirect syscall number
-       beq     a0, v1, einval          # do not recurse
+       ld      t2, sys_call_table(t1)          # syscall routine
 
        move    a0, a1                  # shift argument registers
        move    a1, a2
@@ -198,7 +196,7 @@ LEAF(sys32_syscall)
        jr      t2
        /* Unreached */
 
-einval:        li      v0, -EINVAL
+einval:        li      v0, -ENOSYS
        jr      ra
        END(sys32_syscall)
 
@@ -512,7 +510,7 @@ sys_call_table:
        PTR     sys_splice
        PTR     sys32_sync_file_range           /* 4305 */
        PTR     sys_tee
-       PTR     sys_vmsplice
+       PTR     compat_sys_vmsplice
        PTR     compat_sys_move_pages
        PTR     compat_sys_set_robust_list
        PTR     compat_sys_get_robust_list      /* 4310 */
index 972b2d2b8401b6dd7bd4922690205c6b8f3a5cdf..a1b3da6bad5cb17c577712ac4bf83f439b5d7292 100644 (file)
@@ -1134,7 +1134,7 @@ static int vpe_release(struct inode *inode, struct file *filp)
 
        /* It's good to be able to run the SP and if it chokes have a look at
           the /dev/rt?. But if we reset the pointer to the shared struct we
-          loose what has happened. So perhaps if garbage is sent to the vpe
+          lose what has happened. So perhaps if garbage is sent to the vpe
           device, use it as a trigger for the reset. Hopefully a nice
           executable will be along shortly. */
        if (ret < 0)
index 5b98d0e731c2238ae0f8ff64d3a3d139aa4ef562..e6708b3ad343f478e15a7d1102a90df2c7f61841 100644 (file)
@@ -111,6 +111,7 @@ EXPORT_SYMBOL(dma_alloc_coherent);
 void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
        dma_addr_t dma_handle)
 {
+       plat_unmap_dma_mem(dma_handle);
        free_pages((unsigned long) vaddr, get_order(size));
 }
 
@@ -121,6 +122,8 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
 {
        unsigned long addr = (unsigned long) vaddr;
 
+       plat_unmap_dma_mem(dma_handle);
+
        if (!plat_device_is_coherent(dev))
                addr = CAC_ADDR(addr);
 
index 1f602a110e101e9e54bcd4c1426cec9659eaaa23..13adb578211062d99a30c1733e7fb452d49052b2 100644 (file)
@@ -161,7 +161,7 @@ static inline int __init indy_sc_probe(void)
 
 /* XXX Check with wje if the Indy caches can differenciate between
    writeback + invalidate and just invalidate.  */
-struct bcache_ops indy_sc_ops = {
+static struct bcache_ops indy_sc_ops = {
        .bc_enable = indy_sc_enable,
        .bc_disable = indy_sc_disable,
        .bc_wback_inv = indy_sc_wback_invalidate,
index cef2db8d22253185d8d66402e4e300422fcd4645..32e847808df166cf6469a4d919b2763dd7bde8da 100644 (file)
@@ -7,9 +7,8 @@
 #
 obj-y                          := malta-amon.o malta-cmdline.o \
                                   malta-display.o malta-init.o malta-int.o \
-                                  malta-memory.o malta-mtd.o \
-                                  malta-platform.o malta-reset.o \
-                                  malta-setup.o malta-time.o
+                                  malta-memory.o malta-platform.o \
+                                  malta-reset.o malta-setup.o malta-time.o
 
 obj-$(CONFIG_EARLY_PRINTK)     += malta-console.o
 obj-$(CONFIG_PCI)              += malta-pci.o
index 96236bf33838a20ef8ab147472adba28faf51bb9..df9e526312a24ce4772cb3a332dcab66c3927a50 100644 (file)
@@ -22,9 +22,9 @@
 #include <linux/init.h>
 #include <linux/smp.h>
 
-#include <asm-mips/addrspace.h>
-#include <asm-mips/mips-boards/launch.h>
-#include <asm-mips/mipsmtregs.h>
+#include <asm/addrspace.h>
+#include <asm/mips-boards/launch.h>
+#include <asm/mipsmtregs.h>
 
 int amon_cpu_avail(int cpu)
 {
diff --git a/arch/mips/mti-malta/malta-mtd.c b/arch/mips/mti-malta/malta-mtd.c
deleted file mode 100644 (file)
index 8ad9bdf..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2006 MIPS Technologies, Inc.
- *     written by Ralf Baechle <ralf@linux-mips.org>
- */
-
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
-#include <mtd/mtd-abi.h>
-
-static struct mtd_partition malta_mtd_partitions[] = {
-       {
-               .name =         "YAMON",
-               .offset =       0x0,
-               .size =         0x100000,
-               .mask_flags =   MTD_WRITEABLE
-       }, {
-               .name =         "User FS",
-               .offset =       0x100000,
-               .size =         0x2e0000
-       }, {
-               .name =         "Board Config",
-               .offset =       0x3e0000,
-               .size =         0x020000,
-               .mask_flags =   MTD_WRITEABLE
-       }
-};
-
-static struct physmap_flash_data malta_flash_data = {
-       .width          = 4,
-       .nr_parts       = ARRAY_SIZE(malta_mtd_partitions),
-       .parts          = malta_mtd_partitions
-};
-
-static struct resource malta_flash_resource = {
-       .start          = 0x1e000000,
-       .end            = 0x1e3fffff,
-       .flags          = IORESOURCE_MEM
-};
-
-static struct platform_device malta_flash = {
-       .name           = "physmap-flash",
-       .id             = 0,
-       .dev            = {
-               .platform_data  = &malta_flash_data,
-       },
-       .num_resources  = 1,
-       .resource       = &malta_flash_resource,
-};
-
-static int __init malta_mtd_init(void)
-{
-       platform_device_register(&malta_flash);
-
-       return 0;
-}
-
-module_init(malta_mtd_init)
index 83b9bab3cd3f72c837096a4fa8ef73d0dc26db78..72e32a7715beff770347237d6944472184853cf4 100644 (file)
@@ -3,10 +3,14 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 2007 MIPS Technologies, Inc.
+ * Copyright (C) 2006, 07 MIPS Technologies, Inc.
  *   written by Ralf Baechle (ralf@linux-mips.org)
+ *     written by Ralf Baechle <ralf@linux-mips.org>
  *
- * Probe driver for the Malta's UART ports:
+ * Copyright (C) 2008 Wind River Systems, Inc.
+ *   updated by Tiejun Chen <tiejun.chen@windriver.com>
+ *
+ * 1. Probe driver for the Malta's UART ports:
  *
  *   o 2 ports in the SMC SuperIO
  *   o 1 port in the CBUS UART, a discrete 16550 which normally is only used
  *
  * We don't use 8250_platform.c on Malta as it would result in the CBUS
  * UART becoming ttyS0.
+ *
+ * 2. Register RTC-CMOS platform device on Malta.
  */
-#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/serial_8250.h>
+#include <linux/mc146818rtc.h>
+#include <linux/module.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+#include <linux/platform_device.h>
+#include <mtd/mtd-abi.h>
 
 #define SMC_PORT(base, int)                                            \
 {                                                                      \
@@ -45,21 +56,93 @@ static struct plat_serial8250_port uart8250_data[] = {
        { },
 };
 
-static struct platform_device uart8250_device = {
+static struct platform_device malta_uart8250_device = {
        .name                   = "serial8250",
-       .id                     = PLAT8250_DEV_PLATFORM2,
+       .id                     = PLAT8250_DEV_PLATFORM,
        .dev                    = {
                .platform_data  = uart8250_data,
        },
 };
 
-static int __init uart8250_init(void)
+struct resource malta_rtc_resources[] = {
+       {
+               .start  = RTC_PORT(0),
+               .end    = RTC_PORT(7),
+               .flags  = IORESOURCE_IO,
+       }, {
+               .start  = RTC_IRQ,
+               .end    = RTC_IRQ,
+               .flags  = IORESOURCE_IRQ,
+       }
+};
+
+static struct platform_device malta_rtc_device = {
+       .name           = "rtc_cmos",
+       .id             = -1,
+       .resource       = malta_rtc_resources,
+       .num_resources  = ARRAY_SIZE(malta_rtc_resources),
+};
+
+static struct mtd_partition malta_mtd_partitions[] = {
+       {
+               .name =         "YAMON",
+               .offset =       0x0,
+               .size =         0x100000,
+               .mask_flags =   MTD_WRITEABLE
+       }, {
+               .name =         "User FS",
+               .offset =       0x100000,
+               .size =         0x2e0000
+       }, {
+               .name =         "Board Config",
+               .offset =       0x3e0000,
+               .size =         0x020000,
+               .mask_flags =   MTD_WRITEABLE
+       }
+};
+
+static struct physmap_flash_data malta_flash_data = {
+       .width          = 4,
+       .nr_parts       = ARRAY_SIZE(malta_mtd_partitions),
+       .parts          = malta_mtd_partitions
+};
+
+static struct resource malta_flash_resource = {
+       .start          = 0x1e000000,
+       .end            = 0x1e3fffff,
+       .flags          = IORESOURCE_MEM
+};
+
+static struct platform_device malta_flash_device = {
+       .name           = "physmap-flash",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &malta_flash_data,
+       },
+       .num_resources  = 1,
+       .resource       = &malta_flash_resource,
+};
+
+static struct platform_device *malta_devices[] __initdata = {
+       &malta_uart8250_device,
+       &malta_rtc_device,
+       &malta_flash_device,
+};
+
+static int __init malta_add_devices(void)
 {
-       return platform_device_register(&uart8250_device);
-}
+       int err;
 
-module_init(uart8250_init);
+       err = platform_add_devices(malta_devices, ARRAY_SIZE(malta_devices));
+       if (err)
+               return err;
+
+       /*
+        * Set RTC to BCD mode to support current alarm code.
+        */
+       CMOS_WRITE(CMOS_READ(RTC_CONTROL) & ~RTC_DM_BINARY, RTC_CONTROL);
+
+       return 0;
+}
 
-MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("8250 UART probe driver for the Malta CBUS UART");
+device_initcall(malta_add_devices);
index a377e9d2d029be681072a265908ba7f0f9a2dd17..62cae740e250f9d6d42df81897bf3dabe735ede9 100644 (file)
@@ -354,6 +354,30 @@ EXPORT_SYMBOL(PCIBIOS_MIN_IO);
 EXPORT_SYMBOL(PCIBIOS_MIN_MEM);
 #endif
 
+int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
+                       enum pci_mmap_state mmap_state, int write_combine)
+{
+       unsigned long prot;
+
+       /*
+        * I/O space can be accessed via normal processor loads and stores on
+        * this platform but for now we elect not to do this and portable
+        * drivers should not do this anyway.
+        */
+       if (mmap_state == pci_mmap_io)
+               return -EINVAL;
+
+       /*
+        * Ignore write-combine; for now only return uncached mappings.
+        */
+       prot = pgprot_val(vma->vm_page_prot);
+       prot = (prot & ~_CACHE_MASK) | _CACHE_UNCACHED;
+       vma->vm_page_prot = __pgprot(prot);
+
+       return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
+               vma->vm_end - vma->vm_start, vma->vm_page_prot);
+}
+
 char * (*pcibios_plat_setup)(char *str) __devinitdata;
 
 char *__devinit pcibios_setup(char *str)
index 2f22d714d5b09487c5535f49cce0018dcda4d070..c1c29181bd4641de62977a19107a4d5ad64734c0 100644 (file)
@@ -118,7 +118,7 @@ static struct platform_device cf_slot0 = {
 /* Resources and device for NAND */
 static int rb532_dev_ready(struct mtd_info *mtd)
 {
-       return readl(IDT434_REG_BASE + GPIOD) & GPIO_RDY;
+       return gpio_get_value(GPIO_RDY);
 }
 
 static void rb532_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
index 70c4a6726377ded624a426ca683df1511dd62bc2..0e84c8ab6a3932b39adbfbe2cb8144fae39ba51d 100644 (file)
 struct rb532_gpio_chip {
        struct gpio_chip chip;
        void __iomem     *regbase;
-       void            (*set_int_level)(struct gpio_chip *chip, unsigned offset, int value);
-       int             (*get_int_level)(struct gpio_chip *chip, unsigned offset);
-       void            (*set_int_status)(struct gpio_chip *chip, unsigned offset, int value);
-       int             (*get_int_status)(struct gpio_chip *chip, unsigned offset);
 };
 
 struct mpmc_device dev3;
@@ -111,15 +107,47 @@ unsigned char get_latch_u5(void)
 }
 EXPORT_SYMBOL(get_latch_u5);
 
+/* rb532_set_bit - sanely set a bit
+ *
+ * bitval: new value for the bit
+ * offset: bit index in the 4 byte address range
+ * ioaddr: 4 byte aligned address being altered
+ */
+static inline void rb532_set_bit(unsigned bitval,
+               unsigned offset, void __iomem *ioaddr)
+{
+       unsigned long flags;
+       u32 val;
+
+       bitval = !!bitval;              /* map parameter to {0,1} */
+
+       local_irq_save(flags);
+
+       val = readl(ioaddr);
+       val &= ~( ~bitval << offset );   /* unset bit if bitval == 0 */
+       val |=  (  bitval << offset );   /* set bit if bitval == 1 */
+       writel(val, ioaddr);
+
+       local_irq_restore(flags);
+}
+
+/* rb532_get_bit - read a bit
+ *
+ * returns the boolean state of the bit, which may be > 1
+ */
+static inline int rb532_get_bit(unsigned offset, void __iomem *ioaddr)
+{
+       return (readl(ioaddr) & (1 << offset));
+}
+
 /*
  * Return GPIO level */
 static int rb532_gpio_get(struct gpio_chip *chip, unsigned offset)
 {
-       u32                     mask = 1 << offset;
        struct rb532_gpio_chip  *gpch;
 
        gpch = container_of(chip, struct rb532_gpio_chip, chip);
-       return readl(gpch->regbase + GPIOD) & mask;
+       return rb532_get_bit(offset, gpch->regbase + GPIOD);
 }
 
 /*
@@ -128,23 +156,10 @@ static int rb532_gpio_get(struct gpio_chip *chip, unsigned offset)
 static void rb532_gpio_set(struct gpio_chip *chip,
                                unsigned offset, int value)
 {
-       unsigned long           flags;
-       u32                     mask = 1 << offset;
-       u32                     tmp;
        struct rb532_gpio_chip  *gpch;
-       void __iomem            *gpvr;
 
        gpch = container_of(chip, struct rb532_gpio_chip, chip);
-       gpvr = gpch->regbase + GPIOD;
-
-       local_irq_save(flags);
-       tmp = readl(gpvr);
-       if (value)
-               tmp |= mask;
-       else
-               tmp &= ~mask;
-       writel(tmp, gpvr);
-       local_irq_restore(flags);
+       rb532_set_bit(value, offset, gpch->regbase + GPIOD);
 }
 
 /*
@@ -152,21 +167,14 @@ static void rb532_gpio_set(struct gpio_chip *chip,
  */
 static int rb532_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
 {
-       unsigned long           flags;
-       u32                     mask = 1 << offset;
-       u32                     value;
        struct rb532_gpio_chip  *gpch;
-       void __iomem            *gpdr;
 
        gpch = container_of(chip, struct rb532_gpio_chip, chip);
-       gpdr = gpch->regbase + GPIOCFG;
 
-       local_irq_save(flags);
-       value = readl(gpdr);
-       value &= ~mask;
-       writel(value, gpdr);
-       local_irq_restore(flags);
+       if (rb532_get_bit(offset, gpch->regbase + GPIOFUNC))
+               return 1;       /* alternate function, GPIOCFG is ignored */
 
+       rb532_set_bit(0, offset, gpch->regbase + GPIOCFG);
        return 0;
 }
 
@@ -176,117 +184,60 @@ static int rb532_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
 static int rb532_gpio_direction_output(struct gpio_chip *chip,
                                        unsigned offset, int value)
 {
-       unsigned long           flags;
-       u32                     mask = 1 << offset;
-       u32                     tmp;
        struct rb532_gpio_chip  *gpch;
-       void __iomem            *gpdr;
 
        gpch = container_of(chip, struct rb532_gpio_chip, chip);
-       writel(mask, gpch->regbase + GPIOD);
-       gpdr = gpch->regbase + GPIOCFG;
 
-       local_irq_save(flags);
-       tmp = readl(gpdr);
-       tmp |= mask;
-       writel(tmp, gpdr);
-       local_irq_restore(flags);
+       if (rb532_get_bit(offset, gpch->regbase + GPIOFUNC))
+               return 1;       /* alternate function, GPIOCFG is ignored */
 
+       /* set the initial output value */
+       rb532_set_bit(value, offset, gpch->regbase + GPIOD);
+
+       rb532_set_bit(1, offset, gpch->regbase + GPIOCFG);
        return 0;
 }
 
-/*
- * Set the GPIO interrupt level
- */
-static void rb532_gpio_set_int_level(struct gpio_chip *chip,
-                                       unsigned offset, int value)
-{
-       unsigned long           flags;
-       u32                     mask = 1 << offset;
-       u32                     tmp;
-       struct rb532_gpio_chip  *gpch;
-       void __iomem            *gpil;
-
-       gpch = container_of(chip, struct rb532_gpio_chip, chip);
-       gpil = gpch->regbase + GPIOILEVEL;
-
-       local_irq_save(flags);
-       tmp = readl(gpil);
-       if (value)
-               tmp |= mask;
-       else
-               tmp &= ~mask;
-       writel(tmp, gpil);
-       local_irq_restore(flags);
-}
+static struct rb532_gpio_chip rb532_gpio_chip[] = {
+       [0] = {
+               .chip = {
+                       .label                  = "gpio0",
+                       .direction_input        = rb532_gpio_direction_input,
+                       .direction_output       = rb532_gpio_direction_output,
+                       .get                    = rb532_gpio_get,
+                       .set                    = rb532_gpio_set,
+                       .base                   = 0,
+                       .ngpio                  = 32,
+               },
+       },
+};
 
 /*
- * Get the GPIO interrupt level
+ * Set GPIO interrupt level
  */
-static int rb532_gpio_get_int_level(struct gpio_chip *chip, unsigned offset)
+void rb532_gpio_set_ilevel(int bit, unsigned gpio)
 {
-       u32                     mask = 1 << offset;
-       struct rb532_gpio_chip  *gpch;
-
-       gpch = container_of(chip, struct rb532_gpio_chip, chip);
-       return readl(gpch->regbase + GPIOILEVEL) & mask;
+       rb532_set_bit(bit, gpio, rb532_gpio_chip->regbase + GPIOILEVEL);
 }
+EXPORT_SYMBOL(rb532_gpio_set_ilevel);
 
 /*
- * Set the GPIO interrupt status
+ * Set GPIO interrupt status
  */
-static void rb532_gpio_set_int_status(struct gpio_chip *chip,
-                               unsigned offset, int value)
+void rb532_gpio_set_istat(int bit, unsigned gpio)
 {
-       unsigned long           flags;
-       u32                     mask = 1 << offset;
-       u32                     tmp;
-       struct rb532_gpio_chip  *gpch;
-       void __iomem            *gpis;
-
-       gpch = container_of(chip, struct rb532_gpio_chip, chip);
-       gpis = gpch->regbase + GPIOISTAT;
-
-       local_irq_save(flags);
-       tmp = readl(gpis);
-       if (value)
-               tmp |= mask;
-       else
-               tmp &= ~mask;
-       writel(tmp, gpis);
-       local_irq_restore(flags);
+       rb532_set_bit(bit, gpio, rb532_gpio_chip->regbase + GPIOISTAT);
 }
+EXPORT_SYMBOL(rb532_gpio_set_istat);
 
 /*
- * Get the GPIO interrupt status
+ * Configure GPIO alternate function
  */
-static int rb532_gpio_get_int_status(struct gpio_chip *chip, unsigned offset)
+static void rb532_gpio_set_func(int bit, unsigned gpio)
 {
-       u32                     mask = 1 << offset;
-       struct rb532_gpio_chip  *gpch;
-
-       gpch = container_of(chip, struct rb532_gpio_chip, chip);
-       return readl(gpch->regbase + GPIOISTAT) & mask;
+       rb532_set_bit(bit, gpio, rb532_gpio_chip->regbase + GPIOFUNC);
 }
 
-static struct rb532_gpio_chip rb532_gpio_chip[] = {
-       [0] = {
-               .chip = {
-                       .label                  = "gpio0",
-                       .direction_input        = rb532_gpio_direction_input,
-                       .direction_output       = rb532_gpio_direction_output,
-                       .get                    = rb532_gpio_get,
-                       .set                    = rb532_gpio_set,
-                       .base                   = 0,
-                       .ngpio                  = 32,
-               },
-               .get_int_level          = rb532_gpio_get_int_level,
-               .set_int_level          = rb532_gpio_set_int_level,
-               .get_int_status         = rb532_gpio_get_int_status,
-               .set_int_status         = rb532_gpio_set_int_status,
-       },
-};
-
 int __init rb532_gpio_init(void)
 {
        struct resource *r;
@@ -310,9 +261,11 @@ int __init rb532_gpio_init(void)
                return -ENXIO;
        }
 
-       /* Set the interrupt status and level for the CF pin */
-       rb532_gpio_set_int_level(&rb532_gpio_chip->chip, CF_GPIO_NUM, 1);
-       rb532_gpio_set_int_status(&rb532_gpio_chip->chip, CF_GPIO_NUM, 0);
+       /* configure CF_GPIO_NUM as CFRDY IRQ source */
+       rb532_gpio_set_func(0, CF_GPIO_NUM);
+       rb532_gpio_direction_input(&rb532_gpio_chip->chip, CF_GPIO_NUM);
+       rb532_gpio_set_ilevel(1, CF_GPIO_NUM);
+       rb532_gpio_set_istat(0, CF_GPIO_NUM);
 
        return 0;
 }
index 524e33819f32ac334b224dbd48d7cadae5af54ee..ff80e86b9bd2d2305d34a731685d94fe5d3f3491 100644 (file)
@@ -15,6 +15,15 @@ config DEBUG_DECOMPRESS_KERNEL
          decompressing Linux seeing "Uncompressing Linux... " and
          "Ok, booting the kernel.\n" on console.
 
+config TEST_MISALIGNMENT_HANDLER
+       bool "Run tests on the misalignment handler"
+       depends on DEBUG_KERNEL
+       default n
+       help
+         If you say Y here the kernel will execute a list of misaligned memory
+         accesses to make sure the misalignment handler deals them with
+         correctly.  If it does not, the kernel will throw a BUG.
+
 config KPROBES
        bool "Kprobes"
        depends on DEBUG_KERNEL
index b7cbb1487af462cf8d8a626a718e39d5dfa19014..62fba8aa9b6e1ae84aa8cc1583d57a8e628f16d6 100644 (file)
@@ -180,6 +180,7 @@ ENTRY(resume_userspace)
 
 #ifdef CONFIG_PREEMPT
 ENTRY(resume_kernel)
+       __cli
        mov     (TI_preempt_count,a2),d0        # non-zero preempt_count ?
        cmp     0,d0
        bne     restore_all
@@ -190,7 +191,7 @@ need_resched:
        mov     (REG_EPSW,fp),d0
        and     EPSW_IM,d0
        cmp     EPSW_IM_7,d0            # interrupts off (exception path) ?
-       beq     restore_all
+       bne     restore_all
        call    preempt_schedule_irq[],0
        jmp     need_resched
 #endif
index 9a6d4e8ebe7396f058ccc740d48dfc3a0e14f979..11584c51acd93669dfe587cd2983ca81663397b5 100644 (file)
@@ -99,6 +99,7 @@ int gdbstub_io_rx_char(unsigned char *_ch, int nonblock)
  try_again:
        /* pull chars out of the buffer */
        ix = gdbstub_rx_outp;
+       barrier();
        if (ix == gdbstub_rx_inp) {
                if (nonblock)
                        return -EAGAIN;
@@ -110,6 +111,7 @@ int gdbstub_io_rx_char(unsigned char *_ch, int nonblock)
 
        ch = gdbstub_rx_buffer[ix++];
        st = gdbstub_rx_buffer[ix++];
+       barrier();
        gdbstub_rx_outp = ix & 0x00000fff;
 
        if (st & UART_LSR_BI) {
index 54be6afb5555c3ae194df237b56c9ff2a387f551..0ea7482c1522712d73af221a199f8fa7c0b78738 100644 (file)
@@ -522,17 +522,7 @@ static int gdbstub_single_step(struct pt_regs *regs)
        } else {
                switch (cur) {
                        /* Bxx (d8,PC) */
-               case 0xc0:
-               case 0xc1:
-               case 0xc2:
-               case 0xc3:
-               case 0xc4:
-               case 0xc5:
-               case 0xc6:
-               case 0xc7:
-               case 0xc8:
-               case 0xc9:
-               case 0xca:
+               case 0xc0 ... 0xca:
                        if (gdbstub_read_byte(pc + 1, (u8 *) &x) < 0)
                                goto fault;
                        if (!__gdbstub_mark_bp(pc + 2, 0))
@@ -543,17 +533,7 @@ static int gdbstub_single_step(struct pt_regs *regs)
                        break;
 
                        /* LXX (d8,PC) */
-               case 0xd0:
-               case 0xd1:
-               case 0xd2:
-               case 0xd3:
-               case 0xd4:
-               case 0xd5:
-               case 0xd6:
-               case 0xd7:
-               case 0xd8:
-               case 0xd9:
-               case 0xda:
+               case 0xd0 ... 0xda:
                        if (!__gdbstub_mark_bp(pc + 1, 0))
                                goto fault;
                        if (regs->pc != regs->lar &&
index aa07d0cd19052b483f002bb27a166e7defd75646..59b9c4bf9583a67e8e1467576d6e7fc49125eca7 100644 (file)
@@ -566,6 +566,11 @@ static void mn10300_serial_transmit_interrupt(struct mn10300_serial_port *port)
 {
        _enter("%s", port->name);
 
+       if (!port->uart.info || !port->uart.info->port.tty) {
+               mn10300_serial_dis_tx_intr(port);
+               return;
+       }
+
        if (uart_tx_stopped(&port->uart) ||
            uart_circ_empty(&port->uart.info->xmit))
                mn10300_serial_dis_tx_intr(port);
index 8fa36893df7af1f5f20bcfc379d88d40a1f61a49..6b287f2e8e843f885c9a856df8527f862e9147a1 100644 (file)
@@ -1,6 +1,6 @@
 /* MN10300 Kernel module helper routines
  *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Copyright (C) 2007, 2008 Red Hat, Inc. All Rights Reserved.
  * Written by Mark Salter (msalter@redhat.com)
  * - Derived from arch/i386/kernel/module.c
  *
@@ -64,21 +64,6 @@ int module_frob_arch_sections(Elf_Ehdr *hdr,
        return 0;
 }
 
-static uint32_t reloc_get16(uint8_t *p)
-{
-       return p[0] | (p[1] << 8);
-}
-
-static uint32_t reloc_get24(uint8_t *p)
-{
-       return reloc_get16(p) | (p[2] << 16);
-}
-
-static uint32_t reloc_get32(uint8_t *p)
-{
-       return reloc_get16(p) | (reloc_get16(p+2) << 16);
-}
-
 static void reloc_put16(uint8_t *p, uint32_t val)
 {
        p[0] = val & 0xff;
@@ -144,25 +129,19 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
                relocation = sym->st_value + rel[i].r_addend;
 
                switch (ELF32_R_TYPE(rel[i].r_info)) {
-                       /* for the first four relocation types, we add the
-                        * adjustment into the value at the location given */
+                       /* for the first four relocation types, we simply
+                        * store the adjustment at the location given */
                case R_MN10300_32:
-                       value = reloc_get32(location);
-                       value += relocation;
-                       reloc_put32(location, value);
+                       reloc_put32(location, relocation);
                        break;
                case R_MN10300_24:
-                       value = reloc_get24(location);
-                       value += relocation;
-                       reloc_put24(location, value);
+                       reloc_put24(location, relocation);
                        break;
                case R_MN10300_16:
-                       value = reloc_get16(location);
-                       value += relocation;
-                       reloc_put16(location, value);
+                       reloc_put16(location, relocation);
                        break;
                case R_MN10300_8:
-                       *location += relocation;
+                       *location = relocation;
                        break;
 
                        /* for the next three relocation types, we write the
index 017121ce896f345b63af32afe8f6a9aee1aaa7e3..e1d88ab51008896ce6fa423d6e8e1fd1ce5b3672 100644 (file)
@@ -161,7 +161,7 @@ void __init setup_arch(char **cmdline_p)
           reserve the page it is occupying. */
        if (CONFIG_INTERRUPT_VECTOR_BASE >= CONFIG_KERNEL_RAM_BASE_ADDRESS &&
            CONFIG_INTERRUPT_VECTOR_BASE < memory_end)
-               reserve_bootmem(CONFIG_INTERRUPT_VECTOR_BASE, 1,
+               reserve_bootmem(CONFIG_INTERRUPT_VECTOR_BASE, PAGE_SIZE,
                                BOOTMEM_DEFAULT);
 
        reserve_bootmem(PAGE_ALIGN(PFN_PHYS(free_pfn)), bootmap_size,
index a3e80f444f55a880b644fcdcfc109a5150fa151c..b8259668f7dcfb8b11c4fbcc2c05050d80263921 100644 (file)
@@ -11,6 +11,7 @@
 #define __VMLINUX_LDS__
 #include <asm-generic/vmlinux.lds.h>
 #include <asm/thread_info.h>
+#include <asm/page.h>
 
 OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin")
 OUTPUT_ARCH(mn10300)
@@ -55,13 +56,13 @@ SECTIONS
        CONSTRUCTORS
        }
 
-  . = ALIGN(4096);
+  . = ALIGN(PAGE_SIZE);
   __nosave_begin = .;
   .data_nosave : { *(.data.nosave) }
-  . = ALIGN(4096);
+  . = ALIGN(PAGE_SIZE);
   __nosave_end = .;
 
-  . = ALIGN(4096);
+  . = ALIGN(PAGE_SIZE);
   .data.page_aligned : { *(.data.idt) }
 
   . = ALIGN(32);
@@ -78,7 +79,7 @@ SECTIONS
   .data.init_task : { *(.data.init_task) }
 
   /* might get freed after init */
-  . = ALIGN(4096);
+  . = ALIGN(PAGE_SIZE);
   .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
        __smp_locks = .;
        *(.smp_locks)
@@ -86,7 +87,7 @@ SECTIONS
   }
 
   /* will be freed after init */
-  . = ALIGN(4096);             /* Init code and data */
+  . = ALIGN(PAGE_SIZE);                /* Init code and data */
   __init_begin = .;
   .init.text : {
        _sinittext = .;
@@ -120,17 +121,14 @@ SECTIONS
   .exit.data : { *(.exit.data) }
 
 #ifdef CONFIG_BLK_DEV_INITRD
-  . = ALIGN(4096);
+  . = ALIGN(PAGE_SIZE);
   __initramfs_start = .;
   .init.ramfs : { *(.init.ramfs) }
   __initramfs_end = .;
 #endif
 
-  . = ALIGN(32);
-  __per_cpu_start = .;
-  .data.percpu  : { *(.data.percpu) }
-  __per_cpu_end = .;
-  . = ALIGN(4096);
+  PERCPU(32)
+  . = ALIGN(PAGE_SIZE);
   __init_end = .;
   /* freed after init ends here */
 
@@ -145,7 +143,7 @@ SECTIONS
   _end = . ;
 
   /* This is where the kernel creates the early boot page tables */
-  . = ALIGN(4096);
+  . = ALIGN(PAGE_SIZE);
   pg0 = .;
 
   /* Sections to be discarded */
index 32aa89dc38489b27200ff1a9a271ed4030897ba8..94c4a43580657a74b594561180759b5d2b43c37c 100644 (file)
 #include <asm/asm-offsets.h>
 
 #if 0
-#define kdebug(FMT, ...) printk(KERN_DEBUG FMT, ##__VA_ARGS__)
+#define kdebug(FMT, ...) printk(KERN_DEBUG "MISALIGN: "FMT"\n", ##__VA_ARGS__)
 #else
 #define kdebug(FMT, ...) do {} while (0)
 #endif
 
-static int misalignment_addr(unsigned long *registers, unsigned params,
-                            unsigned opcode, unsigned disp,
-                            void **_address, unsigned long **_postinc);
+static int misalignment_addr(unsigned long *registers, unsigned long sp,
+                            unsigned params, unsigned opcode,
+                            unsigned long disp,
+                            void **_address, unsigned long **_postinc,
+                            unsigned long *_inc);
 
 static int misalignment_reg(unsigned long *registers, unsigned params,
-                           unsigned opcode, unsigned disp,
+                           unsigned opcode, unsigned long disp,
                            unsigned long **_register);
 
-static inline unsigned int_log2(unsigned x)
-{
-       unsigned y;
-       asm("bsch %1,%0" : "=r"(y) : "r"(x), "0"(0));
-       return y;
-}
-#define log2(x) int_log2(x)
+static void misalignment_MOV_Lcc(struct pt_regs *regs, uint32_t opcode);
 
 static const unsigned Dreg_index[] = {
        REG_D0 >> 2, REG_D1 >> 2, REG_D2 >> 2, REG_D3 >> 2
@@ -86,9 +82,10 @@ enum format_id {
        FMT_D7,
        FMT_D8,
        FMT_D9,
+       FMT_D10,
 };
 
-struct {
+static const struct {
        u_int8_t opsz, dispsz;
 } format_tbl[16] = {
        [FMT_S0]        = { 8,  0       },
@@ -103,6 +100,7 @@ struct {
        [FMT_D7]        = { 24, 8       },
        [FMT_D8]        = { 24, 24      },
        [FMT_D9]        = { 24, 32      },
+       [FMT_D10]       = { 32, 0       },
 };
 
 enum value_id {
@@ -128,9 +126,14 @@ enum value_id {
        SD24,           /* 24-bit signed displacement */
        SIMM4_2,        /* 4-bit signed displacement in opcode bits 4-7 */
        SIMM8,          /* 8-bit signed immediate */
+       IMM8,           /* 8-bit unsigned immediate */
+       IMM16,          /* 16-bit unsigned immediate */
        IMM24,          /* 24-bit unsigned immediate */
        IMM32,          /* 32-bit unsigned immediate */
-       IMM32_HIGH8,    /* 32-bit unsigned immediate, high 8-bits in opcode */
+       IMM32_HIGH8,    /* 32-bit unsigned immediate, LSB in opcode */
+
+       IMM32_MEM,      /* 32-bit unsigned displacement */
+       IMM32_HIGH8_MEM, /* 32-bit unsigned displacement, LSB in opcode */
 
        DN0     = DM0,
        DN1     = DM1,
@@ -149,7 +152,7 @@ enum value_id {
 };
 
 struct mn10300_opcode {
-       const char      *name;
+       const char      name[8];
        u_int32_t       opcode;
        u_int32_t       opmask;
        unsigned        exclusion;
@@ -185,6 +188,10 @@ struct mn10300_opcode {
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 static const struct mn10300_opcode mn10300_opcodes[] = {
+{ "mov",       0x4200,      0xf300,      0,    FMT_S1, 0,      {DM1, MEM2(IMM8, SP)}},
+{ "mov",       0x4300,      0xf300,      0,    FMT_S1, 0,      {AM1, MEM2(IMM8, SP)}},
+{ "mov",       0x5800,      0xfc00,      0,    FMT_S1, 0,      {MEM2(IMM8, SP), DN0}},
+{ "mov",       0x5c00,      0xfc00,      0,    FMT_S1, 0,      {MEM2(IMM8, SP), AN0}},
 { "mov",       0x60,        0xf0,        0,    FMT_S0, 0,      {DM1, MEM(AN0)}},
 { "mov",       0x70,        0xf0,        0,    FMT_S0, 0,      {MEM(AM0), DN1}},
 { "mov",       0xf000,      0xfff0,      0,    FMT_D0, 0,      {MEM(AM0), AN1}},
@@ -197,8 +204,6 @@ static const struct mn10300_opcode mn10300_opcodes[] = {
 { "mov",       0xf81000,    0xfff000,    0,    FMT_D1, 0,      {DM1, MEM2(SD8, AN0)}},
 { "mov",       0xf82000,    0xfff000,    0,    FMT_D1, 0,      {MEM2(SD8,AM0), AN1}},
 { "mov",       0xf83000,    0xfff000,    0,    FMT_D1, 0,      {AM1, MEM2(SD8, AN0)}},
-{ "mov",       0xf8f000,    0xfffc00,    0,    FMT_D1, AM33,   {MEM2(SD8, AM0), SP}},
-{ "mov",       0xf8f400,    0xfffc00,    0,    FMT_D1, AM33,   {SP, MEM2(SD8, AN0)}},
 { "mov",       0xf90a00,    0xffff00,    0,    FMT_D6, AM33,   {MEM(RM0), RN2}},
 { "mov",       0xf91a00,    0xffff00,    0,    FMT_D6, AM33,   {RM2, MEM(RN0)}},
 { "mov",       0xf96a00,    0xffff00,    0x12, FMT_D6, AM33,   {MEMINC(RM0), RN2}},
@@ -207,24 +212,46 @@ static const struct mn10300_opcode mn10300_opcodes[] = {
 { "mov",       0xfa100000,  0xfff00000,  0,    FMT_D2, 0,      {DM1, MEM2(SD16, AN0)}},
 { "mov",       0xfa200000,  0xfff00000,  0,    FMT_D2, 0,      {MEM2(SD16, AM0), AN1}},
 { "mov",       0xfa300000,  0xfff00000,  0,    FMT_D2, 0,      {AM1, MEM2(SD16, AN0)}},
+{ "mov",       0xfa900000,  0xfff30000,  0,    FMT_D2, 0,      {AM1, MEM2(IMM16, SP)}},
+{ "mov",       0xfa910000,  0xfff30000,  0,    FMT_D2, 0,      {DM1, MEM2(IMM16, SP)}},
+{ "mov",       0xfab00000,  0xfffc0000,  0,    FMT_D2, 0,      {MEM2(IMM16, SP), AN0}},
+{ "mov",       0xfab40000,  0xfffc0000,  0,    FMT_D2, 0,      {MEM2(IMM16, SP), DN0}},
 { "mov",       0xfb0a0000,  0xffff0000,  0,    FMT_D7, AM33,   {MEM2(SD8, RM0), RN2}},
 { "mov",       0xfb1a0000,  0xffff0000,  0,    FMT_D7, AM33,   {RM2, MEM2(SD8, RN0)}},
 { "mov",       0xfb6a0000,  0xffff0000,  0x22, FMT_D7, AM33,   {MEMINC2 (RM0, SIMM8), RN2}},
 { "mov",       0xfb7a0000,  0xffff0000,  0,    FMT_D7, AM33,   {RM2, MEMINC2 (RN0, SIMM8)}},
+{ "mov",       0xfb8a0000,  0xffff0f00,  0,    FMT_D7, AM33,   {MEM2(IMM8, SP), RN2}},
 { "mov",       0xfb8e0000,  0xffff000f,  0,    FMT_D7, AM33,   {MEM2(RI, RM0), RD2}},
+{ "mov",       0xfb9a0000,  0xffff0f00,  0,    FMT_D7, AM33,   {RM2, MEM2(IMM8, SP)}},
 { "mov",       0xfb9e0000,  0xffff000f,  0,    FMT_D7, AM33,   {RD2, MEM2(RI, RN0)}},
 { "mov",       0xfc000000,  0xfff00000,  0,    FMT_D4, 0,      {MEM2(IMM32,AM0), DN1}},
 { "mov",       0xfc100000,  0xfff00000,  0,    FMT_D4, 0,      {DM1, MEM2(IMM32,AN0)}},
 { "mov",       0xfc200000,  0xfff00000,  0,    FMT_D4, 0,      {MEM2(IMM32,AM0), AN1}},
 { "mov",       0xfc300000,  0xfff00000,  0,    FMT_D4, 0,      {AM1, MEM2(IMM32,AN0)}},
+{ "mov",       0xfc800000,  0xfff30000,  0,    FMT_D4, 0,      {AM1, MEM(IMM32_MEM)}},
+{ "mov",       0xfc810000,  0xfff30000,  0,    FMT_D4, 0,      {DM1, MEM(IMM32_MEM)}},
+{ "mov",       0xfc900000,  0xfff30000,  0,    FMT_D4, 0,      {AM1, MEM2(IMM32, SP)}},
+{ "mov",       0xfc910000,  0xfff30000,  0,    FMT_D4, 0,      {DM1, MEM2(IMM32, SP)}},
+{ "mov",       0xfca00000,  0xfffc0000,  0,    FMT_D4, 0,      {MEM(IMM32_MEM), AN0}},
+{ "mov",       0xfca40000,  0xfffc0000,  0,    FMT_D4, 0,      {MEM(IMM32_MEM), DN0}},
+{ "mov",       0xfcb00000,  0xfffc0000,  0,    FMT_D4, 0,      {MEM2(IMM32, SP), AN0}},
+{ "mov",       0xfcb40000,  0xfffc0000,  0,    FMT_D4, 0,      {MEM2(IMM32, SP), DN0}},
 { "mov",       0xfd0a0000,  0xffff0000,  0,    FMT_D8, AM33,   {MEM2(SD24, RM0), RN2}},
 { "mov",       0xfd1a0000,  0xffff0000,  0,    FMT_D8, AM33,   {RM2, MEM2(SD24, RN0)}},
 { "mov",       0xfd6a0000,  0xffff0000,  0x22, FMT_D8, AM33,   {MEMINC2 (RM0, IMM24), RN2}},
 { "mov",       0xfd7a0000,  0xffff0000,  0,    FMT_D8, AM33,   {RM2, MEMINC2 (RN0, IMM24)}},
+{ "mov",       0xfd8a0000,  0xffff0f00,  0,    FMT_D8, AM33,   {MEM2(IMM24, SP), RN2}},
+{ "mov",       0xfd9a0000,  0xffff0f00,  0,    FMT_D8, AM33,   {RM2, MEM2(IMM24, SP)}},
 { "mov",       0xfe0a0000,  0xffff0000,  0,    FMT_D9, AM33,   {MEM2(IMM32_HIGH8,RM0), RN2}},
+{ "mov",       0xfe0a0000,  0xffff0000,  0,    FMT_D9, AM33,   {MEM2(IMM32_HIGH8,RM0), RN2}},
+{ "mov",       0xfe0e0000,  0xffff0f00,  0,    FMT_D9, AM33,   {MEM(IMM32_HIGH8_MEM), RN2}},
+{ "mov",       0xfe1a0000,  0xffff0000,  0,    FMT_D9, AM33,   {RM2, MEM2(IMM32_HIGH8, RN0)}},
 { "mov",       0xfe1a0000,  0xffff0000,  0,    FMT_D9, AM33,   {RM2, MEM2(IMM32_HIGH8, RN0)}},
+{ "mov",       0xfe1e0000,  0xffff0f00,  0,    FMT_D9, AM33,   {RM2, MEM(IMM32_HIGH8_MEM)}},
 { "mov",       0xfe6a0000,  0xffff0000,  0x22, FMT_D9, AM33,   {MEMINC2 (RM0, IMM32_HIGH8), RN2}},
 { "mov",       0xfe7a0000,  0xffff0000,  0,    FMT_D9, AM33,   {RN2, MEMINC2 (RM0, IMM32_HIGH8)}},
+{ "mov",       0xfe8a0000,  0xffff0f00,  0,    FMT_D9, AM33,   {MEM2(IMM32_HIGH8, SP), RN2}},
+{ "mov",       0xfe9a0000,  0xffff0f00,  0,    FMT_D9, AM33,   {RM2, MEM2(IMM32_HIGH8, SP)}},
 
 { "movhu",     0xf060,      0xfff0,      0,    FMT_D0, 0,      {MEM(AM0), DN1}},
 { "movhu",     0xf070,      0xfff0,      0,    FMT_D0, 0,      {DM1, MEM(AN0)}},
@@ -232,29 +259,58 @@ static const struct mn10300_opcode mn10300_opcodes[] = {
 { "movhu",     0xf4c0,      0xffc0,      0,    FMT_D0, 0,      {DM2, MEM2(DI, AN0)}},
 { "movhu",     0xf86000,    0xfff000,    0,    FMT_D1, 0,      {MEM2(SD8, AM0), DN1}},
 { "movhu",     0xf87000,    0xfff000,    0,    FMT_D1, 0,      {DM1, MEM2(SD8, AN0)}},
+{ "movhu",     0xf89300,    0xfff300,    0,    FMT_D1, 0,      {DM1, MEM2(IMM8, SP)}},
+{ "movhu",     0xf8bc00,    0xfffc00,    0,    FMT_D1, 0,      {MEM2(IMM8, SP), DN0}},
 { "movhu",     0xf94a00,    0xffff00,    0,    FMT_D6, AM33,   {MEM(RM0), RN2}},
 { "movhu",     0xf95a00,    0xffff00,    0,    FMT_D6, AM33,   {RM2, MEM(RN0)}},
 { "movhu",     0xf9ea00,    0xffff00,    0x12, FMT_D6, AM33,   {MEMINC(RM0), RN2}},
 { "movhu",     0xf9fa00,    0xffff00,    0,    FMT_D6, AM33,   {RM2, MEMINC(RN0)}},
 { "movhu",     0xfa600000,  0xfff00000,  0,    FMT_D2, 0,      {MEM2(SD16, AM0), DN1}},
 { "movhu",     0xfa700000,  0xfff00000,  0,    FMT_D2, 0,      {DM1, MEM2(SD16, AN0)}},
+{ "movhu",     0xfa930000,  0xfff30000,  0,    FMT_D2, 0,      {DM1, MEM2(IMM16, SP)}},
+{ "movhu",     0xfabc0000,  0xfffc0000,  0,    FMT_D2, 0,      {MEM2(IMM16, SP), DN0}},
 { "movhu",     0xfb4a0000,  0xffff0000,  0,    FMT_D7, AM33,   {MEM2(SD8, RM0), RN2}},
 { "movhu",     0xfb5a0000,  0xffff0000,  0,    FMT_D7, AM33,   {RM2, MEM2(SD8, RN0)}},
+{ "movhu",     0xfbca0000,  0xffff0f00,  0,    FMT_D7, AM33,   {MEM2(IMM8, SP), RN2}},
 { "movhu",     0xfbce0000,  0xffff000f,  0,    FMT_D7, AM33,   {MEM2(RI, RM0), RD2}},
+{ "movhu",     0xfbda0000,  0xffff0f00,  0,    FMT_D7, AM33,   {RM2, MEM2(IMM8, SP)}},
 { "movhu",     0xfbde0000,  0xffff000f,  0,    FMT_D7, AM33,   {RD2, MEM2(RI, RN0)}},
 { "movhu",     0xfbea0000,  0xffff0000,  0x22, FMT_D7, AM33,   {MEMINC2 (RM0, SIMM8), RN2}},
 { "movhu",     0xfbfa0000,  0xffff0000,  0,    FMT_D7, AM33,   {RM2, MEMINC2 (RN0, SIMM8)}},
 { "movhu",     0xfc600000,  0xfff00000,  0,    FMT_D4, 0,      {MEM2(IMM32,AM0), DN1}},
 { "movhu",     0xfc700000,  0xfff00000,  0,    FMT_D4, 0,      {DM1, MEM2(IMM32,AN0)}},
+{ "movhu",     0xfc830000,  0xfff30000,  0,    FMT_D4, 0,      {DM1, MEM(IMM32_MEM)}},
+{ "movhu",     0xfc930000,  0xfff30000,  0,    FMT_D4, 0,      {DM1, MEM2(IMM32, SP)}},
+{ "movhu",     0xfcac0000,  0xfffc0000,  0,    FMT_D4, 0,      {MEM(IMM32_MEM), DN0}},
+{ "movhu",     0xfcbc0000,  0xfffc0000,  0,    FMT_D4, 0,      {MEM2(IMM32, SP), DN0}},
 { "movhu",     0xfd4a0000,  0xffff0000,  0,    FMT_D8, AM33,   {MEM2(SD24, RM0), RN2}},
 { "movhu",     0xfd5a0000,  0xffff0000,  0,    FMT_D8, AM33,   {RM2, MEM2(SD24, RN0)}},
+{ "movhu",     0xfdca0000,  0xffff0f00,  0,    FMT_D8, AM33,   {MEM2(IMM24, SP), RN2}},
+{ "movhu",     0xfdda0000,  0xffff0f00,  0,    FMT_D8, AM33,   {RM2, MEM2(IMM24, SP)}},
 { "movhu",     0xfdea0000,  0xffff0000,  0x22, FMT_D8, AM33,   {MEMINC2 (RM0, IMM24), RN2}},
 { "movhu",     0xfdfa0000,  0xffff0000,  0,    FMT_D8, AM33,   {RM2, MEMINC2 (RN0, IMM24)}},
 { "movhu",     0xfe4a0000,  0xffff0000,  0,    FMT_D9, AM33,   {MEM2(IMM32_HIGH8,RM0), RN2}},
+{ "movhu",     0xfe4e0000,  0xffff0f00,  0,    FMT_D9, AM33,   {MEM(IMM32_HIGH8_MEM), RN2}},
 { "movhu",     0xfe5a0000,  0xffff0000,  0,    FMT_D9, AM33,   {RM2, MEM2(IMM32_HIGH8, RN0)}},
+{ "movhu",     0xfe5e0000,  0xffff0f00,  0,    FMT_D9, AM33,   {RM2, MEM(IMM32_HIGH8_MEM)}},
+{ "movhu",     0xfeca0000,  0xffff0f00,  0,    FMT_D9, AM33,   {MEM2(IMM32_HIGH8, SP), RN2}},
+{ "movhu",     0xfeda0000,  0xffff0f00,  0,    FMT_D9, AM33,   {RM2, MEM2(IMM32_HIGH8, SP)}},
 { "movhu",     0xfeea0000,  0xffff0000,  0x22, FMT_D9, AM33,   {MEMINC2 (RM0, IMM32_HIGH8), RN2}},
 { "movhu",     0xfefa0000,  0xffff0000,  0,    FMT_D9, AM33,   {RN2, MEMINC2 (RM0, IMM32_HIGH8)}},
-{ 0, 0, 0, 0, 0, 0, {0}},
+
+{ "mov_llt",   0xf7e00000,  0xffff000f,  0x22, FMT_D10, AM33,   {MEMINC2 (RN4,SIMM4_2), RM6}},
+{ "mov_lgt",   0xf7e00001,  0xffff000f,  0x22, FMT_D10, AM33,   {MEMINC2 (RN4,SIMM4_2), RM6}},
+{ "mov_lge",   0xf7e00002,  0xffff000f,  0x22, FMT_D10, AM33,   {MEMINC2 (RN4,SIMM4_2), RM6}},
+{ "mov_lle",   0xf7e00003,  0xffff000f,  0x22, FMT_D10, AM33,   {MEMINC2 (RN4,SIMM4_2), RM6}},
+{ "mov_lcs",   0xf7e00004,  0xffff000f,  0x22, FMT_D10, AM33,   {MEMINC2 (RN4,SIMM4_2), RM6}},
+{ "mov_lhi",   0xf7e00005,  0xffff000f,  0x22, FMT_D10, AM33,   {MEMINC2 (RN4,SIMM4_2), RM6}},
+{ "mov_lcc",   0xf7e00006,  0xffff000f,  0x22, FMT_D10, AM33,   {MEMINC2 (RN4,SIMM4_2), RM6}},
+{ "mov_lls",   0xf7e00007,  0xffff000f,  0x22, FMT_D10, AM33,   {MEMINC2 (RN4,SIMM4_2), RM6}},
+{ "mov_leq",   0xf7e00008,  0xffff000f,  0x22, FMT_D10, AM33,   {MEMINC2 (RN4,SIMM4_2), RM6}},
+{ "mov_lne",   0xf7e00009,  0xffff000f,  0x22, FMT_D10, AM33,   {MEMINC2 (RN4,SIMM4_2), RM6}},
+{ "mov_lra",   0xf7e0000a,  0xffff000f,  0x22, FMT_D10, AM33,   {MEMINC2 (RN4,SIMM4_2), RM6}},
+
+{ "", 0, 0, 0, 0, 0, {0}},
 };
 
 /*
@@ -265,18 +321,21 @@ asmlinkage void misalignment(struct pt_regs *regs, enum exception_code code)
        const struct exception_table_entry *fixup;
        const struct mn10300_opcode *pop;
        unsigned long *registers = (unsigned long *) regs;
-       unsigned long data, *store, *postinc;
+       unsigned long data, *store, *postinc, disp, inc, sp;
        mm_segment_t seg;
        siginfo_t info;
-       uint32_t opcode, disp, noc, xo, xm;
-       uint8_t *pc, byte;
+       uint32_t opcode, noc, xo, xm;
+       uint8_t *pc, byte, datasz;
        void *address;
-       unsigned tmp, npop;
+       unsigned tmp, npop, dispsz, loop;
+
+       /* we don't fix up userspace misalignment faults */
+       if (user_mode(regs))
+               goto bus_error;
 
-       kdebug("MISALIGN at %lx\n", regs->pc);
+       sp = (unsigned long) regs + sizeof(*regs);
 
-       if (in_interrupt())
-               die("Misalignment trap in interrupt context", regs, code);
+       kdebug("==>misalignment({pc=%lx,sp=%lx})", regs->pc, sp);
 
        if (regs->epsw & EPSW_IE)
                asm volatile("or %0,epsw" : : "i"(EPSW_IE));
@@ -294,8 +353,8 @@ asmlinkage void misalignment(struct pt_regs *regs, enum exception_code code)
        opcode = byte;
        noc = 8;
 
-       for (pop = mn10300_opcodes; pop->name; pop++) {
-               npop = log2(pop->opcode | pop->opmask);
+       for (pop = mn10300_opcodes; pop->name[0]; pop++) {
+               npop = ilog2(pop->opcode | pop->opmask);
                if (npop <= 0 || npop > 31)
                        continue;
                npop = (npop + 8) & ~7;
@@ -328,15 +387,15 @@ asmlinkage void misalignment(struct pt_regs *regs, enum exception_code code)
        }
 
        /* didn't manage to find a fixup */
-       if (!user_mode(regs))
-               printk(KERN_CRIT "MISALIGN: %lx: unsupported instruction %x\n",
-                      regs->pc, opcode);
+       printk(KERN_CRIT "MISALIGN: %lx: unsupported instruction %x\n",
+              regs->pc, opcode);
 
 failed:
        set_fs(seg);
        if (die_if_no_fixup("misalignment error", regs, code))
                return;
 
+bus_error:
        info.si_signo   = SIGBUS;
        info.si_errno   = 0;
        info.si_code    = BUS_ADRALN;
@@ -346,31 +405,27 @@ failed:
 
        /* error reading opcodes */
 fetch_error:
-       if (!user_mode(regs))
-               printk(KERN_CRIT
-                      "MISALIGN: %p: fault whilst reading instruction data\n",
-                      pc);
+       printk(KERN_CRIT
+              "MISALIGN: %p: fault whilst reading instruction data\n",
+              pc);
        goto failed;
 
 bad_addr_mode:
-       if (!user_mode(regs))
-               printk(KERN_CRIT
-                      "MISALIGN: %lx: unsupported addressing mode %x\n",
-                      regs->pc, opcode);
+       printk(KERN_CRIT
+              "MISALIGN: %lx: unsupported addressing mode %x\n",
+              regs->pc, opcode);
        goto failed;
 
 bad_reg_mode:
-       if (!user_mode(regs))
-               printk(KERN_CRIT
-                      "MISALIGN: %lx: unsupported register mode %x\n",
-                      regs->pc, opcode);
+       printk(KERN_CRIT
+              "MISALIGN: %lx: unsupported register mode %x\n",
+              regs->pc, opcode);
        goto failed;
 
 unsupported_instruction:
-       if (!user_mode(regs))
-               printk(KERN_CRIT
-                      "MISALIGN: %lx: unsupported instruction %x (%s)\n",
-                      regs->pc, opcode, pop->name);
+       printk(KERN_CRIT
+              "MISALIGN: %lx: unsupported instruction %x (%s)\n",
+              regs->pc, opcode, pop->name);
        goto failed;
 
 transfer_failed:
@@ -391,7 +446,7 @@ transfer_failed:
 
        /* we matched the opcode */
 found_opcode:
-       kdebug("MISALIGN: %lx: %x==%x { %x, %x }\n",
+       kdebug("%lx: %x==%x { %x, %x }",
               regs->pc, opcode, pop->opcode, pop->params[0], pop->params[1]);
 
        tmp = format_tbl[pop->format].opsz;
@@ -406,106 +461,108 @@ found_opcode:
 
        /* grab the extra displacement (note it's LSB first) */
        disp = 0;
-       tmp = format_tbl[pop->format].dispsz >> 3;
-       while (tmp > 0) {
-               tmp--;
-               disp <<= 8;
-
+       dispsz = format_tbl[pop->format].dispsz;
+       for (loop = 0; loop < dispsz; loop += 8) {
                pc++;
                if (__get_user(byte, pc) != 0)
                        goto fetch_error;
-               disp |= byte;
+               disp |= byte << loop;
+               kdebug("{%p} disp[%02x]=%02x", pc, loop, byte);
        }
 
+       kdebug("disp=%lx", disp);
+
        set_fs(KERNEL_XDS);
-       if (fixup || regs->epsw & EPSW_nSL)
+       if (fixup)
                set_fs(seg);
 
        tmp = (pop->params[0] ^ pop->params[1]) & 0x80000000;
        if (!tmp) {
-               if (!user_mode(regs))
-                       printk(KERN_CRIT
-                              "MISALIGN: %lx:"
-                              " insn not move to/from memory %x\n",
-                              regs->pc, opcode);
+               printk(KERN_CRIT
+                      "MISALIGN: %lx: insn not move to/from memory %x\n",
+                      regs->pc, opcode);
                goto failed;
        }
 
+       /* determine the data transfer size of the move */
+       if (pop->name[3] == 0 || /* "mov" */
+           pop->name[4] == 'l') /* mov_lcc */
+               inc = datasz = 4;
+       else if (pop->name[3] == 'h') /* movhu */
+               inc = datasz = 2;
+       else
+               goto unsupported_instruction;
+
        if (pop->params[0] & 0x80000000) {
                /* move memory to register */
-               if (!misalignment_addr(registers, pop->params[0], opcode, disp,
-                                      &address, &postinc))
+               if (!misalignment_addr(registers, sp,
+                                      pop->params[0], opcode, disp,
+                                      &address, &postinc, &inc))
                        goto bad_addr_mode;
 
                if (!misalignment_reg(registers, pop->params[1], opcode, disp,
                                      &store))
                        goto bad_reg_mode;
 
-               if (strcmp(pop->name, "mov") == 0) {
-                       kdebug("FIXUP: mov (%p),DARn\n", address);
-                       if (copy_from_user(&data, (void *) address, 4) != 0)
-                               goto transfer_failed;
-                       if (pop->params[0] & 0x1000000)
-                               *postinc += 4;
-               } else if (strcmp(pop->name, "movhu") == 0) {
-                       kdebug("FIXUP: movhu (%p),DARn\n", address);
-                       data = 0;
-                       if (copy_from_user(&data, (void *) address, 2) != 0)
-                               goto transfer_failed;
-                       if (pop->params[0] & 0x1000000)
-                               *postinc += 2;
-               } else {
-                       goto unsupported_instruction;
+               kdebug("mov%u (%p),DARn", datasz, address);
+               if (copy_from_user(&data, (void *) address, datasz) != 0)
+                       goto transfer_failed;
+               if (pop->params[0] & 0x1000000) {
+                       kdebug("inc=%lx", inc);
+                       *postinc += inc;
                }
 
                *store = data;
+               kdebug("loaded %lx", data);
        } else {
                /* move register to memory */
                if (!misalignment_reg(registers, pop->params[0], opcode, disp,
                                      &store))
                        goto bad_reg_mode;
 
-               if (!misalignment_addr(registers, pop->params[1], opcode, disp,
-                                      &address, &postinc))
+               if (!misalignment_addr(registers, sp,
+                                      pop->params[1], opcode, disp,
+                                      &address, &postinc, &inc))
                        goto bad_addr_mode;
 
                data = *store;
 
-               if (strcmp(pop->name, "mov") == 0) {
-                       kdebug("FIXUP: mov %lx,(%p)\n", data, address);
-                       if (copy_to_user((void *) address, &data, 4) != 0)
-                               goto transfer_failed;
-                       if (pop->params[1] & 0x1000000)
-                               *postinc += 4;
-               } else if (strcmp(pop->name, "movhu") == 0) {
-                       kdebug("FIXUP: movhu %hx,(%p)\n",
-                              (uint16_t) data, address);
-                       if (copy_to_user((void *) address, &data, 2) != 0)
-                               goto transfer_failed;
-                       if (pop->params[1] & 0x1000000)
-                               *postinc += 2;
-               } else {
-                       goto unsupported_instruction;
-               }
+               kdebug("mov%u %lx,(%p)", datasz, data, address);
+               if (copy_to_user((void *) address, &data, datasz) != 0)
+                       goto transfer_failed;
+               if (pop->params[1] & 0x1000000)
+                       *postinc += inc;
        }
 
        tmp = format_tbl[pop->format].opsz + format_tbl[pop->format].dispsz;
        regs->pc += tmp >> 3;
 
+       /* handle MOV_Lcc, which are currently the only FMT_D10 insns that
+        * access memory */
+       if (pop->format == FMT_D10)
+               misalignment_MOV_Lcc(regs, opcode);
+
        set_fs(seg);
-       return;
 }
 
 /*
  * determine the address that was being accessed
  */
-static int misalignment_addr(unsigned long *registers, unsigned params,
-                            unsigned opcode, unsigned disp,
-                            void **_address, unsigned long **_postinc)
+static int misalignment_addr(unsigned long *registers, unsigned long sp,
+                            unsigned params, unsigned opcode,
+                            unsigned long disp,
+                            void **_address, unsigned long **_postinc,
+                            unsigned long *_inc)
 {
        unsigned long *postinc = NULL, address = 0, tmp;
 
-       params &= 0x7fffffff;
+       if (!(params & 0x1000000)) {
+               kdebug("noinc");
+               *_inc = 0;
+               _inc = NULL;
+       }
+
+       params &= 0x00ffffff;
 
        do {
                switch (params & 0xff) {
@@ -514,11 +571,11 @@ static int misalignment_addr(unsigned long *registers, unsigned params,
                        address += *postinc;
                        break;
                case DM1:
-                       postinc = &registers[Dreg_index[opcode >> 2 & 0x0c]];
+                       postinc = &registers[Dreg_index[opcode >> 2 & 0x03]];
                        address += *postinc;
                        break;
                case DM2:
-                       postinc = &registers[Dreg_index[opcode >> 4 & 0x30]];
+                       postinc = &registers[Dreg_index[opcode >> 4 & 0x03]];
                        address += *postinc;
                        break;
                case AM0:
@@ -526,11 +583,11 @@ static int misalignment_addr(unsigned long *registers, unsigned params,
                        address += *postinc;
                        break;
                case AM1:
-                       postinc = &registers[Areg_index[opcode >> 2 & 0x0c]];
+                       postinc = &registers[Areg_index[opcode >> 2 & 0x03]];
                        address += *postinc;
                        break;
                case AM2:
-                       postinc = &registers[Areg_index[opcode >> 4 & 0x30]];
+                       postinc = &registers[Areg_index[opcode >> 4 & 0x03]];
                        address += *postinc;
                        break;
                case RM0:
@@ -561,33 +618,53 @@ static int misalignment_addr(unsigned long *registers, unsigned params,
                        postinc = &registers[Rreg_index[disp >> 4 & 0x0f]];
                        address += *postinc;
                        break;
+               case SP:
+                       address += sp;
+                       break;
 
+                       /* displacements are either to be added to the address
+                        * before use, or, in the case of post-inc addressing,
+                        * to be added into the base register after use */
                case SD8:
                case SIMM8:
-                       address += (int32_t) (int8_t) (disp & 0xff);
-                       break;
+                       disp = (long) (int8_t) (disp & 0xff);
+                       goto displace_or_inc;
                case SD16:
-                       address += (int32_t) (int16_t) (disp & 0xffff);
-                       break;
+                       disp = (long) (int16_t) (disp & 0xffff);
+                       goto displace_or_inc;
                case SD24:
                        tmp = disp << 8;
                        asm("asr 8,%0" : "=r"(tmp) : "0"(tmp));
-                       address += tmp;
-                       break;
+                       disp = (long) tmp;
+                       goto displace_or_inc;
                case SIMM4_2:
                        tmp = opcode >> 4 & 0x0f;
                        tmp <<= 28;
                        asm("asr 28,%0" : "=r"(tmp) : "0"(tmp));
-                       address += tmp;
-                       break;
+                       disp = (long) tmp;
+                       goto displace_or_inc;
+               case IMM8:
+                       disp &= 0x000000ff;
+                       goto displace_or_inc;
+               case IMM16:
+                       disp &= 0x0000ffff;
+                       goto displace_or_inc;
                case IMM24:
-                       address += disp & 0x00ffffff;
-                       break;
+                       disp &= 0x00ffffff;
+                       goto displace_or_inc;
                case IMM32:
+               case IMM32_MEM:
                case IMM32_HIGH8:
-                       address += disp;
+               case IMM32_HIGH8_MEM:
+               displace_or_inc:
+                       kdebug("%s %lx", _inc ? "incr" : "disp", disp);
+                       if (!_inc)
+                               address += disp;
+                       else
+                               *_inc = disp;
                        break;
                default:
+                       BUG();
                        return 0;
                }
        } while ((params >>= 8));
@@ -601,7 +678,7 @@ static int misalignment_addr(unsigned long *registers, unsigned params,
  * determine the register that is acting as source/dest
  */
 static int misalignment_reg(unsigned long *registers, unsigned params,
-                           unsigned opcode, unsigned disp,
+                           unsigned opcode, unsigned long disp,
                            unsigned long **_register)
 {
        params &= 0x7fffffff;
@@ -654,8 +731,239 @@ static int misalignment_reg(unsigned long *registers, unsigned params,
                break;
 
        default:
+               BUG();
                return 0;
        }
 
        return 1;
 }
+
+/*
+ * handle the conditional loop part of the move-and-loop instructions
+ */
+static void misalignment_MOV_Lcc(struct pt_regs *regs, uint32_t opcode)
+{
+       unsigned long epsw = regs->epsw;
+       unsigned long NxorV;
+
+       kdebug("MOV_Lcc %x [flags=%lx]", opcode, epsw & 0xf);
+
+       /* calculate N^V and shift onto the same bit position as Z */
+       NxorV = ((epsw >> 3) ^ epsw >> 1) & 1;
+
+       switch (opcode & 0xf) {
+       case 0x0: /* MOV_LLT: N^V */
+               if (NxorV)
+                       goto take_the_loop;
+               return;
+       case 0x1: /* MOV_LGT: ~(Z or (N^V))*/
+               if (!((epsw & EPSW_FLAG_Z) | NxorV))
+                       goto take_the_loop;
+               return;
+       case 0x2: /* MOV_LGE: ~(N^V) */
+               if (!NxorV)
+                       goto take_the_loop;
+               return;
+       case 0x3: /* MOV_LLE: Z or (N^V) */
+               if ((epsw & EPSW_FLAG_Z) | NxorV)
+                       goto take_the_loop;
+               return;
+
+       case 0x4: /* MOV_LCS: C */
+               if (epsw & EPSW_FLAG_C)
+                       goto take_the_loop;
+               return;
+       case 0x5: /* MOV_LHI: ~(C or Z) */
+               if (!(epsw & (EPSW_FLAG_C | EPSW_FLAG_Z)))
+                       goto take_the_loop;
+               return;
+       case 0x6: /* MOV_LCC: ~C */
+               if (!(epsw & EPSW_FLAG_C))
+                       goto take_the_loop;
+               return;
+       case 0x7: /* MOV_LLS: C or Z */
+               if (epsw & (EPSW_FLAG_C | EPSW_FLAG_Z))
+                       goto take_the_loop;
+               return;
+
+       case 0x8: /* MOV_LEQ: Z */
+               if (epsw & EPSW_FLAG_Z)
+                       goto take_the_loop;
+               return;
+       case 0x9: /* MOV_LNE: ~Z */
+               if (!(epsw & EPSW_FLAG_Z))
+                       goto take_the_loop;
+               return;
+       case 0xa: /* MOV_LRA: always */
+               goto take_the_loop;
+
+       default:
+               BUG();
+       }
+
+take_the_loop:
+       /* wind the PC back to just after the SETLB insn */
+       kdebug("loop LAR=%lx", regs->lar);
+       regs->pc = regs->lar - 4;
+}
+
+/*
+ * misalignment handler tests
+ */
+#ifdef CONFIG_TEST_MISALIGNMENT_HANDLER
+static u8 __initdata testbuf[512] __attribute__((aligned(16))) = {
+       [257] = 0x11,
+       [258] = 0x22,
+       [259] = 0x33,
+       [260] = 0x44,
+};
+
+#define ASSERTCMP(X, OP, Y)                                            \
+do {                                                                   \
+       if (unlikely(!((X) OP (Y)))) {                                  \
+               printk(KERN_ERR "\n");                                  \
+               printk(KERN_ERR "MISALIGN: Assertion failed at line %u\n", \
+                      __LINE__);                                       \
+               printk(KERN_ERR "0x%lx " #OP " 0x%lx is false\n",       \
+                      (unsigned long)(X), (unsigned long)(Y));         \
+               BUG();                                                  \
+       }                                                               \
+} while(0)
+
+static int __init test_misalignment(void)
+{
+       register void *r asm("e0");
+       register u32 y asm("e1");
+       void *p = testbuf, *q;
+       u32 tmp, tmp2, x;
+
+       printk(KERN_NOTICE "==>test_misalignment() [testbuf=%p]\n", p);
+       p++;
+
+       printk(KERN_NOTICE "___ MOV (Am),Dn ___\n");
+       q = p + 256;
+       asm volatile("mov       (%0),%1" : "+a"(q), "=d"(x));
+       ASSERTCMP(q, ==, p + 256);
+       ASSERTCMP(x, ==, 0x44332211);
+
+       printk(KERN_NOTICE "___ MOV (256,Am),Dn ___\n");
+       q = p;
+       asm volatile("mov       (256,%0),%1" : "+a"(q), "=d"(x));
+       ASSERTCMP(q, ==, p);
+       ASSERTCMP(x, ==, 0x44332211);
+
+       printk(KERN_NOTICE "___ MOV (Di,Am),Dn ___\n");
+       tmp = 256;
+       q = p;
+       asm volatile("mov       (%2,%0),%1" : "+a"(q), "=d"(x), "+d"(tmp));
+       ASSERTCMP(q, ==, p);
+       ASSERTCMP(x, ==, 0x44332211);
+       ASSERTCMP(tmp, ==, 256);
+
+       printk(KERN_NOTICE "___ MOV (256,Rm),Rn ___\n");
+       r = p;
+       asm volatile("mov       (256,%0),%1" : "+r"(r), "=r"(y));
+       ASSERTCMP(r, ==, p);
+       ASSERTCMP(y, ==, 0x44332211);
+
+       printk(KERN_NOTICE "___ MOV (Rm+),Rn ___\n");
+       r = p + 256;
+       asm volatile("mov       (%0+),%1" : "+r"(r), "=r"(y));
+       ASSERTCMP(r, ==, p + 256 + 4);
+       ASSERTCMP(y, ==, 0x44332211);
+
+       printk(KERN_NOTICE "___ MOV (Rm+,8),Rn ___\n");
+       r = p + 256;
+       asm volatile("mov       (%0+,8),%1" : "+r"(r), "=r"(y));
+       ASSERTCMP(r, ==, p + 256 + 8);
+       ASSERTCMP(y, ==, 0x44332211);
+
+       printk(KERN_NOTICE "___ MOV (7,SP),Rn ___\n");
+       asm volatile(
+               "add    -16,sp          \n"
+               "mov    +0x11,%0        \n"
+               "movbu  %0,(7,sp)       \n"
+               "mov    +0x22,%0        \n"
+               "movbu  %0,(8,sp)       \n"
+               "mov    +0x33,%0        \n"
+               "movbu  %0,(9,sp)       \n"
+               "mov    +0x44,%0        \n"
+               "movbu  %0,(10,sp)      \n"
+               "mov    (7,sp),%1       \n"
+               "add    +16,sp          \n"
+               : "+a"(q), "=d"(x));
+       ASSERTCMP(x, ==, 0x44332211);
+
+       printk(KERN_NOTICE "___ MOV (259,SP),Rn ___\n");
+       asm volatile(
+               "add    -264,sp         \n"
+               "mov    +0x11,%0        \n"
+               "movbu  %0,(259,sp)     \n"
+               "mov    +0x22,%0        \n"
+               "movbu  %0,(260,sp)     \n"
+               "mov    +0x33,%0        \n"
+               "movbu  %0,(261,sp)     \n"
+               "mov    +0x55,%0        \n"
+               "movbu  %0,(262,sp)     \n"
+               "mov    (259,sp),%1     \n"
+               "add    +264,sp         \n"
+               : "+d"(tmp), "=d"(x));
+       ASSERTCMP(x, ==, 0x55332211);
+
+       printk(KERN_NOTICE "___ MOV (260,SP),Rn ___\n");
+       asm volatile(
+               "add    -264,sp         \n"
+               "mov    +0x11,%0        \n"
+               "movbu  %0,(260,sp)     \n"
+               "mov    +0x22,%0        \n"
+               "movbu  %0,(261,sp)     \n"
+               "mov    +0x33,%0        \n"
+               "movbu  %0,(262,sp)     \n"
+               "mov    +0x55,%0        \n"
+               "movbu  %0,(263,sp)     \n"
+               "mov    (260,sp),%1     \n"
+               "add    +264,sp         \n"
+               : "+d"(tmp), "=d"(x));
+       ASSERTCMP(x, ==, 0x55332211);
+
+
+       printk(KERN_NOTICE "___ MOV_LNE ___\n");
+       tmp = 1;
+       tmp2 = 2;
+       q = p + 256;
+       asm volatile(
+               "setlb                  \n"
+               "mov    %2,%3           \n"
+               "mov    %1,%2           \n"
+               "cmp    +0,%1           \n"
+               "mov_lne        (%0+,4),%1"
+               : "+r"(q), "+d"(tmp), "+d"(tmp2), "=d"(x)
+               :
+               : "cc");
+       ASSERTCMP(q, ==, p + 256 + 12);
+       ASSERTCMP(x, ==, 0x44332211);
+
+       printk(KERN_NOTICE "___ MOV in SETLB ___\n");
+       tmp = 1;
+       tmp2 = 2;
+       q = p + 256;
+       asm volatile(
+               "setlb                  \n"
+               "mov    %1,%3           \n"
+               "mov    (%0+),%1        \n"
+               "cmp    +0,%1           \n"
+               "lne                    "
+               : "+a"(q), "+d"(tmp), "+d"(tmp2), "=d"(x)
+               :
+               : "cc");
+
+       ASSERTCMP(q, ==, p + 256 + 8);
+       ASSERTCMP(x, ==, 0x44332211);
+
+       printk(KERN_NOTICE "<==test_misalignment()\n");
+       return 0;
+}
+
+arch_initcall(test_misalignment);
+
+#endif /* CONFIG_TEST_MISALIGNMENT_HANDLER */
index 7aa13f2add7a837d36653a7f4f63a0bcc521fbb0..9afdad6c2ffb81db7f8ffb68dd003bd3b5cd4980 100644 (file)
@@ -42,9 +42,9 @@ struct parisc_driver {
 #define to_parisc_driver(d)    container_of(d, struct parisc_driver, drv)
 #define parisc_parent(d)       to_parisc_device(d->dev.parent)
 
-static inline char *parisc_pathname(struct parisc_device *d)
+static inline const char *parisc_pathname(struct parisc_device *d)
 {
-       return d->dev.bus_id;
+       return dev_name(&d->dev);
 }
 
 static inline void
index bb725a6630bb97373db7e212fc18b55d7dfa67b1..00da29a340ba9ad352294a2d47a00cff8e3daaeb 100644 (file)
@@ -24,13 +24,12 @@ typedef int                 __kernel_daddr_t;
 typedef unsigned long          __kernel_size_t;
 typedef long                   __kernel_ssize_t;
 typedef long                   __kernel_ptrdiff_t;
-typedef long                   __kernel_time_t;
 #else
 typedef unsigned int           __kernel_size_t;
 typedef int                    __kernel_ssize_t;
 typedef int                    __kernel_ptrdiff_t;
-typedef long                   __kernel_time_t;
 #endif
+typedef long                   __kernel_time_t;
 typedef char *                 __kernel_caddr_t;
 
 typedef unsigned short         __kernel_uid16_t;
index afa5333187b4519126d2556b008e9fdfaba0fde5..302f68dc889cb0e3c5ddc04a1a42ad19e5e58998 100644 (file)
@@ -47,8 +47,6 @@ struct pt_regs {
 
 #define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS))
 
-#define __ARCH_WANT_COMPAT_SYS_PTRACE
-
 struct task_struct;
 #define arch_has_single_step() 1
 void user_disable_single_step(struct task_struct *task);
index 398cdbaf4e540f6e6bccffdb84a7fbc8a88e5e98..409e698f436117bd2a18468f8a26ead3cf400d16 100644 (file)
@@ -44,8 +44,6 @@ extern void arch_send_call_function_ipi(cpumask_t mask);
  
 #define PROC_CHANGE_PENALTY    15              /* Schedule penalty */
 
-extern unsigned long cpu_present_mask;
-
 #define raw_smp_processor_id() (current_thread_info()->cpu)
 
 #else /* CONFIG_SMP */
index 2ca654bd632224373cfcc28c294fc5efe783888c..884b7ce16a3bd3cee27ba80e01e7bd3755d43cbd 100644 (file)
@@ -43,7 +43,7 @@ struct hppa_dma_ops *hppa_dma_ops __read_mostly;
 EXPORT_SYMBOL(hppa_dma_ops);
 
 static struct device root = {
-       .bus_id = "parisc",
+       .init_name = "parisc",
 };
 
 static inline int check_dev(struct device *dev)
@@ -393,7 +393,8 @@ EXPORT_SYMBOL(print_pci_hwpath);
 static void setup_bus_id(struct parisc_device *padev)
 {
        struct hardware_path path;
-       char *output = padev->dev.bus_id;
+       char name[20];
+       char *output = name;
        int i;
 
        get_node_path(padev->dev.parent, &path);
@@ -404,6 +405,7 @@ static void setup_bus_id(struct parisc_device *padev)
                output += sprintf(output, "%u:", (unsigned char) path.bc[i]);
        }
        sprintf(output, "%u", (unsigned char) padev->hw_path);
+       dev_set_name(&padev->dev, name);
 }
 
 struct parisc_device * create_tree_node(char id, struct device *parent)
index 90904f9dfc504fb1e0337abb196b1617006ce514..927db3668b6ffd6bec55e8a1b90d099f5cd7a1dc 100644 (file)
@@ -183,10 +183,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
  * being 64 bit in both cases.
  */
 
-static long translate_usr_offset(long offset)
+static compat_ulong_t translate_usr_offset(compat_ulong_t offset)
 {
        if (offset < 0)
-               return -1;
+               return sizeof(struct pt_regs);
        else if (offset <= 32*4)        /* gr[0..31] */
                return offset * 2 + 4;
        else if (offset <= 32*4+32*8)   /* gr[0..31] + fr[0..31] */
@@ -194,7 +194,7 @@ static long translate_usr_offset(long offset)
        else if (offset < sizeof(struct pt_regs)/2 + 32*4)
                return offset * 2 + 4 - 32*8;
        else
-               return -1;
+               return sizeof(struct pt_regs);
 }
 
 long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
@@ -209,7 +209,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
                if (addr & (sizeof(compat_uint_t)-1))
                        break;
                addr = translate_usr_offset(addr);
-               if (addr < 0)
+               if (addr >= sizeof(struct pt_regs))
                        break;
 
                tmp = *(compat_uint_t *) ((char *) task_regs(child) + addr);
@@ -236,7 +236,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
                        if (addr & (sizeof(compat_uint_t)-1))
                                break;
                        addr = translate_usr_offset(addr);
-                       if (addr < 0)
+                       if (addr >= sizeof(struct pt_regs))
                                break;
                        if (addr >= PT_FR0 && addr <= PT_FR31 + 4) {
                                /* Special case, fp regs are 64 bits anyway */
index 675f1d098f05d2f6ec29ab8c5be3d55005627a03..4c771cd580ecf9abbc4e6d9238accbb0a99bd0d8 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/console.h>
-#include <linux/kallsyms.h>
 #include <linux/bug.h>
 
 #include <asm/assembly.h>
@@ -51,7 +50,7 @@
 DEFINE_SPINLOCK(pa_dbit_lock);
 #endif
 
-void parisc_show_stack(struct task_struct *t, unsigned long *sp,
+static void parisc_show_stack(struct task_struct *task, unsigned long *sp,
        struct pt_regs *regs);
 
 static int printbinary(char *buf, unsigned long x, int nbits)
@@ -121,18 +120,19 @@ static void print_fr(char *level, struct pt_regs *regs)
 
 void show_regs(struct pt_regs *regs)
 {
-       int i;
+       int i, user;
        char *level;
        unsigned long cr30, cr31;
 
-       level = user_mode(regs) ? KERN_DEBUG : KERN_CRIT;
+       user = user_mode(regs);
+       level = user ? KERN_DEBUG : KERN_CRIT;
 
        print_gr(level, regs);
 
        for (i = 0; i < 8; i += 4)
                PRINTREGS(level, regs->sr, "sr", RFMT, i);
 
-       if (user_mode(regs))
+       if (user)
                print_fr(level, regs);
 
        cr30 = mfctl(30);
@@ -145,14 +145,18 @@ void show_regs(struct pt_regs *regs)
        printk("%s CPU: %8d   CR30: " RFMT " CR31: " RFMT "\n",
               level, current_thread_info()->cpu, cr30, cr31);
        printk("%s ORIG_R28: " RFMT "\n", level, regs->orig_r28);
-       printk(level);
-       print_symbol(" IAOQ[0]: %s\n", regs->iaoq[0]);
-       printk(level);
-       print_symbol(" IAOQ[1]: %s\n", regs->iaoq[1]);
-       printk(level);
-       print_symbol(" RP(r2): %s\n", regs->gr[2]);
-
-       parisc_show_stack(current, NULL, regs);
+
+       if (user) {
+               printk("%s IAOQ[0]: " RFMT "\n", level, regs->iaoq[0]);
+               printk("%s IAOQ[1]: " RFMT "\n", level, regs->iaoq[1]);
+               printk("%s RP(r2): " RFMT "\n", level, regs->gr[2]);
+       } else {
+               printk("%s IAOQ[0]: %pS\n", level, (void *) regs->iaoq[0]);
+               printk("%s IAOQ[1]: %pS\n", level, (void *) regs->iaoq[1]);
+               printk("%s RP(r2): %pS\n", level, (void *) regs->gr[2]);
+
+               parisc_show_stack(current, NULL, regs);
+       }
 }
 
 
@@ -173,20 +177,15 @@ static void do_show_stack(struct unwind_frame_info *info)
                        break;
 
                if (__kernel_text_address(info->ip)) {
-                       printk("%s [<" RFMT ">] ", (i&0x3)==1 ? KERN_CRIT : "", info->ip);
-#ifdef CONFIG_KALLSYMS
-                       print_symbol("%s\n", info->ip);
-#else
-                       if ((i & 0x03) == 0)
-                               printk("\n");
-#endif
+                       printk(KERN_CRIT " [<" RFMT ">] %pS\n",
+                               info->ip, (void *) info->ip);
                        i++;
                }
        }
-       printk("\n");
+       printk(KERN_CRIT "\n");
 }
 
-void parisc_show_stack(struct task_struct *task, unsigned long *sp,
+static void parisc_show_stack(struct task_struct *task, unsigned long *sp,
        struct pt_regs *regs)
 {
        struct unwind_frame_info info;
index 8fc6d72849ae435c095ec75a94acb677f0815d5e..3d3daa674299038072e3d8e7f2d36f3181b5cb1f 100644 (file)
@@ -41,6 +41,7 @@ $(obj)/4xx.o: BOOTCFLAGS += -mcpu=405
 $(obj)/ebony.o: BOOTCFLAGS += -mcpu=405
 $(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=405
 $(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405
+$(obj)/cuboot-acadia.o: BOOTCFLAGS += -mcpu=405
 $(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405
 $(obj)/virtex405-head.o: BOOTAFLAGS += -mcpu=405
 
index 226ff066652ba36e8f5e5c229b643a68c03da49d..dea30910c136800cbe1bdb37fbe3e354376cf9d3 100644 (file)
@@ -18,8 +18,8 @@
        #size-cells = <1>;
 
        aliases {
-               ethernet0 = &enet0;
-               ethernet1 = &enet1;
+               ethernet0 = &enet1;
+               ethernet1 = &enet0;
                serial0 = &serial0;
                serial1 = &serial1;
                pci0 = &pci0;
index 2c9d54a35bc312e8286812a67507e7a71e9f9141..4bdbaf4993a185c176000890f1c999108f6b2f11 100644 (file)
                                interrupts = <18 0x8>;
                                interrupt-parent = <&ipic>;
                        };
+
+                       mcu_pio: mcu@a {
+                               #gpio-cells = <2>;
+                               compatible = "fsl,mc9s08qg8-mpc8349emitx",
+                                            "fsl,mcu-mpc8349emitx";
+                               reg = <0x0a>;
+                               gpio-controller;
+                       };
                };
 
                spi@7000 {
                                interrupt-parent = <&ipic>;
                                interrupts = <71 8>;
                        };
-
-                       mcu_pio: mcu@a {
-                               #gpio-cells = <2>;
-                               compatible = "fsl,mc9s08qg8-mpc8349emitx",
-                                            "fsl,mcu-mpc8349emitx";
-                               reg = <0x0a>;
-                               gpio-controller;
-                       };
                };
 
                usb@22000 {
index cadd4652a69556a8eb496449b3d3f15e0d4928fb..5c69b2fafd32c588e64b0bb1ec1f257010477b18 100644 (file)
@@ -90,7 +90,7 @@
                        compatible = "fsl,mpc8572-l2-cache-controller";
                        reg = <0x20000 0x1000>;
                        cache-line-size = <32>; // 32 bytes
-                       cache-size = <0x80000>; // L2, 512K
+                       cache-size = <0x100000>; // L2, 1M
                        interrupt-parent = <&mpic>;
                        interrupts = <16 2>;
                };
diff --git a/arch/powerpc/configs/40x/virtex_defconfig b/arch/powerpc/configs/40x/virtex_defconfig
new file mode 100644 (file)
index 0000000..9a9350d
--- /dev/null
@@ -0,0 +1,1176 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.28-rc4
+# Fri Nov 14 10:49:16 2008
+#
+# CONFIG_PPC64 is not set
+
+#
+# Processor support
+#
+# CONFIG_6xx is not set
+# CONFIG_PPC_85xx is not set
+# CONFIG_PPC_8xx is not set
+CONFIG_40x=y
+# CONFIG_44x is not set
+# CONFIG_E200 is not set
+CONFIG_4xx=y
+# CONFIG_PPC_MM_SLICES is not set
+CONFIG_NOT_COHERENT_CACHE=y
+CONFIG_PPC32=y
+CONFIG_WORD_SIZE=32
+# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
+CONFIG_MMU=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_HARDIRQS=y
+# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
+CONFIG_IRQ_PER_CPU=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_GPIO=y
+# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
+CONFIG_PPC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_GENERIC_NVRAM=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_PPC_OF=y
+CONFIG_OF=y
+CONFIG_PPC_UDBG_16550=y
+# CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+# CONFIG_DEFAULT_UIMAGE is not set
+CONFIG_PPC_DCR_NATIVE=y
+# CONFIG_PPC_DCR_MMIO is not set
+CONFIG_PPC_DCR=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_PCI_QUIRKS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
+CONFIG_HAVE_IOREMAP_PROT=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
+# CONFIG_PPC4xx_PCI_EXPRESS is not set
+
+#
+# Platform support
+#
+# CONFIG_PPC_CELL is not set
+# CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PQ2ADS is not set
+# CONFIG_PPC4xx_GPIO is not set
+CONFIG_XILINX_VIRTEX=y
+# CONFIG_ACADIA is not set
+# CONFIG_EP405 is not set
+# CONFIG_HCU4 is not set
+# CONFIG_KILAUEA is not set
+# CONFIG_MAKALU is not set
+# CONFIG_WALNUT is not set
+CONFIG_XILINX_VIRTEX_GENERIC_BOARD=y
+# CONFIG_PPC40x_SIMPLE is not set
+CONFIG_XILINX_VIRTEX_II_PRO=y
+CONFIG_XILINX_VIRTEX_4_FX=y
+CONFIG_IBM405_ERR77=y
+CONFIG_IBM405_ERR51=y
+# CONFIG_IPIC is not set
+# CONFIG_MPIC is not set
+# CONFIG_MPIC_WEIRD is not set
+# CONFIG_PPC_I8259 is not set
+# CONFIG_PPC_RTAS is not set
+# CONFIG_MMIO_NVRAM is not set
+# CONFIG_PPC_MPC106 is not set
+# CONFIG_PPC_970_NAP is not set
+# CONFIG_PPC_INDIRECT_IO is not set
+# CONFIG_GENERIC_IOMAP is not set
+# CONFIG_CPU_FREQ is not set
+# CONFIG_FSL_ULI1575 is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+# CONFIG_SCHED_HRTICK is not set
+# CONFIG_PREEMPT_NONE is not set
+# CONFIG_PREEMPT_VOLUNTARY is not set
+CONFIG_PREEMPT=y
+# CONFIG_PREEMPT_RCU is not set
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+CONFIG_MATH_EMULATION=y
+# CONFIG_IOMMU_HELPER is not set
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_HAS_WALK_MEMORY=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_MIGRATION=y
+CONFIG_RESOURCES_64BIT=y
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_FORCE_MAX_ZONEORDER=11
+CONFIG_PROC_DEVICETREE=y
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CMDLINE=""
+CONFIG_EXTRA_TARGETS=""
+# CONFIG_PM is not set
+CONFIG_SECCOMP=y
+CONFIG_ISA_DMA_API=y
+
+#
+# Bus options
+#
+CONFIG_ZONE_DMA=y
+CONFIG_PPC_INDIRECT_PCI=y
+CONFIG_4xx_SOC=y
+CONFIG_PPC_PCI_CHOICE=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_SYSCALL=y
+# CONFIG_PCIEPORTBUS is not set
+CONFIG_ARCH_SUPPORTS_MSI=y
+# CONFIG_PCI_MSI is not set
+CONFIG_PCI_LEGACY=y
+# CONFIG_PCI_DEBUG is not set
+# CONFIG_PCCARD is not set
+# CONFIG_HOTPLUG_PCI is not set
+# CONFIG_HAS_RAPIDIO is not set
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_PAGE_OFFSET=0xc0000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_PHYSICAL_START=0x00000000
+CONFIG_TASK_SIZE=0xc0000000
+CONFIG_CONSISTENT_START=0xff100000
+CONFIG_CONSISTENT_SIZE=0x00200000
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_NDISC_NODETYPE=y
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_IPV6_MROUTE is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_NETFILTER_ADVANCED=y
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK_QUEUE is not set
+# CONFIG_NETFILTER_NETLINK_LOG is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_OWNER is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_RECENT is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_IP_VS is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_NF_DEFRAG_IPV4 is not set
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
+# CONFIG_IP_NF_MATCH_AH is not set
+# CONFIG_IP_NF_MATCH_ECN is not set
+# CONFIG_IP_NF_MATCH_TTL is not set
+CONFIG_IP_NF_FILTER=m
+# CONFIG_IP_NF_TARGET_REJECT is not set
+# CONFIG_IP_NF_TARGET_LOG is not set
+# CONFIG_IP_NF_TARGET_ULOG is not set
+CONFIG_IP_NF_MANGLE=m
+# CONFIG_IP_NF_TARGET_ECN is not set
+# CONFIG_IP_NF_TARGET_TTL is not set
+# CONFIG_IP_NF_RAW is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# IPv6: Netfilter Configuration
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_OLD_REGULATORY=y
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+# CONFIG_MTD is not set
+CONFIG_OF_DEVICE=y
+CONFIG_OF_GPIO=y
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=8192
+# CONFIG_BLK_DEV_XIP is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_XILINX_SYSACE=y
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_HP_ILO is not set
+# CONFIG_C2PORT is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# Enable only one of the two stacks, unless you know what you are doing
+#
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
+# CONFIG_I2O is not set
+# CONFIG_MACINTOSH_DRIVERS is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_ARCNET is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_B44 is not set
+# CONFIG_ATL2 is not set
+CONFIG_NETDEV_1000=y
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_E1000E is not set
+# CONFIG_IP1000 is not set
+# CONFIG_IGB is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
+# CONFIG_VIA_VELOCITY is not set
+# CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
+# CONFIG_QLA3XXX is not set
+# CONFIG_ATL1 is not set
+# CONFIG_ATL1E is not set
+# CONFIG_JME is not set
+# CONFIG_NETDEV_10000 is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_GPIO is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_LIFEBOOK=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MOUSE_GPIO is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+# CONFIG_SERIO_I8042 is not set
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_PCIPS2 is not set
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+CONFIG_SERIO_XILINX_XPS_PS2=y
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_NOZOMI is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_UARTLITE=y
+CONFIG_SERIAL_UARTLITE_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
+# CONFIG_SERIAL_OF_PLATFORM is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_GEN_RTC is not set
+CONFIG_XILINX_HWICAP=y
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+CONFIG_GPIO_SYSFS=y
+
+#
+# Memory mapped GPIO expanders:
+#
+CONFIG_GPIO_XILINX=y
+
+#
+# I2C GPIO expanders:
+#
+
+#
+# PCI GPIO expanders:
+#
+# CONFIG_GPIO_BT8XX is not set
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_OF is not set
+# CONFIG_FB_CT65550 is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_VGA16 is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_VIA is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_CARMINE is not set
+# CONFIG_FB_IBM_GXT4500 is not set
+CONFIG_FB_XILINX=y
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_UWB is not set
+# CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_NEW_LEDS is not set
+# CONFIG_ACCESSIBILITY is not set
+# CONFIG_INFINIBAND is not set
+# CONFIG_EDAC is not set
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_AUTOFS_FS=y
+CONFIG_AUTOFS4_FS=y
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+# CONFIG_PROC_KCORE is not set
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_CRAMFS=y
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+CONFIG_ROMFS_FS=y
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=m
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=m
+# CONFIG_DLM is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_HAVE_LMB=y
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_PREEMPT_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+# CONFIG_DEBUG_STACKOVERFLOW is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_CODE_PATCHING_SELFTEST is not set
+# CONFIG_FTR_FIXUP_SELFTEST is not set
+# CONFIG_MSI_BITMAP_SELFTEST is not set
+# CONFIG_XMON is not set
+# CONFIG_IRQSTACKS is not set
+# CONFIG_BDI_SWITCH is not set
+# CONFIG_PPC_EARLY_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+# CONFIG_CRYPTO_MANAGER is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+# CONFIG_CRYPTO_DEV_HIFN_795X is not set
+# CONFIG_PPC_CLOCK is not set
+# CONFIG_VIRTUALIZATION is not set
index 663ec512b33bc64c9ec20d59dde0662f6ddd0f93..7513d360e0b04bf4b8f15f1fa79b81411e26bc4c 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc1
-# Tue Aug  5 09:20:16 2008
+# Linux kernel version: 2.6.28-rc4
+# Fri Nov 14 10:31:16 2008
 #
 # CONFIG_PPC64 is not set
 
@@ -22,14 +22,13 @@ CONFIG_PHYS_64BIT=y
 CONFIG_NOT_COHERENT_CACHE=y
 CONFIG_PPC32=y
 CONFIG_WORD_SIZE=32
-CONFIG_PPC_MERGE=y
+CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
 CONFIG_MMU=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_TIME=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_HARDIRQS=y
-# CONFIG_HAVE_GET_USER_PAGES_FAST is not set
 # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
 CONFIG_IRQ_PER_CPU=y
 CONFIG_STACKTRACE_SUPPORT=y
@@ -40,6 +39,7 @@ CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_GPIO=y
 # CONFIG_ARCH_NO_VIRT_TO_BUS is not set
 CONFIG_PPC=y
 CONFIG_EARLY_PRINTK=y
@@ -93,8 +93,8 @@ CONFIG_INITRAMFS_SOURCE=""
 CONFIG_SYSCTL=y
 # CONFIG_EMBEDDED is not set
 CONFIG_SYSCTL_SYSCALL=y
-CONFIG_SYSCTL_SYSCALL_CHECK=y
 CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
@@ -109,7 +109,9 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_PCI_QUIRKS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
@@ -122,10 +124,6 @@ CONFIG_HAVE_IOREMAP_PROT=y
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
 CONFIG_HAVE_ARCH_TRACEHOOK=y
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
-# CONFIG_HAVE_CLK is not set
-CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -158,6 +156,7 @@ CONFIG_DEFAULT_CFQ=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="cfq"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 # CONFIG_PPC4xx_PCI_EXPRESS is not set
 
 #
@@ -174,9 +173,13 @@ CONFIG_CLASSIC_RCU=y
 # CONFIG_KATMAI is not set
 # CONFIG_RAINIER is not set
 # CONFIG_WARP is not set
+# CONFIG_ARCHES is not set
 # CONFIG_CANYONLANDS is not set
+# CONFIG_GLACIER is not set
 # CONFIG_YOSEMITE is not set
 CONFIG_XILINX_VIRTEX440_GENERIC_BOARD=y
+# CONFIG_PPC44x_SIMPLE is not set
+# CONFIG_PPC4xx_GPIO is not set
 CONFIG_XILINX_VIRTEX=y
 CONFIG_XILINX_VIRTEX_5_FXT=y
 # CONFIG_IPIC is not set
@@ -196,7 +199,6 @@ CONFIG_XILINX_VIRTEX_5_FXT=y
 # Kernel options
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_TICK_ONESHOT is not set
 # CONFIG_NO_HZ is not set
 # CONFIG_HIGH_RES_TIMERS is not set
 CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -211,6 +213,8 @@ CONFIG_HZ=250
 CONFIG_PREEMPT=y
 # CONFIG_PREEMPT_RCU is not set
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
 CONFIG_MATH_EMULATION=y
 # CONFIG_IOMMU_HELPER is not set
@@ -225,15 +229,15 @@ CONFIG_FLATMEM_MANUAL=y
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_MIGRATION=y
 CONFIG_RESOURCES_64BIT=y
+CONFIG_PHYS_ADDR_T_64BIT=y
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 CONFIG_FORCE_MAX_ZONEORDER=11
 CONFIG_PROC_DEVICETREE=y
 CONFIG_CMDLINE_BOOL=y
@@ -256,6 +260,7 @@ CONFIG_PCI_SYSCALL=y
 CONFIG_ARCH_SUPPORTS_MSI=y
 # CONFIG_PCI_MSI is not set
 CONFIG_PCI_LEGACY=y
+# CONFIG_PCI_DEBUG is not set
 # CONFIG_PCCARD is not set
 # CONFIG_HOTPLUG_PCI is not set
 # CONFIG_HAS_RAPIDIO is not set
@@ -317,7 +322,6 @@ CONFIG_INET_TCP_DIAG=y
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-# CONFIG_IP_VS is not set
 CONFIG_IPV6=m
 # CONFIG_IPV6_PRIVACY is not set
 # CONFIG_IPV6_ROUTER_PREF is not set
@@ -352,8 +356,8 @@ CONFIG_NETFILTER_XTABLES=m
 # CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
 # CONFIG_NETFILTER_XT_TARGET_DSCP is not set
 # CONFIG_NETFILTER_XT_TARGET_MARK is not set
-# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
 # CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
 # CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
 # CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
 # CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set
@@ -361,36 +365,38 @@ CONFIG_NETFILTER_XTABLES=m
 # CONFIG_NETFILTER_XT_MATCH_DCCP is not set
 # CONFIG_NETFILTER_XT_MATCH_DSCP is not set
 # CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
 # CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set
 # CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
 # CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
 # CONFIG_NETFILTER_XT_MATCH_MAC is not set
 # CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
 # CONFIG_NETFILTER_XT_MATCH_OWNER is not set
 # CONFIG_NETFILTER_XT_MATCH_POLICY is not set
-# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
 # CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
 # CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
 # CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
 # CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_RECENT is not set
 # CONFIG_NETFILTER_XT_MATCH_SCTP is not set
 # CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
 # CONFIG_NETFILTER_XT_MATCH_STRING is not set
 # CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
 # CONFIG_NETFILTER_XT_MATCH_TIME is not set
 # CONFIG_NETFILTER_XT_MATCH_U32 is not set
-# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+# CONFIG_IP_VS is not set
 
 #
 # IP: Netfilter Configuration
 #
+# CONFIG_NF_DEFRAG_IPV4 is not set
 # CONFIG_IP_NF_QUEUE is not set
 CONFIG_IP_NF_IPTABLES=m
-# CONFIG_IP_NF_MATCH_RECENT is not set
-# CONFIG_IP_NF_MATCH_ECN is not set
+# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
 # CONFIG_IP_NF_MATCH_AH is not set
+# CONFIG_IP_NF_MATCH_ECN is not set
 # CONFIG_IP_NF_MATCH_TTL is not set
-# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
 CONFIG_IP_NF_FILTER=m
 # CONFIG_IP_NF_TARGET_REJECT is not set
 # CONFIG_IP_NF_TARGET_LOG is not set
@@ -411,6 +417,7 @@ CONFIG_IP_NF_MANGLE=m
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
@@ -431,11 +438,10 @@ CONFIG_IP_NF_MANGLE=m
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
 # CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_OLD_REGULATORY=y
 # CONFIG_WIRELESS_EXT is not set
 # CONFIG_MAC80211 is not set
 # CONFIG_IEEE80211 is not set
@@ -455,11 +461,13 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
 CONFIG_FIRMWARE_IN_KERNEL=y
 CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
 # CONFIG_SYS_HYPERVISOR is not set
 # CONFIG_CONNECTOR is not set
 # CONFIG_MTD is not set
 CONFIG_OF_DEVICE=y
-CONFIG_OF_I2C=y
+CONFIG_OF_GPIO=y
 # CONFIG_PARPORT is not set
 CONFIG_BLK_DEV=y
 # CONFIG_BLK_DEV_FD is not set
@@ -478,7 +486,7 @@ CONFIG_BLK_DEV_RAM_SIZE=8192
 # CONFIG_BLK_DEV_XIP is not set
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
-# CONFIG_XILINX_SYSACE is not set
+CONFIG_XILINX_SYSACE=y
 # CONFIG_BLK_DEV_HD is not set
 CONFIG_MISC_DEVICES=y
 # CONFIG_PHANTOM is not set
@@ -487,6 +495,7 @@ CONFIG_MISC_DEVICES=y
 # CONFIG_TIFM_CORE is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
 # CONFIG_HP_ILO is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
@@ -534,8 +543,12 @@ CONFIG_MII=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_NET_PCI is not set
 # CONFIG_B44 is not set
+# CONFIG_ATL2 is not set
 CONFIG_NETDEV_1000=y
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
@@ -556,6 +569,7 @@ CONFIG_NETDEV_1000=y
 # CONFIG_QLA3XXX is not set
 # CONFIG_ATL1 is not set
 # CONFIG_ATL1E is not set
+# CONFIG_JME is not set
 # CONFIG_NETDEV_10000 is not set
 # CONFIG_TR is not set
 
@@ -604,6 +618,7 @@ CONFIG_KEYBOARD_ATKBD=y
 # CONFIG_KEYBOARD_XTKBD is not set
 # CONFIG_KEYBOARD_NEWTON is not set
 # CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_GPIO is not set
 CONFIG_INPUT_MOUSE=y
 CONFIG_MOUSE_PS2=y
 CONFIG_MOUSE_PS2_ALPS=y
@@ -611,9 +626,11 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
 CONFIG_MOUSE_PS2_SYNAPTICS=y
 CONFIG_MOUSE_PS2_LIFEBOOK=y
 CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
 # CONFIG_MOUSE_PS2_TOUCHKIT is not set
 # CONFIG_MOUSE_SERIAL is not set
 # CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MOUSE_GPIO is not set
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_INPUT_TABLET is not set
 # CONFIG_INPUT_TOUCHSCREEN is not set
@@ -624,11 +641,11 @@ CONFIG_MOUSE_PS2_TRACKPOINT=y
 #
 CONFIG_SERIO=y
 # CONFIG_SERIO_I8042 is not set
-CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_SERPORT is not set
 # CONFIG_SERIO_PCIPS2 is not set
 CONFIG_SERIO_LIBPS2=y
 # CONFIG_SERIO_RAW is not set
-# CONFIG_SERIO_XILINX_XPS_PS2 is not set
+CONFIG_SERIO_XILINX_XPS_PS2=y
 # CONFIG_GAMEPORT is not set
 
 #
@@ -656,11 +673,12 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 #
 # Non-8250 serial port support
 #
-# CONFIG_SERIAL_UARTLITE is not set
+CONFIG_SERIAL_UARTLITE=y
+CONFIG_SERIAL_UARTLITE_CONSOLE=y
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_SERIAL_JSM is not set
-CONFIG_SERIAL_OF_PLATFORM=y
+# CONFIG_SERIAL_OF_PLATFORM is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -674,87 +692,41 @@ CONFIG_XILINX_HWICAP=y
 # CONFIG_RAW_DRIVER is not set
 # CONFIG_TCG_TPM is not set
 CONFIG_DEVPORT=y
-CONFIG_I2C=y
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_CHARDEV=y
-
-#
-# I2C Hardware Bus support
-#
-
-#
-# PC SMBus host controller drivers
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-# CONFIG_I2C_AMD756 is not set
-# CONFIG_I2C_AMD8111 is not set
-# CONFIG_I2C_I801 is not set
-# CONFIG_I2C_ISCH is not set
-# CONFIG_I2C_PIIX4 is not set
-# CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-# CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_VIA is not set
-# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+CONFIG_GPIO_SYSFS=y
 
 #
-# I2C system bus drivers (mostly embedded / system-on-chip)
+# Memory mapped GPIO expanders:
 #
-# CONFIG_I2C_IBM_IIC is not set
-# CONFIG_I2C_MPC is not set
-# CONFIG_I2C_OCORES is not set
-# CONFIG_I2C_SIMTEC is not set
+CONFIG_GPIO_XILINX=y
 
 #
-# External I2C/SMBus adapter drivers
+# I2C GPIO expanders:
 #
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_TAOS_EVM is not set
 
 #
-# Graphics adapter I2C/DDC channel drivers
+# PCI GPIO expanders:
 #
-# CONFIG_I2C_VOODOO3 is not set
+# CONFIG_GPIO_BT8XX is not set
 
 #
-# Other I2C/SMBus bus drivers
+# SPI GPIO expanders:
 #
-# CONFIG_I2C_PCA_PLATFORM is not set
-# CONFIG_I2C_STUB is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-# CONFIG_DS1682 is not set
-# CONFIG_AT24 is not set
-# CONFIG_SENSORS_EEPROM is not set
-# CONFIG_SENSORS_PCF8574 is not set
-# CONFIG_PCF8575 is not set
-# CONFIG_SENSORS_PCA9539 is not set
-# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_SENSORS_MAX6875 is not set
-# CONFIG_SENSORS_TSL2550 is not set
-CONFIG_I2C_DEBUG_CORE=y
-CONFIG_I2C_DEBUG_ALGO=y
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-# CONFIG_SPI is not set
-CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
-# CONFIG_GPIOLIB is not set
 # CONFIG_W1 is not set
 # CONFIG_POWER_SUPPLY is not set
 # CONFIG_HWMON is not set
 # CONFIG_THERMAL is not set
 # CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -763,6 +735,8 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -790,6 +764,7 @@ CONFIG_SSB_POSSIBLE=y
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -826,6 +801,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_S3 is not set
 # CONFIG_FB_SAVAGE is not set
 # CONFIG_FB_SIS is not set
+# CONFIG_FB_VIA is not set
 # CONFIG_FB_NEOMAGIC is not set
 # CONFIG_FB_KYRO is not set
 # CONFIG_FB_3DFX is not set
@@ -838,6 +814,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_IBM_GXT4500 is not set
 CONFIG_FB_XILINX=y
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -870,6 +848,7 @@ CONFIG_LOGO_LINUX_CLUT224=y
 # CONFIG_SOUND is not set
 # CONFIG_HID_SUPPORT is not set
 # CONFIG_USB_SUPPORT is not set
+# CONFIG_UWB is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
 # CONFIG_NEW_LEDS is not set
@@ -879,6 +858,8 @@ CONFIG_LOGO_LINUX_CLUT224=y
 # CONFIG_RTC_CLASS is not set
 # CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
@@ -887,10 +868,11 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_EXT2_FS_XIP is not set
 # CONFIG_EXT3_FS is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
 # CONFIG_OCFS2_FS is not set
 CONFIG_DNOTIFY=y
@@ -899,7 +881,7 @@ CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_AUTOFS_FS=y
 CONFIG_AUTOFS4_FS=y
-CONFIG_FUSE_FS=m
+# CONFIG_FUSE_FS is not set
 
 #
 # CD-ROM/DVD Filesystems
@@ -923,6 +905,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 # CONFIG_PROC_KCORE is not set
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -954,19 +937,15 @@ CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
 CONFIG_ROOT_NFS=y
-CONFIG_NFSD=y
-CONFIG_NFSD_V3=y
-# CONFIG_NFSD_V3_ACL is not set
-# CONFIG_NFSD_V4 is not set
+# CONFIG_NFSD is not set
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
-CONFIG_SMB_FS=y
-# CONFIG_SMB_NLS_DEFAULT is not set
+# CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
@@ -1023,7 +1002,6 @@ CONFIG_NLS_UTF8=m
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
 CONFIG_CRC_CCITT=y
 # CONFIG_CRC16 is not set
 # CONFIG_CRC_T10DIF is not set
@@ -1041,7 +1019,7 @@ CONFIG_HAVE_LMB=y
 #
 # Kernel hacking
 #
-# CONFIG_PRINTK_TIME is not set
+CONFIG_PRINTK_TIME=y
 CONFIG_ENABLE_WARN_DEPRECATED=y
 CONFIG_ENABLE_MUST_CHECK=y
 CONFIG_FRAME_WARN=1024
@@ -1049,19 +1027,62 @@ CONFIG_FRAME_WARN=1024
 # CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_FS is not set
 # CONFIG_HEADERS_CHECK is not set
-# CONFIG_DEBUG_KERNEL is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
 CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
 # CONFIG_LATENCYTOP is not set
-CONFIG_HAVE_FTRACE=y
-CONFIG_HAVE_DYNAMIC_FTRACE=y
-# CONFIG_FTRACE is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
 # CONFIG_PREEMPT_TRACER is not set
 # CONFIG_SCHED_TRACER is not set
 # CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+# CONFIG_DEBUG_STACKOVERFLOW is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_CODE_PATCHING_SELFTEST is not set
+# CONFIG_FTR_FIXUP_SELFTEST is not set
+# CONFIG_MSI_BITMAP_SELFTEST is not set
+# CONFIG_XMON is not set
 # CONFIG_IRQSTACKS is not set
+# CONFIG_BDI_SWITCH is not set
 # CONFIG_PPC_EARLY_DEBUG is not set
 
 #
@@ -1069,12 +1090,14 @@ CONFIG_HAVE_ARCH_KGDB=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
 
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 # CONFIG_CRYPTO_MANAGER is not set
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_NULL is not set
@@ -1147,6 +1170,11 @@ CONFIG_CRYPTO=y
 #
 # CONFIG_CRYPTO_DEFLATE is not set
 # CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 CONFIG_CRYPTO_HW=y
 # CONFIG_CRYPTO_DEV_HIFN_795X is not set
 # CONFIG_PPC_CLOCK is not set
index c10f7395aa1b074e791c3ceceecd8f71706ca60b..3df627494b650844a53844dbf425bdcb77461ce3 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.25
-# Tue Apr 29 07:11:37 2008
+# Linux kernel version: 2.6.28-rc4
+# Thu Nov 13 02:12:40 2008
 #
 # CONFIG_PPC64 is not set
 
@@ -22,7 +22,7 @@ CONFIG_PPC_STD_MMU_32=y
 # CONFIG_SMP is not set
 CONFIG_PPC32=y
 CONFIG_WORD_SIZE=32
-CONFIG_PPC_MERGE=y
+# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
 CONFIG_MMU=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_TIME=y
@@ -32,6 +32,7 @@ CONFIG_GENERIC_HARDIRQS=y
 # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
 CONFIG_IRQ_PER_CPU=y
 CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_ARCH_HAS_ILOG2_U32=y
@@ -102,6 +103,7 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLUB_DEBUG=y
 # CONFIG_SLAB is not set
@@ -110,9 +112,13 @@ CONFIG_SLUB=y
 # CONFIG_PROFILING is not set
 # CONFIG_MARKERS is not set
 CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
+CONFIG_HAVE_IOREMAP_PROT=y
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
-CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+CONFIG_HAVE_CLK=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
@@ -123,6 +129,7 @@ CONFIG_BLOCK=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
 # CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
 
 #
 # IO Schedulers
@@ -137,19 +144,16 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Platform support
 #
 CONFIG_PPC_MULTIPLATFORM=y
-# CONFIG_PPC_82xx is not set
-# CONFIG_PPC_83xx is not set
-# CONFIG_PPC_86xx is not set
 CONFIG_CLASSIC32=y
 # CONFIG_PPC_CHRP is not set
-# CONFIG_PPC_MPC512x is not set
-# CONFIG_PPC_MPC5121 is not set
 # CONFIG_MPC5121_ADS is not set
+# CONFIG_MPC5121_GENERIC is not set
 CONFIG_PPC_MPC52xx=y
 CONFIG_PPC_MPC5200_SIMPLE=y
 # CONFIG_PPC_EFIKA is not set
@@ -159,7 +163,10 @@ CONFIG_PPC_MPC5200_SIMPLE=y
 # CONFIG_PPC_PMAC is not set
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PPC_82xx is not set
 # CONFIG_PQ2ADS is not set
+# CONFIG_PPC_83xx is not set
+# CONFIG_PPC_86xx is not set
 # CONFIG_EMBEDDED6xx is not set
 # CONFIG_IPIC is not set
 # CONFIG_MPIC is not set
@@ -183,7 +190,6 @@ CONFIG_PPC_BESTCOMM_FEC=y
 # Kernel options
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_TICK_ONESHOT is not set
 # CONFIG_NO_HZ is not set
 # CONFIG_HIGH_RES_TIMERS is not set
 CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -197,6 +203,8 @@ CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_IOMMU_HELPER is not set
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
@@ -211,19 +219,20 @@ CONFIG_FLATMEM_MANUAL=y
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_MIGRATION=y
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 CONFIG_FORCE_MAX_ZONEORDER=11
 CONFIG_PROC_DEVICETREE=y
 # CONFIG_CMDLINE_BOOL is not set
+CONFIG_EXTRA_TARGETS=""
 CONFIG_PM=y
-# CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
 CONFIG_SECCOMP=y
 CONFIG_ISA_DMA_API=y
@@ -233,7 +242,7 @@ CONFIG_ISA_DMA_API=y
 #
 CONFIG_ZONE_DMA=y
 CONFIG_GENERIC_ISA_DMA=y
-CONFIG_FSL_SOC=y
+CONFIG_PPC_PCI_CHOICE=y
 # CONFIG_PCI is not set
 # CONFIG_PCI_DOMAINS is not set
 # CONFIG_PCI_SYSCALL is not set
@@ -254,10 +263,6 @@ CONFIG_PAGE_OFFSET=0xc0000000
 CONFIG_KERNEL_START=0xc0000000
 CONFIG_PHYSICAL_START=0x00000000
 CONFIG_TASK_SIZE=0xc0000000
-
-#
-# Networking
-#
 CONFIG_NET=y
 
 #
@@ -308,6 +313,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
@@ -328,14 +334,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-# CONFIG_WIRELESS_EXT is not set
-# CONFIG_MAC80211 is not set
-# CONFIG_IEEE80211 is not set
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -446,6 +446,7 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
 # CONFIG_BLK_DEV_XIP is not set
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
+# CONFIG_BLK_DEV_HD is not set
 # CONFIG_MISC_DEVICES is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
@@ -487,11 +488,11 @@ CONFIG_CHR_DEV_SG=y
 # CONFIG_SCSI_SAS_LIBSAS is not set
 # CONFIG_SCSI_SRP_ATTRS is not set
 # CONFIG_SCSI_LOWLEVEL is not set
+# CONFIG_SCSI_DH is not set
 # CONFIG_ATA is not set
 # CONFIG_MD is not set
 # CONFIG_MACINTOSH_DRIVERS is not set
 CONFIG_NETDEVICES=y
-# CONFIG_NETDEVICES_MULTIQUEUE is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_MACVLAN is not set
@@ -521,6 +522,9 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_B44 is not set
 CONFIG_FEC_MPC52xx=y
 CONFIG_FEC_MPC52xx_MDIO=y
@@ -532,7 +536,6 @@ CONFIG_FEC_MPC52xx_MDIO=y
 #
 # CONFIG_WLAN_PRE80211 is not set
 # CONFIG_WLAN_80211 is not set
-# CONFIG_IWLWIFI is not set
 # CONFIG_IWLWIFI_LEDS is not set
 
 #
@@ -567,6 +570,7 @@ CONFIG_FEC_MPC52xx_MDIO=y
 # Character devices
 #
 # CONFIG_VT is not set
+CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -596,25 +600,40 @@ CONFIG_LEGACY_PTY_COUNT=256
 CONFIG_I2C=y
 CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
 
 #
 # I2C Hardware Bus support
 #
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
 CONFIG_I2C_MPC=y
 # CONFIG_I2C_OCORES is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_TAOS_EVM is not set
 # CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
 # CONFIG_I2C_PCA_PLATFORM is not set
 
 #
 # Miscellaneous I2C Chip support
 #
 # CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
 # CONFIG_SENSORS_EEPROM is not set
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
 # CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_MAX6875 is not set
 # CONFIG_SENSORS_TSL2550 is not set
@@ -623,10 +642,13 @@ CONFIG_I2C_MPC=y
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
 # CONFIG_SPI is not set
+CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+# CONFIG_GPIOLIB is not set
 # CONFIG_W1 is not set
 # CONFIG_POWER_SUPPLY is not set
 # CONFIG_HWMON is not set
 # CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
 CONFIG_WATCHDOG=y
 # CONFIG_WATCHDOG_NOWAYOUT is not set
 
@@ -640,24 +662,39 @@ CONFIG_WATCHDOG=y
 # USB-based Watchdog Cards
 #
 # CONFIG_USBPCWATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
 # Multifunction device drivers
 #
+# CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
 #
+
+#
+# Multimedia core support
+#
 # CONFIG_VIDEO_DEV is not set
 # CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
 # CONFIG_DAB is not set
 
 #
@@ -672,10 +709,6 @@ CONFIG_SSB_POSSIBLE=y
 # Display device support
 #
 # CONFIG_DISPLAY_SUPPORT is not set
-
-#
-# Sound
-#
 # CONFIG_SOUND is not set
 CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
@@ -695,11 +728,16 @@ CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_OTG is not set
 # CONFIG_USB_OTG_WHITELIST is not set
 # CONFIG_USB_OTG_BLACKLIST_HUB is not set
+# CONFIG_USB_MON is not set
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
 
 #
 # USB Host Controller Drivers
 #
+# CONFIG_USB_C67X00_HCD is not set
 # CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_HCD is not set
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_HCD_PPC_SOC=y
 CONFIG_USB_OHCI_HCD_PPC_OF=y
@@ -710,12 +748,16 @@ CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
 # CONFIG_USB_OHCI_LITTLE_ENDIAN is not set
 # CONFIG_USB_SL811_HCD is not set
 # CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+# CONFIG_USB_MUSB_HDRC is not set
 
 #
 # USB Device Class drivers
 #
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
 
 #
 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -744,7 +786,6 @@ CONFIG_USB_STORAGE=y
 #
 # CONFIG_USB_MDC800 is not set
 # CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_MON is not set
 
 #
 # USB port drivers
@@ -757,7 +798,7 @@ CONFIG_USB_STORAGE=y
 # CONFIG_USB_EMI62 is not set
 # CONFIG_USB_EMI26 is not set
 # CONFIG_USB_ADUTUX is not set
-# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_SEVSEG is not set
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
@@ -773,14 +814,19 @@ CONFIG_USB_STORAGE=y
 # CONFIG_USB_TRANCEVIBRATOR is not set
 # CONFIG_USB_IOWARRIOR is not set
 # CONFIG_USB_TEST is not set
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
 # CONFIG_USB_GADGET is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
 # CONFIG_NEW_LEDS is not set
+# CONFIG_ACCESSIBILITY is not set
 # CONFIG_EDAC is not set
 # CONFIG_RTC_CLASS is not set
 # CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
@@ -792,12 +838,13 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
 # CONFIG_OCFS2_FS is not set
 CONFIG_DNOTIFY=y
@@ -830,6 +877,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -860,6 +908,7 @@ CONFIG_JFFS2_RTIME=y
 CONFIG_CRAMFS=y
 # CONFIG_VXFS_FS is not set
 # CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -870,14 +919,14 @@ CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 CONFIG_NFS_V4=y
-# CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
-# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -953,9 +1002,9 @@ CONFIG_NLS_ISO8859_1=y
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
 # CONFIG_CRC_ITU_T is not set
 CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
@@ -982,9 +1031,12 @@ CONFIG_FRAME_WARN=1024
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SHIRQ is not set
 CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
 CONFIG_SCHED_DEBUG=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
 # CONFIG_SLUB_DEBUG_ON is not set
 # CONFIG_SLUB_STATS is not set
 # CONFIG_DEBUG_RT_MUTEXES is not set
@@ -998,16 +1050,37 @@ CONFIG_SCHED_DEBUG=y
 # CONFIG_DEBUG_INFO is not set
 # CONFIG_DEBUG_VM is not set
 # CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
 # CONFIG_DEBUG_LIST is not set
 # CONFIG_DEBUG_SG is not set
 # CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
 # CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
 # CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_DEBUGGER is not set
+# CONFIG_CODE_PATCHING_SELFTEST is not set
+# CONFIG_FTR_FIXUP_SELFTEST is not set
+# CONFIG_MSI_BITMAP_SELFTEST is not set
+# CONFIG_XMON is not set
 # CONFIG_IRQSTACKS is not set
 # CONFIG_BDI_SWITCH is not set
 # CONFIG_BOOTX_TEXT is not set
@@ -1018,14 +1091,19 @@ CONFIG_SCHED_DEBUG=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
 
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_NULL is not set
@@ -1063,6 +1141,10 @@ CONFIG_CRYPTO_PCBC=y
 # CONFIG_CRYPTO_MD4 is not set
 CONFIG_CRYPTO_MD5=y
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
 # CONFIG_CRYPTO_SHA1 is not set
 # CONFIG_CRYPTO_SHA256 is not set
 # CONFIG_CRYPTO_SHA512 is not set
@@ -1093,6 +1175,11 @@ CONFIG_CRYPTO_DES=y
 #
 # CONFIG_CRYPTO_DEFLATE is not set
 # CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 CONFIG_CRYPTO_HW=y
 CONFIG_PPC_CLOCK=y
 CONFIG_PPC_LIB_RHEAP=y
index 1a8a250fa11b0c14753ad7a02f489320f144fc6d..5b969f9c925effbd2f5fb77e767b20d6be4919fd 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.25
-# Tue Apr 29 07:12:56 2008
+# Linux kernel version: 2.6.28-rc4
+# Thu Nov 13 02:10:16 2008
 #
 # CONFIG_PPC64 is not set
 
@@ -22,7 +22,7 @@ CONFIG_PPC_STD_MMU_32=y
 # CONFIG_SMP is not set
 CONFIG_PPC32=y
 CONFIG_WORD_SIZE=32
-CONFIG_PPC_MERGE=y
+# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
 CONFIG_MMU=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_TIME=y
@@ -32,6 +32,7 @@ CONFIG_GENERIC_HARDIRQS=y
 # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
 CONFIG_IRQ_PER_CPU=y
 CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_ARCH_HAS_ILOG2_U32=y
@@ -103,7 +104,9 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_PCI_QUIRKS=y
 CONFIG_SLUB_DEBUG=y
 # CONFIG_SLAB is not set
 CONFIG_SLUB=y
@@ -111,24 +114,30 @@ CONFIG_SLUB=y
 # CONFIG_PROFILING is not set
 # CONFIG_MARKERS is not set
 CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
+CONFIG_HAVE_IOREMAP_PROT=y
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
-CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+CONFIG_HAVE_CLK=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
-# CONFIG_KMOD is not set
+CONFIG_KMOD=y
 CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
 # CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
 
 #
 # IO Schedulers
@@ -143,19 +152,16 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+CONFIG_FREEZER=y
 
 #
 # Platform support
 #
 CONFIG_PPC_MULTIPLATFORM=y
-# CONFIG_PPC_82xx is not set
-# CONFIG_PPC_83xx is not set
-# CONFIG_PPC_86xx is not set
 CONFIG_CLASSIC32=y
 # CONFIG_PPC_CHRP is not set
-# CONFIG_PPC_MPC512x is not set
-# CONFIG_PPC_MPC5121 is not set
 # CONFIG_MPC5121_ADS is not set
+# CONFIG_MPC5121_GENERIC is not set
 CONFIG_PPC_MPC52xx=y
 CONFIG_PPC_MPC5200_SIMPLE=y
 # CONFIG_PPC_EFIKA is not set
@@ -165,7 +171,10 @@ CONFIG_PPC_LITE5200=y
 # CONFIG_PPC_PMAC is not set
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PPC_82xx is not set
 # CONFIG_PQ2ADS is not set
+# CONFIG_PPC_83xx is not set
+# CONFIG_PPC_86xx is not set
 # CONFIG_EMBEDDED6xx is not set
 # CONFIG_IPIC is not set
 # CONFIG_MPIC is not set
@@ -198,11 +207,13 @@ CONFIG_HZ_250=y
 # CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
-# CONFIG_SCHED_HRTICK is not set
+CONFIG_SCHED_HRTICK=y
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_IOMMU_HELPER is not set
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
@@ -217,19 +228,20 @@ CONFIG_FLATMEM_MANUAL=y
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_MIGRATION=y
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 CONFIG_FORCE_MAX_ZONEORDER=11
 CONFIG_PROC_DEVICETREE=y
 # CONFIG_CMDLINE_BOOL is not set
+CONFIG_EXTRA_TARGETS=""
 CONFIG_PM=y
-# CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
 CONFIG_PM_SLEEP=y
 CONFIG_SUSPEND=y
@@ -243,7 +255,7 @@ CONFIG_ISA_DMA_API=y
 CONFIG_ZONE_DMA=y
 CONFIG_GENERIC_ISA_DMA=y
 # CONFIG_PPC_INDIRECT_PCI is not set
-CONFIG_FSL_SOC=y
+CONFIG_PPC_PCI_CHOICE=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_SYSCALL=y
@@ -269,10 +281,6 @@ CONFIG_PAGE_OFFSET=0xc0000000
 CONFIG_KERNEL_START=0xc0000000
 CONFIG_PHYSICAL_START=0x00000000
 CONFIG_TASK_SIZE=0xc0000000
-
-#
-# Networking
-#
 CONFIG_NET=y
 
 #
@@ -323,6 +331,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
@@ -343,14 +352,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-# CONFIG_WIRELESS_EXT is not set
-# CONFIG_MAC80211 is not set
-# CONFIG_IEEE80211 is not set
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -390,12 +393,16 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
 # CONFIG_BLK_DEV_XIP is not set
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
+# CONFIG_BLK_DEV_HD is not set
 CONFIG_MISC_DEVICES=y
 # CONFIG_PHANTOM is not set
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_SGI_IOC4 is not set
 # CONFIG_TIFM_CORE is not set
+# CONFIG_ICS932S401 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_HP_ILO is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
@@ -412,7 +419,7 @@ CONFIG_SCSI_DMA=y
 #
 # SCSI support type (disk, tape, CD-ROM)
 #
-# CONFIG_BLK_DEV_SD is not set
+CONFIG_BLK_DEV_SD=y
 # CONFIG_CHR_DEV_ST is not set
 # CONFIG_CHR_DEV_OSST is not set
 # CONFIG_BLK_DEV_SR is not set
@@ -474,12 +481,12 @@ CONFIG_SCSI_LOWLEVEL=y
 # CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 # CONFIG_SCSI_SRP is not set
+# CONFIG_SCSI_DH is not set
 CONFIG_ATA=y
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_SATA_PMP=y
 # CONFIG_SATA_AHCI is not set
 # CONFIG_SATA_SIL24 is not set
-# CONFIG_SATA_FSL is not set
 CONFIG_ATA_SFF=y
 # CONFIG_SATA_SVW is not set
 # CONFIG_ATA_PIIX is not set
@@ -535,18 +542,22 @@ CONFIG_PATA_MPC52xx=y
 # CONFIG_PATA_VIA is not set
 # CONFIG_PATA_WINBOND is not set
 # CONFIG_PATA_PLATFORM is not set
+# CONFIG_PATA_SCH is not set
 # CONFIG_MD is not set
 # CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
+
+#
+# Enable only one of the two stacks, unless you know what you are doing
+#
 # CONFIG_FIREWIRE is not set
 # CONFIG_IEEE1394 is not set
 # CONFIG_I2O is not set
 # CONFIG_MACINTOSH_DRIVERS is not set
 CONFIG_NETDEVICES=y
-# CONFIG_NETDEVICES_MULTIQUEUE is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_MACVLAN is not set
@@ -583,16 +594,19 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_NET_PCI is not set
 # CONFIG_B44 is not set
 CONFIG_FEC_MPC52xx=y
 CONFIG_FEC_MPC52xx_MDIO=y
+# CONFIG_ATL2 is not set
 CONFIG_NETDEV_1000=y
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
 # CONFIG_E1000 is not set
 # CONFIG_E1000E is not set
-# CONFIG_E1000E_ENABLED is not set
 # CONFIG_IP1000 is not set
 # CONFIG_IGB is not set
 # CONFIG_NS83820 is not set
@@ -605,22 +619,27 @@ CONFIG_NETDEV_1000=y
 # CONFIG_VIA_VELOCITY is not set
 # CONFIG_TIGON3 is not set
 # CONFIG_BNX2 is not set
-# CONFIG_GIANFAR is not set
 # CONFIG_MV643XX_ETH is not set
 # CONFIG_QLA3XXX is not set
 # CONFIG_ATL1 is not set
+# CONFIG_ATL1E is not set
+# CONFIG_JME is not set
 CONFIG_NETDEV_10000=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_CHELSIO_T3 is not set
+# CONFIG_ENIC is not set
 # CONFIG_IXGBE is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
 # CONFIG_NETXEN_NIC is not set
 # CONFIG_NIU is not set
+# CONFIG_MLX4_EN is not set
 # CONFIG_MLX4_CORE is not set
 # CONFIG_TEHUTI is not set
 # CONFIG_BNX2X is not set
+# CONFIG_QLGE is not set
+# CONFIG_SFC is not set
 # CONFIG_TR is not set
 
 #
@@ -628,7 +647,6 @@ CONFIG_NETDEV_10000=y
 #
 # CONFIG_WLAN_PRE80211 is not set
 # CONFIG_WLAN_80211 is not set
-# CONFIG_IWLWIFI is not set
 # CONFIG_IWLWIFI_LEDS is not set
 # CONFIG_WAN is not set
 # CONFIG_FDDI is not set
@@ -657,6 +675,7 @@ CONFIG_NETDEV_10000=y
 # Character devices
 #
 # CONFIG_VT is not set
+CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 # CONFIG_NOZOMI is not set
 
@@ -691,42 +710,63 @@ CONFIG_DEVPORT=y
 CONFIG_I2C=y
 CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
 
 #
 # I2C Hardware Bus support
 #
+
+#
+# PC SMBus host controller drivers
+#
 # CONFIG_I2C_ALI1535 is not set
 # CONFIG_I2C_ALI1563 is not set
 # CONFIG_I2C_ALI15X3 is not set
 # CONFIG_I2C_AMD756 is not set
 # CONFIG_I2C_AMD8111 is not set
 # CONFIG_I2C_I801 is not set
-# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_ISCH is not set
 # CONFIG_I2C_PIIX4 is not set
-CONFIG_I2C_MPC=y
 # CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_OCORES is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_PROSAVAGE is not set
-# CONFIG_I2C_SAVAGE4 is not set
-# CONFIG_I2C_SIMTEC is not set
 # CONFIG_I2C_SIS5595 is not set
 # CONFIG_I2C_SIS630 is not set
 # CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_TAOS_EVM is not set
-# CONFIG_I2C_STUB is not set
 # CONFIG_I2C_VIA is not set
 # CONFIG_I2C_VIAPRO is not set
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_MPC=y
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+
+#
+# Graphics adapter I2C/DDC channel drivers
+#
 # CONFIG_I2C_VOODOO3 is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
 # CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
 
 #
 # Miscellaneous I2C Chip support
 #
 # CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
 # CONFIG_SENSORS_EEPROM is not set
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
 # CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_MAX6875 is not set
 # CONFIG_SENSORS_TSL2550 is not set
@@ -735,29 +775,47 @@ CONFIG_I2C_MPC=y
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
 # CONFIG_SPI is not set
+CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+# CONFIG_GPIOLIB is not set
 # CONFIG_W1 is not set
 # CONFIG_POWER_SUPPLY is not set
 # CONFIG_HWMON is not set
 # CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
 # Multifunction device drivers
 #
+# CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
 #
+
+#
+# Multimedia core support
+#
 # CONFIG_VIDEO_DEV is not set
 # CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
 # CONFIG_DAB is not set
 
 #
@@ -774,10 +832,6 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
 # Display device support
 #
 # CONFIG_DISPLAY_SUPPORT is not set
-
-#
-# Sound
-#
 # CONFIG_SOUND is not set
 CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
@@ -787,18 +841,26 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # CONFIG_USB_OTG_WHITELIST is not set
 # CONFIG_USB_OTG_BLACKLIST_HUB is not set
 
+#
+# Enable Host or Gadget support to see Inventra options
+#
+
 #
 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
 #
 # CONFIG_USB_GADGET is not set
+# CONFIG_UWB is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
 # CONFIG_NEW_LEDS is not set
+# CONFIG_ACCESSIBILITY is not set
 # CONFIG_INFINIBAND is not set
 # CONFIG_EDAC is not set
 # CONFIG_RTC_CLASS is not set
 # CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
@@ -810,12 +872,13 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
 # CONFIG_OCFS2_FS is not set
 CONFIG_DNOTIFY=y
@@ -845,6 +908,7 @@ CONFIG_INOTIFY_USER=y
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -864,6 +928,7 @@ CONFIG_TMPFS=y
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -874,14 +939,14 @@ CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 CONFIG_NFS_V4=y
-# CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
-# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -902,9 +967,9 @@ CONFIG_MSDOS_PARTITION=y
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
 # CONFIG_CRC_ITU_T is not set
 CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
@@ -929,9 +994,12 @@ CONFIG_FRAME_WARN=1024
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SHIRQ is not set
 CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
 CONFIG_SCHED_DEBUG=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
 # CONFIG_SLUB_DEBUG_ON is not set
 # CONFIG_SLUB_STATS is not set
 # CONFIG_DEBUG_RT_MUTEXES is not set
@@ -945,17 +1013,37 @@ CONFIG_SCHED_DEBUG=y
 CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_VM is not set
 # CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
 # CONFIG_DEBUG_LIST is not set
 # CONFIG_DEBUG_SG is not set
 # CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
 # CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
 # CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_DEBUGGER is not set
+# CONFIG_CODE_PATCHING_SELFTEST is not set
+# CONFIG_FTR_FIXUP_SELFTEST is not set
+# CONFIG_MSI_BITMAP_SELFTEST is not set
+# CONFIG_XMON is not set
 # CONFIG_IRQSTACKS is not set
 # CONFIG_BDI_SWITCH is not set
 # CONFIG_BOOTX_TEXT is not set
@@ -966,14 +1054,19 @@ CONFIG_DEBUG_INFO=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
 
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_NULL is not set
@@ -1012,6 +1105,10 @@ CONFIG_CRYPTO_CBC=y
 # CONFIG_CRYPTO_MD4 is not set
 CONFIG_CRYPTO_MD5=y
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
 # CONFIG_CRYPTO_SHA1 is not set
 # CONFIG_CRYPTO_SHA256 is not set
 # CONFIG_CRYPTO_SHA512 is not set
@@ -1042,6 +1139,11 @@ CONFIG_CRYPTO_DES=y
 #
 # CONFIG_CRYPTO_DEFLATE is not set
 # CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 CONFIG_CRYPTO_HW=y
 # CONFIG_CRYPTO_DEV_HIFN_795X is not set
 CONFIG_PPC_CLOCK=y
index 8c7ba7c6ba49241c0484e940dccb1e98da96a97e..3c0d4e561726d98ce441f1f440b97ccc1d148c3f 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.25
-# Tue Apr 29 07:12:22 2008
+# Linux kernel version: 2.6.28-rc4
+# Thu Nov 13 02:11:02 2008
 #
 # CONFIG_PPC64 is not set
 
@@ -22,7 +22,7 @@ CONFIG_PPC_STD_MMU_32=y
 # CONFIG_SMP is not set
 CONFIG_PPC32=y
 CONFIG_WORD_SIZE=32
-CONFIG_PPC_MERGE=y
+# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
 CONFIG_MMU=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_TIME=y
@@ -32,6 +32,7 @@ CONFIG_GENERIC_HARDIRQS=y
 # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
 CONFIG_IRQ_PER_CPU=y
 CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_ARCH_HAS_ILOG2_U32=y
@@ -102,6 +103,7 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLUB_DEBUG=y
 # CONFIG_SLAB is not set
@@ -110,9 +112,13 @@ CONFIG_SLUB=y
 # CONFIG_PROFILING is not set
 # CONFIG_MARKERS is not set
 CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
+CONFIG_HAVE_IOREMAP_PROT=y
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
-CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+CONFIG_HAVE_CLK=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
@@ -123,6 +129,7 @@ CONFIG_BLOCK=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
 # CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
 
 #
 # IO Schedulers
@@ -137,19 +144,16 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Platform support
 #
 CONFIG_PPC_MULTIPLATFORM=y
-# CONFIG_PPC_82xx is not set
-# CONFIG_PPC_83xx is not set
-# CONFIG_PPC_86xx is not set
 CONFIG_CLASSIC32=y
 # CONFIG_PPC_CHRP is not set
-# CONFIG_PPC_MPC512x is not set
-# CONFIG_PPC_MPC5121 is not set
 # CONFIG_MPC5121_ADS is not set
+# CONFIG_MPC5121_GENERIC is not set
 CONFIG_PPC_MPC52xx=y
 CONFIG_PPC_MPC5200_SIMPLE=y
 # CONFIG_PPC_EFIKA is not set
@@ -159,7 +163,10 @@ CONFIG_PPC_MPC5200_SIMPLE=y
 # CONFIG_PPC_PMAC is not set
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PPC_82xx is not set
 # CONFIG_PQ2ADS is not set
+# CONFIG_PPC_83xx is not set
+# CONFIG_PPC_86xx is not set
 # CONFIG_EMBEDDED6xx is not set
 # CONFIG_IPIC is not set
 # CONFIG_MPIC is not set
@@ -183,7 +190,6 @@ CONFIG_PPC_BESTCOMM_FEC=y
 # Kernel options
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_TICK_ONESHOT is not set
 # CONFIG_NO_HZ is not set
 # CONFIG_HIGH_RES_TIMERS is not set
 CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -197,6 +203,8 @@ CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_IOMMU_HELPER is not set
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
@@ -211,19 +219,20 @@ CONFIG_FLATMEM_MANUAL=y
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_MIGRATION=y
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 CONFIG_FORCE_MAX_ZONEORDER=11
 CONFIG_PROC_DEVICETREE=y
 # CONFIG_CMDLINE_BOOL is not set
+CONFIG_EXTRA_TARGETS=""
 CONFIG_PM=y
-# CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
 CONFIG_SECCOMP=y
 CONFIG_ISA_DMA_API=y
@@ -233,7 +242,7 @@ CONFIG_ISA_DMA_API=y
 #
 CONFIG_ZONE_DMA=y
 CONFIG_GENERIC_ISA_DMA=y
-CONFIG_FSL_SOC=y
+CONFIG_PPC_PCI_CHOICE=y
 # CONFIG_PCI is not set
 # CONFIG_PCI_DOMAINS is not set
 # CONFIG_PCI_SYSCALL is not set
@@ -254,10 +263,6 @@ CONFIG_PAGE_OFFSET=0xc0000000
 CONFIG_KERNEL_START=0xc0000000
 CONFIG_PHYSICAL_START=0x00000000
 CONFIG_TASK_SIZE=0xc0000000
-
-#
-# Networking
-#
 CONFIG_NET=y
 
 #
@@ -308,6 +313,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
@@ -328,14 +334,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-# CONFIG_WIRELESS_EXT is not set
-# CONFIG_MAC80211 is not set
-# CONFIG_IEEE80211 is not set
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -445,9 +445,12 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
 # CONFIG_BLK_DEV_XIP is not set
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
+# CONFIG_BLK_DEV_HD is not set
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ICS932S401 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
@@ -490,10 +493,10 @@ CONFIG_CHR_DEV_SG=y
 CONFIG_SCSI_LOWLEVEL=y
 # CONFIG_ISCSI_TCP is not set
 # CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_DH is not set
 CONFIG_ATA=y
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_SATA_PMP=y
-# CONFIG_SATA_FSL is not set
 CONFIG_ATA_SFF=y
 # CONFIG_SATA_MV is not set
 CONFIG_PATA_MPC52xx=y
@@ -501,7 +504,6 @@ CONFIG_PATA_MPC52xx=y
 # CONFIG_MD is not set
 # CONFIG_MACINTOSH_DRIVERS is not set
 CONFIG_NETDEVICES=y
-# CONFIG_NETDEVICES_MULTIQUEUE is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_MACVLAN is not set
@@ -531,6 +533,9 @@ CONFIG_MII=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_B44 is not set
 CONFIG_FEC_MPC52xx=y
 CONFIG_FEC_MPC52xx_MDIO=y
@@ -542,7 +547,6 @@ CONFIG_FEC_MPC52xx_MDIO=y
 #
 # CONFIG_WLAN_PRE80211 is not set
 # CONFIG_WLAN_80211 is not set
-# CONFIG_IWLWIFI is not set
 # CONFIG_IWLWIFI_LEDS is not set
 # CONFIG_WAN is not set
 # CONFIG_PPP is not set
@@ -568,6 +572,7 @@ CONFIG_FEC_MPC52xx_MDIO=y
 # Character devices
 #
 # CONFIG_VT is not set
+CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -596,24 +601,39 @@ CONFIG_LEGACY_PTY_COUNT=256
 CONFIG_I2C=y
 CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
 
 #
 # I2C Hardware Bus support
 #
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
 CONFIG_I2C_MPC=y
 # CONFIG_I2C_OCORES is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_TAOS_EVM is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
 # CONFIG_I2C_PCA_PLATFORM is not set
 
 #
 # Miscellaneous I2C Chip support
 #
 # CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
 CONFIG_SENSORS_EEPROM=y
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
 # CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_MAX6875 is not set
 # CONFIG_SENSORS_TSL2550 is not set
@@ -622,10 +642,13 @@ CONFIG_SENSORS_EEPROM=y
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
 # CONFIG_SPI is not set
+CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+# CONFIG_GPIOLIB is not set
 # CONFIG_W1 is not set
 # CONFIG_POWER_SUPPLY is not set
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_AD7414 is not set
 # CONFIG_SENSORS_AD7418 is not set
 # CONFIG_SENSORS_ADM1021 is not set
 # CONFIG_SENSORS_ADM1025 is not set
@@ -633,6 +656,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_ADM1029 is not set
 # CONFIG_SENSORS_ADM1031 is not set
 # CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7462 is not set
 # CONFIG_SENSORS_ADT7470 is not set
 # CONFIG_SENSORS_ADT7473 is not set
 # CONFIG_SENSORS_ATXP1 is not set
@@ -675,6 +699,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_W83627EHF is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
 # CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
 CONFIG_WATCHDOG=y
 # CONFIG_WATCHDOG_NOWAYOUT is not set
 
@@ -683,24 +708,39 @@ CONFIG_WATCHDOG=y
 #
 # CONFIG_SOFT_WATCHDOG is not set
 # CONFIG_MPC5200_WDT is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
 # Multifunction device drivers
 #
+# CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
 #
+
+#
+# Multimedia core support
+#
 # CONFIG_VIDEO_DEV is not set
 # CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
 CONFIG_DAB=y
 
 #
@@ -715,10 +755,6 @@ CONFIG_DAB=y
 # Display device support
 #
 # CONFIG_DISPLAY_SUPPORT is not set
-
-#
-# Sound
-#
 # CONFIG_SOUND is not set
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_MMC is not set
@@ -729,6 +765,7 @@ CONFIG_LEDS_CLASS=y
 #
 # LED drivers
 #
+# CONFIG_LEDS_PCA955X is not set
 
 #
 # LED Triggers
@@ -736,7 +773,9 @@ CONFIG_LEDS_CLASS=y
 CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=y
 # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
 # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
+# CONFIG_ACCESSIBILITY is not set
 # CONFIG_EDAC is not set
 CONFIG_RTC_LIB=y
 CONFIG_RTC_CLASS=y
@@ -767,6 +806,8 @@ CONFIG_RTC_DRV_DS1307=y
 # CONFIG_RTC_DRV_PCF8583 is not set
 # CONFIG_RTC_DRV_M41T80 is not set
 # CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
 
 #
 # SPI RTC drivers
@@ -776,19 +817,25 @@ CONFIG_RTC_DRV_DS1307=y
 # Platform RTC drivers
 #
 # CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
 # CONFIG_RTC_DRV_DS1511 is not set
 # CONFIG_RTC_DRV_DS1553 is not set
 # CONFIG_RTC_DRV_DS1742 is not set
 # CONFIG_RTC_DRV_STK17TA8 is not set
 # CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
 # CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
 # CONFIG_RTC_DRV_V3020 is not set
 
 #
 # on-CPU RTC drivers
 #
+# CONFIG_RTC_DRV_PPC is not set
 # CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
@@ -800,12 +847,13 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
 # CONFIG_OCFS2_FS is not set
 CONFIG_DNOTIFY=y
@@ -838,6 +886,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -868,6 +917,7 @@ CONFIG_JFFS2_RTIME=y
 CONFIG_CRAMFS=y
 # CONFIG_VXFS_FS is not set
 # CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -878,14 +928,14 @@ CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 CONFIG_NFS_V4=y
-# CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
-# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -961,9 +1011,9 @@ CONFIG_NLS_ISO8859_1=y
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
 # CONFIG_CRC_ITU_T is not set
 CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
@@ -990,9 +1040,12 @@ CONFIG_FRAME_WARN=1024
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SHIRQ is not set
 CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
 CONFIG_SCHED_DEBUG=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
 # CONFIG_SLUB_DEBUG_ON is not set
 # CONFIG_SLUB_STATS is not set
 # CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1006,16 +1059,37 @@ CONFIG_SCHED_DEBUG=y
 CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_VM is not set
 # CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
 # CONFIG_DEBUG_LIST is not set
 # CONFIG_DEBUG_SG is not set
 # CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
 # CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
 # CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_DEBUGGER is not set
+# CONFIG_CODE_PATCHING_SELFTEST is not set
+# CONFIG_FTR_FIXUP_SELFTEST is not set
+# CONFIG_MSI_BITMAP_SELFTEST is not set
+# CONFIG_XMON is not set
 # CONFIG_IRQSTACKS is not set
 # CONFIG_BDI_SWITCH is not set
 # CONFIG_BOOTX_TEXT is not set
@@ -1026,14 +1100,19 @@ CONFIG_DEBUG_INFO=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
 
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_NULL is not set
@@ -1071,6 +1150,10 @@ CONFIG_CRYPTO_PCBC=y
 # CONFIG_CRYPTO_MD4 is not set
 CONFIG_CRYPTO_MD5=y
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
 # CONFIG_CRYPTO_SHA1 is not set
 # CONFIG_CRYPTO_SHA256 is not set
 # CONFIG_CRYPTO_SHA512 is not set
@@ -1101,6 +1184,11 @@ CONFIG_CRYPTO_DES=y
 #
 # CONFIG_CRYPTO_DEFLATE is not set
 # CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 CONFIG_CRYPTO_HW=y
 CONFIG_PPC_CLOCK=y
 CONFIG_PPC_LIB_RHEAP=y
index 9c0caa488b2e29c1fd214b001dc66c1fe72be212..9d0207783d60ee9ef11ad1d83d2728d229caa7e0 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.25
-# Tue Apr 29 07:13:19 2008
+# Linux kernel version: 2.6.28-rc4
+# Thu Nov 13 02:13:16 2008
 #
 # CONFIG_PPC64 is not set
 
@@ -22,7 +22,7 @@ CONFIG_PPC_STD_MMU_32=y
 # CONFIG_SMP is not set
 CONFIG_PPC32=y
 CONFIG_WORD_SIZE=32
-CONFIG_PPC_MERGE=y
+# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
 CONFIG_MMU=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_TIME=y
@@ -32,6 +32,7 @@ CONFIG_GENERIC_HARDIRQS=y
 # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
 CONFIG_IRQ_PER_CPU=y
 CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_ARCH_HAS_ILOG2_U32=y
@@ -104,7 +105,9 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 # CONFIG_VM_EVENT_COUNTERS is not set
+CONFIG_PCI_QUIRKS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
@@ -112,24 +115,30 @@ CONFIG_SLAB=y
 # CONFIG_MARKERS is not set
 CONFIG_HAVE_OPROFILE=y
 # CONFIG_KPROBES is not set
+CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
+CONFIG_HAVE_IOREMAP_PROT=y
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
-CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+CONFIG_HAVE_CLK=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
-# CONFIG_KMOD is not set
+CONFIG_KMOD=y
 CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
 # CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
 
 #
 # IO Schedulers
@@ -144,19 +153,16 @@ CONFIG_IOSCHED_NOOP=y
 CONFIG_DEFAULT_NOOP=y
 CONFIG_DEFAULT_IOSCHED="noop"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Platform support
 #
 CONFIG_PPC_MULTIPLATFORM=y
-# CONFIG_PPC_82xx is not set
-# CONFIG_PPC_83xx is not set
-# CONFIG_PPC_86xx is not set
 CONFIG_CLASSIC32=y
 # CONFIG_PPC_CHRP is not set
-# CONFIG_PPC_MPC512x is not set
-# CONFIG_PPC_MPC5121 is not set
 # CONFIG_MPC5121_ADS is not set
+# CONFIG_MPC5121_GENERIC is not set
 CONFIG_PPC_MPC52xx=y
 CONFIG_PPC_MPC5200_SIMPLE=y
 # CONFIG_PPC_EFIKA is not set
@@ -166,7 +172,10 @@ CONFIG_PPC_MPC5200_SIMPLE=y
 # CONFIG_PPC_PMAC is not set
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PPC_82xx is not set
 # CONFIG_PQ2ADS is not set
+# CONFIG_PPC_83xx is not set
+# CONFIG_PPC_86xx is not set
 # CONFIG_EMBEDDED6xx is not set
 # CONFIG_IPIC is not set
 # CONFIG_MPIC is not set
@@ -199,12 +208,14 @@ CONFIG_HZ_100=y
 # CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=100
-# CONFIG_SCHED_HRTICK is not set
+CONFIG_SCHED_HRTICK=y
 # CONFIG_PREEMPT_NONE is not set
 # CONFIG_PREEMPT_VOLUNTARY is not set
 CONFIG_PREEMPT=y
 # CONFIG_PREEMPT_RCU is not set
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_IOMMU_HELPER is not set
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
@@ -219,17 +230,19 @@ CONFIG_FLATMEM_MANUAL=y
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_MIGRATION=y
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 CONFIG_FORCE_MAX_ZONEORDER=11
 CONFIG_PROC_DEVICETREE=y
 # CONFIG_CMDLINE_BOOL is not set
+CONFIG_EXTRA_TARGETS=""
 # CONFIG_PM is not set
 # CONFIG_SECCOMP is not set
 CONFIG_ISA_DMA_API=y
@@ -240,7 +253,7 @@ CONFIG_ISA_DMA_API=y
 CONFIG_ZONE_DMA=y
 CONFIG_GENERIC_ISA_DMA=y
 # CONFIG_PPC_INDIRECT_PCI is not set
-CONFIG_FSL_SOC=y
+CONFIG_PPC_PCI_CHOICE=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_SYSCALL=y
@@ -265,10 +278,6 @@ CONFIG_PAGE_OFFSET=0xc0000000
 CONFIG_KERNEL_START=0xc0000000
 CONFIG_PHYSICAL_START=0x00000000
 CONFIG_TASK_SIZE=0xc0000000
-
-#
-# Networking
-#
 CONFIG_NET=y
 
 #
@@ -313,6 +322,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
@@ -333,14 +343,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-# CONFIG_WIRELESS_EXT is not set
-# CONFIG_MAC80211 is not set
-# CONFIG_IEEE80211 is not set
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -484,12 +488,12 @@ CONFIG_SCSI_WAIT_SCAN=m
 # CONFIG_SCSI_SAS_LIBSAS is not set
 # CONFIG_SCSI_SRP_ATTRS is not set
 # CONFIG_SCSI_LOWLEVEL is not set
+# CONFIG_SCSI_DH is not set
 CONFIG_ATA=m
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_SATA_PMP=y
 # CONFIG_SATA_AHCI is not set
 # CONFIG_SATA_SIL24 is not set
-# CONFIG_SATA_FSL is not set
 CONFIG_ATA_SFF=y
 # CONFIG_SATA_SVW is not set
 # CONFIG_ATA_PIIX is not set
@@ -545,18 +549,22 @@ CONFIG_PATA_MPC52xx=m
 # CONFIG_PATA_VIA is not set
 # CONFIG_PATA_WINBOND is not set
 # CONFIG_PATA_PLATFORM is not set
+# CONFIG_PATA_SCH is not set
 # CONFIG_MD is not set
 # CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
+
+#
+# Enable only one of the two stacks, unless you know what you are doing
+#
 # CONFIG_FIREWIRE is not set
 # CONFIG_IEEE1394 is not set
 # CONFIG_I2O is not set
 # CONFIG_MACINTOSH_DRIVERS is not set
 CONFIG_NETDEVICES=y
-# CONFIG_NETDEVICES_MULTIQUEUE is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_MACVLAN is not set
@@ -593,10 +601,14 @@ CONFIG_MII=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_NET_PCI is not set
 # CONFIG_B44 is not set
 CONFIG_FEC_MPC52xx=y
 CONFIG_FEC_MPC52xx_MDIO=y
+# CONFIG_ATL2 is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
 # CONFIG_TR is not set
@@ -606,7 +618,6 @@ CONFIG_FEC_MPC52xx_MDIO=y
 #
 # CONFIG_WLAN_PRE80211 is not set
 # CONFIG_WLAN_80211 is not set
-# CONFIG_IWLWIFI is not set
 # CONFIG_IWLWIFI_LEDS is not set
 
 #
@@ -644,6 +655,7 @@ CONFIG_FEC_MPC52xx_MDIO=y
 # Character devices
 #
 # CONFIG_VT is not set
+CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 # CONFIG_NOZOMI is not set
 
@@ -675,43 +687,64 @@ CONFIG_DEVPORT=y
 CONFIG_I2C=y
 CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
 
 #
 # I2C Hardware Bus support
 #
+
+#
+# PC SMBus host controller drivers
+#
 # CONFIG_I2C_ALI1535 is not set
 # CONFIG_I2C_ALI1563 is not set
 # CONFIG_I2C_ALI15X3 is not set
 # CONFIG_I2C_AMD756 is not set
 # CONFIG_I2C_AMD8111 is not set
 # CONFIG_I2C_I801 is not set
-# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_ISCH is not set
 # CONFIG_I2C_PIIX4 is not set
-CONFIG_I2C_MPC=y
 # CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_OCORES is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_PROSAVAGE is not set
-# CONFIG_I2C_SAVAGE4 is not set
-# CONFIG_I2C_SIMTEC is not set
 # CONFIG_I2C_SIS5595 is not set
 # CONFIG_I2C_SIS630 is not set
 # CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_TAOS_EVM is not set
-# CONFIG_I2C_STUB is not set
-# CONFIG_I2C_TINY_USB is not set
 # CONFIG_I2C_VIA is not set
 # CONFIG_I2C_VIAPRO is not set
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_MPC=y
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Graphics adapter I2C/DDC channel drivers
+#
 # CONFIG_I2C_VOODOO3 is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
 # CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
 
 #
 # Miscellaneous I2C Chip support
 #
 # CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
 CONFIG_SENSORS_EEPROM=m
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
 # CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_MAX6875 is not set
 # CONFIG_SENSORS_TSL2550 is not set
@@ -720,29 +753,47 @@ CONFIG_SENSORS_EEPROM=m
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
 # CONFIG_SPI is not set
+CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+# CONFIG_GPIOLIB is not set
 # CONFIG_W1 is not set
 # CONFIG_POWER_SUPPLY is not set
 # CONFIG_HWMON is not set
 # CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
 # Multifunction device drivers
 #
+# CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
 #
+
+#
+# Multimedia core support
+#
 # CONFIG_VIDEO_DEV is not set
 # CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
 # CONFIG_DAB is not set
 
 #
@@ -759,10 +810,6 @@ CONFIG_SSB_POSSIBLE=y
 # Display device support
 #
 # CONFIG_DISPLAY_SUPPORT is not set
-
-#
-# Sound
-#
 # CONFIG_SOUND is not set
 CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
@@ -781,12 +828,17 @@ CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_OTG is not set
 # CONFIG_USB_OTG_WHITELIST is not set
 # CONFIG_USB_OTG_BLACKLIST_HUB is not set
+# CONFIG_USB_MON is not set
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
 
 #
 # USB Host Controller Drivers
 #
+# CONFIG_USB_C67X00_HCD is not set
 # CONFIG_USB_EHCI_HCD is not set
 # CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_HCD is not set
 CONFIG_USB_OHCI_HCD=m
 # CONFIG_USB_OHCI_HCD_PPC_SOC is not set
 CONFIG_USB_OHCI_HCD_PPC_OF=y
@@ -799,12 +851,17 @@ CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
 # CONFIG_USB_UHCI_HCD is not set
 # CONFIG_USB_SL811_HCD is not set
 # CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_WHCI_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+# CONFIG_USB_MUSB_HDRC is not set
 
 #
 # USB Device Class drivers
 #
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
 
 #
 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -833,7 +890,6 @@ CONFIG_USB_STORAGE=m
 #
 # CONFIG_USB_MDC800 is not set
 # CONFIG_USB_MICROTEK is not set
-# CONFIG_USB_MON is not set
 
 #
 # USB port drivers
@@ -846,7 +902,7 @@ CONFIG_USB_STORAGE=m
 # CONFIG_USB_EMI62 is not set
 # CONFIG_USB_EMI26 is not set
 # CONFIG_USB_ADUTUX is not set
-# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_SEVSEG is not set
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
@@ -862,10 +918,14 @@ CONFIG_USB_STORAGE=m
 # CONFIG_USB_TRANCEVIBRATOR is not set
 # CONFIG_USB_IOWARRIOR is not set
 # CONFIG_USB_TEST is not set
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
 # CONFIG_USB_GADGET is not set
+# CONFIG_UWB is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
 # CONFIG_NEW_LEDS is not set
+# CONFIG_ACCESSIBILITY is not set
 # CONFIG_INFINIBAND is not set
 # CONFIG_EDAC is not set
 CONFIG_RTC_LIB=m
@@ -894,6 +954,8 @@ CONFIG_RTC_DRV_PCF8563=m
 # CONFIG_RTC_DRV_PCF8583 is not set
 # CONFIG_RTC_DRV_M41T80 is not set
 # CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
 
 #
 # SPI RTC drivers
@@ -903,19 +965,25 @@ CONFIG_RTC_DRV_PCF8563=m
 # Platform RTC drivers
 #
 # CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
 # CONFIG_RTC_DRV_DS1511 is not set
 # CONFIG_RTC_DRV_DS1553 is not set
 # CONFIG_RTC_DRV_DS1742 is not set
 # CONFIG_RTC_DRV_STK17TA8 is not set
 # CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
 # CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
 # CONFIG_RTC_DRV_V3020 is not set
 
 #
 # on-CPU RTC drivers
 #
+# CONFIG_RTC_DRV_PPC is not set
 # CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
@@ -927,12 +995,13 @@ CONFIG_EXT3_FS=m
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=m
 CONFIG_FS_MBCACHE=m
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_DNOTIFY is not set
@@ -964,6 +1033,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 # CONFIG_PROC_KCORE is not set
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -994,6 +1064,7 @@ CONFIG_JFFS2_RTIME=y
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -1004,13 +1075,13 @@ CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
-# CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
-# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -1070,9 +1141,9 @@ CONFIG_NLS_ISO8859_1=y
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
 # CONFIG_CRC_ITU_T is not set
 CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
@@ -1098,7 +1169,17 @@ CONFIG_FRAME_WARN=1024
 # CONFIG_HEADERS_CHECK is not set
 # CONFIG_DEBUG_KERNEL is not set
 # CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
 # CONFIG_IRQSTACKS is not set
 # CONFIG_BOOTX_TEXT is not set
 # CONFIG_PPC_EARLY_DEBUG is not set
@@ -1108,6 +1189,7 @@ CONFIG_FRAME_WARN=1024
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 # CONFIG_CRYPTO is not set
 CONFIG_PPC_CLOCK=y
index 7672bfba35664557630fe9aa9285ed25f529746d..bc190051e8d50d70b57463be5fee5cd0c46adb40 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.25
-# Tue Apr 29 07:12:39 2008
+# Linux kernel version: 2.6.28-rc4
+# Thu Nov 13 02:09:30 2008
 #
 # CONFIG_PPC64 is not set
 
@@ -22,7 +22,7 @@ CONFIG_PPC_STD_MMU_32=y
 # CONFIG_SMP is not set
 CONFIG_PPC32=y
 CONFIG_WORD_SIZE=32
-CONFIG_PPC_MERGE=y
+# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
 CONFIG_MMU=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_TIME=y
@@ -32,6 +32,7 @@ CONFIG_GENERIC_HARDIRQS=y
 # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
 CONFIG_IRQ_PER_CPU=y
 CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_ARCH_HAS_ILOG2_U32=y
@@ -102,6 +103,7 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLUB_DEBUG=y
 # CONFIG_SLAB is not set
@@ -110,14 +112,19 @@ CONFIG_SLUB=y
 # CONFIG_PROFILING is not set
 # CONFIG_MARKERS is not set
 CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
+CONFIG_HAVE_IOREMAP_PROT=y
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
-CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+CONFIG_HAVE_CLK=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
 CONFIG_MODVERSIONS=y
@@ -128,6 +135,7 @@ CONFIG_BLOCK=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
 # CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
 
 #
 # IO Schedulers
@@ -142,19 +150,16 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Platform support
 #
 CONFIG_PPC_MULTIPLATFORM=y
-# CONFIG_PPC_82xx is not set
-# CONFIG_PPC_83xx is not set
-# CONFIG_PPC_86xx is not set
 CONFIG_CLASSIC32=y
 # CONFIG_PPC_CHRP is not set
-# CONFIG_PPC_MPC512x is not set
-# CONFIG_PPC_MPC5121 is not set
 # CONFIG_MPC5121_ADS is not set
+# CONFIG_MPC5121_GENERIC is not set
 CONFIG_PPC_MPC52xx=y
 CONFIG_PPC_MPC5200_SIMPLE=y
 # CONFIG_PPC_EFIKA is not set
@@ -164,7 +169,10 @@ CONFIG_PPC_MPC5200_BUGFIX=y
 # CONFIG_PPC_PMAC is not set
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PPC_82xx is not set
 # CONFIG_PQ2ADS is not set
+# CONFIG_PPC_83xx is not set
+# CONFIG_PPC_86xx is not set
 # CONFIG_EMBEDDED6xx is not set
 # CONFIG_IPIC is not set
 # CONFIG_MPIC is not set
@@ -188,7 +196,6 @@ CONFIG_PPC_BESTCOMM_FEC=y
 # Kernel options
 #
 # CONFIG_HIGHMEM is not set
-# CONFIG_TICK_ONESHOT is not set
 # CONFIG_NO_HZ is not set
 # CONFIG_HIGH_RES_TIMERS is not set
 CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -202,6 +209,8 @@ CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_IOMMU_HELPER is not set
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
@@ -216,19 +225,20 @@ CONFIG_FLATMEM_MANUAL=y
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_MIGRATION=y
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 CONFIG_FORCE_MAX_ZONEORDER=11
 CONFIG_PROC_DEVICETREE=y
 # CONFIG_CMDLINE_BOOL is not set
+CONFIG_EXTRA_TARGETS=""
 CONFIG_PM=y
-# CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
 CONFIG_SECCOMP=y
 CONFIG_ISA_DMA_API=y
@@ -238,7 +248,7 @@ CONFIG_ISA_DMA_API=y
 #
 CONFIG_ZONE_DMA=y
 CONFIG_GENERIC_ISA_DMA=y
-CONFIG_FSL_SOC=y
+CONFIG_PPC_PCI_CHOICE=y
 # CONFIG_PCI is not set
 # CONFIG_PCI_DOMAINS is not set
 # CONFIG_PCI_SYSCALL is not set
@@ -259,10 +269,6 @@ CONFIG_PAGE_OFFSET=0xc0000000
 CONFIG_KERNEL_START=0xc0000000
 CONFIG_PHYSICAL_START=0x00000000
 CONFIG_TASK_SIZE=0xc0000000
-
-#
-# Networking
-#
 CONFIG_NET=y
 
 #
@@ -313,6 +319,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
@@ -333,14 +340,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-# CONFIG_WIRELESS_EXT is not set
-# CONFIG_MAC80211 is not set
-# CONFIG_IEEE80211 is not set
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -451,6 +452,7 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
 # CONFIG_BLK_DEV_XIP is not set
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
+# CONFIG_BLK_DEV_HD is not set
 # CONFIG_MISC_DEVICES is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
@@ -495,10 +497,10 @@ CONFIG_SCSI_WAIT_SCAN=m
 CONFIG_SCSI_LOWLEVEL=y
 # CONFIG_ISCSI_TCP is not set
 # CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_DH is not set
 CONFIG_ATA=y
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_SATA_PMP=y
-# CONFIG_SATA_FSL is not set
 CONFIG_ATA_SFF=y
 # CONFIG_SATA_MV is not set
 CONFIG_PATA_MPC52xx=y
@@ -507,7 +509,6 @@ CONFIG_PATA_PLATFORM=y
 # CONFIG_MD is not set
 # CONFIG_MACINTOSH_DRIVERS is not set
 CONFIG_NETDEVICES=y
-# CONFIG_NETDEVICES_MULTIQUEUE is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_MACVLAN is not set
@@ -537,6 +538,9 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_B44 is not set
 CONFIG_FEC_MPC52xx=y
 CONFIG_FEC_MPC52xx_MDIO=y
@@ -548,7 +552,6 @@ CONFIG_FEC_MPC52xx_MDIO=y
 #
 # CONFIG_WLAN_PRE80211 is not set
 # CONFIG_WLAN_80211 is not set
-# CONFIG_IWLWIFI is not set
 # CONFIG_IWLWIFI_LEDS is not set
 
 #
@@ -583,6 +586,7 @@ CONFIG_FEC_MPC52xx_MDIO=y
 # Character devices
 #
 # CONFIG_VT is not set
+CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -611,26 +615,41 @@ CONFIG_LEGACY_PTY_COUNT=256
 CONFIG_I2C=y
 CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
 
 #
 # I2C Hardware Bus support
 #
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
 CONFIG_I2C_MPC=y
 # CONFIG_I2C_OCORES is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_TAOS_EVM is not set
-# CONFIG_I2C_STUB is not set
 # CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
 # CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
 
 #
 # Miscellaneous I2C Chip support
 #
 # CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
 # CONFIG_SENSORS_EEPROM is not set
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
 # CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_MAX6875 is not set
 # CONFIG_SENSORS_TSL2550 is not set
@@ -639,10 +658,13 @@ CONFIG_I2C_MPC=y
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
 # CONFIG_SPI is not set
+CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+# CONFIG_GPIOLIB is not set
 # CONFIG_W1 is not set
 # CONFIG_POWER_SUPPLY is not set
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_AD7414 is not set
 # CONFIG_SENSORS_AD7418 is not set
 # CONFIG_SENSORS_ADM1021 is not set
 # CONFIG_SENSORS_ADM1025 is not set
@@ -650,6 +672,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_ADM1029 is not set
 # CONFIG_SENSORS_ADM1031 is not set
 # CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7462 is not set
 # CONFIG_SENSORS_ADT7470 is not set
 # CONFIG_SENSORS_ADT7473 is not set
 # CONFIG_SENSORS_ATXP1 is not set
@@ -692,6 +715,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_W83627EHF is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
 # CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
 CONFIG_WATCHDOG=y
 # CONFIG_WATCHDOG_NOWAYOUT is not set
 
@@ -705,24 +729,39 @@ CONFIG_WATCHDOG=y
 # USB-based Watchdog Cards
 #
 # CONFIG_USBPCWATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
 # Multifunction device drivers
 #
+# CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
 #
+
+#
+# Multimedia core support
+#
 # CONFIG_VIDEO_DEV is not set
 # CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
 # CONFIG_DAB is not set
 
 #
@@ -737,10 +776,6 @@ CONFIG_SSB_POSSIBLE=y
 # Display device support
 #
 # CONFIG_DISPLAY_SUPPORT is not set
-
-#
-# Sound
-#
 # CONFIG_SOUND is not set
 CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
@@ -760,11 +795,16 @@ CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_OTG is not set
 # CONFIG_USB_OTG_WHITELIST is not set
 # CONFIG_USB_OTG_BLACKLIST_HUB is not set
+CONFIG_USB_MON=y
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
 
 #
 # USB Host Controller Drivers
 #
+# CONFIG_USB_C67X00_HCD is not set
 # CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_HCD is not set
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_HCD_PPC_SOC=y
 CONFIG_USB_OHCI_HCD_PPC_OF=y
@@ -775,12 +815,16 @@ CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
 # CONFIG_USB_OHCI_LITTLE_ENDIAN is not set
 # CONFIG_USB_SL811_HCD is not set
 # CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+# CONFIG_USB_MUSB_HDRC is not set
 
 #
 # USB Device Class drivers
 #
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
 
 #
 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -809,7 +853,6 @@ CONFIG_USB_STORAGE=y
 #
 # CONFIG_USB_MDC800 is not set
 # CONFIG_USB_MICROTEK is not set
-CONFIG_USB_MON=y
 
 #
 # USB port drivers
@@ -822,7 +865,7 @@ CONFIG_USB_MON=y
 # CONFIG_USB_EMI62 is not set
 # CONFIG_USB_EMI26 is not set
 # CONFIG_USB_ADUTUX is not set
-# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_SEVSEG is not set
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
@@ -838,10 +881,13 @@ CONFIG_USB_MON=y
 # CONFIG_USB_TRANCEVIBRATOR is not set
 # CONFIG_USB_IOWARRIOR is not set
 # CONFIG_USB_TEST is not set
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
 # CONFIG_USB_GADGET is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
 # CONFIG_NEW_LEDS is not set
+# CONFIG_ACCESSIBILITY is not set
 # CONFIG_EDAC is not set
 CONFIG_RTC_LIB=y
 CONFIG_RTC_CLASS=y
@@ -872,6 +918,8 @@ CONFIG_RTC_DRV_DS1307=y
 # CONFIG_RTC_DRV_PCF8583 is not set
 # CONFIG_RTC_DRV_M41T80 is not set
 # CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
 
 #
 # SPI RTC drivers
@@ -881,19 +929,25 @@ CONFIG_RTC_DRV_DS1307=y
 # Platform RTC drivers
 #
 # CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
 # CONFIG_RTC_DRV_DS1511 is not set
 # CONFIG_RTC_DRV_DS1553 is not set
 # CONFIG_RTC_DRV_DS1742 is not set
 # CONFIG_RTC_DRV_STK17TA8 is not set
 # CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
 # CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
 # CONFIG_RTC_DRV_V3020 is not set
 
 #
 # on-CPU RTC drivers
 #
+# CONFIG_RTC_DRV_PPC is not set
 # CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
@@ -905,12 +959,13 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
 # CONFIG_OCFS2_FS is not set
 CONFIG_DNOTIFY=y
@@ -943,6 +998,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -973,6 +1029,7 @@ CONFIG_JFFS2_RTIME=y
 CONFIG_CRAMFS=y
 # CONFIG_VXFS_FS is not set
 # CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -983,14 +1040,14 @@ CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 CONFIG_NFS_V4=y
-# CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
-# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -1066,9 +1123,9 @@ CONFIG_NLS_ISO8859_1=y
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
 # CONFIG_CRC_ITU_T is not set
 CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
@@ -1095,9 +1152,12 @@ CONFIG_FRAME_WARN=1024
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SHIRQ is not set
 CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
 CONFIG_SCHED_DEBUG=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
 # CONFIG_SLUB_DEBUG_ON is not set
 # CONFIG_SLUB_STATS is not set
 # CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1111,17 +1171,37 @@ CONFIG_SCHED_DEBUG=y
 CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_VM is not set
 # CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
 # CONFIG_DEBUG_LIST is not set
 # CONFIG_DEBUG_SG is not set
 # CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
 # CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
 # CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_DEBUGGER is not set
+# CONFIG_CODE_PATCHING_SELFTEST is not set
+# CONFIG_FTR_FIXUP_SELFTEST is not set
+# CONFIG_MSI_BITMAP_SELFTEST is not set
+# CONFIG_XMON is not set
 # CONFIG_IRQSTACKS is not set
 # CONFIG_BDI_SWITCH is not set
 # CONFIG_BOOTX_TEXT is not set
@@ -1132,14 +1212,19 @@ CONFIG_DEBUG_INFO=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
 
 #
 # Crypto core or helper
 #
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_NULL is not set
@@ -1178,6 +1263,10 @@ CONFIG_CRYPTO_PCBC=y
 # CONFIG_CRYPTO_MD4 is not set
 CONFIG_CRYPTO_MD5=y
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
 # CONFIG_CRYPTO_SHA1 is not set
 # CONFIG_CRYPTO_SHA256 is not set
 # CONFIG_CRYPTO_SHA512 is not set
@@ -1208,6 +1297,11 @@ CONFIG_CRYPTO_DES=y
 #
 # CONFIG_CRYPTO_DEFLATE is not set
 # CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 CONFIG_CRYPTO_HW=y
 CONFIG_PPC_CLOCK=y
 CONFIG_PPC_LIB_RHEAP=y
index e55ff7c47a366878a63e3546835031f5098f34a5..07a674f5344e9f5cc876deb0ca63c3b9e45ebe14 100644 (file)
@@ -723,7 +723,7 @@ CONFIG_CICADA_PHY=y
 # CONFIG_BROADCOM_PHY is not set
 # CONFIG_ICPLUS_PHY is not set
 # CONFIG_REALTEK_PHY is not set
-# CONFIG_FIXED_PHY is not set
+CONFIG_FIXED_PHY=y
 # CONFIG_MDIO_BITBANG is not set
 # CONFIG_NET_ETHERNET is not set
 CONFIG_NETDEV_1000=y
index 2da13e00a807da950ea7812d77625ddd0177783a..07ccaf89f3793bf53006c0f8e2a011671e47766f 100644 (file)
@@ -838,7 +838,7 @@ CONFIG_PHYLIB=y
 #
 # MII PHY device drivers
 #
-CONFIG_MARVELL_PHY=y
+# CONFIG_MARVELL_PHY is not set
 # CONFIG_DAVICOM_PHY is not set
 # CONFIG_QSEMI_PHY is not set
 # CONFIG_LXT_PHY is not set
index 740c9f2b7de612b1c2cfd7e27d489d18436489f2..15c5604d0b26e6f44a9d4c6827a37fac8f83d85b 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.24-rc6
-# Fri Jan 18 14:19:54 2008
+# Linux kernel version: 2.6.28-rc4
+# Thu Nov 13 02:09:07 2008
 #
 # CONFIG_PPC64 is not set
 
@@ -22,14 +22,18 @@ CONFIG_PPC_STD_MMU_32=y
 # CONFIG_SMP is not set
 CONFIG_PPC32=y
 CONFIG_WORD_SIZE=32
-CONFIG_PPC_MERGE=y
+# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
 CONFIG_MMU=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_TIME=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_HARDIRQS=y
+# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
 CONFIG_IRQ_PER_CPU=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
@@ -47,7 +51,8 @@ CONFIG_OF=y
 # CONFIG_GENERIC_TBSYNC is not set
 CONFIG_AUDIT_ARCH=y
 CONFIG_GENERIC_BUG=y
-# CONFIG_DEFAULT_UIMAGE is not set
+CONFIG_DEFAULT_UIMAGE=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
 # CONFIG_PPC_DCR_NATIVE is not set
 # CONFIG_PPC_DCR_MMIO is not set
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -66,17 +71,15 @@ CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-# CONFIG_USER_NS is not set
-# CONFIG_PID_NS is not set
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_CGROUPS is not set
-CONFIG_FAIR_GROUP_SCHED=y
-CONFIG_FAIR_USER_SCHED=y
-# CONFIG_FAIR_CGROUP_SCHED is not set
+# CONFIG_GROUP_SCHED is not set
 CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
 # CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
@@ -88,32 +91,49 @@ CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_ANON_INODES=y
 # CONFIG_EPOLL is not set
 CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_PCI_QUIRKS=y
 CONFIG_SLUB_DEBUG=y
 # CONFIG_SLAB is not set
 CONFIG_SLUB=y
 # CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
+CONFIG_HAVE_IOREMAP_PROT=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+CONFIG_HAVE_CLK=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
-# CONFIG_KMOD is not set
+CONFIG_KMOD=y
 CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
 # CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
 
 #
 # IO Schedulers
@@ -127,29 +147,34 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_CFQ is not set
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_CLASSIC_RCU=y
+CONFIG_FREEZER=y
 
 #
 # Platform support
 #
 CONFIG_PPC_MULTIPLATFORM=y
-# CONFIG_PPC_82xx is not set
-# CONFIG_PPC_83xx is not set
-# CONFIG_PPC_86xx is not set
 CONFIG_CLASSIC32=y
 # CONFIG_PPC_CHRP is not set
+# CONFIG_MPC5121_ADS is not set
+# CONFIG_MPC5121_GENERIC is not set
 CONFIG_PPC_MPC52xx=y
-CONFIG_PPC_MPC5200=y
-CONFIG_PPC_MPC5200_BUGFIX=y
 CONFIG_PPC_MPC5200_SIMPLE=y
 CONFIG_PPC_EFIKA=y
 CONFIG_PPC_LITE5200=y
+CONFIG_PPC_MPC5200_BUGFIX=y
+# CONFIG_PPC_MPC5200_GPIO is not set
 # CONFIG_PPC_PMAC is not set
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PPC_82xx is not set
 # CONFIG_PQ2ADS is not set
+# CONFIG_PPC_83xx is not set
+# CONFIG_PPC_86xx is not set
 # CONFIG_EMBEDDED6xx is not set
 CONFIG_PPC_NATIVE=y
 # CONFIG_UDBG_RTAS_CONSOLE is not set
+# CONFIG_IPIC is not set
 # CONFIG_MPIC is not set
 # CONFIG_MPIC_WEIRD is not set
 # CONFIG_PPC_I8259 is not set
@@ -163,7 +188,6 @@ CONFIG_RTAS_PROC=y
 # CONFIG_GENERIC_IOMAP is not set
 # CONFIG_CPU_FREQ is not set
 # CONFIG_TAU is not set
-# CONFIG_CPM2 is not set
 # CONFIG_FSL_ULI1575 is not set
 CONFIG_PPC_BESTCOMM=y
 CONFIG_PPC_BESTCOMM_ATA=y
@@ -183,12 +207,18 @@ CONFIG_HZ_250=y
 # CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
+CONFIG_SCHED_HRTICK=y
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
+# CONFIG_IOMMU_HELPER is not set
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_HAS_WALK_MEMORY=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
 # CONFIG_KEXEC is not set
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_ARCH_POPULATES_NODE_MAP=y
@@ -198,26 +228,25 @@ CONFIG_FLATMEM_MANUAL=y
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_MIGRATION=y
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_FORCE_MAX_ZONEORDER=11
 CONFIG_PROC_DEVICETREE=y
 # CONFIG_CMDLINE_BOOL is not set
+CONFIG_EXTRA_TARGETS=""
 CONFIG_PM=y
-# CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
 CONFIG_PM_SLEEP=y
-CONFIG_SUSPEND_UP_POSSIBLE=y
 CONFIG_SUSPEND=y
-CONFIG_HIBERNATION_UP_POSSIBLE=y
-# CONFIG_HIBERNATION is not set
+CONFIG_SUSPEND_FREEZER=y
 CONFIG_SECCOMP=y
-CONFIG_WANT_DEVICE_TREE=y
-CONFIG_DEVICE_TREE=""
 CONFIG_ISA_DMA_API=y
 
 #
@@ -226,7 +255,7 @@ CONFIG_ISA_DMA_API=y
 CONFIG_ZONE_DMA=y
 CONFIG_GENERIC_ISA_DMA=y
 # CONFIG_PPC_INDIRECT_PCI is not set
-CONFIG_FSL_SOC=y
+CONFIG_PPC_PCI_CHOICE=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_SYSCALL=y
@@ -237,6 +266,7 @@ CONFIG_PCI_LEGACY=y
 # CONFIG_PCI_DEBUG is not set
 # CONFIG_PCCARD is not set
 # CONFIG_HOTPLUG_PCI is not set
+# CONFIG_HAS_RAPIDIO is not set
 
 #
 # Advanced setup
@@ -246,15 +276,11 @@ CONFIG_PCI_LEGACY=y
 #
 # Default settings for advanced configuration options are used
 #
-CONFIG_HIGHMEM_START=0xfe000000
 CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_PAGE_OFFSET=0xc0000000
 CONFIG_KERNEL_START=0xc0000000
+CONFIG_PHYSICAL_START=0x00000000
 CONFIG_TASK_SIZE=0xc0000000
-CONFIG_BOOT_LOAD=0x00800000
-
-#
-# Networking
-#
 CONFIG_NET=y
 
 #
@@ -267,6 +293,7 @@ CONFIG_XFRM=y
 CONFIG_XFRM_USER=m
 # CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -297,8 +324,6 @@ CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
 # CONFIG_IPV6 is not set
-# CONFIG_INET6_XFRM_TUNNEL is not set
-# CONFIG_INET6_TUNNEL is not set
 # CONFIG_NETWORK_SECMARK is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_IP_DCCP is not set
@@ -306,6 +331,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
@@ -322,17 +348,12 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 #
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-# CONFIG_WIRELESS_EXT is not set
-# CONFIG_MAC80211 is not set
-# CONFIG_IEEE80211 is not set
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -357,6 +378,8 @@ CONFIG_MTD_CONCAT=y
 CONFIG_MTD_PARTITIONS=y
 # CONFIG_MTD_REDBOOT_PARTS is not set
 CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_OF_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
 
 #
 # User Modules And Translation Layers
@@ -428,6 +451,7 @@ CONFIG_MTD_PHYSMAP_OF=y
 #
 # CONFIG_MTD_UBI is not set
 CONFIG_OF_DEVICE=y
+CONFIG_OF_I2C=y
 # CONFIG_PARPORT is not set
 CONFIG_BLK_DEV=y
 # CONFIG_BLK_DEV_FD is not set
@@ -444,14 +468,20 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=32768
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_BLK_DEV_XIP is not set
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
+# CONFIG_BLK_DEV_HD is not set
 CONFIG_MISC_DEVICES=y
 # CONFIG_PHANTOM is not set
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_SGI_IOC4 is not set
 # CONFIG_TIFM_CORE is not set
+# CONFIG_ICS932S401 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_HP_ILO is not set
+# CONFIG_C2PORT is not set
+CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
 #
@@ -516,6 +546,7 @@ CONFIG_SCSI_LOWLEVEL=y
 # CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_MVSAS is not set
 # CONFIG_SCSI_STEX is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
 # CONFIG_SCSI_IPR is not set
@@ -528,9 +559,13 @@ CONFIG_SCSI_LOWLEVEL=y
 # CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 # CONFIG_SCSI_SRP is not set
+# CONFIG_SCSI_DH is not set
 CONFIG_ATA=y
 # CONFIG_ATA_NONSTANDARD is not set
+CONFIG_SATA_PMP=y
 # CONFIG_SATA_AHCI is not set
+# CONFIG_SATA_SIL24 is not set
+CONFIG_ATA_SFF=y
 # CONFIG_SATA_SVW is not set
 # CONFIG_ATA_PIIX is not set
 # CONFIG_SATA_MV is not set
@@ -540,7 +575,6 @@ CONFIG_ATA=y
 # CONFIG_SATA_PROMISE is not set
 # CONFIG_SATA_SX4 is not set
 # CONFIG_SATA_SIL is not set
-# CONFIG_SATA_SIL24 is not set
 # CONFIG_SATA_SIS is not set
 # CONFIG_SATA_ULI is not set
 # CONFIG_SATA_VIA is not set
@@ -570,6 +604,7 @@ CONFIG_PATA_MPC52xx=y
 # CONFIG_PATA_MPIIX is not set
 # CONFIG_PATA_OLDPIIX is not set
 # CONFIG_PATA_NETCELL is not set
+# CONFIG_PATA_NINJA32 is not set
 # CONFIG_PATA_NS87410 is not set
 # CONFIG_PATA_NS87415 is not set
 # CONFIG_PATA_OPTI is not set
@@ -586,25 +621,28 @@ CONFIG_PATA_MPC52xx=y
 # CONFIG_PATA_WINBOND is not set
 CONFIG_PATA_PLATFORM=y
 # CONFIG_PATA_OF_PLATFORM is not set
+# CONFIG_PATA_SCH is not set
 # CONFIG_MD is not set
 # CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
+
+#
+# Enable only one of the two stacks, unless you know what you are doing
+#
 # CONFIG_FIREWIRE is not set
 # CONFIG_IEEE1394 is not set
 # CONFIG_I2O is not set
 # CONFIG_MACINTOSH_DRIVERS is not set
 CONFIG_NETDEVICES=y
-# CONFIG_NETDEVICES_MULTIQUEUE is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_MACVLAN is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
 # CONFIG_VETH is not set
-# CONFIG_IP1000 is not set
 # CONFIG_ARCNET is not set
 CONFIG_PHYLIB=y
 
@@ -620,6 +658,7 @@ CONFIG_PHYLIB=y
 # CONFIG_SMSC_PHY is not set
 # CONFIG_BROADCOM_PHY is not set
 # CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
 # CONFIG_FIXED_PHY is not set
 # CONFIG_MDIO_BITBANG is not set
 CONFIG_NET_ETHERNET=y
@@ -634,10 +673,14 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_NET_PCI is not set
 # CONFIG_B44 is not set
 CONFIG_FEC_MPC52xx=y
 CONFIG_FEC_MPC52xx_MDIO=y
+# CONFIG_ATL2 is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
 # CONFIG_TR is not set
@@ -647,6 +690,7 @@ CONFIG_FEC_MPC52xx_MDIO=y
 #
 # CONFIG_WLAN_PRE80211 is not set
 # CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
 
 #
 # USB Network Adapters
@@ -662,7 +706,6 @@ CONFIG_FEC_MPC52xx_MDIO=y
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 # CONFIG_NET_FC is not set
-# CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 # CONFIG_NETPOLL is not set
 # CONFIG_NET_POLL_CONTROLLER is not set
@@ -672,7 +715,30 @@ CONFIG_FEC_MPC52xx_MDIO=y
 #
 # Input device support
 #
-# CONFIG_INPUT is not set
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
 
 #
 # Hardware I/O ports
@@ -683,8 +749,14 @@ CONFIG_FEC_MPC52xx_MDIO=y
 #
 # Character devices
 #
-# CONFIG_VT is not set
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_NOZOMI is not set
 
 #
 # Serial drivers
@@ -718,16 +790,15 @@ CONFIG_DEVPORT=y
 CONFIG_I2C=y
 CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
+CONFIG_I2C_ALGOBIT=y
 
 #
-# I2C Algorithms
+# I2C Hardware Bus support
 #
-# CONFIG_I2C_ALGOBIT is not set
-# CONFIG_I2C_ALGOPCF is not set
-# CONFIG_I2C_ALGOPCA is not set
 
 #
-# I2C Hardware Bus support
+# PC SMBus host controller drivers
 #
 # CONFIG_I2C_ALI1535 is not set
 # CONFIG_I2C_ALI1563 is not set
@@ -735,52 +806,64 @@ CONFIG_I2C_CHARDEV=y
 # CONFIG_I2C_AMD756 is not set
 # CONFIG_I2C_AMD8111 is not set
 # CONFIG_I2C_I801 is not set
-# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_ISCH is not set
 # CONFIG_I2C_PIIX4 is not set
-CONFIG_I2C_MPC=y
 # CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_OCORES is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_PROSAVAGE is not set
-# CONFIG_I2C_SAVAGE4 is not set
-# CONFIG_I2C_SIMTEC is not set
 # CONFIG_I2C_SIS5595 is not set
 # CONFIG_I2C_SIS630 is not set
 # CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_TAOS_EVM is not set
-# CONFIG_I2C_STUB is not set
-# CONFIG_I2C_TINY_USB is not set
 # CONFIG_I2C_VIA is not set
 # CONFIG_I2C_VIAPRO is not set
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_MPC=y
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Graphics adapter I2C/DDC channel drivers
+#
 # CONFIG_I2C_VOODOO3 is not set
 
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
 #
 # Miscellaneous I2C Chip support
 #
-# CONFIG_SENSORS_DS1337 is not set
-# CONFIG_SENSORS_DS1374 is not set
 # CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
 # CONFIG_SENSORS_EEPROM is not set
 # CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
 # CONFIG_SENSORS_PCA9539 is not set
 # CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_SENSORS_M41T00 is not set
 # CONFIG_SENSORS_MAX6875 is not set
 # CONFIG_SENSORS_TSL2550 is not set
 # CONFIG_I2C_DEBUG_CORE is not set
 # CONFIG_I2C_DEBUG_ALGO is not set
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
 # CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
+CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+# CONFIG_GPIOLIB is not set
 # CONFIG_W1 is not set
 # CONFIG_POWER_SUPPLY is not set
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_AD7414 is not set
 # CONFIG_SENSORS_AD7418 is not set
 # CONFIG_SENSORS_ADM1021 is not set
 # CONFIG_SENSORS_ADM1025 is not set
@@ -788,7 +871,9 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_ADM1029 is not set
 # CONFIG_SENSORS_ADM1031 is not set
 # CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7462 is not set
 # CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
 # CONFIG_SENSORS_ATXP1 is not set
 # CONFIG_SENSORS_DS1621 is not set
 # CONFIG_SENSORS_I5K_AMB is not set
@@ -818,6 +903,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_SMSC47M1 is not set
 # CONFIG_SENSORS_SMSC47M192 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_ADS7828 is not set
 # CONFIG_SENSORS_THMC50 is not set
 # CONFIG_SENSORS_VIA686A is not set
 # CONFIG_SENSORS_VT1211 is not set
@@ -827,9 +913,12 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_W83792D is not set
 # CONFIG_SENSORS_W83793 is not set
 # CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83L786NG is not set
 # CONFIG_SENSORS_W83627HF is not set
 # CONFIG_SENSORS_W83627EHF is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
 CONFIG_WATCHDOG=y
 # CONFIG_WATCHDOG_NOWAYOUT is not set
 
@@ -837,6 +926,7 @@ CONFIG_WATCHDOG=y
 # Watchdog Device Drivers
 #
 # CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_ALIM7101_WDT is not set
 # CONFIG_MPC5200_WDT is not set
 # CONFIG_WATCHDOG_RTAS is not set
 
@@ -850,23 +940,39 @@ CONFIG_WATCHDOG=y
 # USB-based Watchdog Cards
 #
 # CONFIG_USBPCWATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
 # Multifunction device drivers
 #
+# CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
 #
+
+#
+# Multimedia core support
+#
 # CONFIG_VIDEO_DEV is not set
 # CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
 CONFIG_DAB=y
 # CONFIG_USB_DABUSB is not set
 
@@ -874,11 +980,78 @@ CONFIG_DAB=y
 # Graphics support
 #
 # CONFIG_AGP is not set
-# CONFIG_DRM is not set
+CONFIG_DRM=y
+# CONFIG_DRM_TDFX is not set
+# CONFIG_DRM_R128 is not set
+# CONFIG_DRM_RADEON is not set
+# CONFIG_DRM_MGA is not set
+# CONFIG_DRM_VIA is not set
+# CONFIG_DRM_SAVAGE is not set
 # CONFIG_VGASTATE is not set
-CONFIG_VIDEO_OUTPUT_CONTROL=m
-# CONFIG_FB is not set
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=y
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+CONFIG_FB_DDC=y
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+CONFIG_FB_MACMODES=y
+CONFIG_FB_BACKLIGHT=y
+CONFIG_FB_MODE_HELPERS=y
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_OF is not set
+# CONFIG_FB_CT65550 is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_VGA16 is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+CONFIG_FB_RADEON=y
+CONFIG_FB_RADEON_I2C=y
+CONFIG_FB_RADEON_BACKLIGHT=y
+# CONFIG_FB_RADEON_DEBUG is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_VIA is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_CARMINE is not set
+# CONFIG_FB_IBM_GXT4500 is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=m
+# CONFIG_LCD_ILI9320 is not set
+# CONFIG_LCD_PLATFORM is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_CORGI is not set
 
 #
 # Display device support
@@ -886,15 +1059,64 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
 # CONFIG_DISPLAY_SUPPORT is not set
 
 #
-# Sound
-#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
 # CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_HID_PID is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
+CONFIG_HID_A4TECH=y
+# CONFIG_HID_APPLE is not set
+CONFIG_HID_BELKIN=y
+CONFIG_HID_BRIGHT=y
+CONFIG_HID_CHERRY=y
+# CONFIG_HID_CHICONY is not set
+CONFIG_HID_CYPRESS=y
+CONFIG_HID_DELL=y
+CONFIG_HID_EZKEY=y
+# CONFIG_HID_GYRATION is not set
+# CONFIG_HID_LOGITECH is not set
+# CONFIG_HID_MICROSOFT is not set
+# CONFIG_HID_MONTEREY is not set
+# CONFIG_HID_PANTHERLORD is not set
+# CONFIG_HID_PETALYNX is not set
+# CONFIG_HID_SAMSUNG is not set
+# CONFIG_HID_SONY is not set
+# CONFIG_HID_SUNPLUS is not set
+# CONFIG_THRUSTMASTER_FF is not set
+# CONFIG_ZEROPLUS_FF is not set
 CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
 CONFIG_USB_ARCH_HAS_EHCI=y
 CONFIG_USB=y
 # CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
 
 #
 # Miscellaneous USB options
@@ -903,14 +1125,20 @@ CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_DEVICE_CLASS is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
 # CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_PERSIST is not set
 # CONFIG_USB_OTG is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+CONFIG_USB_MON=y
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
 
 #
 # USB Host Controller Drivers
 #
+# CONFIG_USB_C67X00_HCD is not set
 # CONFIG_USB_EHCI_HCD is not set
 # CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_HCD is not set
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_HCD_PPC_SOC=y
 CONFIG_USB_OHCI_HCD_PPC_OF=y
@@ -923,12 +1151,17 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
 # CONFIG_USB_UHCI_HCD is not set
 # CONFIG_USB_SL811_HCD is not set
 # CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_WHCI_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+# CONFIG_USB_MUSB_HDRC is not set
 
 #
 # USB Device Class drivers
 #
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
 
 #
 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -948,7 +1181,9 @@ CONFIG_USB_STORAGE=y
 # CONFIG_USB_STORAGE_SDDR55 is not set
 # CONFIG_USB_STORAGE_JUMPSHOT is not set
 # CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
 # CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
 # CONFIG_USB_LIBUSUAL is not set
 
 #
@@ -956,15 +1191,10 @@ CONFIG_USB_STORAGE=y
 #
 # CONFIG_USB_MDC800 is not set
 # CONFIG_USB_MICROTEK is not set
-CONFIG_USB_MON=y
 
 #
 # USB port drivers
 #
-
-#
-# USB Serial Converter support
-#
 # CONFIG_USB_SERIAL is not set
 
 #
@@ -973,7 +1203,7 @@ CONFIG_USB_MON=y
 # CONFIG_USB_EMI62 is not set
 # CONFIG_USB_EMI26 is not set
 # CONFIG_USB_ADUTUX is not set
-# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_SEVSEG is not set
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
@@ -989,18 +1219,14 @@ CONFIG_USB_MON=y
 # CONFIG_USB_TRANCEVIBRATOR is not set
 # CONFIG_USB_IOWARRIOR is not set
 # CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-
-#
-# USB Gadget Support
-#
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
 # CONFIG_USB_GADGET is not set
+# CONFIG_UWB is not set
 # CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
 CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
+# CONFIG_LEDS_CLASS is not set
 
 #
 # LED drivers
@@ -1009,17 +1235,15 @@ CONFIG_LEDS_CLASS=y
 #
 # LED Triggers
 #
-CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=y
-# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+# CONFIG_LEDS_TRIGGERS is not set
+# CONFIG_ACCESSIBILITY is not set
 # CONFIG_INFINIBAND is not set
 # CONFIG_EDAC is not set
 # CONFIG_RTC_CLASS is not set
-
-#
-# Userspace I/O
-#
+# CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
@@ -1031,21 +1255,19 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
-# CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
+CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_FUSE_FS is not set
@@ -1072,6 +1294,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -1101,8 +1324,11 @@ CONFIG_JFFS2_RTIME=y
 # CONFIG_JFFS2_RUBIN is not set
 CONFIG_CRAMFS=y
 # CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
 CONFIG_NETWORK_FILESYSTEMS=y
@@ -1110,15 +1336,14 @@ CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 CONFIG_NFS_V4=y
-# CONFIG_NFS_DIRECTIO is not set
-# CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
-# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -1173,7 +1398,6 @@ CONFIG_NLS_ISO8859_1=y
 # CONFIG_NLS_KOI8_U is not set
 # CONFIG_NLS_UTF8 is not set
 # CONFIG_DLM is not set
-# CONFIG_UCC_SLOW is not set
 
 #
 # Library routines
@@ -1181,6 +1405,7 @@ CONFIG_NLS_ISO8859_1=y
 CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
 # CONFIG_CRC_ITU_T is not set
 CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
@@ -1191,7 +1416,7 @@ CONFIG_PLIST=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
 CONFIG_HAS_DMA=y
-# CONFIG_INSTRUMENTATION is not set
+CONFIG_HAVE_LMB=y
 
 #
 # Kernel hacking
@@ -1199,6 +1424,7 @@ CONFIG_HAS_DMA=y
 CONFIG_PRINTK_TIME=y
 CONFIG_ENABLE_WARN_DEPRECATED=y
 CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_FS is not set
@@ -1206,10 +1432,14 @@ CONFIG_ENABLE_MUST_CHECK=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SHIRQ is not set
 CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
 CONFIG_SCHED_DEBUG=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
 # CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_SLUB_STATS is not set
 # CONFIG_DEBUG_RT_MUTEXES is not set
 # CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
@@ -1220,17 +1450,39 @@ CONFIG_SCHED_DEBUG=y
 # CONFIG_DEBUG_BUGVERBOSE is not set
 CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
 # CONFIG_DEBUG_LIST is not set
 # CONFIG_DEBUG_SG is not set
-CONFIG_FORCED_INLINING=y
 # CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
 # CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
 # CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_DEBUGGER is not set
+# CONFIG_CODE_PATCHING_SELFTEST is not set
+# CONFIG_FTR_FIXUP_SELFTEST is not set
+# CONFIG_MSI_BITMAP_SELFTEST is not set
+# CONFIG_XMON is not set
+# CONFIG_IRQSTACKS is not set
 # CONFIG_BDI_SWITCH is not set
 # CONFIG_BOOTX_TEXT is not set
 # CONFIG_PPC_EARLY_DEBUG is not set
@@ -1240,47 +1492,98 @@ CONFIG_FORCED_INLINING=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
 # CONFIG_CRYPTO_HMAC is not set
 # CONFIG_CRYPTO_XCBC is not set
-# CONFIG_CRYPTO_NULL is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
 # CONFIG_CRYPTO_MD4 is not set
 CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
 # CONFIG_CRYPTO_SHA1 is not set
 # CONFIG_CRYPTO_SHA256 is not set
 # CONFIG_CRYPTO_SHA512 is not set
-# CONFIG_CRYPTO_WP512 is not set
 # CONFIG_CRYPTO_TGR192 is not set
-# CONFIG_CRYPTO_GF128MUL is not set
-# CONFIG_CRYPTO_ECB is not set
-CONFIG_CRYPTO_CBC=y
-# CONFIG_CRYPTO_PCBC is not set
-# CONFIG_CRYPTO_LRW is not set
-# CONFIG_CRYPTO_XTS is not set
-# CONFIG_CRYPTO_CRYPTD is not set
-CONFIG_CRYPTO_DES=y
-# CONFIG_CRYPTO_FCRYPT is not set
-# CONFIG_CRYPTO_BLOWFISH is not set
-# CONFIG_CRYPTO_TWOFISH is not set
-# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
 # CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
 # CONFIG_CRYPTO_CAST5 is not set
 # CONFIG_CRYPTO_CAST6 is not set
-# CONFIG_CRYPTO_TEA is not set
-# CONFIG_CRYPTO_ARC4 is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
 # CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SALSA20 is not set
 # CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
 # CONFIG_CRYPTO_DEFLATE is not set
-# CONFIG_CRYPTO_MICHAEL_MIC is not set
-# CONFIG_CRYPTO_CRC32C is not set
-# CONFIG_CRYPTO_CAMELLIA is not set
-# CONFIG_CRYPTO_TEST is not set
-# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
 CONFIG_CRYPTO_HW=y
+# CONFIG_CRYPTO_DEV_HIFN_795X is not set
 CONFIG_PPC_CLOCK=y
 CONFIG_PPC_LIB_RHEAP=y
+# CONFIG_VIRTUALIZATION is not set
index 15eb30c9b3f99b6f076b0769f3ffad08edebf33c..d582014b0a38e8c49283bccdd12d6daad58c94b0 100644 (file)
@@ -682,7 +682,7 @@ CONFIG_VITESSE_PHY=y
 # CONFIG_BROADCOM_PHY is not set
 CONFIG_ICPLUS_PHY=y
 # CONFIG_REALTEK_PHY is not set
-# CONFIG_FIXED_PHY is not set
+CONFIG_FIXED_PHY=y
 # CONFIG_MDIO_BITBANG is not set
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
index c15c91deb2ab578758097325406f01b787124054..4256e2c4534b504c0e93e3ace230b1cdf7021e22 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.28-rc2
-# Tue Oct 28 08:56:44 2008
+# Linux kernel version: 2.6.28-rc4
+# Fri Nov 14 09:54:44 2008
 #
 # CONFIG_PPC64 is not set
 
@@ -500,15 +500,17 @@ CONFIG_BLK_DEV_RAM_SIZE=35000
 # CONFIG_BLK_DEV_XIP is not set
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
-# CONFIG_XILINX_SYSACE is not set
+CONFIG_XILINX_SYSACE=m
 # CONFIG_BLK_DEV_HD is not set
 CONFIG_MISC_DEVICES=y
 # CONFIG_PHANTOM is not set
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_SGI_IOC4 is not set
 # CONFIG_TIFM_CORE is not set
+# CONFIG_ICS932S401 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
 # CONFIG_HP_ILO is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
@@ -632,7 +634,13 @@ CONFIG_NETDEV_10000=y
 #
 # Hardware I/O ports
 #
-# CONFIG_SERIO is not set
+CONFIG_SERIO=m
+# CONFIG_SERIO_I8042 is not set
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_PCIPS2 is not set
+# CONFIG_SERIO_LIBPS2 is not set
+# CONFIG_SERIO_RAW is not set
+CONFIG_SERIO_XILINX_XPS_PS2=m
 # CONFIG_GAMEPORT is not set
 
 #
@@ -660,7 +668,8 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
 #
 # Non-8250 serial port support
 #
-# CONFIG_SERIAL_UARTLITE is not set
+CONFIG_SERIAL_UARTLITE=y
+CONFIG_SERIAL_UARTLITE_CONSOLE=y
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_SERIAL_JSM is not set
@@ -756,6 +765,11 @@ CONFIG_GPIOLIB=y
 # CONFIG_DEBUG_GPIO is not set
 # CONFIG_GPIO_SYSFS is not set
 
+#
+# Memory mapped GPIO expanders:
+#
+CONFIG_GPIO_XILINX=y
+
 #
 # I2C GPIO expanders:
 #
@@ -776,11 +790,11 @@ CONFIG_GPIOLIB=y
 # CONFIG_HWMON is not set
 CONFIG_THERMAL=y
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -792,6 +806,7 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_TMIO is not set
 # CONFIG_MFD_WM8400 is not set
 # CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -816,13 +831,65 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_DRM is not set
 # CONFIG_VGASTATE is not set
 CONFIG_VIDEO_OUTPUT_CONTROL=m
-# CONFIG_FB is not set
+CONFIG_FB=m
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=m
+CONFIG_FB_CFB_COPYAREA=m
+CONFIG_FB_CFB_IMAGEBLIT=m
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_VGA16 is not set
+# CONFIG_FB_UVESA is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_VIA is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_CARMINE is not set
+# CONFIG_FB_IBM_GXT4500 is not set
+CONFIG_FB_XILINX=m
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Display device support
 #
 # CONFIG_DISPLAY_SUPPORT is not set
+# CONFIG_LOGO is not set
 # CONFIG_SOUND is not set
 CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
@@ -851,6 +918,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
 # CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
@@ -1077,10 +1145,12 @@ CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_FAULT_INJECTION is not set
 # CONFIG_LATENCYTOP is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
-CONFIG_NOP_TRACER=y
-CONFIG_HAVE_FTRACE=y
-CONFIG_HAVE_DYNAMIC_FTRACE=y
-# CONFIG_FTRACE is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
 # CONFIG_SCHED_TRACER is not set
 # CONFIG_CONTEXT_SWITCH_TRACER is not set
 # CONFIG_BOOT_TRACER is not set
index 55edbd545b6130516fd93f752c96cdd9b1667636..cfc94cfcf4cb3ec27803eac80aa669fddc686064 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.28-rc2
-# Tue Oct 28 09:28:58 2008
+# Linux kernel version: 2.6.28-rc4
+# Fri Nov 14 10:06:19 2008
 #
 # CONFIG_PPC64 is not set
 
@@ -506,15 +506,17 @@ CONFIG_BLK_DEV_RAM_SIZE=35000
 # CONFIG_BLK_DEV_XIP is not set
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
-# CONFIG_XILINX_SYSACE is not set
+CONFIG_XILINX_SYSACE=m
 # CONFIG_BLK_DEV_HD is not set
 CONFIG_MISC_DEVICES=y
 # CONFIG_PHANTOM is not set
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_SGI_IOC4 is not set
 # CONFIG_TIFM_CORE is not set
+# CONFIG_ICS932S401 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
 # CONFIG_HP_ILO is not set
+# CONFIG_C2PORT is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
@@ -680,7 +682,13 @@ CONFIG_NETDEV_10000=y
 #
 # Hardware I/O ports
 #
-# CONFIG_SERIO is not set
+CONFIG_SERIO=m
+# CONFIG_SERIO_I8042 is not set
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_PCIPS2 is not set
+# CONFIG_SERIO_LIBPS2 is not set
+# CONFIG_SERIO_RAW is not set
+CONFIG_SERIO_XILINX_XPS_PS2=m
 # CONFIG_GAMEPORT is not set
 
 #
@@ -708,7 +716,8 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
 #
 # Non-8250 serial port support
 #
-# CONFIG_SERIAL_UARTLITE is not set
+CONFIG_SERIAL_UARTLITE=y
+CONFIG_SERIAL_UARTLITE_CONSOLE=y
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_SERIAL_JSM is not set
@@ -805,6 +814,11 @@ CONFIG_GPIOLIB=y
 # CONFIG_DEBUG_GPIO is not set
 # CONFIG_GPIO_SYSFS is not set
 
+#
+# Memory mapped GPIO expanders:
+#
+CONFIG_GPIO_XILINX=y
+
 #
 # I2C GPIO expanders:
 #
@@ -826,11 +840,11 @@ CONFIG_GPIOLIB=y
 # CONFIG_THERMAL is not set
 # CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -842,6 +856,7 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_TMIO is not set
 # CONFIG_MFD_WM8400 is not set
 # CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -866,13 +881,65 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_DRM is not set
 # CONFIG_VGASTATE is not set
 # CONFIG_VIDEO_OUTPUT_CONTROL is not set
-# CONFIG_FB is not set
+CONFIG_FB=m
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=m
+CONFIG_FB_CFB_COPYAREA=m
+CONFIG_FB_CFB_IMAGEBLIT=m
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_VGA16 is not set
+# CONFIG_FB_UVESA is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_VIA is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_CARMINE is not set
+# CONFIG_FB_IBM_GXT4500 is not set
+CONFIG_FB_XILINX=m
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Display device support
 #
 # CONFIG_DISPLAY_SUPPORT is not set
+# CONFIG_LOGO is not set
 # CONFIG_SOUND is not set
 CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
@@ -1002,6 +1069,7 @@ CONFIG_USB_STORAGE=m
 # CONFIG_DMADEVICES is not set
 # CONFIG_UIO is not set
 # CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
@@ -1227,10 +1295,12 @@ CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_FAULT_INJECTION is not set
 # CONFIG_LATENCYTOP is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
-CONFIG_NOP_TRACER=y
-CONFIG_HAVE_FTRACE=y
-CONFIG_HAVE_DYNAMIC_FTRACE=y
-# CONFIG_FTRACE is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
 # CONFIG_SCHED_TRACER is not set
 # CONFIG_CONTEXT_SWITCH_TRACER is not set
 # CONFIG_BOOT_TRACER is not set
index 8931ba729d2b519ec4d4efb1d0851301d96e1d3a..bb62ad876de32750c70cc7ecd91adcb9f0539d5a 100644 (file)
@@ -104,4 +104,6 @@ static inline void kvmppc_set_pid(struct kvm_vcpu *vcpu, u32 new_pid)
        }
 }
 
+extern void kvmppc_core_destroy_mmu(struct kvm_vcpu *vcpu);
+
 #endif /* __POWERPC_KVM_PPC_H__ */
index 5a441742ffba45434038716ae368aa516eccbdfe..68b752626808b673d4a0ca2f2264fe61e1af7894 100644 (file)
@@ -280,7 +280,6 @@ extern int hash_huge_page(struct mm_struct *mm, unsigned long access,
 extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
                             unsigned long pstart, unsigned long prot,
                             int psize, int ssize);
-extern void set_huge_psize(int psize);
 extern void add_gpage(unsigned long addr, unsigned long page_size,
                          unsigned long number_of_pages);
 extern void demote_segment_4k(struct mm_struct *mm, unsigned long addr);
index 280a90cc9894c6ed3f6a2e2611b9d53623218a2f..c9c678fb2538d9e4f1c17cb54476663d8305485b 100644 (file)
@@ -55,8 +55,6 @@ struct pt_regs {
 
 #ifdef __powerpc64__
 
-#define __ARCH_WANT_COMPAT_SYS_PTRACE
-
 #define STACK_FRAME_OVERHEAD   112     /* size of minimum stack frame */
 #define STACK_FRAME_LR_SAVE    2       /* Location of LR in stack frame */
 #define STACK_FRAME_REGS_MARKER        ASM_CONST(0x7265677368657265)
index 80cac984d85d06271a80d1d67cb02e08a057515c..10b4ab1008afe66914f4a5115868b4c2ef6cf038 100644 (file)
@@ -34,7 +34,13 @@ _GLOBAL(__setup_cpu_440grx)
        blr
 _GLOBAL(__setup_cpu_460ex)
 _GLOBAL(__setup_cpu_460gt)
-       b       __init_fpu_44x
+       mflr    r4
+       bl      __init_fpu_44x
+       bl      __fixup_440A_mcheck
+       mtlr    r4
+       blr
+
+_GLOBAL(__setup_cpu_440x5)
 _GLOBAL(__setup_cpu_440gx)
 _GLOBAL(__setup_cpu_440spe)
        b       __fixup_440A_mcheck
index b1eb834bc0fcd00ba563ca8d60287d912a9fdc80..7e8719504f39d65bf50e822289c602470f569713 100644 (file)
@@ -39,6 +39,7 @@ extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
+extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
@@ -1500,6 +1501,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
                .cpu_user_features      = COMMON_USER_BOOKE,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .cpu_setup              = __setup_cpu_440x5,
+               .machine_check          = machine_check_440A,
                .platform               = "ppc440",
        },
        { /* 460EX */
index 1562daf8839a95d62c75e58e7af7b156787845bf..3a6eaa876ee1169026837a52fcb119a95def9bd3 100644 (file)
@@ -75,6 +75,7 @@ static int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl,
        for_each_sg(sgl, sg, nents, i) {
                sg->dma_address = sg_phys(sg) + get_dma_direct_offset(dev);
                sg->dma_length = sg->length;
+               __dma_sync_page(sg_page(sg), sg->offset, sg->length, direction);
        }
 
        return nents;
index e6d52845854f8e1ea67d60f48332ff8206c9fa7e..e0bcf93542867d79e20c1d5951397813535545a2 100644 (file)
@@ -57,12 +57,18 @@ system_call_common:
        beq-    1f
        ld      r1,PACAKSAVE(r13)
 1:     std     r10,0(r1)
-       crclr   so
        std     r11,_NIP(r1)
        std     r12,_MSR(r1)
        std     r0,GPR0(r1)
        std     r10,GPR1(r1)
        ACCOUNT_CPU_USER_ENTRY(r10, r11)
+       /*
+        * This "crclr so" clears CR0.SO, which is the error indication on
+        * return from this system call.  There must be no cmp instruction
+        * between it and the "mfcr r9" below, otherwise if XER.SO is set,
+        * CR0.SO will get set, causing all system calls to appear to fail.
+        */
+       crclr   so
        std     r2,GPR2(r1)
        std     r3,GPR3(r1)
        std     r4,GPR4(r1)
index bdc8b0e860e5e1b25cc3dafe23455ec1a738812b..5c33bc14bd9fe161a75d7c12bc6809e77cba5a93 100644 (file)
@@ -479,17 +479,20 @@ _GLOBAL(_tlbil_pid)
  * (no broadcast)
  */
 _GLOBAL(_tlbil_va)
+       mfmsr   r10
+       wrteei  0
        slwi    r4,r4,16
        mtspr   SPRN_MAS6,r4            /* assume AS=0 for now */
        tlbsx   0,r3
        mfspr   r4,SPRN_MAS1            /* check valid */
        andis.  r3,r4,MAS1_VALID@h
-       beqlr
+       beq     1f
        rlwinm  r4,r4,0,1,31
        mtspr   SPRN_MAS1,r4
        tlbwe
        msync
        isync
+1:     wrtee   r10
        blr
 #endif /* CONFIG_FSL_BOOKE */
 
index bc1fb27368af4db2ff7627c5e1eb8ffa46a54013..a11d68976dc840fdf545120f94cda1c746a362c8 100644 (file)
@@ -250,8 +250,11 @@ int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq)
         * parsing
         */
        dn = pci_device_to_OF_node(pdev);
-       if (dn)
-               return of_irq_map_one(dn, 0, out_irq);
+       if (dn) {
+               rc = of_irq_map_one(dn, 0, out_irq);
+               if (!rc)
+                       return rc;
+       }
 
        /* Ok, we don't, time to have fun. Let's start by building up an
         * interrupt spec.  we assume #interrupt-cells is 1, which is standard
index 86a2ffccef2592066ece036093a4e0b73858f7da..20885a38237aa0ab5f028aa67537b365b340aad0 100644 (file)
@@ -717,9 +717,11 @@ static void unregister_cpu_online(unsigned int cpu)
 
        BUG_ON(!c->hotpluggable);
 
+#ifdef CONFIG_PPC64
        if (!firmware_has_feature(FW_FEATURE_ISERIES) &&
                        cpu_has_feature(CPU_FTR_SMT))
                sysdev_remove_file(s, &attr_smt_snooze_delay);
+#endif
 
        /* PMC stuff */
        switch (cur_cpu_spec->pmc_type) {
index 2e227a412bc240f2bc889b0c7c1fe2e17a7bdd8c..ad72c6f9811f62ed05695ca23221bd2d9b87f31a 100644 (file)
@@ -124,6 +124,14 @@ static void kvmppc_44x_shadow_release(struct kvm_vcpu *vcpu,
        }
 }
 
+void kvmppc_core_destroy_mmu(struct kvm_vcpu *vcpu)
+{
+       int i;
+
+       for (i = 0; i <= tlb_44x_hwater; i++)
+               kvmppc_44x_shadow_release(vcpu, i);
+}
+
 void kvmppc_tlbe_set_modified(struct kvm_vcpu *vcpu, unsigned int i)
 {
     vcpu->arch.shadow_tlb_mod[i] = 1;
index 90a6fc422b238ccbd38becc6d36546c0a7ca0cd0..fda9baada132b1c5348dfec8b84ba99d8bc24dc1 100644 (file)
@@ -238,6 +238,7 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
 
 void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu)
 {
+       kvmppc_core_destroy_mmu(vcpu);
 }
 
 /* Note: clearing MSR[DE] just means that the debug interrupt will not be
index 29b2941cada0b67ac5be0248c2a1321179bf19a6..45907c1dae66da343344b5e1cfe9c682afc409ff 100644 (file)
@@ -556,6 +556,7 @@ unsigned long rh_alloc_fixed(rh_info_t * info, unsigned long start, int size, co
                be = blk->start + blk->size;
                if (s >= bs && e <= be)
                        break;
+               blk = NULL;
        }
 
        if (blk == NULL)
index cecbbc76f62425da81edc80529e4a65164d42435..29954dc28942ff8408c940402f9cac7a72b7ebd3 100644 (file)
@@ -93,7 +93,7 @@ void __init MMU_init_hw(void)
 
 unsigned long __init mmu_mapin_ram(void)
 {
-       unsigned long v, s;
+       unsigned long v, s, mapped;
        phys_addr_t p;
 
        v = KERNELBASE;
@@ -130,5 +130,17 @@ unsigned long __init mmu_mapin_ram(void)
                s -= LARGE_PAGE_SIZE_4M;
        }
 
-       return total_lowmem - s;
+       mapped = total_lowmem - s;
+
+       /* If the size of RAM is not an exact power of two, we may not
+        * have covered RAM in its entirety with 16 and 4 MiB
+        * pages. Consequently, restrict the top end of RAM currently
+        * allocable so that calls to the LMB to allocate PTEs for "tail"
+        * coverage with normal-sized pages (or other reasons) do not
+        * attempt to allocate outside the allowed range.
+        */
+
+       __initial_memory_limit_addr = memstart_addr + mapped;
+
+       return mapped;
 }
index a117024ab8cdb68af98c8bfc13f822695dc4c2bf..f0c3b88d50fa5a5f98847bd1914be1881885af9d 100644 (file)
@@ -507,6 +507,9 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
 {
        struct hstate *hstate = hstate_file(file);
        int mmu_psize = shift_to_mmu_psize(huge_page_shift(hstate));
+
+       if (!mmu_huge_psizes[mmu_psize])
+               return -EINVAL;
        return slice_get_unmapped_area(addr, len, flags, mmu_psize, 1, 0);
 }
 
@@ -677,7 +680,7 @@ repeat:
        return err;
 }
 
-void set_huge_psize(int psize)
+static void __init set_huge_psize(int psize)
 {
        /* Check that it is a page size supported by the hardware and
         * that it fits within pagetable limits. */
index eb505ad34a857421b2deb85bbedd7b4c6ba99777..cf81049e1e51a0ce98d0ebdf9b7a74d5901de211 100644 (file)
@@ -865,10 +865,77 @@ static struct notifier_block __cpuinitdata ppc64_numa_nb = {
        .priority = 1 /* Must run before sched domains notifier. */
 };
 
+static void mark_reserved_regions_for_nid(int nid)
+{
+       struct pglist_data *node = NODE_DATA(nid);
+       int i;
+
+       for (i = 0; i < lmb.reserved.cnt; i++) {
+               unsigned long physbase = lmb.reserved.region[i].base;
+               unsigned long size = lmb.reserved.region[i].size;
+               unsigned long start_pfn = physbase >> PAGE_SHIFT;
+               unsigned long end_pfn = ((physbase + size) >> PAGE_SHIFT);
+               struct node_active_region node_ar;
+               unsigned long node_end_pfn = node->node_start_pfn +
+                                            node->node_spanned_pages;
+
+               /*
+                * Check to make sure that this lmb.reserved area is
+                * within the bounds of the node that we care about.
+                * Checking the nid of the start and end points is not
+                * sufficient because the reserved area could span the
+                * entire node.
+                */
+               if (end_pfn <= node->node_start_pfn ||
+                   start_pfn >= node_end_pfn)
+                       continue;
+
+               get_node_active_region(start_pfn, &node_ar);
+               while (start_pfn < end_pfn &&
+                       node_ar.start_pfn < node_ar.end_pfn) {
+                       unsigned long reserve_size = size;
+                       /*
+                        * if reserved region extends past active region
+                        * then trim size to active region
+                        */
+                       if (end_pfn > node_ar.end_pfn)
+                               reserve_size = (node_ar.end_pfn << PAGE_SHIFT)
+                                       - (start_pfn << PAGE_SHIFT);
+                       /*
+                        * Only worry about *this* node, others may not
+                        * yet have valid NODE_DATA().
+                        */
+                       if (node_ar.nid == nid) {
+                               dbg("reserve_bootmem %lx %lx nid=%d\n",
+                                       physbase, reserve_size, node_ar.nid);
+                               reserve_bootmem_node(NODE_DATA(node_ar.nid),
+                                               physbase, reserve_size,
+                                               BOOTMEM_DEFAULT);
+                       }
+                       /*
+                        * if reserved region is contained in the active region
+                        * then done.
+                        */
+                       if (end_pfn <= node_ar.end_pfn)
+                               break;
+
+                       /*
+                        * reserved region extends past the active region
+                        *   get next active region that contains this
+                        *   reserved region
+                        */
+                       start_pfn = node_ar.end_pfn;
+                       physbase = start_pfn << PAGE_SHIFT;
+                       size = size - reserve_size;
+                       get_node_active_region(start_pfn, &node_ar);
+               }
+       }
+}
+
+
 void __init do_init_bootmem(void)
 {
        int nid;
-       unsigned int i;
 
        min_low_pfn = 0;
        max_low_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT;
@@ -890,7 +957,13 @@ void __init do_init_bootmem(void)
 
                get_pfn_range_for_nid(nid, &start_pfn, &end_pfn);
 
-               /* Allocate the node structure node local if possible */
+               /*
+                * Allocate the node structure node local if possible
+                *
+                * Be careful moving this around, as it relies on all
+                * previous nodes' bootmem to be initialized and have
+                * all reserved areas marked.
+                */
                NODE_DATA(nid) = careful_allocation(nid,
                                        sizeof(struct pglist_data),
                                        SMP_CACHE_BYTES, end_pfn);
@@ -922,53 +995,14 @@ void __init do_init_bootmem(void)
                                  start_pfn, end_pfn);
 
                free_bootmem_with_active_regions(nid, end_pfn);
-       }
-
-       /* Mark reserved regions */
-       for (i = 0; i < lmb.reserved.cnt; i++) {
-               unsigned long physbase = lmb.reserved.region[i].base;
-               unsigned long size = lmb.reserved.region[i].size;
-               unsigned long start_pfn = physbase >> PAGE_SHIFT;
-               unsigned long end_pfn = ((physbase + size) >> PAGE_SHIFT);
-               struct node_active_region node_ar;
-
-               get_node_active_region(start_pfn, &node_ar);
-               while (start_pfn < end_pfn &&
-                       node_ar.start_pfn < node_ar.end_pfn) {
-                       unsigned long reserve_size = size;
-                       /*
-                        * if reserved region extends past active region
-                        * then trim size to active region
-                        */
-                       if (end_pfn > node_ar.end_pfn)
-                               reserve_size = (node_ar.end_pfn << PAGE_SHIFT)
-                                       - (start_pfn << PAGE_SHIFT);
-                       dbg("reserve_bootmem %lx %lx nid=%d\n", physbase,
-                               reserve_size, node_ar.nid);
-                       reserve_bootmem_node(NODE_DATA(node_ar.nid), physbase,
-                                               reserve_size, BOOTMEM_DEFAULT);
-                       /*
-                        * if reserved region is contained in the active region
-                        * then done.
-                        */
-                       if (end_pfn <= node_ar.end_pfn)
-                               break;
-
-                       /*
-                        * reserved region extends past the active region
-                        *   get next active region that contains this
-                        *   reserved region
-                        */
-                       start_pfn = node_ar.end_pfn;
-                       physbase = start_pfn << PAGE_SHIFT;
-                       size = size - reserve_size;
-                       get_node_active_region(start_pfn, &node_ar);
-               }
-
-       }
-
-       for_each_online_node(nid)
+               /*
+                * Be very careful about moving this around.  Future
+                * calls to careful_allocation() depend on this getting
+                * done correctly.
+                */
+               mark_reserved_regions_for_nid(nid);
                sparse_memory_present_with_active_regions(nid);
+       }
 }
 
 void __init paging_init(void)
index 896548ba1ca12f4eb07c7984a8b1f7d01d232a4f..0ce45c2b42f8eb67a1ea5156fcf476bdb3f3924a 100644 (file)
@@ -95,6 +95,7 @@ static void axon_msi_cascade(unsigned int irq, struct irq_desc *desc)
        struct axon_msic *msic = get_irq_data(irq);
        u32 write_offset, msi;
        int idx;
+       int retry = 0;
 
        write_offset = dcr_read(msic->dcr_host, MSIC_WRITE_OFFSET_REG);
        pr_debug("axon_msi: original write_offset 0x%x\n", write_offset);
@@ -102,7 +103,7 @@ static void axon_msi_cascade(unsigned int irq, struct irq_desc *desc)
        /* write_offset doesn't wrap properly, so we have to mask it */
        write_offset &= MSIC_FIFO_SIZE_MASK;
 
-       while (msic->read_offset != write_offset) {
+       while (msic->read_offset != write_offset && retry < 100) {
                idx  = msic->read_offset / sizeof(__le32);
                msi  = le32_to_cpu(msic->fifo_virt[idx]);
                msi &= 0xFFFF;
@@ -110,13 +111,37 @@ static void axon_msi_cascade(unsigned int irq, struct irq_desc *desc)
                pr_debug("axon_msi: woff %x roff %x msi %x\n",
                          write_offset, msic->read_offset, msi);
 
+               if (msi < NR_IRQS && irq_map[msi].host == msic->irq_host) {
+                       generic_handle_irq(msi);
+                       msic->fifo_virt[idx] = cpu_to_le32(0xffffffff);
+               } else {
+                       /*
+                        * Reading the MSIC_WRITE_OFFSET_REG does not
+                        * reliably flush the outstanding DMA to the
+                        * FIFO buffer. Here we were reading stale
+                        * data, so we need to retry.
+                        */
+                       udelay(1);
+                       retry++;
+                       pr_debug("axon_msi: invalid irq 0x%x!\n", msi);
+                       continue;
+               }
+
+               if (retry) {
+                       pr_debug("axon_msi: late irq 0x%x, retry %d\n",
+                                msi, retry);
+                       retry = 0;
+               }
+
                msic->read_offset += MSIC_FIFO_ENTRY_SIZE;
                msic->read_offset &= MSIC_FIFO_SIZE_MASK;
+       }
 
-               if (msi < NR_IRQS && irq_map[msi].host == msic->irq_host)
-                       generic_handle_irq(msi);
-               else
-                       pr_debug("axon_msi: invalid irq 0x%x!\n", msi);
+       if (retry) {
+               printk(KERN_WARNING "axon_msi: irq timed out\n");
+
+               msic->read_offset += MSIC_FIFO_ENTRY_SIZE;
+               msic->read_offset &= MSIC_FIFO_SIZE_MASK;
        }
 
        desc->chip->eoi(irq);
@@ -364,6 +389,7 @@ static int axon_msi_probe(struct of_device *device,
                       dn->full_name);
                goto out_free_fifo;
        }
+       memset(msic->fifo_virt, 0xff, MSIC_FIFO_SIZE_BYTES);
 
        msic->irq_host = irq_alloc_host(dn, IRQ_HOST_MAP_NOMAP,
                                        NR_IRQS, &msic_host_ops, 0);
@@ -387,6 +413,9 @@ static int axon_msi_probe(struct of_device *device,
                        MSIC_CTRL_IRQ_ENABLE | MSIC_CTRL_ENABLE |
                        MSIC_CTRL_FIFO_SIZE);
 
+       msic->read_offset = dcr_read(msic->dcr_host, MSIC_WRITE_OFFSET_REG)
+                               & MSIC_FIFO_SIZE_MASK;
+
        device->dev.platform_data = msic;
 
        ppc_md.setup_msi_irqs = axon_msi_setup_msi_irqs;
index c0d86e1f56ea54d3eb6cb8ac70a3f71a19dc6df0..9046803c827670a273c5b43d13cee1367ffa16fe 100644 (file)
@@ -129,10 +129,15 @@ static int __init smp_iic_probe(void)
        return cpus_weight(cpu_possible_map);
 }
 
-static void __devinit smp_iic_setup_cpu(int cpu)
+static void __devinit smp_cell_setup_cpu(int cpu)
 {
        if (cpu != boot_cpuid)
                iic_setup_cpu();
+
+       /*
+        * change default DABRX to allow user watchpoints
+        */
+       mtspr(SPRN_DABRX, DABRX_KERNEL | DABRX_USER);
 }
 
 static DEFINE_SPINLOCK(timebase_lock);
@@ -192,7 +197,7 @@ static struct smp_ops_t bpa_iic_smp_ops = {
        .message_pass   = smp_iic_message_pass,
        .probe          = smp_iic_probe,
        .kick_cpu       = smp_cell_kick_cpu,
-       .setup_cpu      = smp_iic_setup_cpu,
+       .setup_cpu      = smp_cell_setup_cpu,
        .cpu_bootable   = smp_cell_cpu_bootable,
 };
 
index b73c369cc6f167a4fa52c9162cfed557c9c1bba0..1b26071a86ca8f17e1f2c04f22ffb9d60d13e2b8 100644 (file)
@@ -390,6 +390,9 @@ static int spufs_ps_fault(struct vm_area_struct *vma,
        if (offset >= ps_size)
                return VM_FAULT_SIGBUS;
 
+       if (fatal_signal_pending(current))
+               return VM_FAULT_SIGBUS;
+
        /*
         * Because we release the mmap_sem, the context may be destroyed while
         * we're in spu_wait. Grab an extra reference so it isn't destroyed
index 57cc56562567d6f9e092abdbfd7e93246d41c6e3..0b192a1c429d3b85a1d13292277095d02abee1e3 100644 (file)
@@ -17,23 +17,20 @@ config PPC_BESTCOMM
          answer Y or M. Otherwise say N.
 
 config PPC_BESTCOMM_ATA
-       tristate "Bestcomm ATA task support"
+       tristate
        depends on PPC_BESTCOMM
-       default n
        help
          This option enables the support for the ATA task.
 
 config PPC_BESTCOMM_FEC
-       tristate "Bestcomm FEC tasks support"
+       tristate
        depends on PPC_BESTCOMM
-       default n
        help
          This option enables the support for the FEC tasks.
 
 config PPC_BESTCOMM_GEN_BD
-       tristate "Bestcomm GenBD tasks support"
+       tristate
        depends on PPC_BESTCOMM
-       default n
        help
          This option enables the support for the GenBD tasks.
 
index f6299cca7814b8eda0434e94953db9fe6b38ba9e..1890fb085cded9bdcc66c61214a4058b579c98e6 100644 (file)
@@ -600,7 +600,7 @@ static int irq_choose_cpu(unsigned int virt_irq)
                cpuid = first_cpu(tmp);
        }
 
-       return cpuid;
+       return get_hard_smp_processor_id(cpuid);
 }
 #else
 static int irq_choose_cpu(unsigned int virt_irq)
@@ -1271,6 +1271,7 @@ void __init mpic_set_default_senses(struct mpic *mpic, u8 *senses, int count)
 void __init mpic_init(struct mpic *mpic)
 {
        int i;
+       int cpu;
 
        BUG_ON(mpic->num_sources == 0);
 
@@ -1313,6 +1314,11 @@ void __init mpic_init(struct mpic *mpic)
 
        mpic_pasemi_msi_init(mpic);
 
+       if (mpic->flags & MPIC_PRIMARY)
+               cpu = hard_smp_processor_id();
+       else
+               cpu = 0;
+
        for (i = 0; i < mpic->num_sources; i++) {
                /* start with vector = source number, and masked */
                u32 vecpri = MPIC_VECPRI_MASK | i |
@@ -1323,8 +1329,7 @@ void __init mpic_init(struct mpic *mpic)
                        continue;
                /* init hw */
                mpic_irq_write(i, MPIC_INFO(IRQ_VECTOR_PRI), vecpri);
-               mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION),
-                              1 << hard_smp_processor_id());
+               mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION), 1 << cpu);
        }
        
        /* Init spurious vector */
index b7aefd0d45cb20204d7e95b81240564e0cc1ba69..a22e1a2df1afd0a6c761b7df8b66f63d90a47132 100644 (file)
@@ -107,8 +107,8 @@ xilinx_intc_init(struct device_node *np)
        }
        regs = ioremap(res.start, 32);
 
-       printk(KERN_INFO "Xilinx intc at 0x%08LX mapped to 0x%p\n",
-               res.start, regs);
+       printk(KERN_INFO "Xilinx intc at 0x%08llx mapped to 0x%p\n",
+               (unsigned long long) res.start, regs);
 
        /* Setup interrupt controller */
        out_be32(regs + XINTC_IER, 0); /* disable all irqs */
index 9b0bc2c9fba05e17de7730b209ad68c2d0638549..a0e748da99094e5dd93f343f419527d6bd9d78c1 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc4
-# Thu Aug 21 19:43:29 2008
+# Linux kernel version: 2.6.28-rc6
+# Thu Nov 27 11:00:49 2008
 #
 CONFIG_SCHED_MC=y
 CONFIG_MMU=y
@@ -45,6 +45,7 @@ CONFIG_LOG_BUF_SHIFT=17
 CONFIG_CGROUPS=y
 # CONFIG_CGROUP_DEBUG is not set
 CONFIG_CGROUP_NS=y
+# CONFIG_CGROUP_FREEZER is not set
 # CONFIG_CGROUP_DEVICE is not set
 # CONFIG_CPUSETS is not set
 CONFIG_GROUP_SCHED=y
@@ -84,6 +85,7 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
@@ -92,16 +94,10 @@ CONFIG_SLAB=y
 # CONFIG_MARKERS is not set
 CONFIG_HAVE_OPROFILE=y
 CONFIG_KPROBES=y
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
 CONFIG_KRETPROBES=y
-# CONFIG_HAVE_IOREMAP_PROT is not set
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
-# CONFIG_HAVE_CLK is not set
-CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -135,6 +131,7 @@ CONFIG_DEFAULT_DEADLINE=y
 CONFIG_DEFAULT_IOSCHED="deadline"
 CONFIG_PREEMPT_NOTIFIERS=y
 CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Base setup
@@ -189,7 +186,6 @@ CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_SPARSEMEM_MANUAL=y
 CONFIG_SPARSEMEM=y
 CONFIG_HAVE_MEMORY_PRESENT=y
-# CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPARSEMEM_EXTREME=y
 CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
 CONFIG_SPARSEMEM_VMEMMAP=y
@@ -200,9 +196,11 @@ CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_MIGRATION=y
 CONFIG_RESOURCES_64BIT=y
+CONFIG_PHYS_ADDR_T_64BIT=y
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 
 #
 # I/O subsystem configuration
@@ -220,6 +218,8 @@ CONFIG_IPL=y
 CONFIG_IPL_VM=y
 CONFIG_BINFMT_ELF=y
 CONFIG_COMPAT_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
 CONFIG_BINFMT_MISC=m
 CONFIG_FORCE_MAX_ZONEORDER=9
 # CONFIG_PROCESS_DEBUG is not set
@@ -255,7 +255,7 @@ CONFIG_XFRM=y
 # CONFIG_XFRM_STATISTICS is not set
 CONFIG_NET_KEY=y
 # CONFIG_NET_KEY_MIGRATE is not set
-CONFIG_IUCV=m
+CONFIG_IUCV=y
 CONFIG_AFIUCV=m
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -282,7 +282,6 @@ CONFIG_INET_TCP_DIAG=y
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_TCP_MD5SIG is not set
-# CONFIG_IP_VS is not set
 CONFIG_IPV6=y
 # CONFIG_IPV6_PRIVACY is not set
 # CONFIG_IPV6_ROUTER_PREF is not set
@@ -331,10 +330,12 @@ CONFIG_NF_CONNTRACK=m
 # CONFIG_NF_CONNTRACK_TFTP is not set
 # CONFIG_NF_CT_NETLINK is not set
 # CONFIG_NETFILTER_XTABLES is not set
+# CONFIG_IP_VS is not set
 
 #
 # IP: Netfilter Configuration
 #
+# CONFIG_NF_DEFRAG_IPV4 is not set
 # CONFIG_NF_CONNTRACK_IPV4 is not set
 # CONFIG_IP_NF_QUEUE is not set
 # CONFIG_IP_NF_IPTABLES is not set
@@ -374,6 +375,7 @@ CONFIG_NET_SCH_CBQ=m
 # CONFIG_NET_SCH_HTB is not set
 # CONFIG_NET_SCH_HFSC is not set
 CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_MULTIQ=y
 CONFIG_NET_SCH_RED=m
 CONFIG_NET_SCH_SFQ=m
 CONFIG_NET_SCH_TEQL=m
@@ -406,6 +408,7 @@ CONFIG_NET_ACT_POLICE=y
 CONFIG_NET_ACT_NAT=m
 # CONFIG_NET_ACT_PEDIT is not set
 # CONFIG_NET_ACT_SIMP is not set
+# CONFIG_NET_ACT_SKBEDIT is not set
 # CONFIG_NET_CLS_IND is not set
 CONFIG_NET_SCH_FIFO=y
 
@@ -424,6 +427,7 @@ CONFIG_CAN_BCM=m
 CONFIG_CAN_VCAN=m
 # CONFIG_CAN_DEBUG_DEVICES is not set
 # CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 # CONFIG_PCMCIA is not set
@@ -473,7 +477,7 @@ CONFIG_VIRTIO_BLK=m
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
-# CONFIG_HAVE_IDE is not set
+# CONFIG_C2PORT is not set
 
 #
 # SCSI device support
@@ -525,6 +529,7 @@ CONFIG_SCSI_DH_EMC=m
 CONFIG_SCSI_DH_ALUA=m
 CONFIG_MD=y
 CONFIG_BLK_DEV_MD=y
+CONFIG_MD_AUTODETECT=y
 CONFIG_MD_LINEAR=m
 CONFIG_MD_RAID0=m
 CONFIG_MD_RAID1=m
@@ -555,6 +560,9 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 CONFIG_NETDEV_1000=y
 CONFIG_NETDEV_10000=y
 # CONFIG_TR is not set
@@ -632,13 +640,12 @@ CONFIG_S390_VMUR=m
 # CONFIG_THERMAL is not set
 # CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
-
-#
-# Sonics Silicon Backplane
-#
+# CONFIG_REGULATOR is not set
 # CONFIG_MEMSTICK is not set
 # CONFIG_NEW_LEDS is not set
 CONFIG_ACCESSIBILITY=y
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
@@ -650,13 +657,14 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
-# CONFIG_EXT4DEV_FS is not set
+# CONFIG_EXT4_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
 # CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
@@ -688,6 +696,7 @@ CONFIG_GENERIC_ACL=y
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 CONFIG_TMPFS_POSIX_ACL=y
@@ -728,6 +737,7 @@ CONFIG_LOCKD_V4=y
 CONFIG_EXPORTFS=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -800,12 +810,24 @@ CONFIG_DEBUG_MEMORY_INIT=y
 # CONFIG_DEBUG_SG is not set
 # CONFIG_FRAME_POINTER is not set
 # CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_KPROBES_SANITY_TEST is not set
 # CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
 # CONFIG_LKDTM is not set
 # CONFIG_FAULT_INJECTION is not set
 # CONFIG_LATENCYTOP is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_PREEMPT_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 CONFIG_SAMPLES=y
 # CONFIG_SAMPLE_KOBJECT is not set
 # CONFIG_SAMPLE_KPROBES is not set
@@ -816,16 +838,19 @@ CONFIG_SAMPLES=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
 
 #
 # Crypto core or helper
 #
+CONFIG_CRYPTO_FIPS=y
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
-CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_GF128MUL=m
 # CONFIG_CRYPTO_NULL is not set
@@ -877,7 +902,7 @@ CONFIG_CRYPTO_SHA1=m
 #
 # Ciphers
 #
-# CONFIG_CRYPTO_AES is not set
+CONFIG_CRYPTO_AES=m
 # CONFIG_CRYPTO_ANUBIS is not set
 # CONFIG_CRYPTO_ARC4 is not set
 # CONFIG_CRYPTO_BLOWFISH is not set
@@ -898,6 +923,11 @@ CONFIG_CRYPTO_SEED=m
 #
 # CONFIG_CRYPTO_DEFLATE is not set
 CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+CONFIG_CRYPTO_ANSI_CPRNG=m
 CONFIG_CRYPTO_HW=y
 CONFIG_ZCRYPT=m
 # CONFIG_ZCRYPT_MONOLITHIC is not set
@@ -912,8 +942,6 @@ CONFIG_S390_PRNG=m
 # Library routines
 #
 CONFIG_BITREVERSE=m
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
 CONFIG_CRC_T10DIF=y
index 7fc76133b3e46da10eddb1ca115b7ac69a4a80c0..5caddd4f7bedd74ed7fa9078c8cf4d97bdfc2227 100644 (file)
@@ -679,8 +679,6 @@ static inline void pmd_clear(pmd_t *pmd)
 
 static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
 {
-       if (mm->context.has_pgste)
-               ptep_rcp_copy(ptep);
        pte_val(*ptep) = _PAGE_TYPE_EMPTY;
        if (mm->context.noexec)
                pte_val(ptep[PTRS_PER_PTE]) = _PAGE_TYPE_EMPTY;
index a7226f8143fb9d34df06456f1759d0c2fa085e94..5396f9f122634bda4d0ce33bd78bd1747856e7d2 100644 (file)
@@ -321,8 +321,8 @@ struct pt_regs
        psw_t psw;
        unsigned long gprs[NUM_GPRS];
        unsigned long orig_gpr2;
+       unsigned short svcnr;
        unsigned short ilc;
-       unsigned short trap;
 };
 #endif
 
@@ -486,8 +486,6 @@ struct task_struct;
 extern void user_enable_single_step(struct task_struct *);
 extern void user_disable_single_step(struct task_struct *);
 
-#define __ARCH_WANT_COMPAT_SYS_PTRACE
-
 #define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0)
 #define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN)
 #define user_stack_pointer(regs)((regs)->gprs[15])
index 6e623971fbb9ae234ad80c450b6da43fa2a68fc4..2429b87eb28d92c6fc6adf5a5887f2b29e062d70 100644 (file)
@@ -17,9 +17,7 @@
 static inline long syscall_get_nr(struct task_struct *task,
                                  struct pt_regs *regs)
 {
-       if (regs->trap != __LC_SVC_OLD_PSW)
-               return -1;
-       return regs->gprs[2];
+       return regs->svcnr ? regs->svcnr : -1;
 }
 
 static inline void syscall_rollback(struct task_struct *task,
@@ -52,18 +50,20 @@ static inline void syscall_get_arguments(struct task_struct *task,
                                         unsigned int i, unsigned int n,
                                         unsigned long *args)
 {
+       unsigned long mask = -1UL;
+
        BUG_ON(i + n > 6);
 #ifdef CONFIG_COMPAT
-       if (test_tsk_thread_flag(task, TIF_31BIT)) {
-               if (i + n == 6)
-                       args[--n] = (u32) regs->args[0];
-               while (n-- > 0)
-                       args[n] = (u32) regs->gprs[2 + i + n];
-       }
+       if (test_tsk_thread_flag(task, TIF_31BIT))
+               mask = 0xffffffff;
 #endif
        if (i + n == 6)
-               args[--n] = regs->args[0];
-       memcpy(args, &regs->gprs[2 + i], n * sizeof(args[0]));
+               args[--n] = regs->args[0] & mask;
+       while (n-- > 0)
+               if (i + n > 0)
+                       args[n] = regs->gprs[2 + i + n] & mask;
+       if (i == 0)
+               args[0] = regs->orig_gpr2 & mask;
 }
 
 static inline void syscall_set_arguments(struct task_struct *task,
@@ -74,7 +74,11 @@ static inline void syscall_set_arguments(struct task_struct *task,
        BUG_ON(i + n > 6);
        if (i + n == 6)
                regs->args[0] = args[--n];
-       memcpy(&regs->gprs[2 + i], args, n * sizeof(args[0]));
+       while (n-- > 0)
+               if (i + n > 0)
+                       regs->gprs[2 + i + n] = args[n];
+       if (i == 0)
+               regs->orig_gpr2 = args[0];
 }
 
 #endif /* _ASM_SYSCALL_H */
index fa28ecae636b2237a8bfddb49f05851ef7056f9c..3d144e6020c6c5b9ce26ad82742b3d2e7b16d51c 100644 (file)
@@ -32,7 +32,7 @@ int main(void)
        DEFINE(__PT_GPRS, offsetof(struct pt_regs, gprs));
        DEFINE(__PT_ORIG_GPR2, offsetof(struct pt_regs, orig_gpr2));
        DEFINE(__PT_ILC, offsetof(struct pt_regs, ilc));
-       DEFINE(__PT_TRAP, offsetof(struct pt_regs, trap));
+       DEFINE(__PT_SVCNR, offsetof(struct pt_regs, svcnr));
        DEFINE(__PT_SIZE, sizeof(struct pt_regs));
        BLANK();
        DEFINE(__SF_BACKCHAIN, offsetof(struct stack_frame, back_chain));
index c7f02e777af2ff0202becb4787834204720e77ae..b537cb0e9b55f607652f217f802ac7c2d8358d0b 100644 (file)
@@ -340,7 +340,7 @@ static int restore_sigregs32(struct pt_regs *regs,_sigregs32 __user *sregs)
                return err;
 
        restore_fp_regs(&current->thread.fp_regs);
-       regs->trap = -1;        /* disable syscall checks */
+       regs->svcnr = 0;        /* disable syscall checks */
        return 0;
 }
 
index ed500ef799b795a21f322ae0d8e818b8bd926a36..198ea18a534d0d9c74e68f99b44649b92e852c69 100644 (file)
@@ -46,7 +46,7 @@ SP_R14             =  STACK_FRAME_OVERHEAD + __PT_GPRS + 56
 SP_R15      =  STACK_FRAME_OVERHEAD + __PT_GPRS + 60
 SP_ORIG_R2   = STACK_FRAME_OVERHEAD + __PT_ORIG_GPR2
 SP_ILC      =  STACK_FRAME_OVERHEAD + __PT_ILC
-SP_TRAP      = STACK_FRAME_OVERHEAD + __PT_TRAP
+SP_SVCNR     = STACK_FRAME_OVERHEAD + __PT_SVCNR
 SP_SIZE      = STACK_FRAME_OVERHEAD + __PT_SIZE
 
 _TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_NEED_RESCHED | \
@@ -61,22 +61,25 @@ STACK_SIZE  = 1 << STACK_SHIFT
 
 #ifdef CONFIG_TRACE_IRQFLAGS
        .macro  TRACE_IRQS_ON
-       l       %r1,BASED(.Ltrace_irq_on)
+       basr    %r2,%r0
+       l       %r1,BASED(.Ltrace_irq_on_caller)
        basr    %r14,%r1
        .endm
 
        .macro  TRACE_IRQS_OFF
-       l       %r1,BASED(.Ltrace_irq_off)
+       basr    %r2,%r0
+       l       %r1,BASED(.Ltrace_irq_off_caller)
        basr    %r14,%r1
        .endm
 
        .macro  TRACE_IRQS_CHECK
+       basr    %r2,%r0
        tm      SP_PSW(%r15),0x03       # irqs enabled?
        jz      0f
-       l       %r1,BASED(.Ltrace_irq_on)
+       l       %r1,BASED(.Ltrace_irq_on_caller)
        basr    %r14,%r1
        j       1f
-0:     l       %r1,BASED(.Ltrace_irq_off)
+0:     l       %r1,BASED(.Ltrace_irq_off_caller)
        basr    %r14,%r1
 1:
        .endm
@@ -180,11 +183,10 @@ STACK_SIZE  = 1 << STACK_SHIFT
        .macro  CREATE_STACK_FRAME psworg,savearea
        s       %r15,BASED(.Lc_spsize)  # make room for registers & psw
        mvc     SP_PSW(8,%r15),0(%r12)  # move user PSW to stack
-       la      %r12,\psworg
        st      %r2,SP_ORIG_R2(%r15)    # store original content of gpr 2
-       icm     %r12,12,__LC_SVC_ILC
+       icm     %r12,3,__LC_SVC_ILC
        stm     %r0,%r11,SP_R0(%r15)    # store gprs %r0-%r11 to kernel stack
-       st      %r12,SP_ILC(%r15)
+       st      %r12,SP_SVCNR(%r15)
        mvc     SP_R12(16,%r15),\savearea # move %r12-%r15 to stack
        la      %r12,0
        st      %r12,__SF_BACKCHAIN(%r15)       # clear back chain
@@ -261,16 +263,17 @@ sysc_update:
 #endif
 sysc_do_svc:
        l       %r9,__LC_THREAD_INFO    # load pointer to thread_info struct
-       sla     %r7,2                   # *4 and test for svc 0
+       ltr     %r7,%r7                 # test for svc 0
        bnz     BASED(sysc_nr_ok)       # svc number > 0
        # svc 0: system call number in %r1
        cl      %r1,BASED(.Lnr_syscalls)
        bnl     BASED(sysc_nr_ok)
        lr      %r7,%r1           # copy svc number to %r7
-       sla     %r7,2             # *4
 sysc_nr_ok:
        mvc     SP_ARGS(4,%r15),SP_R7(%r15)
 sysc_do_restart:
+       sth     %r7,SP_SVCNR(%r15)
+       sll     %r7,2             # svc number *4
        l       %r8,BASED(.Lsysc_table)
        tm      __TI_flags+3(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
        l       %r8,0(%r7,%r8)    # get system call addr.
@@ -373,7 +376,6 @@ sysc_notify_resume:
 sysc_restart:
        ni      __TI_flags+3(%r9),255-_TIF_RESTART_SVC # clear TIF_RESTART_SVC
        l       %r7,SP_R2(%r15)         # load new svc number
-       sla     %r7,2
        mvc     SP_R2(4,%r15),SP_ORIG_R2(%r15) # restore first argument
        lm      %r2,%r6,SP_R2(%r15)     # load svc arguments
        b       BASED(sysc_do_restart)  # restart svc
@@ -383,7 +385,8 @@ sysc_restart:
 #
 sysc_singlestep:
        ni      __TI_flags+3(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP
-       mvi     SP_TRAP+1(%r15),0x28    # set trap indication to pgm check
+       mvi     SP_SVCNR(%r15),0xff     # set trap indication to pgm check
+       mvi     SP_SVCNR+1(%r15),0xff
        la      %r2,SP_PTREGS(%r15)     # address of register-save area
        l       %r1,BASED(.Lhandle_per) # load adr. of per handler
        la      %r14,BASED(sysc_return) # load adr. of system return
@@ -404,7 +407,7 @@ sysc_tracesys:
        bnl     BASED(sysc_tracenogo)
        l       %r8,BASED(.Lsysc_table)
        lr      %r7,%r2
-       sll     %r7,2                   # *4
+       sll     %r7,2                   # svc number *4
        l       %r8,0(%r7,%r8)
 sysc_tracego:
        lm      %r3,%r6,SP_R3(%r15)
@@ -583,7 +586,8 @@ pgm_svcper:
 # per was called from kernel, must be kprobes
 #
 kernel_per:
-       mvi     SP_TRAP+1(%r15),0x28    # set trap indication to pgm check
+       mvi     SP_SVCNR(%r15),0xff     # set trap indication to pgm check
+       mvi     SP_SVCNR+1(%r15),0xff
        la      %r2,SP_PTREGS(%r15)     # address of register-save area
        l       %r1,BASED(.Lhandle_per) # load adr. of per handler
        la      %r14,BASED(sysc_restore)# load adr. of system return
@@ -1113,9 +1117,12 @@ cleanup_io_leave_insn:
 .Lschedtail:   .long   schedule_tail
 .Lsysc_table:  .long   sys_call_table
 #ifdef CONFIG_TRACE_IRQFLAGS
-.Ltrace_irq_on: .long  trace_hardirqs_on
-.Ltrace_irq_off:
-               .long   trace_hardirqs_off
+.Ltrace_irq_on_caller:
+               .long   trace_hardirqs_on_caller
+.Ltrace_irq_off_caller:
+               .long   trace_hardirqs_off_caller
+#endif
+#ifdef CONFIG_LOCKDEP
 .Llockdep_sys_exit:
                .long   lockdep_sys_exit
 #endif
index d7ce150453f2865bfa4c9e99f53c03cda198442d..89c121ae63391ef0453367cd26efa36d10296cf3 100644 (file)
@@ -46,7 +46,7 @@ SP_R14             =  STACK_FRAME_OVERHEAD + __PT_GPRS + 112
 SP_R15      =  STACK_FRAME_OVERHEAD + __PT_GPRS + 120
 SP_ORIG_R2   = STACK_FRAME_OVERHEAD + __PT_ORIG_GPR2
 SP_ILC      =  STACK_FRAME_OVERHEAD + __PT_ILC
-SP_TRAP      = STACK_FRAME_OVERHEAD + __PT_TRAP
+SP_SVCNR      =        STACK_FRAME_OVERHEAD + __PT_SVCNR
 SP_SIZE      = STACK_FRAME_OVERHEAD + __PT_SIZE
 
 STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER
@@ -61,19 +61,22 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_NEED_RESCHED | \
 
 #ifdef CONFIG_TRACE_IRQFLAGS
        .macro  TRACE_IRQS_ON
-        brasl  %r14,trace_hardirqs_on
+        basr   %r2,%r0
+        brasl  %r14,trace_hardirqs_on_caller
        .endm
 
        .macro  TRACE_IRQS_OFF
-        brasl  %r14,trace_hardirqs_off
+        basr   %r2,%r0
+        brasl  %r14,trace_hardirqs_off_caller
        .endm
 
        .macro TRACE_IRQS_CHECK
+       basr    %r2,%r0
        tm      SP_PSW(%r15),0x03       # irqs enabled?
        jz      0f
-       brasl   %r14,trace_hardirqs_on
+       brasl   %r14,trace_hardirqs_on_caller
        j       1f
-0:     brasl   %r14,trace_hardirqs_off
+0:     brasl   %r14,trace_hardirqs_off_caller
 1:
        .endm
 #else
@@ -168,11 +171,10 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_NEED_RESCHED | \
        .macro  CREATE_STACK_FRAME psworg,savearea
        aghi    %r15,-SP_SIZE           # make room for registers & psw
        mvc     SP_PSW(16,%r15),0(%r12) # move user PSW to stack
-       la      %r12,\psworg
        stg     %r2,SP_ORIG_R2(%r15)    # store original content of gpr 2
-       icm     %r12,12,__LC_SVC_ILC
+       icm     %r12,3,__LC_SVC_ILC
        stmg    %r0,%r11,SP_R0(%r15)    # store gprs %r0-%r11 to kernel stack
-       st      %r12,SP_ILC(%r15)
+       st      %r12,SP_SVCNR(%r15)
        mvc     SP_R12(32,%r15),\savearea # move %r12-%r15 to stack
        la      %r12,0
        stg     %r12,__SF_BACKCHAIN(%r15)
@@ -247,16 +249,17 @@ sysc_update:
 #endif
 sysc_do_svc:
        lg      %r9,__LC_THREAD_INFO    # load pointer to thread_info struct
-       slag    %r7,%r7,2       # *4 and test for svc 0
+       ltgr    %r7,%r7         # test for svc 0
        jnz     sysc_nr_ok
        # svc 0: system call number in %r1
        cl      %r1,BASED(.Lnr_syscalls)
        jnl     sysc_nr_ok
        lgfr    %r7,%r1         # clear high word in r1
-       slag    %r7,%r7,2       # svc 0: system call number in %r1
 sysc_nr_ok:
        mvc     SP_ARGS(8,%r15),SP_R7(%r15)
 sysc_do_restart:
+       sth     %r7,SP_SVCNR(%r15)
+       sllg    %r7,%r7,2       # svc number * 4
        larl    %r10,sys_call_table
 #ifdef CONFIG_COMPAT
        tm      __TI_flags+5(%r9),(_TIF_31BIT>>16)  # running in 31 bit mode ?
@@ -360,7 +363,6 @@ sysc_notify_resume:
 sysc_restart:
        ni      __TI_flags+7(%r9),255-_TIF_RESTART_SVC # clear TIF_RESTART_SVC
        lg      %r7,SP_R2(%r15)         # load new svc number
-       slag    %r7,%r7,2               # *4
        mvc     SP_R2(8,%r15),SP_ORIG_R2(%r15) # restore first argument
        lmg     %r2,%r6,SP_R2(%r15)     # load svc arguments
        j       sysc_do_restart         # restart svc
@@ -369,9 +371,8 @@ sysc_restart:
 # _TIF_SINGLE_STEP is set, call do_single_step
 #
 sysc_singlestep:
-       ni      __TI_flags+7(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP
-       lhi     %r0,__LC_PGM_OLD_PSW
-       sth     %r0,SP_TRAP(%r15)       # set trap indication to pgm check
+       ni      __TI_flags+7(%r9),255-_TIF_SINGLE_STEP  # clear TIF_SINGLE_STEP
+       xc      SP_SVCNR(2,%r15),SP_SVCNR(%r15)         # clear svc number
        la      %r2,SP_PTREGS(%r15)     # address of register-save area
        larl    %r14,sysc_return        # load adr. of system return
        jg      do_single_step          # branch to do_sigtrap
@@ -389,7 +390,7 @@ sysc_tracesys:
        lghi    %r0,NR_syscalls
        clgr    %r0,%r2
        jnh     sysc_tracenogo
-       slag    %r7,%r2,2               # *4
+       sllg    %r7,%r2,2               # svc number *4
        lgf     %r8,0(%r7,%r10)
 sysc_tracego:
        lmg     %r3,%r6,SP_R3(%r15)
@@ -564,8 +565,7 @@ pgm_svcper:
 # per was called from kernel, must be kprobes
 #
 kernel_per:
-       lhi     %r0,__LC_PGM_OLD_PSW
-       sth     %r0,SP_TRAP(%r15)       # set trap indication to pgm check
+       xc      SP_SVCNR(2,%r15),SP_SVCNR(%r15) # clear svc number
        la      %r2,SP_PTREGS(%r15)     # address of register-save area
        larl    %r14,sysc_restore       # load adr. of system ret, no work
        jg      do_single_step          # branch to do_single_step
index 7ad003969251f159cb7f5d6ab0cfaac62c9eb113..e807168436194c81fe0f4892f9be5a7e4bed685b 100644 (file)
@@ -26,7 +26,7 @@ EXPORT_SYMBOL(init_mm);
 /*
  * Initial thread structure.
  *
- * We need to make sure that this is 8192-byte aligned due to the
+ * We need to make sure that this is THREAD_SIZE aligned due to the
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
index 3e2c05cb6a8733683c57d2935536ee936cc52059..04f8c67a610180413788684390d64bc613b8ca30 100644 (file)
@@ -136,9 +136,12 @@ static void default_idle(void)
                return;
        }
        trace_hardirqs_on();
+       /* Don't trace preempt off for idle. */
+       stop_critical_timings();
        /* Wait for external, I/O or machine check interrupt. */
        __load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT |
                        PSW_MASK_IO | PSW_MASK_EXT);
+       start_critical_timings();
 }
 
 void cpu_idle(void)
index 1f31be1ecc4bd57bd3af99ef004f00df4f24987b..38ff2bce12032d45a16e554b6e4545ea63fae21e 100644 (file)
@@ -657,7 +657,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
                 * debugger stored an invalid system call number. Skip
                 * the system call and the system call restart handling.
                 */
-               regs->trap = -1;
+               regs->svcnr = 0;
                ret = -1;
        }
 
index 62122bad1e3316f2112ae66c22e51859c7214b52..400b040df7fa05b1028bb9a9744e002957b29f5b 100644 (file)
@@ -604,13 +604,13 @@ setup_memory(void)
                if (memory_chunk[i].type != CHUNK_READ_WRITE)
                        continue;
                start_chunk = PFN_DOWN(memory_chunk[i].addr);
-               end_chunk = start_chunk + PFN_DOWN(memory_chunk[i].size) - 1;
+               end_chunk = start_chunk + PFN_DOWN(memory_chunk[i].size);
                end_chunk = min(end_chunk, end_pfn);
                if (start_chunk >= end_chunk)
                        continue;
                add_active_range(0, start_chunk, end_chunk);
                pfn = max(start_chunk, start_pfn);
-               for (; pfn <= end_chunk; pfn++)
+               for (; pfn < end_chunk; pfn++)
                        page_set_storage_key(PFN_PHYS(pfn), PAGE_DEFAULT_KEY);
        }
 
index 4f7fc3059a8e8a1e1e937d976d1c962febcdbd7e..8e6812a22670b24704fafec7079c2136a9fa720a 100644 (file)
@@ -160,7 +160,7 @@ static int restore_sigregs(struct pt_regs *regs, _sigregs __user *sregs)
        current->thread.fp_regs.fpc &= FPC_VALID_MASK;
 
        restore_fp_regs(&current->thread.fp_regs);
-       regs->trap = -1;        /* disable syscall checks */
+       regs->svcnr = 0;        /* disable syscall checks */
        return 0;
 }
 
@@ -445,7 +445,7 @@ void do_signal(struct pt_regs *regs)
                oldset = &current->blocked;
 
        /* Are we from a system call? */
-       if (regs->trap == __LC_SVC_OLD_PSW) {
+       if (regs->svcnr) {
                continue_addr = regs->psw.addr;
                restart_addr = continue_addr - regs->ilc;
                retval = regs->gprs[2];
@@ -462,7 +462,7 @@ void do_signal(struct pt_regs *regs)
                case -ERESTART_RESTARTBLOCK:
                        regs->gprs[2] = -EINTR;
                }
-               regs->trap = -1;        /* Don't deal with this again. */
+               regs->svcnr = 0;        /* Don't deal with this again. */
        }
 
        /* Get signal to deliver.  When running under ptrace, at this point
index 5fdb799062b7abfa1471488fd2582660cd56b08a..4fe952e557ac3bf683bb9535ff89b553035aad25 100644 (file)
@@ -198,7 +198,7 @@ asmlinkage long s390x_newuname(struct new_utsname __user *name)
 {
        int ret = sys_newuname(name);
 
-       if (current->personality == PER_LINUX32 && !ret) {
+       if (personality(current->personality) == PER_LINUX32 && !ret) {
                ret = copy_to_user(name->machine, "s390\0\0\0\0", 8);
                if (ret) ret = -EFAULT;
        }
index b94e9e3b694a2bd738cfc58d8fdcc9bbc5baa412..eccefbbff887dc199b04ec715d25ec9c2ec1201c 100644 (file)
@@ -59,7 +59,7 @@
 
 static ext_int_info_t ext_int_info_cc;
 static ext_int_info_t ext_int_etr_cc;
-static u64 jiffies_timer_cc;
+static u64 sched_clock_base_cc;
 
 static DEFINE_PER_CPU(struct clock_event_device, comparators);
 
@@ -68,7 +68,7 @@ static DEFINE_PER_CPU(struct clock_event_device, comparators);
  */
 unsigned long long sched_clock(void)
 {
-       return ((get_clock_xt() - jiffies_timer_cc) * 125) >> 9;
+       return ((get_clock_xt() - sched_clock_base_cc) * 125) >> 9;
 }
 
 /*
@@ -229,13 +229,10 @@ static struct clocksource clocksource_tod = {
  */
 void __init time_init(void)
 {
-       u64 init_timer_cc;
-
-       init_timer_cc = reset_tod_clock();
-       jiffies_timer_cc = init_timer_cc - jiffies_64 * CLK_TICKS_PER_JIFFY;
+       sched_clock_base_cc = reset_tod_clock();
 
        /* set xtime */
-       tod_to_timeval(init_timer_cc - TOD_UNIX_EPOCH, &xtime);
+       tod_to_timeval(sched_clock_base_cc - TOD_UNIX_EPOCH, &xtime);
         set_normalized_timespec(&wall_to_monotonic,
                                 -xtime.tv_sec, -xtime.tv_nsec);
 
@@ -289,7 +286,7 @@ static unsigned long long adjust_time(unsigned long long old,
                delta = -delta;
                adjust.offset = -ticks * (1000000 / HZ);
        }
-       jiffies_timer_cc += delta;
+       sched_clock_base_cc += delta;
        if (adjust.offset != 0) {
                printk(KERN_NOTICE "etr: time adjusted by %li micro-seconds\n",
                       adjust.offset);
index 632b13e100538704758cea2eebd75c6cfdc15bf7..a947899dcba1d55f56f8e00af05ab738293df6a3 100644 (file)
@@ -65,18 +65,21 @@ static int machine_has_topology_irq;
 static struct timer_list topology_timer;
 static void set_topology_timer(void);
 static DECLARE_WORK(topology_work, topology_work_fn);
+/* topology_lock protects the core linked list */
+static DEFINE_SPINLOCK(topology_lock);
 
 cpumask_t cpu_core_map[NR_CPUS];
 
 cpumask_t cpu_coregroup_map(unsigned int cpu)
 {
        struct core_info *core = &core_info;
+       unsigned long flags;
        cpumask_t mask;
 
        cpus_clear(mask);
        if (!machine_has_topology)
                return cpu_present_map;
-       mutex_lock(&smp_cpu_state_mutex);
+       spin_lock_irqsave(&topology_lock, flags);
        while (core) {
                if (cpu_isset(cpu, core->mask)) {
                        mask = core->mask;
@@ -84,7 +87,7 @@ cpumask_t cpu_coregroup_map(unsigned int cpu)
                }
                core = core->next;
        }
-       mutex_unlock(&smp_cpu_state_mutex);
+       spin_unlock_irqrestore(&topology_lock, flags);
        if (cpus_empty(mask))
                mask = cpumask_of_cpu(cpu);
        return mask;
@@ -133,7 +136,7 @@ static void tl_to_cores(struct tl_info *info)
        union tl_entry *tle, *end;
        struct core_info *core = &core_info;
 
-       mutex_lock(&smp_cpu_state_mutex);
+       spin_lock_irq(&topology_lock);
        clear_cores();
        tle = info->tle;
        end = (union tl_entry *)((unsigned long)info + info->length);
@@ -157,7 +160,7 @@ static void tl_to_cores(struct tl_info *info)
                }
                tle = next_tle(tle);
        }
-       mutex_unlock(&smp_cpu_state_mutex);
+       spin_unlock_irq(&topology_lock);
 }
 
 static void topology_update_polarization_simple(void)
index 607bd67a18ce782f21051e4e306f8feced721719..d796d05c9c01ac1be6779682a730485d73502bd2 100644 (file)
@@ -2,6 +2,7 @@
  * Written by Martin Schwidefsky (schwidefsky@de.ibm.com)
  */
 
+#include <asm/thread_info.h>
 #include <asm/page.h>
 #include <asm-generic/vmlinux.lds.h>
 
@@ -86,7 +87,7 @@ SECTIONS
        }
        _edata = .;             /* End of data section */
 
-       . = ALIGN(2 * PAGE_SIZE);       /* init_task */
+       . = ALIGN(THREAD_SIZE); /* init_task */
        .data.init_task : {
                *(.data.init_task)
        }
index 170392687ce042f64c69ea7f4fe85d863025b768..2a01b9e02801f14afd348162f31679237cbd340a 100644 (file)
@@ -237,6 +237,11 @@ int kvm_s390_handle_sigp(struct kvm_vcpu *vcpu)
        u8 order_code;
        int rc;
 
+       /* sigp in userspace can exit */
+       if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
+               return kvm_s390_inject_program_int(vcpu,
+                                                  PGM_PRIVILEGED_OPERATION);
+
        order_code = disp2;
        if (base2)
                order_code += vcpu->arch.guest_gprs[base2];
index 80119b3398e7f2acb1f2a1091c247cb8193e947e..5c9cbfc14c4d5ad9ad06bf18f3a4b2f523eebd0b 100644 (file)
@@ -55,6 +55,8 @@ config GENERIC_HARDIRQS
 
 config GENERIC_HARDIRQS_NO__DO_IRQ
        def_bool y
+       depends on SUPERH32 && (!SH_DREAMCAST && !SH_SH4202_MICRODEV && \
+                               !SH_7751_SYSTEMH && !HD64461)
 
 config GENERIC_IRQ_PROBE
        def_bool y
index 436c28539577ebf75e9d0aefa0514faf2351ec83..65eaae34e753035209455a1916dc68cc4e7b22d6 100644 (file)
@@ -293,6 +293,10 @@ __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags)
  */
 #define xlate_dev_kmem_ptr(p)  p
 
+#define ARCH_HAS_VALID_PHYS_ADDR_RANGE
+int valid_phys_addr_range(unsigned long addr, size_t size);
+int valid_mmap_phys_addr_range(unsigned long pfn, size_t size);
+
 #endif /* __KERNEL__ */
 
 #endif /* __ASM_SH_IO_H */
index 52220d70a096a378f7dd9c4fbbda635177f4b808..b517ae08b9c0f1794a3c72b52aec0cfe181e4294 100644 (file)
@@ -148,6 +148,12 @@ extern void paging_init(void);
 extern void page_table_range_init(unsigned long start, unsigned long end,
                                  pgd_t *pgd);
 
+#if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_CPU_SH4) && defined(CONFIG_MMU)
+extern void kmap_coherent_init(void);
+#else
+#define kmap_coherent_init()   do { } while (0)
+#endif
+
 #include <asm-generic/pgtable.h>
 
 #endif /* __ASM_SH_PGTABLE_H */
index a7412cede534f6cd5e3ef16d060cf1324f8bcd4b..6d9e6972cfc9d8d1cecf57bffb3fe8ab9f72136e 100644 (file)
@@ -119,17 +119,17 @@ static struct plat_sci_port sci_platform_data[] = {
        },{
                .mapbase        = 0xa4e30000,
                .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCI,
+               .type           = PORT_SCIFA,
                .irqs           = { 56, 56, 56, 56 },
        },{
                .mapbase        = 0xa4e40000,
                .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCI,
+               .type           = PORT_SCIFA,
                .irqs           = { 88, 88, 88, 88 },
        },{
                .mapbase        = 0xa4e50000,
                .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCI,
+               .type           = PORT_SCIFA,
                .irqs           = { 109, 109, 109, 109 },
        }, {
                .flags = 0,
index 6b7d166694e28fecc3f949b66cb94ae8c2e53950..a952dcf9999d43bedbef8ff275aa3517fb13ab91 100644 (file)
@@ -75,6 +75,7 @@ static struct console bios_console = {
 #endif
 
 static struct uart_port scif_port = {
+       .type           = PORT_SCIF,
        .mapbase        = CONFIG_EARLY_SCIF_CONSOLE_PORT,
        .membase        = (char __iomem *)CONFIG_EARLY_SCIF_CONSOLE_PORT,
 };
@@ -84,9 +85,9 @@ static void scif_sercon_putc(int c)
        while (((sci_in(&scif_port, SCFDR) & EPK_FIFO_BITS) >= EPK_FIFO_SIZE))
                ;
 
-       sci_out(&scif_port, SCxTDR, c);
        sci_in(&scif_port, SCxSR);
        sci_out(&scif_port, SCxSR, 0xf3 & ~(0x20 | 0x40));
+       sci_out(&scif_port, SCxTDR, c);
 
        while ((sci_in(&scif_port, SCxSR) & 0x40) == 0)
                ;
index aaaf90d06b85f89237e776125c27fd43e6eb8064..3c61ddd4d43e0459c3cd4355133a486f328bea50 100644 (file)
@@ -120,7 +120,7 @@ static void tmu_set_mode(enum clock_event_mode mode,
 {
        switch (mode) {
        case CLOCK_EVT_MODE_PERIODIC:
-               ctrl_outl(ctrl_inl(TMU0_TCNT), TMU0_TCOR);
+               ctrl_outl(tmu_latest_interval[TMU0], TMU0_TCOR);
                break;
        case CLOCK_EVT_MODE_ONESHOT:
                ctrl_outl(0, TMU0_TCOR);
index 5d12e657be34e051b8ba2ab676cf472d58ffe77b..43de7e8e4e17df58849aef36e69dd28895e46bab 100644 (file)
@@ -80,6 +80,11 @@ ENTRY(copy_page)
        .section __ex_table, "a";       \
        .long 9999b, 6000f      ;       \
        .previous
+#define EX_NO_POP(...)                 \
+       9999: __VA_ARGS__ ;             \
+       .section __ex_table, "a";       \
+       .long 9999b, 6005f      ;       \
+       .previous
 ENTRY(__copy_user)
        ! Check if small number of bytes
        mov     #11,r0
@@ -139,9 +144,9 @@ EX( mov.b   r1,@r4          )
        bt      1f
 
 2:
-EX(    mov.b   @r5+,r0         )
+EX_NO_POP(     mov.b   @r5+,r0         )
        dt      r6
-EX(    mov.b   r0,@r4          )
+EX_NO_POP(     mov.b   r0,@r4          )
        bf/s    2b
         add    #1,r4
 
@@ -150,7 +155,7 @@ EX( mov.b   r0,@r4          )
 
 # Exception handler:
 .section .fixup, "ax"
-6000:
+6005:
        mov.l   8000f,r1
        mov     r3,r0
        jmp     @r1
index 70e0906023ccc80282d11f2264176c0fa34e907f..f066e76da2044fb9430c80ec2481546ad963c275 100644 (file)
@@ -2,7 +2,7 @@
 # Makefile for the Linux SuperH-specific parts of the memory manager.
 #
 
-obj-y                  := init.o extable_32.o consistent.o
+obj-y                  := init.o extable_32.o consistent.o mmap.o
 
 ifndef CONFIG_CACHE_OFF
 cache-$(CONFIG_CPU_SH2)                := cache-sh2.o
index 0d92a8a3ac9a1e312870740b7d982e1eafebb021..9481d0f54efdd8a5fd6e76b86c72f12be906604f 100644 (file)
@@ -2,7 +2,7 @@
 # Makefile for the Linux SuperH-specific parts of the memory manager.
 #
 
-obj-y                  := init.o consistent.o
+obj-y                  := init.o consistent.o mmap.o
 
 mmu-y                  := tlb-nommu.o pg-nommu.o extable_32.o
 mmu-$(CONFIG_MMU)      := fault_64.o ioremap_64.o tlbflush_64.o tlb-sh5.o \
index 4abf00031daef8521e39d09a1d032f1d937b26af..6cbef8caeb560e69776579d5525bbad028e9aaec 100644 (file)
@@ -137,6 +137,7 @@ void __init page_table_range_init(unsigned long start, unsigned long end,
 void __init paging_init(void)
 {
        unsigned long max_zone_pfns[MAX_NR_ZONES];
+       unsigned long vaddr;
        int nid;
 
        /* We don't need to map the kernel through the TLB, as
@@ -148,10 +149,15 @@ void __init paging_init(void)
         * check for a null value. */
        set_TTB(swapper_pg_dir);
 
-       /* Populate the relevant portions of swapper_pg_dir so that
+       /*
+        * Populate the relevant portions of swapper_pg_dir so that
         * we can use the fixmap entries without calling kmalloc.
-        * pte's will be filled in by __set_fixmap(). */
-       page_table_range_init(FIXADDR_START, FIXADDR_TOP, swapper_pg_dir);
+        * pte's will be filled in by __set_fixmap().
+        */
+       vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK;
+       page_table_range_init(vaddr, 0, swapper_pg_dir);
+
+       kmap_coherent_init();
 
        memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
 
diff --git a/arch/sh/mm/mmap.c b/arch/sh/mm/mmap.c
new file mode 100644 (file)
index 0000000..8837d51
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * arch/sh/mm/mmap.c
+ *
+ * Copyright (C) 2008  Paul Mundt
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#include <linux/io.h>
+#include <linux/mm.h>
+#include <asm/page.h>
+
+/*
+ * You really shouldn't be using read() or write() on /dev/mem.  This
+ * might go away in the future.
+ */
+int valid_phys_addr_range(unsigned long addr, size_t count)
+{
+       if (addr < __MEMORY_START)
+               return 0;
+       if (addr + count > __pa(high_memory))
+               return 0;
+
+       return 1;
+}
+
+int valid_mmap_phys_addr_range(unsigned long pfn, size_t size)
+{
+       return 1;
+}
index 38870e0fc182af3347ed90986d9fb3b31578fadb..2fe14da1f83909826d352249ba849488103fb4c2 100644 (file)
@@ -7,6 +7,7 @@
  * Released under the terms of the GNU GPL v2.0.
  */
 #include <linux/mm.h>
+#include <linux/init.h>
 #include <linux/mutex.h>
 #include <linux/fs.h>
 #include <linux/highmem.h>
 
 #define CACHE_ALIAS (current_cpu_data.dcache.alias_mask)
 
+#define kmap_get_fixmap_pte(vaddr)                                     \
+       pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k(vaddr), (vaddr)), (vaddr)), (vaddr))
+
+static pte_t *kmap_coherent_pte;
+
+void __init kmap_coherent_init(void)
+{
+       unsigned long vaddr;
+
+       /* cache the first coherent kmap pte */
+       vaddr = __fix_to_virt(FIX_CMAP_BEGIN);
+       kmap_coherent_pte = kmap_get_fixmap_pte(vaddr);
+}
+
 static inline void *kmap_coherent(struct page *page, unsigned long addr)
 {
        enum fixed_addresses idx;
@@ -34,6 +49,8 @@ static inline void *kmap_coherent(struct page *page, unsigned long addr)
 
        update_mmu_cache(NULL, vaddr, pte);
 
+       set_pte(kmap_coherent_pte - (FIX_CMAP_END - idx), pte);
+
        return (void *)vaddr;
 }
 
index 68b98a7e6454952500e54cd6728eb688813836a2..9cf4ae0cd7ba7b2a173c5c30039365a06f0a1db1 100644 (file)
@@ -98,6 +98,7 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr)
 #include <asm-generic/bitops/sched.h>
 #include <asm-generic/bitops/ffs.h>
 #include <asm-generic/bitops/fls.h>
+#include <asm-generic/bitops/__fls.h>
 #include <asm-generic/bitops/fls64.h>
 #include <asm-generic/bitops/hweight.h>
 #include <asm-generic/bitops/lock.h>
index d409c4f21a5cdea420e75fef24a2ceec1cb0e834..4cef450167dd6ae697e7e429078979f2277f92fd 100644 (file)
@@ -62,6 +62,8 @@ struct sparc_stackf {
 
 #ifdef __KERNEL__
 
+#include <asm/system.h>
+
 static inline bool pt_regs_is_syscall(struct pt_regs *regs)
 {
        return (regs->psr & PSR_SYSCALL);
@@ -72,6 +74,14 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
        return (regs->psr &= ~PSR_SYSCALL);
 }
 
+#define arch_ptrace_stop_needed(exit_code, info) \
+({     flush_user_windows(); \
+       current_thread_info()->w_saved != 0;    \
+})
+
+#define arch_ptrace_stop(exit_code, info) \
+       synchronize_user_stack()
+
 #define user_mode(regs) (!((regs)->psr & PSR_PS))
 #define instruction_pointer(regs) ((regs)->pc)
 #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP])
index 3d3e9c161d8bdb41623a82aa97929fbd0be3b856..cd6fbfc2043533636dd16fec2918cf0a07124be1 100644 (file)
@@ -114,6 +114,7 @@ struct sparc_trapf {
 #ifdef __KERNEL__
 
 #include <linux/threads.h>
+#include <asm/system.h>
 
 static inline int pt_regs_trap_type(struct pt_regs *regs)
 {
@@ -130,6 +131,14 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
        return (regs->tstate &= ~TSTATE_SYSCALL);
 }
 
+#define arch_ptrace_stop_needed(exit_code, info) \
+({     flush_user_windows(); \
+       get_thread_wsaved() != 0; \
+})
+
+#define arch_ptrace_stop(exit_code, info) \
+       synchronize_user_stack()
+
 struct global_reg_snapshot {
        unsigned long           tstate;
        unsigned long           tpc;
@@ -142,8 +151,6 @@ struct global_reg_snapshot {
 };
 extern struct global_reg_snapshot global_reg_snapshot[NR_CPUS];
 
-#define __ARCH_WANT_COMPAT_SYS_PTRACE
-
 #define force_successful_syscall_return()          \
 do {   current_thread_info()->syscall_noerror = 1; \
 } while (0)
index d6ca3e2754f5f37e792f3a060fed8bfc68a76305..d72dfed1f9d7e6fc67106f2a17aeeba8d8662d0a 100644 (file)
@@ -29,10 +29,11 @@ struct termios {
        tcflag_t c_cflag;               /* control mode flags */
        tcflag_t c_lflag;               /* local mode flags */
        cc_t c_line;                    /* line discipline */
+#ifndef __KERNEL__
        cc_t c_cc[NCCS];                /* control characters */
-#ifdef __KERNEL__
+#else
+       cc_t c_cc[NCCS+2];      /* kernel needs 2 more to hold vmin/vtime */
 #define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t))
-       cc_t _x_cc[2];                  /* We need them to hold vmin/vtime */
 #endif
 };
 
@@ -42,8 +43,7 @@ struct termios2 {
        tcflag_t c_cflag;               /* control mode flags */
        tcflag_t c_lflag;               /* local mode flags */
        cc_t c_line;                    /* line discipline */
-       cc_t c_cc[NCCS];                /* control characters */
-       cc_t _x_cc[2];                  /* padding to match ktermios */
+       cc_t c_cc[NCCS+2];              /* control characters */
        speed_t c_ispeed;               /* input speed */
        speed_t c_ospeed;               /* output speed */
 };
@@ -54,8 +54,7 @@ struct ktermios {
        tcflag_t c_cflag;               /* control mode flags */
        tcflag_t c_lflag;               /* local mode flags */
        cc_t c_line;                    /* line discipline */
-       cc_t c_cc[NCCS];                /* control characters */
-       cc_t _x_cc[2];                  /* We need them to hold vmin/vtime */
+       cc_t c_cc[NCCS+2];              /* control characters */
        speed_t c_ispeed;               /* input speed */
        speed_t c_ospeed;               /* output speed */
 };
index 648643a9f139b62930a6fd39ab6f4b614bd74c92..0d13d2a4c76f6e0f63f005e01e077bd9f565f6de 100644 (file)
 #define __NR_dup3              320
 #define __NR_pipe2             321
 #define __NR_inotify_init1     322
+#define __NR_accept4           323
 
-#define NR_SYSCALLS            323
+#define NR_SYSCALLS            324
 
 /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants,
  * it never had the plain ones and there is no value to adding those
index c5cc0e052321850157df1edaf92b6020b5fb22d0..fa5d3c0343c7ee33d09111b3bfab4a987839fcc2 100644 (file)
 #define __NR_dup3              320
 #define __NR_pipe2             321
 #define __NR_inotify_init1     322
+#define __NR_accept4           323
 
-#define NR_SYSCALLS            323
+#define NR_SYSCALLS            324
 
 #ifdef __KERNEL__
 #define __ARCH_WANT_IPC_PARSE_VERSION
index e7a0edfc1a32532823d315a78deb6f1585a35502..1fc17f59c6bffc24758d3f44d3e8c71a66f1c8f6 100644 (file)
@@ -126,7 +126,7 @@ char *sparc_fpu_type;
 
 unsigned int fsr_storage;
 
-void __init cpu_probe(void)
+void __cpuinit cpu_probe(void)
 {
        int psr_impl, psr_vers, fpu_vers;
        int i, psr;
index 2d325fd845795e32361f658736784262f56bf5c0..51b40426f9c68e1ba0cde5fd4061c19efa02e9cf 100644 (file)
@@ -72,7 +72,7 @@ sun4e_notsup:
        .align 4
 
        /* The Sparc trap table, bootloader gives us control at _start. */
-       .text
+       .section .text.head,"ax"
        .globl  start, _stext, _start, __stext
        .globl  trapbase
 _start:   /* danger danger */
index 0837bd52e28f454e2f4fc18aa003970caf3a455b..0a83bd737654de487ec0ab1e857c278352438902 100644 (file)
@@ -563,9 +563,9 @@ build_resources:
        op->dev.parent = parent;
        op->dev.bus = &of_platform_bus_type;
        if (!parent)
-               strcpy(op->dev.bus_id, "root");
+               dev_set_name(&op->dev, "root");
        else
-               sprintf(op->dev.bus_id, "%08x", dp->node);
+               dev_set_name(&op->dev, "%08x", dp->node);
 
        if (of_device_register(op)) {
                printk("%s: Could not register of device.\n",
index 1619ec15c099493a85ba4f21c93e3ecbbe594576..e396c1f17a922deaef7b03a0751d06f1345770fd 100644 (file)
@@ -35,7 +35,7 @@
 
 #include "irq.h"
 
-volatile unsigned long cpu_callin_map[NR_CPUS] __initdata = {0,};
+volatile unsigned long cpu_callin_map[NR_CPUS] __cpuinitdata = {0,};
 unsigned char boot_cpu_id = 0;
 unsigned char boot_cpu_id4 = 0; /* boot_cpu_id << 2 */
 
@@ -120,7 +120,7 @@ void cpu_panic(void)
        panic("SMP bolixed\n");
 }
 
-struct linux_prom_registers smp_penguin_ctable __initdata = { 0 };
+struct linux_prom_registers smp_penguin_ctable __cpuinitdata = { 0 };
 
 void smp_send_reschedule(int cpu)
 {
index 7a6a5e7959282e736fb5b01baa591d9d52b478d4..16ab0cb731c5084debe40de0f701e29a92435e58 100644 (file)
@@ -83,7 +83,7 @@ static inline void show_leds(int cpuid)
                              "i" (ASI_M_CTL));
 }
 
-void __init smp4d_callin(void)
+void __cpuinit smp4d_callin(void)
 {
        int cpuid = hard_smp4d_processor_id();
        extern spinlock_t sun4d_imsk_lock;
@@ -386,7 +386,7 @@ void smp4d_percpu_timer_interrupt(struct pt_regs *regs)
 
 extern unsigned int lvl14_resolution;
 
-static void __init smp_setup_percpu_timer(void)
+static void __cpuinit smp_setup_percpu_timer(void)
 {
        int cpu = hard_smp4d_processor_id();
 
index 5fc386d08c4713ae0dd968cc02df4f044f0a77b2..4f8d60586b076caa72349094d1baa5f4a98d555c 100644 (file)
@@ -343,7 +343,7 @@ void smp4m_percpu_timer_interrupt(struct pt_regs *regs)
 
 extern unsigned int lvl14_resolution;
 
-static void __init smp_setup_percpu_timer(void)
+static void __cpuinit smp_setup_percpu_timer(void)
 {
        int cpu = smp_processor_id();
 
index e1b9233b90ab3133587481322f30d3a260fc6569..7d0807586442dda4d837e58cc9ac419c10c6bc20 100644 (file)
@@ -81,4 +81,4 @@ sys_call_table:
 /*305*/        .long sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait
 /*310*/        .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate
 /*315*/        .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1
-/*320*/        .long sys_dup3, sys_pipe2, sys_inotify_init1
+/*320*/        .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4
index 356c56aebc6284190327ae34b0a84dcfeb9de906..5e235c52d667df54cb741f67a64141854883103a 100644 (file)
@@ -18,7 +18,7 @@
        .globl sun4m_cpu_startup, __smp4m_processor_id
        .globl sun4d_cpu_startup, __smp4d_processor_id
 
-       __INIT
+       __CPUINIT
        .align 4
 
 /* When we start up a cpu for the first time it enters this routine.
@@ -109,7 +109,7 @@ __smp4d_processor_id:
 /* CPUID in bootbus can be found at PA 0xff0140000 */
 #define SUN4D_BOOTBUS_CPUID    0xf0140000
 
-       __INIT
+       __CPUINIT
        .align  4
 
 sun4d_cpu_startup:
index b1002c60719615bca22b0c4161e0d60afb959d58..5b7e69a8c32f7259497fafbcd1e816242e690423 100644 (file)
@@ -13,6 +13,7 @@ SECTIONS
        .text 0xf0004000 :
        {
                _text = .;
+               *(.text.head)
                TEXT_TEXT
                SCHED_TEXT
                LOCK_TEXT
index 6a5d7cabc04450eb10dcb4f75c792aa36838d584..dd8aa36f366c909fe4ca13e3eab297f7700cb127 100644 (file)
@@ -1251,7 +1251,7 @@ static inline void map_kernel(void)
 /* Paging initialization on the Sparc Reference MMU. */
 extern void sparc_context_init(int);
 
-void (*poke_srmmu)(void) __initdata = NULL;
+void (*poke_srmmu)(void) __cpuinitdata = NULL;
 
 extern unsigned long bootmem_init(unsigned long *pages_avail);
 
@@ -1446,7 +1446,7 @@ static void __init init_vac_layout(void)
               (int)vac_cache_size, (int)vac_line_size);
 }
 
-static void __init poke_hypersparc(void)
+static void __cpuinit poke_hypersparc(void)
 {
        volatile unsigned long clear;
        unsigned long mreg = srmmu_get_mmureg();
@@ -1501,7 +1501,7 @@ static void __init init_hypersparc(void)
        hypersparc_setup_blockops();
 }
 
-static void __init poke_cypress(void)
+static void __cpuinit poke_cypress(void)
 {
        unsigned long mreg = srmmu_get_mmureg();
        unsigned long faddr, tagval;
@@ -1589,7 +1589,7 @@ static void __init init_cypress_605(unsigned long mrev)
        init_cypress_common();
 }
 
-static void __init poke_swift(void)
+static void __cpuinit poke_swift(void)
 {
        unsigned long mreg;
 
@@ -1771,7 +1771,7 @@ static void turbosparc_flush_tlb_page(struct vm_area_struct *vma, unsigned long
 }
 
 
-static void __init poke_turbosparc(void)
+static void __cpuinit poke_turbosparc(void)
 {
        unsigned long mreg = srmmu_get_mmureg();
        unsigned long ccreg;
@@ -1834,7 +1834,7 @@ static void __init init_turbosparc(void)
        poke_srmmu = poke_turbosparc;
 }
 
-static void __init poke_tsunami(void)
+static void __cpuinit poke_tsunami(void)
 {
        unsigned long mreg = srmmu_get_mmureg();
 
@@ -1876,7 +1876,7 @@ static void __init init_tsunami(void)
        tsunami_setup_blockops();
 }
 
-static void __init poke_viking(void)
+static void __cpuinit poke_viking(void)
 {
        unsigned long mreg = srmmu_get_mmureg();
        static int smp_catch;
index f43adbc773caca890f96a214647a7f63ee225531..a941c610e7ce0cdf8c38c38c5e3d46c32419114f 100644 (file)
@@ -1014,7 +1014,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                break;
 
        case PTRACE_SETFPREGS64:
-               ret = copy_regset_to_user(child, view, REGSET_FP,
+               ret = copy_regset_from_user(child, view, REGSET_FP,
                                          0 * sizeof(u64),
                                          33 * sizeof(u64),
                                          fps);
index e5627118e6131b527468b4107f3d9f40a63387ea..f500b0618bb0d3b4badcdee2c5c8cb20225c97e9 100644 (file)
@@ -282,7 +282,7 @@ static unsigned long kimage_addr_to_ra(void *p)
        return kern_base + (val - KERNBASE);
 }
 
-static void ldom_startcpu_cpuid(unsigned int cpu, unsigned long thread_reg)
+static void __cpuinit ldom_startcpu_cpuid(unsigned int cpu, unsigned long thread_reg)
 {
        extern unsigned long sparc64_ttable_tl0;
        extern unsigned long kern_locked_tte_data;
@@ -343,7 +343,7 @@ extern unsigned long sparc64_cpu_startup;
  */
 static struct thread_info *cpu_new_thread = NULL;
 
-static int __devinit smp_boot_one_cpu(unsigned int cpu)
+static int __cpuinit smp_boot_one_cpu(unsigned int cpu)
 {
        struct trap_per_cpu *tb = &trap_block[cpu];
        unsigned long entry =
index ade18ba0c68634db858ce2e226e00236e5d2a428..f061c4dda9efb96dd5d8a6317169af88332b6720 100644 (file)
@@ -150,7 +150,7 @@ sys32_mmap2:
 sys32_socketcall:      /* %o0=call, %o1=args */
        cmp             %o0, 1
        bl,pn           %xcc, do_einval
-        cmp            %o0, 17
+        cmp            %o0, 18
        bg,pn           %xcc, do_einval
         sub            %o0, 1, %o0
        sllx            %o0, 5, %o0
@@ -319,6 +319,15 @@ do_sys_recvmsg: /* compat_sys_recvmsg(int, struct compat_msghdr *, unsigned int)
        nop
        nop
        nop
+do_sys_accept4: /* sys_accept4(int, struct sockaddr *, int *, int) */
+63:    ldswa           [%o1 + 0x0] %asi, %o0
+       sethi           %hi(sys_accept4), %g1
+64:    lduwa           [%o1 + 0x8] %asi, %o2
+65:    ldswa           [%o1 + 0xc] %asi, %o3
+       jmpl            %g1 + %lo(sys_accept4), %g0
+66:     lduwa          [%o1 + 0x4] %asi, %o1
+       nop
+       nop
 
        .section        __ex_table,"a"
        .align          4
@@ -353,4 +362,6 @@ do_sys_recvmsg: /* compat_sys_recvmsg(int, struct compat_msghdr *, unsigned int)
        .word           57b, __retl_efault, 58b, __retl_efault
        .word           59b, __retl_efault, 60b, __retl_efault
        .word           61b, __retl_efault, 62b, __retl_efault
+       .word           63b, __retl_efault, 64b, __retl_efault
+       .word           65b, __retl_efault, 66b, __retl_efault
        .previous
index b2fa4c1636387f2e40bf52a09c8d80bae7dce36c..9fc78cf354bd1f63e034ad46320ff4ed38fa2ee1 100644 (file)
@@ -82,7 +82,7 @@ sys_call_table32:
        .word compat_sys_set_mempolicy, compat_sys_kexec_load, compat_sys_move_pages, sys_getcpu, compat_sys_epoll_pwait
 /*310*/        .word compat_sys_utimensat, compat_sys_signalfd, sys_timerfd_create, sys_eventfd, compat_sys_fallocate
        .word compat_sys_timerfd_settime, compat_sys_timerfd_gettime, compat_sys_signalfd4, sys_eventfd2, sys_epoll_create1
-/*320*/        .word sys_dup3, sys_pipe2, sys_inotify_init1
+/*320*/        .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4
 
 #endif /* CONFIG_COMPAT */
 
@@ -156,4 +156,4 @@ sys_call_table:
        .word sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait
 /*310*/        .word sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate
        .word sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1
-/*320*/        .word sys_dup3, sys_pipe2, sys_inotify_init1
+/*320*/        .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4
index 9e05cb5cb855ba5d0f2d3367d6e0a4e5023fe663..b956fd71c131143e4240ebea47548ab110c747a0 100644 (file)
 #define VIS_OPF_SHIFT  5
 #define VIS_OPF_MASK   (0x1ff << VIS_OPF_SHIFT)
 
-#define RS1(INSN)      (((INSN) >> 24) & 0x1f)
+#define RS1(INSN)      (((INSN) >> 14) & 0x1f)
 #define RS2(INSN)      (((INSN) >>  0) & 0x1f)
 #define RD(INSN)       (((INSN) >> 25) & 0x1f)
 
@@ -445,7 +445,7 @@ static void pdist(struct pt_regs *regs, unsigned int insn)
        unsigned long i;
 
        rs1 = fpd_regval(f, RS1(insn));
-       rs2 = fpd_regval(f, RS1(insn));
+       rs2 = fpd_regval(f, RS2(insn));
        rd = fpd_regaddr(f, RD(insn));
 
        rd_val = *rd;
@@ -807,6 +807,8 @@ int vis_emul(struct pt_regs *regs, unsigned int insn)
        if (get_user(insn, (u32 __user *) pc))
                return -EFAULT;
 
+       save_and_clear_fpu();
+
        opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT;
        switch (opf) {
        default:
index 19d1fdb17d0e8b4f5b3ac6ce0a72fe7c11c65a6b..05a361b0a1a40e6d87ad6c86d59ab464fd48e4c5 100644 (file)
@@ -24,7 +24,7 @@ static unsigned long compute_size(unsigned long start, unsigned long size, unsig
        if (fault_addr < start || fault_addr >= end) {
                *offset = 0;
        } else {
-               *offset = start - fault_addr;
+               *offset = fault_addr - start;
                size = end - fault_addr;
        }
        return size;
index 3c10daf8fc015799a300ffc86d3d014b8f7ae5ee..185f34679110c3e373c99c8eaa3e569e5170c338 100644 (file)
@@ -956,7 +956,7 @@ int of_node_to_nid(struct device_node *dp)
        return nid;
 }
 
-static void add_node_ranges(void)
+static void __init add_node_ranges(void)
 {
        int i;
 
index 19d579d74d27f18ae67bb1b5c9adcf93f963a288..8f44ebb0dec82286e85838369d8fdfd9de929ae6 100644 (file)
@@ -16,6 +16,8 @@
 #include <linux/slab.h>
 #include <linux/syscalls.h>
 #include <linux/utsname.h>
+#include <linux/socket.h>
+#include <linux/un.h>
 #include <linux/workqueue.h>
 #include <linux/mutex.h>
 #include <asm/uaccess.h>
@@ -785,7 +787,7 @@ static int __init mconsole_init(void)
        /* long to avoid size mismatch warnings from gcc */
        long sock;
        int err;
-       char file[256];
+       char file[UNIX_PATH_MAX];
 
        if (umid_file_name("mconsole", file, sizeof(file)))
                return -1;
index 93224b56918798ac9b6bae7c6210602ef42604de..1cbec0269d394163a9245c021b282e454db3531c 100644 (file)
@@ -19,6 +19,8 @@ config X86_64
 config X86
        def_bool y
        select HAVE_AOUT if X86_32
+       select HAVE_READQ
+       select HAVE_WRITEQ
        select HAVE_UNSTABLE_SCHED_CLOCK
        select HAVE_IDE
        select HAVE_OPROFILE
@@ -87,6 +89,10 @@ config GENERIC_IOMAP
 config GENERIC_BUG
        def_bool y
        depends on BUG
+       select GENERIC_BUG_RELATIVE_POINTERS if X86_64
+
+config GENERIC_BUG_RELATIVE_POINTERS
+       bool
 
 config GENERIC_HWEIGHT
        def_bool y
@@ -167,9 +173,12 @@ config GENERIC_PENDING_IRQ
 config X86_SMP
        bool
        depends on SMP && ((X86_32 && !X86_VOYAGER) || X86_64)
-       select USE_GENERIC_SMP_HELPERS
        default y
 
+config USE_GENERIC_SMP_HELPERS
+       def_bool y
+       depends on SMP
+
 config X86_32_SMP
        def_bool y
        depends on X86_32 && SMP
@@ -239,21 +248,13 @@ config X86_FIND_SMP_CONFIG
        def_bool y
        depends on X86_MPPARSE || X86_VOYAGER
 
-if ACPI
 config X86_MPPARSE
-       def_bool y
-       bool "Enable MPS table"
+       bool "Enable MPS table" if ACPI
+       default y
        depends on X86_LOCAL_APIC
        help
          For old smp systems that do not have proper acpi support. Newer systems
          (esp with 64bit cpus) with acpi support, MADT and DSDT will override it
-endif
-
-if !ACPI
-config X86_MPPARSE
-       def_bool y
-       depends on X86_LOCAL_APIC
-endif
 
 choice
        prompt "Subarchitecture Type"
@@ -462,10 +463,6 @@ config X86_CYCLONE_TIMER
        def_bool y
        depends on X86_GENERICARCH
 
-config ES7000_CLUSTERED_APIC
-       def_bool y
-       depends on SMP && X86_ES7000 && MPENTIUMIII
-
 source "arch/x86/Kconfig.cpu"
 
 config HPET_TIMER
@@ -657,6 +654,30 @@ config X86_VISWS_APIC
        def_bool y
        depends on X86_32 && X86_VISWS
 
+config X86_REROUTE_FOR_BROKEN_BOOT_IRQS
+       bool "Reroute for broken boot IRQs"
+       default n
+       depends on X86_IO_APIC
+       help
+         This option enables a workaround that fixes a source of
+         spurious interrupts. This is recommended when threaded
+         interrupt handling is used on systems where the generation of
+         superfluous "boot interrupts" cannot be disabled.
+
+         Some chipsets generate a legacy INTx "boot IRQ" when the IRQ
+         entry in the chipset's IO-APIC is masked (as, e.g. the RT
+         kernel does during interrupt handling). On chipsets where this
+         boot IRQ generation cannot be disabled, this workaround keeps
+         the original IRQ line masked so that only the equivalent "boot
+         IRQ" is delivered to the CPUs. The workaround also tells the
+         kernel to set up the IRQ handler on the boot IRQ line. In this
+         way only one interrupt is delivered to the kernel. Otherwise
+         the spurious second interrupt may cause the kernel to bring
+         down (vital) interrupt lines.
+
+         Only affects "broken" chipsets. Interrupt sharing may be
+         increased on these systems.
+
 config X86_MCE
        bool "Machine Check Exception"
        depends on !X86_VOYAGER
@@ -953,24 +974,37 @@ config X86_PAE
 config ARCH_PHYS_ADDR_T_64BIT
        def_bool X86_64 || X86_PAE
 
+config DIRECT_GBPAGES
+       bool "Enable 1GB pages for kernel pagetables" if EMBEDDED
+       default y
+       depends on X86_64
+       help
+         Allow the kernel linear mapping to use 1GB pages on CPUs that
+         support it. This can improve the kernel's performance a tiny bit by
+         reducing TLB pressure. If in doubt, say "Y".
+
 # Common NUMA Features
 config NUMA
-       bool "Numa Memory Allocation and Scheduler Support (EXPERIMENTAL)"
+       bool "Numa Memory Allocation and Scheduler Support"
        depends on SMP
-       depends on X86_64 || (X86_32 && HIGHMEM64G && (X86_NUMAQ || X86_BIGSMP || X86_SUMMIT && ACPI) && BROKEN)
+       depends on X86_64 || (X86_32 && HIGHMEM64G && (X86_NUMAQ || X86_BIGSMP || X86_SUMMIT && ACPI) && EXPERIMENTAL)
        default n if X86_PC
        default y if (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP)
        help
          Enable NUMA (Non Uniform Memory Access) support.
+
          The kernel will try to allocate memory used by a CPU on the
          local memory controller of the CPU and add some more
          NUMA awareness to the kernel.
 
-         For 32-bit this is currently highly experimental and should be only
-         used for kernel development. It might also cause boot failures.
-         For 64-bit this is recommended on all multiprocessor Opteron systems.
-         If the system is EM64T, you should say N unless your system is
-         EM64T NUMA.
+         For 64-bit this is recommended if the system is Intel Core i7
+         (or later), AMD Opteron, or EM64T NUMA.
+
+         For 32-bit this is only needed on (rare) 32-bit-only platforms
+         that support NUMA topologies, such as NUMAQ / Summit, or if you
+         boot a 32-bit kernel on a 64-bit NUMA platform.
+
+         Otherwise, you should say N.
 
 comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI"
        depends on X86_32 && X86_SUMMIT && (!HIGHMEM64G || !ACPI)
@@ -1490,6 +1524,10 @@ config ARCH_ENABLE_MEMORY_HOTPLUG
        def_bool y
        depends on X86_64 || (X86_32 && HIGHMEM)
 
+config ARCH_ENABLE_MEMORY_HOTREMOVE
+       def_bool y
+       depends on MEMORY_HOTPLUG
+
 config HAVE_ARCH_EARLY_PFN_TO_NID
        def_bool X86_64
        depends on NUMA
@@ -1629,13 +1667,6 @@ config APM_ALLOW_INTS
          many of the newer IBM Thinkpads.  If you experience hangs when you
          suspend, try setting this to Y.  Otherwise, say N.
 
-config APM_REAL_MODE_POWER_OFF
-       bool "Use real mode APM BIOS call to power off"
-       help
-         Use real mode APM BIOS calls to switch off the computer. This is
-         a work-around for a number of buggy BIOSes. Switch this option on if
-         your computer crashes instead of powering off properly.
-
 endif # APM
 
 source "arch/x86/kernel/cpu/cpufreq/Kconfig"
index 2a3dfbd5e677b548e5e75f43da69e934b90a7eff..4ee768660f75098e465b1fb29fe79e384ce87cd1 100644 (file)
@@ -114,18 +114,6 @@ config DEBUG_RODATA
          data. This is recommended so that we can catch kernel bugs sooner.
          If in doubt, say "Y".
 
-config DIRECT_GBPAGES
-       bool "Enable gbpages-mapped kernel pagetables"
-       depends on DEBUG_KERNEL && EXPERIMENTAL && X86_64
-       help
-         Enable gigabyte pages support (if the CPU supports it). This can
-         improve the kernel's performance a tiny bit by reducing TLB
-         pressure.
-
-         This is experimental code.
-
-         If in doubt, say "N".
-
 config DEBUG_RODATA_TEST
        bool "Testcase for the DEBUG_RODATA feature"
        depends on DEBUG_RODATA
@@ -307,10 +295,10 @@ config OPTIMIZE_INLINING
          developers have marked 'inline'. Doing so takes away freedom from gcc to
          do what it thinks is best, which is desirable for the gcc 3.x series of
          compilers. The gcc 4.x series have a rewritten inlining algorithm and
-         disabling this option will generate a smaller kernel there. Hopefully
-         this algorithm is so good that allowing gcc4 to make the decision can
-         become the default in the future, until then this option is there to
-         test gcc for this.
+         enabling this option will generate a smaller kernel there. Hopefully
+         this algorithm is so good that allowing gcc 4.x and above to make the
+         decision will become the default in the future. Until then this option
+         is there to test gcc for this.
 
          If unsure, say N.
 
index 0be77b39328afc957c8aa70b64bbe0641f477a7c..7e8e8b25f5f6c89defd0df4064a61e3e16a4ea06 100644 (file)
@@ -74,7 +74,7 @@ static int kbd_pending(void)
 {
        u8 pending;
        asm volatile("int $0x16; setnz %0"
-                    : "=rm" (pending)
+                    : "=qm" (pending)
                     : "a" (0x0100));
        return pending;
 }
index b939cb476decf7d4d3089f6210c4fe3ecfb5f5be..5d4742ed4aa21dd83d968798a1c7ff92447907a1 100644 (file)
@@ -34,7 +34,7 @@ static struct mode_info cga_modes[] = {
        { VIDEO_80x25,  80, 25, 0 },
 };
 
-__videocard video_vga;
+static __videocard video_vga;
 
 /* Set basic 80x25 mode */
 static u8 vga_set_basic_mode(void)
@@ -259,7 +259,7 @@ static int vga_probe(void)
        return mode_count[adapter];
 }
 
-__videocard video_vga = {
+static __videocard video_vga = {
        .card_name      = "VGA",
        .probe          = vga_probe,
        .set_mode       = vga_set_mode,
index 83598b23093aa31398db2d1c9a5f89eb30733357..3bef2c1febe936bd01f1b8d7d6b7d1eb5b1f9bb6 100644 (file)
@@ -226,7 +226,7 @@ static unsigned int mode_menu(void)
 
 #ifdef CONFIG_VIDEO_RETAIN
 /* Save screen content to the heap */
-struct saved_screen {
+static struct saved_screen {
        int x, y;
        int curx, cury;
        u16 *data;
index 13b8c86ae98570f67375b505e9d106374e24b574..b30a08ed8eb48b8f64f9c79cc5e62f11d63ec669 100644 (file)
@@ -77,7 +77,7 @@ CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 CONFIG_AUDIT_TREE=y
 # CONFIG_IKCONFIG is not set
-CONFIG_LOG_BUF_SHIFT=17
+CONFIG_LOG_BUF_SHIFT=18
 CONFIG_CGROUPS=y
 # CONFIG_CGROUP_DEBUG is not set
 CONFIG_CGROUP_NS=y
@@ -298,7 +298,7 @@ CONFIG_KEXEC=y
 CONFIG_CRASH_DUMP=y
 # CONFIG_KEXEC_JUMP is not set
 CONFIG_PHYSICAL_START=0x1000000
-CONFIG_RELOCATABLE=y
+# CONFIG_RELOCATABLE is not set
 CONFIG_PHYSICAL_ALIGN=0x200000
 CONFIG_HOTPLUG_CPU=y
 # CONFIG_COMPAT_VDSO is not set
index f0a03d7a7d63f2f2c32f7daea043a0935021bba3..0e7dbc0a3e460e2934887c8c0d744c0515f66c6d 100644 (file)
@@ -77,7 +77,7 @@ CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 CONFIG_AUDIT_TREE=y
 # CONFIG_IKCONFIG is not set
-CONFIG_LOG_BUF_SHIFT=17
+CONFIG_LOG_BUF_SHIFT=18
 CONFIG_CGROUPS=y
 # CONFIG_CGROUP_DEBUG is not set
 CONFIG_CGROUP_NS=y
@@ -298,7 +298,7 @@ CONFIG_SCHED_HRTICK=y
 CONFIG_KEXEC=y
 CONFIG_CRASH_DUMP=y
 CONFIG_PHYSICAL_START=0x1000000
-CONFIG_RELOCATABLE=y
+# CONFIG_RELOCATABLE is not set
 CONFIG_PHYSICAL_ALIGN=0x200000
 CONFIG_HOTPLUG_CPU=y
 # CONFIG_COMPAT_VDSO is not set
index 4bc02b23674b5dfaaf91e813fb2be320dc57cd23..b195f85526e35813e08e93b2553587a37896af2f 100644 (file)
@@ -32,6 +32,8 @@
 #include <asm/proto.h>
 #include <asm/vdso.h>
 
+#include <asm/sigframe.h>
+
 #define DEBUG_SIG 0
 
 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
@@ -41,7 +43,6 @@
                         X86_EFLAGS_ZF | X86_EFLAGS_AF | X86_EFLAGS_PF | \
                         X86_EFLAGS_CF)
 
-asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset);
 void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
 
 int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
@@ -173,47 +174,28 @@ asmlinkage long sys32_sigaltstack(const stack_ia32_t __user *uss_ptr,
 /*
  * Do a signal return; undo the signal stack.
  */
+#define COPY(x)                        {               \
+       err |= __get_user(regs->x, &sc->x);     \
+}
 
-struct sigframe
-{
-       u32 pretcode;
-       int sig;
-       struct sigcontext_ia32 sc;
-       struct _fpstate_ia32 fpstate_unused; /* look at kernel/sigframe.h */
-       unsigned int extramask[_COMPAT_NSIG_WORDS-1];
-       char retcode[8];
-       /* fp state follows here */
-};
-
-struct rt_sigframe
-{
-       u32 pretcode;
-       int sig;
-       u32 pinfo;
-       u32 puc;
-       compat_siginfo_t info;
-       struct ucontext_ia32 uc;
-       char retcode[8];
-       /* fp state follows here */
-};
-
-#define COPY(x)                {               \
-       unsigned int reg;               \
-       err |= __get_user(reg, &sc->x); \
-       regs->x = reg;                  \
+#define COPY_SEG_CPL3(seg)     {                       \
+               unsigned short tmp;                     \
+               err |= __get_user(tmp, &sc->seg);       \
+               regs->seg = tmp | 3;                    \
 }
 
-#define RELOAD_SEG(seg,mask)                                           \
-       { unsigned int cur;                                             \
-         unsigned short pre;                                           \
-         err |= __get_user(pre, &sc->seg);                             \
-         savesegment(seg, cur);                                        \
-         pre |= mask;                                                  \
-         if (pre != cur) loadsegment(seg, pre); }
+#define RELOAD_SEG(seg)                {               \
+       unsigned int cur, pre;                  \
+       err |= __get_user(pre, &sc->seg);       \
+       savesegment(seg, cur);                  \
+       pre |= 3;                               \
+       if (pre != cur)                         \
+               loadsegment(seg, pre);          \
+}
 
 static int ia32_restore_sigcontext(struct pt_regs *regs,
                                   struct sigcontext_ia32 __user *sc,
-                                  unsigned int *peax)
+                                  unsigned int *pax)
 {
        unsigned int tmpflags, gs, oldgs, err = 0;
        void __user *buf;
@@ -240,18 +222,16 @@ static int ia32_restore_sigcontext(struct pt_regs *regs,
        if (gs != oldgs)
                load_gs_index(gs);
 
-       RELOAD_SEG(fs, 3);
-       RELOAD_SEG(ds, 3);
-       RELOAD_SEG(es, 3);
+       RELOAD_SEG(fs);
+       RELOAD_SEG(ds);
+       RELOAD_SEG(es);
 
        COPY(di); COPY(si); COPY(bp); COPY(sp); COPY(bx);
        COPY(dx); COPY(cx); COPY(ip);
        /* Don't touch extended registers */
 
-       err |= __get_user(regs->cs, &sc->cs);
-       regs->cs |= 3;
-       err |= __get_user(regs->ss, &sc->ss);
-       regs->ss |= 3;
+       COPY_SEG_CPL3(cs);
+       COPY_SEG_CPL3(ss);
 
        err |= __get_user(tmpflags, &sc->flags);
        regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
@@ -262,15 +242,13 @@ static int ia32_restore_sigcontext(struct pt_regs *regs,
        buf = compat_ptr(tmp);
        err |= restore_i387_xstate_ia32(buf);
 
-       err |= __get_user(tmp, &sc->ax);
-       *peax = tmp;
-
+       err |= __get_user(*pax, &sc->ax);
        return err;
 }
 
 asmlinkage long sys32_sigreturn(struct pt_regs *regs)
 {
-       struct sigframe __user *frame = (struct sigframe __user *)(regs->sp-8);
+       struct sigframe_ia32 __user *frame = (struct sigframe_ia32 __user *)(regs->sp-8);
        sigset_t set;
        unsigned int ax;
 
@@ -300,12 +278,12 @@ badframe:
 
 asmlinkage long sys32_rt_sigreturn(struct pt_regs *regs)
 {
-       struct rt_sigframe __user *frame;
+       struct rt_sigframe_ia32 __user *frame;
        sigset_t set;
        unsigned int ax;
        struct pt_regs tregs;
 
-       frame = (struct rt_sigframe __user *)(regs->sp - 4);
+       frame = (struct rt_sigframe_ia32 __user *)(regs->sp - 4);
 
        if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
                goto badframe;
@@ -359,20 +337,15 @@ static int ia32_setup_sigcontext(struct sigcontext_ia32 __user *sc,
        err |= __put_user(regs->dx, &sc->dx);
        err |= __put_user(regs->cx, &sc->cx);
        err |= __put_user(regs->ax, &sc->ax);
-       err |= __put_user(regs->cs, &sc->cs);
-       err |= __put_user(regs->ss, &sc->ss);
        err |= __put_user(current->thread.trap_no, &sc->trapno);
        err |= __put_user(current->thread.error_code, &sc->err);
        err |= __put_user(regs->ip, &sc->ip);
+       err |= __put_user(regs->cs, (unsigned int __user *)&sc->cs);
        err |= __put_user(regs->flags, &sc->flags);
        err |= __put_user(regs->sp, &sc->sp_at_signal);
+       err |= __put_user(regs->ss, (unsigned int __user *)&sc->ss);
 
-       tmp = save_i387_xstate_ia32(fpstate);
-       if (tmp < 0)
-               err = -EFAULT;
-       else
-               err |= __put_user(ptr_to_compat(tmp ? fpstate : NULL),
-                                       &sc->fpstate);
+       err |= __put_user(ptr_to_compat(fpstate), &sc->fpstate);
 
        /* non-iBCS2 extensions.. */
        err |= __put_user(mask, &sc->oldmask);
@@ -400,7 +373,7 @@ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
        }
 
        /* This is the legacy signal stack switching. */
-       else if ((regs->ss & 0xffff) != __USER_DS &&
+       else if ((regs->ss & 0xffff) != __USER32_DS &&
                !(ka->sa.sa_flags & SA_RESTORER) &&
                 ka->sa.sa_restorer)
                sp = (unsigned long) ka->sa.sa_restorer;
@@ -408,6 +381,8 @@ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
        if (used_math()) {
                sp = sp - sig_xstate_ia32_size;
                *fpstate = (struct _fpstate_ia32 *) sp;
+               if (save_i387_xstate_ia32(*fpstate) < 0)
+                       return (void __user *) -1L;
        }
 
        sp -= frame_size;
@@ -420,7 +395,7 @@ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
 int ia32_setup_frame(int sig, struct k_sigaction *ka,
                     compat_sigset_t *set, struct pt_regs *regs)
 {
-       struct sigframe __user *frame;
+       struct sigframe_ia32 __user *frame;
        void __user *restorer;
        int err = 0;
        void __user *fpstate = NULL;
@@ -430,12 +405,10 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka,
                u16 poplmovl;
                u32 val;
                u16 int80;
-               u16 pad;
        } __attribute__((packed)) code = {
                0xb858,          /* popl %eax ; movl $...,%eax */
                __NR_ia32_sigreturn,
                0x80cd,         /* int $0x80 */
-               0,
        };
 
        frame = get_sigframe(ka, regs, sizeof(*frame), &fpstate);
@@ -471,7 +444,7 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka,
         * These are actually not used anymore, but left because some
         * gdb versions depend on them as a marker.
         */
-       err |= __copy_to_user(frame->retcode, &code, 8);
+       err |= __put_user(*((u64 *)&code), (u64 *)frame->retcode);
        if (err)
                return -EFAULT;
 
@@ -501,7 +474,7 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka,
 int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
                        compat_sigset_t *set, struct pt_regs *regs)
 {
-       struct rt_sigframe __user *frame;
+       struct rt_sigframe_ia32 __user *frame;
        void __user *restorer;
        int err = 0;
        void __user *fpstate = NULL;
@@ -511,8 +484,7 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
                u8 movl;
                u32 val;
                u16 int80;
-               u16 pad;
-               u8  pad2;
+               u8  pad;
        } __attribute__((packed)) code = {
                0xb8,
                __NR_ia32_rt_sigreturn,
@@ -559,7 +531,7 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
         * Not actually used anymore, but left because some gdb
         * versions need it.
         */
-       err |= __copy_to_user(frame->retcode, &code, 8);
+       err |= __put_user(*((u64 *)&code), (u64 *)frame->retcode);
        if (err)
                return -EFAULT;
 
@@ -572,11 +544,6 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
        regs->dx = (unsigned long) &frame->info;
        regs->cx = (unsigned long) &frame->uc;
 
-       /* Make -mregparm=3 work */
-       regs->ax = sig;
-       regs->dx = (unsigned long) &frame->info;
-       regs->cx = (unsigned long) &frame->uc;
-
        loadsegment(ds, __USER32_DS);
        loadsegment(es, __USER32_DS);
 
index 8d676d8ecde93d2bd0f76f5891ea5982970aae8a..9830681446ad4346bacfbbed00efdb95e52eca14 100644 (file)
@@ -113,7 +113,6 @@ static inline void acpi_disable_pci(void)
        acpi_pci_disabled = 1;
        acpi_noirq_set();
 }
-extern int acpi_irq_balance_set(char *str);
 
 /* routines for saving/restoring kernel state */
 extern int acpi_save_state_mem(void);
index 1a30c0440c6bb4c907b400313c7bbd1865bb9298..ac302a2fa3397f3ae9a65a4553a2731706b34e18 100644 (file)
@@ -251,13 +251,6 @@ struct amd_iommu {
        /* Pointer to PCI device of this IOMMU */
        struct pci_dev *dev;
 
-       /*
-        * Capability pointer. There could be more than one IOMMU per PCI
-        * device function if there are more than one AMD IOMMU capability
-        * pointers.
-        */
-       u16 cap_ptr;
-
        /* physical address of MMIO space */
        u64 mmio_phys;
        /* virtual address of MMIO space */
@@ -266,6 +259,13 @@ struct amd_iommu {
        /* capabilities of that IOMMU read from ACPI */
        u32 cap;
 
+       /*
+        * Capability pointer. There could be more than one IOMMU per PCI
+        * device function if there are more than one AMD IOMMU capability
+        * pointers.
+        */
+       u16 cap_ptr;
+
        /* pci domain of this IOMMU */
        u16 pci_seg;
 
@@ -284,19 +284,19 @@ struct amd_iommu {
        /* size of command buffer */
        u32 cmd_buf_size;
 
-       /* event buffer virtual address */
-       u8 *evt_buf;
        /* size of event buffer */
        u32 evt_buf_size;
+       /* event buffer virtual address */
+       u8 *evt_buf;
        /* MSI number for event interrupt */
        u16 evt_msi_num;
 
-       /* if one, we need to send a completion wait command */
-       int need_sync;
-
        /* true if interrupts for this IOMMU are already enabled */
        bool int_enabled;
 
+       /* if one, we need to send a completion wait command */
+       int need_sync;
+
        /* default dma_ops domain for that IOMMU */
        struct dma_ops_domain *default_dom;
 };
index 3b1510b4fc5741290d5660bb4c30f34bc70f6371..25caa0738af5f9d99399d3c2f36405bc62d7115b 100644 (file)
@@ -193,6 +193,7 @@ extern u8 setup_APIC_eilvt_ibs(u8 vector, u8 msg_type, u8 mask);
 static inline void lapic_shutdown(void) { }
 #define local_apic_timer_c2_ok         1
 static inline void init_apic_mappings(void) { }
+static inline void disable_local_APIC(void) { }
 
 #endif /* !CONFIG_X86_LOCAL_APIC */
 
index 1d9543b9d35824c259a1110005866be3d1f54a4e..ce547f24a1cd30da5da6a9fc088d4a94cae2f7c8 100644 (file)
@@ -24,8 +24,6 @@ static inline cpumask_t target_cpus(void)
 #define INT_DELIVERY_MODE      (dest_Fixed)
 #define INT_DEST_MODE          (0)    /* phys delivery to target proc */
 #define NO_BALANCE_IRQ         (0)
-#define WAKE_SECONDARY_VIA_INIT
-
 
 static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
 {
index 360010322711037f80040829acceed8de6a15f42..9fa9dcdf344baeb25ccfa79db6222b5aae470ba5 100644 (file)
@@ -168,7 +168,15 @@ static inline void __change_bit(int nr, volatile unsigned long *addr)
  */
 static inline void change_bit(int nr, volatile unsigned long *addr)
 {
-       asm volatile(LOCK_PREFIX "btc %1,%0" : ADDR : "Ir" (nr));
+       if (IS_IMMEDIATE(nr)) {
+               asm volatile(LOCK_PREFIX "xorb %1,%0"
+                       : CONST_MASK_ADDR(nr, addr)
+                       : "iq" ((u8)CONST_MASK(nr)));
+       } else {
+               asm volatile(LOCK_PREFIX "btc %1,%0"
+                       : BITOP_ADDR(addr)
+                       : "Ir" (nr));
+       }
 }
 
 /**
index 3def2065fcea73ba085fcb31ee5063e2cfc57adb..d9cf1cd156d24b5cebe5a8ed41292b6300e8c9c2 100644 (file)
@@ -9,7 +9,7 @@
 #ifdef CONFIG_X86_32
 # define __BUG_C0      "2:\t.long 1b, %c0\n"
 #else
-# define __BUG_C0      "2:\t.quad 1b, %c0\n"
+# define __BUG_C0      "2:\t.long 1b - 2b, %c0 - 2b\n"
 #endif
 
 #define BUG()                                                  \
index e02ae2d89acf13936aad26502e485aa6ddae0b65..f110ad417df3e0121333cbb06564a492ef8be2c2 100644 (file)
@@ -4,26 +4,33 @@
 #include <asm/types.h>
 #include <linux/compiler.h>
 
-#ifdef __GNUC__
+#define __LITTLE_ENDIAN
 
-#ifdef __i386__
-
-static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
+static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
 {
-#ifdef CONFIG_X86_BSWAP
-       asm("bswap %0" : "=r" (x) : "0" (x));
-#else
+#ifdef __i386__
+# ifdef CONFIG_X86_BSWAP
+       asm("bswap %0" : "=r" (val) : "0" (val));
+# else
        asm("xchgb %b0,%h0\n\t" /* swap lower bytes     */
            "rorl $16,%0\n\t"   /* swap words           */
            "xchgb %b0,%h0"     /* swap higher bytes    */
-           : "=q" (x)
-           : "0" (x));
+           : "=q" (val)
+           : "0" (val));
+# endif
+
+#else /* __i386__ */
+       asm("bswapl %0"
+           : "=r" (val)
+           : "0" (val));
 #endif
-       return x;
+       return val;
 }
+#define __arch_swab32 __arch_swab32
 
-static inline __attribute_const__ __u64 ___arch__swab64(__u64 val)
+static inline __attribute_const__ __u64 __arch_swab64(__u64 val)
 {
+#ifdef __i386__
        union {
                struct {
                        __u32 a;
@@ -32,50 +39,27 @@ static inline __attribute_const__ __u64 ___arch__swab64(__u64 val)
                __u64 u;
        } v;
        v.u = val;
-#ifdef CONFIG_X86_BSWAP
+# ifdef CONFIG_X86_BSWAP
        asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
            : "=r" (v.s.a), "=r" (v.s.b)
            : "0" (v.s.a), "1" (v.s.b));
-#else
-       v.s.a = ___arch__swab32(v.s.a);
-       v.s.b = ___arch__swab32(v.s.b);
+# else
+       v.s.a = __arch_swab32(v.s.a);
+       v.s.b = __arch_swab32(v.s.b);
        asm("xchgl %0,%1"
            : "=r" (v.s.a), "=r" (v.s.b)
            : "0" (v.s.a), "1" (v.s.b));
-#endif
+# endif
        return v.u;
-}
-
 #else /* __i386__ */
-
-static inline __attribute_const__ __u64 ___arch__swab64(__u64 x)
-{
        asm("bswapq %0"
-           : "=r" (x)
-           : "0" (x));
-       return x;
-}
-
-static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
-{
-       asm("bswapl %0"
-           : "=r" (x)
-           : "0" (x));
-       return x;
-}
-
+           : "=r" (val)
+           : "0" (val));
+       return val;
 #endif
+}
+#define __arch_swab64 __arch_swab64
 
-/* Do not define swab16.  Gcc is smart enough to recognize "C" version and
-   convert it into rotation or exhange.  */
-
-#define __arch__swab64(x) ___arch__swab64(x)
-#define __arch__swab32(x) ___arch__swab32(x)
-
-#define __BYTEORDER_HAS_U64__
-
-#endif /* __GNUC__ */
-
-#include <linux/byteorder/little_endian.h>
+#include <linux/byteorder.h>
 
 #endif /* _ASM_X86_BYTEORDER_H */
index cfdf8c2c5c313a0de8639577cb12a3679292637c..ea408dcba5135a04d35514e784ce7837ad90e285 100644 (file)
@@ -80,7 +80,6 @@
 #define X86_FEATURE_UP         (3*32+ 9) /* smp kernel running on up */
 #define X86_FEATURE_FXSAVE_LEAK (3*32+10) /* "" FXSAVE leaks FOP/FIP/FOP */
 #define X86_FEATURE_ARCH_PERFMON (3*32+11) /* Intel Architectural PerfMon */
-#define X86_FEATURE_NOPL       (3*32+20) /* The NOPL (0F 1F) instructions */
 #define X86_FEATURE_PEBS       (3*32+12) /* Precise-Event Based Sampling */
 #define X86_FEATURE_BTS                (3*32+13) /* Branch Trace Store */
 #define X86_FEATURE_SYSCALL32  (3*32+14) /* "" syscall in ia32 userspace */
@@ -92,6 +91,8 @@
 #define X86_FEATURE_NOPL       (3*32+20) /* The NOPL (0F 1F) instructions */
 #define X86_FEATURE_AMDC1E     (3*32+21) /* AMD C1E detected */
 #define X86_FEATURE_XTOPOLOGY  (3*32+22) /* cpu topology enum extensions */
+#define X86_FEATURE_TSC_RELIABLE (3*32+23) /* TSC is known to be reliable */
+#define X86_FEATURE_NONSTOP_TSC        (3*32+24) /* TSC does not stop in C states */
 
 /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
 #define X86_FEATURE_XMM3       (4*32+ 0) /* "pni" SSE-3 */
 #define X86_FEATURE_XSAVE      (4*32+26) /* XSAVE/XRSTOR/XSETBV/XGETBV */
 #define X86_FEATURE_OSXSAVE    (4*32+27) /* "" XSAVE enabled in the OS */
 #define X86_FEATURE_AVX                (4*32+28) /* Advanced Vector Extensions */
+#define X86_FEATURE_HYPERVISOR (4*32+31) /* Running on a hypervisor */
 
 /* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
 #define X86_FEATURE_XSTORE     (5*32+ 2) /* "rng" RNG present (xstore) */
@@ -237,6 +239,7 @@ extern const char * const x86_power_flags[32];
 #define cpu_has_xmm4_2         boot_cpu_has(X86_FEATURE_XMM4_2)
 #define cpu_has_x2apic         boot_cpu_has(X86_FEATURE_X2APIC)
 #define cpu_has_xsave          boot_cpu_has(X86_FEATURE_XSAVE)
+#define cpu_has_hypervisor     boot_cpu_has(X86_FEATURE_HYPERVISOR)
 
 #if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64)
 # define cpu_has_invlpg                1
index 7f225a4b2a26aedd2995d8c68c75df6962f19778..097794ff6b796a2f955ddc7a8eef96a249c8b94f 100644 (file)
@@ -71,15 +71,13 @@ static inline struct dma_mapping_ops *get_dma_ops(struct device *dev)
 /* Make sure we keep the same behaviour */
 static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
 {
-#ifdef CONFIG_X86_32
-       return 0;
-#else
+#ifdef CONFIG_X86_64
        struct dma_mapping_ops *ops = get_dma_ops(dev);
        if (ops->mapping_error)
                return ops->mapping_error(dev, dma_addr);
 
-       return (dma_addr == bad_dma_address);
 #endif
+       return (dma_addr == bad_dma_address);
 }
 
 #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
index 72c5a190bf48076d8b99b9f42f8a6f7a16a0e009..a95008457ea430ffbe7fdde3fc6a5fd57778ce79 100644 (file)
 #ifndef _ASM_X86_DS_H
 #define _ASM_X86_DS_H
 
-#ifdef CONFIG_X86_DS
 
 #include <linux/types.h>
 #include <linux/init.h>
 
 
+#ifdef CONFIG_X86_DS
+
 struct task_struct;
 
 /*
@@ -232,7 +233,8 @@ extern void ds_free(struct ds_context *context);
 
 #else /* CONFIG_X86_DS */
 
-#define ds_init_intel(config) do {} while (0)
+struct cpuinfo_x86;
+static inline void __cpuinit ds_init_intel(struct cpuinfo_x86 *ignored) {}
 
 #endif /* CONFIG_X86_DS */
 #endif /* _ASM_X86_DS_H */
index 94826cf874557acedd7afe248daa588a0c6383dd..cc70c1c78ca47545bb7b927f878d3cb02275f142 100644 (file)
@@ -8,7 +8,9 @@ enum reboot_type {
        BOOT_BIOS = 'b',
 #endif
        BOOT_ACPI = 'a',
-       BOOT_EFI = 'e'
+       BOOT_EFI = 'e',
+       BOOT_CF9 = 'p',
+       BOOT_CF9_COND = 'q',
 };
 
 extern enum reboot_type reboot_type;
index 380f0b4f17edfcf5c1e1440baed7231e07cdb684..e24ef876915f8833cd996c1a879b1b3ecaa54826 100644 (file)
@@ -9,31 +9,27 @@ static inline int apic_id_registered(void)
                return (1);
 }
 
-static inline cpumask_t target_cpus(void)
+static inline cpumask_t target_cpus_cluster(void)
 {
-#if defined CONFIG_ES7000_CLUSTERED_APIC
        return CPU_MASK_ALL;
-#else
+}
+
+static inline cpumask_t target_cpus(void)
+{
        return cpumask_of_cpu(smp_processor_id());
-#endif
 }
 
-#if defined CONFIG_ES7000_CLUSTERED_APIC
-#define APIC_DFR_VALUE         (APIC_DFR_CLUSTER)
-#define INT_DELIVERY_MODE      (dest_LowestPrio)
-#define INT_DEST_MODE          (1)    /* logical delivery broadcast to all procs */
-#define NO_BALANCE_IRQ         (1)
-#undef  WAKE_SECONDARY_VIA_INIT
-#define WAKE_SECONDARY_VIA_MIP
-#else
+#define APIC_DFR_VALUE_CLUSTER         (APIC_DFR_CLUSTER)
+#define INT_DELIVERY_MODE_CLUSTER      (dest_LowestPrio)
+#define INT_DEST_MODE_CLUSTER          (1) /* logical delivery broadcast to all procs */
+#define NO_BALANCE_IRQ_CLUSTER         (1)
+
 #define APIC_DFR_VALUE         (APIC_DFR_FLAT)
 #define INT_DELIVERY_MODE      (dest_Fixed)
 #define INT_DEST_MODE          (0)    /* phys delivery to target procs */
 #define NO_BALANCE_IRQ         (0)
 #undef  APIC_DEST_LOGICAL
 #define APIC_DEST_LOGICAL      0x0
-#define WAKE_SECONDARY_VIA_INIT
-#endif
 
 static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
 {
@@ -60,6 +56,16 @@ static inline unsigned long calculate_ldr(int cpu)
  * an APIC.  See e.g. "AP-388 82489DX User's Manual" (Intel
  * document number 292116).  So here it goes...
  */
+static inline void init_apic_ldr_cluster(void)
+{
+       unsigned long val;
+       int cpu = smp_processor_id();
+
+       apic_write(APIC_DFR, APIC_DFR_VALUE_CLUSTER);
+       val = calculate_ldr(cpu);
+       apic_write(APIC_LDR, val);
+}
+
 static inline void init_apic_ldr(void)
 {
        unsigned long val;
@@ -70,10 +76,6 @@ static inline void init_apic_ldr(void)
        apic_write(APIC_LDR, val);
 }
 
-#ifndef CONFIG_X86_GENERICARCH
-extern void enable_apic_mode(void);
-#endif
-
 extern int apic_version [MAX_APICS];
 static inline void setup_apic_routing(void)
 {
@@ -144,7 +146,7 @@ static inline int check_phys_apicid_present(int cpu_physical_apicid)
        return (1);
 }
 
-static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
+static inline unsigned int cpu_mask_to_apicid_cluster(cpumask_t cpumask)
 {
        int num_bits_set;
        int cpus_found = 0;
@@ -154,11 +156,7 @@ static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
        num_bits_set = cpus_weight(cpumask);
        /* Return id to all */
        if (num_bits_set == NR_CPUS)
-#if defined CONFIG_ES7000_CLUSTERED_APIC
                return 0xFF;
-#else
-               return cpu_to_logical_apicid(0);
-#endif
        /*
         * The cpus in the mask must all be on the apic cluster.  If are not
         * on the same apicid cluster return default value of TARGET_CPUS.
@@ -171,11 +169,40 @@ static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
                        if (apicid_cluster(apicid) !=
                                        apicid_cluster(new_apicid)){
                                printk ("%s: Not a valid mask!\n", __func__);
-#if defined CONFIG_ES7000_CLUSTERED_APIC
                                return 0xFF;
-#else
+                       }
+                       apicid = new_apicid;
+                       cpus_found++;
+               }
+               cpu++;
+       }
+       return apicid;
+}
+
+static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
+{
+       int num_bits_set;
+       int cpus_found = 0;
+       int cpu;
+       int apicid;
+
+       num_bits_set = cpus_weight(cpumask);
+       /* Return id to all */
+       if (num_bits_set == NR_CPUS)
+               return cpu_to_logical_apicid(0);
+       /*
+        * The cpus in the mask must all be on the apic cluster.  If are not
+        * on the same apicid cluster return default value of TARGET_CPUS.
+        */
+       cpu = first_cpu(cpumask);
+       apicid = cpu_to_logical_apicid(cpu);
+       while (cpus_found < num_bits_set) {
+               if (cpu_isset(cpu, cpumask)) {
+                       int new_apicid = cpu_to_logical_apicid(cpu);
+                       if (apicid_cluster(apicid) !=
+                                       apicid_cluster(new_apicid)){
+                               printk ("%s: Not a valid mask!\n", __func__);
                                return cpu_to_logical_apicid(0);
-#endif
                        }
                        apicid = new_apicid;
                        cpus_found++;
index 3984934619136119dfd7d95045d5930ab415e917..78f0daaee436333d9162013c62324dfe66bb1b9b 100644 (file)
@@ -1,36 +1,12 @@
 #ifndef __ASM_ES7000_WAKECPU_H
 #define __ASM_ES7000_WAKECPU_H
 
-/*
- * This file copes with machines that wakeup secondary CPUs by the
- * INIT, INIT, STARTUP sequence.
- */
-
-#ifdef CONFIG_ES7000_CLUSTERED_APIC
-#define WAKE_SECONDARY_VIA_MIP
-#else
-#define WAKE_SECONDARY_VIA_INIT
-#endif
-
-#ifdef WAKE_SECONDARY_VIA_MIP
-extern int es7000_start_cpu(int cpu, unsigned long eip);
-static inline int
-wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip)
-{
-       int boot_error = 0;
-       boot_error = es7000_start_cpu(phys_apicid, start_eip);
-       return boot_error;
-}
-#endif
-
-#define TRAMPOLINE_LOW phys_to_virt(0x467)
-#define TRAMPOLINE_HIGH phys_to_virt(0x469)
-
-#define boot_cpu_apicid boot_cpu_physical_apicid
+#define TRAMPOLINE_PHYS_LOW    0x467
+#define TRAMPOLINE_PHYS_HIGH   0x469
 
 static inline void wait_for_init_deassert(atomic_t *deassert)
 {
-#ifdef WAKE_SECONDARY_VIA_INIT
+#ifndef CONFIG_ES7000_CLUSTERED_APIC
        while (!atomic_read(deassert))
                cpu_relax();
 #endif
@@ -50,9 +26,12 @@ static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
 {
 }
 
-#define inquire_remote_apic(apicid) do {               \
-               if (apic_verbosity >= APIC_DEBUG)       \
-                       __inquire_remote_apic(apicid);  \
-       } while (0)
+extern void __inquire_remote_apic(int apicid);
+
+static inline void inquire_remote_apic(int apicid)
+{
+       if (apic_verbosity >= APIC_DEBUG)
+               __inquire_remote_apic(apicid);
+}
 
 #endif /* __ASM_MACH_WAKECPU_H */
index 5cbd4fcc06fd20425ce21ead1386c47d92d0b152..0ac17d33a8c7114a015ba2bb4971e3b5e381a6da 100644 (file)
@@ -2,6 +2,7 @@
 #define _ASM_X86_GENAPIC_32_H
 
 #include <asm/mpspec.h>
+#include <asm/atomic.h>
 
 /*
  * Generic APIC driver interface.
@@ -65,6 +66,14 @@ struct genapic {
        void (*send_IPI_allbutself)(int vector);
        void (*send_IPI_all)(int vector);
 #endif
+       int (*wakeup_cpu)(int apicid, unsigned long start_eip);
+       int trampoline_phys_low;
+       int trampoline_phys_high;
+       void (*wait_for_init_deassert)(atomic_t *deassert);
+       void (*smp_callin_clear_local_apic)(void);
+       void (*store_NMI_vector)(unsigned short *high, unsigned short *low);
+       void (*restore_NMI_vector)(unsigned short *high, unsigned short *low);
+       void (*inquire_remote_apic)(int apicid);
 };
 
 #define APICFUNC(x) .x = x,
@@ -105,16 +114,24 @@ struct genapic {
        APICFUNC(get_apic_id)                           \
        .apic_id_mask = APIC_ID_MASK,                   \
        APICFUNC(cpu_mask_to_apicid)                    \
-       APICFUNC(vector_allocation_domain)                      \
+       APICFUNC(vector_allocation_domain)              \
        APICFUNC(acpi_madt_oem_check)                   \
        IPIFUNC(send_IPI_mask)                          \
        IPIFUNC(send_IPI_allbutself)                    \
        IPIFUNC(send_IPI_all)                           \
        APICFUNC(enable_apic_mode)                      \
        APICFUNC(phys_pkg_id)                           \
+       .trampoline_phys_low = TRAMPOLINE_PHYS_LOW,             \
+       .trampoline_phys_high = TRAMPOLINE_PHYS_HIGH,           \
+       APICFUNC(wait_for_init_deassert)                \
+       APICFUNC(smp_callin_clear_local_apic)           \
+       APICFUNC(store_NMI_vector)                      \
+       APICFUNC(restore_NMI_vector)                    \
+       APICFUNC(inquire_remote_apic)                   \
 }
 
 extern struct genapic *genapic;
+extern void es7000_update_genapic_to_cluster(void);
 
 enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
 #define get_uv_system_type()           UV_NONE
index 13c4e96199ea17d1e52430dac24a85f4291f50d7..2cae011668b7e09a1397e09b7fc9241f63b48d1d 100644 (file)
@@ -32,6 +32,8 @@ struct genapic {
        unsigned int (*get_apic_id)(unsigned long x);
        unsigned long (*set_apic_id)(unsigned int id);
        unsigned long apic_id_mask;
+       /* wakeup_secondary_cpu */
+       int (*wakeup_cpu)(int apicid, unsigned long start_eip);
 };
 
 extern struct genapic *genapic;
diff --git a/arch/x86/include/asm/hypervisor.h b/arch/x86/include/asm/hypervisor.h
new file mode 100644 (file)
index 0000000..369f5c5
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2008, VMware, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
+ * NON INFRINGEMENT.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+#ifndef ASM_X86__HYPERVISOR_H
+#define ASM_X86__HYPERVISOR_H
+
+extern unsigned long get_hypervisor_tsc_freq(void);
+extern void init_hypervisor(struct cpuinfo_x86 *c);
+
+#endif
index 97989c0e534c7a8af039805dc5a04ad11ed021a5..50ca486fd88c9468fe52b4a9fb357f192fbd6ab0 100644 (file)
@@ -129,24 +129,6 @@ typedef struct compat_siginfo {
        } _sifields;
 } compat_siginfo_t;
 
-struct sigframe32 {
-       u32 pretcode;
-       int sig;
-       struct sigcontext_ia32 sc;
-       struct _fpstate_ia32 fpstate;
-       unsigned int extramask[_COMPAT_NSIG_WORDS-1];
-};
-
-struct rt_sigframe32 {
-       u32 pretcode;
-       int sig;
-       u32 pinfo;
-       u32 puc;
-       compat_siginfo_t info;
-       struct ucontext_ia32 uc;
-       struct _fpstate_ia32 fpstate;
-};
-
 struct ustat32 {
        __u32                   f_tfree;
        compat_ino_t            f_tinode;
index 44c89c3a23e9a1f9507536b4d84f0f6b3d225c61..38d87379e270596635ff569242c54ff71ad3ce69 100644 (file)
@@ -8,8 +8,13 @@ struct notifier_block;
 void idle_notifier_register(struct notifier_block *n);
 void idle_notifier_unregister(struct notifier_block *n);
 
+#ifdef CONFIG_X86_64
 void enter_idle(void);
 void exit_idle(void);
+#else /* !CONFIG_X86_64 */
+static inline void enter_idle(void) { }
+static inline void exit_idle(void) { }
+#endif /* CONFIG_X86_64 */
 
 void c1e_remove_cpu(int cpu);
 
index ac2abc88cd95fa3e9049acc0440d65d59cd47ac1..33513b9a67f3e69dad897cc01a33b1b78849ae0a 100644 (file)
@@ -4,6 +4,7 @@
 #define ARCH_HAS_IOREMAP_WC
 
 #include <linux/compiler.h>
+#include <asm-generic/int-ll64.h>
 
 #define build_mmio_read(name, size, type, reg, barrier) \
 static inline type name(const volatile void __iomem *addr) \
@@ -45,20 +46,40 @@ build_mmio_write(__writel, "l", unsigned int, "r", )
 #define mmiowb() barrier()
 
 #ifdef CONFIG_X86_64
+
 build_mmio_read(readq, "q", unsigned long, "=r", :"memory")
-build_mmio_read(__readq, "q", unsigned long, "=r", )
 build_mmio_write(writeq, "q", unsigned long, "r", :"memory")
-build_mmio_write(__writeq, "q", unsigned long, "r", )
 
-#define readq_relaxed(a) __readq(a)
-#define __raw_readq __readq
-#define __raw_writeq writeq
+#else
+
+static inline __u64 readq(const volatile void __iomem *addr)
+{
+       const volatile u32 __iomem *p = addr;
+       u32 low, high;
+
+       low = readl(p);
+       high = readl(p + 1);
+
+       return low + ((u64)high << 32);
+}
+
+static inline void writeq(__u64 val, volatile void __iomem *addr)
+{
+       writel(val, addr);
+       writel(val >> 32, addr+4);
+}
 
-/* Let people know we have them */
-#define readq readq
-#define writeq writeq
 #endif
 
+#define readq_relaxed(a)       readq(a)
+
+#define __raw_readq(a)         readq(a)
+#define __raw_writeq(val, addr)        writeq(val, addr)
+
+/* Let people know that we have them */
+#define readq                  readq
+#define writeq                 writeq
+
 extern int iommu_bio_merge;
 
 #ifdef CONFIG_X86_32
index 6afd9933a7dd96d96822a8ecb058cc2528ed09ac..e475e009ae5d4e60dc0e828ad96373ef91f2799a 100644 (file)
@@ -156,11 +156,21 @@ extern int sis_apic_bug;
 /* 1 if "noapic" boot option passed */
 extern int skip_ioapic_setup;
 
+/* 1 if "noapic" boot option passed */
+extern int noioapicquirk;
+
+/* -1 if "noapic" boot option passed */
+extern int noioapicreroute;
+
 /* 1 if the timer IRQ uses the '8259A Virtual Wire' mode */
 extern int timer_through_8259;
 
 static inline void disable_ioapic_setup(void)
 {
+#ifdef CONFIG_PCI
+       noioapicquirk = 1;
+       noioapicreroute = -1;
+#endif
        skip_ioapic_setup = 1;
 }
 
index e4a552d44465b88b0f422a5cb51fcfba23598751..0b500c5b6446e6690846fe9d13a0a5483bef2f20 100644 (file)
@@ -6,7 +6,6 @@ extern void no_iommu_init(void);
 extern struct dma_mapping_ops nommu_dma_ops;
 extern int force_iommu, no_iommu;
 extern int iommu_detected;
-extern int dmar_disabled;
 
 extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len);
 
index bae0eda954864aa62e90b6ec438b82c8785129dc..28e409fc73f3df33e4c6b2cbde5e99e0433e0fa1 100644 (file)
@@ -31,10 +31,6 @@ static inline int irq_canonicalize(int irq)
 # endif
 #endif
 
-#ifdef CONFIG_IRQBALANCE
-extern int irqbalance_disable(char *str);
-#endif
-
 #ifdef CONFIG_HOTPLUG_CPU
 #include <linux/cpumask.h>
 extern void fixup_irqs(cpumask_t map);
index af2f02d27fc7a51a8e0a5c8d4470b0f9bd90330e..86afd7473457e4cff97b120cfcde5516125a1366 100644 (file)
@@ -9,6 +9,8 @@
 
 #include <asm/percpu.h>
 
+#define ARCH_HAS_OWN_IRQ_REGS
+
 DECLARE_PER_CPU(struct pt_regs *, irq_regs);
 
 static inline struct pt_regs *get_irq_regs(void)
index ff3a6c236c00c940d3cbc94d0895399fd25828f8..6cb3a467e0673c031c6e39b675481466a0c7531a 100644 (file)
@@ -32,11 +32,13 @@ static inline cpumask_t target_cpus(void)
 #define vector_allocation_domain    (genapic->vector_allocation_domain)
 #define read_apic_id()  (GET_APIC_ID(apic_read(APIC_ID)))
 #define send_IPI_self (genapic->send_IPI_self)
+#define wakeup_secondary_cpu (genapic->wakeup_cpu)
 extern void setup_apic_routing(void);
 #else
 #define INT_DELIVERY_MODE dest_LowestPrio
 #define INT_DEST_MODE 1     /* logical delivery broadcast to all procs */
 #define TARGET_CPUS (target_cpus())
+#define wakeup_secondary_cpu wakeup_secondary_cpu_via_init
 /*
  * Set up the logical destination ID.
  *
index 9d80db91e9926f040445ebffeb44cac66ce8f4d3..ceb01366014629ba1c8220dff2a95bb313a2bf30 100644 (file)
@@ -1,17 +1,8 @@
 #ifndef _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H
 #define _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H
 
-/* 
- * This file copes with machines that wakeup secondary CPUs by the
- * INIT, INIT, STARTUP sequence.
- */
-
-#define WAKE_SECONDARY_VIA_INIT
-
-#define TRAMPOLINE_LOW phys_to_virt(0x467)
-#define TRAMPOLINE_HIGH phys_to_virt(0x469)
-
-#define boot_cpu_apicid boot_cpu_physical_apicid
+#define TRAMPOLINE_PHYS_LOW (0x467)
+#define TRAMPOLINE_PHYS_HIGH (0x469)
 
 static inline void wait_for_init_deassert(atomic_t *deassert)
 {
@@ -33,9 +24,12 @@ static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
 {
 }
 
-#define inquire_remote_apic(apicid) do {               \
-               if (apic_verbosity >= APIC_DEBUG)       \
-                       __inquire_remote_apic(apicid);  \
-       } while (0)
+extern void __inquire_remote_apic(int apicid);
+
+static inline void inquire_remote_apic(int apicid)
+{
+       if (apic_verbosity >= APIC_DEBUG)
+               __inquire_remote_apic(apicid);
+}
 
 #endif /* _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H */
index dbab36d64d48f2b15aa6be7dea09e9feb91f869f..23bf52103b8905e662e3b9e5491b89d5b8c8c933 100644 (file)
@@ -13,9 +13,11 @@ static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
        CMOS_WRITE(0xa, 0xf);
        local_flush_tlb();
        pr_debug("1.\n");
-       *((volatile unsigned short *) TRAMPOLINE_HIGH) = start_eip >> 4;
+       *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_HIGH)) =
+                                                                start_eip >> 4;
        pr_debug("2.\n");
-       *((volatile unsigned short *) TRAMPOLINE_LOW) = start_eip & 0xf;
+       *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) =
+                                                        start_eip & 0xf;
        pr_debug("3.\n");
 }
 
@@ -32,7 +34,7 @@ static inline void smpboot_restore_warm_reset_vector(void)
         */
        CMOS_WRITE(0, 0xf);
 
-       *((volatile long *) phys_to_virt(0x467)) = 0;
+       *((volatile long *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) = 0;
 }
 
 static inline void __init smpboot_setup_io_apic(void)
index 5180bd7478fbc3d2cfc533f22e707a8099201e23..e430f47df667255e26bab25ecb123702426b6e63 100644 (file)
@@ -27,6 +27,7 @@
 #define vector_allocation_domain (genapic->vector_allocation_domain)
 #define enable_apic_mode (genapic->enable_apic_mode)
 #define phys_pkg_id (genapic->phys_pkg_id)
+#define wakeup_secondary_cpu (genapic->wakeup_cpu)
 
 extern void generic_bigsmp_probe(void);
 
diff --git a/arch/x86/include/asm/mach-generic/mach_wakecpu.h b/arch/x86/include/asm/mach-generic/mach_wakecpu.h
new file mode 100644 (file)
index 0000000..1ab16b1
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H
+#define _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H
+
+#define TRAMPOLINE_PHYS_LOW (genapic->trampoline_phys_low)
+#define TRAMPOLINE_PHYS_HIGH (genapic->trampoline_phys_high)
+#define wait_for_init_deassert (genapic->wait_for_init_deassert)
+#define smp_callin_clear_local_apic (genapic->smp_callin_clear_local_apic)
+#define store_NMI_vector (genapic->store_NMI_vector)
+#define restore_NMI_vector (genapic->restore_NMI_vector)
+#define inquire_remote_apic (genapic->inquire_remote_apic)
+
+#endif /* _ASM_X86_MACH_GENERIC_MACH_APIC_H */
index 8e10015781fb2d6794aa0cfabae334956b365c88..7e98ce1d2c0e5ad8b2aca1c1e5d733cd839d9cc8 100644 (file)
@@ -4,9 +4,8 @@
 static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 #ifdef CONFIG_SMP
-       unsigned cpu = smp_processor_id();
-       if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK)
-               per_cpu(cpu_tlbstate, cpu).state = TLBSTATE_LAZY;
+       if (x86_read_percpu(cpu_tlbstate.state) == TLBSTATE_OK)
+               x86_write_percpu(cpu_tlbstate.state, TLBSTATE_LAZY);
 #endif
 }
 
@@ -20,8 +19,8 @@ static inline void switch_mm(struct mm_struct *prev,
                /* stop flush ipis for the previous mm */
                cpu_clear(cpu, prev->cpu_vm_mask);
 #ifdef CONFIG_SMP
-               per_cpu(cpu_tlbstate, cpu).state = TLBSTATE_OK;
-               per_cpu(cpu_tlbstate, cpu).active_mm = next;
+               x86_write_percpu(cpu_tlbstate.state, TLBSTATE_OK);
+               x86_write_percpu(cpu_tlbstate.active_mm, next);
 #endif
                cpu_set(cpu, next->cpu_vm_mask);
 
@@ -36,8 +35,8 @@ static inline void switch_mm(struct mm_struct *prev,
        }
 #ifdef CONFIG_SMP
        else {
-               per_cpu(cpu_tlbstate, cpu).state = TLBSTATE_OK;
-               BUG_ON(per_cpu(cpu_tlbstate, cpu).active_mm != next);
+               x86_write_percpu(cpu_tlbstate.state, TLBSTATE_OK);
+               BUG_ON(x86_read_percpu(cpu_tlbstate.active_mm) != next);
 
                if (!cpu_test_and_set(cpu, next->cpu_vm_mask)) {
                        /* We were in lazy tlb mode and leave_mm disabled
index 485bdf059ffbeacb5703b71b5ef3b9ad1f35ad7c..07f1af494ca5c011801c9260a088d2dd34a4ae8e 100644 (file)
@@ -34,10 +34,14 @@ static inline void get_memcfg_numa(void)
 
 extern int early_pfn_to_nid(unsigned long pfn);
 
+extern void resume_map_numa_kva(pgd_t *pgd);
+
 #else /* !CONFIG_NUMA */
 
 #define get_memcfg_numa get_memcfg_numa_flat
 
+static inline void resume_map_numa_kva(pgd_t *pgd) {}
+
 #endif /* CONFIG_NUMA */
 
 #ifdef CONFIG_DISCONTIGMEM
index e38859d577a117e1cc1ae2cf75e278c595cfb369..cb58643947b963dcc276cbf81ab1cf92b6dd149a 100644 (file)
@@ -85,7 +85,9 @@
 /* AMD64 MSRs. Not complete. See the architecture manual for a more
    complete list. */
 
+#define MSR_AMD64_PATCH_LEVEL          0x0000008b
 #define MSR_AMD64_NB_CFG               0xc001001f
+#define MSR_AMD64_PATCH_LOADER         0xc0010020
 #define MSR_AMD64_IBSFETCHCTL          0xc0011030
 #define MSR_AMD64_IBSFETCHLINAD                0xc0011031
 #define MSR_AMD64_IBSFETCHPHYSAD       0xc0011032
index c2a812ebde890e590794ea1e2d8a39d5cec49e9f..4640ddd58fb9599ac0c604d8f6be4e15b8233fe2 100644 (file)
@@ -22,10 +22,10 @@ static inline unsigned long long native_read_tscp(unsigned int *aux)
 }
 
 /*
- * i386 calling convention returns 64-bit value in edx:eax, while
- * x86_64 returns at rax. Also, the "A" constraint does not really
- * mean rdx:rax in x86_64, so we need specialized behaviour for each
- * architecture
+ * both i386 and x86_64 returns 64-bit value in edx:eax, but gcc's "A"
+ * constraint has different meanings. For i386, "A" means exactly
+ * edx:eax, while for x86_64 it doesn't mean rdx:rax or edx:eax. Instead,
+ * it means rax *or* rdx.
  */
 #ifdef CONFIG_X86_64
 #define DECLARE_ARGS(val, low, high)   unsigned low, high
@@ -181,10 +181,10 @@ static inline int rdmsrl_amd_safe(unsigned msr, unsigned long long *p)
 }
 
 #define rdtscl(low)                                            \
-       ((low) = (u32)native_read_tsc())
+       ((low) = (u32)__native_read_tsc())
 
 #define rdtscll(val)                                           \
-       ((val) = native_read_tsc())
+       ((val) = __native_read_tsc())
 
 #define rdpmc(counter, low, high)                      \
 do {                                                   \
index c577bda5b1c52c768047d1e664e0040356b57176..6f499df8eddbfd4246132bd570b87bfde68b4e00 100644 (file)
@@ -3,12 +3,8 @@
 
 /* This file copes with machines that wakeup secondary CPUs by NMIs */
 
-#define WAKE_SECONDARY_VIA_NMI
-
-#define TRAMPOLINE_LOW phys_to_virt(0x8)
-#define TRAMPOLINE_HIGH phys_to_virt(0xa)
-
-#define boot_cpu_apicid boot_cpu_logical_apicid
+#define TRAMPOLINE_PHYS_LOW (0x8)
+#define TRAMPOLINE_PHYS_HIGH (0xa)
 
 /* We don't do anything here because we use NMI's to boot instead */
 static inline void wait_for_init_deassert(atomic_t *deassert)
@@ -27,17 +23,23 @@ static inline void smp_callin_clear_local_apic(void)
 static inline void store_NMI_vector(unsigned short *high, unsigned short *low)
 {
        printk("Storing NMI vector\n");
-       *high = *((volatile unsigned short *) TRAMPOLINE_HIGH);
-       *low = *((volatile unsigned short *) TRAMPOLINE_LOW);
+       *high =
+         *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_HIGH));
+       *low =
+         *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_LOW));
 }
 
 static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
 {
        printk("Restoring NMI vector\n");
-       *((volatile unsigned short *) TRAMPOLINE_HIGH) = *high;
-       *((volatile unsigned short *) TRAMPOLINE_LOW) = *low;
+       *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_HIGH)) =
+                                                                *high;
+       *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) =
+                                                                *low;
 }
 
-#define inquire_remote_apic(apicid) {}
+static inline void inquire_remote_apic(int apicid)
+{
+}
 
 #endif /* __ASM_NUMAQ_WAKECPU_H */
index 875b38edf19383f0e1176b9a73dede0f49f42c38..647781298e7ef7cbc98b14ad75f2552b0092507f 100644 (file)
@@ -19,6 +19,8 @@ struct pci_sysdata {
 };
 
 extern int pci_routeirq;
+extern int noioapicquirk;
+extern int noioapicreroute;
 
 /* scan a bus after allocating a pci_sysdata for it */
 extern struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops,
index 5b28995d664e9a092b4054f770751b3413f50edf..d02d936840a3ed8e3b7f94fade13929c9a3d6413 100644 (file)
@@ -34,8 +34,6 @@ extern void pci_iommu_alloc(void);
  */
 #define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys)
 
-#if defined(CONFIG_GART_IOMMU) || defined(CONFIG_CALGARY_IOMMU)
-
 #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)      \
        dma_addr_t ADDR_NAME;
 #define DECLARE_PCI_UNMAP_LEN(LEN_NAME)                \
@@ -49,18 +47,6 @@ extern void pci_iommu_alloc(void);
 #define pci_unmap_len_set(PTR, LEN_NAME, VAL)          \
        (((PTR)->LEN_NAME) = (VAL))
 
-#else
-/* No IOMMU */
-
-#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
-#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
-#define pci_unmap_addr(PTR, ADDR_NAME)         (0)
-#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL)        do { } while (0)
-#define pci_unmap_len(PTR, LEN_NAME)           (0)
-#define pci_unmap_len_set(PTR, LEN_NAME, VAL)  do { } while (0)
-
-#endif
-
 #endif /* __KERNEL__ */
 
 #endif /* _ASM_X86_PCI_64_H */
index b17edfd23628953139fa58778fa7ae2d66222222..e0d199fe1d83896578421d79aac509ebd843fdf3 100644 (file)
@@ -56,23 +56,55 @@ static inline pte_t native_ptep_get_and_clear(pte_t *xp)
 #define pte_none(x)            (!(x).pte_low)
 
 /*
- * Bits 0, 6 and 7 are taken, split up the 29 bits of offset
- * into this range:
+ * Bits _PAGE_BIT_PRESENT, _PAGE_BIT_FILE and _PAGE_BIT_PROTNONE are taken,
+ * split up the 29 bits of offset into this range:
  */
 #define PTE_FILE_MAX_BITS      29
+#define PTE_FILE_SHIFT1                (_PAGE_BIT_PRESENT + 1)
+#if _PAGE_BIT_FILE < _PAGE_BIT_PROTNONE
+#define PTE_FILE_SHIFT2                (_PAGE_BIT_FILE + 1)
+#define PTE_FILE_SHIFT3                (_PAGE_BIT_PROTNONE + 1)
+#else
+#define PTE_FILE_SHIFT2                (_PAGE_BIT_PROTNONE + 1)
+#define PTE_FILE_SHIFT3                (_PAGE_BIT_FILE + 1)
+#endif
+#define PTE_FILE_BITS1         (PTE_FILE_SHIFT2 - PTE_FILE_SHIFT1 - 1)
+#define PTE_FILE_BITS2         (PTE_FILE_SHIFT3 - PTE_FILE_SHIFT2 - 1)
 
 #define pte_to_pgoff(pte)                                              \
-       ((((pte).pte_low >> 1) & 0x1f) + (((pte).pte_low >> 8) << 5))
+       ((((pte).pte_low >> PTE_FILE_SHIFT1)                            \
+         & ((1U << PTE_FILE_BITS1) - 1))                               \
+        + ((((pte).pte_low >> PTE_FILE_SHIFT2)                         \
+            & ((1U << PTE_FILE_BITS2) - 1)) << PTE_FILE_BITS1)         \
+        + (((pte).pte_low >> PTE_FILE_SHIFT3)                          \
+           << (PTE_FILE_BITS1 + PTE_FILE_BITS2)))
 
 #define pgoff_to_pte(off)                                              \
-       ((pte_t) { .pte_low = (((off) & 0x1f) << 1) +                   \
-                       (((off) >> 5) << 8) + _PAGE_FILE })
+       ((pte_t) { .pte_low =                                           \
+        (((off) & ((1U << PTE_FILE_BITS1) - 1)) << PTE_FILE_SHIFT1)    \
+        + ((((off) >> PTE_FILE_BITS1) & ((1U << PTE_FILE_BITS2) - 1))  \
+           << PTE_FILE_SHIFT2)                                         \
+        + (((off) >> (PTE_FILE_BITS1 + PTE_FILE_BITS2))                \
+           << PTE_FILE_SHIFT3)                                         \
+        + _PAGE_FILE })
 
 /* Encode and de-code a swap entry */
-#define __swp_type(x)                  (((x).val >> 1) & 0x1f)
-#define __swp_offset(x)                        ((x).val >> 8)
-#define __swp_entry(type, offset)                              \
-       ((swp_entry_t) { ((type) << 1) | ((offset) << 8) })
+#if _PAGE_BIT_FILE < _PAGE_BIT_PROTNONE
+#define SWP_TYPE_BITS (_PAGE_BIT_FILE - _PAGE_BIT_PRESENT - 1)
+#define SWP_OFFSET_SHIFT (_PAGE_BIT_PROTNONE + 1)
+#else
+#define SWP_TYPE_BITS (_PAGE_BIT_PROTNONE - _PAGE_BIT_PRESENT - 1)
+#define SWP_OFFSET_SHIFT (_PAGE_BIT_FILE + 1)
+#endif
+
+#define MAX_SWAPFILES_CHECK() BUILD_BUG_ON(MAX_SWAPFILES_SHIFT > SWP_TYPE_BITS)
+
+#define __swp_type(x)                  (((x).val >> (_PAGE_BIT_PRESENT + 1)) \
+                                        & ((1U << SWP_TYPE_BITS) - 1))
+#define __swp_offset(x)                        ((x).val >> SWP_OFFSET_SHIFT)
+#define __swp_entry(type, offset)      ((swp_entry_t) { \
+                                        ((type) << (_PAGE_BIT_PRESENT + 1)) \
+                                        | ((offset) << SWP_OFFSET_SHIFT) })
 #define __pte_to_swp_entry(pte)                ((swp_entry_t) { (pte).pte_low })
 #define __swp_entry_to_pte(x)          ((pte_t) { .pte = (x).val })
 
index 52597aeadfff029e0b45aa57ee5030a15e774289..447da43cddb360a6f92a2ce98896599359546e6d 100644 (file)
@@ -166,6 +166,7 @@ static inline int pte_none(pte_t pte)
 #define PTE_FILE_MAX_BITS       32
 
 /* Encode and de-code a swap entry */
+#define MAX_SWAPFILES_CHECK() BUILD_BUG_ON(MAX_SWAPFILES_SHIFT > 5)
 #define __swp_type(x)                  (((x).val) & 0x1f)
 #define __swp_offset(x)                        ((x).val >> 5)
 #define __swp_entry(type, offset)      ((swp_entry_t){(type) | (offset) << 5})
index c012f3b11671574150720dcaee023780cd79d905..83e69f4a37f03bafb39869169d6286210c7c95df 100644 (file)
@@ -10,7 +10,6 @@
 #define _PAGE_BIT_PCD          4       /* page cache disabled */
 #define _PAGE_BIT_ACCESSED     5       /* was accessed (raised by CPU) */
 #define _PAGE_BIT_DIRTY                6       /* was written to (raised by CPU) */
-#define _PAGE_BIT_FILE         6
 #define _PAGE_BIT_PSE          7       /* 4 MB (or 2MB) page */
 #define _PAGE_BIT_PAT          7       /* on 4KB pages */
 #define _PAGE_BIT_GLOBAL       8       /* Global TLB entry PPro+ */
 #define _PAGE_BIT_CPA_TEST     _PAGE_BIT_UNUSED1
 #define _PAGE_BIT_NX           63       /* No execute: only valid after cpuid check */
 
+/* If _PAGE_BIT_PRESENT is clear, we use these: */
+/* - if the user mapped it with PROT_NONE; pte_present gives true */
+#define _PAGE_BIT_PROTNONE     _PAGE_BIT_GLOBAL
+/* - set: nonlinear file mapping, saved PTE; unset:swap */
+#define _PAGE_BIT_FILE         _PAGE_BIT_DIRTY
+
 #define _PAGE_PRESENT  (_AT(pteval_t, 1) << _PAGE_BIT_PRESENT)
 #define _PAGE_RW       (_AT(pteval_t, 1) << _PAGE_BIT_RW)
 #define _PAGE_USER     (_AT(pteval_t, 1) << _PAGE_BIT_USER)
 #define _PAGE_NX       (_AT(pteval_t, 0))
 #endif
 
-/* If _PAGE_PRESENT is clear, we use these: */
-#define _PAGE_FILE     _PAGE_DIRTY     /* nonlinear file mapping,
-                                        * saved PTE; unset:swap */
-#define _PAGE_PROTNONE _PAGE_PSE       /* if the user mapped it with PROT_NONE;
-                                          pte_present gives true */
+#define _PAGE_FILE     (_AT(pteval_t, 1) << _PAGE_BIT_FILE)
+#define _PAGE_PROTNONE (_AT(pteval_t, 1) << _PAGE_BIT_PROTNONE)
 
 #define _PAGE_TABLE    (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER |        \
                         _PAGE_ACCESSED | _PAGE_DIRTY)
 #define PGD_IDENT_ATTR  0x001          /* PRESENT (no other attributes) */
 #endif
 
+/*
+ * Macro to mark a page protection value as UC-
+ */
+#define pgprot_noncached(prot)                                 \
+       ((boot_cpu_data.x86 > 3)                                \
+        ? (__pgprot(pgprot_val(prot) | _PAGE_CACHE_UC_MINUS))  \
+        : (prot))
+
 #ifndef __ASSEMBLY__
 
+#define pgprot_writecombine    pgprot_writecombine
+extern pgprot_t pgprot_writecombine(pgprot_t prot);
+
 /*
  * ZERO_PAGE is a global shared page that is always zero: used
  * for zero-mapped memory areas etc..
@@ -329,6 +342,9 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
 #define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask)
 
 #ifndef __ASSEMBLY__
+/* Indicate that x86 has its own track and untrack pfn vma functions */
+#define __HAVE_PFNMAP_TRACKING
+
 #define __HAVE_PHYS_MEM_ACCESS_PROT
 struct file;
 pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
index f9d5889b336be5eb5d9f575d22ac512be7d63f7e..72b020deb46b9352a5365410b2011e55b4c56021 100644 (file)
@@ -100,15 +100,6 @@ extern unsigned long pg0[];
 # include <asm/pgtable-2level.h>
 #endif
 
-/*
- * Macro to mark a page protection value as "uncacheable".
- * On processors which do not support it, this is a no-op.
- */
-#define pgprot_noncached(prot)                                 \
-       ((boot_cpu_data.x86 > 3)                                \
-        ? (__pgprot(pgprot_val(prot) | _PAGE_PCD | _PAGE_PWT)) \
-        : (prot))
-
 /*
  * Conversion functions: convert a page and protection to a page entry,
  * and a page entry and page directory to the page they refer to.
index 545a0e042bb2d44268d7a240e97b2c14309568b9..ba09289accaa0322c70fb580a40f83677a900c9f 100644 (file)
@@ -146,7 +146,7 @@ static inline void native_pgd_clear(pgd_t *pgd)
 #define PGDIR_MASK     (~(PGDIR_SIZE - 1))
 
 
-#define MAXMEM          _AC(0x00003fffffffffff, UL)
+#define MAXMEM          _AC(__AC(1, UL) << MAX_PHYSMEM_BITS, UL)
 #define VMALLOC_START    _AC(0xffffc20000000000, UL)
 #define VMALLOC_END      _AC(0xffffe1ffffffffff, UL)
 #define VMEMMAP_START   _AC(0xffffe20000000000, UL)
@@ -176,12 +176,6 @@ static inline int pmd_bad(pmd_t pmd)
 
 #define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT))   /* FIXME: is this right? */
 
-/*
- * Macro to mark a page protection value as "uncacheable".
- */
-#define pgprot_noncached(prot)                                 \
-       (__pgprot(pgprot_val((prot)) | _PAGE_PCD | _PAGE_PWT))
-
 /*
  * Conversion functions: convert a page and protection to a page entry,
  * and a page entry and page directory to the page they refer to.
@@ -250,10 +244,22 @@ static inline int pud_large(pud_t pte)
 extern int direct_gbpages;
 
 /* Encode and de-code a swap entry */
-#define __swp_type(x)                  (((x).val >> 1) & 0x3f)
-#define __swp_offset(x)                        ((x).val >> 8)
-#define __swp_entry(type, offset)      ((swp_entry_t) { ((type) << 1) | \
-                                                        ((offset) << 8) })
+#if _PAGE_BIT_FILE < _PAGE_BIT_PROTNONE
+#define SWP_TYPE_BITS (_PAGE_BIT_FILE - _PAGE_BIT_PRESENT - 1)
+#define SWP_OFFSET_SHIFT (_PAGE_BIT_PROTNONE + 1)
+#else
+#define SWP_TYPE_BITS (_PAGE_BIT_PROTNONE - _PAGE_BIT_PRESENT - 1)
+#define SWP_OFFSET_SHIFT (_PAGE_BIT_FILE + 1)
+#endif
+
+#define MAX_SWAPFILES_CHECK() BUILD_BUG_ON(MAX_SWAPFILES_SHIFT > SWP_TYPE_BITS)
+
+#define __swp_type(x)                  (((x).val >> (_PAGE_BIT_PRESENT + 1)) \
+                                        & ((1U << SWP_TYPE_BITS) - 1))
+#define __swp_offset(x)                        ((x).val >> SWP_OFFSET_SHIFT)
+#define __swp_entry(type, offset)      ((swp_entry_t) { \
+                                        ((type) << (_PAGE_BIT_PRESENT + 1)) \
+                                        | ((offset) << SWP_OFFSET_SHIFT) })
 #define __pte_to_swp_entry(pte)                ((swp_entry_t) { pte_val((pte)) })
 #define __swp_entry_to_pte(x)          ((pte_t) { .pte = (x).val })
 
index fe681147a4f78fcd5cc0235cff57616af81e3f38..a8894647dd9aba3fd5139eb2277e39a10d17cacb 100644 (file)
@@ -6,5 +6,8 @@
 #define ARCH_GET_FS 0x1003
 #define ARCH_GET_GS 0x1004
 
+#ifdef CONFIG_X86_64
+extern long sys_arch_prctl(int, unsigned long);
+#endif /* CONFIG_X86_64 */
 
 #endif /* _ASM_X86_PRCTL_H */
index 5ca01e3832699b0378c36d79a4d17361a3d27b88..a570eafa4755e6571b8e7cacc3c0746019efbf5e 100644 (file)
@@ -110,6 +110,7 @@ struct cpuinfo_x86 {
        /* Index into per_cpu list: */
        u16                     cpu_index;
 #endif
+       unsigned int            x86_hyper_vendor;
 } __attribute__((__aligned__(SMP_CACHE_BYTES)));
 
 #define X86_VENDOR_INTEL       0
@@ -123,6 +124,9 @@ struct cpuinfo_x86 {
 
 #define X86_VENDOR_UNKNOWN     0xff
 
+#define X86_HYPER_VENDOR_NONE  0
+#define X86_HYPER_VENDOR_VMWARE 1
+
 /*
  * capabilities of CPUs
  */
index d1531c8480b78fdb42feb018c88e122ad93191b4..eefb0594b058917c7a93893f1f89a88973d8bfbc 100644 (file)
@@ -271,8 +271,6 @@ extern int do_get_thread_area(struct task_struct *p, int idx,
 extern int do_set_thread_area(struct task_struct *p, int idx,
                              struct user_desc __user *info, int can_allocate);
 
-#define __ARCH_WANT_COMPAT_SYS_PTRACE
-
 #endif /* __KERNEL__ */
 
 #endif /* !__ASSEMBLY__ */
index f12d37237465df8b0a181d37685b212c0dd70cd1..4fcd53fd5f43c06c26a8e057fa4f65b5603cf89b 100644 (file)
@@ -8,6 +8,10 @@
 /* Interrupt control for vSMPowered x86_64 systems */
 void vsmp_init(void);
 
+
+void setup_bios_corruption_check(void);
+
+
 #ifdef CONFIG_X86_VISWS
 extern void visws_early_detect(void);
 extern int is_visws_box(void);
@@ -16,6 +20,8 @@ static inline void visws_early_detect(void) { }
 static inline int is_visws_box(void) { return 0; }
 #endif
 
+extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
+extern int wakeup_secondary_cpu_via_init(int apicid, unsigned long start_eip);
 /*
  * Any setup quirks to be performed?
  */
@@ -39,6 +45,7 @@ struct x86_quirks {
        void (*smp_read_mpc_oem)(struct mp_config_oemtable *oemtable,
                                     unsigned short oemsize);
        int (*setup_ioapic_ids)(void);
+       int (*update_genapic)(void);
 };
 
 extern struct x86_quirks *x86_quirks;
diff --git a/arch/x86/include/asm/sigframe.h b/arch/x86/include/asm/sigframe.h
new file mode 100644 (file)
index 0000000..4e0fe26
--- /dev/null
@@ -0,0 +1,70 @@
+#ifndef _ASM_X86_SIGFRAME_H
+#define _ASM_X86_SIGFRAME_H
+
+#include <asm/sigcontext.h>
+#include <asm/siginfo.h>
+#include <asm/ucontext.h>
+
+#ifdef CONFIG_X86_32
+#define sigframe_ia32          sigframe
+#define rt_sigframe_ia32       rt_sigframe
+#define sigcontext_ia32                sigcontext
+#define _fpstate_ia32          _fpstate
+#define ucontext_ia32          ucontext
+#else /* !CONFIG_X86_32 */
+
+#ifdef CONFIG_IA32_EMULATION
+#include <asm/ia32.h>
+#endif /* CONFIG_IA32_EMULATION */
+
+#endif /* CONFIG_X86_32 */
+
+#if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
+struct sigframe_ia32 {
+       u32 pretcode;
+       int sig;
+       struct sigcontext_ia32 sc;
+       /*
+        * fpstate is unused. fpstate is moved/allocated after
+        * retcode[] below. This movement allows to have the FP state and the
+        * future state extensions (xsave) stay together.
+        * And at the same time retaining the unused fpstate, prevents changing
+        * the offset of extramask[] in the sigframe and thus prevent any
+        * legacy application accessing/modifying it.
+        */
+       struct _fpstate_ia32 fpstate_unused;
+#ifdef CONFIG_IA32_EMULATION
+       unsigned int extramask[_COMPAT_NSIG_WORDS-1];
+#else /* !CONFIG_IA32_EMULATION */
+       unsigned long extramask[_NSIG_WORDS-1];
+#endif /* CONFIG_IA32_EMULATION */
+       char retcode[8];
+       /* fp state follows here */
+};
+
+struct rt_sigframe_ia32 {
+       u32 pretcode;
+       int sig;
+       u32 pinfo;
+       u32 puc;
+#ifdef CONFIG_IA32_EMULATION
+       compat_siginfo_t info;
+#else /* !CONFIG_IA32_EMULATION */
+       struct siginfo info;
+#endif /* CONFIG_IA32_EMULATION */
+       struct ucontext_ia32 uc;
+       char retcode[8];
+       /* fp state follows here */
+};
+#endif /* defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION) */
+
+#ifdef CONFIG_X86_64
+struct rt_sigframe {
+       char __user *pretcode;
+       struct ucontext uc;
+       struct siginfo info;
+       /* fp state follows here */
+};
+#endif /* CONFIG_X86_64 */
+
+#endif /* _ASM_X86_SIGFRAME_H */
index 96ac44f275da40f24a73b5180b9e4c240d5fc8ba..7761a5d554bb2eb567024375b5bb3c083991946f 100644 (file)
@@ -121,6 +121,10 @@ typedef unsigned long sigset_t;
 
 #ifndef __ASSEMBLY__
 
+# ifdef __KERNEL__
+extern void do_notify_resume(struct pt_regs *, void *, __u32);
+# endif /* __KERNEL__ */
+
 #ifdef __i386__
 # ifdef __KERNEL__
 struct old_sigaction {
@@ -141,8 +145,6 @@ struct k_sigaction {
        struct sigaction sa;
 };
 
-extern void do_notify_resume(struct pt_regs *, void *, __u32);
-
 # else /* __KERNEL__ */
 /* Here we must cater to libcs that poke about in kernel headers.  */
 
index be44f7dab395ad87492e0021cbf7adb99cadb1d2..e3cc3c063ec5e77683c088fd80906de90fbf9bd2 100644 (file)
@@ -27,7 +27,7 @@
 #else /* CONFIG_X86_32 */
 # define SECTION_SIZE_BITS     27 /* matt - 128 is convenient right now */
 # define MAX_PHYSADDR_BITS     44
-# define MAX_PHYSMEM_BITS      44
+# define MAX_PHYSMEM_BITS      44 /* Can be max 45 bits */
 #endif
 
 #endif /* CONFIG_SPARSEMEM */
index 87803da440100d50222d86cf7a1ac9cf00ed29ca..9c6797c3e56c1363e9f0376c7dea3f8733b81fe6 100644 (file)
 /* kernel/ioport.c */
 asmlinkage long sys_ioperm(unsigned long, unsigned long, int);
 
+/* kernel/ldt.c */
+asmlinkage int sys_modify_ldt(int, void __user *, unsigned long);
+
+/* kernel/tls.c */
+asmlinkage int sys_set_thread_area(struct user_desc __user *);
+asmlinkage int sys_get_thread_area(struct user_desc __user *);
+
 /* X86_32 only */
 #ifdef CONFIG_X86_32
 /* kernel/process_32.c */
@@ -33,14 +40,11 @@ asmlinkage int sys_sigaction(int, const struct old_sigaction __user *,
                             struct old_sigaction __user *);
 asmlinkage int sys_sigaltstack(unsigned long);
 asmlinkage unsigned long sys_sigreturn(unsigned long);
-asmlinkage int sys_rt_sigreturn(unsigned long);
+asmlinkage int sys_rt_sigreturn(struct pt_regs);
 
 /* kernel/ioport.c */
 asmlinkage long sys_iopl(unsigned long);
 
-/* kernel/ldt.c */
-asmlinkage int sys_modify_ldt(int, void __user *, unsigned long);
-
 /* kernel/sys_i386_32.c */
 asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long,
                          unsigned long, unsigned long, unsigned long);
@@ -54,10 +58,6 @@ asmlinkage int sys_uname(struct old_utsname __user *);
 struct oldold_utsname;
 asmlinkage int sys_olduname(struct oldold_utsname __user *);
 
-/* kernel/tls.c */
-asmlinkage int sys_set_thread_area(struct user_desc __user *);
-asmlinkage int sys_get_thread_area(struct user_desc __user *);
-
 /* kernel/vm86_32.c */
 asmlinkage int sys_vm86old(struct pt_regs);
 asmlinkage int sys_vm86(struct pt_regs);
index 2ed3f0f44ff73519a149b37c9bd658a26361c8de..8e626ea33a1a64d1565c10a0784200ef92ec9a31 100644 (file)
 # define AT_VECTOR_SIZE_ARCH 1
 #endif
 
-#ifdef CONFIG_X86_32
-
 struct task_struct; /* one of the stranger aspects of C forward declarations */
 struct task_struct *__switch_to(struct task_struct *prev,
                                struct task_struct *next);
 
+#ifdef CONFIG_X86_32
+
 /*
  * Saving eflags is important. It switches not only IOPL between tasks,
  * it also protects other tasks from NT leaking through sysenter etc.
@@ -314,6 +314,8 @@ extern void free_init_pages(char *what, unsigned long begin, unsigned long end);
 
 void default_idle(void);
 
+void stop_this_cpu(void *dummy);
+
 /*
  * Force strict CPU ordering.
  * And yes, this is required on UP too when we're talking
index e44d379faad2b891245ef9cc2332dcaf8f8491c5..8dbc57390d2573c495afbd03ddf33d4dac390a42 100644 (file)
@@ -24,7 +24,7 @@ struct exec_domain;
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
        struct exec_domain      *exec_domain;   /* execution domain */
-       unsigned long           flags;          /* low level flags */
+       __u32                   flags;          /* low level flags */
        __u32                   status;         /* thread synchronous flags */
        __u32                   cpu;            /* current CPU */
        int                     preempt_count;  /* 0 => preemptable,
index 4850e4b02b61b255c14db559feb136e80a2f32c9..ff386ff50ed766d5d8c4e661d9ef2c3acef3162f 100644 (file)
@@ -239,7 +239,7 @@ struct pci_bus;
 void set_pci_bus_resources_arch_default(struct pci_bus *b);
 
 #ifdef CONFIG_SMP
-#define mc_capable()                   (boot_cpu_data.x86_max_cores > 1)
+#define mc_capable()   (cpus_weight(per_cpu(cpu_core_map, 0)) != nr_cpu_ids)
 #define smt_capable()                  (smp_num_siblings > 1)
 #endif
 
index fa0d79facdbc4b0175db51082d1afcaad3f4a060..780ba0ab94f908da84b44d71f1740d47ac2677de 100644 (file)
@@ -3,6 +3,7 @@
 
 #ifndef __ASSEMBLY__
 
+#ifdef CONFIG_X86_TRAMPOLINE
 /*
  * Trampoline 80x86 program as an array.
  */
@@ -13,8 +14,14 @@ extern unsigned char *trampoline_base;
 extern unsigned long init_rsp;
 extern unsigned long initial_code;
 
+#define TRAMPOLINE_SIZE roundup(trampoline_end - trampoline_data, PAGE_SIZE)
 #define TRAMPOLINE_BASE 0x6000
+
 extern unsigned long setup_trampoline(void);
+extern void __init reserve_trampoline_memory(void);
+#else
+static inline void reserve_trampoline_memory(void) {};
+#endif /* CONFIG_X86_TRAMPOLINE */
 
 #endif /* __ASSEMBLY__ */
 
index 45dee286e45cda98bc1fe20e79c30ccded41ff5d..2ee0a3bceedf4738cc0e65b1cda67110399550f1 100644 (file)
@@ -46,6 +46,10 @@ dotraplinkage void do_coprocessor_segment_overrun(struct pt_regs *, long);
 dotraplinkage void do_invalid_TSS(struct pt_regs *, long);
 dotraplinkage void do_segment_not_present(struct pt_regs *, long);
 dotraplinkage void do_stack_segment(struct pt_regs *, long);
+#ifdef CONFIG_X86_64
+dotraplinkage void do_double_fault(struct pt_regs *, long);
+asmlinkage __kprobes struct pt_regs *sync_regs(struct pt_regs *);
+#endif
 dotraplinkage void do_general_protection(struct pt_regs *, long);
 dotraplinkage void do_page_fault(struct pt_regs *, unsigned long);
 dotraplinkage void do_spurious_interrupt_bug(struct pt_regs *, long);
@@ -72,10 +76,13 @@ static inline int get_si_code(unsigned long condition)
 extern int panic_on_unrecovered_nmi;
 extern int kstack_depth_to_print;
 
-#ifdef CONFIG_X86_32
 void math_error(void __user *);
-unsigned long patch_espfix_desc(unsigned long, unsigned long);
 asmlinkage void math_emulate(long);
+#ifdef CONFIG_X86_32
+unsigned long patch_espfix_desc(unsigned long, unsigned long);
+#else
+asmlinkage void smp_thermal_interrupt(void);
+asmlinkage void mce_threshold_interrupt(void);
 #endif
 
 #endif /* _ASM_X86_TRAPS_H */
index 9cd83a8e40d59a3dae2978e23887d81311370ae3..38ae163cc91b00bf029d5ed5e29cd8ba96bd461b 100644 (file)
@@ -34,8 +34,6 @@ static inline cycles_t get_cycles(void)
 
 static __always_inline cycles_t vget_cycles(void)
 {
-       cycles_t cycles;
-
        /*
         * We only do VDSOs on TSC capable CPUs, so this shouldnt
         * access boot_cpu_data (which is not VDSO-safe):
@@ -44,11 +42,7 @@ static __always_inline cycles_t vget_cycles(void)
        if (!cpu_has_tsc)
                return 0;
 #endif
-       rdtsc_barrier();
-       cycles = (cycles_t)__native_read_tsc();
-       rdtsc_barrier();
-
-       return cycles;
+       return (cycles_t)__native_read_tsc();
 }
 
 extern void tsc_init(void);
index 35c54921b2e434cdd95bbd223077f2b1155d0f1f..580c3ee6c58c4d0479dbce9ea491c78049255e04 100644 (file)
@@ -350,14 +350,14 @@ do {                                                                      \
 
 #define __put_user_nocheck(x, ptr, size)                       \
 ({                                                             \
-       long __pu_err;                                          \
+       int __pu_err;                                           \
        __put_user_size((x), (ptr), (size), __pu_err, -EFAULT); \
        __pu_err;                                               \
 })
 
 #define __get_user_nocheck(x, ptr, size)                               \
 ({                                                                     \
-       long __gu_err;                                                  \
+       int __gu_err;                                                   \
        unsigned long __gu_val;                                         \
        __get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT);    \
        (x) = (__force __typeof__(*(ptr)))__gu_val;                     \
index 664f15280f14354dc057e1d97954db6baab4b959..f8cfd00db450f2e0f948ce7128a2d44867aebf59 100644 (file)
@@ -46,7 +46,7 @@ int __copy_from_user(void *dst, const void __user *src, unsigned size)
                return ret;
        case 10:
                __get_user_asm(*(u64 *)dst, (u64 __user *)src,
-                              ret, "q", "", "=r", 16);
+                              ret, "q", "", "=r", 10);
                if (unlikely(ret))
                        return ret;
                __get_user_asm(*(u16 *)(8 + (char *)dst),
index 834b2c1d89fb1a51cb32a47f647ad8b1e3c1bc4d..d2e415e6666f63d314270ef57a26dae73e3fac01 100644 (file)
@@ -639,8 +639,8 @@ __SYSCALL(__NR_fallocate, sys_fallocate)
 __SYSCALL(__NR_timerfd_settime, sys_timerfd_settime)
 #define __NR_timerfd_gettime                   287
 __SYSCALL(__NR_timerfd_gettime, sys_timerfd_gettime)
-#define __NR_paccept                           288
-__SYSCALL(__NR_paccept, sys_paccept)
+#define __NR_accept4                           288
+__SYSCALL(__NR_accept4, sys_accept4)
 #define __NR_signalfd4                         289
 __SYSCALL(__NR_signalfd4, sys_signalfd4)
 #define __NR_eventfd2                          290
index d931d3b7e6f71b394d87f5766835dd8ef892dfec..7ed17ff502b9edd76afb96fe682609a4df1afffe 100644 (file)
 enum uv_bios_cmd {
        UV_BIOS_COMMON,
        UV_BIOS_GET_SN_INFO,
-       UV_BIOS_FREQ_BASE
+       UV_BIOS_FREQ_BASE,
+       UV_BIOS_WATCHLIST_ALLOC,
+       UV_BIOS_WATCHLIST_FREE,
+       UV_BIOS_MEMPROTECT,
+       UV_BIOS_GET_PARTITION_ADDR
 };
 
 /*
  * Status values returned from a BIOS call.
  */
 enum {
+       BIOS_STATUS_MORE_PASSES         =  1,
        BIOS_STATUS_SUCCESS             =  0,
        BIOS_STATUS_UNIMPLEMENTED       = -ENOSYS,
        BIOS_STATUS_EINVAL              = -EINVAL,
@@ -71,6 +76,21 @@ union partition_info_u {
        };
 };
 
+union uv_watchlist_u {
+       u64     val;
+       struct {
+               u64     blade   : 16,
+                       size    : 32,
+                       filler  : 16;
+       };
+};
+
+enum uv_memprotect {
+       UV_MEMPROT_RESTRICT_ACCESS,
+       UV_MEMPROT_ALLOW_AMO,
+       UV_MEMPROT_ALLOW_RW
+};
+
 /*
  * bios calls have 6 parameters
  */
@@ -80,14 +100,20 @@ extern s64 uv_bios_call_reentrant(enum uv_bios_cmd, u64, u64, u64, u64, u64);
 
 extern s64 uv_bios_get_sn_info(int, int *, long *, long *, long *);
 extern s64 uv_bios_freq_base(u64, u64 *);
+extern int uv_bios_mq_watchlist_alloc(int, unsigned long, unsigned int,
+                                       unsigned long *);
+extern int uv_bios_mq_watchlist_free(int, int);
+extern s64 uv_bios_change_memprotect(u64, u64, enum uv_memprotect);
+extern s64 uv_bios_reserved_page_pa(u64, u64 *, u64 *, u64 *);
 
 extern void uv_bios_init(void);
 
+extern unsigned long sn_rtc_cycles_per_second;
 extern int uv_type;
 extern long sn_partition_id;
-extern long uv_coherency_id;
-extern long uv_region_size;
-#define partition_coherence_id()       (uv_coherency_id)
+extern long sn_coherency_id;
+extern long sn_region_size;
+#define partition_coherence_id()       (sn_coherency_id)
 
 extern struct kobject *sgi_uv_kobj;    /* /sys/firmware/sgi_uv */
 
index 7a5782610b2bcb0af69d99be174d0815a6722663..777327ef05c19f0887c0b9b089a6f71135395e94 100644 (file)
  */
 #define UV_MAX_NASID_VALUE     (UV_MAX_NUMALINK_NODES * 2)
 
+struct uv_scir_s {
+       struct timer_list timer;
+       unsigned long   offset;
+       unsigned long   last;
+       unsigned long   idle_on;
+       unsigned long   idle_off;
+       unsigned char   state;
+       unsigned char   enabled;
+};
+
 /*
  * The following defines attributes of the HUB chip. These attributes are
  * frequently referenced and are kept in the per-cpu data areas of each cpu.
  * They are kept together in a struct to minimize cache misses.
  */
 struct uv_hub_info_s {
-       unsigned long   global_mmr_base;
-       unsigned long   gpa_mask;
-       unsigned long   gnode_upper;
-       unsigned long   lowmem_remap_top;
-       unsigned long   lowmem_remap_base;
-       unsigned short  pnode;
-       unsigned short  pnode_mask;
-       unsigned short  coherency_domain_number;
-       unsigned short  numa_blade_id;
-       unsigned char   blade_processor_id;
-       unsigned char   m_val;
-       unsigned char   n_val;
+       unsigned long           global_mmr_base;
+       unsigned long           gpa_mask;
+       unsigned long           gnode_upper;
+       unsigned long           lowmem_remap_top;
+       unsigned long           lowmem_remap_base;
+       unsigned short          pnode;
+       unsigned short          pnode_mask;
+       unsigned short          coherency_domain_number;
+       unsigned short          numa_blade_id;
+       unsigned char           blade_processor_id;
+       unsigned char           m_val;
+       unsigned char           n_val;
+       struct uv_scir_s        scir;
 };
+
 DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
 #define uv_hub_info            (&__get_cpu_var(__uv_hub_info))
 #define uv_cpu_hub_info(cpu)   (&per_cpu(__uv_hub_info, cpu))
@@ -163,6 +175,30 @@ DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
 
 #define UV_APIC_PNODE_SHIFT    6
 
+/* Local Bus from cpu's perspective */
+#define LOCAL_BUS_BASE         0x1c00000
+#define LOCAL_BUS_SIZE         (4 * 1024 * 1024)
+
+/*
+ * System Controller Interface Reg
+ *
+ * Note there are NO leds on a UV system.  This register is only
+ * used by the system controller to monitor system-wide operation.
+ * There are 64 regs per node.  With Nahelem cpus (2 cores per node,
+ * 8 cpus per core, 2 threads per cpu) there are 32 cpu threads on
+ * a node.
+ *
+ * The window is located at top of ACPI MMR space
+ */
+#define SCIR_WINDOW_COUNT      64
+#define SCIR_LOCAL_MMR_BASE    (LOCAL_BUS_BASE + \
+                                LOCAL_BUS_SIZE - \
+                                SCIR_WINDOW_COUNT)
+
+#define SCIR_CPU_HEARTBEAT     0x01    /* timer interrupt */
+#define SCIR_CPU_ACTIVITY      0x02    /* not idle */
+#define SCIR_CPU_HB_INTERVAL   (HZ)    /* once per second */
+
 /*
  * Macros for converting between kernel virtual addresses, socket local physical
  * addresses, and UV global physical addresses.
@@ -174,7 +210,7 @@ DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
 static inline unsigned long uv_soc_phys_ram_to_gpa(unsigned long paddr)
 {
        if (paddr < uv_hub_info->lowmem_remap_top)
-               paddr += uv_hub_info->lowmem_remap_base;
+               paddr |= uv_hub_info->lowmem_remap_base;
        return paddr | uv_hub_info->gnode_upper;
 }
 
@@ -182,19 +218,7 @@ static inline unsigned long uv_soc_phys_ram_to_gpa(unsigned long paddr)
 /* socket virtual --> UV global physical address */
 static inline unsigned long uv_gpa(void *v)
 {
-       return __pa(v) | uv_hub_info->gnode_upper;
-}
-
-/* socket virtual --> UV global physical address */
-static inline void *uv_vgpa(void *v)
-{
-       return (void *)uv_gpa(v);
-}
-
-/* UV global physical address --> socket virtual */
-static inline void *uv_va(unsigned long gpa)
-{
-       return __va(gpa & uv_hub_info->gpa_mask);
+       return uv_soc_phys_ram_to_gpa(__pa(v));
 }
 
 /* pnode, offset --> socket virtual */
@@ -277,6 +301,16 @@ static inline void uv_write_local_mmr(unsigned long offset, unsigned long val)
        *uv_local_mmr_address(offset) = val;
 }
 
+static inline unsigned char uv_read_local_mmr8(unsigned long offset)
+{
+       return *((unsigned char *)uv_local_mmr_address(offset));
+}
+
+static inline void uv_write_local_mmr8(unsigned long offset, unsigned char val)
+{
+       *((unsigned char *)uv_local_mmr_address(offset)) = val;
+}
+
 /*
  * Structures and definitions for converting between cpu, node, pnode, and blade
  * numbers.
@@ -351,5 +385,20 @@ static inline int uv_num_possible_blades(void)
        return uv_possible_blades;
 }
 
-#endif /* _ASM_X86_UV_UV_HUB_H */
+/* Update SCIR state */
+static inline void uv_set_scir_bits(unsigned char value)
+{
+       if (uv_hub_info->scir.state != value) {
+               uv_hub_info->scir.state = value;
+               uv_write_local_mmr8(uv_hub_info->scir.offset, value);
+       }
+}
+static inline void uv_set_cpu_scir_bits(int cpu, unsigned char value)
+{
+       if (uv_cpu_hub_info(cpu)->scir.state != value) {
+               uv_cpu_hub_info(cpu)->scir.state = value;
+               uv_write_local_mmr8(uv_cpu_hub_info(cpu)->scir.offset, value);
+       }
+}
 
+#endif /* _ASM_X86_UV_UV_HUB_H */
index b7c0dea119fed8f8ea62e520ecf1e504e65e05f0..61e08c0a290785c5527d9faf607c0c2ab2e384e2 100644 (file)
@@ -223,9 +223,15 @@ struct pci_header {
 } __attribute__((packed));
 
 /* Function prototypes for bootstrapping */
+#ifdef CONFIG_VMI
 extern void vmi_init(void);
+extern void vmi_activate(void);
 extern void vmi_bringup(void);
-extern void vmi_apply_boot_page_allocations(void);
+#else
+static inline void vmi_init(void) {}
+static inline void vmi_activate(void) {}
+static inline void vmi_bringup(void) {}
+#endif
 
 /* State needed to start an application processor in an SMP system. */
 struct vmi_ap_state {
diff --git a/arch/x86/include/asm/vmware.h b/arch/x86/include/asm/vmware.h
new file mode 100644 (file)
index 0000000..c11b7e1
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2008, VMware, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
+ * NON INFRINGEMENT.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+#ifndef ASM_X86__VMWARE_H
+#define ASM_X86__VMWARE_H
+
+extern unsigned long vmware_get_tsc_khz(void);
+extern int vmware_platform(void);
+extern void vmware_set_feature_bits(struct cpuinfo_x86 *c);
+
+#endif
index 3f6000d95fe21f38dae31ff2dbfb8945703d91f4..5e79ca694326cdeb85886d371565ad506fe6f0af 100644 (file)
 #ifndef _ASM_X86_XEN_HYPERCALL_H
 #define _ASM_X86_XEN_HYPERCALL_H
 
+#include <linux/kernel.h>
+#include <linux/spinlock.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
+
+#include <asm/page.h>
+#include <asm/pgtable.h>
 
 #include <xen/interface/xen.h>
 #include <xen/interface/sched.h>
index a38d25ac87d2abdbfb6e077f304210aef43d78f8..81fbd735aec47e3edbed57a5d83eb142f3c3571e 100644 (file)
 #ifndef _ASM_X86_XEN_HYPERVISOR_H
 #define _ASM_X86_XEN_HYPERVISOR_H
 
-#include <linux/types.h>
-#include <linux/kernel.h>
-
-#include <xen/interface/xen.h>
-#include <xen/interface/version.h>
-
-#include <asm/ptrace.h>
-#include <asm/page.h>
-#include <asm/desc.h>
-#if defined(__i386__)
-#  ifdef CONFIG_X86_PAE
-#   include <asm-generic/pgtable-nopud.h>
-#  else
-#   include <asm-generic/pgtable-nopmd.h>
-#  endif
-#endif
-#include <asm/xen/hypercall.h>
-
 /* arch/i386/kernel/setup.c */
 extern struct shared_info *HYPERVISOR_shared_info;
 extern struct start_info *xen_start_info;
 
-/* arch/i386/mach-xen/evtchn.c */
-/* Force a proper event-channel callback from Xen. */
-extern void force_evtchn_callback(void);
-
-/* Turn jiffies into Xen system time. */
-u64 jiffies_to_st(unsigned long jiffies);
-
-
-#define MULTI_UVMFLAGS_INDEX 3
-#define MULTI_UVMDOMID_INDEX 4
-
 enum xen_domain_type {
        XEN_NATIVE,
        XEN_PV_DOMAIN,
@@ -74,9 +45,15 @@ enum xen_domain_type {
 
 extern enum xen_domain_type xen_domain_type;
 
+#ifdef CONFIG_XEN
 #define xen_domain()           (xen_domain_type != XEN_NATIVE)
-#define xen_pv_domain()                (xen_domain_type == XEN_PV_DOMAIN)
+#else
+#define xen_domain()           (0)
+#endif
+
+#define xen_pv_domain()                (xen_domain() && xen_domain_type == XEN_PV_DOMAIN)
+#define xen_hvm_domain()       (xen_domain() && xen_domain_type == XEN_HVM_DOMAIN)
+
 #define xen_initial_domain()   (xen_pv_domain() && xen_start_info->flags & SIF_INITDOMAIN)
-#define xen_hvm_domain()       (xen_domain_type == XEN_HVM_DOMAIN)
 
 #endif /* _ASM_X86_XEN_HYPERVISOR_H */
index bc628998a1b9dc896a416d6ea0ef5293463c8a24..7ef617ef1df3ca38c1d29286a4742e770982dc67 100644 (file)
@@ -1,11 +1,16 @@
 #ifndef _ASM_X86_XEN_PAGE_H
 #define _ASM_X86_XEN_PAGE_H
 
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/spinlock.h>
 #include <linux/pfn.h>
 
 #include <asm/uaccess.h>
+#include <asm/page.h>
 #include <asm/pgtable.h>
 
+#include <xen/interface/xen.h>
 #include <xen/features.h>
 
 /* Xen machine address */
index e489ff9cb3e203258aa2987d264cd26e556248ce..1f208aaee7803fa1e799bacccd729888451fed6e 100644 (file)
@@ -12,6 +12,7 @@ CFLAGS_REMOVE_tsc.o = -pg
 CFLAGS_REMOVE_rtc.o = -pg
 CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
 CFLAGS_REMOVE_ftrace.o = -pg
+CFLAGS_REMOVE_early_printk.o = -pg
 endif
 
 #
@@ -23,9 +24,9 @@ CFLAGS_vsyscall_64.o  := $(PROFILING) -g0 $(nostackp)
 CFLAGS_hpet.o          := $(nostackp)
 CFLAGS_tsc.o           := $(nostackp)
 
-obj-y                  := process_$(BITS).o signal_$(BITS).o entry_$(BITS).o
+obj-y                  := process_$(BITS).o signal.o entry_$(BITS).o
 obj-y                  += traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
-obj-y                  += time_$(BITS).o ioport.o ldt.o
+obj-y                  += time_$(BITS).o ioport.o ldt.o dumpstack.o
 obj-y                  += setup.o i8259.o irqinit_$(BITS).o setup_percpu.o
 obj-$(CONFIG_X86_VISWS)        += visws_quirks.o
 obj-$(CONFIG_X86_32)   += probe_roms_32.o
@@ -41,7 +42,7 @@ obj-$(CONFIG_X86_TRAMPOLINE)  += trampoline.o
 obj-y                          += process.o
 obj-y                          += i387.o xsave.o
 obj-y                          += ptrace.o
-obj-y                          += ds.o
+obj-$(CONFIG_X86_DS)           += ds.o
 obj-$(CONFIG_X86_32)           += tls.o
 obj-$(CONFIG_IA32_EMULATION)   += tls.o
 obj-y                          += step.o
@@ -105,6 +106,8 @@ microcode-$(CONFIG_MICROCODE_INTEL) += microcode_intel.o
 microcode-$(CONFIG_MICROCODE_AMD)      += microcode_amd.o
 obj-$(CONFIG_MICROCODE)                        += microcode.o
 
+obj-$(CONFIG_X86_CHECK_BIOS_CORRUPTION) += check.o
+
 ###
 # 64 bit specific files
 ifeq ($(CONFIG_X86_64),y)
index 8c1f76abae9eac1b28d3a90abb26d6fb39fb8496..65d0b72777ea099a99ced450bec404220af6e2e2 100644 (file)
@@ -1343,7 +1343,6 @@ static void __init acpi_process_madt(void)
                        error = acpi_parse_madt_ioapic_entries();
                        if (!error) {
                                acpi_irq_model = ACPI_IRQ_MODEL_IOAPIC;
-                               acpi_irq_balance_set(NULL);
                                acpi_ioapic = 1;
 
                                smp_found_config = 1;
@@ -1361,6 +1360,17 @@ static void __init acpi_process_madt(void)
                        disable_acpi();
                }
        }
+
+       /*
+        * ACPI supports both logical (e.g. Hyper-Threading) and physical
+        * processors, where MPS only supports physical.
+        */
+       if (acpi_lapic && acpi_ioapic)
+               printk(KERN_INFO "Using ACPI (MADT) for SMP configuration "
+                      "information\n");
+       else if (acpi_lapic)
+               printk(KERN_INFO "Using ACPI for processor (LAPIC) "
+                      "configuration information\n");
 #endif
        return;
 }
index 331b318304eb180d5e4f022253360d2c4efc49e6..0a60d60ed036b264e6d4c05174dfc3b464574852 100644 (file)
@@ -187,6 +187,8 @@ static int iommu_queue_command(struct amd_iommu *iommu, struct iommu_cmd *cmd)
 
        spin_lock_irqsave(&iommu->lock, flags);
        ret = __iommu_queue_command(iommu, cmd);
+       if (!ret)
+               iommu->need_sync = 1;
        spin_unlock_irqrestore(&iommu->lock, flags);
 
        return ret;
@@ -210,10 +212,13 @@ static int iommu_completion_wait(struct amd_iommu *iommu)
        cmd.data[0] = CMD_COMPL_WAIT_INT_MASK;
        CMD_SET_TYPE(&cmd, CMD_COMPL_WAIT);
 
-       iommu->need_sync = 0;
-
        spin_lock_irqsave(&iommu->lock, flags);
 
+       if (!iommu->need_sync)
+               goto out;
+
+       iommu->need_sync = 0;
+
        ret = __iommu_queue_command(iommu, &cmd);
 
        if (ret)
@@ -230,8 +235,9 @@ static int iommu_completion_wait(struct amd_iommu *iommu)
        status &= ~MMIO_STATUS_COM_WAIT_INT_MASK;
        writel(status, iommu->mmio_base + MMIO_STATUS_OFFSET);
 
-       if (unlikely((i == EXIT_LOOP_COUNT) && printk_ratelimit()))
-               printk(KERN_WARNING "AMD IOMMU: Completion wait loop failed\n");
+       if (unlikely(i == EXIT_LOOP_COUNT))
+               panic("AMD IOMMU: Completion wait loop failed\n");
+
 out:
        spin_unlock_irqrestore(&iommu->lock, flags);
 
@@ -254,8 +260,6 @@ static int iommu_queue_inv_dev_entry(struct amd_iommu *iommu, u16 devid)
 
        ret = iommu_queue_command(iommu, &cmd);
 
-       iommu->need_sync = 1;
-
        return ret;
 }
 
@@ -281,8 +285,6 @@ static int iommu_queue_inv_iommu_pages(struct amd_iommu *iommu,
 
        ret = iommu_queue_command(iommu, &cmd);
 
-       iommu->need_sync = 1;
-
        return ret;
 }
 
@@ -343,7 +345,7 @@ static int iommu_map(struct protection_domain *dom,
        u64 __pte, *pte, *page;
 
        bus_addr  = PAGE_ALIGN(bus_addr);
-       phys_addr = PAGE_ALIGN(bus_addr);
+       phys_addr = PAGE_ALIGN(phys_addr);
 
        /* only support 512GB address spaces for now */
        if (bus_addr > IOMMU_MAP_SIZE_L3 || !(prot & IOMMU_PROT_MASK))
@@ -537,7 +539,7 @@ static void dma_ops_free_addresses(struct dma_ops_domain *dom,
        address >>= PAGE_SHIFT;
        iommu_area_free(dom->bitmap, address, pages);
 
-       if (address + pages >= dom->next_bit)
+       if (address >= dom->next_bit)
                dom->need_flush = true;
 }
 
@@ -599,7 +601,7 @@ static void dma_ops_free_pagetable(struct dma_ops_domain *dma_dom)
                        continue;
 
                p2 = IOMMU_PTE_PAGE(p1[i]);
-               for (j = 0; j < 512; ++i) {
+               for (j = 0; j < 512; ++j) {
                        if (!IOMMU_PTE_PRESENT(p2[j]))
                                continue;
                        p3 = IOMMU_PTE_PAGE(p2[j]);
@@ -762,8 +764,6 @@ static void set_device_domain(struct amd_iommu *iommu,
        write_unlock_irqrestore(&amd_iommu_devtable_lock, flags);
 
        iommu_queue_inv_dev_entry(iommu, devid);
-
-       iommu->need_sync = 1;
 }
 
 /*****************************************************************************
@@ -858,6 +858,9 @@ static int get_device_resources(struct device *dev,
                print_devid(_bdf, 1);
        }
 
+       if (domain_for_device(_bdf) == NULL)
+               set_device_domain(*iommu, *domain, _bdf);
+
        return 1;
 }
 
@@ -908,7 +911,7 @@ static void dma_ops_domain_unmap(struct amd_iommu *iommu,
        if (address >= dom->aperture_size)
                return;
 
-       WARN_ON(address & 0xfffULL || address > dom->aperture_size);
+       WARN_ON(address & ~PAGE_MASK || address >= dom->aperture_size);
 
        pte  = dom->pte_pages[IOMMU_PTE_L1_INDEX(address)];
        pte += IOMMU_PTE_L0_INDEX(address);
@@ -920,8 +923,8 @@ static void dma_ops_domain_unmap(struct amd_iommu *iommu,
 
 /*
  * This function contains common code for mapping of a physically
- * contiguous memory region into DMA address space. It is uses by all
- * mapping functions provided by this IOMMU driver.
+ * contiguous memory region into DMA address space. It is used by all
+ * mapping functions provided with this IOMMU driver.
  * Must be called with the domain lock held.
  */
 static dma_addr_t __map_single(struct device *dev,
@@ -981,7 +984,8 @@ static void __unmap_single(struct amd_iommu *iommu,
        dma_addr_t i, start;
        unsigned int pages;
 
-       if ((dma_addr == 0) || (dma_addr + size > dma_dom->aperture_size))
+       if ((dma_addr == bad_dma_address) ||
+           (dma_addr + size > dma_dom->aperture_size))
                return;
 
        pages = iommu_num_pages(dma_addr, size, PAGE_SIZE);
@@ -1031,8 +1035,7 @@ static dma_addr_t map_single(struct device *dev, phys_addr_t paddr,
        if (addr == bad_dma_address)
                goto out;
 
-       if (unlikely(iommu->need_sync))
-               iommu_completion_wait(iommu);
+       iommu_completion_wait(iommu);
 
 out:
        spin_unlock_irqrestore(&domain->lock, flags);
@@ -1060,8 +1063,7 @@ static void unmap_single(struct device *dev, dma_addr_t dma_addr,
 
        __unmap_single(iommu, domain->priv, dma_addr, size, dir);
 
-       if (unlikely(iommu->need_sync))
-               iommu_completion_wait(iommu);
+       iommu_completion_wait(iommu);
 
        spin_unlock_irqrestore(&domain->lock, flags);
 }
@@ -1127,8 +1129,7 @@ static int map_sg(struct device *dev, struct scatterlist *sglist,
                        goto unmap;
        }
 
-       if (unlikely(iommu->need_sync))
-               iommu_completion_wait(iommu);
+       iommu_completion_wait(iommu);
 
 out:
        spin_unlock_irqrestore(&domain->lock, flags);
@@ -1173,8 +1174,7 @@ static void unmap_sg(struct device *dev, struct scatterlist *sglist,
                s->dma_address = s->dma_length = 0;
        }
 
-       if (unlikely(iommu->need_sync))
-               iommu_completion_wait(iommu);
+       iommu_completion_wait(iommu);
 
        spin_unlock_irqrestore(&domain->lock, flags);
 }
@@ -1225,8 +1225,7 @@ static void *alloc_coherent(struct device *dev, size_t size,
                goto out;
        }
 
-       if (unlikely(iommu->need_sync))
-               iommu_completion_wait(iommu);
+       iommu_completion_wait(iommu);
 
 out:
        spin_unlock_irqrestore(&domain->lock, flags);
@@ -1257,8 +1256,7 @@ static void free_coherent(struct device *dev, size_t size,
 
        __unmap_single(iommu, domain->priv, dma_addr, size, DMA_BIDIRECTIONAL);
 
-       if (unlikely(iommu->need_sync))
-               iommu_completion_wait(iommu);
+       iommu_completion_wait(iommu);
 
        spin_unlock_irqrestore(&domain->lock, flags);
 
index 0cdcda35a05fbcd01d6d4b32f6ba935f6e9d7cb4..c6cc22815d35f232dd21fae7d2718a3c161b373c 100644 (file)
@@ -121,7 +121,7 @@ u16 amd_iommu_last_bdf;                     /* largest PCI device id we have
 LIST_HEAD(amd_iommu_unity_map);                /* a list of required unity mappings
                                           we find in ACPI */
 unsigned amd_iommu_aperture_order = 26; /* size of aperture in power of 2 */
-int amd_iommu_isolate;                 /* if 1, device isolation is enabled */
+int amd_iommu_isolate = 1;             /* if 1, device isolation is enabled */
 bool amd_iommu_unmap_flush;            /* if true, flush on every unmap */
 
 LIST_HEAD(amd_iommu_list);             /* list of all AMD IOMMUs in the
@@ -427,6 +427,10 @@ static u8 * __init alloc_command_buffer(struct amd_iommu *iommu)
        memcpy_toio(iommu->mmio_base + MMIO_CMD_BUF_OFFSET,
                        &entry, sizeof(entry));
 
+       /* set head and tail to zero manually */
+       writel(0x00, iommu->mmio_base + MMIO_CMD_HEAD_OFFSET);
+       writel(0x00, iommu->mmio_base + MMIO_CMD_TAIL_OFFSET);
+
        iommu_feature_enable(iommu, CONTROL_CMDBUF_EN);
 
        return cmd_buf;
@@ -1074,7 +1078,8 @@ int __init amd_iommu_init(void)
                goto free;
 
        /* IOMMU rlookup table - find the IOMMU for a specific device */
-       amd_iommu_rlookup_table = (void *)__get_free_pages(GFP_KERNEL,
+       amd_iommu_rlookup_table = (void *)__get_free_pages(
+                       GFP_KERNEL | __GFP_ZERO,
                        get_order(rlookup_table_size));
        if (amd_iommu_rlookup_table == NULL)
                goto free;
@@ -1213,7 +1218,9 @@ static int __init parse_amd_iommu_options(char *str)
        for (; *str; ++str) {
                if (strncmp(str, "isolate", 7) == 0)
                        amd_iommu_isolate = 1;
-               if (strncmp(str, "fullflush", 11) == 0)
+               if (strncmp(str, "share", 5) == 0)
+                       amd_iommu_isolate = 0;
+               if (strncmp(str, "fullflush", 9) == 0)
                        amd_iommu_unmap_flush = true;
        }
 
index 04a7f960bbc0a2408907a959af527382dae477a5..20c6e12c0475534c17c5b72c1eed4225288e16fa 100644 (file)
@@ -441,6 +441,7 @@ static void lapic_timer_setup(enum clock_event_mode mode,
                v = apic_read(APIC_LVTT);
                v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR);
                apic_write(APIC_LVTT, v);
+               apic_write(APIC_TMICT, 0xffffffff);
                break;
        case CLOCK_EVT_MODE_RESUME:
                /* Nothing to do here */
@@ -559,13 +560,13 @@ static int __init calibrate_by_pmtimer(long deltapm, long *delta)
        } else {
                res = (((u64)deltapm) *  mult) >> 22;
                do_div(res, 1000000);
-               printk(KERN_WARNING "APIC calibration not consistent "
+               pr_warning("APIC calibration not consistent "
                        "with PM Timer: %ldms instead of 100ms\n",
                        (long)res);
                /* Correct the lapic counter value */
                res = (((u64)(*delta)) * pm_100ms);
                do_div(res, deltapm);
-               printk(KERN_INFO "APIC delta adjusted to PM-Timer: "
+               pr_info("APIC delta adjusted to PM-Timer: "
                        "%lu (%ld)\n", (unsigned long)res, *delta);
                *delta = (long)res;
        }
@@ -645,8 +646,7 @@ static int __init calibrate_APIC_clock(void)
         */
        if (calibration_result < (1000000 / HZ)) {
                local_irq_enable();
-               printk(KERN_WARNING
-                      "APIC frequency too slow, disabling apic timer\n");
+               pr_warning("APIC frequency too slow, disabling apic timer\n");
                return -1;
        }
 
@@ -672,13 +672,9 @@ static int __init calibrate_APIC_clock(void)
                while (lapic_cal_loops <= LAPIC_CAL_LOOPS)
                        cpu_relax();
 
-               local_irq_disable();
-
                /* Stop the lapic timer */
                lapic_timer_setup(CLOCK_EVT_MODE_SHUTDOWN, levt);
 
-               local_irq_enable();
-
                /* Jiffies delta */
                deltaj = lapic_cal_j2 - lapic_cal_j1;
                apic_printk(APIC_VERBOSE, "... jiffies delta = %lu\n", deltaj);
@@ -692,8 +688,7 @@ static int __init calibrate_APIC_clock(void)
                local_irq_enable();
 
        if (levt->features & CLOCK_EVT_FEAT_DUMMY) {
-               printk(KERN_WARNING
-                      "APIC timer disabled due to verification failure.\n");
+               pr_warning("APIC timer disabled due to verification failure.\n");
                        return -1;
        }
 
@@ -714,7 +709,7 @@ void __init setup_boot_APIC_clock(void)
         * broadcast mechanism is used. On UP systems simply ignore it.
         */
        if (disable_apic_timer) {
-               printk(KERN_INFO "Disabling APIC timer\n");
+               pr_info("Disabling APIC timer\n");
                /* No broadcast on UP ! */
                if (num_possible_cpus() > 1) {
                        lapic_clockevent.mult = 1;
@@ -741,7 +736,7 @@ void __init setup_boot_APIC_clock(void)
        if (nmi_watchdog != NMI_IO_APIC)
                lapic_clockevent.features &= ~CLOCK_EVT_FEAT_DUMMY;
        else
-               printk(KERN_WARNING "APIC timer registered as dummy,"
+               pr_warning("APIC timer registered as dummy,"
                        " due to nmi_watchdog=%d!\n", nmi_watchdog);
 
        /* Setup the lapic or request the broadcast */
@@ -773,8 +768,7 @@ static void local_apic_timer_interrupt(void)
         * spurious.
         */
        if (!evt->event_handler) {
-               printk(KERN_WARNING
-                      "Spurious LAPIC timer interrupt on cpu %d\n", cpu);
+               pr_warning("Spurious LAPIC timer interrupt on cpu %d\n", cpu);
                /* Switch it off */
                lapic_timer_setup(CLOCK_EVT_MODE_SHUTDOWN, evt);
                return;
@@ -814,9 +808,7 @@ void smp_apic_timer_interrupt(struct pt_regs *regs)
         * Besides, if we don't timer interrupts ignore the global
         * interrupt lock, which is the WrongThing (tm) to do.
         */
-#ifdef CONFIG_X86_64
        exit_idle();
-#endif
        irq_enter();
        local_apic_timer_interrupt();
        irq_exit();
@@ -1093,7 +1085,7 @@ static void __cpuinit lapic_setup_esr(void)
        unsigned int oldvalue, value, maxlvt;
 
        if (!lapic_is_integrated()) {
-               printk(KERN_INFO "No ESR for 82489DX.\n");
+               pr_info("No ESR for 82489DX.\n");
                return;
        }
 
@@ -1104,7 +1096,7 @@ static void __cpuinit lapic_setup_esr(void)
                 * ESR disabled - we can't do anything useful with the
                 * errors anyway - mbligh
                 */
-               printk(KERN_INFO "Leaving ESR disabled.\n");
+               pr_info("Leaving ESR disabled.\n");
                return;
        }
 
@@ -1298,7 +1290,7 @@ void check_x2apic(void)
        rdmsr(MSR_IA32_APICBASE, msr, msr2);
 
        if (msr & X2APIC_ENABLE) {
-               printk("x2apic enabled by BIOS, switching to x2apic ops\n");
+               pr_info("x2apic enabled by BIOS, switching to x2apic ops\n");
                x2apic_preenabled = x2apic = 1;
                apic_ops = &x2apic_ops;
        }
@@ -1310,12 +1302,12 @@ void enable_x2apic(void)
 
        rdmsr(MSR_IA32_APICBASE, msr, msr2);
        if (!(msr & X2APIC_ENABLE)) {
-               printk("Enabling x2apic\n");
+               pr_info("Enabling x2apic\n");
                wrmsr(MSR_IA32_APICBASE, msr | X2APIC_ENABLE, 0);
        }
 }
 
-void enable_IR_x2apic(void)
+void __init enable_IR_x2apic(void)
 {
 #ifdef CONFIG_INTR_REMAP
        int ret;
@@ -1325,9 +1317,8 @@ void enable_IR_x2apic(void)
                return;
 
        if (!x2apic_preenabled && disable_x2apic) {
-               printk(KERN_INFO
-                      "Skipped enabling x2apic and Interrupt-remapping "
-                      "because of nox2apic\n");
+               pr_info("Skipped enabling x2apic and Interrupt-remapping "
+                       "because of nox2apic\n");
                return;
        }
 
@@ -1335,22 +1326,19 @@ void enable_IR_x2apic(void)
                panic("Bios already enabled x2apic, can't enforce nox2apic");
 
        if (!x2apic_preenabled && skip_ioapic_setup) {
-               printk(KERN_INFO
-                      "Skipped enabling x2apic and Interrupt-remapping "
-                      "because of skipping io-apic setup\n");
+               pr_info("Skipped enabling x2apic and Interrupt-remapping "
+                       "because of skipping io-apic setup\n");
                return;
        }
 
        ret = dmar_table_init();
        if (ret) {
-               printk(KERN_INFO
-                      "dmar_table_init() failed with %d:\n", ret);
+               pr_info("dmar_table_init() failed with %d:\n", ret);
 
                if (x2apic_preenabled)
                        panic("x2apic enabled by bios. But IR enabling failed");
                else
-                       printk(KERN_INFO
-                              "Not enabling x2apic,Intr-remapping\n");
+                       pr_info("Not enabling x2apic,Intr-remapping\n");
                return;
        }
 
@@ -1359,7 +1347,7 @@ void enable_IR_x2apic(void)
 
        ret = save_mask_IO_APIC_setup();
        if (ret) {
-               printk(KERN_INFO "Saving IO-APIC state failed: %d\n", ret);
+               pr_info("Saving IO-APIC state failed: %d\n", ret);
                goto end;
        }
 
@@ -1394,14 +1382,11 @@ end:
 
        if (!ret) {
                if (!x2apic_preenabled)
-                       printk(KERN_INFO
-                              "Enabled x2apic and interrupt-remapping\n");
+                       pr_info("Enabled x2apic and interrupt-remapping\n");
                else
-                       printk(KERN_INFO
-                              "Enabled Interrupt-remapping\n");
+                       pr_info("Enabled Interrupt-remapping\n");
        } else
-               printk(KERN_ERR
-                      "Failed to enable Interrupt-remapping and x2apic\n");
+               pr_err("Failed to enable Interrupt-remapping and x2apic\n");
 #else
        if (!cpu_has_x2apic)
                return;
@@ -1410,8 +1395,8 @@ end:
                panic("x2apic enabled prior OS handover,"
                      " enable CONFIG_INTR_REMAP");
 
-       printk(KERN_INFO "Enable CONFIG_INTR_REMAP for enabling intr-remapping "
-              " and x2apic\n");
+       pr_info("Enable CONFIG_INTR_REMAP for enabling intr-remapping "
+               " and x2apic\n");
 #endif
 
        return;
@@ -1428,7 +1413,7 @@ end:
 static int __init detect_init_APIC(void)
 {
        if (!cpu_has_apic) {
-               printk(KERN_INFO "No local APIC present\n");
+               pr_info("No local APIC present\n");
                return -1;
        }
 
@@ -1469,8 +1454,8 @@ static int __init detect_init_APIC(void)
                 * "lapic" specified.
                 */
                if (!force_enable_local_apic) {
-                       printk(KERN_INFO "Local APIC disabled by BIOS -- "
-                              "you can enable it with \"lapic\"\n");
+                       pr_info("Local APIC disabled by BIOS -- "
+                               "you can enable it with \"lapic\"\n");
                        return -1;
                }
                /*
@@ -1480,8 +1465,7 @@ static int __init detect_init_APIC(void)
                 */
                rdmsr(MSR_IA32_APICBASE, l, h);
                if (!(l & MSR_IA32_APICBASE_ENABLE)) {
-                       printk(KERN_INFO
-                              "Local APIC disabled by BIOS -- reenabling.\n");
+                       pr_info("Local APIC disabled by BIOS -- reenabling.\n");
                        l &= ~MSR_IA32_APICBASE_BASE;
                        l |= MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE;
                        wrmsr(MSR_IA32_APICBASE, l, h);
@@ -1494,7 +1478,7 @@ static int __init detect_init_APIC(void)
         */
        features = cpuid_edx(1);
        if (!(features & (1 << X86_FEATURE_APIC))) {
-               printk(KERN_WARNING "Could not enable APIC!\n");
+               pr_warning("Could not enable APIC!\n");
                return -1;
        }
        set_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
@@ -1505,14 +1489,14 @@ static int __init detect_init_APIC(void)
        if (l & MSR_IA32_APICBASE_ENABLE)
                mp_lapic_addr = l & MSR_IA32_APICBASE_BASE;
 
-       printk(KERN_INFO "Found and enabled local APIC!\n");
+       pr_info("Found and enabled local APIC!\n");
 
        apic_pm_activate();
 
        return 0;
 
 no_apic:
-       printk(KERN_INFO "No local APIC present or hardware disabled\n");
+       pr_info("No local APIC present or hardware disabled\n");
        return -1;
 }
 #endif
@@ -1588,12 +1572,12 @@ int __init APIC_init_uniprocessor(void)
 {
 #ifdef CONFIG_X86_64
        if (disable_apic) {
-               printk(KERN_INFO "Apic disabled\n");
+               pr_info("Apic disabled\n");
                return -1;
        }
        if (!cpu_has_apic) {
                disable_apic = 1;
-               printk(KERN_INFO "Apic disabled by BIOS\n");
+               pr_info("Apic disabled by BIOS\n");
                return -1;
        }
 #else
@@ -1605,8 +1589,8 @@ int __init APIC_init_uniprocessor(void)
         */
        if (!cpu_has_apic &&
            APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) {
-               printk(KERN_ERR "BIOS bug, local APIC 0x%x not detected!...\n",
-                      boot_cpu_physical_apicid);
+               pr_err("BIOS bug, local APIC 0x%x not detected!...\n",
+                       boot_cpu_physical_apicid);
                clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
                return -1;
        }
@@ -1682,9 +1666,7 @@ void smp_spurious_interrupt(struct pt_regs *regs)
 {
        u32 v;
 
-#ifdef CONFIG_X86_64
        exit_idle();
-#endif
        irq_enter();
        /*
         * Check if this really is a spurious interrupt and ACK it
@@ -1699,8 +1681,8 @@ void smp_spurious_interrupt(struct pt_regs *regs)
        add_pda(irq_spurious_count, 1);
 #else
        /* see sw-dev-man vol 3, chapter 7.4.13.5 */
-       printk(KERN_INFO "spurious APIC interrupt on CPU#%d, "
-              "should never happen.\n", smp_processor_id());
+       pr_info("spurious APIC interrupt on CPU#%d, "
+               "should never happen.\n", smp_processor_id());
        __get_cpu_var(irq_stat).irq_spurious_count++;
 #endif
        irq_exit();
@@ -1713,9 +1695,7 @@ void smp_error_interrupt(struct pt_regs *regs)
 {
        u32 v, v1;
 
-#ifdef CONFIG_X86_64
        exit_idle();
-#endif
        irq_enter();
        /* First tickle the hardware, only then report what went on. -- REW */
        v = apic_read(APIC_ESR);
@@ -1724,17 +1704,18 @@ void smp_error_interrupt(struct pt_regs *regs)
        ack_APIC_irq();
        atomic_inc(&irq_err_count);
 
-       /* Here is what the APIC error bits mean:
-          0: Send CS error
-          1: Receive CS error
-          2: Send accept error
-          3: Receive accept error
-          4: Reserved
-          5: Send illegal vector
-          6: Received illegal vector
-          7: Illegal register address
-       */
-       printk(KERN_DEBUG "APIC error on CPU%d: %02x(%02x)\n",
+       /*
+        * Here is what the APIC error bits mean:
+        * 0: Send CS error
+        * 1: Receive CS error
+        * 2: Send accept error
+        * 3: Receive accept error
+        * 4: Reserved
+        * 5: Send illegal vector
+        * 6: Received illegal vector
+        * 7: Illegal register address
+        */
+       pr_debug("APIC error on CPU%d: %02x(%02x)\n",
                smp_processor_id(), v , v1);
        irq_exit();
 }
@@ -1838,15 +1819,15 @@ void __cpuinit generic_processor_info(int apicid, int version)
         * Validate version
         */
        if (version == 0x0) {
-               printk(KERN_WARNING "BIOS bug, APIC version is 0 for CPU#%d! "
-                               "fixing up to 0x10. (tell your hw vendor)\n",
-                               version);
+               pr_warning("BIOS bug, APIC version is 0 for CPU#%d! "
+                       "fixing up to 0x10. (tell your hw vendor)\n",
+                       version);
                version = 0x10;
        }
        apic_version[apicid] = version;
 
        if (num_processors >= NR_CPUS) {
-               printk(KERN_WARNING "WARNING: NR_CPUS limit of %i reached."
+               pr_warning("WARNING: NR_CPUS limit of %i reached."
                        "  Processor ignored.\n", NR_CPUS);
                return;
        }
@@ -2209,7 +2190,7 @@ static int __init apic_set_verbosity(char *arg)
        else if (strcmp("verbose", arg) == 0)
                apic_verbosity = APIC_VERBOSE;
        else {
-               printk(KERN_WARNING "APIC Verbosity level %s not recognised"
+               pr_warning("APIC Verbosity level %s not recognised"
                        " use apic=verbose or apic=debug\n", arg);
                return -EINVAL;
        }
index 5145a6e72bbbf7f6a4e93d85aed20c769f0883dc..3a26525a3f31a03f3490f7e17be537a6fb3e7c7e 100644 (file)
@@ -391,11 +391,7 @@ static int power_off;
 #else
 static int power_off = 1;
 #endif
-#ifdef CONFIG_APM_REAL_MODE_POWER_OFF
-static int realmode_power_off = 1;
-#else
 static int realmode_power_off;
-#endif
 #ifdef CONFIG_APM_ALLOW_INTS
 static int allow_ints = 1;
 #else
index 6649d09ad88f8830df49427c7d8763196eb0a0f6..ee4df08feee6b0a64b62ca639d39cffbdd0cc87a 100644 (file)
@@ -11,7 +11,7 @@
 #include <linux/suspend.h>
 #include <linux/kbuild.h>
 #include <asm/ucontext.h>
-#include "sigframe.h"
+#include <asm/sigframe.h>
 #include <asm/pgtable.h>
 #include <asm/fixmap.h>
 #include <asm/processor.h>
index 7fcf63d22f8b28c4457b6f8e7fb2eae54b071b1f..1d41d3f1edbcaa3d39450561d25b8ef0fb801e38 100644 (file)
@@ -20,6 +20,8 @@
 
 #include <xen/interface/xen.h>
 
+#include <asm/sigframe.h>
+
 #define __NO_STUBS 1
 #undef __SYSCALL
 #undef _ASM_X86_UNISTD_64_H
@@ -87,7 +89,7 @@ int main(void)
        BLANK();
 #undef ENTRY
        DEFINE(IA32_RT_SIGFRAME_sigcontext,
-              offsetof (struct rt_sigframe32, uc.uc_mcontext));
+              offsetof (struct rt_sigframe_ia32, uc.uc_mcontext));
        BLANK();
 #endif
        DEFINE(pbe_address, offsetof(struct pbe, address));
index f0dfe6f17e7eabbe41f90a8afd75c54766081fa2..2a0a2a3cac263a87edc38f12894185749a1b9dd5 100644 (file)
@@ -69,10 +69,10 @@ s64 uv_bios_call_reentrant(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3,
 
 long sn_partition_id;
 EXPORT_SYMBOL_GPL(sn_partition_id);
-long uv_coherency_id;
-EXPORT_SYMBOL_GPL(uv_coherency_id);
-long uv_region_size;
-EXPORT_SYMBOL_GPL(uv_region_size);
+long sn_coherency_id;
+EXPORT_SYMBOL_GPL(sn_coherency_id);
+long sn_region_size;
+EXPORT_SYMBOL_GPL(sn_region_size);
 int uv_type;
 
 
@@ -100,6 +100,56 @@ s64 uv_bios_get_sn_info(int fc, int *uvtype, long *partid, long *coher,
        return ret;
 }
 
+int
+uv_bios_mq_watchlist_alloc(int blade, unsigned long addr, unsigned int mq_size,
+                          unsigned long *intr_mmr_offset)
+{
+       union uv_watchlist_u size_blade;
+       u64 watchlist;
+       s64 ret;
+
+       size_blade.size = mq_size;
+       size_blade.blade = blade;
+
+       /*
+        * bios returns watchlist number or negative error number.
+        */
+       ret = (int)uv_bios_call_irqsave(UV_BIOS_WATCHLIST_ALLOC, addr,
+                       size_blade.val, (u64)intr_mmr_offset,
+                       (u64)&watchlist, 0);
+       if (ret < BIOS_STATUS_SUCCESS)
+               return ret;
+
+       return watchlist;
+}
+EXPORT_SYMBOL_GPL(uv_bios_mq_watchlist_alloc);
+
+int
+uv_bios_mq_watchlist_free(int blade, int watchlist_num)
+{
+       return (int)uv_bios_call_irqsave(UV_BIOS_WATCHLIST_FREE,
+                               blade, watchlist_num, 0, 0, 0);
+}
+EXPORT_SYMBOL_GPL(uv_bios_mq_watchlist_free);
+
+s64
+uv_bios_change_memprotect(u64 paddr, u64 len, enum uv_memprotect perms)
+{
+       return uv_bios_call_irqsave(UV_BIOS_MEMPROTECT, paddr, len,
+                                       perms, 0, 0);
+}
+EXPORT_SYMBOL_GPL(uv_bios_change_memprotect);
+
+s64
+uv_bios_reserved_page_pa(u64 buf, u64 *cookie, u64 *addr, u64 *len)
+{
+       s64 ret;
+
+       ret = uv_bios_call_irqsave(UV_BIOS_GET_PARTITION_ADDR, (u64)cookie,
+                                       (u64)addr, buf, (u64)len, 0);
+       return ret;
+}
+EXPORT_SYMBOL_GPL(uv_bios_reserved_page_pa);
 
 s64 uv_bios_freq_base(u64 clock_type, u64 *ticks_per_second)
 {
diff --git a/arch/x86/kernel/check.c b/arch/x86/kernel/check.c
new file mode 100644 (file)
index 0000000..2ac0ab7
--- /dev/null
@@ -0,0 +1,161 @@
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/kthread.h>
+#include <linux/workqueue.h>
+#include <asm/e820.h>
+#include <asm/proto.h>
+
+/*
+ * Some BIOSes seem to corrupt the low 64k of memory during events
+ * like suspend/resume and unplugging an HDMI cable.  Reserve all
+ * remaining free memory in that area and fill it with a distinct
+ * pattern.
+ */
+#define MAX_SCAN_AREAS 8
+
+static int __read_mostly memory_corruption_check = -1;
+
+static unsigned __read_mostly corruption_check_size = 64*1024;
+static unsigned __read_mostly corruption_check_period = 60; /* seconds */
+
+static struct e820entry scan_areas[MAX_SCAN_AREAS];
+static int num_scan_areas;
+
+
+static __init int set_corruption_check(char *arg)
+{
+       char *end;
+
+       memory_corruption_check = simple_strtol(arg, &end, 10);
+
+       return (*end == 0) ? 0 : -EINVAL;
+}
+early_param("memory_corruption_check", set_corruption_check);
+
+static __init int set_corruption_check_period(char *arg)
+{
+       char *end;
+
+       corruption_check_period = simple_strtoul(arg, &end, 10);
+
+       return (*end == 0) ? 0 : -EINVAL;
+}
+early_param("memory_corruption_check_period", set_corruption_check_period);
+
+static __init int set_corruption_check_size(char *arg)
+{
+       char *end;
+       unsigned size;
+
+       size = memparse(arg, &end);
+
+       if (*end == '\0')
+               corruption_check_size = size;
+
+       return (size == corruption_check_size) ? 0 : -EINVAL;
+}
+early_param("memory_corruption_check_size", set_corruption_check_size);
+
+
+void __init setup_bios_corruption_check(void)
+{
+       u64 addr = PAGE_SIZE;   /* assume first page is reserved anyway */
+
+       if (memory_corruption_check == -1) {
+               memory_corruption_check =
+#ifdef CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK
+                       1
+#else
+                       0
+#endif
+                       ;
+       }
+
+       if (corruption_check_size == 0)
+               memory_corruption_check = 0;
+
+       if (!memory_corruption_check)
+               return;
+
+       corruption_check_size = round_up(corruption_check_size, PAGE_SIZE);
+
+       while (addr < corruption_check_size && num_scan_areas < MAX_SCAN_AREAS) {
+               u64 size;
+               addr = find_e820_area_size(addr, &size, PAGE_SIZE);
+
+               if (addr == 0)
+                       break;
+
+               if ((addr + size) > corruption_check_size)
+                       size = corruption_check_size - addr;
+
+               if (size == 0)
+                       break;
+
+               e820_update_range(addr, size, E820_RAM, E820_RESERVED);
+               scan_areas[num_scan_areas].addr = addr;
+               scan_areas[num_scan_areas].size = size;
+               num_scan_areas++;
+
+               /* Assume we've already mapped this early memory */
+               memset(__va(addr), 0, size);
+
+               addr += size;
+       }
+
+       printk(KERN_INFO "Scanning %d areas for low memory corruption\n",
+              num_scan_areas);
+       update_e820();
+}
+
+
+void check_for_bios_corruption(void)
+{
+       int i;
+       int corruption = 0;
+
+       if (!memory_corruption_check)
+               return;
+
+       for (i = 0; i < num_scan_areas; i++) {
+               unsigned long *addr = __va(scan_areas[i].addr);
+               unsigned long size = scan_areas[i].size;
+
+               for (; size; addr++, size -= sizeof(unsigned long)) {
+                       if (!*addr)
+                               continue;
+                       printk(KERN_ERR "Corrupted low memory at %p (%lx phys) = %08lx\n",
+                              addr, __pa(addr), *addr);
+                       corruption = 1;
+                       *addr = 0;
+               }
+       }
+
+       WARN_ONCE(corruption, KERN_ERR "Memory corruption detected in low memory\n");
+}
+
+static void check_corruption(struct work_struct *dummy);
+static DECLARE_DELAYED_WORK(bios_check_work, check_corruption);
+
+static void check_corruption(struct work_struct *dummy)
+{
+       check_for_bios_corruption();
+       schedule_delayed_work(&bios_check_work,
+               round_jiffies_relative(corruption_check_period*HZ)); 
+}
+
+static int start_periodic_check_for_corruption(void)
+{
+       if (!memory_corruption_check || corruption_check_period == 0)
+               return 0;
+
+       printk(KERN_INFO "Scanning for low memory corruption every %d seconds\n",
+              corruption_check_period);
+
+       /* First time we run the checks right away */
+       schedule_delayed_work(&bios_check_work, 0);
+       return 0;
+}
+
+module_init(start_periodic_check_for_corruption);
+
index 82ec6075c057b695cf6904a28a58fb8c60c37d7a..a5c04e88777e84fcabeb46c67c4fb4941a6261f4 100644 (file)
@@ -4,6 +4,7 @@
 
 obj-y                  := intel_cacheinfo.o addon_cpuid_features.o
 obj-y                  += proc.o capflags.o powerflags.o common.o
+obj-y                  += vmware.o hypervisor.o
 
 obj-$(CONFIG_X86_32)   += bugs.o cmpxchg.o
 obj-$(CONFIG_X86_64)   += bugs_64.o
index b9c9ea0217a9b1fd4581f27fed692aaa6fe167ee..42e0853030cbe43275cc596c3f5896388dd30cae 100644 (file)
@@ -36,6 +36,7 @@
 #include <asm/proto.h>
 #include <asm/sections.h>
 #include <asm/setup.h>
+#include <asm/hypervisor.h>
 
 #include "cpu.h"
 
@@ -703,6 +704,7 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
        detect_ht(c);
 #endif
 
+       init_hypervisor(c);
        /*
         * On SMP, boot_cpu_data holds the common feature set between
         * all CPUs; so make sure that we indicate which features are
@@ -862,7 +864,7 @@ EXPORT_SYMBOL(_cpu_pda);
 
 struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table };
 
-char boot_cpu_stack[IRQSTACKSIZE] __page_aligned_bss;
+static char boot_cpu_stack[IRQSTACKSIZE] __page_aligned_bss;
 
 void __cpuinit pda_init(int cpu)
 {
@@ -903,8 +905,8 @@ void __cpuinit pda_init(int cpu)
        }
 }
 
-char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ +
-                          DEBUG_STKSZ] __page_aligned_bss;
+static char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ +
+                                 DEBUG_STKSZ] __page_aligned_bss;
 
 extern asmlinkage void ignore_sysret(void);
 
index d3dcd58b87cd50654d7a065e5d42b05300103f09..7f05f44b97e95c72447c0538f19e06185c0a18b1 100644 (file)
@@ -115,9 +115,20 @@ static int query_current_values_with_pending_wait(struct powernow_k8_data *data)
        u32 i = 0;
 
        if (cpu_family == CPU_HW_PSTATE) {
-               rdmsr(MSR_PSTATE_STATUS, lo, hi);
-               i = lo & HW_PSTATE_MASK;
-               data->currpstate = i;
+               if (data->currpstate == HW_PSTATE_INVALID) {
+                       /* read (initial) hw pstate if not yet set */
+                       rdmsr(MSR_PSTATE_STATUS, lo, hi);
+                       i = lo & HW_PSTATE_MASK;
+
+                       /*
+                        * a workaround for family 11h erratum 311 might cause
+                        * an "out-of-range Pstate if the core is in Pstate-0
+                        */
+                       if (i >= data->numps)
+                               data->currpstate = HW_PSTATE_0;
+                       else
+                               data->currpstate = i;
+               }
                return 0;
        }
        do {
@@ -1121,6 +1132,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
        }
 
        data->cpu = pol->cpu;
+       data->currpstate = HW_PSTATE_INVALID;
 
        if (powernow_k8_cpu_init_acpi(data)) {
                /*
index ab48cfed4d96ce5629e29f3a21ffd9c3e25d8a21..65cfb5d7f77f17b508024c52891e68e959cab386 100644 (file)
@@ -5,6 +5,19 @@
  *  http://www.gnu.org/licenses/gpl.html
  */
 
+
+enum pstate {
+       HW_PSTATE_INVALID = 0xff,
+       HW_PSTATE_0 = 0,
+       HW_PSTATE_1 = 1,
+       HW_PSTATE_2 = 2,
+       HW_PSTATE_3 = 3,
+       HW_PSTATE_4 = 4,
+       HW_PSTATE_5 = 5,
+       HW_PSTATE_6 = 6,
+       HW_PSTATE_7 = 7,
+};
+
 struct powernow_k8_data {
        unsigned int cpu;
 
@@ -23,7 +36,9 @@ struct powernow_k8_data {
         u32 exttype; /* extended interface = 1 */
 
        /* keep track of the current fid / vid or pstate */
-       u32 currvid, currfid, currpstate;
+       u32 currvid;
+       u32 currfid;
+       enum pstate currpstate;
 
        /* the powernow_table includes all frequency and vid/fid pairings:
         * fid are the lower 8 bits of the index, vid are the upper 8 bits.
diff --git a/arch/x86/kernel/cpu/hypervisor.c b/arch/x86/kernel/cpu/hypervisor.c
new file mode 100644 (file)
index 0000000..fb5b86a
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Common hypervisor code
+ *
+ * Copyright (C) 2008, VMware, Inc.
+ * Author : Alok N Kataria <akataria@vmware.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
+ * NON INFRINGEMENT.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include <asm/processor.h>
+#include <asm/vmware.h>
+#include <asm/hypervisor.h>
+
+static inline void __cpuinit
+detect_hypervisor_vendor(struct cpuinfo_x86 *c)
+{
+       if (vmware_platform()) {
+               c->x86_hyper_vendor = X86_HYPER_VENDOR_VMWARE;
+       } else {
+               c->x86_hyper_vendor = X86_HYPER_VENDOR_NONE;
+       }
+}
+
+unsigned long get_hypervisor_tsc_freq(void)
+{
+       if (boot_cpu_data.x86_hyper_vendor == X86_HYPER_VENDOR_VMWARE)
+               return vmware_get_tsc_khz();
+       return 0;
+}
+
+static inline void __cpuinit
+hypervisor_set_feature_bits(struct cpuinfo_x86 *c)
+{
+       if (boot_cpu_data.x86_hyper_vendor == X86_HYPER_VENDOR_VMWARE) {
+               vmware_set_feature_bits(c);
+               return;
+       }
+}
+
+void __cpuinit init_hypervisor(struct cpuinfo_x86 *c)
+{
+       detect_hypervisor_vendor(c);
+       hypervisor_set_feature_bits(c);
+}
index cce0b6118d550e015a34c5e1b0f9bc60de1f8b3d..816f27f289b10a416847a141b20b1ed9540a530b 100644 (file)
@@ -307,12 +307,11 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
                set_cpu_cap(c, X86_FEATURE_P4);
        if (c->x86 == 6)
                set_cpu_cap(c, X86_FEATURE_P3);
+#endif
 
        if (cpu_has_bts)
                ptrace_bts_init_intel(c);
 
-#endif
-
        detect_extended_topology(c);
        if (!cpu_has(c, X86_FEATURE_XTOPOLOGY)) {
                /*
index 3f46afbb1cf1946f52212ce96942429a9885cb04..68b5d8681cbb54597edf9021721745dbab19cb5c 100644 (file)
@@ -644,20 +644,17 @@ static inline ssize_t show_shared_cpu_list(struct _cpuid4_info *leaf, char *buf)
        return show_shared_cpu_map_func(leaf, 1, buf);
 }
 
-static ssize_t show_type(struct _cpuid4_info *this_leaf, char *buf) {
-       switch(this_leaf->eax.split.type) {
-           case CACHE_TYPE_DATA:
+static ssize_t show_type(struct _cpuid4_info *this_leaf, char *buf)
+{
+       switch (this_leaf->eax.split.type) {
+       case CACHE_TYPE_DATA:
                return sprintf(buf, "Data\n");
-               break;
-           case CACHE_TYPE_INST:
+       case CACHE_TYPE_INST:
                return sprintf(buf, "Instruction\n");
-               break;
-           case CACHE_TYPE_UNIFIED:
+       case CACHE_TYPE_UNIFIED:
                return sprintf(buf, "Unified\n");
-               break;
-           default:
+       default:
                return sprintf(buf, "Unknown\n");
-               break;
        }
 }
 
index 4b031a4ac8562d3ed69f14f0d750dfe8519a057e..1c838032fd3732fde9bff776cbb63a2821115d60 100644 (file)
@@ -510,12 +510,9 @@ static void __cpuinit mce_cpu_features(struct cpuinfo_x86 *c)
  */
 void __cpuinit mcheck_init(struct cpuinfo_x86 *c)
 {
-       static cpumask_t mce_cpus = CPU_MASK_NONE;
-
        mce_cpu_quirks(c);
 
        if (mce_dont_init ||
-           cpu_test_and_set(smp_processor_id(), mce_cpus) ||
            !mce_available(c))
                return;
 
index c78c04821ea18a58266b812fef480aa0b5ec0fbb..1159e269e596bc05d9b82d3ed633a434c67d1649 100644 (file)
@@ -803,6 +803,7 @@ x86_get_mtrr_mem_range(struct res_range *range, int nr_range,
 }
 
 static struct res_range __initdata range[RANGE_NUM];
+static int __initdata nr_range;
 
 #ifdef CONFIG_MTRR_SANITIZER
 
@@ -1206,39 +1207,43 @@ struct mtrr_cleanup_result {
 #define PSHIFT         (PAGE_SHIFT - 10)
 
 static struct mtrr_cleanup_result __initdata result[NUM_RESULT];
-static struct res_range __initdata range_new[RANGE_NUM];
 static unsigned long __initdata min_loss_pfn[RANGE_NUM];
 
-static int __init mtrr_cleanup(unsigned address_bits)
+static void __init print_out_mtrr_range_state(void)
 {
-       unsigned long extra_remove_base, extra_remove_size;
-       unsigned long base, size, def, dummy;
-       mtrr_type type;
-       int nr_range, nr_range_new;
-       u64 chunk_size, gran_size;
-       unsigned long range_sums, range_sums_new;
-       int index_good;
-       int num_reg_good;
        int i;
+       char start_factor = 'K', size_factor = 'K';
+       unsigned long start_base, size_base;
+       mtrr_type type;
 
-       /* extra one for all 0 */
-       int num[MTRR_NUM_TYPES + 1];
+       for (i = 0; i < num_var_ranges; i++) {
 
-       if (!is_cpu(INTEL) || enable_mtrr_cleanup < 1)
-               return 0;
-       rdmsr(MTRRdefType_MSR, def, dummy);
-       def &= 0xff;
-       if (def != MTRR_TYPE_UNCACHABLE)
-               return 0;
+               size_base = range_state[i].size_pfn << (PAGE_SHIFT - 10);
+               if (!size_base)
+                       continue;
 
-       /* get it and store it aside */
-       memset(range_state, 0, sizeof(range_state));
-       for (i = 0; i < num_var_ranges; i++) {
-               mtrr_if->get(i, &base, &size, &type);
-               range_state[i].base_pfn = base;
-               range_state[i].size_pfn = size;
-               range_state[i].type = type;
+               size_base = to_size_factor(size_base, &size_factor),
+               start_base = range_state[i].base_pfn << (PAGE_SHIFT - 10);
+               start_base = to_size_factor(start_base, &start_factor),
+               type = range_state[i].type;
+
+               printk(KERN_DEBUG "reg %d, base: %ld%cB, range: %ld%cB, type %s\n",
+                       i, start_base, start_factor,
+                       size_base, size_factor,
+                       (type == MTRR_TYPE_UNCACHABLE) ? "UC" :
+                           ((type == MTRR_TYPE_WRPROT) ? "WP" :
+                            ((type == MTRR_TYPE_WRBACK) ? "WB" : "Other"))
+                       );
        }
+}
+
+static int __init mtrr_need_cleanup(void)
+{
+       int i;
+       mtrr_type type;
+       unsigned long size;
+       /* extra one for all 0 */
+       int num[MTRR_NUM_TYPES + 1];
 
        /* check entries number */
        memset(num, 0, sizeof(num));
@@ -1263,29 +1268,133 @@ static int __init mtrr_cleanup(unsigned address_bits)
                num_var_ranges - num[MTRR_NUM_TYPES])
                return 0;
 
-       /* print original var MTRRs at first, for debugging: */
-       printk(KERN_DEBUG "original variable MTRRs\n");
-       for (i = 0; i < num_var_ranges; i++) {
-               char start_factor = 'K', size_factor = 'K';
-               unsigned long start_base, size_base;
+       return 1;
+}
 
-               size_base = range_state[i].size_pfn << (PAGE_SHIFT - 10);
-               if (!size_base)
-                       continue;
+static unsigned long __initdata range_sums;
+static void __init mtrr_calc_range_state(u64 chunk_size, u64 gran_size,
+                                        unsigned long extra_remove_base,
+                                        unsigned long extra_remove_size,
+                                        int i)
+{
+       int num_reg;
+       static struct res_range range_new[RANGE_NUM];
+       static int nr_range_new;
+       unsigned long range_sums_new;
+
+       /* convert ranges to var ranges state */
+       num_reg = x86_setup_var_mtrrs(range, nr_range,
+                                               chunk_size, gran_size);
+
+       /* we got new setting in range_state, check it */
+       memset(range_new, 0, sizeof(range_new));
+       nr_range_new = x86_get_mtrr_mem_range(range_new, 0,
+                               extra_remove_base, extra_remove_size);
+       range_sums_new = sum_ranges(range_new, nr_range_new);
+
+       result[i].chunk_sizek = chunk_size >> 10;
+       result[i].gran_sizek = gran_size >> 10;
+       result[i].num_reg = num_reg;
+       if (range_sums < range_sums_new) {
+               result[i].lose_cover_sizek =
+                       (range_sums_new - range_sums) << PSHIFT;
+               result[i].bad = 1;
+       } else
+               result[i].lose_cover_sizek =
+                       (range_sums - range_sums_new) << PSHIFT;
 
-               size_base = to_size_factor(size_base, &size_factor),
-               start_base = range_state[i].base_pfn << (PAGE_SHIFT - 10);
-               start_base = to_size_factor(start_base, &start_factor),
-               type = range_state[i].type;
+       /* double check it */
+       if (!result[i].bad && !result[i].lose_cover_sizek) {
+               if (nr_range_new != nr_range ||
+                       memcmp(range, range_new, sizeof(range)))
+                               result[i].bad = 1;
+       }
 
-               printk(KERN_DEBUG "reg %d, base: %ld%cB, range: %ld%cB, type %s\n",
-                       i, start_base, start_factor,
-                       size_base, size_factor,
-                       (type == MTRR_TYPE_UNCACHABLE) ? "UC" :
-                           ((type == MTRR_TYPE_WRPROT) ? "WP" :
-                            ((type == MTRR_TYPE_WRBACK) ? "WB" : "Other"))
-                       );
+       if (!result[i].bad && (range_sums - range_sums_new <
+                               min_loss_pfn[num_reg])) {
+               min_loss_pfn[num_reg] =
+                       range_sums - range_sums_new;
        }
+}
+
+static void __init mtrr_print_out_one_result(int i)
+{
+       char gran_factor, chunk_factor, lose_factor;
+       unsigned long gran_base, chunk_base, lose_base;
+
+       gran_base = to_size_factor(result[i].gran_sizek, &gran_factor),
+       chunk_base = to_size_factor(result[i].chunk_sizek, &chunk_factor),
+       lose_base = to_size_factor(result[i].lose_cover_sizek, &lose_factor),
+       printk(KERN_INFO "%sgran_size: %ld%c \tchunk_size: %ld%c \t",
+                       result[i].bad ? "*BAD*" : " ",
+                       gran_base, gran_factor, chunk_base, chunk_factor);
+       printk(KERN_CONT "num_reg: %d  \tlose cover RAM: %s%ld%c\n",
+                       result[i].num_reg, result[i].bad ? "-" : "",
+                       lose_base, lose_factor);
+}
+
+static int __init mtrr_search_optimal_index(void)
+{
+       int i;
+       int num_reg_good;
+       int index_good;
+
+       if (nr_mtrr_spare_reg >= num_var_ranges)
+               nr_mtrr_spare_reg = num_var_ranges - 1;
+       num_reg_good = -1;
+       for (i = num_var_ranges - nr_mtrr_spare_reg; i > 0; i--) {
+               if (!min_loss_pfn[i])
+                       num_reg_good = i;
+       }
+
+       index_good = -1;
+       if (num_reg_good != -1) {
+               for (i = 0; i < NUM_RESULT; i++) {
+                       if (!result[i].bad &&
+                           result[i].num_reg == num_reg_good &&
+                           !result[i].lose_cover_sizek) {
+                               index_good = i;
+                               break;
+                       }
+               }
+       }
+
+       return index_good;
+}
+
+
+static int __init mtrr_cleanup(unsigned address_bits)
+{
+       unsigned long extra_remove_base, extra_remove_size;
+       unsigned long base, size, def, dummy;
+       mtrr_type type;
+       u64 chunk_size, gran_size;
+       int index_good;
+       int i;
+
+       if (!is_cpu(INTEL) || enable_mtrr_cleanup < 1)
+               return 0;
+       rdmsr(MTRRdefType_MSR, def, dummy);
+       def &= 0xff;
+       if (def != MTRR_TYPE_UNCACHABLE)
+               return 0;
+
+       /* get it and store it aside */
+       memset(range_state, 0, sizeof(range_state));
+       for (i = 0; i < num_var_ranges; i++) {
+               mtrr_if->get(i, &base, &size, &type);
+               range_state[i].base_pfn = base;
+               range_state[i].size_pfn = size;
+               range_state[i].type = type;
+       }
+
+       /* check if we need handle it and can handle it */
+       if (!mtrr_need_cleanup())
+               return 0;
+
+       /* print original var MTRRs at first, for debugging: */
+       printk(KERN_DEBUG "original variable MTRRs\n");
+       print_out_mtrr_range_state();
 
        memset(range, 0, sizeof(range));
        extra_remove_size = 0;
@@ -1309,176 +1418,64 @@ static int __init mtrr_cleanup(unsigned address_bits)
               range_sums >> (20 - PAGE_SHIFT));
 
        if (mtrr_chunk_size && mtrr_gran_size) {
-               int num_reg;
-               char gran_factor, chunk_factor, lose_factor;
-               unsigned long gran_base, chunk_base, lose_base;
-
-               debug_print++;
-               /* convert ranges to var ranges state */
-               num_reg = x86_setup_var_mtrrs(range, nr_range, mtrr_chunk_size,
-                                             mtrr_gran_size);
+               i = 0;
+               mtrr_calc_range_state(mtrr_chunk_size, mtrr_gran_size,
+                                     extra_remove_base, extra_remove_size, i);
 
-               /* we got new setting in range_state, check it */
-               memset(range_new, 0, sizeof(range_new));
-               nr_range_new = x86_get_mtrr_mem_range(range_new, 0,
-                                                     extra_remove_base,
-                                                     extra_remove_size);
-               range_sums_new = sum_ranges(range_new, nr_range_new);
+               mtrr_print_out_one_result(i);
 
-               i = 0;
-               result[i].chunk_sizek = mtrr_chunk_size >> 10;
-               result[i].gran_sizek = mtrr_gran_size >> 10;
-               result[i].num_reg = num_reg;
-               if (range_sums < range_sums_new) {
-                       result[i].lose_cover_sizek =
-                               (range_sums_new - range_sums) << PSHIFT;
-                       result[i].bad = 1;
-               } else
-                       result[i].lose_cover_sizek =
-                               (range_sums - range_sums_new) << PSHIFT;
-
-               gran_base = to_size_factor(result[i].gran_sizek, &gran_factor),
-               chunk_base = to_size_factor(result[i].chunk_sizek, &chunk_factor),
-               lose_base = to_size_factor(result[i].lose_cover_sizek, &lose_factor),
-               printk(KERN_INFO "%sgran_size: %ld%c \tchunk_size: %ld%c \t",
-                        result[i].bad?"*BAD*":" ",
-                        gran_base, gran_factor, chunk_base, chunk_factor);
-               printk(KERN_CONT "num_reg: %d  \tlose cover RAM: %s%ld%c\n",
-                        result[i].num_reg, result[i].bad?"-":"",
-                        lose_base, lose_factor);
                if (!result[i].bad) {
                        set_var_mtrr_all(address_bits);
                        return 1;
                }
                printk(KERN_INFO "invalid mtrr_gran_size or mtrr_chunk_size, "
                       "will find optimal one\n");
-               debug_print--;
-               memset(result, 0, sizeof(result[0]));
        }
 
        i = 0;
        memset(min_loss_pfn, 0xff, sizeof(min_loss_pfn));
        memset(result, 0, sizeof(result));
        for (gran_size = (1ULL<<16); gran_size < (1ULL<<32); gran_size <<= 1) {
-               char gran_factor;
-               unsigned long gran_base;
-
-               if (debug_print)
-                       gran_base = to_size_factor(gran_size >> 10, &gran_factor);
 
                for (chunk_size = gran_size; chunk_size < (1ULL<<32);
                     chunk_size <<= 1) {
-                       int num_reg;
 
-                       if (debug_print) {
-                               char chunk_factor;
-                               unsigned long chunk_base;
-
-                               chunk_base = to_size_factor(chunk_size>>10, &chunk_factor),
-                               printk(KERN_INFO "\n");
-                               printk(KERN_INFO "gran_size: %ld%c   chunk_size: %ld%c \n",
-                                      gran_base, gran_factor, chunk_base, chunk_factor);
-                       }
                        if (i >= NUM_RESULT)
                                continue;
 
-                       /* convert ranges to var ranges state */
-                       num_reg = x86_setup_var_mtrrs(range, nr_range,
-                                                        chunk_size, gran_size);
-
-                       /* we got new setting in range_state, check it */
-                       memset(range_new, 0, sizeof(range_new));
-                       nr_range_new = x86_get_mtrr_mem_range(range_new, 0,
-                                        extra_remove_base, extra_remove_size);
-                       range_sums_new = sum_ranges(range_new, nr_range_new);
-
-                       result[i].chunk_sizek = chunk_size >> 10;
-                       result[i].gran_sizek = gran_size >> 10;
-                       result[i].num_reg = num_reg;
-                       if (range_sums < range_sums_new) {
-                               result[i].lose_cover_sizek =
-                                       (range_sums_new - range_sums) << PSHIFT;
-                               result[i].bad = 1;
-                       } else
-                               result[i].lose_cover_sizek =
-                                       (range_sums - range_sums_new) << PSHIFT;
-
-                       /* double check it */
-                       if (!result[i].bad && !result[i].lose_cover_sizek) {
-                               if (nr_range_new != nr_range ||
-                                       memcmp(range, range_new, sizeof(range)))
-                                               result[i].bad = 1;
+                       mtrr_calc_range_state(chunk_size, gran_size,
+                                     extra_remove_base, extra_remove_size, i);
+                       if (debug_print) {
+                               mtrr_print_out_one_result(i);
+                               printk(KERN_INFO "\n");
                        }
 
-                       if (!result[i].bad && (range_sums - range_sums_new <
-                                              min_loss_pfn[num_reg])) {
-                               min_loss_pfn[num_reg] =
-                                       range_sums - range_sums_new;
-                       }
                        i++;
                }
        }
 
-       /* print out all */
-       for (i = 0; i < NUM_RESULT; i++) {
-               char gran_factor, chunk_factor, lose_factor;
-               unsigned long gran_base, chunk_base, lose_base;
-
-               gran_base = to_size_factor(result[i].gran_sizek, &gran_factor),
-               chunk_base = to_size_factor(result[i].chunk_sizek, &chunk_factor),
-               lose_base = to_size_factor(result[i].lose_cover_sizek, &lose_factor),
-               printk(KERN_INFO "%sgran_size: %ld%c \tchunk_size: %ld%c \t",
-                        result[i].bad?"*BAD*":" ",
-                        gran_base, gran_factor, chunk_base, chunk_factor);
-               printk(KERN_CONT "num_reg: %d  \tlose cover RAM: %s%ld%c\n",
-                        result[i].num_reg, result[i].bad?"-":"",
-                        lose_base, lose_factor);
-       }
-
        /* try to find the optimal index */
-       if (nr_mtrr_spare_reg >= num_var_ranges)
-               nr_mtrr_spare_reg = num_var_ranges - 1;
-       num_reg_good = -1;
-       for (i = num_var_ranges - nr_mtrr_spare_reg; i > 0; i--) {
-               if (!min_loss_pfn[i])
-                       num_reg_good = i;
-       }
-
-       index_good = -1;
-       if (num_reg_good != -1) {
-               for (i = 0; i < NUM_RESULT; i++) {
-                       if (!result[i].bad &&
-                           result[i].num_reg == num_reg_good &&
-                           !result[i].lose_cover_sizek) {
-                               index_good = i;
-                               break;
-                       }
-               }
-       }
+       index_good = mtrr_search_optimal_index();
 
        if (index_good != -1) {
-               char gran_factor, chunk_factor, lose_factor;
-               unsigned long gran_base, chunk_base, lose_base;
-
                printk(KERN_INFO "Found optimal setting for mtrr clean up\n");
                i = index_good;
-               gran_base = to_size_factor(result[i].gran_sizek, &gran_factor),
-               chunk_base = to_size_factor(result[i].chunk_sizek, &chunk_factor),
-               lose_base = to_size_factor(result[i].lose_cover_sizek, &lose_factor),
-               printk(KERN_INFO "gran_size: %ld%c \tchunk_size: %ld%c \t",
-                        gran_base, gran_factor, chunk_base, chunk_factor);
-               printk(KERN_CONT "num_reg: %d  \tlose RAM: %ld%c\n",
-                        result[i].num_reg, lose_base, lose_factor);
+               mtrr_print_out_one_result(i);
+
                /* convert ranges to var ranges state */
                chunk_size = result[i].chunk_sizek;
                chunk_size <<= 10;
                gran_size = result[i].gran_sizek;
                gran_size <<= 10;
-               debug_print++;
                x86_setup_var_mtrrs(range, nr_range, chunk_size, gran_size);
-               debug_print--;
                set_var_mtrr_all(address_bits);
+               printk(KERN_DEBUG "New variable MTRRs\n");
+               print_out_mtrr_range_state();
                return 1;
+       } else {
+               /* print out all */
+               for (i = 0; i < NUM_RESULT; i++)
+                       mtrr_print_out_one_result(i);
        }
 
        printk(KERN_INFO "mtrr_cleanup: can not find optimal value\n");
@@ -1562,7 +1559,6 @@ int __init mtrr_trim_uncached_memory(unsigned long end_pfn)
 {
        unsigned long i, base, size, highest_pfn = 0, def, dummy;
        mtrr_type type;
-       int nr_range;
        u64 total_trim_size;
 
        /* extra one for all 0 */
diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
new file mode 100644 (file)
index 0000000..284c399
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * VMware Detection code.
+ *
+ * Copyright (C) 2008, VMware, Inc.
+ * Author : Alok N Kataria <akataria@vmware.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
+ * NON INFRINGEMENT.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include <linux/dmi.h>
+#include <asm/div64.h>
+#include <asm/vmware.h>
+
+#define CPUID_VMWARE_INFO_LEAF 0x40000000
+#define VMWARE_HYPERVISOR_MAGIC        0x564D5868
+#define VMWARE_HYPERVISOR_PORT 0x5658
+
+#define VMWARE_PORT_CMD_GETVERSION     10
+#define VMWARE_PORT_CMD_GETHZ          45
+
+#define VMWARE_PORT(cmd, eax, ebx, ecx, edx)                           \
+       __asm__("inl (%%dx)" :                                          \
+                       "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :    \
+                       "0"(VMWARE_HYPERVISOR_MAGIC),                   \
+                       "1"(VMWARE_PORT_CMD_##cmd),                     \
+                       "2"(VMWARE_HYPERVISOR_PORT), "3"(UINT_MAX) :    \
+                       "memory");
+
+static inline int __vmware_platform(void)
+{
+       uint32_t eax, ebx, ecx, edx;
+       VMWARE_PORT(GETVERSION, eax, ebx, ecx, edx);
+       return eax != (uint32_t)-1 && ebx == VMWARE_HYPERVISOR_MAGIC;
+}
+
+static unsigned long __vmware_get_tsc_khz(void)
+{
+        uint64_t tsc_hz;
+        uint32_t eax, ebx, ecx, edx;
+
+        VMWARE_PORT(GETHZ, eax, ebx, ecx, edx);
+
+        if (ebx == UINT_MAX)
+                return 0;
+        tsc_hz = eax | (((uint64_t)ebx) << 32);
+        do_div(tsc_hz, 1000);
+        BUG_ON(tsc_hz >> 32);
+        return tsc_hz;
+}
+
+/*
+ * While checking the dmi string infomation, just checking the product
+ * serial key should be enough, as this will always have a VMware
+ * specific string when running under VMware hypervisor.
+ */
+int vmware_platform(void)
+{
+       if (cpu_has_hypervisor) {
+               unsigned int eax, ebx, ecx, edx;
+               char hyper_vendor_id[13];
+
+               cpuid(CPUID_VMWARE_INFO_LEAF, &eax, &ebx, &ecx, &edx);
+               memcpy(hyper_vendor_id + 0, &ebx, 4);
+               memcpy(hyper_vendor_id + 4, &ecx, 4);
+               memcpy(hyper_vendor_id + 8, &edx, 4);
+               hyper_vendor_id[12] = '\0';
+               if (!strcmp(hyper_vendor_id, "VMwareVMware"))
+                       return 1;
+       } else if (dmi_available && dmi_name_in_serial("VMware") &&
+                  __vmware_platform())
+               return 1;
+
+       return 0;
+}
+
+unsigned long vmware_get_tsc_khz(void)
+{
+       BUG_ON(!vmware_platform());
+       return __vmware_get_tsc_khz();
+}
+
+/*
+ * VMware hypervisor takes care of exporting a reliable TSC to the guest.
+ * Still, due to timing difference when running on virtual cpus, the TSC can
+ * be marked as unstable in some cases. For example, the TSC sync check at
+ * bootup can fail due to a marginal offset between vcpus' TSCs (though the
+ * TSCs do not drift from each other).  Also, the ACPI PM timer clocksource
+ * is not suitable as a watchdog when running on a hypervisor because the
+ * kernel may miss a wrap of the counter if the vcpu is descheduled for a
+ * long time. To skip these checks at runtime we set these capability bits,
+ * so that the kernel could just trust the hypervisor with providing a
+ * reliable virtual TSC that is suitable for timekeeping.
+ */
+void __cpuinit vmware_set_feature_bits(struct cpuinfo_x86 *c)
+{
+       set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
+       set_cpu_cap(c, X86_FEATURE_TSC_RELIABLE);
+}
index 2b69994fd3a800458f4d81abbebad357405eac69..d6938d9351cfefa4afaaf5b78eb3b584111709e5 100644 (file)
@@ -21,8 +21,6 @@
  */
 
 
-#ifdef CONFIG_X86_DS
-
 #include <asm/ds.h>
 
 #include <linux/errno.h>
@@ -211,14 +209,15 @@ static DEFINE_PER_CPU(struct ds_context *, system_context);
 static inline struct ds_context *ds_get_context(struct task_struct *task)
 {
        struct ds_context *context;
+       unsigned long irq;
 
-       spin_lock(&ds_lock);
+       spin_lock_irqsave(&ds_lock, irq);
 
        context = (task ? task->thread.ds_ctx : this_system_context);
        if (context)
                context->count++;
 
-       spin_unlock(&ds_lock);
+       spin_unlock_irqrestore(&ds_lock, irq);
 
        return context;
 }
@@ -226,18 +225,16 @@ static inline struct ds_context *ds_get_context(struct task_struct *task)
 /*
  * Same as ds_get_context, but allocates the context and it's DS
  * structure, if necessary; returns NULL; if out of memory.
- *
- * pre: requires ds_lock to be held
  */
 static inline struct ds_context *ds_alloc_context(struct task_struct *task)
 {
        struct ds_context **p_context =
                (task ? &task->thread.ds_ctx : &this_system_context);
        struct ds_context *context = *p_context;
+       unsigned long irq;
 
        if (!context) {
                context = kzalloc(sizeof(*context), GFP_KERNEL);
-
                if (!context)
                        return NULL;
 
@@ -247,18 +244,27 @@ static inline struct ds_context *ds_alloc_context(struct task_struct *task)
                        return NULL;
                }
 
-               *p_context = context;
+               spin_lock_irqsave(&ds_lock, irq);
 
-               context->this = p_context;
-               context->task = task;
+               if (*p_context) {
+                       kfree(context->ds);
+                       kfree(context);
 
-               if (task)
-                       set_tsk_thread_flag(task, TIF_DS_AREA_MSR);
+                       context = *p_context;
+               } else {
+                       *p_context = context;
 
-               if (!task || (task == current))
-                       wrmsr(MSR_IA32_DS_AREA, (unsigned long)context->ds, 0);
+                       context->this = p_context;
+                       context->task = task;
 
-               get_tracer(task);
+                       if (task)
+                               set_tsk_thread_flag(task, TIF_DS_AREA_MSR);
+
+                       if (!task || (task == current))
+                               wrmsrl(MSR_IA32_DS_AREA,
+                                      (unsigned long)context->ds);
+               }
+               spin_unlock_irqrestore(&ds_lock, irq);
        }
 
        context->count++;
@@ -272,10 +278,12 @@ static inline struct ds_context *ds_alloc_context(struct task_struct *task)
  */
 static inline void ds_put_context(struct ds_context *context)
 {
+       unsigned long irq;
+
        if (!context)
                return;
 
-       spin_lock(&ds_lock);
+       spin_lock_irqsave(&ds_lock, irq);
 
        if (--context->count)
                goto out;
@@ -297,7 +305,7 @@ static inline void ds_put_context(struct ds_context *context)
        kfree(context->ds);
        kfree(context);
  out:
-       spin_unlock(&ds_lock);
+       spin_unlock_irqrestore(&ds_lock, irq);
 }
 
 
@@ -368,6 +376,7 @@ static int ds_request(struct task_struct *task, void *base, size_t size,
        struct ds_context *context;
        unsigned long buffer, adj;
        const unsigned long alignment = (1 << 3);
+       unsigned long irq;
        int error = 0;
 
        if (!ds_cfg.sizeof_ds)
@@ -382,25 +391,27 @@ static int ds_request(struct task_struct *task, void *base, size_t size,
                return -EOPNOTSUPP;
 
 
-       spin_lock(&ds_lock);
-
-       if (!check_tracer(task))
-               return -EPERM;
-
-       error = -ENOMEM;
        context = ds_alloc_context(task);
        if (!context)
+               return -ENOMEM;
+
+       spin_lock_irqsave(&ds_lock, irq);
+
+       error = -EPERM;
+       if (!check_tracer(task))
                goto out_unlock;
 
+       get_tracer(task);
+
        error = -EALREADY;
        if (context->owner[qual] == current)
-               goto out_unlock;
+               goto out_put_tracer;
        error = -EPERM;
        if (context->owner[qual] != NULL)
-               goto out_unlock;
+               goto out_put_tracer;
        context->owner[qual] = current;
 
-       spin_unlock(&ds_lock);
+       spin_unlock_irqrestore(&ds_lock, irq);
 
 
        error = -ENOMEM;
@@ -448,10 +459,17 @@ static int ds_request(struct task_struct *task, void *base, size_t size,
  out_release:
        context->owner[qual] = NULL;
        ds_put_context(context);
+       put_tracer(task);
+       return error;
+
+ out_put_tracer:
+       spin_unlock_irqrestore(&ds_lock, irq);
+       ds_put_context(context);
+       put_tracer(task);
        return error;
 
  out_unlock:
-       spin_unlock(&ds_lock);
+       spin_unlock_irqrestore(&ds_lock, irq);
        ds_put_context(context);
        return error;
 }
@@ -801,13 +819,21 @@ static const struct ds_configuration ds_cfg_var = {
        .sizeof_ds    = sizeof(long) * 12,
        .sizeof_field = sizeof(long),
        .sizeof_rec[ds_bts]   = sizeof(long) * 3,
+#ifdef __i386__
        .sizeof_rec[ds_pebs]  = sizeof(long) * 10
+#else
+       .sizeof_rec[ds_pebs]  = sizeof(long) * 18
+#endif
 };
 static const struct ds_configuration ds_cfg_64 = {
        .sizeof_ds    = 8 * 12,
        .sizeof_field = 8,
        .sizeof_rec[ds_bts]   = 8 * 3,
+#ifdef __i386__
        .sizeof_rec[ds_pebs]  = 8 * 10
+#else
+       .sizeof_rec[ds_pebs]  = 8 * 18
+#endif
 };
 
 static inline void
@@ -821,17 +847,16 @@ void __cpuinit ds_init_intel(struct cpuinfo_x86 *c)
        switch (c->x86) {
        case 0x6:
                switch (c->x86_model) {
+               case 0 ... 0xC:
+                       /* sorry, don't know about them */
+                       break;
                case 0xD:
                case 0xE: /* Pentium M */
                        ds_configure(&ds_cfg_var);
                        break;
-               case 0xF: /* Core2 */
-               case 0x1C: /* Atom */
+               default: /* Core2, Atom, ... */
                        ds_configure(&ds_cfg_64);
                        break;
-               default:
-                       /* sorry, don't know about them */
-                       break;
                }
                break;
        case 0xF:
@@ -861,4 +886,3 @@ void ds_free(struct ds_context *context)
        while (leftovers--)
                ds_put_context(context);
 }
-#endif /* CONFIG_X86_DS */
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
new file mode 100644 (file)
index 0000000..5962176
--- /dev/null
@@ -0,0 +1,319 @@
+/*
+ *  Copyright (C) 1991, 1992  Linus Torvalds
+ *  Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs
+ */
+#include <linux/kallsyms.h>
+#include <linux/kprobes.h>
+#include <linux/uaccess.h>
+#include <linux/utsname.h>
+#include <linux/hardirq.h>
+#include <linux/kdebug.h>
+#include <linux/module.h>
+#include <linux/ptrace.h>
+#include <linux/kexec.h>
+#include <linux/bug.h>
+#include <linux/nmi.h>
+#include <linux/sysfs.h>
+
+#include <asm/stacktrace.h>
+
+#include "dumpstack.h"
+
+int panic_on_unrecovered_nmi;
+unsigned int code_bytes = 64;
+int kstack_depth_to_print = 3 * STACKSLOTS_PER_LINE;
+static int die_counter;
+
+void printk_address(unsigned long address, int reliable)
+{
+       printk(" [<%p>] %s%pS\n", (void *) address,
+                       reliable ? "" : "? ", (void *) address);
+}
+
+/*
+ * x86-64 can have up to three kernel stacks:
+ * process stack
+ * interrupt stack
+ * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack
+ */
+
+static inline int valid_stack_ptr(struct thread_info *tinfo,
+                       void *p, unsigned int size, void *end)
+{
+       void *t = tinfo;
+       if (end) {
+               if (p < end && p >= (end-THREAD_SIZE))
+                       return 1;
+               else
+                       return 0;
+       }
+       return p > t && p < t + THREAD_SIZE - size;
+}
+
+unsigned long
+print_context_stack(struct thread_info *tinfo,
+               unsigned long *stack, unsigned long bp,
+               const struct stacktrace_ops *ops, void *data,
+               unsigned long *end)
+{
+       struct stack_frame *frame = (struct stack_frame *)bp;
+
+       while (valid_stack_ptr(tinfo, stack, sizeof(*stack), end)) {
+               unsigned long addr;
+
+               addr = *stack;
+               if (__kernel_text_address(addr)) {
+                       if ((unsigned long) stack == bp + sizeof(long)) {
+                               ops->address(data, addr, 1);
+                               frame = frame->next_frame;
+                               bp = (unsigned long) frame;
+                       } else {
+                               ops->address(data, addr, bp == 0);
+                       }
+               }
+               stack++;
+       }
+       return bp;
+}
+
+
+static void
+print_trace_warning_symbol(void *data, char *msg, unsigned long symbol)
+{
+       printk(data);
+       print_symbol(msg, symbol);
+       printk("\n");
+}
+
+static void print_trace_warning(void *data, char *msg)
+{
+       printk("%s%s\n", (char *)data, msg);
+}
+
+static int print_trace_stack(void *data, char *name)
+{
+       printk("%s <%s> ", (char *)data, name);
+       return 0;
+}
+
+/*
+ * Print one address/symbol entries per line.
+ */
+static void print_trace_address(void *data, unsigned long addr, int reliable)
+{
+       touch_nmi_watchdog();
+       printk(data);
+       printk_address(addr, reliable);
+}
+
+static const struct stacktrace_ops print_trace_ops = {
+       .warning = print_trace_warning,
+       .warning_symbol = print_trace_warning_symbol,
+       .stack = print_trace_stack,
+       .address = print_trace_address,
+};
+
+void
+show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
+               unsigned long *stack, unsigned long bp, char *log_lvl)
+{
+       printk("%sCall Trace:\n", log_lvl);
+       dump_trace(task, regs, stack, bp, &print_trace_ops, log_lvl);
+}
+
+void show_trace(struct task_struct *task, struct pt_regs *regs,
+               unsigned long *stack, unsigned long bp)
+{
+       show_trace_log_lvl(task, regs, stack, bp, "");
+}
+
+void show_stack(struct task_struct *task, unsigned long *sp)
+{
+       show_stack_log_lvl(task, NULL, sp, 0, "");
+}
+
+/*
+ * The architecture-independent dump_stack generator
+ */
+void dump_stack(void)
+{
+       unsigned long bp = 0;
+       unsigned long stack;
+
+#ifdef CONFIG_FRAME_POINTER
+       if (!bp)
+               get_bp(bp);
+#endif
+
+       printk("Pid: %d, comm: %.20s %s %s %.*s\n",
+               current->pid, current->comm, print_tainted(),
+               init_utsname()->release,
+               (int)strcspn(init_utsname()->version, " "),
+               init_utsname()->version);
+       show_trace(NULL, NULL, &stack, bp);
+}
+EXPORT_SYMBOL(dump_stack);
+
+static raw_spinlock_t die_lock = __RAW_SPIN_LOCK_UNLOCKED;
+static int die_owner = -1;
+static unsigned int die_nest_count;
+
+unsigned __kprobes long oops_begin(void)
+{
+       int cpu;
+       unsigned long flags;
+
+       oops_enter();
+
+       /* racy, but better than risking deadlock. */
+       raw_local_irq_save(flags);
+       cpu = smp_processor_id();
+       if (!__raw_spin_trylock(&die_lock)) {
+               if (cpu == die_owner)
+                       /* nested oops. should stop eventually */;
+               else
+                       __raw_spin_lock(&die_lock);
+       }
+       die_nest_count++;
+       die_owner = cpu;
+       console_verbose();
+       bust_spinlocks(1);
+       return flags;
+}
+
+void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
+{
+       if (regs && kexec_should_crash(current))
+               crash_kexec(regs);
+
+       bust_spinlocks(0);
+       die_owner = -1;
+       add_taint(TAINT_DIE);
+       die_nest_count--;
+       if (!die_nest_count)
+               /* Nest count reaches zero, release the lock. */
+               __raw_spin_unlock(&die_lock);
+       raw_local_irq_restore(flags);
+       oops_exit();
+
+       if (!signr)
+               return;
+       if (in_interrupt())
+               panic("Fatal exception in interrupt");
+       if (panic_on_oops)
+               panic("Fatal exception");
+       do_exit(signr);
+}
+
+int __kprobes __die(const char *str, struct pt_regs *regs, long err)
+{
+#ifdef CONFIG_X86_32
+       unsigned short ss;
+       unsigned long sp;
+#endif
+       printk(KERN_EMERG "%s: %04lx [#%d] ", str, err & 0xffff, ++die_counter);
+#ifdef CONFIG_PREEMPT
+       printk("PREEMPT ");
+#endif
+#ifdef CONFIG_SMP
+       printk("SMP ");
+#endif
+#ifdef CONFIG_DEBUG_PAGEALLOC
+       printk("DEBUG_PAGEALLOC");
+#endif
+       printk("\n");
+       sysfs_printk_last_file();
+       if (notify_die(DIE_OOPS, str, regs, err,
+                       current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
+               return 1;
+
+       show_registers(regs);
+#ifdef CONFIG_X86_32
+       sp = (unsigned long) (&regs->sp);
+       savesegment(ss, ss);
+       if (user_mode(regs)) {
+               sp = regs->sp;
+               ss = regs->ss & 0xffff;
+       }
+       printk(KERN_EMERG "EIP: [<%08lx>] ", regs->ip);
+       print_symbol("%s", regs->ip);
+       printk(" SS:ESP %04x:%08lx\n", ss, sp);
+#else
+       /* Executive summary in case the oops scrolled away */
+       printk(KERN_ALERT "RIP ");
+       printk_address(regs->ip, 1);
+       printk(" RSP <%016lx>\n", regs->sp);
+#endif
+       return 0;
+}
+
+/*
+ * This is gone through when something in the kernel has done something bad
+ * and is about to be terminated:
+ */
+void die(const char *str, struct pt_regs *regs, long err)
+{
+       unsigned long flags = oops_begin();
+       int sig = SIGSEGV;
+
+       if (!user_mode_vm(regs))
+               report_bug(regs->ip, regs);
+
+       if (__die(str, regs, err))
+               sig = 0;
+       oops_end(flags, regs, sig);
+}
+
+void notrace __kprobes
+die_nmi(char *str, struct pt_regs *regs, int do_panic)
+{
+       unsigned long flags;
+
+       if (notify_die(DIE_NMIWATCHDOG, str, regs, 0, 2, SIGINT) == NOTIFY_STOP)
+               return;
+
+       /*
+        * We are in trouble anyway, lets at least try
+        * to get a message out.
+        */
+       flags = oops_begin();
+       printk(KERN_EMERG "%s", str);
+       printk(" on CPU%d, ip %08lx, registers:\n",
+               smp_processor_id(), regs->ip);
+       show_registers(regs);
+       oops_end(flags, regs, 0);
+       if (do_panic || panic_on_oops)
+               panic("Non maskable interrupt");
+       nmi_exit();
+       local_irq_enable();
+       do_exit(SIGBUS);
+}
+
+static int __init oops_setup(char *s)
+{
+       if (!s)
+               return -EINVAL;
+       if (!strcmp(s, "panic"))
+               panic_on_oops = 1;
+       return 0;
+}
+early_param("oops", oops_setup);
+
+static int __init kstack_setup(char *s)
+{
+       if (!s)
+               return -EINVAL;
+       kstack_depth_to_print = simple_strtoul(s, NULL, 0);
+       return 0;
+}
+early_param("kstack", kstack_setup);
+
+static int __init code_bytes_setup(char *s)
+{
+       code_bytes = simple_strtoul(s, NULL, 0);
+       if (code_bytes > 8192)
+               code_bytes = 8192;
+
+       return 1;
+}
+__setup("code_bytes=", code_bytes_setup);
diff --git a/arch/x86/kernel/dumpstack.h b/arch/x86/kernel/dumpstack.h
new file mode 100644 (file)
index 0000000..3119a80
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ *  Copyright (C) 1991, 1992  Linus Torvalds
+ *  Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs
+ */
+
+#ifndef DUMPSTACK_H
+#define DUMPSTACK_H
+
+#ifdef CONFIG_X86_32
+#define STACKSLOTS_PER_LINE 8
+#define get_bp(bp) asm("movl %%ebp, %0" : "=r" (bp) :)
+#else
+#define STACKSLOTS_PER_LINE 4
+#define get_bp(bp) asm("movq %%rbp, %0" : "=r" (bp) :)
+#endif
+
+extern unsigned long
+print_context_stack(struct thread_info *tinfo,
+               unsigned long *stack, unsigned long bp,
+               const struct stacktrace_ops *ops, void *data,
+               unsigned long *end);
+
+extern void
+show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
+               unsigned long *stack, unsigned long bp, char *log_lvl);
+
+extern void
+show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
+               unsigned long *sp, unsigned long bp, char *log_lvl);
+
+extern unsigned int code_bytes;
+extern int kstack_depth_to_print;
+
+/* The form of the top of the frame on the stack */
+struct stack_frame {
+       struct stack_frame *next_frame;
+       unsigned long return_address;
+};
+#endif
index b3614752197b6c6e3c0cf53c7b718dd0167fbdea..7b031b106ec8f65cb40ee4042eb8341c356e4a09 100644 (file)
 
 #include <asm/stacktrace.h>
 
-#define STACKSLOTS_PER_LINE 8
-#define get_bp(bp) asm("movl %%ebp, %0" : "=r" (bp) :)
-
-int panic_on_unrecovered_nmi;
-int kstack_depth_to_print = 3 * STACKSLOTS_PER_LINE;
-static unsigned int code_bytes = 64;
-static int die_counter;
-
-void printk_address(unsigned long address, int reliable)
-{
-       printk(" [<%p>] %s%pS\n", (void *) address,
-                       reliable ? "" : "? ", (void *) address);
-}
-
-static inline int valid_stack_ptr(struct thread_info *tinfo,
-                       void *p, unsigned int size, void *end)
-{
-       void *t = tinfo;
-       if (end) {
-               if (p < end && p >= (end-THREAD_SIZE))
-                       return 1;
-               else
-                       return 0;
-       }
-       return p > t && p < t + THREAD_SIZE - size;
-}
-
-/* The form of the top of the frame on the stack */
-struct stack_frame {
-       struct stack_frame *next_frame;
-       unsigned long return_address;
-};
-
-static inline unsigned long
-print_context_stack(struct thread_info *tinfo,
-               unsigned long *stack, unsigned long bp,
-               const struct stacktrace_ops *ops, void *data,
-               unsigned long *end)
-{
-       struct stack_frame *frame = (struct stack_frame *)bp;
-
-       while (valid_stack_ptr(tinfo, stack, sizeof(*stack), end)) {
-               unsigned long addr;
-
-               addr = *stack;
-               if (__kernel_text_address(addr)) {
-                       if ((unsigned long) stack == bp + sizeof(long)) {
-                               ops->address(data, addr, 1);
-                               frame = frame->next_frame;
-                               bp = (unsigned long) frame;
-                       } else {
-                               ops->address(data, addr, bp == 0);
-                       }
-               }
-               stack++;
-       }
-       return bp;
-}
+#include "dumpstack.h"
 
 void dump_trace(struct task_struct *task, struct pt_regs *regs,
                unsigned long *stack, unsigned long bp,
@@ -119,57 +62,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
 }
 EXPORT_SYMBOL(dump_trace);
 
-static void
-print_trace_warning_symbol(void *data, char *msg, unsigned long symbol)
-{
-       printk(data);
-       print_symbol(msg, symbol);
-       printk("\n");
-}
-
-static void print_trace_warning(void *data, char *msg)
-{
-       printk("%s%s\n", (char *)data, msg);
-}
-
-static int print_trace_stack(void *data, char *name)
-{
-       printk("%s <%s> ", (char *)data, name);
-       return 0;
-}
-
-/*
- * Print one address/symbol entries per line.
- */
-static void print_trace_address(void *data, unsigned long addr, int reliable)
-{
-       touch_nmi_watchdog();
-       printk(data);
-       printk_address(addr, reliable);
-}
-
-static const struct stacktrace_ops print_trace_ops = {
-       .warning = print_trace_warning,
-       .warning_symbol = print_trace_warning_symbol,
-       .stack = print_trace_stack,
-       .address = print_trace_address,
-};
-
-static void
-show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
-               unsigned long *stack, unsigned long bp, char *log_lvl)
-{
-       printk("%sCall Trace:\n", log_lvl);
-       dump_trace(task, regs, stack, bp, &print_trace_ops, log_lvl);
-}
-
-void show_trace(struct task_struct *task, struct pt_regs *regs,
-               unsigned long *stack, unsigned long bp)
-{
-       show_trace_log_lvl(task, regs, stack, bp, "");
-}
-
-static void
+void
 show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
                unsigned long *sp, unsigned long bp, char *log_lvl)
 {
@@ -196,33 +89,6 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
        show_trace_log_lvl(task, regs, sp, bp, log_lvl);
 }
 
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
-       show_stack_log_lvl(task, NULL, sp, 0, "");
-}
-
-/*
- * The architecture-independent dump_stack generator
- */
-void dump_stack(void)
-{
-       unsigned long bp = 0;
-       unsigned long stack;
-
-#ifdef CONFIG_FRAME_POINTER
-       if (!bp)
-               get_bp(bp);
-#endif
-
-       printk("Pid: %d, comm: %.20s %s %s %.*s\n",
-               current->pid, current->comm, print_tainted(),
-               init_utsname()->release,
-               (int)strcspn(init_utsname()->version, " "),
-               init_utsname()->version);
-       show_trace(NULL, NULL, &stack, bp);
-}
-
-EXPORT_SYMBOL(dump_stack);
 
 void show_registers(struct pt_regs *regs)
 {
@@ -283,167 +149,3 @@ int is_valid_bugaddr(unsigned long ip)
        return ud2 == 0x0b0f;
 }
 
-static raw_spinlock_t die_lock = __RAW_SPIN_LOCK_UNLOCKED;
-static int die_owner = -1;
-static unsigned int die_nest_count;
-
-unsigned __kprobes long oops_begin(void)
-{
-       unsigned long flags;
-
-       oops_enter();
-
-       if (die_owner != raw_smp_processor_id()) {
-               console_verbose();
-               raw_local_irq_save(flags);
-               __raw_spin_lock(&die_lock);
-               die_owner = smp_processor_id();
-               die_nest_count = 0;
-               bust_spinlocks(1);
-       } else {
-               raw_local_irq_save(flags);
-       }
-       die_nest_count++;
-       return flags;
-}
-
-void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
-{
-       bust_spinlocks(0);
-       die_owner = -1;
-       add_taint(TAINT_DIE);
-       __raw_spin_unlock(&die_lock);
-       raw_local_irq_restore(flags);
-
-       if (!regs)
-               return;
-
-       if (kexec_should_crash(current))
-               crash_kexec(regs);
-       if (in_interrupt())
-               panic("Fatal exception in interrupt");
-       if (panic_on_oops)
-               panic("Fatal exception");
-       oops_exit();
-       do_exit(signr);
-}
-
-int __kprobes __die(const char *str, struct pt_regs *regs, long err)
-{
-       unsigned short ss;
-       unsigned long sp;
-
-       printk(KERN_EMERG "%s: %04lx [#%d] ", str, err & 0xffff, ++die_counter);
-#ifdef CONFIG_PREEMPT
-       printk("PREEMPT ");
-#endif
-#ifdef CONFIG_SMP
-       printk("SMP ");
-#endif
-#ifdef CONFIG_DEBUG_PAGEALLOC
-       printk("DEBUG_PAGEALLOC");
-#endif
-       printk("\n");
-       sysfs_printk_last_file();
-       if (notify_die(DIE_OOPS, str, regs, err,
-                       current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
-               return 1;
-
-       show_registers(regs);
-       /* Executive summary in case the oops scrolled away */
-       sp = (unsigned long) (&regs->sp);
-       savesegment(ss, ss);
-       if (user_mode(regs)) {
-               sp = regs->sp;
-               ss = regs->ss & 0xffff;
-       }
-       printk(KERN_EMERG "EIP: [<%08lx>] ", regs->ip);
-       print_symbol("%s", regs->ip);
-       printk(" SS:ESP %04x:%08lx\n", ss, sp);
-       return 0;
-}
-
-/*
- * This is gone through when something in the kernel has done something bad
- * and is about to be terminated:
- */
-void die(const char *str, struct pt_regs *regs, long err)
-{
-       unsigned long flags = oops_begin();
-
-       if (die_nest_count < 3) {
-               report_bug(regs->ip, regs);
-
-               if (__die(str, regs, err))
-                       regs = NULL;
-       } else {
-               printk(KERN_EMERG "Recursive die() failure, output suppressed\n");
-       }
-
-       oops_end(flags, regs, SIGSEGV);
-}
-
-static DEFINE_SPINLOCK(nmi_print_lock);
-
-void notrace __kprobes
-die_nmi(char *str, struct pt_regs *regs, int do_panic)
-{
-       if (notify_die(DIE_NMIWATCHDOG, str, regs, 0, 2, SIGINT) == NOTIFY_STOP)
-               return;
-
-       spin_lock(&nmi_print_lock);
-       /*
-       * We are in trouble anyway, lets at least try
-       * to get a message out:
-       */
-       bust_spinlocks(1);
-       printk(KERN_EMERG "%s", str);
-       printk(" on CPU%d, ip %08lx, registers:\n",
-               smp_processor_id(), regs->ip);
-       show_registers(regs);
-       if (do_panic)
-               panic("Non maskable interrupt");
-       console_silent();
-       spin_unlock(&nmi_print_lock);
-
-       /*
-        * If we are in kernel we are probably nested up pretty bad
-        * and might aswell get out now while we still can:
-        */
-       if (!user_mode_vm(regs)) {
-               current->thread.trap_no = 2;
-               crash_kexec(regs);
-       }
-
-       bust_spinlocks(0);
-       do_exit(SIGSEGV);
-}
-
-static int __init oops_setup(char *s)
-{
-       if (!s)
-               return -EINVAL;
-       if (!strcmp(s, "panic"))
-               panic_on_oops = 1;
-       return 0;
-}
-early_param("oops", oops_setup);
-
-static int __init kstack_setup(char *s)
-{
-       if (!s)
-               return -EINVAL;
-       kstack_depth_to_print = simple_strtoul(s, NULL, 0);
-       return 0;
-}
-early_param("kstack", kstack_setup);
-
-static int __init code_bytes_setup(char *s)
-{
-       code_bytes = simple_strtoul(s, NULL, 0);
-       if (code_bytes > 8192)
-               code_bytes = 8192;
-
-       return 1;
-}
-__setup("code_bytes=", code_bytes_setup);
index 96a5db7da8a747e5192f410c60fe9494e8d8e8d1..33ff10287a5d7b29162068c4d4f6d2eb141724db 100644 (file)
 
 #include <asm/stacktrace.h>
 
-#define STACKSLOTS_PER_LINE 4
-#define get_bp(bp) asm("movq %%rbp, %0" : "=r" (bp) :)
-
-int panic_on_unrecovered_nmi;
-int kstack_depth_to_print = 3 * STACKSLOTS_PER_LINE;
-static unsigned int code_bytes = 64;
-static int die_counter;
-
-void printk_address(unsigned long address, int reliable)
-{
-       printk(" [<%p>] %s%pS\n", (void *) address,
-                       reliable ? "" : "? ", (void *) address);
-}
+#include "dumpstack.h"
 
 static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
                                        unsigned *usedp, char **idp)
@@ -113,51 +101,6 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
  * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack
  */
 
-static inline int valid_stack_ptr(struct thread_info *tinfo,
-                       void *p, unsigned int size, void *end)
-{
-       void *t = tinfo;
-       if (end) {
-               if (p < end && p >= (end-THREAD_SIZE))
-                       return 1;
-               else
-                       return 0;
-       }
-       return p > t && p < t + THREAD_SIZE - size;
-}
-
-/* The form of the top of the frame on the stack */
-struct stack_frame {
-       struct stack_frame *next_frame;
-       unsigned long return_address;
-};
-
-static inline unsigned long
-print_context_stack(struct thread_info *tinfo,
-               unsigned long *stack, unsigned long bp,
-               const struct stacktrace_ops *ops, void *data,
-               unsigned long *end)
-{
-       struct stack_frame *frame = (struct stack_frame *)bp;
-
-       while (valid_stack_ptr(tinfo, stack, sizeof(*stack), end)) {
-               unsigned long addr;
-
-               addr = *stack;
-               if (__kernel_text_address(addr)) {
-                       if ((unsigned long) stack == bp + sizeof(long)) {
-                               ops->address(data, addr, 1);
-                               frame = frame->next_frame;
-                               bp = (unsigned long) frame;
-                       } else {
-                               ops->address(data, addr, bp == 0);
-                       }
-               }
-               stack++;
-       }
-       return bp;
-}
-
 void dump_trace(struct task_struct *task, struct pt_regs *regs,
                unsigned long *stack, unsigned long bp,
                const struct stacktrace_ops *ops, void *data)
@@ -248,57 +191,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
 }
 EXPORT_SYMBOL(dump_trace);
 
-static void
-print_trace_warning_symbol(void *data, char *msg, unsigned long symbol)
-{
-       printk(data);
-       print_symbol(msg, symbol);
-       printk("\n");
-}
-
-static void print_trace_warning(void *data, char *msg)
-{
-       printk("%s%s\n", (char *)data, msg);
-}
-
-static int print_trace_stack(void *data, char *name)
-{
-       printk("%s <%s> ", (char *)data, name);
-       return 0;
-}
-
-/*
- * Print one address/symbol entries per line.
- */
-static void print_trace_address(void *data, unsigned long addr, int reliable)
-{
-       touch_nmi_watchdog();
-       printk(data);
-       printk_address(addr, reliable);
-}
-
-static const struct stacktrace_ops print_trace_ops = {
-       .warning = print_trace_warning,
-       .warning_symbol = print_trace_warning_symbol,
-       .stack = print_trace_stack,
-       .address = print_trace_address,
-};
-
-static void
-show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
-               unsigned long *stack, unsigned long bp, char *log_lvl)
-{
-       printk("%sCall Trace:\n", log_lvl);
-       dump_trace(task, regs, stack, bp, &print_trace_ops, log_lvl);
-}
-
-void show_trace(struct task_struct *task, struct pt_regs *regs,
-               unsigned long *stack, unsigned long bp)
-{
-       show_trace_log_lvl(task, regs, stack, bp, "");
-}
-
-static void
+void
 show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
                unsigned long *sp, unsigned long bp, char *log_lvl)
 {
@@ -342,33 +235,6 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
        show_trace_log_lvl(task, regs, sp, bp, log_lvl);
 }
 
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
-       show_stack_log_lvl(task, NULL, sp, 0, "");
-}
-
-/*
- * The architecture-independent dump_stack generator
- */
-void dump_stack(void)
-{
-       unsigned long bp = 0;
-       unsigned long stack;
-
-#ifdef CONFIG_FRAME_POINTER
-       if (!bp)
-               get_bp(bp);
-#endif
-
-       printk("Pid: %d, comm: %.20s %s %s %.*s\n",
-               current->pid, current->comm, print_tainted(),
-               init_utsname()->release,
-               (int)strcspn(init_utsname()->version, " "),
-               init_utsname()->version);
-       show_trace(NULL, NULL, &stack, bp);
-}
-EXPORT_SYMBOL(dump_stack);
-
 void show_registers(struct pt_regs *regs)
 {
        int i;
@@ -429,147 +295,3 @@ int is_valid_bugaddr(unsigned long ip)
        return ud2 == 0x0b0f;
 }
 
-static raw_spinlock_t die_lock = __RAW_SPIN_LOCK_UNLOCKED;
-static int die_owner = -1;
-static unsigned int die_nest_count;
-
-unsigned __kprobes long oops_begin(void)
-{
-       int cpu;
-       unsigned long flags;
-
-       oops_enter();
-
-       /* racy, but better than risking deadlock. */
-       raw_local_irq_save(flags);
-       cpu = smp_processor_id();
-       if (!__raw_spin_trylock(&die_lock)) {
-               if (cpu == die_owner)
-                       /* nested oops. should stop eventually */;
-               else
-                       __raw_spin_lock(&die_lock);
-       }
-       die_nest_count++;
-       die_owner = cpu;
-       console_verbose();
-       bust_spinlocks(1);
-       return flags;
-}
-
-void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
-{
-       die_owner = -1;
-       bust_spinlocks(0);
-       die_nest_count--;
-       if (!die_nest_count)
-               /* Nest count reaches zero, release the lock. */
-               __raw_spin_unlock(&die_lock);
-       raw_local_irq_restore(flags);
-       if (!regs) {
-               oops_exit();
-               return;
-       }
-       if (in_interrupt())
-               panic("Fatal exception in interrupt");
-       if (panic_on_oops)
-               panic("Fatal exception");
-       oops_exit();
-       do_exit(signr);
-}
-
-int __kprobes __die(const char *str, struct pt_regs *regs, long err)
-{
-       printk(KERN_EMERG "%s: %04lx [#%d] ", str, err & 0xffff, ++die_counter);
-#ifdef CONFIG_PREEMPT
-       printk("PREEMPT ");
-#endif
-#ifdef CONFIG_SMP
-       printk("SMP ");
-#endif
-#ifdef CONFIG_DEBUG_PAGEALLOC
-       printk("DEBUG_PAGEALLOC");
-#endif
-       printk("\n");
-       sysfs_printk_last_file();
-       if (notify_die(DIE_OOPS, str, regs, err,
-                       current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
-               return 1;
-
-       show_registers(regs);
-       add_taint(TAINT_DIE);
-       /* Executive summary in case the oops scrolled away */
-       printk(KERN_ALERT "RIP ");
-       printk_address(regs->ip, 1);
-       printk(" RSP <%016lx>\n", regs->sp);
-       if (kexec_should_crash(current))
-               crash_kexec(regs);
-       return 0;
-}
-
-void die(const char *str, struct pt_regs *regs, long err)
-{
-       unsigned long flags = oops_begin();
-
-       if (!user_mode(regs))
-               report_bug(regs->ip, regs);
-
-       if (__die(str, regs, err))
-               regs = NULL;
-       oops_end(flags, regs, SIGSEGV);
-}
-
-notrace __kprobes void
-die_nmi(char *str, struct pt_regs *regs, int do_panic)
-{
-       unsigned long flags;
-
-       if (notify_die(DIE_NMIWATCHDOG, str, regs, 0, 2, SIGINT) == NOTIFY_STOP)
-               return;
-
-       flags = oops_begin();
-       /*
-        * We are in trouble anyway, lets at least try
-        * to get a message out.
-        */
-       printk(KERN_EMERG "%s", str);
-       printk(" on CPU%d, ip %08lx, registers:\n",
-               smp_processor_id(), regs->ip);
-       show_registers(regs);
-       if (kexec_should_crash(current))
-               crash_kexec(regs);
-       if (do_panic || panic_on_oops)
-               panic("Non maskable interrupt");
-       oops_end(flags, NULL, SIGBUS);
-       nmi_exit();
-       local_irq_enable();
-       do_exit(SIGBUS);
-}
-
-static int __init oops_setup(char *s)
-{
-       if (!s)
-               return -EINVAL;
-       if (!strcmp(s, "panic"))
-               panic_on_oops = 1;
-       return 0;
-}
-early_param("oops", oops_setup);
-
-static int __init kstack_setup(char *s)
-{
-       if (!s)
-               return -EINVAL;
-       kstack_depth_to_print = simple_strtoul(s, NULL, 0);
-       return 0;
-}
-early_param("kstack", kstack_setup);
-
-static int __init code_bytes_setup(char *s)
-{
-       code_bytes = simple_strtoul(s, NULL, 0);
-       if (code_bytes > 8192)
-               code_bytes = 8192;
-
-       return 1;
-}
-__setup("code_bytes=", code_bytes_setup);
index 7aafeb5263efbbb8de9e7aad35680d2d882a0882..65a13943e0982524877768164cf8cc0cd63688f4 100644 (file)
@@ -677,22 +677,6 @@ struct early_res {
 };
 static struct early_res early_res[MAX_EARLY_RES] __initdata = {
        { 0, PAGE_SIZE, "BIOS data page" },     /* BIOS data page */
-#if defined(CONFIG_X86_64) && defined(CONFIG_X86_TRAMPOLINE)
-       { TRAMPOLINE_BASE, TRAMPOLINE_BASE + 2 * PAGE_SIZE, "TRAMPOLINE" },
-#endif
-#if defined(CONFIG_X86_32) && defined(CONFIG_SMP)
-       /*
-        * But first pinch a few for the stack/trampoline stuff
-        * FIXME: Don't need the extra page at 4K, but need to fix
-        * trampoline before removing it. (see the GDT stuff)
-        */
-       { PAGE_SIZE, PAGE_SIZE + PAGE_SIZE, "EX TRAMPOLINE" },
-       /*
-        * Has to be in very low memory so we can execute
-        * real-mode AP code.
-        */
-       { TRAMPOLINE_BASE, TRAMPOLINE_BASE + PAGE_SIZE, "TRAMPOLINE" },
-#endif
        {}
 };
 
index 3ce029ffaa55b2085ef4de993b427f86a3cdfdb7..1b894b72c0f5df35a1d489def584086ebb2affe5 100644 (file)
@@ -188,20 +188,6 @@ static void __init ati_bugs_contd(int num, int slot, int func)
 }
 #endif
 
-#ifdef CONFIG_DMAR
-static void __init intel_g33_dmar(int num, int slot, int func)
-{
-       struct acpi_table_header *dmar_tbl;
-       acpi_status status;
-
-       status = acpi_get_table(ACPI_SIG_DMAR, 0, &dmar_tbl);
-       if (ACPI_SUCCESS(status)) {
-               printk(KERN_INFO "BIOS BUG: DMAR advertised on Intel G31/G33 chipset -- ignoring\n");
-               dmar_disabled = 1;
-       }
-}
-#endif
-
 #define QFLAG_APPLY_ONCE       0x1
 #define QFLAG_APPLIED          0x2
 #define QFLAG_DONE             (QFLAG_APPLY_ONCE|QFLAG_APPLIED)
@@ -225,10 +211,6 @@ static struct chipset early_qrk[] __initdata = {
          PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs },
        { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
          PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd },
-#ifdef CONFIG_DMAR
-       { PCI_VENDOR_ID_INTEL, 0x29c0,
-         PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, intel_g33_dmar },
-#endif
        {}
 };
 
index 34ad997d3834dc773b71ae4f27e18828447d2853..23b138e31e9c2fe229c42050ab2c5e864cac4710 100644 (file)
@@ -875,49 +875,6 @@ static struct console early_dbgp_console = {
 };
 #endif
 
-/* Console interface to a host file on AMD's SimNow! */
-
-static int simnow_fd;
-
-enum {
-       MAGIC1 = 0xBACCD00A,
-       MAGIC2 = 0xCA110000,
-       XOPEN = 5,
-       XWRITE = 4,
-};
-
-static noinline long simnow(long cmd, long a, long b, long c)
-{
-       long ret;
-
-       asm volatile("cpuid" :
-                    "=a" (ret) :
-                    "b" (a), "c" (b), "d" (c), "0" (MAGIC1), "D" (cmd + MAGIC2));
-       return ret;
-}
-
-static void __init simnow_init(char *str)
-{
-       char *fn = "klog";
-
-       if (*str == '=')
-               fn = ++str;
-       /* error ignored */
-       simnow_fd = simnow(XOPEN, (unsigned long)fn, O_WRONLY|O_APPEND|O_CREAT, 0644);
-}
-
-static void simnow_write(struct console *con, const char *s, unsigned n)
-{
-       simnow(XWRITE, simnow_fd, (unsigned long)s, n);
-}
-
-static struct console simnow_console = {
-       .name =         "simnow",
-       .write =        simnow_write,
-       .flags =        CON_PRINTBUFFER,
-       .index =        -1,
-};
-
 /* Direct interface for emergencies */
 static struct console *early_console = &early_vga_console;
 static int __initdata early_console_initialized;
@@ -960,10 +917,6 @@ static int __init setup_early_printk(char *buf)
                max_ypos = boot_params.screen_info.orig_video_lines;
                current_ypos = boot_params.screen_info.orig_y;
                early_console = &early_vga_console;
-       } else if (!strncmp(buf, "simnow", 6)) {
-               simnow_init(buf + 6);
-               early_console = &simnow_console;
-               keep_early = 1;
 #ifdef CONFIG_EARLY_PRINTK_DBGP
        } else if (!strncmp(buf, "dbgp", 4)) {
                if (early_dbgp_init(buf+4) < 0)
index 28b597ef9ca16b7992c333f10eae252ea695475c..f6402c4ba10dae5241604da1cd2614e6113966d0 100644 (file)
@@ -1051,6 +1051,7 @@ ENTRY(kernel_thread_helper)
        push %eax
        CFI_ADJUST_CFA_OFFSET 4
        call do_exit
+       ud2                     # padding for call trace
        CFI_ENDPROC
 ENDPROC(kernel_thread_helper)
 
index b86f332c96a66596f0fe076d7c0eda78ea05dbe5..42571baaca3257d29c42aa1de5581308edbf1ade 100644 (file)
  *
  * NOTE: This code handles signal-recognition, which happens every time
  * after an interrupt and after each system call.
- * 
- * Normal syscalls and interrupts don't save a full stack frame, this is 
+ *
+ * Normal syscalls and interrupts don't save a full stack frame, this is
  * only done for syscall tracing, signals or fork/exec et.al.
- * 
- * A note on terminology:       
- * - top of stack: Architecture defined interrupt frame from SS to RIP 
- * at the top of the kernel process stack.     
+ *
+ * A note on terminology:
+ * - top of stack: Architecture defined interrupt frame from SS to RIP
+ * at the top of the kernel process stack.
  * - partial stack frame: partially saved registers upto R11.
- * - full stack frame: Like partial stack frame, but all register saved. 
+ * - full stack frame: Like partial stack frame, but all register saved.
  *
  * Some macro usage:
  * - CFI macros are used to generate dwarf2 unwind information for better
@@ -142,7 +142,7 @@ END(mcount)
 
 #ifndef CONFIG_PREEMPT
 #define retint_kernel retint_restore_args
-#endif 
+#endif
 
 #ifdef CONFIG_PARAVIRT
 ENTRY(native_usergs_sysret64)
@@ -161,14 +161,14 @@ ENTRY(native_usergs_sysret64)
 .endm
 
 /*
- * C code is not supposed to know about undefined top of stack. Every time 
- * a C function with an pt_regs argument is called from the SYSCALL based 
+ * C code is not supposed to know about undefined top of stack. Every time
+ * a C function with an pt_regs argument is called from the SYSCALL based
  * fast path FIXUP_TOP_OF_STACK is needed.
  * RESTORE_TOP_OF_STACK syncs the syscall state after any possible ptregs
  * manipulation.
- */            
-               
-       /* %rsp:at FRAMEEND */ 
+ */
+
+       /* %rsp:at FRAMEEND */
        .macro FIXUP_TOP_OF_STACK tmp
        movq    %gs:pda_oldrsp,\tmp
        movq    \tmp,RSP(%rsp)
@@ -244,8 +244,8 @@ ENTRY(native_usergs_sysret64)
        .endm
 /*
  * A newly forked process directly context switches into this.
- */    
-/* rdi:        prev */ 
+ */
+/* rdi:        prev */
 ENTRY(ret_from_fork)
        CFI_DEFAULT_STACK
        push kernel_eflags(%rip)
@@ -255,8 +255,9 @@ ENTRY(ret_from_fork)
        call schedule_tail
        GET_THREAD_INFO(%rcx)
        testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%rcx)
+       CFI_REMEMBER_STATE
        jnz rff_trace
-rff_action:    
+rff_action:
        RESTORE_REST
        testl $3,CS-ARGOFFSET(%rsp)     # from kernel_thread?
        je   int_ret_from_sys_call
@@ -264,10 +265,11 @@ rff_action:
        jnz  int_ret_from_sys_call
        RESTORE_TOP_OF_STACK %rdi,ARGOFFSET
        jmp ret_from_sys_call
+       CFI_RESTORE_STATE
 rff_trace:
        movq %rsp,%rdi
        call syscall_trace_leave
-       GET_THREAD_INFO(%rcx)   
+       GET_THREAD_INFO(%rcx)
        jmp rff_action
        CFI_ENDPROC
 END(ret_from_fork)
@@ -278,20 +280,20 @@ END(ret_from_fork)
  * SYSCALL does not save anything on the stack and does not change the
  * stack pointer.
  */
-               
+
 /*
- * Register setup:     
+ * Register setup:
  * rax  system call number
  * rdi  arg0
- * rcx  return address for syscall/sysret, C arg3 
+ * rcx  return address for syscall/sysret, C arg3
  * rsi  arg1
- * rdx  arg2   
+ * rdx  arg2
  * r10  arg3   (--> moved to rcx for C)
  * r8   arg4
  * r9   arg5
  * r11  eflags for syscall/sysret, temporary for C
- * r12-r15,rbp,rbx saved by C code, not touched.               
- * 
+ * r12-r15,rbp,rbx saved by C code, not touched.
+ *
  * Interrupts are off on entry.
  * Only called from user space.
  *
@@ -301,7 +303,7 @@ END(ret_from_fork)
  * When user can change the frames always force IRET. That is because
  * it deals with uncanonical addresses better. SYSRET has trouble
  * with them due to bugs in both AMD and Intel CPUs.
- */                                    
+ */
 
 ENTRY(system_call)
        CFI_STARTPROC   simple
@@ -317,7 +319,7 @@ ENTRY(system_call)
         */
 ENTRY(system_call_after_swapgs)
 
-       movq    %rsp,%gs:pda_oldrsp 
+       movq    %rsp,%gs:pda_oldrsp
        movq    %gs:pda_kernelstack,%rsp
        /*
         * No need to follow this irqs off/on section - it's straight
@@ -325,7 +327,7 @@ ENTRY(system_call_after_swapgs)
         */
        ENABLE_INTERRUPTS(CLBR_NONE)
        SAVE_ARGS 8,1
-       movq  %rax,ORIG_RAX-ARGOFFSET(%rsp) 
+       movq  %rax,ORIG_RAX-ARGOFFSET(%rsp)
        movq  %rcx,RIP-ARGOFFSET(%rsp)
        CFI_REL_OFFSET rip,RIP-ARGOFFSET
        GET_THREAD_INFO(%rcx)
@@ -339,19 +341,19 @@ system_call_fastpath:
        movq %rax,RAX-ARGOFFSET(%rsp)
 /*
  * Syscall return path ending with SYSRET (fast path)
- * Has incomplete stack frame and undefined top of stack. 
- */            
+ * Has incomplete stack frame and undefined top of stack.
+ */
 ret_from_sys_call:
        movl $_TIF_ALLWORK_MASK,%edi
        /* edi: flagmask */
-sysret_check:          
+sysret_check:
        LOCKDEP_SYS_EXIT
        GET_THREAD_INFO(%rcx)
        DISABLE_INTERRUPTS(CLBR_NONE)
        TRACE_IRQS_OFF
        movl TI_flags(%rcx),%edx
        andl %edi,%edx
-       jnz  sysret_careful 
+       jnz  sysret_careful
        CFI_REMEMBER_STATE
        /*
         * sysretq will re-enable interrupts:
@@ -366,7 +368,7 @@ sysret_check:
 
        CFI_RESTORE_STATE
        /* Handle reschedules */
-       /* edx: work, edi: workmask */  
+       /* edx: work, edi: workmask */
 sysret_careful:
        bt $TIF_NEED_RESCHED,%edx
        jnc sysret_signal
@@ -379,7 +381,7 @@ sysret_careful:
        CFI_ADJUST_CFA_OFFSET -8
        jmp sysret_check
 
-       /* Handle a signal */ 
+       /* Handle a signal */
 sysret_signal:
        TRACE_IRQS_ON
        ENABLE_INTERRUPTS(CLBR_NONE)
@@ -398,7 +400,7 @@ sysret_signal:
        DISABLE_INTERRUPTS(CLBR_NONE)
        TRACE_IRQS_OFF
        jmp int_with_check
-       
+
 badsys:
        movq $-ENOSYS,RAX-ARGOFFSET(%rsp)
        jmp ret_from_sys_call
@@ -437,7 +439,7 @@ sysret_audit:
 #endif /* CONFIG_AUDITSYSCALL */
 
        /* Do syscall tracing */
-tracesys:                       
+tracesys:
 #ifdef CONFIG_AUDITSYSCALL
        testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%rcx)
        jz auditsys
@@ -460,8 +462,8 @@ tracesys:
        call *sys_call_table(,%rax,8)
        movq %rax,RAX-ARGOFFSET(%rsp)
        /* Use IRET because user could have changed frame */
-               
-/* 
+
+/*
  * Syscall return path ending with IRET.
  * Has correct top of stack, but partial stack frame.
  */
@@ -505,18 +507,18 @@ int_very_careful:
        TRACE_IRQS_ON
        ENABLE_INTERRUPTS(CLBR_NONE)
        SAVE_REST
-       /* Check for syscall exit trace */      
+       /* Check for syscall exit trace */
        testl $_TIF_WORK_SYSCALL_EXIT,%edx
        jz int_signal
        pushq %rdi
        CFI_ADJUST_CFA_OFFSET 8
-       leaq 8(%rsp),%rdi       # &ptregs -> arg1       
+       leaq 8(%rsp),%rdi       # &ptregs -> arg1
        call syscall_trace_leave
        popq %rdi
        CFI_ADJUST_CFA_OFFSET -8
        andl $~(_TIF_WORK_SYSCALL_EXIT|_TIF_SYSCALL_EMU),%edi
        jmp int_restore_rest
-       
+
 int_signal:
        testl $_TIF_DO_NOTIFY_MASK,%edx
        jz 1f
@@ -531,11 +533,11 @@ int_restore_rest:
        jmp int_with_check
        CFI_ENDPROC
 END(system_call)
-               
-/* 
+
+/*
  * Certain special system calls that need to save a complete full stack frame.
- */                                                            
-       
+ */
+
        .macro PTREGSCALL label,func,arg
        .globl \label
 \label:
@@ -572,7 +574,7 @@ ENTRY(ptregscall_common)
        ret
        CFI_ENDPROC
 END(ptregscall_common)
-       
+
 ENTRY(stub_execve)
        CFI_STARTPROC
        popq %r11
@@ -588,11 +590,11 @@ ENTRY(stub_execve)
        jmp int_ret_from_sys_call
        CFI_ENDPROC
 END(stub_execve)
-       
+
 /*
  * sigreturn is special because it needs to restore all registers on return.
  * This cannot be done with SYSRET, so use the IRET return path instead.
- */                
+ */
 ENTRY(stub_rt_sigreturn)
        CFI_STARTPROC
        addq $8, %rsp
@@ -685,12 +687,12 @@ exit_intr:
        GET_THREAD_INFO(%rcx)
        testl $3,CS-ARGOFFSET(%rsp)
        je retint_kernel
-       
+
        /* Interrupt came from user space */
        /*
         * Has a correct top of stack, but a partial stack frame
         * %rcx: thread info. Interrupts off.
-        */             
+        */
 retint_with_reschedule:
        movl $_TIF_WORK_MASK,%edi
 retint_check:
@@ -763,20 +765,20 @@ retint_careful:
        pushq %rdi
        CFI_ADJUST_CFA_OFFSET   8
        call  schedule
-       popq %rdi               
+       popq %rdi
        CFI_ADJUST_CFA_OFFSET   -8
        GET_THREAD_INFO(%rcx)
        DISABLE_INTERRUPTS(CLBR_NONE)
        TRACE_IRQS_OFF
        jmp retint_check
-       
+
 retint_signal:
        testl $_TIF_DO_NOTIFY_MASK,%edx
        jz    retint_swapgs
        TRACE_IRQS_ON
        ENABLE_INTERRUPTS(CLBR_NONE)
        SAVE_REST
-       movq $-1,ORIG_RAX(%rsp)                         
+       movq $-1,ORIG_RAX(%rsp)
        xorl %esi,%esi          # oldset
        movq %rsp,%rdi          # &pt_regs
        call do_notify_resume
@@ -798,14 +800,14 @@ ENTRY(retint_kernel)
        jnc  retint_restore_args
        call preempt_schedule_irq
        jmp exit_intr
-#endif 
+#endif
 
        CFI_ENDPROC
 END(common_interrupt)
-       
+
 /*
  * APIC interrupts.
- */            
+ */
        .macro apicinterrupt num,func
        INTR_FRAME
        pushq $~(\num)
@@ -823,14 +825,14 @@ ENTRY(threshold_interrupt)
        apicinterrupt THRESHOLD_APIC_VECTOR,mce_threshold_interrupt
 END(threshold_interrupt)
 
-#ifdef CONFIG_SMP      
+#ifdef CONFIG_SMP
 ENTRY(reschedule_interrupt)
        apicinterrupt RESCHEDULE_VECTOR,smp_reschedule_interrupt
 END(reschedule_interrupt)
 
        .macro INVALIDATE_ENTRY num
 ENTRY(invalidate_interrupt\num)
-       apicinterrupt INVALIDATE_TLB_VECTOR_START+\num,smp_invalidate_interrupt 
+       apicinterrupt INVALIDATE_TLB_VECTOR_START+\num,smp_invalidate_interrupt
 END(invalidate_interrupt\num)
        .endm
 
@@ -869,22 +871,22 @@ END(error_interrupt)
 ENTRY(spurious_interrupt)
        apicinterrupt SPURIOUS_APIC_VECTOR,smp_spurious_interrupt
 END(spurious_interrupt)
-                               
+
 /*
  * Exception entry points.
- */            
+ */
        .macro zeroentry sym
        INTR_FRAME
        PARAVIRT_ADJUST_EXCEPTION_FRAME
-       pushq $0        /* push error code/oldrax */ 
+       pushq $0        /* push error code/oldrax */
        CFI_ADJUST_CFA_OFFSET 8
-       pushq %rax      /* push real oldrax to the rdi slot */ 
+       pushq %rax      /* push real oldrax to the rdi slot */
        CFI_ADJUST_CFA_OFFSET 8
        CFI_REL_OFFSET rax,0
        leaq  \sym(%rip),%rax
        jmp error_entry
        CFI_ENDPROC
-       .endm   
+       .endm
 
        .macro errorentry sym
        XCPT_FRAME
@@ -998,13 +1000,13 @@ paranoid_schedule\trace:
 
 /*
  * Exception entry point. This expects an error code/orig_rax on the stack
- * and the exception handler in %rax.  
- */                                            
+ * and the exception handler in %rax.
+ */
 KPROBE_ENTRY(error_entry)
        _frame RDI
        CFI_REL_OFFSET rax,0
        /* rdi slot contains rax, oldrax contains error code */
-       cld     
+       cld
        subq  $14*8,%rsp
        CFI_ADJUST_CFA_OFFSET   (14*8)
        movq %rsi,13*8(%rsp)
@@ -1015,7 +1017,7 @@ KPROBE_ENTRY(error_entry)
        CFI_REL_OFFSET  rdx,RDX
        movq %rcx,11*8(%rsp)
        CFI_REL_OFFSET  rcx,RCX
-       movq %rsi,10*8(%rsp)    /* store rax */ 
+       movq %rsi,10*8(%rsp)    /* store rax */
        CFI_REL_OFFSET  rax,RAX
        movq %r8, 9*8(%rsp)
        CFI_REL_OFFSET  r8,R8
@@ -1025,29 +1027,29 @@ KPROBE_ENTRY(error_entry)
        CFI_REL_OFFSET  r10,R10
        movq %r11,6*8(%rsp)
        CFI_REL_OFFSET  r11,R11
-       movq %rbx,5*8(%rsp) 
+       movq %rbx,5*8(%rsp)
        CFI_REL_OFFSET  rbx,RBX
-       movq %rbp,4*8(%rsp) 
+       movq %rbp,4*8(%rsp)
        CFI_REL_OFFSET  rbp,RBP
-       movq %r12,3*8(%rsp) 
+       movq %r12,3*8(%rsp)
        CFI_REL_OFFSET  r12,R12
-       movq %r13,2*8(%rsp) 
+       movq %r13,2*8(%rsp)
        CFI_REL_OFFSET  r13,R13
-       movq %r14,1*8(%rsp) 
+       movq %r14,1*8(%rsp)
        CFI_REL_OFFSET  r14,R14
-       movq %r15,(%rsp) 
+       movq %r15,(%rsp)
        CFI_REL_OFFSET  r15,R15
-       xorl %ebx,%ebx  
+       xorl %ebx,%ebx
        testl $3,CS(%rsp)
        je  error_kernelspace
-error_swapgs:  
+error_swapgs:
        SWAPGS
 error_sti:
        TRACE_IRQS_OFF
-       movq %rdi,RDI(%rsp)     
+       movq %rdi,RDI(%rsp)
        CFI_REL_OFFSET  rdi,RDI
        movq %rsp,%rdi
-       movq ORIG_RAX(%rsp),%rsi        /* get error code */ 
+       movq ORIG_RAX(%rsp),%rsi        /* get error code */
        movq $-1,ORIG_RAX(%rsp)
        call *%rax
        /* ebx: no swapgs flag (1: don't need swapgs, 0: need it) */
@@ -1056,7 +1058,7 @@ error_exit:
        RESTORE_REST
        DISABLE_INTERRUPTS(CLBR_NONE)
        TRACE_IRQS_OFF
-       GET_THREAD_INFO(%rcx)   
+       GET_THREAD_INFO(%rcx)
        testl %eax,%eax
        jne  retint_kernel
        LOCKDEP_SYS_EXIT_IRQ
@@ -1072,7 +1074,7 @@ error_kernelspace:
        /* There are two places in the kernel that can potentially fault with
           usergs. Handle them here. The exception handlers after
           iret run with kernel gs again, so don't set the user space flag.
-          B stepping K8s sometimes report an truncated RIP for IRET 
+          B stepping K8s sometimes report an truncated RIP for IRET
           exceptions returning to compat mode. Check for these here too. */
        leaq irq_return(%rip),%rcx
        cmpq %rcx,RIP(%rsp)
@@ -1084,17 +1086,17 @@ error_kernelspace:
         je   error_swapgs
        jmp  error_sti
 KPROBE_END(error_entry)
-       
+
        /* Reload gs selector with exception handling */
-       /* edi:  new selector */ 
+       /* edi:  new selector */
 ENTRY(native_load_gs_index)
        CFI_STARTPROC
        pushf
        CFI_ADJUST_CFA_OFFSET 8
        DISABLE_INTERRUPTS(CLBR_ANY | ~(CLBR_RDI))
         SWAPGS
-gs_change:     
-        movl %edi,%gs   
+gs_change:
+        movl %edi,%gs
 2:     mfence          /* workaround */
        SWAPGS
         popf
@@ -1102,20 +1104,20 @@ gs_change:
         ret
        CFI_ENDPROC
 ENDPROC(native_load_gs_index)
-       
+
         .section __ex_table,"a"
         .align 8
         .quad gs_change,bad_gs
         .previous
         .section .fixup,"ax"
        /* running with kernelgs */
-bad_gs: 
+bad_gs:
        SWAPGS                  /* switch back to user gs */
        xorl %eax,%eax
         movl %eax,%gs
         jmp  2b
-        .previous       
-       
+        .previous
+
 /*
  * Create a kernel thread.
  *
@@ -1138,7 +1140,7 @@ ENTRY(kernel_thread)
 
        xorl %r8d,%r8d
        xorl %r9d,%r9d
-       
+
        # clone now
        call do_fork
        movq %rax,RAX(%rsp)
@@ -1149,14 +1151,14 @@ ENTRY(kernel_thread)
         * so internally to the x86_64 port you can rely on kernel_thread()
         * not to reschedule the child before returning, this avoids the need
         * of hacks for example to fork off the per-CPU idle tasks.
-         * [Hopefully no generic code relies on the reschedule -AK]    
+         * [Hopefully no generic code relies on the reschedule -AK]
         */
        RESTORE_ALL
        UNFAKE_STACK_FRAME
        ret
        CFI_ENDPROC
 ENDPROC(kernel_thread)
-       
+
 child_rip:
        pushq $0                # fake return address
        CFI_STARTPROC
@@ -1170,6 +1172,7 @@ child_rip:
        # exit
        mov %eax, %edi
        call do_exit
+       ud2                     # padding for call trace
        CFI_ENDPROC
 ENDPROC(child_rip)
 
@@ -1191,10 +1194,10 @@ ENDPROC(child_rip)
 ENTRY(kernel_execve)
        CFI_STARTPROC
        FAKE_STACK_FRAME $0
-       SAVE_ALL        
+       SAVE_ALL
        movq %rsp,%rcx
        call sys_execve
-       movq %rax, RAX(%rsp)    
+       movq %rax, RAX(%rsp)
        RESTORE_REST
        testq %rax,%rax
        je int_ret_from_sys_call
@@ -1213,7 +1216,7 @@ ENTRY(coprocessor_error)
 END(coprocessor_error)
 
 ENTRY(simd_coprocessor_error)
-       zeroentry do_simd_coprocessor_error     
+       zeroentry do_simd_coprocessor_error
 END(simd_coprocessor_error)
 
 ENTRY(device_not_available)
@@ -1225,12 +1228,12 @@ KPROBE_ENTRY(debug)
        INTR_FRAME
        PARAVIRT_ADJUST_EXCEPTION_FRAME
        pushq $0
-       CFI_ADJUST_CFA_OFFSET 8         
+       CFI_ADJUST_CFA_OFFSET 8
        paranoidentry do_debug, DEBUG_STACK
        paranoidexit
 KPROBE_END(debug)
 
-       /* runs on exception stack */   
+       /* runs on exception stack */
 KPROBE_ENTRY(nmi)
        INTR_FRAME
        PARAVIRT_ADJUST_EXCEPTION_FRAME
@@ -1264,7 +1267,7 @@ ENTRY(bounds)
 END(bounds)
 
 ENTRY(invalid_op)
-       zeroentry do_invalid_op 
+       zeroentry do_invalid_op
 END(invalid_op)
 
 ENTRY(coprocessor_segment_overrun)
@@ -1319,7 +1322,7 @@ ENTRY(machine_check)
        INTR_FRAME
        PARAVIRT_ADJUST_EXCEPTION_FRAME
        pushq $0
-       CFI_ADJUST_CFA_OFFSET 8 
+       CFI_ADJUST_CFA_OFFSET 8
        paranoidentry do_machine_check
        jmp paranoid_exit1
        CFI_ENDPROC
index f454c78fcef6c7172db2fc0088548974f2f083e1..53699c931ad41ebdaee8594cdb17f4464fcc986f 100644 (file)
 #include <asm/io.h>
 #include <asm/nmi.h>
 #include <asm/smp.h>
+#include <asm/atomic.h>
 #include <asm/apicdef.h>
 #include <mach_mpparse.h>
+#include <asm/genapic.h>
+#include <asm/setup.h>
 
 /*
  * ES7000 chipsets
@@ -161,6 +164,43 @@ es7000_rename_gsi(int ioapic, int gsi)
        return gsi;
 }
 
+static int wakeup_secondary_cpu_via_mip(int cpu, unsigned long eip)
+{
+       unsigned long vect = 0, psaival = 0;
+
+       if (psai == NULL)
+               return -1;
+
+       vect = ((unsigned long)__pa(eip)/0x1000) << 16;
+       psaival = (0x1000000 | vect | cpu);
+
+       while (*psai & 0x1000000)
+               ;
+
+       *psai = psaival;
+
+       return 0;
+}
+
+static void noop_wait_for_deassert(atomic_t *deassert_not_used)
+{
+}
+
+static int __init es7000_update_genapic(void)
+{
+       genapic->wakeup_cpu = wakeup_secondary_cpu_via_mip;
+
+       /* MPENTIUMIII */
+       if (boot_cpu_data.x86 == 6 &&
+           (boot_cpu_data.x86_model >= 7 || boot_cpu_data.x86_model <= 11)) {
+               es7000_update_genapic_to_cluster();
+               genapic->wait_for_init_deassert = noop_wait_for_deassert;
+               genapic->wakeup_cpu = wakeup_secondary_cpu_via_mip;
+       }
+
+       return 0;
+}
+
 void __init
 setup_unisys(void)
 {
@@ -176,6 +216,8 @@ setup_unisys(void)
        else
                es7000_plat = ES7000_CLASSIC;
        ioapic_renumber_irq = es7000_rename_gsi;
+
+       x86_quirks->update_genapic = es7000_update_genapic;
 }
 
 /*
@@ -250,31 +292,24 @@ int __init find_unisys_acpi_oem_table(unsigned long *oem_addr)
 {
        struct acpi_table_header *header = NULL;
        int i = 0;
-       acpi_size tbl_size;
 
-       while (ACPI_SUCCESS(acpi_get_table_with_size("OEM1", i++, &header, &tbl_size))) {
+       while (ACPI_SUCCESS(acpi_get_table("OEM1", i++, &header))) {
                if (!memcmp((char *) &header->oem_id, "UNISYS", 6)) {
                        struct oem_table *t = (struct oem_table *)header;
 
                        oem_addrX = t->OEMTableAddr;
                        oem_size = t->OEMTableSize;
-                       early_acpi_os_unmap_memory(header, tbl_size);
 
                        *oem_addr = (unsigned long)__acpi_map_table(oem_addrX,
                                                                    oem_size);
                        return 0;
                }
-               early_acpi_os_unmap_memory(header, tbl_size);
        }
        return -1;
 }
 
 void __init unmap_unisys_acpi_oem_table(unsigned long oem_addr)
 {
-       if (!oem_addr)
-               return;
-
-       __acpi_unmap_table((char *)oem_addr, oem_size);
 }
 #endif
 
@@ -324,26 +359,6 @@ es7000_mip_write(struct mip_reg *mip_reg)
        return status;
 }
 
-int
-es7000_start_cpu(int cpu, unsigned long eip)
-{
-       unsigned long vect = 0, psaival = 0;
-
-       if (psai == NULL)
-               return -1;
-
-       vect = ((unsigned long)__pa(eip)/0x1000) << 16;
-       psaival = (0x1000000 | vect | cpu);
-
-       while (*psai & 0x1000000)
-                ;
-
-       *psai = psaival;
-
-       return 0;
-
-}
-
 void __init
 es7000_sw_apic(void)
 {
index 6c9bfc9e1e95cbc5f8aa2273bd06f9eb75c2ca11..2bced78b0b8e85d6317c729c9554919cac2eb67b 100644 (file)
@@ -21,6 +21,7 @@
 #include <asm/smp.h>
 #include <asm/ipi.h>
 #include <asm/genapic.h>
+#include <asm/setup.h>
 
 extern struct genapic apic_flat;
 extern struct genapic apic_physflat;
@@ -53,6 +54,9 @@ void __init setup_apic_routing(void)
                        genapic = &apic_physflat;
                printk(KERN_INFO "Setting APIC routing to %s\n", genapic->name);
        }
+
+       if (x86_quirks->update_genapic)
+               x86_quirks->update_genapic();
 }
 
 /* Same for both flat and physical. */
index 2c7dbdb98278316a6fd7228e9a7b2eaf76f58562..dece17289731b951c4189bd5f66db0a919f91197 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <linux/kernel.h>
 #include <linux/threads.h>
+#include <linux/cpu.h>
 #include <linux/cpumask.h>
 #include <linux/string.h>
 #include <linux/ctype.h>
@@ -17,6 +18,9 @@
 #include <linux/sched.h>
 #include <linux/module.h>
 #include <linux/hardirq.h>
+#include <linux/timer.h>
+#include <linux/proc_fs.h>
+#include <asm/current.h>
 #include <asm/smp.h>
 #include <asm/ipi.h>
 #include <asm/genapic.h>
@@ -355,6 +359,103 @@ static __init void uv_rtc_init(void)
                sn_rtc_cycles_per_second = ticks_per_sec;
 }
 
+/*
+ * percpu heartbeat timer
+ */
+static void uv_heartbeat(unsigned long ignored)
+{
+       struct timer_list *timer = &uv_hub_info->scir.timer;
+       unsigned char bits = uv_hub_info->scir.state;
+
+       /* flip heartbeat bit */
+       bits ^= SCIR_CPU_HEARTBEAT;
+
+       /* is this cpu idle? */
+       if (idle_cpu(raw_smp_processor_id()))
+               bits &= ~SCIR_CPU_ACTIVITY;
+       else
+               bits |= SCIR_CPU_ACTIVITY;
+
+       /* update system controller interface reg */
+       uv_set_scir_bits(bits);
+
+       /* enable next timer period */
+       mod_timer(timer, jiffies + SCIR_CPU_HB_INTERVAL);
+}
+
+static void __cpuinit uv_heartbeat_enable(int cpu)
+{
+       if (!uv_cpu_hub_info(cpu)->scir.enabled) {
+               struct timer_list *timer = &uv_cpu_hub_info(cpu)->scir.timer;
+
+               uv_set_cpu_scir_bits(cpu, SCIR_CPU_HEARTBEAT|SCIR_CPU_ACTIVITY);
+               setup_timer(timer, uv_heartbeat, cpu);
+               timer->expires = jiffies + SCIR_CPU_HB_INTERVAL;
+               add_timer_on(timer, cpu);
+               uv_cpu_hub_info(cpu)->scir.enabled = 1;
+       }
+
+       /* check boot cpu */
+       if (!uv_cpu_hub_info(0)->scir.enabled)
+               uv_heartbeat_enable(0);
+}
+
+#ifdef CONFIG_HOTPLUG_CPU
+static void __cpuinit uv_heartbeat_disable(int cpu)
+{
+       if (uv_cpu_hub_info(cpu)->scir.enabled) {
+               uv_cpu_hub_info(cpu)->scir.enabled = 0;
+               del_timer(&uv_cpu_hub_info(cpu)->scir.timer);
+       }
+       uv_set_cpu_scir_bits(cpu, 0xff);
+}
+
+/*
+ * cpu hotplug notifier
+ */
+static __cpuinit int uv_scir_cpu_notify(struct notifier_block *self,
+                                      unsigned long action, void *hcpu)
+{
+       long cpu = (long)hcpu;
+
+       switch (action) {
+       case CPU_ONLINE:
+               uv_heartbeat_enable(cpu);
+               break;
+       case CPU_DOWN_PREPARE:
+               uv_heartbeat_disable(cpu);
+               break;
+       default:
+               break;
+       }
+       return NOTIFY_OK;
+}
+
+static __init void uv_scir_register_cpu_notifier(void)
+{
+       hotcpu_notifier(uv_scir_cpu_notify, 0);
+}
+
+#else /* !CONFIG_HOTPLUG_CPU */
+
+static __init void uv_scir_register_cpu_notifier(void)
+{
+}
+
+static __init int uv_init_heartbeat(void)
+{
+       int cpu;
+
+       if (is_uv_system())
+               for_each_online_cpu(cpu)
+                       uv_heartbeat_enable(cpu);
+       return 0;
+}
+
+late_initcall(uv_init_heartbeat);
+
+#endif /* !CONFIG_HOTPLUG_CPU */
+
 /*
  * Called on each cpu to initialize the per_cpu UV data area.
  *     ZZZ hotplug not supported yet
@@ -428,7 +529,7 @@ void __init uv_system_init(void)
 
        uv_bios_init();
        uv_bios_get_sn_info(0, &uv_type, &sn_partition_id,
-                           &uv_coherency_id, &uv_region_size);
+                           &sn_coherency_id, &sn_region_size);
        uv_rtc_init();
 
        for_each_present_cpu(cpu) {
@@ -439,8 +540,7 @@ void __init uv_system_init(void)
                uv_blade_info[blade].nr_possible_cpus++;
 
                uv_cpu_hub_info(cpu)->lowmem_remap_base = lowmem_redir_base;
-               uv_cpu_hub_info(cpu)->lowmem_remap_top =
-                                       lowmem_redir_base + lowmem_redir_size;
+               uv_cpu_hub_info(cpu)->lowmem_remap_top = lowmem_redir_size;
                uv_cpu_hub_info(cpu)->m_val = m_val;
                uv_cpu_hub_info(cpu)->n_val = m_val;
                uv_cpu_hub_info(cpu)->numa_blade_id = blade;
@@ -450,7 +550,8 @@ void __init uv_system_init(void)
                uv_cpu_hub_info(cpu)->gpa_mask = (1 << (m_val + n_val)) - 1;
                uv_cpu_hub_info(cpu)->gnode_upper = gnode_upper;
                uv_cpu_hub_info(cpu)->global_mmr_base = mmr_base;
-               uv_cpu_hub_info(cpu)->coherency_domain_number = uv_coherency_id;
+               uv_cpu_hub_info(cpu)->coherency_domain_number = sn_coherency_id;
+               uv_cpu_hub_info(cpu)->scir.offset = SCIR_LOCAL_MMR_BASE + lcpu;
                uv_node_to_blade[nid] = blade;
                uv_cpu_to_blade[cpu] = blade;
                max_pnode = max(pnode, max_pnode);
@@ -467,4 +568,6 @@ void __init uv_system_init(void)
        map_mmioh_high(max_pnode);
 
        uv_cpu_init();
+       uv_scir_register_cpu_notifier();
+       proc_mkdir("sgi_uv", NULL);
 }
index 1dcb0f13897e9b6d4773111e1bc8300713efe0e8..3e66bd364a9db3cf8f3fb624f96eeb7075364d78 100644 (file)
@@ -35,7 +35,6 @@ void __init reserve_ebda_region(void)
 
        /* start of EBDA area */
        ebda_addr = get_bios_ebda();
-       printk(KERN_INFO "BIOS EBDA/lowmem at: %08x/%08x\n", ebda_addr, lowmem);
 
        /* Fixup: bios puts an EBDA in the top 64K segment */
        /* of conventional memory, but does not adjust lowmem. */
index fa1d25dd83e3fa18cc2a445841c61e1e1b8b571c..ac108d1fe182a44abcd0da75f18aae5fde32e1c0 100644 (file)
 #include <asm/sections.h>
 #include <asm/e820.h>
 #include <asm/bios_ebda.h>
+#include <asm/trampoline.h>
 
 void __init i386_start_kernel(void)
 {
+       reserve_trampoline_memory();
+
        reserve_early(__pa_symbol(&_text), __pa_symbol(&_end), "TEXT DATA BSS");
 
 #ifdef CONFIG_BLK_DEV_INITRD
index d16084f90649181e6e944e104118f7ec5de6a0e3..388e05a5fc17ec05dc68fc881c169608390538b5 100644 (file)
@@ -24,6 +24,7 @@
 #include <asm/kdebug.h>
 #include <asm/e820.h>
 #include <asm/bios_ebda.h>
+#include <asm/trampoline.h>
 
 /* boot cpu pda */
 static struct x8664_pda _boot_cpu_pda __read_mostly;
@@ -120,6 +121,8 @@ void __init x86_64_start_reservations(char *real_mode_data)
 {
        copy_bootdata(__va(real_mode_data));
 
+       reserve_trampoline_memory();
+
        reserve_early(__pa_symbol(&_text), __pa_symbol(&_end), "TEXT DATA BSS");
 
 #ifdef CONFIG_BLK_DEV_INITRD
index 067d8de913f612d45018090a1fae4e5cc920462f..3f0a3edf0a573a2f5f2d1051b32285ebffcdbb36 100644 (file)
@@ -33,7 +33,9 @@
  * HPET address is set in acpi/boot.c, when an ACPI entry exists
  */
 unsigned long                          hpet_address;
-unsigned long                          hpet_num_timers;
+#ifdef CONFIG_PCI_MSI
+static unsigned long                   hpet_num_timers;
+#endif
 static void __iomem                    *hpet_virt_address;
 
 struct hpet_dev {
index 1f20608d4ca8b6e274518715ef487933e8489c59..b0f61f0dcd0a925d13a41a0500ae0f11821d51f3 100644 (file)
@@ -58,7 +58,7 @@ void __cpuinit mxcsr_feature_mask_init(void)
        stts();
 }
 
-void __init init_thread_xstate(void)
+void __cpuinit init_thread_xstate(void)
 {
        if (!HAVE_HWFP) {
                xstate_size = sizeof(struct i387_soft_struct);
index a4f93b4120c155c20889947942d7bdb5c286908d..d39918076bb48a4b70e5b911736f84ec817fd420 100644 (file)
@@ -14,7 +14,6 @@ static struct fs_struct init_fs = INIT_FS;
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
 struct mm_struct init_mm = INIT_MM(init_mm);
-EXPORT_UNUSED_SYMBOL(init_mm); /* will be removed in 2.6.26 */
 
 /*
  * Initial thread structure.
index 7a3f2028e2eb9e01a757a93b0de5b2e4f77f3634..679e7bbbbcd6b07230a2e7fdbd2ebe38e04f0563 100644 (file)
@@ -1140,6 +1140,20 @@ static void __clear_irq_vector(int irq)
 
        cfg->vector = 0;
        cpus_clear(cfg->domain);
+
+       if (likely(!cfg->move_in_progress))
+               return;
+       cpus_and(mask, cfg->old_domain, cpu_online_map);
+       for_each_cpu_mask_nr(cpu, mask) {
+               for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS;
+                                                               vector++) {
+                       if (per_cpu(vector_irq, cpu)[vector] != irq)
+                               continue;
+                       per_cpu(vector_irq, cpu)[vector] = -1;
+                       break;
+               }
+       }
+       cfg->move_in_progress = 0;
 }
 
 void __setup_vector_irq(int cpu)
@@ -2202,10 +2216,9 @@ static void set_ir_ioapic_affinity_irq(unsigned int irq, cpumask_t mask)
 asmlinkage void smp_irq_move_cleanup_interrupt(void)
 {
        unsigned vector, me;
+
        ack_APIC_irq();
-#ifdef CONFIG_X86_64
        exit_idle();
-#endif
        irq_enter();
 
        me = smp_processor_id();
@@ -3594,27 +3607,7 @@ int __init io_apic_get_redir_entries (int ioapic)
 
 int __init probe_nr_irqs(void)
 {
-       int idx;
-       int nr = 0;
-#ifndef CONFIG_XEN
-       int nr_min = 32;
-#else
-       int nr_min = NR_IRQS;
-#endif
-
-       for (idx = 0; idx < nr_ioapics; idx++)
-               nr += io_apic_get_redir_entries(idx) + 1;
-
-       /* double it for hotplug and msi and nmi */
-       nr <<= 1;
-
-       /* something wrong ? */
-       if (nr < nr_min)
-               nr = nr_min;
-       if (WARN_ON(nr > NR_IRQS))
-               nr = NR_IRQS;
-
-       return nr;
+       return NR_IRQS;
 }
 
 /* --------------------------------------------------------------------------
@@ -3761,7 +3754,9 @@ int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity)
 void __init setup_ioapic_dest(void)
 {
        int pin, ioapic, irq, irq_entry;
+       struct irq_desc *desc;
        struct irq_cfg *cfg;
+       cpumask_t mask;
 
        if (skip_ioapic_setup == 1)
                return;
@@ -3778,16 +3773,30 @@ void __init setup_ioapic_dest(void)
                         * cpu is online.
                         */
                        cfg = irq_cfg(irq);
-                       if (!cfg->vector)
+                       if (!cfg->vector) {
                                setup_IO_APIC_irq(ioapic, pin, irq,
                                                  irq_trigger(irq_entry),
                                                  irq_polarity(irq_entry));
+                               continue;
+
+                       }
+
+                       /*
+                        * Honour affinities which have been set in early boot
+                        */
+                       desc = irq_to_desc(irq);
+                       if (desc->status &
+                           (IRQ_NO_BALANCING | IRQ_AFFINITY_SET))
+                               mask = desc->affinity;
+                       else
+                               mask = TARGET_CPUS;
+
 #ifdef CONFIG_INTR_REMAP
-                       else if (intr_remapping_enabled)
-                               set_ir_ioapic_affinity_irq(irq, TARGET_CPUS);
-#endif
+                       if (intr_remapping_enabled)
+                               set_ir_ioapic_affinity_irq(irq, mask);
                        else
-                               set_ioapic_affinity_irq(irq, TARGET_CPUS);
+#endif
+                               set_ioapic_affinity_irq(irq, mask);
                }
 
        }
index 60eb84eb77a0a34232be8aafbe8a7d1e040f454f..1d3d0e71b0440847e16d4c381eaef5dbe68bb082 100644 (file)
@@ -18,7 +18,6 @@
 #include <asm/idle.h>
 #include <asm/smp.h>
 
-#ifdef CONFIG_DEBUG_STACKOVERFLOW
 /*
  * Probabilistic stack overflow check:
  *
  */
 static inline void stack_overflow_check(struct pt_regs *regs)
 {
+#ifdef CONFIG_DEBUG_STACKOVERFLOW
        u64 curbase = (u64)task_stack_page(current);
-       static unsigned long warned = -60*HZ;
-
-       if (regs->sp >= curbase && regs->sp <= curbase + THREAD_SIZE &&
-           regs->sp <  curbase + sizeof(struct thread_info) + 128 &&
-           time_after(jiffies, warned + 60*HZ)) {
-               printk("do_IRQ: %s near stack overflow (cur:%Lx,sp:%lx)\n",
-                      current->comm, curbase, regs->sp);
-               show_stack(NULL,NULL);
-               warned = jiffies;
-       }
-}
+
+       WARN_ONCE(regs->sp >= curbase &&
+                 regs->sp <= curbase + THREAD_SIZE &&
+                 regs->sp <  curbase + sizeof(struct thread_info) +
+                                       sizeof(struct pt_regs) + 128,
+
+                 "do_IRQ: %s near stack overflow (cur:%Lx,sp:%lx)\n",
+                       current->comm, curbase, regs->sp);
 #endif
+}
 
 /*
  * do_IRQ handles all normal device IRQ's (the special
@@ -60,9 +58,7 @@ asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
        irq_enter();
        irq = __get_cpu_var(vector_irq)[vector];
 
-#ifdef CONFIG_DEBUG_STACKOVERFLOW
        stack_overflow_check(regs);
-#endif
 
        desc = irq_to_desc(irq);
        if (likely(desc))
index 774ac4991568db3928b6741371735aa1f8b8d7ee..e169ae9b6a62e9f3d2b4d914de87ce4157c26569 100644 (file)
@@ -128,7 +128,7 @@ static int kvm_register_clock(char *txt)
 }
 
 #ifdef CONFIG_X86_LOCAL_APIC
-static void kvm_setup_secondary_clock(void)
+static void __cpuinit kvm_setup_secondary_clock(void)
 {
        /*
         * Now that the first cpu already had this clocksource initialized,
index 5f8e5d75a254621799bff0138430fd2344b918a7..c25fdb38229212cb5e5ad79f527770bb9063153e 100644 (file)
@@ -10,7 +10,7 @@
  *  This driver allows to upgrade microcode on AMD
  *  family 0x10 and 0x11 processors.
  *
- *  Licensed unter the terms of the GNU General Public
+ *  Licensed under the terms of the GNU General Public
  *  License version 2. See file COPYING for details.
 */
 
@@ -32,9 +32,9 @@
 #include <linux/platform_device.h>
 #include <linux/pci.h>
 #include <linux/pci_ids.h>
+#include <linux/uaccess.h>
 
 #include <asm/msr.h>
-#include <asm/uaccess.h>
 #include <asm/processor.h>
 #include <asm/microcode.h>
 
@@ -47,43 +47,38 @@ MODULE_LICENSE("GPL v2");
 #define UCODE_UCODE_TYPE           0x00000001
 
 struct equiv_cpu_entry {
-       unsigned int installed_cpu;
-       unsigned int fixed_errata_mask;
-       unsigned int fixed_errata_compare;
-       unsigned int equiv_cpu;
-};
+       u32     installed_cpu;
+       u32     fixed_errata_mask;
+       u32     fixed_errata_compare;
+       u16     equiv_cpu;
+       u16     res;
+} __attribute__((packed));
 
 struct microcode_header_amd {
-       unsigned int  data_code;
-       unsigned int  patch_id;
-       unsigned char mc_patch_data_id[2];
-       unsigned char mc_patch_data_len;
-       unsigned char init_flag;
-       unsigned int  mc_patch_data_checksum;
-       unsigned int  nb_dev_id;
-       unsigned int  sb_dev_id;
-       unsigned char processor_rev_id[2];
-       unsigned char nb_rev_id;
-       unsigned char sb_rev_id;
-       unsigned char bios_api_rev;
-       unsigned char reserved1[3];
-       unsigned int  match_reg[8];
-};
+       u32     data_code;
+       u32     patch_id;
+       u16     mc_patch_data_id;
+       u8      mc_patch_data_len;
+       u8      init_flag;
+       u32     mc_patch_data_checksum;
+       u32     nb_dev_id;
+       u32     sb_dev_id;
+       u16     processor_rev_id;
+       u8      nb_rev_id;
+       u8      sb_rev_id;
+       u8      bios_api_rev;
+       u8      reserved1[3];
+       u32     match_reg[8];
+} __attribute__((packed));
 
 struct microcode_amd {
        struct microcode_header_amd hdr;
        unsigned int mpb[0];
 };
 
-#define UCODE_MAX_SIZE          (2048)
-#define DEFAULT_UCODE_DATASIZE (896)
-#define MC_HEADER_SIZE         (sizeof(struct microcode_header_amd))
-#define DEFAULT_UCODE_TOTALSIZE (DEFAULT_UCODE_DATASIZE + MC_HEADER_SIZE)
-#define DWSIZE                 (sizeof(u32))
-/* For now we support a fixed ucode total size only */
-#define get_totalsize(mc) \
-       ((((struct microcode_amd *)mc)->hdr.mc_patch_data_len * 28) \
-        + MC_HEADER_SIZE)
+#define UCODE_MAX_SIZE                 2048
+#define UCODE_CONTAINER_SECTION_HDR    8
+#define UCODE_CONTAINER_HEADER_SIZE    12
 
 /* serialize access to the physical write */
 static DEFINE_SPINLOCK(microcode_update_lock);
@@ -93,31 +88,24 @@ static struct equiv_cpu_entry *equiv_cpu_table;
 static int collect_cpu_info_amd(int cpu, struct cpu_signature *csig)
 {
        struct cpuinfo_x86 *c = &cpu_data(cpu);
+       u32 dummy;
 
        memset(csig, 0, sizeof(*csig));
-
        if (c->x86_vendor != X86_VENDOR_AMD || c->x86 < 0x10) {
-               printk(KERN_ERR "microcode: CPU%d not a capable AMD processor\n",
-                      cpu);
+               printk(KERN_WARNING "microcode: CPU%d: AMD CPU family 0x%x not "
+                      "supported\n", cpu, c->x86);
                return -1;
        }
-
-       asm volatile("movl %1, %%ecx; rdmsr"
-                    : "=a" (csig->rev)
-                    : "i" (0x0000008B) : "ecx");
-
-       printk(KERN_INFO "microcode: collect_cpu_info_amd : patch_id=0x%x\n",
-               csig->rev);
-
+       rdmsr(MSR_AMD64_PATCH_LEVEL, csig->rev, dummy);
+       printk(KERN_INFO "microcode: CPU%d: patch_level=0x%x\n", cpu, csig->rev);
        return 0;
 }
 
 static int get_matching_microcode(int cpu, void *mc, int rev)
 {
        struct microcode_header_amd *mc_header = mc;
-       struct pci_dev *nb_pci_dev, *sb_pci_dev;
        unsigned int current_cpu_id;
-       unsigned int equiv_cpu_id = 0x00;
+       u16 equiv_cpu_id = 0;
        unsigned int i = 0;
 
        BUG_ON(equiv_cpu_table == NULL);
@@ -132,57 +120,25 @@ static int get_matching_microcode(int cpu, void *mc, int rev)
        }
 
        if (!equiv_cpu_id) {
-               printk(KERN_ERR "microcode: CPU%d cpu_id "
-                      "not found in equivalent cpu table \n", cpu);
+               printk(KERN_WARNING "microcode: CPU%d: cpu revision "
+                      "not listed in equivalent cpu table\n", cpu);
                return 0;
        }
 
-       if ((mc_header->processor_rev_id[0]) != (equiv_cpu_id & 0xff)) {
-               printk(KERN_ERR
-                       "microcode: CPU%d patch does not match "
-                       "(patch is %x, cpu extended is %x) \n",
-                       cpu, mc_header->processor_rev_id[0],
-                       (equiv_cpu_id & 0xff));
+       if (mc_header->processor_rev_id != equiv_cpu_id) {
+               printk(KERN_ERR "microcode: CPU%d: patch mismatch "
+                      "(processor_rev_id: %x, equiv_cpu_id: %x)\n",
+                      cpu, mc_header->processor_rev_id, equiv_cpu_id);
                return 0;
        }
 
-       if ((mc_header->processor_rev_id[1]) != ((equiv_cpu_id >> 16) & 0xff)) {
-               printk(KERN_ERR "microcode: CPU%d patch does not match "
-                       "(patch is %x, cpu base id is %x) \n",
-                       cpu, mc_header->processor_rev_id[1],
-                       ((equiv_cpu_id >> 16) & 0xff));
-
+       /* ucode might be chipset specific -- currently we don't support this */
+       if (mc_header->nb_dev_id || mc_header->sb_dev_id) {
+               printk(KERN_ERR "microcode: CPU%d: loading of chipset "
+                      "specific code not yet supported\n", cpu);
                return 0;
        }
 
-       /* ucode may be northbridge specific */
-       if (mc_header->nb_dev_id) {
-               nb_pci_dev = pci_get_device(PCI_VENDOR_ID_AMD,
-                                           (mc_header->nb_dev_id & 0xff),
-                                           NULL);
-               if ((!nb_pci_dev) ||
-                   (mc_header->nb_rev_id != nb_pci_dev->revision)) {
-                       printk(KERN_ERR "microcode: CPU%d NB mismatch \n", cpu);
-                       pci_dev_put(nb_pci_dev);
-                       return 0;
-               }
-               pci_dev_put(nb_pci_dev);
-       }
-
-       /* ucode may be southbridge specific */
-       if (mc_header->sb_dev_id) {
-               sb_pci_dev = pci_get_device(PCI_VENDOR_ID_AMD,
-                                           (mc_header->sb_dev_id & 0xff),
-                                           NULL);
-               if ((!sb_pci_dev) ||
-                   (mc_header->sb_rev_id != sb_pci_dev->revision)) {
-                       printk(KERN_ERR "microcode: CPU%d SB mismatch \n", cpu);
-                       pci_dev_put(sb_pci_dev);
-                       return 0;
-               }
-               pci_dev_put(sb_pci_dev);
-       }
-
        if (mc_header->patch_id <= rev)
                return 0;
 
@@ -192,12 +148,10 @@ static int get_matching_microcode(int cpu, void *mc, int rev)
 static void apply_microcode_amd(int cpu)
 {
        unsigned long flags;
-       unsigned int eax, edx;
-       unsigned int rev;
+       u32 rev, dummy;
        int cpu_num = raw_smp_processor_id();
        struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num;
        struct microcode_amd *mc_amd = uci->mc;
-       unsigned long addr;
 
        /* We should bind the task to the CPU */
        BUG_ON(cpu_num != cpu);
@@ -206,42 +160,34 @@ static void apply_microcode_amd(int cpu)
                return;
 
        spin_lock_irqsave(&microcode_update_lock, flags);
-
-       addr = (unsigned long)&mc_amd->hdr.data_code;
-       edx = (unsigned int)(((unsigned long)upper_32_bits(addr)));
-       eax = (unsigned int)(((unsigned long)lower_32_bits(addr)));
-
-       asm volatile("movl %0, %%ecx; wrmsr" :
-                    : "i" (0xc0010020), "a" (eax), "d" (edx) : "ecx");
-
+       wrmsrl(MSR_AMD64_PATCH_LOADER, (u64)(long)&mc_amd->hdr.data_code);
        /* get patch id after patching */
-       asm volatile("movl %1, %%ecx; rdmsr"
-                    : "=a" (rev)
-                    : "i" (0x0000008B) : "ecx");
-
+       rdmsr(MSR_AMD64_PATCH_LEVEL, rev, dummy);
        spin_unlock_irqrestore(&microcode_update_lock, flags);
 
        /* check current patch id and patch's id for match */
        if (rev != mc_amd->hdr.patch_id) {
-               printk(KERN_ERR "microcode: CPU%d update from revision "
-                      "0x%x to 0x%x failed\n", cpu_num,
-                      mc_amd->hdr.patch_id, rev);
+               printk(KERN_ERR "microcode: CPU%d: update failed "
+                      "(for patch_level=0x%x)\n", cpu, mc_amd->hdr.patch_id);
                return;
        }
 
-       printk(KERN_INFO "microcode: CPU%d updated from revision "
-              "0x%x to 0x%x \n",
-              cpu_num, uci->cpu_sig.rev, mc_amd->hdr.patch_id);
+       printk(KERN_INFO "microcode: CPU%d: updated (new patch_level=0x%x)\n",
+              cpu, rev);
 
        uci->cpu_sig.rev = rev;
 }
 
-static void * get_next_ucode(u8 *buf, unsigned int size,
-                       int (*get_ucode_data)(void *, const void *, size_t),
-                       unsigned int *mc_size)
+static int get_ucode_data(void *to, const u8 *from, size_t n)
+{
+       memcpy(to, from, n);
+       return 0;
+}
+
+static void *get_next_ucode(const u8 *buf, unsigned int size,
+                           unsigned int *mc_size)
 {
        unsigned int total_size;
-#define UCODE_CONTAINER_SECTION_HDR    8
        u8 section_hdr[UCODE_CONTAINER_SECTION_HDR];
        void *mc;
 
@@ -249,39 +195,37 @@ static void * get_next_ucode(u8 *buf, unsigned int size,
                return NULL;
 
        if (section_hdr[0] != UCODE_UCODE_TYPE) {
-               printk(KERN_ERR "microcode: error! "
-                      "Wrong microcode payload type field\n");
+               printk(KERN_ERR "microcode: error: invalid type field in "
+                      "container file section header\n");
                return NULL;
        }
 
        total_size = (unsigned long) (section_hdr[4] + (section_hdr[5] << 8));
 
-       printk(KERN_INFO "microcode: size %u, total_size %u\n",
-               size, total_size);
+       printk(KERN_DEBUG "microcode: size %u, total_size %u\n",
+              size, total_size);
 
        if (total_size > size || total_size > UCODE_MAX_SIZE) {
-               printk(KERN_ERR "microcode: error! Bad data in microcode data file\n");
+               printk(KERN_ERR "microcode: error: size mismatch\n");
                return NULL;
        }
 
        mc = vmalloc(UCODE_MAX_SIZE);
        if (mc) {
                memset(mc, 0, UCODE_MAX_SIZE);
-               if (get_ucode_data(mc, buf + UCODE_CONTAINER_SECTION_HDR, total_size)) {
+               if (get_ucode_data(mc, buf + UCODE_CONTAINER_SECTION_HDR,
+                                  total_size)) {
                        vfree(mc);
                        mc = NULL;
                } else
                        *mc_size = total_size + UCODE_CONTAINER_SECTION_HDR;
        }
-#undef UCODE_CONTAINER_SECTION_HDR
        return mc;
 }
 
 
-static int install_equiv_cpu_table(u8 *buf,
-               int (*get_ucode_data)(void *, const void *, size_t))
+static int install_equiv_cpu_table(const u8 *buf)
 {
-#define UCODE_CONTAINER_HEADER_SIZE    12
        u8 *container_hdr[UCODE_CONTAINER_HEADER_SIZE];
        unsigned int *buf_pos = (unsigned int *)container_hdr;
        unsigned long size;
@@ -292,14 +236,15 @@ static int install_equiv_cpu_table(u8 *buf,
        size = buf_pos[2];
 
        if (buf_pos[1] != UCODE_EQUIV_CPU_TABLE_TYPE || !size) {
-               printk(KERN_ERR "microcode: error! "
-                      "Wrong microcode equivalnet cpu table\n");
+               printk(KERN_ERR "microcode: error: invalid type field in "
+                      "container file section header\n");
                return 0;
        }
 
        equiv_cpu_table = (struct equiv_cpu_entry *) vmalloc(size);
        if (!equiv_cpu_table) {
-               printk(KERN_ERR "microcode: error, can't allocate memory for equiv CPU table\n");
+               printk(KERN_ERR "microcode: failed to allocate "
+                      "equivalent CPU table\n");
                return 0;
        }
 
@@ -310,7 +255,6 @@ static int install_equiv_cpu_table(u8 *buf,
        }
 
        return size + UCODE_CONTAINER_HEADER_SIZE; /* add header length */
-#undef UCODE_CONTAINER_HEADER_SIZE
 }
 
 static void free_equiv_cpu_table(void)
@@ -321,18 +265,20 @@ static void free_equiv_cpu_table(void)
        }
 }
 
-static int generic_load_microcode(int cpu, void *data, size_t size,
-               int (*get_ucode_data)(void *, const void *, size_t))
+static int generic_load_microcode(int cpu, const u8 *data, size_t size)
 {
        struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
-       u8 *ucode_ptr = data, *new_mc = NULL, *mc;
+       const u8 *ucode_ptr = data;
+       void *new_mc = NULL;
+       void *mc;
        int new_rev = uci->cpu_sig.rev;
        unsigned int leftover;
        unsigned long offset;
 
-       offset = install_equiv_cpu_table(ucode_ptr, get_ucode_data);
+       offset = install_equiv_cpu_table(ucode_ptr);
        if (!offset) {
-               printk(KERN_ERR "microcode: installing equivalent cpu table failed\n");
+               printk(KERN_ERR "microcode: failed to create "
+                      "equivalent cpu table\n");
                return -EINVAL;
        }
 
@@ -343,7 +289,7 @@ static int generic_load_microcode(int cpu, void *data, size_t size,
                unsigned int uninitialized_var(mc_size);
                struct microcode_header_amd *mc_header;
 
-               mc = get_next_ucode(ucode_ptr, leftover, get_ucode_data, &mc_size);
+               mc = get_next_ucode(ucode_ptr, leftover, &mc_size);
                if (!mc)
                        break;
 
@@ -353,7 +299,7 @@ static int generic_load_microcode(int cpu, void *data, size_t size,
                                vfree(new_mc);
                        new_rev = mc_header->patch_id;
                        new_mc  = mc;
-               } else 
+               } else
                        vfree(mc);
 
                ucode_ptr += mc_size;
@@ -365,9 +311,9 @@ static int generic_load_microcode(int cpu, void *data, size_t size,
                        if (uci->mc)
                                vfree(uci->mc);
                        uci->mc = new_mc;
-                       pr_debug("microcode: CPU%d found a matching microcode update with"
-                               " version 0x%x (current=0x%x)\n",
-                               cpu, new_rev, uci->cpu_sig.rev);
+                       pr_debug("microcode: CPU%d found a matching microcode "
+                                "update with version 0x%x (current=0x%x)\n",
+                                cpu, new_rev, uci->cpu_sig.rev);
                } else
                        vfree(new_mc);
        }
@@ -377,12 +323,6 @@ static int generic_load_microcode(int cpu, void *data, size_t size,
        return (int)leftover;
 }
 
-static int get_ucode_fw(void *to, const void *from, size_t n)
-{
-       memcpy(to, from, n);
-       return 0;
-}
-
 static int request_microcode_fw(int cpu, struct device *device)
 {
        const char *fw_name = "amd-ucode/microcode_amd.bin";
@@ -394,12 +334,11 @@ static int request_microcode_fw(int cpu, struct device *device)
 
        ret = request_firmware(&firmware, fw_name, device);
        if (ret) {
-               printk(KERN_ERR "microcode: ucode data file %s load failed\n", fw_name);
+               printk(KERN_ERR "microcode: failed to load file %s\n", fw_name);
                return ret;
        }
 
-       ret = generic_load_microcode(cpu, (void*)firmware->data, firmware->size,
-                       &get_ucode_fw);
+       ret = generic_load_microcode(cpu, firmware->data, firmware->size);
 
        release_firmware(firmware);
 
@@ -408,8 +347,8 @@ static int request_microcode_fw(int cpu, struct device *device)
 
 static int request_microcode_user(int cpu, const void __user *buf, size_t size)
 {
-       printk(KERN_WARNING "microcode: AMD microcode update via /dev/cpu/microcode"
-                       "is not supported\n");
+       printk(KERN_INFO "microcode: AMD microcode update via "
+              "/dev/cpu/microcode not supported\n");
        return -1;
 }
 
@@ -433,3 +372,4 @@ struct microcode_ops * __init init_amd_microcode(void)
 {
        return &microcode_amd_ops;
 }
+
index 82fb2809ce32208eacd7231c38597938031d4036..c9b721ba968c8f779a253919b2c7c046542ea974 100644 (file)
@@ -99,7 +99,7 @@ MODULE_LICENSE("GPL");
 
 #define MICROCODE_VERSION      "2.00"
 
-struct microcode_ops *microcode_ops;
+static struct microcode_ops *microcode_ops;
 
 /* no concurrent ->write()s are allowed on /dev/cpu/microcode */
 static DEFINE_MUTEX(microcode_mutex);
@@ -203,7 +203,7 @@ MODULE_ALIAS_MISCDEV(MICROCODE_MINOR);
 #endif
 
 /* fake device for request_firmware */
-struct platform_device *microcode_pdev;
+static struct platform_device *microcode_pdev;
 
 static ssize_t reload_store(struct sys_device *dev,
                            struct sysdev_attribute *attr,
@@ -272,13 +272,18 @@ static struct attribute_group mc_attr_group = {
        .name = "microcode",
 };
 
-static void microcode_fini_cpu(int cpu)
+static void __microcode_fini_cpu(int cpu)
 {
        struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
 
-       mutex_lock(&microcode_mutex);
        microcode_ops->microcode_fini_cpu(cpu);
        uci->valid = 0;
+}
+
+static void microcode_fini_cpu(int cpu)
+{
+       mutex_lock(&microcode_mutex);
+       __microcode_fini_cpu(cpu);
        mutex_unlock(&microcode_mutex);
 }
 
@@ -306,12 +311,16 @@ static int microcode_resume_cpu(int cpu)
         * to this cpu (a bit of paranoia):
         */
        if (microcode_ops->collect_cpu_info(cpu, &nsig)) {
-               microcode_fini_cpu(cpu);
+               __microcode_fini_cpu(cpu);
+               printk(KERN_ERR "failed to collect_cpu_info for resuming cpu #%d\n",
+                               cpu);
                return -1;
        }
 
-       if (memcmp(&nsig, &uci->cpu_sig, sizeof(nsig))) {
-               microcode_fini_cpu(cpu);
+       if ((nsig.sig != uci->cpu_sig.sig) || (nsig.pf != uci->cpu_sig.pf)) {
+               __microcode_fini_cpu(cpu);
+               printk(KERN_ERR "cached ucode doesn't match the resuming cpu #%d\n",
+                               cpu);
                /* Should we look for a new ucode here? */
                return 1;
        }
@@ -319,7 +328,7 @@ static int microcode_resume_cpu(int cpu)
        return 0;
 }
 
-void microcode_update_cpu(int cpu)
+static void microcode_update_cpu(int cpu)
 {
        struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
        int err = 0;
index 622dc4a217848d1c8d16941796a4f82f868fc967..b7f4c929e61505d368ac02de9e63e9a917472ca8 100644 (file)
@@ -155,6 +155,7 @@ static DEFINE_SPINLOCK(microcode_update_lock);
 static int collect_cpu_info(int cpu_num, struct cpu_signature *csig)
 {
        struct cpuinfo_x86 *c = &cpu_data(cpu_num);
+       unsigned long flags;
        unsigned int val[2];
 
        memset(csig, 0, sizeof(*csig));
@@ -174,11 +175,16 @@ static int collect_cpu_info(int cpu_num, struct cpu_signature *csig)
                csig->pf = 1 << ((val[1] >> 18) & 7);
        }
 
+       /* serialize access to the physical write to MSR 0x79 */
+       spin_lock_irqsave(&microcode_update_lock, flags);
+
        wrmsr(MSR_IA32_UCODE_REV, 0, 0);
        /* see notes above for revision 1.07.  Apparent chip bug */
        sync_core();
        /* get the current revision from MSR 0x8B */
        rdmsr(MSR_IA32_UCODE_REV, val[0], csig->rev);
+       spin_unlock_irqrestore(&microcode_update_lock, flags);
+
        pr_debug("microcode: collect_cpu_info : sig=0x%x, pf=0x%x, rev=0x%x\n",
                        csig->sig, csig->pf, csig->rev);
 
@@ -465,7 +471,7 @@ static void microcode_fini_cpu(int cpu)
        uci->mc = NULL;
 }
 
-struct microcode_ops microcode_intel_ops = {
+static struct microcode_ops microcode_intel_ops = {
        .request_microcode_user           = request_microcode_user,
        .request_microcode_fw             = request_microcode_fw,
        .collect_cpu_info                 = collect_cpu_info,
index f98f4e1dba0963ddc4908074a7a16e3249703677..45e3b69808ba6722bcc9617cdd0c883cab1a8ee2 100644 (file)
@@ -586,23 +586,23 @@ static void __init __get_smp_config(unsigned int early)
 {
        struct intel_mp_floating *mpf = mpf_found;
 
-       if (x86_quirks->mach_get_smp_config) {
-               if (x86_quirks->mach_get_smp_config(early))
-                       return;
-       }
+       if (!mpf)
+               return;
+
        if (acpi_lapic && early)
                return;
+
        /*
-        * ACPI supports both logical (e.g. Hyper-Threading) and physical
-        * processors, where MPS only supports physical.
+        * MPS doesn't support hyperthreading, aka only have
+        * thread 0 apic id in MPS table
         */
-       if (acpi_lapic && acpi_ioapic) {
-               printk(KERN_INFO "Using ACPI (MADT) for SMP configuration "
-                      "information\n");
+       if (acpi_lapic && acpi_ioapic)
                return;
-       } else if (acpi_lapic)
-               printk(KERN_INFO "Using ACPI for processor (LAPIC) "
-                      "configuration information\n");
+
+       if (x86_quirks->mach_get_smp_config) {
+               if (x86_quirks->mach_get_smp_config(early))
+                       return;
+       }
 
        printk(KERN_INFO "Intel MultiProcessor Specification v1.%d\n",
               mpf->mpf_specification);
index 2c97f07f1c2cb76a705e4e421c018837588f1b6c..8bd1bf9622a7cf1062f33e039c37a2167e5f2918 100644 (file)
@@ -131,6 +131,11 @@ static void report_broken_nmi(int cpu, int *prev_nmi_count)
        atomic_dec(&nmi_active);
 }
 
+static void __acpi_nmi_disable(void *__unused)
+{
+       apic_write(APIC_LVT0, APIC_DM_NMI | APIC_LVT_MASKED);
+}
+
 int __init check_nmi_watchdog(void)
 {
        unsigned int *prev_nmi_count;
@@ -179,8 +184,12 @@ int __init check_nmi_watchdog(void)
        kfree(prev_nmi_count);
        return 0;
 error:
-       if (nmi_watchdog == NMI_IO_APIC && !timer_through_8259)
-               disable_8259A_irq(0);
+       if (nmi_watchdog == NMI_IO_APIC) {
+               if (!timer_through_8259)
+                       disable_8259A_irq(0);
+               on_each_cpu(__acpi_nmi_disable, NULL, 1);
+       }
+
 #ifdef CONFIG_X86_32
        timer_ack = 0;
 #endif
@@ -199,12 +208,17 @@ static int __init setup_nmi_watchdog(char *str)
                ++str;
        }
 
-       get_option(&str, &nmi);
-
-       if (nmi >= NMI_INVALID)
-               return 0;
+       if (!strncmp(str, "lapic", 5))
+               nmi_watchdog = NMI_LOCAL_APIC;
+       else if (!strncmp(str, "ioapic", 6))
+               nmi_watchdog = NMI_IO_APIC;
+       else {
+               get_option(&str, &nmi);
+               if (nmi >= NMI_INVALID)
+                       return 0;
+               nmi_watchdog = nmi;
+       }
 
-       nmi_watchdog = nmi;
        return 1;
 }
 __setup("nmi_watchdog=", setup_nmi_watchdog);
@@ -285,11 +299,6 @@ void acpi_nmi_enable(void)
                on_each_cpu(__acpi_nmi_enable, NULL, 1);
 }
 
-static void __acpi_nmi_disable(void *__unused)
-{
-       apic_write(APIC_LVT0, APIC_DM_NMI | APIC_LVT_MASKED);
-}
-
 /*
  * Disable timer based NMIs on all CPUs:
  */
@@ -340,6 +349,8 @@ void stop_apic_nmi_watchdog(void *unused)
                return;
        if (nmi_watchdog == NMI_LOCAL_APIC)
                lapic_watchdog_stop();
+       else
+               __acpi_nmi_disable(NULL);
        __get_cpu_var(wd_enabled) = 0;
        atomic_dec(&nmi_active);
 }
@@ -465,6 +476,24 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
 
 #ifdef CONFIG_SYSCTL
 
+static void enable_ioapic_nmi_watchdog_single(void *unused)
+{
+       __get_cpu_var(wd_enabled) = 1;
+       atomic_inc(&nmi_active);
+       __acpi_nmi_enable(NULL);
+}
+
+static void enable_ioapic_nmi_watchdog(void)
+{
+       on_each_cpu(enable_ioapic_nmi_watchdog_single, NULL, 1);
+       touch_nmi_watchdog();
+}
+
+static void disable_ioapic_nmi_watchdog(void)
+{
+       on_each_cpu(stop_apic_nmi_watchdog, NULL, 1);
+}
+
 static int __init setup_unknown_nmi_panic(char *str)
 {
        unknown_nmi_panic = 1;
@@ -507,6 +536,11 @@ int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file,
                        enable_lapic_nmi_watchdog();
                else
                        disable_lapic_nmi_watchdog();
+       } else if (nmi_watchdog == NMI_IO_APIC) {
+               if (nmi_watchdog_enabled)
+                       enable_ioapic_nmi_watchdog();
+               else
+                       disable_ioapic_nmi_watchdog();
        } else {
                printk(KERN_WARNING
                        "NMI watchdog doesn't know what hardware to touch\n");
index 4caff39078e0d386a0f1d2783fbc7e081582d9a9..0deea37a53cf5613477a17d304a03f8bf254325f 100644 (file)
@@ -31,7 +31,7 @@
 #include <asm/numaq.h>
 #include <asm/topology.h>
 #include <asm/processor.h>
-#include <asm/mpspec.h>
+#include <asm/genapic.h>
 #include <asm/e820.h>
 #include <asm/setup.h>
 
@@ -235,6 +235,13 @@ static int __init numaq_setup_ioapic_ids(void)
        return 1;
 }
 
+static int __init numaq_update_genapic(void)
+{
+       genapic->wakeup_cpu = wakeup_secondary_cpu_via_nmi;
+
+       return 0;
+}
+
 static struct x86_quirks numaq_x86_quirks __initdata = {
        .arch_pre_time_init     = numaq_pre_time_init,
        .arch_time_init         = NULL,
@@ -250,6 +257,7 @@ static struct x86_quirks numaq_x86_quirks __initdata = {
        .mpc_oem_pci_bus        = mpc_oem_pci_bus,
        .smp_read_mpc_oem       = smp_read_mpc_oem,
        .setup_ioapic_ids       = numaq_setup_ioapic_ids,
+       .update_genapic         = numaq_update_genapic,
 };
 
 void numaq_mps_oem_check(struct mp_config_table *mpc, char *oem,
index 0e9f1982b1dd1aca8c60025f3ff691b311ee8390..95777b0faa7388f9c236bb093fae1a4934bb91c0 100644 (file)
@@ -7,7 +7,8 @@
 
 #include <asm/paravirt.h>
 
-static void default_spin_lock_flags(struct raw_spinlock *lock, unsigned long flags)
+static inline void
+default_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags)
 {
        __raw_spin_lock(lock);
 }
index e1e731d78f3821bb6f27950eca4033e52a77c606..d28bbdc35e4e5dec064bd1f9e5e7fbc548deaf4e 100644 (file)
@@ -1567,7 +1567,7 @@ static int __init calgary_parse_options(char *p)
                                ++p;
                        if (*p == '\0')
                                break;
-                       bridge = simple_strtol(p, &endp, 0);
+                       bridge = simple_strtoul(p, &endp, 0);
                        if (p == endp)
                                break;
 
index 192624820217f9eeeb64ee39ada5ad57a76a0df5..dc572994703d42d69c17f4af1777863b68d69092 100644 (file)
@@ -300,8 +300,8 @@ fs_initcall(pci_iommu_init);
 static __devinit void via_no_dac(struct pci_dev *dev)
 {
        if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) {
-               printk(KERN_INFO "PCI: VIA PCI bridge detected."
-                                "Disabling DAC.\n");
+               printk(KERN_INFO
+                       "PCI: VIA PCI bridge detected. Disabling DAC.\n");
                forbid_dac = 1;
        }
 }
index a42b02b4df68855714b4ea2f7f3e580e0327e7b3..a35eaa379ff632fb142367df58a8fdeaaad81267 100644 (file)
@@ -123,6 +123,8 @@ static void free_iommu(unsigned long offset, int size)
 
        spin_lock_irqsave(&iommu_bitmap_lock, flags);
        iommu_area_free(iommu_gart_bitmap, offset, size);
+       if (offset >= next_bit)
+               next_bit = offset + size;
        spin_unlock_irqrestore(&iommu_bitmap_lock, flags);
 }
 
@@ -743,10 +745,8 @@ void __init gart_iommu_init(void)
        unsigned long scratch;
        long i;
 
-       if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0) {
-               printk(KERN_INFO "PCI-GART: No AMD GART found.\n");
+       if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0)
                return;
-       }
 
 #ifndef CONFIG_AGP_AMD64
        no_agp = 1;
index c622772744d86fcb0dcd3e6c46a6de5323508c40..9bfc3f719d470289a8be6e3c68534c69c8e6e7b0 100644 (file)
@@ -1,6 +1,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
+#include <asm/idle.h>
 #include <linux/smp.h>
 #include <linux/slab.h>
 #include <linux/sched.h>
@@ -8,6 +9,7 @@
 #include <linux/pm.h>
 #include <linux/clockchips.h>
 #include <asm/system.h>
+#include <asm/apic.h>
 
 unsigned long idle_halt;
 EXPORT_SYMBOL(idle_halt);
@@ -122,6 +124,21 @@ void default_idle(void)
 EXPORT_SYMBOL(default_idle);
 #endif
 
+void stop_this_cpu(void *dummy)
+{
+       local_irq_disable();
+       /*
+        * Remove this CPU:
+        */
+       cpu_clear(smp_processor_id(), cpu_online_map);
+       disable_local_APIC();
+
+       for (;;) {
+               if (hlt_works(smp_processor_id()))
+                       halt();
+       }
+}
+
 static void do_nothing(void *unused)
 {
 }
index 0a6d8c12e10dc7742c2e33dd29475874cb9f2b50..06180dff5b2e8aefca1ed7bd279a1dc1ed3d0237 100644 (file)
@@ -929,17 +929,16 @@ void __cpuinit ptrace_bts_init_intel(struct cpuinfo_x86 *c)
        switch (c->x86) {
        case 0x6:
                switch (c->x86_model) {
+               case 0 ... 0xC:
+                       /* sorry, don't know about them */
+                       break;
                case 0xD:
                case 0xE: /* Pentium M */
                        bts_configure(&bts_cfg_pentium_m);
                        break;
-               case 0xF: /* Core2 */
-        case 0x1C: /* Atom */
+               default: /* Core2, Atom, ... */
                        bts_configure(&bts_cfg_core2);
                        break;
-               default:
-                       /* sorry, don't know about them */
-                       break;
                }
                break;
        case 0xF:
index c3cd512484e58c0a1b7f108127297f751a7cd9ab..61f718df6eec1fe74dffaa2cb3b110b1deaeb70b 100644 (file)
@@ -39,7 +39,10 @@ int reboot_force;
 static int reboot_cpu = -1;
 #endif
 
-/* reboot=b[ios] | s[mp] | t[riple] | k[bd] | e[fi] [, [w]arm | [c]old]
+/* This is set by the PCI code if either type 1 or type 2 PCI is detected */
+bool port_cf9_safe = false;
+
+/* reboot=b[ios] | s[mp] | t[riple] | k[bd] | e[fi] [, [w]arm | [c]old] | p[ci]
    warm   Don't set the cold reboot flag
    cold   Set the cold reboot flag
    bios   Reboot by jumping through the BIOS (only for X86_32)
@@ -48,6 +51,7 @@ static int reboot_cpu = -1;
    kbd    Use the keyboard controller. cold reset (default)
    acpi   Use the RESET_REG in the FADT
    efi    Use efi reset_system runtime service
+   pci    Use the so-called "PCI reset register", CF9
    force  Avoid anything that could hang.
  */
 static int __init reboot_setup(char *str)
@@ -82,6 +86,7 @@ static int __init reboot_setup(char *str)
                case 'k':
                case 't':
                case 'e':
+               case 'p':
                        reboot_type = *str;
                        break;
 
@@ -172,6 +177,15 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
                        DMI_MATCH(DMI_BOARD_NAME, "0KW626"),
                },
        },
+       {   /* Handle problems with rebooting on Dell Optiplex 330 with 0KP561 */
+               .callback = set_bios_reboot,
+               .ident = "Dell OptiPlex 330",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 330"),
+                       DMI_MATCH(DMI_BOARD_NAME, "0KP561"),
+               },
+       },
        {       /* Handle problems with rebooting on Dell 2400's */
                .callback = set_bios_reboot,
                .ident = "Dell PowerEdge 2400",
@@ -398,12 +412,27 @@ static void native_machine_emergency_restart(void)
                        reboot_type = BOOT_KBD;
                        break;
 
-
                case BOOT_EFI:
                        if (efi_enabled)
-                               efi.reset_system(reboot_mode ? EFI_RESET_WARM : EFI_RESET_COLD,
+                               efi.reset_system(reboot_mode ?
+                                                EFI_RESET_WARM :
+                                                EFI_RESET_COLD,
                                                 EFI_SUCCESS, 0, NULL);
+                       reboot_type = BOOT_KBD;
+                       break;
 
+               case BOOT_CF9:
+                       port_cf9_safe = true;
+                       /* fall through */
+
+               case BOOT_CF9_COND:
+                       if (port_cf9_safe) {
+                               u8 cf9 = inb(0xcf9) & ~6;
+                               outb(cf9|2, 0xcf9); /* Request hard reset */
+                               udelay(50);
+                               outb(cf9|6, 0xcf9); /* Actually do the reset */
+                               udelay(50);
+                       }
                        reboot_type = BOOT_KBD;
                        break;
                }
@@ -464,6 +493,11 @@ static void native_machine_restart(char *__unused)
 
 static void native_machine_halt(void)
 {
+       /* stop other cpus and apics */
+       machine_shutdown();
+
+       /* stop this cpu */
+       stop_this_cpu(NULL);
 }
 
 static void native_machine_power_off(void)
index 0fa6790c1dd37d76e257de661ba3ed9312de89e0..a31223828597bf0f0176921273b1e98614d085bd 100644 (file)
@@ -98,6 +98,7 @@
 
 #include <mach_apic.h>
 #include <asm/paravirt.h>
+#include <asm/hypervisor.h>
 
 #include <asm/percpu.h>
 #include <asm/topology.h>
@@ -448,6 +449,7 @@ static void __init reserve_early_setup_data(void)
  * @size: Size of the crashkernel memory to reserve.
  * Returns the base address on success, and -1ULL on failure.
  */
+static
 unsigned long long __init find_and_reserve_crashkernel(unsigned long long size)
 {
        const unsigned long long alignment = 16<<20;    /* 16M */
@@ -583,161 +585,24 @@ static int __init setup_elfcorehdr(char *arg)
 early_param("elfcorehdr", setup_elfcorehdr);
 #endif
 
-static struct x86_quirks default_x86_quirks __initdata;
-
-struct x86_quirks *x86_quirks __initdata = &default_x86_quirks;
-
-/*
- * Some BIOSes seem to corrupt the low 64k of memory during events
- * like suspend/resume and unplugging an HDMI cable.  Reserve all
- * remaining free memory in that area and fill it with a distinct
- * pattern.
- */
-#ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION
-#define MAX_SCAN_AREAS 8
-
-static int __read_mostly memory_corruption_check = -1;
-
-static unsigned __read_mostly corruption_check_size = 64*1024;
-static unsigned __read_mostly corruption_check_period = 60; /* seconds */
-
-static struct e820entry scan_areas[MAX_SCAN_AREAS];
-static int num_scan_areas;
-
-
-static int set_corruption_check(char *arg)
+static int __init default_update_genapic(void)
 {
-       char *end;
-
-       memory_corruption_check = simple_strtol(arg, &end, 10);
-
-       return (*end == 0) ? 0 : -EINVAL;
-}
-early_param("memory_corruption_check", set_corruption_check);
-
-static int set_corruption_check_period(char *arg)
-{
-       char *end;
-
-       corruption_check_period = simple_strtoul(arg, &end, 10);
-
-       return (*end == 0) ? 0 : -EINVAL;
-}
-early_param("memory_corruption_check_period", set_corruption_check_period);
-
-static int set_corruption_check_size(char *arg)
-{
-       char *end;
-       unsigned size;
-
-       size = memparse(arg, &end);
-
-       if (*end == '\0')
-               corruption_check_size = size;
-
-       return (size == corruption_check_size) ? 0 : -EINVAL;
-}
-early_param("memory_corruption_check_size", set_corruption_check_size);
-
-
-static void __init setup_bios_corruption_check(void)
-{
-       u64 addr = PAGE_SIZE;   /* assume first page is reserved anyway */
-
-       if (memory_corruption_check == -1) {
-               memory_corruption_check =
-#ifdef CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK
-                       1
-#else
-                       0
+#ifdef CONFIG_X86_SMP
+# if defined(CONFIG_X86_GENERICARCH) || defined(CONFIG_X86_64)
+       genapic->wakeup_cpu = wakeup_secondary_cpu_via_init;
+# endif
 #endif
-                       ;
-       }
-
-       if (corruption_check_size == 0)
-               memory_corruption_check = 0;
-
-       if (!memory_corruption_check)
-               return;
-
-       corruption_check_size = round_up(corruption_check_size, PAGE_SIZE);
-
-       while(addr < corruption_check_size && num_scan_areas < MAX_SCAN_AREAS) {
-               u64 size;
-               addr = find_e820_area_size(addr, &size, PAGE_SIZE);
-
-               if (addr == 0)
-                       break;
 
-               if ((addr + size) > corruption_check_size)
-                       size = corruption_check_size - addr;
-
-               if (size == 0)
-                       break;
-
-               e820_update_range(addr, size, E820_RAM, E820_RESERVED);
-               scan_areas[num_scan_areas].addr = addr;
-               scan_areas[num_scan_areas].size = size;
-               num_scan_areas++;
-
-               /* Assume we've already mapped this early memory */
-               memset(__va(addr), 0, size);
-
-               addr += size;
-       }
-
-       printk(KERN_INFO "Scanning %d areas for low memory corruption\n",
-              num_scan_areas);
-       update_e820();
-}
-
-static struct timer_list periodic_check_timer;
-
-void check_for_bios_corruption(void)
-{
-       int i;
-       int corruption = 0;
-
-       if (!memory_corruption_check)
-               return;
-
-       for(i = 0; i < num_scan_areas; i++) {
-               unsigned long *addr = __va(scan_areas[i].addr);
-               unsigned long size = scan_areas[i].size;
-
-               for(; size; addr++, size -= sizeof(unsigned long)) {
-                       if (!*addr)
-                               continue;
-                       printk(KERN_ERR "Corrupted low memory at %p (%lx phys) = %08lx\n",
-                              addr, __pa(addr), *addr);
-                       corruption = 1;
-                       *addr = 0;
-               }
-       }
-
-       WARN(corruption, KERN_ERR "Memory corruption detected in low memory\n");
-}
-
-static void periodic_check_for_corruption(unsigned long data)
-{
-       check_for_bios_corruption();
-       mod_timer(&periodic_check_timer, round_jiffies(jiffies + corruption_check_period*HZ));
+       return 0;
 }
 
-void start_periodic_check_for_corruption(void)
-{
-       if (!memory_corruption_check || corruption_check_period == 0)
-               return;
-
-       printk(KERN_INFO "Scanning for low memory corruption every %d seconds\n",
-              corruption_check_period);
+static struct x86_quirks default_x86_quirks __initdata = {
+       .update_genapic         = default_update_genapic,
+};
 
-       init_timer(&periodic_check_timer);
-       periodic_check_timer.function = &periodic_check_for_corruption;
-       periodic_check_for_corruption(0);
-}
-#endif
+struct x86_quirks *x86_quirks __initdata = &default_x86_quirks;
 
+#ifdef CONFIG_X86_RESERVE_LOW_64K
 static int __init dmi_low_memory_corruption(const struct dmi_system_id *d)
 {
        printk(KERN_NOTICE
@@ -749,6 +614,7 @@ static int __init dmi_low_memory_corruption(const struct dmi_system_id *d)
 
        return 0;
 }
+#endif
 
 /* List of systems that have known low memory corruption BIOS problems */
 static struct dmi_system_id __initdata bad_bios_dmi_table[] = {
@@ -764,7 +630,7 @@ static struct dmi_system_id __initdata bad_bios_dmi_table[] = {
                .callback = dmi_low_memory_corruption,
                .ident = "Phoenix BIOS",
                .matches = {
-                       DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"),
+                       DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies"),
                },
        },
 #endif
@@ -794,6 +660,9 @@ void __init setup_arch(char **cmdline_p)
        printk(KERN_INFO "Command line: %s\n", boot_command_line);
 #endif
 
+       /* VMI may relocate the fixmap; do this before touching ioremap area */
+       vmi_init();
+
        early_cpu_init();
        early_ioremap_init();
 
@@ -880,13 +749,8 @@ void __init setup_arch(char **cmdline_p)
        check_efer();
 #endif
 
-#if defined(CONFIG_VMI) && defined(CONFIG_X86_32)
-       /*
-        * Must be before kernel pagetables are setup
-        * or fixmap area is touched.
-        */
-       vmi_init();
-#endif
+       /* Must be before kernel pagetables are setup */
+       vmi_activate();
 
        /* after early param, so could get panic from serial */
        reserve_early_setup_data();
@@ -909,6 +773,12 @@ void __init setup_arch(char **cmdline_p)
 
        dmi_check_system(bad_bios_dmi_table);
 
+       /*
+        * VMware detection requires dmi to be available, so this
+        * needs to be done after dmi_scan_machine, for the BP.
+        */
+       init_hypervisor(&boot_cpu_data);
+
 #ifdef CONFIG_X86_32
        probe_roms();
 #endif
diff --git a/arch/x86/kernel/sigframe.h b/arch/x86/kernel/sigframe.h
deleted file mode 100644 (file)
index cc673aa..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifdef CONFIG_X86_32
-struct sigframe {
-       char __user *pretcode;
-       int sig;
-       struct sigcontext sc;
-       /*
-        * fpstate is unused. fpstate is moved/allocated after
-        * retcode[] below. This movement allows to have the FP state and the
-        * future state extensions (xsave) stay together.
-        * And at the same time retaining the unused fpstate, prevents changing
-        * the offset of extramask[] in the sigframe and thus prevent any
-        * legacy application accessing/modifying it.
-        */
-       struct _fpstate fpstate_unused;
-       unsigned long extramask[_NSIG_WORDS-1];
-       char retcode[8];
-       /* fp state follows here */
-};
-
-struct rt_sigframe {
-       char __user *pretcode;
-       int sig;
-       struct siginfo __user *pinfo;
-       void __user *puc;
-       struct siginfo info;
-       struct ucontext uc;
-       char retcode[8];
-       /* fp state follows here */
-};
-#else
-struct rt_sigframe {
-       char __user *pretcode;
-       struct ucontext uc;
-       struct siginfo info;
-       /* fp state follows here */
-};
-
-int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
-               sigset_t *set, struct pt_regs *regs);
-int ia32_setup_frame(int sig, struct k_sigaction *ka,
-               sigset_t *set, struct pt_regs *regs);
-#endif
similarity index 73%
rename from arch/x86/kernel/signal_32.c
rename to arch/x86/kernel/signal.c
index d6dd057d0f2210784023ee1c591ed4f660e837e2..89bb7668041d63067c1a2b3fd1210ab9ccfcb49d 100644 (file)
@@ -1,36 +1,41 @@
 /*
  *  Copyright (C) 1991, 1992  Linus Torvalds
+ *  Copyright (C) 2000, 2001, 2002 Andi Kleen SuSE Labs
  *
  *  1997-11-28  Modified for POSIX.1b signals by Richard Henderson
  *  2000-06-20  Pentium III FXSR, SSE support by Gareth Hughes
+ *  2000-2002   x86-64 support by Andi Kleen
  */
-#include <linux/list.h>
 
-#include <linux/personality.h>
-#include <linux/binfmts.h>
-#include <linux/suspend.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/smp.h>
 #include <linux/kernel.h>
-#include <linux/ptrace.h>
 #include <linux/signal.h>
-#include <linux/stddef.h>
-#include <linux/unistd.h>
 #include <linux/errno.h>
-#include <linux/sched.h>
 #include <linux/wait.h>
+#include <linux/ptrace.h>
 #include <linux/tracehook.h>
-#include <linux/elf.h>
-#include <linux/smp.h>
-#include <linux/mm.h>
+#include <linux/unistd.h>
+#include <linux/stddef.h>
+#include <linux/personality.h>
+#include <linux/uaccess.h>
 
 #include <asm/processor.h>
 #include <asm/ucontext.h>
-#include <asm/uaccess.h>
 #include <asm/i387.h>
 #include <asm/vdso.h>
+
+#ifdef CONFIG_X86_64
+#include <asm/proto.h>
+#include <asm/ia32_unistd.h>
+#include <asm/mce.h>
+#endif /* CONFIG_X86_64 */
+
 #include <asm/syscall.h>
 #include <asm/syscalls.h>
 
-#include "sigframe.h"
+#include <asm/sigframe.h>
 
 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
 
 # define FIX_EFLAGS    __FIX_EFLAGS
 #endif
 
-/*
- * Atomically swap in the new signal mask, and wait for a signal.
- */
-asmlinkage int
-sys_sigsuspend(int history0, int history1, old_sigset_t mask)
-{
-       mask &= _BLOCKABLE;
-       spin_lock_irq(&current->sighand->siglock);
-       current->saved_sigmask = current->blocked;
-       siginitset(&current->blocked, mask);
-       recalc_sigpending();
-       spin_unlock_irq(&current->sighand->siglock);
-
-       current->state = TASK_INTERRUPTIBLE;
-       schedule();
-       set_restore_sigmask();
-
-       return -ERESTARTNOHAND;
-}
-
-asmlinkage int
-sys_sigaction(int sig, const struct old_sigaction __user *act,
-             struct old_sigaction __user *oact)
-{
-       struct k_sigaction new_ka, old_ka;
-       int ret;
-
-       if (act) {
-               old_sigset_t mask;
-
-               if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
-                   __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
-                   __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
-                       return -EFAULT;
-
-               __get_user(new_ka.sa.sa_flags, &act->sa_flags);
-               __get_user(mask, &act->sa_mask);
-               siginitset(&new_ka.sa.sa_mask, mask);
-       }
-
-       ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
-
-       if (!ret && oact) {
-               if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
-                   __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
-                   __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
-                       return -EFAULT;
-
-               __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
-               __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
-       }
-
-       return ret;
-}
-
-asmlinkage int sys_sigaltstack(unsigned long bx)
-{
-       /*
-        * This is needed to make gcc realize it doesn't own the
-        * "struct pt_regs"
-        */
-       struct pt_regs *regs = (struct pt_regs *)&bx;
-       const stack_t __user *uss = (const stack_t __user *)bx;
-       stack_t __user *uoss = (stack_t __user *)regs->cx;
-
-       return do_sigaltstack(uss, uoss, regs->sp);
-}
-
 #define COPY(x)                        {               \
        err |= __get_user(regs->x, &sc->x);     \
 }
@@ -123,7 +60,7 @@ asmlinkage int sys_sigaltstack(unsigned long bx)
                regs->seg = tmp;                        \
 }
 
-#define COPY_SEG_STRICT(seg)   {                       \
+#define COPY_SEG_CPL3(seg)     {                       \
                unsigned short tmp;                     \
                err |= __get_user(tmp, &sc->seg);       \
                regs->seg = tmp | 3;                    \
@@ -135,9 +72,6 @@ asmlinkage int sys_sigaltstack(unsigned long bx)
                loadsegment(seg, tmp);                  \
 }
 
-/*
- * Do a signal return; undo the signal stack.
- */
 static int
 restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
                   unsigned long *pax)
@@ -149,14 +83,36 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
        /* Always make any pending restarted system calls return -EINTR */
        current_thread_info()->restart_block.fn = do_no_restart_syscall;
 
+#ifdef CONFIG_X86_32
        GET_SEG(gs);
        COPY_SEG(fs);
        COPY_SEG(es);
        COPY_SEG(ds);
+#endif /* CONFIG_X86_32 */
+
        COPY(di); COPY(si); COPY(bp); COPY(sp); COPY(bx);
        COPY(dx); COPY(cx); COPY(ip);
-       COPY_SEG_STRICT(cs);
-       COPY_SEG_STRICT(ss);
+
+#ifdef CONFIG_X86_64
+       COPY(r8);
+       COPY(r9);
+       COPY(r10);
+       COPY(r11);
+       COPY(r12);
+       COPY(r13);
+       COPY(r14);
+       COPY(r15);
+#endif /* CONFIG_X86_64 */
+
+#ifdef CONFIG_X86_32
+       COPY_SEG_CPL3(cs);
+       COPY_SEG_CPL3(ss);
+#else /* !CONFIG_X86_32 */
+       /* Kernel saves and restores only the CS segment register on signals,
+        * which is the bare minimum needed to allow mixed 32/64-bit code.
+        * App's signal handler can save/restore other segments if needed. */
+       COPY_SEG_CPL3(cs);
+#endif /* CONFIG_X86_32 */
 
        err |= __get_user(tmpflags, &sc->flags);
        regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
@@ -169,102 +125,24 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
        return err;
 }
 
-asmlinkage unsigned long sys_sigreturn(unsigned long __unused)
-{
-       struct sigframe __user *frame;
-       struct pt_regs *regs;
-       unsigned long ax;
-       sigset_t set;
-
-       regs = (struct pt_regs *) &__unused;
-       frame = (struct sigframe __user *)(regs->sp - 8);
-
-       if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
-               goto badframe;
-       if (__get_user(set.sig[0], &frame->sc.oldmask) || (_NSIG_WORDS > 1
-               && __copy_from_user(&set.sig[1], &frame->extramask,
-                                   sizeof(frame->extramask))))
-               goto badframe;
-
-       sigdelsetmask(&set, ~_BLOCKABLE);
-       spin_lock_irq(&current->sighand->siglock);
-       current->blocked = set;
-       recalc_sigpending();
-       spin_unlock_irq(&current->sighand->siglock);
-
-       if (restore_sigcontext(regs, &frame->sc, &ax))
-               goto badframe;
-       return ax;
-
-badframe:
-       if (show_unhandled_signals && printk_ratelimit()) {
-               printk("%s%s[%d] bad frame in sigreturn frame:"
-                       "%p ip:%lx sp:%lx oeax:%lx",
-                   task_pid_nr(current) > 1 ? KERN_INFO : KERN_EMERG,
-                   current->comm, task_pid_nr(current), frame, regs->ip,
-                   regs->sp, regs->orig_ax);
-               print_vma_addr(" in ", regs->ip);
-               printk(KERN_CONT "\n");
-       }
-
-       force_sig(SIGSEGV, current);
-
-       return 0;
-}
-
-static long do_rt_sigreturn(struct pt_regs *regs)
-{
-       struct rt_sigframe __user *frame;
-       unsigned long ax;
-       sigset_t set;
-
-       frame = (struct rt_sigframe __user *)(regs->sp - sizeof(long));
-       if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
-               goto badframe;
-       if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
-               goto badframe;
-
-       sigdelsetmask(&set, ~_BLOCKABLE);
-       spin_lock_irq(&current->sighand->siglock);
-       current->blocked = set;
-       recalc_sigpending();
-       spin_unlock_irq(&current->sighand->siglock);
-
-       if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &ax))
-               goto badframe;
-
-       if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->sp) == -EFAULT)
-               goto badframe;
-
-       return ax;
-
-badframe:
-       signal_fault(regs, frame, "rt_sigreturn");
-       return 0;
-}
-
-asmlinkage int sys_rt_sigreturn(unsigned long __unused)
-{
-       struct pt_regs *regs = (struct pt_regs *)&__unused;
-
-       return do_rt_sigreturn(regs);
-}
-
-/*
- * Set up a signal frame.
- */
 static int
 setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate,
                 struct pt_regs *regs, unsigned long mask)
 {
-       int tmp, err = 0;
+       int err = 0;
 
-       err |= __put_user(regs->fs, (unsigned int __user *)&sc->fs);
-       savesegment(gs, tmp);
-       err |= __put_user(tmp, (unsigned int __user *)&sc->gs);
+#ifdef CONFIG_X86_32
+       {
+               unsigned int tmp;
 
+               savesegment(gs, tmp);
+               err |= __put_user(tmp, (unsigned int __user *)&sc->gs);
+       }
+       err |= __put_user(regs->fs, (unsigned int __user *)&sc->fs);
        err |= __put_user(regs->es, (unsigned int __user *)&sc->es);
        err |= __put_user(regs->ds, (unsigned int __user *)&sc->ds);
+#endif /* CONFIG_X86_32 */
+
        err |= __put_user(regs->di, &sc->di);
        err |= __put_user(regs->si, &sc->si);
        err |= __put_user(regs->bp, &sc->bp);
@@ -273,19 +151,33 @@ setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate,
        err |= __put_user(regs->dx, &sc->dx);
        err |= __put_user(regs->cx, &sc->cx);
        err |= __put_user(regs->ax, &sc->ax);
+#ifdef CONFIG_X86_64
+       err |= __put_user(regs->r8, &sc->r8);
+       err |= __put_user(regs->r9, &sc->r9);
+       err |= __put_user(regs->r10, &sc->r10);
+       err |= __put_user(regs->r11, &sc->r11);
+       err |= __put_user(regs->r12, &sc->r12);
+       err |= __put_user(regs->r13, &sc->r13);
+       err |= __put_user(regs->r14, &sc->r14);
+       err |= __put_user(regs->r15, &sc->r15);
+#endif /* CONFIG_X86_64 */
+
        err |= __put_user(current->thread.trap_no, &sc->trapno);
        err |= __put_user(current->thread.error_code, &sc->err);
        err |= __put_user(regs->ip, &sc->ip);
+#ifdef CONFIG_X86_32
        err |= __put_user(regs->cs, (unsigned int __user *)&sc->cs);
        err |= __put_user(regs->flags, &sc->flags);
        err |= __put_user(regs->sp, &sc->sp_at_signal);
        err |= __put_user(regs->ss, (unsigned int __user *)&sc->ss);
+#else /* !CONFIG_X86_32 */
+       err |= __put_user(regs->flags, &sc->flags);
+       err |= __put_user(regs->cs, &sc->cs);
+       err |= __put_user(0, &sc->gs);
+       err |= __put_user(0, &sc->fs);
+#endif /* CONFIG_X86_32 */
 
-       tmp = save_i387_xstate(fpstate);
-       if (tmp < 0)
-               err = 1;
-       else
-               err |= __put_user(tmp ? fpstate : NULL, &sc->fpstate);
+       err |= __put_user(fpstate, &sc->fpstate);
 
        /* non-iBCS2 extensions.. */
        err |= __put_user(mask, &sc->oldmask);
@@ -294,6 +186,32 @@ setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate,
        return err;
 }
 
+/*
+ * Set up a signal frame.
+ */
+#ifdef CONFIG_X86_32
+static const struct {
+       u16 poplmovl;
+       u32 val;
+       u16 int80;
+} __attribute__((packed)) retcode = {
+       0xb858,         /* popl %eax; movl $..., %eax */
+       __NR_sigreturn,
+       0x80cd,         /* int $0x80 */
+};
+
+static const struct {
+       u8  movl;
+       u32 val;
+       u16 int80;
+       u8  pad;
+} __attribute__((packed)) rt_retcode = {
+       0xb8,           /* movl $..., %eax */
+       __NR_rt_sigreturn,
+       0x80cd,         /* int $0x80 */
+       0
+};
+
 /*
  * Determine which stack to use..
  */
@@ -328,6 +246,8 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
        if (used_math()) {
                sp = sp - sig_xstate_size;
                *fpstate = (struct _fpstate *) sp;
+               if (save_i387_xstate(*fpstate) < 0)
+                       return (void __user *)-1L;
        }
 
        sp -= frame_size;
@@ -383,9 +303,7 @@ __setup_frame(int sig, struct k_sigaction *ka, sigset_t *set,
         * reasons and because gdb uses it as a signature to notice
         * signal handler stack frames.
         */
-       err |= __put_user(0xb858, (short __user *)(frame->retcode+0));
-       err |= __put_user(__NR_sigreturn, (int __user *)(frame->retcode+2));
-       err |= __put_user(0x80cd, (short __user *)(frame->retcode+6));
+       err |= __put_user(*((u64 *)&retcode), (u64 *)frame->retcode);
 
        if (err)
                return -EFAULT;
@@ -454,9 +372,7 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
         * reasons and because gdb uses it as a signature to notice
         * signal handler stack frames.
         */
-       err |= __put_user(0xb8, (char __user *)(frame->retcode+0));
-       err |= __put_user(__NR_rt_sigreturn, (int __user *)(frame->retcode+1));
-       err |= __put_user(0x80cd, (short __user *)(frame->retcode+5));
+       err |= __put_user(*((u64 *)&rt_retcode), (u64 *)frame->retcode);
 
        if (err)
                return -EFAULT;
@@ -475,23 +391,293 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
 
        return 0;
 }
+#else /* !CONFIG_X86_32 */
+/*
+ * Determine which stack to use..
+ */
+static void __user *
+get_stack(struct k_sigaction *ka, unsigned long sp, unsigned long size)
+{
+       /* Default to using normal stack - redzone*/
+       sp -= 128;
+
+       /* This is the X/Open sanctioned signal stack switching.  */
+       if (ka->sa.sa_flags & SA_ONSTACK) {
+               if (sas_ss_flags(sp) == 0)
+                       sp = current->sas_ss_sp + current->sas_ss_size;
+       }
+
+       return (void __user *)round_down(sp - size, 64);
+}
+
+static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
+                           sigset_t *set, struct pt_regs *regs)
+{
+       struct rt_sigframe __user *frame;
+       void __user *fp = NULL;
+       int err = 0;
+       struct task_struct *me = current;
+
+       if (used_math()) {
+               fp = get_stack(ka, regs->sp, sig_xstate_size);
+               frame = (void __user *)round_down(
+                       (unsigned long)fp - sizeof(struct rt_sigframe), 16) - 8;
+
+               if (save_i387_xstate(fp) < 0)
+                       return -EFAULT;
+       } else
+               frame = get_stack(ka, regs->sp, sizeof(struct rt_sigframe)) - 8;
+
+       if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
+               return -EFAULT;
+
+       if (ka->sa.sa_flags & SA_SIGINFO) {
+               if (copy_siginfo_to_user(&frame->info, info))
+                       return -EFAULT;
+       }
+
+       /* Create the ucontext.  */
+       if (cpu_has_xsave)
+               err |= __put_user(UC_FP_XSTATE, &frame->uc.uc_flags);
+       else
+               err |= __put_user(0, &frame->uc.uc_flags);
+       err |= __put_user(0, &frame->uc.uc_link);
+       err |= __put_user(me->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
+       err |= __put_user(sas_ss_flags(regs->sp),
+                         &frame->uc.uc_stack.ss_flags);
+       err |= __put_user(me->sas_ss_size, &frame->uc.uc_stack.ss_size);
+       err |= setup_sigcontext(&frame->uc.uc_mcontext, fp, regs, set->sig[0]);
+       err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
+
+       /* Set up to return from userspace.  If provided, use a stub
+          already in userspace.  */
+       /* x86-64 should always use SA_RESTORER. */
+       if (ka->sa.sa_flags & SA_RESTORER) {
+               err |= __put_user(ka->sa.sa_restorer, &frame->pretcode);
+       } else {
+               /* could use a vstub here */
+               return -EFAULT;
+       }
+
+       if (err)
+               return -EFAULT;
+
+       /* Set up registers for signal handler */
+       regs->di = sig;
+       /* In case the signal handler was declared without prototypes */
+       regs->ax = 0;
+
+       /* This also works for non SA_SIGINFO handlers because they expect the
+          next argument after the signal number on the stack. */
+       regs->si = (unsigned long)&frame->info;
+       regs->dx = (unsigned long)&frame->uc;
+       regs->ip = (unsigned long) ka->sa.sa_handler;
+
+       regs->sp = (unsigned long)frame;
+
+       /* Set up the CS register to run signal handlers in 64-bit mode,
+          even if the handler happens to be interrupting 32-bit code. */
+       regs->cs = __USER_CS;
+
+       return 0;
+}
+#endif /* CONFIG_X86_32 */
+
+#ifdef CONFIG_X86_32
+/*
+ * Atomically swap in the new signal mask, and wait for a signal.
+ */
+asmlinkage int
+sys_sigsuspend(int history0, int history1, old_sigset_t mask)
+{
+       mask &= _BLOCKABLE;
+       spin_lock_irq(&current->sighand->siglock);
+       current->saved_sigmask = current->blocked;
+       siginitset(&current->blocked, mask);
+       recalc_sigpending();
+       spin_unlock_irq(&current->sighand->siglock);
+
+       current->state = TASK_INTERRUPTIBLE;
+       schedule();
+       set_restore_sigmask();
+
+       return -ERESTARTNOHAND;
+}
+
+asmlinkage int
+sys_sigaction(int sig, const struct old_sigaction __user *act,
+             struct old_sigaction __user *oact)
+{
+       struct k_sigaction new_ka, old_ka;
+       int ret;
+
+       if (act) {
+               old_sigset_t mask;
+
+               if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
+                   __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
+                   __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
+                       return -EFAULT;
+
+               __get_user(new_ka.sa.sa_flags, &act->sa_flags);
+               __get_user(mask, &act->sa_mask);
+               siginitset(&new_ka.sa.sa_mask, mask);
+       }
+
+       ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
+
+       if (!ret && oact) {
+               if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
+                   __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
+                   __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
+                       return -EFAULT;
+
+               __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
+               __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
+       }
+
+       return ret;
+}
+#endif /* CONFIG_X86_32 */
+
+#ifdef CONFIG_X86_32
+asmlinkage int sys_sigaltstack(unsigned long bx)
+{
+       /*
+        * This is needed to make gcc realize it doesn't own the
+        * "struct pt_regs"
+        */
+       struct pt_regs *regs = (struct pt_regs *)&bx;
+       const stack_t __user *uss = (const stack_t __user *)bx;
+       stack_t __user *uoss = (stack_t __user *)regs->cx;
+
+       return do_sigaltstack(uss, uoss, regs->sp);
+}
+#else /* !CONFIG_X86_32 */
+asmlinkage long
+sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
+               struct pt_regs *regs)
+{
+       return do_sigaltstack(uss, uoss, regs->sp);
+}
+#endif /* CONFIG_X86_32 */
+
+/*
+ * Do a signal return; undo the signal stack.
+ */
+#ifdef CONFIG_X86_32
+asmlinkage unsigned long sys_sigreturn(unsigned long __unused)
+{
+       struct sigframe __user *frame;
+       struct pt_regs *regs;
+       unsigned long ax;
+       sigset_t set;
+
+       regs = (struct pt_regs *) &__unused;
+       frame = (struct sigframe __user *)(regs->sp - 8);
+
+       if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
+               goto badframe;
+       if (__get_user(set.sig[0], &frame->sc.oldmask) || (_NSIG_WORDS > 1
+               && __copy_from_user(&set.sig[1], &frame->extramask,
+                                   sizeof(frame->extramask))))
+               goto badframe;
+
+       sigdelsetmask(&set, ~_BLOCKABLE);
+       spin_lock_irq(&current->sighand->siglock);
+       current->blocked = set;
+       recalc_sigpending();
+       spin_unlock_irq(&current->sighand->siglock);
+
+       if (restore_sigcontext(regs, &frame->sc, &ax))
+               goto badframe;
+       return ax;
+
+badframe:
+       signal_fault(regs, frame, "sigreturn");
+
+       return 0;
+}
+#endif /* CONFIG_X86_32 */
+
+static long do_rt_sigreturn(struct pt_regs *regs)
+{
+       struct rt_sigframe __user *frame;
+       unsigned long ax;
+       sigset_t set;
+
+       frame = (struct rt_sigframe __user *)(regs->sp - sizeof(long));
+       if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
+               goto badframe;
+       if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
+               goto badframe;
+
+       sigdelsetmask(&set, ~_BLOCKABLE);
+       spin_lock_irq(&current->sighand->siglock);
+       current->blocked = set;
+       recalc_sigpending();
+       spin_unlock_irq(&current->sighand->siglock);
+
+       if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &ax))
+               goto badframe;
+
+       if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->sp) == -EFAULT)
+               goto badframe;
+
+       return ax;
+
+badframe:
+       signal_fault(regs, frame, "rt_sigreturn");
+       return 0;
+}
+
+#ifdef CONFIG_X86_32
+asmlinkage int sys_rt_sigreturn(struct pt_regs regs)
+{
+       return do_rt_sigreturn(&regs);
+}
+#else /* !CONFIG_X86_32 */
+asmlinkage long sys_rt_sigreturn(struct pt_regs *regs)
+{
+       return do_rt_sigreturn(regs);
+}
+#endif /* CONFIG_X86_32 */
 
 /*
  * OK, we're invoking a handler:
  */
 static int signr_convert(int sig)
 {
+#ifdef CONFIG_X86_32
        struct thread_info *info = current_thread_info();
 
        if (info->exec_domain && info->exec_domain->signal_invmap && sig < 32)
                return info->exec_domain->signal_invmap[sig];
+#endif /* CONFIG_X86_32 */
        return sig;
 }
 
+#ifdef CONFIG_X86_32
+
 #define is_ia32        1
 #define ia32_setup_frame       __setup_frame
 #define ia32_setup_rt_frame    __setup_rt_frame
 
+#else /* !CONFIG_X86_32 */
+
+#ifdef CONFIG_IA32_EMULATION
+#define is_ia32        test_thread_flag(TIF_IA32)
+#else /* !CONFIG_IA32_EMULATION */
+#define is_ia32        0
+#endif /* CONFIG_IA32_EMULATION */
+
+int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
+               sigset_t *set, struct pt_regs *regs);
+int ia32_setup_frame(int sig, struct k_sigaction *ka,
+               sigset_t *set, struct pt_regs *regs);
+
+#endif /* CONFIG_X86_32 */
+
 static int
 setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
               sigset_t *set, struct pt_regs *regs)
@@ -592,7 +778,13 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
        return 0;
 }
 
+#ifdef CONFIG_X86_32
 #define NR_restart_syscall     __NR_restart_syscall
+#else /* !CONFIG_X86_32 */
+#define NR_restart_syscall     \
+       test_thread_flag(TIF_IA32) ? __NR_ia32_restart_syscall : __NR_restart_syscall
+#endif /* CONFIG_X86_32 */
+
 /*
  * Note that 'init' is a special process: it doesn't get signals it doesn't
  * want to handle. Thus you cannot kill init even with a SIGKILL even by
@@ -704,8 +896,9 @@ void signal_fault(struct pt_regs *regs, void __user *frame, char *where)
        struct task_struct *me = current;
 
        if (show_unhandled_signals && printk_ratelimit()) {
-               printk(KERN_INFO
+               printk("%s"
                       "%s[%d] bad frame in %s frame:%p ip:%lx sp:%lx orax:%lx",
+                      task_pid_nr(current) > 1 ? KERN_INFO : KERN_EMERG,
                       me->comm, me->pid, where, frame,
                       regs->ip, regs->sp, regs->orig_ax);
                print_vma_addr(" in ", regs->ip);
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c
deleted file mode 100644 (file)
index a5c9627..0000000
+++ /dev/null
@@ -1,516 +0,0 @@
-/*
- *  Copyright (C) 1991, 1992  Linus Torvalds
- *  Copyright (C) 2000, 2001, 2002 Andi Kleen SuSE Labs
- *
- *  1997-11-28  Modified for POSIX.1b signals by Richard Henderson
- *  2000-06-20  Pentium III FXSR, SSE support by Gareth Hughes
- *  2000-2002   x86-64 support by Andi Kleen
- */
-
-#include <linux/sched.h>
-#include <linux/mm.h>
-#include <linux/smp.h>
-#include <linux/kernel.h>
-#include <linux/signal.h>
-#include <linux/errno.h>
-#include <linux/wait.h>
-#include <linux/ptrace.h>
-#include <linux/tracehook.h>
-#include <linux/unistd.h>
-#include <linux/stddef.h>
-#include <linux/personality.h>
-#include <linux/compiler.h>
-#include <linux/uaccess.h>
-
-#include <asm/processor.h>
-#include <asm/ucontext.h>
-#include <asm/i387.h>
-#include <asm/proto.h>
-#include <asm/ia32_unistd.h>
-#include <asm/mce.h>
-#include <asm/syscall.h>
-#include <asm/syscalls.h>
-#include "sigframe.h"
-
-#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
-
-#define __FIX_EFLAGS   (X86_EFLAGS_AC | X86_EFLAGS_OF | \
-                        X86_EFLAGS_DF | X86_EFLAGS_TF | X86_EFLAGS_SF | \
-                        X86_EFLAGS_ZF | X86_EFLAGS_AF | X86_EFLAGS_PF | \
-                        X86_EFLAGS_CF)
-
-#ifdef CONFIG_X86_32
-# define FIX_EFLAGS    (__FIX_EFLAGS | X86_EFLAGS_RF)
-#else
-# define FIX_EFLAGS    __FIX_EFLAGS
-#endif
-
-asmlinkage long
-sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
-               struct pt_regs *regs)
-{
-       return do_sigaltstack(uss, uoss, regs->sp);
-}
-
-#define COPY(x)                        {               \
-       err |= __get_user(regs->x, &sc->x);     \
-}
-
-#define COPY_SEG_STRICT(seg)   {                       \
-               unsigned short tmp;                     \
-               err |= __get_user(tmp, &sc->seg);       \
-               regs->seg = tmp | 3;                    \
-}
-
-/*
- * Do a signal return; undo the signal stack.
- */
-static int
-restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
-                  unsigned long *pax)
-{
-       void __user *buf;
-       unsigned int tmpflags;
-       unsigned int err = 0;
-
-       /* Always make any pending restarted system calls return -EINTR */
-       current_thread_info()->restart_block.fn = do_no_restart_syscall;
-
-       COPY(di); COPY(si); COPY(bp); COPY(sp); COPY(bx);
-       COPY(dx); COPY(cx); COPY(ip);
-       COPY(r8);
-       COPY(r9);
-       COPY(r10);
-       COPY(r11);
-       COPY(r12);
-       COPY(r13);
-       COPY(r14);
-       COPY(r15);
-
-       /* Kernel saves and restores only the CS segment register on signals,
-        * which is the bare minimum needed to allow mixed 32/64-bit code.
-        * App's signal handler can save/restore other segments if needed. */
-       COPY_SEG_STRICT(cs);
-
-       err |= __get_user(tmpflags, &sc->flags);
-       regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
-       regs->orig_ax = -1;             /* disable syscall checks */
-
-       err |= __get_user(buf, &sc->fpstate);
-       err |= restore_i387_xstate(buf);
-
-       err |= __get_user(*pax, &sc->ax);
-       return err;
-}
-
-static long do_rt_sigreturn(struct pt_regs *regs)
-{
-       struct rt_sigframe __user *frame;
-       unsigned long ax;
-       sigset_t set;
-
-       frame = (struct rt_sigframe __user *)(regs->sp - sizeof(long));
-       if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
-               goto badframe;
-       if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
-               goto badframe;
-
-       sigdelsetmask(&set, ~_BLOCKABLE);
-       spin_lock_irq(&current->sighand->siglock);
-       current->blocked = set;
-       recalc_sigpending();
-       spin_unlock_irq(&current->sighand->siglock);
-
-       if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &ax))
-               goto badframe;
-
-       if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->sp) == -EFAULT)
-               goto badframe;
-
-       return ax;
-
-badframe:
-       signal_fault(regs, frame, "rt_sigreturn");
-       return 0;
-}
-
-asmlinkage long sys_rt_sigreturn(struct pt_regs *regs)
-{
-       return do_rt_sigreturn(regs);
-}
-
-/*
- * Set up a signal frame.
- */
-
-static inline int
-setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
-               unsigned long mask, struct task_struct *me)
-{
-       int err = 0;
-
-       err |= __put_user(regs->cs, &sc->cs);
-       err |= __put_user(0, &sc->gs);
-       err |= __put_user(0, &sc->fs);
-
-       err |= __put_user(regs->di, &sc->di);
-       err |= __put_user(regs->si, &sc->si);
-       err |= __put_user(regs->bp, &sc->bp);
-       err |= __put_user(regs->sp, &sc->sp);
-       err |= __put_user(regs->bx, &sc->bx);
-       err |= __put_user(regs->dx, &sc->dx);
-       err |= __put_user(regs->cx, &sc->cx);
-       err |= __put_user(regs->ax, &sc->ax);
-       err |= __put_user(regs->r8, &sc->r8);
-       err |= __put_user(regs->r9, &sc->r9);
-       err |= __put_user(regs->r10, &sc->r10);
-       err |= __put_user(regs->r11, &sc->r11);
-       err |= __put_user(regs->r12, &sc->r12);
-       err |= __put_user(regs->r13, &sc->r13);
-       err |= __put_user(regs->r14, &sc->r14);
-       err |= __put_user(regs->r15, &sc->r15);
-       err |= __put_user(me->thread.trap_no, &sc->trapno);
-       err |= __put_user(me->thread.error_code, &sc->err);
-       err |= __put_user(regs->ip, &sc->ip);
-       err |= __put_user(regs->flags, &sc->flags);
-       err |= __put_user(mask, &sc->oldmask);
-       err |= __put_user(me->thread.cr2, &sc->cr2);
-
-       return err;
-}
-
-/*
- * Determine which stack to use..
- */
-
-static void __user *
-get_stack(struct k_sigaction *ka, struct pt_regs *regs, unsigned long size)
-{
-       unsigned long sp;
-
-       /* Default to using normal stack - redzone*/
-       sp = regs->sp - 128;
-
-       /* This is the X/Open sanctioned signal stack switching.  */
-       if (ka->sa.sa_flags & SA_ONSTACK) {
-               if (sas_ss_flags(sp) == 0)
-                       sp = current->sas_ss_sp + current->sas_ss_size;
-       }
-
-       return (void __user *)round_down(sp - size, 64);
-}
-
-static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
-                           sigset_t *set, struct pt_regs *regs)
-{
-       struct rt_sigframe __user *frame;
-       void __user *fp = NULL;
-       int err = 0;
-       struct task_struct *me = current;
-
-       if (used_math()) {
-               fp = get_stack(ka, regs, sig_xstate_size);
-               frame = (void __user *)round_down(
-                       (unsigned long)fp - sizeof(struct rt_sigframe), 16) - 8;
-
-               if (save_i387_xstate(fp) < 0)
-                       return -EFAULT;
-       } else
-               frame = get_stack(ka, regs, sizeof(struct rt_sigframe)) - 8;
-
-       if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
-               return -EFAULT;
-
-       if (ka->sa.sa_flags & SA_SIGINFO) {
-               if (copy_siginfo_to_user(&frame->info, info))
-                       return -EFAULT;
-       }
-
-       /* Create the ucontext.  */
-       if (cpu_has_xsave)
-               err |= __put_user(UC_FP_XSTATE, &frame->uc.uc_flags);
-       else
-               err |= __put_user(0, &frame->uc.uc_flags);
-       err |= __put_user(0, &frame->uc.uc_link);
-       err |= __put_user(me->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
-       err |= __put_user(sas_ss_flags(regs->sp),
-                         &frame->uc.uc_stack.ss_flags);
-       err |= __put_user(me->sas_ss_size, &frame->uc.uc_stack.ss_size);
-       err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, set->sig[0], me);
-       err |= __put_user(fp, &frame->uc.uc_mcontext.fpstate);
-       if (sizeof(*set) == 16) {
-               __put_user(set->sig[0], &frame->uc.uc_sigmask.sig[0]);
-               __put_user(set->sig[1], &frame->uc.uc_sigmask.sig[1]);
-       } else
-               err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
-
-       /* Set up to return from userspace.  If provided, use a stub
-          already in userspace.  */
-       /* x86-64 should always use SA_RESTORER. */
-       if (ka->sa.sa_flags & SA_RESTORER) {
-               err |= __put_user(ka->sa.sa_restorer, &frame->pretcode);
-       } else {
-               /* could use a vstub here */
-               return -EFAULT;
-       }
-
-       if (err)
-               return -EFAULT;
-
-       /* Set up registers for signal handler */
-       regs->di = sig;
-       /* In case the signal handler was declared without prototypes */
-       regs->ax = 0;
-
-       /* This also works for non SA_SIGINFO handlers because they expect the
-          next argument after the signal number on the stack. */
-       regs->si = (unsigned long)&frame->info;
-       regs->dx = (unsigned long)&frame->uc;
-       regs->ip = (unsigned long) ka->sa.sa_handler;
-
-       regs->sp = (unsigned long)frame;
-
-       /* Set up the CS register to run signal handlers in 64-bit mode,
-          even if the handler happens to be interrupting 32-bit code. */
-       regs->cs = __USER_CS;
-
-       return 0;
-}
-
-/*
- * OK, we're invoking a handler
- */
-static int signr_convert(int sig)
-{
-       return sig;
-}
-
-#ifdef CONFIG_IA32_EMULATION
-#define is_ia32        test_thread_flag(TIF_IA32)
-#else
-#define is_ia32        0
-#endif
-
-static int
-setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
-              sigset_t *set, struct pt_regs *regs)
-{
-       int usig = signr_convert(sig);
-       int ret;
-
-       /* Set up the stack frame */
-       if (is_ia32) {
-               if (ka->sa.sa_flags & SA_SIGINFO)
-                       ret = ia32_setup_rt_frame(usig, ka, info, set, regs);
-               else
-                       ret = ia32_setup_frame(usig, ka, set, regs);
-       } else
-               ret = __setup_rt_frame(sig, ka, info, set, regs);
-
-       if (ret) {
-               force_sigsegv(sig, current);
-               return -EFAULT;
-       }
-
-       return ret;
-}
-
-static int
-handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
-             sigset_t *oldset, struct pt_regs *regs)
-{
-       int ret;
-
-       /* Are we from a system call? */
-       if (syscall_get_nr(current, regs) >= 0) {
-               /* If so, check system call restarting.. */
-               switch (syscall_get_error(current, regs)) {
-               case -ERESTART_RESTARTBLOCK:
-               case -ERESTARTNOHAND:
-                       regs->ax = -EINTR;
-                       break;
-
-               case -ERESTARTSYS:
-                       if (!(ka->sa.sa_flags & SA_RESTART)) {
-                               regs->ax = -EINTR;
-                               break;
-                       }
-               /* fallthrough */
-               case -ERESTARTNOINTR:
-                       regs->ax = regs->orig_ax;
-                       regs->ip -= 2;
-                       break;
-               }
-       }
-
-       /*
-        * If TF is set due to a debugger (TIF_FORCED_TF), clear the TF
-        * flag so that register information in the sigcontext is correct.
-        */
-       if (unlikely(regs->flags & X86_EFLAGS_TF) &&
-           likely(test_and_clear_thread_flag(TIF_FORCED_TF)))
-               regs->flags &= ~X86_EFLAGS_TF;
-
-       ret = setup_rt_frame(sig, ka, info, oldset, regs);
-
-       if (ret)
-               return ret;
-
-#ifdef CONFIG_X86_64
-       /*
-        * This has nothing to do with segment registers,
-        * despite the name.  This magic affects uaccess.h
-        * macros' behavior.  Reset it to the normal setting.
-        */
-       set_fs(USER_DS);
-#endif
-
-       /*
-        * Clear the direction flag as per the ABI for function entry.
-        */
-       regs->flags &= ~X86_EFLAGS_DF;
-
-       /*
-        * Clear TF when entering the signal handler, but
-        * notify any tracer that was single-stepping it.
-        * The tracer may want to single-step inside the
-        * handler too.
-        */
-       regs->flags &= ~X86_EFLAGS_TF;
-
-       spin_lock_irq(&current->sighand->siglock);
-       sigorsets(&current->blocked, &current->blocked, &ka->sa.sa_mask);
-       if (!(ka->sa.sa_flags & SA_NODEFER))
-               sigaddset(&current->blocked, sig);
-       recalc_sigpending();
-       spin_unlock_irq(&current->sighand->siglock);
-
-       tracehook_signal_handler(sig, info, ka, regs,
-                                test_thread_flag(TIF_SINGLESTEP));
-
-       return 0;
-}
-
-#define NR_restart_syscall     \
-       test_thread_flag(TIF_IA32) ? __NR_ia32_restart_syscall : __NR_restart_syscall
-/*
- * Note that 'init' is a special process: it doesn't get signals it doesn't
- * want to handle. Thus you cannot kill init even with a SIGKILL even by
- * mistake.
- */
-static void do_signal(struct pt_regs *regs)
-{
-       struct k_sigaction ka;
-       siginfo_t info;
-       int signr;
-       sigset_t *oldset;
-
-       /*
-        * We want the common case to go fast, which is why we may in certain
-        * cases get here from kernel mode. Just return without doing anything
-        * if so.
-        * X86_32: vm86 regs switched out by assembly code before reaching
-        * here, so testing against kernel CS suffices.
-        */
-       if (!user_mode(regs))
-               return;
-
-       if (current_thread_info()->status & TS_RESTORE_SIGMASK)
-               oldset = &current->saved_sigmask;
-       else
-               oldset = &current->blocked;
-
-       signr = get_signal_to_deliver(&info, &ka, regs, NULL);
-       if (signr > 0) {
-               /*
-                * Re-enable any watchpoints before delivering the
-                * signal to user space. The processor register will
-                * have been cleared if the watchpoint triggered
-                * inside the kernel.
-                */
-               if (current->thread.debugreg7)
-                       set_debugreg(current->thread.debugreg7, 7);
-
-               /* Whee! Actually deliver the signal.  */
-               if (handle_signal(signr, &info, &ka, oldset, regs) == 0) {
-                       /*
-                        * A signal was successfully delivered; the saved
-                        * sigmask will have been stored in the signal frame,
-                        * and will be restored by sigreturn, so we can simply
-                        * clear the TS_RESTORE_SIGMASK flag.
-                        */
-                       current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
-               }
-               return;
-       }
-
-       /* Did we come from a system call? */
-       if (syscall_get_nr(current, regs) >= 0) {
-               /* Restart the system call - no handlers present */
-               switch (syscall_get_error(current, regs)) {
-               case -ERESTARTNOHAND:
-               case -ERESTARTSYS:
-               case -ERESTARTNOINTR:
-                       regs->ax = regs->orig_ax;
-                       regs->ip -= 2;
-                       break;
-
-               case -ERESTART_RESTARTBLOCK:
-                       regs->ax = NR_restart_syscall;
-                       regs->ip -= 2;
-                       break;
-               }
-       }
-
-       /*
-        * If there's no signal to deliver, we just put the saved sigmask
-        * back.
-        */
-       if (current_thread_info()->status & TS_RESTORE_SIGMASK) {
-               current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
-               sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
-       }
-}
-
-/*
- * notification of userspace execution resumption
- * - triggered by the TIF_WORK_MASK flags
- */
-void
-do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags)
-{
-#if defined(CONFIG_X86_64) && defined(CONFIG_X86_MCE)
-       /* notify userspace of pending MCEs */
-       if (thread_info_flags & _TIF_MCE_NOTIFY)
-               mce_notify_user();
-#endif /* CONFIG_X86_64 && CONFIG_X86_MCE */
-
-       /* deal with pending signal delivery */
-       if (thread_info_flags & _TIF_SIGPENDING)
-               do_signal(regs);
-
-       if (thread_info_flags & _TIF_NOTIFY_RESUME) {
-               clear_thread_flag(TIF_NOTIFY_RESUME);
-               tracehook_notify_resume(regs);
-       }
-
-#ifdef CONFIG_X86_32
-       clear_thread_flag(TIF_IRET);
-#endif /* CONFIG_X86_32 */
-}
-
-void signal_fault(struct pt_regs *regs, void __user *frame, char *where)
-{
-       struct task_struct *me = current;
-
-       if (show_unhandled_signals && printk_ratelimit()) {
-               printk(KERN_INFO
-                      "%s[%d] bad frame in %s frame:%p ip:%lx sp:%lx orax:%lx",
-                      me->comm, me->pid, where, frame,
-                      regs->ip, regs->sp, regs->orig_ax);
-               print_vma_addr(" in ", regs->ip);
-               printk(KERN_CONT "\n");
-       }
-
-       force_sig(SIGSEGV, me);
-}
index 18f9b19f5f8f5d46582b64501d83d11cb4376eb6..3f92b134ab902067c63ed05f51f95eac7dd0de99 100644 (file)
@@ -140,19 +140,6 @@ void native_send_call_func_ipi(cpumask_t mask)
                send_IPI_mask(mask, CALL_FUNCTION_VECTOR);
 }
 
-static void stop_this_cpu(void *dummy)
-{
-       local_irq_disable();
-       /*
-        * Remove this CPU:
-        */
-       cpu_clear(smp_processor_id(), cpu_online_map);
-       disable_local_APIC();
-       if (hlt_works(smp_processor_id()))
-               for (;;) halt();
-       for (;;);
-}
-
 /*
  * this function calls the 'stop' function on all other CPUs in the system.
  */
index 7b1093397319766b2e4848a5a883b0dc35f49804..7a430c4d15516f8ade11c87b50adcb02660b118a 100644 (file)
@@ -62,6 +62,7 @@
 #include <asm/mtrr.h>
 #include <asm/vmi.h>
 #include <asm/genapic.h>
+#include <asm/setup.h>
 #include <linux/mc146818rtc.h>
 
 #include <mach_apic.h>
@@ -294,9 +295,7 @@ static void __cpuinit start_secondary(void *unused)
         * fragile that we want to limit the things done here to the
         * most necessary things.
         */
-#ifdef CONFIG_VMI
        vmi_bringup();
-#endif
        cpu_init();
        preempt_disable();
        smp_callin();
@@ -536,7 +535,7 @@ static void impress_friends(void)
        pr_debug("Before bogocount - setting activated=1.\n");
 }
 
-static inline void __inquire_remote_apic(int apicid)
+void __inquire_remote_apic(int apicid)
 {
        unsigned i, regs[] = { APIC_ID >> 4, APIC_LVR >> 4, APIC_SPIV >> 4 };
        char *names[] = { "ID", "VERSION", "SPIV" };
@@ -575,14 +574,13 @@ static inline void __inquire_remote_apic(int apicid)
        }
 }
 
-#ifdef WAKE_SECONDARY_VIA_NMI
 /*
  * Poke the other CPU in the eye via NMI to wake it up. Remember that the normal
  * INIT, INIT, STARTUP sequence will reset the chip hard for us, and this
  * won't ... remember to clear down the APIC, etc later.
  */
-static int __devinit
-wakeup_secondary_cpu(int logical_apicid, unsigned long start_eip)
+int __devinit
+wakeup_secondary_cpu_via_nmi(int logical_apicid, unsigned long start_eip)
 {
        unsigned long send_status, accept_status = 0;
        int maxlvt;
@@ -599,7 +597,7 @@ wakeup_secondary_cpu(int logical_apicid, unsigned long start_eip)
         * Give the other CPU some time to accept the IPI.
         */
        udelay(200);
-       if (APIC_INTEGRATED(apic_version[phys_apicid])) {
+       if (APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) {
                maxlvt = lapic_get_maxlvt();
                if (maxlvt > 3)                 /* Due to the Pentium erratum 3AP.  */
                        apic_write(APIC_ESR, 0);
@@ -614,11 +612,9 @@ wakeup_secondary_cpu(int logical_apicid, unsigned long start_eip)
 
        return (send_status | accept_status);
 }
-#endif /* WAKE_SECONDARY_VIA_NMI */
 
-#ifdef WAKE_SECONDARY_VIA_INIT
-static int __devinit
-wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip)
+int __devinit
+wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
 {
        unsigned long send_status, accept_status = 0;
        int maxlvt, num_starts, j;
@@ -737,7 +733,6 @@ wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip)
 
        return (send_status | accept_status);
 }
-#endif /* WAKE_SECONDARY_VIA_INIT */
 
 struct create_idle {
        struct work_struct work;
@@ -1086,8 +1081,10 @@ static int __init smp_sanity_check(unsigned max_cpus)
 #endif
 
        if (!physid_isset(hard_smp_processor_id(), phys_cpu_present_map)) {
-               printk(KERN_WARNING "weird, boot CPU (#%d) not listed"
-                                   "by the BIOS.\n", hard_smp_processor_id());
+               printk(KERN_WARNING
+                       "weird, boot CPU (#%d) not listed by the BIOS.\n",
+                       hard_smp_processor_id());
+
                physid_set(hard_smp_processor_id(), phys_cpu_present_map);
        }
 
index cb19d650c21643599aa1423a57b64a85ee26afe8..1b7711b31037ed034ccf55defc306ab35bfc74ba 100644 (file)
@@ -49,7 +49,7 @@ unsigned long profile_pc(struct pt_regs *regs)
 }
 EXPORT_SYMBOL(profile_pc);
 
-irqreturn_t timer_interrupt(int irq, void *dev_id)
+static irqreturn_t timer_interrupt(int irq, void *dev_id)
 {
        add_pda(irq0_irqs, 1);
 
@@ -80,6 +80,8 @@ unsigned long __init calibrate_cpu(void)
                        break;
        no_ctr_free = (i == 4);
        if (no_ctr_free) {
+               WARN(1, KERN_WARNING "Warning: AMD perfctrs busy ... "
+                    "cpu_khz value may be incorrect.\n");
                i = 3;
                rdmsrl(MSR_K7_EVNTSEL3, evntsel3);
                wrmsrl(MSR_K7_EVNTSEL3, 0);
index f4049f3513b6b5e01e71523a5490fbedd5db9992..4290d918b58af67f22fa8a25f182d2eebf133819 100644 (file)
@@ -34,9 +34,8 @@ static DEFINE_SPINLOCK(tlbstate_lock);
  */
 void leave_mm(int cpu)
 {
-       if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK)
-               BUG();
-       cpu_clear(cpu, per_cpu(cpu_tlbstate, cpu).active_mm->cpu_vm_mask);
+       BUG_ON(x86_read_percpu(cpu_tlbstate.state) == TLBSTATE_OK);
+       cpu_clear(cpu, x86_read_percpu(cpu_tlbstate.active_mm)->cpu_vm_mask);
        load_cr3(swapper_pg_dir);
 }
 EXPORT_SYMBOL_GPL(leave_mm);
@@ -104,8 +103,8 @@ void smp_invalidate_interrupt(struct pt_regs *regs)
                 * BUG();
                 */
 
-       if (flush_mm == per_cpu(cpu_tlbstate, cpu).active_mm) {
-               if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK) {
+       if (flush_mm == x86_read_percpu(cpu_tlbstate.active_mm)) {
+               if (x86_read_percpu(cpu_tlbstate.state) == TLBSTATE_OK) {
                        if (flush_va == TLB_FLUSH_ALL)
                                local_flush_tlb();
                        else
@@ -238,7 +237,7 @@ static void do_flush_tlb_all(void *info)
        unsigned long cpu = smp_processor_id();
 
        __flush_tlb_all();
-       if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_LAZY)
+       if (x86_read_percpu(cpu_tlbstate.state) == TLBSTATE_LAZY)
                leave_mm(cpu);
 }
 
index 04431f34fd16f24946bb66b4eedf69ed7e51cf6f..6a00e5faaa74375d5b709488a0b9c371c3fe5c79 100644 (file)
@@ -566,14 +566,10 @@ static int __init uv_ptc_init(void)
        if (!is_uv_system())
                return 0;
 
-       if (!proc_mkdir("sgi_uv", NULL))
-               return -EINVAL;
-
        proc_uv_ptc = create_proc_entry(UV_PTC_BASENAME, 0444, NULL);
        if (!proc_uv_ptc) {
                printk(KERN_ERR "unable to create %s proc entry\n",
                       UV_PTC_BASENAME);
-               remove_proc_entry("sgi_uv", NULL);
                return -EINVAL;
        }
        proc_uv_ptc->proc_fops = &proc_uv_ptc_operations;
index 1106fac6024d412fae02df4780464ecd2f9abf4b..808031a5ba19a62bee01b404a812d57409b60b7d 100644 (file)
@@ -1,10 +1,26 @@
 #include <linux/io.h>
 
 #include <asm/trampoline.h>
+#include <asm/e820.h>
 
 /* ready for x86_64 and x86 */
 unsigned char *trampoline_base = __va(TRAMPOLINE_BASE);
 
+void __init reserve_trampoline_memory(void)
+{
+#ifdef CONFIG_X86_32
+       /*
+        * But first pinch a few for the stack/trampoline stuff
+        * FIXME: Don't need the extra page at 4K, but need to fix
+        * trampoline before removing it. (see the GDT stuff)
+        */
+       reserve_early(PAGE_SIZE, PAGE_SIZE + PAGE_SIZE, "EX TRAMPOLINE");
+#endif
+       /* Has to be in very low memory so we can execute real-mode AP code. */
+       reserve_early(TRAMPOLINE_BASE, TRAMPOLINE_BASE + TRAMPOLINE_SIZE,
+                       "TRAMPOLINE");
+}
+
 /*
  * Currently trivial. Write the real->protected mode
  * bootstrap into the page concerned. The caller
@@ -12,7 +28,6 @@ unsigned char *trampoline_base = __va(TRAMPOLINE_BASE);
  */
 unsigned long setup_trampoline(void)
 {
-       memcpy(trampoline_base, trampoline_data,
-              trampoline_end - trampoline_data);
+       memcpy(trampoline_base, trampoline_data, TRAMPOLINE_SIZE);
        return virt_to_phys(trampoline_base);
 }
index 04d242ab0161967985bcb7f9e24f9fe54fb9f33f..c320c29255c216b071755c5988a08baf3f127827 100644 (file)
@@ -664,7 +664,7 @@ void math_error(void __user *ip)
 {
        struct task_struct *task;
        siginfo_t info;
-       unsigned short cwd, swd;
+       unsigned short cwd, swd, err;
 
        /*
         * Save the info for the exception handler and clear the error.
@@ -675,7 +675,6 @@ void math_error(void __user *ip)
        task->thread.error_code = 0;
        info.si_signo = SIGFPE;
        info.si_errno = 0;
-       info.si_code = __SI_FAULT;
        info.si_addr = ip;
        /*
         * (~cwd & swd) will mask out exceptions that are not set to unmasked
@@ -689,34 +688,31 @@ void math_error(void __user *ip)
         */
        cwd = get_fpu_cwd(task);
        swd = get_fpu_swd(task);
-       switch (swd & ~cwd & 0x3f) {
-       case 0x000: /* No unmasked exception */
-#ifdef CONFIG_X86_32
+
+       err = swd & ~cwd & 0x3f;
+
+#if CONFIG_X86_32
+       if (!err)
                return;
 #endif
-       default: /* Multiple exceptions */
-               break;
-       case 0x001: /* Invalid Op */
+
+       if (err & 0x001) {      /* Invalid op */
                /*
                 * swd & 0x240 == 0x040: Stack Underflow
                 * swd & 0x240 == 0x240: Stack Overflow
                 * User must clear the SF bit (0x40) if set
                 */
                info.si_code = FPE_FLTINV;
-               break;
-       case 0x002: /* Denormalize */
-       case 0x010: /* Underflow */
-               info.si_code = FPE_FLTUND;
-               break;
-       case 0x004: /* Zero Divide */
+       } else if (err & 0x004) { /* Divide by Zero */
                info.si_code = FPE_FLTDIV;
-               break;
-       case 0x008: /* Overflow */
+       } else if (err & 0x008) { /* Overflow */
                info.si_code = FPE_FLTOVF;
-               break;
-       case 0x020: /* Precision */
+       } else if (err & 0x012) { /* Denormal, Underflow */
+               info.si_code = FPE_FLTUND;
+       } else if (err & 0x020) { /* Precision */
                info.si_code = FPE_FLTRES;
-               break;
+       } else {
+               info.si_code = __SI_FAULT|SI_KERNEL; /* WTF? */
        }
        force_sig_info(SIGFPE, &info, task);
 }
index 424093b157d363dcad0bb58b8ed08636a9e0b61e..599e58168631e22e5ff69e15c365273bd2f9b03c 100644 (file)
@@ -15,6 +15,7 @@
 #include <asm/vgtod.h>
 #include <asm/time.h>
 #include <asm/delay.h>
+#include <asm/hypervisor.h>
 
 unsigned int cpu_khz;           /* TSC clocks / usec, not used here */
 EXPORT_SYMBOL(cpu_khz);
@@ -31,6 +32,7 @@ static int tsc_unstable;
    erroneous rdtsc usage on !cpu_has_tsc processors */
 static int tsc_disabled = -1;
 
+static int tsc_clocksource_reliable;
 /*
  * Scheduler clock - returns current time in nanosec units.
  */
@@ -98,6 +100,15 @@ int __init notsc_setup(char *str)
 
 __setup("notsc", notsc_setup);
 
+static int __init tsc_setup(char *str)
+{
+       if (!strcmp(str, "reliable"))
+               tsc_clocksource_reliable = 1;
+       return 1;
+}
+
+__setup("tsc=", tsc_setup);
+
 #define MAX_RETRIES     5
 #define SMI_TRESHOLD    50000
 
@@ -352,9 +363,15 @@ unsigned long native_calibrate_tsc(void)
 {
        u64 tsc1, tsc2, delta, ref1, ref2;
        unsigned long tsc_pit_min = ULONG_MAX, tsc_ref_min = ULONG_MAX;
-       unsigned long flags, latch, ms, fast_calibrate;
+       unsigned long flags, latch, ms, fast_calibrate, tsc_khz;
        int hpet = is_hpet_enabled(), i, loopmin;
 
+       tsc_khz = get_hypervisor_tsc_freq();
+       if (tsc_khz) {
+               printk(KERN_INFO "TSC: Frequency read from the hypervisor\n");
+               return tsc_khz;
+       }
+
        local_irq_save(flags);
        fast_calibrate = quick_pit_calibrate();
        local_irq_restore(flags);
@@ -731,24 +748,21 @@ static struct dmi_system_id __initdata bad_tsc_dmi_table[] = {
        {}
 };
 
-/*
- * Geode_LX - the OLPC CPU has a possibly a very reliable TSC
- */
+static void __init check_system_tsc_reliable(void)
+{
 #ifdef CONFIG_MGEODE_LX
-/* RTSC counts during suspend */
+       /* RTSC counts during suspend */
 #define RTSC_SUSP 0x100
-
-static void __init check_geode_tsc_reliable(void)
-{
        unsigned long res_low, res_high;
 
        rdmsr_safe(MSR_GEODE_BUSCONT_CONF0, &res_low, &res_high);
+       /* Geode_LX - the OLPC CPU has a possibly a very reliable TSC */
        if (res_low & RTSC_SUSP)
-               clocksource_tsc.flags &= ~CLOCK_SOURCE_MUST_VERIFY;
-}
-#else
-static inline void check_geode_tsc_reliable(void) { }
+               tsc_clocksource_reliable = 1;
 #endif
+       if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE))
+               tsc_clocksource_reliable = 1;
+}
 
 /*
  * Make an educated guess if the TSC is trustworthy and synchronized
@@ -783,6 +797,8 @@ static void __init init_tsc_clocksource(void)
 {
        clocksource_tsc.mult = clocksource_khz2mult(tsc_khz,
                        clocksource_tsc.shift);
+       if (tsc_clocksource_reliable)
+               clocksource_tsc.flags &= ~CLOCK_SOURCE_MUST_VERIFY;
        /* lower the rating if we already know its unstable: */
        if (check_tsc_unstable()) {
                clocksource_tsc.rating = 0;
@@ -843,7 +859,7 @@ void __init tsc_init(void)
        if (unsynchronized_tsc())
                mark_tsc_unstable("TSCs unsynchronized");
 
-       check_geode_tsc_reliable();
+       check_system_tsc_reliable();
        init_tsc_clocksource();
 }
 
index 9ffb01c31c40a8c9083e9949d065a442a62f46b7..bf36328f6ef9289c4b1a1a7d0ffd9c67878f3f32 100644 (file)
@@ -46,7 +46,9 @@ static __cpuinit void check_tsc_warp(void)
        cycles_t start, now, prev, end;
        int i;
 
+       rdtsc_barrier();
        start = get_cycles();
+       rdtsc_barrier();
        /*
         * The measurement runs for 20 msecs:
         */
@@ -61,7 +63,9 @@ static __cpuinit void check_tsc_warp(void)
                 */
                __raw_spin_lock(&sync_lock);
                prev = last_tsc;
+               rdtsc_barrier();
                now = get_cycles();
+               rdtsc_barrier();
                last_tsc = now;
                __raw_spin_unlock(&sync_lock);
 
@@ -108,6 +112,12 @@ void __cpuinit check_tsc_sync_source(int cpu)
        if (unsynchronized_tsc())
                return;
 
+       if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE)) {
+               printk(KERN_INFO
+                      "Skipping synchronization checks as TSC is reliable.\n");
+               return;
+       }
+
        printk(KERN_INFO "checking TSC synchronization [CPU#%d -> CPU#%d]:",
                          smp_processor_id(), cpu);
 
@@ -161,7 +171,7 @@ void __cpuinit check_tsc_sync_target(void)
 {
        int cpus = 2;
 
-       if (unsynchronized_tsc())
+       if (unsynchronized_tsc() || boot_cpu_has(X86_FEATURE_TSC_RELIABLE))
                return;
 
        /*
index 8b6c393ab9fd14f06b86d9deb656b3643d9006f3..23206ba16874ce5d6ace3d046ee35e95e721427c 100644 (file)
@@ -266,109 +266,6 @@ static void vmi_nop(void)
 {
 }
 
-#ifdef CONFIG_DEBUG_PAGE_TYPE
-
-#ifdef CONFIG_X86_PAE
-#define MAX_BOOT_PTS (2048+4+1)
-#else
-#define MAX_BOOT_PTS (1024+1)
-#endif
-
-/*
- * During boot, mem_map is not yet available in paging_init, so stash
- * all the boot page allocations here.
- */
-static struct {
-       u32 pfn;
-       int type;
-} boot_page_allocations[MAX_BOOT_PTS];
-static int num_boot_page_allocations;
-static int boot_allocations_applied;
-
-void vmi_apply_boot_page_allocations(void)
-{
-       int i;
-       BUG_ON(!mem_map);
-       for (i = 0; i < num_boot_page_allocations; i++) {
-               struct page *page = pfn_to_page(boot_page_allocations[i].pfn);
-               page->type = boot_page_allocations[i].type;
-               page->type = boot_page_allocations[i].type &
-                               ~(VMI_PAGE_ZEROED | VMI_PAGE_CLONE);
-       }
-       boot_allocations_applied = 1;
-}
-
-static void record_page_type(u32 pfn, int type)
-{
-       BUG_ON(num_boot_page_allocations >= MAX_BOOT_PTS);
-       boot_page_allocations[num_boot_page_allocations].pfn = pfn;
-       boot_page_allocations[num_boot_page_allocations].type = type;
-       num_boot_page_allocations++;
-}
-
-static void check_zeroed_page(u32 pfn, int type, struct page *page)
-{
-       u32 *ptr;
-       int i;
-       int limit = PAGE_SIZE / sizeof(int);
-
-       if (page_address(page))
-               ptr = (u32 *)page_address(page);
-       else
-               ptr = (u32 *)__va(pfn << PAGE_SHIFT);
-       /*
-        * When cloning the root in non-PAE mode, only the userspace
-        * pdes need to be zeroed.
-        */
-       if (type & VMI_PAGE_CLONE)
-               limit = KERNEL_PGD_BOUNDARY;
-       for (i = 0; i < limit; i++)
-               BUG_ON(ptr[i]);
-}
-
-/*
- * We stash the page type into struct page so we can verify the page
- * types are used properly.
- */
-static void vmi_set_page_type(u32 pfn, int type)
-{
-       /* PAE can have multiple roots per page - don't track */
-       if (PTRS_PER_PMD > 1 && (type & VMI_PAGE_PDP))
-               return;
-
-       if (boot_allocations_applied) {
-               struct page *page = pfn_to_page(pfn);
-               if (type != VMI_PAGE_NORMAL)
-                       BUG_ON(page->type);
-               else
-                       BUG_ON(page->type == VMI_PAGE_NORMAL);
-               page->type = type & ~(VMI_PAGE_ZEROED | VMI_PAGE_CLONE);
-               if (type & VMI_PAGE_ZEROED)
-                       check_zeroed_page(pfn, type, page);
-       } else {
-               record_page_type(pfn, type);
-       }
-}
-
-static void vmi_check_page_type(u32 pfn, int type)
-{
-       /* PAE can have multiple roots per page - skip checks */
-       if (PTRS_PER_PMD > 1 && (type & VMI_PAGE_PDP))
-               return;
-
-       type &= ~(VMI_PAGE_ZEROED | VMI_PAGE_CLONE);
-       if (boot_allocations_applied) {
-               struct page *page = pfn_to_page(pfn);
-               BUG_ON((page->type ^ type) & VMI_PAGE_PAE);
-               BUG_ON(type == VMI_PAGE_NORMAL && page->type);
-               BUG_ON((type & page->type) == 0);
-       }
-}
-#else
-#define vmi_set_page_type(p,t) do { } while (0)
-#define vmi_check_page_type(p,t) do { } while (0)
-#endif
-
 #ifdef CONFIG_HIGHPTE
 static void *vmi_kmap_atomic_pte(struct page *page, enum km_type type)
 {
@@ -395,7 +292,6 @@ static void *vmi_kmap_atomic_pte(struct page *page, enum km_type type)
 
 static void vmi_allocate_pte(struct mm_struct *mm, unsigned long pfn)
 {
-       vmi_set_page_type(pfn, VMI_PAGE_L1);
        vmi_ops.allocate_page(pfn, VMI_PAGE_L1, 0, 0, 0);
 }
 
@@ -406,27 +302,22 @@ static void vmi_allocate_pmd(struct mm_struct *mm, unsigned long pfn)
         * It is called only for swapper_pg_dir, which already has
         * data on it.
         */
-       vmi_set_page_type(pfn, VMI_PAGE_L2);
        vmi_ops.allocate_page(pfn, VMI_PAGE_L2, 0, 0, 0);
 }
 
 static void vmi_allocate_pmd_clone(unsigned long pfn, unsigned long clonepfn, unsigned long start, unsigned long count)
 {
-       vmi_set_page_type(pfn, VMI_PAGE_L2 | VMI_PAGE_CLONE);
-       vmi_check_page_type(clonepfn, VMI_PAGE_L2);
        vmi_ops.allocate_page(pfn, VMI_PAGE_L2 | VMI_PAGE_CLONE, clonepfn, start, count);
 }
 
 static void vmi_release_pte(unsigned long pfn)
 {
        vmi_ops.release_page(pfn, VMI_PAGE_L1);
-       vmi_set_page_type(pfn, VMI_PAGE_NORMAL);
 }
 
 static void vmi_release_pmd(unsigned long pfn)
 {
        vmi_ops.release_page(pfn, VMI_PAGE_L2);
-       vmi_set_page_type(pfn, VMI_PAGE_NORMAL);
 }
 
 /*
@@ -450,26 +341,22 @@ static void vmi_release_pmd(unsigned long pfn)
 
 static void vmi_update_pte(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
 {
-       vmi_check_page_type(__pa(ptep) >> PAGE_SHIFT, VMI_PAGE_PTE);
        vmi_ops.update_pte(ptep, vmi_flags_addr(mm, addr, VMI_PAGE_PT, 0));
 }
 
 static void vmi_update_pte_defer(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
 {
-       vmi_check_page_type(__pa(ptep) >> PAGE_SHIFT, VMI_PAGE_PTE);
        vmi_ops.update_pte(ptep, vmi_flags_addr_defer(mm, addr, VMI_PAGE_PT, 0));
 }
 
 static void vmi_set_pte(pte_t *ptep, pte_t pte)
 {
        /* XXX because of set_pmd_pte, this can be called on PT or PD layers */
-       vmi_check_page_type(__pa(ptep) >> PAGE_SHIFT, VMI_PAGE_PTE | VMI_PAGE_PD);
        vmi_ops.set_pte(pte, ptep, VMI_PAGE_PT);
 }
 
 static void vmi_set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte)
 {
-       vmi_check_page_type(__pa(ptep) >> PAGE_SHIFT, VMI_PAGE_PTE);
        vmi_ops.set_pte(pte, ptep, vmi_flags_addr(mm, addr, VMI_PAGE_PT, 0));
 }
 
@@ -477,10 +364,8 @@ static void vmi_set_pmd(pmd_t *pmdp, pmd_t pmdval)
 {
 #ifdef CONFIG_X86_PAE
        const pte_t pte = { .pte = pmdval.pmd };
-       vmi_check_page_type(__pa(pmdp) >> PAGE_SHIFT, VMI_PAGE_PMD);
 #else
        const pte_t pte = { pmdval.pud.pgd.pgd };
-       vmi_check_page_type(__pa(pmdp) >> PAGE_SHIFT, VMI_PAGE_PGD);
 #endif
        vmi_ops.set_pte(pte, (pte_t *)pmdp, VMI_PAGE_PD);
 }
@@ -502,7 +387,6 @@ static void vmi_set_pte_atomic(pte_t *ptep, pte_t pteval)
 
 static void vmi_set_pte_present(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte)
 {
-       vmi_check_page_type(__pa(ptep) >> PAGE_SHIFT, VMI_PAGE_PTE);
        vmi_ops.set_pte(pte, ptep, vmi_flags_addr_defer(mm, addr, VMI_PAGE_PT, 1));
 }
 
@@ -510,21 +394,18 @@ static void vmi_set_pud(pud_t *pudp, pud_t pudval)
 {
        /* Um, eww */
        const pte_t pte = { .pte = pudval.pgd.pgd };
-       vmi_check_page_type(__pa(pudp) >> PAGE_SHIFT, VMI_PAGE_PGD);
        vmi_ops.set_pte(pte, (pte_t *)pudp, VMI_PAGE_PDP);
 }
 
 static void vmi_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
 {
        const pte_t pte = { .pte = 0 };
-       vmi_check_page_type(__pa(ptep) >> PAGE_SHIFT, VMI_PAGE_PTE);
        vmi_ops.set_pte(pte, ptep, vmi_flags_addr(mm, addr, VMI_PAGE_PT, 0));
 }
 
 static void vmi_pmd_clear(pmd_t *pmd)
 {
        const pte_t pte = { .pte = 0 };
-       vmi_check_page_type(__pa(pmd) >> PAGE_SHIFT, VMI_PAGE_PMD);
        vmi_ops.set_pte(pte, (pte_t *)pmd, VMI_PAGE_PD);
 }
 #endif
@@ -960,8 +841,6 @@ static inline int __init activate_vmi(void)
 
 void __init vmi_init(void)
 {
-       unsigned long flags;
-
        if (!vmi_rom)
                probe_vmi_rom();
        else
@@ -973,13 +852,21 @@ void __init vmi_init(void)
 
        reserve_top_address(-vmi_rom->virtual_top);
 
-       local_irq_save(flags);
-       activate_vmi();
-
 #ifdef CONFIG_X86_IO_APIC
        /* This is virtual hardware; timer routing is wired correctly */
        no_timer_check = 1;
 #endif
+}
+
+void vmi_activate(void)
+{
+       unsigned long flags;
+
+       if (!vmi_rom)
+               return;
+
+       local_irq_save(flags);
+       activate_vmi();
        local_irq_restore(flags & X86_EFLAGS_IF);
 }
 
index 0b8b6690a86d184959703177b9cb6011bfd605ca..ebf2f12900f5d999aa8f6a57322e34743dae2bfb 100644 (file)
@@ -128,7 +128,16 @@ static __always_inline void do_vgettimeofday(struct timeval * tv)
                        gettimeofday(tv,NULL);
                        return;
                }
+
+               /*
+                * Surround the RDTSC by barriers, to make sure it's not
+                * speculated to outside the seqlock critical section and
+                * does not cause time warps:
+                */
+               rdtsc_barrier();
                now = vread();
+               rdtsc_barrier();
+
                base = __vsyscall_gtod_data.clock.cycle_last;
                mask = __vsyscall_gtod_data.clock.mask;
                mult = __vsyscall_gtod_data.clock.mult;
index b13acb75e822e337aec4f8e8d6a094c24e30feb0..15c3e699918221487429508113173f692794a943 100644 (file)
@@ -310,7 +310,7 @@ static void __init setup_xstate_init(void)
 /*
  * Enable and initialize the xsave feature.
  */
-void __init xsave_cntxt_init(void)
+void __ref xsave_cntxt_init(void)
 {
        unsigned int eax, ebx, ecx, edx;
 
index ce3251ce5504e478ff65f936608245be3df7312e..b81125f0bdee21be384aeb058f3bb96d7fe767b7 100644 (file)
@@ -20,6 +20,8 @@ if VIRTUALIZATION
 config KVM
        tristate "Kernel-based Virtual Machine (KVM) support"
        depends on HAVE_KVM
+       # for device assignment:
+       depends on PCI
        select PREEMPT_NOTIFIERS
        select MMU_NOTIFIER
        select ANON_INODES
index 8772dc94682348aa518b1c424dd5e79e67894128..59ebd37ad79e25b658217e02dd5b57ab38f18c21 100644 (file)
@@ -548,8 +548,10 @@ struct kvm_pit *kvm_create_pit(struct kvm *kvm)
        mutex_lock(&kvm->lock);
        pit->irq_source_id = kvm_request_irq_source_id(kvm);
        mutex_unlock(&kvm->lock);
-       if (pit->irq_source_id < 0)
+       if (pit->irq_source_id < 0) {
+               kfree(pit);
                return NULL;
+       }
 
        mutex_init(&pit->pit_state.lock);
        mutex_lock(&pit->pit_state.lock);
index 2a5e64881d9bf2476bfef280ca309ffe086e52e1..410ddbc1aa2eb0fc2dfa45de560c829df364aa81 100644 (file)
@@ -314,7 +314,7 @@ static int mmu_topup_memory_caches(struct kvm_vcpu *vcpu)
        if (r)
                goto out;
        r = mmu_topup_memory_cache(&vcpu->arch.mmu_rmap_desc_cache,
-                                  rmap_desc_cache, 1);
+                                  rmap_desc_cache, 4);
        if (r)
                goto out;
        r = mmu_topup_memory_cache_page(&vcpu->arch.mmu_page_cache, 8);
@@ -1038,13 +1038,13 @@ static int kvm_sync_page(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp)
        }
 
        rmap_write_protect(vcpu->kvm, sp->gfn);
+       kvm_unlink_unsync_page(vcpu->kvm, sp);
        if (vcpu->arch.mmu.sync_page(vcpu, sp)) {
                kvm_mmu_zap_page(vcpu->kvm, sp);
                return 1;
        }
 
        kvm_mmu_flush_tlb(vcpu);
-       kvm_unlink_unsync_page(vcpu->kvm, sp);
        return 0;
 }
 
index 613ec9aa674afe06cd76c99b8ebc06eaa3f91f32..84eee43bbe742b005bd1825b0cdac24ba5efffbb 100644 (file)
@@ -331,6 +331,7 @@ static int FNAME(shadow_walk_entry)(struct kvm_shadow_walk *_sw,
                r = kvm_read_guest_atomic(vcpu->kvm, gw->pte_gpa[level - 2],
                                          &curr_pte, sizeof(curr_pte));
                if (r || curr_pte != gw->ptes[level - 2]) {
+                       kvm_mmu_put_page(shadow_page, sptep);
                        kvm_release_pfn_clean(sw->pfn);
                        sw->sptep = NULL;
                        return 1;
index 2643b430d83a0cb2f6519dbdaccd8e9a4cd480d7..a4018b01e1f973bad1619d6ca16e0e67e29aceab 100644 (file)
@@ -3149,7 +3149,9 @@ static void vmx_intr_assist(struct kvm_vcpu *vcpu)
 
        if (cpu_has_virtual_nmis()) {
                if (vcpu->arch.nmi_pending && !vcpu->arch.nmi_injected) {
-                       if (vmx_nmi_enabled(vcpu)) {
+                       if (vcpu->arch.interrupt.pending) {
+                               enable_nmi_window(vcpu);
+                       } else if (vmx_nmi_enabled(vcpu)) {
                                vcpu->arch.nmi_pending = false;
                                vcpu->arch.nmi_injected = true;
                        } else {
@@ -3564,7 +3566,8 @@ static int __init vmx_init(void)
                bypass_guest_pf = 0;
                kvm_mmu_set_base_ptes(VMX_EPT_READABLE_MASK |
                        VMX_EPT_WRITABLE_MASK |
-                       VMX_EPT_DEFAULT_MT << VMX_EPT_MT_EPTE_SHIFT);
+                       VMX_EPT_DEFAULT_MT << VMX_EPT_MT_EPTE_SHIFT |
+                       VMX_EPT_IGMT_BIT);
                kvm_mmu_set_mask_ptes(0ull, 0ull, 0ull, 0ull,
                                VMX_EPT_EXECUTABLE_MASK);
                kvm_enable_tdp();
index 3e010d21fdd71afdf65cdb086fb158632e391abf..ec5edc339da605c8d028927f3a57568c3e2c4463 100644 (file)
@@ -352,6 +352,7 @@ enum vmcs_field {
 #define VMX_EPT_READABLE_MASK                  0x1ull
 #define VMX_EPT_WRITABLE_MASK                  0x2ull
 #define VMX_EPT_EXECUTABLE_MASK                        0x4ull
+#define VMX_EPT_IGMT_BIT                       (1ull << 6)
 
 #define VMX_EPT_IDENTITY_PAGETABLE_ADDR                0xfffbc000ul
 
index 3c3b471ea496225e5a53029b92cfd5eeee658e43..3624a364b7f37ad8f7105956c15f4e1385dd66e8 100644 (file)
@@ -17,6 +17,7 @@
 #include <asm/bigsmp/apic.h>
 #include <asm/bigsmp/ipi.h>
 #include <asm/mach-default/mach_mpparse.h>
+#include <asm/mach-default/mach_wakecpu.h>
 
 static int dmi_bigsmp; /* can be set by dmi scanners */
 
index 9e835a11a13a7cba9c16f2de4e5db0e54d9ecbc5..e63a4a76d8cdd2a966aec1299d941b5e5fb7196b 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/mach-default/mach_apic.h>
 #include <asm/mach-default/mach_ipi.h>
 #include <asm/mach-default/mach_mpparse.h>
+#include <asm/mach-default/mach_wakecpu.h>
 
 /* should be called last. */
 static int probe_default(void)
index 28459cab3ddb5fdae0d560e5f766b141412e00bb..7b4e6d0d169001480eebb37c8b4bc3a32d1c6333 100644 (file)
 #include <asm/es7000/apic.h>
 #include <asm/es7000/ipi.h>
 #include <asm/es7000/mpparse.h>
-#include <asm/es7000/wakecpu.h>
+#include <asm/mach-default/mach_wakecpu.h>
+
+void __init es7000_update_genapic_to_cluster(void)
+{
+       genapic->target_cpus = target_cpus_cluster;
+       genapic->int_delivery_mode = INT_DELIVERY_MODE_CLUSTER;
+       genapic->int_dest_mode = INT_DEST_MODE_CLUSTER;
+       genapic->no_balance_irq = NO_BALANCE_IRQ_CLUSTER;
+
+       genapic->init_apic_ldr = init_apic_ldr_cluster;
+
+       genapic->cpu_mask_to_apicid = cpu_mask_to_apicid_cluster;
+}
 
 static int probe_es7000(void)
 {
index 5a7e4619e1c47589fc6745d5843c7ef743170318..c346d9d0226f313129917b091e4a4e94bcde6105 100644 (file)
@@ -15,6 +15,7 @@
 #include <asm/mpspec.h>
 #include <asm/apicdef.h>
 #include <asm/genapic.h>
+#include <asm/setup.h>
 
 extern struct genapic apic_numaq;
 extern struct genapic apic_summit;
@@ -57,6 +58,9 @@ static int __init parse_apic(char *arg)
                }
        }
 
+       if (x86_quirks->update_genapic)
+               x86_quirks->update_genapic();
+
        /* Parsed again by __setup for debug/verbose */
        return 0;
 }
@@ -72,12 +76,15 @@ void __init generic_bigsmp_probe(void)
         * - we find more than 8 CPUs in acpi LAPIC listing with xAPIC support
         */
 
-       if (!cmdline_apic && genapic == &apic_default)
+       if (!cmdline_apic && genapic == &apic_default) {
                if (apic_bigsmp.probe()) {
                        genapic = &apic_bigsmp;
+                       if (x86_quirks->update_genapic)
+                               x86_quirks->update_genapic();
                        printk(KERN_INFO "Overriding APIC driver with %s\n",
                               genapic->name);
                }
+       }
 #endif
 }
 
@@ -94,6 +101,9 @@ void __init generic_apic_probe(void)
                /* Not visible without early console */
                if (!apic_probe[i])
                        panic("Didn't find an APIC driver");
+
+               if (x86_quirks->update_genapic)
+                       x86_quirks->update_genapic();
        }
        printk(KERN_INFO "Using APIC driver %s\n", genapic->name);
 }
@@ -108,6 +118,8 @@ int __init mps_oem_check(struct mp_config_table *mpc, char *oem,
                if (apic_probe[i]->mps_oem_check(mpc, oem, productid)) {
                        if (!cmdline_apic) {
                                genapic = apic_probe[i];
+                               if (x86_quirks->update_genapic)
+                                       x86_quirks->update_genapic();
                                printk(KERN_INFO "Switched to APIC driver `%s'.\n",
                                       genapic->name);
                        }
@@ -124,6 +136,8 @@ int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
                if (apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id)) {
                        if (!cmdline_apic) {
                                genapic = apic_probe[i];
+                               if (x86_quirks->update_genapic)
+                                       x86_quirks->update_genapic();
                                printk(KERN_INFO "Switched to APIC driver `%s'.\n",
                                       genapic->name);
                        }
index 6272b5e69da62b28f660105d9a8788e4944432b3..2c6d234e0009ccd5b2ca50db816f599a5cd133b3 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/summit/apic.h>
 #include <asm/summit/ipi.h>
 #include <asm/summit/mpparse.h>
+#include <asm/mach-default/mach_wakecpu.h>
 
 static int probe_summit(void)
 {
index 0e331652681e4a247122f2381861b0403f88b93c..52145007bd7efb8e99a9516ddeb09af6ea1e445b 100644 (file)
@@ -7,6 +7,7 @@
  * This file provides all the same external entries as smp.c but uses
  * the voyager hal to provide the functionality
  */
+#include <linux/cpu.h>
 #include <linux/module.h>
 #include <linux/mm.h>
 #include <linux/kernel_stat.h>
@@ -1790,6 +1791,17 @@ void __init smp_setup_processor_id(void)
        x86_write_percpu(cpu_number, hard_smp_processor_id());
 }
 
+static void voyager_send_call_func(cpumask_t callmask)
+{
+       __u32 mask = cpus_addr(callmask)[0] & ~(1 << smp_processor_id());
+       send_CPI(mask, VIC_CALL_FUNCTION_CPI);
+}
+
+static void voyager_send_call_func_single(int cpu)
+{
+       send_CPI(1 << cpu, VIC_CALL_FUNCTION_SINGLE_CPI);
+}
+
 struct smp_ops smp_ops = {
        .smp_prepare_boot_cpu = voyager_smp_prepare_boot_cpu,
        .smp_prepare_cpus = voyager_smp_prepare_cpus,
@@ -1799,6 +1811,6 @@ struct smp_ops smp_ops = {
        .smp_send_stop = voyager_smp_send_stop,
        .smp_send_reschedule = voyager_smp_send_reschedule,
 
-       .send_call_func_ipi = native_send_call_func_ipi,
-       .send_call_func_single_ipi = native_send_call_func_single_ipi,
+       .send_call_func_ipi = voyager_send_call_func,
+       .send_call_func_single_ipi = voyager_send_call_func_single,
 };
index 31e8730fa2463214f36c2f6b3df9d0f75f6be346..20ef272c412cc9ca113b0caaab17121626c1486f 100644 (file)
@@ -413,6 +413,7 @@ static noinline void pgtable_bad(unsigned long address, struct pt_regs *regs,
                                 unsigned long error_code)
 {
        unsigned long flags = oops_begin();
+       int sig = SIGKILL;
        struct task_struct *tsk;
 
        printk(KERN_ALERT "%s: Corrupted page table at address %lx\n",
@@ -423,8 +424,8 @@ static noinline void pgtable_bad(unsigned long address, struct pt_regs *regs,
        tsk->thread.trap_no = 14;
        tsk->thread.error_code = error_code;
        if (__die("Bad pagetable", regs, error_code))
-               regs = NULL;
-       oops_end(flags, regs, SIGKILL);
+               sig = 0;
+       oops_end(flags, regs, sig);
 }
 #endif
 
@@ -590,6 +591,7 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code)
        int fault;
 #ifdef CONFIG_X86_64
        unsigned long flags;
+       int sig;
 #endif
 
        tsk = current;
@@ -849,11 +851,12 @@ no_context:
        bust_spinlocks(0);
        do_exit(SIGKILL);
 #else
+       sig = SIGKILL;
        if (__die("Oops", regs, error_code))
-               regs = NULL;
+               sig = 0;
        /* Executive summary in case the body of the oops scrolled away */
        printk(KERN_EMERG "CR2: %016lx\n", address);
-       oops_end(flags, regs, SIGKILL);
+       oops_end(flags, regs, sig);
 #endif
 
 /*
index c483f424207938cc16ff3a2eb6b92eee5175e6b5..800e1d94c1b5580e627ddb0a2ef81cfd10d031cd 100644 (file)
@@ -67,7 +67,7 @@ static unsigned long __meminitdata table_top;
 
 static int __initdata after_init_bootmem;
 
-static __init void *alloc_low_page(unsigned long *phys)
+static __init void *alloc_low_page(void)
 {
        unsigned long pfn = table_end++;
        void *adr;
@@ -77,7 +77,6 @@ static __init void *alloc_low_page(unsigned long *phys)
 
        adr = __va(pfn * PAGE_SIZE);
        memset(adr, 0, PAGE_SIZE);
-       *phys  = pfn * PAGE_SIZE;
        return adr;
 }
 
@@ -92,16 +91,17 @@ static pmd_t * __init one_md_table_init(pgd_t *pgd)
        pmd_t *pmd_table;
 
 #ifdef CONFIG_X86_PAE
-       unsigned long phys;
        if (!(pgd_val(*pgd) & _PAGE_PRESENT)) {
                if (after_init_bootmem)
                        pmd_table = (pmd_t *)alloc_bootmem_low_pages(PAGE_SIZE);
                else
-                       pmd_table = (pmd_t *)alloc_low_page(&phys);
+                       pmd_table = (pmd_t *)alloc_low_page();
                paravirt_alloc_pmd(&init_mm, __pa(pmd_table) >> PAGE_SHIFT);
                set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT));
                pud = pud_offset(pgd, 0);
                BUG_ON(pmd_table != pmd_offset(pud, 0));
+
+               return pmd_table;
        }
 #endif
        pud = pud_offset(pgd, 0);
@@ -126,10 +126,8 @@ static pte_t * __init one_page_table_init(pmd_t *pmd)
                        if (!page_table)
                                page_table =
                                (pte_t *)alloc_bootmem_low_pages(PAGE_SIZE);
-               } else {
-                       unsigned long phys;
-                       page_table = (pte_t *)alloc_low_page(&phys);
-               }
+               } else
+                       page_table = (pte_t *)alloc_low_page();
 
                paravirt_alloc_pte(&init_mm, __pa(page_table) >> PAGE_SHIFT);
                set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
@@ -969,8 +967,6 @@ void __init mem_init(void)
        int codesize, reservedpages, datasize, initsize;
        int tmp;
 
-       start_periodic_check_for_corruption();
-
 #ifdef CONFIG_FLATMEM
        BUG_ON(!mem_map);
 #endif
@@ -1040,11 +1036,25 @@ void __init mem_init(void)
                (unsigned long)&_text, (unsigned long)&_etext,
                ((unsigned long)&_etext - (unsigned long)&_text) >> 10);
 
+       /*
+        * Check boundaries twice: Some fundamental inconsistencies can
+        * be detected at build time already.
+        */
+#define __FIXADDR_TOP (-PAGE_SIZE)
+#ifdef CONFIG_HIGHMEM
+       BUILD_BUG_ON(PKMAP_BASE + LAST_PKMAP*PAGE_SIZE  > FIXADDR_START);
+       BUILD_BUG_ON(VMALLOC_END                        > PKMAP_BASE);
+#endif
+#define high_memory (-128UL << 20)
+       BUILD_BUG_ON(VMALLOC_START                      >= VMALLOC_END);
+#undef high_memory
+#undef __FIXADDR_TOP
+
 #ifdef CONFIG_HIGHMEM
        BUG_ON(PKMAP_BASE + LAST_PKMAP*PAGE_SIZE        > FIXADDR_START);
        BUG_ON(VMALLOC_END                              > PKMAP_BASE);
 #endif
-       BUG_ON(VMALLOC_START                            > VMALLOC_END);
+       BUG_ON(VMALLOC_START                            >= VMALLOC_END);
        BUG_ON((unsigned long)high_memory               > VMALLOC_START);
 
        if (boot_cpu_data.wp_works_ok < 0)
index 9db01db6e3cdf4cb0e11444d49e4d598be280b55..9f7a0d24d42a93b47e36d3ce40c70876f5d09e16 100644 (file)
@@ -902,8 +902,6 @@ void __init mem_init(void)
        long codesize, reservedpages, datasize, initsize;
        unsigned long absent_pages;
 
-       start_periodic_check_for_corruption();
-
        pci_iommu_alloc();
 
        /* clear_bss() already clear the empty_zero_page */
index d4c4307ff3e049f1454c3629fb2989f63395ae68..bd85d42819e1eadad218a266cdade7e00bf7659a 100644 (file)
@@ -223,7 +223,8 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
         * Check if the request spans more than any BAR in the iomem resource
         * tree.
         */
-       WARN_ON(iomem_map_sanity_check(phys_addr, size));
+       WARN_ONCE(iomem_map_sanity_check(phys_addr, size),
+                 KERN_INFO "Info: mapping multiple BARs. Your kernel is fine.");
 
        /*
         * Don't allow anybody to remap normal RAM that we're using..
index 847c164725f4661c74ff52d526b46367f2ffb17e..8518c678d83f92377e49df44244ebe57ad17bb71 100644 (file)
@@ -222,6 +222,41 @@ static void __init remap_numa_kva(void)
        }
 }
 
+#ifdef CONFIG_HIBERNATION
+/**
+ * resume_map_numa_kva - add KVA mapping to the temporary page tables created
+ *                       during resume from hibernation
+ * @pgd_base - temporary resume page directory
+ */
+void resume_map_numa_kva(pgd_t *pgd_base)
+{
+       int node;
+
+       for_each_online_node(node) {
+               unsigned long start_va, start_pfn, size, pfn;
+
+               start_va = (unsigned long)node_remap_start_vaddr[node];
+               start_pfn = node_remap_start_pfn[node];
+               size = node_remap_size[node];
+
+               printk(KERN_DEBUG "%s: node %d\n", __FUNCTION__, node);
+
+               for (pfn = 0; pfn < size; pfn += PTRS_PER_PTE) {
+                       unsigned long vaddr = start_va + (pfn << PAGE_SHIFT);
+                       pgd_t *pgd = pgd_base + pgd_index(vaddr);
+                       pud_t *pud = pud_offset(pgd, vaddr);
+                       pmd_t *pmd = pmd_offset(pud, vaddr);
+
+                       set_pmd(pmd, pfn_pmd(start_pfn + pfn,
+                                               PAGE_KERNEL_LARGE_EXEC));
+
+                       printk(KERN_DEBUG "%s: %08lx -> pfn %08lx\n",
+                               __FUNCTION__, vaddr, start_pfn + pfn);
+               }
+       }
+}
+#endif
+
 static unsigned long calculate_numa_remap_pages(void)
 {
        int nid;
index eb1bf000d12e9b1aa1769284e263d43593095183..541bcc944a5b8c70450cb53a8a1a2b2a3ae31ddf 100644 (file)
@@ -596,6 +596,242 @@ void unmap_devmem(unsigned long pfn, unsigned long size, pgprot_t vma_prot)
        free_memtype(addr, addr + size);
 }
 
+/*
+ * Internal interface to reserve a range of physical memory with prot.
+ * Reserved non RAM regions only and after successful reserve_memtype,
+ * this func also keeps identity mapping (if any) in sync with this new prot.
+ */
+static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t vma_prot)
+{
+       int is_ram = 0;
+       int id_sz, ret;
+       unsigned long flags;
+       unsigned long want_flags = (pgprot_val(vma_prot) & _PAGE_CACHE_MASK);
+
+       is_ram = pagerange_is_ram(paddr, paddr + size);
+
+       if (is_ram != 0) {
+               /*
+                * For mapping RAM pages, drivers need to call
+                * set_memory_[uc|wc|wb] directly, for reserve and free, before
+                * setting up the PTE.
+                */
+               WARN_ON_ONCE(1);
+               return 0;
+       }
+
+       ret = reserve_memtype(paddr, paddr + size, want_flags, &flags);
+       if (ret)
+               return ret;
+
+       if (flags != want_flags) {
+               free_memtype(paddr, paddr + size);
+               printk(KERN_ERR
+               "%s:%d map pfn expected mapping type %s for %Lx-%Lx, got %s\n",
+                       current->comm, current->pid,
+                       cattr_name(want_flags),
+                       (unsigned long long)paddr,
+                       (unsigned long long)(paddr + size),
+                       cattr_name(flags));
+               return -EINVAL;
+       }
+
+       /* Need to keep identity mapping in sync */
+       if (paddr >= __pa(high_memory))
+               return 0;
+
+       id_sz = (__pa(high_memory) < paddr + size) ?
+                               __pa(high_memory) - paddr :
+                               size;
+
+       if (ioremap_change_attr((unsigned long)__va(paddr), id_sz, flags) < 0) {
+               free_memtype(paddr, paddr + size);
+               printk(KERN_ERR
+                       "%s:%d reserve_pfn_range ioremap_change_attr failed %s "
+                       "for %Lx-%Lx\n",
+                       current->comm, current->pid,
+                       cattr_name(flags),
+                       (unsigned long long)paddr,
+                       (unsigned long long)(paddr + size));
+               return -EINVAL;
+       }
+       return 0;
+}
+
+/*
+ * Internal interface to free a range of physical memory.
+ * Frees non RAM regions only.
+ */
+static void free_pfn_range(u64 paddr, unsigned long size)
+{
+       int is_ram;
+
+       is_ram = pagerange_is_ram(paddr, paddr + size);
+       if (is_ram == 0)
+               free_memtype(paddr, paddr + size);
+}
+
+/*
+ * track_pfn_vma_copy is called when vma that is covering the pfnmap gets
+ * copied through copy_page_range().
+ *
+ * If the vma has a linear pfn mapping for the entire range, we get the prot
+ * from pte and reserve the entire vma range with single reserve_pfn_range call.
+ * Otherwise, we reserve the entire vma range, my ging through the PTEs page
+ * by page to get physical address and protection.
+ */
+int track_pfn_vma_copy(struct vm_area_struct *vma)
+{
+       int retval = 0;
+       unsigned long i, j;
+       u64 paddr;
+       unsigned long prot;
+       unsigned long vma_start = vma->vm_start;
+       unsigned long vma_end = vma->vm_end;
+       unsigned long vma_size = vma_end - vma_start;
+
+       if (!pat_enabled)
+               return 0;
+
+       if (is_linear_pfn_mapping(vma)) {
+               /*
+                * reserve the whole chunk covered by vma. We need the
+                * starting address and protection from pte.
+                */
+               if (follow_phys(vma, vma_start, 0, &prot, &paddr)) {
+                       WARN_ON_ONCE(1);
+                       return -EINVAL;
+               }
+               return reserve_pfn_range(paddr, vma_size, __pgprot(prot));
+       }
+
+       /* reserve entire vma page by page, using pfn and prot from pte */
+       for (i = 0; i < vma_size; i += PAGE_SIZE) {
+               if (follow_phys(vma, vma_start + i, 0, &prot, &paddr))
+                       continue;
+
+               retval = reserve_pfn_range(paddr, PAGE_SIZE, __pgprot(prot));
+               if (retval)
+                       goto cleanup_ret;
+       }
+       return 0;
+
+cleanup_ret:
+       /* Reserve error: Cleanup partial reservation and return error */
+       for (j = 0; j < i; j += PAGE_SIZE) {
+               if (follow_phys(vma, vma_start + j, 0, &prot, &paddr))
+                       continue;
+
+               free_pfn_range(paddr, PAGE_SIZE);
+       }
+
+       return retval;
+}
+
+/*
+ * track_pfn_vma_new is called when a _new_ pfn mapping is being established
+ * for physical range indicated by pfn and size.
+ *
+ * prot is passed in as a parameter for the new mapping. If the vma has a
+ * linear pfn mapping for the entire range reserve the entire vma range with
+ * single reserve_pfn_range call.
+ * Otherwise, we look t the pfn and size and reserve only the specified range
+ * page by page.
+ *
+ * Note that this function can be called with caller trying to map only a
+ * subrange/page inside the vma.
+ */
+int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t prot,
+                       unsigned long pfn, unsigned long size)
+{
+       int retval = 0;
+       unsigned long i, j;
+       u64 base_paddr;
+       u64 paddr;
+       unsigned long vma_start = vma->vm_start;
+       unsigned long vma_end = vma->vm_end;
+       unsigned long vma_size = vma_end - vma_start;
+
+       if (!pat_enabled)
+               return 0;
+
+       if (is_linear_pfn_mapping(vma)) {
+               /* reserve the whole chunk starting from vm_pgoff */
+               paddr = (u64)vma->vm_pgoff << PAGE_SHIFT;
+               return reserve_pfn_range(paddr, vma_size, prot);
+       }
+
+       /* reserve page by page using pfn and size */
+       base_paddr = (u64)pfn << PAGE_SHIFT;
+       for (i = 0; i < size; i += PAGE_SIZE) {
+               paddr = base_paddr + i;
+               retval = reserve_pfn_range(paddr, PAGE_SIZE, prot);
+               if (retval)
+                       goto cleanup_ret;
+       }
+       return 0;
+
+cleanup_ret:
+       /* Reserve error: Cleanup partial reservation and return error */
+       for (j = 0; j < i; j += PAGE_SIZE) {
+               paddr = base_paddr + j;
+               free_pfn_range(paddr, PAGE_SIZE);
+       }
+
+       return retval;
+}
+
+/*
+ * untrack_pfn_vma is called while unmapping a pfnmap for a region.
+ * untrack can be called for a specific region indicated by pfn and size or
+ * can be for the entire vma (in which case size can be zero).
+ */
+void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn,
+                       unsigned long size)
+{
+       unsigned long i;
+       u64 paddr;
+       unsigned long prot;
+       unsigned long vma_start = vma->vm_start;
+       unsigned long vma_end = vma->vm_end;
+       unsigned long vma_size = vma_end - vma_start;
+
+       if (!pat_enabled)
+               return;
+
+       if (is_linear_pfn_mapping(vma)) {
+               /* free the whole chunk starting from vm_pgoff */
+               paddr = (u64)vma->vm_pgoff << PAGE_SHIFT;
+               free_pfn_range(paddr, vma_size);
+               return;
+       }
+
+       if (size != 0 && size != vma_size) {
+               /* free page by page, using pfn and size */
+               paddr = (u64)pfn << PAGE_SHIFT;
+               for (i = 0; i < size; i += PAGE_SIZE) {
+                       paddr = paddr + i;
+                       free_pfn_range(paddr, PAGE_SIZE);
+               }
+       } else {
+               /* free entire vma, page by page, using the pfn from pte */
+               for (i = 0; i < vma_size; i += PAGE_SIZE) {
+                       if (follow_phys(vma, vma_start + i, 0, &prot, &paddr))
+                               continue;
+
+                       free_pfn_range(paddr, PAGE_SIZE);
+               }
+       }
+}
+
+pgprot_t pgprot_writecombine(pgprot_t prot)
+{
+       if (pat_enabled)
+               return __pgprot(pgprot_val(prot) | _PAGE_CACHE_WC);
+       else
+               return pgprot_noncached(prot);
+}
+
 #if defined(CONFIG_DEBUG_FS) && defined(CONFIG_X86_PAT)
 
 /* get Nth element of the linked list */
index 022cd41ea9b4106e5884277096e80e9088a7c7a9..202864ad49a7e5bf2a6574922d7cd938dd023fd9 100644 (file)
@@ -401,14 +401,13 @@ static int __init ppro_init(char **cpu_type)
                *cpu_type = "i386/pii";
                break;
        case 6 ... 8:
+       case 10 ... 11:
                *cpu_type = "i386/piii";
                break;
        case 9:
+       case 13:
                *cpu_type = "i386/p6_mobile";
                break;
-       case 10 ... 13:
-               *cpu_type = "i386/p6";
-               break;
        case 14:
                *cpu_type = "i386/core";
                break;
index 3f1b81a83e2e5be2ebd1cabde2a66b71ccd20306..e9f80c744cf3409d72f77dd9044ec1dd90534609 100644 (file)
@@ -69,7 +69,7 @@ static void ppro_setup_ctrs(struct op_msrs const * const msrs)
        int i;
 
        if (!reset_value) {
-               reset_value = kmalloc(sizeof(unsigned) * num_counters,
+               reset_value = kmalloc(sizeof(reset_value[0]) * num_counters,
                                        GFP_ATOMIC);
                if (!reset_value)
                        return;
@@ -156,6 +156,8 @@ static void ppro_start(struct op_msrs const * const msrs)
        unsigned int low, high;
        int i;
 
+       if (!reset_value)
+               return;
        for (i = 0; i < num_counters; ++i) {
                if (reset_value[i]) {
                        CTRL_READ(low, high, msrs, i);
@@ -171,6 +173,8 @@ static void ppro_stop(struct op_msrs const * const msrs)
        unsigned int low, high;
        int i;
 
+       if (!reset_value)
+               return;
        for (i = 0; i < num_counters; ++i) {
                if (!reset_value[i])
                        continue;
index b67732bbb85a3a562063c36e579ee769ccdf86c1..bb1a01f089e29c817432907a820ca7a06f727347 100644 (file)
@@ -23,6 +23,12 @@ unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
 unsigned int pci_early_dump_regs;
 static int pci_bf_sort;
 int pci_routeirq;
+int noioapicquirk;
+#ifdef CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS
+int noioapicreroute = 0;
+#else
+int noioapicreroute = 1;
+#endif
 int pcibios_last_bus = -1;
 unsigned long pirq_table_addr;
 struct pci_bus *pci_root_bus;
@@ -519,6 +525,17 @@ char * __devinit  pcibios_setup(char *str)
        } else if (!strcmp(str, "skip_isa_align")) {
                pci_probe |= PCI_CAN_SKIP_ISA_ALIGN;
                return NULL;
+       } else if (!strcmp(str, "noioapicquirk")) {
+               noioapicquirk = 1;
+               return NULL;
+       } else if (!strcmp(str, "ioapicreroute")) {
+               if (noioapicreroute != -1)
+                       noioapicreroute = 0;
+               return NULL;
+       } else if (!strcmp(str, "noioapicreroute")) {
+               if (noioapicreroute != -1)
+                       noioapicreroute = 1;
+               return NULL;
        }
        return str;
 }
index 9915293500fb69ebdae0b8d80b69155f180f1274..9a5af6c8fbe9fc445fdca3358b90666c9ecae7bb 100644 (file)
@@ -173,7 +173,7 @@ static int pci_conf2_write(unsigned int seg, unsigned int bus,
 
 #undef PCI_CONF2_ADDRESS
 
-static struct pci_raw_ops pci_direct_conf2 = {
+struct pci_raw_ops pci_direct_conf2 = {
        .read =         pci_conf2_read,
        .write =        pci_conf2_write,
 };
@@ -289,6 +289,7 @@ int __init pci_direct_probe(void)
 
        if (pci_check_type1()) {
                raw_pci_ops = &pci_direct_conf1;
+               port_cf9_safe = true;
                return 1;
        }
        release_resource(region);
@@ -305,6 +306,7 @@ int __init pci_direct_probe(void)
 
        if (pci_check_type2()) {
                raw_pci_ops = &pci_direct_conf2;
+               port_cf9_safe = true;
                return 2;
        }
 
index 3c27a809393b59051aaa794ad33b2310fd70402c..2051dc96b8e94aee2b63af14d3d2a8a9486cfdcd 100644 (file)
@@ -496,21 +496,24 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SIEMENS, 0x0015,
                          pci_siemens_interrupt_controller);
 
 /*
- * Regular PCI devices have 256 bytes, but AMD Family 10h Opteron ext config
- * have 4096 bytes.  Even if the device is capable, that doesn't mean we can
- * access it.  Maybe we don't have a way to generate extended config space
- * accesses.   So check it
+ * Regular PCI devices have 256 bytes, but AMD Family 10h/11h CPUs have
+ * 4096 bytes configuration space for each function of their processor
+ * configuration space.
  */
-static void fam10h_pci_cfg_space_size(struct pci_dev *dev)
+static void amd_cpu_pci_cfg_space_size(struct pci_dev *dev)
 {
        dev->cfg_size = pci_cfg_space_size_ext(dev);
 }
-
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1200, fam10h_pci_cfg_space_size);
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1201, fam10h_pci_cfg_space_size);
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1202, fam10h_pci_cfg_space_size);
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1203, fam10h_pci_cfg_space_size);
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1204, fam10h_pci_cfg_space_size);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1200, amd_cpu_pci_cfg_space_size);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1201, amd_cpu_pci_cfg_space_size);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1202, amd_cpu_pci_cfg_space_size);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1203, amd_cpu_pci_cfg_space_size);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1204, amd_cpu_pci_cfg_space_size);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1300, amd_cpu_pci_cfg_space_size);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1301, amd_cpu_pci_cfg_space_size);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1302, amd_cpu_pci_cfg_space_size);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1303, amd_cpu_pci_cfg_space_size);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1304, amd_cpu_pci_cfg_space_size);
 
 /*
  * SB600: Disable BAR1 on device 14.0 to avoid HPET resources from
index 15b9cf6be729c0c7cddee3ff54d1ce9809f32d58..1959018aac025ea3a38048973e6cc7a107396684 100644 (file)
@@ -96,6 +96,7 @@ extern struct pci_raw_ops *raw_pci_ops;
 extern struct pci_raw_ops *raw_pci_ext_ops;
 
 extern struct pci_raw_ops pci_direct_conf1;
+extern bool port_cf9_safe;
 
 /* arch_initcall level */
 extern int pci_direct_probe(void);
index f2b6e3f11bfc58214dcbccdd87acdaa6a5d4b9a8..81197c62d5b3f8240b7f261cf2efee90ea110fb2 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/system.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
+#include <asm/mmzone.h>
 
 /* Defined in hibernate_asm_32.S */
 extern int restore_image(void);
@@ -127,6 +128,9 @@ static int resume_physical_mapping_init(pgd_t *pgd_base)
                        }
                }
        }
+
+       resume_map_numa_kva(pgd_base);
+
        return 0;
 }
 
index 5e4686d70f629de22f81adc96b658ab06216be24..bea215230b20cdf4fc41ac5fd4e060dcbaec4ec1 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/console.h>
 
 #include <xen/interface/xen.h>
+#include <xen/interface/version.h>
 #include <xen/interface/physdev.h>
 #include <xen/interface/vcpu.h>
 #include <xen/features.h>
@@ -793,7 +794,7 @@ static int xen_write_msr_safe(unsigned int msr, unsigned low, unsigned high)
 
        ret = 0;
 
-       switch(msr) {
+       switch (msr) {
 #ifdef CONFIG_X86_64
                unsigned which;
                u64 base;
@@ -1453,7 +1454,7 @@ static __init void xen_map_identity_early(pmd_t *pmd, unsigned long max_pfn)
 
        ident_pte = 0;
        pfn = 0;
-       for(pmdidx = 0; pmdidx < PTRS_PER_PMD && pfn < max_pfn; pmdidx++) {
+       for (pmdidx = 0; pmdidx < PTRS_PER_PMD && pfn < max_pfn; pmdidx++) {
                pte_t *pte_page;
 
                /* Reuse or allocate a page of ptes */
@@ -1471,7 +1472,7 @@ static __init void xen_map_identity_early(pmd_t *pmd, unsigned long max_pfn)
                }
 
                /* Install mappings */
-               for(pteidx = 0; pteidx < PTRS_PER_PTE; pteidx++, pfn++) {
+               for (pteidx = 0; pteidx < PTRS_PER_PTE; pteidx++, pfn++) {
                        pte_t pte;
 
                        if (pfn > max_pfn_mapped)
@@ -1485,7 +1486,7 @@ static __init void xen_map_identity_early(pmd_t *pmd, unsigned long max_pfn)
                }
        }
 
-       for(pteidx = 0; pteidx < ident_pte; pteidx += PTRS_PER_PTE)
+       for (pteidx = 0; pteidx < ident_pte; pteidx += PTRS_PER_PTE)
                set_page_prot(&level1_ident_pgt[pteidx], PAGE_KERNEL_RO);
 
        set_page_prot(pmd, PAGE_KERNEL_RO);
@@ -1499,7 +1500,7 @@ static void convert_pfn_mfn(void *v)
 
        /* All levels are converted the same way, so just treat them
           as ptes. */
-       for(i = 0; i < PTRS_PER_PTE; i++)
+       for (i = 0; i < PTRS_PER_PTE; i++)
                pte[i] = xen_make_pte(pte[i].pte);
 }
 
@@ -1514,7 +1515,8 @@ static void convert_pfn_mfn(void *v)
  * of the physical mapping once some sort of allocator has been set
  * up.
  */
-static __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
+static __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd,
+                                               unsigned long max_pfn)
 {
        pud_t *l3;
        pmd_t *l2;
@@ -1577,7 +1579,8 @@ static __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pf
 #else  /* !CONFIG_X86_64 */
 static pmd_t level2_kernel_pgt[PTRS_PER_PMD] __page_aligned_bss;
 
-static __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
+static __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd,
+                                               unsigned long max_pfn)
 {
        pmd_t *kernel_pmd;
 
index 688936044dc95cdac8d6ce79e3ee10f39e898178..773d68d3e9128eba414a31ae3fa3dbc989033d72 100644 (file)
@@ -154,13 +154,13 @@ void xen_setup_mfn_list_list(void)
 {
        unsigned pfn, idx;
 
-       for(pfn = 0; pfn < MAX_DOMAIN_PAGES; pfn += P2M_ENTRIES_PER_PAGE) {
+       for (pfn = 0; pfn < MAX_DOMAIN_PAGES; pfn += P2M_ENTRIES_PER_PAGE) {
                unsigned topidx = p2m_top_index(pfn);
 
                p2m_top_mfn[topidx] = virt_to_mfn(p2m_top[topidx]);
        }
 
-       for(idx = 0; idx < ARRAY_SIZE(p2m_top_mfn_list); idx++) {
+       for (idx = 0; idx < ARRAY_SIZE(p2m_top_mfn_list); idx++) {
                unsigned topidx = idx * P2M_ENTRIES_PER_PAGE;
                p2m_top_mfn_list[idx] = virt_to_mfn(&p2m_top_mfn[topidx]);
        }
@@ -179,7 +179,7 @@ void __init xen_build_dynamic_phys_to_machine(void)
        unsigned long max_pfn = min(MAX_DOMAIN_PAGES, xen_start_info->nr_pages);
        unsigned pfn;
 
-       for(pfn = 0; pfn < max_pfn; pfn += P2M_ENTRIES_PER_PAGE) {
+       for (pfn = 0; pfn < max_pfn; pfn += P2M_ENTRIES_PER_PAGE) {
                unsigned topidx = p2m_top_index(pfn);
 
                p2m_top[topidx] = &mfn_list[pfn];
@@ -207,7 +207,7 @@ static void alloc_p2m(unsigned long **pp, unsigned long *mfnp)
        p = (void *)__get_free_page(GFP_KERNEL | __GFP_NOFAIL);
        BUG_ON(p == NULL);
 
-       for(i = 0; i < P2M_ENTRIES_PER_PAGE; i++)
+       for (i = 0; i < P2M_ENTRIES_PER_PAGE; i++)
                p[i] = INVALID_P2M_ENTRY;
 
        if (cmpxchg(pp, p2m_missing, p) != p2m_missing)
@@ -407,7 +407,8 @@ out:
                preempt_enable();
 }
 
-pte_t xen_ptep_modify_prot_start(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
+pte_t xen_ptep_modify_prot_start(struct mm_struct *mm,
+                                unsigned long addr, pte_t *ptep)
 {
        /* Just return the pte as-is.  We preserve the bits on commit */
        return *ptep;
@@ -661,12 +662,11 @@ void xen_set_pgd(pgd_t *ptr, pgd_t val)
  * For 64-bit, we must skip the Xen hole in the middle of the address
  * space, just after the big x86-64 virtual hole.
  */
-static int xen_pgd_walk(struct mm_struct *mm,
-                       int (*func)(struct mm_struct *mm, struct page *,
-                                   enum pt_level),
-                       unsigned long limit)
+static int __xen_pgd_walk(struct mm_struct *mm, pgd_t *pgd,
+                         int (*func)(struct mm_struct *mm, struct page *,
+                                     enum pt_level),
+                         unsigned long limit)
 {
-       pgd_t *pgd = mm->pgd;
        int flush = 0;
        unsigned hole_low, hole_high;
        unsigned pgdidx_limit, pudidx_limit, pmdidx_limit;
@@ -753,6 +753,14 @@ out:
        return flush;
 }
 
+static int xen_pgd_walk(struct mm_struct *mm,
+                       int (*func)(struct mm_struct *mm, struct page *,
+                                   enum pt_level),
+                       unsigned long limit)
+{
+       return __xen_pgd_walk(mm, mm->pgd, func, limit);
+}
+
 /* If we're using split pte locks, then take the page's lock and
    return a pointer to it.  Otherwise return NULL. */
 static spinlock_t *xen_pte_lock(struct page *page, struct mm_struct *mm)
@@ -854,7 +862,7 @@ static void __xen_pgd_pin(struct mm_struct *mm, pgd_t *pgd)
 
        xen_mc_batch();
 
-        if (xen_pgd_walk(mm, xen_pin_page, USER_LIMIT)) {
+       if (__xen_pgd_walk(mm, pgd, xen_pin_page, USER_LIMIT)) {
                /* re-enable interrupts for flushing */
                xen_mc_issue(0);
 
@@ -871,7 +879,8 @@ static void __xen_pgd_pin(struct mm_struct *mm, pgd_t *pgd)
 
                if (user_pgd) {
                        xen_pin_page(mm, virt_to_page(user_pgd), PT_PGD);
-                       xen_do_pin(MMUEXT_PIN_L4_TABLE, PFN_DOWN(__pa(user_pgd)));
+                       xen_do_pin(MMUEXT_PIN_L4_TABLE,
+                                  PFN_DOWN(__pa(user_pgd)));
                }
        }
 #else /* CONFIG_X86_32 */
@@ -986,7 +995,8 @@ static void __xen_pgd_unpin(struct mm_struct *mm, pgd_t *pgd)
                pgd_t *user_pgd = xen_get_user_pgd(pgd);
 
                if (user_pgd) {
-                       xen_do_pin(MMUEXT_UNPIN_TABLE, PFN_DOWN(__pa(user_pgd)));
+                       xen_do_pin(MMUEXT_UNPIN_TABLE,
+                                  PFN_DOWN(__pa(user_pgd)));
                        xen_unpin_page(mm, virt_to_page(user_pgd), PT_PGD);
                }
        }
@@ -998,7 +1008,7 @@ static void __xen_pgd_unpin(struct mm_struct *mm, pgd_t *pgd)
                       PT_PMD);
 #endif
 
-       xen_pgd_walk(mm, xen_unpin_page, USER_LIMIT);
+       __xen_pgd_walk(mm, pgd, xen_unpin_page, USER_LIMIT);
 
        xen_mc_issue(0);
 }
index 8ea8a0d0b0deeff69a438a5ad4fc0552d250d68f..c738644b543502d6577ee07b42c25f6e52493131 100644 (file)
@@ -154,7 +154,7 @@ void xen_mc_flush(void)
                               ret, smp_processor_id());
                        dump_stack();
                        for (i = 0; i < b->mcidx; i++) {
-                               printk("  call %2d/%d: op=%lu arg=[%lx] result=%ld\n",
+                               printk(KERN_DEBUG "  call %2d/%d: op=%lu arg=[%lx] result=%ld\n",
                                       i+1, b->mcidx,
                                       b->debug[i].op,
                                       b->debug[i].args[0],
index d679010838883195da63cfa7a7bbef7cfa71fe03..15c6c68db6a25f4941d25e8fc35857a3d518dc5d 100644 (file)
@@ -28,6 +28,9 @@
 /* These are code, but not functions.  Defined in entry.S */
 extern const char xen_hypervisor_callback[];
 extern const char xen_failsafe_callback[];
+extern void xen_sysenter_target(void);
+extern void xen_syscall_target(void);
+extern void xen_syscall32_target(void);
 
 
 /**
@@ -110,7 +113,6 @@ static __cpuinit int register_callback(unsigned type, const void *func)
 
 void __cpuinit xen_enable_sysenter(void)
 {
-       extern void xen_sysenter_target(void);
        int ret;
        unsigned sysenter_feature;
 
@@ -132,8 +134,6 @@ void __cpuinit xen_enable_syscall(void)
 {
 #ifdef CONFIG_X86_64
        int ret;
-       extern void xen_syscall_target(void);
-       extern void xen_syscall32_target(void);
 
        ret = register_callback(CALLBACKTYPE_syscall, xen_syscall_target);
        if (ret != 0) {
@@ -160,7 +160,8 @@ void __init xen_arch_setup(void)
        HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_writable_pagetables);
 
        if (!xen_feature(XENFEAT_auto_translated_physmap))
-               HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_pae_extended_cr3);
+               HYPERVISOR_vm_assist(VMASST_CMD_enable,
+                                    VMASST_TYPE_pae_extended_cr3);
 
        if (register_callback(CALLBACKTYPE_event, xen_hypervisor_callback) ||
            register_callback(CALLBACKTYPE_failsafe, xen_failsafe_callback))
index d77da613b1d2e49e626e601a6cdb9027d807fb18..acd9b6705e024f0833614f209caf2ab0da62807a 100644 (file)
@@ -362,7 +362,7 @@ static void xen_cpu_die(unsigned int cpu)
                alternatives_smp_switch(0);
 }
 
-static void xen_play_dead(void)
+static void __cpuinit xen_play_dead(void) /* used only with CPU_HOTPLUG */
 {
        play_dead_common();
        HYPERVISOR_vcpu_op(VCPUOP_down, smp_processor_id(), NULL);
index d7422dc2a55c33fd1a77cee38fc877110ff3a24e..9e1afae8461f1eabc04e625c06d9ef329a73b8f2 100644 (file)
@@ -49,7 +49,7 @@ bool xen_vcpu_stolen(int vcpu);
 
 void xen_mark_init_mm_pinned(void);
 
-void __init xen_setup_vcpu_info_placement(void);
+void xen_setup_vcpu_info_placement(void);
 
 #ifdef CONFIG_SMP
 void xen_smp_init(void);
index 5c99ff8d2db8937cffb50ab1d768e52fd49ff9f3..6e72d661ae425daa62f8b7999acc8f825e2a12e9 100644 (file)
@@ -161,7 +161,7 @@ static inline struct request *start_ordered(struct request_queue *q,
        /*
         * Prep proxy barrier request.
         */
-       blkdev_dequeue_request(rq);
+       elv_dequeue_request(q, rq);
        q->orig_bar_rq = rq;
        rq = &q->bar_rq;
        blk_rq_init(q, rq);
@@ -219,7 +219,7 @@ int blk_do_ordered(struct request_queue *q, struct request **rqp)
                         * This can happen when the queue switches to
                         * ORDERED_NONE while this request is on it.
                         */
-                       blkdev_dequeue_request(rq);
+                       elv_dequeue_request(q, rq);
                        if (__blk_end_request(rq, -EOPNOTSUPP,
                                              blk_rq_bytes(rq)))
                                BUG();
index 10e8a64a5a5b1b213cbc2886755b22dedce76313..c36aa98fafa3e4ed94adcf3e462945d59b0c1fcd 100644 (file)
@@ -592,7 +592,7 @@ blk_init_queue_node(request_fn_proc *rfn, spinlock_t *lock, int node_id)
                                   1 << QUEUE_FLAG_STACKABLE);
        q->queue_lock           = lock;
 
-       blk_queue_segment_boundary(q, 0xffffffff);
+       blk_queue_segment_boundary(q, BLK_SEG_BOUNDARY_MASK);
 
        blk_queue_make_request(q, __make_request);
        blk_queue_max_segment_size(q, MAX_SEGMENT_SIZE);
@@ -1636,6 +1636,28 @@ int blk_insert_cloned_request(struct request_queue *q, struct request *rq)
 }
 EXPORT_SYMBOL_GPL(blk_insert_cloned_request);
 
+/**
+ * blkdev_dequeue_request - dequeue request and start timeout timer
+ * @req: request to dequeue
+ *
+ * Dequeue @req and start timeout timer on it.  This hands off the
+ * request to the driver.
+ *
+ * Block internal functions which don't want to start timer should
+ * call elv_dequeue_request().
+ */
+void blkdev_dequeue_request(struct request *req)
+{
+       elv_dequeue_request(req->q, req);
+
+       /*
+        * We are now handing the request to the hardware, add the
+        * timeout handler.
+        */
+       blk_add_timer(req);
+}
+EXPORT_SYMBOL(blkdev_dequeue_request);
+
 /**
  * __end_that_request_first - end I/O on a request
  * @req:      the request being processed
@@ -1774,7 +1796,7 @@ static void end_that_request_last(struct request *req, int error)
                blk_queue_end_tag(req->q, req);
 
        if (blk_queued_rq(req))
-               blkdev_dequeue_request(req);
+               elv_dequeue_request(req->q, req);
 
        if (unlikely(laptop_mode) && blk_fs_request(req))
                laptop_io_completion();
index 4849fa36161eb697b47b08efa27af085b58bed3c..2990447f45e913f7aa968ddc3979ea7b1a027a80 100644 (file)
@@ -217,8 +217,14 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
                return PTR_ERR(bio);
 
        if (bio->bi_size != len) {
+               /*
+                * Grab an extra reference to this bio, as bio_unmap_user()
+                * expects to be able to drop it twice as it happens on the
+                * normal IO completion path
+                */
+               bio_get(bio);
                bio_endio(bio, 0);
-               bio_unmap_user(bio);
+               __blk_rq_unmap_user(bio);
                return -EINVAL;
        }
 
index 41392fbe19ff9615253278fdf48e63369ad7e856..afa55e14e27896837cb026ce706438520ea848aa 100644 (file)
@@ -125,6 +125,9 @@ void blk_queue_make_request(struct request_queue *q, make_request_fn *mfn)
        q->nr_requests = BLKDEV_MAX_RQ;
        blk_queue_max_phys_segments(q, MAX_PHYS_SEGMENTS);
        blk_queue_max_hw_segments(q, MAX_HW_SEGMENTS);
+       blk_queue_segment_boundary(q, BLK_SEG_BOUNDARY_MASK);
+       blk_queue_max_segment_size(q, MAX_SEGMENT_SIZE);
+
        q->make_request_fn = mfn;
        q->backing_dev_info.ra_pages =
                        (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE;
@@ -314,6 +317,7 @@ void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b)
        /* zero is "infinity" */
        t->max_sectors = min_not_zero(t->max_sectors, b->max_sectors);
        t->max_hw_sectors = min_not_zero(t->max_hw_sectors, b->max_hw_sectors);
+       t->seg_boundary_mask = min_not_zero(t->seg_boundary_mask, b->seg_boundary_mask);
 
        t->max_phys_segments = min(t->max_phys_segments, b->max_phys_segments);
        t->max_hw_segments = min(t->max_hw_segments, b->max_hw_segments);
index e8bd2475682ab4c2d29f8f205e57b62427b7cfe2..e73e50daf3d0a36df8977cad29b550e3139fbef0 100644 (file)
@@ -202,6 +202,8 @@ static int blk_fill_sgv4_hdr_rq(struct request_queue *q, struct request *rq,
                rq->timeout = q->sg_timeout;
        if (!rq->timeout)
                rq->timeout = BLK_DEFAULT_SG_TIMEOUT;
+       if (rq->timeout < BLK_MIN_SG_TIMEOUT)
+               rq->timeout = BLK_MIN_SG_TIMEOUT;
 
        return 0;
 }
index 3d3e7a46f38c43319a2fcbed71e99a5da9af8e68..67eb93cff699ba2a4dc9231f73c0d4d46d9fc443 100644 (file)
@@ -677,6 +677,29 @@ static int compat_blkdev_driver_ioctl(struct block_device *bdev, fmode_t mode,
        case DVD_WRITE_STRUCT:
        case DVD_AUTH:
                arg = (unsigned long)compat_ptr(arg);
+       /* These intepret arg as an unsigned long, not as a pointer,
+        * so we must not do compat_ptr() conversion. */
+       case HDIO_SET_MULTCOUNT:
+       case HDIO_SET_UNMASKINTR:
+       case HDIO_SET_KEEPSETTINGS:
+       case HDIO_SET_32BIT:
+       case HDIO_SET_NOWERR:
+       case HDIO_SET_DMA:
+       case HDIO_SET_PIO_MODE:
+       case HDIO_SET_NICE:
+       case HDIO_SET_WCACHE:
+       case HDIO_SET_ACOUSTIC:
+       case HDIO_SET_BUSSTATE:
+       case HDIO_SET_ADDRESS:
+       case CDROMEJECT_SW:
+       case CDROM_SET_OPTIONS:
+       case CDROM_CLEAR_OPTIONS:
+       case CDROM_SELECT_SPEED:
+       case CDROM_SELECT_DISC:
+       case CDROM_MEDIA_CHANGED:
+       case CDROM_DRIVE_STATUS:
+       case CDROM_LOCKDOOR:
+       case CDROM_DEBUG:
                break;
        default:
                /* unknown ioctl number */
@@ -699,8 +722,14 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
        struct backing_dev_info *bdi;
        loff_t size;
 
+       /*
+        * O_NDELAY can be altered using fcntl(.., F_SETFL, ..), so we have
+        * to updated it before every ioctl.
+        */
        if (file->f_flags & O_NDELAY)
-               mode |= FMODE_NDELAY_NOW;
+               mode |= FMODE_NDELAY;
+       else
+               mode &= ~FMODE_NDELAY;
 
        switch (cmd) {
        case HDIO_GETGEO:
index 9ac82dde99dddcd5434659f65a1e81c2a166b639..a6951f76ba0c3fa3e9a0c9f8ff58a108e63dc85c 100644 (file)
@@ -844,14 +844,7 @@ void elv_dequeue_request(struct request_queue *q, struct request *rq)
         */
        if (blk_account_rq(rq))
                q->in_flight++;
-
-       /*
-        * We are now handing the request to the hardware, add the
-        * timeout handler.
-        */
-       blk_add_timer(rq);
 }
-EXPORT_SYMBOL(elv_dequeue_request);
 
 int elv_queue_empty(struct request_queue *q)
 {
index 4e5e7493f6764e8f3a03b62e40bd40b724d15880..2f7feda61e35fc3cfd8dc74264300baeeaa56826 100644 (file)
@@ -768,6 +768,8 @@ static int __init genhd_device_init(void)
        bdev_map = kobj_map_init(base_probe, &block_class_lock);
        blk_dev_init();
 
+       register_blkdev(BLOCK_EXT_MAJOR, "blkext");
+
 #ifndef CONFIG_SYSFS_DEPRECATED
        /* create top-level block dir */
        block_depr = kobject_create_and_add("block", NULL);
@@ -1100,6 +1102,7 @@ struct gendisk *alloc_disk_node(int minors, int node_id)
                        kfree(disk);
                        return NULL;
                }
+               disk->node_id = node_id;
                if (disk_expand_part_tbl(disk, 0)) {
                        free_part_stats(&disk->part0);
                        kfree(disk);
@@ -1114,7 +1117,6 @@ struct gendisk *alloc_disk_node(int minors, int node_id)
                device_initialize(disk_to_dev(disk));
                INIT_WORK(&disk->async_notify,
                        media_change_notify_thread);
-               disk->node_id = node_id;
        }
        return disk;
 }
index c832d639b6e254eb375d9c69504172182ab14c4d..d03985b04d6768bd0966c3c75f27b6a1336ede1b 100644 (file)
@@ -18,7 +18,6 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user
        struct disk_part_iter piter;
        long long start, length;
        int partno;
-       int err;
 
        if (!capable(CAP_SYS_ADMIN))
                return -EACCES;
@@ -61,10 +60,10 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user
                        disk_part_iter_exit(&piter);
 
                        /* all seems OK */
-                       err = add_partition(disk, partno, start, length,
-                                           ADDPART_FLAG_NONE);
+                       part = add_partition(disk, partno, start, length,
+                                            ADDPART_FLAG_NONE);
                        mutex_unlock(&bdev->bd_mutex);
-                       return err;
+                       return IS_ERR(part) ? PTR_ERR(part) : 0;
                case BLKPG_DEL_PARTITION:
                        part = disk_get_part(disk, partno);
                        if (!part)
index 5963cf91a3a0c4f67dc709f9a6b98fdd87235f53..d0bb92cbefb9d698fc4756ec9041aeb2f5794005 100644 (file)
@@ -208,6 +208,8 @@ static int blk_fill_sghdr_rq(struct request_queue *q, struct request *rq,
                rq->timeout = q->sg_timeout;
        if (!rq->timeout)
                rq->timeout = BLK_DEFAULT_SG_TIMEOUT;
+       if (rq->timeout < BLK_MIN_SG_TIMEOUT)
+               rq->timeout = BLK_MIN_SG_TIMEOUT;
 
        return 0;
 }
index 39dbd8e4dde13c2769a1acb71c8d9937f12b3499..dc20a34ba5efaf9922cf225f1ec18a962b5f1024 100644 (file)
@@ -31,35 +31,63 @@ config CRYPTO_FIPS
 
 config CRYPTO_ALGAPI
        tristate
+       select CRYPTO_ALGAPI2
        help
          This option provides the API for cryptographic algorithms.
 
+config CRYPTO_ALGAPI2
+       tristate
+
 config CRYPTO_AEAD
        tristate
+       select CRYPTO_AEAD2
        select CRYPTO_ALGAPI
 
+config CRYPTO_AEAD2
+       tristate
+       select CRYPTO_ALGAPI2
+
 config CRYPTO_BLKCIPHER
        tristate
+       select CRYPTO_BLKCIPHER2
        select CRYPTO_ALGAPI
-       select CRYPTO_RNG
+
+config CRYPTO_BLKCIPHER2
+       tristate
+       select CRYPTO_ALGAPI2
+       select CRYPTO_RNG2
 
 config CRYPTO_HASH
        tristate
+       select CRYPTO_HASH2
        select CRYPTO_ALGAPI
 
+config CRYPTO_HASH2
+       tristate
+       select CRYPTO_ALGAPI2
+
 config CRYPTO_RNG
        tristate
+       select CRYPTO_RNG2
        select CRYPTO_ALGAPI
 
+config CRYPTO_RNG2
+       tristate
+       select CRYPTO_ALGAPI2
+
 config CRYPTO_MANAGER
        tristate "Cryptographic algorithm manager"
-       select CRYPTO_AEAD
-       select CRYPTO_HASH
-       select CRYPTO_BLKCIPHER
+       select CRYPTO_MANAGER2
        help
          Create default cryptographic template instantiations such as
          cbc(aes).
 
+config CRYPTO_MANAGER2
+       def_tristate CRYPTO_MANAGER || (CRYPTO_MANAGER!=n && CRYPTO_ALGAPI=y)
+       select CRYPTO_AEAD2
+       select CRYPTO_HASH2
+       select CRYPTO_BLKCIPHER2
+
 config CRYPTO_GF128MUL
        tristate "GF(2^128) multiplication functions (EXPERIMENTAL)"
        depends on EXPERIMENTAL
index 5862b807334e5c0f46fbad14bf01e058fe4e9939..cd4a4ed078ff1252642dba2fc87093fa97eedb18 100644 (file)
@@ -9,24 +9,24 @@ obj-$(CONFIG_CRYPTO_FIPS) += fips.o
 
 crypto_algapi-$(CONFIG_PROC_FS) += proc.o
 crypto_algapi-objs := algapi.o scatterwalk.o $(crypto_algapi-y)
-obj-$(CONFIG_CRYPTO_ALGAPI) += crypto_algapi.o
+obj-$(CONFIG_CRYPTO_ALGAPI2) += crypto_algapi.o
 
-obj-$(CONFIG_CRYPTO_AEAD) += aead.o
+obj-$(CONFIG_CRYPTO_AEAD2) += aead.o
 
 crypto_blkcipher-objs := ablkcipher.o
 crypto_blkcipher-objs += blkcipher.o
-obj-$(CONFIG_CRYPTO_BLKCIPHER) += crypto_blkcipher.o
-obj-$(CONFIG_CRYPTO_BLKCIPHER) += chainiv.o
-obj-$(CONFIG_CRYPTO_BLKCIPHER) += eseqiv.o
+obj-$(CONFIG_CRYPTO_BLKCIPHER2) += crypto_blkcipher.o
+obj-$(CONFIG_CRYPTO_BLKCIPHER2) += chainiv.o
+obj-$(CONFIG_CRYPTO_BLKCIPHER2) += eseqiv.o
 obj-$(CONFIG_CRYPTO_SEQIV) += seqiv.o
 
 crypto_hash-objs := hash.o
 crypto_hash-objs += ahash.o
-obj-$(CONFIG_CRYPTO_HASH) += crypto_hash.o
+obj-$(CONFIG_CRYPTO_HASH2) += crypto_hash.o
 
 cryptomgr-objs := algboss.o testmgr.o
 
-obj-$(CONFIG_CRYPTO_MANAGER) += cryptomgr.o
+obj-$(CONFIG_CRYPTO_MANAGER2) += cryptomgr.o
 obj-$(CONFIG_CRYPTO_HMAC) += hmac.o
 obj-$(CONFIG_CRYPTO_XCBC) += xcbc.o
 obj-$(CONFIG_CRYPTO_NULL) += crypto_null.o
@@ -73,8 +73,8 @@ obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o
 obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o
 obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o
 obj-$(CONFIG_CRYPTO_LZO) += lzo.o
-obj-$(CONFIG_CRYPTO_RNG) += rng.o
-obj-$(CONFIG_CRYPTO_RNG) += krng.o
+obj-$(CONFIG_CRYPTO_RNG2) += rng.o
+obj-$(CONFIG_CRYPTO_RNG2) += krng.o
 obj-$(CONFIG_CRYPTO_ANSI_CPRNG) += ansi_cprng.o
 obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o
 
index c029d3eb9ef0a76ed248deb4a40e47511ba12afe..595b78672b36ad90e27cf50ed28126bb43970fb5 100644 (file)
@@ -53,10 +53,17 @@ do_async_xor(struct dma_chan *chan, struct page *dest, struct page **src_list,
        int xor_src_cnt;
        dma_addr_t dma_dest;
 
-       dma_dest = dma_map_page(dma->dev, dest, offset, len, DMA_FROM_DEVICE);
-       for (i = 0; i < src_cnt; i++)
+       /* map the dest bidrectional in case it is re-used as a source */
+       dma_dest = dma_map_page(dma->dev, dest, offset, len, DMA_BIDIRECTIONAL);
+       for (i = 0; i < src_cnt; i++) {
+               /* only map the dest once */
+               if (unlikely(src_list[i] == dest)) {
+                       dma_src[i] = dma_dest;
+                       continue;
+               }
                dma_src[i] = dma_map_page(dma->dev, src_list[i], offset,
                                          len, DMA_TO_DEVICE);
+       }
 
        while (src_cnt) {
                async_flags = flags;
index f4f6329175094383e61749a6dbf893a3ecda92d9..b0243fd55ac00716d57037cd01c3a67cddb517c1 100644 (file)
@@ -312,9 +312,13 @@ config ACPI_DEBUG
        bool "Debug Statements"
        default n
        help
-         The ACPI driver can optionally report errors with a great deal
-         of verbosity. Saying Y enables these statements. This will increase
-         your kernel size by around 50K.
+         The ACPI subsystem can produce debug output.  Saying Y enables this
+         output and increases the kernel size by around 50K.
+
+         Use the acpi.debug_layer and acpi.debug_level kernel command-line
+         parameters documented in Documentation/acpi/debug.txt and
+         Documentation/kernel-parameters.txt to control the type and
+         amount of debug output.
 
 config ACPI_DEBUG_FUNC_TRACE
        bool "Additionally enable ACPI function tracing"
@@ -324,14 +328,6 @@ config ACPI_DEBUG_FUNC_TRACE
          ACPI Debug Statements slow down ACPI processing. Function trace
          is about half of the penalty and is rarely useful.
 
-config ACPI_EC
-       bool
-       default y
-       help
-         This driver is required on some systems for the proper operation of
-         the battery and thermal drivers.  If you are compiling for a 
-         mobile system, say Y.
-
 config ACPI_PCI_SLOT
        tristate "PCI slot detection driver"
        default n
@@ -341,10 +337,6 @@ config ACPI_PCI_SLOT
          help you correlate PCI bus addresses with the physical geography
          of your slots. If you are unsure, say N.
 
-config ACPI_POWER
-       bool
-       default y
-
 config ACPI_SYSTEM
        bool
        default y
index d91c027ece8f6409cc50a83023ac7821a4f9b1a4..3c0c93300f127ffe91343f8514e27b174742bdb0 100644 (file)
@@ -39,19 +39,23 @@ obj-y                               += sleep/
 obj-y                          += bus.o glue.o
 obj-y                          += scan.o
 # Keep EC driver first. Initialization of others depend on it.
-obj-$(CONFIG_ACPI_EC)          += ec.o
+obj-y                          += ec.o
 obj-$(CONFIG_ACPI_AC)          += ac.o
 obj-$(CONFIG_ACPI_BATTERY)     += battery.o
 obj-$(CONFIG_ACPI_BUTTON)      += button.o
 obj-$(CONFIG_ACPI_FAN)         += fan.o
 obj-$(CONFIG_ACPI_DOCK)                += dock.o
 obj-$(CONFIG_ACPI_VIDEO)       += video.o
+ifdef CONFIG_ACPI_VIDEO
+obj-y                          += video_detect.o
+endif
+
 obj-y                          += pci_root.o pci_link.o pci_irq.o pci_bind.o
 obj-$(CONFIG_ACPI_PCI_SLOT)    += pci_slot.o
 obj-$(CONFIG_ACPI_PROCESSOR)   += processor.o
 obj-$(CONFIG_ACPI_CONTAINER)   += container.o
 obj-$(CONFIG_ACPI_THERMAL)     += thermal.o
-obj-$(CONFIG_ACPI_POWER)       += power.o
+obj-y                          += power.o
 obj-$(CONFIG_ACPI_SYSTEM)      += system.o event.o
 obj-$(CONFIG_ACPI_DEBUG)       += debug.o
 obj-$(CONFIG_ACPI_NUMA)                += numa.o
index d72a1b6c8a943bde5aff998e09b2fbaf1ea9d222..9b917dac77322b4aa397549aa4874ed0c4ad8dab 100644 (file)
@@ -37,7 +37,6 @@
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
 
-#define ACPI_AC_COMPONENT              0x00020000
 #define ACPI_AC_CLASS                  "ac_adapter"
 #define ACPI_AC_DEVICE_NAME            "AC Adapter"
 #define ACPI_AC_FILE_STATE             "state"
@@ -242,7 +241,7 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data)
                acpi_ac_get_state(ac);
                acpi_bus_generate_proc_event(device, event, (u32) ac->state);
                acpi_bus_generate_netlink_event(device->pnp.device_class,
-                                                 device->dev.bus_id, event,
+                                                 dev_name(&device->dev), event,
                                                  (u32) ac->state);
 #ifdef CONFIG_ACPI_SYSFS_POWER
                kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE);
index 71d21c51c45f573c6591d224e835843357df5981..63a17b55b39b713a667f82c33afe6ad935f0b6b6 100644 (file)
@@ -32,7 +32,6 @@
 #include <linux/memory_hotplug.h>
 #include <acpi/acpi_drivers.h>
 
-#define ACPI_MEMORY_DEVICE_COMPONENT           0x08000000UL
 #define ACPI_MEMORY_DEVICE_CLASS               "memory"
 #define ACPI_MEMORY_DEVICE_HID                 "PNP0C80"
 #define ACPI_MEMORY_DEVICE_NAME                        "Hotplug Mem Device"
index b2133e89ad9a6debafa3dbad49cf998daad80ec7..1423b0c0cd2eecc6e3c7b2f5c78746cee5fac4eb 100644 (file)
@@ -46,7 +46,6 @@
 
 #define ACPI_BATTERY_VALUE_UNKNOWN 0xFFFFFFFF
 
-#define ACPI_BATTERY_COMPONENT         0x00040000
 #define ACPI_BATTERY_CLASS             "battery"
 #define ACPI_BATTERY_DEVICE_NAME       "Battery"
 #define ACPI_BATTERY_NOTIFY_STATUS     0x80
@@ -782,7 +781,7 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
        acpi_bus_generate_proc_event(device, event,
                                     acpi_battery_present(battery));
        acpi_bus_generate_netlink_event(device->pnp.device_class,
-                                       device->dev.bus_id, event,
+                                       dev_name(&device->dev), event,
                                        acpi_battery_present(battery));
 #ifdef CONFIG_ACPI_SYSFS_POWER
        /* acpi_batter_update could remove power_supply object */
index ea92bac42c53dd438fae0c82b2e310b8098f7dff..09c69806c1fc7693f91268ce86d0a8030dc2df59 100644 (file)
@@ -176,16 +176,6 @@ static int __init dmi_enable_osi_linux(const struct dmi_system_id *d)
        acpi_dmi_osi_linux(1, d);       /* enable */
        return 0;
 }
-static int __init dmi_disable_osi_linux(const struct dmi_system_id *d)
-{
-       acpi_dmi_osi_linux(0, d);       /* disable */
-       return 0;
-}
-static int __init dmi_unknown_osi_linux(const struct dmi_system_id *d)
-{
-       acpi_dmi_osi_linux(-1, d);      /* unknown */
-       return 0;
-}
 static int __init dmi_disable_osi_vista(const struct dmi_system_id *d)
 {
        printk(KERN_NOTICE PREFIX "DMI detected: %s\n", d->ident);
@@ -193,295 +183,21 @@ static int __init dmi_disable_osi_vista(const struct dmi_system_id *d)
        return 0;
 }
 
-/*
- * Most BIOS that invoke OSI(Linux) do nothing with it.
- * But some cause Linux to break.
- * Only a couple use it to make Linux run better.
- *
- * Thus, Linux should continue to disable OSI(Linux) by default,
- * should continue to discourage BIOS writers from using it, and
- * should whitelist the few existing systems that require it.
- *
- * If it appears clear a vendor isn't using OSI(Linux)
- * for anything constructive, blacklist them by name to disable
- * unnecessary dmesg warnings on all of their products.
- */
-
 static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
-       /*
-        * Disable OSI(Linux) warnings on all "Acer, inc."
-        *
-        * _OSI(Linux) disables the latest Windows BIOS code:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 3100"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5050"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5100"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5580"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 3010"),
-        * _OSI(Linux) effect unknown:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Ferrari 5000"),
-        */
-       /*
-        * note that dmi_check_system() uses strstr()
-        * to match sub-strings rather than !strcmp(),
-        * so "Acer" below matches "Acer, inc." above.
-        */
-       /*
-        * Disable OSI(Linux) warnings on all "Acer"
-        *
-        * _OSI(Linux) effect unknown:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5610"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 7720Z"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 5520"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 6460"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 7510"),
-        *
-        * _OSI(Linux) is a NOP:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5315"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Extensa 5220"),
-        */
-       {
-       .callback = dmi_disable_osi_linux,
-       .ident = "Acer",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
-               },
-       },
-       /*
-        * Disable OSI(Linux) warnings on all "Apple Computer, Inc."
-        * Disable OSI(Linux) warnings on all "Apple Inc."
-        *
-        * _OSI(Linux) confirmed to be a NOP:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "MacBook1,1"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "MacBook2,1"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro2,2"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro3,1"),
-        * _OSI(Linux) effect unknown:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "MacPro2,1"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro1,1"),
-        */
-       {
-       .callback = dmi_disable_osi_linux,
-       .ident = "Apple",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Apple"),
-               },
-       },
-       /*
-        * Disable OSI(Linux) warnings on all "BenQ"
-        *
-        * _OSI(Linux) confirmed to be a NOP:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Joybook S31"),
-        */
-       {
-       .callback = dmi_disable_osi_linux,
-       .ident = "BenQ",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "BenQ"),
-               },
-       },
-       /*
-        * Disable OSI(Linux) warnings on all "Clevo Co."
-        *
-        * _OSI(Linux) confirmed to be a NOP:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "M570RU"),
-        */
-       {
-       .callback = dmi_disable_osi_linux,
-       .ident = "Clevo",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Clevo Co."),
-               },
-       },
-       /*
-        * Disable OSI(Linux) warnings on all "COMPAL"
-        *
-        * _OSI(Linux) confirmed to be a NOP:
-        * DMI_MATCH(DMI_BOARD_NAME, "HEL8X"),
-        * _OSI(Linux) unknown effect:
-        * DMI_MATCH(DMI_BOARD_NAME, "IFL91"),
-        */
-       {
-       .callback = dmi_disable_osi_linux,
-       .ident = "Compal",
-       .matches = {
-                    DMI_MATCH(DMI_BIOS_VENDOR, "COMPAL"),
-               },
-       },
-       { /* OSI(Linux) touches USB, unknown side-effect */
-       .callback = dmi_disable_osi_linux,
-       .ident = "Dell Dimension 5150",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "Dell DM051"),
-               },
-       },
-       { /* OSI(Linux) is a NOP */
-       .callback = dmi_disable_osi_linux,
-       .ident = "Dell i1501",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1501"),
-               },
-       },
-       { /* OSI(Linux) effect unknown */
-       .callback = dmi_unknown_osi_linux,
-       .ident = "Dell Latitude D830",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "Latitude D830"),
-               },
-       },
-       { /* OSI(Linux) effect unknown */
-       .callback = dmi_unknown_osi_linux,
-       .ident = "Dell OptiPlex GX620",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex GX620"),
-               },
-       },
-       { /* OSI(Linux) causes some USB initialization to not run */
-       .callback = dmi_unknown_osi_linux,
-       .ident = "Dell OptiPlex 755",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 755"),
-               },
-       },
-       { /* OSI(Linux) effect unknown */
-       .callback = dmi_unknown_osi_linux,
-       .ident = "Dell PE 1900",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 1900"),
-               },
-       },
-       { /* OSI(Linux) is a NOP */
-       .callback = dmi_unknown_osi_linux,
-       .ident = "Dell PE 1950",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 1950"),
-               },
-       },
-       { /* OSI(Linux) is a NOP */
-       .callback = dmi_disable_osi_linux,
-       .ident = "Dell PE R200",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R200"),
-               },
-       },
-       { /* OSI(Linux) touches USB */
-       .callback = dmi_disable_osi_linux,
-       .ident = "Dell PR 390",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation 390"),
-               },
-       },
-       { /* OSI(Linux) touches USB */
-       .callback = dmi_unknown_osi_linux,
-       .ident = "Dell PR 390",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation 690"),
-               },
-       },
-       { /* OSI(Linux) unknown - ASL looks benign, but may effect dock/SMM */
-       .callback = dmi_unknown_osi_linux,
-       .ident = "Dell PR M4300",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "Precision M4300"),
-               },
-       },
-       { /* OSI(Linux) is a NOP */
-       .callback = dmi_disable_osi_linux,
-       .ident = "Dell Vostro 1000",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "Vostro   1000"),
-               },
-       },
-       { /* OSI(Linux) effect unknown */
-       .callback = dmi_unknown_osi_linux,
-       .ident = "Dell PE SC440",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge SC440"),
-               },
-       },
-       { /* OSI(Linux) effect unknown */
-       .callback = dmi_unknown_osi_linux,
-       .ident = "Dialogue Flybook V5",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Dialogue Technology Corporation"),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "Flybook V5"),
-               },
-       },
-       /*
-        * Disable OSI(Linux) warnings on all "FUJITSU SIEMENS"
-        *
-        * _OSI(Linux) disables latest Windows BIOS code:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pa 2510"),
-        * _OSI(Linux) confirmed to be a NOP:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pi 1536"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pi 1556"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Xi 1546"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO Mobile V5505"),
-        * _OSI(Linux) unknown effect:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Amilo M1425"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Amilo Si 1520"),
-        */
-       {
-       .callback = dmi_disable_osi_linux,
-       .ident = "Fujitsu Siemens",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
-               },
-       },
        {
        .callback = dmi_disable_osi_vista,
        .ident = "Fujitsu Siemens",
        .matches = {
                     DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO Mobile V5505"),
+                    DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO Mobile V5505"),
                },
        },
+
        /*
-        * Disable OSI(Linux) warnings on all "Hewlett-Packard"
-        *
-        * _OSI(Linux) confirmed to be a NOP:
-        * .ident = "HP Pavilion tx 1000"
-        * DMI_MATCH(DMI_BOARD_NAME, "30BF"),
-        * .ident = "HP Pavilion dv2000"
-        * DMI_MATCH(DMI_BOARD_NAME, "30B5"),
-        * .ident = "HP Pavilion dv5000",
-        * DMI_MATCH(DMI_BOARD_NAME, "30A7"),
-        * .ident = "HP Pavilion dv6300 30BC",
-        * DMI_MATCH(DMI_BOARD_NAME, "30BC"),
-        * .ident = "HP Pavilion dv6000",
-        * DMI_MATCH(DMI_BOARD_NAME, "30B7"),
-        * DMI_MATCH(DMI_BOARD_NAME, "30B8"),
-        * .ident = "HP Pavilion dv9000",
-        * DMI_MATCH(DMI_BOARD_NAME, "30B9"),
-        * .ident = "HP Pavilion dv9500",
-        * DMI_MATCH(DMI_BOARD_NAME, "30CB"),
-        * .ident = "HP/Compaq Presario C500",
-        * DMI_MATCH(DMI_BOARD_NAME, "30C6"),
-        * .ident = "HP/Compaq Presario F500",
-        * DMI_MATCH(DMI_BOARD_NAME, "30D3"),
-        * _OSI(Linux) unknown effect:
-        * .ident = "HP Pavilion dv6500",
-        * DMI_MATCH(DMI_BOARD_NAME, "30D0"),
+        * BIOS invocation of _OSI(Linux) is almost always a BIOS bug.
+        * Linux ignores it, except for the machines enumerated below.
         */
-       {
-       .callback = dmi_disable_osi_linux,
-       .ident = "Hewlett-Packard",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
-               },
-       },
+
        /*
         * Lenovo has a mix of systems OSI(Linux) situations
         * and thus we can not wildcard the vendor.
@@ -519,113 +235,6 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
                     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"),
                },
        },
-       {
-       .callback = dmi_disable_osi_linux,
-       .ident = "Lenovo 3000 V100",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
-                    DMI_MATCH(DMI_PRODUCT_VERSION, "LENOVO3000 V100"),
-               },
-       },
-       {
-       .callback = dmi_disable_osi_linux,
-       .ident = "Lenovo 3000 N100",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
-                    DMI_MATCH(DMI_PRODUCT_VERSION, "3000 N100"),
-               },
-       },
-       /*
-        * Disable OSI(Linux) warnings on all "LG Electronics"
-        *
-        * _OSI(Linux) confirmed to be a NOP:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "P1-J150B"),
-        * with DMI_MATCH(DMI_BOARD_NAME, "ROCKY"),
-        *
-        * unknown:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "S1-MDGDG"),
-        * with DMI_MATCH(DMI_BOARD_NAME, "ROCKY"),
-        */
-       {
-       .callback = dmi_disable_osi_linux,
-       .ident = "LG",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"),
-               },
-       },
-       /* NEC - OSI(Linux) effect unknown */
-       {
-       .callback = dmi_unknown_osi_linux,
-       .ident = "NEC VERSA M360",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "NEC Computers SAS"),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "NEC VERSA M360"),
-               },
-       },
-       /* Panasonic */
-       {
-       .callback = dmi_unknown_osi_linux,
-       .ident = "Panasonic",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Matsushita"),
-                       /* Toughbook CF-52 */
-                    DMI_MATCH(DMI_PRODUCT_NAME, "CF-52CCABVBG"),
-               },
-       },
-       /*
-        * Disable OSI(Linux) warnings on all "Samsung Electronics"
-        *
-        * OSI(Linux) disables PNP0C32 and other BIOS code for Windows:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "R40P/R41P"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "R59P/R60P/R61P"),
-        */
-       {
-       .callback = dmi_disable_osi_linux,
-       .ident = "Samsung",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
-               },
-       },
-       /*
-        * Disable OSI(Linux) warnings on all "Sony Corporation"
-        *
-        * _OSI(Linux) is a NOP:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-NR11S_S"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SZ38GP_C"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SZ650N"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-TZ21MN_N"),
-        * _OSI(Linux) unknown effect:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ11M"),
-        */
-       {
-       .callback = dmi_disable_osi_linux,
-       .ident = "Sony",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
-               },
-       },
-       /*
-        * Disable OSI(Linux) warnings on all "TOSHIBA"
-        *
-        * _OSI(Linux) breaks sound (bugzilla 7787):
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P100"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P105"),
-        * _OSI(Linux) is a NOP:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Satellite A100"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Satellite A210"),
-        * _OSI(Linux) unknown effect:
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Satellite A135"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Satellite A200"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P205"),
-        * DMI_MATCH(DMI_PRODUCT_NAME, "Satellite U305"),
-        */
-       {
-       .callback = dmi_disable_osi_linux,
-       .ident = "Toshiba",
-       .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
-               },
-       },
        {}
 };
 
index c797c6473f31588cbc6ddf03c25a0770f26ccbe7..7edf6d913c1318fded1fd4cf6a448b2f799a0849 100644 (file)
@@ -688,6 +688,14 @@ void __init acpi_early_init(void)
        if (acpi_disabled)
                return;
 
+       /*
+        * ACPI CA initializes acpi_dbg_level to non-zero, which means
+        * we get debug output merely by turning on CONFIG_ACPI_DEBUG.
+        * Turn it off so we don't get output unless the user specifies
+        * acpi.debug_level.
+        */
+       acpi_dbg_level = 0;
+
        printk(KERN_INFO PREFIX "Core revision %08x\n", ACPI_CA_VERSION);
 
        /* enable workarounds, unless strict ACPI spec. compliance */
@@ -774,7 +782,7 @@ static int __init acpi_bus_init(void)
                       "Unable to initialize ACPI OS objects\n");
                goto error1;
        }
-#ifdef CONFIG_ACPI_EC
+
        /*
         * ACPI 2.0 requires the EC driver to be loaded and work before
         * the EC device is found in the namespace (i.e. before acpi_initialize_objects()
@@ -785,7 +793,6 @@ static int __init acpi_bus_init(void)
         */
        status = acpi_ec_ecdt_probe();
        /* Ignore result. Not having an ECDT is not fatal. */
-#endif
 
        status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
        if (ACPI_FAILURE(status)) {
index cb046c3fc3f2bd15da05dfd3939cda28d4949599..171fd914f43533f46bf417dd4d4a7b6936fc6e50 100644 (file)
@@ -33,7 +33,6 @@
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
 
-#define ACPI_BUTTON_COMPONENT          0x00080000
 #define ACPI_BUTTON_CLASS              "button"
 #define ACPI_BUTTON_FILE_INFO          "info"
 #define ACPI_BUTTON_FILE_STATE         "state"
@@ -479,7 +478,7 @@ static int acpi_button_add(struct acpi_device *device)
                                  device->wakeup.gpe_number,
                                  ACPI_GPE_TYPE_WAKE_RUN);
                acpi_enable_gpe(device->wakeup.gpe_device,
-                               device->wakeup.gpe_number, ACPI_NOT_ISR);
+                               device->wakeup.gpe_number);
                device->wakeup.state.enabled = 1;
        }
 
index 4441e84b28a9a2e652d00445d2dbf1b722ac8e90..307963bd10436c896e85766f23fc2ad6a6c85ad2 100644 (file)
@@ -34,7 +34,6 @@
 ACPI_MODULE_NAME("cm_sbs");
 #define ACPI_AC_CLASS          "ac_adapter"
 #define ACPI_BATTERY_CLASS     "battery"
-#define ACPI_SBS_COMPONENT     0x00080000
 #define _COMPONENT             ACPI_SBS_COMPONENT
 static struct proc_dir_entry *acpi_ac_dir;
 static struct proc_dir_entry *acpi_battery_dir;
@@ -105,9 +104,3 @@ void acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir_param)
        return;
 }
 EXPORT_SYMBOL(acpi_unlock_battery_dir);
-
-static int __init acpi_cm_sbs_init(void)
-{
-       return 0;
-}
-subsys_initcall(acpi_cm_sbs_init);
index 134818b265a9fae8ff5aec7af3e443d4cc6d7c59..17020c12623c727c7c8ff0a18e7602bf18a85c5a 100644 (file)
@@ -41,7 +41,6 @@
 #define INSTALL_NOTIFY_HANDLER         1
 #define UNINSTALL_NOTIFY_HANDLER       2
 
-#define ACPI_CONTAINER_COMPONENT       0x01000000
 #define _COMPONENT                     ACPI_CONTAINER_COMPONENT
 ACPI_MODULE_NAME("container");
 
index abf36b4b1d1d828ba7024ef3ddf49df5c9d1310f..c483968920085f13da610c387fd685ebe07ca654 100644 (file)
@@ -44,6 +44,21 @@ static const struct acpi_dlayer acpi_debug_layers[] = {
        ACPI_DEBUG_INIT(ACPI_CA_DISASSEMBLER),
        ACPI_DEBUG_INIT(ACPI_COMPILER),
        ACPI_DEBUG_INIT(ACPI_TOOLS),
+
+       ACPI_DEBUG_INIT(ACPI_BUS_COMPONENT),
+       ACPI_DEBUG_INIT(ACPI_AC_COMPONENT),
+       ACPI_DEBUG_INIT(ACPI_BATTERY_COMPONENT),
+       ACPI_DEBUG_INIT(ACPI_BUTTON_COMPONENT),
+       ACPI_DEBUG_INIT(ACPI_SBS_COMPONENT),
+       ACPI_DEBUG_INIT(ACPI_FAN_COMPONENT),
+       ACPI_DEBUG_INIT(ACPI_PCI_COMPONENT),
+       ACPI_DEBUG_INIT(ACPI_POWER_COMPONENT),
+       ACPI_DEBUG_INIT(ACPI_CONTAINER_COMPONENT),
+       ACPI_DEBUG_INIT(ACPI_SYSTEM_COMPONENT),
+       ACPI_DEBUG_INIT(ACPI_THERMAL_COMPONENT),
+       ACPI_DEBUG_INIT(ACPI_MEMORY_DEVICE_COMPONENT),
+       ACPI_DEBUG_INIT(ACPI_VIDEO_COMPONENT),
+       ACPI_DEBUG_INIT(ACPI_PROCESSOR_COMPONENT),
 };
 
 static const struct acpi_dlevel acpi_debug_levels[] = {
index ef42316f89f52452f69192d89894ca9ba64f46ee..30f3ef236ecb1b354548c5bb2570866eaa8ec6be 100644 (file)
@@ -70,7 +70,7 @@ enum ec_command {
 #define ACPI_EC_UDELAY_GLK     1000    /* Wait 1ms max. to get global lock */
 #define ACPI_EC_UDELAY         100     /* Wait 100us before polling EC again */
 
-#define ACPI_EC_STORM_THRESHOLD 20     /* number of false interrupts
+#define ACPI_EC_STORM_THRESHOLD      /* number of false interrupts
                                           per one transaction */
 
 enum {
@@ -100,8 +100,11 @@ struct transaction {
        u8 *rdata;
        unsigned short irq_count;
        u8 command;
+       u8 wi;
+       u8 ri;
        u8 wlen;
        u8 rlen;
+       bool done;
 };
 
 static struct acpi_ec {
@@ -178,34 +181,46 @@ static int ec_transaction_done(struct acpi_ec *ec)
        unsigned long flags;
        int ret = 0;
        spin_lock_irqsave(&ec->curr_lock, flags);
-       if (!ec->curr || (!ec->curr->wlen && !ec->curr->rlen))
+       if (!ec->curr || ec->curr->done)
                ret = 1;
        spin_unlock_irqrestore(&ec->curr_lock, flags);
        return ret;
 }
 
+static void start_transaction(struct acpi_ec *ec)
+{
+       ec->curr->irq_count = ec->curr->wi = ec->curr->ri = 0;
+       ec->curr->done = false;
+       acpi_ec_write_cmd(ec, ec->curr->command);
+}
+
 static void gpe_transaction(struct acpi_ec *ec, u8 status)
 {
        unsigned long flags;
        spin_lock_irqsave(&ec->curr_lock, flags);
        if (!ec->curr)
                goto unlock;
-       if (ec->curr->wlen > 0) {
-               if ((status & ACPI_EC_FLAG_IBF) == 0) {
-                       acpi_ec_write_data(ec, *(ec->curr->wdata++));
-                       --ec->curr->wlen;
-               } else
-                       /* false interrupt, state didn't change */
-                       ++ec->curr->irq_count;
-
-       } else if (ec->curr->rlen > 0) {
+       if (ec->curr->wlen > ec->curr->wi) {
+               if ((status & ACPI_EC_FLAG_IBF) == 0)
+                       acpi_ec_write_data(ec,
+                               ec->curr->wdata[ec->curr->wi++]);
+               else
+                       goto err;
+       } else if (ec->curr->rlen > ec->curr->ri) {
                if ((status & ACPI_EC_FLAG_OBF) == 1) {
-                       *(ec->curr->rdata++) = acpi_ec_read_data(ec);
-                       --ec->curr->rlen;
+                       ec->curr->rdata[ec->curr->ri++] = acpi_ec_read_data(ec);
+                       if (ec->curr->rlen == ec->curr->ri)
+                               ec->curr->done = true;
                } else
-                       /* false interrupt, state didn't change */
-                       ++ec->curr->irq_count;
-       }
+                       goto err;
+       } else if (ec->curr->wlen == ec->curr->wi &&
+                  (status & ACPI_EC_FLAG_IBF) == 0)
+               ec->curr->done = true;
+       goto unlock;
+err:
+       /* false interrupt, state didn't change */
+       if (in_interrupt())
+               ++ec->curr->irq_count;
 unlock:
        spin_unlock_irqrestore(&ec->curr_lock, flags);
 }
@@ -215,6 +230,15 @@ static int acpi_ec_wait(struct acpi_ec *ec)
        if (wait_event_timeout(ec->wait, ec_transaction_done(ec),
                               msecs_to_jiffies(ACPI_EC_DELAY)))
                return 0;
+       /* try restart command if we get any false interrupts */
+       if (ec->curr->irq_count &&
+           (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) == 0) {
+               pr_debug(PREFIX "controller reset, restart transaction\n");
+               start_transaction(ec);
+               if (wait_event_timeout(ec->wait, ec_transaction_done(ec),
+                                       msecs_to_jiffies(ACPI_EC_DELAY)))
+                       return 0;
+       }
        /* missing GPEs, switch back to poll mode */
        if (printk_ratelimit())
                pr_info(PREFIX "missing confirmations, "
@@ -239,10 +263,10 @@ static int ec_check_sci(struct acpi_ec *ec, u8 state)
 static int ec_poll(struct acpi_ec *ec)
 {
        unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY);
-       msleep(1);
+       udelay(ACPI_EC_UDELAY);
        while (time_before(jiffies, delay)) {
                gpe_transaction(ec, acpi_ec_read_status(ec));
-               msleep(1);
+               udelay(ACPI_EC_UDELAY);
                if (ec_transaction_done(ec))
                        return 0;
        }
@@ -259,14 +283,13 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec,
        /* disable GPE during transaction if storm is detected */
        if (test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) {
                clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
-               acpi_disable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
+               acpi_disable_gpe(NULL, ec->gpe);
        }
        /* start transaction */
        spin_lock_irqsave(&ec->curr_lock, tmp);
        /* following two actions should be kept atomic */
-       t->irq_count = 0;
        ec->curr = t;
-       acpi_ec_write_cmd(ec, ec->curr->command);
+       start_transaction(ec);
        if (ec->curr->command == ACPI_EC_COMMAND_QUERY)
                clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
        spin_unlock_irqrestore(&ec->curr_lock, tmp);
@@ -283,10 +306,11 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec,
                /* check if we received SCI during transaction */
                ec_check_sci(ec, acpi_ec_read_status(ec));
                /* it is safe to enable GPE outside of transaction */
-               acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
+               acpi_enable_gpe(NULL, ec->gpe);
        } else if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags) &&
                   t->irq_count > ACPI_EC_STORM_THRESHOLD) {
-               pr_debug(PREFIX "GPE storm detected\n");
+               pr_info(PREFIX "GPE storm detected, "
+                       "transactions will use polling mode\n");
                set_bit(EC_FLAGS_GPE_STORM, &ec->flags);
        }
        return ret;
@@ -558,17 +582,26 @@ static u32 acpi_ec_gpe_handler(void *data)
        pr_debug(PREFIX "~~~> interrupt\n");
        status = acpi_ec_read_status(ec);
 
-       gpe_transaction(ec, status);
-       if (ec_transaction_done(ec) && (status & ACPI_EC_FLAG_IBF) == 0)
-               wake_up(&ec->wait);
+       if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) {
+               gpe_transaction(ec, status);
+               if (ec_transaction_done(ec) &&
+                   (status & ACPI_EC_FLAG_IBF) == 0)
+                       wake_up(&ec->wait);
+       }
 
        ec_check_sci(ec, status);
        if (!test_bit(EC_FLAGS_GPE_MODE, &ec->flags) &&
            !test_bit(EC_FLAGS_NO_GPE, &ec->flags)) {
                /* this is non-query, must be confirmation */
-               if (printk_ratelimit())
-                       pr_info(PREFIX "non-query interrupt received,"
+               if (!test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) {
+                       if (printk_ratelimit())
+                               pr_info(PREFIX "non-query interrupt received,"
+                                       " switching to interrupt mode\n");
+               } else {
+                       /* hush, STORM switches the mode every transaction */
+                       pr_debug(PREFIX "non-query interrupt received,"
                                " switching to interrupt mode\n");
+               }
                set_bit(EC_FLAGS_GPE_MODE, &ec->flags);
        }
        return ACPI_INTERRUPT_HANDLED;
@@ -736,7 +769,7 @@ static acpi_status
 ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
 {
        acpi_status status;
-       unsigned long long tmp;
+       unsigned long long tmp = 0;
 
        struct acpi_ec *ec = context;
        status = acpi_walk_resources(handle, METHOD_NAME__CRS,
@@ -751,6 +784,7 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
                return status;
        ec->gpe = tmp;
        /* Use the global lock for all EC transactions? */
+       tmp = 0;
        acpi_evaluate_integer(handle, "_GLK", NULL, &tmp);
        ec->global_lock = tmp;
        ec->handle = handle;
@@ -868,7 +902,7 @@ static int ec_install_handlers(struct acpi_ec *ec)
        if (ACPI_FAILURE(status))
                return -ENODEV;
        acpi_set_gpe_type(NULL, ec->gpe, ACPI_GPE_TYPE_RUNTIME);
-       acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
+       acpi_enable_gpe(NULL, ec->gpe);
        status = acpi_install_address_space_handler(ec->handle,
                                                    ACPI_ADR_SPACE_EC,
                                                    &acpi_ec_space_handler,
@@ -1007,7 +1041,7 @@ static int acpi_ec_suspend(struct acpi_device *device, pm_message_t state)
        /* Stop using GPE */
        set_bit(EC_FLAGS_NO_GPE, &ec->flags);
        clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
-       acpi_disable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
+       acpi_disable_gpe(NULL, ec->gpe);
        return 0;
 }
 
@@ -1016,7 +1050,7 @@ static int acpi_ec_resume(struct acpi_device *device)
        struct acpi_ec *ec = acpi_driver_data(device);
        /* Enable use of GPE back */
        clear_bit(EC_FLAGS_NO_GPE, &ec->flags);
-       acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
+       acpi_enable_gpe(NULL, ec->gpe);
        return 0;
 }
 
index c5e53aae86f7c53385f48ec2b30bc47178ed8d45..f45c74fe745e59d1aee76512c7abfc4dbf0f6300 100644 (file)
@@ -289,8 +289,6 @@ acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info)
         */
        status = acpi_hw_low_disable_gpe(gpe_event_info);
        return_ACPI_STATUS(status);
-
-       return_ACPI_STATUS(AE_OK);
 }
 
 /*******************************************************************************
index 73bfd6bf962ff9758e910dda2a073b892d76f1cf..41554f736b682700b3830a955cfd12e45e13b5a5 100644 (file)
@@ -248,21 +248,15 @@ ACPI_EXPORT_SYMBOL(acpi_set_gpe_type)
  * DESCRIPTION: Enable an ACPI event (general purpose)
  *
  ******************************************************************************/
-acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
+acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number)
 {
        acpi_status status = AE_OK;
+       acpi_cpu_flags flags;
        struct acpi_gpe_event_info *gpe_event_info;
 
        ACPI_FUNCTION_TRACE(acpi_enable_gpe);
 
-       /* Use semaphore lock if not executing at interrupt level */
-
-       if (flags & ACPI_NOT_ISR) {
-               status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS);
-               if (ACPI_FAILURE(status)) {
-                       return_ACPI_STATUS(status);
-               }
-       }
+       flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
 
        /* Ensure that we have a valid GPE number */
 
@@ -277,9 +271,7 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
        status = acpi_ev_enable_gpe(gpe_event_info, TRUE);
 
       unlock_and_exit:
-       if (flags & ACPI_NOT_ISR) {
-               (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
-       }
+       acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
        return_ACPI_STATUS(status);
 }
 
@@ -299,22 +291,15 @@ ACPI_EXPORT_SYMBOL(acpi_enable_gpe)
  * DESCRIPTION: Disable an ACPI event (general purpose)
  *
  ******************************************************************************/
-acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
+acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number)
 {
        acpi_status status = AE_OK;
+       acpi_cpu_flags flags;
        struct acpi_gpe_event_info *gpe_event_info;
 
        ACPI_FUNCTION_TRACE(acpi_disable_gpe);
 
-       /* Use semaphore lock if not executing at interrupt level */
-
-       if (flags & ACPI_NOT_ISR) {
-               status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS);
-               if (ACPI_FAILURE(status)) {
-                       return_ACPI_STATUS(status);
-               }
-       }
-
+       flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
        /* Ensure that we have a valid GPE number */
 
        gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
@@ -325,10 +310,8 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
 
        status = acpi_ev_disable_gpe(gpe_event_info);
 
-      unlock_and_exit:
-       if (flags & ACPI_NOT_ISR) {
-               (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
-       }
+unlock_and_exit:
+       acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
        return_ACPI_STATUS(status);
 }
 
@@ -521,6 +504,9 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
        if (value)
                *event_status |= ACPI_EVENT_FLAG_SET;
 
+       if (acpi_gbl_fixed_event_handlers[event].handler)
+               *event_status |= ACPI_EVENT_FLAG_HANDLE;
+
        return_ACPI_STATUS(status);
 }
 
@@ -571,6 +557,9 @@ acpi_get_gpe_status(acpi_handle gpe_device,
 
        status = acpi_hw_get_gpe_status(gpe_event_info, event_status);
 
+       if (gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK)
+               *event_status |= ACPI_EVENT_FLAG_HANDLE;
+
       unlock_and_exit:
        if (flags & ACPI_NOT_ISR) {
                (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
index 60d54d1f6b195dc282528447682deb7cb3259d1d..eaaee1660bdf41ec490696b812b2c17869daffe9 100644 (file)
@@ -34,7 +34,6 @@
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
 
-#define ACPI_FAN_COMPONENT             0x00200000
 #define ACPI_FAN_CLASS                 "fan"
 #define ACPI_FAN_FILE_STATE            "state"
 
index 24649ada08dfd353c8a9895df6773156520e66ea..adec3d15810a347d7ef6bf4cabc1b84d950ec1b1 100644 (file)
@@ -140,6 +140,46 @@ struct device *acpi_get_physical_device(acpi_handle handle)
 
 EXPORT_SYMBOL(acpi_get_physical_device);
 
+/* ToDo: When a PCI bridge is found, return the PCI device behind the bridge
+ *       This should work in general, but did not on a Lenovo T61 for the
+ *      graphics card. But this must be fixed when the PCI device is
+ *       bound and the kernel device struct is attached to the acpi device
+ * Note: A success call will increase reference count by one
+ *       Do call put_device(dev) on the returned device then
+ */
+struct device *acpi_get_physical_pci_device(acpi_handle handle)
+{
+       struct device *dev;
+       long long device_id;
+       acpi_status status;
+
+       status =
+               acpi_evaluate_integer(handle, "_ADR", NULL, &device_id);
+
+       if (ACPI_FAILURE(status))
+               return NULL;
+
+       /* We need to attempt to determine whether the _ADR refers to a
+          PCI device or not. There's no terribly good way to do this,
+          so the best we can hope for is to assume that there'll never
+          be a device in the host bridge */
+       if (device_id >= 0x10000) {
+               /* It looks like a PCI device. Does it exist? */
+               dev = acpi_get_physical_device(handle);
+       } else {
+               /* It doesn't look like a PCI device. Does its parent
+                  exist? */
+               acpi_handle phandle;
+               if (acpi_get_parent(handle, &phandle))
+                       return NULL;
+               dev = acpi_get_physical_device(phandle);
+       }
+       if (!dev)
+               return NULL;
+       return dev;
+}
+EXPORT_SYMBOL(acpi_get_physical_pci_device);
+
 static int acpi_bind_one(struct device *dev, acpi_handle handle)
 {
        struct acpi_device *acpi_dev;
index 4be252145cb45320cf82b14c4e579c525bf2776e..c8111424dcb88b8a8cdc0e401f025a79149dfaa1 100644 (file)
@@ -35,7 +35,6 @@
 #include <linux/interrupt.h>
 #include <linux/kmod.h>
 #include <linux/delay.h>
-#include <linux/dmi.h>
 #include <linux/workqueue.h>
 #include <linux/nmi.h>
 #include <linux/acpi.h>
@@ -97,54 +96,44 @@ static DEFINE_SPINLOCK(acpi_res_lock);
 static char osi_additional_string[OSI_STRING_LENGTH_MAX];
 
 /*
- * "Ode to _OSI(Linux)"
+ * The story of _OSI(Linux)
  *
- * osi_linux -- Control response to BIOS _OSI(Linux) query.
+ * From pre-history through Linux-2.6.22,
+ * Linux responded TRUE upon a BIOS OSI(Linux) query.
  *
- * As Linux evolves, the features that it supports change.
- * So an OSI string such as "Linux" is not specific enough
- * to be useful across multiple versions of Linux.  It
- * doesn't identify any particular feature, interface,
- * or even any particular version of Linux...
+ * Unfortunately, reference BIOS writers got wind of this
+ * and put OSI(Linux) in their example code, quickly exposing
+ * this string as ill-conceived and opening the door to
+ * an un-bounded number of BIOS incompatibilities.
  *
- * Unfortunately, Linux-2.6.22 and earlier responded "yes"
- * to a BIOS _OSI(Linux) query.  When
- * a reference mobile BIOS started using it, its use
- * started to spread to many vendor platforms.
- * As it is not supportable, we need to halt that spread.
+ * For example, OSI(Linux) was used on resume to re-POST a
+ * video card on one system, because Linux at that time
+ * could not do a speedy restore in its native driver.
+ * But then upon gaining quick native restore capability,
+ * Linux has no way to tell the BIOS to skip the time-consuming
+ * POST -- putting Linux at a permanent performance disadvantage.
+ * On another system, the BIOS writer used OSI(Linux)
+ * to infer native OS support for IPMI!  On other systems,
+ * OSI(Linux) simply got in the way of Linux claiming to
+ * be compatible with other operating systems, exposing
+ * BIOS issues such as skipped device initialization.
  *
- * Today, most BIOS references to _OSI(Linux) are noise --
- * they have no functional effect and are just dead code
- * carried over from the reference BIOS.
- *
- * The next most common case is that _OSI(Linux) harms Linux,
- * usually by causing the BIOS to follow paths that are
- * not tested during Windows validation.
- *
- * Finally, there is a short list of platforms
- * where OSI(Linux) benefits Linux.
- *
- * In Linux-2.6.23, OSI(Linux) is first disabled by default.
- * DMI is used to disable the dmesg warning about OSI(Linux)
- * on platforms where it is known to have no effect.
- * But a dmesg warning remains for systems where
- * we do not know if OSI(Linux) is good or bad for the system.
- * DMI is also used to enable OSI(Linux) for the machines
- * that are known to need it.
+ * So "Linux" turned out to be a really poor chose of
+ * OSI string, and from Linux-2.6.23 onward we respond FALSE.
  *
  * BIOS writers should NOT query _OSI(Linux) on future systems.
- * It will be ignored by default, and to get Linux to
- * not ignore it will require a kernel source update to
- * add a DMI entry, or a boot-time "acpi_osi=Linux" invocation.
+ * Linux will complain on the console when it sees it, and return FALSE.
+ * To get Linux to return TRUE for your system  will require
+ * a kernel source update to add a DMI entry,
+ * or boot with "acpi_osi=Linux"
  */
-#define OSI_LINUX_ENABLE 0
 
 static struct osi_linux {
        unsigned int    enable:1;
        unsigned int    dmi:1;
        unsigned int    cmdline:1;
        unsigned int    known:1;
-} osi_linux = { OSI_LINUX_ENABLE, 0, 0, 0};
+} osi_linux = { 0, 0, 0, 0};
 
 static void __init acpi_request_region (struct acpi_generic_address *addr,
        unsigned int length, char *desc)
@@ -1296,34 +1285,6 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object)
        return (AE_OK);
 }
 
-/**
- *     acpi_dmi_dump - dump DMI slots needed for blacklist entry
- *
- *     Returns 0 on success
- */
-static int acpi_dmi_dump(void)
-{
-
-       if (!dmi_available)
-               return -1;
-
-       printk(KERN_NOTICE PREFIX "DMI System Vendor: %s\n",
-               dmi_get_system_info(DMI_SYS_VENDOR));
-       printk(KERN_NOTICE PREFIX "DMI Product Name: %s\n",
-               dmi_get_system_info(DMI_PRODUCT_NAME));
-       printk(KERN_NOTICE PREFIX "DMI Product Version: %s\n",
-               dmi_get_system_info(DMI_PRODUCT_VERSION));
-       printk(KERN_NOTICE PREFIX "DMI Board Name: %s\n",
-               dmi_get_system_info(DMI_BOARD_NAME));
-       printk(KERN_NOTICE PREFIX "DMI BIOS Vendor: %s\n",
-               dmi_get_system_info(DMI_BIOS_VENDOR));
-       printk(KERN_NOTICE PREFIX "DMI BIOS Date: %s\n",
-               dmi_get_system_info(DMI_BIOS_DATE));
-
-       return 0;
-}
-
-
 /******************************************************************************
  *
  * FUNCTION:    acpi_os_validate_interface
@@ -1350,21 +1311,6 @@ acpi_os_validate_interface (char *interface)
                        osi_linux.cmdline ? " via cmdline" :
                        osi_linux.dmi ? " via DMI" : "");
 
-               if (!osi_linux.dmi) {
-                       if (acpi_dmi_dump())
-                               printk(KERN_NOTICE PREFIX
-                                       "[please extract dmidecode output]\n");
-                       printk(KERN_NOTICE PREFIX
-                               "Please send DMI info above to "
-                               "linux-acpi@vger.kernel.org\n");
-               }
-               if (!osi_linux.known && !osi_linux.cmdline) {
-                       printk(KERN_NOTICE PREFIX
-                               "If \"acpi_osi=%sLinux\" works better, "
-                               "please notify linux-acpi@vger.kernel.org\n",
-                               osi_linux.enable ? "!" : "");
-               }
-
                if (osi_linux.enable)
                        return AE_OK;
        }
index 11acaee14d66ddb1752f9432107f46bf0fc1b146..bf79d83bdfbbbade9a942a297e90b0223eef5946 100644 (file)
@@ -384,6 +384,27 @@ acpi_pci_free_irq(struct acpi_prt_entry *entry,
        return irq;
 }
 
+#ifdef CONFIG_X86_IO_APIC
+extern int noioapicquirk;
+
+static int bridge_has_boot_interrupt_variant(struct pci_bus *bus)
+{
+       struct pci_bus *bus_it;
+
+       for (bus_it = bus ; bus_it ; bus_it = bus_it->parent) {
+               if (!bus_it->self)
+                       return 0;
+
+               printk(KERN_INFO "vendor=%04x device=%04x\n", bus_it->self->vendor,
+                               bus_it->self->device);
+
+               if (bus_it->self->irq_reroute_variant)
+                       return bus_it->self->irq_reroute_variant;
+       }
+       return 0;
+}
+#endif /* CONFIG_X86_IO_APIC */
+
 /*
  * acpi_pci_irq_lookup
  * success: return IRQ >= 0
@@ -413,6 +434,41 @@ acpi_pci_irq_lookup(struct pci_bus *bus,
        }
 
        ret = func(entry, triggering, polarity, link);
+
+#ifdef CONFIG_X86_IO_APIC
+       /*
+        * Some chipsets (e.g. intel 6700PXH) generate a legacy INTx when the
+        * IRQ entry in the chipset's IO-APIC is masked (as, e.g. the RT kernel
+        * does during interrupt handling). When this INTx generation cannot be
+        * disabled, we reroute these interrupts to their legacy equivalent to
+        * get rid of spurious interrupts.
+        */
+        if (!noioapicquirk) {
+               switch (bridge_has_boot_interrupt_variant(bus)) {
+               case 0:
+                       /* no rerouting necessary */
+                       break;
+
+               case INTEL_IRQ_REROUTE_VARIANT:
+                       /*
+                        * Remap according to INTx routing table in 6700PXH
+                        * specs, intel order number 302628-002, section
+                        * 2.15.2. Other chipsets (80332, ...) have the same
+                        * mapping and are handled here as well.
+                        */
+                       printk(KERN_INFO "pci irq %d -> rerouted to legacy "
+                                        "irq %d\n", ret, (ret % 4) + 16);
+                       ret = (ret % 4) + 16;
+                       break;
+
+               default:
+                       printk(KERN_INFO "not rerouting irq %d to legacy irq: "
+                                        "unknown mapping\n", ret);
+                       break;
+               }
+       }
+#endif /* CONFIG_X86_IO_APIC */
+
        return ret;
 }
 
index fcfdef7b4fddfb11f5a80a9540ad1475bf20e9da..e52ad91ce2dc2c93b76f887cd0902806ef1af013 100644 (file)
@@ -531,7 +531,7 @@ int __init acpi_irq_penalty_init(void)
        return 0;
 }
 
-static int acpi_irq_balance;   /* 0: static, 1: balance */
+static int acpi_irq_balance = -1;      /* 0: static, 1: balance */
 
 static int acpi_pci_link_allocate(struct acpi_pci_link *link)
 {
@@ -950,10 +950,17 @@ device_initcall(irqrouter_init_sysfs);
 
 static int __init acpi_pci_link_init(void)
 {
-
        if (acpi_noirq)
                return 0;
 
+       if (acpi_irq_balance == -1) {
+               /* no command line switch: enable balancing in IOAPIC mode */
+               if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC)
+                       acpi_irq_balance = 1;
+               else
+                       acpi_irq_balance = 0;
+       }
+
        acpi_link.count = 0;
        INIT_LIST_HEAD(&acpi_link.entries);
 
index 1b8f67d21d539c427f29ef2b60b34c922e780abd..642554b1b60c4918f018890f16bdccd68a31b629 100644 (file)
@@ -376,15 +376,9 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type)
 
 static int __init acpi_pci_root_init(void)
 {
-
        if (acpi_pci_disabled)
                return 0;
 
-       /* DEBUG:
-          acpi_dbg_layer = ACPI_PCI_COMPONENT;
-          acpi_dbg_level = 0xFFFFFFFF;
-        */
-
        if (acpi_bus_register_driver(&acpi_pci_root_driver) < 0)
                return -ENODEV;
 
index a1718e56103b33b5da9909b23727c4474611f90f..bb7d50dd28186d3c1d7e5d3d1bdb735aeab1944c 100644 (file)
@@ -44,9 +44,8 @@
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
 
-#define _COMPONENT             ACPI_POWER_COMPONENT
+#define _COMPONENT                     ACPI_POWER_COMPONENT
 ACPI_MODULE_NAME("power");
-#define ACPI_POWER_COMPONENT           0x00800000
 #define ACPI_POWER_CLASS               "power_resource"
 #define ACPI_POWER_DEVICE_NAME         "Power Resource"
 #define ACPI_POWER_FILE_INFO           "info"
@@ -153,7 +152,8 @@ static int acpi_power_get_state(acpi_handle handle, int *state)
                              ACPI_POWER_RESOURCE_STATE_OFF;
 
        ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] is %s\n",
-                         acpi_ut_get_node_name(handle), state ? "on" : "off"));
+                         acpi_ut_get_node_name(handle),
+                               *state ? "on" : "off"));
 
        return 0;
 }
@@ -516,11 +516,6 @@ int acpi_power_transition(struct acpi_device *device, int state)
        cl = &device->power.states[device->power.state].resources;
        tl = &device->power.states[state].resources;
 
-       if (!cl->count && !tl->count) {
-               result = -ENODEV;
-               goto end;
-       }
-
        /* TBD: Resources must be ordered. */
 
        /*
index 24a362f8034c49a722005efec417714560b5b9cf..34948362f41d0f820880b6ef723f783487b7e800 100644 (file)
@@ -59,7 +59,6 @@
 #include <acpi/acpi_drivers.h>
 #include <acpi/processor.h>
 
-#define ACPI_PROCESSOR_COMPONENT       0x01000000
 #define ACPI_PROCESSOR_CLASS           "processor"
 #define ACPI_PROCESSOR_DEVICE_NAME     "Processor"
 #define ACPI_PROCESSOR_FILE_INFO       "info"
@@ -89,6 +88,7 @@ static int acpi_processor_handle_eject(struct acpi_processor *pr);
 
 
 static const struct acpi_device_id processor_device_ids[] = {
+       {ACPI_PROCESSOR_OBJECT_HID, 0},
        {ACPI_PROCESSOR_HID, 0},
        {"", 0},
 };
@@ -409,7 +409,7 @@ static int acpi_processor_remove_fs(struct acpi_device *device)
 /* Use the acpiid in MADT to map cpus in case of SMP */
 
 #ifndef CONFIG_SMP
-static int get_cpu_id(acpi_handle handle, u32 acpi_id) {return -1;}
+static int get_cpu_id(acpi_handle handle, int type, u32 acpi_id) { return -1; }
 #else
 
 static struct acpi_table_madt *madt;
@@ -428,27 +428,35 @@ static int map_lapic_id(struct acpi_subtable_header *entry,
 }
 
 static int map_lsapic_id(struct acpi_subtable_header *entry,
-                 u32 acpi_id, int *apic_id)
+               int device_declaration, u32 acpi_id, int *apic_id)
 {
        struct acpi_madt_local_sapic *lsapic =
                (struct acpi_madt_local_sapic *)entry;
+       u32 tmp = (lsapic->id << 8) | lsapic->eid;
+
        /* Only check enabled APICs*/
-       if (lsapic->lapic_flags & ACPI_MADT_ENABLED) {
-               /* First check against id */
-               if (lsapic->processor_id == acpi_id) {
-                       *apic_id = (lsapic->id << 8) | lsapic->eid;
-                       return 1;
-               /* Check against optional uid */
-               } else if (entry->length >= 16 &&
-                       lsapic->uid == acpi_id) {
-                       *apic_id = lsapic->uid;
-                       return 1;
-               }
-       }
+       if (!(lsapic->lapic_flags & ACPI_MADT_ENABLED))
+               return 0;
+
+       /* Device statement declaration type */
+       if (device_declaration) {
+               if (entry->length < 16)
+                       printk(KERN_ERR PREFIX
+                           "Invalid LSAPIC with Device type processor (SAPIC ID %#x)\n",
+                           tmp);
+               else if (lsapic->uid == acpi_id)
+                       goto found;
+       /* Processor statement declaration type */
+       } else if (lsapic->processor_id == acpi_id)
+               goto found;
+
        return 0;
+found:
+       *apic_id = tmp;
+       return 1;
 }
 
-static int map_madt_entry(u32 acpi_id)
+static int map_madt_entry(int type, u32 acpi_id)
 {
        unsigned long madt_end, entry;
        int apic_id = -1;
@@ -469,7 +477,7 @@ static int map_madt_entry(u32 acpi_id)
                        if (map_lapic_id(header, acpi_id, &apic_id))
                                break;
                } else if (header->type == ACPI_MADT_TYPE_LOCAL_SAPIC) {
-                       if (map_lsapic_id(header, acpi_id, &apic_id))
+                       if (map_lsapic_id(header, type, acpi_id, &apic_id))
                                break;
                }
                entry += header->length;
@@ -477,7 +485,7 @@ static int map_madt_entry(u32 acpi_id)
        return apic_id;
 }
 
-static int map_mat_entry(acpi_handle handle, u32 acpi_id)
+static int map_mat_entry(acpi_handle handle, int type, u32 acpi_id)
 {
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
        union acpi_object *obj;
@@ -500,7 +508,7 @@ static int map_mat_entry(acpi_handle handle, u32 acpi_id)
        if (header->type == ACPI_MADT_TYPE_LOCAL_APIC) {
                map_lapic_id(header, acpi_id, &apic_id);
        } else if (header->type == ACPI_MADT_TYPE_LOCAL_SAPIC) {
-               map_lsapic_id(header, acpi_id, &apic_id);
+               map_lsapic_id(header, type, acpi_id, &apic_id);
        }
 
 exit:
@@ -509,14 +517,14 @@ exit:
        return apic_id;
 }
 
-static int get_cpu_id(acpi_handle handle, u32 acpi_id)
+static int get_cpu_id(acpi_handle handle, int type, u32 acpi_id)
 {
        int i;
        int apic_id = -1;
 
-       apic_id = map_mat_entry(handle, acpi_id);
+       apic_id = map_mat_entry(handle, type, acpi_id);
        if (apic_id == -1)
-               apic_id = map_madt_entry(acpi_id);
+               apic_id = map_madt_entry(type, acpi_id);
        if (apic_id == -1)
                return apic_id;
 
@@ -532,15 +540,16 @@ static int get_cpu_id(acpi_handle handle, u32 acpi_id)
                                  Driver Interface
    -------------------------------------------------------------------------- */
 
-static int acpi_processor_get_info(struct acpi_processor *pr, unsigned has_uid)
+static int acpi_processor_get_info(struct acpi_device *device)
 {
        acpi_status status = 0;
        union acpi_object object = { 0 };
        struct acpi_buffer buffer = { sizeof(union acpi_object), &object };
-       int cpu_index;
+       struct acpi_processor *pr;
+       int cpu_index, device_declaration = 0;
        static int cpu0_initialized;
 
-
+       pr = acpi_driver_data(device);
        if (!pr)
                return -EINVAL;
 
@@ -561,22 +570,23 @@ static int acpi_processor_get_info(struct acpi_processor *pr, unsigned has_uid)
                ACPI_DEBUG_PRINT((ACPI_DB_INFO,
                                  "No bus mastering arbitration control\n"));
 
-       /* Check if it is a Device with HID and UID */
-       if (has_uid) {
+       if (!strcmp(acpi_device_hid(device), ACPI_PROCESSOR_HID)) {
+               /*
+                * Declared with "Device" statement; match _UID.
+                * Note that we don't handle string _UIDs yet.
+                */
                unsigned long long value;
                status = acpi_evaluate_integer(pr->handle, METHOD_NAME__UID,
                                                NULL, &value);
                if (ACPI_FAILURE(status)) {
-                       printk(KERN_ERR PREFIX "Evaluating processor _UID\n");
+                       printk(KERN_ERR PREFIX
+                           "Evaluating processor _UID [%#x]\n", status);
                        return -ENODEV;
                }
+               device_declaration = 1;
                pr->acpi_id = value;
        } else {
-               /*
-               * Evalute the processor object.  Note that it is common on SMP to
-               * have the first (boot) processor with a valid PBLK address while
-               * all others have a NULL address.
-               */
+               /* Declared with "Processor" statement; match ProcessorID */
                status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer);
                if (ACPI_FAILURE(status)) {
                        printk(KERN_ERR PREFIX "Evaluating processor object\n");
@@ -584,12 +594,13 @@ static int acpi_processor_get_info(struct acpi_processor *pr, unsigned has_uid)
                }
 
                /*
-               * TBD: Synch processor ID (via LAPIC/LSAPIC structures) on SMP.
-               *      >>> 'acpi_get_processor_id(acpi_id, &id)' in arch/xxx/acpi.c
-               */
+                * TBD: Synch processor ID (via LAPIC/LSAPIC structures) on SMP.
+                *      >>> 'acpi_get_processor_id(acpi_id, &id)' in
+                *      arch/xxx/acpi.c
+                */
                pr->acpi_id = object.processor.proc_id;
        }
-       cpu_index = get_cpu_id(pr->handle, pr->acpi_id);
+       cpu_index = get_cpu_id(pr->handle, device_declaration, pr->acpi_id);
 
        /* Handle UP system running SMP kernel, with no LAPIC in MADT */
        if (!cpu0_initialized && (cpu_index == -1) &&
@@ -661,7 +672,7 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)
 
        pr = acpi_driver_data(device);
 
-       result = acpi_processor_get_info(pr, device->flags.unique_id);
+       result = acpi_processor_get_info(device);
        if (result) {
                /* Processor is physically not present */
                return 0;
@@ -761,20 +772,20 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
                acpi_bus_generate_proc_event(device, event,
                                        pr->performance_platform_limit);
                acpi_bus_generate_netlink_event(device->pnp.device_class,
-                                                 device->dev.bus_id, event,
+                                                 dev_name(&device->dev), event,
                                                  pr->performance_platform_limit);
                break;
        case ACPI_PROCESSOR_NOTIFY_POWER:
                acpi_processor_cst_has_changed(pr);
                acpi_bus_generate_proc_event(device, event, 0);
                acpi_bus_generate_netlink_event(device->pnp.device_class,
-                                                 device->dev.bus_id, event, 0);
+                                                 dev_name(&device->dev), event, 0);
                break;
        case ACPI_PROCESSOR_NOTIFY_THROTTLING:
                acpi_processor_tstate_has_changed(pr);
                acpi_bus_generate_proc_event(device, event, 0);
                acpi_bus_generate_netlink_event(device->pnp.device_class,
-                                                 device->dev.bus_id, event, 0);
+                                                 dev_name(&device->dev), event, 0);
        default:
                ACPI_DEBUG_PRINT((ACPI_DB_INFO,
                                  "Unsupported event [0x%x]\n", event));
index 81b40ed5379e76edcd02553aaa4881f1107a1422..5f8d746a9b8198e516321ccdaaa8c5a1486b39b7 100644 (file)
@@ -59,7 +59,6 @@
 #include <acpi/processor.h>
 #include <asm/processor.h>
 
-#define ACPI_PROCESSOR_COMPONENT        0x01000000
 #define ACPI_PROCESSOR_CLASS            "processor"
 #define _COMPONENT              ACPI_PROCESSOR_COMPONENT
 ACPI_MODULE_NAME("processor_idle");
index dbcf260ea93fce4d65b59dcd90c85d70f868c1b5..0d7b772bef50269545b0cf602f72958d9fdf4c23 100644 (file)
@@ -44,9 +44,9 @@
 #endif
 
 #include <acpi/acpi_bus.h>
+#include <acpi/acpi_drivers.h>
 #include <acpi/processor.h>
 
-#define ACPI_PROCESSOR_COMPONENT       0x01000000
 #define ACPI_PROCESSOR_CLASS           "processor"
 #define ACPI_PROCESSOR_FILE_PERFORMANCE        "performance"
 #define _COMPONENT             ACPI_PROCESSOR_COMPONENT
index ef34b18f95ca52e50c5bae79c2436d5b76a4d6fb..b1eb376fae459fd5e28ed3dfd94de137f4857e49 100644 (file)
@@ -40,7 +40,6 @@
 #include <acpi/processor.h>
 #include <acpi/acpi_drivers.h>
 
-#define ACPI_PROCESSOR_COMPONENT        0x01000000
 #define ACPI_PROCESSOR_CLASS            "processor"
 #define _COMPONENT              ACPI_PROCESSOR_COMPONENT
 ACPI_MODULE_NAME("processor_thermal");
index 3da2df93d924ddf534af4e24d16fd635f3c6ef3c..a0c38c94a8a08d0ace6d8b5b05bc2c4caf671965 100644 (file)
@@ -38,9 +38,9 @@
 #include <asm/uaccess.h>
 
 #include <acpi/acpi_bus.h>
+#include <acpi/acpi_drivers.h>
 #include <acpi/processor.h>
 
-#define ACPI_PROCESSOR_COMPONENT        0x01000000
 #define ACPI_PROCESSOR_CLASS            "processor"
 #define _COMPONENT              ACPI_PROCESSOR_COMPONENT
 ACPI_MODULE_NAME("processor_throttling");
index 755baf2ca70ad5b44676390242038a737e0f46a2..a6b662c00b67764d311366963171a1a5b289f73d 100644 (file)
@@ -15,28 +15,9 @@ void acpi_reboot(void)
 
        rr = &acpi_gbl_FADT.reset_register;
 
-       /*
-        * Is the ACPI reset register supported?
-        *
-        * According to ACPI 3.0, FADT.flags.RESET_REG_SUP indicates
-        * whether the ACPI reset mechanism is supported.
-        *
-        * However, some boxes have this bit clear, yet a valid
-        * ACPI_RESET_REG & RESET_VALUE, and ACPI reboot is the only
-        * mechanism that works for them after S3.
-        *
-        * This suggests that other operating systems may not be checking
-        * the RESET_REG_SUP bit, and are using other means to decide
-        * whether to use the ACPI reboot mechanism or not.
-        *
-        * So when acpi reboot is requested,
-        * only the reset_register is checked. If the following
-        * conditions are met, it indicates that the reset register is supported.
-        *      a. reset_register is not zero
-        *      b. the access width is eight
-        *      c. the bit_offset is zero
-        */
-       if (!(rr->address) || rr->bit_width != 8 || rr->bit_offset != 0)
+       /* Is the reset register supported? */
+       if (!(acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER) ||
+           rr->bit_width != 8 || rr->bit_offset != 0)
                return;
 
        reset_value = acpi_gbl_FADT.reset_value;
index a9dda8e0f9f9c2c14859b027fcd80b1b88abdeda..39b7233c348592670ef86b1df5747f3d90151dc9 100644 (file)
@@ -109,8 +109,7 @@ static int acpi_bus_hot_remove_device(void *context)
                return 0;
 
        ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-               "Hot-removing device %s...\n", device->dev.bus_id));
-
+               "Hot-removing device %s...\n", dev_name(&device->dev)));
 
        if (acpi_bus_trim(device, 1)) {
                printk(KERN_ERR PREFIX
@@ -460,7 +459,7 @@ static int acpi_device_register(struct acpi_device *device,
                acpi_device_bus_id->instance_no = 0;
                list_add_tail(&acpi_device_bus_id->node, &acpi_bus_id_list);
        }
-       sprintf(device->dev.bus_id, "%s:%02x", acpi_device_bus_id->bus_id, acpi_device_bus_id->instance_no);
+       dev_set_name(&device->dev, "%s:%02x", acpi_device_bus_id->bus_id, acpi_device_bus_id->instance_no);
 
        if (device->parent) {
                list_add_tail(&device->node, &device->parent->children);
@@ -484,7 +483,8 @@ static int acpi_device_register(struct acpi_device *device,
 
        result = acpi_device_setup_files(device);
        if(result)
-               printk(KERN_ERR PREFIX "Error creating sysfs interface for device %s\n", device->dev.bus_id);
+               printk(KERN_ERR PREFIX "Error creating sysfs interface for device %s\n",
+                      dev_name(&device->dev));
 
        device->removal_type = ACPI_BUS_REMOVAL_NORMAL;
        return 0;
@@ -751,16 +751,6 @@ static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device)
        if (!acpi_match_device_ids(device, button_device_ids))
                device->wakeup.flags.run_wake = 1;
 
-       /*
-        * Don't set Power button GPE as run_wake
-        * if Fixed Power button is used
-        */
-       if (!strcmp(device->pnp.hardware_id, "PNP0C0C") &&
-               !(acpi_gbl_FADT.flags & ACPI_FADT_POWER_BUTTON)) {
-               device->wakeup.flags.run_wake = 0;
-               device->wakeup.flags.valid = 0;
-       }
-
       end:
        if (ACPI_FAILURE(status))
                device->flags.wake_capable = 0;
@@ -919,36 +909,6 @@ static void acpi_device_get_busid(struct acpi_device *device,
        }
 }
 
-static int
-acpi_video_bus_match(struct acpi_device *device)
-{
-       acpi_handle h_dummy;
-
-       if (!device)
-               return -EINVAL;
-
-       /* Since there is no HID, CID for ACPI Video drivers, we have
-        * to check well known required nodes for each feature we support.
-        */
-
-       /* Does this device able to support video switching ? */
-       if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy)) &&
-           ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy)))
-               return 0;
-
-       /* Does this device able to retrieve a video ROM ? */
-       if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_ROM", &h_dummy)))
-               return 0;
-
-       /* Does this device able to configure which video head to be POSTed ? */
-       if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_VPO", &h_dummy)) &&
-           ACPI_SUCCESS(acpi_get_handle(device->handle, "_GPD", &h_dummy)) &&
-           ACPI_SUCCESS(acpi_get_handle(device->handle, "_SPD", &h_dummy)))
-               return 0;
-
-       return -ENODEV;
-}
-
 /*
  * acpi_bay_match - see if a device is an ejectable driver bay
  *
@@ -1031,7 +991,7 @@ static void acpi_device_set_id(struct acpi_device *device,
                   will get autoloaded and the device might still match
                   against another driver.
                */
-               if (ACPI_SUCCESS(acpi_video_bus_match(device)))
+               if (acpi_is_video_device(device))
                        cid_add = ACPI_VIDEO_HID;
                else if (ACPI_SUCCESS(acpi_bay_match(device)))
                        cid_add = ACPI_BAY_HID;
@@ -1043,7 +1003,7 @@ static void acpi_device_set_id(struct acpi_device *device,
                hid = ACPI_POWER_HID;
                break;
        case ACPI_BUS_TYPE_PROCESSOR:
-               hid = ACPI_PROCESSOR_HID;
+               hid = ACPI_PROCESSOR_OBJECT_HID;
                break;
        case ACPI_BUS_TYPE_SYSTEM:
                hid = ACPI_SYSTEM_HID;
index 80c0868d0480e76a0eced99a00a163f98114353c..28a691cc625ebec8827454e98cfaa94b5260b9ce 100644 (file)
@@ -90,6 +90,18 @@ void __init acpi_old_suspend_ordering(void)
        old_suspend_ordering = true;
 }
 
+/*
+ * According to the ACPI specification the BIOS should make sure that ACPI is
+ * enabled and SCI_EN bit is set on wake-up from S1 - S3 sleep states.  Still,
+ * some BIOSes don't do that and therefore we use acpi_enable() to enable ACPI
+ * on such systems during resume.  Unfortunately that doesn't help in
+ * particularly pathological cases in which SCI_EN has to be set directly on
+ * resume, although the specification states very clearly that this flag is
+ * owned by the hardware.  The set_sci_en_on_resume variable will be set in such
+ * cases.
+ */
+static bool set_sci_en_on_resume;
+
 /**
  *     acpi_pm_disable_gpes - Disable the GPEs.
  */
@@ -235,7 +247,11 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
        }
 
        /* If ACPI is not enabled by the BIOS, we need to enable it here. */
-       acpi_enable();
+       if (set_sci_en_on_resume)
+               acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1);
+       else
+               acpi_enable();
+
        /* Reprogram control registers and execute _BFS */
        acpi_leave_sleep_state_prep(acpi_state);
 
@@ -323,6 +339,12 @@ static int __init init_old_suspend_ordering(const struct dmi_system_id *d)
        return 0;
 }
 
+static int __init init_set_sci_en_on_resume(const struct dmi_system_id *d)
+{
+       set_sci_en_on_resume = true;
+       return 0;
+}
+
 static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
        {
        .callback = init_old_suspend_ordering,
@@ -340,6 +362,22 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
                DMI_MATCH(DMI_PRODUCT_NAME, "HP xw4600 Workstation"),
                },
        },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Apple MacBook 1,1",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "Apple Computer, Inc."),
+               DMI_MATCH(DMI_PRODUCT_NAME, "MacBook1,1"),
+               },
+       },
+       {
+       .callback = init_set_sci_en_on_resume,
+       .ident = "Apple MacMini 1,1",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "Apple Computer, Inc."),
+               DMI_MATCH(DMI_PRODUCT_NAME, "Macmini1,1"),
+               },
+       },
        {},
 };
 #endif /* CONFIG_SUSPEND */
index 631ee2ee2ca0028193ab5d52dee2acc0d15579f2..4dbc2271acf5009cda80e48fdf19048f28b722a7 100644 (file)
@@ -367,7 +367,7 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset)
                if (ldev)
                        seq_printf(seq, "%s:%s",
                                   ldev->bus ? ldev->bus->name : "no-bus",
-                                  ldev->bus_id);
+                                  dev_name(ldev));
                seq_printf(seq, "\n");
                put_device(ldev);
 
index 38655eb132dcca3a42ac2db56f2daf79d3b10286..dea4c23df7648bb8ed3781bc455edb835a58b0b8 100644 (file)
@@ -88,7 +88,7 @@ void acpi_enable_wakeup_device(u8 sleep_state)
                spin_unlock(&acpi_device_lock);
                if (!dev->wakeup.flags.run_wake)
                        acpi_enable_gpe(dev->wakeup.gpe_device,
-                                       dev->wakeup.gpe_number, ACPI_ISR);
+                                       dev->wakeup.gpe_number);
                spin_lock(&acpi_device_lock);
        }
        spin_unlock(&acpi_device_lock);
@@ -122,7 +122,7 @@ void acpi_disable_wakeup_device(u8 sleep_state)
                                                  ACPI_GPE_TYPE_WAKE_RUN);
                                /* Re-enable it, since set_gpe_type will disable it */
                                acpi_enable_gpe(dev->wakeup.gpe_device,
-                                               dev->wakeup.gpe_number, ACPI_NOT_ISR);
+                                               dev->wakeup.gpe_number);
                                spin_lock(&acpi_device_lock);
                        }
                        continue;
@@ -133,7 +133,7 @@ void acpi_disable_wakeup_device(u8 sleep_state)
                /* Never disable run-wake GPE */
                if (!dev->wakeup.flags.run_wake) {
                        acpi_disable_gpe(dev->wakeup.gpe_device,
-                                        dev->wakeup.gpe_number, ACPI_NOT_ISR);
+                                        dev->wakeup.gpe_number);
                        acpi_clear_gpe(dev->wakeup.gpe_device,
                                       dev->wakeup.gpe_number, ACPI_NOT_ISR);
                }
@@ -162,7 +162,7 @@ static int __init acpi_wakeup_device_init(void)
                                  dev->wakeup.gpe_number,
                                  ACPI_GPE_TYPE_WAKE_RUN);
                acpi_enable_gpe(dev->wakeup.gpe_device,
-                               dev->wakeup.gpe_number, ACPI_NOT_ISR);
+                               dev->wakeup.gpe_number);
                dev->wakeup.state.enabled = 1;
                spin_lock(&acpi_device_lock);
        }
index 1d74171b7940ff3e1975cf9f071069666ebed303..6e4107f824039bdee65174c38dbcce06672ee119 100644 (file)
@@ -78,9 +78,15 @@ static ssize_t acpi_table_show(struct kobject *kobj,
            container_of(bin_attr, struct acpi_table_attr, attr);
        struct acpi_table_header *table_header = NULL;
        acpi_status status;
+       char name[ACPI_NAME_SIZE];
+
+       if (strncmp(table_attr->name, "NULL", 4))
+               memcpy(name, table_attr->name, ACPI_NAME_SIZE);
+       else
+               memcpy(name, "\0\0\0\0", 4);
 
        status =
-           acpi_get_table(table_attr->name, table_attr->instance,
+           acpi_get_table(name, table_attr->instance,
                           &table_header);
        if (ACPI_FAILURE(status))
                return -ENODEV;
@@ -95,21 +101,24 @@ static void acpi_table_attr_init(struct acpi_table_attr *table_attr,
        struct acpi_table_header *header = NULL;
        struct acpi_table_attr *attr = NULL;
 
-       memcpy(table_attr->name, table_header->signature, ACPI_NAME_SIZE);
+       if (table_header->signature[0] != '\0')
+               memcpy(table_attr->name, table_header->signature,
+                       ACPI_NAME_SIZE);
+       else
+               memcpy(table_attr->name, "NULL", 4);
 
        list_for_each_entry(attr, &acpi_table_attr_list, node) {
-               if (!memcmp(table_header->signature, attr->name,
-                           ACPI_NAME_SIZE))
+               if (!memcmp(table_attr->name, attr->name, ACPI_NAME_SIZE))
                        if (table_attr->instance < attr->instance)
                                table_attr->instance = attr->instance;
        }
        table_attr->instance++;
 
        if (table_attr->instance > 1 || (table_attr->instance == 1 &&
-                                        !acpi_get_table(table_header->
-                                                        signature, 2,
-                                                        &header)))
-               sprintf(table_attr->name + 4, "%d", table_attr->instance);
+                                       !acpi_get_table
+                                       (table_header->signature, 2, &header)))
+               sprintf(table_attr->name + ACPI_NAME_SIZE, "%d",
+                       table_attr->instance);
 
        table_attr->attr.size = 0;
        table_attr->attr.read = acpi_table_show;
@@ -167,7 +176,6 @@ static int acpi_system_sysfs_init(void)
 #define COUNT_ERROR 2  /* other */
 #define NUM_COUNTERS_EXTRA 3
 
-#define ACPI_EVENT_VALID       0x01
 struct event_counter {
        u32 count;
        u32 flags;
@@ -312,12 +320,6 @@ static int get_status(u32 index, acpi_event_status *status, acpi_handle *handle)
        } else if (index < (num_gpes + ACPI_NUM_FIXED_EVENTS))
                result = acpi_get_event_status(index - num_gpes, status);
 
-       /*
-        * sleep/power button GPE/Fixed Event is enabled after acpi_system_init,
-        * check the status at runtime and mark it as valid once it's enabled
-        */
-       if (!result && (*status & ACPI_EVENT_FLAG_ENABLED))
-               all_counters[index].flags |= ACPI_EVENT_VALID;
 end:
        return result;
 }
@@ -346,12 +348,14 @@ static ssize_t counter_show(struct kobject *kobj,
        if (result)
                goto end;
 
-       if (!(all_counters[index].flags & ACPI_EVENT_VALID))
-               size += sprintf(buf + size, "  invalid");
+       if (!(status & ACPI_EVENT_FLAG_HANDLE))
+               size += sprintf(buf + size, "   invalid");
        else if (status & ACPI_EVENT_FLAG_ENABLED)
-               size += sprintf(buf + size, "   enable");
+               size += sprintf(buf + size, "   enabled");
+       else if (status & ACPI_EVENT_FLAG_WAKE_ENABLED)
+               size += sprintf(buf + size, "   wake_enabled");
        else
-               size += sprintf(buf + size, "  disable");
+               size += sprintf(buf + size, "   disabled");
 
 end:
        size += sprintf(buf + size, "\n");
@@ -385,7 +389,7 @@ static ssize_t counter_set(struct kobject *kobj,
        if (result)
                goto end;
 
-       if (!(all_counters[index].flags & ACPI_EVENT_VALID)) {
+       if (!(status & ACPI_EVENT_FLAG_HANDLE)) {
                printk(KERN_WARNING PREFIX
                        "Can not change Invalid GPE/Fixed Event status\n");
                return -EINVAL;
@@ -394,10 +398,10 @@ static ssize_t counter_set(struct kobject *kobj,
        if (index < num_gpes) {
                if (!strcmp(buf, "disable\n") &&
                                (status & ACPI_EVENT_FLAG_ENABLED))
-                       result = acpi_disable_gpe(handle, index, ACPI_NOT_ISR);
+                       result = acpi_disable_gpe(handle, index);
                else if (!strcmp(buf, "enable\n") &&
                                !(status & ACPI_EVENT_FLAG_ENABLED))
-                       result = acpi_enable_gpe(handle, index, ACPI_NOT_ISR);
+                       result = acpi_enable_gpe(handle, index);
                else if (!strcmp(buf, "clear\n") &&
                                (status & ACPI_EVENT_FLAG_SET))
                        result = acpi_clear_gpe(handle, index, ACPI_NOT_ISR);
index 2c7885e7ffba6c06508e261f5ef547819661db51..2817158fb6a1b7cd8f2b2ad01f522e19af67b9f1 100644 (file)
@@ -304,7 +304,7 @@ static void acpi_tb_convert_fadt(void)
         * The ACPI 1.0 reserved fields that will be zeroed are the bytes located at
         * offset 45, 55, 95, and the word located at offset 109, 110.
         */
-       if (acpi_gbl_FADT.header.revision < 3) {
+       if (acpi_gbl_FADT.header.revision < FADT2_REVISION_ID) {
                acpi_gbl_FADT.preferred_profile = 0;
                acpi_gbl_FADT.pstate_control = 0;
                acpi_gbl_FADT.cst_control = 0;
index ad6cae938f0b8cabfff04f305c577f0970bd1cb8..073ff09218a9be62ac2acc25601080b4c87976e6 100644 (file)
@@ -47,7 +47,6 @@
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
 
-#define ACPI_THERMAL_COMPONENT         0x04000000
 #define ACPI_THERMAL_CLASS             "thermal_zone"
 #define ACPI_THERMAL_DEVICE_NAME       "Thermal Zone"
 #define ACPI_THERMAL_FILE_STATE                "state"
@@ -576,7 +575,7 @@ static int acpi_thermal_critical(struct acpi_thermal *tz)
        acpi_bus_generate_proc_event(tz->device, ACPI_THERMAL_NOTIFY_CRITICAL,
                                tz->trips.critical.flags.enabled);
        acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
-                                         tz->device->dev.bus_id,
+                                         dev_name(&tz->device->dev),
                                          ACPI_THERMAL_NOTIFY_CRITICAL,
                                          tz->trips.critical.flags.enabled);
 
@@ -605,7 +604,7 @@ static int acpi_thermal_hot(struct acpi_thermal *tz)
        acpi_bus_generate_proc_event(tz->device, ACPI_THERMAL_NOTIFY_HOT,
                                tz->trips.hot.flags.enabled);
        acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
-                                         tz->device->dev.bus_id,
+                                         dev_name(&tz->device->dev),
                                          ACPI_THERMAL_NOTIFY_HOT,
                                          tz->trips.hot.flags.enabled);
 
@@ -1592,14 +1591,14 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data)
                acpi_thermal_check(tz);
                acpi_bus_generate_proc_event(device, event, 0);
                acpi_bus_generate_netlink_event(device->pnp.device_class,
-                                                 device->dev.bus_id, event, 0);
+                                                 dev_name(&device->dev), event, 0);
                break;
        case ACPI_THERMAL_NOTIFY_DEVICES:
                acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_DEVICES);
                acpi_thermal_check(tz);
                acpi_bus_generate_proc_event(device, event, 0);
                acpi_bus_generate_netlink_event(device->pnp.device_class,
-                                                 device->dev.bus_id, event, 0);
+                                                 dev_name(&device->dev), event, 0);
                break;
        default:
                ACPI_DEBUG_PRINT((ACPI_DB_INFO,
index 66aac06f2ac5abd47ec7e5ecf7267f2b3c6e30aa..40e60fc2e596daead5c656396aa84fca0587868b 100644 (file)
@@ -824,34 +824,36 @@ static int __init toshiba_acpi_init(void)
                        toshiba_acpi_exit();
                        return -ENOMEM;
                }
-       }
 
-       /* Register input device for kill switch */
-       toshiba_acpi.poll_dev = input_allocate_polled_device();
-       if (!toshiba_acpi.poll_dev) {
-               printk(MY_ERR "unable to allocate kill-switch input device\n");
-               toshiba_acpi_exit();
-               return -ENOMEM;
-       }
-       toshiba_acpi.poll_dev->private = &toshiba_acpi;
-       toshiba_acpi.poll_dev->poll = bt_poll_rfkill;
-       toshiba_acpi.poll_dev->poll_interval = 1000; /* msecs */
-
-       toshiba_acpi.poll_dev->input->name = toshiba_acpi.rfk_name;
-       toshiba_acpi.poll_dev->input->id.bustype = BUS_HOST;
-       toshiba_acpi.poll_dev->input->id.vendor = 0x0930; /* Toshiba USB ID */
-       set_bit(EV_SW, toshiba_acpi.poll_dev->input->evbit);
-       set_bit(SW_RFKILL_ALL, toshiba_acpi.poll_dev->input->swbit);
-       input_report_switch(toshiba_acpi.poll_dev->input, SW_RFKILL_ALL, TRUE);
-       input_sync(toshiba_acpi.poll_dev->input);
-
-       ret = input_register_polled_device(toshiba_acpi.poll_dev);
-       if (ret) {
-               printk(MY_ERR "unable to register kill-switch input device\n");
-               rfkill_free(toshiba_acpi.rfk_dev);
-               toshiba_acpi.rfk_dev = NULL;
-               toshiba_acpi_exit();
-               return ret;
+               /* Register input device for kill switch */
+               toshiba_acpi.poll_dev = input_allocate_polled_device();
+               if (!toshiba_acpi.poll_dev) {
+                       printk(MY_ERR
+                              "unable to allocate kill-switch input device\n");
+                       toshiba_acpi_exit();
+                       return -ENOMEM;
+               }
+               toshiba_acpi.poll_dev->private = &toshiba_acpi;
+               toshiba_acpi.poll_dev->poll = bt_poll_rfkill;
+               toshiba_acpi.poll_dev->poll_interval = 1000; /* msecs */
+
+               toshiba_acpi.poll_dev->input->name = toshiba_acpi.rfk_name;
+               toshiba_acpi.poll_dev->input->id.bustype = BUS_HOST;
+               /* Toshiba USB ID */
+               toshiba_acpi.poll_dev->input->id.vendor = 0x0930;
+               set_bit(EV_SW, toshiba_acpi.poll_dev->input->evbit);
+               set_bit(SW_RFKILL_ALL, toshiba_acpi.poll_dev->input->swbit);
+               input_report_switch(toshiba_acpi.poll_dev->input,
+                                   SW_RFKILL_ALL, TRUE);
+               input_sync(toshiba_acpi.poll_dev->input);
+
+               ret = input_register_polled_device(toshiba_acpi.poll_dev);
+               if (ret) {
+                       printk(MY_ERR
+                              "unable to register kill-switch input device\n");
+                       toshiba_acpi_exit();
+                       return ret;
+               }
        }
 
        return 0;
index e827be36ee8db99b4b8d648389cb7cc40df4064a..f844941089bb30786b143bee118e9e1e9b1cac54 100644 (file)
@@ -259,34 +259,26 @@ acpi_evaluate_integer(acpi_handle handle,
                      struct acpi_object_list *arguments, unsigned long long *data)
 {
        acpi_status status = AE_OK;
-       union acpi_object *element;
+       union acpi_object element;
        struct acpi_buffer buffer = { 0, NULL };
 
-
        if (!data)
                return AE_BAD_PARAMETER;
 
-       element = kzalloc(sizeof(union acpi_object), irqs_disabled() ? GFP_ATOMIC: GFP_KERNEL);
-       if (!element)
-               return AE_NO_MEMORY;
-
        buffer.length = sizeof(union acpi_object);
-       buffer.pointer = element;
+       buffer.pointer = &element;
        status = acpi_evaluate_object(handle, pathname, arguments, &buffer);
        if (ACPI_FAILURE(status)) {
                acpi_util_eval_error(handle, pathname, status);
-               kfree(element);
                return status;
        }
 
-       if (element->type != ACPI_TYPE_INTEGER) {
+       if (element.type != ACPI_TYPE_INTEGER) {
                acpi_util_eval_error(handle, pathname, AE_BAD_DATA);
-               kfree(element);
                return AE_BAD_DATA;
        }
 
-       *data = element->integer.value;
-       kfree(element);
+       *data = element.integer.value;
 
        ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%llu]\n", *data));
 
index a29b0ccac65aa05c8e739526a27ea2b6e09e31b9..baa4419297209efd6d79aaedb2dae13c2d1a6f92 100644 (file)
@@ -41,7 +41,6 @@
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
 
-#define ACPI_VIDEO_COMPONENT           0x08000000
 #define ACPI_VIDEO_CLASS               "video"
 #define ACPI_VIDEO_BUS_NAME            "Video Bus"
 #define ACPI_VIDEO_DEVICE_NAME         "Video Device"
@@ -739,7 +738,8 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
                device->cap._DSS = 1;
        }
 
-       max_level = acpi_video_init_brightness(device);
+       if (acpi_video_backlight_support())
+               max_level = acpi_video_init_brightness(device);
 
        if (device->cap._BCL && device->cap._BCM && max_level > 0) {
                int result;
@@ -785,18 +785,21 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
                        printk(KERN_ERR PREFIX "Create sysfs link\n");
 
        }
-       if (device->cap._DCS && device->cap._DSS){
-               static int count = 0;
-               char *name;
-               name = kzalloc(MAX_NAME_LEN, GFP_KERNEL);
-               if (!name)
-                       return;
-               sprintf(name, "acpi_video%d", count++);
-               device->output_dev = video_output_register(name,
-                               NULL, device, &acpi_output_properties);
-               kfree(name);
+
+       if (acpi_video_display_switch_support()) {
+
+               if (device->cap._DCS && device->cap._DSS) {
+                       static int count;
+                       char *name;
+                       name = kzalloc(MAX_NAME_LEN, GFP_KERNEL);
+                       if (!name)
+                               return;
+                       sprintf(name, "acpi_video%d", count++);
+                       device->output_dev = video_output_register(name,
+                                       NULL, device, &acpi_output_properties);
+                       kfree(name);
+               }
        }
-       return;
 }
 
 /*
@@ -842,11 +845,16 @@ static void acpi_video_bus_find_cap(struct acpi_video_bus *video)
 static int acpi_video_bus_check(struct acpi_video_bus *video)
 {
        acpi_status status = -ENOENT;
-
+       struct device *dev;
 
        if (!video)
                return -EINVAL;
 
+       dev = acpi_get_physical_pci_device(video->device->handle);
+       if (!dev)
+               return -ENODEV;
+       put_device(dev);
+
        /* Since there is no HID, CID and so on for VGA driver, we have
         * to check well known required nodes.
         */
@@ -2094,12 +2102,6 @@ static int __init acpi_video_init(void)
 {
        int result = 0;
 
-
-       /*
-          acpi_dbg_level = 0xFFFFFFFF;
-          acpi_dbg_layer = 0x08000000;
-        */
-
        acpi_video_dir = proc_mkdir(ACPI_VIDEO_CLASS, acpi_root_dir);
        if (!acpi_video_dir)
                return -ENODEV;
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
new file mode 100644 (file)
index 0000000..f022eb6
--- /dev/null
@@ -0,0 +1,267 @@
+/*
+ *  Copyright (C) 2008       SuSE Linux Products GmbH
+ *                           Thomas Renninger <trenn@suse.de>
+ *
+ *  May be copied or modified under the terms of the GNU General Public License
+ *
+ * video_detect.c:
+ * Provides acpi_is_video_device() for early scanning of ACPI devices in scan.c
+ * There a Linux specific (Spec does not provide a HID for video devices) is
+ * assinged
+ *
+ * After PCI devices are glued with ACPI devices
+ * acpi_get_physical_pci_device() can be called to identify ACPI graphics
+ * devices for which a real graphics card is plugged in
+ *
+ * Now acpi_video_get_capabilities() can be called to check which
+ * capabilities the graphics cards plugged in support. The check for general
+ * video capabilities will be triggered by the first caller of
+ * acpi_video_get_capabilities(NULL); which will happen when the first
+ * backlight (or display output) switching supporting driver calls:
+ * acpi_video_backlight_support();
+ *
+ * Depending on whether ACPI graphics extensions (cmp. ACPI spec Appendix B)
+ * are available, video.ko should be used to handle the device.
+ *
+ * Otherwise vendor specific drivers like thinkpad_acpi, asus_acpi,
+ * sony_acpi,... can take care about backlight brightness and display output
+ * switching.
+ *
+ * If CONFIG_ACPI_VIDEO is neither set as "compiled in" (y) nor as a module (m)
+ * this file will not be compiled, acpi_video_get_capabilities() and
+ * acpi_video_backlight_support() will always return 0 and vendor specific
+ * drivers always can handle backlight.
+ *
+ */
+
+#include <linux/acpi.h>
+#include <linux/dmi.h>
+
+ACPI_MODULE_NAME("video");
+#define _COMPONENT             ACPI_VIDEO_COMPONENT
+
+static long acpi_video_support;
+static bool acpi_video_caps_checked;
+
+static acpi_status
+acpi_backlight_cap_match(acpi_handle handle, u32 level, void *context,
+                         void **retyurn_value)
+{
+       long *cap = context;
+       acpi_handle h_dummy;
+
+       if (ACPI_SUCCESS(acpi_get_handle(handle, "_BCM", &h_dummy)) &&
+           ACPI_SUCCESS(acpi_get_handle(handle, "_BCL", &h_dummy))) {
+               ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found generic backlight "
+                                 "support\n"));
+               *cap |= ACPI_VIDEO_BACKLIGHT;
+               /* We have backlight support, no need to scan further */
+               return AE_CTRL_TERMINATE;
+       }
+       return 0;
+}
+
+/* Returns true if the device is a video device which can be handled by
+ * video.ko.
+ * The device will get a Linux specific CID added in scan.c to
+ * identify the device as an ACPI graphics device
+ * Be aware that the graphics device may not be physically present
+ * Use acpi_video_get_capabilities() to detect general ACPI video
+ * capabilities of present cards
+ */
+long acpi_is_video_device(struct acpi_device *device)
+{
+       acpi_handle h_dummy;
+       long video_caps = 0;
+
+       if (!device)
+               return 0;
+
+       /* Does this device able to support video switching ? */
+       if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy)) &&
+           ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy)))
+               video_caps |= ACPI_VIDEO_OUTPUT_SWITCHING;
+
+       /* Does this device able to retrieve a video ROM ? */
+       if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_ROM", &h_dummy)))
+               video_caps |= ACPI_VIDEO_ROM_AVAILABLE;
+
+       /* Does this device able to configure which video head to be POSTed ? */
+       if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_VPO", &h_dummy)) &&
+           ACPI_SUCCESS(acpi_get_handle(device->handle, "_GPD", &h_dummy)) &&
+           ACPI_SUCCESS(acpi_get_handle(device->handle, "_SPD", &h_dummy)))
+               video_caps |= ACPI_VIDEO_DEVICE_POSTING;
+
+       /* Only check for backlight functionality if one of the above hit. */
+       if (video_caps)
+               acpi_walk_namespace(ACPI_TYPE_DEVICE, device->handle,
+                                   ACPI_UINT32_MAX, acpi_backlight_cap_match,
+                                   &video_caps, NULL);
+
+       return video_caps;
+}
+EXPORT_SYMBOL(acpi_is_video_device);
+
+static acpi_status
+find_video(acpi_handle handle, u32 lvl, void *context, void **rv)
+{
+       long *cap = context;
+       struct device *dev;
+       struct acpi_device *acpi_dev;
+
+       const struct acpi_device_id video_ids[] = {
+               {ACPI_VIDEO_HID, 0},
+               {"", 0},
+       };
+       if (acpi_bus_get_device(handle, &acpi_dev))
+               return AE_OK;
+
+       if (!acpi_match_device_ids(acpi_dev, video_ids)) {
+               dev = acpi_get_physical_pci_device(handle);
+               if (!dev)
+                       return AE_OK;
+               put_device(dev);
+               *cap |= acpi_is_video_device(acpi_dev);
+       }
+       return AE_OK;
+}
+
+/*
+ * Returns the video capabilities of a specific ACPI graphics device
+ *
+ * if NULL is passed as argument all ACPI devices are enumerated and
+ * all graphics capabilities of physically present devices are
+ * summerized and returned. This is cached and done only once.
+ */
+long acpi_video_get_capabilities(acpi_handle graphics_handle)
+{
+       long caps = 0;
+       struct acpi_device *tmp_dev;
+       acpi_status status;
+
+       if (acpi_video_caps_checked && graphics_handle == NULL)
+               return acpi_video_support;
+
+       if (!graphics_handle) {
+               /* Only do the global walk through all graphics devices once */
+               acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
+                                   ACPI_UINT32_MAX, find_video,
+                                   &caps, NULL);
+               /* There might be boot param flags set already... */
+               acpi_video_support |= caps;
+               acpi_video_caps_checked = 1;
+               /* Add blacklists here. Be careful to use the right *DMI* bits
+                * to still be able to override logic via boot params, e.g.:
+                *
+                *   if (dmi_name_in_vendors("XY")) {
+                *      acpi_video_support |=
+                *              ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VENDOR;
+                *      acpi_video_support |=
+                *              ACPI_VIDEO_BACKLIGHT_DMI_VENDOR;
+                *}
+                */
+       } else {
+               status = acpi_bus_get_device(graphics_handle, &tmp_dev);
+               if (ACPI_FAILURE(status)) {
+                       ACPI_EXCEPTION((AE_INFO, status, "Invalid device"));
+                       return 0;
+               }
+               acpi_walk_namespace(ACPI_TYPE_DEVICE, graphics_handle,
+                                   ACPI_UINT32_MAX, find_video,
+                                   &caps, NULL);
+       }
+       ACPI_DEBUG_PRINT((ACPI_DB_INFO, "We have 0x%lX video support %s %s\n",
+                         graphics_handle ? caps : acpi_video_support,
+                         graphics_handle ? "on device " : "in general",
+                         graphics_handle ? acpi_device_bid(tmp_dev) : ""));
+       return caps;
+}
+EXPORT_SYMBOL(acpi_video_get_capabilities);
+
+/* Returns true if video.ko can do backlight switching */
+int acpi_video_backlight_support(void)
+{
+       /*
+        * We must check whether the ACPI graphics device is physically plugged
+        * in. Therefore this must be called after binding PCI and ACPI devices
+        */
+       if (!acpi_video_caps_checked)
+               acpi_video_get_capabilities(NULL);
+
+       /* First check for boot param -> highest prio */
+       if (acpi_video_support & ACPI_VIDEO_BACKLIGHT_FORCE_VENDOR)
+               return 0;
+       else if (acpi_video_support & ACPI_VIDEO_BACKLIGHT_FORCE_VIDEO)
+               return 1;
+
+       /* Then check for DMI blacklist -> second highest prio */
+       if (acpi_video_support & ACPI_VIDEO_BACKLIGHT_DMI_VENDOR)
+               return 0;
+       else if (acpi_video_support & ACPI_VIDEO_BACKLIGHT_DMI_VIDEO)
+               return 1;
+
+       /* Then go the default way */
+       return acpi_video_support & ACPI_VIDEO_BACKLIGHT;
+}
+EXPORT_SYMBOL(acpi_video_backlight_support);
+
+/*
+ * Returns true if video.ko can do display output switching.
+ * This does not work well/at all with binary graphics drivers
+ * which disable system io ranges and do it on their own.
+ */
+int acpi_video_display_switch_support(void)
+{
+       if (!acpi_video_caps_checked)
+               acpi_video_get_capabilities(NULL);
+
+       if (acpi_video_support & ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VENDOR)
+               return 0;
+       else if (acpi_video_support & ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VIDEO)
+               return 1;
+
+       if (acpi_video_support & ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VENDOR)
+               return 0;
+       else if (acpi_video_support & ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VIDEO)
+               return 1;
+
+       return acpi_video_support & ACPI_VIDEO_OUTPUT_SWITCHING;
+}
+EXPORT_SYMBOL(acpi_video_display_switch_support);
+
+/*
+ * Use acpi_display_output=vendor/video or acpi_backlight=vendor/video
+ * To force that backlight or display output switching is processed by vendor
+ * specific acpi drivers or video.ko driver.
+ */
+int __init acpi_backlight(char *str)
+{
+       if (str == NULL || *str == '\0')
+               return 1;
+       else {
+               if (!strcmp("vendor", str))
+                       acpi_video_support |=
+                               ACPI_VIDEO_BACKLIGHT_FORCE_VENDOR;
+               if (!strcmp("video", str))
+                       acpi_video_support |=
+                               ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VIDEO;
+       }
+       return 1;
+}
+__setup("acpi_backlight=", acpi_backlight);
+
+int __init acpi_display_output(char *str)
+{
+       if (str == NULL || *str == '\0')
+               return 1;
+       else {
+               if (!strcmp("vendor", str))
+                       acpi_video_support |=
+                               ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VENDOR;
+               if (!strcmp("video", str))
+                       acpi_video_support |=
+                               ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VIDEO;
+       }
+       return 1;
+}
+__setup("acpi_display_output=", acpi_display_output);
index 47cd7baf9b1bd85fb327efc79186a7e6f5b1c461..8a8b377712c972e726a8f53f6026a8322a49f7a0 100644 (file)
@@ -660,7 +660,7 @@ static void acpi_wmi_notify(acpi_handle handle, u32 event, void *data)
                                wblock->handler(event, wblock->handler_data);
 
                        acpi_bus_generate_netlink_event(
-                               device->pnp.device_class, device->dev.bus_id,
+                               device->pnp.device_class, dev_name(&device->dev),
                                event, 0);
                        break;
                }
index 78fbec8ceda0452c83b715e1d86bc593be8eb3cf..421b7c71e72db447a7c3b09abe183908399ac34a 100644 (file)
@@ -153,7 +153,7 @@ config SATA_PROMISE
          If unsure, say N.
 
 config SATA_SX4
-       tristate "Promise SATA SX4 support"
+       tristate "Promise SATA SX4 support (Experimental)"
        depends on PCI && EXPERIMENTAL
        help
          This option enables support for Promise Serial ATA SX4.
@@ -219,8 +219,8 @@ config PATA_ACPI
          otherwise unsupported hardware.
 
 config PATA_ALI
-       tristate "ALi PATA support (Experimental)"
-       depends on PCI && EXPERIMENTAL
+       tristate "ALi PATA support"
+       depends on PCI
        help
          This option enables support for the ALi ATA interfaces
          found on the many ALi chipsets.
@@ -263,7 +263,7 @@ config PATA_ATIIXP
          If unsure, say N.
 
 config PATA_CMD640_PCI
-       tristate "CMD640 PCI PATA support (Very Experimental)"
+       tristate "CMD640 PCI PATA support (Experimental)"
        depends on PCI && EXPERIMENTAL
        help
          This option enables support for the CMD640 PCI IDE
@@ -291,8 +291,8 @@ config PATA_CS5520
          If unsure, say N.
 
 config PATA_CS5530
-       tristate "CS5530 PATA support (Experimental)"
-       depends on PCI && EXPERIMENTAL
+       tristate "CS5530 PATA support"
+       depends on PCI
        help
          This option enables support for the Cyrix/NatSemi/AMD CS5530
          companion chip used with the MediaGX/Geode processor family.
@@ -309,8 +309,8 @@ config PATA_CS5535
          If unsure, say N.
 
 config PATA_CS5536
-       tristate "CS5536 PATA support (Experimental)"
-       depends on PCI && X86 && !X86_64 && EXPERIMENTAL
+       tristate "CS5536 PATA support"
+       depends on PCI && X86 && !X86_64
        help
          This option enables support for the AMD CS5536
          companion chip used with the Geode LX processor family.
@@ -363,7 +363,7 @@ config PATA_HPT37X
          If unsure, say N.
 
 config PATA_HPT3X2N
-       tristate "HPT 372N/302N PATA support (Very Experimental)"
+       tristate "HPT 372N/302N PATA support (Experimental)"
        depends on PCI && EXPERIMENTAL
        help
          This option enables support for the N variant HPT PATA
@@ -389,8 +389,8 @@ config PATA_HPT3X3_DMA
          problems with DMA on this chipset.
 
 config PATA_ISAPNP
-       tristate "ISA Plug and Play PATA support (Experimental)"
-       depends on EXPERIMENTAL && ISAPNP
+       tristate "ISA Plug and Play PATA support"
+       depends on ISAPNP
        help
          This option enables support for ISA plug & play ATA
          controllers such as those found on old soundcards.
@@ -498,8 +498,8 @@ config PATA_NINJA32
          If unsure, say N.
 
 config PATA_NS87410
-       tristate "Nat Semi NS87410 PATA support (Experimental)"
-       depends on PCI && EXPERIMENTAL
+       tristate "Nat Semi NS87410 PATA support"
+       depends on PCI
        help
          This option enables support for the National Semiconductor
          NS87410 PCI-IDE controller.
@@ -507,8 +507,8 @@ config PATA_NS87410
          If unsure, say N.
 
 config PATA_NS87415
-       tristate "Nat Semi NS87415 PATA support (Experimental)"
-       depends on PCI && EXPERIMENTAL
+       tristate "Nat Semi NS87415 PATA support"
+       depends on PCI
        help
          This option enables support for the National Semiconductor
          NS87415 PCI-IDE controller.
@@ -544,8 +544,8 @@ config PATA_PCMCIA
          If unsure, say N.
 
 config PATA_PDC_OLD
-       tristate "Older Promise PATA controller support (Experimental)"
-       depends on PCI && EXPERIMENTAL
+       tristate "Older Promise PATA controller support"
+       depends on PCI
        help
          This option enables support for the Promise 20246, 20262, 20263,
          20265 and 20267 adapters.
@@ -559,7 +559,7 @@ config PATA_QDI
          Support for QDI 6500 and 6580 PATA controllers on VESA local bus.
 
 config PATA_RADISYS
-       tristate "RADISYS 82600 PATA support (Very Experimental)"
+       tristate "RADISYS 82600 PATA support (Experimental)"
        depends on PCI && EXPERIMENTAL
        help
          This option enables support for the RADISYS 82600
@@ -586,8 +586,8 @@ config PATA_RZ1000
          If unsure, say N.
 
 config PATA_SC1200
-       tristate "SC1200 PATA support (Very Experimental)"
-       depends on PCI && EXPERIMENTAL
+       tristate "SC1200 PATA support"
+       depends on PCI
        help
          This option enables support for the NatSemi/AMD SC1200 SoC
          companion chip used with the Geode processor family.
@@ -620,8 +620,8 @@ config PATA_SIL680
          If unsure, say N.
 
 config PATA_SIS
-       tristate "SiS PATA support (Experimental)"
-       depends on PCI && EXPERIMENTAL
+       tristate "SiS PATA support"
+       depends on PCI
        help
          This option enables support for SiS PATA controllers
 
index 8e37be19bbf520b1b8e9d8409d9874846ee868f4..c11936e13dd3ccd39952b35b242e42dd5e0d1078 100644 (file)
@@ -1066,6 +1066,28 @@ static int piix_broken_suspend(void)
                if (dmi_find_device(DMI_DEV_TYPE_OEM_STRING, oemstrs[i], NULL))
                        return 1;
 
+       /* TECRA M4 sometimes forgets its identify and reports bogus
+        * DMI information.  As the bogus information is a bit
+        * generic, match as many entries as possible.  This manual
+        * matching is necessary because dmi_system_id.matches is
+        * limited to four entries.
+        */
+       if (dmi_get_system_info(DMI_SYS_VENDOR) &&
+           dmi_get_system_info(DMI_PRODUCT_NAME) &&
+           dmi_get_system_info(DMI_PRODUCT_VERSION) &&
+           dmi_get_system_info(DMI_PRODUCT_SERIAL) &&
+           dmi_get_system_info(DMI_BOARD_VENDOR) &&
+           dmi_get_system_info(DMI_BOARD_NAME) &&
+           dmi_get_system_info(DMI_BOARD_VERSION) &&
+           !strcmp(dmi_get_system_info(DMI_SYS_VENDOR), "TOSHIBA") &&
+           !strcmp(dmi_get_system_info(DMI_PRODUCT_NAME), "000000") &&
+           !strcmp(dmi_get_system_info(DMI_PRODUCT_VERSION), "000000") &&
+           !strcmp(dmi_get_system_info(DMI_PRODUCT_SERIAL), "000000") &&
+           !strcmp(dmi_get_system_info(DMI_BOARD_VENDOR), "TOSHIBA") &&
+           !strcmp(dmi_get_system_info(DMI_BOARD_NAME), "Portable PC") &&
+           !strcmp(dmi_get_system_info(DMI_BOARD_VERSION), "Version A0"))
+               return 1;
+
        return 0;
 }
 
index 4214bfb13bbd4185e10ec877a9d0f7245f9d026a..bc6695e3c8482927e5b6de7ae4017c9884bea4a8 100644 (file)
@@ -2492,6 +2492,13 @@ int ata_dev_configure(struct ata_device *dev)
                }
        }
 
+       if ((dev->horkage & ATA_HORKAGE_FIRMWARE_WARN) && print_info) {
+               ata_dev_printk(dev, KERN_WARNING, "WARNING: device requires "
+                              "firmware update to be fully functional.\n");
+               ata_dev_printk(dev, KERN_WARNING, "         contact the vendor "
+                              "or visit http://ata.wiki.kernel.org.\n");
+       }
+
        return 0;
 
 err_out_nosup:
@@ -4042,6 +4049,73 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
        { "ST380817AS",         "3.42",         ATA_HORKAGE_NONCQ },
        { "ST3160023AS",        "3.42",         ATA_HORKAGE_NONCQ },
 
+       /* Seagate NCQ + FLUSH CACHE firmware bug */
+       { "ST31500341AS",       "SD15",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST31500341AS",       "SD16",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST31500341AS",       "SD17",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST31500341AS",       "SD18",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST31500341AS",       "SD19",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+
+       { "ST31000333AS",       "SD15",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST31000333AS",       "SD16",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST31000333AS",       "SD17",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST31000333AS",       "SD18",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST31000333AS",       "SD19",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+
+       { "ST3640623AS",        "SD15",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640623AS",        "SD16",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640623AS",        "SD17",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640623AS",        "SD18",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640623AS",        "SD19",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+
+       { "ST3640323AS",        "SD15",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640323AS",        "SD16",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640323AS",        "SD17",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640323AS",        "SD18",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640323AS",        "SD19",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+
+       { "ST3320813AS",        "SD15",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320813AS",        "SD16",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320813AS",        "SD17",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320813AS",        "SD18",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320813AS",        "SD19",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+
+       { "ST3320613AS",        "SD15",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320613AS",        "SD16",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320613AS",        "SD17",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320613AS",        "SD18",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320613AS",        "SD19",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+
        /* Blacklist entries taken from Silicon Image 3124/3132
           Windows driver .inf file - also several Linux problem reports */
        { "HTS541060G9SA00",    "MB3OC60D",     ATA_HORKAGE_NONCQ, },
index 4b47394863279606dc7427d79789bdc8c8485d99..9033d164c4ece13f876777fd7fbb549e4c27456b 100644 (file)
@@ -1227,10 +1227,19 @@ fsm_start:
                        /* ATA PIO protocol */
                        if (unlikely((status & ATA_DRQ) == 0)) {
                                /* handle BSY=0, DRQ=0 as error */
-                               if (likely(status & (ATA_ERR | ATA_DF)))
+                               if (likely(status & (ATA_ERR | ATA_DF))) {
                                        /* device stops HSM for abort/error */
                                        qc->err_mask |= AC_ERR_DEV;
-                               else {
+
+                                       /* If diagnostic failed and this is
+                                        * IDENTIFY, it's likely a phantom
+                                        * device.  Mark hint.
+                                        */
+                                       if (qc->dev->horkage &
+                                           ATA_HORKAGE_DIAGNOSTIC)
+                                               qc->err_mask |=
+                                                       AC_ERR_NODEV_HINT;
+                               } else {
                                        /* HSM violation. Let EH handle this.
                                         * Phantom devices also trigger this
                                         * condition.  Mark hint.
index f2b83eabc7c7cd2bb59ba198df4f5c85b7b20355..e0c4f05d7d579a807becb30af2bf44b3a9ea7260 100644 (file)
@@ -183,7 +183,9 @@ static unsigned long hpt366_filter(struct ata_device *adev, unsigned long mask)
                        mask &= ~(0xF8 << ATA_SHIFT_UDMA);
                if (hpt_dma_blacklisted(adev, "UDMA4", bad_ata66_4))
                        mask &= ~(0xF0 << ATA_SHIFT_UDMA);
-       }
+       } else if (adev->class == ATA_DEV_ATAPI)
+               mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA);
+
        return ata_bmdma_mode_filter(adev, mask);
 }
 
@@ -211,11 +213,15 @@ static u32 hpt36x_find_mode(struct ata_port *ap, int speed)
 
 static int hpt36x_cable_detect(struct ata_port *ap)
 {
-       u8 ata66;
        struct pci_dev *pdev = to_pci_dev(ap->host->dev);
+       u8 ata66;
 
+       /*
+        * Each channel of pata_hpt366 occupies separate PCI function
+        * as the primary channel and bit1 indicates the cable type.
+        */
        pci_read_config_byte(pdev, 0x5A, &ata66);
-       if (ata66 & (1 << ap->port_no))
+       if (ata66 & 2)
                return ATA_CBL_PATA40;
        return ATA_CBL_PATA80;
 }
@@ -382,10 +388,10 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
        /* PCI clocking determines the ATA timing values to use */
        /* info_hpt366 is safe against re-entry so we can scribble on it */
        switch((reg1 & 0x700) >> 8) {
-               case 5:
+               case 9:
                        hpriv = &hpt366_40;
                        break;
-               case 9:
+               case 5:
                        hpriv = &hpt366_25;
                        break;
                default:
index 4e466eae8b462e31d82f7404d25f43a3b9cfd5cb..4dd9a3b031e4dc4fc932cea32b9cd6fc6b42d063 100644 (file)
@@ -44,7 +44,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME "pata_ninja32"
-#define DRV_VERSION "0.1.1"
+#define DRV_VERSION "0.1.3"
 
 
 /**
@@ -130,7 +130,8 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id)
                return rc;
        pci_set_master(dev);
 
-       /* Set up the register mappings */
+       /* Set up the register mappings. We use the I/O mapping as only the
+          older chips also have MMIO on BAR 1 */
        base = host->iomap[0];
        if (!base)
                return -ENOMEM;
@@ -167,8 +168,12 @@ static int ninja32_reinit_one(struct pci_dev *pdev)
 #endif
 
 static const struct pci_device_id ninja32[] = {
+       { 0x10FC, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+       { 0x1145, 0x8008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+       { 0x1145, 0xf008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { 0x1145, 0xf021, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { 0x1145, 0xf024, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+       { 0x1145, 0xf02C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        { },
 };
 
index f8b3ffc8ae9e40d5b5e0df5a8ad84ee6923710d8..c2e6fb9f2ef9f730b27c3a9c16f96f85fd3de7dd 100644 (file)
 #define RB500_CF_MAXPORTS      1
 #define RB500_CF_IO_DELAY      400
 
-#define RB500_CF_REG_CMD       0x0800
+#define RB500_CF_REG_BASE      0x0800
+#define RB500_CF_REG_ERR       0x080D
 #define RB500_CF_REG_CTRL      0x080E
-#define RB500_CF_REG_DATA      0x0C00
+/* 32bit buffered data register offset */
+#define RB500_CF_REG_DBUF32    0x0C00
 
 struct rb532_cf_info {
        void __iomem    *iobase;
@@ -72,11 +74,12 @@ static void rb532_pata_exec_command(struct ata_port *ap,
        rb532_pata_finish_io(ap);
 }
 
-static void rb532_pata_data_xfer(struct ata_device *adev, unsigned char *buf,
+static unsigned int rb532_pata_data_xfer(struct ata_device *adev, unsigned char *buf,
                                unsigned int buflen, int write_data)
 {
        struct ata_port *ap = adev->link->ap;
        void __iomem *ioaddr = ap->ioaddr.data_addr;
+       int retlen = buflen;
 
        if (write_data) {
                for (; buflen > 0; buflen--, buf++)
@@ -87,6 +90,7 @@ static void rb532_pata_data_xfer(struct ata_device *adev, unsigned char *buf,
        }
 
        rb532_pata_finish_io(adev->link->ap);
+       return retlen;
 }
 
 static void rb532_pata_freeze(struct ata_port *ap)
@@ -146,13 +150,14 @@ static void rb532_pata_setup_ports(struct ata_host *ah)
        ap->pio_mask    = 0x1f; /* PIO4 */
        ap->flags       = ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO;
 
-       ap->ioaddr.cmd_addr     = info->iobase + RB500_CF_REG_CMD;
+       ap->ioaddr.cmd_addr     = info->iobase + RB500_CF_REG_BASE;
        ap->ioaddr.ctl_addr     = info->iobase + RB500_CF_REG_CTRL;
        ap->ioaddr.altstatus_addr = info->iobase + RB500_CF_REG_CTRL;
 
        ata_sff_std_ports(&ap->ioaddr);
 
-       ap->ioaddr.data_addr    = info->iobase + RB500_CF_REG_DATA;
+       ap->ioaddr.data_addr    = info->iobase + RB500_CF_REG_DBUF32;
+       ap->ioaddr.error_addr   = info->iobase + RB500_CF_REG_ERR;
 }
 
 static __devinit int rb532_pata_driver_probe(struct platform_device *pdev)
index d34236611752d8c8c3cddc2ca868cee655051c26..e4be55e047f61c3608bb9a0ae02027555475eb2c 100644 (file)
@@ -56,7 +56,6 @@ static const struct sis_laptop sis_laptop[] = {
        { 0x5513, 0x1043, 0x1107 },     /* ASUS A6K */
        { 0x5513, 0x1734, 0x105F },     /* FSC Amilo A1630 */
        { 0x5513, 0x1071, 0x8640 },     /* EasyNote K5305 */
-       { 0x5513, 0x1039, 0x5513 },     /* Targa Visionary 1000 */
        /* end marker */
        { 0, }
 };
index 615412364e9930aa042b682e503d3816f2498b8e..6b969f8c684fad8d963c707cc85fcd139fb766ce 100644 (file)
@@ -2705,7 +2705,7 @@ static int __devinit hrz_probe(struct pci_dev *pci_dev, const struct pci_device_
 
        /* XXX DEV_LABEL is a guess */
        if (!request_region(iobase, HRZ_IO_EXTENT, DEV_LABEL)) {
-               return -EINVAL;
+               err = -EINVAL;
                goto out_disable;
        }
 
index 61ad8d639ba39830ee96687d2ef18d3fcba8cad4..0344a8a8321d130b3833681708426becdcfa45d1 100644 (file)
@@ -21,7 +21,8 @@ config BLK_DEV_FD
        ---help---
          If you want to use the floppy disk drive(s) of your PC under Linux,
          say Y. Information about this driver, especially important for IBM
-         Thinkpad users, is contained in <file:Documentation/floppy.txt>.
+         Thinkpad users, is contained in
+         <file:Documentation/blockdev/floppy.txt>.
          That file also contains the location of the Floppy driver FAQ as
          well as location of the fdutils package used to configure additional
          parameters of the driver at run time.
@@ -76,7 +77,7 @@ config PARIDE
          your computer's parallel port. Most of them are actually IDE devices
          using a parallel port IDE adapter. This option enables the PARIDE
          subsystem which contains drivers for many of these external drives.
-         Read <file:Documentation/paride.txt> for more information.
+         Read <file:Documentation/blockdev/paride.txt> for more information.
 
          If you have said Y to the "Parallel-port support" configuration
          option, you may share a single port between your printer and other
@@ -114,9 +115,9 @@ config BLK_CPQ_DA
        help
          This is the driver for Compaq Smart Array controllers.  Everyone
          using these boards should say Y here.  See the file
-         <file:Documentation/cpqarray.txt> for the current list of boards
-         supported by this driver, and for further information on the use of
-         this driver.
+         <file:Documentation/blockdev/cpqarray.txt> for the current list of
+         boards supported by this driver, and for further information on the
+         use of this driver.
 
 config BLK_CPQ_CISS_DA
        tristate "Compaq Smart Array 5xxx support"
@@ -124,7 +125,7 @@ config BLK_CPQ_CISS_DA
        help
          This is the driver for Compaq Smart Array 5xxx controllers.
          Everyone using these boards should say Y here.
-         See <file:Documentation/cciss.txt> for the current list of
+         See <file:Documentation/blockdev/cciss.txt> for the current list of
          boards supported by this driver, and for further information
          on the use of this driver.
 
@@ -135,7 +136,7 @@ config CISS_SCSI_TAPE
        help
          When enabled (Y), this option allows SCSI tape drives and SCSI medium
          changers (tape robots) to be accessed via a Compaq 5xxx array 
-         controller.  (See <file:Documentation/cciss.txt> for more details.)
+         controller.  (See <file:Documentation/blockdev/cciss.txt> for more details.)
 
          "SCSI support" and "SCSI tape support" must also be enabled for this 
          option to work.
@@ -149,8 +150,8 @@ config BLK_DEV_DAC960
        help
          This driver adds support for the Mylex DAC960, AcceleRAID, and
          eXtremeRAID PCI RAID controllers.  See the file
-         <file:Documentation/README.DAC960> for further information about
-         this driver.
+         <file:Documentation/blockdev/README.DAC960> for further information
+         about this driver.
 
          To compile this driver as a module, choose M here: the
          module will be called DAC960.
@@ -278,9 +279,9 @@ config BLK_DEV_NBD
          userland (making server and client physically the same computer,
          communicating using the loopback network device).
 
-         Read <file:Documentation/nbd.txt> for more information, especially
-         about where to find the server code, which runs in user space and
-         does not need special kernel support.
+         Read <file:Documentation/blockdev/nbd.txt> for more information,
+         especially about where to find the server code, which runs in user
+         space and does not need special kernel support.
 
          Note that this has nothing to do with the network file systems NFS
          or Coda; you can say N here even if you intend to use NFS or Coda.
@@ -321,8 +322,8 @@ config BLK_DEV_RAM
          store a copy of a minimal root file system off of a floppy into RAM
          during the initial install of Linux.
 
-         Note that the kernel command line option "ramdisk=XX" is now
-         obsolete. For details, read <file:Documentation/ramdisk.txt>.
+         Note that the kernel command line option "ramdisk=XX" is now obsolete.
+         For details, read <file:Documentation/blockdev/ramdisk.txt>.
 
          To compile this driver as a module, choose M here: the
          module will be called rd.
index 12de1fdaa6c68b76479cdfed53140e7188207449..9f7c543cc04b265344b0e37443c4349147e88574 100644 (file)
@@ -1693,6 +1693,11 @@ static int rebuild_lun_table(ctlr_info_t *h, int first_time)
        for (i = 0; i <= h->highest_lun; i++) {
                int j;
                drv_found = 0;
+
+               /* skip holes in the array from already deleted drives */
+               if (h->drv[i].raid_level == -1)
+                       continue;
+
                for (j = 0; j < num_luns; j++) {
                        memcpy(&lunid, &ld_buff->LUN[j][0], 4);
                        lunid = le32_to_cpu(lunid);
@@ -2847,7 +2852,7 @@ static void do_cciss_request(struct request_queue *q)
                h->maxSG = seg;
 
 #ifdef CCISS_DEBUG
-       printk(KERN_DEBUG "cciss: Submitting %d sectors in %d segments\n",
+       printk(KERN_DEBUG "cciss: Submitting %lu sectors in %d segments\n",
               creq->nr_sectors, seg);
 #endif                         /* CCISS_DEBUG */
 
@@ -3197,7 +3202,7 @@ static int __devinit cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
 
        c->paddr = pci_resource_start(pdev, 0); /* addressing mode bits already removed */
 #ifdef CCISS_DEBUG
-       printk("address 0 = %x\n", c->paddr);
+       printk("address 0 = %lx\n", c->paddr);
 #endif                         /* CCISS_DEBUG */
        c->vaddr = remap_pci_mem(c->paddr, 0x250);
 
@@ -3224,7 +3229,8 @@ static int __devinit cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
 #endif                         /* CCISS_DEBUG */
        cfg_base_addr_index = find_PCI_BAR_index(pdev, cfg_base_addr);
 #ifdef CCISS_DEBUG
-       printk("cfg base address index = %x\n", cfg_base_addr_index);
+       printk("cfg base address index = %llx\n",
+               (unsigned long long)cfg_base_addr_index);
 #endif                         /* CCISS_DEBUG */
        if (cfg_base_addr_index == -1) {
                printk(KERN_WARNING "cciss: Cannot find cfg_base_addr_index\n");
@@ -3234,7 +3240,7 @@ static int __devinit cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
 
        cfg_offset = readl(c->vaddr + SA5_CTMEM_OFFSET);
 #ifdef CCISS_DEBUG
-       printk("cfg offset = %x\n", cfg_offset);
+       printk("cfg offset = %llx\n", (unsigned long long)cfg_offset);
 #endif                         /* CCISS_DEBUG */
        c->cfgtable = remap_pci_mem(pci_resource_start(pdev,
                                                       cfg_base_addr_index) +
index 14db747a636e93a33766e4faf23dbd5b48e5e8bd..cf29cc4e6ab73d2d95e6d4778f576aae9c98b327 100644 (file)
@@ -4124,7 +4124,7 @@ static int __init floppy_setup(char *str)
                printk("\n");
        } else
                DPRINT("botched floppy option\n");
-       DPRINT("Read Documentation/floppy.txt\n");
+       DPRINT("Read Documentation/blockdev/floppy.txt\n");
        return 0;
 }
 
index f20bf359b84f20e7ff10f7081f54b37371e12f18..dc7a8c352da2e7c5b44a3d9a4e7a02bfd029d0c2 100644 (file)
@@ -302,7 +302,7 @@ static struct kobj_type kobj_pkt_type_wqueue = {
 static void pkt_sysfs_dev_new(struct pktcdvd_device *pd)
 {
        if (class_pktcdvd) {
-               pd->dev = device_create(class_pktcdvd, NULL, pd->pkt_dev, NULL,
+               pd->dev = device_create(class_pktcdvd, NULL, MKDEV(0, 0), NULL,
                                        "%s", pd->name);
                if (IS_ERR(pd->dev))
                        pd->dev = NULL;
@@ -2790,7 +2790,7 @@ static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev)
        return 0;
 
 out_mem:
-       blkdev_put(bdev, FMODE_READ|FMODE_WRITE);
+       blkdev_put(bdev, FMODE_READ | FMODE_NDELAY);
        /* This is safe: open() is still holding a reference. */
        module_put(THIS_MODULE);
        return ret;
@@ -2975,7 +2975,7 @@ static int pkt_remove_dev(dev_t pkt_dev)
        pkt_debugfs_dev_remove(pd);
        pkt_sysfs_dev_remove(pd);
 
-       blkdev_put(pd->bdev, FMODE_READ|FMODE_WRITE);
+       blkdev_put(pd->bdev, FMODE_READ | FMODE_NDELAY);
 
        remove_proc_entry(pd->name, pkt_proc);
        DPRINTK(DRIVER_NAME": writer %s unmapped\n", pd->name);
index fccac18d311121d01f28ca4ce819886f79cf300f..048d71d244d7335d3e719e916632ef1a71079465 100644 (file)
@@ -1546,8 +1546,6 @@ static void ub_top_sense_done(struct ub_dev *sc, struct ub_scsi_cmd *scmd)
 
 /*
  * Reset management
- * XXX Move usb_reset_device to khubd. Hogging kevent is not a good thing.
- * XXX Make usb_sync_reset asynchronous.
  */
 
 static void ub_reset_enter(struct ub_dev *sc, int try)
@@ -1632,6 +1630,22 @@ static void ub_reset_task(struct work_struct *work)
        spin_unlock_irqrestore(sc->lock, flags);
 }
 
+/*
+ * XXX Reset brackets are too much hassle to implement, so just stub them
+ * in order to prevent forced unbinding (which deadlocks solid when our
+ * ->disconnect method waits for the reset to complete and this kills keventd).
+ *
+ * XXX Tell Alan to move usb_unlock_device inside of usb_reset_device,
+ * or else the post_reset is invoked, and restats I/O on a locked device.
+ */
+static int ub_pre_reset(struct usb_interface *iface) {
+       return 0;
+}
+
+static int ub_post_reset(struct usb_interface *iface) {
+       return 0;
+}
+
 /*
  * This is called from a process context.
  */
@@ -2446,6 +2460,8 @@ static struct usb_driver ub_driver = {
        .probe =        ub_probe,
        .disconnect =   ub_disconnect,
        .id_table =     ub_usb_ids,
+       .pre_reset =    ub_pre_reset,
+       .post_reset =   ub_post_reset,
 };
 
 static int __init ub_init(void)
index b220c686089d82b5ffc41eada6efd59c7f7ca7e5..2d19f0cc47f272c5ae4f96ee97ea34a1bce5a407 100644 (file)
@@ -338,12 +338,18 @@ wait:
 static int xlvbd_init_blk_queue(struct gendisk *gd, u16 sector_size)
 {
        struct request_queue *rq;
+       elevator_t *old_e;
 
        rq = blk_init_queue(do_blkif_request, &blkif_io_lock);
        if (rq == NULL)
                return -1;
 
-       elevator_init(rq, "noop");
+       old_e = rq->elevator;
+       if (IS_ERR_VALUE(elevator_init(rq, "noop")))
+               printk(KERN_WARNING
+                       "blkfront: Switch elevator failed, use default\n");
+       else
+               elevator_exit(old_e);
 
        /* Hard sector size and max sectors impersonate the equiv. hardware. */
        blk_queue_hardsect_size(rq, sector_size);
index ecab9e67d47a3985b2cfb67d1c2a16e04981eb1f..29e1dfafb7c6bd813844b82f1e903f88e5d34d99 100644 (file)
@@ -194,7 +194,7 @@ struct ace_device {
        int in_irq;
 
        /* Details of hardware device */
-       unsigned long physaddr;
+       resource_size_t physaddr;
        void __iomem *baseaddr;
        int irq;
        int bus_width;          /* 0 := 8 bit; 1 := 16 bit */
@@ -628,8 +628,8 @@ static void ace_fsm_dostate(struct ace_device *ace)
 
                /* Okay, it's a data request, set it up for transfer */
                dev_dbg(ace->dev,
-                       "request: sec=%lx hcnt=%lx, ccnt=%x, dir=%i\n",
-                       req->sector, req->hard_nr_sectors,
+                       "request: sec=%llx hcnt=%lx, ccnt=%x, dir=%i\n",
+                       (unsigned long long) req->sector, req->hard_nr_sectors,
                        req->current_nr_sectors, rq_data_dir(req));
 
                ace->req = req;
@@ -935,7 +935,8 @@ static int __devinit ace_setup(struct ace_device *ace)
        int rc;
 
        dev_dbg(ace->dev, "ace_setup(ace=0x%p)\n", ace);
-       dev_dbg(ace->dev, "physaddr=0x%lx irq=%i\n", ace->physaddr, ace->irq);
+       dev_dbg(ace->dev, "physaddr=0x%llx irq=%i\n",
+               (unsigned long long)ace->physaddr, ace->irq);
 
        spin_lock_init(&ace->lock);
        init_completion(&ace->id_completion);
@@ -1017,8 +1018,8 @@ static int __devinit ace_setup(struct ace_device *ace)
        /* Print the identification */
        dev_info(ace->dev, "Xilinx SystemACE revision %i.%i.%i\n",
                 (version >> 12) & 0xf, (version >> 8) & 0x0f, version & 0xff);
-       dev_dbg(ace->dev, "physaddr 0x%lx, mapped to 0x%p, irq=%i\n",
-               ace->physaddr, ace->baseaddr, ace->irq);
+       dev_dbg(ace->dev, "physaddr 0x%llx, mapped to 0x%p, irq=%i\n",
+               (unsigned long long) ace->physaddr, ace->baseaddr, ace->irq);
 
        ace->media_change = 1;
        ace_revalidate_disk(ace->gd);
@@ -1035,8 +1036,8 @@ err_alloc_disk:
 err_blk_initq:
        iounmap(ace->baseaddr);
 err_ioremap:
-       dev_info(ace->dev, "xsysace: error initializing device at 0x%lx\n",
-              ace->physaddr);
+       dev_info(ace->dev, "xsysace: error initializing device at 0x%llx\n",
+                (unsigned long long) ace->physaddr);
        return -ENOMEM;
 }
 
@@ -1059,7 +1060,7 @@ static void __devexit ace_teardown(struct ace_device *ace)
 }
 
 static int __devinit
-ace_alloc(struct device *dev, int id, unsigned long physaddr,
+ace_alloc(struct device *dev, int id, resource_size_t physaddr,
          int irq, int bus_width)
 {
        struct ace_device *ace;
@@ -1119,7 +1120,7 @@ static void __devexit ace_free(struct device *dev)
 
 static int __devinit ace_probe(struct platform_device *dev)
 {
-       unsigned long physaddr = 0;
+       resource_size_t physaddr = 0;
        int bus_width = ACE_BUS_WIDTH_16; /* FIXME: should not be hard coded */
        int id = dev->id;
        int irq = NO_IRQ;
@@ -1165,7 +1166,7 @@ static int __devinit
 ace_of_probe(struct of_device *op, const struct of_device_id *match)
 {
        struct resource res;
-       unsigned long physaddr;
+       resource_size_t physaddr;
        const u32 *id;
        int irq, bus_width, rc;
 
index d16b02423d6192f43ad8121776ca419f08cc01c2..7d2e91cccb13e99068a4499bc469ef9bc032c67b 100644 (file)
@@ -2081,10 +2081,6 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
        if (!q)
                return -ENXIO;
 
-       rq = blk_get_request(q, READ, GFP_KERNEL);
-       if (!rq)
-               return -ENOMEM;
-
        cdi->last_sense = 0;
 
        while (nframes) {
@@ -2096,9 +2092,17 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
 
                len = nr * CD_FRAMESIZE_RAW;
 
+               rq = blk_get_request(q, READ, GFP_KERNEL);
+               if (!rq) {
+                       ret = -ENOMEM;
+                       break;
+               }
+
                ret = blk_rq_map_user(q, rq, NULL, ubuf, len, GFP_KERNEL);
-               if (ret)
+               if (ret) {
+                       blk_put_request(rq);
                        break;
+               }
 
                rq->cmd[0] = GPCMD_READ_CD;
                rq->cmd[1] = 1 << 2;
@@ -2124,6 +2128,7 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
 
                if (blk_rq_unmap_user(bio))
                        ret = -EFAULT;
+               blk_put_request(rq);
 
                if (ret)
                        break;
@@ -2133,7 +2138,6 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
                ubuf += len;
        }
 
-       blk_put_request(rq);
        return ret;
 }
 
index 43b35d0369d6c9486b3f5d677313ece83218130c..43d6ba83a1912ccbc5f668876e8e6cf7a82a3066 100644 (file)
@@ -124,7 +124,7 @@ config COMPUTONE
          which give you many serial ports. You would need something like this
          to connect more than two modems to your Linux box, for instance in
          order to become a dial-in server. If you have a card like that, say
-         Y here and read <file:Documentation/computone.txt>.
+         Y here and read <file:Documentation/serial/computone.txt>.
 
          To compile this driver as module, choose M here: the
          module will be called ip2.
@@ -136,7 +136,7 @@ config ROCKETPORT
          This driver supports Comtrol RocketPort and RocketModem PCI boards.   
           These boards provide 2, 4, 8, 16, or 32 high-speed serial ports or
           modems.  For information about the RocketPort/RocketModem  boards
-          and this driver read <file:Documentation/rocket.txt>.
+          and this driver read <file:Documentation/serial/rocket.txt>.
 
          To compile this driver as a module, choose M here: the
          module will be called rocket.
@@ -154,7 +154,7 @@ config CYCLADES
          your Linux box, for instance in order to become a dial-in server.
 
          For information about the Cyclades-Z card, read
-         <file:Documentation/README.cycladesZ>.
+         <file:Documentation/serial/README.cycladesZ>.
 
          To compile this driver as a module, choose M here: the
          module will be called cyclades.
@@ -183,7 +183,7 @@ config DIGIEPCA
          box, for instance in order to become a dial-in server. This driver
          supports the original PC (ISA) boards as well as PCI, and EISA. If
          you have a card like this, say Y here and read the file
-         <file:Documentation/digiepca.txt>.
+         <file:Documentation/serial/digiepca.txt>.
 
          To compile this driver as a module, choose M here: the
          module will be called epca.
@@ -289,7 +289,7 @@ config RISCOM8
          which gives you many serial ports. You would need something like
          this to connect more than two modems to your Linux box, for instance
          in order to become a dial-in server. If you have a card like that,
-         say Y here and read the file <file:Documentation/riscom8.txt>.
+         say Y here and read the file <file:Documentation/serial/riscom8.txt>.
 
          Also it's possible to say M here and compile this driver as kernel
          loadable module; the module will be called riscom8.
@@ -304,8 +304,8 @@ config SPECIALIX
          your Linux box, for instance in order to become a dial-in server.
 
          If you have a card like that, say Y here and read the file
-         <file:Documentation/specialix.txt>. Also it's possible to say M here
-         and compile this driver as kernel loadable module which will be
+         <file:Documentation/serial/specialix.txt>. Also it's possible to say
+         M here and compile this driver as kernel loadable module which will be
          called specialix.
 
 config SX
@@ -313,7 +313,7 @@ config SX
        depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA)
        help
          This is a driver for the SX and SI multiport serial cards.
-         Please read the file <file:Documentation/sx.txt> for details.
+         Please read the file <file:Documentation/serial/sx.txt> for details.
 
          This driver can only be built as a module ( = code which can be
          inserted in and removed from the running kernel whenever you want).
@@ -344,8 +344,8 @@ config STALDRV
          like this to connect more than two modems to your Linux box, for
          instance in order to become a dial-in server.  If you say Y here,
          you will be asked for your specific card model in the next
-         questions.  Make sure to read <file:Documentation/stallion.txt> in
-         this case.  If you have never heard about all this, it's safe to
+         questions.  Make sure to read <file:Documentation/serial/stallion.txt>
+         in this case.  If you have never heard about all this, it's safe to
          say N.
 
 config STALLION
@@ -354,7 +354,7 @@ config STALLION
        help
          If you have an EasyIO or EasyConnection 8/32 multiport Stallion
          card, then this is for you; say Y.  Make sure to read
-         <file:Documentation/stallion.txt>.
+         <file:Documentation/serial/stallion.txt>.
 
          To compile this driver as a module, choose M here: the
          module will be called stallion.
@@ -365,7 +365,7 @@ config ISTALLION
        help
          If you have an EasyConnection 8/64, ONboard, Brumby or Stallion
          serial multiport card, say Y here. Make sure to read
-         <file:Documentation/stallion.txt>.
+         <file:Documentation/serial/stallion.txt>.
 
          To compile this driver as a module, choose M here: the
          module will be called istallion.
index 0f004b65ec0384e383cf12eced1320e311560031..03f95ec08f59bea10ea5aaaeb94a4dda563c5eef 100644 (file)
@@ -27,7 +27,7 @@
 static int uninorth_rev;
 static int is_u3;
 
-static char __devinitdata *aperture = NULL;
+static char *aperture = NULL;
 
 static int uninorth_fetch_size(void)
 {
index 1f06889a96b97e033bdaa294dece945eb8310cc4..bc6163484f62573389fcdcc0388f62270e6bbf53 100644 (file)
@@ -27,7 +27,7 @@
 0x0c   U+2640
 0x0d   U+266a
 0x0e   U+266b
-0x0f   U+263c
+0x0f   U+263c U+00a4
 0x10   U+25b6 U+25ba
 0x11   U+25c0 U+25c4
 0x12   U+2195
@@ -55,7 +55,7 @@
 0x24   U+0024
 0x25   U+0025
 0x26   U+0026
-0x27   U+0027
+0x27   U+0027 U+00b4
 0x28   U+0028
 0x29   U+0029
 0x2a   U+002a
@@ -84,7 +84,7 @@
 0x41   U+0041 U+00c0 U+00c1 U+00c2 U+00c3
 0x42   U+0042
 0x43   U+0043 U+00a9
-0x44   U+0044
+0x44   U+0044 U+00d0
 0x45   U+0045 U+00c8 U+00ca U+00cb
 0x46   U+0046
 0x47   U+0047
 0x79   U+0079 U+00fd
 0x7a   U+007a
 0x7b   U+007b
-0x7c   U+007c U+00a5
+0x7c   U+007c U+00a6
 0x7d   U+007d
 0x7e   U+007e
 #
 0xe8   U+03a6 U+00d8
 0xe9   U+0398
 0xea   U+03a9 U+2126
-0xeb   U+03b4
+0xeb   U+03b4 U+00f0
 0xec   U+221e
 0xed   U+03c6 U+00f8
-0xee   U+03b5
+0xee   U+03b5 U+2208
 0xef   U+2229
 0xf0   U+2261
 0xf1   U+00b1
index 8a59aaa21be5c79e337802eba20cc0e5ac860f67..7a88dfd4427b136c6e034b06d4f6e6e3a416cd39 100644 (file)
@@ -422,9 +422,11 @@ struct ipmi_smi {
 /**
  * The driver model view of the IPMI messaging driver.
  */
-static struct device_driver ipmidriver = {
-       .name = "ipmi",
-       .bus = &platform_bus_type
+static struct platform_driver ipmidriver = {
+       .driver = {
+               .name = "ipmi",
+               .bus = &platform_bus_type
+       }
 };
 static DEFINE_MUTEX(ipmidriver_mutex);
 
@@ -2384,9 +2386,9 @@ static int ipmi_bmc_register(ipmi_smi_t intf, int ifnum,
         * representing the interfaced BMC already
         */
        if (bmc->guid_set)
-               old_bmc = ipmi_find_bmc_guid(&ipmidriver, bmc->guid);
+               old_bmc = ipmi_find_bmc_guid(&ipmidriver.driver, bmc->guid);
        else
-               old_bmc = ipmi_find_bmc_prod_dev_id(&ipmidriver,
+               old_bmc = ipmi_find_bmc_prod_dev_id(&ipmidriver.driver,
                                                    bmc->id.product_id,
                                                    bmc->id.device_id);
 
@@ -2416,7 +2418,7 @@ static int ipmi_bmc_register(ipmi_smi_t intf, int ifnum,
                snprintf(name, sizeof(name),
                         "ipmi_bmc.%4.4x", bmc->id.product_id);
 
-               while (ipmi_find_bmc_prod_dev_id(&ipmidriver,
+               while (ipmi_find_bmc_prod_dev_id(&ipmidriver.driver,
                                                 bmc->id.product_id,
                                                 bmc->id.device_id)) {
                        if (!warn_printed) {
@@ -2446,7 +2448,7 @@ static int ipmi_bmc_register(ipmi_smi_t intf, int ifnum,
                               " Unable to allocate platform device\n");
                        return -ENOMEM;
                }
-               bmc->dev->dev.driver = &ipmidriver;
+               bmc->dev->dev.driver = &ipmidriver.driver;
                dev_set_drvdata(&bmc->dev->dev, bmc);
                kref_init(&bmc->refcount);
 
@@ -4247,7 +4249,7 @@ static int ipmi_init_msghandler(void)
        if (initialized)
                return 0;
 
-       rv = driver_register(&ipmidriver);
+       rv = driver_register(&ipmidriver.driver);
        if (rv) {
                printk(KERN_ERR PFX "Could not register IPMI driver\n");
                return rv;
@@ -4308,7 +4310,7 @@ static __exit void cleanup_ipmi(void)
        remove_proc_entry(proc_ipmi_root->name, NULL);
 #endif /* CONFIG_PROC_FS */
 
-       driver_unregister(&ipmidriver);
+       driver_unregister(&ipmidriver.driver);
 
        initialized = 0;
 
index 3123bf57ad91365039b9b227dc8fb3182a944c06..3000135f2ead3bcd98cd505b7fa89f11d0d2ab5e 100644 (file)
@@ -114,9 +114,11 @@ static char *si_to_str[] = { "kcs", "smic", "bt" };
 
 #define DEVICE_NAME "ipmi_si"
 
-static struct device_driver ipmi_driver = {
-       .name = DEVICE_NAME,
-       .bus = &platform_bus_type
+static struct platform_driver ipmi_driver = {
+       .driver = {
+               .name = DEVICE_NAME,
+               .bus = &platform_bus_type
+       }
 };
 
 
@@ -2868,7 +2870,7 @@ static int try_smi_init(struct smi_info *new_smi)
                        goto out_err;
                }
                new_smi->dev = &new_smi->pdev->dev;
-               new_smi->dev->driver = &ipmi_driver;
+               new_smi->dev->driver = &ipmi_driver.driver;
 
                rv = platform_device_add(new_smi->pdev);
                if (rv) {
@@ -2983,7 +2985,7 @@ static __devinit int init_ipmi_si(void)
        initialized = 1;
 
        /* Register the device drivers. */
-       rv = driver_register(&ipmi_driver);
+       rv = driver_register(&ipmi_driver.driver);
        if (rv) {
                printk(KERN_ERR
                       "init_ipmi_si: Unable to register driver: %d\n",
@@ -3052,7 +3054,7 @@ static __devinit int init_ipmi_si(void)
 #ifdef CONFIG_PPC_OF
                of_unregister_platform_driver(&ipmi_of_platform_driver);
 #endif
-               driver_unregister(&ipmi_driver);
+               driver_unregister(&ipmi_driver.driver);
                printk(KERN_WARNING
                       "ipmi_si: Unable to find any System Interface(s)\n");
                return -ENODEV;
@@ -3151,7 +3153,7 @@ static __exit void cleanup_ipmi_si(void)
                cleanup_one_si(e);
        mutex_unlock(&smi_infos_lock);
 
-       driver_unregister(&ipmi_driver);
+       driver_unregister(&ipmi_driver.driver);
 }
 module_exit(cleanup_ipmi_si);
 
index 44e5d60f517ebd504c0161d516442c76a42f5e57..4b10770fa9377e2ed316abaf0bfdada41adb5044 100644 (file)
@@ -3739,7 +3739,7 @@ static int stli_getbrdnr(void)
  *     do is go probing around in the usual places hoping we can find it.
  */
 
-static int stli_findeisabrds(void)
+static int __init stli_findeisabrds(void)
 {
        struct stlibrd *brdp;
        unsigned int iobase, eid, i;
@@ -3935,7 +3935,7 @@ static struct stlibrd *stli_allocbrd(void)
  *     can find.
  */
 
-static int stli_initbrds(void)
+static int __init stli_initbrds(void)
 {
        struct stlibrd *brdp, *nxtbrdp;
        struct stlconf conf;
index 3b23270eaa65385f56a2cef7652aeb2ccea77055..a8f15e6be594237f150b1b3e92ad1b9a7d468ae1 100644 (file)
@@ -418,7 +418,7 @@ static irqreturn_t cd2401_rxerr_interrupt(int irq, void *dev_id)
                                                             TTY_OVERRUN);
                                        /*
                                           If the flip buffer itself is
-                                          overflowing, we still loose
+                                          overflowing, we still lose
                                           the next incoming character.
                                         */
                                        if (tty_buffer_request_room(tty, 1) !=
index 2457b07dabd69a18d01acc75b257d6f88ae85a3e..f4374437a0331cc4260393f646a86762b35073dd 100644 (file)
@@ -523,7 +523,7 @@ static int acpi_driver_registered;
 
 static int sonypi_ec_write(u8 addr, u8 value)
 {
-#ifdef CONFIG_ACPI_EC
+#ifdef CONFIG_ACPI
        if (SONYPI_ACPI_ACTIVE)
                return ec_write(addr, value);
 #endif
@@ -539,7 +539,7 @@ static int sonypi_ec_write(u8 addr, u8 value)
 
 static int sonypi_ec_read(u8 addr, u8 *value)
 {
-#ifdef CONFIG_ACPI_EC
+#ifdef CONFIG_ACPI
        if (SONYPI_ACPI_ACTIVE)
                return ec_read(addr, value);
 #endif
index 242fd46fda22fef8747909efb71f29b8ded4c157..a16b94f12eb23e1fea8b99bfd6621a0b1bc8b7cd 100644 (file)
@@ -72,7 +72,7 @@
 /*
  * There is a bunch of documentation about the card, jumpers, config
  * settings, restrictions, cables, device names and numbers in
- * Documentation/specialix.txt
+ * Documentation/serial/specialix.txt
  */
 
 #include <linux/module.h>
index 59f472143f087d9486d62bd9f3842c2a9aee7eb6..1412a8d1e58de75059b5687b533e77e4667f44a3 100644 (file)
@@ -1795,12 +1795,15 @@ retry_open:
        }
 #endif
        if (device == MKDEV(TTYAUX_MAJOR, 1)) {
-               driver = tty_driver_kref_get(console_device(&index));
-               if (driver) {
-                       /* Don't let /dev/console block */
-                       filp->f_flags |= O_NONBLOCK;
-                       noctty = 1;
-                       goto got_driver;
+               struct tty_driver *console_driver = console_device(&index);
+               if (console_driver) {
+                       driver = tty_driver_kref_get(console_driver);
+                       if (driver) {
+                               /* Don't let /dev/console block */
+                               filp->f_flags |= O_NONBLOCK;
+                               noctty = 1;
+                               goto got_driver;
+                       }
                }
                mutex_unlock(&tty_mutex);
                return -ENODEV;
index a5af6072e2b34760ade3cf63b879dd16f4015957..008176edbd64511148ac5e1e40d21d3fbf1883d5 100644 (file)
@@ -2274,7 +2274,7 @@ rescan_last_byte:
                                    continue; /* nothing to display */
                                }
                                /* Glyph not found */
-                               if ((!(vc->vc_utf && !vc->vc_disp_ctrl) || c < 128) && !(c & ~charmask)) {
+                               if ((!(vc->vc_utf && !vc->vc_disp_ctrl) && c < 128) && !(c & ~charmask)) {
                                    /* In legacy mode use the glyph we get by a 1:1 mapping.
                                       This would make absolutely no sense with Unicode in mind,
                                       but do this for ASCII characters since a font may lack
index aa7f7962a9a0e678b0e3cdfdd9da1058c3798d14..05d897764f027489a346774cedc0ded600f28d2c 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2003-2008 Xilinx Inc.
  *     All rights reserved.
  *
index 8b0252bf06e221ea89a0b9b6b3f89f0eda301722..d4f419ee87abbfc6fb0d41fd98ab8665524514cf 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2003-2008 Xilinx Inc.
  *     All rights reserved.
  *
index 776b505284783cc0f128763a65925c9dbbd622e1..02225eb19cf6bd2e6d99085b6edea7aa4801c30b 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2007-2008 Xilinx Inc.
  *     All rights reserved.
  *
index 62bda453c90b8a6101e91d11f00ec24406ab48b4..4c9dd9a3b62ac4b0266389141a4f66b9e2e34fd6 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2007-2008 Xilinx Inc.
  *     All rights reserved.
  *
index ed132fe55d3d35aad97339593d5a131fc601b8ba..f40ab699860f4645a693f76a239473812e767493 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2002 Xilinx Inc., Systems Engineering Group
  *     (c) Copyright 2004 Xilinx Inc., Systems Engineering Group
  *     (c) Copyright 2007-2008 Xilinx Inc.
@@ -626,7 +623,7 @@ static int __devinit hwicap_setup(struct device *dev, int id,
        if (!request_mem_region(drvdata->mem_start,
                                        drvdata->mem_size, DRIVER_NAME)) {
                dev_err(dev, "Couldn't lock memory region at %Lx\n",
-                       regs_res->start);
+                       (unsigned long long) regs_res->start);
                retval = -EBUSY;
                goto failed1;
        }
@@ -645,9 +642,10 @@ static int __devinit hwicap_setup(struct device *dev, int id,
        mutex_init(&drvdata->sem);
        drvdata->is_open = 0;
 
-       dev_info(dev, "ioremap %lx to %p with size %Lx\n",
-                (unsigned long int)drvdata->mem_start,
-                       drvdata->base_address, drvdata->mem_size);
+       dev_info(dev, "ioremap %llx to %p with size %llx\n",
+                (unsigned long long) drvdata->mem_start,
+                drvdata->base_address,
+                (unsigned long long) drvdata->mem_size);
 
        cdev_init(&drvdata->cdev, &hwicap_fops);
        drvdata->cdev.owner = THIS_MODULE;
index 24d0d9b938fb39e485c56d9e74d1d9ff6effa5e6..8cca11981c5ff73036eaaeb915fbcf0a050a87c5 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2003-2007 Xilinx Inc.
  *     All rights reserved.
  *
index b6ad3ac5916e0311d989fb3241b04f6327b62912..24607669a52b1a0d41d6f51319c279284e1927f5 100644 (file)
@@ -1357,7 +1357,7 @@ static int hw_supports(struct device *dev, __be32 desc_hdr_template)
        return ret;
 }
 
-static int __devexit talitos_remove(struct of_device *ofdev)
+static int talitos_remove(struct of_device *ofdev)
 {
        struct device *dev = &ofdev->dev;
        struct talitos_private *priv = dev_get_drvdata(dev);
@@ -1622,7 +1622,7 @@ static struct of_platform_driver talitos_driver = {
        .name = "talitos",
        .match_table = talitos_match,
        .probe = talitos_probe,
-       .remove = __devexit_p(talitos_remove),
+       .remove = talitos_remove,
 };
 
 static int __init talitos_init(void)
index dc003a3a787d545207fed8be6e81bb4aacd970c1..657996517374f30f51f10257dd0ef0ee40ae66b9 100644 (file)
@@ -388,7 +388,10 @@ int dma_async_device_register(struct dma_device *device)
 
        init_completion(&device->done);
        kref_init(&device->refcount);
+
+       mutex_lock(&dma_list_mutex);
        device->dev_id = id++;
+       mutex_unlock(&dma_list_mutex);
 
        /* represent channels in sysfs. Probably want devs too */
        list_for_each_entry(chan, &device->channels, device_node) {
@@ -399,8 +402,8 @@ int dma_async_device_register(struct dma_device *device)
                chan->chan_id = chancnt++;
                chan->dev.class = &dma_devclass;
                chan->dev.parent = device->dev;
-               snprintf(chan->dev.bus_id, BUS_ID_SIZE, "dma%dchan%d",
-                        device->dev_id, chan->chan_id);
+               dev_set_name(&chan->dev, "dma%dchan%d",
+                            device->dev_id, chan->chan_id);
 
                rc = device_register(&chan->dev);
                if (rc) {
index d1e381e35a9e1887e79667d3df734d3dd37ad5b9..ed9636bfb54af0e1805ed3ab4dc039b59e434213 100644 (file)
@@ -20,11 +20,11 @@ static unsigned int test_buf_size = 16384;
 module_param(test_buf_size, uint, S_IRUGO);
 MODULE_PARM_DESC(test_buf_size, "Size of the memcpy test buffer");
 
-static char test_channel[BUS_ID_SIZE];
+static char test_channel[20];
 module_param_string(channel, test_channel, sizeof(test_channel), S_IRUGO);
 MODULE_PARM_DESC(channel, "Bus ID of the channel to test (default: any)");
 
-static char test_device[BUS_ID_SIZE];
+static char test_device[20];
 module_param_string(device, test_device, sizeof(test_device), S_IRUGO);
 MODULE_PARM_DESC(device, "Bus ID of the DMA Engine to test (default: any)");
 
@@ -80,14 +80,14 @@ static bool dmatest_match_channel(struct dma_chan *chan)
 {
        if (test_channel[0] == '\0')
                return true;
-       return strcmp(chan->dev.bus_id, test_channel) == 0;
+       return strcmp(dev_name(&chan->dev), test_channel) == 0;
 }
 
 static bool dmatest_match_device(struct dma_device *device)
 {
        if (test_device[0] == '\0')
                return true;
-       return strcmp(device->dev->bus_id, test_device) == 0;
+       return strcmp(dev_name(device->dev), test_device) == 0;
 }
 
 static unsigned long dmatest_random(void)
@@ -332,7 +332,7 @@ static enum dma_state_client dmatest_add_channel(struct dma_chan *chan)
 
        dtc = kmalloc(sizeof(struct dmatest_chan), GFP_KERNEL);
        if (!dtc) {
-               pr_warning("dmatest: No memory for %s\n", chan->dev.bus_id);
+               pr_warning("dmatest: No memory for %s\n", dev_name(&chan->dev));
                return DMA_NAK;
        }
 
@@ -343,16 +343,16 @@ static enum dma_state_client dmatest_add_channel(struct dma_chan *chan)
                thread = kzalloc(sizeof(struct dmatest_thread), GFP_KERNEL);
                if (!thread) {
                        pr_warning("dmatest: No memory for %s-test%u\n",
-                                       chan->dev.bus_id, i);
+                                  dev_name(&chan->dev), i);
                        break;
                }
                thread->chan = dtc->chan;
                smp_wmb();
                thread->task = kthread_run(dmatest_func, thread, "%s-test%u",
-                               chan->dev.bus_id, i);
+                               dev_name(&chan->dev), i);
                if (IS_ERR(thread->task)) {
                        pr_warning("dmatest: Failed to run thread %s-test%u\n",
-                                       chan->dev.bus_id, i);
+                                       dev_name(&chan->dev), i);
                        kfree(thread);
                        break;
                }
@@ -362,7 +362,7 @@ static enum dma_state_client dmatest_add_channel(struct dma_chan *chan)
                list_add_tail(&thread->node, &dtc->threads);
        }
 
-       pr_info("dmatest: Started %u threads using %s\n", i, chan->dev.bus_id);
+       pr_info("dmatest: Started %u threads using %s\n", i, dev_name(&chan->dev));
 
        list_add_tail(&dtc->node, &dmatest_channels);
        nr_channels++;
@@ -379,7 +379,7 @@ static enum dma_state_client dmatest_remove_channel(struct dma_chan *chan)
                        list_del(&dtc->node);
                        dmatest_cleanup_channel(dtc);
                        pr_debug("dmatest: lost channel %s\n",
-                                       chan->dev.bus_id);
+                                       dev_name(&chan->dev));
                        return DMA_ACK;
                }
        }
@@ -418,7 +418,7 @@ dmatest_event(struct dma_client *client, struct dma_chan *chan,
 
        default:
                pr_info("dmatest: Unhandled event %u (%s)\n",
-                               state, chan->dev.bus_id);
+                               state, dev_name(&chan->dev));
                break;
        }
 
index ecd743f7cc617b9921b7d08e553da0264d8c401c..6607fdd00b1cd3a31655cc6b53fca580919f3354 100644 (file)
@@ -1341,10 +1341,12 @@ static void ioat_dma_start_null_desc(struct ioat_dma_chan *ioat_chan)
  */
 #define IOAT_TEST_SIZE 2000
 
+DECLARE_COMPLETION(test_completion);
 static void ioat_dma_test_callback(void *dma_async_param)
 {
        printk(KERN_ERR "ioatdma: ioat_dma_test_callback(%p)\n",
                dma_async_param);
+       complete(&test_completion);
 }
 
 /**
@@ -1410,7 +1412,8 @@ static int ioat_dma_self_test(struct ioatdma_device *device)
                goto free_resources;
        }
        device->common.device_issue_pending(dma_chan);
-       msleep(1);
+
+       wait_for_completion_timeout(&test_completion, msecs_to_jiffies(3000));
 
        if (device->common.device_is_tx_complete(dma_chan, cookie, NULL, NULL)
                                        != DMA_SUCCESS) {
index 71fba82462cb98372568a2f2da6c8c325e1a10d8..6be3172622009ff67ec502b049f167d6ccebe1cd 100644 (file)
@@ -85,18 +85,28 @@ iop_adma_run_tx_complete_actions(struct iop_adma_desc_slot *desc,
                        enum dma_ctrl_flags flags = desc->async_tx.flags;
                        u32 src_cnt;
                        dma_addr_t addr;
+                       dma_addr_t dest;
 
+                       src_cnt = unmap->unmap_src_cnt;
+                       dest = iop_desc_get_dest_addr(unmap, iop_chan);
                        if (!(flags & DMA_COMPL_SKIP_DEST_UNMAP)) {
-                               addr = iop_desc_get_dest_addr(unmap, iop_chan);
-                               dma_unmap_page(dev, addr, len, DMA_FROM_DEVICE);
+                               enum dma_data_direction dir;
+
+                               if (src_cnt > 1) /* is xor? */
+                                       dir = DMA_BIDIRECTIONAL;
+                               else
+                                       dir = DMA_FROM_DEVICE;
+
+                               dma_unmap_page(dev, dest, len, dir);
                        }
 
                        if (!(flags & DMA_COMPL_SKIP_SRC_UNMAP)) {
-                               src_cnt = unmap->unmap_src_cnt;
                                while (src_cnt--) {
                                        addr = iop_desc_get_src_addr(unmap,
                                                                     iop_chan,
                                                                     src_cnt);
+                                       if (addr == dest)
+                                               continue;
                                        dma_unmap_page(dev, addr, len,
                                                       DMA_TO_DEVICE);
                                }
@@ -411,6 +421,7 @@ iop_adma_tx_submit(struct dma_async_tx_descriptor *tx)
        int slot_cnt;
        int slots_per_op;
        dma_cookie_t cookie;
+       dma_addr_t next_dma;
 
        grp_start = sw_desc->group_head;
        slot_cnt = grp_start->slot_cnt;
@@ -425,12 +436,12 @@ iop_adma_tx_submit(struct dma_async_tx_descriptor *tx)
                         &old_chain_tail->chain_node);
 
        /* fix up the hardware chain */
-       iop_desc_set_next_desc(old_chain_tail, grp_start->async_tx.phys);
+       next_dma = grp_start->async_tx.phys;
+       iop_desc_set_next_desc(old_chain_tail, next_dma);
+       BUG_ON(iop_desc_get_next_desc(old_chain_tail) != next_dma); /* flush */
 
-       /* 1/ don't add pre-chained descriptors
-        * 2/ dummy read to flush next_desc write
-        */
-       BUG_ON(iop_desc_get_next_desc(sw_desc));
+       /* check for pre-chained descriptors */
+       iop_paranoia(iop_desc_get_next_desc(sw_desc));
 
        /* increment the pending count by the number of slots
         * memcpy operations have a 1:1 (slot:operation) relation
index 0328da020a1084e6c7f0fcfd0e729a00e079702d..bcda17426411ea6f4c311aa5b077a1e91e906b63 100644 (file)
@@ -311,17 +311,26 @@ mv_xor_run_tx_complete_actions(struct mv_xor_desc_slot *desc,
                        enum dma_ctrl_flags flags = desc->async_tx.flags;
                        u32 src_cnt;
                        dma_addr_t addr;
+                       dma_addr_t dest;
 
+                       src_cnt = unmap->unmap_src_cnt;
+                       dest = mv_desc_get_dest_addr(unmap);
                        if (!(flags & DMA_COMPL_SKIP_DEST_UNMAP)) {
-                               addr = mv_desc_get_dest_addr(unmap);
-                               dma_unmap_page(dev, addr, len, DMA_FROM_DEVICE);
+                               enum dma_data_direction dir;
+
+                               if (src_cnt > 1) /* is xor ? */
+                                       dir = DMA_BIDIRECTIONAL;
+                               else
+                                       dir = DMA_FROM_DEVICE;
+                               dma_unmap_page(dev, dest, len, dir);
                        }
 
                        if (!(flags & DMA_COMPL_SKIP_SRC_UNMAP)) {
-                               src_cnt = unmap->unmap_src_cnt;
                                while (src_cnt--) {
                                        addr = mv_desc_get_src_addr(unmap,
                                                                    src_cnt);
+                                       if (addr == dest)
+                                               continue;
                                        dma_unmap_page(dev, addr, len,
                                                       DMA_TO_DEVICE);
                                }
index f0d9b415db50741bc18f73614be3e7730623b411..d335086f4a265c98cec4300ce2dc5e16d3137e35 100644 (file)
@@ -1381,6 +1381,7 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx)
        if (mci == NULL)
                return -ENOMEM;
 
+       kobject_get(&mci->edac_mci_kobj);
        debugf0("MC: " __FILE__ ": %s(): mci = %p\n", __func__, mci);
 
        mci->dev = &pdev->dev;  /* record ptr  to the generic device */
@@ -1453,6 +1454,7 @@ fail1:
        i5000_put_devices(mci);
 
 fail0:
+       kobject_put(&mci->edac_mci_kobj);
        edac_mc_free(mci);
        return -ENODEV;
 }
@@ -1498,7 +1500,7 @@ static void __devexit i5000_remove_one(struct pci_dev *pdev)
 
        /* retrieve references to resources, and free those resources */
        i5000_put_devices(mci);
-
+       kobject_put(&mci->edac_mci_kobj);
        edac_mc_free(mci);
 }
 
index e43bdc43a1bf09732a7f9037b76852968c24c4f5..ebb037b78758f5f86f06abba1613121f8195d858 100644 (file)
@@ -182,8 +182,6 @@ static struct pci_dev *mci_pdev;    /* init dev: in case that AGP code has
                                         * already registered driver
                                         */
 
-static int i82875p_registered = 1;
-
 static struct edac_pci_ctl_info *i82875p_pci;
 
 static void i82875p_get_error_info(struct mem_ctl_info *mci,
@@ -295,6 +293,7 @@ static int i82875p_setup_overfl_dev(struct pci_dev *pdev,
                                "%s(): pci_bus_add_device() Failed\n",
                                __func__);
                }
+               pci_bus_assign_resources(dev->bus);
        }
 
        *ovrfl_pdev = dev;
@@ -409,6 +408,9 @@ static int i82875p_probe1(struct pci_dev *pdev, int dev_idx)
                goto fail0;
        }
 
+       /* Keeps mci available after edac_mc_del_mc() till edac_mc_free() */
+       kobject_get(&mci->edac_mci_kobj);
+
        debugf3("%s(): init mci\n", __func__);
        mci->dev = &pdev->dev;
        mci->mtype_cap = MEM_FLAG_DDR;
@@ -451,6 +453,7 @@ static int i82875p_probe1(struct pci_dev *pdev, int dev_idx)
        return 0;
 
 fail1:
+       kobject_put(&mci->edac_mci_kobj);
        edac_mc_free(mci);
 
 fail0:
@@ -578,12 +581,11 @@ static void __exit i82875p_exit(void)
 {
        debugf3("%s()\n", __func__);
 
+       i82875p_remove_one(mci_pdev);
+       pci_dev_put(mci_pdev);
+
        pci_unregister_driver(&i82875p_driver);
 
-       if (!i82875p_registered) {
-               i82875p_remove_one(mci_pdev);
-               pci_dev_put(mci_pdev);
-       }
 }
 
 module_init(i82875p_init);
index 46610b090415544306a292a02a4d62f63033d901..ab9c01e462ef64a197c72250fed471b361477f02 100644 (file)
@@ -974,6 +974,7 @@ at_context_queue_packet(struct context *ctx, struct fw_packet *packet)
                        packet->ack = RCODE_SEND_ERROR;
                        return -1;
                }
+               packet->payload_bus = payload_bus;
 
                d[2].req_count    = cpu_to_le16(packet->payload_length);
                d[2].data_address = cpu_to_le32(payload_bus);
@@ -1025,7 +1026,6 @@ static int handle_at_packet(struct context *context,
        struct driver_data *driver_data;
        struct fw_packet *packet;
        struct fw_ohci *ohci = context->ohci;
-       dma_addr_t payload_bus;
        int evt;
 
        if (last->transfer_status == 0)
@@ -1038,9 +1038,8 @@ static int handle_at_packet(struct context *context,
                /* This packet was cancelled, just continue. */
                return 1;
 
-       payload_bus = le32_to_cpu(last->data_address);
-       if (payload_bus != 0)
-               dma_unmap_single(ohci->card.device, payload_bus,
+       if (packet->payload_bus)
+               dma_unmap_single(ohci->card.device, packet->payload_bus,
                                 packet->payload_length, DMA_TO_DEVICE);
 
        evt = le16_to_cpu(last->transfer_status) & 0x1f;
@@ -1697,6 +1696,10 @@ static int ohci_cancel_packet(struct fw_card *card, struct fw_packet *packet)
        if (packet->ack != 0)
                goto out;
 
+       if (packet->payload_bus)
+               dma_unmap_single(ohci->card.device, packet->payload_bus,
+                                packet->payload_length, DMA_TO_DEVICE);
+
        log_ar_at_event('T', packet->speed, packet->header, 0x20);
        driver_data->packet = NULL;
        packet->ack = RCODE_CANCELLED;
index 97df6dac3a821c250dbf068e0e11b33d13affb6f..e54403ee59e7f3f715f587f804d68d7cad21a5c6 100644 (file)
@@ -370,6 +370,11 @@ static const struct {
                .model                  = 0x000021,
                .workarounds            = SBP2_WORKAROUND_FIX_CAPACITY,
        },
+       /* iPod mini */ {
+               .firmware_revision      = 0x0a2700,
+               .model                  = 0x000022,
+               .workarounds            = SBP2_WORKAROUND_FIX_CAPACITY,
+       },
        /* iPod mini */ {
                .firmware_revision      = 0x0a2700,
                .model                  = 0x000023,
index 022ac4fabb6740d3fec872142e9d65d1bc001a96..2884f876397b872085925353997276e24e6c4a83 100644 (file)
@@ -207,6 +207,7 @@ fw_fill_request(struct fw_packet *packet, int tcode, int tlabel,
        packet->speed = speed;
        packet->generation = generation;
        packet->ack = 0;
+       packet->payload_bus = 0;
 }
 
 /**
@@ -581,6 +582,8 @@ fw_fill_response(struct fw_packet *response, u32 *request_header,
                BUG();
                return;
        }
+
+       response->payload_bus = 0;
 }
 EXPORT_SYMBOL(fw_fill_response);
 
index aed7dbb17cdaebb47a695a8b88a019ccf610d614..839466f0a795c57fe2df325a3b1d8e3a8813d1dd 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/list.h>
 #include <linux/spinlock_types.h>
 #include <linux/timer.h>
+#include <linux/types.h>
 #include <linux/workqueue.h>
 
 #define TCODE_IS_READ_REQUEST(tcode)   (((tcode) & ~1) == 4)
@@ -153,6 +154,7 @@ struct fw_packet {
        size_t header_length;
        void *payload;
        size_t payload_length;
+       dma_addr_t payload_bus;
        u32 timestamp;
 
        /*
index 8daf4793ac32485824194af5e14f332c50fc6f26..4a597d8c2f708ae4bb0e52a7c16a4fe0a0891092 100644 (file)
@@ -467,6 +467,17 @@ const char *dmi_get_system_info(int field)
 }
 EXPORT_SYMBOL(dmi_get_system_info);
 
+/**
+ *     dmi_name_in_serial -    Check if string is in the DMI product serial
+ *                             information.
+ */
+int dmi_name_in_serial(const char *str)
+{
+       int f = DMI_PRODUCT_SERIAL;
+       if (dmi_ident[f] && strstr(dmi_ident[f], str))
+               return 1;
+       return 0;
+}
 
 /**
  *     dmi_name_in_vendors - Check if string is anywhere in the DMI vendor information.
index 7f2ee27fe76be15a947db4f5fdf1f7690cbe4caa..48f49d93d249d8155fbdc1973310fab28319e6f3 100644 (file)
@@ -65,6 +65,14 @@ config GPIO_SYSFS
 
 # put expanders in the right section, in alphabetical order
 
+comment "Memory mapped GPIO expanders:"
+
+config GPIO_XILINX
+       bool "Xilinx GPIO support"
+       depends on PPC_OF
+       help
+         Say yes here to support the Xilinx FPGA GPIO device
+
 comment "I2C GPIO expanders:"
 
 config GPIO_MAX732X
index 6aafdeb9ad03c04a4e932c33c7ff3d7f53954cd4..49ac64e515e6690a02fc96a33fa879a6cf0135d1 100644 (file)
@@ -10,4 +10,5 @@ obj-$(CONFIG_GPIO_MCP23S08)   += mcp23s08.o
 obj-$(CONFIG_GPIO_PCA953X)     += pca953x.o
 obj-$(CONFIG_GPIO_PCF857X)     += pcf857x.o
 obj-$(CONFIG_GPIO_TWL4030)     += twl4030-gpio.o
+obj-$(CONFIG_GPIO_XILINX)      += xilinx_gpio.o
 obj-$(CONFIG_GPIO_BT8XX)       += bt8xxgpio.o
index faa1cc66e9cf43a527beb4ce824d966dc407b494..82020abc329efab1d95f56a1d67e71db2122dc1b 100644 (file)
@@ -1134,7 +1134,7 @@ static void gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip)
                        continue;
 
                is_out = test_bit(FLAG_IS_OUT, &gdesc->flags);
-               seq_printf(s, " gpio-%-3d (%-12s) %s %s",
+               seq_printf(s, " gpio-%-3d (%-20.20s) %s %s",
                        gpio, gdesc->label,
                        is_out ? "out" : "in ",
                        chip->get
diff --git a/drivers/gpio/xilinx_gpio.c b/drivers/gpio/xilinx_gpio.c
new file mode 100644 (file)
index 0000000..3c1177a
--- /dev/null
@@ -0,0 +1,235 @@
+/*
+ * Xilinx gpio driver
+ *
+ * Copyright 2008 Xilinx, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/of_device.h>
+#include <linux/of_platform.h>
+#include <linux/of_gpio.h>
+#include <linux/io.h>
+#include <linux/gpio.h>
+
+/* Register Offset Definitions */
+#define XGPIO_DATA_OFFSET   (0x0)      /* Data register  */
+#define XGPIO_TRI_OFFSET    (0x4)      /* I/O direction register  */
+
+struct xgpio_instance {
+       struct of_mm_gpio_chip mmchip;
+       u32 gpio_state;         /* GPIO state shadow register */
+       u32 gpio_dir;           /* GPIO direction shadow register */
+       spinlock_t gpio_lock;   /* Lock used for synchronization */
+};
+
+/**
+ * xgpio_get - Read the specified signal of the GPIO device.
+ * @gc:     Pointer to gpio_chip device structure.
+ * @gpio:   GPIO signal number.
+ *
+ * This function reads the specified signal of the GPIO device. It returns 0 if
+ * the signal clear, 1 if signal is set or negative value on error.
+ */
+static int xgpio_get(struct gpio_chip *gc, unsigned int gpio)
+{
+       struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
+
+       return (in_be32(mm_gc->regs + XGPIO_DATA_OFFSET) >> gpio) & 1;
+}
+
+/**
+ * xgpio_set - Write the specified signal of the GPIO device.
+ * @gc:     Pointer to gpio_chip device structure.
+ * @gpio:   GPIO signal number.
+ * @val:    Value to be written to specified signal.
+ *
+ * This function writes the specified value in to the specified signal of the
+ * GPIO device.
+ */
+static void xgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
+{
+       unsigned long flags;
+       struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
+       struct xgpio_instance *chip =
+           container_of(mm_gc, struct xgpio_instance, mmchip);
+
+       spin_lock_irqsave(&chip->gpio_lock, flags);
+
+       /* Write to GPIO signal and set its direction to output */
+       if (val)
+               chip->gpio_state |= 1 << gpio;
+       else
+               chip->gpio_state &= ~(1 << gpio);
+       out_be32(mm_gc->regs + XGPIO_DATA_OFFSET, chip->gpio_state);
+
+       spin_unlock_irqrestore(&chip->gpio_lock, flags);
+}
+
+/**
+ * xgpio_dir_in - Set the direction of the specified GPIO signal as input.
+ * @gc:     Pointer to gpio_chip device structure.
+ * @gpio:   GPIO signal number.
+ *
+ * This function sets the direction of specified GPIO signal as input.
+ * It returns 0 if direction of GPIO signals is set as input otherwise it
+ * returns negative error value.
+ */
+static int xgpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
+{
+       unsigned long flags;
+       struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
+       struct xgpio_instance *chip =
+           container_of(mm_gc, struct xgpio_instance, mmchip);
+
+       spin_lock_irqsave(&chip->gpio_lock, flags);
+
+       /* Set the GPIO bit in shadow register and set direction as input */
+       chip->gpio_dir |= (1 << gpio);
+       out_be32(mm_gc->regs + XGPIO_TRI_OFFSET, chip->gpio_dir);
+
+       spin_unlock_irqrestore(&chip->gpio_lock, flags);
+
+       return 0;
+}
+
+/**
+ * xgpio_dir_out - Set the direction of the specified GPIO signal as output.
+ * @gc:     Pointer to gpio_chip device structure.
+ * @gpio:   GPIO signal number.
+ * @val:    Value to be written to specified signal.
+ *
+ * This function sets the direction of specified GPIO signal as output. If all
+ * GPIO signals of GPIO chip is configured as input then it returns
+ * error otherwise it returns 0.
+ */
+static int xgpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
+{
+       unsigned long flags;
+       struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
+       struct xgpio_instance *chip =
+           container_of(mm_gc, struct xgpio_instance, mmchip);
+
+       spin_lock_irqsave(&chip->gpio_lock, flags);
+
+       /* Write state of GPIO signal */
+       if (val)
+               chip->gpio_state |= 1 << gpio;
+       else
+               chip->gpio_state &= ~(1 << gpio);
+       out_be32(mm_gc->regs + XGPIO_DATA_OFFSET, chip->gpio_state);
+
+       /* Clear the GPIO bit in shadow register and set direction as output */
+       chip->gpio_dir &= (~(1 << gpio));
+       out_be32(mm_gc->regs + XGPIO_TRI_OFFSET, chip->gpio_dir);
+
+       spin_unlock_irqrestore(&chip->gpio_lock, flags);
+
+       return 0;
+}
+
+/**
+ * xgpio_save_regs - Set initial values of GPIO pins
+ * @mm_gc: pointer to memory mapped GPIO chip structure
+ */
+static void xgpio_save_regs(struct of_mm_gpio_chip *mm_gc)
+{
+       struct xgpio_instance *chip =
+           container_of(mm_gc, struct xgpio_instance, mmchip);
+
+       out_be32(mm_gc->regs + XGPIO_DATA_OFFSET, chip->gpio_state);
+       out_be32(mm_gc->regs + XGPIO_TRI_OFFSET, chip->gpio_dir);
+}
+
+/**
+ * xgpio_of_probe - Probe method for the GPIO device.
+ * @np: pointer to device tree node
+ *
+ * This function probes the GPIO device in the device tree. It initializes the
+ * driver data structure. It returns 0, if the driver is bound to the GPIO
+ * device, or a negative value if there is an error.
+ */
+static int __devinit xgpio_of_probe(struct device_node *np)
+{
+       struct xgpio_instance *chip;
+       struct of_gpio_chip *ofchip;
+       int status = 0;
+       const u32 *tree_info;
+
+       chip = kzalloc(sizeof(*chip), GFP_KERNEL);
+       if (!chip)
+               return -ENOMEM;
+       ofchip = &chip->mmchip.of_gc;
+
+       /* Update GPIO state shadow register with default value */
+       tree_info = of_get_property(np, "xlnx,dout-default", NULL);
+       if (tree_info)
+               chip->gpio_state = *tree_info;
+
+       /* Update GPIO direction shadow register with default value */
+       chip->gpio_dir = 0xFFFFFFFF; /* By default, all pins are inputs */
+       tree_info = of_get_property(np, "xlnx,tri-default", NULL);
+       if (tree_info)
+               chip->gpio_dir = *tree_info;
+
+       /* Check device node and parent device node for device width */
+       ofchip->gc.ngpio = 32; /* By default assume full GPIO controller */
+       tree_info = of_get_property(np, "xlnx,gpio-width", NULL);
+       if (!tree_info)
+               tree_info = of_get_property(np->parent,
+                                           "xlnx,gpio-width", NULL);
+       if (tree_info)
+               ofchip->gc.ngpio = *tree_info;
+
+       spin_lock_init(&chip->gpio_lock);
+
+       ofchip->gpio_cells = 2;
+       ofchip->gc.direction_input = xgpio_dir_in;
+       ofchip->gc.direction_output = xgpio_dir_out;
+       ofchip->gc.get = xgpio_get;
+       ofchip->gc.set = xgpio_set;
+
+       chip->mmchip.save_regs = xgpio_save_regs;
+
+       /* Call the OF gpio helper to setup and register the GPIO device */
+       status = of_mm_gpiochip_add(np, &chip->mmchip);
+       if (status) {
+               kfree(chip);
+               pr_err("%s: error in probe function with status %d\n",
+                      np->full_name, status);
+               return status;
+       }
+       pr_info("XGpio: %s: registered\n", np->full_name);
+       return 0;
+}
+
+static struct of_device_id xgpio_of_match[] __devinitdata = {
+       { .compatible = "xlnx,xps-gpio-1.00.a", },
+       { /* end of list */ },
+};
+
+static int __init xgpio_init(void)
+{
+       struct device_node *np;
+
+       for_each_matching_node(np, xgpio_of_match)
+               xgpio_of_probe(np);
+
+       return 0;
+}
+
+/* Make sure we get initialized before anyone else tries to use us */
+subsys_initcall(xgpio_init);
+/* No exit call at the moment as we cannot unregister of GPIO chips */
+
+MODULE_AUTHOR("Xilinx, Inc.");
+MODULE_DESCRIPTION("Xilinx GPIO driver");
+MODULE_LICENSE("GPL");
index 3ab1e9cc4692fce873b925a7fb7816acc0173710..996097acb5e76b3c3d7698c0885f563ad9248522 100644 (file)
@@ -305,6 +305,8 @@ static void drm_cleanup(struct drm_device * dev)
                return;
        }
 
+       drm_vblank_cleanup(dev);
+
        drm_lastclose(dev);
 
        if (drm_core_has_MTRR(dev) && drm_core_has_AGP(dev) &&
index 15c8dabc3e97af6601448b32442df7fa803d71e5..1e787f894b3cf38f6c46eeda39c73cb8a49ad1c5 100644 (file)
@@ -94,7 +94,7 @@ static void vblank_disable_fn(unsigned long arg)
        }
 }
 
-static void drm_vblank_cleanup(struct drm_device *dev)
+void drm_vblank_cleanup(struct drm_device *dev)
 {
        /* Bail if the driver didn't call drm_vblank_init() */
        if (dev->num_crtcs == 0)
@@ -278,8 +278,6 @@ int drm_irq_uninstall(struct drm_device * dev)
 
        free_irq(dev->pdev->irq, dev);
 
-       drm_vblank_cleanup(dev);
-
        return 0;
 }
 EXPORT_SYMBOL(drm_irq_uninstall);
index 0d215e38606a32a053a620da3026139860e7fa5a..afa8a12cd00902c1c34ea4f4ba83e55c3b7a74e2 100644 (file)
@@ -717,7 +717,7 @@ static int i915_getparam(struct drm_device *dev, void *data,
                value = dev->pci_device;
                break;
        case I915_PARAM_HAS_GEM:
-               value = 1;
+               value = dev_priv->has_gem;
                break;
        default:
                DRM_ERROR("Unknown parameter %d\n", param->param);
@@ -830,6 +830,14 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
 
        dev_priv->regs = ioremap(base, size);
 
+#ifdef CONFIG_HIGHMEM64G
+       /* don't enable GEM on PAE - needs agp + set_memory_* interface fixes */
+       dev_priv->has_gem = 0;
+#else
+       /* enable GEM by default */
+       dev_priv->has_gem = 1;
+#endif
+
        i915_gem_load(dev);
 
        /* Init HWS */
@@ -847,15 +855,23 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
         * and the registers being closely associated.
         *
         * According to chipset errata, on the 965GM, MSI interrupts may
-        * be lost or delayed
+        * be lost or delayed, but we use them anyways to avoid
+        * stuck interrupts on some machines.
         */
-       if (!IS_I945G(dev) && !IS_I945GM(dev) && !IS_I965GM(dev))
+       if (!IS_I945G(dev) && !IS_I945GM(dev))
                pci_enable_msi(dev->pdev);
 
        intel_opregion_init(dev);
 
        spin_lock_init(&dev_priv->user_irq_lock);
 
+       ret = drm_vblank_init(dev, I915_NUM_PIPE);
+
+       if (ret) {
+               (void) i915_driver_unload(dev);
+               return ret;
+       }
+
        return ret;
 }
 
index ef1c0b8f8d07858422526f10e6f4fb63e428cf3d..b3cc4731aa7c07b43d2d9825068f3e8a70ce34bd 100644 (file)
@@ -47,6 +47,8 @@ enum pipe {
        PIPE_B,
 };
 
+#define I915_NUM_PIPE  2
+
 /* Interface history:
  *
  * 1.1: Original.
@@ -104,6 +106,8 @@ struct intel_opregion {
 typedef struct drm_i915_private {
        struct drm_device *dev;
 
+       int has_gem;
+
        void __iomem *regs;
        drm_local_map_t *sarea;
 
@@ -132,6 +136,7 @@ typedef struct drm_i915_private {
        int user_irq_refcount;
        /** Cached value of IMR to avoid reads in updating the bitfield */
        u32 irq_mask_reg;
+       u32 pipestat[2];
 
        int tex_lru_log_granularity;
        int allow_batchbuffer;
@@ -147,6 +152,7 @@ typedef struct drm_i915_private {
        u32 saveDSPBCNTR;
        u32 saveDSPARB;
        u32 saveRENDERSTANDBY;
+       u32 saveHWS;
        u32 savePIPEACONF;
        u32 savePIPEBCONF;
        u32 savePIPEASRC;
@@ -240,6 +246,10 @@ typedef struct drm_i915_private {
                 * List of objects currently involved in rendering from the
                 * ringbuffer.
                 *
+                * Includes buffers having the contents of their GPU caches
+                * flushed, not necessarily primitives.  last_rendering_seqno
+                * represents when the rendering involved will be completed.
+                *
                 * A reference is held on the buffer while on this list.
                 */
                struct list_head active_list;
@@ -249,6 +259,8 @@ typedef struct drm_i915_private {
                 * still have a write_domain which needs to be flushed before
                 * unbinding.
                 *
+                * last_rendering_seqno is 0 while an object is in this list.
+                *
                 * A reference is held on the buffer while on this list.
                 */
                struct list_head flushing_list;
@@ -257,6 +269,8 @@ typedef struct drm_i915_private {
                 * LRU list of objects which are not in the ringbuffer and
                 * are ready to unbind, but are still in the GTT.
                 *
+                * last_rendering_seqno is 0 while an object is in this list.
+                *
                 * A reference is not held on the buffer while on this list,
                 * as merely being GTT-bound shouldn't prevent its being
                 * freed, and we'll pull it off the list in the free path.
@@ -367,8 +381,8 @@ struct drm_i915_gem_object {
        uint32_t agp_type;
 
        /**
-        * Flagging of which individual pages are valid in GEM_DOMAIN_CPU when
-        * GEM_DOMAIN_CPU is not in the object's read domain.
+        * If present, while GEM_DOMAIN_CPU is in the read domain this array
+        * flags which individual pages are valid.
         */
        uint8_t *page_cpu_valid;
 };
@@ -390,9 +404,6 @@ struct drm_i915_gem_request {
        /** Time at which this request was emitted, in jiffies. */
        unsigned long emitted_jiffies;
 
-       /** Cache domains that were flushed at the start of the request. */
-       uint32_t flush_domains;
-
        struct list_head list;
 };
 
@@ -446,6 +457,13 @@ extern int i915_vblank_swap(struct drm_device *dev, void *data,
                            struct drm_file *file_priv);
 extern void i915_enable_irq(drm_i915_private_t *dev_priv, u32 mask);
 
+void
+i915_enable_pipestat(drm_i915_private_t *dev_priv, int pipe, u32 mask);
+
+void
+i915_disable_pipestat(drm_i915_private_t *dev_priv, int pipe, u32 mask);
+
+
 /* i915_mem.c */
 extern int i915_mem_alloc(struct drm_device *dev, void *data,
                          struct drm_file *file_priv);
index 6b4a2bd20640598f1e5407dc095ef3a9bed0d6b7..24fe8c10b4b22c6bac1cfa17d79d55f02dd59179 100644 (file)
 #include "i915_drv.h"
 #include <linux/swap.h>
 
-static int
-i915_gem_object_set_domain(struct drm_gem_object *obj,
-                           uint32_t read_domains,
-                           uint32_t write_domain);
-static int
-i915_gem_object_set_domain_range(struct drm_gem_object *obj,
-                                uint64_t offset,
-                                uint64_t size,
-                                uint32_t read_domains,
-                                uint32_t write_domain);
-static int
-i915_gem_set_domain(struct drm_gem_object *obj,
-                   struct drm_file *file_priv,
-                   uint32_t read_domains,
-                   uint32_t write_domain);
+#define I915_GEM_GPU_DOMAINS   (~(I915_GEM_DOMAIN_CPU | I915_GEM_DOMAIN_GTT))
+
+static void
+i915_gem_object_set_to_gpu_domain(struct drm_gem_object *obj,
+                                 uint32_t read_domains,
+                                 uint32_t write_domain);
+static void i915_gem_object_flush_gpu_write_domain(struct drm_gem_object *obj);
+static void i915_gem_object_flush_gtt_write_domain(struct drm_gem_object *obj);
+static void i915_gem_object_flush_cpu_write_domain(struct drm_gem_object *obj);
+static int i915_gem_object_set_to_gtt_domain(struct drm_gem_object *obj,
+                                            int write);
+static int i915_gem_object_set_to_cpu_domain(struct drm_gem_object *obj,
+                                            int write);
+static int i915_gem_object_set_cpu_read_domain_range(struct drm_gem_object *obj,
+                                                    uint64_t offset,
+                                                    uint64_t size);
+static void i915_gem_object_set_to_full_cpu_read_domain(struct drm_gem_object *obj);
 static int i915_gem_object_get_page_list(struct drm_gem_object *obj);
 static void i915_gem_object_free_page_list(struct drm_gem_object *obj);
 static int i915_gem_object_wait_rendering(struct drm_gem_object *obj);
@@ -83,20 +85,14 @@ int
 i915_gem_get_aperture_ioctl(struct drm_device *dev, void *data,
                            struct drm_file *file_priv)
 {
-       drm_i915_private_t *dev_priv = dev->dev_private;
        struct drm_i915_gem_get_aperture *args = data;
-       struct drm_i915_gem_object *obj_priv;
 
        if (!(dev->driver->driver_features & DRIVER_GEM))
                return -ENODEV;
 
        args->aper_size = dev->gtt_total;
-       args->aper_available_size = args->aper_size;
-
-       list_for_each_entry(obj_priv, &dev_priv->mm.active_list, list) {
-               if (obj_priv->pin_count > 0)
-                       args->aper_available_size -= obj_priv->obj->size;
-       }
+       args->aper_available_size = (args->aper_size -
+                                    atomic_read(&dev->pin_memory));
 
        return 0;
 }
@@ -166,8 +162,8 @@ i915_gem_pread_ioctl(struct drm_device *dev, void *data,
 
        mutex_lock(&dev->struct_mutex);
 
-       ret = i915_gem_object_set_domain_range(obj, args->offset, args->size,
-                                              I915_GEM_DOMAIN_CPU, 0);
+       ret = i915_gem_object_set_cpu_read_domain_range(obj, args->offset,
+                                                       args->size);
        if (ret != 0) {
                drm_gem_object_unreference(obj);
                mutex_unlock(&dev->struct_mutex);
@@ -264,8 +260,7 @@ i915_gem_gtt_pwrite(struct drm_device *dev, struct drm_gem_object *obj,
                mutex_unlock(&dev->struct_mutex);
                return ret;
        }
-       ret = i915_gem_set_domain(obj, file_priv,
-                                 I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
+       ret = i915_gem_object_set_to_gtt_domain(obj, 1);
        if (ret)
                goto fail;
 
@@ -324,8 +319,7 @@ i915_gem_shmem_pwrite(struct drm_device *dev, struct drm_gem_object *obj,
 
        mutex_lock(&dev->struct_mutex);
 
-       ret = i915_gem_set_domain(obj, file_priv,
-                                 I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU);
+       ret = i915_gem_object_set_to_cpu_domain(obj, 1);
        if (ret) {
                mutex_unlock(&dev->struct_mutex);
                return ret;
@@ -401,7 +395,8 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void *data,
 }
 
 /**
- * Called when user space prepares to use an object
+ * Called when user space prepares to use an object with the CPU, either
+ * through the mmap ioctl's mapping or a GTT mapping.
  */
 int
 i915_gem_set_domain_ioctl(struct drm_device *dev, void *data,
@@ -409,11 +404,26 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data,
 {
        struct drm_i915_gem_set_domain *args = data;
        struct drm_gem_object *obj;
+       uint32_t read_domains = args->read_domains;
+       uint32_t write_domain = args->write_domain;
        int ret;
 
        if (!(dev->driver->driver_features & DRIVER_GEM))
                return -ENODEV;
 
+       /* Only handle setting domains to types used by the CPU. */
+       if (write_domain & ~(I915_GEM_DOMAIN_CPU | I915_GEM_DOMAIN_GTT))
+               return -EINVAL;
+
+       if (read_domains & ~(I915_GEM_DOMAIN_CPU | I915_GEM_DOMAIN_GTT))
+               return -EINVAL;
+
+       /* Having something in the write domain implies it's in the read
+        * domain, and only that read domain.  Enforce that in the request.
+        */
+       if (write_domain != 0 && read_domains != write_domain)
+               return -EINVAL;
+
        obj = drm_gem_object_lookup(dev, file_priv, args->handle);
        if (obj == NULL)
                return -EBADF;
@@ -421,10 +431,21 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data,
        mutex_lock(&dev->struct_mutex);
 #if WATCH_BUF
        DRM_INFO("set_domain_ioctl %p(%d), %08x %08x\n",
-                obj, obj->size, args->read_domains, args->write_domain);
+                obj, obj->size, read_domains, write_domain);
 #endif
-       ret = i915_gem_set_domain(obj, file_priv,
-                                 args->read_domains, args->write_domain);
+       if (read_domains & I915_GEM_DOMAIN_GTT) {
+               ret = i915_gem_object_set_to_gtt_domain(obj, write_domain != 0);
+
+               /* Silently promote "you're not bound, there was nothing to do"
+                * to success, since the client was just asking us to
+                * make sure everything was done.
+                */
+               if (ret == -EINVAL)
+                       ret = 0;
+       } else {
+               ret = i915_gem_object_set_to_cpu_domain(obj, write_domain != 0);
+       }
+
        drm_gem_object_unreference(obj);
        mutex_unlock(&dev->struct_mutex);
        return ret;
@@ -459,10 +480,9 @@ i915_gem_sw_finish_ioctl(struct drm_device *dev, void *data,
        obj_priv = obj->driver_private;
 
        /* Pinned buffers may be scanout, so flush the cache */
-       if ((obj->write_domain & I915_GEM_DOMAIN_CPU) && obj_priv->pin_count) {
-               i915_gem_clflush_object(obj);
-               drm_agp_chipset_flush(dev);
-       }
+       if (obj_priv->pin_count)
+               i915_gem_object_flush_cpu_write_domain(obj);
+
        drm_gem_object_unreference(obj);
        mutex_unlock(&dev->struct_mutex);
        return ret;
@@ -536,7 +556,7 @@ i915_gem_object_free_page_list(struct drm_gem_object *obj)
 }
 
 static void
-i915_gem_object_move_to_active(struct drm_gem_object *obj)
+i915_gem_object_move_to_active(struct drm_gem_object *obj, uint32_t seqno)
 {
        struct drm_device *dev = obj->dev;
        drm_i915_private_t *dev_priv = dev->dev_private;
@@ -550,8 +570,20 @@ i915_gem_object_move_to_active(struct drm_gem_object *obj)
        /* Move from whatever list we were on to the tail of execution. */
        list_move_tail(&obj_priv->list,
                       &dev_priv->mm.active_list);
+       obj_priv->last_rendering_seqno = seqno;
 }
 
+static void
+i915_gem_object_move_to_flushing(struct drm_gem_object *obj)
+{
+       struct drm_device *dev = obj->dev;
+       drm_i915_private_t *dev_priv = dev->dev_private;
+       struct drm_i915_gem_object *obj_priv = obj->driver_private;
+
+       BUG_ON(!obj_priv->active);
+       list_move_tail(&obj_priv->list, &dev_priv->mm.flushing_list);
+       obj_priv->last_rendering_seqno = 0;
+}
 
 static void
 i915_gem_object_move_to_inactive(struct drm_gem_object *obj)
@@ -566,6 +598,7 @@ i915_gem_object_move_to_inactive(struct drm_gem_object *obj)
        else
                list_move_tail(&obj_priv->list, &dev_priv->mm.inactive_list);
 
+       obj_priv->last_rendering_seqno = 0;
        if (obj_priv->active) {
                obj_priv->active = 0;
                drm_gem_object_unreference(obj);
@@ -614,10 +647,28 @@ i915_add_request(struct drm_device *dev, uint32_t flush_domains)
 
        request->seqno = seqno;
        request->emitted_jiffies = jiffies;
-       request->flush_domains = flush_domains;
        was_empty = list_empty(&dev_priv->mm.request_list);
        list_add_tail(&request->list, &dev_priv->mm.request_list);
 
+       /* Associate any objects on the flushing list matching the write
+        * domain we're flushing with our flush.
+        */
+       if (flush_domains != 0) {
+               struct drm_i915_gem_object *obj_priv, *next;
+
+               list_for_each_entry_safe(obj_priv, next,
+                                        &dev_priv->mm.flushing_list, list) {
+                       struct drm_gem_object *obj = obj_priv->obj;
+
+                       if ((obj->write_domain & flush_domains) ==
+                           obj->write_domain) {
+                               obj->write_domain = 0;
+                               i915_gem_object_move_to_active(obj, seqno);
+                       }
+               }
+
+       }
+
        if (was_empty && !dev_priv->mm.suspended)
                schedule_delayed_work(&dev_priv->mm.retire_work, HZ);
        return seqno;
@@ -680,30 +731,10 @@ i915_gem_retire_request(struct drm_device *dev,
                         __func__, request->seqno, obj);
 #endif
 
-               if (obj->write_domain != 0) {
-                       list_move_tail(&obj_priv->list,
-                                      &dev_priv->mm.flushing_list);
-               } else {
+               if (obj->write_domain != 0)
+                       i915_gem_object_move_to_flushing(obj);
+               else
                        i915_gem_object_move_to_inactive(obj);
-               }
-       }
-
-       if (request->flush_domains != 0) {
-               struct drm_i915_gem_object *obj_priv, *next;
-
-               /* Clear the write domain and activity from any buffers
-                * that are just waiting for a flush matching the one retired.
-                */
-               list_for_each_entry_safe(obj_priv, next,
-                                        &dev_priv->mm.flushing_list, list) {
-                       struct drm_gem_object *obj = obj_priv->obj;
-
-                       if (obj->write_domain & request->flush_domains) {
-                               obj->write_domain = 0;
-                               i915_gem_object_move_to_inactive(obj);
-                       }
-               }
-
        }
 }
 
@@ -896,25 +927,10 @@ i915_gem_object_wait_rendering(struct drm_gem_object *obj)
        struct drm_i915_gem_object *obj_priv = obj->driver_private;
        int ret;
 
-       /* If there are writes queued to the buffer, flush and
-        * create a new seqno to wait for.
+       /* This function only exists to support waiting for existing rendering,
+        * not for emitting required flushes.
         */
-       if (obj->write_domain & ~(I915_GEM_DOMAIN_CPU|I915_GEM_DOMAIN_GTT)) {
-               uint32_t write_domain = obj->write_domain;
-#if WATCH_BUF
-               DRM_INFO("%s: flushing object %p from write domain %08x\n",
-                         __func__, obj, write_domain);
-#endif
-               i915_gem_flush(dev, 0, write_domain);
-
-               i915_gem_object_move_to_active(obj);
-               obj_priv->last_rendering_seqno = i915_add_request(dev,
-                                                                 write_domain);
-               BUG_ON(obj_priv->last_rendering_seqno == 0);
-#if WATCH_LRU
-               DRM_INFO("%s: flush moves to exec list %p\n", __func__, obj);
-#endif
-       }
+       BUG_ON((obj->write_domain & I915_GEM_GPU_DOMAINS) != 0);
 
        /* If there is rendering queued on the buffer being evicted, wait for
         * it.
@@ -954,24 +970,16 @@ i915_gem_object_unbind(struct drm_gem_object *obj)
                return -EINVAL;
        }
 
-       /* Wait for any rendering to complete
-        */
-       ret = i915_gem_object_wait_rendering(obj);
-       if (ret) {
-               DRM_ERROR("wait_rendering failed: %d\n", ret);
-               return ret;
-       }
-
        /* Move the object to the CPU domain to ensure that
         * any possible CPU writes while it's not in the GTT
         * are flushed when we go to remap it. This will
         * also ensure that all pending GPU writes are finished
         * before we unbind.
         */
-       ret = i915_gem_object_set_domain(obj, I915_GEM_DOMAIN_CPU,
-                                        I915_GEM_DOMAIN_CPU);
+       ret = i915_gem_object_set_to_cpu_domain(obj, 1);
        if (ret) {
-               DRM_ERROR("set_domain failed: %d\n", ret);
+               if (ret != -ERESTARTSYS)
+                       DRM_ERROR("set_domain failed: %d\n", ret);
                return ret;
        }
 
@@ -1086,6 +1094,21 @@ i915_gem_evict_something(struct drm_device *dev)
        return ret;
 }
 
+static int
+i915_gem_evict_everything(struct drm_device *dev)
+{
+       int ret;
+
+       for (;;) {
+               ret = i915_gem_evict_something(dev);
+               if (ret != 0)
+                       break;
+       }
+       if (ret == -ENOMEM)
+               return 0;
+       return ret;
+}
+
 static int
 i915_gem_object_get_page_list(struct drm_gem_object *obj)
 {
@@ -1172,7 +1195,8 @@ i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, unsigned alignment)
 
                ret = i915_gem_evict_something(dev);
                if (ret != 0) {
-                       DRM_ERROR("Failed to evict a buffer %d\n", ret);
+                       if (ret != -ERESTARTSYS)
+                               DRM_ERROR("Failed to evict a buffer %d\n", ret);
                        return ret;
                }
                goto search_free;
@@ -1232,6 +1256,143 @@ i915_gem_clflush_object(struct drm_gem_object *obj)
        drm_clflush_pages(obj_priv->page_list, obj->size / PAGE_SIZE);
 }
 
+/** Flushes any GPU write domain for the object if it's dirty. */
+static void
+i915_gem_object_flush_gpu_write_domain(struct drm_gem_object *obj)
+{
+       struct drm_device *dev = obj->dev;
+       uint32_t seqno;
+
+       if ((obj->write_domain & I915_GEM_GPU_DOMAINS) == 0)
+               return;
+
+       /* Queue the GPU write cache flushing we need. */
+       i915_gem_flush(dev, 0, obj->write_domain);
+       seqno = i915_add_request(dev, obj->write_domain);
+       obj->write_domain = 0;
+       i915_gem_object_move_to_active(obj, seqno);
+}
+
+/** Flushes the GTT write domain for the object if it's dirty. */
+static void
+i915_gem_object_flush_gtt_write_domain(struct drm_gem_object *obj)
+{
+       if (obj->write_domain != I915_GEM_DOMAIN_GTT)
+               return;
+
+       /* No actual flushing is required for the GTT write domain.   Writes
+        * to it immediately go to main memory as far as we know, so there's
+        * no chipset flush.  It also doesn't land in render cache.
+        */
+       obj->write_domain = 0;
+}
+
+/** Flushes the CPU write domain for the object if it's dirty. */
+static void
+i915_gem_object_flush_cpu_write_domain(struct drm_gem_object *obj)
+{
+       struct drm_device *dev = obj->dev;
+
+       if (obj->write_domain != I915_GEM_DOMAIN_CPU)
+               return;
+
+       i915_gem_clflush_object(obj);
+       drm_agp_chipset_flush(dev);
+       obj->write_domain = 0;
+}
+
+/**
+ * Moves a single object to the GTT read, and possibly write domain.
+ *
+ * This function returns when the move is complete, including waiting on
+ * flushes to occur.
+ */
+static int
+i915_gem_object_set_to_gtt_domain(struct drm_gem_object *obj, int write)
+{
+       struct drm_i915_gem_object *obj_priv = obj->driver_private;
+       int ret;
+
+       /* Not valid to be called on unbound objects. */
+       if (obj_priv->gtt_space == NULL)
+               return -EINVAL;
+
+       i915_gem_object_flush_gpu_write_domain(obj);
+       /* Wait on any GPU rendering and flushing to occur. */
+       ret = i915_gem_object_wait_rendering(obj);
+       if (ret != 0)
+               return ret;
+
+       /* If we're writing through the GTT domain, then CPU and GPU caches
+        * will need to be invalidated at next use.
+        */
+       if (write)
+               obj->read_domains &= I915_GEM_DOMAIN_GTT;
+
+       i915_gem_object_flush_cpu_write_domain(obj);
+
+       /* It should now be out of any other write domains, and we can update
+        * the domain values for our changes.
+        */
+       BUG_ON((obj->write_domain & ~I915_GEM_DOMAIN_GTT) != 0);
+       obj->read_domains |= I915_GEM_DOMAIN_GTT;
+       if (write) {
+               obj->write_domain = I915_GEM_DOMAIN_GTT;
+               obj_priv->dirty = 1;
+       }
+
+       return 0;
+}
+
+/**
+ * Moves a single object to the CPU read, and possibly write domain.
+ *
+ * This function returns when the move is complete, including waiting on
+ * flushes to occur.
+ */
+static int
+i915_gem_object_set_to_cpu_domain(struct drm_gem_object *obj, int write)
+{
+       struct drm_device *dev = obj->dev;
+       int ret;
+
+       i915_gem_object_flush_gpu_write_domain(obj);
+       /* Wait on any GPU rendering and flushing to occur. */
+       ret = i915_gem_object_wait_rendering(obj);
+       if (ret != 0)
+               return ret;
+
+       i915_gem_object_flush_gtt_write_domain(obj);
+
+       /* If we have a partially-valid cache of the object in the CPU,
+        * finish invalidating it and free the per-page flags.
+        */
+       i915_gem_object_set_to_full_cpu_read_domain(obj);
+
+       /* Flush the CPU cache if it's still invalid. */
+       if ((obj->read_domains & I915_GEM_DOMAIN_CPU) == 0) {
+               i915_gem_clflush_object(obj);
+               drm_agp_chipset_flush(dev);
+
+               obj->read_domains |= I915_GEM_DOMAIN_CPU;
+       }
+
+       /* It should now be out of any other write domains, and we can update
+        * the domain values for our changes.
+        */
+       BUG_ON((obj->write_domain & ~I915_GEM_DOMAIN_CPU) != 0);
+
+       /* If we're writing through the CPU, then the GPU read domains will
+        * need to be invalidated at next use.
+        */
+       if (write) {
+               obj->read_domains &= I915_GEM_DOMAIN_CPU;
+               obj->write_domain = I915_GEM_DOMAIN_CPU;
+       }
+
+       return 0;
+}
+
 /*
  * Set the next domain for the specified object. This
  * may not actually perform the necessary flushing/invaliding though,
@@ -1343,16 +1504,18 @@ i915_gem_clflush_object(struct drm_gem_object *obj)
  *             MI_FLUSH
  *             drm_agp_chipset_flush
  */
-static int
-i915_gem_object_set_domain(struct drm_gem_object *obj,
-                           uint32_t read_domains,
-                           uint32_t write_domain)
+static void
+i915_gem_object_set_to_gpu_domain(struct drm_gem_object *obj,
+                                 uint32_t read_domains,
+                                 uint32_t write_domain)
 {
        struct drm_device               *dev = obj->dev;
        struct drm_i915_gem_object      *obj_priv = obj->driver_private;
        uint32_t                        invalidate_domains = 0;
        uint32_t                        flush_domains = 0;
-       int                             ret;
+
+       BUG_ON(read_domains & I915_GEM_DOMAIN_CPU);
+       BUG_ON(write_domain == I915_GEM_DOMAIN_CPU);
 
 #if WATCH_BUF
        DRM_INFO("%s: object %p read %08x -> %08x write %08x -> %08x\n",
@@ -1389,34 +1552,11 @@ i915_gem_object_set_domain(struct drm_gem_object *obj,
                DRM_INFO("%s: CPU domain flush %08x invalidate %08x\n",
                         __func__, flush_domains, invalidate_domains);
 #endif
-               /*
-                * If we're invaliding the CPU cache and flushing a GPU cache,
-                * then pause for rendering so that the GPU caches will be
-                * flushed before the cpu cache is invalidated
-                */
-               if ((invalidate_domains & I915_GEM_DOMAIN_CPU) &&
-                   (flush_domains & ~(I915_GEM_DOMAIN_CPU |
-                                      I915_GEM_DOMAIN_GTT))) {
-                       ret = i915_gem_object_wait_rendering(obj);
-                       if (ret)
-                               return ret;
-               }
                i915_gem_clflush_object(obj);
        }
 
        if ((write_domain | flush_domains) != 0)
                obj->write_domain = write_domain;
-
-       /* If we're invalidating the CPU domain, clear the per-page CPU
-        * domain list as well.
-        */
-       if (obj_priv->page_cpu_valid != NULL &&
-           (write_domain != 0 ||
-            read_domains & I915_GEM_DOMAIN_CPU)) {
-               drm_free(obj_priv->page_cpu_valid, obj->size / PAGE_SIZE,
-                        DRM_MEM_DRIVER);
-               obj_priv->page_cpu_valid = NULL;
-       }
        obj->read_domains = read_domains;
 
        dev->invalidate_domains |= invalidate_domains;
@@ -1427,47 +1567,94 @@ i915_gem_object_set_domain(struct drm_gem_object *obj,
                 obj->read_domains, obj->write_domain,
                 dev->invalidate_domains, dev->flush_domains);
 #endif
-       return 0;
 }
 
 /**
- * Set the read/write domain on a range of the object.
+ * Moves the object from a partially CPU read to a full one.
  *
- * Currently only implemented for CPU reads, otherwise drops to normal
- * i915_gem_object_set_domain().
+ * Note that this only resolves i915_gem_object_set_cpu_read_domain_range(),
+ * and doesn't handle transitioning from !(read_domains & I915_GEM_DOMAIN_CPU).
  */
-static int
-i915_gem_object_set_domain_range(struct drm_gem_object *obj,
-                                uint64_t offset,
-                                uint64_t size,
-                                uint32_t read_domains,
-                                uint32_t write_domain)
+static void
+i915_gem_object_set_to_full_cpu_read_domain(struct drm_gem_object *obj)
 {
+       struct drm_device *dev = obj->dev;
        struct drm_i915_gem_object *obj_priv = obj->driver_private;
-       int ret, i;
 
-       if (obj->read_domains & I915_GEM_DOMAIN_CPU)
-               return 0;
+       if (!obj_priv->page_cpu_valid)
+               return;
 
-       if (read_domains != I915_GEM_DOMAIN_CPU ||
-           write_domain != 0)
-               return i915_gem_object_set_domain(obj,
-                                                 read_domains, write_domain);
+       /* If we're partially in the CPU read domain, finish moving it in.
+        */
+       if (obj->read_domains & I915_GEM_DOMAIN_CPU) {
+               int i;
 
-       /* Wait on any GPU rendering to the object to be flushed. */
+               for (i = 0; i <= (obj->size - 1) / PAGE_SIZE; i++) {
+                       if (obj_priv->page_cpu_valid[i])
+                               continue;
+                       drm_clflush_pages(obj_priv->page_list + i, 1);
+               }
+               drm_agp_chipset_flush(dev);
+       }
+
+       /* Free the page_cpu_valid mappings which are now stale, whether
+        * or not we've got I915_GEM_DOMAIN_CPU.
+        */
+       drm_free(obj_priv->page_cpu_valid, obj->size / PAGE_SIZE,
+                DRM_MEM_DRIVER);
+       obj_priv->page_cpu_valid = NULL;
+}
+
+/**
+ * Set the CPU read domain on a range of the object.
+ *
+ * The object ends up with I915_GEM_DOMAIN_CPU in its read flags although it's
+ * not entirely valid.  The page_cpu_valid member of the object flags which
+ * pages have been flushed, and will be respected by
+ * i915_gem_object_set_to_cpu_domain() if it's called on to get a valid mapping
+ * of the whole object.
+ *
+ * This function returns when the move is complete, including waiting on
+ * flushes to occur.
+ */
+static int
+i915_gem_object_set_cpu_read_domain_range(struct drm_gem_object *obj,
+                                         uint64_t offset, uint64_t size)
+{
+       struct drm_i915_gem_object *obj_priv = obj->driver_private;
+       int i, ret;
+
+       if (offset == 0 && size == obj->size)
+               return i915_gem_object_set_to_cpu_domain(obj, 0);
+
+       i915_gem_object_flush_gpu_write_domain(obj);
+       /* Wait on any GPU rendering and flushing to occur. */
        ret = i915_gem_object_wait_rendering(obj);
-       if (ret)
+       if (ret != 0)
                return ret;
+       i915_gem_object_flush_gtt_write_domain(obj);
 
+       /* If we're already fully in the CPU read domain, we're done. */
+       if (obj_priv->page_cpu_valid == NULL &&
+           (obj->read_domains & I915_GEM_DOMAIN_CPU) != 0)
+               return 0;
+
+       /* Otherwise, create/clear the per-page CPU read domain flag if we're
+        * newly adding I915_GEM_DOMAIN_CPU
+        */
        if (obj_priv->page_cpu_valid == NULL) {
                obj_priv->page_cpu_valid = drm_calloc(1, obj->size / PAGE_SIZE,
                                                      DRM_MEM_DRIVER);
-       }
+               if (obj_priv->page_cpu_valid == NULL)
+                       return -ENOMEM;
+       } else if ((obj->read_domains & I915_GEM_DOMAIN_CPU) == 0)
+               memset(obj_priv->page_cpu_valid, 0, obj->size / PAGE_SIZE);
 
        /* Flush the cache on any pages that are still invalid from the CPU's
         * perspective.
         */
-       for (i = offset / PAGE_SIZE; i <= (offset + size - 1) / PAGE_SIZE; i++) {
+       for (i = offset / PAGE_SIZE; i <= (offset + size - 1) / PAGE_SIZE;
+            i++) {
                if (obj_priv->page_cpu_valid[i])
                        continue;
 
@@ -1476,39 +1663,14 @@ i915_gem_object_set_domain_range(struct drm_gem_object *obj,
                obj_priv->page_cpu_valid[i] = 1;
        }
 
-       return 0;
-}
-
-/**
- * Once all of the objects have been set in the proper domain,
- * perform the necessary flush and invalidate operations.
- *
- * Returns the write domains flushed, for use in flush tracking.
- */
-static uint32_t
-i915_gem_dev_set_domain(struct drm_device *dev)
-{
-       uint32_t flush_domains = dev->flush_domains;
-
-       /*
-        * Now that all the buffers are synced to the proper domains,
-        * flush and invalidate the collected domains
+       /* It should now be out of any other write domains, and we can update
+        * the domain values for our changes.
         */
-       if (dev->invalidate_domains | dev->flush_domains) {
-#if WATCH_EXEC
-               DRM_INFO("%s: invalidate_domains %08x flush_domains %08x\n",
-                         __func__,
-                        dev->invalidate_domains,
-                        dev->flush_domains);
-#endif
-               i915_gem_flush(dev,
-                              dev->invalidate_domains,
-                              dev->flush_domains);
-               dev->invalidate_domains = 0;
-               dev->flush_domains = 0;
-       }
+       BUG_ON((obj->write_domain & ~I915_GEM_DOMAIN_CPU) != 0);
 
-       return flush_domains;
+       obj->read_domains |= I915_GEM_DOMAIN_CPU;
+
+       return 0;
 }
 
 /**
@@ -1589,6 +1751,18 @@ i915_gem_object_pin_and_relocate(struct drm_gem_object *obj,
                        return -EINVAL;
                }
 
+               if (reloc.write_domain & I915_GEM_DOMAIN_CPU ||
+                   reloc.read_domains & I915_GEM_DOMAIN_CPU) {
+                       DRM_ERROR("reloc with read/write CPU domains: "
+                                 "obj %p target %d offset %d "
+                                 "read %08x write %08x",
+                                 obj, reloc.target_handle,
+                                 (int) reloc.offset,
+                                 reloc.read_domains,
+                                 reloc.write_domain);
+                       return -EINVAL;
+               }
+
                if (reloc.write_domain && target_obj->pending_write_domain &&
                    reloc.write_domain != target_obj->pending_write_domain) {
                        DRM_ERROR("Write domain conflict: "
@@ -1629,19 +1803,11 @@ i915_gem_object_pin_and_relocate(struct drm_gem_object *obj,
                        continue;
                }
 
-               /* Now that we're going to actually write some data in,
-                * make sure that any rendering using this buffer's contents
-                * is completed.
-                */
-               i915_gem_object_wait_rendering(obj);
-
-               /* As we're writing through the gtt, flush
-                * any CPU writes before we write the relocations
-                */
-               if (obj->write_domain & I915_GEM_DOMAIN_CPU) {
-                       i915_gem_clflush_object(obj);
-                       drm_agp_chipset_flush(dev);
-                       obj->write_domain = 0;
+               ret = i915_gem_object_set_to_gtt_domain(obj, 1);
+               if (ret != 0) {
+                       drm_gem_object_unreference(target_obj);
+                       i915_gem_object_unpin(obj);
+                       return -EINVAL;
                }
 
                /* Map the page containing the relocation we're going to
@@ -1783,6 +1949,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
        int ret, i, pinned = 0;
        uint64_t exec_offset;
        uint32_t seqno, flush_domains;
+       int pin_tries;
 
 #if WATCH_EXEC
        DRM_INFO("buffers_ptr %d buffer_count %d len %08x\n",
@@ -1831,14 +1998,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
                return -EBUSY;
        }
 
-       /* Zero the gloabl flush/invalidate flags. These
-        * will be modified as each object is bound to the
-        * gtt
-        */
-       dev->invalidate_domains = 0;
-       dev->flush_domains = 0;
-
-       /* Look up object handles and perform the relocations */
+       /* Look up object handles */
        for (i = 0; i < args->buffer_count; i++) {
                object_list[i] = drm_gem_object_lookup(dev, file_priv,
                                                       exec_list[i].handle);
@@ -1848,17 +2008,39 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
                        ret = -EBADF;
                        goto err;
                }
+       }
 
-               object_list[i]->pending_read_domains = 0;
-               object_list[i]->pending_write_domain = 0;
-               ret = i915_gem_object_pin_and_relocate(object_list[i],
-                                                      file_priv,
-                                                      &exec_list[i]);
-               if (ret) {
-                       DRM_ERROR("object bind and relocate failed %d\n", ret);
+       /* Pin and relocate */
+       for (pin_tries = 0; ; pin_tries++) {
+               ret = 0;
+               for (i = 0; i < args->buffer_count; i++) {
+                       object_list[i]->pending_read_domains = 0;
+                       object_list[i]->pending_write_domain = 0;
+                       ret = i915_gem_object_pin_and_relocate(object_list[i],
+                                                              file_priv,
+                                                              &exec_list[i]);
+                       if (ret)
+                               break;
+                       pinned = i + 1;
+               }
+               /* success */
+               if (ret == 0)
+                       break;
+
+               /* error other than GTT full, or we've already tried again */
+               if (ret != -ENOMEM || pin_tries >= 1) {
+                       DRM_ERROR("Failed to pin buffers %d\n", ret);
                        goto err;
                }
-               pinned = i + 1;
+
+               /* unpin all of our buffers */
+               for (i = 0; i < pinned; i++)
+                       i915_gem_object_unpin(object_list[i]);
+
+               /* evict everyone we can from the aperture */
+               ret = i915_gem_evict_everything(dev);
+               if (ret)
+                       goto err;
        }
 
        /* Set the pending read domains for the batch buffer to COMMAND */
@@ -1868,32 +2050,37 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
 
        i915_verify_inactive(dev, __FILE__, __LINE__);
 
+       /* Zero the global flush/invalidate flags. These
+        * will be modified as new domains are computed
+        * for each object
+        */
+       dev->invalidate_domains = 0;
+       dev->flush_domains = 0;
+
        for (i = 0; i < args->buffer_count; i++) {
                struct drm_gem_object *obj = object_list[i];
-               struct drm_i915_gem_object *obj_priv = obj->driver_private;
 
-               if (obj_priv->gtt_space == NULL) {
-                       /* We evicted the buffer in the process of validating
-                        * our set of buffers in.  We could try to recover by
-                        * kicking them everything out and trying again from
-                        * the start.
-                        */
-                       ret = -ENOMEM;
-                       goto err;
-               }
-
-               /* make sure all previous memory operations have passed */
-               ret = i915_gem_object_set_domain(obj,
-                                                obj->pending_read_domains,
-                                                obj->pending_write_domain);
-               if (ret)
-                       goto err;
+               /* Compute new gpu domains and update invalidate/flush */
+               i915_gem_object_set_to_gpu_domain(obj,
+                                                 obj->pending_read_domains,
+                                                 obj->pending_write_domain);
        }
 
        i915_verify_inactive(dev, __FILE__, __LINE__);
 
-       /* Flush/invalidate caches and chipset buffer */
-       flush_domains = i915_gem_dev_set_domain(dev);
+       if (dev->invalidate_domains | dev->flush_domains) {
+#if WATCH_EXEC
+               DRM_INFO("%s: invalidate_domains %08x flush_domains %08x\n",
+                         __func__,
+                        dev->invalidate_domains,
+                        dev->flush_domains);
+#endif
+               i915_gem_flush(dev,
+                              dev->invalidate_domains,
+                              dev->flush_domains);
+               if (dev->flush_domains)
+                       (void)i915_add_request(dev, dev->flush_domains);
+       }
 
        i915_verify_inactive(dev, __FILE__, __LINE__);
 
@@ -1913,8 +2100,6 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
                              ~0);
 #endif
 
-       (void)i915_add_request(dev, flush_domains);
-
        /* Exec the batchbuffer */
        ret = i915_dispatch_gem_execbuffer(dev, args, exec_offset);
        if (ret) {
@@ -1942,10 +2127,8 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
        i915_file_priv->mm.last_gem_seqno = seqno;
        for (i = 0; i < args->buffer_count; i++) {
                struct drm_gem_object *obj = object_list[i];
-               struct drm_i915_gem_object *obj_priv = obj->driver_private;
 
-               i915_gem_object_move_to_active(obj);
-               obj_priv->last_rendering_seqno = seqno;
+               i915_gem_object_move_to_active(obj, seqno);
 #if WATCH_LRU
                DRM_INFO("%s: move to exec list %p\n", __func__, obj);
 #endif
@@ -2076,11 +2259,7 @@ i915_gem_pin_ioctl(struct drm_device *dev, void *data,
        /* XXX - flush the CPU caches for pinned objects
         * as the X server doesn't manage domains yet
         */
-       if (obj->write_domain & I915_GEM_DOMAIN_CPU) {
-               i915_gem_clflush_object(obj);
-               drm_agp_chipset_flush(dev);
-               obj->write_domain = 0;
-       }
+       i915_gem_object_flush_cpu_write_domain(obj);
        args->offset = obj_priv->gtt_offset;
        drm_gem_object_unreference(obj);
        mutex_unlock(&dev->struct_mutex);
@@ -2130,7 +2309,14 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
        }
 
        obj_priv = obj->driver_private;
-       args->busy = obj_priv->active;
+       /* Don't count being on the flushing list against the object being
+        * done.  Otherwise, a buffer left on the flushing list but not getting
+        * flushed (because nobody's flushing that domain) won't ever return
+        * unbusy and get reused by libdrm's bo cache.  The other expected
+        * consumer of this interface, OpenGL's occlusion queries, also specs
+        * that the objects get unbusy "eventually" without any interference.
+        */
+       args->busy = obj_priv->active && obj_priv->last_rendering_seqno != 0;
 
        drm_gem_object_unreference(obj);
        mutex_unlock(&dev->struct_mutex);
@@ -2182,29 +2368,6 @@ void i915_gem_free_object(struct drm_gem_object *obj)
        drm_free(obj->driver_private, 1, DRM_MEM_DRIVER);
 }
 
-static int
-i915_gem_set_domain(struct drm_gem_object *obj,
-                   struct drm_file *file_priv,
-                   uint32_t read_domains,
-                   uint32_t write_domain)
-{
-       struct drm_device *dev = obj->dev;
-       int ret;
-       uint32_t flush_domains;
-
-       BUG_ON(!mutex_is_locked(&dev->struct_mutex));
-
-       ret = i915_gem_object_set_domain(obj, read_domains, write_domain);
-       if (ret)
-               return ret;
-       flush_domains = i915_gem_dev_set_domain(obj->dev);
-
-       if (flush_domains & ~(I915_GEM_DOMAIN_CPU|I915_GEM_DOMAIN_GTT))
-               (void) i915_add_request(dev, flush_domains);
-
-       return 0;
-}
-
 /** Unbinds all objects that are on the given buffer list. */
 static int
 i915_gem_evict_from_list(struct drm_device *dev, struct list_head *head)
@@ -2299,29 +2462,52 @@ i915_gem_idle(struct drm_device *dev)
 
        i915_gem_retire_requests(dev);
 
-       /* Active and flushing should now be empty as we've
-        * waited for a sequence higher than any pending execbuffer
-        */
-       BUG_ON(!list_empty(&dev_priv->mm.active_list));
-       BUG_ON(!list_empty(&dev_priv->mm.flushing_list));
+       if (!dev_priv->mm.wedged) {
+               /* Active and flushing should now be empty as we've
+                * waited for a sequence higher than any pending execbuffer
+                */
+               WARN_ON(!list_empty(&dev_priv->mm.active_list));
+               WARN_ON(!list_empty(&dev_priv->mm.flushing_list));
+               /* Request should now be empty as we've also waited
+                * for the last request in the list
+                */
+               WARN_ON(!list_empty(&dev_priv->mm.request_list));
+       }
 
-       /* Request should now be empty as we've also waited
-        * for the last request in the list
+       /* Empty the active and flushing lists to inactive.  If there's
+        * anything left at this point, it means that we're wedged and
+        * nothing good's going to happen by leaving them there.  So strip
+        * the GPU domains and just stuff them onto inactive.
         */
-       BUG_ON(!list_empty(&dev_priv->mm.request_list));
+       while (!list_empty(&dev_priv->mm.active_list)) {
+               struct drm_i915_gem_object *obj_priv;
+
+               obj_priv = list_first_entry(&dev_priv->mm.active_list,
+                                           struct drm_i915_gem_object,
+                                           list);
+               obj_priv->obj->write_domain &= ~I915_GEM_GPU_DOMAINS;
+               i915_gem_object_move_to_inactive(obj_priv->obj);
+       }
+
+       while (!list_empty(&dev_priv->mm.flushing_list)) {
+               struct drm_i915_gem_object *obj_priv;
 
-       /* Move all buffers out of the GTT. */
+               obj_priv = list_first_entry(&dev_priv->mm.flushing_list,
+                                           struct drm_i915_gem_object,
+                                           list);
+               obj_priv->obj->write_domain &= ~I915_GEM_GPU_DOMAINS;
+               i915_gem_object_move_to_inactive(obj_priv->obj);
+       }
+
+
+       /* Move all inactive buffers out of the GTT. */
        ret = i915_gem_evict_from_list(dev, &dev_priv->mm.inactive_list);
+       WARN_ON(!list_empty(&dev_priv->mm.inactive_list));
        if (ret) {
                mutex_unlock(&dev->struct_mutex);
                return ret;
        }
 
-       BUG_ON(!list_empty(&dev_priv->mm.active_list));
-       BUG_ON(!list_empty(&dev_priv->mm.flushing_list));
-       BUG_ON(!list_empty(&dev_priv->mm.inactive_list));
-       BUG_ON(!list_empty(&dev_priv->mm.request_list));
-
        i915_gem_cleanup_ringbuffer(dev);
        mutex_unlock(&dev->struct_mutex);
 
index 93de15b4c9a722749d69d417d88cc1aba49d8280..e8d5abe1250ee14404bf8f9da972e34fd74ff6f0 100644 (file)
@@ -166,10 +166,9 @@ static int i915_gem_request_info(char *buf, char **start, off_t offset,
        list_for_each_entry(gem_request, &dev_priv->mm.request_list,
                            list)
        {
-               DRM_PROC_PRINT("    %d @ %d %08x\n",
+               DRM_PROC_PRINT("    %d @ %d\n",
                               gem_request->seqno,
-                              (int) (jiffies - gem_request->emitted_jiffies),
-                              gem_request->flush_domains);
+                              (int) (jiffies - gem_request->emitted_jiffies));
        }
        if (len > request + offset)
                return request;
index e8b85ac4ca041159553f5211e0bc3cbe58f03cc8..a8cb69469c641ff28f4d57df20b51d0dd5772f7c 100644 (file)
@@ -119,9 +119,10 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
                            dcc & DCC_CHANNEL_XOR_DISABLE) {
                                swizzle_x = I915_BIT_6_SWIZZLE_9_10;
                                swizzle_y = I915_BIT_6_SWIZZLE_9;
-                       } else if (IS_I965GM(dev) || IS_GM45(dev)) {
-                               /* GM965 only does bit 11-based channel
-                                * randomization
+                       } else if ((IS_I965GM(dev) || IS_GM45(dev)) &&
+                                  (dcc & DCC_CHANNEL_XOR_BIT_17) == 0) {
+                               /* GM965/GM45 does either bit 11 or bit 17
+                                * swizzling.
                                 */
                                swizzle_x = I915_BIT_6_SWIZZLE_9_10_11;
                                swizzle_y = I915_BIT_6_SWIZZLE_9_11;
index 82752d6177a4949d406ec383b53cc31e6bcf9474..69b9a42da95ed720e85841c00ab7580fdff94830 100644 (file)
 
 #define MAX_NOPID ((u32)~0)
 
-/** These are the interrupts used by the driver */
-#define I915_INTERRUPT_ENABLE_MASK (I915_USER_INTERRUPT |              \
-                                   I915_ASLE_INTERRUPT |               \
-                                   I915_DISPLAY_PIPE_A_EVENT_INTERRUPT | \
-                                   I915_DISPLAY_PIPE_B_EVENT_INTERRUPT)
+/**
+ * Interrupts that are always left unmasked.
+ *
+ * Since pipe events are edge-triggered from the PIPESTAT register to IIR,
+ * we leave them always unmasked in IMR and then control enabling them through
+ * PIPESTAT alone.
+ */
+#define I915_INTERRUPT_ENABLE_FIX (I915_ASLE_INTERRUPT | \
+                                  I915_DISPLAY_PIPE_A_EVENT_INTERRUPT |  \
+                                  I915_DISPLAY_PIPE_B_EVENT_INTERRUPT)
+
+/** Interrupts that we mask and unmask at runtime. */
+#define I915_INTERRUPT_ENABLE_VAR (I915_USER_INTERRUPT)
+
+/** These are all of the interrupts used by the driver */
+#define I915_INTERRUPT_ENABLE_MASK (I915_INTERRUPT_ENABLE_FIX | \
+                                   I915_INTERRUPT_ENABLE_VAR)
 
 void
 i915_enable_irq(drm_i915_private_t *dev_priv, u32 mask)
@@ -59,6 +71,41 @@ i915_disable_irq(drm_i915_private_t *dev_priv, u32 mask)
        }
 }
 
+static inline u32
+i915_pipestat(int pipe)
+{
+       if (pipe == 0)
+               return PIPEASTAT;
+       if (pipe == 1)
+               return PIPEBSTAT;
+       BUG();
+}
+
+void
+i915_enable_pipestat(drm_i915_private_t *dev_priv, int pipe, u32 mask)
+{
+       if ((dev_priv->pipestat[pipe] & mask) != mask) {
+               u32 reg = i915_pipestat(pipe);
+
+               dev_priv->pipestat[pipe] |= mask;
+               /* Enable the interrupt, clear any pending status */
+               I915_WRITE(reg, dev_priv->pipestat[pipe] | (mask >> 16));
+               (void) I915_READ(reg);
+       }
+}
+
+void
+i915_disable_pipestat(drm_i915_private_t *dev_priv, int pipe, u32 mask)
+{
+       if ((dev_priv->pipestat[pipe] & mask) != 0) {
+               u32 reg = i915_pipestat(pipe);
+
+               dev_priv->pipestat[pipe] &= ~mask;
+               I915_WRITE(reg, dev_priv->pipestat[pipe]);
+               (void) I915_READ(reg);
+       }
+}
+
 /**
  * i915_pipe_enabled - check if a pipe is enabled
  * @dev: DRM device
@@ -121,80 +168,102 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
 {
        struct drm_device *dev = (struct drm_device *) arg;
        drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
-       u32 iir;
+       u32 iir, new_iir;
        u32 pipea_stats, pipeb_stats;
+       u32 vblank_status;
+       u32 vblank_enable;
        int vblank = 0;
+       unsigned long irqflags;
+       int irq_received;
+       int ret = IRQ_NONE;
 
        atomic_inc(&dev_priv->irq_received);
 
-       if (dev->pdev->msi_enabled)
-               I915_WRITE(IMR, ~0);
        iir = I915_READ(IIR);
 
-       if (iir == 0) {
-               if (dev->pdev->msi_enabled) {
-                       I915_WRITE(IMR, dev_priv->irq_mask_reg);
-                       (void) I915_READ(IMR);
-               }
-               return IRQ_NONE;
+       if (IS_I965G(dev)) {
+               vblank_status = I915_START_VBLANK_INTERRUPT_STATUS;
+               vblank_enable = PIPE_START_VBLANK_INTERRUPT_ENABLE;
+       } else {
+               vblank_status = I915_VBLANK_INTERRUPT_STATUS;
+               vblank_enable = I915_VBLANK_INTERRUPT_ENABLE;
        }
 
-       /*
-        * Clear the PIPE(A|B)STAT regs before the IIR otherwise
-        * we may get extra interrupts.
-        */
-       if (iir & I915_DISPLAY_PIPE_A_EVENT_INTERRUPT) {
+       for (;;) {
+               irq_received = iir != 0;
+
+               /* Can't rely on pipestat interrupt bit in iir as it might
+                * have been cleared after the pipestat interrupt was received.
+                * It doesn't set the bit in iir again, but it still produces
+                * interrupts (for non-MSI).
+                */
+               spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags);
                pipea_stats = I915_READ(PIPEASTAT);
-               if (!(dev_priv->vblank_pipe & DRM_I915_VBLANK_PIPE_A))
-                       pipea_stats &= ~(PIPE_START_VBLANK_INTERRUPT_ENABLE |
-                                        PIPE_VBLANK_INTERRUPT_ENABLE);
-               else if (pipea_stats & (PIPE_START_VBLANK_INTERRUPT_STATUS|
-                                       PIPE_VBLANK_INTERRUPT_STATUS)) {
+               pipeb_stats = I915_READ(PIPEBSTAT);
+               /*
+                * Clear the PIPE(A|B)STAT regs before the IIR
+                */
+               if (pipea_stats & 0x8000ffff) {
+                       I915_WRITE(PIPEASTAT, pipea_stats);
+                       irq_received = 1;
+               }
+
+               if (pipeb_stats & 0x8000ffff) {
+                       I915_WRITE(PIPEBSTAT, pipeb_stats);
+                       irq_received = 1;
+               }
+               spin_unlock_irqrestore(&dev_priv->user_irq_lock, irqflags);
+
+               if (!irq_received)
+                       break;
+
+               ret = IRQ_HANDLED;
+
+               I915_WRITE(IIR, iir);
+               new_iir = I915_READ(IIR); /* Flush posted writes */
+
+               if (dev_priv->sarea_priv)
+                       dev_priv->sarea_priv->last_dispatch =
+                               READ_BREADCRUMB(dev_priv);
+
+               if (iir & I915_USER_INTERRUPT) {
+                       dev_priv->mm.irq_gem_seqno = i915_get_gem_seqno(dev);
+                       DRM_WAKEUP(&dev_priv->irq_queue);
+               }
+
+               if (pipea_stats & vblank_status) {
                        vblank++;
                        drm_handle_vblank(dev, 0);
                }
 
-               I915_WRITE(PIPEASTAT, pipea_stats);
-       }
-       if (iir & I915_DISPLAY_PIPE_B_EVENT_INTERRUPT) {
-               pipeb_stats = I915_READ(PIPEBSTAT);
-               /* Ack the event */
-               I915_WRITE(PIPEBSTAT, pipeb_stats);
-
-               /* The vblank interrupt gets enabled even if we didn't ask for
-                  it, so make sure it's shut down again */
-               if (!(dev_priv->vblank_pipe & DRM_I915_VBLANK_PIPE_B))
-                       pipeb_stats &= ~(PIPE_START_VBLANK_INTERRUPT_ENABLE |
-                                        PIPE_VBLANK_INTERRUPT_ENABLE);
-               else if (pipeb_stats & (PIPE_START_VBLANK_INTERRUPT_STATUS|
-                                       PIPE_VBLANK_INTERRUPT_STATUS)) {
+               if (pipeb_stats & vblank_status) {
                        vblank++;
                        drm_handle_vblank(dev, 1);
                }
 
-               if (pipeb_stats & I915_LEGACY_BLC_EVENT_STATUS)
+               if ((pipeb_stats & I915_LEGACY_BLC_EVENT_STATUS) ||
+                   (iir & I915_ASLE_INTERRUPT))
                        opregion_asle_intr(dev);
-               I915_WRITE(PIPEBSTAT, pipeb_stats);
-       }
-
-       I915_WRITE(IIR, iir);
-       if (dev->pdev->msi_enabled)
-               I915_WRITE(IMR, dev_priv->irq_mask_reg);
-       (void) I915_READ(IIR); /* Flush posted writes */
-
-       if (dev_priv->sarea_priv)
-               dev_priv->sarea_priv->last_dispatch =
-                       READ_BREADCRUMB(dev_priv);
 
-       if (iir & I915_USER_INTERRUPT) {
-               dev_priv->mm.irq_gem_seqno = i915_get_gem_seqno(dev);
-               DRM_WAKEUP(&dev_priv->irq_queue);
+               /* With MSI, interrupts are only generated when iir
+                * transitions from zero to nonzero.  If another bit got
+                * set while we were handling the existing iir bits, then
+                * we would never get another interrupt.
+                *
+                * This is fine on non-MSI as well, as if we hit this path
+                * we avoid exiting the interrupt handler only to generate
+                * another one.
+                *
+                * Note that for MSI this could cause a stray interrupt report
+                * if an interrupt landed in the time between writing IIR and
+                * the posting read.  This should be rare enough to never
+                * trigger the 99% of 100,000 interrupts test for disabling
+                * stray interrupts.
+                */
+               iir = new_iir;
        }
 
-       if (iir & I915_ASLE_INTERRUPT)
-               opregion_asle_intr(dev);
-
-       return IRQ_HANDLED;
+       return ret;
 }
 
 static int i915_emit_irq(struct drm_device * dev)
@@ -330,48 +399,16 @@ int i915_irq_wait(struct drm_device *dev, void *data,
 int i915_enable_vblank(struct drm_device *dev, int pipe)
 {
        drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
-       u32     pipestat_reg = 0;
-       u32     pipestat;
-       u32     interrupt = 0;
        unsigned long irqflags;
 
-       switch (pipe) {
-       case 0:
-               pipestat_reg = PIPEASTAT;
-               interrupt = I915_DISPLAY_PIPE_A_EVENT_INTERRUPT;
-               break;
-       case 1:
-               pipestat_reg = PIPEBSTAT;
-               interrupt = I915_DISPLAY_PIPE_B_EVENT_INTERRUPT;
-               break;
-       default:
-               DRM_ERROR("tried to enable vblank on non-existent pipe %d\n",
-                         pipe);
-               return 0;
-       }
-
        spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags);
-       /* Enabling vblank events in IMR comes before PIPESTAT write, or
-        * there's a race where the PIPESTAT vblank bit gets set to 1, so
-        * the OR of enabled PIPESTAT bits goes to 1, so the PIPExEVENT in
-        * ISR flashes to 1, but the IIR bit doesn't get set to 1 because
-        * IMR masks it.  It doesn't ever get set after we clear the masking
-        * in IMR because the ISR bit is edge, not level-triggered, on the
-        * OR of PIPESTAT bits.
-        */
-       i915_enable_irq(dev_priv, interrupt);
-       pipestat = I915_READ(pipestat_reg);
        if (IS_I965G(dev))
-               pipestat |= PIPE_START_VBLANK_INTERRUPT_ENABLE;
+               i915_enable_pipestat(dev_priv, pipe,
+                                    PIPE_START_VBLANK_INTERRUPT_ENABLE);
        else
-               pipestat |= PIPE_VBLANK_INTERRUPT_ENABLE;
-       /* Clear any stale interrupt status */
-       pipestat |= (PIPE_START_VBLANK_INTERRUPT_STATUS |
-                    PIPE_VBLANK_INTERRUPT_STATUS);
-       I915_WRITE(pipestat_reg, pipestat);
-       (void) I915_READ(pipestat_reg); /* Posting read */
+               i915_enable_pipestat(dev_priv, pipe,
+                                    PIPE_VBLANK_INTERRUPT_ENABLE);
        spin_unlock_irqrestore(&dev_priv->user_irq_lock, irqflags);
-
        return 0;
 }
 
@@ -381,37 +418,12 @@ int i915_enable_vblank(struct drm_device *dev, int pipe)
 void i915_disable_vblank(struct drm_device *dev, int pipe)
 {
        drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
-       u32     pipestat_reg = 0;
-       u32     pipestat;
-       u32     interrupt = 0;
        unsigned long irqflags;
 
-       switch (pipe) {
-       case 0:
-               pipestat_reg = PIPEASTAT;
-               interrupt = I915_DISPLAY_PIPE_A_EVENT_INTERRUPT;
-               break;
-       case 1:
-               pipestat_reg = PIPEBSTAT;
-               interrupt = I915_DISPLAY_PIPE_B_EVENT_INTERRUPT;
-               break;
-       default:
-               DRM_ERROR("tried to disable vblank on non-existent pipe %d\n",
-                         pipe);
-               return;
-               break;
-       }
-
        spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags);
-       i915_disable_irq(dev_priv, interrupt);
-       pipestat = I915_READ(pipestat_reg);
-       pipestat &= ~(PIPE_START_VBLANK_INTERRUPT_ENABLE |
-                     PIPE_VBLANK_INTERRUPT_ENABLE);
-       /* Clear any stale interrupt status */
-       pipestat |= (PIPE_START_VBLANK_INTERRUPT_STATUS |
-                    PIPE_VBLANK_INTERRUPT_STATUS);
-       I915_WRITE(pipestat_reg, pipestat);
-       (void) I915_READ(pipestat_reg); /* Posting read */
+       i915_disable_pipestat(dev_priv, pipe,
+                             PIPE_VBLANK_INTERRUPT_ENABLE |
+                             PIPE_START_VBLANK_INTERRUPT_ENABLE);
        spin_unlock_irqrestore(&dev_priv->user_irq_lock, irqflags);
 }
 
@@ -476,32 +488,35 @@ void i915_driver_irq_preinstall(struct drm_device * dev)
        drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
 
        I915_WRITE(HWSTAM, 0xeffe);
+       I915_WRITE(PIPEASTAT, 0);
+       I915_WRITE(PIPEBSTAT, 0);
        I915_WRITE(IMR, 0xffffffff);
        I915_WRITE(IER, 0x0);
+       (void) I915_READ(IER);
 }
 
 int i915_driver_irq_postinstall(struct drm_device *dev)
 {
        drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
-       int ret, num_pipes = 2;
-
-       /* Set initial unmasked IRQs to just the selected vblank pipes. */
-       dev_priv->irq_mask_reg = ~0;
-
-       ret = drm_vblank_init(dev, num_pipes);
-       if (ret)
-               return ret;
 
        dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A | DRM_I915_VBLANK_PIPE_B;
-       dev_priv->irq_mask_reg &= ~I915_DISPLAY_PIPE_A_VBLANK_INTERRUPT;
-       dev_priv->irq_mask_reg &= ~I915_DISPLAY_PIPE_B_VBLANK_INTERRUPT;
 
        dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */
 
-       dev_priv->irq_mask_reg &= I915_INTERRUPT_ENABLE_MASK;
+       /* Unmask the interrupts that we always want on. */
+       dev_priv->irq_mask_reg = ~I915_INTERRUPT_ENABLE_FIX;
+
+       dev_priv->pipestat[0] = 0;
+       dev_priv->pipestat[1] = 0;
+
+       /* Disable pipe interrupt enables, clear pending pipe status */
+       I915_WRITE(PIPEASTAT, I915_READ(PIPEASTAT) & 0x8000ffff);
+       I915_WRITE(PIPEBSTAT, I915_READ(PIPEBSTAT) & 0x8000ffff);
+       /* Clear pending interrupt status */
+       I915_WRITE(IIR, I915_READ(IIR));
 
-       I915_WRITE(IMR, dev_priv->irq_mask_reg);
        I915_WRITE(IER, I915_INTERRUPT_ENABLE_MASK);
+       I915_WRITE(IMR, dev_priv->irq_mask_reg);
        (void) I915_READ(IER);
 
        opregion_enable_asle(dev);
@@ -513,7 +528,6 @@ int i915_driver_irq_postinstall(struct drm_device *dev)
 void i915_driver_irq_uninstall(struct drm_device * dev)
 {
        drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
-       u32 temp;
 
        if (!dev_priv)
                return;
@@ -521,13 +535,12 @@ void i915_driver_irq_uninstall(struct drm_device * dev)
        dev_priv->vblank_pipe = 0;
 
        I915_WRITE(HWSTAM, 0xffffffff);
+       I915_WRITE(PIPEASTAT, 0);
+       I915_WRITE(PIPEBSTAT, 0);
        I915_WRITE(IMR, 0xffffffff);
        I915_WRITE(IER, 0x0);
 
-       temp = I915_READ(PIPEASTAT);
-       I915_WRITE(PIPEASTAT, temp);
-       temp = I915_READ(PIPEBSTAT);
-       I915_WRITE(PIPEBSTAT, temp);
-       temp = I915_READ(IIR);
-       I915_WRITE(IIR, temp);
+       I915_WRITE(PIPEASTAT, I915_READ(PIPEASTAT) & 0x8000ffff);
+       I915_WRITE(PIPEBSTAT, I915_READ(PIPEBSTAT) & 0x8000ffff);
+       I915_WRITE(IIR, I915_READ(IIR));
 }
index 1787a0c7e3abf09acc363b87495190ce362db6ce..13ae731a33dba577b9a7326a9fe22daf8c1baf1c 100644 (file)
@@ -235,17 +235,15 @@ void opregion_enable_asle(struct drm_device *dev)
        struct opregion_asle *asle = dev_priv->opregion.asle;
 
        if (asle) {
-               u32 pipeb_stats = I915_READ(PIPEBSTAT);
                if (IS_MOBILE(dev)) {
-                       /* Many devices trigger events with a write to the
-                          legacy backlight controller, so we need to ensure
-                          that it's able to generate interrupts */
-                       I915_WRITE(PIPEBSTAT, pipeb_stats |=
-                                  I915_LEGACY_BLC_EVENT_ENABLE);
-                       i915_enable_irq(dev_priv, I915_ASLE_INTERRUPT |
-                                       I915_DISPLAY_PIPE_B_EVENT_INTERRUPT);
-               } else
-                       i915_enable_irq(dev_priv, I915_ASLE_INTERRUPT);
+                       unsigned long irqflags;
+
+                       spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags);
+                       i915_enable_pipestat(dev_priv, 1,
+                                            I915_LEGACY_BLC_EVENT_ENABLE);
+                       spin_unlock_irqrestore(&dev_priv->user_irq_lock,
+                                              irqflags);
+               }
 
                asle->tche = ASLE_ALS_EN | ASLE_BLC_EN | ASLE_PFIT_EN |
                        ASLE_PFMB_EN;
index 0e476eba36e662b75ce24db2b7bb52162699f9e6..9d24aaeb8a453d76e2d23e2223af3bfc527a74fa 100644 (file)
 #define DCC_ADDRESSING_MODE_DUAL_CHANNEL_INTERLEAVED   (2 << 0)
 #define DCC_ADDRESSING_MODE_MASK                       (3 << 0)
 #define DCC_CHANNEL_XOR_DISABLE                                (1 << 10)
+#define DCC_CHANNEL_XOR_BIT_17                         (1 << 9)
 
 /** 965 MCH register controlling DRAM channel configuration */
 #define C0DRB3                 0x10206
index 5ddc6e595c0cef6b12ca729570505fd136f5d07d..5d84027ee8f39608076220513c71ed097cb751e4 100644 (file)
@@ -244,6 +244,9 @@ int i915_save_state(struct drm_device *dev)
        if (IS_I965G(dev) && IS_MOBILE(dev))
                dev_priv->saveRENDERSTANDBY = I915_READ(MCHBAR_RENDER_STANDBY);
 
+       /* Hardware status page */
+       dev_priv->saveHWS = I915_READ(HWS_PGA);
+
        /* Display arbitration control */
        dev_priv->saveDSPARB = I915_READ(DSPARB);
 
@@ -373,6 +376,9 @@ int i915_restore_state(struct drm_device *dev)
        if (IS_I965G(dev) && IS_MOBILE(dev))
                I915_WRITE(MCHBAR_RENDER_STANDBY, dev_priv->saveRENDERSTANDBY);
 
+       /* Hardware status page */
+       I915_WRITE(HWS_PGA, dev_priv->saveHWS);
+
        /* Display arbitration */
        I915_WRITE(DSPARB, dev_priv->saveDSPARB);
 
index c1d12dbfa8d8dec82e47c7821561e06da9744417..b49c5ff29585d3533b9b915b6c65cc5f9904c68f 100644 (file)
@@ -396,6 +396,7 @@ int mga_freelist_put(struct drm_device * dev, struct drm_buf * buf)
 int mga_driver_load(struct drm_device * dev, unsigned long flags)
 {
        drm_mga_private_t *dev_priv;
+       int ret;
 
        dev_priv = drm_alloc(sizeof(drm_mga_private_t), DRM_MEM_DRIVER);
        if (!dev_priv)
@@ -415,6 +416,13 @@ int mga_driver_load(struct drm_device * dev, unsigned long flags)
        dev->types[7] = _DRM_STAT_PRIMARY;
        dev->types[8] = _DRM_STAT_SECONDARY;
 
+       ret = drm_vblank_init(dev, 1);
+
+       if (ret) {
+               (void) mga_driver_unload(dev);
+               return ret;
+       }
+
        return 0;
 }
 
index bab42f41188b0238356b4ef1ce80caeb87e6a6db..daa6041a483ad8be9f608b72f4c3f79db7f63e01 100644 (file)
@@ -152,11 +152,6 @@ void mga_driver_irq_preinstall(struct drm_device * dev)
 int mga_driver_irq_postinstall(struct drm_device *dev)
 {
        drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private;
-       int ret;
-
-       ret = drm_vblank_init(dev, 1);
-       if (ret)
-               return ret;
 
        DRM_INIT_WAITQUEUE(&dev_priv->fence_queue);
 
index 3265d53ba91f0d966fb4aadbe0645cab227cd0ef..601f4c0e5da57accd3e81ea1938f72bcf1c61c2e 100644 (file)
@@ -45,6 +45,7 @@ static struct drm_driver driver = {
            DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG |
            DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
        .dev_priv_size = sizeof(drm_r128_buf_priv_t),
+       .load = r128_driver_load,
        .preclose = r128_driver_preclose,
        .lastclose = r128_driver_lastclose,
        .get_vblank_counter = r128_get_vblank_counter,
@@ -84,6 +85,11 @@ static struct drm_driver driver = {
        .patchlevel = DRIVER_PATCHLEVEL,
 };
 
+int r128_driver_load(struct drm_device * dev, unsigned long flags)
+{
+       return drm_vblank_init(dev, 1);
+}
+
 static int __init r128_init(void)
 {
        driver.num_ioctls = r128_max_ioctl;
index 5898b274279d216cf0630fed63af2480a7a0ebb4..797a26c42dababf8c12193271aaf336849271424 100644 (file)
@@ -159,6 +159,7 @@ extern void r128_driver_irq_preinstall(struct drm_device * dev);
 extern int r128_driver_irq_postinstall(struct drm_device *dev);
 extern void r128_driver_irq_uninstall(struct drm_device * dev);
 extern void r128_driver_lastclose(struct drm_device * dev);
+extern int r128_driver_load(struct drm_device * dev, unsigned long flags);
 extern void r128_driver_preclose(struct drm_device * dev,
                                 struct drm_file *file_priv);
 
index d7349012a680b35a0b50091e2e6e5f3bf70d6004..69810fb8ac49101a36645061adc93ca265e19cd8 100644 (file)
@@ -102,7 +102,7 @@ void r128_driver_irq_preinstall(struct drm_device * dev)
 
 int r128_driver_irq_postinstall(struct drm_device *dev)
 {
-       return drm_vblank_init(dev, 1);
+       return 0;
 }
 
 void r128_driver_irq_uninstall(struct drm_device * dev)
index abdc1ae384674def8810a122ecc1ae3c11a47ae2..dcebb4bee7aaf9e0e845db50296798f76686d1a6 100644 (file)
@@ -1757,6 +1757,12 @@ int radeon_driver_load(struct drm_device *dev, unsigned long flags)
        if (ret != 0)
                return ret;
 
+       ret = drm_vblank_init(dev, 2);
+       if (ret) {
+               radeon_driver_unload(dev);
+               return ret;
+       }
+
        DRM_DEBUG("%s card detected\n",
                  ((dev_priv->flags & RADEON_IS_AGP) ? "AGP" : (((dev_priv->flags & RADEON_IS_PCIE) ? "PCIE" : "PCI"))));
        return ret;
index 7a183789be978d97d3e317b141c5119ff2dfe9c6..3bbb871b25d5102a2b6d832702cc55bc338a70ea 100644 (file)
@@ -299,7 +299,6 @@ typedef struct drm_radeon_private {
        atomic_t swi_emitted;
        int vblank_crtc;
        uint32_t irq_enable_reg;
-       int irq_enabled;
        uint32_t r500_disp_irq_reg;
 
        struct radeon_surface surfaces[RADEON_MAX_SURFACES];
index 5079f7054a2f67aa712bcf6c89fa4e98cb1835b9..99be11418ac2dcecf8b3718ca5e8ba82478dc0b1 100644 (file)
@@ -44,7 +44,8 @@ void radeon_irq_set_state(struct drm_device *dev, u32 mask, int state)
        else
                dev_priv->irq_enable_reg &= ~mask;
 
-       RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg);
+       if (!dev->irq_enabled)
+               RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg);
 }
 
 static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state)
@@ -56,7 +57,8 @@ static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state)
        else
                dev_priv->r500_disp_irq_reg &= ~mask;
 
-       RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg);
+       if (!dev->irq_enabled)
+               RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg);
 }
 
 int radeon_enable_vblank(struct drm_device *dev, int crtc)
@@ -337,15 +339,10 @@ int radeon_driver_irq_postinstall(struct drm_device *dev)
 {
        drm_radeon_private_t *dev_priv =
            (drm_radeon_private_t *) dev->dev_private;
-       int ret;
 
        atomic_set(&dev_priv->swi_emitted, 0);
        DRM_INIT_WAITQUEUE(&dev_priv->swi_queue);
 
-       ret = drm_vblank_init(dev, 2);
-       if (ret)
-               return ret;
-
        dev->max_vblank_count = 0x001fffff;
 
        radeon_irq_set_state(dev, RADEON_SW_INT_ENABLE, 1);
@@ -360,8 +357,6 @@ void radeon_driver_irq_uninstall(struct drm_device * dev)
        if (!dev_priv)
                return;
 
-       dev_priv->irq_enabled = 0;
-
        if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RS690)
                RADEON_WRITE(R500_DxMODE_INT_MASK, 0);
        /* Disable *all* interrupts */
index 665d319b927b2d3a07cc25a65ebccbc33b1160aa..c248c1d37268ac64cfed64e8b6bfba43b3d80332 100644 (file)
@@ -314,7 +314,6 @@ int via_driver_irq_postinstall(struct drm_device *dev)
        if (!dev_priv)
                return -EINVAL;
 
-       drm_vblank_init(dev, 1);
        status = VIA_READ(VIA_REG_INTERRUPT);
        VIA_WRITE(VIA_REG_INTERRUPT, status | VIA_IRQ_GLOBAL
                  | dev_priv->irq_enable_mask);
index a967556be014612f731125e8b9f77437a334921b..2c4f0b48579207dd74ead54b1833c03e86e92cea 100644 (file)
@@ -107,8 +107,17 @@ int via_driver_load(struct drm_device *dev, unsigned long chipset)
        ret = drm_sman_init(&dev_priv->sman, 2, 12, 8);
        if (ret) {
                drm_free(dev_priv, sizeof(*dev_priv), DRM_MEM_DRIVER);
+               return ret;
        }
-       return ret;
+
+       ret = drm_vblank_init(dev, 1);
+       if (ret) {
+               drm_sman_takedown(&dev_priv->sman);
+               drm_free(dev_priv, sizeof(drm_via_private_t), DRM_MEM_DRIVER);
+               return ret;
+       }
+
+       return 0;
 }
 
 int via_driver_unload(struct drm_device *dev)
index c6ab4ba60c52a296035b6d23cf7b0e9c4f0b4970..aa28aed0e46cb4d400cdd8f419cfbb8cedefa877 100644 (file)
@@ -55,10 +55,11 @@ struct apple_key_translation {
 
 static struct apple_key_translation apple_fn_keys[] = {
        { KEY_BACKSPACE, KEY_DELETE },
+       { KEY_ENTER,    KEY_INSERT },
        { KEY_F1,       KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY },
        { KEY_F2,       KEY_BRIGHTNESSUP,   APPLE_FLAG_FKEY },
-       { KEY_F3,       KEY_FN_F5,          APPLE_FLAG_FKEY }, /* Exposé */
-       { KEY_F4,       KEY_FN_F4,          APPLE_FLAG_FKEY }, /* Dashboard */
+       { KEY_F3,       KEY_SCALE,          APPLE_FLAG_FKEY },
+       { KEY_F4,       KEY_DASHBOARD,      APPLE_FLAG_FKEY },
        { KEY_F5,       KEY_KBDILLUMDOWN,   APPLE_FLAG_FKEY },
        { KEY_F6,       KEY_KBDILLUMUP,     APPLE_FLAG_FKEY },
        { KEY_F7,       KEY_PREVIOUSSONG,   APPLE_FLAG_FKEY },
@@ -399,12 +400,12 @@ static const struct hid_device_id apple_devices[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS),
                .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
                        APPLE_RDESC_JIS },
-       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
+       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
                .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
-       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
+       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
                .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
                        APPLE_ISO_KEYBOARD },
-       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
+       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
                .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI),
                .driver_data = APPLE_HAS_FN },
@@ -418,6 +419,12 @@ static const struct hid_device_id apple_devices[] = {
                .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS),
                .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI),
+               .driver_data = APPLE_HAS_FN },
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO),
+               .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS),
+               .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY),
                .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY),
index d3671b4049c0ef4077f1cb68e2e38e8c27c198be..40df3e1b4bd11ef54f838d6a07645e8b03b8df26 100644 (file)
@@ -1241,18 +1241,20 @@ static const struct hid_device_id hid_blacklist[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS) },
-       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI) },
-       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO) },
-       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS) },
+       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI) },
+       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO) },
+       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ISO) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_JIS) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
-       { HID_USB_DEVICE(USB_VENDOR_ID_AVERMEDIA, USB_DEVICE_ID_AVER_FM_MR800) },
        { HID_USB_DEVICE(USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM) },
        { HID_USB_DEVICE(USB_VENDOR_ID_BRIGHT, USB_DEVICE_ID_BRIGHT_ABNT2) },
        { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION) },
@@ -1264,8 +1266,10 @@ static const struct hid_device_id hid_blacklist[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_SK8115) },
        { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GENERIC_13BA, USB_DEVICE_ID_GENERIC_13BA_KBD_MOUSE) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0003) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) },
-       { HID_USB_DEVICE(USB_VENDOR_ID_KWORLD, USB_DEVICE_ID_KWORLD_RADIO_FM700) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_MX3000_RECEIVER) },
@@ -1409,6 +1413,7 @@ static const struct hid_device_id hid_ignore_list[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM)},
        { HID_USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM2)},
+       { HID_USB_DEVICE(USB_VENDOR_ID_AVERMEDIA, USB_DEVICE_ID_AVER_FM_MR800) },
        { HID_USB_DEVICE(USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD) },
        { HID_USB_DEVICE(USB_VENDOR_ID_CIDC, 0x0103) },
        { HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI470X) },
@@ -1418,7 +1423,6 @@ static const struct hid_device_id hid_ignore_list[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) },
-       { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0001) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0002) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0003) },
@@ -1434,7 +1438,6 @@ static const struct hid_device_id hid_ignore_list[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_SUPER_Q2) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_GOGOPEN) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_PENPOWER) },
-       { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0003) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GRETAGMACBETH, USB_DEVICE_ID_GRETAGMACBETH_HUEY) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB) },
@@ -1486,6 +1489,7 @@ static const struct hid_device_id hid_ignore_list[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1007) },
        { HID_USB_DEVICE(USB_VENDOR_ID_IMATION, USB_DEVICE_ID_DISC_STAKKA) },
        { HID_USB_DEVICE(USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_KWORLD, USB_DEVICE_ID_KWORLD_RADIO_FM700) },
        { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_GPEN_560) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POCKETCASSY) },
@@ -1730,7 +1734,7 @@ static int __init hid_init(void)
                goto err_bus;
 
 #ifdef CONFIG_HID_COMPAT
-       hid_compat_wq = create_workqueue("hid_compat");
+       hid_compat_wq = create_singlethread_workqueue("hid_compat");
        if (!hid_compat_wq) {
                hidraw_exit();
                goto err;
index f05bcbbbb0d5457e060c37852b57fdfba486d12f..39289699c32fbd5b640e5bd9c440990bf5f2a97c 100644 (file)
@@ -82,6 +82,9 @@
 #define USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI   0x0230
 #define USB_DEVICE_ID_APPLE_WELLSPRING2_ISO    0x0231
 #define USB_DEVICE_ID_APPLE_WELLSPRING2_JIS    0x0232
+#define USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI   0x0236
+#define USB_DEVICE_ID_APPLE_WELLSPRING3_ISO    0x0237
+#define USB_DEVICE_ID_APPLE_WELLSPRING3_JIS    0x0238
 #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY   0x030a
 #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY    0x030b
 #define USB_DEVICE_ID_APPLE_ATV_IRCONTROL      0x8241
 
 #define USB_VENDOR_ID_GAMERON          0x0810
 #define USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR 0x0001
+#define USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR 0x0002
 
 #define USB_VENDOR_ID_GENERAL_TOUCH    0x0dfc
 
index acd81558618285ffd25f0ec1c5b01c9ec1de5d01..46941f979b9d058202f9ce71f8b70e341457c62a 100644 (file)
@@ -178,6 +178,8 @@ err:
 static const struct hid_device_id pl_devices[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR),
                .driver_data = 1 }, /* Twin USB Joystick */
+       { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR),
+               .driver_data = 1 }, /* Twin USB Joystick */
        { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0003), }, /* GreenAsia Inc. USB Joystick */
        { }
 };
index 894d52e05bf9cd995586250011e8401227bd043a..7685ae6808c4d056ff00c8c33ebe544bb4e09167 100644 (file)
@@ -38,7 +38,7 @@ static int hidraw_major;
 static struct cdev hidraw_cdev;
 static struct class *hidraw_class;
 static struct hidraw *hidraw_table[HIDRAW_MAX_DEVICES];
-static DEFINE_SPINLOCK(minors_lock);
+static DEFINE_MUTEX(minors_lock);
 
 static ssize_t hidraw_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
 {
@@ -159,13 +159,13 @@ static int hidraw_open(struct inode *inode, struct file *file)
        struct hidraw_list *list;
        int err = 0;
 
-       lock_kernel();
        if (!(list = kzalloc(sizeof(struct hidraw_list), GFP_KERNEL))) {
                err = -ENOMEM;
                goto out;
        }
 
-       spin_lock(&minors_lock);
+       lock_kernel();
+       mutex_lock(&minors_lock);
        if (!hidraw_table[minor]) {
                printk(KERN_EMERG "hidraw device with minor %d doesn't exist\n",
                                minor);
@@ -180,13 +180,16 @@ static int hidraw_open(struct inode *inode, struct file *file)
        file->private_data = list;
 
        dev = hidraw_table[minor];
-       if (!dev->open++)
-               dev->hid->ll_driver->open(dev->hid);
+       if (!dev->open++) {
+               err = dev->hid->ll_driver->open(dev->hid);
+               if (err < 0)
+                       dev->open--;
+       }
 
 out_unlock:
-       spin_unlock(&minors_lock);
-out:
+       mutex_unlock(&minors_lock);
        unlock_kernel();
+out:
        return err;
 
 }
@@ -310,7 +313,7 @@ int hidraw_connect(struct hid_device *hid)
 
        result = -EINVAL;
 
-       spin_lock(&minors_lock);
+       mutex_lock(&minors_lock);
 
        for (minor = 0; minor < HIDRAW_MAX_DEVICES; minor++) {
                if (hidraw_table[minor])
@@ -320,9 +323,8 @@ int hidraw_connect(struct hid_device *hid)
                break;
        }
 
-       spin_unlock(&minors_lock);
-
        if (result) {
+               mutex_unlock(&minors_lock);
                kfree(dev);
                goto out;
        }
@@ -331,14 +333,14 @@ int hidraw_connect(struct hid_device *hid)
                                 NULL, "%s%d", "hidraw", minor);
 
        if (IS_ERR(dev->dev)) {
-               spin_lock(&minors_lock);
                hidraw_table[minor] = NULL;
-               spin_unlock(&minors_lock);
+               mutex_unlock(&minors_lock);
                result = PTR_ERR(dev->dev);
                kfree(dev);
                goto out;
        }
 
+       mutex_unlock(&minors_lock);
        init_waitqueue_head(&dev->wait);
        INIT_LIST_HEAD(&dev->list);
 
@@ -360,9 +362,9 @@ void hidraw_disconnect(struct hid_device *hid)
 
        hidraw->exist = 0;
 
-       spin_lock(&minors_lock);
+       mutex_lock(&minors_lock);
        hidraw_table[hidraw->minor] = NULL;
-       spin_unlock(&minors_lock);
+       mutex_unlock(&minors_lock);
 
        device_destroy(hidraw_class, MKDEV(hidraw_major, hidraw->minor));
 
index 18e5ddd722cd5887d71c38d2cbfbf46e20553f1a..606369ea24ca038e36704f6b9c14d415e5fd5d36 100644 (file)
@@ -781,6 +781,8 @@ static int usbhid_start(struct hid_device *hid)
        unsigned int n, insize = 0;
        int ret;
 
+       clear_bit(HID_DISCONNECTED, &usbhid->iofl);
+
        usbhid->bufsize = HID_MIN_BUFFER_SIZE;
        hid_find_max_report(hid, HID_INPUT_REPORT, &usbhid->bufsize);
        hid_find_max_report(hid, HID_OUTPUT_REPORT, &usbhid->bufsize);
@@ -794,7 +796,6 @@ static int usbhid_start(struct hid_device *hid)
        if (insize > HID_MAX_BUFFER_SIZE)
                insize = HID_MAX_BUFFER_SIZE;
 
-       mutex_lock(&usbhid->setup);
        if (hid_alloc_buffers(dev, hid)) {
                ret = -ENOMEM;
                goto fail;
@@ -847,12 +848,6 @@ static int usbhid_start(struct hid_device *hid)
                }
        }
 
-       if (!usbhid->urbin) {
-               err_hid("couldn't find an input interrupt endpoint");
-               ret = -ENODEV;
-               goto fail;
-       }
-
        init_waitqueue_head(&usbhid->wait);
        INIT_WORK(&usbhid->reset_work, hid_reset);
        setup_timer(&usbhid->io_retry, hid_retry_timeout, (unsigned long) hid);
@@ -880,7 +875,6 @@ static int usbhid_start(struct hid_device *hid)
        hid_dump_device(hid);
 
        set_bit(HID_STARTED, &usbhid->iofl);
-       mutex_unlock(&usbhid->setup);
 
        return 0;
 
@@ -888,8 +882,10 @@ fail:
        usb_free_urb(usbhid->urbin);
        usb_free_urb(usbhid->urbout);
        usb_free_urb(usbhid->urbctrl);
+       usbhid->urbin = NULL;
+       usbhid->urbout = NULL;
+       usbhid->urbctrl = NULL;
        hid_free_buffers(dev, hid);
-       mutex_unlock(&usbhid->setup);
        return ret;
 }
 
@@ -900,7 +896,6 @@ static void usbhid_stop(struct hid_device *hid)
        if (WARN_ON(!usbhid))
                return;
 
-       mutex_lock(&usbhid->setup);
        clear_bit(HID_STARTED, &usbhid->iofl);
        spin_lock_irq(&usbhid->inlock); /* Sync with error handler */
        set_bit(HID_DISCONNECTED, &usbhid->iofl);
@@ -924,9 +919,11 @@ static void usbhid_stop(struct hid_device *hid)
        usb_free_urb(usbhid->urbin);
        usb_free_urb(usbhid->urbctrl);
        usb_free_urb(usbhid->urbout);
+       usbhid->urbin = NULL; /* don't mess up next start */
+       usbhid->urbctrl = NULL;
+       usbhid->urbout = NULL;
 
        hid_free_buffers(hid_to_usb_dev(hid), hid);
-       mutex_unlock(&usbhid->setup);
 }
 
 static struct hid_ll_driver usb_hid_driver = {
@@ -940,15 +937,26 @@ static struct hid_ll_driver usb_hid_driver = {
 
 static int hid_probe(struct usb_interface *intf, const struct usb_device_id *id)
 {
+       struct usb_host_interface *interface = intf->cur_altsetting;
        struct usb_device *dev = interface_to_usbdev(intf);
        struct usbhid_device *usbhid;
        struct hid_device *hid;
+       unsigned int n, has_in = 0;
        size_t len;
        int ret;
 
        dbg_hid("HID probe called for ifnum %d\n",
                        intf->altsetting->desc.bInterfaceNumber);
 
+       for (n = 0; n < interface->desc.bNumEndpoints; n++)
+               if (usb_endpoint_is_int_in(&interface->endpoint[n].desc))
+                       has_in++;
+       if (!has_in) {
+               dev_err(&intf->dev, "couldn't find an input interrupt "
+                               "endpoint\n");
+               return -ENODEV;
+       }
+
        hid = hid_allocate_device();
        if (IS_ERR(hid))
                return PTR_ERR(hid);
@@ -1003,7 +1011,6 @@ static int hid_probe(struct usb_interface *intf, const struct usb_device_id *id)
 
        hid->driver_data = usbhid;
        usbhid->hid = hid;
-       mutex_init(&usbhid->setup); /* needed on suspend/resume */
 
        ret = hid_add_device(hid);
        if (ret) {
@@ -1038,18 +1045,14 @@ static int hid_suspend(struct usb_interface *intf, pm_message_t message)
        struct hid_device *hid = usb_get_intfdata (intf);
        struct usbhid_device *usbhid = hid->driver_data;
 
-       mutex_lock(&usbhid->setup);
-       if (!test_bit(HID_STARTED, &usbhid->iofl)) {
-               mutex_unlock(&usbhid->setup);
+       if (!test_bit(HID_STARTED, &usbhid->iofl))
                return 0;
-       }
 
        spin_lock_irq(&usbhid->inlock); /* Sync with error handler */
        set_bit(HID_SUSPENDED, &usbhid->iofl);
        spin_unlock_irq(&usbhid->inlock);
        del_timer_sync(&usbhid->io_retry);
        usb_kill_urb(usbhid->urbin);
-       mutex_unlock(&usbhid->setup);
        dev_dbg(&intf->dev, "suspend\n");
        return 0;
 }
@@ -1060,16 +1063,12 @@ static int hid_resume(struct usb_interface *intf)
        struct usbhid_device *usbhid = hid->driver_data;
        int status;
 
-       mutex_lock(&usbhid->setup);
-       if (!test_bit(HID_STARTED, &usbhid->iofl)) {
-               mutex_unlock(&usbhid->setup);
+       if (!test_bit(HID_STARTED, &usbhid->iofl))
                return 0;
-       }
 
        clear_bit(HID_SUSPENDED, &usbhid->iofl);
        usbhid->retry_delay = 0;
        status = hid_start_in(hid);
-       mutex_unlock(&usbhid->setup);
        dev_dbg(&intf->dev, "resume status %d\n", status);
        return status;
 }
index 55973ff54008f36e6c2381275a1c26e08db25f47..332abcdf9956468ebf9b3aec792a716125b62f6c 100644 (file)
@@ -74,7 +74,6 @@ struct usbhid_device {
        dma_addr_t outbuf_dma;                                          /* Output buffer dma */
        spinlock_t outlock;                                             /* Output fifo spinlock */
 
-       struct mutex setup;
        unsigned long iofl;                                             /* I/O flags (CTRL_RUNNING, OUT_RUNNING) */
        struct timer_list io_retry;                                     /* Retry timer */
        unsigned long stop_retry;                                       /* Time to give up, in jiffies */
index 6de1e0ffd391efe9669fcae51df41beeb9a39407..c709e821f04bf6cd4c93db2fd6451be818fb7840 100644 (file)
@@ -159,6 +159,16 @@ config SENSORS_ADM9240
          This driver can also be built as a module.  If so, the module
          will be called adm9240.
 
+config SENSORS_ADT7462
+       tristate "Analog Devices ADT7462"
+       depends on I2C && EXPERIMENTAL
+       help
+         If you say yes here you get support for the Analog Devices
+         ADT7462 temperature monitoring chips.
+
+         This driver can also be built as a module. If so, the module
+         will be called adt7462.
+
 config SENSORS_ADT7470
        tristate "Analog Devices ADT7470"
        depends on I2C && EXPERIMENTAL
@@ -825,6 +835,25 @@ config SENSORS_HDAPS
          Say Y here if you have an applicable laptop and want to experience
          the awesome power of hdaps.
 
+config SENSORS_LIS3LV02D
+       tristate "STMicroeletronics LIS3LV02Dx three-axis digital accelerometer"
+       depends on ACPI && INPUT
+       default n
+       help
+         This driver provides support for the LIS3LV02Dx accelerometer. In
+         particular, it can be found in a number of HP laptops, which have the
+         "Mobile Data Protection System 3D" or "3D DriveGuard" feature. On such
+         systems the driver should load automatically (via ACPI). The
+         accelerometer might also be found in other systems, connected via SPI
+         or I2C.  The accelerometer data is readable via
+         /sys/devices/platform/lis3lv02d.
+
+         This driver also provides an absolute input class device, allowing
+         the laptop to act as a pinball machine-esque joystick.
+
+         This driver can also be built as a module.  If so, the module
+         will be called lis3lv02d.
+
 config SENSORS_APPLESMC
        tristate "Apple SMC (Motion sensor, light sensor, keyboard backlight)"
        depends on INPUT && X86
index 042d5a78622e4614a397983b147109ff4e01ab20..58fc5be5355d29ec0ea686813fbc1dc651b0e232 100644 (file)
@@ -25,6 +25,7 @@ obj-$(CONFIG_SENSORS_ADM1029) += adm1029.o
 obj-$(CONFIG_SENSORS_ADM1031)  += adm1031.o
 obj-$(CONFIG_SENSORS_ADM9240)  += adm9240.o
 obj-$(CONFIG_SENSORS_ADS7828)  += ads7828.o
+obj-$(CONFIG_SENSORS_ADT7462)  += adt7462.o
 obj-$(CONFIG_SENSORS_ADT7470)  += adt7470.o
 obj-$(CONFIG_SENSORS_ADT7473)  += adt7473.o
 obj-$(CONFIG_SENSORS_APPLESMC) += applesmc.o
@@ -48,6 +49,7 @@ obj-$(CONFIG_SENSORS_IBMAEM)  += ibmaem.o
 obj-$(CONFIG_SENSORS_IBMPEX)   += ibmpex.o
 obj-$(CONFIG_SENSORS_IT87)     += it87.o
 obj-$(CONFIG_SENSORS_K8TEMP)   += k8temp.o
+obj-$(CONFIG_SENSORS_LIS3LV02D) += lis3lv02d.o
 obj-$(CONFIG_SENSORS_LM63)     += lm63.o
 obj-$(CONFIG_SENSORS_LM70)     += lm70.o
 obj-$(CONFIG_SENSORS_LM75)     += lm75.o
diff --git a/drivers/hwmon/adt7462.c b/drivers/hwmon/adt7462.c
new file mode 100644 (file)
index 0000000..66107b4
--- /dev/null
@@ -0,0 +1,2002 @@
+/*
+ * A hwmon driver for the Analog Devices ADT7462
+ * Copyright (C) 2008 IBM
+ *
+ * Author: Darrick J. Wong <djwong@us.ibm.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <linux/module.h>
+#include <linux/jiffies.h>
+#include <linux/i2c.h>
+#include <linux/hwmon.h>
+#include <linux/hwmon-sysfs.h>
+#include <linux/err.h>
+#include <linux/mutex.h>
+#include <linux/delay.h>
+#include <linux/log2.h>
+
+/* Addresses to scan */
+static const unsigned short normal_i2c[] = { 0x58, 0x5C, I2C_CLIENT_END };
+
+/* Insmod parameters */
+I2C_CLIENT_INSMOD_1(adt7462);
+
+/* ADT7462 registers */
+#define ADT7462_REG_DEVICE                     0x3D
+#define ADT7462_REG_VENDOR                     0x3E
+#define ADT7462_REG_REVISION                   0x3F
+
+#define ADT7462_REG_MIN_TEMP_BASE_ADDR         0x44
+#define ADT7462_REG_MIN_TEMP_MAX_ADDR          0x47
+#define ADT7462_REG_MAX_TEMP_BASE_ADDR         0x48
+#define ADT7462_REG_MAX_TEMP_MAX_ADDR          0x4B
+#define ADT7462_REG_TEMP_BASE_ADDR             0x88
+#define ADT7462_REG_TEMP_MAX_ADDR              0x8F
+
+#define ADT7462_REG_FAN_BASE_ADDR              0x98
+#define ADT7462_REG_FAN_MAX_ADDR               0x9F
+#define ADT7462_REG_FAN2_BASE_ADDR             0xA2
+#define ADT7462_REG_FAN2_MAX_ADDR              0xA9
+#define ADT7462_REG_FAN_ENABLE                 0x07
+#define ADT7462_REG_FAN_MIN_BASE_ADDR          0x78
+#define ADT7462_REG_FAN_MIN_MAX_ADDR           0x7F
+
+#define ADT7462_REG_CFG2                       0x02
+#define                ADT7462_FSPD_MASK               0x20
+
+#define ADT7462_REG_PWM_BASE_ADDR              0xAA
+#define ADT7462_REG_PWM_MAX_ADDR               0xAD
+#define        ADT7462_REG_PWM_MIN_BASE_ADDR           0x28
+#define ADT7462_REG_PWM_MIN_MAX_ADDR           0x2B
+#define ADT7462_REG_PWM_MAX                    0x2C
+#define ADT7462_REG_PWM_TEMP_MIN_BASE_ADDR     0x5C
+#define ADT7462_REG_PWM_TEMP_MIN_MAX_ADDR      0x5F
+#define ADT7462_REG_PWM_TEMP_RANGE_BASE_ADDR   0x60
+#define ADT7462_REG_PWM_TEMP_RANGE_MAX_ADDR    0x63
+#define        ADT7462_PWM_HYST_MASK           0x0F
+#define        ADT7462_PWM_RANGE_MASK          0xF0
+#define                ADT7462_PWM_RANGE_SHIFT         4
+#define ADT7462_REG_PWM_CFG_BASE_ADDR          0x21
+#define ADT7462_REG_PWM_CFG_MAX_ADDR           0x24
+#define                ADT7462_PWM_CHANNEL_MASK        0xE0
+#define                ADT7462_PWM_CHANNEL_SHIFT       5
+
+#define ADT7462_REG_PIN_CFG_BASE_ADDR          0x10
+#define ADT7462_REG_PIN_CFG_MAX_ADDR           0x13
+#define                ADT7462_PIN7_INPUT              0x01    /* cfg0 */
+#define                ADT7462_DIODE3_INPUT            0x20
+#define                ADT7462_DIODE1_INPUT            0x40
+#define                ADT7462_VID_INPUT               0x80
+#define                ADT7462_PIN22_INPUT             0x04    /* cfg1 */
+#define                ADT7462_PIN21_INPUT             0x08
+#define                ADT7462_PIN19_INPUT             0x10
+#define                ADT7462_PIN15_INPUT             0x20
+#define                ADT7462_PIN13_INPUT             0x40
+#define                ADT7462_PIN8_INPUT              0x80
+#define        ADT7462_PIN23_MASK              0x03
+#define                ADT7462_PIN23_SHIFT             0
+#define                ADT7462_PIN26_MASK              0x0C    /* cfg2 */
+#define                ADT7462_PIN26_SHIFT             2
+#define                ADT7462_PIN25_MASK              0x30
+#define                ADT7462_PIN25_SHIFT             4
+#define                ADT7462_PIN24_MASK              0xC0
+#define                ADT7462_PIN24_SHIFT             6
+#define                ADT7462_PIN26_VOLT_INPUT        0x08
+#define                ADT7462_PIN25_VOLT_INPUT        0x20
+#define                ADT7462_PIN28_SHIFT             6       /* cfg3 */
+#define                ADT7462_PIN28_VOLT              0x5
+
+#define ADT7462_REG_ALARM1                     0xB8
+#define        ADT7462_LT_ALARM                0x02
+#define                ADT7462_R1T_ALARM               0x04
+#define                ADT7462_R2T_ALARM               0x08
+#define                ADT7462_R3T_ALARM               0x10
+#define ADT7462_REG_ALARM2                     0xBB
+#define                ADT7462_V0_ALARM                0x01
+#define                ADT7462_V1_ALARM                0x02
+#define                ADT7462_V2_ALARM                0x04
+#define                ADT7462_V3_ALARM                0x08
+#define                ADT7462_V4_ALARM                0x10
+#define                ADT7462_V5_ALARM                0x20
+#define                ADT7462_V6_ALARM                0x40
+#define                ADT7462_V7_ALARM                0x80
+#define ADT7462_REG_ALARM3                     0xBC
+#define                ADT7462_V8_ALARM                0x08
+#define                ADT7462_V9_ALARM                0x10
+#define                ADT7462_V10_ALARM               0x20
+#define                ADT7462_V11_ALARM               0x40
+#define                ADT7462_V12_ALARM               0x80
+#define ADT7462_REG_ALARM4                     0xBD
+#define                ADT7462_F0_ALARM                0x01
+#define                ADT7462_F1_ALARM                0x02
+#define                ADT7462_F2_ALARM                0x04
+#define                ADT7462_F3_ALARM                0x08
+#define                ADT7462_F4_ALARM                0x10
+#define                ADT7462_F5_ALARM                0x20
+#define                ADT7462_F6_ALARM                0x40
+#define                ADT7462_F7_ALARM                0x80
+#define ADT7462_ALARM1                         0x0000
+#define ADT7462_ALARM2                         0x0100
+#define ADT7462_ALARM3                         0x0200
+#define ADT7462_ALARM4                         0x0300
+#define ADT7462_ALARM_REG_SHIFT                        8
+#define ADT7462_ALARM_FLAG_MASK                        0x0F
+
+#define ADT7462_TEMP_COUNT             4
+#define ADT7462_TEMP_REG(x)            (ADT7462_REG_TEMP_BASE_ADDR + (x * 2))
+#define ADT7462_TEMP_MIN_REG(x)        (ADT7462_REG_MIN_TEMP_BASE_ADDR + (x))
+#define ADT7462_TEMP_MAX_REG(x)        (ADT7462_REG_MAX_TEMP_BASE_ADDR + (x))
+#define TEMP_FRAC_OFFSET               6
+
+#define ADT7462_FAN_COUNT              8
+#define ADT7462_REG_FAN_MIN(x)         (ADT7462_REG_FAN_MIN_BASE_ADDR + (x))
+
+#define ADT7462_PWM_COUNT              4
+#define ADT7462_REG_PWM(x)             (ADT7462_REG_PWM_BASE_ADDR + (x))
+#define ADT7462_REG_PWM_MIN(x)         (ADT7462_REG_PWM_MIN_BASE_ADDR + (x))
+#define ADT7462_REG_PWM_TMIN(x)                \
+       (ADT7462_REG_PWM_TEMP_MIN_BASE_ADDR + (x))
+#define ADT7462_REG_PWM_TRANGE(x)      \
+       (ADT7462_REG_PWM_TEMP_RANGE_BASE_ADDR + (x))
+
+#define ADT7462_PIN_CFG_REG_COUNT      4
+#define ADT7462_REG_PIN_CFG(x)         (ADT7462_REG_PIN_CFG_BASE_ADDR + (x))
+#define ADT7462_REG_PWM_CFG(x)         (ADT7462_REG_PWM_CFG_BASE_ADDR + (x))
+
+#define ADT7462_ALARM_REG_COUNT                4
+
+/*
+ * The chip can measure 13 different voltage sources:
+ *
+ * 1. +12V1 (pin 7)
+ * 2. Vccp1/+2.5V/+1.8V/+1.5V (pin 23)
+ * 3. +12V3 (pin 22)
+ * 4. +5V (pin 21)
+ * 5. +1.25V/+0.9V (pin 19)
+ * 6. +2.5V/+1.8V (pin 15)
+ * 7. +3.3v (pin 13)
+ * 8. +12V2 (pin 8)
+ * 9. Vbatt/FSB_Vtt (pin 26)
+ * A. +3.3V/+1.2V1 (pin 25)
+ * B. Vccp2/+2.5V/+1.8V/+1.5V (pin 24)
+ * C. +1.5V ICH (only if BOTH pin 28/29 are set to +1.5V)
+ * D. +1.5V 3GPIO (only if BOTH pin 28/29 are set to +1.5V)
+ *
+ * Each of these 13 has a factor to convert raw to voltage.  Even better,
+ * the pins can be connected to other sensors (tach/gpio/hot/etc), which
+ * makes the bookkeeping tricky.
+ *
+ * Some, but not all, of these voltages have low/high limits.
+ */
+#define ADT7462_VOLT_COUNT     12
+
+#define ADT7462_VENDOR         0x41
+#define ADT7462_DEVICE         0x62
+/* datasheet only mentions a revision 4 */
+#define ADT7462_REVISION       0x04
+
+/* How often do we reread sensors values? (In jiffies) */
+#define SENSOR_REFRESH_INTERVAL        (2 * HZ)
+
+/* How often do we reread sensor limit values? (In jiffies) */
+#define LIMIT_REFRESH_INTERVAL (60 * HZ)
+
+/* datasheet says to divide this number by the fan reading to get fan rpm */
+#define FAN_PERIOD_TO_RPM(x)   ((90000 * 60) / (x))
+#define FAN_RPM_TO_PERIOD      FAN_PERIOD_TO_RPM
+#define FAN_PERIOD_INVALID     65535
+#define FAN_DATA_VALID(x)      ((x) && (x) != FAN_PERIOD_INVALID)
+
+#define MASK_AND_SHIFT(value, prefix)  \
+       (((value) & prefix##_MASK) >> prefix##_SHIFT)
+
+#define ROUND_DIV(x, divisor)  (((x) + ((divisor) / 2)) / (divisor))
+
+struct adt7462_data {
+       struct device           *hwmon_dev;
+       struct attribute_group  attrs;
+       struct mutex            lock;
+       char                    sensors_valid;
+       char                    limits_valid;
+       unsigned long           sensors_last_updated;   /* In jiffies */
+       unsigned long           limits_last_updated;    /* In jiffies */
+
+       u8                      temp[ADT7462_TEMP_COUNT];
+                               /* bits 6-7 are quarter pieces of temp */
+       u8                      temp_frac[ADT7462_TEMP_COUNT];
+       u8                      temp_min[ADT7462_TEMP_COUNT];
+       u8                      temp_max[ADT7462_TEMP_COUNT];
+       u16                     fan[ADT7462_FAN_COUNT];
+       u8                      fan_enabled;
+       u8                      fan_min[ADT7462_FAN_COUNT];
+       u8                      cfg2;
+       u8                      pwm[ADT7462_PWM_COUNT];
+       u8                      pin_cfg[ADT7462_PIN_CFG_REG_COUNT];
+       u8                      voltages[ADT7462_VOLT_COUNT];
+       u8                      volt_max[ADT7462_VOLT_COUNT];
+       u8                      volt_min[ADT7462_VOLT_COUNT];
+       u8                      pwm_min[ADT7462_PWM_COUNT];
+       u8                      pwm_tmin[ADT7462_PWM_COUNT];
+       u8                      pwm_trange[ADT7462_PWM_COUNT];
+       u8                      pwm_max;        /* only one per chip */
+       u8                      pwm_cfg[ADT7462_PWM_COUNT];
+       u8                      alarms[ADT7462_ALARM_REG_COUNT];
+};
+
+static int adt7462_probe(struct i2c_client *client,
+                        const struct i2c_device_id *id);
+static int adt7462_detect(struct i2c_client *client, int kind,
+                         struct i2c_board_info *info);
+static int adt7462_remove(struct i2c_client *client);
+
+static const struct i2c_device_id adt7462_id[] = {
+       { "adt7462", adt7462 },
+       { }
+};
+MODULE_DEVICE_TABLE(i2c, adt7462_id);
+
+static struct i2c_driver adt7462_driver = {
+       .class          = I2C_CLASS_HWMON,
+       .driver = {
+               .name   = "adt7462",
+       },
+       .probe          = adt7462_probe,
+       .remove         = adt7462_remove,
+       .id_table       = adt7462_id,
+       .detect         = adt7462_detect,
+       .address_data   = &addr_data,
+};
+
+/*
+ * 16-bit registers on the ADT7462 are low-byte first.  The data sheet says
+ * that the low byte must be read before the high byte.
+ */
+static inline int adt7462_read_word_data(struct i2c_client *client, u8 reg)
+{
+       u16 foo;
+       foo = i2c_smbus_read_byte_data(client, reg);
+       foo |= ((u16)i2c_smbus_read_byte_data(client, reg + 1) << 8);
+       return foo;
+}
+
+/* For some reason these registers are not contiguous. */
+static int ADT7462_REG_FAN(int fan)
+{
+       if (fan < 4)
+               return ADT7462_REG_FAN_BASE_ADDR + (2 * fan);
+       return ADT7462_REG_FAN2_BASE_ADDR + (2 * (fan - 4));
+}
+
+/* Voltage registers are scattered everywhere */
+static int ADT7462_REG_VOLT_MAX(struct adt7462_data *data, int which)
+{
+       switch (which) {
+       case 0:
+               if (!(data->pin_cfg[0] & ADT7462_PIN7_INPUT))
+                       return 0x7C;
+               break;
+       case 1:
+               return 0x69;
+       case 2:
+               if (!(data->pin_cfg[1] & ADT7462_PIN22_INPUT))
+                       return 0x7F;
+               break;
+       case 3:
+               if (!(data->pin_cfg[1] & ADT7462_PIN21_INPUT))
+                       return 0x7E;
+               break;
+       case 4:
+               if (!(data->pin_cfg[0] & ADT7462_DIODE3_INPUT))
+                       return 0x4B;
+               break;
+       case 5:
+               if (!(data->pin_cfg[0] & ADT7462_DIODE1_INPUT))
+                       return 0x49;
+               break;
+       case 6:
+               if (!(data->pin_cfg[1] & ADT7462_PIN13_INPUT))
+                       return 0x68;
+               break;
+       case 7:
+               if (!(data->pin_cfg[1] & ADT7462_PIN8_INPUT))
+                       return 0x7D;
+               break;
+       case 8:
+               if (!(data->pin_cfg[2] & ADT7462_PIN26_VOLT_INPUT))
+                       return 0x6C;
+               break;
+       case 9:
+               if (!(data->pin_cfg[2] & ADT7462_PIN25_VOLT_INPUT))
+                       return 0x6B;
+               break;
+       case 10:
+               return 0x6A;
+       case 11:
+               if (data->pin_cfg[3] >> ADT7462_PIN28_SHIFT ==
+                                       ADT7462_PIN28_VOLT &&
+                   !(data->pin_cfg[0] & ADT7462_VID_INPUT))
+                       return 0x50;
+               break;
+       case 12:
+               if (data->pin_cfg[3] >> ADT7462_PIN28_SHIFT ==
+                                       ADT7462_PIN28_VOLT &&
+                   !(data->pin_cfg[0] & ADT7462_VID_INPUT))
+                       return 0x4C;
+               break;
+       }
+       return -ENODEV;
+}
+
+static int ADT7462_REG_VOLT_MIN(struct adt7462_data *data, int which)
+{
+       switch (which) {
+       case 0:
+               if (!(data->pin_cfg[0] & ADT7462_PIN7_INPUT))
+                       return 0x6D;
+               break;
+       case 1:
+               return 0x72;
+       case 2:
+               if (!(data->pin_cfg[1] & ADT7462_PIN22_INPUT))
+                       return 0x6F;
+               break;
+       case 3:
+               if (!(data->pin_cfg[1] & ADT7462_PIN21_INPUT))
+                       return 0x71;
+               break;
+       case 4:
+               if (!(data->pin_cfg[0] & ADT7462_DIODE3_INPUT))
+                       return 0x47;
+               break;
+       case 5:
+               if (!(data->pin_cfg[0] & ADT7462_DIODE1_INPUT))
+                       return 0x45;
+               break;
+       case 6:
+               if (!(data->pin_cfg[1] & ADT7462_PIN13_INPUT))
+                       return 0x70;
+               break;
+       case 7:
+               if (!(data->pin_cfg[1] & ADT7462_PIN8_INPUT))
+                       return 0x6E;
+               break;
+       case 8:
+               if (!(data->pin_cfg[2] & ADT7462_PIN26_VOLT_INPUT))
+                       return 0x75;
+               break;
+       case 9:
+               if (!(data->pin_cfg[2] & ADT7462_PIN25_VOLT_INPUT))
+                       return 0x74;
+               break;
+       case 10:
+               return 0x73;
+       case 11:
+               if (data->pin_cfg[3] >> ADT7462_PIN28_SHIFT ==
+                                       ADT7462_PIN28_VOLT &&
+                   !(data->pin_cfg[0] & ADT7462_VID_INPUT))
+                       return 0x76;
+               break;
+       case 12:
+               if (data->pin_cfg[3] >> ADT7462_PIN28_SHIFT ==
+                                       ADT7462_PIN28_VOLT &&
+                   !(data->pin_cfg[0] & ADT7462_VID_INPUT))
+                       return 0x77;
+               break;
+       }
+       return -ENODEV;
+}
+
+static int ADT7462_REG_VOLT(struct adt7462_data *data, int which)
+{
+       switch (which) {
+       case 0:
+               if (!(data->pin_cfg[0] & ADT7462_PIN7_INPUT))
+                       return 0xA3;
+               break;
+       case 1:
+               return 0x90;
+       case 2:
+               if (!(data->pin_cfg[1] & ADT7462_PIN22_INPUT))
+                       return 0xA9;
+               break;
+       case 3:
+               if (!(data->pin_cfg[1] & ADT7462_PIN21_INPUT))
+                       return 0xA7;
+               break;
+       case 4:
+               if (!(data->pin_cfg[0] & ADT7462_DIODE3_INPUT))
+                       return 0x8F;
+               break;
+       case 5:
+               if (!(data->pin_cfg[0] & ADT7462_DIODE1_INPUT))
+                       return 0x8B;
+               break;
+       case 6:
+               if (!(data->pin_cfg[1] & ADT7462_PIN13_INPUT))
+                       return 0x96;
+               break;
+       case 7:
+               if (!(data->pin_cfg[1] & ADT7462_PIN8_INPUT))
+                       return 0xA5;
+               break;
+       case 8:
+               if (!(data->pin_cfg[2] & ADT7462_PIN26_VOLT_INPUT))
+                       return 0x93;
+               break;
+       case 9:
+               if (!(data->pin_cfg[2] & ADT7462_PIN25_VOLT_INPUT))
+                       return 0x92;
+               break;
+       case 10:
+               return 0x91;
+       case 11:
+               if (data->pin_cfg[3] >> ADT7462_PIN28_SHIFT ==
+                                       ADT7462_PIN28_VOLT &&
+                   !(data->pin_cfg[0] & ADT7462_VID_INPUT))
+                       return 0x94;
+               break;
+       case 12:
+               if (data->pin_cfg[3] >> ADT7462_PIN28_SHIFT ==
+                                       ADT7462_PIN28_VOLT &&
+                   !(data->pin_cfg[0] & ADT7462_VID_INPUT))
+                       return 0x95;
+               break;
+       }
+       return -ENODEV;
+}
+
+/* Provide labels for sysfs */
+static const char *voltage_label(struct adt7462_data *data, int which)
+{
+       switch (which) {
+       case 0:
+               if (!(data->pin_cfg[0] & ADT7462_PIN7_INPUT))
+                       return "+12V1";
+               break;
+       case 1:
+               switch (MASK_AND_SHIFT(data->pin_cfg[1], ADT7462_PIN23)) {
+               case 0:
+                       return "Vccp1";
+               case 1:
+                       return "+2.5V";
+               case 2:
+                       return "+1.8V";
+               case 3:
+                       return "+1.5V";
+               }
+       case 2:
+               if (!(data->pin_cfg[1] & ADT7462_PIN22_INPUT))
+                       return "+12V3";
+               break;
+       case 3:
+               if (!(data->pin_cfg[1] & ADT7462_PIN21_INPUT))
+                       return "+5V";
+               break;
+       case 4:
+               if (!(data->pin_cfg[0] & ADT7462_DIODE3_INPUT)) {
+                       if (data->pin_cfg[1] & ADT7462_PIN19_INPUT)
+                               return "+0.9V";
+                       return "+1.25V";
+               }
+               break;
+       case 5:
+               if (!(data->pin_cfg[0] & ADT7462_DIODE1_INPUT)) {
+                       if (data->pin_cfg[1] & ADT7462_PIN19_INPUT)
+                               return "+1.8V";
+                       return "+2.5V";
+               }
+               break;
+       case 6:
+               if (!(data->pin_cfg[1] & ADT7462_PIN13_INPUT))
+                       return "+3.3V";
+               break;
+       case 7:
+               if (!(data->pin_cfg[1] & ADT7462_PIN8_INPUT))
+                       return "+12V2";
+               break;
+       case 8:
+               switch (MASK_AND_SHIFT(data->pin_cfg[2], ADT7462_PIN26)) {
+               case 0:
+                       return "Vbatt";
+               case 1:
+                       return "FSB_Vtt";
+               }
+               break;
+       case 9:
+               switch (MASK_AND_SHIFT(data->pin_cfg[2], ADT7462_PIN25)) {
+               case 0:
+                       return "+3.3V";
+               case 1:
+                       return "+1.2V1";
+               }
+               break;
+       case 10:
+               switch (MASK_AND_SHIFT(data->pin_cfg[2], ADT7462_PIN24)) {
+               case 0:
+                       return "Vccp2";
+               case 1:
+                       return "+2.5V";
+               case 2:
+                       return "+1.8V";
+               case 3:
+                       return "+1.5";
+               }
+       case 11:
+               if (data->pin_cfg[3] >> ADT7462_PIN28_SHIFT ==
+                                       ADT7462_PIN28_VOLT &&
+                   !(data->pin_cfg[0] & ADT7462_VID_INPUT))
+                       return "+1.5V ICH";
+               break;
+       case 12:
+               if (data->pin_cfg[3] >> ADT7462_PIN28_SHIFT ==
+                                       ADT7462_PIN28_VOLT &&
+                   !(data->pin_cfg[0] & ADT7462_VID_INPUT))
+                       return "+1.5V 3GPIO";
+               break;
+       }
+       return "N/A";
+}
+
+/* Multipliers are actually in uV, not mV. */
+static int voltage_multiplier(struct adt7462_data *data, int which)
+{
+       switch (which) {
+       case 0:
+               if (!(data->pin_cfg[0] & ADT7462_PIN7_INPUT))
+                       return 62500;
+               break;
+       case 1:
+               switch (MASK_AND_SHIFT(data->pin_cfg[1], ADT7462_PIN23)) {
+               case 0:
+                       if (data->pin_cfg[0] & ADT7462_VID_INPUT)
+                               return 12500;
+                       return 6250;
+               case 1:
+                       return 13000;
+               case 2:
+                       return 9400;
+               case 3:
+                       return 7800;
+               }
+       case 2:
+               if (!(data->pin_cfg[1] & ADT7462_PIN22_INPUT))
+                       return 62500;
+               break;
+       case 3:
+               if (!(data->pin_cfg[1] & ADT7462_PIN21_INPUT))
+                       return 26000;
+               break;
+       case 4:
+               if (!(data->pin_cfg[0] & ADT7462_DIODE3_INPUT)) {
+                       if (data->pin_cfg[1] & ADT7462_PIN19_INPUT)
+                               return 4690;
+                       return 6500;
+               }
+               break;
+       case 5:
+               if (!(data->pin_cfg[0] & ADT7462_DIODE1_INPUT)) {
+                       if (data->pin_cfg[1] & ADT7462_PIN15_INPUT)
+                               return 9400;
+                       return 13000;
+               }
+               break;
+       case 6:
+               if (!(data->pin_cfg[1] & ADT7462_PIN13_INPUT))
+                       return 17200;
+               break;
+       case 7:
+               if (!(data->pin_cfg[1] & ADT7462_PIN8_INPUT))
+                       return 62500;
+               break;
+       case 8:
+               switch (MASK_AND_SHIFT(data->pin_cfg[2], ADT7462_PIN26)) {
+               case 0:
+                       return 15600;
+               case 1:
+                       return 6250;
+               }
+               break;
+       case 9:
+               switch (MASK_AND_SHIFT(data->pin_cfg[2], ADT7462_PIN25)) {
+               case 0:
+                       return 17200;
+               case 1:
+                       return 6250;
+               }
+               break;
+       case 10:
+               switch (MASK_AND_SHIFT(data->pin_cfg[2], ADT7462_PIN24)) {
+               case 0:
+                       return 6250;
+               case 1:
+                       return 13000;
+               case 2:
+                       return 9400;
+               case 3:
+                       return 7800;
+               }
+       case 11:
+       case 12:
+               if (data->pin_cfg[3] >> ADT7462_PIN28_SHIFT ==
+                                       ADT7462_PIN28_VOLT &&
+                   !(data->pin_cfg[0] & ADT7462_VID_INPUT))
+                       return 7800;
+       }
+       return 0;
+}
+
+static int temp_enabled(struct adt7462_data *data, int which)
+{
+       switch (which) {
+       case 0:
+       case 2:
+               return 1;
+       case 1:
+               if (data->pin_cfg[0] & ADT7462_DIODE1_INPUT)
+                       return 1;
+               break;
+       case 3:
+               if (data->pin_cfg[0] & ADT7462_DIODE3_INPUT)
+                       return 1;
+               break;
+       }
+       return 0;
+}
+
+static const char *temp_label(struct adt7462_data *data, int which)
+{
+       switch (which) {
+       case 0:
+               return "local";
+       case 1:
+               if (data->pin_cfg[0] & ADT7462_DIODE1_INPUT)
+                       return "remote1";
+               break;
+       case 2:
+               return "remote2";
+       case 3:
+               if (data->pin_cfg[0] & ADT7462_DIODE3_INPUT)
+                       return "remote3";
+               break;
+       }
+       return "N/A";
+}
+
+/* Map Trange register values to mC */
+#define NUM_TRANGE_VALUES      16
+static const int trange_values[NUM_TRANGE_VALUES] = {
+       2000,
+       2500,
+       3300,
+       4000,
+       5000,
+       6700,
+       8000,
+       10000,
+       13300,
+       16000,
+       20000,
+       26700,
+       32000,
+       40000,
+       53300,
+       80000
+};
+
+static int find_trange_value(int trange)
+{
+       int i;
+
+       for (i = 0; i < NUM_TRANGE_VALUES; i++)
+               if (trange_values[i] == trange)
+                       return i;
+
+       return -ENODEV;
+}
+
+static struct adt7462_data *adt7462_update_device(struct device *dev)
+{
+       struct i2c_client *client = to_i2c_client(dev);
+       struct adt7462_data *data = i2c_get_clientdata(client);
+       unsigned long local_jiffies = jiffies;
+       int i;
+
+       mutex_lock(&data->lock);
+       if (time_before(local_jiffies, data->sensors_last_updated +
+               SENSOR_REFRESH_INTERVAL)
+               && data->sensors_valid)
+               goto no_sensor_update;
+
+       for (i = 0; i < ADT7462_TEMP_COUNT; i++) {
+               /*
+                * Reading the fractional register locks the integral
+                * register until both have been read.
+                */
+               data->temp_frac[i] = i2c_smbus_read_byte_data(client,
+                                               ADT7462_TEMP_REG(i));
+               data->temp[i] = i2c_smbus_read_byte_data(client,
+                                               ADT7462_TEMP_REG(i) + 1);
+       }
+
+       for (i = 0; i < ADT7462_FAN_COUNT; i++)
+               data->fan[i] = adt7462_read_word_data(client,
+                                               ADT7462_REG_FAN(i));
+
+       data->fan_enabled = i2c_smbus_read_byte_data(client,
+                                       ADT7462_REG_FAN_ENABLE);
+
+       for (i = 0; i < ADT7462_PWM_COUNT; i++)
+               data->pwm[i] = i2c_smbus_read_byte_data(client,
+                                               ADT7462_REG_PWM(i));
+
+       for (i = 0; i < ADT7462_PIN_CFG_REG_COUNT; i++)
+               data->pin_cfg[i] = i2c_smbus_read_byte_data(client,
+                               ADT7462_REG_PIN_CFG(i));
+
+       for (i = 0; i < ADT7462_VOLT_COUNT; i++) {
+               int reg = ADT7462_REG_VOLT(data, i);
+               if (!reg)
+                       data->voltages[i] = 0;
+               else
+                       data->voltages[i] = i2c_smbus_read_byte_data(client,
+                                                                    reg);
+       }
+
+       data->alarms[0] = i2c_smbus_read_byte_data(client, ADT7462_REG_ALARM1);
+       data->alarms[1] = i2c_smbus_read_byte_data(client, ADT7462_REG_ALARM2);
+       data->alarms[2] = i2c_smbus_read_byte_data(client, ADT7462_REG_ALARM3);
+       data->alarms[3] = i2c_smbus_read_byte_data(client, ADT7462_REG_ALARM4);
+
+       data->sensors_last_updated = local_jiffies;
+       data->sensors_valid = 1;
+
+no_sensor_update:
+       if (time_before(local_jiffies, data->limits_last_updated +
+               LIMIT_REFRESH_INTERVAL)
+               && data->limits_valid)
+               goto out;
+
+       for (i = 0; i < ADT7462_TEMP_COUNT; i++) {
+               data->temp_min[i] = i2c_smbus_read_byte_data(client,
+                                               ADT7462_TEMP_MIN_REG(i));
+               data->temp_max[i] = i2c_smbus_read_byte_data(client,
+                                               ADT7462_TEMP_MAX_REG(i));
+       }
+
+       for (i = 0; i < ADT7462_FAN_COUNT; i++)
+               data->fan_min[i] = i2c_smbus_read_byte_data(client,
+                                               ADT7462_REG_FAN_MIN(i));
+
+       for (i = 0; i < ADT7462_VOLT_COUNT; i++) {
+               int reg = ADT7462_REG_VOLT_MAX(data, i);
+               data->volt_max[i] =
+                       (reg ? i2c_smbus_read_byte_data(client, reg) : 0);
+
+               reg = ADT7462_REG_VOLT_MIN(data, i);
+               data->volt_min[i] =
+                       (reg ? i2c_smbus_read_byte_data(client, reg) : 0);
+       }
+
+       for (i = 0; i < ADT7462_PWM_COUNT; i++) {
+               data->pwm_min[i] = i2c_smbus_read_byte_data(client,
+                                               ADT7462_REG_PWM_MIN(i));
+               data->pwm_tmin[i] = i2c_smbus_read_byte_data(client,
+                                               ADT7462_REG_PWM_TMIN(i));
+               data->pwm_trange[i] = i2c_smbus_read_byte_data(client,
+                                               ADT7462_REG_PWM_TRANGE(i));
+               data->pwm_cfg[i] = i2c_smbus_read_byte_data(client,
+                                               ADT7462_REG_PWM_CFG(i));
+       }
+
+       data->pwm_max = i2c_smbus_read_byte_data(client, ADT7462_REG_PWM_MAX);
+
+       data->cfg2 = i2c_smbus_read_byte_data(client, ADT7462_REG_CFG2);
+
+       data->limits_last_updated = local_jiffies;
+       data->limits_valid = 1;
+
+out:
+       mutex_unlock(&data->lock);
+       return data;
+}
+
+static ssize_t show_temp_min(struct device *dev,
+                            struct device_attribute *devattr,
+                            char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+
+       if (!temp_enabled(data, attr->index))
+               return sprintf(buf, "0\n");
+
+       return sprintf(buf, "%d\n", 1000 * (data->temp_min[attr->index] - 64));
+}
+
+static ssize_t set_temp_min(struct device *dev,
+                           struct device_attribute *devattr,
+                           const char *buf,
+                           size_t count)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct i2c_client *client = to_i2c_client(dev);
+       struct adt7462_data *data = i2c_get_clientdata(client);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp) || !temp_enabled(data, attr->index))
+               return -EINVAL;
+
+       temp = ROUND_DIV(temp, 1000) + 64;
+       temp = SENSORS_LIMIT(temp, 0, 255);
+
+       mutex_lock(&data->lock);
+       data->temp_min[attr->index] = temp;
+       i2c_smbus_write_byte_data(client, ADT7462_TEMP_MIN_REG(attr->index),
+                                 temp);
+       mutex_unlock(&data->lock);
+
+       return count;
+}
+
+static ssize_t show_temp_max(struct device *dev,
+                            struct device_attribute *devattr,
+                            char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+
+       if (!temp_enabled(data, attr->index))
+               return sprintf(buf, "0\n");
+
+       return sprintf(buf, "%d\n", 1000 * (data->temp_max[attr->index] - 64));
+}
+
+static ssize_t set_temp_max(struct device *dev,
+                           struct device_attribute *devattr,
+                           const char *buf,
+                           size_t count)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct i2c_client *client = to_i2c_client(dev);
+       struct adt7462_data *data = i2c_get_clientdata(client);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp) || !temp_enabled(data, attr->index))
+               return -EINVAL;
+
+       temp = ROUND_DIV(temp, 1000) + 64;
+       temp = SENSORS_LIMIT(temp, 0, 255);
+
+       mutex_lock(&data->lock);
+       data->temp_max[attr->index] = temp;
+       i2c_smbus_write_byte_data(client, ADT7462_TEMP_MAX_REG(attr->index),
+                                 temp);
+       mutex_unlock(&data->lock);
+
+       return count;
+}
+
+static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
+                        char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+       u8 frac = data->temp_frac[attr->index] >> TEMP_FRAC_OFFSET;
+
+       if (!temp_enabled(data, attr->index))
+               return sprintf(buf, "0\n");
+
+       return sprintf(buf, "%d\n", 1000 * (data->temp[attr->index] - 64) +
+                                    250 * frac);
+}
+
+static ssize_t show_temp_label(struct device *dev,
+                              struct device_attribute *devattr,
+                              char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+
+       return sprintf(buf, "%s\n", temp_label(data, attr->index));
+}
+
+static ssize_t show_volt_max(struct device *dev,
+                            struct device_attribute *devattr,
+                            char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+       int x = voltage_multiplier(data, attr->index);
+
+       x *= data->volt_max[attr->index];
+       x /= 1000; /* convert from uV to mV */
+
+       return sprintf(buf, "%d\n", x);
+}
+
+static ssize_t set_volt_max(struct device *dev,
+                           struct device_attribute *devattr,
+                           const char *buf,
+                           size_t count)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct i2c_client *client = to_i2c_client(dev);
+       struct adt7462_data *data = i2c_get_clientdata(client);
+       int x = voltage_multiplier(data, attr->index);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp) || !x)
+               return -EINVAL;
+
+       temp *= 1000; /* convert mV to uV */
+       temp = ROUND_DIV(temp, x);
+       temp = SENSORS_LIMIT(temp, 0, 255);
+
+       mutex_lock(&data->lock);
+       data->volt_max[attr->index] = temp;
+       i2c_smbus_write_byte_data(client,
+                                 ADT7462_REG_VOLT_MAX(data, attr->index),
+                                 temp);
+       mutex_unlock(&data->lock);
+
+       return count;
+}
+
+static ssize_t show_volt_min(struct device *dev,
+                            struct device_attribute *devattr,
+                            char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+       int x = voltage_multiplier(data, attr->index);
+
+       x *= data->volt_min[attr->index];
+       x /= 1000; /* convert from uV to mV */
+
+       return sprintf(buf, "%d\n", x);
+}
+
+static ssize_t set_volt_min(struct device *dev,
+                           struct device_attribute *devattr,
+                           const char *buf,
+                           size_t count)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct i2c_client *client = to_i2c_client(dev);
+       struct adt7462_data *data = i2c_get_clientdata(client);
+       int x = voltage_multiplier(data, attr->index);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp) || !x)
+               return -EINVAL;
+
+       temp *= 1000; /* convert mV to uV */
+       temp = ROUND_DIV(temp, x);
+       temp = SENSORS_LIMIT(temp, 0, 255);
+
+       mutex_lock(&data->lock);
+       data->volt_min[attr->index] = temp;
+       i2c_smbus_write_byte_data(client,
+                                 ADT7462_REG_VOLT_MIN(data, attr->index),
+                                 temp);
+       mutex_unlock(&data->lock);
+
+       return count;
+}
+
+static ssize_t show_voltage(struct device *dev,
+                           struct device_attribute *devattr,
+                           char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+       int x = voltage_multiplier(data, attr->index);
+
+       x *= data->voltages[attr->index];
+       x /= 1000; /* convert from uV to mV */
+
+       return sprintf(buf, "%d\n", x);
+}
+
+static ssize_t show_voltage_label(struct device *dev,
+                                 struct device_attribute *devattr,
+                                 char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+
+       return sprintf(buf, "%s\n", voltage_label(data, attr->index));
+}
+
+static ssize_t show_alarm(struct device *dev,
+                         struct device_attribute *devattr,
+                         char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+       int reg = attr->index >> ADT7462_ALARM_REG_SHIFT;
+       int mask = attr->index & ADT7462_ALARM_FLAG_MASK;
+
+       if (data->alarms[reg] & mask)
+               return sprintf(buf, "1\n");
+       else
+               return sprintf(buf, "0\n");
+}
+
+static int fan_enabled(struct adt7462_data *data, int fan)
+{
+       return data->fan_enabled & (1 << fan);
+}
+
+static ssize_t show_fan_min(struct device *dev,
+                           struct device_attribute *devattr,
+                           char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+       u16 temp;
+
+       /* Only the MSB of the min fan period is stored... */
+       temp = data->fan_min[attr->index];
+       temp <<= 8;
+
+       if (!fan_enabled(data, attr->index) ||
+           !FAN_DATA_VALID(temp))
+               return sprintf(buf, "0\n");
+
+       return sprintf(buf, "%d\n", FAN_PERIOD_TO_RPM(temp));
+}
+
+static ssize_t set_fan_min(struct device *dev,
+                          struct device_attribute *devattr,
+                          const char *buf, size_t count)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct i2c_client *client = to_i2c_client(dev);
+       struct adt7462_data *data = i2c_get_clientdata(client);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp) || !temp ||
+           !fan_enabled(data, attr->index))
+               return -EINVAL;
+
+       temp = FAN_RPM_TO_PERIOD(temp);
+       temp >>= 8;
+       temp = SENSORS_LIMIT(temp, 1, 255);
+
+       mutex_lock(&data->lock);
+       data->fan_min[attr->index] = temp;
+       i2c_smbus_write_byte_data(client, ADT7462_REG_FAN_MIN(attr->index),
+                                 temp);
+       mutex_unlock(&data->lock);
+
+       return count;
+}
+
+static ssize_t show_fan(struct device *dev, struct device_attribute *devattr,
+                       char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+
+       if (!fan_enabled(data, attr->index) ||
+           !FAN_DATA_VALID(data->fan[attr->index]))
+               return sprintf(buf, "0\n");
+
+       return sprintf(buf, "%d\n",
+                      FAN_PERIOD_TO_RPM(data->fan[attr->index]));
+}
+
+static ssize_t show_force_pwm_max(struct device *dev,
+                                 struct device_attribute *devattr,
+                                 char *buf)
+{
+       struct adt7462_data *data = adt7462_update_device(dev);
+       return sprintf(buf, "%d\n", (data->cfg2 & ADT7462_FSPD_MASK ? 1 : 0));
+}
+
+static ssize_t set_force_pwm_max(struct device *dev,
+                                struct device_attribute *devattr,
+                                const char *buf,
+                                size_t count)
+{
+       struct i2c_client *client = to_i2c_client(dev);
+       struct adt7462_data *data = i2c_get_clientdata(client);
+       long temp;
+       u8 reg;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       mutex_lock(&data->lock);
+       reg = i2c_smbus_read_byte_data(client, ADT7462_REG_CFG2);
+       if (temp)
+               reg |= ADT7462_FSPD_MASK;
+       else
+               reg &= ~ADT7462_FSPD_MASK;
+       data->cfg2 = reg;
+       i2c_smbus_write_byte_data(client, ADT7462_REG_CFG2, reg);
+       mutex_unlock(&data->lock);
+
+       return count;
+}
+
+static ssize_t show_pwm(struct device *dev, struct device_attribute *devattr,
+                       char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+       return sprintf(buf, "%d\n", data->pwm[attr->index]);
+}
+
+static ssize_t set_pwm(struct device *dev, struct device_attribute *devattr,
+                       const char *buf, size_t count)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct i2c_client *client = to_i2c_client(dev);
+       struct adt7462_data *data = i2c_get_clientdata(client);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = SENSORS_LIMIT(temp, 0, 255);
+
+       mutex_lock(&data->lock);
+       data->pwm[attr->index] = temp;
+       i2c_smbus_write_byte_data(client, ADT7462_REG_PWM(attr->index), temp);
+       mutex_unlock(&data->lock);
+
+       return count;
+}
+
+static ssize_t show_pwm_max(struct device *dev,
+                           struct device_attribute *devattr,
+                           char *buf)
+{
+       struct adt7462_data *data = adt7462_update_device(dev);
+       return sprintf(buf, "%d\n", data->pwm_max);
+}
+
+static ssize_t set_pwm_max(struct device *dev,
+                          struct device_attribute *devattr,
+                          const char *buf,
+                          size_t count)
+{
+       struct i2c_client *client = to_i2c_client(dev);
+       struct adt7462_data *data = i2c_get_clientdata(client);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = SENSORS_LIMIT(temp, 0, 255);
+
+       mutex_lock(&data->lock);
+       data->pwm_max = temp;
+       i2c_smbus_write_byte_data(client, ADT7462_REG_PWM_MAX, temp);
+       mutex_unlock(&data->lock);
+
+       return count;
+}
+
+static ssize_t show_pwm_min(struct device *dev,
+                           struct device_attribute *devattr,
+                           char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+       return sprintf(buf, "%d\n", data->pwm_min[attr->index]);
+}
+
+static ssize_t set_pwm_min(struct device *dev,
+                          struct device_attribute *devattr,
+                          const char *buf,
+                          size_t count)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct i2c_client *client = to_i2c_client(dev);
+       struct adt7462_data *data = i2c_get_clientdata(client);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = SENSORS_LIMIT(temp, 0, 255);
+
+       mutex_lock(&data->lock);
+       data->pwm_min[attr->index] = temp;
+       i2c_smbus_write_byte_data(client, ADT7462_REG_PWM_MIN(attr->index),
+                                 temp);
+       mutex_unlock(&data->lock);
+
+       return count;
+}
+
+static ssize_t show_pwm_hyst(struct device *dev,
+                            struct device_attribute *devattr,
+                            char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+       return sprintf(buf, "%d\n", 1000 *
+                     (data->pwm_trange[attr->index] & ADT7462_PWM_HYST_MASK));
+}
+
+static ssize_t set_pwm_hyst(struct device *dev,
+                           struct device_attribute *devattr,
+                           const char *buf,
+                           size_t count)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct i2c_client *client = to_i2c_client(dev);
+       struct adt7462_data *data = i2c_get_clientdata(client);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = ROUND_DIV(temp, 1000);
+       temp = SENSORS_LIMIT(temp, 0, 15);
+
+       /* package things up */
+       temp &= ADT7462_PWM_HYST_MASK;
+       temp |= data->pwm_trange[attr->index] & ADT7462_PWM_RANGE_MASK;
+
+       mutex_lock(&data->lock);
+       data->pwm_trange[attr->index] = temp;
+       i2c_smbus_write_byte_data(client, ADT7462_REG_PWM_TRANGE(attr->index),
+                                 temp);
+       mutex_unlock(&data->lock);
+
+       return count;
+}
+
+static ssize_t show_pwm_tmax(struct device *dev,
+                            struct device_attribute *devattr,
+                            char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+
+       /* tmax = tmin + trange */
+       int trange = trange_values[data->pwm_trange[attr->index] >>
+                                  ADT7462_PWM_RANGE_SHIFT];
+       int tmin = (data->pwm_tmin[attr->index] - 64) * 1000;
+
+       return sprintf(buf, "%d\n", tmin + trange);
+}
+
+static ssize_t set_pwm_tmax(struct device *dev,
+                           struct device_attribute *devattr,
+                           const char *buf,
+                           size_t count)
+{
+       int temp;
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct i2c_client *client = to_i2c_client(dev);
+       struct adt7462_data *data = i2c_get_clientdata(client);
+       int tmin, trange_value;
+       long trange;
+
+       if (strict_strtol(buf, 10, &trange))
+               return -EINVAL;
+
+       /* trange = tmax - tmin */
+       tmin = (data->pwm_tmin[attr->index] - 64) * 1000;
+       trange_value = find_trange_value(trange - tmin);
+
+       if (trange_value < 0)
+               return -EINVAL;
+
+       temp = trange_value << ADT7462_PWM_RANGE_SHIFT;
+       temp |= data->pwm_trange[attr->index] & ADT7462_PWM_HYST_MASK;
+
+       mutex_lock(&data->lock);
+       data->pwm_trange[attr->index] = temp;
+       i2c_smbus_write_byte_data(client, ADT7462_REG_PWM_TRANGE(attr->index),
+                                 temp);
+       mutex_unlock(&data->lock);
+
+       return count;
+}
+
+static ssize_t show_pwm_tmin(struct device *dev,
+                            struct device_attribute *devattr,
+                            char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+       return sprintf(buf, "%d\n", 1000 * (data->pwm_tmin[attr->index] - 64));
+}
+
+static ssize_t set_pwm_tmin(struct device *dev,
+                           struct device_attribute *devattr,
+                           const char *buf,
+                           size_t count)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct i2c_client *client = to_i2c_client(dev);
+       struct adt7462_data *data = i2c_get_clientdata(client);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = ROUND_DIV(temp, 1000) + 64;
+       temp = SENSORS_LIMIT(temp, 0, 255);
+
+       mutex_lock(&data->lock);
+       data->pwm_tmin[attr->index] = temp;
+       i2c_smbus_write_byte_data(client, ADT7462_REG_PWM_TMIN(attr->index),
+                                 temp);
+       mutex_unlock(&data->lock);
+
+       return count;
+}
+
+static ssize_t show_pwm_auto(struct device *dev,
+                            struct device_attribute *devattr,
+                            char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+       int cfg = data->pwm_cfg[attr->index] >> ADT7462_PWM_CHANNEL_SHIFT;
+
+       switch (cfg) {
+       case 4: /* off */
+               return sprintf(buf, "0\n");
+       case 7: /* manual */
+               return sprintf(buf, "1\n");
+       default: /* automatic */
+               return sprintf(buf, "2\n");
+       }
+}
+
+static void set_pwm_channel(struct i2c_client *client,
+                           struct adt7462_data *data,
+                           int which,
+                           int value)
+{
+       int temp = data->pwm_cfg[which] & ~ADT7462_PWM_CHANNEL_MASK;
+       temp |= value << ADT7462_PWM_CHANNEL_SHIFT;
+
+       mutex_lock(&data->lock);
+       data->pwm_cfg[which] = temp;
+       i2c_smbus_write_byte_data(client, ADT7462_REG_PWM_CFG(which), temp);
+       mutex_unlock(&data->lock);
+}
+
+static ssize_t set_pwm_auto(struct device *dev,
+                           struct device_attribute *devattr,
+                           const char *buf,
+                           size_t count)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct i2c_client *client = to_i2c_client(dev);
+       struct adt7462_data *data = i2c_get_clientdata(client);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       switch (temp) {
+       case 0: /* off */
+               set_pwm_channel(client, data, attr->index, 4);
+               return count;
+       case 1: /* manual */
+               set_pwm_channel(client, data, attr->index, 7);
+               return count;
+       default:
+               return -EINVAL;
+       }
+}
+
+static ssize_t show_pwm_auto_temp(struct device *dev,
+                                 struct device_attribute *devattr,
+                                 char *buf)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct adt7462_data *data = adt7462_update_device(dev);
+       int channel = data->pwm_cfg[attr->index] >> ADT7462_PWM_CHANNEL_SHIFT;
+
+       switch (channel) {
+       case 0: /* temp[1234] only */
+       case 1:
+       case 2:
+       case 3:
+               return sprintf(buf, "%d\n", (1 << channel));
+       case 5: /* temp1 & temp4  */
+               return sprintf(buf, "9\n");
+       case 6:
+               return sprintf(buf, "15\n");
+       default:
+               return sprintf(buf, "0\n");
+       }
+}
+
+static int cvt_auto_temp(int input)
+{
+       if (input == 0xF)
+               return 6;
+       if (input == 0x9)
+               return 5;
+       if (input < 1 || !is_power_of_2(input))
+               return -EINVAL;
+       return ilog2(input);
+}
+
+static ssize_t set_pwm_auto_temp(struct device *dev,
+                                struct device_attribute *devattr,
+                                const char *buf,
+                                size_t count)
+{
+       struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+       struct i2c_client *client = to_i2c_client(dev);
+       struct adt7462_data *data = i2c_get_clientdata(client);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = cvt_auto_temp(temp);
+       if (temp < 0)
+               return temp;
+
+       set_pwm_channel(client, data, attr->index, temp);
+
+       return count;
+}
+
+static SENSOR_DEVICE_ATTR(temp1_max, S_IWUSR | S_IRUGO, show_temp_max,
+                   set_temp_max, 0);
+static SENSOR_DEVICE_ATTR(temp2_max, S_IWUSR | S_IRUGO, show_temp_max,
+                   set_temp_max, 1);
+static SENSOR_DEVICE_ATTR(temp3_max, S_IWUSR | S_IRUGO, show_temp_max,
+                   set_temp_max, 2);
+static SENSOR_DEVICE_ATTR(temp4_max, S_IWUSR | S_IRUGO, show_temp_max,
+                   set_temp_max, 3);
+
+static SENSOR_DEVICE_ATTR(temp1_min, S_IWUSR | S_IRUGO, show_temp_min,
+                   set_temp_min, 0);
+static SENSOR_DEVICE_ATTR(temp2_min, S_IWUSR | S_IRUGO, show_temp_min,
+                   set_temp_min, 1);
+static SENSOR_DEVICE_ATTR(temp3_min, S_IWUSR | S_IRUGO, show_temp_min,
+                   set_temp_min, 2);
+static SENSOR_DEVICE_ATTR(temp4_min, S_IWUSR | S_IRUGO, show_temp_min,
+                   set_temp_min, 3);
+
+static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL, 0);
+static SENSOR_DEVICE_ATTR(temp2_input, S_IRUGO, show_temp, NULL, 1);
+static SENSOR_DEVICE_ATTR(temp3_input, S_IRUGO, show_temp, NULL, 2);
+static SENSOR_DEVICE_ATTR(temp4_input, S_IRUGO, show_temp, NULL, 3);
+
+static SENSOR_DEVICE_ATTR(temp1_label, S_IRUGO, show_temp_label, NULL, 0);
+static SENSOR_DEVICE_ATTR(temp2_label, S_IRUGO, show_temp_label, NULL, 1);
+static SENSOR_DEVICE_ATTR(temp3_label, S_IRUGO, show_temp_label, NULL, 2);
+static SENSOR_DEVICE_ATTR(temp4_label, S_IRUGO, show_temp_label, NULL, 3);
+
+static SENSOR_DEVICE_ATTR(temp1_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM1 | ADT7462_LT_ALARM);
+static SENSOR_DEVICE_ATTR(temp2_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM1 | ADT7462_R1T_ALARM);
+static SENSOR_DEVICE_ATTR(temp3_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM1 | ADT7462_R2T_ALARM);
+static SENSOR_DEVICE_ATTR(temp4_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM1 | ADT7462_R3T_ALARM);
+
+static SENSOR_DEVICE_ATTR(in1_max, S_IWUSR | S_IRUGO, show_volt_max,
+                   set_volt_max, 0);
+static SENSOR_DEVICE_ATTR(in2_max, S_IWUSR | S_IRUGO, show_volt_max,
+                   set_volt_max, 1);
+static SENSOR_DEVICE_ATTR(in3_max, S_IWUSR | S_IRUGO, show_volt_max,
+                   set_volt_max, 2);
+static SENSOR_DEVICE_ATTR(in4_max, S_IWUSR | S_IRUGO, show_volt_max,
+                   set_volt_max, 3);
+static SENSOR_DEVICE_ATTR(in5_max, S_IWUSR | S_IRUGO, show_volt_max,
+                   set_volt_max, 4);
+static SENSOR_DEVICE_ATTR(in6_max, S_IWUSR | S_IRUGO, show_volt_max,
+                   set_volt_max, 5);
+static SENSOR_DEVICE_ATTR(in7_max, S_IWUSR | S_IRUGO, show_volt_max,
+                   set_volt_max, 6);
+static SENSOR_DEVICE_ATTR(in8_max, S_IWUSR | S_IRUGO, show_volt_max,
+                   set_volt_max, 7);
+static SENSOR_DEVICE_ATTR(in9_max, S_IWUSR | S_IRUGO, show_volt_max,
+                   set_volt_max, 8);
+static SENSOR_DEVICE_ATTR(in10_max, S_IWUSR | S_IRUGO, show_volt_max,
+                   set_volt_max, 9);
+static SENSOR_DEVICE_ATTR(in11_max, S_IWUSR | S_IRUGO, show_volt_max,
+                   set_volt_max, 10);
+static SENSOR_DEVICE_ATTR(in12_max, S_IWUSR | S_IRUGO, show_volt_max,
+                   set_volt_max, 11);
+static SENSOR_DEVICE_ATTR(in13_max, S_IWUSR | S_IRUGO, show_volt_max,
+                   set_volt_max, 12);
+
+static SENSOR_DEVICE_ATTR(in1_min, S_IWUSR | S_IRUGO, show_volt_min,
+                   set_volt_min, 0);
+static SENSOR_DEVICE_ATTR(in2_min, S_IWUSR | S_IRUGO, show_volt_min,
+                   set_volt_min, 1);
+static SENSOR_DEVICE_ATTR(in3_min, S_IWUSR | S_IRUGO, show_volt_min,
+                   set_volt_min, 2);
+static SENSOR_DEVICE_ATTR(in4_min, S_IWUSR | S_IRUGO, show_volt_min,
+                   set_volt_min, 3);
+static SENSOR_DEVICE_ATTR(in5_min, S_IWUSR | S_IRUGO, show_volt_min,
+                   set_volt_min, 4);
+static SENSOR_DEVICE_ATTR(in6_min, S_IWUSR | S_IRUGO, show_volt_min,
+                   set_volt_min, 5);
+static SENSOR_DEVICE_ATTR(in7_min, S_IWUSR | S_IRUGO, show_volt_min,
+                   set_volt_min, 6);
+static SENSOR_DEVICE_ATTR(in8_min, S_IWUSR | S_IRUGO, show_volt_min,
+                   set_volt_min, 7);
+static SENSOR_DEVICE_ATTR(in9_min, S_IWUSR | S_IRUGO, show_volt_min,
+                   set_volt_min, 8);
+static SENSOR_DEVICE_ATTR(in10_min, S_IWUSR | S_IRUGO, show_volt_min,
+                   set_volt_min, 9);
+static SENSOR_DEVICE_ATTR(in11_min, S_IWUSR | S_IRUGO, show_volt_min,
+                   set_volt_min, 10);
+static SENSOR_DEVICE_ATTR(in12_min, S_IWUSR | S_IRUGO, show_volt_min,
+                   set_volt_min, 11);
+static SENSOR_DEVICE_ATTR(in13_min, S_IWUSR | S_IRUGO, show_volt_min,
+                   set_volt_min, 12);
+
+static SENSOR_DEVICE_ATTR(in1_input, S_IRUGO, show_voltage, NULL, 0);
+static SENSOR_DEVICE_ATTR(in2_input, S_IRUGO, show_voltage, NULL, 1);
+static SENSOR_DEVICE_ATTR(in3_input, S_IRUGO, show_voltage, NULL, 2);
+static SENSOR_DEVICE_ATTR(in4_input, S_IRUGO, show_voltage, NULL, 3);
+static SENSOR_DEVICE_ATTR(in5_input, S_IRUGO, show_voltage, NULL, 4);
+static SENSOR_DEVICE_ATTR(in6_input, S_IRUGO, show_voltage, NULL, 5);
+static SENSOR_DEVICE_ATTR(in7_input, S_IRUGO, show_voltage, NULL, 6);
+static SENSOR_DEVICE_ATTR(in8_input, S_IRUGO, show_voltage, NULL, 7);
+static SENSOR_DEVICE_ATTR(in9_input, S_IRUGO, show_voltage, NULL, 8);
+static SENSOR_DEVICE_ATTR(in10_input, S_IRUGO, show_voltage, NULL, 9);
+static SENSOR_DEVICE_ATTR(in11_input, S_IRUGO, show_voltage, NULL, 10);
+static SENSOR_DEVICE_ATTR(in12_input, S_IRUGO, show_voltage, NULL, 11);
+static SENSOR_DEVICE_ATTR(in13_input, S_IRUGO, show_voltage, NULL, 12);
+
+static SENSOR_DEVICE_ATTR(in1_label, S_IRUGO, show_voltage_label, NULL, 0);
+static SENSOR_DEVICE_ATTR(in2_label, S_IRUGO, show_voltage_label, NULL, 1);
+static SENSOR_DEVICE_ATTR(in3_label, S_IRUGO, show_voltage_label, NULL, 2);
+static SENSOR_DEVICE_ATTR(in4_label, S_IRUGO, show_voltage_label, NULL, 3);
+static SENSOR_DEVICE_ATTR(in5_label, S_IRUGO, show_voltage_label, NULL, 4);
+static SENSOR_DEVICE_ATTR(in6_label, S_IRUGO, show_voltage_label, NULL, 5);
+static SENSOR_DEVICE_ATTR(in7_label, S_IRUGO, show_voltage_label, NULL, 6);
+static SENSOR_DEVICE_ATTR(in8_label, S_IRUGO, show_voltage_label, NULL, 7);
+static SENSOR_DEVICE_ATTR(in9_label, S_IRUGO, show_voltage_label, NULL, 8);
+static SENSOR_DEVICE_ATTR(in10_label, S_IRUGO, show_voltage_label, NULL, 9);
+static SENSOR_DEVICE_ATTR(in11_label, S_IRUGO, show_voltage_label, NULL, 10);
+static SENSOR_DEVICE_ATTR(in12_label, S_IRUGO, show_voltage_label, NULL, 11);
+static SENSOR_DEVICE_ATTR(in13_label, S_IRUGO, show_voltage_label, NULL, 12);
+
+static SENSOR_DEVICE_ATTR(in1_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM2 | ADT7462_V0_ALARM);
+static SENSOR_DEVICE_ATTR(in2_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM2 | ADT7462_V7_ALARM);
+static SENSOR_DEVICE_ATTR(in3_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM2 | ADT7462_V2_ALARM);
+static SENSOR_DEVICE_ATTR(in4_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM2 | ADT7462_V6_ALARM);
+static SENSOR_DEVICE_ATTR(in5_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM2 | ADT7462_V5_ALARM);
+static SENSOR_DEVICE_ATTR(in6_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM2 | ADT7462_V4_ALARM);
+static SENSOR_DEVICE_ATTR(in7_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM2 | ADT7462_V3_ALARM);
+static SENSOR_DEVICE_ATTR(in8_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM2 | ADT7462_V1_ALARM);
+static SENSOR_DEVICE_ATTR(in9_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM3 | ADT7462_V10_ALARM);
+static SENSOR_DEVICE_ATTR(in10_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM3 | ADT7462_V9_ALARM);
+static SENSOR_DEVICE_ATTR(in11_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM3 | ADT7462_V8_ALARM);
+static SENSOR_DEVICE_ATTR(in12_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM3 | ADT7462_V11_ALARM);
+static SENSOR_DEVICE_ATTR(in13_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM3 | ADT7462_V12_ALARM);
+
+static SENSOR_DEVICE_ATTR(fan1_min, S_IWUSR | S_IRUGO, show_fan_min,
+                   set_fan_min, 0);
+static SENSOR_DEVICE_ATTR(fan2_min, S_IWUSR | S_IRUGO, show_fan_min,
+                   set_fan_min, 1);
+static SENSOR_DEVICE_ATTR(fan3_min, S_IWUSR | S_IRUGO, show_fan_min,
+                   set_fan_min, 2);
+static SENSOR_DEVICE_ATTR(fan4_min, S_IWUSR | S_IRUGO, show_fan_min,
+                   set_fan_min, 3);
+static SENSOR_DEVICE_ATTR(fan5_min, S_IWUSR | S_IRUGO, show_fan_min,
+                   set_fan_min, 4);
+static SENSOR_DEVICE_ATTR(fan6_min, S_IWUSR | S_IRUGO, show_fan_min,
+                   set_fan_min, 5);
+static SENSOR_DEVICE_ATTR(fan7_min, S_IWUSR | S_IRUGO, show_fan_min,
+                   set_fan_min, 6);
+static SENSOR_DEVICE_ATTR(fan8_min, S_IWUSR | S_IRUGO, show_fan_min,
+                   set_fan_min, 7);
+
+static SENSOR_DEVICE_ATTR(fan1_input, S_IRUGO, show_fan, NULL, 0);
+static SENSOR_DEVICE_ATTR(fan2_input, S_IRUGO, show_fan, NULL, 1);
+static SENSOR_DEVICE_ATTR(fan3_input, S_IRUGO, show_fan, NULL, 2);
+static SENSOR_DEVICE_ATTR(fan4_input, S_IRUGO, show_fan, NULL, 3);
+static SENSOR_DEVICE_ATTR(fan5_input, S_IRUGO, show_fan, NULL, 4);
+static SENSOR_DEVICE_ATTR(fan6_input, S_IRUGO, show_fan, NULL, 5);
+static SENSOR_DEVICE_ATTR(fan7_input, S_IRUGO, show_fan, NULL, 6);
+static SENSOR_DEVICE_ATTR(fan8_input, S_IRUGO, show_fan, NULL, 7);
+
+static SENSOR_DEVICE_ATTR(fan1_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM4 | ADT7462_F0_ALARM);
+static SENSOR_DEVICE_ATTR(fan2_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM4 | ADT7462_F1_ALARM);
+static SENSOR_DEVICE_ATTR(fan3_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM4 | ADT7462_F2_ALARM);
+static SENSOR_DEVICE_ATTR(fan4_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM4 | ADT7462_F3_ALARM);
+static SENSOR_DEVICE_ATTR(fan5_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM4 | ADT7462_F4_ALARM);
+static SENSOR_DEVICE_ATTR(fan6_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM4 | ADT7462_F5_ALARM);
+static SENSOR_DEVICE_ATTR(fan7_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM4 | ADT7462_F6_ALARM);
+static SENSOR_DEVICE_ATTR(fan8_alarm, S_IRUGO, show_alarm, NULL,
+                         ADT7462_ALARM4 | ADT7462_F7_ALARM);
+
+static SENSOR_DEVICE_ATTR(force_pwm_max, S_IWUSR | S_IRUGO,
+                   show_force_pwm_max, set_force_pwm_max, 0);
+
+static SENSOR_DEVICE_ATTR(pwm1, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 0);
+static SENSOR_DEVICE_ATTR(pwm2, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 1);
+static SENSOR_DEVICE_ATTR(pwm3, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 2);
+static SENSOR_DEVICE_ATTR(pwm4, S_IWUSR | S_IRUGO, show_pwm, set_pwm, 3);
+
+static SENSOR_DEVICE_ATTR(pwm1_auto_point1_pwm, S_IWUSR | S_IRUGO,
+                   show_pwm_min, set_pwm_min, 0);
+static SENSOR_DEVICE_ATTR(pwm2_auto_point1_pwm, S_IWUSR | S_IRUGO,
+                   show_pwm_min, set_pwm_min, 1);
+static SENSOR_DEVICE_ATTR(pwm3_auto_point1_pwm, S_IWUSR | S_IRUGO,
+                   show_pwm_min, set_pwm_min, 2);
+static SENSOR_DEVICE_ATTR(pwm4_auto_point1_pwm, S_IWUSR | S_IRUGO,
+                   show_pwm_min, set_pwm_min, 3);
+
+static SENSOR_DEVICE_ATTR(pwm1_auto_point2_pwm, S_IWUSR | S_IRUGO,
+                   show_pwm_max, set_pwm_max, 0);
+static SENSOR_DEVICE_ATTR(pwm2_auto_point2_pwm, S_IWUSR | S_IRUGO,
+                   show_pwm_max, set_pwm_max, 1);
+static SENSOR_DEVICE_ATTR(pwm3_auto_point2_pwm, S_IWUSR | S_IRUGO,
+                   show_pwm_max, set_pwm_max, 2);
+static SENSOR_DEVICE_ATTR(pwm4_auto_point2_pwm, S_IWUSR | S_IRUGO,
+                   show_pwm_max, set_pwm_max, 3);
+
+static SENSOR_DEVICE_ATTR(temp1_auto_point1_hyst, S_IWUSR | S_IRUGO,
+                   show_pwm_hyst, set_pwm_hyst, 0);
+static SENSOR_DEVICE_ATTR(temp2_auto_point1_hyst, S_IWUSR | S_IRUGO,
+                   show_pwm_hyst, set_pwm_hyst, 1);
+static SENSOR_DEVICE_ATTR(temp3_auto_point1_hyst, S_IWUSR | S_IRUGO,
+                   show_pwm_hyst, set_pwm_hyst, 2);
+static SENSOR_DEVICE_ATTR(temp4_auto_point1_hyst, S_IWUSR | S_IRUGO,
+                   show_pwm_hyst, set_pwm_hyst, 3);
+
+static SENSOR_DEVICE_ATTR(temp1_auto_point2_hyst, S_IWUSR | S_IRUGO,
+                   show_pwm_hyst, set_pwm_hyst, 0);
+static SENSOR_DEVICE_ATTR(temp2_auto_point2_hyst, S_IWUSR | S_IRUGO,
+                   show_pwm_hyst, set_pwm_hyst, 1);
+static SENSOR_DEVICE_ATTR(temp3_auto_point2_hyst, S_IWUSR | S_IRUGO,
+                   show_pwm_hyst, set_pwm_hyst, 2);
+static SENSOR_DEVICE_ATTR(temp4_auto_point2_hyst, S_IWUSR | S_IRUGO,
+                   show_pwm_hyst, set_pwm_hyst, 3);
+
+static SENSOR_DEVICE_ATTR(temp1_auto_point1_temp, S_IWUSR | S_IRUGO,
+                   show_pwm_tmin, set_pwm_tmin, 0);
+static SENSOR_DEVICE_ATTR(temp2_auto_point1_temp, S_IWUSR | S_IRUGO,
+                   show_pwm_tmin, set_pwm_tmin, 1);
+static SENSOR_DEVICE_ATTR(temp3_auto_point1_temp, S_IWUSR | S_IRUGO,
+                   show_pwm_tmin, set_pwm_tmin, 2);
+static SENSOR_DEVICE_ATTR(temp4_auto_point1_temp, S_IWUSR | S_IRUGO,
+                   show_pwm_tmin, set_pwm_tmin, 3);
+
+static SENSOR_DEVICE_ATTR(temp1_auto_point2_temp, S_IWUSR | S_IRUGO,
+                   show_pwm_tmax, set_pwm_tmax, 0);
+static SENSOR_DEVICE_ATTR(temp2_auto_point2_temp, S_IWUSR | S_IRUGO,
+                   show_pwm_tmax, set_pwm_tmax, 1);
+static SENSOR_DEVICE_ATTR(temp3_auto_point2_temp, S_IWUSR | S_IRUGO,
+                   show_pwm_tmax, set_pwm_tmax, 2);
+static SENSOR_DEVICE_ATTR(temp4_auto_point2_temp, S_IWUSR | S_IRUGO,
+                   show_pwm_tmax, set_pwm_tmax, 3);
+
+static SENSOR_DEVICE_ATTR(pwm1_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
+                   set_pwm_auto, 0);
+static SENSOR_DEVICE_ATTR(pwm2_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
+                   set_pwm_auto, 1);
+static SENSOR_DEVICE_ATTR(pwm3_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
+                   set_pwm_auto, 2);
+static SENSOR_DEVICE_ATTR(pwm4_enable, S_IWUSR | S_IRUGO, show_pwm_auto,
+                   set_pwm_auto, 3);
+
+static SENSOR_DEVICE_ATTR(pwm1_auto_channels_temp, S_IWUSR | S_IRUGO,
+                   show_pwm_auto_temp, set_pwm_auto_temp, 0);
+static SENSOR_DEVICE_ATTR(pwm2_auto_channels_temp, S_IWUSR | S_IRUGO,
+                   show_pwm_auto_temp, set_pwm_auto_temp, 1);
+static SENSOR_DEVICE_ATTR(pwm3_auto_channels_temp, S_IWUSR | S_IRUGO,
+                   show_pwm_auto_temp, set_pwm_auto_temp, 2);
+static SENSOR_DEVICE_ATTR(pwm4_auto_channels_temp, S_IWUSR | S_IRUGO,
+                   show_pwm_auto_temp, set_pwm_auto_temp, 3);
+
+static struct attribute *adt7462_attr[] =
+{
+       &sensor_dev_attr_temp1_max.dev_attr.attr,
+       &sensor_dev_attr_temp2_max.dev_attr.attr,
+       &sensor_dev_attr_temp3_max.dev_attr.attr,
+       &sensor_dev_attr_temp4_max.dev_attr.attr,
+
+       &sensor_dev_attr_temp1_min.dev_attr.attr,
+       &sensor_dev_attr_temp2_min.dev_attr.attr,
+       &sensor_dev_attr_temp3_min.dev_attr.attr,
+       &sensor_dev_attr_temp4_min.dev_attr.attr,
+
+       &sensor_dev_attr_temp1_input.dev_attr.attr,
+       &sensor_dev_attr_temp2_input.dev_attr.attr,
+       &sensor_dev_attr_temp3_input.dev_attr.attr,
+       &sensor_dev_attr_temp4_input.dev_attr.attr,
+
+       &sensor_dev_attr_temp1_label.dev_attr.attr,
+       &sensor_dev_attr_temp2_label.dev_attr.attr,
+       &sensor_dev_attr_temp3_label.dev_attr.attr,
+       &sensor_dev_attr_temp4_label.dev_attr.attr,
+
+       &sensor_dev_attr_temp1_alarm.dev_attr.attr,
+       &sensor_dev_attr_temp2_alarm.dev_attr.attr,
+       &sensor_dev_attr_temp3_alarm.dev_attr.attr,
+       &sensor_dev_attr_temp4_alarm.dev_attr.attr,
+
+       &sensor_dev_attr_in1_max.dev_attr.attr,
+       &sensor_dev_attr_in2_max.dev_attr.attr,
+       &sensor_dev_attr_in3_max.dev_attr.attr,
+       &sensor_dev_attr_in4_max.dev_attr.attr,
+       &sensor_dev_attr_in5_max.dev_attr.attr,
+       &sensor_dev_attr_in6_max.dev_attr.attr,
+       &sensor_dev_attr_in7_max.dev_attr.attr,
+       &sensor_dev_attr_in8_max.dev_attr.attr,
+       &sensor_dev_attr_in9_max.dev_attr.attr,
+       &sensor_dev_attr_in10_max.dev_attr.attr,
+       &sensor_dev_attr_in11_max.dev_attr.attr,
+       &sensor_dev_attr_in12_max.dev_attr.attr,
+       &sensor_dev_attr_in13_max.dev_attr.attr,
+
+       &sensor_dev_attr_in1_min.dev_attr.attr,
+       &sensor_dev_attr_in2_min.dev_attr.attr,
+       &sensor_dev_attr_in3_min.dev_attr.attr,
+       &sensor_dev_attr_in4_min.dev_attr.attr,
+       &sensor_dev_attr_in5_min.dev_attr.attr,
+       &sensor_dev_attr_in6_min.dev_attr.attr,
+       &sensor_dev_attr_in7_min.dev_attr.attr,
+       &sensor_dev_attr_in8_min.dev_attr.attr,
+       &sensor_dev_attr_in9_min.dev_attr.attr,
+       &sensor_dev_attr_in10_min.dev_attr.attr,
+       &sensor_dev_attr_in11_min.dev_attr.attr,
+       &sensor_dev_attr_in12_min.dev_attr.attr,
+       &sensor_dev_attr_in13_min.dev_attr.attr,
+
+       &sensor_dev_attr_in1_input.dev_attr.attr,
+       &sensor_dev_attr_in2_input.dev_attr.attr,
+       &sensor_dev_attr_in3_input.dev_attr.attr,
+       &sensor_dev_attr_in4_input.dev_attr.attr,
+       &sensor_dev_attr_in5_input.dev_attr.attr,
+       &sensor_dev_attr_in6_input.dev_attr.attr,
+       &sensor_dev_attr_in7_input.dev_attr.attr,
+       &sensor_dev_attr_in8_input.dev_attr.attr,
+       &sensor_dev_attr_in9_input.dev_attr.attr,
+       &sensor_dev_attr_in10_input.dev_attr.attr,
+       &sensor_dev_attr_in11_input.dev_attr.attr,
+       &sensor_dev_attr_in12_input.dev_attr.attr,
+       &sensor_dev_attr_in13_input.dev_attr.attr,
+
+       &sensor_dev_attr_in1_label.dev_attr.attr,
+       &sensor_dev_attr_in2_label.dev_attr.attr,
+       &sensor_dev_attr_in3_label.dev_attr.attr,
+       &sensor_dev_attr_in4_label.dev_attr.attr,
+       &sensor_dev_attr_in5_label.dev_attr.attr,
+       &sensor_dev_attr_in6_label.dev_attr.attr,
+       &sensor_dev_attr_in7_label.dev_attr.attr,
+       &sensor_dev_attr_in8_label.dev_attr.attr,
+       &sensor_dev_attr_in9_label.dev_attr.attr,
+       &sensor_dev_attr_in10_label.dev_attr.attr,
+       &sensor_dev_attr_in11_label.dev_attr.attr,
+       &sensor_dev_attr_in12_label.dev_attr.attr,
+       &sensor_dev_attr_in13_label.dev_attr.attr,
+
+       &sensor_dev_attr_in1_alarm.dev_attr.attr,
+       &sensor_dev_attr_in2_alarm.dev_attr.attr,
+       &sensor_dev_attr_in3_alarm.dev_attr.attr,
+       &sensor_dev_attr_in4_alarm.dev_attr.attr,
+       &sensor_dev_attr_in5_alarm.dev_attr.attr,
+       &sensor_dev_attr_in6_alarm.dev_attr.attr,
+       &sensor_dev_attr_in7_alarm.dev_attr.attr,
+       &sensor_dev_attr_in8_alarm.dev_attr.attr,
+       &sensor_dev_attr_in9_alarm.dev_attr.attr,
+       &sensor_dev_attr_in10_alarm.dev_attr.attr,
+       &sensor_dev_attr_in11_alarm.dev_attr.attr,
+       &sensor_dev_attr_in12_alarm.dev_attr.attr,
+       &sensor_dev_attr_in13_alarm.dev_attr.attr,
+
+       &sensor_dev_attr_fan1_min.dev_attr.attr,
+       &sensor_dev_attr_fan2_min.dev_attr.attr,
+       &sensor_dev_attr_fan3_min.dev_attr.attr,
+       &sensor_dev_attr_fan4_min.dev_attr.attr,
+       &sensor_dev_attr_fan5_min.dev_attr.attr,
+       &sensor_dev_attr_fan6_min.dev_attr.attr,
+       &sensor_dev_attr_fan7_min.dev_attr.attr,
+       &sensor_dev_attr_fan8_min.dev_attr.attr,
+
+       &sensor_dev_attr_fan1_input.dev_attr.attr,
+       &sensor_dev_attr_fan2_input.dev_attr.attr,
+       &sensor_dev_attr_fan3_input.dev_attr.attr,
+       &sensor_dev_attr_fan4_input.dev_attr.attr,
+       &sensor_dev_attr_fan5_input.dev_attr.attr,
+       &sensor_dev_attr_fan6_input.dev_attr.attr,
+       &sensor_dev_attr_fan7_input.dev_attr.attr,
+       &sensor_dev_attr_fan8_input.dev_attr.attr,
+
+       &sensor_dev_attr_fan1_alarm.dev_attr.attr,
+       &sensor_dev_attr_fan2_alarm.dev_attr.attr,
+       &sensor_dev_attr_fan3_alarm.dev_attr.attr,
+       &sensor_dev_attr_fan4_alarm.dev_attr.attr,
+       &sensor_dev_attr_fan5_alarm.dev_attr.attr,
+       &sensor_dev_attr_fan6_alarm.dev_attr.attr,
+       &sensor_dev_attr_fan7_alarm.dev_attr.attr,
+       &sensor_dev_attr_fan8_alarm.dev_attr.attr,
+
+       &sensor_dev_attr_force_pwm_max.dev_attr.attr,
+       &sensor_dev_attr_pwm1.dev_attr.attr,
+       &sensor_dev_attr_pwm2.dev_attr.attr,
+       &sensor_dev_attr_pwm3.dev_attr.attr,
+       &sensor_dev_attr_pwm4.dev_attr.attr,
+
+       &sensor_dev_attr_pwm1_auto_point1_pwm.dev_attr.attr,
+       &sensor_dev_attr_pwm2_auto_point1_pwm.dev_attr.attr,
+       &sensor_dev_attr_pwm3_auto_point1_pwm.dev_attr.attr,
+       &sensor_dev_attr_pwm4_auto_point1_pwm.dev_attr.attr,
+
+       &sensor_dev_attr_pwm1_auto_point2_pwm.dev_attr.attr,
+       &sensor_dev_attr_pwm2_auto_point2_pwm.dev_attr.attr,
+       &sensor_dev_attr_pwm3_auto_point2_pwm.dev_attr.attr,
+       &sensor_dev_attr_pwm4_auto_point2_pwm.dev_attr.attr,
+
+       &sensor_dev_attr_temp1_auto_point1_hyst.dev_attr.attr,
+       &sensor_dev_attr_temp2_auto_point1_hyst.dev_attr.attr,
+       &sensor_dev_attr_temp3_auto_point1_hyst.dev_attr.attr,
+       &sensor_dev_attr_temp4_auto_point1_hyst.dev_attr.attr,
+
+       &sensor_dev_attr_temp1_auto_point2_hyst.dev_attr.attr,
+       &sensor_dev_attr_temp2_auto_point2_hyst.dev_attr.attr,
+       &sensor_dev_attr_temp3_auto_point2_hyst.dev_attr.attr,
+       &sensor_dev_attr_temp4_auto_point2_hyst.dev_attr.attr,
+
+       &sensor_dev_attr_temp1_auto_point1_temp.dev_attr.attr,
+       &sensor_dev_attr_temp2_auto_point1_temp.dev_attr.attr,
+       &sensor_dev_attr_temp3_auto_point1_temp.dev_attr.attr,
+       &sensor_dev_attr_temp4_auto_point1_temp.dev_attr.attr,
+
+       &sensor_dev_attr_temp1_auto_point2_temp.dev_attr.attr,
+       &sensor_dev_attr_temp2_auto_point2_temp.dev_attr.attr,
+       &sensor_dev_attr_temp3_auto_point2_temp.dev_attr.attr,
+       &sensor_dev_attr_temp4_auto_point2_temp.dev_attr.attr,
+
+       &sensor_dev_attr_pwm1_enable.dev_attr.attr,
+       &sensor_dev_attr_pwm2_enable.dev_attr.attr,
+       &sensor_dev_attr_pwm3_enable.dev_attr.attr,
+       &sensor_dev_attr_pwm4_enable.dev_attr.attr,
+
+       &sensor_dev_attr_pwm1_auto_channels_temp.dev_attr.attr,
+       &sensor_dev_attr_pwm2_auto_channels_temp.dev_attr.attr,
+       &sensor_dev_attr_pwm3_auto_channels_temp.dev_attr.attr,
+       &sensor_dev_attr_pwm4_auto_channels_temp.dev_attr.attr,
+       NULL
+};
+
+/* Return 0 if detection is successful, -ENODEV otherwise */
+static int adt7462_detect(struct i2c_client *client, int kind,
+                         struct i2c_board_info *info)
+{
+       struct i2c_adapter *adapter = client->adapter;
+
+       if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
+               return -ENODEV;
+
+       if (kind <= 0) {
+               int vendor, device, revision;
+
+               vendor = i2c_smbus_read_byte_data(client, ADT7462_REG_VENDOR);
+               if (vendor != ADT7462_VENDOR)
+                       return -ENODEV;
+
+               device = i2c_smbus_read_byte_data(client, ADT7462_REG_DEVICE);
+               if (device != ADT7462_DEVICE)
+                       return -ENODEV;
+
+               revision = i2c_smbus_read_byte_data(client,
+                                                   ADT7462_REG_REVISION);
+               if (revision != ADT7462_REVISION)
+                       return -ENODEV;
+       } else
+               dev_dbg(&adapter->dev, "detection forced\n");
+
+       strlcpy(info->type, "adt7462", I2C_NAME_SIZE);
+
+       return 0;
+}
+
+static int adt7462_probe(struct i2c_client *client,
+                        const struct i2c_device_id *id)
+{
+       struct adt7462_data *data;
+       int err;
+
+       data = kzalloc(sizeof(struct adt7462_data), GFP_KERNEL);
+       if (!data) {
+               err = -ENOMEM;
+               goto exit;
+       }
+
+       i2c_set_clientdata(client, data);
+       mutex_init(&data->lock);
+
+       dev_info(&client->dev, "%s chip found\n", client->name);
+
+       /* Register sysfs hooks */
+       data->attrs.attrs = adt7462_attr;
+       err = sysfs_create_group(&client->dev.kobj, &data->attrs);
+       if (err)
+               goto exit_free;
+
+       data->hwmon_dev = hwmon_device_register(&client->dev);
+       if (IS_ERR(data->hwmon_dev)) {
+               err = PTR_ERR(data->hwmon_dev);
+               goto exit_remove;
+       }
+
+       return 0;
+
+exit_remove:
+       sysfs_remove_group(&client->dev.kobj, &data->attrs);
+exit_free:
+       kfree(data);
+exit:
+       return err;
+}
+
+static int adt7462_remove(struct i2c_client *client)
+{
+       struct adt7462_data *data = i2c_get_clientdata(client);
+
+       hwmon_device_unregister(data->hwmon_dev);
+       sysfs_remove_group(&client->dev.kobj, &data->attrs);
+       kfree(data);
+       return 0;
+}
+
+static int __init adt7462_init(void)
+{
+       return i2c_add_driver(&adt7462_driver);
+}
+
+static void __exit adt7462_exit(void)
+{
+       i2c_del_driver(&adt7462_driver);
+}
+
+MODULE_AUTHOR("Darrick J. Wong <djwong@us.ibm.com>");
+MODULE_DESCRIPTION("ADT7462 driver");
+MODULE_LICENSE("GPL");
+
+module_init(adt7462_init);
+module_exit(adt7462_exit);
index d368d8f845e1148d83a55da797d11a5758067b0b..1311a595147e17a136fbe5dbe1b81ebaa635acfe 100644 (file)
@@ -137,6 +137,8 @@ I2C_CLIENT_INSMOD_1(adt7470);
 #define FAN_PERIOD_INVALID     65535
 #define FAN_DATA_VALID(x)      ((x) && (x) != FAN_PERIOD_INVALID)
 
+#define ROUND_DIV(x, divisor)  (((x) + ((divisor) / 2)) / (divisor))
+
 struct adt7470_data {
        struct device           *hwmon_dev;
        struct attribute_group  attrs;
@@ -353,7 +355,13 @@ static ssize_t set_temp_min(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7470_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10) / 1000;
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = ROUND_DIV(temp, 1000);
+       temp = SENSORS_LIMIT(temp, 0, 255);
 
        mutex_lock(&data->lock);
        data->temp_min[attr->index] = temp;
@@ -381,7 +389,13 @@ static ssize_t set_temp_max(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7470_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10) / 1000;
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = ROUND_DIV(temp, 1000);
+       temp = SENSORS_LIMIT(temp, 0, 255);
 
        mutex_lock(&data->lock);
        data->temp_max[attr->index] = temp;
@@ -430,11 +444,13 @@ static ssize_t set_fan_max(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7470_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10);
+       long temp;
 
-       if (!temp)
+       if (strict_strtol(buf, 10, &temp) || !temp)
                return -EINVAL;
+
        temp = FAN_RPM_TO_PERIOD(temp);
+       temp = SENSORS_LIMIT(temp, 1, 65534);
 
        mutex_lock(&data->lock);
        data->fan_max[attr->index] = temp;
@@ -465,11 +481,13 @@ static ssize_t set_fan_min(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7470_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10);
+       long temp;
 
-       if (!temp)
+       if (strict_strtol(buf, 10, &temp) || !temp)
                return -EINVAL;
+
        temp = FAN_RPM_TO_PERIOD(temp);
+       temp = SENSORS_LIMIT(temp, 1, 65534);
 
        mutex_lock(&data->lock);
        data->fan_min[attr->index] = temp;
@@ -507,9 +525,12 @@ static ssize_t set_force_pwm_max(struct device *dev,
 {
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7470_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10);
+       long temp;
        u8 reg;
 
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
        mutex_lock(&data->lock);
        data->force_pwm_max = temp;
        reg = i2c_smbus_read_byte_data(client, ADT7470_REG_CFG);
@@ -537,7 +558,12 @@ static ssize_t set_pwm(struct device *dev, struct device_attribute *devattr,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7470_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = SENSORS_LIMIT(temp, 0, 255);
 
        mutex_lock(&data->lock);
        data->pwm[attr->index] = temp;
@@ -564,7 +590,12 @@ static ssize_t set_pwm_max(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7470_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = SENSORS_LIMIT(temp, 0, 255);
 
        mutex_lock(&data->lock);
        data->pwm_max[attr->index] = temp;
@@ -592,7 +623,12 @@ static ssize_t set_pwm_min(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7470_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = SENSORS_LIMIT(temp, 0, 255);
 
        mutex_lock(&data->lock);
        data->pwm_min[attr->index] = temp;
@@ -630,7 +666,13 @@ static ssize_t set_pwm_tmin(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7470_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10) / 1000;
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = ROUND_DIV(temp, 1000);
+       temp = SENSORS_LIMIT(temp, 0, 255);
 
        mutex_lock(&data->lock);
        data->pwm_tmin[attr->index] = temp;
@@ -658,11 +700,14 @@ static ssize_t set_pwm_auto(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7470_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10);
        int pwm_auto_reg = ADT7470_REG_PWM_CFG(attr->index);
        int pwm_auto_reg_mask;
+       long temp;
        u8 reg;
 
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
        if (attr->index % 2)
                pwm_auto_reg_mask = ADT7470_PWM2_AUTO_MASK;
        else
@@ -716,10 +761,14 @@ static ssize_t set_pwm_auto_temp(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7470_data *data = i2c_get_clientdata(client);
-       int temp = cvt_auto_temp(simple_strtol(buf, NULL, 10));
        int pwm_auto_reg = ADT7470_REG_PWM_AUTO_TEMP(attr->index);
+       long temp;
        u8 reg;
 
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = cvt_auto_temp(temp);
        if (temp < 0)
                return temp;
 
index b9a8ea30c99c822542682017fc40a4c83e99b4f7..18aa30866a6c53deccb0dc5eeda470dd9b5efd1d 100644 (file)
@@ -129,6 +129,8 @@ I2C_CLIENT_INSMOD_1(adt7473);
 #define FAN_PERIOD_INVALID     65535
 #define FAN_DATA_VALID(x)      ((x) && (x) != FAN_PERIOD_INVALID)
 
+#define ROUND_DIV(x, divisor)  (((x) + ((divisor) / 2)) / (divisor))
+
 struct adt7473_data {
        struct device           *hwmon_dev;
        struct attribute_group  attrs;
@@ -357,7 +359,12 @@ static ssize_t set_volt_min(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7473_data *data = i2c_get_clientdata(client);
-       int volt = encode_volt(attr->index, simple_strtol(buf, NULL, 10));
+       long volt;
+
+       if (strict_strtol(buf, 10, &volt))
+               return -EINVAL;
+
+       volt = encode_volt(attr->index, volt);
 
        mutex_lock(&data->lock);
        data->volt_min[attr->index] = volt;
@@ -386,7 +393,12 @@ static ssize_t set_volt_max(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7473_data *data = i2c_get_clientdata(client);
-       int volt = encode_volt(attr->index, simple_strtol(buf, NULL, 10));
+       long volt;
+
+       if (strict_strtol(buf, 10, &volt))
+               return -EINVAL;
+
+       volt = encode_volt(attr->index, volt);
 
        mutex_lock(&data->lock);
        data->volt_max[attr->index] = volt;
@@ -419,7 +431,8 @@ static int decode_temp(u8 twos_complement, u8 raw)
 
 static u8 encode_temp(u8 twos_complement, int cooked)
 {
-       return twos_complement ? cooked & 0xFF : cooked + 64;
+       u8 ret = twos_complement ? cooked & 0xFF : cooked + 64;
+       return SENSORS_LIMIT(ret, 0, 255);
 }
 
 static ssize_t show_temp_min(struct device *dev,
@@ -441,7 +454,12 @@ static ssize_t set_temp_min(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7473_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10) / 1000;
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = ROUND_DIV(temp, 1000);
        temp = encode_temp(data->temp_twos_complement, temp);
 
        mutex_lock(&data->lock);
@@ -472,7 +490,12 @@ static ssize_t set_temp_max(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7473_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10) / 1000;
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = ROUND_DIV(temp, 1000);
        temp = encode_temp(data->temp_twos_complement, temp);
 
        mutex_lock(&data->lock);
@@ -515,11 +538,13 @@ static ssize_t set_fan_min(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7473_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10);
+       long temp;
 
-       if (!temp)
+       if (strict_strtol(buf, 10, &temp) || !temp)
                return -EINVAL;
+
        temp = FAN_RPM_TO_PERIOD(temp);
+       temp = SENSORS_LIMIT(temp, 1, 65534);
 
        mutex_lock(&data->lock);
        data->fan_min[attr->index] = temp;
@@ -558,7 +583,10 @@ static ssize_t set_max_duty_at_crit(struct device *dev,
        u8 reg;
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7473_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
 
        mutex_lock(&data->lock);
        data->max_duty_at_overheat = !!temp;
@@ -587,7 +615,12 @@ static ssize_t set_pwm(struct device *dev, struct device_attribute *devattr,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7473_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = SENSORS_LIMIT(temp, 0, 255);
 
        mutex_lock(&data->lock);
        data->pwm[attr->index] = temp;
@@ -614,7 +647,12 @@ static ssize_t set_pwm_max(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7473_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = SENSORS_LIMIT(temp, 0, 255);
 
        mutex_lock(&data->lock);
        data->pwm_max[attr->index] = temp;
@@ -642,7 +680,12 @@ static ssize_t set_pwm_min(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7473_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = SENSORS_LIMIT(temp, 0, 255);
 
        mutex_lock(&data->lock);
        data->pwm_min[attr->index] = temp;
@@ -672,7 +715,12 @@ static ssize_t set_temp_tmax(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7473_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10) / 1000;
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = ROUND_DIV(temp, 1000);
        temp = encode_temp(data->temp_twos_complement, temp);
 
        mutex_lock(&data->lock);
@@ -703,7 +751,12 @@ static ssize_t set_temp_tmin(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7473_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10) / 1000;
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
+
+       temp = ROUND_DIV(temp, 1000);
        temp = encode_temp(data->temp_twos_complement, temp);
 
        mutex_lock(&data->lock);
@@ -741,7 +794,10 @@ static ssize_t set_pwm_enable(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7473_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
 
        switch (temp) {
        case 0:
@@ -805,7 +861,10 @@ static ssize_t set_pwm_auto_temp(struct device *dev,
        struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
        struct i2c_client *client = to_i2c_client(dev);
        struct adt7473_data *data = i2c_get_clientdata(client);
-       int temp = simple_strtol(buf, NULL, 10);
+       long temp;
+
+       if (strict_strtol(buf, 10, &temp))
+               return -EINVAL;
 
        switch (temp) {
        case 1:
index be3285912cb76b65a7d69375215614f4fc898ee2..086c2a5cef0bcdfeae7de4cf4fba665b6745134d 100644 (file)
@@ -128,6 +128,9 @@ static const char* temperature_sensors_sets[][36] = {
 /* Set 13: iMac 8,1 */
        { "TA0P", "TC0D", "TC0H", "TC0P", "TG0D", "TG0H", "TG0P", "TH0P",
          "TL0P", "TO0P", "TW0P", "Tm0P", "Tp0P", NULL },
+/* Set 14: iMac 6,1 */
+       { "TA0P", "TC0D", "TC0H", "TC0P", "TG0D", "TG0H", "TG0P", "TH0P",
+         "TO0P", "Tp0P", NULL },
 };
 
 /* List of keys used to read/write fan speeds */
@@ -1280,7 +1283,7 @@ static __initdata struct dmi_match_data applesmc_dmi_data[] = {
        { .accelerometer = 0, .light = 0, .temperature_set = 4 },
 /* iMac: temperature set 5 */
        { .accelerometer = 0, .light = 0, .temperature_set = 5 },
-/* MacBook3: accelerometer and temperature set 6 */
+/* MacBook3, MacBook4: accelerometer and temperature set 6 */
        { .accelerometer = 1, .light = 0, .temperature_set = 6 },
 /* MacBook Air: accelerometer, backlight and temperature set 7 */
        { .accelerometer = 1, .light = 1, .temperature_set = 7 },
@@ -1296,6 +1299,8 @@ static __initdata struct dmi_match_data applesmc_dmi_data[] = {
        { .accelerometer = 1, .light = 1, .temperature_set = 12 },
 /* iMac 8: light sensor only, temperature set 13 */
        { .accelerometer = 0, .light = 0, .temperature_set = 13 },
+/* iMac 6: light sensor only, temperature set 14 */
+       { .accelerometer = 0, .light = 0, .temperature_set = 14 },
 };
 
 /* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
@@ -1329,6 +1334,10 @@ static __initdata struct dmi_system_id applesmc_whitelist[] = {
          DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
          DMI_MATCH(DMI_PRODUCT_NAME,"MacBook3") },
                &applesmc_dmi_data[6]},
+       { applesmc_dmi_match, "Apple MacBook 4", {
+         DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
+         DMI_MATCH(DMI_PRODUCT_NAME, "MacBook4") },
+               &applesmc_dmi_data[6]},
        { applesmc_dmi_match, "Apple MacBook 5", {
          DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
          DMI_MATCH(DMI_PRODUCT_NAME, "MacBook5") },
@@ -1345,10 +1354,18 @@ static __initdata struct dmi_system_id applesmc_whitelist[] = {
          DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
          DMI_MATCH(DMI_PRODUCT_NAME,"MacPro2") },
                &applesmc_dmi_data[4]},
+       { applesmc_dmi_match, "Apple MacPro", {
+         DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
+         DMI_MATCH(DMI_PRODUCT_NAME, "MacPro") },
+               &applesmc_dmi_data[4]},
        { applesmc_dmi_match, "Apple iMac 8", {
          DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
          DMI_MATCH(DMI_PRODUCT_NAME, "iMac8") },
                &applesmc_dmi_data[13]},
+       { applesmc_dmi_match, "Apple iMac 6", {
+         DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
+         DMI_MATCH(DMI_PRODUCT_NAME, "iMac6") },
+               &applesmc_dmi_data[14]},
        { applesmc_dmi_match, "Apple iMac 5", {
          DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
          DMI_MATCH(DMI_PRODUCT_NAME, "iMac5") },
@@ -1547,3 +1564,4 @@ module_exit(applesmc_exit);
 MODULE_AUTHOR("Nicolas Boichat");
 MODULE_DESCRIPTION("Apple SMC");
 MODULE_LICENSE("GPL v2");
+MODULE_DEVICE_TABLE(dmi, applesmc_whitelist);
index 7b0ed5dea399d9fe9a5e385385a216d559d9e326..fe74609a7feb5f706ab907c5d69be9881c5bc731 100644 (file)
 static DEFINE_IDR(aem_idr);
 static DEFINE_SPINLOCK(aem_idr_lock);
 
-static struct device_driver aem_driver = {
-       .name = DRVNAME,
-       .bus = &platform_bus_type,
+static struct platform_driver aem_driver = {
+       .driver = {
+               .name = DRVNAME,
+               .bus = &platform_bus_type,
+       }
 };
 
 struct aem_ipmi_data {
@@ -583,7 +585,7 @@ static int aem_init_aem1_inst(struct aem_ipmi_data *probe, u8 module_handle)
        data->pdev = platform_device_alloc(DRVNAME, data->id);
        if (!data->pdev)
                goto dev_err;
-       data->pdev->dev.driver = &aem_driver;
+       data->pdev->dev.driver = &aem_driver.driver;
 
        res = platform_device_add(data->pdev);
        if (res)
@@ -716,7 +718,7 @@ static int aem_init_aem2_inst(struct aem_ipmi_data *probe,
        data->pdev = platform_device_alloc(DRVNAME, data->id);
        if (!data->pdev)
                goto dev_err;
-       data->pdev->dev.driver = &aem_driver;
+       data->pdev->dev.driver = &aem_driver.driver;
 
        res = platform_device_add(data->pdev);
        if (res)
@@ -1085,7 +1087,7 @@ static int __init aem_init(void)
 {
        int res;
 
-       res = driver_register(&aem_driver);
+       res = driver_register(&aem_driver.driver);
        if (res) {
                printk(KERN_ERR "Can't register aem driver\n");
                return res;
@@ -1097,7 +1099,7 @@ static int __init aem_init(void)
        return 0;
 
 ipmi_reg_err:
-       driver_unregister(&aem_driver);
+       driver_unregister(&aem_driver.driver);
        return res;
 
 }
@@ -1107,7 +1109,7 @@ static void __exit aem_exit(void)
        struct aem_data *p1, *next1;
 
        ipmi_smi_watcher_unregister(&driver_data.bmc_events);
-       driver_unregister(&aem_driver);
+       driver_unregister(&aem_driver.driver);
        list_for_each_entry_safe(p1, next1, &driver_data.aem_devices, list)
                aem_delete(p1);
 }
diff --git a/drivers/hwmon/lis3lv02d.c b/drivers/hwmon/lis3lv02d.c
new file mode 100644 (file)
index 0000000..c002144
--- /dev/null
@@ -0,0 +1,581 @@
+/*
+ *  lis3lv02d.c - ST LIS3LV02DL accelerometer driver
+ *
+ *  Copyright (C) 2007-2008 Yan Burman
+ *  Copyright (C) 2008 Eric Piel
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/dmi.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/platform_device.h>
+#include <linux/interrupt.h>
+#include <linux/input.h>
+#include <linux/kthread.h>
+#include <linux/semaphore.h>
+#include <linux/delay.h>
+#include <linux/wait.h>
+#include <linux/poll.h>
+#include <linux/freezer.h>
+#include <linux/uaccess.h>
+#include <acpi/acpi_drivers.h>
+#include <asm/atomic.h>
+#include "lis3lv02d.h"
+
+#define DRIVER_NAME     "lis3lv02d"
+#define ACPI_MDPS_CLASS "accelerometer"
+
+/* joystick device poll interval in milliseconds */
+#define MDPS_POLL_INTERVAL 50
+/*
+ * The sensor can also generate interrupts (DRDY) but it's pretty pointless
+ * because their are generated even if the data do not change. So it's better
+ * to keep the interrupt for the free-fall event. The values are updated at
+ * 40Hz (at the lowest frequency), but as it can be pretty time consuming on
+ * some low processor, we poll the sensor only at 20Hz... enough for the
+ * joystick.
+ */
+
+/* Maximum value our axis may get for the input device (signed 12 bits) */
+#define MDPS_MAX_VAL 2048
+
+struct axis_conversion {
+       s8      x;
+       s8      y;
+       s8      z;
+};
+
+struct acpi_lis3lv02d {
+       struct acpi_device      *device;   /* The ACPI device */
+       struct input_dev        *idev;     /* input device */
+       struct task_struct      *kthread;  /* kthread for input */
+       struct mutex            lock;
+       struct platform_device  *pdev;     /* platform device */
+       atomic_t                count;     /* interrupt count after last read */
+       int                     xcalib;    /* calibrated null value for x */
+       int                     ycalib;    /* calibrated null value for y */
+       int                     zcalib;    /* calibrated null value for z */
+       unsigned char           is_on;     /* whether the device is on or off */
+       unsigned char           usage;     /* usage counter */
+       struct axis_conversion  ac;        /* hw -> logical axis */
+};
+
+static struct acpi_lis3lv02d adev;
+
+static int lis3lv02d_remove_fs(void);
+static int lis3lv02d_add_fs(struct acpi_device *device);
+
+/* For automatic insertion of the module */
+static struct acpi_device_id lis3lv02d_device_ids[] = {
+       {"HPQ0004", 0}, /* HP Mobile Data Protection System PNP */
+       {"", 0},
+};
+MODULE_DEVICE_TABLE(acpi, lis3lv02d_device_ids);
+
+/**
+ * lis3lv02d_acpi_init - ACPI _INI method: initialize the device.
+ * @handle: the handle of the device
+ *
+ * Returns AE_OK on success.
+ */
+static inline acpi_status lis3lv02d_acpi_init(acpi_handle handle)
+{
+       return acpi_evaluate_object(handle, METHOD_NAME__INI, NULL, NULL);
+}
+
+/**
+ * lis3lv02d_acpi_read - ACPI ALRD method: read a register
+ * @handle: the handle of the device
+ * @reg:    the register to read
+ * @ret:    result of the operation
+ *
+ * Returns AE_OK on success.
+ */
+static acpi_status lis3lv02d_acpi_read(acpi_handle handle, int reg, u8 *ret)
+{
+       union acpi_object arg0 = { ACPI_TYPE_INTEGER };
+       struct acpi_object_list args = { 1, &arg0 };
+       unsigned long long lret;
+       acpi_status status;
+
+       arg0.integer.value = reg;
+
+       status = acpi_evaluate_integer(handle, "ALRD", &args, &lret);
+       *ret = lret;
+       return status;
+}
+
+/**
+ * lis3lv02d_acpi_write - ACPI ALWR method: write to a register
+ * @handle: the handle of the device
+ * @reg:    the register to write to
+ * @val:    the value to write
+ *
+ * Returns AE_OK on success.
+ */
+static acpi_status lis3lv02d_acpi_write(acpi_handle handle, int reg, u8 val)
+{
+       unsigned long long ret; /* Not used when writting */
+       union acpi_object in_obj[2];
+       struct acpi_object_list args = { 2, in_obj };
+
+       in_obj[0].type          = ACPI_TYPE_INTEGER;
+       in_obj[0].integer.value = reg;
+       in_obj[1].type          = ACPI_TYPE_INTEGER;
+       in_obj[1].integer.value = val;
+
+       return acpi_evaluate_integer(handle, "ALWR", &args, &ret);
+}
+
+static s16 lis3lv02d_read_16(acpi_handle handle, int reg)
+{
+       u8 lo, hi;
+
+       lis3lv02d_acpi_read(handle, reg, &lo);
+       lis3lv02d_acpi_read(handle, reg + 1, &hi);
+       /* In "12 bit right justified" mode, bit 6, bit 7, bit 8 = bit 5 */
+       return (s16)((hi << 8) | lo);
+}
+
+/**
+ * lis3lv02d_get_axis - For the given axis, give the value converted
+ * @axis:      1,2,3 - can also be negative
+ * @hw_values: raw values returned by the hardware
+ *
+ * Returns the converted value.
+ */
+static inline int lis3lv02d_get_axis(s8 axis, int hw_values[3])
+{
+       if (axis > 0)
+               return hw_values[axis - 1];
+       else
+               return -hw_values[-axis - 1];
+}
+
+/**
+ * lis3lv02d_get_xyz - Get X, Y and Z axis values from the accelerometer
+ * @handle: the handle to the device
+ * @x:      where to store the X axis value
+ * @y:      where to store the Y axis value
+ * @z:      where to store the Z axis value
+ *
+ * Note that 40Hz input device can eat up about 10% CPU at 800MHZ
+ */
+static void lis3lv02d_get_xyz(acpi_handle handle, int *x, int *y, int *z)
+{
+       int position[3];
+
+       position[0] = lis3lv02d_read_16(handle, OUTX_L);
+       position[1] = lis3lv02d_read_16(handle, OUTY_L);
+       position[2] = lis3lv02d_read_16(handle, OUTZ_L);
+
+       *x = lis3lv02d_get_axis(adev.ac.x, position);
+       *y = lis3lv02d_get_axis(adev.ac.y, position);
+       *z = lis3lv02d_get_axis(adev.ac.z, position);
+}
+
+static inline void lis3lv02d_poweroff(acpi_handle handle)
+{
+       adev.is_on = 0;
+       /* disable X,Y,Z axis and power down */
+       lis3lv02d_acpi_write(handle, CTRL_REG1, 0x00);
+}
+
+static void lis3lv02d_poweron(acpi_handle handle)
+{
+       u8 val;
+
+       adev.is_on = 1;
+       lis3lv02d_acpi_init(handle);
+       lis3lv02d_acpi_write(handle, FF_WU_CFG, 0);
+       /*
+        * BDU: LSB and MSB values are not updated until both have been read.
+        *      So the value read will always be correct.
+        * IEN: Interrupt for free-fall and DD, not for data-ready.
+        */
+       lis3lv02d_acpi_read(handle, CTRL_REG2, &val);
+       val |= CTRL2_BDU | CTRL2_IEN;
+       lis3lv02d_acpi_write(handle, CTRL_REG2, val);
+}
+
+#ifdef CONFIG_PM
+static int lis3lv02d_suspend(struct acpi_device *device, pm_message_t state)
+{
+       /* make sure the device is off when we suspend */
+       lis3lv02d_poweroff(device->handle);
+       return 0;
+}
+
+static int lis3lv02d_resume(struct acpi_device *device)
+{
+       /* put back the device in the right state (ACPI might turn it on) */
+       mutex_lock(&adev.lock);
+       if (adev.usage > 0)
+               lis3lv02d_poweron(device->handle);
+       else
+               lis3lv02d_poweroff(device->handle);
+       mutex_unlock(&adev.lock);
+       return 0;
+}
+#else
+#define lis3lv02d_suspend NULL
+#define lis3lv02d_resume NULL
+#endif
+
+
+/*
+ * To be called before starting to use the device. It makes sure that the
+ * device will always be on until a call to lis3lv02d_decrease_use(). Not to be
+ * used from interrupt context.
+ */
+static void lis3lv02d_increase_use(struct acpi_lis3lv02d *dev)
+{
+       mutex_lock(&dev->lock);
+       dev->usage++;
+       if (dev->usage == 1) {
+               if (!dev->is_on)
+                       lis3lv02d_poweron(dev->device->handle);
+       }
+       mutex_unlock(&dev->lock);
+}
+
+/*
+ * To be called whenever a usage of the device is stopped.
+ * It will make sure to turn off the device when there is not usage.
+ */
+static void lis3lv02d_decrease_use(struct acpi_lis3lv02d *dev)
+{
+       mutex_lock(&dev->lock);
+       dev->usage--;
+       if (dev->usage == 0)
+               lis3lv02d_poweroff(dev->device->handle);
+       mutex_unlock(&dev->lock);
+}
+
+/**
+ * lis3lv02d_joystick_kthread - Kthread polling function
+ * @data: unused - here to conform to threadfn prototype
+ */
+static int lis3lv02d_joystick_kthread(void *data)
+{
+       int x, y, z;
+
+       while (!kthread_should_stop()) {
+               lis3lv02d_get_xyz(adev.device->handle, &x, &y, &z);
+               input_report_abs(adev.idev, ABS_X, x - adev.xcalib);
+               input_report_abs(adev.idev, ABS_Y, y - adev.ycalib);
+               input_report_abs(adev.idev, ABS_Z, z - adev.zcalib);
+
+               input_sync(adev.idev);
+
+               try_to_freeze();
+               msleep_interruptible(MDPS_POLL_INTERVAL);
+       }
+
+       return 0;
+}
+
+static int lis3lv02d_joystick_open(struct input_dev *input)
+{
+       lis3lv02d_increase_use(&adev);
+       adev.kthread = kthread_run(lis3lv02d_joystick_kthread, NULL, "klis3lv02d");
+       if (IS_ERR(adev.kthread)) {
+               lis3lv02d_decrease_use(&adev);
+               return PTR_ERR(adev.kthread);
+       }
+
+       return 0;
+}
+
+static void lis3lv02d_joystick_close(struct input_dev *input)
+{
+       kthread_stop(adev.kthread);
+       lis3lv02d_decrease_use(&adev);
+}
+
+
+static inline void lis3lv02d_calibrate_joystick(void)
+{
+       lis3lv02d_get_xyz(adev.device->handle, &adev.xcalib, &adev.ycalib, &adev.zcalib);
+}
+
+static int lis3lv02d_joystick_enable(void)
+{
+       int err;
+
+       if (adev.idev)
+               return -EINVAL;
+
+       adev.idev = input_allocate_device();
+       if (!adev.idev)
+               return -ENOMEM;
+
+       lis3lv02d_calibrate_joystick();
+
+       adev.idev->name       = "ST LIS3LV02DL Accelerometer";
+       adev.idev->phys       = DRIVER_NAME "/input0";
+       adev.idev->id.bustype = BUS_HOST;
+       adev.idev->id.vendor  = 0;
+       adev.idev->dev.parent = &adev.pdev->dev;
+       adev.idev->open       = lis3lv02d_joystick_open;
+       adev.idev->close      = lis3lv02d_joystick_close;
+
+       set_bit(EV_ABS, adev.idev->evbit);
+       input_set_abs_params(adev.idev, ABS_X, -MDPS_MAX_VAL, MDPS_MAX_VAL, 3, 3);
+       input_set_abs_params(adev.idev, ABS_Y, -MDPS_MAX_VAL, MDPS_MAX_VAL, 3, 3);
+       input_set_abs_params(adev.idev, ABS_Z, -MDPS_MAX_VAL, MDPS_MAX_VAL, 3, 3);
+
+       err = input_register_device(adev.idev);
+       if (err) {
+               input_free_device(adev.idev);
+               adev.idev = NULL;
+       }
+
+       return err;
+}
+
+static void lis3lv02d_joystick_disable(void)
+{
+       if (!adev.idev)
+               return;
+
+       input_unregister_device(adev.idev);
+       adev.idev = NULL;
+}
+
+
+/*
+ * Initialise the accelerometer and the various subsystems.
+ * Should be rather independant of the bus system.
+ */
+static int lis3lv02d_init_device(struct acpi_lis3lv02d *dev)
+{
+       mutex_init(&dev->lock);
+       lis3lv02d_add_fs(dev->device);
+       lis3lv02d_increase_use(dev);
+
+       if (lis3lv02d_joystick_enable())
+               printk(KERN_ERR DRIVER_NAME ": joystick initialization failed\n");
+
+       lis3lv02d_decrease_use(dev);
+       return 0;
+}
+
+static int lis3lv02d_dmi_matched(const struct dmi_system_id *dmi)
+{
+       adev.ac = *((struct axis_conversion *)dmi->driver_data);
+       printk(KERN_INFO DRIVER_NAME ": hardware type %s found.\n", dmi->ident);
+
+       return 1;
+}
+
+/* Represents, for each axis seen by userspace, the corresponding hw axis (+1).
+ * If the value is negative, the opposite of the hw value is used. */
+static struct axis_conversion lis3lv02d_axis_normal = {1, 2, 3};
+static struct axis_conversion lis3lv02d_axis_y_inverted = {1, -2, 3};
+static struct axis_conversion lis3lv02d_axis_x_inverted = {-1, 2, 3};
+static struct axis_conversion lis3lv02d_axis_z_inverted = {1, 2, -3};
+static struct axis_conversion lis3lv02d_axis_xy_rotated_left = {-2, 1, 3};
+static struct axis_conversion lis3lv02d_axis_xy_swap_inverted = {-2, -1, 3};
+
+#define AXIS_DMI_MATCH(_ident, _name, _axis) {         \
+       .ident = _ident,                                \
+       .callback = lis3lv02d_dmi_matched,              \
+       .matches = {                                    \
+               DMI_MATCH(DMI_PRODUCT_NAME, _name)      \
+       },                                              \
+       .driver_data = &lis3lv02d_axis_##_axis          \
+}
+static struct dmi_system_id lis3lv02d_dmi_ids[] = {
+       /* product names are truncated to match all kinds of a same model */
+       AXIS_DMI_MATCH("NC64x0", "HP Compaq nc64", x_inverted),
+       AXIS_DMI_MATCH("NC84x0", "HP Compaq nc84", z_inverted),
+       AXIS_DMI_MATCH("NX9420", "HP Compaq nx9420", x_inverted),
+       AXIS_DMI_MATCH("NW9440", "HP Compaq nw9440", x_inverted),
+       AXIS_DMI_MATCH("NC2510", "HP Compaq 2510", y_inverted),
+       AXIS_DMI_MATCH("NC8510", "HP Compaq 8510", xy_swap_inverted),
+       AXIS_DMI_MATCH("HP2133", "HP 2133", xy_rotated_left),
+       { NULL, }
+/* Laptop models without axis info (yet):
+ * "NC651xx" "HP Compaq 651"
+ * "NC671xx" "HP Compaq 671"
+ * "NC6910" "HP Compaq 6910"
+ * HP Compaq 8710x Notebook PC / Mobile Workstation
+ * "NC2400" "HP Compaq nc2400"
+ * "NX74x0" "HP Compaq nx74"
+ * "NX6325" "HP Compaq nx6325"
+ * "NC4400" "HP Compaq nc4400"
+ */
+};
+
+static int lis3lv02d_add(struct acpi_device *device)
+{
+       u8 val;
+
+       if (!device)
+               return -EINVAL;
+
+       adev.device = device;
+       strcpy(acpi_device_name(device), DRIVER_NAME);
+       strcpy(acpi_device_class(device), ACPI_MDPS_CLASS);
+       device->driver_data = &adev;
+
+       lis3lv02d_acpi_read(device->handle, WHO_AM_I, &val);
+       if ((val != LIS3LV02DL_ID) && (val != LIS302DL_ID)) {
+               printk(KERN_ERR DRIVER_NAME
+                               ": Accelerometer chip not LIS3LV02D{L,Q}\n");
+       }
+
+       /* If possible use a "standard" axes order */
+       if (dmi_check_system(lis3lv02d_dmi_ids) == 0) {
+               printk(KERN_INFO DRIVER_NAME ": laptop model unknown, "
+                                "using default axes configuration\n");
+               adev.ac = lis3lv02d_axis_normal;
+       }
+
+       return lis3lv02d_init_device(&adev);
+}
+
+static int lis3lv02d_remove(struct acpi_device *device, int type)
+{
+       if (!device)
+               return -EINVAL;
+
+       lis3lv02d_joystick_disable();
+       lis3lv02d_poweroff(device->handle);
+
+       return lis3lv02d_remove_fs();
+}
+
+
+/* Sysfs stuff */
+static ssize_t lis3lv02d_position_show(struct device *dev,
+                               struct device_attribute *attr, char *buf)
+{
+       int x, y, z;
+
+       lis3lv02d_increase_use(&adev);
+       lis3lv02d_get_xyz(adev.device->handle, &x, &y, &z);
+       lis3lv02d_decrease_use(&adev);
+       return sprintf(buf, "(%d,%d,%d)\n", x, y, z);
+}
+
+static ssize_t lis3lv02d_calibrate_show(struct device *dev,
+                               struct device_attribute *attr, char *buf)
+{
+       return sprintf(buf, "(%d,%d,%d)\n", adev.xcalib, adev.ycalib, adev.zcalib);
+}
+
+static ssize_t lis3lv02d_calibrate_store(struct device *dev,
+                               struct device_attribute *attr,
+                               const char *buf, size_t count)
+{
+       lis3lv02d_increase_use(&adev);
+       lis3lv02d_calibrate_joystick();
+       lis3lv02d_decrease_use(&adev);
+       return count;
+}
+
+/* conversion btw sampling rate and the register values */
+static int lis3lv02dl_df_val[4] = {40, 160, 640, 2560};
+static ssize_t lis3lv02d_rate_show(struct device *dev,
+                       struct device_attribute *attr, char *buf)
+{
+       u8 ctrl;
+       int val;
+
+       lis3lv02d_increase_use(&adev);
+       lis3lv02d_acpi_read(adev.device->handle, CTRL_REG1, &ctrl);
+       lis3lv02d_decrease_use(&adev);
+       val = (ctrl & (CTRL1_DF0 | CTRL1_DF1)) >> 4;
+       return sprintf(buf, "%d\n", lis3lv02dl_df_val[val]);
+}
+
+static DEVICE_ATTR(position, S_IRUGO, lis3lv02d_position_show, NULL);
+static DEVICE_ATTR(calibrate, S_IRUGO|S_IWUSR, lis3lv02d_calibrate_show,
+       lis3lv02d_calibrate_store);
+static DEVICE_ATTR(rate, S_IRUGO, lis3lv02d_rate_show, NULL);
+
+static struct attribute *lis3lv02d_attributes[] = {
+       &dev_attr_position.attr,
+       &dev_attr_calibrate.attr,
+       &dev_attr_rate.attr,
+       NULL
+};
+
+static struct attribute_group lis3lv02d_attribute_group = {
+       .attrs = lis3lv02d_attributes
+};
+
+static int lis3lv02d_add_fs(struct acpi_device *device)
+{
+       adev.pdev = platform_device_register_simple(DRIVER_NAME, -1, NULL, 0);
+       if (IS_ERR(adev.pdev))
+               return PTR_ERR(adev.pdev);
+
+       return sysfs_create_group(&adev.pdev->dev.kobj, &lis3lv02d_attribute_group);
+}
+
+static int lis3lv02d_remove_fs(void)
+{
+       sysfs_remove_group(&adev.pdev->dev.kobj, &lis3lv02d_attribute_group);
+       platform_device_unregister(adev.pdev);
+       return 0;
+}
+
+/* For the HP MDPS aka 3D Driveguard */
+static struct acpi_driver lis3lv02d_driver = {
+       .name  = DRIVER_NAME,
+       .class = ACPI_MDPS_CLASS,
+       .ids   = lis3lv02d_device_ids,
+       .ops = {
+               .add     = lis3lv02d_add,
+               .remove  = lis3lv02d_remove,
+               .suspend = lis3lv02d_suspend,
+               .resume  = lis3lv02d_resume,
+       }
+};
+
+static int __init lis3lv02d_init_module(void)
+{
+       int ret;
+
+       if (acpi_disabled)
+               return -ENODEV;
+
+       ret = acpi_bus_register_driver(&lis3lv02d_driver);
+       if (ret < 0)
+               return ret;
+
+       printk(KERN_INFO DRIVER_NAME " driver loaded.\n");
+
+       return 0;
+}
+
+static void __exit lis3lv02d_exit_module(void)
+{
+       acpi_bus_unregister_driver(&lis3lv02d_driver);
+}
+
+MODULE_DESCRIPTION("ST LIS3LV02Dx three-axis digital accelerometer driver");
+MODULE_AUTHOR("Yan Burman and Eric Piel");
+MODULE_LICENSE("GPL");
+
+module_init(lis3lv02d_init_module);
+module_exit(lis3lv02d_exit_module);
diff --git a/drivers/hwmon/lis3lv02d.h b/drivers/hwmon/lis3lv02d.h
new file mode 100644 (file)
index 0000000..330cfc6
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+ *  lis3lv02d.h - ST LIS3LV02DL accelerometer driver
+ *
+ *  Copyright (C) 2007-2008 Yan Burman
+ *  Copyright (C) 2008 Eric Piel
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+/*
+ * The actual chip is STMicroelectronics LIS3LV02DL or LIS3LV02DQ that seems to
+ * be connected via SPI. There exists also several similar chips (such as LIS302DL or
+ * LIS3L02DQ) but not in the HP laptops and they have slightly different registers.
+ * They can also be connected via I²C.
+ */
+
+#define LIS3LV02DL_ID  0x3A /* Also the LIS3LV02DQ */
+#define LIS302DL_ID    0x3B /* Also the LIS202DL! */
+
+enum lis3lv02d_reg {
+       WHO_AM_I        = 0x0F,
+       OFFSET_X        = 0x16,
+       OFFSET_Y        = 0x17,
+       OFFSET_Z        = 0x18,
+       GAIN_X          = 0x19,
+       GAIN_Y          = 0x1A,
+       GAIN_Z          = 0x1B,
+       CTRL_REG1       = 0x20,
+       CTRL_REG2       = 0x21,
+       CTRL_REG3       = 0x22,
+       HP_FILTER_RESET = 0x23,
+       STATUS_REG      = 0x27,
+       OUTX_L          = 0x28,
+       OUTX_H          = 0x29,
+       OUTY_L          = 0x2A,
+       OUTY_H          = 0x2B,
+       OUTZ_L          = 0x2C,
+       OUTZ_H          = 0x2D,
+       FF_WU_CFG       = 0x30,
+       FF_WU_SRC       = 0x31,
+       FF_WU_ACK       = 0x32,
+       FF_WU_THS_L     = 0x34,
+       FF_WU_THS_H     = 0x35,
+       FF_WU_DURATION  = 0x36,
+       DD_CFG          = 0x38,
+       DD_SRC          = 0x39,
+       DD_ACK          = 0x3A,
+       DD_THSI_L       = 0x3C,
+       DD_THSI_H       = 0x3D,
+       DD_THSE_L       = 0x3E,
+       DD_THSE_H       = 0x3F,
+};
+
+enum lis3lv02d_ctrl1 {
+       CTRL1_Xen       = 0x01,
+       CTRL1_Yen       = 0x02,
+       CTRL1_Zen       = 0x04,
+       CTRL1_ST        = 0x08,
+       CTRL1_DF0       = 0x10,
+       CTRL1_DF1       = 0x20,
+       CTRL1_PD0       = 0x40,
+       CTRL1_PD1       = 0x80,
+};
+enum lis3lv02d_ctrl2 {
+       CTRL2_DAS       = 0x01,
+       CTRL2_SIM       = 0x02,
+       CTRL2_DRDY      = 0x04,
+       CTRL2_IEN       = 0x08,
+       CTRL2_BOOT      = 0x10,
+       CTRL2_BLE       = 0x20,
+       CTRL2_BDU       = 0x40, /* Block Data Update */
+       CTRL2_FS        = 0x80, /* Full Scale selection */
+};
+
+
+enum lis3lv02d_ctrl3 {
+       CTRL3_CFS0      = 0x01,
+       CTRL3_CFS1      = 0x02,
+       CTRL3_FDS       = 0x10,
+       CTRL3_HPFF      = 0x20,
+       CTRL3_HPDD      = 0x40,
+       CTRL3_ECK       = 0x80,
+};
+
+enum lis3lv02d_status_reg {
+       STATUS_XDA      = 0x01,
+       STATUS_YDA      = 0x02,
+       STATUS_ZDA      = 0x04,
+       STATUS_XYZDA    = 0x08,
+       STATUS_XOR      = 0x10,
+       STATUS_YOR      = 0x20,
+       STATUS_ZOR      = 0x40,
+       STATUS_XYZOR    = 0x80,
+};
+
+enum lis3lv02d_ff_wu_cfg {
+       FF_WU_CFG_XLIE  = 0x01,
+       FF_WU_CFG_XHIE  = 0x02,
+       FF_WU_CFG_YLIE  = 0x04,
+       FF_WU_CFG_YHIE  = 0x08,
+       FF_WU_CFG_ZLIE  = 0x10,
+       FF_WU_CFG_ZHIE  = 0x20,
+       FF_WU_CFG_LIR   = 0x40,
+       FF_WU_CFG_AOI   = 0x80,
+};
+
+enum lis3lv02d_ff_wu_src {
+       FF_WU_SRC_XL    = 0x01,
+       FF_WU_SRC_XH    = 0x02,
+       FF_WU_SRC_YL    = 0x04,
+       FF_WU_SRC_YH    = 0x08,
+       FF_WU_SRC_ZL    = 0x10,
+       FF_WU_SRC_ZH    = 0x20,
+       FF_WU_SRC_IA    = 0x40,
+};
+
+enum lis3lv02d_dd_cfg {
+       DD_CFG_XLIE     = 0x01,
+       DD_CFG_XHIE     = 0x02,
+       DD_CFG_YLIE     = 0x04,
+       DD_CFG_YHIE     = 0x08,
+       DD_CFG_ZLIE     = 0x10,
+       DD_CFG_ZHIE     = 0x20,
+       DD_CFG_LIR      = 0x40,
+       DD_CFG_IEND     = 0x80,
+};
+
+enum lis3lv02d_dd_src {
+       DD_SRC_XL       = 0x01,
+       DD_SRC_XH       = 0x02,
+       DD_SRC_YL       = 0x04,
+       DD_SRC_YH       = 0x08,
+       DD_SRC_ZL       = 0x10,
+       DD_SRC_ZH       = 0x20,
+       DD_SRC_IA       = 0x40,
+};
+
index 3ff0285396fa1dd764a17e207ed6f266cfcb43e0..cfc1ee90f5a39d1934c686a5100a185457c2b8a6 100644 (file)
@@ -39,7 +39,8 @@
 static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
 
 /* Insmod parameters */
-I2C_CLIENT_INSMOD_6(lm85b, lm85c, adm1027, adt7463, emc6d100, emc6d102);
+I2C_CLIENT_INSMOD_7(lm85b, lm85c, adm1027, adt7463, adt7468, emc6d100,
+                   emc6d102);
 
 /* The LM85 registers */
 
@@ -59,6 +60,12 @@ I2C_CLIENT_INSMOD_6(lm85b, lm85c, adm1027, adt7463, emc6d100, emc6d102);
 
 #define        LM85_REG_COMPANY                0x3e
 #define        LM85_REG_VERSTEP                0x3f
+
+#define        ADT7468_REG_CFG5                0x7c
+#define                ADT7468_OFF64           0x01
+#define        IS_ADT7468_OFF64(data)          \
+       ((data)->type == adt7468 && !((data)->cfg5 & ADT7468_OFF64))
+
 /* These are the recognized values for the above regs */
 #define        LM85_COMPANY_NATIONAL           0x01
 #define        LM85_COMPANY_ANALOG_DEV         0x41
@@ -70,6 +77,8 @@ I2C_CLIENT_INSMOD_6(lm85b, lm85c, adm1027, adt7463, emc6d100, emc6d102);
 #define        LM85_VERSTEP_ADM1027            0x60
 #define        LM85_VERSTEP_ADT7463            0x62
 #define        LM85_VERSTEP_ADT7463C           0x6A
+#define        LM85_VERSTEP_ADT7468_1          0x71
+#define        LM85_VERSTEP_ADT7468_2          0x72
 #define        LM85_VERSTEP_EMC6D100_A0        0x60
 #define        LM85_VERSTEP_EMC6D100_A1        0x61
 #define        LM85_VERSTEP_EMC6D102           0x65
@@ -306,6 +315,7 @@ struct lm85_data {
        u8 vid;                 /* Register value */
        u8 vrm;                 /* VRM version */
        u32 alarms;             /* Register encoding, combined */
+       u8 cfg5;                /* Config Register 5 on ADT7468 */
        struct lm85_autofan autofan[3];
        struct lm85_zone zone[3];
 };
@@ -685,6 +695,9 @@ static ssize_t set_temp_min(struct device *dev, struct device_attribute *attr,
        struct lm85_data *data = i2c_get_clientdata(client);
        long val = simple_strtol(buf, NULL, 10);
 
+       if (IS_ADT7468_OFF64(data))
+               val += 64;
+
        mutex_lock(&data->update_lock);
        data->temp_min[nr] = TEMP_TO_REG(val);
        lm85_write_value(client, LM85_REG_TEMP_MIN(nr), data->temp_min[nr]);
@@ -708,6 +721,9 @@ static ssize_t set_temp_max(struct device *dev, struct device_attribute *attr,
        struct lm85_data *data = i2c_get_clientdata(client);
        long val = simple_strtol(buf, NULL, 10);
 
+       if (IS_ADT7468_OFF64(data))
+               val += 64;
+
        mutex_lock(&data->update_lock);
        data->temp_max[nr] = TEMP_TO_REG(val);
        lm85_write_value(client, LM85_REG_TEMP_MAX(nr), data->temp_max[nr]);
@@ -1163,6 +1179,10 @@ static int lm85_detect(struct i2c_client *client, int kind,
                        case LM85_VERSTEP_ADT7463C:
                                kind = adt7463;
                                break;
+                       case LM85_VERSTEP_ADT7468_1:
+                       case LM85_VERSTEP_ADT7468_2:
+                               kind = adt7468;
+                               break;
                        }
                } else if (company == LM85_COMPANY_SMSC) {
                        switch (verstep) {
@@ -1195,6 +1215,9 @@ static int lm85_detect(struct i2c_client *client, int kind,
        case adt7463:
                type_name = "adt7463";
                break;
+       case adt7468:
+               type_name = "adt7468";
+               break;
        case emc6d100:
                type_name = "emc6d100";
                break;
@@ -1246,10 +1269,11 @@ static int lm85_probe(struct i2c_client *client,
        if (err)
                goto err_kfree;
 
-       /* The ADT7463 has an optional VRM 10 mode where pin 21 is used
+       /* The ADT7463/68 have an optional VRM 10 mode where pin 21 is used
           as a sixth digital VID input rather than an analog input. */
        data->vid = lm85_read_value(client, LM85_REG_VID);
-       if (!(data->type == adt7463 && (data->vid & 0x80)))
+       if (!((data->type == adt7463 || data->type == adt7468) &&
+           (data->vid & 0x80)))
                if ((err = sysfs_create_group(&client->dev.kobj,
                                        &lm85_group_in4)))
                        goto err_remove_files;
@@ -1357,7 +1381,8 @@ static struct lm85_data *lm85_update_device(struct device *dev)
                 * There are 2 additional resolution bits per channel and we
                 * have room for 4, so we shift them to the left.
                 */
-               if (data->type == adm1027 || data->type == adt7463) {
+               if (data->type == adm1027 || data->type == adt7463 ||
+                   data->type == adt7468) {
                        int ext1 = lm85_read_value(client,
                                                   ADM1027_REG_EXTEND_ADC1);
                        int ext2 =  lm85_read_value(client,
@@ -1382,16 +1407,23 @@ static struct lm85_data *lm85_update_device(struct device *dev)
                            lm85_read_value(client, LM85_REG_FAN(i));
                }
 
-               if (!(data->type == adt7463 && (data->vid & 0x80))) {
+               if (!((data->type == adt7463 || data->type == adt7468) &&
+                   (data->vid & 0x80))) {
                        data->in[4] = lm85_read_value(client,
                                      LM85_REG_IN(4));
                }
 
+               if (data->type == adt7468)
+                       data->cfg5 = lm85_read_value(client, ADT7468_REG_CFG5);
+
                for (i = 0; i <= 2; ++i) {
                        data->temp[i] =
                            lm85_read_value(client, LM85_REG_TEMP(i));
                        data->pwm[i] =
                            lm85_read_value(client, LM85_REG_PWM(i));
+
+                       if (IS_ADT7468_OFF64(data))
+                               data->temp[i] -= 64;
                }
 
                data->alarms = lm85_read_value(client, LM85_REG_ALARM1);
@@ -1446,7 +1478,8 @@ static struct lm85_data *lm85_update_device(struct device *dev)
                            lm85_read_value(client, LM85_REG_FAN_MIN(i));
                }
 
-               if (!(data->type == adt7463 && (data->vid & 0x80))) {
+               if (!((data->type == adt7463 || data->type == adt7468) &&
+                   (data->vid & 0x80))) {
                        data->in_min[4] = lm85_read_value(client,
                                          LM85_REG_IN_MIN(4));
                        data->in_max[4] = lm85_read_value(client,
@@ -1481,6 +1514,13 @@ static struct lm85_data *lm85_update_device(struct device *dev)
                            lm85_read_value(client, LM85_REG_AFAN_LIMIT(i));
                        data->zone[i].critical =
                            lm85_read_value(client, LM85_REG_AFAN_CRITICAL(i));
+
+                       if (IS_ADT7468_OFF64(data)) {
+                               data->temp_min[i] -= 64;
+                               data->temp_max[i] -= 64;
+                               data->zone[i].limit -= 64;
+                               data->zone[i].critical -= 64;
+                       }
                }
 
                i = lm85_read_value(client, LM85_REG_AFAN_SPIKE1);
index 228f75723063968c4e77fbb374e5421e5c87e393..3fcf78e906db185187d10c87466786fb3c3280c2 100644 (file)
@@ -365,6 +365,7 @@ static int cpm_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
                pmsg = &msgs[tptr];
                if (pmsg->flags & I2C_M_RD)
                        ret = wait_event_interruptible_timeout(cpm->i2c_wait,
+                               (in_be16(&tbdf[tptr].cbd_sc) & BD_SC_NAK) ||
                                !(in_be16(&rbdf[rptr].cbd_sc) & BD_SC_EMPTY),
                                1 * HZ);
                else
index f4d22ae9d294a48fb69e1f53e4f46d5d496f7ce7..e5a8dae4a2890435f065e2b97017b83179647bcc 100644 (file)
@@ -92,7 +92,7 @@ static void highlander_i2c_setup(struct highlander_i2c_dev *dev)
 static void smbus_write_data(u8 *src, u16 *dst, int len)
 {
        for (; len > 1; len -= 2) {
-               *dst++ = be16_to_cpup((u16 *)src);
+               *dst++ = be16_to_cpup((__be16 *)src);
                src += 2;
        }
 
@@ -103,7 +103,7 @@ static void smbus_write_data(u8 *src, u16 *dst, int len)
 static void smbus_read_data(u16 *src, u8 *dst, int len)
 {
        for (; len > 1; len -= 2) {
-               *(u16 *)dst = cpu_to_be16p(src++);
+               *(__be16 *)dst = cpu_to_be16p(src++);
                dst += 2;
        }
 
index 59ba2086d2f92ffd5aa9c3c866b362ff6232ed3f..a257cd5cd134937f9ef8aaf1f37bebcea46e9bee 100644 (file)
@@ -189,8 +189,6 @@ static void i2c_parport_attach (struct parport *port)
        if (adapter_parm[type].init.val)
                line_set(port, 1, &adapter_parm[type].init);
 
-       parport_release(adapter->pdev);
-
        if (i2c_bit_add_bus(&adapter->adapter) < 0) {
                printk(KERN_ERR "i2c-parport: Unable to register with I2C\n");
                goto ERROR1;
@@ -202,6 +200,7 @@ static void i2c_parport_attach (struct parport *port)
         return;
 
 ERROR1:
+       parport_release(adapter->pdev);
        parport_unregister_device(adapter->pdev);
 ERROR0:
        kfree(adapter);
@@ -221,6 +220,7 @@ static void i2c_parport_detach (struct parport *port)
                        if (adapter_parm[type].init.val)
                                line_set(port, 0, &adapter_parm[type].init);
                                
+                       parport_release(adapter->pdev);
                        parport_unregister_device(adapter->pdev);
                        if (prev)
                                prev->next = adapter->next;
index dcf2045b5222b44aac99b568f7170701ecf0ae78..0bdb2d7f0570bd465e59b4b87ef23dd33db04b1d 100644 (file)
@@ -486,7 +486,7 @@ static enum pmcmsptwi_xfer_result pmcmsptwi_xfer_cmd(
 
        if (cmd->type == MSP_TWI_CMD_WRITE ||
            cmd->type == MSP_TWI_CMD_WRITE_READ) {
-               __be64 tmp = cpu_to_be64p((u64 *)cmd->write_data);
+               u64 tmp = be64_to_cpup((__be64 *)cmd->write_data);
                tmp >>= (MSP_MAX_BYTES_PER_RW - cmd->write_len) * 8;
                dev_dbg(&pmcmsptwi_adapter.dev, "Writing 0x%016llx\n", tmp);
                pmcmsptwi_writel(tmp & 0x00000000ffffffffLL,
index 1fac4e233133879c8b06b07045c5318d87b91840..b7434d24904ebfa9750d655df8ab42f521ec2c40 100644 (file)
@@ -56,6 +56,7 @@ enum s3c24xx_i2c_state {
 struct s3c24xx_i2c {
        spinlock_t              lock;
        wait_queue_head_t       wait;
+       unsigned int            suspended:1;
 
        struct i2c_msg          *msg;
        unsigned int            msg_num;
@@ -507,7 +508,7 @@ static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c, struct i2c_msg *msgs, int
        unsigned long timeout;
        int ret;
 
-       if (!(readl(i2c->regs + S3C2410_IICCON) & S3C2410_IICCON_IRQEN))
+       if (i2c->suspended)
                return -EIO;
 
        ret = s3c24xx_i2c_set_master(i2c);
@@ -986,17 +987,26 @@ static int s3c24xx_i2c_remove(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_PM
+static int s3c24xx_i2c_suspend_late(struct platform_device *dev,
+                                   pm_message_t msg)
+{
+       struct s3c24xx_i2c *i2c = platform_get_drvdata(dev);
+       i2c->suspended = 1;
+       return 0;
+}
+
 static int s3c24xx_i2c_resume(struct platform_device *dev)
 {
        struct s3c24xx_i2c *i2c = platform_get_drvdata(dev);
 
-       if (i2c != NULL)
-               s3c24xx_i2c_init(i2c);
+       i2c->suspended = 0;
+       s3c24xx_i2c_init(i2c);
 
        return 0;
 }
 
 #else
+#define s3c24xx_i2c_suspend_late NULL
 #define s3c24xx_i2c_resume NULL
 #endif
 
@@ -1005,6 +1015,7 @@ static int s3c24xx_i2c_resume(struct platform_device *dev)
 static struct platform_driver s3c2410_i2c_driver = {
        .probe          = s3c24xx_i2c_probe,
        .remove         = s3c24xx_i2c_remove,
+       .suspend_late   = s3c24xx_i2c_suspend_late,
        .resume         = s3c24xx_i2c_resume,
        .driver         = {
                .owner  = THIS_MODULE,
@@ -1015,6 +1026,7 @@ static struct platform_driver s3c2410_i2c_driver = {
 static struct platform_driver s3c2440_i2c_driver = {
        .probe          = s3c24xx_i2c_probe,
        .remove         = s3c24xx_i2c_remove,
+       .suspend_late   = s3c24xx_i2c_suspend_late,
        .resume         = s3c24xx_i2c_resume,
        .driver         = {
                .owner  = THIS_MODULE,
index 640cbb237328196b1b3b22a91fea4b9ee42bf3b1..3384a717fec0d1d864eff63d8d0c798d7edd47cc 100644 (file)
@@ -318,7 +318,8 @@ static int sh_mobile_i2c_isr_rx(struct sh_mobile_i2c_data *pd)
                } else
                        data = i2c_op(pd, OP_RX, 0);
 
-               pd->msg->buf[real_pos] = data;
+               if (real_pos >= 0)
+                       pd->msg->buf[real_pos] = data;
        } while (0);
 
        pd->pos++;
index 28902ebd553905aedd2507d32870d97ea7023ade..e0d56ef2bcb08dd522958e8456369563436e107e 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
+#include <linux/gpio.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 #include <linux/usb.h>
 #include <linux/workqueue.h>
 
 #include <asm/irq.h>
+#include <asm/mach-types.h>
+
 #include <mach/usb.h>
+#include <mach/mux.h>
 
 
 #ifndef        DEBUG
@@ -88,14 +92,9 @@ struct isp1301 {
 
 /*-------------------------------------------------------------------------*/
 
-#ifdef CONFIG_MACH_OMAP_H2
-
 /* board-specific PM hooks */
 
-#include <asm/gpio.h>
-#include <mach/mux.h>
-#include <asm/mach-types.h>
-
+#if defined(CONFIG_MACH_OMAP_H2) || defined(CONFIG_MACH_OMAP_H3)
 
 #if    defined(CONFIG_TPS65010) || defined(CONFIG_TPS65010_MODULE)
 
@@ -133,6 +132,33 @@ static inline void notresponding(struct isp1301 *isp)
 }
 
 
+#endif
+
+#if defined(CONFIG_MACH_OMAP_H4)
+
+static void enable_vbus_draw(struct isp1301 *isp, unsigned mA)
+{
+       /* H4 controls this by DIP switch S2.4; no soft control.
+        * ON means the charger is always enabled.  Leave it OFF
+        * unless the OTG port is used only in B-peripheral mode.
+        */
+}
+
+static void enable_vbus_source(struct isp1301 *isp)
+{
+       /* this board won't supply more than 8mA vbus power.
+        * some boards can switch a 100ma "unit load" (or more).
+        */
+}
+
+
+/* products will deliver OTG messages with LEDs, GUI, etc */
+static inline void notresponding(struct isp1301 *isp)
+{
+       printk(KERN_NOTICE "OTG device not responding.\n");
+}
+
+
 #endif
 
 /*-------------------------------------------------------------------------*/
@@ -334,8 +360,7 @@ static int gadget_suspend(struct isp1301 *isp)
  * NOTE: guaranteeing certain response times might mean we shouldn't
  * share keventd's work queue; a realtime task might be safest.
  */
-void
-isp1301_defer_work(struct isp1301 *isp, int work)
+static void isp1301_defer_work(struct isp1301 *isp, int work)
 {
        int status;
 
@@ -512,7 +537,6 @@ static void update_otg1(struct isp1301 *isp, u8 int_src)
        otg_ctrl &= ~OTG_XCEIV_INPUTS;
        otg_ctrl &= ~(OTG_ID|OTG_ASESSVLD|OTG_VBUSVLD);
 
-
        if (int_src & INTR_SESS_VLD)
                otg_ctrl |= OTG_ASESSVLD;
        else if (isp->otg.state == OTG_STATE_A_WAIT_VFALL) {
@@ -886,11 +910,11 @@ static int otg_probe(struct platform_device *dev)
 
 static int otg_remove(struct platform_device *dev)
 {
-       otg_dev = 0;
+       otg_dev = NULL;
        return 0;
 }
 
-struct platform_driver omap_otg_driver = {
+static struct platform_driver omap_otg_driver = {
        .probe          = otg_probe,
        .remove         = otg_remove,
        .driver         = {
@@ -1212,6 +1236,8 @@ static void isp1301_release(struct device *dev)
 
        isp = dev_get_drvdata(dev);
 
+       /* FIXME -- not with a "new style" driver, it doesn't!! */
+
        /* ugly -- i2c hijacks our memory hook to wait_for_completion() */
        if (isp->i2c_release)
                isp->i2c_release(dev);
@@ -1233,7 +1259,7 @@ static int __exit isp1301_remove(struct i2c_client *i2c)
        otg_unbind(isp);
 #endif
        if (machine_is_omap_h2())
-               omap_free_gpio(2);
+               gpio_free(2);
 
        isp->timer.data = 0;
        set_bit(WORK_STOP, &isp->todo);
@@ -1241,7 +1267,7 @@ static int __exit isp1301_remove(struct i2c_client *i2c)
        flush_scheduled_work();
 
        put_device(&i2c->dev);
-       the_transceiver = 0;
+       the_transceiver = NULL;
 
        return 0;
 }
@@ -1295,7 +1321,7 @@ isp1301_set_host(struct otg_transceiver *otg, struct usb_bus *host)
        if (!host) {
                omap_writew(0, OTG_IRQ_EN);
                power_down(isp);
-               isp->otg.host = 0;
+               isp->otg.host = NULL;
                return 0;
        }
 
@@ -1344,7 +1370,9 @@ static int
 isp1301_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *gadget)
 {
        struct isp1301  *isp = container_of(otg, struct isp1301, otg);
+#ifndef        CONFIG_USB_OTG
        u32 l;
+#endif
 
        if (!otg || isp != the_transceiver)
                return -ENODEV;
@@ -1354,7 +1382,7 @@ isp1301_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *gadget)
                if (!isp->otg.default_a)
                        enable_vbus_draw(isp, 0);
                usb_gadget_vbus_disconnect(isp->otg.gadget);
-               isp->otg.gadget = 0;
+               isp->otg.gadget = NULL;
                power_down(isp);
                return 0;
        }
@@ -1379,7 +1407,7 @@ isp1301_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *gadget)
        power_up(isp);
        isp->otg.state = OTG_STATE_B_IDLE;
 
-       if (machine_is_omap_h2())
+       if (machine_is_omap_h2() || machine_is_omap_h3())
                isp1301_set_bits(isp, ISP1301_MODE_CONTROL_1, MC1_DAT_SE0);
 
        isp1301_set_bits(isp, ISP1301_INTERRUPT_RISING,
@@ -1499,7 +1527,8 @@ isp1301_start_hnp(struct otg_transceiver *dev)
 
 /*-------------------------------------------------------------------------*/
 
-static int __init isp1301_probe(struct i2c_client *i2c)
+static int __init
+isp1301_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
 {
        int                     status;
        struct isp1301          *isp;
@@ -1647,7 +1676,7 @@ module_init(isp_init);
 static void __exit isp_exit(void)
 {
        if (the_transceiver)
-               otg_set_transceiver(0);
+               otg_set_transceiver(NULL);
        i2c_del_driver(&isp1301_driver);
 }
 module_exit(isp_exit);
index 5a485c22660a9cc97d5d72d1e6ccad38e5b0658e..c6a63f46bc152796dbea5c5a930c44eed595f476 100644 (file)
@@ -631,7 +631,7 @@ int i2c_del_adapter(struct i2c_adapter *adap)
 
        /* detach any active clients. This must be done first, because
         * it can fail; in which case we give up. */
-       list_for_each_entry_safe(client, _n, &adap->clients, list) {
+       list_for_each_entry_safe_reverse(client, _n, &adap->clients, list) {
                struct i2c_driver       *driver;
 
                driver = client->driver;
index 6d7401772a8f6d7530a89331a16cace5528b4623..e6857e01d1bad372da0c62480753adbd1266d1f4 100644 (file)
@@ -669,10 +669,12 @@ config BLK_DEV_CELLEB
 
 endif
 
+# TODO: BLK_DEV_IDEDMA_PCI -> BLK_DEV_IDEDMA_SFF
 config BLK_DEV_IDE_PMAC
        tristate "PowerMac on-board IDE support"
        depends on PPC_PMAC && IDE=y
        select IDE_TIMINGS
+       select BLK_DEV_IDEDMA_PCI
        help
          This driver provides support for the on-board IDE controller on
          most of the recent Apple Power Macintoshes and PowerBooks.
@@ -689,16 +691,6 @@ config BLK_DEV_IDE_PMAC_ATA100FIRST
          CD-ROM on hda. This option changes this to more natural hda for
          hard disk and hdc for CD-ROM.
 
-config BLK_DEV_IDEDMA_PMAC
-       bool "PowerMac IDE DMA support"
-       depends on BLK_DEV_IDE_PMAC
-       select BLK_DEV_IDEDMA_PCI
-       help
-         This option allows the driver for the on-board IDE controller on
-         Power Macintoshes and PowerBooks to use DMA (direct memory access)
-         to transfer data to and from memory.  Saying Y is safe and improves
-         performance.
-
 config BLK_DEV_IDE_AU1XXX
        bool "IDE for AMD Alchemy Au1200"
        depends on SOC_AU1200
@@ -912,7 +904,7 @@ config BLK_DEV_UMC8672
 endif
 
 config BLK_DEV_IDEDMA
-       def_bool BLK_DEV_IDEDMA_SFF || BLK_DEV_IDEDMA_PMAC || \
+       def_bool BLK_DEV_IDEDMA_SFF || \
                 BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
 
 endif # IDE
index e56c7b72f9e24ce592e4f776932815bf9dd5bccb..45d2356bb7254ff1fb9f96d71e6c7e1661e4bf18 100644 (file)
@@ -591,7 +591,7 @@ static int __init ali15x3_ide_init(void)
 
 static void __exit ali15x3_ide_exit(void)
 {
-       return pci_unregister_driver(&alim15x3_pci_driver);
+       pci_unregister_driver(&alim15x3_pci_driver);
 }
 
 module_init(ali15x3_ide_init);
index 81ec73134edacfead9286aa479c0a73f1526de05..c6bcd3014a29ec7891b3e11543cd6195ff30e985 100644 (file)
@@ -3,7 +3,7 @@
  * IDE driver for Linux.
  *
  * Copyright (c) 2000-2002 Vojtech Pavlik
- * Copyright (c) 2007 Bartlomiej Zolnierkiewicz
+ * Copyright (c) 2007-2008 Bartlomiej Zolnierkiewicz
  *
  * Based on the work of:
  *      Andre Hedrick
@@ -263,6 +263,15 @@ static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_
                        d.udma_mask = ATA_UDMA5;
        }
 
+       /*
+        * It seems that on some nVidia controllers using AltStatus
+        * register can be unreliable so default to Status register
+        * if the device is in Compatibility Mode.
+        */
+       if (dev->vendor == PCI_VENDOR_ID_NVIDIA &&
+           ide_pci_is_in_compatibility_mode(dev))
+               d.host_flags |= IDE_HFLAG_BROKEN_ALTSTATUS;
+
        printk(KERN_INFO "%s %s: UDMA%s controller\n",
                d.name, pci_name(dev), amd_dma[fls(d.udma_mask) - 1]);
 
index 2d848010499dfed1997e0f0eed459cb0cff847ec..81f70caeb40f1a1394f1ec25023635e26b8a70f3 100644 (file)
@@ -419,7 +419,7 @@ static void icside_setup_ports(hw_regs_t *hw, void __iomem *base,
        hw->chipset = ide_acorn;
 }
 
-static int __init
+static int __devinit
 icside_register_v5(struct icside_state *state, struct expansion_card *ec)
 {
        void __iomem *base;
@@ -473,7 +473,7 @@ static const struct ide_port_info icside_v6_port_info __initdata = {
        .swdma_mask             = ATA_SWDMA2,
 };
 
-static int __init
+static int __devinit
 icside_register_v6(struct icside_state *state, struct expansion_card *ec)
 {
        void __iomem *ioc_base, *easi_base;
index cb199c815b534234bbd115c0ea19df7fea3a48e9..f50210fe558f1cd7ffff023385508be18029d4a1 100644 (file)
@@ -444,6 +444,7 @@ static struct pcmcia_device_id ide_ids[] = {
        PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209),
        PCMCIA_DEVICE_PROD_ID12("STI", "Flash 5.0", 0xbf2df18d, 0x8cb57a0e),
        PCMCIA_MFC_DEVICE_PROD_ID12(1, "SanDisk", "ConnectPlus", 0x7a954bd9, 0x74be00c6),
+       PCMCIA_DEVICE_PROD_ID2("Flash Card", 0x5a362506),
        PCMCIA_DEVICE_NULL,
 };
 MODULE_DEVICE_TABLE(pcmcia, ide_ids);
index 7162d67562af92e1679501a99a9fc09bce69e745..cc35d6dbd41026d02cdc1ab5a32085cc8c63e0db 100644 (file)
@@ -132,10 +132,14 @@ int ide_end_request (ide_drive_t *drive, int uptodate, int nr_sectors)
 }
 EXPORT_SYMBOL(ide_end_request);
 
-static void ide_complete_power_step(ide_drive_t *drive, struct request *rq, u8 stat, u8 error)
+static void ide_complete_power_step(ide_drive_t *drive, struct request *rq)
 {
        struct request_pm_state *pm = rq->data;
 
+#ifdef DEBUG_PM
+       printk(KERN_INFO "%s: complete_power_step(step: %d)\n",
+               drive->name, pm->pm_step);
+#endif
        if (drive->media != ide_disk)
                return;
 
@@ -172,7 +176,7 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *
                /* Not supported? Switch to next step now. */
                if (ata_id_flush_enabled(drive->id) == 0 ||
                    (drive->dev_flags & IDE_DFLAG_WCACHE) == 0) {
-                       ide_complete_power_step(drive, rq, 0, 0);
+                       ide_complete_power_step(drive, rq);
                        return ide_stopped;
                }
                if (ata_id_flush_ext_enabled(drive->id))
@@ -191,7 +195,7 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *
                if (drive->media != ide_disk)
                        pm->pm_step = IDE_PM_RESTORE_DMA;
                else
-                       ide_complete_power_step(drive, rq, 0, 0);
+                       ide_complete_power_step(drive, rq);
                return ide_stopped;
        case IDE_PM_IDLE:               /* Resume step 2 (idle) */
                args->tf.command = ATA_CMD_IDLEIMMEDIATE;
@@ -322,11 +326,8 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err)
                }
        } else if (blk_pm_request(rq)) {
                struct request_pm_state *pm = rq->data;
-#ifdef DEBUG_PM
-               printk("%s: complete_power_step(step: %d, stat: %x, err: %x)\n",
-                       drive->name, rq->pm->pm_step, stat, err);
-#endif
-               ide_complete_power_step(drive, rq, stat, err);
+
+               ide_complete_power_step(drive, rq);
                if (pm->pm_step == IDE_PM_COMPLETED)
                        ide_complete_pm_request(drive, rq);
                return;
@@ -804,7 +805,7 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
                        struct request_pm_state *pm = rq->data;
 #ifdef DEBUG_PM
                        printk("%s: start_power_step(step: %d)\n",
-                               drive->name, rq->pm->pm_step);
+                               drive->name, pm->pm_step);
 #endif
                        startstop = ide_start_power_step(drive, rq);
                        if (startstop == ide_stopped &&
@@ -967,14 +968,13 @@ static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq)
        ide_startstop_t startstop;
        int             loops = 0;
 
-       /* for atari only: POSSIBLY BROKEN HERE(?) */
-       ide_get_lock(ide_intr, hwgroup);
-
        /* caller must own ide_lock */
        BUG_ON(!irqs_disabled());
 
        while (!hwgroup->busy) {
                hwgroup->busy = 1;
+               /* for atari only */
+               ide_get_lock(ide_intr, hwgroup);
                drive = choose_drive(hwgroup);
                if (drive == NULL) {
                        int sleeping = 0;
index 5d6ba14e211df826f794693bf0c682c59a9e4c06..c41c3b9b6f022b89148792c05d9564021ff271da 100644 (file)
@@ -457,18 +457,14 @@ int drive_is_ready (ide_drive_t *drive)
        if (drive->waiting_for_dma)
                return hwif->dma_ops->dma_test_irq(drive);
 
-#if 0
-       /* need to guarantee 400ns since last command was issued */
-       udelay(1);
-#endif
-
        /*
         * We do a passive status test under shared PCI interrupts on
         * cards that truly share the ATA side interrupt, but may also share
         * an interrupt with another pci card/device.  We make no assumptions
         * about possible isa-pnp and pci-pnp issues yet.
         */
-       if (hwif->io_ports.ctl_addr)
+       if (hwif->io_ports.ctl_addr &&
+           (hwif->host_flags & IDE_HFLAG_BROKEN_ALTSTATUS) == 0)
                stat = hwif->tp_ops->read_altstatus(hwif);
        else
                /* Note: this may clear a pending IRQ!! */
@@ -610,6 +606,7 @@ static const struct drive_list_entry ivb_list[] = {
        { "TSSTcorp CDDVDW SH-S202N"    , "SB01"        },
        { "TSSTcorp CDDVDW SH-S202H"    , "SB00"        },
        { "TSSTcorp CDDVDW SH-S202H"    , "SB01"        },
+       { "SAMSUNG SP0822N"             , "WA100-10"    },
        { NULL                          , NULL          }
 };
 
index 1649ea54f76ce7c194f7ec8f5016f132aec79d0f..c55bdbd2231467541d5218de67ae2ff5479f3429 100644 (file)
@@ -266,7 +266,8 @@ static int actual_try_to_identify (ide_drive_t *drive, u8 cmd)
        /* take a deep breath */
        msleep(50);
 
-       if (io_ports->ctl_addr) {
+       if (io_ports->ctl_addr &&
+           (hwif->host_flags & IDE_HFLAG_BROKEN_ALTSTATUS) == 0) {
                a = tp_ops->read_altstatus(hwif);
                s = tp_ops->read_status(hwif);
                if ((a ^ s) & ~ATA_IDX)
index 2e19d6298536f2fb94d3e0a8a1b5fd08877f3734..7c481bb56fab90427001c4ac5f46a0fc367ac449 100644 (file)
@@ -66,7 +66,6 @@ typedef struct pmac_ide_hwif {
        struct macio_dev                *mdev;
        u32                             timings[4];
        volatile u32 __iomem *          *kauai_fcr;
-#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
        /* Those fields are duplicating what is in hwif. We currently
         * can't use the hwif ones because of some assumptions that are
         * beeing done by the generic code about the kind of dma controller
@@ -74,8 +73,6 @@ typedef struct pmac_ide_hwif {
         */
        volatile struct dbdma_regs __iomem *    dma_regs;
        struct dbdma_cmd*               dma_table_cpu;
-#endif
-       
 } pmac_ide_hwif_t;
 
 enum {
@@ -222,8 +219,6 @@ static const char* model_name[] = {
 #define KAUAI_FCR_UATA_RESET_N         0x00000002
 #define KAUAI_FCR_UATA_ENABLE          0x00000001
 
-#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
-
 /* Rounded Multiword DMA timings
  * 
  * I gave up finding a generic formula for all controller
@@ -413,8 +408,6 @@ static int pmac_ide_build_dmatable(ide_drive_t *drive, struct request *rq);
 static void pmac_ide_selectproc(ide_drive_t *drive);
 static void pmac_ide_kauai_selectproc(ide_drive_t *drive);
 
-#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
-
 #define PMAC_IDE_REG(x) \
        ((void __iomem *)((drive)->hwif->io_ports.data_addr + (x)))
 
@@ -584,8 +577,6 @@ pmac_ide_set_pio_mode(ide_drive_t *drive, const u8 pio)
        pmac_ide_do_update_timings(drive);
 }
 
-#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
-
 /*
  * Calculate KeyLargo ATA/66 UDMA timings
  */
@@ -786,7 +777,6 @@ set_timings_mdma(ide_drive_t *drive, int intf_type, u32 *timings, u32 *timings2,
                drive->name, speed & 0xf,  *timings);
 #endif 
 }
-#endif /* #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC */
 
 static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed)
 {
@@ -804,7 +794,6 @@ static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed)
        tl[0] = *timings;
        tl[1] = *timings2;
 
-#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
        if (speed >= XFER_UDMA_0) {
                if (pmif->kind == controller_kl_ata4)
                        ret = set_timings_udma_ata4(&tl[0], speed);
@@ -817,7 +806,7 @@ static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed)
                        ret = -1;
        } else
                set_timings_mdma(drive, pmif->kind, &tl[0], &tl[1], speed);
-#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
+
        if (ret)
                return;
 
@@ -1008,9 +997,7 @@ static const struct ide_port_info pmac_port_info = {
        .chipset                = ide_pmac,
        .tp_ops                 = &pmac_tp_ops,
        .port_ops               = &pmac_ide_port_ops,
-#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
        .dma_ops                = &pmac_dma_ops,
-#endif
        .host_flags             = IDE_HFLAG_SET_PIO_MODE_KEEP_DMA |
                                  IDE_HFLAG_POST_SET_MODE |
                                  IDE_HFLAG_MMIO |
@@ -1182,7 +1169,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
        pmif->regbase = regbase;
        pmif->irq = irq;
        pmif->kauai_fcr = NULL;
-#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
+
        if (macio_resource_count(mdev) >= 2) {
                if (macio_request_resource(mdev, 1, "ide-pmac (dma)"))
                        printk(KERN_WARNING "ide-pmac: can't request DMA "
@@ -1192,7 +1179,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
                        pmif->dma_regs = ioremap(macio_resource_start(mdev, 1), 0x1000);
        } else
                pmif->dma_regs = NULL;
-#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
+
        dev_set_drvdata(&mdev->ofdev.dev, pmif);
 
        memset(&hw, 0, sizeof(hw));
@@ -1300,9 +1287,7 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id)
 
        base = ioremap(rbase, rlen);
        pmif->regbase = (unsigned long) base + 0x2000;
-#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
        pmif->dma_regs = base + 0x1000;
-#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
        pmif->kauai_fcr = base;
        pmif->irq = pdev->irq;
 
@@ -1434,8 +1419,6 @@ out:
        return error;
 }
 
-#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
-
 /*
  * pmac_ide_build_dmatable builds the DBDMA command list
  * for a transfer and sets the DBDMA channel to point to it.
@@ -1723,13 +1706,6 @@ static int __devinit pmac_ide_init_dma(ide_hwif_t *hwif,
 
        return 0;
 }
-#else
-static int __devinit pmac_ide_init_dma(ide_hwif_t *hwif,
-                                      const struct ide_port_info *d)
-{
-       return -EOPNOTSUPP;
-}
-#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
 
 module_init(pmac_ide_probe);
 
index 7defa0ae2014b1f0ea8b1598c0b0f135bd24b0f7..a687a7dfea6fd849a3c79916ba5c8c7facfe8b7b 100644 (file)
@@ -550,7 +550,7 @@ static const struct ide_dma_ops sgiioc4_dma_ops = {
        .dma_timeout            = ide_dma_timeout,
 };
 
-static const struct ide_port_info sgiioc4_port_info __devinitdata = {
+static const struct ide_port_info sgiioc4_port_info __devinitconst = {
        .name                   = DRV_NAME,
        .chipset                = ide_pci,
        .init_dma               = ide_dma_sgiioc4,
@@ -633,7 +633,7 @@ out:
        return ret;
 }
 
-int
+int __devinit
 ioc4_ide_attach_one(struct ioc4_driver_data *idd)
 {
        /* PCI-RT does not bring out IDE connection.
@@ -645,7 +645,7 @@ ioc4_ide_attach_one(struct ioc4_driver_data *idd)
        return pci_init_sgiioc4(idd->idd_pdev);
 }
 
-static struct ioc4_submodule ioc4_ide_submodule = {
+static struct ioc4_submodule __devinitdata ioc4_ide_submodule = {
        .is_name = "IOC4_ide",
        .is_owner = THIS_MODULE,
        .is_probe = ioc4_ide_attach_one,
index 108264de0ac9061c3f5901813bfbd5139153752a..f15e90a453d1c416fb007b046f41ee6bc0c4d866 100644 (file)
@@ -1,5 +1,6 @@
 
 menu "Memory power savings"
+depends on X86_64
 
 config I7300_IDLE_IOAT_CHANNEL
        bool
@@ -7,7 +8,7 @@ config I7300_IDLE_IOAT_CHANNEL
 config I7300_IDLE
        tristate "Intel chipset idle memory power saving driver"
        select I7300_IDLE_IOAT_CHANNEL
-       depends on X86_64 && EXPERIMENTAL
+       depends on EXPERIMENTAL
        help
          Enable memory power savings when idle with certain Intel server
          chipsets. The chipset must have I/O AT support, such as the
index 918ffc4fc8ace2923f660d452d6f389a488c8b25..272543a42a43b0478caf4879c3664782790bafc2 100644 (file)
@@ -46,10 +46,6 @@ static DEFINE_RWLOCK(hl_irqs_lock);
 
 static DEFINE_RWLOCK(addr_space_lock);
 
-/* addr_space list will have zero and max already included as bounds */
-static struct hpsb_address_ops dummy_ops = { NULL, NULL, NULL, NULL };
-static struct hpsb_address_serve dummy_zero_addr, dummy_max_addr;
-
 
 static struct hl_host_info *hl_get_hostinfo(struct hpsb_highlevel *hl,
                                            struct hpsb_host *host)
@@ -481,20 +477,23 @@ int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
        return retval;
 }
 
+static struct hpsb_address_ops dummy_ops;
+
+/* dummy address spaces as lower and upper bounds of the host's a.s. list */
 static void init_hpsb_highlevel(struct hpsb_host *host)
 {
-       INIT_LIST_HEAD(&dummy_zero_addr.host_list);
-       INIT_LIST_HEAD(&dummy_zero_addr.hl_list);
-       INIT_LIST_HEAD(&dummy_max_addr.host_list);
-       INIT_LIST_HEAD(&dummy_max_addr.hl_list);
+       INIT_LIST_HEAD(&host->dummy_zero_addr.host_list);
+       INIT_LIST_HEAD(&host->dummy_zero_addr.hl_list);
+       INIT_LIST_HEAD(&host->dummy_max_addr.host_list);
+       INIT_LIST_HEAD(&host->dummy_max_addr.hl_list);
 
-       dummy_zero_addr.op = dummy_max_addr.op = &dummy_ops;
+       host->dummy_zero_addr.op = host->dummy_max_addr.op = &dummy_ops;
 
-       dummy_zero_addr.start = dummy_zero_addr.end = 0;
-       dummy_max_addr.start = dummy_max_addr.end = ((u64) 1) << 48;
+       host->dummy_zero_addr.start = host->dummy_zero_addr.end = 0;
+       host->dummy_max_addr.start = host->dummy_max_addr.end = ((u64) 1) << 48;
 
-       list_add_tail(&dummy_zero_addr.host_list, &host->addr_space);
-       list_add_tail(&dummy_max_addr.host_list, &host->addr_space);
+       list_add_tail(&host->dummy_zero_addr.host_list, &host->addr_space);
+       list_add_tail(&host->dummy_max_addr.host_list, &host->addr_space);
 }
 
 void highlevel_add_host(struct hpsb_host *host)
index e4e8aeb4d7788d2caf2ef7d5821dbf77a038c27d..dd229950acca4633b3f1d2952d8d40fed2e3ebd5 100644 (file)
@@ -13,6 +13,7 @@ struct module;
 
 #include "ieee1394_types.h"
 #include "csr.h"
+#include "highlevel.h"
 
 struct hpsb_packet;
 struct hpsb_iso;
@@ -72,6 +73,9 @@ struct hpsb_host {
        struct { DECLARE_BITMAP(map, 64); } tl_pool[ALL_NODES];
 
        struct csr_control csr;
+
+       struct hpsb_address_serve dummy_zero_addr;
+       struct hpsb_address_serve dummy_max_addr;
 };
 
 enum devctl_cmd {
index 9e39f73282ee6dd439e76647af5ab5c4755e711a..79ef5fd928ae42c0d8252f1d8bf07c479782be9c 100644 (file)
@@ -115,8 +115,14 @@ static int nodemgr_bus_read(struct csr1212_csr *csr, u64 addr, u16 length,
        return error;
 }
 
+#define OUI_FREECOM_TECHNOLOGIES_GMBH 0x0001db
+
 static int nodemgr_get_max_rom(quadlet_t *bus_info_data, void *__ci)
 {
+       /* Freecom FireWire Hard Drive firmware bug */
+       if (be32_to_cpu(bus_info_data[3]) >> 8 == OUI_FREECOM_TECHNOLOGIES_GMBH)
+               return 0;
+
        return (be32_to_cpu(bus_info_data[2]) >> 8) & 0x3;
 }
 
@@ -1685,6 +1691,7 @@ static int nodemgr_host_thread(void *data)
                g = get_hpsb_generation(host);
                for (i = 0; i < 4 ; i++) {
                        msleep_interruptible(63);
+                       try_to_freeze();
                        if (kthread_should_stop())
                                goto exit;
 
@@ -1725,6 +1732,7 @@ static int nodemgr_host_thread(void *data)
                /* Sleep 3 seconds */
                for (i = 3000/200; i; i--) {
                        msleep_interruptible(200);
+                       try_to_freeze();
                        if (kthread_should_stop())
                                goto exit;
 
index c52f6e6e8af2a8bacac026e4f9974652ee794661..a373c18cf7b8fe8bd077c47b0808abea743e573f 100644 (file)
@@ -400,6 +400,11 @@ static const struct {
                .model_id               = 0x000021,
                .workarounds            = SBP2_WORKAROUND_FIX_CAPACITY,
        },
+       /* iPod mini */ {
+               .firmware_revision      = 0x0a2700,
+               .model_id               = 0x000022,
+               .workarounds            = SBP2_WORKAROUND_FIX_CAPACITY,
+       },
        /* iPod mini */ {
                .firmware_revision      = 0x0a2700,
                .model_id               = 0x000023,
@@ -890,12 +895,13 @@ static void sbp2_host_reset(struct hpsb_host *host)
                return;
 
        read_lock_irqsave(&sbp2_hi_logical_units_lock, flags);
+
        list_for_each_entry(lu, &hi->logical_units, lu_list)
-               if (likely(atomic_read(&lu->state) !=
-                          SBP2LU_STATE_IN_SHUTDOWN)) {
-                       atomic_set(&lu->state, SBP2LU_STATE_IN_RESET);
+               if (atomic_cmpxchg(&lu->state,
+                                  SBP2LU_STATE_RUNNING, SBP2LU_STATE_IN_RESET)
+                   == SBP2LU_STATE_RUNNING)
                        scsi_block_requests(lu->shost);
-               }
+
        read_unlock_irqrestore(&sbp2_hi_logical_units_lock, flags);
 }
 
index ecff98043589c5e15646d28f028e81858d3a6562..160ef482712dea2a3b33a080d5cc721dbbb014dc 100644 (file)
@@ -1102,9 +1102,7 @@ static u64 fw_vers_string_to_u64(struct iwch_dev *iwch_dev)
        char *cp, *next;
        unsigned fw_maj, fw_min, fw_mic;
 
-       rtnl_lock();
        lldev->ethtool_ops->get_drvinfo(lldev, &info);
-       rtnl_unlock();
 
        next = info.fw_version + 1;
        cp = strsep(&next, ".");
@@ -1192,9 +1190,7 @@ static ssize_t show_fw_ver(struct device *dev, struct device_attribute *attr, ch
        struct net_device *lldev = iwch_dev->rdev.t3cdev_p->lldev;
 
        PDBG("%s dev 0x%p\n", __func__, dev);
-       rtnl_lock();
        lldev->ethtool_ops->get_drvinfo(lldev, &info);
-       rtnl_unlock();
        return sprintf(buf, "%s\n", info.fw_version);
 }
 
@@ -1207,9 +1203,7 @@ static ssize_t show_hca(struct device *dev, struct device_attribute *attr,
        struct net_device *lldev = iwch_dev->rdev.t3cdev_p->lldev;
 
        PDBG("%s dev 0x%p\n", __func__, dev);
-       rtnl_lock();
        lldev->ethtool_ops->get_drvinfo(lldev, &info);
-       rtnl_unlock();
        return sprintf(buf, "%s\n", info.driver);
 }
 
index 3e4585c2318a1178262f88232926da5890c00331..19661b2f040630bfd5dded6a63eab3e6a6de19d6 100644 (file)
@@ -745,7 +745,6 @@ int iwch_post_zb_read(struct iwch_qp *qhp)
        wqe->read.rdmaop = T3_READ_REQ;
        wqe->read.reserved[0] = 0;
        wqe->read.reserved[1] = 0;
-       wqe->read.reserved[2] = 0;
        wqe->read.rem_stag = cpu_to_be32(1);
        wqe->read.rem_to = cpu_to_be64(1);
        wqe->read.local_stag = cpu_to_be32(1);
index 4df887af66a527156a4ad9688e319bb308f36ebc..7fc35cf0cddf35285cd91586e6d1aa02145a6a00 100644 (file)
@@ -163,7 +163,8 @@ struct ehca_mod_qp_parm {
 /* struct for tracking if cqes have been reported to the application */
 struct ehca_qmap_entry {
        u16 app_wr_id;
-       u16 reported;
+       u8 reported;
+       u8 cqe_req;
 };
 
 struct ehca_queue_map {
@@ -171,6 +172,7 @@ struct ehca_queue_map {
        unsigned int entries;
        unsigned int tail;
        unsigned int left_to_poll;
+       unsigned int next_wqe_idx;   /* Idx to first wqe to be flushed */
 };
 
 struct ehca_qp {
index cb55be04442c615796fe67c78a822658c8aa0104..757035ea246faff58225747668d38a53f5362e59 100644 (file)
@@ -359,36 +359,48 @@ static void notify_port_conf_change(struct ehca_shca *shca, int port_num)
        *old_attr = new_attr;
 }
 
+/* replay modify_qp for sqps -- return 0 if all is well, 1 if AQP1 destroyed */
+static int replay_modify_qp(struct ehca_sport *sport)
+{
+       int aqp1_destroyed;
+       unsigned long flags;
+
+       spin_lock_irqsave(&sport->mod_sqp_lock, flags);
+
+       aqp1_destroyed = !sport->ibqp_sqp[IB_QPT_GSI];
+
+       if (sport->ibqp_sqp[IB_QPT_SMI])
+               ehca_recover_sqp(sport->ibqp_sqp[IB_QPT_SMI]);
+       if (!aqp1_destroyed)
+               ehca_recover_sqp(sport->ibqp_sqp[IB_QPT_GSI]);
+
+       spin_unlock_irqrestore(&sport->mod_sqp_lock, flags);
+
+       return aqp1_destroyed;
+}
+
 static void parse_ec(struct ehca_shca *shca, u64 eqe)
 {
        u8 ec   = EHCA_BMASK_GET(NEQE_EVENT_CODE, eqe);
        u8 port = EHCA_BMASK_GET(NEQE_PORT_NUMBER, eqe);
        u8 spec_event;
        struct ehca_sport *sport = &shca->sport[port - 1];
-       unsigned long flags;
 
        switch (ec) {
        case 0x30: /* port availability change */
                if (EHCA_BMASK_GET(NEQE_PORT_AVAILABILITY, eqe)) {
-                       int suppress_event;
-                       /* replay modify_qp for sqps */
-                       spin_lock_irqsave(&sport->mod_sqp_lock, flags);
-                       suppress_event = !sport->ibqp_sqp[IB_QPT_GSI];
-                       if (sport->ibqp_sqp[IB_QPT_SMI])
-                               ehca_recover_sqp(sport->ibqp_sqp[IB_QPT_SMI]);
-                       if (!suppress_event)
-                               ehca_recover_sqp(sport->ibqp_sqp[IB_QPT_GSI]);
-                       spin_unlock_irqrestore(&sport->mod_sqp_lock, flags);
-
-                       /* AQP1 was destroyed, ignore this event */
-                       if (suppress_event)
-                               break;
+                       /* only replay modify_qp calls in autodetect mode;
+                        * if AQP1 was destroyed, the port is already down
+                        * again and we can drop the event.
+                        */
+                       if (ehca_nr_ports < 0)
+                               if (replay_modify_qp(sport))
+                                       break;
 
                        sport->port_state = IB_PORT_ACTIVE;
                        dispatch_port_event(shca, port, IB_EVENT_PORT_ACTIVE,
                                            "is active");
-                       ehca_query_sma_attr(shca, port,
-                                           &sport->saved_attr);
+                       ehca_query_sma_attr(shca, port, &sport->saved_attr);
                } else {
                        sport->port_state = IB_PORT_DOWN;
                        dispatch_port_event(shca, port, IB_EVENT_PORT_ERR,
index bb02a86aa5269d7b3c22a85aa23d1caaf0411e7e..bec7e0249358f6cb876729d9070c51d94f6e29e7 100644 (file)
@@ -994,8 +994,7 @@ static int ehca_mem_notifier(struct notifier_block *nb,
                        if (printk_timed_ratelimit(&ehca_dmem_warn_time,
                                                   30 * 1000))
                                ehca_gen_err("DMEM operations are not allowed"
-                                            "as long as an ehca adapter is"
-                                            "attached to the LPAR");
+                                            "in conjunction with eHCA");
                        return NOTIFY_BAD;
                }
        }
index 4d54b9f6456789cb17fa07e93481cebb322b2d81..cadbf0cdd910e996ddca5029e6a66dcbe27382a9 100644 (file)
@@ -435,9 +435,13 @@ static void reset_queue_map(struct ehca_queue_map *qmap)
 {
        int i;
 
-       qmap->tail = 0;
-       for (i = 0; i < qmap->entries; i++)
+       qmap->tail = qmap->entries - 1;
+       qmap->left_to_poll = 0;
+       qmap->next_wqe_idx = 0;
+       for (i = 0; i < qmap->entries; i++) {
                qmap->map[i].reported = 1;
+               qmap->map[i].cqe_req = 0;
+       }
 }
 
 /*
@@ -860,6 +864,11 @@ static struct ehca_qp *internal_create_qp(
        if (qp_type == IB_QPT_GSI) {
                h_ret = ehca_define_sqp(shca, my_qp, init_attr);
                if (h_ret != H_SUCCESS) {
+                       kfree(my_qp->mod_qp_parm);
+                       my_qp->mod_qp_parm = NULL;
+                       /* the QP pointer is no longer valid */
+                       shca->sport[init_attr->port_num - 1].ibqp_sqp[qp_type] =
+                               NULL;
                        ret = ehca2ib_return_code(h_ret);
                        goto create_qp_exit6;
                }
@@ -1116,6 +1125,7 @@ static int calc_left_cqes(u64 wqe_p, struct ipz_queue *ipz_queue,
        void *wqe_v;
        u64 q_ofs;
        u32 wqe_idx;
+       unsigned int tail_idx;
 
        /* convert real to abs address */
        wqe_p = wqe_p & (~(1UL << 63));
@@ -1128,12 +1138,17 @@ static int calc_left_cqes(u64 wqe_p, struct ipz_queue *ipz_queue,
                return -EFAULT;
        }
 
+       tail_idx = (qmap->tail + 1) % qmap->entries;
        wqe_idx = q_ofs / ipz_queue->qe_size;
-       if (wqe_idx < qmap->tail)
-               qmap->left_to_poll = (qmap->entries - qmap->tail) + wqe_idx;
-       else
-               qmap->left_to_poll = wqe_idx - qmap->tail;
 
+       /* check all processed wqes, whether a cqe is requested or not */
+       while (tail_idx != wqe_idx) {
+               if (qmap->map[tail_idx].cqe_req)
+                       qmap->left_to_poll++;
+               tail_idx = (tail_idx + 1) % qmap->entries;
+       }
+       /* save index in queue, where we have to start flushing */
+       qmap->next_wqe_idx = wqe_idx;
        return 0;
 }
 
@@ -1180,10 +1195,14 @@ static int check_for_left_cqes(struct ehca_qp *my_qp, struct ehca_shca *shca)
        } else {
                spin_lock_irqsave(&my_qp->send_cq->spinlock, flags);
                my_qp->sq_map.left_to_poll = 0;
+               my_qp->sq_map.next_wqe_idx = (my_qp->sq_map.tail + 1) %
+                                               my_qp->sq_map.entries;
                spin_unlock_irqrestore(&my_qp->send_cq->spinlock, flags);
 
                spin_lock_irqsave(&my_qp->recv_cq->spinlock, flags);
                my_qp->rq_map.left_to_poll = 0;
+               my_qp->rq_map.next_wqe_idx = (my_qp->rq_map.tail + 1) %
+                                               my_qp->rq_map.entries;
                spin_unlock_irqrestore(&my_qp->recv_cq->spinlock, flags);
        }
 
index 64928079eafa93bc3a73b13aed73bd6ee57b80bb..00a648f4316c66b0f4585cfbf63db7792fee2c3d 100644 (file)
@@ -179,6 +179,7 @@ static inline int ehca_write_swqe(struct ehca_qp *qp,
 
        qmap_entry->app_wr_id = get_app_wr_id(send_wr->wr_id);
        qmap_entry->reported = 0;
+       qmap_entry->cqe_req = 0;
 
        switch (send_wr->opcode) {
        case IB_WR_SEND:
@@ -203,8 +204,10 @@ static inline int ehca_write_swqe(struct ehca_qp *qp,
 
        if ((send_wr->send_flags & IB_SEND_SIGNALED ||
            qp->init_attr.sq_sig_type == IB_SIGNAL_ALL_WR)
-           && !hidden)
+           && !hidden) {
                wqe_p->wr_flag |= WQE_WRFLAG_REQ_SIGNAL_COM;
+               qmap_entry->cqe_req = 1;
+       }
 
        if (send_wr->opcode == IB_WR_SEND_WITH_IMM ||
            send_wr->opcode == IB_WR_RDMA_WRITE_WITH_IMM) {
@@ -569,6 +572,7 @@ static int internal_post_recv(struct ehca_qp *my_qp,
                qmap_entry = &my_qp->rq_map.map[rq_map_idx];
                qmap_entry->app_wr_id = get_app_wr_id(cur_recv_wr->wr_id);
                qmap_entry->reported = 0;
+               qmap_entry->cqe_req = 1;
 
                wqe_cnt++;
        } /* eof for cur_recv_wr */
@@ -706,27 +710,34 @@ repoll:
                goto repoll;
        wc->qp = &my_qp->ib_qp;
 
+       qmap_tail_idx = get_app_wr_id(cqe->work_request_id);
+       if (!(cqe->w_completion_flags & WC_SEND_RECEIVE_BIT))
+               /* We got a send completion. */
+               qmap = &my_qp->sq_map;
+       else
+               /* We got a receive completion. */
+               qmap = &my_qp->rq_map;
+
+       /* advance the tail pointer */
+       qmap->tail = qmap_tail_idx;
+
        if (is_error) {
                /*
                 * set left_to_poll to 0 because in error state, we will not
                 * get any additional CQEs
                 */
-               ehca_add_to_err_list(my_qp, 1);
+               my_qp->sq_map.next_wqe_idx = (my_qp->sq_map.tail + 1) %
+                                               my_qp->sq_map.entries;
                my_qp->sq_map.left_to_poll = 0;
+               ehca_add_to_err_list(my_qp, 1);
 
+               my_qp->rq_map.next_wqe_idx = (my_qp->rq_map.tail + 1) %
+                                               my_qp->rq_map.entries;
+               my_qp->rq_map.left_to_poll = 0;
                if (HAS_RQ(my_qp))
                        ehca_add_to_err_list(my_qp, 0);
-               my_qp->rq_map.left_to_poll = 0;
        }
 
-       qmap_tail_idx = get_app_wr_id(cqe->work_request_id);
-       if (!(cqe->w_completion_flags & WC_SEND_RECEIVE_BIT))
-               /* We got a send completion. */
-               qmap = &my_qp->sq_map;
-       else
-               /* We got a receive completion. */
-               qmap = &my_qp->rq_map;
-
        qmap_entry = &qmap->map[qmap_tail_idx];
        if (qmap_entry->reported) {
                ehca_warn(cq->device, "Double cqe on qp_num=%#x",
@@ -738,10 +749,6 @@ repoll:
        wc->wr_id = replace_wr_id(cqe->work_request_id, qmap_entry->app_wr_id);
        qmap_entry->reported = 1;
 
-       /* this is a proper completion, we need to advance the tail pointer */
-       if (++qmap->tail == qmap->entries)
-               qmap->tail = 0;
-
        /* if left_to_poll is decremented to 0, add the QP to the error list */
        if (qmap->left_to_poll > 0) {
                qmap->left_to_poll--;
@@ -805,13 +812,14 @@ static int generate_flush_cqes(struct ehca_qp *my_qp, struct ib_cq *cq,
        else
                qmap = &my_qp->rq_map;
 
-       qmap_entry = &qmap->map[qmap->tail];
+       qmap_entry = &qmap->map[qmap->next_wqe_idx];
 
        while ((nr < num_entries) && (qmap_entry->reported == 0)) {
                /* generate flush CQE */
+
                memset(wc, 0, sizeof(*wc));
 
-               offset = qmap->tail * ipz_queue->qe_size;
+               offset = qmap->next_wqe_idx * ipz_queue->qe_size;
                wqe = (struct ehca_wqe *)ipz_qeit_calc(ipz_queue, offset);
                if (!wqe) {
                        ehca_err(cq->device, "Invalid wqe offset=%#lx on "
@@ -850,11 +858,12 @@ static int generate_flush_cqes(struct ehca_qp *my_qp, struct ib_cq *cq,
 
                wc->qp = &my_qp->ib_qp;
 
-               /* mark as reported and advance tail pointer */
+               /* mark as reported and advance next_wqe pointer */
                qmap_entry->reported = 1;
-               if (++qmap->tail == qmap->entries)
-                       qmap->tail = 0;
-               qmap_entry = &qmap->map[qmap->tail];
+               qmap->next_wqe_idx++;
+               if (qmap->next_wqe_idx == qmap->entries)
+                       qmap->next_wqe_idx = 0;
+               qmap_entry = &qmap->map[qmap->next_wqe_idx];
 
                wc++; nr++;
        }
index fc0f6d9e6030f04f5412975f4d2102c67267cbd7..2296832f94da868e3c2f884bfbcd2d9e94cc4fed 100644 (file)
@@ -156,7 +156,7 @@ bail:
 /**
  * ipath_get_rwqe - copy the next RWQE into the QP's RWQE
  * @qp: the QP
- * @wr_id_only: update wr_id only, not SGEs
+ * @wr_id_only: update qp->r_wr_id only, not qp->r_sge
  *
  * Return 0 if no RWQE is available, otherwise return 1.
  *
@@ -173,8 +173,6 @@ int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only)
        u32 tail;
        int ret;
 
-       qp->r_sge.sg_list = qp->r_sg_list;
-
        if (qp->ibqp.srq) {
                srq = to_isrq(qp->ibqp.srq);
                handler = srq->ibsrq.event_handler;
@@ -206,8 +204,10 @@ int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only)
                wqe = get_rwqe_ptr(rq, tail);
                if (++tail >= rq->size)
                        tail = 0;
-       } while (!wr_id_only && !ipath_init_sge(qp, wqe, &qp->r_len,
-                                               &qp->r_sge));
+               if (wr_id_only)
+                       break;
+               qp->r_sge.sg_list = qp->r_sg_list;
+       } while (!ipath_init_sge(qp, wqe, &qp->r_len, &qp->r_sge));
        qp->r_wr_id = wqe->wr_id;
        wq->tail = tail;
 
index d0866a3636e257b402427588346bb9be28f35fbb..18308494a195bb0d4af1a068ddfd319a3f7b3488 100644 (file)
@@ -343,6 +343,7 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
 {
        struct mlx4_ib_dev *dev = to_mdev(ibcq->device);
        struct mlx4_ib_cq *cq = to_mcq(ibcq);
+       struct mlx4_mtt mtt;
        int outst_cqe;
        int err;
 
@@ -376,10 +377,13 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
                        goto out;
        }
 
+       mtt = cq->buf.mtt;
+
        err = mlx4_cq_resize(dev->dev, &cq->mcq, entries, &cq->resize_buf->buf.mtt);
        if (err)
                goto err_buf;
 
+       mlx4_mtt_cleanup(dev->dev, &mtt);
        if (ibcq->uobject) {
                cq->buf      = cq->resize_buf->buf;
                cq->ibcq.cqe = cq->resize_buf->cqe;
@@ -406,6 +410,7 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
        goto out;
 
 err_buf:
+       mlx4_mtt_cleanup(dev->dev, &cq->resize_buf->buf.mtt);
        if (!ibcq->uobject)
                mlx4_ib_free_cq_buf(dev, &cq->resize_buf->buf,
                                    cq->resize_buf->cqe);
index 87f5c5a87b98fa499e55115db660c8e72dd56fd8..8e4d26d56a95f7e0571133915f35476e1860b541 100644 (file)
@@ -205,6 +205,7 @@ struct ib_mr *mlx4_ib_alloc_fast_reg_mr(struct ib_pd *pd,
                goto err_mr;
 
        mr->ibmr.rkey = mr->ibmr.lkey = mr->mmr.key;
+       mr->umem = NULL;
 
        return &mr->ibmr;
 
index a2b04d62b1a46d56efd056ad223ccdbc4e77abad..aa1dc41f04c8fae5a8765bc9eb6853d9c28f4bf0 100644 (file)
@@ -95,6 +95,10 @@ unsigned int wqm_quanta = 0x10000;
 module_param(wqm_quanta, int, 0644);
 MODULE_PARM_DESC(wqm_quanta, "WQM quanta");
 
+static unsigned int limit_maxrdreqsz;
+module_param(limit_maxrdreqsz, bool, 0644);
+MODULE_PARM_DESC(limit_maxrdreqsz, "Limit max read request size to 256 Bytes");
+
 LIST_HEAD(nes_adapter_list);
 static LIST_HEAD(nes_dev_list);
 
@@ -588,6 +592,18 @@ static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_i
                                                nesdev->nesadapter->port_count;
        }
 
+       if ((limit_maxrdreqsz ||
+            ((nesdev->nesadapter->phy_type[0] == NES_PHY_TYPE_GLADIUS) &&
+             (hw_rev == NE020_REV1))) &&
+           (pcie_get_readrq(pcidev) > 256)) {
+               if (pcie_set_readrq(pcidev, 256))
+                       printk(KERN_ERR PFX "Unable to set max read request"
+                               " to 256 bytes\n");
+               else
+                       nes_debug(NES_DBG_INIT, "Max read request size set"
+                               " to 256 bytes\n");
+       }
+
        tasklet_init(&nesdev->dpc_tasklet, nes_dpc, (unsigned long)nesdev);
 
        /* bring up the Control QP */
index 610b9d859597d2a1ecc9dca6ed54192025b6565c..bc0b4de04450f29243f2144b255e3345e5dbd434 100644 (file)
@@ -40,6 +40,7 @@
 #define NES_PHY_TYPE_ARGUS     4
 #define NES_PHY_TYPE_PUMA_1G   5
 #define NES_PHY_TYPE_PUMA_10G  6
+#define NES_PHY_TYPE_GLADIUS   7
 
 #define NES_MULTICAST_PF_MAX 8
 
index 932e56fcf77413fd7f4068a25f4be24dccf22b59..d36c9a0bf1bb823619a04a8ce53902281b437cf7 100644 (file)
@@ -220,14 +220,14 @@ static int nes_bind_mw(struct ib_qp *ibqp, struct ib_mw *ibmw,
        if (nesqp->ibqp_state > IB_QPS_RTS)
                return -EINVAL;
 
-               spin_lock_irqsave(&nesqp->lock, flags);
+       spin_lock_irqsave(&nesqp->lock, flags);
 
        head = nesqp->hwqp.sq_head;
        qsize = nesqp->hwqp.sq_tail;
 
        /* Check for SQ overflow */
        if (((head + (2 * qsize) - nesqp->hwqp.sq_tail) % qsize) == (qsize - 1)) {
-                       spin_unlock_irqrestore(&nesqp->lock, flags);
+               spin_unlock_irqrestore(&nesqp->lock, flags);
                return -EINVAL;
        }
 
@@ -269,7 +269,7 @@ static int nes_bind_mw(struct ib_qp *ibqp, struct ib_mw *ibmw,
        nes_write32(nesdev->regs+NES_WQE_ALLOC,
                        (1 << 24) | 0x00800000 | nesqp->hwqp.qp_id);
 
-               spin_unlock_irqrestore(&nesqp->lock, flags);
+       spin_unlock_irqrestore(&nesqp->lock, flags);
 
        return 0;
 }
@@ -349,7 +349,7 @@ static struct ib_fmr *nes_alloc_fmr(struct ib_pd *ibpd,
                        if (nesfmr->nesmr.pbls_used > nesadapter->free_4kpbl) {
                                spin_unlock_irqrestore(&nesadapter->pbl_lock, flags);
                                ret = -ENOMEM;
-                               goto failed_vpbl_alloc;
+                               goto failed_vpbl_avail;
                        } else {
                                nesadapter->free_4kpbl -= nesfmr->nesmr.pbls_used;
                        }
@@ -357,7 +357,7 @@ static struct ib_fmr *nes_alloc_fmr(struct ib_pd *ibpd,
                        if (nesfmr->nesmr.pbls_used > nesadapter->free_256pbl) {
                                spin_unlock_irqrestore(&nesadapter->pbl_lock, flags);
                                ret = -ENOMEM;
-                               goto failed_vpbl_alloc;
+                               goto failed_vpbl_avail;
                        } else {
                                nesadapter->free_256pbl -= nesfmr->nesmr.pbls_used;
                        }
@@ -391,14 +391,14 @@ static struct ib_fmr *nes_alloc_fmr(struct ib_pd *ibpd,
                        goto failed_vpbl_alloc;
                }
 
-               nesfmr->root_vpbl.leaf_vpbl = kzalloc(sizeof(*nesfmr->root_vpbl.leaf_vpbl)*1024, GFP_KERNEL);
+               nesfmr->leaf_pbl_cnt = nesfmr->nesmr.pbls_used-1;
+               nesfmr->root_vpbl.leaf_vpbl = kzalloc(sizeof(*nesfmr->root_vpbl.leaf_vpbl)*1024, GFP_ATOMIC);
                if (!nesfmr->root_vpbl.leaf_vpbl) {
                        spin_unlock_irqrestore(&nesadapter->pbl_lock, flags);
                        ret = -ENOMEM;
                        goto failed_leaf_vpbl_alloc;
                }
 
-               nesfmr->leaf_pbl_cnt = nesfmr->nesmr.pbls_used-1;
                nes_debug(NES_DBG_MR, "two level pbl, root_vpbl.pbl_vbase=%p"
                                " leaf_pbl_cnt=%d root_vpbl.leaf_vpbl=%p\n",
                                nesfmr->root_vpbl.pbl_vbase, nesfmr->leaf_pbl_cnt, nesfmr->root_vpbl.leaf_vpbl);
@@ -519,6 +519,16 @@ static struct ib_fmr *nes_alloc_fmr(struct ib_pd *ibpd,
                                nesfmr->root_vpbl.pbl_pbase);
 
        failed_vpbl_alloc:
+       if (nesfmr->nesmr.pbls_used != 0) {
+               spin_lock_irqsave(&nesadapter->pbl_lock, flags);
+               if (nesfmr->nesmr.pbl_4k)
+                       nesadapter->free_4kpbl += nesfmr->nesmr.pbls_used;
+               else
+                       nesadapter->free_256pbl += nesfmr->nesmr.pbls_used;
+               spin_unlock_irqrestore(&nesadapter->pbl_lock, flags);
+       }
+
+failed_vpbl_avail:
        kfree(nesfmr);
 
        failed_fmr_alloc:
@@ -534,18 +544,14 @@ static struct ib_fmr *nes_alloc_fmr(struct ib_pd *ibpd,
  */
 static int nes_dealloc_fmr(struct ib_fmr *ibfmr)
 {
+       unsigned long flags;
        struct nes_mr *nesmr = to_nesmr_from_ibfmr(ibfmr);
        struct nes_fmr *nesfmr = to_nesfmr(nesmr);
        struct nes_vnic *nesvnic = to_nesvnic(ibfmr->device);
        struct nes_device *nesdev = nesvnic->nesdev;
-       struct nes_mr temp_nesmr = *nesmr;
+       struct nes_adapter *nesadapter = nesdev->nesadapter;
        int i = 0;
 
-       temp_nesmr.ibmw.device = ibfmr->device;
-       temp_nesmr.ibmw.pd = ibfmr->pd;
-       temp_nesmr.ibmw.rkey = ibfmr->rkey;
-       temp_nesmr.ibmw.uobject = NULL;
-
        /* free the resources */
        if (nesfmr->leaf_pbl_cnt == 0) {
                /* single PBL case */
@@ -561,8 +567,24 @@ static int nes_dealloc_fmr(struct ib_fmr *ibfmr)
                pci_free_consistent(nesdev->pcidev, 8192, nesfmr->root_vpbl.pbl_vbase,
                                nesfmr->root_vpbl.pbl_pbase);
        }
+       nesmr->ibmw.device = ibfmr->device;
+       nesmr->ibmw.pd = ibfmr->pd;
+       nesmr->ibmw.rkey = ibfmr->rkey;
+       nesmr->ibmw.uobject = NULL;
 
-       return nes_dealloc_mw(&temp_nesmr.ibmw);
+       if (nesfmr->nesmr.pbls_used != 0) {
+               spin_lock_irqsave(&nesadapter->pbl_lock, flags);
+               if (nesfmr->nesmr.pbl_4k) {
+                       nesadapter->free_4kpbl += nesfmr->nesmr.pbls_used;
+                       WARN_ON(nesadapter->free_4kpbl > nesadapter->max_4kpbl);
+               } else {
+                       nesadapter->free_256pbl += nesfmr->nesmr.pbls_used;
+                       WARN_ON(nesadapter->free_256pbl > nesadapter->max_256pbl);
+               }
+               spin_unlock_irqrestore(&nesadapter->pbl_lock, flags);
+       }
+
+       return nes_dealloc_mw(&nesmr->ibmw);
 }
 
 
@@ -1595,7 +1617,7 @@ static struct ib_cq *nes_create_cq(struct ib_device *ibdev, int entries,
                nes_ucontext->mcrqf = req.mcrqf;
                if (nes_ucontext->mcrqf) {
                        if (nes_ucontext->mcrqf & 0x80000000)
-                               nescq->hw_cq.cq_number = nesvnic->nic.qp_id + 12 + (nes_ucontext->mcrqf & 0xf) - 1;
+                               nescq->hw_cq.cq_number = nesvnic->nic.qp_id + 28 + 2 * ((nes_ucontext->mcrqf & 0xf) - 1);
                        else if (nes_ucontext->mcrqf & 0x40000000)
                                nescq->hw_cq.cq_number = nes_ucontext->mcrqf & 0xffff;
                        else
@@ -3212,7 +3234,7 @@ static int nes_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr,
        if (nesqp->ibqp_state > IB_QPS_RTS)
                return -EINVAL;
 
-               spin_lock_irqsave(&nesqp->lock, flags);
+       spin_lock_irqsave(&nesqp->lock, flags);
 
        head = nesqp->hwqp.sq_head;
 
@@ -3337,7 +3359,7 @@ static int nes_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr,
                                (counter << 24) | 0x00800000 | nesqp->hwqp.qp_id);
        }
 
-               spin_unlock_irqrestore(&nesqp->lock, flags);
+       spin_unlock_irqrestore(&nesqp->lock, flags);
 
        if (err)
                *bad_wr = ib_wr;
@@ -3368,7 +3390,7 @@ static int nes_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *ib_wr,
        if (nesqp->ibqp_state > IB_QPS_RTS)
                return -EINVAL;
 
-               spin_lock_irqsave(&nesqp->lock, flags);
+       spin_lock_irqsave(&nesqp->lock, flags);
 
        head = nesqp->hwqp.rq_head;
 
@@ -3421,7 +3443,7 @@ static int nes_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *ib_wr,
                nes_write32(nesdev->regs+NES_WQE_ALLOC, (counter<<24) | nesqp->hwqp.qp_id);
        }
 
-               spin_unlock_irqrestore(&nesqp->lock, flags);
+       spin_unlock_irqrestore(&nesqp->lock, flags);
 
        if (err)
                *bad_wr = ib_wr;
@@ -3453,7 +3475,7 @@ static int nes_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry)
 
        nes_debug(NES_DBG_CQ, "\n");
 
-               spin_lock_irqsave(&nescq->lock, flags);
+       spin_lock_irqsave(&nescq->lock, flags);
 
        head = nescq->hw_cq.cq_head;
        cq_size = nescq->hw_cq.cq_size;
@@ -3562,7 +3584,7 @@ static int nes_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry)
        nes_debug(NES_DBG_CQ, "Reporting %u completions for CQ%u.\n",
                        cqe_count, nescq->hw_cq.cq_number);
 
-               spin_unlock_irqrestore(&nescq->lock, flags);
+       spin_unlock_irqrestore(&nescq->lock, flags);
 
        return cqe_count;
 }
index fddded7900d1c3df5589f9090d238238e92ad72c..85257f6b9576f77b6a5e24820ad895267d65e50c 100644 (file)
@@ -106,12 +106,13 @@ int ipoib_open(struct net_device *dev)
 
        ipoib_dbg(priv, "bringing up interface\n");
 
-       napi_enable(&priv->napi);
        set_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags);
 
        if (ipoib_pkey_dev_delay_open(dev))
                return 0;
 
+       napi_enable(&priv->napi);
+
        if (ipoib_ib_dev_open(dev)) {
                napi_disable(&priv->napi);
                return -EINVAL;
@@ -546,6 +547,7 @@ static int path_rec_start(struct net_device *dev,
        if (path->query_id < 0) {
                ipoib_warn(priv, "ib_sa_path_rec_get failed: %d\n", path->query_id);
                path->query = NULL;
+               complete(&path->done);
                return path->query_id;
        }
 
@@ -662,7 +664,7 @@ static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev,
                        skb_push(skb, sizeof *phdr);
                        __skb_queue_tail(&path->queue, skb);
 
-                       if (path_rec_start(dev, path)) {
+                       if (!path->query && path_rec_start(dev, path)) {
                                spin_unlock_irqrestore(&priv->lock, flags);
                                path_free(dev, path);
                                return;
index 6790e975a98c327fd038198f535be9fc9059ab5b..bc4e40f3ede7303d97816a6cbf8588c8f22118d2 100644 (file)
@@ -397,8 +397,9 @@ static int ml_ff_playback(struct input_dev *dev, int effect_id, int value)
 {
        struct ml_device *ml = dev->ff->private;
        struct ml_effect_state *state = &ml->states[effect_id];
+       unsigned long flags;
 
-       spin_lock_bh(&ml->timer_lock);
+       spin_lock_irqsave(&ml->timer_lock, flags);
 
        if (value > 0) {
                debug("initiated play");
@@ -424,7 +425,7 @@ static int ml_ff_playback(struct input_dev *dev, int effect_id, int value)
                ml_play_effects(ml);
        }
 
-       spin_unlock_bh(&ml->timer_lock);
+       spin_unlock_irqrestore(&ml->timer_lock, flags);
 
        return 0;
 }
index 22016ca153518b8c9535b11f215c59e1d0008880..379b7ff354ec7ba0036d3e1d1072b51eac61f1c3 100644 (file)
@@ -824,7 +824,7 @@ static void atkbd_disconnect(struct serio *serio)
        atkbd_disable(atkbd);
 
        /* make sure we don't have a command in flight */
-       flush_scheduled_work();
+       cancel_delayed_work_sync(&atkbd->event_work);
 
        sysfs_remove_group(&serio->dev.kobj, &atkbd_attribute_group);
        input_unregister_device(atkbd->dev);
@@ -867,6 +867,22 @@ static void atkbd_hp_keymap_fixup(struct atkbd *atkbd)
                                        atkbd->force_release_mask);
 }
 
+/*
+ * Inventec system with broken key release on volume keys
+ */
+static void atkbd_inventec_keymap_fixup(struct atkbd *atkbd)
+{
+       const unsigned int forced_release_keys[] = {
+               0xae, 0xb0,
+       };
+       int i;
+
+       if (atkbd->set == 2)
+               for (i = 0; i < ARRAY_SIZE(forced_release_keys); i++)
+                       __set_bit(forced_release_keys[i],
+                                 atkbd->force_release_mask);
+}
+
 /*
  * atkbd_set_keycode_table() initializes keyboard's keycode table
  * according to the selected scancode set
@@ -1468,6 +1484,15 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = {
                .callback = atkbd_setup_fixup,
                .driver_data = atkbd_hp_keymap_fixup,
        },
+       {
+               .ident = "Inventec Symphony",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "INVENTEC"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "SYMPHONY 6.0/7.0"),
+               },
+               .callback = atkbd_setup_fixup,
+               .driver_data = atkbd_inventec_keymap_fixup,
+       },
        { }
 };
 
index bce160f4349bb657947acf5a696e292a28fd8e21..86457feccfc4f2fdbf3834adea42b1a32ed9e0d6 100644 (file)
@@ -42,7 +42,7 @@
 
 static char *phone = "kip1000";
 module_param(phone, charp, S_IRUSR);
-MODULE_PARM_DESC(phone, "Phone name {kip1000, gtalk, usbph01}");
+MODULE_PARM_DESC(phone, "Phone name {kip1000, gtalk, usbph01, atcom}");
 
 enum {
        /* HID Registers */
@@ -258,6 +258,37 @@ static unsigned short keymap_usbph01(int scancode)
        }
 }
 
+/*
+ * Keymap for ATCom AU-100
+ * http://www.atcom.cn/En_products_AU100.html
+ * http://www.packetizer.com/products/au100/
+ * http://www.voip-info.org/wiki/view/AU-100
+ *
+ * Contributed by daniel@gimpelevich.san-francisco.ca.us
+ */
+static unsigned short keymap_atcom(int scancode)
+{
+       switch (scancode) {                             /* phone key:   */
+       case 0x82: return KEY_NUMERIC_0;                /*   0          */
+       case 0x11: return KEY_NUMERIC_1;                /*   1          */
+       case 0x12: return KEY_NUMERIC_2;                /*   2          */
+       case 0x14: return KEY_NUMERIC_3;                /*   3          */
+       case 0x21: return KEY_NUMERIC_4;                /*   4          */
+       case 0x22: return KEY_NUMERIC_5;                /*   5          */
+       case 0x24: return KEY_NUMERIC_6;                /*   6          */
+       case 0x41: return KEY_NUMERIC_7;                /*   7          */
+       case 0x42: return KEY_NUMERIC_8;                /*   8          */
+       case 0x44: return KEY_NUMERIC_9;                /*   9          */
+       case 0x84: return KEY_NUMERIC_POUND;            /*   #          */
+       case 0x81: return KEY_NUMERIC_STAR;             /*   *          */
+       case 0x18: return KEY_ENTER;                    /*   pickup     */
+       case 0x28: return KEY_ESC;                      /*   hangup     */
+       case 0x48: return KEY_LEFT;                     /* left arrow   */
+       case 0x88: return KEY_RIGHT;                    /* right arrow  */
+       default:   return special_keymap(scancode);
+       }
+}
+
 static unsigned short (*keymap)(int) = keymap_kip1000;
 
 /*
@@ -840,6 +871,10 @@ static int __init cm109_select_keymap(void)
                keymap = keymap_usbph01;
                printk(KERN_INFO KBUILD_MODNAME ": "
                        "Keymap for Allied-Telesis Corega USBPH01 phone loaded\n");
+       } else if (!strcasecmp(phone, "atcom")) {
+               keymap = keymap_atcom;
+               printk(KERN_INFO KBUILD_MODNAME ": "
+                       "Keymap for ATCom AU-100 phone loaded\n");
        } else {
                printk(KERN_ERR KBUILD_MODNAME ": "
                        "Unsupported phone: %s\n", phone);
index e82d34201e97e3c26daeb8fc85f9dcf69be0177c..88f04bf2ad6cfe677d13e9f3d73da6d5379d2186 100644 (file)
@@ -125,7 +125,7 @@ static void hgpk_spewing_hack(struct psmouse *psmouse,
  */
 static int hgpk_validate_byte(unsigned char *packet)
 {
-       return (packet[0] & 0x0C) == 0x08;
+       return (packet[0] & 0x0C) != 0x08;
 }
 
 static void hgpk_process_packet(struct psmouse *psmouse)
index eec375cd10e6ef89546e8a51314bf647411a47ea..29e686388a2c9a85732a028ede45d16e188087c8 100644 (file)
@@ -337,6 +337,20 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "2656"),
                },
        },
+       {
+               .ident = "Dell XPS M1530",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "XPS M1530"),
+               },
+       },
+       {
+               .ident = "Compal HEL80I",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "COMPAL"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "HEL80I"),
+               },
+       },
        { }
 };
 
index ca62ec639f8f8bee57783030f51c508fe8a4b96a..677680e9f54f7498c60632b5f22b070bd65c5ba4 100644 (file)
@@ -66,6 +66,7 @@
  *                - Support Intuos3 4x6
  *      v1.47 (pc) - Added support for Bamboo
  *      v1.48 (pc) - Added support for Bamboo1, BambooFun, and Cintiq 12WX
+ *      v1.49 (pc) - Added support for USB Tablet PC (0x90, 0x93, and 0x9A)
  */
 
 /*
@@ -86,7 +87,7 @@
 /*
  * Version Information
  */
-#define DRIVER_VERSION "v1.48"
+#define DRIVER_VERSION "v1.49"
 #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>"
 #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver"
 #define DRIVER_LICENSE "GPL"
@@ -103,15 +104,15 @@ struct wacom {
        struct usb_device *usbdev;
        struct usb_interface *intf;
        struct urb *irq;
-       struct wacom_wac * wacom_wac;
+       struct wacom_wac *wacom_wac;
        struct mutex lock;
        unsigned int open:1;
        char phys[32];
 };
 
 struct wacom_combo {
-       struct wacom * wacom;
-       struct urb * urb;
+       struct wacom *wacom;
+       struct urb *urb;
 };
 
 extern int wacom_wac_irq(struct wacom_wac * wacom_wac, void * wcombo);
@@ -132,7 +133,7 @@ extern void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wa
 extern void input_dev_bee(struct input_dev *input_dev, struct wacom_wac *wacom_wac);
 extern __u16 wacom_le16_to_cpu(unsigned char *data);
 extern __u16 wacom_be16_to_cpu(unsigned char *data);
-extern struct wacom_features * get_wacom_feature(const struct usb_device_id *id);
-extern const struct usb_device_id * get_device_table(void);
+extern struct wacom_features *get_wacom_feature(const struct usb_device_id *id);
+extern const struct usb_device_id *get_device_table(void);
 
 #endif
index 09e227aa0d49d9f5bfea9efb3be7079116a82f79..484496daa0f3fbdb0cb8714ecb58d6086b2d99ad 100644 (file)
 #include "wacom.h"
 #include "wacom_wac.h"
 
+/* defines to get HID report descriptor */
+#define HID_DEVICET_HID                (USB_TYPE_CLASS | 0x01)
+#define HID_DEVICET_REPORT     (USB_TYPE_CLASS | 0x02)
+#define HID_USAGE_UNDEFINED            0x00
+#define HID_USAGE_PAGE                 0x05
+#define HID_USAGE_PAGE_DIGITIZER       0x0d
+#define HID_USAGE_PAGE_DESKTOP         0x01
+#define HID_USAGE                      0x09
+#define HID_USAGE_X                    0x30
+#define HID_USAGE_Y                    0x31
+#define HID_USAGE_X_TILT               0x3d
+#define HID_USAGE_Y_TILT               0x3e
+#define HID_USAGE_FINGER               0x22
+#define HID_USAGE_STYLUS               0x20
+#define HID_COLLECTION                 0xc0
+
+enum {
+       WCM_UNDEFINED = 0,
+       WCM_DESKTOP,
+       WCM_DIGITIZER,
+};
+
+struct hid_descriptor {
+       struct usb_descriptor_header header;
+       __le16   bcdHID;
+       u8       bCountryCode;
+       u8       bNumDescriptors;
+       u8       bDescriptorType;
+       __le16   wDescriptorLength;
+} __attribute__ ((packed));
+
+/* defines to get/set USB message */
 #define USB_REQ_GET_REPORT     0x01
 #define USB_REQ_SET_REPORT     0x09
+#define WAC_HID_FEATURE_REPORT 0x03
 
 static int usb_get_report(struct usb_interface *intf, unsigned char type,
                                unsigned char id, void *buf, int size)
@@ -80,25 +113,21 @@ static void wacom_sys_irq(struct urb *urb)
 void wacom_report_key(void *wcombo, unsigned int key_type, int key_data)
 {
        input_report_key(get_input_dev((struct wacom_combo *)wcombo), key_type, key_data);
-       return;
 }
 
 void wacom_report_abs(void *wcombo, unsigned int abs_type, int abs_data)
 {
        input_report_abs(get_input_dev((struct wacom_combo *)wcombo), abs_type, abs_data);
-       return;
 }
 
 void wacom_report_rel(void *wcombo, unsigned int rel_type, int rel_data)
 {
        input_report_rel(get_input_dev((struct wacom_combo *)wcombo), rel_type, rel_data);
-       return;
 }
 
 void wacom_input_event(void *wcombo, unsigned int type, unsigned int code, int value)
 {
        input_event(get_input_dev((struct wacom_combo *)wcombo), type, code, value);
-       return;
 }
 
 __u16 wacom_be16_to_cpu(unsigned char *data)
@@ -118,7 +147,6 @@ __u16 wacom_le16_to_cpu(unsigned char *data)
 void wacom_input_sync(void *wcombo)
 {
        input_sync(get_input_dev((struct wacom_combo *)wcombo));
-       return;
 }
 
 static int wacom_open(struct input_dev *dev)
@@ -160,7 +188,7 @@ static void wacom_close(struct input_dev *dev)
 
 void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
 {
-       input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_1) |
+       input_dev->keybit[BIT_WORD(BTN_MISC)] |= BIT_MASK(BTN_1) |
                BIT_MASK(BTN_5);
        input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
 }
@@ -170,7 +198,7 @@ void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
        input_dev->evbit[0] |= BIT_MASK(EV_MSC);
        input_dev->mscbit[0] |= BIT_MASK(MSC_SERIAL);
        input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_FINGER);
-       input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_0) |
+       input_dev->keybit[BIT_WORD(BTN_MISC)] |= BIT_MASK(BTN_0) |
                BIT_MASK(BTN_4);
 }
 
@@ -178,7 +206,7 @@ void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
 {
        input_dev->evbit[0] |= BIT_MASK(EV_REL);
        input_dev->relbit[0] |= BIT_MASK(REL_WHEEL);
-       input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_LEFT) |
+       input_dev->keybit[BIT_WORD(BTN_MOUSE)] |= BIT_MASK(BTN_LEFT) |
                BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_MIDDLE);
        input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_RUBBER) |
                BIT_MASK(BTN_TOOL_MOUSE) | BIT_MASK(BTN_STYLUS2);
@@ -188,7 +216,7 @@ void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
 void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
 {
        input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_FINGER);
-       input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_0) |
+       input_dev->keybit[BIT_WORD(BTN_MISC)] |= BIT_MASK(BTN_0) |
                BIT_MASK(BTN_1) | BIT_MASK(BTN_2) | BIT_MASK(BTN_3);
        input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0);
        input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0);
@@ -196,14 +224,14 @@ void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
 
 void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
 {
-       input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_4) |
+       input_dev->keybit[BIT_WORD(BTN_MISC)] |= BIT_MASK(BTN_4) |
                BIT_MASK(BTN_5) | BIT_MASK(BTN_6) | BIT_MASK(BTN_7);
        input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0);
 }
 
 void input_dev_bee(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
 {
-       input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_8) | BIT_MASK(BTN_9);
+       input_dev->keybit[BIT_WORD(BTN_MISC)] |= BIT_MASK(BTN_8) | BIT_MASK(BTN_9);
 }
 
 void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
@@ -211,7 +239,7 @@ void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
        input_dev->evbit[0] |= BIT_MASK(EV_MSC) | BIT_MASK(EV_REL);
        input_dev->mscbit[0] |= BIT_MASK(MSC_SERIAL);
        input_dev->relbit[0] |= BIT_MASK(REL_WHEEL);
-       input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_LEFT) |
+       input_dev->keybit[BIT_WORD(BTN_MOUSE)] |= BIT_MASK(BTN_LEFT) |
                BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_MIDDLE) |
                BIT_MASK(BTN_SIDE) | BIT_MASK(BTN_EXTRA);
        input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_RUBBER) |
@@ -228,8 +256,7 @@ void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
 
 void input_dev_pl(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
 {
-       input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_STYLUS2) |
-               BIT_MASK(BTN_TOOL_RUBBER);
+       input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_STYLUS2);
 }
 
 void input_dev_pt(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
@@ -237,15 +264,129 @@ void input_dev_pt(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
        input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_RUBBER);
 }
 
+static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hid_desc,
+                          struct wacom_wac *wacom_wac)
+{
+       struct usb_device *dev = interface_to_usbdev(intf);
+       struct wacom_features *features = wacom_wac->features;
+       char limit = 0, result = 0;
+       int i = 0, usage = WCM_UNDEFINED, finger = 0, pen = 0;
+       unsigned char *report;
+
+       report = kzalloc(hid_desc->wDescriptorLength, GFP_KERNEL);
+       if (!report)
+               return -ENOMEM;
+
+       /* retrive report descriptors */
+       do {
+               result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
+                       USB_REQ_GET_DESCRIPTOR,
+                       USB_RECIP_INTERFACE | USB_DIR_IN,
+                       HID_DEVICET_REPORT << 8,
+                       intf->altsetting[0].desc.bInterfaceNumber, /* interface */
+                       report,
+                       hid_desc->wDescriptorLength,
+                       5000); /* 5 secs */
+       } while (result < 0 && limit++ < 5);
+
+       if (result < 0)
+               goto out;
+
+       for (i = 0; i < hid_desc->wDescriptorLength; i++) {
+
+               switch (report[i]) {
+               case HID_USAGE_PAGE:
+                       switch (report[i + 1]) {
+                       case HID_USAGE_PAGE_DIGITIZER:
+                               usage = WCM_DIGITIZER;
+                               i++;
+                               break;
+
+                       case HID_USAGE_PAGE_DESKTOP:
+                               usage = WCM_DESKTOP;
+                               i++;
+                               break;
+                       }
+                       break;
+
+               case HID_USAGE:
+                       switch (report[i + 1]) {
+                       case HID_USAGE_X:
+                               if (usage == WCM_DESKTOP) {
+                                       if (finger) {
+                                               features->touch_x_max =
+                                                       features->touch_y_max =
+                                                       wacom_le16_to_cpu(&report[i + 3]);
+                                               features->x_max =
+                                                       wacom_le16_to_cpu(&report[i + 6]);
+                                               i += 7;
+                                       } else if (pen) {
+                                               features->x_max =
+                                                       wacom_le16_to_cpu(&report[i + 3]);
+                                               i += 4;
+                                       }
+                               } else if (usage == WCM_DIGITIZER) {
+                                       /* max pressure isn't reported
+                                       features->pressure_max = (unsigned short)
+                                                       (report[i+4] << 8  | report[i + 3]);
+                                       */
+                                       features->pressure_max = 255;
+                                       i += 4;
+                               }
+                               break;
+
+                       case HID_USAGE_Y:
+                               if (usage == WCM_DESKTOP)
+                                       features->y_max =
+                                               wacom_le16_to_cpu(&report[i + 3]);
+                               i += 4;
+                               break;
+
+                       case HID_USAGE_FINGER:
+                               finger = 1;
+                               i++;
+                               break;
+
+                       case HID_USAGE_STYLUS:
+                               pen = 1;
+                               i++;
+                               break;
+
+                       case HID_USAGE_UNDEFINED:
+                               if (usage == WCM_DESKTOP && finger) /* capacity */
+                                       features->pressure_max =
+                                               wacom_le16_to_cpu(&report[i + 3]);
+                               i += 4;
+                               break;
+                       }
+                       break;
+
+               case HID_COLLECTION:
+                       /* reset UsagePage ans Finger */
+                       finger = usage = 0;
+                       break;
+               }
+       }
+
+       result = 0;
+
+ out:
+       kfree(report);
+       return result;
+}
+
 static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *id)
 {
        struct usb_device *dev = interface_to_usbdev(intf);
+       struct usb_host_interface *interface = intf->cur_altsetting;
        struct usb_endpoint_descriptor *endpoint;
        struct wacom *wacom;
        struct wacom_wac *wacom_wac;
+       struct wacom_features *features;
        struct input_dev *input_dev;
        int error = -ENOMEM;
        char rep_data[2], limit = 0;
+       struct hid_descriptor *hid_desc;
 
        wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL);
        wacom_wac = kzalloc(sizeof(struct wacom_wac), GFP_KERNEL);
@@ -268,8 +409,8 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
        usb_make_path(dev, wacom->phys, sizeof(wacom->phys));
        strlcat(wacom->phys, "/input0", sizeof(wacom->phys));
 
-       wacom_wac->features = get_wacom_feature(id);
-       BUG_ON(wacom_wac->features->pktlen > 10);
+       wacom_wac->features = features = get_wacom_feature(id);
+       BUG_ON(features->pktlen > 10);
 
        input_dev->name = wacom_wac->features->name;
        wacom->wacom_wac = wacom_wac;
@@ -282,18 +423,37 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
        input_dev->open = wacom_open;
        input_dev->close = wacom_close;
 
+       endpoint = &intf->cur_altsetting->endpoint[0].desc;
+
+       /* TabletPC need to retrieve the physical and logical maximum from report descriptor */
+       if (wacom_wac->features->type == TABLETPC) {
+               if (usb_get_extra_descriptor(interface, HID_DEVICET_HID, &hid_desc)) {
+                       if (usb_get_extra_descriptor(&interface->endpoint[0],
+                                                    HID_DEVICET_REPORT, &hid_desc)) {
+                               printk("wacom: can not retrive extra class descriptor\n");
+                               goto fail2;
+                       }
+               }
+               error = wacom_parse_hid(intf, hid_desc, wacom_wac);
+               if (error)
+                       goto fail2;
+       }
+
        input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
        input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_PEN) |
                BIT_MASK(BTN_TOUCH) | BIT_MASK(BTN_STYLUS);
-       input_set_abs_params(input_dev, ABS_X, 0, wacom_wac->features->x_max, 4, 0);
-       input_set_abs_params(input_dev, ABS_Y, 0, wacom_wac->features->y_max, 4, 0);
-       input_set_abs_params(input_dev, ABS_PRESSURE, 0, wacom_wac->features->pressure_max, 0, 0);
+       input_set_abs_params(input_dev, ABS_X, 0, features->x_max, 4, 0);
+       input_set_abs_params(input_dev, ABS_Y, 0, features->y_max, 4, 0);
+       input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max, 0, 0);
+       if (features->type == TABLETPC) {
+               input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_DOUBLETAP);
+               input_set_abs_params(input_dev, ABS_RX, 0, features->touch_x_max, 4, 0);
+               input_set_abs_params(input_dev, ABS_RY, 0, features->touch_y_max, 4, 0);
+       }
        input_dev->absbit[BIT_WORD(ABS_MISC)] |= BIT_MASK(ABS_MISC);
 
        wacom_init_input_dev(input_dev, wacom_wac);
 
-       endpoint = &intf->cur_altsetting->endpoint[0].desc;
-
        usb_fill_int_urb(wacom->irq, dev,
                         usb_rcvintpipe(dev, endpoint->bEndpointAddress),
                         wacom_wac->data, wacom_wac->features->pktlen,
@@ -305,13 +465,22 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
        if (error)
                goto fail3;
 
-       /* Ask the tablet to report tablet data. Repeat until it succeeds */
-       do {
-               rep_data[0] = 2;
-               rep_data[1] = 2;
-               usb_set_report(intf, 3, 2, rep_data, 2);
-               usb_get_report(intf, 3, 2, rep_data, 2);
-       } while (rep_data[1] != 2 && limit++ < 5);
+       /*
+        * Ask the tablet to report tablet data if it is not a Tablet PC.
+        * Repeat until it succeeds
+        */
+       if (wacom_wac->features->type != TABLETPC) {
+               do {
+                       rep_data[0] = 2;
+                       rep_data[1] = 2;
+                       error = usb_set_report(intf, WAC_HID_FEATURE_REPORT,
+                                               2, rep_data, 2);
+                       if (error >= 0)
+                               error = usb_get_report(intf,
+                                               WAC_HID_FEATURE_REPORT, 2,
+                                               rep_data, 2);
+               } while ((error < 0 || rep_data[1] != 2) && limit++ < 5);
+       }
 
        usb_set_intfdata(intf, wacom);
        return 0;
@@ -333,7 +502,8 @@ static void wacom_disconnect(struct usb_interface *intf)
        usb_kill_urb(wacom->irq);
        input_unregister_device(wacom->dev);
        usb_free_urb(wacom->irq);
-       usb_buffer_free(interface_to_usbdev(intf), 10, wacom->wacom_wac->data, wacom->data_dma);
+       usb_buffer_free(interface_to_usbdev(intf), 10,
+                       wacom->wacom_wac->data, wacom->data_dma);
        kfree(wacom->wacom_wac);
        kfree(wacom);
 }
index bf3d9a8b2c1be6bc6777ab681947cb280cf60149..8dc8d1e59beaeeb1a1f154ba122e929d7f45e492 100644 (file)
@@ -535,31 +535,147 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo)
        return 1;
 }
 
+int wacom_tpc_irq(struct wacom_wac *wacom, void *wcombo)
+{
+       char *data = wacom->data;
+       int prox = 0, pressure;
+       static int stylusInProx, touchInProx = 1, touchOut;
+       struct urb *urb = ((struct wacom_combo *)wcombo)->urb;
+
+       dbg("wacom_tpc_irq: received report #%d", data[0]);
+
+       if (urb->actual_length == 5 || data[0] == 6) { /* Touch data */
+               if (urb->actual_length == 5) {  /* with touch */
+                       prox = data[0] & 0x03;
+               } else {  /* with capacity */
+                       prox = data[1] & 0x03;
+               }
+
+               if (!stylusInProx) { /* stylus not in prox */
+                       if (prox) {
+                               if (touchInProx) {
+                                       wacom->tool[1] = BTN_TOOL_DOUBLETAP;
+                                       wacom->id[0] = TOUCH_DEVICE_ID;
+                                       if (urb->actual_length != 5) {
+                                               wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[2]));
+                                               wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[4]));
+                                               wacom_report_abs(wcombo, ABS_PRESSURE, wacom_le16_to_cpu(&data[6]));
+                                               wacom_report_key(wcombo, BTN_TOUCH, wacom_le16_to_cpu(&data[6]));
+                                       } else {
+                                               wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[1]));
+                                               wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[3]));
+                                               wacom_report_key(wcombo, BTN_TOUCH, 1);
+                                       }
+                                       wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]);
+                                       wacom_report_key(wcombo, wacom->tool[1], prox & 0x01);
+                                       touchOut = 1;
+                                       return 1;
+                               }
+                       } else {
+                               wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]);
+                               wacom_report_key(wcombo, wacom->tool[1], prox & 0x01);
+                               wacom_report_key(wcombo, BTN_TOUCH, 0);
+                               touchOut = 0;
+                               touchInProx = 1;
+                               return 1;
+                       }
+               } else if (touchOut || !prox) { /* force touch out-prox */
+                       wacom_report_abs(wcombo, ABS_MISC, TOUCH_DEVICE_ID);
+                       wacom_report_key(wcombo, BTN_TOUCH, 0);
+                       touchOut = 0;
+                       touchInProx = 1;
+                       return 1;
+               }
+       } else if (data[0] == 2) { /* Penabled */
+               prox = data[1] & 0x20;
+
+               touchInProx = 0;
+
+               wacom->id[0] = ERASER_DEVICE_ID;
+
+               /*
+                * if going from out of proximity into proximity select between the eraser
+                * and the pen based on the state of the stylus2 button, choose eraser if
+                * pressed else choose pen. if not a proximity change from out to in, send
+                * an out of proximity for previous tool then a in for new tool.
+                */
+               if (prox) { /* in prox */
+                       if (!wacom->tool[0]) {
+                               /* Going into proximity select tool */
+                               wacom->tool[1] = (data[1] & 0x08) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN;
+                               if (wacom->tool[1] == BTN_TOOL_PEN)
+                                       wacom->id[0] = STYLUS_DEVICE_ID;
+                       } else if (wacom->tool[1] == BTN_TOOL_RUBBER && !(data[1] & 0x08)) {
+                               /*
+                                * was entered with stylus2 pressed
+                                * report out proximity for previous tool
+                               */
+                               wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]);
+                               wacom_report_key(wcombo, wacom->tool[1], 0);
+                               wacom_input_sync(wcombo);
+
+                               /* set new tool */
+                               wacom->tool[1] = BTN_TOOL_PEN;
+                               wacom->id[0] = STYLUS_DEVICE_ID;
+                               return 0;
+                       }
+                       if (wacom->tool[1] != BTN_TOOL_RUBBER) {
+                               /* Unknown tool selected default to pen tool */
+                               wacom->tool[1] = BTN_TOOL_PEN;
+                               wacom->id[0] = STYLUS_DEVICE_ID;
+                       }
+                       wacom_report_key(wcombo, BTN_STYLUS, data[1] & 0x02);
+                       wacom_report_key(wcombo, BTN_STYLUS2, data[1] & 0x10);
+                       wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[2]));
+                       wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[4]));
+                       pressure = ((data[7] & 0x01) << 8) | data[6];
+                       if (pressure < 0)
+                               pressure = wacom->features->pressure_max + pressure + 1;
+                       wacom_report_abs(wcombo, ABS_PRESSURE, pressure);
+                       wacom_report_key(wcombo, BTN_TOUCH, pressure);
+               } else {
+                       wacom_report_abs(wcombo, ABS_PRESSURE, 0);
+                       wacom_report_key(wcombo, BTN_STYLUS, 0);
+                       wacom_report_key(wcombo, BTN_STYLUS2, 0);
+                       wacom_report_key(wcombo, BTN_TOUCH, 0);
+               }
+               wacom_report_key(wcombo, wacom->tool[1], prox);
+               wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]);
+               stylusInProx = prox;
+               wacom->tool[0] = prox;
+               return 1;
+       }
+       return 0;
+}
+
 int wacom_wac_irq(struct wacom_wac *wacom_wac, void *wcombo)
 {
        switch (wacom_wac->features->type) {
                case PENPARTNER:
-                       return (wacom_penpartner_irq(wacom_wac, wcombo));
-                       break;
+                       return wacom_penpartner_irq(wacom_wac, wcombo);
+
                case PL:
-                       return (wacom_pl_irq(wacom_wac, wcombo));
-                       break;
+                       return wacom_pl_irq(wacom_wac, wcombo);
+
                case WACOM_G4:
                case GRAPHIRE:
                case WACOM_MO:
-                       return (wacom_graphire_irq(wacom_wac, wcombo));
-                       break;
+                       return wacom_graphire_irq(wacom_wac, wcombo);
+
                case PTU:
-                       return (wacom_ptu_irq(wacom_wac, wcombo));
-                       break;
+                       return wacom_ptu_irq(wacom_wac, wcombo);
+
                case INTUOS:
                case INTUOS3S:
                case INTUOS3:
                case INTUOS3L:
                case CINTIQ:
                case WACOM_BEE:
-                       return (wacom_intuos_irq(wacom_wac, wcombo));
-                       break;
+                       return wacom_intuos_irq(wacom_wac, wcombo);
+
+               case TABLETPC:
+                       return wacom_tpc_irq(wacom_wac, wcombo);
+
                default:
                        return 0;
        }
@@ -586,13 +702,15 @@ void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_w
                        /* fall through */
                case INTUOS3S:
                        input_dev_i3s(input_dev, wacom_wac);
+                       /* fall through */
                case INTUOS:
                        input_dev_i(input_dev, wacom_wac);
                        break;
                case PL:
                case PTU:
+               case TABLETPC:
                        input_dev_pl(input_dev, wacom_wac);
-                       break;
+                       /* fall through */
                case PENPARTNER:
                        input_dev_pt(input_dev, wacom_wac);
                        break;
@@ -611,6 +729,7 @@ static struct wacom_features wacom_features[] = {
        { "Wacom Graphire4 6x8", 8,  16704, 12064,  511, 63, WACOM_G4 },
        { "Wacom BambooFun 4x5", 9,  14760,  9225,  511, 63, WACOM_MO },
        { "Wacom BambooFun 6x8", 9,  21648, 13530,  511, 63, WACOM_MO },
+       { "Wacom Bamboo1 Medium",8,  16704, 12064,  511, 63, GRAPHIRE },
        { "Wacom Volito",        8,   5104,  3712,  511, 63, GRAPHIRE },
        { "Wacom PenStation2",   8,   3250,  2320,  255, 63, GRAPHIRE },
        { "Wacom Volito2 4x5",   8,   5104,  3712,  511, 63, GRAPHIRE },
@@ -650,6 +769,10 @@ static struct wacom_features wacom_features[] = {
        { "Wacom Cintiq 21UX",   10, 87200, 65600, 1023, 63, CINTIQ },
        { "Wacom Cintiq 20WSX",  10, 86680, 54180, 1023, 63, WACOM_BEE },
        { "Wacom Cintiq 12WX",   10, 53020, 33440, 1023, 63, WACOM_BEE },
+       { "Wacom DTU1931",        8, 37832, 30305,  511,  0, PL },
+       { "Wacom ISDv4 90",       8, 26202, 16325,  255,  0, TABLETPC },
+       { "Wacom ISDv4 93",       8, 26202, 16325,  255,  0, TABLETPC },
+       { "Wacom ISDv4 9A",       8, 26202, 16325,  255,  0, TABLETPC },
        { "Wacom Intuos2 6x8",   10, 20320, 16240, 1023, 31, INTUOS },
        { }
 };
@@ -665,6 +788,7 @@ static struct usb_device_id wacom_ids[] = {
        { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x16) },
        { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x17) },
        { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x18) },
+       { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x19) },
        { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x60) },
        { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x61) },
        { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x62) },
@@ -704,18 +828,26 @@ static struct usb_device_id wacom_ids[] = {
        { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x3F) },
        { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC5) },
        { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC6) },
+       { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC7) },
+       { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x90) },
+       { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x93) },
+       { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x9A) },
        { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x47) },
        { }
 };
 
-const struct usb_device_id * get_device_table(void) {
-        const struct usb_device_id * id_table = wacom_ids;
+const struct usb_device_id *get_device_table(void)
+{
+        const struct usb_device_id *id_table = wacom_ids;
+
         return id_table;
 }
 
-struct wacom_features * get_wacom_feature(const struct usb_device_id * id) {
+struct wacom_features * get_wacom_feature(const struct usb_device_id *id)
+{
         int index = id - wacom_ids;
         struct wacom_features *wf = &wacom_features[index];
+
         return wf;
 }
 
index 3342bc05847d68e60f5d610dcb69e06a3c4aa5d1..f9c8b69673b7bf2d637b6c14d9e5e51a90bb42dc 100644 (file)
@@ -10,6 +10,7 @@
 #define WACOM_WAC_H
 
 #define STYLUS_DEVICE_ID       0x02
+#define TOUCH_DEVICE_ID                0x03
 #define CURSOR_DEVICE_ID       0x06
 #define ERASER_DEVICE_ID       0x0A
 #define PAD_DEVICE_ID          0x0F
@@ -27,6 +28,7 @@ enum {
        CINTIQ,
        WACOM_BEE,
        WACOM_MO,
+       TABLETPC,
        MAX_TYPE
 };
 
@@ -38,6 +40,8 @@ struct wacom_features {
        int pressure_max;
        int distance_max;
        int type;
+       int touch_x_max;
+       int touch_y_max;
 };
 
 struct wacom_wac {
index d20689cdbd5d63665601e9e00baca7ffd08eb42d..8f38c5e55ce6136782086534bdbf08e993f67702 100644 (file)
@@ -262,7 +262,7 @@ static int elo_setup_10(struct elo *elo)
                input_set_abs_params(dev, ABS_PRESSURE, 0, 255, 0, 0);
 
        printk(KERN_INFO "elo: %sTouch touchscreen, fw: %02x.%02x, "
-               "features: %x02x, controller: 0x%02x\n",
+               "features: 0x%02x, controller: 0x%02x\n",
                elo_types[(packet[1] -'0') & 0x03],
                packet[5], packet[4], packet[3], packet[7]);
 
index 3ab6362f043c0e9db3d08f00b5f60db92da1f795..928d2ed8865f6b296b2fe9550d599b016d06f606 100644 (file)
@@ -323,7 +323,7 @@ static struct xenbus_device_id xenkbd_ids[] = {
        { "" }
 };
 
-static struct xenbus_driver xenkbd = {
+static struct xenbus_driver xenkbd_driver = {
        .name = "vkbd",
        .owner = THIS_MODULE,
        .ids = xenkbd_ids,
@@ -342,12 +342,12 @@ static int __init xenkbd_init(void)
        if (xen_initial_domain())
                return -ENODEV;
 
-       return xenbus_register_frontend(&xenkbd);
+       return xenbus_register_frontend(&xenkbd_driver);
 }
 
 static void __exit xenkbd_cleanup(void)
 {
-       xenbus_unregister_driver(&xenkbd);
+       xenbus_unregister_driver(&xenkbd_driver);
 }
 
 module_init(xenkbd_init);
index 1e288eeb5e2a5679908ca0f9cbf79793b91e18b8..6461a32bc838af31dceb5ea4073c17c5f3c79e41 100644 (file)
@@ -233,10 +233,8 @@ static void __exit b1isa_exit(void)
        int i;
 
        for (i = 0; i < MAX_CARDS; i++) {
-               if (!io[i])
-                       break;
-
-               b1isa_remove(&isa_dev[i]);
+               if (isa_dev[i].resource[0].start)
+                       b1isa_remove(&isa_dev[i]);
        }
        unregister_capi_driver(&capi_driver_b1isa);
 }
index 84d75a3f5d17f20dfe9017baf455ba92edb28b25..ded9d0baf607b0daa8450c1b0e7bad775285e048 100644 (file)
@@ -1213,7 +1213,7 @@ static void HiSax_shiftcards(int idx)
                memcpy(&cards[i], &cards[i + 1], sizeof(cards[i]));
 }
 
-static int HiSax_inithardware(int *busy_flag)
+static int __init HiSax_inithardware(int *busy_flag)
 {
        int foundcards = 0;
        int i = 0;
@@ -1542,7 +1542,9 @@ static void __exit HiSax_exit(void)
        printk(KERN_INFO "HiSax module removed\n");
 }
 
-int hisax_init_pcmcia(void *pcm_iob, int *busy_flag, struct IsdnCard *card)
+#ifdef CONFIG_HOTPLUG
+
+int __devinit hisax_init_pcmcia(void *pcm_iob, int *busy_flag, struct IsdnCard *card)
 {
        u_char ids[16];
        int ret = -1;
@@ -1563,6 +1565,8 @@ error:
 }
 
 EXPORT_SYMBOL(hisax_init_pcmcia);
+#endif
+
 EXPORT_SYMBOL(HiSax_closecard);
 
 #include "hisax_if.h"
@@ -1580,6 +1584,11 @@ static void hisax_bc_close(struct BCState *bcs);
 static void hisax_bh(struct work_struct *work);
 static void EChannel_proc_rcv(struct hisax_d_if *d_if);
 
+static int hisax_setup_card_dynamic(struct IsdnCard *card)
+{
+       return 2;
+}
+
 int hisax_register(struct hisax_d_if *hisax_d_if, struct hisax_b_if *b_if[],
                   char *name, int protocol)
 {
@@ -1599,7 +1608,8 @@ int hisax_register(struct hisax_d_if *hisax_d_if, struct hisax_b_if *b_if[],
        cards[i].protocol = protocol;
        sprintf(id, "%s%d", name, i);
        nrcards++;
-       retval = checkcard(i, id, NULL, hisax_d_if->owner, hisax_cs_setup_card);
+       retval = checkcard(i, id, NULL, hisax_d_if->owner,
+                               hisax_setup_card_dynamic);
        if (retval == 0) { // yuck
                cards[i].typ = 0;
                nrcards--;
index cfa8fa5e44ab5d1352eff43b3cc5407624ca80e1..3f2a0a20c19b040538ba23fcce7d3d346d2e0f89 100644 (file)
@@ -83,12 +83,12 @@ net_open(struct net_device *dev)
 
        /* Fill in the MAC-level header (if not already set) */
        if (!card->mac_addr[0]) {
-               for (i = 0; i < ETH_ALEN - sizeof(unsigned long); i++)
+               for (i = 0; i < ETH_ALEN; i++)
                        dev->dev_addr[i] = 0xfc;
                if ((in_dev = dev->ip_ptr) != NULL) {
                        struct in_ifaddr *ifa = in_dev->ifa_list;
                        if (ifa != NULL)
-                               memcpy(dev->dev_addr + (ETH_ALEN - sizeof(unsigned long)), &ifa->ifa_local, sizeof(unsigned long));
+                               memcpy(dev->dev_addr + (ETH_ALEN - sizeof(ifa->ifa_local)), &ifa->ifa_local, sizeof(ifa->ifa_local));
                }
        } else
                memcpy(dev->dev_addr, card->mac_addr, ETH_ALEN);
index bb904a0a98bdc353e14a512aaf45ed650769908d..1bfc55d7a26c745d226f840edcfd784dd6930985 100644 (file)
@@ -1641,8 +1641,10 @@ isdn_net_ciscohdlck_slarp_send_reply(isdn_net_local *lp)
        /* slarp reply, send own ip/netmask; if values are nonsense remote
         * should think we are unable to provide it with an address via SLARP */
        p += put_u32(p, CISCO_SLARP_REPLY);
-       p += put_u32(p, addr);  // address
-       p += put_u32(p, mask);  // netmask
+       *(__be32 *)p = addr;    // address
+       p += 4;
+       *(__be32 *)p = mask;    // netmask
+       p += 4;
        p += put_u16(p, 0);     // unused
 
        isdn_net_write_super(lp, skb);
index 2c21d4f25cc82e85ab138aca5e4490f4166865f3..a98ab72adf9528f95e5c23d06b27c0d11a83c4a2 100644 (file)
@@ -288,7 +288,7 @@ static void __devexit rackmeter_stop_cpu_sniffer(struct rackmeter *rm)
        cancel_rearming_delayed_work(&rm->cpu[1].sniffer);
 }
 
-static int rackmeter_setup(struct rackmeter *rm)
+static int __devinit rackmeter_setup(struct rackmeter *rm)
 {
        pr_debug("rackmeter: setting up i2s..\n");
        rackmeter_setup_i2s(rm);
@@ -582,12 +582,12 @@ static struct of_device_id rackmeter_match[] = {
        { }
 };
 
-static struct macio_driver rackmeter_drv = {
+static struct macio_driver rackmeter_driver = {
        .name = "rackmeter",
        .owner = THIS_MODULE,
        .match_table = rackmeter_match,
        .probe = rackmeter_probe,
-       .remove = rackmeter_remove,
+       .remove = __devexit_p(rackmeter_remove),
        .shutdown = rackmeter_shutdown,
 };
 
@@ -596,14 +596,14 @@ static int __init rackmeter_init(void)
 {
        pr_debug("rackmeter_init()\n");
 
-       return macio_register_driver(&rackmeter_drv);
+       return macio_register_driver(&rackmeter_driver);
 }
 
 static void __exit rackmeter_exit(void)
 {
        pr_debug("rackmeter_exit()\n");
 
-       macio_unregister_driver(&rackmeter_drv);
+       macio_unregister_driver(&rackmeter_driver);
 }
 
 module_init(rackmeter_init);
index ac89a5deaca2e12fa62ccb78f1d62b088039675c..ab7c8e4a61f943c516ae5a3534e8775c33180f6b 100644 (file)
@@ -208,15 +208,18 @@ static void bitmap_checkfree(struct bitmap *bitmap, unsigned long page)
  */
 
 /* IO operations when bitmap is stored near all superblocks */
-static struct page *read_sb_page(mddev_t *mddev, long offset, unsigned long index)
+static struct page *read_sb_page(mddev_t *mddev, long offset,
+                                struct page *page,
+                                unsigned long index, int size)
 {
        /* choose a good rdev and read the page from there */
 
        mdk_rdev_t *rdev;
        struct list_head *tmp;
-       struct page *page = alloc_page(GFP_KERNEL);
        sector_t target;
 
+       if (!page)
+               page = alloc_page(GFP_KERNEL);
        if (!page)
                return ERR_PTR(-ENOMEM);
 
@@ -227,7 +230,9 @@ static struct page *read_sb_page(mddev_t *mddev, long offset, unsigned long inde
 
                target = rdev->sb_start + offset + index * (PAGE_SIZE/512);
 
-               if (sync_page_io(rdev->bdev, target, PAGE_SIZE, page, READ)) {
+               if (sync_page_io(rdev->bdev, target,
+                                roundup(size, bdev_hardsect_size(rdev->bdev)),
+                                page, READ)) {
                        page->index = index;
                        attach_page_buffers(page, NULL); /* so that free_buffer will
                                                          * quietly no-op */
@@ -544,7 +549,9 @@ static int bitmap_read_sb(struct bitmap *bitmap)
 
                bitmap->sb_page = read_page(bitmap->file, 0, bitmap, bytes);
        } else {
-               bitmap->sb_page = read_sb_page(bitmap->mddev, bitmap->offset, 0);
+               bitmap->sb_page = read_sb_page(bitmap->mddev, bitmap->offset,
+                                              NULL,
+                                              0, sizeof(bitmap_super_t));
        }
        if (IS_ERR(bitmap->sb_page)) {
                err = PTR_ERR(bitmap->sb_page);
@@ -957,11 +964,16 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)
                                 */
                                page = bitmap->sb_page;
                                offset = sizeof(bitmap_super_t);
+                               read_sb_page(bitmap->mddev, bitmap->offset,
+                                            page,
+                                            index, count);
                        } else if (file) {
                                page = read_page(file, index, bitmap, count);
                                offset = 0;
                        } else {
-                               page = read_sb_page(bitmap->mddev, bitmap->offset, index);
+                               page = read_sb_page(bitmap->mddev, bitmap->offset,
+                                                   NULL,
+                                                   index, count);
                                offset = 0;
                        }
                        if (IS_ERR(page)) { /* read error */
index 4840733cd9032c48a1253a8fae8ebdea2d4c09cd..3d7f4923cd133a2216115bb18d6fb177eb93ffd1 100644 (file)
@@ -441,13 +441,13 @@ static void process_queued_ios(struct work_struct *work)
                __choose_pgpath(m);
 
        pgpath = m->current_pgpath;
-       m->pgpath_to_activate = m->current_pgpath;
 
        if ((pgpath && !m->queue_io) ||
            (!pgpath && !m->queue_if_no_path))
                must_queue = 0;
 
-       if (m->pg_init_required && !m->pg_init_in_progress) {
+       if (m->pg_init_required && !m->pg_init_in_progress && pgpath) {
+               m->pgpath_to_activate = pgpath;
                m->pg_init_count++;
                m->pg_init_required = 0;
                m->pg_init_in_progress = 1;
@@ -708,6 +708,10 @@ static int parse_hw_handler(struct arg_set *as, struct multipath *m)
                m->hw_handler_name = NULL;
                return -EINVAL;
        }
+
+       if (hw_argc > 1)
+               DMWARN("Ignoring user-specified arguments for "
+                      "hardware handler \"%s\"", m->hw_handler_name);
        consume(as, hw_argc - 1);
 
        return 0;
index 9d7b53ed75b228e05bc865571afdd424da92f483..ec43f9fa4b2acaffed0bf45f79edc5a115f36804 100644 (file)
@@ -1032,6 +1032,7 @@ static void mirror_dtr(struct dm_target *ti)
 
        del_timer_sync(&ms->timer);
        flush_workqueue(ms->kmirrord_wq);
+       flush_scheduled_work();
        dm_kcopyd_client_destroy(ms->kcopyd_client);
        destroy_workqueue(ms->kmirrord_wq);
        free_context(ms, ti, ms->nr_mirrors);
index a2d068dbe9e2669dc25290a09e8918b4b5c2f28f..9e4ef88d421e499dfb05e1697593bcbf82fefe38 100644 (file)
@@ -320,8 +320,10 @@ int __init dm_stripe_init(void)
        int r;
 
        r = dm_register_target(&stripe_target);
-       if (r < 0)
+       if (r < 0) {
                DMWARN("target registration failed");
+               return r;
+       }
 
        kstriped = create_singlethread_workqueue("kstriped");
        if (!kstriped) {
index a63161aec48750ef51feb6e6e506c7ff83044dc0..04e5fd742c2c29e42fbba920e1303b889229ccf7 100644 (file)
@@ -668,7 +668,7 @@ static void check_for_valid_limits(struct io_restrictions *rs)
        if (!rs->max_segment_size)
                rs->max_segment_size = MAX_SEGMENT_SIZE;
        if (!rs->seg_boundary_mask)
-               rs->seg_boundary_mask = -1;
+               rs->seg_boundary_mask = BLK_SEG_BOUNDARY_MASK;
        if (!rs->bounce_pfn)
                rs->bounce_pfn = -1;
 }
index 6963ad1484082bf5d0f8009c60aa1db18eb980c1..c99e4728ff4162ed16c4a7ec99fdc0c27c8cb35f 100644 (file)
@@ -375,7 +375,7 @@ static void start_io_acct(struct dm_io *io)
        dm_disk(md)->part0.in_flight = atomic_inc_return(&md->pending);
 }
 
-static int end_io_acct(struct dm_io *io)
+static void end_io_acct(struct dm_io *io)
 {
        struct mapped_device *md = io->md;
        struct bio *bio = io->bio;
@@ -391,7 +391,9 @@ static int end_io_acct(struct dm_io *io)
        dm_disk(md)->part0.in_flight = pending =
                atomic_dec_return(&md->pending);
 
-       return !pending;
+       /* nudge anyone waiting on suspend queue */
+       if (!pending)
+               wake_up(&md->wait);
 }
 
 /*
@@ -499,9 +501,7 @@ static void dec_pending(struct dm_io *io, int error)
                        spin_unlock_irqrestore(&io->md->pushback_lock, flags);
                }
 
-               if (end_io_acct(io))
-                       /* nudge anyone waiting on suspend queue */
-                       wake_up(&io->md->wait);
+               end_io_acct(io);
 
                if (io->error != DM_ENDIO_REQUEUE) {
                        blk_add_trace_bio(io->md->queue, io->bio,
@@ -937,16 +937,24 @@ static void dm_unplug_all(struct request_queue *q)
 
 static int dm_any_congested(void *congested_data, int bdi_bits)
 {
-       int r;
-       struct mapped_device *md = (struct mapped_device *) congested_data;
-       struct dm_table *map = dm_get_table(md);
+       int r = bdi_bits;
+       struct mapped_device *md = congested_data;
+       struct dm_table *map;
 
-       if (!map || test_bit(DMF_BLOCK_IO, &md->flags))
-               r = bdi_bits;
-       else
-               r = dm_table_any_congested(map, bdi_bits);
+       atomic_inc(&md->pending);
+
+       if (!test_bit(DMF_BLOCK_IO, &md->flags)) {
+               map = dm_get_table(md);
+               if (map) {
+                       r = dm_table_any_congested(map, bdi_bits);
+                       dm_table_put(map);
+               }
+       }
+
+       if (!atomic_dec_return(&md->pending))
+               /* nudge anyone waiting on suspend queue */
+               wake_up(&md->wait);
 
-       dm_table_put(map);
        return r;
 }
 
index 14e627ef6465f28dc88fc07bd5bd6c5c8e1e40af..c1d92f838ca83ba608bd28678709bf9a5afa7be1 100644 (file)
@@ -376,7 +376,7 @@ static void dm1105dvb_dma_unmap(struct dm1105dvb *dm1105dvb)
        pci_free_consistent(dm1105dvb->pdev, 6*DM1105_DMA_BYTES, dm1105dvb->ts_buf, dm1105dvb->dma_addr);
 }
 
-static void __devinit dm1105dvb_enable_irqs(struct dm1105dvb *dm1105dvb)
+static void dm1105dvb_enable_irqs(struct dm1105dvb *dm1105dvb)
 {
        outb(INTMAK_ALLMASK, dm_io_mem(DM1105_INTMAK));
        outb(1, dm_io_mem(DM1105_CR));
index 8557bf12cfb46f98893a0ed770e58e8e74ad321d..7a421e9dba5aeef3e0ee51036dfe327359fbd273 100644 (file)
@@ -585,6 +585,8 @@ restart:
                if (fe->ops.set_voltage)
                        fe->ops.set_voltage(fe, SEC_VOLTAGE_OFF);
                if (fe->ops.tuner_ops.sleep) {
+                       if (fe->ops.i2c_gate_ctrl)
+                               fe->ops.i2c_gate_ctrl(fe, 1);
                        fe->ops.tuner_ops.sleep(fe);
                        if (fe->ops.i2c_gate_ctrl)
                                fe->ops.i2c_gate_ctrl(fe, 0);
@@ -934,7 +936,8 @@ void dtv_property_dump(struct dtv_property *tvp)
 int is_legacy_delivery_system(fe_delivery_system_t s)
 {
        if((s == SYS_UNDEFINED) || (s == SYS_DVBC_ANNEX_AC) ||
-               (s == SYS_DVBC_ANNEX_B) || (s == SYS_DVBT) || (s == SYS_DVBS))
+          (s == SYS_DVBC_ANNEX_B) || (s == SYS_DVBT) || (s == SYS_DVBS) ||
+          (s == SYS_ATSC))
                return 1;
 
        return 0;
index 847d8fdd9ec4deeb60a382a33a9dd8024ec51403..e9ab0249d13305435715bc5b4b7c03d9d9aef888 100644 (file)
@@ -681,12 +681,6 @@ static int af9015_download_firmware(struct usb_device *udev,
                goto error;
        }
 
-       /* firmware is running, reconnect device in the usb bus */
-       req.cmd = RECONNECT_USB;
-       ret = af9015_rw_udev(udev, &req);
-       if (ret)
-               err("reconnect failed: %d", ret);
-
 error:
        return ret;
 }
@@ -1208,6 +1202,7 @@ static struct dvb_usb_device_properties af9015_properties[] = {
                .usb_ctrl = DEVICE_SPECIFIC,
                .download_firmware = af9015_download_firmware,
                .firmware = "dvb-usb-af9015.fw",
+               .no_reconnect = 1,
 
                .size_of_priv = sizeof(struct af9015_state), \
 
@@ -1306,6 +1301,7 @@ static struct dvb_usb_device_properties af9015_properties[] = {
                .usb_ctrl = DEVICE_SPECIFIC,
                .download_firmware = af9015_download_firmware,
                .firmware = "dvb-usb-af9015.fw",
+               .no_reconnect = 1,
 
                .size_of_priv = sizeof(struct af9015_state), \
 
index 739193943c17ccbabe5c6af9c1b4a1e3d77c4cc8..8b544fe79b0de11842f883c48dc041f9889a968b 100644 (file)
@@ -22,7 +22,7 @@ extern int dvb_usb_dib0700_debug;
 
 #define REQUEST_I2C_READ     0x2
 #define REQUEST_I2C_WRITE    0x3
-#define REQUEST_POLL_RC      0x4
+#define REQUEST_POLL_RC      0x4 /* deprecated in firmware v1.20 */
 #define REQUEST_JUMPRAM      0x8
 #define REQUEST_SET_CLOCK    0xB
 #define REQUEST_SET_GPIO     0xC
@@ -40,11 +40,14 @@ struct dib0700_state {
        u16 mt2060_if1[2];
        u8 rc_toggle;
        u8 rc_counter;
+       u8 rc_func_version;
        u8 is_dib7000pc;
        u8 fw_use_new_i2c_api;
        u8 disable_streaming_master_mode;
 };
 
+extern int dib0700_get_version(struct dvb_usb_device *d, u32 *hwversion,
+                              u32 *romversion, u32 *ramversion, u32 *fwtype);
 extern int dib0700_set_gpio(struct dvb_usb_device *, enum dib07x0_gpios gpio, u8 gpio_dir, u8 gpio_val);
 extern int dib0700_ctrl_clock(struct dvb_usb_device *d, u32 clk_MHz, u8 clock_out_gp3);
 extern int dib0700_ctrl_rd(struct dvb_usb_device *d, u8 *tx, u8 txlen, u8 *rx, u8 rxlen);
index dd53cee3896de0d3857569ce08af9d39bc9d308d..200b215f4d8b37f2441bd058b7f9b06f5cb25086 100644 (file)
@@ -19,6 +19,22 @@ MODULE_PARM_DESC(dvb_usb_dib0700_ir_proto, "set ir protocol (0=NEC, 1=RC5 (defau
 
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 
+
+int dib0700_get_version(struct dvb_usb_device *d, u32 *hwversion,
+                       u32 *romversion, u32 *ramversion, u32 *fwtype)
+{
+       u8 b[16];
+       int ret = usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0),
+                                 REQUEST_GET_VERSION,
+                                 USB_TYPE_VENDOR | USB_DIR_IN, 0, 0,
+                                 b, sizeof(b), USB_CTRL_GET_TIMEOUT);
+       *hwversion  = (b[0] << 24)  | (b[1] << 16)  | (b[2] << 8)  | b[3];
+       *romversion = (b[4] << 24)  | (b[5] << 16)  | (b[6] << 8)  | b[7];
+       *ramversion = (b[8] << 24)  | (b[9] << 16)  | (b[10] << 8) | b[11];
+       *fwtype     = (b[12] << 24) | (b[13] << 16) | (b[14] << 8) | b[15];
+       return ret;
+}
+
 /* expecting rx buffer: request data[0] data[1] ... data[2] */
 static int dib0700_ctrl_wr(struct dvb_usb_device *d, u8 *tx, u8 txlen)
 {
index 0cfccc24b1907acad9d4db7ea6f3d77b5a6e7a1a..f28d3ae59e046cd8e9d1d6c74565848ccb4a9833 100644 (file)
@@ -38,6 +38,7 @@ static struct mt2060_config bristol_mt2060_config[2] = {
        }
 };
 
+
 static struct dibx000_agc_config bristol_dib3000p_mt2060_agc_config = {
        .band_caps = BAND_VHF | BAND_UHF,
        .setup     = (1 << 8) | (5 << 5) | (0 << 4) | (0 << 3) | (0 << 2) | (2 << 0),
@@ -451,8 +452,13 @@ static u8 rc_request[] = { REQUEST_POLL_RC, 0 };
 
 /* Number of keypresses to ignore before start repeating */
 #define RC_REPEAT_DELAY 2
+#define RC_REPEAT_DELAY_V1_20 5
 
-static int dib0700_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
+
+
+/* Used by firmware versions < 1.20 (deprecated) */
+static int dib0700_rc_query_legacy(struct dvb_usb_device *d, u32 *event,
+                                  int *state)
 {
        u8 key[4];
        int i;
@@ -529,6 +535,137 @@ static int dib0700_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
        return 0;
 }
 
+/* This is the structure of the RC response packet starting in firmware 1.20 */
+struct dib0700_rc_response {
+       u8 report_id;
+       u8 data_state;
+       u8 system_msb;
+       u8 system_lsb;
+       u8 data;
+       u8 not_data;
+};
+
+/* This supports the new IR response format for firmware v1.20 */
+static int dib0700_rc_query_v1_20(struct dvb_usb_device *d, u32 *event,
+                                 int *state)
+{
+       struct dvb_usb_rc_key *keymap = d->props.rc_key_map;
+       struct dib0700_state *st = d->priv;
+       struct dib0700_rc_response poll_reply;
+       u8 buf[6];
+       int i;
+       int status;
+       int actlen;
+       int found = 0;
+
+       /* Set initial results in case we exit the function early */
+       *event = 0;
+       *state = REMOTE_NO_KEY_PRESSED;
+
+       /* Firmware v1.20 provides RC data via bulk endpoint 1 */
+       status = usb_bulk_msg(d->udev, usb_rcvbulkpipe(d->udev, 1), buf,
+                             sizeof(buf), &actlen, 50);
+       if (status < 0) {
+               /* No data available (meaning no key press) */
+               return 0;
+       }
+
+       if (actlen != sizeof(buf)) {
+               /* We didn't get back the 6 byte message we expected */
+               err("Unexpected RC response size [%d]", actlen);
+               return -1;
+       }
+
+       poll_reply.report_id  = buf[0];
+       poll_reply.data_state = buf[1];
+       poll_reply.system_msb = buf[2];
+       poll_reply.system_lsb = buf[3];
+       poll_reply.data       = buf[4];
+       poll_reply.not_data   = buf[5];
+
+       /*
+       info("rid=%02x ds=%02x sm=%02x sl=%02x d=%02x nd=%02x\n",
+            poll_reply.report_id, poll_reply.data_state,
+            poll_reply.system_msb, poll_reply.system_lsb,
+            poll_reply.data, poll_reply.not_data);
+       */
+
+       if ((poll_reply.data + poll_reply.not_data) != 0xff) {
+               /* Key failed integrity check */
+               err("key failed integrity check: %02x %02x %02x %02x",
+                   poll_reply.system_msb, poll_reply.system_lsb,
+                   poll_reply.data, poll_reply.not_data);
+               return -1;
+       }
+
+       /* Find the key in the map */
+       for (i = 0; i < d->props.rc_key_map_size; i++) {
+               if (keymap[i].custom == poll_reply.system_lsb &&
+                   keymap[i].data == poll_reply.data) {
+                       *event = keymap[i].event;
+                       found = 1;
+                       break;
+               }
+       }
+
+       if (found == 0) {
+               err("Unknown remote controller key: %02x %02x %02x %02x",
+                   poll_reply.system_msb, poll_reply.system_lsb,
+                   poll_reply.data, poll_reply.not_data);
+               d->last_event = 0;
+               return 0;
+       }
+
+       if (poll_reply.data_state == 1) {
+               /* New key hit */
+               st->rc_counter = 0;
+               *event = keymap[i].event;
+               *state = REMOTE_KEY_PRESSED;
+               d->last_event = keymap[i].event;
+       } else if (poll_reply.data_state == 2) {
+               /* Key repeated */
+               st->rc_counter++;
+
+               /* prevents unwanted double hits */
+               if (st->rc_counter > RC_REPEAT_DELAY_V1_20) {
+                       *event = d->last_event;
+                       *state = REMOTE_KEY_PRESSED;
+                       st->rc_counter = RC_REPEAT_DELAY_V1_20;
+               }
+       } else {
+               err("Unknown data state [%d]", poll_reply.data_state);
+       }
+
+       return 0;
+}
+
+static int dib0700_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
+{
+       struct dib0700_state *st = d->priv;
+
+       /* Because some people may have improperly named firmware files,
+          let's figure out whether to use the new firmware call or the legacy
+          call based on the firmware version embedded in the file */
+       if (st->rc_func_version == 0) {
+               u32 hwver, romver, ramver, fwtype;
+               int ret = dib0700_get_version(d, &hwver, &romver, &ramver,
+                                             &fwtype);
+               if (ret < 0) {
+                       err("Could not determine version info");
+                       return -1;
+               }
+               if (ramver < 0x10200)
+                       st->rc_func_version = 1;
+               else
+                       st->rc_func_version = 2;
+       }
+
+       if (st->rc_func_version == 2)
+               return dib0700_rc_query_v1_20(d, event, state);
+       else
+               return dib0700_rc_query_legacy(d, event, state);
+}
+
 static struct dvb_usb_rc_key dib0700_rc_keys[] = {
        /* Key codes for the tiny Pinnacle remote*/
        { 0x07, 0x00, KEY_MUTE },
index 397f51a7b2ada50abe6078540f6f37ae25edef85..da93b9e982c04e3c67dbc0db671d43ca313a41ee 100644 (file)
@@ -135,7 +135,7 @@ stream->buf_list[stream->buf_num], (long long)stream->dma_addr[stream->buf_num])
 
 static int usb_bulk_urb_init(struct usb_data_stream *stream)
 {
-       int i;
+       int i, j;
 
        if ((i = usb_allocate_stream_buffers(stream,stream->props.count,
                                        stream->props.u.bulk.buffersize)) < 0)
@@ -143,9 +143,13 @@ static int usb_bulk_urb_init(struct usb_data_stream *stream)
 
        /* allocate the URBs */
        for (i = 0; i < stream->props.count; i++) {
-               if ((stream->urb_list[i] = usb_alloc_urb(0,GFP_ATOMIC)) == NULL)
+               stream->urb_list[i] = usb_alloc_urb(0, GFP_ATOMIC);
+               if (!stream->urb_list[i]) {
+                       deb_mem("not enough memory for urb_alloc_urb!.\n");
+                       for (j = 0; j < i; j++)
+                               usb_free_urb(stream->urb_list[i]);
                        return -ENOMEM;
-
+               }
                usb_fill_bulk_urb( stream->urb_list[i], stream->udev,
                                usb_rcvbulkpipe(stream->udev,stream->props.endpoint),
                                stream->buf_list[i],
@@ -170,9 +174,14 @@ static int usb_isoc_urb_init(struct usb_data_stream *stream)
        for (i = 0; i < stream->props.count; i++) {
                struct urb *urb;
                int frame_offset = 0;
-               if ((stream->urb_list[i] =
-                                       usb_alloc_urb(stream->props.u.isoc.framesperurb,GFP_ATOMIC)) == NULL)
+
+               stream->urb_list[i] = usb_alloc_urb(stream->props.u.isoc.framesperurb, GFP_ATOMIC);
+               if (!stream->urb_list[i]) {
+                       deb_mem("not enough memory for urb_alloc_urb!\n");
+                       for (j = 0; j < i; j++)
+                               usb_free_urb(stream->urb_list[i]);
                        return -ENOMEM;
+               }
 
                urb = stream->urb_list[i];
 
index 6f9b773604401309191704207a0035cc0892029a..e98d6caf2c233843bad9018842bd87d64cb2170b 100644 (file)
@@ -95,7 +95,7 @@ static struct sms_board sms_boards[] = {
        [SMS1XXX_BOARD_HAUPPAUGE_WINDHAM] = {
                .name   = "Hauppauge WinTV MiniStick",
                .type   = SMS_NOVA_B0,
-               .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-01.fw",
+               .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw",
        },
 };
 
index 66ab0c6e9783da4f8a99cca3699c3a32dd51ec58..4a3f2b8ea37d448a6cb0f062cc089e2d63114ff7 100644 (file)
@@ -808,6 +808,12 @@ static int ttusb_alloc_iso_urbs(struct ttusb *ttusb)
                                                 ISO_BUF_COUNT,
                                                 &ttusb->iso_dma_handle);
 
+       if (!ttusb->iso_buffer) {
+               dprintk("%s: pci_alloc_consistent - not enough memory\n",
+                       __func__);
+               return -ENOMEM;
+       }
+
        memset(ttusb->iso_buffer, 0,
               ISO_FRAME_SIZE * FRAMES_PER_ISO_BUF * ISO_BUF_COUNT);
 
@@ -1659,7 +1665,14 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
 
        ttusb_setup_interfaces(ttusb);
 
-       ttusb_alloc_iso_urbs(ttusb);
+       result = ttusb_alloc_iso_urbs(ttusb);
+       if (result < 0) {
+               dprintk("%s: ttusb_alloc_iso_urbs - failed\n", __func__);
+               mutex_unlock(&ttusb->semi2c);
+               kfree(ttusb);
+               return result;
+       }
+
        if (ttusb_init_controller(ttusb))
                printk("ttusb_init_controller: error\n");
 
index ab33fec8a19fbcef75855786f5dadc44c2bf721f..0aa96df80fc2bad8337263e1c23cc9b234f78885 100644 (file)
@@ -1157,6 +1157,12 @@ static int ttusb_dec_alloc_iso_urbs(struct ttusb_dec *dec)
                                                ISO_BUF_COUNT),
                                               &dec->iso_dma_handle);
 
+       if (!dec->iso_buffer) {
+               dprintk("%s: pci_alloc_consistent - not enough memory\n",
+                       __func__);
+               return -ENOMEM;
+       }
+
        memset(dec->iso_buffer, 0,
               ISO_FRAME_SIZE * (FRAMES_PER_ISO_BUF * ISO_BUF_COUNT));
 
@@ -1254,6 +1260,7 @@ static int ttusb_dec_init_usb(struct ttusb_dec *dec)
                dec->irq_buffer = usb_buffer_alloc(dec->udev,IRQ_PACKET_SIZE,
                                        GFP_ATOMIC, &dec->irq_dma_handle);
                if(!dec->irq_buffer) {
+                       usb_free_urb(dec->irq_urb);
                        return -ENOMEM;
                }
                usb_fill_int_urb(dec->irq_urb, dec->udev,dec->irq_pipe,
index ac3292d7646cb71cc3eb2f229e9b81f352c5c769..7a8d49ef646e62cb22127dd9387070dfcc1db22e 100644 (file)
@@ -62,7 +62,7 @@ static int em28xx_isoc_audio_deinit(struct em28xx *dev)
 
        dprintk("Stopping isoc\n");
        for (i = 0; i < EM28XX_AUDIO_BUFS; i++) {
-               usb_kill_urb(dev->adev->urb[i]);
+               usb_unlink_urb(dev->adev->urb[i]);
                usb_free_urb(dev->adev->urb[i]);
                dev->adev->urb[i] = NULL;
        }
@@ -75,7 +75,6 @@ static void em28xx_audio_isocirq(struct urb *urb)
        struct em28xx            *dev = urb->context;
        int                      i;
        unsigned int             oldptr;
-       unsigned long            flags;
        int                      period_elapsed = 0;
        int                      status;
        unsigned char            *cp;
@@ -96,9 +95,21 @@ static void em28xx_audio_isocirq(struct urb *urb)
                        if (!length)
                                continue;
 
-                       spin_lock_irqsave(&dev->adev->slock, flags);
-
                        oldptr = dev->adev->hwptr_done_capture;
+                       if (oldptr + length >= runtime->buffer_size) {
+                               unsigned int cnt =
+                                   runtime->buffer_size - oldptr;
+                               memcpy(runtime->dma_area + oldptr * stride, cp,
+                                      cnt * stride);
+                               memcpy(runtime->dma_area, cp + cnt * stride,
+                                      length * stride - cnt * stride);
+                       } else {
+                               memcpy(runtime->dma_area + oldptr * stride, cp,
+                                      length * stride);
+                       }
+
+                       snd_pcm_stream_lock(substream);
+
                        dev->adev->hwptr_done_capture += length;
                        if (dev->adev->hwptr_done_capture >=
                            runtime->buffer_size)
@@ -113,19 +124,7 @@ static void em28xx_audio_isocirq(struct urb *urb)
                                period_elapsed = 1;
                        }
 
-                       spin_unlock_irqrestore(&dev->adev->slock, flags);
-
-                       if (oldptr + length >= runtime->buffer_size) {
-                               unsigned int cnt =
-                                   runtime->buffer_size - oldptr;
-                               memcpy(runtime->dma_area + oldptr * stride, cp,
-                                      cnt * stride);
-                               memcpy(runtime->dma_area, cp + cnt * stride,
-                                      length * stride - cnt * stride);
-                       } else {
-                               memcpy(runtime->dma_area + oldptr * stride, cp,
-                                      length * stride);
-                       }
+                       snd_pcm_stream_unlock(substream);
                }
                if (period_elapsed)
                        snd_pcm_period_elapsed(substream);
index 5d837c16ee22ad10908cce01c0ef0d89768f14ed..15e2b525310db9af34bf6377f573691ed04c1314 100644 (file)
@@ -69,19 +69,33 @@ int em28xx_read_reg_req_len(struct em28xx *dev, u8 req, u16 reg,
        int ret, byte;
 
        if (dev->state & DEV_DISCONNECTED)
-               return(-ENODEV);
+               return -ENODEV;
+
+       if (len > URB_MAX_CTRL_SIZE)
+               return -EINVAL;
 
        em28xx_regdbg("req=%02x, reg=%02x ", req, reg);
 
+       mutex_lock(&dev->ctrl_urb_lock);
        ret = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), req,
                              USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-                             0x0000, reg, buf, len, HZ);
+                             0x0000, reg, dev->urb_buf, len, HZ);
+       if (ret < 0) {
+               if (reg_debug)
+                       printk(" failed!\n");
+               mutex_unlock(&dev->ctrl_urb_lock);
+               return ret;
+       }
+
+       if (len)
+               memcpy(buf, dev->urb_buf, len);
+
+       mutex_unlock(&dev->ctrl_urb_lock);
 
        if (reg_debug) {
-               printk(ret < 0 ? " failed!\n" : "%02x values: ", ret);
+               printk("%02x values: ", ret);
                for (byte = 0; byte < len; byte++)
                        printk(" %02x", (unsigned char)buf[byte]);
-
                printk("\n");
        }
 
@@ -102,16 +116,20 @@ int em28xx_read_reg_req(struct em28xx *dev, u8 req, u16 reg)
 
        em28xx_regdbg("req=%02x, reg=%02x:", req, reg);
 
+       mutex_lock(&dev->ctrl_urb_lock);
        ret = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), req,
                              USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-                             0x0000, reg, &val, 1, HZ);
-
-       if (reg_debug)
-               printk(ret < 0 ? " failed!\n" :
-                                "%02x\n", (unsigned char) val);
+                             0x0000, reg, dev->urb_buf, 1, HZ);
+       val = dev->urb_buf[0];
+       mutex_unlock(&dev->ctrl_urb_lock);
 
-       if (ret < 0)
+       if (ret < 0) {
+               printk(" failed!\n");
                return ret;
+       }
+
+       if (reg_debug)
+               printk("%02x\n", (unsigned char) val);
 
        return val;
 }
@@ -130,19 +148,13 @@ int em28xx_write_regs_req(struct em28xx *dev, u8 req, u16 reg, char *buf,
 {
        int ret;
 
-       /*usb_control_msg seems to expect a kmalloced buffer */
-       unsigned char *bufs;
-
        if (dev->state & DEV_DISCONNECTED)
                return -ENODEV;
 
-       if (len < 1)
+       if ((len < 1) || (len > URB_MAX_CTRL_SIZE))
                return -EINVAL;
 
-       bufs = kmalloc(len, GFP_KERNEL);
-
        em28xx_regdbg("req=%02x reg=%02x:", req, reg);
-
        if (reg_debug) {
                int i;
                for (i = 0; i < len; ++i)
@@ -150,16 +162,16 @@ int em28xx_write_regs_req(struct em28xx *dev, u8 req, u16 reg, char *buf,
                printk("\n");
        }
 
-       if (!bufs)
-               return -ENOMEM;
-       memcpy(bufs, buf, len);
+       mutex_lock(&dev->ctrl_urb_lock);
+       memcpy(dev->urb_buf, buf, len);
        ret = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0), req,
                              USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-                             0x0000, reg, bufs, len, HZ);
+                             0x0000, reg, dev->urb_buf, len, HZ);
+       mutex_unlock(&dev->ctrl_urb_lock);
+
        if (dev->wait_after_write)
                msleep(dev->wait_after_write);
 
-       kfree(bufs);
        return ret;
 }
 
@@ -270,6 +282,8 @@ static int em28xx_set_audio_source(struct em28xx *dev)
                        break;
                case EM28XX_AMUX_LINE_IN:
                        input = EM28XX_AUDIO_SRC_LINE;
+                       video = disable;
+                       line  = enable;
                        break;
                case EM28XX_AMUX_AC97_VIDEO:
                        input = EM28XX_AUDIO_SRC_LINE;
index 3bab56b997fc391033b47e262f6d72855d11e15b..2360c61ddca97e2930a69ab646648da96337d86a 100644 (file)
@@ -337,9 +337,9 @@ static int em28xx_i2c_eeprom(struct em28xx *dev, unsigned char *eedata, int len)
        /* Check if board has eeprom */
        err = i2c_master_recv(&dev->i2c_client, &buf, 0);
        if (err < 0) {
-               em28xx_errdev("%s: i2c_master_recv failed! err [%d]\n",
-                       __func__, err);
-               return err;
+               em28xx_errdev("board has no eeprom\n");
+               memset(eedata, 0, len);
+               return -ENODEV;
        }
 
        buf = 0;
@@ -609,14 +609,16 @@ int em28xx_i2c_register(struct em28xx *dev)
        dev->i2c_client.adapter = &dev->i2c_adap;
 
        retval = em28xx_i2c_eeprom(dev, dev->eedata, sizeof(dev->eedata));
-       if (retval < 0) {
+       if ((retval < 0) && (retval != -ENODEV)) {
                em28xx_errdev("%s: em28xx_i2_eeprom failed! retval [%d]\n",
                        __func__, retval);
+
                return retval;
        }
 
        if (i2c_scan)
                em28xx_do_i2c_scan(dev);
+
        return 0;
 }
 
index a1ab2ef45578d491ea9951ef1ddfe933b85294fb..610f535a257cd3c47b40d80484ad952177aaec38 100644 (file)
@@ -73,6 +73,7 @@ MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
 static LIST_HEAD(em28xx_devlist);
+static DEFINE_MUTEX(em28xx_devlist_mutex);
 
 static unsigned int card[]     = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET };
 static unsigned int video_nr[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET };
@@ -1519,7 +1520,7 @@ static int em28xx_v4l2_open(struct inode *inode, struct file *filp)
        struct em28xx_fh *fh;
        enum v4l2_buf_type fh_type = 0;
 
-       lock_kernel();
+       mutex_lock(&em28xx_devlist_mutex);
        list_for_each_entry(h, &em28xx_devlist, devlist) {
                if (h->vdev->minor == minor) {
                        dev  = h;
@@ -1535,10 +1536,11 @@ static int em28xx_v4l2_open(struct inode *inode, struct file *filp)
                        dev   = h;
                }
        }
-       if (NULL == dev) {
-               unlock_kernel();
+       mutex_unlock(&em28xx_devlist_mutex);
+       if (NULL == dev)
                return -ENODEV;
-       }
+
+       mutex_lock(&dev->lock);
 
        em28xx_videodbg("open minor=%d type=%s users=%d\n",
                                minor, v4l2_type_names[fh_type], dev->users);
@@ -1547,10 +1549,9 @@ static int em28xx_v4l2_open(struct inode *inode, struct file *filp)
        fh = kzalloc(sizeof(struct em28xx_fh), GFP_KERNEL);
        if (!fh) {
                em28xx_errdev("em28xx-video.c: Out of memory?!\n");
-               unlock_kernel();
+               mutex_unlock(&dev->lock);
                return -ENOMEM;
        }
-       mutex_lock(&dev->lock);
        fh->dev = dev;
        fh->radio = radio;
        fh->type = fh_type;
@@ -1584,7 +1585,6 @@ static int em28xx_v4l2_open(struct inode *inode, struct file *filp)
                        sizeof(struct em28xx_buffer), fh);
 
        mutex_unlock(&dev->lock);
-       unlock_kernel();
 
        return errCode;
 }
@@ -1871,6 +1871,7 @@ int em28xx_register_extension(struct em28xx_ops *ops)
 {
        struct em28xx *dev = NULL;
 
+       mutex_lock(&em28xx_devlist_mutex);
        mutex_lock(&em28xx_extension_devlist_lock);
        list_add_tail(&ops->next, &em28xx_extension_devlist);
        list_for_each_entry(dev, &em28xx_devlist, devlist) {
@@ -1879,6 +1880,7 @@ int em28xx_register_extension(struct em28xx_ops *ops)
        }
        printk(KERN_INFO "Em28xx: Initialized (%s) extension\n", ops->name);
        mutex_unlock(&em28xx_extension_devlist_lock);
+       mutex_unlock(&em28xx_devlist_mutex);
        return 0;
 }
 EXPORT_SYMBOL(em28xx_register_extension);
@@ -1887,6 +1889,7 @@ void em28xx_unregister_extension(struct em28xx_ops *ops)
 {
        struct em28xx *dev = NULL;
 
+       mutex_lock(&em28xx_devlist_mutex);
        list_for_each_entry(dev, &em28xx_devlist, devlist) {
                if (dev)
                        ops->fini(dev);
@@ -1896,6 +1899,7 @@ void em28xx_unregister_extension(struct em28xx_ops *ops)
        printk(KERN_INFO "Em28xx: Removed (%s) extension\n", ops->name);
        list_del(&ops->next);
        mutex_unlock(&em28xx_extension_devlist_lock);
+       mutex_unlock(&em28xx_devlist_mutex);
 }
 EXPORT_SYMBOL(em28xx_unregister_extension);
 
@@ -1921,6 +1925,60 @@ static struct video_device *em28xx_vdev_init(struct em28xx *dev,
 }
 
 
+static int register_analog_devices(struct em28xx *dev)
+{
+       int ret;
+
+       /* allocate and fill video video_device struct */
+       dev->vdev = em28xx_vdev_init(dev, &em28xx_video_template, "video");
+       if (!dev->vdev) {
+               em28xx_errdev("cannot allocate video_device.\n");
+               return -ENODEV;
+       }
+
+       /* register v4l2 video video_device */
+       ret = video_register_device(dev->vdev, VFL_TYPE_GRABBER,
+                                      video_nr[dev->devno]);
+       if (ret) {
+               em28xx_errdev("unable to register video device (error=%i).\n",
+                             ret);
+               return ret;
+       }
+
+       /* Allocate and fill vbi video_device struct */
+       dev->vbi_dev = em28xx_vdev_init(dev, &em28xx_video_template, "vbi");
+
+       /* register v4l2 vbi video_device */
+       ret = video_register_device(dev->vbi_dev, VFL_TYPE_VBI,
+                                       vbi_nr[dev->devno]);
+       if (ret < 0) {
+               em28xx_errdev("unable to register vbi device\n");
+               return ret;
+       }
+
+       if (em28xx_boards[dev->model].radio.type == EM28XX_RADIO) {
+               dev->radio_dev = em28xx_vdev_init(dev, &em28xx_radio_template, "radio");
+               if (!dev->radio_dev) {
+                       em28xx_errdev("cannot allocate video_device.\n");
+                       return -ENODEV;
+               }
+               ret = video_register_device(dev->radio_dev, VFL_TYPE_RADIO,
+                                           radio_nr[dev->devno]);
+               if (ret < 0) {
+                       em28xx_errdev("can't register radio device\n");
+                       return ret;
+               }
+               em28xx_info("Registered radio device as /dev/radio%d\n",
+                           dev->radio_dev->num);
+       }
+
+       em28xx_info("V4L2 device registered as /dev/video%d and /dev/vbi%d\n",
+                               dev->vdev->num, dev->vbi_dev->num);
+
+       return 0;
+}
+
+
 /*
  * em28xx_init_dev()
  * allocates and inits the device structs, registers i2c bus and v4l device
@@ -1936,6 +1994,7 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
 
        dev->udev = udev;
        mutex_init(&dev->lock);
+       mutex_init(&dev->ctrl_urb_lock);
        spin_lock_init(&dev->slock);
        init_waitqueue_head(&dev->open);
        init_waitqueue_head(&dev->wait_frame);
@@ -1953,8 +2012,6 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
        errCode = em28xx_config(dev);
        if (errCode) {
                em28xx_errdev("error configuring device\n");
-               em28xx_devused &= ~(1<<dev->devno);
-               kfree(dev);
                return -ENOMEM;
        }
 
@@ -2001,50 +2058,6 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
                return errCode;
        }
 
-       list_add_tail(&dev->devlist, &em28xx_devlist);
-
-       /* allocate and fill video video_device struct */
-       dev->vdev = em28xx_vdev_init(dev, &em28xx_video_template, "video");
-       if (NULL == dev->vdev) {
-               em28xx_errdev("cannot allocate video_device.\n");
-               goto fail_unreg;
-       }
-
-       /* register v4l2 video video_device */
-       retval = video_register_device(dev->vdev, VFL_TYPE_GRABBER,
-                                      video_nr[dev->devno]);
-       if (retval) {
-               em28xx_errdev("unable to register video device (error=%i).\n",
-                             retval);
-               goto fail_unreg;
-       }
-
-       /* Allocate and fill vbi video_device struct */
-       dev->vbi_dev = em28xx_vdev_init(dev, &em28xx_video_template, "vbi");
-       /* register v4l2 vbi video_device */
-       if (video_register_device(dev->vbi_dev, VFL_TYPE_VBI,
-                                       vbi_nr[dev->devno]) < 0) {
-               em28xx_errdev("unable to register vbi device\n");
-               retval = -ENODEV;
-               goto fail_unreg;
-       }
-
-       if (em28xx_boards[dev->model].radio.type == EM28XX_RADIO) {
-               dev->radio_dev = em28xx_vdev_init(dev, &em28xx_radio_template, "radio");
-               if (NULL == dev->radio_dev) {
-                       em28xx_errdev("cannot allocate video_device.\n");
-                       goto fail_unreg;
-               }
-               retval = video_register_device(dev->radio_dev, VFL_TYPE_RADIO,
-                                           radio_nr[dev->devno]);
-               if (retval < 0) {
-                       em28xx_errdev("can't register radio device\n");
-                       goto fail_unreg;
-               }
-               em28xx_info("Registered radio device as /dev/radio%d\n",
-                           dev->radio_dev->num);
-       }
-
        /* init video dma queues */
        INIT_LIST_HEAD(&dev->vidq.active);
        INIT_LIST_HEAD(&dev->vidq.queued);
@@ -2071,8 +2084,14 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
 
        video_mux(dev, 0);
 
-       em28xx_info("V4L2 device registered as /dev/video%d and /dev/vbi%d\n",
-                               dev->vdev->num, dev->vbi_dev->num);
+       mutex_lock(&em28xx_devlist_mutex);
+       list_add_tail(&dev->devlist, &em28xx_devlist);
+       retval = register_analog_devices(dev);
+       if (retval < 0) {
+               em28xx_release_resources(dev);
+               mutex_unlock(&em28xx_devlist_mutex);
+               goto fail_reg_devices;
+       }
 
        mutex_lock(&em28xx_extension_devlist_lock);
        if (!list_empty(&em28xx_extension_devlist)) {
@@ -2082,13 +2101,12 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
                }
        }
        mutex_unlock(&em28xx_extension_devlist_lock);
+       mutex_unlock(&em28xx_devlist_mutex);
 
        return 0;
 
-fail_unreg:
-       em28xx_release_resources(dev);
+fail_reg_devices:
        mutex_unlock(&dev->lock);
-       kfree(dev);
        return retval;
 }
 
@@ -2231,8 +2249,12 @@ static int em28xx_usb_probe(struct usb_interface *interface,
 
        /* allocate device struct */
        retval = em28xx_init_dev(&dev, udev, nr);
-       if (retval)
+       if (retval) {
+               em28xx_devused &= ~(1<<dev->devno);
+               kfree(dev);
+
                return retval;
+       }
 
        em28xx_info("Found %s\n", em28xx_boards[dev->model].name);
 
index 82781178e0a3e23c7514a09bf6600c02d658ae36..5956e9b3062f5147ad34bb354412910a45f2fafe 100644 (file)
 #define EM28XX_MIN_BUF 4
 #define EM28XX_DEF_BUF 8
 
+/*Limits the max URB message size */
+#define URB_MAX_CTRL_SIZE 80
+
 /* Params for validated field */
 #define EM28XX_BOARD_NOT_VALIDATED 1
 #define EM28XX_BOARD_VALIDATED    0
@@ -430,6 +433,7 @@ struct em28xx {
 
        /* locks */
        struct mutex lock;
+       struct mutex ctrl_urb_lock;     /* protects urb_buf */
        /* spinlock_t queue_lock; */
        struct list_head inqueue, outqueue;
        wait_queue_head_t open, wait_frame, wait_stream;
@@ -451,6 +455,8 @@ struct em28xx {
        unsigned int *alt_max_pkt_size; /* array of wMaxPacketSize */
        struct urb *urb[EM28XX_NUM_BUFS];       /* urb for isoc transfers */
        char *transfer_buffer[EM28XX_NUM_BUFS]; /* transfer buffers for isoc transfer */
+       char urb_buf[URB_MAX_CTRL_SIZE];        /* urb control msg buffer */
+
        /* helper funcs that call usb_control_msg */
        int (*em28xx_write_regs) (struct em28xx *dev, u16 reg,
                                        char *buf, int len);
index a9d51ba7c57ce7f79f736f3e1cf462afeea75ac3..de28354ea5bac3e0a6a9650ac2266aba2a026ee3 100644 (file)
@@ -846,10 +846,13 @@ static int sd_start(struct gspca_dev *gspca_dev)
        return 0;
 }
 
+/* called on streamoff with alt 0 and on disconnect */
 static void sd_stop0(struct gspca_dev *gspca_dev)
 {
        int retry = 50;
 
+       if (!gspca_dev->present)
+               return;
        reg_w_val(gspca_dev, 0x0000, 0x00);
        reg_r(gspca_dev, 0x0002, 1);
        reg_w_val(gspca_dev, 0x0053, 0x00);
index 65d3cbfe6b278e7446038696a2eaa8172d1695f5..607942fd797004cb0737cac2af973e5e21623f9b 100644 (file)
@@ -276,6 +276,12 @@ static void sd_stopN(struct gspca_dev *gspca_dev)
        /* Stop the state machine */
        if (dev->state != FPIX_NOP)
                wait_for_completion(&dev->can_close);
+}
+
+/* called on streamoff with alt 0 and disconnect */
+static void sd_stop0(struct gspca_dev *gspca_dev)
+{
+       struct usb_fpix *dev = (struct usb_fpix *) gspca_dev;
 
        usb_free_urb(dev->control_urb);
        dev->control_urb = NULL;
@@ -385,6 +391,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
 error:
        /* Free the ressources */
        sd_stopN(gspca_dev);
+       sd_stop0(gspca_dev);
        return ret;
 }
 
@@ -425,6 +432,7 @@ static const struct sd_desc sd_desc = {
        .init = sd_init,
        .start = sd_start,
        .stopN = sd_stopN,
+       .stop0 = sd_stop0,
 };
 
 /* -- device connect -- */
index e48fbfc8ad05d72c4065fdf0ae42aa41b298f88d..748a87e82e4423e2b9ecfb4c4ac621a339231e4a 100644 (file)
@@ -646,15 +646,14 @@ static void gspca_stream_off(struct gspca_dev *gspca_dev)
 {
        gspca_dev->streaming = 0;
        atomic_set(&gspca_dev->nevent, 0);
-       if (gspca_dev->present) {
-               if (gspca_dev->sd_desc->stopN)
-                       gspca_dev->sd_desc->stopN(gspca_dev);
-               destroy_urbs(gspca_dev);
-               gspca_set_alt0(gspca_dev);
-               if (gspca_dev->sd_desc->stop0)
-                       gspca_dev->sd_desc->stop0(gspca_dev);
-               PDEBUG(D_STREAM, "stream off OK");
-       }
+       if (gspca_dev->present
+           && gspca_dev->sd_desc->stopN)
+               gspca_dev->sd_desc->stopN(gspca_dev);
+       destroy_urbs(gspca_dev);
+       gspca_set_alt0(gspca_dev);
+       if (gspca_dev->sd_desc->stop0)
+               gspca_dev->sd_desc->stop0(gspca_dev);
+       PDEBUG(D_STREAM, "stream off OK");
 }
 
 static void gspca_set_default_mode(struct gspca_dev *gspca_dev)
@@ -863,7 +862,7 @@ static int dev_open(struct inode *inode, struct file *file)
        int ret;
 
        PDEBUG(D_STREAM, "%s open", current->comm);
-       gspca_dev = (struct gspca_dev *) video_devdata(file);
+       gspca_dev = video_drvdata(file);
        if (mutex_lock_interruptible(&gspca_dev->queue_lock))
                return -ERESTARTSYS;
        if (!gspca_dev->present) {
@@ -875,6 +874,13 @@ static int dev_open(struct inode *inode, struct file *file)
                ret = -EBUSY;
                goto out;
        }
+
+       /* protect the subdriver against rmmod */
+       if (!try_module_get(gspca_dev->module)) {
+               ret = -ENODEV;
+               goto out;
+       }
+
        gspca_dev->users++;
 
        /* one more user */
@@ -884,10 +890,10 @@ static int dev_open(struct inode *inode, struct file *file)
 #ifdef GSPCA_DEBUG
        /* activate the v4l2 debug */
        if (gspca_debug & D_V4L2)
-               gspca_dev->vdev.debug |= V4L2_DEBUG_IOCTL
+               gspca_dev->vdev->debug |= V4L2_DEBUG_IOCTL
                                        | V4L2_DEBUG_IOCTL_ARG;
        else
-               gspca_dev->vdev.debug &= ~(V4L2_DEBUG_IOCTL
+               gspca_dev->vdev->debug &= ~(V4L2_DEBUG_IOCTL
                                        | V4L2_DEBUG_IOCTL_ARG);
 #endif
        ret = 0;
@@ -921,6 +927,7 @@ static int dev_close(struct inode *inode, struct file *file)
                gspca_dev->memory = GSPCA_MEMORY_NO;
        }
        file->private_data = NULL;
+       module_put(gspca_dev->module);
        mutex_unlock(&gspca_dev->queue_lock);
 
        PDEBUG(D_STREAM, "close done");
@@ -1748,11 +1755,6 @@ out:
        return ret;
 }
 
-static void dev_release(struct video_device *vfd)
-{
-       /* nothing */
-}
-
 static struct file_operations dev_fops = {
        .owner = THIS_MODULE,
        .open = dev_open,
@@ -1800,7 +1802,7 @@ static struct video_device gspca_template = {
        .name = "gspca main driver",
        .fops = &dev_fops,
        .ioctl_ops = &dev_ioctl_ops,
-       .release = dev_release,         /* mandatory */
+       .release = video_device_release,
        .minor = -1,
 };
 
@@ -1869,17 +1871,18 @@ int gspca_dev_probe(struct usb_interface *intf,
        init_waitqueue_head(&gspca_dev->wq);
 
        /* init video stuff */
-       memcpy(&gspca_dev->vdev, &gspca_template, sizeof gspca_template);
-       gspca_dev->vdev.parent = &dev->dev;
-       memcpy(&gspca_dev->fops, &dev_fops, sizeof gspca_dev->fops);
-       gspca_dev->vdev.fops = &gspca_dev->fops;
-       gspca_dev->fops.owner = module;         /* module protection */
+       gspca_dev->vdev = video_device_alloc();
+       memcpy(gspca_dev->vdev, &gspca_template, sizeof gspca_template);
+       gspca_dev->vdev->parent = &dev->dev;
+       gspca_dev->module = module;
        gspca_dev->present = 1;
-       ret = video_register_device(&gspca_dev->vdev,
+       video_set_drvdata(gspca_dev->vdev, gspca_dev);
+       ret = video_register_device(gspca_dev->vdev,
                                  VFL_TYPE_GRABBER,
                                  video_nr);
        if (ret < 0) {
                err("video_register_device err %d", ret);
+               video_device_release(gspca_dev->vdev);
                goto out;
        }
 
@@ -1887,7 +1890,8 @@ int gspca_dev_probe(struct usb_interface *intf,
        PDEBUG(D_PROBE, "probe ok");
        return 0;
 out:
-       kref_put(&gspca_dev->kref, gspca_delete);
+       kfree(gspca_dev->usb_buf);
+       kfree(gspca_dev);
        return ret;
 }
 EXPORT_SYMBOL(gspca_dev_probe);
@@ -1905,7 +1909,7 @@ void gspca_disconnect(struct usb_interface *intf)
        usb_set_intfdata(intf, NULL);
 
 /* We don't want people trying to open up the device */
-       video_unregister_device(&gspca_dev->vdev);
+       video_unregister_device(gspca_dev->vdev);
 
        gspca_dev->present = 0;
        gspca_dev->streaming = 0;
index 1d9dc90b479137d87c878fc84a3ee9e022a61e45..d25e8d69373b8d94335579d4d337054e80164f31 100644 (file)
@@ -97,7 +97,7 @@ struct sd_desc {
        cam_pkt_op pkt_scan;
 /* optional operations */
        cam_v_op stopN;         /* called on stream off - main alt */
-       cam_v_op stop0;         /* called on stream off - alt 0 */
+       cam_v_op stop0;         /* called on stream off & disconnect - alt 0 */
        cam_v_op dq_callback;   /* called when a frame has been dequeued */
        cam_jpg_op get_jcomp;
        cam_jpg_op set_jcomp;
@@ -120,8 +120,8 @@ struct gspca_frame {
 };
 
 struct gspca_dev {
-       struct video_device vdev;       /* !! must be the first item */
-       struct file_operations fops;
+       struct video_device *vdev;
+       struct module *module;          /* subdriver handling the device */
        struct usb_device *dev;
        struct kref kref;
        struct file *capt_file;         /* file doing video capture */
index e5ff9a6199ef16261e85faec7d9ab85d97ebfc49..fbd45e235d970934633132385a081270adbbd5ef 100644 (file)
@@ -749,10 +749,13 @@ static void sd_stopN(struct gspca_dev *gspca_dev)
        reg_w(gspca_dev, 0x78, 0x44); /* Bit_0=start stream, Bit_6=LED */
 }
 
+/* called on streamoff with alt 0 and on disconnect */
 static void sd_stop0(struct gspca_dev *gspca_dev)
 {
        struct sd *sd = (struct sd *) gspca_dev;
 
+       if (!gspca_dev->present)
+               return;
        if (sd->sensor == SENSOR_PAC7302) {
                reg_w(gspca_dev, 0xff, 0x01);
                reg_w(gspca_dev, 0x78, 0x40);
index b742f260c7caa6bb4fd8b1769be95c87988bafcb..e29954c1c38c2888dfbc892fbcea07b24c8bf4e3 100644 (file)
@@ -2022,8 +2022,11 @@ static void sd_stopN(struct gspca_dev *gspca_dev)
        reg_write(gspca_dev->dev, SPCA501_REG_CTLRL, 0x01, 0x00);
 }
 
+/* called on streamoff with alt 0 and on disconnect */
 static void sd_stop0(struct gspca_dev *gspca_dev)
 {
+       if (!gspca_dev->present)
+               return;
        reg_write(gspca_dev->dev, SPCA501_REG_CTLRL, 0x05, 0x00);
 }
 
index b345749213cf16e9e0bd9e5cf2703d4cb9c9388f..895b9fe4018c48e8d1bc6b519ed63c7812ffc45c 100644 (file)
@@ -742,8 +742,12 @@ static void sd_stopN(struct gspca_dev *gspca_dev)
        reg_write(gspca_dev->dev, 0x02, 0x00, 0x00);
 }
 
+/* called on streamoff with alt 0 and on disconnect */
 static void sd_stop0(struct gspca_dev *gspca_dev)
 {
+       if (!gspca_dev->present)
+               return;
+
        /* This maybe reset or power control */
        reg_write(gspca_dev->dev, 0x03, 0x03, 0x20);
        reg_write(gspca_dev->dev, 0x03, 0x01, 0x0);
index 020a03c466c10f75042fcd090d0f1be7643e7fdc..c3de4e44123dc1dc0df17256eeaf3b1ae88441cc 100644 (file)
@@ -766,10 +766,13 @@ static void sd_stopN(struct gspca_dev *gspca_dev)
        }
 }
 
+/* called on streamoff with alt 0 and on disconnect */
 static void sd_stop0(struct gspca_dev *gspca_dev)
 {
        struct sd *sd = (struct sd *) gspca_dev;
 
+       if (!gspca_dev->present)
+               return;
        if (sd->chip_revision == Rev012A) {
                reg_w_val(gspca_dev->dev, 0x8118, 0x29);
                reg_w_val(gspca_dev->dev, 0x8114, 0x08);
index be46d92325404d66b48c6e527005c736c5102812..17af353ddd1c872226be39550073de968b3d925b 100644 (file)
@@ -1633,10 +1633,13 @@ static void sd_stopN(struct gspca_dev *gspca_dev)
        reg_w(dev, 0xa0, 0x09, 0xb003);
 }
 
+/* called on streamoff with alt 0 and on disconnect */
 static void sd_stop0(struct gspca_dev *gspca_dev)
 {
        struct usb_device *dev = gspca_dev->dev;
 
+       if (!gspca_dev->present)
+               return;
        reg_w(dev, 0x89, 0xffff, 0xffff);
 }
 
index 8b3101d347c36717d37bedc1564682c7d22295ac..0befacf4985541b833e230c5544ce2fff2ff51db 100644 (file)
@@ -7336,10 +7336,13 @@ static int sd_start(struct gspca_dev *gspca_dev)
        return 0;
 }
 
+/* called on streamoff with alt 0 and on disconnect */
 static void sd_stop0(struct gspca_dev *gspca_dev)
 {
        struct sd *sd = (struct sd *) gspca_dev;
 
+       if (!gspca_dev->present)
+               return;
        send_unknown(gspca_dev->dev, sd->sensor);
 }
 
index 5272926db73e93763f21aaf8ecc746fbb88f93f9..3c3f8cf73108a55280fb27bd33118fbe8f4c98e6 100644 (file)
@@ -192,7 +192,7 @@ struct s2255_dmaqueue {
 #define S2255_FW_FAILED                3
 #define S2255_FW_DISCONNECTING  4
 
-#define S2255_FW_MARKER         0x22552f2f
+#define S2255_FW_MARKER                cpu_to_le32(0x22552f2f)
 /* 2255 read states */
 #define S2255_READ_IDLE         0
 #define S2255_READ_FRAME        1
index b59e47272abfc292493e65bf66a0d2fbdda56f62..3720f0e03a16906efd339b0eefb89b5454499abf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * experimental driver for simple i2c audio chips.
+ * Driver for simple i2c audio chips.
  *
  * Copyright (c) 2000 Gerd Knorr
  * based on code by:
@@ -7,6 +7,10 @@
  *   Steve VanDeBogart (vandebo@uclink.berkeley.edu)
  *   Greg Alexander (galexand@acm.org)
  *
+ * Copyright(c) 2005-2008 Mauro Carvalho Chehab
+ *     - Some cleanups, code fixes, etc
+ *     - Convert it to V4L2 API
+ *
  * This code is placed under the terms of the GNU General Public License
  *
  * OPTIONS:
@@ -30,6 +34,7 @@
 
 #include <media/tvaudio.h>
 #include <media/v4l2-common.h>
+#include <media/v4l2-ioctl.h>
 #include <media/v4l2-chip-ident.h>
 #include <media/v4l2-i2c-drv-legacy.h>
 
@@ -58,7 +63,6 @@ typedef int  (*checkit)(struct CHIPSTATE*);
 typedef int  (*initialize)(struct CHIPSTATE*);
 typedef int  (*getmode)(struct CHIPSTATE*);
 typedef void (*setmode)(struct CHIPSTATE*, int mode);
-typedef void (*checkmode)(struct CHIPSTATE*);
 
 /* i2c command */
 typedef struct AUDIOCMD {
@@ -79,6 +83,7 @@ struct CHIPDESC {
 #define CHIP_HAS_VOLUME      1
 #define CHIP_HAS_BASSTREBLE  2
 #define CHIP_HAS_INPUTSEL    4
+#define CHIP_NEED_CHECKMODE  8
 
        /* various i2c command sequences */
        audiocmd   init;
@@ -96,23 +101,20 @@ struct CHIPDESC {
        getmode  getmode;
        setmode  setmode;
 
-       /* check / autoswitch audio after channel switches */
-       checkmode  checkmode;
-
        /* input switch register + values for v4l inputs */
        int  inputreg;
        int  inputmap[4];
        int  inputmute;
        int  inputmask;
 };
-static struct CHIPDESC chiplist[];
 
 /* current state of the chip */
 struct CHIPSTATE {
        struct i2c_client *c;
 
-       /* index into CHIPDESC array */
-       int type;
+       /* chip-specific description - should point to
+          an entry at CHIPDESC table */
+       struct CHIPDESC *desc;
 
        /* shadow register set */
        audiocmd   shadow;
@@ -152,7 +154,7 @@ static int chip_write(struct CHIPSTATE *chip, int subaddr, int val)
 {
        unsigned char buffer[2];
 
-       if (-1 == subaddr) {
+       if (subaddr < 0) {
                v4l_dbg(1, debug, chip->c, "%s: chip_write: 0x%x\n",
                        chip->c->name, val);
                chip->shadow.bytes[1] = val;
@@ -163,6 +165,13 @@ static int chip_write(struct CHIPSTATE *chip, int subaddr, int val)
                        return -1;
                }
        } else {
+               if (subaddr + 1 >= ARRAY_SIZE(chip->shadow.bytes)) {
+                       v4l_info(chip->c,
+                               "Tried to access a non-existent register: %d\n",
+                               subaddr);
+                       return -EINVAL;
+               }
+
                v4l_dbg(1, debug, chip->c, "%s: chip_write: reg%d=0x%x\n",
                        chip->c->name, subaddr, val);
                chip->shadow.bytes[subaddr+1] = val;
@@ -177,12 +186,20 @@ static int chip_write(struct CHIPSTATE *chip, int subaddr, int val)
        return 0;
 }
 
-static int chip_write_masked(struct CHIPSTATE *chip, int subaddr, int val, int mask)
+static int chip_write_masked(struct CHIPSTATE *chip,
+                            int subaddr, int val, int mask)
 {
        if (mask != 0) {
-               if (-1 == subaddr) {
+               if (subaddr < 0) {
                        val = (chip->shadow.bytes[1] & ~mask) | (val & mask);
                } else {
+                       if (subaddr + 1 >= ARRAY_SIZE(chip->shadow.bytes)) {
+                               v4l_info(chip->c,
+                                       "Tried to access a non-existent register: %d\n",
+                                       subaddr);
+                               return -EINVAL;
+                       }
+
                        val = (chip->shadow.bytes[subaddr+1] & ~mask) | (val & mask);
                }
        }
@@ -228,6 +245,15 @@ static int chip_cmd(struct CHIPSTATE *chip, char *name, audiocmd *cmd)
        if (0 == cmd->count)
                return 0;
 
+       if (cmd->count + cmd->bytes[0] - 1 >= ARRAY_SIZE(chip->shadow.bytes)) {
+               v4l_info(chip->c,
+                        "Tried to access a non-existent register range: %d to %d\n",
+                        cmd->bytes[0] + 1, cmd->bytes[0] + cmd->count - 1);
+               return -EINVAL;
+       }
+
+       /* FIXME: it seems that the shadow bytes are wrong bellow !*/
+
        /* update our shadow register set; print bytes if (debug > 0) */
        v4l_dbg(1, debug, chip->c, "%s: chip_cmd(%s): reg=%d, data:",
                chip->c->name, name,cmd->bytes[0]);
@@ -263,7 +289,8 @@ static void chip_thread_wake(unsigned long data)
 static int chip_thread(void *data)
 {
        struct CHIPSTATE *chip = data;
-       struct CHIPDESC  *desc = chiplist + chip->type;
+       struct CHIPDESC  *desc = chip->desc;
+       int mode;
 
        v4l_dbg(1, debug, chip->c, "%s: thread started\n", chip->c->name);
        set_freezable();
@@ -282,7 +309,26 @@ static int chip_thread(void *data)
                        continue;
 
                /* have a look what's going on */
-               desc->checkmode(chip);
+               mode = desc->getmode(chip);
+               if (mode == chip->prevmode)
+                       continue;
+
+               /* chip detected a new audio mode - set it */
+               v4l_dbg(1, debug, chip->c, "%s: thread checkmode\n",
+                       chip->c->name);
+
+               chip->prevmode = mode;
+
+               if (mode & V4L2_TUNER_MODE_STEREO)
+                       desc->setmode(chip, V4L2_TUNER_MODE_STEREO);
+               if (mode & V4L2_TUNER_MODE_LANG1_LANG2)
+                       desc->setmode(chip, V4L2_TUNER_MODE_STEREO);
+               else if (mode & V4L2_TUNER_MODE_LANG1)
+                       desc->setmode(chip, V4L2_TUNER_MODE_LANG1);
+               else if (mode & V4L2_TUNER_MODE_LANG2)
+                       desc->setmode(chip, V4L2_TUNER_MODE_LANG2);
+               else
+                       desc->setmode(chip, V4L2_TUNER_MODE_MONO);
 
                /* schedule next check */
                mod_timer(&chip->wt, jiffies+msecs_to_jiffies(2000));
@@ -292,29 +338,6 @@ static int chip_thread(void *data)
        return 0;
 }
 
-static void generic_checkmode(struct CHIPSTATE *chip)
-{
-       struct CHIPDESC  *desc = chiplist + chip->type;
-       int mode = desc->getmode(chip);
-
-       if (mode == chip->prevmode)
-       return;
-
-       v4l_dbg(1, debug, chip->c, "%s: thread checkmode\n", chip->c->name);
-       chip->prevmode = mode;
-
-       if (mode & V4L2_TUNER_MODE_STEREO)
-               desc->setmode(chip,V4L2_TUNER_MODE_STEREO);
-       if (mode & V4L2_TUNER_MODE_LANG1_LANG2)
-               desc->setmode(chip,V4L2_TUNER_MODE_STEREO);
-       else if (mode & V4L2_TUNER_MODE_LANG1)
-               desc->setmode(chip,V4L2_TUNER_MODE_LANG1);
-       else if (mode & V4L2_TUNER_MODE_LANG2)
-               desc->setmode(chip,V4L2_TUNER_MODE_LANG2);
-       else
-               desc->setmode(chip,V4L2_TUNER_MODE_MONO);
-}
-
 /* ---------------------------------------------------------------------- */
 /* audio chip descriptions - defines+functions for tda9840                */
 
@@ -777,7 +800,7 @@ static struct tda9874a_MODES {
        char *name;
        audiocmd cmd;
 } tda9874a_modelist[9] = {
-  {    "A2, B/G",
+  {    "A2, B/G", /* default */
        { 9, { TDA9874A_C1FRA, 0x72,0x95,0x55, 0x77,0xA0,0x00, 0x00,0x00 }} },
   {    "A2, M (Korea)",
        { 9, { TDA9874A_C1FRA, 0x5D,0xC0,0x00, 0x62,0x6A,0xAA, 0x20,0x22 }} },
@@ -791,7 +814,7 @@ static struct tda9874a_MODES {
        { 9, { TDA9874A_C1FRA, 0x7D,0x00,0x00, 0x88,0x8A,0xAA, 0x08,0x33 }} },
   {    "NICAM, B/G",
        { 9, { TDA9874A_C1FRA, 0x72,0x95,0x55, 0x79,0xEA,0xAA, 0x08,0x33 }} },
-  {    "NICAM, D/K", /* default */
+  {    "NICAM, D/K",
        { 9, { TDA9874A_C1FRA, 0x87,0x6A,0xAA, 0x79,0xEA,0xAA, 0x08,0x33 }} },
   {    "NICAM, L",
        { 9, { TDA9874A_C1FRA, 0x87,0x6A,0xAA, 0x79,0xEA,0xAA, 0x09,0x33 }} }
@@ -981,7 +1004,7 @@ static int tda9874a_initialize(struct CHIPSTATE *chip)
 {
        if (tda9874a_SIF > 2)
                tda9874a_SIF = 1;
-       if (tda9874a_STD > 8)
+       if (tda9874a_STD >= ARRAY_SIZE(tda9874a_modelist))
                tda9874a_STD = 0;
        if(tda9874a_AMSEL > 1)
                tda9874a_AMSEL = 0;
@@ -1089,7 +1112,7 @@ static int tda8425_shift12(int val) { return (val >> 12) | 0xf0; }
 
 static int tda8425_initialize(struct CHIPSTATE *chip)
 {
-       struct CHIPDESC *desc = chiplist + chip->type;
+       struct CHIPDESC *desc = chip->desc;
        int inputmap[4] = { /* tuner    */ TDA8425_S1_CH2, /* radio  */ TDA8425_S1_CH1,
                            /* extern   */ TDA8425_S1_CH1, /* intern */ TDA8425_S1_OFF};
 
@@ -1259,27 +1282,28 @@ static struct CHIPDESC chiplist[] = {
                .addr_lo    = I2C_ADDR_TDA9840 >> 1,
                .addr_hi    = I2C_ADDR_TDA9840 >> 1,
                .registers  = 5,
+               .flags      = CHIP_NEED_CHECKMODE,
 
+               /* callbacks */
                .checkit    = tda9840_checkit,
                .getmode    = tda9840_getmode,
                .setmode    = tda9840_setmode,
-               .checkmode  = generic_checkmode,
 
                .init       = { 2, { TDA9840_TEST, TDA9840_TEST_INT1SN
                                /* ,TDA9840_SW, TDA9840_MONO */} }
        },
        {
                .name       = "tda9873h",
-               .checkit    = tda9873_checkit,
                .insmodopt  = &tda9873,
                .addr_lo    = I2C_ADDR_TDA985x_L >> 1,
                .addr_hi    = I2C_ADDR_TDA985x_H >> 1,
                .registers  = 3,
-               .flags      = CHIP_HAS_INPUTSEL,
+               .flags      = CHIP_HAS_INPUTSEL | CHIP_NEED_CHECKMODE,
 
+               /* callbacks */
+               .checkit    = tda9873_checkit,
                .getmode    = tda9873_getmode,
                .setmode    = tda9873_setmode,
-               .checkmode  = generic_checkmode,
 
                .init       = { 4, { TDA9873_SW, 0xa4, 0x06, 0x03 } },
                .inputreg   = TDA9873_SW,
@@ -1290,15 +1314,16 @@ static struct CHIPDESC chiplist[] = {
        },
        {
                .name       = "tda9874h/a",
-               .checkit    = tda9874a_checkit,
-               .initialize = tda9874a_initialize,
                .insmodopt  = &tda9874a,
                .addr_lo    = I2C_ADDR_TDA9874 >> 1,
                .addr_hi    = I2C_ADDR_TDA9874 >> 1,
+               .flags      = CHIP_NEED_CHECKMODE,
 
+               /* callbacks */
+               .initialize = tda9874a_initialize,
+               .checkit    = tda9874a_checkit,
                .getmode    = tda9874a_getmode,
                .setmode    = tda9874a_setmode,
-               .checkmode  = generic_checkmode,
        },
        {
                .name       = "tda9850",
@@ -1324,10 +1349,11 @@ static struct CHIPDESC chiplist[] = {
                .rightreg   = TDA9855_VR,
                .bassreg    = TDA9855_BA,
                .treblereg  = TDA9855_TR,
+
+               /* callbacks */
                .volfunc    = tda9855_volume,
                .bassfunc   = tda9855_bass,
                .treblefunc = tda9855_treble,
-
                .getmode    = tda985x_getmode,
                .setmode    = tda985x_setmode,
 
@@ -1348,6 +1374,8 @@ static struct CHIPDESC chiplist[] = {
                .rightreg   = TEA6300_VL,
                .bassreg    = TEA6300_BA,
                .treblereg  = TEA6300_TR,
+
+               /* callbacks */
                .volfunc    = tea6300_shift10,
                .bassfunc   = tea6300_shift12,
                .treblefunc = tea6300_shift12,
@@ -1358,7 +1386,6 @@ static struct CHIPDESC chiplist[] = {
        },
        {
                .name       = "tea6320",
-               .initialize = tea6320_initialize,
                .insmodopt  = &tea6320,
                .addr_lo    = I2C_ADDR_TEA6300 >> 1,
                .addr_hi    = I2C_ADDR_TEA6300 >> 1,
@@ -1369,6 +1396,9 @@ static struct CHIPDESC chiplist[] = {
                .rightreg   = TEA6320_V,
                .bassreg    = TEA6320_BA,
                .treblereg  = TEA6320_TR,
+
+               /* callbacks */
+               .initialize = tea6320_initialize,
                .volfunc    = tea6320_volume,
                .bassfunc   = tea6320_shift11,
                .treblefunc = tea6320_shift11,
@@ -1401,16 +1431,18 @@ static struct CHIPDESC chiplist[] = {
                .rightreg   = TDA8425_VR,
                .bassreg    = TDA8425_BA,
                .treblereg  = TDA8425_TR,
+
+               /* callbacks */
+               .initialize = tda8425_initialize,
                .volfunc    = tda8425_shift10,
                .bassfunc   = tda8425_shift12,
                .treblefunc = tda8425_shift12,
+               .setmode    = tda8425_setmode,
 
                .inputreg   = TDA8425_S1,
                .inputmap   = { TDA8425_S1_CH1, TDA8425_S1_CH1, TDA8425_S1_CH1 },
                .inputmute  = TDA8425_S1_OFF,
 
-               .setmode    = tda8425_setmode,
-               .initialize = tda8425_initialize,
        },
        {
                .name       = "pic16c54 (PV951)",
@@ -1434,10 +1466,11 @@ static struct CHIPDESC chiplist[] = {
                .addr_lo    = I2C_ADDR_TDA9840 >> 1,
                .addr_hi    = I2C_ADDR_TDA9840 >> 1,
                .registers  = 2,
+               .flags      = CHIP_NEED_CHECKMODE,
 
+               /* callbacks */
                .getmode    = ta8874z_getmode,
                .setmode    = ta8874z_setmode,
-               .checkmode  = generic_checkmode,
 
                .init       = {2, { TA8874Z_MONO_SET, TA8874Z_SEPARATION_DEFAULT}},
        },
@@ -1481,6 +1514,7 @@ static int chip_probe(struct i2c_client *client, const struct i2c_device_id *id)
        }
        if (desc->name == NULL) {
                v4l_dbg(1, debug, client, "no matching chip description found\n");
+               kfree(chip);
                return -EIO;
        }
        v4l_info(client, "%s found @ 0x%x (%s)\n", desc->name, client->addr<<1, client->adapter->name);
@@ -1494,7 +1528,7 @@ static int chip_probe(struct i2c_client *client, const struct i2c_device_id *id)
        /* fill required data structures */
        if (!id)
                strlcpy(client->name, desc->name, I2C_NAME_SIZE);
-       chip->type = desc-chiplist;
+       chip->desc = desc;
        chip->shadow.count = desc->registers+1;
        chip->prevmode = -1;
        chip->audmode = V4L2_TUNER_MODE_LANG1;
@@ -1506,20 +1540,49 @@ static int chip_probe(struct i2c_client *client, const struct i2c_device_id *id)
                chip_cmd(chip,"init",&desc->init);
 
        if (desc->flags & CHIP_HAS_VOLUME) {
-               chip->left   = desc->leftinit   ? desc->leftinit   : 65535;
-               chip->right  = desc->rightinit  ? desc->rightinit  : 65535;
-               chip_write(chip,desc->leftreg,desc->volfunc(chip->left));
-               chip_write(chip,desc->rightreg,desc->volfunc(chip->right));
+               if (!desc->volfunc) {
+                       /* This shouldn't be happen. Warn user, but keep working
+                          without volume controls
+                        */
+                       v4l_info(chip->c, "volume callback undefined!\n");
+                       desc->flags &= ~CHIP_HAS_VOLUME;
+               } else {
+                       chip->left  = desc->leftinit  ? desc->leftinit  : 65535;
+                       chip->right = desc->rightinit ? desc->rightinit : 65535;
+                       chip_write(chip, desc->leftreg,
+                                  desc->volfunc(chip->left));
+                       chip_write(chip, desc->rightreg,
+                                  desc->volfunc(chip->right));
+               }
        }
        if (desc->flags & CHIP_HAS_BASSTREBLE) {
-               chip->treble = desc->trebleinit ? desc->trebleinit : 32768;
-               chip->bass   = desc->bassinit   ? desc->bassinit   : 32768;
-               chip_write(chip,desc->bassreg,desc->bassfunc(chip->bass));
-               chip_write(chip,desc->treblereg,desc->treblefunc(chip->treble));
+               if (!desc->bassfunc || !desc->treblefunc) {
+                       /* This shouldn't be happen. Warn user, but keep working
+                          without bass/treble controls
+                        */
+                       v4l_info(chip->c, "bass/treble callbacks undefined!\n");
+                       desc->flags &= ~CHIP_HAS_BASSTREBLE;
+               } else {
+                       chip->treble = desc->trebleinit ?
+                                               desc->trebleinit : 32768;
+                       chip->bass   = desc->bassinit   ?
+                                               desc->bassinit   : 32768;
+                       chip_write(chip, desc->bassreg,
+                                  desc->bassfunc(chip->bass));
+                       chip_write(chip, desc->treblereg,
+                                  desc->treblefunc(chip->treble));
+               }
        }
 
        chip->thread = NULL;
-       if (desc->checkmode) {
+       if (desc->flags & CHIP_NEED_CHECKMODE) {
+               if (!desc->getmode || !desc->setmode) {
+                       /* This shouldn't be happen. Warn user, but keep working
+                          without kthread
+                        */
+                       v4l_info(chip->c, "set/get mode callbacks undefined!\n");
+                       return 0;
+               }
                /* start async thread */
                init_timer(&chip->wt);
                chip->wt.function = chip_thread_wake;
@@ -1552,7 +1615,7 @@ static int chip_remove(struct i2c_client *client)
 static int tvaudio_get_ctrl(struct CHIPSTATE *chip,
                            struct v4l2_control *ctrl)
 {
-       struct CHIPDESC *desc = chiplist + chip->type;
+       struct CHIPDESC *desc = chip->desc;
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
@@ -1576,13 +1639,13 @@ static int tvaudio_get_ctrl(struct CHIPSTATE *chip,
                return 0;
        }
        case V4L2_CID_AUDIO_BASS:
-               if (desc->flags & CHIP_HAS_BASSTREBLE)
+               if (!(desc->flags & CHIP_HAS_BASSTREBLE))
                        break;
                ctrl->value = chip->bass;
                return 0;
        case V4L2_CID_AUDIO_TREBLE:
-               if (desc->flags & CHIP_HAS_BASSTREBLE)
-                       return -EINVAL;
+               if (!(desc->flags & CHIP_HAS_BASSTREBLE))
+                       break;
                ctrl->value = chip->treble;
                return 0;
        }
@@ -1592,7 +1655,7 @@ static int tvaudio_get_ctrl(struct CHIPSTATE *chip,
 static int tvaudio_set_ctrl(struct CHIPSTATE *chip,
                            struct v4l2_control *ctrl)
 {
-       struct CHIPDESC *desc = chiplist + chip->type;
+       struct CHIPDESC *desc = chip->desc;
 
        switch (ctrl->id) {
        case V4L2_CID_AUDIO_MUTE:
@@ -1642,16 +1705,15 @@ static int tvaudio_set_ctrl(struct CHIPSTATE *chip,
                return 0;
        }
        case V4L2_CID_AUDIO_BASS:
-               if (desc->flags & CHIP_HAS_BASSTREBLE)
+               if (!(desc->flags & CHIP_HAS_BASSTREBLE))
                        break;
                chip->bass = ctrl->value;
                chip_write(chip,desc->bassreg,desc->bassfunc(chip->bass));
 
                return 0;
        case V4L2_CID_AUDIO_TREBLE:
-               if (desc->flags & CHIP_HAS_BASSTREBLE)
-                       return -EINVAL;
-
+               if (!(desc->flags & CHIP_HAS_BASSTREBLE))
+                       break;
                chip->treble = ctrl->value;
                chip_write(chip,desc->treblereg,desc->treblefunc(chip->treble));
 
@@ -1668,9 +1730,12 @@ static int chip_command(struct i2c_client *client,
                        unsigned int cmd, void *arg)
 {
        struct CHIPSTATE *chip = i2c_get_clientdata(client);
-       struct CHIPDESC  *desc = chiplist + chip->type;
+       struct CHIPDESC  *desc = chip->desc;
 
-       v4l_dbg(1, debug, chip->c, "%s: chip_command 0x%x\n", chip->c->name, cmd);
+       if (debug > 0) {
+               v4l_i2c_print_ioctl(chip->c, cmd);
+               printk("\n");
+       }
 
        switch (cmd) {
        case AUDC_SET_RADIO:
@@ -1695,7 +1760,7 @@ static int chip_command(struct i2c_client *client,
                                break;
                        case V4L2_CID_AUDIO_BASS:
                        case V4L2_CID_AUDIO_TREBLE:
-                               if (desc->flags & CHIP_HAS_BASSTREBLE)
+                               if (!(desc->flags & CHIP_HAS_BASSTREBLE))
                                        return -EINVAL;
                                break;
                        default:
@@ -1792,12 +1857,20 @@ static int chip_command(struct i2c_client *client,
                break;
        case VIDIOC_S_FREQUENCY:
                chip->mode = 0; /* automatic */
-               if (desc->checkmode && desc->setmode) {
+
+               /* For chips that provide getmode and setmode, and doesn't
+                  automatically follows the stereo carrier, a kthread is
+                  created to set the audio standard. In this case, when then
+                  the video channel is changed, tvaudio starts on MONO mode.
+                  After waiting for 2 seconds, the kernel thread is called,
+                  to follow whatever audio standard is pointed by the
+                  audio carrier.
+                */
+               if (chip->thread) {
                        desc->setmode(chip,V4L2_TUNER_MODE_MONO);
                        if (chip->prevmode != V4L2_TUNER_MODE_MONO)
                                chip->prevmode = -1; /* reset previous mode */
                        mod_timer(&chip->wt, jiffies+msecs_to_jiffies(2000));
-                       /* the thread will call checkmode() later */
                }
                break;
 
@@ -1836,9 +1909,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .legacy_probe = chip_legacy_probe,
        .id_table = chip_id,
 };
-
-/*
- * Local variables:
- * c-basic-offset: 8
- * End:
- */
index d62fd4f6b52e054db684e2af1e30ac12fa3a9240..ee090413e598e4254cad01d211e465e46e081f48 100644 (file)
@@ -2008,6 +2008,9 @@ mptscsih_host_reset(struct scsi_cmnd *SCpnt)
                return FAILED;
        }
 
+       /* make sure we have no outstanding commands at this stage */
+       mptscsih_flush_running_cmds(hd);
+
        ioc = hd->ioc;
        printk(MYIOC_s_INFO_FMT "attempting host reset! (sc=%p)\n",
            ioc->name, SCpnt);
index 84bdc2ee69e6bc1239775e27ef263cab8ef89805..a443e136dc41591136aecc1ec9e863ce43b2e35e 100644 (file)
@@ -354,7 +354,7 @@ static inline void i2o_block_sglist_free(struct i2o_block_request *ireq)
  *     @req: the request to prepare
  *
  *     Allocate the necessary i2o_block_request struct and connect it to
- *     the request. This is needed that we not loose the SG list later on.
+ *     the request. This is needed that we not lose the SG list later on.
  *
  *     Returns BLKPREP_OK on success or BLKPREP_DEFER on failure.
  */
index be2b5926d26c14b34bcbb40fd4db664f50618495..6e53a30bfd38a7809f8bbcb2ce9b0f3966f35413 100644 (file)
@@ -49,7 +49,6 @@ static int i2o_hrt_get(struct i2o_controller *c);
 /**
  *     i2o_msg_get_wait - obtain an I2O message from the IOP
  *     @c: I2O controller
- *     @msg: pointer to a I2O message pointer
  *     @wait: how long to wait until timeout
  *
  *     This function waits up to wait seconds for a message slot to be
index b57326ae464d4f91f83fce55e412d12f5712effa..0b5bd85dfcec5e4d4bdabfeae15a4a19f19f28ed 100644 (file)
@@ -267,7 +267,7 @@ static int da9030_mask_events(struct da903x_chip *chip, unsigned int events)
 {
        uint8_t v[3];
 
-       chip->events_mask &= ~events;
+       chip->events_mask |= events;
 
        v[0] = (chip->events_mask & 0xff);
        v[1] = (chip->events_mask >> 8) & 0xff;
index 8dfe21bb3bd128d213ae581bd604eea96f82e869..3e0ce0e50ea2263edcec7fcb3300ac20d693c866 100644 (file)
@@ -30,7 +30,12 @@ static int wm8350_i2c_read_device(struct wm8350 *wm8350, char reg,
        ret = i2c_master_send(wm8350->i2c_client, &reg, 1);
        if (ret < 0)
                return ret;
-       return i2c_master_recv(wm8350->i2c_client, dest, bytes);
+       ret = i2c_master_recv(wm8350->i2c_client, dest, bytes);
+       if (ret < 0)
+               return ret;
+       if (ret != bytes)
+               return -EIO;
+       return 0;
 }
 
 static int wm8350_i2c_write_device(struct wm8350 *wm8350, char reg,
@@ -38,13 +43,19 @@ static int wm8350_i2c_write_device(struct wm8350 *wm8350, char reg,
 {
        /* we add 1 byte for device register */
        u8 msg[(WM8350_MAX_REGISTER << 1) + 1];
+       int ret;
 
        if (bytes > ((WM8350_MAX_REGISTER << 1) + 1))
                return -EINVAL;
 
        msg[0] = reg;
        memcpy(&msg[1], src, bytes);
-       return i2c_master_send(wm8350->i2c_client, msg, bytes + 1);
+       ret = i2c_master_send(wm8350->i2c_client, msg, bytes + 1);
+       if (ret < 0)
+               return ret;
+       if (ret != bytes + 1)
+               return -EIO;
+       return 0;
 }
 
 static int wm8350_i2c_probe(struct i2c_client *i2c,
index 9494400e8fd0baea0723cb7ccf78d37535cd279e..fee7304102af8158ca3882bccb854f0f6fcb2bbe 100644 (file)
@@ -227,10 +227,20 @@ config HP_WMI
          To compile this driver as a module, choose M here: the module will
          be called hp-wmi.
 
+config ICS932S401
+       tristate "Integrated Circuits ICS932S401"
+       depends on I2C && EXPERIMENTAL
+       help
+         If you say yes here you get support for the Integrated Circuits
+         ICS932S401 clock control chips.
+
+         This driver can also be built as a module. If so, the module
+         will be called ics932s401.
+
 config MSI_LAPTOP
         tristate "MSI Laptop Extras"
         depends on X86
-        depends on ACPI_EC
+        depends on ACPI
         depends on BACKLIGHT_CLASS_DEVICE
         ---help---
          This is a driver for laptops built by MSI (MICRO-STAR
@@ -260,7 +270,7 @@ config PANASONIC_LAPTOP
 config COMPAL_LAPTOP
        tristate "Compal Laptop Extras"
        depends on X86
-       depends on ACPI_EC
+       depends on ACPI
        depends on BACKLIGHT_CLASS_DEVICE
        ---help---
          This is a driver for laptops built by Compal:
@@ -488,4 +498,6 @@ config SGI_GRU_DEBUG
        This option enables addition debugging code for the SGI GRU driver. If
        you are unsure, say N.
 
+source "drivers/misc/c2port/Kconfig"
+
 endif # MISC_DEVICES
index 909e2468cdc974be5e4ffc7c3e85affc6f6129c6..817f7f5ab3bd2c21476033c195dbba93bf58d05b 100644 (file)
@@ -14,6 +14,7 @@ obj-$(CONFIG_ATMEL_PWM)               += atmel_pwm.o
 obj-$(CONFIG_ATMEL_SSC)                += atmel-ssc.o
 obj-$(CONFIG_ATMEL_TCLIB)      += atmel_tclib.o
 obj-$(CONFIG_HP_WMI)           += hp-wmi.o
+obj-$(CONFIG_ICS932S401)       += ics932s401.o
 obj-$(CONFIG_TC1100_WMI)       += tc1100-wmi.o
 obj-$(CONFIG_LKDTM)            += lkdtm.o
 obj-$(CONFIG_TIFM_CORE)        += tifm_core.o
@@ -31,3 +32,4 @@ obj-$(CONFIG_KGDB_TESTS)      += kgdbts.o
 obj-$(CONFIG_SGI_XP)           += sgi-xp/
 obj-$(CONFIG_SGI_GRU)          += sgi-gru/
 obj-$(CONFIG_HP_ILO)           += hpilo.o
+obj-$(CONFIG_C2PORT)           += c2port/
index 0532a2de2ce4decf8ef2744d5bfcaa4054b13597..94c9f911824ef5b3279205a41a87dd169935f1db 100644 (file)
@@ -1297,6 +1297,12 @@ static int __init acer_wmi_init(void)
 
        set_quirks();
 
+       if (!acpi_video_backlight_support() && has_cap(ACER_CAP_BRIGHTNESS)) {
+               interface->capability &= ~ACER_CAP_BRIGHTNESS;
+               printk(ACER_INFO "Brightness must be controlled by "
+                      "generic video driver\n");
+       }
+
        if (platform_driver_register(&acer_platform_driver)) {
                printk(ACER_ERR "Unable to register platform driver.\n");
                goto error_platform_register;
index a9d5228724a6950d6e7cc42d70ab8ddfab2bdd05..8fb8b35910482dc796841a410f01b47c7db8736d 100644 (file)
@@ -1208,9 +1208,13 @@ static int __init asus_laptop_init(void)
 
        dev = acpi_get_physical_device(hotk->device->handle);
 
-       result = asus_backlight_init(dev);
-       if (result)
-               goto fail_backlight;
+       if (!acpi_video_backlight_support()) {
+               result = asus_backlight_init(dev);
+               if (result)
+                       goto fail_backlight;
+       } else
+               printk(ASUS_INFO "Brightness ignored, must be controlled by "
+                      "ACPI video driver\n");
 
        result = asus_led_init(dev);
        if (result)
diff --git a/drivers/misc/c2port/Kconfig b/drivers/misc/c2port/Kconfig
new file mode 100644 (file)
index 0000000..e46af9a
--- /dev/null
@@ -0,0 +1,35 @@
+#
+# C2 port devices
+#
+
+menuconfig C2PORT
+       tristate "Silicon Labs C2 port support (EXPERIMENTAL)"
+       depends on EXPERIMENTAL
+       default no
+       help
+         This option enables support for Silicon Labs C2 port used to
+         program Silicon micro controller chips (and other 8051 compatible).
+
+         If your board have no such micro controllers you don't need this
+         interface at all.
+
+         To compile this driver as a module, choose M here: the module will
+         be called c2port_core. Note that you also need a client module
+         usually called c2port-*.
+
+         If you are not sure, say N here.
+
+if C2PORT
+
+config C2PORT_DURAMAR_2150
+       tristate "C2 port support for Eurotech's Duramar 2150 (EXPERIMENTAL)"
+       depends on X86 && C2PORT
+       default no
+       help
+         This option enables C2 support for the Eurotech's Duramar 2150
+         on board micro controller.
+
+         To compile this driver as a module, choose M here: the module will
+         be called c2port-duramar2150.
+
+endif # C2PORT
diff --git a/drivers/misc/c2port/Makefile b/drivers/misc/c2port/Makefile
new file mode 100644 (file)
index 0000000..3b2cf43
--- /dev/null
@@ -0,0 +1,3 @@
+obj-$(CONFIG_C2PORT)           += core.o
+
+obj-$(CONFIG_C2PORT_DURAMAR_2150)      += c2port-duramar2150.o
diff --git a/drivers/misc/c2port/c2port-duramar2150.c b/drivers/misc/c2port/c2port-duramar2150.c
new file mode 100644 (file)
index 0000000..338dcc1
--- /dev/null
@@ -0,0 +1,158 @@
+/*
+ *  Silicon Labs C2 port Linux support for Eurotech Duramar 2150
+ *
+ *  Copyright (c) 2008 Rodolfo Giometti <giometti@linux.it>
+ *  Copyright (c) 2008 Eurotech S.p.A. <info@eurotech.it>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation
+ */
+
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/delay.h>
+#include <linux/io.h>
+#include <linux/c2port.h>
+
+#define DATA_PORT      0x325
+#define DIR_PORT       0x326
+#define    C2D            (1 << 0)
+#define    C2CK                   (1 << 1)
+
+static DEFINE_MUTEX(update_lock);
+
+/*
+ * C2 port operations
+ */
+
+static void duramar2150_c2port_access(struct c2port_device *dev, int status)
+{
+       u8 v;
+
+       mutex_lock(&update_lock);
+
+       v = inb(DIR_PORT);
+
+       /* 0 = input, 1 = output */
+       if (status)
+               outb(v | (C2D | C2CK), DIR_PORT);
+       else
+               /* When access is "off" is important that both lines are set
+                * as inputs or hi-impedence */
+               outb(v & ~(C2D | C2CK), DIR_PORT);
+
+       mutex_unlock(&update_lock);
+}
+
+static void duramar2150_c2port_c2d_dir(struct c2port_device *dev, int dir)
+{
+       u8 v;
+
+       mutex_lock(&update_lock);
+
+       v = inb(DIR_PORT);
+
+       if (dir)
+               outb(v & ~C2D, DIR_PORT);
+       else
+               outb(v | C2D, DIR_PORT);
+
+       mutex_unlock(&update_lock);
+}
+
+static int duramar2150_c2port_c2d_get(struct c2port_device *dev)
+{
+       return inb(DATA_PORT) & C2D;
+}
+
+static void duramar2150_c2port_c2d_set(struct c2port_device *dev, int status)
+{
+       u8 v;
+
+       mutex_lock(&update_lock);
+
+       v = inb(DATA_PORT);
+
+       if (status)
+               outb(v | C2D, DATA_PORT);
+       else
+               outb(v & ~C2D, DATA_PORT);
+
+       mutex_unlock(&update_lock);
+}
+
+static void duramar2150_c2port_c2ck_set(struct c2port_device *dev, int status)
+{
+       u8 v;
+
+       mutex_lock(&update_lock);
+
+       v = inb(DATA_PORT);
+
+       if (status)
+               outb(v | C2CK, DATA_PORT);
+       else
+               outb(v & ~C2CK, DATA_PORT);
+
+       mutex_unlock(&update_lock);
+}
+
+static struct c2port_ops duramar2150_c2port_ops = {
+       .block_size     = 512,  /* bytes */
+       .blocks_num     = 30,   /* total flash size: 15360 bytes */
+
+       .access         = duramar2150_c2port_access,
+       .c2d_dir        = duramar2150_c2port_c2d_dir,
+       .c2d_get        = duramar2150_c2port_c2d_get,
+       .c2d_set        = duramar2150_c2port_c2d_set,
+       .c2ck_set       = duramar2150_c2port_c2ck_set,
+};
+
+static struct c2port_device *duramar2150_c2port_dev;
+
+/*
+ * Module stuff
+ */
+
+static int __init duramar2150_c2port_init(void)
+{
+       struct resource *res;
+       int ret = 0;
+
+       res = request_region(0x325, 2, "c2port");
+       if (!res)
+               return -EBUSY;
+
+       duramar2150_c2port_dev = c2port_device_register("uc",
+                                       &duramar2150_c2port_ops, NULL);
+       if (!duramar2150_c2port_dev) {
+               ret = -ENODEV;
+               goto free_region;
+       }
+
+       return 0;
+
+free_region:
+       release_region(0x325, 2);
+       return ret;
+}
+
+static void __exit duramar2150_c2port_exit(void)
+{
+       /* Setup the GPIOs as input by default (access = 0) */
+       duramar2150_c2port_access(duramar2150_c2port_dev, 0);
+
+       c2port_device_unregister(duramar2150_c2port_dev);
+
+       release_region(0x325, 2);
+}
+
+module_init(duramar2150_c2port_init);
+module_exit(duramar2150_c2port_exit);
+
+MODULE_AUTHOR("Rodolfo Giometti <giometti@linux.it>");
+MODULE_DESCRIPTION("Silicon Labs C2 port Linux support for Duramar 2150");
+MODULE_LICENSE("GPL");
diff --git a/drivers/misc/c2port/core.c b/drivers/misc/c2port/core.c
new file mode 100644 (file)
index 0000000..0207dd5
--- /dev/null
@@ -0,0 +1,1003 @@
+/*
+ *  Silicon Labs C2 port core Linux support
+ *
+ *  Copyright (c) 2007 Rodolfo Giometti <giometti@linux.it>
+ *  Copyright (c) 2007 Eurotech S.p.A. <info@eurotech.it>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/errno.h>
+#include <linux/err.h>
+#include <linux/kernel.h>
+#include <linux/ctype.h>
+#include <linux/delay.h>
+#include <linux/idr.h>
+#include <linux/sched.h>
+
+#include <linux/c2port.h>
+
+#define DRIVER_NAME             "c2port"
+#define DRIVER_VERSION          "0.51.0"
+
+static DEFINE_SPINLOCK(c2port_idr_lock);
+static DEFINE_IDR(c2port_idr);
+
+/*
+ * Local variables
+ */
+
+static struct class *c2port_class;
+
+/*
+ * C2 registers & commands defines
+ */
+
+/* C2 registers */
+#define C2PORT_DEVICEID                0x00
+#define C2PORT_REVID           0x01
+#define C2PORT_FPCTL           0x02
+#define C2PORT_FPDAT           0xB4
+
+/* C2 interface commands */
+#define C2PORT_GET_VERSION     0x01
+#define C2PORT_DEVICE_ERASE    0x03
+#define C2PORT_BLOCK_READ      0x06
+#define C2PORT_BLOCK_WRITE     0x07
+#define C2PORT_PAGE_ERASE      0x08
+
+/* C2 status return codes */
+#define C2PORT_INVALID_COMMAND 0x00
+#define C2PORT_COMMAND_FAILED  0x02
+#define C2PORT_COMMAND_OK      0x0d
+
+/*
+ * C2 port low level signal managements
+ */
+
+static void c2port_reset(struct c2port_device *dev)
+{
+       struct c2port_ops *ops = dev->ops;
+
+       /* To reset the device we have to keep clock line low for at least
+        * 20us.
+        */
+       local_irq_disable();
+       ops->c2ck_set(dev, 0);
+       udelay(25);
+       ops->c2ck_set(dev, 1);
+       local_irq_enable();
+
+       udelay(1);
+}
+
+static void c2port_strobe_ck(struct c2port_device *dev)
+{
+       struct c2port_ops *ops = dev->ops;
+
+       /* During hi-low-hi transition we disable local IRQs to avoid
+        * interructions since C2 port specification says that it must be
+        * shorter than 5us, otherwise the microcontroller may consider
+        * it as a reset signal!
+        */
+       local_irq_disable();
+       ops->c2ck_set(dev, 0);
+       udelay(1);
+       ops->c2ck_set(dev, 1);
+       local_irq_enable();
+
+       udelay(1);
+}
+
+/*
+ * C2 port basic functions
+ */
+
+static void c2port_write_ar(struct c2port_device *dev, u8 addr)
+{
+       struct c2port_ops *ops = dev->ops;
+       int i;
+
+       /* START field */
+       c2port_strobe_ck(dev);
+
+       /* INS field (11b, LSB first) */
+       ops->c2d_dir(dev, 0);
+       ops->c2d_set(dev, 1);
+       c2port_strobe_ck(dev);
+       ops->c2d_set(dev, 1);
+       c2port_strobe_ck(dev);
+
+       /* ADDRESS field */
+       for (i = 0; i < 8; i++) {
+               ops->c2d_set(dev, addr & 0x01);
+               c2port_strobe_ck(dev);
+
+               addr >>= 1;
+       }
+
+       /* STOP field */
+       ops->c2d_dir(dev, 1);
+       c2port_strobe_ck(dev);
+}
+
+static int c2port_read_ar(struct c2port_device *dev, u8 *addr)
+{
+       struct c2port_ops *ops = dev->ops;
+       int i;
+
+       /* START field */
+       c2port_strobe_ck(dev);
+
+       /* INS field (10b, LSB first) */
+       ops->c2d_dir(dev, 0);
+       ops->c2d_set(dev, 0);
+       c2port_strobe_ck(dev);
+       ops->c2d_set(dev, 1);
+       c2port_strobe_ck(dev);
+
+       /* ADDRESS field */
+       ops->c2d_dir(dev, 1);
+       *addr = 0;
+       for (i = 0; i < 8; i++) {
+               *addr >>= 1;    /* shift in 8-bit ADDRESS field LSB first */
+
+               c2port_strobe_ck(dev);
+               if (ops->c2d_get(dev))
+                       *addr |= 0x80;
+       }
+
+       /* STOP field */
+       c2port_strobe_ck(dev);
+
+       return 0;
+}
+
+static int c2port_write_dr(struct c2port_device *dev, u8 data)
+{
+       struct c2port_ops *ops = dev->ops;
+       int timeout, i;
+
+       /* START field */
+       c2port_strobe_ck(dev);
+
+       /* INS field (01b, LSB first) */
+       ops->c2d_dir(dev, 0);
+       ops->c2d_set(dev, 1);
+       c2port_strobe_ck(dev);
+       ops->c2d_set(dev, 0);
+       c2port_strobe_ck(dev);
+
+       /* LENGTH field (00b, LSB first -> 1 byte) */
+       ops->c2d_set(dev, 0);
+       c2port_strobe_ck(dev);
+       ops->c2d_set(dev, 0);
+       c2port_strobe_ck(dev);
+
+       /* DATA field */
+       for (i = 0; i < 8; i++) {
+               ops->c2d_set(dev, data & 0x01);
+               c2port_strobe_ck(dev);
+
+               data >>= 1;
+       }
+
+       /* WAIT field */
+       ops->c2d_dir(dev, 1);
+       timeout = 20;
+       do {
+               c2port_strobe_ck(dev);
+               if (ops->c2d_get(dev))
+                       break;
+
+               udelay(1);
+       } while (--timeout > 0);
+       if (timeout == 0)
+               return -EIO;
+
+       /* STOP field */
+       c2port_strobe_ck(dev);
+
+       return 0;
+}
+
+static int c2port_read_dr(struct c2port_device *dev, u8 *data)
+{
+       struct c2port_ops *ops = dev->ops;
+       int timeout, i;
+
+       /* START field */
+       c2port_strobe_ck(dev);
+
+       /* INS field (00b, LSB first) */
+       ops->c2d_dir(dev, 0);
+       ops->c2d_set(dev, 0);
+       c2port_strobe_ck(dev);
+       ops->c2d_set(dev, 0);
+       c2port_strobe_ck(dev);
+
+       /* LENGTH field (00b, LSB first -> 1 byte) */
+       ops->c2d_set(dev, 0);
+       c2port_strobe_ck(dev);
+       ops->c2d_set(dev, 0);
+       c2port_strobe_ck(dev);
+
+       /* WAIT field */
+       ops->c2d_dir(dev, 1);
+       timeout = 20;
+       do {
+               c2port_strobe_ck(dev);
+               if (ops->c2d_get(dev))
+                       break;
+
+               udelay(1);
+       } while (--timeout > 0);
+       if (timeout == 0)
+               return -EIO;
+
+       /* DATA field */
+       *data = 0;
+       for (i = 0; i < 8; i++) {
+               *data >>= 1;    /* shift in 8-bit DATA field LSB first */
+
+               c2port_strobe_ck(dev);
+               if (ops->c2d_get(dev))
+                       *data |= 0x80;
+       }
+
+       /* STOP field */
+       c2port_strobe_ck(dev);
+
+       return 0;
+}
+
+static int c2port_poll_in_busy(struct c2port_device *dev)
+{
+       u8 addr;
+       int ret, timeout = 20;
+
+       do {
+               ret = (c2port_read_ar(dev, &addr));
+               if (ret < 0)
+                       return -EIO;
+
+               if (!(addr & 0x02))
+                       break;
+
+               udelay(1);
+       } while (--timeout > 0);
+       if (timeout == 0)
+               return -EIO;
+
+       return 0;
+}
+
+static int c2port_poll_out_ready(struct c2port_device *dev)
+{
+       u8 addr;
+       int ret, timeout = 10000; /* erase flash needs long time... */
+
+       do {
+               ret = (c2port_read_ar(dev, &addr));
+               if (ret < 0)
+                       return -EIO;
+
+               if (addr & 0x01)
+                       break;
+
+               udelay(1);
+       } while (--timeout > 0);
+       if (timeout == 0)
+               return -EIO;
+
+       return 0;
+}
+
+/*
+ * sysfs methods
+ */
+
+static ssize_t c2port_show_name(struct device *dev,
+                               struct device_attribute *attr, char *buf)
+{
+       struct c2port_device *c2dev = dev_get_drvdata(dev);
+
+       return sprintf(buf, "%s\n", c2dev->name);
+}
+
+static ssize_t c2port_show_flash_blocks_num(struct device *dev,
+                               struct device_attribute *attr, char *buf)
+{
+       struct c2port_device *c2dev = dev_get_drvdata(dev);
+       struct c2port_ops *ops = c2dev->ops;
+
+       return sprintf(buf, "%d\n", ops->blocks_num);
+}
+
+static ssize_t c2port_show_flash_block_size(struct device *dev,
+                               struct device_attribute *attr, char *buf)
+{
+       struct c2port_device *c2dev = dev_get_drvdata(dev);
+       struct c2port_ops *ops = c2dev->ops;
+
+       return sprintf(buf, "%d\n", ops->block_size);
+}
+
+static ssize_t c2port_show_flash_size(struct device *dev,
+                               struct device_attribute *attr, char *buf)
+{
+       struct c2port_device *c2dev = dev_get_drvdata(dev);
+       struct c2port_ops *ops = c2dev->ops;
+
+       return sprintf(buf, "%d\n", ops->blocks_num * ops->block_size);
+}
+
+static ssize_t c2port_show_access(struct device *dev,
+                               struct device_attribute *attr, char *buf)
+{
+       struct c2port_device *c2dev = dev_get_drvdata(dev);
+
+       return sprintf(buf, "%d\n", c2dev->access);
+}
+
+static ssize_t c2port_store_access(struct device *dev,
+                               struct device_attribute *attr,
+                               const char *buf, size_t count)
+{
+       struct c2port_device *c2dev = dev_get_drvdata(dev);
+       struct c2port_ops *ops = c2dev->ops;
+       int status, ret;
+
+       ret = sscanf(buf, "%d", &status);
+       if (ret != 1)
+               return -EINVAL;
+
+       mutex_lock(&c2dev->mutex);
+
+       c2dev->access = !!status;
+
+       /* If access is "on" clock should be HIGH _before_ setting the line
+        * as output and data line should be set as INPUT anyway */
+       if (c2dev->access)
+               ops->c2ck_set(c2dev, 1);
+       ops->access(c2dev, c2dev->access);
+       if (c2dev->access)
+               ops->c2d_dir(c2dev, 1);
+
+       mutex_unlock(&c2dev->mutex);
+
+       return count;
+}
+
+static ssize_t c2port_store_reset(struct device *dev,
+                               struct device_attribute *attr,
+                               const char *buf, size_t count)
+{
+       struct c2port_device *c2dev = dev_get_drvdata(dev);
+
+       /* Check the device access status */
+       if (!c2dev->access)
+               return -EBUSY;
+
+       mutex_lock(&c2dev->mutex);
+
+       c2port_reset(c2dev);
+       c2dev->flash_access = 0;
+
+       mutex_unlock(&c2dev->mutex);
+
+       return count;
+}
+
+static ssize_t __c2port_show_dev_id(struct c2port_device *dev, char *buf)
+{
+       u8 data;
+       int ret;
+
+       /* Select DEVICEID register for C2 data register accesses */
+       c2port_write_ar(dev, C2PORT_DEVICEID);
+
+       /* Read and return the device ID register */
+       ret = c2port_read_dr(dev, &data);
+       if (ret < 0)
+               return ret;
+
+       return sprintf(buf, "%d\n", data);
+}
+
+static ssize_t c2port_show_dev_id(struct device *dev,
+                               struct device_attribute *attr, char *buf)
+{
+       struct c2port_device *c2dev = dev_get_drvdata(dev);
+       ssize_t ret;
+
+       /* Check the device access status */
+       if (!c2dev->access)
+               return -EBUSY;
+
+       mutex_lock(&c2dev->mutex);
+       ret = __c2port_show_dev_id(c2dev, buf);
+       mutex_unlock(&c2dev->mutex);
+
+       if (ret < 0)
+               dev_err(dev, "cannot read from %s\n", c2dev->name);
+
+       return ret;
+}
+
+static ssize_t __c2port_show_rev_id(struct c2port_device *dev, char *buf)
+{
+       u8 data;
+       int ret;
+
+       /* Select REVID register for C2 data register accesses */
+       c2port_write_ar(dev, C2PORT_REVID);
+
+       /* Read and return the revision ID register */
+       ret = c2port_read_dr(dev, &data);
+       if (ret < 0)
+               return ret;
+
+       return sprintf(buf, "%d\n", data);
+}
+
+static ssize_t c2port_show_rev_id(struct device *dev,
+                               struct device_attribute *attr, char *buf)
+{
+       struct c2port_device *c2dev = dev_get_drvdata(dev);
+       ssize_t ret;
+
+       /* Check the device access status */
+       if (!c2dev->access)
+               return -EBUSY;
+
+       mutex_lock(&c2dev->mutex);
+       ret = __c2port_show_rev_id(c2dev, buf);
+       mutex_unlock(&c2dev->mutex);
+
+       if (ret < 0)
+               dev_err(c2dev->dev, "cannot read from %s\n", c2dev->name);
+
+       return ret;
+}
+
+static ssize_t c2port_show_flash_access(struct device *dev,
+                               struct device_attribute *attr, char *buf)
+{
+       struct c2port_device *c2dev = dev_get_drvdata(dev);
+
+       return sprintf(buf, "%d\n", c2dev->flash_access);
+}
+
+static ssize_t __c2port_store_flash_access(struct c2port_device *dev,
+                                               int status)
+{
+       int ret;
+
+       /* Check the device access status */
+       if (!dev->access)
+               return -EBUSY;
+
+       dev->flash_access = !!status;
+
+       /* If flash_access is off we have nothing to do... */
+       if (dev->flash_access == 0)
+               return 0;
+
+       /* Target the C2 flash programming control register for C2 data
+        * register access */
+       c2port_write_ar(dev, C2PORT_FPCTL);
+
+       /* Write the first keycode to enable C2 Flash programming */
+       ret = c2port_write_dr(dev, 0x02);
+       if (ret < 0)
+               return ret;
+
+       /* Write the second keycode to enable C2 Flash programming */
+       ret = c2port_write_dr(dev, 0x01);
+       if (ret < 0)
+               return ret;
+
+       /* Delay for at least 20ms to ensure the target is ready for
+        * C2 flash programming */
+       mdelay(25);
+
+       return 0;
+}
+
+static ssize_t c2port_store_flash_access(struct device *dev,
+                               struct device_attribute *attr,
+                               const char *buf, size_t count)
+{
+       struct c2port_device *c2dev = dev_get_drvdata(dev);
+       int status;
+       ssize_t ret;
+
+       ret = sscanf(buf, "%d", &status);
+       if (ret != 1)
+               return -EINVAL;
+
+       mutex_lock(&c2dev->mutex);
+       ret = __c2port_store_flash_access(c2dev, status);
+       mutex_unlock(&c2dev->mutex);
+
+       if (ret < 0) {
+               dev_err(c2dev->dev, "cannot enable %s flash programming\n",
+                       c2dev->name);
+               return ret;
+       }
+
+       return count;
+}
+
+static ssize_t __c2port_write_flash_erase(struct c2port_device *dev)
+{
+       u8 status;
+       int ret;
+
+       /* Target the C2 flash programming data register for C2 data register
+        * access.
+        */
+       c2port_write_ar(dev, C2PORT_FPDAT);
+
+       /* Send device erase command */
+       c2port_write_dr(dev, C2PORT_DEVICE_ERASE);
+
+       /* Wait for input acknowledge */
+       ret = c2port_poll_in_busy(dev);
+       if (ret < 0)
+               return ret;
+
+       /* Should check status before starting FLASH access sequence */
+
+       /* Wait for status information */
+       ret = c2port_poll_out_ready(dev);
+       if (ret < 0)
+               return ret;
+
+       /* Read flash programming interface status */
+       ret = c2port_read_dr(dev, &status);
+       if (ret < 0)
+               return ret;
+       if (status != C2PORT_COMMAND_OK)
+               return -EBUSY;
+
+       /* Send a three-byte arming sequence to enable the device erase.
+        * If the sequence is not received correctly, the command will be
+        * ignored.
+        * Sequence is: 0xde, 0xad, 0xa5.
+        */
+       c2port_write_dr(dev, 0xde);
+       ret = c2port_poll_in_busy(dev);
+       if (ret < 0)
+               return ret;
+       c2port_write_dr(dev, 0xad);
+       ret = c2port_poll_in_busy(dev);
+       if (ret < 0)
+               return ret;
+       c2port_write_dr(dev, 0xa5);
+       ret = c2port_poll_in_busy(dev);
+       if (ret < 0)
+               return ret;
+
+       ret = c2port_poll_out_ready(dev);
+       if (ret < 0)
+               return ret;
+
+       return 0;
+}
+
+static ssize_t c2port_store_flash_erase(struct device *dev,
+                               struct device_attribute *attr,
+                               const char *buf, size_t count)
+{
+       struct c2port_device *c2dev = dev_get_drvdata(dev);
+       int ret;
+
+       /* Check the device and flash access status */
+       if (!c2dev->access || !c2dev->flash_access)
+               return -EBUSY;
+
+       mutex_lock(&c2dev->mutex);
+       ret = __c2port_write_flash_erase(c2dev);
+       mutex_unlock(&c2dev->mutex);
+
+       if (ret < 0) {
+               dev_err(c2dev->dev, "cannot erase %s flash\n", c2dev->name);
+               return ret;
+       }
+
+       return count;
+}
+
+static ssize_t __c2port_read_flash_data(struct c2port_device *dev,
+                               char *buffer, loff_t offset, size_t count)
+{
+       struct c2port_ops *ops = dev->ops;
+       u8 status, nread = 128;
+       int i, ret;
+
+       /* Check for flash end */
+       if (offset >= ops->block_size * ops->blocks_num)
+               return 0;
+
+       if (ops->block_size * ops->blocks_num - offset < nread)
+               nread = ops->block_size * ops->blocks_num - offset;
+       if (count < nread)
+               nread = count;
+       if (nread == 0)
+               return nread;
+
+       /* Target the C2 flash programming data register for C2 data register
+        * access */
+       c2port_write_ar(dev, C2PORT_FPDAT);
+
+       /* Send flash block read command */
+       c2port_write_dr(dev, C2PORT_BLOCK_READ);
+
+       /* Wait for input acknowledge */
+       ret = c2port_poll_in_busy(dev);
+       if (ret < 0)
+               return ret;
+
+       /* Should check status before starting FLASH access sequence */
+
+       /* Wait for status information */
+       ret = c2port_poll_out_ready(dev);
+       if (ret < 0)
+               return ret;
+
+       /* Read flash programming interface status */
+       ret = c2port_read_dr(dev, &status);
+       if (ret < 0)
+               return ret;
+       if (status != C2PORT_COMMAND_OK)
+               return -EBUSY;
+
+       /* Send address high byte */
+       c2port_write_dr(dev, offset >> 8);
+       ret = c2port_poll_in_busy(dev);
+       if (ret < 0)
+               return ret;
+
+       /* Send address low byte */
+       c2port_write_dr(dev, offset & 0x00ff);
+       ret = c2port_poll_in_busy(dev);
+       if (ret < 0)
+               return ret;
+
+       /* Send address block size */
+       c2port_write_dr(dev, nread);
+       ret = c2port_poll_in_busy(dev);
+       if (ret < 0)
+               return ret;
+
+       /* Should check status before reading FLASH block */
+
+       /* Wait for status information */
+       ret = c2port_poll_out_ready(dev);
+       if (ret < 0)
+               return ret;
+
+       /* Read flash programming interface status */
+       ret = c2port_read_dr(dev, &status);
+       if (ret < 0)
+               return ret;
+       if (status != C2PORT_COMMAND_OK)
+               return -EBUSY;
+
+       /* Read flash block */
+       for (i = 0; i < nread; i++) {
+               ret = c2port_poll_out_ready(dev);
+               if (ret < 0)
+                       return ret;
+
+               ret = c2port_read_dr(dev, buffer+i);
+               if (ret < 0)
+                       return ret;
+       }
+
+       return nread;
+}
+
+static ssize_t c2port_read_flash_data(struct kobject *kobj,
+                               struct bin_attribute *attr,
+                               char *buffer, loff_t offset, size_t count)
+{
+       struct c2port_device *c2dev =
+                       dev_get_drvdata(container_of(kobj,
+                                               struct device, kobj));
+       ssize_t ret;
+
+       /* Check the device and flash access status */
+       if (!c2dev->access || !c2dev->flash_access)
+               return -EBUSY;
+
+       mutex_lock(&c2dev->mutex);
+       ret = __c2port_read_flash_data(c2dev, buffer, offset, count);
+       mutex_unlock(&c2dev->mutex);
+
+       if (ret < 0)
+               dev_err(c2dev->dev, "cannot read %s flash\n", c2dev->name);
+
+       return ret;
+}
+
+static ssize_t __c2port_write_flash_data(struct c2port_device *dev,
+                               char *buffer, loff_t offset, size_t count)
+{
+       struct c2port_ops *ops = dev->ops;
+       u8 status, nwrite = 128;
+       int i, ret;
+
+       if (nwrite > count)
+               nwrite = count;
+       if (ops->block_size * ops->blocks_num - offset < nwrite)
+               nwrite = ops->block_size * ops->blocks_num - offset;
+
+       /* Check for flash end */
+       if (offset >= ops->block_size * ops->blocks_num)
+               return -EINVAL;
+
+       /* Target the C2 flash programming data register for C2 data register
+        * access */
+       c2port_write_ar(dev, C2PORT_FPDAT);
+
+       /* Send flash block write command */
+       c2port_write_dr(dev, C2PORT_BLOCK_WRITE);
+
+       /* Wait for input acknowledge */
+       ret = c2port_poll_in_busy(dev);
+       if (ret < 0)
+               return ret;
+
+       /* Should check status before starting FLASH access sequence */
+
+       /* Wait for status information */
+       ret = c2port_poll_out_ready(dev);
+       if (ret < 0)
+               return ret;
+
+       /* Read flash programming interface status */
+       ret = c2port_read_dr(dev, &status);
+       if (ret < 0)
+               return ret;
+       if (status != C2PORT_COMMAND_OK)
+               return -EBUSY;
+
+       /* Send address high byte */
+       c2port_write_dr(dev, offset >> 8);
+       ret = c2port_poll_in_busy(dev);
+       if (ret < 0)
+               return ret;
+
+       /* Send address low byte */
+       c2port_write_dr(dev, offset & 0x00ff);
+       ret = c2port_poll_in_busy(dev);
+       if (ret < 0)
+               return ret;
+
+       /* Send address block size */
+       c2port_write_dr(dev, nwrite);
+       ret = c2port_poll_in_busy(dev);
+       if (ret < 0)
+               return ret;
+
+       /* Should check status before writing FLASH block */
+
+       /* Wait for status information */
+       ret = c2port_poll_out_ready(dev);
+       if (ret < 0)
+               return ret;
+
+       /* Read flash programming interface status */
+       ret = c2port_read_dr(dev, &status);
+       if (ret < 0)
+               return ret;
+       if (status != C2PORT_COMMAND_OK)
+               return -EBUSY;
+
+       /* Write flash block */
+       for (i = 0; i < nwrite; i++) {
+               ret = c2port_write_dr(dev, *(buffer+i));
+               if (ret < 0)
+                       return ret;
+
+               ret = c2port_poll_in_busy(dev);
+               if (ret < 0)
+                       return ret;
+
+       }
+
+       /* Wait for last flash write to complete */
+       ret = c2port_poll_out_ready(dev);
+       if (ret < 0)
+               return ret;
+
+       return nwrite;
+}
+
+static ssize_t c2port_write_flash_data(struct kobject *kobj,
+                               struct bin_attribute *attr,
+                               char *buffer, loff_t offset, size_t count)
+{
+       struct c2port_device *c2dev =
+                       dev_get_drvdata(container_of(kobj,
+                                               struct device, kobj));
+       int ret;
+
+       /* Check the device access status */
+       if (!c2dev->access || !c2dev->flash_access)
+               return -EBUSY;
+
+       mutex_lock(&c2dev->mutex);
+       ret = __c2port_write_flash_data(c2dev, buffer, offset, count);
+       mutex_unlock(&c2dev->mutex);
+
+       if (ret < 0)
+               dev_err(c2dev->dev, "cannot write %s flash\n", c2dev->name);
+
+       return ret;
+}
+
+/*
+ * Class attributes
+ */
+
+static struct device_attribute c2port_attrs[] = {
+       __ATTR(name, 0444, c2port_show_name, NULL),
+       __ATTR(flash_blocks_num, 0444, c2port_show_flash_blocks_num, NULL),
+       __ATTR(flash_block_size, 0444, c2port_show_flash_block_size, NULL),
+       __ATTR(flash_size, 0444, c2port_show_flash_size, NULL),
+       __ATTR(access, 0644, c2port_show_access, c2port_store_access),
+       __ATTR(reset, 0200, NULL, c2port_store_reset),
+       __ATTR(dev_id, 0444, c2port_show_dev_id, NULL),
+       __ATTR(rev_id, 0444, c2port_show_rev_id, NULL),
+
+       __ATTR(flash_access, 0644, c2port_show_flash_access,
+                                       c2port_store_flash_access),
+       __ATTR(flash_erase, 0200, NULL, c2port_store_flash_erase),
+       __ATTR_NULL,
+};
+
+static struct bin_attribute c2port_bin_attrs = {
+       .attr   = {
+               .name   = "flash_data",
+               .mode   = 0644
+       },
+       .read   = c2port_read_flash_data,
+       .write  = c2port_write_flash_data,
+       /* .size is computed at run-time */
+};
+
+/*
+ * Exported functions
+ */
+
+struct c2port_device *c2port_device_register(char *name,
+                                       struct c2port_ops *ops, void *devdata)
+{
+       struct c2port_device *c2dev;
+       int id, ret;
+
+       if (unlikely(!ops) || unlikely(!ops->access) || \
+               unlikely(!ops->c2d_dir) || unlikely(!ops->c2ck_set) || \
+               unlikely(!ops->c2d_get) || unlikely(!ops->c2d_set))
+               return ERR_PTR(-EINVAL);
+
+       c2dev = kmalloc(sizeof(struct c2port_device), GFP_KERNEL);
+       if (unlikely(!c2dev))
+               return ERR_PTR(-ENOMEM);
+
+       ret = idr_pre_get(&c2port_idr, GFP_KERNEL);
+       if (!ret) {
+               ret = -ENOMEM;
+               goto error_idr_get_new;
+       }
+
+       spin_lock_irq(&c2port_idr_lock);
+       ret = idr_get_new(&c2port_idr, c2dev, &id);
+       spin_unlock_irq(&c2port_idr_lock);
+
+       if (ret < 0)
+               goto error_idr_get_new;
+       c2dev->id = id;
+
+       c2dev->dev = device_create(c2port_class, NULL, 0, c2dev,
+                                       "c2port%d", id);
+       if (unlikely(!c2dev->dev)) {
+               ret = -ENOMEM;
+               goto error_device_create;
+       }
+       dev_set_drvdata(c2dev->dev, c2dev);
+
+       strncpy(c2dev->name, name, C2PORT_NAME_LEN);
+       c2dev->ops = ops;
+       mutex_init(&c2dev->mutex);
+
+       /* Create binary file */
+       c2port_bin_attrs.size = ops->blocks_num * ops->block_size;
+       ret = device_create_bin_file(c2dev->dev, &c2port_bin_attrs);
+       if (unlikely(ret))
+               goto error_device_create_bin_file;
+
+       /* By default C2 port access is off */
+       c2dev->access = c2dev->flash_access = 0;
+       ops->access(c2dev, 0);
+
+       dev_info(c2dev->dev, "C2 port %s added\n", name);
+       dev_info(c2dev->dev, "%s flash has %d blocks x %d bytes "
+                               "(%d bytes total)\n",
+                               name, ops->blocks_num, ops->block_size,
+                               ops->blocks_num * ops->block_size);
+
+       return c2dev;
+
+error_device_create_bin_file:
+       device_destroy(c2port_class, 0);
+
+error_device_create:
+       spin_lock_irq(&c2port_idr_lock);
+       idr_remove(&c2port_idr, id);
+       spin_unlock_irq(&c2port_idr_lock);
+
+error_idr_get_new:
+       kfree(c2dev);
+
+       return ERR_PTR(ret);
+}
+EXPORT_SYMBOL(c2port_device_register);
+
+void c2port_device_unregister(struct c2port_device *c2dev)
+{
+       if (!c2dev)
+               return;
+
+       dev_info(c2dev->dev, "C2 port %s removed\n", c2dev->name);
+
+       device_remove_bin_file(c2dev->dev, &c2port_bin_attrs);
+       spin_lock_irq(&c2port_idr_lock);
+       idr_remove(&c2port_idr, c2dev->id);
+       spin_unlock_irq(&c2port_idr_lock);
+
+       device_destroy(c2port_class, c2dev->id);
+
+       kfree(c2dev);
+}
+EXPORT_SYMBOL(c2port_device_unregister);
+
+/*
+ * Module stuff
+ */
+
+static int __init c2port_init(void)
+{
+       printk(KERN_INFO "Silicon Labs C2 port support v. " DRIVER_VERSION
+               " - (C) 2007 Rodolfo Giometti\n");
+
+       c2port_class = class_create(THIS_MODULE, "c2port");
+       if (!c2port_class) {
+               printk(KERN_ERR "c2port: failed to allocate class\n");
+               return -ENOMEM;
+       }
+       c2port_class->dev_attrs = c2port_attrs;
+
+       return 0;
+}
+
+static void __exit c2port_exit(void)
+{
+       class_destroy(c2port_class);
+}
+
+module_init(c2port_init);
+module_exit(c2port_exit);
+
+MODULE_AUTHOR("Rodolfo Giometti <giometti@linux.it>");
+MODULE_DESCRIPTION("Silicon Labs C2 port support v. " DRIVER_VERSION);
+MODULE_LICENSE("GPL");
index 344b790a6253992540b831c72b2677b2ec6fd69e..11003bba10d3e495cee585b83d49dc27f5b4ee80 100644 (file)
@@ -326,12 +326,14 @@ static int __init compal_init(void)
 
        /* Register backlight stuff */
 
-       compalbl_device = backlight_device_register("compal-laptop", NULL, NULL,
-                                               &compalbl_ops);
-       if (IS_ERR(compalbl_device))
-               return PTR_ERR(compalbl_device);
+       if (!acpi_video_backlight_support()) {
+               compalbl_device = backlight_device_register("compal-laptop", NULL, NULL,
+                                                           &compalbl_ops);
+               if (IS_ERR(compalbl_device))
+                       return PTR_ERR(compalbl_device);
 
-       compalbl_device->props.max_brightness = COMPAL_LCD_LEVEL_MAX-1;
+               compalbl_device->props.max_brightness = COMPAL_LCD_LEVEL_MAX-1;
+       }
 
        ret = platform_driver_register(&compal_driver);
        if (ret)
index 9ef98b2d5039e76bd52054e47be358909c60f58e..02fe2b8b8939cd1f752e815c3c0e4e9310cedf77 100644 (file)
@@ -825,9 +825,15 @@ static int __init eeepc_laptop_init(void)
                return -ENODEV;
        }
        dev = acpi_get_physical_device(ehotk->device->handle);
-       result = eeepc_backlight_init(dev);
-       if (result)
-               goto fail_backlight;
+
+       if (!acpi_video_backlight_support()) {
+               result = eeepc_backlight_init(dev);
+               if (result)
+                       goto fail_backlight;
+       } else
+               printk(EEEPC_INFO "Backlight controlled by ACPI video "
+                      "driver\n");
+
        result = eeepc_hwmon_init(dev);
        if (result)
                goto fail_hwmon;
index d2cf0bfe31638f4de679f47a73c13097d527f3d4..a7dd3e9fb79de5aa4efde7b293f139d90c87e994 100644 (file)
@@ -464,6 +464,14 @@ static int dmi_check_cb_s6410(const struct dmi_system_id *id)
        return 0;
 }
 
+static int dmi_check_cb_s6420(const struct dmi_system_id *id)
+{
+       dmi_check_cb_common(id);
+       fujitsu->keycode1 = KEY_SCREENLOCK;     /* "Lock" */
+       fujitsu->keycode2 = KEY_HELP;   /* "Mobility Center" */
+       return 0;
+}
+
 static int dmi_check_cb_p8010(const struct dmi_system_id *id)
 {
        dmi_check_cb_common(id);
@@ -473,7 +481,7 @@ static int dmi_check_cb_p8010(const struct dmi_system_id *id)
        return 0;
 }
 
-static struct dmi_system_id __initdata fujitsu_dmi_table[] = {
+static struct dmi_system_id fujitsu_dmi_table[] = {
        {
         .ident = "Fujitsu Siemens S6410",
         .matches = {
@@ -481,6 +489,13 @@ static struct dmi_system_id __initdata fujitsu_dmi_table[] = {
                     DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK S6410"),
                     },
         .callback = dmi_check_cb_s6410},
+       {
+        .ident = "Fujitsu Siemens S6420",
+        .matches = {
+                    DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+                    DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK S6420"),
+                    },
+        .callback = dmi_check_cb_s6420},
        {
         .ident = "Fujitsu LifeBook P8010",
         .matches = {
@@ -990,16 +1005,16 @@ static int __init fujitsu_init(void)
 
        /* Register backlight stuff */
 
-       fujitsu->bl_device =
-           backlight_device_register("fujitsu-laptop", NULL, NULL,
-                                     &fujitsubl_ops);
-       if (IS_ERR(fujitsu->bl_device))
-               return PTR_ERR(fujitsu->bl_device);
-
-       max_brightness = fujitsu->max_brightness;
-
-       fujitsu->bl_device->props.max_brightness = max_brightness - 1;
-       fujitsu->bl_device->props.brightness = fujitsu->brightness_level;
+       if (!acpi_video_backlight_support()) {
+               fujitsu->bl_device =
+                       backlight_device_register("fujitsu-laptop", NULL, NULL,
+                                                 &fujitsubl_ops);
+               if (IS_ERR(fujitsu->bl_device))
+                       return PTR_ERR(fujitsu->bl_device);
+               max_brightness = fujitsu->max_brightness;
+               fujitsu->bl_device->props.max_brightness = max_brightness - 1;
+               fujitsu->bl_device->props.brightness = fujitsu->brightness_level;
+       }
 
        ret = platform_driver_register(&fujitsupf_driver);
        if (ret)
@@ -1035,7 +1050,8 @@ fail_hotkey:
 
 fail_backlight:
 
-       backlight_device_unregister(fujitsu->bl_device);
+       if (fujitsu->bl_device)
+               backlight_device_unregister(fujitsu->bl_device);
 
 fail_platform_device2:
 
@@ -1062,7 +1078,8 @@ static void __exit fujitsu_cleanup(void)
                           &fujitsupf_attribute_group);
        platform_device_unregister(fujitsu->pf_device);
        platform_driver_unregister(&fujitsupf_driver);
-       backlight_device_unregister(fujitsu->bl_device);
+       if (fujitsu->bl_device)
+               backlight_device_unregister(fujitsu->bl_device);
 
        acpi_bus_unregister_driver(&acpi_fujitsu_driver);
 
diff --git a/drivers/misc/ics932s401.c b/drivers/misc/ics932s401.c
new file mode 100644 (file)
index 0000000..6e43ab4
--- /dev/null
@@ -0,0 +1,515 @@
+/*
+ * A driver for the Integrated Circuits ICS932S401
+ * Copyright (C) 2008 IBM
+ *
+ * Author: Darrick J. Wong <djwong@us.ibm.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <linux/module.h>
+#include <linux/jiffies.h>
+#include <linux/i2c.h>
+#include <linux/err.h>
+#include <linux/mutex.h>
+#include <linux/delay.h>
+#include <linux/log2.h>
+
+/* Addresses to scan */
+static const unsigned short normal_i2c[] = { 0x69, I2C_CLIENT_END };
+
+/* Insmod parameters */
+I2C_CLIENT_INSMOD_1(ics932s401);
+
+/* ICS932S401 registers */
+#define ICS932S401_REG_CFG2                    0x01
+#define        ICS932S401_CFG1_SPREAD          0x01
+#define ICS932S401_REG_CFG7                    0x06
+#define                ICS932S401_FS_MASK              0x07
+#define        ICS932S401_REG_VENDOR_REV               0x07
+#define                ICS932S401_VENDOR               1
+#define                ICS932S401_VENDOR_MASK          0x0F
+#define                ICS932S401_REV                  4
+#define                ICS932S401_REV_SHIFT            4
+#define ICS932S401_REG_DEVICE                  0x09
+#define                ICS932S401_DEVICE               11
+#define        ICS932S401_REG_CTRL                     0x0A
+#define                ICS932S401_MN_ENABLED           0x80
+#define                ICS932S401_CPU_ALT              0x04
+#define                ICS932S401_SRC_ALT              0x08
+#define ICS932S401_REG_CPU_M_CTRL              0x0B
+#define                ICS932S401_M_MASK               0x3F
+#define        ICS932S401_REG_CPU_N_CTRL               0x0C
+#define        ICS932S401_REG_CPU_SPREAD1              0x0D
+#define ICS932S401_REG_CPU_SPREAD2             0x0E
+#define                ICS932S401_SPREAD_MASK          0x7FFF
+#define ICS932S401_REG_SRC_M_CTRL              0x0F
+#define ICS932S401_REG_SRC_N_CTRL              0x10
+#define        ICS932S401_REG_SRC_SPREAD1              0x11
+#define ICS932S401_REG_SRC_SPREAD2             0x12
+#define ICS932S401_REG_CPU_DIVISOR             0x13
+#define        ICS932S401_CPU_DIVISOR_SHIFT    4
+#define ICS932S401_REG_PCISRC_DIVISOR          0x14
+#define                ICS932S401_SRC_DIVISOR_MASK     0x0F
+#define                ICS932S401_PCI_DIVISOR_SHIFT    4
+
+/* Base clock is 14.318MHz */
+#define BASE_CLOCK                             14318
+
+#define NUM_REGS                               21
+#define NUM_MIRRORED_REGS                      15
+
+static int regs_to_copy[NUM_MIRRORED_REGS] = {
+       ICS932S401_REG_CFG2,
+       ICS932S401_REG_CFG7,
+       ICS932S401_REG_VENDOR_REV,
+       ICS932S401_REG_DEVICE,
+       ICS932S401_REG_CTRL,
+       ICS932S401_REG_CPU_M_CTRL,
+       ICS932S401_REG_CPU_N_CTRL,
+       ICS932S401_REG_CPU_SPREAD1,
+       ICS932S401_REG_CPU_SPREAD2,
+       ICS932S401_REG_SRC_M_CTRL,
+       ICS932S401_REG_SRC_N_CTRL,
+       ICS932S401_REG_SRC_SPREAD1,
+       ICS932S401_REG_SRC_SPREAD2,
+       ICS932S401_REG_CPU_DIVISOR,
+       ICS932S401_REG_PCISRC_DIVISOR,
+};
+
+/* How often do we reread sensors values? (In jiffies) */
+#define SENSOR_REFRESH_INTERVAL        (2 * HZ)
+
+/* How often do we reread sensor limit values? (In jiffies) */
+#define LIMIT_REFRESH_INTERVAL (60 * HZ)
+
+struct ics932s401_data {
+       struct attribute_group  attrs;
+       struct mutex            lock;
+       char                    sensors_valid;
+       unsigned long           sensors_last_updated;   /* In jiffies */
+
+       u8                      regs[NUM_REGS];
+};
+
+static int ics932s401_probe(struct i2c_client *client,
+                        const struct i2c_device_id *id);
+static int ics932s401_detect(struct i2c_client *client, int kind,
+                         struct i2c_board_info *info);
+static int ics932s401_remove(struct i2c_client *client);
+
+static const struct i2c_device_id ics932s401_id[] = {
+       { "ics932s401", ics932s401 },
+       { }
+};
+MODULE_DEVICE_TABLE(i2c, ics932s401_id);
+
+static struct i2c_driver ics932s401_driver = {
+       .class          = I2C_CLASS_HWMON,
+       .driver = {
+               .name   = "ics932s401",
+       },
+       .probe          = ics932s401_probe,
+       .remove         = ics932s401_remove,
+       .id_table       = ics932s401_id,
+       .detect         = ics932s401_detect,
+       .address_data   = &addr_data,
+};
+
+static struct ics932s401_data *ics932s401_update_device(struct device *dev)
+{
+       struct i2c_client *client = to_i2c_client(dev);
+       struct ics932s401_data *data = i2c_get_clientdata(client);
+       unsigned long local_jiffies = jiffies;
+       int i, temp;
+
+       mutex_lock(&data->lock);
+       if (time_before(local_jiffies, data->sensors_last_updated +
+               SENSOR_REFRESH_INTERVAL)
+               && data->sensors_valid)
+               goto out;
+
+       /*
+        * Each register must be read as a word and then right shifted 8 bits.
+        * Not really sure why this is; setting the "byte count programming"
+        * register to 1 does not fix this problem.
+        */
+       for (i = 0; i < NUM_MIRRORED_REGS; i++) {
+               temp = i2c_smbus_read_word_data(client, regs_to_copy[i]);
+               data->regs[regs_to_copy[i]] = temp >> 8;
+       }
+
+       data->sensors_last_updated = local_jiffies;
+       data->sensors_valid = 1;
+
+out:
+       mutex_unlock(&data->lock);
+       return data;
+}
+
+static ssize_t show_spread_enabled(struct device *dev,
+                                  struct device_attribute *devattr,
+                                  char *buf)
+{
+       struct ics932s401_data *data = ics932s401_update_device(dev);
+
+       if (data->regs[ICS932S401_REG_CFG2] & ICS932S401_CFG1_SPREAD)
+               return sprintf(buf, "1\n");
+
+       return sprintf(buf, "0\n");
+}
+
+/* bit to cpu khz map */
+static const int fs_speeds[] = {
+       266666,
+       133333,
+       200000,
+       166666,
+       333333,
+       100000,
+       400000,
+       0,
+};
+
+/* clock divisor map */
+static const int divisors[] = {2, 3, 5, 15, 4, 6, 10, 30, 8, 12, 20, 60, 16,
+                              24, 40, 120};
+
+/* Calculate CPU frequency from the M/N registers. */
+static int calculate_cpu_freq(struct ics932s401_data *data)
+{
+       int m, n, freq;
+
+       m = data->regs[ICS932S401_REG_CPU_M_CTRL] & ICS932S401_M_MASK;
+       n = data->regs[ICS932S401_REG_CPU_N_CTRL];
+
+       /* Pull in bits 8 & 9 from the M register */
+       n |= ((int)data->regs[ICS932S401_REG_CPU_M_CTRL] & 0x80) << 1;
+       n |= ((int)data->regs[ICS932S401_REG_CPU_M_CTRL] & 0x40) << 3;
+
+       freq = BASE_CLOCK * (n + 8) / (m + 2);
+       freq /= divisors[data->regs[ICS932S401_REG_CPU_DIVISOR] >>
+                        ICS932S401_CPU_DIVISOR_SHIFT];
+
+       return freq;
+}
+
+static ssize_t show_cpu_clock(struct device *dev,
+                             struct device_attribute *devattr,
+                             char *buf)
+{
+       struct ics932s401_data *data = ics932s401_update_device(dev);
+
+       return sprintf(buf, "%d\n", calculate_cpu_freq(data));
+}
+
+static ssize_t show_cpu_clock_sel(struct device *dev,
+                                 struct device_attribute *devattr,
+                                 char *buf)
+{
+       struct ics932s401_data *data = ics932s401_update_device(dev);
+       int freq;
+
+       if (data->regs[ICS932S401_REG_CTRL] & ICS932S401_MN_ENABLED)
+               freq = calculate_cpu_freq(data);
+       else {
+               /* Freq is neatly wrapped up for us */
+               int fid = data->regs[ICS932S401_REG_CFG7] & ICS932S401_FS_MASK;
+               freq = fs_speeds[fid];
+               if (data->regs[ICS932S401_REG_CTRL] & ICS932S401_CPU_ALT) {
+                       switch (freq) {
+                       case 166666:
+                               freq = 160000;
+                               break;
+                       case 333333:
+                               freq = 320000;
+                               break;
+                       }
+               }
+       }
+
+       return sprintf(buf, "%d\n", freq);
+}
+
+/* Calculate SRC frequency from the M/N registers. */
+static int calculate_src_freq(struct ics932s401_data *data)
+{
+       int m, n, freq;
+
+       m = data->regs[ICS932S401_REG_SRC_M_CTRL] & ICS932S401_M_MASK;
+       n = data->regs[ICS932S401_REG_SRC_N_CTRL];
+
+       /* Pull in bits 8 & 9 from the M register */
+       n |= ((int)data->regs[ICS932S401_REG_SRC_M_CTRL] & 0x80) << 1;
+       n |= ((int)data->regs[ICS932S401_REG_SRC_M_CTRL] & 0x40) << 3;
+
+       freq = BASE_CLOCK * (n + 8) / (m + 2);
+       freq /= divisors[data->regs[ICS932S401_REG_PCISRC_DIVISOR] &
+                        ICS932S401_SRC_DIVISOR_MASK];
+
+       return freq;
+}
+
+static ssize_t show_src_clock(struct device *dev,
+                             struct device_attribute *devattr,
+                             char *buf)
+{
+       struct ics932s401_data *data = ics932s401_update_device(dev);
+
+       return sprintf(buf, "%d\n", calculate_src_freq(data));
+}
+
+static ssize_t show_src_clock_sel(struct device *dev,
+                                 struct device_attribute *devattr,
+                                 char *buf)
+{
+       struct ics932s401_data *data = ics932s401_update_device(dev);
+       int freq;
+
+       if (data->regs[ICS932S401_REG_CTRL] & ICS932S401_MN_ENABLED)
+               freq = calculate_src_freq(data);
+       else
+               /* Freq is neatly wrapped up for us */
+               if (data->regs[ICS932S401_REG_CTRL] & ICS932S401_CPU_ALT &&
+                   data->regs[ICS932S401_REG_CTRL] & ICS932S401_SRC_ALT)
+                       freq = 96000;
+               else
+                       freq = 100000;
+
+       return sprintf(buf, "%d\n", freq);
+}
+
+/* Calculate PCI frequency from the SRC M/N registers. */
+static int calculate_pci_freq(struct ics932s401_data *data)
+{
+       int m, n, freq;
+
+       m = data->regs[ICS932S401_REG_SRC_M_CTRL] & ICS932S401_M_MASK;
+       n = data->regs[ICS932S401_REG_SRC_N_CTRL];
+
+       /* Pull in bits 8 & 9 from the M register */
+       n |= ((int)data->regs[ICS932S401_REG_SRC_M_CTRL] & 0x80) << 1;
+       n |= ((int)data->regs[ICS932S401_REG_SRC_M_CTRL] & 0x40) << 3;
+
+       freq = BASE_CLOCK * (n + 8) / (m + 2);
+       freq /= divisors[data->regs[ICS932S401_REG_PCISRC_DIVISOR] >>
+                        ICS932S401_PCI_DIVISOR_SHIFT];
+
+       return freq;
+}
+
+static ssize_t show_pci_clock(struct device *dev,
+                             struct device_attribute *devattr,
+                             char *buf)
+{
+       struct ics932s401_data *data = ics932s401_update_device(dev);
+
+       return sprintf(buf, "%d\n", calculate_pci_freq(data));
+}
+
+static ssize_t show_pci_clock_sel(struct device *dev,
+                                 struct device_attribute *devattr,
+                                 char *buf)
+{
+       struct ics932s401_data *data = ics932s401_update_device(dev);
+       int freq;
+
+       if (data->regs[ICS932S401_REG_CTRL] & ICS932S401_MN_ENABLED)
+               freq = calculate_pci_freq(data);
+       else
+               freq = 33333;
+
+       return sprintf(buf, "%d\n", freq);
+}
+
+static ssize_t show_value(struct device *dev,
+                         struct device_attribute *devattr,
+                         char *buf);
+
+static ssize_t show_spread(struct device *dev,
+                          struct device_attribute *devattr,
+                          char *buf);
+
+static DEVICE_ATTR(spread_enabled, S_IRUGO, show_spread_enabled, NULL);
+static DEVICE_ATTR(cpu_clock_selection, S_IRUGO, show_cpu_clock_sel, NULL);
+static DEVICE_ATTR(cpu_clock, S_IRUGO, show_cpu_clock, NULL);
+static DEVICE_ATTR(src_clock_selection, S_IRUGO, show_src_clock_sel, NULL);
+static DEVICE_ATTR(src_clock, S_IRUGO, show_src_clock, NULL);
+static DEVICE_ATTR(pci_clock_selection, S_IRUGO, show_pci_clock_sel, NULL);
+static DEVICE_ATTR(pci_clock, S_IRUGO, show_pci_clock, NULL);
+static DEVICE_ATTR(usb_clock, S_IRUGO, show_value, NULL);
+static DEVICE_ATTR(ref_clock, S_IRUGO, show_value, NULL);
+static DEVICE_ATTR(cpu_spread, S_IRUGO, show_spread, NULL);
+static DEVICE_ATTR(src_spread, S_IRUGO, show_spread, NULL);
+
+static struct attribute *ics932s401_attr[] =
+{
+       &dev_attr_spread_enabled.attr,
+       &dev_attr_cpu_clock_selection.attr,
+       &dev_attr_cpu_clock.attr,
+       &dev_attr_src_clock_selection.attr,
+       &dev_attr_src_clock.attr,
+       &dev_attr_pci_clock_selection.attr,
+       &dev_attr_pci_clock.attr,
+       &dev_attr_usb_clock.attr,
+       &dev_attr_ref_clock.attr,
+       &dev_attr_cpu_spread.attr,
+       &dev_attr_src_spread.attr,
+       NULL
+};
+
+static ssize_t show_value(struct device *dev,
+                         struct device_attribute *devattr,
+                         char *buf)
+{
+       int x;
+
+       if (devattr == &dev_attr_usb_clock)
+               x = 48000;
+       else if (devattr == &dev_attr_ref_clock)
+               x = BASE_CLOCK;
+       else
+               BUG();
+
+       return sprintf(buf, "%d\n", x);
+}
+
+static ssize_t show_spread(struct device *dev,
+                          struct device_attribute *devattr,
+                          char *buf)
+{
+       struct ics932s401_data *data = ics932s401_update_device(dev);
+       int reg;
+       unsigned long val;
+
+       if (!(data->regs[ICS932S401_REG_CFG2] & ICS932S401_CFG1_SPREAD))
+               return sprintf(buf, "0%%\n");
+
+       if (devattr == &dev_attr_src_spread)
+               reg = ICS932S401_REG_SRC_SPREAD1;
+       else if (devattr == &dev_attr_cpu_spread)
+               reg = ICS932S401_REG_CPU_SPREAD1;
+       else
+               BUG();
+
+       val = data->regs[reg] | (data->regs[reg + 1] << 8);
+       val &= ICS932S401_SPREAD_MASK;
+
+       /* Scale 0..2^14 to -0.5. */
+       val = 500000 * val / 16384;
+       return sprintf(buf, "-0.%lu%%\n", val);
+}
+
+/* Return 0 if detection is successful, -ENODEV otherwise */
+static int ics932s401_detect(struct i2c_client *client, int kind,
+                         struct i2c_board_info *info)
+{
+       struct i2c_adapter *adapter = client->adapter;
+
+       if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
+               return -ENODEV;
+
+       if (kind <= 0) {
+               int vendor, device, revision;
+
+               vendor = i2c_smbus_read_word_data(client,
+                                                 ICS932S401_REG_VENDOR_REV);
+               vendor >>= 8;
+               revision = vendor >> ICS932S401_REV_SHIFT;
+               vendor &= ICS932S401_VENDOR_MASK;
+               if (vendor != ICS932S401_VENDOR)
+                       return -ENODEV;
+
+               device = i2c_smbus_read_word_data(client,
+                                                 ICS932S401_REG_DEVICE);
+               device >>= 8;
+               if (device != ICS932S401_DEVICE)
+                       return -ENODEV;
+
+               if (revision != ICS932S401_REV)
+                       dev_info(&adapter->dev, "Unknown revision %d\n",
+                                revision);
+       } else
+               dev_dbg(&adapter->dev, "detection forced\n");
+
+       strlcpy(info->type, "ics932s401", I2C_NAME_SIZE);
+
+       return 0;
+}
+
+static int ics932s401_probe(struct i2c_client *client,
+                        const struct i2c_device_id *id)
+{
+       struct ics932s401_data *data;
+       int err;
+
+       data = kzalloc(sizeof(struct ics932s401_data), GFP_KERNEL);
+       if (!data) {
+               err = -ENOMEM;
+               goto exit;
+       }
+
+       i2c_set_clientdata(client, data);
+       mutex_init(&data->lock);
+
+       dev_info(&client->dev, "%s chip found\n", client->name);
+
+       /* Register sysfs hooks */
+       data->attrs.attrs = ics932s401_attr;
+       err = sysfs_create_group(&client->dev.kobj, &data->attrs);
+       if (err)
+               goto exit_free;
+
+       return 0;
+
+exit_free:
+       kfree(data);
+exit:
+       return err;
+}
+
+static int ics932s401_remove(struct i2c_client *client)
+{
+       struct ics932s401_data *data = i2c_get_clientdata(client);
+
+       sysfs_remove_group(&client->dev.kobj, &data->attrs);
+       kfree(data);
+       return 0;
+}
+
+static int __init ics932s401_init(void)
+{
+       return i2c_add_driver(&ics932s401_driver);
+}
+
+static void __exit ics932s401_exit(void)
+{
+       i2c_del_driver(&ics932s401_driver);
+}
+
+MODULE_AUTHOR("Darrick J. Wong <djwong@us.ibm.com>");
+MODULE_DESCRIPTION("ICS932S401 driver");
+MODULE_LICENSE("GPL");
+
+module_init(ics932s401_init);
+module_exit(ics932s401_exit);
+
+/* IBM IntelliStation Z30 */
+MODULE_ALIAS("dmi:bvnIBM:*:rn9228:*");
+MODULE_ALIAS("dmi:bvnIBM:*:rn9232:*");
+
+/* IBM x3650/x3550 */
+MODULE_ALIAS("dmi:bvnIBM:*:pnIBMSystemx3650*");
+MODULE_ALIAS("dmi:bvnIBM:*:pnIBMSystemx3550*");
index e00a2756e97e110654387efec263855a0cd5aaa3..27b7662955bb1659e60415e5b498d7f86af07179 100644 (file)
@@ -52,6 +52,11 @@ MODULE_LICENSE("GPL");
 #define MEMORY_ARG_CUR_BANDWIDTH 1
 #define MEMORY_ARG_MAX_BANDWIDTH 0
 
+/*
+ * GTHS returning 'n' would mean that [0,n-1] states are supported
+ * In that case max_cstate would be n-1
+ * GTHS returning '0' would mean that no bandwidth control states are supported
+ */
 static int memory_get_int_max_bandwidth(struct thermal_cooling_device *cdev,
                                        unsigned long *max_state)
 {
@@ -71,6 +76,9 @@ static int memory_get_int_max_bandwidth(struct thermal_cooling_device *cdev,
        if (ACPI_FAILURE(status))
                return -EFAULT;
 
+       if (!value)
+               return -EINVAL;
+
        *max_state = value - 1;
        return 0;
 }
@@ -121,7 +129,7 @@ static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev,
        if (memory_get_int_max_bandwidth(cdev, &max_state))
                return -EFAULT;
 
-       if (max_state < 0 || state > max_state)
+       if (state > max_state)
                return -EINVAL;
 
        arg_list.count = 1;
index de898c6938f37acd6194d27c3706c36b193716a5..759763d18e4c969beac31717a949a7de2c20fa29 100644 (file)
@@ -347,12 +347,16 @@ static int __init msi_init(void)
 
        /* Register backlight stuff */
 
-       msibl_device = backlight_device_register("msi-laptop-bl", NULL, NULL,
-                                               &msibl_ops);
-       if (IS_ERR(msibl_device))
-               return PTR_ERR(msibl_device);
-
-       msibl_device->props.max_brightness = MSI_LCD_LEVEL_MAX-1;
+       if (acpi_video_backlight_support()) {
+               printk(KERN_INFO "MSI: Brightness ignored, must be controlled "
+                      "by ACPI video driver\n");
+       } else {
+               msibl_device = backlight_device_register("msi-laptop-bl", NULL,
+                                                        NULL, &msibl_ops);
+               if (IS_ERR(msibl_device))
+                       return PTR_ERR(msibl_device);
+               msibl_device->props.max_brightness = MSI_LCD_LEVEL_MAX-1;
+       }
 
        ret = platform_driver_register(&msipf_driver);
        if (ret)
index d03597a521b00124bf6f6174da61c51185790c11..9e9170b3599a249e4576fbb8b8d4214dead20a2a 100644 (file)
@@ -1,3 +1,7 @@
+ifdef CONFIG_SGI_GRU_DEBUG
+  EXTRA_CFLAGS += -DDEBUG
+endif
+
 obj-$(CONFIG_SGI_GRU) := gru.o
 gru-y := grufile.o grumain.o grufault.o grutlbpurge.o gruprocfs.o grukservices.o
 
index 8c389d606c304c8b9b34022c8d2e71ceba4bb6e8..3ee698ad85997cf2f5c32b986689d7c07a0ed607 100644 (file)
@@ -254,7 +254,11 @@ static int atomic_pte_lookup(struct vm_area_struct *vma, unsigned long vaddr,
                return 1;
 
        *paddr = pte_pfn(pte) << PAGE_SHIFT;
+#ifdef CONFIG_HUGETLB_PAGE
        *pageshift = is_vm_hugetlb_page(vma) ? HPAGE_SHIFT : PAGE_SHIFT;
+#else
+       *pageshift = PAGE_SHIFT;
+#endif
        return 0;
 
 err:
index 5c027b6b4e5a7438815b290e09a99a0290bf55f5..6509838063924071cfdcfce11cf1d425b2ad170a 100644 (file)
@@ -481,7 +481,7 @@ struct vm_operations_struct gru_vm_ops = {
        .fault          = gru_fault,
 };
 
-module_init(gru_init);
+fs_initcall(gru_init);
 module_exit(gru_exit);
 
 module_param(gru_options, ulong, 0644);
index 533923f83f1aa061635571b86934ad2715014be7..73b0ca061bb567401cc4d30a145c9daf05e72160 100644 (file)
@@ -317,7 +317,6 @@ int gru_proc_init(void)
 {
        struct proc_entry *p;
 
-       proc_mkdir("sgi_uv", NULL);
        proc_gru = proc_mkdir("sgi_uv/gru", NULL);
 
        for (p = proc_files; p->name; p++)
index ed1722e50049ff2aea256edbb574bb9969cb3bda..7b4cbd5e03e99a3e4297dc6d4b6de219d30f7389 100644 (file)
@@ -194,9 +194,10 @@ enum xp_retval {
        xpGruSendMqError,       /* 59: gru send message queue related error */
 
        xpBadChannelNumber,     /* 60: invalid channel number */
-       xpBadMsgType,           /* 60: invalid message type */
+       xpBadMsgType,           /* 61: invalid message type */
+       xpBiosError,            /* 62: BIOS error */
 
-       xpUnknownReason         /* 61: unknown reason - must be last in enum */
+       xpUnknownReason         /* 63: unknown reason - must be last in enum */
 };
 
 /*
@@ -345,6 +346,8 @@ extern unsigned long (*xp_pa) (void *);
 extern enum xp_retval (*xp_remote_memcpy) (unsigned long, const unsigned long,
                       size_t);
 extern int (*xp_cpu_to_nasid) (int);
+extern enum xp_retval (*xp_expand_memprotect) (unsigned long, unsigned long);
+extern enum xp_retval (*xp_restrict_memprotect) (unsigned long, unsigned long);
 
 extern u64 xp_nofault_PIOR_target;
 extern int xp_nofault_PIOR(void *);
index 66a1d19e08ad73ccd651f22efaddc4605fc0857a..9a2e77172d942f548402e9ce8ccce25d9e3bf935 100644 (file)
@@ -51,6 +51,13 @@ EXPORT_SYMBOL_GPL(xp_remote_memcpy);
 int (*xp_cpu_to_nasid) (int cpuid);
 EXPORT_SYMBOL_GPL(xp_cpu_to_nasid);
 
+enum xp_retval (*xp_expand_memprotect) (unsigned long phys_addr,
+                                       unsigned long size);
+EXPORT_SYMBOL_GPL(xp_expand_memprotect);
+enum xp_retval (*xp_restrict_memprotect) (unsigned long phys_addr,
+                                         unsigned long size);
+EXPORT_SYMBOL_GPL(xp_restrict_memprotect);
+
 /*
  * xpc_registrations[] keeps track of xpc_connect()'s done by the kernel-level
  * users of XPC.
index 1440134caf3166d25339771b73df741b814e35e1..fb3ec9d735a901fb7825c1d254f188d0334a2509 100644 (file)
@@ -120,6 +120,38 @@ xp_cpu_to_nasid_sn2(int cpuid)
        return cpuid_to_nasid(cpuid);
 }
 
+static enum xp_retval
+xp_expand_memprotect_sn2(unsigned long phys_addr, unsigned long size)
+{
+       u64 nasid_array = 0;
+       int ret;
+
+       ret = sn_change_memprotect(phys_addr, size, SN_MEMPROT_ACCESS_CLASS_1,
+                                  &nasid_array);
+       if (ret != 0) {
+               dev_err(xp, "sn_change_memprotect(,, "
+                       "SN_MEMPROT_ACCESS_CLASS_1,) failed ret=%d\n", ret);
+               return xpSalError;
+       }
+       return xpSuccess;
+}
+
+static enum xp_retval
+xp_restrict_memprotect_sn2(unsigned long phys_addr, unsigned long size)
+{
+       u64 nasid_array = 0;
+       int ret;
+
+       ret = sn_change_memprotect(phys_addr, size, SN_MEMPROT_ACCESS_CLASS_0,
+                                  &nasid_array);
+       if (ret != 0) {
+               dev_err(xp, "sn_change_memprotect(,, "
+                       "SN_MEMPROT_ACCESS_CLASS_0,) failed ret=%d\n", ret);
+               return xpSalError;
+       }
+       return xpSuccess;
+}
+
 enum xp_retval
 xp_init_sn2(void)
 {
@@ -132,6 +164,8 @@ xp_init_sn2(void)
        xp_pa = xp_pa_sn2;
        xp_remote_memcpy = xp_remote_memcpy_sn2;
        xp_cpu_to_nasid = xp_cpu_to_nasid_sn2;
+       xp_expand_memprotect = xp_expand_memprotect_sn2;
+       xp_restrict_memprotect = xp_restrict_memprotect_sn2;
 
        return xp_register_nofault_code_sn2();
 }
index d9f7ce2510bcc26fe6f7c31fd287ebd4ad91f96b..d238576b26fa9b6c8f5d96b8f41760db444d43f1 100644 (file)
 
 #include <linux/device.h>
 #include <asm/uv/uv_hub.h>
+#if defined CONFIG_X86_64
+#include <asm/uv/bios.h>
+#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+#include <asm/sn/sn_sal.h>
+#endif
 #include "../sgi-gru/grukservices.h"
 #include "xp.h"
 
@@ -49,18 +54,79 @@ xp_cpu_to_nasid_uv(int cpuid)
        return UV_PNODE_TO_NASID(uv_cpu_to_pnode(cpuid));
 }
 
+static enum xp_retval
+xp_expand_memprotect_uv(unsigned long phys_addr, unsigned long size)
+{
+       int ret;
+
+#if defined CONFIG_X86_64
+       ret = uv_bios_change_memprotect(phys_addr, size, UV_MEMPROT_ALLOW_RW);
+       if (ret != BIOS_STATUS_SUCCESS) {
+               dev_err(xp, "uv_bios_change_memprotect(,, "
+                       "UV_MEMPROT_ALLOW_RW) failed, ret=%d\n", ret);
+               return xpBiosError;
+       }
+
+#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+       u64 nasid_array;
+
+       ret = sn_change_memprotect(phys_addr, size, SN_MEMPROT_ACCESS_CLASS_1,
+                                  &nasid_array);
+       if (ret != 0) {
+               dev_err(xp, "sn_change_memprotect(,, "
+                       "SN_MEMPROT_ACCESS_CLASS_1,) failed ret=%d\n", ret);
+               return xpSalError;
+       }
+#else
+       #error not a supported configuration
+#endif
+       return xpSuccess;
+}
+
+static enum xp_retval
+xp_restrict_memprotect_uv(unsigned long phys_addr, unsigned long size)
+{
+       int ret;
+
+#if defined CONFIG_X86_64
+       ret = uv_bios_change_memprotect(phys_addr, size,
+                                       UV_MEMPROT_RESTRICT_ACCESS);
+       if (ret != BIOS_STATUS_SUCCESS) {
+               dev_err(xp, "uv_bios_change_memprotect(,, "
+                       "UV_MEMPROT_RESTRICT_ACCESS) failed, ret=%d\n", ret);
+               return xpBiosError;
+       }
+
+#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+       u64 nasid_array;
+
+       ret = sn_change_memprotect(phys_addr, size, SN_MEMPROT_ACCESS_CLASS_0,
+                                  &nasid_array);
+       if (ret != 0) {
+               dev_err(xp, "sn_change_memprotect(,, "
+                       "SN_MEMPROT_ACCESS_CLASS_0,) failed ret=%d\n", ret);
+               return xpSalError;
+       }
+#else
+       #error not a supported configuration
+#endif
+       return xpSuccess;
+}
+
 enum xp_retval
 xp_init_uv(void)
 {
        BUG_ON(!is_uv());
 
        xp_max_npartitions = XP_MAX_NPARTITIONS_UV;
-       xp_partition_id = 0;    /* !!! not correct value */
-       xp_region_size = 0;     /* !!! not correct value */
+       xp_partition_id = sn_partition_id;
+       xp_region_size = sn_region_size;
 
        xp_pa = xp_pa_uv;
        xp_remote_memcpy = xp_remote_memcpy_uv;
        xp_cpu_to_nasid = xp_cpu_to_nasid_uv;
+       xp_expand_memprotect = xp_expand_memprotect_uv;
+       xp_restrict_memprotect = xp_restrict_memprotect_uv;
 
        return xpSuccess;
 }
index 619208d618627692c8cbaec3e0448b1d15479577..a5bd658c2e83b13a5d9dee5805a71eb191750e21 100644 (file)
@@ -180,6 +180,18 @@ struct xpc_vars_part_sn2 {
                                 (XPC_RP_MACH_NASIDS(_rp) + \
                                  xpc_nasid_mask_nlongs))
 
+/*
+ * Info pertinent to a GRU message queue using a watch list for irq generation.
+ */
+struct xpc_gru_mq_uv {
+       void *address;          /* address of GRU message queue */
+       unsigned int order;     /* size of GRU message queue as a power of 2 */
+       int irq;                /* irq raised when message is received in mq */
+       int mmr_blade;          /* blade where watchlist was allocated from */
+       unsigned long mmr_offset; /* offset of irq mmr located on mmr_blade */
+       int watchlist_num;      /* number of watchlist allocatd by BIOS */
+};
+
 /*
  * The activate_mq is used to send/receive GRU messages that affect XPC's
  * heartbeat, partition active state, and channel state. This is UV only.
index b4882ccf6344a69607ee8c62f1ff3c84c32ce894..73b7fb8de47a32e0e38b8abe048ede7333fbe832 100644 (file)
@@ -553,22 +553,17 @@ static u64 xpc_prot_vec_sn2[MAX_NUMNODES];
 static enum xp_retval
 xpc_allow_amo_ops_sn2(struct amo *amos_page)
 {
-       u64 nasid_array = 0;
-       int ret;
+       enum xp_retval ret = xpSuccess;
 
        /*
         * On SHUB 1.1, we cannot call sn_change_memprotect() since the BIST
         * collides with memory operations. On those systems we call
         * xpc_allow_amo_ops_shub_wars_1_1_sn2() instead.
         */
-       if (!enable_shub_wars_1_1()) {
-               ret = sn_change_memprotect(ia64_tpa((u64)amos_page), PAGE_SIZE,
-                                          SN_MEMPROT_ACCESS_CLASS_1,
-                                          &nasid_array);
-               if (ret != 0)
-                       return xpSalError;
-       }
-       return xpSuccess;
+       if (!enable_shub_wars_1_1())
+               ret = xp_expand_memprotect(ia64_tpa((u64)amos_page), PAGE_SIZE);
+
+       return ret;
 }
 
 /*
index 1ac694c01623b99419e3b7d2afb9a2c16d8ceda7..91a55b1b1037011c5e403b19dac8c710d18632d5 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/delay.h>
 #include <linux/device.h>
+#include <linux/err.h>
 #include <asm/uv/uv_hub.h>
+#if defined CONFIG_X86_64
+#include <asm/uv/bios.h>
+#include <asm/uv/uv_irq.h>
+#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+#include <asm/sn/intr.h>
+#include <asm/sn/sn_sal.h>
+#endif
 #include "../sgi-gru/gru.h"
 #include "../sgi-gru/grukservices.h"
 #include "xpc.h"
@@ -27,15 +35,17 @@ static atomic64_t xpc_heartbeat_uv;
 static DECLARE_BITMAP(xpc_heartbeating_to_mask_uv, XP_MAX_NPARTITIONS_UV);
 
 #define XPC_ACTIVATE_MSG_SIZE_UV       (1 * GRU_CACHE_LINE_BYTES)
-#define XPC_NOTIFY_MSG_SIZE_UV         (2 * GRU_CACHE_LINE_BYTES)
+#define XPC_ACTIVATE_MQ_SIZE_UV                (4 * XP_MAX_NPARTITIONS_UV * \
+                                        XPC_ACTIVATE_MSG_SIZE_UV)
+#define XPC_ACTIVATE_IRQ_NAME          "xpc_activate"
 
-#define XPC_ACTIVATE_MQ_SIZE_UV        (4 * XP_MAX_NPARTITIONS_UV * \
-                                XPC_ACTIVATE_MSG_SIZE_UV)
-#define XPC_NOTIFY_MQ_SIZE_UV  (4 * XP_MAX_NPARTITIONS_UV * \
-                                XPC_NOTIFY_MSG_SIZE_UV)
+#define XPC_NOTIFY_MSG_SIZE_UV         (2 * GRU_CACHE_LINE_BYTES)
+#define XPC_NOTIFY_MQ_SIZE_UV          (4 * XP_MAX_NPARTITIONS_UV * \
+                                        XPC_NOTIFY_MSG_SIZE_UV)
+#define XPC_NOTIFY_IRQ_NAME            "xpc_notify"
 
-static void *xpc_activate_mq_uv;
-static void *xpc_notify_mq_uv;
+static struct xpc_gru_mq_uv *xpc_activate_mq_uv;
+static struct xpc_gru_mq_uv *xpc_notify_mq_uv;
 
 static int
 xpc_setup_partitions_sn_uv(void)
@@ -52,62 +62,209 @@ xpc_setup_partitions_sn_uv(void)
        return 0;
 }
 
-static void *
-xpc_create_gru_mq_uv(unsigned int mq_size, int cpuid, unsigned int irq,
+static int
+xpc_get_gru_mq_irq_uv(struct xpc_gru_mq_uv *mq, int cpu, char *irq_name)
+{
+#if defined CONFIG_X86_64
+       mq->irq = uv_setup_irq(irq_name, cpu, mq->mmr_blade, mq->mmr_offset);
+       if (mq->irq < 0) {
+               dev_err(xpc_part, "uv_setup_irq() returned error=%d\n",
+                       mq->irq);
+       }
+
+#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+       int mmr_pnode;
+       unsigned long mmr_value;
+
+       if (strcmp(irq_name, XPC_ACTIVATE_IRQ_NAME) == 0)
+               mq->irq = SGI_XPC_ACTIVATE;
+       else if (strcmp(irq_name, XPC_NOTIFY_IRQ_NAME) == 0)
+               mq->irq = SGI_XPC_NOTIFY;
+       else
+               return -EINVAL;
+
+       mmr_pnode = uv_blade_to_pnode(mq->mmr_blade);
+       mmr_value = (unsigned long)cpu_physical_id(cpu) << 32 | mq->irq;
+
+       uv_write_global_mmr64(mmr_pnode, mq->mmr_offset, mmr_value);
+#else
+       #error not a supported configuration
+#endif
+
+       return 0;
+}
+
+static void
+xpc_release_gru_mq_irq_uv(struct xpc_gru_mq_uv *mq)
+{
+#if defined CONFIG_X86_64
+       uv_teardown_irq(mq->irq, mq->mmr_blade, mq->mmr_offset);
+
+#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+       int mmr_pnode;
+       unsigned long mmr_value;
+
+       mmr_pnode = uv_blade_to_pnode(mq->mmr_blade);
+       mmr_value = 1UL << 16;
+
+       uv_write_global_mmr64(mmr_pnode, mq->mmr_offset, mmr_value);
+#else
+       #error not a supported configuration
+#endif
+}
+
+static int
+xpc_gru_mq_watchlist_alloc_uv(struct xpc_gru_mq_uv *mq)
+{
+       int ret;
+
+#if defined CONFIG_X86_64
+       ret = uv_bios_mq_watchlist_alloc(mq->mmr_blade, uv_gpa(mq->address),
+                                        mq->order, &mq->mmr_offset);
+       if (ret < 0) {
+               dev_err(xpc_part, "uv_bios_mq_watchlist_alloc() failed, "
+                       "ret=%d\n", ret);
+               return ret;
+       }
+#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+       ret = sn_mq_watchlist_alloc(mq->mmr_blade, uv_gpa(mq->address),
+                                   mq->order, &mq->mmr_offset);
+       if (ret < 0) {
+               dev_err(xpc_part, "sn_mq_watchlist_alloc() failed, ret=%d\n",
+                       ret);
+               return -EBUSY;
+       }
+#else
+       #error not a supported configuration
+#endif
+
+       mq->watchlist_num = ret;
+       return 0;
+}
+
+static void
+xpc_gru_mq_watchlist_free_uv(struct xpc_gru_mq_uv *mq)
+{
+       int ret;
+
+#if defined CONFIG_X86_64
+       ret = uv_bios_mq_watchlist_free(mq->mmr_blade, mq->watchlist_num);
+       BUG_ON(ret != BIOS_STATUS_SUCCESS);
+#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+       ret = sn_mq_watchlist_free(mq->mmr_blade, mq->watchlist_num);
+       BUG_ON(ret != SALRET_OK);
+#else
+       #error not a supported configuration
+#endif
+}
+
+static struct xpc_gru_mq_uv *
+xpc_create_gru_mq_uv(unsigned int mq_size, int cpu, char *irq_name,
                     irq_handler_t irq_handler)
 {
+       enum xp_retval xp_ret;
        int ret;
        int nid;
-       int mq_order;
+       int pg_order;
        struct page *page;
-       void *mq;
+       struct xpc_gru_mq_uv *mq;
+
+       mq = kmalloc(sizeof(struct xpc_gru_mq_uv), GFP_KERNEL);
+       if (mq == NULL) {
+               dev_err(xpc_part, "xpc_create_gru_mq_uv() failed to kmalloc() "
+                       "a xpc_gru_mq_uv structure\n");
+               ret = -ENOMEM;
+               goto out_1;
+       }
+
+       pg_order = get_order(mq_size);
+       mq->order = pg_order + PAGE_SHIFT;
+       mq_size = 1UL << mq->order;
+
+       mq->mmr_blade = uv_cpu_to_blade_id(cpu);
 
-       nid = cpu_to_node(cpuid);
-       mq_order = get_order(mq_size);
+       nid = cpu_to_node(cpu);
        page = alloc_pages_node(nid, GFP_KERNEL | __GFP_ZERO | GFP_THISNODE,
-                               mq_order);
+                               pg_order);
        if (page == NULL) {
                dev_err(xpc_part, "xpc_create_gru_mq_uv() failed to alloc %d "
                        "bytes of memory on nid=%d for GRU mq\n", mq_size, nid);
-               return NULL;
+               ret = -ENOMEM;
+               goto out_2;
        }
+       mq->address = page_address(page);
 
-       mq = page_address(page);
-       ret = gru_create_message_queue(mq, mq_size);
+       ret = gru_create_message_queue(mq->address, mq_size);
        if (ret != 0) {
                dev_err(xpc_part, "gru_create_message_queue() returned "
                        "error=%d\n", ret);
-               free_pages((unsigned long)mq, mq_order);
-               return NULL;
+               ret = -EINVAL;
+               goto out_3;
        }
 
-       /* !!! Need to do some other things to set up IRQ */
+       /* enable generation of irq when GRU mq operation occurs to this mq */
+       ret = xpc_gru_mq_watchlist_alloc_uv(mq);
+       if (ret != 0)
+               goto out_3;
 
-       ret = request_irq(irq, irq_handler, 0, "xpc", NULL);
+       ret = xpc_get_gru_mq_irq_uv(mq, cpu, irq_name);
+       if (ret != 0)
+               goto out_4;
+
+       ret = request_irq(mq->irq, irq_handler, 0, irq_name, NULL);
        if (ret != 0) {
                dev_err(xpc_part, "request_irq(irq=%d) returned error=%d\n",
-                       irq, ret);
-               free_pages((unsigned long)mq, mq_order);
-               return NULL;
+                       mq->irq, ret);
+               goto out_5;
        }
 
-       /* !!! enable generation of irq when GRU mq op occurs to this mq */
-
-       /* ??? allow other partitions to access GRU mq? */
+       /* allow other partitions to access this GRU mq */
+       xp_ret = xp_expand_memprotect(xp_pa(mq->address), mq_size);
+       if (xp_ret != xpSuccess) {
+               ret = -EACCES;
+               goto out_6;
+       }
 
        return mq;
+
+       /* something went wrong */
+out_6:
+       free_irq(mq->irq, NULL);
+out_5:
+       xpc_release_gru_mq_irq_uv(mq);
+out_4:
+       xpc_gru_mq_watchlist_free_uv(mq);
+out_3:
+       free_pages((unsigned long)mq->address, pg_order);
+out_2:
+       kfree(mq);
+out_1:
+       return ERR_PTR(ret);
 }
 
 static void
-xpc_destroy_gru_mq_uv(void *mq, unsigned int mq_size, unsigned int irq)
+xpc_destroy_gru_mq_uv(struct xpc_gru_mq_uv *mq)
 {
-       /* ??? disallow other partitions to access GRU mq? */
+       unsigned int mq_size;
+       int pg_order;
+       int ret;
+
+       /* disallow other partitions to access GRU mq */
+       mq_size = 1UL << mq->order;
+       ret = xp_restrict_memprotect(xp_pa(mq->address), mq_size);
+       BUG_ON(ret != xpSuccess);
 
-       /* !!! disable generation of irq when GRU mq op occurs to this mq */
+       /* unregister irq handler and release mq irq/vector mapping */
+       free_irq(mq->irq, NULL);
+       xpc_release_gru_mq_irq_uv(mq);
 
-       free_irq(irq, NULL);
+       /* disable generation of irq when GRU mq op occurs to this mq */
+       xpc_gru_mq_watchlist_free_uv(mq);
 
-       free_pages((unsigned long)mq, get_order(mq_size));
+       pg_order = mq->order - PAGE_SHIFT;
+       free_pages((unsigned long)mq->address, pg_order);
+
+       kfree(mq);
 }
 
 static enum xp_retval
@@ -402,7 +559,10 @@ xpc_handle_activate_IRQ_uv(int irq, void *dev_id)
        struct xpc_partition *part;
        int wakeup_hb_checker = 0;
 
-       while ((msg_hdr = gru_get_next_message(xpc_activate_mq_uv)) != NULL) {
+       while (1) {
+               msg_hdr = gru_get_next_message(xpc_activate_mq_uv->address);
+               if (msg_hdr == NULL)
+                       break;
 
                partid = msg_hdr->partid;
                if (partid < 0 || partid >= XP_MAX_NPARTITIONS_UV) {
@@ -418,7 +578,7 @@ xpc_handle_activate_IRQ_uv(int irq, void *dev_id)
                        }
                }
 
-               gru_free_message(xpc_activate_mq_uv, msg_hdr);
+               gru_free_message(xpc_activate_mq_uv->address, msg_hdr);
        }
 
        if (wakeup_hb_checker)
@@ -482,7 +642,7 @@ xpc_send_local_activate_IRQ_uv(struct xpc_partition *part, int act_state_req)
        struct xpc_partition_uv *part_uv = &part->sn.uv;
 
        /*
-        * !!! Make our side think that the remote parition sent an activate
+        * !!! Make our side think that the remote partition sent an activate
         * !!! message our way by doing what the activate IRQ handler would
         * !!! do had one really been sent.
         */
@@ -500,14 +660,39 @@ static enum xp_retval
 xpc_get_partition_rsvd_page_pa_uv(void *buf, u64 *cookie, unsigned long *rp_pa,
                                  size_t *len)
 {
-       /* !!! call the UV version of sn_partition_reserved_page_pa() */
-       return xpUnsupported;
+       s64 status;
+       enum xp_retval ret;
+
+#if defined CONFIG_X86_64
+       status = uv_bios_reserved_page_pa((u64)buf, cookie, (u64 *)rp_pa,
+                                         (u64 *)len);
+       if (status == BIOS_STATUS_SUCCESS)
+               ret = xpSuccess;
+       else if (status == BIOS_STATUS_MORE_PASSES)
+               ret = xpNeedMoreInfo;
+       else
+               ret = xpBiosError;
+
+#elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
+       status = sn_partition_reserved_page_pa((u64)buf, cookie, rp_pa, len);
+       if (status == SALRET_OK)
+               ret = xpSuccess;
+       else if (status == SALRET_MORE_PASSES)
+               ret = xpNeedMoreInfo;
+       else
+               ret = xpSalError;
+
+#else
+       #error not a supported configuration
+#endif
+
+       return ret;
 }
 
 static int
 xpc_setup_rsvd_page_sn_uv(struct xpc_rsvd_page *rp)
 {
-       rp->sn.activate_mq_gpa = uv_gpa(xpc_activate_mq_uv);
+       rp->sn.activate_mq_gpa = uv_gpa(xpc_activate_mq_uv->address);
        return 0;
 }
 
@@ -1411,22 +1596,18 @@ xpc_init_uv(void)
                return -E2BIG;
        }
 
-       /* ??? The cpuid argument's value is 0, is that what we want? */
-       /* !!! The irq argument's value isn't correct. */
-       xpc_activate_mq_uv = xpc_create_gru_mq_uv(XPC_ACTIVATE_MQ_SIZE_UV, 0, 0,
+       xpc_activate_mq_uv = xpc_create_gru_mq_uv(XPC_ACTIVATE_MQ_SIZE_UV, 0,
+                                                 XPC_ACTIVATE_IRQ_NAME,
                                                  xpc_handle_activate_IRQ_uv);
-       if (xpc_activate_mq_uv == NULL)
-               return -ENOMEM;
+       if (IS_ERR(xpc_activate_mq_uv))
+               return PTR_ERR(xpc_activate_mq_uv);
 
-       /* ??? The cpuid argument's value is 0, is that what we want? */
-       /* !!! The irq argument's value isn't correct. */
-       xpc_notify_mq_uv = xpc_create_gru_mq_uv(XPC_NOTIFY_MQ_SIZE_UV, 0, 0,
+       xpc_notify_mq_uv = xpc_create_gru_mq_uv(XPC_NOTIFY_MQ_SIZE_UV, 0,
+                                               XPC_NOTIFY_IRQ_NAME,
                                                xpc_handle_notify_IRQ_uv);
-       if (xpc_notify_mq_uv == NULL) {
-               /* !!! The irq argument's value isn't correct. */
-               xpc_destroy_gru_mq_uv(xpc_activate_mq_uv,
-                                     XPC_ACTIVATE_MQ_SIZE_UV, 0);
-               return -ENOMEM;
+       if (IS_ERR(xpc_notify_mq_uv)) {
+               xpc_destroy_gru_mq_uv(xpc_activate_mq_uv);
+               return PTR_ERR(xpc_notify_mq_uv);
        }
 
        return 0;
@@ -1435,9 +1616,6 @@ xpc_init_uv(void)
 void
 xpc_exit_uv(void)
 {
-       /* !!! The irq argument's value isn't correct. */
-       xpc_destroy_gru_mq_uv(xpc_notify_mq_uv, XPC_NOTIFY_MQ_SIZE_UV, 0);
-
-       /* !!! The irq argument's value isn't correct. */
-       xpc_destroy_gru_mq_uv(xpc_activate_mq_uv, XPC_ACTIVATE_MQ_SIZE_UV, 0);
+       xpc_destroy_gru_mq_uv(xpc_notify_mq_uv);
+       xpc_destroy_gru_mq_uv(xpc_activate_mq_uv);
 }
index 06f07e19dc70748173c373a6dacc07cc25a72935..571b211608d1a7224575d99fe3ca5e27cccd03a2 100644 (file)
@@ -1038,7 +1038,11 @@ static int sony_nc_add(struct acpi_device *device)
                goto outinput;
        }
 
-       if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "GBRT", &handle))) {
+       if (acpi_video_backlight_support()) {
+               printk(KERN_INFO DRV_PFX "brightness ignored, must be "
+                      "controlled by ACPI video driver\n");
+       } else if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "GBRT",
+                                               &handle))) {
                sony_backlight_device = backlight_device_register("sony", NULL,
                                                                  NULL,
                                                                  &sony_backlight_ops);
index 4db1cf9078d9976b5206649aad3d0118272a000a..899766e16fa822cdfd7abc240e2ce0ee7ea329e4 100644 (file)
@@ -4932,16 +4932,25 @@ static int __init brightness_init(struct ibm_init_struct *iibm)
         */
        b = tpacpi_check_std_acpi_brightness_support();
        if (b > 0) {
-               if (thinkpad_id.vendor == PCI_VENDOR_ID_LENOVO) {
-                       printk(TPACPI_NOTICE
-                              "Lenovo BIOS switched to ACPI backlight "
-                              "control mode\n");
-               }
-               if (brightness_enable > 1) {
-                       printk(TPACPI_NOTICE
-                              "standard ACPI backlight interface "
-                              "available, not loading native one...\n");
-                       return 1;
+
+               if (acpi_video_backlight_support()) {
+                       if (brightness_enable > 1) {
+                               printk(TPACPI_NOTICE
+                                      "Standard ACPI backlight interface "
+                                      "available, not loading native one.\n");
+                               return 1;
+                       } else if (brightness_enable == 1) {
+                               printk(TPACPI_NOTICE
+                                      "Backlight control force enabled, even if standard "
+                                      "ACPI backlight interface is available\n");
+                       }
+               } else {
+                       if (brightness_enable > 1) {
+                               printk(TPACPI_NOTICE
+                                      "Standard ACPI backlight interface not "
+                                      "available, thinkpad_acpi native "
+                                      "brightness control enabled\n");
+                       }
                }
        }
 
@@ -5309,6 +5318,7 @@ static enum fan_control_commands fan_control_commands;
 
 static u8 fan_control_initial_status;
 static u8 fan_control_desired_level;
+static u8 fan_control_resume_level;
 static int fan_watchdog_maxinterval;
 
 static struct mutex fan_mutex;
@@ -5431,8 +5441,8 @@ static int fan_set_level(int level)
 
        case TPACPI_FAN_WR_ACPI_FANS:
        case TPACPI_FAN_WR_TPEC:
-               if ((level != TP_EC_FAN_AUTO) &&
-                   (level != TP_EC_FAN_FULLSPEED) &&
+               if (!(level & TP_EC_FAN_AUTO) &&
+                   !(level & TP_EC_FAN_FULLSPEED) &&
                    ((level < 0) || (level > 7)))
                        return -EINVAL;
 
@@ -5996,38 +6006,67 @@ static void fan_exit(void)
 
 static void fan_suspend(pm_message_t state)
 {
+       int rc;
+
        if (!fan_control_allowed)
                return;
 
        /* Store fan status in cache */
-       fan_get_status_safe(NULL);
+       fan_control_resume_level = 0;
+       rc = fan_get_status_safe(&fan_control_resume_level);
+       if (rc < 0)
+               printk(TPACPI_NOTICE
+                       "failed to read fan level for later "
+                       "restore during resume: %d\n", rc);
+
+       /* if it is undefined, don't attempt to restore it.
+        * KEEP THIS LAST */
        if (tp_features.fan_ctrl_status_undef)
-               fan_control_desired_level = TP_EC_FAN_AUTO;
+               fan_control_resume_level = 0;
 }
 
 static void fan_resume(void)
 {
-       u8 saved_fan_level;
        u8 current_level = 7;
        bool do_set = false;
+       int rc;
 
        /* DSDT *always* updates status on resume */
        tp_features.fan_ctrl_status_undef = 0;
 
-       saved_fan_level = fan_control_desired_level;
        if (!fan_control_allowed ||
+           !fan_control_resume_level ||
            (fan_get_status_safe(&current_level) < 0))
                return;
 
        switch (fan_control_access_mode) {
        case TPACPI_FAN_WR_ACPI_SFAN:
-               do_set = (saved_fan_level > current_level);
+               /* never decrease fan level */
+               do_set = (fan_control_resume_level > current_level);
                break;
        case TPACPI_FAN_WR_ACPI_FANS:
        case TPACPI_FAN_WR_TPEC:
-               do_set = ((saved_fan_level & TP_EC_FAN_FULLSPEED) ||
-                         (saved_fan_level == 7 &&
-                          !(current_level & TP_EC_FAN_FULLSPEED)));
+               /* never decrease fan level, scale is:
+                * TP_EC_FAN_FULLSPEED > 7 >= TP_EC_FAN_AUTO
+                *
+                * We expect the firmware to set either 7 or AUTO, but we
+                * handle FULLSPEED out of paranoia.
+                *
+                * So, we can safely only restore FULLSPEED or 7, anything
+                * else could slow the fan.  Restoring AUTO is useless, at
+                * best that's exactly what the DSDT already set (it is the
+                * slower it uses).
+                *
+                * Always keep in mind that the DSDT *will* have set the
+                * fans to what the vendor supposes is the best level.  We
+                * muck with it only to speed the fan up.
+                */
+               if (fan_control_resume_level != 7 &&
+                   !(fan_control_resume_level & TP_EC_FAN_FULLSPEED))
+                       return;
+               else
+                       do_set = !(current_level & TP_EC_FAN_FULLSPEED) &&
+                                (current_level != fan_control_resume_level);
                break;
        default:
                return;
@@ -6035,8 +6074,11 @@ static void fan_resume(void)
        if (do_set) {
                printk(TPACPI_NOTICE
                        "restoring fan level to 0x%02x\n",
-                       saved_fan_level);
-               fan_set_level_safe(saved_fan_level);
+                       fan_control_resume_level);
+               rc = fan_set_level_safe(fan_control_resume_level);
+               if (rc < 0)
+                       printk(TPACPI_NOTICE
+                               "failed to restore fan level: %d\n", rc);
        }
 }
 
index 76a76751da3660ce63123844d97eca891d2cbab2..6659b2275c0c6a5ce150906c25ac1d106700065a 100644 (file)
@@ -37,9 +37,9 @@
 #define        OPCODE_NORM_READ        0x03    /* Read data bytes (low frequency) */
 #define        OPCODE_FAST_READ        0x0b    /* Read data bytes (high frequency) */
 #define        OPCODE_PP               0x02    /* Page program (up to 256 bytes) */
-#define        OPCODE_BE_4K            0x20    /* Erase 4KiB block */
+#define        OPCODE_BE_4K            0x20    /* Erase 4KiB block */
 #define        OPCODE_BE_32K           0x52    /* Erase 32KiB block */
-#define        OPCODE_BE               0xc7    /* Erase whole flash block */
+#define        OPCODE_CHIP_ERASE       0xc7    /* Erase whole flash chip */
 #define        OPCODE_SE               0xd8    /* Sector erase (usually 64KiB) */
 #define        OPCODE_RDID             0x9f    /* Read JEDEC ID */
 
@@ -167,7 +167,7 @@ static int wait_till_ready(struct m25p *flash)
  *
  * Returns 0 if successful, non-zero otherwise.
  */
-static int erase_block(struct m25p *flash)
+static int erase_chip(struct m25p *flash)
 {
        DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB\n",
                        flash->spi->dev.bus_id, __func__,
@@ -181,7 +181,7 @@ static int erase_block(struct m25p *flash)
        write_enable(flash);
 
        /* Set up command buffer. */
-       flash->command[0] = OPCODE_BE;
+       flash->command[0] = OPCODE_CHIP_ERASE;
 
        spi_write(flash->spi, flash->command, 1);
 
@@ -250,15 +250,18 @@ static int m25p80_erase(struct mtd_info *mtd, struct erase_info *instr)
 
        mutex_lock(&flash->lock);
 
-       /* REVISIT in some cases we could speed up erasing large regions
-        * by using OPCODE_SE instead of OPCODE_BE_4K
-        */
-
-       /* now erase those sectors */
-       if (len == flash->mtd.size && erase_block(flash)) {
+       /* whole-chip erase? */
+       if (len == flash->mtd.size && erase_chip(flash)) {
                instr->state = MTD_ERASE_FAILED;
                mutex_unlock(&flash->lock);
                return -EIO;
+
+       /* REVISIT in some cases we could speed up erasing large regions
+        * by using OPCODE_SE instead of OPCODE_BE_4K.  We may have set up
+        * to use "small sector erase", but that's not always optimal.
+        */
+
+       /* "sector"-at-a-time erase */
        } else {
                while (len) {
                        if (erase_sector(flash, addr)) {
@@ -574,10 +577,11 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi)
        for (tmp = 0, info = m25p_data;
                        tmp < ARRAY_SIZE(m25p_data);
                        tmp++, info++) {
-               if (info->jedec_id == jedec)
-                       if (ext_jedec != 0 && info->ext_id != ext_jedec)
+               if (info->jedec_id == jedec) {
+                       if (info->ext_id != 0 && info->ext_id != ext_jedec)
                                continue;
                        return info;
+               }
        }
        dev_err(&spi->dev, "unrecognized JEDEC id %06x\n", jedec);
        return NULL;
index e5059aa3c724b189613db3ab6a61255a91d2f3be..8d92d8db9a98c0a3c5625ce74fd27a4268070ba4 100644 (file)
 #include <linux/mtd/map.h>
 #include <linux/mtd/partitions.h>
 
-
+/* dynamic ioremap() areas */
+#define FLASH_START      0x00000000
+#define FLASH_SIZE       0x800000
+#define FLASH_WIDTH      4
+
+#define SRAM_START       0x60000000
+#define SRAM_SIZE        0xc000
+#define SRAM_WIDTH       4
+
+#define BOOTROM_START    0x70000000
+#define BOOTROM_SIZE     0x80
+#define BOOTROM_WIDTH    4
 
 
 static struct mtd_info *flash_mtd;
index 35fef655ccc4c8e5cbfe55eae84f6aead0456b32..3b959fad1c4ec082bfd7310f789e673de214ac47 100644 (file)
@@ -24,8 +24,8 @@ static struct mtd_info *mymtd;
 static struct map_info h720x_map = {
        .name =         "H720X",
        .bankwidth =    4,
-       .size =         FLASH_SIZE,
-       .phys =         FLASH_PHYS,
+       .size =         H720X_FLASH_SIZE,
+       .phys =         H720X_FLASH_PHYS,
 };
 
 static struct mtd_partition h720x_partitions[] = {
@@ -70,7 +70,7 @@ int __init h720x_mtd_init(void)
 
        char    *part_type = NULL;
 
-       h720x_map.virt = ioremap(FLASH_PHYS, FLASH_SIZE);
+       h720x_map.virt = ioremap(h720x_map.phys, h720x_map.size);
 
        if (!h720x_map.virt) {
                printk(KERN_ERR "H720x-MTD: ioremap failed\n");
index 42d844f8f6bfef79bdfef42ed48b33368ac4ecd0..dfbf3f270cea9441a7261b69ca3c9f8aa9c87770 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
 #include <linux/mtd/concat.h>
-#include <asm/io.h>
+#include <linux/io.h>
 
 #define MAX_RESOURCES          4
 
@@ -27,7 +27,6 @@ struct physmap_flash_info {
        struct mtd_info         *mtd[MAX_RESOURCES];
        struct mtd_info         *cmtd;
        struct map_info         map[MAX_RESOURCES];
-       struct resource         *res;
 #ifdef CONFIG_MTD_PARTITIONS
        int                     nr_parts;
        struct mtd_partition    *parts;
@@ -70,16 +69,7 @@ static int physmap_flash_remove(struct platform_device *dev)
 #endif
                        map_destroy(info->mtd[i]);
                }
-
-               if (info->map[i].virt != NULL)
-                       iounmap(info->map[i].virt);
-       }
-
-       if (info->res != NULL) {
-               release_resource(info->res);
-               kfree(info->res);
        }
-
        return 0;
 }
 
@@ -101,7 +91,8 @@ static int physmap_flash_probe(struct platform_device *dev)
        if (physmap_data == NULL)
                return -ENODEV;
 
-       info = kzalloc(sizeof(struct physmap_flash_info), GFP_KERNEL);
+       info = devm_kzalloc(&dev->dev, sizeof(struct physmap_flash_info),
+                           GFP_KERNEL);
        if (info == NULL) {
                err = -ENOMEM;
                goto err_out;
@@ -114,10 +105,10 @@ static int physmap_flash_probe(struct platform_device *dev)
                       (unsigned long long)(dev->resource[i].end - dev->resource[i].start + 1),
                       (unsigned long long)dev->resource[i].start);
 
-               info->res = request_mem_region(dev->resource[i].start,
-                                              dev->resource[i].end - dev->resource[i].start + 1,
-                                              dev->dev.bus_id);
-               if (info->res == NULL) {
+               if (!devm_request_mem_region(&dev->dev,
+                       dev->resource[i].start,
+                       dev->resource[i].end - dev->resource[i].start + 1,
+                       dev->dev.bus_id)) {
                        dev_err(&dev->dev, "Could not reserve memory region\n");
                        err = -ENOMEM;
                        goto err_out;
@@ -129,7 +120,8 @@ static int physmap_flash_probe(struct platform_device *dev)
                info->map[i].bankwidth = physmap_data->width;
                info->map[i].set_vpp = physmap_data->set_vpp;
 
-               info->map[i].virt = ioremap(info->map[i].phys, info->map[i].size);
+               info->map[i].virt = devm_ioremap(&dev->dev, info->map[i].phys,
+                                                info->map[i].size);
                if (info->map[i].virt == NULL) {
                        dev_err(&dev->dev, "Failed to ioremap flash region\n");
                        err = EIO;
index 024e3fffd4bb49b6176af4701c07e344120a3fc2..a83192f80eba5176b6bbad4649bd5996159b086a 100644 (file)
@@ -163,9 +163,11 @@ static int __devinit fun_chip_init(struct fsl_upm_nand *fun,
        ret = parse_mtd_partitions(&fun->mtd, part_types, &fun->parts, 0);
 
 #ifdef CONFIG_MTD_OF_PARTS
-       if (ret == 0)
-               ret = of_mtd_parse_partitions(fun->dev, &fun->mtd,
-                                             flash_np, &fun->parts);
+       if (ret == 0) {
+               ret = of_mtd_parse_partitions(fun->dev, flash_np, &fun->parts);
+               if (ret < 0)
+                       goto err;
+       }
 #endif
        if (ret > 0)
                ret = add_mtd_partitions(&fun->mtd, fun->parts, ret);
index 75c899039023051e9b0f8dda595d734ff9aebdc0..9bd6c9ac844396553cbbfcf026860ff4420bce25 100644 (file)
@@ -141,6 +141,7 @@ static int __devinit pasemi_nand_probe(struct of_device *ofdev,
        }
 
        lpcctl = pci_resource_start(pdev, 0);
+       pci_dev_put(pdev);
 
        if (!request_region(lpcctl, 4, driver_name)) {
                err = -EBUSY;
index c0fa9c9edf089c1a039ded475fb13740cfa52d1f..15f0a26730aea38e4c65708aac43473a8da02122 100644 (file)
@@ -269,6 +269,7 @@ static struct pxa3xx_nand_timing stm2GbX16_timing = {
 
 static struct pxa3xx_nand_flash stm2GbX16 = {
        .timing = &stm2GbX16_timing,
+       .cmdset = &largepage_cmdset,
        .page_per_block = 64,
        .page_size = 2048,
        .flash_width = 16,
index e39b21d3e168e5bb3cabf1a076193bca3f33bcab..a7e4d985f5ef553892a4fba5890647324f1c156c 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
+#include <linux/dma-mapping.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/mach/flash.h>
-#include <asm/arch/gpmc.h>
-#include <asm/arch/onenand.h>
-#include <asm/arch/gpio.h>
-#include <asm/arch/pm.h>
+#include <mach/gpmc.h>
+#include <mach/onenand.h>
+#include <mach/gpio.h>
+#include <mach/pm.h>
 
-#include <linux/dma-mapping.h>
-#include <asm/dma-mapping.h>
-#include <asm/arch/dma.h>
+#include <mach/dma.h>
 
-#include <asm/arch/board.h>
+#include <mach/board.h>
 
 #define DRIVER_NAME "omap2-onenand"
 
index e04bcf1dff87c1b2dfdd75ef2428a0bb76781ef7..d8966bae0e0b85ea2810dd094828ddedf1e7cf6a 100644 (file)
@@ -1022,7 +1022,7 @@ int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to,
        }
 
        /*
-        * OK, now the LEB is locked and we can safely start moving iy. Since
+        * OK, now the LEB is locked and we can safely start moving it. Since
         * this function utilizes thie @ubi->peb1_buf buffer which is shared
         * with some other functions, so lock the buffer by taking the
         * @ubi->buf_mutex.
index 4f2daa5bbecfbafe646da17a586cacd3328b5d07..41d47e1cf15c23f8c36423ae3caa4a0e2091e245 100644 (file)
@@ -320,7 +320,7 @@ static int compare_lebs(struct ubi_device *ubi, const struct ubi_scan_leb *seb,
        }
 
        err = ubi_io_read_data(ubi, buf, pnum, 0, len);
-       if (err && err != UBI_IO_BITFLIPS)
+       if (err && err != UBI_IO_BITFLIPS && err != -EBADMSG)
                goto out_free_buf;
 
        data_crc = be32_to_cpu(vid_hdr->data_crc);
index 05d70937b54322d8ecd878d05cc69e084ef4a5ed..dcb6dac1dc5446b4966d85ef8e6d8e1db5ed9dcb 100644 (file)
@@ -1396,7 +1396,8 @@ int ubi_thread(void *u)
                                ubi_msg("%s: %d consecutive failures",
                                        ubi->bgt_name, WL_MAX_FAILURES);
                                ubi_ro_mode(ubi);
-                               break;
+                               ubi->thread_enabled = 0;
+                               continue;
                        }
                } else
                        failures = 0;
index 11f143f4adf6d379682833679bb9ffa7cb99346c..231eeaf1d5522513e44941871d76b67b38b0f38b 100644 (file)
@@ -1825,9 +1825,10 @@ config FEC2
 
 config FEC_MPC52xx
        tristate "MPC52xx FEC driver"
-       depends on PPC_MPC52xx && PPC_BESTCOMM_FEC
+       depends on PPC_MPC52xx && PPC_BESTCOMM
        select CRC32
        select PHYLIB
+       select PPC_BESTCOMM_FEC
        ---help---
          This option enables support for the MPC5200's on-chip
          Fast Ethernet Controller
index f19acf8b9220bf2e152ecae6fdc9727ee8e5fc19..017383ad5ec6e6de671b71c0165d783b525386f2 100644 (file)
@@ -114,7 +114,7 @@ obj-$(CONFIG_EL2) += 3c503.o 8390p.o
 obj-$(CONFIG_NE2000) += ne.o 8390p.o
 obj-$(CONFIG_NE2_MCA) += ne2.o 8390p.o
 obj-$(CONFIG_HPLAN) += hp.o 8390p.o
-obj-$(CONFIG_HPLAN_PLUS) += hp-plus.o 8390.o
+obj-$(CONFIG_HPLAN_PLUS) += hp-plus.o 8390p.o
 obj-$(CONFIG_ULTRA) += smc-ultra.o 8390.o
 obj-$(CONFIG_ULTRAMCA) += smc-mca.o 8390.o
 obj-$(CONFIG_ULTRA32) += smc-ultra32.o 8390.o
index 8cbc1b59bd6287303c6fe179eb5af6084cad5de7..4a7700620119686c741b6ac454b4cfa1b346133e 100644 (file)
@@ -163,9 +163,6 @@ int atl1e_read_mac_addr(struct atl1e_hw *hw)
  * atl1e_hash_mc_addr
  *  purpose
  *      set hash value for a multicast address
- *      hash calcu processing :
- *          1. calcu 32bit CRC for multicast address
- *          2. reverse crc with MSB to LSB
  */
 u32 atl1e_hash_mc_addr(struct atl1e_hw *hw, u8 *mc_addr)
 {
@@ -174,7 +171,6 @@ u32 atl1e_hash_mc_addr(struct atl1e_hw *hw, u8 *mc_addr)
        int i;
 
        crc32 = ether_crc_le(6, mc_addr);
-       crc32 = ~crc32;
        for (i = 0; i < 32; i++)
                value |= (((crc32 >> i) & 1) << (31 - i));
 
index 246d92b426360b37865352d0d6133e71415770b4..aef403d299eef1a5b04a4218070c0e51594fa288 100644 (file)
@@ -3404,14 +3404,8 @@ static void atl1_get_wol(struct net_device *netdev,
 {
        struct atl1_adapter *adapter = netdev_priv(netdev);
 
-       wol->supported = WAKE_UCAST | WAKE_MCAST | WAKE_BCAST | WAKE_MAGIC;
+       wol->supported = WAKE_MAGIC;
        wol->wolopts = 0;
-       if (adapter->wol & ATLX_WUFC_EX)
-               wol->wolopts |= WAKE_UCAST;
-       if (adapter->wol & ATLX_WUFC_MC)
-               wol->wolopts |= WAKE_MCAST;
-       if (adapter->wol & ATLX_WUFC_BC)
-               wol->wolopts |= WAKE_BCAST;
        if (adapter->wol & ATLX_WUFC_MAG)
                wol->wolopts |= WAKE_MAGIC;
        return;
@@ -3422,15 +3416,10 @@ static int atl1_set_wol(struct net_device *netdev,
 {
        struct atl1_adapter *adapter = netdev_priv(netdev);
 
-       if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
+       if (wol->wolopts & (WAKE_PHY | WAKE_UCAST | WAKE_MCAST | WAKE_BCAST |
+               WAKE_ARP | WAKE_MAGICSECURE))
                return -EOPNOTSUPP;
        adapter->wol = 0;
-       if (wol->wolopts & WAKE_UCAST)
-               adapter->wol |= ATLX_WUFC_EX;
-       if (wol->wolopts & WAKE_MCAST)
-               adapter->wol |= ATLX_WUFC_MC;
-       if (wol->wolopts & WAKE_BCAST)
-               adapter->wol |= ATLX_WUFC_BC;
        if (wol->wolopts & WAKE_MAGIC)
                adapter->wol |= ATLX_WUFC_MAG;
        return 0;
index f5bdc92c1a658932cb2de2663e8aad88478c9da6..8571e8c0bc67b9973e16a8a85aa92b00049faed6 100644 (file)
@@ -1690,9 +1690,11 @@ static int atl2_resume(struct pci_dev *pdev)
 
        ATL2_WRITE_REG(&adapter->hw, REG_WOL_CTRL, 0);
 
-       err = atl2_request_irq(adapter);
-       if (netif_running(netdev) && err)
-               return err;
+       if (netif_running(netdev)) {
+               err = atl2_request_irq(adapter);
+               if (err)
+                       return err;
+       }
 
        atl2_reset_hw(&adapter->hw);
 
index 430d430bce29e8f3f6f03a37753579c140ff2e8e..9e8222f9e90ee0f69416ffe985103d0f6b183df5 100644 (file)
@@ -543,9 +543,9 @@ bnx2_free_rx_mem(struct bnx2 *bp)
                for (j = 0; j < bp->rx_max_pg_ring; j++) {
                        if (rxr->rx_pg_desc_ring[j])
                                pci_free_consistent(bp->pdev, RXBD_RING_SIZE,
-                                                   rxr->rx_pg_desc_ring[i],
-                                                   rxr->rx_pg_desc_mapping[i]);
-                       rxr->rx_pg_desc_ring[i] = NULL;
+                                                   rxr->rx_pg_desc_ring[j],
+                                                   rxr->rx_pg_desc_mapping[j]);
+                       rxr->rx_pg_desc_ring[j] = NULL;
                }
                if (rxr->rx_pg_ring)
                        vfree(rxr->rx_pg_ring);
@@ -3144,6 +3144,28 @@ bnx2_has_work(struct bnx2_napi *bnapi)
        return 0;
 }
 
+static void
+bnx2_chk_missed_msi(struct bnx2 *bp)
+{
+       struct bnx2_napi *bnapi = &bp->bnx2_napi[0];
+       u32 msi_ctrl;
+
+       if (bnx2_has_work(bnapi)) {
+               msi_ctrl = REG_RD(bp, BNX2_PCICFG_MSI_CONTROL);
+               if (!(msi_ctrl & BNX2_PCICFG_MSI_CONTROL_ENABLE))
+                       return;
+
+               if (bnapi->last_status_idx == bp->idle_chk_status_idx) {
+                       REG_WR(bp, BNX2_PCICFG_MSI_CONTROL, msi_ctrl &
+                              ~BNX2_PCICFG_MSI_CONTROL_ENABLE);
+                       REG_WR(bp, BNX2_PCICFG_MSI_CONTROL, msi_ctrl);
+                       bnx2_msi(bp->irq_tbl[0].vector, bnapi);
+               }
+       }
+
+       bp->idle_chk_status_idx = bnapi->last_status_idx;
+}
+
 static void bnx2_poll_link(struct bnx2 *bp, struct bnx2_napi *bnapi)
 {
        struct status_block *sblk = bnapi->status_blk.msi;
@@ -3218,14 +3240,15 @@ static int bnx2_poll(struct napi_struct *napi, int budget)
 
                work_done = bnx2_poll_work(bp, bnapi, work_done, budget);
 
-               if (unlikely(work_done >= budget))
-                       break;
-
                /* bnapi->last_status_idx is used below to tell the hw how
                 * much work has been processed, so we must read it before
                 * checking for more work.
                 */
                bnapi->last_status_idx = sblk->status_idx;
+
+               if (unlikely(work_done >= budget))
+                       break;
+
                rmb();
                if (likely(!bnx2_has_work(bnapi))) {
                        netif_rx_complete(bp->dev, napi);
@@ -4570,6 +4593,8 @@ bnx2_init_chip(struct bnx2 *bp)
        for (i = 0; i < BNX2_MAX_MSIX_VEC; i++)
                bp->bnx2_napi[i].last_status_idx = 0;
 
+       bp->idle_chk_status_idx = 0xffff;
+
        bp->rx_mode = BNX2_EMAC_RX_MODE_SORT_MODE;
 
        /* Set up how to generate a link change interrupt. */
@@ -5718,6 +5743,10 @@ bnx2_timer(unsigned long data)
        if (atomic_read(&bp->intr_sem) != 0)
                goto bnx2_restart_timer;
 
+       if ((bp->flags & (BNX2_FLAG_USING_MSI | BNX2_FLAG_ONE_SHOT_MSI)) ==
+            BNX2_FLAG_USING_MSI)
+               bnx2_chk_missed_msi(bp);
+
        bnx2_send_heart_beat(bp);
 
        bp->stats_blk->stat_FwRxDrop =
@@ -7204,10 +7233,13 @@ static void
 poll_bnx2(struct net_device *dev)
 {
        struct bnx2 *bp = netdev_priv(dev);
+       int i;
 
-       disable_irq(bp->pdev->irq);
-       bnx2_interrupt(bp->pdev->irq, dev);
-       enable_irq(bp->pdev->irq);
+       for (i = 0; i < bp->irq_nvecs; i++) {
+               disable_irq(bp->irq_tbl[i].vector);
+               bnx2_interrupt(bp->irq_tbl[i].vector, &bp->bnx2_napi[i]);
+               enable_irq(bp->irq_tbl[i].vector);
+       }
 }
 #endif
 
index 617d953401607e884873cf41a32fdf6dd73c1024..0b032c3c7b611c17cee29b12a62809839a1dae2b 100644 (file)
@@ -378,6 +378,9 @@ struct l2_fhdr {
  *  pci_config_l definition
  *  offset: 0000
  */
+#define BNX2_PCICFG_MSI_CONTROL                                0x00000058
+#define BNX2_PCICFG_MSI_CONTROL_ENABLE                  (1L<<16)
+
 #define BNX2_PCICFG_MISC_CONFIG                                0x00000068
 #define BNX2_PCICFG_MISC_CONFIG_TARGET_BYTE_SWAP        (1L<<2)
 #define BNX2_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP     (1L<<3)
@@ -6863,6 +6866,9 @@ struct bnx2 {
 
        u8                      num_tx_rings;
        u8                      num_rx_rings;
+
+       u32                     idle_chk_status_idx;
+
 };
 
 #define REG_RD(bp, offset)                                     \
index d6c7d2aa761b503da15a96126ee1f2f3895e4f0a..7092df50ff784007f34f72b74aac85d6a437a42e 100644 (file)
@@ -1035,10 +1035,6 @@ MODULE_PARM_DESC(copybreak, "Receive copy threshold");
  *     @pdev: the PCI device that received the packet
  *     @fl: the SGE free list holding the packet
  *     @len: the actual packet length, excluding any SGE padding
- *     @dma_pad: padding at beginning of buffer left by SGE DMA
- *     @skb_pad: padding to be used if the packet is copied
- *     @copy_thres: length threshold under which a packet should be copied
- *     @drop_thres: # of remaining buffers before we start dropping packets
  *
  *     Get the next packet from a free list and complete setup of the
  *     sk_buff.  If the packet is small we make a copy and recycle the
index 1ace41a13ac360363b2857475920a014daad4e94..2c341f83d3270e8d32a42d24e1a472fffd945599 100644 (file)
@@ -1307,8 +1307,10 @@ static void get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
        u32 fw_vers = 0;
        u32 tp_vers = 0;
 
+       spin_lock(&adapter->stats_lock);
        t3_get_fw_version(adapter, &fw_vers);
        t3_get_tp_version(adapter, &tp_vers);
+       spin_unlock(&adapter->stats_lock);
 
        strcpy(info->driver, DRV_NAME);
        strcpy(info->version, DRV_VERSION);
@@ -2699,7 +2701,7 @@ static void set_nqsets(struct adapter *adap)
        int hwports = adap->params.nports;
        int nqsets = SGE_QSETS;
 
-       if (adap->params.rev > 0) {
+       if (adap->params.rev > 0 && adap->flags & USING_MSIX) {
                if (hwports == 2 &&
                    (hwports * nqsets > SGE_QSETS ||
                     num_cpus >= nqsets / hwports))
index 968f64be3743acb165dbe40013e5d2a4dd60ee42..9a0898b0dbcef2e8d214046c3ac9137de1ccfb23 100644 (file)
@@ -572,7 +572,7 @@ struct t3_vpd {
        u32 pad;                /* for multiple-of-4 sizing and alignment */
 };
 
-#define EEPROM_MAX_POLL   4
+#define EEPROM_MAX_POLL   40
 #define EEPROM_STAT_ADDR  0x4000
 #define VPD_BASE          0xc00
 
@@ -3690,6 +3690,12 @@ int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai,
                        ;
 
                pti = &port_types[adapter->params.vpd.port_type[j]];
+               if (!pti->phy_prep) {
+                       CH_ALERT(adapter, "Invalid port type index %d\n",
+                                adapter->params.vpd.port_type[j]);
+                       return -EINVAL;
+               }
+
                ret = pti->phy_prep(&p->phy, adapter, ai->phy_base_addr + j,
                                    ai->mdio_ops);
                if (ret)
index 3d69fae781cf5461949b4d9fccf1e9ce7244249d..e8bfcce6b319da95be67ecc44e211b7f8ed7ac38 100644 (file)
 
 #define DRV_NAME               "e100"
 #define DRV_EXT                        "-NAPI"
-#define DRV_VERSION            "3.5.23-k4"DRV_EXT
+#define DRV_VERSION            "3.5.23-k6"DRV_EXT
 #define DRV_DESCRIPTION                "Intel(R) PRO/100 Network Driver"
 #define DRV_COPYRIGHT          "Copyright(c) 1999-2006 Intel Corporation"
 #define PFX                    DRV_NAME ": "
@@ -1804,7 +1804,7 @@ static int e100_rx_alloc_skb(struct nic *nic, struct rx *rx)
                struct rfd *prev_rfd = (struct rfd *)rx->prev->skb->data;
                put_unaligned_le32(rx->dma_addr, &prev_rfd->link);
                pci_dma_sync_single_for_device(nic->pdev, rx->prev->dma_addr,
-                       sizeof(struct rfd), PCI_DMA_TODEVICE);
+                       sizeof(struct rfd), PCI_DMA_BIDIRECTIONAL);
        }
 
        return 0;
@@ -1823,7 +1823,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
 
        /* Need to sync before taking a peek at cb_complete bit */
        pci_dma_sync_single_for_cpu(nic->pdev, rx->dma_addr,
-               sizeof(struct rfd), PCI_DMA_FROMDEVICE);
+               sizeof(struct rfd), PCI_DMA_BIDIRECTIONAL);
        rfd_status = le16_to_cpu(rfd->status);
 
        DPRINTK(RX_STATUS, DEBUG, "status=0x%04X\n", rfd_status);
@@ -1850,7 +1850,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
 
        /* Get data */
        pci_unmap_single(nic->pdev, rx->dma_addr,
-               RFD_BUF_LEN, PCI_DMA_FROMDEVICE);
+               RFD_BUF_LEN, PCI_DMA_BIDIRECTIONAL);
 
        /* If this buffer has the el bit, but we think the receiver
         * is still running, check to see if it really stopped while
@@ -1943,7 +1943,7 @@ static void e100_rx_clean(struct nic *nic, unsigned int *work_done,
                new_before_last_rfd->command |= cpu_to_le16(cb_el);
                pci_dma_sync_single_for_device(nic->pdev,
                        new_before_last_rx->dma_addr, sizeof(struct rfd),
-                       PCI_DMA_TODEVICE);
+                       PCI_DMA_BIDIRECTIONAL);
 
                /* Now that we have a new stopping point, we can clear the old
                 * stopping point.  We must sync twice to get the proper
@@ -1951,11 +1951,11 @@ static void e100_rx_clean(struct nic *nic, unsigned int *work_done,
                old_before_last_rfd->command &= ~cpu_to_le16(cb_el);
                pci_dma_sync_single_for_device(nic->pdev,
                        old_before_last_rx->dma_addr, sizeof(struct rfd),
-                       PCI_DMA_TODEVICE);
+                       PCI_DMA_BIDIRECTIONAL);
                old_before_last_rfd->size = cpu_to_le16(VLAN_ETH_FRAME_LEN);
                pci_dma_sync_single_for_device(nic->pdev,
                        old_before_last_rx->dma_addr, sizeof(struct rfd),
-                       PCI_DMA_TODEVICE);
+                       PCI_DMA_BIDIRECTIONAL);
        }
 
        if(restart_required) {
@@ -1978,7 +1978,7 @@ static void e100_rx_clean_list(struct nic *nic)
                for(rx = nic->rxs, i = 0; i < count; rx++, i++) {
                        if(rx->skb) {
                                pci_unmap_single(nic->pdev, rx->dma_addr,
-                                       RFD_BUF_LEN, PCI_DMA_FROMDEVICE);
+                                       RFD_BUF_LEN, PCI_DMA_BIDIRECTIONAL);
                                dev_kfree_skb(rx->skb);
                        }
                }
@@ -2021,7 +2021,7 @@ static int e100_rx_alloc_list(struct nic *nic)
        before_last->command |= cpu_to_le16(cb_el);
        before_last->size = 0;
        pci_dma_sync_single_for_device(nic->pdev, rx->dma_addr,
-               sizeof(struct rfd), PCI_DMA_TODEVICE);
+               sizeof(struct rfd), PCI_DMA_BIDIRECTIONAL);
 
        nic->rx_to_use = nic->rx_to_clean = nic->rxs;
        nic->ru_running = RU_SUSPENDED;
@@ -2222,7 +2222,7 @@ static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode)
        msleep(10);
 
        pci_dma_sync_single_for_cpu(nic->pdev, nic->rx_to_clean->dma_addr,
-                       RFD_BUF_LEN, PCI_DMA_FROMDEVICE);
+                       RFD_BUF_LEN, PCI_DMA_BIDIRECTIONAL);
 
        if(memcmp(nic->rx_to_clean->skb->data + sizeof(struct rfd),
           skb->data, ETH_DATA_LEN))
index 6a3893acfe04e3f963b231a373446fe8d8615863..c854c96f5ab326af0ca3bf0093c1ad464169ab5a 100644 (file)
@@ -1774,7 +1774,8 @@ static void e1000_get_wol(struct net_device *netdev,
 
        /* this function will set ->supported = 0 and return 1 if wol is not
         * supported by this hardware */
-       if (e1000_wol_exclusion(adapter, wol))
+       if (e1000_wol_exclusion(adapter, wol) ||
+           !device_can_wakeup(&adapter->pdev->dev))
                return;
 
        /* apply any specific unsupported masks here */
@@ -1811,7 +1812,8 @@ static int e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
        if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
                return -EOPNOTSUPP;
 
-       if (e1000_wol_exclusion(adapter, wol))
+       if (e1000_wol_exclusion(adapter, wol) ||
+           !device_can_wakeup(&adapter->pdev->dev))
                return wol->wolopts ? -EOPNOTSUPP : 0;
 
        switch (hw->device_id) {
@@ -1838,6 +1840,8 @@ static int e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
        if (wol->wolopts & WAKE_MAGIC)
                adapter->wol |= E1000_WUFC_MAG;
 
+       device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
+
        return 0;
 }
 
index fac82152e4c8795287fc5c2b7dc10481cc994093..872799b746f501a3af4264c13b4674dbb8802382 100644 (file)
@@ -1179,6 +1179,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
 
        /* initialize the wol settings based on the eeprom settings */
        adapter->wol = adapter->eeprom_wol;
+       device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
 
        /* print bus type/speed/width info */
        DPRINTK(PROBE, INFO, "(PCI%s:%s:%s) ",
index c55de1c027af9578687a553195bfb911c65a72f9..c55fd6fdb91c16bcf0fba6049b1ef0d6ea3064ff 100644 (file)
@@ -299,6 +299,7 @@ struct e1000_adapter {
        unsigned long led_status;
 
        unsigned int flags;
+       unsigned int flags2;
        struct work_struct downshift_task;
        struct work_struct update_phy_task;
 };
@@ -306,6 +307,7 @@ struct e1000_adapter {
 struct e1000_info {
        enum e1000_mac_type     mac;
        unsigned int            flags;
+       unsigned int            flags2;
        u32                     pba;
        s32                     (*get_variants)(struct e1000_adapter *);
        struct e1000_mac_operations *mac_ops;
@@ -347,6 +349,9 @@ struct e1000_info {
 #define FLAG_RX_RESTART_NOW               (1 << 30)
 #define FLAG_MSI_TEST_FAILED              (1 << 31)
 
+/* CRC Stripping defines */
+#define FLAG2_CRC_STRIPPING               (1 << 0)
+
 #define E1000_RX_DESC_PS(R, i)     \
        (&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
 #define E1000_GET_DESC(R, i, type)     (&(((struct type *)((R).desc))[i]))
index 70c11c811a08e3534671ac6554e50767b1ae63be..62421ce9631191f3acfdc82d48030ded4655d551 100644 (file)
@@ -1713,7 +1713,8 @@ static void e1000_get_wol(struct net_device *netdev,
        wol->supported = 0;
        wol->wolopts = 0;
 
-       if (!(adapter->flags & FLAG_HAS_WOL))
+       if (!(adapter->flags & FLAG_HAS_WOL) ||
+           !device_can_wakeup(&adapter->pdev->dev))
                return;
 
        wol->supported = WAKE_UCAST | WAKE_MCAST |
@@ -1751,7 +1752,8 @@ static int e1000_set_wol(struct net_device *netdev,
        if (wol->wolopts & WAKE_MAGICSECURE)
                return -EOPNOTSUPP;
 
-       if (!(adapter->flags & FLAG_HAS_WOL))
+       if (!(adapter->flags & FLAG_HAS_WOL) ||
+           !device_can_wakeup(&adapter->pdev->dev))
                return wol->wolopts ? -EOPNOTSUPP : 0;
 
        /* these settings will always override what we currently have */
@@ -1770,6 +1772,8 @@ static int e1000_set_wol(struct net_device *netdev,
        if (wol->wolopts & WAKE_ARP)
                adapter->wol |= E1000_WUFC_ARP;
 
+       device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
+
        return 0;
 }
 
index 523b9716a543aec21d923b58a07cd5162b3edab3..d115a6d30f29c0b3acb81c8038c6215993980e8d 100644 (file)
@@ -1893,12 +1893,17 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw)
                ctrl |= E1000_CTRL_PHY_RST;
        }
        ret_val = e1000_acquire_swflag_ich8lan(hw);
+       /* Whether or not the swflag was acquired, we need to reset the part */
        hw_dbg(hw, "Issuing a global reset to ich8lan");
        ew32(CTRL, (ctrl | E1000_CTRL_RST));
        msleep(20);
 
-       /* release the swflag because it is not reset by hardware reset */
-       e1000_release_swflag_ich8lan(hw);
+       if (!ret_val) {
+               /* release the swflag because it is not reset by
+                * hardware reset
+                */
+               e1000_release_swflag_ich8lan(hw);
+       }
 
        ret_val = e1000e_get_auto_rd_done(hw);
        if (ret_val) {
index abd492b7336d30c0690e2c1d8247719dd8e5eacd..122539a0e1feb112f2e4f575f347d78349bb8536 100644 (file)
@@ -345,7 +345,6 @@ no_buffers:
 /**
  * e1000_alloc_jumbo_rx_buffers - Replace used jumbo receive buffers
  * @adapter: address of board private structure
- * @rx_ring: pointer to receive ring structure
  * @cleaned_count: number of buffers to allocate this pass
  **/
 
@@ -499,6 +498,10 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter,
                        goto next_desc;
                }
 
+               /* adjust length to remove Ethernet CRC */
+               if (!(adapter->flags2 & FLAG2_CRC_STRIPPING))
+                       length -= 4;
+
                total_rx_bytes += length;
                total_rx_packets++;
 
@@ -804,6 +807,10 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
                        pci_dma_sync_single_for_device(pdev, ps_page->dma,
                                PAGE_SIZE, PCI_DMA_FROMDEVICE);
 
+                       /* remove the CRC */
+                       if (!(adapter->flags2 & FLAG2_CRC_STRIPPING))
+                               l1 -= 4;
+
                        skb_put(skb, l1);
                        goto copydone;
                } /* if */
@@ -825,6 +832,12 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
                        skb->truesize += length;
                }
 
+               /* strip the ethernet crc, problem is we're using pages now so
+                * this whole operation can get a little cpu intensive
+                */
+               if (!(adapter->flags2 & FLAG2_CRC_STRIPPING))
+                       pskb_trim(skb, skb->len - 4);
+
 copydone:
                total_rx_bytes += skb->len;
                total_rx_packets++;
@@ -2301,8 +2314,12 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter)
        else
                rctl |= E1000_RCTL_LPE;
 
-       /* Enable hardware CRC frame stripping */
-       rctl |= E1000_RCTL_SECRC;
+       /* Some systems expect that the CRC is included in SMBUS traffic. The
+        * hardware strips the CRC before sending to both SMBUS (BMC) and to
+        * host memory when this is enabled
+        */
+       if (adapter->flags2 & FLAG2_CRC_STRIPPING)
+               rctl |= E1000_RCTL_SECRC;
 
        /* Setup buffer sizes */
        rctl &= ~E1000_RCTL_SZ_4096;
@@ -4766,6 +4783,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
        adapter->ei = ei;
        adapter->pba = ei->pba;
        adapter->flags = ei->flags;
+       adapter->flags2 = ei->flags2;
        adapter->hw.adapter = adapter;
        adapter->hw.mac.type = ei->mac;
        adapter->msg_enable = (1 << NETIF_MSG_DRV | NETIF_MSG_PROBE) - 1;
@@ -4970,6 +4988,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
 
        /* initialize the wol settings based on the eeprom settings */
        adapter->wol = adapter->eeprom_wol;
+       device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
 
        /* reset the hardware with the new settings */
        e1000e_reset(adapter);
@@ -5008,6 +5027,7 @@ err_hw_init:
 err_sw_init:
        if (adapter->hw.flash_address)
                iounmap(adapter->hw.flash_address);
+       e1000e_reset_interrupt_capability(adapter);
 err_flashmap:
        iounmap(adapter->hw.hw_addr);
 err_ioremap:
index 77a3d7207a5f834db470731502e1197c973c5102..e909f96698e8cfb023105a765b00becd6d7e0ae6 100644 (file)
@@ -151,6 +151,16 @@ E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround");
  */
 E1000_PARAM(WriteProtectNVM, "Write-protect NVM [WARNING: disabling this can lead to corrupted NVM]");
 
+/*
+ * Enable CRC Stripping
+ *
+ * Valid Range: 0, 1
+ *
+ * Default Value: 1 (enabled)
+ */
+E1000_PARAM(CrcStripping, "Enable CRC Stripping, disable if your BMC needs " \
+                          "the CRC");
+
 struct e1000_option {
        enum { enable_option, range_option, list_option } type;
        const char *name;
@@ -404,6 +414,21 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
                                adapter->flags |= FLAG_SMART_POWER_DOWN;
                }
        }
+       { /* CRC Stripping */
+               const struct e1000_option opt = {
+                       .type = enable_option,
+                       .name = "CRC Stripping",
+                       .err  = "defaulting to enabled",
+                       .def  = OPTION_ENABLED
+               };
+
+               if (num_CrcStripping > bd) {
+                       unsigned int crc_stripping = CrcStripping[bd];
+                       e1000_validate_option(&crc_stripping, &opt, adapter);
+                       if (crc_stripping == OPTION_ENABLED)
+                               adapter->flags2 |= FLAG2_CRC_STRIPPING;
+               }
+       }
        { /* Kumeran Lock Loss Workaround */
                const struct e1000_option opt = {
                        .type = enable_option,
index e1b441effbbec15b81de2fe4b2d36992ac993724..36cb6e95b465c2545b822d30c14a675b6bd39e07 100644 (file)
@@ -568,6 +568,17 @@ static u16 erxrdpt_workaround(u16 next_packet_ptr, u16 start, u16 end)
        return erxrdpt;
 }
 
+/*
+ * Calculate wrap around when reading beyond the end of the RX buffer
+ */
+static u16 rx_packet_start(u16 ptr)
+{
+       if (ptr + RSV_SIZE > RXEND_INIT)
+               return (ptr + RSV_SIZE) - (RXEND_INIT - RXSTART_INIT + 1);
+       else
+               return ptr + RSV_SIZE;
+}
+
 static void nolock_rxfifo_init(struct enc28j60_net *priv, u16 start, u16 end)
 {
        u16 erxrdpt;
@@ -938,8 +949,9 @@ static void enc28j60_hw_rx(struct net_device *ndev)
                        skb->dev = ndev;
                        skb_reserve(skb, NET_IP_ALIGN);
                        /* copy the packet from the receive buffer */
-                       enc28j60_mem_read(priv, priv->next_pk_ptr + sizeof(rsv),
-                                       len, skb_put(skb, len));
+                       enc28j60_mem_read(priv,
+                               rx_packet_start(priv->next_pk_ptr),
+                               len, skb_put(skb, len));
                        if (netif_msg_pktdata(priv))
                                dump_packet(__func__, skb->len, skb->data);
                        skb->protocol = eth_type_trans(skb, ndev);
@@ -947,7 +959,7 @@ static void enc28j60_hw_rx(struct net_device *ndev)
                        ndev->stats.rx_packets++;
                        ndev->stats.rx_bytes += len;
                        ndev->last_rx = jiffies;
-                       netif_rx(skb);
+                       netif_rx_ni(skb);
                }
        }
        /*
index 83a5cb6aa23b1fc5c4426a9863303be6bb10dad3..c4af949bf860d81ffd69ce6ff6eceb9cf0c8a69a 100644 (file)
@@ -1407,6 +1407,10 @@ static int gfar_clean_tx_ring(struct net_device *dev)
                if (bdp->status & TXBD_DEF)
                        dev->stats.collisions++;
 
+               /* Unmap the DMA memory */
+               dma_unmap_single(&priv->dev->dev, bdp->bufPtr,
+                               bdp->length, DMA_TO_DEVICE);
+
                /* Free the sk buffer associated with this TxBD */
                dev_kfree_skb_irq(priv->tx_skbuff[priv->skb_dirtytx]);
 
@@ -1666,6 +1670,9 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit)
 
                skb = priv->rx_skbuff[priv->skb_currx];
 
+               dma_unmap_single(&priv->dev->dev, bdp->bufPtr,
+                               priv->rx_buffer_size, DMA_FROM_DEVICE);
+
                /* We drop the frame if we failed to allocate a new buffer */
                if (unlikely(!newskb || !(bdp->status & RXBD_LAST) ||
                                 bdp->status & RXBD_ERR)) {
@@ -1674,14 +1681,8 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit)
                        if (unlikely(!newskb))
                                newskb = skb;
 
-                       if (skb) {
-                               dma_unmap_single(&priv->dev->dev,
-                                               bdp->bufPtr,
-                                               priv->rx_buffer_size,
-                                               DMA_FROM_DEVICE);
-
+                       if (skb)
                                dev_kfree_skb_any(skb);
-                       }
                } else {
                        /* Increment the number of packets */
                        dev->stats.rx_packets++;
index fbbd3e660c2731800bf6b7e136a62980bc51032f..c01e290d09d28b7e9c1fb240a26a9ba6f92e0900 100644 (file)
@@ -230,7 +230,7 @@ static int __init hpp_probe1(struct net_device *dev, int ioaddr)
        dev->open = &hpp_open;
        dev->stop = &hpp_close;
 #ifdef CONFIG_NET_POLL_CONTROLLER
-       dev->poll_controller = ei_poll;
+       dev->poll_controller = eip_poll;
 #endif
 
        ei_status.name = name;
index 58906c984be9f641e8e87c1acac40a098387a022..89964fa739a031bb2a778298a96a11e1a30e8ad3 100644 (file)
@@ -1776,7 +1776,8 @@ static void igb_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
 
        /* this function will set ->supported = 0 and return 1 if wol is not
         * supported by this hardware */
-       if (igb_wol_exclusion(adapter, wol))
+       if (igb_wol_exclusion(adapter, wol) ||
+           !device_can_wakeup(&adapter->pdev->dev))
                return;
 
        /* apply any specific unsupported masks here */
@@ -1805,7 +1806,8 @@ static int igb_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
        if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
                return -EOPNOTSUPP;
 
-       if (igb_wol_exclusion(adapter, wol))
+       if (igb_wol_exclusion(adapter, wol) ||
+           !device_can_wakeup(&adapter->pdev->dev))
                return wol->wolopts ? -EOPNOTSUPP : 0;
 
        switch (hw->device_id) {
@@ -1825,6 +1827,8 @@ static int igb_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
        if (wol->wolopts & WAKE_MAGIC)
                adapter->wol |= E1000_WUFC_MAG;
 
+       device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
+
        return 0;
 }
 
index 1f397cd99414dd51293b5d5dadfec1905c52fa19..20d27e622ec10c1fabefdc24e85a67cb443d27a4 100644 (file)
@@ -1019,10 +1019,9 @@ static int __devinit igb_probe(struct pci_dev *pdev,
                        state &= ~PCIE_LINK_STATE_L0S;
                        pci_write_config_word(us_dev, pos + PCI_EXP_LNKCTL,
                                              state);
-                       printk(KERN_INFO "Disabling ASPM L0s upstream switch "
-                              "port %x:%x.%x\n", us_dev->bus->number,
-                              PCI_SLOT(us_dev->devfn),
-                              PCI_FUNC(us_dev->devfn));
+                       dev_info(&pdev->dev,
+                                "Disabling ASPM L0s upstream switch port %s\n",
+                                pci_name(us_dev));
                }
        default:
                break;
@@ -1244,6 +1243,7 @@ static int __devinit igb_probe(struct pci_dev *pdev,
 
        /* initialize the wol settings based on the eeprom settings */
        adapter->wol = adapter->eeprom_wol;
+       device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
 
        /* reset the hardware with the new settings */
        igb_reset(adapter);
@@ -1980,7 +1980,6 @@ static void igb_configure_rx(struct igb_adapter *adapter)
 
 /**
  * igb_free_tx_resources - Free Tx Resources per Queue
- * @adapter: board private structure
  * @tx_ring: Tx descriptor ring for a specific queue
  *
  * Free all transmit software resources
@@ -2033,7 +2032,6 @@ static void igb_unmap_and_free_tx_resource(struct igb_adapter *adapter,
 
 /**
  * igb_clean_tx_ring - Free Tx Buffers
- * @adapter: board private structure
  * @tx_ring: ring to be cleaned
  **/
 static void igb_clean_tx_ring(struct igb_ring *tx_ring)
@@ -2080,7 +2078,6 @@ static void igb_clean_all_tx_rings(struct igb_adapter *adapter)
 
 /**
  * igb_free_rx_resources - Free Rx Resources
- * @adapter: board private structure
  * @rx_ring: ring to clean the resources from
  *
  * Free all receive software resources
@@ -2120,7 +2117,6 @@ static void igb_free_all_rx_resources(struct igb_adapter *adapter)
 
 /**
  * igb_clean_rx_ring - Free Rx Buffers per Queue
- * @adapter: board private structure
  * @rx_ring: ring to free buffers from
  **/
 static void igb_clean_rx_ring(struct igb_ring *rx_ring)
index 7373dafbb3f7d3f9d06ed71a785b840a5e236c87..059369885be1c71c96ea1cbf5807659c7fdba793 100644 (file)
@@ -1112,7 +1112,7 @@ static void ipg_nic_rx_free_skb(struct net_device *dev)
                struct ipg_rx *rxfd = sp->rxd + entry;
 
                pci_unmap_single(sp->pdev,
-                       le64_to_cpu(rxfd->frag_info & ~IPG_RFI_FRAGLEN),
+                       le64_to_cpu(rxfd->frag_info) & ~IPG_RFI_FRAGLEN,
                        sp->rx_buf_sz, PCI_DMA_FROMDEVICE);
                dev_kfree_skb_irq(sp->rx_buff[entry]);
                sp->rx_buff[entry] = NULL;
@@ -1179,7 +1179,7 @@ static int ipg_nic_rx_check_error(struct net_device *dev)
                 */
                if (sp->rx_buff[entry]) {
                        pci_unmap_single(sp->pdev,
-                               le64_to_cpu(rxfd->frag_info & ~IPG_RFI_FRAGLEN),
+                               le64_to_cpu(rxfd->frag_info) & ~IPG_RFI_FRAGLEN,
                                sp->rx_buf_sz, PCI_DMA_FROMDEVICE);
 
                        dev_kfree_skb_irq(sp->rx_buff[entry]);
@@ -1246,7 +1246,7 @@ static void ipg_nic_rx_with_start(struct net_device *dev,
        if (jumbo->found_start)
                dev_kfree_skb_irq(jumbo->skb);
 
-       pci_unmap_single(pdev, le64_to_cpu(rxfd->frag_info & ~IPG_RFI_FRAGLEN),
+       pci_unmap_single(pdev, le64_to_cpu(rxfd->frag_info) & ~IPG_RFI_FRAGLEN,
                         sp->rx_buf_sz, PCI_DMA_FROMDEVICE);
 
        skb_put(skb, sp->rxfrag_size);
@@ -1349,7 +1349,7 @@ static int ipg_nic_rx_jumbo(struct net_device *dev)
                unsigned int entry = curr % IPG_RFDLIST_LENGTH;
                struct ipg_rx *rxfd = sp->rxd + entry;
 
-               if (!(rxfd->rfs & le64_to_cpu(IPG_RFS_RFDDONE)))
+               if (!(rxfd->rfs & cpu_to_le64(IPG_RFS_RFDDONE)))
                        break;
 
                switch (ipg_nic_rx_check_frame_type(dev)) {
index 7548fb7360d9a611827bd602262223d687dc3702..5236f633ee36e3361af138cf3e2c2ae3033e1b53 100644 (file)
@@ -1287,13 +1287,39 @@ static void ixgbe_set_itr(struct ixgbe_adapter *adapter)
        return;
 }
 
-static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter);
+/**
+ * ixgbe_irq_disable - Mask off interrupt generation on the NIC
+ * @adapter: board private structure
+ **/
+static inline void ixgbe_irq_disable(struct ixgbe_adapter *adapter)
+{
+       IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, ~0);
+       IXGBE_WRITE_FLUSH(&adapter->hw);
+       if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
+               int i;
+               for (i = 0; i < adapter->num_msix_vectors; i++)
+                       synchronize_irq(adapter->msix_entries[i].vector);
+       } else {
+               synchronize_irq(adapter->pdev->irq);
+       }
+}
+
+/**
+ * ixgbe_irq_enable - Enable default interrupt generation settings
+ * @adapter: board private structure
+ **/
+static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter)
+{
+       u32 mask;
+       mask = IXGBE_EIMS_ENABLE_MASK;
+       IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask);
+       IXGBE_WRITE_FLUSH(&adapter->hw);
+}
 
 /**
  * ixgbe_intr - legacy mode Interrupt Handler
  * @irq: interrupt number
  * @data: pointer to a network interface device structure
- * @pt_regs: CPU registers structure
  **/
 static irqreturn_t ixgbe_intr(int irq, void *data)
 {
@@ -1393,35 +1419,6 @@ static void ixgbe_free_irq(struct ixgbe_adapter *adapter)
        }
 }
 
-/**
- * ixgbe_irq_disable - Mask off interrupt generation on the NIC
- * @adapter: board private structure
- **/
-static inline void ixgbe_irq_disable(struct ixgbe_adapter *adapter)
-{
-       IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, ~0);
-       IXGBE_WRITE_FLUSH(&adapter->hw);
-       if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
-               int i;
-               for (i = 0; i < adapter->num_msix_vectors; i++)
-                       synchronize_irq(adapter->msix_entries[i].vector);
-       } else {
-               synchronize_irq(adapter->pdev->irq);
-       }
-}
-
-/**
- * ixgbe_irq_enable - Enable default interrupt generation settings
- * @adapter: board private structure
- **/
-static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter)
-{
-       u32 mask;
-       mask = IXGBE_EIMS_ENABLE_MASK;
-       IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask);
-       IXGBE_WRITE_FLUSH(&adapter->hw);
-}
-
 /**
  * ixgbe_configure_msi_and_legacy - Initialize PIN (INTA...) and MSI interrupts
  *
@@ -2332,7 +2329,7 @@ static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter,
  * Once we know the feature-set enabled for the device, we'll cache
  * the register offset the descriptor ring is assigned to.
  **/
-static void __devinit ixgbe_cache_ring_register(struct ixgbe_adapter *adapter)
+static void ixgbe_cache_ring_register(struct ixgbe_adapter *adapter)
 {
        int feature_mask = 0, rss_i;
        int i, txr_idx, rxr_idx;
@@ -2369,7 +2366,7 @@ static void __devinit ixgbe_cache_ring_register(struct ixgbe_adapter *adapter)
  * number of queues at compile-time.  The polling_netdev array is
  * intended for Multiqueue, but should work fine with a single queue.
  **/
-static int __devinit ixgbe_alloc_queues(struct ixgbe_adapter *adapter)
+static int ixgbe_alloc_queues(struct ixgbe_adapter *adapter)
 {
        int i;
 
@@ -2410,8 +2407,7 @@ err_tx_ring_allocation:
  * Attempt to configure the interrupts using the best available
  * capabilities of the hardware and the kernel.
  **/
-static int __devinit ixgbe_set_interrupt_capability(struct ixgbe_adapter
-                                                    *adapter)
+static int ixgbe_set_interrupt_capability(struct ixgbe_adapter *adapter)
 {
        int err = 0;
        int vector, v_budget;
@@ -2503,7 +2499,7 @@ static void ixgbe_reset_interrupt_capability(struct ixgbe_adapter *adapter)
  * - Hardware queue count (num_*_queues)
  *   - defined by miscellaneous hardware support/features (RSS, etc.)
  **/
-static int __devinit ixgbe_init_interrupt_scheme(struct ixgbe_adapter *adapter)
+static int ixgbe_init_interrupt_scheme(struct ixgbe_adapter *adapter)
 {
        int err;
 
index 81c6cdc3851f8afd54d3319df5e6e9b99d516a25..665e70d620fc3cc6b7337c825a7e41f6d422c4b6 100644 (file)
@@ -912,23 +912,23 @@ jme_alloc_and_feed_skb(struct jme_adapter *jme, int idx)
                skb_put(skb, framesize);
                skb->protocol = eth_type_trans(skb, jme->dev);
 
-               if (jme_rxsum_ok(jme, rxdesc->descwb.flags))
+               if (jme_rxsum_ok(jme, le16_to_cpu(rxdesc->descwb.flags)))
                        skb->ip_summed = CHECKSUM_UNNECESSARY;
                else
                        skb->ip_summed = CHECKSUM_NONE;
 
-               if (rxdesc->descwb.flags & RXWBFLAG_TAGON) {
+               if (rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_TAGON)) {
                        if (jme->vlgrp) {
                                jme->jme_vlan_rx(skb, jme->vlgrp,
-                                       le32_to_cpu(rxdesc->descwb.vlan));
+                                       le16_to_cpu(rxdesc->descwb.vlan));
                                NET_STAT(jme).rx_bytes += 4;
                        }
                } else {
                        jme->jme_rx(skb);
                }
 
-               if ((le16_to_cpu(rxdesc->descwb.flags) & RXWBFLAG_DEST) ==
-                               RXWBFLAG_DEST_MUL)
+               if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_DEST)) ==
+                   cpu_to_le16(RXWBFLAG_DEST_MUL))
                        ++(NET_STAT(jme).multicast);
 
                jme->dev->last_rx = jiffies;
@@ -961,7 +961,7 @@ jme_process_receive(struct jme_adapter *jme, int limit)
                rxdesc = rxring->desc;
                rxdesc += i;
 
-               if ((rxdesc->descwb.flags & RXWBFLAG_OWN) ||
+               if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_OWN)) ||
                !(rxdesc->descwb.desccnt & RXWBDCNT_WBCPL))
                        goto out;
 
@@ -1763,10 +1763,9 @@ jme_expand_header(struct jme_adapter *jme, struct sk_buff *skb)
 }
 
 static int
-jme_tx_tso(struct sk_buff *skb,
-               u16 *mss, u8 *flags)
+jme_tx_tso(struct sk_buff *skb, __le16 *mss, u8 *flags)
 {
-       *mss = skb_shinfo(skb)->gso_size << TXDESC_MSS_SHIFT;
+       *mss = cpu_to_le16(skb_shinfo(skb)->gso_size << TXDESC_MSS_SHIFT);
        if (*mss) {
                *flags |= TXFLAG_LSEN;
 
@@ -1826,11 +1825,11 @@ jme_tx_csum(struct jme_adapter *jme, struct sk_buff *skb, u8 *flags)
 }
 
 static inline void
-jme_tx_vlan(struct sk_buff *skb, u16 *vlan, u8 *flags)
+jme_tx_vlan(struct sk_buff *skb, __le16 *vlan, u8 *flags)
 {
        if (vlan_tx_tag_present(skb)) {
                *flags |= TXFLAG_TAGON;
-               *vlan = vlan_tx_tag_get(skb);
+               *vlan = cpu_to_le16(vlan_tx_tag_get(skb));
        }
 }
 
index f863aee6648b49b0db38d2cdc077640669a2a424..3f5d91543246c88936d8fc086abf37c2cd3f6686 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #ifndef __JME_H_INCLUDED__
-#define __JME_H_INCLUDEE__
+#define __JME_H_INCLUDED__
 
 #define DRV_NAME       "jme"
 #define DRV_VERSION    "1.0.3"
index 42394505bb50b9a006b5d582eaef3378b1a9c5e6..590039cbb146f5a42b888055cc836ea576f23726 100644 (file)
@@ -70,6 +70,9 @@ static void macvlan_broadcast(struct sk_buff *skb,
        struct sk_buff *nskb;
        unsigned int i;
 
+       if (skb->protocol == htons(ETH_P_PAUSE))
+               return;
+
        for (i = 0; i < MACVLAN_HASH_SIZE; i++) {
                hlist_for_each_entry_rcu(vlan, n, &port->vlan_hash[i], hlist) {
                        dev = vlan->dev;
index a3f732418c49dc68e4545bf404eb0a8fd36c42d7..96e709d6440a459866b7d5d461113408031d7c23 100644 (file)
@@ -656,10 +656,10 @@ static int mlx4_en_start_port(struct net_device *dev)
        /* Configure port */
        err = mlx4_SET_PORT_general(mdev->dev, priv->port,
                                    priv->rx_skb_size + ETH_FCS_LEN,
-                                   mdev->profile.tx_pause,
-                                   mdev->profile.tx_ppp,
-                                   mdev->profile.rx_pause,
-                                   mdev->profile.rx_ppp);
+                                   priv->prof->tx_pause,
+                                   priv->prof->tx_ppp,
+                                   priv->prof->rx_pause,
+                                   priv->prof->rx_ppp);
        if (err) {
                mlx4_err(mdev, "Failed setting port general configurations"
                               " for port %d, with error %d\n", priv->port, err);
index c2e69b1bcd0a4fc9da51250db1c3ca8a7478af09..95706ee1c01996898a255b210a7cf8efd14e5ab4 100644 (file)
@@ -90,6 +90,7 @@ MLX4_EN_PARM_INT(rx_ring_size2, MLX4_EN_AUTO_CONF, "Rx ring size for port 2");
 int mlx4_en_get_profile(struct mlx4_en_dev *mdev)
 {
        struct mlx4_en_profile *params = &mdev->profile;
+       int i;
 
        params->rx_moder_cnt = min_t(int, rx_moder_cnt, MLX4_EN_AUTO_CONF);
        params->rx_moder_time = min_t(int, rx_moder_time, MLX4_EN_AUTO_CONF);
@@ -97,11 +98,13 @@ int mlx4_en_get_profile(struct mlx4_en_dev *mdev)
        params->rss_xor = (rss_xor != 0);
        params->rss_mask = rss_mask & 0x1f;
        params->num_lro = min_t(int, num_lro , MLX4_EN_MAX_LRO_DESCRIPTORS);
-       params->rx_pause = pprx;
-       params->rx_ppp = pfcrx;
-       params->tx_pause = pptx;
-       params->tx_ppp = pfctx;
-       if (params->rx_ppp || params->tx_ppp) {
+       for (i = 1; i <= MLX4_MAX_PORTS; i++) {
+               params->prof[i].rx_pause = pprx;
+               params->prof[i].rx_ppp = pfcrx;
+               params->prof[i].tx_pause = pptx;
+               params->prof[i].tx_ppp = pfctx;
+       }
+       if (pfcrx || pfctx) {
                params->prof[1].tx_ring_num = MLX4_EN_TX_RING_NUM;
                params->prof[2].tx_ring_num = MLX4_EN_TX_RING_NUM;
        } else {
@@ -407,14 +410,14 @@ static int mlx4_en_set_pauseparam(struct net_device *dev,
        struct mlx4_en_dev *mdev = priv->mdev;
        int err;
 
-       mdev->profile.tx_pause = pause->tx_pause != 0;
-       mdev->profile.rx_pause = pause->rx_pause != 0;
+       priv->prof->tx_pause = pause->tx_pause != 0;
+       priv->prof->rx_pause = pause->rx_pause != 0;
        err = mlx4_SET_PORT_general(mdev->dev, priv->port,
                                    priv->rx_skb_size + ETH_FCS_LEN,
-                                   mdev->profile.tx_pause,
-                                   mdev->profile.tx_ppp,
-                                   mdev->profile.rx_pause,
-                                   mdev->profile.rx_ppp);
+                                   priv->prof->tx_pause,
+                                   priv->prof->tx_ppp,
+                                   priv->prof->rx_pause,
+                                   priv->prof->rx_ppp);
        if (err)
                mlx4_err(mdev, "Failed setting pause params to\n");
 
@@ -425,10 +428,9 @@ static void mlx4_en_get_pauseparam(struct net_device *dev,
                                 struct ethtool_pauseparam *pause)
 {
        struct mlx4_en_priv *priv = netdev_priv(dev);
-       struct mlx4_en_dev *mdev = priv->mdev;
 
-       pause->tx_pause = mdev->profile.tx_pause;
-       pause->rx_pause = mdev->profile.rx_pause;
+       pause->tx_pause = priv->prof->tx_pause;
+       pause->rx_pause = priv->prof->rx_pause;
 }
 
 static void mlx4_en_get_ringparam(struct net_device *dev,
index 468921b8f4b68a047abdf2f247e4a1c3e0ed5d41..90a0281d15ea22d96ce788107dee88d0deb77aff 100644 (file)
@@ -753,6 +753,7 @@ static int mlx4_setup_hca(struct mlx4_dev *dev)
        struct mlx4_priv *priv = mlx4_priv(dev);
        int err;
        int port;
+       __be32 ib_port_default_caps;
 
        err = mlx4_init_uar_table(dev);
        if (err) {
@@ -852,6 +853,13 @@ static int mlx4_setup_hca(struct mlx4_dev *dev)
        }
 
        for (port = 1; port <= dev->caps.num_ports; port++) {
+               ib_port_default_caps = 0;
+               err = mlx4_get_port_ib_caps(dev, port, &ib_port_default_caps);
+               if (err)
+                       mlx4_warn(dev, "failed to get port %d default "
+                                 "ib capabilities (%d). Continuing with "
+                                 "caps = 0\n", port, err);
+               dev->caps.ib_port_def_cap[port] = ib_port_default_caps;
                err = mlx4_SET_PORT(dev, port);
                if (err) {
                        mlx4_err(dev, "Failed to set port %d, aborting\n",
index fa431fad0eecf7a8f9ead90bf97bfd08ddc9cdf7..34c909deaff325e9e90573065fa4d4efb45044b8 100644 (file)
@@ -87,6 +87,9 @@ enum {
 
 #ifdef CONFIG_MLX4_DEBUG
 extern int mlx4_debug_level;
+#else /* CONFIG_MLX4_DEBUG */
+#define mlx4_debug_level       (0)
+#endif /* CONFIG_MLX4_DEBUG */
 
 #define mlx4_dbg(mdev, format, arg...)                                 \
        do {                                                            \
@@ -94,12 +97,6 @@ extern int mlx4_debug_level;
                        dev_printk(KERN_DEBUG, &mdev->pdev->dev, format, ## arg); \
        } while (0)
 
-#else /* CONFIG_MLX4_DEBUG */
-
-#define mlx4_dbg(mdev, format, arg...) do { (void) mdev; } while (0)
-
-#endif /* CONFIG_MLX4_DEBUG */
-
 #define mlx4_err(mdev, format, arg...) \
        dev_err(&mdev->pdev->dev, format, ## arg)
 #define mlx4_info(mdev, format, arg...) \
@@ -388,5 +385,6 @@ void mlx4_init_mac_table(struct mlx4_dev *dev, struct mlx4_mac_table *table);
 void mlx4_init_vlan_table(struct mlx4_dev *dev, struct mlx4_vlan_table *table);
 
 int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port);
+int mlx4_get_port_ib_caps(struct mlx4_dev *dev, u8 port, __be32 *caps);
 
 #endif /* MLX4_H */
index 11fb17c6e97bfd4b51d831104ff7f0121bd4e4e8..98ddc0811f93e78b13bd37303dd2a3c572610c67 100644 (file)
@@ -322,6 +322,10 @@ struct mlx4_en_port_profile {
        u32 rx_ring_num;
        u32 tx_ring_size;
        u32 rx_ring_size;
+       u8 rx_pause;
+       u8 rx_ppp;
+       u8 tx_pause;
+       u8 tx_ppp;
 };
 
 struct mlx4_en_profile {
@@ -333,10 +337,6 @@ struct mlx4_en_profile {
        int rx_moder_cnt;
        int rx_moder_time;
        int auto_moder;
-       u8 rx_pause;
-       u8 rx_ppp;
-       u8 tx_pause;
-       u8 tx_ppp;
        u8 no_reset;
        struct mlx4_en_port_profile prof[MLX4_MAX_PORTS + 1];
 };
index e2fdab42c4ceabee3f5eb02c5cd5b53ed8fdce28..0a057e5dc63ba0ed32d0fac4ad6f306d77a8c715 100644 (file)
@@ -258,6 +258,42 @@ out:
 }
 EXPORT_SYMBOL_GPL(mlx4_unregister_vlan);
 
+int mlx4_get_port_ib_caps(struct mlx4_dev *dev, u8 port, __be32 *caps)
+{
+       struct mlx4_cmd_mailbox *inmailbox, *outmailbox;
+       u8 *inbuf, *outbuf;
+       int err;
+
+       inmailbox = mlx4_alloc_cmd_mailbox(dev);
+       if (IS_ERR(inmailbox))
+               return PTR_ERR(inmailbox);
+
+       outmailbox = mlx4_alloc_cmd_mailbox(dev);
+       if (IS_ERR(outmailbox)) {
+               mlx4_free_cmd_mailbox(dev, inmailbox);
+               return PTR_ERR(outmailbox);
+       }
+
+       inbuf = inmailbox->buf;
+       outbuf = outmailbox->buf;
+       memset(inbuf, 0, 256);
+       memset(outbuf, 0, 256);
+       inbuf[0] = 1;
+       inbuf[1] = 1;
+       inbuf[2] = 1;
+       inbuf[3] = 1;
+       *(__be16 *) (&inbuf[16]) = cpu_to_be16(0x0015);
+       *(__be32 *) (&inbuf[20]) = cpu_to_be32(port);
+
+       err = mlx4_cmd_box(dev, inmailbox->dma, outmailbox->dma, port, 3,
+                          MLX4_CMD_MAD_IFC, MLX4_CMD_TIME_CLASS_C);
+       if (!err)
+               *caps = *(__be32 *) (outbuf + 84);
+       mlx4_free_cmd_mailbox(dev, inmailbox);
+       mlx4_free_cmd_mailbox(dev, outmailbox);
+       return err;
+}
+
 int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port)
 {
        struct mlx4_cmd_mailbox *mailbox;
@@ -273,7 +309,8 @@ int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port)
                ((u8 *) mailbox->buf)[3] = 6;
                ((__be16 *) mailbox->buf)[4] = cpu_to_be16(1 << 15);
                ((__be16 *) mailbox->buf)[6] = cpu_to_be16(1 << 15);
-       }
+       } else
+               ((__be32 *) mailbox->buf)[1] = dev->caps.ib_port_def_cap[port];
        err = mlx4_cmd(dev, mailbox->dma, port, is_eth, MLX4_CMD_SET_PORT,
                       MLX4_CMD_TIME_CLASS_B);
 
index b9dcdbd369f87b87e5e9e12650e50d7ada6d9465..e513f76f2a9f6d1cd55cc8d190d679b36f5872da 100644 (file)
@@ -899,7 +899,8 @@ static int txq_reclaim(struct tx_queue *txq, int budget, int force)
                if (skb != NULL) {
                        if (skb_queue_len(&mp->rx_recycle) <
                                        mp->default_rx_ring_size &&
-                           skb_recycle_check(skb, mp->skb_size))
+                           skb_recycle_check(skb, mp->skb_size +
+                                       dma_get_cache_alignment() - 1))
                                __skb_queue_head(&mp->rx_recycle, skb);
                        else
                                dev_kfree_skb(skb);
@@ -2435,8 +2436,8 @@ static int mv643xx_eth_shared_remove(struct platform_device *pdev)
        struct mv643xx_eth_shared_platform_data *pd = pdev->dev.platform_data;
 
        if (pd == NULL || pd->shared_smi == NULL) {
-               mdiobus_free(msp->smi_bus);
                mdiobus_unregister(msp->smi_bus);
+               mdiobus_free(msp->smi_bus);
        }
        if (msp->err_interrupt != NO_IRQ)
                free_irq(msp->err_interrupt, msp);
index a5f428bcc0ebb28011efb551534584e768c4a6e9..b3786709730811c2b6467cabda06c55d2203ddb1 100644 (file)
@@ -75,7 +75,7 @@
 #include "myri10ge_mcp.h"
 #include "myri10ge_mcp_gen_header.h"
 
-#define MYRI10GE_VERSION_STR "1.4.3-1.375"
+#define MYRI10GE_VERSION_STR "1.4.3-1.378"
 
 MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
 MODULE_AUTHOR("Maintainer: help@myri.com");
@@ -1393,6 +1393,7 @@ myri10ge_tx_done(struct myri10ge_slice_state *ss, int mcp_index)
                if (tx->req == tx->done) {
                        tx->queue_active = 0;
                        put_be32(htonl(1), tx->send_stop);
+                       mb();
                        mmiowb();
                }
                __netif_tx_unlock(dev_queue);
@@ -2865,6 +2866,7 @@ again:
        if ((mgp->dev->real_num_tx_queues > 1) && tx->queue_active == 0) {
                tx->queue_active = 1;
                put_be32(htonl(1), tx->send_go);
+               mb();
                mmiowb();
        }
        tx->pkt_start++;
index b9bed82e1d214089f5b4e6682a965e11c781d6e5..b289a0a2b94563ea37b910c05deef15b6b61d0b6 100644 (file)
@@ -401,6 +401,8 @@ static int netx_eth_drv_probe(struct platform_device *pdev)
        priv->xmac_base = priv->xc->xmac_base;
        priv->sram_base = priv->xc->sram_base;
 
+       spin_lock_init(&priv->lock);
+
        ret = pfifo_request(PFIFO_MASK(priv->id));
        if (ret) {
                printk("unable to request PFIFO\n");
index 9acb5d70a3ae310c4ac179469a7d5f18ae721b32..1b6f548c4411203a7666e0f1703de8fcec4aabf5 100644 (file)
@@ -33,8 +33,8 @@
 
 #define DRV_MODULE_NAME                "niu"
 #define PFX DRV_MODULE_NAME    ": "
-#define DRV_MODULE_VERSION     "0.9"
-#define DRV_MODULE_RELDATE     "May 4, 2008"
+#define DRV_MODULE_VERSION     "1.0"
+#define DRV_MODULE_RELDATE     "Nov 14, 2008"
 
 static char version[] __devinitdata =
        DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
@@ -51,8 +51,7 @@ MODULE_VERSION(DRV_MODULE_VERSION);
 #ifndef readq
 static u64 readq(void __iomem *reg)
 {
-       return (((u64)readl(reg + 0x4UL) << 32) |
-               (u64)readl(reg));
+       return ((u64) readl(reg)) | (((u64) readl(reg + 4UL)) << 32);
 }
 
 static void writeq(u64 val, void __iomem *reg)
@@ -407,7 +406,7 @@ static int esr2_set_rx_cfg(struct niu *np, unsigned long channel, u32 val)
 }
 
 /* Mode is always 10G fiber.  */
-static int serdes_init_niu(struct niu *np)
+static int serdes_init_niu_10g_fiber(struct niu *np)
 {
        struct niu_link_config *lp = &np->link_config;
        u32 tx_cfg, rx_cfg;
@@ -444,6 +443,223 @@ static int serdes_init_niu(struct niu *np)
        return 0;
 }
 
+static int serdes_init_niu_1g_serdes(struct niu *np)
+{
+       struct niu_link_config *lp = &np->link_config;
+       u16 pll_cfg, pll_sts;
+       int max_retry = 100;
+       u64 sig, mask, val;
+       u32 tx_cfg, rx_cfg;
+       unsigned long i;
+       int err;
+
+       tx_cfg = (PLL_TX_CFG_ENTX | PLL_TX_CFG_SWING_1375MV |
+                 PLL_TX_CFG_RATE_HALF);
+       rx_cfg = (PLL_RX_CFG_ENRX | PLL_RX_CFG_TERM_0P8VDDT |
+                 PLL_RX_CFG_ALIGN_ENA | PLL_RX_CFG_LOS_LTHRESH |
+                 PLL_RX_CFG_RATE_HALF);
+
+       if (np->port == 0)
+               rx_cfg |= PLL_RX_CFG_EQ_LP_ADAPTIVE;
+
+       if (lp->loopback_mode == LOOPBACK_PHY) {
+               u16 test_cfg = PLL_TEST_CFG_LOOPBACK_CML_DIS;
+
+               mdio_write(np, np->port, NIU_ESR2_DEV_ADDR,
+                          ESR2_TI_PLL_TEST_CFG_L, test_cfg);
+
+               tx_cfg |= PLL_TX_CFG_ENTEST;
+               rx_cfg |= PLL_RX_CFG_ENTEST;
+       }
+
+       /* Initialize PLL for 1G */
+       pll_cfg = (PLL_CFG_ENPLL | PLL_CFG_MPY_8X);
+
+       err = mdio_write(np, np->port, NIU_ESR2_DEV_ADDR,
+                        ESR2_TI_PLL_CFG_L, pll_cfg);
+       if (err) {
+               dev_err(np->device, PFX "NIU Port %d "
+                       "serdes_init_niu_1g_serdes: "
+                       "mdio write to ESR2_TI_PLL_CFG_L failed", np->port);
+               return err;
+       }
+
+       pll_sts = PLL_CFG_ENPLL;
+
+       err = mdio_write(np, np->port, NIU_ESR2_DEV_ADDR,
+                        ESR2_TI_PLL_STS_L, pll_sts);
+       if (err) {
+               dev_err(np->device, PFX "NIU Port %d "
+                       "serdes_init_niu_1g_serdes: "
+                       "mdio write to ESR2_TI_PLL_STS_L failed", np->port);
+               return err;
+       }
+
+       udelay(200);
+
+       /* Initialize all 4 lanes of the SERDES.  */
+       for (i = 0; i < 4; i++) {
+               err = esr2_set_tx_cfg(np, i, tx_cfg);
+               if (err)
+                       return err;
+       }
+
+       for (i = 0; i < 4; i++) {
+               err = esr2_set_rx_cfg(np, i, rx_cfg);
+               if (err)
+                       return err;
+       }
+
+       switch (np->port) {
+       case 0:
+               val = (ESR_INT_SRDY0_P0 | ESR_INT_DET0_P0);
+               mask = val;
+               break;
+
+       case 1:
+               val = (ESR_INT_SRDY0_P1 | ESR_INT_DET0_P1);
+               mask = val;
+               break;
+
+       default:
+               return -EINVAL;
+       }
+
+       while (max_retry--) {
+               sig = nr64(ESR_INT_SIGNALS);
+               if ((sig & mask) == val)
+                       break;
+
+               mdelay(500);
+       }
+
+       if ((sig & mask) != val) {
+               dev_err(np->device, PFX "Port %u signal bits [%08x] are not "
+                       "[%08x]\n", np->port, (int) (sig & mask), (int) val);
+               return -ENODEV;
+       }
+
+       return 0;
+}
+
+static int serdes_init_niu_10g_serdes(struct niu *np)
+{
+       struct niu_link_config *lp = &np->link_config;
+       u32 tx_cfg, rx_cfg, pll_cfg, pll_sts;
+       int max_retry = 100;
+       u64 sig, mask, val;
+       unsigned long i;
+       int err;
+
+       tx_cfg = (PLL_TX_CFG_ENTX | PLL_TX_CFG_SWING_1375MV);
+       rx_cfg = (PLL_RX_CFG_ENRX | PLL_RX_CFG_TERM_0P8VDDT |
+                 PLL_RX_CFG_ALIGN_ENA | PLL_RX_CFG_LOS_LTHRESH |
+                 PLL_RX_CFG_EQ_LP_ADAPTIVE);
+
+       if (lp->loopback_mode == LOOPBACK_PHY) {
+               u16 test_cfg = PLL_TEST_CFG_LOOPBACK_CML_DIS;
+
+               mdio_write(np, np->port, NIU_ESR2_DEV_ADDR,
+                          ESR2_TI_PLL_TEST_CFG_L, test_cfg);
+
+               tx_cfg |= PLL_TX_CFG_ENTEST;
+               rx_cfg |= PLL_RX_CFG_ENTEST;
+       }
+
+       /* Initialize PLL for 10G */
+       pll_cfg = (PLL_CFG_ENPLL | PLL_CFG_MPY_10X);
+
+       err = mdio_write(np, np->port, NIU_ESR2_DEV_ADDR,
+                        ESR2_TI_PLL_CFG_L, pll_cfg & 0xffff);
+       if (err) {
+               dev_err(np->device, PFX "NIU Port %d "
+                       "serdes_init_niu_10g_serdes: "
+                       "mdio write to ESR2_TI_PLL_CFG_L failed", np->port);
+               return err;
+       }
+
+       pll_sts = PLL_CFG_ENPLL;
+
+       err = mdio_write(np, np->port, NIU_ESR2_DEV_ADDR,
+                        ESR2_TI_PLL_STS_L, pll_sts & 0xffff);
+       if (err) {
+               dev_err(np->device, PFX "NIU Port %d "
+                       "serdes_init_niu_10g_serdes: "
+                       "mdio write to ESR2_TI_PLL_STS_L failed", np->port);
+               return err;
+       }
+
+       udelay(200);
+
+       /* Initialize all 4 lanes of the SERDES.  */
+       for (i = 0; i < 4; i++) {
+               err = esr2_set_tx_cfg(np, i, tx_cfg);
+               if (err)
+                       return err;
+       }
+
+       for (i = 0; i < 4; i++) {
+               err = esr2_set_rx_cfg(np, i, rx_cfg);
+               if (err)
+                       return err;
+       }
+
+       /* check if serdes is ready */
+
+       switch (np->port) {
+       case 0:
+               mask = ESR_INT_SIGNALS_P0_BITS;
+               val = (ESR_INT_SRDY0_P0 |
+                      ESR_INT_DET0_P0 |
+                      ESR_INT_XSRDY_P0 |
+                      ESR_INT_XDP_P0_CH3 |
+                      ESR_INT_XDP_P0_CH2 |
+                      ESR_INT_XDP_P0_CH1 |
+                      ESR_INT_XDP_P0_CH0);
+               break;
+
+       case 1:
+               mask = ESR_INT_SIGNALS_P1_BITS;
+               val = (ESR_INT_SRDY0_P1 |
+                      ESR_INT_DET0_P1 |
+                      ESR_INT_XSRDY_P1 |
+                      ESR_INT_XDP_P1_CH3 |
+                      ESR_INT_XDP_P1_CH2 |
+                      ESR_INT_XDP_P1_CH1 |
+                      ESR_INT_XDP_P1_CH0);
+               break;
+
+       default:
+               return -EINVAL;
+       }
+
+       while (max_retry--) {
+               sig = nr64(ESR_INT_SIGNALS);
+               if ((sig & mask) == val)
+                       break;
+
+               mdelay(500);
+       }
+
+       if ((sig & mask) != val) {
+               pr_info(PFX "NIU Port %u signal bits [%08x] are not "
+                       "[%08x] for 10G...trying 1G\n",
+                       np->port, (int) (sig & mask), (int) val);
+
+               /* 10G failed, try initializing at 1G */
+               err = serdes_init_niu_1g_serdes(np);
+               if (!err) {
+                       np->flags &= ~NIU_FLAGS_10G;
+                       np->mac_xcvr = MAC_XCVR_PCS;
+               }  else {
+                       dev_err(np->device, PFX "Port %u 10G/1G SERDES "
+                               "Link Failed \n", np->port);
+                       return -ENODEV;
+               }
+       }
+       return 0;
+}
+
 static int esr_read_rxtx_ctrl(struct niu *np, unsigned long chan, u32 *val)
 {
        int err;
@@ -1955,13 +2171,23 @@ static const struct niu_phy_ops phy_ops_10g_serdes = {
        .link_status            = link_status_10g_serdes,
 };
 
+static const struct niu_phy_ops phy_ops_10g_serdes_niu = {
+       .serdes_init            = serdes_init_niu_10g_serdes,
+       .link_status            = link_status_10g_serdes,
+};
+
+static const struct niu_phy_ops phy_ops_1g_serdes_niu = {
+       .serdes_init            = serdes_init_niu_1g_serdes,
+       .link_status            = link_status_1g_serdes,
+};
+
 static const struct niu_phy_ops phy_ops_1g_rgmii = {
        .xcvr_init              = xcvr_init_1g_rgmii,
        .link_status            = link_status_1g_rgmii,
 };
 
 static const struct niu_phy_ops phy_ops_10g_fiber_niu = {
-       .serdes_init            = serdes_init_niu,
+       .serdes_init            = serdes_init_niu_10g_fiber,
        .xcvr_init              = xcvr_init_10g,
        .link_status            = link_status_10g,
 };
@@ -1999,11 +2225,21 @@ struct niu_phy_template {
        u32                             phy_addr_base;
 };
 
-static const struct niu_phy_template phy_template_niu = {
+static const struct niu_phy_template phy_template_niu_10g_fiber = {
        .ops            = &phy_ops_10g_fiber_niu,
        .phy_addr_base  = 16,
 };
 
+static const struct niu_phy_template phy_template_niu_10g_serdes = {
+       .ops            = &phy_ops_10g_serdes_niu,
+       .phy_addr_base  = 0,
+};
+
+static const struct niu_phy_template phy_template_niu_1g_serdes = {
+       .ops            = &phy_ops_1g_serdes_niu,
+       .phy_addr_base  = 0,
+};
+
 static const struct niu_phy_template phy_template_10g_fiber = {
        .ops            = &phy_ops_10g_fiber,
        .phy_addr_base  = 8,
@@ -2183,8 +2419,25 @@ static int niu_determine_phy_disposition(struct niu *np)
        u32 phy_addr_off = 0;
 
        if (plat_type == PLAT_TYPE_NIU) {
-               tp = &phy_template_niu;
-               phy_addr_off += np->port;
+               switch (np->flags &
+                       (NIU_FLAGS_10G |
+                        NIU_FLAGS_FIBER |
+                        NIU_FLAGS_XCVR_SERDES)) {
+               case NIU_FLAGS_10G | NIU_FLAGS_XCVR_SERDES:
+                       /* 10G Serdes */
+                       tp = &phy_template_niu_10g_serdes;
+                       break;
+               case NIU_FLAGS_XCVR_SERDES:
+                       /* 1G Serdes */
+                       tp = &phy_template_niu_1g_serdes;
+                       break;
+               case NIU_FLAGS_10G | NIU_FLAGS_FIBER:
+                       /* 10G Fiber */
+               default:
+                       tp = &phy_template_niu_10g_fiber;
+                       phy_addr_off += np->port;
+                       break;
+               }
        } else {
                switch (np->flags &
                        (NIU_FLAGS_10G |
@@ -7214,6 +7467,12 @@ static int __devinit niu_phy_type_prop_decode(struct niu *np,
                np->flags |= NIU_FLAGS_10G;
                np->flags &= ~NIU_FLAGS_FIBER;
                np->mac_xcvr = MAC_XCVR_XPCS;
+       } else if (!strcmp(phy_prop, "xgsd") || !strcmp(phy_prop, "gsd")) {
+               /* 10G Serdes or 1G Serdes, default to 10G */
+               np->flags |= NIU_FLAGS_10G;
+               np->flags &= ~NIU_FLAGS_FIBER;
+               np->flags |= NIU_FLAGS_XCVR_SERDES;
+               np->mac_xcvr = MAC_XCVR_XPCS;
        } else {
                return -EINVAL;
        }
@@ -7742,6 +8001,8 @@ static int __devinit walk_phys(struct niu *np, struct niu_parent *parent)
        u32 val;
        int err;
 
+       num_10g = num_1g = 0;
+
        if (!strcmp(np->vpd.model, NIU_ALONSO_MDL_STR) ||
            !strcmp(np->vpd.model, NIU_KIMI_MDL_STR)) {
                num_10g = 0;
@@ -7758,6 +8019,16 @@ static int __devinit walk_phys(struct niu *np, struct niu_parent *parent)
                parent->num_ports = 2;
                val = (phy_encode(PORT_TYPE_10G, 0) |
                       phy_encode(PORT_TYPE_10G, 1));
+       } else if ((np->flags & NIU_FLAGS_XCVR_SERDES) &&
+                  (parent->plat_type == PLAT_TYPE_NIU)) {
+               /* this is the Monza case */
+               if (np->flags & NIU_FLAGS_10G) {
+                       val = (phy_encode(PORT_TYPE_10G, 0) |
+                              phy_encode(PORT_TYPE_10G, 1));
+               } else {
+                       val = (phy_encode(PORT_TYPE_1G, 0) |
+                              phy_encode(PORT_TYPE_1G, 1));
+               }
        } else {
                err = fill_phy_probe_info(np, parent, info);
                if (err)
@@ -8657,7 +8928,9 @@ static void __devinit niu_device_announce(struct niu *np)
                                dev->name,
                                (np->flags & NIU_FLAGS_XMAC ? "XMAC" : "BMAC"),
                                (np->flags & NIU_FLAGS_10G ? "10G" : "1G"),
-                               (np->flags & NIU_FLAGS_FIBER ? "FIBER" : "COPPER"),
+                               (np->flags & NIU_FLAGS_FIBER ? "FIBER" :
+                                (np->flags & NIU_FLAGS_XCVR_SERDES ? "SERDES" :
+                                 "COPPER")),
                                (np->mac_xcvr == MAC_XCVR_MII ? "MII" :
                                 (np->mac_xcvr == MAC_XCVR_PCS ? "PCS" : "XPCS")),
                                np->vpd.phy_type);
index c6fa883daa2217574a54675834c91b40df9ab0d0..180ca8ae93deabab7a6ddf201e4e2fb296487a2d 100644 (file)
 #define  PLL_CFG_LD_SHIFT              8
 #define  PLL_CFG_MPY                   0x0000001e
 #define  PLL_CFG_MPY_SHIFT             1
+#define  PLL_CFG_MPY_4X                0x0
+#define  PLL_CFG_MPY_5X                0x00000002
+#define  PLL_CFG_MPY_6X                0x00000004
+#define  PLL_CFG_MPY_8X                0x00000008
+#define  PLL_CFG_MPY_10X               0x0000000a
+#define  PLL_CFG_MPY_12X               0x0000000c
+#define  PLL_CFG_MPY_12P5X             0x0000000e
 #define  PLL_CFG_ENPLL                 0x00000001
 
 #define ESR2_TI_PLL_STS_L              (ESR2_BASE + 0x002)
 #define  PLL_TX_CFG_INVPAIR            0x00000080
 #define  PLL_TX_CFG_RATE               0x00000060
 #define  PLL_TX_CFG_RATE_SHIFT         5
+#define  PLL_TX_CFG_RATE_FULL          0x0
+#define  PLL_TX_CFG_RATE_HALF          0x20
+#define  PLL_TX_CFG_RATE_QUAD          0x40
 #define  PLL_TX_CFG_BUSWIDTH           0x0000001c
 #define  PLL_TX_CFG_BUSWIDTH_SHIFT     2
 #define  PLL_TX_CFG_ENTEST             0x00000002
 #define  PLL_RX_CFG_INVPAIR            0x00000080
 #define  PLL_RX_CFG_RATE               0x00000060
 #define  PLL_RX_CFG_RATE_SHIFT         5
+#define  PLL_RX_CFG_RATE_FULL          0x0
+#define  PLL_RX_CFG_RATE_HALF          0x20
+#define  PLL_RX_CFG_RATE_QUAD          0x40
 #define  PLL_RX_CFG_BUSWIDTH           0x0000001c
 #define  PLL_RX_CFG_BUSWIDTH_SHIFT     2
 #define  PLL_RX_CFG_ENTEST             0x00000002
index b37a498939ae7d1a16f6e1a5c0ad8545f6d32380..0418045166c348f15431b94fbfa06af894bf6820 100644 (file)
@@ -779,6 +779,7 @@ static struct pcmcia_device_id axnet_ids[] = {
        PCMCIA_DEVICE_PROD_ID12("IO DATA", "ETXPCM", 0x547e66dc, 0x233adac2),
        PCMCIA_DEVICE_PROD_ID12("Linksys", "EtherFast 10/100 PC Card (PCMPC100 V3)", 0x0733cc81, 0x232019a8),
        PCMCIA_DEVICE_PROD_ID12("MELCO", "LPC3-TX", 0x481e0094, 0xf91af609),
+       PCMCIA_DEVICE_PROD_ID12("NETGEAR", "FA411", 0x9aa79dc3, 0x40fad875),
        PCMCIA_DEVICE_PROD_ID12("PCMCIA", "100BASE", 0x281f1c5d, 0x7c2add04),
        PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FastEtherCard", 0x281f1c5d, 0x7ef26116),
        PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FEP501", 0x281f1c5d, 0x2e272058),
@@ -1174,7 +1175,6 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
  * ax_interrupt - handle the interrupts from an 8390
  * @irq: interrupt number
  * @dev_id: a pointer to the net_device
- * @regs: unused
  *
  * Handle the ether interface interrupts. We pull packets from
  * the 8390 via the card specific functions and fire them at the networking
index cf3cca4642f225320d9b076a9d82510c23aae493..f51944b28cfa7008bd05f282844013e5459c6fc2 100644 (file)
@@ -349,7 +349,7 @@ static int ibmtr_suspend(struct pcmcia_device *link)
        return 0;
 }
 
-static int ibmtr_resume(struct pcmcia_device *link)
+static int __devinit ibmtr_resume(struct pcmcia_device *link)
 {
        ibmtr_dev_t *info = link->priv;
        struct net_device *dev = info->dev;
index e40d6301aa7aaf1084b9e0cef1bfbf7588d692c3..ce486f09449215dc08baec27aeb723dd0484b371 100644 (file)
@@ -1693,7 +1693,6 @@ static struct pcmcia_device_id pcnet_ids[] = {
        PCMCIA_DEVICE_PROD_ID12("National Semiconductor", "InfoMover NE4100", 0x36e1191f, 0xa6617ec8),
        PCMCIA_DEVICE_PROD_ID12("NEC", "PC-9801N-J12", 0x18df0ba0, 0xbc912d76),
        PCMCIA_DEVICE_PROD_ID12("NETGEAR", "FA410TX", 0x9aa79dc3, 0x60e5bc0e),
-       PCMCIA_DEVICE_PROD_ID12("NETGEAR", "FA411", 0x9aa79dc3, 0x40fad875),
        PCMCIA_DEVICE_PROD_ID12("Network Everywhere", "Fast Ethernet 10/100 PC Card", 0x820a67b6, 0x31ed1a5f),
        PCMCIA_DEVICE_PROD_ID12("NextCom K.K.", "Next Hawk", 0xaedaec74, 0xad050ef1),
        PCMCIA_DEVICE_PROD_ID12("PCMCIA", "10/100Mbps Ethernet Card", 0x281f1c5d, 0x6e41773b),
index 4aa54794704045dfdec94bbaafea2d88970e163a..eb6411c4694ffbddc3deb28090a5d642c3ae143f 100644 (file)
@@ -227,6 +227,59 @@ static int m88e1111_config_init(struct phy_device *phydev)
        return 0;
 }
 
+static int m88e1118_config_aneg(struct phy_device *phydev)
+{
+       int err;
+
+       err = phy_write(phydev, MII_BMCR, BMCR_RESET);
+       if (err < 0)
+               return err;
+
+       err = phy_write(phydev, MII_M1011_PHY_SCR,
+                       MII_M1011_PHY_SCR_AUTO_CROSS);
+       if (err < 0)
+               return err;
+
+       err = genphy_config_aneg(phydev);
+       return 0;
+}
+
+static int m88e1118_config_init(struct phy_device *phydev)
+{
+       int err;
+
+       /* Change address */
+       err = phy_write(phydev, 0x16, 0x0002);
+       if (err < 0)
+               return err;
+
+       /* Enable 1000 Mbit */
+       err = phy_write(phydev, 0x15, 0x1070);
+       if (err < 0)
+               return err;
+
+       /* Change address */
+       err = phy_write(phydev, 0x16, 0x0003);
+       if (err < 0)
+               return err;
+
+       /* Adjust LED Control */
+       err = phy_write(phydev, 0x10, 0x021e);
+       if (err < 0)
+               return err;
+
+       /* Reset address */
+       err = phy_write(phydev, 0x16, 0x0);
+       if (err < 0)
+               return err;
+
+       err = phy_write(phydev, MII_BMCR, BMCR_RESET);
+       if (err < 0)
+               return err;
+
+       return 0;
+}
+
 static int m88e1145_config_init(struct phy_device *phydev)
 {
        int err;
@@ -415,6 +468,19 @@ static struct phy_driver marvell_drivers[] = {
                .config_intr = &marvell_config_intr,
                .driver = { .owner = THIS_MODULE },
        },
+       {
+               .phy_id = 0x01410e10,
+               .phy_id_mask = 0xfffffff0,
+               .name = "Marvell 88E1118",
+               .features = PHY_GBIT_FEATURES,
+               .flags = PHY_HAS_INTERRUPT,
+               .config_init = &m88e1118_config_init,
+               .config_aneg = &m88e1118_config_aneg,
+               .read_status = &genphy_read_status,
+               .ack_interrupt = &marvell_ack_interrupt,
+               .config_intr = &marvell_config_intr,
+               .driver = {.owner = THIS_MODULE,},
+       },
        {
                .phy_id = 0x01410cd0,
                .phy_id_mask = 0xfffffff0,
index d0ed1ef284a80404510e8f169537f40e4cb678a3..289fc267edf30eb5094d24f416ca644c9494d401 100644 (file)
@@ -105,8 +105,6 @@ int mdiobus_register(struct mii_bus *bus)
                return -EINVAL;
        }
 
-       bus->state = MDIOBUS_REGISTERED;
-
        mutex_init(&bus->mdio_lock);
 
        if (bus->reset)
@@ -123,6 +121,9 @@ int mdiobus_register(struct mii_bus *bus)
                }
        }
 
+       if (!err)
+               bus->state = MDIOBUS_REGISTERED;
+
        pr_info("%s: probed\n", bus->name);
 
        return err;
@@ -136,7 +137,7 @@ void mdiobus_unregister(struct mii_bus *bus)
        BUG_ON(bus->state != MDIOBUS_REGISTERED);
        bus->state = MDIOBUS_UNREGISTERED;
 
-       device_unregister(&bus->dev);
+       device_del(&bus->dev);
        for (i = 0; i < PHY_MAX_ADDR; i++) {
                if (bus->phy_map[i])
                        device_unregister(&bus->phy_map[i]->dev);
index e11b03b2b25a776c2494951953feeb44777d2f84..25acbbde4a6009f9c34926c0e2f89ca4e8066d6e 100644 (file)
@@ -227,8 +227,17 @@ struct phy_device * get_phy_device(struct mii_bus *bus, int addr)
        if (r)
                return ERR_PTR(r);
 
-       /* If the phy_id is all Fs, there is no device there */
-       if (0xffffffff == phy_id)
+       /* If the phy_id is mostly Fs, there is no device there */
+       if ((phy_id & 0x1fffffff) == 0x1fffffff)
+               return NULL;
+
+       /*
+        * Broken hardware is sometimes missing the pull down resistor on the
+        * MDIO line, which results in reads to non-existent devices returning
+        * 0 rather than 0xffff. Catch this here and treat 0 as a non-existent
+        * device as well.
+        */
+       if (phy_id == 0)
                return NULL;
 
        dev = phy_device_create(bus, addr, phy_id);
@@ -564,20 +573,32 @@ EXPORT_SYMBOL(genphy_restart_aneg);
  */
 int genphy_config_aneg(struct phy_device *phydev)
 {
-       int result = 0;
+       int result;
 
-       if (AUTONEG_ENABLE == phydev->autoneg) {
-               int result = genphy_config_advert(phydev);
+       if (AUTONEG_ENABLE != phydev->autoneg)
+               return genphy_setup_forced(phydev);
 
-               if (result < 0) /* error */
-                       return result;
+       result = genphy_config_advert(phydev);
+
+       if (result < 0) /* error */
+               return result;
+
+       if (result == 0) {
+               /* Advertisment hasn't changed, but maybe aneg was never on to
+                * begin with?  Or maybe phy was isolated? */
+               int ctl = phy_read(phydev, MII_BMCR);
+
+               if (ctl < 0)
+                       return ctl;
+
+               if (!(ctl & BMCR_ANENABLE) || (ctl & BMCR_ISOLATE))
+                       result = 1; /* do restart aneg */
+       }
 
-               /* Only restart aneg if we are advertising something different
-                * than we were before.  */
-               if (result > 0)
-                       result = genphy_restart_aneg(phydev);
-       } else
-               result = genphy_setup_forced(phydev);
+       /* Only restart aneg if we are advertising something different
+        * than we were before.  */
+       if (result > 0)
+               result = genphy_restart_aneg(phydev);
 
        return result;
 }
index 8874497b6bbfa76384c42bdfc4af9903991af497..dd3b2447e85a63936b49e24d2deaffa7e9ac960d 100644 (file)
@@ -34,6 +34,8 @@
 #define MII_VSC8244_IMASK_DUPLEX       0x1000
 #define MII_VSC8244_IMASK_MASK         0xf000
 
+#define MII_VSC8221_IMASK_MASK         0xa000
+
 /* Vitesse Interrupt Status Register */
 #define MII_VSC8244_ISTAT              0x1a
 #define MII_VSC8244_ISTAT_STATUS       0x8000
 #define MII_VSC8244_AUXCONSTAT_GBIT            0x0010
 #define MII_VSC8244_AUXCONSTAT_100             0x0008
 
+#define MII_VSC8221_AUXCONSTAT_INIT    0x0004 /* need to set this bit? */
+#define MII_VSC8221_AUXCONSTAT_RESERVED        0x0004
+
+#define PHY_ID_VSC8244                 0x000fc6c0
+#define PHY_ID_VSC8221                 0x000fc550
+
 MODULE_DESCRIPTION("Vitesse PHY driver");
 MODULE_AUTHOR("Kriston Carson");
 MODULE_LICENSE("GPL");
@@ -95,13 +103,15 @@ static int vsc824x_ack_interrupt(struct phy_device *phydev)
        return (err < 0) ? err : 0;
 }
 
-static int vsc824x_config_intr(struct phy_device *phydev)
+static int vsc82xx_config_intr(struct phy_device *phydev)
 {
        int err;
 
        if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
                err = phy_write(phydev, MII_VSC8244_IMASK,
-                               MII_VSC8244_IMASK_MASK);
+                       phydev->drv->phy_id == PHY_ID_VSC8244 ?
+                               MII_VSC8244_IMASK_MASK :
+                               MII_VSC8221_IMASK_MASK);
        else {
                /*
                 * The Vitesse PHY cannot clear the interrupt
@@ -120,7 +130,7 @@ static int vsc824x_config_intr(struct phy_device *phydev)
 
 /* Vitesse 824x */
 static struct phy_driver vsc8244_driver = {
-       .phy_id         = 0x000fc6c0,
+       .phy_id         = PHY_ID_VSC8244,
        .name           = "Vitesse VSC8244",
        .phy_id_mask    = 0x000fffc0,
        .features       = PHY_GBIT_FEATURES,
@@ -129,19 +139,55 @@ static struct phy_driver vsc8244_driver = {
        .config_aneg    = &genphy_config_aneg,
        .read_status    = &genphy_read_status,
        .ack_interrupt  = &vsc824x_ack_interrupt,
-       .config_intr    = &vsc824x_config_intr,
+       .config_intr    = &vsc82xx_config_intr,
        .driver         = { .owner = THIS_MODULE,},
 };
 
-static int __init vsc8244_init(void)
+static int vsc8221_config_init(struct phy_device *phydev)
 {
-       return phy_driver_register(&vsc8244_driver);
+       int err;
+
+       err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT,
+                       MII_VSC8221_AUXCONSTAT_INIT);
+       return err;
+
+       /* Perhaps we should set EXT_CON1 based on the interface?
+          Options are 802.3Z SerDes or SGMII */
+}
+
+/* Vitesse 8221 */
+static struct phy_driver vsc8221_driver = {
+       .phy_id         = PHY_ID_VSC8221,
+       .phy_id_mask    = 0x000ffff0,
+       .name           = "Vitesse VSC8221",
+       .features       = PHY_GBIT_FEATURES,
+       .flags          = PHY_HAS_INTERRUPT,
+       .config_init    = &vsc8221_config_init,
+       .config_aneg    = &genphy_config_aneg,
+       .read_status    = &genphy_read_status,
+       .ack_interrupt  = &vsc824x_ack_interrupt,
+       .config_intr    = &vsc82xx_config_intr,
+       .driver         = { .owner = THIS_MODULE,},
+};
+
+static int __init vsc82xx_init(void)
+{
+       int err;
+
+       err = phy_driver_register(&vsc8244_driver);
+       if (err < 0)
+               return err;
+       err = phy_driver_register(&vsc8221_driver);
+       if (err < 0)
+               phy_driver_unregister(&vsc8244_driver);
+       return err;
 }
 
-static void __exit vsc8244_exit(void)
+static void __exit vsc82xx_exit(void)
 {
        phy_driver_unregister(&vsc8244_driver);
+       phy_driver_unregister(&vsc8221_driver);
 }
 
-module_init(vsc8244_init);
-module_exit(vsc8244_exit);
+module_init(vsc82xx_init);
+module_exit(vsc82xx_exit);
index 185b1dff10a8d572494c391aebf515133a56b2ff..e98d9773158d287ba1ae35052dca968fc6cf5735 100644 (file)
@@ -1353,6 +1353,7 @@ static int pppol2tp_release(struct socket *sock)
                        kfree_skb(skb);
                        sock_put(sk);
                }
+               sock_put(sk);
        }
 
        release_sock(sk);
index 3cdd07c45b6dea4961a8a12422d90643a76d0c37..508452c0215144343a2aacbe37f44d20caedfbf3 100644 (file)
@@ -1515,9 +1515,6 @@ static u32 ql_get_link_state(struct ql3_adapter *qdev)
                linkState = LS_UP;
        } else {
                linkState = LS_DOWN;
-               if (netif_msg_link(qdev))
-                       printk(KERN_WARNING PFX
-                              "%s: Link is down.\n", qdev->ndev->name);
        }
        return linkState;
 }
@@ -1581,10 +1578,6 @@ static int ql_finish_auto_neg(struct ql3_adapter *qdev)
                        ql_mac_enable(qdev, 1);
                }
 
-               if (netif_msg_link(qdev))
-                       printk(KERN_DEBUG PFX
-                              "%s: Change port_link_state LS_DOWN to LS_UP.\n",
-                              qdev->ndev->name);
                qdev->port_link_state = LS_UP;
                netif_start_queue(qdev->ndev);
                netif_carrier_on(qdev->ndev);
@@ -1655,14 +1648,9 @@ static void ql_link_state_machine_work(struct work_struct *work)
                /* Fall Through */
 
        case LS_DOWN:
-               if (netif_msg_link(qdev))
-                       printk(KERN_DEBUG PFX
-                              "%s: port_link_state = LS_DOWN.\n",
-                              qdev->ndev->name);
                if (curr_link_state == LS_UP) {
                        if (netif_msg_link(qdev))
-                               printk(KERN_DEBUG PFX
-                                      "%s: curr_link_state = LS_UP.\n",
+                               printk(KERN_INFO PFX "%s: Link is up.\n",
                                       qdev->ndev->name);
                        if (ql_is_auto_neg_complete(qdev))
                                ql_finish_auto_neg(qdev);
@@ -1670,6 +1658,7 @@ static void ql_link_state_machine_work(struct work_struct *work)
                        if (qdev->port_link_state == LS_UP)
                                ql_link_down_detect_clear(qdev);
 
+                       qdev->port_link_state = LS_UP;
                }
                break;
 
@@ -1678,12 +1667,14 @@ static void ql_link_state_machine_work(struct work_struct *work)
                 * See if the link is currently down or went down and came
                 * back up
                 */
-               if ((curr_link_state == LS_DOWN) || ql_link_down_detect(qdev)) {
+               if (curr_link_state == LS_DOWN) {
                        if (netif_msg_link(qdev))
                                printk(KERN_INFO PFX "%s: Link is down.\n",
                                       qdev->ndev->name);
                        qdev->port_link_state = LS_DOWN;
                }
+               if (ql_link_down_detect(qdev))
+                       qdev->port_link_state = LS_DOWN;
                break;
        }
        spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
index a24bb68887ab24eb399137d8d6cf45366fa2b704..59f242a6771497619e36f51cc424ef9a61e2036d 100644 (file)
@@ -927,7 +927,7 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
        struct sh_eth_private *mdp = netdev_priv(ndev);
        struct sh_eth_txdesc *txdesc;
        u32 entry;
-       int flags;
+       unsigned long flags;
 
        spin_lock_irqsave(&mdp->lock, flags);
        if ((mdp->cur_tx - mdp->dirty_tx) >= (TX_RING_SIZE - 4)) {
@@ -1141,7 +1141,7 @@ static int sh_mdio_init(struct net_device *ndev, int id)
        /* Hook up MII support for ethtool */
        mdp->mii_bus->name = "sh_mii";
        mdp->mii_bus->parent = &ndev->dev;
-       mdp->mii_bus->id[0] = id;
+       snprintf(mdp->mii_bus->id, MII_BUS_ID_SIZE, "%x", id);
 
        /* PHY IRQ */
        mdp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
index fa3a460f8e2f4ddd08d735c481e12466d86c6dca..8e8337e8b072252d416a497f233c8aa9a6f04ae4 100644 (file)
@@ -1630,7 +1630,6 @@ sis900_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
  *     sis900_interrupt - sis900 interrupt handler
  *     @irq: the irq number
  *     @dev_instance: the client data object
- *     @regs: snapshot of processor context
  *
  *     The interrupt handler does all of the Rx thread work,
  *     and cleans up after the Tx thread
index 5051554ff05b06f6c90c0a7f2ed006b96e3fafc0..9a16a79b67d0d432f1bcf629dfba358e2a7cf918 100644 (file)
@@ -1735,7 +1735,7 @@ static const struct ethtool_ops smc911x_ethtool_ops = {
  * This routine has a simple purpose -- make the SMC chip generate an
  * interrupt, so an auto-detect routine can detect it, and find the IRQ,
  */
-static int __init smc911x_findirq(struct net_device *dev)
+static int __devinit smc911x_findirq(struct net_device *dev)
 {
        struct smc911x_local *lp = netdev_priv(dev);
        int timeout = 20;
@@ -1799,7 +1799,7 @@ static int __init smc911x_findirq(struct net_device *dev)
  * o  actually GRAB the irq.
  * o  GRAB the region
  */
-static int __init smc911x_probe(struct net_device *dev)
+static int __devinit smc911x_probe(struct net_device *dev)
 {
        struct smc911x_local *lp = netdev_priv(dev);
        int i, retval;
@@ -1813,7 +1813,7 @@ static int __init smc911x_probe(struct net_device *dev)
        val = SMC_GET_BYTE_TEST(lp);
        DBG(SMC_DEBUG_MISC, "%s: endian probe returned 0x%04x\n", CARDNAME, val);
        if (val != 0x87654321) {
-               printk(KERN_ERR "Invalid chip endian 0x08%x\n",val);
+               printk(KERN_ERR "Invalid chip endian 0x%08x\n",val);
                retval = -ENODEV;
                goto err_out;
        }
@@ -2048,9 +2048,11 @@ err_out:
  *      0 --> there is a device
  *      anything else, error
  */
-static int smc911x_drv_probe(struct platform_device *pdev)
+static int __devinit smc911x_drv_probe(struct platform_device *pdev)
 {
+#ifdef SMC_DYNAMIC_BUS_CONFIG
        struct smc911x_platdata *pd = pdev->dev.platform_data;
+#endif
        struct net_device *ndev;
        struct resource *res;
        struct smc911x_local *lp;
@@ -2122,7 +2124,7 @@ out:
        return ret;
 }
 
-static int smc911x_drv_remove(struct platform_device *pdev)
+static int __devexit smc911x_drv_remove(struct platform_device *pdev)
 {
        struct net_device *ndev = platform_get_drvdata(pdev);
        struct smc911x_local *lp = netdev_priv(ndev);
@@ -2182,9 +2184,9 @@ static int smc911x_drv_resume(struct platform_device *dev)
 
                if (netif_running(ndev)) {
                        smc911x_reset(ndev);
-                       smc911x_enable(ndev);
                        if (lp->phy_type != 0)
                                smc911x_phy_configure(&lp->phy_configure);
+                       smc911x_enable(ndev);
                        netif_device_attach(ndev);
                }
        }
@@ -2193,7 +2195,7 @@ static int smc911x_drv_resume(struct platform_device *dev)
 
 static struct platform_driver smc911x_driver = {
        .probe           = smc911x_drv_probe,
-       .remove  = smc911x_drv_remove,
+       .remove  = __devexit_p(smc911x_drv_remove),
        .suspend         = smc911x_drv_suspend,
        .resume  = smc911x_drv_resume,
        .driver  = {
index fc80f250da31e8940bcc2d89d781de5eca66d7f2..35c56abf4113193490c3ca4a91f1f12077e9eb13 100644 (file)
@@ -1696,7 +1696,7 @@ static const struct ethtool_ops smc_ethtool_ops = {
  * I just deleted auto_irq.c, since it was never built...
  *   --jgarzik
  */
-static int __init smc_findirq(struct smc_local *lp)
+static int __devinit smc_findirq(struct smc_local *lp)
 {
        void __iomem *ioaddr = lp->base;
        int timeout = 20;
@@ -1770,7 +1770,7 @@ static int __init smc_findirq(struct smc_local *lp)
  * o  actually GRAB the irq.
  * o  GRAB the region
  */
-static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr,
+static int __devinit smc_probe(struct net_device *dev, void __iomem *ioaddr,
                            unsigned long irq_flags)
 {
        struct smc_local *lp = netdev_priv(dev);
@@ -2126,7 +2126,7 @@ static void smc_release_datacs(struct platform_device *pdev, struct net_device *
  *     0 --> there is a device
  *     anything else, error
  */
-static int smc_drv_probe(struct platform_device *pdev)
+static int __devinit smc_drv_probe(struct platform_device *pdev)
 {
        struct smc91x_platdata *pd = pdev->dev.platform_data;
        struct smc_local *lp;
@@ -2240,7 +2240,7 @@ static int smc_drv_probe(struct platform_device *pdev)
        return ret;
 }
 
-static int smc_drv_remove(struct platform_device *pdev)
+static int __devexit smc_drv_remove(struct platform_device *pdev)
 {
        struct net_device *ndev = platform_get_drvdata(pdev);
        struct smc_local *lp = netdev_priv(ndev);
@@ -2305,7 +2305,7 @@ static int smc_drv_resume(struct platform_device *dev)
 
 static struct platform_driver smc_driver = {
        .probe          = smc_drv_probe,
-       .remove         = smc_drv_remove,
+       .remove         = __devexit_p(smc_drv_remove),
        .suspend        = smc_drv_suspend,
        .resume         = smc_drv_resume,
        .driver         = {
index b6435d0d71f9a067f887f7102159ae0d9a651ed5..07599b492359f16bc348f4271eb32793a3a362e0 100644 (file)
@@ -672,7 +672,6 @@ write_hash:
 /**
  * spider_net_prepare_tx_descr - fill tx descriptor with skb data
  * @card: card structure
- * @descr: descriptor structure to fill out
  * @skb: packet to use
  *
  * returns 0 on success, <0 on failure.
@@ -867,7 +866,6 @@ spider_net_release_tx_chain(struct spider_net_card *card, int brutal)
 /**
  * spider_net_kick_tx_dma - enables TX DMA processing
  * @card: card structure
- * @descr: descriptor address to enable TX processing at
  *
  * This routine will start the transmit DMA running if
  * it is not already running. This routine ned only be
@@ -1637,7 +1635,6 @@ spider_net_handle_error_irq(struct spider_net_card *card, u32 status_reg,
  * spider_net_interrupt - interrupt handler for spider_net
  * @irq: interrupt number
  * @ptr: pointer to net_device
- * @regs: PU registers
  *
  * returns IRQ_HANDLED, if interrupt was for driver, or IRQ_NONE, if no
  * interrupt found raised by card.
@@ -2419,7 +2416,6 @@ spider_net_undo_pci_setup(struct spider_net_card *card)
 
 /**
  * spider_net_setup_pci_dev - sets up the device in terms of PCI operations
- * @card: card structure
  * @pdev: PCI device
  *
  * Returns the card structure or NULL if any errors occur
index 1d2ef8f47780904da79f621bf2ac09d284b50753..5a40f2d78beb1a9114478ac9e0385556c29d30bf 100644 (file)
@@ -1509,6 +1509,11 @@ static int __netdev_rx(struct net_device *dev, int *quota)
                desc->status = 0;
                np->rx_done = (np->rx_done + 1) % DONE_Q_SIZE;
        }
+
+       if (*quota == 0) {      /* out of rx quota */
+               retcode = 1;
+               goto out;
+       }
        writew(np->rx_done, np->base + CompletionQConsumerIdx);
 
  out:
index 4291458955ef7ac9ae1cf5201b3e72a998d61bde..fed7eba65ead6268e292eddc66c73905d8e263c7 100644 (file)
@@ -1142,6 +1142,70 @@ static int gem_start_xmit(struct sk_buff *skb, struct net_device *dev)
        return NETDEV_TX_OK;
 }
 
+static void gem_pcs_reset(struct gem *gp)
+{
+       int limit;
+       u32 val;
+
+       /* Reset PCS unit. */
+       val = readl(gp->regs + PCS_MIICTRL);
+       val |= PCS_MIICTRL_RST;
+       writel(val, gp->regs + PCS_MIICTRL);
+
+       limit = 32;
+       while (readl(gp->regs + PCS_MIICTRL) & PCS_MIICTRL_RST) {
+               udelay(100);
+               if (limit-- <= 0)
+                       break;
+       }
+       if (limit <= 0)
+               printk(KERN_WARNING "%s: PCS reset bit would not clear.\n",
+                      gp->dev->name);
+}
+
+static void gem_pcs_reinit_adv(struct gem *gp)
+{
+       u32 val;
+
+       /* Make sure PCS is disabled while changing advertisement
+        * configuration.
+        */
+       val = readl(gp->regs + PCS_CFG);
+       val &= ~(PCS_CFG_ENABLE | PCS_CFG_TO);
+       writel(val, gp->regs + PCS_CFG);
+
+       /* Advertise all capabilities except assymetric
+        * pause.
+        */
+       val = readl(gp->regs + PCS_MIIADV);
+       val |= (PCS_MIIADV_FD | PCS_MIIADV_HD |
+               PCS_MIIADV_SP | PCS_MIIADV_AP);
+       writel(val, gp->regs + PCS_MIIADV);
+
+       /* Enable and restart auto-negotiation, disable wrapback/loopback,
+        * and re-enable PCS.
+        */
+       val = readl(gp->regs + PCS_MIICTRL);
+       val |= (PCS_MIICTRL_RAN | PCS_MIICTRL_ANE);
+       val &= ~PCS_MIICTRL_WB;
+       writel(val, gp->regs + PCS_MIICTRL);
+
+       val = readl(gp->regs + PCS_CFG);
+       val |= PCS_CFG_ENABLE;
+       writel(val, gp->regs + PCS_CFG);
+
+       /* Make sure serialink loopback is off.  The meaning
+        * of this bit is logically inverted based upon whether
+        * you are in Serialink or SERDES mode.
+        */
+       val = readl(gp->regs + PCS_SCTRL);
+       if (gp->phy_type == phy_serialink)
+               val &= ~PCS_SCTRL_LOOP;
+       else
+               val |= PCS_SCTRL_LOOP;
+       writel(val, gp->regs + PCS_SCTRL);
+}
+
 #define STOP_TRIES 32
 
 /* Must be invoked under gp->lock and gp->tx_lock. */
@@ -1168,6 +1232,9 @@ static void gem_reset(struct gem *gp)
 
        if (limit <= 0)
                printk(KERN_ERR "%s: SW reset is ghetto.\n", gp->dev->name);
+
+       if (gp->phy_type == phy_serialink || gp->phy_type == phy_serdes)
+               gem_pcs_reinit_adv(gp);
 }
 
 /* Must be invoked under gp->lock and gp->tx_lock. */
@@ -1324,7 +1391,7 @@ static int gem_set_link_modes(struct gem *gp)
                   gp->phy_type == phy_serdes) {
                u32 pcs_lpa = readl(gp->regs + PCS_MIILP);
 
-               if (pcs_lpa & PCS_MIIADV_FD)
+               if ((pcs_lpa & PCS_MIIADV_FD) || gp->phy_type == phy_serdes)
                        full_duplex = 1;
                speed = SPEED_1000;
        }
@@ -1488,6 +1555,9 @@ static void gem_link_timer(unsigned long data)
                        val = readl(gp->regs + PCS_MIISTAT);
 
                if ((val & PCS_MIISTAT_LS) != 0) {
+                       if (gp->lstate == link_up)
+                               goto restart;
+
                        gp->lstate = link_up;
                        netif_carrier_on(gp->dev);
                        (void)gem_set_link_modes(gp);
@@ -1708,61 +1778,8 @@ static void gem_init_phy(struct gem *gp)
                if (gp->phy_mii.def && gp->phy_mii.def->ops->init)
                        gp->phy_mii.def->ops->init(&gp->phy_mii);
        } else {
-               u32 val;
-               int limit;
-
-               /* Reset PCS unit. */
-               val = readl(gp->regs + PCS_MIICTRL);
-               val |= PCS_MIICTRL_RST;
-               writeb(val, gp->regs + PCS_MIICTRL);
-
-               limit = 32;
-               while (readl(gp->regs + PCS_MIICTRL) & PCS_MIICTRL_RST) {
-                       udelay(100);
-                       if (limit-- <= 0)
-                               break;
-               }
-               if (limit <= 0)
-                       printk(KERN_WARNING "%s: PCS reset bit would not clear.\n",
-                              gp->dev->name);
-
-               /* Make sure PCS is disabled while changing advertisement
-                * configuration.
-                */
-               val = readl(gp->regs + PCS_CFG);
-               val &= ~(PCS_CFG_ENABLE | PCS_CFG_TO);
-               writel(val, gp->regs + PCS_CFG);
-
-               /* Advertise all capabilities except assymetric
-                * pause.
-                */
-               val = readl(gp->regs + PCS_MIIADV);
-               val |= (PCS_MIIADV_FD | PCS_MIIADV_HD |
-                       PCS_MIIADV_SP | PCS_MIIADV_AP);
-               writel(val, gp->regs + PCS_MIIADV);
-
-               /* Enable and restart auto-negotiation, disable wrapback/loopback,
-                * and re-enable PCS.
-                */
-               val = readl(gp->regs + PCS_MIICTRL);
-               val |= (PCS_MIICTRL_RAN | PCS_MIICTRL_ANE);
-               val &= ~PCS_MIICTRL_WB;
-               writel(val, gp->regs + PCS_MIICTRL);
-
-               val = readl(gp->regs + PCS_CFG);
-               val |= PCS_CFG_ENABLE;
-               writel(val, gp->regs + PCS_CFG);
-
-               /* Make sure serialink loopback is off.  The meaning
-                * of this bit is logically inverted based upon whether
-                * you are in Serialink or SERDES mode.
-                */
-               val = readl(gp->regs + PCS_SCTRL);
-               if (gp->phy_type == phy_serialink)
-                       val &= ~PCS_SCTRL_LOOP;
-               else
-                       val |= PCS_SCTRL_LOOP;
-               writel(val, gp->regs + PCS_SCTRL);
+               gem_pcs_reset(gp);
+               gem_pcs_reinit_adv(gp);
        }
 
        /* Default aneg parameters */
@@ -2680,6 +2697,21 @@ static int gem_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
                cmd->speed = 0;
                cmd->duplex = cmd->port = cmd->phy_address =
                        cmd->transceiver = cmd->autoneg = 0;
+
+               /* serdes means usually a Fibre connector, with most fixed */
+               if (gp->phy_type == phy_serdes) {
+                       cmd->port = PORT_FIBRE;
+                       cmd->supported = (SUPPORTED_1000baseT_Half |
+                               SUPPORTED_1000baseT_Full |
+                               SUPPORTED_FIBRE | SUPPORTED_Autoneg |
+                               SUPPORTED_Pause | SUPPORTED_Asym_Pause);
+                       cmd->advertising = cmd->supported;
+                       cmd->transceiver = XCVR_INTERNAL;
+                       if (gp->lstate == link_up)
+                               cmd->speed = SPEED_1000;
+                       cmd->duplex = DUPLEX_FULL;
+                       cmd->autoneg = 1;
+               }
        }
        cmd->maxtxpkt = cmd->maxrxpkt = 0;
 
index c41d68761364550ebe2d2d8376f2a8c293b5d799..e60498232b94f83dede6c6d4ae153d8d135d7b19 100644 (file)
@@ -1098,6 +1098,7 @@ static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
        dma_addr_t      tail_list_phys;
        u8              *tail_buffer;
        unsigned long   flags;
+       unsigned int    txlen;
 
        if ( ! priv->phyOnline ) {
                TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT:  %s PHY is not ready\n",
@@ -1108,6 +1109,7 @@ static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
 
        if (skb_padto(skb, TLAN_MIN_FRAME_SIZE))
                return 0;
+       txlen = max(skb->len, (unsigned int)TLAN_MIN_FRAME_SIZE);
 
        tail_list = priv->txList + priv->txTail;
        tail_list_phys = priv->txListDMA + sizeof(TLanList) * priv->txTail;
@@ -1125,16 +1127,16 @@ static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
 
        if ( bbuf ) {
                tail_buffer = priv->txBuffer + ( priv->txTail * TLAN_MAX_FRAME_SIZE );
-               skb_copy_from_linear_data(skb, tail_buffer, skb->len);
+               skb_copy_from_linear_data(skb, tail_buffer, txlen);
        } else {
                tail_list->buffer[0].address = pci_map_single(priv->pciDev,
-                                                             skb->data, skb->len,
+                                                             skb->data, txlen,
                                                              PCI_DMA_TODEVICE);
                TLan_StoreSKB(tail_list, skb);
        }
 
-       tail_list->frameSize = (u16) skb->len;
-       tail_list->buffer[0].count = TLAN_LAST_BUFFER | (u32) skb->len;
+       tail_list->frameSize = (u16) txlen;
+       tail_list->buffer[0].count = TLAN_LAST_BUFFER | (u32) txlen;
        tail_list->buffer[1].count = 0;
        tail_list->buffer[1].address = 0;
 
@@ -1431,7 +1433,9 @@ static u32 TLan_HandleTxEOF( struct net_device *dev, u16 host_int )
                if ( ! bbuf ) {
                        struct sk_buff *skb = TLan_GetSKB(head_list);
                        pci_unmap_single(priv->pciDev, head_list->buffer[0].address,
-                                        skb->len, PCI_DMA_TODEVICE);
+                                        max(skb->len,
+                                            (unsigned int)TLAN_MIN_FRAME_SIZE),
+                                        PCI_DMA_TODEVICE);
                        dev_kfree_skb_any(skb);
                        head_list->buffer[8].address = 0;
                        head_list->buffer[9].address = 0;
@@ -2055,9 +2059,12 @@ static void TLan_FreeLists( struct net_device *dev )
                        list = priv->txList + i;
                        skb = TLan_GetSKB(list);
                        if ( skb ) {
-                               pci_unmap_single(priv->pciDev,
-                                                list->buffer[0].address, skb->len,
-                                                PCI_DMA_TODEVICE);
+                               pci_unmap_single(
+                                       priv->pciDev,
+                                       list->buffer[0].address,
+                                       max(skb->len,
+                                           (unsigned int)TLAN_MIN_FRAME_SIZE),
+                                       PCI_DMA_TODEVICE);
                                dev_kfree_skb_any( skb );
                                list->buffer[8].address = 0;
                                list->buffer[9].address = 0;
index 85f38a6b6a49f9d744a1c90785042d16845910db..68a7f5414133d230bcb36b54a9e9ac4d626b8a08 100644 (file)
@@ -323,17 +323,17 @@ static void uec_get_ethtool_stats(struct net_device *netdev,
        if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_HARDWARE) {
                base = (u32 __iomem *)&ugeth->ug_regs->tx64;
                for (i = 0; i < UEC_HW_STATS_LEN; i++)
-                       data[j++] = (u64)in_be32(&base[i]);
+                       data[j++] = in_be32(&base[i]);
        }
        if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_TX) {
                base = (u32 __iomem *)ugeth->p_tx_fw_statistics_pram;
                for (i = 0; i < UEC_TX_FW_STATS_LEN; i++)
-                       data[j++] = (u64)in_be32(&base[i]);
+                       data[j++] = base ? in_be32(&base[i]) : 0;
        }
        if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_RX) {
                base = (u32 __iomem *)ugeth->p_rx_fw_statistics_pram;
                for (i = 0; i < UEC_RX_FW_STATS_LEN; i++)
-                       data[j++] = (u64)in_be32(&base[i]);
+                       data[j++] = base ? in_be32(&base[i]) : 0;
        }
 }
 
index 37ecf845edfe9b91c5a6aee4ef514ad713e541ea..de57490103fcd05e58a8610d7fb77b3dbc0ffc20 100644 (file)
@@ -1102,12 +1102,14 @@ static int ax88178_link_reset(struct usbnet *dev)
        mode = AX88178_MEDIUM_DEFAULT;
 
        if (ecmd.speed == SPEED_1000)
-               mode |= AX_MEDIUM_GM | AX_MEDIUM_ENCK;
+               mode |= AX_MEDIUM_GM;
        else if (ecmd.speed == SPEED_100)
                mode |= AX_MEDIUM_PS;
        else
                mode &= ~(AX_MEDIUM_PS | AX_MEDIUM_GM);
 
+       mode |= AX_MEDIUM_ENCK;
+
        if (ecmd.duplex == DUPLEX_FULL)
                mode |= AX_MEDIUM_FD;
        else
@@ -1444,6 +1446,10 @@ static const struct usb_device_id        products [] = {
        // Apple USB Ethernet Adapter
        USB_DEVICE(0x05ac, 0x1402),
        .driver_info = (unsigned long) &ax88772_info,
+}, {
+       // Cables-to-Go USB Ethernet Adapter
+       USB_DEVICE(0x0b95, 0x772a),
+       .driver_info = (unsigned long) &ax88772_info,
 },
        { },            // END
 };
index 3590ea5a902da1d6619cf62207fc071fa1e4e35b..11cb3e504e1cb43e16c4eb5b81dda369ab4c75c1 100644 (file)
@@ -2296,7 +2296,7 @@ static void velocity_set_multi(struct net_device *dev)
                }
 
                mac_set_cam_mask(regs, vptr->mCAMmask);
-               rx_mode = (RCR_AM | RCR_AB);
+               rx_mode = RCR_AM | RCR_AB | RCR_AP;
        }
        if (dev->mtu > 1500)
                rx_mode |= RCR_AL;
index cfd4d052d666ea8cbda45b37c541cb2592dad3a0..2d14255eb103d60096256eee89c78bbfe68f8550 100644 (file)
@@ -240,6 +240,10 @@ static u64 ath5k_get_tsf(struct ieee80211_hw *hw);
 static void ath5k_reset_tsf(struct ieee80211_hw *hw);
 static int ath5k_beacon_update(struct ieee80211_hw *hw,
                struct sk_buff *skb);
+static void ath5k_bss_info_changed(struct ieee80211_hw *hw,
+               struct ieee80211_vif *vif,
+               struct ieee80211_bss_conf *bss_conf,
+               u32 changes);
 
 static struct ieee80211_ops ath5k_hw_ops = {
        .tx             = ath5k_tx,
@@ -256,6 +260,7 @@ static struct ieee80211_ops ath5k_hw_ops = {
        .get_tx_stats   = ath5k_get_tx_stats,
        .get_tsf        = ath5k_get_tsf,
        .reset_tsf      = ath5k_reset_tsf,
+       .bss_info_changed = ath5k_bss_info_changed,
 };
 
 /*
@@ -2942,7 +2947,7 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw,
                sc->opmode != NL80211_IFTYPE_MESH_POINT &&
                test_bit(ATH_STAT_PROMISC, sc->status))
                rfilt |= AR5K_RX_FILTER_PROM;
-       if (sc->opmode == NL80211_IFTYPE_STATION ||
+       if ((sc->opmode == NL80211_IFTYPE_STATION && sc->assoc) ||
                sc->opmode == NL80211_IFTYPE_ADHOC) {
                rfilt |= AR5K_RX_FILTER_BEACON;
        }
@@ -3083,4 +3088,32 @@ ath5k_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
 end:
        return ret;
 }
+static void
+set_beacon_filter(struct ieee80211_hw *hw, bool enable)
+{
+       struct ath5k_softc *sc = hw->priv;
+       struct ath5k_hw *ah = sc->ah;
+       u32 rfilt;
+       rfilt = ath5k_hw_get_rx_filter(ah);
+       if (enable)
+               rfilt |= AR5K_RX_FILTER_BEACON;
+       else
+               rfilt &= ~AR5K_RX_FILTER_BEACON;
+       ath5k_hw_set_rx_filter(ah, rfilt);
+       sc->filter_flags = rfilt;
+}
 
+static void ath5k_bss_info_changed(struct ieee80211_hw *hw,
+                                   struct ieee80211_vif *vif,
+                                   struct ieee80211_bss_conf *bss_conf,
+                                   u32 changes)
+{
+       struct ath5k_softc *sc = hw->priv;
+       if (changes & BSS_CHANGED_ASSOC) {
+               mutex_lock(&sc->lock);
+               sc->assoc = bss_conf->assoc;
+               if (sc->opmode == NL80211_IFTYPE_STATION)
+                       set_beacon_filter(hw, sc->assoc);
+               mutex_unlock(&sc->lock);
+       }
+}
index 06d1054ca94b9cc525ee4f9516c5363b26d39fa2..facc60ddada2824ceba476c8efcda1a66a398a1d 100644 (file)
@@ -179,6 +179,7 @@ struct ath5k_softc {
 
        struct timer_list       calib_tim;      /* calibration timer */
        int                     power_level;    /* Requested tx power in dbm */
+       bool                    assoc;          /* assocate state */
 };
 
 #define ath5k_hw_hasbssidmask(_ah) \
index 19980cbd5d5fe6292367733c9423faffe735aaae..ccaeb5c219d2ddda8ea8e7f160a8f9a472c8c89a 100644 (file)
@@ -417,19 +417,19 @@ ath5k_debug_init_device(struct ath5k_softc *sc)
        sc->debug.debugfs_phydir = debugfs_create_dir(wiphy_name(sc->hw->wiphy),
                                ath5k_global_debugfs);
 
-       sc->debug.debugfs_debug = debugfs_create_file("debug", 0666,
+       sc->debug.debugfs_debug = debugfs_create_file("debug", S_IWUSR | S_IRUGO,
                                sc->debug.debugfs_phydir, sc, &fops_debug);
 
-       sc->debug.debugfs_registers = debugfs_create_file("registers", 0444,
+       sc->debug.debugfs_registers = debugfs_create_file("registers", S_IRUGO,
                                sc->debug.debugfs_phydir, sc, &fops_registers);
 
-       sc->debug.debugfs_tsf = debugfs_create_file("tsf", 0666,
+       sc->debug.debugfs_tsf = debugfs_create_file("tsf", S_IWUSR | S_IRUGO,
                                sc->debug.debugfs_phydir, sc, &fops_tsf);
 
-       sc->debug.debugfs_beacon = debugfs_create_file("beacon", 0666,
+       sc->debug.debugfs_beacon = debugfs_create_file("beacon", S_IWUSR | S_IRUGO,
                                sc->debug.debugfs_phydir, sc, &fops_beacon);
 
-       sc->debug.debugfs_reset = debugfs_create_file("reset", 0222,
+       sc->debug.debugfs_reset = debugfs_create_file("reset", S_IWUSR,
                                sc->debug.debugfs_phydir, sc, &fops_reset);
 }
 
index 9e15c30bbc065bcb0326ffee6860efda07242f64..4dd1c1bda0fb80958b16066d882d86c7219a3b3e 100644 (file)
@@ -170,7 +170,7 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id)
        skb = (struct sk_buff *)bf->bf_mpdu;
        if (skb) {
                pci_unmap_single(sc->pdev, bf->bf_dmacontext,
-                                skb_end_pointer(skb) - skb->head,
+                                skb->len,
                                 PCI_DMA_TODEVICE);
        }
 
@@ -193,7 +193,7 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id)
 
        bf->bf_buf_addr = bf->bf_dmacontext =
                pci_map_single(sc->pdev, skb->data,
-                              skb_end_pointer(skb) - skb->head,
+                              skb->len,
                               PCI_DMA_TODEVICE);
 
        skb = ieee80211_get_buffered_bc(sc->hw, avp->av_if_data);
@@ -352,7 +352,7 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
        if (bf->bf_mpdu != NULL) {
                skb = (struct sk_buff *)bf->bf_mpdu;
                pci_unmap_single(sc->pdev, bf->bf_dmacontext,
-                                skb_end_pointer(skb) - skb->head,
+                                skb->len,
                                 PCI_DMA_TODEVICE);
                dev_kfree_skb_any(skb);
                bf->bf_mpdu = NULL;
@@ -412,7 +412,7 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
 
        bf->bf_buf_addr = bf->bf_dmacontext =
                pci_map_single(sc->pdev, skb->data,
-                              skb_end_pointer(skb) - skb->head,
+                              skb->len,
                               PCI_DMA_TODEVICE);
        bf->bf_mpdu = skb;
 
@@ -439,7 +439,7 @@ void ath_beacon_return(struct ath_softc *sc, struct ath_vap *avp)
                if (bf->bf_mpdu != NULL) {
                        struct sk_buff *skb = (struct sk_buff *)bf->bf_mpdu;
                        pci_unmap_single(sc->pdev, bf->bf_dmacontext,
-                                        skb_end_pointer(skb) - skb->head,
+                                        skb->len,
                                         PCI_DMA_TODEVICE);
                        dev_kfree_skb_any(skb);
                        bf->bf_mpdu = NULL;
index 4983402af559871f8ed526480794235dfc37959e..504a0444d89f853672a4abd71886cc17e3068ff9 100644 (file)
@@ -49,10 +49,12 @@ static void ath_rx_buf_link(struct ath_softc *sc, struct ath_buf *bf)
        ASSERT(skb != NULL);
        ds->ds_vdata = skb->data;
 
-       /* setup rx descriptors */
+       /* setup rx descriptors. The sc_rxbufsize here tells the harware
+        * how much data it can DMA to us and that we are prepared
+        * to process */
        ath9k_hw_setuprxdesc(ah,
                             ds,
-                            skb_tailroom(skb),   /* buffer size */
+                            sc->sc_rxbufsize,
                             0);
 
        if (sc->sc_rxlink == NULL)
@@ -398,6 +400,13 @@ static struct sk_buff *ath_rxbuf_alloc(struct ath_softc *sc,
         * in rx'd frames.
         */
 
+       /* Note: the kernel can allocate a value greater than
+        * what we ask it to give us. We really only need 4 KB as that
+        * is this hardware supports and in fact we need at least 3849
+        * as that is the MAX AMSDU size this hardware supports.
+        * Unfortunately this means we may get 8 KB here from the
+        * kernel... and that is actually what is observed on some
+        * systems :( */
        skb = dev_alloc_skb(len + sc->sc_cachelsz - 1);
        if (skb != NULL) {
                off = ((unsigned long) skb->data) % sc->sc_cachelsz;
@@ -456,7 +465,7 @@ static int ath_rx_indicate(struct ath_softc *sc,
        if (nskb != NULL) {
                bf->bf_mpdu = nskb;
                bf->bf_buf_addr = pci_map_single(sc->pdev, nskb->data,
-                                        skb_end_pointer(nskb) - nskb->head,
+                                        sc->sc_rxbufsize,
                                         PCI_DMA_FROMDEVICE);
                bf->bf_dmacontext = bf->bf_buf_addr;
                ATH_RX_CONTEXT(nskb)->ctx_rxbuf = bf;
@@ -542,7 +551,7 @@ int ath_rx_init(struct ath_softc *sc, int nbufs)
 
                        bf->bf_mpdu = skb;
                        bf->bf_buf_addr = pci_map_single(sc->pdev, skb->data,
-                                        skb_end_pointer(skb) - skb->head,
+                                        sc->sc_rxbufsize,
                                         PCI_DMA_FROMDEVICE);
                        bf->bf_dmacontext = bf->bf_buf_addr;
                        ATH_RX_CONTEXT(skb)->ctx_rxbuf = bf;
@@ -1007,7 +1016,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush)
 
                pci_dma_sync_single_for_cpu(sc->pdev,
                                            bf->bf_buf_addr,
-                                           skb_tailroom(skb),
+                                           sc->sc_rxbufsize,
                                            PCI_DMA_FROMDEVICE);
                pci_unmap_single(sc->pdev,
                                 bf->bf_buf_addr,
index ffdf4876121b60829dd9634f1fcc45f7d06fc24b..a68f97c3935947a59990d188f7d95d05b19c600c 100644 (file)
@@ -918,9 +918,12 @@ struct hostap_interface {
 
 /*
  * TX meta data - stored in skb->cb buffer, so this must not be increased over
- * the 40-byte limit
+ * the 48-byte limit.
+ * THE PADDING THIS STARTS WITH IS A HORRIBLE HACK THAT SHOULD NOT LIVE
+ * TO SEE THE DAY.
  */
 struct hostap_skb_tx_data {
+       unsigned int __padding_for_default_qdiscs;
        u32 magic; /* HOSTAP_SKB_TX_DATA_MAGIC */
        u8 rate; /* transmit rate */
 #define HOSTAP_TX_FLAGS_WDS BIT(0)
index dcce3542d5a771d9eb24753d8d464854bb4e6639..7a9f901d4ff6dee5cf15ae78d0f9bb763344bdd7 100644 (file)
@@ -3897,6 +3897,7 @@ static int ipw_disassociate(void *data)
        if (!(priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING)))
                return 0;
        ipw_send_disassociate(data, 0);
+       netif_carrier_off(priv->net_dev);
        return 1;
 }
 
@@ -10190,6 +10191,9 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
        u16 remaining_bytes;
        int fc;
 
+       if (!(priv->status & STATUS_ASSOCIATED))
+               goto drop;
+
        hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));
        switch (priv->ieee->iw_mode) {
        case IW_MODE_ADHOC:
index 8d690a0eb1a967722508942d9fdd90225c98be47..c4c0371c763b5d3b0e1ee13bfd1fcc1a386a6a6f 100644 (file)
@@ -1384,9 +1384,11 @@ void iwl_rx_handle(struct iwl_priv *priv)
 
                rxq->queue[i] = NULL;
 
-               pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->dma_addr,
-                                           priv->hw_params.rx_buf_size,
-                                           PCI_DMA_FROMDEVICE);
+               dma_sync_single_range_for_cpu(
+                               &priv->pci_dev->dev, rxb->real_dma_addr,
+                               rxb->aligned_dma_addr - rxb->real_dma_addr,
+                               priv->hw_params.rx_buf_size,
+                               PCI_DMA_FROMDEVICE);
                pkt = (struct iwl_rx_packet *)rxb->skb->data;
 
                /* Reclaim a command buffer only if this packet is a response
@@ -1436,8 +1438,8 @@ void iwl_rx_handle(struct iwl_priv *priv)
                        rxb->skb = NULL;
                }
 
-               pci_unmap_single(priv->pci_dev, rxb->dma_addr,
-                                priv->hw_params.rx_buf_size,
+               pci_unmap_single(priv->pci_dev, rxb->real_dma_addr,
+                                priv->hw_params.rx_buf_size + 256,
                                 PCI_DMA_FROMDEVICE);
                spin_lock_irqsave(&rxq->lock, flags);
                list_add_tail(&rxb->list, &priv->rxq.rx_used);
@@ -2341,7 +2343,6 @@ static void iwl_bg_alive_start(struct work_struct *data)
        mutex_lock(&priv->mutex);
        iwl_alive_start(priv);
        mutex_unlock(&priv->mutex);
-       ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
 }
 
 static void iwl4965_bg_rf_kill(struct work_struct *work)
index 4c312c55f90cf49838af8954e0e891a0893af99c..01a84585133834a45c603a0c55763b7864441181 100644 (file)
@@ -290,6 +290,9 @@ void iwl_clear_stations_table(struct iwl_priv *priv)
        priv->num_stations = 0;
        memset(priv->stations, 0, sizeof(priv->stations));
 
+       /* clean ucode key table bit map */
+       priv->ucode_key_table = 0;
+
        spin_unlock_irqrestore(&priv->sta_lock, flags);
 }
 EXPORT_SYMBOL(iwl_clear_stations_table);
index c018121085e937dd210d2048f549f6cbcf6b0dfd..9966d4e384ce75d37264345431be2122a5304c68 100644 (file)
@@ -89,7 +89,8 @@ extern struct iwl_cfg iwl5100_abg_cfg;
 #define        DEFAULT_LONG_RETRY_LIMIT  4U
 
 struct iwl_rx_mem_buffer {
-       dma_addr_t dma_addr;
+       dma_addr_t real_dma_addr;
+       dma_addr_t aligned_dma_addr;
        struct sk_buff *skb;
        struct list_head list;
 };
index 7cde9d76ff5df438b335996f1b602cf4e14dd9dc..0509c16dbe758b32e1a23db7da1a09100493b0c8 100644 (file)
@@ -204,7 +204,7 @@ int iwl_rx_queue_restock(struct iwl_priv *priv)
                list_del(element);
 
                /* Point to Rx buffer via next RBD in circular buffer */
-               rxq->bd[rxq->write] = iwl_dma_addr2rbd_ptr(priv, rxb->dma_addr);
+               rxq->bd[rxq->write] = iwl_dma_addr2rbd_ptr(priv, rxb->aligned_dma_addr);
                rxq->queue[rxq->write] = rxb;
                rxq->write = (rxq->write + 1) & RX_QUEUE_MASK;
                rxq->free_count--;
@@ -251,7 +251,7 @@ void iwl_rx_allocate(struct iwl_priv *priv)
                rxb = list_entry(element, struct iwl_rx_mem_buffer, list);
 
                /* Alloc a new receive buffer */
-               rxb->skb = alloc_skb(priv->hw_params.rx_buf_size,
+               rxb->skb = alloc_skb(priv->hw_params.rx_buf_size + 256,
                                __GFP_NOWARN | GFP_ATOMIC);
                if (!rxb->skb) {
                        if (net_ratelimit())
@@ -266,9 +266,17 @@ void iwl_rx_allocate(struct iwl_priv *priv)
                list_del(element);
 
                /* Get physical address of RB/SKB */
-               rxb->dma_addr =
-                   pci_map_single(priv->pci_dev, rxb->skb->data,
-                          priv->hw_params.rx_buf_size, PCI_DMA_FROMDEVICE);
+               rxb->real_dma_addr = pci_map_single(
+                                       priv->pci_dev,
+                                       rxb->skb->data,
+                                       priv->hw_params.rx_buf_size + 256,
+                                       PCI_DMA_FROMDEVICE);
+               /* dma address must be no more than 36 bits */
+               BUG_ON(rxb->real_dma_addr & ~DMA_BIT_MASK(36));
+               /* and also 256 byte aligned! */
+               rxb->aligned_dma_addr = ALIGN(rxb->real_dma_addr, 256);
+               skb_reserve(rxb->skb, rxb->aligned_dma_addr - rxb->real_dma_addr);
+
                list_add_tail(&rxb->list, &rxq->rx_free);
                rxq->free_count++;
        }
@@ -300,8 +308,8 @@ void iwl_rx_queue_free(struct iwl_priv *priv, struct iwl_rx_queue *rxq)
        for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) {
                if (rxq->pool[i].skb != NULL) {
                        pci_unmap_single(priv->pci_dev,
-                                        rxq->pool[i].dma_addr,
-                                        priv->hw_params.rx_buf_size,
+                                        rxq->pool[i].real_dma_addr,
+                                        priv->hw_params.rx_buf_size + 256,
                                         PCI_DMA_FROMDEVICE);
                        dev_kfree_skb(rxq->pool[i].skb);
                }
@@ -354,8 +362,8 @@ void iwl_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq)
                 * to an SKB, so we need to unmap and free potential storage */
                if (rxq->pool[i].skb != NULL) {
                        pci_unmap_single(priv->pci_dev,
-                                        rxq->pool[i].dma_addr,
-                                        priv->hw_params.rx_buf_size,
+                                        rxq->pool[i].real_dma_addr,
+                                        priv->hw_params.rx_buf_size + 256,
                                         PCI_DMA_FROMDEVICE);
                        priv->alloc_rxb_skb--;
                        dev_kfree_skb(rxq->pool[i].skb);
index 61797f3f8d5c9a475b85d7fb980fe6a16dbb804a..26f7084d3011b7f8f514a4e23090ddfce33ca62c 100644 (file)
@@ -475,7 +475,7 @@ static int iwl_get_free_ucode_key_index(struct iwl_priv *priv)
                if (!test_and_set_bit(i, &priv->ucode_key_table))
                        return i;
 
-       return -1;
+       return WEP_INVALID_OFFSET;
 }
 
 int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, u8 send_if_empty)
@@ -620,6 +620,9 @@ static int iwl_set_wep_dynamic_key_info(struct iwl_priv *priv,
        /* else, we are overriding an existing key => no need to allocated room
         * in uCode. */
 
+       WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
+               "no space for new kew");
+
        priv->stations[sta_id].sta.key.key_flags = key_flags;
        priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
        priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
@@ -637,6 +640,7 @@ static int iwl_set_ccmp_dynamic_key_info(struct iwl_priv *priv,
 {
        unsigned long flags;
        __le16 key_flags = 0;
+       int ret;
 
        key_flags |= (STA_KEY_FLG_CCMP | STA_KEY_FLG_MAP_KEY_MSK);
        key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS);
@@ -664,14 +668,18 @@ static int iwl_set_ccmp_dynamic_key_info(struct iwl_priv *priv,
        /* else, we are overriding an existing key => no need to allocated room
         * in uCode. */
 
+       WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
+               "no space for new kew");
+
        priv->stations[sta_id].sta.key.key_flags = key_flags;
        priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
        priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
 
+       ret = iwl_send_add_sta(priv, &priv->stations[sta_id].sta, CMD_ASYNC);
+
        spin_unlock_irqrestore(&priv->sta_lock, flags);
 
-       IWL_DEBUG_INFO("hwcrypto: modify ucode station key info\n");
-       return iwl_send_add_sta(priv, &priv->stations[sta_id].sta, CMD_ASYNC);
+       return ret;
 }
 
 static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv,
@@ -696,6 +704,9 @@ static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv,
        /* else, we are overriding an existing key => no need to allocated room
         * in uCode. */
 
+       WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
+               "no space for new kew");
+
        /* This copy is acutally not needed: we get the key with each TX */
        memcpy(priv->stations[sta_id].keyinfo.key, keyconf->key, 16);
 
@@ -734,6 +745,13 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
                return 0;
        }
 
+       if (priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET) {
+               IWL_WARNING("Removing wrong key %d 0x%x\n",
+                           keyconf->keyidx, key_flags);
+               spin_unlock_irqrestore(&priv->sta_lock, flags);
+               return 0;
+       }
+
        if (!test_and_clear_bit(priv->stations[sta_id].sta.key.key_offset,
                &priv->ucode_key_table))
                IWL_ERROR("index %d not used in uCode key table.\n",
index 285b53e7e261af8b70cbc447382b0e5369b86bbe..45a6b0c356953f1d88c32747b322d0dbc253756f 100644 (file)
@@ -6012,7 +6012,6 @@ static void iwl3945_bg_alive_start(struct work_struct *data)
        mutex_lock(&priv->mutex);
        iwl3945_alive_start(priv);
        mutex_unlock(&priv->mutex);
-       ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
 }
 
 static void iwl3945_bg_rf_kill(struct work_struct *work)
index 1cc03a8dd67acdfaca7c93a09c39b02428565c1f..59634c33b1f9194f4e10ed8fc36e2d9aed30ef4e 100644 (file)
@@ -331,7 +331,7 @@ static int __if_usb_submit_rx_urb(struct if_usb_card *cardp,
        /* Fill the receive configuration URB and initialise the Rx call back */
        usb_fill_bulk_urb(cardp->rx_urb, cardp->udev,
                          usb_rcvbulkpipe(cardp->udev, cardp->ep_in),
-                         (void *) (skb->tail),
+                         skb_tail_pointer(skb),
                          MRVDRV_ETH_RX_PACKET_BUFFER_SIZE, callbackfn, cardp);
 
        cardp->rx_urb->transfer_flags |= URB_ZERO_PACKET;
index 431e3c78bf27668b00d87fc06120a7f909ae5090..69eb0132593b72cc2a5d995788a28d2744fcecce 100644 (file)
@@ -48,6 +48,9 @@ static struct usb_device_id rtl8187_table[] __devinitdata = {
        {USB_DEVICE(0x03f0, 0xca02), .driver_info = DEVICE_RTL8187},
        /* Sitecom */
        {USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187},
+       {USB_DEVICE(0x0df6, 0x0028), .driver_info = DEVICE_RTL8187B},
+       /* Abocom */
+       {USB_DEVICE(0x13d1, 0xabe6), .driver_info = DEVICE_RTL8187},
        {}
 };
 
index fe1867b25ff7fb522e57927dfa6180f5f0f177bb..cac732f4047f524b3b575a1e86dbee1d7fd68644 100644 (file)
@@ -615,7 +615,7 @@ static int filter_ack(struct ieee80211_hw *hw, struct ieee80211_hdr *rx_hdr,
                struct ieee80211_hdr *tx_hdr;
 
                tx_hdr = (struct ieee80211_hdr *)skb->data;
-               if (likely(!compare_ether_addr(tx_hdr->addr2, rx_hdr->addr1)))
+               if (likely(!memcmp(tx_hdr->addr2, rx_hdr->addr1, ETH_ALEN)))
                {
                        __skb_unlink(skb, q);
                        tx_status(hw, skb, IEEE80211_TX_STAT_ACK, stats->signal, 1);
index c6948d8f53f62fbf4f6b06cf3292ebe80828132a..6d017adc914ac18c5389fb550b53ed5aa09b3246 100644 (file)
@@ -1785,7 +1785,7 @@ static int __devexit xennet_remove(struct xenbus_device *dev)
        return 0;
 }
 
-static struct xenbus_driver netfront = {
+static struct xenbus_driver netfront_driver = {
        .name = "vif",
        .owner = THIS_MODULE,
        .ids = netfront_ids,
@@ -1805,7 +1805,7 @@ static int __init netif_init(void)
 
        printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n");
 
-       return xenbus_register_frontend(&netfront);
+       return xenbus_register_frontend(&netfront_driver);
 }
 module_init(netif_init);
 
@@ -1815,7 +1815,7 @@ static void __exit netif_exit(void)
        if (xen_initial_domain())
                return;
 
-       xenbus_unregister_driver(&netfront);
+       xenbus_unregister_driver(&netfront_driver);
 }
 module_exit(netif_exit);
 
index 209b4a464bcfe24c129a9d703a43a728998fc0bf..855f389eea402710d4a97a2fa848384475a351bb 100644 (file)
@@ -36,7 +36,7 @@ if PARPORT
 config PARPORT_PC
        tristate "PC-style hardware"
        depends on (!SPARC64 || PCI) && !SPARC32 && !M32R && !FRV && \
-               (!M68K || ISA) && !MN10300 && !AVR32
+               (!M68K || ISA) && !MN10300 && !AVR32 && !BLACKFIN
        ---help---
          You should say Y here if you have a PC-style parallel port. All
          IBM PC compatible computers and some Alphas have PC-style
index e2e95b36a603e227be8d0d6b03b30996c9f00c6f..101ed49a2d15609937acbcf964274ed3f12d8360 100644 (file)
@@ -70,6 +70,8 @@ static int __devinit netmos_parallel_init(struct pci_dev *dev, struct parport_pc
         * parallel ports and <S> is the number of serial ports.
         */
        card->numports = (dev->subsystem_device & 0xf0) >> 4;
+       if (card->numports > ARRAY_SIZE(card->addr))
+               card->numports = ARRAY_SIZE(card->addr);
        return 0;
 }
 
index f9e244da30aef9ea9e170c5cce58a524ab5f87a6..9bcb6cbd5aa93988e39bdf2b8c9285512d74df22 100644 (file)
@@ -113,7 +113,7 @@ struct acpiphp_slot {
 
        u8              device;         /* pci device# */
 
-       u32             sun;            /* ACPI _SUN (slot unique number) */
+       unsigned long long sun;         /* ACPI _SUN (slot unique number) */
        u32             flags;          /* see below */
 };
 
index 95b536a23d25d8d9f76d5aa757a411540017fef0..43c10bd261b48612b4ec2fa2620fa14207628805 100644 (file)
@@ -337,7 +337,7 @@ int acpiphp_register_hotplug_slot(struct acpiphp_slot *acpiphp_slot)
        slot->hotplug_slot->info->cur_bus_speed = PCI_SPEED_UNKNOWN;
 
        acpiphp_slot->slot = slot;
-       snprintf(name, SLOT_NAME_SIZE, "%u", slot->acpi_slot->sun);
+       snprintf(name, SLOT_NAME_SIZE, "%llu", slot->acpi_slot->sun);
 
        retval = pci_hp_register(slot->hotplug_slot,
                                        acpiphp_slot->bridge->pci_bus,
index 955aae4071f7a64eeb5cb716aaacf8ebb26c7a11..3affc6472e65253c94b77bcc8aa97061480b85d7 100644 (file)
@@ -255,13 +255,13 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
 
                bridge->nr_slots++;
 
-               dbg("found ACPI PCI Hotplug slot %d at PCI %04x:%02x:%02x\n",
+               dbg("found ACPI PCI Hotplug slot %llu at PCI %04x:%02x:%02x\n",
                                slot->sun, pci_domain_nr(bridge->pci_bus),
                                bridge->pci_bus->number, slot->device);
                retval = acpiphp_register_hotplug_slot(slot);
                if (retval) {
                        if (retval == -EBUSY)
-                               warn("Slot %d already registered by another "
+                               warn("Slot %llu already registered by another "
                                        "hotplug driver\n", slot->sun);
                        else
                                warn("acpiphp_register_hotplug_slot failed "
index c892daae74d6dc325a77dc9050c0f6cd8a5105c8..633e743442ac711d0b02d6b85a8252a1ee74dbb5 100644 (file)
@@ -1402,10 +1402,6 @@ static int __init ibmphp_init(void)
                goto error;
        }
 
-       /* lock ourselves into memory with a module 
-        * count of -1 so that no one can unload us. */
-       module_put(THIS_MODULE);
-
 exit:
        return rc;
 
@@ -1423,4 +1419,3 @@ static void __exit ibmphp_exit(void)
 }
 
 module_init(ibmphp_init);
-module_exit(ibmphp_exit);
index 4b23bc39b11e513be82a54df9f01db2b268b5bb4..39cf248d24e3cd0592b61dee392f748e441301c0 100644 (file)
@@ -432,18 +432,19 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
                goto err_out_release_ctlr;
        }
 
+       /* Check if slot is occupied */
        t_slot = pciehp_find_slot(ctrl, ctrl->slot_device_offset);
-
-       t_slot->hpc_ops->get_adapter_status(t_slot, &value); /* Check if slot is occupied */
-       if (value && pciehp_force) {
-               rc = pciehp_enable_slot(t_slot);
-               if (rc) /* -ENODEV: shouldn't happen, but deal with it */
-                       value = 0;
-       }
-       if ((POWER_CTRL(ctrl)) && !value) {
-               rc = t_slot->hpc_ops->power_off_slot(t_slot); /* Power off slot if not occupied*/
-               if (rc)
-                       goto err_out_free_ctrl_slot;
+       t_slot->hpc_ops->get_adapter_status(t_slot, &value);
+       if (value) {
+               if (pciehp_force)
+                       pciehp_enable_slot(t_slot);
+       } else {
+               /* Power off slot if not occupied */
+               if (POWER_CTRL(ctrl)) {
+                       rc = t_slot->hpc_ops->power_off_slot(t_slot);
+                       if (rc)
+                               goto err_out_free_ctrl_slot;
+               }
        }
 
        return 0;
index a2692724b68ffe04382bdd8a2d15c4774511c47d..5c8baa43ac9c5ed86bde043702af795d37dcf2b8 100644 (file)
@@ -1655,12 +1655,14 @@ int __init init_dmars(void)
                        iommu->flush.flush_context = __iommu_flush_context;
                        iommu->flush.flush_iotlb = __iommu_flush_iotlb;
                        printk(KERN_INFO "IOMMU 0x%Lx: using Register based "
-                              "invalidation\n", drhd->reg_base_addr);
+                              "invalidation\n",
+                              (unsigned long long)drhd->reg_base_addr);
                } else {
                        iommu->flush.flush_context = qi_flush_context;
                        iommu->flush.flush_iotlb = qi_flush_iotlb;
                        printk(KERN_INFO "IOMMU 0x%Lx: using Queued "
-                              "invalidation\n", drhd->reg_base_addr);
+                              "invalidation\n",
+                              (unsigned long long)drhd->reg_base_addr);
                }
        }
 
index b3a63edb69012bd443f4caebffdaddf12103b86a..ae5ec76dca77a636bf5b1f1a6cf4c52b03b8d9c8 100644 (file)
@@ -63,7 +63,7 @@ static acpi_status acpi_run_osc(acpi_handle handle,
        union acpi_object in_params[4];
        struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
        union acpi_object *out_obj;
-       u32 osc_dw0, flags = osc_args->capbuf[OSC_QUERY_TYPE];
+       u32 errors, flags = osc_args->capbuf[OSC_QUERY_TYPE];
 
        /* Setting up input parameters */
        input.count = 4;
@@ -92,15 +92,16 @@ static acpi_status acpi_run_osc(acpi_handle handle,
                status = AE_TYPE;
                goto out_kfree;
        }
-       osc_dw0 = *((u32 *)out_obj->buffer.pointer);
-       if (osc_dw0) {
-               if (osc_dw0 & OSC_REQUEST_ERROR)
+       /* Need to ignore the bit0 in result code */
+       errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0);
+       if (errors) {
+               if (errors & OSC_REQUEST_ERROR)
                        printk(KERN_DEBUG "_OSC request fails\n"); 
-               if (osc_dw0 & OSC_INVALID_UUID_ERROR)
+               if (errors & OSC_INVALID_UUID_ERROR)
                        printk(KERN_DEBUG "_OSC invalid UUID\n"); 
-               if (osc_dw0 & OSC_INVALID_REVISION_ERROR)
+               if (errors & OSC_INVALID_REVISION_ERROR)
                        printk(KERN_DEBUG "_OSC invalid revision\n"); 
-               if (osc_dw0 & OSC_CAPABILITIES_MASK_ERROR) {
+               if (errors & OSC_CAPABILITIES_MASK_ERROR) {
                        if (flags & OSC_QUERY_ENABLE)
                                goto out_success;
                        printk(KERN_DEBUG "_OSC FW not grant req. control\n");
index 21f2ac639cab2f31937971113fe9872275cfd9a0..061d1ee0046aa2d419f7589aab0ed6992fcbc7c6 100644 (file)
@@ -1832,7 +1832,7 @@ int pci_reset_function(struct pci_dev *dev)
        if (!(cap & PCI_EXP_DEVCAP_FLR))
                return -ENOTTY;
 
-       if (!dev->msi_enabled && !dev->msix_enabled)
+       if (!dev->msi_enabled && !dev->msix_enabled && dev->irq != 0)
                disable_irq(dev->irq);
        pci_save_state(dev);
 
@@ -1841,7 +1841,7 @@ int pci_reset_function(struct pci_dev *dev)
        r = pci_execute_reset_function(dev);
 
        pci_restore_state(dev);
-       if (!dev->msi_enabled && !dev->msix_enabled)
+       if (!dev->msi_enabled && !dev->msix_enabled && dev->irq != 0)
                enable_irq(dev->irq);
 
        return r;
@@ -2042,7 +2042,7 @@ static int __devinit pci_init(void)
        return 0;
 }
 
-static int __devinit pci_setup(char *str)
+static int __init pci_setup(char *str)
 {
        while (str) {
                char *k = strchr(str, ',');
index dfc63d01f20a0a7c072f9a65039f2776537b3e8e..aac7006949f15c9eb52b56968a4dca6ef812e3c2 100644 (file)
@@ -252,7 +252,7 @@ static void report_resume(struct pci_dev *dev, void *data)
 
        if (!dev->driver ||
                !dev->driver->err_handler ||
-               !dev->driver->err_handler->slot_reset)
+               !dev->driver->err_handler->resume)
                return;
 
        err_handler = dev->driver->err_handler;
index 8f63f4c6b85f64e3f4d91d76ca7da90ac142c51e..9aad608bcf3fb947dac183a2153312a6ce5db962 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/pm.h>
 #include <linux/init.h>
 #include <linux/slab.h>
+#include <linux/jiffies.h>
 #include <linux/pci-aspm.h>
 #include "../pci.h"
 
@@ -161,11 +162,12 @@ static void pcie_check_clock_pm(struct pci_dev *pdev)
  */
 static void pcie_aspm_configure_common_clock(struct pci_dev *pdev)
 {
-       int pos, child_pos;
+       int pos, child_pos, i = 0;
        u16 reg16 = 0;
        struct pci_dev *child_dev;
        int same_clock = 1;
-
+       unsigned long start_jiffies;
+       u16 child_regs[8], parent_reg;
        /*
         * all functions of a slot should have the same Slot Clock
         * Configuration, so just check one function
@@ -191,16 +193,19 @@ static void pcie_aspm_configure_common_clock(struct pci_dev *pdev)
                child_pos = pci_find_capability(child_dev, PCI_CAP_ID_EXP);
                pci_read_config_word(child_dev, child_pos + PCI_EXP_LNKCTL,
                        &reg16);
+               child_regs[i] = reg16;
                if (same_clock)
                        reg16 |= PCI_EXP_LNKCTL_CCC;
                else
                        reg16 &= ~PCI_EXP_LNKCTL_CCC;
                pci_write_config_word(child_dev, child_pos + PCI_EXP_LNKCTL,
                        reg16);
+               i++;
        }
 
        /* Configure upstream component */
        pci_read_config_word(pdev, pos + PCI_EXP_LNKCTL, &reg16);
+       parent_reg = reg16;
        if (same_clock)
                reg16 |= PCI_EXP_LNKCTL_CCC;
        else
@@ -212,12 +217,30 @@ static void pcie_aspm_configure_common_clock(struct pci_dev *pdev)
        pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, reg16);
 
        /* Wait for link training end */
-       while (1) {
+       /* break out after waiting for 1 second */
+       start_jiffies = jiffies;
+       while ((jiffies - start_jiffies) < HZ) {
                pci_read_config_word(pdev, pos + PCI_EXP_LNKSTA, &reg16);
                if (!(reg16 & PCI_EXP_LNKSTA_LT))
                        break;
                cpu_relax();
        }
+       /* training failed -> recover */
+       if ((jiffies - start_jiffies) >= HZ) {
+               dev_printk (KERN_ERR, &pdev->dev, "ASPM: Could not configure"
+                           " common clock\n");
+               i = 0;
+               list_for_each_entry(child_dev, &pdev->subordinate->devices,
+                                   bus_list) {
+                       child_pos = pci_find_capability(child_dev,
+                                                       PCI_CAP_ID_EXP);
+                       pci_write_config_word(child_dev,
+                                             child_pos + PCI_EXP_LNKCTL,
+                                             child_regs[i]);
+                       i++;
+               }
+               pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, parent_reg);
+       }
 }
 
 /*
index 5049a47030ac9ec0ca84c82ee2f7fb39854602c6..ce0985615133df0da3b84f71b370e0e1fb6f6988 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/delay.h>
 #include <linux/acpi.h>
 #include <linux/kallsyms.h>
+#include <linux/dmi.h>
 #include "pci.h"
 
 int isa_dma_bridge_buggy;
@@ -605,27 +606,6 @@ static void __init quirk_ioapic_rmw(struct pci_dev *dev)
                sis_apic_bug = 1;
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI,      PCI_ANY_ID,                     quirk_ioapic_rmw);
-
-#define AMD8131_revA0        0x01
-#define AMD8131_revB0        0x11
-#define AMD8131_MISC         0x40
-#define AMD8131_NIOAMODE_BIT 0
-static void quirk_amd_8131_ioapic(struct pci_dev *dev)
-{ 
-        unsigned char tmp;
-        
-        if (nr_ioapics == 0) 
-                return;
-
-        if (dev->revision == AMD8131_revA0 || dev->revision == AMD8131_revB0) {
-                dev_info(&dev->dev, "Fixing up AMD8131 IOAPIC mode\n");
-                pci_read_config_byte( dev, AMD8131_MISC, &tmp);
-                tmp &= ~(1 << AMD8131_NIOAMODE_BIT);
-                pci_write_config_byte( dev, AMD8131_MISC, tmp);
-        }
-} 
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_amd_8131_ioapic);
-DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_amd_8131_ioapic);
 #endif /* CONFIG_X86_IO_APIC */
 
 /*
@@ -1422,6 +1402,155 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,    0x2609, quirk_intel_pcie_pm);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x260a, quirk_intel_pcie_pm);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x260b, quirk_intel_pcie_pm);
 
+#ifdef CONFIG_X86_IO_APIC
+/*
+ * Boot interrupts on some chipsets cannot be turned off. For these chipsets,
+ * remap the original interrupt in the linux kernel to the boot interrupt, so
+ * that a PCI device's interrupt handler is installed on the boot interrupt
+ * line instead.
+ */
+static void quirk_reroute_to_boot_interrupts_intel(struct pci_dev *dev)
+{
+       if (noioapicquirk || noioapicreroute)
+               return;
+
+       dev->irq_reroute_variant = INTEL_IRQ_REROUTE_VARIANT;
+
+       printk(KERN_INFO "PCI quirk: reroute interrupts for 0x%04x:0x%04x\n",
+                       dev->vendor, dev->device);
+       return;
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_80333_0,    quirk_reroute_to_boot_interrupts_intel);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_80333_1,    quirk_reroute_to_boot_interrupts_intel);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_ESB2_0,     quirk_reroute_to_boot_interrupts_intel);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_0,      quirk_reroute_to_boot_interrupts_intel);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXH_1,      quirk_reroute_to_boot_interrupts_intel);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_PXHV,       quirk_reroute_to_boot_interrupts_intel);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_80332_0,    quirk_reroute_to_boot_interrupts_intel);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_80332_1,    quirk_reroute_to_boot_interrupts_intel);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_80333_0,    quirk_reroute_to_boot_interrupts_intel);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_80333_1,    quirk_reroute_to_boot_interrupts_intel);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_ESB2_0,     quirk_reroute_to_boot_interrupts_intel);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_PXH_0,      quirk_reroute_to_boot_interrupts_intel);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_PXH_1,      quirk_reroute_to_boot_interrupts_intel);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_PXHV,       quirk_reroute_to_boot_interrupts_intel);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_80332_0,    quirk_reroute_to_boot_interrupts_intel);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_80332_1,    quirk_reroute_to_boot_interrupts_intel);
+
+/*
+ * On some chipsets we can disable the generation of legacy INTx boot
+ * interrupts.
+ */
+
+/*
+ * IO-APIC1 on 6300ESB generates boot interrupts, see intel order no
+ * 300641-004US, section 5.7.3.
+ */
+#define INTEL_6300_IOAPIC_ABAR         0x40
+#define INTEL_6300_DISABLE_BOOT_IRQ    (1<<14)
+
+static void quirk_disable_intel_boot_interrupt(struct pci_dev *dev)
+{
+       u16 pci_config_word;
+
+       if (noioapicquirk)
+               return;
+
+       pci_read_config_word(dev, INTEL_6300_IOAPIC_ABAR, &pci_config_word);
+       pci_config_word |= INTEL_6300_DISABLE_BOOT_IRQ;
+       pci_write_config_word(dev, INTEL_6300_IOAPIC_ABAR, pci_config_word);
+
+       printk(KERN_INFO "disabled boot interrupt on device 0x%04x:0x%04x\n",
+               dev->vendor, dev->device);
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_ESB_10,     quirk_disable_intel_boot_interrupt);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_ESB_10,    quirk_disable_intel_boot_interrupt);
+
+/*
+ * disable boot interrupts on HT-1000
+ */
+#define BC_HT1000_FEATURE_REG          0x64
+#define BC_HT1000_PIC_REGS_ENABLE      (1<<0)
+#define BC_HT1000_MAP_IDX              0xC00
+#define BC_HT1000_MAP_DATA             0xC01
+
+static void quirk_disable_broadcom_boot_interrupt(struct pci_dev *dev)
+{
+       u32 pci_config_dword;
+       u8 irq;
+
+       if (noioapicquirk)
+               return;
+
+       pci_read_config_dword(dev, BC_HT1000_FEATURE_REG, &pci_config_dword);
+       pci_write_config_dword(dev, BC_HT1000_FEATURE_REG, pci_config_dword |
+                       BC_HT1000_PIC_REGS_ENABLE);
+
+       for (irq = 0x10; irq < 0x10 + 32; irq++) {
+               outb(irq, BC_HT1000_MAP_IDX);
+               outb(0x00, BC_HT1000_MAP_DATA);
+       }
+
+       pci_write_config_dword(dev, BC_HT1000_FEATURE_REG, pci_config_dword);
+
+       printk(KERN_INFO "disabled boot interrupts on PCI device"
+                       "0x%04x:0x%04x\n", dev->vendor, dev->device);
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS,   PCI_DEVICE_ID_SERVERWORKS_HT1000SB,       quirk_disable_broadcom_boot_interrupt);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SERVERWORKS,   PCI_DEVICE_ID_SERVERWORKS_HT1000SB,      quirk_disable_broadcom_boot_interrupt);
+
+/*
+ * disable boot interrupts on AMD and ATI chipsets
+ */
+/*
+ * NOIOAMODE needs to be disabled to disable "boot interrupts". For AMD 8131
+ * rev. A0 and B0, NOIOAMODE needs to be disabled anyway to fix IO-APIC mode
+ * (due to an erratum).
+ */
+#define AMD_813X_MISC                  0x40
+#define AMD_813X_NOIOAMODE             (1<<0)
+
+static void quirk_disable_amd_813x_boot_interrupt(struct pci_dev *dev)
+{
+       u32 pci_config_dword;
+
+       if (noioapicquirk)
+               return;
+
+       pci_read_config_dword(dev, AMD_813X_MISC, &pci_config_dword);
+       pci_config_dword &= ~AMD_813X_NOIOAMODE;
+       pci_write_config_dword(dev, AMD_813X_MISC, pci_config_dword);
+
+       printk(KERN_INFO "disabled boot interrupts on PCI device "
+                       "0x%04x:0x%04x\n", dev->vendor, dev->device);
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD,   PCI_DEVICE_ID_AMD_8131_BRIDGE,    quirk_disable_amd_813x_boot_interrupt);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AMD,   PCI_DEVICE_ID_AMD_8132_BRIDGE,   quirk_disable_amd_813x_boot_interrupt);
+
+#define AMD_8111_PCI_IRQ_ROUTING       0x56
+
+static void quirk_disable_amd_8111_boot_interrupt(struct pci_dev *dev)
+{
+       u16 pci_config_word;
+
+       if (noioapicquirk)
+               return;
+
+       pci_read_config_word(dev, AMD_8111_PCI_IRQ_ROUTING, &pci_config_word);
+       if (!pci_config_word) {
+               printk(KERN_INFO "boot interrupts on PCI device 0x%04x:0x%04x "
+                               "already disabled\n",
+                               dev->vendor, dev->device);
+               return;
+       }
+       pci_write_config_word(dev, AMD_8111_PCI_IRQ_ROUTING, 0);
+       printk(KERN_INFO "disabled boot interrupts on PCI device "
+                       "0x%04x:0x%04x\n", dev->vendor, dev->device);
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD,   PCI_DEVICE_ID_AMD_8111_SMBUS,     quirk_disable_amd_8111_boot_interrupt);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AMD,   PCI_DEVICE_ID_AMD_8111_SMBUS,    quirk_disable_amd_8111_boot_interrupt);
+#endif /* CONFIG_X86_IO_APIC */
+
 /*
  * Toshiba TC86C001 IDE controller reports the standard 8-byte BAR0 size
  * but the PIO transfers won't work if BAR0 falls at the odd 8 bytes.
@@ -1828,6 +1957,22 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS,
                         PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB,
                         ht_enable_msi_mapping);
 
+/* The P5N32-SLI Premium motherboard from Asus has a problem with msi
+ * for the MCP55 NIC. It is not yet determined whether the msi problem
+ * also affects other devices. As for now, turn off msi for this device.
+ */
+static void __devinit nvenet_msi_disable(struct pci_dev *dev)
+{
+       if (dmi_name_in_vendors("P5N32-SLI PREMIUM")) {
+               dev_info(&dev->dev,
+                        "Disabling msi for MCP55 NIC on P5N32-SLI Premium\n");
+               dev->no_msi = 1;
+       }
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA,
+                       PCI_DEVICE_ID_NVIDIA_NVENET_15,
+                       nvenet_msi_disable);
+
 static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev)
 {
        struct pci_dev *host_bridge;
index 4dd1c3e157aec6d6c136c02255faed19d46c3dc1..5a8ccb4f604deed50495b61ced5ba403e59e9484 100644 (file)
@@ -253,6 +253,7 @@ placeholder:
                 __func__, pci_domain_nr(parent), parent->number, slot_nr);
 
 out:
+       kfree(slot_name);
        up_write(&pci_bus_sem);
        return slot;
 err:
index bb7338863fb9aabeedfbb941b59f026176919673..b59d4115d20f541e5176ba309cb694687c1c1d17 100644 (file)
@@ -334,6 +334,6 @@ static void __exit bfin_cf_exit(void)
 module_init(bfin_cf_init);
 module_exit(bfin_cf_exit);
 
-MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>")
+MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
 MODULE_DESCRIPTION("BFIN CF/PCMCIA Driver");
 MODULE_LICENSE("GPL");
index dcce9f5d84654a0612f99ed9bbe85813d53966f5..4a110b7b2673911885741209b3891c5eab891fab 100644 (file)
@@ -351,10 +351,11 @@ int verify_cis_cache(struct pcmcia_socket *s)
        char *buf;
 
        buf = kmalloc(256, GFP_KERNEL);
-       if (buf == NULL)
+       if (buf == NULL) {
                dev_printk(KERN_WARNING, &s->dev,
                           "no memory for verifying CIS\n");
                return -ENOMEM;
+       }
        list_for_each_entry(cis, &s->cis_cache, node) {
                int len = cis->len;
 
index c68c5d3382859eb4af84f8d9e0278ee3ce00b8ea..0660ad18258953af06dfa7cc72afda3b9259f716 100644 (file)
@@ -186,12 +186,6 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
 
        spin_lock_init(&socket->lock);
 
-       if (socket->resource_ops->init) {
-               ret = socket->resource_ops->init(socket);
-               if (ret)
-                       return (ret);
-       }
-
        /* try to obtain a socket number [yes, it gets ugly if we
         * register more than 2^sizeof(unsigned int) pcmcia
         * sockets... but the socket number is deprecated
@@ -226,7 +220,7 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
        /* set proper values in socket->dev */
        dev_set_drvdata(&socket->dev, socket);
        socket->dev.class = &pcmcia_socket_class;
-       snprintf(socket->dev.bus_id, BUS_ID_SIZE, "pcmcia_socket%u", socket->sock);
+       dev_set_name(&socket->dev, "pcmcia_socket%u", socket->sock);
 
        /* base address = 0, map = 0 */
        socket->cis_mem.flags = 0;
@@ -239,6 +233,12 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
        mutex_init(&socket->skt_mutex);
        spin_lock_init(&socket->thread_lock);
 
+       if (socket->resource_ops->init) {
+               ret = socket->resource_ops->init(socket);
+               if (ret)
+                       goto err;
+       }
+
        tsk = kthread_run(pccardd, socket, "pccardd");
        if (IS_ERR(tsk)) {
                ret = PTR_ERR(tsk);
index 7956602554901297f86055cea142707f7eead769..47cab31ff6e49c0780692ead159cf81fb4113c58 100644 (file)
@@ -622,7 +622,6 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f
 {
        struct pcmcia_device *p_dev, *tmp_dev;
        unsigned long flags;
-       int bus_id_len;
 
        s = pcmcia_get_socket(s);
        if (!s)
@@ -650,12 +649,12 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f
        /* by default don't allow DMA */
        p_dev->dma_mask = DMA_MASK_NONE;
        p_dev->dev.dma_mask = &p_dev->dma_mask;
-       bus_id_len = sprintf (p_dev->dev.bus_id, "%d.%d", p_dev->socket->sock, p_dev->device_no);
-
-       p_dev->devname = kmalloc(6 + bus_id_len + 1, GFP_KERNEL);
+       dev_set_name(&p_dev->dev, "%d.%d", p_dev->socket->sock, p_dev->device_no);
+       if (!dev_name(&p_dev->dev))
+               goto err_free;
+       p_dev->devname = kasprintf(GFP_KERNEL, "pcmcia%s", dev_name(&p_dev->dev));
        if (!p_dev->devname)
                goto err_free;
-       sprintf (p_dev->devname, "pcmcia%s", p_dev->dev.bus_id);
        ds_dev_dbg(3, &p_dev->dev, "devname is %s\n", p_dev->devname);
 
        spin_lock_irqsave(&pcmcia_dev_list_lock, flags);
@@ -668,6 +667,8 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f
         list_for_each_entry(tmp_dev, &s->devices_list, socket_device_list)
                 if (p_dev->func == tmp_dev->func) {
                        p_dev->function_config = tmp_dev->function_config;
+                       p_dev->io = tmp_dev->io;
+                       p_dev->irq = tmp_dev->irq;
                        kref_get(&p_dev->function_config->ref);
                }
 
index 76d4a98f09559b9a78d3f4335a1961b9de11eb6e..f5d0ba8e22d5473fb46e00bfbe5e3bfe2e7719a9 100644 (file)
@@ -302,9 +302,10 @@ int pcmcia_modify_configuration(struct pcmcia_device *p_dev,
        /* We only allow changing Vpp1 and Vpp2 to the same value */
        if ((mod->Attributes & CONF_VPP1_CHANGE_VALID) &&
            (mod->Attributes & CONF_VPP2_CHANGE_VALID)) {
-               if (mod->Vpp1 != mod->Vpp2)
+               if (mod->Vpp1 != mod->Vpp2) {
                        ds_dbg(s, 0, "Vpp1 and Vpp2 must be the same\n");
                        return -EINVAL;
+               }
                s->socket.Vpp = mod->Vpp1;
                if (s->ops->set_socket(s, &s->socket)) {
                        dev_printk(KERN_WARNING, &s->dev,
index 17f4ecf1c0c5b214af03b7188ecedca3e516d8b5..9ca22c7aafb29f5959bbcb3ddb2ed0296408b6c4 100644 (file)
@@ -71,7 +71,7 @@ static DEFINE_MUTEX(rsrc_mutex);
 ======================================================================*/
 
 static struct resource *
-make_resource(resource_size_t b, resource_size_t n, int flags, char *name)
+make_resource(resource_size_t b, resource_size_t n, int flags, const char *name)
 {
        struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);
 
@@ -624,7 +624,7 @@ static int nonstatic_adjust_io_region(struct resource *res, unsigned long r_star
 static struct resource *nonstatic_find_io_region(unsigned long base, int num,
                   unsigned long align, struct pcmcia_socket *s)
 {
-       struct resource *res = make_resource(0, num, IORESOURCE_IO, s->dev.bus_id);
+       struct resource *res = make_resource(0, num, IORESOURCE_IO, dev_name(&s->dev));
        struct socket_data *s_data = s->resource_data;
        struct pcmcia_align_data data;
        unsigned long min = base;
@@ -658,7 +658,7 @@ static struct resource *nonstatic_find_io_region(unsigned long base, int num,
 static struct resource * nonstatic_find_mem_region(u_long base, u_long num,
                u_long align, int low, struct pcmcia_socket *s)
 {
-       struct resource *res = make_resource(0, num, IORESOURCE_MEM, s->dev.bus_id);
+       struct resource *res = make_resource(0, num, IORESOURCE_MEM, dev_name(&s->dev));
        struct socket_data *s_data = s->resource_data;
        struct pcmcia_align_data data;
        unsigned long min, max;
index a926c896475ebc3839ef63e92b1bffd20c62ee82..643a6b98462b67062487fec8e37e505fe9c50cd1 100644 (file)
@@ -879,7 +879,7 @@ static void rio_update_route_tables(struct rio_mport *port)
  * link, then start recursive peer enumeration. Returns %0 if
  * enumeration succeeds or %-EBUSY if enumeration fails.
  */
-int rio_enum_mport(struct rio_mport *mport)
+int __devinit rio_enum_mport(struct rio_mport *mport)
 {
        struct rio_net *net = NULL;
        int rc = 0;
@@ -972,7 +972,7 @@ static void rio_enum_timeout(unsigned long data)
  * peer discovery. Returns %0 if discovery succeeds or %-EBUSY
  * on failure.
  */
-int rio_disc_mport(struct rio_mport *mport)
+int __devinit rio_disc_mport(struct rio_mport *mport)
 {
        struct rio_net *net = NULL;
        int enum_timeout_flag = 0;
index 680661abbc4b700ce537a8ad828124be26821187..6395c780008ba83534849cb47cd41267f4b63933 100644 (file)
@@ -467,7 +467,7 @@ static int __devinit rio_init(void)
 
 device_initcall(rio_init);
 
-int rio_init_mports(void)
+int __devinit rio_init_mports(void)
 {
        int rc = 0;
        struct rio_mport *port;
index 8abbb2020af9c0d6b238d16cf81c4277de31dc3d..123092d8a98484aebde61d7c60cc77639e95c351 100644 (file)
@@ -277,6 +277,14 @@ config RTC_DRV_FM3130
          This driver can also be built as a module. If so the module
          will be called rtc-fm3130.
 
+config RTC_DRV_RX8581
+       tristate "Epson RX-8581"
+       help
+         If you say yes here you will get support for the Epson RX-8581.
+
+         This driver can also be built as a module. If so the module
+         will be called rtc-rx8581.
+
 endif # I2C
 
 comment "SPI RTC drivers"
@@ -302,6 +310,17 @@ config RTC_DRV_DS1305
          This driver can also be built as a module. If so, the module
          will be called rtc-ds1305.
 
+config RTC_DRV_DS1390
+       tristate "Dallas/Maxim DS1390/93/94"
+       help
+         If you say yes here you get support for the DS1390/93/94 chips.
+
+         This driver only supports the RTC feature, and not other chip
+         features such as alarms and trickle charging.
+
+         This driver can also be built as a module. If so, the module
+         will be called rtc-ds1390.
+
 config RTC_DRV_MAX6902
        tristate "Maxim MAX6902"
        help
@@ -468,6 +487,16 @@ config RTC_DRV_V3020
          This driver can also be built as a module. If so, the module
          will be called rtc-v3020.
 
+config RTC_DRV_WM8350
+       tristate "Wolfson Microelectronics WM8350 RTC"
+       depends on MFD_WM8350
+       help
+         If you say yes here you will get support for the RTC subsystem
+         of the Wolfson Microelectronics WM8350.
+
+         This driver can also be built as a module. If so, the module
+         will be called "rtc-wm8350".
+
 comment "on-CPU RTC drivers"
 
 config RTC_DRV_OMAP
index e9e8474cc8fea8fb11ff77f31df46e30d8c7dbba..6e79c912bf9ee1b44d30baafabe2ef424fb14f3b 100644 (file)
@@ -28,6 +28,7 @@ obj-$(CONFIG_RTC_DRV_DS1302)  += rtc-ds1302.o
 obj-$(CONFIG_RTC_DRV_DS1305)   += rtc-ds1305.o
 obj-$(CONFIG_RTC_DRV_DS1307)   += rtc-ds1307.o
 obj-$(CONFIG_RTC_DRV_DS1374)   += rtc-ds1374.o
+obj-$(CONFIG_RTC_DRV_DS1390)   += rtc-ds1390.o
 obj-$(CONFIG_RTC_DRV_DS1511)   += rtc-ds1511.o
 obj-$(CONFIG_RTC_DRV_DS1553)   += rtc-ds1553.o
 obj-$(CONFIG_RTC_DRV_DS1672)   += rtc-ds1672.o
@@ -57,6 +58,7 @@ obj-$(CONFIG_RTC_DRV_R9701)   += rtc-r9701.o
 obj-$(CONFIG_RTC_DRV_RS5C313)  += rtc-rs5c313.o
 obj-$(CONFIG_RTC_DRV_RS5C348)  += rtc-rs5c348.o
 obj-$(CONFIG_RTC_DRV_RS5C372)  += rtc-rs5c372.o
+obj-$(CONFIG_RTC_DRV_RX8581)   += rtc-rx8581.o
 obj-$(CONFIG_RTC_DRV_S35390A)  += rtc-s35390a.o
 obj-$(CONFIG_RTC_DRV_S3C)      += rtc-s3c.o
 obj-$(CONFIG_RTC_DRV_SA1100)   += rtc-sa1100.o
@@ -66,4 +68,5 @@ obj-$(CONFIG_RTC_DRV_TEST)    += rtc-test.o
 obj-$(CONFIG_RTC_DRV_TWL4030)  += rtc-twl4030.o
 obj-$(CONFIG_RTC_DRV_V3020)    += rtc-v3020.o
 obj-$(CONFIG_RTC_DRV_VR41XX)   += rtc-vr41xx.o
+obj-$(CONFIG_RTC_DRV_WM8350)   += rtc-wm8350.o
 obj-$(CONFIG_RTC_DRV_X1205)    += rtc-x1205.o
diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c
new file mode 100644 (file)
index 0000000..599e976
--- /dev/null
@@ -0,0 +1,220 @@
+/*
+ * rtc-ds1390.c -- driver for DS1390/93/94
+ *
+ * Copyright (C) 2008 Mercury IMC Ltd
+ * Written by Mark Jackson <mpfj@mimc.co.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * NOTE : Currently this driver only supports the bare minimum for read
+ * and write the RTC.  The extra features provided by the chip family
+ * (alarms, trickle charger, different control registers) are unavailable.
+ */
+
+#include <linux/platform_device.h>
+#include <linux/rtc.h>
+#include <linux/spi/spi.h>
+#include <linux/bcd.h>
+
+#define DS1390_REG_100THS              0x00
+#define DS1390_REG_SECONDS             0x01
+#define DS1390_REG_MINUTES             0x02
+#define DS1390_REG_HOURS               0x03
+#define DS1390_REG_DAY                 0x04
+#define DS1390_REG_DATE                        0x05
+#define DS1390_REG_MONTH_CENT          0x06
+#define DS1390_REG_YEAR                        0x07
+
+#define DS1390_REG_ALARM_100THS                0x08
+#define DS1390_REG_ALARM_SECONDS       0x09
+#define DS1390_REG_ALARM_MINUTES       0x0A
+#define DS1390_REG_ALARM_HOURS         0x0B
+#define DS1390_REG_ALARM_DAY_DATE      0x0C
+
+#define DS1390_REG_CONTROL             0x0D
+#define DS1390_REG_STATUS              0x0E
+#define DS1390_REG_TRICKLE             0x0F
+
+struct ds1390 {
+       struct rtc_device *rtc;
+       u8 txrx_buf[9]; /* cmd + 8 registers */
+};
+
+static void ds1390_set_reg(struct device *dev, unsigned char address,
+                               unsigned char data)
+{
+       struct spi_device *spi = to_spi_device(dev);
+       struct ds1390 *chip = dev_get_drvdata(dev);
+
+       /* Set MSB to indicate write */
+       chip->txrx_buf[0] = address | 0x80;
+       chip->txrx_buf[1] = data;
+
+       /* do the i/o */
+       spi_write_then_read(spi, chip->txrx_buf, 2, NULL, 0);
+}
+
+static int ds1390_get_reg(struct device *dev, unsigned char address,
+                               unsigned char *data)
+{
+       struct spi_device *spi = to_spi_device(dev);
+       struct ds1390 *chip = dev_get_drvdata(dev);
+       int status;
+
+       if (!data)
+               return -EINVAL;
+
+       /* Clear MSB to indicate read */
+       chip->txrx_buf[0] = address & 0x7f;
+       /* do the i/o */
+       status = spi_write_then_read(spi, chip->txrx_buf, 1, chip->txrx_buf, 1);
+       if (status != 0)
+               return status;
+
+       *data = chip->txrx_buf[1];
+
+       return 0;
+}
+
+static int ds1390_get_datetime(struct device *dev, struct rtc_time *dt)
+{
+       struct spi_device *spi = to_spi_device(dev);
+       struct ds1390 *chip = dev_get_drvdata(dev);
+       int status;
+
+       /* build the message */
+       chip->txrx_buf[0] = DS1390_REG_SECONDS;
+
+       /* do the i/o */
+       status = spi_write_then_read(spi, chip->txrx_buf, 1, chip->txrx_buf, 8);
+       if (status != 0)
+               return status;
+
+       /* The chip sends data in this order:
+        * Seconds, Minutes, Hours, Day, Date, Month / Century, Year */
+       dt->tm_sec      = bcd2bin(chip->txrx_buf[0]);
+       dt->tm_min      = bcd2bin(chip->txrx_buf[1]);
+       dt->tm_hour     = bcd2bin(chip->txrx_buf[2]);
+       dt->tm_wday     = bcd2bin(chip->txrx_buf[3]);
+       dt->tm_mday     = bcd2bin(chip->txrx_buf[4]);
+       /* mask off century bit */
+       dt->tm_mon      = bcd2bin(chip->txrx_buf[5] & 0x7f) - 1;
+       /* adjust for century bit */
+       dt->tm_year = bcd2bin(chip->txrx_buf[6]) + ((chip->txrx_buf[5] & 0x80) ? 100 : 0);
+
+       return rtc_valid_tm(dt);
+}
+
+static int ds1390_set_datetime(struct device *dev, struct rtc_time *dt)
+{
+       struct spi_device *spi = to_spi_device(dev);
+       struct ds1390 *chip = dev_get_drvdata(dev);
+
+       /* build the message */
+       chip->txrx_buf[0] = DS1390_REG_SECONDS | 0x80;
+       chip->txrx_buf[1] = bin2bcd(dt->tm_sec);
+       chip->txrx_buf[2] = bin2bcd(dt->tm_min);
+       chip->txrx_buf[3] = bin2bcd(dt->tm_hour);
+       chip->txrx_buf[4] = bin2bcd(dt->tm_wday);
+       chip->txrx_buf[5] = bin2bcd(dt->tm_mday);
+       chip->txrx_buf[6] = bin2bcd(dt->tm_mon + 1) |
+                               ((dt->tm_year > 99) ? 0x80 : 0x00);
+       chip->txrx_buf[7] = bin2bcd(dt->tm_year % 100);
+
+       /* do the i/o */
+       return spi_write_then_read(spi, chip->txrx_buf, 8, NULL, 0);
+}
+
+static int ds1390_read_time(struct device *dev, struct rtc_time *tm)
+{
+       return ds1390_get_datetime(dev, tm);
+}
+
+static int ds1390_set_time(struct device *dev, struct rtc_time *tm)
+{
+       return ds1390_set_datetime(dev, tm);
+}
+
+static const struct rtc_class_ops ds1390_rtc_ops = {
+       .read_time      = ds1390_read_time,
+       .set_time       = ds1390_set_time,
+};
+
+static int __devinit ds1390_probe(struct spi_device *spi)
+{
+       struct rtc_device *rtc;
+       unsigned char tmp;
+       struct ds1390 *chip;
+       int res;
+
+       printk(KERN_DEBUG "DS1390 SPI RTC driver\n");
+
+       rtc = rtc_device_register("ds1390",
+                               &spi->dev, &ds1390_rtc_ops, THIS_MODULE);
+       if (IS_ERR(rtc)) {
+               printk(KERN_ALERT "RTC : unable to register device\n");
+               return PTR_ERR(rtc);
+       }
+
+       spi->mode = SPI_MODE_3;
+       spi->bits_per_word = 8;
+       spi_setup(spi);
+
+       chip = kzalloc(sizeof *chip, GFP_KERNEL);
+       if (!chip) {
+               printk(KERN_ALERT "RTC : unable to allocate device memory\n");
+               rtc_device_unregister(rtc);
+               return -ENOMEM;
+       }
+       chip->rtc = rtc;
+       dev_set_drvdata(&spi->dev, chip);
+
+       res = ds1390_get_reg(&spi->dev, DS1390_REG_SECONDS, &tmp);
+       if (res) {
+               printk(KERN_ALERT "RTC : unable to read device\n");
+               rtc_device_unregister(rtc);
+               return res;
+       }
+
+       return 0;
+}
+
+static int __devexit ds1390_remove(struct spi_device *spi)
+{
+       struct ds1390 *chip = platform_get_drvdata(spi);
+       struct rtc_device *rtc = chip->rtc;
+
+       if (rtc)
+               rtc_device_unregister(rtc);
+
+       kfree(chip);
+
+       return 0;
+}
+
+static struct spi_driver ds1390_driver = {
+       .driver = {
+               .name   = "rtc-ds1390",
+               .owner  = THIS_MODULE,
+       },
+       .probe  = ds1390_probe,
+       .remove = __devexit_p(ds1390_remove),
+};
+
+static __init int ds1390_init(void)
+{
+       return spi_register_driver(&ds1390_driver);
+}
+module_init(ds1390_init);
+
+static __exit void ds1390_exit(void)
+{
+       spi_unregister_driver(&ds1390_driver);
+}
+module_exit(ds1390_exit);
+
+MODULE_DESCRIPTION("DS1390/93/94 SPI RTC driver");
+MODULE_AUTHOR("Mark Jackson <mpfj@mimc.co.uk>");
+MODULE_LICENSE("GPL");
index 341d7a5b45a28c3ecab9de39f9c0e515e5ac4331..4e91419e8911c50bcfbc18aa1d536e88c41178c0 100644 (file)
@@ -209,12 +209,18 @@ static int ds1672_probe(struct i2c_client *client,
        return err;
 }
 
+static struct i2c_device_id ds1672_id[] = {
+       { "ds1672", 0 },
+       { }
+};
+
 static struct i2c_driver ds1672_driver = {
        .driver = {
                   .name = "rtc-ds1672",
                   },
        .probe = &ds1672_probe,
        .remove = &ds1672_remove,
+       .id_table = ds1672_id,
 };
 
 static int __init ds1672_init(void)
index 80782798763fa2528993ed652b0cf337e9d79008..a4f6665ab3c56760bbf72f63e05649d69dda3a03 100644 (file)
@@ -247,12 +247,18 @@ max6900_probe(struct i2c_client *client, const struct i2c_device_id *id)
        return 0;
 }
 
+static struct i2c_device_id max6900_id[] = {
+       { "max6900", 0 },
+       { }
+};
+
 static struct i2c_driver max6900_driver = {
        .driver = {
                   .name = "rtc-max6900",
                   },
        .probe = max6900_probe,
        .remove = max6900_remove,
+       .id_table = max6900_id,
 };
 
 static int __init max6900_init(void)
diff --git a/drivers/rtc/rtc-rx8581.c b/drivers/rtc/rtc-rx8581.c
new file mode 100644 (file)
index 0000000..c9522f3
--- /dev/null
@@ -0,0 +1,281 @@
+/*
+ * An I2C driver for the Epson RX8581 RTC
+ *
+ * Author: Martyn Welch <martyn.welch@gefanuc.com>
+ * Copyright 2008 GE Fanuc Intelligent Platforms Embedded Systems, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Based on: rtc-pcf8563.c (An I2C driver for the Philips PCF8563 RTC)
+ * Copyright 2005-06 Tower Technologies
+ */
+
+#include <linux/module.h>
+#include <linux/i2c.h>
+#include <linux/bcd.h>
+#include <linux/rtc.h>
+#include <linux/log2.h>
+
+#define DRV_VERSION "0.1"
+
+#define RX8581_REG_SC          0x00 /* Second in BCD */
+#define RX8581_REG_MN          0x01 /* Minute in BCD */
+#define RX8581_REG_HR          0x02 /* Hour in BCD */
+#define RX8581_REG_DW          0x03 /* Day of Week */
+#define RX8581_REG_DM          0x04 /* Day of Month in BCD */
+#define RX8581_REG_MO          0x05 /* Month in BCD */
+#define RX8581_REG_YR          0x06 /* Year in BCD */
+#define RX8581_REG_RAM         0x07 /* RAM */
+#define RX8581_REG_AMN         0x08 /* Alarm Min in BCD*/
+#define RX8581_REG_AHR         0x09 /* Alarm Hour in BCD */
+#define RX8581_REG_ADM         0x0A
+#define RX8581_REG_ADW         0x0A
+#define RX8581_REG_TMR0                0x0B
+#define RX8581_REG_TMR1                0x0C
+#define RX8581_REG_EXT         0x0D /* Extension Register */
+#define RX8581_REG_FLAG                0x0E /* Flag Register */
+#define RX8581_REG_CTRL                0x0F /* Control Register */
+
+
+/* Flag Register bit definitions */
+#define RX8581_FLAG_UF         0x20 /* Update */
+#define RX8581_FLAG_TF         0x10 /* Timer */
+#define RX8581_FLAG_AF         0x08 /* Alarm */
+#define RX8581_FLAG_VLF                0x02 /* Voltage Low */
+
+/* Control Register bit definitions */
+#define RX8581_CTRL_UIE                0x20 /* Update Interrupt Enable */
+#define RX8581_CTRL_TIE                0x10 /* Timer Interrupt Enable */
+#define RX8581_CTRL_AIE                0x08 /* Alarm Interrupt Enable */
+#define RX8581_CTRL_STOP       0x02 /* STOP bit */
+#define RX8581_CTRL_RESET      0x01 /* RESET bit */
+
+static struct i2c_driver rx8581_driver;
+
+/*
+ * In the routines that deal directly with the rx8581 hardware, we use
+ * rtc_time -- month 0-11, hour 0-23, yr = calendar year-epoch.
+ */
+static int rx8581_get_datetime(struct i2c_client *client, struct rtc_time *tm)
+{
+       unsigned char date[7];
+       int data, err;
+
+       /* First we ensure that the "update flag" is not set, we read the
+        * time and date then re-read the "update flag". If the update flag
+        * has been set, we know that the time has changed during the read so
+        * we repeat the whole process again.
+        */
+       data = i2c_smbus_read_byte_data(client, RX8581_REG_FLAG);
+       if (data < 0) {
+               dev_err(&client->dev, "Unable to read device flags\n");
+               return -EIO;
+       }
+
+       do {
+               /* If update flag set, clear it */
+               if (data & RX8581_FLAG_UF) {
+                       err = i2c_smbus_write_byte_data(client,
+                               RX8581_REG_FLAG, (data & ~RX8581_FLAG_UF));
+                       if (err != 0) {
+                               dev_err(&client->dev, "Unable to write device "
+                                       "flags\n");
+                               return -EIO;
+                       }
+               }
+
+               /* Now read time and date */
+               err = i2c_smbus_read_i2c_block_data(client, RX8581_REG_SC,
+                       7, date);
+               if (err < 0) {
+                       dev_err(&client->dev, "Unable to read date\n");
+                       return -EIO;
+               }
+
+               /* Check flag register */
+               data = i2c_smbus_read_byte_data(client, RX8581_REG_FLAG);
+               if (data < 0) {
+                       dev_err(&client->dev, "Unable to read device flags\n");
+                       return -EIO;
+               }
+       } while (data & RX8581_FLAG_UF);
+
+       if (data & RX8581_FLAG_VLF)
+               dev_info(&client->dev,
+                       "low voltage detected, date/time is not reliable.\n");
+
+       dev_dbg(&client->dev,
+               "%s: raw data is sec=%02x, min=%02x, hr=%02x, "
+               "wday=%02x, mday=%02x, mon=%02x, year=%02x\n",
+               __func__,
+               date[0], date[1], date[2], date[3], date[4], date[5], date[6]);
+
+       tm->tm_sec = bcd2bin(date[RX8581_REG_SC] & 0x7F);
+       tm->tm_min = bcd2bin(date[RX8581_REG_MN] & 0x7F);
+       tm->tm_hour = bcd2bin(date[RX8581_REG_HR] & 0x3F); /* rtc hr 0-23 */
+       tm->tm_wday = ilog2(date[RX8581_REG_DW] & 0x7F);
+       tm->tm_mday = bcd2bin(date[RX8581_REG_DM] & 0x3F);
+       tm->tm_mon = bcd2bin(date[RX8581_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */
+       tm->tm_year = bcd2bin(date[RX8581_REG_YR]);
+       if (tm->tm_year < 70)
+               tm->tm_year += 100;     /* assume we are in 1970...2069 */
+
+
+       dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
+               "mday=%d, mon=%d, year=%d, wday=%d\n",
+               __func__,
+               tm->tm_sec, tm->tm_min, tm->tm_hour,
+               tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
+
+       err = rtc_valid_tm(tm);
+       if (err < 0)
+               dev_err(&client->dev, "retrieved date/time is not valid.\n");
+
+       return err;
+}
+
+static int rx8581_set_datetime(struct i2c_client *client, struct rtc_time *tm)
+{
+       int data, err;
+       unsigned char buf[7];
+
+       dev_dbg(&client->dev, "%s: secs=%d, mins=%d, hours=%d, "
+               "mday=%d, mon=%d, year=%d, wday=%d\n",
+               __func__,
+               tm->tm_sec, tm->tm_min, tm->tm_hour,
+               tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
+
+       /* hours, minutes and seconds */
+       buf[RX8581_REG_SC] = bin2bcd(tm->tm_sec);
+       buf[RX8581_REG_MN] = bin2bcd(tm->tm_min);
+       buf[RX8581_REG_HR] = bin2bcd(tm->tm_hour);
+
+       buf[RX8581_REG_DM] = bin2bcd(tm->tm_mday);
+
+       /* month, 1 - 12 */
+       buf[RX8581_REG_MO] = bin2bcd(tm->tm_mon + 1);
+
+       /* year and century */
+       buf[RX8581_REG_YR] = bin2bcd(tm->tm_year % 100);
+       buf[RX8581_REG_DW] = (0x1 << tm->tm_wday);
+
+       /* Stop the clock */
+       data = i2c_smbus_read_byte_data(client, RX8581_REG_CTRL);
+       if (data < 0) {
+               dev_err(&client->dev, "Unable to read control register\n");
+               return -EIO;
+       }
+
+       err = i2c_smbus_write_byte_data(client, RX8581_REG_FLAG,
+               (data | RX8581_CTRL_STOP));
+       if (err < 0) {
+               dev_err(&client->dev, "Unable to write control register\n");
+               return -EIO;
+       }
+
+       /* write register's data */
+       err = i2c_smbus_write_i2c_block_data(client, RX8581_REG_SC, 7, buf);
+       if (err < 0) {
+               dev_err(&client->dev, "Unable to write to date registers\n");
+               return -EIO;
+       }
+
+       /* Restart the clock */
+       data = i2c_smbus_read_byte_data(client, RX8581_REG_CTRL);
+       if (data < 0) {
+               dev_err(&client->dev, "Unable to read control register\n");
+               return -EIO;
+       }
+
+       err = i2c_smbus_write_byte_data(client, RX8581_REG_FLAG,
+               (data | ~(RX8581_CTRL_STOP)));
+       if (err != 0) {
+               dev_err(&client->dev, "Unable to write control register\n");
+               return -EIO;
+       }
+
+       return 0;
+}
+
+static int rx8581_rtc_read_time(struct device *dev, struct rtc_time *tm)
+{
+       return rx8581_get_datetime(to_i2c_client(dev), tm);
+}
+
+static int rx8581_rtc_set_time(struct device *dev, struct rtc_time *tm)
+{
+       return rx8581_set_datetime(to_i2c_client(dev), tm);
+}
+
+static const struct rtc_class_ops rx8581_rtc_ops = {
+       .read_time      = rx8581_rtc_read_time,
+       .set_time       = rx8581_rtc_set_time,
+};
+
+static int __devinit rx8581_probe(struct i2c_client *client,
+                               const struct i2c_device_id *id)
+{
+       struct rtc_device *rtc;
+
+       dev_dbg(&client->dev, "%s\n", __func__);
+
+       if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
+               return -ENODEV;
+
+       dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n");
+
+       rtc = rtc_device_register(rx8581_driver.driver.name,
+                               &client->dev, &rx8581_rtc_ops, THIS_MODULE);
+
+       if (IS_ERR(rtc))
+               return PTR_ERR(rtc);
+
+       i2c_set_clientdata(client, rtc);
+
+       return 0;
+}
+
+static int __devexit rx8581_remove(struct i2c_client *client)
+{
+       struct rtc_device *rtc = i2c_get_clientdata(client);
+
+       rtc_device_unregister(rtc);
+
+       return 0;
+}
+
+static const struct i2c_device_id rx8581_id[] = {
+       { "rx8581", 0 },
+       { }
+};
+MODULE_DEVICE_TABLE(i2c, rx8581_id);
+
+static struct i2c_driver rx8581_driver = {
+       .driver         = {
+               .name   = "rtc-rx8581",
+               .owner  = THIS_MODULE,
+       },
+       .probe          = rx8581_probe,
+       .remove         = __devexit_p(rx8581_remove),
+       .id_table       = rx8581_id,
+};
+
+static int __init rx8581_init(void)
+{
+       return i2c_add_driver(&rx8581_driver);
+}
+
+static void __exit rx8581_exit(void)
+{
+       i2c_del_driver(&rx8581_driver);
+}
+
+MODULE_AUTHOR("Martyn Welch <martyn.welch@gefanuc.com>");
+MODULE_DESCRIPTION("Epson RX-8581 RTC driver");
+MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_VERSION);
+
+module_init(rx8581_init);
+module_exit(rx8581_exit);
index 7ccb0dd700af250946f3ad160ddf9237a2c88ca2..5be98bfd7ed3ec6149b89bd6df1a268d52748776 100644 (file)
@@ -6,7 +6,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
-#include <linux/time.h>
 #include <linux/rtc.h>
 #include <linux/platform_device.h>
 
@@ -16,11 +15,6 @@ MODULE_AUTHOR("David S. Miller <davem@davemloft.net>");
 MODULE_DESCRIPTION("Starfire RTC driver");
 MODULE_LICENSE("GPL");
 
-struct starfire_rtc {
-       struct rtc_device       *rtc;
-       spinlock_t              lock;
-};
-
 static u32 starfire_get_time(void)
 {
        static char obp_gettod[32];
@@ -35,64 +29,31 @@ static u32 starfire_get_time(void)
 
 static int starfire_read_time(struct device *dev, struct rtc_time *tm)
 {
-       struct starfire_rtc *p = dev_get_drvdata(dev);
-       unsigned long flags, secs;
-
-       spin_lock_irqsave(&p->lock, flags);
-       secs = starfire_get_time();
-       spin_unlock_irqrestore(&p->lock, flags);
-
-       rtc_time_to_tm(secs, tm);
-
-       return 0;
-}
-
-static int starfire_set_time(struct device *dev, struct rtc_time *tm)
-{
-       unsigned long secs;
-       int err;
-
-       err = rtc_tm_to_time(tm, &secs);
-       if (err)
-               return err;
-
-       /* Do nothing, time is set using the service processor
-        * console on this platform.
-        */
-       return 0;
+       rtc_time_to_tm(starfire_get_time(), tm);
+       return rtc_valid_tm(tm);
 }
 
 static const struct rtc_class_ops starfire_rtc_ops = {
        .read_time      = starfire_read_time,
-       .set_time       = starfire_set_time,
 };
 
-static int __devinit starfire_rtc_probe(struct platform_device *pdev)
+static int __init starfire_rtc_probe(struct platform_device *pdev)
 {
-       struct starfire_rtc *p = kzalloc(sizeof(*p), GFP_KERNEL);
-
-       if (!p)
-               return -ENOMEM;
+       struct rtc_device *rtc = rtc_device_register("starfire", &pdev->dev,
+                                    &starfire_rtc_ops, THIS_MODULE);
+       if (IS_ERR(rtc))
+               return PTR_ERR(rtc);
 
-       spin_lock_init(&p->lock);
+       platform_set_drvdata(pdev, rtc);
 
-       p->rtc = rtc_device_register("starfire", &pdev->dev,
-                                    &starfire_rtc_ops, THIS_MODULE);
-       if (IS_ERR(p->rtc)) {
-               int err = PTR_ERR(p->rtc);
-               kfree(p);
-               return err;
-       }
-       platform_set_drvdata(pdev, p);
        return 0;
 }
 
-static int __devexit starfire_rtc_remove(struct platform_device *pdev)
+static int __exit starfire_rtc_remove(struct platform_device *pdev)
 {
-       struct starfire_rtc *p = platform_get_drvdata(pdev);
+       struct rtc_device *rtc = platform_get_drvdata(pdev);
 
-       rtc_device_unregister(p->rtc);
-       kfree(p);
+       rtc_device_unregister(rtc);
 
        return 0;
 }
@@ -102,13 +63,12 @@ static struct platform_driver starfire_rtc_driver = {
                .name   = "rtc-starfire",
                .owner  = THIS_MODULE,
        },
-       .probe          = starfire_rtc_probe,
-       .remove         = __devexit_p(starfire_rtc_remove),
+       .remove         = __exit_p(starfire_rtc_remove),
 };
 
 static int __init starfire_rtc_init(void)
 {
-       return platform_driver_register(&starfire_rtc_driver);
+       return platform_driver_probe(&starfire_rtc_driver, starfire_rtc_probe);
 }
 
 static void __exit starfire_rtc_exit(void)
index 2012ccbb4a539dbfaab57ac83558f4a8f712f021..5b2261052a6550c7501c2eb02d2935a8578dfa4d 100644 (file)
@@ -1,4 +1,4 @@
-/* rtc-sun4c.c: Hypervisor based RTC for SUN4V systems.
+/* rtc-sun4v.c: Hypervisor based RTC for SUN4V systems.
  *
  * Copyright (C) 2008 David S. Miller <davem@davemloft.net>
  */
@@ -7,21 +7,11 @@
 #include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/init.h>
-#include <linux/time.h>
 #include <linux/rtc.h>
 #include <linux/platform_device.h>
 
 #include <asm/hypervisor.h>
 
-MODULE_AUTHOR("David S. Miller <davem@davemloft.net>");
-MODULE_DESCRIPTION("SUN4V RTC driver");
-MODULE_LICENSE("GPL");
-
-struct sun4v_rtc {
-       struct rtc_device       *rtc;
-       spinlock_t              lock;
-};
-
 static unsigned long hypervisor_get_time(void)
 {
        unsigned long ret, time;
@@ -45,15 +35,7 @@ retry:
 
 static int sun4v_read_time(struct device *dev, struct rtc_time *tm)
 {
-       struct sun4v_rtc *p = dev_get_drvdata(dev);
-       unsigned long flags, secs;
-
-       spin_lock_irqsave(&p->lock, flags);
-       secs = hypervisor_get_time();
-       spin_unlock_irqrestore(&p->lock, flags);
-
-       rtc_time_to_tm(secs, tm);
-
+       rtc_time_to_tm(hypervisor_get_time(), tm);
        return 0;
 }
 
@@ -80,19 +62,14 @@ retry:
 
 static int sun4v_set_time(struct device *dev, struct rtc_time *tm)
 {
-       struct sun4v_rtc *p = dev_get_drvdata(dev);
-       unsigned long flags, secs;
+       unsigned long secs;
        int err;
 
        err = rtc_tm_to_time(tm, &secs);
        if (err)
                return err;
 
-       spin_lock_irqsave(&p->lock, flags);
-       err = hypervisor_set_time(secs);
-       spin_unlock_irqrestore(&p->lock, flags);
-
-       return err;
+       return hypervisor_set_time(secs);
 }
 
 static const struct rtc_class_ops sun4v_rtc_ops = {
@@ -100,33 +77,22 @@ static const struct rtc_class_ops sun4v_rtc_ops = {
        .set_time       = sun4v_set_time,
 };
 
-static int __devinit sun4v_rtc_probe(struct platform_device *pdev)
+static int __init sun4v_rtc_probe(struct platform_device *pdev)
 {
-       struct sun4v_rtc *p = kzalloc(sizeof(*p), GFP_KERNEL);
-
-       if (!p)
-               return -ENOMEM;
-
-       spin_lock_init(&p->lock);
-
-       p->rtc = rtc_device_register("sun4v", &pdev->dev,
+       struct rtc_device *rtc = rtc_device_register("sun4v", &pdev->dev,
                                     &sun4v_rtc_ops, THIS_MODULE);
-       if (IS_ERR(p->rtc)) {
-               int err = PTR_ERR(p->rtc);
-               kfree(p);
-               return err;
-       }
-       platform_set_drvdata(pdev, p);
+       if (IS_ERR(rtc))
+               return PTR_ERR(rtc);
+
+       platform_set_drvdata(pdev, rtc);
        return 0;
 }
 
-static int __devexit sun4v_rtc_remove(struct platform_device *pdev)
+static int __exit sun4v_rtc_remove(struct platform_device *pdev)
 {
-       struct sun4v_rtc *p = platform_get_drvdata(pdev);
-
-       rtc_device_unregister(p->rtc);
-       kfree(p);
+       struct rtc_device *rtc = platform_get_drvdata(pdev);
 
+       rtc_device_unregister(rtc);
        return 0;
 }
 
@@ -135,13 +101,12 @@ static struct platform_driver sun4v_rtc_driver = {
                .name   = "rtc-sun4v",
                .owner  = THIS_MODULE,
        },
-       .probe          = sun4v_rtc_probe,
-       .remove         = __devexit_p(sun4v_rtc_remove),
+       .remove         = __exit_p(sun4v_rtc_remove),
 };
 
 static int __init sun4v_rtc_init(void)
 {
-       return platform_driver_register(&sun4v_rtc_driver);
+       return platform_driver_probe(&sun4v_rtc_driver, sun4v_rtc_probe);
 }
 
 static void __exit sun4v_rtc_exit(void)
@@ -151,3 +116,7 @@ static void __exit sun4v_rtc_exit(void)
 
 module_init(sun4v_rtc_init);
 module_exit(sun4v_rtc_exit);
+
+MODULE_AUTHOR("David S. Miller <davem@davemloft.net>");
+MODULE_DESCRIPTION("SUN4V RTC driver");
+MODULE_LICENSE("GPL");
index abe87a4d266520d67976ac7f7620cbdfe07446c2..01d8da9afdc8506f0469a3b8a8c6284b98a235fe 100644 (file)
@@ -337,7 +337,7 @@ static int twl4030_rtc_ioctl(struct device *dev, unsigned int cmd,
 }
 
 #else
-#define        omap_rtc_ioctl  NULL
+#define        twl4030_rtc_ioctl       NULL
 #endif
 
 static irqreturn_t twl4030_rtc_interrupt(int irq, void *rtc)
diff --git a/drivers/rtc/rtc-wm8350.c b/drivers/rtc/rtc-wm8350.c
new file mode 100644 (file)
index 0000000..5c5e3aa
--- /dev/null
@@ -0,0 +1,514 @@
+/*
+ *     Real Time Clock driver for Wolfson Microelectronics WM8350
+ *
+ *     Copyright (C) 2007, 2008 Wolfson Microelectronics PLC.
+ *
+ *  Author: Liam Girdwood
+ *          linux@wolfsonmicro.com
+ *
+ *  This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/time.h>
+#include <linux/rtc.h>
+#include <linux/bcd.h>
+#include <linux/interrupt.h>
+#include <linux/ioctl.h>
+#include <linux/completion.h>
+#include <linux/mfd/wm8350/rtc.h>
+#include <linux/mfd/wm8350/core.h>
+#include <linux/delay.h>
+#include <linux/platform_device.h>
+
+#define WM8350_SET_ALM_RETRIES 5
+#define WM8350_SET_TIME_RETRIES        5
+#define WM8350_GET_TIME_RETRIES        5
+
+#define to_wm8350_from_rtc_dev(d) container_of(d, struct wm8350, rtc.pdev.dev)
+
+/*
+ * Read current time and date in RTC
+ */
+static int wm8350_rtc_readtime(struct device *dev, struct rtc_time *tm)
+{
+       struct wm8350 *wm8350 = dev_get_drvdata(dev);
+       u16 time1[4], time2[4];
+       int retries = WM8350_GET_TIME_RETRIES, ret;
+
+       /*
+        * Read the time twice and compare.
+        * If time1 == time2, then time is valid else retry.
+        */
+       do {
+               ret = wm8350_block_read(wm8350, WM8350_RTC_SECONDS_MINUTES,
+                                       4, time1);
+               if (ret < 0)
+                       return ret;
+               ret = wm8350_block_read(wm8350, WM8350_RTC_SECONDS_MINUTES,
+                                       4, time2);
+               if (ret < 0)
+                       return ret;
+
+               if (memcmp(time1, time2, sizeof(time1)) == 0) {
+                       tm->tm_sec = time1[0] & WM8350_RTC_SECS_MASK;
+
+                       tm->tm_min = (time1[0] & WM8350_RTC_MINS_MASK)
+                           >> WM8350_RTC_MINS_SHIFT;
+
+                       tm->tm_hour = time1[1] & WM8350_RTC_HRS_MASK;
+
+                       tm->tm_wday = ((time1[1] >> WM8350_RTC_DAY_SHIFT)
+                                      & 0x7) - 1;
+
+                       tm->tm_mon = ((time1[2] & WM8350_RTC_MTH_MASK)
+                                     >> WM8350_RTC_MTH_SHIFT) - 1;
+
+                       tm->tm_mday = (time1[2] & WM8350_RTC_DATE_MASK);
+
+                       tm->tm_year = ((time1[3] & WM8350_RTC_YHUNDREDS_MASK)
+                                      >> WM8350_RTC_YHUNDREDS_SHIFT) * 100;
+                       tm->tm_year += time1[3] & WM8350_RTC_YUNITS_MASK;
+
+                       tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon,
+                                                   tm->tm_year);
+                       tm->tm_year -= 1900;
+
+                       dev_dbg(dev, "Read (%d left): %04x %04x %04x %04x\n",
+                               retries,
+                               time1[0], time1[1], time1[2], time1[3]);
+
+                       return 0;
+               }
+       } while (retries--);
+
+       dev_err(dev, "timed out reading RTC time\n");
+       return -EIO;
+}
+
+/*
+ * Set current time and date in RTC
+ */
+static int wm8350_rtc_settime(struct device *dev, struct rtc_time *tm)
+{
+       struct wm8350 *wm8350 = dev_get_drvdata(dev);
+       u16 time[4];
+       u16 rtc_ctrl;
+       int ret, retries = WM8350_SET_TIME_RETRIES;
+
+       time[0] = tm->tm_sec;
+       time[0] |= tm->tm_min << WM8350_RTC_MINS_SHIFT;
+       time[1] = tm->tm_hour;
+       time[1] |= (tm->tm_wday + 1) << WM8350_RTC_DAY_SHIFT;
+       time[2] = tm->tm_mday;
+       time[2] |= (tm->tm_mon + 1) << WM8350_RTC_MTH_SHIFT;
+       time[3] = ((tm->tm_year + 1900) / 100) << WM8350_RTC_YHUNDREDS_SHIFT;
+       time[3] |= (tm->tm_year + 1900) % 100;
+
+       dev_dbg(dev, "Setting: %04x %04x %04x %04x\n",
+               time[0], time[1], time[2], time[3]);
+
+       /* Set RTC_SET to stop the clock */
+       ret = wm8350_set_bits(wm8350, WM8350_RTC_TIME_CONTROL, WM8350_RTC_SET);
+       if (ret < 0)
+               return ret;
+
+       /* Wait until confirmation of stopping */
+       do {
+               rtc_ctrl = wm8350_reg_read(wm8350, WM8350_RTC_TIME_CONTROL);
+               schedule_timeout_uninterruptible(msecs_to_jiffies(1));
+       } while (retries-- && !(rtc_ctrl & WM8350_RTC_STS));
+
+       if (!retries) {
+               dev_err(dev, "timed out on set confirmation\n");
+               return -EIO;
+       }
+
+       /* Write time to RTC */
+       ret = wm8350_block_write(wm8350, WM8350_RTC_SECONDS_MINUTES, 4, time);
+       if (ret < 0)
+               return ret;
+
+       /* Clear RTC_SET to start the clock */
+       ret = wm8350_clear_bits(wm8350, WM8350_RTC_TIME_CONTROL,
+                               WM8350_RTC_SET);
+       return ret;
+}
+
+/*
+ * Read alarm time and date in RTC
+ */
+static int wm8350_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm)
+{
+       struct wm8350 *wm8350 = dev_get_drvdata(dev);
+       struct rtc_time *tm = &alrm->time;
+       u16 time[4];
+       int ret;
+
+       ret = wm8350_block_read(wm8350, WM8350_ALARM_SECONDS_MINUTES, 4, time);
+       if (ret < 0)
+               return ret;
+
+       tm->tm_sec = time[0] & WM8350_RTC_ALMSECS_MASK;
+       if (tm->tm_sec == WM8350_RTC_ALMSECS_MASK)
+               tm->tm_sec = -1;
+
+       tm->tm_min = time[0] & WM8350_RTC_ALMMINS_MASK;
+       if (tm->tm_min == WM8350_RTC_ALMMINS_MASK)
+               tm->tm_min = -1;
+       else
+               tm->tm_min >>= WM8350_RTC_ALMMINS_SHIFT;
+
+       tm->tm_hour = time[1] & WM8350_RTC_ALMHRS_MASK;
+       if (tm->tm_hour == WM8350_RTC_ALMHRS_MASK)
+               tm->tm_hour = -1;
+
+       tm->tm_wday = ((time[1] >> WM8350_RTC_ALMDAY_SHIFT) & 0x7) - 1;
+       if (tm->tm_wday > 7)
+               tm->tm_wday = -1;
+
+       tm->tm_mon = time[2] & WM8350_RTC_ALMMTH_MASK;
+       if (tm->tm_mon == WM8350_RTC_ALMMTH_MASK)
+               tm->tm_mon = -1;
+       else
+               tm->tm_mon = (tm->tm_mon >> WM8350_RTC_ALMMTH_SHIFT) - 1;
+
+       tm->tm_mday = (time[2] & WM8350_RTC_ALMDATE_MASK);
+       if (tm->tm_mday == WM8350_RTC_ALMDATE_MASK)
+               tm->tm_mday = -1;
+
+       tm->tm_year = -1;
+
+       alrm->enabled = !(time[3] & WM8350_RTC_ALMSTS);
+
+       return 0;
+}
+
+static int wm8350_rtc_stop_alarm(struct wm8350 *wm8350)
+{
+       int retries = WM8350_SET_ALM_RETRIES;
+       u16 rtc_ctrl;
+       int ret;
+
+       /* Set RTC_SET to stop the clock */
+       ret = wm8350_set_bits(wm8350, WM8350_RTC_TIME_CONTROL,
+                             WM8350_RTC_ALMSET);
+       if (ret < 0)
+               return ret;
+
+       /* Wait until confirmation of stopping */
+       do {
+               rtc_ctrl = wm8350_reg_read(wm8350, WM8350_RTC_TIME_CONTROL);
+               schedule_timeout_uninterruptible(msecs_to_jiffies(1));
+       } while (retries-- && !(rtc_ctrl & WM8350_RTC_ALMSTS));
+
+       if (!(rtc_ctrl & WM8350_RTC_ALMSTS))
+               return -ETIMEDOUT;
+
+       return 0;
+}
+
+static int wm8350_rtc_start_alarm(struct wm8350 *wm8350)
+{
+       int ret;
+       int retries = WM8350_SET_ALM_RETRIES;
+       u16 rtc_ctrl;
+
+       ret = wm8350_clear_bits(wm8350, WM8350_RTC_TIME_CONTROL,
+                               WM8350_RTC_ALMSET);
+       if (ret < 0)
+               return ret;
+
+       /* Wait until confirmation */
+       do {
+               rtc_ctrl = wm8350_reg_read(wm8350, WM8350_RTC_TIME_CONTROL);
+               schedule_timeout_uninterruptible(msecs_to_jiffies(1));
+       } while (retries-- && rtc_ctrl & WM8350_RTC_ALMSTS);
+
+       if (rtc_ctrl & WM8350_RTC_ALMSTS)
+               return -ETIMEDOUT;
+
+       return 0;
+}
+
+static int wm8350_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
+{
+       struct wm8350 *wm8350 = dev_get_drvdata(dev);
+       struct rtc_time *tm = &alrm->time;
+       u16 time[3];
+       int ret;
+
+       memset(time, 0, sizeof(time));
+
+       if (tm->tm_sec != -1)
+               time[0] |= tm->tm_sec;
+       else
+               time[0] |= WM8350_RTC_ALMSECS_MASK;
+
+       if (tm->tm_min != -1)
+               time[0] |= tm->tm_min << WM8350_RTC_ALMMINS_SHIFT;
+       else
+               time[0] |= WM8350_RTC_ALMMINS_MASK;
+
+       if (tm->tm_hour != -1)
+               time[1] |= tm->tm_hour;
+       else
+               time[1] |= WM8350_RTC_ALMHRS_MASK;
+
+       if (tm->tm_wday != -1)
+               time[1] |= (tm->tm_wday + 1) << WM8350_RTC_ALMDAY_SHIFT;
+       else
+               time[1] |= WM8350_RTC_ALMDAY_MASK;
+
+       if (tm->tm_mday != -1)
+               time[2] |= tm->tm_mday;
+       else
+               time[2] |= WM8350_RTC_ALMDATE_MASK;
+
+       if (tm->tm_mon != -1)
+               time[2] |= (tm->tm_mon + 1) << WM8350_RTC_ALMMTH_SHIFT;
+       else
+               time[2] |= WM8350_RTC_ALMMTH_MASK;
+
+       ret = wm8350_rtc_stop_alarm(wm8350);
+       if (ret < 0)
+               return ret;
+
+       /* Write time to RTC */
+       ret = wm8350_block_write(wm8350, WM8350_ALARM_SECONDS_MINUTES,
+                                3, time);
+       if (ret < 0)
+               return ret;
+
+       if (alrm->enabled)
+               ret = wm8350_rtc_start_alarm(wm8350);
+
+       return ret;
+}
+
+/*
+ * Handle commands from user-space
+ */
+static int wm8350_rtc_ioctl(struct device *dev, unsigned int cmd,
+                           unsigned long arg)
+{
+       struct wm8350 *wm8350 = dev_get_drvdata(dev);
+
+       switch (cmd) {
+       case RTC_AIE_OFF:
+               return wm8350_rtc_stop_alarm(wm8350);
+       case RTC_AIE_ON:
+               return wm8350_rtc_start_alarm(wm8350);
+
+       case RTC_UIE_OFF:
+               wm8350_mask_irq(wm8350, WM8350_IRQ_RTC_SEC);
+               break;
+       case RTC_UIE_ON:
+               wm8350_unmask_irq(wm8350, WM8350_IRQ_RTC_SEC);
+               break;
+
+       default:
+               return -ENOIOCTLCMD;
+       }
+
+       return 0;
+}
+
+static void wm8350_rtc_alarm_handler(struct wm8350 *wm8350, int irq,
+                                    void *data)
+{
+       struct rtc_device *rtc = wm8350->rtc.rtc;
+       int ret;
+
+       rtc_update_irq(rtc, 1, RTC_IRQF | RTC_AF);
+
+       /* Make it one shot */
+       ret = wm8350_set_bits(wm8350, WM8350_RTC_TIME_CONTROL,
+                             WM8350_RTC_ALMSET);
+       if (ret != 0) {
+               dev_err(&(wm8350->rtc.pdev->dev),
+                       "Failed to disable alarm: %d\n", ret);
+       }
+}
+
+static void wm8350_rtc_update_handler(struct wm8350 *wm8350, int irq,
+                                     void *data)
+{
+       struct rtc_device *rtc = wm8350->rtc.rtc;
+
+       rtc_update_irq(rtc, 1, RTC_IRQF | RTC_UF);
+}
+
+static const struct rtc_class_ops wm8350_rtc_ops = {
+       .ioctl = wm8350_rtc_ioctl,
+       .read_time = wm8350_rtc_readtime,
+       .set_time = wm8350_rtc_settime,
+       .read_alarm = wm8350_rtc_readalarm,
+       .set_alarm = wm8350_rtc_setalarm,
+};
+
+#ifdef CONFIG_PM
+static int wm8350_rtc_suspend(struct platform_device *pdev, pm_message_t state)
+{
+       struct wm8350 *wm8350 = dev_get_drvdata(&pdev->dev);
+       int ret = 0;
+       u16 reg;
+
+       reg = wm8350_reg_read(wm8350, WM8350_RTC_TIME_CONTROL);
+
+       if (device_may_wakeup(&wm8350->rtc.pdev->dev) &&
+           reg & WM8350_RTC_ALMSTS) {
+               ret = wm8350_rtc_stop_alarm(wm8350);
+               if (ret != 0)
+                       dev_err(&pdev->dev, "Failed to stop RTC alarm: %d\n",
+                               ret);
+       }
+
+       return ret;
+}
+
+static int wm8350_rtc_resume(struct platform_device *pdev)
+{
+       struct wm8350 *wm8350 = dev_get_drvdata(&pdev->dev);
+       int ret;
+
+       if (wm8350->rtc.alarm_enabled) {
+               ret = wm8350_rtc_start_alarm(wm8350);
+               if (ret != 0)
+                       dev_err(&pdev->dev,
+                               "Failed to restart RTC alarm: %d\n", ret);
+       }
+
+       return 0;
+}
+
+#else
+#define wm8350_rtc_suspend NULL
+#define wm8350_rtc_resume NULL
+#endif
+
+static int wm8350_rtc_probe(struct platform_device *pdev)
+{
+       struct wm8350 *wm8350 = platform_get_drvdata(pdev);
+       struct wm8350_rtc *wm_rtc = &wm8350->rtc;
+       int ret = 0;
+       u16 timectl, power5;
+
+       timectl = wm8350_reg_read(wm8350, WM8350_RTC_TIME_CONTROL);
+       if (timectl & WM8350_RTC_BCD) {
+               dev_err(&pdev->dev, "RTC BCD mode not supported\n");
+               return -EINVAL;
+       }
+       if (timectl & WM8350_RTC_12HR) {
+               dev_err(&pdev->dev, "RTC 12 hour mode not supported\n");
+               return -EINVAL;
+       }
+
+       /* enable the RTC if it's not already enabled */
+       power5 = wm8350_reg_read(wm8350, WM8350_POWER_MGMT_5);
+       if (!(power5 &  WM8350_RTC_TICK_ENA)) {
+               dev_info(wm8350->dev, "Starting RTC\n");
+
+               wm8350_reg_unlock(wm8350);
+
+               ret = wm8350_set_bits(wm8350, WM8350_POWER_MGMT_5,
+                                     WM8350_RTC_TICK_ENA);
+               if (ret < 0) {
+                       dev_err(&pdev->dev, "failed to enable RTC: %d\n", ret);
+                       return ret;
+               }
+
+               wm8350_reg_lock(wm8350);
+       }
+
+       if (timectl & WM8350_RTC_STS) {
+               int retries;
+
+               ret = wm8350_clear_bits(wm8350, WM8350_RTC_TIME_CONTROL,
+                                       WM8350_RTC_SET);
+               if (ret < 0) {
+                       dev_err(&pdev->dev, "failed to start: %d\n", ret);
+                       return ret;
+               }
+
+               retries = WM8350_SET_TIME_RETRIES;
+               do {
+                       timectl = wm8350_reg_read(wm8350,
+                                                 WM8350_RTC_TIME_CONTROL);
+               } while (timectl & WM8350_RTC_STS && retries--);
+
+               if (retries == 0) {
+                       dev_err(&pdev->dev, "failed to start: timeout\n");
+                       return -ENODEV;
+               }
+       }
+
+       device_init_wakeup(&pdev->dev, 1);
+
+       wm_rtc->rtc = rtc_device_register("wm8350", &pdev->dev,
+                                         &wm8350_rtc_ops, THIS_MODULE);
+       if (IS_ERR(wm_rtc->rtc)) {
+               ret = PTR_ERR(wm_rtc->rtc);
+               dev_err(&pdev->dev, "failed to register RTC: %d\n", ret);
+               return ret;
+       }
+
+       wm8350_mask_irq(wm8350, WM8350_IRQ_RTC_SEC);
+       wm8350_mask_irq(wm8350, WM8350_IRQ_RTC_PER);
+
+       wm8350_register_irq(wm8350, WM8350_IRQ_RTC_SEC,
+                           wm8350_rtc_update_handler, NULL);
+
+       wm8350_register_irq(wm8350, WM8350_IRQ_RTC_ALM,
+                           wm8350_rtc_alarm_handler, NULL);
+       wm8350_unmask_irq(wm8350, WM8350_IRQ_RTC_ALM);
+
+       return 0;
+}
+
+static int __devexit wm8350_rtc_remove(struct platform_device *pdev)
+{
+       struct wm8350 *wm8350 = platform_get_drvdata(pdev);
+       struct wm8350_rtc *wm_rtc = &wm8350->rtc;
+
+       wm8350_mask_irq(wm8350, WM8350_IRQ_RTC_SEC);
+
+       wm8350_free_irq(wm8350, WM8350_IRQ_RTC_SEC);
+       wm8350_free_irq(wm8350, WM8350_IRQ_RTC_ALM);
+
+       rtc_device_unregister(wm_rtc->rtc);
+
+       return 0;
+}
+
+static struct platform_driver wm8350_rtc_driver = {
+       .probe = wm8350_rtc_probe,
+       .remove = __devexit_p(wm8350_rtc_remove),
+       .suspend = wm8350_rtc_suspend,
+       .resume = wm8350_rtc_resume,
+       .driver = {
+               .name = "wm8350-rtc",
+       },
+};
+
+static int __init wm8350_rtc_init(void)
+{
+       return platform_driver_register(&wm8350_rtc_driver);
+}
+module_init(wm8350_rtc_init);
+
+static void __exit wm8350_rtc_exit(void)
+{
+       platform_driver_unregister(&wm8350_rtc_driver);
+}
+module_exit(wm8350_rtc_exit);
+
+MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
+MODULE_DESCRIPTION("RTC driver for the WM8350");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:wm8350-rtc");
index 4b76fca64a6f1bf5538c8babc8595b15a234aa8e..363bd1303d217aa4904ea088549e8f0bb9f23618 100644 (file)
@@ -1746,6 +1746,11 @@ restart:
                        goto restart;
                }
 
+               /* log sense for fatal error */
+               if (cqr->status == DASD_CQR_FAILED) {
+                       dasd_log_sense(cqr, &cqr->irb);
+               }
+
                /* First of all call extended error reporting. */
                if (dasd_eer_enabled(base) &&
                    cqr->status == DASD_CQR_FAILED) {
index eb5f1b8bc57fd0546c94067a5b57364f3db1addf..ec9c0bcf66eeefd8ee9029675cc193d0af328b0f 100644 (file)
@@ -324,6 +324,9 @@ static int do_assign_storage(sclp_cmdw_t cmd, u16 rn)
        case 0x0120:
                break;
        default:
+               pr_warning("assign storage failed (cmd=0x%08x, "
+                          "response=0x%04x, rn=0x%04x)\n", cmd,
+                          sccb->header.response_code, rn);
                rc = -EIO;
                break;
        }
index 4e78c82194b47520c271be8617ac5202644d395c..4e4008325e281edc58f11b3a211506b3f8bac35a 100644 (file)
@@ -874,11 +874,15 @@ void ccw_device_move_to_orphanage(struct work_struct *work)
        replacing_cdev = get_disc_ccwdev_by_dev_id(&dev_id, cdev);
        if (replacing_cdev) {
                sch_attach_disconnected_device(sch, replacing_cdev);
+               /* Release reference from get_disc_ccwdev_by_dev_id() */
+               put_device(&cdev->dev);
                return;
        }
        replacing_cdev = get_orphaned_ccwdev_by_dev_id(css, &dev_id);
        if (replacing_cdev) {
                sch_attach_orphaned_device(sch, replacing_cdev);
+               /* Release reference from get_orphaned_ccwdev_by_dev_id() */
+               put_device(&cdev->dev);
                return;
        }
        sch_create_and_recog_new_device(sch);
index ff4a6931bb8e680b4f429577fc81e481df4cd786..3d442444c618ccb431d7e4d6b6e1b5bc4f16924b 100644 (file)
@@ -322,13 +322,13 @@ static int __init kvm_devices_init(void)
                return rc;
        }
 
-       rc = vmem_add_mapping(PFN_PHYS(max_pfn), PAGE_SIZE);
+       rc = vmem_add_mapping(real_memory_size, PAGE_SIZE);
        if (rc) {
                s390_root_dev_unregister(kvm_root);
                return rc;
        }
 
-       kvm_devices = (void *) PFN_PHYS(max_pfn);
+       kvm_devices = (void *) real_memory_size;
 
        ctl_set_bit(0, 9);
        register_external_interrupt(0x2603, kvm_extint_handler);
index 3b56220fb900291df60b56284191b6e66119a02d..3d4e3e3f3fc07c873846d75b56d6e338c54475ce 100644 (file)
@@ -610,7 +610,8 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn,
        atomic_set_mask(status | ZFCP_STATUS_COMMON_REMOVE, &port->status);
        atomic_set(&port->refcount, 0);
 
-       dev_set_name(&port->sysfs_device, "0x%016llx", wwpn);
+       dev_set_name(&port->sysfs_device, "0x%016llx",
+                    (unsigned long long)wwpn);
        port->sysfs_device.parent = &adapter->ccw_device->dev;
 
        port->sysfs_device.release = zfcp_sysfs_port_release;
index b04038c74786b32456ded58505b96efd7f4c1756..951a8d409d1d5faa787a058d3f3542f13c9852c6 100644 (file)
@@ -116,7 +116,9 @@ static int zfcp_ccw_set_online(struct ccw_device *ccw_device)
        zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85,
                                NULL);
        zfcp_erp_wait(adapter);
-       goto out;
+       up(&zfcp_data.config_sema);
+       flush_work(&adapter->scan_work);
+       return 0;
 
  out_scsi_register:
        zfcp_erp_thread_kill(adapter);
index 060f5f2352ecb590b74e8667bb703fb1c0e62bc1..31012d58cfb760fb457862bfd596da12f8532310 100644 (file)
@@ -30,7 +30,7 @@ static void zfcp_dbf_hexdump(debug_info_t *dbf, void *to, int to_len,
                dump->offset = offset;
                dump->size = min(from_len - offset, room);
                memcpy(dump->data, from + offset, dump->size);
-               debug_event(dbf, level, dump, dump->size);
+               debug_event(dbf, level, dump, dump->size + sizeof(*dump));
        }
 }
 
@@ -108,7 +108,7 @@ static int zfcp_dbf_view_header(debug_info_t *id, struct debug_view *view,
                             t.tv_sec, t.tv_nsec);
                zfcp_dbf_out(&p, "cpu", "%02i", entry->id.fields.cpuid);
        } else  {
-               zfcp_dbf_outd(&p, NULL, dump->data, dump->size, dump->offset,
+               zfcp_dbf_outd(&p, "", dump->data, dump->size, dump->offset,
                              dump->total_size);
                if ((dump->offset + dump->size) == dump->total_size)
                        p += sprintf(p, "\n");
@@ -366,6 +366,7 @@ static void zfcp_hba_dbf_view_response(char **p,
                        break;
                zfcp_dbf_out(p, "scsi_cmnd", "0x%0Lx", r->u.fcp.cmnd);
                zfcp_dbf_out(p, "scsi_serial", "0x%016Lx", r->u.fcp.serial);
+               p += sprintf(*p, "\n");
                break;
 
        case FSF_QTCB_OPEN_PORT_WITH_DID:
@@ -465,7 +466,8 @@ static int zfcp_hba_dbf_view_format(debug_info_t *id, struct debug_view *view,
        else if (strncmp(r->tag, "berr", ZFCP_DBF_TAG_SIZE) == 0)
                zfcp_hba_dbf_view_berr(&p, &r->u.berr);
 
-       p += sprintf(p, "\n");
+       if (strncmp(r->tag, "resp", ZFCP_DBF_TAG_SIZE) != 0)
+               p += sprintf(p, "\n");
        return p - out_buf;
 }
 
@@ -880,6 +882,7 @@ void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req)
        struct ct_hdr *hdr = sg_virt(ct->req);
        struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf;
        struct zfcp_san_dbf_record_ct_request *oct = &r->u.ct_req;
+       int level = 3;
        unsigned long flags;
 
        spin_lock_irqsave(&adapter->san_dbf_lock, flags);
@@ -896,9 +899,10 @@ void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req)
        oct->options = hdr->options;
        oct->max_res_size = hdr->max_res_size;
        oct->len = min((int)ct->req->length - (int)sizeof(struct ct_hdr),
-                      ZFCP_DBF_CT_PAYLOAD);
-       memcpy(oct->payload, (void *)hdr + sizeof(struct ct_hdr), oct->len);
-       debug_event(adapter->san_dbf, 3, r, sizeof(*r));
+                      ZFCP_DBF_SAN_MAX_PAYLOAD);
+       debug_event(adapter->san_dbf, level, r, sizeof(*r));
+       zfcp_dbf_hexdump(adapter->san_dbf, r, sizeof(*r), level,
+                        (void *)hdr + sizeof(struct ct_hdr), oct->len);
        spin_unlock_irqrestore(&adapter->san_dbf_lock, flags);
 }
 
@@ -914,6 +918,7 @@ void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req)
        struct ct_hdr *hdr = sg_virt(ct->resp);
        struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf;
        struct zfcp_san_dbf_record_ct_response *rct = &r->u.ct_resp;
+       int level = 3;
        unsigned long flags;
 
        spin_lock_irqsave(&adapter->san_dbf_lock, flags);
@@ -929,9 +934,10 @@ void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req)
        rct->expl = hdr->reason_code_expl;
        rct->vendor_unique = hdr->vendor_unique;
        rct->len = min((int)ct->resp->length - (int)sizeof(struct ct_hdr),
-                      ZFCP_DBF_CT_PAYLOAD);
-       memcpy(rct->payload, (void *)hdr + sizeof(struct ct_hdr), rct->len);
-       debug_event(adapter->san_dbf, 3, r, sizeof(*r));
+                      ZFCP_DBF_SAN_MAX_PAYLOAD);
+       debug_event(adapter->san_dbf, level, r, sizeof(*r));
+       zfcp_dbf_hexdump(adapter->san_dbf, r, sizeof(*r), level,
+                        (void *)hdr + sizeof(struct ct_hdr), rct->len);
        spin_unlock_irqrestore(&adapter->san_dbf_lock, flags);
 }
 
@@ -954,7 +960,7 @@ static void zfcp_san_dbf_event_els(const char *tag, int level,
        rec->u.els.ls_code = ls_code;
        debug_event(adapter->san_dbf, level, rec, sizeof(*rec));
        zfcp_dbf_hexdump(adapter->san_dbf, rec, sizeof(*rec), level,
-                        buffer, min(buflen, ZFCP_DBF_ELS_MAX_PAYLOAD));
+                        buffer, min(buflen, ZFCP_DBF_SAN_MAX_PAYLOAD));
        spin_unlock_irqrestore(&adapter->san_dbf_lock, flags);
 }
 
@@ -1008,8 +1014,6 @@ static int zfcp_san_dbf_view_format(debug_info_t *id, struct debug_view *view,
                                    char *out_buf, const char *in_buf)
 {
        struct zfcp_san_dbf_record *r = (struct zfcp_san_dbf_record *)in_buf;
-       char *buffer = NULL;
-       int buflen = 0, total = 0;
        char *p = out_buf;
 
        if (strncmp(r->tag, "dump", ZFCP_DBF_TAG_SIZE) == 0)
@@ -1029,9 +1033,6 @@ static int zfcp_san_dbf_view_format(debug_info_t *id, struct debug_view *view,
                zfcp_dbf_out(&p, "gs_subtype", "0x%02x", ct->gs_subtype);
                zfcp_dbf_out(&p, "options", "0x%02x", ct->options);
                zfcp_dbf_out(&p, "max_res_size", "0x%04x", ct->max_res_size);
-               total = ct->len;
-               buffer = ct->payload;
-               buflen = min(total, ZFCP_DBF_CT_PAYLOAD);
        } else if (strncmp(r->tag, "rctc", ZFCP_DBF_TAG_SIZE) == 0) {
                struct zfcp_san_dbf_record_ct_response *ct = &r->u.ct_resp;
                zfcp_dbf_out(&p, "cmd_rsp_code", "0x%04x", ct->cmd_rsp_code);
@@ -1039,23 +1040,12 @@ static int zfcp_san_dbf_view_format(debug_info_t *id, struct debug_view *view,
                zfcp_dbf_out(&p, "reason_code", "0x%02x", ct->reason_code);
                zfcp_dbf_out(&p, "reason_code_expl", "0x%02x", ct->expl);
                zfcp_dbf_out(&p, "vendor_unique", "0x%02x", ct->vendor_unique);
-               total = ct->len;
-               buffer = ct->payload;
-               buflen = min(total, ZFCP_DBF_CT_PAYLOAD);
        } else if (strncmp(r->tag, "oels", ZFCP_DBF_TAG_SIZE) == 0 ||
                   strncmp(r->tag, "rels", ZFCP_DBF_TAG_SIZE) == 0 ||
                   strncmp(r->tag, "iels", ZFCP_DBF_TAG_SIZE) == 0) {
                struct zfcp_san_dbf_record_els *els = &r->u.els;
                zfcp_dbf_out(&p, "ls_code", "0x%02x", els->ls_code);
-               total = els->len;
-               buffer = els->payload;
-               buflen = min(total, ZFCP_DBF_ELS_PAYLOAD);
        }
-
-       zfcp_dbf_outd(&p, "payload", buffer, buflen, 0, total);
-       if (buflen == total)
-               p += sprintf(p, "\n");
-
        return p - out_buf;
 }
 
index e8f450801fea7f1cd351b7dad1049d02f82ab238..5d6b2dff855bb44e46d7fa6c65f93791b0bf1dfa 100644 (file)
@@ -163,8 +163,6 @@ struct zfcp_san_dbf_record_ct_request {
        u8 options;
        u16 max_res_size;
        u32 len;
-#define ZFCP_DBF_CT_PAYLOAD    24
-       u8 payload[ZFCP_DBF_CT_PAYLOAD];
 } __attribute__ ((packed));
 
 struct zfcp_san_dbf_record_ct_response {
@@ -174,15 +172,11 @@ struct zfcp_san_dbf_record_ct_response {
        u8 expl;
        u8 vendor_unique;
        u32 len;
-       u8 payload[ZFCP_DBF_CT_PAYLOAD];
 } __attribute__ ((packed));
 
 struct zfcp_san_dbf_record_els {
        u8 ls_code;
        u32 len;
-#define ZFCP_DBF_ELS_PAYLOAD   32
-#define ZFCP_DBF_ELS_MAX_PAYLOAD 1024
-       u8 payload[ZFCP_DBF_ELS_PAYLOAD];
 } __attribute__ ((packed));
 
 struct zfcp_san_dbf_record {
@@ -196,6 +190,8 @@ struct zfcp_san_dbf_record {
                struct zfcp_san_dbf_record_ct_response ct_resp;
                struct zfcp_san_dbf_record_els els;
        } u;
+#define ZFCP_DBF_SAN_MAX_PAYLOAD 1024
+       u8 payload[32];
 } __attribute__ ((packed));
 
 struct zfcp_scsi_dbf_record {
index 9040f738ff333f47fd243486c311380f0ea00ebe..c557ba34e1aab5b2c5b7d732e9e076620e9dcc94 100644 (file)
@@ -472,6 +472,7 @@ static void zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *act)
                                   ZFCP_STATUS_ERP_TIMEDOUT)) {
                        act->fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED;
                        zfcp_rec_dbf_event_action(142, act);
+                       act->fsf_req->erp_action = NULL;
                }
                if (act->status & ZFCP_STATUS_ERP_TIMEDOUT)
                        zfcp_rec_dbf_event_action(143, act);
@@ -719,7 +720,6 @@ static int zfcp_erp_adapter_strategy_generic(struct zfcp_erp_action *act,
                goto failed_openfcp;
 
        atomic_set_mask(ZFCP_STATUS_COMMON_OPEN, &act->adapter->status);
-       schedule_work(&act->adapter->scan_work);
 
        return ZFCP_ERP_SUCCEEDED;
 
@@ -1185,7 +1185,9 @@ static void zfcp_erp_scsi_scan(struct work_struct *work)
                container_of(work, struct zfcp_erp_add_work, work);
        struct zfcp_unit *unit = p->unit;
        struct fc_rport *rport = unit->port->rport;
-       scsi_scan_target(&rport->dev, 0, rport->scsi_target_id,
+
+       if (rport && rport->port_state == FC_PORTSTATE_ONLINE)
+               scsi_scan_target(&rport->dev, 0, rport->scsi_target_id,
                         scsilun_to_int((struct scsi_lun *)&unit->fcp_lun), 0);
        atomic_clear_mask(ZFCP_STATUS_UNIT_SCSI_WORK_PENDING, &unit->status);
        zfcp_unit_put(unit);
@@ -1281,6 +1283,8 @@ static void zfcp_erp_action_cleanup(struct zfcp_erp_action *act, int result)
        case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
                if (result != ZFCP_ERP_SUCCEEDED)
                        zfcp_erp_rports_del(adapter);
+               else
+                       schedule_work(&adapter->scan_work);
                zfcp_adapter_put(adapter);
                break;
        }
index 1a7c80a77ff582cf90ed2cf3677a88a50c7ca4a3..8aab3091a7b1045488887b352e4eebcecf23a21c 100644 (file)
@@ -50,7 +50,8 @@ static int zfcp_wka_port_get(struct zfcp_wka_port *wka_port)
        if (mutex_lock_interruptible(&wka_port->mutex))
                return -ERESTARTSYS;
 
-       if (wka_port->status != ZFCP_WKA_PORT_ONLINE) {
+       if (wka_port->status == ZFCP_WKA_PORT_OFFLINE ||
+           wka_port->status == ZFCP_WKA_PORT_CLOSING) {
                wka_port->status = ZFCP_WKA_PORT_OPENING;
                if (zfcp_fsf_open_wka_port(wka_port))
                        wka_port->status = ZFCP_WKA_PORT_OFFLINE;
@@ -125,8 +126,7 @@ static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range,
 
        read_lock_irqsave(&zfcp_data.config_lock, flags);
        list_for_each_entry(port, &fsf_req->adapter->port_list_head, list) {
-               /* FIXME: ZFCP_STATUS_PORT_DID_DID check is racy */
-               if (!(atomic_read(&port->status) & ZFCP_STATUS_PORT_DID_DID))
+               if (!(atomic_read(&port->status) & ZFCP_STATUS_PORT_PHYS_OPEN))
                        /* Try to connect to unused ports anyway. */
                        zfcp_erp_port_reopen(port,
                                             ZFCP_STATUS_COMMON_ERP_FAILED,
@@ -610,7 +610,6 @@ int zfcp_scan_ports(struct zfcp_adapter *adapter)
        int ret, i;
        struct zfcp_gpn_ft *gpn_ft;
 
-       zfcp_erp_wait(adapter); /* wait until adapter is finished with ERP */
        if (fc_host_port_type(adapter->scsi_host) != FC_PORTTYPE_NPORT)
                return 0;
 
index 5ae1d497e5ed21f9061d36331a5a75ee63934b76..dc0367690405e864538d33b0d96f088b0047e80a 100644 (file)
@@ -683,6 +683,7 @@ static struct zfcp_fsf_req *zfcp_fsf_alloc_noqtcb(mempool_t *pool)
        if (!req)
                return NULL;
        memset(req, 0, sizeof(*req));
+       req->pool = pool;
        return req;
 }
 
@@ -769,28 +770,24 @@ static struct zfcp_fsf_req *zfcp_fsf_req_create(struct zfcp_adapter *adapter,
 static int zfcp_fsf_req_send(struct zfcp_fsf_req *req)
 {
        struct zfcp_adapter *adapter = req->adapter;
-       struct zfcp_qdio_queue *req_q = &adapter->req_q;
+       unsigned long flags;
        int idx;
 
        /* put allocated FSF request into hash table */
-       spin_lock(&adapter->req_list_lock);
+       spin_lock_irqsave(&adapter->req_list_lock, flags);
        idx = zfcp_reqlist_hash(req->req_id);
        list_add_tail(&req->list, &adapter->req_list[idx]);
-       spin_unlock(&adapter->req_list_lock);
+       spin_unlock_irqrestore(&adapter->req_list_lock, flags);
 
-       req->qdio_outb_usage = atomic_read(&req_q->count);
+       req->qdio_outb_usage = atomic_read(&adapter->req_q.count);
        req->issued = get_clock();
        if (zfcp_qdio_send(req)) {
-               /* Queues are down..... */
                del_timer(&req->timer);
-               spin_lock(&adapter->req_list_lock);
-               zfcp_reqlist_remove(adapter, req);
-               spin_unlock(&adapter->req_list_lock);
-               /* undo changes in request queue made for this request */
-               atomic_add(req->sbal_number, &req_q->count);
-               req_q->first -= req->sbal_number;
-               req_q->first += QDIO_MAX_BUFFERS_PER_Q;
-               req_q->first %= QDIO_MAX_BUFFERS_PER_Q; /* wrap */
+               spin_lock_irqsave(&adapter->req_list_lock, flags);
+               /* lookup request again, list might have changed */
+               if (zfcp_reqlist_find_safe(adapter, req))
+                       zfcp_reqlist_remove(adapter, req);
+               spin_unlock_irqrestore(&adapter->req_list_lock, flags);
                zfcp_erp_adapter_reopen(adapter, 0, 116, req);
                return -EIO;
        }
@@ -933,8 +930,10 @@ struct zfcp_fsf_req *zfcp_fsf_abort_fcp_command(unsigned long old_req_id,
                goto out;
        req = zfcp_fsf_req_create(adapter, FSF_QTCB_ABORT_FCP_CMND,
                                  req_flags, adapter->pool.fsf_req_abort);
-       if (IS_ERR(req))
+       if (IS_ERR(req)) {
+               req = NULL;
                goto out;
+       }
 
        if (unlikely(!(atomic_read(&unit->status) &
                       ZFCP_STATUS_COMMON_UNBLOCKED)))
@@ -1587,6 +1586,7 @@ static void zfcp_fsf_open_wka_port_handler(struct zfcp_fsf_req *req)
                wka_port->status = ZFCP_WKA_PORT_OFFLINE;
                break;
        case FSF_PORT_ALREADY_OPEN:
+               break;
        case FSF_GOOD:
                wka_port->handle = header->port_handle;
                wka_port->status = ZFCP_WKA_PORT_ONLINE;
@@ -2116,18 +2116,21 @@ static inline void zfcp_fsf_trace_latency(struct zfcp_fsf_req *fsf_req)
 
 static void zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *req)
 {
-       struct scsi_cmnd *scpnt = req->data;
+       struct scsi_cmnd *scpnt;
        struct fcp_rsp_iu *fcp_rsp_iu = (struct fcp_rsp_iu *)
            &(req->qtcb->bottom.io.fcp_rsp);
        u32 sns_len;
        char *fcp_rsp_info = (unsigned char *) &fcp_rsp_iu[1];
        unsigned long flags;
 
-       if (unlikely(!scpnt))
-               return;
-
        read_lock_irqsave(&req->adapter->abort_lock, flags);
 
+       scpnt = req->data;
+       if (unlikely(!scpnt)) {
+               read_unlock_irqrestore(&req->adapter->abort_lock, flags);
+               return;
+       }
+
        if (unlikely(req->status & ZFCP_STATUS_FSFREQ_ABORTED)) {
                set_host_byte(scpnt, DID_SOFT_ERROR);
                set_driver_byte(scpnt, SUGGEST_RETRY);
@@ -2445,8 +2448,10 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_ctm(struct zfcp_adapter *adapter,
                goto out;
        req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags,
                                  adapter->pool.fsf_req_scsi);
-       if (IS_ERR(req))
+       if (IS_ERR(req)) {
+               req = NULL;
                goto out;
+       }
 
        req->status |= ZFCP_STATUS_FSFREQ_TASK_MANAGEMENT;
        req->data = unit;
index ca8f85f3dad439f515e25b8e5b049a0edd3701ee..468c880f8b6d6db3df67ff382855886e2b056a4a 100644 (file)
@@ -24,14 +24,10 @@ char *zfcp_get_fcp_sns_info_ptr(struct fcp_rsp_iu *fcp_rsp_iu)
 static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt)
 {
        struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata;
-       WARN_ON(!unit);
-       if (unit) {
-               atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status);
-               sdpnt->hostdata = NULL;
-               unit->device = NULL;
-               zfcp_erp_unit_failed(unit, 12, NULL);
-               zfcp_unit_put(unit);
-       }
+       atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status);
+       unit->device = NULL;
+       zfcp_erp_unit_failed(unit, 12, NULL);
+       zfcp_unit_put(unit);
 }
 
 static int zfcp_scsi_slave_configure(struct scsi_device *sdp)
@@ -92,7 +88,7 @@ static int zfcp_scsi_queuecommand(struct scsi_cmnd *scpnt,
        ret = zfcp_fsf_send_fcp_command_task(adapter, unit, scpnt, 0,
                                             ZFCP_REQ_AUTO_CLEANUP);
        if (unlikely(ret == -EBUSY))
-               zfcp_scsi_command_fail(scpnt, DID_NO_CONNECT);
+               return SCSI_MLQUEUE_DEVICE_BUSY;
        else if (unlikely(ret < 0))
                return SCSI_MLQUEUE_HOST_BUSY;
 
index 9aa301c1ed07ac5275ceae2635bdbf8c4ecb650e..94acbeed4e7cfe7bc59ebc8003fdd7ae96e66ec4 100644 (file)
@@ -175,8 +175,8 @@ static struct aac_driver_ident aac_drivers[] = {
        { aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* PERC 3/Di (Boxster/PERC3DiB) */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "catapult        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* catapult */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "tomcat          ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* tomcat */
-       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2120S   ", 1, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Adaptec 2120S (Crusader) */
-       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Adaptec 2200S (Vulcan) */
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2120S   ", 1, AAC_QUIRK_31BIT | AAC_QUIRK_34SG },                     /* Adaptec 2120S (Crusader) */
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG },                     /* Adaptec 2200S (Vulcan) */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Adaptec 2200S (Vulcan-2m) */
        { aac_rx_init, "aacraid",  "Legend  ", "Legend S220     ", 1, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Legend S220 (Legend Crusader) */
        { aac_rx_init, "aacraid",  "Legend  ", "Legend S230     ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Legend S230 (Legend Vulcan) */
@@ -427,8 +427,8 @@ static int aac_slave_configure(struct scsi_device *sdev)
                 * Firmware has an individual device recovery time typically
                 * of 35 seconds, give us a margin.
                 */
-               if (sdev->timeout < (45 * HZ))
-                       sdev->timeout = 45 * HZ;
+               if (sdev->request_queue->rq_timeout < (45 * HZ))
+                       blk_queue_rq_timeout(sdev->request_queue, 45*HZ);
                for (cid = 0; cid < aac->maximum_num_containers; ++cid)
                        if (aac->fsa_dev[cid].valid)
                                ++num_lsu;
index 218777bfc143db8bc54b1967b4c07f0a29232492..399fe559e4defaf89a29c4883aaec7ca9ba0d9e4 100644 (file)
@@ -13872,8 +13872,10 @@ static int __devinit advansys_board_found(struct Scsi_Host *shost,
        advansys_wide_free_mem(boardp);
        free_irq(boardp->irq, shost);
  err_free_dma:
+#ifdef CONFIG_ISA
        if (shost->dma_channel != NO_ISA_DMA)
                free_dma(shost->dma_channel);
+#endif
  err_free_proc:
        kfree(boardp->prtbuf);
  err_unmap:
@@ -13894,10 +13896,12 @@ static int advansys_release(struct Scsi_Host *shost)
        ASC_DBG(1, "begin\n");
        scsi_remove_host(shost);
        free_irq(board->irq, shost);
+#ifdef CONFIG_ISA
        if (shost->dma_channel != NO_ISA_DMA) {
                ASC_DBG(1, "free_dma()\n");
                free_dma(shost->dma_channel);
        }
+#endif
        if (ASC_NARROW_BOARD(board)) {
                dma_unmap_single(board->dev,
                                        board->dvc_var.asc_dvc_var.overrun_dma,
index 9aec4ca64e56cf3f06f102b4860691ce94c12c94..f7da7530875e732a0b8155aa6887f8626ed8decf 100644 (file)
@@ -107,6 +107,7 @@ static int hp_sw_tur(struct scsi_device *sdev, struct hp_sw_dh_data *h)
        struct request *req;
        int ret;
 
+retry:
        req = blk_get_request(sdev->request_queue, WRITE, GFP_NOIO);
        if (!req)
                return SCSI_DH_RES_TEMP_UNAVAIL;
@@ -121,7 +122,6 @@ static int hp_sw_tur(struct scsi_device *sdev, struct hp_sw_dh_data *h)
        memset(req->sense, 0, SCSI_SENSE_BUFFERSIZE);
        req->sense_len = 0;
 
-retry:
        ret = blk_execute_rq(req->q, NULL, req, 1);
        if (ret == -EIO) {
                if (req->sense_len > 0) {
@@ -136,8 +136,10 @@ retry:
                h->path_state = HP_SW_PATH_ACTIVE;
                ret = SCSI_DH_OK;
        }
-       if (ret == SCSI_DH_IMM_RETRY)
+       if (ret == SCSI_DH_IMM_RETRY) {
+               blk_put_request(req);
                goto retry;
+       }
        if (ret == SCSI_DH_DEV_OFFLINED) {
                h->path_state = HP_SW_PATH_PASSIVE;
                ret = SCSI_DH_OK;
@@ -200,6 +202,7 @@ static int hp_sw_start_stop(struct scsi_device *sdev, struct hp_sw_dh_data *h)
        struct request *req;
        int ret, retry;
 
+retry:
        req = blk_get_request(sdev->request_queue, WRITE, GFP_NOIO);
        if (!req)
                return SCSI_DH_RES_TEMP_UNAVAIL;
@@ -216,7 +219,6 @@ static int hp_sw_start_stop(struct scsi_device *sdev, struct hp_sw_dh_data *h)
        req->sense_len = 0;
        retry = h->retries;
 
-retry:
        ret = blk_execute_rq(req->q, NULL, req, 1);
        if (ret == -EIO) {
                if (req->sense_len > 0) {
@@ -231,8 +233,10 @@ retry:
                ret = SCSI_DH_OK;
 
        if (ret == SCSI_DH_RETRY) {
-               if (--retry)
+               if (--retry) {
+                       blk_put_request(req);
                        goto retry;
+               }
                ret = SCSI_DH_IO;
        }
 
index 8aba4fdfb5222b40d93a8e231fd1b69858ddecdc..6194ed5d02c4e694bc2bfbe3faf9a56860a2ade5 100644 (file)
@@ -2445,7 +2445,7 @@ static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd)
        hba_status = detailed_status >> 8;
 
        // calculate resid for sg 
-       scsi_set_resid(cmd, scsi_bufflen(cmd) - readl(reply+5));
+       scsi_set_resid(cmd, scsi_bufflen(cmd) - readl(reply+20));
 
        pHba = (adpt_hba*) cmd->device->host->hostdata[0];
 
@@ -2456,7 +2456,7 @@ static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd)
                case I2O_SCSI_DSC_SUCCESS:
                        cmd->result = (DID_OK << 16);
                        // handle underflow
-                       if(readl(reply+5) < cmd->underflow ) {
+                       if (readl(reply+20) < cmd->underflow) {
                                cmd->result = (DID_ERROR <<16);
                                printk(KERN_WARNING"%s: SCSI CMD underflow\n",pHba->name);
                        }
index c387c15a21282e250b6291ac9872ba91877a1dc2..fb247fdfa2bd51d91ea567918d51cd3e818371a9 100644 (file)
@@ -588,7 +588,7 @@ static struct pci_driver gdth_pci_driver = {
        .remove         = gdth_pci_remove_one,
 };
 
-static void gdth_pci_remove_one(struct pci_dev *pdev)
+static void __devexit gdth_pci_remove_one(struct pci_dev *pdev)
 {
        gdth_ha_str *ha = pci_get_drvdata(pdev);
 
@@ -600,7 +600,7 @@ static void gdth_pci_remove_one(struct pci_dev *pdev)
        pci_disable_device(pdev);
 }
 
-static int gdth_pci_init_one(struct pci_dev *pdev,
+static int __devinit gdth_pci_init_one(struct pci_dev *pdev,
                                       const struct pci_device_id *ent)
 {
        ushort vendor = pdev->vendor;
@@ -853,7 +853,7 @@ static int __init gdth_init_isa(ulong32 bios_adr,gdth_ha_str *ha)
 #endif /* CONFIG_ISA */
 
 #ifdef CONFIG_PCI
-static int gdth_init_pci(struct pci_dev *pdev, gdth_pci_str *pcistr,
+static int __devinit gdth_init_pci(struct pci_dev *pdev, gdth_pci_str *pcistr,
                                   gdth_ha_str *ha)
 {
     register gdt6_dpram_str __iomem *dp6_ptr;
@@ -1237,7 +1237,7 @@ static int gdth_init_pci(struct pci_dev *pdev, gdth_pci_str *pcistr,
 
 /* controller protocol functions */
 
-static void __init gdth_enable_int(gdth_ha_str *ha)
+static void __devinit gdth_enable_int(gdth_ha_str *ha)
 {
     ulong flags;
     gdt2_dpram_str __iomem *dp2_ptr;
@@ -1553,7 +1553,7 @@ static int gdth_internal_cmd(gdth_ha_str *ha, unchar service, ushort opcode,
 
 /* search for devices */
 
-static int __init gdth_search_drives(gdth_ha_str *ha)
+static int __devinit gdth_search_drives(gdth_ha_str *ha)
 {
     ushort cdev_cnt, i;
     int ok;
@@ -4935,7 +4935,7 @@ static int __init gdth_eisa_probe_one(ushort eisa_slot)
 #endif /* CONFIG_EISA */
 
 #ifdef CONFIG_PCI
-static int gdth_pci_probe_one(gdth_pci_str *pcistr,
+static int __devinit gdth_pci_probe_one(gdth_pci_str *pcistr,
                             gdth_ha_str **ha_out)
 {
        struct Scsi_Host *shp;
index 87e09f35d3d4cb2bb50de263098d0a4c9ea2b66b..6cad1758243a5872a63e53eeea9b7a05b6d86507 100644 (file)
@@ -1442,7 +1442,7 @@ static int ibmvscsi_slave_configure(struct scsi_device *sdev)
        spin_lock_irqsave(shost->host_lock, lock_flags);
        if (sdev->type == TYPE_DISK) {
                sdev->allow_restart = 1;
-               sdev->timeout = 60 * HZ;
+               blk_queue_rq_timeout(sdev->request_queue, 60 * HZ);
        }
        scsi_adjust_queue_depth(sdev, 0, shost->cmd_per_lun);
        spin_unlock_irqrestore(shost->host_lock, lock_flags);
index 2a5b29d12172e4a72bb774453d2662b7d29192ee..e2dd6a45924a5f598f6dafa05eff545b2aa5292b 100644 (file)
@@ -864,21 +864,23 @@ static int ibmvstgt_probe(struct vio_dev *dev, const struct vio_device_id *id)
 
        INIT_WORK(&vport->crq_work, handle_crq);
 
-       err = crq_queue_create(&vport->crq_queue, target);
+       err = scsi_add_host(shost, target->dev);
        if (err)
                goto free_srp_target;
 
-       err = scsi_add_host(shost, target->dev);
+       err = scsi_tgt_alloc_queue(shost);
        if (err)
-               goto destroy_queue;
+               goto remove_host;
 
-       err = scsi_tgt_alloc_queue(shost);
+       err = crq_queue_create(&vport->crq_queue, target);
        if (err)
-               goto destroy_queue;
+               goto free_queue;
 
        return 0;
-destroy_queue:
-       crq_queue_destroy(target);
+free_queue:
+       scsi_tgt_free_queue(shost);
+remove_host:
+       scsi_remove_host(shost);
 free_srp_target:
        srp_target_free(target);
 put_host:
index 801c7cf54d2ebb29b209fbd692eb7c807514fdc6..3fdee7370cccd235d9ad37aa8482c29cac715b7a 100644 (file)
@@ -489,12 +489,6 @@ __iscsi_conn_send_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
                if (!__kfifo_get(session->cmdpool.queue,
                                 (void*)&task, sizeof(void*)))
                        return NULL;
-
-               if ((hdr->opcode == (ISCSI_OP_NOOP_OUT | ISCSI_OP_IMMEDIATE)) &&
-                    hdr->ttt == RESERVED_ITT) {
-                       conn->ping_task = task;
-                       conn->last_ping = jiffies;
-               }
        }
        /*
         * released in complete pdu for task we expect a response for, and
@@ -703,6 +697,11 @@ static void iscsi_send_nopout(struct iscsi_conn *conn, struct iscsi_nopin *rhdr)
        task = __iscsi_conn_send_pdu(conn, (struct iscsi_hdr *)&hdr, NULL, 0);
        if (!task)
                iscsi_conn_printk(KERN_ERR, conn, "Could not send nopout\n");
+       else if (!rhdr) {
+               /* only track our nops */
+               conn->ping_task = task;
+               conn->last_ping = jiffies;
+       }
 }
 
 static int iscsi_handle_reject(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
index 28c9da7d4a5c5f0aad97c0a41f964c8994c4d228..7dc62deb4087cead7dfeed562cc3e9bc4a5c9011 100644 (file)
@@ -4402,6 +4402,10 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru)
        scb_t   *scb;
        int     rval;
 
+       scmd = scsi_allocate_command(GFP_KERNEL);
+       if (!scmd)
+               return -ENOMEM;
+
        /*
         * The internal commands share one command id and hence are
         * serialized. This is so because we want to reserve maximum number of
@@ -4412,12 +4416,11 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru)
        scb = &adapter->int_scb;
        memset(scb, 0, sizeof(scb_t));
 
-       scmd = &adapter->int_scmd;
-       memset(scmd, 0, sizeof(Scsi_Cmnd));
-
        sdev = kzalloc(sizeof(struct scsi_device), GFP_KERNEL);
        scmd->device = sdev;
 
+       memset(adapter->int_cdb, 0, sizeof(adapter->int_cdb));
+       scmd->cmnd = adapter->int_cdb;
        scmd->device->host = adapter->host;
        scmd->host_scribble = (void *)scb;
        scmd->cmnd[0] = MEGA_INTERNAL_CMD;
@@ -4456,6 +4459,8 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru)
 
        mutex_unlock(&adapter->int_mtx);
 
+       scsi_free_command(GFP_KERNEL, scmd);
+
        return rval;
 }
 
index ee70bd4ae4badc0f2f7a82eb0a523d5702c796f4..795201fa0b487d1a23113f38534666d90d23ec49 100644 (file)
@@ -888,8 +888,8 @@ typedef struct {
 
        u8      sglen;  /* f/w supported scatter-gather list length */
 
+       unsigned char int_cdb[MAX_COMMAND_SIZE];
        scb_t                   int_scb;
-       Scsi_Cmnd               int_scmd;
        struct mutex            int_mtx;        /* To synchronize the internal
                                                commands */
        struct completion       int_waitq;      /* wait queue for internal
index a454f94623d73348491ccc603070cc55e0866edd..17ce7abe17ee02f7ea47055d296f95917b6e1b92 100644 (file)
@@ -1016,7 +1016,8 @@ static int megasas_slave_configure(struct scsi_device *sdev)
         * The RAID firmware may require extended timeouts.
         */
        if (sdev->channel >= MEGASAS_MAX_PD_CHANNELS)
-               sdev->timeout = MEGASAS_DEFAULT_CMD_TIMEOUT * HZ;
+               blk_queue_rq_timeout(sdev->request_queue,
+                                    MEGASAS_DEFAULT_CMD_TIMEOUT * HZ);
        return 0;
 }
 
index f25f41a499e5ed7be7ebd3dc109d4d4b14c9494a..b97194096d8e6a285f55389360bf92691c6cf471 100644 (file)
@@ -2547,7 +2547,6 @@ typedef struct scsi_qla_host {
        uint8_t         fcode_revision[16];
        uint32_t        fw_revision[4];
 
-       uint16_t        fdt_odd_index;
        uint32_t        fdt_wrt_disable;
        uint32_t        fdt_erase_cmd;
        uint32_t        fdt_block_size;
index a470f2d3270d205ad35ee26519a25e9d37f90252..4218f20f5ed5256b35a61862a73424e7c581d712 100644 (file)
@@ -140,7 +140,6 @@ int
 qla2100_pci_config(scsi_qla_host_t *ha)
 {
        uint16_t w;
-       uint32_t d;
        unsigned long flags;
        struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
 
@@ -151,10 +150,7 @@ qla2100_pci_config(scsi_qla_host_t *ha)
        w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
        pci_write_config_word(ha->pdev, PCI_COMMAND, w);
 
-       /* Reset expansion ROM address decode enable */
-       pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d);
-       d &= ~PCI_ROM_ADDRESS_ENABLE;
-       pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d);
+       pci_disable_rom(ha->pdev);
 
        /* Get PCI bus information. */
        spin_lock_irqsave(&ha->hardware_lock, flags);
@@ -174,7 +170,6 @@ int
 qla2300_pci_config(scsi_qla_host_t *ha)
 {
        uint16_t        w;
-       uint32_t        d;
        unsigned long   flags = 0;
        uint32_t        cnt;
        struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
@@ -236,10 +231,7 @@ qla2300_pci_config(scsi_qla_host_t *ha)
 
        pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80);
 
-       /* Reset expansion ROM address decode enable */
-       pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d);
-       d &= ~PCI_ROM_ADDRESS_ENABLE;
-       pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d);
+       pci_disable_rom(ha->pdev);
 
        /* Get PCI bus information. */
        spin_lock_irqsave(&ha->hardware_lock, flags);
@@ -259,7 +251,6 @@ int
 qla24xx_pci_config(scsi_qla_host_t *ha)
 {
        uint16_t w;
-       uint32_t d;
        unsigned long flags = 0;
        struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
 
@@ -281,10 +272,7 @@ qla24xx_pci_config(scsi_qla_host_t *ha)
        if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP))
                pcie_set_readrq(ha->pdev, 2048);
 
-       /* Reset expansion ROM address decode enable */
-       pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d);
-       d &= ~PCI_ROM_ADDRESS_ENABLE;
-       pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d);
+       pci_disable_rom(ha->pdev);
 
        ha->chip_revision = ha->pdev->revision;
 
@@ -306,7 +294,6 @@ int
 qla25xx_pci_config(scsi_qla_host_t *ha)
 {
        uint16_t w;
-       uint32_t d;
 
        pci_set_master(ha->pdev);
        pci_try_set_mwi(ha->pdev);
@@ -320,10 +307,7 @@ qla25xx_pci_config(scsi_qla_host_t *ha)
        if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP))
                pcie_set_readrq(ha->pdev, 2048);
 
-       /* Reset expansion ROM address decode enable */
-       pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d);
-       d &= ~PCI_ROM_ADDRESS_ENABLE;
-       pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d);
+       pci_disable_rom(ha->pdev);
 
        ha->chip_revision = ha->pdev->revision;
 
@@ -980,7 +964,6 @@ qla2x00_setup_chip(scsi_qla_host_t *ha)
                                    &ha->fw_minor_version,
                                    &ha->fw_subminor_version,
                                    &ha->fw_attributes, &ha->fw_memory_size);
-                               qla2x00_resize_request_q(ha);
                                ha->flags.npiv_supported = 0;
                                if ((IS_QLA24XX(ha) || IS_QLA25XX(ha) ||
                                     IS_QLA84XX(ha)) &&
@@ -992,6 +975,7 @@ qla2x00_setup_chip(scsi_qla_host_t *ha)
                                                ha->max_npiv_vports =
                                                    MIN_MULTI_ID_FABRIC - 1;
                                }
+                               qla2x00_resize_request_q(ha);
 
                                if (ql2xallocfwdump)
                                        qla2x00_alloc_fw_dump(ha);
index 36bc6851e23dd2b13cfbbe98a6a14eac5faf0c07..3402746ec128a54115ac1880acbba27b7da6541f 100644 (file)
@@ -1964,7 +1964,7 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *ha, uint16_t *cur_xchg_cnt,
                        *cur_iocb_cnt = mcp->mb[7];
                if (orig_iocb_cnt)
                        *orig_iocb_cnt = mcp->mb[10];
-               if (max_npiv_vports)
+               if (ha->flags.npiv_supported && max_npiv_vports)
                        *max_npiv_vports = mcp->mb[11];
        }
 
index 21dd182ad512214c7646299a1af4ad4f2e9d9e88..35567203ef611bc730df2fde134c036b6e124107 100644 (file)
@@ -728,6 +728,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
                if (ha->isp_ops->abort_command(ha, sp)) {
                        DEBUG2(printk("%s(%ld): abort_command "
                            "mbx failed.\n", __func__, ha->host_no));
+                       ret = FAILED;
                } else {
                        DEBUG3(printk("%s(%ld): abort_command "
                            "mbx success.\n", __func__, ha->host_no));
index 90a13211717f7d367a89c3b7f0b74fc5dd0f113c..e4af678eb2d62ca071f6d04a2461074d611d089a 100644 (file)
@@ -722,6 +722,7 @@ done:
 static void
 qla2xxx_get_fdt_info(scsi_qla_host_t *ha)
 {
+#define FLASH_BLK_SIZE_4K      0x1000
 #define FLASH_BLK_SIZE_32K     0x8000
 #define FLASH_BLK_SIZE_64K     0x10000
        const char *loc, *locations[] = { "MID", "FDT" };
@@ -755,7 +756,6 @@ qla2xxx_get_fdt_info(scsi_qla_host_t *ha)
        loc = locations[1];
        mid = le16_to_cpu(fdt->man_id);
        fid = le16_to_cpu(fdt->id);
-       ha->fdt_odd_index = mid == 0x1f;
        ha->fdt_wrt_disable = fdt->wrt_disable_bits;
        ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0300 | fdt->erase_cmd);
        ha->fdt_block_size = le32_to_cpu(fdt->block_size);
@@ -788,8 +788,7 @@ no_flash_data:
                ha->fdt_block_size = FLASH_BLK_SIZE_64K;
                break;
        case 0x1f: /* Atmel 26DF081A. */
-               ha->fdt_odd_index = 1;
-               ha->fdt_block_size = FLASH_BLK_SIZE_64K;
+               ha->fdt_block_size = FLASH_BLK_SIZE_4K;
                ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0320);
                ha->fdt_unprotect_sec_cmd = flash_conf_to_access_addr(0x0339);
                ha->fdt_protect_sec_cmd = flash_conf_to_access_addr(0x0336);
@@ -801,9 +800,9 @@ no_flash_data:
        }
 done:
        DEBUG2(qla_printk(KERN_DEBUG, ha, "FDT[%s]: (0x%x/0x%x) erase=0x%x "
-           "pro=%x upro=%x idx=%d wrtd=0x%x blk=0x%x.\n", loc, mid, fid,
+           "pro=%x upro=%x wrtd=0x%x blk=0x%x.\n", loc, mid, fid,
            ha->fdt_erase_cmd, ha->fdt_protect_sec_cmd,
-           ha->fdt_unprotect_sec_cmd, ha->fdt_odd_index, ha->fdt_wrt_disable,
+           ha->fdt_unprotect_sec_cmd, ha->fdt_wrt_disable,
            ha->fdt_block_size));
 }
 
@@ -987,13 +986,9 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr,
        qla24xx_unprotect_flash(ha);
 
        for (liter = 0; liter < dwords; liter++, faddr++, dwptr++) {
-               if (ha->fdt_odd_index) {
-                       findex = faddr << 2;
-                       fdata = findex & sec_mask;
-               } else {
-                       findex = faddr;
-                       fdata = (findex & sec_mask) << 2;
-               }
+
+               findex = faddr;
+               fdata = (findex & sec_mask) << 2;
 
                /* Are we at the beginning of a sector? */
                if ((findex & rest_addr) == 0) {
index be5e299df528e22eed62f8ac25d03c01a11630d7..eea6720adf1693c8521851f57e8b15bb1b87880b 100644 (file)
@@ -7,7 +7,7 @@
 /*
  * Driver version
  */
-#define QLA2XXX_VERSION      "8.02.01-k8"
+#define QLA2XXX_VERSION      "8.02.01-k9"
 
 #define QLA_DRIVER_MAJOR_VER   8
 #define QLA_DRIVER_MINOR_VER   2
index 94ed262bdf0c7731040c0112d955ded856fe96e4..edfaf241c5ba1dca4e3f3b0a75e8b2a6d4bee89f 100644 (file)
@@ -932,8 +932,7 @@ static int scsi_eh_try_stu(struct scsi_cmnd *scmd)
                int i, rtn = NEEDS_RETRY;
 
                for (i = 0; rtn == NEEDS_RETRY && i < 2; i++)
-                       rtn = scsi_send_eh_cmnd(scmd, stu_command, 6,
-                                               scmd->device->timeout, 0);
+                       rtn = scsi_send_eh_cmnd(scmd, stu_command, 6, scmd->device->request_queue->rq_timeout, 0);
 
                if (rtn == SUCCESS)
                        return 0;
@@ -1340,9 +1339,10 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd)
                 * LLD/transport was disrupted during processing of the IO.
                 * The transport class is now blocked/blocking,
                 * and the transport will decide what to do with the IO
-                * based on its timers and recovery capablilities.
+                * based on its timers and recovery capablilities if
+                * there are enough retries.
                 */
-               return ADD_TO_MLQUEUE;
+               goto maybe_retry;
        case DID_TRANSPORT_FAILFAST:
                /*
                 * The transport decided to failfast the IO (most likely
index f5d3b96890dc6d9dd180eb86bb0f2b737a60e7f1..148d3af92aefad04fa42c48780ba4138e8033e59 100644 (file)
@@ -567,15 +567,18 @@ static inline int scsi_host_is_busy(struct Scsi_Host *shost)
  */
 static void scsi_run_queue(struct request_queue *q)
 {
-       struct scsi_device *starved_head = NULL, *sdev = q->queuedata;
+       struct scsi_device *sdev = q->queuedata;
        struct Scsi_Host *shost = sdev->host;
+       LIST_HEAD(starved_list);
        unsigned long flags;
 
        if (scsi_target(sdev)->single_lun)
                scsi_single_lun_run(sdev);
 
        spin_lock_irqsave(shost->host_lock, flags);
-       while (!list_empty(&shost->starved_list) && !scsi_host_is_busy(shost)) {
+       list_splice_init(&shost->starved_list, &starved_list);
+
+       while (!list_empty(&starved_list)) {
                int flagset;
 
                /*
@@ -588,24 +591,18 @@ static void scsi_run_queue(struct request_queue *q)
                 * scsi_request_fn must get the host_lock before checking
                 * or modifying starved_list or starved_entry.
                 */
-               sdev = list_entry(shost->starved_list.next,
-                                         struct scsi_device, starved_entry);
-               /*
-                * The *queue_ready functions can add a device back onto the
-                * starved list's tail, so we must check for a infinite loop.
-                */
-               if (sdev == starved_head)
+               if (scsi_host_is_busy(shost))
                        break;
-               if (!starved_head)
-                       starved_head = sdev;
 
+               sdev = list_entry(starved_list.next,
+                                 struct scsi_device, starved_entry);
+               list_del_init(&sdev->starved_entry);
                if (scsi_target_is_busy(scsi_target(sdev))) {
                        list_move_tail(&sdev->starved_entry,
                                       &shost->starved_list);
                        continue;
                }
 
-               list_del_init(&sdev->starved_entry);
                spin_unlock(shost->host_lock);
 
                spin_lock(sdev->request_queue->queue_lock);
@@ -621,6 +618,8 @@ static void scsi_run_queue(struct request_queue *q)
 
                spin_lock(shost->host_lock);
        }
+       /* put any unprocessed entries back */
+       list_splice(&starved_list, &shost->starved_list);
        spin_unlock_irqrestore(shost->host_lock, flags);
 
        blk_run_queue(q);
@@ -649,8 +648,8 @@ static void scsi_requeue_command(struct request_queue *q, struct scsi_cmnd *cmd)
        struct request *req = cmd->request;
        unsigned long flags;
 
-       scsi_unprep_request(req);
        spin_lock_irqsave(q->queue_lock, flags);
+       scsi_unprep_request(req);
        blk_requeue_request(q, req);
        spin_unlock_irqrestore(q->queue_lock, flags);
 
index c9e1242eaf2511067e122e89b331d438823a0a69..5081b3981d3c241487a9bf4f29be69796eb8e7cb 100644 (file)
@@ -757,7 +757,7 @@ static int sd_ioctl(struct block_device *bdev, fmode_t mode,
         * access to the device is prohibited.
         */
        error = scsi_nonblockable_ioctl(sdp, cmd, p,
-                                       (mode & FMODE_NDELAY_NOW) != 0);
+                                       (mode & FMODE_NDELAY) != 0);
        if (!scsi_block_when_processing_errors(sdp) || !error)
                return error;
 
index 62b6633e3a97b8d27511f1fbc9c9cb5d118abcea..45b66b98a516f492b0e76ea4bb792d1d19925570 100644 (file)
@@ -521,7 +521,7 @@ static int sr_block_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd,
         * if it doesn't recognise the ioctl
         */
        ret = scsi_nonblockable_ioctl(sdev, cmd, argp,
-                                       (mode & FMODE_NDELAY_NOW) != 0);
+                                       (mode & FMODE_NDELAY) != 0);
        if (ret != -ENODEV)
                return ret;
        return scsi_ioctl(sdev, cmd, argp);
index 3790906a77d10c06705b3616a22c5650d50f1948..2fa830c0be2790187e17e43cf6dc0ffb35df1da8 100644 (file)
@@ -477,7 +477,7 @@ stex_slave_config(struct scsi_device *sdev)
 {
        sdev->use_10_for_rw = 1;
        sdev->use_10_for_ms = 1;
-       sdev->timeout = 60 * HZ;
+       blk_queue_rq_timeout(sdev->request_queue, 60 * HZ);
        sdev->tagged_supported = 1;
 
        return 0;
index 6dd98f9fb89c0f655fbdc07f6c9af24f992250ef..ae3699d77dd0e320edc844f10cbc11c105afdea8 100644 (file)
@@ -2149,7 +2149,7 @@ out4:
        return ret;
 }
 
-static struct ioc3_submodule ioc3uart_submodule = {
+static struct ioc3_submodule ioc3uart_ops = {
        .name = "IOC3uart",
        .probe = ioc3uart_probe,
        .remove = ioc3uart_remove,
@@ -2173,7 +2173,7 @@ static int __devinit ioc3uart_init(void)
                       __func__);
                return ret;
        }
-       ret = ioc3_register_submodule(&ioc3uart_submodule);
+       ret = ioc3_register_submodule(&ioc3uart_ops);
        if (ret)
                uart_unregister_driver(&ioc3_uart);
        return ret;
@@ -2181,7 +2181,7 @@ static int __devinit ioc3uart_init(void)
 
 static void __devexit ioc3uart_exit(void)
 {
-       ioc3_unregister_submodule(&ioc3uart_submodule);
+       ioc3_unregister_submodule(&ioc3uart_ops);
        uart_unregister_driver(&ioc3_uart);
 }
 
index 6117d3db0b668980618991a2f66f578410f6e1a7..28c00c3d58f58273af3e1ab9bacd6f2df9e401c8 100644 (file)
@@ -591,8 +591,8 @@ mpc52xx_uart_set_termios(struct uart_port *port, struct ktermios *new,
        /* Update the per-port timeout */
        uart_update_timeout(port, new->c_cflag, baud);
 
-       /* Do our best to flush TX & RX, so we don't loose anything */
-       /* But we don't wait indefinitly ! */
+       /* Do our best to flush TX & RX, so we don't lose anything */
+       /* But we don't wait indefinitely ! */
        j = 5000000;    /* Maximum wait */
        /* FIXME Can't receive chars since set_termios might be called at early
         * boot for the console, all stuff is not yet ready to receive at that
index 317d239ab74043cf10ada65e9329d4da0d3e87fe..29cbb0afef8e735276fe3fb39d6b2da5519ae6b2 100644 (file)
@@ -177,5 +177,5 @@ module_exit(s3c2440_serial_exit);
 
 MODULE_DESCRIPTION("Samsung S3C2440,S3C2442 SoC Serial port driver");
 MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
-MODULE_LICENSE("GPLi v2");
+MODULE_LICENSE("GPL v2");
 MODULE_ALIAS("platform:s3c2440-uart");
index 5c0f32c7fbf6b20c8e20fba1ec32f7e08af29909..165fc010978c2624a7a45730f403b505ed48e726 100644 (file)
@@ -144,9 +144,9 @@ static void put_char(struct uart_port *port, char c)
                status = sci_in(port, SCxSR);
        } while (!(status & SCxSR_TDxE(port)));
 
-       sci_out(port, SCxTDR, c);
        sci_in(port, SCxSR);            /* Dummy read */
        sci_out(port, SCxSR, SCxSR_TDxE_CLEAR(port));
+       sci_out(port, SCxTDR, c);
 
        spin_unlock_irqrestore(&port->lock, flags);
 }
@@ -478,10 +478,10 @@ static void sci_transmit_chars(struct uart_port *port)
                return;
        }
 
-       if (port->type == PORT_SCIF)
-               count = scif_txroom(port);
-       else
+       if (port->type == PORT_SCI)
                count = sci_txroom(port);
+       else
+               count = scif_txroom(port);
 
        do {
                unsigned char c;
@@ -510,7 +510,7 @@ static void sci_transmit_chars(struct uart_port *port)
        } else {
                ctrl = sci_in(port, SCSCR);
 
-               if (port->type == PORT_SCIF) {
+               if (port->type != PORT_SCI) {
                        sci_in(port, SCxSR); /* Dummy read */
                        sci_out(port, SCxSR, SCxSR_TDxE_CLEAR(port));
                }
@@ -536,10 +536,10 @@ static inline void sci_receive_chars(struct uart_port *port)
                return;
 
        while (1) {
-               if (port->type == PORT_SCIF)
-                       count = scif_rxroom(port);
-               else
+               if (port->type == PORT_SCI)
                        count = sci_rxroom(port);
+               else
+                       count = scif_rxroom(port);
 
                /* Don't copy more bytes than there is room for in the buffer */
                count = tty_buffer_request_room(tty, count);
@@ -714,7 +714,7 @@ static inline int sci_handle_breaks(struct uart_port *port)
 
 #if defined(SCIF_ORER)
        /* XXX: Handle SCIF overrun error */
-       if (port->type == PORT_SCIF && (sci_in(port, SCLSR) & SCIF_ORER) != 0) {
+       if (port->type != PORT_SCI && (sci_in(port, SCLSR) & SCIF_ORER) != 0) {
                sci_out(port, SCLSR, 0);
                if (tty_insert_flip_char(tty, 0, TTY_OVERRUN)) {
                        copied++;
@@ -1042,7 +1042,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
 
        sci_out(port, SCSCR, 0x00);     /* TE=0, RE=0, CKE1=0 */
 
-       if (port->type == PORT_SCIF)
+       if (port->type != PORT_SCI)
                sci_out(port, SCFCR, SCFCR_RFRST | SCFCR_TFRST);
 
        smr_val = sci_in(port, SCSMR) & 3;
@@ -1085,6 +1085,7 @@ static const char *sci_type(struct uart_port *port)
                case PORT_SCI:  return "sci";
                case PORT_SCIF: return "scif";
                case PORT_IRDA: return "irda";
+               case PORT_SCIFA:        return "scifa";
        }
 
        return NULL;
@@ -1112,6 +1113,7 @@ static void sci_config_port(struct uart_port *port, int flags)
                s->init_pins = sci_init_pins_sci;
                break;
        case PORT_SCIF:
+       case PORT_SCIFA:
                s->init_pins = sci_init_pins_scif;
                break;
        case PORT_IRDA:
index 6163a45f968f4b9aef1b79056f02e2329232e231..9f33b064172e86607e607ae69afbfaf595c21da9 100644 (file)
 #define CPU_SCIx_FNS(name, sci_offset, sci_size, scif_offset, scif_size)\
   static inline unsigned int sci_##name##_in(struct uart_port *port)   \
   {                                                                    \
-    if (port->type == PORT_SCI) {                                      \
-      SCI_IN(sci_size, sci_offset)                                     \
-    } else {                                                           \
-      SCI_IN(scif_size, scif_offset);                                  \
+    if (port->type == PORT_SCIF) {                                     \
+      SCI_IN(scif_size, scif_offset)                                   \
+    } else {   /* PORT_SCI or PORT_SCIFA */                            \
+      SCI_IN(sci_size, sci_offset);                                    \
     }                                                                  \
   }                                                                    \
   static inline void sci_##name##_out(struct uart_port *port, unsigned int value) \
   {                                                                    \
-    if (port->type == PORT_SCI) {                                      \
-      SCI_OUT(sci_size, sci_offset, value)                             \
-    } else {                                                           \
-      SCI_OUT(scif_size, scif_offset, value);                          \
+    if (port->type == PORT_SCIF) {                                     \
+      SCI_OUT(scif_size, scif_offset, value)                           \
+    } else {   /* PORT_SCI or PORT_SCIFA */                            \
+      SCI_OUT(sci_size, sci_offset, value);                            \
     }                                                                  \
   }
 
index 6a3f8fb0c9dd9eb1c1bff91382e1f426b73cb67f..3317148a4b93bd921100deecaedb9bc9fe7fb771 100644 (file)
@@ -286,8 +286,8 @@ static void ulite_release_port(struct uart_port *port)
 
 static int ulite_request_port(struct uart_port *port)
 {
-       pr_debug("ulite console: port=%p; port->mapbase=%x\n",
-                port, port->mapbase);
+       pr_debug("ulite console: port=%p; port->mapbase=%llx\n",
+                port, (unsigned long long) port->mapbase);
 
        if (!request_mem_region(port->mapbase, ULITE_REGION, "uartlite")) {
                dev_err(port->dev, "Memory region busy\n");
index d1812d32f47d40c4c5e3c028aae8727c755f451f..63f0de29aa14eeb508645dd0b917e7c4163950c1 100644 (file)
@@ -827,7 +827,7 @@ static int __init maple_bus_init(void)
 
        maple_queue_cache =
            kmem_cache_create("maple_queue_cache", 0x400, 0,
-                             SLAB_POISON|SLAB_HWCACHE_ALIGN, NULL);
+                             SLAB_HWCACHE_ALIGN, NULL);
 
        if (!maple_queue_cache)
                goto cleanup_bothirqs;
index 02f9320f3efcf25000393284e7823f9089d0b7f3..8abae4ad0fa528565427ec050555142924dc7b99 100644 (file)
@@ -766,6 +766,7 @@ static int __init atmel_spi_probe(struct platform_device *pdev)
        /* Initialize the hardware */
        clk_enable(clk);
        spi_writel(as, CR, SPI_BIT(SWRST));
+       spi_writel(as, CR, SPI_BIT(SWRST)); /* AT91SAM9263 Rev B workaround */
        spi_writel(as, MR, SPI_BIT(MSTR) | SPI_BIT(MODFDIS));
        spi_writel(as, PTCR, SPI_BIT(RXTDIS) | SPI_BIT(TXTDIS));
        spi_writel(as, CR, SPI_BIT(SPIEN));
@@ -782,6 +783,7 @@ static int __init atmel_spi_probe(struct platform_device *pdev)
 
 out_reset_hw:
        spi_writel(as, CR, SPI_BIT(SWRST));
+       spi_writel(as, CR, SPI_BIT(SWRST)); /* AT91SAM9263 Rev B workaround */
        clk_disable(clk);
        free_irq(irq, master);
 out_unmap_regs:
@@ -805,6 +807,7 @@ static int __exit atmel_spi_remove(struct platform_device *pdev)
        spin_lock_irq(&as->lock);
        as->stopping = 1;
        spi_writel(as, CR, SPI_BIT(SWRST));
+       spi_writel(as, CR, SPI_BIT(SWRST)); /* AT91SAM9263 Rev B workaround */
        spi_readl(as, SR);
        spin_unlock_irq(&as->lock);
 
index 87b73e0169c51eb2137d29679ceccbbf179b1568..b02f25c702fd2b2f4c54549a3332bca4da89c8ff 100644 (file)
@@ -369,10 +369,23 @@ static int au1550_spi_dma_txrxb(struct spi_device *spi, struct spi_transfer *t)
        dma_rx_addr = t->rx_dma;
 
        /*
-        * check if buffers are already dma mapped, map them otherwise
+        * check if buffers are already dma mapped, map them otherwise:
+        * - first map the TX buffer, so cache data gets written to memory
+        * - then map the RX buffer, so that cache entries (with
+        *   soon-to-be-stale data) get removed
         * use rx buffer in place of tx if tx buffer was not provided
         * use temp rx buffer (preallocated or realloc to fit) for rx dma
         */
+       if (t->tx_buf) {
+               if (t->tx_dma == 0) {   /* if DMA_ADDR_INVALID, map it */
+                       dma_tx_addr = dma_map_single(hw->dev,
+                                       (void *)t->tx_buf,
+                                       t->len, DMA_TO_DEVICE);
+                       if (dma_mapping_error(hw->dev, dma_tx_addr))
+                               dev_err(hw->dev, "tx dma map error\n");
+               }
+       }
+
        if (t->rx_buf) {
                if (t->rx_dma == 0) {   /* if DMA_ADDR_INVALID, map it */
                        dma_rx_addr = dma_map_single(hw->dev,
@@ -396,15 +409,8 @@ static int au1550_spi_dma_txrxb(struct spi_device *spi, struct spi_transfer *t)
                dma_sync_single_for_device(hw->dev, dma_rx_addr,
                        t->len, DMA_FROM_DEVICE);
        }
-       if (t->tx_buf) {
-               if (t->tx_dma == 0) {   /* if DMA_ADDR_INVALID, map it */
-                       dma_tx_addr = dma_map_single(hw->dev,
-                                       (void *)t->tx_buf,
-                                       t->len, DMA_TO_DEVICE);
-                       if (dma_mapping_error(hw->dev, dma_tx_addr))
-                               dev_err(hw->dev, "tx dma map error\n");
-               }
-       } else {
+
+       if (!t->tx_buf) {
                dma_sync_single_for_device(hw->dev, dma_rx_addr,
                                t->len, DMA_BIDIRECTIONAL);
                hw->tx = hw->rx;
index 0debe11b67b494a2f0ea4d49cb95598e43217c3d..3b97803e1d11b0f4114e1104bbfd93c76c932eab 100644 (file)
@@ -142,6 +142,7 @@ static int mpc52xx_psc_spi_transfer_rxtx(struct spi_device *spi,
        unsigned rfalarm;
        unsigned send_at_once = MPC52xx_PSC_BUFSIZE;
        unsigned recv_at_once;
+       int last_block = 0;
 
        if (!t->tx_buf && !t->rx_buf && t->len)
                return -EINVAL;
@@ -151,15 +152,17 @@ static int mpc52xx_psc_spi_transfer_rxtx(struct spi_device *spi,
        while (rb < t->len) {
                if (t->len - rb > MPC52xx_PSC_BUFSIZE) {
                        rfalarm = MPC52xx_PSC_RFALARM;
+                       last_block = 0;
                } else {
                        send_at_once = t->len - sb;
                        rfalarm = MPC52xx_PSC_BUFSIZE - (t->len - rb);
+                       last_block = 1;
                }
 
                dev_dbg(&spi->dev, "send %d bytes...\n", send_at_once);
                for (; send_at_once; sb++, send_at_once--) {
                        /* set EOF flag before the last word is sent */
-                       if (send_at_once == 1)
+                       if (send_at_once == 1 && last_block)
                                out_8(&psc->ircr2, 0x01);
 
                        if (tx_buf)
index dae87b1a4c6effa5c18cff538c3a634a846a2957..cf12f2d84be2c2547fdbe88caf81ea25d733f867 100644 (file)
@@ -352,21 +352,21 @@ static int map_dma_buffers(struct driver_data *drv_data)
        } else
                drv_data->tx_map_len = drv_data->len;
 
-       /* Stream map the rx buffer */
-       drv_data->rx_dma = dma_map_single(dev, drv_data->rx,
-                                               drv_data->rx_map_len,
-                                               DMA_FROM_DEVICE);
-       if (dma_mapping_error(dev, drv_data->rx_dma))
-               return 0;
-
-       /* Stream map the tx buffer */
+       /* Stream map the tx buffer. Always do DMA_TO_DEVICE first
+        * so we flush the cache *before* invalidating it, in case
+        * the tx and rx buffers overlap.
+        */
        drv_data->tx_dma = dma_map_single(dev, drv_data->tx,
-                                               drv_data->tx_map_len,
-                                               DMA_TO_DEVICE);
+                                       drv_data->tx_map_len, DMA_TO_DEVICE);
+       if (dma_mapping_error(dev, drv_data->tx_dma))
+               return 0;
 
-       if (dma_mapping_error(dev, drv_data->tx_dma)) {
-               dma_unmap_single(dev, drv_data->rx_dma,
+       /* Stream map the rx buffer */
+       drv_data->rx_dma = dma_map_single(dev, drv_data->rx,
                                        drv_data->rx_map_len, DMA_FROM_DEVICE);
+       if (dma_mapping_error(dev, drv_data->rx_dma)) {
+               dma_unmap_single(dev, drv_data->tx_dma,
+                                       drv_data->tx_map_len, DMA_TO_DEVICE);
                return 0;
        }
 
index 61ba147e384d5ddfb350115bfecf3fb239e190e0..269a55ec52ef0e617caff931c448056cc991c32a 100644 (file)
@@ -506,20 +506,6 @@ static int map_dma_buffers(struct driver_data *drv_data)
        if (!IS_DMA_ALIGNED(drv_data->rx) || !IS_DMA_ALIGNED(drv_data->tx))
                return -1;
 
-       /* NULL rx means write-only transfer and no map needed
-          since rx DMA will not be used */
-       if (drv_data->rx) {
-               buf = drv_data->rx;
-               drv_data->rx_dma = dma_map_single(
-                                       dev,
-                                       buf,
-                                       drv_data->len,
-                                       DMA_FROM_DEVICE);
-               if (dma_mapping_error(dev, drv_data->rx_dma))
-                       return -1;
-               drv_data->rx_dma_needs_unmap = 1;
-       }
-
        if (drv_data->tx == NULL) {
                /* Read only message --> use drv_data->dummy_dma_buf for dummy
                   writes to achive reads */
@@ -533,18 +519,31 @@ static int map_dma_buffers(struct driver_data *drv_data)
                                        buf,
                                        drv_data->tx_map_len,
                                        DMA_TO_DEVICE);
-       if (dma_mapping_error(dev, drv_data->tx_dma)) {
-               if (drv_data->rx_dma) {
-                       dma_unmap_single(dev,
-                                       drv_data->rx_dma,
-                                       drv_data->len,
-                                       DMA_FROM_DEVICE);
-                       drv_data->rx_dma_needs_unmap = 0;
-               }
+       if (dma_mapping_error(dev, drv_data->tx_dma))
                return -1;
-       }
        drv_data->tx_dma_needs_unmap = 1;
 
+       /* NULL rx means write-only transfer and no map needed
+        * since rx DMA will not be used */
+       if (drv_data->rx) {
+               buf = drv_data->rx;
+               drv_data->rx_dma = dma_map_single(dev,
+                                               buf,
+                                               drv_data->len,
+                                               DMA_FROM_DEVICE);
+               if (dma_mapping_error(dev, drv_data->rx_dma)) {
+                       if (drv_data->tx_dma) {
+                               dma_unmap_single(dev,
+                                               drv_data->tx_dma,
+                                               drv_data->tx_map_len,
+                                               DMA_TO_DEVICE);
+                               drv_data->tx_dma_needs_unmap = 0;
+                       }
+                       return -1;
+               }
+               drv_data->rx_dma_needs_unmap = 1;
+       }
+
        return 0;
 }
 
@@ -1457,7 +1456,7 @@ static int __init spi_imx_probe(struct platform_device *pdev)
        struct device *dev = &pdev->dev;
        struct spi_imx_master *platform_info;
        struct spi_master *master;
-       struct driver_data *drv_data = NULL;
+       struct driver_data *drv_data;
        struct resource *res;
        int irq, status = 0;
 
@@ -1468,14 +1467,6 @@ static int __init spi_imx_probe(struct platform_device *pdev)
                goto err_no_pdata;
        }
 
-       drv_data->clk = clk_get(&pdev->dev, "perclk2");
-       if (IS_ERR(drv_data->clk)) {
-               dev_err(&pdev->dev, "probe - cannot get get\n");
-               status = PTR_ERR(drv_data->clk);
-               goto err_no_clk;
-       }
-       clk_enable(drv_data->clk);
-
        /* Allocate master with space for drv_data */
        master = spi_alloc_master(dev, sizeof(struct driver_data));
        if (!master) {
@@ -1496,6 +1487,14 @@ static int __init spi_imx_probe(struct platform_device *pdev)
 
        drv_data->dummy_dma_buf = SPI_DUMMY_u32;
 
+       drv_data->clk = clk_get(&pdev->dev, "perclk2");
+       if (IS_ERR(drv_data->clk)) {
+               dev_err(&pdev->dev, "probe - cannot get clock\n");
+               status = PTR_ERR(drv_data->clk);
+               goto err_no_clk;
+       }
+       clk_enable(drv_data->clk);
+
        /* Find and map resources */
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (!res) {
@@ -1631,12 +1630,13 @@ err_no_iomap:
        kfree(drv_data->ioarea);
 
 err_no_iores:
-       spi_master_put(master);
-
-err_no_pdata:
        clk_disable(drv_data->clk);
        clk_put(drv_data->clk);
+
 err_no_clk:
+       spi_master_put(master);
+
+err_no_pdata:
 err_no_mem:
        return status;
 }
index cc1f647f579bc3019302a4c430ee71d946afd454..f2447a5476bb8eb29065eab44c2832f2f31a9059 100644 (file)
@@ -34,7 +34,7 @@ struct s3c2410_spigpio {
 
 static inline struct s3c2410_spigpio *spidev_to_sg(struct spi_device *spi)
 {
-       return spi->controller_data;
+       return spi_master_get_devdata(spi->master);
 }
 
 static inline void setsck(struct spi_device *dev, int on)
@@ -118,6 +118,7 @@ static int s3c2410_spigpio_probe(struct platform_device *dev)
        /* setup spi bitbang adaptor */
        sp->bitbang.master = spi_master_get(master);
        sp->bitbang.master->bus_num = info->bus_num;
+       sp->bitbang.master->num_chipselect = info->num_chipselect;
        sp->bitbang.chipselect = s3c2410_spigpio_chipselect;
 
        sp->bitbang.txrx_word[SPI_MODE_0] = s3c2410_spigpio_txrx_mode0;
index 89a43755a453bb265ebfa789adca222a8cce1ebe..5d869c4d3eb2a2e3dd9f46ae3ebf1cfbd333e61f 100644 (file)
@@ -597,7 +597,9 @@ static int spidev_probe(struct spi_device *spi)
        }
        mutex_unlock(&device_list_lock);
 
-       if (status != 0)
+       if (status == 0)
+               spi_set_drvdata(spi, spidev);
+       else
                kfree(spidev);
 
        return status;
index c95b286a1239e8a6cbdb4da4a292e5d85c9079f1..5d457c96bd7ed596bdaab11852fc9ad45acaa635 100644 (file)
@@ -22,6 +22,8 @@ menuconfig STAGING
          If in doubt, say N here.
 
 
+if STAGING
+
 config STAGING_EXCLUDE_BUILD
        bool "Exclude Staging drivers from being built" if STAGING
        default y
@@ -62,3 +64,4 @@ source "drivers/staging/at76_usb/Kconfig"
 source "drivers/staging/poch/Kconfig"
 
 endif # !STAGING_EXCLUDE_BUILD
+endif # STAGING
index 20104443081ad1fc260d4ba74f17a0c9828eca69..d50a99f70aee8d33941e5445f62bef41778093d3 100644 (file)
@@ -158,16 +158,12 @@ static int acm_wb_is_avail(struct acm *acm)
 }
 
 /*
- * Finish write.
+ * Finish write. Caller must hold acm->write_lock
  */
 static void acm_write_done(struct acm *acm, struct acm_wb *wb)
 {
-       unsigned long flags;
-
-       spin_lock_irqsave(&acm->write_lock, flags);
        wb->use = 0;
        acm->transmitting--;
-       spin_unlock_irqrestore(&acm->write_lock, flags);
 }
 
 /*
@@ -482,6 +478,7 @@ static void acm_write_bulk(struct urb *urb)
 {
        struct acm_wb *wb = urb->context;
        struct acm *acm = wb->instance;
+       unsigned long flags;
 
        if (verbose || urb->status
                        || (urb->actual_length != urb->transfer_buffer_length))
@@ -490,7 +487,9 @@ static void acm_write_bulk(struct urb *urb)
                        urb->transfer_buffer_length,
                        urb->status);
 
+       spin_lock_irqsave(&acm->write_lock, flags);
        acm_write_done(acm, wb);
+       spin_unlock_irqrestore(&acm->write_lock, flags);
        if (ACM_READY(acm))
                schedule_work(&acm->work);
        else
index 8e74657f106c01d152c8e5244e75100bdd94f682..43a863c5cc430367ad045625eb4c3faecbfba7f9 100644 (file)
@@ -51,6 +51,7 @@ static struct usb_device_id usbtmc_devices[] = {
        { USB_INTERFACE_INFO(USB_CLASS_APP_SPEC, 3, 0), },
        { 0, } /* terminating entry */
 };
+MODULE_DEVICE_TABLE(usb, usbtmc_devices);
 
 /*
  * This structure is the capabilities for the device
index 3d7793d93031525400d3ed746a60639ebed1d52f..8c081308b0e2d8bf2349d6b9e9703de0548213ac 100644 (file)
@@ -279,7 +279,9 @@ static int usb_unbind_interface(struct device *dev)
         * altsetting means creating new endpoint device entries).
         * When either of these happens, defer the Set-Interface.
         */
-       if (!error && intf->dev.power.status == DPM_ON)
+       if (intf->cur_altsetting->desc.bAlternateSetting == 0)
+               ;       /* Already in altsetting 0 so skip Set-Interface */
+       else if (!error && intf->dev.power.status == DPM_ON)
                usb_set_interface(udev, intf->altsetting[0].
                                desc.bInterfaceNumber, 0);
        else
index 887738577b2838df3e02f93c05a9fe32a48b0606..6d1048faf08e1679597af0fadd6a5849d3afd299 100644 (file)
@@ -1091,6 +1091,7 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0)
                                continue;
                        dev_dbg(&dev->dev, "unregistering interface %s\n",
                                dev_name(&interface->dev));
+                       interface->unregistering = 1;
                        usb_remove_sysfs_intf_files(interface);
                        device_del(&interface->dev);
                }
index f66fba11fbd53f2eeaf5a5ebc17a9d8251c526db..4fb65fdc9dc36bb51eb25059789886fbd1dfe857 100644 (file)
@@ -840,7 +840,7 @@ int usb_create_sysfs_intf_files(struct usb_interface *intf)
        struct usb_host_interface *alt = intf->cur_altsetting;
        int retval;
 
-       if (intf->sysfs_files_created)
+       if (intf->sysfs_files_created || intf->unregistering)
                return 0;
 
        /* The interface string may be present in some altsettings
index 4342bd9c3bb610d9582217aae0bc524378a28a7f..1f68af9db3f7d6bed13bcab914eb238b638b5bee 100644 (file)
@@ -85,8 +85,8 @@ EXPORT_SYMBOL_GPL(usb_alloc_urb);
  * Must be called when a user of a urb is finished with it.  When the last user
  * of the urb calls this function, the memory of the urb is freed.
  *
- * Note: The transfer buffer associated with the urb is not freed, that must be
- * done elsewhere.
+ * Note: The transfer buffer associated with the urb is not freed unless the
+ * URB_FREE_BUFFER transfer flag is set.
  */
 void usb_free_urb(struct urb *urb)
 {
index 5ee1590b8e9cf2739e629804193aa8fa053954cf..c1d34df0b157c45f533b03b794bd14a929055f70 100644 (file)
@@ -463,7 +463,11 @@ static int acm_cdc_notify(struct f_acm *acm, u8 type, u16 value,
        notify->wLength = cpu_to_le16(length);
        memcpy(buf, data, length);
 
+       /* ep_queue() can complete immediately if it fills the fifo... */
+       spin_unlock(&acm->lock);
        status = usb_ep_queue(ep, req, GFP_ATOMIC);
+       spin_lock(&acm->lock);
+
        if (status < 0) {
                ERROR(acm->port.func.config->cdev,
                                "acm ttyGS%d can't notify serial state, %d\n",
index 659b3d9671c4fe3f0f31220cb4b3bde514d88d2b..3a8bb53fc473269e31366d0c11069490a30cb7bf 100644 (file)
@@ -172,7 +172,6 @@ static struct usb_interface_descriptor rndis_data_intf __initdata = {
        .bDescriptorType =      USB_DT_INTERFACE,
 
        /* .bInterfaceNumber = DYNAMIC */
-       .bAlternateSetting =    1,
        .bNumEndpoints =        2,
        .bInterfaceClass =      USB_CLASS_CDC_DATA,
        .bInterfaceSubClass =   0,
@@ -303,7 +302,7 @@ static void rndis_response_available(void *_rndis)
        __le32                          *data = req->buf;
        int                             status;
 
-       if (atomic_inc_return(&rndis->notify_count))
+       if (atomic_inc_return(&rndis->notify_count) != 1)
                return;
 
        /* Send RNDIS RESPONSE_AVAILABLE notification; a
@@ -652,6 +651,8 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f)
                                fs_in_desc.bEndpointAddress;
                hs_out_desc.bEndpointAddress =
                                fs_out_desc.bEndpointAddress;
+               hs_notify_desc.bEndpointAddress =
+                               fs_notify_desc.bEndpointAddress;
 
                /* copy descriptors, and track endpoint copies */
                f->hs_descriptors = usb_copy_descriptors(eth_hs_function);
@@ -663,6 +664,8 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f)
                                f->hs_descriptors, &hs_in_desc);
                rndis->hs.out = usb_find_endpoint(eth_hs_function,
                                f->hs_descriptors, &hs_out_desc);
+               rndis->hs.notify = usb_find_endpoint(eth_hs_function,
+                               f->hs_descriptors, &hs_notify_desc);
        }
 
        rndis->port.open = rndis_open;
index 1fe8b44787b332c93e4b8261243c08e3816b2d27..b3408ff39fba07d8e289a9d69f28cc2b6b296512 100644 (file)
@@ -2363,6 +2363,9 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
                nuke(loop_ep, -ESHUTDOWN);
        spin_unlock_irqrestore(&udc_controller->lock, flags);
 
+       /* report disconnect; the controller is already quiesced */
+       driver->disconnect(&udc_controller->gadget);
+
        /* unbind gadget and unhook driver. */
        driver->unbind(&udc_controller->gadget);
        udc_controller->gadget.dev.driver = NULL;
index 091bb55c9aa7abaee80930e9e79bb955a9f47bf3..f3c6703cffda3c700399f8352f2ed5bf76530b6f 100644 (file)
@@ -1836,6 +1836,9 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
                nuke(loop_ep, -ESHUTDOWN);
        spin_unlock_irqrestore(&udc_controller->lock, flags);
 
+       /* report disconnect; the controller is already quiesced */
+       driver->disconnect(&udc_controller->gadget);
+
        /* unbind gadget and unhook driver. */
        driver->unbind(&udc_controller->gadget);
        udc_controller->gadget.dev.driver = NULL;
index da6e93c201d20183b7d804591f880cf6005e6683..2dbc0db0b46c66c5e455b33db339ae452cc25e16 100644 (file)
@@ -141,7 +141,11 @@ static int is_vbus_present(void)
 
        if (mach->gpio_vbus) {
                int value = gpio_get_value(mach->gpio_vbus);
-               return mach->gpio_vbus_inverted ? !value : value;
+
+               if (mach->gpio_vbus_inverted)
+                       return !value;
+               else
+                       return !!value;
        }
        if (mach->udc_is_connected)
                return mach->udc_is_connected();
@@ -982,7 +986,7 @@ static int pxa25x_udc_vbus_session(struct usb_gadget *_gadget, int is_active)
        struct pxa25x_udc       *udc;
 
        udc = container_of(_gadget, struct pxa25x_udc, gadget);
-       udc->vbus = (is_active != 0);
+       udc->vbus = is_active;
        DMSG("vbus %s\n", is_active ? "supplied" : "inactive");
        pullup(udc);
        return 0;
@@ -1399,12 +1403,8 @@ lubbock_vbus_irq(int irq, void *_dev)
 static irqreturn_t udc_vbus_irq(int irq, void *_dev)
 {
        struct pxa25x_udc       *dev = _dev;
-       int                     vbus = gpio_get_value(dev->mach->gpio_vbus);
 
-       if (dev->mach->gpio_vbus_inverted)
-               vbus = !vbus;
-
-       pxa25x_udc_vbus_session(&dev->gadget, vbus);
+       pxa25x_udc_vbus_session(&dev->gadget, is_vbus_present());
        return IRQ_HANDLED;
 }
 
index 56f592dc0b3626139f4e9b34dd191af967f30bf0..f3a75a929e0aa26dcdbaee0c75c0cfa10403f8bf 100644 (file)
@@ -110,29 +110,18 @@ config USB_ISP116X_HCD
 
 config USB_ISP1760_HCD
        tristate "ISP 1760 HCD support"
-       depends on USB && EXPERIMENTAL
+       depends on USB && EXPERIMENTAL && (PCI || PPC_OF)
        ---help---
          The ISP1760 chip is a USB 2.0 host controller.
 
          This driver does not support isochronous transfers or OTG.
+         This USB controller is usually attached to a non-DMA-Master
+         capable bus. NXP's eval kit brings this chip on PCI card
+         where the chip itself is behind a PLB to simulate such
+         a bus.
 
          To compile this driver as a module, choose M here: the
-         module will be called isp1760-hcd.
-
-config USB_ISP1760_PCI
-       bool "Support for the PCI bus"
-       depends on USB_ISP1760_HCD && PCI
-       ---help---
-         Enables support for the device present on the PCI bus.
-         This should only be required if you happen to have the eval kit from
-         NXP and you are going to test it.
-
-config USB_ISP1760_OF
-       bool "Support for the OF platform bus"
-       depends on USB_ISP1760_HCD && PPC_OF
-       ---help---
-         Enables support for the device present on the PowerPC
-         OpenFirmware platform bus.
+         module will be called isp1760.
 
 config USB_OHCI_HCD
        tristate "OHCI HCD support"
index 15a803b206b8ea72c4774ba6edb504a0fd5e964c..4725d15d096f559fc833d0e0f6323bcff4aa7631 100644 (file)
@@ -643,7 +643,7 @@ static int ehci_run (struct usb_hcd *hcd)
 static irqreturn_t ehci_irq (struct usb_hcd *hcd)
 {
        struct ehci_hcd         *ehci = hcd_to_ehci (hcd);
-       u32                     status, pcd_status = 0, cmd;
+       u32                     status, masked_status, pcd_status = 0, cmd;
        int                     bh;
 
        spin_lock (&ehci->lock);
@@ -656,14 +656,14 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
                goto dead;
        }
 
-       status &= INTR_MASK;
-       if (!status) {                  /* irq sharing? */
+       masked_status = status & INTR_MASK;
+       if (!masked_status) {           /* irq sharing? */
                spin_unlock(&ehci->lock);
                return IRQ_NONE;
        }
 
        /* clear (just) interrupts */
-       ehci_writel(ehci, status, &ehci->regs->status);
+       ehci_writel(ehci, masked_status, &ehci->regs->status);
        cmd = ehci_readl(ehci, &ehci->regs->command);
        bh = 0;
 
@@ -734,18 +734,17 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
 
        /* PCI errors [4.15.2.4] */
        if (unlikely ((status & STS_FATAL) != 0)) {
+               ehci_err(ehci, "fatal error\n");
                dbg_cmd(ehci, "fatal", cmd);
                dbg_status(ehci, "fatal", status);
-               if (status & STS_HALT) {
-                       ehci_err (ehci, "fatal error\n");
+               ehci_halt(ehci);
 dead:
-                       ehci_reset (ehci);
-                       ehci_writel(ehci, 0, &ehci->regs->configured_flag);
-                       /* generic layer kills/unlinks all urbs, then
-                        * uses ehci_stop to clean up the rest
-                        */
-                       bh = 1;
-               }
+               ehci_reset(ehci);
+               ehci_writel(ehci, 0, &ehci->regs->configured_flag);
+               /* generic layer kills/unlinks all urbs, then
+                * uses ehci_stop to clean up the rest
+                */
+               bh = 1;
        }
 
        if (bh)
index c46a58f9181ded00f97627f076277fd32db9ff79..36864f9584445a41cf8bea70155c50b76f888cc2 100644 (file)
@@ -66,6 +66,8 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
 {
        struct ehci_hcd         *ehci = hcd_to_ehci(hcd);
        struct pci_dev          *pdev = to_pci_dev(hcd->self.controller);
+       struct pci_dev          *p_smbus;
+       u8                      rev;
        u32                     temp;
        int                     retval;
 
@@ -166,6 +168,28 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
                        pci_write_config_byte(pdev, 0x4b, tmp | 0x20);
                }
                break;
+       case PCI_VENDOR_ID_ATI:
+               /* SB600 and old version of SB700 have a bug in EHCI controller,
+                * which causes usb devices lose response in some cases.
+                */
+               if ((pdev->device == 0x4386) || (pdev->device == 0x4396)) {
+                       p_smbus = pci_get_device(PCI_VENDOR_ID_ATI,
+                                                PCI_DEVICE_ID_ATI_SBX00_SMBUS,
+                                                NULL);
+                       if (!p_smbus)
+                               break;
+                       rev = p_smbus->revision;
+                       if ((pdev->device == 0x4386) || (rev == 0x3a)
+                           || (rev == 0x3b)) {
+                               u8 tmp;
+                               ehci_info(ehci, "applying AMD SB600/SB700 USB "
+                                       "freeze workaround\n");
+                               pci_read_config_byte(pdev, 0x53, &tmp);
+                               pci_write_config_byte(pdev, 0x53, tmp | (1<<3));
+                       }
+                       pci_dev_put(p_smbus);
+               }
+               break;
        }
 
        ehci_reset(ehci);
index 0eba894bcb017aa0706f5e60224149e76338d99a..9c9da35abc6c010c6929a1e515fc4179ef898111 100644 (file)
@@ -205,6 +205,7 @@ static int ps3_ehci_remove(struct ps3_system_bus_device *dev)
 
        tmp = hcd->irq;
 
+       ehci_shutdown(hcd);
        usb_remove_hcd(hcd);
 
        ps3_system_bus_set_driver_data(dev, NULL);
index 4a0c5a78b2ed74358055e800d5181b1a1e2cb1c7..a081ee65bde6d933f3f2000c67028d461ece27c7 100644 (file)
@@ -918,7 +918,7 @@ iso_stream_init (
                 */
                stream->usecs = HS_USECS_ISO (maxp);
                bandwidth = stream->usecs * 8;
-               bandwidth /= 1 << (interval - 1);
+               bandwidth /= interval;
 
        } else {
                u32             addr;
@@ -951,7 +951,7 @@ iso_stream_init (
                } else
                        stream->raw_mask = smask_out [hs_transfers - 1];
                bandwidth = stream->usecs + stream->c_usecs;
-               bandwidth /= 1 << (interval + 2);
+               bandwidth /= interval << 3;
 
                /* stream->splits gets created from raw_mask later */
                stream->address = cpu_to_hc32(ehci, addr);
index b11798d17ae56f1e69233db67e916e681b9351eb..c7d4b5a06bdb049e424228560a9d0b51f4baf7fd 100644 (file)
@@ -183,16 +183,14 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action)
         * the async ring; just the I/O watchdog.  Note that if a
         * SHRINK were pending, OFF would never be requested.
         */
-       enum ehci_timer_action oldactions = ehci->actions;
+       if (timer_pending(&ehci->watchdog)
+                       && ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF))
+                               & ehci->actions))
+               return;
 
        if (!test_and_set_bit (action, &ehci->actions)) {
                unsigned long t;
 
-               if (timer_pending(&ehci->watchdog)
-                       && ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF))
-                               & oldactions))
-                       return;
-
                switch (action) {
                case TIMER_IO_WATCHDOG:
                        t = EHCI_IO_JIFFIES;
@@ -208,7 +206,7 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action)
                        t = DIV_ROUND_UP(EHCI_SHRINK_FRAMES * HZ, 1000) + 1;
                        break;
                }
-               mod_timer(&ehci->watchdog, round_jiffies(t + jiffies));
+               mod_timer(&ehci->watchdog, t + jiffies);
        }
 }
 
index af849f596135324bf727ac667f7f2d4cbc7d9920..b87ca7cf4b378f4ee0c6ee7ed403e629d79a38ea 100644 (file)
 #include "../core/hcd.h"
 #include "isp1760-hcd.h"
 
-#ifdef CONFIG_USB_ISP1760_OF
+#ifdef CONFIG_PPC_OF
 #include <linux/of.h>
 #include <linux/of_platform.h>
 #endif
 
-#ifdef CONFIG_USB_ISP1760_PCI
+#ifdef CONFIG_PCI
 #include <linux/pci.h>
 #endif
 
-#ifdef CONFIG_USB_ISP1760_OF
+#ifdef CONFIG_PPC_OF
 static int of_isp1760_probe(struct of_device *dev,
                const struct of_device_id *match)
 {
@@ -128,7 +128,7 @@ static struct of_platform_driver isp1760_of_driver = {
 };
 #endif
 
-#ifdef CONFIG_USB_ISP1760_PCI
+#ifdef CONFIG_PCI
 static u32 nxp_pci_io_base;
 static u32 iolength;
 static u32 pci_mem_phy0;
@@ -288,28 +288,28 @@ static struct pci_driver isp1761_pci_driver = {
 
 static int __init isp1760_init(void)
 {
-       int ret = -ENODEV;
+       int ret;
 
        init_kmem_once();
 
-#ifdef CONFIG_USB_ISP1760_OF
+#ifdef CONFIG_PPC_OF
        ret = of_register_platform_driver(&isp1760_of_driver);
        if (ret) {
                deinit_kmem_cache();
                return ret;
        }
 #endif
-#ifdef CONFIG_USB_ISP1760_PCI
+#ifdef CONFIG_PCI
        ret = pci_register_driver(&isp1761_pci_driver);
        if (ret)
                goto unreg_of;
 #endif
        return ret;
 
-#ifdef CONFIG_USB_ISP1760_PCI
+#ifdef CONFIG_PCI
 unreg_of:
 #endif
-#ifdef CONFIG_USB_ISP1760_OF
+#ifdef CONFIG_PPC_OF
        of_unregister_platform_driver(&isp1760_of_driver);
 #endif
        deinit_kmem_cache();
@@ -319,10 +319,10 @@ module_init(isp1760_init);
 
 static void __exit isp1760_exit(void)
 {
-#ifdef CONFIG_USB_ISP1760_OF
+#ifdef CONFIG_PPC_OF
        of_unregister_platform_driver(&isp1760_of_driver);
 #endif
-#ifdef CONFIG_USB_ISP1760_PCI
+#ifdef CONFIG_PCI
        pci_unregister_driver(&isp1761_pci_driver);
 #endif
        deinit_kmem_cache();
index 2089d8a46c4bbedb0cd140dc5db4d0cee4cab908..3c1a3b5f89f19fb19dde0962b8b4e6a2e704b9e4 100644 (file)
@@ -192,7 +192,7 @@ fail_start:
        return result;
 }
 
-static int ps3_ohci_remove (struct ps3_system_bus_device *dev)
+static int ps3_ohci_remove(struct ps3_system_bus_device *dev)
 {
        unsigned int tmp;
        struct usb_hcd *hcd =
@@ -205,6 +205,7 @@ static int ps3_ohci_remove (struct ps3_system_bus_device *dev)
 
        tmp = hcd->irq;
 
+       ohci_shutdown(hcd);
        usb_remove_hcd(hcd);
 
        ps3_system_bus_set_driver_data(dev, NULL);
index c18d8790c4107c032eb0e34b94be345683828d8d..2376f24f3c83dc964f03286a66a88ab195434179 100644 (file)
@@ -1763,11 +1763,12 @@ static void r8a66597_timer(unsigned long _r8a66597)
 {
        struct r8a66597 *r8a66597 = (struct r8a66597 *)_r8a66597;
        unsigned long flags;
+       int port;
 
        spin_lock_irqsave(&r8a66597->lock, flags);
 
-       r8a66597_root_hub_control(r8a66597, 0);
-       r8a66597_root_hub_control(r8a66597, 1);
+       for (port = 0; port < R8A66597_MAX_ROOT_HUB; port++)
+               r8a66597_root_hub_control(r8a66597, port);
 
        spin_unlock_irqrestore(&r8a66597->lock, flags);
 }
index 69c34a58e2054a7c49d225164a3f1a7ead20cf5a..b4ec716de7dadc12b766e445822edbc4f35f537a 100644 (file)
@@ -3270,6 +3270,7 @@ static struct usb_device_id sisusb_table [] = {
        { USB_DEVICE(0x0711, 0x0900) },
        { USB_DEVICE(0x0711, 0x0901) },
        { USB_DEVICE(0x0711, 0x0902) },
+       { USB_DEVICE(0x0711, 0x0903) },
        { USB_DEVICE(0x0711, 0x0918) },
        { USB_DEVICE(0x182d, 0x021c) },
        { USB_DEVICE(0x182d, 0x0269) },
index 8648470c81caa3a4e516445255a00b9101373c25..63dff9ba73c5d074bcd87ba13fcd4188dce81960 100644 (file)
@@ -620,7 +620,7 @@ static long vstusb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                                __func__);
                        retval = -EFAULT;
                } else {
-                       dev_dbg(&dev->dev, "%s: recv %d bytes from pipe %d\n",
+                       dev_dbg(&dev->dev, "%s: recv %zd bytes from pipe %d\n",
                                __func__, usb_data.count, usb_data.pipe);
                }
 
index c9de3f027aab07a9907b331f25c7723ac012d8e3..e06810aef2dfedbec54f8b232b4219d79fba5536 100644 (file)
@@ -687,7 +687,10 @@ static ssize_t mon_bin_read(struct file *file, char __user *buf,
        }
 
        if (rp->b_read >= sizeof(struct mon_bin_hdr)) {
-               step_len = min(nbytes, (size_t)ep->len_cap);
+               step_len = ep->len_cap;
+               step_len -= rp->b_read - sizeof(struct mon_bin_hdr);
+               if (step_len > nbytes)
+                       step_len = nbytes;
                offset = rp->b_out + PKT_SIZE;
                offset += rp->b_read - sizeof(struct mon_bin_hdr);
                if (offset >= rp->b_size)
index 4a35745b30be6992ff775cfd118c02750a2eef52..5280dba9b1fb7e0a94f6dc1b379b28fc5c7d831b 100644 (file)
 
 
 
-unsigned debug;
-module_param(debug, uint, S_IRUGO | S_IWUSR);
+unsigned musb_debug;
+module_param(musb_debug, uint, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(debug, "Debug message level. Default = 0");
 
 #define DRIVER_AUTHOR "Mentor Graphics, Texas Instruments, Nokia"
@@ -2248,7 +2248,7 @@ static int __init musb_init(void)
                "host"
 #endif
                ", debug=%d\n",
-               musb_driver_name, debug);
+               musb_driver_name, musb_debug);
        return platform_driver_probe(&musb_driver, musb_probe);
 }
 
index 4d2794441b153ac6c2f745b99f06c245cb56bbe5..9fc1db44c72c13844e73148112bbe8055c65ef3f 100644 (file)
                                __func__, __LINE__ , ## args); \
        } } while (0)
 
-extern unsigned debug;
+extern unsigned musb_debug;
 
 static inline int _dbg_level(unsigned l)
 {
-       return debug >= l;
+       return musb_debug >= l;
 }
 
 #define DBG(level, fmt, args...) xprintk(level, KERN_DEBUG, fmt, ## args)
index 3133990f04ec868fcb0809cd233535f3fc562ff2..cc64462d4c4ee0ee97e5271afa3769bdfdab7686 100644 (file)
@@ -378,6 +378,19 @@ musb_giveback(struct musb_qh *qh, struct urb *urb, int status)
 
                switch (qh->type) {
 
+               case USB_ENDPOINT_XFER_CONTROL:
+               case USB_ENDPOINT_XFER_BULK:
+                       /* fifo policy for these lists, except that NAKing
+                        * should rotate a qh to the end (for fairness).
+                        */
+                       if (qh->mux == 1) {
+                               head = qh->ring.prev;
+                               list_del(&qh->ring);
+                               kfree(qh);
+                               qh = first_qh(head);
+                               break;
+                       }
+
                case USB_ENDPOINT_XFER_ISOC:
                case USB_ENDPOINT_XFER_INT:
                        /* this is where periodic bandwidth should be
@@ -388,17 +401,6 @@ musb_giveback(struct musb_qh *qh, struct urb *urb, int status)
                        kfree(qh);
                        qh = NULL;
                        break;
-
-               case USB_ENDPOINT_XFER_CONTROL:
-               case USB_ENDPOINT_XFER_BULK:
-                       /* fifo policy for these lists, except that NAKing
-                        * should rotate a qh to the end (for fairness).
-                        */
-                       head = qh->ring.prev;
-                       list_del(&qh->ring);
-                       kfree(qh);
-                       qh = first_qh(head);
-                       break;
                }
        }
        return qh;
@@ -1507,10 +1509,29 @@ void musb_host_rx(struct musb *musb, u8 epnum)
                musb_writew(hw_ep->regs, MUSB_RXCSR, val);
 
 #ifdef CONFIG_USB_INVENTRA_DMA
+               if (usb_pipeisoc(pipe)) {
+                       struct usb_iso_packet_descriptor *d;
+
+                       d = urb->iso_frame_desc + qh->iso_idx;
+                       d->actual_length = xfer_len;
+
+                       /* even if there was an error, we did the dma
+                        * for iso_frame_desc->length
+                        */
+                       if (d->status != EILSEQ && d->status != -EOVERFLOW)
+                               d->status = 0;
+
+                       if (++qh->iso_idx >= urb->number_of_packets)
+                               done = true;
+                       else
+                               done = false;
+
+               } else  {
                /* done if urb buffer is full or short packet is recd */
                done = (urb->actual_length + xfer_len >=
                                urb->transfer_buffer_length
                        || dma->actual_len < qh->maxpacket);
+               }
 
                /* send IN token for next packet, without AUTOREQ */
                if (!done) {
@@ -1547,7 +1568,8 @@ void musb_host_rx(struct musb *musb, u8 epnum)
                if (dma) {
                        struct dma_controller   *c;
                        u16                     rx_count;
-                       int                     ret;
+                       int                     ret, length;
+                       dma_addr_t              buf;
 
                        rx_count = musb_readw(epio, MUSB_RXCOUNT);
 
@@ -1560,6 +1582,35 @@ void musb_host_rx(struct musb *musb, u8 epnum)
 
                        c = musb->dma_controller;
 
+                       if (usb_pipeisoc(pipe)) {
+                               int status = 0;
+                               struct usb_iso_packet_descriptor *d;
+
+                               d = urb->iso_frame_desc + qh->iso_idx;
+
+                               if (iso_err) {
+                                       status = -EILSEQ;
+                                       urb->error_count++;
+                               }
+                               if (rx_count > d->length) {
+                                       if (status == 0) {
+                                               status = -EOVERFLOW;
+                                               urb->error_count++;
+                                       }
+                                       DBG(2, "** OVERFLOW %d into %d\n",\
+                                           rx_count, d->length);
+
+                                       length = d->length;
+                               } else
+                                       length = rx_count;
+                               d->status = status;
+                               buf = urb->transfer_dma + d->offset;
+                       } else {
+                               length = rx_count;
+                               buf = urb->transfer_dma +
+                                               urb->actual_length;
+                       }
+
                        dma->desired_mode = 0;
 #ifdef USE_MODE1
                        /* because of the issue below, mode 1 will
@@ -1571,6 +1622,12 @@ void musb_host_rx(struct musb *musb, u8 epnum)
                                                urb->actual_length)
                                        > qh->maxpacket)
                                dma->desired_mode = 1;
+                       if (rx_count < hw_ep->max_packet_sz_rx) {
+                               length = rx_count;
+                               dma->bDesiredMode = 0;
+                       } else {
+                               length = urb->transfer_buffer_length;
+                       }
 #endif
 
 /* Disadvantage of using mode 1:
@@ -1608,12 +1665,7 @@ void musb_host_rx(struct musb *musb, u8 epnum)
                         */
                        ret = c->channel_program(
                                dma, qh->maxpacket,
-                               dma->desired_mode,
-                               urb->transfer_dma
-                                       + urb->actual_length,
-                               (dma->desired_mode == 0)
-                                       ? rx_count
-                                       : urb->transfer_buffer_length);
+                               dma->desired_mode, buf, length);
 
                        if (!ret) {
                                c->channel_release(dma);
@@ -1631,19 +1683,6 @@ void musb_host_rx(struct musb *musb, u8 epnum)
                }
        }
 
-       if (dma && usb_pipeisoc(pipe)) {
-               struct usb_iso_packet_descriptor        *d;
-               int                                     iso_stat = status;
-
-               d = urb->iso_frame_desc + qh->iso_idx;
-               d->actual_length += xfer_len;
-               if (iso_err) {
-                       iso_stat = -EILSEQ;
-                       urb->error_count++;
-               }
-               d->status = iso_stat;
-       }
-
 finish:
        urb->actual_length += xfer_len;
        qh->offset += xfer_len;
@@ -1671,22 +1710,9 @@ static int musb_schedule(
        struct list_head        *head = NULL;
 
        /* use fixed hardware for control and bulk */
-       switch (qh->type) {
-       case USB_ENDPOINT_XFER_CONTROL:
+       if (qh->type == USB_ENDPOINT_XFER_CONTROL) {
                head = &musb->control;
                hw_ep = musb->control_ep;
-               break;
-       case USB_ENDPOINT_XFER_BULK:
-               hw_ep = musb->bulk_ep;
-               if (is_in)
-                       head = &musb->in_bulk;
-               else
-                       head = &musb->out_bulk;
-               break;
-       }
-       if (head) {
-               idle = list_empty(head);
-               list_add_tail(&qh->ring, head);
                goto success;
        }
 
@@ -1725,19 +1751,34 @@ static int musb_schedule(
                else
                        diff = hw_ep->max_packet_sz_tx - qh->maxpacket;
 
-               if (diff > 0 && best_diff > diff) {
+               if (diff >= 0 && best_diff > diff) {
                        best_diff = diff;
                        best_end = epnum;
                }
        }
-       if (best_end < 0)
+       /* use bulk reserved ep1 if no other ep is free */
+       if (best_end < 0 && qh->type == USB_ENDPOINT_XFER_BULK) {
+               hw_ep = musb->bulk_ep;
+               if (is_in)
+                       head = &musb->in_bulk;
+               else
+                       head = &musb->out_bulk;
+               goto success;
+       } else if (best_end < 0) {
                return -ENOSPC;
+       }
 
        idle = 1;
+       qh->mux = 0;
        hw_ep = musb->endpoints + best_end;
        musb->periodic[best_end] = qh;
        DBG(4, "qh %p periodic slot %d\n", qh, best_end);
 success:
+       if (head) {
+               idle = list_empty(head);
+               list_add_tail(&qh->ring, head);
+               qh->mux = 1;
+       }
        qh->hw_ep = hw_ep;
        qh->hep->hcpriv = qh;
        if (idle)
@@ -2015,11 +2056,13 @@ static int musb_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
                        sched = &musb->control;
                        break;
                case USB_ENDPOINT_XFER_BULK:
-                       if (usb_pipein(urb->pipe))
-                               sched = &musb->in_bulk;
-                       else
-                               sched = &musb->out_bulk;
-                       break;
+                       if (qh->mux == 1) {
+                               if (usb_pipein(urb->pipe))
+                                       sched = &musb->in_bulk;
+                               else
+                                       sched = &musb->out_bulk;
+                               break;
+                       }
                default:
                        /* REVISIT when we get a schedule tree, periodic
                         * transfers won't always be at the head of a
@@ -2067,11 +2110,13 @@ musb_h_disable(struct usb_hcd *hcd, struct usb_host_endpoint *hep)
                sched = &musb->control;
                break;
        case USB_ENDPOINT_XFER_BULK:
-               if (is_in)
-                       sched = &musb->in_bulk;
-               else
-                       sched = &musb->out_bulk;
-               break;
+               if (qh->mux == 1) {
+                       if (is_in)
+                               sched = &musb->in_bulk;
+                       else
+                               sched = &musb->out_bulk;
+                       break;
+               }
        default:
                /* REVISIT when we get a schedule tree, periodic transfers
                 * won't always be at the head of a singleton queue...
index 77bcdb9d5b32d93c1fd77433bce4821d9ab9c4bd..0b7fbcd21963ebcc23435d168a061bed741ff612 100644 (file)
@@ -53,6 +53,7 @@ struct musb_qh {
 
        struct list_head        ring;           /* of musb_qh */
        /* struct musb_qh               *next; */       /* for periodic tree */
+       u8                      mux;            /* qh multiplexed to hw_ep */
 
        unsigned                offset;         /* in urb->transfer_buffer */
        unsigned                segsize;        /* current xfer fragment */
index 9d2dcb121c5e95cc7e6ba81a5cdfa59ae07637ae..ce6c162920f7bfcb5bef980b2438aeba4661d12b 100644 (file)
@@ -53,7 +53,9 @@ static void musb_do_idle(unsigned long _musb)
 {
        struct musb     *musb = (void *)_musb;
        unsigned long   flags;
+#ifdef CONFIG_USB_MUSB_HDRC_HCD
        u8      power;
+#endif
        u8      devctl;
 
        devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
index b73b036f3d7770c01822e0885635a5fa3879aeae..ee8fca92a4ac4cd0ec58b157941bf8017ecff331 100644 (file)
@@ -605,7 +605,7 @@ void musb_platform_set_mode(struct musb *musb, u8 musb_mode)
 
        if (musb->board_mode != MUSB_OTG) {
                ERR("Changing mode currently only supported in OTG mode\n");
-               return;
+               return -EINVAL;
        }
 
        otg_stat = musb_readl(tbase, TUSB_DEV_OTG_STAT);
index 5b20de130e08399045e3134dff18bfb8543af5f4..5b95009d2fbb104d28065010dc857da2eace6c42 100644 (file)
@@ -135,6 +135,7 @@ static int usb_console_setup(struct console *co, char *options)
                                err("no more memory");
                                goto reset_open_count;
                        }
+                       kref_init(&tty->kref);
                        termios = kzalloc(sizeof(*termios), GFP_KERNEL);
                        if (!termios) {
                                retval = -ENOMEM;
index 8008d0bc80ad3732a05b4fa82b04b06f3fb334fc..cfaf1f0855351c110a13a0c9c0287b79702d722b 100644 (file)
@@ -56,6 +56,7 @@ static void cp2101_shutdown(struct usb_serial *);
 static int debug;
 
 static struct usb_device_id id_table [] = {
+       { USB_DEVICE(0x0471, 0x066A) }, /* AKTAKOM ACE-1001 cable */
        { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */
        { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */
        { USB_DEVICE(0x0FCF, 0x1003) }, /* Dynastream ANT development board */
@@ -67,6 +68,7 @@ static struct usb_device_id id_table [] = {
        { USB_DEVICE(0x10C4, 0x800A) }, /* SPORTident BSM7-D-USB main station */
        { USB_DEVICE(0x10C4, 0x803B) }, /* Pololu USB-serial converter */
        { USB_DEVICE(0x10C4, 0x8053) }, /* Enfora EDG1228 */
+       { USB_DEVICE(0x10C4, 0x8054) }, /* Enfora GSM2228 */
        { USB_DEVICE(0x10C4, 0x8066) }, /* Argussoft In-System Programmer */
        { USB_DEVICE(0x10C4, 0x807A) }, /* Crumb128 board */
        { USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */
@@ -85,6 +87,7 @@ static struct usb_device_id id_table [] = {
        { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */
        { USB_DEVICE(0x10c4, 0x8293) }, /* Telegesys ETRX2USB */
        { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */
+       { USB_DEVICE(0x10C4, 0x83A8) }, /* Amber Wireless AMB2560 */
        { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
        { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
        { USB_DEVICE(0x10C4, 0xF001) }, /* Elan Digital Systems USBscope50 */
index 51d7bdea2869ae147953fd10bbd7c3984c360aee..fb6f2933b01badb0075c285078fb6067fc7b6827 100644 (file)
@@ -143,6 +143,7 @@ static struct ftdi_sio_quirk ftdi_HE_TIRA1_quirk = {
 static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_1_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_2_PID) },
@@ -166,6 +167,7 @@ static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_PID) },
        { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
        { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_SPROG_II) },
        { USB_DEVICE(FTDI_VID, FTDI_XF_632_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_XF_634_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_XF_547_PID) },
@@ -1498,7 +1500,7 @@ static int ftdi_open(struct tty_struct *tty,
                        priv->interface, buf, 0, WDR_TIMEOUT);
 
        /* Termios defaults are set by usb_serial_init. We don't change
-          port->tty->termios - this would loose speed settings, etc.
+          port->tty->termios - this would lose speed settings, etc.
           This is same behaviour as serial.c/rs_open() - Kuba */
 
        /* ftdi_set_termios  will send usb control messages */
index 07a3992abad2b546095e35d247a3d7e68aec1eec..373ee09975bbd8c80b2a158aa32b9c6595a3bfbe 100644 (file)
@@ -40,6 +40,9 @@
 /* AlphaMicro Components AMC-232USB01 device */
 #define FTDI_AMC232_PID 0xFF00 /* Product Id */
 
+/* www.candapter.com Ewert Energy Systems CANdapter device */
+#define FTDI_CANDAPTER_PID 0x9F80 /* Product Id */
+
 /* SCS HF Radio Modems PID's (http://www.scs-ptc.com) */
 /* the VID is the standard ftdi vid (FTDI_VID) */
 #define FTDI_SCS_DEVICE_0_PID 0xD010    /* SCS PTC-IIusb */
@@ -75,6 +78,9 @@
 /* OpenDCC (www.opendcc.de) product id */
 #define FTDI_OPENDCC_PID       0xBFD8
 
+/* Sprog II (Andrew Crosland's SprogII DCC interface) */
+#define FTDI_SPROG_II          0xF0C8
+
 /* www.crystalfontz.com devices - thanx for providing free devices for evaluation ! */
 /* they use the ftdi chipset for the USB interface and the vendor id is the same */
 #define FTDI_XF_632_PID 0xFC08 /* 632: 16x2 Character Display */
index bd07eaa300b967f792ffd2923af3385b8784cf3b..809697b3c7fcbed04a9d3a4e2eeac5d412a92adc 100644 (file)
@@ -160,6 +160,11 @@ static int  option_send_setup(struct tty_struct *tty, struct usb_serial_port *po
 
 #define NOVATELWIRELESS_VENDOR_ID              0x1410
 
+/* YISO PRODUCTS */
+
+#define YISO_VENDOR_ID                         0x0EAB
+#define YISO_PRODUCT_U893                      0xC893
+
 /* MERLIN EVDO PRODUCTS */
 #define NOVATELWIRELESS_PRODUCT_V640           0x1100
 #define NOVATELWIRELESS_PRODUCT_V620           0x1110
@@ -219,6 +224,7 @@ static int  option_send_setup(struct tty_struct *tty, struct usb_serial_port *po
 #define ONDA_VENDOR_ID                         0x19d2
 #define ONDA_PRODUCT_MSA501HS                  0x0001
 #define ONDA_PRODUCT_ET502HS                   0x0002
+#define ONDA_PRODUCT_MT503HS                   0x0200
 
 #define BANDRICH_VENDOR_ID                     0x1A8D
 #define BANDRICH_PRODUCT_C100_1                        0x1002
@@ -408,6 +414,41 @@ static struct usb_device_id option_ids[] = {
        { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) },
        { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MSA501HS) },
        { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0003) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0004) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0005) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0006) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0007) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0008) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0009) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x000a) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x000b) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x000c) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x000d) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x000e) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x000f) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0010) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0011) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0012) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0013) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0014) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0015) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0016) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0017) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0018) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0019) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0020) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0021) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0022) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0023) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0024) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0025) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0026) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0027) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0028) },
+       { USB_DEVICE(ONDA_VENDOR_ID, 0x0029) },
+       { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MT503HS) },
+       { USB_DEVICE(YISO_VENDOR_ID, YISO_PRODUCT_U893) },
        { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) },
        { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) },
        { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1004) },
index 491c8857b6448277a5cd49c51e88f6ac496233ad..1aed584be5eb9a528d904b3b3209afef29f40383 100644 (file)
@@ -91,6 +91,8 @@ static struct usb_device_id id_table [] = {
        { USB_DEVICE(WS002IN_VENDOR_ID, WS002IN_PRODUCT_ID) },
        { USB_DEVICE(COREGA_VENDOR_ID, COREGA_PRODUCT_ID) },
        { USB_DEVICE(YCCABLE_VENDOR_ID, YCCABLE_PRODUCT_ID) },
+       { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) },
+       { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) },
        { }                                     /* Terminating entry */
 };
 
index a3bd039c78e96769beeff504e4da6c32f63daa14..54974f446a8c2f51f213d293d3a2f53bcaf6479d 100644 (file)
 /* Y.C. Cable U.S.A., Inc - USB to RS-232 */
 #define YCCABLE_VENDOR_ID      0x05ad
 #define YCCABLE_PRODUCT_ID     0x0fba
+
+/* "Superial" USB - Serial */
+#define SUPERIAL_VENDOR_ID     0x5372
+#define SUPERIAL_PRODUCT_ID    0x2303
+
+/* Hewlett-Packard LD220-HP POS Pole Display */
+#define HP_VENDOR_ID           0x03f0
+#define HP_LD220_PRODUCT_ID    0x3524
index 31c42d1cae13cf746e49cce12c9f588247da2c5c..01d0c70d60e9b41129b44e76893958990f780b10 100644 (file)
  * For questions or problems with this driver, contact Texas Instruments
  * technical support, or Al Borchers <alborchers@steinerpoint.com>, or
  * Peter Berger <pberger@brimson.com>.
- *
- * This driver needs this hotplug script in /etc/hotplug/usb/ti_usb_3410_5052
- * or in /etc/hotplug.d/usb/ti_usb_3410_5052.hotplug to set the device
- * configuration.
- *
- * #!/bin/bash
- *
- * BOOT_CONFIG=1
- * ACTIVE_CONFIG=2
- *
- * if [[ "$ACTION" != "add" ]]
- * then
- *     exit
- * fi
- *
- * CONFIG_PATH=/sys${DEVPATH%/?*}/bConfigurationValue
- *
- * if [[ 0`cat $CONFIG_PATH` -ne $BOOT_CONFIG ]]
- * then
- *     exit
- * fi
- *
- * PRODUCT=${PRODUCT%/?*}              # delete version
- * VENDOR_ID=`printf "%d" 0x${PRODUCT%/?*}`
- * PRODUCT_ID=`printf "%d" 0x${PRODUCT#*?/}`
- *
- * PARAM_PATH=/sys/module/ti_usb_3410_5052/parameters
- *
- * function scan() {
- *     s=$1
- *     shift
- *     for i
- *     do
- *             if [[ $s -eq $i ]]
- *             then
- *                     return 0
- *             fi
- *     done
- *     return 1
- * }
- *
- * IFS=$IFS,
- *
- * if (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_3410` &&
- * scan $PRODUCT_ID 13328 `cat $PARAM_PATH/product_3410`) ||
- * (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_5052` &&
- * scan $PRODUCT_ID 20562 20818 20570 20575 `cat $PARAM_PATH/product_5052`)
- * then
- *     echo $ACTIVE_CONFIG > $CONFIG_PATH
- * fi
  */
 
 #include <linux/kernel.h>
@@ -457,9 +407,10 @@ static int ti_startup(struct usb_serial *serial)
                goto free_tdev;
        }
 
-       /* the second configuration must be set (in sysfs by hotplug script) */
+       /* the second configuration must be set */
        if (dev->actconfig->desc.bConfigurationValue == TI_BOOT_CONFIG) {
-               status = -ENODEV;
+               status = usb_driver_set_configuration(dev, TI_ACTIVE_CONFIG);
+               status = status ? status : -ENODEV;
                goto free_tdev;
        }
 
index 3d9249632ae12e7051174817241ef37ea6f2cd4c..c68b738900bdbb9b6c8f6c95d536a69d7cada937 100644 (file)
@@ -2,8 +2,8 @@
 # USB Storage driver configuration
 #
 
-comment "NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'"
-comment "may also be needed; see USB_STORAGE Help for more information"
+comment "NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;"
+comment "see USB_STORAGE Help for more information"
        depends on USB
 
 config USB_STORAGE
index fb9e20e624c1477f909c6ec4825dc7e6d22ebe50..bfcc1fe82518d0e5739b1e936cf43d1b1430390c 100644 (file)
@@ -167,6 +167,27 @@ UNUSUAL_DEV(  0x0421, 0x005d, 0x0001, 0x0600,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY ),
 
+/* Reported by Ozan Sener <themgzzy@gmail.com> */
+UNUSUAL_DEV(  0x0421, 0x0060, 0x0551, 0x0551,
+               "Nokia",
+               "3500c",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_FIX_CAPACITY ),
+
+/* Reported by CSECSY Laszlo <boobaa@frugalware.org> */
+UNUSUAL_DEV(  0x0421, 0x0063, 0x0001, 0x0601,
+               "Nokia",
+               "Nokia 3109c",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_FIX_CAPACITY ),
+
+/* Patch for Nokia 5310 capacity */
+UNUSUAL_DEV(  0x0421, 0x006a, 0x0000, 0x0701,
+               "Nokia",
+               "5310",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_FIX_CAPACITY ),
+
 /* Reported by Mario Rettig <mariorettig@web.de> */
 UNUSUAL_DEV(  0x0421, 0x042e, 0x0100, 0x0100,
                "Nokia",
@@ -233,14 +254,14 @@ UNUSUAL_DEV(  0x0421, 0x0495, 0x0370, 0x0370,
                US_FL_MAX_SECTORS_64 ),
 
 /* Reported by Cedric Godin <cedric@belbone.be> */
-UNUSUAL_DEV(  0x0421, 0x04b9, 0x0551, 0x0551,
+UNUSUAL_DEV(  0x0421, 0x04b9, 0x0500, 0x0551,
                "Nokia",
                "5300",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY ),
 
 /* Reported by Richard Nauber <RichardNauber@web.de> */
-UNUSUAL_DEV(  0x0421, 0x04fa, 0x0601, 0x0601,
+UNUSUAL_DEV(  0x0421, 0x04fa, 0x0550, 0x0660,
                "Nokia",
                "6300",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
@@ -253,6 +274,14 @@ UNUSUAL_DEV(  0x0421, 0x006a, 0x0000, 0x0591,
        US_SC_DEVICE, US_PR_DEVICE, NULL,
        US_FL_FIX_CAPACITY ),
 
+/* Submitted by Ricky Wong Yung Fei <evilbladewarrior@gmail.com> */
+/* Nokia 7610 Supernova - Too many sectors reported in usb storage mode */
+UNUSUAL_DEV(  0x0421, 0x00f5, 0x0000, 0x0470,
+       "Nokia",
+       "7610 Supernova",
+       US_SC_DEVICE, US_PR_DEVICE, NULL,
+       US_FL_FIX_CAPACITY ),
+
 /* Reported by Olaf Hering <olh@suse.de> from novell bug #105878 */
 UNUSUAL_DEV(  0x0424, 0x0fdc, 0x0210, 0x0210,
                "SMSC",
@@ -303,6 +332,18 @@ UNUSUAL_DEV(  0x045a, 0x5210, 0x0101, 0x0101,
                US_SC_SCSI, US_PR_KARMA, rio_karma_init, 0),
 #endif
 
+/* Reported by Tamas Kerecsen <kerecsen@bigfoot.com>
+ * Obviously the PROM has not been customized by the VAR;
+ * the Vendor and Product string descriptors are:
+ *     Generic Mass Storage (PROTOTYPE--Remember to change idVendor)
+ *     Generic Manufacturer (PROTOTYPE--Remember to change idVendor)
+ */
+UNUSUAL_DEV(  0x045e, 0xffff, 0x0000, 0x0000,
+               "Mitac",
+               "GPS",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_MAX_SECTORS_64 ),
+
 /*
  * This virtual floppy is found in Sun equipment (x4600, x4200m2, etc.)
  * Reported by Pete Zaitcev <zaitcev@redhat.com>
@@ -362,6 +403,13 @@ UNUSUAL_DEV(  0x04b0, 0x0401, 0x0200, 0x0200,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY),
 
+/* Reported by Tobias Kunze Briseno <t-linux@fictive.com> */
+UNUSUAL_DEV(  0x04b0, 0x0403, 0x0200, 0x0200,
+               "NIKON",
+               "NIKON DSC D2H",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_FIX_CAPACITY),
+
 /* Reported by Milinevsky Dmitry <niam.niam@gmail.com> */
 UNUSUAL_DEV(  0x04b0, 0x0409, 0x0100, 0x0100,
                "NIKON",
@@ -418,6 +466,13 @@ UNUSUAL_DEV(  0x04b0, 0x0417, 0x0100, 0x0100,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY),
 
+/* Reported by paul ready <lxtwin@homecall.co.uk> */
+UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
+               "NIKON",
+               "NIKON DSC D300",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_FIX_CAPACITY),
+
 /* Reported by Doug Maxey (dwm@austin.ibm.com) */
 UNUSUAL_DEV(  0x04b3, 0x4001, 0x0110, 0x0110,
                "IBM",
@@ -1258,6 +1313,13 @@ UNUSUAL_DEV( 0x0839, 0x000a, 0x0001, 0x0001,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_INQUIRY),
 
+/* Reported by Luciano Rocha <luciano@eurotux.com> */
+UNUSUAL_DEV( 0x0840, 0x0082, 0x0001, 0x0001,
+               "Argosy",
+               "Storage",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_FIX_CAPACITY),
+
 /* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>.
  * Flag will support Bulk devices which use a standards-violating 32-byte
  * Command Block Wrapper. Here, the "DC2MEGA" cameras (several brands) with
index f8d0a57a07cbe3852d4128b0b6d46c8eddefebd5..9a577a800db5a05b0d0fc87ef5d775c26e55fcb2 100644 (file)
@@ -132,7 +132,7 @@ static void init_backlight(struct atmel_lcdfb_info *sinfo)
 
        bl = backlight_device_register("backlight", &sinfo->pdev->dev,
                        sinfo, &atmel_lcdc_bl_ops);
-       if (IS_ERR(sinfo->backlight)) {
+       if (IS_ERR(bl)) {
                dev_err(&sinfo->pdev->dev, "error %ld on backlight register\n",
                                PTR_ERR(bl));
                return;
index 8718f7349d6b8961eb1ed90d3ce8ea13b75a5853..a469a3d6edcbd49abb9897b524f6c25f25b46931 100644 (file)
@@ -5,61 +5,61 @@
  * --dte
  */
 
-#define FLUSH_CACHE_WORKAROUND 1
-
-void radeon_fifo_update_and_wait(struct radeonfb_info *rinfo, int entries)
+static void radeon_fixup_offset(struct radeonfb_info *rinfo)
 {
-       int i;
+       u32 local_base;
+
+       /* *** Ugly workaround *** */
+       /*
+        * On some platforms, the video memory is mapped at 0 in radeon chip space
+        * (like PPCs) by the firmware. X will always move it up so that it's seen
+        * by the chip to be at the same address as the PCI BAR.
+        * That means that when switching back from X, there is a mismatch between
+        * the offsets programmed into the engine. This means that potentially,
+        * accel operations done before radeonfb has a chance to re-init the engine
+        * will have incorrect offsets, and potentially trash system memory !
+        *
+        * The correct fix is for fbcon to never call any accel op before the engine
+        * has properly been re-initialized (by a call to set_var), but this is a
+        * complex fix. This workaround in the meantime, called before every accel
+        * operation, makes sure the offsets are in sync.
+        */
 
-       for (i=0; i<2000000; i++) {
-               rinfo->fifo_free = INREG(RBBM_STATUS) & 0x7f;
-               if (rinfo->fifo_free >= entries)
-                       return;
-               udelay(10);
-       }
-       printk(KERN_ERR "radeonfb: FIFO Timeout !\n");
-       /* XXX Todo: attempt to reset the engine */
-}
+       radeon_fifo_wait (1);
+       local_base = INREG(MC_FB_LOCATION) << 16;
+       if (local_base == rinfo->fb_local_base)
+               return;
 
-static inline void radeon_fifo_wait(struct radeonfb_info *rinfo, int entries)
-{
-       if (entries <= rinfo->fifo_free)
-               rinfo->fifo_free -= entries;
-       else
-               radeon_fifo_update_and_wait(rinfo, entries);
-}
+       rinfo->fb_local_base = local_base;
 
-static inline void radeonfb_set_creg(struct radeonfb_info *rinfo, u32 reg,
-                                    u32 *cache, u32 new_val)
-{
-       if (new_val == *cache)
-               return;
-       *cache = new_val;
-       radeon_fifo_wait(rinfo, 1);
-       OUTREG(reg, new_val);
+       radeon_fifo_wait (3);
+       OUTREG(DEFAULT_PITCH_OFFSET, (rinfo->pitch << 0x16) |
+                                    (rinfo->fb_local_base >> 10));
+       OUTREG(DST_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10));
+       OUTREG(SRC_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10));
 }
 
 static void radeonfb_prim_fillrect(struct radeonfb_info *rinfo, 
                                   const struct fb_fillrect *region)
 {
-       radeonfb_set_creg(rinfo, DP_GUI_MASTER_CNTL, &rinfo->dp_gui_mc_cache,
-                         rinfo->dp_gui_mc_base | GMC_BRUSH_SOLID_COLOR | ROP3_P);
-       radeonfb_set_creg(rinfo, DP_CNTL, &rinfo->dp_cntl_cache,
-                         DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM);
-       radeonfb_set_creg(rinfo, DP_BRUSH_FRGD_CLR, &rinfo->dp_brush_fg_cache,
-                         region->color);
-
-       /* Ensure the dst cache is flushed and the engine idle before
-        * issuing the operation.
-        *
-        * This works around engine lockups on some cards
-        */
-#if FLUSH_CACHE_WORKAROUND
-       radeon_fifo_wait(rinfo, 2);
+       radeon_fifo_wait(4);  
+  
+       OUTREG(DP_GUI_MASTER_CNTL,  
+               rinfo->dp_gui_master_cntl  /* contains, like GMC_DST_32BPP */
+                | GMC_BRUSH_SOLID_COLOR
+                | ROP3_P);
+       if (radeon_get_dstbpp(rinfo->depth) != DST_8BPP)
+               OUTREG(DP_BRUSH_FRGD_CLR, rinfo->pseudo_palette[region->color]);
+       else
+               OUTREG(DP_BRUSH_FRGD_CLR, region->color);
+       OUTREG(DP_WRITE_MSK, 0xffffffff);
+       OUTREG(DP_CNTL, (DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM));
+
+       radeon_fifo_wait(2);
        OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL);
        OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE));
-#endif
-       radeon_fifo_wait(rinfo, 2);
+
+       radeon_fifo_wait(2);  
        OUTREG(DST_Y_X, (region->dy << 16) | region->dx);
        OUTREG(DST_WIDTH_HEIGHT, (region->width << 16) | region->height);
 }
@@ -70,14 +70,15 @@ void radeonfb_fillrect(struct fb_info *info, const struct fb_fillrect *region)
        struct fb_fillrect modded;
        int vxres, vyres;
   
-       WARN_ON(rinfo->gfx_mode);
-       if (info->state != FBINFO_STATE_RUNNING || rinfo->gfx_mode)
+       if (info->state != FBINFO_STATE_RUNNING)
                return;
        if (info->flags & FBINFO_HWACCEL_DISABLED) {
                cfb_fillrect(info, region);
                return;
        }
 
+       radeon_fixup_offset(rinfo);
+
        vxres = info->var.xres_virtual;
        vyres = info->var.yres_virtual;
 
@@ -90,10 +91,6 @@ void radeonfb_fillrect(struct fb_info *info, const struct fb_fillrect *region)
        if(modded.dx + modded.width  > vxres) modded.width  = vxres - modded.dx;
        if(modded.dy + modded.height > vyres) modded.height = vyres - modded.dy;
 
-       if (info->fix.visual == FB_VISUAL_TRUECOLOR ||
-           info->fix.visual == FB_VISUAL_DIRECTCOLOR )
-               modded.color = ((u32 *) (info->pseudo_palette))[region->color];
-
        radeonfb_prim_fillrect(rinfo, &modded);
 }
 
@@ -112,22 +109,22 @@ static void radeonfb_prim_copyarea(struct radeonfb_info *rinfo,
        if ( xdir < 0 ) { sx += w-1; dx += w-1; }
        if ( ydir < 0 ) { sy += h-1; dy += h-1; }
 
-       radeonfb_set_creg(rinfo, DP_GUI_MASTER_CNTL, &rinfo->dp_gui_mc_cache,
-                         rinfo->dp_gui_mc_base |
-                         GMC_BRUSH_NONE |
-                         GMC_SRC_DATATYPE_COLOR |
-                         ROP3_S |
-                         DP_SRC_SOURCE_MEMORY);
-       radeonfb_set_creg(rinfo, DP_CNTL, &rinfo->dp_cntl_cache,
-                         (xdir>=0 ? DST_X_LEFT_TO_RIGHT : 0) |
-                         (ydir>=0 ? DST_Y_TOP_TO_BOTTOM : 0));
-
-#if FLUSH_CACHE_WORKAROUND
-       radeon_fifo_wait(rinfo, 2);
+       radeon_fifo_wait(3);
+       OUTREG(DP_GUI_MASTER_CNTL,
+               rinfo->dp_gui_master_cntl /* i.e. GMC_DST_32BPP */
+               | GMC_BRUSH_NONE
+               | GMC_SRC_DSTCOLOR
+               | ROP3_S 
+               | DP_SRC_SOURCE_MEMORY );
+       OUTREG(DP_WRITE_MSK, 0xffffffff);
+       OUTREG(DP_CNTL, (xdir>=0 ? DST_X_LEFT_TO_RIGHT : 0)
+                       | (ydir>=0 ? DST_Y_TOP_TO_BOTTOM : 0));
+
+       radeon_fifo_wait(2);
        OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL);
        OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE));
-#endif
-       radeon_fifo_wait(rinfo, 3);
+
+       radeon_fifo_wait(3);
        OUTREG(SRC_Y_X, (sy << 16) | sx);
        OUTREG(DST_Y_X, (dy << 16) | dx);
        OUTREG(DST_HEIGHT_WIDTH, (h << 16) | w);
@@ -146,14 +143,15 @@ void radeonfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
        modded.width  = area->width;
        modded.height = area->height;
   
-       WARN_ON(rinfo->gfx_mode);
-       if (info->state != FBINFO_STATE_RUNNING || rinfo->gfx_mode)
+       if (info->state != FBINFO_STATE_RUNNING)
                return;
        if (info->flags & FBINFO_HWACCEL_DISABLED) {
                cfb_copyarea(info, area);
                return;
        }
 
+       radeon_fixup_offset(rinfo);
+
        vxres = info->var.xres_virtual;
        vyres = info->var.yres_virtual;
 
@@ -170,112 +168,13 @@ void radeonfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
        radeonfb_prim_copyarea(rinfo, &modded);
 }
 
-static void radeonfb_prim_imageblit(struct radeonfb_info *rinfo,
-                                   const struct fb_image *image,
-                                   u32 fg, u32 bg)
-{
-       unsigned int src_bytes, dwords;
-       u32 *bits;
-
-       radeonfb_set_creg(rinfo, DP_GUI_MASTER_CNTL, &rinfo->dp_gui_mc_cache,
-                         rinfo->dp_gui_mc_base |
-                         GMC_BRUSH_NONE |
-                         GMC_SRC_DATATYPE_MONO_FG_BG |
-                         ROP3_S |
-                         GMC_BYTE_ORDER_MSB_TO_LSB |
-                         DP_SRC_SOURCE_HOST_DATA);
-       radeonfb_set_creg(rinfo, DP_CNTL, &rinfo->dp_cntl_cache,
-                         DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM);
-       radeonfb_set_creg(rinfo, DP_SRC_FRGD_CLR, &rinfo->dp_src_fg_cache, fg);
-       radeonfb_set_creg(rinfo, DP_SRC_BKGD_CLR, &rinfo->dp_src_bg_cache, bg);
-
-       radeon_fifo_wait(rinfo, 1);
-       OUTREG(DST_Y_X, (image->dy << 16) | image->dx);
-
-       /* Ensure the dst cache is flushed and the engine idle before
-        * issuing the operation.
-        *
-        * This works around engine lockups on some cards
-        */
-#if FLUSH_CACHE_WORKAROUND
-       radeon_fifo_wait(rinfo, 2);
-       OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL);
-       OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE));
-#endif
-
-       /* X here pads width to a multiple of 32 and uses the clipper to
-        * adjust the result. Is that really necessary ? Things seem to
-        * work ok for me without that and the doco doesn't seem to imply
-        * there is such a restriction.
-        */
-       OUTREG(DST_WIDTH_HEIGHT, (image->width << 16) | image->height);
-
-       src_bytes = (((image->width * image->depth) + 7) / 8) * image->height;
-       dwords = (src_bytes + 3) / 4;
-       bits = (u32*)(image->data);
-
-       while(dwords >= 8) {
-               radeon_fifo_wait(rinfo, 8);
-#if BITS_PER_LONG == 64
-               __raw_writeq(*((u64 *)(bits)), rinfo->mmio_base + HOST_DATA0);
-               __raw_writeq(*((u64 *)(bits+2)), rinfo->mmio_base + HOST_DATA2);
-               __raw_writeq(*((u64 *)(bits+4)), rinfo->mmio_base + HOST_DATA4);
-               __raw_writeq(*((u64 *)(bits+6)), rinfo->mmio_base + HOST_DATA6);
-               bits += 8;
-#else
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA0);
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA1);
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA2);
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA3);
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA4);
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA5);
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA6);
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA7);
-#endif
-               dwords -= 8;
-       }
-       while(dwords--) {
-               radeon_fifo_wait(rinfo, 1);
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA0);
-       }
-}
-
 void radeonfb_imageblit(struct fb_info *info, const struct fb_image *image)
 {
        struct radeonfb_info *rinfo = info->par;
-       u32 fg, bg;
-
-       WARN_ON(rinfo->gfx_mode);
-       if (info->state != FBINFO_STATE_RUNNING || rinfo->gfx_mode)
-               return;
 
-       if (!image->width || !image->height)
+       if (info->state != FBINFO_STATE_RUNNING)
                return;
-
-       /* We only do 1 bpp color expansion for now */
-       if (info->flags & FBINFO_HWACCEL_DISABLED || image->depth != 1)
-               goto fallback;
-
-       /* Fallback if running out of the screen. We may do clipping
-        * in the future */
-       if ((image->dx + image->width) > info->var.xres_virtual ||
-           (image->dy + image->height) > info->var.yres_virtual)
-               goto fallback;
-
-       if (info->fix.visual == FB_VISUAL_TRUECOLOR ||
-           info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
-               fg = ((u32*)(info->pseudo_palette))[image->fg_color];
-               bg = ((u32*)(info->pseudo_palette))[image->bg_color];
-       } else {
-               fg = image->fg_color;
-               bg = image->bg_color;
-       }
-
-       radeonfb_prim_imageblit(rinfo, image, fg, bg);
-       return;
-
- fallback:
-       radeon_engine_idle(rinfo);
+       radeon_engine_idle();
 
        cfb_imageblit(info, image);
 }
@@ -286,8 +185,7 @@ int radeonfb_sync(struct fb_info *info)
 
        if (info->state != FBINFO_STATE_RUNNING)
                return 0;
-
-       radeon_engine_idle(rinfo);
+       radeon_engine_idle();
 
        return 0;
 }
@@ -363,10 +261,9 @@ void radeonfb_engine_init (struct radeonfb_info *rinfo)
        /* disable 3D engine */
        OUTREG(RB3D_CNTL, 0);
 
-       rinfo->fifo_free = 0;
        radeonfb_engine_reset(rinfo);
 
-       radeon_fifo_wait(rinfo, 1);
+       radeon_fifo_wait (1);
        if (IS_R300_VARIANT(rinfo)) {
                OUTREG(RB2D_DSTCACHE_MODE, INREG(RB2D_DSTCACHE_MODE) |
                       RB2D_DC_AUTOFLUSH_ENABLE |
@@ -380,7 +277,7 @@ void radeonfb_engine_init (struct radeonfb_info *rinfo)
                OUTREG(RB2D_DSTCACHE_MODE, 0);
        }
 
-       radeon_fifo_wait(rinfo, 3);
+       radeon_fifo_wait (3);
        /* We re-read MC_FB_LOCATION from card as it can have been
         * modified by XFree drivers (ouch !)
         */
@@ -391,57 +288,41 @@ void radeonfb_engine_init (struct radeonfb_info *rinfo)
        OUTREG(DST_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10));
        OUTREG(SRC_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10));
 
-       radeon_fifo_wait(rinfo, 1);
-#ifdef __BIG_ENDIAN
+       radeon_fifo_wait (1);
+#if defined(__BIG_ENDIAN)
        OUTREGP(DP_DATATYPE, HOST_BIG_ENDIAN_EN, ~HOST_BIG_ENDIAN_EN);
 #else
        OUTREGP(DP_DATATYPE, 0, ~HOST_BIG_ENDIAN_EN);
 #endif
-       radeon_fifo_wait(rinfo, 2);
+       radeon_fifo_wait (2);
        OUTREG(DEFAULT_SC_TOP_LEFT, 0);
        OUTREG(DEFAULT_SC_BOTTOM_RIGHT, (DEFAULT_SC_RIGHT_MAX |
                                         DEFAULT_SC_BOTTOM_MAX));
 
-       /* set default DP_GUI_MASTER_CNTL */
        temp = radeon_get_dstbpp(rinfo->depth);
-       rinfo->dp_gui_mc_base = ((temp << 8) | GMC_CLR_CMP_CNTL_DIS);
+       rinfo->dp_gui_master_cntl = ((temp << 8) | GMC_CLR_CMP_CNTL_DIS);
 
-       rinfo->dp_gui_mc_cache = rinfo->dp_gui_mc_base |
-               GMC_BRUSH_SOLID_COLOR |
-               GMC_SRC_DATATYPE_COLOR;
-       radeon_fifo_wait(rinfo, 1);
-       OUTREG(DP_GUI_MASTER_CNTL, rinfo->dp_gui_mc_cache);
+       radeon_fifo_wait (1);
+       OUTREG(DP_GUI_MASTER_CNTL, (rinfo->dp_gui_master_cntl |
+                                   GMC_BRUSH_SOLID_COLOR |
+                                   GMC_SRC_DATATYPE_COLOR));
 
+       radeon_fifo_wait (7);
 
        /* clear line drawing regs */
-       radeon_fifo_wait(rinfo, 2);
        OUTREG(DST_LINE_START, 0);
        OUTREG(DST_LINE_END, 0);
 
-       /* set brush and source color regs */
-       rinfo->dp_brush_fg_cache = 0xffffffff;
-       rinfo->dp_brush_bg_cache = 0x00000000;
-       rinfo->dp_src_fg_cache = 0xffffffff;
-       rinfo->dp_src_bg_cache = 0x00000000;
-       radeon_fifo_wait(rinfo, 4);
-       OUTREG(DP_BRUSH_FRGD_CLR, rinfo->dp_brush_fg_cache);
-       OUTREG(DP_BRUSH_BKGD_CLR, rinfo->dp_brush_bg_cache);
-       OUTREG(DP_SRC_FRGD_CLR, rinfo->dp_src_fg_cache);
-       OUTREG(DP_SRC_BKGD_CLR, rinfo->dp_src_bg_cache);
-
-       /* Default direction */
-       rinfo->dp_cntl_cache = DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM;
-       radeon_fifo_wait(rinfo, 1);
-       OUTREG(DP_CNTL, rinfo->dp_cntl_cache);
+       /* set brush color regs */
+       OUTREG(DP_BRUSH_FRGD_CLR, 0xffffffff);
+       OUTREG(DP_BRUSH_BKGD_CLR, 0x00000000);
+
+       /* set source color regs */
+       OUTREG(DP_SRC_FRGD_CLR, 0xffffffff);
+       OUTREG(DP_SRC_BKGD_CLR, 0x00000000);
 
        /* default write mask */
-       radeon_fifo_wait(rinfo, 1);
        OUTREG(DP_WRITE_MSK, 0xffffffff);
 
-       /* Default to no swapping of host data */
-       radeon_fifo_wait(rinfo, 1);
-       OUTREG(RBBM_GUICNTL, RBBM_GUICNTL_HOST_DATA_SWAP_NONE);
-
-       /* Make sure it's settled */
-       radeon_engine_idle(rinfo);
+       radeon_engine_idle ();
 }
index f343ba83f0ae0dbb6e50d25aa8ea95239598b1fd..1a056adb61c836784fce99d1c0314e710f4948e8 100644 (file)
@@ -66,7 +66,7 @@ static int radeon_bl_update_status(struct backlight_device *bd)
                level = bd->props.brightness;
 
        del_timer_sync(&rinfo->lvds_timer);
-       radeon_engine_idle(rinfo);
+       radeon_engine_idle();
 
        lvds_gen_cntl = INREG(LVDS_GEN_CNTL);
        if (level > 0) {
index 9a5821c65ebf22fd2d492ee3972002bb2f5cc651..d0f1a7fc2c9df7da492102db83247624c94dac9f 100644 (file)
@@ -852,6 +852,7 @@ static int radeonfb_pan_display (struct fb_var_screeninfo *var,
         if (rinfo->asleep)
                return 0;
 
+       radeon_fifo_wait(2);
         OUTREG(CRTC_OFFSET, ((var->yoffset * var->xres_virtual + var->xoffset)
                             * var->bits_per_pixel / 8) & ~7);
         return 0;
@@ -881,6 +882,7 @@ static int radeonfb_ioctl (struct fb_info *info, unsigned int cmd,
                        if (rc)
                                return rc;
 
+                       radeon_fifo_wait(2);
                        if (value & 0x01) {
                                tmp = INREG(LVDS_GEN_CNTL);
 
@@ -938,7 +940,7 @@ int radeon_screen_blank(struct radeonfb_info *rinfo, int blank, int mode_switch)
        if (rinfo->lock_blank)
                return 0;
 
-       radeon_engine_idle(rinfo);
+       radeon_engine_idle();
 
        val = INREG(CRTC_EXT_CNTL);
         val &= ~(CRTC_DISPLAY_DIS | CRTC_HSYNC_DIS |
@@ -1046,7 +1048,7 @@ static int radeonfb_blank (int blank, struct fb_info *info)
 
        if (rinfo->asleep)
                return 0;
-
+               
        return radeon_screen_blank(rinfo, blank, 0);
 }
 
@@ -1072,6 +1074,8 @@ static int radeon_setcolreg (unsigned regno, unsigned red, unsigned green,
         pindex = regno;
 
         if (!rinfo->asleep) {
+               radeon_fifo_wait(9);
+
                if (rinfo->bpp == 16) {
                        pindex = regno * 8;
 
@@ -1240,6 +1244,8 @@ static void radeon_write_pll_regs(struct radeonfb_info *rinfo, struct radeon_reg
 {
        int i;
 
+       radeon_fifo_wait(20);
+
        /* Workaround from XFree */
        if (rinfo->is_mobility) {
                /* A temporal workaround for the occational blanking on certain laptop
@@ -1335,7 +1341,7 @@ static void radeon_lvds_timer_func(unsigned long data)
 {
        struct radeonfb_info *rinfo = (struct radeonfb_info *)data;
 
-       radeon_engine_idle(rinfo);
+       radeon_engine_idle();
 
        OUTREG(LVDS_GEN_CNTL, rinfo->pending_lvds_gen_cntl);
 }
@@ -1353,11 +1359,10 @@ void radeon_write_mode (struct radeonfb_info *rinfo, struct radeon_regs *mode,
        if (nomodeset)
                return;
 
-       radeon_engine_idle(rinfo);
-
        if (!regs_only)
                radeon_screen_blank(rinfo, FB_BLANK_NORMAL, 0);
 
+       radeon_fifo_wait(31);
        for (i=0; i<10; i++)
                OUTREG(common_regs[i].reg, common_regs[i].val);
 
@@ -1385,6 +1390,7 @@ void radeon_write_mode (struct radeonfb_info *rinfo, struct radeon_regs *mode,
        radeon_write_pll_regs(rinfo, mode);
 
        if ((primary_mon == MT_DFP) || (primary_mon == MT_LCD)) {
+               radeon_fifo_wait(10);
                OUTREG(FP_CRTC_H_TOTAL_DISP, mode->fp_crtc_h_total_disp);
                OUTREG(FP_CRTC_V_TOTAL_DISP, mode->fp_crtc_v_total_disp);
                OUTREG(FP_H_SYNC_STRT_WID, mode->fp_h_sync_strt_wid);
@@ -1399,6 +1405,7 @@ void radeon_write_mode (struct radeonfb_info *rinfo, struct radeon_regs *mode,
        if (!regs_only)
                radeon_screen_blank(rinfo, FB_BLANK_UNBLANK, 0);
 
+       radeon_fifo_wait(2);
        OUTPLL(VCLK_ECP_CNTL, mode->vclk_ecp_cntl);
        
        return;
@@ -1549,7 +1556,7 @@ static int radeonfb_set_par(struct fb_info *info)
        /* We always want engine to be idle on a mode switch, even
         * if we won't actually change the mode
         */
-       radeon_engine_idle(rinfo);
+       radeon_engine_idle();
 
        hSyncStart = mode->xres + mode->right_margin;
        hSyncEnd = hSyncStart + mode->hsync_len;
@@ -1844,6 +1851,7 @@ static int radeonfb_set_par(struct fb_info *info)
        return 0;
 }
 
+
 static struct fb_ops radeonfb_ops = {
        .owner                  = THIS_MODULE,
        .fb_check_var           = radeonfb_check_var,
@@ -1867,7 +1875,6 @@ static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo)
        info->par = rinfo;
        info->pseudo_palette = rinfo->pseudo_palette;
        info->flags = FBINFO_DEFAULT
-                   | FBINFO_HWACCEL_IMAGEBLIT
                    | FBINFO_HWACCEL_COPYAREA
                    | FBINFO_HWACCEL_FILLRECT
                    | FBINFO_HWACCEL_XPAN
@@ -1999,6 +2006,7 @@ static void radeon_identify_vram(struct radeonfb_info *rinfo)
           u32 tom = INREG(NB_TOM);
           tmp = ((((tom >> 16) - (tom & 0xffff) + 1) << 6) * 1024);
 
+               radeon_fifo_wait(6);
           OUTREG(MC_FB_LOCATION, tom);
           OUTREG(DISPLAY_BASE_ADDR, (tom & 0xffff) << 16);
           OUTREG(CRTC2_DISPLAY_BASE_ADDR, (tom & 0xffff) << 16);
index 3df5015f1d13f540a6bc9b5cbfdd663663604eac..675abdafc2d8d047741ed3b8fdf2c0291343440c 100644 (file)
@@ -2653,9 +2653,9 @@ int radeonfb_pci_suspend(struct pci_dev *pdev, pm_message_t mesg)
 
        if (!(info->flags & FBINFO_HWACCEL_DISABLED)) {
                /* Make sure engine is reset */
-               radeon_engine_idle(rinfo);
+               radeon_engine_idle();
                radeonfb_engine_reset(rinfo);
-               radeon_engine_idle(rinfo);
+               radeon_engine_idle();
        }
 
        /* Blank display and LCD */
@@ -2767,7 +2767,7 @@ int radeonfb_pci_resume(struct pci_dev *pdev)
 
                rinfo->asleep = 0;
        } else
-               radeon_engine_idle(rinfo);
+               radeon_engine_idle();
 
        /* Restore display & engine */
        radeon_write_mode (rinfo, &rinfo->state, 1);
index ea0b5b47acaf437027b0a5b153dd6cc4c5d5e1b3..3ea1b00fdd22ae66e882fc764359920ab8a609c5 100644 (file)
@@ -336,15 +336,7 @@ struct radeonfb_info {
        int                     mon2_type;
        u8                      *mon2_EDID;
 
-       /* accel bits */
-       u32                     dp_gui_mc_base;
-       u32                     dp_gui_mc_cache;
-       u32                     dp_cntl_cache;
-       u32                     dp_brush_fg_cache;
-       u32                     dp_brush_bg_cache;
-       u32                     dp_src_fg_cache;
-       u32                     dp_src_bg_cache;
-       u32                     fifo_free;
+       u32                     dp_gui_master_cntl;
 
        struct pll_info         pll;
 
@@ -356,7 +348,6 @@ struct radeonfb_info {
        int                     lock_blank;
        int                     dynclk;
        int                     no_schedule;
-       int                     gfx_mode;
        enum radeon_pm_mode     pm_mode;
        reinit_function_ptr     reinit_func;
 
@@ -401,14 +392,8 @@ static inline void _radeon_msleep(struct radeonfb_info *rinfo, unsigned long ms)
 #define OUTREG8(addr,val)      writeb(val, (rinfo->mmio_base)+addr)
 #define INREG16(addr)          readw((rinfo->mmio_base)+addr)
 #define OUTREG16(addr,val)     writew(val, (rinfo->mmio_base)+addr)
-
-#ifdef CONFIG_PPC
-#define INREG(addr)            ({ eieio(); ld_le32(rinfo->mmio_base+(addr)); })
-#define OUTREG(addr,val)       do { eieio(); st_le32(rinfo->mmio_base+(addr),(val)); } while(0)
-#else
 #define INREG(addr)            readl((rinfo->mmio_base)+addr)
 #define OUTREG(addr,val)       writel(val, (rinfo->mmio_base)+addr)
-#endif
 
 static inline void _OUTREGP(struct radeonfb_info *rinfo, u32 addr,
                       u32 val, u32 mask)
@@ -550,7 +535,17 @@ static inline u32 radeon_get_dstbpp(u16 depth)
  * 2D Engine helper routines
  */
 
-extern void radeon_fifo_update_and_wait(struct radeonfb_info *rinfo, int entries);
+static inline void _radeon_fifo_wait(struct radeonfb_info *rinfo, int entries)
+{
+       int i;
+
+       for (i=0; i<2000000; i++) {
+               if ((INREG(RBBM_STATUS) & 0x7f) >= entries)
+                       return;
+               udelay(1);
+       }
+       printk(KERN_ERR "radeonfb: FIFO Timeout !\n");
+}
 
 static inline void radeon_engine_flush (struct radeonfb_info *rinfo)
 {
@@ -563,7 +558,7 @@ static inline void radeon_engine_flush (struct radeonfb_info *rinfo)
        /* Ensure FIFO is empty, ie, make sure the flush commands
         * has reached the cache
         */
-       radeon_fifo_update_and_wait(rinfo, 64);
+       _radeon_fifo_wait (rinfo, 64);
 
        /* Wait for the flush to complete */
        for (i=0; i < 2000000; i++) {
@@ -575,12 +570,12 @@ static inline void radeon_engine_flush (struct radeonfb_info *rinfo)
 }
 
 
-static inline void radeon_engine_idle(struct radeonfb_info *rinfo)
+static inline void _radeon_engine_idle(struct radeonfb_info *rinfo)
 {
        int i;
 
        /* ensure FIFO is empty before waiting for idle */
-       radeon_fifo_update_and_wait (rinfo, 64);
+       _radeon_fifo_wait (rinfo, 64);
 
        for (i=0; i<2000000; i++) {
                if (((INREG(RBBM_STATUS) & GUI_ACTIVE)) == 0) {
@@ -593,6 +588,8 @@ static inline void radeon_engine_idle(struct radeonfb_info *rinfo)
 }
 
 
+#define radeon_engine_idle()           _radeon_engine_idle(rinfo)
+#define radeon_fifo_wait(entries)      _radeon_fifo_wait(rinfo,entries)
 #define radeon_msleep(ms)              _radeon_msleep(rinfo,ms)
 
 
@@ -622,7 +619,6 @@ extern void radeonfb_imageblit(struct fb_info *p, const struct fb_image *image);
 extern int radeonfb_sync(struct fb_info *info);
 extern void radeonfb_engine_init (struct radeonfb_info *rinfo);
 extern void radeonfb_engine_reset(struct radeonfb_info *rinfo);
-extern void radeon_fixup_mem_offset(struct radeonfb_info *rinfo);
 
 /* Other functions */
 extern int radeon_screen_blank(struct radeonfb_info *rinfo, int blank, int mode_switch);
index 242c38250166d7edac8f3a600599191d8322ae40..93bb4340cc64e66470841868c1d52535ef595d2e 100644 (file)
@@ -119,6 +119,7 @@ static int da903x_backlight_probe(struct platform_device *pdev)
        default:
                dev_err(&pdev->dev, "invalid backlight device ID(%d)\n",
                                pdev->id);
+               kfree(data);
                return -EINVAL;
        }
 
@@ -130,6 +131,7 @@ static int da903x_backlight_probe(struct platform_device *pdev)
                        data, &da903x_backlight_ops);
        if (IS_ERR(bl)) {
                dev_err(&pdev->dev, "failed to register backlight\n");
+               kfree(data);
                return PTR_ERR(bl);
        }
 
index 8e1731d3b2283e311bcad1d6f10475901467cda2..680e57b616cdeb3f0f11748aff79f9483f41c247 100644 (file)
@@ -42,10 +42,13 @@ static int fb_notifier_callback(struct notifier_block *self,
 
        mutex_lock(&ld->ops_lock);
        if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info)) {
-               if (event == FB_EVENT_BLANK)
-                       ld->ops->set_power(ld, *(int *)evdata->data);
-               else
-                       ld->ops->set_mode(ld, evdata->data);
+               if (event == FB_EVENT_BLANK) {
+                       if (ld->ops->set_power)
+                               ld->ops->set_power(ld, *(int *)evdata->data);
+               } else {
+                       if (ld->ops->set_mode)
+                               ld->ops->set_mode(ld, evdata->data);
+               }
        }
        mutex_unlock(&ld->ops_lock);
        return 0;
index 8a8760230bc78561b2f3a25c7095c9db21d68c54..a2aa6ddffbe25d6e764a0dc6bdc7dd298e9f1849 100644 (file)
@@ -2462,8 +2462,7 @@ static int __init cirrusfb_init(void)
 
 #ifndef MODULE
 static int __init cirrusfb_setup(char *options) {
-       char *this_opt, s[32];
-       int i;
+       char *this_opt;
 
        DPRINTK("ENTER\n");
 
index b92947d62ad6db01d8a2fb17787aec9ebe892d4a..0b2adefe9e3d55f3b20e3e668a8d5e7969058948 100644 (file)
@@ -2389,16 +2389,13 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch)
 
        if (!fbcon_is_inactive(vc, info)) {
                if (ops->blank_state != blank) {
-                       int ret = 1;
-
                        ops->blank_state = blank;
                        fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW);
                        ops->cursor_flash = (!blank);
 
-                       if (info->fbops->fb_blank)
-                               ret = info->fbops->fb_blank(blank, info);
-                       if (ret)
-                               fbcon_generic_blank(vc, info, blank);
+                       if (!(info->flags & FBINFO_MISC_USEREVENT))
+                               if (fb_blank(info, blank))
+                                       fbcon_generic_blank(vc, info, blank);
                }
 
                if (!blank)
@@ -3534,12 +3531,18 @@ static void fbcon_exit(void)
        softback_buf = 0UL;
 
        for (i = 0; i < FB_MAX; i++) {
+               int pending;
+
                mapped = 0;
                info = registered_fb[i];
 
                if (info == NULL)
                        continue;
 
+               pending = cancel_work_sync(&info->queue);
+               DPRINTK("fbcon: %s pending work\n", (pending ? "canceled" :
+                       "no"));
+
                for (j = first_fb_vc; j <= last_fb_vc; j++) {
                        if (con2fb_map[j] == i)
                                mapped = 1;
index 1d5ae39cb271ecb3219f9089ef9366f532f93efe..3c65b0d676174f6ee683a0516700324a0cb4cc17 100644 (file)
@@ -230,7 +230,7 @@ static void fb_set_logo_directpalette(struct fb_info *info,
        greenshift = info->var.green.offset;
        blueshift = info->var.blue.offset;
 
-       for (i = 32; i < logo->clutsize; i++)
+       for (i = 32; i < 32 + logo->clutsize; i++)
                palette[i] = i << redshift | i << greenshift | i << blueshift;
 }
 
index b790ddff76f9f5f91d70dd181f69699d0f4b613b..ee380d5f34107d0713b582b9a29cd6259a327119 100644 (file)
@@ -164,7 +164,6 @@ static struct fb_var_screeninfo macfb_defined = {
 };
 
 static struct fb_fix_screeninfo macfb_fix = {
-       .id     = "Macintosh ",
        .type   = FB_TYPE_PACKED_PIXELS,
        .accel  = FB_ACCEL_NONE,
 };
@@ -760,22 +759,22 @@ static int __init macfb_init(void)
 
                switch(ndev->dr_hw) {
                case NUBUS_DRHW_APPLE_MDC:
-                       strcat( macfb_fix.id, "Display Card" );
+                       strcpy(macfb_fix.id, "Mac Disp. Card");
                        macfb_setpalette = mdc_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
                        break;
                case NUBUS_DRHW_APPLE_TFB:
-                       strcat( macfb_fix.id, "Toby" );
+                       strcpy(macfb_fix.id, "Toby");
                        macfb_setpalette = toby_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
                        break;
                case NUBUS_DRHW_APPLE_JET:
-                       strcat( macfb_fix.id, "Jet");
+                       strcpy(macfb_fix.id, "Jet");
                        macfb_setpalette = jet_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
                        break;                  
                default:
-                       strcat( macfb_fix.id, "Generic NuBus" );
+                       strcpy(macfb_fix.id, "Generic NuBus");
                        break;
                }
        }
@@ -786,21 +785,11 @@ static int __init macfb_init(void)
        if (!video_is_nubus)
                switch( mac_bi_data.id )
                {
-                       /* These don't have onboard video.  Eventually, we may
-                          be able to write separate framebuffer drivers for
-                          them (tobyfb.c, hiresfb.c, etc, etc) */
-               case MAC_MODEL_II:
-               case MAC_MODEL_IIX:
-               case MAC_MODEL_IICX:
-               case MAC_MODEL_IIFX:
-                       strcat( macfb_fix.id, "Generic NuBus" );
-                       break;
-
                        /* Valkyrie Quadras */
                case MAC_MODEL_Q630:
                        /* I'm not sure about this one */
                case MAC_MODEL_P588:
-                       strcat( macfb_fix.id, "Valkyrie built-in" );
+                       strcpy(macfb_fix.id, "Valkyrie");
                        macfb_setpalette = valkyrie_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
                        valkyrie_cmap_regs = ioremap(DAC_BASE, 0x1000);
@@ -823,7 +812,7 @@ static int __init macfb_init(void)
                case MAC_MODEL_Q700:
                case MAC_MODEL_Q900:
                case MAC_MODEL_Q950:
-                       strcat( macfb_fix.id, "DAFB built-in" );
+                       strcpy(macfb_fix.id, "DAFB");
                        macfb_setpalette = dafb_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
                        dafb_cmap_regs = ioremap(DAFB_BASE, 0x1000);
@@ -831,7 +820,7 @@ static int __init macfb_init(void)
 
                        /* LC II uses the V8 framebuffer */
                case MAC_MODEL_LCII:
-                       strcat( macfb_fix.id, "V8 built-in" );
+                       strcpy(macfb_fix.id, "V8");
                        macfb_setpalette = v8_brazil_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
                        v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
@@ -843,7 +832,7 @@ static int __init macfb_init(void)
                case MAC_MODEL_IIVI:
                case MAC_MODEL_IIVX:
                case MAC_MODEL_P600:
-                       strcat( macfb_fix.id, "Brazil built-in" );
+                       strcpy(macfb_fix.id, "Brazil");
                        macfb_setpalette = v8_brazil_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
                        v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
@@ -860,7 +849,7 @@ static int __init macfb_init(void)
                case MAC_MODEL_P460:
                        macfb_setpalette = v8_brazil_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
-                       strcat( macfb_fix.id, "Sonora built-in" );
+                       strcpy(macfb_fix.id, "Sonora");
                        v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
                        break;
 
@@ -871,7 +860,7 @@ static int __init macfb_init(void)
                case MAC_MODEL_IISI:
                        macfb_setpalette = rbv_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
-                       strcat( macfb_fix.id, "RBV built-in" );
+                       strcpy(macfb_fix.id, "RBV");
                        rbv_cmap_regs = ioremap(DAC_BASE, 0x1000);
                        break;
 
@@ -880,7 +869,7 @@ static int __init macfb_init(void)
                case MAC_MODEL_C660:
                        macfb_setpalette = civic_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
-                       strcat( macfb_fix.id, "Civic built-in" );
+                       strcpy(macfb_fix.id, "Civic");
                        civic_cmap_regs = ioremap(CIVIC_BASE, 0x1000);
                        break;
 
@@ -901,7 +890,7 @@ static int __init macfb_init(void)
                                v8_brazil_cmap_regs =
                                        ioremap(DAC_BASE, 0x1000);
                        }
-                       strcat( macfb_fix.id, "LC built-in" );
+                       strcpy(macfb_fix.id, "LC");
                        break;
                        /* We think this may be like the LC II */
                case MAC_MODEL_CCL:
@@ -911,18 +900,18 @@ static int __init macfb_init(void)
                                v8_brazil_cmap_regs =
                                        ioremap(DAC_BASE, 0x1000);
                        }
-                       strcat( macfb_fix.id, "Color Classic built-in" );
+                       strcpy(macfb_fix.id, "Color Classic");
                        break;
 
                        /* And we *do* mean "weirdos" */
                case MAC_MODEL_TV:
-                       strcat( macfb_fix.id, "Mac TV built-in" );
+                       strcpy(macfb_fix.id, "Mac TV");
                        break;
 
                        /* These don't have colour, so no need to worry */
                case MAC_MODEL_SE30:
                case MAC_MODEL_CLII:
-                       strcat( macfb_fix.id, "Monochrome built-in" );
+                       strcpy(macfb_fix.id, "Monochrome");
                        break;
 
                        /* Powerbooks are particularly difficult.  Many of
@@ -935,7 +924,7 @@ static int __init macfb_init(void)
                case MAC_MODEL_PB140:
                case MAC_MODEL_PB145:
                case MAC_MODEL_PB170:
-                       strcat( macfb_fix.id, "DDC built-in" );
+                       strcpy(macfb_fix.id, "DDC");
                        break;
 
                        /* Internal is GSC, External (if present) is ViSC */
@@ -945,13 +934,13 @@ static int __init macfb_init(void)
                case MAC_MODEL_PB180:
                case MAC_MODEL_PB210:
                case MAC_MODEL_PB230:
-                       strcat( macfb_fix.id, "GSC built-in" );
+                       strcpy(macfb_fix.id, "GSC");
                        break;
 
                        /* Internal is TIM, External is ViSC */
                case MAC_MODEL_PB165C:
                case MAC_MODEL_PB180C:
-                       strcat( macfb_fix.id, "TIM built-in" );
+                       strcpy(macfb_fix.id, "TIM");
                        break;
 
                        /* Internal is CSC, External is Keystone+Ariel. */
@@ -963,12 +952,12 @@ static int __init macfb_init(void)
                case MAC_MODEL_PB280C:
                        macfb_setpalette = csc_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
-                       strcat( macfb_fix.id, "CSC built-in" );
+                       strcpy(macfb_fix.id, "CSC");
                        csc_cmap_regs = ioremap(CSC_BASE, 0x1000);
                        break;
                
                default:
-                       strcat( macfb_fix.id, "Unknown/Unsupported built-in" );
+                       strcpy(macfb_fix.id, "Unknown");
                        break;
                }
 
@@ -978,16 +967,23 @@ static int __init macfb_init(void)
        fb_info.pseudo_palette  = pseudo_palette;
        fb_info.flags           = FBINFO_DEFAULT;
 
-       fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0);
+       err = fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0);
+       if (err)
+               goto fail_unmap;
        
        err = register_framebuffer(&fb_info);
-       if (!err)
-               printk("fb%d: %s frame buffer device\n",
-                      fb_info.node, fb_info.fix.id);
-       else {
-               iounmap(fb_info.screen_base);
-               iounmap_macfb();
-       }
+       if (err)
+               goto fail_dealloc;
+
+       printk("fb%d: %s frame buffer device\n",
+              fb_info.node, fb_info.fix.id);
+       return 0;
+
+fail_dealloc:
+       fb_dealloc_cmap(&fb_info.cmap);
+fail_unmap:
+       iounmap(fb_info.screen_base);
+       iounmap_macfb();
        return err;
 }
 
index 38718d95fbb9ad3091ba7652e72f1377235bb19a..fb64234a3825a2a9d1ee7f24e52e7cd75b969713 100644 (file)
@@ -927,9 +927,9 @@ static int __devinit mb862xx_pci_probe(struct pci_dev *pdev,
        }
 
        dev_dbg(dev, "fb phys 0x%llx 0x%lx\n",
-               (u64)par->fb_base_phys, (ulong)par->mapped_vram);
+               (unsigned long long)par->fb_base_phys, (ulong)par->mapped_vram);
        dev_dbg(dev, "mmio phys 0x%llx 0x%lx\n",
-               (u64)par->mmio_base_phys, (ulong)par->mmio_len);
+               (unsigned long long)par->mmio_base_phys, (ulong)par->mmio_len);
 
        if (mb862xx_pci_gdc_init(par))
                goto io_unmap;
index 99da8b6d2c3650d6418f832add4d221e50ada887..ed13889c116223e16f99ec32de9c0c1762e54897 100644 (file)
@@ -23,7 +23,6 @@ objs-y$(CONFIG_MACH_OMAP_PALMZ71) += lcd_palmz71.o
 objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1610.o
 objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1510.o
 objs-y$(CONFIG_MACH_OMAP_OSK) += lcd_osk.o
-objs-y$(CONFIG_MACH_SX1) += lcd_sx1.o
 
 omapfb-objs := $(objs-yy)
 
diff --git a/drivers/video/omap/lcd_sx1.c b/drivers/video/omap/lcd_sx1.c
deleted file mode 100644 (file)
index e55de20..0000000
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- * LCD panel support for the Siemens SX1 mobile phone
- *
- * Current version : Vovan888@gmail.com, great help from FCA00000
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-
-#include <linux/module.h>
-#include <linux/platform_device.h>
-#include <linux/delay.h>
-#include <linux/io.h>
-
-#include <mach/gpio.h>
-#include <mach/omapfb.h>
-#include <mach/mcbsp.h>
-#include <mach/mux.h>
-
-/*
- * OMAP310 GPIO registers
- */
-#define GPIO_DATA_INPUT                0xfffce000
-#define GPIO_DATA_OUTPUT       0xfffce004
-#define GPIO_DIR_CONTROL       0xfffce008
-#define GPIO_INT_CONTROL       0xfffce00c
-#define GPIO_INT_MASK          0xfffce010
-#define GPIO_INT_STATUS                0xfffce014
-#define GPIO_PIN_CONTROL       0xfffce018
-
-
-#define A_LCD_SSC_RD   3
-#define A_LCD_SSC_SD   7
-#define _A_LCD_RESET   9
-#define _A_LCD_SSC_CS  12
-#define _A_LCD_SSC_A0  13
-
-#define DSP_REG                0xE1017024
-
-const unsigned char INIT_1[12] = {
-       0x1C, 0x02, 0x88, 0x00, 0x1E, 0xE0, 0x00, 0xDC, 0x00, 0x02, 0x00
-};
-
-const unsigned char INIT_2[127] = {
-       0x15, 0x00, 0x29, 0x00, 0x3E, 0x00, 0x51, 0x00,
-       0x65, 0x00, 0x7A, 0x00, 0x8D, 0x00, 0xA1, 0x00,
-       0xB6, 0x00, 0xC7, 0x00, 0xD8, 0x00, 0xEB, 0x00,
-       0xFB, 0x00, 0x0B, 0x01, 0x1B, 0x01, 0x27, 0x01,
-       0x34, 0x01, 0x41, 0x01, 0x4C, 0x01, 0x55, 0x01,
-       0x5F, 0x01, 0x68, 0x01, 0x70, 0x01, 0x78, 0x01,
-       0x7E, 0x01, 0x86, 0x01, 0x8C, 0x01, 0x94, 0x01,
-       0x9B, 0x01, 0xA1, 0x01, 0xA4, 0x01, 0xA9, 0x01,
-       0xAD, 0x01, 0xB2, 0x01, 0xB7, 0x01, 0xBC, 0x01,
-       0xC0, 0x01, 0xC4, 0x01, 0xC8, 0x01, 0xCB, 0x01,
-       0xCF, 0x01, 0xD2, 0x01, 0xD5, 0x01, 0xD8, 0x01,
-       0xDB, 0x01, 0xE0, 0x01, 0xE3, 0x01, 0xE6, 0x01,
-       0xE8, 0x01, 0xEB, 0x01, 0xEE, 0x01, 0xF1, 0x01,
-       0xF3, 0x01, 0xF8, 0x01, 0xF9, 0x01, 0xFC, 0x01,
-       0x00, 0x02, 0x03, 0x02, 0x07, 0x02, 0x09, 0x02,
-       0x0E, 0x02, 0x13, 0x02, 0x1C, 0x02, 0x00
-};
-
-const unsigned char INIT_3[15] = {
-       0x14, 0x26, 0x33, 0x3D, 0x45, 0x4D, 0x53, 0x59,
-       0x5E, 0x63, 0x67, 0x6D, 0x71, 0x78, 0xFF
-};
-
-static void epson_sendbyte(int flag, unsigned char byte)
-{
-       int i, shifter = 0x80;
-
-       if (!flag)
-               gpio_set_value(_A_LCD_SSC_A0, 0);
-       mdelay(2);
-       gpio_set_value(A_LCD_SSC_RD, 1);
-
-       gpio_set_value(A_LCD_SSC_SD, flag);
-
-       OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2200);
-       OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2202);
-       for (i = 0; i < 8; i++) {
-               OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2200);
-               gpio_set_value(A_LCD_SSC_SD, shifter & byte);
-               OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2202);
-               shifter >>= 1;
-       }
-       gpio_set_value(_A_LCD_SSC_A0, 1);
-}
-
-static void init_system(void)
-{
-       omap_mcbsp_request(OMAP_MCBSP3);
-       omap_mcbsp_stop(OMAP_MCBSP3);
-}
-
-static void setup_GPIO(void)
-{
-       /* new wave */
-       gpio_request(A_LCD_SSC_RD, "lcd_ssc_rd");
-       gpio_request(A_LCD_SSC_SD, "lcd_ssc_sd");
-       gpio_request(_A_LCD_RESET, "lcd_reset");
-       gpio_request(_A_LCD_SSC_CS, "lcd_ssc_cs");
-       gpio_request(_A_LCD_SSC_A0, "lcd_ssc_a0");
-
-       /* set GPIOs to output, with initial data */
-       gpio_direction_output(A_LCD_SSC_RD, 1);
-       gpio_direction_output(A_LCD_SSC_SD, 0);
-       gpio_direction_output(_A_LCD_RESET, 0);
-       gpio_direction_output(_A_LCD_SSC_CS, 1);
-       gpio_direction_output(_A_LCD_SSC_A0, 1);
-}
-
-static void display_init(void)
-{
-       int i;
-
-       omap_cfg_reg(MCBSP3_CLKX);
-
-       mdelay(2);
-       setup_GPIO();
-       mdelay(2);
-
-       /* reset LCD */
-       gpio_set_value(A_LCD_SSC_SD, 1);
-       epson_sendbyte(0, 0x25);
-
-       gpio_set_value(_A_LCD_RESET, 0);
-       mdelay(10);
-       gpio_set_value(_A_LCD_RESET, 1);
-
-       gpio_set_value(_A_LCD_SSC_CS, 1);
-       mdelay(2);
-       gpio_set_value(_A_LCD_SSC_CS, 0);
-
-       /* init LCD, phase 1 */
-       epson_sendbyte(0, 0xCA);
-       for (i = 0; i < 10; i++)
-               epson_sendbyte(1, INIT_1[i]);
-       gpio_set_value(_A_LCD_SSC_CS, 1);
-       gpio_set_value(_A_LCD_SSC_CS, 0);
-
-       /* init LCD phase 2 */
-       epson_sendbyte(0, 0xCB);
-       for (i = 0; i < 125; i++)
-               epson_sendbyte(1, INIT_2[i]);
-       gpio_set_value(_A_LCD_SSC_CS, 1);
-       gpio_set_value(_A_LCD_SSC_CS, 0);
-
-       /* init LCD phase 2a */
-       epson_sendbyte(0, 0xCC);
-       for (i = 0; i < 14; i++)
-               epson_sendbyte(1, INIT_3[i]);
-       gpio_set_value(_A_LCD_SSC_CS, 1);
-       gpio_set_value(_A_LCD_SSC_CS, 0);
-
-       /* init LCD phase 3 */
-       epson_sendbyte(0, 0xBC);
-       epson_sendbyte(1, 0x08);
-       gpio_set_value(_A_LCD_SSC_CS, 1);
-       gpio_set_value(_A_LCD_SSC_CS, 0);
-
-       /* init LCD phase 4 */
-       epson_sendbyte(0, 0x07);
-       epson_sendbyte(1, 0x05);
-       gpio_set_value(_A_LCD_SSC_CS, 1);
-       gpio_set_value(_A_LCD_SSC_CS, 0);
-
-       /* init LCD phase 5 */
-       epson_sendbyte(0, 0x94);
-       gpio_set_value(_A_LCD_SSC_CS, 1);
-       gpio_set_value(_A_LCD_SSC_CS, 0);
-
-       /* init LCD phase 6 */
-       epson_sendbyte(0, 0xC6);
-       epson_sendbyte(1, 0x80);
-       gpio_set_value(_A_LCD_SSC_CS, 1);
-       mdelay(100); /* used to be 1000 */
-       gpio_set_value(_A_LCD_SSC_CS, 0);
-
-       /* init LCD phase 7 */
-       epson_sendbyte(0, 0x16);
-       epson_sendbyte(1, 0x02);
-       epson_sendbyte(1, 0x00);
-       epson_sendbyte(1, 0xB1);
-       epson_sendbyte(1, 0x00);
-       gpio_set_value(_A_LCD_SSC_CS, 1);
-       gpio_set_value(_A_LCD_SSC_CS, 0);
-
-       /* init LCD phase 8 */
-       epson_sendbyte(0, 0x76);
-       epson_sendbyte(1, 0x00);
-       epson_sendbyte(1, 0x00);
-       epson_sendbyte(1, 0xDB);
-       epson_sendbyte(1, 0x00);
-       gpio_set_value(_A_LCD_SSC_CS, 1);
-       gpio_set_value(_A_LCD_SSC_CS, 0);
-
-       /* init LCD phase 9 */
-       epson_sendbyte(0, 0xAF);
-       gpio_set_value(_A_LCD_SSC_CS, 1);
-}
-
-static int sx1_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)
-{
-       return 0;
-}
-
-static void sx1_panel_cleanup(struct lcd_panel *panel)
-{
-}
-
-static void sx1_panel_disable(struct lcd_panel *panel)
-{
-       printk(KERN_INFO "SX1: LCD panel disable\n");
-       sx1_setmmipower(0);
-       gpio_set_value(_A_LCD_SSC_CS, 1);
-
-       epson_sendbyte(0, 0x25);
-       gpio_set_value(_A_LCD_SSC_CS, 0);
-
-       epson_sendbyte(0, 0xAE);
-       gpio_set_value(_A_LCD_SSC_CS, 1);
-       mdelay(100);
-       gpio_set_value(_A_LCD_SSC_CS, 0);
-
-       epson_sendbyte(0, 0x95);
-       gpio_set_value(_A_LCD_SSC_CS, 1);
-}
-
-static int sx1_panel_enable(struct lcd_panel *panel)
-{
-       printk(KERN_INFO "lcd_sx1: LCD panel enable\n");
-       init_system();
-       display_init();
-
-       sx1_setmmipower(1);
-       sx1_setbacklight(0x18);
-       sx1_setkeylight (0x06);
-       return 0;
-}
-
-
-static unsigned long sx1_panel_get_caps(struct lcd_panel *panel)
-{
-       return 0;
-}
-
-struct lcd_panel sx1_panel = {
-       .name           = "sx1",
-       .config         = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
-                         OMAP_LCDC_INV_HSYNC | OMAP_LCDC_INV_PIX_CLOCK |
-                         OMAP_LCDC_INV_OUTPUT_EN,
-
-       .x_res          = 176,
-       .y_res          = 220,
-       .data_lines     = 16,
-       .bpp            = 16,
-       .hsw            = 5,
-       .hfp            = 5,
-       .hbp            = 5,
-       .vsw            = 2,
-       .vfp            = 1,
-       .vbp            = 1,
-       .pixel_clock    = 1500,
-
-       .init           = sx1_panel_init,
-       .cleanup        = sx1_panel_cleanup,
-       .enable         = sx1_panel_enable,
-       .disable        = sx1_panel_disable,
-       .get_caps       = sx1_panel_get_caps,
-};
-
-static int sx1_panel_probe(struct platform_device *pdev)
-{
-       omapfb_register_panel(&sx1_panel);
-       return 0;
-}
-
-static int sx1_panel_remove(struct platform_device *pdev)
-{
-       return 0;
-}
-
-static int sx1_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
-{
-       return 0;
-}
-
-static int sx1_panel_resume(struct platform_device *pdev)
-{
-       return 0;
-}
-
-struct platform_driver sx1_panel_driver = {
-       .probe          = sx1_panel_probe,
-       .remove         = sx1_panel_remove,
-       .suspend        = sx1_panel_suspend,
-       .resume         = sx1_panel_resume,
-       .driver = {
-               .name   = "lcd_sx1",
-               .owner  = THIS_MODULE,
-       },
-};
-
-static int sx1_panel_drv_init(void)
-{
-       return platform_driver_register(&sx1_panel_driver);
-}
-
-static void sx1_panel_drv_cleanup(void)
-{
-       platform_driver_unregister(&sx1_panel_driver);
-}
-
-module_init(sx1_panel_drv_init);
-module_exit(sx1_panel_drv_cleanup);
index 5a5e407dc45f713cc9252f11efcf1ae2b113f2a3..1a49519dafa483b864c992dfb1f92b2f8e02505f 100644 (file)
@@ -392,7 +392,7 @@ static void set_fb_fix(struct fb_info *fbi)
        int bpp;
 
        rg = &plane->fbdev->mem_desc.region[plane->idx];
-       fbi->screen_base        = (char __iomem *)rg->vaddr;
+       fbi->screen_base        = rg->vaddr;
        fix->smem_start         = rg->paddr;
        fix->smem_len           = rg->size;
 
index 97204497d9f7ed10de17f6290c7ac047fd6fabef..cc59c52e1103dfdd48cd161fb37a385023890b5a 100644 (file)
@@ -804,6 +804,9 @@ static int pxafb_smart_thread(void *arg)
 
 static int pxafb_smart_init(struct pxafb_info *fbi)
 {
+       if (!(fbi->lccr0 | LCCR0_LCDT))
+               return 0;
+
        fbi->smart_thread = kthread_run(pxafb_smart_thread, fbi,
                                        "lcd_refresh");
        if (IS_ERR(fbi->smart_thread)) {
@@ -1372,7 +1375,7 @@ static void pxafb_decode_mach_info(struct pxafb_info *fbi,
        fbi->cmap_inverse       = inf->cmap_inverse;
        fbi->cmap_static        = inf->cmap_static;
 
-       switch (lcd_conn & 0xf) {
+       switch (lcd_conn & LCD_TYPE_MASK) {
        case LCD_TYPE_MONO_STN:
                fbi->lccr0 = LCCR0_CMS;
                break;
index 2a380011e9baf07f37593dadc730ac51562e57cf..7baf2dd12d5024f33b5e7af20f6288085e573b9c 100644 (file)
@@ -222,6 +222,9 @@ static irqreturn_t tmiofb_irq(int irq, void *__info)
        unsigned int bbisc = tmio_ioread16(par->lcr + LCR_BBISC);
 
 
+       tmio_iowrite16(bbisc, par->lcr + LCR_BBISC);
+
+#ifdef CONFIG_FB_TMIO_ACCELL
        /*
         * We were in polling mode and now we got correct irq.
         * Switch back to IRQ-based sync of command FIFO
@@ -231,9 +234,6 @@ static irqreturn_t tmiofb_irq(int irq, void *__info)
                par->use_polling = false;
        }
 
-       tmio_iowrite16(bbisc, par->lcr + LCR_BBISC);
-
-#ifdef CONFIG_FB_TMIO_ACCELL
        if (bbisc & 1)
                wake_up(&par->wait_acc);
 #endif
@@ -938,7 +938,9 @@ static void tmiofb_dump_regs(struct platform_device *dev)
 static int tmiofb_suspend(struct platform_device *dev, pm_message_t state)
 {
        struct fb_info *info = platform_get_drvdata(dev);
+#ifdef CONFIG_FB_TMIO_ACCELL
        struct tmiofb_par *par = info->par;
+#endif
        struct mfd_cell *cell = dev->dev.platform_data;
        int retval = 0;
 
@@ -950,12 +952,14 @@ static int tmiofb_suspend(struct platform_device *dev, pm_message_t state)
                info->fbops->fb_sync(info);
 
 
+#ifdef CONFIG_FB_TMIO_ACCELL
        /*
         * The fb should be usable even if interrupts are disabled (and they are
         * during suspend/resume). Switch temporary to forced polling.
         */
        printk(KERN_INFO "tmiofb: switching to polling\n");
        par->use_polling = true;
+#endif
        tmiofb_hw_stop(dev);
 
        if (cell->suspend)
index 0132eae06f5586960f0abfa3f76df314b30492d3..73ac754ad801952bebb8741639df05a98ace7c4a 100644 (file)
@@ -2036,30 +2036,30 @@ static int viafb_vt1636_proc_write(struct file *file,
        return count;
 }
 
-static void viafb_init_proc(struct proc_dir_entry *viafb_entry)
+static void viafb_init_proc(struct proc_dir_entry **viafb_entry)
 {
        struct proc_dir_entry *entry;
-       viafb_entry = proc_mkdir("viafb", NULL);
+       *viafb_entry = proc_mkdir("viafb", NULL);
        if (viafb_entry) {
-               entry = create_proc_entry("dvp0", 0, viafb_entry);
+               entry = create_proc_entry("dvp0", 0, *viafb_entry);
                if (entry) {
                        entry->owner = THIS_MODULE;
                        entry->read_proc = viafb_dvp0_proc_read;
                        entry->write_proc = viafb_dvp0_proc_write;
                }
-               entry = create_proc_entry("dvp1", 0, viafb_entry);
+               entry = create_proc_entry("dvp1", 0, *viafb_entry);
                if (entry) {
                        entry->owner = THIS_MODULE;
                        entry->read_proc = viafb_dvp1_proc_read;
                        entry->write_proc = viafb_dvp1_proc_write;
                }
-               entry = create_proc_entry("dfph", 0, viafb_entry);
+               entry = create_proc_entry("dfph", 0, *viafb_entry);
                if (entry) {
                        entry->owner = THIS_MODULE;
                        entry->read_proc = viafb_dfph_proc_read;
                        entry->write_proc = viafb_dfph_proc_write;
                }
-               entry = create_proc_entry("dfpl", 0, viafb_entry);
+               entry = create_proc_entry("dfpl", 0, *viafb_entry);
                if (entry) {
                        entry->owner = THIS_MODULE;
                        entry->read_proc = viafb_dfpl_proc_read;
@@ -2068,7 +2068,7 @@ static void viafb_init_proc(struct proc_dir_entry *viafb_entry)
                if (VT1636_LVDS == viaparinfo->chip_info->lvds_chip_info.
                        lvds_chip_name || VT1636_LVDS ==
                    viaparinfo->chip_info->lvds_chip_info2.lvds_chip_name) {
-                       entry = create_proc_entry("vt1636", 0, viafb_entry);
+                       entry = create_proc_entry("vt1636", 0, *viafb_entry);
                        if (entry) {
                                entry->owner = THIS_MODULE;
                                entry->read_proc = viafb_vt1636_proc_read;
@@ -2087,6 +2087,7 @@ static void viafb_remove_proc(struct proc_dir_entry *viafb_entry)
        remove_proc_entry("dfpl", viafb_entry);
        remove_proc_entry("vt1636", viafb_entry);
        remove_proc_entry("vt1625", viafb_entry);
+       remove_proc_entry("viafb", NULL);
 }
 
 static int __devinit via_pci_probe(void)
@@ -2348,7 +2349,7 @@ static int __devinit via_pci_probe(void)
                  viafbinfo->node, viafbinfo->fix.id, default_var.xres,
                  default_var.yres, default_var.bits_per_pixel);
 
-       viafb_init_proc(viaparinfo->proc_entry);
+       viafb_init_proc(&viaparinfo->proc_entry);
        viafb_init_dac(IGA2);
        return 0;
 }
index a463b3dd837b5b9d6db40f68081fca7f89678e0f..2493f05e9f6176588c0f0fc3471097f62c8ae68d 100644 (file)
@@ -668,7 +668,7 @@ static struct xenbus_device_id xenfb_ids[] = {
        { "" }
 };
 
-static struct xenbus_driver xenfb = {
+static struct xenbus_driver xenfb_driver = {
        .name = "vfb",
        .owner = THIS_MODULE,
        .ids = xenfb_ids,
@@ -687,12 +687,12 @@ static int __init xenfb_init(void)
        if (xen_initial_domain())
                return -ENODEV;
 
-       return xenbus_register_frontend(&xenfb);
+       return xenbus_register_frontend(&xenfb_driver);
 }
 
 static void __exit xenfb_cleanup(void)
 {
-       xenbus_unregister_driver(&xenfb);
+       xenbus_unregister_driver(&xenfb_driver);
 }
 
 module_init(xenfb_init);
index 5da3d2423cc0f4cc22ebd2f530414d0ef891bb00..40a3a2afbfe7588faed06e975be5fa0c82a21127 100644 (file)
@@ -298,8 +298,9 @@ static int xilinxfb_assign(struct device *dev, unsigned long physaddr,
 
        /* Put a banner in the log (for DEBUG) */
        dev_dbg(dev, "regs: phys=%lx, virt=%p\n", physaddr, drvdata->regs);
-       dev_dbg(dev, "fb: phys=%p, virt=%p, size=%x\n",
-               (void*)drvdata->fb_phys, drvdata->fb_virt, fbsize);
+       dev_dbg(dev, "fb: phys=%llx, virt=%p, size=%x\n",
+               (unsigned long long) drvdata->fb_phys, drvdata->fb_virt,
+               fbsize);
 
        return 0;       /* success */
 
index c4493091c655d109dd008983183048b02c2a304e..90616822cd2021ea9b1f8a195baf5dbda6f5e28e 100644 (file)
@@ -36,7 +36,7 @@ config W1_MASTER_DS2482
 
 config W1_MASTER_DS1WM
        tristate "Maxim DS1WM 1-wire busmaster"
-       depends on W1 && ARM
+       depends on W1 && ARM && HAVE_CLK
        help
          Say Y here to enable the DS1WM 1-wire driver, such as that
          in HP iPAQ devices like h5xxx, h2200, and ASIC3-based like
@@ -52,5 +52,12 @@ config W1_MASTER_GPIO
          This support is also available as a module.  If so, the module
          will be called w1-gpio.ko.
 
+config HDQ_MASTER_OMAP
+       tristate "OMAP HDQ driver"
+       depends on ARCH_OMAP2430 || ARCH_OMAP34XX
+       help
+         Say Y here if you want support for the 1-wire or HDQ Interface
+         on an OMAP processor.
+
 endmenu
 
index 1420b5bbdda81f930379dfac9e776af216af7557..bc4714a75f3a0358ebcc7c51a78025dab7e1d594 100644 (file)
@@ -7,3 +7,4 @@ obj-$(CONFIG_W1_MASTER_DS2490)          += ds2490.o
 obj-$(CONFIG_W1_MASTER_DS2482)         += ds2482.o
 obj-$(CONFIG_W1_MASTER_DS1WM)          += ds1wm.o
 obj-$(CONFIG_W1_MASTER_GPIO)           += w1-gpio.o
+obj-$(CONFIG_HDQ_MASTER_OMAP)          += omap_hdq.o
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
new file mode 100644 (file)
index 0000000..c973889
--- /dev/null
@@ -0,0 +1,725 @@
+/*
+ * drivers/w1/masters/omap_hdq.c
+ *
+ * Copyright (C) 2007 Texas Instruments, Inc.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ *
+ */
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/interrupt.h>
+#include <linux/err.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+
+#include <asm/irq.h>
+#include <mach/hardware.h>
+
+#include "../w1.h"
+#include "../w1_int.h"
+
+#define        MOD_NAME        "OMAP_HDQ:"
+
+#define OMAP_HDQ_REVISION                      0x00
+#define OMAP_HDQ_TX_DATA                       0x04
+#define OMAP_HDQ_RX_DATA                       0x08
+#define OMAP_HDQ_CTRL_STATUS                   0x0c
+#define OMAP_HDQ_CTRL_STATUS_INTERRUPTMASK     (1<<6)
+#define OMAP_HDQ_CTRL_STATUS_CLOCKENABLE       (1<<5)
+#define OMAP_HDQ_CTRL_STATUS_GO                        (1<<4)
+#define OMAP_HDQ_CTRL_STATUS_INITIALIZATION    (1<<2)
+#define OMAP_HDQ_CTRL_STATUS_DIR               (1<<1)
+#define OMAP_HDQ_CTRL_STATUS_MODE              (1<<0)
+#define OMAP_HDQ_INT_STATUS                    0x10
+#define OMAP_HDQ_INT_STATUS_TXCOMPLETE         (1<<2)
+#define OMAP_HDQ_INT_STATUS_RXCOMPLETE         (1<<1)
+#define OMAP_HDQ_INT_STATUS_TIMEOUT            (1<<0)
+#define OMAP_HDQ_SYSCONFIG                     0x14
+#define OMAP_HDQ_SYSCONFIG_SOFTRESET           (1<<1)
+#define OMAP_HDQ_SYSCONFIG_AUTOIDLE            (1<<0)
+#define OMAP_HDQ_SYSSTATUS                     0x18
+#define OMAP_HDQ_SYSSTATUS_RESETDONE           (1<<0)
+
+#define OMAP_HDQ_FLAG_CLEAR                    0
+#define OMAP_HDQ_FLAG_SET                      1
+#define OMAP_HDQ_TIMEOUT                       (HZ/5)
+
+#define OMAP_HDQ_MAX_USER                      4
+
+static DECLARE_WAIT_QUEUE_HEAD(hdq_wait_queue);
+static int w1_id;
+
+struct hdq_data {
+       struct device           *dev;
+       void __iomem            *hdq_base;
+       /* lock status update */
+       struct  mutex           hdq_mutex;
+       int                     hdq_usecount;
+       struct  clk             *hdq_ick;
+       struct  clk             *hdq_fck;
+       u8                      hdq_irqstatus;
+       /* device lock */
+       spinlock_t              hdq_spinlock;
+       /*
+        * Used to control the call to omap_hdq_get and omap_hdq_put.
+        * HDQ Protocol: Write the CMD|REG_address first, followed by
+        * the data wrire or read.
+        */
+       int                     init_trans;
+};
+
+static int __init omap_hdq_probe(struct platform_device *pdev);
+static int omap_hdq_remove(struct platform_device *pdev);
+
+static struct platform_driver omap_hdq_driver = {
+       .probe =        omap_hdq_probe,
+       .remove =       omap_hdq_remove,
+       .driver =       {
+               .name = "omap_hdq",
+       },
+};
+
+static u8 omap_w1_read_byte(void *_hdq);
+static void omap_w1_write_byte(void *_hdq, u8 byte);
+static u8 omap_w1_reset_bus(void *_hdq);
+static void omap_w1_search_bus(void *_hdq, struct w1_master *master_dev,
+               u8 search_type, w1_slave_found_callback slave_found);
+
+
+static struct w1_bus_master omap_w1_master = {
+       .read_byte      = omap_w1_read_byte,
+       .write_byte     = omap_w1_write_byte,
+       .reset_bus      = omap_w1_reset_bus,
+       .search         = omap_w1_search_bus,
+};
+
+/* HDQ register I/O routines */
+static inline u8 hdq_reg_in(struct hdq_data *hdq_data, u32 offset)
+{
+       return __raw_readb(hdq_data->hdq_base + offset);
+}
+
+static inline void hdq_reg_out(struct hdq_data *hdq_data, u32 offset, u8 val)
+{
+       __raw_writeb(val, hdq_data->hdq_base + offset);
+}
+
+static inline u8 hdq_reg_merge(struct hdq_data *hdq_data, u32 offset,
+                       u8 val, u8 mask)
+{
+       u8 new_val = (__raw_readb(hdq_data->hdq_base + offset) & ~mask)
+                       | (val & mask);
+       __raw_writeb(new_val, hdq_data->hdq_base + offset);
+
+       return new_val;
+}
+
+/*
+ * Wait for one or more bits in flag change.
+ * HDQ_FLAG_SET: wait until any bit in the flag is set.
+ * HDQ_FLAG_CLEAR: wait until all bits in the flag are cleared.
+ * return 0 on success and -ETIMEDOUT in the case of timeout.
+ */
+static int hdq_wait_for_flag(struct hdq_data *hdq_data, u32 offset,
+               u8 flag, u8 flag_set, u8 *status)
+{
+       int ret = 0;
+       unsigned long timeout = jiffies + OMAP_HDQ_TIMEOUT;
+
+       if (flag_set == OMAP_HDQ_FLAG_CLEAR) {
+               /* wait for the flag clear */
+               while (((*status = hdq_reg_in(hdq_data, offset)) & flag)
+                       && time_before(jiffies, timeout)) {
+                       schedule_timeout_uninterruptible(1);
+               }
+               if (*status & flag)
+                       ret = -ETIMEDOUT;
+       } else if (flag_set == OMAP_HDQ_FLAG_SET) {
+               /* wait for the flag set */
+               while (!((*status = hdq_reg_in(hdq_data, offset)) & flag)
+                       && time_before(jiffies, timeout)) {
+                       schedule_timeout_uninterruptible(1);
+               }
+               if (!(*status & flag))
+                       ret = -ETIMEDOUT;
+       } else
+               return -EINVAL;
+
+       return ret;
+}
+
+/* write out a byte and fill *status with HDQ_INT_STATUS */
+static int hdq_write_byte(struct hdq_data *hdq_data, u8 val, u8 *status)
+{
+       int ret;
+       u8 tmp_status;
+       unsigned long irqflags;
+
+       *status = 0;
+
+       spin_lock_irqsave(&hdq_data->hdq_spinlock, irqflags);
+       /* clear interrupt flags via a dummy read */
+       hdq_reg_in(hdq_data, OMAP_HDQ_INT_STATUS);
+       /* ISR loads it with new INT_STATUS */
+       hdq_data->hdq_irqstatus = 0;
+       spin_unlock_irqrestore(&hdq_data->hdq_spinlock, irqflags);
+
+       hdq_reg_out(hdq_data, OMAP_HDQ_TX_DATA, val);
+
+       /* set the GO bit */
+       hdq_reg_merge(hdq_data, OMAP_HDQ_CTRL_STATUS, OMAP_HDQ_CTRL_STATUS_GO,
+               OMAP_HDQ_CTRL_STATUS_DIR | OMAP_HDQ_CTRL_STATUS_GO);
+       /* wait for the TXCOMPLETE bit */
+       ret = wait_event_timeout(hdq_wait_queue,
+               hdq_data->hdq_irqstatus, OMAP_HDQ_TIMEOUT);
+       if (ret == 0) {
+               dev_dbg(hdq_data->dev, "TX wait elapsed\n");
+               goto out;
+       }
+
+       *status = hdq_data->hdq_irqstatus;
+       /* check irqstatus */
+       if (!(*status & OMAP_HDQ_INT_STATUS_TXCOMPLETE)) {
+               dev_dbg(hdq_data->dev, "timeout waiting for"
+                       "TXCOMPLETE/RXCOMPLETE, %x", *status);
+               ret = -ETIMEDOUT;
+               goto out;
+       }
+
+       /* wait for the GO bit return to zero */
+       ret = hdq_wait_for_flag(hdq_data, OMAP_HDQ_CTRL_STATUS,
+                       OMAP_HDQ_CTRL_STATUS_GO,
+                       OMAP_HDQ_FLAG_CLEAR, &tmp_status);
+       if (ret) {
+               dev_dbg(hdq_data->dev, "timeout waiting GO bit"
+                       "return to zero, %x", tmp_status);
+       }
+
+out:
+       return ret;
+}
+
+/* HDQ Interrupt service routine */
+static irqreturn_t hdq_isr(int irq, void *_hdq)
+{
+       struct hdq_data *hdq_data = _hdq;
+       unsigned long irqflags;
+
+       spin_lock_irqsave(&hdq_data->hdq_spinlock, irqflags);
+       hdq_data->hdq_irqstatus = hdq_reg_in(hdq_data, OMAP_HDQ_INT_STATUS);
+       spin_unlock_irqrestore(&hdq_data->hdq_spinlock, irqflags);
+       dev_dbg(hdq_data->dev, "hdq_isr: %x", hdq_data->hdq_irqstatus);
+
+       if (hdq_data->hdq_irqstatus &
+               (OMAP_HDQ_INT_STATUS_TXCOMPLETE | OMAP_HDQ_INT_STATUS_RXCOMPLETE
+               | OMAP_HDQ_INT_STATUS_TIMEOUT)) {
+               /* wake up sleeping process */
+               wake_up(&hdq_wait_queue);
+       }
+
+       return IRQ_HANDLED;
+}
+
+/* HDQ Mode: always return success */
+static u8 omap_w1_reset_bus(void *_hdq)
+{
+       return 0;
+}
+
+/* W1 search callback function */
+static void omap_w1_search_bus(void *_hdq, struct w1_master *master_dev,
+               u8 search_type, w1_slave_found_callback slave_found)
+{
+       u64 module_id, rn_le, cs, id;
+
+       if (w1_id)
+               module_id = w1_id;
+       else
+               module_id = 0x1;
+
+       rn_le = cpu_to_le64(module_id);
+       /*
+        * HDQ might not obey truly the 1-wire spec.
+        * So calculate CRC based on module parameter.
+        */
+       cs = w1_calc_crc8((u8 *)&rn_le, 7);
+       id = (cs << 56) | module_id;
+
+       slave_found(master_dev, id);
+}
+
+static int _omap_hdq_reset(struct hdq_data *hdq_data)
+{
+       int ret;
+       u8 tmp_status;
+
+       hdq_reg_out(hdq_data, OMAP_HDQ_SYSCONFIG, OMAP_HDQ_SYSCONFIG_SOFTRESET);
+       /*
+        * Select HDQ mode & enable clocks.
+        * It is observed that INT flags can't be cleared via a read and GO/INIT
+        * won't return to zero if interrupt is disabled. So we always enable
+        * interrupt.
+        */
+       hdq_reg_out(hdq_data, OMAP_HDQ_CTRL_STATUS,
+               OMAP_HDQ_CTRL_STATUS_CLOCKENABLE |
+               OMAP_HDQ_CTRL_STATUS_INTERRUPTMASK);
+
+       /* wait for reset to complete */
+       ret = hdq_wait_for_flag(hdq_data, OMAP_HDQ_SYSSTATUS,
+               OMAP_HDQ_SYSSTATUS_RESETDONE, OMAP_HDQ_FLAG_SET, &tmp_status);
+       if (ret)
+               dev_dbg(hdq_data->dev, "timeout waiting HDQ reset, %x",
+                               tmp_status);
+       else {
+               hdq_reg_out(hdq_data, OMAP_HDQ_CTRL_STATUS,
+                       OMAP_HDQ_CTRL_STATUS_CLOCKENABLE |
+                       OMAP_HDQ_CTRL_STATUS_INTERRUPTMASK);
+               hdq_reg_out(hdq_data, OMAP_HDQ_SYSCONFIG,
+                       OMAP_HDQ_SYSCONFIG_AUTOIDLE);
+       }
+
+       return ret;
+}
+
+/* Issue break pulse to the device */
+static int omap_hdq_break(struct hdq_data *hdq_data)
+{
+       int ret = 0;
+       u8 tmp_status;
+       unsigned long irqflags;
+
+       ret = mutex_lock_interruptible(&hdq_data->hdq_mutex);
+       if (ret < 0) {
+               dev_dbg(hdq_data->dev, "Could not acquire mutex\n");
+               ret = -EINTR;
+               goto rtn;
+       }
+
+       spin_lock_irqsave(&hdq_data->hdq_spinlock, irqflags);
+       /* clear interrupt flags via a dummy read */
+       hdq_reg_in(hdq_data, OMAP_HDQ_INT_STATUS);
+       /* ISR loads it with new INT_STATUS */
+       hdq_data->hdq_irqstatus = 0;
+       spin_unlock_irqrestore(&hdq_data->hdq_spinlock, irqflags);
+
+       /* set the INIT and GO bit */
+       hdq_reg_merge(hdq_data, OMAP_HDQ_CTRL_STATUS,
+               OMAP_HDQ_CTRL_STATUS_INITIALIZATION | OMAP_HDQ_CTRL_STATUS_GO,
+               OMAP_HDQ_CTRL_STATUS_DIR | OMAP_HDQ_CTRL_STATUS_INITIALIZATION |
+               OMAP_HDQ_CTRL_STATUS_GO);
+
+       /* wait for the TIMEOUT bit */
+       ret = wait_event_timeout(hdq_wait_queue,
+               hdq_data->hdq_irqstatus, OMAP_HDQ_TIMEOUT);
+       if (ret == 0) {
+               dev_dbg(hdq_data->dev, "break wait elapsed\n");
+               ret = -EINTR;
+               goto out;
+       }
+
+       tmp_status = hdq_data->hdq_irqstatus;
+       /* check irqstatus */
+       if (!(tmp_status & OMAP_HDQ_INT_STATUS_TIMEOUT)) {
+               dev_dbg(hdq_data->dev, "timeout waiting for TIMEOUT, %x",
+                               tmp_status);
+               ret = -ETIMEDOUT;
+               goto out;
+       }
+       /*
+        * wait for both INIT and GO bits rerurn to zero.
+        * zero wait time expected for interrupt mode.
+        */
+       ret = hdq_wait_for_flag(hdq_data, OMAP_HDQ_CTRL_STATUS,
+                       OMAP_HDQ_CTRL_STATUS_INITIALIZATION |
+                       OMAP_HDQ_CTRL_STATUS_GO, OMAP_HDQ_FLAG_CLEAR,
+                       &tmp_status);
+       if (ret)
+               dev_dbg(hdq_data->dev, "timeout waiting INIT&GO bits"
+                       "return to zero, %x", tmp_status);
+
+out:
+       mutex_unlock(&hdq_data->hdq_mutex);
+rtn:
+       return ret;
+}
+
+static int hdq_read_byte(struct hdq_data *hdq_data, u8 *val)
+{
+       int ret = 0;
+       u8 status;
+       unsigned long timeout = jiffies + OMAP_HDQ_TIMEOUT;
+
+       ret = mutex_lock_interruptible(&hdq_data->hdq_mutex);
+       if (ret < 0) {
+               ret = -EINTR;
+               goto rtn;
+       }
+
+       if (!hdq_data->hdq_usecount) {
+               ret = -EINVAL;
+               goto out;
+       }
+
+       if (!(hdq_data->hdq_irqstatus & OMAP_HDQ_INT_STATUS_RXCOMPLETE)) {
+               hdq_reg_merge(hdq_data, OMAP_HDQ_CTRL_STATUS,
+                       OMAP_HDQ_CTRL_STATUS_DIR | OMAP_HDQ_CTRL_STATUS_GO,
+                       OMAP_HDQ_CTRL_STATUS_DIR | OMAP_HDQ_CTRL_STATUS_GO);
+               /*
+                * The RX comes immediately after TX. It
+                * triggers another interrupt before we
+                * sleep. So we have to wait for RXCOMPLETE bit.
+                */
+               while (!(hdq_data->hdq_irqstatus
+                       & OMAP_HDQ_INT_STATUS_RXCOMPLETE)
+                       && time_before(jiffies, timeout)) {
+                       schedule_timeout_uninterruptible(1);
+               }
+               hdq_reg_merge(hdq_data, OMAP_HDQ_CTRL_STATUS, 0,
+                       OMAP_HDQ_CTRL_STATUS_DIR);
+               status = hdq_data->hdq_irqstatus;
+               /* check irqstatus */
+               if (!(status & OMAP_HDQ_INT_STATUS_RXCOMPLETE)) {
+                       dev_dbg(hdq_data->dev, "timeout waiting for"
+                               "RXCOMPLETE, %x", status);
+                       ret = -ETIMEDOUT;
+                       goto out;
+               }
+       }
+       /* the data is ready. Read it in! */
+       *val = hdq_reg_in(hdq_data, OMAP_HDQ_RX_DATA);
+out:
+       mutex_unlock(&hdq_data->hdq_mutex);
+rtn:
+       return 0;
+
+}
+
+/* Enable clocks and set the controller to HDQ mode */
+static int omap_hdq_get(struct hdq_data *hdq_data)
+{
+       int ret = 0;
+
+       ret = mutex_lock_interruptible(&hdq_data->hdq_mutex);
+       if (ret < 0) {
+               ret = -EINTR;
+               goto rtn;
+       }
+
+       if (OMAP_HDQ_MAX_USER == hdq_data->hdq_usecount) {
+               dev_dbg(hdq_data->dev, "attempt to exceed the max use count");
+               ret = -EINVAL;
+               goto out;
+       } else {
+               hdq_data->hdq_usecount++;
+               try_module_get(THIS_MODULE);
+               if (1 == hdq_data->hdq_usecount) {
+                       if (clk_enable(hdq_data->hdq_ick)) {
+                               dev_dbg(hdq_data->dev, "Can not enable ick\n");
+                               ret = -ENODEV;
+                               goto clk_err;
+                       }
+                       if (clk_enable(hdq_data->hdq_fck)) {
+                               dev_dbg(hdq_data->dev, "Can not enable fck\n");
+                               clk_disable(hdq_data->hdq_ick);
+                               ret = -ENODEV;
+                               goto clk_err;
+                       }
+
+                       /* make sure HDQ is out of reset */
+                       if (!(hdq_reg_in(hdq_data, OMAP_HDQ_SYSSTATUS) &
+                               OMAP_HDQ_SYSSTATUS_RESETDONE)) {
+                               ret = _omap_hdq_reset(hdq_data);
+                               if (ret)
+                                       /* back up the count */
+                                       hdq_data->hdq_usecount--;
+                       } else {
+                               /* select HDQ mode & enable clocks */
+                               hdq_reg_out(hdq_data, OMAP_HDQ_CTRL_STATUS,
+                                       OMAP_HDQ_CTRL_STATUS_CLOCKENABLE |
+                                       OMAP_HDQ_CTRL_STATUS_INTERRUPTMASK);
+                               hdq_reg_out(hdq_data, OMAP_HDQ_SYSCONFIG,
+                                       OMAP_HDQ_SYSCONFIG_AUTOIDLE);
+                               hdq_reg_in(hdq_data, OMAP_HDQ_INT_STATUS);
+                       }
+               }
+       }
+
+clk_err:
+       clk_put(hdq_data->hdq_ick);
+       clk_put(hdq_data->hdq_fck);
+out:
+       mutex_unlock(&hdq_data->hdq_mutex);
+rtn:
+       return ret;
+}
+
+/* Disable clocks to the module */
+static int omap_hdq_put(struct hdq_data *hdq_data)
+{
+       int ret = 0;
+
+       ret = mutex_lock_interruptible(&hdq_data->hdq_mutex);
+       if (ret < 0)
+               return -EINTR;
+
+       if (0 == hdq_data->hdq_usecount) {
+               dev_dbg(hdq_data->dev, "attempt to decrement use count"
+                       "when it is zero");
+               ret = -EINVAL;
+       } else {
+               hdq_data->hdq_usecount--;
+               module_put(THIS_MODULE);
+               if (0 == hdq_data->hdq_usecount) {
+                       clk_disable(hdq_data->hdq_ick);
+                       clk_disable(hdq_data->hdq_fck);
+               }
+       }
+       mutex_unlock(&hdq_data->hdq_mutex);
+
+       return ret;
+}
+
+/* Read a byte of data from the device */
+static u8 omap_w1_read_byte(void *_hdq)
+{
+       struct hdq_data *hdq_data = _hdq;
+       u8 val = 0;
+       int ret;
+
+       ret = hdq_read_byte(hdq_data, &val);
+       if (ret) {
+               ret = mutex_lock_interruptible(&hdq_data->hdq_mutex);
+               if (ret < 0) {
+                       dev_dbg(hdq_data->dev, "Could not acquire mutex\n");
+                       return -EINTR;
+               }
+               hdq_data->init_trans = 0;
+               mutex_unlock(&hdq_data->hdq_mutex);
+               omap_hdq_put(hdq_data);
+               return -1;
+       }
+
+       /* Write followed by a read, release the module */
+       if (hdq_data->init_trans) {
+               ret = mutex_lock_interruptible(&hdq_data->hdq_mutex);
+               if (ret < 0) {
+                       dev_dbg(hdq_data->dev, "Could not acquire mutex\n");
+                       return -EINTR;
+               }
+               hdq_data->init_trans = 0;
+               mutex_unlock(&hdq_data->hdq_mutex);
+               omap_hdq_put(hdq_data);
+       }
+
+       return val;
+}
+
+/* Write a byte of data to the device */
+static void omap_w1_write_byte(void *_hdq, u8 byte)
+{
+       struct hdq_data *hdq_data = _hdq;
+       int ret;
+       u8 status;
+
+       /* First write to initialize the transfer */
+       if (hdq_data->init_trans == 0)
+               omap_hdq_get(hdq_data);
+
+       ret = mutex_lock_interruptible(&hdq_data->hdq_mutex);
+       if (ret < 0) {
+               dev_dbg(hdq_data->dev, "Could not acquire mutex\n");
+               return;
+       }
+       hdq_data->init_trans++;
+       mutex_unlock(&hdq_data->hdq_mutex);
+
+       ret = hdq_write_byte(hdq_data, byte, &status);
+       if (ret == 0) {
+               dev_dbg(hdq_data->dev, "TX failure:Ctrl status %x\n", status);
+               return;
+       }
+
+       /* Second write, data transfered. Release the module */
+       if (hdq_data->init_trans > 1) {
+               omap_hdq_put(hdq_data);
+               ret = mutex_lock_interruptible(&hdq_data->hdq_mutex);
+               if (ret < 0) {
+                       dev_dbg(hdq_data->dev, "Could not acquire mutex\n");
+                       return;
+               }
+               hdq_data->init_trans = 0;
+               mutex_unlock(&hdq_data->hdq_mutex);
+       }
+
+       return;
+}
+
+static int __init omap_hdq_probe(struct platform_device *pdev)
+{
+       struct hdq_data *hdq_data;
+       struct resource *res;
+       int ret, irq;
+       u8 rev;
+
+       hdq_data = kmalloc(sizeof(*hdq_data), GFP_KERNEL);
+       if (!hdq_data) {
+               dev_dbg(&pdev->dev, "unable to allocate memory\n");
+               ret = -ENOMEM;
+               goto err_kmalloc;
+       }
+
+       hdq_data->dev = &pdev->dev;
+       platform_set_drvdata(pdev, hdq_data);
+
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       if (!res) {
+               dev_dbg(&pdev->dev, "unable to get resource\n");
+               ret = -ENXIO;
+               goto err_resource;
+       }
+
+       hdq_data->hdq_base = ioremap(res->start, SZ_4K);
+       if (!hdq_data->hdq_base) {
+               dev_dbg(&pdev->dev, "ioremap failed\n");
+               ret = -EINVAL;
+               goto err_ioremap;
+       }
+
+       /* get interface & functional clock objects */
+       hdq_data->hdq_ick = clk_get(&pdev->dev, "hdq_ick");
+       hdq_data->hdq_fck = clk_get(&pdev->dev, "hdq_fck");
+
+       if (IS_ERR(hdq_data->hdq_ick) || IS_ERR(hdq_data->hdq_fck)) {
+               dev_dbg(&pdev->dev, "Can't get HDQ clock objects\n");
+               if (IS_ERR(hdq_data->hdq_ick)) {
+                       ret = PTR_ERR(hdq_data->hdq_ick);
+                       goto err_clk;
+               }
+               if (IS_ERR(hdq_data->hdq_fck)) {
+                       ret = PTR_ERR(hdq_data->hdq_fck);
+                       clk_put(hdq_data->hdq_ick);
+                       goto err_clk;
+               }
+       }
+
+       hdq_data->hdq_usecount = 0;
+       mutex_init(&hdq_data->hdq_mutex);
+
+       if (clk_enable(hdq_data->hdq_ick)) {
+               dev_dbg(&pdev->dev, "Can not enable ick\n");
+               ret = -ENODEV;
+               goto err_intfclk;
+       }
+
+       if (clk_enable(hdq_data->hdq_fck)) {
+               dev_dbg(&pdev->dev, "Can not enable fck\n");
+               ret = -ENODEV;
+               goto err_fnclk;
+       }
+
+       rev = hdq_reg_in(hdq_data, OMAP_HDQ_REVISION);
+       dev_info(&pdev->dev, "OMAP HDQ Hardware Rev %c.%c. Driver in %s mode\n",
+               (rev >> 4) + '0', (rev & 0x0f) + '0', "Interrupt");
+
+       spin_lock_init(&hdq_data->hdq_spinlock);
+
+       irq = platform_get_irq(pdev, 0);
+       if (irq < 0) {
+               ret = -ENXIO;
+               goto err_irq;
+       }
+
+       ret = request_irq(irq, hdq_isr, IRQF_DISABLED, "omap_hdq", hdq_data);
+       if (ret < 0) {
+               dev_dbg(&pdev->dev, "could not request irq\n");
+               goto err_irq;
+       }
+
+       omap_hdq_break(hdq_data);
+
+       /* don't clock the HDQ until it is needed */
+       clk_disable(hdq_data->hdq_ick);
+       clk_disable(hdq_data->hdq_fck);
+
+       omap_w1_master.data = hdq_data;
+
+       ret = w1_add_master_device(&omap_w1_master);
+       if (ret) {
+               dev_dbg(&pdev->dev, "Failure in registering w1 master\n");
+               goto err_w1;
+       }
+
+       return 0;
+
+err_w1:
+err_irq:
+       clk_disable(hdq_data->hdq_fck);
+
+err_fnclk:
+       clk_disable(hdq_data->hdq_ick);
+
+err_intfclk:
+       clk_put(hdq_data->hdq_ick);
+       clk_put(hdq_data->hdq_fck);
+
+err_clk:
+       iounmap(hdq_data->hdq_base);
+
+err_ioremap:
+err_resource:
+       platform_set_drvdata(pdev, NULL);
+       kfree(hdq_data);
+
+err_kmalloc:
+       return ret;
+
+}
+
+static int omap_hdq_remove(struct platform_device *pdev)
+{
+       struct hdq_data *hdq_data = platform_get_drvdata(pdev);
+
+       mutex_lock(&hdq_data->hdq_mutex);
+
+       if (hdq_data->hdq_usecount) {
+               dev_dbg(&pdev->dev, "removed when use count is not zero\n");
+               return -EBUSY;
+       }
+
+       mutex_unlock(&hdq_data->hdq_mutex);
+
+       /* remove module dependency */
+       clk_put(hdq_data->hdq_ick);
+       clk_put(hdq_data->hdq_fck);
+       free_irq(INT_24XX_HDQ_IRQ, hdq_data);
+       platform_set_drvdata(pdev, NULL);
+       iounmap(hdq_data->hdq_base);
+       kfree(hdq_data);
+
+       return 0;
+}
+
+static int __init
+omap_hdq_init(void)
+{
+       return platform_driver_register(&omap_hdq_driver);
+}
+module_init(omap_hdq_init);
+
+static void __exit
+omap_hdq_exit(void)
+{
+       platform_driver_unregister(&omap_hdq_driver);
+}
+module_exit(omap_hdq_exit);
+
+module_param(w1_id, int, S_IRUSR);
+MODULE_PARM_DESC(w1_id, "1-wire id for the slave detection");
+
+MODULE_AUTHOR("Texas Instruments");
+MODULE_DESCRIPTION("HDQ driver Library");
+MODULE_LICENSE("GPL");
index 3df29a122f84c559d6ca1dcc104725028f18a9a7..8d0b1fb1e52edb6eeb57f98887e399d8a4c4b7af 100644 (file)
@@ -44,4 +44,11 @@ config W1_SLAVE_DS2760
 
          If you are unsure, say N.
 
+config W1_SLAVE_BQ27000
+       tristate "BQ27000 slave support"
+       depends on W1
+       help
+         Say Y here if you want to use a hdq
+         bq27000 slave support.
+
 endmenu
index a8eb7524df1db2c0c4db0dbe8a4097d9f65fcff6..990f400b6d22dc82563a382f6c0b7defd09820a6 100644 (file)
@@ -6,4 +6,4 @@ obj-$(CONFIG_W1_SLAVE_THERM)    += w1_therm.o
 obj-$(CONFIG_W1_SLAVE_SMEM)    += w1_smem.o
 obj-$(CONFIG_W1_SLAVE_DS2433)  += w1_ds2433.o
 obj-$(CONFIG_W1_SLAVE_DS2760)  += w1_ds2760.o
-
+obj-$(CONFIG_W1_SLAVE_BQ27000) += w1_bq27000.o
diff --git a/drivers/w1/slaves/w1_bq27000.c b/drivers/w1/slaves/w1_bq27000.c
new file mode 100644 (file)
index 0000000..8f4c91f
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+ * drivers/w1/slaves/w1_bq27000.c
+ *
+ * Copyright (C) 2007 Texas Instruments, Inc.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/device.h>
+#include <linux/types.h>
+#include <linux/platform_device.h>
+#include <linux/mutex.h>
+
+#include "../w1.h"
+#include "../w1_int.h"
+#include "../w1_family.h"
+
+#define HDQ_CMD_READ   (0)
+#define HDQ_CMD_WRITE  (1<<7)
+
+static int F_ID;
+
+void w1_bq27000_write(struct device *dev, u8 buf, u8 reg)
+{
+       struct w1_slave *sl = container_of(dev, struct w1_slave, dev);
+
+       if (!dev) {
+               pr_info("Could not obtain slave dev ptr\n");
+               return;
+       }
+
+       w1_write_8(sl->master, HDQ_CMD_WRITE | reg);
+       w1_write_8(sl->master, buf);
+}
+EXPORT_SYMBOL(w1_bq27000_write);
+
+int w1_bq27000_read(struct device *dev, u8 reg)
+{
+       u8 val;
+       struct w1_slave *sl = container_of(dev, struct w1_slave, dev);
+
+       if (!dev)
+               return 0;
+
+       w1_write_8(sl->master, HDQ_CMD_READ | reg);
+       val = w1_read_8(sl->master);
+
+       return val;
+}
+EXPORT_SYMBOL(w1_bq27000_read);
+
+static int w1_bq27000_add_slave(struct w1_slave *sl)
+{
+       int ret;
+       int id = 1;
+       struct platform_device *pdev;
+
+       pdev = platform_device_alloc("bq27000-battery", id);
+       if (!pdev) {
+               ret = -ENOMEM;
+               return ret;
+       }
+       pdev->dev.parent = &sl->dev;
+
+       ret = platform_device_add(pdev);
+       if (ret)
+               goto pdev_add_failed;
+
+       dev_set_drvdata(&sl->dev, pdev);
+
+       goto success;
+
+pdev_add_failed:
+       platform_device_unregister(pdev);
+success:
+       return ret;
+}
+
+static void w1_bq27000_remove_slave(struct w1_slave *sl)
+{
+       struct platform_device *pdev = dev_get_drvdata(&sl->dev);
+
+       platform_device_unregister(pdev);
+}
+
+static struct w1_family_ops w1_bq27000_fops = {
+       .add_slave      = w1_bq27000_add_slave,
+       .remove_slave   = w1_bq27000_remove_slave,
+};
+
+static struct w1_family w1_bq27000_family = {
+       .fid = 1,
+       .fops = &w1_bq27000_fops,
+};
+
+static int __init w1_bq27000_init(void)
+{
+       if (F_ID)
+               w1_bq27000_family.fid = F_ID;
+
+       return w1_register_family(&w1_bq27000_family);
+}
+
+static void __exit w1_bq27000_exit(void)
+{
+       w1_unregister_family(&w1_bq27000_family);
+}
+
+
+module_init(w1_bq27000_init);
+module_exit(w1_bq27000_exit);
+
+module_param(F_ID, int, S_IRUSR);
+MODULE_PARM_DESC(F_ID, "1-wire slave FID for BQ device");
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Texas Instruments Ltd");
+MODULE_DESCRIPTION("HDQ/1-wire slave driver bq27000 battery monitor chip");
index cdaa6fffbfc73c2c6bd6be3eefdd2a600ca3f82e..97304bd83ec9674105bc837a4e9ecea6ba373cfd 100644 (file)
@@ -206,6 +206,7 @@ void w1_slave_detach(struct w1_slave *sl);
 
 u8 w1_triplet(struct w1_master *dev, int bdir);
 void w1_write_8(struct w1_master *, u8);
+u8 w1_read_8(struct w1_master *);
 int w1_reset_bus(struct w1_master *);
 u8 w1_calc_crc8(u8 *, int);
 void w1_write_block(struct w1_master *, const u8 *, int);
index f4f82f1f486ebdd2c70c9ff80c5fdb4e99f03fe2..0d15b0eaf79a7b5a56eb50bb00efc1a9571280e6 100644 (file)
@@ -217,7 +217,7 @@ u8 w1_triplet(struct w1_master *dev, int bdir)
  * @param dev     the master device
  * @return        the byte read
  */
-static u8 w1_read_8(struct w1_master * dev)
+u8 w1_read_8(struct w1_master *dev)
 {
        int i;
        u8 res = 0;
@@ -230,6 +230,7 @@ static u8 w1_read_8(struct w1_master * dev)
 
        return res;
 }
+EXPORT_SYMBOL_GPL(w1_read_8);
 
 /**
  * Writes a series of bytes.
index a3765e0be4a82db9bedd1adb9175cc7cef6b08d3..763c1ea5dce54b38ce2a1da262e0a8f39a2688a3 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/bootmem.h>
 #include <linux/slab.h>
 #include <asm/desc.h>
+#include <asm/cacheflush.h>
 
 #define PCI_BIOS32_SD_VALUE            0x5F32335F      /* "_32_" */
 #define CRU_BIOS_SIGNATURE_VALUE       0x55524324
@@ -394,6 +395,8 @@ static void __devinit dmi_find_cru(const struct dmi_header *dm)
                                smbios_cru64_ptr->double_offset;
                        cru_rom_addr = ioremap(cru_physical_address,
                                smbios_cru64_ptr->double_length);
+                       set_memory_x((unsigned long)cru_rom_addr & PAGE_MASK,
+                               smbios_cru64_ptr->double_length >> PAGE_SHIFT);
                }
        }
 }
@@ -482,7 +485,7 @@ static int hpwdt_pretimeout(struct notifier_block *nb, unsigned long ulReason,
                        "Management Log for details.\n");
        }
 
-       return NOTIFY_STOP;
+       return NOTIFY_OK;
 }
 
 /*
index ca344a85eb9591e450d2aad02a0bcc9736e05e83..2474ebca88f6d816837765b667bdf7e9e4ea087f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     intel TCO vendor specific watchdog driver support
  *
- *     (c) Copyright 2006 Wim Van Sebroeck <wim@iguana.be>.
+ *     (c) Copyright 2006-2008 Wim Van Sebroeck <wim@iguana.be>.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
@@ -19,8 +19,7 @@
 
 /* Module and version information */
 #define DRV_NAME       "iTCO_vendor_support"
-#define DRV_VERSION    "1.01"
-#define DRV_RELDATE    "11-Nov-2006"
+#define DRV_VERSION    "1.02"
 #define PFX            DRV_NAME ": "
 
 /* Includes */
@@ -78,24 +77,6 @@ MODULE_PARM_DESC(vendorsupport, "iTCO vendor specific support mode, default=0 (n
  *         20.6 seconds.
  */
 
-static void supermicro_old_pre_start(unsigned long acpibase)
-{
-       unsigned long val32;
-
-       val32 = inl(SMI_EN);
-       val32 &= 0xffffdfff;    /* Turn off SMI clearing watchdog */
-       outl(val32, SMI_EN);    /* Needed to activate watchdog */
-}
-
-static void supermicro_old_pre_stop(unsigned long acpibase)
-{
-       unsigned long val32;
-
-       val32 = inl(SMI_EN);
-       val32 &= 0x00002000;    /* Turn on SMI clearing watchdog */
-       outl(val32, SMI_EN);    /* Needed to deactivate watchdog */
-}
-
 static void supermicro_old_pre_keepalive(unsigned long acpibase)
 {
        /* Reload TCO Timer (done in iTCO_wdt_keepalive) + */
@@ -247,18 +228,14 @@ static void supermicro_new_pre_set_heartbeat(unsigned int heartbeat)
 void iTCO_vendor_pre_start(unsigned long acpibase,
                           unsigned int heartbeat)
 {
-       if (vendorsupport == SUPERMICRO_OLD_BOARD)
-               supermicro_old_pre_start(acpibase);
-       else if (vendorsupport == SUPERMICRO_NEW_BOARD)
+       if (vendorsupport == SUPERMICRO_NEW_BOARD)
                supermicro_new_pre_start(heartbeat);
 }
 EXPORT_SYMBOL(iTCO_vendor_pre_start);
 
 void iTCO_vendor_pre_stop(unsigned long acpibase)
 {
-       if (vendorsupport == SUPERMICRO_OLD_BOARD)
-               supermicro_old_pre_stop(acpibase);
-       else if (vendorsupport == SUPERMICRO_NEW_BOARD)
+       if (vendorsupport == SUPERMICRO_NEW_BOARD)
                supermicro_new_pre_stop();
 }
 EXPORT_SYMBOL(iTCO_vendor_pre_stop);
index bfb93bc2ca9f50c27278fe8d29384605f8f03e26..5b395a4ddfdfec67dbd4324acbc521258977a855 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     intel TCO Watchdog Driver (Used in i82801 and i6300ESB chipsets)
  *
- *     (c) Copyright 2006-2007 Wim Van Sebroeck <wim@iguana.be>.
+ *     (c) Copyright 2006-2008 Wim Van Sebroeck <wim@iguana.be>.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
  *     82801BAM (ICH2-M)    : document number 290687-002, 298242-027,
  *     82801CA  (ICH3-S)    : document number 290733-003, 290739-013,
  *     82801CAM (ICH3-M)    : document number 290716-001, 290718-007,
- *     82801DB  (ICH4)      : document number 290744-001, 290745-020,
- *     82801DBM (ICH4-M)    : document number 252337-001, 252663-005,
+ *     82801DB  (ICH4)      : document number 290744-001, 290745-025,
+ *     82801DBM (ICH4-M)    : document number 252337-001, 252663-008,
  *     82801E   (C-ICH)     : document number 273599-001, 273645-002,
- *     82801EB  (ICH5)      : document number 252516-001, 252517-003,
- *     82801ER  (ICH5R)     : document number 252516-001, 252517-003,
- *     82801FB  (ICH6)      : document number 301473-002, 301474-007,
- *     82801FR  (ICH6R)     : document number 301473-002, 301474-007,
- *     82801FBM (ICH6-M)    : document number 301473-002, 301474-007,
- *     82801FW  (ICH6W)     : document number 301473-001, 301474-007,
- *     82801FRW (ICH6RW)    : document number 301473-001, 301474-007,
- *     82801GB  (ICH7)      : document number 307013-002, 307014-009,
- *     82801GR  (ICH7R)     : document number 307013-002, 307014-009,
- *     82801GDH (ICH7DH)    : document number 307013-002, 307014-009,
- *     82801GBM (ICH7-M)    : document number 307013-002, 307014-009,
- *     82801GHM (ICH7-M DH) : document number 307013-002, 307014-009,
- *     82801HB  (ICH8)      : document number 313056-003, 313057-009,
- *     82801HR  (ICH8R)     : document number 313056-003, 313057-009,
- *     82801HBM (ICH8M)     : document number 313056-003, 313057-009,
- *     82801HH  (ICH8DH)    : document number 313056-003, 313057-009,
- *     82801HO  (ICH8DO)    : document number 313056-003, 313057-009,
- *     82801HEM (ICH8M-E)   : document number 313056-003, 313057-009,
- *     82801IB  (ICH9)      : document number 316972-001, 316973-006,
- *     82801IR  (ICH9R)     : document number 316972-001, 316973-006,
- *     82801IH  (ICH9DH)    : document number 316972-001, 316973-006,
- *     82801IO  (ICH9DO)    : document number 316972-001, 316973-006,
- *     6300ESB  (6300ESB)   : document number 300641-003, 300884-010,
- *     631xESB  (631xESB)   : document number 313082-001, 313075-005,
- *     632xESB  (632xESB)   : document number 313082-001, 313075-005
+ *     82801EB  (ICH5)      : document number 252516-001, 252517-028,
+ *     82801ER  (ICH5R)     : document number 252516-001, 252517-028,
+ *     6300ESB  (6300ESB)   : document number 300641-004, 300884-013,
+ *     82801FB  (ICH6)      : document number 301473-002, 301474-026,
+ *     82801FR  (ICH6R)     : document number 301473-002, 301474-026,
+ *     82801FBM (ICH6-M)    : document number 301473-002, 301474-026,
+ *     82801FW  (ICH6W)     : document number 301473-001, 301474-026,
+ *     82801FRW (ICH6RW)    : document number 301473-001, 301474-026,
+ *     631xESB  (631xESB)   : document number 313082-001, 313075-006,
+ *     632xESB  (632xESB)   : document number 313082-001, 313075-006,
+ *     82801GB  (ICH7)      : document number 307013-003, 307014-024,
+ *     82801GR  (ICH7R)     : document number 307013-003, 307014-024,
+ *     82801GDH (ICH7DH)    : document number 307013-003, 307014-024,
+ *     82801GBM (ICH7-M)    : document number 307013-003, 307014-024,
+ *     82801GHM (ICH7-M DH) : document number 307013-003, 307014-024,
+ *     82801GU  (ICH7-U)    : document number 307013-003, 307014-024,
+ *     82801HB  (ICH8)      : document number 313056-003, 313057-017,
+ *     82801HR  (ICH8R)     : document number 313056-003, 313057-017,
+ *     82801HBM (ICH8M)     : document number 313056-003, 313057-017,
+ *     82801HH  (ICH8DH)    : document number 313056-003, 313057-017,
+ *     82801HO  (ICH8DO)    : document number 313056-003, 313057-017,
+ *     82801HEM (ICH8M-E)   : document number 313056-003, 313057-017,
+ *     82801IB  (ICH9)      : document number 316972-004, 316973-012,
+ *     82801IR  (ICH9R)     : document number 316972-004, 316973-012,
+ *     82801IH  (ICH9DH)    : document number 316972-004, 316973-012,
+ *     82801IO  (ICH9DO)    : document number 316972-004, 316973-012,
+ *     82801IBM (ICH9M)     : document number 316972-004, 316973-012,
+ *     82801IEM (ICH9M-E)   : document number 316972-004, 316973-012,
+ *     82801JIB (ICH10)     : document number 319973-002, 319974-002,
+ *     82801JIR (ICH10R)    : document number 319973-002, 319974-002,
+ *     82801JD  (ICH10D)    : document number 319973-002, 319974-002,
+ *     82801JDO (ICH10DO)   : document number 319973-002, 319974-002
  */
 
 /*
@@ -56,8 +63,7 @@
 
 /* Module and version information */
 #define DRV_NAME       "iTCO_wdt"
-#define DRV_VERSION    "1.03"
-#define DRV_RELDATE    "30-Apr-2008"
+#define DRV_VERSION    "1.04"
 #define PFX            DRV_NAME ": "
 
 /* Includes */
@@ -96,19 +102,26 @@ enum iTCO_chipsets {
        TCO_ICH6,       /* ICH6 & ICH6R */
        TCO_ICH6M,      /* ICH6-M */
        TCO_ICH6W,      /* ICH6W & ICH6RW */
+       TCO_631XESB,    /* 631xESB/632xESB */
        TCO_ICH7,       /* ICH7 & ICH7R */
-       TCO_ICH7M,      /* ICH7-M */
+       TCO_ICH7DH,     /* ICH7DH */
+       TCO_ICH7M,      /* ICH7-M & ICH7-U */
        TCO_ICH7MDH,    /* ICH7-M DH */
        TCO_ICH8,       /* ICH8 & ICH8R */
-       TCO_ICH8ME,     /* ICH8M-E */
        TCO_ICH8DH,     /* ICH8DH */
        TCO_ICH8DO,     /* ICH8DO */
        TCO_ICH8M,      /* ICH8M */
+       TCO_ICH8ME,     /* ICH8M-E */
        TCO_ICH9,       /* ICH9 */
        TCO_ICH9R,      /* ICH9R */
        TCO_ICH9DH,     /* ICH9DH */
        TCO_ICH9DO,     /* ICH9DO */
-       TCO_631XESB,    /* 631xESB/632xESB */
+       TCO_ICH9M,      /* ICH9M */
+       TCO_ICH9ME,     /* ICH9M-E */
+       TCO_ICH10,      /* ICH10 */
+       TCO_ICH10R,     /* ICH10R */
+       TCO_ICH10D,     /* ICH10D */
+       TCO_ICH10DO,    /* ICH10DO */
 };
 
 static struct {
@@ -129,19 +142,26 @@ static struct {
        {"ICH6 or ICH6R", 2},
        {"ICH6-M", 2},
        {"ICH6W or ICH6RW", 2},
+       {"631xESB/632xESB", 2},
        {"ICH7 or ICH7R", 2},
-       {"ICH7-M", 2},
+       {"ICH7DH", 2},
+       {"ICH7-M or ICH7-U", 2},
        {"ICH7-M DH", 2},
        {"ICH8 or ICH8R", 2},
-       {"ICH8M-E", 2},
        {"ICH8DH", 2},
        {"ICH8DO", 2},
        {"ICH8M", 2},
+       {"ICH8M-E", 2},
        {"ICH9", 2},
        {"ICH9R", 2},
        {"ICH9DH", 2},
        {"ICH9DO", 2},
-       {"631xESB/632xESB", 2},
+       {"ICH9M", 2},
+       {"ICH9M-E", 2},
+       {"ICH10", 2},
+       {"ICH10R", 2},
+       {"ICH10D", 2},
+       {"ICH10DO", 2},
        {NULL, 0}
 };
 
@@ -175,18 +195,6 @@ static struct pci_device_id iTCO_wdt_pci_tbl[] = {
        { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH6_0,           TCO_ICH6)},
        { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH6_1,           TCO_ICH6M)},
        { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH6_2,           TCO_ICH6W)},
-       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_0,           TCO_ICH7)},
-       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_1,           TCO_ICH7M)},
-       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_31,          TCO_ICH7MDH)},
-       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_0,           TCO_ICH8)},
-       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_1,           TCO_ICH8ME)},
-       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_2,           TCO_ICH8DH)},
-       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_3,           TCO_ICH8DO)},
-       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_4,           TCO_ICH8M)},
-       { ITCO_PCI_DEVICE(0x2918,                               TCO_ICH9)},
-       { ITCO_PCI_DEVICE(0x2916,                               TCO_ICH9R)},
-       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH9_2,           TCO_ICH9DH)},
-       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH9_4,           TCO_ICH9DO)},
        { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ESB2_0,           TCO_631XESB)},
        { ITCO_PCI_DEVICE(0x2671,                               TCO_631XESB)},
        { ITCO_PCI_DEVICE(0x2672,                               TCO_631XESB)},
@@ -203,6 +211,25 @@ static struct pci_device_id iTCO_wdt_pci_tbl[] = {
        { ITCO_PCI_DEVICE(0x267d,                               TCO_631XESB)},
        { ITCO_PCI_DEVICE(0x267e,                               TCO_631XESB)},
        { ITCO_PCI_DEVICE(0x267f,                               TCO_631XESB)},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_0,           TCO_ICH7)},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_30,          TCO_ICH7DH)},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_1,           TCO_ICH7M)},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_31,          TCO_ICH7MDH)},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_0,           TCO_ICH8)},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_2,           TCO_ICH8DH)},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_3,           TCO_ICH8DO)},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_4,           TCO_ICH8M)},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_1,           TCO_ICH8ME)},
+       { ITCO_PCI_DEVICE(0x2918,                               TCO_ICH9)},
+       { ITCO_PCI_DEVICE(0x2916,                               TCO_ICH9R)},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH9_2,           TCO_ICH9DH)},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH9_4,           TCO_ICH9DO)},
+       { ITCO_PCI_DEVICE(0x2919,                               TCO_ICH9M)},
+       { ITCO_PCI_DEVICE(0x2917,                               TCO_ICH9ME)},
+       { ITCO_PCI_DEVICE(0x3a18,                               TCO_ICH10)},
+       { ITCO_PCI_DEVICE(0x3a16,                               TCO_ICH10R)},
+       { ITCO_PCI_DEVICE(0x3a1a,                               TCO_ICH10D)},
+       { ITCO_PCI_DEVICE(0x3a14,                               TCO_ICH10DO)},
        { 0, },                 /* End of list */
 };
 MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl);
@@ -311,6 +338,7 @@ static int iTCO_wdt_unset_NO_REBOOT_bit(void)
 static int iTCO_wdt_start(void)
 {
        unsigned int val;
+       unsigned long val32;
 
        spin_lock(&iTCO_wdt_private.io_lock);
 
@@ -323,6 +351,18 @@ static int iTCO_wdt_start(void)
                return -EIO;
        }
 
+       /* Bit 13: TCO_EN -> 0 = Disables TCO logic generating an SMI# */
+       val32 = inl(SMI_EN);
+       val32 &= 0xffffdfff;    /* Turn off SMI clearing watchdog */
+       outl(val32, SMI_EN);
+
+       /* Force the timer to its reload value by writing to the TCO_RLD
+          register */
+       if (iTCO_wdt_private.iTCO_version == 2)
+               outw(0x01, TCO_RLD);
+       else if (iTCO_wdt_private.iTCO_version == 1)
+               outb(0x01, TCO_RLD);
+
        /* Bit 11: TCO Timer Halt -> 0 = The TCO timer is enabled to count */
        val = inw(TCO1_CNT);
        val &= 0xf7ff;
@@ -338,6 +378,7 @@ static int iTCO_wdt_start(void)
 static int iTCO_wdt_stop(void)
 {
        unsigned int val;
+       unsigned long val32;
 
        spin_lock(&iTCO_wdt_private.io_lock);
 
@@ -349,6 +390,11 @@ static int iTCO_wdt_stop(void)
        outw(val, TCO1_CNT);
        val = inw(TCO1_CNT);
 
+       /* Bit 13: TCO_EN -> 1 = Enables the TCO logic to generate SMI# */
+       val32 = inl(SMI_EN);
+       val32 |= 0x00002000;
+       outl(val32, SMI_EN);
+
        /* Set the NO_REBOOT bit to prevent later reboots, just for sure */
        iTCO_wdt_set_NO_REBOOT_bit();
 
@@ -459,7 +505,6 @@ static int iTCO_wdt_open(struct inode *inode, struct file *file)
        /*
         *      Reload and activate timer
         */
-       iTCO_wdt_keepalive();
        iTCO_wdt_start();
        return nonseekable_open(inode, file);
 }
@@ -604,7 +649,6 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,
        int ret;
        u32 base_address;
        unsigned long RCBA;
-       unsigned long val32;
 
        /*
         *      Find the ACPI/PM base I/O address which is the base
@@ -644,17 +688,13 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,
        /* Set the NO_REBOOT bit to prevent later reboots, just for sure */
        iTCO_wdt_set_NO_REBOOT_bit();
 
-       /* Set the TCO_EN bit in SMI_EN register */
+       /* The TCO logic uses the TCO_EN bit in the SMI_EN register */
        if (!request_region(SMI_EN, 4, "iTCO_wdt")) {
                printk(KERN_ERR PFX
                        "I/O address 0x%04lx already in use\n", SMI_EN);
                ret = -EIO;
                goto out;
        }
-       val32 = inl(SMI_EN);
-       val32 &= 0xffffdfff;    /* Turn off SMI clearing watchdog */
-       outl(val32, SMI_EN);
-       release_region(SMI_EN, 4);
 
        /* The TCO I/O registers reside in a 32-byte range pointed to
           by the TCOBASE value */
@@ -662,7 +702,7 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,
                printk(KERN_ERR PFX "I/O address 0x%04lx already in use\n",
                        TCOBASE);
                ret = -EIO;
-               goto out;
+               goto unreg_smi_en;
        }
 
        printk(KERN_INFO PFX
@@ -672,8 +712,9 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,
                        TCOBASE);
 
        /* Clear out the (probably old) status */
-       outb(0, TCO1_STS);
-       outb(3, TCO2_STS);
+       outb(8, TCO1_STS);      /* Clear the Time Out Status bit */
+       outb(2, TCO2_STS);      /* Clear SECOND_TO_STS bit */
+       outb(4, TCO2_STS);      /* Clear BOOT_STS bit */
 
        /* Make sure the watchdog is not running */
        iTCO_wdt_stop();
@@ -701,6 +742,8 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,
 
 unreg_region:
        release_region(TCOBASE, 0x20);
+unreg_smi_en:
+       release_region(SMI_EN, 4);
 out:
        if (iTCO_wdt_private.iTCO_version == 2)
                iounmap(iTCO_wdt_private.gcs);
@@ -718,6 +761,7 @@ static void __devexit iTCO_wdt_cleanup(void)
        /* Deregister */
        misc_deregister(&iTCO_wdt_miscdev);
        release_region(TCOBASE, 0x20);
+       release_region(SMI_EN, 4);
        if (iTCO_wdt_private.iTCO_version == 2)
                iounmap(iTCO_wdt_private.gcs);
        pci_dev_put(iTCO_wdt_private.pdev);
@@ -782,8 +826,8 @@ static int __init iTCO_wdt_init_module(void)
 {
        int err;
 
-       printk(KERN_INFO PFX "Intel TCO WatchDog Timer Driver v%s (%s)\n",
-               DRV_VERSION, DRV_RELDATE);
+       printk(KERN_INFO PFX "Intel TCO WatchDog Timer Driver v%s\n",
+               DRV_VERSION);
 
        err = platform_driver_register(&iTCO_wdt_driver);
        if (err)
index b4b7b0a4c119d47aa88675d28c7eefc8f04103a8..3acce623f20918328688b23656f197739bf5194d 100644 (file)
@@ -98,6 +98,8 @@ static void mtx1_wdt_reset(void)
 
 static void mtx1_wdt_start(void)
 {
+       unsigned long flags;
+
        spin_lock_irqsave(&mtx1_wdt_device.lock, flags);
        if (!mtx1_wdt_device.queue) {
                mtx1_wdt_device.queue = 1;
@@ -110,6 +112,8 @@ static void mtx1_wdt_start(void)
 
 static int mtx1_wdt_stop(void)
 {
+       unsigned long flags;
+
        spin_lock_irqsave(&mtx1_wdt_device.lock, flags);
        if (mtx1_wdt_device.queue) {
                mtx1_wdt_device.queue = 0;
index a0fb5eac407c78b07f54f281db70664b78f761a6..8dc7109d61b760ab6162402797b24d98cff80b88 100644 (file)
 #include <linux/list.h>
 #include <linux/sysdev.h>
 
-#include <asm/xen/hypervisor.h>
 #include <asm/page.h>
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>
 #include <asm/tlb.h>
 
+#include <asm/xen/hypervisor.h>
+#include <asm/xen/hypercall.h>
+#include <xen/interface/xen.h>
 #include <xen/interface/memory.h>
 #include <xen/xenbus.h>
 #include <xen/features.h>
@@ -122,14 +124,7 @@ static struct timer_list balloon_timer;
 static void scrub_page(struct page *page)
 {
 #ifdef CONFIG_XEN_SCRUB_PAGES
-       if (PageHighMem(page)) {
-               void *v = kmap(page);
-               clear_page(v);
-               kunmap(v);
-       } else {
-               void *v = page_address(page);
-               clear_page(v);
-       }
+       clear_highpage(page);
 #endif
 }
 
index 0707714e40d699d16032eae63fe0119c1ef3cad0..99eda169c77967ff72ca23ba25ac6026102ea18f 100644 (file)
@@ -8,7 +8,11 @@
 #include <linux/types.h>
 #include <linux/cache.h>
 #include <linux/module.h>
-#include <asm/xen/hypervisor.h>
+
+#include <asm/xen/hypercall.h>
+
+#include <xen/interface/xen.h>
+#include <xen/interface/version.h>
 #include <xen/features.h>
 
 u8 xen_features[XENFEAT_NR_SUBMAPS * 32] __read_mostly;
index 06592b9da83c454a0117d8d9bf6c86633787e3d7..7d8f531fb8e8a60a342f2fce3f2168fe5127db39 100644 (file)
@@ -40,6 +40,7 @@
 #include <xen/interface/xen.h>
 #include <xen/page.h>
 #include <xen/grant_table.h>
+#include <asm/xen/hypercall.h>
 
 #include <asm/pgtable.h>
 #include <asm/sync_bitops.h>
index 3031e3233dd625302715ff10c3e49ddc4b1aa7f7..2a983d49d19cba78984b5ae317ded774605121c1 100644 (file)
@@ -45,7 +45,7 @@ int v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid)
        struct v9fs_dentry *dent;
 
        P9_DPRINTK(P9_DEBUG_VFS, "fid %d dentry %s\n",
-                                       fid->fid, dentry->d_iname);
+                                       fid->fid, dentry->d_name.name);
 
        dent = dentry->d_fsdata;
        if (!dent) {
@@ -79,7 +79,7 @@ static struct p9_fid *v9fs_fid_find(struct dentry *dentry, u32 uid, int any)
        struct p9_fid *fid, *ret;
 
        P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p) uid %d any %d\n",
-               dentry->d_iname, dentry, uid, any);
+               dentry->d_name.name, dentry, uid, any);
        dent = (struct v9fs_dentry *) dentry->d_fsdata;
        ret = NULL;
        if (dent) {
index 24eb01087b6d63313404dff82b4f192177189342..332b5ff02fec11b8e8e43645c93ae09679ac9a61 100644 (file)
@@ -160,7 +160,7 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses)
                                v9ses->flags |= V9FS_ACCESS_ANY;
                        else {
                                v9ses->flags |= V9FS_ACCESS_SINGLE;
-                               v9ses->uid = simple_strtol(s, &e, 10);
+                               v9ses->uid = simple_strtoul(s, &e, 10);
                                if (*e != '\0')
                                        v9ses->uid = ~0;
                        }
index f9534f18df0a1a2bafdf70cd1b00466b8c5fb6b7..06dcc7c4f2343ebb9cced85a8da46c880849794f 100644 (file)
@@ -52,7 +52,8 @@
 
 static int v9fs_dentry_delete(struct dentry *dentry)
 {
-       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry);
+       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
+                                                                       dentry);
 
        return 1;
 }
@@ -69,7 +70,8 @@ static int v9fs_dentry_delete(struct dentry *dentry)
 static int v9fs_cached_dentry_delete(struct dentry *dentry)
 {
        struct inode *inode = dentry->d_inode;
-       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry);
+       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
+                                                                       dentry);
 
        if(!inode)
                return 1;
@@ -88,7 +90,8 @@ void v9fs_dentry_release(struct dentry *dentry)
        struct v9fs_dentry *dent;
        struct p9_fid *temp, *current_fid;
 
-       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry);
+       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
+                                                                       dentry);
        dent = dentry->d_fsdata;
        if (dent) {
                list_for_each_entry_safe(current_fid, temp, &dent->fidlist,
index 8314d3f43b716f41560e4517d42eaade5cfc1459..2dfcf5487efebff886a9f42c23733875d4264608 100644 (file)
@@ -963,7 +963,8 @@ static int v9fs_vfs_readlink(struct dentry *dentry, char __user * buffer,
        if (buflen > PATH_MAX)
                buflen = PATH_MAX;
 
-       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry);
+       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
+                                                                       dentry);
 
        retval = v9fs_readlink(dentry, link, buflen);
 
@@ -1022,7 +1023,8 @@ v9fs_vfs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
 {
        char *s = nd_get_link(nd);
 
-       P9_DPRINTK(P9_DEBUG_VFS, " %s %s\n", dentry->d_name.name, s);
+       P9_DPRINTK(P9_DEBUG_VFS, " %s %s\n", dentry->d_name.name,
+               IS_ERR(s) ? "<error>" : s);
        if (!IS_ERR(s))
                __putname(s);
 }
index db831efbdbbdcc0d2b1298af4e3055916357fee2..99e0ae1a4c789fff59aae0e32207755e38fa7e41 100644 (file)
@@ -1135,12 +1135,15 @@ static int blkdev_open(struct inode * inode, struct file * filp)
        if (res)
                return res;
 
-       if (!(filp->f_mode & FMODE_EXCL))
-               return 0;
+       if (filp->f_mode & FMODE_EXCL) {
+               res = bd_claim(bdev, filp);
+               if (res)
+                       goto out_blkdev_put;
+       }
 
-       if (!(res = bd_claim(bdev, filp)))
-               return 0;
+       return 0;
 
+ out_blkdev_put:
        blkdev_put(bdev, filp->f_mode);
        return res;
 }
@@ -1203,8 +1206,16 @@ static long block_ioctl(struct file *file, unsigned cmd, unsigned long arg)
 {
        struct block_device *bdev = I_BDEV(file->f_mapping->host);
        fmode_t mode = file->f_mode;
+
+       /*
+        * O_NDELAY can be altered using fcntl(.., F_SETFL, ..), so we have
+        * to updated it before every ioctl.
+        */
        if (file->f_flags & O_NDELAY)
-               mode |= FMODE_NDELAY_NOW;
+               mode |= FMODE_NDELAY;
+       else
+               mode &= ~FMODE_NDELAY;
+
        return blkdev_ioctl(bdev, mode, cmd, arg);
 }
 
index 6569fda5cfed892c7e4ed53daa2e9677e60c36d5..10179cfa11528683495886657bd643ebde590ce8 100644 (file)
@@ -878,6 +878,7 @@ void invalidate_inode_buffers(struct inode *inode)
                spin_unlock(&buffer_mapping->private_lock);
        }
 }
+EXPORT_SYMBOL(invalidate_inode_buffers);
 
 /*
  * Remove any clean buffers from the inode's buffer list.  This is called
index 8855331b2fba551984776b30b1747b80a98607f1..e078b7aea1431d648b9b6dd6df5313b0b2cc738a 100644 (file)
@@ -8,7 +8,11 @@ handling fcntl(F_SETLEASE).  Convert cifs to using blocking tcp
 sends, and also let tcp autotune the socket send and receive buffers.
 This reduces the number of EAGAIN errors returned by TCP/IP in
 high stress workloads (and the number of retries on socket writes
-when sending large SMBWriteX requests).
+when sending large SMBWriteX requests).  Fix case in which a portion of
+data can in some cases not get written to the file on the server before the
+file is closed.  Fix DFS parsing to properly handle path consumed field,
+and to handle certain codepage conversions better.  Fix mount and
+umount race that can cause oops in mount or umount or reconnect.
 
 Version 1.54
 ------------
index 69a12aae91d313e832ae3e2002d3bdfc7732ecc6..490e34bbf27a66641c0bad3327e5bb22156a88af 100644 (file)
@@ -107,12 +107,13 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
 #ifdef CONFIG_PROC_FS
 static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
 {
-       struct list_head *tmp;
-       struct list_head *tmp1;
+       struct list_head *tmp1, *tmp2, *tmp3;
        struct mid_q_entry *mid_entry;
+       struct TCP_Server_Info *server;
        struct cifsSesInfo *ses;
        struct cifsTconInfo *tcon;
-       int i;
+       int i, j;
+       __u32 dev_type;
 
        seq_puts(m,
                    "Display Internal CIFS Data Structures for Debugging\n"
@@ -122,46 +123,78 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
        seq_printf(m, "Servers:");
 
        i = 0;
-       read_lock(&GlobalSMBSeslock);
-       list_for_each(tmp, &GlobalSMBSessionList) {
+       read_lock(&cifs_tcp_ses_lock);
+       list_for_each(tmp1, &cifs_tcp_ses_list) {
+               server = list_entry(tmp1, struct TCP_Server_Info,
+                                   tcp_ses_list);
                i++;
-               ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList);
-               if ((ses->serverDomain == NULL) || (ses->serverOS == NULL) ||
-                  (ses->serverNOS == NULL)) {
-                       seq_printf(m, "\nentry for %s not fully "
-                                       "displayed\n\t", ses->serverName);
-               } else {
-                       seq_printf(m,
-                                   "\n%d) Name: %s  Domain: %s Mounts: %d OS:"
-                                   " %s  \n\tNOS: %s\tCapability: 0x%x\n\tSMB"
+               list_for_each(tmp2, &server->smb_ses_list) {
+                       ses = list_entry(tmp2, struct cifsSesInfo,
+                                        smb_ses_list);
+                       if ((ses->serverDomain == NULL) ||
+                               (ses->serverOS == NULL) ||
+                               (ses->serverNOS == NULL)) {
+                               seq_printf(m, "\n%d) entry for %s not fully "
+                                          "displayed\n\t", i, ses->serverName);
+                       } else {
+                               seq_printf(m,
+                                   "\n%d) Name: %s  Domain: %s Uses: %d OS:"
+                                   " %s\n\tNOS: %s\tCapability: 0x%x\n\tSMB"
                                    " session status: %d\t",
                                i, ses->serverName, ses->serverDomain,
-                               atomic_read(&ses->inUse),
-                               ses->serverOS, ses->serverNOS,
+                               ses->ses_count, ses->serverOS, ses->serverNOS,
                                ses->capabilities, ses->status);
-               }
-               if (ses->server) {
+                       }
                        seq_printf(m, "TCP status: %d\n\tLocal Users To "
-                                   "Server: %d SecMode: 0x%x Req On Wire: %d",
-                               ses->server->tcpStatus,
-                               atomic_read(&ses->server->socketUseCount),
-                               ses->server->secMode,
-                               atomic_read(&ses->server->inFlight));
+                                  "Server: %d SecMode: 0x%x Req On Wire: %d",
+                                  server->tcpStatus, server->srv_count,
+                                  server->secMode,
+                                  atomic_read(&server->inFlight));
 
 #ifdef CONFIG_CIFS_STATS2
                        seq_printf(m, " In Send: %d In MaxReq Wait: %d",
-                               atomic_read(&ses->server->inSend),
-                               atomic_read(&ses->server->num_waiters));
+                               atomic_read(&server->inSend),
+                               atomic_read(&server->num_waiters));
 #endif
 
-                       seq_puts(m, "\nMIDs:\n");
+                       seq_puts(m, "\n\tShares:");
+                       j = 0;
+                       list_for_each(tmp3, &ses->tcon_list) {
+                               tcon = list_entry(tmp3, struct cifsTconInfo,
+                                                 tcon_list);
+                               ++j;
+                               dev_type = le32_to_cpu(tcon->fsDevInfo.DeviceType);
+                               seq_printf(m, "\n\t%d) %s Mounts: %d ", j,
+                                          tcon->treeName, tcon->tc_count);
+                               if (tcon->nativeFileSystem) {
+                                       seq_printf(m, "Type: %s ",
+                                                  tcon->nativeFileSystem);
+                               }
+                               seq_printf(m, "DevInfo: 0x%x Attributes: 0x%x"
+                                       "\nPathComponentMax: %d Status: 0x%d",
+                                       le32_to_cpu(tcon->fsDevInfo.DeviceCharacteristics),
+                                       le32_to_cpu(tcon->fsAttrInfo.Attributes),
+                                       le32_to_cpu(tcon->fsAttrInfo.MaxPathNameComponentLength),
+                                       tcon->tidStatus);
+                               if (dev_type == FILE_DEVICE_DISK)
+                                       seq_puts(m, " type: DISK ");
+                               else if (dev_type == FILE_DEVICE_CD_ROM)
+                                       seq_puts(m, " type: CDROM ");
+                               else
+                                       seq_printf(m, " type: %d ", dev_type);
+
+                               if (tcon->need_reconnect)
+                                       seq_puts(m, "\tDISCONNECTED ");
+                               seq_putc(m, '\n');
+                       }
+
+                       seq_puts(m, "\n\tMIDs:\n");
 
                        spin_lock(&GlobalMid_Lock);
-                       list_for_each(tmp1, &ses->server->pending_mid_q) {
-                               mid_entry = list_entry(tmp1, struct
-                                       mid_q_entry,
+                       list_for_each(tmp3, &server->pending_mid_q) {
+                               mid_entry = list_entry(tmp3, struct mid_q_entry,
                                        qhead);
-                               seq_printf(m, "State: %d com: %d pid:"
+                               seq_printf(m, "\tState: %d com: %d pid:"
                                                " %d tsk: %p mid %d\n",
                                                mid_entry->midState,
                                                (int)mid_entry->command,
@@ -171,44 +204,8 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
                        }
                        spin_unlock(&GlobalMid_Lock);
                }
-
-       }
-       read_unlock(&GlobalSMBSeslock);
-       seq_putc(m, '\n');
-
-       seq_puts(m, "Shares:");
-
-       i = 0;
-       read_lock(&GlobalSMBSeslock);
-       list_for_each(tmp, &GlobalTreeConnectionList) {
-               __u32 dev_type;
-               i++;
-               tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
-               dev_type = le32_to_cpu(tcon->fsDevInfo.DeviceType);
-               seq_printf(m, "\n%d) %s Uses: %d ", i,
-                                tcon->treeName, atomic_read(&tcon->useCount));
-               if (tcon->nativeFileSystem) {
-                       seq_printf(m, "Type: %s ",
-                                        tcon->nativeFileSystem);
-               }
-               seq_printf(m, "DevInfo: 0x%x Attributes: 0x%x"
-                                "\nPathComponentMax: %d Status: %d",
-                           le32_to_cpu(tcon->fsDevInfo.DeviceCharacteristics),
-                           le32_to_cpu(tcon->fsAttrInfo.Attributes),
-                           le32_to_cpu(tcon->fsAttrInfo.MaxPathNameComponentLength),
-                           tcon->tidStatus);
-               if (dev_type == FILE_DEVICE_DISK)
-                       seq_puts(m, " type: DISK ");
-               else if (dev_type == FILE_DEVICE_CD_ROM)
-                       seq_puts(m, " type: CDROM ");
-               else
-                       seq_printf(m, " type: %d ", dev_type);
-
-               if (tcon->tidStatus == CifsNeedReconnect)
-                       seq_puts(m, "\tDISCONNECTED ");
        }
-       read_unlock(&GlobalSMBSeslock);
-
+       read_unlock(&cifs_tcp_ses_lock);
        seq_putc(m, '\n');
 
        /* BB add code to dump additional info such as TCP session info now */
@@ -234,7 +231,9 @@ static ssize_t cifs_stats_proc_write(struct file *file,
 {
        char c;
        int rc;
-       struct list_head *tmp;
+       struct list_head *tmp1, *tmp2, *tmp3;
+       struct TCP_Server_Info *server;
+       struct cifsSesInfo *ses;
        struct cifsTconInfo *tcon;
 
        rc = get_user(c, buffer);
@@ -242,33 +241,42 @@ static ssize_t cifs_stats_proc_write(struct file *file,
                return rc;
 
        if (c == '1' || c == 'y' || c == 'Y' || c == '0') {
-               read_lock(&GlobalSMBSeslock);
 #ifdef CONFIG_CIFS_STATS2
                atomic_set(&totBufAllocCount, 0);
                atomic_set(&totSmBufAllocCount, 0);
 #endif /* CONFIG_CIFS_STATS2 */
-               list_for_each(tmp, &GlobalTreeConnectionList) {
-                       tcon = list_entry(tmp, struct cifsTconInfo,
-                                       cifsConnectionList);
-                       atomic_set(&tcon->num_smbs_sent, 0);
-                       atomic_set(&tcon->num_writes, 0);
-                       atomic_set(&tcon->num_reads, 0);
-                       atomic_set(&tcon->num_oplock_brks, 0);
-                       atomic_set(&tcon->num_opens, 0);
-                       atomic_set(&tcon->num_closes, 0);
-                       atomic_set(&tcon->num_deletes, 0);
-                       atomic_set(&tcon->num_mkdirs, 0);
-                       atomic_set(&tcon->num_rmdirs, 0);
-                       atomic_set(&tcon->num_renames, 0);
-                       atomic_set(&tcon->num_t2renames, 0);
-                       atomic_set(&tcon->num_ffirst, 0);
-                       atomic_set(&tcon->num_fnext, 0);
-                       atomic_set(&tcon->num_fclose, 0);
-                       atomic_set(&tcon->num_hardlinks, 0);
-                       atomic_set(&tcon->num_symlinks, 0);
-                       atomic_set(&tcon->num_locks, 0);
+               read_lock(&cifs_tcp_ses_lock);
+               list_for_each(tmp1, &cifs_tcp_ses_list) {
+                       server = list_entry(tmp1, struct TCP_Server_Info,
+                                           tcp_ses_list);
+                       list_for_each(tmp2, &server->smb_ses_list) {
+                               ses = list_entry(tmp2, struct cifsSesInfo,
+                                                smb_ses_list);
+                               list_for_each(tmp3, &ses->tcon_list) {
+                                       tcon = list_entry(tmp3,
+                                                         struct cifsTconInfo,
+                                                         tcon_list);
+                                       atomic_set(&tcon->num_smbs_sent, 0);
+                                       atomic_set(&tcon->num_writes, 0);
+                                       atomic_set(&tcon->num_reads, 0);
+                                       atomic_set(&tcon->num_oplock_brks, 0);
+                                       atomic_set(&tcon->num_opens, 0);
+                                       atomic_set(&tcon->num_closes, 0);
+                                       atomic_set(&tcon->num_deletes, 0);
+                                       atomic_set(&tcon->num_mkdirs, 0);
+                                       atomic_set(&tcon->num_rmdirs, 0);
+                                       atomic_set(&tcon->num_renames, 0);
+                                       atomic_set(&tcon->num_t2renames, 0);
+                                       atomic_set(&tcon->num_ffirst, 0);
+                                       atomic_set(&tcon->num_fnext, 0);
+                                       atomic_set(&tcon->num_fclose, 0);
+                                       atomic_set(&tcon->num_hardlinks, 0);
+                                       atomic_set(&tcon->num_symlinks, 0);
+                                       atomic_set(&tcon->num_locks, 0);
+                               }
+                       }
                }
-               read_unlock(&GlobalSMBSeslock);
+               read_unlock(&cifs_tcp_ses_lock);
        }
 
        return count;
@@ -277,7 +285,9 @@ static ssize_t cifs_stats_proc_write(struct file *file,
 static int cifs_stats_proc_show(struct seq_file *m, void *v)
 {
        int i;
-       struct list_head *tmp;
+       struct list_head *tmp1, *tmp2, *tmp3;
+       struct TCP_Server_Info *server;
+       struct cifsSesInfo *ses;
        struct cifsTconInfo *tcon;
 
        seq_printf(m,
@@ -306,44 +316,55 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
                GlobalCurrentXid, GlobalMaxActiveXid);
 
        i = 0;
-       read_lock(&GlobalSMBSeslock);
-       list_for_each(tmp, &GlobalTreeConnectionList) {
-               i++;
-               tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
-               seq_printf(m, "\n%d) %s", i, tcon->treeName);
-               if (tcon->tidStatus == CifsNeedReconnect)
-                       seq_puts(m, "\tDISCONNECTED ");
-               seq_printf(m, "\nSMBs: %d Oplock Breaks: %d",
-                       atomic_read(&tcon->num_smbs_sent),
-                       atomic_read(&tcon->num_oplock_brks));
-               seq_printf(m, "\nReads:  %d Bytes: %lld",
-                       atomic_read(&tcon->num_reads),
-                       (long long)(tcon->bytes_read));
-               seq_printf(m, "\nWrites: %d Bytes: %lld",
-                       atomic_read(&tcon->num_writes),
-                       (long long)(tcon->bytes_written));
-               seq_printf(m,
-                       "\nLocks: %d HardLinks: %d Symlinks: %d",
-                       atomic_read(&tcon->num_locks),
-                       atomic_read(&tcon->num_hardlinks),
-                       atomic_read(&tcon->num_symlinks));
-
-               seq_printf(m, "\nOpens: %d Closes: %d Deletes: %d",
-                       atomic_read(&tcon->num_opens),
-                       atomic_read(&tcon->num_closes),
-                       atomic_read(&tcon->num_deletes));
-               seq_printf(m, "\nMkdirs: %d Rmdirs: %d",
-                       atomic_read(&tcon->num_mkdirs),
-                       atomic_read(&tcon->num_rmdirs));
-               seq_printf(m, "\nRenames: %d T2 Renames %d",
-                       atomic_read(&tcon->num_renames),
-                       atomic_read(&tcon->num_t2renames));
-               seq_printf(m, "\nFindFirst: %d FNext %d FClose %d",
-                       atomic_read(&tcon->num_ffirst),
-                       atomic_read(&tcon->num_fnext),
-                       atomic_read(&tcon->num_fclose));
+       read_lock(&cifs_tcp_ses_lock);
+       list_for_each(tmp1, &cifs_tcp_ses_list) {
+               server = list_entry(tmp1, struct TCP_Server_Info,
+                                   tcp_ses_list);
+               list_for_each(tmp2, &server->smb_ses_list) {
+                       ses = list_entry(tmp2, struct cifsSesInfo,
+                                        smb_ses_list);
+                       list_for_each(tmp3, &ses->tcon_list) {
+                               tcon = list_entry(tmp3,
+                                                 struct cifsTconInfo,
+                                                 tcon_list);
+                               i++;
+                               seq_printf(m, "\n%d) %s", i, tcon->treeName);
+                               if (tcon->need_reconnect)
+                                       seq_puts(m, "\tDISCONNECTED ");
+                               seq_printf(m, "\nSMBs: %d Oplock Breaks: %d",
+                                       atomic_read(&tcon->num_smbs_sent),
+                                       atomic_read(&tcon->num_oplock_brks));
+                               seq_printf(m, "\nReads:  %d Bytes: %lld",
+                                       atomic_read(&tcon->num_reads),
+                                       (long long)(tcon->bytes_read));
+                               seq_printf(m, "\nWrites: %d Bytes: %lld",
+                                       atomic_read(&tcon->num_writes),
+                                       (long long)(tcon->bytes_written));
+                               seq_printf(m, "\nLocks: %d HardLinks: %d "
+                                             "Symlinks: %d",
+                                       atomic_read(&tcon->num_locks),
+                                       atomic_read(&tcon->num_hardlinks),
+                                       atomic_read(&tcon->num_symlinks));
+                               seq_printf(m, "\nOpens: %d Closes: %d"
+                                             "Deletes: %d",
+                                       atomic_read(&tcon->num_opens),
+                                       atomic_read(&tcon->num_closes),
+                                       atomic_read(&tcon->num_deletes));
+                               seq_printf(m, "\nMkdirs: %d Rmdirs: %d",
+                                       atomic_read(&tcon->num_mkdirs),
+                                       atomic_read(&tcon->num_rmdirs));
+                               seq_printf(m, "\nRenames: %d T2 Renames %d",
+                                       atomic_read(&tcon->num_renames),
+                                       atomic_read(&tcon->num_t2renames));
+                               seq_printf(m, "\nFindFirst: %d FNext %d "
+                                             "FClose %d",
+                                       atomic_read(&tcon->num_ffirst),
+                                       atomic_read(&tcon->num_fnext),
+                                       atomic_read(&tcon->num_fclose));
+                       }
+               }
        }
-       read_unlock(&GlobalSMBSeslock);
+       read_unlock(&cifs_tcp_ses_lock);
 
        seq_putc(m, '\n');
        return 0;
index d2c8eef84f3c7c805d8a484115ae090bc56e8920..e1c18362ba466c973999e0076887edc51f7c515b 100644 (file)
@@ -106,7 +106,8 @@ static char *cifs_get_share_name(const char *node_name)
 /**
  * compose_mount_options       -       creates mount options for refferral
  * @sb_mountdata:      parent/root DFS mount options (template)
- * @ref_unc:           refferral server UNC
+ * @dentry:            point where we are going to mount
+ * @ref:               server's referral
  * @devname:           pointer for saving device name
  *
  * creates mount options for submount based on template options sb_mountdata
@@ -116,7 +117,8 @@ static char *cifs_get_share_name(const char *node_name)
  * Caller is responcible for freeing retunrned value if it is not error.
  */
 static char *compose_mount_options(const char *sb_mountdata,
-                                  const char *ref_unc,
+                                  struct dentry *dentry,
+                                  const struct dfs_info3_param *ref,
                                   char **devname)
 {
        int rc;
@@ -126,11 +128,12 @@ static char *compose_mount_options(const char *sb_mountdata,
        char *srvIP = NULL;
        char sep = ',';
        int off, noff;
+       char *fullpath;
 
        if (sb_mountdata == NULL)
                return ERR_PTR(-EINVAL);
 
-       *devname = cifs_get_share_name(ref_unc);
+       *devname = cifs_get_share_name(ref->node_name);
        rc = dns_resolve_server_name_to_ip(*devname, &srvIP);
        if (rc != 0) {
                cERROR(1, ("%s: Failed to resolve server part of %s to IP",
@@ -138,7 +141,12 @@ static char *compose_mount_options(const char *sb_mountdata,
                mountdata = ERR_PTR(rc);
                goto compose_mount_options_out;
        }
-       md_len = strlen(sb_mountdata) + strlen(srvIP) + strlen(ref_unc) + 3;
+       /* md_len = strlen(...) + 12 for 'sep+prefixpath='
+        * assuming that we have 'unc=' and 'ip=' in
+        * the original sb_mountdata
+        */
+       md_len = strlen(sb_mountdata) + strlen(srvIP) +
+               strlen(ref->node_name) + 12;
        mountdata = kzalloc(md_len+1, GFP_KERNEL);
        if (mountdata == NULL) {
                mountdata = ERR_PTR(-ENOMEM);
@@ -152,41 +160,56 @@ static char *compose_mount_options(const char *sb_mountdata,
                        strncpy(mountdata, sb_mountdata, 5);
                        off += 5;
        }
-       while ((tkn_e = strchr(sb_mountdata+off, sep))) {
-               noff = (tkn_e - (sb_mountdata+off)) + 1;
-               if (strnicmp(sb_mountdata+off, "unc=", 4) == 0) {
+
+       do {
+               tkn_e = strchr(sb_mountdata + off, sep);
+               if (tkn_e == NULL)
+                       noff = strlen(sb_mountdata + off);
+               else
+                       noff = tkn_e - (sb_mountdata + off) + 1;
+
+               if (strnicmp(sb_mountdata + off, "unc=", 4) == 0) {
                        off += noff;
                        continue;
                }
-               if (strnicmp(sb_mountdata+off, "ip=", 3) == 0) {
+               if (strnicmp(sb_mountdata + off, "ip=", 3) == 0) {
                        off += noff;
                        continue;
                }
-               if (strnicmp(sb_mountdata+off, "prefixpath=", 3) == 0) {
+               if (strnicmp(sb_mountdata + off, "prefixpath=", 11) == 0) {
                        off += noff;
                        continue;
                }
-               strncat(mountdata, sb_mountdata+off, noff);
+               strncat(mountdata, sb_mountdata + off, noff);
                off += noff;
-       }
-       strcat(mountdata, sb_mountdata+off);
+       } while (tkn_e);
+       strcat(mountdata, sb_mountdata + off);
        mountdata[md_len] = '\0';
 
        /* copy new IP and ref share name */
-       strcat(mountdata, ",ip=");
+       if (mountdata[strlen(mountdata) - 1] != sep)
+               strncat(mountdata, &sep, 1);
+       strcat(mountdata, "ip=");
        strcat(mountdata, srvIP);
-       strcat(mountdata, ",unc=");
+       strncat(mountdata, &sep, 1);
+       strcat(mountdata, "unc=");
        strcat(mountdata, *devname);
 
        /* find & copy prefixpath */
-       tkn_e = strchr(ref_unc+2, '\\');
-       if (tkn_e) {
-               tkn_e = strchr(tkn_e+1, '\\');
-               if (tkn_e) {
-                       strcat(mountdata, ",prefixpath=");
-                       strcat(mountdata, tkn_e+1);
-               }
+       tkn_e = strchr(ref->node_name + 2, '\\');
+       if (tkn_e == NULL) /* invalid unc, missing share name*/
+               goto compose_mount_options_out;
+
+       fullpath = build_path_from_dentry(dentry);
+       tkn_e = strchr(tkn_e + 1, '\\');
+       if (tkn_e || strlen(fullpath) - (ref->path_consumed)) {
+               strncat(mountdata, &sep, 1);
+               strcat(mountdata, "prefixpath=");
+               if (tkn_e)
+                       strcat(mountdata, tkn_e + 1);
+               strcat(mountdata, fullpath + (ref->path_consumed));
        }
+       kfree(fullpath);
 
        /*cFYI(1,("%s: parent mountdata: %s", __func__,sb_mountdata));*/
        /*cFYI(1, ("%s: submount mountdata: %s", __func__, mountdata ));*/
@@ -198,7 +221,7 @@ compose_mount_options_out:
 
 
 static struct vfsmount *cifs_dfs_do_refmount(const struct vfsmount *mnt_parent,
-               struct dentry *dentry, char *ref_unc)
+               struct dentry *dentry, const struct dfs_info3_param *ref)
 {
        struct cifs_sb_info *cifs_sb;
        struct vfsmount *mnt;
@@ -207,7 +230,7 @@ static struct vfsmount *cifs_dfs_do_refmount(const struct vfsmount *mnt_parent,
 
        cifs_sb = CIFS_SB(dentry->d_inode->i_sb);
        mountdata = compose_mount_options(cifs_sb->mountdata,
-                                               ref_unc, &devname);
+                                               dentry, ref, &devname);
 
        if (IS_ERR(mountdata))
                return (struct vfsmount *)mountdata;
@@ -310,7 +333,7 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
                        }
                        mnt = cifs_dfs_do_refmount(nd->path.mnt,
                                                nd->path.dentry,
-                                               referrals[i].node_name);
+                                               referrals + i);
                        cFYI(1, ("%s: cifs_dfs_do_refmount:%s , mnt:%p",
                                         __func__,
                                        referrals[i].node_name, mnt));
index fcee9298b6206ab9db2e597c47139db8dd7c8661..0ab2fb5afef12a78a9ae2fdd0e79af761133468b 100644 (file)
@@ -73,8 +73,8 @@ struct key_type cifs_spnego_key_type = {
  * strlen(";sec=ntlmsspi") */
 #define MAX_MECH_STR_LEN       13
 
-/* max possible addr len eg FEDC:BA98:7654:3210:FEDC:BA98:7654:3210/60 */
-#define MAX_IPV6_ADDR_LEN      42
+/* max possible addr len eg FEDC:BA98:7654:3210:FEDC:BA98:7654:3210/128 */
+#define MAX_IPV6_ADDR_LEN      43
 
 /* strlen of "host=" */
 #define HOST_KEY_LEN           5
index ac5915d61dca768d4f71d689c5948712e2bf012f..d9cf467309e8cdc1449a7ca287c80452093de23c 100644 (file)
@@ -514,10 +514,11 @@ static void cifs_umount_begin(struct super_block *sb)
        tcon = cifs_sb->tcon;
        if (tcon == NULL)
                return;
-       down(&tcon->tconSem);
-       if (atomic_read(&tcon->useCount) == 1)
+
+       read_lock(&cifs_tcp_ses_lock);
+       if (tcon->tc_count == 1)
                tcon->tidStatus = CifsExiting;
-       up(&tcon->tconSem);
+       read_unlock(&cifs_tcp_ses_lock);
 
        /* cancel_brl_requests(tcon); */ /* BB mark all brl mids as exiting */
        /* cancel_notify_requests(tcon); */
@@ -1013,7 +1014,7 @@ static int cifs_oplock_thread(void *dummyarg)
                                not bother sending an oplock release if session
                                to server still is disconnected since oplock
                                already released by the server in that case */
-                       if (pTcon->tidStatus != CifsNeedReconnect) {
+                       if (!pTcon->need_reconnect) {
                                rc = CIFSSMBLock(0, pTcon, netfid,
                                                0 /* len */ , 0 /* offset */, 0,
                                                0, LOCKING_ANDX_OPLOCK_RELEASE,
@@ -1031,24 +1032,24 @@ static int cifs_oplock_thread(void *dummyarg)
 static int cifs_dnotify_thread(void *dummyarg)
 {
        struct list_head *tmp;
-       struct cifsSesInfo *ses;
+       struct TCP_Server_Info *server;
 
        do {
                if (try_to_freeze())
                        continue;
                set_current_state(TASK_INTERRUPTIBLE);
                schedule_timeout(15*HZ);
-               read_lock(&GlobalSMBSeslock);
                /* check if any stuck requests that need
                   to be woken up and wakeq so the
                   thread can wake up and error out */
-               list_for_each(tmp, &GlobalSMBSessionList) {
-                       ses = list_entry(tmp, struct cifsSesInfo,
-                               cifsSessionList);
-                       if (ses->server && atomic_read(&ses->server->inFlight))
-                               wake_up_all(&ses->server->response_q);
+               read_lock(&cifs_tcp_ses_lock);
+               list_for_each(tmp, &cifs_tcp_ses_list) {
+                       server = list_entry(tmp, struct TCP_Server_Info,
+                                        tcp_ses_list);
+                       if (atomic_read(&server->inFlight))
+                               wake_up_all(&server->response_q);
                }
-               read_unlock(&GlobalSMBSeslock);
+               read_unlock(&cifs_tcp_ses_lock);
        } while (!kthread_should_stop());
 
        return 0;
@@ -1059,9 +1060,7 @@ init_cifs(void)
 {
        int rc = 0;
        cifs_proc_init();
-/*     INIT_LIST_HEAD(&GlobalServerList);*/    /* BB not implemented yet */
-       INIT_LIST_HEAD(&GlobalSMBSessionList);
-       INIT_LIST_HEAD(&GlobalTreeConnectionList);
+       INIT_LIST_HEAD(&cifs_tcp_ses_list);
        INIT_LIST_HEAD(&GlobalOplock_Q);
 #ifdef CONFIG_CIFS_EXPERIMENTAL
        INIT_LIST_HEAD(&GlobalDnotifyReqList);
@@ -1089,6 +1088,7 @@ init_cifs(void)
        GlobalMaxActiveXid = 0;
        memset(Local_System_Name, 0, 15);
        rwlock_init(&GlobalSMBSeslock);
+       rwlock_init(&cifs_tcp_ses_lock);
        spin_lock_init(&GlobalMid_Lock);
 
        if (cifs_max_pending < 2) {
index 1cb1189f24e0e3417751d91838bf29e0968e5dea..c57c0565547fa99058e9a192796123a419309066 100644 (file)
@@ -85,8 +85,7 @@ enum securityEnum {
 };
 
 enum protocolEnum {
-       IPV4 = 0,
-       IPV6,
+       TCP = 0,
        SCTP
        /* Netbios frames protocol not supported at this time */
 };
@@ -122,6 +121,9 @@ struct cifs_cred {
  */
 
 struct TCP_Server_Info {
+       struct list_head tcp_ses_list;
+       struct list_head smb_ses_list;
+       int srv_count; /* reference counter */
        /* 15 character server name + 0x20 16th byte indicating type = srv */
        char server_RFC1001_name[SERVER_NAME_LEN_WITH_NULL];
        char unicode_server_Name[SERVER_NAME_LEN_WITH_NULL * 2];
@@ -143,7 +145,6 @@ struct TCP_Server_Info {
        bool svlocal:1;                 /* local server or remote */
        bool noblocksnd;                /* use blocking sendmsg */
        bool noautotune;                /* do not autotune send buf sizes */
-       atomic_t socketUseCount; /* number of open cifs sessions on socket */
        atomic_t inFlight;  /* number of requests on the wire to server */
 #ifdef CONFIG_CIFS_STATS2
        atomic_t inSend; /* requests trying to send */
@@ -194,13 +195,14 @@ struct cifsUidInfo {
  * Session structure.  One of these for each uid session with a particular host
  */
 struct cifsSesInfo {
-       struct list_head cifsSessionList;
+       struct list_head smb_ses_list;
+       struct list_head tcon_list;
        struct semaphore sesSem;
 #if 0
        struct cifsUidInfo *uidInfo;    /* pointer to user info */
 #endif
        struct TCP_Server_Info *server; /* pointer to server info */
-       atomic_t inUse; /* # of mounts (tree connections) on this ses */
+       int ses_count;          /* reference counter */
        enum statusEnum status;
        unsigned overrideSecFlg;  /* if non-zero override global sec flags */
        __u16 ipc_tid;          /* special tid for connection to IPC share */
@@ -216,6 +218,7 @@ struct cifsSesInfo {
        char userName[MAX_USERNAME_SIZE + 1];
        char *domainName;
        char *password;
+       bool need_reconnect:1; /* connection reset, uid now invalid */
 };
 /* no more than one of the following three session flags may be set */
 #define CIFS_SES_NT4 1
@@ -230,16 +233,15 @@ struct cifsSesInfo {
  * session
  */
 struct cifsTconInfo {
-       struct list_head cifsConnectionList;
+       struct list_head tcon_list;
+       int tc_count;
        struct list_head openFileList;
-       struct semaphore tconSem;
        struct cifsSesInfo *ses;        /* pointer to session associated with */
        char treeName[MAX_TREE_SIZE + 1]; /* UNC name of resource in ASCII */
        char *nativeFileSystem;
        __u16 tid;              /* The 2 byte tree id */
        __u16 Flags;            /* optional support bits */
        enum statusEnum tidStatus;
-       atomic_t useCount;      /* how many explicit/implicit mounts to share */
 #ifdef CONFIG_CIFS_STATS
        atomic_t num_smbs_sent;
        atomic_t num_writes;
@@ -288,6 +290,7 @@ struct cifsTconInfo {
        bool unix_ext:1;  /* if false disable Linux extensions to CIFS protocol
                                for this mount even if server would support */
        bool local_lease:1; /* check leases (only) on local system not remote */
+       bool need_reconnect:1; /* connection reset, tid now invalid */
        /* BB add field for back pointer to sb struct(s)? */
 };
 
@@ -588,22 +591,30 @@ require use of the stronger protocol */
 #endif
 
 /*
- * The list of servers that did not respond with NT LM 0.12.
- * This list helps improve performance and eliminate the messages indicating
- * that we had a communications error talking to the server in this list.
+ * the list of TCP_Server_Info structures, ie each of the sockets
+ * connecting our client to a distinct server (ip address), is
+ * chained together by cifs_tcp_ses_list. The list of all our SMB
+ * sessions (and from that the tree connections) can be found
+ * by iterating over cifs_tcp_ses_list
  */
-/* Feature not supported */
-/* GLOBAL_EXTERN struct servers_not_supported *NotSuppList; */
+GLOBAL_EXTERN struct list_head         cifs_tcp_ses_list;
 
 /*
- * The following is a hash table of all the users we know about.
+ * This lock protects the cifs_tcp_ses_list, the list of smb sessions per
+ * tcp session, and the list of tcon's per smb session. It also protects
+ * the reference counters for the server, smb session, and tcon. Finally,
+ * changes to the tcon->tidStatus should be done while holding this lock.
  */
-GLOBAL_EXTERN struct smbUidInfo *GlobalUidList[UID_HASH];
+GLOBAL_EXTERN rwlock_t         cifs_tcp_ses_lock;
 
-/* GLOBAL_EXTERN struct list_head GlobalServerList; BB not implemented yet */
-GLOBAL_EXTERN struct list_head GlobalSMBSessionList;
-GLOBAL_EXTERN struct list_head GlobalTreeConnectionList;
-GLOBAL_EXTERN rwlock_t GlobalSMBSeslock;  /* protects list inserts on 3 above */
+/*
+ * This lock protects the cifs_file->llist and cifs_file->flist
+ * list operations, and updates to some flags (cifs_file->invalidHandle)
+ * It will be moved to either use the tcon->stat_lock or equivalent later.
+ * If cifs_tcp_ses_lock and the lock below are both needed to be held, then
+ * the cifs_tcp_ses_lock must be grabbed first and released last.
+ */
+GLOBAL_EXTERN rwlock_t GlobalSMBSeslock;
 
 GLOBAL_EXTERN struct list_head GlobalOplock_Q;
 
index d5eac48fc41525494d017afd84d14d3d550b1cd8..6d51696dc762d3b6656ed027fe2d7ed40d549409 100644 (file)
@@ -190,10 +190,10 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
                /* need to prevent multiple threads trying to
                simultaneously reconnect the same SMB session */
                        down(&tcon->ses->sesSem);
-                       if (tcon->ses->status == CifsNeedReconnect)
+                       if (tcon->ses->need_reconnect)
                                rc = cifs_setup_session(0, tcon->ses,
                                                        nls_codepage);
-                       if (!rc && (tcon->tidStatus == CifsNeedReconnect)) {
+                       if (!rc && (tcon->need_reconnect)) {
                                mark_open_files_invalid(tcon);
                                rc = CIFSTCon(0, tcon->ses, tcon->treeName,
                                              tcon, nls_codepage);
@@ -337,10 +337,10 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
                /* need to prevent multiple threads trying to
                simultaneously reconnect the same SMB session */
                        down(&tcon->ses->sesSem);
-                       if (tcon->ses->status == CifsNeedReconnect)
+                       if (tcon->ses->need_reconnect)
                                rc = cifs_setup_session(0, tcon->ses,
                                                        nls_codepage);
-                       if (!rc && (tcon->tidStatus == CifsNeedReconnect)) {
+                       if (!rc && (tcon->need_reconnect)) {
                                mark_open_files_invalid(tcon);
                                rc = CIFSTCon(0, tcon->ses, tcon->treeName,
                                              tcon, nls_codepage);
@@ -664,8 +664,9 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
                        rc = -EIO;
                        goto neg_err_exit;
                }
-
-               if (server->socketUseCount.counter > 1) {
+               read_lock(&cifs_tcp_ses_lock);
+               if (server->srv_count > 1) {
+                       read_unlock(&cifs_tcp_ses_lock);
                        if (memcmp(server->server_GUID,
                                   pSMBr->u.extended_response.
                                   GUID, 16) != 0) {
@@ -674,9 +675,11 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
                                        pSMBr->u.extended_response.GUID,
                                        16);
                        }
-               } else
+               } else {
+                       read_unlock(&cifs_tcp_ses_lock);
                        memcpy(server->server_GUID,
                               pSMBr->u.extended_response.GUID, 16);
+               }
 
                if (count == 16) {
                        server->secType = RawNTLMSSP;
@@ -739,50 +742,31 @@ CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon)
        int rc = 0;
 
        cFYI(1, ("In tree disconnect"));
-       /*
-        *  If last user of the connection and
-        *  connection alive - disconnect it
-        *  If this is the last connection on the server session disconnect it
-        *  (and inside session disconnect we should check if tcp socket needs
-        *  to be freed and kernel thread woken up).
-        */
-       if (tcon)
-               down(&tcon->tconSem);
-       else
-               return -EIO;
 
-       atomic_dec(&tcon->useCount);
-       if (atomic_read(&tcon->useCount) > 0) {
-               up(&tcon->tconSem);
-               return -EBUSY;
-       }
+       /* BB: do we need to check this? These should never be NULL. */
+       if ((tcon->ses == NULL) || (tcon->ses->server == NULL))
+               return -EIO;
 
-       /* No need to return error on this operation if tid invalidated and
-       closed on server already e.g. due to tcp session crashing */
-       if (tcon->tidStatus == CifsNeedReconnect) {
-               up(&tcon->tconSem);
+       /*
+        * No need to return error on this operation if tid invalidated and
+        * closed on server already e.g. due to tcp session crashing. Also,
+        * the tcon is no longer on the list, so no need to take lock before
+        * checking this.
+        */
+       if (tcon->need_reconnect)
                return 0;
-       }
 
-       if ((tcon->ses == NULL) || (tcon->ses->server == NULL)) {
-               up(&tcon->tconSem);
-               return -EIO;
-       }
        rc = small_smb_init(SMB_COM_TREE_DISCONNECT, 0, tcon,
                            (void **)&smb_buffer);
-       if (rc) {
-               up(&tcon->tconSem);
+       if (rc)
                return rc;
-       }
 
        rc = SendReceiveNoRsp(xid, tcon->ses, smb_buffer, 0);
        if (rc)
                cFYI(1, ("Tree disconnect failed %d", rc));
 
-       up(&tcon->tconSem);
-
        /* No need to return error on this operation if tid invalidated and
-       closed on server already e.g. due to tcp session crashing */
+          closed on server already e.g. due to tcp session crashing */
        if (rc == -EAGAIN)
                rc = 0;
 
@@ -796,43 +780,36 @@ CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses)
        int rc = 0;
 
        cFYI(1, ("In SMBLogoff for session disconnect"));
-       if (ses)
-               down(&ses->sesSem);
-       else
+
+       /*
+        * BB: do we need to check validity of ses and server? They should
+        * always be valid since we have an active reference. If not, that
+        * should probably be a BUG()
+        */
+       if (!ses || !ses->server)
                return -EIO;
 
-       atomic_dec(&ses->inUse);
-       if (atomic_read(&ses->inUse) > 0) {
-               up(&ses->sesSem);
-               return -EBUSY;
-       }
+       down(&ses->sesSem);
+       if (ses->need_reconnect)
+               goto session_already_dead; /* no need to send SMBlogoff if uid
+                                             already closed due to reconnect */
        rc = small_smb_init(SMB_COM_LOGOFF_ANDX, 2, NULL, (void **)&pSMB);
        if (rc) {
                up(&ses->sesSem);
                return rc;
        }
 
-       if (ses->server) {
-               pSMB->hdr.Mid = GetNextMid(ses->server);
+       pSMB->hdr.Mid = GetNextMid(ses->server);
 
-               if (ses->server->secMode &
+       if (ses->server->secMode &
                   (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
                        pSMB->hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
-       }
 
        pSMB->hdr.Uid = ses->Suid;
 
        pSMB->AndXCommand = 0xFF;
        rc = SendReceiveNoRsp(xid, ses, (struct smb_hdr *) pSMB, 0);
-       if (ses->server) {
-               atomic_dec(&ses->server->socketUseCount);
-               if (atomic_read(&ses->server->socketUseCount) == 0) {
-                       spin_lock(&GlobalMid_Lock);
-                       ses->server->tcpStatus = CifsExiting;
-                       spin_unlock(&GlobalMid_Lock);
-                       rc = -ESHUTDOWN;
-               }
-       }
+session_already_dead:
        up(&ses->sesSem);
 
        /* if session dead then we do not need to do ulogoff,
@@ -3922,6 +3899,27 @@ GetInodeNumOut:
        return rc;
 }
 
+/* computes length of UCS string converted to host codepage
+ * @src:       UCS string
+ * @maxlen:    length of the input string in UCS characters
+ *             (not in bytes)
+ *
+ * return:     size of input string in host codepage
+ */
+static int hostlen_fromUCS(const __le16 *src, const int maxlen,
+               const struct nls_table *nls_codepage) {
+       int i;
+       int hostlen = 0;
+       char to[4];
+       int charlen;
+       for (i = 0; (i < maxlen) && src[i]; ++i) {
+               charlen = nls_codepage->uni2char(le16_to_cpu(src[i]),
+                               to, NLS_MAX_CHARSET_SIZE);
+               hostlen += charlen > 0 ? charlen : 1;
+       }
+       return hostlen;
+}
+
 /* parses DFS refferal V3 structure
  * caller is responsible for freeing target_nodes
  * returns:
@@ -3932,7 +3930,8 @@ static int
 parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
                unsigned int *num_of_nodes,
                struct dfs_info3_param **target_nodes,
-               const struct nls_table *nls_codepage)
+               const struct nls_table *nls_codepage, int remap,
+               const char *searchName)
 {
        int i, rc = 0;
        char *data_end;
@@ -3983,7 +3982,18 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
                struct dfs_info3_param *node = (*target_nodes)+i;
 
                node->flags = le16_to_cpu(pSMBr->DFSFlags);
-               node->path_consumed = le16_to_cpu(pSMBr->PathConsumed);
+               if (is_unicode) {
+                       __le16 *tmp = kmalloc(strlen(searchName)*2 + 2,
+                                               GFP_KERNEL);
+                       cifsConvertToUCS((__le16 *) tmp, searchName,
+                                       PATH_MAX, nls_codepage, remap);
+                       node->path_consumed = hostlen_fromUCS(tmp,
+                                       le16_to_cpu(pSMBr->PathConsumed)/2,
+                                       nls_codepage);
+                       kfree(tmp);
+               } else
+                       node->path_consumed = le16_to_cpu(pSMBr->PathConsumed);
+
                node->server_type = le16_to_cpu(ref->ServerType);
                node->ref_flag = le16_to_cpu(ref->ReferralEntryFlags);
 
@@ -4116,7 +4126,8 @@ getDFSRetry:
 
        /* parse returned result into more usable form */
        rc = parse_DFS_referrals(pSMBr, num_of_nodes,
-                                target_nodes, nls_codepage);
+                                target_nodes, nls_codepage, remap,
+                                searchName);
 
 GetDFSRefExit:
        cifs_buf_release(pSMB);
index e9f9248cb3feff13deeeb4d5eeae1d2a65f79ebe..c7d341714586fdfc9086c381dc310fe81a371237 100644 (file)
@@ -124,7 +124,7 @@ static int
 cifs_reconnect(struct TCP_Server_Info *server)
 {
        int rc = 0;
-       struct list_head *tmp;
+       struct list_head *tmp, *tmp2;
        struct cifsSesInfo *ses;
        struct cifsTconInfo *tcon;
        struct mid_q_entry *mid_entry;
@@ -144,23 +144,17 @@ cifs_reconnect(struct TCP_Server_Info *server)
 
        /* before reconnecting the tcp session, mark the smb session (uid)
                and the tid bad so they are not used until reconnected */
-       read_lock(&GlobalSMBSeslock);
-       list_for_each(tmp, &GlobalSMBSessionList) {
-               ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList);
-               if (ses->server) {
-                       if (ses->server == server) {
-                               ses->status = CifsNeedReconnect;
-                               ses->ipc_tid = 0;
-                       }
+       read_lock(&cifs_tcp_ses_lock);
+       list_for_each(tmp, &server->smb_ses_list) {
+               ses = list_entry(tmp, struct cifsSesInfo, smb_ses_list);
+               ses->need_reconnect = true;
+               ses->ipc_tid = 0;
+               list_for_each(tmp2, &ses->tcon_list) {
+                       tcon = list_entry(tmp2, struct cifsTconInfo, tcon_list);
+                       tcon->need_reconnect = true;
                }
-               /* else tcp and smb sessions need reconnection */
-       }
-       list_for_each(tmp, &GlobalTreeConnectionList) {
-               tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
-               if ((tcon->ses) && (tcon->ses->server == server))
-                       tcon->tidStatus = CifsNeedReconnect;
        }
-       read_unlock(&GlobalSMBSeslock);
+       read_unlock(&cifs_tcp_ses_lock);
        /* do not want to be sending data on a socket we are freeing */
        down(&server->tcpSem);
        if (server->ssocket) {
@@ -193,7 +187,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
        while ((server->tcpStatus != CifsExiting) &&
               (server->tcpStatus != CifsGood)) {
                try_to_freeze();
-               if (server->protocolType == IPV6) {
+               if (server->addr.sockAddr6.sin6_family == AF_INET6) {
                        rc = ipv6_connect(&server->addr.sockAddr6,
                                          &server->ssocket, server->noautotune);
                } else {
@@ -417,9 +411,14 @@ incomplete_rcv:
                        msleep(1); /* minimum sleep to prevent looping
                                allowing socket to clear and app threads to set
                                tcpStatus CifsNeedReconnect if server hung */
-                       if (pdu_length < 4)
+                       if (pdu_length < 4) {
+                               iov.iov_base = (4 - pdu_length) +
+                                                       (char *)smb_buffer;
+                               iov.iov_len = pdu_length;
+                               smb_msg.msg_control = NULL;
+                               smb_msg.msg_controllen = 0;
                                goto incomplete_rcv;
-                       else
+                       else
                                continue;
                } else if (length <= 0) {
                        if (server->tcpStatus == CifsNew) {
@@ -654,6 +653,11 @@ multi_t2_fnd:
                }
        } /* end while !EXITING */
 
+       /* take it off the list, if it's not already */
+       write_lock(&cifs_tcp_ses_lock);
+       list_del_init(&server->tcp_ses_list);
+       write_unlock(&cifs_tcp_ses_lock);
+
        spin_lock(&GlobalMid_Lock);
        server->tcpStatus = CifsExiting;
        spin_unlock(&GlobalMid_Lock);
@@ -686,29 +690,29 @@ multi_t2_fnd:
        if (smallbuf) /* no sense logging a debug message if NULL */
                cifs_small_buf_release(smallbuf);
 
-       read_lock(&GlobalSMBSeslock);
+       /*
+        * BB: we shouldn't have to do any of this. It shouldn't be
+        * possible to exit from the thread with active SMB sessions
+        */
+       read_lock(&cifs_tcp_ses_lock);
        if (list_empty(&server->pending_mid_q)) {
                /* loop through server session structures attached to this and
                    mark them dead */
-               list_for_each(tmp, &GlobalSMBSessionList) {
-                       ses =
-                           list_entry(tmp, struct cifsSesInfo,
-                                      cifsSessionList);
-                       if (ses->server == server) {
-                               ses->status = CifsExiting;
-                               ses->server = NULL;
-                       }
+               list_for_each(tmp, &server->smb_ses_list) {
+                       ses = list_entry(tmp, struct cifsSesInfo,
+                                        smb_ses_list);
+                       ses->status = CifsExiting;
+                       ses->server = NULL;
                }
-               read_unlock(&GlobalSMBSeslock);
+               read_unlock(&cifs_tcp_ses_lock);
        } else {
                /* although we can not zero the server struct pointer yet,
                since there are active requests which may depnd on them,
                mark the corresponding SMB sessions as exiting too */
-               list_for_each(tmp, &GlobalSMBSessionList) {
+               list_for_each(tmp, &server->smb_ses_list) {
                        ses = list_entry(tmp, struct cifsSesInfo,
-                                        cifsSessionList);
-                       if (ses->server == server)
-                               ses->status = CifsExiting;
+                                        smb_ses_list);
+                       ses->status = CifsExiting;
                }
 
                spin_lock(&GlobalMid_Lock);
@@ -723,7 +727,7 @@ multi_t2_fnd:
                        }
                }
                spin_unlock(&GlobalMid_Lock);
-               read_unlock(&GlobalSMBSeslock);
+               read_unlock(&cifs_tcp_ses_lock);
                /* 1/8th of sec is more than enough time for them to exit */
                msleep(125);
        }
@@ -745,14 +749,13 @@ multi_t2_fnd:
        if there are any pointing to this (e.g
        if a crazy root user tried to kill cifsd
        kernel thread explicitly this might happen) */
-       write_lock(&GlobalSMBSeslock);
-       list_for_each(tmp, &GlobalSMBSessionList) {
-               ses = list_entry(tmp, struct cifsSesInfo,
-                               cifsSessionList);
-               if (ses->server == server)
-                       ses->server = NULL;
+       /* BB: This shouldn't be necessary, see above */
+       read_lock(&cifs_tcp_ses_lock);
+       list_for_each(tmp, &server->smb_ses_list) {
+               ses = list_entry(tmp, struct cifsSesInfo, smb_ses_list);
+               ses->server = NULL;
        }
-       write_unlock(&GlobalSMBSeslock);
+       read_unlock(&cifs_tcp_ses_lock);
 
        kfree(server->hostname);
        task_to_wake = xchg(&server->tsk, NULL);
@@ -1352,94 +1355,158 @@ cifs_parse_mount_options(char *options, const char *devname,
        return 0;
 }
 
-static struct cifsSesInfo *
-cifs_find_tcp_session(struct in_addr *target_ip_addr,
-                     struct in6_addr *target_ip6_addr,
-                     char *userName, struct TCP_Server_Info **psrvTcp)
+static struct TCP_Server_Info *
+cifs_find_tcp_session(struct sockaddr *addr)
 {
        struct list_head *tmp;
-       struct cifsSesInfo *ses;
-
-       *psrvTcp = NULL;
+       struct TCP_Server_Info *server;
+       struct sockaddr_in *addr4 = (struct sockaddr_in *) addr;
+       struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *) addr;
+
+       write_lock(&cifs_tcp_ses_lock);
+       list_for_each(tmp, &cifs_tcp_ses_list) {
+               server = list_entry(tmp, struct TCP_Server_Info,
+                                   tcp_ses_list);
+               /*
+                * the demux thread can exit on its own while still in CifsNew
+                * so don't accept any sockets in that state. Since the
+                * tcpStatus never changes back to CifsNew it's safe to check
+                * for this without a lock.
+                */
+               if (server->tcpStatus == CifsNew)
+                       continue;
 
-       read_lock(&GlobalSMBSeslock);
-       list_for_each(tmp, &GlobalSMBSessionList) {
-               ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList);
-               if (!ses->server)
+               if (addr->sa_family == AF_INET &&
+                   (addr4->sin_addr.s_addr !=
+                    server->addr.sockAddr.sin_addr.s_addr))
+                       continue;
+               else if (addr->sa_family == AF_INET6 &&
+                        memcmp(&server->addr.sockAddr6.sin6_addr,
+                               &addr6->sin6_addr, sizeof(addr6->sin6_addr)))
                        continue;
 
-               if (target_ip_addr &&
-                   ses->server->addr.sockAddr.sin_addr.s_addr != target_ip_addr->s_addr)
-                               continue;
-               else if (target_ip6_addr &&
-                        memcmp(&ses->server->addr.sockAddr6.sin6_addr,
-                               target_ip6_addr, sizeof(*target_ip6_addr)))
-                               continue;
-               /* BB lock server and tcp session; increment use count here?? */
+               ++server->srv_count;
+               write_unlock(&cifs_tcp_ses_lock);
+               cFYI(1, ("Existing tcp session with server found"));
+               return server;
+       }
+       write_unlock(&cifs_tcp_ses_lock);
+       return NULL;
+}
 
-               /* found a match on the TCP session */
-               *psrvTcp = ses->server;
+static void
+cifs_put_tcp_session(struct TCP_Server_Info *server)
+{
+       struct task_struct *task;
 
-               /* BB check if reconnection needed */
-               if (strncmp(ses->userName, userName, MAX_USERNAME_SIZE) == 0) {
-                       read_unlock(&GlobalSMBSeslock);
-                       /* Found exact match on both TCP and
-                          SMB sessions */
-                       return ses;
-               }
-               /* else tcp and smb sessions need reconnection */
+       write_lock(&cifs_tcp_ses_lock);
+       if (--server->srv_count > 0) {
+               write_unlock(&cifs_tcp_ses_lock);
+               return;
        }
-       read_unlock(&GlobalSMBSeslock);
 
-       return NULL;
+       list_del_init(&server->tcp_ses_list);
+       write_unlock(&cifs_tcp_ses_lock);
+
+       spin_lock(&GlobalMid_Lock);
+       server->tcpStatus = CifsExiting;
+       spin_unlock(&GlobalMid_Lock);
+
+       task = xchg(&server->tsk, NULL);
+       if (task)
+               force_sig(SIGKILL, task);
 }
 
-static struct cifsTconInfo *
-find_unc(__be32 new_target_ip_addr, char *uncName, char *userName)
+static struct cifsSesInfo *
+cifs_find_smb_ses(struct TCP_Server_Info *server, char *username)
 {
        struct list_head *tmp;
-       struct cifsTconInfo *tcon;
-       __be32 old_ip;
-
-       read_lock(&GlobalSMBSeslock);
+       struct cifsSesInfo *ses;
 
-       list_for_each(tmp, &GlobalTreeConnectionList) {
-               cFYI(1, ("Next tcon"));
-               tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
-               if (!tcon->ses || !tcon->ses->server)
+       write_lock(&cifs_tcp_ses_lock);
+       list_for_each(tmp, &server->smb_ses_list) {
+               ses = list_entry(tmp, struct cifsSesInfo, smb_ses_list);
+               if (strncmp(ses->userName, username, MAX_USERNAME_SIZE))
                        continue;
 
-               old_ip = tcon->ses->server->addr.sockAddr.sin_addr.s_addr;
-               cFYI(1, ("old ip addr: %x == new ip %x ?",
-                       old_ip, new_target_ip_addr));
+               ++ses->ses_count;
+               write_unlock(&cifs_tcp_ses_lock);
+               return ses;
+       }
+       write_unlock(&cifs_tcp_ses_lock);
+       return NULL;
+}
 
-               if (old_ip != new_target_ip_addr)
-                       continue;
+static void
+cifs_put_smb_ses(struct cifsSesInfo *ses)
+{
+       int xid;
+       struct TCP_Server_Info *server = ses->server;
 
-               /* BB lock tcon, server, tcp session and increment use count? */
-               /* found a match on the TCP session */
-               /* BB check if reconnection needed */
-               cFYI(1, ("IP match, old UNC: %s new: %s",
-                       tcon->treeName, uncName));
+       write_lock(&cifs_tcp_ses_lock);
+       if (--ses->ses_count > 0) {
+               write_unlock(&cifs_tcp_ses_lock);
+               return;
+       }
 
-               if (strncmp(tcon->treeName, uncName, MAX_TREE_SIZE))
-                       continue;
+       list_del_init(&ses->smb_ses_list);
+       write_unlock(&cifs_tcp_ses_lock);
 
-               cFYI(1, ("and old usr: %s new: %s",
-                       tcon->treeName, uncName));
+       if (ses->status == CifsGood) {
+               xid = GetXid();
+               CIFSSMBLogoff(xid, ses);
+               _FreeXid(xid);
+       }
+       sesInfoFree(ses);
+       cifs_put_tcp_session(server);
+}
 
-               if (strncmp(tcon->ses->userName, userName, MAX_USERNAME_SIZE))
+static struct cifsTconInfo *
+cifs_find_tcon(struct cifsSesInfo *ses, const char *unc)
+{
+       struct list_head *tmp;
+       struct cifsTconInfo *tcon;
+
+       write_lock(&cifs_tcp_ses_lock);
+       list_for_each(tmp, &ses->tcon_list) {
+               tcon = list_entry(tmp, struct cifsTconInfo, tcon_list);
+               if (tcon->tidStatus == CifsExiting)
+                       continue;
+               if (strncmp(tcon->treeName, unc, MAX_TREE_SIZE))
                        continue;
 
-               /* matched smb session (user name) */
-               read_unlock(&GlobalSMBSeslock);
+               ++tcon->tc_count;
+               write_unlock(&cifs_tcp_ses_lock);
                return tcon;
        }
-
-       read_unlock(&GlobalSMBSeslock);
+       write_unlock(&cifs_tcp_ses_lock);
        return NULL;
 }
 
+static void
+cifs_put_tcon(struct cifsTconInfo *tcon)
+{
+       int xid;
+       struct cifsSesInfo *ses = tcon->ses;
+
+       write_lock(&cifs_tcp_ses_lock);
+       if (--tcon->tc_count > 0) {
+               write_unlock(&cifs_tcp_ses_lock);
+               return;
+       }
+
+       list_del_init(&tcon->tcon_list);
+       write_unlock(&cifs_tcp_ses_lock);
+
+       xid = GetXid();
+       CIFSSMBTDis(xid, tcon);
+       _FreeXid(xid);
+
+       DeleteTconOplockQEntries(tcon);
+       tconInfoFree(tcon);
+       cifs_put_smb_ses(ses);
+}
+
 int
 get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path,
             const struct nls_table *nls_codepage, unsigned int *pnum_referrals,
@@ -1876,14 +1943,90 @@ convert_delimiter(char *path, char delim)
        }
 }
 
-static void
-kill_cifsd(struct TCP_Server_Info *server)
+static void setup_cifs_sb(struct smb_vol *pvolume_info,
+                         struct cifs_sb_info *cifs_sb)
 {
-       struct task_struct *task;
-
-       task = xchg(&server->tsk, NULL);
-       if (task)
-               force_sig(SIGKILL, task);
+       if (pvolume_info->rsize > CIFSMaxBufSize) {
+               cERROR(1, ("rsize %d too large, using MaxBufSize",
+                       pvolume_info->rsize));
+               cifs_sb->rsize = CIFSMaxBufSize;
+       } else if ((pvolume_info->rsize) &&
+                       (pvolume_info->rsize <= CIFSMaxBufSize))
+               cifs_sb->rsize = pvolume_info->rsize;
+       else /* default */
+               cifs_sb->rsize = CIFSMaxBufSize;
+
+       if (pvolume_info->wsize > PAGEVEC_SIZE * PAGE_CACHE_SIZE) {
+               cERROR(1, ("wsize %d too large, using 4096 instead",
+                         pvolume_info->wsize));
+               cifs_sb->wsize = 4096;
+       } else if (pvolume_info->wsize)
+               cifs_sb->wsize = pvolume_info->wsize;
+       else
+               cifs_sb->wsize = min_t(const int,
+                                       PAGEVEC_SIZE * PAGE_CACHE_SIZE,
+                                       127*1024);
+               /* old default of CIFSMaxBufSize was too small now
+                  that SMB Write2 can send multiple pages in kvec.
+                  RFC1001 does not describe what happens when frame
+                  bigger than 128K is sent so use that as max in
+                  conjunction with 52K kvec constraint on arch with 4K
+                  page size  */
+
+       if (cifs_sb->rsize < 2048) {
+               cifs_sb->rsize = 2048;
+               /* Windows ME may prefer this */
+               cFYI(1, ("readsize set to minimum: 2048"));
+       }
+       /* calculate prepath */
+       cifs_sb->prepath = pvolume_info->prepath;
+       if (cifs_sb->prepath) {
+               cifs_sb->prepathlen = strlen(cifs_sb->prepath);
+               /* we can not convert the / to \ in the path
+               separators in the prefixpath yet because we do not
+               know (until reset_cifs_unix_caps is called later)
+               whether POSIX PATH CAP is available. We normalize
+               the / to \ after reset_cifs_unix_caps is called */
+               pvolume_info->prepath = NULL;
+       } else
+               cifs_sb->prepathlen = 0;
+       cifs_sb->mnt_uid = pvolume_info->linux_uid;
+       cifs_sb->mnt_gid = pvolume_info->linux_gid;
+       cifs_sb->mnt_file_mode = pvolume_info->file_mode;
+       cifs_sb->mnt_dir_mode = pvolume_info->dir_mode;
+       cFYI(1, ("file mode: 0x%x  dir mode: 0x%x",
+               cifs_sb->mnt_file_mode, cifs_sb->mnt_dir_mode));
+
+       if (pvolume_info->noperm)
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_PERM;
+       if (pvolume_info->setuids)
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_SET_UID;
+       if (pvolume_info->server_ino)
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_SERVER_INUM;
+       if (pvolume_info->remap)
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_MAP_SPECIAL_CHR;
+       if (pvolume_info->no_xattr)
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_XATTR;
+       if (pvolume_info->sfu_emul)
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_UNX_EMUL;
+       if (pvolume_info->nobrl)
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_BRL;
+       if (pvolume_info->cifs_acl)
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_CIFS_ACL;
+       if (pvolume_info->override_uid)
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_UID;
+       if (pvolume_info->override_gid)
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_GID;
+       if (pvolume_info->dynperm)
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM;
+       if (pvolume_info->direct_io) {
+               cFYI(1, ("mounting share using direct i/o"));
+               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO;
+       }
+
+       if ((pvolume_info->cifs_acl) && (pvolume_info->dynperm))
+               cERROR(1, ("mount option dynperm ignored if cifsacl "
+                          "mount option supported"));
 }
 
 int
@@ -1892,13 +2035,12 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
 {
        int rc = 0;
        int xid;
-       int address_type = AF_INET;
        struct socket *csocket = NULL;
-       struct sockaddr_in sin_server;
-       struct sockaddr_in6 sin_server6;
+       struct sockaddr addr;
+       struct sockaddr_in *sin_server = (struct sockaddr_in *) &addr;
+       struct sockaddr_in6 *sin_server6 = (struct sockaddr_in6 *) &addr;
        struct smb_vol volume_info;
        struct cifsSesInfo *pSesInfo = NULL;
-       struct cifsSesInfo *existingCifsSes = NULL;
        struct cifsTconInfo *tcon = NULL;
        struct TCP_Server_Info *srvTcp = NULL;
 
@@ -1906,6 +2048,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
 
 /* cFYI(1, ("Entering cifs_mount. Xid: %d with: %s", xid, mount_data)); */
 
+       memset(&addr, 0, sizeof(struct sockaddr));
        memset(&volume_info, 0, sizeof(struct smb_vol));
        if (cifs_parse_mount_options(mount_data, devname, &volume_info)) {
                rc = -EINVAL;
@@ -1928,16 +2071,16 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
 
        if (volume_info.UNCip && volume_info.UNC) {
                rc = cifs_inet_pton(AF_INET, volume_info.UNCip,
-                                   &sin_server.sin_addr.s_addr);
+                                   &sin_server->sin_addr.s_addr);
 
                if (rc <= 0) {
                        /* not ipv4 address, try ipv6 */
                        rc = cifs_inet_pton(AF_INET6, volume_info.UNCip,
-                                           &sin_server6.sin6_addr.in6_u);
+                                           &sin_server6->sin6_addr.in6_u);
                        if (rc > 0)
-                               address_type = AF_INET6;
+                               addr.sa_family = AF_INET6;
                } else {
-                       address_type = AF_INET;
+                       addr.sa_family = AF_INET;
                }
 
                if (rc <= 0) {
@@ -1977,41 +2120,25 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
                }
        }
 
-       if (address_type == AF_INET)
-               existingCifsSes = cifs_find_tcp_session(&sin_server.sin_addr,
-                       NULL /* no ipv6 addr */,
-                       volume_info.username, &srvTcp);
-       else if (address_type == AF_INET6) {
-               cFYI(1, ("looking for ipv6 address"));
-               existingCifsSes = cifs_find_tcp_session(NULL /* no ipv4 addr */,
-                       &sin_server6.sin6_addr,
-                       volume_info.username, &srvTcp);
-       } else {
-               rc = -EINVAL;
-               goto out;
-       }
-
-       if (srvTcp) {
-               cFYI(1, ("Existing tcp session with server found"));
-       } else {        /* create socket */
-               if (volume_info.port)
-                       sin_server.sin_port = htons(volume_info.port);
-               else
-                       sin_server.sin_port = 0;
-               if (address_type == AF_INET6) {
+       srvTcp = cifs_find_tcp_session(&addr);
+       if (!srvTcp) { /* create socket */
+               if (addr.sa_family == AF_INET6) {
                        cFYI(1, ("attempting ipv6 connect"));
                        /* BB should we allow ipv6 on port 139? */
                        /* other OS never observed in Wild doing 139 with v6 */
-                       rc = ipv6_connect(&sin_server6, &csocket,
+                       sin_server6->sin6_port = htons(volume_info.port);
+                       rc = ipv6_connect(sin_server6, &csocket,
                                        volume_info.noblocksnd);
-               } else
-                       rc = ipv4_connect(&sin_server, &csocket,
+               } else {
+                       sin_server->sin_port = htons(volume_info.port);
+                       rc = ipv4_connect(sin_server, &csocket,
                                  volume_info.source_rfc1001_name,
                                  volume_info.target_rfc1001_name,
                                  volume_info.noblocksnd,
                                  volume_info.noautotune);
+               }
                if (rc < 0) {
-                       cERROR(1, ("Error connecting to IPv4 socket. "
+                       cERROR(1, ("Error connecting to socket. "
                                   "Aborting operation"));
                        if (csocket != NULL)
                                sock_release(csocket);
@@ -2026,12 +2153,15 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
                } else {
                        srvTcp->noblocksnd = volume_info.noblocksnd;
                        srvTcp->noautotune = volume_info.noautotune;
-                       memcpy(&srvTcp->addr.sockAddr, &sin_server,
-                               sizeof(struct sockaddr_in));
+                       if (addr.sa_family == AF_INET6)
+                               memcpy(&srvTcp->addr.sockAddr6, sin_server6,
+                                       sizeof(struct sockaddr_in6));
+                       else
+                               memcpy(&srvTcp->addr.sockAddr, sin_server,
+                                       sizeof(struct sockaddr_in));
                        atomic_set(&srvTcp->inFlight, 0);
                        /* BB Add code for ipv6 case too */
                        srvTcp->ssocket = csocket;
-                       srvTcp->protocolType = IPV4;
                        srvTcp->hostname = extract_hostname(volume_info.UNC);
                        if (IS_ERR(srvTcp->hostname)) {
                                rc = PTR_ERR(srvTcp->hostname);
@@ -2061,15 +2191,28 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
                        memcpy(srvTcp->server_RFC1001_name,
                                volume_info.target_rfc1001_name, 16);
                        srvTcp->sequence_number = 0;
+                       INIT_LIST_HEAD(&srvTcp->tcp_ses_list);
+                       INIT_LIST_HEAD(&srvTcp->smb_ses_list);
+                       ++srvTcp->srv_count;
+                       write_lock(&cifs_tcp_ses_lock);
+                       list_add(&srvTcp->tcp_ses_list,
+                                &cifs_tcp_ses_list);
+                       write_unlock(&cifs_tcp_ses_lock);
                }
        }
 
-       if (existingCifsSes) {
-               pSesInfo = existingCifsSes;
+       pSesInfo = cifs_find_smb_ses(srvTcp, volume_info.username);
+       if (pSesInfo) {
                cFYI(1, ("Existing smb sess found (status=%d)",
                        pSesInfo->status));
+               /*
+                * The existing SMB session already has a reference to srvTcp,
+                * so we can put back the extra one we got before
+                */
+               cifs_put_tcp_session(srvTcp);
+
                down(&pSesInfo->sesSem);
-               if (pSesInfo->status == CifsNeedReconnect) {
+               if (pSesInfo->need_reconnect) {
                        cFYI(1, ("Session needs reconnect"));
                        rc = cifs_setup_session(xid, pSesInfo,
                                                cifs_sb->local_nls);
@@ -2078,187 +2221,101 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
        } else if (!rc) {
                cFYI(1, ("Existing smb sess not found"));
                pSesInfo = sesInfoAlloc();
-               if (pSesInfo == NULL)
+               if (pSesInfo == NULL) {
                        rc = -ENOMEM;
-               else {
-                       pSesInfo->server = srvTcp;
-                       sprintf(pSesInfo->serverName, "%u.%u.%u.%u",
-                               NIPQUAD(sin_server.sin_addr.s_addr));
-               }
+                       goto mount_fail_check;
+               }
+
+               /* new SMB session uses our srvTcp ref */
+               pSesInfo->server = srvTcp;
+               sprintf(pSesInfo->serverName, "%u.%u.%u.%u",
+                       NIPQUAD(sin_server->sin_addr.s_addr));
+
+               write_lock(&cifs_tcp_ses_lock);
+               list_add(&pSesInfo->smb_ses_list, &srvTcp->smb_ses_list);
+               write_unlock(&cifs_tcp_ses_lock);
+
+               /* volume_info.password freed at unmount */
+               if (volume_info.password) {
+                       pSesInfo->password = volume_info.password;
+                       /* set to NULL to prevent freeing on exit */
+                       volume_info.password = NULL;
+               }
+               if (volume_info.username)
+                       strncpy(pSesInfo->userName, volume_info.username,
+                               MAX_USERNAME_SIZE);
+               if (volume_info.domainname) {
+                       int len = strlen(volume_info.domainname);
+                       pSesInfo->domainName = kmalloc(len + 1, GFP_KERNEL);
+                       if (pSesInfo->domainName)
+                               strcpy(pSesInfo->domainName,
+                                       volume_info.domainname);
+               }
+               pSesInfo->linux_uid = volume_info.linux_uid;
+               pSesInfo->overrideSecFlg = volume_info.secFlg;
+               down(&pSesInfo->sesSem);
 
-               if (!rc) {
-                       /* volume_info.password freed at unmount */
-                       if (volume_info.password) {
-                               pSesInfo->password = volume_info.password;
-                               /* set to NULL to prevent freeing on exit */
-                               volume_info.password = NULL;
-                       }
-                       if (volume_info.username)
-                               strncpy(pSesInfo->userName,
-                                       volume_info.username,
-                                       MAX_USERNAME_SIZE);
-                       if (volume_info.domainname) {
-                               int len = strlen(volume_info.domainname);
-                               pSesInfo->domainName =
-                                       kmalloc(len + 1, GFP_KERNEL);
-                               if (pSesInfo->domainName)
-                                       strcpy(pSesInfo->domainName,
-                                               volume_info.domainname);
-                       }
-                       pSesInfo->linux_uid = volume_info.linux_uid;
-                       pSesInfo->overrideSecFlg = volume_info.secFlg;
-                       down(&pSesInfo->sesSem);
-                       /* BB FIXME need to pass vol->secFlgs BB */
-                       rc = cifs_setup_session(xid, pSesInfo,
-                                               cifs_sb->local_nls);
-                       up(&pSesInfo->sesSem);
-                       if (!rc)
-                               atomic_inc(&srvTcp->socketUseCount);
-               }
+               /* BB FIXME need to pass vol->secFlgs BB */
+               rc = cifs_setup_session(xid, pSesInfo,
+                                       cifs_sb->local_nls);
+               up(&pSesInfo->sesSem);
        }
 
        /* search for existing tcon to this server share */
        if (!rc) {
-               if (volume_info.rsize > CIFSMaxBufSize) {
-                       cERROR(1, ("rsize %d too large, using MaxBufSize",
-                               volume_info.rsize));
-                       cifs_sb->rsize = CIFSMaxBufSize;
-               } else if ((volume_info.rsize) &&
-                               (volume_info.rsize <= CIFSMaxBufSize))
-                       cifs_sb->rsize = volume_info.rsize;
-               else /* default */
-                       cifs_sb->rsize = CIFSMaxBufSize;
-
-               if (volume_info.wsize > PAGEVEC_SIZE * PAGE_CACHE_SIZE) {
-                       cERROR(1, ("wsize %d too large, using 4096 instead",
-                                 volume_info.wsize));
-                       cifs_sb->wsize = 4096;
-               } else if (volume_info.wsize)
-                       cifs_sb->wsize = volume_info.wsize;
-               else
-                       cifs_sb->wsize =
-                               min_t(const int, PAGEVEC_SIZE * PAGE_CACHE_SIZE,
-                                       127*1024);
-                       /* old default of CIFSMaxBufSize was too small now
-                          that SMB Write2 can send multiple pages in kvec.
-                          RFC1001 does not describe what happens when frame
-                          bigger than 128K is sent so use that as max in
-                          conjunction with 52K kvec constraint on arch with 4K
-                          page size  */
-
-               if (cifs_sb->rsize < 2048) {
-                       cifs_sb->rsize = 2048;
-                       /* Windows ME may prefer this */
-                       cFYI(1, ("readsize set to minimum: 2048"));
-               }
-               /* calculate prepath */
-               cifs_sb->prepath = volume_info.prepath;
-               if (cifs_sb->prepath) {
-                       cifs_sb->prepathlen = strlen(cifs_sb->prepath);
-                       /* we can not convert the / to \ in the path
-                       separators in the prefixpath yet because we do not
-                       know (until reset_cifs_unix_caps is called later)
-                       whether POSIX PATH CAP is available. We normalize
-                       the / to \ after reset_cifs_unix_caps is called */
-                       volume_info.prepath = NULL;
-               } else
-                       cifs_sb->prepathlen = 0;
-               cifs_sb->mnt_uid = volume_info.linux_uid;
-               cifs_sb->mnt_gid = volume_info.linux_gid;
-               cifs_sb->mnt_file_mode = volume_info.file_mode;
-               cifs_sb->mnt_dir_mode = volume_info.dir_mode;
-               cFYI(1, ("file mode: 0x%x  dir mode: 0x%x",
-                       cifs_sb->mnt_file_mode, cifs_sb->mnt_dir_mode));
-
-               if (volume_info.noperm)
-                       cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_PERM;
-               if (volume_info.setuids)
-                       cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_SET_UID;
-               if (volume_info.server_ino)
-                       cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_SERVER_INUM;
-               if (volume_info.remap)
-                       cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_MAP_SPECIAL_CHR;
-               if (volume_info.no_xattr)
-                       cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_XATTR;
-               if (volume_info.sfu_emul)
-                       cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_UNX_EMUL;
-               if (volume_info.nobrl)
-                       cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_BRL;
-               if (volume_info.cifs_acl)
-                       cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_CIFS_ACL;
-               if (volume_info.override_uid)
-                       cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_UID;
-               if (volume_info.override_gid)
-                       cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_GID;
-               if (volume_info.dynperm)
-                       cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM;
-               if (volume_info.direct_io) {
-                       cFYI(1, ("mounting share using direct i/o"));
-                       cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO;
-               }
+               setup_cifs_sb(&volume_info, cifs_sb);
 
-               if ((volume_info.cifs_acl) && (volume_info.dynperm))
-                       cERROR(1, ("mount option dynperm ignored if cifsacl "
-                                  "mount option supported"));
-
-               tcon =
-                   find_unc(sin_server.sin_addr.s_addr, volume_info.UNC,
-                            volume_info.username);
+               tcon = cifs_find_tcon(pSesInfo, volume_info.UNC);
                if (tcon) {
                        cFYI(1, ("Found match on UNC path"));
-                       /* we can have only one retry value for a connection
-                          to a share so for resources mounted more than once
-                          to the same server share the last value passed in
-                          for the retry flag is used */
-                       tcon->retry = volume_info.retry;
-                       tcon->nocase = volume_info.nocase;
-                       tcon->local_lease = volume_info.local_lease;
+                       /* existing tcon already has a reference */
+                       cifs_put_smb_ses(pSesInfo);
                        if (tcon->seal != volume_info.seal)
                                cERROR(1, ("transport encryption setting "
                                           "conflicts with existing tid"));
                } else {
                        tcon = tconInfoAlloc();
-                       if (tcon == NULL)
+                       if (tcon == NULL) {
                                rc = -ENOMEM;
-                       else {
-                               /* check for null share name ie connecting to
-                                * dfs root */
-
-                               /* BB check if this works for exactly length
-                                * three strings */
-                               if ((strchr(volume_info.UNC + 3, '\\') == NULL)
-                                   && (strchr(volume_info.UNC + 3, '/') ==
-                                       NULL)) {
-/*                                     rc = connect_to_dfs_path(xid, pSesInfo,
-                                               "", cifs_sb->local_nls,
-                                               cifs_sb->mnt_cifs_flags &
-                                                 CIFS_MOUNT_MAP_SPECIAL_CHR);*/
-                                       cFYI(1, ("DFS root not supported"));
-                                       rc = -ENODEV;
-                                       goto out;
-                               } else {
-                                       /* BB Do we need to wrap sesSem around
-                                        * this TCon call and Unix SetFS as
-                                        * we do on SessSetup and reconnect? */
-                                       rc = CIFSTCon(xid, pSesInfo,
-                                               volume_info.UNC,
-                                               tcon, cifs_sb->local_nls);
-                                       cFYI(1, ("CIFS Tcon rc = %d", rc));
-                                       if (volume_info.nodfs) {
-                                               tcon->Flags &=
-                                                       ~SMB_SHARE_IS_IN_DFS;
-                                               cFYI(1, ("DFS disabled (%d)",
-                                                       tcon->Flags));
-                                       }
-                               }
-                               if (!rc) {
-                                       atomic_inc(&pSesInfo->inUse);
-                                       tcon->retry = volume_info.retry;
-                                       tcon->nocase = volume_info.nocase;
-                                       tcon->seal = volume_info.seal;
+                               goto mount_fail_check;
+                       }
+                       tcon->ses = pSesInfo;
+
+                       /* check for null share name ie connect to dfs root */
+                       if ((strchr(volume_info.UNC + 3, '\\') == NULL)
+                           && (strchr(volume_info.UNC + 3, '/') == NULL)) {
+                               /* rc = connect_to_dfs_path(...) */
+                               cFYI(1, ("DFS root not supported"));
+                               rc = -ENODEV;
+                               goto mount_fail_check;
+                       } else {
+                               /* BB Do we need to wrap sesSem around
+                                * this TCon call and Unix SetFS as
+                                * we do on SessSetup and reconnect? */
+                               rc = CIFSTCon(xid, pSesInfo, volume_info.UNC,
+                                             tcon, cifs_sb->local_nls);
+                               cFYI(1, ("CIFS Tcon rc = %d", rc));
+                               if (volume_info.nodfs) {
+                                       tcon->Flags &= ~SMB_SHARE_IS_IN_DFS;
+                                       cFYI(1, ("DFS disabled (%d)",
+                                               tcon->Flags));
                                }
                        }
-               }
+                       if (rc)
+                               goto mount_fail_check;
+                       tcon->seal = volume_info.seal;
+                       write_lock(&cifs_tcp_ses_lock);
+                       list_add(&tcon->tcon_list, &pSesInfo->tcon_list);
+                       write_unlock(&cifs_tcp_ses_lock);
+               }
+
+               /* we can have only one retry value for a connection
+                  to a share so for resources mounted more than once
+                  to the same server share the last value passed in
+                  for the retry flag is used */
+               tcon->retry = volume_info.retry;
+               tcon->nocase = volume_info.nocase;
+               tcon->local_lease = volume_info.local_lease;
        }
        if (pSesInfo) {
                if (pSesInfo->capabilities & CAP_LARGE_FILES) {
@@ -2270,80 +2327,49 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
        /* BB FIXME fix time_gran to be larger for LANMAN sessions */
        sb->s_time_gran = 100;
 
-/* on error free sesinfo and tcon struct if needed */
+mount_fail_check:
+       /* on error free sesinfo and tcon struct if needed */
        if (rc) {
-               /* if session setup failed, use count is zero but
-               we still need to free cifsd thread */
-               if (atomic_read(&srvTcp->socketUseCount) == 0) {
-                       spin_lock(&GlobalMid_Lock);
-                       srvTcp->tcpStatus = CifsExiting;
-                       spin_unlock(&GlobalMid_Lock);
-                       kill_cifsd(srvTcp);
-               }
-                /* If find_unc succeeded then rc == 0 so we can not end */
-               if (tcon)  /* up accidently freeing someone elses tcon struct */
-                       tconInfoFree(tcon);
-               if (existingCifsSes == NULL) {
-                       if (pSesInfo) {
-                               if ((pSesInfo->server) &&
-                                   (pSesInfo->status == CifsGood)) {
-                                       int temp_rc;
-                                       temp_rc = CIFSSMBLogoff(xid, pSesInfo);
-                                       /* if the socketUseCount is now zero */
-                                       if ((temp_rc == -ESHUTDOWN) &&
-                                           (pSesInfo->server))
-                                               kill_cifsd(pSesInfo->server);
-                               } else {
-                                       cFYI(1, ("No session or bad tcon"));
-                                       if (pSesInfo->server) {
-                                               spin_lock(&GlobalMid_Lock);
-                                               srvTcp->tcpStatus = CifsExiting;
-                                               spin_unlock(&GlobalMid_Lock);
-                                               kill_cifsd(pSesInfo->server);
-                                       }
-                               }
-                               sesInfoFree(pSesInfo);
-                               /* pSesInfo = NULL; */
-                       }
-               }
-       } else {
-               atomic_inc(&tcon->useCount);
-               cifs_sb->tcon = tcon;
-               tcon->ses = pSesInfo;
-
-               /* do not care if following two calls succeed - informational */
-               if (!tcon->ipc) {
-                       CIFSSMBQFSDeviceInfo(xid, tcon);
-                       CIFSSMBQFSAttributeInfo(xid, tcon);
-               }
-
-               /* tell server which Unix caps we support */
-               if (tcon->ses->capabilities & CAP_UNIX)
-                       /* reset of caps checks mount to see if unix extensions
-                          disabled for just this mount */
-                       reset_cifs_unix_caps(xid, tcon, sb, &volume_info);
+               /* If find_unc succeeded then rc == 0 so we can not end */
+               /* up accidently freeing someone elses tcon struct */
+               if (tcon)
+                       cifs_put_tcon(tcon);
+               else if (pSesInfo)
+                       cifs_put_smb_ses(pSesInfo);
                else
-                       tcon->unix_ext = 0; /* server does not support them */
+                       cifs_put_tcp_session(srvTcp);
+               goto out;
+       }
+       cifs_sb->tcon = tcon;
 
-               /* convert forward to back slashes in prepath here if needed */
-               if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) == 0)
-                       convert_delimiter(cifs_sb->prepath,
-                                         CIFS_DIR_SEP(cifs_sb));
+       /* do not care if following two calls succeed - informational */
+       if (!tcon->ipc) {
+               CIFSSMBQFSDeviceInfo(xid, tcon);
+               CIFSSMBQFSAttributeInfo(xid, tcon);
+       }
 
-               if ((tcon->unix_ext == 0) && (cifs_sb->rsize > (1024 * 127))) {
-                       cifs_sb->rsize = 1024 * 127;
-                       cFYI(DBG2,
-                               ("no very large read support, rsize now 127K"));
-               }
-               if (!(tcon->ses->capabilities & CAP_LARGE_WRITE_X))
-                       cifs_sb->wsize = min(cifs_sb->wsize,
-                                            (tcon->ses->server->maxBuf -
-                                             MAX_CIFS_HDR_SIZE));
-               if (!(tcon->ses->capabilities & CAP_LARGE_READ_X))
-                       cifs_sb->rsize = min(cifs_sb->rsize,
-                                            (tcon->ses->server->maxBuf -
-                                             MAX_CIFS_HDR_SIZE));
+       /* tell server which Unix caps we support */
+       if (tcon->ses->capabilities & CAP_UNIX)
+               /* reset of caps checks mount to see if unix extensions
+                  disabled for just this mount */
+               reset_cifs_unix_caps(xid, tcon, sb, &volume_info);
+       else
+               tcon->unix_ext = 0; /* server does not support them */
+
+       /* convert forward to back slashes in prepath here if needed */
+       if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) == 0)
+               convert_delimiter(cifs_sb->prepath, CIFS_DIR_SEP(cifs_sb));
+
+       if ((tcon->unix_ext == 0) && (cifs_sb->rsize > (1024 * 127))) {
+               cifs_sb->rsize = 1024 * 127;
+               cFYI(DBG2, ("no very large read support, rsize now 127K"));
        }
+       if (!(tcon->ses->capabilities & CAP_LARGE_WRITE_X))
+               cifs_sb->wsize = min(cifs_sb->wsize,
+                              (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE));
+       if (!(tcon->ses->capabilities & CAP_LARGE_READ_X))
+               cifs_sb->rsize = min(cifs_sb->rsize,
+                              (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE));
 
        /* volume_info.password is freed above when existing session found
        (in which case it is not needed anymore) but when new sesion is created
@@ -3513,6 +3539,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
        /* above now done in SendReceive */
        if ((rc == 0) && (tcon != NULL)) {
                tcon->tidStatus = CifsGood;
+               tcon->need_reconnect = false;
                tcon->tid = smb_buffer_response->Tid;
                bcc_ptr = pByteArea(smb_buffer_response);
                length = strnlen(bcc_ptr, BCC(smb_buffer_response) - 2);
@@ -3584,48 +3611,17 @@ int
 cifs_umount(struct super_block *sb, struct cifs_sb_info *cifs_sb)
 {
        int rc = 0;
-       int xid;
-       struct cifsSesInfo *ses = NULL;
        char *tmp;
 
-       xid = GetXid();
-
-       if (cifs_sb->tcon) {
-               ses = cifs_sb->tcon->ses; /* save ptr to ses before delete tcon!*/
-               rc = CIFSSMBTDis(xid, cifs_sb->tcon);
-               if (rc == -EBUSY) {
-                       FreeXid(xid);
-                       return 0;
-               }
-               DeleteTconOplockQEntries(cifs_sb->tcon);
-               tconInfoFree(cifs_sb->tcon);
-               if ((ses) && (ses->server)) {
-                       /* save off task so we do not refer to ses later */
-                       cFYI(1, ("About to do SMBLogoff "));
-                       rc = CIFSSMBLogoff(xid, ses);
-                       if (rc == -EBUSY) {
-                               FreeXid(xid);
-                               return 0;
-                       } else if (rc == -ESHUTDOWN) {
-                               cFYI(1, ("Waking up socket by sending signal"));
-                               if (ses->server)
-                                       kill_cifsd(ses->server);
-                               rc = 0;
-                       } /* else - we have an smb session
-                               left on this socket do not kill cifsd */
-               } else
-                       cFYI(1, ("No session or bad tcon"));
-       }
+       if (cifs_sb->tcon)
+               cifs_put_tcon(cifs_sb->tcon);
 
        cifs_sb->tcon = NULL;
        tmp = cifs_sb->prepath;
        cifs_sb->prepathlen = 0;
        cifs_sb->prepath = NULL;
        kfree(tmp);
-       if (ses)
-               sesInfoFree(ses);
 
-       FreeXid(xid);
        return rc;
 }
 
@@ -3741,6 +3737,7 @@ int cifs_setup_session(unsigned int xid, struct cifsSesInfo *pSesInfo,
                cFYI(1, ("CIFS Session Established successfully"));
                        spin_lock(&GlobalMid_Lock);
                        pSesInfo->status = CifsGood;
+                       pSesInfo->need_reconnect = false;
                        spin_unlock(&GlobalMid_Lock);
        }
 
index ead1a3bb02564722f98e3f93aa068ade04022503..f0a81e631ae60bed3ec139833a2a1a63cef45642 100644 (file)
@@ -488,12 +488,13 @@ int cifs_close(struct inode *inode, struct file *file)
        pTcon = cifs_sb->tcon;
        if (pSMBFile) {
                struct cifsLockInfo *li, *tmp;
-
+               write_lock(&GlobalSMBSeslock);
                pSMBFile->closePend = true;
                if (pTcon) {
                        /* no sense reconnecting to close a file that is
                           already closed */
-                       if (pTcon->tidStatus != CifsNeedReconnect) {
+                       if (!pTcon->need_reconnect) {
+                               write_unlock(&GlobalSMBSeslock);
                                timeout = 2;
                                while ((atomic_read(&pSMBFile->wrtPending) != 0)
                                        && (timeout <= 2048)) {
@@ -510,12 +511,15 @@ int cifs_close(struct inode *inode, struct file *file)
                                        timeout *= 4;
                                }
                                if (atomic_read(&pSMBFile->wrtPending))
-                                       cERROR(1,
-                                               ("close with pending writes"));
-                               rc = CIFSSMBClose(xid, pTcon,
+                                       cERROR(1, ("close with pending write"));
+                               if (!pTcon->need_reconnect &&
+                                   !pSMBFile->invalidHandle)
+                                       rc = CIFSSMBClose(xid, pTcon,
                                                  pSMBFile->netfid);
-                       }
-               }
+                       } else
+                               write_unlock(&GlobalSMBSeslock);
+               } else
+                       write_unlock(&GlobalSMBSeslock);
 
                /* Delete any outstanding lock records.
                   We'll lose them when the file is closed anyway. */
@@ -587,15 +591,18 @@ int cifs_closedir(struct inode *inode, struct file *file)
                pTcon = cifs_sb->tcon;
 
                cFYI(1, ("Freeing private data in close dir"));
+               write_lock(&GlobalSMBSeslock);
                if (!pCFileStruct->srch_inf.endOfSearch &&
                    !pCFileStruct->invalidHandle) {
                        pCFileStruct->invalidHandle = true;
+                       write_unlock(&GlobalSMBSeslock);
                        rc = CIFSFindClose(xid, pTcon, pCFileStruct->netfid);
                        cFYI(1, ("Closing uncompleted readdir with rc %d",
                                 rc));
                        /* not much we can do if it fails anyway, ignore rc */
                        rc = 0;
-               }
+               } else
+                       write_unlock(&GlobalSMBSeslock);
                ptmp = pCFileStruct->srch_inf.ntwrk_buf_start;
                if (ptmp) {
                        cFYI(1, ("closedir free smb buf in srch struct"));
@@ -1404,7 +1411,10 @@ retry:
                        if ((wbc->nr_to_write -= n_iov) <= 0)
                                done = 1;
                        index = next;
-               }
+               } else
+                       /* Need to re-find the pages we skipped */
+                       index = pvec.pages[0]->index + 1;
+
                pagevec_release(&pvec);
        }
        if (!scanned && !done) {
@@ -1465,7 +1475,11 @@ static int cifs_write_end(struct file *file, struct address_space *mapping,
        cFYI(1, ("write_end for page %p from pos %lld with %d bytes",
                 page, pos, copied));
 
-       if (!PageUptodate(page) && copied == PAGE_CACHE_SIZE)
+       if (PageChecked(page)) {
+               if (copied == len)
+                       SetPageUptodate(page);
+               ClearPageChecked(page);
+       } else if (!PageUptodate(page) && copied == PAGE_CACHE_SIZE)
                SetPageUptodate(page);
 
        if (!PageUptodate(page)) {
@@ -2052,39 +2066,70 @@ static int cifs_write_begin(struct file *file, struct address_space *mapping,
 {
        pgoff_t index = pos >> PAGE_CACHE_SHIFT;
        loff_t offset = pos & (PAGE_CACHE_SIZE - 1);
+       loff_t page_start = pos & PAGE_MASK;
+       loff_t i_size;
+       struct page *page;
+       int rc = 0;
 
        cFYI(1, ("write_begin from %lld len %d", (long long)pos, len));
 
-       *pagep = __grab_cache_page(mapping, index);
-       if (!*pagep)
-               return -ENOMEM;
-
-       if (PageUptodate(*pagep))
-               return 0;
+       page = __grab_cache_page(mapping, index);
+       if (!page) {
+               rc = -ENOMEM;
+               goto out;
+       }
 
-       /* If we are writing a full page it will be up to date,
-          no need to read from the server */
-       if (len == PAGE_CACHE_SIZE && flags & AOP_FLAG_UNINTERRUPTIBLE)
-               return 0;
+       if (PageUptodate(page))
+               goto out;
 
-       if ((file->f_flags & O_ACCMODE) != O_WRONLY) {
-               int rc;
+       /*
+        * If we write a full page it will be up to date, no need to read from
+        * the server. If the write is short, we'll end up doing a sync write
+        * instead.
+        */
+       if (len == PAGE_CACHE_SIZE)
+               goto out;
 
-               /* might as well read a page, it is fast enough */
-               rc = cifs_readpage_worker(file, *pagep, &offset);
+       /*
+        * optimize away the read when we have an oplock, and we're not
+        * expecting to use any of the data we'd be reading in. That
+        * is, when the page lies beyond the EOF, or straddles the EOF
+        * and the write will cover all of the existing data.
+        */
+       if (CIFS_I(mapping->host)->clientCanCacheRead) {
+               i_size = i_size_read(mapping->host);
+               if (page_start >= i_size ||
+                   (offset == 0 && (pos + len) >= i_size)) {
+                       zero_user_segments(page, 0, offset,
+                                          offset + len,
+                                          PAGE_CACHE_SIZE);
+                       /*
+                        * PageChecked means that the parts of the page
+                        * to which we're not writing are considered up
+                        * to date. Once the data is copied to the
+                        * page, it can be set uptodate.
+                        */
+                       SetPageChecked(page);
+                       goto out;
+               }
+       }
 
-               /* we do not need to pass errors back
-                  e.g. if we do not have read access to the file
-                  because cifs_write_end will attempt synchronous writes
-                  -- shaggy */
+       if ((file->f_flags & O_ACCMODE) != O_WRONLY) {
+               /*
+                * might as well read a page, it is fast enough. If we get
+                * an error, we don't need to return it. cifs_write_end will
+                * do a sync write instead since PG_uptodate isn't set.
+                */
+               cifs_readpage_worker(file, page, &page_start);
        } else {
                /* we could try using another file handle if there is one -
                   but how would we lock it to prevent close of that handle
                   racing with this read? In any case
                   this will be written out by write_end so is fine */
        }
-
-       return 0;
+out:
+       *pagep = page;
+       return rc;
 }
 
 const struct address_space_operations cifs_addr_ops = {
index 88786ba02d277fac25923893c29bb96206e42827..9ee3f689c2b0c0f78468082658d0aad8cf56791c 100644 (file)
@@ -75,12 +75,12 @@ sesInfoAlloc(void)
 
        ret_buf = kzalloc(sizeof(struct cifsSesInfo), GFP_KERNEL);
        if (ret_buf) {
-               write_lock(&GlobalSMBSeslock);
                atomic_inc(&sesInfoAllocCount);
                ret_buf->status = CifsNew;
-               list_add(&ret_buf->cifsSessionList, &GlobalSMBSessionList);
+               ++ret_buf->ses_count;
+               INIT_LIST_HEAD(&ret_buf->smb_ses_list);
+               INIT_LIST_HEAD(&ret_buf->tcon_list);
                init_MUTEX(&ret_buf->sesSem);
-               write_unlock(&GlobalSMBSeslock);
        }
        return ret_buf;
 }
@@ -93,10 +93,7 @@ sesInfoFree(struct cifsSesInfo *buf_to_free)
                return;
        }
 
-       write_lock(&GlobalSMBSeslock);
        atomic_dec(&sesInfoAllocCount);
-       list_del(&buf_to_free->cifsSessionList);
-       write_unlock(&GlobalSMBSeslock);
        kfree(buf_to_free->serverOS);
        kfree(buf_to_free->serverDomain);
        kfree(buf_to_free->serverNOS);
@@ -111,17 +108,14 @@ tconInfoAlloc(void)
        struct cifsTconInfo *ret_buf;
        ret_buf = kzalloc(sizeof(struct cifsTconInfo), GFP_KERNEL);
        if (ret_buf) {
-               write_lock(&GlobalSMBSeslock);
                atomic_inc(&tconInfoAllocCount);
-               list_add(&ret_buf->cifsConnectionList,
-                        &GlobalTreeConnectionList);
                ret_buf->tidStatus = CifsNew;
+               ++ret_buf->tc_count;
                INIT_LIST_HEAD(&ret_buf->openFileList);
-               init_MUTEX(&ret_buf->tconSem);
+               INIT_LIST_HEAD(&ret_buf->tcon_list);
 #ifdef CONFIG_CIFS_STATS
                spin_lock_init(&ret_buf->stat_lock);
 #endif
-               write_unlock(&GlobalSMBSeslock);
        }
        return ret_buf;
 }
@@ -133,10 +127,7 @@ tconInfoFree(struct cifsTconInfo *buf_to_free)
                cFYI(1, ("Null buffer passed to tconInfoFree"));
                return;
        }
-       write_lock(&GlobalSMBSeslock);
        atomic_dec(&tconInfoAllocCount);
-       list_del(&buf_to_free->cifsConnectionList);
-       write_unlock(&GlobalSMBSeslock);
        kfree(buf_to_free->nativeFileSystem);
        kfree(buf_to_free);
 }
@@ -350,9 +341,9 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
                                if (current->fsuid != treeCon->ses->linux_uid) {
                                        cFYI(1, ("Multiuser mode and UID "
                                                 "did not match tcon uid"));
-                                       read_lock(&GlobalSMBSeslock);
-                                       list_for_each(temp_item, &GlobalSMBSessionList) {
-                                               ses = list_entry(temp_item, struct cifsSesInfo, cifsSessionList);
+                                       read_lock(&cifs_tcp_ses_lock);
+                                       list_for_each(temp_item, &treeCon->ses->server->smb_ses_list) {
+                                               ses = list_entry(temp_item, struct cifsSesInfo, smb_ses_list);
                                                if (ses->linux_uid == current->fsuid) {
                                                        if (ses->server == treeCon->ses->server) {
                                                                cFYI(1, ("found matching uid substitute right smb_uid"));
@@ -364,7 +355,7 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
                                                        }
                                                }
                                        }
-                                       read_unlock(&GlobalSMBSeslock);
+                                       read_unlock(&cifs_tcp_ses_lock);
                                }
                        }
                }
@@ -497,9 +488,10 @@ bool
 is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
 {
        struct smb_com_lock_req *pSMB = (struct smb_com_lock_req *)buf;
-       struct list_head *tmp;
-       struct list_head *tmp1;
+       struct list_head *tmp, *tmp1, *tmp2;
+       struct cifsSesInfo *ses;
        struct cifsTconInfo *tcon;
+       struct cifsInodeInfo *pCifsInode;
        struct cifsFileInfo *netfile;
 
        cFYI(1, ("Checking for oplock break or dnotify response"));
@@ -554,42 +546,45 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
                return false;
 
        /* look up tcon based on tid & uid */
-       read_lock(&GlobalSMBSeslock);
-       list_for_each(tmp, &GlobalTreeConnectionList) {
-               tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
-               if ((tcon->tid == buf->Tid) && (srv == tcon->ses->server)) {
+       read_lock(&cifs_tcp_ses_lock);
+       list_for_each(tmp, &srv->smb_ses_list) {
+               ses = list_entry(tmp, struct cifsSesInfo, smb_ses_list);
+               list_for_each(tmp1, &ses->tcon_list) {
+                       tcon = list_entry(tmp1, struct cifsTconInfo, tcon_list);
+                       if (tcon->tid != buf->Tid)
+                               continue;
+
                        cifs_stats_inc(&tcon->num_oplock_brks);
-                       list_for_each(tmp1, &tcon->openFileList) {
-                               netfile = list_entry(tmp1, struct cifsFileInfo,
+                       write_lock(&GlobalSMBSeslock);
+                       list_for_each(tmp2, &tcon->openFileList) {
+                               netfile = list_entry(tmp2, struct cifsFileInfo,
                                                     tlist);
-                               if (pSMB->Fid == netfile->netfid) {
-                                       struct cifsInodeInfo *pCifsInode;
-                                       read_unlock(&GlobalSMBSeslock);
-                                       cFYI(1,
-                                           ("file id match, oplock break"));
-                                       pCifsInode =
-                                               CIFS_I(netfile->pInode);
-                                       pCifsInode->clientCanCacheAll = false;
-                                       if (pSMB->OplockLevel == 0)
-                                               pCifsInode->clientCanCacheRead
-                                                       = false;
-                                       pCifsInode->oplockPending = true;
-                                       AllocOplockQEntry(netfile->pInode,
-                                                         netfile->netfid,
-                                                         tcon);
-                                       cFYI(1,
-                                           ("about to wake up oplock thread"));
-                                       if (oplockThread)
-                                           wake_up_process(oplockThread);
-                                       return true;
-                               }
+                               if (pSMB->Fid != netfile->netfid)
+                                       continue;
+
+                               write_unlock(&GlobalSMBSeslock);
+                               read_unlock(&cifs_tcp_ses_lock);
+                               cFYI(1, ("file id match, oplock break"));
+                               pCifsInode = CIFS_I(netfile->pInode);
+                               pCifsInode->clientCanCacheAll = false;
+                               if (pSMB->OplockLevel == 0)
+                                       pCifsInode->clientCanCacheRead = false;
+                               pCifsInode->oplockPending = true;
+                               AllocOplockQEntry(netfile->pInode,
+                                                 netfile->netfid, tcon);
+                               cFYI(1, ("about to wake up oplock thread"));
+                               if (oplockThread)
+                                       wake_up_process(oplockThread);
+
+                               return true;
                        }
-                       read_unlock(&GlobalSMBSeslock);
+                       write_unlock(&GlobalSMBSeslock);
+                       read_unlock(&cifs_tcp_ses_lock);
                        cFYI(1, ("No matching file for oplock break"));
                        return true;
                }
        }
-       read_unlock(&GlobalSMBSeslock);
+       read_unlock(&cifs_tcp_ses_lock);
        cFYI(1, ("Can not process oplock break for non-existent connection"));
        return true;
 }
index 58d57299f2a08c432625f9be298e731e2fa7bae0..9f51f9bf0292f4a67aee9ca82aae2f6d3b6cc5d0 100644 (file)
@@ -741,11 +741,14 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
           (index_to_find < first_entry_in_buffer)) {
                /* close and restart search */
                cFYI(1, ("search backing up - close and restart search"));
+               write_lock(&GlobalSMBSeslock);
                if (!cifsFile->srch_inf.endOfSearch &&
                    !cifsFile->invalidHandle) {
                        cifsFile->invalidHandle = true;
+                       write_unlock(&GlobalSMBSeslock);
                        CIFSFindClose(xid, pTcon, cifsFile->netfid);
-               }
+               } else
+                       write_unlock(&GlobalSMBSeslock);
                if (cifsFile->srch_inf.ntwrk_buf_start) {
                        cFYI(1, ("freeing SMB ff cache buf on search rewind"));
                        if (cifsFile->srch_inf.smallBuf)
index d910501de6d2ca9d4fc8ed1a1cda8d9a1aca1519..8d86b7960f0df7527fed5494230676b137b4f63b 100644 (file)
@@ -812,7 +812,7 @@ int dlm_release_lockspace(void *lockspace, int force)
        error = release_lockspace(ls, force);
        if (!error)
                ls_count--;
-       else if (!ls_count)
+       if (!ls_count)
                threads_stop();
        mutex_unlock(&ls_lock);
 
index e22bc39613458e98fe35169b4de06412d9a4ec3f..0d713b6919411375b4831c4e8c0f89419dfbd767 100644 (file)
@@ -1037,17 +1037,14 @@ static int
 decrypt_passphrase_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
                                         struct ecryptfs_crypt_stat *crypt_stat)
 {
-       struct scatterlist dst_sg;
-       struct scatterlist src_sg;
+       struct scatterlist dst_sg[2];
+       struct scatterlist src_sg[2];
        struct mutex *tfm_mutex;
        struct blkcipher_desc desc = {
                .flags = CRYPTO_TFM_REQ_MAY_SLEEP
        };
        int rc = 0;
 
-       sg_init_table(&dst_sg, 1);
-       sg_init_table(&src_sg, 1);
-
        if (unlikely(ecryptfs_verbosity > 0)) {
                ecryptfs_printk(
                        KERN_DEBUG, "Session key encryption key (size [%d]):\n",
@@ -1066,8 +1063,8 @@ decrypt_passphrase_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
        }
        rc = virt_to_scatterlist(auth_tok->session_key.encrypted_key,
                                 auth_tok->session_key.encrypted_key_size,
-                                &src_sg, 1);
-       if (rc != 1) {
+                                src_sg, 2);
+       if (rc < 1 || rc > 2) {
                printk(KERN_ERR "Internal error whilst attempting to convert "
                        "auth_tok->session_key.encrypted_key to scatterlist; "
                        "expected rc = 1; got rc = [%d]. "
@@ -1079,8 +1076,8 @@ decrypt_passphrase_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
                auth_tok->session_key.encrypted_key_size;
        rc = virt_to_scatterlist(auth_tok->session_key.decrypted_key,
                                 auth_tok->session_key.decrypted_key_size,
-                                &dst_sg, 1);
-       if (rc != 1) {
+                                dst_sg, 2);
+       if (rc < 1 || rc > 2) {
                printk(KERN_ERR "Internal error whilst attempting to convert "
                        "auth_tok->session_key.decrypted_key to scatterlist; "
                        "expected rc = 1; got rc = [%d]\n", rc);
@@ -1096,7 +1093,7 @@ decrypt_passphrase_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
                rc = -EINVAL;
                goto out;
        }
-       rc = crypto_blkcipher_decrypt(&desc, &dst_sg, &src_sg,
+       rc = crypto_blkcipher_decrypt(&desc, dst_sg, src_sg,
                                      auth_tok->session_key.encrypted_key_size);
        mutex_unlock(tfm_mutex);
        if (unlikely(rc)) {
@@ -1539,8 +1536,8 @@ write_tag_3_packet(char *dest, size_t *remaining_bytes,
        size_t i;
        size_t encrypted_session_key_valid = 0;
        char session_key_encryption_key[ECRYPTFS_MAX_KEY_BYTES];
-       struct scatterlist dst_sg;
-       struct scatterlist src_sg;
+       struct scatterlist dst_sg[2];
+       struct scatterlist src_sg[2];
        struct mutex *tfm_mutex = NULL;
        u8 cipher_code;
        size_t packet_size_length;
@@ -1619,8 +1616,8 @@ write_tag_3_packet(char *dest, size_t *remaining_bytes,
                ecryptfs_dump_hex(session_key_encryption_key, 16);
        }
        rc = virt_to_scatterlist(crypt_stat->key, key_rec->enc_key_size,
-                                &src_sg, 1);
-       if (rc != 1) {
+                                src_sg, 2);
+       if (rc < 1 || rc > 2) {
                ecryptfs_printk(KERN_ERR, "Error generating scatterlist "
                                "for crypt_stat session key; expected rc = 1; "
                                "got rc = [%d]. key_rec->enc_key_size = [%d]\n",
@@ -1629,8 +1626,8 @@ write_tag_3_packet(char *dest, size_t *remaining_bytes,
                goto out;
        }
        rc = virt_to_scatterlist(key_rec->enc_key, key_rec->enc_key_size,
-                                &dst_sg, 1);
-       if (rc != 1) {
+                                dst_sg, 2);
+       if (rc < 1 || rc > 2) {
                ecryptfs_printk(KERN_ERR, "Error generating scatterlist "
                                "for crypt_stat encrypted session key; "
                                "expected rc = 1; got rc = [%d]. "
@@ -1651,7 +1648,7 @@ write_tag_3_packet(char *dest, size_t *remaining_bytes,
        rc = 0;
        ecryptfs_printk(KERN_DEBUG, "Encrypting [%d] bytes of the key\n",
                        crypt_stat->key_size);
-       rc = crypto_blkcipher_encrypt(&desc, &dst_sg, &src_sg,
+       rc = crypto_blkcipher_encrypt(&desc, dst_sg, src_sg,
                                      (*key_rec).enc_key_size);
        mutex_unlock(tfm_mutex);
        if (rc) {
index aec5c13f634177bab34f108e9f4891e300b873a3..96355d505347414fc67dd1a7cd21503bdffa3c91 100644 (file)
 
 #define EP_UNACTIVE_PTR ((void *) -1L)
 
+#define EP_ITEM_COST (sizeof(struct epitem) + sizeof(struct eppoll_entry))
+
 struct epoll_filefd {
        struct file *file;
        int fd;
@@ -200,6 +202,9 @@ struct eventpoll {
         * holding ->lock.
         */
        struct epitem *ovflist;
+
+       /* The user that created the eventpoll descriptor */
+       struct user_struct *user;
 };
 
 /* Wait structure used by the poll hooks */
@@ -226,10 +231,18 @@ struct ep_pqueue {
        struct epitem *epi;
 };
 
+/*
+ * Configuration options available inside /proc/sys/fs/epoll/
+ */
+/* Maximum number of epoll devices, per user */
+static int max_user_instances __read_mostly;
+/* Maximum number of epoll watched descriptors, per user */
+static int max_user_watches __read_mostly;
+
 /*
  * This mutex is used to serialize ep_free() and eventpoll_release_file().
  */
-static struct mutex epmutex;
+static DEFINE_MUTEX(epmutex);
 
 /* Safe wake up implementation */
 static struct poll_safewake psw;
@@ -240,6 +253,33 @@ static struct kmem_cache *epi_cache __read_mostly;
 /* Slab cache used to allocate "struct eppoll_entry" */
 static struct kmem_cache *pwq_cache __read_mostly;
 
+#ifdef CONFIG_SYSCTL
+
+#include <linux/sysctl.h>
+
+static int zero;
+
+ctl_table epoll_table[] = {
+       {
+               .procname       = "max_user_instances",
+               .data           = &max_user_instances,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec_minmax,
+               .extra1         = &zero,
+       },
+       {
+               .procname       = "max_user_watches",
+               .data           = &max_user_watches,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec_minmax,
+               .extra1         = &zero,
+       },
+       { .ctl_name = 0 }
+};
+#endif /* CONFIG_SYSCTL */
+
 
 /* Setup the structure that is used as key for the RB tree */
 static inline void ep_set_ffd(struct epoll_filefd *ffd,
@@ -402,6 +442,8 @@ static int ep_remove(struct eventpoll *ep, struct epitem *epi)
        /* At this point it is safe to free the eventpoll item */
        kmem_cache_free(epi_cache, epi);
 
+       atomic_dec(&ep->user->epoll_watches);
+
        DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ep_remove(%p, %p)\n",
                     current, ep, file));
 
@@ -449,6 +491,8 @@ static void ep_free(struct eventpoll *ep)
 
        mutex_unlock(&epmutex);
        mutex_destroy(&ep->mtx);
+       atomic_dec(&ep->user->epoll_devs);
+       free_uid(ep->user);
        kfree(ep);
 }
 
@@ -532,10 +576,19 @@ void eventpoll_release_file(struct file *file)
 
 static int ep_alloc(struct eventpoll **pep)
 {
-       struct eventpoll *ep = kzalloc(sizeof(*ep), GFP_KERNEL);
+       int error;
+       struct user_struct *user;
+       struct eventpoll *ep;
 
-       if (!ep)
-               return -ENOMEM;
+       user = get_current_user();
+       error = -EMFILE;
+       if (unlikely(atomic_read(&user->epoll_devs) >=
+                       max_user_instances))
+               goto free_uid;
+       error = -ENOMEM;
+       ep = kzalloc(sizeof(*ep), GFP_KERNEL);
+       if (unlikely(!ep))
+               goto free_uid;
 
        spin_lock_init(&ep->lock);
        mutex_init(&ep->mtx);
@@ -544,12 +597,17 @@ static int ep_alloc(struct eventpoll **pep)
        INIT_LIST_HEAD(&ep->rdllist);
        ep->rbr = RB_ROOT;
        ep->ovflist = EP_UNACTIVE_PTR;
+       ep->user = user;
 
        *pep = ep;
 
        DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ep_alloc() ep=%p\n",
                     current, ep));
        return 0;
+
+free_uid:
+       free_uid(user);
+       return error;
 }
 
 /*
@@ -703,9 +761,11 @@ static int ep_insert(struct eventpoll *ep, struct epoll_event *event,
        struct epitem *epi;
        struct ep_pqueue epq;
 
-       error = -ENOMEM;
+       if (unlikely(atomic_read(&ep->user->epoll_watches) >=
+                    max_user_watches))
+               return -ENOSPC;
        if (!(epi = kmem_cache_alloc(epi_cache, GFP_KERNEL)))
-               goto error_return;
+               return -ENOMEM;
 
        /* Item initialization follow here ... */
        INIT_LIST_HEAD(&epi->rdllink);
@@ -735,6 +795,7 @@ static int ep_insert(struct eventpoll *ep, struct epoll_event *event,
         * install process. Namely an allocation for a wait queue failed due
         * high memory pressure.
         */
+       error = -ENOMEM;
        if (epi->nwait < 0)
                goto error_unregister;
 
@@ -765,6 +826,8 @@ static int ep_insert(struct eventpoll *ep, struct epoll_event *event,
 
        spin_unlock_irqrestore(&ep->lock, flags);
 
+       atomic_inc(&ep->user->epoll_watches);
+
        /* We have to call this outside the lock */
        if (pwake)
                ep_poll_safewake(&psw, &ep->poll_wait);
@@ -789,7 +852,7 @@ error_unregister:
        spin_unlock_irqrestore(&ep->lock, flags);
 
        kmem_cache_free(epi_cache, epi);
-error_return:
+
        return error;
 }
 
@@ -1078,6 +1141,7 @@ asmlinkage long sys_epoll_create1(int flags)
                              flags & O_CLOEXEC);
        if (fd < 0)
                ep_free(ep);
+       atomic_inc(&ep->user->epoll_devs);
 
 error_return:
        DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d) = %d\n",
@@ -1299,7 +1363,12 @@ asmlinkage long sys_epoll_pwait(int epfd, struct epoll_event __user *events,
 
 static int __init eventpoll_init(void)
 {
-       mutex_init(&epmutex);
+       struct sysinfo si;
+
+       si_meminfo(&si);
+       max_user_instances = 128;
+       max_user_watches = (((si.totalram - si.totalhigh) / 32) << PAGE_SHIFT) /
+               EP_ITEM_COST;
 
        /* Initialize the structure used to perform safe poll wait head wake ups */
        ep_poll_safewake_init(&psw);
index 4e834f16d9da7d49c0f232b9fd46a7db2c680070..ec5df9a38313397565e44173cc434e09f6fc6ec4 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1159,6 +1159,7 @@ EXPORT_SYMBOL(remove_arg_zero);
  */
 int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
 {
+       unsigned int depth = bprm->recursion_depth;
        int try,retval;
        struct linux_binfmt *fmt;
 #ifdef __alpha__
@@ -1219,8 +1220,15 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
                                continue;
                        read_unlock(&binfmt_lock);
                        retval = fn(bprm, regs);
+                       /*
+                        * Restore the depth counter to its starting value
+                        * in this call, so we don't have to rely on every
+                        * load_binary function to restore it on return.
+                        */
+                       bprm->recursion_depth = depth;
                        if (retval >= 0) {
-                               tracehook_report_exec(fmt, bprm, regs);
+                               if (depth == 0)
+                                       tracehook_report_exec(fmt, bprm, regs);
                                put_binfmt(fmt);
                                allow_write_access(bprm->file);
                                if (bprm->file)
index 80246bad1b7fe513a7da15f4d6ac057cad3d7e54..890e018288171e90d9991b47e7077dfbaf9c7cf8 100644 (file)
@@ -367,6 +367,8 @@ struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid,
         * Try to get any dentry for the given file handle from the filesystem.
         */
        result = nop->fh_to_dentry(mnt->mnt_sb, fid, fh_len, fileid_type);
+       if (!result)
+               result = ERR_PTR(-ESTALE);
        if (IS_ERR(result))
                return result;
 
@@ -420,6 +422,8 @@ struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid,
 
                target_dir = nop->fh_to_parent(mnt->mnt_sb, fid,
                                fh_len, fileid_type);
+               if (!target_dir)
+                       goto err_result;
                err = PTR_ERR(target_dir);
                if (IS_ERR(target_dir))
                        goto err_result;
index 5dec6d1356c4b07477bb40f68305c0d9de89258b..f6c94f232ec1e8fee05e47dfcc54b234c82e7cf0 100644 (file)
@@ -2375,12 +2375,9 @@ int ext3_force_commit(struct super_block *sb)
 /*
  * Ext3 always journals updates to the superblock itself, so we don't
  * have to propagate any other updates to the superblock on disk at this
- * point.  Just start an async writeback to get the buffers on their way
- * to the disk.
- *
- * This implicitly triggers the writebehind on sync().
+ * point.  (We can probably nuke this function altogether, and remove
+ * any mention to sb->s_dirt in all of fs/ext3; eventual cleanup...)
  */
-
 static void ext3_write_super (struct super_block * sb)
 {
        if (mutex_trylock(&sb->s_lock) != 0)
index d2003cdc36aa687ab998a8c558144ddcc23ae6bb..db35cfdb3c8b6e25424a78af0aaaa69579cc2a07 100644 (file)
@@ -609,8 +609,8 @@ int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks)
 
        if (free_blocks - (nblocks + root_blocks + dirty_blocks) <
                                                EXT4_FREEBLOCKS_WATERMARK) {
-               free_blocks  = percpu_counter_sum(fbc);
-               dirty_blocks = percpu_counter_sum(dbc);
+               free_blocks  = percpu_counter_sum_positive(fbc);
+               dirty_blocks = percpu_counter_sum_positive(dbc);
                if (dirty_blocks < 0) {
                        printk(KERN_CRIT "Dirty block accounting "
                                        "went wrong %lld\n",
index ac4f7db9f13452790e4d41daa8e6fc9633506259..549daf8005fb5da252252d7e5bf0e73185250169 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/signal.h>
 #include <linux/rcupdate.h>
 #include <linux/pid_namespace.h>
+#include <linux/smp_lock.h>
 
 #include <asm/poll.h>
 #include <asm/siginfo.h>
@@ -175,6 +176,11 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
        if (error)
                return error;
 
+       /*
+        * We still need a lock here for now to keep multiple FASYNC calls
+        * from racing with each other.
+        */
+       lock_kernel();
        if ((arg ^ filp->f_flags) & FASYNC) {
                if (filp->f_op && filp->f_op->fasync) {
                        error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0);
@@ -185,6 +191,7 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
 
        filp->f_flags = (arg & SETFL_MASK) | (filp->f_flags & ~SETFL_MASK);
  out:
+       unlock_kernel();
        return error;
 }
 
index 6ae9011b95eb4bbf2ea46f823497686bd1820e5a..2f34f8f2134b31b3082dab1087abd67de0594465 100644 (file)
@@ -81,7 +81,7 @@ extern int do_rmdir(const char *file);
 extern int do_mknod(const char *file, int mode, unsigned int major,
                    unsigned int minor);
 extern int link_file(const char *from, const char *to);
-extern int do_readlink(char *file, char *buf, int size);
+extern int hostfs_do_readlink(char *file, char *buf, int size);
 extern int rename_file(char *from, char *to);
 extern int do_statfs(char *root, long *bsize_out, long long *blocks_out,
                     long long *bfree_out, long long *bavail_out,
index 7f34f4385de00dbcca17d9d3bf7c45bd0aedc1d7..3a31451ac1704a86ef3d3b7ae9e9a73240ff29ad 100644 (file)
@@ -168,7 +168,7 @@ static char *follow_link(char *link)
                if (name == NULL)
                        goto out;
 
-               n = do_readlink(link, name, len);
+               n = hostfs_do_readlink(link, name, len);
                if (n < len)
                        break;
                len *= 2;
@@ -943,7 +943,7 @@ int hostfs_link_readpage(struct file *file, struct page *page)
        name = inode_name(page->mapping->host, 0);
        if (name == NULL)
                return -ENOMEM;
-       err = do_readlink(name, buffer, PAGE_CACHE_SIZE);
+       err = hostfs_do_readlink(name, buffer, PAGE_CACHE_SIZE);
        kfree(name);
        if (err == PAGE_CACHE_SIZE)
                err = -E2BIG;
index 53fd0a67c11abf148a76cea7820a1a3c782adc26..b79424f9328298e60bdae763ffd85669d1d96214 100644 (file)
@@ -377,7 +377,7 @@ int link_file(const char *to, const char *from)
        return 0;
 }
 
-int do_readlink(char *file, char *buf, int size)
+int hostfs_do_readlink(char *file, char *buf, int size)
 {
        int n;
 
index 690e72595e6e6048addba645cf179cb418208f50..dae3f28f30d4779ee69cc8780d8424818b0fbfa4 100644 (file)
@@ -106,6 +106,20 @@ void get_inotify_watch(struct inotify_watch *watch)
 }
 EXPORT_SYMBOL_GPL(get_inotify_watch);
 
+int pin_inotify_watch(struct inotify_watch *watch)
+{
+       struct super_block *sb = watch->inode->i_sb;
+       spin_lock(&sb_lock);
+       if (sb->s_count >= S_BIAS) {
+               atomic_inc(&sb->s_active);
+               spin_unlock(&sb_lock);
+               atomic_inc(&watch->count);
+               return 1;
+       }
+       spin_unlock(&sb_lock);
+       return 0;
+}
+
 /**
  * put_inotify_watch - decrements the ref count on a given watch.  cleans up
  * watch references if the count reaches zero.  inotify_watch is freed by
@@ -124,6 +138,13 @@ void put_inotify_watch(struct inotify_watch *watch)
 }
 EXPORT_SYMBOL_GPL(put_inotify_watch);
 
+void unpin_inotify_watch(struct inotify_watch *watch)
+{
+       struct super_block *sb = watch->inode->i_sb;
+       put_inotify_watch(watch);
+       deactivate_super(sb);
+}
+
 /*
  * inotify_handle_get_wd - returns the next WD for use by the given handle
  *
@@ -407,11 +428,13 @@ void inotify_unmount_inodes(struct list_head *list)
                watches = &inode->inotify_watches;
                list_for_each_entry_safe(watch, next_w, watches, i_list) {
                        struct inotify_handle *ih= watch->ih;
+                       get_inotify_watch(watch);
                        mutex_lock(&ih->mutex);
                        ih->in_ops->handle_event(watch, watch->wd, IN_UNMOUNT, 0,
                                                 NULL, NULL);
                        inotify_remove_watch_locked(ih, watch);
                        mutex_unlock(&ih->mutex);
+                       put_inotify_watch(watch);
                }
                mutex_unlock(&inode->inotify_mutex);
                iput(inode);            
@@ -479,6 +502,112 @@ void inotify_init_watch(struct inotify_watch *watch)
 }
 EXPORT_SYMBOL_GPL(inotify_init_watch);
 
+/*
+ * Watch removals suck violently.  To kick the watch out we need (in this
+ * order) inode->inotify_mutex and ih->mutex.  That's fine if we have
+ * a hold on inode; however, for all other cases we need to make damn sure
+ * we don't race with umount.  We can *NOT* just grab a reference to a
+ * watch - inotify_unmount_inodes() will happily sail past it and we'll end
+ * with reference to inode potentially outliving its superblock.  Ideally
+ * we just want to grab an active reference to superblock if we can; that
+ * will make sure we won't go into inotify_umount_inodes() until we are
+ * done.  Cleanup is just deactivate_super().  However, that leaves a messy
+ * case - what if we *are* racing with umount() and active references to
+ * superblock can't be acquired anymore?  We can bump ->s_count, grab
+ * ->s_umount, which will almost certainly wait until the superblock is shut
+ * down and the watch in question is pining for fjords.  That's fine, but
+ * there is a problem - we might have hit the window between ->s_active
+ * getting to 0 / ->s_count - below S_BIAS (i.e. the moment when superblock
+ * is past the point of no return and is heading for shutdown) and the
+ * moment when deactivate_super() acquires ->s_umount.  We could just do
+ * drop_super() yield() and retry, but that's rather antisocial and this
+ * stuff is luser-triggerable.  OTOH, having grabbed ->s_umount and having
+ * found that we'd got there first (i.e. that ->s_root is non-NULL) we know
+ * that we won't race with inotify_umount_inodes().  So we could grab a
+ * reference to watch and do the rest as above, just with drop_super() instead
+ * of deactivate_super(), right?  Wrong.  We had to drop ih->mutex before we
+ * could grab ->s_umount.  So the watch could've been gone already.
+ *
+ * That still can be dealt with - we need to save watch->wd, do idr_find()
+ * and compare its result with our pointer.  If they match, we either have
+ * the damn thing still alive or we'd lost not one but two races at once,
+ * the watch had been killed and a new one got created with the same ->wd
+ * at the same address.  That couldn't have happened in inotify_destroy(),
+ * but inotify_rm_wd() could run into that.  Still, "new one got created"
+ * is not a problem - we have every right to kill it or leave it alone,
+ * whatever's more convenient.
+ *
+ * So we can use idr_find(...) == watch && watch->inode->i_sb == sb as
+ * "grab it and kill it" check.  If it's been our original watch, we are
+ * fine, if it's a newcomer - nevermind, just pretend that we'd won the
+ * race and kill the fscker anyway; we are safe since we know that its
+ * superblock won't be going away.
+ *
+ * And yes, this is far beyond mere "not very pretty"; so's the entire
+ * concept of inotify to start with.
+ */
+
+/**
+ * pin_to_kill - pin the watch down for removal
+ * @ih: inotify handle
+ * @watch: watch to kill
+ *
+ * Called with ih->mutex held, drops it.  Possible return values:
+ * 0 - nothing to do, it has died
+ * 1 - remove it, drop the reference and deactivate_super()
+ * 2 - remove it, drop the reference and drop_super(); we tried hard to avoid
+ * that variant, since it involved a lot of PITA, but that's the best that
+ * could've been done.
+ */
+static int pin_to_kill(struct inotify_handle *ih, struct inotify_watch *watch)
+{
+       struct super_block *sb = watch->inode->i_sb;
+       s32 wd = watch->wd;
+
+       spin_lock(&sb_lock);
+       if (sb->s_count >= S_BIAS) {
+               atomic_inc(&sb->s_active);
+               spin_unlock(&sb_lock);
+               get_inotify_watch(watch);
+               mutex_unlock(&ih->mutex);
+               return 1;       /* the best outcome */
+       }
+       sb->s_count++;
+       spin_unlock(&sb_lock);
+       mutex_unlock(&ih->mutex); /* can't grab ->s_umount under it */
+       down_read(&sb->s_umount);
+       if (likely(!sb->s_root)) {
+               /* fs is already shut down; the watch is dead */
+               drop_super(sb);
+               return 0;
+       }
+       /* raced with the final deactivate_super() */
+       mutex_lock(&ih->mutex);
+       if (idr_find(&ih->idr, wd) != watch || watch->inode->i_sb != sb) {
+               /* the watch is dead */
+               mutex_unlock(&ih->mutex);
+               drop_super(sb);
+               return 0;
+       }
+       /* still alive or freed and reused with the same sb and wd; kill */
+       get_inotify_watch(watch);
+       mutex_unlock(&ih->mutex);
+       return 2;
+}
+
+static void unpin_and_kill(struct inotify_watch *watch, int how)
+{
+       struct super_block *sb = watch->inode->i_sb;
+       put_inotify_watch(watch);
+       switch (how) {
+       case 1:
+               deactivate_super(sb);
+               break;
+       case 2:
+               drop_super(sb);
+       }
+}
+
 /**
  * inotify_destroy - clean up and destroy an inotify instance
  * @ih: inotify handle
@@ -490,11 +619,15 @@ void inotify_destroy(struct inotify_handle *ih)
         * pretty.  We cannot do a simple iteration over the list, because we
         * do not know the inode until we iterate to the watch.  But we need to
         * hold inode->inotify_mutex before ih->mutex.  The following works.
+        *
+        * AV: it had to become even uglier to start working ;-/
         */
        while (1) {
                struct inotify_watch *watch;
                struct list_head *watches;
+               struct super_block *sb;
                struct inode *inode;
+               int how;
 
                mutex_lock(&ih->mutex);
                watches = &ih->watches;
@@ -503,8 +636,10 @@ void inotify_destroy(struct inotify_handle *ih)
                        break;
                }
                watch = list_first_entry(watches, struct inotify_watch, h_list);
-               get_inotify_watch(watch);
-               mutex_unlock(&ih->mutex);
+               sb = watch->inode->i_sb;
+               how = pin_to_kill(ih, watch);
+               if (!how)
+                       continue;
 
                inode = watch->inode;
                mutex_lock(&inode->inotify_mutex);
@@ -518,7 +653,7 @@ void inotify_destroy(struct inotify_handle *ih)
 
                mutex_unlock(&ih->mutex);
                mutex_unlock(&inode->inotify_mutex);
-               put_inotify_watch(watch);
+               unpin_and_kill(watch, how);
        }
 
        /* free this handle: the put matching the get in inotify_init() */
@@ -719,7 +854,9 @@ void inotify_evict_watch(struct inotify_watch *watch)
 int inotify_rm_wd(struct inotify_handle *ih, u32 wd)
 {
        struct inotify_watch *watch;
+       struct super_block *sb;
        struct inode *inode;
+       int how;
 
        mutex_lock(&ih->mutex);
        watch = idr_find(&ih->idr, wd);
@@ -727,9 +864,12 @@ int inotify_rm_wd(struct inotify_handle *ih, u32 wd)
                mutex_unlock(&ih->mutex);
                return -EINVAL;
        }
-       get_inotify_watch(watch);
+       sb = watch->inode->i_sb;
+       how = pin_to_kill(ih, watch);
+       if (!how)
+               return 0;
+
        inode = watch->inode;
-       mutex_unlock(&ih->mutex);
 
        mutex_lock(&inode->inotify_mutex);
        mutex_lock(&ih->mutex);
@@ -740,7 +880,7 @@ int inotify_rm_wd(struct inotify_handle *ih, u32 wd)
 
        mutex_unlock(&ih->mutex);
        mutex_unlock(&inode->inotify_mutex);
-       put_inotify_watch(watch);
+       unpin_and_kill(watch, how);
 
        return 0;
 }
index d152856c371be4906b7effec1f3c42842a4cee2d..43e8b2c0664b1b3d302a6d46e3fa40185edb5ae7 100644 (file)
@@ -400,11 +400,9 @@ static int ioctl_fioasync(unsigned int fd, struct file *filp,
 
        /* Did FASYNC state change ? */
        if ((flag ^ filp->f_flags) & FASYNC) {
-               if (filp->f_op && filp->f_op->fasync) {
-                       lock_kernel();
+               if (filp->f_op && filp->f_op->fasync)
                        error = filp->f_op->fasync(fd, filp, on);
-                       unlock_kernel();
-               } else
+               else
                        error = -ENOTTY;
        }
        if (error)
@@ -440,11 +438,17 @@ int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
                break;
 
        case FIONBIO:
+               /* BKL needed to avoid races tweaking f_flags */
+               lock_kernel();
                error = ioctl_fionbio(filp, argp);
+               unlock_kernel();
                break;
 
        case FIOASYNC:
+               /* BKL needed to avoid races tweaking f_flags */
+               lock_kernel();
                error = ioctl_fioasync(fd, filp, argp);
+               unlock_kernel();
                break;
 
        case FIOQSIZE:
index 9fd8889097b728b735150ff82b1ff123a503dac7..70fc63a1727b131f496bc9a98186d61a022dc975 100644 (file)
@@ -167,7 +167,8 @@ static struct nlm_host *nlm_lookup_host(struct nlm_lookup_host_info *ni)
                        continue;
                if (host->h_server != ni->server)
                        continue;
-               if (!nlm_cmp_addr(nlm_srcaddr(host), ni->src_sap))
+               if (ni->server &&
+                   !nlm_cmp_addr(nlm_srcaddr(host), ni->src_sap))
                        continue;
 
                /* Move to head of hash chain. */
index c631a83931cec9cd56128daf5fc494b8fac9703a..56b076736b56afd054aa91b7585d80257f0f22ac 100644 (file)
@@ -181,6 +181,7 @@ lockd(void *vrqstp)
        }
        flush_signals(current);
        cancel_delayed_work_sync(&grace_period_end);
+       locks_end_grace(&lockd_manager);
        if (nlmsvc_ops)
                nlmsvc_invalidate_all();
        nlm_shutdown_hosts();
index 09ce58e49e72bb000004851a1ea23e958b0b917d..d34e0f9681c6557d83852cf04646afbf9e670d98 100644 (file)
@@ -1378,7 +1378,7 @@ static int may_delete(struct inode *dir,struct dentry *victim,int isdir)
        if (IS_APPEND(dir))
                return -EPERM;
        if (check_sticky(dir, victim->d_inode)||IS_APPEND(victim->d_inode)||
-           IS_IMMUTABLE(victim->d_inode))
+           IS_IMMUTABLE(victim->d_inode) || IS_SWAPFILE(victim->d_inode))
                return -EPERM;
        if (isdir) {
                if (!S_ISDIR(victim->d_inode->i_mode))
index cce46702d33c98f6d9e1669ac10f4d6c23be82c2..65b3dc844c879c059c004425487672eff21b5682 100644 (file)
@@ -1815,8 +1815,8 @@ static void shrink_submounts(struct vfsmount *mnt, struct list_head *umounts)
                while (!list_empty(&graveyard)) {
                        m = list_first_entry(&graveyard, struct vfsmount,
                                                mnt_expire);
-                       touch_mnt_namespace(mnt->mnt_ns);
-                       umount_tree(mnt, 1, umounts);
+                       touch_mnt_namespace(m->mnt_ns);
+                       umount_tree(m, 1, umounts);
                }
        }
 }
index bb93946ace2249841dd94a25d4ce0a0582e9dfde..b79ec930d9f1af003ddfb1fd9d130b12f6755f8b 100644 (file)
@@ -225,12 +225,12 @@ nfsd4_list_rec_dir(struct dentry *dir, recdir_func *f)
                return 0;
 
        nfs4_save_user(&uid, &gid);
+       INIT_LIST_HEAD(dentries);
 
        filp = dentry_open(dget(dir), mntget(rec_dir.mnt), O_RDONLY);
        status = PTR_ERR(filp);
        if (IS_ERR(filp))
                goto out;
-       INIT_LIST_HEAD(dentries);
        status = vfs_readdir(filp, nfsd4_build_dentrylist, &dla);
        fput(filp);
        while (!list_empty(dentries)) {
index b0bebc552a11f3cec582b83c80c45c97a7734cdd..1a052ac2bde90b6599194380124c61b1c4054134 100644 (file)
@@ -3261,6 +3261,7 @@ nfs4_state_shutdown(void)
 {
        cancel_rearming_delayed_workqueue(laundry_wq, &laundromat_work);
        destroy_workqueue(laundry_wq);
+       locks_end_grace(&nfsd4_manager);
        nfs4_lock_state();
        nfs4_release_reclaim();
        __nfs4_state_shutdown();
index 5e6724c1afd1d0276d7e839c9bfcbd2832fbd600..2142b1c68b618d7de730b26bcf257d7a116e12c1 100644 (file)
@@ -30,7 +30,8 @@
 
 extern int debug_msgs;
 
-#if 0 /* Fool kernel-doc since it doesn't do macros yet */
+extern void __ntfs_debug(const char *file, int line, const char *function,
+       const char *format, ...) __attribute__ ((format (printf, 4, 5)));
 /**
  * ntfs_debug - write a debug level message to syslog
  * @f:         a printf format string containing the message
@@ -39,11 +40,6 @@ extern int debug_msgs;
  * ntfs_debug() writes a DEBUG level message to the syslog but only if the
  * driver was compiled with -DDEBUG. Otherwise, the call turns into a NOP.
  */
-static void ntfs_debug(const char *f, ...);
-#endif
-
-extern void __ntfs_debug (const char *file, int line, const char *function,
-       const char *format, ...) __attribute__ ((format (printf, 4, 5)));
 #define ntfs_debug(f, a...)                                            \
        __ntfs_debug(__FILE__, __LINE__, __func__, f, ##a)
 
index 7e947c6724694c74f7a1658392f83e15970fb7cd..3a178ec48d7c760222970e9af62af615a1e5de35 100644 (file)
@@ -112,7 +112,7 @@ int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block,
                bh = bhs[i];
 
                if (buffer_jbd(bh)) {
-                       mlog(ML_ERROR,
+                       mlog(ML_BH_IO,
                             "trying to sync read a jbd "
                             "managed bh (blocknr = %llu), skipping\n",
                             (unsigned long long)bh->b_blocknr);
@@ -147,15 +147,10 @@ int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block,
        for (i = nr; i > 0; i--) {
                bh = bhs[i - 1];
 
-               if (buffer_jbd(bh)) {
-                       mlog(ML_ERROR,
-                            "the journal got the buffer while it was "
-                            "locked for io! (blocknr = %llu)\n",
-                            (unsigned long long)bh->b_blocknr);
-                       BUG();
-               }
+               /* No need to wait on the buffer if it's managed by JBD. */
+               if (!buffer_jbd(bh))
+                       wait_on_buffer(bh);
 
-               wait_on_buffer(bh);
                if (!buffer_uptodate(bh)) {
                        /* Status won't be cleared from here on out,
                         * so we can safely record this and loop back
@@ -251,8 +246,6 @@ int ocfs2_read_blocks(struct inode *inode, u64 block, int nr,
                        ignore_cache = 1;
                }
 
-               /* XXX: Can we ever get this and *not* have the cached
-                * flag set? */
                if (buffer_jbd(bh)) {
                        if (ignore_cache)
                                mlog(ML_BH_IO, "trying to sync read a jbd "
index 533a789c3ef8e01872bb44e7a7d989c70e0e0f06..ba962d71b34d15e7e089c741a9d6bd0d14559e79 100644 (file)
@@ -608,8 +608,10 @@ static int __init init_dlmfs_fs(void)
                                0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
                                        SLAB_MEM_SPREAD),
                                dlmfs_init_once);
-       if (!dlmfs_inode_cache)
+       if (!dlmfs_inode_cache) {
+               status = -ENOMEM;
                goto bail;
+       }
        cleanup_inode = 1;
 
        user_dlm_worker = create_singlethread_workqueue("user_dlm");
index 39ec27738499a783a9d70611f474e75558b07317..0c3cc03c61fa307e0b1ca829aeab3a94268f3a73 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/workqueue.h>
 
 /* user_lock_res->l_flags flags. */
-#define USER_LOCK_ATTACHED      (0x00000001) /* have we initialized
+#define USER_LOCK_ATTACHED      (0x00000001) /* we have initialized
                                               * the lvb */
 #define USER_LOCK_BUSY          (0x00000002) /* we are currently in
                                               * dlm_lock */
index ec684426034b6dc39ab2b772acc918d07cce6ccd..6e6cc0a2e5f7a51ed9c5e3b72e4ae90471ea77a7 100644 (file)
@@ -2841,9 +2841,8 @@ static void ocfs2_unlock_ast(void *opaque, int error)
 
        lockres_clear_flags(lockres, OCFS2_LOCK_BUSY);
        lockres->l_unlock_action = OCFS2_UNLOCK_INVALID;
-       spin_unlock_irqrestore(&lockres->l_lock, flags);
-
        wake_up(&lockres->l_event);
+       spin_unlock_irqrestore(&lockres->l_lock, flags);
 
        mlog_exit_void();
 }
index fef7ece32376f65ef9af2a455fc4b623519819ec..3fed9e3d89926a90f871a6161c4bea239b2685a7 100644 (file)
@@ -85,7 +85,7 @@ enum ocfs2_unlock_action {
 };
 
 /* ocfs2_lock_res->l_flags flags. */
-#define OCFS2_LOCK_ATTACHED      (0x00000001) /* have we initialized
+#define OCFS2_LOCK_ATTACHED      (0x00000001) /* we have initialized
                                               * the lvb */
 #define OCFS2_LOCK_BUSY          (0x00000002) /* we are currently in
                                               * dlm_lock */
index 5f180cf7abbd6f4e21dc1a662932f06ad56a6407..5e0c0d0aef7dcbcf1c9baae7b108cc47bce1f9cf 100644 (file)
@@ -86,7 +86,8 @@
 #define OCFS2_CLEAR_INCOMPAT_FEATURE(sb,mask)                  \
        OCFS2_SB(sb)->s_feature_incompat &= ~(mask)
 
-#define OCFS2_FEATURE_COMPAT_SUPP      OCFS2_FEATURE_COMPAT_BACKUP_SB
+#define OCFS2_FEATURE_COMPAT_SUPP      (OCFS2_FEATURE_COMPAT_BACKUP_SB \
+                                        | OCFS2_FEATURE_COMPAT_JBD2_SB)
 #define OCFS2_FEATURE_INCOMPAT_SUPP    (OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT \
                                         | OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC \
                                         | OCFS2_FEATURE_INCOMPAT_INLINE_DATA \
  */
 #define OCFS2_FEATURE_COMPAT_BACKUP_SB         0x0001
 
+/*
+ * The filesystem will correctly handle journal feature bits.
+ */
+#define OCFS2_FEATURE_COMPAT_JBD2_SB           0x0002
+
 /*
  * Unwritten extents support.
  */
index faec2d879357dbc62f4d85124e2840d26d439be3..9b76d41a8ac6ed2898021bcc255ffa8e159b61cb 100644 (file)
@@ -740,6 +740,9 @@ static int user_dlm_lock_status(union ocfs2_dlm_lksb *lksb)
 
 static void *user_dlm_lvb(union ocfs2_dlm_lksb *lksb)
 {
+       if (!lksb->lksb_fsdlm.sb_lvbptr)
+               lksb->lksb_fsdlm.sb_lvbptr = (char *)lksb +
+                                            sizeof(struct dlm_lksb);
        return (void *)(lksb->lksb_fsdlm.sb_lvbptr);
 }
 
index 054e2efb0b7e71f196025c777d61f2cc5954e0f9..74d7367ade13e1e36cb74a13327ca65573fabf86 100644 (file)
@@ -2645,9 +2645,9 @@ static int ocfs2_xattr_update_xattr_search(struct inode *inode,
                                return ret;
                        }
 
-                       i = xs->here - old_xh->xh_entries;
-                       xs->here = &xs->header->xh_entries[i];
                }
+               i = xs->here - old_xh->xh_entries;
+               xs->here = &xs->header->xh_entries[i];
        }
 
        return ret;
index 633f7a0ebb2cdfb28207cbb9ec14128ede23f59b..6d5b213b8a9b4b6e834ca9be99ae6c15a3dc0d13 100644 (file)
@@ -348,8 +348,8 @@ static ssize_t whole_disk_show(struct device *dev,
 static DEVICE_ATTR(whole_disk, S_IRUSR | S_IRGRP | S_IROTH,
                   whole_disk_show, NULL);
 
-int add_partition(struct gendisk *disk, int partno,
-                 sector_t start, sector_t len, int flags)
+struct hd_struct *add_partition(struct gendisk *disk, int partno,
+                               sector_t start, sector_t len, int flags)
 {
        struct hd_struct *p;
        dev_t devt = MKDEV(0, 0);
@@ -361,15 +361,15 @@ int add_partition(struct gendisk *disk, int partno,
 
        err = disk_expand_part_tbl(disk, partno);
        if (err)
-               return err;
+               return ERR_PTR(err);
        ptbl = disk->part_tbl;
 
        if (ptbl->part[partno])
-               return -EBUSY;
+               return ERR_PTR(-EBUSY);
 
        p = kzalloc(sizeof(*p), GFP_KERNEL);
        if (!p)
-               return -ENOMEM;
+               return ERR_PTR(-EBUSY);
 
        if (!init_part_stats(p)) {
                err = -ENOMEM;
@@ -395,7 +395,7 @@ int add_partition(struct gendisk *disk, int partno,
 
        err = blk_alloc_devt(p, &devt);
        if (err)
-               goto out_free;
+               goto out_free_stats;
        pdev->devt = devt;
 
        /* delay uevent until 'holders' subdir is created */
@@ -424,18 +424,20 @@ int add_partition(struct gendisk *disk, int partno,
        if (!ddev->uevent_suppress)
                kobject_uevent(&pdev->kobj, KOBJ_ADD);
 
-       return 0;
+       return p;
 
+out_free_stats:
+       free_part_stats(p);
 out_free:
        kfree(p);
-       return err;
+       return ERR_PTR(err);
 out_del:
        kobject_put(p->holder_dir);
        device_del(pdev);
 out_put:
        put_device(pdev);
        blk_free_devt(devt);
-       return err;
+       return ERR_PTR(err);
 }
 
 /* Not exported, helper to add_disk(). */
@@ -566,15 +568,16 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
                               disk->disk_name, p, (unsigned long long) size);
                        size = get_capacity(disk) - from;
                }
-               res = add_partition(disk, p, from, size, state->parts[p].flags);
-               if (res) {
-                       printk(KERN_ERR " %s: p%d could not be added: %d\n",
-                               disk->disk_name, p, -res);
+               part = add_partition(disk, p, from, size,
+                                    state->parts[p].flags);
+               if (IS_ERR(part)) {
+                       printk(KERN_ERR " %s: p%d could not be added: %ld\n",
+                              disk->disk_name, p, -PTR_ERR(part));
                        continue;
                }
 #ifdef CONFIG_BLK_DEV_MD
                if (state->parts[p].flags & ADDPART_FLAG_RAID)
-                       md_autodetect_dev(bdev->bd_dev+p);
+                       md_autodetect_dev(part_to_dev(part)->devt);
 #endif
        }
        kfree(state);
index 486cf3fe7139949a0911e0e33f9cb99a06bfb8fb..d4677603c88920b45e14af3d91b71894b2c5b7b2 100644 (file)
@@ -371,7 +371,7 @@ static int lstats_show_proc(struct seq_file *m, void *v)
                                task->latency_record[i].time,
                                task->latency_record[i].max);
                        for (q = 0; q < LT_BACKTRACEDEPTH; q++) {
-                               char sym[KSYM_NAME_LEN];
+                               char sym[KSYM_SYMBOL_LEN];
                                char *c;
                                if (!task->latency_record[i].backtrace[q])
                                        break;
index 94fcfff6863a5976965b8d4253ff3ad1ac45386b..06ed10b7da9ee17e9dae1d63ec2b09435aefa551 100644 (file)
@@ -31,6 +31,7 @@ static struct inode *proc_sys_make_inode(struct super_block *sb,
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
        inode->i_flags |= S_PRIVATE; /* tell selinux to ignore this inode */
        inode->i_mode = table->mode;
+       inode->i_uid = inode->i_gid = 0;
        if (!table->child) {
                inode->i_mode |= S_IFREG;
                inode->i_op = &proc_sys_inode_operations;
index b770c095e45c62f86e78da2f9d1524085f9d45fd..3a8bdd7f5756e37d430f15b2b5b76fb672c9b965 100644 (file)
@@ -557,9 +557,9 @@ static u64 swap_pte_to_pagemap_entry(pte_t pte)
        return swp_type(e) | (swp_offset(e) << MAX_SWAPFILES_SHIFT);
 }
 
-static unsigned long pte_to_pagemap_entry(pte_t pte)
+static u64 pte_to_pagemap_entry(pte_t pte)
 {
-       unsigned long pme = 0;
+       u64 pme = 0;
        if (is_swap_pte(pte))
                pme = PM_PFRAME(swap_pte_to_pagemap_entry(pte))
                        | PM_PSHIFT(PAGE_SHIFT) | PM_SWAP;
index 0a6aa2cc78f07eb7e0aa4ce6af2dfe8b5fe32ca5..b49884c8c10e823cbe484e9d5c1fadddf16b5008 100644 (file)
@@ -234,8 +234,8 @@ int ubifs_bg_thread(void *info)
        int err;
        struct ubifs_info *c = info;
 
-       ubifs_msg("background thread \"%s\" started, PID %d",
-                 c->bgt_name, current->pid);
+       dbg_msg("background thread \"%s\" started, PID %d",
+               c->bgt_name, current->pid);
        set_freezable();
 
        while (1) {
index 7186400750e775ad18bd2e9975a373ecb7803e62..510ffa0bbda4658559cf682a01145d4ff7f9231e 100644 (file)
@@ -101,21 +101,24 @@ static void sprintf_key(const struct ubifs_info *c, const union ubifs_key *key,
        if (c->key_fmt == UBIFS_SIMPLE_KEY_FMT) {
                switch (type) {
                case UBIFS_INO_KEY:
-                       sprintf(p, "(%lu, %s)", key_inum(c, key),
+                       sprintf(p, "(%lu, %s)", (unsigned long)key_inum(c, key),
                               get_key_type(type));
                        break;
                case UBIFS_DENT_KEY:
                case UBIFS_XENT_KEY:
-                       sprintf(p, "(%lu, %s, %#08x)", key_inum(c, key),
+                       sprintf(p, "(%lu, %s, %#08x)",
+                               (unsigned long)key_inum(c, key),
                                get_key_type(type), key_hash(c, key));
                        break;
                case UBIFS_DATA_KEY:
-                       sprintf(p, "(%lu, %s, %u)", key_inum(c, key),
+                       sprintf(p, "(%lu, %s, %u)",
+                               (unsigned long)key_inum(c, key),
                                get_key_type(type), key_block(c, key));
                        break;
                case UBIFS_TRUN_KEY:
                        sprintf(p, "(%lu, %s)",
-                               key_inum(c, key), get_key_type(type));
+                               (unsigned long)key_inum(c, key),
+                               get_key_type(type));
                        break;
                default:
                        sprintf(p, "(bad key type: %#08x, %#08x)",
@@ -364,8 +367,8 @@ void dbg_dump_node(const struct ubifs_info *c, const void *node)
                       le32_to_cpu(mst->ihead_lnum));
                printk(KERN_DEBUG "\tihead_offs     %u\n",
                       le32_to_cpu(mst->ihead_offs));
-               printk(KERN_DEBUG "\tindex_size     %u\n",
-                      le32_to_cpu(mst->index_size));
+               printk(KERN_DEBUG "\tindex_size     %llu\n",
+                      (unsigned long long)le64_to_cpu(mst->index_size));
                printk(KERN_DEBUG "\tlpt_lnum       %u\n",
                       le32_to_cpu(mst->lpt_lnum));
                printk(KERN_DEBUG "\tlpt_offs       %u\n",
@@ -1589,7 +1592,7 @@ static struct fsck_inode *add_inode(struct ubifs_info *c,
 
        if (inum > c->highest_inum) {
                ubifs_err("too high inode number, max. is %lu",
-                         c->highest_inum);
+                         (unsigned long)c->highest_inum);
                return ERR_PTR(-EINVAL);
        }
 
@@ -1668,16 +1671,18 @@ static struct fsck_inode *read_add_inode(struct ubifs_info *c,
        ino_key_init(c, &key, inum);
        err = ubifs_lookup_level0(c, &key, &znode, &n);
        if (!err) {
-               ubifs_err("inode %lu not found in index", inum);
+               ubifs_err("inode %lu not found in index", (unsigned long)inum);
                return ERR_PTR(-ENOENT);
        } else if (err < 0) {
-               ubifs_err("error %d while looking up inode %lu", err, inum);
+               ubifs_err("error %d while looking up inode %lu",
+                         err, (unsigned long)inum);
                return ERR_PTR(err);
        }
 
        zbr = &znode->zbranch[n];
        if (zbr->len < UBIFS_INO_NODE_SZ) {
-               ubifs_err("bad node %lu node length %d", inum, zbr->len);
+               ubifs_err("bad node %lu node length %d",
+                         (unsigned long)inum, zbr->len);
                return ERR_PTR(-EINVAL);
        }
 
@@ -1697,7 +1702,7 @@ static struct fsck_inode *read_add_inode(struct ubifs_info *c,
        kfree(ino);
        if (IS_ERR(fscki)) {
                ubifs_err("error %ld while adding inode %lu node",
-                         PTR_ERR(fscki), inum);
+                         PTR_ERR(fscki), (unsigned long)inum);
                return fscki;
        }
 
@@ -1786,7 +1791,8 @@ static int check_leaf(struct ubifs_info *c, struct ubifs_zbranch *zbr,
                if (IS_ERR(fscki)) {
                        err = PTR_ERR(fscki);
                        ubifs_err("error %d while processing data node and "
-                                 "trying to find inode node %lu", err, inum);
+                                 "trying to find inode node %lu",
+                                 err, (unsigned long)inum);
                        goto out_dump;
                }
 
@@ -1819,7 +1825,8 @@ static int check_leaf(struct ubifs_info *c, struct ubifs_zbranch *zbr,
                if (IS_ERR(fscki)) {
                        err = PTR_ERR(fscki);
                        ubifs_err("error %d while processing entry node and "
-                                 "trying to find inode node %lu", err, inum);
+                                 "trying to find inode node %lu",
+                                 err, (unsigned long)inum);
                        goto out_dump;
                }
 
@@ -1832,7 +1839,7 @@ static int check_leaf(struct ubifs_info *c, struct ubifs_zbranch *zbr,
                        err = PTR_ERR(fscki);
                        ubifs_err("error %d while processing entry node and "
                                  "trying to find parent inode node %lu",
-                                 err, inum);
+                                 err, (unsigned long)inum);
                        goto out_dump;
                }
 
@@ -1923,7 +1930,8 @@ static int check_inodes(struct ubifs_info *c, struct fsck_data *fsckd)
                            fscki->references != 1) {
                                ubifs_err("directory inode %lu has %d "
                                          "direntries which refer it, but "
-                                         "should be 1", fscki->inum,
+                                         "should be 1",
+                                         (unsigned long)fscki->inum,
                                          fscki->references);
                                goto out_dump;
                        }
@@ -1931,27 +1939,29 @@ static int check_inodes(struct ubifs_info *c, struct fsck_data *fsckd)
                            fscki->references != 0) {
                                ubifs_err("root inode %lu has non-zero (%d) "
                                          "direntries which refer it",
-                                         fscki->inum, fscki->references);
+                                         (unsigned long)fscki->inum,
+                                         fscki->references);
                                goto out_dump;
                        }
                        if (fscki->calc_sz != fscki->size) {
                                ubifs_err("directory inode %lu size is %lld, "
                                          "but calculated size is %lld",
-                                         fscki->inum, fscki->size,
-                                         fscki->calc_sz);
+                                         (unsigned long)fscki->inum,
+                                         fscki->size, fscki->calc_sz);
                                goto out_dump;
                        }
                        if (fscki->calc_cnt != fscki->nlink) {
                                ubifs_err("directory inode %lu nlink is %d, "
                                          "but calculated nlink is %d",
-                                         fscki->inum, fscki->nlink,
-                                         fscki->calc_cnt);
+                                         (unsigned long)fscki->inum,
+                                         fscki->nlink, fscki->calc_cnt);
                                goto out_dump;
                        }
                } else {
                        if (fscki->references != fscki->nlink) {
                                ubifs_err("inode %lu nlink is %d, but "
-                                         "calculated nlink is %d", fscki->inum,
+                                         "calculated nlink is %d",
+                                         (unsigned long)fscki->inum,
                                          fscki->nlink, fscki->references);
                                goto out_dump;
                        }
@@ -1959,20 +1969,21 @@ static int check_inodes(struct ubifs_info *c, struct fsck_data *fsckd)
                if (fscki->xattr_sz != fscki->calc_xsz) {
                        ubifs_err("inode %lu has xattr size %u, but "
                                  "calculated size is %lld",
-                                 fscki->inum, fscki->xattr_sz,
+                                 (unsigned long)fscki->inum, fscki->xattr_sz,
                                  fscki->calc_xsz);
                        goto out_dump;
                }
                if (fscki->xattr_cnt != fscki->calc_xcnt) {
                        ubifs_err("inode %lu has %u xattrs, but "
-                                 "calculated count is %lld", fscki->inum,
+                                 "calculated count is %lld",
+                                 (unsigned long)fscki->inum,
                                  fscki->xattr_cnt, fscki->calc_xcnt);
                        goto out_dump;
                }
                if (fscki->xattr_nms != fscki->calc_xnms) {
                        ubifs_err("inode %lu has xattr names' size %u, but "
                                  "calculated names' size is %lld",
-                                 fscki->inum, fscki->xattr_nms,
+                                 (unsigned long)fscki->inum, fscki->xattr_nms,
                                  fscki->calc_xnms);
                        goto out_dump;
                }
@@ -1985,11 +1996,12 @@ out_dump:
        ino_key_init(c, &key, fscki->inum);
        err = ubifs_lookup_level0(c, &key, &znode, &n);
        if (!err) {
-               ubifs_err("inode %lu not found in index", fscki->inum);
+               ubifs_err("inode %lu not found in index",
+                         (unsigned long)fscki->inum);
                return -ENOENT;
        } else if (err < 0) {
                ubifs_err("error %d while looking up inode %lu",
-                         err, fscki->inum);
+                         err, (unsigned long)fscki->inum);
                return err;
        }
 
@@ -2007,7 +2019,7 @@ out_dump:
        }
 
        ubifs_msg("dump of the inode %lu sitting in LEB %d:%d",
-                 fscki->inum, zbr->lnum, zbr->offs);
+                 (unsigned long)fscki->inum, zbr->lnum, zbr->offs);
        dbg_dump_node(c, ino);
        kfree(ino);
        return -EINVAL;
index 526c01ec80032be9205e6057c48f9188b136b6e8..0422c98e17932e41ecca3f25c6dea8aedb10e133 100644 (file)
@@ -161,7 +161,7 @@ struct inode *ubifs_new_inode(struct ubifs_info *c, const struct inode *dir,
                        return ERR_PTR(-EINVAL);
                }
                ubifs_warn("running out of inode numbers (current %lu, max %d)",
-                          c->highest_inum, INUM_WATERMARK);
+                          (unsigned long)c->highest_inum, INUM_WATERMARK);
        }
 
        inode->i_ino = ++c->highest_inum;
@@ -428,7 +428,8 @@ static int ubifs_readdir(struct file *file, void *dirent, filldir_t filldir)
                dbg_gen("feed '%s', ino %llu, new f_pos %#x",
                        dent->name, (unsigned long long)le64_to_cpu(dent->inum),
                        key_hash_flash(c, &dent->key));
-               ubifs_assert(dent->ch.sqnum > ubifs_inode(dir)->creat_sqnum);
+               ubifs_assert(le64_to_cpu(dent->ch.sqnum) >
+                            ubifs_inode(dir)->creat_sqnum);
 
                nm.len = le16_to_cpu(dent->nlen);
                over = filldir(dirent, dent->name, nm.len, file->f_pos,
index 51cf511d44d918ccef3210c340f55fa7cc90e35b..2624411d9758d11023c938418f8a6a7938066ff5 100644 (file)
@@ -72,7 +72,7 @@ static int read_block(struct inode *inode, void *addr, unsigned int block,
                return err;
        }
 
-       ubifs_assert(dn->ch.sqnum > ubifs_inode(inode)->creat_sqnum);
+       ubifs_assert(le64_to_cpu(dn->ch.sqnum) > ubifs_inode(inode)->creat_sqnum);
 
        len = le32_to_cpu(dn->size);
        if (len <= 0 || len > UBIFS_BLOCK_SIZE)
@@ -626,7 +626,7 @@ static int populate_page(struct ubifs_info *c, struct page *page,
 
                        dn = bu->buf + (bu->zbranch[nn].offs - offs);
 
-                       ubifs_assert(dn->ch.sqnum >
+                       ubifs_assert(le64_to_cpu(dn->ch.sqnum) >
                                     ubifs_inode(inode)->creat_sqnum);
 
                        len = le32_to_cpu(dn->size);
@@ -691,32 +691,22 @@ out_err:
 /**
  * ubifs_do_bulk_read - do bulk-read.
  * @c: UBIFS file-system description object
- * @page1: first page
+ * @bu: bulk-read information
+ * @page1: first page to read
  *
  * This function returns %1 if the bulk-read is done, otherwise %0 is returned.
  */
-static int ubifs_do_bulk_read(struct ubifs_info *c, struct page *page1)
+static int ubifs_do_bulk_read(struct ubifs_info *c, struct bu_info *bu,
+                             struct page *page1)
 {
        pgoff_t offset = page1->index, end_index;
        struct address_space *mapping = page1->mapping;
        struct inode *inode = mapping->host;
        struct ubifs_inode *ui = ubifs_inode(inode);
-       struct bu_info *bu;
        int err, page_idx, page_cnt, ret = 0, n = 0;
+       int allocate = bu->buf ? 0 : 1;
        loff_t isize;
 
-       bu = kmalloc(sizeof(struct bu_info), GFP_NOFS);
-       if (!bu)
-               return 0;
-
-       bu->buf_len = c->bulk_read_buf_size;
-       bu->buf = kmalloc(bu->buf_len, GFP_NOFS);
-       if (!bu->buf)
-               goto out_free;
-
-       data_key_init(c, &bu->key, inode->i_ino,
-                     offset << UBIFS_BLOCKS_PER_PAGE_SHIFT);
-
        err = ubifs_tnc_get_bu_keys(c, bu);
        if (err)
                goto out_warn;
@@ -735,12 +725,25 @@ static int ubifs_do_bulk_read(struct ubifs_info *c, struct page *page1)
                 * together. If all the pages were like this, bulk-read would
                 * reduce performance, so we turn it off for a while.
                 */
-               ui->read_in_a_row = 0;
-               ui->bulk_read = 0;
-               goto out_free;
+               goto out_bu_off;
        }
 
        if (bu->cnt) {
+               if (allocate) {
+                       /*
+                        * Allocate bulk-read buffer depending on how many data
+                        * nodes we are going to read.
+                        */
+                       bu->buf_len = bu->zbranch[bu->cnt - 1].offs +
+                                     bu->zbranch[bu->cnt - 1].len -
+                                     bu->zbranch[0].offs;
+                       ubifs_assert(bu->buf_len > 0);
+                       ubifs_assert(bu->buf_len <= c->leb_size);
+                       bu->buf = kmalloc(bu->buf_len, GFP_NOFS | __GFP_NOWARN);
+                       if (!bu->buf)
+                               goto out_bu_off;
+               }
+
                err = ubifs_tnc_bulk_read(c, bu);
                if (err)
                        goto out_warn;
@@ -779,13 +782,17 @@ static int ubifs_do_bulk_read(struct ubifs_info *c, struct page *page1)
        ui->last_page_read = offset + page_idx - 1;
 
 out_free:
-       kfree(bu->buf);
-       kfree(bu);
+       if (allocate)
+               kfree(bu->buf);
        return ret;
 
 out_warn:
        ubifs_warn("ignoring error %d and skipping bulk-read", err);
        goto out_free;
+
+out_bu_off:
+       ui->read_in_a_row = ui->bulk_read = 0;
+       goto out_free;
 }
 
 /**
@@ -803,18 +810,20 @@ static int ubifs_bulk_read(struct page *page)
        struct ubifs_info *c = inode->i_sb->s_fs_info;
        struct ubifs_inode *ui = ubifs_inode(inode);
        pgoff_t index = page->index, last_page_read = ui->last_page_read;
-       int ret = 0;
+       struct bu_info *bu;
+       int err = 0, allocated = 0;
 
        ui->last_page_read = index;
-
        if (!c->bulk_read)
                return 0;
+
        /*
-        * Bulk-read is protected by ui_mutex, but it is an optimization, so
-        * don't bother if we cannot lock the mutex.
+        * Bulk-read is protected by @ui->ui_mutex, but it is an optimization,
+        * so don't bother if we cannot lock the mutex.
         */
        if (!mutex_trylock(&ui->ui_mutex))
                return 0;
+
        if (index != last_page_read + 1) {
                /* Turn off bulk-read if we stop reading sequentially */
                ui->read_in_a_row = 1;
@@ -822,6 +831,7 @@ static int ubifs_bulk_read(struct page *page)
                        ui->bulk_read = 0;
                goto out_unlock;
        }
+
        if (!ui->bulk_read) {
                ui->read_in_a_row += 1;
                if (ui->read_in_a_row < 3)
@@ -829,10 +839,35 @@ static int ubifs_bulk_read(struct page *page)
                /* Three reads in a row, so switch on bulk-read */
                ui->bulk_read = 1;
        }
-       ret = ubifs_do_bulk_read(c, page);
+
+       /*
+        * If possible, try to use pre-allocated bulk-read information, which
+        * is protected by @c->bu_mutex.
+        */
+       if (mutex_trylock(&c->bu_mutex))
+               bu = &c->bu;
+       else {
+               bu = kmalloc(sizeof(struct bu_info), GFP_NOFS | __GFP_NOWARN);
+               if (!bu)
+                       goto out_unlock;
+
+               bu->buf = NULL;
+               allocated = 1;
+       }
+
+       bu->buf_len = c->max_bu_buf_len;
+       data_key_init(c, &bu->key, inode->i_ino,
+                     page->index << UBIFS_BLOCKS_PER_PAGE_SHIFT);
+       err = ubifs_do_bulk_read(c, bu, page);
+
+       if (!allocated)
+               mutex_unlock(&c->bu_mutex);
+       else
+               kfree(bu);
+
 out_unlock:
        mutex_unlock(&ui->ui_mutex);
-       return ret;
+       return err;
 }
 
 static int ubifs_readpage(struct file *file, struct page *page)
index 22993f867d194ffbc3bab30f25675c0fbb22dbb4..f91b745908ea595ac94bd25b86368d5515149be0 100644 (file)
@@ -690,8 +690,9 @@ int ubifs_jnl_write_data(struct ubifs_info *c, const struct inode *inode,
        int dlen = UBIFS_DATA_NODE_SZ + UBIFS_BLOCK_SIZE * WORST_COMPR_FACTOR;
        struct ubifs_inode *ui = ubifs_inode(inode);
 
-       dbg_jnl("ino %lu, blk %u, len %d, key %s", key_inum(c, key),
-               key_block(c, key), len, DBGKEY(key));
+       dbg_jnl("ino %lu, blk %u, len %d, key %s",
+               (unsigned long)key_inum(c, key), key_block(c, key), len,
+               DBGKEY(key));
        ubifs_assert(len <= UBIFS_BLOCK_SIZE);
 
        data = kmalloc(dlen, GFP_NOFS);
@@ -1128,7 +1129,8 @@ int ubifs_jnl_truncate(struct ubifs_info *c, const struct inode *inode,
        ino_t inum = inode->i_ino;
        unsigned int blk;
 
-       dbg_jnl("ino %lu, size %lld -> %lld", inum, old_size, new_size);
+       dbg_jnl("ino %lu, size %lld -> %lld",
+               (unsigned long)inum, old_size, new_size);
        ubifs_assert(!ui->data_len);
        ubifs_assert(S_ISREG(inode->i_mode));
        ubifs_assert(mutex_is_locked(&ui->ui_mutex));
index 9ee65086f627eec8d393746bc957fc7538027b66..3f1f16bc25c99ba1e019c940030c1fa48b7217fa 100644 (file)
@@ -345,7 +345,7 @@ static inline int key_type_flash(const struct ubifs_info *c, const void *k)
 {
        const union ubifs_key *key = k;
 
-       return le32_to_cpu(key->u32[1]) >> UBIFS_S_KEY_BLOCK_BITS;
+       return le32_to_cpu(key->j32[1]) >> UBIFS_S_KEY_BLOCK_BITS;
 }
 
 /**
@@ -416,7 +416,7 @@ static inline unsigned int key_block_flash(const struct ubifs_info *c,
 {
        const union ubifs_key *key = k;
 
-       return le32_to_cpu(key->u32[1]) & UBIFS_S_KEY_BLOCK_MASK;
+       return le32_to_cpu(key->j32[1]) & UBIFS_S_KEY_BLOCK_MASK;
 }
 
 /**
index eed5a0025d63f8b3b4d21dba633f4c9b208cb6be..a41434b427854e66527775ca3e6fdfcb89a332bd 100644 (file)
@@ -571,8 +571,6 @@ static struct ubifs_pnode *next_pnode(struct ubifs_info *c,
                /* We assume here that LEB zero is never an LPT LEB */
                if (nnode->nbranch[iip].lnum)
                        return ubifs_get_pnode(c, nnode, iip);
-               else
-                       return NULL;
        }
 
        /* Go up while can't go right */
index 02d3462f4d3e99edb907ddaee16ed75300e827b0..9bd5a43d4526c8d7a55d0ae2a1fb4fa37a3fd922 100644 (file)
@@ -105,7 +105,7 @@ int ubifs_add_orphan(struct ubifs_info *c, ino_t inum)
        list_add_tail(&orphan->list, &c->orph_list);
        list_add_tail(&orphan->new_list, &c->orph_new);
        spin_unlock(&c->orphan_lock);
-       dbg_gen("ino %lu", inum);
+       dbg_gen("ino %lu", (unsigned long)inum);
        return 0;
 }
 
@@ -132,14 +132,16 @@ void ubifs_delete_orphan(struct ubifs_info *c, ino_t inum)
                else {
                        if (o->dnext) {
                                spin_unlock(&c->orphan_lock);
-                               dbg_gen("deleted twice ino %lu", inum);
+                               dbg_gen("deleted twice ino %lu",
+                                       (unsigned long)inum);
                                return;
                        }
                        if (o->cnext) {
                                o->dnext = c->orph_dnext;
                                c->orph_dnext = o;
                                spin_unlock(&c->orphan_lock);
-                               dbg_gen("delete later ino %lu", inum);
+                               dbg_gen("delete later ino %lu",
+                                       (unsigned long)inum);
                                return;
                        }
                        rb_erase(p, &c->orph_tree);
@@ -151,12 +153,12 @@ void ubifs_delete_orphan(struct ubifs_info *c, ino_t inum)
                        }
                        spin_unlock(&c->orphan_lock);
                        kfree(o);
-                       dbg_gen("inum %lu", inum);
+                       dbg_gen("inum %lu", (unsigned long)inum);
                        return;
                }
        }
        spin_unlock(&c->orphan_lock);
-       dbg_err("missing orphan ino %lu", inum);
+       dbg_err("missing orphan ino %lu", (unsigned long)inum);
        dbg_dump_stack();
 }
 
@@ -448,7 +450,7 @@ static void erase_deleted(struct ubifs_info *c)
                rb_erase(&orphan->rb, &c->orph_tree);
                list_del(&orphan->list);
                c->tot_orphans -= 1;
-               dbg_gen("deleting orphan ino %lu", orphan->inum);
+               dbg_gen("deleting orphan ino %lu", (unsigned long)orphan->inum);
                kfree(orphan);
        }
        c->orph_dnext = NULL;
@@ -536,8 +538,8 @@ static int insert_dead_orphan(struct ubifs_info *c, ino_t inum)
        list_add_tail(&orphan->list, &c->orph_list);
        orphan->dnext = c->orph_dnext;
        c->orph_dnext = orphan;
-       dbg_mnt("ino %lu, new %d, tot %d",
-               inum, c->new_orphans, c->tot_orphans);
+       dbg_mnt("ino %lu, new %d, tot %d", (unsigned long)inum,
+               c->new_orphans, c->tot_orphans);
        return 0;
 }
 
@@ -609,7 +611,8 @@ static int do_kill_orphans(struct ubifs_info *c, struct ubifs_scan_leb *sleb,
                n = (le32_to_cpu(orph->ch.len) - UBIFS_ORPH_NODE_SZ) >> 3;
                for (i = 0; i < n; i++) {
                        inum = le64_to_cpu(orph->inos[i]);
-                       dbg_rcvry("deleting orphaned inode %lu", inum);
+                       dbg_rcvry("deleting orphaned inode %lu",
+                                 (unsigned long)inum);
                        err = ubifs_tnc_remove_ino(c, inum);
                        if (err)
                                return err;
@@ -840,8 +843,8 @@ static int dbg_orphan_check(struct ubifs_info *c, struct ubifs_zbranch *zbr,
        if (inum != ci->last_ino) {
                /* Lowest node type is the inode node, so it comes first */
                if (key_type(c, &zbr->key) != UBIFS_INO_KEY)
-                       ubifs_err("found orphan node ino %lu, type %d", inum,
-                                 key_type(c, &zbr->key));
+                       ubifs_err("found orphan node ino %lu, type %d",
+                                 (unsigned long)inum, key_type(c, &zbr->key));
                ci->last_ino = inum;
                ci->tot_inos += 1;
                err = ubifs_tnc_read_node(c, zbr, ci->node);
@@ -853,7 +856,8 @@ static int dbg_orphan_check(struct ubifs_info *c, struct ubifs_zbranch *zbr,
                        /* Must be recorded as an orphan */
                        if (!dbg_find_check_orphan(&ci->root, inum) &&
                            !dbg_find_orphan(c, inum)) {
-                               ubifs_err("missing orphan, ino %lu", inum);
+                               ubifs_err("missing orphan, ino %lu",
+                                         (unsigned long)inum);
                                ci->missing += 1;
                        }
        }
index 77d26c141cf651997082f3be64c98e5a6675bad0..90acac603e635baf82e05037150c85c818a2c738 100644 (file)
@@ -168,12 +168,12 @@ static int write_rcvrd_mst_node(struct ubifs_info *c,
                                struct ubifs_mst_node *mst)
 {
        int err = 0, lnum = UBIFS_MST_LNUM, sz = c->mst_node_alsz;
-       uint32_t save_flags;
+       __le32 save_flags;
 
        dbg_rcvry("recovery");
 
        save_flags = mst->flags;
-       mst->flags = cpu_to_le32(le32_to_cpu(mst->flags) | UBIFS_MST_RCVRY);
+       mst->flags |= cpu_to_le32(UBIFS_MST_RCVRY);
 
        ubifs_prepare_node(c, mst, UBIFS_MST_NODE_SZ, 1);
        err = ubi_leb_change(c->ubi, lnum, mst, sz, UBI_SHORTTERM);
@@ -1435,13 +1435,13 @@ static int fix_size_in_place(struct ubifs_info *c, struct size_entry *e)
        err = ubi_leb_change(c->ubi, lnum, c->sbuf, len, UBI_UNKNOWN);
        if (err)
                goto out;
-       dbg_rcvry("inode %lu at %d:%d size %lld -> %lld ", e->inum, lnum, offs,
-                 i_size, e->d_size);
+       dbg_rcvry("inode %lu at %d:%d size %lld -> %lld ",
+                 (unsigned long)e->inum, lnum, offs, i_size, e->d_size);
        return 0;
 
 out:
        ubifs_warn("inode %lu failed to fix size %lld -> %lld error %d",
-                  e->inum, e->i_size, e->d_size, err);
+                  (unsigned long)e->inum, e->i_size, e->d_size, err);
        return err;
 }
 
@@ -1472,7 +1472,8 @@ int ubifs_recover_size(struct ubifs_info *c)
                                return err;
                        if (err == -ENOENT) {
                                /* Remove data nodes that have no inode */
-                               dbg_rcvry("removing ino %lu", e->inum);
+                               dbg_rcvry("removing ino %lu",
+                                         (unsigned long)e->inum);
                                err = ubifs_tnc_remove_ino(c, e->inum);
                                if (err)
                                        return err;
@@ -1493,8 +1494,8 @@ int ubifs_recover_size(struct ubifs_info *c)
                                        return PTR_ERR(inode);
                                if (inode->i_size < e->d_size) {
                                        dbg_rcvry("ino %lu size %lld -> %lld",
-                                                 e->inum, e->d_size,
-                                                 inode->i_size);
+                                                 (unsigned long)e->inum,
+                                                 e->d_size, inode->i_size);
                                        inode->i_size = e->d_size;
                                        ubifs_inode(inode)->ui_size = e->d_size;
                                        e->inode = inode;
index 7399692af859e2ea62b40c3924e792611745e59e..21f7d047c306be4cc3761deed76ea0de2ff8ea3f 100644 (file)
@@ -1065,7 +1065,7 @@ int ubifs_replay_journal(struct ubifs_info *c)
        ubifs_assert(c->bud_bytes <= c->max_bud_bytes || c->need_recovery);
        dbg_mnt("finished, log head LEB %d:%d, max_sqnum %llu, "
                "highest_inum %lu", c->lhead_lnum, c->lhead_offs, c->max_sqnum,
-               c->highest_inum);
+               (unsigned long)c->highest_inum);
 out:
        destroy_replay_tree(c);
        destroy_bud_list(c);
index 2bf753b388894e449b894a87c6eaaa152d6e7d56..0f392351dc5a57232c776ccf7577c7d759d5da85 100644 (file)
@@ -81,6 +81,7 @@ static int create_default_filesystem(struct ubifs_info *c)
        int lpt_lebs, lpt_first, orph_lebs, big_lpt, ino_waste, sup_flags = 0;
        int min_leb_cnt = UBIFS_MIN_LEB_CNT;
        uint64_t tmp64, main_bytes;
+       __le64 tmp_le64;
 
        /* Some functions called from here depend on the @c->key_len filed */
        c->key_len = UBIFS_SK_LEN;
@@ -295,10 +296,10 @@ static int create_default_filesystem(struct ubifs_info *c)
        ino->ch.node_type = UBIFS_INO_NODE;
        ino->creat_sqnum = cpu_to_le64(++c->max_sqnum);
        ino->nlink = cpu_to_le32(2);
-       tmp = cpu_to_le64(CURRENT_TIME_SEC.tv_sec);
-       ino->atime_sec   = tmp;
-       ino->ctime_sec   = tmp;
-       ino->mtime_sec   = tmp;
+       tmp_le64 = cpu_to_le64(CURRENT_TIME_SEC.tv_sec);
+       ino->atime_sec   = tmp_le64;
+       ino->ctime_sec   = tmp_le64;
+       ino->mtime_sec   = tmp_le64;
        ino->atime_nsec  = 0;
        ino->ctime_nsec  = 0;
        ino->mtime_nsec  = 0;
index 8780efbf40ac64fbf901fd448998361823c38be3..d80b2aef42b661001b2c87ac645f9a8ac29fbfd7 100644 (file)
 #include <linux/mount.h>
 #include "ubifs.h"
 
+/*
+ * Maximum amount of memory we may 'kmalloc()' without worrying that we are
+ * allocating too much.
+ */
+#define UBIFS_KMALLOC_OK (128*1024)
+
 /* Slab cache for UBIFS inodes */
 struct kmem_cache *ubifs_inode_slab;
 
@@ -561,18 +567,11 @@ static int init_constants_early(struct ubifs_info *c)
         * calculations when reporting free space.
         */
        c->leb_overhead = c->leb_size % UBIFS_MAX_DATA_NODE_SZ;
-       /* Buffer size for bulk-reads */
-       c->bulk_read_buf_size = UBIFS_MAX_BULK_READ * UBIFS_MAX_DATA_NODE_SZ;
-       if (c->bulk_read_buf_size > c->leb_size)
-               c->bulk_read_buf_size = c->leb_size;
-       if (c->bulk_read_buf_size > 128 * 1024) {
-               /* Check if we can kmalloc more than 128KiB */
-               void *try = kmalloc(c->bulk_read_buf_size, GFP_KERNEL);
 
-               kfree(try);
-               if (!try)
-                       c->bulk_read_buf_size = 128 * 1024;
-       }
+       /* Buffer size for bulk-reads */
+       c->max_bu_buf_len = UBIFS_MAX_BULK_READ * UBIFS_MAX_DATA_NODE_SZ;
+       if (c->max_bu_buf_len > c->leb_size)
+               c->max_bu_buf_len = c->leb_size;
        return 0;
 }
 
@@ -991,6 +990,34 @@ static void destroy_journal(struct ubifs_info *c)
        free_buds(c);
 }
 
+/**
+ * bu_init - initialize bulk-read information.
+ * @c: UBIFS file-system description object
+ */
+static void bu_init(struct ubifs_info *c)
+{
+       ubifs_assert(c->bulk_read == 1);
+
+       if (c->bu.buf)
+               return; /* Already initialized */
+
+again:
+       c->bu.buf = kmalloc(c->max_bu_buf_len, GFP_KERNEL | __GFP_NOWARN);
+       if (!c->bu.buf) {
+               if (c->max_bu_buf_len > UBIFS_KMALLOC_OK) {
+                       c->max_bu_buf_len = UBIFS_KMALLOC_OK;
+                       goto again;
+               }
+
+               /* Just disable bulk-read */
+               ubifs_warn("Cannot allocate %d bytes of memory for bulk-read, "
+                          "disabling it", c->max_bu_buf_len);
+               c->mount_opts.bulk_read = 1;
+               c->bulk_read = 0;
+               return;
+       }
+}
+
 /**
  * mount_ubifs - mount UBIFS file-system.
  * @c: UBIFS file-system description object
@@ -1059,6 +1086,13 @@ static int mount_ubifs(struct ubifs_info *c)
                        goto out_free;
        }
 
+       if (c->bulk_read == 1)
+               bu_init(c);
+
+       /*
+        * We have to check all CRCs, even for data nodes, when we mount the FS
+        * (specifically, when we are replaying).
+        */
        c->always_chk_crc = 1;
 
        err = ubifs_read_superblock(c);
@@ -1289,6 +1323,7 @@ out_cbuf:
 out_dereg:
        dbg_failure_mode_deregistration(c);
 out_free:
+       kfree(c->bu.buf);
        vfree(c->ileb_buf);
        vfree(c->sbuf);
        kfree(c->bottom_up_buf);
@@ -1325,10 +1360,11 @@ static void ubifs_umount(struct ubifs_info *c)
        kfree(c->cbuf);
        kfree(c->rcvrd_mst_node);
        kfree(c->mst_node);
+       kfree(c->bu.buf);
+       vfree(c->ileb_buf);
        vfree(c->sbuf);
        kfree(c->bottom_up_buf);
        UBIFS_DBG(vfree(c->dbg_buf));
-       vfree(c->ileb_buf);
        dbg_failure_mode_deregistration(c);
 }
 
@@ -1626,6 +1662,7 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)
                ubifs_err("invalid or unknown remount parameter");
                return err;
        }
+
        if ((sb->s_flags & MS_RDONLY) && !(*flags & MS_RDONLY)) {
                err = ubifs_remount_rw(c);
                if (err)
@@ -1633,6 +1670,14 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)
        } else if (!(sb->s_flags & MS_RDONLY) && (*flags & MS_RDONLY))
                ubifs_remount_ro(c);
 
+       if (c->bulk_read == 1)
+               bu_init(c);
+       else {
+               dbg_gen("disable bulk-read");
+               kfree(c->bu.buf);
+               c->bu.buf = NULL;
+       }
+
        return 0;
 }
 
@@ -1723,6 +1768,7 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent)
        mutex_init(&c->log_mutex);
        mutex_init(&c->mst_mutex);
        mutex_init(&c->umount_mutex);
+       mutex_init(&c->bu_mutex);
        init_waitqueue_head(&c->cmt_wq);
        c->buds = RB_ROOT;
        c->old_idx = RB_ROOT;
index d27fd918b9c935a1fd115a3f1729576c8c4ae883..6eef5344a145ec845ee17791567ea41ad4db2fa9 100644 (file)
@@ -1501,7 +1501,12 @@ out:
  * @bu: bulk-read parameters and results
  *
  * Lookup consecutive data node keys for the same inode that reside
- * consecutively in the same LEB.
+ * consecutively in the same LEB. This function returns zero in case of success
+ * and a negative error code in case of failure.
+ *
+ * Note, if the bulk-read buffer length (@bu->buf_len) is known, this function
+ * makes sure bulk-read nodes fit the buffer. Otherwise, this function prepares
+ * maxumum possible amount of nodes for bulk-read.
  */
 int ubifs_tnc_get_bu_keys(struct ubifs_info *c, struct bu_info *bu)
 {
@@ -2677,7 +2682,7 @@ int ubifs_tnc_remove_ino(struct ubifs_info *c, ino_t inum)
        struct ubifs_dent_node *xent, *pxent = NULL;
        struct qstr nm = { .name = NULL };
 
-       dbg_tnc("ino %lu", inum);
+       dbg_tnc("ino %lu", (unsigned long)inum);
 
        /*
         * Walk all extended attribute entries and remove them together with
@@ -2697,7 +2702,8 @@ int ubifs_tnc_remove_ino(struct ubifs_info *c, ino_t inum)
                }
 
                xattr_inum = le64_to_cpu(xent->inum);
-               dbg_tnc("xent '%s', ino %lu", xent->name, xattr_inum);
+               dbg_tnc("xent '%s', ino %lu", xent->name,
+                       (unsigned long)xattr_inum);
 
                nm.name = xent->name;
                nm.len = le16_to_cpu(xent->nlen);
index a7bd32fa15b987d9510583041a7b3a6e5f6f0998..46b172560a064eb7b4d541359aa9b02e7dd39380 100644 (file)
@@ -753,7 +753,7 @@ struct ubifs_znode {
 };
 
 /**
- * struct bu_info - bulk-read information
+ * struct bu_info - bulk-read information.
  * @key: first data node key
  * @zbranch: zbranches of data nodes to bulk read
  * @buf: buffer to read into
@@ -969,7 +969,10 @@ struct ubifs_mount_opts {
  * @mst_node: master node
  * @mst_offs: offset of valid master node
  * @mst_mutex: protects the master node area, @mst_node, and @mst_offs
- * @bulk_read_buf_size: buffer size for bulk-reads
+ *
+ * @max_bu_buf_len: maximum bulk-read buffer length
+ * @bu_mutex: protects the pre-allocated bulk-read buffer and @c->bu
+ * @bu: pre-allocated bulk-read information
  *
  * @log_lebs: number of logical eraseblocks in the log
  * @log_bytes: log size in bytes
@@ -1217,7 +1220,10 @@ struct ubifs_info {
        struct ubifs_mst_node *mst_node;
        int mst_offs;
        struct mutex mst_mutex;
-       int bulk_read_buf_size;
+
+       int max_bu_buf_len;
+       struct mutex bu_mutex;
+       struct bu_info bu;
 
        int log_lebs;
        long long log_bytes;
index 6e74b117aaf0e58d078e59d88817562de8379a1d..30ebde490f7f5ebc3a4b79331191706c180b5a8f 100644 (file)
@@ -106,6 +106,7 @@ void udf_clear_inode(struct inode *inode)
                udf_truncate_tail_extent(inode);
                unlock_kernel();
                write_inode_now(inode, 0);
+               invalidate_inode_buffers(inode);
        }
        iinfo = UDF_I(inode);
        kfree(iinfo->i_ext.i_data);
index d700dacdb10e7f68302853945b22ab56a752c7ad..c903130be7fd6f6ec3032067e990bab8582b9886 100644 (file)
@@ -212,7 +212,7 @@ xfs_rename(
        if (unlikely((target_dp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) &&
                     (target_dp->i_d.di_projid != src_ip->i_d.di_projid))) {
                error = XFS_ERROR(EXDEV);
-               xfs_rename_unlock4(inodes, XFS_ILOCK_SHARED);
+               xfs_rename_unlock4(inodes, XFS_ILOCK_EXCL);
                xfs_trans_cancel(tp, cancel_flags);
                goto std_return;
        }
index 54a279e44c9a4eb42dc0e83c836cfcc275d79c73..e9f6574930efb62ba8a636617befaf71a6b0ff45 100644 (file)
@@ -380,6 +380,8 @@ struct acpi_bus_type {
 int register_acpi_bus_type(struct acpi_bus_type *);
 int unregister_acpi_bus_type(struct acpi_bus_type *);
 struct device *acpi_get_physical_device(acpi_handle);
+struct device *acpi_get_physical_pci_device(acpi_handle);
+
 /* helper */
 acpi_handle acpi_get_child(acpi_handle, acpi_integer);
 acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int);
index cf04c6011c2acadf4624a7a39f06fd66668383f4..5fc1bb0f4a90e774669e16c813eb729f22a26c4c 100644 (file)
 
 #define ACPI_MAX_STRING                        80
 
+/*
+ * Please update drivers/acpi/debug.c and Documentation/acpi/debug.txt
+ * if you add to this list.
+ */
 #define ACPI_BUS_COMPONENT             0x00010000
+#define ACPI_AC_COMPONENT              0x00020000
+#define ACPI_BATTERY_COMPONENT         0x00040000
+#define ACPI_BUTTON_COMPONENT          0x00080000
+#define ACPI_SBS_COMPONENT             0x00100000
+#define ACPI_FAN_COMPONENT             0x00200000
+#define ACPI_PCI_COMPONENT             0x00400000
+#define ACPI_POWER_COMPONENT           0x00800000
+#define ACPI_CONTAINER_COMPONENT       0x01000000
 #define ACPI_SYSTEM_COMPONENT          0x02000000
+#define ACPI_THERMAL_COMPONENT         0x04000000
+#define ACPI_MEMORY_DEVICE_COMPONENT   0x08000000
+#define ACPI_VIDEO_COMPONENT           0x10000000
+#define ACPI_PROCESSOR_COMPONENT       0x20000000
 
 /*
  * _HID definitions
@@ -41,6 +57,7 @@
  */
 
 #define ACPI_POWER_HID                 "LNXPOWER"
+#define ACPI_PROCESSOR_OBJECT_HID      "ACPI_CPU"
 #define ACPI_PROCESSOR_HID             "ACPI0007"
 #define ACPI_SYSTEM_HID                        "LNXSYSTM"
 #define ACPI_THERMAL_HID               "LNXTHERM"
@@ -54,7 +71,6 @@
                                        PCI
    -------------------------------------------------------------------------- */
 
-#define ACPI_PCI_COMPONENT             0x00400000
 
 /* ACPI PCI Interrupt Link (pci_link.c) */
 
@@ -86,7 +102,6 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_device *device, int domain,
                                   Power Resource
    -------------------------------------------------------------------------- */
 
-#ifdef CONFIG_ACPI_POWER
 int acpi_device_sleep_wake(struct acpi_device *dev,
                            int enable, int sleep_state, int dev_state);
 int acpi_enable_wakeup_device_power(struct acpi_device *dev, int sleep_state);
@@ -94,15 +109,12 @@ int acpi_disable_wakeup_device_power(struct acpi_device *dev);
 int acpi_power_get_inferred_state(struct acpi_device *device);
 int acpi_power_transition(struct acpi_device *device, int state);
 extern int acpi_power_nocheck;
-#endif
 
 /* --------------------------------------------------------------------------
                                   Embedded Controller
    -------------------------------------------------------------------------- */
-#ifdef CONFIG_ACPI_EC
 int acpi_ec_ecdt_probe(void);
 int acpi_boot_ec_enable(void);
-#endif
 
 /* --------------------------------------------------------------------------
                                     Processor
index 94d94e126e9f4a3b825309e01766df0b973c088d..33bc0e3b19546e8c1e8fb4225ec8615162c69d12 100644 (file)
@@ -252,9 +252,9 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status);
 
 acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type);
 
-acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags);
+acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number);
 
-acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags);
+acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number);
 
 acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags);
 
index 619fb75f8861b3822d8df03ab83bee0b809fe460..16a9ca9a66e41787ac62c5ded9a3201f780b4638 100644 (file)
@@ -167,7 +167,7 @@ static const union acpi_predefined_info predefined_names[] = {
        {.info = {"_BFS", 1, 0}},
        {.info = {"_BIF", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER,
                                          9,
-                                         ACPI_RTYPE_STRING, 4, 0}},    /* fixed (9 Int),(4 Str) */
+                                         ACPI_RTYPE_STRING | ACPI_RTYPE_BUFFER, 4, 0}},        /* fixed (9 Int),(4 Str) */
        {.info = {"_BLT", 3, 0}},
        {.info = {"_BMC", 1, 0}},
        {.info = {"_BMD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 5, 0, 0, 0}},   /* fixed (5 Int) */
@@ -346,7 +346,7 @@ static const union acpi_predefined_info predefined_names[] = {
 
        /* Acpi 1.0 defined _WAK with no return value. Later, it was changed to return a package */
 
-       {.info = {"_WAK", 1, ACPI_RTYPE_NONE | ACPI_RTYPE_PACKAGE}},
+       {.info = {"_WAK", 1, ACPI_RTYPE_NONE | ACPI_RTYPE_INTEGER | ACPI_RTYPE_PACKAGE}},
        {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 2, 0, 0, 0}},      /* fixed (2 Int), but is optional */
        {.ret_info = {0, 0, 0, 0, 0, 0}}        /* Table terminator */
 };
index e8936ab596277e26e1047dc8c3e2ceeb3b465427..7220361790b3ce105869e2dddc65c361d27e9d14 100644 (file)
@@ -525,6 +525,7 @@ typedef u32 acpi_event_status;
 #define ACPI_EVENT_FLAG_ENABLED         (acpi_event_status) 0x01
 #define ACPI_EVENT_FLAG_WAKE_ENABLED    (acpi_event_status) 0x02
 #define ACPI_EVENT_FLAG_SET             (acpi_event_status) 0x04
+#define ACPI_EVENT_FLAG_HANDLE         (acpi_event_status) 0x08
 
 /*
  * General Purpose Events (GPE)
index 4ec0a296bdec8413394dbecedbf779bb19bfcf4b..7abdaa91ccd3738ea7e8633f16c78f3031ce15bf 100644 (file)
@@ -251,7 +251,7 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u)
 #define atomic_long_cmpxchg(l, old, new) \
        (atomic_cmpxchg((atomic_t *)(l), (old), (new)))
 #define atomic_long_xchg(v, new) \
-       (atomic_xchg((atomic_t *)(l), (new)))
+       (atomic_xchg((atomic_t *)(v), (new)))
 
 #endif  /*  BITS_PER_LONG == 64  */
 
index f10d367fb2a5b1f31f4741ddaf58f06a61968f61..c5f1c2c920e26c033761d640a81256b0b13c13eb 100644 (file)
@@ -1,6 +1,8 @@
 #include <asm-generic/audit_dir_write.h>
 __NR_acct,
+#ifdef __NR_swapon
 __NR_swapon,
+#endif
 __NR_quotactl,
 __NR_truncate,
 #ifdef __NR_truncate64
index 12c07c1866b2072f9c2529829c27dac5077c96a3..4c794d73fb8484e47fb0708beb7a470724707046 100644 (file)
@@ -8,9 +8,17 @@
 #ifdef CONFIG_GENERIC_BUG
 #ifndef __ASSEMBLY__
 struct bug_entry {
+#ifndef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
        unsigned long   bug_addr;
+#else
+       signed int      bug_addr_disp;
+#endif
 #ifdef CONFIG_DEBUG_BUGVERBOSE
+#ifndef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
        const char      *file;
+#else
+       signed int      file_disp;
+#endif
        unsigned short  line;
 #endif
        unsigned short  flags;
index ef87f889ef62c2e215b22a0b4d29a53d3b8f61fe..72ebe91005a8de190f795e91d77030d921ea86a5 100644 (file)
@@ -129,6 +129,10 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres
 #define move_pte(pte, prot, old_addr, new_addr)        (pte)
 #endif
 
+#ifndef pgprot_writecombine
+#define pgprot_writecombine pgprot_noncached
+#endif
+
 /*
  * When walking page tables, get the address of the next boundary,
  * or the end address of the range if that comes earlier.  Although no
@@ -289,6 +293,52 @@ static inline void ptep_modify_prot_commit(struct mm_struct *mm,
 #define arch_flush_lazy_cpu_mode()     do {} while (0)
 #endif
 
+#ifndef __HAVE_PFNMAP_TRACKING
+/*
+ * Interface that can be used by architecture code to keep track of
+ * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn)
+ *
+ * track_pfn_vma_new is called when a _new_ pfn mapping is being established
+ * for physical range indicated by pfn and size.
+ */
+static inline int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t prot,
+                                       unsigned long pfn, unsigned long size)
+{
+       return 0;
+}
+
+/*
+ * Interface that can be used by architecture code to keep track of
+ * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn)
+ *
+ * track_pfn_vma_copy is called when vma that is covering the pfnmap gets
+ * copied through copy_page_range().
+ */
+static inline int track_pfn_vma_copy(struct vm_area_struct *vma)
+{
+       return 0;
+}
+
+/*
+ * Interface that can be used by architecture code to keep track of
+ * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn)
+ *
+ * untrack_pfn_vma is called while unmapping a pfnmap for a region.
+ * untrack can be called for a specific region indicated by pfn and size or
+ * can be for the entire vma (in which case size can be zero).
+ */
+static inline void untrack_pfn_vma(struct vm_area_struct *vma,
+                                       unsigned long pfn, unsigned long size)
+{
+}
+#else
+extern int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t prot,
+                               unsigned long pfn, unsigned long size);
+extern int track_pfn_vma_copy(struct vm_area_struct *vma);
+extern void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn,
+                               unsigned long size);
+#endif
+
 #endif /* !__ASSEMBLY__ */
 
 #endif /* _ASM_GENERIC_PGTABLE_H */
index 46b9b647f3c3864540a9a44411f91b9881c0028f..8a3a4dd55763eba744552c46c825831569e90610 100644 (file)
@@ -266,7 +266,7 @@ extern int __get_user_unknown(void);
                "       .section        .fixup,\"ax\"   \n"             \
                "4:                                     \n"             \
                "       mov             %5,%0           \n"             \
-               "       jmp             2b              \n"             \
+               "       jmp             3b              \n"             \
                "       .previous                       \n"             \
                "       .section        __ex_table,\"a\"\n"             \
                "       .balign         4               \n"             \
index 28c7f1679d496f6981d0e14418ef29af448b5a0d..d5e8e5c8954825baaf69564e07716dd041ed0593 100644 (file)
@@ -1151,6 +1151,7 @@ extern u32 drm_vblank_count(struct drm_device *dev, int crtc);
 extern void drm_handle_vblank(struct drm_device *dev, int crtc);
 extern int drm_vblank_get(struct drm_device *dev, int crtc);
 extern void drm_vblank_put(struct drm_device *dev, int crtc);
+extern void drm_vblank_cleanup(struct drm_device *dev);
 /* Modesetting support */
 extern int drm_modeset_ctl(struct drm_device *dev, void *data,
                           struct drm_file *file_priv);
index fd6a452b0ceb2dd5b809631cbd12d1dc77c31b92..fba8051fb297c5368d9f869dff0c1217e4a332d5 100644 (file)
@@ -163,8 +163,6 @@ struct acpi_pci_driver {
 int acpi_pci_register_driver(struct acpi_pci_driver *driver);
 void acpi_pci_unregister_driver(struct acpi_pci_driver *driver);
 
-#ifdef CONFIG_ACPI_EC
-
 extern int ec_read(u8 addr, u8 *val);
 extern int ec_write(u8 addr, u8 val);
 extern int ec_transaction(u8 command,
@@ -172,8 +170,6 @@ extern int ec_transaction(u8 command,
                           u8 *rdata, unsigned rdata_len,
                          int force_poll);
 
-#endif /*CONFIG_ACPI_EC*/
-
 #if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE)
 
 typedef void (*wmi_notify_handler) (u32 value, void *context);
@@ -194,6 +190,50 @@ extern bool wmi_has_guid(const char *guid);
 
 #endif /* CONFIG_ACPI_WMI */
 
+#define ACPI_VIDEO_OUTPUT_SWITCHING                    0x0001
+#define ACPI_VIDEO_DEVICE_POSTING                      0x0002
+#define ACPI_VIDEO_ROM_AVAILABLE                       0x0004
+#define ACPI_VIDEO_BACKLIGHT                           0x0008
+#define ACPI_VIDEO_BACKLIGHT_FORCE_VENDOR              0x0010
+#define ACPI_VIDEO_BACKLIGHT_FORCE_VIDEO               0x0020
+#define ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VENDOR       0x0040
+#define ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VIDEO                0x0080
+#define ACPI_VIDEO_BACKLIGHT_DMI_VENDOR                        0x0100
+#define ACPI_VIDEO_BACKLIGHT_DMI_VIDEO                 0x0200
+#define ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VENDOR         0x0400
+#define ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VIDEO          0x0800
+
+#if defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE)
+
+extern long acpi_video_get_capabilities(acpi_handle graphics_dev_handle);
+extern long acpi_is_video_device(struct acpi_device *device);
+extern int acpi_video_backlight_support(void);
+extern int acpi_video_display_switch_support(void);
+
+#else
+
+static inline long acpi_video_get_capabilities(acpi_handle graphics_dev_handle)
+{
+       return 0;
+}
+
+static inline long acpi_is_video_device(struct acpi_device *device)
+{
+       return 0;
+}
+
+static inline int acpi_video_backlight_support(void)
+{
+       return 0;
+}
+
+static inline int acpi_video_display_switch_support(void)
+{
+       return 0;
+}
+
+#endif /* defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) */
+
 extern int acpi_blacklisted(void);
 #ifdef CONFIG_DMI
 extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d);
index 6272a395d43c0b73a6ef4fd5d0a19062d6154a38..8f0672d13eb1bf8bbddba0d30c6ecdfd30c94ddf 100644 (file)
@@ -391,6 +391,7 @@ extern int audit_classify_arch(int arch);
 #ifdef CONFIG_AUDITSYSCALL
 /* These are defined in auditsc.c */
                                /* Public API */
+extern void audit_finish_fork(struct task_struct *child);
 extern int  audit_alloc(struct task_struct *task);
 extern void audit_free(struct task_struct *task);
 extern void audit_syscall_entry(int arch,
@@ -434,7 +435,7 @@ static inline void audit_ptrace(struct task_struct *t)
 
                                /* Private API (for audit.c only) */
 extern unsigned int audit_serial(void);
-extern void auditsc_get_stamp(struct audit_context *ctx,
+extern int auditsc_get_stamp(struct audit_context *ctx,
                              struct timespec *t, unsigned int *serial);
 extern int  audit_set_loginuid(struct task_struct *task, uid_t loginuid);
 #define audit_get_loginuid(t) ((t)->loginuid)
@@ -504,6 +505,7 @@ static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
 extern int audit_n_rules;
 extern int audit_signals;
 #else
+#define audit_finish_fork(t)
 #define audit_alloc(t) ({ 0; })
 #define audit_free(t) do { ; } while (0)
 #define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0)
@@ -516,7 +518,7 @@ extern int audit_signals;
 #define audit_inode(n,d) do { ; } while (0)
 #define audit_inode_child(d,i,p) do { ; } while (0)
 #define audit_core_dumps(i) do { ; } while (0)
-#define auditsc_get_stamp(c,t,s) do { BUG(); } while (0)
+#define auditsc_get_stamp(c,t,s) (0)
 #define audit_get_loginuid(t) (-1)
 #define audit_get_sessionid(t) (-1)
 #define audit_log_task_context(b) do { ; } while (0)
index a135256b272c79f6a7b462826e59735ce3b4d620..031a315c0509e5aa9eaa73c080b7e76a44dc95a0 100644 (file)
@@ -662,6 +662,7 @@ extern unsigned long blk_max_low_pfn, blk_max_pfn;
  * default timeout for SG_IO if none specified
  */
 #define BLK_DEFAULT_SG_TIMEOUT (60 * HZ)
+#define BLK_MIN_SG_TIMEOUT     (7 * HZ)
 
 #ifdef CONFIG_BOUNCE
 extern int init_emergency_isa_pool(void);
@@ -786,6 +787,8 @@ static inline void blk_run_address_space(struct address_space *mapping)
                blk_run_backing_dev(mapping->backing_dev_info, NULL);
 }
 
+extern void blkdev_dequeue_request(struct request *req);
+
 /*
  * blk_end_request() and friends.
  * __blk_end_request() and end_request() must be called with
@@ -820,11 +823,6 @@ extern void blk_update_request(struct request *rq, int error,
 extern unsigned int blk_rq_bytes(struct request *rq);
 extern unsigned int blk_rq_cur_bytes(struct request *rq);
 
-static inline void blkdev_dequeue_request(struct request *req)
-{
-       elv_dequeue_request(req->q, req);
-}
-
 /*
  * Access functions for manipulating queue properties
  */
@@ -921,6 +919,8 @@ extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter);
 
 #define MAX_SEGMENT_SIZE       65536
 
+#define BLK_SEG_BOUNDARY_MASK  0xFFFFFFFFUL
+
 #define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist)
 
 static inline int queue_hardsect_size(struct request_queue *q)
diff --git a/include/linux/c2port.h b/include/linux/c2port.h
new file mode 100644 (file)
index 0000000..7b5a238
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ *  Silicon Labs C2 port Linux support
+ *
+ *  Copyright (c) 2007 Rodolfo Giometti <giometti@linux.it>
+ *  Copyright (c) 2007 Eurotech S.p.A. <info@eurotech.it>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation
+ */
+
+#include <linux/device.h>
+
+#define C2PORT_NAME_LEN                        32
+
+/*
+ * C2 port basic structs
+ */
+
+/* Main struct */
+struct c2port_ops;
+struct c2port_device {
+       unsigned int access:1;
+       unsigned int flash_access:1;
+
+       int id;
+       char name[C2PORT_NAME_LEN];
+       struct c2port_ops *ops;
+       struct mutex mutex;             /* prevent races during read/write */
+
+       struct device *dev;
+
+       void *private_data;
+};
+
+/* Basic operations */
+struct c2port_ops {
+       /* Flash layout */
+       unsigned short block_size;      /* flash block size in bytes */
+       unsigned short blocks_num;      /* flash blocks number */
+
+       /* Enable or disable the access to C2 port */
+       void (*access)(struct c2port_device *dev, int status);
+
+       /* Set C2D data line as input/output */
+       void (*c2d_dir)(struct c2port_device *dev, int dir);
+
+       /* Read/write C2D data line */
+       int (*c2d_get)(struct c2port_device *dev);
+       void (*c2d_set)(struct c2port_device *dev, int status);
+
+       /* Write C2CK clock line */
+       void (*c2ck_set)(struct c2port_device *dev, int status);
+};
+
+/*
+ * Exported functions
+ */
+
+#define to_class_dev(obj) container_of((obj), struct class_device, kobj)
+#define to_c2port_device(obj) container_of((obj), struct c2port_device, class)
+
+extern struct c2port_device *c2port_device_register(char *name,
+                                       struct c2port_ops *ops, void *devdata);
+extern void c2port_device_unregister(struct c2port_device *dev);
index e9ca210ffa5b6cf9fd9c0c5f577bbca752fc04d1..f50785ad478147f8b4a80ba017dc1deba70d6368 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/skbuff.h>
 #include <linux/netdevice.h>
 
-#define CAN_VERSION "20071116"
+#define CAN_VERSION "20081130"
 
 /* increment this number each time you change some user-space interface */
 #define CAN_ABI_VERSION "8"
index f061a1ea1b74d74fa7a3391bb47c6bbdca4d0b3e..e88f3ecf38b438e464fbac92a420ef9897c8e952 100644 (file)
@@ -252,12 +252,10 @@ extern int compat_ptrace_request(struct task_struct *child,
                                 compat_long_t request,
                                 compat_ulong_t addr, compat_ulong_t data);
 
-#ifdef __ARCH_WANT_COMPAT_SYS_PTRACE
 extern long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
                               compat_ulong_t addr, compat_ulong_t data);
 asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
                                  compat_long_t addr, compat_long_t data);
-#endif /* __ARCH_WANT_COMPAT_SYS_PTRACE */
 
 /*
  * epoll (fs/eventpoll.c) compat bits follow ...
index 2691926fb50641305219b74db1a96f94a143c4f7..8e540d32c9feab60f34e4e6f739d0f1ac85ad7fe 100644 (file)
@@ -74,8 +74,6 @@ static inline int cpuset_do_slab_mem_spread(void)
        return current->flags & PF_SPREAD_SLAB;
 }
 
-extern void cpuset_track_online_nodes(void);
-
 extern int current_cpuset_is_being_rebound(void);
 
 extern void rebuild_sched_domains(void);
@@ -151,8 +149,6 @@ static inline int cpuset_do_slab_mem_spread(void)
        return 0;
 }
 
-static inline void cpuset_track_online_nodes(void) {}
-
 static inline int current_cpuset_is_being_rebound(void)
 {
        return 0;
index e5084eb5943a5f35fc82680e3a83103f19a46019..2bfda178f274ef5dfbe782fb117d5ea0d80391d4 100644 (file)
@@ -44,6 +44,7 @@ extern const struct dmi_device * dmi_find_device(int type, const char *name,
 extern void dmi_scan_machine(void);
 extern int dmi_get_year(int field);
 extern int dmi_name_in_vendors(const char *str);
+extern int dmi_name_in_serial(const char *str);
 extern int dmi_available;
 extern int dmi_walk(void (*decode)(const struct dmi_header *));
 
@@ -56,6 +57,7 @@ static inline const struct dmi_device * dmi_find_device(int type, const char *na
 static inline void dmi_scan_machine(void) { return; }
 static inline int dmi_get_year(int year) { return 0; }
 static inline int dmi_name_in_vendors(const char *s) { return 0; }
+static inline int dmi_name_in_serial(const char *s) { return 0; }
 #define dmi_available 0
 static inline int dmi_walk(void (*decode)(const struct dmi_header *))
        { return -1; }
index 0dcdd9458f4bcce56d1a89c566892f5d5097e876..4a853ef6fd35076d4aad21b488a97a513fb7bacc 100644 (file)
@@ -63,23 +63,24 @@ extern int dir_notify_enable;
 #define MAY_ACCESS 16
 #define MAY_OPEN 32
 
-#define FMODE_READ ((__force fmode_t)1)
-#define FMODE_WRITE ((__force fmode_t)2)
-
-/* Internal kernel extensions */
-#define FMODE_LSEEK    ((__force fmode_t)4)
-#define FMODE_PREAD    ((__force fmode_t)8)
-#define FMODE_PWRITE   FMODE_PREAD     /* These go hand in hand */
-
-/* File is being opened for execution. Primary users of this flag are
-   distributed filesystems that can use it to achieve correct ETXTBUSY
-   behavior for cross-node execution/opening_for_writing of files */
-#define FMODE_EXEC     ((__force fmode_t)16)
-
-#define FMODE_NDELAY   ((__force fmode_t)32)
-#define FMODE_EXCL     ((__force fmode_t)64)
+/* file is open for reading */
+#define FMODE_READ             ((__force fmode_t)1)
+/* file is open for writing */
+#define FMODE_WRITE            ((__force fmode_t)2)
+/* file is seekable */
+#define FMODE_LSEEK            ((__force fmode_t)4)
+/* file can be accessed using pread/pwrite */
+#define FMODE_PREAD            ((__force fmode_t)8)
+#define FMODE_PWRITE           FMODE_PREAD     /* These go hand in hand */
+/* File is opened for execution with sys_execve / sys_uselib */
+#define FMODE_EXEC             ((__force fmode_t)16)
+/* File is opened with O_NDELAY (only set for block devices) */
+#define FMODE_NDELAY           ((__force fmode_t)32)
+/* File is opened with O_EXCL (only set for block devices) */
+#define FMODE_EXCL             ((__force fmode_t)64)
+/* File is opened using open(.., 3, ..) and is writeable only for ioctls
+   (specialy hack for floppy.c) */
 #define FMODE_WRITE_IOCTL      ((__force fmode_t)128)
-#define FMODE_NDELAY_NOW       ((__force fmode_t)256)
 
 #define RW_MASK                1
 #define RWA_MASK       2
index 703eb53cfa2b2a1512b7ce97d9c1da218ad9ac0f..9c5bc6be2b091274b37b14046f03ebf3db70c194 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/ktime.h>
 #include <linux/init.h>
 #include <linux/types.h>
+#include <linux/module.h>
 #include <linux/kallsyms.h>
 
 #ifdef CONFIG_FUNCTION_TRACER
@@ -231,7 +232,7 @@ ftrace_init_module(unsigned long *start, unsigned long *end) { }
 
 struct boot_trace {
        pid_t                   caller;
-       char                    func[KSYM_NAME_LEN];
+       char                    func[KSYM_SYMBOL_LEN];
        int                     result;
        unsigned long long      duration;               /* usecs */
        ktime_t                 calltime;
index e439e6aed832f3fc98b3a7944521f108e5740fbb..3df7742ce2469e4bdc3673ec904b77e9e4eab6f7 100644 (file)
@@ -522,7 +522,9 @@ extern char *disk_name (struct gendisk *hd, int partno, char *buf);
 
 extern int disk_expand_part_tbl(struct gendisk *disk, int target);
 extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
-extern int __must_check add_partition(struct gendisk *, int, sector_t, sector_t, int);
+extern struct hd_struct * __must_check add_partition(struct gendisk *disk,
+                                                    int partno, sector_t start,
+                                                    sector_t len, int flags);
 extern void delete_partition(struct gendisk *, int);
 extern void printk_all_partitions(void);
 
index 7dcbc82f3b7bf4a19969d0cf19824cf373a2a91b..13875ce9112ac0163b28e0816f20164e1ec39bae 100644 (file)
@@ -63,12 +63,14 @@ static inline void *kmap_atomic(struct page *page, enum km_type idx)
 #endif /* CONFIG_HIGHMEM */
 
 /* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */
+#ifndef clear_user_highpage
 static inline void clear_user_highpage(struct page *page, unsigned long vaddr)
 {
        void *addr = kmap_atomic(page, KM_USER0);
        clear_user_page(addr, vaddr, page);
        kunmap_atomic(addr, KM_USER0);
 }
+#endif
 
 #ifndef __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
 /**
index 07e510a3b00a89e78c2f48b591208b19dac6ef4e..3eba43878dcb2da2e6d4ad6a8b029ed13e3f8e6a 100644 (file)
@@ -46,9 +46,6 @@ enum hrtimer_restart {
  * hrtimer callback modes:
  *
  *     HRTIMER_CB_SOFTIRQ:             Callback must run in softirq context
- *     HRTIMER_CB_IRQSAFE:             Callback may run in hardirq context
- *     HRTIMER_CB_IRQSAFE_NO_RESTART:  Callback may run in hardirq context and
- *                                     does not restart the timer
  *     HRTIMER_CB_IRQSAFE_PERCPU:      Callback must run in hardirq context
  *                                     Special mode for tick emulation and
  *                                     scheduler timer. Such timers are per
@@ -61,8 +58,6 @@ enum hrtimer_restart {
  */
 enum hrtimer_cb_mode {
        HRTIMER_CB_SOFTIRQ,
-       HRTIMER_CB_IRQSAFE,
-       HRTIMER_CB_IRQSAFE_NO_RESTART,
        HRTIMER_CB_IRQSAFE_PERCPU,
        HRTIMER_CB_IRQSAFE_UNLOCKED,
 };
index 54525be4b5f87f8d0f43d21a40db8efee2ec10f5..010fb26a15796452b4382ad167e58cc4210e0c38 100644 (file)
@@ -1296,6 +1296,13 @@ extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *o
 #define ide_pci_register_driver(d) pci_register_driver(d)
 #endif
 
+static inline int ide_pci_is_in_compatibility_mode(struct pci_dev *dev)
+{
+       if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && (dev->class & 5) != 5)
+               return 1;
+       return 0;
+}
+
 void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int,
                         hw_regs_t *, hw_regs_t **);
 void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *);
@@ -1375,6 +1382,7 @@ enum {
        IDE_HFLAG_IO_32BIT              = (1 << 24),
        /* unmask IRQs */
        IDE_HFLAG_UNMASK_IRQS           = (1 << 25),
+       IDE_HFLAG_BROKEN_ALTSTATUS      = (1 << 26),
        /* serialize ports if DMA is possible (for sl82c105) */
        IDE_HFLAG_SERIALIZE_DMA         = (1 << 27),
        /* force host out of "simplex" mode */
index fa035f96f2a3b340c468e4b58d9010df3b21be69..dd846df8cd32182f6740ea59f6451079deb3060d 100644 (file)
@@ -52,13 +52,14 @@ struct idr_layer {
        unsigned long            bitmap; /* A zero bit means "space here" */
        struct idr_layer        *ary[1<<IDR_BITS];
        int                      count;  /* When zero, we can release it */
+       int                      layer;  /* distance from leaf */
        struct rcu_head          rcu_head;
 };
 
 struct idr {
        struct idr_layer *top;
        struct idr_layer *id_free;
-       int               layers;
+       int               layers; /* only valid without concurrent changes */
        int               id_free_cnt;
        spinlock_t        lock;
 };
index bd578578a8b98408844e272fc65dc9f694692d0f..37ea2894b3c0ff870a79f014fb370894b3709e44 100644 (file)
@@ -134,6 +134,8 @@ extern void inotify_remove_watch_locked(struct inotify_handle *,
                                        struct inotify_watch *);
 extern void get_inotify_watch(struct inotify_watch *);
 extern void put_inotify_watch(struct inotify_watch *);
+extern int pin_inotify_watch(struct inotify_watch *);
+extern void unpin_inotify_watch(struct inotify_watch *);
 
 #else
 
@@ -228,6 +230,15 @@ static inline void put_inotify_watch(struct inotify_watch *watch)
 {
 }
 
+extern inline int pin_inotify_watch(struct inotify_watch *watch)
+{
+       return 0;
+}
+
+extern inline void unpin_inotify_watch(struct inotify_watch *watch)
+{
+}
+
 #endif /* CONFIG_INOTIFY */
 
 #endif /* __KERNEL __ */
index b86fb5581ce602f5978ff2a06ddc05eb67f19a07..5341e8251f8cb451243cd526f8dd34232052e055 100644 (file)
@@ -238,6 +238,7 @@ struct input_absinfo {
 #define KEY_KPEQUAL            117
 #define KEY_KPPLUSMINUS                118
 #define KEY_PAUSE              119
+#define KEY_SCALE              120     /* AL Compiz Scale (Expose) */
 
 #define KEY_KPCOMMA            121
 #define KEY_HANGEUL            122
@@ -322,6 +323,7 @@ struct input_absinfo {
 #define KEY_PAUSECD            201
 #define KEY_PROG3              202
 #define KEY_PROG4              203
+#define KEY_DASHBOARD          204     /* AL Dashboard */
 #define KEY_SUSPEND            205
 #define KEY_CLOSE              206     /* AC Close */
 #define KEY_PLAY               207
index d058c57be02d3508e27382e63980bfb593658649..3dddfa703ebd95ab1253c56397104c2607f98e90 100644 (file)
@@ -63,7 +63,8 @@ typedef       void (*irq_flow_handler_t)(unsigned int irq,
 #define IRQ_MOVE_PENDING       0x00200000      /* need to re-target IRQ destination */
 #define IRQ_NO_BALANCING       0x00400000      /* IRQ is excluded from balancing */
 #define IRQ_SPURIOUS_DISABLED  0x00800000      /* IRQ was disabled by the spurious trap */
-#define IRQ_MOVE_PCNTXT        0x01000000      /* IRQ migration from process context */
+#define IRQ_MOVE_PCNTXT                0x01000000      /* IRQ migration from process context */
+#define IRQ_AFFINITY_SET       0x02000000      /* IRQ affinity was set from userspace*/
 
 #ifdef CONFIG_IRQ_PER_CPU
 # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
@@ -130,7 +131,7 @@ struct irq_chip {
 
 /**
  * struct irq_desc - interrupt descriptor
- *
+ * @irq:               interrupt number for this descriptor
  * @handle_irq:                highlevel irq-events handler [if NULL, __do_IRQ()]
  * @chip:              low level interrupt hardware access
  * @msi_desc:          MSI descriptor
@@ -149,7 +150,6 @@ struct irq_chip {
  * @cpu:               cpu index useful for balancing
  * @pending_mask:      pending rebalanced interrupts
  * @dir:               /proc/irq/ procfs entry
- * @affinity_entry:    /proc/irq/smp_affinity procfs entry on SMP
  * @name:              flow handler name for /proc/interrupts output
  */
 struct irq_desc {
@@ -210,7 +210,6 @@ extern int setup_irq(unsigned int irq, struct irqaction *new);
 
 #ifdef CONFIG_GENERIC_PENDING_IRQ
 
-void set_pending_irq(unsigned int irq, cpumask_t mask);
 void move_native_irq(int irq);
 void move_masked_irq(int irq);
 
@@ -228,10 +227,6 @@ static inline void move_masked_irq(int irq)
 {
 }
 
-static inline void set_pending_irq(unsigned int irq, cpumask_t mask)
-{
-}
-
 #endif /* CONFIG_GENERIC_PENDING_IRQ */
 
 #else /* CONFIG_SMP */
index fba141d3ca0783303c661f39fb2c503ba418dc56..dc7e0d0a6474448aba71b4c32d2045afc44e240e 100644 (file)
@@ -318,32 +318,36 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
        return buf;
 }
 
-#define pr_emerg(fmt, arg...) \
-       printk(KERN_EMERG fmt, ##arg)
-#define pr_alert(fmt, arg...) \
-       printk(KERN_ALERT fmt, ##arg)
-#define pr_crit(fmt, arg...) \
-       printk(KERN_CRIT fmt, ##arg)
-#define pr_err(fmt, arg...) \
-       printk(KERN_ERR fmt, ##arg)
-#define pr_warning(fmt, arg...) \
-       printk(KERN_WARNING fmt, ##arg)
-#define pr_notice(fmt, arg...) \
-       printk(KERN_NOTICE fmt, ##arg)
-#define pr_info(fmt, arg...) \
-       printk(KERN_INFO fmt, ##arg)
+#ifndef pr_fmt
+#define pr_fmt(fmt) fmt
+#endif
+
+#define pr_emerg(fmt, ...) \
+        printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
+#define pr_alert(fmt, ...) \
+        printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
+#define pr_crit(fmt, ...) \
+        printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
+#define pr_err(fmt, ...) \
+        printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
+#define pr_warning(fmt, ...) \
+        printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
+#define pr_notice(fmt, ...) \
+        printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
+#define pr_info(fmt, ...) \
+        printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
 
 /* If you are writing a driver, please use dev_dbg instead */
 #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
 #define pr_debug(fmt, ...) do { \
-       dynamic_pr_debug(fmt, ##__VA_ARGS__); \
+       dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \
        } while (0)
 #elif defined(DEBUG)
-#define pr_debug(fmt, arg...) \
-       printk(KERN_DEBUG fmt, ##arg)
+#define pr_debug(fmt, ...) \
+       printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
 #else
-#define pr_debug(fmt, arg...) \
-       ({ if (0) printk(KERN_DEBUG fmt, ##arg); 0; })
+#define pr_debug(fmt, ...) \
+       ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; })
 #endif
 
 /*
index 59b0f1c807b5bd97580373781fb6028970431657..ed3f26eb5df1421287ea41d17feed10be87cafeb 100644 (file)
@@ -375,6 +375,7 @@ enum {
        ATA_HORKAGE_BRIDGE_OK   = (1 << 10),    /* no bridge limits */
        ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands
                                                    not multiple of 16 bytes */
+       ATA_HORKAGE_FIRMWARE_WARN = (1 << 12),  /* firwmare update warning */
 
         /* DMA mask for user DMA control: User visible values; DO NOT
            renumber */
index 331e5f1c2d8ec4439bc69294337dc1b00345f3d8..29aec6e100203da5e8b0f40ab726360ca08b8e72 100644 (file)
@@ -331,10 +331,11 @@ static inline void lockdep_on(void)
 # define lock_set_subclass(l, s, i)            do { } while (0)
 # define lockdep_init()                                do { } while (0)
 # define lockdep_info()                                do { } while (0)
-# define lockdep_init_map(lock, name, key, sub)        do { (void)(key); } while (0)
+# define lockdep_init_map(lock, name, key, sub) \
+               do { (void)(name); (void)(key); } while (0)
 # define lockdep_set_class(lock, key)          do { (void)(key); } while (0)
 # define lockdep_set_class_and_name(lock, key, name) \
-               do { (void)(key); } while (0)
+               do { (void)(key); (void)(name); } while (0)
 #define lockdep_set_class_and_subclass(lock, key, sub) \
                do { (void)(key); } while (0)
 #define lockdep_set_subclass(lock, sub)                do { } while (0)
index 2f5f8a5ef2a08a5e796294275ee095cae2319fd5..36c82c9e6ea70985243e56a2b41ac13fe060bd5b 100644 (file)
@@ -91,7 +91,7 @@ extern int memory_notify(unsigned long val, void *v);
 
 #ifdef CONFIG_MEMORY_HOTPLUG
 #define hotplug_memory_notifier(fn, pri) {                     \
-       static struct notifier_block fn##_mem_nb =              \
+       static __meminitdata struct notifier_block fn##_mem_nb =\
                { .notifier_call = fn, .priority = pri };       \
        register_memory_notifier(&fn##_mem_nb);                 \
 }
index dfda69e9f4409ca973385dc1cb7d1123fb21194c..24add2bef6c9240a30023e82766059bc8b31f81d 100644 (file)
 
 struct wm8350_rtc {
        struct platform_device *pdev;
+       struct rtc_device *rtc;
+       int alarm_enabled;      /* used over suspend/resume */
 };
 
 #endif
index bd9977b894907f294b06817a01a42b3c29dd25bc..371086fd946f3f13a7cbeecab10354caae5cb15f 100644 (file)
@@ -179,6 +179,7 @@ struct mlx4_caps {
        int                     num_ports;
        int                     vl_cap[MLX4_MAX_PORTS + 1];
        int                     ib_mtu_cap[MLX4_MAX_PORTS + 1];
+       __be32                  ib_port_def_cap[MLX4_MAX_PORTS + 1];
        u64                     def_mac[MLX4_MAX_PORTS + 1];
        int                     eth_mtu_cap[MLX4_MAX_PORTS + 1];
        int                     gid_table_len[MLX4_MAX_PORTS + 1];
index ffee2f74341856275ead62f71c6093c8de457199..d3ddd735e3755d288720742eddd2b7b7a7ff2368 100644 (file)
@@ -145,6 +145,23 @@ extern pgprot_t protection_map[16];
 #define FAULT_FLAG_WRITE       0x01    /* Fault was a write access */
 #define FAULT_FLAG_NONLINEAR   0x02    /* Fault was via a nonlinear mapping */
 
+/*
+ * This interface is used by x86 PAT code to identify a pfn mapping that is
+ * linear over entire vma. This is to optimize PAT code that deals with
+ * marking the physical region with a particular prot. This is not for generic
+ * mm use. Note also that this check will not work if the pfn mapping is
+ * linear for a vma starting at physical address 0. In which case PAT code
+ * falls back to slow path of reserving physical range page by page.
+ */
+static inline int is_linear_pfn_mapping(struct vm_area_struct *vma)
+{
+       return ((vma->vm_flags & VM_PFNMAP) && vma->vm_pgoff);
+}
+
+static inline int is_pfn_mapping(struct vm_area_struct *vma)
+{
+       return (vma->vm_flags & VM_PFNMAP);
+}
 
 /*
  * vm_fault is filled by the the pagefault handler and passed to the vma's
@@ -781,6 +798,8 @@ int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
                        struct vm_area_struct *vma);
 void unmap_mapping_range(struct address_space *mapping,
                loff_t const holebegin, loff_t const holelen, int even_cows);
+int follow_phys(struct vm_area_struct *vma, unsigned long address,
+               unsigned int flags, unsigned long *prot, resource_size_t *phys);
 int generic_access_phys(struct vm_area_struct *vma, unsigned long addr,
                        void *buf, int len, int write);
 
index 6dc14a240042eab5685fddfb0f357eaae9eecd9d..4515efae4c392bf1c33441159163a04ba80a3ff6 100644 (file)
@@ -40,7 +40,7 @@
 #define SYS_GETSOCKOPT 15              /* sys_getsockopt(2)            */
 #define SYS_SENDMSG    16              /* sys_sendmsg(2)               */
 #define SYS_RECVMSG    17              /* sys_recvmsg(2)               */
-#define SYS_PACCEPT    18              /* sys_paccept(2)               */
+#define SYS_ACCEPT4    18              /* sys_accept4(2)               */
 
 typedef enum {
        SS_FREE = 0,                    /* not allocated                */
@@ -100,7 +100,7 @@ enum sock_type {
  * remaining bits are used as flags. */
 #define SOCK_TYPE_MASK 0xf
 
-/* Flags for socket, socketpair, paccept */
+/* Flags for socket, socketpair, accept4 */
 #define SOCK_CLOEXEC   O_CLOEXEC
 #ifndef SOCK_NONBLOCK
 #define SOCK_NONBLOCK  O_NONBLOCK
@@ -223,8 +223,6 @@ extern int       sock_map_fd(struct socket *sock, int flags);
 extern struct socket *sockfd_lookup(int fd, int *err);
 #define                     sockfd_put(sock) fput(sock->file)
 extern int          net_ratelimit(void);
-extern long         do_accept(int fd, struct sockaddr __user *upeer_sockaddr,
-                              int __user *upeer_addrlen, int flags);
 
 #define net_random()           random32()
 #define net_srandom(seed)      srandom32((__force u32)seed)
index 9d77b1d7dca806e540838d27bbc632961a340f0e..e26f54952892e9c46be142344e36ceb37f19f6f0 100644 (file)
@@ -319,6 +319,7 @@ enum
 {
        NAPI_STATE_SCHED,       /* Poll is scheduled */
        NAPI_STATE_DISABLE,     /* Disable pending */
+       NAPI_STATE_NPSVC,       /* Netpoll - don't dequeue from poll_list */
 };
 
 extern void __napi_schedule(struct napi_struct *n);
@@ -1497,6 +1498,12 @@ static inline void netif_rx_complete(struct net_device *dev,
 {
        unsigned long flags;
 
+       /*
+        * don't let napi dequeue from the cpu poll list
+        * just in case its running on a different cpu
+        */
+       if (unlikely(test_bit(NAPI_STATE_NPSVC, &napi->state)))
+               return;
        local_irq_save(flags);
        __netif_rx_complete(dev, napi);
        local_irq_restore(flags);
index c19595c8930491d8e0f64a2795d36cb127ee3b60..29fe9ea1d3463a5964ee158eeb1a39211b1c756f 100644 (file)
@@ -141,6 +141,7 @@ enum ctattr_protonat {
 #define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1)
 
 enum ctattr_natseq {
+       CTA_NAT_SEQ_UNSPEC,
        CTA_NAT_SEQ_CORRECTION_POS,
        CTA_NAT_SEQ_OFFSET_BEFORE,
        CTA_NAT_SEQ_OFFSET_AFTER,
index be41b609c88fddbe6384ab5e73f3fe393fb56320..e52ce475d19f13796080ba21f24e4464054f0990 100644 (file)
@@ -251,7 +251,7 @@ struct xt_target_param {
  */
 struct xt_tgchk_param {
        const char *table;
-       void *entryinfo;
+       const void *entryinfo;
        const struct xt_target *target;
        void *targinfo;
        unsigned int hook_mask;
index f546ad6fc028d82989217eda2e8c8bb9bd5afa82..1e6d34bfa0945b5cdf5a7f8904e9fa182a80efa0 100644 (file)
@@ -17,7 +17,7 @@ struct page_cgroup {
        struct list_head lru;           /* per cgroup LRU list */
 };
 
-void __init pgdat_page_cgroup_init(struct pglist_data *pgdat);
+void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat);
 void __init page_cgroup_init(void);
 struct page_cgroup *lookup_page_cgroup(struct page *page);
 
@@ -91,7 +91,7 @@ static inline void unlock_page_cgroup(struct page_cgroup *pc)
 #else /* CONFIG_CGROUP_MEM_RES_CTLR */
 struct page_cgroup;
 
-static inline void pgdat_page_cgroup_init(struct pglist_data *pgdat)
+static inline void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
 {
 }
 
index feb4657bb04338ee7140a4774237aaf914fcebac..03b0b8c3c81b5858282004b60ba9a0893d39a6b5 100644 (file)
@@ -134,6 +134,11 @@ enum pci_dev_flags {
        PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2,
 };
 
+enum pci_irq_reroute_variant {
+       INTEL_IRQ_REROUTE_VARIANT = 1,
+       MAX_IRQ_REROUTE_VARIANTS = 3
+};
+
 typedef unsigned short __bitwise pci_bus_flags_t;
 enum pci_bus_flags {
        PCI_BUS_FLAGS_NO_MSI   = (__force pci_bus_flags_t) 1,
@@ -218,6 +223,7 @@ struct pci_dev {
        unsigned int    no_msi:1;       /* device may not use msi */
        unsigned int    block_ucfg_access:1;    /* userspace config space access is blocked */
        unsigned int    broken_parity_status:1; /* Device generates false positive parity */
+       unsigned int    irq_reroute_variant:2;  /* device needs IRQ rerouting variant */
        unsigned int    msi_enabled:1;
        unsigned int    msix_enabled:1;
        unsigned int    ari_enabled:1;  /* ARI forwarding */
index 1800f1d6e40dd1c22ff973e6f86f654ee27755f4..b6e6944542807e75d43d17b4d2e432c8f875b090 100644 (file)
 #define PCI_DEVICE_ID_INTEL_PXH_0      0x0329
 #define PCI_DEVICE_ID_INTEL_PXH_1      0x032A
 #define PCI_DEVICE_ID_INTEL_PXHV       0x032C
+#define PCI_DEVICE_ID_INTEL_80332_0    0x0330
+#define PCI_DEVICE_ID_INTEL_80332_1    0x0332
+#define PCI_DEVICE_ID_INTEL_80333_0    0x0370
+#define PCI_DEVICE_ID_INTEL_80333_1    0x0372
 #define PCI_DEVICE_ID_INTEL_82375      0x0482
 #define PCI_DEVICE_ID_INTEL_82424      0x0483
 #define PCI_DEVICE_ID_INTEL_82378      0x0484
 #define PCI_DEVICE_ID_INTEL_ESB_4      0x25a4
 #define PCI_DEVICE_ID_INTEL_ESB_5      0x25a6
 #define PCI_DEVICE_ID_INTEL_ESB_9      0x25ab
+#define PCI_DEVICE_ID_INTEL_ESB_10     0x25ac
 #define PCI_DEVICE_ID_INTEL_82820_HB   0x2500
 #define PCI_DEVICE_ID_INTEL_82820_UP_HB        0x2501
 #define PCI_DEVICE_ID_INTEL_82850_HB   0x2530
index 18a5b9ba9d40180b53273d75556bb529eafb8dd0..00044b856453f45bf886ddc3b237ac3744323ac3 100644 (file)
@@ -17,11 +17,4 @@ struct ratelimit_state {
                struct ratelimit_state name = {interval, burst,}
 
 extern int __ratelimit(struct ratelimit_state *rs);
-
-static inline int ratelimit(void)
-{
-       static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL,
-                                       DEFAULT_RATELIMIT_BURST);
-       return __ratelimit(&rs);
-}
 #endif
index 536b0ca46a038d4b9c34df6206616a432db42936..e097c2e6b6dcaa212f26bf6b08b66e4c9021cb21 100644 (file)
@@ -120,6 +120,9 @@ unsigned long ring_buffer_overruns(struct ring_buffer *buffer);
 u64 ring_buffer_time_stamp(int cpu);
 void ring_buffer_normalize_time_stamp(int cpu, u64 *ts);
 
+void tracing_on(void);
+void tracing_off(void);
+
 enum ring_buffer_flags {
        RB_FL_OVERWRITE         = 1 << 0,
 };
index 644ffbda17cad0ccfc977386ac81be74ef69cc6b..55e30d11447790dd433d0e874285ced3a5499328 100644 (file)
@@ -630,6 +630,10 @@ struct user_struct {
        atomic_t inotify_watches; /* How many inotify watches does this user have? */
        atomic_t inotify_devs;  /* How many inotify devs does this user have opened? */
 #endif
+#ifdef CONFIG_EPOLL
+       atomic_t epoll_devs;    /* The number of epoll descriptors currently open */
+       atomic_t epoll_watches; /* The number of file descriptors currently watched */
+#endif
 #ifdef CONFIG_POSIX_MQUEUE
        /* protected by mq_lock */
        unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */
index c13f1cec9abb154e24296216d91d225d245166b2..e3d4ecda267381d85da5697b2ad681c1da749fe3 100644 (file)
@@ -1818,17 +1818,21 @@ static inline int security_settime(struct timespec *ts, struct timezone *tz)
 
 static inline int security_vm_enough_memory(long pages)
 {
+       WARN_ON(current->mm == NULL);
        return cap_vm_enough_memory(current->mm, pages);
 }
 
-static inline int security_vm_enough_memory_kern(long pages)
+static inline int security_vm_enough_memory_mm(struct mm_struct *mm, long pages)
 {
-       return cap_vm_enough_memory(current->mm, pages);
+       WARN_ON(mm == NULL);
+       return cap_vm_enough_memory(mm, pages);
 }
 
-static inline int security_vm_enough_memory_mm(struct mm_struct *mm, long pages)
+static inline int security_vm_enough_memory_kern(long pages)
 {
-       return cap_vm_enough_memory(mm, pages);
+       /* If current->mm is a kernel thread then we will pass NULL,
+          for this specific case that is fine */
+       return cap_vm_enough_memory(current->mm, pages);
 }
 
 static inline int security_bprm_alloc(struct linux_binprm *bprm)
index e27f216361fc1511f6fc6b52d7570536af95a9e6..4e4f1277f3bf487517faf1d2dd4f275a6ddbad7f 100644 (file)
 
 #define PORT_SC26XX    82
 
+/* SH-SCI */
+#define PORT_SCIFA     83
+
 #ifdef __KERNEL__
 
 #include <linux/compiler.h>
index ba965c84ae0695b175da712a0951b6c3e0530b5c..000da12b5cf03650ad90db9be142d803930fb62e 100644 (file)
 #define SLAB_CACHE_DMA         0x00004000UL    /* Use GFP_DMA memory */
 #define SLAB_STORE_USER                0x00010000UL    /* DEBUG: Store the last owner for bug hunting */
 #define SLAB_PANIC             0x00040000UL    /* Panic if kmem_cache_create() fails */
+/*
+ * SLAB_DESTROY_BY_RCU - **WARNING** READ THIS!
+ *
+ * This delays freeing the SLAB page by a grace period, it does _NOT_
+ * delay object freeing. This means that if you do kmem_cache_free()
+ * that memory location is free to be reused at any time. Thus it may
+ * be possible to see another object there in the same RCU grace period.
+ *
+ * This feature only ensures the memory location backing the object
+ * stays valid, the trick to using this is relying on an independent
+ * object validation pass. Something like:
+ *
+ *  rcu_read_lock()
+ * again:
+ *  obj = lockless_lookup(key);
+ *  if (obj) {
+ *    if (!try_get_ref(obj)) // might fail for free objects
+ *      goto again;
+ *
+ *    if (obj->key != key) { // not the object we expected
+ *      put_ref(obj);
+ *      goto again;
+ *    }
+ *  }
+ *  rcu_read_unlock();
+ *
+ * See also the comment on struct slab_rcu in mm/slab.c.
+ */
 #define SLAB_DESTROY_BY_RCU    0x00080000UL    /* Defer freeing slabs to RCU */
 #define SLAB_MEM_SPREAD                0x00100000UL    /* Spread some memory over cpuset */
 #define SLAB_TRACE             0x00200000UL    /* Trace allocations and frees */
index 3f9a60043a975617a3b8217f8e69b24751c13e01..6e7ba16ff454f878d28315c02f66572b9734bd09 100644 (file)
@@ -146,6 +146,8 @@ static inline void smp_send_reschedule(int cpu) { }
 })
 #define smp_call_function_mask(mask, func, info, wait) \
                        (up_smp_call_function(func, info))
+#define smp_call_function_many(mask, func, info, wait) \
+                       (up_smp_call_function(func, info))
 static inline void init_call_single_data(void)
 {
 }
index d6ff145919ca3d3db7a01cf53c93ff628b0d29a6..04fb47bfb920d317c4b5217ebfbb1602e7606d90 100644 (file)
@@ -410,8 +410,7 @@ asmlinkage long sys_getsockopt(int fd, int level, int optname,
 asmlinkage long sys_bind(int, struct sockaddr __user *, int);
 asmlinkage long sys_connect(int, struct sockaddr __user *, int);
 asmlinkage long sys_accept(int, struct sockaddr __user *, int __user *);
-asmlinkage long sys_paccept(int, struct sockaddr __user *, int __user *,
-                           const __user sigset_t *, size_t, int);
+asmlinkage long sys_accept4(int, struct sockaddr __user *, int __user *, int);
 asmlinkage long sys_getsockname(int, struct sockaddr __user *, int __user *);
 asmlinkage long sys_getpeername(int, struct sockaddr __user *, int __user *);
 asmlinkage long sys_send(int, void __user *, size_t, unsigned);
index 8fa973bede5e1930d8b96317b9fbc99305a4d66b..f72aa51f7bcdc3fdb3d728c452cdd12f2d3d9baf 100644 (file)
@@ -108,6 +108,7 @@ enum usb_interface_condition {
  *     (in probe()), bound to a driver, or unbinding (in disconnect())
  * @is_active: flag set when the interface is bound and not suspended.
  * @sysfs_files_created: sysfs attributes exist
+ * @unregistering: flag set when the interface is being unregistered
  * @needs_remote_wakeup: flag set when the driver requires remote-wakeup
  *     capability during autosuspend.
  * @needs_altsetting0: flag set when a set-interface request for altsetting 0
@@ -163,6 +164,7 @@ struct usb_interface {
        enum usb_interface_condition condition;         /* state of binding */
        unsigned is_active:1;           /* the interface is not suspended */
        unsigned sysfs_files_created:1; /* the sysfs attributes exist */
+       unsigned unregistering:1;       /* unregistration is in progress */
        unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */
        unsigned needs_altsetting0:1;   /* switch to altsetting 0 is pending */
        unsigned needs_binding:1;       /* needs delayed unbind/rebind */
index 73a2f4eb1f7ae1a6f9c23131a56f5d1d6d631d58..9b42baed39009c75c8e3932a8c9be3cfbb0984f0 100644 (file)
@@ -158,8 +158,12 @@ struct usb_ctrlrequest {
  * (rarely) accepted by SET_DESCRIPTOR.
  *
  * Note that all multi-byte values here are encoded in little endian
- * byte order "on the wire".  But when exposed through Linux-USB APIs,
- * they've been converted to cpu byte order.
+ * byte order "on the wire".  Within the kernel and when exposed
+ * through the Linux-USB APIs, they are not converted to cpu byte
+ * order; it is the responsibility of the client code to do this.
+ * The single exception is when device and configuration descriptors (but
+ * not other descriptors) are read from usbfs (i.e. /proc/bus/usb/BBB/DDD);
+ * in this case the fields are converted to host endianness by the kernel.
  */
 
 /*
index c29ff1da8a18ac2dbf905f6bd83a27066e2283e4..1614d78c60ed2c4b616b530b89f8247addbcc17f 100644 (file)
@@ -9,6 +9,7 @@
 extern void unix_inflight(struct file *fp);
 extern void unix_notinflight(struct file *fp);
 extern void unix_gc(void);
+extern void wait_for_unix_gc(void);
 
 #define UNIX_HASH_SIZE 256
 
index 3025ae17ddbeb46207ca71e88b3d31d6aaad44a8..94c852d47d0f8d5c7d033279bf2f67ca3fd861dd 100644 (file)
@@ -135,9 +135,11 @@ struct dongle_reg {
 
 /* 
  * Per-packet information we need to hide inside sk_buff 
- * (must not exceed 48 bytes, check with struct sk_buff) 
+ * (must not exceed 48 bytes, check with struct sk_buff)
+ * The default_qdisc_pad field is a temporary hack.
  */
 struct irda_skb_cb {
+       unsigned int default_qdisc_pad;
        magic_t magic;       /* Be sure that we can trust the information */
        __u32   next_speed;  /* The Speed to be set *after* this frame */
        __u16   mtt;         /* Minimum turn around time */
index 8856e2d60e9fe5cc04e83445e2b9ea5a6f63f031..73d81bc6aa75e94eb5ce87cb26326e5093cafa1a 100644 (file)
  * not do so then mac80211 may add this under certain circumstances.
  */
 
-/**
- * enum ieee80211_notification_type - Low level driver notification
- * @IEEE80211_NOTIFY_RE_ASSOC: start the re-association sequence
- */
-enum ieee80211_notification_types {
-       IEEE80211_NOTIFY_RE_ASSOC,
-};
-
 /**
  * struct ieee80211_ht_bss_info - describing BSS's HT characteristics
  *
@@ -1797,18 +1789,6 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid);
 void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra,
                                     u16 tid);
 
-/**
- * ieee80211_notify_mac - low level driver notification
- * @hw: pointer as obtained from ieee80211_alloc_hw().
- * @notif_type: enum ieee80211_notification_types
- *
- * This function must be called by low level driver to inform mac80211 of
- * low level driver status change or force mac80211 to re-assoc for low
- * level driver internal error that require re-assoc.
- */
-void ieee80211_notify_mac(struct ieee80211_hw *hw,
-                         enum ieee80211_notification_types  notif_type);
-
 /**
  * ieee80211_find_sta - find a station
  *
index cac811e51f6dc0ef78ebc9ac124c1c42637b3f02..c7190846e128e21221106379e619589b3d7f0603 100644 (file)
@@ -31,6 +31,7 @@ struct request_sock_ops {
        int             family;
        int             obj_size;
        struct kmem_cache       *slab;
+       char            *slab_name;
        int             (*rtx_syn_ack)(struct sock *sk,
                                       struct request_sock *req);
        void            (*send_ack)(struct sock *sk, struct sk_buff *skb,
index c04f9e18ea22033d22cfd9bf5e4ba1a74a29addd..2f47107f6d0f8f018feaba3a75eeff4dd64d14ec 100644 (file)
@@ -815,7 +815,7 @@ static inline void sk_wmem_free_skb(struct sock *sk, struct sk_buff *skb)
  */
 #define sock_lock_init_class_and_name(sk, sname, skey, name, key)      \
 do {                                                                   \
-       sk->sk_lock.owned = 0;                                  \
+       sk->sk_lock.owned = 0;                                          \
        init_waitqueue_head(&sk->sk_lock.wq);                           \
        spin_lock_init(&(sk)->sk_lock.slock);                           \
        debug_check_no_locks_freed((void *)&(sk)->sk_lock,              \
index 1e1ee3253fd8fd9a46d24778f9534e7c042f98a4..97c3b14da55df2e655ac8ceade98da1e4d77682d 100644 (file)
@@ -16,6 +16,7 @@
 
 struct timewait_sock_ops {
        struct kmem_cache       *twsk_slab;
+       char            *twsk_slab_name;
        unsigned int    twsk_obj_size;
        int             (*twsk_unique)(struct sock *sk,
                                       struct sock *sktw, void *twp);
index 49d8913c4f860ad97dab941dd6538edbe08b6420..6e04e6fe79c70dfdcba023c8457405ed1e4a0e13 100644 (file)
@@ -357,7 +357,7 @@ struct fc_rport {   /* aka fc_starget_attrs */
 /* bit field values for struct fc_rport "flags" field: */
 #define FC_RPORT_DEVLOSS_PENDING       0x01
 #define FC_RPORT_SCAN_PENDING          0x02
-#define FC_RPORT_FAST_FAIL_TIMEDOUT    0x03
+#define FC_RPORT_FAST_FAIL_TIMEDOUT    0x04
 
 #define        dev_to_rport(d)                         \
        container_of(d, struct fc_rport, dev)
index 6ad87f48599284c809371c533f287b748268097f..0c864db1a4662a5e1c89f902830e5cf4a7f91efc 100644 (file)
@@ -38,7 +38,7 @@ struct atmel_lcdfb_info {
        spinlock_t              lock;
        struct fb_info          *info;
        void __iomem            *mmio;
-       unsigned long           irq_base;
+       int                     irq_base;
        struct work_struct      task;
 
        unsigned int            guard_time;
index d5dcaf154ba4092412cb45e59bebebe5c6d23c5f..1cd09cc5b169460609ca91f7d71edaba6a32f284 100644 (file)
 #define CRTC_DISPLAY_DIS                          (1 << 10)
 #define CRTC_CRT_ON                               (1 << 15)
 
-/* DSTCACHE_MODE bits constants */
-#define RB2D_DC_AUTOFLUSH_ENABLE                   (1 << 8)
-#define RB2D_DC_DC_DISABLE_IGNORE_PE               (1 << 17)
 
 /* DSTCACHE_CTLSTAT bit constants */
 #define RB2D_DC_FLUSH_2D                          (1 << 0)
 #define GMC_DST_16BPP_YVYU422                      0x00000c00
 #define GMC_DST_32BPP_AYUV444                      0x00000e00
 #define GMC_DST_16BPP_ARGB4444                     0x00000f00
+#define GMC_SRC_MONO                               0x00000000
+#define GMC_SRC_MONO_LBKGD                         0x00001000
+#define GMC_SRC_DSTCOLOR                           0x00003000
 #define GMC_BYTE_ORDER_MSB_TO_LSB                  0x00000000
 #define GMC_BYTE_ORDER_LSB_TO_MSB                  0x00004000
 #define GMC_DP_CONVERSION_TEMP_9300                0x00008000
 #define GMC_DP_CONVERSION_TEMP_6500                0x00000000
+#define GMC_DP_SRC_RECT                            0x02000000
+#define GMC_DP_SRC_HOST                            0x03000000
 #define GMC_DP_SRC_HOST_BYTEALIGN                  0x04000000
 #define GMC_3D_FCN_EN_CLR                          0x00000000
 #define GMC_3D_FCN_EN_SET                          0x08000000
 #define GMC_WRITE_MASK_LEAVE                       0x00000000
 #define GMC_WRITE_MASK_SET                         0x40000000
 #define GMC_CLR_CMP_CNTL_DIS                      (1 << 28)
-#define GMC_SRC_DATATYPE_MASK                     (3 << 12)
-#define GMC_SRC_DATATYPE_MONO_FG_BG               (0 << 12)
-#define GMC_SRC_DATATYPE_MONO_FG_LA               (1 << 12)
 #define GMC_SRC_DATATYPE_COLOR                    (3 << 12)
 #define ROP3_S                                    0x00cc0000
 #define ROP3_SRCCOPY                              0x00cc0000
 #define DP_SRC_SOURCE_MASK                        (7    << 24)
 #define GMC_BRUSH_NONE                            (15   <<  4)
 #define DP_SRC_SOURCE_MEMORY                      (2    << 24)
-#define DP_SRC_SOURCE_HOST_DATA                           (3    << 24)
 #define GMC_BRUSH_SOLIDCOLOR                      0x000000d0
 
 /* DP_MIX bit constants */
 #define DISP_PWR_MAN_TV_ENABLE_RST                 (1 << 25)
 #define DISP_PWR_MAN_AUTO_PWRUP_EN                 (1 << 26)
 
-/* RBBM_GUICNTL constants */
-#define RBBM_GUICNTL_HOST_DATA_SWAP_NONE          (0 << 0)
-#define RBBM_GUICNTL_HOST_DATA_SWAP_16BIT          (1 << 0)
-#define RBBM_GUICNTL_HOST_DATA_SWAP_32BIT         (2 << 0)
-#define RBBM_GUICNTL_HOST_DATA_SWAP_HDW                   (3 << 0)
-
 /* masks */
 
 #define CONFIG_MEMSIZE_MASK            0x1f000000
index 919b5bdcb2bdcfe31f2e8f970e14a9533af7eb04..2090881c3650f57e3808f12d4743e1dbb8f1c93a 100644 (file)
@@ -9,6 +9,8 @@
 #ifndef __XEN_PUBLIC_EVENT_CHANNEL_H__
 #define __XEN_PUBLIC_EVENT_CHANNEL_H__
 
+#include <xen/interface/xen.h>
+
 typedef uint32_t evtchn_port_t;
 DEFINE_GUEST_HANDLE(evtchn_port_t);
 
index 86b00c53fadeb833d054fab64d13fb9a0e8d6fde..f763762d544a135a0a06f67f36701b9f0d331140 100644 (file)
@@ -354,7 +354,7 @@ config RT_GROUP_SCHED
          setting below. If enabled, it will also make it impossible to
          schedule realtime tasks for non-root users until you allocate
          realtime bandwidth for them.
-         See Documentation/sched-rt-group.txt for more information.
+         See Documentation/scheduler/sched-rt-group.txt for more information.
 
 choice
        depends on GROUP_SCHED
@@ -771,8 +771,7 @@ config SLAB
        help
          The regular slab allocator that is established and known to work
          well in all environments. It organizes cache hot objects in
-         per cpu and per node queues. SLAB is the default choice for
-         a slab allocator.
+         per cpu and per node queues.
 
 config SLUB
        bool "SLUB (Unqueued Allocator)"
@@ -781,7 +780,8 @@ config SLUB
           instead of managing queues of cached objects (SLAB approach).
           Per cpu caching is realized using slabs of objects instead
           of queues of objects. SLUB can use memory efficiently
-          and has enhanced diagnostics.
+          and has enhanced diagnostics. SLUB is the default choice for
+          a slab allocator.
 
 config SLOB
        depends on EMBEDDED
index 49b3ea615dc5fa991d921667f44172da02331a55..361fd1c96fcf31b92475882803dc927f281a8718 100644 (file)
@@ -266,9 +266,17 @@ int ipc_addid(struct ipc_ids* ids, struct kern_ipc_perm* new, int size)
        if (ids->in_use >= size)
                return -ENOSPC;
 
+       spin_lock_init(&new->lock);
+       new->deleted = 0;
+       rcu_read_lock();
+       spin_lock(&new->lock);
+
        err = idr_get_new(&ids->ipcs_idr, new, &id);
-       if (err)
+       if (err) {
+               spin_unlock(&new->lock);
+               rcu_read_unlock();
                return err;
+       }
 
        ids->in_use++;
 
@@ -280,10 +288,6 @@ int ipc_addid(struct ipc_ids* ids, struct kern_ipc_perm* new, int size)
                ids->seq = 0;
 
        new->id = ipc_buildid(id, new->seq);
-       spin_lock_init(&new->lock);
-       new->deleted = 0;
-       rcu_read_lock();
-       spin_lock(&new->lock);
        return id;
 }
 
index 9a3ec66a9d841c961e51bfac872462d051098a18..19fad003b19d6ac0752597f5a23e18341d1d579a 100644 (file)
@@ -11,8 +11,6 @@ obj-y     = sched.o fork.o exec_domain.o panic.o printk.o \
            hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \
            notifier.o ksysfs.o pm_qos_params.o sched_clock.o
 
-CFLAGS_REMOVE_sched.o = -mno-spe
-
 ifdef CONFIG_FUNCTION_TRACER
 # Do not trace debug files and internal ftrace files
 CFLAGS_REMOVE_lockdep.o = -pg
@@ -21,7 +19,7 @@ CFLAGS_REMOVE_mutex-debug.o = -pg
 CFLAGS_REMOVE_rtmutex-debug.o = -pg
 CFLAGS_REMOVE_cgroup-debug.o = -pg
 CFLAGS_REMOVE_sched_clock.o = -pg
-CFLAGS_REMOVE_sched.o = -mno-spe -pg
+CFLAGS_REMOVE_sched.o = -pg
 endif
 
 obj-$(CONFIG_FREEZER) += freezer.o
index 4414e93d875018b89b6363e2821093c38600d776..ce6d8ea3131e78136b3b50803c424c0fffbeb20a 100644 (file)
 
 #include "audit.h"
 
-/* No auditing will take place until audit_initialized != 0.
+/* No auditing will take place until audit_initialized == AUDIT_INITIALIZED.
  * (Initialization happens after skb_init is called.) */
+#define AUDIT_DISABLED         -1
+#define AUDIT_UNINITIALIZED    0
+#define AUDIT_INITIALIZED      1
 static int     audit_initialized;
 
 #define AUDIT_OFF      0
@@ -965,6 +968,9 @@ static int __init audit_init(void)
 {
        int i;
 
+       if (audit_initialized == AUDIT_DISABLED)
+               return 0;
+
        printk(KERN_INFO "audit: initializing netlink socket (%s)\n",
               audit_default ? "enabled" : "disabled");
        audit_sock = netlink_kernel_create(&init_net, NETLINK_AUDIT, 0,
@@ -976,7 +982,7 @@ static int __init audit_init(void)
 
        skb_queue_head_init(&audit_skb_queue);
        skb_queue_head_init(&audit_skb_hold_queue);
-       audit_initialized = 1;
+       audit_initialized = AUDIT_INITIALIZED;
        audit_enabled = audit_default;
        audit_ever_enabled |= !!audit_default;
 
@@ -999,13 +1005,21 @@ __initcall(audit_init);
 static int __init audit_enable(char *str)
 {
        audit_default = !!simple_strtol(str, NULL, 0);
-       printk(KERN_INFO "audit: %s%s\n",
-              audit_default ? "enabled" : "disabled",
-              audit_initialized ? "" : " (after initialization)");
-       if (audit_initialized) {
+       if (!audit_default)
+               audit_initialized = AUDIT_DISABLED;
+
+       printk(KERN_INFO "audit: %s", audit_default ? "enabled" : "disabled");
+
+       if (audit_initialized == AUDIT_INITIALIZED) {
                audit_enabled = audit_default;
                audit_ever_enabled |= !!audit_default;
+       } else if (audit_initialized == AUDIT_UNINITIALIZED) {
+               printk(" (after initialization)");
+       } else {
+               printk(" (until reboot)");
        }
+       printk("\n");
+
        return 1;
 }
 
@@ -1107,9 +1121,7 @@ unsigned int audit_serial(void)
 static inline void audit_get_stamp(struct audit_context *ctx,
                                   struct timespec *t, unsigned int *serial)
 {
-       if (ctx)
-               auditsc_get_stamp(ctx, t, serial);
-       else {
+       if (!ctx || !auditsc_get_stamp(ctx, t, serial)) {
                *t = CURRENT_TIME;
                *serial = audit_serial();
        }
@@ -1146,7 +1158,7 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask,
        int reserve;
        unsigned long timeout_start = jiffies;
 
-       if (!audit_initialized)
+       if (audit_initialized != AUDIT_INITIALIZED)
                return NULL;
 
        if (unlikely(audit_filter_type(type)))
index 8ba0e0d934f23137762f74525f6757e27a129056..8b509441f49a2f740a2d709c66cecc73d9896f1c 100644 (file)
@@ -24,6 +24,7 @@ struct audit_chunk {
        struct list_head trees;         /* with root here */
        int dead;
        int count;
+       atomic_long_t refs;
        struct rcu_head head;
        struct node {
                struct list_head list;
@@ -56,7 +57,8 @@ static LIST_HEAD(prune_list);
  * tree is refcounted; one reference for "some rules on rules_list refer to
  * it", one for each chunk with pointer to it.
  *
- * chunk is refcounted by embedded inotify_watch.
+ * chunk is refcounted by embedded inotify_watch + .refs (non-zero refcount
+ * of watch contributes 1 to .refs).
  *
  * node.index allows to get from node.list to containing chunk.
  * MSB of that sucker is stolen to mark taggings that we might have to
@@ -121,6 +123,7 @@ static struct audit_chunk *alloc_chunk(int count)
        INIT_LIST_HEAD(&chunk->hash);
        INIT_LIST_HEAD(&chunk->trees);
        chunk->count = count;
+       atomic_long_set(&chunk->refs, 1);
        for (i = 0; i < count; i++) {
                INIT_LIST_HEAD(&chunk->owners[i].list);
                chunk->owners[i].index = i;
@@ -129,9 +132,8 @@ static struct audit_chunk *alloc_chunk(int count)
        return chunk;
 }
 
-static void __free_chunk(struct rcu_head *rcu)
+static void free_chunk(struct audit_chunk *chunk)
 {
-       struct audit_chunk *chunk = container_of(rcu, struct audit_chunk, head);
        int i;
 
        for (i = 0; i < chunk->count; i++) {
@@ -141,14 +143,16 @@ static void __free_chunk(struct rcu_head *rcu)
        kfree(chunk);
 }
 
-static inline void free_chunk(struct audit_chunk *chunk)
+void audit_put_chunk(struct audit_chunk *chunk)
 {
-       call_rcu(&chunk->head, __free_chunk);
+       if (atomic_long_dec_and_test(&chunk->refs))
+               free_chunk(chunk);
 }
 
-void audit_put_chunk(struct audit_chunk *chunk)
+static void __put_chunk(struct rcu_head *rcu)
 {
-       put_inotify_watch(&chunk->watch);
+       struct audit_chunk *chunk = container_of(rcu, struct audit_chunk, head);
+       audit_put_chunk(chunk);
 }
 
 enum {HASH_SIZE = 128};
@@ -176,7 +180,7 @@ struct audit_chunk *audit_tree_lookup(const struct inode *inode)
 
        list_for_each_entry_rcu(p, list, hash) {
                if (p->watch.inode == inode) {
-                       get_inotify_watch(&p->watch);
+                       atomic_long_inc(&p->refs);
                        return p;
                }
        }
@@ -194,17 +198,49 @@ int audit_tree_match(struct audit_chunk *chunk, struct audit_tree *tree)
 
 /* tagging and untagging inodes with trees */
 
-static void untag_chunk(struct audit_chunk *chunk, struct node *p)
+static struct audit_chunk *find_chunk(struct node *p)
+{
+       int index = p->index & ~(1U<<31);
+       p -= index;
+       return container_of(p, struct audit_chunk, owners[0]);
+}
+
+static void untag_chunk(struct node *p)
 {
+       struct audit_chunk *chunk = find_chunk(p);
        struct audit_chunk *new;
        struct audit_tree *owner;
        int size = chunk->count - 1;
        int i, j;
 
+       if (!pin_inotify_watch(&chunk->watch)) {
+               /*
+                * Filesystem is shutting down; all watches are getting
+                * evicted, just take it off the node list for this
+                * tree and let the eviction logics take care of the
+                * rest.
+                */
+               owner = p->owner;
+               if (owner->root == chunk) {
+                       list_del_init(&owner->same_root);
+                       owner->root = NULL;
+               }
+               list_del_init(&p->list);
+               p->owner = NULL;
+               put_tree(owner);
+               return;
+       }
+
+       spin_unlock(&hash_lock);
+
+       /*
+        * pin_inotify_watch() succeeded, so the watch won't go away
+        * from under us.
+        */
        mutex_lock(&chunk->watch.inode->inotify_mutex);
        if (chunk->dead) {
                mutex_unlock(&chunk->watch.inode->inotify_mutex);
-               return;
+               goto out;
        }
 
        owner = p->owner;
@@ -221,7 +257,7 @@ static void untag_chunk(struct audit_chunk *chunk, struct node *p)
                inotify_evict_watch(&chunk->watch);
                mutex_unlock(&chunk->watch.inode->inotify_mutex);
                put_inotify_watch(&chunk->watch);
-               return;
+               goto out;
        }
 
        new = alloc_chunk(size);
@@ -263,7 +299,7 @@ static void untag_chunk(struct audit_chunk *chunk, struct node *p)
        inotify_evict_watch(&chunk->watch);
        mutex_unlock(&chunk->watch.inode->inotify_mutex);
        put_inotify_watch(&chunk->watch);
-       return;
+       goto out;
 
 Fallback:
        // do the best we can
@@ -277,6 +313,9 @@ Fallback:
        put_tree(owner);
        spin_unlock(&hash_lock);
        mutex_unlock(&chunk->watch.inode->inotify_mutex);
+out:
+       unpin_inotify_watch(&chunk->watch);
+       spin_lock(&hash_lock);
 }
 
 static int create_chunk(struct inode *inode, struct audit_tree *tree)
@@ -387,13 +426,6 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree)
        return 0;
 }
 
-static struct audit_chunk *find_chunk(struct node *p)
-{
-       int index = p->index & ~(1U<<31);
-       p -= index;
-       return container_of(p, struct audit_chunk, owners[0]);
-}
-
 static void kill_rules(struct audit_tree *tree)
 {
        struct audit_krule *rule, *next;
@@ -431,17 +463,10 @@ static void prune_one(struct audit_tree *victim)
        spin_lock(&hash_lock);
        while (!list_empty(&victim->chunks)) {
                struct node *p;
-               struct audit_chunk *chunk;
 
                p = list_entry(victim->chunks.next, struct node, list);
-               chunk = find_chunk(p);
-               get_inotify_watch(&chunk->watch);
-               spin_unlock(&hash_lock);
-
-               untag_chunk(chunk, p);
 
-               put_inotify_watch(&chunk->watch);
-               spin_lock(&hash_lock);
+               untag_chunk(p);
        }
        spin_unlock(&hash_lock);
        put_tree(victim);
@@ -469,7 +494,6 @@ static void trim_marked(struct audit_tree *tree)
 
        while (!list_empty(&tree->chunks)) {
                struct node *node;
-               struct audit_chunk *chunk;
 
                node = list_entry(tree->chunks.next, struct node, list);
 
@@ -477,14 +501,7 @@ static void trim_marked(struct audit_tree *tree)
                if (!(node->index & (1U<<31)))
                        break;
 
-               chunk = find_chunk(node);
-               get_inotify_watch(&chunk->watch);
-               spin_unlock(&hash_lock);
-
-               untag_chunk(chunk, node);
-
-               put_inotify_watch(&chunk->watch);
-               spin_lock(&hash_lock);
+               untag_chunk(node);
        }
        if (!tree->root && !tree->goner) {
                tree->goner = 1;
@@ -878,7 +895,7 @@ static void handle_event(struct inotify_watch *watch, u32 wd, u32 mask,
 static void destroy_watch(struct inotify_watch *watch)
 {
        struct audit_chunk *chunk = container_of(watch, struct audit_chunk, watch);
-       free_chunk(chunk);
+       call_rcu(&chunk->head, __put_chunk);
 }
 
 static const struct inotify_operations rtree_inotify_ops = {
index b7d354e2b0ef35d618f7a69fee70d301078faa02..9fd85a4640a096eab72312d33a090e417e013548 100644 (file)
@@ -1094,8 +1094,8 @@ static void audit_inotify_unregister(struct list_head *in_list)
        list_for_each_entry_safe(p, n, in_list, ilist) {
                list_del(&p->ilist);
                inotify_rm_watch(audit_ih, &p->wdata);
-               /* the put matching the get in audit_do_del_rule() */
-               put_inotify_watch(&p->wdata);
+               /* the unpin matching the pin in audit_do_del_rule() */
+               unpin_inotify_watch(&p->wdata);
        }
 }
 
@@ -1389,9 +1389,13 @@ static inline int audit_del_rule(struct audit_entry *entry,
                                /* Put parent on the inotify un-registration
                                 * list.  Grab a reference before releasing
                                 * audit_filter_mutex, to be released in
-                                * audit_inotify_unregister(). */
-                               list_add(&parent->ilist, &inotify_list);
-                               get_inotify_watch(&parent->wdata);
+                                * audit_inotify_unregister().
+                                * If filesystem is going away, just leave
+                                * the sucker alone, eviction will take
+                                * care of it.
+                                */
+                               if (pin_inotify_watch(&parent->wdata))
+                                       list_add(&parent->ilist, &inotify_list);
                        }
                }
        }
index cf5bc2f5f9c3e527ac2ea72ec019d156be72ecb6..2a3f0afc4d2ac191835c39988506dfd84d1e4737 100644 (file)
@@ -1459,7 +1459,6 @@ void audit_free(struct task_struct *tsk)
 
 /**
  * audit_syscall_entry - fill in an audit record at syscall entry
- * @tsk: task being audited
  * @arch: architecture type
  * @major: major syscall type (function)
  * @a1: additional syscall register 1
@@ -1548,9 +1547,25 @@ void audit_syscall_entry(int arch, int major,
        context->ppid       = 0;
 }
 
+void audit_finish_fork(struct task_struct *child)
+{
+       struct audit_context *ctx = current->audit_context;
+       struct audit_context *p = child->audit_context;
+       if (!p || !ctx || !ctx->auditable)
+               return;
+       p->arch = ctx->arch;
+       p->major = ctx->major;
+       memcpy(p->argv, ctx->argv, sizeof(ctx->argv));
+       p->ctime = ctx->ctime;
+       p->dummy = ctx->dummy;
+       p->auditable = ctx->auditable;
+       p->in_syscall = ctx->in_syscall;
+       p->filterkey = kstrdup(ctx->filterkey, GFP_KERNEL);
+       p->ppid = current->pid;
+}
+
 /**
  * audit_syscall_exit - deallocate audit context after a system call
- * @tsk: task being audited
  * @valid: success/failure flag
  * @return_code: syscall return value
  *
@@ -1942,15 +1957,18 @@ EXPORT_SYMBOL_GPL(__audit_inode_child);
  *
  * Also sets the context as auditable.
  */
-void auditsc_get_stamp(struct audit_context *ctx,
+int auditsc_get_stamp(struct audit_context *ctx,
                       struct timespec *t, unsigned int *serial)
 {
+       if (!ctx->in_syscall)
+               return 0;
        if (!ctx->serial)
                ctx->serial = audit_serial();
        t->tv_sec  = ctx->ctime.tv_sec;
        t->tv_nsec = ctx->ctime.tv_nsec;
        *serial    = ctx->serial;
        ctx->auditable = 1;
+       return 1;
 }
 
 /* global counter which is incremented every time something logs in */
index 358e77564e6f8b0b4c3964a36da48cc3051d6e73..8185a0f09594fd904ca2ab032dca27013708ff1c 100644 (file)
@@ -702,7 +702,7 @@ static int rebind_subsystems(struct cgroupfs_root *root,
         * any child cgroups exist. This is theoretically supportable
         * but involves complex error handling, so it's being left until
         * later */
-       if (!list_empty(&cgrp->children))
+       if (root->number_of_cgroups > 1)
                return -EBUSY;
 
        /* Process each subsystem */
@@ -2039,10 +2039,13 @@ int cgroupstats_build(struct cgroupstats *stats, struct dentry *dentry)
        struct cgroup *cgrp;
        struct cgroup_iter it;
        struct task_struct *tsk;
+
        /*
-        * Validate dentry by checking the superblock operations
+        * Validate dentry by checking the superblock operations,
+        * and make sure it's a directory.
         */
-       if (dentry->d_sb->s_op != &cgroup_ops)
+       if (dentry->d_sb->s_op != &cgroup_ops ||
+           !S_ISDIR(dentry->d_inode->i_mode))
                 goto err;
 
        ret = 0;
@@ -2472,10 +2475,7 @@ static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry)
                mutex_unlock(&cgroup_mutex);
                return -EBUSY;
        }
-
-       parent = cgrp->parent;
-       root = cgrp->root;
-       sb = root->sb;
+       mutex_unlock(&cgroup_mutex);
 
        /*
         * Call pre_destroy handlers of subsys. Notify subsystems
@@ -2483,7 +2483,14 @@ static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry)
         */
        cgroup_call_pre_destroy(cgrp);
 
-       if (cgroup_has_css_refs(cgrp)) {
+       mutex_lock(&cgroup_mutex);
+       parent = cgrp->parent;
+       root = cgrp->root;
+       sb = root->sb;
+
+       if (atomic_read(&cgrp->count)
+           || !list_empty(&cgrp->children)
+           || cgroup_has_css_refs(cgrp)) {
                mutex_unlock(&cgroup_mutex);
                return -EBUSY;
        }
index 7fa476f01d05568ac42541391f935b23b4145c80..fb249e2bcada880a19105488c7fdde33e9483126 100644 (file)
@@ -184,9 +184,20 @@ static void freezer_fork(struct cgroup_subsys *ss, struct task_struct *task)
 {
        struct freezer *freezer;
 
-       task_lock(task);
+       /*
+        * No lock is needed, since the task isn't on tasklist yet,
+        * so it can't be moved to another cgroup, which means the
+        * freezer won't be removed and will be valid during this
+        * function call.
+        */
        freezer = task_freezer(task);
-       task_unlock(task);
+
+       /*
+        * The root cgroup is non-freezable, so we can skip the
+        * following check.
+        */
+       if (!freezer->css.cgroup->parent)
+               return;
 
        spin_lock_irq(&freezer->lock);
        BUG_ON(freezer->state == CGROUP_FROZEN);
@@ -331,7 +342,7 @@ static int freezer_write(struct cgroup *cgroup,
        else if (strcmp(buffer, freezer_state_strs[CGROUP_FROZEN]) == 0)
                goal_state = CGROUP_FROZEN;
        else
-               return -EIO;
+               return -EINVAL;
 
        if (!cgroup_lock_live_group(cgroup))
                return -ENODEV;
@@ -350,6 +361,8 @@ static struct cftype files[] = {
 
 static int freezer_populate(struct cgroup_subsys *ss, struct cgroup *cgroup)
 {
+       if (!cgroup->parent)
+               return 0;
        return cgroup_add_files(cgroup, ss, files, ARRAY_SIZE(files));
 }
 
index 5a732c5ef08b709dd2b7f6162432dfce3076fd11..8ea32e8d68b05c95b211830deee92d9a7929637b 100644 (file)
@@ -462,7 +462,7 @@ out:
  * It must be called by the arch code on the new cpu, before the new cpu
  * enables interrupts and before the "boot" cpu returns from __cpu_up().
  */
-void notify_cpu_starting(unsigned int cpu)
+void __cpuinit notify_cpu_starting(unsigned int cpu)
 {
        unsigned long val = CPU_STARTING;
 
index 3e00526f52ec14d56eb89ee1ab5c1a40fbed1331..96c0ba13b8cd06add25de5043547b62cef6ef7b5 100644 (file)
@@ -36,6 +36,7 @@
 #include <linux/list.h>
 #include <linux/mempolicy.h>
 #include <linux/mm.h>
+#include <linux/memory.h>
 #include <linux/module.h>
 #include <linux/mount.h>
 #include <linux/namei.h>
@@ -584,10 +585,9 @@ static int generate_sched_domains(cpumask_t **domains,
        int i, j, k;            /* indices for partition finding loops */
        cpumask_t *doms;        /* resulting partition; i.e. sched domains */
        struct sched_domain_attr *dattr;  /* attributes for custom domains */
-       int ndoms;              /* number of sched domains in result */
+       int ndoms = 0;          /* number of sched domains in result */
        int nslot;              /* next empty doms[] cpumask_t slot */
 
-       ndoms = 0;
        doms = NULL;
        dattr = NULL;
        csa = NULL;
@@ -674,10 +674,8 @@ restart:
         * Convert <csn, csa> to <ndoms, doms> and populate cpu masks.
         */
        doms = kmalloc(ndoms * sizeof(cpumask_t), GFP_KERNEL);
-       if (!doms) {
-               ndoms = 0;
+       if (!doms)
                goto done;
-       }
 
        /*
         * The rest of the code, including the scheduler, can deal with
@@ -732,6 +730,13 @@ restart:
 done:
        kfree(csa);
 
+       /*
+        * Fallback to the default domain if kmalloc() failed.
+        * See comments in partition_sched_domains().
+        */
+       if (doms == NULL)
+               ndoms = 1;
+
        *domains    = doms;
        *attributes = dattr;
        return ndoms;
@@ -2011,12 +2016,23 @@ static int cpuset_track_online_cpus(struct notifier_block *unused_nb,
  * Call this routine anytime after node_states[N_HIGH_MEMORY] changes.
  * See also the previous routine cpuset_track_online_cpus().
  */
-void cpuset_track_online_nodes(void)
+static int cpuset_track_online_nodes(struct notifier_block *self,
+                               unsigned long action, void *arg)
 {
        cgroup_lock();
-       top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY];
-       scan_for_empty_cpusets(&top_cpuset);
+       switch (action) {
+       case MEM_ONLINE:
+               top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY];
+               break;
+       case MEM_OFFLINE:
+               top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY];
+               scan_for_empty_cpusets(&top_cpuset);
+               break;
+       default:
+               break;
+       }
        cgroup_unlock();
+       return NOTIFY_OK;
 }
 #endif
 
@@ -2032,6 +2048,7 @@ void __init cpuset_init_smp(void)
        top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY];
 
        hotcpu_notifier(cpuset_track_online_cpus, 0);
+       hotplug_memory_notifier(cpuset_track_online_nodes, 10);
 }
 
 /**
index ae2b92be5faec1efa73beefb63304a22d030fc16..2d8be7ebb0f73499f894a1828fd827f0217290f1 100644 (file)
@@ -40,7 +40,6 @@
 #include <linux/cn_proc.h>
 #include <linux/mutex.h>
 #include <linux/futex.h>
-#include <linux/compat.h>
 #include <linux/pipe_fs_i.h>
 #include <linux/audit.h> /* for audit_free() */
 #include <linux/resource.h>
@@ -1059,14 +1058,6 @@ NORET_TYPE void do_exit(long code)
                exit_itimers(tsk->signal);
        }
        acct_collect(code, group_dead);
-#ifdef CONFIG_FUTEX
-       if (unlikely(tsk->robust_list))
-               exit_robust_list(tsk);
-#ifdef CONFIG_COMPAT
-       if (unlikely(tsk->compat_robust_list))
-               compat_exit_robust_list(tsk);
-#endif
-#endif
        if (group_dead)
                tty_audit_exit();
        if (unlikely(tsk->audit_context))
index f6083561dfe0a9f8d2a13138f7332bc358a51653..495da2e9a8b4d92a1b464b98196228f818c892e7 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/jiffies.h>
 #include <linux/tracehook.h>
 #include <linux/futex.h>
+#include <linux/compat.h>
 #include <linux/task_io_accounting_ops.h>
 #include <linux/rcupdate.h>
 #include <linux/ptrace.h>
@@ -314,17 +315,20 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
                file = tmp->vm_file;
                if (file) {
                        struct inode *inode = file->f_path.dentry->d_inode;
+                       struct address_space *mapping = file->f_mapping;
+
                        get_file(file);
                        if (tmp->vm_flags & VM_DENYWRITE)
                                atomic_dec(&inode->i_writecount);
-
-                       /* insert tmp into the share list, just after mpnt */
-                       spin_lock(&file->f_mapping->i_mmap_lock);
+                       spin_lock(&mapping->i_mmap_lock);
+                       if (tmp->vm_flags & VM_SHARED)
+                               mapping->i_mmap_writable++;
                        tmp->vm_truncate_count = mpnt->vm_truncate_count;
-                       flush_dcache_mmap_lock(file->f_mapping);
+                       flush_dcache_mmap_lock(mapping);
+                       /* insert tmp into the share list, just after mpnt */
                        vma_prio_tree_add(tmp, mpnt);
-                       flush_dcache_mmap_unlock(file->f_mapping);
-                       spin_unlock(&file->f_mapping->i_mmap_lock);
+                       flush_dcache_mmap_unlock(mapping);
+                       spin_unlock(&mapping->i_mmap_lock);
                }
 
                /*
@@ -519,6 +523,16 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm)
 {
        struct completion *vfork_done = tsk->vfork_done;
 
+       /* Get rid of any futexes when releasing the mm */
+#ifdef CONFIG_FUTEX
+       if (unlikely(tsk->robust_list))
+               exit_robust_list(tsk);
+#ifdef CONFIG_COMPAT
+       if (unlikely(tsk->compat_robust_list))
+               compat_exit_robust_list(tsk);
+#endif
+#endif
+
        /* Get rid of any cached register state */
        deactivate_mm(tsk, mm);
 
@@ -1387,6 +1401,7 @@ long do_fork(unsigned long clone_flags,
                        init_completion(&vfork);
                }
 
+               audit_finish_fork(p);
                tracehook_report_clone(trace, regs, clone_flags, nr, p);
 
                /*
index 95d3949f2ae51135b181906f632b8de7f5e3f8e7..47e63349d1b2d262be2d8be568af8d3d93de3333 100644 (file)
@@ -664,14 +664,6 @@ static inline int hrtimer_enqueue_reprogram(struct hrtimer *timer,
 
                /* Timer is expired, act upon the callback mode */
                switch(timer->cb_mode) {
-               case HRTIMER_CB_IRQSAFE_NO_RESTART:
-                       debug_hrtimer_deactivate(timer);
-                       /*
-                        * We can call the callback from here. No restart
-                        * happens, so no danger of recursion
-                        */
-                       BUG_ON(timer->function(timer) != HRTIMER_NORESTART);
-                       return 1;
                case HRTIMER_CB_IRQSAFE_PERCPU:
                case HRTIMER_CB_IRQSAFE_UNLOCKED:
                        /*
@@ -683,7 +675,6 @@ static inline int hrtimer_enqueue_reprogram(struct hrtimer *timer,
                         */
                        debug_hrtimer_deactivate(timer);
                        return 1;
-               case HRTIMER_CB_IRQSAFE:
                case HRTIMER_CB_SOFTIRQ:
                        /*
                         * Move everything else into the softirq pending list !
index c9767e641980e1b2ae91454fe723088ad9cc5f83..64c1c7253dae091b931652aa235ba3c44b6060c5 100644 (file)
@@ -25,6 +25,8 @@ static inline void unregister_handler_proc(unsigned int irq,
                                           struct irqaction *action) { }
 #endif
 
+extern int irq_select_affinity_usr(unsigned int irq);
+
 /*
  * Debugging printout:
  */
index c498a1b8c621e02894974b7f0e0cda8e96d81011..801addda3c43d4a7a767b27468fee05232cb6f89 100644 (file)
@@ -82,24 +82,27 @@ int irq_can_set_affinity(unsigned int irq)
 int irq_set_affinity(unsigned int irq, cpumask_t cpumask)
 {
        struct irq_desc *desc = irq_to_desc(irq);
+       unsigned long flags;
 
        if (!desc->chip->set_affinity)
                return -EINVAL;
 
+       spin_lock_irqsave(&desc->lock, flags);
+
 #ifdef CONFIG_GENERIC_PENDING_IRQ
        if (desc->status & IRQ_MOVE_PCNTXT || desc->status & IRQ_DISABLED) {
-               unsigned long flags;
-
-               spin_lock_irqsave(&desc->lock, flags);
                desc->affinity = cpumask;
                desc->chip->set_affinity(irq, cpumask);
-               spin_unlock_irqrestore(&desc->lock, flags);
-       } else
-               set_pending_irq(irq, cpumask);
+       } else {
+               desc->status |= IRQ_MOVE_PENDING;
+               desc->pending_mask = cpumask;
+       }
 #else
        desc->affinity = cpumask;
        desc->chip->set_affinity(irq, cpumask);
 #endif
+       desc->status |= IRQ_AFFINITY_SET;
+       spin_unlock_irqrestore(&desc->lock, flags);
        return 0;
 }
 
@@ -107,24 +110,59 @@ int irq_set_affinity(unsigned int irq, cpumask_t cpumask)
 /*
  * Generic version of the affinity autoselector.
  */
-int irq_select_affinity(unsigned int irq)
+int do_irq_select_affinity(unsigned int irq, struct irq_desc *desc)
 {
        cpumask_t mask;
-       struct irq_desc *desc;
 
        if (!irq_can_set_affinity(irq))
                return 0;
 
        cpus_and(mask, cpu_online_map, irq_default_affinity);
 
-       desc = irq_to_desc(irq);
+       /*
+        * Preserve an userspace affinity setup, but make sure that
+        * one of the targets is online.
+        */
+       if (desc->status & (IRQ_AFFINITY_SET | IRQ_NO_BALANCING)) {
+               if (cpus_intersects(desc->affinity, cpu_online_map))
+                       mask = desc->affinity;
+               else
+                       desc->status &= ~IRQ_AFFINITY_SET;
+       }
+
        desc->affinity = mask;
        desc->chip->set_affinity(irq, mask);
 
        return 0;
 }
+#else
+static inline int do_irq_select_affinity(unsigned int irq, struct irq_desc *d)
+{
+       return irq_select_affinity(irq);
+}
 #endif
 
+/*
+ * Called when affinity is set via /proc/irq
+ */
+int irq_select_affinity_usr(unsigned int irq)
+{
+       struct irq_desc *desc = irq_to_desc(irq);
+       unsigned long flags;
+       int ret;
+
+       spin_lock_irqsave(&desc->lock, flags);
+       ret = do_irq_select_affinity(irq, desc);
+       spin_unlock_irqrestore(&desc->lock, flags);
+
+       return ret;
+}
+
+#else
+static inline int do_irq_select_affinity(int irq, struct irq_desc *desc)
+{
+       return 0;
+}
 #endif
 
 /**
@@ -327,7 +365,7 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned int irq,
                 * IRQF_TRIGGER_* but the PIC does not support multiple
                 * flow-types?
                 */
-               pr_warning("No set_type function for IRQ %d (%s)\n", irq,
+               pr_debug("No set_type function for IRQ %d (%s)\n", irq,
                                chip ? (chip->name ? : "unknown") : "unknown");
                return 0;
        }
@@ -445,8 +483,12 @@ __setup_irq(unsigned int irq, struct irq_desc * desc, struct irqaction *new)
                        /* Undo nested disables: */
                        desc->depth = 1;
 
+               /* Exclude IRQ from balancing if requested */
+               if (new->flags & IRQF_NOBALANCING)
+                       desc->status |= IRQ_NO_BALANCING;
+
                /* Set default affinity mask once everything is setup */
-               irq_select_affinity(irq);
+               do_irq_select_affinity(irq, desc);
 
        } else if ((new->flags & IRQF_TRIGGER_MASK)
                        && (new->flags & IRQF_TRIGGER_MASK)
@@ -459,10 +501,6 @@ __setup_irq(unsigned int irq, struct irq_desc * desc, struct irqaction *new)
 
        *p = new;
 
-       /* Exclude IRQ from balancing */
-       if (new->flags & IRQF_NOBALANCING)
-               desc->status |= IRQ_NO_BALANCING;
-
        /* Reset broken irq detection when installing new handler */
        desc->irq_count = 0;
        desc->irqs_unhandled = 0;
index 90b920d3f52b3ca29f69cc204ab2481f4d95d4f6..9db681d95814baa2662fdccba0755b09579577cf 100644 (file)
@@ -1,17 +1,6 @@
 
 #include <linux/irq.h>
 
-void set_pending_irq(unsigned int irq, cpumask_t mask)
-{
-       struct irq_desc *desc = irq_to_desc(irq);
-       unsigned long flags;
-
-       spin_lock_irqsave(&desc->lock, flags);
-       desc->status |= IRQ_MOVE_PENDING;
-       desc->pending_mask = mask;
-       spin_unlock_irqrestore(&desc->lock, flags);
-}
-
 void move_masked_irq(int irq)
 {
        struct irq_desc *desc = irq_to_desc(irq);
index 4d161c70ba558507dc9be80537a50215052bd52f..d257e7d6a8a4ba4b10504dcd8490c812fe37504c 100644 (file)
@@ -62,7 +62,7 @@ static ssize_t irq_affinity_proc_write(struct file *file,
        if (!cpus_intersects(new_value, cpu_online_map))
                /* Special case for empty set - allow the architecture
                   code to set default SMP affinity. */
-               return irq_select_affinity(irq) ? -EINVAL : count;
+               return irq_select_affinity_usr(irq) ? -EINVAL : count;
 
        irq_set_affinity(irq, new_value);
 
index 5072cf1685a27ca9fc78986e3438ab53baa882a4..7b8b0f21a5b119356d4609e97b96b1e920be8a1a 100644 (file)
@@ -304,17 +304,24 @@ int sprint_symbol(char *buffer, unsigned long address)
        char *modname;
        const char *name;
        unsigned long offset, size;
-       char namebuf[KSYM_NAME_LEN];
+       int len;
 
-       name = kallsyms_lookup(address, &size, &offset, &modname, namebuf);
+       name = kallsyms_lookup(address, &size, &offset, &modname, buffer);
        if (!name)
                return sprintf(buffer, "0x%lx", address);
 
+       if (name != buffer)
+               strcpy(buffer, name);
+       len = strlen(buffer);
+       buffer += len;
+
        if (modname)
-               return sprintf(buffer, "%s+%#lx/%#lx [%s]", name, offset,
-                               size, modname);
+               len += sprintf(buffer, "+%#lx/%#lx [%s]",
+                                               offset, size, modname);
        else
-               return sprintf(buffer, "%s+%#lx/%#lx", name, offset, size);
+               len += sprintf(buffer, "+%#lx/%#lx", offset, size);
+
+       return len;
 }
 
 /* Look up a kernel symbol and print it to the kernel messages. */
index 8b57a2597f21fda9c9602e27028753f1f7325234..9f8a3f25259a9da4c8535bab07014b07da79a643 100644 (file)
@@ -72,7 +72,7 @@ static bool kprobe_enabled;
 DEFINE_MUTEX(kprobe_mutex);            /* Protects kprobe_table */
 static DEFINE_PER_CPU(struct kprobe *, kprobe_instance) = NULL;
 static struct {
-       spinlock_t lock ____cacheline_aligned;
+       spinlock_t lock ____cacheline_aligned_in_smp;
 } kretprobe_table_locks[KPROBE_TABLE_SIZE];
 
 static spinlock_t *kretprobe_table_lock_ptr(unsigned long hash)
@@ -613,30 +613,37 @@ static int __kprobes __register_kprobe(struct kprobe *p,
                return -EINVAL;
        p->addr = addr;
 
-       if (!kernel_text_address((unsigned long) p->addr) ||
-           in_kprobes_functions((unsigned long) p->addr))
+       preempt_disable();
+       if (!__kernel_text_address((unsigned long) p->addr) ||
+           in_kprobes_functions((unsigned long) p->addr)) {
+               preempt_enable();
                return -EINVAL;
+       }
 
        p->mod_refcounted = 0;
 
        /*
         * Check if are we probing a module.
         */
-       probed_mod = module_text_address((unsigned long) p->addr);
+       probed_mod = __module_text_address((unsigned long) p->addr);
        if (probed_mod) {
-               struct module *calling_mod = module_text_address(called_from);
+               struct module *calling_mod;
+               calling_mod = __module_text_address(called_from);
                /*
                 * We must allow modules to probe themself and in this case
                 * avoid incrementing the module refcount, so as to allow
                 * unloading of self probing modules.
                 */
                if (calling_mod && calling_mod != probed_mod) {
-                       if (unlikely(!try_module_get(probed_mod)))
+                       if (unlikely(!try_module_get(probed_mod))) {
+                               preempt_enable();
                                return -EINVAL;
+                       }
                        p->mod_refcounted = 1;
                } else
                        probed_mod = NULL;
        }
+       preempt_enable();
 
        p->nmissed = 0;
        INIT_LIST_HEAD(&p->list);
@@ -718,6 +725,10 @@ static void __kprobes __unregister_kprobe_bottom(struct kprobe *p)
        struct kprobe *old_p;
 
        if (p->mod_refcounted) {
+               /*
+                * Since we've already incremented refcount,
+                * we don't need to disable preemption.
+                */
                mod = module_text_address((unsigned long)p->addr);
                if (mod)
                        module_put(mod);
index 5e7b45c569233536ef23dadfafd90e40d20b7f62..449db466bdbc280f1509dad905a72a6a1407d9cb 100644 (file)
@@ -191,7 +191,7 @@ static int lstats_show(struct seq_file *m, void *v)
                                latency_record[i].time,
                                latency_record[i].max);
                        for (q = 0; q < LT_BACKTRACEDEPTH; q++) {
-                               char sym[KSYM_NAME_LEN];
+                               char sym[KSYM_SYMBOL_LEN];
                                char *c;
                                if (!latency_record[i].backtrace[q])
                                        break;
index 06e157119d2b24d2b254c9a38b5ace0935a05886..46a404173db231a982baf3941c72e96911003906 100644 (file)
@@ -3276,10 +3276,10 @@ void __init lockdep_info(void)
 {
        printk("Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar\n");
 
-       printk("... MAX_LOCKDEP_SUBCLASSES:    %lu\n", MAX_LOCKDEP_SUBCLASSES);
+       printk("... MAX_LOCKDEP_SUBCLASSES:  %lu\n", MAX_LOCKDEP_SUBCLASSES);
        printk("... MAX_LOCK_DEPTH:          %lu\n", MAX_LOCK_DEPTH);
        printk("... MAX_LOCKDEP_KEYS:        %lu\n", MAX_LOCKDEP_KEYS);
-       printk("... CLASSHASH_SIZE:           %lu\n", CLASSHASH_SIZE);
+       printk("... CLASSHASH_SIZE:          %lu\n", CLASSHASH_SIZE);
        printk("... MAX_LOCKDEP_ENTRIES:     %lu\n", MAX_LOCKDEP_ENTRIES);
        printk("... MAX_LOCKDEP_CHAINS:      %lu\n", MAX_LOCKDEP_CHAINS);
        printk("... CHAINHASH_SIZE:          %lu\n", CHAINHASH_SIZE);
index 6513aac8e9924017bb82fa58a2c8285f7328097b..4d5088355bfefba8956ff5c91cbc4b932d23eff6 100644 (file)
@@ -167,6 +167,7 @@ static const struct tnt tnts[] = {
  *  'M' - System experienced a machine check exception.
  *  'B' - System has hit bad_page.
  *  'U' - Userspace-defined naughtiness.
+ *  'D' - Kernel has oopsed before
  *  'A' - ACPI table overridden.
  *  'W' - Taint on warning.
  *  'C' - modules from drivers/staging are loaded.
index 153dcb2639c3df614c7862041a9d485b7dbe6614..4e5288a831de2e696260c12f97d60fdbcfc551a3 100644 (file)
@@ -311,7 +311,7 @@ static int cpu_clock_sample_group(const clockid_t which_clock,
        struct task_cputime cputime;
 
        thread_group_cputime(p, &cputime);
-       switch (which_clock) {
+       switch (CPUCLOCK_WHICH(which_clock)) {
        default:
                return -EINVAL;
        case CPUCLOCK_PROF:
@@ -1308,9 +1308,10 @@ static inline int task_cputime_expired(const struct task_cputime *sample,
  */
 static inline int fastpath_timer_check(struct task_struct *tsk)
 {
-       struct signal_struct *sig = tsk->signal;
+       struct signal_struct *sig;
 
-       if (unlikely(!sig))
+       /* tsk == current, ensure it is safe to use ->signal/sighand */
+       if (unlikely(tsk->exit_state))
                return 0;
 
        if (!task_cputime_zero(&tsk->cputime_expires)) {
@@ -1323,6 +1324,8 @@ static inline int fastpath_timer_check(struct task_struct *tsk)
                if (task_cputime_expired(&task_sample, &tsk->cputime_expires))
                        return 1;
        }
+
+       sig = tsk->signal;
        if (!task_cputime_zero(&sig->cputime_expires)) {
                struct task_cputime group_sample;
 
index 5e79c662294bf542750af232be67a1e92bed858d..a140e44eebbacbe88b989e98b1bbdc744a99c94f 100644 (file)
@@ -197,6 +197,11 @@ static int common_timer_create(struct k_itimer *new_timer)
        return 0;
 }
 
+static int no_timer_create(struct k_itimer *new_timer)
+{
+       return -EOPNOTSUPP;
+}
+
 /*
  * Return nonzero if we know a priori this clockid_t value is bogus.
  */
@@ -248,6 +253,7 @@ static __init int init_posix_timers(void)
                .clock_getres = hrtimer_get_res,
                .clock_get = posix_get_monotonic_raw,
                .clock_set = do_posix_clock_nosettime,
+               .timer_create = no_timer_create,
        };
 
        register_posix_clock(CLOCK_REALTIME, &clock_realtime);
index 19122cf6d827d13d03e8a7520d0120d5adf92bbc..b8f7ce9473e8412099e476dd54a27a1a21bf8ea6 100644 (file)
@@ -174,7 +174,7 @@ static void suspend_test_finish(const char *label)
         * has some performance issues.  The stack dump of a WARN_ON
         * is more likely to get the right attention than a printk...
         */
-       WARN_ON(msec > (TEST_SUSPEND_SECONDS * 1000));
+       WARN(msec > (TEST_SUSPEND_SECONDS * 1000), "Component: %s\n", label);
 }
 
 #else
index b7713b53d07a7a17a97130b81bf9b5946e8f1d29..6da14358537c8779db14f4ccab91a64365270d16 100644 (file)
@@ -633,7 +633,7 @@ void swsusp_close(fmode_t mode)
                return;
        }
 
-       blkdev_put(resume_bdev, mode); /* move up */
+       blkdev_put(resume_bdev, mode);
 }
 
 static int swsusp_header_init(void)
index 9830a037d8db1543215f02c01918af3fd980bb10..dc41827fbfeea474c809ebc3adb6e54edcedb861 100644 (file)
@@ -351,7 +351,7 @@ out:
        put_cpu();
 }
 
-static int __devinit profile_cpu_callback(struct notifier_block *info,
+static int __cpuinit profile_cpu_callback(struct notifier_block *info,
                                        unsigned long action, void *__cpu)
 {
        int node, cpu = (unsigned long)__cpu;
@@ -544,7 +544,7 @@ static const struct file_operations proc_profile_operations = {
 };
 
 #ifdef CONFIG_SMP
-static void __init profile_nop(void *unused)
+static inline void profile_nop(void *unused)
 {
 }
 
@@ -596,7 +596,7 @@ out_cleanup:
 #define create_hash_tables()                   ({ 0; })
 #endif
 
-int create_proc_profile(void)
+int __ref create_proc_profile(void) /* false positive from hotcpu_notifier */
 {
        struct proc_dir_entry *entry;
 
index 1e68e4c39e2c05306dbfd9d111ef018aa0f8d9ca..4c8bcd7dd8e0831aa7a66e5c200324cff682721f 100644 (file)
@@ -612,7 +612,7 @@ int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data)
        return (copied == sizeof(data)) ? 0 : -EIO;
 }
 
-#if defined CONFIG_COMPAT && defined __ARCH_WANT_COMPAT_SYS_PTRACE
+#if defined CONFIG_COMPAT
 #include <linux/compat.h>
 
 int compat_ptrace_request(struct task_struct *child, compat_long_t request,
@@ -709,4 +709,4 @@ asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
        unlock_kernel();
        return ret;
 }
-#endif /* CONFIG_COMPAT && __ARCH_WANT_COMPAT_SYS_PTRACE */
+#endif /* CONFIG_COMPAT */
index 8d13a7855c0808858c20fd01d6decebc08c8eeaa..09ac2008f77b419a5c169e41f3ddcbab6aa90746 100644 (file)
@@ -400,7 +400,7 @@ void relay_reset(struct rchan *chan)
        }
 
        mutex_lock(&relay_channels_mutex);
-       for_each_online_cpu(i)
+       for_each_possible_cpu(i)
                if (chan->buf[i])
                        __relay_reset(chan->buf[i], 0);
        mutex_unlock(&relay_channels_mutex);
@@ -611,10 +611,9 @@ struct rchan *relay_open(const char *base_filename,
        return chan;
 
 free_bufs:
-       for_each_online_cpu(i) {
-               if (!chan->buf[i])
-                       break;
-               relay_close_buf(chan->buf[i]);
+       for_each_possible_cpu(i) {
+               if (chan->buf[i])
+                       relay_close_buf(chan->buf[i]);
        }
 
        kref_put(&chan->kref, relay_destroy_channel);
@@ -1318,12 +1317,9 @@ static ssize_t relay_file_splice_read(struct file *in,
                if (ret < 0)
                        break;
                else if (!ret) {
-                       if (spliced)
-                               break;
-                       if (flags & SPLICE_F_NONBLOCK) {
+                       if (flags & SPLICE_F_NONBLOCK)
                                ret = -EAGAIN;
-                               break;
-                       }
+                       break;
                }
 
                *ppos += ret;
index 50a21f964679ec42eee299cab7f7f86edc26a408..e4bb1dd7b308fce6f47e736b70425f4bc3482c0a 100644 (file)
@@ -1453,9 +1453,12 @@ static int task_hot(struct task_struct *p, u64 now, struct sched_domain *sd);
 static unsigned long cpu_avg_load_per_task(int cpu)
 {
        struct rq *rq = cpu_rq(cpu);
+       unsigned long nr_running = ACCESS_ONCE(rq->nr_running);
 
-       if (rq->nr_running)
-               rq->avg_load_per_task = rq->load.weight / rq->nr_running;
+       if (nr_running)
+               rq->avg_load_per_task = rq->load.weight / nr_running;
+       else
+               rq->avg_load_per_task = 0;
 
        return rq->avg_load_per_task;
 }
@@ -5868,6 +5871,8 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
        struct rq *rq = cpu_rq(cpu);
        unsigned long flags;
 
+       spin_lock_irqsave(&rq->lock, flags);
+
        __sched_fork(idle);
        idle->se.exec_start = sched_clock();
 
@@ -5875,7 +5880,6 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
        idle->cpus_allowed = cpumask_of_cpu(cpu);
        __set_task_cpu(idle, cpu);
 
-       spin_lock_irqsave(&rq->lock, flags);
        rq->curr = rq->idle = idle;
 #if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW)
        idle->oncpu = 1;
@@ -6583,7 +6587,9 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
                        req = list_entry(rq->migration_queue.next,
                                         struct migration_req, list);
                        list_del_init(&req->list);
+                       spin_unlock_irq(&rq->lock);
                        complete(&req->done);
+                       spin_lock_irq(&rq->lock);
                }
                spin_unlock_irq(&rq->lock);
                break;
@@ -7786,13 +7792,14 @@ static int dattrs_equal(struct sched_domain_attr *cur, int idx_cur,
  *
  * The passed in 'doms_new' should be kmalloc'd. This routine takes
  * ownership of it and will kfree it when done with it. If the caller
- * failed the kmalloc call, then it can pass in doms_new == NULL,
- * and partition_sched_domains() will fallback to the single partition
- * 'fallback_doms', it also forces the domains to be rebuilt.
+ * failed the kmalloc call, then it can pass in doms_new == NULL &&
+ * ndoms_new == 1, and partition_sched_domains() will fallback to
+ * the single partition 'fallback_doms', it also forces the domains
+ * to be rebuilt.
  *
- * If doms_new==NULL it will be replaced with cpu_online_map.
- * ndoms_new==0 is a special case for destroying existing domains.
- * It will not create the default domain.
+ * If doms_new == NULL it will be replaced with cpu_online_map.
+ * ndoms_new == 0 is a special case for destroying existing domains,
+ * and it will not create the default domain.
  *
  * Call with hotplug lock held
  */
index 81787248b60fda5bc58b6231be84a6a54a763cb0..e8ab096ddfe399dc3007e32b169b46d02ed9cb48 100644 (file)
@@ -118,13 +118,13 @@ static u64 __update_sched_clock(struct sched_clock_data *scd, u64 now)
 
        /*
         * scd->clock = clamp(scd->tick_gtod + delta,
-        *                    max(scd->tick_gtod, scd->clock),
-        *                    max(scd->clock, scd->tick_gtod + TICK_NSEC));
+        *                    max(scd->tick_gtod, scd->clock),
+        *                    scd->tick_gtod + TICK_NSEC);
         */
 
        clock = scd->tick_gtod + delta;
        min_clock = wrap_max(scd->tick_gtod, scd->clock);
-       max_clock = wrap_max(scd->clock, scd->tick_gtod + TICK_NSEC);
+       max_clock = scd->tick_gtod + TICK_NSEC;
 
        clock = wrap_max(clock, min_clock);
        clock = wrap_min(clock, max_clock);
index 48ecc51e77019c9a54c6a565b5c3dafbf9b85be2..26ed8e3d1c1536a542b96b9262aa6dada54d9985 100644 (file)
@@ -423,10 +423,11 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
 #undef __P
 
        {
+               unsigned int this_cpu = raw_smp_processor_id();
                u64 t0, t1;
 
-               t0 = sched_clock();
-               t1 = sched_clock();
+               t0 = cpu_clock(this_cpu);
+               t1 = cpu_clock(this_cpu);
                SEQ_printf(m, "%-35s:%21Ld\n",
                           "clock-delta", (long long)(t1-t0));
        }
index ee71bec1da66a9dcb64d93a0e9934c15a155905b..7dbf72a2b02cf16f256af7655eb9b28c7f3ef856 100644 (file)
@@ -298,9 +298,11 @@ static inline void account_group_user_time(struct task_struct *tsk,
 {
        struct signal_struct *sig;
 
-       sig = tsk->signal;
-       if (unlikely(!sig))
+       /* tsk == current, ensure it is safe to use ->signal */
+       if (unlikely(tsk->exit_state))
                return;
+
+       sig = tsk->signal;
        if (sig->cputime.totals) {
                struct task_cputime *times;
 
@@ -325,9 +327,11 @@ static inline void account_group_system_time(struct task_struct *tsk,
 {
        struct signal_struct *sig;
 
-       sig = tsk->signal;
-       if (unlikely(!sig))
+       /* tsk == current, ensure it is safe to use ->signal */
+       if (unlikely(tsk->exit_state))
                return;
+
+       sig = tsk->signal;
        if (sig->cputime.totals) {
                struct task_cputime *times;
 
@@ -353,8 +357,11 @@ static inline void account_group_exec_runtime(struct task_struct *tsk,
        struct signal_struct *sig;
 
        sig = tsk->signal;
+       /* see __exit_signal()->task_rq_unlock_wait() */
+       barrier();
        if (unlikely(!sig))
                return;
+
        if (sig->cputime.totals) {
                struct task_cputime *times;
 
index 3953e4aed733d32284f48ecfffa1fbff05e234c6..dc0b3be6b7d52cb98bd84d599bfbb7e7d85b1e85 100644 (file)
@@ -188,7 +188,7 @@ static void check_hung_task(struct task_struct *t, unsigned long now)
        if ((long)(now - t->last_switch_timestamp) <
                                        sysctl_hung_task_timeout_secs)
                return;
-       if (sysctl_hung_task_warnings < 0)
+       if (!sysctl_hung_task_warnings)
                return;
        sysctl_hung_task_warnings--;
 
index 9bc4c00872c927a1033013a31ab19630ba9dc170..24e8ceacc388cd14e9ff4ae87fcc47d6f8d96b2b 100644 (file)
@@ -112,7 +112,7 @@ static int chill(void *unused)
 int __stop_machine(int (*fn)(void *), void *data, const cpumask_t *cpus)
 {
        struct work_struct *sm_work;
-       int i;
+       int i, ret;
 
        /* Set up initial state. */
        mutex_lock(&lock);
@@ -137,8 +137,9 @@ int __stop_machine(int (*fn)(void *), void *data, const cpumask_t *cpus)
        /* This will release the thread on our CPU. */
        put_cpu();
        flush_workqueue(stop_machine_wq);
+       ret = active.fnret;
        mutex_unlock(&lock);
-       return active.fnret;
+       return ret;
 }
 
 int stop_machine(int (*fn)(void *), void *data, const cpumask_t *cpus)
index a77b27b11b048fee528e0628798f9fe8774ebbf9..e14a23281707610c6d52338af9e091116e29b987 100644 (file)
@@ -31,7 +31,7 @@ cond_syscall(sys_socketpair);
 cond_syscall(sys_bind);
 cond_syscall(sys_listen);
 cond_syscall(sys_accept);
-cond_syscall(sys_paccept);
+cond_syscall(sys_accept4);
 cond_syscall(sys_connect);
 cond_syscall(sys_getsockname);
 cond_syscall(sys_getpeername);
index 9d048fa2d902ec2b768633afd4ecbaaafc01ec03..3d56fe7570daede300fe01f2e6571416107b081b 100644 (file)
@@ -176,6 +176,9 @@ extern struct ctl_table random_table[];
 #ifdef CONFIG_INOTIFY_USER
 extern struct ctl_table inotify_table[];
 #endif
+#ifdef CONFIG_EPOLL
+extern struct ctl_table epoll_table[];
+#endif
 
 #ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
 int sysctl_legacy_va_layout;
@@ -1325,6 +1328,13 @@ static struct ctl_table fs_table[] = {
                .child          = inotify_table,
        },
 #endif 
+#ifdef CONFIG_EPOLL
+       {
+               .procname       = "epoll",
+               .mode           = 0555,
+               .child          = epoll_table,
+       },
+#endif
 #endif
        {
                .ctl_name       = KERN_SETUID_DUMPABLE,
index e7acfb482a680ea248f5268fbb7f158868938e56..fa05e88aa76f36af2dc5cb0cc26f737466d0a423 100644 (file)
@@ -518,6 +518,28 @@ void update_wall_time(void)
        /* correct the clock when NTP error is too big */
        clocksource_adjust(offset);
 
+       /*
+        * Since in the loop above, we accumulate any amount of time
+        * in xtime_nsec over a second into xtime.tv_sec, its possible for
+        * xtime_nsec to be fairly small after the loop. Further, if we're
+        * slightly speeding the clocksource up in clocksource_adjust(),
+        * its possible the required corrective factor to xtime_nsec could
+        * cause it to underflow.
+        *
+        * Now, we cannot simply roll the accumulated second back, since
+        * the NTP subsystem has been notified via second_overflow. So
+        * instead we push xtime_nsec forward by the amount we underflowed,
+        * and add that amount into the error.
+        *
+        * We'll correct this error next time through this function, when
+        * xtime_nsec is not as small.
+        */
+       if (unlikely((s64)clock->xtime_nsec < 0)) {
+               s64 neg = -(s64)clock->xtime_nsec;
+               clock->xtime_nsec = 0;
+               clock->error += neg << (NTP_SCALE_SHIFT - clock->shift);
+       }
+
        /* store full nanoseconds into xtime after rounding it up and
         * add the remainder to the error difference.
         */
index 4a39d24568c82ffddbcbfed2a6dcb5d2b9eb7f22..78db083390f07baa7993c48d9fc0f7a635c769d0 100644 (file)
@@ -185,7 +185,6 @@ enum {
 };
 
 static int ftrace_filtered;
-static int tracing_on;
 
 static LIST_HEAD(ftrace_new_addrs);
 
@@ -327,96 +326,89 @@ ftrace_record_ip(unsigned long ip)
 
 static int
 __ftrace_replace_code(struct dyn_ftrace *rec,
-                     unsigned char *old, unsigned char *new, int enable)
+                     unsigned char *nop, int enable)
 {
        unsigned long ip, fl;
+       unsigned char *call, *old, *new;
 
        ip = rec->ip;
 
-       if (ftrace_filtered && enable) {
+       /*
+        * If this record is not to be traced and
+        * it is not enabled then do nothing.
+        *
+        * If this record is not to be traced and
+        * it is enabled then disabled it.
+        *
+        */
+       if (rec->flags & FTRACE_FL_NOTRACE) {
+               if (rec->flags & FTRACE_FL_ENABLED)
+                       rec->flags &= ~FTRACE_FL_ENABLED;
+               else
+                       return 0;
+
+       } else if (ftrace_filtered && enable) {
                /*
-                * If filtering is on:
-                *
-                * If this record is set to be filtered and
-                * is enabled then do nothing.
-                *
-                * If this record is set to be filtered and
-                * it is not enabled, enable it.
-                *
-                * If this record is not set to be filtered
-                * and it is not enabled do nothing.
-                *
-                * If this record is set not to trace then
-                * do nothing.
-                *
-                * If this record is set not to trace and
-                * it is enabled then disable it.
-                *
-                * If this record is not set to be filtered and
-                * it is enabled, disable it.
+                * Filtering is on:
                 */
 
-               fl = rec->flags & (FTRACE_FL_FILTER | FTRACE_FL_NOTRACE |
-                                  FTRACE_FL_ENABLED);
+               fl = rec->flags & (FTRACE_FL_FILTER | FTRACE_FL_ENABLED);
 
-               if ((fl ==  (FTRACE_FL_FILTER | FTRACE_FL_ENABLED)) ||
-                   (fl ==  (FTRACE_FL_FILTER | FTRACE_FL_NOTRACE)) ||
-                   !fl || (fl == FTRACE_FL_NOTRACE))
+               /* Record is filtered and enabled, do nothing */
+               if (fl == (FTRACE_FL_FILTER | FTRACE_FL_ENABLED))
                        return 0;
 
-               /*
-                * If it is enabled disable it,
-                * otherwise enable it!
-                */
-               if (fl & FTRACE_FL_ENABLED) {
-                       /* swap new and old */
-                       new = old;
-                       old = ftrace_call_replace(ip, FTRACE_ADDR);
+               /* Record is not filtered and is not enabled do nothing */
+               if (!fl)
+                       return 0;
+
+               /* Record is not filtered but enabled, disable it */
+               if (fl == FTRACE_FL_ENABLED)
                        rec->flags &= ~FTRACE_FL_ENABLED;
-               } else {
-                       new = ftrace_call_replace(ip, FTRACE_ADDR);
+               else
+               /* Otherwise record is filtered but not enabled, enable it */
                        rec->flags |= FTRACE_FL_ENABLED;
-               }
        } else {
+               /* Disable or not filtered */
 
                if (enable) {
-                       /*
-                        * If this record is set not to trace and is
-                        * not enabled, do nothing.
-                        */
-                       fl = rec->flags & (FTRACE_FL_NOTRACE | FTRACE_FL_ENABLED);
-                       if (fl == FTRACE_FL_NOTRACE)
-                               return 0;
-
-                       new = ftrace_call_replace(ip, FTRACE_ADDR);
-               } else
-                       old = ftrace_call_replace(ip, FTRACE_ADDR);
-
-               if (enable) {
+                       /* if record is enabled, do nothing */
                        if (rec->flags & FTRACE_FL_ENABLED)
                                return 0;
+
                        rec->flags |= FTRACE_FL_ENABLED;
+
                } else {
+
+                       /* if record is not enabled do nothing */
                        if (!(rec->flags & FTRACE_FL_ENABLED))
                                return 0;
+
                        rec->flags &= ~FTRACE_FL_ENABLED;
                }
        }
 
+       call = ftrace_call_replace(ip, FTRACE_ADDR);
+
+       if (rec->flags & FTRACE_FL_ENABLED) {
+               old = nop;
+               new = call;
+       } else {
+               old = call;
+               new = nop;
+       }
+
        return ftrace_modify_code(ip, old, new);
 }
 
 static void ftrace_replace_code(int enable)
 {
        int i, failed;
-       unsigned char *new = NULL, *old = NULL;
+       unsigned char *nop = NULL;
        struct dyn_ftrace *rec;
        struct ftrace_page *pg;
 
-       if (enable)
-               old = ftrace_nop_replace();
-       else
-               new = ftrace_nop_replace();
+       nop = ftrace_nop_replace();
 
        for (pg = ftrace_pages_start; pg; pg = pg->next) {
                for (i = 0; i < pg->index; i++) {
@@ -434,7 +426,7 @@ static void ftrace_replace_code(int enable)
                                unfreeze_record(rec);
                        }
 
-                       failed = __ftrace_replace_code(rec, old, new, enable);
+                       failed = __ftrace_replace_code(rec, nop, enable);
                        if (failed && (rec->flags & FTRACE_FL_CONVERTED)) {
                                rec->flags |= FTRACE_FL_FAILED;
                                if ((system_state == SYSTEM_BOOTING) ||
@@ -506,13 +498,10 @@ static int __ftrace_modify_code(void *data)
 {
        int *command = data;
 
-       if (*command & FTRACE_ENABLE_CALLS) {
+       if (*command & FTRACE_ENABLE_CALLS)
                ftrace_replace_code(1);
-               tracing_on = 1;
-       } else if (*command & FTRACE_DISABLE_CALLS) {
+       else if (*command & FTRACE_DISABLE_CALLS)
                ftrace_replace_code(0);
-               tracing_on = 0;
-       }
 
        if (*command & FTRACE_UPDATE_TRACE_FUNC)
                ftrace_update_ftrace_func(ftrace_trace_function);
@@ -538,8 +527,7 @@ static void ftrace_startup(void)
 
        mutex_lock(&ftrace_start_lock);
        ftrace_start++;
-       if (ftrace_start == 1)
-               command |= FTRACE_ENABLE_CALLS;
+       command |= FTRACE_ENABLE_CALLS;
 
        if (saved_ftrace_func != ftrace_trace_function) {
                saved_ftrace_func = ftrace_trace_function;
@@ -677,7 +665,7 @@ static int __init ftrace_dyn_table_alloc(unsigned long num_to_init)
 
        cnt = num_to_init / ENTRIES_PER_PAGE;
        pr_info("ftrace: allocating %ld entries in %d pages\n",
-               num_to_init, cnt);
+               num_to_init, cnt + 1);
 
        for (i = 0; i < cnt; i++) {
                pg->next = (void *)get_zeroed_page(GFP_KERNEL);
@@ -738,6 +726,9 @@ t_next(struct seq_file *m, void *v, loff_t *pos)
                    ((iter->flags & FTRACE_ITER_FAILURES) &&
                     !(rec->flags & FTRACE_FL_FAILED)) ||
 
+                   ((iter->flags & FTRACE_ITER_FILTER) &&
+                    !(rec->flags & FTRACE_FL_FILTER)) ||
+
                    ((iter->flags & FTRACE_ITER_NOTRACE) &&
                     !(rec->flags & FTRACE_FL_NOTRACE))) {
                        rec = NULL;
@@ -757,13 +748,11 @@ static void *t_start(struct seq_file *m, loff_t *pos)
        void *p = NULL;
        loff_t l = -1;
 
-       if (*pos != iter->pos) {
-               for (p = t_next(m, p, &l); p && l < *pos; p = t_next(m, p, &l))
-                       ;
-       } else {
-               l = *pos;
-               p = t_next(m, p, &l);
-       }
+       if (*pos > iter->pos)
+               *pos = iter->pos;
+
+       l = *pos;
+       p = t_next(m, p, &l);
 
        return p;
 }
@@ -774,15 +763,21 @@ static void t_stop(struct seq_file *m, void *p)
 
 static int t_show(struct seq_file *m, void *v)
 {
+       struct ftrace_iterator *iter = m->private;
        struct dyn_ftrace *rec = v;
        char str[KSYM_SYMBOL_LEN];
+       int ret = 0;
 
        if (!rec)
                return 0;
 
        kallsyms_lookup(rec->ip, NULL, NULL, NULL, str);
 
-       seq_printf(m, "%s\n", str);
+       ret = seq_printf(m, "%s\n", str);
+       if (ret < 0) {
+               iter->pos--;
+               iter->idx--;
+       }
 
        return 0;
 }
@@ -808,7 +803,7 @@ ftrace_avail_open(struct inode *inode, struct file *file)
                return -ENOMEM;
 
        iter->pg = ftrace_pages_start;
-       iter->pos = -1;
+       iter->pos = 0;
 
        ret = seq_open(file, &show_ftrace_seq_ops);
        if (!ret) {
@@ -895,7 +890,7 @@ ftrace_regex_open(struct inode *inode, struct file *file, int enable)
 
        if (file->f_mode & FMODE_READ) {
                iter->pg = ftrace_pages_start;
-               iter->pos = -1;
+               iter->pos = 0;
                iter->flags = enable ? FTRACE_ITER_FILTER :
                        FTRACE_ITER_NOTRACE;
 
@@ -1186,7 +1181,7 @@ ftrace_regex_release(struct inode *inode, struct file *file, int enable)
 
        mutex_lock(&ftrace_sysctl_lock);
        mutex_lock(&ftrace_start_lock);
-       if (iter->filtered && ftrace_start && ftrace_enabled)
+       if (ftrace_start && ftrace_enabled)
                ftrace_run_update_code(FTRACE_ENABLE_CALLS);
        mutex_unlock(&ftrace_start_lock);
        mutex_unlock(&ftrace_sysctl_lock);
index 2f76193c34894e094f6374d725fd8477c4b0af72..668bbb5ef2bd154dc8084fe4480bfd251e484f41 100644 (file)
 #include <linux/list.h>
 #include <linux/fs.h>
 
+#include "trace.h"
+
+/* Global flag to disable all recording to ring buffers */
+static int ring_buffers_off __read_mostly;
+
+/**
+ * tracing_on - enable all tracing buffers
+ *
+ * This function enables all tracing buffers that may have been
+ * disabled with tracing_off.
+ */
+void tracing_on(void)
+{
+       ring_buffers_off = 0;
+}
+
+/**
+ * tracing_off - turn off all tracing buffers
+ *
+ * This function stops all tracing buffers from recording data.
+ * It does not disable any overhead the tracers themselves may
+ * be causing. This function simply causes all recording to
+ * the ring buffers to fail.
+ */
+void tracing_off(void)
+{
+       ring_buffers_off = 1;
+}
+
 /* Up this if you want to test the TIME_EXTENTS and normalization */
 #define DEBUG_SHIFT 0
 
 /* FIXME!!! */
 u64 ring_buffer_time_stamp(int cpu)
 {
+       u64 time;
+
+       preempt_disable_notrace();
        /* shift to debug/test normalization and TIME_EXTENTS */
-       return sched_clock() << DEBUG_SHIFT;
+       time = sched_clock() << DEBUG_SHIFT;
+       preempt_enable_notrace();
+
+       return time;
 }
 
 void ring_buffer_normalize_time_stamp(int cpu, u64 *ts)
@@ -503,6 +538,12 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size)
        LIST_HEAD(pages);
        int i, cpu;
 
+       /*
+        * Always succeed at resizing a non-existent buffer:
+        */
+       if (!buffer)
+               return size;
+
        size = DIV_ROUND_UP(size, BUF_PAGE_SIZE);
        size *= BUF_PAGE_SIZE;
        buffer_size = buffer->pages * BUF_PAGE_SIZE;
@@ -576,6 +617,7 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size)
                list_del_init(&page->list);
                free_buffer_page(page);
        }
+       mutex_unlock(&buffer->mutex);
        return -ENOMEM;
 }
 
@@ -1133,6 +1175,9 @@ ring_buffer_lock_reserve(struct ring_buffer *buffer,
        struct ring_buffer_event *event;
        int cpu, resched;
 
+       if (ring_buffers_off)
+               return NULL;
+
        if (atomic_read(&buffer->record_disabled))
                return NULL;
 
@@ -1170,7 +1215,7 @@ ring_buffer_lock_reserve(struct ring_buffer *buffer,
 
  out:
        if (resched)
-               preempt_enable_notrace();
+               preempt_enable_no_resched_notrace();
        else
                preempt_enable_notrace();
        return NULL;
@@ -1249,6 +1294,9 @@ int ring_buffer_write(struct ring_buffer *buffer,
        int ret = -EBUSY;
        int cpu, resched;
 
+       if (ring_buffers_off)
+               return -EBUSY;
+
        if (atomic_read(&buffer->record_disabled))
                return -EBUSY;
 
@@ -2070,3 +2118,69 @@ int ring_buffer_swap_cpu(struct ring_buffer *buffer_a,
        return 0;
 }
 
+static ssize_t
+rb_simple_read(struct file *filp, char __user *ubuf,
+              size_t cnt, loff_t *ppos)
+{
+       int *p = filp->private_data;
+       char buf[64];
+       int r;
+
+       /* !ring_buffers_off == tracing_on */
+       r = sprintf(buf, "%d\n", !*p);
+
+       return simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
+}
+
+static ssize_t
+rb_simple_write(struct file *filp, const char __user *ubuf,
+               size_t cnt, loff_t *ppos)
+{
+       int *p = filp->private_data;
+       char buf[64];
+       long val;
+       int ret;
+
+       if (cnt >= sizeof(buf))
+               return -EINVAL;
+
+       if (copy_from_user(&buf, ubuf, cnt))
+               return -EFAULT;
+
+       buf[cnt] = 0;
+
+       ret = strict_strtoul(buf, 10, &val);
+       if (ret < 0)
+               return ret;
+
+       /* !ring_buffers_off == tracing_on */
+       *p = !val;
+
+       (*ppos)++;
+
+       return cnt;
+}
+
+static struct file_operations rb_simple_fops = {
+       .open           = tracing_open_generic,
+       .read           = rb_simple_read,
+       .write          = rb_simple_write,
+};
+
+
+static __init int rb_init_debugfs(void)
+{
+       struct dentry *d_tracer;
+       struct dentry *entry;
+
+       d_tracer = tracing_init_dentry();
+
+       entry = debugfs_create_file("tracing_on", 0644, d_tracer,
+                                   &ring_buffers_off, &rb_simple_fops);
+       if (!entry)
+               pr_warning("Could not create debugfs 'tracing_on' entry\n");
+
+       return 0;
+}
+
+fs_initcall(rb_init_debugfs);
index 697eda36b86a54e902a2289d2adf767ca1278460..d86e3252f3000024cfaf31c63ffbee765dafac53 100644 (file)
@@ -1936,6 +1936,7 @@ __tracing_open(struct inode *inode, struct file *file, int *ret)
                        ring_buffer_read_finish(iter->buffer_iter[cpu]);
        }
        mutex_unlock(&trace_types_lock);
+       kfree(iter);
 
        return ERR_PTR(-ENOMEM);
 }
index f28484618ff0de99b0c9d5062f23fe8eec25070a..e62cbf78eab6d6a6270a2a5c97f4ffc7ac443525 100644 (file)
@@ -18,12 +18,14 @@ struct header_iter {
 
 static struct trace_array *mmio_trace_array;
 static bool overrun_detected;
+static unsigned long prev_overruns;
 
 static void mmio_reset_data(struct trace_array *tr)
 {
        int cpu;
 
        overrun_detected = false;
+       prev_overruns = 0;
        tr->time_start = ftrace_now(tr->cpu);
 
        for_each_online_cpu(cpu)
@@ -128,16 +130,12 @@ static void mmio_close(struct trace_iterator *iter)
 
 static unsigned long count_overruns(struct trace_iterator *iter)
 {
-       int cpu;
        unsigned long cnt = 0;
-/* FIXME: */
-#if 0
-       for_each_online_cpu(cpu) {
-               cnt += iter->overrun[cpu];
-               iter->overrun[cpu] = 0;
-       }
-#endif
-       (void)cpu;
+       unsigned long over = ring_buffer_overruns(iter->tr->buffer);
+
+       if (over > prev_overruns)
+               cnt = over - prev_overruns;
+       prev_overruns = over;
        return cnt;
 }
 
index be682b62fe586285c77c36d7e7c6d6beb929541f..3bdb44bde4b7e5fa4af698c467f0c64b704e7699 100644 (file)
@@ -184,11 +184,16 @@ static struct file_operations stack_max_size_fops = {
 static void *
 t_next(struct seq_file *m, void *v, loff_t *pos)
 {
-       long i = (long)m->private;
+       long i;
 
        (*pos)++;
 
-       i++;
+       if (v == SEQ_START_TOKEN)
+               i = 0;
+       else {
+               i = *(long *)v;
+               i++;
+       }
 
        if (i >= max_stack_trace.nr_entries ||
            stack_dump_trace[i] == ULONG_MAX)
@@ -201,12 +206,15 @@ t_next(struct seq_file *m, void *v, loff_t *pos)
 
 static void *t_start(struct seq_file *m, loff_t *pos)
 {
-       void *t = &m->private;
+       void *t = SEQ_START_TOKEN;
        loff_t l = 0;
 
        local_irq_disable();
        __raw_spin_lock(&max_stack_lock);
 
+       if (*pos == 0)
+               return SEQ_START_TOKEN;
+
        for (; t && l < *pos; t = t_next(m, t, &l))
                ;
 
@@ -235,10 +243,10 @@ static int trace_lookup_stack(struct seq_file *m, long i)
 
 static int t_show(struct seq_file *m, void *v)
 {
-       long i = *(long *)v;
+       long i;
        int size;
 
-       if (i < 0) {
+       if (v == SEQ_START_TOKEN) {
                seq_printf(m, "        Depth   Size      Location"
                           "    (%d entries)\n"
                           "        -----   ----      --------\n",
@@ -246,6 +254,8 @@ static int t_show(struct seq_file *m, void *v)
                return 0;
        }
 
+       i = *(long *)v;
+
        if (i >= max_stack_trace.nr_entries ||
            stack_dump_trace[i] == ULONG_MAX)
                return 0;
@@ -275,10 +285,6 @@ static int stack_trace_open(struct inode *inode, struct file *file)
        int ret;
 
        ret = seq_open(file, &stack_trace_seq_ops);
-       if (!ret) {
-               struct seq_file *m = file->private_data;
-               m->private = (void *)-1;
-       }
 
        return ret;
 }
index bfeafd60ee9fce4ba8e643c2beb5d8e66cff74e3..300e41afbf97b976006b9dc6f933e36c62172372 100644 (file)
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -5,6 +5,8 @@
 
   CONFIG_BUG - emit BUG traps.  Nothing happens without this.
   CONFIG_GENERIC_BUG - enable this code.
+  CONFIG_GENERIC_BUG_RELATIVE_POINTERS - use 32-bit pointers relative to
+       the containing struct bug_entry for bug_addr and file.
   CONFIG_DEBUG_BUGVERBOSE - emit full file+line information for each BUG
 
   CONFIG_BUG and CONFIG_DEBUG_BUGVERBOSE are potentially user-settable
 
 extern const struct bug_entry __start___bug_table[], __stop___bug_table[];
 
+static inline unsigned long bug_addr(const struct bug_entry *bug)
+{
+#ifndef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
+       return bug->bug_addr;
+#else
+       return (unsigned long)bug + bug->bug_addr_disp;
+#endif
+}
+
 #ifdef CONFIG_MODULES
 static LIST_HEAD(module_bug_list);
 
@@ -55,7 +66,7 @@ static const struct bug_entry *module_find_bug(unsigned long bugaddr)
                unsigned i;
 
                for (i = 0; i < mod->num_bugs; ++i, ++bug)
-                       if (bugaddr == bug->bug_addr)
+                       if (bugaddr == bug_addr(bug))
                                return bug;
        }
        return NULL;
@@ -108,7 +119,7 @@ const struct bug_entry *find_bug(unsigned long bugaddr)
        const struct bug_entry *bug;
 
        for (bug = __start___bug_table; bug < __stop___bug_table; ++bug)
-               if (bugaddr == bug->bug_addr)
+               if (bugaddr == bug_addr(bug))
                        return bug;
 
        return module_find_bug(bugaddr);
@@ -133,7 +144,11 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
 
        if (bug) {
 #ifdef CONFIG_DEBUG_BUGVERBOSE
+#ifndef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
                file = bug->file;
+#else
+               file = (const char *)bug + bug->file_disp;
+#endif
                line = bug->line;
 #endif
                warning = (bug->flags & BUGFLAG_WARNING) != 0;
index d83660fd6fdde53617121f3f72e38b58158126b9..8e30295e8566579515ca8126a694150e290107aa 100644 (file)
@@ -135,7 +135,7 @@ int unregister_dynamic_debug_module(char *mod_name)
        nr_entries--;
 out:
        up(&debug_list_mutex);
-       return 0;
+       return ret;
 }
 EXPORT_SYMBOL_GPL(unregister_dynamic_debug_module);
 
@@ -289,7 +289,7 @@ static ssize_t pr_debug_write(struct file *file, const char __user *buf,
                                        dynamic_enabled = DYNAMIC_ENABLED_SOME;
                                        err = 0;
                                        printk(KERN_DEBUG
-                                              "debugging enabled for module %s",
+                                              "debugging enabled for module %s\n",
                                               elem->name);
                                } else if (!value && (elem->enable == 1)) {
                                        elem->enable = 0;
@@ -309,7 +309,7 @@ static ssize_t pr_debug_write(struct file *file, const char __user *buf,
                                        err = 0;
                                        printk(KERN_DEBUG
                                               "debugging disabled for module "
-                                              "%s", elem->name);
+                                              "%s\n", elem->name);
                                }
                        }
                }
index e728c7fccc4de0884263cd8055aee977fe748522..1c4f9281f412db349d3a80e0ed51e51f6102027c 100644 (file)
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -185,6 +185,7 @@ static int sub_alloc(struct idr *idp, int *starting_id, struct idr_layer **pa)
                        new = get_from_free_list(idp);
                        if (!new)
                                return -1;
+                       new->layer = l-1;
                        rcu_assign_pointer(p->ary[m], new);
                        p->count++;
                }
@@ -210,6 +211,7 @@ build_up:
        if (unlikely(!p)) {
                if (!(p = get_from_free_list(idp)))
                        return -1;
+               p->layer = 0;
                layers = 1;
        }
        /*
@@ -218,8 +220,14 @@ build_up:
         */
        while ((layers < (MAX_LEVEL - 1)) && (id >= (1 << (layers*IDR_BITS)))) {
                layers++;
-               if (!p->count)
+               if (!p->count) {
+                       /* special case: if the tree is currently empty,
+                        * then we grow the tree by moving the top node
+                        * upwards.
+                        */
+                       p->layer++;
                        continue;
+               }
                if (!(new = get_from_free_list(idp))) {
                        /*
                         * The allocation failed.  If we built part of
@@ -237,6 +245,7 @@ build_up:
                }
                new->ary[0] = p;
                new->count = 1;
+               new->layer = layers-1;
                if (p->bitmap == IDR_FULL)
                        __set_bit(0, &new->bitmap);
                p = new;
@@ -493,17 +502,21 @@ void *idr_find(struct idr *idp, int id)
        int n;
        struct idr_layer *p;
 
-       n = idp->layers * IDR_BITS;
        p = rcu_dereference(idp->top);
+       if (!p)
+               return NULL;
+       n = (p->layer+1) * IDR_BITS;
 
        /* Mask off upper bits we don't use for the search. */
        id &= MAX_ID_MASK;
 
        if (id >= (1 << n))
                return NULL;
+       BUG_ON(n == 0);
 
        while (n > 0 && p) {
                n -= IDR_BITS;
+               BUG_ON(n != p->layer*IDR_BITS);
                p = rcu_dereference(p->ary[(id >> n) & IDR_MASK]);
        }
        return((void *)p);
@@ -582,8 +595,11 @@ void *idr_replace(struct idr *idp, void *ptr, int id)
        int n;
        struct idr_layer *p, *old_p;
 
-       n = idp->layers * IDR_BITS;
        p = idp->top;
+       if (!p)
+               return ERR_PTR(-EINVAL);
+
+       n = (p->layer+1) * IDR_BITS;
 
        id &= MAX_ID_MASK;
 
index a8663890a88c2e358f21b8cdc6f23a8ebb9d77e5..b255b939bc1b85bd4fc385df4e1322e9472b2b26 100644 (file)
@@ -62,10 +62,7 @@ s64 __percpu_counter_sum(struct percpu_counter *fbc)
        for_each_online_cpu(cpu) {
                s32 *pcount = per_cpu_ptr(fbc->counters, cpu);
                ret += *pcount;
-               *pcount = 0;
        }
-       fbc->count = ret;
-
        spin_unlock(&fbc->lock);
        return ret;
 }
@@ -104,13 +101,13 @@ void percpu_counter_destroy(struct percpu_counter *fbc)
        if (!fbc->counters)
                return;
 
-       free_percpu(fbc->counters);
-       fbc->counters = NULL;
 #ifdef CONFIG_HOTPLUG_CPU
        mutex_lock(&percpu_counters_lock);
        list_del(&fbc->list);
        mutex_unlock(&percpu_counters_lock);
 #endif
+       free_percpu(fbc->counters);
+       fbc->counters = NULL;
 }
 EXPORT_SYMBOL(percpu_counter_destroy);
 
index 8d2688ff1352e7ca9c20c6ac28292216fb8640ac..b7b449dafbe5abb59fe06982e337cb31c6a7eaeb 100644 (file)
@@ -395,7 +395,7 @@ void sg_miter_stop(struct sg_mapping_iter *miter)
                        WARN_ON(!irqs_disabled());
                        kunmap_atomic(miter->addr, KM_BIO_SRC_IRQ);
                } else
-                       kunmap(miter->addr);
+                       kunmap(miter->page);
 
                miter->page = NULL;
                miter->addr = NULL;
index 78330c37a61bd1682768a61148be00a9a083003a..5f6c629a924d8da3a5e126b6fa76e12e562fe768 100644 (file)
@@ -467,9 +467,13 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size,
        dma_addr_t dev_addr;
        void *ret;
        int order = get_order(size);
+       u64 dma_mask = DMA_32BIT_MASK;
+
+       if (hwdev && hwdev->coherent_dma_mask)
+               dma_mask = hwdev->coherent_dma_mask;
 
        ret = (void *)__get_free_pages(flags, order);
-       if (ret && address_needs_mapping(hwdev, virt_to_bus(ret), size)) {
+       if (ret && !is_buffer_dma_capable(dma_mask, virt_to_bus(ret), size)) {
                /*
                 * The allocated memory isn't reachable by the device.
                 * Fall back on swiotlb_map_single().
@@ -493,9 +497,9 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size,
        dev_addr = virt_to_bus(ret);
 
        /* Confirm address can be DMA'd by device */
-       if (address_needs_mapping(hwdev, dev_addr, size)) {
+       if (!is_buffer_dma_capable(dma_mask, dev_addr, size)) {
                printk("hwdev DMA mask = 0x%016Lx, dev_addr = 0x%016Lx\n",
-                      (unsigned long long)*hwdev->dma_mask,
+                      (unsigned long long)dma_mask,
                       (unsigned long long)dev_addr);
 
                /* DMA_TO_DEVICE to avoid memcpy in unmap_single */
index f2e574dbc30089d778880d2ad178d5dd48174034..801c08b046e6cc0f1a12740dc74fed16ff018fe6 100644 (file)
@@ -176,6 +176,9 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent,
        int ret = 0;
        struct device *dev;
 
+       if (bdi->dev)   /* The driver needs to use separate queues per device */
+               goto exit;
+
        va_start(args, fmt);
        dev = device_create_vargs(bdi_class, parent, MKDEV(0, 0), bdi, fmt, args);
        va_end(args);
index d143ab67be444119b6240c5f8461a72fe2fc9647..6058b53dcb8905bc33bc25371083b47167de7596 100644 (file)
@@ -1796,6 +1796,7 @@ void unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start,
 static int unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
                                struct page *page, unsigned long address)
 {
+       struct hstate *h = hstate_vma(vma);
        struct vm_area_struct *iter_vma;
        struct address_space *mapping;
        struct prio_tree_iter iter;
@@ -1805,7 +1806,7 @@ static int unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
         * vm_pgoff is in PAGE_SIZE units, hence the different calculation
         * from page cache lookup which is in HPAGE_SIZE units.
         */
-       address = address & huge_page_mask(hstate_vma(vma));
+       address = address & huge_page_mask(h);
        pgoff = ((address - vma->vm_start) >> PAGE_SHIFT)
                + (vma->vm_pgoff >> PAGE_SHIFT);
        mapping = (struct address_space *)page_private(page);
@@ -1824,7 +1825,7 @@ static int unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
                 */
                if (!is_vma_resv_set(iter_vma, HPAGE_RESV_OWNER))
                        unmap_hugepage_range(iter_vma,
-                               address, address + HPAGE_SIZE,
+                               address, address + huge_page_size(h),
                                page);
        }
 
index 164951c473058a25c081d5e47260d872068cdbb7..f01b7eed6e16c4e3f32e039b7f2223ca598f40aa 100644 (file)
@@ -669,6 +669,16 @@ int copy_page_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
        if (is_vm_hugetlb_page(vma))
                return copy_hugetlb_page_range(dst_mm, src_mm, vma);
 
+       if (unlikely(is_pfn_mapping(vma))) {
+               /*
+                * We do not free on error cases below as remove_vma
+                * gets called on error from higher level routine
+                */
+               ret = track_pfn_vma_copy(vma);
+               if (ret)
+                       return ret;
+       }
+
        /*
         * We need to invalidate the secondary MMU mappings only when
         * there could be a permission downgrade on the ptes of the
@@ -915,6 +925,9 @@ unsigned long unmap_vmas(struct mmu_gather **tlbp,
                if (vma->vm_flags & VM_ACCOUNT)
                        *nr_accounted += (end - start) >> PAGE_SHIFT;
 
+               if (unlikely(is_pfn_mapping(vma)))
+                       untrack_pfn_vma(vma, 0, 0);
+
                while (start != end) {
                        if (!tlb_start_valid) {
                                tlb_start = start;
@@ -1430,6 +1443,7 @@ out:
 int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr,
                        unsigned long pfn)
 {
+       int ret;
        /*
         * Technically, architectures with pte_special can avoid all these
         * restrictions (same for remap_pfn_range).  However we would like
@@ -1444,7 +1458,15 @@ int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr,
 
        if (addr < vma->vm_start || addr >= vma->vm_end)
                return -EFAULT;
-       return insert_pfn(vma, addr, pfn, vma->vm_page_prot);
+       if (track_pfn_vma_new(vma, vma->vm_page_prot, pfn, PAGE_SIZE))
+               return -EINVAL;
+
+       ret = insert_pfn(vma, addr, pfn, vma->vm_page_prot);
+
+       if (ret)
+               untrack_pfn_vma(vma, pfn, PAGE_SIZE);
+
+       return ret;
 }
 EXPORT_SYMBOL(vm_insert_pfn);
 
@@ -1575,14 +1597,17 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
         * behaviour that some programs depend on. We mark the "original"
         * un-COW'ed pages by matching them up with "vma->vm_pgoff".
         */
-       if (is_cow_mapping(vma->vm_flags)) {
-               if (addr != vma->vm_start || end != vma->vm_end)
-                       return -EINVAL;
+       if (addr == vma->vm_start && end == vma->vm_end)
                vma->vm_pgoff = pfn;
-       }
+       else if (is_cow_mapping(vma->vm_flags))
+               return -EINVAL;
 
        vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP;
 
+       err = track_pfn_vma_new(vma, prot, pfn, PAGE_ALIGN(size));
+       if (err)
+               return -EINVAL;
+
        BUG_ON(addr >= end);
        pfn -= addr >> PAGE_SHIFT;
        pgd = pgd_offset(mm, addr);
@@ -1594,6 +1619,10 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
                if (err)
                        break;
        } while (pgd++, addr = next, addr != end);
+
+       if (err)
+               untrack_pfn_vma(vma, pfn, PAGE_ALIGN(size));
+
        return err;
 }
 EXPORT_SYMBOL(remap_pfn_range);
@@ -2865,9 +2894,9 @@ int in_gate_area_no_task(unsigned long addr)
 #endif /* __HAVE_ARCH_GATE_AREA */
 
 #ifdef CONFIG_HAVE_IOREMAP_PROT
-static resource_size_t follow_phys(struct vm_area_struct *vma,
-                       unsigned long address, unsigned int flags,
-                       unsigned long *prot)
+int follow_phys(struct vm_area_struct *vma,
+               unsigned long address, unsigned int flags,
+               unsigned long *prot, resource_size_t *phys)
 {
        pgd_t *pgd;
        pud_t *pud;
@@ -2876,24 +2905,26 @@ static resource_size_t follow_phys(struct vm_area_struct *vma,
        spinlock_t *ptl;
        resource_size_t phys_addr = 0;
        struct mm_struct *mm = vma->vm_mm;
+       int ret = -EINVAL;
 
-       VM_BUG_ON(!(vma->vm_flags & (VM_IO | VM_PFNMAP)));
+       if (!(vma->vm_flags & (VM_IO | VM_PFNMAP)))
+               goto out;
 
        pgd = pgd_offset(mm, address);
        if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd)))
-               goto no_page_table;
+               goto out;
 
        pud = pud_offset(pgd, address);
        if (pud_none(*pud) || unlikely(pud_bad(*pud)))
-               goto no_page_table;
+               goto out;
 
        pmd = pmd_offset(pud, address);
        if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
-               goto no_page_table;
+               goto out;
 
        /* We cannot handle huge page PFN maps. Luckily they don't exist. */
        if (pmd_huge(*pmd))
-               goto no_page_table;
+               goto out;
 
        ptep = pte_offset_map_lock(mm, pmd, address, &ptl);
        if (!ptep)
@@ -2908,13 +2939,13 @@ static resource_size_t follow_phys(struct vm_area_struct *vma,
        phys_addr <<= PAGE_SHIFT; /* Shift here to avoid overflow on PAE */
 
        *prot = pgprot_val(pte_pgprot(pte));
+       *phys = phys_addr;
+       ret = 0;
 
 unlock:
        pte_unmap_unlock(ptep, ptl);
 out:
-       return phys_addr;
-no_page_table:
-       return 0;
+       return ret;
 }
 
 int generic_access_phys(struct vm_area_struct *vma, unsigned long addr,
@@ -2925,12 +2956,7 @@ int generic_access_phys(struct vm_area_struct *vma, unsigned long addr,
        void *maddr;
        int offset = addr & (PAGE_SIZE-1);
 
-       if (!(vma->vm_flags & (VM_IO | VM_PFNMAP)))
-               return -EINVAL;
-
-       phys_addr = follow_phys(vma, addr, write, &prot);
-
-       if (!phys_addr)
+       if (follow_phys(vma, addr, write, &prot, &phys_addr))
                return -EINVAL;
 
        maddr = ioremap_prot(phys_addr, PAGE_SIZE, prot);
index 6837a1014372556c7dd78d66d9ba9ea9cb931832..b17371185468c7d00295d578d02f93508adba359 100644 (file)
@@ -22,7 +22,6 @@
 #include <linux/highmem.h>
 #include <linux/vmalloc.h>
 #include <linux/ioport.h>
-#include <linux/cpuset.h>
 #include <linux/delay.h>
 #include <linux/migrate.h>
 #include <linux/page-isolation.h>
@@ -190,7 +189,7 @@ static void grow_pgdat_span(struct pglist_data *pgdat, unsigned long start_pfn,
                                        pgdat->node_start_pfn;
 }
 
-static int __add_zone(struct zone *zone, unsigned long phys_start_pfn)
+static int __meminit __add_zone(struct zone *zone, unsigned long phys_start_pfn)
 {
        struct pglist_data *pgdat = zone->zone_pgdat;
        int nr_pages = PAGES_PER_SECTION;
@@ -217,7 +216,7 @@ static int __add_zone(struct zone *zone, unsigned long phys_start_pfn)
        return 0;
 }
 
-static int __add_section(struct zone *zone, unsigned long phys_start_pfn)
+static int __meminit __add_section(struct zone *zone, unsigned long phys_start_pfn)
 {
        int nr_pages = PAGES_PER_SECTION;
        int ret;
@@ -274,7 +273,7 @@ static int __remove_section(struct zone *zone, struct mem_section *ms)
  * call this function after deciding the zone to which to
  * add the new pages.
  */
-int __add_pages(struct zone *zone, unsigned long phys_start_pfn,
+int __ref __add_pages(struct zone *zone, unsigned long phys_start_pfn,
                 unsigned long nr_pages)
 {
        unsigned long i;
@@ -471,7 +470,8 @@ static void rollback_node_hotadd(int nid, pg_data_t *pgdat)
 }
 
 
-int add_memory(int nid, u64 start, u64 size)
+/* we are OK calling __meminit stuff here - we have CONFIG_MEMORY_HOTPLUG */
+int __ref add_memory(int nid, u64 start, u64 size)
 {
        pg_data_t *pgdat = NULL;
        int new_pgdat = 0;
@@ -498,8 +498,6 @@ int add_memory(int nid, u64 start, u64 size)
        /* we online node here. we can't roll back from here. */
        node_set_online(nid);
 
-       cpuset_track_online_nodes();
-
        if (new_pgdat) {
                ret = register_one_node(nid);
                /*
index 385db89f0c33e48a421b8adf63e63b60b0e4881e..037b0967c1e3b40cda18e57a775d61867bafb95f 100644 (file)
@@ -522,15 +522,12 @@ static int writeout(struct address_space *mapping, struct page *page)
        remove_migration_ptes(page, page);
 
        rc = mapping->a_ops->writepage(page, &wbc);
-       if (rc < 0)
-               /* I/O Error writing */
-               return -EIO;
 
        if (rc != AOP_WRITEPAGE_ACTIVATE)
                /* unlocked. Relock */
                lock_page(page);
 
-       return -EAGAIN;
+       return (rc < 0) ? -EIO : -EAGAIN;
 }
 
 /*
@@ -990,25 +987,18 @@ out:
 /*
  * Determine the nodes of an array of pages and store it in an array of status.
  */
-static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages,
-                        const void __user * __user *pages,
-                        int __user *status)
+static void do_pages_stat_array(struct mm_struct *mm, unsigned long nr_pages,
+                               const void __user **pages, int *status)
 {
        unsigned long i;
-       int err;
 
        down_read(&mm->mmap_sem);
 
        for (i = 0; i < nr_pages; i++) {
-               const void __user *p;
-               unsigned long addr;
+               unsigned long addr = (unsigned long)(*pages);
                struct vm_area_struct *vma;
                struct page *page;
-
-               err = -EFAULT;
-               if (get_user(p, pages+i))
-                       goto out;
-               addr = (unsigned long) p;
+               int err = -EFAULT;
 
                vma = find_vma(mm, addr);
                if (!vma)
@@ -1027,12 +1017,52 @@ static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages,
 
                err = page_to_nid(page);
 set_status:
-               put_user(err, status+i);
+               *status = err;
+
+               pages++;
+               status++;
+       }
+
+       up_read(&mm->mmap_sem);
+}
+
+/*
+ * Determine the nodes of a user array of pages and store it in
+ * a user array of status.
+ */
+static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages,
+                        const void __user * __user *pages,
+                        int __user *status)
+{
+#define DO_PAGES_STAT_CHUNK_NR 16
+       const void __user *chunk_pages[DO_PAGES_STAT_CHUNK_NR];
+       int chunk_status[DO_PAGES_STAT_CHUNK_NR];
+       unsigned long i, chunk_nr = DO_PAGES_STAT_CHUNK_NR;
+       int err;
+
+       for (i = 0; i < nr_pages; i += chunk_nr) {
+               if (chunk_nr + i > nr_pages)
+                       chunk_nr = nr_pages - i;
+
+               err = copy_from_user(chunk_pages, &pages[i],
+                                    chunk_nr * sizeof(*chunk_pages));
+               if (err) {
+                       err = -EFAULT;
+                       goto out;
+               }
+
+               do_pages_stat_array(mm, chunk_nr, chunk_pages, chunk_status);
+
+               err = copy_to_user(&status[i], chunk_status,
+                                  chunk_nr * sizeof(*chunk_status));
+               if (err) {
+                       err = -EFAULT;
+                       goto out;
+               }
        }
        err = 0;
 
 out:
-       up_read(&mm->mmap_sem);
        return err;
 }
 
index 008ea70b7afa9a2baed56cdc9b6b43ef0b05a6ff..1ada366570cb535e4a281f7d526829c708f320f3 100644 (file)
@@ -66,14 +66,10 @@ void __clear_page_mlock(struct page *page)
                putback_lru_page(page);
        } else {
                /*
-                * Page not on the LRU yet.  Flush all pagevecs and retry.
+                * We lost the race. the page already moved to evictable list.
                 */
-               lru_add_drain_all();
-               if (!isolate_lru_page(page))
-                       putback_lru_page(page);
-               else if (PageUnevictable(page))
+               if (PageUnevictable(page))
                        count_vm_event(UNEVICTABLE_PGSTRANDED);
-
        }
 }
 
@@ -166,7 +162,7 @@ static long __mlock_vma_pages_range(struct vm_area_struct *vma,
        unsigned long addr = start;
        struct page *pages[16]; /* 16 gives a reasonable batch */
        int nr_pages = (end - start) / PAGE_SIZE;
-       int ret;
+       int ret = 0;
        int gup_flags = 0;
 
        VM_BUG_ON(start & ~PAGE_MASK);
@@ -187,8 +183,6 @@ static long __mlock_vma_pages_range(struct vm_area_struct *vma,
        if (vma->vm_flags & VM_WRITE)
                gup_flags |= GUP_FLAGS_WRITE;
 
-       lru_add_drain_all();    /* push cached pages to LRU */
-
        while (nr_pages > 0) {
                int i;
 
@@ -251,8 +245,6 @@ static long __mlock_vma_pages_range(struct vm_area_struct *vma,
                ret = 0;
        }
 
-       lru_add_drain_all();    /* to update stats */
-
        return ret;     /* count entire vma as locked_vm */
 }
 
@@ -546,6 +538,8 @@ asmlinkage long sys_mlock(unsigned long start, size_t len)
        if (!can_do_mlock())
                return -EPERM;
 
+       lru_add_drain_all();    /* flush pagevec */
+
        down_write(&current->mm->mmap_sem);
        len = PAGE_ALIGN(len + (start & ~PAGE_MASK));
        start &= PAGE_MASK;
@@ -612,6 +606,8 @@ asmlinkage long sys_mlockall(int flags)
        if (!can_do_mlock())
                goto out;
 
+       lru_add_drain_all();    /* flush pagevec */
+
        down_write(&current->mm->mmap_sem);
 
        lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur;
index de14ac21e5b55d647fa732f5a6230ce2e2764824..d4855a682ab622863f85352a5353bd45fa1440e4 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1704,7 +1704,7 @@ find_extend_vma(struct mm_struct *mm, unsigned long addr)
        vma = find_vma_prev(mm, addr, &prev);
        if (vma && (vma->vm_start <= addr))
                return vma;
-       if (expand_stack(prev, addr))
+       if (!prev || expand_stack(prev, addr))
                return NULL;
        if (prev->vm_flags & VM_LOCKED) {
                if (mlock_vma_pages_range(prev, addr, prev->vm_end) < 0)
index 54069e64e3a8a4b0c9a0450aba08b7f0fa21c5f9..d8ac01474563954fed58a1f87e2249c99827c430 100644 (file)
@@ -1561,6 +1561,10 @@ nofail_alloc:
 
        /* We now go into synchronous reclaim */
        cpuset_memory_pressure_bump();
+       /*
+        * The task's cpuset might have expanded its set of allowable nodes
+        */
+       cpuset_update_task_memory_state();
        p->flags |= PF_MEMALLOC;
        reclaim_state.reclaimed_slab = 0;
        p->reclaim_state = &reclaim_state;
index f59d797dc5a9b28ddcb3eae0f0aeeb4bc6e6daad..ab27ff75051958fb992417ddcf675a296b96176e 100644 (file)
@@ -21,7 +21,7 @@ static unsigned long total_usage;
 #if !defined(CONFIG_SPARSEMEM)
 
 
-void __init pgdat_page_cgroup_init(struct pglist_data *pgdat)
+void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
 {
        pgdat->node_page_cgroup = NULL;
 }
@@ -49,6 +49,9 @@ static int __init alloc_node_page_cgroup(int nid)
        start_pfn = NODE_DATA(nid)->node_start_pfn;
        nr_pages = NODE_DATA(nid)->node_spanned_pages;
 
+       if (!nr_pages)
+               return 0;
+
        table_size = sizeof(struct page_cgroup) * nr_pages;
 
        base = __alloc_bootmem_node_nopanic(NODE_DATA(nid),
@@ -97,7 +100,8 @@ struct page_cgroup *lookup_page_cgroup(struct page *page)
        return section->page_cgroup + pfn;
 }
 
-int __meminit init_section_page_cgroup(unsigned long pfn)
+/* __alloc_bootmem...() is protected by !slab_available() */
+int __init_refok init_section_page_cgroup(unsigned long pfn)
 {
        struct mem_section *section;
        struct page_cgroup *base, *pc;
@@ -106,19 +110,29 @@ int __meminit init_section_page_cgroup(unsigned long pfn)
 
        section = __pfn_to_section(pfn);
 
-       if (section->page_cgroup)
-               return 0;
-
-       nid = page_to_nid(pfn_to_page(pfn));
-
-       table_size = sizeof(struct page_cgroup) * PAGES_PER_SECTION;
-       if (slab_is_available()) {
-               base = kmalloc_node(table_size, GFP_KERNEL, nid);
-               if (!base)
-                       base = vmalloc_node(table_size, nid);
-       } else {
-               base = __alloc_bootmem_node_nopanic(NODE_DATA(nid), table_size,
+       if (!section->page_cgroup) {
+               nid = page_to_nid(pfn_to_page(pfn));
+               table_size = sizeof(struct page_cgroup) * PAGES_PER_SECTION;
+               if (slab_is_available()) {
+                       base = kmalloc_node(table_size, GFP_KERNEL, nid);
+                       if (!base)
+                               base = vmalloc_node(table_size, nid);
+               } else {
+                       base = __alloc_bootmem_node_nopanic(NODE_DATA(nid),
+                               table_size,
                                PAGE_SIZE, __pa(MAX_DMA_ADDRESS));
+               }
+       } else {
+               /*
+                * We don't have to allocate page_cgroup again, but
+                * address of memmap may be changed. So, we have to initialize
+                * again.
+                */
+               base = section->page_cgroup + pfn;
+               table_size = 0;
+               /* check address of memmap is changed or not. */
+               if (base->page == pfn_to_page(pfn))
+                       return 0;
        }
 
        if (!base) {
@@ -158,14 +172,14 @@ void __free_page_cgroup(unsigned long pfn)
        }
 }
 
-int online_page_cgroup(unsigned long start_pfn,
+int __meminit online_page_cgroup(unsigned long start_pfn,
                        unsigned long nr_pages,
                        int nid)
 {
        unsigned long start, end, pfn;
        int fail = 0;
 
-       start = start_pfn & (PAGES_PER_SECTION - 1);
+       start = start_pfn & ~(PAGES_PER_SECTION - 1);
        end = ALIGN(start_pfn + nr_pages, PAGES_PER_SECTION);
 
        for (pfn = start; !fail && pfn < end; pfn += PAGES_PER_SECTION) {
@@ -183,12 +197,12 @@ int online_page_cgroup(unsigned long start_pfn,
        return -ENOMEM;
 }
 
-int offline_page_cgroup(unsigned long start_pfn,
+int __meminit offline_page_cgroup(unsigned long start_pfn,
                unsigned long nr_pages, int nid)
 {
        unsigned long start, end, pfn;
 
-       start = start_pfn & (PAGES_PER_SECTION - 1);
+       start = start_pfn & ~(PAGES_PER_SECTION - 1);
        end = ALIGN(start_pfn + nr_pages, PAGES_PER_SECTION);
 
        for (pfn = start; pfn < end; pfn += PAGES_PER_SECTION)
@@ -197,7 +211,7 @@ int offline_page_cgroup(unsigned long start_pfn,
 
 }
 
-static int page_cgroup_callback(struct notifier_block *self,
+static int __meminit page_cgroup_callback(struct notifier_block *self,
                               unsigned long action, void *arg)
 {
        struct memory_notify *mn = arg;
@@ -207,18 +221,23 @@ static int page_cgroup_callback(struct notifier_block *self,
                ret = online_page_cgroup(mn->start_pfn,
                                   mn->nr_pages, mn->status_change_nid);
                break;
-       case MEM_CANCEL_ONLINE:
        case MEM_OFFLINE:
                offline_page_cgroup(mn->start_pfn,
                                mn->nr_pages, mn->status_change_nid);
                break;
+       case MEM_CANCEL_ONLINE:
        case MEM_GOING_OFFLINE:
                break;
        case MEM_ONLINE:
        case MEM_CANCEL_OFFLINE:
                break;
        }
-       ret = notifier_from_errno(ret);
+
+       if (ret)
+               ret = notifier_from_errno(ret);
+       else
+               ret = NOTIFY_OK;
+
        return ret;
 }
 
@@ -248,7 +267,7 @@ void __init page_cgroup_init(void)
        " want\n");
 }
 
-void __init pgdat_page_cgroup_init(struct pglist_data *pgdat)
+void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
 {
        return;
 }
index cb675d1267914dc263100b9c4a9ea5eb20fefa48..bf7e8fc3aed806542e44cc7b1d222d9e2b56dc3a 100644 (file)
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -535,7 +535,7 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
        struct kmem_cache *c;
 
        c = slob_alloc(sizeof(struct kmem_cache),
-               flags, ARCH_KMALLOC_MINALIGN, -1);
+               GFP_KERNEL, ARCH_KMALLOC_MINALIGN, -1);
 
        if (c) {
                c->name = name;
index 7ad489af95614602a2f5fec8756460108a1f6be1..a2cd47d89e0aa1f159d8e9e6ed2dcee32969068f 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2931,8 +2931,10 @@ static int slab_memory_callback(struct notifier_block *self,
        case MEM_CANCEL_OFFLINE:
                break;
        }
-
-       ret = notifier_from_errno(ret);
+       if (ret)
+               ret = notifier_from_errno(ret);
+       else
+               ret = NOTIFY_OK;
        return ret;
 }
 
@@ -3595,7 +3597,7 @@ static int list_locations(struct kmem_cache *s, char *buf,
        for (i = 0; i < t.count; i++) {
                struct location *l = &t.loc[i];
 
-               if (len > PAGE_SIZE - 100)
+               if (len > PAGE_SIZE - KSYM_SYMBOL_LEN - 100)
                        break;
                len += sprintf(buf + len, "%7ld ", l->count);
 
index 39db301b920d18383c8cac57416ad57f8f4976ca..083f5b63e7a8bdb8ab5196e11970691c2bd351d4 100644 (file)
@@ -570,7 +570,7 @@ static void free_section_usemap(struct page *memmap, unsigned long *usemap)
  * set.  If this is <=0, then that means that the passed-in
  * map was not consumed and must be freed.
  */
-int sparse_add_one_section(struct zone *zone, unsigned long start_pfn,
+int __meminit sparse_add_one_section(struct zone *zone, unsigned long start_pfn,
                           int nr_pages)
 {
        unsigned long section_nr = pfn_to_section_nr(start_pfn);
index 2152e48a7b8f0726f06a88c516d82a0becf3c19d..b135ec90cdeb92673e2e97389f7cf9afc3ae80c9 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -299,7 +299,6 @@ void lru_add_drain(void)
        put_cpu();
 }
 
-#if defined(CONFIG_NUMA) || defined(CONFIG_UNEVICTABLE_LRU)
 static void lru_add_drain_per_cpu(struct work_struct *dummy)
 {
        lru_add_drain();
@@ -313,18 +312,6 @@ int lru_add_drain_all(void)
        return schedule_on_each_cpu(lru_add_drain_per_cpu);
 }
 
-#else
-
-/*
- * Returns 0 for success
- */
-int lru_add_drain_all(void)
-{
-       lru_add_drain();
-       return 0;
-}
-#endif
-
 /*
  * Batched page_cache_release().  Decrement the reference count on all the
  * passed pages.  If it fell to zero then remove the page from the LRU and
@@ -445,6 +432,7 @@ void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru)
        for (i = 0; i < pagevec_count(pvec); i++) {
                struct page *page = pvec->pages[i];
                struct zone *pagezone = page_zone(page);
+               int file;
 
                if (pagezone != zone) {
                        if (zone)
@@ -456,8 +444,12 @@ void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru)
                VM_BUG_ON(PageUnevictable(page));
                VM_BUG_ON(PageLRU(page));
                SetPageLRU(page);
-               if (is_active_lru(lru))
+               file = is_file_lru(lru);
+               zone->recent_scanned[file]++;
+               if (is_active_lru(lru)) {
                        SetPageActive(page);
+                       zone->recent_rotated[file]++;
+               }
                add_page_to_lru_list(zone, page, lru);
        }
        if (zone)
index 90cb67a5417cccea9f0352b6316f747bec4c608d..54a9f87e5162ab0a24a00e057be2fcd7f5498022 100644 (file)
@@ -1462,6 +1462,15 @@ static int __init procswaps_init(void)
 __initcall(procswaps_init);
 #endif /* CONFIG_PROC_FS */
 
+#ifdef MAX_SWAPFILES_CHECK
+static int __init max_swapfiles_check(void)
+{
+       MAX_SWAPFILES_CHECK();
+       return 0;
+}
+late_initcall(max_swapfiles_check);
+#endif
+
 /*
  * Written 01/25/92 by Simmule Turner, heavily changed by Linus.
  *
index ba6b0f5f7fac6dcce7a9e8a7c71f00e0e691d193..1ddb77ba3995c2d8f486baf32c1409b3daf8093f 100644 (file)
@@ -77,7 +77,6 @@ static void vunmap_page_range(unsigned long addr, unsigned long end)
 
        BUG_ON(addr >= end);
        pgd = pgd_offset_k(addr);
-       flush_cache_vunmap(addr, end);
        do {
                next = pgd_addr_end(addr, end);
                if (pgd_none_or_clear_bad(pgd))
@@ -324,14 +323,14 @@ static struct vmap_area *alloc_vmap_area(unsigned long size,
 
        BUG_ON(size & ~PAGE_MASK);
 
-       addr = ALIGN(vstart, align);
-
        va = kmalloc_node(sizeof(struct vmap_area),
                        gfp_mask & GFP_RECLAIM_MASK, node);
        if (unlikely(!va))
                return ERR_PTR(-ENOMEM);
 
 retry:
+       addr = ALIGN(vstart, align);
+
        spin_lock(&vmap_area_lock);
        /* XXX: could have a last_hole cache */
        n = vmap_area_root.rb_node;
@@ -362,7 +361,7 @@ retry:
                                goto found;
                }
 
-               while (addr + size >= first->va_start && addr + size <= vend) {
+               while (addr + size > first->va_start && addr + size <= vend) {
                        addr = ALIGN(first->va_end + PAGE_SIZE, align);
 
                        n = rb_next(&first->rb_node);
@@ -521,6 +520,17 @@ static void __purge_vmap_area_lazy(unsigned long *start, unsigned long *end,
        spin_unlock(&purge_lock);
 }
 
+/*
+ * Kick off a purge of the outstanding lazy areas. Don't bother if somebody
+ * is already purging.
+ */
+static void try_purge_vmap_area_lazy(void)
+{
+       unsigned long start = ULONG_MAX, end = 0;
+
+       __purge_vmap_area_lazy(&start, &end, 0, 0);
+}
+
 /*
  * Kick off a purge of the outstanding lazy areas.
  */
@@ -528,18 +538,28 @@ static void purge_vmap_area_lazy(void)
 {
        unsigned long start = ULONG_MAX, end = 0;
 
-       __purge_vmap_area_lazy(&start, &end, 0, 0);
+       __purge_vmap_area_lazy(&start, &end, 1, 0);
 }
 
 /*
- * Free and unmap a vmap area
+ * Free and unmap a vmap area, caller ensuring flush_cache_vunmap had been
+ * called for the correct range previously.
  */
-static void free_unmap_vmap_area(struct vmap_area *va)
+static void free_unmap_vmap_area_noflush(struct vmap_area *va)
 {
        va->flags |= VM_LAZY_FREE;
        atomic_add((va->va_end - va->va_start) >> PAGE_SHIFT, &vmap_lazy_nr);
        if (unlikely(atomic_read(&vmap_lazy_nr) > lazy_max_pages()))
-               purge_vmap_area_lazy();
+               try_purge_vmap_area_lazy();
+}
+
+/*
+ * Free and unmap a vmap area
+ */
+static void free_unmap_vmap_area(struct vmap_area *va)
+{
+       flush_cache_vunmap(va->va_start, va->va_end);
+       free_unmap_vmap_area_noflush(va);
 }
 
 static struct vmap_area *find_vmap_area(unsigned long addr)
@@ -723,7 +743,7 @@ static void free_vmap_block(struct vmap_block *vb)
        spin_unlock(&vmap_block_tree_lock);
        BUG_ON(tmp != vb);
 
-       free_unmap_vmap_area(vb->va);
+       free_unmap_vmap_area_noflush(vb->va);
        call_rcu(&vb->rcu_head, rcu_free_vb);
 }
 
@@ -785,6 +805,9 @@ static void vb_free(const void *addr, unsigned long size)
 
        BUG_ON(size & ~PAGE_MASK);
        BUG_ON(size > PAGE_SIZE*VMAP_MAX_ALLOC);
+
+       flush_cache_vunmap((unsigned long)addr, (unsigned long)addr + size);
+
        order = get_order(size);
 
        offset = (unsigned long)addr & (VMAP_BLOCK_SIZE - 1);
@@ -1694,7 +1717,7 @@ static int s_show(struct seq_file *m, void *p)
                v->addr, v->addr + v->size, v->size);
 
        if (v->caller) {
-               char buff[2 * KSYM_NAME_LEN];
+               char buff[KSYM_SYMBOL_LEN];
 
                seq_putc(m, ' ');
                sprint_symbol(buff, (unsigned long)v->caller);
index 3b5860294bb6654a7b6765a327cef83a9952a29d..62e7f62fb559c7a09b5b15b4d7a0b3a7b5b4c5e5 100644 (file)
@@ -623,6 +623,8 @@ static unsigned long shrink_page_list(struct list_head *page_list,
                 * Try to allocate it some swap space here.
                 */
                if (PageAnon(page) && !PageSwapCache(page)) {
+                       if (!(sc->gfp_mask & __GFP_IO))
+                               goto keep_locked;
                        switch (try_to_munlock(page)) {
                        case SWAP_FAIL:         /* shouldn't happen */
                        case SWAP_AGAIN:
@@ -634,6 +636,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
                        }
                        if (!add_to_swap(page, GFP_ATOMIC))
                                goto activate_locked;
+                       may_enter_fs = 1;
                }
 #endif /* CONFIG_SWAP */
 
@@ -1245,6 +1248,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
                list_add(&page->lru, &l_inactive);
        }
 
+       spin_lock_irq(&zone->lru_lock);
        /*
         * Count referenced pages from currently used mappings as
         * rotated, even though they are moved to the inactive list.
@@ -1260,7 +1264,6 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
 
        pgmoved = 0;
        lru = LRU_BASE + file * LRU_FILE;
-       spin_lock_irq(&zone->lru_lock);
        while (!list_empty(&l_inactive)) {
                page = lru_to_page(&l_inactive);
                prefetchw_prev_lru_page(page, &l_inactive, flags);
@@ -1386,9 +1389,9 @@ static void get_scan_ratio(struct zone *zone, struct scan_control *sc,
        file_prio = 200 - sc->swappiness;
 
        /*
-        *                  anon       recent_rotated[0]
-        * %anon = 100 * ----------- / ----------------- * IO cost
-        *               anon + file      rotate_sum
+        * The amount of pressure on anon vs file pages is inversely
+        * proportional to the fraction of recently scanned pages on
+        * each list that were recently referenced and in active use.
         */
        ap = (anon_prio + 1) * (zone->recent_scanned[0] + 1);
        ap /= zone->recent_rotated[0] + 1;
@@ -2368,39 +2371,6 @@ int page_evictable(struct page *page, struct vm_area_struct *vma)
        return 1;
 }
 
-static void show_page_path(struct page *page)
-{
-       char buf[256];
-       if (page_is_file_cache(page)) {
-               struct address_space *mapping = page->mapping;
-               struct dentry *dentry;
-               pgoff_t pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);
-
-               spin_lock(&mapping->i_mmap_lock);
-               dentry = d_find_alias(mapping->host);
-               printk(KERN_INFO "rescued: %s %lu\n",
-                      dentry_path(dentry, buf, 256), pgoff);
-               spin_unlock(&mapping->i_mmap_lock);
-       } else {
-#if defined(CONFIG_MM_OWNER) && defined(CONFIG_MMU)
-               struct anon_vma *anon_vma;
-               struct vm_area_struct *vma;
-
-               anon_vma = page_lock_anon_vma(page);
-               if (!anon_vma)
-                       return;
-
-               list_for_each_entry(vma, &anon_vma->head, anon_vma_node) {
-                       printk(KERN_INFO "rescued: anon %s\n",
-                              vma->vm_mm->owner->comm);
-                       break;
-               }
-               page_unlock_anon_vma(anon_vma);
-#endif
-       }
-}
-
-
 /**
  * check_move_unevictable_page - check page for evictability and move to appropriate zone lru list
  * @page: page to check evictability and move to appropriate lru list
@@ -2421,8 +2391,6 @@ retry:
        if (page_evictable(page, NULL)) {
                enum lru_list l = LRU_INACTIVE_ANON + page_is_file_cache(page);
 
-               show_page_path(page);
-
                __dec_zone_state(zone, NR_UNEVICTABLE);
                list_move(&page->lru, &zone->lru[l].list);
                __inc_zone_state(zone, NR_INACTIVE_ANON + l);
index c42c0c400bf9a36176ceedcac6a94083016e5b8d..0663f99e977a8af81e1c149d3b193b6b94acb520 100644 (file)
@@ -13,22 +13,24 @@ menuconfig NET_9P
 
          If unsure, say N.
 
+if NET_9P
+
 config NET_9P_VIRTIO
-       depends on NET_9P && EXPERIMENTAL && VIRTIO
+       depends on EXPERIMENTAL && VIRTIO
        tristate "9P Virtio Transport (Experimental)"
        help
          This builds support for a transports between
          guest partitions and a host partition.
 
 config NET_9P_RDMA
-       depends on NET_9P && INFINIBAND && EXPERIMENTAL
+       depends on INET && INFINIBAND && EXPERIMENTAL
        tristate "9P RDMA Transport (Experimental)"
        help
-         This builds support for a RDMA transport.
+         This builds support for an RDMA transport.
 
 config NET_9P_DEBUG
        bool "Debug information"
-       depends on NET_9P
        help
          Say Y if you want the 9P subsystem to log debug information.
 
+endif
index de1e4f2f3a43ea983f9a4eef973618772b69cc82..8fb54dc870b393d61373e308dfa8bec722d591a5 100644 (file)
@@ -293,7 +293,10 @@ static int svc_listen(struct socket *sock,int backlog)
                error = -EINVAL;
                goto out;
        }
-       vcc_insert_socket(sk);
+       if (test_bit(ATM_VF_LISTEN, &vcc->flags)) {
+               error = -EADDRINUSE;
+               goto out;
+        }
        set_bit(ATM_VF_WAITING, &vcc->flags);
        prepare_to_wait(sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE);
        sigd_enq(vcc,as_listen,NULL,NULL,&vcc->local);
@@ -307,6 +310,7 @@ static int svc_listen(struct socket *sock,int backlog)
                goto out;
        }
        set_bit(ATM_VF_LISTEN,&vcc->flags);
+       vcc_insert_socket(sk);
        sk->sk_max_ack_backlog = backlog > 0 ? backlog : ATM_BACKLOG_DEFAULT;
        error = -sk->sk_err;
 out:
index fa5cda4e552ab0088901a2820f4267d31b303030..45f61c348e369c7a78d2fd91d8a14fb1ea75b7e5 100644 (file)
@@ -101,6 +101,18 @@ static inline __be16 pppoe_proto(const struct sk_buff *skb)
         pppoe_proto(skb) == htons(PPP_IPV6) && \
         brnf_filter_pppoe_tagged)
 
+static void fake_update_pmtu(struct dst_entry *dst, u32 mtu)
+{
+}
+
+static struct dst_ops fake_dst_ops = {
+       .family =               AF_INET,
+       .protocol =             __constant_htons(ETH_P_IP),
+       .update_pmtu =          fake_update_pmtu,
+       .entry_size =           sizeof(struct rtable),
+       .entries =              ATOMIC_INIT(0),
+};
+
 /*
  * Initialize bogus route table used to keep netfilter happy.
  * Currently, we fill in the PMTU entry because netfilter
@@ -117,6 +129,7 @@ void br_netfilter_rtable_init(struct net_bridge *br)
        rt->u.dst.path = &rt->u.dst;
        rt->u.dst.metrics[RTAX_MTU - 1] = 1500;
        rt->u.dst.flags = DST_NOXFRM;
+       rt->u.dst.ops = &fake_dst_ops;
 }
 
 static inline struct rtable *bridge_parent_rtable(const struct net_device *dev)
index 7d4d2b3c137ef6b84598d9bebd50b1a69dfaf707..3dadb338addd3ab36212333281ab377362a7e56f 100644 (file)
@@ -319,23 +319,52 @@ static struct dev_rcv_lists *find_dev_rcv_lists(struct net_device *dev)
        return n ? d : NULL;
 }
 
+/**
+ * find_rcv_list - determine optimal filterlist inside device filter struct
+ * @can_id: pointer to CAN identifier of a given can_filter
+ * @mask: pointer to CAN mask of a given can_filter
+ * @d: pointer to the device filter struct
+ *
+ * Description:
+ *  Returns the optimal filterlist to reduce the filter handling in the
+ *  receive path. This function is called by service functions that need
+ *  to register or unregister a can_filter in the filter lists.
+ *
+ *  A filter matches in general, when
+ *
+ *          <received_can_id> & mask == can_id & mask
+ *
+ *  so every bit set in the mask (even CAN_EFF_FLAG, CAN_RTR_FLAG) describe
+ *  relevant bits for the filter.
+ *
+ *  The filter can be inverted (CAN_INV_FILTER bit set in can_id) or it can
+ *  filter for error frames (CAN_ERR_FLAG bit set in mask). For error frames
+ *  there is a special filterlist and a special rx path filter handling.
+ *
+ * Return:
+ *  Pointer to optimal filterlist for the given can_id/mask pair.
+ *  Constistency checked mask.
+ *  Reduced can_id to have a preprocessed filter compare value.
+ */
 static struct hlist_head *find_rcv_list(canid_t *can_id, canid_t *mask,
                                        struct dev_rcv_lists *d)
 {
        canid_t inv = *can_id & CAN_INV_FILTER; /* save flag before masking */
 
-       /* filter error frames */
+       /* filter for error frames in extra filterlist */
        if (*mask & CAN_ERR_FLAG) {
-               /* clear CAN_ERR_FLAG in list entry */
+               /* clear CAN_ERR_FLAG in filter entry */
                *mask &= CAN_ERR_MASK;
                return &d->rx[RX_ERR];
        }
 
-       /* ensure valid values in can_mask */
-       if (*mask & CAN_EFF_FLAG)
-               *mask &= (CAN_EFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG);
-       else
-               *mask &= (CAN_SFF_MASK | CAN_RTR_FLAG);
+       /* with cleared CAN_ERR_FLAG we have a simple mask/value filterpair */
+
+#define CAN_EFF_RTR_FLAGS (CAN_EFF_FLAG | CAN_RTR_FLAG)
+
+       /* ensure valid values in can_mask for 'SFF only' frame filtering */
+       if ((*mask & CAN_EFF_FLAG) && !(*can_id & CAN_EFF_FLAG))
+               *mask &= (CAN_SFF_MASK | CAN_EFF_RTR_FLAGS);
 
        /* reduce condition testing at receive time */
        *can_id &= *mask;
@@ -348,15 +377,19 @@ static struct hlist_head *find_rcv_list(canid_t *can_id, canid_t *mask,
        if (!(*mask))
                return &d->rx[RX_ALL];
 
-       /* use extra filterset for the subscription of exactly *ONE* can_id */
-       if (*can_id & CAN_EFF_FLAG) {
-               if (*mask == (CAN_EFF_MASK | CAN_EFF_FLAG)) {
-                       /* RFC: a use-case for hash-tables in the future? */
-                       return &d->rx[RX_EFF];
+       /* extra filterlists for the subscription of a single non-RTR can_id */
+       if (((*mask & CAN_EFF_RTR_FLAGS) == CAN_EFF_RTR_FLAGS)
+           && !(*can_id & CAN_RTR_FLAG)) {
+
+               if (*can_id & CAN_EFF_FLAG) {
+                       if (*mask == (CAN_EFF_MASK | CAN_EFF_RTR_FLAGS)) {
+                               /* RFC: a future use-case for hash-tables? */
+                               return &d->rx[RX_EFF];
+                       }
+               } else {
+                       if (*mask == (CAN_SFF_MASK | CAN_EFF_RTR_FLAGS))
+                               return &d->rx_sff[*can_id];
                }
-       } else {
-               if (*mask == CAN_SFF_MASK)
-                       return &d->rx_sff[*can_id];
        }
 
        /* default: filter via can_id/can_mask */
@@ -589,7 +622,10 @@ static int can_rcv_filter(struct dev_rcv_lists *d, struct sk_buff *skb)
                }
        }
 
-       /* check CAN_ID specific entries */
+       /* check filterlists for single non-RTR can_ids */
+       if (can_id & CAN_RTR_FLAG)
+               return matches;
+
        if (can_id & CAN_EFF_FLAG) {
                hlist_for_each_entry_rcu(r, n, &d->rx[RX_EFF], list) {
                        if (r->can_id == can_id) {
index d0dd382001e210c052e2fcb1ca6ae304d72b46a1..da0d426c0ce473f53450c65690a7bfe4a3e79f42 100644 (file)
 #define BCM_CAN_DLC_MASK 0x0F /* clean private flags in can_dlc by masking */
 
 /* get best masking value for can_rx_register() for a given single can_id */
-#define REGMASK(id) ((id & CAN_RTR_FLAG) | ((id & CAN_EFF_FLAG) ? \
-                       (CAN_EFF_MASK | CAN_EFF_FLAG) : CAN_SFF_MASK))
+#define REGMASK(id) ((id & CAN_EFF_FLAG) ? \
+                    (CAN_EFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG) : \
+                    (CAN_SFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG))
 
-#define CAN_BCM_VERSION "20080415"
+#define CAN_BCM_VERSION CAN_VERSION
 static __initdata const char banner[] = KERN_INFO
        "can: broadcast manager protocol (rev " CAN_BCM_VERSION ")\n";
 
index 67fb6a3834a3a538221b347c309842cda1816521..a3a2ba0fac08ca49259c94806b23b12acc1a78e9 100644 (file)
@@ -226,14 +226,14 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat
                return 0; /* XXX: return error? check spec. */
        }
 
-       if (level == SOL_SOCKET && type == SO_TIMESTAMP) {
+       if (level == SOL_SOCKET && type == SCM_TIMESTAMP) {
                struct timeval *tv = (struct timeval *)data;
                ctv.tv_sec = tv->tv_sec;
                ctv.tv_usec = tv->tv_usec;
                data = &ctv;
                len = sizeof(ctv);
        }
-       if (level == SOL_SOCKET && type == SO_TIMESTAMPNS) {
+       if (level == SOL_SOCKET && type == SCM_TIMESTAMPNS) {
                struct timespec *ts = (struct timespec *)data;
                cts.tv_sec = ts->tv_sec;
                cts.tv_nsec = ts->tv_nsec;
@@ -725,7 +725,7 @@ EXPORT_SYMBOL(compat_mc_getsockopt);
 static unsigned char nas[19]={AL(0),AL(3),AL(3),AL(3),AL(2),AL(3),
                                AL(3),AL(3),AL(4),AL(4),AL(4),AL(6),
                                AL(6),AL(2),AL(5),AL(5),AL(3),AL(3),
-                               AL(6)};
+                               AL(4)};
 #undef AL
 
 asmlinkage long compat_sys_sendmsg(int fd, struct compat_msghdr __user *msg, unsigned flags)
@@ -738,52 +738,13 @@ asmlinkage long compat_sys_recvmsg(int fd, struct compat_msghdr __user *msg, uns
        return sys_recvmsg(fd, (struct msghdr __user *)msg, flags | MSG_CMSG_COMPAT);
 }
 
-asmlinkage long compat_sys_paccept(int fd, struct sockaddr __user *upeer_sockaddr,
-                                  int __user *upeer_addrlen,
-                                  const compat_sigset_t __user *sigmask,
-                                  compat_size_t sigsetsize, int flags)
-{
-       compat_sigset_t ss32;
-       sigset_t ksigmask, sigsaved;
-       int ret;
-
-       if (sigmask) {
-               if (sigsetsize != sizeof(compat_sigset_t))
-                       return -EINVAL;
-               if (copy_from_user(&ss32, sigmask, sizeof(ss32)))
-                       return -EFAULT;
-               sigset_from_compat(&ksigmask, &ss32);
-
-               sigdelsetmask(&ksigmask, sigmask(SIGKILL)|sigmask(SIGSTOP));
-               sigprocmask(SIG_SETMASK, &ksigmask, &sigsaved);
-       }
-
-       ret = do_accept(fd, upeer_sockaddr, upeer_addrlen, flags);
-
-       if (ret == -ERESTARTNOHAND) {
-               /*
-                * Don't restore the signal mask yet. Let do_signal() deliver
-                * the signal on the way back to userspace, before the signal
-                * mask is restored.
-                */
-               if (sigmask) {
-                       memcpy(&current->saved_sigmask, &sigsaved,
-                              sizeof(sigsaved));
-                       set_restore_sigmask();
-               }
-       } else if (sigmask)
-               sigprocmask(SIG_SETMASK, &sigsaved, NULL);
-
-       return ret;
-}
-
 asmlinkage long compat_sys_socketcall(int call, u32 __user *args)
 {
        int ret;
        u32 a[6];
        u32 a0, a1;
 
-       if (call < SYS_SOCKET || call > SYS_PACCEPT)
+       if (call < SYS_SOCKET || call > SYS_ACCEPT4)
                return -EINVAL;
        if (copy_from_user(a, args, nas[call]))
                return -EFAULT;
@@ -804,7 +765,7 @@ asmlinkage long compat_sys_socketcall(int call, u32 __user *args)
                ret = sys_listen(a0, a1);
                break;
        case SYS_ACCEPT:
-               ret = do_accept(a0, compat_ptr(a1), compat_ptr(a[2]), 0);
+               ret = sys_accept4(a0, compat_ptr(a1), compat_ptr(a[2]), 0);
                break;
        case SYS_GETSOCKNAME:
                ret = sys_getsockname(a0, compat_ptr(a1), compat_ptr(a[2]));
@@ -844,9 +805,8 @@ asmlinkage long compat_sys_socketcall(int call, u32 __user *args)
        case SYS_RECVMSG:
                ret = compat_sys_recvmsg(a0, compat_ptr(a1), a[2]);
                break;
-       case SYS_PACCEPT:
-               ret = compat_sys_paccept(a0, compat_ptr(a1), compat_ptr(a[2]),
-                                        compat_ptr(a[3]), a[4], a[5]);
+       case SYS_ACCEPT4:
+               ret = sys_accept4(a0, compat_ptr(a1), compat_ptr(a[2]), a[3]);
                break;
        default:
                ret = -EINVAL;
index 6c7af390be0a515cfb1d09d2db79f16776e0dbe4..dadac6281f20392d0431d80a9001a6169ab94ca7 100644 (file)
@@ -133,9 +133,11 @@ static int poll_one_napi(struct netpoll_info *npinfo,
 
        npinfo->rx_flags |= NETPOLL_RX_DROP;
        atomic_inc(&trapped);
+       set_bit(NAPI_STATE_NPSVC, &napi->state);
 
        work = napi->poll(napi, budget);
 
+       clear_bit(NAPI_STATE_NPSVC, &napi->state);
        atomic_dec(&trapped);
        npinfo->rx_flags &= ~NETPOLL_RX_DROP;
 
index a47f5bad110dc99ae7218df0a034a72459ef9e31..8997e912aaaf4854b4f3e027e3b2ea496b9d1de3 100644 (file)
@@ -1973,13 +1973,7 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev)
 
        /* make sure that we don't pick a non-existing transmit queue */
        ntxq = pkt_dev->odev->real_num_tx_queues;
-       if (ntxq > num_online_cpus() && (pkt_dev->flags & F_QUEUE_MAP_CPU)) {
-               printk(KERN_WARNING "pktgen: WARNING: QUEUE_MAP_CPU "
-                      "disabled because CPU count (%d) exceeds number "
-                      "of tx queues (%d) on %s\n", num_online_cpus(), ntxq,
-                      pkt_dev->odev->name);
-               pkt_dev->flags &= ~F_QUEUE_MAP_CPU;
-       }
+
        if (ntxq <= pkt_dev->queue_map_min) {
                printk(KERN_WARNING "pktgen: WARNING: Requested "
                       "queue_map_min (zero-based) (%d) exceeds valid range "
@@ -2202,6 +2196,7 @@ static void set_cur_queue_map(struct pktgen_dev *pkt_dev)
                }
                pkt_dev->cur_queue_map = t;
        }
+       pkt_dev->cur_queue_map  = pkt_dev->cur_queue_map % pkt_dev->odev->real_num_tx_queues;
 }
 
 /* Increment/randomize headers according to flags and current values
index 31f29d2989fd207b65229cb562bc6105b79a6ca1..4dfb6b4d4559c9e52addf1c247028061af0bbdd5 100644 (file)
@@ -878,7 +878,9 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm,
                if (ifm->ifi_change)
                        flags = (flags & ifm->ifi_change) |
                                (dev->flags & ~ifm->ifi_change);
-               dev_change_flags(dev, flags);
+               err = dev_change_flags(dev, flags);
+               if (err < 0)
+                       goto errout;
        }
 
        if (tb[IFLA_TXQLEN])
index ab242cc1accaae7673b76784aa5838a76d9b10c4..b12303dd39d9c68df84271963c2b9132fab7b035 100644 (file)
@@ -75,7 +75,6 @@ static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp)
                if (!fpl)
                        return -ENOMEM;
                *fplp = fpl;
-               INIT_LIST_HEAD(&fpl->list);
                fpl->count = 0;
        }
        fpp = &fpl->fp[fpl->count];
@@ -301,7 +300,6 @@ struct scm_fp_list *scm_fp_dup(struct scm_fp_list *fpl)
 
        new_fpl = kmalloc(sizeof(*fpl), GFP_KERNEL);
        if (new_fpl) {
-               INIT_LIST_HEAD(&new_fpl->list);
                for (i=fpl->count-1; i>=0; i--)
                        get_file(fpl->fp[i]);
                memcpy(new_fpl, fpl, sizeof(*fpl));
index d49ef8301b5bd5de20d1b8a6e57aa5144ffff28a..65f7757465bd2ed8b99c2a0934c8e5dc32c73b00 100644 (file)
@@ -149,7 +149,7 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here)
 
 void skb_truesize_bug(struct sk_buff *skb)
 {
-       printk(KERN_ERR "SKB BUG: Invalid truesize (%u) "
+       WARN(net_ratelimit(), KERN_ERR "SKB BUG: Invalid truesize (%u) "
               "len=%u, sizeof(sk_buff)=%Zd\n",
               skb->truesize, skb->len, sizeof(struct sk_buff));
 }
index 5e2a3132a8c934d5aae50f8b359ebf28c6b65d8c..edf7220889a4b75f1e1671c39aeef8c31351387b 100644 (file)
 static struct lock_class_key af_family_keys[AF_MAX];
 static struct lock_class_key af_family_slock_keys[AF_MAX];
 
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
 /*
  * Make lock validator output more readable. (we pre-construct these
  * strings build-time, so that runtime initialization of socket
@@ -187,7 +186,6 @@ static const char *af_family_clock_key_strings[AF_MAX+1] = {
   "clock-AF_RXRPC" , "clock-AF_ISDN"     , "clock-AF_PHONET"   ,
   "clock-AF_MAX"
 };
-#endif
 
 /*
  * sk_callback_lock locking rules are per-address-family,
@@ -2037,9 +2035,6 @@ static inline void release_proto_idx(struct proto *prot)
 
 int proto_register(struct proto *prot, int alloc_slab)
 {
-       char *request_sock_slab_name = NULL;
-       char *timewait_sock_slab_name;
-
        if (alloc_slab) {
                prot->slab = kmem_cache_create(prot->name, prot->obj_size, 0,
                                               SLAB_HWCACHE_ALIGN, NULL);
@@ -2053,12 +2048,12 @@ int proto_register(struct proto *prot, int alloc_slab)
                if (prot->rsk_prot != NULL) {
                        static const char mask[] = "request_sock_%s";
 
-                       request_sock_slab_name = kmalloc(strlen(prot->name) + sizeof(mask) - 1, GFP_KERNEL);
-                       if (request_sock_slab_name == NULL)
+                       prot->rsk_prot->slab_name = kmalloc(strlen(prot->name) + sizeof(mask) - 1, GFP_KERNEL);
+                       if (prot->rsk_prot->slab_name == NULL)
                                goto out_free_sock_slab;
 
-                       sprintf(request_sock_slab_name, mask, prot->name);
-                       prot->rsk_prot->slab = kmem_cache_create(request_sock_slab_name,
+                       sprintf(prot->rsk_prot->slab_name, mask, prot->name);
+                       prot->rsk_prot->slab = kmem_cache_create(prot->rsk_prot->slab_name,
                                                                 prot->rsk_prot->obj_size, 0,
                                                                 SLAB_HWCACHE_ALIGN, NULL);
 
@@ -2072,14 +2067,14 @@ int proto_register(struct proto *prot, int alloc_slab)
                if (prot->twsk_prot != NULL) {
                        static const char mask[] = "tw_sock_%s";
 
-                       timewait_sock_slab_name = kmalloc(strlen(prot->name) + sizeof(mask) - 1, GFP_KERNEL);
+                       prot->twsk_prot->twsk_slab_name = kmalloc(strlen(prot->name) + sizeof(mask) - 1, GFP_KERNEL);
 
-                       if (timewait_sock_slab_name == NULL)
+                       if (prot->twsk_prot->twsk_slab_name == NULL)
                                goto out_free_request_sock_slab;
 
-                       sprintf(timewait_sock_slab_name, mask, prot->name);
+                       sprintf(prot->twsk_prot->twsk_slab_name, mask, prot->name);
                        prot->twsk_prot->twsk_slab =
-                               kmem_cache_create(timewait_sock_slab_name,
+                               kmem_cache_create(prot->twsk_prot->twsk_slab_name,
                                                  prot->twsk_prot->twsk_obj_size,
                                                  0, SLAB_HWCACHE_ALIGN,
                                                  NULL);
@@ -2095,14 +2090,14 @@ int proto_register(struct proto *prot, int alloc_slab)
        return 0;
 
 out_free_timewait_sock_slab_name:
-       kfree(timewait_sock_slab_name);
+       kfree(prot->twsk_prot->twsk_slab_name);
 out_free_request_sock_slab:
        if (prot->rsk_prot && prot->rsk_prot->slab) {
                kmem_cache_destroy(prot->rsk_prot->slab);
                prot->rsk_prot->slab = NULL;
        }
 out_free_request_sock_slab_name:
-       kfree(request_sock_slab_name);
+       kfree(prot->rsk_prot->slab_name);
 out_free_sock_slab:
        kmem_cache_destroy(prot->slab);
        prot->slab = NULL;
@@ -2125,18 +2120,14 @@ void proto_unregister(struct proto *prot)
        }
 
        if (prot->rsk_prot != NULL && prot->rsk_prot->slab != NULL) {
-               const char *name = kmem_cache_name(prot->rsk_prot->slab);
-
                kmem_cache_destroy(prot->rsk_prot->slab);
-               kfree(name);
+               kfree(prot->rsk_prot->slab_name);
                prot->rsk_prot->slab = NULL;
        }
 
        if (prot->twsk_prot != NULL && prot->twsk_prot->twsk_slab != NULL) {
-               const char *name = kmem_cache_name(prot->twsk_prot->twsk_slab);
-
                kmem_cache_destroy(prot->twsk_prot->twsk_slab);
-               kfree(name);
+               kfree(prot->twsk_prot->twsk_slab_name);
                prot->twsk_prot->twsk_slab = NULL;
        }
 }
index 1fbff5fa424101fb463905be71d1cc06299fa74c..1aa2dc9e380ec237c3a4abc8d1e29911bc09dacb 100644 (file)
@@ -1117,6 +1117,7 @@ int inet_sk_rebuild_header(struct sock *sk)
                        },
                },
                .proto = sk->sk_protocol,
+               .flags = inet_sk_flowi_flags(sk),
                .uli_u = {
                        .ports = {
                                .sport = inet->sport,
index 861978a4f1a8b2f92a79baf34318beb808589a64..cfb38ac9d698b933cc64a5cd5dbb42298ba07056 100644 (file)
@@ -209,9 +209,17 @@ static int ip_local_deliver_finish(struct sk_buff *skb)
 
                hash = protocol & (MAX_INET_PROTOS - 1);
                ipprot = rcu_dereference(inet_protos[hash]);
-               if (ipprot != NULL && (net == &init_net || ipprot->netns_ok)) {
+               if (ipprot != NULL) {
                        int ret;
 
+                       if (!net_eq(net, &init_net) && !ipprot->netns_ok) {
+                               if (net_ratelimit())
+                                       printk("%s: proto %d isn't netns-ready\n",
+                                               __func__, protocol);
+                               kfree_skb(skb);
+                               goto out;
+                       }
+
                        if (!ipprot->no_policy) {
                                if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) {
                                        kfree_skb(skb);
index b42e082cc17048ddcdee7103f933c6123c663111..25924b1eb2efd22ae3c70f4d7e4606f7f30771e4 100644 (file)
@@ -1945,13 +1945,14 @@ int __init ip_mr_init(void)
                goto proc_cache_fail;
 #endif
        return 0;
-reg_notif_fail:
-       kmem_cache_destroy(mrt_cachep);
 #ifdef CONFIG_PROC_FS
-proc_vif_fail:
-       unregister_netdevice_notifier(&ip_mr_notifier);
 proc_cache_fail:
        proc_net_remove(&init_net, "ip_mr_vif");
+proc_vif_fail:
+       unregister_netdevice_notifier(&ip_mr_notifier);
 #endif
+reg_notif_fail:
+       del_timer(&ipmr_expire_timer);
+       kmem_cache_destroy(mrt_cachep);
        return err;
 }
index bea54a685109ed3b6fa1fe3f621fb7522ceb2de8..8d489e746b21cb513d0d1b49b3984b514f6e634c 100644 (file)
@@ -61,7 +61,7 @@ static struct
 static struct xt_table nat_table = {
        .name           = "nat",
        .valid_hooks    = NAT_VALID_HOOKS,
-       .lock           = __RW_LOCK_UNLOCKED(__nat_table.lock),
+       .lock           = __RW_LOCK_UNLOCKED(nat_table.lock),
        .me             = THIS_MODULE,
        .af             = AF_INET,
 };
index af99776146ffc14a4f85cb08ceaaea619d7b8a90..937549b8a9212fa6289964bde303367e2f462d74 100644 (file)
@@ -69,9 +69,12 @@ static u32 htcp_cwnd_undo(struct sock *sk)
        const struct tcp_sock *tp = tcp_sk(sk);
        struct htcp *ca = inet_csk_ca(sk);
 
-       ca->last_cong = ca->undo_last_cong;
-       ca->maxRTT = ca->undo_maxRTT;
-       ca->old_maxB = ca->undo_old_maxB;
+       if (ca->undo_last_cong) {
+               ca->last_cong = ca->undo_last_cong;
+               ca->maxRTT = ca->undo_maxRTT;
+               ca->old_maxB = ca->undo_old_maxB;
+               ca->undo_last_cong = 0;
+       }
 
        return max(tp->snd_cwnd, (tp->snd_ssthresh << 7) / ca->beta);
 }
@@ -268,7 +271,10 @@ static void htcp_state(struct sock *sk, u8 new_state)
        case TCP_CA_Open:
                {
                        struct htcp *ca = inet_csk_ca(sk);
-                       ca->last_cong = jiffies;
+                       if (ca->undo_last_cong) {
+                               ca->last_cong = jiffies;
+                               ca->undo_last_cong = 0;
+                       }
                }
                break;
        case TCP_CA_CWR:
index ba85d8831893183b6f72053f5b4952a54cdf0ba5..fe3b4bdfd2516d6cfd5297354b7046bf4c97d8e3 100644 (file)
@@ -1028,10 +1028,6 @@ unsigned int tcp_sync_mss(struct sock *sk, u32 pmtu)
 
 /* Compute the current effective MSS, taking SACKs and IP options,
  * and even PMTU discovery events into account.
- *
- * LARGESEND note: !tcp_urg_mode is overkill, only frames up to snd_up
- * cannot be large. However, taking into account rare use of URG, this
- * is not a big flaw.
  */
 unsigned int tcp_current_mss(struct sock *sk, int large_allowed)
 {
@@ -1046,7 +1042,7 @@ unsigned int tcp_current_mss(struct sock *sk, int large_allowed)
 
        mss_now = tp->mss_cache;
 
-       if (large_allowed && sk_can_gso(sk) && !tcp_urg_mode(tp))
+       if (large_allowed && sk_can_gso(sk))
                doing_tso = 1;
 
        if (dst) {
@@ -1516,6 +1512,10 @@ static int tcp_mtu_probe(struct sock *sk)
  * send_head.  This happens as incoming acks open up the remote
  * window for us.
  *
+ * LARGESEND note: !tcp_urg_mode is overkill, only frames between
+ * snd_up-64k-mss .. snd_up cannot be large. However, taking into
+ * account rare use of URG, this is not a big flaw.
+ *
  * Returns 1, if no segments are in flight and we have queued segments, but
  * cannot send anything now because of SWS or another problem.
  */
@@ -1567,7 +1567,7 @@ static int tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle)
                }
 
                limit = mss_now;
-               if (tso_segs > 1)
+               if (tso_segs > 1 && !tcp_urg_mode(tp))
                        limit = tcp_mss_split_point(sk, skb, mss_now,
                                                    cwnd_quota);
 
@@ -1616,6 +1616,7 @@ void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss,
  */
 void tcp_push_one(struct sock *sk, unsigned int mss_now)
 {
+       struct tcp_sock *tp = tcp_sk(sk);
        struct sk_buff *skb = tcp_send_head(sk);
        unsigned int tso_segs, cwnd_quota;
 
@@ -1630,7 +1631,7 @@ void tcp_push_one(struct sock *sk, unsigned int mss_now)
                BUG_ON(!tso_segs);
 
                limit = mss_now;
-               if (tso_segs > 1)
+               if (tso_segs > 1 && !tcp_urg_mode(tp))
                        limit = tcp_mss_split_point(sk, skb, mss_now,
                                                    cwnd_quota);
 
index 14504dada1166d57f36f3f603c5fbe5fbd0bfc95..a453aac91bd3b740ef44363ef10e5be5390bf6dc 100644 (file)
 
 #include "tcp_vegas.h"
 
-/* Default values of the Vegas variables, in fixed-point representation
- * with V_PARAM_SHIFT bits to the right of the binary point.
- */
-#define V_PARAM_SHIFT 1
-static int alpha = 2<<V_PARAM_SHIFT;
-static int beta  = 4<<V_PARAM_SHIFT;
-static int gamma = 1<<V_PARAM_SHIFT;
+static int alpha = 2;
+static int beta  = 4;
+static int gamma = 1;
 
 module_param(alpha, int, 0644);
-MODULE_PARM_DESC(alpha, "lower bound of packets in network (scale by 2)");
+MODULE_PARM_DESC(alpha, "lower bound of packets in network");
 module_param(beta, int, 0644);
-MODULE_PARM_DESC(beta, "upper bound of packets in network (scale by 2)");
+MODULE_PARM_DESC(beta, "upper bound of packets in network");
 module_param(gamma, int, 0644);
 MODULE_PARM_DESC(gamma, "limit on increase (scale by 2)");
 
@@ -172,49 +168,13 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
                return;
        }
 
-       /* The key players are v_beg_snd_una and v_beg_snd_nxt.
-        *
-        * These are so named because they represent the approximate values
-        * of snd_una and snd_nxt at the beginning of the current RTT. More
-        * precisely, they represent the amount of data sent during the RTT.
-        * At the end of the RTT, when we receive an ACK for v_beg_snd_nxt,
-        * we will calculate that (v_beg_snd_nxt - v_beg_snd_una) outstanding
-        * bytes of data have been ACKed during the course of the RTT, giving
-        * an "actual" rate of:
-        *
-        *     (v_beg_snd_nxt - v_beg_snd_una) / (rtt duration)
-        *
-        * Unfortunately, v_beg_snd_una is not exactly equal to snd_una,
-        * because delayed ACKs can cover more than one segment, so they
-        * don't line up nicely with the boundaries of RTTs.
-        *
-        * Another unfortunate fact of life is that delayed ACKs delay the
-        * advance of the left edge of our send window, so that the number
-        * of bytes we send in an RTT is often less than our cwnd will allow.
-        * So we keep track of our cwnd separately, in v_beg_snd_cwnd.
-        */
-
        if (after(ack, vegas->beg_snd_nxt)) {
                /* Do the Vegas once-per-RTT cwnd adjustment. */
-               u32 old_wnd, old_snd_cwnd;
-
-
-               /* Here old_wnd is essentially the window of data that was
-                * sent during the previous RTT, and has all
-                * been acknowledged in the course of the RTT that ended
-                * with the ACK we just received. Likewise, old_snd_cwnd
-                * is the cwnd during the previous RTT.
-                */
-               old_wnd = (vegas->beg_snd_nxt - vegas->beg_snd_una) /
-                       tp->mss_cache;
-               old_snd_cwnd = vegas->beg_snd_cwnd;
 
                /* Save the extent of the current window so we can use this
                 * at the end of the next RTT.
                 */
-               vegas->beg_snd_una  = vegas->beg_snd_nxt;
                vegas->beg_snd_nxt  = tp->snd_nxt;
-               vegas->beg_snd_cwnd = tp->snd_cwnd;
 
                /* We do the Vegas calculations only if we got enough RTT
                 * samples that we can be reasonably sure that we got
@@ -252,22 +212,14 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
                         *
                         * This is:
                         *     (actual rate in segments) * baseRTT
-                        * We keep it as a fixed point number with
-                        * V_PARAM_SHIFT bits to the right of the binary point.
                         */
-                       target_cwnd = ((u64)old_wnd * vegas->baseRTT);
-                       target_cwnd <<= V_PARAM_SHIFT;
-                       do_div(target_cwnd, rtt);
+                       target_cwnd = tp->snd_cwnd * vegas->baseRTT / rtt;
 
                        /* Calculate the difference between the window we had,
                         * and the window we would like to have. This quantity
                         * is the "Diff" from the Arizona Vegas papers.
-                        *
-                        * Again, this is a fixed point number with
-                        * V_PARAM_SHIFT bits to the right of the binary
-                        * point.
                         */
-                       diff = (old_wnd << V_PARAM_SHIFT) - target_cwnd;
+                       diff = tp->snd_cwnd * (rtt-vegas->baseRTT) / vegas->baseRTT;
 
                        if (diff > gamma && tp->snd_ssthresh > 2 ) {
                                /* Going too fast. Time to slow down
@@ -282,16 +234,13 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
                                 * truncation robs us of full link
                                 * utilization.
                                 */
-                               tp->snd_cwnd = min(tp->snd_cwnd,
-                                                  ((u32)target_cwnd >>
-                                                   V_PARAM_SHIFT)+1);
+                               tp->snd_cwnd = min(tp->snd_cwnd, (u32)target_cwnd+1);
 
                        } else if (tp->snd_cwnd <= tp->snd_ssthresh) {
                                /* Slow start.  */
                                tcp_slow_start(tp);
                        } else {
                                /* Congestion avoidance. */
-                               u32 next_snd_cwnd;
 
                                /* Figure out where we would like cwnd
                                 * to be.
@@ -300,32 +249,25 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
                                        /* The old window was too fast, so
                                         * we slow down.
                                         */
-                                       next_snd_cwnd = old_snd_cwnd - 1;
+                                       tp->snd_cwnd--;
                                } else if (diff < alpha) {
                                        /* We don't have enough extra packets
                                         * in the network, so speed up.
                                         */
-                                       next_snd_cwnd = old_snd_cwnd + 1;
+                                       tp->snd_cwnd++;
                                } else {
                                        /* Sending just as fast as we
                                         * should be.
                                         */
-                                       next_snd_cwnd = old_snd_cwnd;
                                }
-
-                               /* Adjust cwnd upward or downward, toward the
-                                * desired value.
-                                */
-                               if (next_snd_cwnd > tp->snd_cwnd)
-                                       tp->snd_cwnd++;
-                               else if (next_snd_cwnd < tp->snd_cwnd)
-                                       tp->snd_cwnd--;
                        }
 
                        if (tp->snd_cwnd < 2)
                                tp->snd_cwnd = 2;
                        else if (tp->snd_cwnd > tp->snd_cwnd_clamp)
                                tp->snd_cwnd = tp->snd_cwnd_clamp;
+
+                       tp->snd_ssthresh = tcp_current_ssthresh(sk);
                }
 
                /* Wipe the slate clean for the next RTT. */
index cf02701ced48091d9eecb6765fe80934a3dc73c8..98c1fd09be88c352c29b9f2229cd81fd695f4460 100644 (file)
@@ -633,6 +633,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
                                                .saddr = saddr,
                                                .tos = tos } },
                                    .proto = sk->sk_protocol,
+                                   .flags = inet_sk_flowi_flags(sk),
                                    .uli_u = { .ports =
                                               { .sport = inet->sport,
                                                 .dport = dport } } };
index 410046a8cc915f5ea2f56a4c7b6c105f58d1903d..e44deb8d4df28c54cfd90392c63647fc88b591fc 100644 (file)
@@ -661,6 +661,11 @@ int datagram_send_ctl(struct net *net,
                        switch (rthdr->type) {
 #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
                        case IPV6_SRCRT_TYPE_2:
+                               if (rthdr->hdrlen != 2 ||
+                                   rthdr->segments_left != 1) {
+                                       err = -EINVAL;
+                                       goto exit_f;
+                               }
                                break;
 #endif
                        default:
index 52a7eb0e2c2c0e8fb65b2136828c0f827da7b360..0524769632e7f0593e8e17d0c575793aa5ebce66 100644 (file)
@@ -224,7 +224,7 @@ static struct file_operations ip6mr_vif_fops = {
        .open    = ip6mr_vif_open,
        .read    = seq_read,
        .llseek  = seq_lseek,
-       .release = seq_release,
+       .release = seq_release_private,
 };
 
 static void *ipmr_mfc_seq_start(struct seq_file *seq, loff_t *pos)
@@ -338,7 +338,7 @@ static struct file_operations ip6mr_mfc_fops = {
        .open    = ipmr_mfc_open,
        .read    = seq_read,
        .llseek  = seq_lseek,
-       .release = seq_release,
+       .release = seq_release_private,
 };
 #endif
 
index 4e5eac301f91835a9bebb5b77a1c5a48c8cd9023..2aa294be0c790043bbc148a71ce030e4e5fbcc4c 100644 (file)
@@ -366,11 +366,16 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
                }
 
                /* routing header option needs extra check */
+               retv = -EINVAL;
                if (optname == IPV6_RTHDR && opt && opt->srcrt) {
                        struct ipv6_rt_hdr *rthdr = opt->srcrt;
                        switch (rthdr->type) {
 #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
                        case IPV6_SRCRT_TYPE_2:
+                               if (rthdr->hdrlen != 2 ||
+                                   rthdr->segments_left != 1)
+                                       goto sticky_done;
+
                                break;
 #endif
                        default:
index 172438320eec74287b045cd6b784bb3de0b38b0f..d0f54d18e19b92de1407eb9a36fed5344363d01d 100644 (file)
@@ -912,8 +912,13 @@ static void ndisc_recv_na(struct sk_buff *skb)
                   is invalid, but ndisc specs say nothing
                   about it. It could be misconfiguration, or
                   an smart proxy agent tries to help us :-)
+
+                  We should not print the error if NA has been
+                  received from loopback - it is just our own
+                  unsolicited advertisement.
                 */
-               ND_PRINTK1(KERN_WARNING
+               if (skb->pkt_type != PACKET_LOOPBACK)
+                       ND_PRINTK1(KERN_WARNING
                           "ICMPv6 NA: someone advertises our address on %s!\n",
                           ifp->idev->dev->name);
                in6_ifa_put(ifp);
index 07f0b76e74270317a747dbe8ee77e86b3a9b1838..97c17fdd6f755958f8de47159cf47f7df25ab0ab 100644 (file)
@@ -132,7 +132,7 @@ static struct snmp_mib snmp6_udplite6_list[] = {
 
 static void snmp6_seq_show_icmpv6msg(struct seq_file *seq, void **mib)
 {
-       static char name[32];
+       char name[32];
        int i;
 
        /* print by name -- deprecated items */
@@ -144,7 +144,7 @@ static void snmp6_seq_show_icmpv6msg(struct seq_file *seq, void **mib)
                p = icmp6type2name[icmptype];
                if (!p) /* don't print un-named types here */
                        continue;
-               (void) snprintf(name, sizeof(name)-1, "Icmp6%s%s",
+               snprintf(name, sizeof(name), "Icmp6%s%s",
                        i & 0x100 ? "Out" : "In", p);
                seq_printf(seq, "%-32s\t%lu\n", name,
                        snmp_fold_field(mib, i));
@@ -157,7 +157,7 @@ static void snmp6_seq_show_icmpv6msg(struct seq_file *seq, void **mib)
                val = snmp_fold_field(mib, i);
                if (!val)
                        continue;
-               (void) snprintf(name, sizeof(name)-1, "Icmp6%sType%u",
+               snprintf(name, sizeof(name), "Icmp6%sType%u",
                        i & 0x100 ?  "Out" : "In", i & 0xff);
                seq_printf(seq, "%-32s\t%lu\n", name, val);
        }
index 87665d7bb4f9aa0bad666295914edca3dfefa701..409bb771623671c8274fd0e25683665b13e53fdd 100644 (file)
@@ -2560,25 +2560,3 @@ void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local)
                ieee80211_restart_sta_timer(sdata);
        rcu_read_unlock();
 }
-
-/* driver notification call */
-void ieee80211_notify_mac(struct ieee80211_hw *hw,
-                         enum ieee80211_notification_types  notif_type)
-{
-       struct ieee80211_local *local = hw_to_local(hw);
-       struct ieee80211_sub_if_data *sdata;
-
-       switch (notif_type) {
-       case IEEE80211_NOTIFY_RE_ASSOC:
-               rcu_read_lock();
-               list_for_each_entry_rcu(sdata, &local->interfaces, list) {
-                       if (sdata->vif.type != NL80211_IFTYPE_STATION)
-                               continue;
-
-                       ieee80211_sta_req_auth(sdata, &sdata->u.sta);
-               }
-               rcu_read_unlock();
-               break;
-       }
-}
-EXPORT_SYMBOL(ieee80211_notify_mac);
index 7fef8ea1f5ecf53eaf5b1596479ef1d8a834b348..d254446b85b59d76bf3d940fce4364270a2d5bb0 100644 (file)
@@ -99,7 +99,7 @@ struct sta_info *sta_info_get(struct ieee80211_local *local, const u8 *addr)
 
        sta = rcu_dereference(local->sta_hash[STA_HASH(addr)]);
        while (sta) {
-               if (compare_ether_addr(sta->sta.addr, addr) == 0)
+               if (memcmp(sta->sta.addr, addr, ETH_ALEN) == 0)
                        break;
                sta = rcu_dereference(sta->hnext);
        }
index 742f811ca416e5b16701ce2ae49f582ed32317a6..ab4ddba874be5ce73cb4ffc0b5e7e1da77053dac 100644 (file)
@@ -271,6 +271,7 @@ static int ieee80211_ioctl_siwmode(struct net_device *dev,
                                   __u32 *mode, char *extra)
 {
        struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+       struct ieee80211_local *local = sdata->local;
        int type;
 
        if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
@@ -281,6 +282,13 @@ static int ieee80211_ioctl_siwmode(struct net_device *dev,
                type = NL80211_IFTYPE_STATION;
                break;
        case IW_MODE_ADHOC:
+               /* Setting ad-hoc mode on non ibss channel is not
+                * supported.
+                */
+               if (local->oper_channel &&
+                   (local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS))
+                       return -EOPNOTSUPP;
+
                type = NL80211_IFTYPE_ADHOC;
                break;
        case IW_MODE_REPEAT:
index 622d7c671cb78533082f9bf0b655a3bbffcd2f92..233fdd2d7d2186b03fd6bac169d4090dbab562a3 100644 (file)
@@ -305,9 +305,7 @@ void nf_conntrack_hash_insert(struct nf_conn *ct)
        hash = hash_conntrack(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple);
        repl_hash = hash_conntrack(&ct->tuplehash[IP_CT_DIR_REPLY].tuple);
 
-       spin_lock_bh(&nf_conntrack_lock);
        __nf_conntrack_hash_insert(ct, hash, repl_hash);
-       spin_unlock_bh(&nf_conntrack_lock);
 }
 EXPORT_SYMBOL_GPL(nf_conntrack_hash_insert);
 
index a040d46f85d6c8967f88af6c549f23206e6416c7..5f4a6516b3b6b6f935e677f774c22de1c038dccb 100644 (file)
@@ -1090,7 +1090,7 @@ ctnetlink_create_conntrack(struct nlattr *cda[],
        struct nf_conn_help *help;
        struct nf_conntrack_helper *helper;
 
-       ct = nf_conntrack_alloc(&init_net, otuple, rtuple, GFP_KERNEL);
+       ct = nf_conntrack_alloc(&init_net, otuple, rtuple, GFP_ATOMIC);
        if (ct == NULL || IS_ERR(ct))
                return -ENOMEM;
 
@@ -1138,7 +1138,7 @@ ctnetlink_create_conntrack(struct nlattr *cda[],
                }
        }
 
-       nf_ct_acct_ext_add(ct, GFP_KERNEL);
+       nf_ct_acct_ext_add(ct, GFP_ATOMIC);
 
 #if defined(CONFIG_NF_CONNTRACK_MARK)
        if (cda[CTA_MARK])
@@ -1212,13 +1212,14 @@ ctnetlink_new_conntrack(struct sock *ctnl, struct sk_buff *skb,
                        atomic_inc(&master_ct->ct_general.use);
                }
 
-               spin_unlock_bh(&nf_conntrack_lock);
                err = -ENOENT;
                if (nlh->nlmsg_flags & NLM_F_CREATE)
                        err = ctnetlink_create_conntrack(cda,
                                                         &otuple,
                                                         &rtuple,
                                                         master_ct);
+               spin_unlock_bh(&nf_conntrack_lock);
+
                if (err < 0 && master_ct)
                        nf_ct_put(master_ct);
 
index 02a8fed210820879d5b6026041626c7816cc5612..1acc089be7e94b6e8570d9529895402d3e5a75df 100644 (file)
@@ -141,7 +141,7 @@ socket_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        sk = nf_tproxy_get_sock_v4(dev_net(skb->dev), protocol,
                                   saddr, daddr, sport, dport, par->in, false);
        if (sk != NULL) {
-               bool wildcard = (inet_sk(sk)->rcv_saddr == 0);
+               bool wildcard = (sk->sk_state != TCP_TIME_WAIT && inet_sk(sk)->rcv_saddr == 0);
 
                nf_tproxy_put_sock(sk);
                if (wildcard)
index e8a5c32b0f106042c82790c2e1c924837bfe0b64..8c03080321784fe7fee76ec1ea2ebd3d85187765 100644 (file)
@@ -562,7 +562,6 @@ static int netlbl_unlhsh_remove_addr4(struct net *net,
                                      const struct in_addr *mask,
                                      struct netlbl_audit *audit_info)
 {
-       int ret_val = 0;
        struct netlbl_af4list *list_entry;
        struct netlbl_unlhsh_addr4 *entry;
        struct audit_buffer *audit_buf;
@@ -574,9 +573,10 @@ static int netlbl_unlhsh_remove_addr4(struct net *net,
        list_entry = netlbl_af4list_remove(addr->s_addr, mask->s_addr,
                                           &iface->addr4_list);
        spin_unlock(&netlbl_unlhsh_lock);
-       if (list_entry == NULL)
-               ret_val = -ENOENT;
-       entry = netlbl_unlhsh_addr4_entry(list_entry);
+       if (list_entry != NULL)
+               entry = netlbl_unlhsh_addr4_entry(list_entry);
+       else
+               entry = NULL;
 
        audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL,
                                              audit_info);
@@ -587,19 +587,21 @@ static int netlbl_unlhsh_remove_addr4(struct net *net,
                                          addr->s_addr, mask->s_addr);
                if (dev != NULL)
                        dev_put(dev);
-               if (entry && security_secid_to_secctx(entry->secid,
-                                                     &secctx,
-                                                     &secctx_len) == 0) {
+               if (entry != NULL &&
+                   security_secid_to_secctx(entry->secid,
+                                            &secctx, &secctx_len) == 0) {
                        audit_log_format(audit_buf, " sec_obj=%s", secctx);
                        security_release_secctx(secctx, secctx_len);
                }
-               audit_log_format(audit_buf, " res=%u", ret_val == 0 ? 1 : 0);
+               audit_log_format(audit_buf, " res=%u", entry != NULL ? 1 : 0);
                audit_log_end(audit_buf);
        }
 
-       if (ret_val == 0)
-               call_rcu(&entry->rcu, netlbl_unlhsh_free_addr4);
-       return ret_val;
+       if (entry == NULL)
+               return -ENOENT;
+
+       call_rcu(&entry->rcu, netlbl_unlhsh_free_addr4);
+       return 0;
 }
 
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
@@ -623,7 +625,6 @@ static int netlbl_unlhsh_remove_addr6(struct net *net,
                                      const struct in6_addr *mask,
                                      struct netlbl_audit *audit_info)
 {
-       int ret_val = 0;
        struct netlbl_af6list *list_entry;
        struct netlbl_unlhsh_addr6 *entry;
        struct audit_buffer *audit_buf;
@@ -634,9 +635,10 @@ static int netlbl_unlhsh_remove_addr6(struct net *net,
        spin_lock(&netlbl_unlhsh_lock);
        list_entry = netlbl_af6list_remove(addr, mask, &iface->addr6_list);
        spin_unlock(&netlbl_unlhsh_lock);
-       if (list_entry == NULL)
-               ret_val = -ENOENT;
-       entry = netlbl_unlhsh_addr6_entry(list_entry);
+       if (list_entry != NULL)
+               entry = netlbl_unlhsh_addr6_entry(list_entry);
+       else
+               entry = NULL;
 
        audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL,
                                              audit_info);
@@ -647,19 +649,21 @@ static int netlbl_unlhsh_remove_addr6(struct net *net,
                                          addr, mask);
                if (dev != NULL)
                        dev_put(dev);
-               if (entry && security_secid_to_secctx(entry->secid,
-                                                     &secctx,
-                                                     &secctx_len) == 0) {
+               if (entry != NULL &&
+                   security_secid_to_secctx(entry->secid,
+                                            &secctx, &secctx_len) == 0) {
                        audit_log_format(audit_buf, " sec_obj=%s", secctx);
                        security_release_secctx(secctx, secctx_len);
                }
-               audit_log_format(audit_buf, " res=%u", ret_val == 0 ? 1 : 0);
+               audit_log_format(audit_buf, " res=%u", entry != NULL ? 1 : 0);
                audit_log_end(audit_buf);
        }
 
-       if (ret_val == 0)
-               call_rcu(&entry->rcu, netlbl_unlhsh_free_addr6);
-       return ret_val;
+       if (entry == NULL)
+               return -ENOENT;
+
+       call_rcu(&entry->rcu, netlbl_unlhsh_free_addr6);
+       return 0;
 }
 #endif /* IPv6 */
 
index defeb7a0d502ab92dcc7253f0f97e10ae341209e..9d211f12582ba90882ae9f272a6896b716d83af4 100644 (file)
 #include <net/phonet/phonet.h>
 #include <net/phonet/pn_dev.h>
 
-static struct net_proto_family phonet_proto_family;
-static struct phonet_protocol *phonet_proto_get(int protocol);
-static inline void phonet_proto_put(struct phonet_protocol *pp);
+/* Transport protocol registration */
+static struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly;
+static DEFINE_SPINLOCK(proto_tab_lock);
+
+static struct phonet_protocol *phonet_proto_get(int protocol)
+{
+       struct phonet_protocol *pp;
+
+       if (protocol >= PHONET_NPROTO)
+               return NULL;
+
+       spin_lock(&proto_tab_lock);
+       pp = proto_tab[protocol];
+       if (pp && !try_module_get(pp->prot->owner))
+               pp = NULL;
+       spin_unlock(&proto_tab_lock);
+
+       return pp;
+}
+
+static inline void phonet_proto_put(struct phonet_protocol *pp)
+{
+       module_put(pp->prot->owner);
+}
 
 /* protocol family functions */
 
@@ -144,8 +165,8 @@ static int pn_send(struct sk_buff *skb, struct net_device *dev,
        struct phonethdr *ph;
        int err;
 
-       if (skb->len + 2 > 0xffff) {
-               /* Phonet length field would overflow */
+       if (skb->len + 2 > 0xffff /* Phonet length field limit */ ||
+           skb->len + sizeof(struct phonethdr) > dev->mtu) {
                err = -EMSGSIZE;
                goto drop;
        }
@@ -375,10 +396,6 @@ static struct packet_type phonet_packet_type = {
        .func = phonet_rcv,
 };
 
-/* Transport protocol registration */
-static struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly;
-static DEFINE_SPINLOCK(proto_tab_lock);
-
 int __init_or_module phonet_proto_register(int protocol,
                                                struct phonet_protocol *pp)
 {
@@ -412,27 +429,6 @@ void phonet_proto_unregister(int protocol, struct phonet_protocol *pp)
 }
 EXPORT_SYMBOL(phonet_proto_unregister);
 
-static struct phonet_protocol *phonet_proto_get(int protocol)
-{
-       struct phonet_protocol *pp;
-
-       if (protocol >= PHONET_NPROTO)
-               return NULL;
-
-       spin_lock(&proto_tab_lock);
-       pp = proto_tab[protocol];
-       if (pp && !try_module_get(pp->prot->owner))
-               pp = NULL;
-       spin_unlock(&proto_tab_lock);
-
-       return pp;
-}
-
-static inline void phonet_proto_put(struct phonet_protocol *pp)
-{
-       module_put(pp->prot->owner);
-}
-
 /* Module registration */
 static int __init phonet_init(void)
 {
index 9978afbd9f2ad5033375df896358f88b929ecfcc..803eeef0aa856877ddced0e45fc283f4641da2ab 100644 (file)
@@ -155,12 +155,13 @@ static void gprs_data_ready(struct sock *sk, int len)
 static void gprs_write_space(struct sock *sk)
 {
        struct gprs_dev *dev = sk->sk_user_data;
+       struct net_device *net = dev->net;
        unsigned credits = pep_writeable(sk);
 
        spin_lock_bh(&dev->tx_lock);
        dev->tx_max = credits;
-       if (credits > skb_queue_len(&dev->tx_queue))
-               netif_wake_queue(dev->net);
+       if (credits > skb_queue_len(&dev->tx_queue) && netif_running(net))
+               netif_wake_queue(net);
        spin_unlock_bh(&dev->tx_lock);
 }
 
@@ -168,6 +169,23 @@ static void gprs_write_space(struct sock *sk)
  * Network device callbacks
  */
 
+static int gprs_open(struct net_device *dev)
+{
+       struct gprs_dev *gp = netdev_priv(dev);
+
+       gprs_write_space(gp->sk);
+       return 0;
+}
+
+static int gprs_close(struct net_device *dev)
+{
+       struct gprs_dev *gp = netdev_priv(dev);
+
+       netif_stop_queue(dev);
+       flush_work(&gp->tx_work);
+       return 0;
+}
+
 static int gprs_xmit(struct sk_buff *skb, struct net_device *net)
 {
        struct gprs_dev *dev = netdev_priv(net);
@@ -254,6 +272,8 @@ static void gprs_setup(struct net_device *net)
        net->tx_queue_len       = 10;
 
        net->destructor         = free_netdev;
+       net->open               = gprs_open;
+       net->stop               = gprs_close;
        net->hard_start_xmit    = gprs_xmit; /* mandatory */
        net->change_mtu         = gprs_set_mtu;
        net->get_stats          = gprs_get_stats;
@@ -318,7 +338,6 @@ int gprs_attach(struct sock *sk)
        dev->sk = sk;
 
        printk(KERN_DEBUG"%s: attached\n", net->name);
-       gprs_write_space(sk); /* kick off TX */
        return net->ifindex;
 
 out_rel:
@@ -341,7 +360,5 @@ void gprs_detach(struct sock *sk)
 
        printk(KERN_DEBUG"%s: detached\n", net->name);
        unregister_netdev(net);
-       flush_scheduled_work();
        sock_put(sk);
-       skb_queue_purge(&dev->tx_queue);
 }
index 53be9fc82aaadb2a0aa588974b13d603491ee0b0..f93ff8ef47d0f8d47635af976c4fab46b8fcd1ce 100644 (file)
@@ -115,7 +115,7 @@ int phonet_address_del(struct net_device *dev, u8 addr)
        pnd = __phonet_get(dev);
        if (!pnd || !test_and_clear_bit(addr >> 2, pnd->addrs))
                err = -EADDRNOTAVAIL;
-       if (bitmap_empty(pnd->addrs, 64))
+       else if (bitmap_empty(pnd->addrs, 64))
                __phonet_device_free(pnd);
        spin_unlock_bh(&pndevs.lock);
        return err;
index b1770d66bc8d68fc3c9ede8fd2408f813994dd93..242fe8f8c322d5fb048d737a46d36b99797f47aa 100644 (file)
@@ -123,6 +123,7 @@ nla_put_failure:
 
 static int getaddr_dumpit(struct sk_buff *skb, struct netlink_callback *cb)
 {
+       struct net *net = sock_net(skb->sk);
        struct phonet_device *pnd;
        int dev_idx = 0, dev_start_idx = cb->args[0];
        int addr_idx = 0, addr_start_idx = cb->args[1];
@@ -131,6 +132,8 @@ static int getaddr_dumpit(struct sk_buff *skb, struct netlink_callback *cb)
        list_for_each_entry(pnd, &pndevs.list, list) {
                u8 addr;
 
+               if (!net_eq(dev_net(pnd->netdev), net))
+                       continue;
                if (dev_idx > dev_start_idx)
                        addr_start_idx = 0;
                if (dev_idx++ < dev_start_idx)
index a7f1ce11bc22d140d52526c11816973d05683729..0c1cc76128006e81d39b663f994de9e78f8539f5 100644 (file)
@@ -1072,6 +1072,10 @@ static int rose_sendmsg(struct kiocb *iocb, struct socket *sock,
        unsigned char *asmptr;
        int n, size, qbit = 0;
 
+       /* ROSE empty frame has no meaning : don't send */
+       if (len == 0)
+               return 0;
+
        if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT))
                return -EINVAL;
 
@@ -1265,6 +1269,12 @@ static int rose_recvmsg(struct kiocb *iocb, struct socket *sock,
        skb_reset_transport_header(skb);
        copied     = skb->len;
 
+       /* ROSE empty frame has no meaning : ignore it */
+       if (copied == 0) {
+               skb_free_datagram(sk, skb);
+               return copied;
+       }
+
        if (copied > size) {
                copied = size;
                msg->msg_flags |= MSG_TRUNC;
index b16ad2972c6b527dc2013a5dfb4108ad35ef8197..6ab4a2f92ca0b390849547e8e93f99b07e6d4a6b 100644 (file)
@@ -417,6 +417,8 @@ static int qdisc_dump_stab(struct sk_buff *skb, struct qdisc_size_table *stab)
        struct nlattr *nest;
 
        nest = nla_nest_start(skb, TCA_STAB);
+       if (nest == NULL)
+               goto nla_put_failure;
        NLA_PUT(skb, TCA_STAB_BASE, sizeof(stab->szopts), &stab->szopts);
        nla_nest_end(skb, nest);
 
index 93cd30ce65011d2b84541277c15664ed6287fc3d..cdcd16fcfeda463c0e9057d288f1b0910070648b 100644 (file)
@@ -270,6 +270,8 @@ static void dev_watchdog_down(struct net_device *dev)
 void netif_carrier_on(struct net_device *dev)
 {
        if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state)) {
+               if (dev->reg_state == NETREG_UNINITIALIZED)
+                       return;
                linkwatch_fire_event(dev);
                if (netif_running(dev))
                        __netdev_watchdog_up(dev);
@@ -285,8 +287,11 @@ EXPORT_SYMBOL(netif_carrier_on);
  */
 void netif_carrier_off(struct net_device *dev)
 {
-       if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state))
+       if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state)) {
+               if (dev->reg_state == NETREG_UNINITIALIZED)
+                       return;
                linkwatch_fire_event(dev);
+       }
 }
 EXPORT_SYMBOL(netif_carrier_off);
 
index a11959908d9a68c405114d56c5073c0d77647402..98402f0efa47727677b8d57acfe2ecd7cb9441b2 100644 (file)
@@ -46,9 +46,6 @@
         layering other disciplines.  It does not need to do bandwidth
         control either since that can be handled by using token
         bucket or other rate control.
-
-        The simulator is limited by the Linux timer resolution
-        and will create packet bursts on the HZ boundary (1ms).
 */
 
 struct netem_sched_data {
index 57550c3bcabec28ab7ee82030e6d1d4cb36192a0..92764d836891833e1cb7f8255a38edacad1f3b7f 100644 (file)
@@ -1426,8 +1426,8 @@ asmlinkage long sys_listen(int fd, int backlog)
  *     clean when we restucture accept also.
  */
 
-long do_accept(int fd, struct sockaddr __user *upeer_sockaddr,
-              int __user *upeer_addrlen, int flags)
+asmlinkage long sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr,
+                           int __user *upeer_addrlen, int flags)
 {
        struct socket *sock, *newsock;
        struct file *newfile;
@@ -1510,66 +1510,10 @@ out_fd:
        goto out_put;
 }
 
-#if 0
-#ifdef HAVE_SET_RESTORE_SIGMASK
-asmlinkage long sys_paccept(int fd, struct sockaddr __user *upeer_sockaddr,
-                           int __user *upeer_addrlen,
-                           const sigset_t __user *sigmask,
-                           size_t sigsetsize, int flags)
-{
-       sigset_t ksigmask, sigsaved;
-       int ret;
-
-       if (sigmask) {
-               /* XXX: Don't preclude handling different sized sigset_t's.  */
-               if (sigsetsize != sizeof(sigset_t))
-                       return -EINVAL;
-               if (copy_from_user(&ksigmask, sigmask, sizeof(ksigmask)))
-                       return -EFAULT;
-
-               sigdelsetmask(&ksigmask, sigmask(SIGKILL)|sigmask(SIGSTOP));
-               sigprocmask(SIG_SETMASK, &ksigmask, &sigsaved);
-        }
-
-       ret = do_accept(fd, upeer_sockaddr, upeer_addrlen, flags);
-
-       if (ret < 0 && signal_pending(current)) {
-               /*
-                * Don't restore the signal mask yet. Let do_signal() deliver
-                * the signal on the way back to userspace, before the signal
-                * mask is restored.
-                */
-               if (sigmask) {
-                       memcpy(&current->saved_sigmask, &sigsaved,
-                              sizeof(sigsaved));
-                       set_restore_sigmask();
-               }
-       } else if (sigmask)
-               sigprocmask(SIG_SETMASK, &sigsaved, NULL);
-
-       return ret;
-}
-#else
-asmlinkage long sys_paccept(int fd, struct sockaddr __user *upeer_sockaddr,
-                           int __user *upeer_addrlen,
-                           const sigset_t __user *sigmask,
-                           size_t sigsetsize, int flags)
-{
-       /* The platform does not support restoring the signal mask in the
-        * return path.  So we do not allow using paccept() with a signal
-        * mask.  */
-       if (sigmask)
-               return -EINVAL;
-
-       return do_accept(fd, upeer_sockaddr, upeer_addrlen, flags);
-}
-#endif
-#endif
-
 asmlinkage long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr,
                           int __user *upeer_addrlen)
 {
-       return do_accept(fd, upeer_sockaddr, upeer_addrlen, 0);
+       return sys_accept4(fd, upeer_sockaddr, upeer_addrlen, 0);
 }
 
 /*
@@ -2096,7 +2040,7 @@ static const unsigned char nargs[19]={
        AL(0),AL(3),AL(3),AL(3),AL(2),AL(3),
        AL(3),AL(3),AL(4),AL(4),AL(4),AL(6),
        AL(6),AL(2),AL(5),AL(5),AL(3),AL(3),
-       AL(6)
+       AL(4)
 };
 
 #undef AL
@@ -2115,7 +2059,7 @@ asmlinkage long sys_socketcall(int call, unsigned long __user *args)
        unsigned long a0, a1;
        int err;
 
-       if (call < 1 || call > SYS_PACCEPT)
+       if (call < 1 || call > SYS_ACCEPT4)
                return -EINVAL;
 
        /* copy_from_user should be SMP safe. */
@@ -2143,9 +2087,8 @@ asmlinkage long sys_socketcall(int call, unsigned long __user *args)
                err = sys_listen(a0, a1);
                break;
        case SYS_ACCEPT:
-               err =
-                   do_accept(a0, (struct sockaddr __user *)a1,
-                             (int __user *)a[2], 0);
+               err = sys_accept4(a0, (struct sockaddr __user *)a1,
+                                 (int __user *)a[2], 0);
                break;
        case SYS_GETSOCKNAME:
                err =
@@ -2192,12 +2135,9 @@ asmlinkage long sys_socketcall(int call, unsigned long __user *args)
        case SYS_RECVMSG:
                err = sys_recvmsg(a0, (struct msghdr __user *)a1, a[2]);
                break;
-       case SYS_PACCEPT:
-               err =
-                   sys_paccept(a0, (struct sockaddr __user *)a1,
-                               (int __user *)a[2],
-                               (const sigset_t __user *) a[3],
-                               a[4], a[5]);
+       case SYS_ACCEPT4:
+               err = sys_accept4(a0, (struct sockaddr __user *)a1,
+                                 (int __user *)a[2], a[3]);
                break;
        default:
                err = -EINVAL;
index 744b79fdcb19dac256b1dea5b26dc6e87f208f07..4028502f052858b1d66af4b31c17d641c16fac0b 100644 (file)
@@ -133,13 +133,29 @@ static int
 generic_match(struct auth_cred *acred, struct rpc_cred *cred, int flags)
 {
        struct generic_cred *gcred = container_of(cred, struct generic_cred, gc_base);
+       int i;
 
        if (gcred->acred.uid != acred->uid ||
            gcred->acred.gid != acred->gid ||
-           gcred->acred.group_info != acred->group_info ||
            gcred->acred.machine_cred != acred->machine_cred)
-               return 0;
+               goto out_nomatch;
+
+       /* Optimisation in the case where pointers are identical... */
+       if (gcred->acred.group_info == acred->group_info)
+               goto out_match;
+
+       /* Slow path... */
+       if (gcred->acred.group_info->ngroups != acred->group_info->ngroups)
+               goto out_nomatch;
+       for (i = 0; i < gcred->acred.group_info->ngroups; i++) {
+               if (GROUP_AT(gcred->acred.group_info, i) !=
+                               GROUP_AT(acred->group_info, i))
+                       goto out_nomatch;
+       }
+out_match:
        return 1;
+out_nomatch:
+       return 0;
 }
 
 void __init rpc_init_generic_auth(void)
index 95293f549e9c2b371b82ce32af4ca43be00b5ada..a1951dcc577614df63fc0a3ab1e5ce92dce9d7ab 100644 (file)
@@ -1183,7 +1183,11 @@ int svc_addsock(struct svc_serv *serv,
        else if (so->state > SS_UNCONNECTED)
                err = -EISCONN;
        else {
-               svsk = svc_setup_socket(serv, so, &err, SVC_SOCK_DEFAULTS);
+               if (!try_module_get(THIS_MODULE))
+                       err = -ENOENT;
+               else
+                       svsk = svc_setup_socket(serv, so, &err,
+                                               SVC_SOCK_DEFAULTS);
                if (svsk) {
                        struct sockaddr_storage addr;
                        struct sockaddr *sin = (struct sockaddr *)&addr;
@@ -1196,7 +1200,8 @@ int svc_addsock(struct svc_serv *serv,
                        spin_unlock_bh(&serv->sv_lock);
                        svc_xprt_received(&svsk->sk_xprt);
                        err = 0;
-               }
+               } else
+                       module_put(THIS_MODULE);
        }
        if (err) {
                sockfd_put(so);
index eb90f77bb0e294b6358db3361740deaa0bec969e..66d5ac4773abac12f517c84b25916dc078cda007 100644 (file)
@@ -1343,6 +1343,7 @@ static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock,
 
        if (NULL == siocb->scm)
                siocb->scm = &tmp_scm;
+       wait_for_unix_gc();
        err = scm_send(sock, msg, siocb->scm);
        if (err < 0)
                return err;
@@ -1493,6 +1494,7 @@ static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock,
 
        if (NULL == siocb->scm)
                siocb->scm = &tmp_scm;
+       wait_for_unix_gc();
        err = scm_send(sock, msg, siocb->scm);
        if (err < 0)
                return err;
index 6d4a9a8de5ef1d8974a4f8fe17956dfd31b63fe6..abb3ab34cb1ece8f357819c8124430996e15d443 100644 (file)
@@ -80,6 +80,7 @@
 #include <linux/file.h>
 #include <linux/proc_fs.h>
 #include <linux/mutex.h>
+#include <linux/wait.h>
 
 #include <net/sock.h>
 #include <net/af_unix.h>
@@ -91,6 +92,7 @@
 static LIST_HEAD(gc_inflight_list);
 static LIST_HEAD(gc_candidates);
 static DEFINE_SPINLOCK(unix_gc_lock);
+static DECLARE_WAIT_QUEUE_HEAD(unix_gc_wait);
 
 unsigned int unix_tot_inflight;
 
@@ -266,12 +268,16 @@ static void inc_inflight_move_tail(struct unix_sock *u)
                list_move_tail(&u->link, &gc_candidates);
 }
 
-/* The external entry point: unix_gc() */
+static bool gc_in_progress = false;
 
-void unix_gc(void)
+void wait_for_unix_gc(void)
 {
-       static bool gc_in_progress = false;
+       wait_event(unix_gc_wait, gc_in_progress == false);
+}
 
+/* The external entry point: unix_gc() */
+void unix_gc(void)
+{
        struct unix_sock *u;
        struct unix_sock *next;
        struct sk_buff_head hitlist;
@@ -376,6 +382,7 @@ void unix_gc(void)
        /* All candidates should have been detached by now. */
        BUG_ON(!list_empty(&gc_candidates));
        gc_in_progress = false;
+       wake_up(&unix_gc_wait);
 
  out:
        spin_unlock(&unix_gc_lock);
index 626dbb688499bd9dafa0b963305df65d3ac0c04a..eb3b1a9f9b12477d5a2562916491e9d73c6a7792 100644 (file)
@@ -343,9 +343,9 @@ static int ignore_request(struct wiphy *wiphy, enum reg_set_by set_by,
                                return 0;
                        return -EALREADY;
                }
-               if (WARN_ON(!is_alpha2_set(alpha2) || !is_an_alpha2(alpha2)),
+               if (WARN(!is_alpha2_set(alpha2) || !is_an_alpha2(alpha2),
                                "Invalid Country IE regulatory hint passed "
-                               "to the wireless core\n")
+                               "to the wireless core\n"))
                        return -EINVAL;
                /* We ignore Country IE hints for now, as we haven't yet
                 * added the dot11MultiDomainCapabilityEnabled flag
index 058f04f54b9024857eb418321d6842bd448c744a..fb216c9adf86722bc81079fd25f4ed4b908e642c 100644 (file)
@@ -817,6 +817,7 @@ int xfrm_policy_flush(u8 type, struct xfrm_audit *audit_info)
                                continue;
                        hlist_del(&pol->bydst);
                        hlist_del(&pol->byidx);
+                       list_del(&pol->walk.all);
                        write_unlock_bh(&xfrm_policy_lock);
 
                        xfrm_audit_policy_delete(pol, 1, audit_info->loginuid,
index a53e2fc8dfb539575fa2e6f2001cb79b83251b8a..d27aad78e1d83f21a4c0f8140b0aa87be05ad4b4 100755 (executable)
@@ -378,6 +378,10 @@ sub dump_section {
 #      print STDERR "parameter def '$1' = '$contents'\n";
        $name = $1;
        $parameterdescs{$name} = $contents;
+    } elsif ($name eq "@\.\.\.") {
+#      print STDERR "parameter def '...' = '$contents'\n";
+       $name = "...";
+       $parameterdescs{$name} = $contents;
     } else {
 #      print STDERR "other section '$name' = '$contents'\n";
        if (defined($sections{$name}) && ($sections{$name} ne "")) {
@@ -1588,12 +1592,12 @@ sub push_parameter($$$) {
 
        if ($type eq "" && $param =~ /\.\.\.$/)
        {
-           $type="";
-           $parameterdescs{$param} = "variable arguments";
+           if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") {
+               $parameterdescs{$param} = "variable arguments";
+           }
        }
        elsif ($type eq "" && ($param eq "" or $param eq "void"))
        {
-           $type="";
            $param="void";
            $parameterdescs{void} = "no arguments";
        }
index 9b77b3e0fa98dadceaba640c4e185a2e496a0cc9..3ecd7e797deecbbb9fbf5bbfa9ea3c02c00fdaee 100644 (file)
@@ -37,6 +37,9 @@ static void snd_hda_generate_beep(struct work_struct *work)
                container_of(work, struct hda_beep, beep_work);
        struct hda_codec *codec = beep->codec;
 
+       if (!beep->enabled)
+               return;
+
        /* generate tone */
        snd_hda_codec_write_cache(codec, beep->nid, 0,
                        AC_VERB_SET_BEEP_CONTROL, beep->tone);
@@ -85,6 +88,10 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)
        snprintf(beep->phys, sizeof(beep->phys),
                "card%d/codec#%d/beep0", codec->bus->card->number, codec->addr);
        input_dev = input_allocate_device();
+       if (!input_dev) {
+               kfree(beep);
+               return -ENOMEM;
+       }
 
        /* setup digital beep device */
        input_dev->name = "HDA Digital PCBeep";
@@ -115,6 +122,7 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)
        beep->nid = nid;
        beep->dev = input_dev;
        beep->codec = codec;
+       beep->enabled = 1;
        codec->beep = beep;
 
        INIT_WORK(&beep->beep_work, &snd_hda_generate_beep);
index de4036e6e710feb014caf71095e6c93f8a6270f1..b9679f081cae9006a3a81b784f5e1e4927f567f5 100644 (file)
@@ -31,6 +31,7 @@ struct hda_beep {
        char phys[32];
        int tone;
        int nid;
+       int enabled;
        struct work_struct beep_work; /* scheduled task for beep event */
 };
 
index ba1ab737b55fe44010700aad11a3b316de91e861..eb9164176dab4e3fd0ccb006b77ac5f2eff6dcab 100644 (file)
@@ -1436,12 +1436,12 @@ static void set_dig_out(struct hda_codec *codec, hda_nid_t nid,
 {
        hda_nid_t *d;
 
-       snd_hda_codec_write(codec, nid, 0, verb, val);
+       snd_hda_codec_write_cache(codec, nid, 0, verb, val);
        d = codec->slave_dig_outs;
        if (!d)
                return;
        for (; *d; d++)
-               snd_hda_codec_write(codec, *d, 0, verb, val);
+               snd_hda_codec_write_cache(codec, *d, 0, verb, val);
 }
 
 static inline void set_dig_out_convert(struct hda_codec *codec, hda_nid_t nid,
index e6085915d86d16c0791ad9a261a1d0d1ccad7b81..596ceabd6504849b7925bc08c9d7e5ea1bbab136 100644 (file)
 #include "hda_beep.h"
 
 #define NUM_CONTROL_ALLOC      32
+
+#define STAC_VREF_EVENT                0x00
+#define STAC_INSERT_EVENT      0x10
 #define STAC_PWR_EVENT         0x20
 #define STAC_HP_EVENT          0x30
-#define STAC_VREF_EVENT                0x40
 
 enum {
        STAC_REF,
@@ -67,8 +69,11 @@ enum {
 };
 
 enum {
+       STAC_92HD73XX_NO_JD, /* no jack-detection */
        STAC_92HD73XX_REF,
-       STAC_DELL_M6,
+       STAC_DELL_M6_AMIC,
+       STAC_DELL_M6_DMIC,
+       STAC_DELL_M6_BOTH,
        STAC_DELL_EQ,
        STAC_92HD73XX_MODELS
 };
@@ -82,6 +87,7 @@ enum {
        STAC_92HD71BXX_REF,
        STAC_DELL_M4_1,
        STAC_DELL_M4_2,
+       STAC_DELL_M4_3,
        STAC_HP_M4,
        STAC_92HD71BXX_MODELS
 };
@@ -122,6 +128,7 @@ enum {
 };
 
 enum {
+       STAC_D965_REF_NO_JD, /* no jack-detection */
        STAC_D965_REF,
        STAC_D965_3ST,
        STAC_D965_5ST,
@@ -135,6 +142,7 @@ struct sigmatel_spec {
        unsigned int num_mixers;
 
        int board_config;
+       unsigned int eapd_switch: 1;
        unsigned int surr_switch: 1;
        unsigned int line_switch: 1;
        unsigned int mic_switch: 1;
@@ -212,7 +220,7 @@ struct sigmatel_spec {
        /* i/o switches */
        unsigned int io_switch[2];
        unsigned int clfe_swap;
-       unsigned int hp_switch;
+       unsigned int hp_switch; /* NID of HP as line-out */
        unsigned int aloopback;
 
        struct hda_pcm pcm_rec[2];      /* PCM information */
@@ -1598,13 +1606,18 @@ static unsigned int dell_m6_pin_configs[13] = {
 
 static unsigned int *stac92hd73xx_brd_tbl[STAC_92HD73XX_MODELS] = {
        [STAC_92HD73XX_REF]     = ref92hd73xx_pin_configs,
-       [STAC_DELL_M6]  = dell_m6_pin_configs,
+       [STAC_DELL_M6_AMIC]     = dell_m6_pin_configs,
+       [STAC_DELL_M6_DMIC]     = dell_m6_pin_configs,
+       [STAC_DELL_M6_BOTH]     = dell_m6_pin_configs,
        [STAC_DELL_EQ]  = dell_m6_pin_configs,
 };
 
 static const char *stac92hd73xx_models[STAC_92HD73XX_MODELS] = {
+       [STAC_92HD73XX_NO_JD] = "no-jd",
        [STAC_92HD73XX_REF] = "ref",
-       [STAC_DELL_M6] = "dell-m6",
+       [STAC_DELL_M6_AMIC] = "dell-m6-amic",
+       [STAC_DELL_M6_DMIC] = "dell-m6-dmic",
+       [STAC_DELL_M6_BOTH] = "dell-m6",
        [STAC_DELL_EQ] = "dell-eq",
 };
 
@@ -1613,19 +1626,25 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = {
        SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
                                "DFI LanParty", STAC_92HD73XX_REF),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0254,
-                               "unknown Dell", STAC_DELL_M6),
+                               "Dell Studio 1535", STAC_DELL_M6_DMIC),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0255,
-                               "unknown Dell", STAC_DELL_M6),
+                               "unknown Dell", STAC_DELL_M6_DMIC),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0256,
-                               "unknown Dell", STAC_DELL_M6),
+                               "unknown Dell", STAC_DELL_M6_BOTH),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0257,
-                               "unknown Dell", STAC_DELL_M6),
+                               "unknown Dell", STAC_DELL_M6_BOTH),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x025e,
-                               "unknown Dell", STAC_DELL_M6),
+                               "unknown Dell", STAC_DELL_M6_AMIC),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x025f,
-                               "unknown Dell", STAC_DELL_M6),
+                               "unknown Dell", STAC_DELL_M6_AMIC),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0271,
-                               "unknown Dell", STAC_DELL_M6),
+                               "unknown Dell", STAC_DELL_M6_DMIC),
+       SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0272,
+                               "unknown Dell", STAC_DELL_M6_DMIC),
+       SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x029f,
+                               "Dell Studio 1537", STAC_DELL_M6_DMIC),
+       SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a0,
+                               "Dell Studio 17", STAC_DELL_M6_DMIC),
        {} /* terminator */
 };
 
@@ -1668,10 +1687,17 @@ static unsigned int dell_m4_2_pin_configs[11] = {
        0x40f000f0, 0x044413b0, 0x044413b0,
 };
 
+static unsigned int dell_m4_3_pin_configs[11] = {
+       0x0421101f, 0x04a11221, 0x90a70330, 0x90170110,
+       0x40f000f0, 0x40f000f0, 0x40f000f0, 0x90a000f0,
+       0x40f000f0, 0x044413b0, 0x044413b0,
+};
+
 static unsigned int *stac92hd71bxx_brd_tbl[STAC_92HD71BXX_MODELS] = {
        [STAC_92HD71BXX_REF] = ref92hd71bxx_pin_configs,
        [STAC_DELL_M4_1]        = dell_m4_1_pin_configs,
        [STAC_DELL_M4_2]        = dell_m4_2_pin_configs,
+       [STAC_DELL_M4_3]        = dell_m4_3_pin_configs,
        [STAC_HP_M4]            = NULL,
 };
 
@@ -1679,6 +1705,7 @@ static const char *stac92hd71bxx_models[STAC_92HD71BXX_MODELS] = {
        [STAC_92HD71BXX_REF] = "ref",
        [STAC_DELL_M4_1] = "dell-m4-1",
        [STAC_DELL_M4_2] = "dell-m4-2",
+       [STAC_DELL_M4_3] = "dell-m4-3",
        [STAC_HP_M4] = "hp-m4",
 };
 
@@ -1686,6 +1713,10 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {
        /* SigmaTel reference board */
        SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
                      "DFI LanParty", STAC_92HD71BXX_REF),
+       SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f2,
+                     "HP dv5", STAC_HP_M4),
+       SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f4,
+                     "HP dv7", STAC_HP_M4),
        SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361a,
                                "unknown HP", STAC_HP_M4),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233,
@@ -1710,6 +1741,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {
                                "unknown Dell", STAC_DELL_M4_2),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0264,
                                "unknown Dell", STAC_DELL_M4_2),
+       SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02aa,
+                               "unknown Dell", STAC_DELL_M4_3),
        {} /* terminator */
 };
 
@@ -1999,6 +2032,7 @@ static unsigned int dell_3st_pin_configs[14] = {
 };
 
 static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = {
+       [STAC_D965_REF_NO_JD] = ref927x_pin_configs,
        [STAC_D965_REF]  = ref927x_pin_configs,
        [STAC_D965_3ST]  = d965_3st_pin_configs,
        [STAC_D965_5ST]  = d965_5st_pin_configs,
@@ -2007,6 +2041,7 @@ static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = {
 };
 
 static const char *stac927x_models[STAC_927X_MODELS] = {
+       [STAC_D965_REF_NO_JD]   = "ref-no-jd",
        [STAC_D965_REF]         = "ref",
        [STAC_D965_3ST]         = "3stack",
        [STAC_D965_5ST]         = "5stack",
@@ -2443,7 +2478,7 @@ static int stac92xx_hp_switch_get(struct snd_kcontrol *kcontrol,
        struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
        struct sigmatel_spec *spec = codec->spec;
 
-       ucontrol->value.integer.value[0] = spec->hp_switch;
+       ucontrol->value.integer.value[0] = !!spec->hp_switch;
        return 0;
 }
 
@@ -2452,8 +2487,9 @@ static int stac92xx_hp_switch_put(struct snd_kcontrol *kcontrol,
 {
        struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
        struct sigmatel_spec *spec = codec->spec;
-
-       spec->hp_switch = ucontrol->value.integer.value[0];
+       int nid = kcontrol->private_value;
+       spec->hp_switch = ucontrol->value.integer.value[0] ? nid : 0;
 
        /* check to be sure that the ports are upto date with
         * switch changes
@@ -2586,8 +2622,10 @@ static struct snd_kcontrol_new stac92xx_control_templates[] = {
 };
 
 /* add dynamic controls */
-static int stac92xx_add_control_idx(struct sigmatel_spec *spec, int type,
-               int idx, const char *name, unsigned long val)
+static int stac92xx_add_control_temp(struct sigmatel_spec *spec,
+                                    struct snd_kcontrol_new *ktemp,
+                                    int idx, const char *name,
+                                    unsigned long val)
 {
        struct snd_kcontrol_new *knew;
 
@@ -2606,20 +2644,29 @@ static int stac92xx_add_control_idx(struct sigmatel_spec *spec, int type,
        }
 
        knew = &spec->kctl_alloc[spec->num_kctl_used];
-       *knew = stac92xx_control_templates[type];
+       *knew = *ktemp;
        knew->index = idx;
        knew->name = kstrdup(name, GFP_KERNEL);
-       if (! knew->name)
+       if (!knew->name)
                return -ENOMEM;
        knew->private_value = val;
        spec->num_kctl_used++;
        return 0;
 }
 
+static inline int stac92xx_add_control_idx(struct sigmatel_spec *spec,
+                                          int type, int idx, const char *name,
+                                          unsigned long val)
+{
+       return stac92xx_add_control_temp(spec,
+                                        &stac92xx_control_templates[type],
+                                        idx, name, val);
+}
+
 
 /* add dynamic controls */
-static int stac92xx_add_control(struct sigmatel_spec *spec, int type,
-               const char *name, unsigned long val)
+static inline int stac92xx_add_control(struct sigmatel_spec *spec, int type,
+                                      const char *name, unsigned long val)
 {
        return stac92xx_add_control_idx(spec, type, 0, name, val);
 }
@@ -2856,13 +2903,14 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec,
        }
 
        if ((spec->multiout.num_dacs - cfg->line_outs) > 0 &&
-                       cfg->hp_outs && !spec->multiout.hp_nid)
+           cfg->hp_outs == 1 && !spec->multiout.hp_nid)
                spec->multiout.hp_nid = nid;
 
-       if (cfg->hp_outs > 1) {
+       if (cfg->hp_outs > 1 && cfg->line_out_type == AUTO_PIN_LINE_OUT) {
                err = stac92xx_add_control(spec,
                        STAC_CTL_WIDGET_HP_SWITCH,
-                       "Headphone as Line Out Switch", 0);
+                       "Headphone as Line Out Switch",
+                       cfg->hp_pins[cfg->hp_outs - 1]);
                if (err < 0)
                        return err;
        }
@@ -3060,6 +3108,43 @@ static int stac92xx_auto_create_beep_ctls(struct hda_codec *codec,
        return 0;
 }
 
+#ifdef CONFIG_SND_HDA_INPUT_BEEP
+#define stac92xx_dig_beep_switch_info snd_ctl_boolean_mono_info
+
+static int stac92xx_dig_beep_switch_get(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
+{
+       struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
+       ucontrol->value.integer.value[0] = codec->beep->enabled;
+       return 0;
+}
+
+static int stac92xx_dig_beep_switch_put(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
+{
+       struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
+       int enabled = !!ucontrol->value.integer.value[0];
+       if (codec->beep->enabled != enabled) {
+               codec->beep->enabled = enabled;
+               return 1;
+       }
+       return 0;
+}
+
+static struct snd_kcontrol_new stac92xx_dig_beep_ctrl = {
+       .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+       .info = stac92xx_dig_beep_switch_info,
+       .get = stac92xx_dig_beep_switch_get,
+       .put = stac92xx_dig_beep_switch_put,
+};
+
+static int stac92xx_beep_switch_ctl(struct hda_codec *codec)
+{
+       return stac92xx_add_control_temp(codec->spec, &stac92xx_dig_beep_ctrl,
+                                        0, "PC Beep Playback Switch", 0);
+}
+#endif
+
 static int stac92xx_auto_create_mux_input_ctls(struct hda_codec *codec)
 {
        struct sigmatel_spec *spec = codec->spec;
@@ -3366,6 +3451,7 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out
 #ifdef CONFIG_SND_HDA_INPUT_BEEP
        if (spec->digbeep_nid > 0) {
                hda_nid_t nid = spec->digbeep_nid;
+               unsigned int caps;
 
                err = stac92xx_auto_create_beep_ctls(codec, nid);
                if (err < 0)
@@ -3373,6 +3459,14 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out
                err = snd_hda_attach_beep_device(codec, nid);
                if (err < 0)
                        return err;
+               /* if no beep switch is available, make its own one */
+               caps = query_amp_caps(codec, nid, HDA_OUTPUT);
+               if (codec->beep &&
+                   !((caps & AC_AMPCAP_MUTE) >> AC_AMPCAP_MUTE_SHIFT)) {
+                       err = stac92xx_beep_switch_ctl(codec);
+                       if (err < 0)
+                               return err;
+               }
        }
 #endif
 
@@ -3530,6 +3624,12 @@ static int stac9200_parse_auto_config(struct hda_codec *codec)
        if ((err = stac9200_auto_create_lfe_ctls(codec, &spec->autocfg)) < 0)
                return err;
 
+       if (spec->num_muxes > 0) {
+               err = stac92xx_auto_create_mux_input_ctls(codec);
+               if (err < 0)
+                       return err;
+       }
+
        if (spec->autocfg.dig_out_pin)
                spec->multiout.dig_out_nid = 0x05;
        if (spec->autocfg.dig_in_pin)
@@ -3612,10 +3712,14 @@ static void stac92xx_power_down(struct hda_codec *codec)
                                        AC_VERB_SET_POWER_STATE, AC_PWRST_D3);
 }
 
+static void stac_toggle_power_map(struct hda_codec *codec, hda_nid_t nid,
+                                 int enable);
+
 static int stac92xx_init(struct hda_codec *codec)
 {
        struct sigmatel_spec *spec = codec->spec;
        struct auto_pin_cfg *cfg = &spec->autocfg;
+       unsigned int gpio;
        int i;
 
        snd_hda_sequence_write(codec, spec->init);
@@ -3626,6 +3730,16 @@ static int stac92xx_init(struct hda_codec *codec)
                        snd_hda_codec_write_cache(codec,
                                spec->adc_nids[i], 0,
                                AC_VERB_SET_POWER_STATE, AC_PWRST_D3);
+
+       /* set up GPIO */
+       gpio = spec->gpio_data;
+       /* turn on EAPD statically when spec->eapd_switch isn't set.
+        * otherwise, unsol event will turn it on/off dynamically
+        */
+       if (!spec->eapd_switch)
+               gpio |= spec->eapd_mask;
+       stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, gpio);
+
        /* set up pins */
        if (spec->hp_detect) {
                /* Enable unsolicited responses on the HP widget */
@@ -3647,53 +3761,61 @@ static int stac92xx_init(struct hda_codec *codec)
        for (i = 0; i < AUTO_PIN_LAST; i++) {
                hda_nid_t nid = cfg->input_pins[i];
                if (nid) {
-                       unsigned int pinctl = snd_hda_codec_read(codec, nid,
-                               0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
-                       /* if PINCTL already set then skip */
-                       if (pinctl & AC_PINCAP_IN)
-                               continue;
-                       pinctl = AC_PINCTL_IN_EN;
-                       if (i == AUTO_PIN_MIC || i == AUTO_PIN_FRONT_MIC)
-                               pinctl |= stac92xx_get_vref(codec, nid);
+                       unsigned int pinctl;
+                       if (i == AUTO_PIN_MIC || i == AUTO_PIN_FRONT_MIC) {
+                               /* for mic pins, force to initialize */
+                               pinctl = stac92xx_get_vref(codec, nid);
+                       } else {
+                               pinctl = snd_hda_codec_read(codec, nid, 0,
+                                       AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
+                               /* if PINCTL already set then skip */
+                               if (pinctl & AC_PINCTL_IN_EN)
+                                       continue;
+                       }
+                       pinctl |= AC_PINCTL_IN_EN;
                        stac92xx_auto_set_pinctl(codec, nid, pinctl);
                }
        }
        for (i = 0; i < spec->num_dmics; i++)
                stac92xx_auto_set_pinctl(codec, spec->dmic_nids[i],
                                        AC_PINCTL_IN_EN);
+       if (cfg->dig_out_pin)
+               stac92xx_auto_set_pinctl(codec, cfg->dig_out_pin,
+                                        AC_PINCTL_OUT_EN);
+       if (cfg->dig_in_pin)
+               stac92xx_auto_set_pinctl(codec, cfg->dig_in_pin,
+                                        AC_PINCTL_IN_EN);
        for (i = 0; i < spec->num_pwrs; i++)  {
-               int event = is_nid_hp_pin(cfg, spec->pwr_nids[i])
-                                       ? STAC_HP_EVENT : STAC_PWR_EVENT;
-               int pinctl = snd_hda_codec_read(codec, spec->pwr_nids[i],
-                                       0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
-               int def_conf = snd_hda_codec_read(codec, spec->pwr_nids[i],
-                                       0, AC_VERB_GET_CONFIG_DEFAULT, 0);
-               def_conf = get_defcfg_connect(def_conf);
+               hda_nid_t nid = spec->pwr_nids[i];
+               int pinctl, def_conf;
+               int event = STAC_PWR_EVENT;
+
+               if (is_nid_hp_pin(cfg, nid) && spec->hp_detect)
+                       continue; /* already has an unsol event */
+
+               pinctl = snd_hda_codec_read(codec, nid, 0,
+                                           AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
                /* outputs are only ports capable of power management
                 * any attempts on powering down a input port cause the
                 * referenced VREF to act quirky.
                 */
                if (pinctl & AC_PINCTL_IN_EN)
                        continue;
+               def_conf = snd_hda_codec_read(codec, nid, 0,
+                                             AC_VERB_GET_CONFIG_DEFAULT, 0);
+               def_conf = get_defcfg_connect(def_conf);
                /* skip any ports that don't have jacks since presence
                 * detection is useless */
-               if (def_conf && def_conf != AC_JACK_PORT_FIXED)
+               if (def_conf != AC_JACK_PORT_COMPLEX) {
+                       if (def_conf != AC_JACK_PORT_NONE)
+                               stac_toggle_power_map(codec, nid, 1);
                        continue;
+               }
                enable_pin_detect(codec, spec->pwr_nids[i], event | i);
                codec->patch_ops.unsol_event(codec, (event | i) << 26);
        }
        if (spec->dac_list)
                stac92xx_power_down(codec);
-       if (cfg->dig_out_pin)
-               stac92xx_auto_set_pinctl(codec, cfg->dig_out_pin,
-                                        AC_PINCTL_OUT_EN);
-       if (cfg->dig_in_pin)
-               stac92xx_auto_set_pinctl(codec, cfg->dig_in_pin,
-                                        AC_PINCTL_IN_EN);
-
-       stac_gpio_set(codec, spec->gpio_mask,
-                                       spec->gpio_dir, spec->gpio_data);
-
        return 0;
 }
 
@@ -3776,11 +3898,30 @@ static int get_hp_pin_presence(struct hda_codec *codec, hda_nid_t nid)
        return 0;
 }
 
+/* return non-zero if the hp-pin of the given array index isn't
+ * a jack-detection target
+ */
+static int no_hp_sensing(struct sigmatel_spec *spec, int i)
+{
+       struct auto_pin_cfg *cfg = &spec->autocfg;
+
+       /* ignore sensing of shared line and mic jacks */
+       if (spec->line_switch &&
+           cfg->hp_pins[i] == cfg->input_pins[AUTO_PIN_LINE])
+               return 1;
+       if (spec->mic_switch &&
+           cfg->hp_pins[i] == cfg->input_pins[AUTO_PIN_MIC])
+               return 1;
+       /* ignore if the pin is set as line-out */
+       if (cfg->hp_pins[i] == spec->hp_switch)
+               return 1;
+       return 0;
+}
+
 static void stac92xx_hp_detect(struct hda_codec *codec, unsigned int res)
 {
        struct sigmatel_spec *spec = codec->spec;
        struct auto_pin_cfg *cfg = &spec->autocfg;
-       int nid = cfg->hp_pins[cfg->hp_outs - 1];
        int i, presence;
 
        presence = 0;
@@ -3791,52 +3932,66 @@ static void stac92xx_hp_detect(struct hda_codec *codec, unsigned int res)
        for (i = 0; i < cfg->hp_outs; i++) {
                if (presence)
                        break;
-               if (spec->hp_switch && cfg->hp_pins[i] == nid)
-                       break;
+               if (no_hp_sensing(spec, i))
+                       continue;
                presence = get_hp_pin_presence(codec, cfg->hp_pins[i]);
        }
 
        if (presence) {
-               /* disable lineouts, enable hp */
+               /* disable lineouts */
                if (spec->hp_switch)
-                       stac92xx_reset_pinctl(codec, nid, AC_PINCTL_OUT_EN);
+                       stac92xx_reset_pinctl(codec, spec->hp_switch,
+                                             AC_PINCTL_OUT_EN);
                for (i = 0; i < cfg->line_outs; i++)
                        stac92xx_reset_pinctl(codec, cfg->line_out_pins[i],
                                                AC_PINCTL_OUT_EN);
                for (i = 0; i < cfg->speaker_outs; i++)
                        stac92xx_reset_pinctl(codec, cfg->speaker_pins[i],
                                                AC_PINCTL_OUT_EN);
-               if (spec->eapd_mask)
+               if (spec->eapd_mask && spec->eapd_switch)
                        stac_gpio_set(codec, spec->gpio_mask,
                                spec->gpio_dir, spec->gpio_data &
                                ~spec->eapd_mask);
        } else {
-               /* enable lineouts, disable hp */
+               /* enable lineouts */
                if (spec->hp_switch)
-                       stac92xx_set_pinctl(codec, nid, AC_PINCTL_OUT_EN);
+                       stac92xx_set_pinctl(codec, spec->hp_switch,
+                                           AC_PINCTL_OUT_EN);
                for (i = 0; i < cfg->line_outs; i++)
                        stac92xx_set_pinctl(codec, cfg->line_out_pins[i],
                                                AC_PINCTL_OUT_EN);
                for (i = 0; i < cfg->speaker_outs; i++)
                        stac92xx_set_pinctl(codec, cfg->speaker_pins[i],
                                                AC_PINCTL_OUT_EN);
-               if (spec->eapd_mask)
+               if (spec->eapd_mask && spec->eapd_switch)
                        stac_gpio_set(codec, spec->gpio_mask,
                                spec->gpio_dir, spec->gpio_data |
                                spec->eapd_mask);
        }
-       if (!spec->hp_switch && cfg->hp_outs > 1 && presence)
-               stac92xx_set_pinctl(codec, nid, AC_PINCTL_OUT_EN);
+       /* toggle hp outs */
+       for (i = 0; i < cfg->hp_outs; i++) {
+               unsigned int val = AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN;
+               if (no_hp_sensing(spec, i))
+                       continue;
+               if (presence)
+                       stac92xx_set_pinctl(codec, cfg->hp_pins[i], val);
+               else
+                       stac92xx_reset_pinctl(codec, cfg->hp_pins[i], val);
+       }
 } 
 
-static void stac92xx_pin_sense(struct hda_codec *codec, int idx)
+static void stac_toggle_power_map(struct hda_codec *codec, hda_nid_t nid,
+                                 int enable)
 {
        struct sigmatel_spec *spec = codec->spec;
-       hda_nid_t nid = spec->pwr_nids[idx];
-       int presence, val;
-       val = snd_hda_codec_read(codec, codec->afg, 0, 0x0fec, 0x0)
-                                                       & 0x000000ff;
-       presence = get_hp_pin_presence(codec, nid);
+       unsigned int idx, val;
+
+       for (idx = 0; idx < spec->num_pwrs; idx++) {
+               if (spec->pwr_nids[idx] == nid)
+                       break;
+       }
+       if (idx >= spec->num_pwrs)
+               return;
 
        /* several codecs have two power down bits */
        if (spec->pwr_mapping)
@@ -3844,14 +3999,20 @@ static void stac92xx_pin_sense(struct hda_codec *codec, int idx)
        else
                idx = 1 << idx;
 
-       if (presence)
+       val = snd_hda_codec_read(codec, codec->afg, 0, 0x0fec, 0x0) & 0xff;
+       if (enable)
                val &= ~idx;
        else
                val |= idx;
 
        /* power down unused output ports */
        snd_hda_codec_write(codec, codec->afg, 0, 0x7ec, val);
-};
+}
+
+static void stac92xx_pin_sense(struct hda_codec *codec, hda_nid_t nid)
+{
+       stac_toggle_power_map(codec, nid, get_hp_pin_presence(codec, nid));
+}
 
 static void stac92xx_unsol_event(struct hda_codec *codec, unsigned int res)
 {
@@ -4100,14 +4261,17 @@ again:
 
        switch (spec->multiout.num_dacs) {
        case 0x3: /* 6 Channel */
+               spec->multiout.hp_nid = 0x17;
                spec->mixer = stac92hd73xx_6ch_mixer;
                spec->init = stac92hd73xx_6ch_core_init;
                break;
        case 0x4: /* 8 Channel */
+               spec->multiout.hp_nid = 0x18;
                spec->mixer = stac92hd73xx_8ch_mixer;
                spec->init = stac92hd73xx_8ch_core_init;
                break;
        case 0x5: /* 10 Channel */
+               spec->multiout.hp_nid = 0x19;
                spec->mixer = stac92hd73xx_10ch_mixer;
                spec->init = stac92hd73xx_10ch_core_init;
        };
@@ -4135,31 +4299,30 @@ again:
        case STAC_DELL_EQ:
                spec->init = dell_eq_core_init;
                /* fallthru */
-       case STAC_DELL_M6:
+       case STAC_DELL_M6_AMIC:
+       case STAC_DELL_M6_DMIC:
+       case STAC_DELL_M6_BOTH:
                spec->num_smuxes = 0;
                spec->mixer = &stac92hd73xx_6ch_mixer[DELL_M6_MIXER];
                spec->amp_nids = &stac92hd73xx_amp_nids[DELL_M6_AMP];
+               spec->eapd_switch = 0;
                spec->num_amps = 1;
+               spec->multiout.hp_nid = 0; /* dual HPs */
 
                if (!spec->init)
                        spec->init = dell_m6_core_init;
-               switch (codec->subsystem_id) {
-               case 0x1028025e: /* Analog Mics */
-               case 0x1028025f:
+               switch (spec->board_config) {
+               case STAC_DELL_M6_AMIC: /* Analog Mics */
                        stac92xx_set_config_reg(codec, 0x0b, 0x90A70170);
                        spec->num_dmics = 0;
                        spec->private_dimux.num_items = 1;
                        break;
-               case 0x10280271: /* Digital Mics */
-               case 0x10280272:
-               case 0x10280254:
-               case 0x10280255:
+               case STAC_DELL_M6_DMIC: /* Digital Mics */
                        stac92xx_set_config_reg(codec, 0x13, 0x90A60160);
                        spec->num_dmics = 1;
                        spec->private_dimux.num_items = 2;
                        break;
-               case 0x10280256: /* Both */
-               case 0x10280057:
+               case STAC_DELL_M6_BOTH: /* Both */
                        stac92xx_set_config_reg(codec, 0x0b, 0x90A70170);
                        stac92xx_set_config_reg(codec, 0x13, 0x90A60160);
                        spec->num_dmics = 1;
@@ -4170,6 +4333,7 @@ again:
        default:
                spec->num_dmics = STAC92HD73XX_NUM_DMICS;
                spec->num_smuxes = ARRAY_SIZE(stac92hd73xx_smux_nids);
+               spec->eapd_switch = 1;
        }
        if (spec->board_config > STAC_92HD73XX_REF) {
                /* GPIO0 High = Enable EAPD */
@@ -4198,6 +4362,9 @@ again:
                return err;
        }
 
+       if (spec->board_config == STAC_92HD73XX_NO_JD)
+               spec->hp_detect = 0;
+
        codec->patch_ops = stac92xx_patch_ops;
 
        return 0;
@@ -4315,7 +4482,13 @@ static int stac92hd71xx_resume(struct hda_codec *codec)
 
 static int stac92hd71xx_suspend(struct hda_codec *codec, pm_message_t state)
 {
+       struct sigmatel_spec *spec = codec->spec;
+
        stac92hd71xx_set_power_state(codec, AC_PWRST_D3);
+       if (spec->eapd_mask)
+               stac_gpio_set(codec, spec->gpio_mask,
+                               spec->gpio_dir, spec->gpio_data &
+                               ~spec->eapd_mask);
        return 0;
 };
 
@@ -4378,6 +4551,13 @@ again:
                stac92xx_set_config_regs(codec);
        }
 
+       if (spec->board_config > STAC_92HD71BXX_REF) {
+               /* GPIO0 = EAPD */
+               spec->gpio_mask = 0x01;
+               spec->gpio_dir = 0x01;
+               spec->gpio_data = 0x01;
+       }
+
        switch (codec->vendor_id) {
        case 0x111d76b6: /* 4 Port without Analog Mixer */
        case 0x111d76b7:
@@ -4388,10 +4568,10 @@ again:
                codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
                break;
        case 0x111d7608: /* 5 Port with Analog Mixer */
-               switch (codec->subsystem_id) {
-               case 0x103c361a:
+               switch (spec->board_config) {
+               case STAC_HP_M4:
                        /* Enable VREF power saving on GPIO1 detect */
-                       snd_hda_codec_write(codec, codec->afg, 0,
+                       snd_hda_codec_write_cache(codec, codec->afg, 0,
                                AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK, 0x02);
                        snd_hda_codec_write_cache(codec, codec->afg, 0,
                                        AC_VERB_SET_UNSOLICITED_ENABLE,
@@ -4437,13 +4617,6 @@ again:
        spec->aloopback_mask = 0x50;
        spec->aloopback_shift = 0;
 
-       if (spec->board_config > STAC_92HD71BXX_REF) {
-               /* GPIO0 = EAPD */
-               spec->gpio_mask = 0x01;
-               spec->gpio_dir = 0x01;
-               spec->gpio_data = 0x01;
-       }
-
        spec->powerdown_adcs = 1;
        spec->digbeep_nid = 0x26;
        spec->mux_nids = stac92hd71bxx_mux_nids;
@@ -4458,14 +4631,21 @@ again:
 
        switch (spec->board_config) {
        case STAC_HP_M4:
-               spec->num_dmics = 0;
-               spec->num_smuxes = 0;
-               spec->num_dmuxes = 0;
-
                /* enable internal microphone */
                stac92xx_set_config_reg(codec, 0x0e, 0x01813040);
                stac92xx_auto_set_pinctl(codec, 0x0e,
                        AC_PINCTL_IN_EN | AC_PINCTL_VREF_80);
+               /* fallthru */
+       case STAC_DELL_M4_2:
+               spec->num_dmics = 0;
+               spec->num_smuxes = 0;
+               spec->num_dmuxes = 0;
+               break;
+       case STAC_DELL_M4_1:
+       case STAC_DELL_M4_3:
+               spec->num_dmics = 1;
+               spec->num_smuxes = 0;
+               spec->num_dmuxes = 0;
                break;
        default:
                spec->num_dmics = STAC92HD71BXX_NUM_DMICS;
@@ -4702,6 +4882,7 @@ static int patch_stac927x(struct hda_codec *codec)
        spec->num_pwrs = 0;
        spec->aloopback_mask = 0x40;
        spec->aloopback_shift = 0;
+       spec->eapd_switch = 1;
 
        err = stac92xx_parse_auto_config(codec, 0x1e, 0x20);
        if (!err) {
@@ -4732,6 +4913,10 @@ static int patch_stac927x(struct hda_codec *codec)
         */
        codec->bus->needs_damn_long_delay = 1;
 
+       /* no jack detecion for ref-no-jd model */
+       if (spec->board_config == STAC_D965_REF_NO_JD)
+               spec->hp_detect = 0;
+
        return 0;
 }
 
@@ -4782,6 +4967,7 @@ static int patch_stac9205(struct hda_codec *codec)
 
        spec->aloopback_mask = 0x40;
        spec->aloopback_shift = 0;
+       spec->eapd_switch = 1;
        spec->multiout.dac_nids = spec->dac_nids;
        
        switch (spec->board_config){
@@ -4791,7 +4977,7 @@ static int patch_stac9205(struct hda_codec *codec)
                stac92xx_set_config_reg(codec, 0x20, 0x1c410030);
 
                /* Enable unsol response for GPIO4/Dock HP connection */
-               snd_hda_codec_write(codec, codec->afg, 0,
+               snd_hda_codec_write_cache(codec, codec->afg, 0,
                        AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK, 0x10);
                snd_hda_codec_write_cache(codec, codec->afg, 0,
                                          AC_VERB_SET_UNSOLICITED_ENABLE,
index 0e06c6c9fcc01d1406e3ba61921aece7bef9196f..73de6e989b3d4ab78069d8b24240637890fd3131 100644 (file)
@@ -1229,8 +1229,11 @@ static int __devinit pcxhr_probe(struct pci_dev *pci, const struct pci_device_id
                return -ENOMEM;
        }
 
-       if (snd_BUG_ON(pci_id->driver_data >= PCI_ID_LAST))
+       if (snd_BUG_ON(pci_id->driver_data >= PCI_ID_LAST)) {
+               kfree(mgr);
+               pci_disable_device(pci);
                return -ENODEV;
+       }
        card_name = pcxhr_board_params[pci_id->driver_data].board_name;
        mgr->playback_chips = pcxhr_board_params[pci_id->driver_data].playback_chips;
        mgr->capture_chips  = pcxhr_board_params[pci_id->driver_data].capture_chips;
index bba9546ba5f5c30d076cb7962359d9405f1cc0fa..8d73edc561026d4464f1c12868d5de9505726656 100644 (file)
@@ -20,7 +20,8 @@ config SND_SOC_MPC8610_HPCD
 
 config SND_SOC_MPC5200_I2S
        tristate "Freescale MPC5200 PSC in I2S mode driver"
+       depends on SND_SOC && PPC_MPC52xx && PPC_BESTCOMM
        select SND_SOC_OF_SIMPLE
-       depends on SND_SOC && PPC_MPC52xx
+       select PPC_BESTCOMM_GEN_BD
        help
          Say Y here to support the MPC5200 PSCs in I2S mode.
index e9084fdd2082efcbc14695e801ec6ad89ff66599..acd68efb2b758dc59692036d4bd6f445854dc985 100644 (file)
@@ -233,7 +233,7 @@ static int omap_pcm_open(struct snd_pcm_substream *substream)
        if (ret < 0)
                goto out;
 
-       prtd = kzalloc(sizeof(prtd), GFP_KERNEL);
+       prtd = kzalloc(sizeof(*prtd), GFP_KERNEL);
        if (prtd == NULL) {
                ret = -ENOMEM;
                goto out;
index a75b289a5d78465c25ccf2aab83958e3e8a0a67d..10ba4218161b04936892bd72e6ca15688f2e36ef 100644 (file)
@@ -457,7 +457,7 @@ EXPORT_SYMBOL(unregister_sound_mixer);
 
 void unregister_sound_midi(int unit)
 {
-       return sound_remove_unit(&chains[2], unit);
+       sound_remove_unit(&chains[2], unit);
 }
 
 EXPORT_SYMBOL(unregister_sound_midi);
@@ -474,7 +474,7 @@ EXPORT_SYMBOL(unregister_sound_midi);
 
 void unregister_sound_dsp(int unit)
 {
-       return sound_remove_unit(&chains[3], unit);
+       sound_remove_unit(&chains[3], unit);
 }
 
 
@@ -507,7 +507,7 @@ static struct sound_unit *__look_for_unit(int chain, int unit)
        return NULL;
 }
 
-int soundcore_open(struct inode *inode, struct file *file)
+static int soundcore_open(struct inode *inode, struct file *file)
 {
        int chain;
        int unit = iminor(inode);