aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--Documentation/SubmittingPatches2
-rw-r--r--Documentation/cciss.txt1
-rw-r--r--Documentation/feature-removal-schedule.txt20
-rw-r--r--Documentation/i386/boot.txt1
-rw-r--r--Documentation/i386/zero-page.txt4
-rw-r--r--Documentation/kernel-parameters.txt8
-rw-r--r--Documentation/networking/ip-sysctl.txt12
-rw-r--r--Documentation/powerpc/booting-without-of.txt6
-rw-r--r--MAINTAINERS13
-rw-r--r--Makefile9
-rw-r--r--arch/arm/configs/csb337_defconfig37
-rw-r--r--arch/arm/configs/pnx4008_defconfig715
-rw-r--r--arch/arm/mach-ixp4xx/nslu2-pci.c1
-rw-r--r--arch/arm/mach-ixp4xx/nslu2-power.c1
-rw-r--r--arch/arm/mach-s3c2410/Kconfig8
-rw-r--r--arch/arm/mach-s3c2410/Makefile1
-rw-r--r--arch/arm/mach-s3c2410/cpu.h10
-rw-r--r--arch/arm/mach-s3c2410/devs.c12
-rw-r--r--arch/arm/mach-s3c2410/dma.c88
-rw-r--r--arch/arm/mach-s3c2410/irq.c4
-rw-r--r--arch/arm/mach-s3c2410/irq.h10
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c25
-rw-r--r--arch/arm/mach-s3c2410/mach-h1940.c17
-rw-r--r--arch/arm/mach-s3c2410/mach-rx3715.c9
-rw-r--r--arch/arm/mach-s3c2410/mach-smdk2410.c4
-rw-r--r--arch/arm/mach-s3c2410/mach-smdk2413.c15
-rw-r--r--arch/arm/mach-s3c2410/mach-vr1000.c19
-rw-r--r--arch/arm/mach-s3c2410/s3c2400-gpio.c5
-rw-r--r--arch/arm/mach-s3c2410/s3c2410.h8
-rw-r--r--arch/arm/mach-s3c2410/s3c2412-irq.c130
-rw-r--r--arch/arm/mach-s3c2410/s3c2412.c29
-rw-r--r--arch/arm/mach-s3c2410/s3c2440-irq.c3
-rw-r--r--arch/arm/mach-s3c2410/s3c244x-irq.c12
-rw-r--r--arch/arm/mm/flush.c26
-rw-r--r--arch/arm/mm/proc-arm926.S2
-rw-r--r--arch/arm/mm/proc-xscale.S2
-rw-r--r--arch/arm/vfp/vfp.h10
-rw-r--r--arch/arm/vfp/vfpdouble.c20
-rw-r--r--arch/arm/vfp/vfphw.S10
-rw-r--r--arch/arm/vfp/vfpsingle.c20
-rw-r--r--arch/frv/Kconfig4
-rw-r--r--arch/frv/kernel/time.c81
-rw-r--r--arch/i386/kernel/Makefile1
-rw-r--r--arch/i386/kernel/audit.c23
-rw-r--r--arch/i386/kernel/entry.S4
-rw-r--r--arch/i386/kernel/head.S14
-rw-r--r--arch/i386/kernel/hpet.c2
-rw-r--r--arch/i386/kernel/irq.c5
-rw-r--r--arch/i386/kernel/setup.c32
-rw-r--r--arch/i386/kernel/traps.c27
-rw-r--r--arch/i386/oprofile/nmi_int.c2
-rw-r--r--arch/i386/pci/common.c5
-rw-r--r--arch/i386/pci/mmconfig.c34
-rw-r--r--arch/i386/pci/pci.h3
-rw-r--r--arch/ia64/Kconfig8
-rw-r--r--arch/ia64/ia32/audit.c26
-rw-r--r--arch/ia64/kernel/audit.c35
-rw-r--r--arch/ia64/kernel/entry.S4
-rw-r--r--arch/ia64/kernel/head.S5
-rw-r--r--arch/ia64/kernel/perfmon.c4
-rw-r--r--arch/ia64/kernel/sys_ia64.c28
-rw-r--r--arch/ia64/kernel/topology.c6
-rw-r--r--arch/ia64/sn/kernel/setup.c2
-rw-r--r--arch/ia64/sn/kernel/xpc_channel.c4
-rw-r--r--arch/ia64/sn/kernel/xpc_main.c28
-rw-r--r--arch/ia64/sn/kernel/xpc_partition.c24
-rw-r--r--arch/powerpc/Kconfig24
-rw-r--r--arch/powerpc/boot/dts/mpc7448hpc2.dts190
-rw-r--r--arch/powerpc/boot/dts/mpc8349emds.dts328
-rw-r--r--arch/powerpc/configs/cell_defconfig58
-rw-r--r--arch/powerpc/configs/chrp32_defconfig31
-rw-r--r--arch/powerpc/configs/g5_defconfig9
-rw-r--r--arch/powerpc/configs/iseries_defconfig7
-rw-r--r--arch/powerpc/configs/maple_defconfig129
-rw-r--r--arch/powerpc/configs/mpc7448_hpc2_defconfig64
-rw-r--r--arch/powerpc/configs/mpc834x_itx_defconfig20
-rw-r--r--arch/powerpc/configs/mpc834x_mds_defconfig (renamed from arch/powerpc/configs/mpc834x_sys_defconfig)104
-rw-r--r--arch/powerpc/configs/mpc8540_ads_defconfig84
-rw-r--r--arch/powerpc/configs/mpc85xx_cds_defconfig75
-rw-r--r--arch/powerpc/configs/mpc8641_hpcn_defconfig62
-rw-r--r--arch/powerpc/configs/pmac32_defconfig18
-rw-r--r--arch/powerpc/configs/ppc64_defconfig198
-rw-r--r--arch/powerpc/configs/pseries_defconfig8
-rw-r--r--arch/powerpc/kernel/Makefile2
-rw-r--r--arch/powerpc/kernel/audit.c66
-rw-r--r--arch/powerpc/kernel/compat_audit.c38
-rw-r--r--arch/powerpc/kernel/crash.c2
-rw-r--r--arch/powerpc/kernel/fpu.S5
-rw-r--r--arch/powerpc/kernel/irq.c84
-rw-r--r--arch/powerpc/kernel/misc.S49
-rw-r--r--arch/powerpc/kernel/pci_64.c11
-rw-r--r--arch/powerpc/kernel/ppc_ksyms.c4
-rw-r--r--arch/powerpc/kernel/prom_init.c10
-rw-r--r--arch/powerpc/kernel/prom_parse.c17
-rw-r--r--arch/powerpc/kernel/smp-tbsync.c5
-rw-r--r--arch/powerpc/kernel/time.c25
-rw-r--r--arch/powerpc/lib/memcpy_64.S11
-rw-r--r--arch/powerpc/mm/44x_mmu.c4
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_itx.c49
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_sys.c56
-rw-r--r--arch/powerpc/platforms/83xx/mpc83xx.h1
-rw-r--r--arch/powerpc/platforms/83xx/pci.c9
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c28
-rw-r--r--arch/powerpc/platforms/86xx/pci.c3
-rw-r--r--arch/powerpc/platforms/embedded6xx/Kconfig1
-rw-r--r--arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c2
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_base.c2
-rw-r--r--arch/powerpc/platforms/powermac/pic.c6
-rw-r--r--arch/powerpc/sysdev/Makefile4
-rw-r--r--arch/powerpc/sysdev/dart_iommu.c7
-rw-r--r--arch/powerpc/sysdev/ipic.c303
-rw-r--r--arch/powerpc/sysdev/ipic.h23
-rw-r--r--arch/powerpc/sysdev/mpic.c223
-rw-r--r--arch/ppc/configs/prep_defconfig585
-rw-r--r--arch/ppc/kernel/smp-tbsync.c7
-rw-r--r--arch/ppc/syslib/Makefile2
-rw-r--r--arch/ppc/syslib/ipic.c646
-rw-r--r--arch/ppc/syslib/ipic.h47
-rw-r--r--arch/s390/Kconfig4
-rw-r--r--arch/s390/kernel/Makefile4
-rw-r--r--arch/s390/kernel/audit.c66
-rw-r--r--arch/s390/kernel/compat_audit.c38
-rw-r--r--arch/s390/lib/uaccess.S33
-rw-r--r--arch/s390/lib/uaccess64.S35
-rw-r--r--arch/sh64/Makefile1
-rw-r--r--arch/sh64/kernel/process.c3
-rw-r--r--arch/sh64/mach-cayman/setup.c6
-rw-r--r--arch/sh64/mm/ioremap.c4
-rw-r--r--arch/sparc/kernel/sys_sparc.c37
-rw-r--r--arch/sparc64/Kconfig4
-rw-r--r--arch/sparc64/kernel/Makefile3
-rw-r--r--arch/sparc64/kernel/audit.c66
-rw-r--r--arch/sparc64/kernel/compat_audit.c37
-rw-r--r--arch/sparc64/kernel/sys_sparc.c46
-rw-r--r--arch/sparc64/mm/generic.c2
-rw-r--r--arch/x86_64/Kconfig4
-rw-r--r--arch/x86_64/defconfig66
-rw-r--r--arch/x86_64/ia32/audit.c26
-rw-r--r--arch/x86_64/ia32/ia32_binfmt.c57
-rw-r--r--arch/x86_64/kernel/audit.c35
-rw-r--r--arch/x86_64/kernel/e820.c35
-rw-r--r--arch/x86_64/kernel/entry.S3
-rw-r--r--arch/x86_64/kernel/head.S1
-rw-r--r--arch/x86_64/kernel/init_task.c5
-rw-r--r--arch/x86_64/kernel/setup.c6
-rw-r--r--arch/x86_64/kernel/setup64.c3
-rw-r--r--arch/x86_64/kernel/traps.c30
-rw-r--r--arch/x86_64/pci/mmconfig.c34
-rw-r--r--arch/xtensa/kernel/ptrace.c2
-rw-r--r--drivers/atm/he.c9
-rw-r--r--drivers/block/cciss.c10
-rw-r--r--drivers/block/floppy.c12
-rw-r--r--drivers/char/drm/radeon_state.c9
-rw-r--r--drivers/char/hvc_console.c1
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c1
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c9
-rw-r--r--drivers/char/synclink_gt.c14
-rw-r--r--drivers/char/watchdog/sbc8360.c4
-rw-r--r--drivers/ide/ide-proc.c2
-rw-r--r--drivers/ide/pci/aec62xx.c12
-rw-r--r--drivers/ide/pci/alim15x3.c2
-rw-r--r--drivers/ide/pci/serverworks.c10
-rw-r--r--drivers/ide/pci/sgiioc4.c60
-rw-r--r--drivers/ide/pci/siimage.c6
-rw-r--r--drivers/ide/pci/sis5513.c2
-rw-r--r--drivers/ide/pci/via82cxxx.c3
-rw-r--r--drivers/infiniband/core/cma.c2
-rw-r--r--drivers/infiniband/hw/mthca/mthca_allocator.c15
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c1
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c14
-rw-r--r--drivers/macintosh/via-pmu-backlight.c99
-rw-r--r--drivers/macintosh/via-pmu.c12
-rw-r--r--drivers/md/raid1.c57
-rw-r--r--drivers/media/Kconfig2
-rw-r--r--drivers/media/common/saa7146_video.c2
-rw-r--r--drivers/media/dvb/b2c2/Kconfig1
-rw-r--r--drivers/media/dvb/bt8xx/Kconfig1
-rw-r--r--drivers/media/dvb/dvb-usb/Kconfig1
-rw-r--r--drivers/media/dvb/frontends/Kconfig60
-rw-r--r--drivers/media/dvb/frontends/Makefile2
-rw-r--r--drivers/media/dvb/pluto2/Kconfig1
-rw-r--r--drivers/media/dvb/ttpci/Kconfig5
-rw-r--r--drivers/media/dvb/ttusb-budget/Kconfig3
-rw-r--r--drivers/media/video/Kconfig8
-rw-r--r--drivers/media/video/bt8xx/bttv-input.c1
-rw-r--r--drivers/media/video/cx88/Kconfig1
-rw-r--r--drivers/media/video/saa7134/Kconfig1
-rw-r--r--drivers/media/video/tuner-types.c10
-rw-r--r--drivers/media/video/zoran.h2
-rw-r--r--drivers/media/video/zoran_driver.c22
-rw-r--r--drivers/mmc/imxmmc.c69
-rw-r--r--drivers/mmc/mmc.c55
-rw-r--r--drivers/mmc/mmc_block.c60
-rw-r--r--drivers/net/Kconfig2
-rw-r--r--drivers/net/dm9000.c4
-rw-r--r--drivers/net/e100.c6
-rw-r--r--drivers/net/e1000/e1000_main.c8
-rw-r--r--drivers/net/mv643xx_eth.c2
-rw-r--r--drivers/net/sunlance.c27
-rw-r--r--drivers/net/wireless/strip.c6
-rw-r--r--drivers/net/wireless/zd1211rw/zd_chip.c61
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c43
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.h11
-rw-r--r--drivers/pci/quirks.c1
-rw-r--r--drivers/s390/block/dasd.c192
-rw-r--r--drivers/s390/block/dasd_genhd.c10
-rw-r--r--drivers/s390/cio/ccwgroup.c14
-rw-r--r--drivers/s390/cio/chsc.c10
-rw-r--r--drivers/s390/cio/device.c19
-rw-r--r--drivers/s390/cio/device_fsm.c20
-rw-r--r--drivers/s390/cio/device_pgid.c27
-rw-r--r--drivers/s390/net/Kconfig9
-rw-r--r--drivers/s390/net/Makefile1
-rw-r--r--drivers/s390/net/ctcmain.c3
-rw-r--r--drivers/s390/net/iucv.c4
-rw-r--r--drivers/s390/net/lcs.c13
-rw-r--r--drivers/s390/net/netiucv.c80
-rw-r--r--drivers/s390/net/qeth.h73
-rw-r--r--drivers/s390/net/qeth_eddp.c5
-rw-r--r--drivers/s390/net/qeth_main.c517
-rw-r--r--drivers/s390/net/qeth_proc.c23
-rw-r--r--drivers/s390/net/qeth_sys.c64
-rw-r--r--drivers/s390/net/qeth_tso.h2
-rw-r--r--drivers/sbus/char/openprom.c13
-rw-r--r--drivers/scsi/ata_piix.c36
-rw-r--r--drivers/scsi/libata-core.c13
-rw-r--r--drivers/scsi/sata_mv.c3
-rw-r--r--drivers/scsi/sata_via.c1
-rw-r--r--drivers/scsi/scsi_error.c2
-rw-r--r--drivers/serial/8250_pci.c17
-rw-r--r--drivers/serial/s3c2410.c2
-rw-r--r--drivers/serial/serial_core.c3
-rw-r--r--drivers/serial/sh-sci.c4
-rw-r--r--drivers/usb/gadget/ether.c45
-rw-r--r--drivers/usb/host/uhci-q.c4
-rw-r--r--drivers/usb/input/hid-core.c149
-rw-r--r--drivers/usb/input/usbtouchscreen.c2
-rw-r--r--drivers/usb/input/yealink.c12
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb.c2
-rw-r--r--drivers/usb/net/pegasus.h3
-rw-r--r--drivers/usb/net/rtl8150.c1
-rw-r--r--drivers/usb/serial/ftdi_sio.c1
-rw-r--r--drivers/usb/serial/ftdi_sio.h5
-rw-r--r--drivers/usb/serial/usb-serial.c4
-rw-r--r--drivers/usb/storage/unusual_devs.h24
-rw-r--r--drivers/video/aty/aty128fb.c18
-rw-r--r--drivers/video/aty/atyfb_base.c18
-rw-r--r--drivers/video/aty/radeon_backlight.c4
-rw-r--r--drivers/video/nvidia/nv_backlight.c18
-rw-r--r--drivers/video/riva/fbdev.c18
-rw-r--r--fs/cifs/readdir.c11
-rw-r--r--fs/ext2/balloc.c1
-rw-r--r--fs/ext2/ialloc.c1
-rw-r--r--fs/ext2/super.c41
-rw-r--r--fs/ext3/inode.c13
-rw-r--r--fs/ext3/super.c42
-rw-r--r--fs/jbd/transaction.c2
-rw-r--r--fs/nfs/direct.c50
-rw-r--r--fs/nfs/read.c24
-rw-r--r--fs/nfs/write.c37
-rw-r--r--fs/super.c1
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.c18
-rw-r--r--fs/xfs/linux-2.6/xfs_lrw.c27
-rw-r--r--fs/xfs/quota/xfs_qm_bhv.c2
-rw-r--r--fs/xfs/xfs_alloc.h20
-rw-r--r--fs/xfs/xfs_bmap.c2
-rw-r--r--fs/xfs/xfs_fsops.c16
-rw-r--r--fs/xfs/xfs_mount.c32
-rw-r--r--fs/xfs/xfs_vfsops.c3
-rw-r--r--include/asm-alpha/Kbuild2
-rw-r--r--include/asm-alpha/compiler.h3
-rw-r--r--include/asm-alpha/page.h6
-rw-r--r--include/asm-arm/arch-s3c2410/anubis-cpld.h3
-rw-r--r--include/asm-arm/arch-s3c2410/anubis-irq.h4
-rw-r--r--include/asm-arm/arch-s3c2410/anubis-map.h2
-rw-r--r--include/asm-arm/arch-s3c2410/audio.h4
-rw-r--r--include/asm-arm/arch-s3c2410/bast-cpld.h5
-rw-r--r--include/asm-arm/arch-s3c2410/bast-irq.h6
-rw-r--r--include/asm-arm/arch-s3c2410/bast-map.h4
-rw-r--r--include/asm-arm/arch-s3c2410/bast-pmu.h3
-rw-r--r--include/asm-arm/arch-s3c2410/debug-macro.S3
-rw-r--r--include/asm-arm/arch-s3c2410/dma.h150
-rw-r--r--include/asm-arm/arch-s3c2410/fb.h7
-rw-r--r--include/asm-arm/arch-s3c2410/hardware.h10
-rw-r--r--include/asm-arm/arch-s3c2410/idle.h4
-rw-r--r--include/asm-arm/arch-s3c2410/iic.h4
-rw-r--r--include/asm-arm/arch-s3c2410/io.h8
-rw-r--r--include/asm-arm/arch-s3c2410/irqs.h9
-rw-r--r--include/asm-arm/arch-s3c2410/map.h7
-rw-r--r--include/asm-arm/arch-s3c2410/memory.h14
-rw-r--r--include/asm-arm/arch-s3c2410/nand.h3
-rw-r--r--include/asm-arm/arch-s3c2410/osiris-map.h2
-rw-r--r--include/asm-arm/arch-s3c2410/regs-adc.h3
-rw-r--r--include/asm-arm/arch-s3c2410/regs-clock.h12
-rw-r--r--include/asm-arm/arch-s3c2410/regs-gpio.h15
-rw-r--r--include/asm-arm/arch-s3c2410/regs-gpioj.h4
-rw-r--r--include/asm-arm/arch-s3c2410/regs-iic.h4
-rw-r--r--include/asm-arm/arch-s3c2410/regs-iis.h12
-rw-r--r--include/asm-arm/arch-s3c2410/regs-irq.h9
-rw-r--r--include/asm-arm/arch-s3c2410/regs-lcd.h8
-rw-r--r--include/asm-arm/arch-s3c2410/regs-mem.h6
-rw-r--r--include/asm-arm/arch-s3c2410/regs-nand.h4
-rw-r--r--include/asm-arm/arch-s3c2410/regs-power.h34
-rw-r--r--include/asm-arm/arch-s3c2410/regs-rtc.h5
-rw-r--r--include/asm-arm/arch-s3c2410/regs-sdi.h5
-rw-r--r--include/asm-arm/arch-s3c2410/regs-serial.h5
-rw-r--r--include/asm-arm/arch-s3c2410/regs-spi.h8
-rw-r--r--include/asm-arm/arch-s3c2410/regs-timer.h7
-rw-r--r--include/asm-arm/arch-s3c2410/regs-udc.h8
-rw-r--r--include/asm-arm/arch-s3c2410/regs-watchdog.h7
-rw-r--r--include/asm-arm/arch-s3c2410/system.h9
-rw-r--r--include/asm-arm/arch-s3c2410/timex.h6
-rw-r--r--include/asm-arm/arch-s3c2410/uncompress.h9
-rw-r--r--include/asm-arm/arch-s3c2410/usb-control.h5
-rw-r--r--include/asm-arm/arch-s3c2410/vmalloc.h6
-rw-r--r--include/asm-arm/arch-s3c2410/vr1000-cpld.h4
-rw-r--r--include/asm-arm/arch-s3c2410/vr1000-irq.h6
-rw-r--r--include/asm-arm/arch-s3c2410/vr1000-map.h6
-rw-r--r--include/asm-arm/cacheflush.h18
-rw-r--r--include/asm-arm/elf.h2
-rw-r--r--include/asm-arm/page.h4
-rw-r--r--include/asm-arm/spinlock.h16
-rw-r--r--include/asm-generic/Kbuild.asm2
-rw-r--r--include/asm-generic/audit_read.h8
-rw-r--r--include/asm-generic/audit_write.h11
-rw-r--r--include/asm-i386/Kbuild4
-rw-r--r--include/asm-i386/alternative.h20
-rw-r--r--include/asm-i386/elf.h10
-rw-r--r--include/asm-i386/mach-default/mach_mpspec.h4
-rw-r--r--include/asm-i386/rwlock.h28
-rw-r--r--include/asm-i386/setup.h2
-rw-r--r--include/asm-i386/signal.h4
-rw-r--r--include/asm-i386/spinlock.h17
-rw-r--r--include/asm-i386/system.h8
-rw-r--r--include/asm-i386/unwind.h1
-rw-r--r--include/asm-ia64/Kbuild2
-rw-r--r--include/asm-ia64/mman.h8
-rw-r--r--include/asm-ia64/page.h4
-rw-r--r--include/asm-ia64/ptrace.h10
-rw-r--r--include/asm-ia64/sn/sn_sal.h6
-rw-r--r--include/asm-ia64/sn/xp.h22
-rw-r--r--include/asm-ia64/sn/xpc.h4
-rw-r--r--include/asm-ia64/unistd.h3
-rw-r--r--include/asm-ia64/ustack.h7
-rw-r--r--include/asm-m68k/page.h8
-rw-r--r--include/asm-mips/page.h8
-rw-r--r--include/asm-parisc/page.h18
-rw-r--r--include/asm-powerpc/eeh.h3
-rw-r--r--include/asm-powerpc/futex.h28
-rw-r--r--include/asm-powerpc/io.h50
-rw-r--r--include/asm-powerpc/ipic.h12
-rw-r--r--include/asm-powerpc/kdump.h2
-rw-r--r--include/asm-powerpc/mpc86xx.h3
-rw-r--r--include/asm-powerpc/mpic.h125
-rw-r--r--include/asm-powerpc/paca.h1
-rw-r--r--include/asm-powerpc/prom.h4
-rw-r--r--include/asm-powerpc/spinlock.h17
-rw-r--r--include/asm-powerpc/time.h4
-rw-r--r--include/asm-ppc/io.h20
-rw-r--r--include/asm-s390/debug.h2
-rw-r--r--include/asm-s390/elf.h28
-rw-r--r--include/asm-sh/page.h2
-rw-r--r--include/asm-sh64/bug.h16
-rw-r--r--include/asm-sh64/byteorder.h4
-rw-r--r--include/asm-sh64/dma-mapping.h16
-rw-r--r--include/asm-sh64/io.h7
-rw-r--r--include/asm-sh64/ptrace.h2
-rw-r--r--include/asm-sh64/system.h2
-rw-r--r--include/asm-sh64/uaccess.h19
-rw-r--r--include/asm-sparc/mman.h8
-rw-r--r--include/asm-sparc64/mman.h8
-rw-r--r--include/asm-x86_64/alternative.h21
-rw-r--r--include/asm-x86_64/elf.h20
-rw-r--r--include/asm-x86_64/processor.h6
-rw-r--r--include/asm-x86_64/signal.h2
-rw-r--r--include/asm-x86_64/spinlock.h11
-rw-r--r--include/asm-x86_64/unistd.h11
-rw-r--r--include/asm-x86_64/unwind.h1
-rw-r--r--include/asm-x86_64/vsyscall.h3
-rw-r--r--include/linux/atmdev.h2
-rw-r--r--include/linux/audit.h11
-rw-r--r--include/linux/delayacct.h10
-rw-r--r--include/linux/hrtimer.h1
-rw-r--r--include/linux/ktime.h7
-rw-r--r--include/linux/mmc/host.h2
-rw-r--r--include/linux/mmc/mmc.h2
-rw-r--r--include/linux/mmzone.h1
-rw-r--r--include/linux/netfilter/Kbuild2
-rw-r--r--include/linux/nfs_fs.h58
-rw-r--r--include/linux/nfs_xdr.h4
-rw-r--r--include/linux/pci_ids.h3
-rw-r--r--include/linux/sched.h1
-rw-r--r--include/linux/timex.h3
-rw-r--r--include/linux/videodev.h3
-rw-r--r--include/linux/videodev2.h2
-rw-r--r--include/media/v4l2-dev.h7
-rw-r--r--init/Kconfig56
-rw-r--r--kernel/audit.c6
-rw-r--r--kernel/audit.h1
-rw-r--r--kernel/auditfilter.c37
-rw-r--r--kernel/auditsc.c51
-rw-r--r--kernel/delayacct.c16
-rw-r--r--kernel/exit.c3
-rw-r--r--kernel/fork.c6
-rw-r--r--kernel/futex.c84
-rw-r--r--kernel/irq/chip.c6
-rw-r--r--kernel/irq/handle.c5
-rw-r--r--kernel/irq/resend.c3
-rw-r--r--kernel/kmod.c5
-rw-r--r--kernel/lockdep_internals.h2
-rw-r--r--kernel/panic.c2
-rw-r--r--kernel/power/Kconfig6
-rw-r--r--kernel/rcupdate.c6
-rw-r--r--kernel/spinlock.c2
-rw-r--r--lib/Kconfig5
-rw-r--r--lib/Makefile1
-rw-r--r--lib/audit.c53
-rw-r--r--mm/mempolicy.c10
-rw-r--r--mm/mempool.c9
-rw-r--r--mm/mmap.c17
-rw-r--r--mm/truncate.c11
-rw-r--r--mm/vmstat.c151
-rw-r--r--net/Kconfig2
-rw-r--r--net/atm/clip.c2
-rw-r--r--net/bridge/br_stp_bpdu.c2
-rw-r--r--net/core/neighbour.c3
-rw-r--r--net/ipv4/ip_output.c1
-rw-r--r--net/ipv4/ipvs/ip_vs_ftp.c27
-rw-r--r--net/ipv4/tcp_cong.c2
-rw-r--r--net/ipv4/tcp_input.c11
-rw-r--r--net/ipv4/tcp_lp.c35
-rw-r--r--net/ipv6/addrconf.c4
-rw-r--r--net/ipv6/datagram.c2
-rw-r--r--net/ipv6/exthdrs.c29
-rw-r--r--net/ipv6/icmp.c4
-rw-r--r--net/ipv6/ipv6_sockglue.c4
-rw-r--r--net/ipv6/raw.c2
-rw-r--r--net/ipv6/route.c4
-rw-r--r--net/netlink/af_netlink.c14
-rw-r--r--net/packet/af_packet.c4
-rw-r--r--net/sched/sch_generic.c2
-rw-r--r--net/sctp/socket.c10
-rw-r--r--net/socket.c3
-rw-r--r--scripts/Makefile.headersinst8
-rw-r--r--scripts/Makefile.host2
-rwxr-xr-xscripts/hdrcheck.sh4
-rw-r--r--sound/oss/Kconfig30
-rw-r--r--sound/pci/ac97/ac97_codec.c4
449 files changed, 6956 insertions, 3999 deletions
diff --git a/.gitignore b/.gitignore
index b1f5b9df2ae1..e1d5c17c12c2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,9 @@
12*.ko 12*.ko
13*.so 13*.so
14*.mod.c 14*.mod.c
15*.i
16*.lst
17*.symtypes
15 18
16# 19#
17# Top-level generic files 20# Top-level generic files
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 2cd7f02ffd0b..d42ab4c9e893 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -308,6 +308,8 @@ then you just add a line saying
308 308
309 Signed-off-by: Random J Developer <random@developer.example.org> 309 Signed-off-by: Random J Developer <random@developer.example.org>
310 310
311using your real name (sorry, no pseudonyms or anonymous contributions.)
312
311Some people also put extra tags at the end. They'll just be ignored for 313Some people also put extra tags at the end. They'll just be ignored for
312now, but you can do this to mark internal company procedures or just 314now, but you can do this to mark internal company procedures or just
313point out some special detail about the sign-off. 315point out some special detail about the sign-off.
diff --git a/Documentation/cciss.txt b/Documentation/cciss.txt
index 15378422fc46..9c629ffa0e58 100644
--- a/Documentation/cciss.txt
+++ b/Documentation/cciss.txt
@@ -20,6 +20,7 @@ This driver is known to work with the following cards:
20 * SA P400i 20 * SA P400i
21 * SA E200 21 * SA E200
22 * SA E200i 22 * SA E200i
23 * SA E500
23 24
24If nodes are not already created in the /dev/cciss directory, run as root: 25If nodes are not already created in the /dev/cciss directory, run as root:
25 26
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 87851efb0228..552507fe9a7e 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -120,6 +120,13 @@ Who: Adrian Bunk <bunk@stusta.de>
120 120
121--------------------------- 121---------------------------
122 122
123What: drivers depending on OSS_OBSOLETE_DRIVER
124When: options in 2.6.20, code in 2.6.22
125Why: OSS drivers with ALSA replacements
126Who: Adrian Bunk <bunk@stusta.de>
127
128---------------------------
129
123What: pci_module_init(driver) 130What: pci_module_init(driver)
124When: January 2007 131When: January 2007
125Why: Is replaced by pci_register_driver(pci_driver). 132Why: Is replaced by pci_register_driver(pci_driver).
@@ -274,3 +281,16 @@ Why: The deferred output hooks are a layering violation causing unusual
274Who: Patrick McHardy <kaber@trash.net> 281Who: Patrick McHardy <kaber@trash.net>
275 282
276--------------------------- 283---------------------------
284
285What: frame diverter
286When: November 2006
287Why: The frame diverter is included in most distribution kernels, but is
288 broken. It does not correctly handle many things:
289 - IPV6
290 - non-linear skb's
291 - network device RCU on removal
292 - input frames not correctly checked for protocol errors
293 It also adds allocation overhead even if not enabled.
294 It is not clear if anyone is still using it.
295Who: Stephen Hemminger <shemminger@osdl.org>
296
diff --git a/Documentation/i386/boot.txt b/Documentation/i386/boot.txt
index 10312bebe55d..c51314b1a463 100644
--- a/Documentation/i386/boot.txt
+++ b/Documentation/i386/boot.txt
@@ -181,6 +181,7 @@ filled out, however:
181 5 ELILO 181 5 ELILO
182 7 GRuB 182 7 GRuB
183 8 U-BOOT 183 8 U-BOOT
184 9 Xen
184 185
185 Please contact <hpa@zytor.com> if you need a bootloader ID 186 Please contact <hpa@zytor.com> if you need a bootloader ID
186 value assigned. 187 value assigned.
diff --git a/Documentation/i386/zero-page.txt b/Documentation/i386/zero-page.txt
index df28c7416781..c04a421f4a7c 100644
--- a/Documentation/i386/zero-page.txt
+++ b/Documentation/i386/zero-page.txt
@@ -63,6 +63,10 @@ Offset Type Description
63 2 for bootsect-loader 63 2 for bootsect-loader
64 3 for SYSLINUX 64 3 for SYSLINUX
65 4 for ETHERBOOT 65 4 for ETHERBOOT
66 5 for ELILO
67 7 for GRuB
68 8 for U-BOOT
69 9 for Xen
66 V = version 70 V = version
670x211 char loadflags: 710x211 char loadflags:
68 bit0 = 1: kernel is loaded high (bzImage) 72 bit0 = 1: kernel is loaded high (bzImage)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index b50595a0550f..87a17337c7f6 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -697,6 +697,12 @@ running once the system is up.
697 ips= [HW,SCSI] Adaptec / IBM ServeRAID controller 697 ips= [HW,SCSI] Adaptec / IBM ServeRAID controller
698 See header of drivers/scsi/ips.c. 698 See header of drivers/scsi/ips.c.
699 699
700 ports= [IP_VS_FTP] IPVS ftp helper module
701 Default is 21.
702 Up to 8 (IP_VS_APP_MAX_PORTS) ports
703 may be specified.
704 Format: <port>,<port>....
705
700 irqfixup [HW] 706 irqfixup [HW]
701 When an interrupt is not handled search all handlers 707 When an interrupt is not handled search all handlers
702 for it. Intended to get systems with badly broken 708 for it. Intended to get systems with badly broken
@@ -1183,6 +1189,8 @@ running once the system is up.
1183 Mechanism 2. 1189 Mechanism 2.
1184 nommconf [IA-32,X86_64] Disable use of MMCONFIG for PCI 1190 nommconf [IA-32,X86_64] Disable use of MMCONFIG for PCI
1185 Configuration 1191 Configuration
1192 mmconf [IA-32,X86_64] Force MMCONFIG. This is useful
1193 to override the builtin blacklist.
1186 nomsi [MSI] If the PCI_MSI kernel config parameter is 1194 nomsi [MSI] If the PCI_MSI kernel config parameter is
1187 enabled, this kernel boot option can be used to 1195 enabled, this kernel boot option can be used to
1188 disable the use of MSI interrupts system-wide. 1196 disable the use of MSI interrupts system-wide.
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index 3e0c017e7877..90ed78110fd4 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -102,9 +102,15 @@ inet_peer_gc_maxtime - INTEGER
102TCP variables: 102TCP variables:
103 103
104tcp_abc - INTEGER 104tcp_abc - INTEGER
105 Controls Appropriate Byte Count defined in RFC3465. If set to 105 Controls Appropriate Byte Count (ABC) defined in RFC3465.
106 0 then does congestion avoid once per ack. 1 is conservative 106 ABC is a way of increasing congestion window (cwnd) more slowly
107 value, and 2 is more agressive. 107 in response to partial acknowledgments.
108 Possible values are:
109 0 increase cwnd once per acknowledgment (no ABC)
110 1 increase cwnd once per acknowledgment of full sized segment
111 2 allow increase cwnd by two if acknowledgment is
112 of two segments to compensate for delayed acknowledgments.
113 Default: 0 (off)
108 114
109tcp_syn_retries - INTEGER 115tcp_syn_retries - INTEGER
110 Number of times initial SYNs for an active TCP connection attempt 116 Number of times initial SYNs for an active TCP connection attempt
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index 8c48b8a27b9c..5c0ba235f5a5 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -1136,10 +1136,10 @@ Sense and level information should be encoded as follows:
1136 Devices connected to openPIC-compatible controllers should encode 1136 Devices connected to openPIC-compatible controllers should encode
1137 sense and polarity as follows: 1137 sense and polarity as follows:
1138 1138
1139 0 = high to low edge sensitive type enabled 1139 0 = low to high edge sensitive type enabled
1140 1 = active low level sensitive type enabled 1140 1 = active low level sensitive type enabled
1141 2 = low to high edge sensitive type enabled 1141 2 = active high level sensitive type enabled
1142 3 = active high level sensitive type enabled 1142 3 = high to low edge sensitive type enabled
1143 1143
1144 ISA PIC interrupt controllers should adhere to the ISA PIC 1144 ISA PIC interrupt controllers should adhere to the ISA PIC
1145 encodings listed below: 1145 encodings listed below:
diff --git a/MAINTAINERS b/MAINTAINERS
index 3bab239e82fe..a34c53c08742 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -416,7 +416,7 @@ S: Supported
416ATM 416ATM
417P: Chas Williams 417P: Chas Williams
418M: chas@cmf.nrl.navy.mil 418M: chas@cmf.nrl.navy.mil
419L: linux-atm-general@lists.sourceforge.net 419L: linux-atm-general@lists.sourceforge.net (subscribers-only)
420W: http://linux-atm.sourceforge.net 420W: http://linux-atm.sourceforge.net
421S: Maintained 421S: Maintained
422 422
@@ -2810,6 +2810,14 @@ M: hadi@cyberus.ca
2810L: netdev@vger.kernel.org 2810L: netdev@vger.kernel.org
2811S: Maintained 2811S: Maintained
2812 2812
2813TCP LOW PRIORITY MODULE
2814P: Wong Hoi Sing, Edison
2815M: hswong3i@gmail.com
2816P: Hung Hing Lun, Mike
2817M: hlhung3i@gmail.com
2818W: http://tcp-lp-mod.sourceforge.net/
2819S: Maintained
2820
2813TI OMAP RANDOM NUMBER GENERATOR SUPPORT 2821TI OMAP RANDOM NUMBER GENERATOR SUPPORT
2814P: Deepak Saxena 2822P: Deepak Saxena
2815M: dsaxena@plexity.net 2823M: dsaxena@plexity.net
@@ -3296,10 +3304,11 @@ S: Maintained
3296 3304
3297XFS FILESYSTEM 3305XFS FILESYSTEM
3298P: Silicon Graphics Inc 3306P: Silicon Graphics Inc
3307P: Tim Shimmin, David Chatterton
3299M: xfs-masters@oss.sgi.com 3308M: xfs-masters@oss.sgi.com
3300M: nathans@sgi.com
3301L: xfs@oss.sgi.com 3309L: xfs@oss.sgi.com
3302W: http://oss.sgi.com/projects/xfs 3310W: http://oss.sgi.com/projects/xfs
3311T: git git://oss.sgi.com:8090/xfs/xfs-2.6
3303S: Supported 3312S: Supported
3304 3313
3305X86 3-LEVEL PAGING (PAE) SUPPORT 3314X86 3-LEVEL PAGING (PAE) SUPPORT
diff --git a/Makefile b/Makefile
index 33559b566449..47e21c04014e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 2 1VERSION = 2
2PATCHLEVEL = 6 2PATCHLEVEL = 6
3SUBLEVEL = 18 3SUBLEVEL = 18
4EXTRAVERSION = -rc5 4EXTRAVERSION = -rc7
5NAME=Crazed Snow-Weasel 5NAME=Crazed Snow-Weasel
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
@@ -889,7 +889,7 @@ depend dep:
889 889
890# --------------------------------------------------------------------------- 890# ---------------------------------------------------------------------------
891# Kernel headers 891# Kernel headers
892INSTALL_HDR_PATH=$(MODLIB)/abi 892INSTALL_HDR_PATH=$(objtree)/usr
893export INSTALL_HDR_PATH 893export INSTALL_HDR_PATH
894 894
895PHONY += headers_install 895PHONY += headers_install
@@ -986,7 +986,7 @@ CLEAN_FILES += vmlinux System.map \
986 .tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map 986 .tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map
987 987
988# Directories & files removed with 'make mrproper' 988# Directories & files removed with 'make mrproper'
989MRPROPER_DIRS += include/config include2 989MRPROPER_DIRS += include/config include2 usr/include
990MRPROPER_FILES += .config .config.old include/asm .version .old_version \ 990MRPROPER_FILES += .config .config.old include/asm .version .old_version \
991 include/linux/autoconf.h include/linux/version.h \ 991 include/linux/autoconf.h include/linux/version.h \
992 include/linux/utsrelease.h \ 992 include/linux/utsrelease.h \
@@ -1077,11 +1077,12 @@ help:
1077 @echo ' kernelrelease - Output the release version string' 1077 @echo ' kernelrelease - Output the release version string'
1078 @echo ' kernelversion - Output the version stored in Makefile' 1078 @echo ' kernelversion - Output the version stored in Makefile'
1079 @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH' 1079 @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'
1080 @echo ' (default: /lib/modules/$$VERSION/abi)' 1080 @echo ' (default: $(INSTALL_HDR_PATH))'
1081 @echo '' 1081 @echo ''
1082 @echo 'Static analysers' 1082 @echo 'Static analysers'
1083 @echo ' checkstack - Generate a list of stack hogs' 1083 @echo ' checkstack - Generate a list of stack hogs'
1084 @echo ' namespacecheck - Name space analysis on compiled kernel' 1084 @echo ' namespacecheck - Name space analysis on compiled kernel'
1085 @echo ' headers_check - Sanity check on exported headers'
1085 @echo '' 1086 @echo ''
1086 @echo 'Kernel packaging:' 1087 @echo 'Kernel packaging:'
1087 @$(MAKE) $(build)=$(package-dir) help 1088 @$(MAKE) $(build)=$(package-dir) help
diff --git a/arch/arm/configs/csb337_defconfig b/arch/arm/configs/csb337_defconfig
index 3594155a8137..cf3fa5cb26e4 100644
--- a/arch/arm/configs/csb337_defconfig
+++ b/arch/arm/configs/csb337_defconfig
@@ -621,9 +621,8 @@ CONFIG_AT91_WATCHDOG=y
621# USB-based Watchdog Cards 621# USB-based Watchdog Cards
622# 622#
623# CONFIG_USBPCWATCHDOG is not set 623# CONFIG_USBPCWATCHDOG is not set
624# CONFIG_HW_RANDOM is not set
624# CONFIG_NVRAM is not set 625# CONFIG_NVRAM is not set
625CONFIG_RTC=y
626# CONFIG_AT91_RTC is not set
627# CONFIG_DTLK is not set 626# CONFIG_DTLK is not set
628# CONFIG_R3964 is not set 627# CONFIG_R3964 is not set
629 628
@@ -956,10 +955,42 @@ CONFIG_USB_AT91=y
956CONFIG_MMC=y 955CONFIG_MMC=y
957# CONFIG_MMC_DEBUG is not set 956# CONFIG_MMC_DEBUG is not set
958CONFIG_MMC_BLOCK=y 957CONFIG_MMC_BLOCK=y
959# CONFIG_MMC_WBSD is not set
960CONFIG_MMC_AT91RM9200=y 958CONFIG_MMC_AT91RM9200=y
961 959
962# 960#
961# Real Time Clock
962#
963CONFIG_RTC_LIB=y
964CONFIG_RTC_CLASS=y
965CONFIG_RTC_HCTOSYS=y
966CONFIG_RTC_HCTOSYS_DEVICE="rtc1"
967
968#
969# RTC interfaces
970#
971# CONFIG_RTC_INTF_SYSFS is not set
972CONFIG_RTC_INTF_PROC=y
973CONFIG_RTC_INTF_DEV=y
974# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
975
976#
977# RTC drivers
978#
979# CONFIG_RTC_DRV_X1205 is not set
980CONFIG_RTC_DRV_DS1307=y
981# CONFIG_RTC_DRV_DS1553 is not set
982# CONFIG_RTC_DRV_ISL1208 is not set
983# CONFIG_RTC_DRV_DS1672 is not set
984# CONFIG_RTC_DRV_DS1742 is not set
985# CONFIG_RTC_DRV_PCF8563 is not set
986# CONFIG_RTC_DRV_PCF8583 is not set
987# CONFIG_RTC_DRV_RS5C372 is not set
988# CONFIG_RTC_DRV_M48T86 is not set
989CONFIG_RTC_DRV_AT91=y
990# CONFIG_RTC_DRV_TEST is not set
991# CONFIG_RTC_DRV_V3020 is not set
992
993#
963# File systems 994# File systems
964# 995#
965CONFIG_EXT2_FS=y 996CONFIG_EXT2_FS=y
diff --git a/arch/arm/configs/pnx4008_defconfig b/arch/arm/configs/pnx4008_defconfig
index 8a078d479d57..a4989f44baaa 100644
--- a/arch/arm/configs/pnx4008_defconfig
+++ b/arch/arm/configs/pnx4008_defconfig
@@ -1,14 +1,18 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17-rc1 3# Linux kernel version: 2.6.18-rc6
4# Thu Apr 6 17:05:58 2006 4# Mon Sep 11 13:59:24 2006
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_GENERIC_HARDIRQS=y
9CONFIG_HARDIRQS_SW_RESEND=y
10CONFIG_GENERIC_IRQ_PROBE=y
8CONFIG_RWSEM_GENERIC_SPINLOCK=y 11CONFIG_RWSEM_GENERIC_SPINLOCK=y
9CONFIG_GENERIC_HWEIGHT=y 12CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_VECTORS_BASE=0xffff0000 14CONFIG_VECTORS_BASE=0xffff0000
15CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
12 16
13# 17#
14# Code maturity level options 18# Code maturity level options
@@ -28,6 +32,7 @@ CONFIG_SYSVIPC=y
28CONFIG_POSIX_MQUEUE=y 32CONFIG_POSIX_MQUEUE=y
29CONFIG_BSD_PROCESS_ACCT=y 33CONFIG_BSD_PROCESS_ACCT=y
30# CONFIG_BSD_PROCESS_ACCT_V3 is not set 34# CONFIG_BSD_PROCESS_ACCT_V3 is not set
35# CONFIG_TASKSTATS is not set
31CONFIG_SYSCTL=y 36CONFIG_SYSCTL=y
32CONFIG_AUDIT=y 37CONFIG_AUDIT=y
33# CONFIG_IKCONFIG is not set 38# CONFIG_IKCONFIG is not set
@@ -44,14 +49,15 @@ CONFIG_PRINTK=y
44CONFIG_BUG=y 49CONFIG_BUG=y
45CONFIG_ELF_CORE=y 50CONFIG_ELF_CORE=y
46CONFIG_BASE_FULL=y 51CONFIG_BASE_FULL=y
52CONFIG_RT_MUTEXES=y
47CONFIG_FUTEX=y 53CONFIG_FUTEX=y
48CONFIG_EPOLL=y 54CONFIG_EPOLL=y
49CONFIG_SHMEM=y 55CONFIG_SHMEM=y
50CONFIG_SLAB=y 56CONFIG_SLAB=y
57CONFIG_VM_EVENT_COUNTERS=y
51# CONFIG_TINY_SHMEM is not set 58# CONFIG_TINY_SHMEM is not set
52CONFIG_BASE_SMALL=0 59CONFIG_BASE_SMALL=0
53# CONFIG_SLOB is not set 60# CONFIG_SLOB is not set
54CONFIG_OBSOLETE_INTERMODULE=m
55 61
56# 62#
57# Loadable module support 63# Loadable module support
@@ -84,18 +90,26 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
84# 90#
85# System Type 91# System Type
86# 92#
93# CONFIG_ARCH_AAEC2000 is not set
94# CONFIG_ARCH_INTEGRATOR is not set
95# CONFIG_ARCH_REALVIEW is not set
96# CONFIG_ARCH_VERSATILE is not set
97# CONFIG_ARCH_AT91 is not set
87# CONFIG_ARCH_CLPS7500 is not set 98# CONFIG_ARCH_CLPS7500 is not set
88# CONFIG_ARCH_CLPS711X is not set 99# CONFIG_ARCH_CLPS711X is not set
89# CONFIG_ARCH_CO285 is not set 100# CONFIG_ARCH_CO285 is not set
90# CONFIG_ARCH_EBSA110 is not set 101# CONFIG_ARCH_EBSA110 is not set
91# CONFIG_ARCH_EP93XX is not set 102# CONFIG_ARCH_EP93XX is not set
92# CONFIG_ARCH_FOOTBRIDGE is not set 103# CONFIG_ARCH_FOOTBRIDGE is not set
93# CONFIG_ARCH_INTEGRATOR is not set 104# CONFIG_ARCH_NETX is not set
105# CONFIG_ARCH_H720X is not set
106# CONFIG_ARCH_IMX is not set
94# CONFIG_ARCH_IOP3XX is not set 107# CONFIG_ARCH_IOP3XX is not set
95# CONFIG_ARCH_IXP4XX is not set 108# CONFIG_ARCH_IXP4XX is not set
96# CONFIG_ARCH_IXP2000 is not set 109# CONFIG_ARCH_IXP2000 is not set
97# CONFIG_ARCH_IXP23XX is not set 110# CONFIG_ARCH_IXP23XX is not set
98# CONFIG_ARCH_L7200 is not set 111# CONFIG_ARCH_L7200 is not set
112CONFIG_ARCH_PNX4008=y
99# CONFIG_ARCH_PXA is not set 113# CONFIG_ARCH_PXA is not set
100# CONFIG_ARCH_RPC is not set 114# CONFIG_ARCH_RPC is not set
101# CONFIG_ARCH_SA1100 is not set 115# CONFIG_ARCH_SA1100 is not set
@@ -103,13 +117,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
103# CONFIG_ARCH_SHARK is not set 117# CONFIG_ARCH_SHARK is not set
104# CONFIG_ARCH_LH7A40X is not set 118# CONFIG_ARCH_LH7A40X is not set
105# CONFIG_ARCH_OMAP is not set 119# CONFIG_ARCH_OMAP is not set
106# CONFIG_ARCH_VERSATILE is not set
107# CONFIG_ARCH_REALVIEW is not set
108# CONFIG_ARCH_IMX is not set
109# CONFIG_ARCH_H720X is not set
110# CONFIG_ARCH_AAEC2000 is not set
111# CONFIG_ARCH_AT91RM9200 is not set
112CONFIG_ARCH_PNX4008=y
113 120
114# 121#
115# Processor Type 122# Processor Type
@@ -138,15 +145,7 @@ CONFIG_ARM_THUMB=y
138# 145#
139# PCCARD (PCMCIA/CardBus) support 146# PCCARD (PCMCIA/CardBus) support
140# 147#
141CONFIG_PCCARD=m 148# CONFIG_PCCARD is not set
142# CONFIG_PCMCIA_DEBUG is not set
143CONFIG_PCMCIA=m
144CONFIG_PCMCIA_LOAD_CIS=y
145CONFIG_PCMCIA_IOCTL=y
146
147#
148# PC-card bridges
149#
150 149
151# 150#
152# Kernel Features 151# Kernel Features
@@ -164,13 +163,14 @@ CONFIG_FLATMEM=y
164CONFIG_FLAT_NODE_MEM_MAP=y 163CONFIG_FLAT_NODE_MEM_MAP=y
165# CONFIG_SPARSEMEM_STATIC is not set 164# CONFIG_SPARSEMEM_STATIC is not set
166CONFIG_SPLIT_PTLOCK_CPUS=4096 165CONFIG_SPLIT_PTLOCK_CPUS=4096
166# CONFIG_RESOURCES_64BIT is not set
167CONFIG_ALIGNMENT_TRAP=y 167CONFIG_ALIGNMENT_TRAP=y
168 168
169# 169#
170# Boot options 170# Boot options
171# 171#
172CONFIG_ZBOOT_ROM_TEXT=0 172CONFIG_ZBOOT_ROM_TEXT=0x0
173CONFIG_ZBOOT_ROM_BSS=0 173CONFIG_ZBOOT_ROM_BSS=0x0
174CONFIG_CMDLINE="mem=64M console=ttyS0,115200" 174CONFIG_CMDLINE="mem=64M console=ttyS0,115200"
175# CONFIG_XIP_KERNEL is not set 175# CONFIG_XIP_KERNEL is not set
176 176
@@ -181,7 +181,8 @@ CONFIG_CMDLINE="mem=64M console=ttyS0,115200"
181# 181#
182# At least one emulation must be selected 182# At least one emulation must be selected
183# 183#
184# CONFIG_FPE_NWFPE is not set 184CONFIG_FPE_NWFPE=y
185# CONFIG_FPE_NWFPE_XP is not set
185# CONFIG_FPE_FASTFPE is not set 186# CONFIG_FPE_FASTFPE is not set
186# CONFIG_VFP is not set 187# CONFIG_VFP is not set
187 188
@@ -199,7 +200,7 @@ CONFIG_BINFMT_MISC=m
199CONFIG_PM=y 200CONFIG_PM=y
200CONFIG_PM_LEGACY=y 201CONFIG_PM_LEGACY=y
201# CONFIG_PM_DEBUG is not set 202# CONFIG_PM_DEBUG is not set
202CONFIG_APM=m 203# CONFIG_APM is not set
203 204
204# 205#
205# Networking 206# Networking
@@ -210,12 +211,12 @@ CONFIG_NET=y
210# Networking options 211# Networking options
211# 212#
212# CONFIG_NETDEBUG is not set 213# CONFIG_NETDEBUG is not set
213CONFIG_PACKET=m 214CONFIG_PACKET=y
214CONFIG_PACKET_MMAP=y 215CONFIG_PACKET_MMAP=y
215CONFIG_UNIX=m 216CONFIG_UNIX=y
216CONFIG_XFRM=y 217CONFIG_XFRM=y
217CONFIG_XFRM_USER=m 218# CONFIG_XFRM_USER is not set
218CONFIG_NET_KEY=m 219# CONFIG_NET_KEY is not set
219CONFIG_INET=y 220CONFIG_INET=y
220CONFIG_IP_MULTICAST=y 221CONFIG_IP_MULTICAST=y
221CONFIG_IP_ADVANCED_ROUTER=y 222CONFIG_IP_ADVANCED_ROUTER=y
@@ -227,10 +228,12 @@ CONFIG_IP_ROUTE_FWMARK=y
227CONFIG_IP_ROUTE_MULTIPATH=y 228CONFIG_IP_ROUTE_MULTIPATH=y
228# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set 229# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
229CONFIG_IP_ROUTE_VERBOSE=y 230CONFIG_IP_ROUTE_VERBOSE=y
230# CONFIG_IP_PNP is not set 231CONFIG_IP_PNP=y
231CONFIG_NET_IPIP=m 232CONFIG_IP_PNP_DHCP=y
232CONFIG_NET_IPGRE=m 233CONFIG_IP_PNP_BOOTP=y
233CONFIG_NET_IPGRE_BROADCAST=y 234# CONFIG_IP_PNP_RARP is not set
235# CONFIG_NET_IPIP is not set
236# CONFIG_NET_IPGRE is not set
234CONFIG_IP_MROUTE=y 237CONFIG_IP_MROUTE=y
235CONFIG_IP_PIMSM_V1=y 238CONFIG_IP_PIMSM_V1=y
236CONFIG_IP_PIMSM_V2=y 239CONFIG_IP_PIMSM_V2=y
@@ -241,6 +244,8 @@ CONFIG_INET_ESP=m
241CONFIG_INET_IPCOMP=m 244CONFIG_INET_IPCOMP=m
242CONFIG_INET_XFRM_TUNNEL=m 245CONFIG_INET_XFRM_TUNNEL=m
243CONFIG_INET_TUNNEL=m 246CONFIG_INET_TUNNEL=m
247CONFIG_INET_XFRM_MODE_TRANSPORT=y
248CONFIG_INET_XFRM_MODE_TUNNEL=y
244CONFIG_INET_DIAG=y 249CONFIG_INET_DIAG=y
245CONFIG_INET_TCP_DIAG=y 250CONFIG_INET_TCP_DIAG=y
246# CONFIG_TCP_CONG_ADVANCED is not set 251# CONFIG_TCP_CONG_ADVANCED is not set
@@ -287,7 +292,10 @@ CONFIG_INET6_ESP=m
287CONFIG_INET6_IPCOMP=m 292CONFIG_INET6_IPCOMP=m
288CONFIG_INET6_XFRM_TUNNEL=m 293CONFIG_INET6_XFRM_TUNNEL=m
289CONFIG_INET6_TUNNEL=m 294CONFIG_INET6_TUNNEL=m
295CONFIG_INET6_XFRM_MODE_TRANSPORT=m
296CONFIG_INET6_XFRM_MODE_TUNNEL=m
290CONFIG_IPV6_TUNNEL=m 297CONFIG_IPV6_TUNNEL=m
298# CONFIG_NETWORK_SECMARK is not set
291CONFIG_NETFILTER=y 299CONFIG_NETFILTER=y
292# CONFIG_NETFILTER_DEBUG is not set 300# CONFIG_NETFILTER_DEBUG is not set
293CONFIG_BRIDGE_NETFILTER=y 301CONFIG_BRIDGE_NETFILTER=y
@@ -313,6 +321,7 @@ CONFIG_IP_NF_TFTP=m
313CONFIG_IP_NF_AMANDA=m 321CONFIG_IP_NF_AMANDA=m
314# CONFIG_IP_NF_PPTP is not set 322# CONFIG_IP_NF_PPTP is not set
315# CONFIG_IP_NF_H323 is not set 323# CONFIG_IP_NF_H323 is not set
324# CONFIG_IP_NF_SIP is not set
316CONFIG_IP_NF_QUEUE=m 325CONFIG_IP_NF_QUEUE=m
317 326
318# 327#
@@ -384,7 +393,7 @@ CONFIG_LLC2=m
384CONFIG_IPX=m 393CONFIG_IPX=m
385# CONFIG_IPX_INTERN is not set 394# CONFIG_IPX_INTERN is not set
386CONFIG_ATALK=m 395CONFIG_ATALK=m
387CONFIG_DEV_APPLETALK=y 396CONFIG_DEV_APPLETALK=m
388CONFIG_IPDDP=m 397CONFIG_IPDDP=m
389CONFIG_IPDDP_ENCAP=y 398CONFIG_IPDDP_ENCAP=y
390CONFIG_IPDDP_DECAP=y 399CONFIG_IPDDP_DECAP=y
@@ -445,110 +454,9 @@ CONFIG_NET_ESTIMATOR=y
445# Network testing 454# Network testing
446# 455#
447CONFIG_NET_PKTGEN=m 456CONFIG_NET_PKTGEN=m
448CONFIG_HAMRADIO=y 457# CONFIG_HAMRADIO is not set
449 458# CONFIG_IRDA is not set
450# 459# CONFIG_BT is not set
451# Packet Radio protocols
452#
453CONFIG_AX25=m
454# CONFIG_AX25_DAMA_SLAVE is not set
455CONFIG_NETROM=m
456CONFIG_ROSE=m
457
458#
459# AX.25 network device drivers
460#
461CONFIG_MKISS=m
462CONFIG_6PACK=m
463CONFIG_BPQETHER=m
464CONFIG_BAYCOM_SER_FDX=m
465CONFIG_BAYCOM_SER_HDX=m
466CONFIG_BAYCOM_PAR=m
467CONFIG_BAYCOM_EPP=m
468CONFIG_YAM=m
469CONFIG_IRDA=m
470
471#
472# IrDA protocols
473#
474CONFIG_IRLAN=m
475CONFIG_IRNET=m
476CONFIG_IRCOMM=m
477# CONFIG_IRDA_ULTRA is not set
478
479#
480# IrDA options
481#
482CONFIG_IRDA_CACHE_LAST_LSAP=y
483CONFIG_IRDA_FAST_RR=y
484CONFIG_IRDA_DEBUG=y
485
486#
487# Infrared-port device drivers
488#
489
490#
491# SIR device drivers
492#
493CONFIG_IRTTY_SIR=m
494
495#
496# Dongle support
497#
498CONFIG_DONGLE=y
499CONFIG_ESI_DONGLE=m
500CONFIG_ACTISYS_DONGLE=m
501CONFIG_TEKRAM_DONGLE=m
502# CONFIG_TOIM3232_DONGLE is not set
503CONFIG_LITELINK_DONGLE=m
504CONFIG_MA600_DONGLE=m
505CONFIG_GIRBIL_DONGLE=m
506CONFIG_MCP2120_DONGLE=m
507CONFIG_OLD_BELKIN_DONGLE=m
508CONFIG_ACT200L_DONGLE=m
509
510#
511# Old SIR device drivers
512#
513CONFIG_IRPORT_SIR=m
514
515#
516# Old Serial dongle support
517#
518# CONFIG_DONGLE_OLD is not set
519
520#
521# FIR device drivers
522#
523CONFIG_USB_IRDA=m
524CONFIG_SIGMATEL_FIR=m
525CONFIG_BT=m
526CONFIG_BT_L2CAP=m
527CONFIG_BT_SCO=m
528CONFIG_BT_RFCOMM=m
529CONFIG_BT_RFCOMM_TTY=y
530CONFIG_BT_BNEP=m
531CONFIG_BT_BNEP_MC_FILTER=y
532CONFIG_BT_BNEP_PROTO_FILTER=y
533CONFIG_BT_CMTP=m
534CONFIG_BT_HIDP=m
535
536#
537# Bluetooth device drivers
538#
539CONFIG_BT_HCIUSB=m
540CONFIG_BT_HCIUSB_SCO=y
541CONFIG_BT_HCIUART=m
542CONFIG_BT_HCIUART_H4=y
543CONFIG_BT_HCIUART_BCSP=y
544CONFIG_BT_HCIBCM203X=m
545# CONFIG_BT_HCIBPA10X is not set
546CONFIG_BT_HCIBFUSB=m
547CONFIG_BT_HCIDTL1=m
548CONFIG_BT_HCIBT3C=m
549CONFIG_BT_HCIBLUECARD=m
550CONFIG_BT_HCIBTUART=m
551CONFIG_BT_HCIVHCI=m
552CONFIG_IEEE80211=m 460CONFIG_IEEE80211=m
553# CONFIG_IEEE80211_DEBUG is not set 461# CONFIG_IEEE80211_DEBUG is not set
554# CONFIG_IEEE80211_CRYPT_WEP is not set 462# CONFIG_IEEE80211_CRYPT_WEP is not set
@@ -566,8 +474,9 @@ CONFIG_WIRELESS_EXT=y
566# 474#
567CONFIG_STANDALONE=y 475CONFIG_STANDALONE=y
568CONFIG_PREVENT_FIRMWARE_BUILD=y 476CONFIG_PREVENT_FIRMWARE_BUILD=y
569CONFIG_FW_LOADER=m 477CONFIG_FW_LOADER=y
570# CONFIG_DEBUG_DRIVER is not set 478# CONFIG_DEBUG_DRIVER is not set
479# CONFIG_SYS_HYPERVISOR is not set
571 480
572# 481#
573# Connector - unified userspace <-> kernelspace linker 482# Connector - unified userspace <-> kernelspace linker
@@ -577,11 +486,11 @@ CONFIG_FW_LOADER=m
577# 486#
578# Memory Technology Devices (MTD) 487# Memory Technology Devices (MTD)
579# 488#
580CONFIG_MTD=m 489CONFIG_MTD=y
581# CONFIG_MTD_DEBUG is not set 490# CONFIG_MTD_DEBUG is not set
582CONFIG_MTD_CONCAT=m 491CONFIG_MTD_CONCAT=y
583CONFIG_MTD_PARTITIONS=y 492CONFIG_MTD_PARTITIONS=y
584CONFIG_MTD_REDBOOT_PARTS=m 493CONFIG_MTD_REDBOOT_PARTS=y
585CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 494CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
586# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set 495# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
587# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set 496# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
@@ -591,22 +500,18 @@ CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
591# 500#
592# User Modules And Translation Layers 501# User Modules And Translation Layers
593# 502#
594CONFIG_MTD_CHAR=m 503CONFIG_MTD_CHAR=y
595CONFIG_MTD_BLOCK=m 504CONFIG_MTD_BLOCK=y
596CONFIG_MTD_BLOCK_RO=m 505# CONFIG_FTL is not set
597CONFIG_FTL=m 506# CONFIG_NFTL is not set
598CONFIG_NFTL=m 507# CONFIG_INFTL is not set
599CONFIG_NFTL_RW=y
600CONFIG_INFTL=m
601# CONFIG_RFD_FTL is not set 508# CONFIG_RFD_FTL is not set
602 509
603# 510#
604# RAM/ROM/Flash chip drivers 511# RAM/ROM/Flash chip drivers
605# 512#
606CONFIG_MTD_CFI=m 513# CONFIG_MTD_CFI is not set
607CONFIG_MTD_JEDECPROBE=m 514# CONFIG_MTD_JEDECPROBE is not set
608CONFIG_MTD_GEN_PROBE=m
609# CONFIG_MTD_CFI_ADV_OPTIONS is not set
610CONFIG_MTD_MAP_BANK_WIDTH_1=y 515CONFIG_MTD_MAP_BANK_WIDTH_1=y
611CONFIG_MTD_MAP_BANK_WIDTH_2=y 516CONFIG_MTD_MAP_BANK_WIDTH_2=y
612CONFIG_MTD_MAP_BANK_WIDTH_4=y 517CONFIG_MTD_MAP_BANK_WIDTH_4=y
@@ -617,36 +522,27 @@ CONFIG_MTD_CFI_I1=y
617CONFIG_MTD_CFI_I2=y 522CONFIG_MTD_CFI_I2=y
618# CONFIG_MTD_CFI_I4 is not set 523# CONFIG_MTD_CFI_I4 is not set
619# CONFIG_MTD_CFI_I8 is not set 524# CONFIG_MTD_CFI_I8 is not set
620CONFIG_MTD_CFI_INTELEXT=m 525# CONFIG_MTD_RAM is not set
621CONFIG_MTD_CFI_AMDSTD=m 526# CONFIG_MTD_ROM is not set
622CONFIG_MTD_CFI_STAA=m 527# CONFIG_MTD_ABSENT is not set
623CONFIG_MTD_CFI_UTIL=m
624CONFIG_MTD_RAM=m
625CONFIG_MTD_ROM=m
626CONFIG_MTD_ABSENT=m
627# CONFIG_MTD_OBSOLETE_CHIPS is not set 528# CONFIG_MTD_OBSOLETE_CHIPS is not set
628 529
629# 530#
630# Mapping drivers for chip access 531# Mapping drivers for chip access
631# 532#
632CONFIG_MTD_COMPLEX_MAPPINGS=y 533# CONFIG_MTD_COMPLEX_MAPPINGS is not set
633CONFIG_MTD_PHYSMAP=m
634CONFIG_MTD_PHYSMAP_START=0x8000000
635CONFIG_MTD_PHYSMAP_LEN=0x4000000
636CONFIG_MTD_PHYSMAP_BANKWIDTH=2
637# CONFIG_MTD_ARM_INTEGRATOR is not set
638# CONFIG_MTD_IMPA7 is not set
639# CONFIG_MTD_PLATRAM is not set 534# CONFIG_MTD_PLATRAM is not set
640 535
641# 536#
642# Self-contained MTD device drivers 537# Self-contained MTD device drivers
643# 538#
539# CONFIG_MTD_DATAFLASH is not set
540# CONFIG_MTD_M25P80 is not set
644CONFIG_MTD_SLRAM=m 541CONFIG_MTD_SLRAM=m
645CONFIG_MTD_PHRAM=m 542CONFIG_MTD_PHRAM=m
646CONFIG_MTD_MTDRAM=m 543CONFIG_MTD_MTDRAM=m
647CONFIG_MTDRAM_TOTAL_SIZE=4096 544CONFIG_MTDRAM_TOTAL_SIZE=4096
648CONFIG_MTDRAM_ERASE_SIZE=128 545CONFIG_MTDRAM_ERASE_SIZE=128
649CONFIG_MTD_BLKMTD=m
650# CONFIG_MTD_BLOCK2MTD is not set 546# CONFIG_MTD_BLOCK2MTD is not set
651 547
652# 548#
@@ -663,14 +559,12 @@ CONFIG_MTD_DOCPROBE_ADDRESS=0
663# 559#
664# NAND Flash Device Drivers 560# NAND Flash Device Drivers
665# 561#
666CONFIG_MTD_NAND=m 562CONFIG_MTD_NAND=y
667# CONFIG_MTD_NAND_VERIFY_WRITE is not set 563# CONFIG_MTD_NAND_VERIFY_WRITE is not set
668CONFIG_MTD_NAND_IDS=m 564# CONFIG_MTD_NAND_ECC_SMC is not set
669CONFIG_MTD_NAND_DISKONCHIP=m 565CONFIG_MTD_NAND_IDS=y
670# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set 566# CONFIG_MTD_NAND_DISKONCHIP is not set
671CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 567CONFIG_MTD_NAND_NANDSIM=m
672# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
673# CONFIG_MTD_NAND_NANDSIM is not set
674 568
675# 569#
676# OneNAND Flash Device Drivers 570# OneNAND Flash Device Drivers
@@ -680,15 +574,7 @@ CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
680# 574#
681# Parallel port support 575# Parallel port support
682# 576#
683CONFIG_PARPORT=m 577# CONFIG_PARPORT is not set
684CONFIG_PARPORT_PC=m
685CONFIG_PARPORT_PC_FIFO=y
686# CONFIG_PARPORT_PC_SUPERIO is not set
687CONFIG_PARPORT_PC_PCMCIA=m
688CONFIG_PARPORT_NOT_PC=y
689# CONFIG_PARPORT_ARC is not set
690# CONFIG_PARPORT_GSC is not set
691CONFIG_PARPORT_1284=y
692 578
693# 579#
694# Plug and Play support 580# Plug and Play support
@@ -697,45 +583,15 @@ CONFIG_PARPORT_1284=y
697# 583#
698# Block devices 584# Block devices
699# 585#
700CONFIG_PARIDE=m
701CONFIG_PARIDE_PARPORT=m
702
703#
704# Parallel IDE high-level drivers
705#
706CONFIG_PARIDE_PD=m
707CONFIG_PARIDE_PCD=m
708CONFIG_PARIDE_PF=m
709CONFIG_PARIDE_PT=m
710CONFIG_PARIDE_PG=m
711
712#
713# Parallel IDE protocol modules
714#
715CONFIG_PARIDE_ATEN=m
716CONFIG_PARIDE_BPCK=m
717CONFIG_PARIDE_BPCK6=m
718CONFIG_PARIDE_COMM=m
719CONFIG_PARIDE_DSTR=m
720CONFIG_PARIDE_FIT2=m
721CONFIG_PARIDE_FIT3=m
722CONFIG_PARIDE_EPAT=m
723# CONFIG_PARIDE_EPATC8 is not set
724CONFIG_PARIDE_EPIA=m
725CONFIG_PARIDE_FRIQ=m
726CONFIG_PARIDE_FRPW=m
727CONFIG_PARIDE_KBIC=m
728CONFIG_PARIDE_KTTI=m
729CONFIG_PARIDE_ON20=m
730CONFIG_PARIDE_ON26=m
731# CONFIG_BLK_DEV_COW_COMMON is not set 586# CONFIG_BLK_DEV_COW_COMMON is not set
732CONFIG_BLK_DEV_LOOP=m 587CONFIG_BLK_DEV_LOOP=y
733CONFIG_BLK_DEV_CRYPTOLOOP=m 588CONFIG_BLK_DEV_CRYPTOLOOP=y
734CONFIG_BLK_DEV_NBD=m 589CONFIG_BLK_DEV_NBD=y
735# CONFIG_BLK_DEV_UB is not set 590# CONFIG_BLK_DEV_UB is not set
736CONFIG_BLK_DEV_RAM=y 591CONFIG_BLK_DEV_RAM=y
737CONFIG_BLK_DEV_RAM_COUNT=16 592CONFIG_BLK_DEV_RAM_COUNT=16
738CONFIG_BLK_DEV_RAM_SIZE=8192 593CONFIG_BLK_DEV_RAM_SIZE=8192
594CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
739CONFIG_BLK_DEV_INITRD=y 595CONFIG_BLK_DEV_INITRD=y
740CONFIG_CDROM_PKTCDVD=m 596CONFIG_CDROM_PKTCDVD=m
741CONFIG_CDROM_PKTCDVD_BUFFERS=8 597CONFIG_CDROM_PKTCDVD_BUFFERS=8
@@ -743,34 +599,6 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
743# CONFIG_ATA_OVER_ETH is not set 599# CONFIG_ATA_OVER_ETH is not set
744 600
745# 601#
746# ATA/ATAPI/MFM/RLL support
747#
748CONFIG_IDE=m
749CONFIG_BLK_DEV_IDE=m
750
751#
752# Please see Documentation/ide.txt for help/info on IDE drives
753#
754# CONFIG_BLK_DEV_IDE_SATA is not set
755CONFIG_BLK_DEV_IDEDISK=m
756# CONFIG_IDEDISK_MULTI_MODE is not set
757CONFIG_BLK_DEV_IDECS=m
758CONFIG_BLK_DEV_IDECD=m
759CONFIG_BLK_DEV_IDETAPE=m
760CONFIG_BLK_DEV_IDEFLOPPY=m
761CONFIG_BLK_DEV_IDESCSI=m
762# CONFIG_IDE_TASK_IOCTL is not set
763
764#
765# IDE chipset support/bugfixes
766#
767CONFIG_IDE_GENERIC=m
768# CONFIG_IDE_ARM is not set
769# CONFIG_BLK_DEV_IDEDMA is not set
770# CONFIG_IDEDMA_AUTO is not set
771# CONFIG_BLK_DEV_HD is not set
772
773#
774# SCSI device support 602# SCSI device support
775# 603#
776# CONFIG_RAID_ATTRS is not set 604# CONFIG_RAID_ATTRS is not set
@@ -808,41 +636,12 @@ CONFIG_SCSI_FC_ATTRS=m
808# 636#
809# CONFIG_ISCSI_TCP is not set 637# CONFIG_ISCSI_TCP is not set
810CONFIG_SCSI_SATA=m 638CONFIG_SCSI_SATA=m
811CONFIG_SCSI_PPA=m
812CONFIG_SCSI_IMM=m
813# CONFIG_SCSI_IZIP_EPP16 is not set
814# CONFIG_SCSI_IZIP_SLOW_CTR is not set
815CONFIG_SCSI_DEBUG=m 639CONFIG_SCSI_DEBUG=m
816 640
817# 641#
818# PCMCIA SCSI adapter support
819#
820CONFIG_PCMCIA_AHA152X=m
821CONFIG_PCMCIA_FDOMAIN=m
822CONFIG_PCMCIA_NINJA_SCSI=m
823CONFIG_PCMCIA_QLOGIC=m
824CONFIG_PCMCIA_SYM53C500=m
825
826#
827# Multi-device support (RAID and LVM) 642# Multi-device support (RAID and LVM)
828# 643#
829CONFIG_MD=y 644# CONFIG_MD is not set
830CONFIG_BLK_DEV_MD=m
831CONFIG_MD_LINEAR=m
832CONFIG_MD_RAID0=m
833CONFIG_MD_RAID1=m
834CONFIG_MD_RAID10=m
835CONFIG_MD_RAID5=m
836# CONFIG_MD_RAID5_RESHAPE is not set
837CONFIG_MD_RAID6=m
838CONFIG_MD_MULTIPATH=m
839CONFIG_MD_FAULTY=m
840CONFIG_BLK_DEV_DM=m
841CONFIG_DM_CRYPT=m
842CONFIG_DM_SNAPSHOT=m
843CONFIG_DM_MIRROR=m
844CONFIG_DM_ZERO=m
845# CONFIG_DM_MULTIPATH is not set
846 645
847# 646#
848# Fusion MPT device support 647# Fusion MPT device support
@@ -878,9 +677,6 @@ CONFIG_NET_ETHERNET=y
878CONFIG_MII=m 677CONFIG_MII=m
879# CONFIG_SMC91X is not set 678# CONFIG_SMC91X is not set
880# CONFIG_DM9000 is not set 679# CONFIG_DM9000 is not set
881CONFIG_NET_POCKET=y
882CONFIG_DE600=m
883CONFIG_DE620=m
884 680
885# 681#
886# Ethernet (1000 Mbit) 682# Ethernet (1000 Mbit)
@@ -904,49 +700,13 @@ CONFIG_NET_RADIO=y
904# Obsolete Wireless cards support (pre-802.11) 700# Obsolete Wireless cards support (pre-802.11)
905# 701#
906CONFIG_STRIP=m 702CONFIG_STRIP=m
907CONFIG_PCMCIA_WAVELAN=m 703# CONFIG_USB_ZD1201 is not set
908CONFIG_PCMCIA_NETWAVE=m
909
910#
911# Wireless 802.11 Frequency Hopping cards support
912#
913CONFIG_PCMCIA_RAYCS=m
914
915#
916# Wireless 802.11b ISA/PCI cards support
917#
918CONFIG_HERMES=m
919CONFIG_ATMEL=m
920
921#
922# Wireless 802.11b Pcmcia/Cardbus cards support
923#
924CONFIG_PCMCIA_HERMES=m
925# CONFIG_PCMCIA_SPECTRUM is not set
926CONFIG_AIRO_CS=m
927CONFIG_PCMCIA_ATMEL=m
928CONFIG_PCMCIA_WL3501=m
929# CONFIG_HOSTAP is not set 704# CONFIG_HOSTAP is not set
930CONFIG_NET_WIRELESS=y
931
932#
933# PCMCIA network device support
934#
935CONFIG_NET_PCMCIA=y
936CONFIG_PCMCIA_3C589=m
937CONFIG_PCMCIA_3C574=m
938CONFIG_PCMCIA_FMVJ18X=m
939CONFIG_PCMCIA_PCNET=m
940CONFIG_PCMCIA_NMCLAN=m
941CONFIG_PCMCIA_SMC91C92=m
942CONFIG_PCMCIA_XIRC2PS=m
943CONFIG_PCMCIA_AXNET=m
944 705
945# 706#
946# Wan interfaces 707# Wan interfaces
947# 708#
948CONFIG_WAN=y 709CONFIG_WAN=y
949CONFIG_SYNCLINK_SYNCPPP=m
950CONFIG_HDLC=m 710CONFIG_HDLC=m
951CONFIG_HDLC_RAW=y 711CONFIG_HDLC_RAW=y
952CONFIG_HDLC_RAW_ETH=y 712CONFIG_HDLC_RAW_ETH=y
@@ -966,7 +726,6 @@ CONFIG_X25_ASY=m
966# 726#
967# CONFIG_ATM_DUMMY is not set 727# CONFIG_ATM_DUMMY is not set
968CONFIG_ATM_TCP=m 728CONFIG_ATM_TCP=m
969CONFIG_PLIP=m
970CONFIG_PPP=m 729CONFIG_PPP=m
971CONFIG_PPP_MULTILINK=y 730CONFIG_PPP_MULTILINK=y
972CONFIG_PPP_FILTER=y 731CONFIG_PPP_FILTER=y
@@ -991,114 +750,7 @@ CONFIG_NET_POLL_CONTROLLER=y
991# 750#
992# ISDN subsystem 751# ISDN subsystem
993# 752#
994CONFIG_ISDN=m 753# CONFIG_ISDN is not set
995
996#
997# Old ISDN4Linux
998#
999CONFIG_ISDN_I4L=m
1000CONFIG_ISDN_PPP=y
1001CONFIG_ISDN_PPP_VJ=y
1002CONFIG_ISDN_MPP=y
1003CONFIG_IPPP_FILTER=y
1004CONFIG_ISDN_PPP_BSDCOMP=m
1005CONFIG_ISDN_AUDIO=y
1006CONFIG_ISDN_TTY_FAX=y
1007CONFIG_ISDN_X25=y
1008
1009#
1010# ISDN feature submodules
1011#
1012CONFIG_ISDN_DRV_LOOP=m
1013CONFIG_ISDN_DIVERSION=m
1014
1015#
1016# ISDN4Linux hardware drivers
1017#
1018
1019#
1020# Passive cards
1021#
1022CONFIG_ISDN_DRV_HISAX=m
1023
1024#
1025# D-channel protocol features
1026#
1027CONFIG_HISAX_EURO=y
1028CONFIG_DE_AOC=y
1029# CONFIG_HISAX_NO_SENDCOMPLETE is not set
1030# CONFIG_HISAX_NO_LLC is not set
1031# CONFIG_HISAX_NO_KEYPAD is not set
1032CONFIG_HISAX_1TR6=y
1033CONFIG_HISAX_NI1=y
1034CONFIG_HISAX_MAX_CARDS=8
1035
1036#
1037# HiSax supported cards
1038#
1039CONFIG_HISAX_16_3=y
1040CONFIG_HISAX_S0BOX=y
1041CONFIG_HISAX_FRITZPCI=y
1042CONFIG_HISAX_AVM_A1_PCMCIA=y
1043CONFIG_HISAX_ELSA=y
1044CONFIG_HISAX_DIEHLDIVA=y
1045CONFIG_HISAX_SEDLBAUER=y
1046CONFIG_HISAX_NICCY=y
1047CONFIG_HISAX_GAZEL=y
1048CONFIG_HISAX_HFC_SX=y
1049# CONFIG_HISAX_DEBUG is not set
1050
1051#
1052# HiSax PCMCIA card service modules
1053#
1054CONFIG_HISAX_SEDLBAUER_CS=m
1055CONFIG_HISAX_ELSA_CS=m
1056CONFIG_HISAX_AVM_A1_CS=m
1057CONFIG_HISAX_TELES_CS=m
1058
1059#
1060# HiSax sub driver modules
1061#
1062CONFIG_HISAX_ST5481=m
1063CONFIG_HISAX_HFCUSB=m
1064# CONFIG_HISAX_HFC4S8S is not set
1065CONFIG_HISAX_HDLC=y
1066
1067#
1068# Active cards
1069#
1070
1071#
1072# Siemens Gigaset
1073#
1074# CONFIG_ISDN_DRV_GIGASET is not set
1075
1076#
1077# CAPI subsystem
1078#
1079CONFIG_ISDN_CAPI=m
1080CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
1081CONFIG_ISDN_CAPI_MIDDLEWARE=y
1082CONFIG_ISDN_CAPI_CAPI20=m
1083CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
1084CONFIG_ISDN_CAPI_CAPIFS=m
1085CONFIG_ISDN_CAPI_CAPIDRV=m
1086
1087#
1088# CAPI hardware drivers
1089#
1090
1091#
1092# Active AVM cards
1093#
1094CONFIG_CAPI_AVM=y
1095CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
1096CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
1097
1098#
1099# Active Eicon DIVA Server cards
1100#
1101CONFIG_CAPI_EICON=y
1102 754
1103# 755#
1104# Input device support 756# Input device support
@@ -1108,10 +760,7 @@ CONFIG_INPUT=y
1108# 760#
1109# Userland interfaces 761# Userland interfaces
1110# 762#
1111CONFIG_INPUT_MOUSEDEV=m 763# CONFIG_INPUT_MOUSEDEV is not set
1112CONFIG_INPUT_MOUSEDEV_PSAUX=y
1113CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
1114CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
1115CONFIG_INPUT_JOYDEV=m 764CONFIG_INPUT_JOYDEV=m
1116CONFIG_INPUT_TSDEV=m 765CONFIG_INPUT_TSDEV=m
1117CONFIG_INPUT_TSDEV_SCREEN_X=240 766CONFIG_INPUT_TSDEV_SCREEN_X=240
@@ -1153,11 +802,9 @@ CONFIG_JOYSTICK_SPACEORB=m
1153CONFIG_JOYSTICK_SPACEBALL=m 802CONFIG_JOYSTICK_SPACEBALL=m
1154CONFIG_JOYSTICK_STINGER=m 803CONFIG_JOYSTICK_STINGER=m
1155# CONFIG_JOYSTICK_TWIDJOY is not set 804# CONFIG_JOYSTICK_TWIDJOY is not set
1156CONFIG_JOYSTICK_DB9=m
1157CONFIG_JOYSTICK_GAMECON=m
1158CONFIG_JOYSTICK_TURBOGRAFX=m
1159CONFIG_JOYSTICK_JOYDUMP=m 805CONFIG_JOYSTICK_JOYDUMP=m
1160CONFIG_INPUT_TOUCHSCREEN=y 806CONFIG_INPUT_TOUCHSCREEN=y
807# CONFIG_TOUCHSCREEN_ADS7846 is not set
1161CONFIG_TOUCHSCREEN_GUNZE=m 808CONFIG_TOUCHSCREEN_GUNZE=m
1162# CONFIG_TOUCHSCREEN_ELO is not set 809# CONFIG_TOUCHSCREEN_ELO is not set
1163# CONFIG_TOUCHSCREEN_MTOUCH is not set 810# CONFIG_TOUCHSCREEN_MTOUCH is not set
@@ -1170,7 +817,6 @@ CONFIG_INPUT_UINPUT=m
1170# 817#
1171CONFIG_SERIO=y 818CONFIG_SERIO=y
1172CONFIG_SERIO_SERPORT=m 819CONFIG_SERIO_SERPORT=m
1173CONFIG_SERIO_PARKBD=m
1174CONFIG_SERIO_LIBPS2=y 820CONFIG_SERIO_LIBPS2=y
1175CONFIG_SERIO_RAW=m 821CONFIG_SERIO_RAW=m
1176CONFIG_GAMEPORT=m 822CONFIG_GAMEPORT=m
@@ -1183,32 +829,14 @@ CONFIG_GAMEPORT_L4=m
1183CONFIG_VT=y 829CONFIG_VT=y
1184CONFIG_VT_CONSOLE=y 830CONFIG_VT_CONSOLE=y
1185CONFIG_HW_CONSOLE=y 831CONFIG_HW_CONSOLE=y
1186CONFIG_SERIAL_NONSTANDARD=y 832# CONFIG_VT_HW_CONSOLE_BINDING is not set
1187CONFIG_COMPUTONE=m 833# CONFIG_SERIAL_NONSTANDARD is not set
1188CONFIG_ROCKETPORT=m
1189CONFIG_CYCLADES=m
1190# CONFIG_CYZ_INTR is not set
1191CONFIG_DIGIEPCA=m
1192CONFIG_MOXA_INTELLIO=m
1193CONFIG_MOXA_SMARTIO=m
1194# CONFIG_ISI is not set
1195CONFIG_SYNCLINKMP=m
1196CONFIG_N_HDLC=m
1197# CONFIG_RISCOM8 is not set
1198# CONFIG_SPECIALIX is not set
1199CONFIG_SX=m
1200CONFIG_RIO=m
1201CONFIG_RIO_OLDPCI=y
1202CONFIG_STALDRV=y
1203CONFIG_STALLION=m
1204CONFIG_ISTALLION=m
1205 834
1206# 835#
1207# Serial drivers 836# Serial drivers
1208# 837#
1209CONFIG_SERIAL_8250=y 838CONFIG_SERIAL_8250=y
1210CONFIG_SERIAL_8250_CONSOLE=y 839CONFIG_SERIAL_8250_CONSOLE=y
1211CONFIG_SERIAL_8250_CS=m
1212CONFIG_SERIAL_8250_NR_UARTS=4 840CONFIG_SERIAL_8250_NR_UARTS=4
1213CONFIG_SERIAL_8250_RUNTIME_UARTS=4 841CONFIG_SERIAL_8250_RUNTIME_UARTS=4
1214CONFIG_SERIAL_8250_EXTENDED=y 842CONFIG_SERIAL_8250_EXTENDED=y
@@ -1225,20 +853,11 @@ CONFIG_SERIAL_CORE_CONSOLE=y
1225CONFIG_UNIX98_PTYS=y 853CONFIG_UNIX98_PTYS=y
1226CONFIG_LEGACY_PTYS=y 854CONFIG_LEGACY_PTYS=y
1227CONFIG_LEGACY_PTY_COUNT=256 855CONFIG_LEGACY_PTY_COUNT=256
1228CONFIG_PRINTER=m
1229# CONFIG_LP_CONSOLE is not set
1230CONFIG_PPDEV=m
1231CONFIG_TIPAR=m
1232 856
1233# 857#
1234# IPMI 858# IPMI
1235# 859#
1236CONFIG_IPMI_HANDLER=m 860# CONFIG_IPMI_HANDLER is not set
1237# CONFIG_IPMI_PANIC_EVENT is not set
1238CONFIG_IPMI_DEVICE_INTERFACE=m
1239CONFIG_IPMI_SI=m
1240CONFIG_IPMI_WATCHDOG=m
1241CONFIG_IPMI_POWEROFF=m
1242 861
1243# 862#
1244# Watchdog Cards 863# Watchdog Cards
@@ -1255,22 +874,15 @@ CONFIG_SOFT_WATCHDOG=m
1255# USB-based Watchdog Cards 874# USB-based Watchdog Cards
1256# 875#
1257CONFIG_USBPCWATCHDOG=m 876CONFIG_USBPCWATCHDOG=m
1258CONFIG_NVRAM=m 877CONFIG_HW_RANDOM=y
1259CONFIG_DTLK=m 878# CONFIG_NVRAM is not set
1260CONFIG_R3964=m 879# CONFIG_DTLK is not set
880# CONFIG_R3964 is not set
1261 881
1262# 882#
1263# Ftape, the floppy tape device driver 883# Ftape, the floppy tape device driver
1264# 884#
1265 885# CONFIG_RAW_DRIVER is not set
1266#
1267# PCMCIA character devices
1268#
1269CONFIG_SYNCLINK_CS=m
1270# CONFIG_CARDMAN_4000 is not set
1271# CONFIG_CARDMAN_4040 is not set
1272CONFIG_RAW_DRIVER=m
1273CONFIG_MAX_RAW_DEVS=256
1274 886
1275# 887#
1276# TPM devices 888# TPM devices
@@ -1281,8 +893,8 @@ CONFIG_MAX_RAW_DEVS=256
1281# 893#
1282# I2C support 894# I2C support
1283# 895#
1284CONFIG_I2C=m 896CONFIG_I2C=y
1285CONFIG_I2C_CHARDEV=m 897CONFIG_I2C_CHARDEV=y
1286 898
1287# 899#
1288# I2C Algorithms 900# I2C Algorithms
@@ -1294,11 +906,10 @@ CONFIG_I2C_ALGOPCA=m
1294# 906#
1295# I2C Hardware Bus support 907# I2C Hardware Bus support
1296# 908#
1297CONFIG_I2C_ISA=m 909# CONFIG_I2C_OCORES is not set
1298CONFIG_I2C_PARPORT=m 910# CONFIG_I2C_PARPORT_LIGHT is not set
1299CONFIG_I2C_PARPORT_LIGHT=m 911# CONFIG_I2C_STUB is not set
1300CONFIG_I2C_STUB=m 912# CONFIG_I2C_PCA_ISA is not set
1301CONFIG_I2C_PCA_ISA=m
1302 913
1303# 914#
1304# Miscellaneous I2C Chip support 915# Miscellaneous I2C Chip support
@@ -1318,66 +929,28 @@ CONFIG_SENSORS_PCF8591=m
1318# 929#
1319# SPI support 930# SPI support
1320# 931#
1321# CONFIG_SPI is not set 932CONFIG_SPI=y
1322# CONFIG_SPI_MASTER is not set 933# CONFIG_SPI_DEBUG is not set
934CONFIG_SPI_MASTER=y
1323 935
1324# 936#
1325# Dallas's 1-wire bus 937# SPI Master Controller Drivers
1326# 938#
1327CONFIG_W1=m 939CONFIG_SPI_BITBANG=y
1328 940
1329# 941#
1330# 1-wire Bus Masters 942# SPI Protocol Masters
1331# 943#
1332# CONFIG_W1_MASTER_DS9490 is not set
1333# CONFIG_W1_MASTER_DS2482 is not set
1334 944
1335# 945#
1336# 1-wire Slaves 946# Dallas's 1-wire bus
1337# 947#
1338# CONFIG_W1_SLAVE_THERM is not set
1339# CONFIG_W1_SLAVE_SMEM is not set
1340# CONFIG_W1_SLAVE_DS2433 is not set
1341 948
1342# 949#
1343# Hardware Monitoring support 950# Hardware Monitoring support
1344# 951#
1345CONFIG_HWMON=y 952# CONFIG_HWMON is not set
1346CONFIG_HWMON_VID=m 953# CONFIG_HWMON_VID is not set
1347CONFIG_SENSORS_ADM1021=m
1348CONFIG_SENSORS_ADM1025=m
1349CONFIG_SENSORS_ADM1026=m
1350CONFIG_SENSORS_ADM1031=m
1351# CONFIG_SENSORS_ADM9240 is not set
1352CONFIG_SENSORS_ASB100=m
1353# CONFIG_SENSORS_ATXP1 is not set
1354CONFIG_SENSORS_DS1621=m
1355# CONFIG_SENSORS_F71805F is not set
1356CONFIG_SENSORS_FSCHER=m
1357# CONFIG_SENSORS_FSCPOS is not set
1358CONFIG_SENSORS_GL518SM=m
1359# CONFIG_SENSORS_GL520SM is not set
1360CONFIG_SENSORS_IT87=m
1361CONFIG_SENSORS_LM63=m
1362CONFIG_SENSORS_LM75=m
1363CONFIG_SENSORS_LM77=m
1364CONFIG_SENSORS_LM78=m
1365CONFIG_SENSORS_LM80=m
1366CONFIG_SENSORS_LM83=m
1367CONFIG_SENSORS_LM85=m
1368CONFIG_SENSORS_LM87=m
1369CONFIG_SENSORS_LM90=m
1370# CONFIG_SENSORS_LM92 is not set
1371CONFIG_SENSORS_MAX1619=m
1372CONFIG_SENSORS_PC87360=m
1373CONFIG_SENSORS_SMSC47M1=m
1374# CONFIG_SENSORS_SMSC47B397 is not set
1375CONFIG_SENSORS_W83781D=m
1376# CONFIG_SENSORS_W83792D is not set
1377CONFIG_SENSORS_W83L785TS=m
1378CONFIG_SENSORS_W83627HF=m
1379# CONFIG_SENSORS_W83627EHF is not set
1380# CONFIG_HWMON_DEBUG_CHIP is not set
1381 954
1382# 955#
1383# Misc devices 956# Misc devices
@@ -1389,9 +962,18 @@ CONFIG_SENSORS_W83627HF=m
1389# CONFIG_NEW_LEDS is not set 962# CONFIG_NEW_LEDS is not set
1390 963
1391# 964#
965# LED drivers
966#
967
968#
969# LED Triggers
970#
971
972#
1392# Multimedia devices 973# Multimedia devices
1393# 974#
1394# CONFIG_VIDEO_DEV is not set 975# CONFIG_VIDEO_DEV is not set
976CONFIG_VIDEO_V4L2=y
1395 977
1396# 978#
1397# Digital Video Broadcasting Devices 979# Digital Video Broadcasting Devices
@@ -1460,18 +1042,25 @@ CONFIG_DVB_TDA10021=m
1460CONFIG_DVB_STV0297=m 1042CONFIG_DVB_STV0297=m
1461 1043
1462# 1044#
1463# ATSC (North American/Korean Terresterial DTV) frontends 1045# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
1464# 1046#
1465# CONFIG_DVB_NXT200X is not set 1047# CONFIG_DVB_NXT200X is not set
1466# CONFIG_DVB_OR51211 is not set 1048# CONFIG_DVB_OR51211 is not set
1467# CONFIG_DVB_OR51132 is not set 1049# CONFIG_DVB_OR51132 is not set
1468# CONFIG_DVB_BCM3510 is not set 1050# CONFIG_DVB_BCM3510 is not set
1469# CONFIG_DVB_LGDT330X is not set 1051# CONFIG_DVB_LGDT330X is not set
1052
1053#
1054# Miscellaneous devices
1055#
1056CONFIG_DVB_LNBP21=m
1057# CONFIG_DVB_ISL6421 is not set
1470# CONFIG_USB_DABUSB is not set 1058# CONFIG_USB_DABUSB is not set
1471 1059
1472# 1060#
1473# Graphics support 1061# Graphics support
1474# 1062#
1063CONFIG_FIRMWARE_EDID=y
1475# CONFIG_FB is not set 1064# CONFIG_FB is not set
1476 1065
1477# 1066#
@@ -1479,6 +1068,7 @@ CONFIG_DVB_STV0297=m
1479# 1068#
1480# CONFIG_VGA_CONSOLE is not set 1069# CONFIG_VGA_CONSOLE is not set
1481CONFIG_DUMMY_CONSOLE=y 1070CONFIG_DUMMY_CONSOLE=y
1071# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1482 1072
1483# 1073#
1484# Sound 1074# Sound
@@ -1526,17 +1116,12 @@ CONFIG_SND_MPU401=m
1526CONFIG_SND_USB_AUDIO=m 1116CONFIG_SND_USB_AUDIO=m
1527 1117
1528# 1118#
1529# PCMCIA devices
1530#
1531
1532#
1533# Open Sound System 1119# Open Sound System
1534# 1120#
1535CONFIG_SOUND_PRIME=m 1121CONFIG_SOUND_PRIME=m
1536# CONFIG_OBSOLETE_OSS_DRIVER is not set 1122# CONFIG_OSS_OBSOLETE_DRIVER is not set
1537# CONFIG_SOUND_MSNDCLAS is not set 1123# CONFIG_SOUND_MSNDCLAS is not set
1538# CONFIG_SOUND_MSNDPIN is not set 1124# CONFIG_SOUND_MSNDPIN is not set
1539CONFIG_SOUND_TVMIXER=m
1540 1125
1541# 1126#
1542# USB support 1127# USB support
@@ -1544,7 +1129,7 @@ CONFIG_SOUND_TVMIXER=m
1544CONFIG_USB_ARCH_HAS_HCD=y 1129CONFIG_USB_ARCH_HAS_HCD=y
1545# CONFIG_USB_ARCH_HAS_OHCI is not set 1130# CONFIG_USB_ARCH_HAS_OHCI is not set
1546# CONFIG_USB_ARCH_HAS_EHCI is not set 1131# CONFIG_USB_ARCH_HAS_EHCI is not set
1547CONFIG_USB=m 1132CONFIG_USB=y
1548# CONFIG_USB_DEBUG is not set 1133# CONFIG_USB_DEBUG is not set
1549 1134
1550# 1135#
@@ -1561,7 +1146,6 @@ CONFIG_USB_BANDWIDTH=y
1561# 1146#
1562# CONFIG_USB_ISP116X_HCD is not set 1147# CONFIG_USB_ISP116X_HCD is not set
1563CONFIG_USB_SL811_HCD=m 1148CONFIG_USB_SL811_HCD=m
1564# CONFIG_USB_SL811_CS is not set
1565 1149
1566# 1150#
1567# USB Device Class drivers 1151# USB Device Class drivers
@@ -1580,7 +1164,6 @@ CONFIG_USB_STORAGE=m
1580# CONFIG_USB_STORAGE_DEBUG is not set 1164# CONFIG_USB_STORAGE_DEBUG is not set
1581CONFIG_USB_STORAGE_DATAFAB=y 1165CONFIG_USB_STORAGE_DATAFAB=y
1582CONFIG_USB_STORAGE_FREECOM=y 1166CONFIG_USB_STORAGE_FREECOM=y
1583CONFIG_USB_STORAGE_ISD200=y
1584CONFIG_USB_STORAGE_DPCM=y 1167CONFIG_USB_STORAGE_DPCM=y
1585CONFIG_USB_STORAGE_USBAT=y 1168CONFIG_USB_STORAGE_USBAT=y
1586CONFIG_USB_STORAGE_SDDR09=y 1169CONFIG_USB_STORAGE_SDDR09=y
@@ -1608,9 +1191,7 @@ CONFIG_USB_WACOM=m
1608# CONFIG_USB_ACECAD is not set 1191# CONFIG_USB_ACECAD is not set
1609CONFIG_USB_KBTAB=m 1192CONFIG_USB_KBTAB=m
1610CONFIG_USB_POWERMATE=m 1193CONFIG_USB_POWERMATE=m
1611CONFIG_USB_MTOUCH=m 1194# CONFIG_USB_TOUCHSCREEN is not set
1612# CONFIG_USB_ITMTOUCH is not set
1613CONFIG_USB_EGALAX=m
1614# CONFIG_USB_YEALINK is not set 1195# CONFIG_USB_YEALINK is not set
1615CONFIG_USB_XPAD=m 1196CONFIG_USB_XPAD=m
1616CONFIG_USB_ATI_REMOTE=m 1197CONFIG_USB_ATI_REMOTE=m
@@ -1640,13 +1221,11 @@ CONFIG_USB_NET_NET1080=m
1640# CONFIG_USB_NET_RNDIS_HOST is not set 1221# CONFIG_USB_NET_RNDIS_HOST is not set
1641# CONFIG_USB_NET_CDC_SUBSET is not set 1222# CONFIG_USB_NET_CDC_SUBSET is not set
1642CONFIG_USB_NET_ZAURUS=m 1223CONFIG_USB_NET_ZAURUS=m
1643# CONFIG_USB_ZD1201 is not set
1644CONFIG_USB_MON=y 1224CONFIG_USB_MON=y
1645 1225
1646# 1226#
1647# USB port drivers 1227# USB port drivers
1648# 1228#
1649CONFIG_USB_USS720=m
1650 1229
1651# 1230#
1652# USB Serial Converter support 1231# USB Serial Converter support
@@ -1654,7 +1233,7 @@ CONFIG_USB_USS720=m
1654CONFIG_USB_SERIAL=m 1233CONFIG_USB_SERIAL=m
1655CONFIG_USB_SERIAL_GENERIC=y 1234CONFIG_USB_SERIAL_GENERIC=y
1656# CONFIG_USB_SERIAL_AIRPRIME is not set 1235# CONFIG_USB_SERIAL_AIRPRIME is not set
1657# CONFIG_USB_SERIAL_ANYDATA is not set 1236# CONFIG_USB_SERIAL_ARK3116 is not set
1658CONFIG_USB_SERIAL_BELKIN=m 1237CONFIG_USB_SERIAL_BELKIN=m
1659CONFIG_USB_SERIAL_WHITEHEAT=m 1238CONFIG_USB_SERIAL_WHITEHEAT=m
1660CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m 1239CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
@@ -1662,6 +1241,7 @@ CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
1662CONFIG_USB_SERIAL_CYPRESS_M8=m 1241CONFIG_USB_SERIAL_CYPRESS_M8=m
1663CONFIG_USB_SERIAL_EMPEG=m 1242CONFIG_USB_SERIAL_EMPEG=m
1664CONFIG_USB_SERIAL_FTDI_SIO=m 1243CONFIG_USB_SERIAL_FTDI_SIO=m
1244# CONFIG_USB_SERIAL_FUNSOFT is not set
1665CONFIG_USB_SERIAL_VISOR=m 1245CONFIG_USB_SERIAL_VISOR=m
1666CONFIG_USB_SERIAL_IPAQ=m 1246CONFIG_USB_SERIAL_IPAQ=m
1667CONFIG_USB_SERIAL_IR=m 1247CONFIG_USB_SERIAL_IR=m
@@ -1691,9 +1271,11 @@ CONFIG_USB_SERIAL_PL2303=m
1691# CONFIG_USB_SERIAL_HP4X is not set 1271# CONFIG_USB_SERIAL_HP4X is not set
1692CONFIG_USB_SERIAL_SAFE=m 1272CONFIG_USB_SERIAL_SAFE=m
1693# CONFIG_USB_SERIAL_SAFE_PADDED is not set 1273# CONFIG_USB_SERIAL_SAFE_PADDED is not set
1274# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
1694# CONFIG_USB_SERIAL_TI is not set 1275# CONFIG_USB_SERIAL_TI is not set
1695CONFIG_USB_SERIAL_CYBERJACK=m 1276CONFIG_USB_SERIAL_CYBERJACK=m
1696CONFIG_USB_SERIAL_XIRCOM=m 1277CONFIG_USB_SERIAL_XIRCOM=m
1278# CONFIG_USB_SERIAL_OPTION is not set
1697CONFIG_USB_SERIAL_OMNINET=m 1279CONFIG_USB_SERIAL_OMNINET=m
1698CONFIG_USB_EZUSB=y 1280CONFIG_USB_EZUSB=y
1699 1281
@@ -1707,10 +1289,12 @@ CONFIG_USB_RIO500=m
1707CONFIG_USB_LEGOTOWER=m 1289CONFIG_USB_LEGOTOWER=m
1708CONFIG_USB_LCD=m 1290CONFIG_USB_LCD=m
1709CONFIG_USB_LED=m 1291CONFIG_USB_LED=m
1292# CONFIG_USB_CYPRESS_CY7C63 is not set
1710CONFIG_USB_CYTHERM=m 1293CONFIG_USB_CYTHERM=m
1711CONFIG_USB_PHIDGETKIT=m 1294CONFIG_USB_PHIDGETKIT=m
1712CONFIG_USB_PHIDGETSERVO=m 1295CONFIG_USB_PHIDGETSERVO=m
1713# CONFIG_USB_IDMOUSE is not set 1296# CONFIG_USB_IDMOUSE is not set
1297# CONFIG_USB_APPLEDISPLAY is not set
1714# CONFIG_USB_LD is not set 1298# CONFIG_USB_LD is not set
1715CONFIG_USB_TEST=m 1299CONFIG_USB_TEST=m
1716 1300
@@ -1787,7 +1371,6 @@ CONFIG_JFS_POSIX_ACL=y
1787CONFIG_JFS_STATISTICS=y 1371CONFIG_JFS_STATISTICS=y
1788CONFIG_FS_POSIX_ACL=y 1372CONFIG_FS_POSIX_ACL=y
1789CONFIG_XFS_FS=m 1373CONFIG_XFS_FS=m
1790CONFIG_XFS_EXPORT=y
1791CONFIG_XFS_QUOTA=y 1374CONFIG_XFS_QUOTA=y
1792CONFIG_XFS_SECURITY=y 1375CONFIG_XFS_SECURITY=y
1793CONFIG_XFS_POSIX_ACL=y 1376CONFIG_XFS_POSIX_ACL=y
@@ -1796,6 +1379,7 @@ CONFIG_XFS_RT=y
1796CONFIG_MINIX_FS=m 1379CONFIG_MINIX_FS=m
1797CONFIG_ROMFS_FS=m 1380CONFIG_ROMFS_FS=m
1798CONFIG_INOTIFY=y 1381CONFIG_INOTIFY=y
1382CONFIG_INOTIFY_USER=y
1799CONFIG_QUOTA=y 1383CONFIG_QUOTA=y
1800CONFIG_QFMT_V1=m 1384CONFIG_QFMT_V1=m
1801CONFIG_QFMT_V2=m 1385CONFIG_QFMT_V2=m
@@ -1856,6 +1440,7 @@ CONFIG_JFFS2_FS=m
1856CONFIG_JFFS2_FS_DEBUG=0 1440CONFIG_JFFS2_FS_DEBUG=0
1857CONFIG_JFFS2_FS_WRITEBUFFER=y 1441CONFIG_JFFS2_FS_WRITEBUFFER=y
1858# CONFIG_JFFS2_SUMMARY is not set 1442# CONFIG_JFFS2_SUMMARY is not set
1443# CONFIG_JFFS2_FS_XATTR is not set
1859# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 1444# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1860CONFIG_JFFS2_ZLIB=y 1445CONFIG_JFFS2_ZLIB=y
1861CONFIG_JFFS2_RTIME=y 1446CONFIG_JFFS2_RTIME=y
@@ -1866,11 +1451,13 @@ CONFIG_HPFS_FS=m
1866CONFIG_QNX4FS_FS=m 1451CONFIG_QNX4FS_FS=m
1867CONFIG_SYSV_FS=m 1452CONFIG_SYSV_FS=m
1868CONFIG_UFS_FS=m 1453CONFIG_UFS_FS=m
1454# CONFIG_UFS_FS_WRITE is not set
1455# CONFIG_UFS_DEBUG is not set
1869 1456
1870# 1457#
1871# Network File Systems 1458# Network File Systems
1872# 1459#
1873CONFIG_NFS_FS=m 1460CONFIG_NFS_FS=y
1874CONFIG_NFS_V3=y 1461CONFIG_NFS_V3=y
1875# CONFIG_NFS_V3_ACL is not set 1462# CONFIG_NFS_V3_ACL is not set
1876CONFIG_NFS_V4=y 1463CONFIG_NFS_V4=y
@@ -1880,19 +1467,22 @@ CONFIG_NFSD_V3=y
1880# CONFIG_NFSD_V3_ACL is not set 1467# CONFIG_NFSD_V3_ACL is not set
1881CONFIG_NFSD_V4=y 1468CONFIG_NFSD_V4=y
1882CONFIG_NFSD_TCP=y 1469CONFIG_NFSD_TCP=y
1883CONFIG_LOCKD=m 1470CONFIG_ROOT_NFS=y
1471CONFIG_LOCKD=y
1884CONFIG_LOCKD_V4=y 1472CONFIG_LOCKD_V4=y
1885CONFIG_EXPORTFS=m 1473CONFIG_EXPORTFS=m
1886CONFIG_NFS_COMMON=y 1474CONFIG_NFS_COMMON=y
1887CONFIG_SUNRPC=m 1475CONFIG_SUNRPC=y
1888CONFIG_SUNRPC_GSS=m 1476CONFIG_SUNRPC_GSS=y
1889CONFIG_RPCSEC_GSS_KRB5=m 1477CONFIG_RPCSEC_GSS_KRB5=y
1890CONFIG_RPCSEC_GSS_SPKM3=m 1478CONFIG_RPCSEC_GSS_SPKM3=m
1891CONFIG_SMB_FS=m 1479CONFIG_SMB_FS=m
1892# CONFIG_SMB_NLS_DEFAULT is not set 1480# CONFIG_SMB_NLS_DEFAULT is not set
1893CONFIG_CIFS=m 1481CONFIG_CIFS=m
1894# CONFIG_CIFS_STATS is not set 1482# CONFIG_CIFS_STATS is not set
1483# CONFIG_CIFS_WEAK_PW_HASH is not set
1895# CONFIG_CIFS_XATTR is not set 1484# CONFIG_CIFS_XATTR is not set
1485# CONFIG_CIFS_DEBUG2 is not set
1896# CONFIG_CIFS_EXPERIMENTAL is not set 1486# CONFIG_CIFS_EXPERIMENTAL is not set
1897CONFIG_NCP_FS=m 1487CONFIG_NCP_FS=m
1898CONFIG_NCPFS_PACKET_SIGNING=y 1488CONFIG_NCPFS_PACKET_SIGNING=y
@@ -1940,7 +1530,7 @@ CONFIG_SUN_PARTITION=y
1940# 1530#
1941# Native Language Support 1531# Native Language Support
1942# 1532#
1943CONFIG_NLS=y 1533CONFIG_NLS=m
1944CONFIG_NLS_DEFAULT="cp437" 1534CONFIG_NLS_DEFAULT="cp437"
1945CONFIG_NLS_CODEPAGE_437=m 1535CONFIG_NLS_CODEPAGE_437=m
1946CONFIG_NLS_CODEPAGE_737=m 1536CONFIG_NLS_CODEPAGE_737=m
@@ -1984,26 +1574,29 @@ CONFIG_NLS_UTF8=m
1984# 1574#
1985# Profiling support 1575# Profiling support
1986# 1576#
1987CONFIG_PROFILING=y 1577# CONFIG_PROFILING is not set
1988CONFIG_OPROFILE=m
1989 1578
1990# 1579#
1991# Kernel hacking 1580# Kernel hacking
1992# 1581#
1993# CONFIG_PRINTK_TIME is not set 1582# CONFIG_PRINTK_TIME is not set
1994CONFIG_MAGIC_SYSRQ=y 1583CONFIG_MAGIC_SYSRQ=y
1584# CONFIG_UNUSED_SYMBOLS is not set
1995CONFIG_DEBUG_KERNEL=y 1585CONFIG_DEBUG_KERNEL=y
1996CONFIG_LOG_BUF_SHIFT=14 1586CONFIG_LOG_BUF_SHIFT=14
1997CONFIG_DETECT_SOFTLOCKUP=y 1587CONFIG_DETECT_SOFTLOCKUP=y
1998# CONFIG_SCHEDSTATS is not set 1588# CONFIG_SCHEDSTATS is not set
1999# CONFIG_DEBUG_SLAB is not set 1589# CONFIG_DEBUG_SLAB is not set
2000CONFIG_DEBUG_PREEMPT=y 1590# CONFIG_DEBUG_RT_MUTEXES is not set
2001CONFIG_DEBUG_MUTEXES=y 1591# CONFIG_RT_MUTEX_TESTER is not set
2002# CONFIG_DEBUG_SPINLOCK is not set 1592# CONFIG_DEBUG_SPINLOCK is not set
1593CONFIG_DEBUG_MUTEXES=y
1594# CONFIG_DEBUG_RWSEMS is not set
2003# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1595# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1596# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
2004# CONFIG_DEBUG_KOBJECT is not set 1597# CONFIG_DEBUG_KOBJECT is not set
2005# CONFIG_DEBUG_BUGVERBOSE is not set 1598# CONFIG_DEBUG_BUGVERBOSE is not set
2006CONFIG_DEBUG_INFO=y 1599# CONFIG_DEBUG_INFO is not set
2007# CONFIG_DEBUG_FS is not set 1600# CONFIG_DEBUG_FS is not set
2008# CONFIG_DEBUG_VM is not set 1601# CONFIG_DEBUG_VM is not set
2009CONFIG_FRAME_POINTER=y 1602CONFIG_FRAME_POINTER=y
@@ -2013,8 +1606,7 @@ CONFIG_FORCED_INLINING=y
2013# CONFIG_DEBUG_USER is not set 1606# CONFIG_DEBUG_USER is not set
2014# CONFIG_DEBUG_WAITQ is not set 1607# CONFIG_DEBUG_WAITQ is not set
2015# CONFIG_DEBUG_ERRORS is not set 1608# CONFIG_DEBUG_ERRORS is not set
2016CONFIG_DEBUG_LL=y 1609# CONFIG_DEBUG_LL is not set
2017# CONFIG_DEBUG_ICEDCC is not set
2018 1610
2019# 1611#
2020# Security options 1612# Security options
@@ -2039,7 +1631,7 @@ CONFIG_CRYPTO_SHA256=m
2039CONFIG_CRYPTO_SHA512=m 1631CONFIG_CRYPTO_SHA512=m
2040CONFIG_CRYPTO_WP512=m 1632CONFIG_CRYPTO_WP512=m
2041# CONFIG_CRYPTO_TGR192 is not set 1633# CONFIG_CRYPTO_TGR192 is not set
2042CONFIG_CRYPTO_DES=m 1634CONFIG_CRYPTO_DES=y
2043CONFIG_CRYPTO_BLOWFISH=m 1635CONFIG_CRYPTO_BLOWFISH=m
2044CONFIG_CRYPTO_TWOFISH=m 1636CONFIG_CRYPTO_TWOFISH=m
2045CONFIG_CRYPTO_SERPENT=m 1637CONFIG_CRYPTO_SERPENT=m
@@ -2068,5 +1660,6 @@ CONFIG_CRC32=y
2068CONFIG_LIBCRC32C=m 1660CONFIG_LIBCRC32C=m
2069CONFIG_ZLIB_INFLATE=y 1661CONFIG_ZLIB_INFLATE=y
2070CONFIG_ZLIB_DEFLATE=m 1662CONFIG_ZLIB_DEFLATE=m
2071CONFIG_REED_SOLOMON=m 1663CONFIG_TEXTSEARCH=y
2072CONFIG_REED_SOLOMON_DEC16=y 1664CONFIG_TEXTSEARCH_KMP=m
1665CONFIG_PLIST=y
diff --git a/arch/arm/mach-ixp4xx/nslu2-pci.c b/arch/arm/mach-ixp4xx/nslu2-pci.c
index 0de639d6e60a..04661fef97f5 100644
--- a/arch/arm/mach-ixp4xx/nslu2-pci.c
+++ b/arch/arm/mach-ixp4xx/nslu2-pci.c
@@ -17,6 +17,7 @@
17 17
18#include <linux/pci.h> 18#include <linux/pci.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/irq.h>
20 21
21#include <asm/mach/pci.h> 22#include <asm/mach/pci.h>
22#include <asm/mach-types.h> 23#include <asm/mach-types.h>
diff --git a/arch/arm/mach-ixp4xx/nslu2-power.c b/arch/arm/mach-ixp4xx/nslu2-power.c
index e2a2230b69f0..a29b3b2b61b6 100644
--- a/arch/arm/mach-ixp4xx/nslu2-power.c
+++ b/arch/arm/mach-ixp4xx/nslu2-power.c
@@ -19,6 +19,7 @@
19 19
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/reboot.h> 21#include <linux/reboot.h>
22#include <linux/irq.h>
22#include <linux/interrupt.h> 23#include <linux/interrupt.h>
23#include <linux/reboot.h> 24#include <linux/reboot.h>
24 25
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index b4171dd43df0..bbd138be6a70 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -81,9 +81,17 @@ config SMDK2440_CPU2442
81 depends on ARCH_S3C2440 81 depends on ARCH_S3C2440
82 select CPU_S3C2442 82 select CPU_S3C2442
83 83
84config MACH_S3C2413
85 bool
86 help
87 Internal node for S3C2413 verison of SMDK2413, so that
88 machine_is_s3c2413() will work when MACH_SMDK2413 is
89 selected
90
84config MACH_SMDK2413 91config MACH_SMDK2413
85 bool "SMDK2413" 92 bool "SMDK2413"
86 select CPU_S3C2412 93 select CPU_S3C2412
94 select MACH_S3C2413
87 select MACH_SMDK 95 select MACH_SMDK
88 help 96 help
89 Say Y here if you are using an SMDK2413 97 Say Y here if you are using an SMDK2413
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile
index 273e05f2b8de..0eadec916214 100644
--- a/arch/arm/mach-s3c2410/Makefile
+++ b/arch/arm/mach-s3c2410/Makefile
@@ -28,6 +28,7 @@ obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o
28 28
29# S3C2412 support 29# S3C2412 support
30obj-$(CONFIG_CPU_S3C2412) += s3c2412.o 30obj-$(CONFIG_CPU_S3C2412) += s3c2412.o
31obj-$(CONFIG_CPU_S3C2412) += s3c2412-irq.o
31obj-$(CONFIG_CPU_S3C2412) += s3c2412-clock.o 32obj-$(CONFIG_CPU_S3C2412) += s3c2412-clock.o
32 33
33# 34#
diff --git a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h
index b0ed9d2d141b..be42e4032a6d 100644
--- a/arch/arm/mach-s3c2410/cpu.h
+++ b/arch/arm/mach-s3c2410/cpu.h
@@ -8,16 +8,6 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 *
12 * Modifications:
13 * 24-Aug-2004 BJD Start of generic S3C24XX support
14 * 18-Oct-2004 BJD Moved board struct into this file
15 * 04-Jan-2005 BJD New uart initialisation
16 * 10-Jan-2005 BJD Moved generic init here, specific to cpu headers
17 * 14-Jan-2005 BJD Added s3c24xx_init_clocks() call
18 * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} & IODESC_ENT
19 * 14-Mar-2005 BJD Updated for __iomem
20 * 15-Jan-2006 LCVR Updated S3C2410_PA_##x to new S3C24XX_PA_##x macro
21*/ 11*/
22 12
23/* todo - fix when rmk changes iodescs to use `void __iomem *` */ 13/* todo - fix when rmk changes iodescs to use `void __iomem *` */
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c
index ad3845e329ba..cae35ff76f33 100644
--- a/arch/arm/mach-s3c2410/devs.c
+++ b/arch/arm/mach-s3c2410/devs.c
@@ -1,22 +1,14 @@
1/* linux/arch/arm/mach-s3c2410/devs.c 1/* linux/arch/arm/mach-s3c2410/devs.c
2 * 2 *
3 * Copyright (c) 2004 Simtec Electronics 3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * 5 *
6 * Base S3C2410 platform device definitions 6 * Base S3C24XX platform device definitions
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 * 11 *
12 * Modifications:
13 * 15-Jan-2006 LCVR Using S3C24XX_PA_##x macro for common S3C24XX devices
14 * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ}
15 * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv
16 * 29-Aug-2004 BJD Added timers 0 through 3
17 * 29-Aug-2004 BJD Changed index of devices we only have one of to -1
18 * 21-Aug-2004 BJD Added IRQ_TICK to RTC resources
19 * 18-Aug-2004 BJD Created initial version
20*/ 12*/
21 13
22#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c
index 25855452fe8c..cc92a7b2db88 100644
--- a/arch/arm/mach-s3c2410/dma.c
+++ b/arch/arm/mach-s3c2410/dma.c
@@ -60,7 +60,7 @@ static void __iomem *dma_base;
60static kmem_cache_t *dma_kmem; 60static kmem_cache_t *dma_kmem;
61 61
62/* dma channel state information */ 62/* dma channel state information */
63s3c2410_dma_chan_t s3c2410_chans[S3C2410_DMA_CHANNELS]; 63struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS];
64 64
65/* debugging functions */ 65/* debugging functions */
66 66
@@ -74,7 +74,7 @@ s3c2410_dma_chan_t s3c2410_chans[S3C2410_DMA_CHANNELS];
74#define dma_wrreg(chan, reg, val) writel((val), (chan)->regs + (reg)) 74#define dma_wrreg(chan, reg, val) writel((val), (chan)->regs + (reg))
75#else 75#else
76static inline void 76static inline void
77dma_wrreg(s3c2410_dma_chan_t *chan, int reg, unsigned long val) 77dma_wrreg(struct s3c2410_dma_chan *chan, int reg, unsigned long val)
78{ 78{
79 pr_debug("writing %08x to register %08x\n",(unsigned int)val,reg); 79 pr_debug("writing %08x to register %08x\n",(unsigned int)val,reg);
80 writel(val, dma_regaddr(chan, reg)); 80 writel(val, dma_regaddr(chan, reg));
@@ -102,7 +102,7 @@ struct s3c2410_dma_regstate {
102*/ 102*/
103 103
104static void 104static void
105dmadbg_capture(s3c2410_dma_chan_t *chan, struct s3c2410_dma_regstate *regs) 105dmadbg_capture(struct s3c2410_dma_chan *chan, struct s3c2410_dma_regstate *regs)
106{ 106{
107 regs->dcsrc = dma_rdreg(chan, S3C2410_DMA_DCSRC); 107 regs->dcsrc = dma_rdreg(chan, S3C2410_DMA_DCSRC);
108 regs->disrc = dma_rdreg(chan, S3C2410_DMA_DISRC); 108 regs->disrc = dma_rdreg(chan, S3C2410_DMA_DISRC);
@@ -112,7 +112,7 @@ dmadbg_capture(s3c2410_dma_chan_t *chan, struct s3c2410_dma_regstate *regs)
112} 112}
113 113
114static void 114static void
115dmadbg_dumpregs(const char *fname, int line, s3c2410_dma_chan_t *chan, 115dmadbg_dumpregs(const char *fname, int line, struct s3c2410_dma_chan *chan,
116 struct s3c2410_dma_regstate *regs) 116 struct s3c2410_dma_regstate *regs)
117{ 117{
118 printk(KERN_DEBUG "dma%d: %s:%d: DCSRC=%08lx, DISRC=%08lx, DSTAT=%08lx DMT=%02lx, DCON=%08lx\n", 118 printk(KERN_DEBUG "dma%d: %s:%d: DCSRC=%08lx, DISRC=%08lx, DSTAT=%08lx DMT=%02lx, DCON=%08lx\n",
@@ -122,7 +122,7 @@ dmadbg_dumpregs(const char *fname, int line, s3c2410_dma_chan_t *chan,
122} 122}
123 123
124static void 124static void
125dmadbg_showchan(const char *fname, int line, s3c2410_dma_chan_t *chan) 125dmadbg_showchan(const char *fname, int line, struct s3c2410_dma_chan *chan)
126{ 126{
127 struct s3c2410_dma_regstate state; 127 struct s3c2410_dma_regstate state;
128 128
@@ -136,7 +136,7 @@ dmadbg_showchan(const char *fname, int line, s3c2410_dma_chan_t *chan)
136} 136}
137 137
138static void 138static void
139dmadbg_showregs(const char *fname, int line, s3c2410_dma_chan_t *chan) 139dmadbg_showregs(const char *fname, int line, struct s3c2410_dma_chan *chan)
140{ 140{
141 struct s3c2410_dma_regstate state; 141 struct s3c2410_dma_regstate state;
142 142
@@ -164,7 +164,7 @@ dmadbg_showregs(const char *fname, int line, s3c2410_dma_chan_t *chan)
164*/ 164*/
165 165
166static void 166static void
167s3c2410_dma_stats_timeout(s3c2410_dma_stats_t *stats, int val) 167s3c2410_dma_stats_timeout(struct s3c2410_dma_stats *stats, int val)
168{ 168{
169 if (stats == NULL) 169 if (stats == NULL)
170 return; 170 return;
@@ -183,7 +183,7 @@ s3c2410_dma_stats_timeout(s3c2410_dma_stats_t *stats, int val)
183*/ 183*/
184 184
185static int 185static int
186s3c2410_dma_waitforload(s3c2410_dma_chan_t *chan, int line) 186s3c2410_dma_waitforload(struct s3c2410_dma_chan *chan, int line)
187{ 187{
188 int timeout = chan->load_timeout; 188 int timeout = chan->load_timeout;
189 int took; 189 int took;
@@ -230,8 +230,8 @@ s3c2410_dma_waitforload(s3c2410_dma_chan_t *chan, int line)
230*/ 230*/
231 231
232static inline int 232static inline int
233s3c2410_dma_loadbuffer(s3c2410_dma_chan_t *chan, 233s3c2410_dma_loadbuffer(struct s3c2410_dma_chan *chan,
234 s3c2410_dma_buf_t *buf) 234 struct s3c2410_dma_buf *buf)
235{ 235{
236 unsigned long reload; 236 unsigned long reload;
237 237
@@ -304,7 +304,7 @@ s3c2410_dma_loadbuffer(s3c2410_dma_chan_t *chan,
304*/ 304*/
305 305
306static void 306static void
307s3c2410_dma_call_op(s3c2410_dma_chan_t *chan, s3c2410_chan_op_t op) 307s3c2410_dma_call_op(struct s3c2410_dma_chan *chan, enum s3c2410_chan_op op)
308{ 308{
309 if (chan->op_fn != NULL) { 309 if (chan->op_fn != NULL) {
310 (chan->op_fn)(chan, op); 310 (chan->op_fn)(chan, op);
@@ -318,8 +318,8 @@ s3c2410_dma_call_op(s3c2410_dma_chan_t *chan, s3c2410_chan_op_t op)
318*/ 318*/
319 319
320static inline void 320static inline void
321s3c2410_dma_buffdone(s3c2410_dma_chan_t *chan, s3c2410_dma_buf_t *buf, 321s3c2410_dma_buffdone(struct s3c2410_dma_chan *chan, struct s3c2410_dma_buf *buf,
322 s3c2410_dma_buffresult_t result) 322 enum s3c2410_dma_buffresult result)
323{ 323{
324 pr_debug("callback_fn=%p, buf=%p, id=%p, size=%d, result=%d\n", 324 pr_debug("callback_fn=%p, buf=%p, id=%p, size=%d, result=%d\n",
325 chan->callback_fn, buf, buf->id, buf->size, result); 325 chan->callback_fn, buf, buf->id, buf->size, result);
@@ -334,7 +334,7 @@ s3c2410_dma_buffdone(s3c2410_dma_chan_t *chan, s3c2410_dma_buf_t *buf,
334 * start a dma channel going 334 * start a dma channel going
335*/ 335*/
336 336
337static int s3c2410_dma_start(s3c2410_dma_chan_t *chan) 337static int s3c2410_dma_start(struct s3c2410_dma_chan *chan)
338{ 338{
339 unsigned long tmp; 339 unsigned long tmp;
340 unsigned long flags; 340 unsigned long flags;
@@ -430,7 +430,7 @@ static int s3c2410_dma_start(s3c2410_dma_chan_t *chan)
430*/ 430*/
431 431
432static int 432static int
433s3c2410_dma_canload(s3c2410_dma_chan_t *chan) 433s3c2410_dma_canload(struct s3c2410_dma_chan *chan)
434{ 434{
435 if (chan->load_state == S3C2410_DMALOAD_NONE || 435 if (chan->load_state == S3C2410_DMALOAD_NONE ||
436 chan->load_state == S3C2410_DMALOAD_1RUNNING) 436 chan->load_state == S3C2410_DMALOAD_1RUNNING)
@@ -460,8 +460,8 @@ s3c2410_dma_canload(s3c2410_dma_chan_t *chan)
460int s3c2410_dma_enqueue(unsigned int channel, void *id, 460int s3c2410_dma_enqueue(unsigned int channel, void *id,
461 dma_addr_t data, int size) 461 dma_addr_t data, int size)
462{ 462{
463 s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; 463 struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
464 s3c2410_dma_buf_t *buf; 464 struct s3c2410_dma_buf *buf;
465 unsigned long flags; 465 unsigned long flags;
466 466
467 check_channel(channel); 467 check_channel(channel);
@@ -540,7 +540,7 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id,
540EXPORT_SYMBOL(s3c2410_dma_enqueue); 540EXPORT_SYMBOL(s3c2410_dma_enqueue);
541 541
542static inline void 542static inline void
543s3c2410_dma_freebuf(s3c2410_dma_buf_t *buf) 543s3c2410_dma_freebuf(struct s3c2410_dma_buf *buf)
544{ 544{
545 int magicok = (buf->magic == BUF_MAGIC); 545 int magicok = (buf->magic == BUF_MAGIC);
546 546
@@ -560,7 +560,7 @@ s3c2410_dma_freebuf(s3c2410_dma_buf_t *buf)
560*/ 560*/
561 561
562static inline void 562static inline void
563s3c2410_dma_lastxfer(s3c2410_dma_chan_t *chan) 563s3c2410_dma_lastxfer(struct s3c2410_dma_chan *chan)
564{ 564{
565 pr_debug("dma%d: s3c2410_dma_lastxfer: load_state %d\n", 565 pr_debug("dma%d: s3c2410_dma_lastxfer: load_state %d\n",
566 chan->number, chan->load_state); 566 chan->number, chan->load_state);
@@ -601,8 +601,8 @@ s3c2410_dma_lastxfer(s3c2410_dma_chan_t *chan)
601static irqreturn_t 601static irqreturn_t
602s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs) 602s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs)
603{ 603{
604 s3c2410_dma_chan_t *chan = (s3c2410_dma_chan_t *)devpw; 604 struct s3c2410_dma_chan *chan = (struct s3c2410_dma_chan *)devpw;
605 s3c2410_dma_buf_t *buf; 605 struct s3c2410_dma_buf *buf;
606 606
607 buf = chan->curr; 607 buf = chan->curr;
608 608
@@ -731,10 +731,10 @@ s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs)
731 * get control of an dma channel 731 * get control of an dma channel
732*/ 732*/
733 733
734int s3c2410_dma_request(unsigned int channel, s3c2410_dma_client_t *client, 734int s3c2410_dma_request(unsigned int channel, struct s3c2410_dma_client *client,
735 void *dev) 735 void *dev)
736{ 736{
737 s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; 737 struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
738 unsigned long flags; 738 unsigned long flags;
739 int err; 739 int err;
740 740
@@ -807,9 +807,9 @@ EXPORT_SYMBOL(s3c2410_dma_request);
807 * allowed to go through. 807 * allowed to go through.
808*/ 808*/
809 809
810int s3c2410_dma_free(dmach_t channel, s3c2410_dma_client_t *client) 810int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *client)
811{ 811{
812 s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; 812 struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
813 unsigned long flags; 813 unsigned long flags;
814 814
815 check_channel(channel); 815 check_channel(channel);
@@ -846,7 +846,7 @@ int s3c2410_dma_free(dmach_t channel, s3c2410_dma_client_t *client)
846 846
847EXPORT_SYMBOL(s3c2410_dma_free); 847EXPORT_SYMBOL(s3c2410_dma_free);
848 848
849static int s3c2410_dma_dostop(s3c2410_dma_chan_t *chan) 849static int s3c2410_dma_dostop(struct s3c2410_dma_chan *chan)
850{ 850{
851 unsigned long tmp; 851 unsigned long tmp;
852 unsigned long flags; 852 unsigned long flags;
@@ -880,7 +880,7 @@ static int s3c2410_dma_dostop(s3c2410_dma_chan_t *chan)
880 return 0; 880 return 0;
881} 881}
882 882
883void s3c2410_dma_waitforstop(s3c2410_dma_chan_t *chan) 883void s3c2410_dma_waitforstop(struct s3c2410_dma_chan *chan)
884{ 884{
885 unsigned long tmp; 885 unsigned long tmp;
886 unsigned int timeout = 0x10000; 886 unsigned int timeout = 0x10000;
@@ -901,9 +901,9 @@ void s3c2410_dma_waitforstop(s3c2410_dma_chan_t *chan)
901 * stop the channel, and remove all current and pending transfers 901 * stop the channel, and remove all current and pending transfers
902*/ 902*/
903 903
904static int s3c2410_dma_flush(s3c2410_dma_chan_t *chan) 904static int s3c2410_dma_flush(struct s3c2410_dma_chan *chan)
905{ 905{
906 s3c2410_dma_buf_t *buf, *next; 906 struct s3c2410_dma_buf *buf, *next;
907 unsigned long flags; 907 unsigned long flags;
908 908
909 pr_debug("%s: chan %p (%d)\n", __FUNCTION__, chan, chan->number); 909 pr_debug("%s: chan %p (%d)\n", __FUNCTION__, chan, chan->number);
@@ -958,7 +958,7 @@ static int s3c2410_dma_flush(s3c2410_dma_chan_t *chan)
958} 958}
959 959
960int 960int
961s3c2410_dma_started(s3c2410_dma_chan_t *chan) 961s3c2410_dma_started(struct s3c2410_dma_chan *chan)
962{ 962{
963 unsigned long flags; 963 unsigned long flags;
964 964
@@ -995,9 +995,9 @@ s3c2410_dma_started(s3c2410_dma_chan_t *chan)
995} 995}
996 996
997int 997int
998s3c2410_dma_ctrl(dmach_t channel, s3c2410_chan_op_t op) 998s3c2410_dma_ctrl(dmach_t channel, enum s3c2410_chan_op op)
999{ 999{
1000 s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; 1000 struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
1001 1001
1002 check_channel(channel); 1002 check_channel(channel);
1003 1003
@@ -1046,7 +1046,7 @@ int s3c2410_dma_config(dmach_t channel,
1046 int xferunit, 1046 int xferunit,
1047 int dcon) 1047 int dcon)
1048{ 1048{
1049 s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; 1049 struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
1050 1050
1051 pr_debug("%s: chan=%d, xfer_unit=%d, dcon=%08x\n", 1051 pr_debug("%s: chan=%d, xfer_unit=%d, dcon=%08x\n",
1052 __FUNCTION__, channel, xferunit, dcon); 1052 __FUNCTION__, channel, xferunit, dcon);
@@ -1086,7 +1086,7 @@ EXPORT_SYMBOL(s3c2410_dma_config);
1086 1086
1087int s3c2410_dma_setflags(dmach_t channel, unsigned int flags) 1087int s3c2410_dma_setflags(dmach_t channel, unsigned int flags)
1088{ 1088{
1089 s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; 1089 struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
1090 1090
1091 check_channel(channel); 1091 check_channel(channel);
1092 1092
@@ -1106,7 +1106,7 @@ EXPORT_SYMBOL(s3c2410_dma_setflags);
1106 1106
1107int s3c2410_dma_set_opfn(dmach_t channel, s3c2410_dma_opfn_t rtn) 1107int s3c2410_dma_set_opfn(dmach_t channel, s3c2410_dma_opfn_t rtn)
1108{ 1108{
1109 s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; 1109 struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
1110 1110
1111 check_channel(channel); 1111 check_channel(channel);
1112 1112
@@ -1121,7 +1121,7 @@ EXPORT_SYMBOL(s3c2410_dma_set_opfn);
1121 1121
1122int s3c2410_dma_set_buffdone_fn(dmach_t channel, s3c2410_dma_cbfn_t rtn) 1122int s3c2410_dma_set_buffdone_fn(dmach_t channel, s3c2410_dma_cbfn_t rtn)
1123{ 1123{
1124 s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; 1124 struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
1125 1125
1126 check_channel(channel); 1126 check_channel(channel);
1127 1127
@@ -1149,11 +1149,11 @@ EXPORT_SYMBOL(s3c2410_dma_set_buffdone_fn);
1149*/ 1149*/
1150 1150
1151int s3c2410_dma_devconfig(int channel, 1151int s3c2410_dma_devconfig(int channel,
1152 s3c2410_dmasrc_t source, 1152 enum s3c2410_dmasrc source,
1153 int hwcfg, 1153 int hwcfg,
1154 unsigned long devaddr) 1154 unsigned long devaddr)
1155{ 1155{
1156 s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; 1156 struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
1157 1157
1158 check_channel(channel); 1158 check_channel(channel);
1159 1159
@@ -1200,7 +1200,7 @@ EXPORT_SYMBOL(s3c2410_dma_devconfig);
1200 1200
1201int s3c2410_dma_getposition(dmach_t channel, dma_addr_t *src, dma_addr_t *dst) 1201int s3c2410_dma_getposition(dmach_t channel, dma_addr_t *src, dma_addr_t *dst)
1202{ 1202{
1203 s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; 1203 struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
1204 1204
1205 check_channel(channel); 1205 check_channel(channel);
1206 1206
@@ -1222,7 +1222,7 @@ EXPORT_SYMBOL(s3c2410_dma_getposition);
1222 1222
1223static int s3c2410_dma_suspend(struct sys_device *dev, pm_message_t state) 1223static int s3c2410_dma_suspend(struct sys_device *dev, pm_message_t state)
1224{ 1224{
1225 s3c2410_dma_chan_t *cp = container_of(dev, s3c2410_dma_chan_t, dev); 1225 struct s3c2410_dma_chan *cp = container_of(dev, struct s3c2410_dma_chan, dev);
1226 1226
1227 printk(KERN_DEBUG "suspending dma channel %d\n", cp->number); 1227 printk(KERN_DEBUG "suspending dma channel %d\n", cp->number);
1228 1228
@@ -1262,7 +1262,7 @@ static struct sysdev_class dma_sysclass = {
1262 1262
1263static void s3c2410_dma_cache_ctor(void *p, kmem_cache_t *c, unsigned long f) 1263static void s3c2410_dma_cache_ctor(void *p, kmem_cache_t *c, unsigned long f)
1264{ 1264{
1265 memset(p, 0, sizeof(s3c2410_dma_buf_t)); 1265 memset(p, 0, sizeof(struct s3c2410_dma_buf));
1266} 1266}
1267 1267
1268 1268
@@ -1270,7 +1270,7 @@ static void s3c2410_dma_cache_ctor(void *p, kmem_cache_t *c, unsigned long f)
1270 1270
1271static int __init s3c2410_init_dma(void) 1271static int __init s3c2410_init_dma(void)
1272{ 1272{
1273 s3c2410_dma_chan_t *cp; 1273 struct s3c2410_dma_chan *cp;
1274 int channel; 1274 int channel;
1275 int ret; 1275 int ret;
1276 1276
@@ -1288,7 +1288,7 @@ static int __init s3c2410_init_dma(void)
1288 goto err; 1288 goto err;
1289 } 1289 }
1290 1290
1291 dma_kmem = kmem_cache_create("dma_desc", sizeof(s3c2410_dma_buf_t), 0, 1291 dma_kmem = kmem_cache_create("dma_desc", sizeof(struct s3c2410_dma_buf), 0,
1292 SLAB_HWCACHE_ALIGN, 1292 SLAB_HWCACHE_ALIGN,
1293 s3c2410_dma_cache_ctor, NULL); 1293 s3c2410_dma_cache_ctor, NULL);
1294 1294
@@ -1301,7 +1301,7 @@ static int __init s3c2410_init_dma(void)
1301 for (channel = 0; channel < S3C2410_DMA_CHANNELS; channel++) { 1301 for (channel = 0; channel < S3C2410_DMA_CHANNELS; channel++) {
1302 cp = &s3c2410_chans[channel]; 1302 cp = &s3c2410_chans[channel];
1303 1303
1304 memset(cp, 0, sizeof(s3c2410_dma_chan_t)); 1304 memset(cp, 0, sizeof(struct s3c2410_dma_chan));
1305 1305
1306 /* dma channel irqs are in order.. */ 1306 /* dma channel irqs are in order.. */
1307 cp->number = channel; 1307 cp->number = channel;
diff --git a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c
index 6822dc7f7799..cd6139b35999 100644
--- a/arch/arm/mach-s3c2410/irq.c
+++ b/arch/arm/mach-s3c2410/irq.c
@@ -86,7 +86,7 @@ unsigned long s3c_irqwake_intmask = 0xffffffffL;
86unsigned long s3c_irqwake_eintallow = 0x0000fff0L; 86unsigned long s3c_irqwake_eintallow = 0x0000fff0L;
87unsigned long s3c_irqwake_eintmask = 0xffffffffL; 87unsigned long s3c_irqwake_eintmask = 0xffffffffL;
88 88
89static int 89int
90s3c_irq_wake(unsigned int irqno, unsigned int state) 90s3c_irq_wake(unsigned int irqno, unsigned int state)
91{ 91{
92 unsigned long irqbit = 1 << (irqno - IRQ_EINT0); 92 unsigned long irqbit = 1 << (irqno - IRQ_EINT0);
@@ -260,7 +260,7 @@ s3c_irqext_unmask(unsigned int irqno)
260 s3c_irq_unmask((irqno <= (IRQ_EINT7 - EXTINT_OFF)) ? IRQ_EINT4t7 : IRQ_EINT8t23); 260 s3c_irq_unmask((irqno <= (IRQ_EINT7 - EXTINT_OFF)) ? IRQ_EINT4t7 : IRQ_EINT8t23);
261} 261}
262 262
263static int 263int
264s3c_irqext_type(unsigned int irq, unsigned int type) 264s3c_irqext_type(unsigned int irq, unsigned int type)
265{ 265{
266 void __iomem *extint_reg; 266 void __iomem *extint_reg;
diff --git a/arch/arm/mach-s3c2410/irq.h b/arch/arm/mach-s3c2410/irq.h
index 4abf0ca14e00..842a9f42c97b 100644
--- a/arch/arm/mach-s3c2410/irq.h
+++ b/arch/arm/mach-s3c2410/irq.h
@@ -97,3 +97,13 @@ s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group)
97 __raw_writel(parentmask, S3C2410_INTPND); 97 __raw_writel(parentmask, S3C2410_INTPND);
98 } 98 }
99} 99}
100
101/* exported for use in arch/arm/mach-s3c2410 */
102
103#ifdef CONFIG_PM
104extern int s3c_irq_wake(unsigned int irqno, unsigned int state);
105#else
106#define s3c_irq_wake NULL
107#endif
108
109extern int s3c_irqext_type(unsigned int irq, unsigned int type);
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index 947234df8160..2968fb235f95 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -8,31 +8,6 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 *
12 * Modifications:
13 * 14-Sep-2004 BJD USB power control
14 * 20-Aug-2004 BJD Added s3c2410_board struct
15 * 18-Aug-2004 BJD Added platform devices from default set
16 * 16-May-2003 BJD Created initial version
17 * 16-Aug-2003 BJD Fixed header files and copyright, added URL
18 * 05-Sep-2003 BJD Moved to v2.6 kernel
19 * 06-Jan-2003 BJD Updates for <arch/map.h>
20 * 18-Jan-2003 BJD Added serial port configuration
21 * 05-Oct-2004 BJD Power management code
22 * 04-Nov-2004 BJD Updated serial port clocks
23 * 04-Jan-2005 BJD New uart init call
24 * 10-Jan-2005 BJD Removed include of s3c2410.h
25 * 14-Jan-2005 BJD Add support for muitlple NAND devices
26 * 03-Mar-2005 BJD Ensured that bast-cpld.h is included
27 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
28 * 14-Mar-2005 BJD Updated for __iomem changes
29 * 22-Jun-2005 BJD Added DM9000 platform information
30 * 28-Jun-2005 BJD Moved pm functionality out to common code
31 * 17-Jul-2005 BJD Changed to platform device for SuperIO 16550s
32 * 25-Jul-2005 BJD Removed ASIX static mappings
33 * 27-Jul-2005 BJD Ensure maximum frequency of i2c bus
34 * 20-Sep-2005 BJD Added static to non-exported items
35 * 26-Oct-2005 BJD Added FB platform data
36*/ 11*/
37 12
38#include <linux/kernel.h> 13#include <linux/kernel.h>
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index aec431b2830a..8c895c077d22 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -9,23 +9,6 @@
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 * 11 *
12 * Modifications:
13 * 16-May-2003 BJD Created initial version
14 * 16-Aug-2003 BJD Fixed header files and copyright, added URL
15 * 05-Sep-2003 BJD Moved to v2.6 kernel
16 * 06-Jan-2003 BJD Updates for <arch/map.h>
17 * 18-Jan-2003 BJD Added serial port configuration
18 * 17-Feb-2003 BJD Copied to mach-ipaq.c
19 * 21-Aug-2004 BJD Added struct s3c2410_board
20 * 04-Sep-2004 BJD Changed uart init, renamed ipaq_ -> h1940_
21 * 18-Oct-2004 BJD Updated new board structure name
22 * 04-Nov-2004 BJD Change for new serial clock
23 * 04-Jan-2005 BJD Updated uart init call
24 * 10-Jan-2005 BJD Removed include of s3c2410.h
25 * 14-Jan-2005 BJD Added clock init
26 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
27 * 20-Sep-2005 BJD Added static to non-exported items
28 * 26-Oct-2005 BJD Changed name of fb init call
29*/ 12*/
30 13
31#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/arch/arm/mach-s3c2410/mach-rx3715.c b/arch/arm/mach-s3c2410/mach-rx3715.c
index 306afc1d7cd3..23d7c052013c 100644
--- a/arch/arm/mach-s3c2410/mach-rx3715.c
+++ b/arch/arm/mach-s3c2410/mach-rx3715.c
@@ -9,15 +9,6 @@
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 * 11 *
12 * Modifications:
13 * 16-Sep-2004 BJD Copied from mach-h1940.c
14 * 25-Oct-2004 BJD Updates for 2.6.10-rc1
15 * 10-Jan-2005 BJD Removed include of s3c2410.h s3c2440.h
16 * 14-Jan-2005 BJD Added new clock init
17 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
18 * 14-Mar-2005 BJD Fixed __iomem warnings
19 * 20-Sep-2005 BJD Added static to non-exported items
20 * 31-Oct-2005 BJD Added LCD setup for framebuffer
21*/ 12*/
22 13
23#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c
index 25f7e9f4dcee..b3b0171d5052 100644
--- a/arch/arm/mach-s3c2410/mach-smdk2410.c
+++ b/arch/arm/mach-s3c2410/mach-smdk2410.c
@@ -27,10 +27,6 @@
27 * derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by 27 * derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by
28 * Ben Dooks <ben@simtec.co.uk> 28 * Ben Dooks <ben@simtec.co.uk>
29 * 29 *
30 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
31 * 20-Sep-2005 BJD Added static to non-exported items
32 * 01-Apr-2006 BJD Moved init code to common smdk
33 *
34 ***********************************************************************/ 30 ***********************************************************************/
35 31
36#include <linux/kernel.h> 32#include <linux/kernel.h>
diff --git a/arch/arm/mach-s3c2410/mach-smdk2413.c b/arch/arm/mach-s3c2410/mach-smdk2413.c
index b7ef7d3c54a9..3a4ca7f6f7b9 100644
--- a/arch/arm/mach-s3c2410/mach-smdk2413.c
+++ b/arch/arm/mach-s3c2410/mach-smdk2413.c
@@ -112,7 +112,20 @@ static void __init smdk2413_machine_init(void)
112 smdk_machine_init(); 112 smdk_machine_init();
113} 113}
114 114
115MACHINE_START(S3C2413, "SMDK2413") 115MACHINE_START(S3C2413, "S3C2413")
116 /* Maintainer: Ben Dooks <ben@fluff.org> */
117 .phys_io = S3C2410_PA_UART,
118 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
119 .boot_params = S3C2410_SDRAM_PA + 0x100,
120
121 .fixup = smdk2413_fixup,
122 .init_irq = s3c24xx_init_irq,
123 .map_io = smdk2413_map_io,
124 .init_machine = smdk2413_machine_init,
125 .timer = &s3c24xx_timer,
126MACHINE_END
127
128MACHINE_START(SMDK2413, "SMDK2413")
116 /* Maintainer: Ben Dooks <ben@fluff.org> */ 129 /* Maintainer: Ben Dooks <ben@fluff.org> */
117 .phys_io = S3C2410_PA_UART, 130 .phys_io = S3C2410_PA_UART,
118 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, 131 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c
index d18efb279d3d..a0d7692cdb2b 100644
--- a/arch/arm/mach-s3c2410/mach-vr1000.c
+++ b/arch/arm/mach-s3c2410/mach-vr1000.c
@@ -10,25 +10,6 @@
10 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 * 12 *
13 * Modifications:
14 * 14-Sep-2004 BJD USB Power control
15 * 04-Sep-2004 BJD Added new uart init, and io init
16 * 21-Aug-2004 BJD Added struct s3c2410_board
17 * 06-Aug-2004 BJD Fixed call to time initialisation
18 * 05-Apr-2004 BJD Copied to make mach-vr1000.c
19 * 18-Oct-2004 BJD Updated board struct
20 * 04-Nov-2004 BJD Clock and serial configuration update
21 *
22 * 04-Jan-2005 BJD Updated uart init call
23 * 10-Jan-2005 BJD Removed include of s3c2410.h
24 * 14-Jan-2005 BJD Added clock init
25 * 15-Jan-2005 BJD Add serial port device definition
26 * 20-Jan-2005 BJD Use UPF_IOREMAP for ports
27 * 10-Feb-2005 BJD Added power-off capability
28 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
29 * 14-Mar-2006 BJD void __iomem fixes
30 * 22-Jun-2006 BJD Added DM9000 platform information
31 * 20-Sep-2005 BJD Added static to non-exported items
32*/ 13*/
33 14
34#include <linux/kernel.h> 15#include <linux/kernel.h>
diff --git a/arch/arm/mach-s3c2410/s3c2400-gpio.c b/arch/arm/mach-s3c2410/s3c2400-gpio.c
index 5127f39fa9bf..f2a78175a70a 100644
--- a/arch/arm/mach-s3c2410/s3c2400-gpio.c
+++ b/arch/arm/mach-s3c2410/s3c2400-gpio.c
@@ -17,10 +17,7 @@
17 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 * 20*/
21 * Changelog
22 * 15-Jan-2006 LCVR Splitted from gpio.c, adding support for the S3C2400
23 */
24 21
25#include <linux/kernel.h> 22#include <linux/kernel.h>
26#include <linux/init.h> 23#include <linux/init.h>
diff --git a/arch/arm/mach-s3c2410/s3c2410.h b/arch/arm/mach-s3c2410/s3c2410.h
index 73f1a2474a61..fbed084f26d0 100644
--- a/arch/arm/mach-s3c2410/s3c2410.h
+++ b/arch/arm/mach-s3c2410/s3c2410.h
@@ -9,14 +9,6 @@
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 * 11 *
12 * Modifications:
13 * 18-Aug-2004 BJD Created initial version
14 * 20-Aug-2004 BJD Added s3c2410_board struct
15 * 04-Sep-2004 BJD Added s3c2410_init_uarts() call
16 * 17-Oct-2004 BJD Moved board out to cpu
17 * 04-Jan-2005 BJD Changed uart init
18 * 10-Jan-2005 BJD Removed timer to cpu.h, moved 2410 specific bits here
19 * 14-Jan-2005 BJD Added s3c2410_init_clocks call
20*/ 12*/
21 13
22#ifdef CONFIG_CPU_S3C2410 14#ifdef CONFIG_CPU_S3C2410
diff --git a/arch/arm/mach-s3c2410/s3c2412-irq.c b/arch/arm/mach-s3c2410/s3c2412-irq.c
new file mode 100644
index 000000000000..c80ec93dfea9
--- /dev/null
+++ b/arch/arm/mach-s3c2410/s3c2412-irq.c
@@ -0,0 +1,130 @@
1/* linux/arch/arm/mach-s3c2412/s3c2412-irq.c
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20*/
21
22#include <linux/init.h>
23#include <linux/module.h>
24#include <linux/interrupt.h>
25#include <linux/ioport.h>
26#include <linux/ptrace.h>
27#include <linux/sysdev.h>
28
29#include <asm/hardware.h>
30#include <asm/irq.h>
31#include <asm/io.h>
32
33#include <asm/mach/irq.h>
34
35#include <asm/arch/regs-irq.h>
36#include <asm/arch/regs-gpio.h>
37
38#include "cpu.h"
39#include "irq.h"
40
41/* the s3c2412 changes the behaviour of IRQ_EINT0 through IRQ_EINT3 by
42 * having them turn up in both the INT* and the EINT* registers. Whilst
43 * both show the status, they both now need to be acked when the IRQs
44 * go off.
45*/
46
47static void
48s3c2412_irq_mask(unsigned int irqno)
49{
50 unsigned long bitval = 1UL << (irqno - IRQ_EINT0);
51 unsigned long mask;
52
53 mask = __raw_readl(S3C2410_INTMSK);
54 __raw_writel(mask | bitval, S3C2410_INTMSK);
55
56 mask = __raw_readl(S3C2412_EINTMASK);
57 __raw_writel(mask | bitval, S3C2412_EINTMASK);
58}
59
60static inline void
61s3c2412_irq_ack(unsigned int irqno)
62{
63 unsigned long bitval = 1UL << (irqno - IRQ_EINT0);
64
65 __raw_writel(bitval, S3C2412_EINTPEND);
66 __raw_writel(bitval, S3C2410_SRCPND);
67 __raw_writel(bitval, S3C2410_INTPND);
68}
69
70static inline void
71s3c2412_irq_maskack(unsigned int irqno)
72{
73 unsigned long bitval = 1UL << (irqno - IRQ_EINT0);
74 unsigned long mask;
75
76 mask = __raw_readl(S3C2410_INTMSK);
77 __raw_writel(mask|bitval, S3C2410_INTMSK);
78
79 mask = __raw_readl(S3C2412_EINTMASK);
80 __raw_writel(mask | bitval, S3C2412_EINTMASK);
81
82 __raw_writel(bitval, S3C2412_EINTPEND);
83 __raw_writel(bitval, S3C2410_SRCPND);
84 __raw_writel(bitval, S3C2410_INTPND);
85}
86
87static void
88s3c2412_irq_unmask(unsigned int irqno)
89{
90 unsigned long bitval = 1UL << (irqno - IRQ_EINT0);
91 unsigned long mask;
92
93 mask = __raw_readl(S3C2412_EINTMASK);
94 __raw_writel(mask & ~bitval, S3C2412_EINTMASK);
95
96 mask = __raw_readl(S3C2410_INTMSK);
97 __raw_writel(mask & ~bitval, S3C2410_INTMSK);
98}
99
100static struct irqchip s3c2412_irq_eint0t4 = {
101 .ack = s3c2412_irq_ack,
102 .mask = s3c2412_irq_mask,
103 .unmask = s3c2412_irq_unmask,
104 .set_wake = s3c_irq_wake,
105 .set_type = s3c_irqext_type,
106};
107
108static int s3c2412_irq_add(struct sys_device *sysdev)
109{
110 unsigned int irqno;
111
112 for (irqno = IRQ_EINT0; irqno <= IRQ_EINT3; irqno++) {
113 set_irq_chip(irqno, &s3c2412_irq_eint0t4);
114 set_irq_handler(irqno, do_edge_IRQ);
115 set_irq_flags(irqno, IRQF_VALID);
116 }
117
118 return 0;
119}
120
121static struct sysdev_driver s3c2412_irq_driver = {
122 .add = s3c2412_irq_add,
123};
124
125static int s3c2412_irq_init(void)
126{
127 return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_irq_driver);
128}
129
130arch_initcall(s3c2412_irq_init);
diff --git a/arch/arm/mach-s3c2410/s3c2412.c b/arch/arm/mach-s3c2410/s3c2412.c
index e24ffd5e478b..2d163f7600be 100644
--- a/arch/arm/mach-s3c2410/s3c2412.c
+++ b/arch/arm/mach-s3c2410/s3c2412.c
@@ -35,11 +35,15 @@
35#include <asm/mach/irq.h> 35#include <asm/mach/irq.h>
36 36
37#include <asm/hardware.h> 37#include <asm/hardware.h>
38#include <asm/proc-fns.h>
38#include <asm/io.h> 39#include <asm/io.h>
39#include <asm/irq.h> 40#include <asm/irq.h>
40 41
42#include <asm/arch/idle.h>
43
41#include <asm/arch/regs-clock.h> 44#include <asm/arch/regs-clock.h>
42#include <asm/arch/regs-serial.h> 45#include <asm/arch/regs-serial.h>
46#include <asm/arch/regs-power.h>
43#include <asm/arch/regs-gpio.h> 47#include <asm/arch/regs-gpio.h>
44#include <asm/arch/regs-gpioj.h> 48#include <asm/arch/regs-gpioj.h>
45#include <asm/arch/regs-dsc.h> 49#include <asm/arch/regs-dsc.h>
@@ -75,6 +79,27 @@ void __init s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no)
75 s3c_device_nand.name = "s3c2412-nand"; 79 s3c_device_nand.name = "s3c2412-nand";
76} 80}
77 81
82/* s3c2412_idle
83 *
84 * use the standard idle call by ensuring the idle mode
85 * in power config, then issuing the idle co-processor
86 * instruction
87*/
88
89static void s3c2412_idle(void)
90{
91 unsigned long tmp;
92
93 /* ensure our idle mode is to go to idle */
94
95 tmp = __raw_readl(S3C2412_PWRCFG);
96 tmp &= ~S3C2412_PWRCFG_STANDBYWFI_MASK;
97 tmp |= S3C2412_PWRCFG_STANDBYWFI_IDLE;
98 __raw_writel(tmp, S3C2412_PWRCFG);
99
100 cpu_do_idle();
101}
102
78/* s3c2412_map_io 103/* s3c2412_map_io
79 * 104 *
80 * register the standard cpu IO areas, and any passed in from the 105 * register the standard cpu IO areas, and any passed in from the
@@ -87,6 +112,10 @@ void __init s3c2412_map_io(struct map_desc *mach_desc, int mach_size)
87 112
88 s3c24xx_va_gpio2 = S3C24XX_VA_GPIO + 0x10; 113 s3c24xx_va_gpio2 = S3C24XX_VA_GPIO + 0x10;
89 114
115 /* set our idle function */
116
117 s3c24xx_idle = s3c2412_idle;
118
90 /* register our io-tables */ 119 /* register our io-tables */
91 120
92 iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc)); 121 iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc));
diff --git a/arch/arm/mach-s3c2410/s3c2440-irq.c b/arch/arm/mach-s3c2410/s3c2440-irq.c
index acfe3870727b..1667ba1fa43d 100644
--- a/arch/arm/mach-s3c2410/s3c2440-irq.c
+++ b/arch/arm/mach-s3c2410/s3c2440-irq.c
@@ -17,9 +17,6 @@
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 * 19 *
20 * Changelog:
21 * 25-Jul-2005 BJD Split from irq.c
22 *
23*/ 20*/
24 21
25#include <linux/init.h> 22#include <linux/init.h>
diff --git a/arch/arm/mach-s3c2410/s3c244x-irq.c b/arch/arm/mach-s3c2410/s3c244x-irq.c
index 2aadca1ce7eb..44c5affa9b89 100644
--- a/arch/arm/mach-s3c2410/s3c244x-irq.c
+++ b/arch/arm/mach-s3c2410/s3c244x-irq.c
@@ -17,9 +17,6 @@
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 * 19 *
20 * Changelog:
21 * 25-Jul-2005 BJD Split from irq.c
22 *
23*/ 20*/
24 21
25#include <linux/init.h> 22#include <linux/init.h>
@@ -122,21 +119,24 @@ static int s3c244x_irq_add(struct sys_device *sysdev)
122 return 0; 119 return 0;
123} 120}
124 121
125static struct sysdev_driver s3c244x_irq_driver = { 122static struct sysdev_driver s3c2440_irq_driver = {
126 .add = s3c244x_irq_add, 123 .add = s3c244x_irq_add,
127}; 124};
128 125
129static int s3c2440_irq_init(void) 126static int s3c2440_irq_init(void)
130{ 127{
131 return sysdev_driver_register(&s3c2440_sysclass, &s3c244x_irq_driver); 128 return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver);
132} 129}
133 130
134arch_initcall(s3c2440_irq_init); 131arch_initcall(s3c2440_irq_init);
135 132
133static struct sysdev_driver s3c2442_irq_driver = {
134 .add = s3c244x_irq_add,
135};
136 136
137static int s3c2442_irq_init(void) 137static int s3c2442_irq_init(void)
138{ 138{
139 return sysdev_driver_register(&s3c2442_sysclass, &s3c244x_irq_driver); 139 return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_irq_driver);
140} 140}
141 141
142arch_initcall(s3c2442_irq_init); 142arch_initcall(s3c2442_irq_init);
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
index b103e56806bd..d438ce41cdd5 100644
--- a/arch/arm/mm/flush.c
+++ b/arch/arm/mm/flush.c
@@ -87,6 +87,32 @@ void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsig
87 if (cache_is_vipt_aliasing()) 87 if (cache_is_vipt_aliasing())
88 flush_pfn_alias(pfn, user_addr); 88 flush_pfn_alias(pfn, user_addr);
89} 89}
90
91void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
92 unsigned long uaddr, void *kaddr,
93 unsigned long len, int write)
94{
95 if (cache_is_vivt()) {
96 if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) {
97 unsigned long addr = (unsigned long)kaddr;
98 __cpuc_coherent_kern_range(addr, addr + len);
99 }
100 return;
101 }
102
103 if (cache_is_vipt_aliasing()) {
104 flush_pfn_alias(page_to_pfn(page), uaddr);
105 return;
106 }
107
108 /* VIPT non-aliasing cache */
109 if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask) &&
110 vma->vm_flags | VM_EXEC) {
111 unsigned long addr = (unsigned long)kaddr;
112 /* only flushing the kernel mapping on non-aliasing VIPT */
113 __cpuc_coherent_kern_range(addr, addr + len);
114 }
115}
90#else 116#else
91#define flush_pfn_alias(pfn,vaddr) do { } while (0) 117#define flush_pfn_alias(pfn,vaddr) do { } while (0)
92#endif 118#endif
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S
index 1e89d4080474..44a7a652d625 100644
--- a/arch/arm/mm/proc-arm926.S
+++ b/arch/arm/mm/proc-arm926.S
@@ -480,7 +480,7 @@ __arm926_proc_info:
480 b __arm926_setup 480 b __arm926_setup
481 .long cpu_arch_name 481 .long cpu_arch_name
482 .long cpu_elf_name 482 .long cpu_elf_name
483 .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA 483 .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_VFP|HWCAP_EDSP|HWCAP_JAVA
484 .long cpu_arm926_name 484 .long cpu_arm926_name
485 .long arm926_processor_functions 485 .long arm926_processor_functions
486 .long v4wbi_tlb_fns 486 .long v4wbi_tlb_fns
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S
index 561bff73a036..3ca0c92e98a2 100644
--- a/arch/arm/mm/proc-xscale.S
+++ b/arch/arm/mm/proc-xscale.S
@@ -644,7 +644,7 @@ __80219_proc_info:
644 .type __8032x_proc_info,#object 644 .type __8032x_proc_info,#object
645__8032x_proc_info: 645__8032x_proc_info:
646 .long 0x69052420 646 .long 0x69052420
647 .long 0xffffffe0 647 .long 0xfffff7e0
648 .long PMD_TYPE_SECT | \ 648 .long PMD_TYPE_SECT | \
649 PMD_SECT_BUFFERABLE | \ 649 PMD_SECT_BUFFERABLE | \
650 PMD_SECT_CACHEABLE | \ 650 PMD_SECT_CACHEABLE | \
diff --git a/arch/arm/vfp/vfp.h b/arch/arm/vfp/vfp.h
index 5fbdf81a8aaf..96fdf30f6a3b 100644
--- a/arch/arm/vfp/vfp.h
+++ b/arch/arm/vfp/vfp.h
@@ -156,7 +156,7 @@ struct vfp_single {
156}; 156};
157 157
158extern s32 vfp_get_float(unsigned int reg); 158extern s32 vfp_get_float(unsigned int reg);
159extern void vfp_put_float(unsigned int reg, s32 val); 159extern void vfp_put_float(s32 val, unsigned int reg);
160 160
161/* 161/*
162 * VFP_SINGLE_MANTISSA_BITS - number of bits in the mantissa 162 * VFP_SINGLE_MANTISSA_BITS - number of bits in the mantissa
@@ -267,7 +267,7 @@ struct vfp_double {
267 */ 267 */
268#define VFP_REG_ZERO 16 268#define VFP_REG_ZERO 16
269extern u64 vfp_get_double(unsigned int reg); 269extern u64 vfp_get_double(unsigned int reg);
270extern void vfp_put_double(unsigned int reg, u64 val); 270extern void vfp_put_double(u64 val, unsigned int reg);
271 271
272#define VFP_DOUBLE_MANTISSA_BITS (52) 272#define VFP_DOUBLE_MANTISSA_BITS (52)
273#define VFP_DOUBLE_EXPONENT_BITS (11) 273#define VFP_DOUBLE_EXPONENT_BITS (11)
@@ -341,12 +341,6 @@ static inline int vfp_double_type(struct vfp_double *s)
341 341
342u32 vfp_double_normaliseround(int dd, struct vfp_double *vd, u32 fpscr, u32 exceptions, const char *func); 342u32 vfp_double_normaliseround(int dd, struct vfp_double *vd, u32 fpscr, u32 exceptions, const char *func);
343 343
344/*
345 * System registers
346 */
347extern u32 vfp_get_sys(unsigned int reg);
348extern void vfp_put_sys(unsigned int reg, u32 val);
349
350u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand); 344u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand);
351 345
352/* 346/*
diff --git a/arch/arm/vfp/vfpdouble.c b/arch/arm/vfp/vfpdouble.c
index 04bd3425b29b..add48e36c2dc 100644
--- a/arch/arm/vfp/vfpdouble.c
+++ b/arch/arm/vfp/vfpdouble.c
@@ -195,7 +195,7 @@ u32 vfp_double_normaliseround(int dd, struct vfp_double *vd, u32 fpscr, u32 exce
195 s64 d = vfp_double_pack(vd); 195 s64 d = vfp_double_pack(vd);
196 pr_debug("VFP: %s: d(d%d)=%016llx exceptions=%08x\n", func, 196 pr_debug("VFP: %s: d(d%d)=%016llx exceptions=%08x\n", func,
197 dd, d, exceptions); 197 dd, d, exceptions);
198 vfp_put_double(dd, d); 198 vfp_put_double(d, dd);
199 } 199 }
200 return exceptions; 200 return exceptions;
201} 201}
@@ -250,19 +250,19 @@ vfp_propagate_nan(struct vfp_double *vdd, struct vfp_double *vdn,
250 */ 250 */
251static u32 vfp_double_fabs(int dd, int unused, int dm, u32 fpscr) 251static u32 vfp_double_fabs(int dd, int unused, int dm, u32 fpscr)
252{ 252{
253 vfp_put_double(dd, vfp_double_packed_abs(vfp_get_double(dm))); 253 vfp_put_double(vfp_double_packed_abs(vfp_get_double(dm)), dd);
254 return 0; 254 return 0;
255} 255}
256 256
257static u32 vfp_double_fcpy(int dd, int unused, int dm, u32 fpscr) 257static u32 vfp_double_fcpy(int dd, int unused, int dm, u32 fpscr)
258{ 258{
259 vfp_put_double(dd, vfp_get_double(dm)); 259 vfp_put_double(vfp_get_double(dm), dd);
260 return 0; 260 return 0;
261} 261}
262 262
263static u32 vfp_double_fneg(int dd, int unused, int dm, u32 fpscr) 263static u32 vfp_double_fneg(int dd, int unused, int dm, u32 fpscr)
264{ 264{
265 vfp_put_double(dd, vfp_double_packed_negate(vfp_get_double(dm))); 265 vfp_put_double(vfp_double_packed_negate(vfp_get_double(dm)), dd);
266 return 0; 266 return 0;
267} 267}
268 268
@@ -287,7 +287,7 @@ static u32 vfp_double_fsqrt(int dd, int unused, int dm, u32 fpscr)
287 vdp = &vfp_double_default_qnan; 287 vdp = &vfp_double_default_qnan;
288 ret = FPSCR_IOC; 288 ret = FPSCR_IOC;
289 } 289 }
290 vfp_put_double(dd, vfp_double_pack(vdp)); 290 vfp_put_double(vfp_double_pack(vdp), dd);
291 return ret; 291 return ret;
292 } 292 }
293 293
@@ -476,7 +476,7 @@ static u32 vfp_double_fcvts(int sd, int unused, int dm, u32 fpscr)
476 return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fcvts"); 476 return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fcvts");
477 477
478 pack_nan: 478 pack_nan:
479 vfp_put_float(sd, vfp_single_pack(&vsd)); 479 vfp_put_float(vfp_single_pack(&vsd), sd);
480 return exceptions; 480 return exceptions;
481} 481}
482 482
@@ -573,7 +573,7 @@ static u32 vfp_double_ftoui(int sd, int unused, int dm, u32 fpscr)
573 573
574 pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); 574 pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
575 575
576 vfp_put_float(sd, d); 576 vfp_put_float(d, sd);
577 577
578 return exceptions; 578 return exceptions;
579} 579}
@@ -648,7 +648,7 @@ static u32 vfp_double_ftosi(int sd, int unused, int dm, u32 fpscr)
648 648
649 pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); 649 pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
650 650
651 vfp_put_float(sd, (s32)d); 651 vfp_put_float((s32)d, sd);
652 652
653 return exceptions; 653 return exceptions;
654} 654}
@@ -1084,7 +1084,7 @@ static u32 vfp_double_fdiv(int dd, int dn, int dm, u32 fpscr)
1084 vdn_nan: 1084 vdn_nan:
1085 exceptions = vfp_propagate_nan(&vdd, &vdn, &vdm, fpscr); 1085 exceptions = vfp_propagate_nan(&vdd, &vdn, &vdm, fpscr);
1086 pack: 1086 pack:
1087 vfp_put_double(dd, vfp_double_pack(&vdd)); 1087 vfp_put_double(vfp_double_pack(&vdd), dd);
1088 return exceptions; 1088 return exceptions;
1089 1089
1090 vdm_nan: 1090 vdm_nan:
@@ -1104,7 +1104,7 @@ static u32 vfp_double_fdiv(int dd, int dn, int dm, u32 fpscr)
1104 goto pack; 1104 goto pack;
1105 1105
1106 invalid: 1106 invalid:
1107 vfp_put_double(dd, vfp_double_pack(&vfp_double_default_qnan)); 1107 vfp_put_double(vfp_double_pack(&vfp_double_default_qnan), dd);
1108 return FPSCR_IOC; 1108 return FPSCR_IOC;
1109} 1109}
1110 1110
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S
index eb683cd77163..e51e6679c402 100644
--- a/arch/arm/vfp/vfphw.S
+++ b/arch/arm/vfp/vfphw.S
@@ -178,12 +178,12 @@ vfp_get_float:
178 178
179 .globl vfp_put_float 179 .globl vfp_put_float
180vfp_put_float: 180vfp_put_float:
181 add pc, pc, r0, lsl #3 181 add pc, pc, r1, lsl #3
182 mov r0, r0 182 mov r0, r0
183 .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 183 .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
184 mcr p10, 0, r1, c\dr, c0, 0 @ fmsr r0, s0 184 mcr p10, 0, r0, c\dr, c0, 0 @ fmsr r0, s0
185 mov pc, lr 185 mov pc, lr
186 mcr p10, 0, r1, c\dr, c0, 4 @ fmsr r0, s1 186 mcr p10, 0, r0, c\dr, c0, 4 @ fmsr r0, s1
187 mov pc, lr 187 mov pc, lr
188 .endr 188 .endr
189 189
@@ -203,9 +203,9 @@ vfp_get_double:
203 203
204 .globl vfp_put_double 204 .globl vfp_put_double
205vfp_put_double: 205vfp_put_double:
206 add pc, pc, r0, lsl #3 206 add pc, pc, r2, lsl #3
207 mov r0, r0 207 mov r0, r0
208 .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 208 .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
209 fmdrr d\dr, r1, r2 209 fmdrr d\dr, r0, r1
210 mov pc, lr 210 mov pc, lr
211 .endr 211 .endr
diff --git a/arch/arm/vfp/vfpsingle.c b/arch/arm/vfp/vfpsingle.c
index 78d7cac5f36b..8f6c179cafbe 100644
--- a/arch/arm/vfp/vfpsingle.c
+++ b/arch/arm/vfp/vfpsingle.c
@@ -200,7 +200,7 @@ u32 vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exce
200 s32 d = vfp_single_pack(vs); 200 s32 d = vfp_single_pack(vs);
201 pr_debug("VFP: %s: d(s%d)=%08x exceptions=%08x\n", func, 201 pr_debug("VFP: %s: d(s%d)=%08x exceptions=%08x\n", func,
202 sd, d, exceptions); 202 sd, d, exceptions);
203 vfp_put_float(sd, d); 203 vfp_put_float(d, sd);
204 } 204 }
205 205
206 return exceptions; 206 return exceptions;
@@ -257,19 +257,19 @@ vfp_propagate_nan(struct vfp_single *vsd, struct vfp_single *vsn,
257 */ 257 */
258static u32 vfp_single_fabs(int sd, int unused, s32 m, u32 fpscr) 258static u32 vfp_single_fabs(int sd, int unused, s32 m, u32 fpscr)
259{ 259{
260 vfp_put_float(sd, vfp_single_packed_abs(m)); 260 vfp_put_float(vfp_single_packed_abs(m), sd);
261 return 0; 261 return 0;
262} 262}
263 263
264static u32 vfp_single_fcpy(int sd, int unused, s32 m, u32 fpscr) 264static u32 vfp_single_fcpy(int sd, int unused, s32 m, u32 fpscr)
265{ 265{
266 vfp_put_float(sd, m); 266 vfp_put_float(m, sd);
267 return 0; 267 return 0;
268} 268}
269 269
270static u32 vfp_single_fneg(int sd, int unused, s32 m, u32 fpscr) 270static u32 vfp_single_fneg(int sd, int unused, s32 m, u32 fpscr)
271{ 271{
272 vfp_put_float(sd, vfp_single_packed_negate(m)); 272 vfp_put_float(vfp_single_packed_negate(m), sd);
273 return 0; 273 return 0;
274} 274}
275 275
@@ -333,7 +333,7 @@ static u32 vfp_single_fsqrt(int sd, int unused, s32 m, u32 fpscr)
333 vsp = &vfp_single_default_qnan; 333 vsp = &vfp_single_default_qnan;
334 ret = FPSCR_IOC; 334 ret = FPSCR_IOC;
335 } 335 }
336 vfp_put_float(sd, vfp_single_pack(vsp)); 336 vfp_put_float(vfp_single_pack(vsp), sd);
337 return ret; 337 return ret;
338 } 338 }
339 339
@@ -517,7 +517,7 @@ static u32 vfp_single_fcvtd(int dd, int unused, s32 m, u32 fpscr)
517 return vfp_double_normaliseround(dd, &vdd, fpscr, exceptions, "fcvtd"); 517 return vfp_double_normaliseround(dd, &vdd, fpscr, exceptions, "fcvtd");
518 518
519 pack_nan: 519 pack_nan:
520 vfp_put_double(dd, vfp_double_pack(&vdd)); 520 vfp_put_double(vfp_double_pack(&vdd), dd);
521 return exceptions; 521 return exceptions;
522} 522}
523 523
@@ -613,7 +613,7 @@ static u32 vfp_single_ftoui(int sd, int unused, s32 m, u32 fpscr)
613 613
614 pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); 614 pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
615 615
616 vfp_put_float(sd, d); 616 vfp_put_float(d, sd);
617 617
618 return exceptions; 618 return exceptions;
619} 619}
@@ -692,7 +692,7 @@ static u32 vfp_single_ftosi(int sd, int unused, s32 m, u32 fpscr)
692 692
693 pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); 693 pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
694 694
695 vfp_put_float(sd, (s32)d); 695 vfp_put_float((s32)d, sd);
696 696
697 return exceptions; 697 return exceptions;
698} 698}
@@ -1127,7 +1127,7 @@ static u32 vfp_single_fdiv(int sd, int sn, s32 m, u32 fpscr)
1127 vsn_nan: 1127 vsn_nan:
1128 exceptions = vfp_propagate_nan(&vsd, &vsn, &vsm, fpscr); 1128 exceptions = vfp_propagate_nan(&vsd, &vsn, &vsm, fpscr);
1129 pack: 1129 pack:
1130 vfp_put_float(sd, vfp_single_pack(&vsd)); 1130 vfp_put_float(vfp_single_pack(&vsd), sd);
1131 return exceptions; 1131 return exceptions;
1132 1132
1133 vsm_nan: 1133 vsm_nan:
@@ -1147,7 +1147,7 @@ static u32 vfp_single_fdiv(int sd, int sn, s32 m, u32 fpscr)
1147 goto pack; 1147 goto pack;
1148 1148
1149 invalid: 1149 invalid:
1150 vfp_put_float(sd, vfp_single_pack(&vfp_single_default_qnan)); 1150 vfp_put_float(vfp_single_pack(&vfp_single_default_qnan), sd);
1151 return FPSCR_IOC; 1151 return FPSCR_IOC;
1152} 1152}
1153 1153
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index 95a3892b8d1b..a601a17cf568 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -29,6 +29,10 @@ config GENERIC_HARDIRQS
29 bool 29 bool
30 default n 30 default n
31 31
32config GENERIC_TIME
33 bool
34 default y
35
32config TIME_LOW_RES 36config TIME_LOW_RES
33 bool 37 bool
34 default y 38 default y
diff --git a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c
index d5b64e193d92..68a77fe3bb40 100644
--- a/arch/frv/kernel/time.c
+++ b/arch/frv/kernel/time.c
@@ -32,8 +32,6 @@
32 32
33#define TICK_SIZE (tick_nsec / 1000) 33#define TICK_SIZE (tick_nsec / 1000)
34 34
35extern unsigned long wall_jiffies;
36
37unsigned long __nongprelbss __clkin_clock_speed_HZ; 35unsigned long __nongprelbss __clkin_clock_speed_HZ;
38unsigned long __nongprelbss __ext_bus_clock_speed_HZ; 36unsigned long __nongprelbss __ext_bus_clock_speed_HZ;
39unsigned long __nongprelbss __res_bus_clock_speed_HZ; 37unsigned long __nongprelbss __res_bus_clock_speed_HZ;
@@ -145,85 +143,6 @@ void time_init(void)
145} 143}
146 144
147/* 145/*
148 * This version of gettimeofday has near microsecond resolution.
149 */
150void do_gettimeofday(struct timeval *tv)
151{
152 unsigned long seq;
153 unsigned long usec, sec;
154 unsigned long max_ntp_tick;
155
156 do {
157 unsigned long lost;
158
159 seq = read_seqbegin(&xtime_lock);
160
161 usec = 0;
162 lost = jiffies - wall_jiffies;
163
164 /*
165 * If time_adjust is negative then NTP is slowing the clock
166 * so make sure not to go into next possible interval.
167 * Better to lose some accuracy than have time go backwards..
168 */
169 if (unlikely(time_adjust < 0)) {
170 max_ntp_tick = (USEC_PER_SEC / HZ) - tickadj;
171 usec = min(usec, max_ntp_tick);
172
173 if (lost)
174 usec += lost * max_ntp_tick;
175 }
176 else if (unlikely(lost))
177 usec += lost * (USEC_PER_SEC / HZ);
178
179 sec = xtime.tv_sec;
180 usec += (xtime.tv_nsec / 1000);
181 } while (read_seqretry(&xtime_lock, seq));
182
183 while (usec >= 1000000) {
184 usec -= 1000000;
185 sec++;
186 }
187
188 tv->tv_sec = sec;
189 tv->tv_usec = usec;
190}
191
192EXPORT_SYMBOL(do_gettimeofday);
193
194int do_settimeofday(struct timespec *tv)
195{
196 time_t wtm_sec, sec = tv->tv_sec;
197 long wtm_nsec, nsec = tv->tv_nsec;
198
199 if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
200 return -EINVAL;
201
202 write_seqlock_irq(&xtime_lock);
203 /*
204 * This is revolting. We need to set "xtime" correctly. However, the
205 * value in this location is the value at the most recent update of
206 * wall time. Discover what correction gettimeofday() would have
207 * made, and then undo it!
208 */
209 nsec -= 0 * NSEC_PER_USEC;
210 nsec -= (jiffies - wall_jiffies) * TICK_NSEC;
211
212 wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
213 wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
214
215 set_normalized_timespec(&xtime, sec, nsec);
216 set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
217
218 ntp_clear();
219 write_sequnlock_irq(&xtime_lock);
220 clock_was_set();
221 return 0;
222}
223
224EXPORT_SYMBOL(do_settimeofday);
225
226/*
227 * Scheduler clock - returns current time in nanosec units. 146 * Scheduler clock - returns current time in nanosec units.
228 */ 147 */
229unsigned long long sched_clock(void) 148unsigned long long sched_clock(void)
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index ab98fc21a541..5427a842e841 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -39,7 +39,6 @@ obj-$(CONFIG_VM86) += vm86.o
39obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 39obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
40obj-$(CONFIG_HPET_TIMER) += hpet.o 40obj-$(CONFIG_HPET_TIMER) += hpet.o
41obj-$(CONFIG_K8_NB) += k8.o 41obj-$(CONFIG_K8_NB) += k8.o
42obj-$(CONFIG_AUDIT) += audit.o
43 42
44EXTRA_AFLAGS := -traditional 43EXTRA_AFLAGS := -traditional
45 44
diff --git a/arch/i386/kernel/audit.c b/arch/i386/kernel/audit.c
deleted file mode 100644
index 5a53c6f371ff..000000000000
--- a/arch/i386/kernel/audit.c
+++ /dev/null
@@ -1,23 +0,0 @@
1#include <linux/init.h>
2#include <linux/types.h>
3#include <linux/audit.h>
4#include <asm/unistd.h>
5
6static unsigned dir_class[] = {
7#include <asm-generic/audit_dir_write.h>
8~0U
9};
10
11static unsigned chattr_class[] = {
12#include <asm-generic/audit_change_attr.h>
13~0U
14};
15
16static int __init audit_classes_init(void)
17{
18 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class);
19 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class);
20 return 0;
21}
22
23__initcall(audit_classes_init);
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
index 37a7d2eaf4a0..87f9f60b803b 100644
--- a/arch/i386/kernel/entry.S
+++ b/arch/i386/kernel/entry.S
@@ -209,6 +209,10 @@ ENTRY(ret_from_fork)
209 GET_THREAD_INFO(%ebp) 209 GET_THREAD_INFO(%ebp)
210 popl %eax 210 popl %eax
211 CFI_ADJUST_CFA_OFFSET -4 211 CFI_ADJUST_CFA_OFFSET -4
212 pushl $0x0202 # Reset kernel eflags
213 CFI_ADJUST_CFA_OFFSET 4
214 popfl
215 CFI_ADJUST_CFA_OFFSET -4
212 jmp syscall_exit 216 jmp syscall_exit
213 CFI_ENDPROC 217 CFI_ENDPROC
214 218
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S
index eb79aa2fa8bb..a6b8bd89aa27 100644
--- a/arch/i386/kernel/head.S
+++ b/arch/i386/kernel/head.S
@@ -317,20 +317,14 @@ is386: movl $2,%ecx # set MP
317 movl %eax,%gs 317 movl %eax,%gs
318 lldt %ax 318 lldt %ax
319 cld # gcc2 wants the direction flag cleared at all times 319 cld # gcc2 wants the direction flag cleared at all times
320 pushl %eax # fake return address
320#ifdef CONFIG_SMP 321#ifdef CONFIG_SMP
321 movb ready, %cl 322 movb ready, %cl
322 movb $1, ready 323 movb $1, ready
323 cmpb $0,%cl 324 cmpb $0,%cl # the first CPU calls start_kernel
324 je 1f # the first CPU calls start_kernel 325 jne initialize_secondary # all other CPUs call initialize_secondary
325 # all other CPUs call initialize_secondary
326 call initialize_secondary
327 jmp L6
3281:
329#endif /* CONFIG_SMP */ 326#endif /* CONFIG_SMP */
330 call start_kernel 327 jmp start_kernel
331L6:
332 jmp L6 # main should never return here, but
333 # just in case, we know what happens.
334 328
335/* 329/*
336 * We depend on ET to be correct. This checks for 287/387. 330 * We depend on ET to be correct. This checks for 287/387.
diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c
index c6737c35815d..17647a530b2f 100644
--- a/arch/i386/kernel/hpet.c
+++ b/arch/i386/kernel/hpet.c
@@ -35,7 +35,7 @@ static int __init init_hpet_clocksource(void)
35 void __iomem* hpet_base; 35 void __iomem* hpet_base;
36 u64 tmp; 36 u64 tmp;
37 37
38 if (!hpet_address) 38 if (!is_hpet_enabled())
39 return -ENODEV; 39 return -ENODEV;
40 40
41 /* calculate the hpet address: */ 41 /* calculate the hpet address: */
diff --git a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c
index 6cb529f60dcc..5fe547cd8f9f 100644
--- a/arch/i386/kernel/irq.c
+++ b/arch/i386/kernel/irq.c
@@ -82,10 +82,6 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs)
82 } 82 }
83#endif 83#endif
84 84
85 if (!irq_desc[irq].handle_irq) {
86 __do_IRQ(irq, regs);
87 goto out_exit;
88 }
89#ifdef CONFIG_4KSTACKS 85#ifdef CONFIG_4KSTACKS
90 86
91 curctx = (union irq_ctx *) current_thread_info(); 87 curctx = (union irq_ctx *) current_thread_info();
@@ -125,7 +121,6 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs)
125#endif 121#endif
126 __do_IRQ(irq, regs); 122 __do_IRQ(irq, regs);
127 123
128out_exit:
129 irq_exit(); 124 irq_exit();
130 125
131 return 1; 126 return 1;
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index f1682206d304..345ffb7d904d 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -956,38 +956,6 @@ efi_memory_present_wrapper(unsigned long start, unsigned long end, void *arg)
956 return 0; 956 return 0;
957} 957}
958 958
959 /*
960 * This function checks if the entire range <start,end> is mapped with type.
961 *
962 * Note: this function only works correct if the e820 table is sorted and
963 * not-overlapping, which is the case
964 */
965int __init
966e820_all_mapped(unsigned long s, unsigned long e, unsigned type)
967{
968 u64 start = s;
969 u64 end = e;
970 int i;
971 for (i = 0; i < e820.nr_map; i++) {
972 struct e820entry *ei = &e820.map[i];
973 if (type && ei->type != type)
974 continue;
975 /* is the region (part) in overlap with the current region ?*/
976 if (ei->addr >= end || ei->addr + ei->size <= start)
977 continue;
978 /* if the region is at the beginning of <start,end> we move
979 * start to the end of the region since it's ok until there
980 */
981 if (ei->addr <= start)
982 start = ei->addr + ei->size;
983 /* if start is now at or beyond end, we're done, full
984 * coverage */
985 if (start >= end)
986 return 1; /* we're done */
987 }
988 return 0;
989}
990
991/* 959/*
992 * Find the highest page frame number we have available 960 * Find the highest page frame number we have available
993 */ 961 */
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index 82e0fd02af1c..7e9edafffd8a 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -92,7 +92,11 @@ asmlinkage void spurious_interrupt_bug(void);
92asmlinkage void machine_check(void); 92asmlinkage void machine_check(void);
93 93
94static int kstack_depth_to_print = 24; 94static int kstack_depth_to_print = 24;
95#ifdef CONFIG_STACK_UNWIND
95static int call_trace = 1; 96static int call_trace = 1;
97#else
98#define call_trace (-1)
99#endif
96ATOMIC_NOTIFIER_HEAD(i386die_chain); 100ATOMIC_NOTIFIER_HEAD(i386die_chain);
97 101
98int register_die_notifier(struct notifier_block *nb) 102int register_die_notifier(struct notifier_block *nb)
@@ -187,22 +191,21 @@ static void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
187 if (unwind_init_blocked(&info, task) == 0) 191 if (unwind_init_blocked(&info, task) == 0)
188 unw_ret = show_trace_unwind(&info, log_lvl); 192 unw_ret = show_trace_unwind(&info, log_lvl);
189 } 193 }
190 if (unw_ret > 0 && !arch_unw_user_mode(&info)) { 194 if (unw_ret > 0) {
191#ifdef CONFIG_STACK_UNWIND 195 if (call_trace == 1 && !arch_unw_user_mode(&info)) {
192 print_symbol("DWARF2 unwinder stuck at %s\n", 196 print_symbol("DWARF2 unwinder stuck at %s\n",
193 UNW_PC(&info)); 197 UNW_PC(&info));
194 if (call_trace == 1) { 198 if (UNW_SP(&info) >= PAGE_OFFSET) {
195 printk("Leftover inexact backtrace:\n"); 199 printk("Leftover inexact backtrace:\n");
196 if (UNW_SP(&info))
197 stack = (void *)UNW_SP(&info); 200 stack = (void *)UNW_SP(&info);
198 } else if (call_trace > 1) 201 } else
202 printk("Full inexact backtrace again:\n");
203 } else if (call_trace >= 1)
199 return; 204 return;
200 else 205 else
201 printk("Full inexact backtrace again:\n"); 206 printk("Full inexact backtrace again:\n");
202#else 207 } else
203 printk("Inexact backtrace:\n"); 208 printk("Inexact backtrace:\n");
204#endif
205 }
206 } 209 }
207 210
208 if (task == current) { 211 if (task == current) {
@@ -1241,6 +1244,7 @@ static int __init kstack_setup(char *s)
1241} 1244}
1242__setup("kstack=", kstack_setup); 1245__setup("kstack=", kstack_setup);
1243 1246
1247#ifdef CONFIG_STACK_UNWIND
1244static int __init call_trace_setup(char *s) 1248static int __init call_trace_setup(char *s)
1245{ 1249{
1246 if (strcmp(s, "old") == 0) 1250 if (strcmp(s, "old") == 0)
@@ -1254,3 +1258,4 @@ static int __init call_trace_setup(char *s)
1254 return 1; 1258 return 1;
1255} 1259}
1256__setup("call_trace=", call_trace_setup); 1260__setup("call_trace=", call_trace_setup);
1261#endif
diff --git a/arch/i386/oprofile/nmi_int.c b/arch/i386/oprofile/nmi_int.c
index c8c1df8ff2b4..5f8dc8a21bd7 100644
--- a/arch/i386/oprofile/nmi_int.c
+++ b/arch/i386/oprofile/nmi_int.c
@@ -337,6 +337,8 @@ static int __init ppro_init(char ** cpu_type)
337 337
338 if (cpu_model == 14) 338 if (cpu_model == 14)
339 *cpu_type = "i386/core"; 339 *cpu_type = "i386/core";
340 else if (cpu_model == 15)
341 *cpu_type = "i386/core_2";
340 else if (cpu_model > 0xd) 342 else if (cpu_model > 0xd)
341 return 0; 343 return 0;
342 else if (cpu_model == 9) { 344 else if (cpu_model == 9) {
diff --git a/arch/i386/pci/common.c b/arch/i386/pci/common.c
index 0a362e3aeac5..1220dd828ce3 100644
--- a/arch/i386/pci/common.c
+++ b/arch/i386/pci/common.c
@@ -237,6 +237,11 @@ char * __devinit pcibios_setup(char *str)
237 pci_probe &= ~PCI_PROBE_MMCONF; 237 pci_probe &= ~PCI_PROBE_MMCONF;
238 return NULL; 238 return NULL;
239 } 239 }
240 /* override DMI blacklist */
241 else if (!strcmp(str, "mmconf")) {
242 pci_probe |= PCI_PROBE_MMCONF_FORCE;
243 return NULL;
244 }
240#endif 245#endif
241 else if (!strcmp(str, "noacpi")) { 246 else if (!strcmp(str, "noacpi")) {
242 acpi_noirq_set(); 247 acpi_noirq_set();
diff --git a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c
index 972180f738d9..ef5a2faa7d82 100644
--- a/arch/i386/pci/mmconfig.c
+++ b/arch/i386/pci/mmconfig.c
@@ -12,6 +12,7 @@
12#include <linux/pci.h> 12#include <linux/pci.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/acpi.h> 14#include <linux/acpi.h>
15#include <linux/dmi.h>
15#include <asm/e820.h> 16#include <asm/e820.h>
16#include "pci.h" 17#include "pci.h"
17 18
@@ -187,9 +188,31 @@ static __init void unreachable_devices(void)
187 } 188 }
188} 189}
189 190
191static int disable_mcfg(struct dmi_system_id *d)
192{
193 printk("PCI: %s detected. Disabling MCFG.\n", d->ident);
194 pci_probe &= ~PCI_PROBE_MMCONF;
195 return 0;
196}
197
198static struct dmi_system_id __initdata dmi_bad_mcfg[] = {
199 /* Has broken MCFG table that makes the system hang when used */
200 {
201 .callback = disable_mcfg,
202 .ident = "Intel D3C5105 SDV",
203 .matches = {
204 DMI_MATCH(DMI_BIOS_VENDOR, "Intel"),
205 DMI_MATCH(DMI_BOARD_NAME, "D26928"),
206 },
207 },
208 {}
209};
210
190void __init pci_mmcfg_init(void) 211void __init pci_mmcfg_init(void)
191{ 212{
192 if ((pci_probe & PCI_PROBE_MMCONF) == 0) 213 dmi_check_system(dmi_bad_mcfg);
214
215 if ((pci_probe & (PCI_PROBE_MMCONF_FORCE|PCI_PROBE_MMCONF)) == 0)
193 return; 216 return;
194 217
195 acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg); 218 acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg);
@@ -198,15 +221,6 @@ void __init pci_mmcfg_init(void)
198 (pci_mmcfg_config[0].base_address == 0)) 221 (pci_mmcfg_config[0].base_address == 0))
199 return; 222 return;
200 223
201 if (!e820_all_mapped(pci_mmcfg_config[0].base_address,
202 pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN,
203 E820_RESERVED)) {
204 printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n",
205 pci_mmcfg_config[0].base_address);
206 printk(KERN_ERR "PCI: Not using MMCONFIG.\n");
207 return;
208 }
209
210 printk(KERN_INFO "PCI: Using MMCONFIG\n"); 224 printk(KERN_INFO "PCI: Using MMCONFIG\n");
211 raw_pci_ops = &pci_mmcfg; 225 raw_pci_ops = &pci_mmcfg;
212 pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; 226 pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
diff --git a/arch/i386/pci/pci.h b/arch/i386/pci/pci.h
index bf4e79335388..49a849b3a241 100644
--- a/arch/i386/pci/pci.h
+++ b/arch/i386/pci/pci.h
@@ -16,7 +16,8 @@
16#define PCI_PROBE_CONF1 0x0002 16#define PCI_PROBE_CONF1 0x0002
17#define PCI_PROBE_CONF2 0x0004 17#define PCI_PROBE_CONF2 0x0004
18#define PCI_PROBE_MMCONF 0x0008 18#define PCI_PROBE_MMCONF 0x0008
19#define PCI_PROBE_MASK 0x000f 19#define PCI_PROBE_MMCONF_FORCE 0x0010
20#define PCI_PROBE_MASK 0x00ff
20 21
21#define PCI_NO_SORT 0x0100 22#define PCI_NO_SORT 0x0100
22#define PCI_BIOS_SORT 0x0200 23#define PCI_BIOS_SORT 0x0200
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 47de9ee6bcd6..db274da7dba1 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -75,6 +75,10 @@ config DMA_IS_NORMAL
75 depends on IA64_SGI_SN2 75 depends on IA64_SGI_SN2
76 default y 76 default y
77 77
78config AUDIT_ARCH
79 bool
80 default y
81
78choice 82choice
79 prompt "System type" 83 prompt "System type"
80 default IA64_GENERIC 84 default IA64_GENERIC
@@ -258,7 +262,7 @@ config NR_CPUS
258 int "Maximum number of CPUs (2-1024)" 262 int "Maximum number of CPUs (2-1024)"
259 range 2 1024 263 range 2 1024
260 depends on SMP 264 depends on SMP
261 default "64" 265 default "1024"
262 help 266 help
263 You should set this to the number of CPUs in your system, but 267 You should set this to the number of CPUs in your system, but
264 keep in mind that a kernel compiled for, e.g., 2 CPUs will boot but 268 keep in mind that a kernel compiled for, e.g., 2 CPUs will boot but
@@ -354,7 +358,7 @@ config NUMA
354config NODES_SHIFT 358config NODES_SHIFT
355 int "Max num nodes shift(3-10)" 359 int "Max num nodes shift(3-10)"
356 range 3 10 360 range 3 10
357 default "8" 361 default "10"
358 depends on NEED_MULTIPLE_NODES 362 depends on NEED_MULTIPLE_NODES
359 help 363 help
360 This option specifies the maximum number of nodes in your SSI system. 364 This option specifies the maximum number of nodes in your SSI system.
diff --git a/arch/ia64/ia32/audit.c b/arch/ia64/ia32/audit.c
index ab94f2e58cdd..92d7d0c8d93f 100644
--- a/arch/ia64/ia32/audit.c
+++ b/arch/ia64/ia32/audit.c
@@ -9,3 +9,29 @@ unsigned ia32_chattr_class[] = {
9#include <asm-generic/audit_change_attr.h> 9#include <asm-generic/audit_change_attr.h>
10~0U 10~0U
11}; 11};
12
13unsigned ia32_write_class[] = {
14#include <asm-generic/audit_write.h>
15~0U
16};
17
18unsigned ia32_read_class[] = {
19#include <asm-generic/audit_read.h>
20~0U
21};
22
23int ia32_classify_syscall(unsigned syscall)
24{
25 switch(syscall) {
26 case __NR_open:
27 return 2;
28 case __NR_openat:
29 return 3;
30 case __NR_socketcall:
31 return 4;
32 case __NR_execve:
33 return 5;
34 default:
35 return 1;
36 }
37}
diff --git a/arch/ia64/kernel/audit.c b/arch/ia64/kernel/audit.c
index f2512931ccaf..04682555a28c 100644
--- a/arch/ia64/kernel/audit.c
+++ b/arch/ia64/kernel/audit.c
@@ -8,19 +8,54 @@ static unsigned dir_class[] = {
8~0U 8~0U
9}; 9};
10 10
11static unsigned read_class[] = {
12#include <asm-generic/audit_read.h>
13~0U
14};
15
16static unsigned write_class[] = {
17#include <asm-generic/audit_write.h>
18~0U
19};
20
11static unsigned chattr_class[] = { 21static unsigned chattr_class[] = {
12#include <asm-generic/audit_change_attr.h> 22#include <asm-generic/audit_change_attr.h>
13~0U 23~0U
14}; 24};
15 25
26int audit_classify_syscall(int abi, unsigned syscall)
27{
28#ifdef CONFIG_IA32_SUPPORT
29 extern int ia32_classify_syscall(unsigned);
30 if (abi == AUDIT_ARCH_I386)
31 return ia32_classify_syscall(syscall);
32#endif
33 switch(syscall) {
34 case __NR_open:
35 return 2;
36 case __NR_openat:
37 return 3;
38 case __NR_execve:
39 return 5;
40 default:
41 return 0;
42 }
43}
44
16static int __init audit_classes_init(void) 45static int __init audit_classes_init(void)
17{ 46{
18#ifdef CONFIG_IA32_SUPPORT 47#ifdef CONFIG_IA32_SUPPORT
19 extern __u32 ia32_dir_class[]; 48 extern __u32 ia32_dir_class[];
49 extern __u32 ia32_write_class[];
50 extern __u32 ia32_read_class[];
20 extern __u32 ia32_chattr_class[]; 51 extern __u32 ia32_chattr_class[];
52 audit_register_class(AUDIT_CLASS_WRITE_32, ia32_write_class);
53 audit_register_class(AUDIT_CLASS_READ_32, ia32_read_class);
21 audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); 54 audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class);
22 audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); 55 audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class);
23#endif 56#endif
57 audit_register_class(AUDIT_CLASS_WRITE, write_class);
58 audit_register_class(AUDIT_CLASS_READ, read_class);
24 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); 59 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class);
25 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); 60 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class);
26 return 0; 61 return 0;
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index 12701cf32d99..fef06571be99 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -1605,8 +1605,8 @@ sys_call_table:
1605 data8 sys_ni_syscall // 1295 reserved for ppoll 1605 data8 sys_ni_syscall // 1295 reserved for ppoll
1606 data8 sys_unshare 1606 data8 sys_unshare
1607 data8 sys_splice 1607 data8 sys_splice
1608 data8 sys_set_robust_list 1608 data8 sys_ni_syscall // reserved for set_robust_list
1609 data8 sys_get_robust_list 1609 data8 sys_ni_syscall // reserved for get_robust_list
1610 data8 sys_sync_file_range // 1300 1610 data8 sys_sync_file_range // 1300
1611 data8 sys_tee 1611 data8 sys_tee
1612 data8 sys_vmsplice 1612 data8 sys_vmsplice
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S
index 29236f0c62b5..44d540efa6d1 100644
--- a/arch/ia64/kernel/head.S
+++ b/arch/ia64/kernel/head.S
@@ -197,6 +197,11 @@ start_ap:
197 ;; 197 ;;
198 srlz.i 198 srlz.i
199 ;; 199 ;;
200 {
201 flushrs // must be first insn in group
202 srlz.i
203 }
204 ;;
200 /* 205 /*
201 * Save the region registers, predicate before they get clobbered 206 * Save the region registers, predicate before they get clobbered
202 */ 207 */
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index c7ccd6ee1ddf..84a7e52f56f6 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -4936,13 +4936,15 @@ abort_locked:
4936 if (likely(ctx)) { 4936 if (likely(ctx)) {
4937 DPRINT(("context unlocked\n")); 4937 DPRINT(("context unlocked\n"));
4938 UNPROTECT_CTX(ctx, flags); 4938 UNPROTECT_CTX(ctx, flags);
4939 fput(file);
4940 } 4939 }
4941 4940
4942 /* copy argument back to user, if needed */ 4941 /* copy argument back to user, if needed */
4943 if (call_made && PFM_CMD_RW_ARG(cmd) && copy_to_user(arg, args_k, base_sz*count)) ret = -EFAULT; 4942 if (call_made && PFM_CMD_RW_ARG(cmd) && copy_to_user(arg, args_k, base_sz*count)) ret = -EFAULT;
4944 4943
4945error_args: 4944error_args:
4945 if (file)
4946 fput(file);
4947
4946 kfree(args_k); 4948 kfree(args_k);
4947 4949
4948 DPRINT(("cmd=%s ret=%ld\n", PFM_CMD_NAME(cmd), ret)); 4950 DPRINT(("cmd=%s ret=%ld\n", PFM_CMD_NAME(cmd), ret));
diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c
index 40722d88607a..9ef62a3fbfad 100644
--- a/arch/ia64/kernel/sys_ia64.c
+++ b/arch/ia64/kernel/sys_ia64.c
@@ -163,10 +163,25 @@ sys_pipe (void)
163 return retval; 163 return retval;
164} 164}
165 165
166int ia64_mmap_check(unsigned long addr, unsigned long len,
167 unsigned long flags)
168{
169 unsigned long roff;
170
171 /*
172 * Don't permit mappings into unmapped space, the virtual page table
173 * of a region, or across a region boundary. Note: RGN_MAP_LIMIT is
174 * equal to 2^n-PAGE_SIZE (for some integer n <= 61) and len > 0.
175 */
176 roff = REGION_OFFSET(addr);
177 if ((len > RGN_MAP_LIMIT) || (roff > (RGN_MAP_LIMIT - len)))
178 return -EINVAL;
179 return 0;
180}
181
166static inline unsigned long 182static inline unsigned long
167do_mmap2 (unsigned long addr, unsigned long len, int prot, int flags, int fd, unsigned long pgoff) 183do_mmap2 (unsigned long addr, unsigned long len, int prot, int flags, int fd, unsigned long pgoff)
168{ 184{
169 unsigned long roff;
170 struct file *file = NULL; 185 struct file *file = NULL;
171 186
172 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); 187 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
@@ -188,17 +203,6 @@ do_mmap2 (unsigned long addr, unsigned long len, int prot, int flags, int fd, un
188 goto out; 203 goto out;
189 } 204 }
190 205
191 /*
192 * Don't permit mappings into unmapped space, the virtual page table of a region,
193 * or across a region boundary. Note: RGN_MAP_LIMIT is equal to 2^n-PAGE_SIZE
194 * (for some integer n <= 61) and len > 0.
195 */
196 roff = REGION_OFFSET(addr);
197 if ((len > RGN_MAP_LIMIT) || (roff > (RGN_MAP_LIMIT - len))) {
198 addr = -EINVAL;
199 goto out;
200 }
201
202 down_write(&current->mm->mmap_sem); 206 down_write(&current->mm->mmap_sem);
203 addr = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); 207 addr = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
204 up_write(&current->mm->mmap_sem); 208 up_write(&current->mm->mmap_sem);
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c
index d24fa393b182..f648c610b10c 100644
--- a/arch/ia64/kernel/topology.c
+++ b/arch/ia64/kernel/topology.c
@@ -67,10 +67,8 @@ static int __init topology_init(void)
67#endif 67#endif
68 68
69 sysfs_cpus = kzalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL); 69 sysfs_cpus = kzalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL);
70 if (!sysfs_cpus) { 70 if (!sysfs_cpus)
71 err = -ENOMEM; 71 panic("kzalloc in topology_init failed - NR_CPUS too big?");
72 goto out;
73 }
74 72
75 for_each_present_cpu(i) { 73 for_each_present_cpu(i) {
76 if((err = arch_register_cpu(i))) 74 if((err = arch_register_cpu(i)))
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
index c119e8b620de..5f2dcba7fa8d 100644
--- a/arch/ia64/sn/kernel/setup.c
+++ b/arch/ia64/sn/kernel/setup.c
@@ -565,7 +565,7 @@ static void __init sn_init_pdas(char **cmdline_p)
565 * Also sets up a few fields in the nodepda. Also known as 565 * Also sets up a few fields in the nodepda. Also known as
566 * platform_cpu_init() by the ia64 machvec code. 566 * platform_cpu_init() by the ia64 machvec code.
567 */ 567 */
568void __init sn_cpu_init(void) 568void __cpuinit sn_cpu_init(void)
569{ 569{
570 int cpuid; 570 int cpuid;
571 int cpuphyid; 571 int cpuphyid;
diff --git a/arch/ia64/sn/kernel/xpc_channel.c b/arch/ia64/sn/kernel/xpc_channel.c
index c2f69f7942af..1f3540826e68 100644
--- a/arch/ia64/sn/kernel/xpc_channel.c
+++ b/arch/ia64/sn/kernel/xpc_channel.c
@@ -279,8 +279,8 @@ xpc_pull_remote_cachelines(struct xpc_partition *part, void *dst,
279 return part->reason; 279 return part->reason;
280 } 280 }
281 281
282 bte_ret = xp_bte_copy((u64) src, (u64) ia64_tpa((u64) dst), 282 bte_ret = xp_bte_copy((u64) src, (u64) dst, (u64) cnt,
283 (u64) cnt, (BTE_NORMAL | BTE_WACQUIRE), NULL); 283 (BTE_NORMAL | BTE_WACQUIRE), NULL);
284 if (bte_ret == BTE_SUCCESS) { 284 if (bte_ret == BTE_SUCCESS) {
285 return xpcSuccess; 285 return xpcSuccess;
286 } 286 }
diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c
index 5e8e59efb347..4d026f9dd98b 100644
--- a/arch/ia64/sn/kernel/xpc_main.c
+++ b/arch/ia64/sn/kernel/xpc_main.c
@@ -1052,6 +1052,8 @@ xpc_do_exit(enum xpc_retval reason)
1052 if (xpc_sysctl) { 1052 if (xpc_sysctl) {
1053 unregister_sysctl_table(xpc_sysctl); 1053 unregister_sysctl_table(xpc_sysctl);
1054 } 1054 }
1055
1056 kfree(xpc_remote_copy_buffer_base);
1055} 1057}
1056 1058
1057 1059
@@ -1212,24 +1214,20 @@ xpc_init(void)
1212 partid_t partid; 1214 partid_t partid;
1213 struct xpc_partition *part; 1215 struct xpc_partition *part;
1214 pid_t pid; 1216 pid_t pid;
1217 size_t buf_size;
1215 1218
1216 1219
1217 if (!ia64_platform_is("sn2")) { 1220 if (!ia64_platform_is("sn2")) {
1218 return -ENODEV; 1221 return -ENODEV;
1219 } 1222 }
1220 1223
1221 /* 1224
1222 * xpc_remote_copy_buffer is used as a temporary buffer for bte_copy'ng 1225 buf_size = max(XPC_RP_VARS_SIZE,
1223 * various portions of a partition's reserved page. Its size is based 1226 XPC_RP_HEADER_SIZE + XP_NASID_MASK_BYTES);
1224 * on the size of the reserved page header and part_nasids mask. So we 1227 xpc_remote_copy_buffer = xpc_kmalloc_cacheline_aligned(buf_size,
1225 * need to ensure that the other items will fit as well. 1228 GFP_KERNEL, &xpc_remote_copy_buffer_base);
1226 */ 1229 if (xpc_remote_copy_buffer == NULL)
1227 if (XPC_RP_VARS_SIZE > XPC_RP_HEADER_SIZE + XP_NASID_MASK_BYTES) { 1230 return -ENOMEM;
1228 dev_err(xpc_part, "xpc_remote_copy_buffer is not big enough\n");
1229 return -EPERM;
1230 }
1231 DBUG_ON((u64) xpc_remote_copy_buffer !=
1232 L1_CACHE_ALIGN((u64) xpc_remote_copy_buffer));
1233 1231
1234 snprintf(xpc_part->bus_id, BUS_ID_SIZE, "part"); 1232 snprintf(xpc_part->bus_id, BUS_ID_SIZE, "part");
1235 snprintf(xpc_chan->bus_id, BUS_ID_SIZE, "chan"); 1233 snprintf(xpc_chan->bus_id, BUS_ID_SIZE, "chan");
@@ -1293,6 +1291,8 @@ xpc_init(void)
1293 if (xpc_sysctl) { 1291 if (xpc_sysctl) {
1294 unregister_sysctl_table(xpc_sysctl); 1292 unregister_sysctl_table(xpc_sysctl);
1295 } 1293 }
1294
1295 kfree(xpc_remote_copy_buffer_base);
1296 return -EBUSY; 1296 return -EBUSY;
1297 } 1297 }
1298 1298
@@ -1311,6 +1311,8 @@ xpc_init(void)
1311 if (xpc_sysctl) { 1311 if (xpc_sysctl) {
1312 unregister_sysctl_table(xpc_sysctl); 1312 unregister_sysctl_table(xpc_sysctl);
1313 } 1313 }
1314
1315 kfree(xpc_remote_copy_buffer_base);
1314 return -EBUSY; 1316 return -EBUSY;
1315 } 1317 }
1316 1318
@@ -1362,6 +1364,8 @@ xpc_init(void)
1362 if (xpc_sysctl) { 1364 if (xpc_sysctl) {
1363 unregister_sysctl_table(xpc_sysctl); 1365 unregister_sysctl_table(xpc_sysctl);
1364 } 1366 }
1367
1368 kfree(xpc_remote_copy_buffer_base);
1365 return -EBUSY; 1369 return -EBUSY;
1366 } 1370 }
1367 1371
diff --git a/arch/ia64/sn/kernel/xpc_partition.c b/arch/ia64/sn/kernel/xpc_partition.c
index 2a89cfce4954..57c723f5cba4 100644
--- a/arch/ia64/sn/kernel/xpc_partition.c
+++ b/arch/ia64/sn/kernel/xpc_partition.c
@@ -71,19 +71,15 @@ struct xpc_partition xpc_partitions[XP_MAX_PARTITIONS + 1];
71 * Generic buffer used to store a local copy of portions of a remote 71 * Generic buffer used to store a local copy of portions of a remote
72 * partition's reserved page (either its header and part_nasids mask, 72 * partition's reserved page (either its header and part_nasids mask,
73 * or its vars). 73 * or its vars).
74 *
75 * xpc_discovery runs only once and is a seperate thread that is
76 * very likely going to be processing in parallel with receiving
77 * interrupts.
78 */ 74 */
79char ____cacheline_aligned xpc_remote_copy_buffer[XPC_RP_HEADER_SIZE + 75char *xpc_remote_copy_buffer;
80 XP_NASID_MASK_BYTES]; 76void *xpc_remote_copy_buffer_base;
81 77
82 78
83/* 79/*
84 * Guarantee that the kmalloc'd memory is cacheline aligned. 80 * Guarantee that the kmalloc'd memory is cacheline aligned.
85 */ 81 */
86static void * 82void *
87xpc_kmalloc_cacheline_aligned(size_t size, gfp_t flags, void **base) 83xpc_kmalloc_cacheline_aligned(size_t size, gfp_t flags, void **base)
88{ 84{
89 /* see if kmalloc will give us cachline aligned memory by default */ 85 /* see if kmalloc will give us cachline aligned memory by default */
@@ -148,7 +144,7 @@ xpc_get_rsvd_page_pa(int nasid)
148 } 144 }
149 } 145 }
150 146
151 bte_res = xp_bte_copy(rp_pa, ia64_tpa(buf), buf_len, 147 bte_res = xp_bte_copy(rp_pa, buf, buf_len,
152 (BTE_NOTIFY | BTE_WACQUIRE), NULL); 148 (BTE_NOTIFY | BTE_WACQUIRE), NULL);
153 if (bte_res != BTE_SUCCESS) { 149 if (bte_res != BTE_SUCCESS) {
154 dev_dbg(xpc_part, "xp_bte_copy failed %i\n", bte_res); 150 dev_dbg(xpc_part, "xp_bte_copy failed %i\n", bte_res);
@@ -447,7 +443,7 @@ xpc_check_remote_hb(void)
447 443
448 /* pull the remote_hb cache line */ 444 /* pull the remote_hb cache line */
449 bres = xp_bte_copy(part->remote_vars_pa, 445 bres = xp_bte_copy(part->remote_vars_pa,
450 ia64_tpa((u64) remote_vars), 446 (u64) remote_vars,
451 XPC_RP_VARS_SIZE, 447 XPC_RP_VARS_SIZE,
452 (BTE_NOTIFY | BTE_WACQUIRE), NULL); 448 (BTE_NOTIFY | BTE_WACQUIRE), NULL);
453 if (bres != BTE_SUCCESS) { 449 if (bres != BTE_SUCCESS) {
@@ -498,8 +494,7 @@ xpc_get_remote_rp(int nasid, u64 *discovered_nasids,
498 494
499 495
500 /* pull over the reserved page header and part_nasids mask */ 496 /* pull over the reserved page header and part_nasids mask */
501 497 bres = xp_bte_copy(*remote_rp_pa, (u64) remote_rp,
502 bres = xp_bte_copy(*remote_rp_pa, ia64_tpa((u64) remote_rp),
503 XPC_RP_HEADER_SIZE + xp_nasid_mask_bytes, 498 XPC_RP_HEADER_SIZE + xp_nasid_mask_bytes,
504 (BTE_NOTIFY | BTE_WACQUIRE), NULL); 499 (BTE_NOTIFY | BTE_WACQUIRE), NULL);
505 if (bres != BTE_SUCCESS) { 500 if (bres != BTE_SUCCESS) {
@@ -554,11 +549,8 @@ xpc_get_remote_vars(u64 remote_vars_pa, struct xpc_vars *remote_vars)
554 return xpcVarsNotSet; 549 return xpcVarsNotSet;
555 } 550 }
556 551
557
558 /* pull over the cross partition variables */ 552 /* pull over the cross partition variables */
559 553 bres = xp_bte_copy(remote_vars_pa, (u64) remote_vars, XPC_RP_VARS_SIZE,
560 bres = xp_bte_copy(remote_vars_pa, ia64_tpa((u64) remote_vars),
561 XPC_RP_VARS_SIZE,
562 (BTE_NOTIFY | BTE_WACQUIRE), NULL); 554 (BTE_NOTIFY | BTE_WACQUIRE), NULL);
563 if (bres != BTE_SUCCESS) { 555 if (bres != BTE_SUCCESS) {
564 return xpc_map_bte_errors(bres); 556 return xpc_map_bte_errors(bres);
@@ -1239,7 +1231,7 @@ xpc_initiate_partid_to_nasids(partid_t partid, void *nasid_mask)
1239 1231
1240 part_nasid_pa = (u64) XPC_RP_PART_NASIDS(part->remote_rp_pa); 1232 part_nasid_pa = (u64) XPC_RP_PART_NASIDS(part->remote_rp_pa);
1241 1233
1242 bte_res = xp_bte_copy(part_nasid_pa, ia64_tpa((u64) nasid_mask), 1234 bte_res = xp_bte_copy(part_nasid_pa, (u64) nasid_mask,
1243 xp_nasid_mask_bytes, (BTE_NOTIFY | BTE_WACQUIRE), NULL); 1235 xp_nasid_mask_bytes, (BTE_NOTIFY | BTE_WACQUIRE), NULL);
1244 1236
1245 return xpc_map_bte_errors(bte_res); 1237 return xpc_map_bte_errors(bte_res);
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index abb325eb8f75..694b0c63ee50 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -95,6 +95,10 @@ config GENERIC_TBSYNC
95 default y if PPC32 && SMP 95 default y if PPC32 && SMP
96 default n 96 default n
97 97
98config AUDIT_ARCH
99 bool
100 default y
101
98config DEFAULT_UIMAGE 102config DEFAULT_UIMAGE
99 bool 103 bool
100 help 104 help
@@ -354,6 +358,7 @@ endchoice
354config PPC_PSERIES 358config PPC_PSERIES
355 depends on PPC_MULTIPLATFORM && PPC64 359 depends on PPC_MULTIPLATFORM && PPC64
356 bool "IBM pSeries & new (POWER5-based) iSeries" 360 bool "IBM pSeries & new (POWER5-based) iSeries"
361 select MPIC
357 select PPC_I8259 362 select PPC_I8259
358 select PPC_RTAS 363 select PPC_RTAS
359 select RTAS_ERROR_LOGGING 364 select RTAS_ERROR_LOGGING
@@ -363,6 +368,7 @@ config PPC_PSERIES
363config PPC_CHRP 368config PPC_CHRP
364 bool "Common Hardware Reference Platform (CHRP) based machines" 369 bool "Common Hardware Reference Platform (CHRP) based machines"
365 depends on PPC_MULTIPLATFORM && PPC32 370 depends on PPC_MULTIPLATFORM && PPC32
371 select MPIC
366 select PPC_I8259 372 select PPC_I8259
367 select PPC_INDIRECT_PCI 373 select PPC_INDIRECT_PCI
368 select PPC_RTAS 374 select PPC_RTAS
@@ -373,6 +379,7 @@ config PPC_CHRP
373config PPC_PMAC 379config PPC_PMAC
374 bool "Apple PowerMac based machines" 380 bool "Apple PowerMac based machines"
375 depends on PPC_MULTIPLATFORM 381 depends on PPC_MULTIPLATFORM
382 select MPIC
376 select PPC_INDIRECT_PCI if PPC32 383 select PPC_INDIRECT_PCI if PPC32
377 select PPC_MPC106 if PPC32 384 select PPC_MPC106 if PPC32
378 default y 385 default y
@@ -380,6 +387,7 @@ config PPC_PMAC
380config PPC_PMAC64 387config PPC_PMAC64
381 bool 388 bool
382 depends on PPC_PMAC && POWER4 389 depends on PPC_PMAC && POWER4
390 select MPIC
383 select U3_DART 391 select U3_DART
384 select MPIC_BROKEN_U3 392 select MPIC_BROKEN_U3
385 select GENERIC_TBSYNC 393 select GENERIC_TBSYNC
@@ -389,6 +397,7 @@ config PPC_PMAC64
389config PPC_PREP 397config PPC_PREP
390 bool "PowerPC Reference Platform (PReP) based machines" 398 bool "PowerPC Reference Platform (PReP) based machines"
391 depends on PPC_MULTIPLATFORM && PPC32 && BROKEN 399 depends on PPC_MULTIPLATFORM && PPC32 && BROKEN
400 select MPIC
392 select PPC_I8259 401 select PPC_I8259
393 select PPC_INDIRECT_PCI 402 select PPC_INDIRECT_PCI
394 select PPC_UDBG_16550 403 select PPC_UDBG_16550
@@ -397,6 +406,7 @@ config PPC_PREP
397config PPC_MAPLE 406config PPC_MAPLE
398 depends on PPC_MULTIPLATFORM && PPC64 407 depends on PPC_MULTIPLATFORM && PPC64
399 bool "Maple 970FX Evaluation Board" 408 bool "Maple 970FX Evaluation Board"
409 select MPIC
400 select U3_DART 410 select U3_DART
401 select MPIC_BROKEN_U3 411 select MPIC_BROKEN_U3
402 select GENERIC_TBSYNC 412 select GENERIC_TBSYNC
@@ -439,12 +449,6 @@ config U3_DART
439 depends on PPC_MULTIPLATFORM && PPC64 449 depends on PPC_MULTIPLATFORM && PPC64
440 default n 450 default n
441 451
442config MPIC
443 depends on PPC_PSERIES || PPC_PMAC || PPC_MAPLE || PPC_CHRP \
444 || MPC7448HPC2
445 bool
446 default y
447
448config PPC_RTAS 452config PPC_RTAS
449 bool 453 bool
450 default n 454 default n
@@ -812,6 +816,14 @@ config GENERIC_ISA_DMA
812 depends on PPC64 || POWER4 || 6xx && !CPM2 816 depends on PPC64 || POWER4 || 6xx && !CPM2
813 default y 817 default y
814 818
819config MPIC
820 bool
821 default n
822
823config MPIC_WEIRD
824 bool
825 default n
826
815config PPC_I8259 827config PPC_I8259
816 bool 828 bool
817 default n 829 default n
diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts
new file mode 100644
index 000000000000..d7b985e6bd2f
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts
@@ -0,0 +1,190 @@
1/*
2 * MPC7448HPC2 (Taiga) board Device Tree Source
3 *
4 * Copyright 2006 Freescale Semiconductor Inc.
5 * 2006 Roy Zang <Roy Zang at freescale.com>.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13
14/ {
15 model = "mpc7448hpc2";
16 compatible = "mpc74xx";
17 #address-cells = <1>;
18 #size-cells = <1>;
19 linux,phandle = <100>;
20
21 cpus {
22 #cpus = <1>;
23 #address-cells = <1>;
24 #size-cells =<0>;
25 linux,phandle = <200>;
26
27 PowerPC,7448@0 {
28 device_type = "cpu";
29 reg = <0>;
30 d-cache-line-size = <20>; // 32 bytes
31 i-cache-line-size = <20>; // 32 bytes
32 d-cache-size = <8000>; // L1, 32K bytes
33 i-cache-size = <8000>; // L1, 32K bytes
34 timebase-frequency = <0>; // 33 MHz, from uboot
35 clock-frequency = <0>; // From U-Boot
36 bus-frequency = <0>; // From U-Boot
37 32-bit;
38 linux,phandle = <201>;
39 linux,boot-cpu;
40 };
41 };
42
43 memory {
44 device_type = "memory";
45 linux,phandle = <300>;
46 reg = <00000000 20000000 // DDR2 512M at 0
47 >;
48 };
49
50 tsi108@c0000000 {
51 #address-cells = <1>;
52 #size-cells = <1>;
53 #interrupt-cells = <2>;
54 device_type = "tsi-bridge";
55 ranges = <00000000 c0000000 00010000>;
56 reg = <c0000000 00010000>;
57 bus-frequency = <0>;
58
59 i2c@7000 {
60 interrupt-parent = <7400>;
61 interrupts = <E 0>;
62 reg = <7000 400>;
63 device_type = "i2c";
64 compatible = "tsi-i2c";
65 };
66
67 mdio@6000 {
68 device_type = "mdio";
69 compatible = "tsi-ethernet";
70
71 ethernet-phy@6000 {
72 linux,phandle = <6000>;
73 interrupt-parent = <7400>;
74 interrupts = <2 1>;
75 reg = <6000 50>;
76 phy-id = <8>;
77 device_type = "ethernet-phy";
78 };
79
80 ethernet-phy@6400 {
81 linux,phandle = <6400>;
82 interrupt-parent = <7400>;
83 interrupts = <2 1>;
84 reg = <6000 50>;
85 phy-id = <9>;
86 device_type = "ethernet-phy";
87 };
88
89 };
90
91 ethernet@6200 {
92 #size-cells = <0>;
93 device_type = "network";
94 model = "TSI-ETH";
95 compatible = "tsi-ethernet";
96 reg = <6000 200>;
97 address = [ 00 06 D2 00 00 01 ];
98 interrupts = <10 2>;
99 interrupt-parent = <7400>;
100 phy-handle = <6000>;
101 };
102
103 ethernet@6600 {
104 #address-cells = <1>;
105 #size-cells = <0>;
106 device_type = "network";
107 model = "TSI-ETH";
108 compatible = "tsi-ethernet";
109 reg = <6400 200>;
110 address = [ 00 06 D2 00 00 02 ];
111 interrupts = <11 2>;
112 interrupt-parent = <7400>;
113 phy-handle = <6400>;
114 };
115
116 serial@7808 {
117 device_type = "serial";
118 compatible = "ns16550";
119 reg = <7808 200>;
120 clock-frequency = <3f6b5a00>;
121 interrupts = <c 0>;
122 interrupt-parent = <7400>;
123 };
124
125 serial@7c08 {
126 device_type = "serial";
127 compatible = "ns16550";
128 reg = <7c08 200>;
129 clock-frequency = <3f6b5a00>;
130 interrupts = <d 0>;
131 interrupt-parent = <7400>;
132 };
133
134 pic@7400 {
135 linux,phandle = <7400>;
136 clock-frequency = <0>;
137 interrupt-controller;
138 #address-cells = <0>;
139 #interrupt-cells = <2>;
140 reg = <7400 400>;
141 built-in;
142 compatible = "chrp,open-pic";
143 device_type = "open-pic";
144 big-endian;
145 };
146 pci@1000 {
147 compatible = "tsi10x";
148 device_type = "pci";
149 linux,phandle = <1000>;
150 #interrupt-cells = <1>;
151 #size-cells = <2>;
152 #address-cells = <3>;
153 reg = <1000 1000>;
154 bus-range = <0 0>;
155 ranges = <02000000 0 e0000000 e0000000 0 1A000000
156 01000000 0 00000000 fa000000 0 00010000>;
157 clock-frequency = <7f28154>;
158 interrupt-parent = <7400>;
159 interrupts = <17 2>;
160 interrupt-map-mask = <f800 0 0 7>;
161 interrupt-map = <
162
163 /* IDSEL 0x11 */
164 0800 0 0 1 7400 24 0
165 0800 0 0 2 7400 25 0
166 0800 0 0 3 7400 26 0
167 0800 0 0 4 7400 27 0
168
169 /* IDSEL 0x12 */
170 1000 0 0 1 7400 25 0
171 1000 0 0 2 7400 26 0
172 1000 0 0 3 7400 27 0
173 1000 0 0 4 7400 24 0
174
175 /* IDSEL 0x13 */
176 1800 0 0 1 7400 26 0
177 1800 0 0 2 7400 27 0
178 1800 0 0 3 7400 24 0
179 1800 0 0 4 7400 25 0
180
181 /* IDSEL 0x14 */
182 2000 0 0 1 7400 27 0
183 2000 0 0 2 7400 24 0
184 2000 0 0 3 7400 25 0
185 2000 0 0 4 7400 26 0
186 >;
187 };
188 };
189
190};
diff --git a/arch/powerpc/boot/dts/mpc8349emds.dts b/arch/powerpc/boot/dts/mpc8349emds.dts
new file mode 100644
index 000000000000..12f5dbf3055f
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8349emds.dts
@@ -0,0 +1,328 @@
1/*
2 * MPC8349E MDS Device Tree Source
3 *
4 * Copyright 2005, 2006 Freescale Semiconductor Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12/ {
13 model = "MPC8349EMDS";
14 compatible = "MPC834xMDS";
15 #address-cells = <1>;
16 #size-cells = <1>;
17
18 cpus {
19 #cpus = <1>;
20 #address-cells = <1>;
21 #size-cells = <0>;
22
23 PowerPC,8349@0 {
24 device_type = "cpu";
25 reg = <0>;
26 d-cache-line-size = <20>; // 32 bytes
27 i-cache-line-size = <20>; // 32 bytes
28 d-cache-size = <8000>; // L1, 32K
29 i-cache-size = <8000>; // L1, 32K
30 timebase-frequency = <0>; // from bootloader
31 bus-frequency = <0>; // from bootloader
32 clock-frequency = <0>; // from bootloader
33 32-bit;
34 };
35 };
36
37 memory {
38 device_type = "memory";
39 reg = <00000000 10000000>; // 256MB at 0
40 };
41
42 soc8349@e0000000 {
43 #address-cells = <1>;
44 #size-cells = <1>;
45 #interrupt-cells = <2>;
46 device_type = "soc";
47 ranges = <0 e0000000 00100000>;
48 reg = <e0000000 00000200>;
49 bus-frequency = <0>;
50
51 wdt@200 {
52 device_type = "watchdog";
53 compatible = "mpc83xx_wdt";
54 reg = <200 100>;
55 };
56
57 i2c@3000 {
58 device_type = "i2c";
59 compatible = "fsl-i2c";
60 reg = <3000 100>;
61 interrupts = <e 8>;
62 interrupt-parent = <700>;
63 dfsrr;
64 };
65
66 i2c@3100 {
67 device_type = "i2c";
68 compatible = "fsl-i2c";
69 reg = <3100 100>;
70 interrupts = <f 8>;
71 interrupt-parent = <700>;
72 dfsrr;
73 };
74
75 spi@7000 {
76 device_type = "spi";
77 compatible = "mpc83xx_spi";
78 reg = <7000 1000>;
79 interrupts = <10 8>;
80 interrupt-parent = <700>;
81 mode = <0>;
82 };
83
84 /* phy type (ULPI or SERIAL) are only types supportted for MPH */
85 /* port = 0 or 1 */
86 usb@22000 {
87 device_type = "usb";
88 compatible = "fsl-usb2-mph";
89 reg = <22000 1000>;
90 #address-cells = <1>;
91 #size-cells = <0>;
92 interrupt-parent = <700>;
93 interrupts = <27 2>;
94 phy_type = "ulpi";
95 port1;
96 };
97 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
98 usb@23000 {
99 device_type = "usb";
100 compatible = "fsl-usb2-dr";
101 reg = <23000 1000>;
102 #address-cells = <1>;
103 #size-cells = <0>;
104 interrupt-parent = <700>;
105 interrupts = <26 2>;
106 phy_type = "ulpi";
107 };
108
109 mdio@24520 {
110 device_type = "mdio";
111 compatible = "gianfar";
112 reg = <24520 20>;
113 #address-cells = <1>;
114 #size-cells = <0>;
115 linux,phandle = <24520>;
116 ethernet-phy@0 {
117 linux,phandle = <2452000>;
118 interrupt-parent = <700>;
119 interrupts = <11 2>;
120 reg = <0>;
121 device_type = "ethernet-phy";
122 };
123 ethernet-phy@1 {
124 linux,phandle = <2452001>;
125 interrupt-parent = <700>;
126 interrupts = <12 2>;
127 reg = <1>;
128 device_type = "ethernet-phy";
129 };
130 };
131
132 ethernet@24000 {
133 device_type = "network";
134 model = "TSEC";
135 compatible = "gianfar";
136 reg = <24000 1000>;
137 address = [ 00 00 00 00 00 00 ];
138 local-mac-address = [ 00 00 00 00 00 00 ];
139 interrupts = <20 8 21 8 22 8>;
140 interrupt-parent = <700>;
141 phy-handle = <2452000>;
142 };
143
144 ethernet@25000 {
145 #address-cells = <1>;
146 #size-cells = <0>;
147 device_type = "network";
148 model = "TSEC";
149 compatible = "gianfar";
150 reg = <25000 1000>;
151 address = [ 00 00 00 00 00 00 ];
152 local-mac-address = [ 00 00 00 00 00 00 ];
153 interrupts = <23 8 24 8 25 8>;
154 interrupt-parent = <700>;
155 phy-handle = <2452001>;
156 };
157
158 serial@4500 {
159 device_type = "serial";
160 compatible = "ns16550";
161 reg = <4500 100>;
162 clock-frequency = <0>;
163 interrupts = <9 8>;
164 interrupt-parent = <700>;
165 };
166
167 serial@4600 {
168 device_type = "serial";
169 compatible = "ns16550";
170 reg = <4600 100>;
171 clock-frequency = <0>;
172 interrupts = <a 8>;
173 interrupt-parent = <700>;
174 };
175
176 pci@8500 {
177 interrupt-map-mask = <f800 0 0 7>;
178 interrupt-map = <
179
180 /* IDSEL 0x11 */
181 8800 0 0 1 700 14 8
182 8800 0 0 2 700 15 8
183 8800 0 0 3 700 16 8
184 8800 0 0 4 700 17 8
185
186 /* IDSEL 0x12 */
187 9000 0 0 1 700 16 8
188 9000 0 0 2 700 17 8
189 9000 0 0 3 700 14 8
190 9000 0 0 4 700 15 8
191
192 /* IDSEL 0x13 */
193 9800 0 0 1 700 17 8
194 9800 0 0 2 700 14 8
195 9800 0 0 3 700 15 8
196 9800 0 0 4 700 16 8
197
198 /* IDSEL 0x15 */
199 a800 0 0 1 700 14 8
200 a800 0 0 2 700 15 8
201 a800 0 0 3 700 16 8
202 a800 0 0 4 700 17 8
203
204 /* IDSEL 0x16 */
205 b000 0 0 1 700 17 8
206 b000 0 0 2 700 14 8
207 b000 0 0 3 700 15 8
208 b000 0 0 4 700 16 8
209
210 /* IDSEL 0x17 */
211 b800 0 0 1 700 16 8
212 b800 0 0 2 700 17 8
213 b800 0 0 3 700 14 8
214 b800 0 0 4 700 15 8
215
216 /* IDSEL 0x18 */
217 b000 0 0 1 700 15 8
218 b000 0 0 2 700 16 8
219 b000 0 0 3 700 17 8
220 b000 0 0 4 700 14 8>;
221 interrupt-parent = <700>;
222 interrupts = <42 8>;
223 bus-range = <0 0>;
224 ranges = <02000000 0 a0000000 a0000000 0 10000000
225 42000000 0 80000000 80000000 0 10000000
226 01000000 0 00000000 e2000000 0 00100000>;
227 clock-frequency = <3f940aa>;
228 #interrupt-cells = <1>;
229 #size-cells = <2>;
230 #address-cells = <3>;
231 reg = <8500 100>;
232 compatible = "83xx";
233 device_type = "pci";
234 };
235
236 pci@8600 {
237 interrupt-map-mask = <f800 0 0 7>;
238 interrupt-map = <
239
240 /* IDSEL 0x11 */
241 8800 0 0 1 700 14 8
242 8800 0 0 2 700 15 8
243 8800 0 0 3 700 16 8
244 8800 0 0 4 700 17 8
245
246 /* IDSEL 0x12 */
247 9000 0 0 1 700 16 8
248 9000 0 0 2 700 17 8
249 9000 0 0 3 700 14 8
250 9000 0 0 4 700 15 8
251
252 /* IDSEL 0x13 */
253 9800 0 0 1 700 17 8
254 9800 0 0 2 700 14 8
255 9800 0 0 3 700 15 8
256 9800 0 0 4 700 16 8
257
258 /* IDSEL 0x15 */
259 a800 0 0 1 700 14 8
260 a800 0 0 2 700 15 8
261 a800 0 0 3 700 16 8
262 a800 0 0 4 700 17 8
263
264 /* IDSEL 0x16 */
265 b000 0 0 1 700 17 8
266 b000 0 0 2 700 14 8
267 b000 0 0 3 700 15 8
268 b000 0 0 4 700 16 8
269
270 /* IDSEL 0x17 */
271 b800 0 0 1 700 16 8
272 b800 0 0 2 700 17 8
273 b800 0 0 3 700 14 8
274 b800 0 0 4 700 15 8
275
276 /* IDSEL 0x18 */
277 b000 0 0 1 700 15 8
278 b000 0 0 2 700 16 8
279 b000 0 0 3 700 17 8
280 b000 0 0 4 700 14 8>;
281 interrupt-parent = <700>;
282 interrupts = <42 8>;
283 bus-range = <0 0>;
284 ranges = <02000000 0 b0000000 b0000000 0 10000000
285 42000000 0 90000000 90000000 0 10000000
286 01000000 0 00000000 e2100000 0 00100000>;
287 clock-frequency = <3f940aa>;
288 #interrupt-cells = <1>;
289 #size-cells = <2>;
290 #address-cells = <3>;
291 reg = <8600 100>;
292 compatible = "83xx";
293 device_type = "pci";
294 };
295
296 /* May need to remove if on a part without crypto engine */
297 crypto@30000 {
298 device_type = "crypto";
299 model = "SEC2";
300 compatible = "talitos";
301 reg = <30000 10000>;
302 interrupts = <b 8>;
303 interrupt-parent = <700>;
304 num-channels = <4>;
305 channel-fifo-len = <18>;
306 exec-units-mask = <0000007e>;
307 /* desc mask is for rev2.0,
308 * we need runtime fixup for >2.0 */
309 descriptor-types-mask = <01010ebf>;
310 };
311
312 /* IPIC
313 * interrupts cell = <intr #, sense>
314 * sense values match linux IORESOURCE_IRQ_* defines:
315 * sense == 8: Level, low assertion
316 * sense == 2: Edge, high-to-low change
317 */
318 pic@700 {
319 linux,phandle = <700>;
320 interrupt-controller;
321 #address-cells = <0>;
322 #interrupt-cells = <2>;
323 reg = <700 100>;
324 built-in;
325 device_type = "ipic";
326 };
327 };
328};
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig
index e028a2ecb8a3..6fd9e7acec29 100644
--- a/arch/powerpc/configs/cell_defconfig
+++ b/arch/powerpc/configs/cell_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17-rc6 3# Linux kernel version: 2.6.18-rc6
4# Thu Jun 22 15:28:36 2006 4# Sun Sep 10 10:20:32 2006
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
8CONFIG_PPC_MERGE=y 8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
11CONFIG_RWSEM_XCHGADD_ALGORITHM=y 12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
12CONFIG_GENERIC_HWEIGHT=y 13CONFIG_GENERIC_HWEIGHT=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y 14CONFIG_GENERIC_CALIBRATE_DELAY=y
@@ -35,6 +36,7 @@ CONFIG_PPC_STD_MMU=y
35CONFIG_VIRT_CPU_ACCOUNTING=y 36CONFIG_VIRT_CPU_ACCOUNTING=y
36CONFIG_SMP=y 37CONFIG_SMP=y
37CONFIG_NR_CPUS=4 38CONFIG_NR_CPUS=4
39CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
38 40
39# 41#
40# Code maturity level options 42# Code maturity level options
@@ -52,6 +54,7 @@ CONFIG_SWAP=y
52CONFIG_SYSVIPC=y 54CONFIG_SYSVIPC=y
53# CONFIG_POSIX_MQUEUE is not set 55# CONFIG_POSIX_MQUEUE is not set
54# CONFIG_BSD_PROCESS_ACCT is not set 56# CONFIG_BSD_PROCESS_ACCT is not set
57# CONFIG_TASKSTATS is not set
55CONFIG_SYSCTL=y 58CONFIG_SYSCTL=y
56# CONFIG_AUDIT is not set 59# CONFIG_AUDIT is not set
57CONFIG_IKCONFIG=y 60CONFIG_IKCONFIG=y
@@ -69,10 +72,12 @@ CONFIG_PRINTK=y
69CONFIG_BUG=y 72CONFIG_BUG=y
70CONFIG_ELF_CORE=y 73CONFIG_ELF_CORE=y
71CONFIG_BASE_FULL=y 74CONFIG_BASE_FULL=y
75CONFIG_RT_MUTEXES=y
72CONFIG_FUTEX=y 76CONFIG_FUTEX=y
73CONFIG_EPOLL=y 77CONFIG_EPOLL=y
74CONFIG_SHMEM=y 78CONFIG_SHMEM=y
75CONFIG_SLAB=y 79CONFIG_SLAB=y
80CONFIG_VM_EVENT_COUNTERS=y
76# CONFIG_TINY_SHMEM is not set 81# CONFIG_TINY_SHMEM is not set
77CONFIG_BASE_SMALL=0 82CONFIG_BASE_SMALL=0
78# CONFIG_SLOB is not set 83# CONFIG_SLOB is not set
@@ -119,7 +124,7 @@ CONFIG_PPC_MULTIPLATFORM=y
119CONFIG_PPC_CELL=y 124CONFIG_PPC_CELL=y
120CONFIG_PPC_CELL_NATIVE=y 125CONFIG_PPC_CELL_NATIVE=y
121CONFIG_PPC_IBM_CELL_BLADE=y 126CONFIG_PPC_IBM_CELL_BLADE=y
122CONFIG_PPC_SYSTEMSIM=y 127CONFIG_UDBG_RTAS_CONSOLE=y
123# CONFIG_U3_DART is not set 128# CONFIG_U3_DART is not set
124CONFIG_PPC_RTAS=y 129CONFIG_PPC_RTAS=y
125# CONFIG_RTAS_ERROR_LOGGING is not set 130# CONFIG_RTAS_ERROR_LOGGING is not set
@@ -130,6 +135,7 @@ CONFIG_MMIO_NVRAM=y
130# CONFIG_PPC_970_NAP is not set 135# CONFIG_PPC_970_NAP is not set
131# CONFIG_CPU_FREQ is not set 136# CONFIG_CPU_FREQ is not set
132# CONFIG_WANT_EARLY_SERIAL is not set 137# CONFIG_WANT_EARLY_SERIAL is not set
138# CONFIG_MPIC is not set
133 139
134# 140#
135# Cell Broadband Engine options 141# Cell Broadband Engine options
@@ -154,6 +160,7 @@ CONFIG_BINFMT_ELF=y
154CONFIG_BINFMT_MISC=m 160CONFIG_BINFMT_MISC=m
155CONFIG_FORCE_MAX_ZONEORDER=13 161CONFIG_FORCE_MAX_ZONEORDER=13
156# CONFIG_IOMMU_VMERGE is not set 162# CONFIG_IOMMU_VMERGE is not set
163CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
157CONFIG_KEXEC=y 164CONFIG_KEXEC=y
158# CONFIG_CRASH_DUMP is not set 165# CONFIG_CRASH_DUMP is not set
159CONFIG_IRQ_ALL_CPUS=y 166CONFIG_IRQ_ALL_CPUS=y
@@ -173,6 +180,7 @@ CONFIG_SPARSEMEM_EXTREME=y
173CONFIG_MEMORY_HOTPLUG=y 180CONFIG_MEMORY_HOTPLUG=y
174CONFIG_SPLIT_PTLOCK_CPUS=4 181CONFIG_SPLIT_PTLOCK_CPUS=4
175CONFIG_MIGRATION=y 182CONFIG_MIGRATION=y
183CONFIG_RESOURCES_64BIT=y
176CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y 184CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
177CONFIG_ARCH_MEMORY_PROBE=y 185CONFIG_ARCH_MEMORY_PROBE=y
178# CONFIG_PPC_64K_PAGES is not set 186# CONFIG_PPC_64K_PAGES is not set
@@ -187,6 +195,7 @@ CONFIG_ISA_DMA_API=y
187# Bus options 195# Bus options
188# 196#
189CONFIG_GENERIC_ISA_DMA=y 197CONFIG_GENERIC_ISA_DMA=y
198# CONFIG_MPIC_WEIRD is not set
190# CONFIG_PPC_I8259 is not set 199# CONFIG_PPC_I8259 is not set
191# CONFIG_PPC_INDIRECT_PCI is not set 200# CONFIG_PPC_INDIRECT_PCI is not set
192CONFIG_PCI=y 201CONFIG_PCI=y
@@ -235,6 +244,8 @@ CONFIG_SYN_COOKIES=y
235# CONFIG_INET_IPCOMP is not set 244# CONFIG_INET_IPCOMP is not set
236# CONFIG_INET_XFRM_TUNNEL is not set 245# CONFIG_INET_XFRM_TUNNEL is not set
237CONFIG_INET_TUNNEL=y 246CONFIG_INET_TUNNEL=y
247CONFIG_INET_XFRM_MODE_TRANSPORT=y
248CONFIG_INET_XFRM_MODE_TUNNEL=y
238CONFIG_INET_DIAG=y 249CONFIG_INET_DIAG=y
239CONFIG_INET_TCP_DIAG=y 250CONFIG_INET_TCP_DIAG=y
240# CONFIG_TCP_CONG_ADVANCED is not set 251# CONFIG_TCP_CONG_ADVANCED is not set
@@ -252,7 +263,10 @@ CONFIG_INET6_ESP=m
252CONFIG_INET6_IPCOMP=m 263CONFIG_INET6_IPCOMP=m
253CONFIG_INET6_XFRM_TUNNEL=m 264CONFIG_INET6_XFRM_TUNNEL=m
254CONFIG_INET6_TUNNEL=m 265CONFIG_INET6_TUNNEL=m
266CONFIG_INET6_XFRM_MODE_TRANSPORT=y
267CONFIG_INET6_XFRM_MODE_TUNNEL=y
255CONFIG_IPV6_TUNNEL=m 268CONFIG_IPV6_TUNNEL=m
269# CONFIG_NETWORK_SECMARK is not set
256CONFIG_NETFILTER=y 270CONFIG_NETFILTER=y
257# CONFIG_NETFILTER_DEBUG is not set 271# CONFIG_NETFILTER_DEBUG is not set
258 272
@@ -277,6 +291,7 @@ CONFIG_IP_NF_TFTP=m
277CONFIG_IP_NF_AMANDA=m 291CONFIG_IP_NF_AMANDA=m
278# CONFIG_IP_NF_PPTP is not set 292# CONFIG_IP_NF_PPTP is not set
279# CONFIG_IP_NF_H323 is not set 293# CONFIG_IP_NF_H323 is not set
294# CONFIG_IP_NF_SIP is not set
280CONFIG_IP_NF_QUEUE=m 295CONFIG_IP_NF_QUEUE=m
281 296
282# 297#
@@ -336,6 +351,7 @@ CONFIG_STANDALONE=y
336CONFIG_PREVENT_FIRMWARE_BUILD=y 351CONFIG_PREVENT_FIRMWARE_BUILD=y
337CONFIG_FW_LOADER=y 352CONFIG_FW_LOADER=y
338# CONFIG_DEBUG_DRIVER is not set 353# CONFIG_DEBUG_DRIVER is not set
354# CONFIG_SYS_HYPERVISOR is not set
339 355
340# 356#
341# Connector - unified userspace <-> kernelspace linker 357# Connector - unified userspace <-> kernelspace linker
@@ -372,6 +388,7 @@ CONFIG_BLK_DEV_LOOP=y
372CONFIG_BLK_DEV_RAM=y 388CONFIG_BLK_DEV_RAM=y
373CONFIG_BLK_DEV_RAM_COUNT=16 389CONFIG_BLK_DEV_RAM_COUNT=16
374CONFIG_BLK_DEV_RAM_SIZE=131072 390CONFIG_BLK_DEV_RAM_SIZE=131072
391CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
375CONFIG_BLK_DEV_INITRD=y 392CONFIG_BLK_DEV_INITRD=y
376# CONFIG_CDROM_PKTCDVD is not set 393# CONFIG_CDROM_PKTCDVD is not set
377# CONFIG_ATA_OVER_ETH is not set 394# CONFIG_ATA_OVER_ETH is not set
@@ -449,8 +466,7 @@ CONFIG_MD_LINEAR=m
449CONFIG_MD_RAID0=m 466CONFIG_MD_RAID0=m
450CONFIG_MD_RAID1=m 467CONFIG_MD_RAID1=m
451# CONFIG_MD_RAID10 is not set 468# CONFIG_MD_RAID10 is not set
452# CONFIG_MD_RAID5 is not set 469# CONFIG_MD_RAID456 is not set
453# CONFIG_MD_RAID6 is not set
454# CONFIG_MD_MULTIPATH is not set 470# CONFIG_MD_MULTIPATH is not set
455# CONFIG_MD_FAULTY is not set 471# CONFIG_MD_FAULTY is not set
456CONFIG_BLK_DEV_DM=m 472CONFIG_BLK_DEV_DM=m
@@ -544,6 +560,7 @@ CONFIG_SPIDER_NET=m
544# CONFIG_CHELSIO_T1 is not set 560# CONFIG_CHELSIO_T1 is not set
545# CONFIG_IXGB is not set 561# CONFIG_IXGB is not set
546# CONFIG_S2IO is not set 562# CONFIG_S2IO is not set
563# CONFIG_MYRI10GE is not set
547 564
548# 565#
549# Token Ring devices 566# Token Ring devices
@@ -620,6 +637,7 @@ CONFIG_SERIO_SERPORT=y
620CONFIG_VT=y 637CONFIG_VT=y
621CONFIG_VT_CONSOLE=y 638CONFIG_VT_CONSOLE=y
622CONFIG_HW_CONSOLE=y 639CONFIG_HW_CONSOLE=y
640# CONFIG_VT_HW_CONSOLE_BINDING is not set
623CONFIG_SERIAL_NONSTANDARD=y 641CONFIG_SERIAL_NONSTANDARD=y
624# CONFIG_COMPUTONE is not set 642# CONFIG_COMPUTONE is not set
625# CONFIG_ROCKETPORT is not set 643# CONFIG_ROCKETPORT is not set
@@ -680,6 +698,7 @@ CONFIG_WATCHDOG_RTAS=y
680# 698#
681# CONFIG_PCIPCWATCHDOG is not set 699# CONFIG_PCIPCWATCHDOG is not set
682# CONFIG_WDTPCI is not set 700# CONFIG_WDTPCI is not set
701# CONFIG_HW_RANDOM is not set
683CONFIG_GEN_RTC=y 702CONFIG_GEN_RTC=y
684# CONFIG_GEN_RTC_X is not set 703# CONFIG_GEN_RTC_X is not set
685# CONFIG_DTLK is not set 704# CONFIG_DTLK is not set
@@ -725,6 +744,7 @@ CONFIG_I2C_ALGOBIT=y
725# CONFIG_I2C_I810 is not set 744# CONFIG_I2C_I810 is not set
726# CONFIG_I2C_PIIX4 is not set 745# CONFIG_I2C_PIIX4 is not set
727# CONFIG_I2C_NFORCE2 is not set 746# CONFIG_I2C_NFORCE2 is not set
747# CONFIG_I2C_OCORES is not set
728# CONFIG_I2C_PARPORT_LIGHT is not set 748# CONFIG_I2C_PARPORT_LIGHT is not set
729# CONFIG_I2C_PROSAVAGE is not set 749# CONFIG_I2C_PROSAVAGE is not set
730# CONFIG_I2C_SAVAGE4 is not set 750# CONFIG_I2C_SAVAGE4 is not set
@@ -761,7 +781,6 @@ CONFIG_I2C_ALGOBIT=y
761# 781#
762# Dallas's 1-wire bus 782# Dallas's 1-wire bus
763# 783#
764# CONFIG_W1 is not set
765 784
766# 785#
767# Hardware Monitoring support 786# Hardware Monitoring support
@@ -787,6 +806,7 @@ CONFIG_VIDEO_V4L2=y
787# 806#
788# Graphics support 807# Graphics support
789# 808#
809CONFIG_FIRMWARE_EDID=y
790# CONFIG_FB is not set 810# CONFIG_FB is not set
791 811
792# 812#
@@ -794,6 +814,7 @@ CONFIG_VIDEO_V4L2=y
794# 814#
795# CONFIG_VGA_CONSOLE is not set 815# CONFIG_VGA_CONSOLE is not set
796CONFIG_DUMMY_CONSOLE=y 816CONFIG_DUMMY_CONSOLE=y
817# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
797 818
798# 819#
799# Sound 820# Sound
@@ -841,6 +862,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y
841CONFIG_INFINIBAND=y 862CONFIG_INFINIBAND=y
842CONFIG_INFINIBAND_USER_MAD=m 863CONFIG_INFINIBAND_USER_MAD=m
843CONFIG_INFINIBAND_USER_ACCESS=m 864CONFIG_INFINIBAND_USER_ACCESS=m
865CONFIG_INFINIBAND_ADDR_TRANS=y
844CONFIG_INFINIBAND_MTHCA=m 866CONFIG_INFINIBAND_MTHCA=m
845CONFIG_INFINIBAND_MTHCA_DEBUG=y 867CONFIG_INFINIBAND_MTHCA_DEBUG=y
846CONFIG_INFINIBAND_IPOIB=m 868CONFIG_INFINIBAND_IPOIB=m
@@ -857,6 +879,19 @@ CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y
857# CONFIG_RTC_CLASS is not set 879# CONFIG_RTC_CLASS is not set
858 880
859# 881#
882# DMA Engine support
883#
884# CONFIG_DMA_ENGINE is not set
885
886#
887# DMA Clients
888#
889
890#
891# DMA Devices
892#
893
894#
860# File systems 895# File systems
861# 896#
862CONFIG_EXT2_FS=y 897CONFIG_EXT2_FS=y
@@ -877,6 +912,7 @@ CONFIG_FS_POSIX_ACL=y
877# CONFIG_MINIX_FS is not set 912# CONFIG_MINIX_FS is not set
878# CONFIG_ROMFS_FS is not set 913# CONFIG_ROMFS_FS is not set
879CONFIG_INOTIFY=y 914CONFIG_INOTIFY=y
915CONFIG_INOTIFY_USER=y
880# CONFIG_QUOTA is not set 916# CONFIG_QUOTA is not set
881CONFIG_DNOTIFY=y 917CONFIG_DNOTIFY=y
882# CONFIG_AUTOFS_FS is not set 918# CONFIG_AUTOFS_FS is not set
@@ -1034,6 +1070,9 @@ CONFIG_CRC32=y
1034# CONFIG_LIBCRC32C is not set 1070# CONFIG_LIBCRC32C is not set
1035CONFIG_ZLIB_INFLATE=m 1071CONFIG_ZLIB_INFLATE=m
1036CONFIG_ZLIB_DEFLATE=m 1072CONFIG_ZLIB_DEFLATE=m
1073CONFIG_TEXTSEARCH=y
1074CONFIG_TEXTSEARCH_KMP=m
1075CONFIG_PLIST=y
1037 1076
1038# 1077#
1039# Instrumentation Support 1078# Instrumentation Support
@@ -1046,14 +1085,19 @@ CONFIG_ZLIB_DEFLATE=m
1046# 1085#
1047# CONFIG_PRINTK_TIME is not set 1086# CONFIG_PRINTK_TIME is not set
1048CONFIG_MAGIC_SYSRQ=y 1087CONFIG_MAGIC_SYSRQ=y
1088# CONFIG_UNUSED_SYMBOLS is not set
1049CONFIG_DEBUG_KERNEL=y 1089CONFIG_DEBUG_KERNEL=y
1050CONFIG_LOG_BUF_SHIFT=15 1090CONFIG_LOG_BUF_SHIFT=15
1051CONFIG_DETECT_SOFTLOCKUP=y 1091CONFIG_DETECT_SOFTLOCKUP=y
1052# CONFIG_SCHEDSTATS is not set 1092# CONFIG_SCHEDSTATS is not set
1053# CONFIG_DEBUG_SLAB is not set 1093# CONFIG_DEBUG_SLAB is not set
1054CONFIG_DEBUG_MUTEXES=y 1094# CONFIG_DEBUG_RT_MUTEXES is not set
1095# CONFIG_RT_MUTEX_TESTER is not set
1055# CONFIG_DEBUG_SPINLOCK is not set 1096# CONFIG_DEBUG_SPINLOCK is not set
1097CONFIG_DEBUG_MUTEXES=y
1098# CONFIG_DEBUG_RWSEMS is not set
1056CONFIG_DEBUG_SPINLOCK_SLEEP=y 1099CONFIG_DEBUG_SPINLOCK_SLEEP=y
1100# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1057# CONFIG_DEBUG_KOBJECT is not set 1101# CONFIG_DEBUG_KOBJECT is not set
1058# CONFIG_DEBUG_INFO is not set 1102# CONFIG_DEBUG_INFO is not set
1059CONFIG_DEBUG_FS=y 1103CONFIG_DEBUG_FS=y
diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/chrp32_defconfig
index 0fa010a63a8e..bbf2b5f8a8cb 100644
--- a/arch/powerpc/configs/chrp32_defconfig
+++ b/arch/powerpc/configs/chrp32_defconfig
@@ -1,13 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17 3# Linux kernel version: 2.6.18-rc6
4# Mon Jul 3 12:08:41 2006 4# Sun Sep 10 10:22:54 2006
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
11CONFIG_RWSEM_XCHGADD_ALGORITHM=y 12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
12CONFIG_GENERIC_HWEIGHT=y 13CONFIG_GENERIC_HWEIGHT=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y 14CONFIG_GENERIC_CALIBRATE_DELAY=y
@@ -42,6 +43,7 @@ CONFIG_PPC_STD_MMU=y
42CONFIG_PPC_STD_MMU_32=y 43CONFIG_PPC_STD_MMU_32=y
43CONFIG_SMP=y 44CONFIG_SMP=y
44CONFIG_NR_CPUS=4 45CONFIG_NR_CPUS=4
46CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
45 47
46# 48#
47# Code maturity level options 49# Code maturity level options
@@ -59,6 +61,7 @@ CONFIG_SWAP=y
59CONFIG_SYSVIPC=y 61CONFIG_SYSVIPC=y
60CONFIG_POSIX_MQUEUE=y 62CONFIG_POSIX_MQUEUE=y
61# CONFIG_BSD_PROCESS_ACCT is not set 63# CONFIG_BSD_PROCESS_ACCT is not set
64# CONFIG_TASKSTATS is not set
62CONFIG_SYSCTL=y 65CONFIG_SYSCTL=y
63# CONFIG_AUDIT is not set 66# CONFIG_AUDIT is not set
64CONFIG_IKCONFIG=y 67CONFIG_IKCONFIG=y
@@ -76,10 +79,12 @@ CONFIG_PRINTK=y
76CONFIG_BUG=y 79CONFIG_BUG=y
77CONFIG_ELF_CORE=y 80CONFIG_ELF_CORE=y
78CONFIG_BASE_FULL=y 81CONFIG_BASE_FULL=y
82CONFIG_RT_MUTEXES=y
79CONFIG_FUTEX=y 83CONFIG_FUTEX=y
80CONFIG_EPOLL=y 84CONFIG_EPOLL=y
81CONFIG_SHMEM=y 85CONFIG_SHMEM=y
82CONFIG_SLAB=y 86CONFIG_SLAB=y
87CONFIG_VM_EVENT_COUNTERS=y
83# CONFIG_TINY_SHMEM is not set 88# CONFIG_TINY_SHMEM is not set
84CONFIG_BASE_SMALL=0 89CONFIG_BASE_SMALL=0
85# CONFIG_SLOB is not set 90# CONFIG_SLOB is not set
@@ -126,7 +131,7 @@ CONFIG_PPC_CHRP=y
126# CONFIG_PPC_PMAC is not set 131# CONFIG_PPC_PMAC is not set
127# CONFIG_PPC_CELL is not set 132# CONFIG_PPC_CELL is not set
128# CONFIG_PPC_CELL_NATIVE is not set 133# CONFIG_PPC_CELL_NATIVE is not set
129CONFIG_MPIC=y 134# CONFIG_UDBG_RTAS_CONSOLE is not set
130CONFIG_PPC_RTAS=y 135CONFIG_PPC_RTAS=y
131# CONFIG_RTAS_ERROR_LOGGING is not set 136# CONFIG_RTAS_ERROR_LOGGING is not set
132CONFIG_RTAS_PROC=y 137CONFIG_RTAS_PROC=y
@@ -136,6 +141,7 @@ CONFIG_PPC_MPC106=y
136# CONFIG_CPU_FREQ is not set 141# CONFIG_CPU_FREQ is not set
137# CONFIG_TAU is not set 142# CONFIG_TAU is not set
138# CONFIG_WANT_EARLY_SERIAL is not set 143# CONFIG_WANT_EARLY_SERIAL is not set
144CONFIG_MPIC=y
139 145
140# 146#
141# Kernel options 147# Kernel options
@@ -151,6 +157,7 @@ CONFIG_PREEMPT_NONE=y
151CONFIG_PREEMPT_BKL=y 157CONFIG_PREEMPT_BKL=y
152CONFIG_BINFMT_ELF=y 158CONFIG_BINFMT_ELF=y
153CONFIG_BINFMT_MISC=y 159CONFIG_BINFMT_MISC=y
160CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
154# CONFIG_KEXEC is not set 161# CONFIG_KEXEC is not set
155CONFIG_IRQ_ALL_CPUS=y 162CONFIG_IRQ_ALL_CPUS=y
156CONFIG_ARCH_FLATMEM_ENABLE=y 163CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -162,6 +169,7 @@ CONFIG_FLATMEM=y
162CONFIG_FLAT_NODE_MEM_MAP=y 169CONFIG_FLAT_NODE_MEM_MAP=y
163# CONFIG_SPARSEMEM_STATIC is not set 170# CONFIG_SPARSEMEM_STATIC is not set
164CONFIG_SPLIT_PTLOCK_CPUS=4 171CONFIG_SPLIT_PTLOCK_CPUS=4
172# CONFIG_RESOURCES_64BIT is not set
165CONFIG_PROC_DEVICETREE=y 173CONFIG_PROC_DEVICETREE=y
166# CONFIG_CMDLINE_BOOL is not set 174# CONFIG_CMDLINE_BOOL is not set
167# CONFIG_PM is not set 175# CONFIG_PM is not set
@@ -173,6 +181,7 @@ CONFIG_ISA_DMA_API=y
173# 181#
174CONFIG_ISA=y 182CONFIG_ISA=y
175CONFIG_GENERIC_ISA_DMA=y 183CONFIG_GENERIC_ISA_DMA=y
184# CONFIG_MPIC_WEIRD is not set
176CONFIG_PPC_I8259=y 185CONFIG_PPC_I8259=y
177CONFIG_PPC_INDIRECT_PCI=y 186CONFIG_PPC_INDIRECT_PCI=y
178CONFIG_PCI=y 187CONFIG_PCI=y
@@ -366,6 +375,7 @@ CONFIG_BLK_DEV_LOOP=y
366CONFIG_BLK_DEV_RAM=y 375CONFIG_BLK_DEV_RAM=y
367CONFIG_BLK_DEV_RAM_COUNT=16 376CONFIG_BLK_DEV_RAM_COUNT=16
368CONFIG_BLK_DEV_RAM_SIZE=4096 377CONFIG_BLK_DEV_RAM_SIZE=4096
378CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
369CONFIG_BLK_DEV_INITRD=y 379CONFIG_BLK_DEV_INITRD=y
370# CONFIG_CDROM_PKTCDVD is not set 380# CONFIG_CDROM_PKTCDVD is not set
371# CONFIG_ATA_OVER_ETH is not set 381# CONFIG_ATA_OVER_ETH is not set
@@ -622,6 +632,7 @@ CONFIG_8139TOO=y
622# CONFIG_TLAN is not set 632# CONFIG_TLAN is not set
623CONFIG_VIA_RHINE=y 633CONFIG_VIA_RHINE=y
624# CONFIG_VIA_RHINE_MMIO is not set 634# CONFIG_VIA_RHINE_MMIO is not set
635# CONFIG_VIA_RHINE_NAPI is not set
625 636
626# 637#
627# Ethernet (1000 Mbit) 638# Ethernet (1000 Mbit)
@@ -751,6 +762,7 @@ CONFIG_SERIO_LIBPS2=y
751CONFIG_VT=y 762CONFIG_VT=y
752CONFIG_VT_CONSOLE=y 763CONFIG_VT_CONSOLE=y
753CONFIG_HW_CONSOLE=y 764CONFIG_HW_CONSOLE=y
765# CONFIG_VT_HW_CONSOLE_BINDING is not set
754# CONFIG_SERIAL_NONSTANDARD is not set 766# CONFIG_SERIAL_NONSTANDARD is not set
755 767
756# 768#
@@ -783,6 +795,7 @@ CONFIG_LEGACY_PTY_COUNT=256
783# Watchdog Cards 795# Watchdog Cards
784# 796#
785# CONFIG_WATCHDOG is not set 797# CONFIG_WATCHDOG is not set
798# CONFIG_HW_RANDOM is not set
786CONFIG_NVRAM=y 799CONFIG_NVRAM=y
787CONFIG_GEN_RTC=y 800CONFIG_GEN_RTC=y
788# CONFIG_GEN_RTC_X is not set 801# CONFIG_GEN_RTC_X is not set
@@ -894,12 +907,12 @@ CONFIG_VIDEO_V4L2=y
894# 907#
895# Graphics support 908# Graphics support
896# 909#
910CONFIG_FIRMWARE_EDID=y
897CONFIG_FB=y 911CONFIG_FB=y
898CONFIG_FB_CFB_FILLRECT=y 912CONFIG_FB_CFB_FILLRECT=y
899CONFIG_FB_CFB_COPYAREA=y 913CONFIG_FB_CFB_COPYAREA=y
900CONFIG_FB_CFB_IMAGEBLIT=y 914CONFIG_FB_CFB_IMAGEBLIT=y
901CONFIG_FB_MACMODES=y 915CONFIG_FB_MACMODES=y
902CONFIG_FB_FIRMWARE_EDID=y
903# CONFIG_FB_BACKLIGHT is not set 916# CONFIG_FB_BACKLIGHT is not set
904CONFIG_FB_MODE_HELPERS=y 917CONFIG_FB_MODE_HELPERS=y
905CONFIG_FB_TILEBLITTING=y 918CONFIG_FB_TILEBLITTING=y
@@ -1079,7 +1092,7 @@ CONFIG_USB_MON=y
1079# CONFIG_USB_LEGOTOWER is not set 1092# CONFIG_USB_LEGOTOWER is not set
1080# CONFIG_USB_LCD is not set 1093# CONFIG_USB_LCD is not set
1081# CONFIG_USB_LED is not set 1094# CONFIG_USB_LED is not set
1082# CONFIG_USB_CY7C63 is not set 1095# CONFIG_USB_CYPRESS_CY7C63 is not set
1083# CONFIG_USB_CYTHERM is not set 1096# CONFIG_USB_CYTHERM is not set
1084# CONFIG_USB_PHIDGETKIT is not set 1097# CONFIG_USB_PHIDGETKIT is not set
1085# CONFIG_USB_PHIDGETSERVO is not set 1098# CONFIG_USB_PHIDGETSERVO is not set
@@ -1305,6 +1318,7 @@ CONFIG_ZLIB_INFLATE=m
1305CONFIG_ZLIB_DEFLATE=m 1318CONFIG_ZLIB_DEFLATE=m
1306CONFIG_TEXTSEARCH=y 1319CONFIG_TEXTSEARCH=y
1307CONFIG_TEXTSEARCH_KMP=m 1320CONFIG_TEXTSEARCH_KMP=m
1321CONFIG_PLIST=y
1308 1322
1309# 1323#
1310# Instrumentation Support 1324# Instrumentation Support
@@ -1316,14 +1330,19 @@ CONFIG_TEXTSEARCH_KMP=m
1316# 1330#
1317# CONFIG_PRINTK_TIME is not set 1331# CONFIG_PRINTK_TIME is not set
1318CONFIG_MAGIC_SYSRQ=y 1332CONFIG_MAGIC_SYSRQ=y
1333# CONFIG_UNUSED_SYMBOLS is not set
1319CONFIG_DEBUG_KERNEL=y 1334CONFIG_DEBUG_KERNEL=y
1320CONFIG_LOG_BUF_SHIFT=15 1335CONFIG_LOG_BUF_SHIFT=15
1321CONFIG_DETECT_SOFTLOCKUP=y 1336CONFIG_DETECT_SOFTLOCKUP=y
1322# CONFIG_SCHEDSTATS is not set 1337# CONFIG_SCHEDSTATS is not set
1323# CONFIG_DEBUG_SLAB is not set 1338# CONFIG_DEBUG_SLAB is not set
1324CONFIG_DEBUG_MUTEXES=y 1339# CONFIG_DEBUG_RT_MUTEXES is not set
1340# CONFIG_RT_MUTEX_TESTER is not set
1325# CONFIG_DEBUG_SPINLOCK is not set 1341# CONFIG_DEBUG_SPINLOCK is not set
1342CONFIG_DEBUG_MUTEXES=y
1343# CONFIG_DEBUG_RWSEMS is not set
1326CONFIG_DEBUG_SPINLOCK_SLEEP=y 1344CONFIG_DEBUG_SPINLOCK_SLEEP=y
1345# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1327# CONFIG_DEBUG_KOBJECT is not set 1346# CONFIG_DEBUG_KOBJECT is not set
1328# CONFIG_DEBUG_HIGHMEM is not set 1347# CONFIG_DEBUG_HIGHMEM is not set
1329# CONFIG_DEBUG_INFO is not set 1348# CONFIG_DEBUG_INFO is not set
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
index 8c6bd17c6929..4b9c2ed925f5 100644
--- a/arch/powerpc/configs/g5_defconfig
+++ b/arch/powerpc/configs/g5_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc3 3# Linux kernel version: 2.6.18-rc6
4# Tue Aug 8 09:12:29 2006 4# Sun Sep 10 10:22:55 2006
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -126,7 +126,6 @@ CONFIG_PPC_PMAC64=y
126# CONFIG_PPC_IBM_CELL_BLADE is not set 126# CONFIG_PPC_IBM_CELL_BLADE is not set
127# CONFIG_UDBG_RTAS_CONSOLE is not set 127# CONFIG_UDBG_RTAS_CONSOLE is not set
128CONFIG_U3_DART=y 128CONFIG_U3_DART=y
129CONFIG_MPIC=y
130# CONFIG_PPC_RTAS is not set 129# CONFIG_PPC_RTAS is not set
131# CONFIG_MMIO_NVRAM is not set 130# CONFIG_MMIO_NVRAM is not set
132CONFIG_MPIC_BROKEN_U3=y 131CONFIG_MPIC_BROKEN_U3=y
@@ -146,6 +145,7 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y
146# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set 145# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
147CONFIG_CPU_FREQ_PMAC64=y 146CONFIG_CPU_FREQ_PMAC64=y
148# CONFIG_WANT_EARLY_SERIAL is not set 147# CONFIG_WANT_EARLY_SERIAL is not set
148CONFIG_MPIC=y
149 149
150# 150#
151# Kernel options 151# Kernel options
@@ -192,6 +192,7 @@ CONFIG_ISA_DMA_API=y
192# Bus options 192# Bus options
193# 193#
194CONFIG_GENERIC_ISA_DMA=y 194CONFIG_GENERIC_ISA_DMA=y
195# CONFIG_MPIC_WEIRD is not set
195# CONFIG_PPC_I8259 is not set 196# CONFIG_PPC_I8259 is not set
196# CONFIG_PPC_INDIRECT_PCI is not set 197# CONFIG_PPC_INDIRECT_PCI is not set
197CONFIG_PCI=y 198CONFIG_PCI=y
@@ -772,7 +773,6 @@ CONFIG_HW_CONSOLE=y
772CONFIG_UNIX98_PTYS=y 773CONFIG_UNIX98_PTYS=y
773CONFIG_LEGACY_PTYS=y 774CONFIG_LEGACY_PTYS=y
774CONFIG_LEGACY_PTY_COUNT=256 775CONFIG_LEGACY_PTY_COUNT=256
775# CONFIG_BRIQ_PANEL is not set
776 776
777# 777#
778# IPMI 778# IPMI
@@ -1195,7 +1195,6 @@ CONFIG_USB_MON=y
1195CONFIG_USB_SERIAL=m 1195CONFIG_USB_SERIAL=m
1196CONFIG_USB_SERIAL_GENERIC=y 1196CONFIG_USB_SERIAL_GENERIC=y
1197# CONFIG_USB_SERIAL_AIRPRIME is not set 1197# CONFIG_USB_SERIAL_AIRPRIME is not set
1198# CONFIG_USB_SERIAL_ANYDATA is not set
1199# CONFIG_USB_SERIAL_ARK3116 is not set 1198# CONFIG_USB_SERIAL_ARK3116 is not set
1200CONFIG_USB_SERIAL_BELKIN=m 1199CONFIG_USB_SERIAL_BELKIN=m
1201# CONFIG_USB_SERIAL_WHITEHEAT is not set 1200# CONFIG_USB_SERIAL_WHITEHEAT is not set
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig
index 72ed95b3ead6..eb0885ea0731 100644
--- a/arch/powerpc/configs/iseries_defconfig
+++ b/arch/powerpc/configs/iseries_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc3 3# Linux kernel version: 2.6.18-rc6
4# Tue Aug 8 09:15:46 2006 4# Sun Sep 10 10:22:57 2006
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -129,6 +129,7 @@ CONFIG_IBMVIO=y
129# CONFIG_PPC_970_NAP is not set 129# CONFIG_PPC_970_NAP is not set
130# CONFIG_CPU_FREQ is not set 130# CONFIG_CPU_FREQ is not set
131# CONFIG_WANT_EARLY_SERIAL is not set 131# CONFIG_WANT_EARLY_SERIAL is not set
132# CONFIG_MPIC is not set
132 133
133# 134#
134# Kernel options 135# Kernel options
@@ -172,6 +173,7 @@ CONFIG_ISA_DMA_API=y
172# Bus options 173# Bus options
173# 174#
174CONFIG_GENERIC_ISA_DMA=y 175CONFIG_GENERIC_ISA_DMA=y
176# CONFIG_MPIC_WEIRD is not set
175# CONFIG_PPC_I8259 is not set 177# CONFIG_PPC_I8259 is not set
176# CONFIG_PPC_INDIRECT_PCI is not set 178# CONFIG_PPC_INDIRECT_PCI is not set
177CONFIG_PCI=y 179CONFIG_PCI=y
@@ -716,7 +718,6 @@ CONFIG_SERIAL_ICOM=m
716CONFIG_UNIX98_PTYS=y 718CONFIG_UNIX98_PTYS=y
717CONFIG_LEGACY_PTYS=y 719CONFIG_LEGACY_PTYS=y
718CONFIG_LEGACY_PTY_COUNT=256 720CONFIG_LEGACY_PTY_COUNT=256
719# CONFIG_BRIQ_PANEL is not set
720 721
721# 722#
722# IPMI 723# IPMI
diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig
index 80a0db43aeb7..2860be106f4f 100644
--- a/arch/powerpc/configs/maple_defconfig
+++ b/arch/powerpc/configs/maple_defconfig
@@ -1,15 +1,18 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.16-rc6 3# Linux kernel version: 2.6.18-rc6
4# Wed Mar 15 16:19:54 2006 4# Sun Sep 10 10:24:55 2006
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
8CONFIG_PPC_MERGE=y 8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
11CONFIG_RWSEM_XCHGADD_ALGORITHM=y 12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_GENERIC_HWEIGHT=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y 14CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y
13CONFIG_PPC=y 16CONFIG_PPC=y
14CONFIG_EARLY_PRINTK=y 17CONFIG_EARLY_PRINTK=y
15CONFIG_COMPAT=y 18CONFIG_COMPAT=y
@@ -29,8 +32,10 @@ CONFIG_POWER4=y
29CONFIG_PPC_FPU=y 32CONFIG_PPC_FPU=y
30# CONFIG_ALTIVEC is not set 33# CONFIG_ALTIVEC is not set
31CONFIG_PPC_STD_MMU=y 34CONFIG_PPC_STD_MMU=y
35CONFIG_VIRT_CPU_ACCOUNTING=y
32CONFIG_SMP=y 36CONFIG_SMP=y
33CONFIG_NR_CPUS=2 37CONFIG_NR_CPUS=2
38CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34 39
35# 40#
36# Code maturity level options 41# Code maturity level options
@@ -48,11 +53,13 @@ CONFIG_SWAP=y
48CONFIG_SYSVIPC=y 53CONFIG_SYSVIPC=y
49CONFIG_POSIX_MQUEUE=y 54CONFIG_POSIX_MQUEUE=y
50# CONFIG_BSD_PROCESS_ACCT is not set 55# CONFIG_BSD_PROCESS_ACCT is not set
56# CONFIG_TASKSTATS is not set
51CONFIG_SYSCTL=y 57CONFIG_SYSCTL=y
52# CONFIG_AUDIT is not set 58# CONFIG_AUDIT is not set
53CONFIG_IKCONFIG=y 59CONFIG_IKCONFIG=y
54CONFIG_IKCONFIG_PROC=y 60CONFIG_IKCONFIG_PROC=y
55# CONFIG_CPUSETS is not set 61# CONFIG_CPUSETS is not set
62# CONFIG_RELAY is not set
56CONFIG_INITRAMFS_SOURCE="" 63CONFIG_INITRAMFS_SOURCE=""
57CONFIG_CC_OPTIMIZE_FOR_SIZE=y 64CONFIG_CC_OPTIMIZE_FOR_SIZE=y
58# CONFIG_EMBEDDED is not set 65# CONFIG_EMBEDDED is not set
@@ -64,14 +71,12 @@ CONFIG_PRINTK=y
64CONFIG_BUG=y 71CONFIG_BUG=y
65CONFIG_ELF_CORE=y 72CONFIG_ELF_CORE=y
66CONFIG_BASE_FULL=y 73CONFIG_BASE_FULL=y
74CONFIG_RT_MUTEXES=y
67CONFIG_FUTEX=y 75CONFIG_FUTEX=y
68CONFIG_EPOLL=y 76CONFIG_EPOLL=y
69CONFIG_SHMEM=y 77CONFIG_SHMEM=y
70CONFIG_CC_ALIGN_FUNCTIONS=0
71CONFIG_CC_ALIGN_LABELS=0
72CONFIG_CC_ALIGN_LOOPS=0
73CONFIG_CC_ALIGN_JUMPS=0
74CONFIG_SLAB=y 78CONFIG_SLAB=y
79CONFIG_VM_EVENT_COUNTERS=y
75# CONFIG_TINY_SHMEM is not set 80# CONFIG_TINY_SHMEM is not set
76CONFIG_BASE_SMALL=0 81CONFIG_BASE_SMALL=0
77# CONFIG_SLOB is not set 82# CONFIG_SLOB is not set
@@ -82,7 +87,6 @@ CONFIG_BASE_SMALL=0
82CONFIG_MODULES=y 87CONFIG_MODULES=y
83CONFIG_MODULE_UNLOAD=y 88CONFIG_MODULE_UNLOAD=y
84# CONFIG_MODULE_FORCE_UNLOAD is not set 89# CONFIG_MODULE_FORCE_UNLOAD is not set
85CONFIG_OBSOLETE_MODPARM=y
86CONFIG_MODVERSIONS=y 90CONFIG_MODVERSIONS=y
87CONFIG_MODULE_SRCVERSION_ALL=y 91CONFIG_MODULE_SRCVERSION_ALL=y
88CONFIG_KMOD=y 92CONFIG_KMOD=y
@@ -91,6 +95,7 @@ CONFIG_STOP_MACHINE=y
91# 95#
92# Block layer 96# Block layer
93# 97#
98# CONFIG_BLK_DEV_IO_TRACE is not set
94 99
95# 100#
96# IO Schedulers 101# IO Schedulers
@@ -116,14 +121,18 @@ CONFIG_PPC_MULTIPLATFORM=y
116# CONFIG_PPC_PMAC is not set 121# CONFIG_PPC_PMAC is not set
117CONFIG_PPC_MAPLE=y 122CONFIG_PPC_MAPLE=y
118# CONFIG_PPC_CELL is not set 123# CONFIG_PPC_CELL is not set
124# CONFIG_PPC_CELL_NATIVE is not set
125# CONFIG_PPC_IBM_CELL_BLADE is not set
126# CONFIG_UDBG_RTAS_CONSOLE is not set
119CONFIG_U3_DART=y 127CONFIG_U3_DART=y
120CONFIG_MPIC=y
121# CONFIG_PPC_RTAS is not set 128# CONFIG_PPC_RTAS is not set
122# CONFIG_MMIO_NVRAM is not set 129# CONFIG_MMIO_NVRAM is not set
123CONFIG_MPIC_BROKEN_U3=y 130CONFIG_MPIC_BROKEN_U3=y
124# CONFIG_PPC_MPC106 is not set 131# CONFIG_PPC_MPC106 is not set
132CONFIG_PPC_970_NAP=y
125# CONFIG_CPU_FREQ is not set 133# CONFIG_CPU_FREQ is not set
126# CONFIG_WANT_EARLY_SERIAL is not set 134# CONFIG_WANT_EARLY_SERIAL is not set
135CONFIG_MPIC=y
127 136
128# 137#
129# Kernel options 138# Kernel options
@@ -140,6 +149,7 @@ CONFIG_BINFMT_ELF=y
140# CONFIG_BINFMT_MISC is not set 149# CONFIG_BINFMT_MISC is not set
141CONFIG_FORCE_MAX_ZONEORDER=13 150CONFIG_FORCE_MAX_ZONEORDER=13
142CONFIG_IOMMU_VMERGE=y 151CONFIG_IOMMU_VMERGE=y
152CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
143CONFIG_KEXEC=y 153CONFIG_KEXEC=y
144# CONFIG_CRASH_DUMP is not set 154# CONFIG_CRASH_DUMP is not set
145CONFIG_IRQ_ALL_CPUS=y 155CONFIG_IRQ_ALL_CPUS=y
@@ -155,6 +165,7 @@ CONFIG_FLATMEM=y
155CONFIG_FLAT_NODE_MEM_MAP=y 165CONFIG_FLAT_NODE_MEM_MAP=y
156# CONFIG_SPARSEMEM_STATIC is not set 166# CONFIG_SPARSEMEM_STATIC is not set
157CONFIG_SPLIT_PTLOCK_CPUS=4 167CONFIG_SPLIT_PTLOCK_CPUS=4
168CONFIG_RESOURCES_64BIT=y
158# CONFIG_PPC_64K_PAGES is not set 169# CONFIG_PPC_64K_PAGES is not set
159# CONFIG_SCHED_SMT is not set 170# CONFIG_SCHED_SMT is not set
160CONFIG_PROC_DEVICETREE=y 171CONFIG_PROC_DEVICETREE=y
@@ -167,11 +178,12 @@ CONFIG_ISA_DMA_API=y
167# Bus options 178# Bus options
168# 179#
169CONFIG_GENERIC_ISA_DMA=y 180CONFIG_GENERIC_ISA_DMA=y
181# CONFIG_MPIC_WEIRD is not set
170# CONFIG_PPC_I8259 is not set 182# CONFIG_PPC_I8259 is not set
171# CONFIG_PPC_INDIRECT_PCI is not set 183# CONFIG_PPC_INDIRECT_PCI is not set
172CONFIG_PCI=y 184CONFIG_PCI=y
173CONFIG_PCI_DOMAINS=y 185CONFIG_PCI_DOMAINS=y
174CONFIG_PCI_LEGACY_PROC=y 186# CONFIG_PCIEPORTBUS is not set
175# CONFIG_PCI_DEBUG is not set 187# CONFIG_PCI_DEBUG is not set
176 188
177# 189#
@@ -197,6 +209,8 @@ CONFIG_NET=y
197CONFIG_PACKET=y 209CONFIG_PACKET=y
198CONFIG_PACKET_MMAP=y 210CONFIG_PACKET_MMAP=y
199CONFIG_UNIX=y 211CONFIG_UNIX=y
212CONFIG_XFRM=y
213CONFIG_XFRM_USER=m
200# CONFIG_NET_KEY is not set 214# CONFIG_NET_KEY is not set
201CONFIG_INET=y 215CONFIG_INET=y
202CONFIG_IP_MULTICAST=y 216CONFIG_IP_MULTICAST=y
@@ -214,12 +228,18 @@ CONFIG_IP_PNP_DHCP=y
214# CONFIG_INET_AH is not set 228# CONFIG_INET_AH is not set
215# CONFIG_INET_ESP is not set 229# CONFIG_INET_ESP is not set
216# CONFIG_INET_IPCOMP is not set 230# CONFIG_INET_IPCOMP is not set
231# CONFIG_INET_XFRM_TUNNEL is not set
217# CONFIG_INET_TUNNEL is not set 232# CONFIG_INET_TUNNEL is not set
233CONFIG_INET_XFRM_MODE_TRANSPORT=y
234CONFIG_INET_XFRM_MODE_TUNNEL=y
218CONFIG_INET_DIAG=y 235CONFIG_INET_DIAG=y
219CONFIG_INET_TCP_DIAG=y 236CONFIG_INET_TCP_DIAG=y
220# CONFIG_TCP_CONG_ADVANCED is not set 237# CONFIG_TCP_CONG_ADVANCED is not set
221CONFIG_TCP_CONG_BIC=y 238CONFIG_TCP_CONG_BIC=y
222# CONFIG_IPV6 is not set 239# CONFIG_IPV6 is not set
240# CONFIG_INET6_XFRM_TUNNEL is not set
241# CONFIG_INET6_TUNNEL is not set
242# CONFIG_NETWORK_SECMARK is not set
223# CONFIG_NETFILTER is not set 243# CONFIG_NETFILTER is not set
224 244
225# 245#
@@ -274,6 +294,7 @@ CONFIG_STANDALONE=y
274CONFIG_PREVENT_FIRMWARE_BUILD=y 294CONFIG_PREVENT_FIRMWARE_BUILD=y
275# CONFIG_FW_LOADER is not set 295# CONFIG_FW_LOADER is not set
276# CONFIG_DEBUG_DRIVER is not set 296# CONFIG_DEBUG_DRIVER is not set
297# CONFIG_SYS_HYPERVISOR is not set
277 298
278# 299#
279# Connector - unified userspace <-> kernelspace linker 300# Connector - unified userspace <-> kernelspace linker
@@ -310,6 +331,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
310CONFIG_BLK_DEV_RAM=y 331CONFIG_BLK_DEV_RAM=y
311CONFIG_BLK_DEV_RAM_COUNT=16 332CONFIG_BLK_DEV_RAM_COUNT=16
312CONFIG_BLK_DEV_RAM_SIZE=8192 333CONFIG_BLK_DEV_RAM_SIZE=8192
334CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
313# CONFIG_BLK_DEV_INITRD is not set 335# CONFIG_BLK_DEV_INITRD is not set
314# CONFIG_CDROM_PKTCDVD is not set 336# CONFIG_CDROM_PKTCDVD is not set
315# CONFIG_ATA_OVER_ETH is not set 337# CONFIG_ATA_OVER_ETH is not set
@@ -484,6 +506,7 @@ CONFIG_E1000=y
484# CONFIG_CHELSIO_T1 is not set 506# CONFIG_CHELSIO_T1 is not set
485# CONFIG_IXGB is not set 507# CONFIG_IXGB is not set
486# CONFIG_S2IO is not set 508# CONFIG_S2IO is not set
509# CONFIG_MYRI10GE is not set
487 510
488# 511#
489# Token Ring devices 512# Token Ring devices
@@ -556,6 +579,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1200
556CONFIG_VT=y 579CONFIG_VT=y
557CONFIG_VT_CONSOLE=y 580CONFIG_VT_CONSOLE=y
558CONFIG_HW_CONSOLE=y 581CONFIG_HW_CONSOLE=y
582# CONFIG_VT_HW_CONSOLE_BINDING is not set
559# CONFIG_SERIAL_NONSTANDARD is not set 583# CONFIG_SERIAL_NONSTANDARD is not set
560 584
561# 585#
@@ -563,6 +587,7 @@ CONFIG_HW_CONSOLE=y
563# 587#
564CONFIG_SERIAL_8250=y 588CONFIG_SERIAL_8250=y
565CONFIG_SERIAL_8250_CONSOLE=y 589CONFIG_SERIAL_8250_CONSOLE=y
590CONFIG_SERIAL_8250_PCI=y
566CONFIG_SERIAL_8250_NR_UARTS=4 591CONFIG_SERIAL_8250_NR_UARTS=4
567CONFIG_SERIAL_8250_RUNTIME_UARTS=4 592CONFIG_SERIAL_8250_RUNTIME_UARTS=4
568# CONFIG_SERIAL_8250_EXTENDED is not set 593# CONFIG_SERIAL_8250_EXTENDED is not set
@@ -586,7 +611,7 @@ CONFIG_LEGACY_PTY_COUNT=256
586# Watchdog Cards 611# Watchdog Cards
587# 612#
588# CONFIG_WATCHDOG is not set 613# CONFIG_WATCHDOG is not set
589# CONFIG_RTC is not set 614# CONFIG_HW_RANDOM is not set
590CONFIG_GEN_RTC=y 615CONFIG_GEN_RTC=y
591# CONFIG_GEN_RTC_X is not set 616# CONFIG_GEN_RTC_X is not set
592# CONFIG_DTLK is not set 617# CONFIG_DTLK is not set
@@ -632,10 +657,10 @@ CONFIG_I2C_AMD8111=y
632# CONFIG_I2C_I810 is not set 657# CONFIG_I2C_I810 is not set
633# CONFIG_I2C_PIIX4 is not set 658# CONFIG_I2C_PIIX4 is not set
634# CONFIG_I2C_NFORCE2 is not set 659# CONFIG_I2C_NFORCE2 is not set
660# CONFIG_I2C_OCORES is not set
635# CONFIG_I2C_PARPORT_LIGHT is not set 661# CONFIG_I2C_PARPORT_LIGHT is not set
636# CONFIG_I2C_PROSAVAGE is not set 662# CONFIG_I2C_PROSAVAGE is not set
637# CONFIG_I2C_SAVAGE4 is not set 663# CONFIG_I2C_SAVAGE4 is not set
638# CONFIG_SCx200_ACB is not set
639# CONFIG_I2C_SIS5595 is not set 664# CONFIG_I2C_SIS5595 is not set
640# CONFIG_I2C_SIS630 is not set 665# CONFIG_I2C_SIS630 is not set
641# CONFIG_I2C_SIS96X is not set 666# CONFIG_I2C_SIS96X is not set
@@ -654,9 +679,7 @@ CONFIG_I2C_AMD8111=y
654# CONFIG_SENSORS_PCF8574 is not set 679# CONFIG_SENSORS_PCF8574 is not set
655# CONFIG_SENSORS_PCA9539 is not set 680# CONFIG_SENSORS_PCA9539 is not set
656# CONFIG_SENSORS_PCF8591 is not set 681# CONFIG_SENSORS_PCF8591 is not set
657# CONFIG_SENSORS_RTC8564 is not set
658# CONFIG_SENSORS_MAX6875 is not set 682# CONFIG_SENSORS_MAX6875 is not set
659# CONFIG_RTC_X1205_I2C is not set
660# CONFIG_I2C_DEBUG_CORE is not set 683# CONFIG_I2C_DEBUG_CORE is not set
661# CONFIG_I2C_DEBUG_ALGO is not set 684# CONFIG_I2C_DEBUG_ALGO is not set
662# CONFIG_I2C_DEBUG_BUS is not set 685# CONFIG_I2C_DEBUG_BUS is not set
@@ -671,7 +694,6 @@ CONFIG_I2C_AMD8111=y
671# 694#
672# Dallas's 1-wire bus 695# Dallas's 1-wire bus
673# 696#
674# CONFIG_W1 is not set
675 697
676# 698#
677# Hardware Monitoring support 699# Hardware Monitoring support
@@ -684,22 +706,21 @@ CONFIG_I2C_AMD8111=y
684# 706#
685 707
686# 708#
687# Multimedia Capabilities Port drivers
688#
689
690#
691# Multimedia devices 709# Multimedia devices
692# 710#
693# CONFIG_VIDEO_DEV is not set 711# CONFIG_VIDEO_DEV is not set
712CONFIG_VIDEO_V4L2=y
694 713
695# 714#
696# Digital Video Broadcasting Devices 715# Digital Video Broadcasting Devices
697# 716#
698# CONFIG_DVB is not set 717# CONFIG_DVB is not set
718# CONFIG_USB_DABUSB is not set
699 719
700# 720#
701# Graphics support 721# Graphics support
702# 722#
723CONFIG_FIRMWARE_EDID=y
703# CONFIG_FB is not set 724# CONFIG_FB is not set
704 725
705# 726#
@@ -707,6 +728,7 @@ CONFIG_I2C_AMD8111=y
707# 728#
708# CONFIG_VGA_CONSOLE is not set 729# CONFIG_VGA_CONSOLE is not set
709CONFIG_DUMMY_CONSOLE=y 730CONFIG_DUMMY_CONSOLE=y
731# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
710 732
711# 733#
712# Sound 734# Sound
@@ -718,6 +740,7 @@ CONFIG_DUMMY_CONSOLE=y
718# 740#
719CONFIG_USB_ARCH_HAS_HCD=y 741CONFIG_USB_ARCH_HAS_HCD=y
720CONFIG_USB_ARCH_HAS_OHCI=y 742CONFIG_USB_ARCH_HAS_OHCI=y
743CONFIG_USB_ARCH_HAS_EHCI=y
721CONFIG_USB=y 744CONFIG_USB=y
722# CONFIG_USB_DEBUG is not set 745# CONFIG_USB_DEBUG is not set
723 746
@@ -735,6 +758,7 @@ CONFIG_USB_DEVICEFS=y
735CONFIG_USB_EHCI_HCD=y 758CONFIG_USB_EHCI_HCD=y
736CONFIG_USB_EHCI_SPLIT_ISO=y 759CONFIG_USB_EHCI_SPLIT_ISO=y
737CONFIG_USB_EHCI_ROOT_HUB_TT=y 760CONFIG_USB_EHCI_ROOT_HUB_TT=y
761# CONFIG_USB_EHCI_TT_NEWSCHED is not set
738# CONFIG_USB_ISP116X_HCD is not set 762# CONFIG_USB_ISP116X_HCD is not set
739CONFIG_USB_OHCI_HCD=y 763CONFIG_USB_OHCI_HCD=y
740# CONFIG_USB_OHCI_BIG_ENDIAN is not set 764# CONFIG_USB_OHCI_BIG_ENDIAN is not set
@@ -771,9 +795,7 @@ CONFIG_USB_HIDINPUT=y
771# CONFIG_USB_ACECAD is not set 795# CONFIG_USB_ACECAD is not set
772# CONFIG_USB_KBTAB is not set 796# CONFIG_USB_KBTAB is not set
773# CONFIG_USB_POWERMATE is not set 797# CONFIG_USB_POWERMATE is not set
774# CONFIG_USB_MTOUCH is not set 798# CONFIG_USB_TOUCHSCREEN is not set
775# CONFIG_USB_ITMTOUCH is not set
776# CONFIG_USB_EGALAX is not set
777# CONFIG_USB_YEALINK is not set 799# CONFIG_USB_YEALINK is not set
778# CONFIG_USB_XPAD is not set 800# CONFIG_USB_XPAD is not set
779# CONFIG_USB_ATI_REMOTE is not set 801# CONFIG_USB_ATI_REMOTE is not set
@@ -787,15 +809,6 @@ CONFIG_USB_HIDINPUT=y
787# CONFIG_USB_MDC800 is not set 809# CONFIG_USB_MDC800 is not set
788 810
789# 811#
790# USB Multimedia devices
791#
792# CONFIG_USB_DABUSB is not set
793
794#
795# Video4Linux support is needed for USB Multimedia device support
796#
797
798#
799# USB Network Adapters 812# USB Network Adapters
800# 813#
801# CONFIG_USB_CATC is not set 814# CONFIG_USB_CATC is not set
@@ -816,7 +829,7 @@ CONFIG_USB_SERIAL=y
816# CONFIG_USB_SERIAL_CONSOLE is not set 829# CONFIG_USB_SERIAL_CONSOLE is not set
817CONFIG_USB_SERIAL_GENERIC=y 830CONFIG_USB_SERIAL_GENERIC=y
818# CONFIG_USB_SERIAL_AIRPRIME is not set 831# CONFIG_USB_SERIAL_AIRPRIME is not set
819# CONFIG_USB_SERIAL_ANYDATA is not set 832# CONFIG_USB_SERIAL_ARK3116 is not set
820# CONFIG_USB_SERIAL_BELKIN is not set 833# CONFIG_USB_SERIAL_BELKIN is not set
821# CONFIG_USB_SERIAL_WHITEHEAT is not set 834# CONFIG_USB_SERIAL_WHITEHEAT is not set
822# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set 835# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
@@ -824,6 +837,7 @@ CONFIG_USB_SERIAL_GENERIC=y
824CONFIG_USB_SERIAL_CYPRESS_M8=m 837CONFIG_USB_SERIAL_CYPRESS_M8=m
825# CONFIG_USB_SERIAL_EMPEG is not set 838# CONFIG_USB_SERIAL_EMPEG is not set
826# CONFIG_USB_SERIAL_FTDI_SIO is not set 839# CONFIG_USB_SERIAL_FTDI_SIO is not set
840# CONFIG_USB_SERIAL_FUNSOFT is not set
827# CONFIG_USB_SERIAL_VISOR is not set 841# CONFIG_USB_SERIAL_VISOR is not set
828# CONFIG_USB_SERIAL_IPAQ is not set 842# CONFIG_USB_SERIAL_IPAQ is not set
829# CONFIG_USB_SERIAL_IR is not set 843# CONFIG_USB_SERIAL_IR is not set
@@ -848,12 +862,15 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
848# CONFIG_USB_SERIAL_KLSI is not set 862# CONFIG_USB_SERIAL_KLSI is not set
849# CONFIG_USB_SERIAL_KOBIL_SCT is not set 863# CONFIG_USB_SERIAL_KOBIL_SCT is not set
850# CONFIG_USB_SERIAL_MCT_U232 is not set 864# CONFIG_USB_SERIAL_MCT_U232 is not set
865# CONFIG_USB_SERIAL_NAVMAN is not set
851# CONFIG_USB_SERIAL_PL2303 is not set 866# CONFIG_USB_SERIAL_PL2303 is not set
852# CONFIG_USB_SERIAL_HP4X is not set 867# CONFIG_USB_SERIAL_HP4X is not set
853# CONFIG_USB_SERIAL_SAFE is not set 868# CONFIG_USB_SERIAL_SAFE is not set
869# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
854CONFIG_USB_SERIAL_TI=m 870CONFIG_USB_SERIAL_TI=m
855# CONFIG_USB_SERIAL_CYBERJACK is not set 871# CONFIG_USB_SERIAL_CYBERJACK is not set
856# CONFIG_USB_SERIAL_XIRCOM is not set 872# CONFIG_USB_SERIAL_XIRCOM is not set
873# CONFIG_USB_SERIAL_OPTION is not set
857# CONFIG_USB_SERIAL_OMNINET is not set 874# CONFIG_USB_SERIAL_OMNINET is not set
858CONFIG_USB_EZUSB=y 875CONFIG_USB_EZUSB=y
859 876
@@ -867,10 +884,12 @@ CONFIG_USB_EZUSB=y
867# CONFIG_USB_LEGOTOWER is not set 884# CONFIG_USB_LEGOTOWER is not set
868# CONFIG_USB_LCD is not set 885# CONFIG_USB_LCD is not set
869# CONFIG_USB_LED is not set 886# CONFIG_USB_LED is not set
887# CONFIG_USB_CYPRESS_CY7C63 is not set
870# CONFIG_USB_CYTHERM is not set 888# CONFIG_USB_CYTHERM is not set
871# CONFIG_USB_PHIDGETKIT is not set 889# CONFIG_USB_PHIDGETKIT is not set
872# CONFIG_USB_PHIDGETSERVO is not set 890# CONFIG_USB_PHIDGETSERVO is not set
873# CONFIG_USB_IDMOUSE is not set 891# CONFIG_USB_IDMOUSE is not set
892# CONFIG_USB_APPLEDISPLAY is not set
874# CONFIG_USB_SISUSBVGA is not set 893# CONFIG_USB_SISUSBVGA is not set
875# CONFIG_USB_LD is not set 894# CONFIG_USB_LD is not set
876# CONFIG_USB_TEST is not set 895# CONFIG_USB_TEST is not set
@@ -890,6 +909,19 @@ CONFIG_USB_EZUSB=y
890# CONFIG_MMC is not set 909# CONFIG_MMC is not set
891 910
892# 911#
912# LED devices
913#
914# CONFIG_NEW_LEDS is not set
915
916#
917# LED drivers
918#
919
920#
921# LED Triggers
922#
923
924#
893# InfiniBand support 925# InfiniBand support
894# 926#
895# CONFIG_INFINIBAND is not set 927# CONFIG_INFINIBAND is not set
@@ -899,6 +931,24 @@ CONFIG_USB_EZUSB=y
899# 931#
900 932
901# 933#
934# Real Time Clock
935#
936# CONFIG_RTC_CLASS is not set
937
938#
939# DMA Engine support
940#
941# CONFIG_DMA_ENGINE is not set
942
943#
944# DMA Clients
945#
946
947#
948# DMA Devices
949#
950
951#
902# File systems 952# File systems
903# 953#
904CONFIG_EXT2_FS=y 954CONFIG_EXT2_FS=y
@@ -917,6 +967,7 @@ CONFIG_FS_POSIX_ACL=y
917# CONFIG_MINIX_FS is not set 967# CONFIG_MINIX_FS is not set
918# CONFIG_ROMFS_FS is not set 968# CONFIG_ROMFS_FS is not set
919CONFIG_INOTIFY=y 969CONFIG_INOTIFY=y
970CONFIG_INOTIFY_USER=y
920# CONFIG_QUOTA is not set 971# CONFIG_QUOTA is not set
921CONFIG_DNOTIFY=y 972CONFIG_DNOTIFY=y
922# CONFIG_AUTOFS_FS is not set 973# CONFIG_AUTOFS_FS is not set
@@ -949,7 +1000,6 @@ CONFIG_TMPFS=y
949CONFIG_HUGETLBFS=y 1000CONFIG_HUGETLBFS=y
950CONFIG_HUGETLB_PAGE=y 1001CONFIG_HUGETLB_PAGE=y
951CONFIG_RAMFS=y 1002CONFIG_RAMFS=y
952# CONFIG_RELAYFS_FS is not set
953# CONFIG_CONFIGFS_FS is not set 1003# CONFIG_CONFIGFS_FS is not set
954 1004
955# 1005#
@@ -1067,6 +1117,7 @@ CONFIG_CRC_CCITT=y
1067CONFIG_CRC32=y 1117CONFIG_CRC32=y
1068# CONFIG_LIBCRC32C is not set 1118# CONFIG_LIBCRC32C is not set
1069CONFIG_ZLIB_INFLATE=y 1119CONFIG_ZLIB_INFLATE=y
1120CONFIG_PLIST=y
1070 1121
1071# 1122#
1072# Instrumentation Support 1123# Instrumentation Support
@@ -1079,14 +1130,20 @@ CONFIG_ZLIB_INFLATE=y
1079# 1130#
1080# CONFIG_PRINTK_TIME is not set 1131# CONFIG_PRINTK_TIME is not set
1081CONFIG_MAGIC_SYSRQ=y 1132CONFIG_MAGIC_SYSRQ=y
1133# CONFIG_UNUSED_SYMBOLS is not set
1082CONFIG_DEBUG_KERNEL=y 1134CONFIG_DEBUG_KERNEL=y
1083CONFIG_LOG_BUF_SHIFT=17 1135CONFIG_LOG_BUF_SHIFT=17
1084CONFIG_DETECT_SOFTLOCKUP=y 1136CONFIG_DETECT_SOFTLOCKUP=y
1085# CONFIG_SCHEDSTATS is not set 1137# CONFIG_SCHEDSTATS is not set
1086CONFIG_DEBUG_SLAB=y 1138CONFIG_DEBUG_SLAB=y
1087# CONFIG_DEBUG_MUTEXES is not set 1139# CONFIG_DEBUG_SLAB_LEAK is not set
1140# CONFIG_DEBUG_RT_MUTEXES is not set
1141# CONFIG_RT_MUTEX_TESTER is not set
1088# CONFIG_DEBUG_SPINLOCK is not set 1142# CONFIG_DEBUG_SPINLOCK is not set
1143# CONFIG_DEBUG_MUTEXES is not set
1144# CONFIG_DEBUG_RWSEMS is not set
1089CONFIG_DEBUG_SPINLOCK_SLEEP=y 1145CONFIG_DEBUG_SPINLOCK_SLEEP=y
1146# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1090# CONFIG_DEBUG_KOBJECT is not set 1147# CONFIG_DEBUG_KOBJECT is not set
1091# CONFIG_DEBUG_INFO is not set 1148# CONFIG_DEBUG_INFO is not set
1092CONFIG_DEBUG_FS=y 1149CONFIG_DEBUG_FS=y
@@ -1100,11 +1157,7 @@ CONFIG_XMON=y
1100CONFIG_XMON_DEFAULT=y 1157CONFIG_XMON_DEFAULT=y
1101# CONFIG_IRQSTACKS is not set 1158# CONFIG_IRQSTACKS is not set
1102CONFIG_BOOTX_TEXT=y 1159CONFIG_BOOTX_TEXT=y
1103# CONFIG_PPC_EARLY_DEBUG_LPAR is not set 1160# CONFIG_PPC_EARLY_DEBUG is not set
1104# CONFIG_PPC_EARLY_DEBUG_G5 is not set
1105# CONFIG_PPC_EARLY_DEBUG_RTAS is not set
1106# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
1107# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
1108 1161
1109# 1162#
1110# Security options 1163# Security options
diff --git a/arch/powerpc/configs/mpc7448_hpc2_defconfig b/arch/powerpc/configs/mpc7448_hpc2_defconfig
index 15a50f4ceb1f..719fba4eb421 100644
--- a/arch/powerpc/configs/mpc7448_hpc2_defconfig
+++ b/arch/powerpc/configs/mpc7448_hpc2_defconfig
@@ -1,16 +1,18 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17-rc4 3# Linux kernel version: 2.6.18-rc6
4# Sat May 27 18:45:55 2006 4# Sun Sep 10 10:26:55 2006
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
11CONFIG_RWSEM_XCHGADD_ALGORITHM=y 12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
12CONFIG_GENERIC_HWEIGHT=y 13CONFIG_GENERIC_HWEIGHT=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y 14CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y
14CONFIG_PPC=y 16CONFIG_PPC=y
15CONFIG_EARLY_PRINTK=y 17CONFIG_EARLY_PRINTK=y
16CONFIG_GENERIC_NVRAM=y 18CONFIG_GENERIC_NVRAM=y
@@ -29,6 +31,7 @@ CONFIG_CLASSIC32=y
29# CONFIG_PPC_82xx is not set 31# CONFIG_PPC_82xx is not set
30# CONFIG_PPC_83xx is not set 32# CONFIG_PPC_83xx is not set
31# CONFIG_PPC_85xx is not set 33# CONFIG_PPC_85xx is not set
34# CONFIG_PPC_86xx is not set
32# CONFIG_40x is not set 35# CONFIG_40x is not set
33# CONFIG_44x is not set 36# CONFIG_44x is not set
34# CONFIG_8xx is not set 37# CONFIG_8xx is not set
@@ -39,6 +42,7 @@ CONFIG_PPC_FPU=y
39CONFIG_PPC_STD_MMU=y 42CONFIG_PPC_STD_MMU=y
40CONFIG_PPC_STD_MMU_32=y 43CONFIG_PPC_STD_MMU_32=y
41# CONFIG_SMP is not set 44# CONFIG_SMP is not set
45CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
42 46
43# 47#
44# Code maturity level options 48# Code maturity level options
@@ -56,6 +60,7 @@ CONFIG_SWAP=y
56CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
57# CONFIG_POSIX_MQUEUE is not set 61# CONFIG_POSIX_MQUEUE is not set
58# CONFIG_BSD_PROCESS_ACCT is not set 62# CONFIG_BSD_PROCESS_ACCT is not set
63# CONFIG_TASKSTATS is not set
59CONFIG_SYSCTL=y 64CONFIG_SYSCTL=y
60# CONFIG_AUDIT is not set 65# CONFIG_AUDIT is not set
61# CONFIG_IKCONFIG is not set 66# CONFIG_IKCONFIG is not set
@@ -70,10 +75,12 @@ CONFIG_PRINTK=y
70CONFIG_BUG=y 75CONFIG_BUG=y
71CONFIG_ELF_CORE=y 76CONFIG_ELF_CORE=y
72CONFIG_BASE_FULL=y 77CONFIG_BASE_FULL=y
78CONFIG_RT_MUTEXES=y
73CONFIG_FUTEX=y 79CONFIG_FUTEX=y
74CONFIG_EPOLL=y 80CONFIG_EPOLL=y
75CONFIG_SHMEM=y 81CONFIG_SHMEM=y
76CONFIG_SLAB=y 82CONFIG_SLAB=y
83CONFIG_VM_EVENT_COUNTERS=y
77# CONFIG_TINY_SHMEM is not set 84# CONFIG_TINY_SHMEM is not set
78CONFIG_BASE_SMALL=0 85CONFIG_BASE_SMALL=0
79# CONFIG_SLOB is not set 86# CONFIG_SLOB is not set
@@ -110,13 +117,16 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
110# CONFIG_PPC_ISERIES is not set 117# CONFIG_PPC_ISERIES is not set
111CONFIG_EMBEDDED6xx=y 118CONFIG_EMBEDDED6xx=y
112# CONFIG_APUS is not set 119# CONFIG_APUS is not set
113CONFIG_MPIC=y 120# CONFIG_PPC_CELL is not set
121# CONFIG_PPC_CELL_NATIVE is not set
122# CONFIG_UDBG_RTAS_CONSOLE is not set
114# CONFIG_PPC_RTAS is not set 123# CONFIG_PPC_RTAS is not set
115# CONFIG_MMIO_NVRAM is not set 124# CONFIG_MMIO_NVRAM is not set
116# CONFIG_PPC_MPC106 is not set 125# CONFIG_PPC_MPC106 is not set
117# CONFIG_PPC_970_NAP is not set 126# CONFIG_PPC_970_NAP is not set
118# CONFIG_CPU_FREQ is not set 127# CONFIG_CPU_FREQ is not set
119# CONFIG_TAU is not set 128# CONFIG_TAU is not set
129# CONFIG_PPC_TODC is not set
120# CONFIG_KATANA is not set 130# CONFIG_KATANA is not set
121# CONFIG_WILLOW is not set 131# CONFIG_WILLOW is not set
122# CONFIG_CPCI690 is not set 132# CONFIG_CPCI690 is not set
@@ -146,6 +156,7 @@ CONFIG_MPC7448HPC2=y
146# CONFIG_EV64360 is not set 156# CONFIG_EV64360 is not set
147CONFIG_TSI108_BRIDGE=y 157CONFIG_TSI108_BRIDGE=y
148# CONFIG_WANT_EARLY_SERIAL is not set 158# CONFIG_WANT_EARLY_SERIAL is not set
159CONFIG_MPIC=y
149 160
150# 161#
151# Kernel options 162# Kernel options
@@ -160,6 +171,7 @@ CONFIG_PREEMPT_NONE=y
160# CONFIG_PREEMPT is not set 171# CONFIG_PREEMPT is not set
161CONFIG_BINFMT_ELF=y 172CONFIG_BINFMT_ELF=y
162CONFIG_BINFMT_MISC=y 173CONFIG_BINFMT_MISC=y
174CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
163CONFIG_ARCH_FLATMEM_ENABLE=y 175CONFIG_ARCH_FLATMEM_ENABLE=y
164CONFIG_SELECT_MEMORY_MODEL=y 176CONFIG_SELECT_MEMORY_MODEL=y
165CONFIG_FLATMEM_MANUAL=y 177CONFIG_FLATMEM_MANUAL=y
@@ -169,10 +181,10 @@ CONFIG_FLATMEM=y
169CONFIG_FLAT_NODE_MEM_MAP=y 181CONFIG_FLAT_NODE_MEM_MAP=y
170# CONFIG_SPARSEMEM_STATIC is not set 182# CONFIG_SPARSEMEM_STATIC is not set
171CONFIG_SPLIT_PTLOCK_CPUS=4 183CONFIG_SPLIT_PTLOCK_CPUS=4
184# CONFIG_RESOURCES_64BIT is not set
172CONFIG_PROC_DEVICETREE=y 185CONFIG_PROC_DEVICETREE=y
173# CONFIG_CMDLINE_BOOL is not set 186# CONFIG_CMDLINE_BOOL is not set
174# CONFIG_PM is not set 187# CONFIG_PM is not set
175# CONFIG_SOFTWARE_SUSPEND is not set
176# CONFIG_SECCOMP is not set 188# CONFIG_SECCOMP is not set
177CONFIG_ISA_DMA_API=y 189CONFIG_ISA_DMA_API=y
178 190
@@ -180,10 +192,12 @@ CONFIG_ISA_DMA_API=y
180# Bus options 192# Bus options
181# 193#
182CONFIG_GENERIC_ISA_DMA=y 194CONFIG_GENERIC_ISA_DMA=y
195CONFIG_MPIC_WEIRD=y
183# CONFIG_PPC_I8259 is not set 196# CONFIG_PPC_I8259 is not set
184# CONFIG_PPC_INDIRECT_PCI is not set 197# CONFIG_PPC_INDIRECT_PCI is not set
185CONFIG_PCI=y 198CONFIG_PCI=y
186CONFIG_PCI_DOMAINS=y 199CONFIG_PCI_DOMAINS=y
200# CONFIG_PCIEPORTBUS is not set
187 201
188# 202#
189# PCCARD (PCMCIA/CardBus) support 203# PCCARD (PCMCIA/CardBus) support
@@ -221,6 +235,8 @@ CONFIG_NET=y
221CONFIG_PACKET=y 235CONFIG_PACKET=y
222# CONFIG_PACKET_MMAP is not set 236# CONFIG_PACKET_MMAP is not set
223CONFIG_UNIX=y 237CONFIG_UNIX=y
238CONFIG_XFRM=y
239CONFIG_XFRM_USER=y
224# CONFIG_NET_KEY is not set 240# CONFIG_NET_KEY is not set
225CONFIG_INET=y 241CONFIG_INET=y
226CONFIG_IP_MULTICAST=y 242CONFIG_IP_MULTICAST=y
@@ -240,6 +256,8 @@ CONFIG_SYN_COOKIES=y
240# CONFIG_INET_IPCOMP is not set 256# CONFIG_INET_IPCOMP is not set
241# CONFIG_INET_XFRM_TUNNEL is not set 257# CONFIG_INET_XFRM_TUNNEL is not set
242# CONFIG_INET_TUNNEL is not set 258# CONFIG_INET_TUNNEL is not set
259CONFIG_INET_XFRM_MODE_TRANSPORT=y
260CONFIG_INET_XFRM_MODE_TUNNEL=y
243CONFIG_INET_DIAG=y 261CONFIG_INET_DIAG=y
244CONFIG_INET_TCP_DIAG=y 262CONFIG_INET_TCP_DIAG=y
245# CONFIG_TCP_CONG_ADVANCED is not set 263# CONFIG_TCP_CONG_ADVANCED is not set
@@ -247,6 +265,7 @@ CONFIG_TCP_CONG_BIC=y
247# CONFIG_IPV6 is not set 265# CONFIG_IPV6 is not set
248# CONFIG_INET6_XFRM_TUNNEL is not set 266# CONFIG_INET6_XFRM_TUNNEL is not set
249# CONFIG_INET6_TUNNEL is not set 267# CONFIG_INET6_TUNNEL is not set
268# CONFIG_NETWORK_SECMARK is not set
250# CONFIG_NETFILTER is not set 269# CONFIG_NETFILTER is not set
251 270
252# 271#
@@ -300,6 +319,7 @@ CONFIG_TCP_CONG_BIC=y
300CONFIG_STANDALONE=y 319CONFIG_STANDALONE=y
301CONFIG_PREVENT_FIRMWARE_BUILD=y 320CONFIG_PREVENT_FIRMWARE_BUILD=y
302# CONFIG_FW_LOADER is not set 321# CONFIG_FW_LOADER is not set
322# CONFIG_SYS_HYPERVISOR is not set
303 323
304# 324#
305# Connector - unified userspace <-> kernelspace linker 325# Connector - unified userspace <-> kernelspace linker
@@ -336,6 +356,7 @@ CONFIG_BLK_DEV_LOOP=y
336CONFIG_BLK_DEV_RAM=y 356CONFIG_BLK_DEV_RAM=y
337CONFIG_BLK_DEV_RAM_COUNT=16 357CONFIG_BLK_DEV_RAM_COUNT=16
338CONFIG_BLK_DEV_RAM_SIZE=131072 358CONFIG_BLK_DEV_RAM_SIZE=131072
359CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
339CONFIG_BLK_DEV_INITRD=y 360CONFIG_BLK_DEV_INITRD=y
340# CONFIG_CDROM_PKTCDVD is not set 361# CONFIG_CDROM_PKTCDVD is not set
341# CONFIG_ATA_OVER_ETH is not set 362# CONFIG_ATA_OVER_ETH is not set
@@ -399,6 +420,7 @@ CONFIG_SCSI_SATA=y
399CONFIG_SCSI_SATA_MV=y 420CONFIG_SCSI_SATA_MV=y
400# CONFIG_SCSI_SATA_NV is not set 421# CONFIG_SCSI_SATA_NV is not set
401# CONFIG_SCSI_PDC_ADMA is not set 422# CONFIG_SCSI_PDC_ADMA is not set
423# CONFIG_SCSI_HPTIOP is not set
402# CONFIG_SCSI_SATA_QSTOR is not set 424# CONFIG_SCSI_SATA_QSTOR is not set
403# CONFIG_SCSI_SATA_PROMISE is not set 425# CONFIG_SCSI_SATA_PROMISE is not set
404# CONFIG_SCSI_SATA_SX4 is not set 426# CONFIG_SCSI_SATA_SX4 is not set
@@ -481,6 +503,9 @@ CONFIG_PHYLIB=y
481# CONFIG_QSEMI_PHY is not set 503# CONFIG_QSEMI_PHY is not set
482# CONFIG_LXT_PHY is not set 504# CONFIG_LXT_PHY is not set
483# CONFIG_CICADA_PHY is not set 505# CONFIG_CICADA_PHY is not set
506# CONFIG_VITESSE_PHY is not set
507# CONFIG_SMSC_PHY is not set
508# CONFIG_FIXED_PHY is not set
484 509
485# 510#
486# Ethernet (10 or 100Mbit) 511# Ethernet (10 or 100Mbit)
@@ -538,7 +563,6 @@ CONFIG_8139TOO=y
538# CONFIG_VIA_VELOCITY is not set 563# CONFIG_VIA_VELOCITY is not set
539# CONFIG_TIGON3 is not set 564# CONFIG_TIGON3 is not set
540# CONFIG_BNX2 is not set 565# CONFIG_BNX2 is not set
541CONFIG_TSI108_ETH=y
542 566
543# 567#
544# Ethernet (10000 Mbit) 568# Ethernet (10000 Mbit)
@@ -546,6 +570,7 @@ CONFIG_TSI108_ETH=y
546# CONFIG_CHELSIO_T1 is not set 570# CONFIG_CHELSIO_T1 is not set
547# CONFIG_IXGB is not set 571# CONFIG_IXGB is not set
548# CONFIG_S2IO is not set 572# CONFIG_S2IO is not set
573# CONFIG_MYRI10GE is not set
549 574
550# 575#
551# Token Ring devices 576# Token Ring devices
@@ -645,6 +670,7 @@ CONFIG_LEGACY_PTY_COUNT=256
645# Watchdog Cards 670# Watchdog Cards
646# 671#
647# CONFIG_WATCHDOG is not set 672# CONFIG_WATCHDOG is not set
673# CONFIG_HW_RANDOM is not set
648# CONFIG_NVRAM is not set 674# CONFIG_NVRAM is not set
649CONFIG_GEN_RTC=y 675CONFIG_GEN_RTC=y
650# CONFIG_GEN_RTC_X is not set 676# CONFIG_GEN_RTC_X is not set
@@ -679,13 +705,13 @@ CONFIG_GEN_RTC=y
679# 705#
680# Dallas's 1-wire bus 706# Dallas's 1-wire bus
681# 707#
682# CONFIG_W1 is not set
683 708
684# 709#
685# Hardware Monitoring support 710# Hardware Monitoring support
686# 711#
687CONFIG_HWMON=y 712CONFIG_HWMON=y
688# CONFIG_HWMON_VID is not set 713# CONFIG_HWMON_VID is not set
714# CONFIG_SENSORS_ABITUGURU is not set
689# CONFIG_SENSORS_F71805F is not set 715# CONFIG_SENSORS_F71805F is not set
690# CONFIG_HWMON_DEBUG_CHIP is not set 716# CONFIG_HWMON_DEBUG_CHIP is not set
691 717
@@ -697,6 +723,7 @@ CONFIG_HWMON=y
697# Multimedia devices 723# Multimedia devices
698# 724#
699# CONFIG_VIDEO_DEV is not set 725# CONFIG_VIDEO_DEV is not set
726CONFIG_VIDEO_V4L2=y
700 727
701# 728#
702# Digital Video Broadcasting Devices 729# Digital Video Broadcasting Devices
@@ -706,7 +733,9 @@ CONFIG_HWMON=y
706# 733#
707# Graphics support 734# Graphics support
708# 735#
736CONFIG_FIRMWARE_EDID=y
709# CONFIG_FB is not set 737# CONFIG_FB is not set
738# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
710 739
711# 740#
712# Sound 741# Sound
@@ -763,6 +792,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
763# CONFIG_RTC_CLASS is not set 792# CONFIG_RTC_CLASS is not set
764 793
765# 794#
795# DMA Engine support
796#
797# CONFIG_DMA_ENGINE is not set
798
799#
800# DMA Clients
801#
802
803#
804# DMA Devices
805#
806
807#
766# File systems 808# File systems
767# 809#
768CONFIG_EXT2_FS=y 810CONFIG_EXT2_FS=y
@@ -783,6 +825,7 @@ CONFIG_FS_MBCACHE=y
783# CONFIG_MINIX_FS is not set 825# CONFIG_MINIX_FS is not set
784# CONFIG_ROMFS_FS is not set 826# CONFIG_ROMFS_FS is not set
785CONFIG_INOTIFY=y 827CONFIG_INOTIFY=y
828CONFIG_INOTIFY_USER=y
786# CONFIG_QUOTA is not set 829# CONFIG_QUOTA is not set
787CONFIG_DNOTIFY=y 830CONFIG_DNOTIFY=y
788# CONFIG_AUTOFS_FS is not set 831# CONFIG_AUTOFS_FS is not set
@@ -884,6 +927,7 @@ CONFIG_MSDOS_PARTITION=y
884# CONFIG_CRC16 is not set 927# CONFIG_CRC16 is not set
885CONFIG_CRC32=y 928CONFIG_CRC32=y
886# CONFIG_LIBCRC32C is not set 929# CONFIG_LIBCRC32C is not set
930CONFIG_PLIST=y
887 931
888# 932#
889# Instrumentation Support 933# Instrumentation Support
@@ -895,17 +939,13 @@ CONFIG_CRC32=y
895# 939#
896# CONFIG_PRINTK_TIME is not set 940# CONFIG_PRINTK_TIME is not set
897# CONFIG_MAGIC_SYSRQ is not set 941# CONFIG_MAGIC_SYSRQ is not set
942# CONFIG_UNUSED_SYMBOLS is not set
898# CONFIG_DEBUG_KERNEL is not set 943# CONFIG_DEBUG_KERNEL is not set
899CONFIG_LOG_BUF_SHIFT=14 944CONFIG_LOG_BUF_SHIFT=14
900# CONFIG_DEBUG_FS is not set 945# CONFIG_DEBUG_FS is not set
901# CONFIG_UNWIND_INFO is not set 946# CONFIG_UNWIND_INFO is not set
902# CONFIG_BOOTX_TEXT is not set 947# CONFIG_BOOTX_TEXT is not set
903# CONFIG_SERIAL_TEXT_DEBUG is not set 948# CONFIG_PPC_EARLY_DEBUG is not set
904# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
905# CONFIG_PPC_EARLY_DEBUG_G5 is not set
906# CONFIG_PPC_EARLY_DEBUG_RTAS is not set
907# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
908# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
909 949
910# 950#
911# Security options 951# Security options
diff --git a/arch/powerpc/configs/mpc834x_itx_defconfig b/arch/powerpc/configs/mpc834x_itx_defconfig
index fc2d9789adc8..8da6a47f0339 100644
--- a/arch/powerpc/configs/mpc834x_itx_defconfig
+++ b/arch/powerpc/configs/mpc834x_itx_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17 3# Linux kernel version: 2.6.18-rc6
4# Fri Jun 30 17:53:25 2006 4# Sun Sep 10 10:28:05 2006
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -60,6 +60,7 @@ CONFIG_SWAP=y
60CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
61# CONFIG_POSIX_MQUEUE is not set 61# CONFIG_POSIX_MQUEUE is not set
62# CONFIG_BSD_PROCESS_ACCT is not set 62# CONFIG_BSD_PROCESS_ACCT is not set
63# CONFIG_TASKSTATS is not set
63CONFIG_SYSCTL=y 64CONFIG_SYSCTL=y
64# CONFIG_AUDIT is not set 65# CONFIG_AUDIT is not set
65# CONFIG_IKCONFIG is not set 66# CONFIG_IKCONFIG is not set
@@ -78,6 +79,7 @@ CONFIG_FUTEX=y
78# CONFIG_EPOLL is not set 79# CONFIG_EPOLL is not set
79CONFIG_SHMEM=y 80CONFIG_SHMEM=y
80CONFIG_SLAB=y 81CONFIG_SLAB=y
82CONFIG_VM_EVENT_COUNTERS=y
81# CONFIG_TINY_SHMEM is not set 83# CONFIG_TINY_SHMEM is not set
82CONFIG_BASE_SMALL=0 84CONFIG_BASE_SMALL=0
83# CONFIG_SLOB is not set 85# CONFIG_SLOB is not set
@@ -120,6 +122,7 @@ CONFIG_PPC_GEN550=y
120# CONFIG_MPC834x_SYS is not set 122# CONFIG_MPC834x_SYS is not set
121CONFIG_MPC834x_ITX=y 123CONFIG_MPC834x_ITX=y
122CONFIG_MPC834x=y 124CONFIG_MPC834x=y
125# CONFIG_MPIC is not set
123 126
124# 127#
125# Kernel options 128# Kernel options
@@ -148,7 +151,6 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
148CONFIG_PROC_DEVICETREE=y 151CONFIG_PROC_DEVICETREE=y
149# CONFIG_CMDLINE_BOOL is not set 152# CONFIG_CMDLINE_BOOL is not set
150# CONFIG_PM is not set 153# CONFIG_PM is not set
151# CONFIG_SOFTWARE_SUSPEND is not set
152CONFIG_SECCOMP=y 154CONFIG_SECCOMP=y
153CONFIG_ISA_DMA_API=y 155CONFIG_ISA_DMA_API=y
154 156
@@ -156,6 +158,7 @@ CONFIG_ISA_DMA_API=y
156# Bus options 158# Bus options
157# 159#
158CONFIG_GENERIC_ISA_DMA=y 160CONFIG_GENERIC_ISA_DMA=y
161# CONFIG_MPIC_WEIRD is not set
159# CONFIG_PPC_I8259 is not set 162# CONFIG_PPC_I8259 is not set
160CONFIG_PPC_INDIRECT_PCI=y 163CONFIG_PPC_INDIRECT_PCI=y
161CONFIG_FSL_SOC=y 164CONFIG_FSL_SOC=y
@@ -401,6 +404,7 @@ CONFIG_BLK_DEV_LOOP=y
401CONFIG_BLK_DEV_RAM=y 404CONFIG_BLK_DEV_RAM=y
402CONFIG_BLK_DEV_RAM_COUNT=16 405CONFIG_BLK_DEV_RAM_COUNT=16
403CONFIG_BLK_DEV_RAM_SIZE=32768 406CONFIG_BLK_DEV_RAM_SIZE=32768
407CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
404CONFIG_BLK_DEV_INITRD=y 408CONFIG_BLK_DEV_INITRD=y
405# CONFIG_CDROM_PKTCDVD is not set 409# CONFIG_CDROM_PKTCDVD is not set
406# CONFIG_ATA_OVER_ETH is not set 410# CONFIG_ATA_OVER_ETH is not set
@@ -561,6 +565,7 @@ CONFIG_PHYLIB=y
561CONFIG_CICADA_PHY=y 565CONFIG_CICADA_PHY=y
562# CONFIG_VITESSE_PHY is not set 566# CONFIG_VITESSE_PHY is not set
563# CONFIG_SMSC_PHY is not set 567# CONFIG_SMSC_PHY is not set
568# CONFIG_FIXED_PHY is not set
564 569
565# 570#
566# Ethernet (10 or 100Mbit) 571# Ethernet (10 or 100Mbit)
@@ -905,6 +910,7 @@ CONFIG_VIDEO_V4L2=y
905# 910#
906CONFIG_FIRMWARE_EDID=y 911CONFIG_FIRMWARE_EDID=y
907# CONFIG_FB is not set 912# CONFIG_FB is not set
913# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
908 914
909# 915#
910# Sound 916# Sound
@@ -1025,7 +1031,7 @@ CONFIG_USB_MON=y
1025# CONFIG_USB_LEGOTOWER is not set 1031# CONFIG_USB_LEGOTOWER is not set
1026# CONFIG_USB_LCD is not set 1032# CONFIG_USB_LCD is not set
1027# CONFIG_USB_LED is not set 1033# CONFIG_USB_LED is not set
1028# CONFIG_USB_CY7C63 is not set 1034# CONFIG_USB_CYPRESS_CY7C63 is not set
1029# CONFIG_USB_CYTHERM is not set 1035# CONFIG_USB_CYTHERM is not set
1030# CONFIG_USB_PHIDGETKIT is not set 1036# CONFIG_USB_PHIDGETKIT is not set
1031# CONFIG_USB_PHIDGETSERVO is not set 1037# CONFIG_USB_PHIDGETSERVO is not set
@@ -1110,6 +1116,7 @@ CONFIG_RTC_INTF_DEV_UIE_EMUL=y
1110# CONFIG_RTC_DRV_X1205 is not set 1116# CONFIG_RTC_DRV_X1205 is not set
1111CONFIG_RTC_DRV_DS1307=y 1117CONFIG_RTC_DRV_DS1307=y
1112# CONFIG_RTC_DRV_DS1553 is not set 1118# CONFIG_RTC_DRV_DS1553 is not set
1119# CONFIG_RTC_DRV_ISL1208 is not set
1113# CONFIG_RTC_DRV_DS1672 is not set 1120# CONFIG_RTC_DRV_DS1672 is not set
1114# CONFIG_RTC_DRV_DS1742 is not set 1121# CONFIG_RTC_DRV_DS1742 is not set
1115# CONFIG_RTC_DRV_PCF8563 is not set 1122# CONFIG_RTC_DRV_PCF8563 is not set
@@ -1226,7 +1233,6 @@ CONFIG_RPCSEC_GSS_KRB5=y
1226# CONFIG_RPCSEC_GSS_SPKM3 is not set 1233# CONFIG_RPCSEC_GSS_SPKM3 is not set
1227# CONFIG_SMB_FS is not set 1234# CONFIG_SMB_FS is not set
1228# CONFIG_CIFS is not set 1235# CONFIG_CIFS is not set
1229# CONFIG_CIFS_DEBUG2 is not set
1230# CONFIG_NCP_FS is not set 1236# CONFIG_NCP_FS is not set
1231# CONFIG_CODA_FS is not set 1237# CONFIG_CODA_FS is not set
1232# CONFIG_AFS_FS is not set 1238# CONFIG_AFS_FS is not set
@@ -1279,11 +1285,13 @@ CONFIG_LOG_BUF_SHIFT=17
1279CONFIG_DETECT_SOFTLOCKUP=y 1285CONFIG_DETECT_SOFTLOCKUP=y
1280# CONFIG_SCHEDSTATS is not set 1286# CONFIG_SCHEDSTATS is not set
1281# CONFIG_DEBUG_SLAB is not set 1287# CONFIG_DEBUG_SLAB is not set
1282# CONFIG_DEBUG_MUTEXES is not set
1283# CONFIG_DEBUG_RT_MUTEXES is not set 1288# CONFIG_DEBUG_RT_MUTEXES is not set
1284# CONFIG_RT_MUTEX_TESTER is not set 1289# CONFIG_RT_MUTEX_TESTER is not set
1285# CONFIG_DEBUG_SPINLOCK is not set 1290# CONFIG_DEBUG_SPINLOCK is not set
1291# CONFIG_DEBUG_MUTEXES is not set
1292# CONFIG_DEBUG_RWSEMS is not set
1286# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1293# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1294# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1287# CONFIG_DEBUG_KOBJECT is not set 1295# CONFIG_DEBUG_KOBJECT is not set
1288CONFIG_DEBUG_INFO=y 1296CONFIG_DEBUG_INFO=y
1289# CONFIG_DEBUG_FS is not set 1297# CONFIG_DEBUG_FS is not set
diff --git a/arch/powerpc/configs/mpc834x_sys_defconfig b/arch/powerpc/configs/mpc834x_mds_defconfig
index 5078b0441d61..9eefab967898 100644
--- a/arch/powerpc/configs/mpc834x_sys_defconfig
+++ b/arch/powerpc/configs/mpc834x_mds_defconfig
@@ -1,15 +1,18 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.16-rc6 3# Linux kernel version: 2.6.18-rc6
4# Wed Mar 15 16:19:56 2006 4# Sun Sep 10 10:28:54 2006
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
11CONFIG_RWSEM_XCHGADD_ALGORITHM=y 12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_GENERIC_HWEIGHT=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y 14CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y
13CONFIG_PPC=y 16CONFIG_PPC=y
14CONFIG_EARLY_PRINTK=y 17CONFIG_EARLY_PRINTK=y
15CONFIG_GENERIC_NVRAM=y 18CONFIG_GENERIC_NVRAM=y
@@ -27,17 +30,19 @@ CONFIG_DEFAULT_UIMAGE=y
27# CONFIG_PPC_52xx is not set 30# CONFIG_PPC_52xx is not set
28# CONFIG_PPC_82xx is not set 31# CONFIG_PPC_82xx is not set
29CONFIG_PPC_83xx=y 32CONFIG_PPC_83xx=y
33# CONFIG_PPC_85xx is not set
34# CONFIG_PPC_86xx is not set
30# CONFIG_40x is not set 35# CONFIG_40x is not set
31# CONFIG_44x is not set 36# CONFIG_44x is not set
32# CONFIG_8xx is not set 37# CONFIG_8xx is not set
33# CONFIG_E200 is not set 38# CONFIG_E200 is not set
34# CONFIG_E500 is not set
35CONFIG_6xx=y 39CONFIG_6xx=y
36CONFIG_83xx=y 40CONFIG_83xx=y
37CONFIG_PPC_FPU=y 41CONFIG_PPC_FPU=y
38CONFIG_PPC_STD_MMU=y 42CONFIG_PPC_STD_MMU=y
39CONFIG_PPC_STD_MMU_32=y 43CONFIG_PPC_STD_MMU_32=y
40# CONFIG_SMP is not set 44# CONFIG_SMP is not set
45CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
41 46
42# 47#
43# Code maturity level options 48# Code maturity level options
@@ -55,9 +60,11 @@ CONFIG_SWAP=y
55CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
56# CONFIG_POSIX_MQUEUE is not set 61# CONFIG_POSIX_MQUEUE is not set
57# CONFIG_BSD_PROCESS_ACCT is not set 62# CONFIG_BSD_PROCESS_ACCT is not set
63# CONFIG_TASKSTATS is not set
58CONFIG_SYSCTL=y 64CONFIG_SYSCTL=y
59# CONFIG_AUDIT is not set 65# CONFIG_AUDIT is not set
60# CONFIG_IKCONFIG is not set 66# CONFIG_IKCONFIG is not set
67# CONFIG_RELAY is not set
61CONFIG_INITRAMFS_SOURCE="" 68CONFIG_INITRAMFS_SOURCE=""
62# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 69# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
63CONFIG_EMBEDDED=y 70CONFIG_EMBEDDED=y
@@ -67,14 +74,12 @@ CONFIG_PRINTK=y
67CONFIG_BUG=y 74CONFIG_BUG=y
68CONFIG_ELF_CORE=y 75CONFIG_ELF_CORE=y
69CONFIG_BASE_FULL=y 76CONFIG_BASE_FULL=y
77CONFIG_RT_MUTEXES=y
70CONFIG_FUTEX=y 78CONFIG_FUTEX=y
71# CONFIG_EPOLL is not set 79# CONFIG_EPOLL is not set
72CONFIG_SHMEM=y 80CONFIG_SHMEM=y
73CONFIG_CC_ALIGN_FUNCTIONS=0
74CONFIG_CC_ALIGN_LABELS=0
75CONFIG_CC_ALIGN_LOOPS=0
76CONFIG_CC_ALIGN_JUMPS=0
77CONFIG_SLAB=y 81CONFIG_SLAB=y
82CONFIG_VM_EVENT_COUNTERS=y
78# CONFIG_TINY_SHMEM is not set 83# CONFIG_TINY_SHMEM is not set
79CONFIG_BASE_SMALL=0 84CONFIG_BASE_SMALL=0
80# CONFIG_SLOB is not set 85# CONFIG_SLOB is not set
@@ -85,7 +90,6 @@ CONFIG_BASE_SMALL=0
85CONFIG_MODULES=y 90CONFIG_MODULES=y
86CONFIG_MODULE_UNLOAD=y 91CONFIG_MODULE_UNLOAD=y
87# CONFIG_MODULE_FORCE_UNLOAD is not set 92# CONFIG_MODULE_FORCE_UNLOAD is not set
88CONFIG_OBSOLETE_MODPARM=y
89# CONFIG_MODVERSIONS is not set 93# CONFIG_MODVERSIONS is not set
90# CONFIG_MODULE_SRCVERSION_ALL is not set 94# CONFIG_MODULE_SRCVERSION_ALL is not set
91# CONFIG_KMOD is not set 95# CONFIG_KMOD is not set
@@ -94,6 +98,8 @@ CONFIG_OBSOLETE_MODPARM=y
94# Block layer 98# Block layer
95# 99#
96# CONFIG_LBD is not set 100# CONFIG_LBD is not set
101# CONFIG_BLK_DEV_IO_TRACE is not set
102# CONFIG_LSF is not set
97 103
98# 104#
99# IO Schedulers 105# IO Schedulers
@@ -114,7 +120,9 @@ CONFIG_PPC_GEN550=y
114# Platform support 120# Platform support
115# 121#
116CONFIG_MPC834x_SYS=y 122CONFIG_MPC834x_SYS=y
123# CONFIG_MPC834x_ITX is not set
117CONFIG_MPC834x=y 124CONFIG_MPC834x=y
125# CONFIG_MPIC is not set
118 126
119# 127#
120# Kernel options 128# Kernel options
@@ -129,6 +137,7 @@ CONFIG_PREEMPT_NONE=y
129# CONFIG_PREEMPT is not set 137# CONFIG_PREEMPT is not set
130CONFIG_BINFMT_ELF=y 138CONFIG_BINFMT_ELF=y
131# CONFIG_BINFMT_MISC is not set 139# CONFIG_BINFMT_MISC is not set
140CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
132CONFIG_ARCH_FLATMEM_ENABLE=y 141CONFIG_ARCH_FLATMEM_ENABLE=y
133CONFIG_SELECT_MEMORY_MODEL=y 142CONFIG_SELECT_MEMORY_MODEL=y
134CONFIG_FLATMEM_MANUAL=y 143CONFIG_FLATMEM_MANUAL=y
@@ -138,10 +147,10 @@ CONFIG_FLATMEM=y
138CONFIG_FLAT_NODE_MEM_MAP=y 147CONFIG_FLAT_NODE_MEM_MAP=y
139# CONFIG_SPARSEMEM_STATIC is not set 148# CONFIG_SPARSEMEM_STATIC is not set
140CONFIG_SPLIT_PTLOCK_CPUS=4 149CONFIG_SPLIT_PTLOCK_CPUS=4
150# CONFIG_RESOURCES_64BIT is not set
141CONFIG_PROC_DEVICETREE=y 151CONFIG_PROC_DEVICETREE=y
142# CONFIG_CMDLINE_BOOL is not set 152# CONFIG_CMDLINE_BOOL is not set
143# CONFIG_PM is not set 153# CONFIG_PM is not set
144# CONFIG_SOFTWARE_SUSPEND is not set
145CONFIG_SECCOMP=y 154CONFIG_SECCOMP=y
146CONFIG_ISA_DMA_API=y 155CONFIG_ISA_DMA_API=y
147 156
@@ -149,12 +158,13 @@ CONFIG_ISA_DMA_API=y
149# Bus options 158# Bus options
150# 159#
151CONFIG_GENERIC_ISA_DMA=y 160CONFIG_GENERIC_ISA_DMA=y
161# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set 162# CONFIG_PPC_I8259 is not set
153CONFIG_PPC_INDIRECT_PCI=y 163CONFIG_PPC_INDIRECT_PCI=y
154CONFIG_FSL_SOC=y 164CONFIG_FSL_SOC=y
155CONFIG_PCI=y 165CONFIG_PCI=y
156CONFIG_PCI_DOMAINS=y 166CONFIG_PCI_DOMAINS=y
157# CONFIG_PCI_LEGACY_PROC is not set 167# CONFIG_PCIEPORTBUS is not set
158 168
159# 169#
160# PCCARD (PCMCIA/CardBus) support 170# PCCARD (PCMCIA/CardBus) support
@@ -192,6 +202,8 @@ CONFIG_NET=y
192CONFIG_PACKET=y 202CONFIG_PACKET=y
193# CONFIG_PACKET_MMAP is not set 203# CONFIG_PACKET_MMAP is not set
194CONFIG_UNIX=y 204CONFIG_UNIX=y
205CONFIG_XFRM=y
206CONFIG_XFRM_USER=m
195# CONFIG_NET_KEY is not set 207# CONFIG_NET_KEY is not set
196CONFIG_INET=y 208CONFIG_INET=y
197CONFIG_IP_MULTICAST=y 209CONFIG_IP_MULTICAST=y
@@ -209,12 +221,18 @@ CONFIG_SYN_COOKIES=y
209# CONFIG_INET_AH is not set 221# CONFIG_INET_AH is not set
210# CONFIG_INET_ESP is not set 222# CONFIG_INET_ESP is not set
211# CONFIG_INET_IPCOMP is not set 223# CONFIG_INET_IPCOMP is not set
224# CONFIG_INET_XFRM_TUNNEL is not set
212# CONFIG_INET_TUNNEL is not set 225# CONFIG_INET_TUNNEL is not set
226CONFIG_INET_XFRM_MODE_TRANSPORT=y
227CONFIG_INET_XFRM_MODE_TUNNEL=y
213CONFIG_INET_DIAG=y 228CONFIG_INET_DIAG=y
214CONFIG_INET_TCP_DIAG=y 229CONFIG_INET_TCP_DIAG=y
215# CONFIG_TCP_CONG_ADVANCED is not set 230# CONFIG_TCP_CONG_ADVANCED is not set
216CONFIG_TCP_CONG_BIC=y 231CONFIG_TCP_CONG_BIC=y
217# CONFIG_IPV6 is not set 232# CONFIG_IPV6 is not set
233# CONFIG_INET6_XFRM_TUNNEL is not set
234# CONFIG_INET6_TUNNEL is not set
235# CONFIG_NETWORK_SECMARK is not set
218# CONFIG_NETFILTER is not set 236# CONFIG_NETFILTER is not set
219 237
220# 238#
@@ -268,6 +286,7 @@ CONFIG_TCP_CONG_BIC=y
268CONFIG_STANDALONE=y 286CONFIG_STANDALONE=y
269CONFIG_PREVENT_FIRMWARE_BUILD=y 287CONFIG_PREVENT_FIRMWARE_BUILD=y
270# CONFIG_FW_LOADER is not set 288# CONFIG_FW_LOADER is not set
289# CONFIG_SYS_HYPERVISOR is not set
271 290
272# 291#
273# Connector - unified userspace <-> kernelspace linker 292# Connector - unified userspace <-> kernelspace linker
@@ -304,6 +323,7 @@ CONFIG_BLK_DEV_LOOP=y
304CONFIG_BLK_DEV_RAM=y 323CONFIG_BLK_DEV_RAM=y
305CONFIG_BLK_DEV_RAM_COUNT=16 324CONFIG_BLK_DEV_RAM_COUNT=16
306CONFIG_BLK_DEV_RAM_SIZE=32768 325CONFIG_BLK_DEV_RAM_SIZE=32768
326CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
307CONFIG_BLK_DEV_INITRD=y 327CONFIG_BLK_DEV_INITRD=y
308# CONFIG_CDROM_PKTCDVD is not set 328# CONFIG_CDROM_PKTCDVD is not set
309# CONFIG_ATA_OVER_ETH is not set 329# CONFIG_ATA_OVER_ETH is not set
@@ -371,6 +391,9 @@ CONFIG_MARVELL_PHY=y
371# CONFIG_QSEMI_PHY is not set 391# CONFIG_QSEMI_PHY is not set
372# CONFIG_LXT_PHY is not set 392# CONFIG_LXT_PHY is not set
373# CONFIG_CICADA_PHY is not set 393# CONFIG_CICADA_PHY is not set
394# CONFIG_VITESSE_PHY is not set
395# CONFIG_SMSC_PHY is not set
396# CONFIG_FIXED_PHY is not set
374 397
375# 398#
376# Ethernet (10 or 100Mbit) 399# Ethernet (10 or 100Mbit)
@@ -433,6 +456,7 @@ CONFIG_GIANFAR=y
433# CONFIG_CHELSIO_T1 is not set 456# CONFIG_CHELSIO_T1 is not set
434# CONFIG_IXGB is not set 457# CONFIG_IXGB is not set
435# CONFIG_S2IO is not set 458# CONFIG_S2IO is not set
459# CONFIG_MYRI10GE is not set
436 460
437# 461#
438# Token Ring devices 462# Token Ring devices
@@ -507,6 +531,7 @@ CONFIG_INPUT=y
507# 531#
508CONFIG_SERIAL_8250=y 532CONFIG_SERIAL_8250=y
509CONFIG_SERIAL_8250_CONSOLE=y 533CONFIG_SERIAL_8250_CONSOLE=y
534CONFIG_SERIAL_8250_PCI=y
510CONFIG_SERIAL_8250_NR_UARTS=4 535CONFIG_SERIAL_8250_NR_UARTS=4
511CONFIG_SERIAL_8250_RUNTIME_UARTS=4 536CONFIG_SERIAL_8250_RUNTIME_UARTS=4
512# CONFIG_SERIAL_8250_EXTENDED is not set 537# CONFIG_SERIAL_8250_EXTENDED is not set
@@ -543,6 +568,7 @@ CONFIG_83xx_WDT=y
543# 568#
544# CONFIG_PCIPCWATCHDOG is not set 569# CONFIG_PCIPCWATCHDOG is not set
545# CONFIG_WDTPCI is not set 570# CONFIG_WDTPCI is not set
571# CONFIG_HW_RANDOM is not set
546# CONFIG_NVRAM is not set 572# CONFIG_NVRAM is not set
547CONFIG_GEN_RTC=y 573CONFIG_GEN_RTC=y
548# CONFIG_GEN_RTC_X is not set 574# CONFIG_GEN_RTC_X is not set
@@ -589,10 +615,10 @@ CONFIG_I2C_CHARDEV=y
589# CONFIG_I2C_PIIX4 is not set 615# CONFIG_I2C_PIIX4 is not set
590CONFIG_I2C_MPC=y 616CONFIG_I2C_MPC=y
591# CONFIG_I2C_NFORCE2 is not set 617# CONFIG_I2C_NFORCE2 is not set
618# CONFIG_I2C_OCORES is not set
592# CONFIG_I2C_PARPORT_LIGHT is not set 619# CONFIG_I2C_PARPORT_LIGHT is not set
593# CONFIG_I2C_PROSAVAGE is not set 620# CONFIG_I2C_PROSAVAGE is not set
594# CONFIG_I2C_SAVAGE4 is not set 621# CONFIG_I2C_SAVAGE4 is not set
595# CONFIG_SCx200_ACB is not set
596# CONFIG_I2C_SIS5595 is not set 622# CONFIG_I2C_SIS5595 is not set
597# CONFIG_I2C_SIS630 is not set 623# CONFIG_I2C_SIS630 is not set
598# CONFIG_I2C_SIS96X is not set 624# CONFIG_I2C_SIS96X is not set
@@ -611,10 +637,8 @@ CONFIG_I2C_MPC=y
611# CONFIG_SENSORS_PCF8574 is not set 637# CONFIG_SENSORS_PCF8574 is not set
612# CONFIG_SENSORS_PCA9539 is not set 638# CONFIG_SENSORS_PCA9539 is not set
613# CONFIG_SENSORS_PCF8591 is not set 639# CONFIG_SENSORS_PCF8591 is not set
614# CONFIG_SENSORS_RTC8564 is not set
615# CONFIG_SENSORS_M41T00 is not set 640# CONFIG_SENSORS_M41T00 is not set
616# CONFIG_SENSORS_MAX6875 is not set 641# CONFIG_SENSORS_MAX6875 is not set
617# CONFIG_RTC_X1205_I2C is not set
618# CONFIG_I2C_DEBUG_CORE is not set 642# CONFIG_I2C_DEBUG_CORE is not set
619# CONFIG_I2C_DEBUG_ALGO is not set 643# CONFIG_I2C_DEBUG_ALGO is not set
620# CONFIG_I2C_DEBUG_BUS is not set 644# CONFIG_I2C_DEBUG_BUS is not set
@@ -629,13 +653,13 @@ CONFIG_I2C_MPC=y
629# 653#
630# Dallas's 1-wire bus 654# Dallas's 1-wire bus
631# 655#
632# CONFIG_W1 is not set
633 656
634# 657#
635# Hardware Monitoring support 658# Hardware Monitoring support
636# 659#
637CONFIG_HWMON=y 660CONFIG_HWMON=y
638# CONFIG_HWMON_VID is not set 661# CONFIG_HWMON_VID is not set
662# CONFIG_SENSORS_ABITUGURU is not set
639# CONFIG_SENSORS_ADM1021 is not set 663# CONFIG_SENSORS_ADM1021 is not set
640# CONFIG_SENSORS_ADM1025 is not set 664# CONFIG_SENSORS_ADM1025 is not set
641# CONFIG_SENSORS_ADM1026 is not set 665# CONFIG_SENSORS_ADM1026 is not set
@@ -664,10 +688,12 @@ CONFIG_HWMON=y
664# CONFIG_SENSORS_PC87360 is not set 688# CONFIG_SENSORS_PC87360 is not set
665# CONFIG_SENSORS_SIS5595 is not set 689# CONFIG_SENSORS_SIS5595 is not set
666# CONFIG_SENSORS_SMSC47M1 is not set 690# CONFIG_SENSORS_SMSC47M1 is not set
691# CONFIG_SENSORS_SMSC47M192 is not set
667# CONFIG_SENSORS_SMSC47B397 is not set 692# CONFIG_SENSORS_SMSC47B397 is not set
668# CONFIG_SENSORS_VIA686A is not set 693# CONFIG_SENSORS_VIA686A is not set
669# CONFIG_SENSORS_VT8231 is not set 694# CONFIG_SENSORS_VT8231 is not set
670# CONFIG_SENSORS_W83781D is not set 695# CONFIG_SENSORS_W83781D is not set
696# CONFIG_SENSORS_W83791D is not set
671# CONFIG_SENSORS_W83792D is not set 697# CONFIG_SENSORS_W83792D is not set
672# CONFIG_SENSORS_W83L785TS is not set 698# CONFIG_SENSORS_W83L785TS is not set
673# CONFIG_SENSORS_W83627HF is not set 699# CONFIG_SENSORS_W83627HF is not set
@@ -679,13 +705,10 @@ CONFIG_HWMON=y
679# 705#
680 706
681# 707#
682# Multimedia Capabilities Port drivers
683#
684
685#
686# Multimedia devices 708# Multimedia devices
687# 709#
688# CONFIG_VIDEO_DEV is not set 710# CONFIG_VIDEO_DEV is not set
711CONFIG_VIDEO_V4L2=y
689 712
690# 713#
691# Digital Video Broadcasting Devices 714# Digital Video Broadcasting Devices
@@ -695,7 +718,9 @@ CONFIG_HWMON=y
695# 718#
696# Graphics support 719# Graphics support
697# 720#
721CONFIG_FIRMWARE_EDID=y
698# CONFIG_FB is not set 722# CONFIG_FB is not set
723# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
699 724
700# 725#
701# Sound 726# Sound
@@ -707,6 +732,7 @@ CONFIG_HWMON=y
707# 732#
708CONFIG_USB_ARCH_HAS_HCD=y 733CONFIG_USB_ARCH_HAS_HCD=y
709CONFIG_USB_ARCH_HAS_OHCI=y 734CONFIG_USB_ARCH_HAS_OHCI=y
735CONFIG_USB_ARCH_HAS_EHCI=y
710# CONFIG_USB is not set 736# CONFIG_USB is not set
711 737
712# 738#
@@ -724,6 +750,19 @@ CONFIG_USB_ARCH_HAS_OHCI=y
724# CONFIG_MMC is not set 750# CONFIG_MMC is not set
725 751
726# 752#
753# LED devices
754#
755# CONFIG_NEW_LEDS is not set
756
757#
758# LED drivers
759#
760
761#
762# LED Triggers
763#
764
765#
727# InfiniBand support 766# InfiniBand support
728# 767#
729# CONFIG_INFINIBAND is not set 768# CONFIG_INFINIBAND is not set
@@ -733,6 +772,24 @@ CONFIG_USB_ARCH_HAS_OHCI=y
733# 772#
734 773
735# 774#
775# Real Time Clock
776#
777# CONFIG_RTC_CLASS is not set
778
779#
780# DMA Engine support
781#
782# CONFIG_DMA_ENGINE is not set
783
784#
785# DMA Clients
786#
787
788#
789# DMA Devices
790#
791
792#
736# File systems 793# File systems
737# 794#
738CONFIG_EXT2_FS=y 795CONFIG_EXT2_FS=y
@@ -753,6 +810,7 @@ CONFIG_FS_MBCACHE=y
753# CONFIG_MINIX_FS is not set 810# CONFIG_MINIX_FS is not set
754# CONFIG_ROMFS_FS is not set 811# CONFIG_ROMFS_FS is not set
755CONFIG_INOTIFY=y 812CONFIG_INOTIFY=y
813CONFIG_INOTIFY_USER=y
756# CONFIG_QUOTA is not set 814# CONFIG_QUOTA is not set
757CONFIG_DNOTIFY=y 815CONFIG_DNOTIFY=y
758# CONFIG_AUTOFS_FS is not set 816# CONFIG_AUTOFS_FS is not set
@@ -781,7 +839,6 @@ CONFIG_SYSFS=y
781CONFIG_TMPFS=y 839CONFIG_TMPFS=y
782# CONFIG_HUGETLB_PAGE is not set 840# CONFIG_HUGETLB_PAGE is not set
783CONFIG_RAMFS=y 841CONFIG_RAMFS=y
784# CONFIG_RELAYFS_FS is not set
785# CONFIG_CONFIGFS_FS is not set 842# CONFIG_CONFIGFS_FS is not set
786 843
787# 844#
@@ -854,6 +911,7 @@ CONFIG_PARTITION_ADVANCED=y
854# CONFIG_CRC16 is not set 911# CONFIG_CRC16 is not set
855CONFIG_CRC32=y 912CONFIG_CRC32=y
856# CONFIG_LIBCRC32C is not set 913# CONFIG_LIBCRC32C is not set
914CONFIG_PLIST=y
857 915
858# 916#
859# Instrumentation Support 917# Instrumentation Support
@@ -865,15 +923,13 @@ CONFIG_CRC32=y
865# 923#
866# CONFIG_PRINTK_TIME is not set 924# CONFIG_PRINTK_TIME is not set
867# CONFIG_MAGIC_SYSRQ is not set 925# CONFIG_MAGIC_SYSRQ is not set
926# CONFIG_UNUSED_SYMBOLS is not set
868# CONFIG_DEBUG_KERNEL is not set 927# CONFIG_DEBUG_KERNEL is not set
869CONFIG_LOG_BUF_SHIFT=14 928CONFIG_LOG_BUF_SHIFT=14
929# CONFIG_DEBUG_FS is not set
870# CONFIG_BOOTX_TEXT is not set 930# CONFIG_BOOTX_TEXT is not set
871# CONFIG_SERIAL_TEXT_DEBUG is not set 931# CONFIG_SERIAL_TEXT_DEBUG is not set
872# CONFIG_PPC_EARLY_DEBUG_LPAR is not set 932# CONFIG_PPC_EARLY_DEBUG is not set
873# CONFIG_PPC_EARLY_DEBUG_G5 is not set
874# CONFIG_PPC_EARLY_DEBUG_RTAS is not set
875# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
876# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
877 933
878# 934#
879# Security options 935# Security options
diff --git a/arch/powerpc/configs/mpc8540_ads_defconfig b/arch/powerpc/configs/mpc8540_ads_defconfig
index 7f0780f1aa39..67e7d0b5793d 100644
--- a/arch/powerpc/configs/mpc8540_ads_defconfig
+++ b/arch/powerpc/configs/mpc8540_ads_defconfig
@@ -1,16 +1,18 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.16 3# Linux kernel version: 2.6.18-rc6
4# Mon Mar 27 23:37:36 2006 4# Sun Sep 10 10:29:23 2006
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
11CONFIG_RWSEM_XCHGADD_ALGORITHM=y 12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
12CONFIG_GENERIC_HWEIGHT=y 13CONFIG_GENERIC_HWEIGHT=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y 14CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y
14CONFIG_PPC=y 16CONFIG_PPC=y
15CONFIG_EARLY_PRINTK=y 17CONFIG_EARLY_PRINTK=y
16CONFIG_GENERIC_NVRAM=y 18CONFIG_GENERIC_NVRAM=y
@@ -29,6 +31,7 @@ CONFIG_DEFAULT_UIMAGE=y
29# CONFIG_PPC_82xx is not set 31# CONFIG_PPC_82xx is not set
30# CONFIG_PPC_83xx is not set 32# CONFIG_PPC_83xx is not set
31CONFIG_PPC_85xx=y 33CONFIG_PPC_85xx=y
34# CONFIG_PPC_86xx is not set
32# CONFIG_40x is not set 35# CONFIG_40x is not set
33# CONFIG_44x is not set 36# CONFIG_44x is not set
34# CONFIG_8xx is not set 37# CONFIG_8xx is not set
@@ -39,6 +42,7 @@ CONFIG_BOOKE=y
39CONFIG_FSL_BOOKE=y 42CONFIG_FSL_BOOKE=y
40# CONFIG_PHYS_64BIT is not set 43# CONFIG_PHYS_64BIT is not set
41CONFIG_SPE=y 44CONFIG_SPE=y
45CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
42 46
43# 47#
44# Code maturity level options 48# Code maturity level options
@@ -56,6 +60,7 @@ CONFIG_SWAP=y
56CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
57# CONFIG_POSIX_MQUEUE is not set 61# CONFIG_POSIX_MQUEUE is not set
58# CONFIG_BSD_PROCESS_ACCT is not set 62# CONFIG_BSD_PROCESS_ACCT is not set
63# CONFIG_TASKSTATS is not set
59CONFIG_SYSCTL=y 64CONFIG_SYSCTL=y
60# CONFIG_AUDIT is not set 65# CONFIG_AUDIT is not set
61# CONFIG_IKCONFIG is not set 66# CONFIG_IKCONFIG is not set
@@ -71,10 +76,12 @@ CONFIG_PRINTK=y
71CONFIG_BUG=y 76CONFIG_BUG=y
72CONFIG_ELF_CORE=y 77CONFIG_ELF_CORE=y
73CONFIG_BASE_FULL=y 78CONFIG_BASE_FULL=y
79CONFIG_RT_MUTEXES=y
74CONFIG_FUTEX=y 80CONFIG_FUTEX=y
75CONFIG_EPOLL=y 81CONFIG_EPOLL=y
76CONFIG_SHMEM=y 82CONFIG_SHMEM=y
77CONFIG_SLAB=y 83CONFIG_SLAB=y
84CONFIG_VM_EVENT_COUNTERS=y
78# CONFIG_TINY_SHMEM is not set 85# CONFIG_TINY_SHMEM is not set
79CONFIG_BASE_SMALL=0 86CONFIG_BASE_SMALL=0
80# CONFIG_SLOB is not set 87# CONFIG_SLOB is not set
@@ -103,15 +110,16 @@ CONFIG_DEFAULT_AS=y
103# CONFIG_DEFAULT_CFQ is not set 110# CONFIG_DEFAULT_CFQ is not set
104# CONFIG_DEFAULT_NOOP is not set 111# CONFIG_DEFAULT_NOOP is not set
105CONFIG_DEFAULT_IOSCHED="anticipatory" 112CONFIG_DEFAULT_IOSCHED="anticipatory"
106CONFIG_MPIC=y
107# CONFIG_WANT_EARLY_SERIAL is not set 113# CONFIG_WANT_EARLY_SERIAL is not set
108 114
109# 115#
110# Platform support 116# Platform support
111# 117#
112CONFIG_MPC8540_ADS=y 118CONFIG_MPC8540_ADS=y
119# CONFIG_MPC85xx_CDS is not set
113CONFIG_MPC8540=y 120CONFIG_MPC8540=y
114CONFIG_PPC_INDIRECT_PCI_BE=y 121CONFIG_PPC_INDIRECT_PCI_BE=y
122CONFIG_MPIC=y
115 123
116# 124#
117# Kernel options 125# Kernel options
@@ -127,6 +135,7 @@ CONFIG_PREEMPT_NONE=y
127CONFIG_BINFMT_ELF=y 135CONFIG_BINFMT_ELF=y
128CONFIG_BINFMT_MISC=y 136CONFIG_BINFMT_MISC=y
129CONFIG_MATH_EMULATION=y 137CONFIG_MATH_EMULATION=y
138CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
130CONFIG_ARCH_FLATMEM_ENABLE=y 139CONFIG_ARCH_FLATMEM_ENABLE=y
131CONFIG_SELECT_MEMORY_MODEL=y 140CONFIG_SELECT_MEMORY_MODEL=y
132CONFIG_FLATMEM_MANUAL=y 141CONFIG_FLATMEM_MANUAL=y
@@ -136,16 +145,17 @@ CONFIG_FLATMEM=y
136CONFIG_FLAT_NODE_MEM_MAP=y 145CONFIG_FLAT_NODE_MEM_MAP=y
137# CONFIG_SPARSEMEM_STATIC is not set 146# CONFIG_SPARSEMEM_STATIC is not set
138CONFIG_SPLIT_PTLOCK_CPUS=4 147CONFIG_SPLIT_PTLOCK_CPUS=4
148# CONFIG_RESOURCES_64BIT is not set
139CONFIG_PROC_DEVICETREE=y 149CONFIG_PROC_DEVICETREE=y
140# CONFIG_CMDLINE_BOOL is not set 150# CONFIG_CMDLINE_BOOL is not set
141# CONFIG_PM is not set 151# CONFIG_PM is not set
142# CONFIG_SOFTWARE_SUSPEND is not set
143# CONFIG_SECCOMP is not set 152# CONFIG_SECCOMP is not set
144CONFIG_ISA_DMA_API=y 153CONFIG_ISA_DMA_API=y
145 154
146# 155#
147# Bus options 156# Bus options
148# 157#
158# CONFIG_MPIC_WEIRD is not set
149# CONFIG_PPC_I8259 is not set 159# CONFIG_PPC_I8259 is not set
150CONFIG_PPC_INDIRECT_PCI=y 160CONFIG_PPC_INDIRECT_PCI=y
151CONFIG_FSL_SOC=y 161CONFIG_FSL_SOC=y
@@ -187,6 +197,8 @@ CONFIG_NET=y
187CONFIG_PACKET=y 197CONFIG_PACKET=y
188# CONFIG_PACKET_MMAP is not set 198# CONFIG_PACKET_MMAP is not set
189CONFIG_UNIX=y 199CONFIG_UNIX=y
200CONFIG_XFRM=y
201CONFIG_XFRM_USER=y
190# CONFIG_NET_KEY is not set 202# CONFIG_NET_KEY is not set
191CONFIG_INET=y 203CONFIG_INET=y
192CONFIG_IP_MULTICAST=y 204CONFIG_IP_MULTICAST=y
@@ -204,12 +216,18 @@ CONFIG_SYN_COOKIES=y
204# CONFIG_INET_AH is not set 216# CONFIG_INET_AH is not set
205# CONFIG_INET_ESP is not set 217# CONFIG_INET_ESP is not set
206# CONFIG_INET_IPCOMP is not set 218# CONFIG_INET_IPCOMP is not set
219# CONFIG_INET_XFRM_TUNNEL is not set
207# CONFIG_INET_TUNNEL is not set 220# CONFIG_INET_TUNNEL is not set
221CONFIG_INET_XFRM_MODE_TRANSPORT=y
222CONFIG_INET_XFRM_MODE_TUNNEL=y
208CONFIG_INET_DIAG=y 223CONFIG_INET_DIAG=y
209CONFIG_INET_TCP_DIAG=y 224CONFIG_INET_TCP_DIAG=y
210# CONFIG_TCP_CONG_ADVANCED is not set 225# CONFIG_TCP_CONG_ADVANCED is not set
211CONFIG_TCP_CONG_BIC=y 226CONFIG_TCP_CONG_BIC=y
212# CONFIG_IPV6 is not set 227# CONFIG_IPV6 is not set
228# CONFIG_INET6_XFRM_TUNNEL is not set
229# CONFIG_INET6_TUNNEL is not set
230# CONFIG_NETWORK_SECMARK is not set
213# CONFIG_NETFILTER is not set 231# CONFIG_NETFILTER is not set
214 232
215# 233#
@@ -264,6 +282,7 @@ CONFIG_STANDALONE=y
264CONFIG_PREVENT_FIRMWARE_BUILD=y 282CONFIG_PREVENT_FIRMWARE_BUILD=y
265# CONFIG_FW_LOADER is not set 283# CONFIG_FW_LOADER is not set
266# CONFIG_DEBUG_DRIVER is not set 284# CONFIG_DEBUG_DRIVER is not set
285# CONFIG_SYS_HYPERVISOR is not set
267 286
268# 287#
269# Connector - unified userspace <-> kernelspace linker 288# Connector - unified userspace <-> kernelspace linker
@@ -295,6 +314,7 @@ CONFIG_BLK_DEV_LOOP=y
295CONFIG_BLK_DEV_RAM=y 314CONFIG_BLK_DEV_RAM=y
296CONFIG_BLK_DEV_RAM_COUNT=16 315CONFIG_BLK_DEV_RAM_COUNT=16
297CONFIG_BLK_DEV_RAM_SIZE=32768 316CONFIG_BLK_DEV_RAM_SIZE=32768
317CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
298CONFIG_BLK_DEV_INITRD=y 318CONFIG_BLK_DEV_INITRD=y
299# CONFIG_CDROM_PKTCDVD is not set 319# CONFIG_CDROM_PKTCDVD is not set
300# CONFIG_ATA_OVER_ETH is not set 320# CONFIG_ATA_OVER_ETH is not set
@@ -355,6 +375,9 @@ CONFIG_PHYLIB=y
355# CONFIG_QSEMI_PHY is not set 375# CONFIG_QSEMI_PHY is not set
356# CONFIG_LXT_PHY is not set 376# CONFIG_LXT_PHY is not set
357# CONFIG_CICADA_PHY is not set 377# CONFIG_CICADA_PHY is not set
378# CONFIG_VITESSE_PHY is not set
379# CONFIG_SMSC_PHY is not set
380# CONFIG_FIXED_PHY is not set
358 381
359# 382#
360# Ethernet (10 or 100Mbit) 383# Ethernet (10 or 100Mbit)
@@ -464,6 +487,7 @@ CONFIG_LEGACY_PTY_COUNT=256
464# Watchdog Cards 487# Watchdog Cards
465# 488#
466# CONFIG_WATCHDOG is not set 489# CONFIG_WATCHDOG is not set
490# CONFIG_HW_RANDOM is not set
467# CONFIG_NVRAM is not set 491# CONFIG_NVRAM is not set
468CONFIG_GEN_RTC=y 492CONFIG_GEN_RTC=y
469# CONFIG_GEN_RTC_X is not set 493# CONFIG_GEN_RTC_X is not set
@@ -473,7 +497,6 @@ CONFIG_GEN_RTC=y
473# 497#
474# Ftape, the floppy tape device driver 498# Ftape, the floppy tape device driver
475# 499#
476# CONFIG_AGP is not set
477# CONFIG_RAW_DRIVER is not set 500# CONFIG_RAW_DRIVER is not set
478 501
479# 502#
@@ -496,13 +519,13 @@ CONFIG_GEN_RTC=y
496# 519#
497# Dallas's 1-wire bus 520# Dallas's 1-wire bus
498# 521#
499# CONFIG_W1 is not set
500 522
501# 523#
502# Hardware Monitoring support 524# Hardware Monitoring support
503# 525#
504CONFIG_HWMON=y 526CONFIG_HWMON=y
505# CONFIG_HWMON_VID is not set 527# CONFIG_HWMON_VID is not set
528# CONFIG_SENSORS_ABITUGURU is not set
506# CONFIG_SENSORS_F71805F is not set 529# CONFIG_SENSORS_F71805F is not set
507# CONFIG_HWMON_DEBUG_CHIP is not set 530# CONFIG_HWMON_DEBUG_CHIP is not set
508 531
@@ -514,6 +537,7 @@ CONFIG_HWMON=y
514# Multimedia devices 537# Multimedia devices
515# 538#
516# CONFIG_VIDEO_DEV is not set 539# CONFIG_VIDEO_DEV is not set
540CONFIG_VIDEO_V4L2=y
517 541
518# 542#
519# Digital Video Broadcasting Devices 543# Digital Video Broadcasting Devices
@@ -523,7 +547,9 @@ CONFIG_HWMON=y
523# 547#
524# Graphics support 548# Graphics support
525# 549#
550CONFIG_FIRMWARE_EDID=y
526# CONFIG_FB is not set 551# CONFIG_FB is not set
552# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
527 553
528# 554#
529# Sound 555# Sound
@@ -552,6 +578,19 @@ CONFIG_HWMON=y
552# CONFIG_MMC is not set 578# CONFIG_MMC is not set
553 579
554# 580#
581# LED devices
582#
583# CONFIG_NEW_LEDS is not set
584
585#
586# LED drivers
587#
588
589#
590# LED Triggers
591#
592
593#
555# InfiniBand support 594# InfiniBand support
556# 595#
557 596
@@ -560,6 +599,24 @@ CONFIG_HWMON=y
560# 599#
561 600
562# 601#
602# Real Time Clock
603#
604# CONFIG_RTC_CLASS is not set
605
606#
607# DMA Engine support
608#
609# CONFIG_DMA_ENGINE is not set
610
611#
612# DMA Clients
613#
614
615#
616# DMA Devices
617#
618
619#
563# File systems 620# File systems
564# 621#
565CONFIG_EXT2_FS=y 622CONFIG_EXT2_FS=y
@@ -580,6 +637,7 @@ CONFIG_FS_MBCACHE=y
580# CONFIG_MINIX_FS is not set 637# CONFIG_MINIX_FS is not set
581# CONFIG_ROMFS_FS is not set 638# CONFIG_ROMFS_FS is not set
582CONFIG_INOTIFY=y 639CONFIG_INOTIFY=y
640CONFIG_INOTIFY_USER=y
583# CONFIG_QUOTA is not set 641# CONFIG_QUOTA is not set
584CONFIG_DNOTIFY=y 642CONFIG_DNOTIFY=y
585# CONFIG_AUTOFS_FS is not set 643# CONFIG_AUTOFS_FS is not set
@@ -677,6 +735,7 @@ CONFIG_PARTITION_ADVANCED=y
677# CONFIG_CRC16 is not set 735# CONFIG_CRC16 is not set
678CONFIG_CRC32=y 736CONFIG_CRC32=y
679# CONFIG_LIBCRC32C is not set 737# CONFIG_LIBCRC32C is not set
738CONFIG_PLIST=y
680 739
681# 740#
682# Instrumentation Support 741# Instrumentation Support
@@ -688,14 +747,19 @@ CONFIG_CRC32=y
688# 747#
689# CONFIG_PRINTK_TIME is not set 748# CONFIG_PRINTK_TIME is not set
690# CONFIG_MAGIC_SYSRQ is not set 749# CONFIG_MAGIC_SYSRQ is not set
750# CONFIG_UNUSED_SYMBOLS is not set
691CONFIG_DEBUG_KERNEL=y 751CONFIG_DEBUG_KERNEL=y
692CONFIG_LOG_BUF_SHIFT=14 752CONFIG_LOG_BUF_SHIFT=14
693CONFIG_DETECT_SOFTLOCKUP=y 753CONFIG_DETECT_SOFTLOCKUP=y
694# CONFIG_SCHEDSTATS is not set 754# CONFIG_SCHEDSTATS is not set
695# CONFIG_DEBUG_SLAB is not set 755# CONFIG_DEBUG_SLAB is not set
696CONFIG_DEBUG_MUTEXES=y 756# CONFIG_DEBUG_RT_MUTEXES is not set
757# CONFIG_RT_MUTEX_TESTER is not set
697# CONFIG_DEBUG_SPINLOCK is not set 758# CONFIG_DEBUG_SPINLOCK is not set
759CONFIG_DEBUG_MUTEXES=y
760# CONFIG_DEBUG_RWSEMS is not set
698# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 761# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
762# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
699# CONFIG_DEBUG_KOBJECT is not set 763# CONFIG_DEBUG_KOBJECT is not set
700# CONFIG_DEBUG_INFO is not set 764# CONFIG_DEBUG_INFO is not set
701# CONFIG_DEBUG_FS is not set 765# CONFIG_DEBUG_FS is not set
@@ -706,11 +770,7 @@ CONFIG_FORCED_INLINING=y
706# CONFIG_DEBUGGER is not set 770# CONFIG_DEBUGGER is not set
707# CONFIG_BDI_SWITCH is not set 771# CONFIG_BDI_SWITCH is not set
708# CONFIG_BOOTX_TEXT is not set 772# CONFIG_BOOTX_TEXT is not set
709# CONFIG_PPC_EARLY_DEBUG_LPAR is not set 773# CONFIG_PPC_EARLY_DEBUG is not set
710# CONFIG_PPC_EARLY_DEBUG_G5 is not set
711# CONFIG_PPC_EARLY_DEBUG_RTAS is not set
712# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
713# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
714 774
715# 775#
716# Security options 776# Security options
diff --git a/arch/powerpc/configs/mpc85xx_cds_defconfig b/arch/powerpc/configs/mpc85xx_cds_defconfig
index 9bb022a523fe..72edf9f66829 100644
--- a/arch/powerpc/configs/mpc85xx_cds_defconfig
+++ b/arch/powerpc/configs/mpc85xx_cds_defconfig
@@ -1,16 +1,18 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.16 3# Linux kernel version: 2.6.18-rc6
4# Sun Apr 2 11:23:42 2006 4# Sun Sep 10 10:29:49 2006
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
11CONFIG_RWSEM_XCHGADD_ALGORITHM=y 12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
12CONFIG_GENERIC_HWEIGHT=y 13CONFIG_GENERIC_HWEIGHT=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y 14CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y
14CONFIG_PPC=y 16CONFIG_PPC=y
15CONFIG_EARLY_PRINTK=y 17CONFIG_EARLY_PRINTK=y
16CONFIG_GENERIC_NVRAM=y 18CONFIG_GENERIC_NVRAM=y
@@ -19,7 +21,7 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
19CONFIG_PPC_OF=y 21CONFIG_PPC_OF=y
20CONFIG_PPC_UDBG_16550=y 22CONFIG_PPC_UDBG_16550=y
21# CONFIG_GENERIC_TBSYNC is not set 23# CONFIG_GENERIC_TBSYNC is not set
22# CONFIG_DEFAULT_UIMAGE is not set 24CONFIG_DEFAULT_UIMAGE=y
23 25
24# 26#
25# Processor support 27# Processor support
@@ -29,6 +31,7 @@ CONFIG_PPC_UDBG_16550=y
29# CONFIG_PPC_82xx is not set 31# CONFIG_PPC_82xx is not set
30# CONFIG_PPC_83xx is not set 32# CONFIG_PPC_83xx is not set
31CONFIG_PPC_85xx=y 33CONFIG_PPC_85xx=y
34# CONFIG_PPC_86xx is not set
32# CONFIG_40x is not set 35# CONFIG_40x is not set
33# CONFIG_44x is not set 36# CONFIG_44x is not set
34# CONFIG_8xx is not set 37# CONFIG_8xx is not set
@@ -39,6 +42,7 @@ CONFIG_BOOKE=y
39CONFIG_FSL_BOOKE=y 42CONFIG_FSL_BOOKE=y
40# CONFIG_PHYS_64BIT is not set 43# CONFIG_PHYS_64BIT is not set
41CONFIG_SPE=y 44CONFIG_SPE=y
45CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
42 46
43# 47#
44# Code maturity level options 48# Code maturity level options
@@ -56,6 +60,7 @@ CONFIG_SWAP=y
56CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
57# CONFIG_POSIX_MQUEUE is not set 61# CONFIG_POSIX_MQUEUE is not set
58# CONFIG_BSD_PROCESS_ACCT is not set 62# CONFIG_BSD_PROCESS_ACCT is not set
63# CONFIG_TASKSTATS is not set
59CONFIG_SYSCTL=y 64CONFIG_SYSCTL=y
60# CONFIG_AUDIT is not set 65# CONFIG_AUDIT is not set
61# CONFIG_IKCONFIG is not set 66# CONFIG_IKCONFIG is not set
@@ -71,10 +76,12 @@ CONFIG_PRINTK=y
71CONFIG_BUG=y 76CONFIG_BUG=y
72CONFIG_ELF_CORE=y 77CONFIG_ELF_CORE=y
73CONFIG_BASE_FULL=y 78CONFIG_BASE_FULL=y
79CONFIG_RT_MUTEXES=y
74CONFIG_FUTEX=y 80CONFIG_FUTEX=y
75CONFIG_EPOLL=y 81CONFIG_EPOLL=y
76CONFIG_SHMEM=y 82CONFIG_SHMEM=y
77CONFIG_SLAB=y 83CONFIG_SLAB=y
84CONFIG_VM_EVENT_COUNTERS=y
78# CONFIG_TINY_SHMEM is not set 85# CONFIG_TINY_SHMEM is not set
79CONFIG_BASE_SMALL=0 86CONFIG_BASE_SMALL=0
80# CONFIG_SLOB is not set 87# CONFIG_SLOB is not set
@@ -103,7 +110,6 @@ CONFIG_DEFAULT_AS=y
103# CONFIG_DEFAULT_CFQ is not set 110# CONFIG_DEFAULT_CFQ is not set
104# CONFIG_DEFAULT_NOOP is not set 111# CONFIG_DEFAULT_NOOP is not set
105CONFIG_DEFAULT_IOSCHED="anticipatory" 112CONFIG_DEFAULT_IOSCHED="anticipatory"
106CONFIG_MPIC=y
107# CONFIG_WANT_EARLY_SERIAL is not set 113# CONFIG_WANT_EARLY_SERIAL is not set
108 114
109# 115#
@@ -113,6 +119,7 @@ CONFIG_MPIC=y
113CONFIG_MPC85xx_CDS=y 119CONFIG_MPC85xx_CDS=y
114CONFIG_MPC8540=y 120CONFIG_MPC8540=y
115CONFIG_PPC_INDIRECT_PCI_BE=y 121CONFIG_PPC_INDIRECT_PCI_BE=y
122CONFIG_MPIC=y
116 123
117# 124#
118# Kernel options 125# Kernel options
@@ -128,6 +135,7 @@ CONFIG_PREEMPT_NONE=y
128CONFIG_BINFMT_ELF=y 135CONFIG_BINFMT_ELF=y
129CONFIG_BINFMT_MISC=y 136CONFIG_BINFMT_MISC=y
130CONFIG_MATH_EMULATION=y 137CONFIG_MATH_EMULATION=y
138CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
131CONFIG_ARCH_FLATMEM_ENABLE=y 139CONFIG_ARCH_FLATMEM_ENABLE=y
132CONFIG_SELECT_MEMORY_MODEL=y 140CONFIG_SELECT_MEMORY_MODEL=y
133CONFIG_FLATMEM_MANUAL=y 141CONFIG_FLATMEM_MANUAL=y
@@ -137,21 +145,23 @@ CONFIG_FLATMEM=y
137CONFIG_FLAT_NODE_MEM_MAP=y 145CONFIG_FLAT_NODE_MEM_MAP=y
138# CONFIG_SPARSEMEM_STATIC is not set 146# CONFIG_SPARSEMEM_STATIC is not set
139CONFIG_SPLIT_PTLOCK_CPUS=4 147CONFIG_SPLIT_PTLOCK_CPUS=4
148# CONFIG_RESOURCES_64BIT is not set
140CONFIG_PROC_DEVICETREE=y 149CONFIG_PROC_DEVICETREE=y
141# CONFIG_CMDLINE_BOOL is not set 150# CONFIG_CMDLINE_BOOL is not set
142# CONFIG_PM is not set 151# CONFIG_PM is not set
143# CONFIG_SOFTWARE_SUSPEND is not set
144# CONFIG_SECCOMP is not set 152# CONFIG_SECCOMP is not set
145CONFIG_ISA_DMA_API=y 153CONFIG_ISA_DMA_API=y
146 154
147# 155#
148# Bus options 156# Bus options
149# 157#
150CONFIG_PPC_I8259=y 158# CONFIG_MPIC_WEIRD is not set
159# CONFIG_PPC_I8259 is not set
151CONFIG_PPC_INDIRECT_PCI=y 160CONFIG_PPC_INDIRECT_PCI=y
152CONFIG_FSL_SOC=y 161CONFIG_FSL_SOC=y
153CONFIG_PCI=y 162CONFIG_PCI=y
154CONFIG_PCI_DOMAINS=y 163CONFIG_PCI_DOMAINS=y
164# CONFIG_PCIEPORTBUS is not set
155# CONFIG_PCI_DEBUG is not set 165# CONFIG_PCI_DEBUG is not set
156 166
157# 167#
@@ -190,6 +200,8 @@ CONFIG_NET=y
190CONFIG_PACKET=y 200CONFIG_PACKET=y
191# CONFIG_PACKET_MMAP is not set 201# CONFIG_PACKET_MMAP is not set
192CONFIG_UNIX=y 202CONFIG_UNIX=y
203CONFIG_XFRM=y
204CONFIG_XFRM_USER=y
193# CONFIG_NET_KEY is not set 205# CONFIG_NET_KEY is not set
194CONFIG_INET=y 206CONFIG_INET=y
195CONFIG_IP_MULTICAST=y 207CONFIG_IP_MULTICAST=y
@@ -209,6 +221,8 @@ CONFIG_SYN_COOKIES=y
209# CONFIG_INET_IPCOMP is not set 221# CONFIG_INET_IPCOMP is not set
210# CONFIG_INET_XFRM_TUNNEL is not set 222# CONFIG_INET_XFRM_TUNNEL is not set
211# CONFIG_INET_TUNNEL is not set 223# CONFIG_INET_TUNNEL is not set
224CONFIG_INET_XFRM_MODE_TRANSPORT=y
225CONFIG_INET_XFRM_MODE_TUNNEL=y
212CONFIG_INET_DIAG=y 226CONFIG_INET_DIAG=y
213CONFIG_INET_TCP_DIAG=y 227CONFIG_INET_TCP_DIAG=y
214# CONFIG_TCP_CONG_ADVANCED is not set 228# CONFIG_TCP_CONG_ADVANCED is not set
@@ -216,6 +230,7 @@ CONFIG_TCP_CONG_BIC=y
216# CONFIG_IPV6 is not set 230# CONFIG_IPV6 is not set
217# CONFIG_INET6_XFRM_TUNNEL is not set 231# CONFIG_INET6_XFRM_TUNNEL is not set
218# CONFIG_INET6_TUNNEL is not set 232# CONFIG_INET6_TUNNEL is not set
233# CONFIG_NETWORK_SECMARK is not set
219# CONFIG_NETFILTER is not set 234# CONFIG_NETFILTER is not set
220 235
221# 236#
@@ -270,6 +285,7 @@ CONFIG_STANDALONE=y
270CONFIG_PREVENT_FIRMWARE_BUILD=y 285CONFIG_PREVENT_FIRMWARE_BUILD=y
271# CONFIG_FW_LOADER is not set 286# CONFIG_FW_LOADER is not set
272# CONFIG_DEBUG_DRIVER is not set 287# CONFIG_DEBUG_DRIVER is not set
288# CONFIG_SYS_HYPERVISOR is not set
273 289
274# 290#
275# Connector - unified userspace <-> kernelspace linker 291# Connector - unified userspace <-> kernelspace linker
@@ -306,6 +322,7 @@ CONFIG_BLK_DEV_LOOP=y
306CONFIG_BLK_DEV_RAM=y 322CONFIG_BLK_DEV_RAM=y
307CONFIG_BLK_DEV_RAM_COUNT=16 323CONFIG_BLK_DEV_RAM_COUNT=16
308CONFIG_BLK_DEV_RAM_SIZE=32768 324CONFIG_BLK_DEV_RAM_SIZE=32768
325CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
309CONFIG_BLK_DEV_INITRD=y 326CONFIG_BLK_DEV_INITRD=y
310# CONFIG_CDROM_PKTCDVD is not set 327# CONFIG_CDROM_PKTCDVD is not set
311# CONFIG_ATA_OVER_ETH is not set 328# CONFIG_ATA_OVER_ETH is not set
@@ -425,6 +442,9 @@ CONFIG_PHYLIB=y
425# CONFIG_QSEMI_PHY is not set 442# CONFIG_QSEMI_PHY is not set
426# CONFIG_LXT_PHY is not set 443# CONFIG_LXT_PHY is not set
427# CONFIG_CICADA_PHY is not set 444# CONFIG_CICADA_PHY is not set
445# CONFIG_VITESSE_PHY is not set
446# CONFIG_SMSC_PHY is not set
447# CONFIG_FIXED_PHY is not set
428 448
429# 449#
430# Ethernet (10 or 100Mbit) 450# Ethernet (10 or 100Mbit)
@@ -470,6 +490,7 @@ CONFIG_GFAR_NAPI=y
470# CONFIG_CHELSIO_T1 is not set 490# CONFIG_CHELSIO_T1 is not set
471# CONFIG_IXGB is not set 491# CONFIG_IXGB is not set
472# CONFIG_S2IO is not set 492# CONFIG_S2IO is not set
493# CONFIG_MYRI10GE is not set
473 494
474# 495#
475# Token Ring devices 496# Token Ring devices
@@ -568,6 +589,7 @@ CONFIG_LEGACY_PTY_COUNT=256
568# Watchdog Cards 589# Watchdog Cards
569# 590#
570# CONFIG_WATCHDOG is not set 591# CONFIG_WATCHDOG is not set
592# CONFIG_HW_RANDOM is not set
571# CONFIG_NVRAM is not set 593# CONFIG_NVRAM is not set
572CONFIG_GEN_RTC=y 594CONFIG_GEN_RTC=y
573# CONFIG_GEN_RTC_X is not set 595# CONFIG_GEN_RTC_X is not set
@@ -602,13 +624,13 @@ CONFIG_GEN_RTC=y
602# 624#
603# Dallas's 1-wire bus 625# Dallas's 1-wire bus
604# 626#
605# CONFIG_W1 is not set
606 627
607# 628#
608# Hardware Monitoring support 629# Hardware Monitoring support
609# 630#
610CONFIG_HWMON=y 631CONFIG_HWMON=y
611# CONFIG_HWMON_VID is not set 632# CONFIG_HWMON_VID is not set
633# CONFIG_SENSORS_ABITUGURU is not set
612# CONFIG_SENSORS_F71805F is not set 634# CONFIG_SENSORS_F71805F is not set
613# CONFIG_HWMON_DEBUG_CHIP is not set 635# CONFIG_HWMON_DEBUG_CHIP is not set
614 636
@@ -620,6 +642,7 @@ CONFIG_HWMON=y
620# Multimedia devices 642# Multimedia devices
621# 643#
622# CONFIG_VIDEO_DEV is not set 644# CONFIG_VIDEO_DEV is not set
645CONFIG_VIDEO_V4L2=y
623 646
624# 647#
625# Digital Video Broadcasting Devices 648# Digital Video Broadcasting Devices
@@ -629,7 +652,9 @@ CONFIG_HWMON=y
629# 652#
630# Graphics support 653# Graphics support
631# 654#
655CONFIG_FIRMWARE_EDID=y
632# CONFIG_FB is not set 656# CONFIG_FB is not set
657# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
633 658
634# 659#
635# Sound 660# Sound
@@ -664,6 +689,14 @@ CONFIG_USB_ARCH_HAS_EHCI=y
664# CONFIG_NEW_LEDS is not set 689# CONFIG_NEW_LEDS is not set
665 690
666# 691#
692# LED drivers
693#
694
695#
696# LED Triggers
697#
698
699#
667# InfiniBand support 700# InfiniBand support
668# 701#
669# CONFIG_INFINIBAND is not set 702# CONFIG_INFINIBAND is not set
@@ -678,6 +711,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
678# CONFIG_RTC_CLASS is not set 711# CONFIG_RTC_CLASS is not set
679 712
680# 713#
714# DMA Engine support
715#
716# CONFIG_DMA_ENGINE is not set
717
718#
719# DMA Clients
720#
721
722#
723# DMA Devices
724#
725
726#
681# File systems 727# File systems
682# 728#
683CONFIG_EXT2_FS=y 729CONFIG_EXT2_FS=y
@@ -698,6 +744,7 @@ CONFIG_FS_MBCACHE=y
698# CONFIG_MINIX_FS is not set 744# CONFIG_MINIX_FS is not set
699# CONFIG_ROMFS_FS is not set 745# CONFIG_ROMFS_FS is not set
700CONFIG_INOTIFY=y 746CONFIG_INOTIFY=y
747CONFIG_INOTIFY_USER=y
701# CONFIG_QUOTA is not set 748# CONFIG_QUOTA is not set
702CONFIG_DNOTIFY=y 749CONFIG_DNOTIFY=y
703# CONFIG_AUTOFS_FS is not set 750# CONFIG_AUTOFS_FS is not set
@@ -795,6 +842,7 @@ CONFIG_PARTITION_ADVANCED=y
795# CONFIG_CRC16 is not set 842# CONFIG_CRC16 is not set
796CONFIG_CRC32=y 843CONFIG_CRC32=y
797# CONFIG_LIBCRC32C is not set 844# CONFIG_LIBCRC32C is not set
845CONFIG_PLIST=y
798 846
799# 847#
800# Instrumentation Support 848# Instrumentation Support
@@ -806,14 +854,19 @@ CONFIG_CRC32=y
806# 854#
807# CONFIG_PRINTK_TIME is not set 855# CONFIG_PRINTK_TIME is not set
808# CONFIG_MAGIC_SYSRQ is not set 856# CONFIG_MAGIC_SYSRQ is not set
857# CONFIG_UNUSED_SYMBOLS is not set
809CONFIG_DEBUG_KERNEL=y 858CONFIG_DEBUG_KERNEL=y
810CONFIG_LOG_BUF_SHIFT=14 859CONFIG_LOG_BUF_SHIFT=14
811CONFIG_DETECT_SOFTLOCKUP=y 860CONFIG_DETECT_SOFTLOCKUP=y
812# CONFIG_SCHEDSTATS is not set 861# CONFIG_SCHEDSTATS is not set
813# CONFIG_DEBUG_SLAB is not set 862# CONFIG_DEBUG_SLAB is not set
814CONFIG_DEBUG_MUTEXES=y 863# CONFIG_DEBUG_RT_MUTEXES is not set
864# CONFIG_RT_MUTEX_TESTER is not set
815# CONFIG_DEBUG_SPINLOCK is not set 865# CONFIG_DEBUG_SPINLOCK is not set
866CONFIG_DEBUG_MUTEXES=y
867# CONFIG_DEBUG_RWSEMS is not set
816# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 868# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
869# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
817# CONFIG_DEBUG_KOBJECT is not set 870# CONFIG_DEBUG_KOBJECT is not set
818# CONFIG_DEBUG_INFO is not set 871# CONFIG_DEBUG_INFO is not set
819# CONFIG_DEBUG_FS is not set 872# CONFIG_DEBUG_FS is not set
@@ -824,11 +877,7 @@ CONFIG_FORCED_INLINING=y
824# CONFIG_DEBUGGER is not set 877# CONFIG_DEBUGGER is not set
825# CONFIG_BDI_SWITCH is not set 878# CONFIG_BDI_SWITCH is not set
826# CONFIG_BOOTX_TEXT is not set 879# CONFIG_BOOTX_TEXT is not set
827# CONFIG_PPC_EARLY_DEBUG_LPAR is not set 880# CONFIG_PPC_EARLY_DEBUG is not set
828# CONFIG_PPC_EARLY_DEBUG_G5 is not set
829# CONFIG_PPC_EARLY_DEBUG_RTAS is not set
830# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
831# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
832 881
833# 882#
834# Security options 883# Security options
diff --git a/arch/powerpc/configs/mpc8641_hpcn_defconfig b/arch/powerpc/configs/mpc8641_hpcn_defconfig
index d7a30f9bc535..92a527fccf83 100644
--- a/arch/powerpc/configs/mpc8641_hpcn_defconfig
+++ b/arch/powerpc/configs/mpc8641_hpcn_defconfig
@@ -1,16 +1,18 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17-rc3 3# Linux kernel version: 2.6.18-rc6
4# Fri Jun 16 10:47:09 2006 4# Sun Sep 10 10:30:15 2006
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y 8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
11CONFIG_RWSEM_XCHGADD_ALGORITHM=y 12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
12CONFIG_GENERIC_HWEIGHT=y 13CONFIG_GENERIC_HWEIGHT=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y 14CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y
14CONFIG_PPC=y 16CONFIG_PPC=y
15CONFIG_EARLY_PRINTK=y 17CONFIG_EARLY_PRINTK=y
16CONFIG_GENERIC_NVRAM=y 18CONFIG_GENERIC_NVRAM=y
@@ -41,6 +43,7 @@ CONFIG_PPC_STD_MMU=y
41CONFIG_PPC_STD_MMU_32=y 43CONFIG_PPC_STD_MMU_32=y
42CONFIG_SMP=y 44CONFIG_SMP=y
43CONFIG_NR_CPUS=2 45CONFIG_NR_CPUS=2
46CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
44 47
45# 48#
46# Code maturity level options 49# Code maturity level options
@@ -58,6 +61,7 @@ CONFIG_LOCALVERSION=""
58# CONFIG_SYSVIPC is not set 61# CONFIG_SYSVIPC is not set
59# CONFIG_POSIX_MQUEUE is not set 62# CONFIG_POSIX_MQUEUE is not set
60# CONFIG_BSD_PROCESS_ACCT is not set 63# CONFIG_BSD_PROCESS_ACCT is not set
64# CONFIG_TASKSTATS is not set
61CONFIG_SYSCTL=y 65CONFIG_SYSCTL=y
62# CONFIG_AUDIT is not set 66# CONFIG_AUDIT is not set
63CONFIG_IKCONFIG=y 67CONFIG_IKCONFIG=y
@@ -75,10 +79,12 @@ CONFIG_PRINTK=y
75CONFIG_BUG=y 79CONFIG_BUG=y
76# CONFIG_ELF_CORE is not set 80# CONFIG_ELF_CORE is not set
77CONFIG_BASE_FULL=y 81CONFIG_BASE_FULL=y
82CONFIG_RT_MUTEXES=y
78CONFIG_FUTEX=y 83CONFIG_FUTEX=y
79CONFIG_EPOLL=y 84CONFIG_EPOLL=y
80CONFIG_SHMEM=y 85CONFIG_SHMEM=y
81# CONFIG_SLAB is not set 86# CONFIG_SLAB is not set
87CONFIG_VM_EVENT_COUNTERS=y
82# CONFIG_TINY_SHMEM is not set 88# CONFIG_TINY_SHMEM is not set
83CONFIG_BASE_SMALL=0 89CONFIG_BASE_SMALL=0
84CONFIG_SLOB=y 90CONFIG_SLOB=y
@@ -107,9 +113,9 @@ CONFIG_DEFAULT_DEADLINE=y
107# CONFIG_DEFAULT_CFQ is not set 113# CONFIG_DEFAULT_CFQ is not set
108# CONFIG_DEFAULT_NOOP is not set 114# CONFIG_DEFAULT_NOOP is not set
109CONFIG_DEFAULT_IOSCHED="deadline" 115CONFIG_DEFAULT_IOSCHED="deadline"
110CONFIG_MPIC=y
111# CONFIG_WANT_EARLY_SERIAL is not set 116# CONFIG_WANT_EARLY_SERIAL is not set
112CONFIG_PPC_INDIRECT_PCI_BE=y 117CONFIG_PPC_INDIRECT_PCI_BE=y
118CONFIG_MPIC=y
113 119
114# 120#
115# Platform Support 121# Platform Support
@@ -131,6 +137,7 @@ CONFIG_PREEMPT_NONE=y
131CONFIG_PREEMPT_BKL=y 137CONFIG_PREEMPT_BKL=y
132CONFIG_BINFMT_ELF=y 138CONFIG_BINFMT_ELF=y
133# CONFIG_BINFMT_MISC is not set 139# CONFIG_BINFMT_MISC is not set
140CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
134# CONFIG_IRQ_ALL_CPUS is not set 141# CONFIG_IRQ_ALL_CPUS is not set
135CONFIG_ARCH_FLATMEM_ENABLE=y 142CONFIG_ARCH_FLATMEM_ENABLE=y
136CONFIG_SELECT_MEMORY_MODEL=y 143CONFIG_SELECT_MEMORY_MODEL=y
@@ -141,6 +148,7 @@ CONFIG_FLATMEM=y
141CONFIG_FLAT_NODE_MEM_MAP=y 148CONFIG_FLAT_NODE_MEM_MAP=y
142# CONFIG_SPARSEMEM_STATIC is not set 149# CONFIG_SPARSEMEM_STATIC is not set
143CONFIG_SPLIT_PTLOCK_CPUS=4 150CONFIG_SPLIT_PTLOCK_CPUS=4
151# CONFIG_RESOURCES_64BIT is not set
144CONFIG_PROC_DEVICETREE=y 152CONFIG_PROC_DEVICETREE=y
145# CONFIG_CMDLINE_BOOL is not set 153# CONFIG_CMDLINE_BOOL is not set
146# CONFIG_PM is not set 154# CONFIG_PM is not set
@@ -151,11 +159,13 @@ CONFIG_ISA_DMA_API=y
151# Bus options 159# Bus options
152# 160#
153CONFIG_GENERIC_ISA_DMA=y 161CONFIG_GENERIC_ISA_DMA=y
162# CONFIG_MPIC_WEIRD is not set
154CONFIG_PPC_I8259=y 163CONFIG_PPC_I8259=y
155CONFIG_PPC_INDIRECT_PCI=y 164CONFIG_PPC_INDIRECT_PCI=y
156CONFIG_FSL_SOC=y 165CONFIG_FSL_SOC=y
157CONFIG_PCI=y 166CONFIG_PCI=y
158CONFIG_PCI_DOMAINS=y 167CONFIG_PCI_DOMAINS=y
168# CONFIG_PCIEPORTBUS is not set
159# CONFIG_PCI_DEBUG is not set 169# CONFIG_PCI_DEBUG is not set
160 170
161# 171#
@@ -194,6 +204,8 @@ CONFIG_NET=y
194CONFIG_PACKET=y 204CONFIG_PACKET=y
195# CONFIG_PACKET_MMAP is not set 205# CONFIG_PACKET_MMAP is not set
196CONFIG_UNIX=y 206CONFIG_UNIX=y
207CONFIG_XFRM=y
208CONFIG_XFRM_USER=y
197# CONFIG_NET_KEY is not set 209# CONFIG_NET_KEY is not set
198CONFIG_INET=y 210CONFIG_INET=y
199# CONFIG_IP_MULTICAST is not set 211# CONFIG_IP_MULTICAST is not set
@@ -212,6 +224,8 @@ CONFIG_IP_PNP_RARP=y
212# CONFIG_INET_IPCOMP is not set 224# CONFIG_INET_IPCOMP is not set
213# CONFIG_INET_XFRM_TUNNEL is not set 225# CONFIG_INET_XFRM_TUNNEL is not set
214# CONFIG_INET_TUNNEL is not set 226# CONFIG_INET_TUNNEL is not set
227CONFIG_INET_XFRM_MODE_TRANSPORT=y
228CONFIG_INET_XFRM_MODE_TUNNEL=y
215CONFIG_INET_DIAG=y 229CONFIG_INET_DIAG=y
216CONFIG_INET_TCP_DIAG=y 230CONFIG_INET_TCP_DIAG=y
217# CONFIG_TCP_CONG_ADVANCED is not set 231# CONFIG_TCP_CONG_ADVANCED is not set
@@ -224,7 +238,10 @@ CONFIG_IPV6=y
224# CONFIG_INET6_IPCOMP is not set 238# CONFIG_INET6_IPCOMP is not set
225# CONFIG_INET6_XFRM_TUNNEL is not set 239# CONFIG_INET6_XFRM_TUNNEL is not set
226# CONFIG_INET6_TUNNEL is not set 240# CONFIG_INET6_TUNNEL is not set
241CONFIG_INET6_XFRM_MODE_TRANSPORT=y
242CONFIG_INET6_XFRM_MODE_TUNNEL=y
227# CONFIG_IPV6_TUNNEL is not set 243# CONFIG_IPV6_TUNNEL is not set
244# CONFIG_NETWORK_SECMARK is not set
228# CONFIG_NETFILTER is not set 245# CONFIG_NETFILTER is not set
229 246
230# 247#
@@ -279,6 +296,7 @@ CONFIG_STANDALONE=y
279CONFIG_PREVENT_FIRMWARE_BUILD=y 296CONFIG_PREVENT_FIRMWARE_BUILD=y
280CONFIG_FW_LOADER=y 297CONFIG_FW_LOADER=y
281# CONFIG_DEBUG_DRIVER is not set 298# CONFIG_DEBUG_DRIVER is not set
299# CONFIG_SYS_HYPERVISOR is not set
282 300
283# 301#
284# Connector - unified userspace <-> kernelspace linker 302# Connector - unified userspace <-> kernelspace linker
@@ -315,6 +333,7 @@ CONFIG_BLK_DEV_LOOP=y
315CONFIG_BLK_DEV_RAM=y 333CONFIG_BLK_DEV_RAM=y
316CONFIG_BLK_DEV_RAM_COUNT=16 334CONFIG_BLK_DEV_RAM_COUNT=16
317CONFIG_BLK_DEV_RAM_SIZE=131072 335CONFIG_BLK_DEV_RAM_SIZE=131072
336CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
318CONFIG_BLK_DEV_INITRD=y 337CONFIG_BLK_DEV_INITRD=y
319# CONFIG_CDROM_PKTCDVD is not set 338# CONFIG_CDROM_PKTCDVD is not set
320# CONFIG_ATA_OVER_ETH is not set 339# CONFIG_ATA_OVER_ETH is not set
@@ -383,6 +402,8 @@ CONFIG_PHYLIB=y
383# CONFIG_LXT_PHY is not set 402# CONFIG_LXT_PHY is not set
384# CONFIG_CICADA_PHY is not set 403# CONFIG_CICADA_PHY is not set
385CONFIG_VITESSE_PHY=y 404CONFIG_VITESSE_PHY=y
405# CONFIG_SMSC_PHY is not set
406# CONFIG_FIXED_PHY is not set
386 407
387# 408#
388# Ethernet (10 or 100Mbit) 409# Ethernet (10 or 100Mbit)
@@ -426,6 +447,7 @@ CONFIG_GIANFAR=y
426# CONFIG_CHELSIO_T1 is not set 447# CONFIG_CHELSIO_T1 is not set
427# CONFIG_IXGB is not set 448# CONFIG_IXGB is not set
428# CONFIG_S2IO is not set 449# CONFIG_S2IO is not set
450# CONFIG_MYRI10GE is not set
429 451
430# 452#
431# Token Ring devices 453# Token Ring devices
@@ -500,6 +522,7 @@ CONFIG_SERIO_LIBPS2=y
500CONFIG_VT=y 522CONFIG_VT=y
501CONFIG_VT_CONSOLE=y 523CONFIG_VT_CONSOLE=y
502CONFIG_HW_CONSOLE=y 524CONFIG_HW_CONSOLE=y
525# CONFIG_VT_HW_CONSOLE_BINDING is not set
503# CONFIG_SERIAL_NONSTANDARD is not set 526# CONFIG_SERIAL_NONSTANDARD is not set
504 527
505# 528#
@@ -534,6 +557,7 @@ CONFIG_UNIX98_PTYS=y
534# Watchdog Cards 557# Watchdog Cards
535# 558#
536# CONFIG_WATCHDOG is not set 559# CONFIG_WATCHDOG is not set
560# CONFIG_HW_RANDOM is not set
537# CONFIG_NVRAM is not set 561# CONFIG_NVRAM is not set
538# CONFIG_GEN_RTC is not set 562# CONFIG_GEN_RTC is not set
539# CONFIG_DTLK is not set 563# CONFIG_DTLK is not set
@@ -579,6 +603,7 @@ CONFIG_I2C=y
579# CONFIG_I2C_PIIX4 is not set 603# CONFIG_I2C_PIIX4 is not set
580CONFIG_I2C_MPC=y 604CONFIG_I2C_MPC=y
581# CONFIG_I2C_NFORCE2 is not set 605# CONFIG_I2C_NFORCE2 is not set
606# CONFIG_I2C_OCORES is not set
582# CONFIG_I2C_PARPORT_LIGHT is not set 607# CONFIG_I2C_PARPORT_LIGHT is not set
583# CONFIG_I2C_PROSAVAGE is not set 608# CONFIG_I2C_PROSAVAGE is not set
584# CONFIG_I2C_SAVAGE4 is not set 609# CONFIG_I2C_SAVAGE4 is not set
@@ -615,7 +640,6 @@ CONFIG_SENSORS_EEPROM=y
615# 640#
616# Dallas's 1-wire bus 641# Dallas's 1-wire bus
617# 642#
618# CONFIG_W1 is not set
619 643
620# 644#
621# Hardware Monitoring support 645# Hardware Monitoring support
@@ -631,6 +655,7 @@ CONFIG_SENSORS_EEPROM=y
631# Multimedia devices 655# Multimedia devices
632# 656#
633# CONFIG_VIDEO_DEV is not set 657# CONFIG_VIDEO_DEV is not set
658CONFIG_VIDEO_V4L2=y
634 659
635# 660#
636# Digital Video Broadcasting Devices 661# Digital Video Broadcasting Devices
@@ -640,6 +665,7 @@ CONFIG_SENSORS_EEPROM=y
640# 665#
641# Graphics support 666# Graphics support
642# 667#
668CONFIG_FIRMWARE_EDID=y
643# CONFIG_FB is not set 669# CONFIG_FB is not set
644 670
645# 671#
@@ -648,6 +674,7 @@ CONFIG_SENSORS_EEPROM=y
648CONFIG_VGA_CONSOLE=y 674CONFIG_VGA_CONSOLE=y
649# CONFIG_VGACON_SOFT_SCROLLBACK is not set 675# CONFIG_VGACON_SOFT_SCROLLBACK is not set
650CONFIG_DUMMY_CONSOLE=y 676CONFIG_DUMMY_CONSOLE=y
677# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
651 678
652# 679#
653# Sound 680# Sound
@@ -704,6 +731,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
704# CONFIG_RTC_CLASS is not set 731# CONFIG_RTC_CLASS is not set
705 732
706# 733#
734# DMA Engine support
735#
736# CONFIG_DMA_ENGINE is not set
737
738#
739# DMA Clients
740#
741
742#
743# DMA Devices
744#
745
746#
707# File systems 747# File systems
708# 748#
709CONFIG_EXT2_FS=y 749CONFIG_EXT2_FS=y
@@ -870,6 +910,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
870# CONFIG_CRC16 is not set 910# CONFIG_CRC16 is not set
871CONFIG_CRC32=y 911CONFIG_CRC32=y
872# CONFIG_LIBCRC32C is not set 912# CONFIG_LIBCRC32C is not set
913CONFIG_PLIST=y
873 914
874# 915#
875# Instrumentation Support 916# Instrumentation Support
@@ -881,13 +922,18 @@ CONFIG_CRC32=y
881# 922#
882# CONFIG_PRINTK_TIME is not set 923# CONFIG_PRINTK_TIME is not set
883# CONFIG_MAGIC_SYSRQ is not set 924# CONFIG_MAGIC_SYSRQ is not set
925# CONFIG_UNUSED_SYMBOLS is not set
884CONFIG_DEBUG_KERNEL=y 926CONFIG_DEBUG_KERNEL=y
885CONFIG_LOG_BUF_SHIFT=14 927CONFIG_LOG_BUF_SHIFT=14
886CONFIG_DETECT_SOFTLOCKUP=y 928CONFIG_DETECT_SOFTLOCKUP=y
887# CONFIG_SCHEDSTATS is not set 929# CONFIG_SCHEDSTATS is not set
888# CONFIG_DEBUG_MUTEXES is not set 930# CONFIG_DEBUG_RT_MUTEXES is not set
931# CONFIG_RT_MUTEX_TESTER is not set
889# CONFIG_DEBUG_SPINLOCK is not set 932# CONFIG_DEBUG_SPINLOCK is not set
933# CONFIG_DEBUG_MUTEXES is not set
934# CONFIG_DEBUG_RWSEMS is not set
890# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 935# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
936# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
891# CONFIG_DEBUG_KOBJECT is not set 937# CONFIG_DEBUG_KOBJECT is not set
892# CONFIG_DEBUG_HIGHMEM is not set 938# CONFIG_DEBUG_HIGHMEM is not set
893# CONFIG_DEBUG_INFO is not set 939# CONFIG_DEBUG_INFO is not set
@@ -899,11 +945,7 @@ CONFIG_FORCED_INLINING=y
899# CONFIG_DEBUGGER is not set 945# CONFIG_DEBUGGER is not set
900# CONFIG_BDI_SWITCH is not set 946# CONFIG_BDI_SWITCH is not set
901# CONFIG_BOOTX_TEXT is not set 947# CONFIG_BOOTX_TEXT is not set
902# CONFIG_PPC_EARLY_DEBUG_LPAR is not set 948# CONFIG_PPC_EARLY_DEBUG is not set
903# CONFIG_PPC_EARLY_DEBUG_G5 is not set
904# CONFIG_PPC_EARLY_DEBUG_RTAS is not set
905# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
906# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
907 949
908# 950#
909# Security options 951# Security options
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
index 3545af9896af..6861dde7d77b 100644
--- a/arch/powerpc/configs/pmac32_defconfig
+++ b/arch/powerpc/configs/pmac32_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17 3# Linux kernel version: 2.6.18-rc6
4# Mon Jul 3 14:20:49 2006 4# Sun Sep 10 10:30:23 2006
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -60,6 +60,7 @@ CONFIG_SWAP=y
60CONFIG_SYSVIPC=y 60CONFIG_SYSVIPC=y
61CONFIG_POSIX_MQUEUE=y 61CONFIG_POSIX_MQUEUE=y
62# CONFIG_BSD_PROCESS_ACCT is not set 62# CONFIG_BSD_PROCESS_ACCT is not set
63# CONFIG_TASKSTATS is not set
63CONFIG_SYSCTL=y 64CONFIG_SYSCTL=y
64# CONFIG_AUDIT is not set 65# CONFIG_AUDIT is not set
65CONFIG_IKCONFIG=y 66CONFIG_IKCONFIG=y
@@ -128,7 +129,6 @@ CONFIG_PPC_PMAC=y
128# CONFIG_PPC_CELL is not set 129# CONFIG_PPC_CELL is not set
129# CONFIG_PPC_CELL_NATIVE is not set 130# CONFIG_PPC_CELL_NATIVE is not set
130# CONFIG_UDBG_RTAS_CONSOLE is not set 131# CONFIG_UDBG_RTAS_CONSOLE is not set
131CONFIG_MPIC=y
132# CONFIG_PPC_RTAS is not set 132# CONFIG_PPC_RTAS is not set
133# CONFIG_MMIO_NVRAM is not set 133# CONFIG_MMIO_NVRAM is not set
134CONFIG_PPC_MPC106=y 134CONFIG_PPC_MPC106=y
@@ -149,6 +149,7 @@ CONFIG_CPU_FREQ_PMAC=y
149CONFIG_PPC601_SYNC_FIX=y 149CONFIG_PPC601_SYNC_FIX=y
150# CONFIG_TAU is not set 150# CONFIG_TAU is not set
151# CONFIG_WANT_EARLY_SERIAL is not set 151# CONFIG_WANT_EARLY_SERIAL is not set
152CONFIG_MPIC=y
152 153
153# 154#
154# Kernel options 155# Kernel options
@@ -189,6 +190,7 @@ CONFIG_ISA_DMA_API=y
189# Bus options 190# Bus options
190# 191#
191CONFIG_GENERIC_ISA_DMA=y 192CONFIG_GENERIC_ISA_DMA=y
193# CONFIG_MPIC_WEIRD is not set
192# CONFIG_PPC_I8259 is not set 194# CONFIG_PPC_I8259 is not set
193CONFIG_PPC_INDIRECT_PCI=y 195CONFIG_PPC_INDIRECT_PCI=y
194CONFIG_PCI=y 196CONFIG_PCI=y
@@ -559,6 +561,7 @@ CONFIG_BLK_DEV_UB=m
559CONFIG_BLK_DEV_RAM=y 561CONFIG_BLK_DEV_RAM=y
560CONFIG_BLK_DEV_RAM_COUNT=16 562CONFIG_BLK_DEV_RAM_COUNT=16
561CONFIG_BLK_DEV_RAM_SIZE=4096 563CONFIG_BLK_DEV_RAM_SIZE=4096
564CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
562CONFIG_BLK_DEV_INITRD=y 565CONFIG_BLK_DEV_INITRD=y
563# CONFIG_CDROM_PKTCDVD is not set 566# CONFIG_CDROM_PKTCDVD is not set
564# CONFIG_ATA_OVER_ETH is not set 567# CONFIG_ATA_OVER_ETH is not set
@@ -1502,7 +1505,6 @@ CONFIG_USB_MON=y
1502CONFIG_USB_SERIAL=m 1505CONFIG_USB_SERIAL=m
1503# CONFIG_USB_SERIAL_GENERIC is not set 1506# CONFIG_USB_SERIAL_GENERIC is not set
1504# CONFIG_USB_SERIAL_AIRPRIME is not set 1507# CONFIG_USB_SERIAL_AIRPRIME is not set
1505# CONFIG_USB_SERIAL_ANYDATA is not set
1506# CONFIG_USB_SERIAL_ARK3116 is not set 1508# CONFIG_USB_SERIAL_ARK3116 is not set
1507# CONFIG_USB_SERIAL_BELKIN is not set 1509# CONFIG_USB_SERIAL_BELKIN is not set
1508# CONFIG_USB_SERIAL_WHITEHEAT is not set 1510# CONFIG_USB_SERIAL_WHITEHEAT is not set
@@ -1540,6 +1542,7 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
1540# CONFIG_USB_SERIAL_PL2303 is not set 1542# CONFIG_USB_SERIAL_PL2303 is not set
1541# CONFIG_USB_SERIAL_HP4X is not set 1543# CONFIG_USB_SERIAL_HP4X is not set
1542# CONFIG_USB_SERIAL_SAFE is not set 1544# CONFIG_USB_SERIAL_SAFE is not set
1545# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
1543# CONFIG_USB_SERIAL_TI is not set 1546# CONFIG_USB_SERIAL_TI is not set
1544# CONFIG_USB_SERIAL_CYBERJACK is not set 1547# CONFIG_USB_SERIAL_CYBERJACK is not set
1545# CONFIG_USB_SERIAL_XIRCOM is not set 1548# CONFIG_USB_SERIAL_XIRCOM is not set
@@ -1557,7 +1560,7 @@ CONFIG_USB_EZUSB=y
1557# CONFIG_USB_LEGOTOWER is not set 1560# CONFIG_USB_LEGOTOWER is not set
1558# CONFIG_USB_LCD is not set 1561# CONFIG_USB_LCD is not set
1559# CONFIG_USB_LED is not set 1562# CONFIG_USB_LED is not set
1560# CONFIG_USB_CY7C63 is not set 1563# CONFIG_USB_CYPRESS_CY7C63 is not set
1561# CONFIG_USB_CYTHERM is not set 1564# CONFIG_USB_CYTHERM is not set
1562# CONFIG_USB_PHIDGETKIT is not set 1565# CONFIG_USB_PHIDGETKIT is not set
1563# CONFIG_USB_PHIDGETSERVO is not set 1566# CONFIG_USB_PHIDGETSERVO is not set
@@ -1728,7 +1731,6 @@ CONFIG_RPCSEC_GSS_KRB5=y
1728CONFIG_SMB_FS=m 1731CONFIG_SMB_FS=m
1729# CONFIG_SMB_NLS_DEFAULT is not set 1732# CONFIG_SMB_NLS_DEFAULT is not set
1730# CONFIG_CIFS is not set 1733# CONFIG_CIFS is not set
1731# CONFIG_CIFS_DEBUG2 is not set
1732# CONFIG_NCP_FS is not set 1734# CONFIG_NCP_FS is not set
1733# CONFIG_CODA_FS is not set 1735# CONFIG_CODA_FS is not set
1734# CONFIG_AFS_FS is not set 1736# CONFIG_AFS_FS is not set
@@ -1831,11 +1833,13 @@ CONFIG_LOG_BUF_SHIFT=14
1831CONFIG_DETECT_SOFTLOCKUP=y 1833CONFIG_DETECT_SOFTLOCKUP=y
1832# CONFIG_SCHEDSTATS is not set 1834# CONFIG_SCHEDSTATS is not set
1833# CONFIG_DEBUG_SLAB is not set 1835# CONFIG_DEBUG_SLAB is not set
1834# CONFIG_DEBUG_MUTEXES is not set
1835# CONFIG_DEBUG_RT_MUTEXES is not set 1836# CONFIG_DEBUG_RT_MUTEXES is not set
1836# CONFIG_RT_MUTEX_TESTER is not set 1837# CONFIG_RT_MUTEX_TESTER is not set
1837# CONFIG_DEBUG_SPINLOCK is not set 1838# CONFIG_DEBUG_SPINLOCK is not set
1839# CONFIG_DEBUG_MUTEXES is not set
1840# CONFIG_DEBUG_RWSEMS is not set
1838# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1841# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1842# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1839# CONFIG_DEBUG_KOBJECT is not set 1843# CONFIG_DEBUG_KOBJECT is not set
1840# CONFIG_DEBUG_INFO is not set 1844# CONFIG_DEBUG_INFO is not set
1841# CONFIG_DEBUG_FS is not set 1845# CONFIG_DEBUG_FS is not set
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 395e49847788..7517d0c5303f 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -1,15 +1,18 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.16-rc2 3# Linux kernel version: 2.6.18-rc6
4# Fri Feb 10 17:32:14 2006 4# Sun Sep 10 10:45:11 2006
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
8CONFIG_PPC_MERGE=y 8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
11CONFIG_RWSEM_XCHGADD_ALGORITHM=y 12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_GENERIC_HWEIGHT=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y 14CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y
13CONFIG_PPC=y 16CONFIG_PPC=y
14CONFIG_EARLY_PRINTK=y 17CONFIG_EARLY_PRINTK=y
15CONFIG_COMPAT=y 18CONFIG_COMPAT=y
@@ -30,8 +33,10 @@ CONFIG_POWER4=y
30CONFIG_PPC_FPU=y 33CONFIG_PPC_FPU=y
31CONFIG_ALTIVEC=y 34CONFIG_ALTIVEC=y
32CONFIG_PPC_STD_MMU=y 35CONFIG_PPC_STD_MMU=y
36CONFIG_VIRT_CPU_ACCOUNTING=y
33CONFIG_SMP=y 37CONFIG_SMP=y
34CONFIG_NR_CPUS=32 38CONFIG_NR_CPUS=32
39CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
35 40
36# 41#
37# Code maturity level options 42# Code maturity level options
@@ -49,11 +54,14 @@ CONFIG_SWAP=y
49CONFIG_SYSVIPC=y 54CONFIG_SYSVIPC=y
50CONFIG_POSIX_MQUEUE=y 55CONFIG_POSIX_MQUEUE=y
51# CONFIG_BSD_PROCESS_ACCT is not set 56# CONFIG_BSD_PROCESS_ACCT is not set
57CONFIG_TASKSTATS=y
58CONFIG_TASK_DELAY_ACCT=y
52CONFIG_SYSCTL=y 59CONFIG_SYSCTL=y
53# CONFIG_AUDIT is not set 60# CONFIG_AUDIT is not set
54CONFIG_IKCONFIG=y 61CONFIG_IKCONFIG=y
55CONFIG_IKCONFIG_PROC=y 62CONFIG_IKCONFIG_PROC=y
56CONFIG_CPUSETS=y 63CONFIG_CPUSETS=y
64CONFIG_RELAY=y
57CONFIG_INITRAMFS_SOURCE="" 65CONFIG_INITRAMFS_SOURCE=""
58CONFIG_CC_OPTIMIZE_FOR_SIZE=y 66CONFIG_CC_OPTIMIZE_FOR_SIZE=y
59# CONFIG_EMBEDDED is not set 67# CONFIG_EMBEDDED is not set
@@ -65,14 +73,12 @@ CONFIG_PRINTK=y
65CONFIG_BUG=y 73CONFIG_BUG=y
66CONFIG_ELF_CORE=y 74CONFIG_ELF_CORE=y
67CONFIG_BASE_FULL=y 75CONFIG_BASE_FULL=y
76CONFIG_RT_MUTEXES=y
68CONFIG_FUTEX=y 77CONFIG_FUTEX=y
69CONFIG_EPOLL=y 78CONFIG_EPOLL=y
70CONFIG_SHMEM=y 79CONFIG_SHMEM=y
71CONFIG_CC_ALIGN_FUNCTIONS=0
72CONFIG_CC_ALIGN_LABELS=0
73CONFIG_CC_ALIGN_LOOPS=0
74CONFIG_CC_ALIGN_JUMPS=0
75CONFIG_SLAB=y 80CONFIG_SLAB=y
81CONFIG_VM_EVENT_COUNTERS=y
76# CONFIG_TINY_SHMEM is not set 82# CONFIG_TINY_SHMEM is not set
77CONFIG_BASE_SMALL=0 83CONFIG_BASE_SMALL=0
78# CONFIG_SLOB is not set 84# CONFIG_SLOB is not set
@@ -83,7 +89,6 @@ CONFIG_BASE_SMALL=0
83CONFIG_MODULES=y 89CONFIG_MODULES=y
84CONFIG_MODULE_UNLOAD=y 90CONFIG_MODULE_UNLOAD=y
85# CONFIG_MODULE_FORCE_UNLOAD is not set 91# CONFIG_MODULE_FORCE_UNLOAD is not set
86CONFIG_OBSOLETE_MODPARM=y
87CONFIG_MODVERSIONS=y 92CONFIG_MODVERSIONS=y
88CONFIG_MODULE_SRCVERSION_ALL=y 93CONFIG_MODULE_SRCVERSION_ALL=y
89CONFIG_KMOD=y 94CONFIG_KMOD=y
@@ -92,6 +97,7 @@ CONFIG_STOP_MACHINE=y
92# 97#
93# Block layer 98# Block layer
94# 99#
100CONFIG_BLK_DEV_IO_TRACE=y
95 101
96# 102#
97# IO Schedulers 103# IO Schedulers
@@ -117,19 +123,22 @@ CONFIG_PPC_PSERIES=y
117CONFIG_PPC_PMAC=y 123CONFIG_PPC_PMAC=y
118CONFIG_PPC_PMAC64=y 124CONFIG_PPC_PMAC64=y
119CONFIG_PPC_MAPLE=y 125CONFIG_PPC_MAPLE=y
120# CONFIG_PPC_CELL is not set 126CONFIG_PPC_CELL=y
127CONFIG_PPC_CELL_NATIVE=y
128CONFIG_PPC_IBM_CELL_BLADE=y
129CONFIG_UDBG_RTAS_CONSOLE=y
121CONFIG_XICS=y 130CONFIG_XICS=y
122CONFIG_U3_DART=y 131CONFIG_U3_DART=y
123CONFIG_MPIC=y
124CONFIG_PPC_RTAS=y 132CONFIG_PPC_RTAS=y
125CONFIG_RTAS_ERROR_LOGGING=y 133CONFIG_RTAS_ERROR_LOGGING=y
126CONFIG_RTAS_PROC=y 134CONFIG_RTAS_PROC=y
127CONFIG_RTAS_FLASH=m 135CONFIG_RTAS_FLASH=m
128# CONFIG_MMIO_NVRAM is not set 136CONFIG_MMIO_NVRAM=y
129CONFIG_MPIC_BROKEN_U3=y 137CONFIG_MPIC_BROKEN_U3=y
130CONFIG_IBMVIO=y 138CONFIG_IBMVIO=y
131# CONFIG_IBMEBUS is not set 139# CONFIG_IBMEBUS is not set
132# CONFIG_PPC_MPC106 is not set 140# CONFIG_PPC_MPC106 is not set
141CONFIG_PPC_970_NAP=y
133CONFIG_CPU_FREQ=y 142CONFIG_CPU_FREQ=y
134CONFIG_CPU_FREQ_TABLE=y 143CONFIG_CPU_FREQ_TABLE=y
135# CONFIG_CPU_FREQ_DEBUG is not set 144# CONFIG_CPU_FREQ_DEBUG is not set
@@ -144,6 +153,15 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y
144# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set 153# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
145CONFIG_CPU_FREQ_PMAC64=y 154CONFIG_CPU_FREQ_PMAC64=y
146# CONFIG_WANT_EARLY_SERIAL is not set 155# CONFIG_WANT_EARLY_SERIAL is not set
156CONFIG_MPIC=y
157
158#
159# Cell Broadband Engine options
160#
161CONFIG_SPU_FS=m
162CONFIG_SPU_BASE=y
163CONFIG_SPUFS_MMAP=y
164CONFIG_CBE_RAS=y
147 165
148# 166#
149# Kernel options 167# Kernel options
@@ -161,6 +179,7 @@ CONFIG_BINFMT_MISC=m
161CONFIG_FORCE_MAX_ZONEORDER=13 179CONFIG_FORCE_MAX_ZONEORDER=13
162CONFIG_IOMMU_VMERGE=y 180CONFIG_IOMMU_VMERGE=y
163CONFIG_HOTPLUG_CPU=y 181CONFIG_HOTPLUG_CPU=y
182CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
164CONFIG_KEXEC=y 183CONFIG_KEXEC=y
165# CONFIG_CRASH_DUMP is not set 184# CONFIG_CRASH_DUMP is not set
166CONFIG_IRQ_ALL_CPUS=y 185CONFIG_IRQ_ALL_CPUS=y
@@ -181,9 +200,10 @@ CONFIG_SPARSEMEM=y
181CONFIG_HAVE_MEMORY_PRESENT=y 200CONFIG_HAVE_MEMORY_PRESENT=y
182# CONFIG_SPARSEMEM_STATIC is not set 201# CONFIG_SPARSEMEM_STATIC is not set
183CONFIG_SPARSEMEM_EXTREME=y 202CONFIG_SPARSEMEM_EXTREME=y
184# CONFIG_MEMORY_HOTPLUG is not set 203CONFIG_MEMORY_HOTPLUG=y
185CONFIG_SPLIT_PTLOCK_CPUS=4 204CONFIG_SPLIT_PTLOCK_CPUS=4
186CONFIG_MIGRATION=y 205CONFIG_RESOURCES_64BIT=y
206CONFIG_ARCH_MEMORY_PROBE=y
187# CONFIG_PPC_64K_PAGES is not set 207# CONFIG_PPC_64K_PAGES is not set
188# CONFIG_SCHED_SMT is not set 208# CONFIG_SCHED_SMT is not set
189CONFIG_PROC_DEVICETREE=y 209CONFIG_PROC_DEVICETREE=y
@@ -196,11 +216,12 @@ CONFIG_ISA_DMA_API=y
196# Bus options 216# Bus options
197# 217#
198CONFIG_GENERIC_ISA_DMA=y 218CONFIG_GENERIC_ISA_DMA=y
219# CONFIG_MPIC_WEIRD is not set
199CONFIG_PPC_I8259=y 220CONFIG_PPC_I8259=y
200# CONFIG_PPC_INDIRECT_PCI is not set 221# CONFIG_PPC_INDIRECT_PCI is not set
201CONFIG_PCI=y 222CONFIG_PCI=y
202CONFIG_PCI_DOMAINS=y 223CONFIG_PCI_DOMAINS=y
203# CONFIG_PCI_LEGACY_PROC is not set 224# CONFIG_PCIEPORTBUS is not set
204# CONFIG_PCI_DEBUG is not set 225# CONFIG_PCI_DEBUG is not set
205 226
206# 227#
@@ -247,7 +268,10 @@ CONFIG_SYN_COOKIES=y
247CONFIG_INET_AH=m 268CONFIG_INET_AH=m
248CONFIG_INET_ESP=m 269CONFIG_INET_ESP=m
249CONFIG_INET_IPCOMP=m 270CONFIG_INET_IPCOMP=m
271CONFIG_INET_XFRM_TUNNEL=m
250CONFIG_INET_TUNNEL=y 272CONFIG_INET_TUNNEL=y
273CONFIG_INET_XFRM_MODE_TRANSPORT=y
274CONFIG_INET_XFRM_MODE_TUNNEL=y
251CONFIG_INET_DIAG=y 275CONFIG_INET_DIAG=y
252CONFIG_INET_TCP_DIAG=y 276CONFIG_INET_TCP_DIAG=y
253# CONFIG_TCP_CONG_ADVANCED is not set 277# CONFIG_TCP_CONG_ADVANCED is not set
@@ -258,6 +282,9 @@ CONFIG_TCP_CONG_BIC=y
258# 282#
259# CONFIG_IP_VS is not set 283# CONFIG_IP_VS is not set
260# CONFIG_IPV6 is not set 284# CONFIG_IPV6 is not set
285# CONFIG_INET6_XFRM_TUNNEL is not set
286# CONFIG_INET6_TUNNEL is not set
287# CONFIG_NETWORK_SECMARK is not set
261CONFIG_NETFILTER=y 288CONFIG_NETFILTER=y
262# CONFIG_NETFILTER_DEBUG is not set 289# CONFIG_NETFILTER_DEBUG is not set
263 290
@@ -284,6 +311,8 @@ CONFIG_IP_NF_IRC=m
284CONFIG_IP_NF_TFTP=m 311CONFIG_IP_NF_TFTP=m
285CONFIG_IP_NF_AMANDA=m 312CONFIG_IP_NF_AMANDA=m
286# CONFIG_IP_NF_PPTP is not set 313# CONFIG_IP_NF_PPTP is not set
314# CONFIG_IP_NF_H323 is not set
315CONFIG_IP_NF_SIP=m
287CONFIG_IP_NF_QUEUE=m 316CONFIG_IP_NF_QUEUE=m
288 317
289# 318#
@@ -339,6 +368,7 @@ CONFIG_STANDALONE=y
339CONFIG_PREVENT_FIRMWARE_BUILD=y 368CONFIG_PREVENT_FIRMWARE_BUILD=y
340CONFIG_FW_LOADER=y 369CONFIG_FW_LOADER=y
341# CONFIG_DEBUG_DRIVER is not set 370# CONFIG_DEBUG_DRIVER is not set
371# CONFIG_SYS_HYPERVISOR is not set
342 372
343# 373#
344# Connector - unified userspace <-> kernelspace linker 374# Connector - unified userspace <-> kernelspace linker
@@ -376,6 +406,7 @@ CONFIG_BLK_DEV_NBD=m
376CONFIG_BLK_DEV_RAM=y 406CONFIG_BLK_DEV_RAM=y
377CONFIG_BLK_DEV_RAM_COUNT=16 407CONFIG_BLK_DEV_RAM_COUNT=16
378CONFIG_BLK_DEV_RAM_SIZE=65536 408CONFIG_BLK_DEV_RAM_SIZE=65536
409CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
379CONFIG_BLK_DEV_INITRD=y 410CONFIG_BLK_DEV_INITRD=y
380# CONFIG_CDROM_PKTCDVD is not set 411# CONFIG_CDROM_PKTCDVD is not set
381# CONFIG_ATA_OVER_ETH is not set 412# CONFIG_ATA_OVER_ETH is not set
@@ -436,7 +467,6 @@ CONFIG_BLK_DEV_AMD74XX=y
436CONFIG_BLK_DEV_IDE_PMAC=y 467CONFIG_BLK_DEV_IDE_PMAC=y
437CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y 468CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
438CONFIG_BLK_DEV_IDEDMA_PMAC=y 469CONFIG_BLK_DEV_IDEDMA_PMAC=y
439# CONFIG_BLK_DEV_IDE_PMAC_BLINK is not set
440# CONFIG_IDE_ARM is not set 470# CONFIG_IDE_ARM is not set
441CONFIG_BLK_DEV_IDEDMA=y 471CONFIG_BLK_DEV_IDEDMA=y
442# CONFIG_IDEDMA_IVB is not set 472# CONFIG_IDEDMA_IVB is not set
@@ -497,6 +527,7 @@ CONFIG_SCSI_SATA_SVW=y
497# CONFIG_SCSI_SATA_MV is not set 527# CONFIG_SCSI_SATA_MV is not set
498# CONFIG_SCSI_SATA_NV is not set 528# CONFIG_SCSI_SATA_NV is not set
499# CONFIG_SCSI_PDC_ADMA is not set 529# CONFIG_SCSI_PDC_ADMA is not set
530# CONFIG_SCSI_HPTIOP is not set
500# CONFIG_SCSI_SATA_QSTOR is not set 531# CONFIG_SCSI_SATA_QSTOR is not set
501# CONFIG_SCSI_SATA_PROMISE is not set 532# CONFIG_SCSI_SATA_PROMISE is not set
502# CONFIG_SCSI_SATA_SX4 is not set 533# CONFIG_SCSI_SATA_SX4 is not set
@@ -519,11 +550,10 @@ CONFIG_SCSI_SYM53C8XX_2=y
519CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 550CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
520CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 551CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
521CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 552CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
522# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set 553CONFIG_SCSI_SYM53C8XX_MMIO=y
523CONFIG_SCSI_IPR=y 554CONFIG_SCSI_IPR=y
524CONFIG_SCSI_IPR_TRACE=y 555CONFIG_SCSI_IPR_TRACE=y
525CONFIG_SCSI_IPR_DUMP=y 556CONFIG_SCSI_IPR_DUMP=y
526# CONFIG_SCSI_QLOGIC_FC is not set
527# CONFIG_SCSI_QLOGIC_1280 is not set 557# CONFIG_SCSI_QLOGIC_1280 is not set
528# CONFIG_SCSI_QLA_FC is not set 558# CONFIG_SCSI_QLA_FC is not set
529CONFIG_SCSI_LPFC=m 559CONFIG_SCSI_LPFC=m
@@ -540,8 +570,8 @@ CONFIG_MD_LINEAR=y
540CONFIG_MD_RAID0=y 570CONFIG_MD_RAID0=y
541CONFIG_MD_RAID1=y 571CONFIG_MD_RAID1=y
542CONFIG_MD_RAID10=y 572CONFIG_MD_RAID10=y
543CONFIG_MD_RAID5=y 573CONFIG_MD_RAID456=y
544CONFIG_MD_RAID6=m 574CONFIG_MD_RAID5_RESHAPE=y
545CONFIG_MD_MULTIPATH=m 575CONFIG_MD_MULTIPATH=m
546CONFIG_MD_FAULTY=m 576CONFIG_MD_FAULTY=m
547CONFIG_BLK_DEV_DM=y 577CONFIG_BLK_DEV_DM=y
@@ -585,7 +615,6 @@ CONFIG_IEEE1394_OHCI1394=y
585# 615#
586CONFIG_IEEE1394_VIDEO1394=m 616CONFIG_IEEE1394_VIDEO1394=m
587CONFIG_IEEE1394_SBP2=m 617CONFIG_IEEE1394_SBP2=m
588# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
589CONFIG_IEEE1394_ETH1394=m 618CONFIG_IEEE1394_ETH1394=m
590CONFIG_IEEE1394_DV1394=m 619CONFIG_IEEE1394_DV1394=m
591CONFIG_IEEE1394_RAWIO=y 620CONFIG_IEEE1394_RAWIO=y
@@ -599,6 +628,7 @@ CONFIG_IEEE1394_RAWIO=y
599# Macintosh device drivers 628# Macintosh device drivers
600# 629#
601CONFIG_ADB_PMU=y 630CONFIG_ADB_PMU=y
631# CONFIG_ADB_PMU_LED is not set
602CONFIG_PMAC_SMU=y 632CONFIG_PMAC_SMU=y
603CONFIG_THERM_PM72=y 633CONFIG_THERM_PM72=y
604CONFIG_WINDFARM=y 634CONFIG_WINDFARM=y
@@ -682,6 +712,7 @@ CONFIG_E1000=y
682# CONFIG_VIA_VELOCITY is not set 712# CONFIG_VIA_VELOCITY is not set
683CONFIG_TIGON3=y 713CONFIG_TIGON3=y
684# CONFIG_BNX2 is not set 714# CONFIG_BNX2 is not set
715CONFIG_SPIDER_NET=m
685# CONFIG_MV643XX_ETH is not set 716# CONFIG_MV643XX_ETH is not set
686 717
687# 718#
@@ -691,6 +722,7 @@ CONFIG_TIGON3=y
691CONFIG_IXGB=m 722CONFIG_IXGB=m
692# CONFIG_IXGB_NAPI is not set 723# CONFIG_IXGB_NAPI is not set
693# CONFIG_S2IO is not set 724# CONFIG_S2IO is not set
725# CONFIG_MYRI10GE is not set
694 726
695# 727#
696# Token Ring devices 728# Token Ring devices
@@ -792,6 +824,7 @@ CONFIG_SERIO_LIBPS2=y
792CONFIG_VT=y 824CONFIG_VT=y
793CONFIG_VT_CONSOLE=y 825CONFIG_VT_CONSOLE=y
794CONFIG_HW_CONSOLE=y 826CONFIG_HW_CONSOLE=y
827# CONFIG_VT_HW_CONSOLE_BINDING is not set
795# CONFIG_SERIAL_NONSTANDARD is not set 828# CONFIG_SERIAL_NONSTANDARD is not set
796 829
797# 830#
@@ -799,6 +832,7 @@ CONFIG_HW_CONSOLE=y
799# 832#
800CONFIG_SERIAL_8250=y 833CONFIG_SERIAL_8250=y
801CONFIG_SERIAL_8250_CONSOLE=y 834CONFIG_SERIAL_8250_CONSOLE=y
835CONFIG_SERIAL_8250_PCI=y
802CONFIG_SERIAL_8250_NR_UARTS=4 836CONFIG_SERIAL_8250_NR_UARTS=4
803CONFIG_SERIAL_8250_RUNTIME_UARTS=4 837CONFIG_SERIAL_8250_RUNTIME_UARTS=4
804# CONFIG_SERIAL_8250_EXTENDED is not set 838# CONFIG_SERIAL_8250_EXTENDED is not set
@@ -814,7 +848,9 @@ CONFIG_SERIAL_ICOM=m
814CONFIG_UNIX98_PTYS=y 848CONFIG_UNIX98_PTYS=y
815CONFIG_LEGACY_PTYS=y 849CONFIG_LEGACY_PTYS=y
816CONFIG_LEGACY_PTY_COUNT=256 850CONFIG_LEGACY_PTY_COUNT=256
851CONFIG_HVC_DRIVER=y
817CONFIG_HVC_CONSOLE=y 852CONFIG_HVC_CONSOLE=y
853CONFIG_HVC_RTAS=y
818CONFIG_HVCS=m 854CONFIG_HVCS=m
819 855
820# 856#
@@ -826,7 +862,7 @@ CONFIG_HVCS=m
826# Watchdog Cards 862# Watchdog Cards
827# 863#
828# CONFIG_WATCHDOG is not set 864# CONFIG_WATCHDOG is not set
829# CONFIG_RTC is not set 865# CONFIG_HW_RANDOM is not set
830CONFIG_GEN_RTC=y 866CONFIG_GEN_RTC=y
831# CONFIG_GEN_RTC_X is not set 867# CONFIG_GEN_RTC_X is not set
832# CONFIG_DTLK is not set 868# CONFIG_DTLK is not set
@@ -874,10 +910,10 @@ CONFIG_I2C_AMD8111=y
874# CONFIG_I2C_PIIX4 is not set 910# CONFIG_I2C_PIIX4 is not set
875CONFIG_I2C_POWERMAC=y 911CONFIG_I2C_POWERMAC=y
876# CONFIG_I2C_NFORCE2 is not set 912# CONFIG_I2C_NFORCE2 is not set
913# CONFIG_I2C_OCORES is not set
877# CONFIG_I2C_PARPORT_LIGHT is not set 914# CONFIG_I2C_PARPORT_LIGHT is not set
878# CONFIG_I2C_PROSAVAGE is not set 915# CONFIG_I2C_PROSAVAGE is not set
879# CONFIG_I2C_SAVAGE4 is not set 916# CONFIG_I2C_SAVAGE4 is not set
880# CONFIG_SCx200_ACB is not set
881# CONFIG_I2C_SIS5595 is not set 917# CONFIG_I2C_SIS5595 is not set
882# CONFIG_I2C_SIS630 is not set 918# CONFIG_I2C_SIS630 is not set
883# CONFIG_I2C_SIS96X is not set 919# CONFIG_I2C_SIS96X is not set
@@ -896,9 +932,7 @@ CONFIG_I2C_POWERMAC=y
896# CONFIG_SENSORS_PCF8574 is not set 932# CONFIG_SENSORS_PCF8574 is not set
897# CONFIG_SENSORS_PCA9539 is not set 933# CONFIG_SENSORS_PCA9539 is not set
898# CONFIG_SENSORS_PCF8591 is not set 934# CONFIG_SENSORS_PCF8591 is not set
899# CONFIG_SENSORS_RTC8564 is not set
900# CONFIG_SENSORS_MAX6875 is not set 935# CONFIG_SENSORS_MAX6875 is not set
901# CONFIG_RTC_X1205_I2C is not set
902# CONFIG_I2C_DEBUG_CORE is not set 936# CONFIG_I2C_DEBUG_CORE is not set
903# CONFIG_I2C_DEBUG_ALGO is not set 937# CONFIG_I2C_DEBUG_ALGO is not set
904# CONFIG_I2C_DEBUG_BUS is not set 938# CONFIG_I2C_DEBUG_BUS is not set
@@ -913,7 +947,6 @@ CONFIG_I2C_POWERMAC=y
913# 947#
914# Dallas's 1-wire bus 948# Dallas's 1-wire bus
915# 949#
916# CONFIG_W1 is not set
917 950
918# 951#
919# Hardware Monitoring support 952# Hardware Monitoring support
@@ -926,37 +959,33 @@ CONFIG_I2C_POWERMAC=y
926# 959#
927 960
928# 961#
929# Multimedia Capabilities Port drivers
930#
931
932#
933# Multimedia devices 962# Multimedia devices
934# 963#
935# CONFIG_VIDEO_DEV is not set 964# CONFIG_VIDEO_DEV is not set
965CONFIG_VIDEO_V4L2=y
936 966
937# 967#
938# Digital Video Broadcasting Devices 968# Digital Video Broadcasting Devices
939# 969#
940# CONFIG_DVB is not set 970# CONFIG_DVB is not set
971# CONFIG_USB_DABUSB is not set
941 972
942# 973#
943# Graphics support 974# Graphics support
944# 975#
976CONFIG_FIRMWARE_EDID=y
945CONFIG_FB=y 977CONFIG_FB=y
946CONFIG_FB_CFB_FILLRECT=y 978CONFIG_FB_CFB_FILLRECT=y
947CONFIG_FB_CFB_COPYAREA=y 979CONFIG_FB_CFB_COPYAREA=y
948CONFIG_FB_CFB_IMAGEBLIT=y 980CONFIG_FB_CFB_IMAGEBLIT=y
949CONFIG_FB_MACMODES=y 981CONFIG_FB_MACMODES=y
982# CONFIG_FB_BACKLIGHT is not set
950CONFIG_FB_MODE_HELPERS=y 983CONFIG_FB_MODE_HELPERS=y
951CONFIG_FB_TILEBLITTING=y 984CONFIG_FB_TILEBLITTING=y
952# CONFIG_FB_CIRRUS is not set 985# CONFIG_FB_CIRRUS is not set
953# CONFIG_FB_PM2 is not set 986# CONFIG_FB_PM2 is not set
954# CONFIG_FB_CYBER2000 is not set 987# CONFIG_FB_CYBER2000 is not set
955CONFIG_FB_OF=y 988CONFIG_FB_OF=y
956# CONFIG_FB_CONTROL is not set
957# CONFIG_FB_PLATINUM is not set
958# CONFIG_FB_VALKYRIE is not set
959# CONFIG_FB_CT65550 is not set
960# CONFIG_FB_ASILIANT is not set 989# CONFIG_FB_ASILIANT is not set
961# CONFIG_FB_IMSTT is not set 990# CONFIG_FB_IMSTT is not set
962# CONFIG_FB_VGA16 is not set 991# CONFIG_FB_VGA16 is not set
@@ -970,7 +999,6 @@ CONFIG_FB_MATROX_G=y
970CONFIG_FB_MATROX_I2C=m 999CONFIG_FB_MATROX_I2C=m
971CONFIG_FB_MATROX_MAVEN=m 1000CONFIG_FB_MATROX_MAVEN=m
972CONFIG_FB_MATROX_MULTIHEAD=y 1001CONFIG_FB_MATROX_MULTIHEAD=y
973# CONFIG_FB_RADEON_OLD is not set
974CONFIG_FB_RADEON=y 1002CONFIG_FB_RADEON=y
975CONFIG_FB_RADEON_I2C=y 1003CONFIG_FB_RADEON_I2C=y
976# CONFIG_FB_RADEON_DEBUG is not set 1004# CONFIG_FB_RADEON_DEBUG is not set
@@ -1025,9 +1053,11 @@ CONFIG_SND_SEQ_DUMMY=m
1025CONFIG_SND_OSSEMUL=y 1053CONFIG_SND_OSSEMUL=y
1026CONFIG_SND_MIXER_OSS=m 1054CONFIG_SND_MIXER_OSS=m
1027CONFIG_SND_PCM_OSS=m 1055CONFIG_SND_PCM_OSS=m
1056CONFIG_SND_PCM_OSS_PLUGINS=y
1028CONFIG_SND_SEQUENCER_OSS=y 1057CONFIG_SND_SEQUENCER_OSS=y
1029# CONFIG_SND_DYNAMIC_MINORS is not set 1058# CONFIG_SND_DYNAMIC_MINORS is not set
1030CONFIG_SND_SUPPORT_OLD_API=y 1059CONFIG_SND_SUPPORT_OLD_API=y
1060CONFIG_SND_VERBOSE_PROCFS=y
1031# CONFIG_SND_VERBOSE_PRINTK is not set 1061# CONFIG_SND_VERBOSE_PRINTK is not set
1032# CONFIG_SND_DEBUG is not set 1062# CONFIG_SND_DEBUG is not set
1033 1063
@@ -1044,6 +1074,7 @@ CONFIG_SND_SUPPORT_OLD_API=y
1044# PCI devices 1074# PCI devices
1045# 1075#
1046# CONFIG_SND_AD1889 is not set 1076# CONFIG_SND_AD1889 is not set
1077# CONFIG_SND_ALS300 is not set
1047# CONFIG_SND_ALS4000 is not set 1078# CONFIG_SND_ALS4000 is not set
1048# CONFIG_SND_ALI5451 is not set 1079# CONFIG_SND_ALI5451 is not set
1049# CONFIG_SND_ATIIXP is not set 1080# CONFIG_SND_ATIIXP is not set
@@ -1057,6 +1088,18 @@ CONFIG_SND_SUPPORT_OLD_API=y
1057# CONFIG_SND_CMIPCI is not set 1088# CONFIG_SND_CMIPCI is not set
1058# CONFIG_SND_CS4281 is not set 1089# CONFIG_SND_CS4281 is not set
1059# CONFIG_SND_CS46XX is not set 1090# CONFIG_SND_CS46XX is not set
1091# CONFIG_SND_DARLA20 is not set
1092# CONFIG_SND_GINA20 is not set
1093# CONFIG_SND_LAYLA20 is not set
1094# CONFIG_SND_DARLA24 is not set
1095# CONFIG_SND_GINA24 is not set
1096# CONFIG_SND_LAYLA24 is not set
1097# CONFIG_SND_MONA is not set
1098# CONFIG_SND_MIA is not set
1099# CONFIG_SND_ECHO3G is not set
1100# CONFIG_SND_INDIGO is not set
1101# CONFIG_SND_INDIGOIO is not set
1102# CONFIG_SND_INDIGODJ is not set
1060# CONFIG_SND_EMU10K1 is not set 1103# CONFIG_SND_EMU10K1 is not set
1061# CONFIG_SND_EMU10K1X is not set 1104# CONFIG_SND_EMU10K1X is not set
1062# CONFIG_SND_ENS1370 is not set 1105# CONFIG_SND_ENS1370 is not set
@@ -1076,6 +1119,7 @@ CONFIG_SND_SUPPORT_OLD_API=y
1076# CONFIG_SND_MIXART is not set 1119# CONFIG_SND_MIXART is not set
1077# CONFIG_SND_NM256 is not set 1120# CONFIG_SND_NM256 is not set
1078# CONFIG_SND_PCXHR is not set 1121# CONFIG_SND_PCXHR is not set
1122# CONFIG_SND_RIPTIDE is not set
1079# CONFIG_SND_RME32 is not set 1123# CONFIG_SND_RME32 is not set
1080# CONFIG_SND_RME96 is not set 1124# CONFIG_SND_RME96 is not set
1081# CONFIG_SND_RME9652 is not set 1125# CONFIG_SND_RME9652 is not set
@@ -1093,6 +1137,17 @@ CONFIG_SND_POWERMAC=m
1093CONFIG_SND_POWERMAC_AUTO_DRC=y 1137CONFIG_SND_POWERMAC_AUTO_DRC=y
1094 1138
1095# 1139#
1140# Apple Onboard Audio driver
1141#
1142CONFIG_SND_AOA=m
1143CONFIG_SND_AOA_FABRIC_LAYOUT=m
1144CONFIG_SND_AOA_ONYX=m
1145CONFIG_SND_AOA_TAS=m
1146CONFIG_SND_AOA_TOONIE=m
1147CONFIG_SND_AOA_SOUNDBUS=m
1148CONFIG_SND_AOA_SOUNDBUS_I2S=m
1149
1150#
1096# USB devices 1151# USB devices
1097# 1152#
1098# CONFIG_SND_USB_AUDIO is not set 1153# CONFIG_SND_USB_AUDIO is not set
@@ -1108,6 +1163,7 @@ CONFIG_SND_POWERMAC_AUTO_DRC=y
1108# 1163#
1109CONFIG_USB_ARCH_HAS_HCD=y 1164CONFIG_USB_ARCH_HAS_HCD=y
1110CONFIG_USB_ARCH_HAS_OHCI=y 1165CONFIG_USB_ARCH_HAS_OHCI=y
1166CONFIG_USB_ARCH_HAS_EHCI=y
1111CONFIG_USB=y 1167CONFIG_USB=y
1112# CONFIG_USB_DEBUG is not set 1168# CONFIG_USB_DEBUG is not set
1113 1169
@@ -1125,6 +1181,7 @@ CONFIG_USB_DEVICEFS=y
1125CONFIG_USB_EHCI_HCD=y 1181CONFIG_USB_EHCI_HCD=y
1126# CONFIG_USB_EHCI_SPLIT_ISO is not set 1182# CONFIG_USB_EHCI_SPLIT_ISO is not set
1127# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1183# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1184CONFIG_USB_EHCI_TT_NEWSCHED=y
1128# CONFIG_USB_ISP116X_HCD is not set 1185# CONFIG_USB_ISP116X_HCD is not set
1129CONFIG_USB_OHCI_HCD=y 1186CONFIG_USB_OHCI_HCD=y
1130# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1187# CONFIG_USB_OHCI_BIG_ENDIAN is not set
@@ -1135,7 +1192,6 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1135# 1192#
1136# USB Device Class drivers 1193# USB Device Class drivers
1137# 1194#
1138# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
1139# CONFIG_USB_ACM is not set 1195# CONFIG_USB_ACM is not set
1140# CONFIG_USB_PRINTER is not set 1196# CONFIG_USB_PRINTER is not set
1141 1197
@@ -1173,9 +1229,7 @@ CONFIG_USB_HIDDEV=y
1173# CONFIG_USB_ACECAD is not set 1229# CONFIG_USB_ACECAD is not set
1174# CONFIG_USB_KBTAB is not set 1230# CONFIG_USB_KBTAB is not set
1175# CONFIG_USB_POWERMATE is not set 1231# CONFIG_USB_POWERMATE is not set
1176# CONFIG_USB_MTOUCH is not set 1232# CONFIG_USB_TOUCHSCREEN is not set
1177# CONFIG_USB_ITMTOUCH is not set
1178# CONFIG_USB_EGALAX is not set
1179# CONFIG_USB_YEALINK is not set 1233# CONFIG_USB_YEALINK is not set
1180# CONFIG_USB_XPAD is not set 1234# CONFIG_USB_XPAD is not set
1181# CONFIG_USB_ATI_REMOTE is not set 1235# CONFIG_USB_ATI_REMOTE is not set
@@ -1190,15 +1244,6 @@ CONFIG_USB_HIDDEV=y
1190# CONFIG_USB_MICROTEK is not set 1244# CONFIG_USB_MICROTEK is not set
1191 1245
1192# 1246#
1193# USB Multimedia devices
1194#
1195# CONFIG_USB_DABUSB is not set
1196
1197#
1198# Video4Linux support is needed for USB Multimedia device support
1199#
1200
1201#
1202# USB Network Adapters 1247# USB Network Adapters
1203# 1248#
1204# CONFIG_USB_CATC is not set 1249# CONFIG_USB_CATC is not set
@@ -1227,10 +1272,12 @@ CONFIG_USB_HIDDEV=y
1227# CONFIG_USB_LEGOTOWER is not set 1272# CONFIG_USB_LEGOTOWER is not set
1228# CONFIG_USB_LCD is not set 1273# CONFIG_USB_LCD is not set
1229# CONFIG_USB_LED is not set 1274# CONFIG_USB_LED is not set
1275# CONFIG_USB_CYPRESS_CY7C63 is not set
1230# CONFIG_USB_CYTHERM is not set 1276# CONFIG_USB_CYTHERM is not set
1231# CONFIG_USB_PHIDGETKIT is not set 1277# CONFIG_USB_PHIDGETKIT is not set
1232# CONFIG_USB_PHIDGETSERVO is not set 1278# CONFIG_USB_PHIDGETSERVO is not set
1233# CONFIG_USB_IDMOUSE is not set 1279# CONFIG_USB_IDMOUSE is not set
1280CONFIG_USB_APPLEDISPLAY=m
1234# CONFIG_USB_SISUSBVGA is not set 1281# CONFIG_USB_SISUSBVGA is not set
1235# CONFIG_USB_LD is not set 1282# CONFIG_USB_LD is not set
1236# CONFIG_USB_TEST is not set 1283# CONFIG_USB_TEST is not set
@@ -1250,23 +1297,53 @@ CONFIG_USB_HIDDEV=y
1250# CONFIG_MMC is not set 1297# CONFIG_MMC is not set
1251 1298
1252# 1299#
1300# LED devices
1301#
1302# CONFIG_NEW_LEDS is not set
1303
1304#
1305# LED drivers
1306#
1307
1308#
1309# LED Triggers
1310#
1311
1312#
1253# InfiniBand support 1313# InfiniBand support
1254# 1314#
1255CONFIG_INFINIBAND=m 1315CONFIG_INFINIBAND=m
1256# CONFIG_INFINIBAND_USER_MAD is not set 1316# CONFIG_INFINIBAND_USER_MAD is not set
1257# CONFIG_INFINIBAND_USER_ACCESS is not set 1317# CONFIG_INFINIBAND_USER_ACCESS is not set
1318CONFIG_INFINIBAND_ADDR_TRANS=y
1258CONFIG_INFINIBAND_MTHCA=m 1319CONFIG_INFINIBAND_MTHCA=m
1259# CONFIG_INFINIBAND_MTHCA_DEBUG is not set 1320CONFIG_INFINIBAND_MTHCA_DEBUG=y
1260CONFIG_INFINIBAND_IPOIB=m 1321CONFIG_INFINIBAND_IPOIB=m
1261# CONFIG_INFINIBAND_IPOIB_DEBUG is not set 1322CONFIG_INFINIBAND_IPOIB_DEBUG=y
1323# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
1262# CONFIG_INFINIBAND_SRP is not set 1324# CONFIG_INFINIBAND_SRP is not set
1325CONFIG_INFINIBAND_ISER=m
1263 1326
1264# 1327#
1265# SN Devices 1328# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1266# 1329#
1267 1330
1268# 1331#
1269# EDAC - error detection and reporting (RAS) 1332# Real Time Clock
1333#
1334# CONFIG_RTC_CLASS is not set
1335
1336#
1337# DMA Engine support
1338#
1339# CONFIG_DMA_ENGINE is not set
1340
1341#
1342# DMA Clients
1343#
1344
1345#
1346# DMA Devices
1270# 1347#
1271 1348
1272# 1349#
@@ -1298,7 +1375,6 @@ CONFIG_JFS_SECURITY=y
1298# CONFIG_JFS_STATISTICS is not set 1375# CONFIG_JFS_STATISTICS is not set
1299CONFIG_FS_POSIX_ACL=y 1376CONFIG_FS_POSIX_ACL=y
1300CONFIG_XFS_FS=m 1377CONFIG_XFS_FS=m
1301CONFIG_XFS_EXPORT=y
1302# CONFIG_XFS_QUOTA is not set 1378# CONFIG_XFS_QUOTA is not set
1303CONFIG_XFS_SECURITY=y 1379CONFIG_XFS_SECURITY=y
1304CONFIG_XFS_POSIX_ACL=y 1380CONFIG_XFS_POSIX_ACL=y
@@ -1307,6 +1383,7 @@ CONFIG_XFS_POSIX_ACL=y
1307# CONFIG_MINIX_FS is not set 1383# CONFIG_MINIX_FS is not set
1308# CONFIG_ROMFS_FS is not set 1384# CONFIG_ROMFS_FS is not set
1309CONFIG_INOTIFY=y 1385CONFIG_INOTIFY=y
1386CONFIG_INOTIFY_USER=y
1310# CONFIG_QUOTA is not set 1387# CONFIG_QUOTA is not set
1311CONFIG_DNOTIFY=y 1388CONFIG_DNOTIFY=y
1312CONFIG_AUTOFS_FS=y 1389CONFIG_AUTOFS_FS=y
@@ -1342,7 +1419,6 @@ CONFIG_TMPFS=y
1342CONFIG_HUGETLBFS=y 1419CONFIG_HUGETLBFS=y
1343CONFIG_HUGETLB_PAGE=y 1420CONFIG_HUGETLB_PAGE=y
1344CONFIG_RAMFS=y 1421CONFIG_RAMFS=y
1345# CONFIG_RELAYFS_FS is not set
1346# CONFIG_CONFIGFS_FS is not set 1422# CONFIG_CONFIGFS_FS is not set
1347 1423
1348# 1424#
@@ -1388,8 +1464,10 @@ CONFIG_RPCSEC_GSS_SPKM3=m
1388# CONFIG_SMB_FS is not set 1464# CONFIG_SMB_FS is not set
1389CONFIG_CIFS=m 1465CONFIG_CIFS=m
1390# CONFIG_CIFS_STATS is not set 1466# CONFIG_CIFS_STATS is not set
1467# CONFIG_CIFS_WEAK_PW_HASH is not set
1391CONFIG_CIFS_XATTR=y 1468CONFIG_CIFS_XATTR=y
1392CONFIG_CIFS_POSIX=y 1469CONFIG_CIFS_POSIX=y
1470# CONFIG_CIFS_DEBUG2 is not set
1393# CONFIG_CIFS_EXPERIMENTAL is not set 1471# CONFIG_CIFS_EXPERIMENTAL is not set
1394# CONFIG_NCP_FS is not set 1472# CONFIG_NCP_FS is not set
1395# CONFIG_CODA_FS is not set 1473# CONFIG_CODA_FS is not set
@@ -1470,6 +1548,9 @@ CONFIG_CRC32=y
1470CONFIG_LIBCRC32C=m 1548CONFIG_LIBCRC32C=m
1471CONFIG_ZLIB_INFLATE=y 1549CONFIG_ZLIB_INFLATE=y
1472CONFIG_ZLIB_DEFLATE=m 1550CONFIG_ZLIB_DEFLATE=m
1551CONFIG_TEXTSEARCH=y
1552CONFIG_TEXTSEARCH_KMP=m
1553CONFIG_PLIST=y
1473 1554
1474# 1555#
1475# Instrumentation Support 1556# Instrumentation Support
@@ -1483,14 +1564,19 @@ CONFIG_OPROFILE=y
1483# 1564#
1484# CONFIG_PRINTK_TIME is not set 1565# CONFIG_PRINTK_TIME is not set
1485CONFIG_MAGIC_SYSRQ=y 1566CONFIG_MAGIC_SYSRQ=y
1567# CONFIG_UNUSED_SYMBOLS is not set
1486CONFIG_DEBUG_KERNEL=y 1568CONFIG_DEBUG_KERNEL=y
1487CONFIG_LOG_BUF_SHIFT=17 1569CONFIG_LOG_BUF_SHIFT=17
1488CONFIG_DETECT_SOFTLOCKUP=y 1570CONFIG_DETECT_SOFTLOCKUP=y
1489# CONFIG_SCHEDSTATS is not set 1571# CONFIG_SCHEDSTATS is not set
1490# CONFIG_DEBUG_SLAB is not set 1572# CONFIG_DEBUG_SLAB is not set
1491CONFIG_DEBUG_MUTEXES=y 1573# CONFIG_DEBUG_RT_MUTEXES is not set
1574# CONFIG_RT_MUTEX_TESTER is not set
1492# CONFIG_DEBUG_SPINLOCK is not set 1575# CONFIG_DEBUG_SPINLOCK is not set
1576CONFIG_DEBUG_MUTEXES=y
1577# CONFIG_DEBUG_RWSEMS is not set
1493# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1578# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1579# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1494# CONFIG_DEBUG_KOBJECT is not set 1580# CONFIG_DEBUG_KOBJECT is not set
1495# CONFIG_DEBUG_INFO is not set 1581# CONFIG_DEBUG_INFO is not set
1496CONFIG_DEBUG_FS=y 1582CONFIG_DEBUG_FS=y
@@ -1504,11 +1590,7 @@ CONFIG_XMON=y
1504# CONFIG_XMON_DEFAULT is not set 1590# CONFIG_XMON_DEFAULT is not set
1505CONFIG_IRQSTACKS=y 1591CONFIG_IRQSTACKS=y
1506CONFIG_BOOTX_TEXT=y 1592CONFIG_BOOTX_TEXT=y
1507# CONFIG_PPC_EARLY_DEBUG_LPAR is not set 1593# CONFIG_PPC_EARLY_DEBUG is not set
1508# CONFIG_PPC_EARLY_DEBUG_G5 is not set
1509# CONFIG_PPC_EARLY_DEBUG_RTAS is not set
1510# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
1511# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
1512 1594
1513# 1595#
1514# Security options 1596# Security options
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index c18e8600d78f..a8cdf312e1b0 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc3 3# Linux kernel version: 2.6.18-rc6
4# Tue Aug 8 09:14:48 2006 4# Sun Sep 10 10:45:12 2006
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -128,7 +128,6 @@ CONFIG_PPC_PSERIES=y
128# CONFIG_UDBG_RTAS_CONSOLE is not set 128# CONFIG_UDBG_RTAS_CONSOLE is not set
129CONFIG_XICS=y 129CONFIG_XICS=y
130# CONFIG_U3_DART is not set 130# CONFIG_U3_DART is not set
131CONFIG_MPIC=y
132CONFIG_PPC_RTAS=y 131CONFIG_PPC_RTAS=y
133CONFIG_RTAS_ERROR_LOGGING=y 132CONFIG_RTAS_ERROR_LOGGING=y
134CONFIG_RTAS_PROC=y 133CONFIG_RTAS_PROC=y
@@ -140,6 +139,7 @@ CONFIG_IBMEBUS=y
140# CONFIG_PPC_970_NAP is not set 139# CONFIG_PPC_970_NAP is not set
141# CONFIG_CPU_FREQ is not set 140# CONFIG_CPU_FREQ is not set
142# CONFIG_WANT_EARLY_SERIAL is not set 141# CONFIG_WANT_EARLY_SERIAL is not set
142CONFIG_MPIC=y
143 143
144# 144#
145# Kernel options 145# Kernel options
@@ -196,6 +196,7 @@ CONFIG_ISA_DMA_API=y
196# Bus options 196# Bus options
197# 197#
198CONFIG_GENERIC_ISA_DMA=y 198CONFIG_GENERIC_ISA_DMA=y
199# CONFIG_MPIC_WEIRD is not set
199CONFIG_PPC_I8259=y 200CONFIG_PPC_I8259=y
200# CONFIG_PPC_INDIRECT_PCI is not set 201# CONFIG_PPC_INDIRECT_PCI is not set
201CONFIG_PCI=y 202CONFIG_PCI=y
@@ -790,7 +791,6 @@ CONFIG_SERIAL_JSM=m
790CONFIG_UNIX98_PTYS=y 791CONFIG_UNIX98_PTYS=y
791CONFIG_LEGACY_PTYS=y 792CONFIG_LEGACY_PTYS=y
792CONFIG_LEGACY_PTY_COUNT=256 793CONFIG_LEGACY_PTY_COUNT=256
793# CONFIG_BRIQ_PANEL is not set
794# CONFIG_PRINTER is not set 794# CONFIG_PRINTER is not set
795# CONFIG_PPDEV is not set 795# CONFIG_PPDEV is not set
796# CONFIG_TIPAR is not set 796# CONFIG_TIPAR is not set
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 956c2e5564b7..7d32ad0194a4 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -70,6 +70,8 @@ obj-$(CONFIG_PCI) += $(pci64-y) $(pci32-y)
70kexec-$(CONFIG_PPC64) := machine_kexec_64.o 70kexec-$(CONFIG_PPC64) := machine_kexec_64.o
71kexec-$(CONFIG_PPC32) := machine_kexec_32.o 71kexec-$(CONFIG_PPC32) := machine_kexec_32.o
72obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o $(kexec-y) 72obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o $(kexec-y)
73obj-$(CONFIG_AUDIT) += audit.o
74obj64-$(CONFIG_AUDIT) += compat_audit.o
73 75
74ifeq ($(CONFIG_PPC_ISERIES),y) 76ifeq ($(CONFIG_PPC_ISERIES),y)
75$(obj)/head_64.o: $(obj)/lparmap.s 77$(obj)/head_64.o: $(obj)/lparmap.s
diff --git a/arch/powerpc/kernel/audit.c b/arch/powerpc/kernel/audit.c
new file mode 100644
index 000000000000..7fe5e6300e9a
--- /dev/null
+++ b/arch/powerpc/kernel/audit.c
@@ -0,0 +1,66 @@
1#include <linux/init.h>
2#include <linux/types.h>
3#include <linux/audit.h>
4#include <asm/unistd.h>
5
6static unsigned dir_class[] = {
7#include <asm-generic/audit_dir_write.h>
8~0U
9};
10
11static unsigned read_class[] = {
12#include <asm-generic/audit_read.h>
13~0U
14};
15
16static unsigned write_class[] = {
17#include <asm-generic/audit_write.h>
18~0U
19};
20
21static unsigned chattr_class[] = {
22#include <asm-generic/audit_change_attr.h>
23~0U
24};
25
26int audit_classify_syscall(int abi, unsigned syscall)
27{
28#ifdef CONFIG_PPC64
29 extern int ppc32_classify_syscall(unsigned);
30 if (abi == AUDIT_ARCH_PPC)
31 return ppc32_classify_syscall(syscall);
32#endif
33 switch(syscall) {
34 case __NR_open:
35 return 2;
36 case __NR_openat:
37 return 3;
38 case __NR_socketcall:
39 return 4;
40 case __NR_execve:
41 return 5;
42 default:
43 return 0;
44 }
45}
46
47static int __init audit_classes_init(void)
48{
49#ifdef CONFIG_PPC64
50 extern __u32 ppc32_dir_class[];
51 extern __u32 ppc32_write_class[];
52 extern __u32 ppc32_read_class[];
53 extern __u32 ppc32_chattr_class[];
54 audit_register_class(AUDIT_CLASS_WRITE_32, ppc32_write_class);
55 audit_register_class(AUDIT_CLASS_READ_32, ppc32_read_class);
56 audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ppc32_dir_class);
57 audit_register_class(AUDIT_CLASS_CHATTR_32, ppc32_chattr_class);
58#endif
59 audit_register_class(AUDIT_CLASS_WRITE, write_class);
60 audit_register_class(AUDIT_CLASS_READ, read_class);
61 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class);
62 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class);
63 return 0;
64}
65
66__initcall(audit_classes_init);
diff --git a/arch/powerpc/kernel/compat_audit.c b/arch/powerpc/kernel/compat_audit.c
new file mode 100644
index 000000000000..640d4bb29321
--- /dev/null
+++ b/arch/powerpc/kernel/compat_audit.c
@@ -0,0 +1,38 @@
1#undef __powerpc64__
2#include <asm/unistd.h>
3
4unsigned ppc32_dir_class[] = {
5#include <asm-generic/audit_dir_write.h>
6~0U
7};
8
9unsigned ppc32_chattr_class[] = {
10#include <asm-generic/audit_change_attr.h>
11~0U
12};
13
14unsigned ppc32_write_class[] = {
15#include <asm-generic/audit_write.h>
16~0U
17};
18
19unsigned ppc32_read_class[] = {
20#include <asm-generic/audit_read.h>
21~0U
22};
23
24int ppc32_classify_syscall(unsigned syscall)
25{
26 switch(syscall) {
27 case __NR_open:
28 return 2;
29 case __NR_openat:
30 return 3;
31 case __NR_socketcall:
32 return 4;
33 case __NR_execve:
34 return 5;
35 default:
36 return 1;
37 }
38}
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index f04c18e08b8b..1af41f7616dc 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -295,7 +295,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
295 struct irq_desc *desc = irq_desc + irq; 295 struct irq_desc *desc = irq_desc + irq;
296 296
297 if (desc->status & IRQ_INPROGRESS) 297 if (desc->status & IRQ_INPROGRESS)
298 desc->chip->end(irq); 298 desc->chip->eoi(irq);
299 299
300 if (!(desc->status & IRQ_DISABLED)) 300 if (!(desc->status & IRQ_DISABLED))
301 desc->chip->disable(irq); 301 desc->chip->disable(irq);
diff --git a/arch/powerpc/kernel/fpu.S b/arch/powerpc/kernel/fpu.S
index 7e2c9fe44ac1..821e152e093c 100644
--- a/arch/powerpc/kernel/fpu.S
+++ b/arch/powerpc/kernel/fpu.S
@@ -2,6 +2,11 @@
2 * FPU support code, moved here from head.S so that it can be used 2 * FPU support code, moved here from head.S so that it can be used
3 * by chips which use other head-whatever.S files. 3 * by chips which use other head-whatever.S files.
4 * 4 *
5 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
6 * Copyright (C) 1996 Cort Dougan <cort@cs.nmt.edu>
7 * Copyright (C) 1996 Paul Mackerras.
8 * Copyright (C) 1997 Dan Malek (dmalek@jlc.net).
9 *
5 * This program is free software; you can redistribute it and/or 10 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License 11 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 12 * as published by the Free Software Foundation; either version
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 7ee685433319..12c5971d6565 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -322,7 +322,8 @@ EXPORT_SYMBOL(do_softirq);
322 322
323static LIST_HEAD(irq_hosts); 323static LIST_HEAD(irq_hosts);
324static spinlock_t irq_big_lock = SPIN_LOCK_UNLOCKED; 324static spinlock_t irq_big_lock = SPIN_LOCK_UNLOCKED;
325 325static DEFINE_PER_CPU(unsigned int, irq_radix_reader);
326static unsigned int irq_radix_writer;
326struct irq_map_entry irq_map[NR_IRQS]; 327struct irq_map_entry irq_map[NR_IRQS];
327static unsigned int irq_virq_count = NR_IRQS; 328static unsigned int irq_virq_count = NR_IRQS;
328static struct irq_host *irq_default_host; 329static struct irq_host *irq_default_host;
@@ -455,6 +456,58 @@ void irq_set_virq_count(unsigned int count)
455 irq_virq_count = count; 456 irq_virq_count = count;
456} 457}
457 458
459/* radix tree not lockless safe ! we use a brlock-type mecanism
460 * for now, until we can use a lockless radix tree
461 */
462static void irq_radix_wrlock(unsigned long *flags)
463{
464 unsigned int cpu, ok;
465
466 spin_lock_irqsave(&irq_big_lock, *flags);
467 irq_radix_writer = 1;
468 smp_mb();
469 do {
470 barrier();
471 ok = 1;
472 for_each_possible_cpu(cpu) {
473 if (per_cpu(irq_radix_reader, cpu)) {
474 ok = 0;
475 break;
476 }
477 }
478 if (!ok)
479 cpu_relax();
480 } while(!ok);
481}
482
483static void irq_radix_wrunlock(unsigned long flags)
484{
485 smp_wmb();
486 irq_radix_writer = 0;
487 spin_unlock_irqrestore(&irq_big_lock, flags);
488}
489
490static void irq_radix_rdlock(unsigned long *flags)
491{
492 local_irq_save(*flags);
493 __get_cpu_var(irq_radix_reader) = 1;
494 smp_mb();
495 if (likely(irq_radix_writer == 0))
496 return;
497 __get_cpu_var(irq_radix_reader) = 0;
498 smp_wmb();
499 spin_lock(&irq_big_lock);
500 __get_cpu_var(irq_radix_reader) = 1;
501 spin_unlock(&irq_big_lock);
502}
503
504static void irq_radix_rdunlock(unsigned long flags)
505{
506 __get_cpu_var(irq_radix_reader) = 0;
507 local_irq_restore(flags);
508}
509
510
458unsigned int irq_create_mapping(struct irq_host *host, 511unsigned int irq_create_mapping(struct irq_host *host,
459 irq_hw_number_t hwirq) 512 irq_hw_number_t hwirq)
460{ 513{
@@ -604,13 +657,9 @@ void irq_dispose_mapping(unsigned int virq)
604 /* Check if radix tree allocated yet */ 657 /* Check if radix tree allocated yet */
605 if (host->revmap_data.tree.gfp_mask == 0) 658 if (host->revmap_data.tree.gfp_mask == 0)
606 break; 659 break;
607 /* XXX radix tree not safe ! remove lock whem it becomes safe 660 irq_radix_wrlock(&flags);
608 * and use some RCU sync to make sure everything is ok before we
609 * can re-use that map entry
610 */
611 spin_lock_irqsave(&irq_big_lock, flags);
612 radix_tree_delete(&host->revmap_data.tree, hwirq); 661 radix_tree_delete(&host->revmap_data.tree, hwirq);
613 spin_unlock_irqrestore(&irq_big_lock, flags); 662 irq_radix_wrunlock(flags);
614 break; 663 break;
615 } 664 }
616 665
@@ -677,25 +726,24 @@ unsigned int irq_radix_revmap(struct irq_host *host,
677 if (tree->gfp_mask == 0) 726 if (tree->gfp_mask == 0)
678 return irq_find_mapping(host, hwirq); 727 return irq_find_mapping(host, hwirq);
679 728
680 /* XXX Current radix trees are NOT SMP safe !!! Remove that lock
681 * when that is fixed (when Nick's patch gets in
682 */
683 spin_lock_irqsave(&irq_big_lock, flags);
684
685 /* Now try to resolve */ 729 /* Now try to resolve */
730 irq_radix_rdlock(&flags);
686 ptr = radix_tree_lookup(tree, hwirq); 731 ptr = radix_tree_lookup(tree, hwirq);
732 irq_radix_rdunlock(flags);
733
687 /* Found it, return */ 734 /* Found it, return */
688 if (ptr) { 735 if (ptr) {
689 virq = ptr - irq_map; 736 virq = ptr - irq_map;
690 goto bail; 737 return virq;
691 } 738 }
692 739
693 /* If not there, try to insert it */ 740 /* If not there, try to insert it */
694 virq = irq_find_mapping(host, hwirq); 741 virq = irq_find_mapping(host, hwirq);
695 if (virq != NO_IRQ) 742 if (virq != NO_IRQ) {
743 irq_radix_wrlock(&flags);
696 radix_tree_insert(tree, hwirq, &irq_map[virq]); 744 radix_tree_insert(tree, hwirq, &irq_map[virq]);
697 bail: 745 irq_radix_wrunlock(flags);
698 spin_unlock_irqrestore(&irq_big_lock, flags); 746 }
699 return virq; 747 return virq;
700} 748}
701 749
@@ -806,12 +854,12 @@ static int irq_late_init(void)
806 struct irq_host *h; 854 struct irq_host *h;
807 unsigned long flags; 855 unsigned long flags;
808 856
809 spin_lock_irqsave(&irq_big_lock, flags); 857 irq_radix_wrlock(&flags);
810 list_for_each_entry(h, &irq_hosts, link) { 858 list_for_each_entry(h, &irq_hosts, link) {
811 if (h->revmap_type == IRQ_HOST_MAP_TREE) 859 if (h->revmap_type == IRQ_HOST_MAP_TREE)
812 INIT_RADIX_TREE(&h->revmap_data.tree, GFP_ATOMIC); 860 INIT_RADIX_TREE(&h->revmap_data.tree, GFP_ATOMIC);
813 } 861 }
814 spin_unlock_irqrestore(&irq_big_lock, flags); 862 irq_radix_wrunlock(flags);
815 863
816 return 0; 864 return 0;
817} 865}
diff --git a/arch/powerpc/kernel/misc.S b/arch/powerpc/kernel/misc.S
index fc23040d5a26..f770805f1215 100644
--- a/arch/powerpc/kernel/misc.S
+++ b/arch/powerpc/kernel/misc.S
@@ -17,15 +17,6 @@
17 17
18 .text 18 .text
19 19
20#ifdef CONFIG_PPC64
21#define IN_SYNC twi 0,r5,0; isync
22#define EIEIO_32
23#define SYNC_64 sync
24#else /* CONFIG_PPC32 */
25#define IN_SYNC
26#define EIEIO_32 eieio
27#define SYNC_64
28#endif
29/* 20/*
30 * Returns (address we are running at) - (address we were linked at) 21 * Returns (address we are running at) - (address we were linked at)
31 * for use before the text and data are mapped to KERNELBASE. 22 * for use before the text and data are mapped to KERNELBASE.
@@ -70,6 +61,7 @@ _GLOBAL(add_reloc_offset)
70 * The *_ns versions don't do byte-swapping. 61 * The *_ns versions don't do byte-swapping.
71 */ 62 */
72_GLOBAL(_insb) 63_GLOBAL(_insb)
64 sync
73 cmpwi 0,r5,0 65 cmpwi 0,r5,0
74 mtctr r5 66 mtctr r5
75 subi r4,r4,1 67 subi r4,r4,1
@@ -78,7 +70,8 @@ _GLOBAL(_insb)
78 eieio 70 eieio
79 stbu r5,1(r4) 71 stbu r5,1(r4)
80 bdnz 00b 72 bdnz 00b
81 IN_SYNC 73 twi 0,r5,0
74 isync
82 blr 75 blr
83 76
84_GLOBAL(_outsb) 77_GLOBAL(_outsb)
@@ -86,14 +79,15 @@ _GLOBAL(_outsb)
86 mtctr r5 79 mtctr r5
87 subi r4,r4,1 80 subi r4,r4,1
88 blelr- 81 blelr-
82 sync
8900: lbzu r5,1(r4) 8300: lbzu r5,1(r4)
90 stb r5,0(r3) 84 stb r5,0(r3)
91 EIEIO_32
92 bdnz 00b 85 bdnz 00b
93 SYNC_64 86 sync
94 blr 87 blr
95 88
96_GLOBAL(_insw) 89_GLOBAL(_insw)
90 sync
97 cmpwi 0,r5,0 91 cmpwi 0,r5,0
98 mtctr r5 92 mtctr r5
99 subi r4,r4,2 93 subi r4,r4,2
@@ -102,7 +96,8 @@ _GLOBAL(_insw)
102 eieio 96 eieio
103 sthu r5,2(r4) 97 sthu r5,2(r4)
104 bdnz 00b 98 bdnz 00b
105 IN_SYNC 99 twi 0,r5,0
100 isync
106 blr 101 blr
107 102
108_GLOBAL(_outsw) 103_GLOBAL(_outsw)
@@ -110,14 +105,15 @@ _GLOBAL(_outsw)
110 mtctr r5 105 mtctr r5
111 subi r4,r4,2 106 subi r4,r4,2
112 blelr- 107 blelr-
108 sync
11300: lhzu r5,2(r4) 10900: lhzu r5,2(r4)
114 EIEIO_32
115 sthbrx r5,0,r3 110 sthbrx r5,0,r3
116 bdnz 00b 111 bdnz 00b
117 SYNC_64 112 sync
118 blr 113 blr
119 114
120_GLOBAL(_insl) 115_GLOBAL(_insl)
116 sync
121 cmpwi 0,r5,0 117 cmpwi 0,r5,0
122 mtctr r5 118 mtctr r5
123 subi r4,r4,4 119 subi r4,r4,4
@@ -126,7 +122,8 @@ _GLOBAL(_insl)
126 eieio 122 eieio
127 stwu r5,4(r4) 123 stwu r5,4(r4)
128 bdnz 00b 124 bdnz 00b
129 IN_SYNC 125 twi 0,r5,0
126 isync
130 blr 127 blr
131 128
132_GLOBAL(_outsl) 129_GLOBAL(_outsl)
@@ -134,17 +131,18 @@ _GLOBAL(_outsl)
134 mtctr r5 131 mtctr r5
135 subi r4,r4,4 132 subi r4,r4,4
136 blelr- 133 blelr-
134 sync
13700: lwzu r5,4(r4) 13500: lwzu r5,4(r4)
138 stwbrx r5,0,r3 136 stwbrx r5,0,r3
139 EIEIO_32
140 bdnz 00b 137 bdnz 00b
141 SYNC_64 138 sync
142 blr 139 blr
143 140
144#ifdef CONFIG_PPC32 141#ifdef CONFIG_PPC32
145_GLOBAL(__ide_mm_insw) 142_GLOBAL(__ide_mm_insw)
146#endif 143#endif
147_GLOBAL(_insw_ns) 144_GLOBAL(_insw_ns)
145 sync
148 cmpwi 0,r5,0 146 cmpwi 0,r5,0
149 mtctr r5 147 mtctr r5
150 subi r4,r4,2 148 subi r4,r4,2
@@ -153,7 +151,8 @@ _GLOBAL(_insw_ns)
153 eieio 151 eieio
154 sthu r5,2(r4) 152 sthu r5,2(r4)
155 bdnz 00b 153 bdnz 00b
156 IN_SYNC 154 twi 0,r5,0
155 isync
157 blr 156 blr
158 157
159#ifdef CONFIG_PPC32 158#ifdef CONFIG_PPC32
@@ -164,17 +163,18 @@ _GLOBAL(_outsw_ns)
164 mtctr r5 163 mtctr r5
165 subi r4,r4,2 164 subi r4,r4,2
166 blelr- 165 blelr-
166 sync
16700: lhzu r5,2(r4) 16700: lhzu r5,2(r4)
168 sth r5,0(r3) 168 sth r5,0(r3)
169 EIEIO_32
170 bdnz 00b 169 bdnz 00b
171 SYNC_64 170 sync
172 blr 171 blr
173 172
174#ifdef CONFIG_PPC32 173#ifdef CONFIG_PPC32
175_GLOBAL(__ide_mm_insl) 174_GLOBAL(__ide_mm_insl)
176#endif 175#endif
177_GLOBAL(_insl_ns) 176_GLOBAL(_insl_ns)
177 sync
178 cmpwi 0,r5,0 178 cmpwi 0,r5,0
179 mtctr r5 179 mtctr r5
180 subi r4,r4,4 180 subi r4,r4,4
@@ -183,7 +183,8 @@ _GLOBAL(_insl_ns)
183 eieio 183 eieio
184 stwu r5,4(r4) 184 stwu r5,4(r4)
185 bdnz 00b 185 bdnz 00b
186 IN_SYNC 186 twi 0,r5,0
187 isync
187 blr 188 blr
188 189
189#ifdef CONFIG_PPC32 190#ifdef CONFIG_PPC32
@@ -194,10 +195,10 @@ _GLOBAL(_outsl_ns)
194 mtctr r5 195 mtctr r5
195 subi r4,r4,4 196 subi r4,r4,4
196 blelr- 197 blelr-
198 sync
19700: lwzu r5,4(r4) 19900: lwzu r5,4(r4)
198 stw r5,0(r3) 200 stw r5,0(r3)
199 EIEIO_32
200 bdnz 00b 201 bdnz 00b
201 SYNC_64 202 sync
202 blr 203 blr
203 204
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 2fce7738e9e2..138134c8c17d 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -1289,6 +1289,9 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
1289 1289
1290 DBG("Try to map irq for %s...\n", pci_name(pci_dev)); 1290 DBG("Try to map irq for %s...\n", pci_name(pci_dev));
1291 1291
1292#ifdef DEBUG
1293 memset(&oirq, 0xff, sizeof(oirq));
1294#endif
1292 /* Try to get a mapping from the device-tree */ 1295 /* Try to get a mapping from the device-tree */
1293 if (of_irq_map_pci(pci_dev, &oirq)) { 1296 if (of_irq_map_pci(pci_dev, &oirq)) {
1294 u8 line, pin; 1297 u8 line, pin;
@@ -1314,8 +1317,9 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
1314 if (virq != NO_IRQ) 1317 if (virq != NO_IRQ)
1315 set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); 1318 set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
1316 } else { 1319 } else {
1317 DBG(" -> got one, spec %d cells (0x%08x...) on %s\n", 1320 DBG(" -> got one, spec %d cells (0x%08x 0x%08x...) on %s\n",
1318 oirq.size, oirq.specifier[0], oirq.controller->full_name); 1321 oirq.size, oirq.specifier[0], oirq.specifier[1],
1322 oirq.controller->full_name);
1319 1323
1320 virq = irq_create_of_mapping(oirq.controller, oirq.specifier, 1324 virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
1321 oirq.size); 1325 oirq.size);
@@ -1324,6 +1328,9 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
1324 DBG(" -> failed to map !\n"); 1328 DBG(" -> failed to map !\n");
1325 return -1; 1329 return -1;
1326 } 1330 }
1331
1332 DBG(" -> mapped to linux irq %d\n", virq);
1333
1327 pci_dev->irq = virq; 1334 pci_dev->irq = virq;
1328 pci_write_config_byte(pci_dev, PCI_INTERRUPT_LINE, virq); 1335 pci_write_config_byte(pci_dev, PCI_INTERRUPT_LINE, virq);
1329 1336
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index f6a05f090b25..39d3bfcabcd2 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -126,10 +126,6 @@ EXPORT_SYMBOL(pci_bus_mem_base_phys);
126EXPORT_SYMBOL(pci_bus_to_hose); 126EXPORT_SYMBOL(pci_bus_to_hose);
127#endif /* CONFIG_PCI */ 127#endif /* CONFIG_PCI */
128 128
129#ifdef CONFIG_NOT_COHERENT_CACHE
130EXPORT_SYMBOL(flush_dcache_all);
131#endif
132
133EXPORT_SYMBOL(start_thread); 129EXPORT_SYMBOL(start_thread);
134EXPORT_SYMBOL(kernel_thread); 130EXPORT_SYMBOL(kernel_thread);
135 131
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 462bced40c12..4394e545f9f7 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -646,13 +646,13 @@ static unsigned char ibm_architecture_vec[] = {
646 5 - 1, /* 5 option vectors */ 646 5 - 1, /* 5 option vectors */
647 647
648 /* option vector 1: processor architectures supported */ 648 /* option vector 1: processor architectures supported */
649 3 - 1, /* length */ 649 3 - 2, /* length */
650 0, /* don't ignore, don't halt */ 650 0, /* don't ignore, don't halt */
651 OV1_PPC_2_00 | OV1_PPC_2_01 | OV1_PPC_2_02 | OV1_PPC_2_03 | 651 OV1_PPC_2_00 | OV1_PPC_2_01 | OV1_PPC_2_02 | OV1_PPC_2_03 |
652 OV1_PPC_2_04 | OV1_PPC_2_05, 652 OV1_PPC_2_04 | OV1_PPC_2_05,
653 653
654 /* option vector 2: Open Firmware options supported */ 654 /* option vector 2: Open Firmware options supported */
655 34 - 1, /* length */ 655 34 - 2, /* length */
656 OV2_REAL_MODE, 656 OV2_REAL_MODE,
657 0, 0, 657 0, 0,
658 W(0xffffffff), /* real_base */ 658 W(0xffffffff), /* real_base */
@@ -666,16 +666,16 @@ static unsigned char ibm_architecture_vec[] = {
666 48, /* max log_2(hash table size) */ 666 48, /* max log_2(hash table size) */
667 667
668 /* option vector 3: processor options supported */ 668 /* option vector 3: processor options supported */
669 3 - 1, /* length */ 669 3 - 2, /* length */
670 0, /* don't ignore, don't halt */ 670 0, /* don't ignore, don't halt */
671 OV3_FP | OV3_VMX, 671 OV3_FP | OV3_VMX,
672 672
673 /* option vector 4: IBM PAPR implementation */ 673 /* option vector 4: IBM PAPR implementation */
674 2 - 1, /* length */ 674 2 - 2, /* length */
675 0, /* don't halt */ 675 0, /* don't halt */
676 676
677 /* option vector 5: PAPR/OF options */ 677 /* option vector 5: PAPR/OF options */
678 3 - 1, /* length */ 678 3 - 2, /* length */
679 0, /* don't ignore, don't halt */ 679 0, /* don't ignore, don't halt */
680 OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES, 680 OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES,
681}; 681};
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 11052c212ad5..a10825a5dfe6 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -639,14 +639,17 @@ void of_irq_map_init(unsigned int flags)
639 639
640} 640}
641 641
642int of_irq_map_raw(struct device_node *parent, u32 *intspec, u32 *addr, 642int of_irq_map_raw(struct device_node *parent, u32 *intspec, u32 ointsize,
643 struct of_irq *out_irq) 643 u32 *addr, struct of_irq *out_irq)
644{ 644{
645 struct device_node *ipar, *tnode, *old = NULL, *newpar = NULL; 645 struct device_node *ipar, *tnode, *old = NULL, *newpar = NULL;
646 u32 *tmp, *imap, *imask; 646 u32 *tmp, *imap, *imask;
647 u32 intsize = 1, addrsize, newintsize = 0, newaddrsize = 0; 647 u32 intsize = 1, addrsize, newintsize = 0, newaddrsize = 0;
648 int imaplen, match, i; 648 int imaplen, match, i;
649 649
650 DBG("of_irq_map_raw: par=%s,intspec=[0x%08x 0x%08x...],ointsize=%d\n",
651 parent->full_name, intspec[0], intspec[1], ointsize);
652
650 ipar = of_node_get(parent); 653 ipar = of_node_get(parent);
651 654
652 /* First get the #interrupt-cells property of the current cursor 655 /* First get the #interrupt-cells property of the current cursor
@@ -670,6 +673,9 @@ int of_irq_map_raw(struct device_node *parent, u32 *intspec, u32 *addr,
670 673
671 DBG("of_irq_map_raw: ipar=%s, size=%d\n", ipar->full_name, intsize); 674 DBG("of_irq_map_raw: ipar=%s, size=%d\n", ipar->full_name, intsize);
672 675
676 if (ointsize != intsize)
677 return -EINVAL;
678
673 /* Look for this #address-cells. We have to implement the old linux 679 /* Look for this #address-cells. We have to implement the old linux
674 * trick of looking for the parent here as some device-trees rely on it 680 * trick of looking for the parent here as some device-trees rely on it
675 */ 681 */
@@ -875,12 +881,15 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq
875 } 881 }
876 intsize = *tmp; 882 intsize = *tmp;
877 883
884 DBG(" intsize=%d intlen=%d\n", intsize, intlen);
885
878 /* Check index */ 886 /* Check index */
879 if ((index + 1) * intsize > intlen) 887 if ((index + 1) * intsize > intlen)
880 return -EINVAL; 888 return -EINVAL;
881 889
882 /* Get new specifier and map it */ 890 /* Get new specifier and map it */
883 res = of_irq_map_raw(p, intspec + index * intsize, addr, out_irq); 891 res = of_irq_map_raw(p, intspec + index * intsize, intsize,
892 addr, out_irq);
884 of_node_put(p); 893 of_node_put(p);
885 return res; 894 return res;
886} 895}
@@ -965,7 +974,7 @@ int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq)
965 laddr[0] = (pdev->bus->number << 16) 974 laddr[0] = (pdev->bus->number << 16)
966 | (pdev->devfn << 8); 975 | (pdev->devfn << 8);
967 laddr[1] = laddr[2] = 0; 976 laddr[1] = laddr[2] = 0;
968 return of_irq_map_raw(ppnode, &lspec, laddr, out_irq); 977 return of_irq_map_raw(ppnode, &lspec, 1, laddr, out_irq);
969} 978}
970EXPORT_SYMBOL_GPL(of_irq_map_pci); 979EXPORT_SYMBOL_GPL(of_irq_map_pci);
971#endif /* CONFIG_PCI */ 980#endif /* CONFIG_PCI */
diff --git a/arch/powerpc/kernel/smp-tbsync.c b/arch/powerpc/kernel/smp-tbsync.c
index f19e2e0e61e7..de59c6c31a5b 100644
--- a/arch/powerpc/kernel/smp-tbsync.c
+++ b/arch/powerpc/kernel/smp-tbsync.c
@@ -45,8 +45,9 @@ void __devinit smp_generic_take_timebase(void)
45{ 45{
46 int cmd; 46 int cmd;
47 u64 tb; 47 u64 tb;
48 unsigned long flags;
48 49
49 local_irq_disable(); 50 local_irq_save(flags);
50 while (!running) 51 while (!running)
51 barrier(); 52 barrier();
52 rmb(); 53 rmb();
@@ -70,7 +71,7 @@ void __devinit smp_generic_take_timebase(void)
70 set_tb(tb >> 32, tb & 0xfffffffful); 71 set_tb(tb >> 32, tb & 0xfffffffful);
71 enter_contest(tbsync->mark, -1); 72 enter_contest(tbsync->mark, -1);
72 } 73 }
73 local_irq_enable(); 74 local_irq_restore(flags);
74} 75}
75 76
76static int __devinit start_contest(int cmd, long offset, int num) 77static int __devinit start_contest(int cmd, long offset, int num)
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 18e59e43d2b3..a124499e65d9 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -125,15 +125,8 @@ static long timezone_offset;
125unsigned long ppc_proc_freq; 125unsigned long ppc_proc_freq;
126unsigned long ppc_tb_freq; 126unsigned long ppc_tb_freq;
127 127
128u64 tb_last_jiffy __cacheline_aligned_in_smp; 128static u64 tb_last_jiffy __cacheline_aligned_in_smp;
129unsigned long tb_last_stamp; 129static DEFINE_PER_CPU(u64, last_jiffy);
130
131/*
132 * Note that on ppc32 this only stores the bottom 32 bits of
133 * the timebase value, but that's enough to tell when a jiffy
134 * has passed.
135 */
136DEFINE_PER_CPU(unsigned long, last_jiffy);
137 130
138#ifdef CONFIG_VIRT_CPU_ACCOUNTING 131#ifdef CONFIG_VIRT_CPU_ACCOUNTING
139/* 132/*
@@ -458,7 +451,7 @@ void do_gettimeofday(struct timeval *tv)
458 do { 451 do {
459 seq = read_seqbegin_irqsave(&xtime_lock, flags); 452 seq = read_seqbegin_irqsave(&xtime_lock, flags);
460 sec = xtime.tv_sec; 453 sec = xtime.tv_sec;
461 nsec = xtime.tv_nsec + tb_ticks_since(tb_last_stamp); 454 nsec = xtime.tv_nsec + tb_ticks_since(tb_last_jiffy);
462 } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); 455 } while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
463 usec = nsec / 1000; 456 usec = nsec / 1000;
464 while (usec >= 1000000) { 457 while (usec >= 1000000) {
@@ -700,7 +693,6 @@ void timer_interrupt(struct pt_regs * regs)
700 tb_next_jiffy = tb_last_jiffy + tb_ticks_per_jiffy; 693 tb_next_jiffy = tb_last_jiffy + tb_ticks_per_jiffy;
701 if (per_cpu(last_jiffy, cpu) >= tb_next_jiffy) { 694 if (per_cpu(last_jiffy, cpu) >= tb_next_jiffy) {
702 tb_last_jiffy = tb_next_jiffy; 695 tb_last_jiffy = tb_next_jiffy;
703 tb_last_stamp = per_cpu(last_jiffy, cpu);
704 do_timer(regs); 696 do_timer(regs);
705 timer_recalc_offset(tb_last_jiffy); 697 timer_recalc_offset(tb_last_jiffy);
706 timer_check_rtc(); 698 timer_check_rtc();
@@ -749,7 +741,7 @@ void __init smp_space_timers(unsigned int max_cpus)
749 int i; 741 int i;
750 unsigned long half = tb_ticks_per_jiffy / 2; 742 unsigned long half = tb_ticks_per_jiffy / 2;
751 unsigned long offset = tb_ticks_per_jiffy / max_cpus; 743 unsigned long offset = tb_ticks_per_jiffy / max_cpus;
752 unsigned long previous_tb = per_cpu(last_jiffy, boot_cpuid); 744 u64 previous_tb = per_cpu(last_jiffy, boot_cpuid);
753 745
754 /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */ 746 /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */
755 previous_tb -= tb_ticks_per_jiffy; 747 previous_tb -= tb_ticks_per_jiffy;
@@ -830,7 +822,7 @@ int do_settimeofday(struct timespec *tv)
830 * and therefore the (jiffies - wall_jiffies) computation 822 * and therefore the (jiffies - wall_jiffies) computation
831 * has been removed. 823 * has been removed.
832 */ 824 */
833 tb_delta = tb_ticks_since(tb_last_stamp); 825 tb_delta = tb_ticks_since(tb_last_jiffy);
834 tb_delta = mulhdu(tb_delta, do_gtod.varp->tb_to_xs); /* in xsec */ 826 tb_delta = mulhdu(tb_delta, do_gtod.varp->tb_to_xs); /* in xsec */
835 new_nsec -= SCALE_XSEC(tb_delta, 1000000000); 827 new_nsec -= SCALE_XSEC(tb_delta, 1000000000);
836 828
@@ -950,8 +942,7 @@ void __init time_init(void)
950 if (__USE_RTC()) { 942 if (__USE_RTC()) {
951 /* 601 processor: dec counts down by 128 every 128ns */ 943 /* 601 processor: dec counts down by 128 every 128ns */
952 ppc_tb_freq = 1000000000; 944 ppc_tb_freq = 1000000000;
953 tb_last_stamp = get_rtcl(); 945 tb_last_jiffy = get_rtcl();
954 tb_last_jiffy = tb_last_stamp;
955 } else { 946 } else {
956 /* Normal PowerPC with timebase register */ 947 /* Normal PowerPC with timebase register */
957 ppc_md.calibrate_decr(); 948 ppc_md.calibrate_decr();
@@ -959,7 +950,7 @@ void __init time_init(void)
959 ppc_tb_freq / 1000000, ppc_tb_freq % 1000000); 950 ppc_tb_freq / 1000000, ppc_tb_freq % 1000000);
960 printk(KERN_DEBUG "time_init: processor frequency = %lu.%.6lu MHz\n", 951 printk(KERN_DEBUG "time_init: processor frequency = %lu.%.6lu MHz\n",
961 ppc_proc_freq / 1000000, ppc_proc_freq % 1000000); 952 ppc_proc_freq / 1000000, ppc_proc_freq % 1000000);
962 tb_last_stamp = tb_last_jiffy = get_tb(); 953 tb_last_jiffy = get_tb();
963 } 954 }
964 955
965 tb_ticks_per_jiffy = ppc_tb_freq / HZ; 956 tb_ticks_per_jiffy = ppc_tb_freq / HZ;
@@ -1036,7 +1027,7 @@ void __init time_init(void)
1036 do_gtod.varp = &do_gtod.vars[0]; 1027 do_gtod.varp = &do_gtod.vars[0];
1037 do_gtod.var_idx = 0; 1028 do_gtod.var_idx = 0;
1038 do_gtod.varp->tb_orig_stamp = tb_last_jiffy; 1029 do_gtod.varp->tb_orig_stamp = tb_last_jiffy;
1039 __get_cpu_var(last_jiffy) = tb_last_stamp; 1030 __get_cpu_var(last_jiffy) = tb_last_jiffy;
1040 do_gtod.varp->stamp_xsec = (u64) xtime.tv_sec * XSEC_PER_SEC; 1031 do_gtod.varp->stamp_xsec = (u64) xtime.tv_sec * XSEC_PER_SEC;
1041 do_gtod.tb_ticks_per_sec = tb_ticks_per_sec; 1032 do_gtod.tb_ticks_per_sec = tb_ticks_per_sec;
1042 do_gtod.varp->tb_to_xs = tb_to_xs; 1033 do_gtod.varp->tb_to_xs = tb_to_xs;
diff --git a/arch/powerpc/lib/memcpy_64.S b/arch/powerpc/lib/memcpy_64.S
index fd66acfd3e3e..7173ba98f427 100644
--- a/arch/powerpc/lib/memcpy_64.S
+++ b/arch/powerpc/lib/memcpy_64.S
@@ -11,6 +11,7 @@
11 11
12 .align 7 12 .align 7
13_GLOBAL(memcpy) 13_GLOBAL(memcpy)
14 std r3,48(r1) /* save destination pointer for return value */
14 mtcrf 0x01,r5 15 mtcrf 0x01,r5
15 cmpldi cr1,r5,16 16 cmpldi cr1,r5,16
16 neg r6,r3 # LS 3 bits = # bytes to 8-byte dest bdry 17 neg r6,r3 # LS 3 bits = # bytes to 8-byte dest bdry
@@ -38,7 +39,7 @@ _GLOBAL(memcpy)
38 stdu r9,16(r3) 39 stdu r9,16(r3)
39 bdnz 1b 40 bdnz 1b
403: std r8,8(r3) 413: std r8,8(r3)
41 beqlr 42 beq 3f
42 addi r3,r3,16 43 addi r3,r3,16
43 ld r9,8(r4) 44 ld r9,8(r4)
44.Ldo_tail: 45.Ldo_tail:
@@ -53,7 +54,8 @@ _GLOBAL(memcpy)
532: bf cr7*4+3,3f 542: bf cr7*4+3,3f
54 rotldi r9,r9,8 55 rotldi r9,r9,8
55 stb r9,0(r3) 56 stb r9,0(r3)
563: blr 573: ld r3,48(r1) /* return dest pointer */
58 blr
57 59
58.Lsrc_unaligned: 60.Lsrc_unaligned:
59 srdi r6,r5,3 61 srdi r6,r5,3
@@ -115,7 +117,7 @@ _GLOBAL(memcpy)
1155: srd r12,r9,r11 1175: srd r12,r9,r11
116 or r12,r8,r12 118 or r12,r8,r12
117 std r12,24(r3) 119 std r12,24(r3)
118 beqlr 120 beq 4f
119 cmpwi cr1,r5,8 121 cmpwi cr1,r5,8
120 addi r3,r3,32 122 addi r3,r3,32
121 sld r9,r9,r10 123 sld r9,r9,r10
@@ -167,4 +169,5 @@ _GLOBAL(memcpy)
1673: bf cr7*4+3,4f 1693: bf cr7*4+3,4f
168 lbz r0,0(r4) 170 lbz r0,0(r4)
169 stb r0,0(r3) 171 stb r0,0(r3)
1704: blr 1724: ld r3,48(r1) /* return dest pointer */
173 blr
diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c
index 376829ed2211..0a0a0487b334 100644
--- a/arch/powerpc/mm/44x_mmu.c
+++ b/arch/powerpc/mm/44x_mmu.c
@@ -103,7 +103,7 @@ unsigned long __init mmu_mapin_ram(void)
103 103
104 /* Determine number of entries necessary to cover lowmem */ 104 /* Determine number of entries necessary to cover lowmem */
105 pinned_tlbs = (unsigned int) 105 pinned_tlbs = (unsigned int)
106 (_ALIGN(total_lowmem, PPC44x_PIN_SIZE) >> PPC44x_PIN_SHIFT); 106 (_ALIGN(total_lowmem, PPC_PIN_SIZE) >> PPC44x_PIN_SHIFT);
107 107
108 /* Write upper watermark to save location */ 108 /* Write upper watermark to save location */
109 tlb_44x_hwater = PPC44x_LOW_SLOT - pinned_tlbs; 109 tlb_44x_hwater = PPC44x_LOW_SLOT - pinned_tlbs;
@@ -111,7 +111,7 @@ unsigned long __init mmu_mapin_ram(void)
111 /* If necessary, set additional pinned TLBs */ 111 /* If necessary, set additional pinned TLBs */
112 if (pinned_tlbs > 1) 112 if (pinned_tlbs > 1)
113 for (i = (PPC44x_LOW_SLOT-(pinned_tlbs-1)); i < PPC44x_LOW_SLOT; i++) { 113 for (i = (PPC44x_LOW_SLOT-(pinned_tlbs-1)); i < PPC44x_LOW_SLOT; i++) {
114 unsigned int phys_addr = (PPC44x_LOW_SLOT-i) * PPC44x_PIN_SIZE; 114 unsigned int phys_addr = (PPC44x_LOW_SLOT-i) * PPC_PIN_SIZE;
115 ppc44x_pin_tlb(i, phys_addr+PAGE_OFFSET, phys_addr); 115 ppc44x_pin_tlb(i, phys_addr+PAGE_OFFSET, phys_addr);
116 } 116 }
117 117
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
index b46305645d38..cf3967a66fb5 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -46,26 +46,6 @@ unsigned long isa_io_base = 0;
46unsigned long isa_mem_base = 0; 46unsigned long isa_mem_base = 0;
47#endif 47#endif
48 48
49#ifdef CONFIG_PCI
50static int
51mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
52{
53 static char pci_irq_table[][4] =
54 /*
55 * PCI IDSEL/INTPIN->INTLINE
56 * A B C D
57 */
58 {
59 {PIRQB, PIRQC, PIRQD, PIRQA}, /* idsel 0x0e */
60 {PIRQA, PIRQB, PIRQC, PIRQD}, /* idsel 0x0f */
61 {PIRQC, PIRQD, PIRQA, PIRQB}, /* idsel 0x10 */
62 };
63
64 const long min_idsel = 0x0e, max_idsel = 0x10, irqs_per_slot = 4;
65 return PCI_IRQ_TABLE_LOOKUP;
66}
67#endif /* CONFIG_PCI */
68
69/* ************************************************************************ 49/* ************************************************************************
70 * 50 *
71 * Setup the architecture 51 * Setup the architecture
@@ -92,8 +72,6 @@ static void __init mpc834x_itx_setup_arch(void)
92 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 72 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
93 add_bridge(np); 73 add_bridge(np);
94 74
95 ppc_md.pci_swizzle = common_swizzle;
96 ppc_md.pci_map_irq = mpc83xx_map_irq;
97 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 75 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
98#endif 76#endif
99 77
@@ -106,25 +84,13 @@ static void __init mpc834x_itx_setup_arch(void)
106 84
107void __init mpc834x_itx_init_IRQ(void) 85void __init mpc834x_itx_init_IRQ(void)
108{ 86{
109 u8 senses[8] = { 87 struct device_node *np;
110 0, /* EXT 0 */ 88
111 IRQ_SENSE_LEVEL, /* EXT 1 */ 89 np = of_find_node_by_type(NULL, "ipic");
112 IRQ_SENSE_LEVEL, /* EXT 2 */ 90 if (!np)
113 0, /* EXT 3 */ 91 return;
114#ifdef CONFIG_PCI
115 IRQ_SENSE_LEVEL, /* EXT 4 */
116 IRQ_SENSE_LEVEL, /* EXT 5 */
117 IRQ_SENSE_LEVEL, /* EXT 6 */
118 IRQ_SENSE_LEVEL, /* EXT 7 */
119#else
120 0, /* EXT 4 */
121 0, /* EXT 5 */
122 0, /* EXT 6 */
123 0, /* EXT 7 */
124#endif
125 };
126 92
127 ipic_init(get_immrbase() + 0x00700, 0, 0, senses, 8); 93 ipic_init(np, 0);
128 94
129 /* Initialize the default interrupt mapping priorities, 95 /* Initialize the default interrupt mapping priorities,
130 * in case the boot rom changed something on us. 96 * in case the boot rom changed something on us.
@@ -153,4 +119,7 @@ define_machine(mpc834x_itx) {
153 .time_init = mpc83xx_time_init, 119 .time_init = mpc83xx_time_init,
154 .calibrate_decr = generic_calibrate_decr, 120 .calibrate_decr = generic_calibrate_decr,
155 .progress = udbg_progress, 121 .progress = udbg_progress,
122#ifdef CONFIG_PCI
123 .pcibios_fixup = mpc83xx_pcibios_fixup,
124#endif
156}; 125};
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.c b/arch/powerpc/platforms/83xx/mpc834x_sys.c
index 3e1c16eb4a63..32df239d1c48 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_sys.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_sys.c
@@ -43,33 +43,6 @@ unsigned long isa_io_base = 0;
43unsigned long isa_mem_base = 0; 43unsigned long isa_mem_base = 0;
44#endif 44#endif
45 45
46#ifdef CONFIG_PCI
47static int
48mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
49{
50 static char pci_irq_table[][4] =
51 /*
52 * PCI IDSEL/INTPIN->INTLINE
53 * A B C D
54 */
55 {
56 {PIRQA, PIRQB, PIRQC, PIRQD}, /* idsel 0x11 */
57 {PIRQC, PIRQD, PIRQA, PIRQB}, /* idsel 0x12 */
58 {PIRQD, PIRQA, PIRQB, PIRQC}, /* idsel 0x13 */
59 {0, 0, 0, 0},
60 {PIRQA, PIRQB, PIRQC, PIRQD}, /* idsel 0x15 */
61 {PIRQD, PIRQA, PIRQB, PIRQC}, /* idsel 0x16 */
62 {PIRQC, PIRQD, PIRQA, PIRQB}, /* idsel 0x17 */
63 {PIRQB, PIRQC, PIRQD, PIRQA}, /* idsel 0x18 */
64 {0, 0, 0, 0}, /* idsel 0x19 */
65 {0, 0, 0, 0}, /* idsel 0x20 */
66 };
67
68 const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4;
69 return PCI_IRQ_TABLE_LOOKUP;
70}
71#endif /* CONFIG_PCI */
72
73/* ************************************************************************ 46/* ************************************************************************
74 * 47 *
75 * Setup the architecture 48 * Setup the architecture
@@ -96,8 +69,6 @@ static void __init mpc834x_sys_setup_arch(void)
96 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 69 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
97 add_bridge(np); 70 add_bridge(np);
98 71
99 ppc_md.pci_swizzle = common_swizzle;
100 ppc_md.pci_map_irq = mpc83xx_map_irq;
101 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 72 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
102#endif 73#endif
103 74
@@ -110,25 +81,13 @@ static void __init mpc834x_sys_setup_arch(void)
110 81
111void __init mpc834x_sys_init_IRQ(void) 82void __init mpc834x_sys_init_IRQ(void)
112{ 83{
113 u8 senses[8] = { 84 struct device_node *np;
114 0, /* EXT 0 */ 85
115 IRQ_SENSE_LEVEL, /* EXT 1 */ 86 np = of_find_node_by_type(NULL, "ipic");
116 IRQ_SENSE_LEVEL, /* EXT 2 */ 87 if (!np)
117 0, /* EXT 3 */ 88 return;
118#ifdef CONFIG_PCI
119 IRQ_SENSE_LEVEL, /* EXT 4 */
120 IRQ_SENSE_LEVEL, /* EXT 5 */
121 IRQ_SENSE_LEVEL, /* EXT 6 */
122 IRQ_SENSE_LEVEL, /* EXT 7 */
123#else
124 0, /* EXT 4 */
125 0, /* EXT 5 */
126 0, /* EXT 6 */
127 0, /* EXT 7 */
128#endif
129 };
130 89
131 ipic_init(get_immrbase() + 0x00700, 0, 0, senses, 8); 90 ipic_init(np, 0);
132 91
133 /* Initialize the default interrupt mapping priorities, 92 /* Initialize the default interrupt mapping priorities,
134 * in case the boot rom changed something on us. 93 * in case the boot rom changed something on us.
@@ -178,4 +137,7 @@ define_machine(mpc834x_sys) {
178 .time_init = mpc83xx_time_init, 137 .time_init = mpc83xx_time_init,
179 .calibrate_decr = generic_calibrate_decr, 138 .calibrate_decr = generic_calibrate_decr,
180 .progress = udbg_progress, 139 .progress = udbg_progress,
140#ifdef CONFIG_PCI
141 .pcibios_fixup = mpc83xx_pcibios_fixup,
142#endif
181}; 143};
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index 01cae106912b..2c82bca9bfbb 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -11,6 +11,7 @@
11 11
12extern int add_bridge(struct device_node *dev); 12extern int add_bridge(struct device_node *dev);
13extern int mpc83xx_exclude_device(u_char bus, u_char devfn); 13extern int mpc83xx_exclude_device(u_char bus, u_char devfn);
14extern void mpc83xx_pcibios_fixup(void);
14extern void mpc83xx_restart(char *cmd); 15extern void mpc83xx_restart(char *cmd);
15extern long mpc83xx_time_init(void); 16extern long mpc83xx_time_init(void);
16 17
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c
index 3b5e563c279f..5d84a9ccd103 100644
--- a/arch/powerpc/platforms/83xx/pci.c
+++ b/arch/powerpc/platforms/83xx/pci.c
@@ -45,6 +45,15 @@ int mpc83xx_exclude_device(u_char bus, u_char devfn)
45 return PCIBIOS_SUCCESSFUL; 45 return PCIBIOS_SUCCESSFUL;
46} 46}
47 47
48void __init mpc83xx_pcibios_fixup(void)
49{
50 struct pci_dev *dev = NULL;
51
52 /* map all the PCI irqs */
53 for_each_pci_dev(dev)
54 pci_read_irq_line(dev);
55}
56
48int __init add_bridge(struct device_node *dev) 57int __init add_bridge(struct device_node *dev)
49{ 58{
50 int len; 59 int len;
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 146da3001c67..5e583cf38786 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -52,6 +52,7 @@ unsigned long pci_dram_offset = 0;
52#endif 52#endif
53 53
54 54
55#ifdef CONFIG_PCI
55static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc, 56static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc,
56 struct pt_regs *regs) 57 struct pt_regs *regs)
57{ 58{
@@ -60,40 +61,43 @@ static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc,
60 generic_handle_irq(cascade_irq, regs); 61 generic_handle_irq(cascade_irq, regs);
61 desc->chip->eoi(irq); 62 desc->chip->eoi(irq);
62} 63}
64#endif /* CONFIG_PCI */
63 65
64void __init 66void __init
65mpc86xx_hpcn_init_irq(void) 67mpc86xx_hpcn_init_irq(void)
66{ 68{
67 struct mpic *mpic1; 69 struct mpic *mpic1;
68 struct device_node *np, *cascade_node = NULL; 70 struct device_node *np;
71 struct resource res;
72#ifdef CONFIG_PCI
73 struct device_node *cascade_node = NULL;
69 int cascade_irq; 74 int cascade_irq;
70 phys_addr_t openpic_paddr; 75#endif
71 76
77 /* Determine PIC address. */
72 np = of_find_node_by_type(NULL, "open-pic"); 78 np = of_find_node_by_type(NULL, "open-pic");
73 if (np == NULL) 79 if (np == NULL)
74 return; 80 return;
75 81 of_address_to_resource(np, 0, &res);
76 /* Determine the Physical Address of the OpenPIC regs */
77 openpic_paddr = get_immrbase() + MPC86xx_OPENPIC_OFFSET;
78 82
79 /* Alloc mpic structure and per isu has 16 INT entries. */ 83 /* Alloc mpic structure and per isu has 16 INT entries. */
80 mpic1 = mpic_alloc(np, openpic_paddr, 84 mpic1 = mpic_alloc(np, res.start,
81 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 85 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
82 16, NR_IRQS - 4, 86 16, NR_IRQS - 4,
83 " MPIC "); 87 " MPIC ");
84 BUG_ON(mpic1 == NULL); 88 BUG_ON(mpic1 == NULL);
85 89
86 mpic_assign_isu(mpic1, 0, openpic_paddr + 0x10000); 90 mpic_assign_isu(mpic1, 0, res.start + 0x10000);
87 91
88 /* 48 Internal Interrupts */ 92 /* 48 Internal Interrupts */
89 mpic_assign_isu(mpic1, 1, openpic_paddr + 0x10200); 93 mpic_assign_isu(mpic1, 1, res.start + 0x10200);
90 mpic_assign_isu(mpic1, 2, openpic_paddr + 0x10400); 94 mpic_assign_isu(mpic1, 2, res.start + 0x10400);
91 mpic_assign_isu(mpic1, 3, openpic_paddr + 0x10600); 95 mpic_assign_isu(mpic1, 3, res.start + 0x10600);
92 96
93 /* 16 External interrupts 97 /* 16 External interrupts
94 * Moving them from [0 - 15] to [64 - 79] 98 * Moving them from [0 - 15] to [64 - 79]
95 */ 99 */
96 mpic_assign_isu(mpic1, 4, openpic_paddr + 0x10000); 100 mpic_assign_isu(mpic1, 4, res.start + 0x10000);
97 101
98 mpic_init(mpic1); 102 mpic_init(mpic1);
99 103
@@ -154,7 +158,7 @@ get_pci_irq_from_of(struct pci_controller *hose, int slot, int pin)
154 158
155 laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(slot, 0) << 8); 159 laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(slot, 0) << 8);
156 laddr[1] = laddr[2] = 0; 160 laddr[1] = laddr[2] = 0;
157 of_irq_map_raw(hosenode, &pin, laddr, &oirq); 161 of_irq_map_raw(hosenode, &pin, 1, laddr, &oirq);
158 DBG("mpc86xx_hpcn: pci irq addr %x, slot %d, pin %d, irq %d\n", 162 DBG("mpc86xx_hpcn: pci irq addr %x, slot %d, pin %d, irq %d\n",
159 laddr[0], slot, pin, oirq.specifier[0]); 163 laddr[0], slot, pin, oirq.specifier[0]);
160 return oirq.specifier[0]; 164 return oirq.specifier[0];
diff --git a/arch/powerpc/platforms/86xx/pci.c b/arch/powerpc/platforms/86xx/pci.c
index bc5139043112..a8c8f0a44055 100644
--- a/arch/powerpc/platforms/86xx/pci.c
+++ b/arch/powerpc/platforms/86xx/pci.c
@@ -188,7 +188,8 @@ int __init add_bridge(struct device_node *dev)
188 188
189 printk(KERN_INFO "Found MPC86xx PCIE host bridge at 0x%08lx. " 189 printk(KERN_INFO "Found MPC86xx PCIE host bridge at 0x%08lx. "
190 "Firmware bus number: %d->%d\n", 190 "Firmware bus number: %d->%d\n",
191 rsrc.start, hose->first_busno, hose->last_busno); 191 (unsigned long) rsrc.start,
192 hose->first_busno, hose->last_busno);
192 193
193 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", 194 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
194 hose, hose->cfg_addr, hose->cfg_data); 195 hose, hose->cfg_addr, hose->cfg_data);
diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig
index ba07a9a7c039..234a861870a8 100644
--- a/arch/powerpc/platforms/embedded6xx/Kconfig
+++ b/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -80,6 +80,7 @@ config MPC7448HPC2
80 select DEFAULT_UIMAGE 80 select DEFAULT_UIMAGE
81 select PPC_UDBG_16550 81 select PPC_UDBG_16550
82 select MPIC 82 select MPIC
83 select MPIC_WEIRD
83 help 84 help
84 Select MPC7448HPC2 if configuring for Freescale MPC7448HPC2 (Taiga) 85 Select MPC7448HPC2 if configuring for Freescale MPC7448HPC2 (Taiga)
85 platform 86 platform
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
index ed00ed2455dd..5d393eb94935 100644
--- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
+++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
@@ -215,7 +215,7 @@ static void __init mpc7448_hpc2_init_IRQ(void)
215 215
216 mpic = mpic_alloc(tsi_pic, mpic_paddr, 216 mpic = mpic_alloc(tsi_pic, mpic_paddr,
217 MPIC_PRIMARY | MPIC_BIG_ENDIAN | MPIC_WANTS_RESET | 217 MPIC_PRIMARY | MPIC_BIG_ENDIAN | MPIC_WANTS_RESET |
218 MPIC_SPV_EOI | MPIC_MOD_ID(MPIC_ID_TSI108), 218 MPIC_SPV_EOI | MPIC_NO_PTHROU_DIS | MPIC_REGSET_TSI108,
219 0, /* num_sources used */ 219 0, /* num_sources used */
220 0, /* num_sources used */ 220 0, /* num_sources used */
221 "Tsi108_PIC"); 221 "Tsi108_PIC");
diff --git a/arch/powerpc/platforms/powermac/pfunc_base.c b/arch/powerpc/platforms/powermac/pfunc_base.c
index 6d66359ec8c8..aacfa59595d1 100644
--- a/arch/powerpc/platforms/powermac/pfunc_base.c
+++ b/arch/powerpc/platforms/powermac/pfunc_base.c
@@ -256,7 +256,7 @@ static struct pmf_handlers macio_mmio_handlers = {
256 .write_reg32 = macio_do_write_reg32, 256 .write_reg32 = macio_do_write_reg32,
257 .read_reg32 = macio_do_read_reg32, 257 .read_reg32 = macio_do_read_reg32,
258 .write_reg8 = macio_do_write_reg8, 258 .write_reg8 = macio_do_write_reg8,
259 .read_reg32 = macio_do_read_reg8, 259 .read_reg8 = macio_do_read_reg8,
260 .read_reg32_msrx = macio_do_read_reg32_msrx, 260 .read_reg32_msrx = macio_do_read_reg32_msrx,
261 .read_reg8_msrx = macio_do_read_reg8_msrx, 261 .read_reg8_msrx = macio_do_read_reg8_msrx,
262 .write_reg32_slm = macio_do_write_reg32_slm, 262 .write_reg32_slm = macio_do_write_reg32_slm,
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 060789e31c67..39f7ddb554ea 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -87,8 +87,8 @@ static void __pmac_retrigger(unsigned int irq_nr)
87static void pmac_mask_and_ack_irq(unsigned int virq) 87static void pmac_mask_and_ack_irq(unsigned int virq)
88{ 88{
89 unsigned int src = irq_map[virq].hwirq; 89 unsigned int src = irq_map[virq].hwirq;
90 unsigned long bit = 1UL << (virq & 0x1f); 90 unsigned long bit = 1UL << (src & 0x1f);
91 int i = virq >> 5; 91 int i = src >> 5;
92 unsigned long flags; 92 unsigned long flags;
93 93
94 spin_lock_irqsave(&pmac_pic_lock, flags); 94 spin_lock_irqsave(&pmac_pic_lock, flags);
@@ -175,7 +175,7 @@ static void pmac_mask_irq(unsigned int virq)
175 175
176 spin_lock_irqsave(&pmac_pic_lock, flags); 176 spin_lock_irqsave(&pmac_pic_lock, flags);
177 __clear_bit(src, ppc_cached_irq_mask); 177 __clear_bit(src, ppc_cached_irq_mask);
178 __pmac_set_irq_mask(src, 0); 178 __pmac_set_irq_mask(src, 1);
179 spin_unlock_irqrestore(&pmac_pic_lock, flags); 179 spin_unlock_irqrestore(&pmac_pic_lock, flags);
180} 180}
181 181
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index cebfae242602..e5e999ea891a 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -9,11 +9,11 @@ obj-$(CONFIG_BOOKE) += dcr.o
9obj-$(CONFIG_40x) += dcr.o 9obj-$(CONFIG_40x) += dcr.o
10obj-$(CONFIG_U3_DART) += dart_iommu.o 10obj-$(CONFIG_U3_DART) += dart_iommu.o
11obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o 11obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o
12obj-$(CONFIG_PPC_83xx) += ipic.o
13obj-$(CONFIG_FSL_SOC) += fsl_soc.o 12obj-$(CONFIG_FSL_SOC) += fsl_soc.o
14obj-$(CONFIG_PPC_TODC) += todc.o 13obj-$(CONFIG_PPC_TODC) += todc.o
15obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o 14obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o
16 15
17ifeq ($(CONFIG_PPC_MERGE),y) 16ifeq ($(CONFIG_PPC_MERGE),y)
18obj-$(CONFIG_PPC_I8259) += i8259.o 17obj-$(CONFIG_PPC_I8259) += i8259.o
19 endif 18obj-$(CONFIG_PPC_83xx) += ipic.o
19endif
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c
index e32fadde1f77..03b4477dd7f0 100644
--- a/arch/powerpc/sysdev/dart_iommu.c
+++ b/arch/powerpc/sysdev/dart_iommu.c
@@ -139,6 +139,7 @@ wait_more:
139 139
140static void dart_flush(struct iommu_table *tbl) 140static void dart_flush(struct iommu_table *tbl)
141{ 141{
142 mb();
142 if (dart_dirty) { 143 if (dart_dirty) {
143 dart_tlb_invalidate_all(); 144 dart_tlb_invalidate_all();
144 dart_dirty = 0; 145 dart_dirty = 0;
@@ -172,9 +173,13 @@ static void dart_build(struct iommu_table *tbl, long index,
172 uaddr += DART_PAGE_SIZE; 173 uaddr += DART_PAGE_SIZE;
173 } 174 }
174 175
176 /* make sure all updates have reached memory */
177 mb();
178 in_be32((unsigned __iomem *)dp);
179 mb();
180
175 if (dart_is_u4) { 181 if (dart_is_u4) {
176 rpn = index; 182 rpn = index;
177 mb(); /* make sure all updates have reached memory */
178 while (npages--) 183 while (npages--)
179 dart_tlb_invalidate_one(rpn++); 184 dart_tlb_invalidate_one(rpn++);
180 } else { 185 } else {
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c
index 46801f5ec03f..70e707785d49 100644
--- a/arch/powerpc/sysdev/ipic.c
+++ b/arch/powerpc/sysdev/ipic.c
@@ -19,15 +19,18 @@
19#include <linux/sched.h> 19#include <linux/sched.h>
20#include <linux/signal.h> 20#include <linux/signal.h>
21#include <linux/sysdev.h> 21#include <linux/sysdev.h>
22#include <linux/device.h>
23#include <linux/bootmem.h>
24#include <linux/spinlock.h>
22#include <asm/irq.h> 25#include <asm/irq.h>
23#include <asm/io.h> 26#include <asm/io.h>
27#include <asm/prom.h>
24#include <asm/ipic.h> 28#include <asm/ipic.h>
25#include <asm/mpc83xx.h>
26 29
27#include "ipic.h" 30#include "ipic.h"
28 31
29static struct ipic p_ipic;
30static struct ipic * primary_ipic; 32static struct ipic * primary_ipic;
33static DEFINE_SPINLOCK(ipic_lock);
31 34
32static struct ipic_info ipic_info[] = { 35static struct ipic_info ipic_info[] = {
33 [9] = { 36 [9] = {
@@ -373,74 +376,220 @@ static inline void ipic_write(volatile u32 __iomem *base, unsigned int reg, u32
373 out_be32(base + (reg >> 2), value); 376 out_be32(base + (reg >> 2), value);
374} 377}
375 378
376static inline struct ipic * ipic_from_irq(unsigned int irq) 379static inline struct ipic * ipic_from_irq(unsigned int virq)
377{ 380{
378 return primary_ipic; 381 return primary_ipic;
379} 382}
380 383
381static void ipic_enable_irq(unsigned int irq) 384#define ipic_irq_to_hw(virq) ((unsigned int)irq_map[virq].hwirq)
385
386static void ipic_unmask_irq(unsigned int virq)
382{ 387{
383 struct ipic *ipic = ipic_from_irq(irq); 388 struct ipic *ipic = ipic_from_irq(virq);
384 unsigned int src = irq - ipic->irq_offset; 389 unsigned int src = ipic_irq_to_hw(virq);
390 unsigned long flags;
385 u32 temp; 391 u32 temp;
386 392
393 spin_lock_irqsave(&ipic_lock, flags);
394
387 temp = ipic_read(ipic->regs, ipic_info[src].mask); 395 temp = ipic_read(ipic->regs, ipic_info[src].mask);
388 temp |= (1 << (31 - ipic_info[src].bit)); 396 temp |= (1 << (31 - ipic_info[src].bit));
389 ipic_write(ipic->regs, ipic_info[src].mask, temp); 397 ipic_write(ipic->regs, ipic_info[src].mask, temp);
398
399 spin_unlock_irqrestore(&ipic_lock, flags);
390} 400}
391 401
392static void ipic_disable_irq(unsigned int irq) 402static void ipic_mask_irq(unsigned int virq)
393{ 403{
394 struct ipic *ipic = ipic_from_irq(irq); 404 struct ipic *ipic = ipic_from_irq(virq);
395 unsigned int src = irq - ipic->irq_offset; 405 unsigned int src = ipic_irq_to_hw(virq);
406 unsigned long flags;
396 u32 temp; 407 u32 temp;
397 408
409 spin_lock_irqsave(&ipic_lock, flags);
410
398 temp = ipic_read(ipic->regs, ipic_info[src].mask); 411 temp = ipic_read(ipic->regs, ipic_info[src].mask);
399 temp &= ~(1 << (31 - ipic_info[src].bit)); 412 temp &= ~(1 << (31 - ipic_info[src].bit));
400 ipic_write(ipic->regs, ipic_info[src].mask, temp); 413 ipic_write(ipic->regs, ipic_info[src].mask, temp);
414
415 spin_unlock_irqrestore(&ipic_lock, flags);
401} 416}
402 417
403static void ipic_disable_irq_and_ack(unsigned int irq) 418static void ipic_ack_irq(unsigned int virq)
404{ 419{
405 struct ipic *ipic = ipic_from_irq(irq); 420 struct ipic *ipic = ipic_from_irq(virq);
406 unsigned int src = irq - ipic->irq_offset; 421 unsigned int src = ipic_irq_to_hw(virq);
422 unsigned long flags;
407 u32 temp; 423 u32 temp;
408 424
409 ipic_disable_irq(irq); 425 spin_lock_irqsave(&ipic_lock, flags);
410 426
411 temp = ipic_read(ipic->regs, ipic_info[src].pend); 427 temp = ipic_read(ipic->regs, ipic_info[src].pend);
412 temp |= (1 << (31 - ipic_info[src].bit)); 428 temp |= (1 << (31 - ipic_info[src].bit));
413 ipic_write(ipic->regs, ipic_info[src].pend, temp); 429 ipic_write(ipic->regs, ipic_info[src].pend, temp);
430
431 spin_unlock_irqrestore(&ipic_lock, flags);
414} 432}
415 433
416static void ipic_end_irq(unsigned int irq) 434static void ipic_mask_irq_and_ack(unsigned int virq)
417{ 435{
418 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) 436 struct ipic *ipic = ipic_from_irq(virq);
419 ipic_enable_irq(irq); 437 unsigned int src = ipic_irq_to_hw(virq);
438 unsigned long flags;
439 u32 temp;
440
441 spin_lock_irqsave(&ipic_lock, flags);
442
443 temp = ipic_read(ipic->regs, ipic_info[src].mask);
444 temp &= ~(1 << (31 - ipic_info[src].bit));
445 ipic_write(ipic->regs, ipic_info[src].mask, temp);
446
447 temp = ipic_read(ipic->regs, ipic_info[src].pend);
448 temp |= (1 << (31 - ipic_info[src].bit));
449 ipic_write(ipic->regs, ipic_info[src].pend, temp);
450
451 spin_unlock_irqrestore(&ipic_lock, flags);
420} 452}
421 453
422struct hw_interrupt_type ipic = { 454static int ipic_set_irq_type(unsigned int virq, unsigned int flow_type)
423 .typename = " IPIC ", 455{
424 .enable = ipic_enable_irq, 456 struct ipic *ipic = ipic_from_irq(virq);
425 .disable = ipic_disable_irq, 457 unsigned int src = ipic_irq_to_hw(virq);
426 .ack = ipic_disable_irq_and_ack, 458 struct irq_desc *desc = get_irq_desc(virq);
427 .end = ipic_end_irq, 459 unsigned int vold, vnew, edibit;
460
461 if (flow_type == IRQ_TYPE_NONE)
462 flow_type = IRQ_TYPE_LEVEL_LOW;
463
464 /* ipic supports only low assertion and high-to-low change senses
465 */
466 if (!(flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_EDGE_FALLING))) {
467 printk(KERN_ERR "ipic: sense type 0x%x not supported\n",
468 flow_type);
469 return -EINVAL;
470 }
471
472 desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
473 desc->status |= flow_type & IRQ_TYPE_SENSE_MASK;
474 if (flow_type & IRQ_TYPE_LEVEL_LOW) {
475 desc->status |= IRQ_LEVEL;
476 set_irq_handler(virq, handle_level_irq);
477 } else {
478 set_irq_handler(virq, handle_edge_irq);
479 }
480
481 /* only EXT IRQ senses are programmable on ipic
482 * internal IRQ senses are LEVEL_LOW
483 */
484 if (src == IPIC_IRQ_EXT0)
485 edibit = 15;
486 else
487 if (src >= IPIC_IRQ_EXT1 && src <= IPIC_IRQ_EXT7)
488 edibit = (14 - (src - IPIC_IRQ_EXT1));
489 else
490 return (flow_type & IRQ_TYPE_LEVEL_LOW) ? 0 : -EINVAL;
491
492 vold = ipic_read(ipic->regs, IPIC_SECNR);
493 if ((flow_type & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_FALLING) {
494 vnew = vold | (1 << edibit);
495 } else {
496 vnew = vold & ~(1 << edibit);
497 }
498 if (vold != vnew)
499 ipic_write(ipic->regs, IPIC_SECNR, vnew);
500 return 0;
501}
502
503static struct irq_chip ipic_irq_chip = {
504 .typename = " IPIC ",
505 .unmask = ipic_unmask_irq,
506 .mask = ipic_mask_irq,
507 .mask_ack = ipic_mask_irq_and_ack,
508 .ack = ipic_ack_irq,
509 .set_type = ipic_set_irq_type,
510};
511
512static int ipic_host_match(struct irq_host *h, struct device_node *node)
513{
514 struct ipic *ipic = h->host_data;
515
516 /* Exact match, unless ipic node is NULL */
517 return ipic->of_node == NULL || ipic->of_node == node;
518}
519
520static int ipic_host_map(struct irq_host *h, unsigned int virq,
521 irq_hw_number_t hw)
522{
523 struct ipic *ipic = h->host_data;
524 struct irq_chip *chip;
525
526 /* Default chip */
527 chip = &ipic->hc_irq;
528
529 set_irq_chip_data(virq, ipic);
530 set_irq_chip_and_handler(virq, chip, handle_level_irq);
531
532 /* Set default irq type */
533 set_irq_type(virq, IRQ_TYPE_NONE);
534
535 return 0;
536}
537
538static int ipic_host_xlate(struct irq_host *h, struct device_node *ct,
539 u32 *intspec, unsigned int intsize,
540 irq_hw_number_t *out_hwirq, unsigned int *out_flags)
541
542{
543 /* interrupt sense values coming from the device tree equal either
544 * LEVEL_LOW (low assertion) or EDGE_FALLING (high-to-low change)
545 */
546 *out_hwirq = intspec[0];
547 if (intsize > 1)
548 *out_flags = intspec[1];
549 else
550 *out_flags = IRQ_TYPE_NONE;
551 return 0;
552}
553
554static struct irq_host_ops ipic_host_ops = {
555 .match = ipic_host_match,
556 .map = ipic_host_map,
557 .xlate = ipic_host_xlate,
428}; 558};
429 559
430void __init ipic_init(phys_addr_t phys_addr, 560void __init ipic_init(struct device_node *node,
431 unsigned int flags, 561 unsigned int flags)
432 unsigned int irq_offset,
433 unsigned char *senses,
434 unsigned int senses_count)
435{ 562{
436 u32 i, temp = 0; 563 struct ipic *ipic;
564 struct resource res;
565 u32 temp = 0, ret;
566
567 ipic = alloc_bootmem(sizeof(struct ipic));
568 if (ipic == NULL)
569 return;
570
571 memset(ipic, 0, sizeof(struct ipic));
572 ipic->of_node = node ? of_node_get(node) : NULL;
573
574 ipic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR,
575 NR_IPIC_INTS,
576 &ipic_host_ops, 0);
577 if (ipic->irqhost == NULL) {
578 of_node_put(node);
579 return;
580 }
581
582 ret = of_address_to_resource(node, 0, &res);
583 if (ret)
584 return;
437 585
438 primary_ipic = &p_ipic; 586 ipic->regs = ioremap(res.start, res.end - res.start + 1);
439 primary_ipic->regs = ioremap(phys_addr, MPC83xx_IPIC_SIZE);
440 587
441 primary_ipic->irq_offset = irq_offset; 588 ipic->irqhost->host_data = ipic;
589 ipic->hc_irq = ipic_irq_chip;
442 590
443 ipic_write(primary_ipic->regs, IPIC_SICNR, 0x0); 591 /* init hw */
592 ipic_write(ipic->regs, IPIC_SICNR, 0x0);
444 593
445 /* default priority scheme is grouped. If spread mode is required 594 /* default priority scheme is grouped. If spread mode is required
446 * configure SICFR accordingly */ 595 * configure SICFR accordingly */
@@ -453,49 +602,35 @@ void __init ipic_init(phys_addr_t phys_addr,
453 if (flags & IPIC_SPREADMODE_MIX_B) 602 if (flags & IPIC_SPREADMODE_MIX_B)
454 temp |= SICFR_MPSB; 603 temp |= SICFR_MPSB;
455 604
456 ipic_write(primary_ipic->regs, IPIC_SICNR, temp); 605 ipic_write(ipic->regs, IPIC_SICNR, temp);
457 606
458 /* handle MCP route */ 607 /* handle MCP route */
459 temp = 0; 608 temp = 0;
460 if (flags & IPIC_DISABLE_MCP_OUT) 609 if (flags & IPIC_DISABLE_MCP_OUT)
461 temp = SERCR_MCPR; 610 temp = SERCR_MCPR;
462 ipic_write(primary_ipic->regs, IPIC_SERCR, temp); 611 ipic_write(ipic->regs, IPIC_SERCR, temp);
463 612
464 /* handle routing of IRQ0 to MCP */ 613 /* handle routing of IRQ0 to MCP */
465 temp = ipic_read(primary_ipic->regs, IPIC_SEMSR); 614 temp = ipic_read(ipic->regs, IPIC_SEMSR);
466 615
467 if (flags & IPIC_IRQ0_MCP) 616 if (flags & IPIC_IRQ0_MCP)
468 temp |= SEMSR_SIRQ0; 617 temp |= SEMSR_SIRQ0;
469 else 618 else
470 temp &= ~SEMSR_SIRQ0; 619 temp &= ~SEMSR_SIRQ0;
471 620
472 ipic_write(primary_ipic->regs, IPIC_SEMSR, temp); 621 ipic_write(ipic->regs, IPIC_SEMSR, temp);
473 622
474 for (i = 0 ; i < NR_IPIC_INTS ; i++) { 623 primary_ipic = ipic;
475 irq_desc[i+irq_offset].chip = &ipic; 624 irq_set_default_host(primary_ipic->irqhost);
476 irq_desc[i+irq_offset].status = IRQ_LEVEL;
477 }
478 625
479 temp = 0; 626 printk ("IPIC (%d IRQ sources) at %p\n", NR_IPIC_INTS,
480 for (i = 0 ; i < senses_count ; i++) { 627 primary_ipic->regs);
481 if ((senses[i] & IRQ_SENSE_MASK) == IRQ_SENSE_EDGE) {
482 temp |= 1 << (15 - i);
483 if (i != 0)
484 irq_desc[i + irq_offset + MPC83xx_IRQ_EXT1 - 1].status = 0;
485 else
486 irq_desc[irq_offset + MPC83xx_IRQ_EXT0].status = 0;
487 }
488 }
489 ipic_write(primary_ipic->regs, IPIC_SECNR, temp);
490
491 printk ("IPIC (%d IRQ sources, %d External IRQs) at %p\n", NR_IPIC_INTS,
492 senses_count, primary_ipic->regs);
493} 628}
494 629
495int ipic_set_priority(unsigned int irq, unsigned int priority) 630int ipic_set_priority(unsigned int virq, unsigned int priority)
496{ 631{
497 struct ipic *ipic = ipic_from_irq(irq); 632 struct ipic *ipic = ipic_from_irq(virq);
498 unsigned int src = irq - ipic->irq_offset; 633 unsigned int src = ipic_irq_to_hw(virq);
499 u32 temp; 634 u32 temp;
500 635
501 if (priority > 7) 636 if (priority > 7)
@@ -520,10 +655,10 @@ int ipic_set_priority(unsigned int irq, unsigned int priority)
520 return 0; 655 return 0;
521} 656}
522 657
523void ipic_set_highest_priority(unsigned int irq) 658void ipic_set_highest_priority(unsigned int virq)
524{ 659{
525 struct ipic *ipic = ipic_from_irq(irq); 660 struct ipic *ipic = ipic_from_irq(virq);
526 unsigned int src = irq - ipic->irq_offset; 661 unsigned int src = ipic_irq_to_hw(virq);
527 u32 temp; 662 u32 temp;
528 663
529 temp = ipic_read(ipic->regs, IPIC_SICFR); 664 temp = ipic_read(ipic->regs, IPIC_SICFR);
@@ -537,37 +672,10 @@ void ipic_set_highest_priority(unsigned int irq)
537 672
538void ipic_set_default_priority(void) 673void ipic_set_default_priority(void)
539{ 674{
540 ipic_set_priority(MPC83xx_IRQ_TSEC1_TX, 0); 675 ipic_write(primary_ipic->regs, IPIC_SIPRR_A, IPIC_SIPRR_A_DEFAULT);
541 ipic_set_priority(MPC83xx_IRQ_TSEC1_RX, 1); 676 ipic_write(primary_ipic->regs, IPIC_SIPRR_D, IPIC_SIPRR_D_DEFAULT);
542 ipic_set_priority(MPC83xx_IRQ_TSEC1_ERROR, 2); 677 ipic_write(primary_ipic->regs, IPIC_SMPRR_A, IPIC_SMPRR_A_DEFAULT);
543 ipic_set_priority(MPC83xx_IRQ_TSEC2_TX, 3); 678 ipic_write(primary_ipic->regs, IPIC_SMPRR_B, IPIC_SMPRR_B_DEFAULT);
544 ipic_set_priority(MPC83xx_IRQ_TSEC2_RX, 4);
545 ipic_set_priority(MPC83xx_IRQ_TSEC2_ERROR, 5);
546 ipic_set_priority(MPC83xx_IRQ_USB2_DR, 6);
547 ipic_set_priority(MPC83xx_IRQ_USB2_MPH, 7);
548
549 ipic_set_priority(MPC83xx_IRQ_UART1, 0);
550 ipic_set_priority(MPC83xx_IRQ_UART2, 1);
551 ipic_set_priority(MPC83xx_IRQ_SEC2, 2);
552 ipic_set_priority(MPC83xx_IRQ_IIC1, 5);
553 ipic_set_priority(MPC83xx_IRQ_IIC2, 6);
554 ipic_set_priority(MPC83xx_IRQ_SPI, 7);
555 ipic_set_priority(MPC83xx_IRQ_RTC_SEC, 0);
556 ipic_set_priority(MPC83xx_IRQ_PIT, 1);
557 ipic_set_priority(MPC83xx_IRQ_PCI1, 2);
558 ipic_set_priority(MPC83xx_IRQ_PCI2, 3);
559 ipic_set_priority(MPC83xx_IRQ_EXT0, 4);
560 ipic_set_priority(MPC83xx_IRQ_EXT1, 5);
561 ipic_set_priority(MPC83xx_IRQ_EXT2, 6);
562 ipic_set_priority(MPC83xx_IRQ_EXT3, 7);
563 ipic_set_priority(MPC83xx_IRQ_RTC_ALR, 0);
564 ipic_set_priority(MPC83xx_IRQ_MU, 1);
565 ipic_set_priority(MPC83xx_IRQ_SBA, 2);
566 ipic_set_priority(MPC83xx_IRQ_DMA, 3);
567 ipic_set_priority(MPC83xx_IRQ_EXT4, 4);
568 ipic_set_priority(MPC83xx_IRQ_EXT5, 5);
569 ipic_set_priority(MPC83xx_IRQ_EXT6, 6);
570 ipic_set_priority(MPC83xx_IRQ_EXT7, 7);
571} 679}
572 680
573void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq) 681void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq)
@@ -600,17 +708,20 @@ void ipic_clear_mcp_status(u32 mask)
600 ipic_write(primary_ipic->regs, IPIC_SERMR, mask); 708 ipic_write(primary_ipic->regs, IPIC_SERMR, mask);
601} 709}
602 710
603/* Return an interrupt vector or -1 if no interrupt is pending. */ 711/* Return an interrupt vector or NO_IRQ if no interrupt is pending. */
604int ipic_get_irq(struct pt_regs *regs) 712unsigned int ipic_get_irq(struct pt_regs *regs)
605{ 713{
606 int irq; 714 int irq;
607 715
608 irq = ipic_read(primary_ipic->regs, IPIC_SIVCR) & 0x7f; 716 BUG_ON(primary_ipic == NULL);
717
718#define IPIC_SIVCR_VECTOR_MASK 0x7f
719 irq = ipic_read(primary_ipic->regs, IPIC_SIVCR) & IPIC_SIVCR_VECTOR_MASK;
609 720
610 if (irq == 0) /* 0 --> no irq is pending */ 721 if (irq == 0) /* 0 --> no irq is pending */
611 irq = -1; 722 return NO_IRQ;
612 723
613 return irq; 724 return irq_linear_revmap(primary_ipic->irqhost, irq);
614} 725}
615 726
616static struct sysdev_class ipic_sysclass = { 727static struct sysdev_class ipic_sysclass = {
diff --git a/arch/powerpc/sysdev/ipic.h b/arch/powerpc/sysdev/ipic.h
index a60c9d18bb7f..c28e589877eb 100644
--- a/arch/powerpc/sysdev/ipic.h
+++ b/arch/powerpc/sysdev/ipic.h
@@ -15,7 +15,18 @@
15 15
16#include <asm/ipic.h> 16#include <asm/ipic.h>
17 17
18#define MPC83xx_IPIC_SIZE (0x00100) 18#define NR_IPIC_INTS 128
19
20/* External IRQS */
21#define IPIC_IRQ_EXT0 48
22#define IPIC_IRQ_EXT1 17
23#define IPIC_IRQ_EXT7 23
24
25/* Default Priority Registers */
26#define IPIC_SIPRR_A_DEFAULT 0x05309770
27#define IPIC_SIPRR_D_DEFAULT 0x05309770
28#define IPIC_SMPRR_A_DEFAULT 0x05309770
29#define IPIC_SMPRR_B_DEFAULT 0x05309770
19 30
20/* System Global Interrupt Configuration Register */ 31/* System Global Interrupt Configuration Register */
21#define SICFR_IPSA 0x00010000 32#define SICFR_IPSA 0x00010000
@@ -31,7 +42,15 @@
31 42
32struct ipic { 43struct ipic {
33 volatile u32 __iomem *regs; 44 volatile u32 __iomem *regs;
34 unsigned int irq_offset; 45
46 /* The remapper for this IPIC */
47 struct irq_host *irqhost;
48
49 /* The "linux" controller struct */
50 struct irq_chip hc_irq;
51
52 /* The device node of the interrupt controller */
53 struct device_node *of_node;
35}; 54};
36 55
37struct ipic_info { 56struct ipic_info {
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 6e0281afa6c3..b604926401f5 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -54,6 +54,94 @@ static DEFINE_SPINLOCK(mpic_lock);
54#endif 54#endif
55#endif 55#endif
56 56
57#ifdef CONFIG_MPIC_WEIRD
58static u32 mpic_infos[][MPIC_IDX_END] = {
59 [0] = { /* Original OpenPIC compatible MPIC */
60 MPIC_GREG_BASE,
61 MPIC_GREG_FEATURE_0,
62 MPIC_GREG_GLOBAL_CONF_0,
63 MPIC_GREG_VENDOR_ID,
64 MPIC_GREG_IPI_VECTOR_PRI_0,
65 MPIC_GREG_IPI_STRIDE,
66 MPIC_GREG_SPURIOUS,
67 MPIC_GREG_TIMER_FREQ,
68
69 MPIC_TIMER_BASE,
70 MPIC_TIMER_STRIDE,
71 MPIC_TIMER_CURRENT_CNT,
72 MPIC_TIMER_BASE_CNT,
73 MPIC_TIMER_VECTOR_PRI,
74 MPIC_TIMER_DESTINATION,
75
76 MPIC_CPU_BASE,
77 MPIC_CPU_STRIDE,
78 MPIC_CPU_IPI_DISPATCH_0,
79 MPIC_CPU_IPI_DISPATCH_STRIDE,
80 MPIC_CPU_CURRENT_TASK_PRI,
81 MPIC_CPU_WHOAMI,
82 MPIC_CPU_INTACK,
83 MPIC_CPU_EOI,
84
85 MPIC_IRQ_BASE,
86 MPIC_IRQ_STRIDE,
87 MPIC_IRQ_VECTOR_PRI,
88 MPIC_VECPRI_VECTOR_MASK,
89 MPIC_VECPRI_POLARITY_POSITIVE,
90 MPIC_VECPRI_POLARITY_NEGATIVE,
91 MPIC_VECPRI_SENSE_LEVEL,
92 MPIC_VECPRI_SENSE_EDGE,
93 MPIC_VECPRI_POLARITY_MASK,
94 MPIC_VECPRI_SENSE_MASK,
95 MPIC_IRQ_DESTINATION
96 },
97 [1] = { /* Tsi108/109 PIC */
98 TSI108_GREG_BASE,
99 TSI108_GREG_FEATURE_0,
100 TSI108_GREG_GLOBAL_CONF_0,
101 TSI108_GREG_VENDOR_ID,
102 TSI108_GREG_IPI_VECTOR_PRI_0,
103 TSI108_GREG_IPI_STRIDE,
104 TSI108_GREG_SPURIOUS,
105 TSI108_GREG_TIMER_FREQ,
106
107 TSI108_TIMER_BASE,
108 TSI108_TIMER_STRIDE,
109 TSI108_TIMER_CURRENT_CNT,
110 TSI108_TIMER_BASE_CNT,
111 TSI108_TIMER_VECTOR_PRI,
112 TSI108_TIMER_DESTINATION,
113
114 TSI108_CPU_BASE,
115 TSI108_CPU_STRIDE,
116 TSI108_CPU_IPI_DISPATCH_0,
117 TSI108_CPU_IPI_DISPATCH_STRIDE,
118 TSI108_CPU_CURRENT_TASK_PRI,
119 TSI108_CPU_WHOAMI,
120 TSI108_CPU_INTACK,
121 TSI108_CPU_EOI,
122
123 TSI108_IRQ_BASE,
124 TSI108_IRQ_STRIDE,
125 TSI108_IRQ_VECTOR_PRI,
126 TSI108_VECPRI_VECTOR_MASK,
127 TSI108_VECPRI_POLARITY_POSITIVE,
128 TSI108_VECPRI_POLARITY_NEGATIVE,
129 TSI108_VECPRI_SENSE_LEVEL,
130 TSI108_VECPRI_SENSE_EDGE,
131 TSI108_VECPRI_POLARITY_MASK,
132 TSI108_VECPRI_SENSE_MASK,
133 TSI108_IRQ_DESTINATION
134 },
135};
136
137#define MPIC_INFO(name) mpic->hw_set[MPIC_IDX_##name]
138
139#else /* CONFIG_MPIC_WEIRD */
140
141#define MPIC_INFO(name) MPIC_##name
142
143#endif /* CONFIG_MPIC_WEIRD */
144
57/* 145/*
58 * Register accessor functions 146 * Register accessor functions
59 */ 147 */
@@ -80,7 +168,8 @@ static inline void _mpic_write(unsigned int be, volatile u32 __iomem *base,
80static inline u32 _mpic_ipi_read(struct mpic *mpic, unsigned int ipi) 168static inline u32 _mpic_ipi_read(struct mpic *mpic, unsigned int ipi)
81{ 169{
82 unsigned int be = (mpic->flags & MPIC_BIG_ENDIAN) != 0; 170 unsigned int be = (mpic->flags & MPIC_BIG_ENDIAN) != 0;
83 unsigned int offset = MPIC_GREG_IPI_VECTOR_PRI_0 + (ipi * 0x10); 171 unsigned int offset = MPIC_INFO(GREG_IPI_VECTOR_PRI_0) +
172 (ipi * MPIC_INFO(GREG_IPI_STRIDE));
84 173
85 if (mpic->flags & MPIC_BROKEN_IPI) 174 if (mpic->flags & MPIC_BROKEN_IPI)
86 be = !be; 175 be = !be;
@@ -89,7 +178,8 @@ static inline u32 _mpic_ipi_read(struct mpic *mpic, unsigned int ipi)
89 178
90static inline void _mpic_ipi_write(struct mpic *mpic, unsigned int ipi, u32 value) 179static inline void _mpic_ipi_write(struct mpic *mpic, unsigned int ipi, u32 value)
91{ 180{
92 unsigned int offset = MPIC_GREG_IPI_VECTOR_PRI_0 + (ipi * 0x10); 181 unsigned int offset = MPIC_INFO(GREG_IPI_VECTOR_PRI_0) +
182 (ipi * MPIC_INFO(GREG_IPI_STRIDE));
93 183
94 _mpic_write(mpic->flags & MPIC_BIG_ENDIAN, mpic->gregs, offset, value); 184 _mpic_write(mpic->flags & MPIC_BIG_ENDIAN, mpic->gregs, offset, value);
95} 185}
@@ -120,7 +210,7 @@ static inline u32 _mpic_irq_read(struct mpic *mpic, unsigned int src_no, unsigne
120 unsigned int idx = src_no & mpic->isu_mask; 210 unsigned int idx = src_no & mpic->isu_mask;
121 211
122 return _mpic_read(mpic->flags & MPIC_BIG_ENDIAN, mpic->isus[isu], 212 return _mpic_read(mpic->flags & MPIC_BIG_ENDIAN, mpic->isus[isu],
123 reg + (idx * MPIC_IRQ_STRIDE)); 213 reg + (idx * MPIC_INFO(IRQ_STRIDE)));
124} 214}
125 215
126static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no, 216static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no,
@@ -130,7 +220,7 @@ static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no,
130 unsigned int idx = src_no & mpic->isu_mask; 220 unsigned int idx = src_no & mpic->isu_mask;
131 221
132 _mpic_write(mpic->flags & MPIC_BIG_ENDIAN, mpic->isus[isu], 222 _mpic_write(mpic->flags & MPIC_BIG_ENDIAN, mpic->isus[isu],
133 reg + (idx * MPIC_IRQ_STRIDE), value); 223 reg + (idx * MPIC_INFO(IRQ_STRIDE)), value);
134} 224}
135 225
136#define mpic_read(b,r) _mpic_read(mpic->flags & MPIC_BIG_ENDIAN,(b),(r)) 226#define mpic_read(b,r) _mpic_read(mpic->flags & MPIC_BIG_ENDIAN,(b),(r))
@@ -156,8 +246,8 @@ static void __init mpic_test_broken_ipi(struct mpic *mpic)
156{ 246{
157 u32 r; 247 u32 r;
158 248
159 mpic_write(mpic->gregs, MPIC_GREG_IPI_VECTOR_PRI_0, MPIC_VECPRI_MASK); 249 mpic_write(mpic->gregs, MPIC_INFO(GREG_IPI_VECTOR_PRI_0), MPIC_VECPRI_MASK);
160 r = mpic_read(mpic->gregs, MPIC_GREG_IPI_VECTOR_PRI_0); 250 r = mpic_read(mpic->gregs, MPIC_INFO(GREG_IPI_VECTOR_PRI_0));
161 251
162 if (r == le32_to_cpu(MPIC_VECPRI_MASK)) { 252 if (r == le32_to_cpu(MPIC_VECPRI_MASK)) {
163 printk(KERN_INFO "mpic: Detected reversed IPI registers\n"); 253 printk(KERN_INFO "mpic: Detected reversed IPI registers\n");
@@ -394,8 +484,8 @@ static inline struct mpic * mpic_from_irq(unsigned int irq)
394/* Send an EOI */ 484/* Send an EOI */
395static inline void mpic_eoi(struct mpic *mpic) 485static inline void mpic_eoi(struct mpic *mpic)
396{ 486{
397 mpic_cpu_write(MPIC_CPU_EOI, 0); 487 mpic_cpu_write(MPIC_INFO(CPU_EOI), 0);
398 (void)mpic_cpu_read(MPIC_CPU_WHOAMI); 488 (void)mpic_cpu_read(MPIC_INFO(CPU_WHOAMI));
399} 489}
400 490
401#ifdef CONFIG_SMP 491#ifdef CONFIG_SMP
@@ -419,8 +509,8 @@ static void mpic_unmask_irq(unsigned int irq)
419 509
420 DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src); 510 DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src);
421 511
422 mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, 512 mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI),
423 mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & 513 mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) &
424 ~MPIC_VECPRI_MASK); 514 ~MPIC_VECPRI_MASK);
425 /* make sure mask gets to controller before we return to user */ 515 /* make sure mask gets to controller before we return to user */
426 do { 516 do {
@@ -428,7 +518,7 @@ static void mpic_unmask_irq(unsigned int irq)
428 printk(KERN_ERR "mpic_enable_irq timeout\n"); 518 printk(KERN_ERR "mpic_enable_irq timeout\n");
429 break; 519 break;
430 } 520 }
431 } while(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK); 521 } while(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK);
432} 522}
433 523
434static void mpic_mask_irq(unsigned int irq) 524static void mpic_mask_irq(unsigned int irq)
@@ -439,8 +529,8 @@ static void mpic_mask_irq(unsigned int irq)
439 529
440 DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src); 530 DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src);
441 531
442 mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, 532 mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI),
443 mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) | 533 mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) |
444 MPIC_VECPRI_MASK); 534 MPIC_VECPRI_MASK);
445 535
446 /* make sure mask gets to controller before we return to user */ 536 /* make sure mask gets to controller before we return to user */
@@ -449,7 +539,7 @@ static void mpic_mask_irq(unsigned int irq)
449 printk(KERN_ERR "mpic_enable_irq timeout\n"); 539 printk(KERN_ERR "mpic_enable_irq timeout\n");
450 break; 540 break;
451 } 541 }
452 } while(!(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK)); 542 } while(!(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK));
453} 543}
454 544
455static void mpic_end_irq(unsigned int irq) 545static void mpic_end_irq(unsigned int irq)
@@ -560,24 +650,28 @@ static void mpic_set_affinity(unsigned int irq, cpumask_t cpumask)
560 650
561 cpus_and(tmp, cpumask, cpu_online_map); 651 cpus_and(tmp, cpumask, cpu_online_map);
562 652
563 mpic_irq_write(src, MPIC_IRQ_DESTINATION, 653 mpic_irq_write(src, MPIC_INFO(IRQ_DESTINATION),
564 mpic_physmask(cpus_addr(tmp)[0])); 654 mpic_physmask(cpus_addr(tmp)[0]));
565} 655}
566 656
567static unsigned int mpic_type_to_vecpri(unsigned int type) 657static unsigned int mpic_type_to_vecpri(struct mpic *mpic, unsigned int type)
568{ 658{
569 /* Now convert sense value */ 659 /* Now convert sense value */
570 switch(type & IRQ_TYPE_SENSE_MASK) { 660 switch(type & IRQ_TYPE_SENSE_MASK) {
571 case IRQ_TYPE_EDGE_RISING: 661 case IRQ_TYPE_EDGE_RISING:
572 return MPIC_VECPRI_SENSE_EDGE | MPIC_VECPRI_POLARITY_POSITIVE; 662 return MPIC_INFO(VECPRI_SENSE_EDGE) |
663 MPIC_INFO(VECPRI_POLARITY_POSITIVE);
573 case IRQ_TYPE_EDGE_FALLING: 664 case IRQ_TYPE_EDGE_FALLING:
574 case IRQ_TYPE_EDGE_BOTH: 665 case IRQ_TYPE_EDGE_BOTH:
575 return MPIC_VECPRI_SENSE_EDGE | MPIC_VECPRI_POLARITY_NEGATIVE; 666 return MPIC_INFO(VECPRI_SENSE_EDGE) |
667 MPIC_INFO(VECPRI_POLARITY_NEGATIVE);
576 case IRQ_TYPE_LEVEL_HIGH: 668 case IRQ_TYPE_LEVEL_HIGH:
577 return MPIC_VECPRI_SENSE_LEVEL | MPIC_VECPRI_POLARITY_POSITIVE; 669 return MPIC_INFO(VECPRI_SENSE_LEVEL) |
670 MPIC_INFO(VECPRI_POLARITY_POSITIVE);
578 case IRQ_TYPE_LEVEL_LOW: 671 case IRQ_TYPE_LEVEL_LOW:
579 default: 672 default:
580 return MPIC_VECPRI_SENSE_LEVEL | MPIC_VECPRI_POLARITY_NEGATIVE; 673 return MPIC_INFO(VECPRI_SENSE_LEVEL) |
674 MPIC_INFO(VECPRI_POLARITY_NEGATIVE);
581 } 675 }
582} 676}
583 677
@@ -609,13 +703,14 @@ static int mpic_set_irq_type(unsigned int virq, unsigned int flow_type)
609 vecpri = MPIC_VECPRI_POLARITY_POSITIVE | 703 vecpri = MPIC_VECPRI_POLARITY_POSITIVE |
610 MPIC_VECPRI_SENSE_EDGE; 704 MPIC_VECPRI_SENSE_EDGE;
611 else 705 else
612 vecpri = mpic_type_to_vecpri(flow_type); 706 vecpri = mpic_type_to_vecpri(mpic, flow_type);
613 707
614 vold = mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI); 708 vold = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI));
615 vnew = vold & ~(MPIC_VECPRI_POLARITY_MASK | MPIC_VECPRI_SENSE_MASK); 709 vnew = vold & ~(MPIC_INFO(VECPRI_POLARITY_MASK) |
710 MPIC_INFO(VECPRI_SENSE_MASK));
616 vnew |= vecpri; 711 vnew |= vecpri;
617 if (vold != vnew) 712 if (vold != vnew)
618 mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, vnew); 713 mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vnew);
619 714
620 return 0; 715 return 0;
621} 716}
@@ -798,17 +893,22 @@ struct mpic * __init mpic_alloc(struct device_node *node,
798 mpic->irq_count = irq_count; 893 mpic->irq_count = irq_count;
799 mpic->num_sources = 0; /* so far */ 894 mpic->num_sources = 0; /* so far */
800 895
896#ifdef CONFIG_MPIC_WEIRD
897 mpic->hw_set = mpic_infos[MPIC_GET_REGSET(flags)];
898#endif
899
801 /* Map the global registers */ 900 /* Map the global registers */
802 mpic->gregs = ioremap(phys_addr + MPIC_GREG_BASE, 0x1000); 901 mpic->gregs = ioremap(phys_addr + MPIC_INFO(GREG_BASE), 0x1000);
803 mpic->tmregs = mpic->gregs + ((MPIC_TIMER_BASE - MPIC_GREG_BASE) >> 2); 902 mpic->tmregs = mpic->gregs +
903 ((MPIC_INFO(TIMER_BASE) - MPIC_INFO(GREG_BASE)) >> 2);
804 BUG_ON(mpic->gregs == NULL); 904 BUG_ON(mpic->gregs == NULL);
805 905
806 /* Reset */ 906 /* Reset */
807 if (flags & MPIC_WANTS_RESET) { 907 if (flags & MPIC_WANTS_RESET) {
808 mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0, 908 mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
809 mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0) 909 mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
810 | MPIC_GREG_GCONF_RESET); 910 | MPIC_GREG_GCONF_RESET);
811 while( mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0) 911 while( mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
812 & MPIC_GREG_GCONF_RESET) 912 & MPIC_GREG_GCONF_RESET)
813 mb(); 913 mb();
814 } 914 }
@@ -817,7 +917,7 @@ struct mpic * __init mpic_alloc(struct device_node *node,
817 * MPICs, num sources as well. On ISU MPICs, sources are counted 917 * MPICs, num sources as well. On ISU MPICs, sources are counted
818 * as ISUs are added 918 * as ISUs are added
819 */ 919 */
820 reg = mpic_read(mpic->gregs, MPIC_GREG_FEATURE_0); 920 reg = mpic_read(mpic->gregs, MPIC_INFO(GREG_FEATURE_0));
821 mpic->num_cpus = ((reg & MPIC_GREG_FEATURE_LAST_CPU_MASK) 921 mpic->num_cpus = ((reg & MPIC_GREG_FEATURE_LAST_CPU_MASK)
822 >> MPIC_GREG_FEATURE_LAST_CPU_SHIFT) + 1; 922 >> MPIC_GREG_FEATURE_LAST_CPU_SHIFT) + 1;
823 if (isu_size == 0) 923 if (isu_size == 0)
@@ -826,16 +926,16 @@ struct mpic * __init mpic_alloc(struct device_node *node,
826 926
827 /* Map the per-CPU registers */ 927 /* Map the per-CPU registers */
828 for (i = 0; i < mpic->num_cpus; i++) { 928 for (i = 0; i < mpic->num_cpus; i++) {
829 mpic->cpuregs[i] = ioremap(phys_addr + MPIC_CPU_BASE + 929 mpic->cpuregs[i] = ioremap(phys_addr + MPIC_INFO(CPU_BASE) +
830 i * MPIC_CPU_STRIDE, 0x1000); 930 i * MPIC_INFO(CPU_STRIDE), 0x1000);
831 BUG_ON(mpic->cpuregs[i] == NULL); 931 BUG_ON(mpic->cpuregs[i] == NULL);
832 } 932 }
833 933
834 /* Initialize main ISU if none provided */ 934 /* Initialize main ISU if none provided */
835 if (mpic->isu_size == 0) { 935 if (mpic->isu_size == 0) {
836 mpic->isu_size = mpic->num_sources; 936 mpic->isu_size = mpic->num_sources;
837 mpic->isus[0] = ioremap(phys_addr + MPIC_IRQ_BASE, 937 mpic->isus[0] = ioremap(phys_addr + MPIC_INFO(IRQ_BASE),
838 MPIC_IRQ_STRIDE * mpic->isu_size); 938 MPIC_INFO(IRQ_STRIDE) * mpic->isu_size);
839 BUG_ON(mpic->isus[0] == NULL); 939 BUG_ON(mpic->isus[0] == NULL);
840 } 940 }
841 mpic->isu_shift = 1 + __ilog2(mpic->isu_size - 1); 941 mpic->isu_shift = 1 + __ilog2(mpic->isu_size - 1);
@@ -879,7 +979,8 @@ void __init mpic_assign_isu(struct mpic *mpic, unsigned int isu_num,
879 979
880 BUG_ON(isu_num >= MPIC_MAX_ISU); 980 BUG_ON(isu_num >= MPIC_MAX_ISU);
881 981
882 mpic->isus[isu_num] = ioremap(phys_addr, MPIC_IRQ_STRIDE * mpic->isu_size); 982 mpic->isus[isu_num] = ioremap(phys_addr,
983 MPIC_INFO(IRQ_STRIDE) * mpic->isu_size);
883 if ((isu_first + mpic->isu_size) > mpic->num_sources) 984 if ((isu_first + mpic->isu_size) > mpic->num_sources)
884 mpic->num_sources = isu_first + mpic->isu_size; 985 mpic->num_sources = isu_first + mpic->isu_size;
885} 986}
@@ -904,14 +1005,16 @@ void __init mpic_init(struct mpic *mpic)
904 printk(KERN_INFO "mpic: Initializing for %d sources\n", mpic->num_sources); 1005 printk(KERN_INFO "mpic: Initializing for %d sources\n", mpic->num_sources);
905 1006
906 /* Set current processor priority to max */ 1007 /* Set current processor priority to max */
907 mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0xf); 1008 mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), 0xf);
908 1009
909 /* Initialize timers: just disable them all */ 1010 /* Initialize timers: just disable them all */
910 for (i = 0; i < 4; i++) { 1011 for (i = 0; i < 4; i++) {
911 mpic_write(mpic->tmregs, 1012 mpic_write(mpic->tmregs,
912 i * MPIC_TIMER_STRIDE + MPIC_TIMER_DESTINATION, 0); 1013 i * MPIC_INFO(TIMER_STRIDE) +
1014 MPIC_INFO(TIMER_DESTINATION), 0);
913 mpic_write(mpic->tmregs, 1015 mpic_write(mpic->tmregs,
914 i * MPIC_TIMER_STRIDE + MPIC_TIMER_VECTOR_PRI, 1016 i * MPIC_INFO(TIMER_STRIDE) +
1017 MPIC_INFO(TIMER_VECTOR_PRI),
915 MPIC_VECPRI_MASK | 1018 MPIC_VECPRI_MASK |
916 (MPIC_VEC_TIMER_0 + i)); 1019 (MPIC_VEC_TIMER_0 + i));
917 } 1020 }
@@ -940,21 +1043,22 @@ void __init mpic_init(struct mpic *mpic)
940 (8 << MPIC_VECPRI_PRIORITY_SHIFT); 1043 (8 << MPIC_VECPRI_PRIORITY_SHIFT);
941 1044
942 /* init hw */ 1045 /* init hw */
943 mpic_irq_write(i, MPIC_IRQ_VECTOR_PRI, vecpri); 1046 mpic_irq_write(i, MPIC_INFO(IRQ_VECTOR_PRI), vecpri);
944 mpic_irq_write(i, MPIC_IRQ_DESTINATION, 1047 mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION),
945 1 << hard_smp_processor_id()); 1048 1 << hard_smp_processor_id());
946 } 1049 }
947 1050
948 /* Init spurrious vector */ 1051 /* Init spurrious vector */
949 mpic_write(mpic->gregs, MPIC_GREG_SPURIOUS, MPIC_VEC_SPURRIOUS); 1052 mpic_write(mpic->gregs, MPIC_INFO(GREG_SPURIOUS), MPIC_VEC_SPURRIOUS);
950 1053
951 /* Disable 8259 passthrough */ 1054 /* Disable 8259 passthrough, if supported */
952 mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0, 1055 if (!(mpic->flags & MPIC_NO_PTHROU_DIS))
953 mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0) 1056 mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
954 | MPIC_GREG_GCONF_8259_PTHROU_DIS); 1057 mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
1058 | MPIC_GREG_GCONF_8259_PTHROU_DIS);
955 1059
956 /* Set current processor priority to 0 */ 1060 /* Set current processor priority to 0 */
957 mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0); 1061 mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), 0);
958} 1062}
959 1063
960void __init mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio) 1064void __init mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio)
@@ -997,9 +1101,9 @@ void mpic_irq_set_priority(unsigned int irq, unsigned int pri)
997 mpic_ipi_write(src - MPIC_VEC_IPI_0, 1101 mpic_ipi_write(src - MPIC_VEC_IPI_0,
998 reg | (pri << MPIC_VECPRI_PRIORITY_SHIFT)); 1102 reg | (pri << MPIC_VECPRI_PRIORITY_SHIFT));
999 } else { 1103 } else {
1000 reg = mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) 1104 reg = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI))
1001 & ~MPIC_VECPRI_PRIORITY_MASK; 1105 & ~MPIC_VECPRI_PRIORITY_MASK;
1002 mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, 1106 mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI),
1003 reg | (pri << MPIC_VECPRI_PRIORITY_SHIFT)); 1107 reg | (pri << MPIC_VECPRI_PRIORITY_SHIFT));
1004 } 1108 }
1005 spin_unlock_irqrestore(&mpic_lock, flags); 1109 spin_unlock_irqrestore(&mpic_lock, flags);
@@ -1017,7 +1121,7 @@ unsigned int mpic_irq_get_priority(unsigned int irq)
1017 if (is_ipi) 1121 if (is_ipi)
1018 reg = mpic_ipi_read(src = MPIC_VEC_IPI_0); 1122 reg = mpic_ipi_read(src = MPIC_VEC_IPI_0);
1019 else 1123 else
1020 reg = mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI); 1124 reg = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI));
1021 spin_unlock_irqrestore(&mpic_lock, flags); 1125 spin_unlock_irqrestore(&mpic_lock, flags);
1022 return (reg & MPIC_VECPRI_PRIORITY_MASK) >> MPIC_VECPRI_PRIORITY_SHIFT; 1126 return (reg & MPIC_VECPRI_PRIORITY_MASK) >> MPIC_VECPRI_PRIORITY_SHIFT;
1023} 1127}
@@ -1043,12 +1147,12 @@ void mpic_setup_this_cpu(void)
1043 */ 1147 */
1044 if (distribute_irqs) { 1148 if (distribute_irqs) {
1045 for (i = 0; i < mpic->num_sources ; i++) 1149 for (i = 0; i < mpic->num_sources ; i++)
1046 mpic_irq_write(i, MPIC_IRQ_DESTINATION, 1150 mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION),
1047 mpic_irq_read(i, MPIC_IRQ_DESTINATION) | msk); 1151 mpic_irq_read(i, MPIC_INFO(IRQ_DESTINATION)) | msk);
1048 } 1152 }
1049 1153
1050 /* Set current processor priority to 0 */ 1154 /* Set current processor priority to 0 */
1051 mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0); 1155 mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), 0);
1052 1156
1053 spin_unlock_irqrestore(&mpic_lock, flags); 1157 spin_unlock_irqrestore(&mpic_lock, flags);
1054#endif /* CONFIG_SMP */ 1158#endif /* CONFIG_SMP */
@@ -1058,7 +1162,7 @@ int mpic_cpu_get_priority(void)
1058{ 1162{
1059 struct mpic *mpic = mpic_primary; 1163 struct mpic *mpic = mpic_primary;
1060 1164
1061 return mpic_cpu_read(MPIC_CPU_CURRENT_TASK_PRI); 1165 return mpic_cpu_read(MPIC_INFO(CPU_CURRENT_TASK_PRI));
1062} 1166}
1063 1167
1064void mpic_cpu_set_priority(int prio) 1168void mpic_cpu_set_priority(int prio)
@@ -1066,7 +1170,7 @@ void mpic_cpu_set_priority(int prio)
1066 struct mpic *mpic = mpic_primary; 1170 struct mpic *mpic = mpic_primary;
1067 1171
1068 prio &= MPIC_CPU_TASKPRI_MASK; 1172 prio &= MPIC_CPU_TASKPRI_MASK;
1069 mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, prio); 1173 mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), prio);
1070} 1174}
1071 1175
1072/* 1176/*
@@ -1088,11 +1192,11 @@ void mpic_teardown_this_cpu(int secondary)
1088 1192
1089 /* let the mpic know we don't want intrs. */ 1193 /* let the mpic know we don't want intrs. */
1090 for (i = 0; i < mpic->num_sources ; i++) 1194 for (i = 0; i < mpic->num_sources ; i++)
1091 mpic_irq_write(i, MPIC_IRQ_DESTINATION, 1195 mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION),
1092 mpic_irq_read(i, MPIC_IRQ_DESTINATION) & ~msk); 1196 mpic_irq_read(i, MPIC_INFO(IRQ_DESTINATION)) & ~msk);
1093 1197
1094 /* Set current processor priority to max */ 1198 /* Set current processor priority to max */
1095 mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0xf); 1199 mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), 0xf);
1096 1200
1097 spin_unlock_irqrestore(&mpic_lock, flags); 1201 spin_unlock_irqrestore(&mpic_lock, flags);
1098} 1202}
@@ -1108,7 +1212,8 @@ void mpic_send_ipi(unsigned int ipi_no, unsigned int cpu_mask)
1108 DBG("%s: send_ipi(ipi_no: %d)\n", mpic->name, ipi_no); 1212 DBG("%s: send_ipi(ipi_no: %d)\n", mpic->name, ipi_no);
1109#endif 1213#endif
1110 1214
1111 mpic_cpu_write(MPIC_CPU_IPI_DISPATCH_0 + ipi_no * 0x10, 1215 mpic_cpu_write(MPIC_INFO(CPU_IPI_DISPATCH_0) +
1216 ipi_no * MPIC_INFO(CPU_IPI_DISPATCH_STRIDE),
1112 mpic_physmask(cpu_mask & cpus_addr(cpu_online_map)[0])); 1217 mpic_physmask(cpu_mask & cpus_addr(cpu_online_map)[0]));
1113} 1218}
1114 1219
@@ -1116,7 +1221,7 @@ unsigned int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs)
1116{ 1221{
1117 u32 src; 1222 u32 src;
1118 1223
1119 src = mpic_cpu_read(MPIC_CPU_INTACK) & MPIC_VECPRI_VECTOR_MASK; 1224 src = mpic_cpu_read(MPIC_INFO(CPU_INTACK)) & MPIC_INFO(VECPRI_VECTOR_MASK);
1120#ifdef DEBUG_LOW 1225#ifdef DEBUG_LOW
1121 DBG("%s: get_one_irq(): %d\n", mpic->name, src); 1226 DBG("%s: get_one_irq(): %d\n", mpic->name, src);
1122#endif 1227#endif
diff --git a/arch/ppc/configs/prep_defconfig b/arch/ppc/configs/prep_defconfig
index 4d33bee23a89..0aa333178b2a 100644
--- a/arch/ppc/configs/prep_defconfig
+++ b/arch/ppc/configs/prep_defconfig
@@ -1,56 +1,63 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-rc3 3# Linux kernel version: 2.6.18-rc6
4# Wed Jul 13 13:34:24 2005 4# Wed Sep 6 15:09:32 2006
5# 5#
6CONFIG_MMU=y 6CONFIG_MMU=y
7CONFIG_GENERIC_HARDIRQS=y 7CONFIG_GENERIC_HARDIRQS=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y 8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_GENERIC_HWEIGHT=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y 10CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_HAVE_DEC_LOCK=y
11CONFIG_PPC=y 11CONFIG_PPC=y
12CONFIG_PPC32=y 12CONFIG_PPC32=y
13CONFIG_GENERIC_NVRAM=y 13CONFIG_GENERIC_NVRAM=y
14CONFIG_GENERIC_FIND_NEXT_BIT=y
14CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 15CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
16CONFIG_ARCH_MAY_HAVE_PC_FDC=y
17CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
15 18
16# 19#
17# Code maturity level options 20# Code maturity level options
18# 21#
19CONFIG_EXPERIMENTAL=y 22CONFIG_EXPERIMENTAL=y
20CONFIG_CLEAN_COMPILE=y
21CONFIG_BROKEN_ON_SMP=y 23CONFIG_BROKEN_ON_SMP=y
22CONFIG_INIT_ENV_ARG_LIMIT=32 24CONFIG_INIT_ENV_ARG_LIMIT=32
23 25
24# 26#
25# General setup 27# General setup
26# 28#
27CONFIG_LOCALVERSION="" 29CONFIG_LOCALVERSION="-prep"
30CONFIG_LOCALVERSION_AUTO=y
28CONFIG_SWAP=y 31CONFIG_SWAP=y
29CONFIG_SYSVIPC=y 32CONFIG_SYSVIPC=y
30CONFIG_POSIX_MQUEUE=y 33CONFIG_POSIX_MQUEUE=y
31# CONFIG_BSD_PROCESS_ACCT is not set 34# CONFIG_BSD_PROCESS_ACCT is not set
35# CONFIG_TASKSTATS is not set
32CONFIG_SYSCTL=y 36CONFIG_SYSCTL=y
33# CONFIG_AUDIT is not set 37# CONFIG_AUDIT is not set
34CONFIG_HOTPLUG=y
35CONFIG_KOBJECT_UEVENT=y
36CONFIG_IKCONFIG=y 38CONFIG_IKCONFIG=y
37CONFIG_IKCONFIG_PROC=y 39CONFIG_IKCONFIG_PROC=y
40# CONFIG_RELAY is not set
41CONFIG_INITRAMFS_SOURCE=""
42CONFIG_CC_OPTIMIZE_FOR_SIZE=y
38# CONFIG_EMBEDDED is not set 43# CONFIG_EMBEDDED is not set
39CONFIG_KALLSYMS=y 44CONFIG_KALLSYMS=y
40# CONFIG_KALLSYMS_ALL is not set 45# CONFIG_KALLSYMS_ALL is not set
41# CONFIG_KALLSYMS_EXTRA_PASS is not set 46# CONFIG_KALLSYMS_EXTRA_PASS is not set
47CONFIG_HOTPLUG=y
42CONFIG_PRINTK=y 48CONFIG_PRINTK=y
43CONFIG_BUG=y 49CONFIG_BUG=y
50CONFIG_ELF_CORE=y
44CONFIG_BASE_FULL=y 51CONFIG_BASE_FULL=y
52CONFIG_RT_MUTEXES=y
45CONFIG_FUTEX=y 53CONFIG_FUTEX=y
46CONFIG_EPOLL=y 54CONFIG_EPOLL=y
47CONFIG_SHMEM=y 55CONFIG_SHMEM=y
48CONFIG_CC_ALIGN_FUNCTIONS=0 56CONFIG_SLAB=y
49CONFIG_CC_ALIGN_LABELS=0 57CONFIG_VM_EVENT_COUNTERS=y
50CONFIG_CC_ALIGN_LOOPS=0
51CONFIG_CC_ALIGN_JUMPS=0
52# CONFIG_TINY_SHMEM is not set 58# CONFIG_TINY_SHMEM is not set
53CONFIG_BASE_SMALL=0 59CONFIG_BASE_SMALL=0
60# CONFIG_SLOB is not set
54 61
55# 62#
56# Loadable module support 63# Loadable module support
@@ -58,69 +65,68 @@ CONFIG_BASE_SMALL=0
58CONFIG_MODULES=y 65CONFIG_MODULES=y
59CONFIG_MODULE_UNLOAD=y 66CONFIG_MODULE_UNLOAD=y
60# CONFIG_MODULE_FORCE_UNLOAD is not set 67# CONFIG_MODULE_FORCE_UNLOAD is not set
61CONFIG_OBSOLETE_MODPARM=y
62CONFIG_MODVERSIONS=y 68CONFIG_MODVERSIONS=y
63# CONFIG_MODULE_SRCVERSION_ALL is not set 69# CONFIG_MODULE_SRCVERSION_ALL is not set
64CONFIG_KMOD=y 70CONFIG_KMOD=y
65 71
66# 72#
73# Block layer
74#
75CONFIG_LBD=y
76# CONFIG_BLK_DEV_IO_TRACE is not set
77# CONFIG_LSF is not set
78
79#
80# IO Schedulers
81#
82CONFIG_IOSCHED_NOOP=y
83CONFIG_IOSCHED_AS=y
84CONFIG_IOSCHED_DEADLINE=y
85CONFIG_IOSCHED_CFQ=y
86# CONFIG_DEFAULT_AS is not set
87# CONFIG_DEFAULT_DEADLINE is not set
88CONFIG_DEFAULT_CFQ=y
89# CONFIG_DEFAULT_NOOP is not set
90CONFIG_DEFAULT_IOSCHED="cfq"
91
92#
67# Processor 93# Processor
68# 94#
69CONFIG_6xx=y 95CONFIG_6xx=y
70# CONFIG_40x is not set 96# CONFIG_40x is not set
71# CONFIG_44x is not set 97# CONFIG_44x is not set
72# CONFIG_POWER3 is not set
73# CONFIG_POWER4 is not set
74# CONFIG_8xx is not set 98# CONFIG_8xx is not set
75# CONFIG_E200 is not set 99# CONFIG_E200 is not set
76# CONFIG_E500 is not set 100# CONFIG_E500 is not set
77CONFIG_PPC_FPU=y 101CONFIG_PPC_FPU=y
78CONFIG_ALTIVEC=y 102# CONFIG_ALTIVEC is not set
79CONFIG_TAU=y 103# CONFIG_TAU is not set
80# CONFIG_TAU_INT is not set
81# CONFIG_TAU_AVERAGE is not set
82# CONFIG_KEXEC is not set 104# CONFIG_KEXEC is not set
83CONFIG_CPU_FREQ=y 105# CONFIG_CPU_FREQ is not set
84CONFIG_CPU_FREQ_TABLE=y
85# CONFIG_CPU_FREQ_DEBUG is not set
86CONFIG_CPU_FREQ_STAT=m
87CONFIG_CPU_FREQ_STAT_DETAILS=y
88CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
89# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
90CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
91CONFIG_CPU_FREQ_GOV_POWERSAVE=m
92CONFIG_CPU_FREQ_GOV_USERSPACE=m
93CONFIG_CPU_FREQ_GOV_ONDEMAND=m
94CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
95CONFIG_CPU_FREQ_PMAC=y
96CONFIG_PPC601_SYNC_FIX=y 106CONFIG_PPC601_SYNC_FIX=y
97CONFIG_PM=y 107# CONFIG_WANT_EARLY_SERIAL is not set
98CONFIG_PPC_STD_MMU=y 108CONFIG_PPC_STD_MMU=y
99 109
100# 110#
101# Platform options 111# Platform options
102# 112#
103CONFIG_PPC_MULTIPLATFORM=y 113CONFIG_PPC_PREP=y
104# CONFIG_APUS is not set 114# CONFIG_APUS is not set
105# CONFIG_KATANA is not set 115# CONFIG_KATANA is not set
106# CONFIG_WILLOW is not set 116# CONFIG_WILLOW is not set
107# CONFIG_CPCI690 is not set 117# CONFIG_CPCI690 is not set
108# CONFIG_PCORE is not set
109# CONFIG_POWERPMC250 is not set 118# CONFIG_POWERPMC250 is not set
110# CONFIG_CHESTNUT is not set 119# CONFIG_CHESTNUT is not set
111# CONFIG_SPRUCE is not set 120# CONFIG_SPRUCE is not set
112# CONFIG_HDPU is not set 121# CONFIG_HDPU is not set
113# CONFIG_EV64260 is not set 122# CONFIG_EV64260 is not set
114# CONFIG_LOPEC is not set 123# CONFIG_LOPEC is not set
115# CONFIG_MCPN765 is not set
116# CONFIG_MVME5100 is not set 124# CONFIG_MVME5100 is not set
117# CONFIG_PPLUS is not set 125# CONFIG_PPLUS is not set
118# CONFIG_PRPMC750 is not set 126# CONFIG_PRPMC750 is not set
119# CONFIG_PRPMC800 is not set 127# CONFIG_PRPMC800 is not set
120# CONFIG_SANDPOINT is not set 128# CONFIG_SANDPOINT is not set
121# CONFIG_RADSTONE_PPC7D is not set 129# CONFIG_RADSTONE_PPC7D is not set
122# CONFIG_ADIR is not set
123# CONFIG_K2 is not set
124# CONFIG_PAL4 is not set 130# CONFIG_PAL4 is not set
125# CONFIG_GEMINI is not set 131# CONFIG_GEMINI is not set
126# CONFIG_EST8260 is not set 132# CONFIG_EST8260 is not set
@@ -132,10 +138,7 @@ CONFIG_PPC_MULTIPLATFORM=y
132# CONFIG_PQ2FADS is not set 138# CONFIG_PQ2FADS is not set
133# CONFIG_LITE5200 is not set 139# CONFIG_LITE5200 is not set
134# CONFIG_MPC834x_SYS is not set 140# CONFIG_MPC834x_SYS is not set
135CONFIG_PPC_CHRP=y 141# CONFIG_EV64360 is not set
136CONFIG_PPC_PMAC=y
137CONFIG_PPC_PREP=y
138CONFIG_PPC_OF=y
139CONFIG_PPCBUG_NVRAM=y 142CONFIG_PPCBUG_NVRAM=y
140# CONFIG_SMP is not set 143# CONFIG_SMP is not set
141# CONFIG_HIGHMEM is not set 144# CONFIG_HIGHMEM is not set
@@ -152,12 +155,16 @@ CONFIG_FLATMEM_MANUAL=y
152# CONFIG_SPARSEMEM_MANUAL is not set 155# CONFIG_SPARSEMEM_MANUAL is not set
153CONFIG_FLATMEM=y 156CONFIG_FLATMEM=y
154CONFIG_FLAT_NODE_MEM_MAP=y 157CONFIG_FLAT_NODE_MEM_MAP=y
158# CONFIG_SPARSEMEM_STATIC is not set
159CONFIG_SPLIT_PTLOCK_CPUS=4
160# CONFIG_RESOURCES_64BIT is not set
155CONFIG_BINFMT_ELF=y 161CONFIG_BINFMT_ELF=y
156CONFIG_BINFMT_MISC=m 162CONFIG_BINFMT_MISC=m
157CONFIG_PROC_DEVICETREE=y
158CONFIG_PREP_RESIDUAL=y 163CONFIG_PREP_RESIDUAL=y
159CONFIG_PROC_PREPRESIDUAL=y 164CONFIG_PROC_PREPRESIDUAL=y
160# CONFIG_CMDLINE_BOOL is not set 165# CONFIG_CMDLINE_BOOL is not set
166CONFIG_PM=y
167# CONFIG_PM_LEGACY is not set
161# CONFIG_PM_DEBUG is not set 168# CONFIG_PM_DEBUG is not set
162CONFIG_SOFTWARE_SUSPEND=y 169CONFIG_SOFTWARE_SUSPEND=y
163CONFIG_PM_STD_PARTITION="" 170CONFIG_PM_STD_PARTITION=""
@@ -169,10 +176,10 @@ CONFIG_ISA_DMA_API=y
169# 176#
170CONFIG_ISA=y 177CONFIG_ISA=y
171CONFIG_GENERIC_ISA_DMA=y 178CONFIG_GENERIC_ISA_DMA=y
179CONFIG_PPC_I8259=y
180CONFIG_PPC_INDIRECT_PCI=y
172CONFIG_PCI=y 181CONFIG_PCI=y
173CONFIG_PCI_DOMAINS=y 182CONFIG_PCI_DOMAINS=y
174# CONFIG_PCI_LEGACY_PROC is not set
175# CONFIG_PCI_NAMES is not set
176# CONFIG_PCI_DEBUG is not set 183# CONFIG_PCI_DEBUG is not set
177 184
178# 185#
@@ -187,6 +194,11 @@ CONFIG_CARDBUS=y
187# PC-card bridges 194# PC-card bridges
188# 195#
189CONFIG_YENTA=m 196CONFIG_YENTA=m
197CONFIG_YENTA_O2=y
198CONFIG_YENTA_RICOH=y
199CONFIG_YENTA_TI=y
200CONFIG_YENTA_ENE_TUNE=y
201CONFIG_YENTA_TOSHIBA=y
190CONFIG_PCMCIA_PROBE=y 202CONFIG_PCMCIA_PROBE=y
191CONFIG_PCCARD_NONSTATIC=m 203CONFIG_PCCARD_NONSTATIC=m
192 204
@@ -212,6 +224,7 @@ CONFIG_NET=y
212# 224#
213# Networking options 225# Networking options
214# 226#
227# CONFIG_NETDEBUG is not set
215CONFIG_PACKET=y 228CONFIG_PACKET=y
216# CONFIG_PACKET_MMAP is not set 229# CONFIG_PACKET_MMAP is not set
217CONFIG_UNIX=y 230CONFIG_UNIX=y
@@ -229,9 +242,11 @@ CONFIG_SYN_COOKIES=y
229# CONFIG_INET_AH is not set 242# CONFIG_INET_AH is not set
230# CONFIG_INET_ESP is not set 243# CONFIG_INET_ESP is not set
231# CONFIG_INET_IPCOMP is not set 244# CONFIG_INET_IPCOMP is not set
245# CONFIG_INET_XFRM_TUNNEL is not set
232# CONFIG_INET_TUNNEL is not set 246# CONFIG_INET_TUNNEL is not set
233CONFIG_IP_TCPDIAG=y 247# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
234# CONFIG_IP_TCPDIAG_IPV6 is not set 248# CONFIG_INET_XFRM_MODE_TUNNEL is not set
249# CONFIG_INET_DIAG is not set
235# CONFIG_TCP_CONG_ADVANCED is not set 250# CONFIG_TCP_CONG_ADVANCED is not set
236CONFIG_TCP_CONG_BIC=y 251CONFIG_TCP_CONG_BIC=y
237 252
@@ -240,80 +255,77 @@ CONFIG_TCP_CONG_BIC=y
240# 255#
241# CONFIG_IP_VS is not set 256# CONFIG_IP_VS is not set
242# CONFIG_IPV6 is not set 257# CONFIG_IPV6 is not set
258# CONFIG_INET6_XFRM_TUNNEL is not set
259# CONFIG_INET6_TUNNEL is not set
260# CONFIG_NETWORK_SECMARK is not set
243CONFIG_NETFILTER=y 261CONFIG_NETFILTER=y
244# CONFIG_NETFILTER_DEBUG is not set 262# CONFIG_NETFILTER_DEBUG is not set
245 263
246# 264#
265# Core Netfilter Configuration
266#
267CONFIG_NETFILTER_NETLINK=m
268CONFIG_NETFILTER_NETLINK_QUEUE=m
269CONFIG_NETFILTER_NETLINK_LOG=m
270CONFIG_NETFILTER_XTABLES=m
271CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
272CONFIG_NETFILTER_XT_TARGET_MARK=m
273CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
274CONFIG_NETFILTER_XT_MATCH_COMMENT=m
275CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
276CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
277CONFIG_NETFILTER_XT_MATCH_DCCP=m
278CONFIG_NETFILTER_XT_MATCH_ESP=m
279CONFIG_NETFILTER_XT_MATCH_HELPER=m
280CONFIG_NETFILTER_XT_MATCH_LENGTH=m
281CONFIG_NETFILTER_XT_MATCH_LIMIT=m
282CONFIG_NETFILTER_XT_MATCH_MAC=m
283CONFIG_NETFILTER_XT_MATCH_MARK=m
284CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
285CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
286CONFIG_NETFILTER_XT_MATCH_QUOTA=m
287CONFIG_NETFILTER_XT_MATCH_REALM=m
288CONFIG_NETFILTER_XT_MATCH_SCTP=m
289CONFIG_NETFILTER_XT_MATCH_STATE=m
290CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
291CONFIG_NETFILTER_XT_MATCH_STRING=m
292CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
293
294#
247# IP: Netfilter Configuration 295# IP: Netfilter Configuration
248# 296#
249CONFIG_IP_NF_CONNTRACK=m 297CONFIG_IP_NF_CONNTRACK=m
250# CONFIG_IP_NF_CT_ACCT is not set 298# CONFIG_IP_NF_CT_ACCT is not set
251CONFIG_IP_NF_CONNTRACK_MARK=y 299CONFIG_IP_NF_CONNTRACK_MARK=y
300# CONFIG_IP_NF_CONNTRACK_EVENTS is not set
301# CONFIG_IP_NF_CONNTRACK_NETLINK is not set
252# CONFIG_IP_NF_CT_PROTO_SCTP is not set 302# CONFIG_IP_NF_CT_PROTO_SCTP is not set
253CONFIG_IP_NF_FTP=m 303CONFIG_IP_NF_FTP=m
254CONFIG_IP_NF_IRC=m 304CONFIG_IP_NF_IRC=m
305# CONFIG_IP_NF_NETBIOS_NS is not set
255CONFIG_IP_NF_TFTP=m 306CONFIG_IP_NF_TFTP=m
256CONFIG_IP_NF_AMANDA=m 307CONFIG_IP_NF_AMANDA=m
308# CONFIG_IP_NF_PPTP is not set
309# CONFIG_IP_NF_H323 is not set
310# CONFIG_IP_NF_SIP is not set
257CONFIG_IP_NF_QUEUE=m 311CONFIG_IP_NF_QUEUE=m
258CONFIG_IP_NF_IPTABLES=m 312# CONFIG_IP_NF_IPTABLES is not set
259CONFIG_IP_NF_MATCH_LIMIT=m 313# CONFIG_IP_NF_ARPTABLES is not set
260CONFIG_IP_NF_MATCH_IPRANGE=m 314
261CONFIG_IP_NF_MATCH_MAC=m 315#
262CONFIG_IP_NF_MATCH_PKTTYPE=m 316# DCCP Configuration (EXPERIMENTAL)
263CONFIG_IP_NF_MATCH_MARK=m 317#
264CONFIG_IP_NF_MATCH_MULTIPORT=m 318# CONFIG_IP_DCCP is not set
265CONFIG_IP_NF_MATCH_TOS=m
266CONFIG_IP_NF_MATCH_RECENT=m
267CONFIG_IP_NF_MATCH_ECN=m
268CONFIG_IP_NF_MATCH_DSCP=m
269CONFIG_IP_NF_MATCH_AH_ESP=m
270CONFIG_IP_NF_MATCH_LENGTH=m
271CONFIG_IP_NF_MATCH_TTL=m
272CONFIG_IP_NF_MATCH_TCPMSS=m
273CONFIG_IP_NF_MATCH_HELPER=m
274CONFIG_IP_NF_MATCH_STATE=m
275CONFIG_IP_NF_MATCH_CONNTRACK=m
276CONFIG_IP_NF_MATCH_OWNER=m
277CONFIG_IP_NF_MATCH_ADDRTYPE=m
278CONFIG_IP_NF_MATCH_REALM=m
279CONFIG_IP_NF_MATCH_SCTP=m
280CONFIG_IP_NF_MATCH_COMMENT=m
281CONFIG_IP_NF_MATCH_CONNMARK=m
282CONFIG_IP_NF_MATCH_HASHLIMIT=m
283CONFIG_IP_NF_FILTER=m
284CONFIG_IP_NF_TARGET_REJECT=m
285CONFIG_IP_NF_TARGET_LOG=m
286CONFIG_IP_NF_TARGET_ULOG=m
287CONFIG_IP_NF_TARGET_TCPMSS=m
288CONFIG_IP_NF_NAT=m
289CONFIG_IP_NF_NAT_NEEDED=y
290CONFIG_IP_NF_TARGET_MASQUERADE=m
291CONFIG_IP_NF_TARGET_REDIRECT=m
292CONFIG_IP_NF_TARGET_NETMAP=m
293CONFIG_IP_NF_TARGET_SAME=m
294CONFIG_IP_NF_NAT_SNMP_BASIC=m
295CONFIG_IP_NF_NAT_IRC=m
296CONFIG_IP_NF_NAT_FTP=m
297CONFIG_IP_NF_NAT_TFTP=m
298CONFIG_IP_NF_NAT_AMANDA=m
299CONFIG_IP_NF_MANGLE=m
300CONFIG_IP_NF_TARGET_TOS=m
301CONFIG_IP_NF_TARGET_ECN=m
302CONFIG_IP_NF_TARGET_DSCP=m
303CONFIG_IP_NF_TARGET_MARK=m
304CONFIG_IP_NF_TARGET_CLASSIFY=m
305CONFIG_IP_NF_TARGET_CONNMARK=m
306CONFIG_IP_NF_TARGET_CLUSTERIP=m
307CONFIG_IP_NF_RAW=m
308CONFIG_IP_NF_TARGET_NOTRACK=m
309CONFIG_IP_NF_ARPTABLES=m
310# CONFIG_IP_NF_ARPFILTER is not set
311# CONFIG_IP_NF_ARP_MANGLE is not set
312 319
313# 320#
314# SCTP Configuration (EXPERIMENTAL) 321# SCTP Configuration (EXPERIMENTAL)
315# 322#
316# CONFIG_IP_SCTP is not set 323# CONFIG_IP_SCTP is not set
324
325#
326# TIPC Configuration (EXPERIMENTAL)
327#
328# CONFIG_TIPC is not set
317# CONFIG_ATM is not set 329# CONFIG_ATM is not set
318# CONFIG_BRIDGE is not set 330# CONFIG_BRIDGE is not set
319# CONFIG_VLAN_8021Q is not set 331# CONFIG_VLAN_8021Q is not set
@@ -326,6 +338,10 @@ CONFIG_IP_NF_ARPTABLES=m
326# CONFIG_NET_DIVERT is not set 338# CONFIG_NET_DIVERT is not set
327# CONFIG_ECONET is not set 339# CONFIG_ECONET is not set
328# CONFIG_WAN_ROUTER is not set 340# CONFIG_WAN_ROUTER is not set
341
342#
343# QoS and/or fair queueing
344#
329# CONFIG_NET_SCHED is not set 345# CONFIG_NET_SCHED is not set
330CONFIG_NET_CLS_ROUTE=y 346CONFIG_NET_CLS_ROUTE=y
331 347
@@ -333,13 +349,11 @@ CONFIG_NET_CLS_ROUTE=y
333# Network testing 349# Network testing
334# 350#
335# CONFIG_NET_PKTGEN is not set 351# CONFIG_NET_PKTGEN is not set
336CONFIG_NETPOLL=y
337# CONFIG_NETPOLL_RX is not set
338# CONFIG_NETPOLL_TRAP is not set
339CONFIG_NET_POLL_CONTROLLER=y
340# CONFIG_HAMRADIO is not set 352# CONFIG_HAMRADIO is not set
341# CONFIG_IRDA is not set 353# CONFIG_IRDA is not set
342# CONFIG_BT is not set 354# CONFIG_BT is not set
355# CONFIG_IEEE80211 is not set
356CONFIG_WIRELESS_EXT=y
343 357
344# 358#
345# Device Drivers 359# Device Drivers
@@ -352,6 +366,12 @@ CONFIG_NET_POLL_CONTROLLER=y
352CONFIG_PREVENT_FIRMWARE_BUILD=y 366CONFIG_PREVENT_FIRMWARE_BUILD=y
353CONFIG_FW_LOADER=m 367CONFIG_FW_LOADER=m
354# CONFIG_DEBUG_DRIVER is not set 368# CONFIG_DEBUG_DRIVER is not set
369# CONFIG_SYS_HYPERVISOR is not set
370
371#
372# Connector - unified userspace <-> kernelspace linker
373#
374# CONFIG_CONNECTOR is not set
355 375
356# 376#
357# Memory Technology Devices (MTD) 377# Memory Technology Devices (MTD)
@@ -367,6 +387,7 @@ CONFIG_PARPORT_SERIAL=m
367CONFIG_PARPORT_PC_FIFO=y 387CONFIG_PARPORT_PC_FIFO=y
368CONFIG_PARPORT_PC_SUPERIO=y 388CONFIG_PARPORT_PC_SUPERIO=y
369# CONFIG_PARPORT_GSC is not set 389# CONFIG_PARPORT_GSC is not set
390# CONFIG_PARPORT_AX88796 is not set
370CONFIG_PARPORT_1284=y 391CONFIG_PARPORT_1284=y
371 392
372# 393#
@@ -378,7 +399,6 @@ CONFIG_PARPORT_1284=y
378# Block devices 399# Block devices
379# 400#
380CONFIG_BLK_DEV_FD=m 401CONFIG_BLK_DEV_FD=m
381CONFIG_MAC_FLOPPY=m
382# CONFIG_BLK_DEV_XD is not set 402# CONFIG_BLK_DEV_XD is not set
383# CONFIG_PARIDE is not set 403# CONFIG_PARIDE is not set
384# CONFIG_BLK_CPQ_DA is not set 404# CONFIG_BLK_CPQ_DA is not set
@@ -394,18 +414,9 @@ CONFIG_BLK_DEV_LOOP=y
394CONFIG_BLK_DEV_RAM=y 414CONFIG_BLK_DEV_RAM=y
395CONFIG_BLK_DEV_RAM_COUNT=16 415CONFIG_BLK_DEV_RAM_COUNT=16
396CONFIG_BLK_DEV_RAM_SIZE=4096 416CONFIG_BLK_DEV_RAM_SIZE=4096
417CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
397CONFIG_BLK_DEV_INITRD=y 418CONFIG_BLK_DEV_INITRD=y
398CONFIG_INITRAMFS_SOURCE=""
399CONFIG_LBD=y
400# CONFIG_CDROM_PKTCDVD is not set 419# CONFIG_CDROM_PKTCDVD is not set
401
402#
403# IO Schedulers
404#
405CONFIG_IOSCHED_NOOP=y
406CONFIG_IOSCHED_AS=y
407CONFIG_IOSCHED_DEADLINE=y
408CONFIG_IOSCHED_CFQ=y
409# CONFIG_ATA_OVER_ETH is not set 420# CONFIG_ATA_OVER_ETH is not set
410 421
411# 422#
@@ -422,7 +433,7 @@ CONFIG_BLK_DEV_IDEDISK=y
422# CONFIG_IDEDISK_MULTI_MODE is not set 433# CONFIG_IDEDISK_MULTI_MODE is not set
423CONFIG_BLK_DEV_IDECD=y 434CONFIG_BLK_DEV_IDECD=y
424# CONFIG_BLK_DEV_IDETAPE is not set 435# CONFIG_BLK_DEV_IDETAPE is not set
425CONFIG_BLK_DEV_IDEFLOPPY=y 436# CONFIG_BLK_DEV_IDEFLOPPY is not set
426CONFIG_BLK_DEV_IDESCSI=y 437CONFIG_BLK_DEV_IDESCSI=y
427# CONFIG_IDE_TASK_IOCTL is not set 438# CONFIG_IDE_TASK_IOCTL is not set
428 439
@@ -435,7 +446,7 @@ CONFIG_IDEPCI_SHARE_IRQ=y
435# CONFIG_BLK_DEV_OFFBOARD is not set 446# CONFIG_BLK_DEV_OFFBOARD is not set
436CONFIG_BLK_DEV_GENERIC=y 447CONFIG_BLK_DEV_GENERIC=y
437# CONFIG_BLK_DEV_OPTI621 is not set 448# CONFIG_BLK_DEV_OPTI621 is not set
438# CONFIG_BLK_DEV_SL82C105 is not set 449CONFIG_BLK_DEV_SL82C105=y
439CONFIG_BLK_DEV_IDEDMA_PCI=y 450CONFIG_BLK_DEV_IDEDMA_PCI=y
440# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 451# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
441CONFIG_IDEDMA_PCI_AUTO=y 452CONFIG_IDEDMA_PCI_AUTO=y
@@ -443,7 +454,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
443# CONFIG_BLK_DEV_AEC62XX is not set 454# CONFIG_BLK_DEV_AEC62XX is not set
444# CONFIG_BLK_DEV_ALI15X3 is not set 455# CONFIG_BLK_DEV_ALI15X3 is not set
445# CONFIG_BLK_DEV_AMD74XX is not set 456# CONFIG_BLK_DEV_AMD74XX is not set
446CONFIG_BLK_DEV_CMD64X=y 457# CONFIG_BLK_DEV_CMD64X is not set
447# CONFIG_BLK_DEV_TRIFLEX is not set 458# CONFIG_BLK_DEV_TRIFLEX is not set
448# CONFIG_BLK_DEV_CY82C693 is not set 459# CONFIG_BLK_DEV_CY82C693 is not set
449# CONFIG_BLK_DEV_CS5520 is not set 460# CONFIG_BLK_DEV_CS5520 is not set
@@ -455,17 +466,12 @@ CONFIG_BLK_DEV_CMD64X=y
455# CONFIG_BLK_DEV_IT821X is not set 466# CONFIG_BLK_DEV_IT821X is not set
456# CONFIG_BLK_DEV_NS87415 is not set 467# CONFIG_BLK_DEV_NS87415 is not set
457# CONFIG_BLK_DEV_PDC202XX_OLD is not set 468# CONFIG_BLK_DEV_PDC202XX_OLD is not set
458CONFIG_BLK_DEV_PDC202XX_NEW=y 469# CONFIG_BLK_DEV_PDC202XX_NEW is not set
459# CONFIG_PDC202XX_FORCE is not set
460# CONFIG_BLK_DEV_SVWKS is not set 470# CONFIG_BLK_DEV_SVWKS is not set
461# CONFIG_BLK_DEV_SIIMAGE is not set 471# CONFIG_BLK_DEV_SIIMAGE is not set
462# CONFIG_BLK_DEV_SLC90E66 is not set 472# CONFIG_BLK_DEV_SLC90E66 is not set
463# CONFIG_BLK_DEV_TRM290 is not set 473# CONFIG_BLK_DEV_TRM290 is not set
464# CONFIG_BLK_DEV_VIA82CXXX is not set 474# CONFIG_BLK_DEV_VIA82CXXX is not set
465CONFIG_BLK_DEV_IDE_PMAC=y
466CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
467CONFIG_BLK_DEV_IDEDMA_PMAC=y
468CONFIG_BLK_DEV_IDE_PMAC_BLINK=y
469# CONFIG_IDE_ARM is not set 475# CONFIG_IDE_ARM is not set
470# CONFIG_IDE_CHIPSETS is not set 476# CONFIG_IDE_CHIPSETS is not set
471CONFIG_BLK_DEV_IDEDMA=y 477CONFIG_BLK_DEV_IDEDMA=y
@@ -476,6 +482,7 @@ CONFIG_IDEDMA_AUTO=y
476# 482#
477# SCSI device support 483# SCSI device support
478# 484#
485# CONFIG_RAID_ATTRS is not set
479CONFIG_SCSI=y 486CONFIG_SCSI=y
480CONFIG_SCSI_PROC_FS=y 487CONFIG_SCSI_PROC_FS=y
481 488
@@ -503,10 +510,12 @@ CONFIG_SCSI_LOGGING=y
503CONFIG_SCSI_SPI_ATTRS=y 510CONFIG_SCSI_SPI_ATTRS=y
504# CONFIG_SCSI_FC_ATTRS is not set 511# CONFIG_SCSI_FC_ATTRS is not set
505# CONFIG_SCSI_ISCSI_ATTRS is not set 512# CONFIG_SCSI_ISCSI_ATTRS is not set
513# CONFIG_SCSI_SAS_ATTRS is not set
506 514
507# 515#
508# SCSI low-level drivers 516# SCSI low-level drivers
509# 517#
518# CONFIG_ISCSI_TCP is not set
510# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 519# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
511# CONFIG_SCSI_3W_9XXX is not set 520# CONFIG_SCSI_3W_9XXX is not set
512# CONFIG_SCSI_7000FASST is not set 521# CONFIG_SCSI_7000FASST is not set
@@ -514,19 +523,16 @@ CONFIG_SCSI_SPI_ATTRS=y
514# CONFIG_SCSI_AHA152X is not set 523# CONFIG_SCSI_AHA152X is not set
515# CONFIG_SCSI_AHA1542 is not set 524# CONFIG_SCSI_AHA1542 is not set
516# CONFIG_SCSI_AACRAID is not set 525# CONFIG_SCSI_AACRAID is not set
517CONFIG_SCSI_AIC7XXX=m 526# CONFIG_SCSI_AIC7XXX is not set
518CONFIG_AIC7XXX_CMDS_PER_DEVICE=253 527# CONFIG_SCSI_AIC7XXX_OLD is not set
519CONFIG_AIC7XXX_RESET_DELAY_MS=15000
520CONFIG_AIC7XXX_DEBUG_ENABLE=y
521CONFIG_AIC7XXX_DEBUG_MASK=0
522CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
523CONFIG_SCSI_AIC7XXX_OLD=m
524# CONFIG_SCSI_AIC79XX is not set 528# CONFIG_SCSI_AIC79XX is not set
525# CONFIG_SCSI_DPT_I2O is not set 529# CONFIG_SCSI_DPT_I2O is not set
526# CONFIG_SCSI_IN2000 is not set 530# CONFIG_SCSI_IN2000 is not set
527# CONFIG_MEGARAID_NEWGEN is not set 531# CONFIG_MEGARAID_NEWGEN is not set
528# CONFIG_MEGARAID_LEGACY is not set 532# CONFIG_MEGARAID_LEGACY is not set
533# CONFIG_MEGARAID_SAS is not set
529# CONFIG_SCSI_SATA is not set 534# CONFIG_SCSI_SATA is not set
535# CONFIG_SCSI_HPTIOP is not set
530# CONFIG_SCSI_BUSLOGIC is not set 536# CONFIG_SCSI_BUSLOGIC is not set
531# CONFIG_SCSI_DMX3191D is not set 537# CONFIG_SCSI_DMX3191D is not set
532# CONFIG_SCSI_DTC3280 is not set 538# CONFIG_SCSI_DTC3280 is not set
@@ -545,19 +551,13 @@ CONFIG_SCSI_SYM53C8XX_2=y
545CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 551CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
546CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 552CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
547CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 553CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
548# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set 554CONFIG_SCSI_SYM53C8XX_MMIO=y
549# CONFIG_SCSI_IPR is not set 555# CONFIG_SCSI_IPR is not set
550# CONFIG_SCSI_PAS16 is not set 556# CONFIG_SCSI_PAS16 is not set
551# CONFIG_SCSI_PSI240I is not set 557# CONFIG_SCSI_PSI240I is not set
552# CONFIG_SCSI_QLOGIC_FAS is not set 558# CONFIG_SCSI_QLOGIC_FAS is not set
553# CONFIG_SCSI_QLOGIC_FC is not set
554# CONFIG_SCSI_QLOGIC_1280 is not set 559# CONFIG_SCSI_QLOGIC_1280 is not set
555CONFIG_SCSI_QLA2XXX=y 560# CONFIG_SCSI_QLA_FC is not set
556# CONFIG_SCSI_QLA21XX is not set
557# CONFIG_SCSI_QLA22XX is not set
558# CONFIG_SCSI_QLA2300 is not set
559# CONFIG_SCSI_QLA2322 is not set
560# CONFIG_SCSI_QLA6312 is not set
561# CONFIG_SCSI_LPFC is not set 561# CONFIG_SCSI_LPFC is not set
562# CONFIG_SCSI_SYM53C416 is not set 562# CONFIG_SCSI_SYM53C416 is not set
563# CONFIG_SCSI_DC395x is not set 563# CONFIG_SCSI_DC395x is not set
@@ -566,10 +566,6 @@ CONFIG_SCSI_QLA2XXX=y
566# CONFIG_SCSI_U14_34F is not set 566# CONFIG_SCSI_U14_34F is not set
567# CONFIG_SCSI_NSP32 is not set 567# CONFIG_SCSI_NSP32 is not set
568# CONFIG_SCSI_DEBUG is not set 568# CONFIG_SCSI_DEBUG is not set
569CONFIG_SCSI_MESH=y
570CONFIG_SCSI_MESH_SYNC_RATE=5
571CONFIG_SCSI_MESH_RESET_DELAY_MS=4000
572CONFIG_SCSI_MAC53C94=y
573 569
574# 570#
575# Old CD-ROM drivers (not SCSI, not IDE) 571# Old CD-ROM drivers (not SCSI, not IDE)
@@ -587,6 +583,7 @@ CONFIG_SCSI_MAC53C94=y
587# CONFIG_FUSION is not set 583# CONFIG_FUSION is not set
588# CONFIG_FUSION_SPI is not set 584# CONFIG_FUSION_SPI is not set
589# CONFIG_FUSION_FC is not set 585# CONFIG_FUSION_FC is not set
586# CONFIG_FUSION_SAS is not set
590 587
591# 588#
592# IEEE 1394 (FireWire) support 589# IEEE 1394 (FireWire) support
@@ -613,12 +610,9 @@ CONFIG_IEEE1394_OHCI1394=m
613# 610#
614CONFIG_IEEE1394_VIDEO1394=m 611CONFIG_IEEE1394_VIDEO1394=m
615CONFIG_IEEE1394_SBP2=m 612CONFIG_IEEE1394_SBP2=m
616# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
617CONFIG_IEEE1394_ETH1394=m 613CONFIG_IEEE1394_ETH1394=m
618CONFIG_IEEE1394_DV1394=m 614CONFIG_IEEE1394_DV1394=m
619CONFIG_IEEE1394_RAWIO=m 615CONFIG_IEEE1394_RAWIO=m
620CONFIG_IEEE1394_CMP=m
621CONFIG_IEEE1394_AMDTP=m
622 616
623# 617#
624# I2O device support 618# I2O device support
@@ -628,18 +622,7 @@ CONFIG_IEEE1394_AMDTP=m
628# 622#
629# Macintosh device drivers 623# Macintosh device drivers
630# 624#
631CONFIG_ADB=y 625# CONFIG_WINDFARM is not set
632CONFIG_ADB_CUDA=y
633CONFIG_ADB_PMU=y
634CONFIG_PMAC_APM_EMU=y
635CONFIG_PMAC_MEDIABAY=y
636CONFIG_PMAC_BACKLIGHT=y
637CONFIG_ADB_MACIO=y
638CONFIG_INPUT_ADBHID=y
639CONFIG_MAC_EMUMOUSEBTN=y
640CONFIG_THERM_WINDTUNNEL=m
641CONFIG_THERM_ADT746X=m
642# CONFIG_ANSLCD is not set
643 626
644# 627#
645# Network device support 628# Network device support
@@ -656,15 +639,18 @@ CONFIG_TUN=m
656# CONFIG_ARCNET is not set 639# CONFIG_ARCNET is not set
657 640
658# 641#
642# PHY device support
643#
644# CONFIG_PHYLIB is not set
645
646#
659# Ethernet (10 or 100Mbit) 647# Ethernet (10 or 100Mbit)
660# 648#
661CONFIG_NET_ETHERNET=y 649CONFIG_NET_ETHERNET=y
662CONFIG_MII=y 650CONFIG_MII=y
663CONFIG_MACE=y
664# CONFIG_MACE_AAUI_PORT is not set
665CONFIG_BMAC=y
666# CONFIG_HAPPYMEAL is not set 651# CONFIG_HAPPYMEAL is not set
667CONFIG_SUNGEM=y 652# CONFIG_SUNGEM is not set
653# CONFIG_CASSINI is not set
668# CONFIG_NET_VENDOR_3COM is not set 654# CONFIG_NET_VENDOR_3COM is not set
669# CONFIG_LANCE is not set 655# CONFIG_LANCE is not set
670# CONFIG_NET_VENDOR_SMC is not set 656# CONFIG_NET_VENDOR_SMC is not set
@@ -682,6 +668,7 @@ CONFIG_TULIP_MMIO=y
682CONFIG_DE4X5=m 668CONFIG_DE4X5=m
683# CONFIG_WINBOND_840 is not set 669# CONFIG_WINBOND_840 is not set
684# CONFIG_DM9102 is not set 670# CONFIG_DM9102 is not set
671# CONFIG_ULI526X is not set
685# CONFIG_PCMCIA_XIRCOM is not set 672# CONFIG_PCMCIA_XIRCOM is not set
686# CONFIG_PCMCIA_XIRTULIP is not set 673# CONFIG_PCMCIA_XIRTULIP is not set
687# CONFIG_AT1700 is not set 674# CONFIG_AT1700 is not set
@@ -722,18 +709,21 @@ CONFIG_PCNET32=y
722# CONFIG_HAMACHI is not set 709# CONFIG_HAMACHI is not set
723# CONFIG_YELLOWFIN is not set 710# CONFIG_YELLOWFIN is not set
724# CONFIG_R8169 is not set 711# CONFIG_R8169 is not set
712# CONFIG_SIS190 is not set
725# CONFIG_SKGE is not set 713# CONFIG_SKGE is not set
714# CONFIG_SKY2 is not set
726# CONFIG_SK98LIN is not set 715# CONFIG_SK98LIN is not set
727# CONFIG_VIA_VELOCITY is not set 716# CONFIG_VIA_VELOCITY is not set
728# CONFIG_TIGON3 is not set 717# CONFIG_TIGON3 is not set
729# CONFIG_BNX2 is not set 718# CONFIG_BNX2 is not set
730# CONFIG_MV643XX_ETH is not set
731 719
732# 720#
733# Ethernet (10000 Mbit) 721# Ethernet (10000 Mbit)
734# 722#
723# CONFIG_CHELSIO_T1 is not set
735# CONFIG_IXGB is not set 724# CONFIG_IXGB is not set
736# CONFIG_S2IO is not set 725# CONFIG_S2IO is not set
726# CONFIG_MYRI10GE is not set
737 727
738# 728#
739# Token Ring devices 729# Token Ring devices
@@ -744,6 +734,7 @@ CONFIG_PCNET32=y
744# Wireless LAN (non-hamradio) 734# Wireless LAN (non-hamradio)
745# 735#
746CONFIG_NET_RADIO=y 736CONFIG_NET_RADIO=y
737# CONFIG_NET_WIRELESS_RTNETLINK is not set
747 738
748# 739#
749# Obsolete Wireless cards support (pre-802.11) 740# Obsolete Wireless cards support (pre-802.11)
@@ -755,11 +746,13 @@ CONFIG_NET_RADIO=y
755# 746#
756# Wireless 802.11b ISA/PCI cards support 747# Wireless 802.11b ISA/PCI cards support
757# 748#
749# CONFIG_IPW2100 is not set
750# CONFIG_IPW2200 is not set
758# CONFIG_AIRO is not set 751# CONFIG_AIRO is not set
759CONFIG_HERMES=m 752CONFIG_HERMES=m
760CONFIG_APPLE_AIRPORT=m
761# CONFIG_PLX_HERMES is not set 753# CONFIG_PLX_HERMES is not set
762# CONFIG_TMD_HERMES is not set 754# CONFIG_TMD_HERMES is not set
755# CONFIG_NORTEL_HERMES is not set
763# CONFIG_PCI_HERMES is not set 756# CONFIG_PCI_HERMES is not set
764# CONFIG_ATMEL is not set 757# CONFIG_ATMEL is not set
765 758
@@ -767,6 +760,8 @@ CONFIG_APPLE_AIRPORT=m
767# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support 760# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
768# 761#
769# CONFIG_PRISM54 is not set 762# CONFIG_PRISM54 is not set
763# CONFIG_USB_ZD1201 is not set
764# CONFIG_HOSTAP is not set
770CONFIG_NET_WIRELESS=y 765CONFIG_NET_WIRELESS=y
771 766
772# 767#
@@ -783,11 +778,16 @@ CONFIG_PPP_ASYNC=y
783# CONFIG_PPP_SYNC_TTY is not set 778# CONFIG_PPP_SYNC_TTY is not set
784CONFIG_PPP_DEFLATE=y 779CONFIG_PPP_DEFLATE=y
785CONFIG_PPP_BSDCOMP=m 780CONFIG_PPP_BSDCOMP=m
781# CONFIG_PPP_MPPE is not set
786CONFIG_PPPOE=m 782CONFIG_PPPOE=m
787# CONFIG_SLIP is not set 783# CONFIG_SLIP is not set
788# CONFIG_NET_FC is not set 784# CONFIG_NET_FC is not set
789# CONFIG_SHAPER is not set 785# CONFIG_SHAPER is not set
790CONFIG_NETCONSOLE=m 786CONFIG_NETCONSOLE=m
787CONFIG_NETPOLL=y
788# CONFIG_NETPOLL_RX is not set
789# CONFIG_NETPOLL_TRAP is not set
790CONFIG_NET_POLL_CONTROLLER=y
791 791
792# 792#
793# ISDN subsystem 793# ISDN subsystem
@@ -835,7 +835,7 @@ CONFIG_MOUSE_PS2=y
835# CONFIG_INPUT_JOYSTICK is not set 835# CONFIG_INPUT_JOYSTICK is not set
836# CONFIG_INPUT_TOUCHSCREEN is not set 836# CONFIG_INPUT_TOUCHSCREEN is not set
837CONFIG_INPUT_MISC=y 837CONFIG_INPUT_MISC=y
838# CONFIG_INPUT_PCSPKR is not set 838CONFIG_INPUT_PCSPKR=m
839CONFIG_INPUT_UINPUT=m 839CONFIG_INPUT_UINPUT=m
840 840
841# 841#
@@ -856,6 +856,7 @@ CONFIG_SERIO_LIBPS2=y
856CONFIG_VT=y 856CONFIG_VT=y
857CONFIG_VT_CONSOLE=y 857CONFIG_VT_CONSOLE=y
858CONFIG_HW_CONSOLE=y 858CONFIG_HW_CONSOLE=y
859# CONFIG_VT_HW_CONSOLE_BINDING is not set
859# CONFIG_SERIAL_NONSTANDARD is not set 860# CONFIG_SERIAL_NONSTANDARD is not set
860 861
861# 862#
@@ -863,7 +864,9 @@ CONFIG_HW_CONSOLE=y
863# 864#
864CONFIG_SERIAL_8250=y 865CONFIG_SERIAL_8250=y
865CONFIG_SERIAL_8250_CONSOLE=y 866CONFIG_SERIAL_8250_CONSOLE=y
867CONFIG_SERIAL_8250_PCI=y
866CONFIG_SERIAL_8250_NR_UARTS=4 868CONFIG_SERIAL_8250_NR_UARTS=4
869CONFIG_SERIAL_8250_RUNTIME_UARTS=4
867# CONFIG_SERIAL_8250_EXTENDED is not set 870# CONFIG_SERIAL_8250_EXTENDED is not set
868 871
869# 872#
@@ -871,8 +874,6 @@ CONFIG_SERIAL_8250_NR_UARTS=4
871# 874#
872CONFIG_SERIAL_CORE=y 875CONFIG_SERIAL_CORE=y
873CONFIG_SERIAL_CORE_CONSOLE=y 876CONFIG_SERIAL_CORE_CONSOLE=y
874CONFIG_SERIAL_PMACZILOG=y
875CONFIG_SERIAL_PMACZILOG_CONSOLE=y
876# CONFIG_SERIAL_JSM is not set 877# CONFIG_SERIAL_JSM is not set
877CONFIG_UNIX98_PTYS=y 878CONFIG_UNIX98_PTYS=y
878CONFIG_LEGACY_PTYS=y 879CONFIG_LEGACY_PTYS=y
@@ -890,6 +891,7 @@ CONFIG_LEGACY_PTY_COUNT=256
890# Watchdog Cards 891# Watchdog Cards
891# 892#
892# CONFIG_WATCHDOG is not set 893# CONFIG_WATCHDOG is not set
894# CONFIG_HW_RANDOM is not set
893CONFIG_NVRAM=y 895CONFIG_NVRAM=y
894CONFIG_GEN_RTC=y 896CONFIG_GEN_RTC=y
895# CONFIG_GEN_RTC_X is not set 897# CONFIG_GEN_RTC_X is not set
@@ -900,21 +902,15 @@ CONFIG_GEN_RTC=y
900# 902#
901# Ftape, the floppy tape device driver 903# Ftape, the floppy tape device driver
902# 904#
903CONFIG_AGP=m 905# CONFIG_AGP is not set
904CONFIG_AGP_UNINORTH=m 906# CONFIG_DRM is not set
905CONFIG_DRM=m
906# CONFIG_DRM_TDFX is not set
907CONFIG_DRM_R128=m
908CONFIG_DRM_RADEON=m
909# CONFIG_DRM_MGA is not set
910# CONFIG_DRM_SIS is not set
911# CONFIG_DRM_VIA is not set
912# CONFIG_RAW_DRIVER is not set 907# CONFIG_RAW_DRIVER is not set
913 908
914# 909#
915# TPM devices 910# TPM devices
916# 911#
917# CONFIG_TCG_TPM is not set 912# CONFIG_TCG_TPM is not set
913# CONFIG_TELCLOCK is not set
918 914
919# 915#
920# I2C support 916# I2C support
@@ -938,19 +934,16 @@ CONFIG_I2C_ALGOBIT=y
938# CONFIG_I2C_AMD756 is not set 934# CONFIG_I2C_AMD756 is not set
939# CONFIG_I2C_AMD8111 is not set 935# CONFIG_I2C_AMD8111 is not set
940# CONFIG_I2C_ELEKTOR is not set 936# CONFIG_I2C_ELEKTOR is not set
941CONFIG_I2C_HYDRA=y
942# CONFIG_I2C_I801 is not set 937# CONFIG_I2C_I801 is not set
943# CONFIG_I2C_I810 is not set 938# CONFIG_I2C_I810 is not set
944# CONFIG_I2C_PIIX4 is not set 939# CONFIG_I2C_PIIX4 is not set
945# CONFIG_I2C_ISA is not set
946CONFIG_I2C_KEYWEST=m
947# CONFIG_I2C_MPC is not set 940# CONFIG_I2C_MPC is not set
948# CONFIG_I2C_NFORCE2 is not set 941# CONFIG_I2C_NFORCE2 is not set
942# CONFIG_I2C_OCORES is not set
949# CONFIG_I2C_PARPORT is not set 943# CONFIG_I2C_PARPORT is not set
950# CONFIG_I2C_PARPORT_LIGHT is not set 944# CONFIG_I2C_PARPORT_LIGHT is not set
951# CONFIG_I2C_PROSAVAGE is not set 945# CONFIG_I2C_PROSAVAGE is not set
952# CONFIG_I2C_SAVAGE4 is not set 946# CONFIG_I2C_SAVAGE4 is not set
953# CONFIG_SCx200_ACB is not set
954# CONFIG_I2C_SIS5595 is not set 947# CONFIG_I2C_SIS5595 is not set
955# CONFIG_I2C_SIS630 is not set 948# CONFIG_I2C_SIS630 is not set
956# CONFIG_I2C_SIS96X is not set 949# CONFIG_I2C_SIS96X is not set
@@ -959,7 +952,6 @@ CONFIG_I2C_KEYWEST=m
959# CONFIG_I2C_VIAPRO is not set 952# CONFIG_I2C_VIAPRO is not set
960# CONFIG_I2C_VOODOO3 is not set 953# CONFIG_I2C_VOODOO3 is not set
961# CONFIG_I2C_PCA_ISA is not set 954# CONFIG_I2C_PCA_ISA is not set
962# CONFIG_I2C_SENSOR is not set
963 955
964# 956#
965# Miscellaneous I2C Chip support 957# Miscellaneous I2C Chip support
@@ -970,7 +962,6 @@ CONFIG_I2C_KEYWEST=m
970# CONFIG_SENSORS_PCF8574 is not set 962# CONFIG_SENSORS_PCF8574 is not set
971# CONFIG_SENSORS_PCA9539 is not set 963# CONFIG_SENSORS_PCA9539 is not set
972# CONFIG_SENSORS_PCF8591 is not set 964# CONFIG_SENSORS_PCF8591 is not set
973# CONFIG_SENSORS_RTC8564 is not set
974# CONFIG_SENSORS_M41T00 is not set 965# CONFIG_SENSORS_M41T00 is not set
975# CONFIG_SENSORS_MAX6875 is not set 966# CONFIG_SENSORS_MAX6875 is not set
976# CONFIG_I2C_DEBUG_CORE is not set 967# CONFIG_I2C_DEBUG_CORE is not set
@@ -979,14 +970,20 @@ CONFIG_I2C_KEYWEST=m
979# CONFIG_I2C_DEBUG_CHIP is not set 970# CONFIG_I2C_DEBUG_CHIP is not set
980 971
981# 972#
973# SPI support
974#
975# CONFIG_SPI is not set
976# CONFIG_SPI_MASTER is not set
977
978#
982# Dallas's 1-wire bus 979# Dallas's 1-wire bus
983# 980#
984# CONFIG_W1 is not set
985 981
986# 982#
987# Hardware Monitoring support 983# Hardware Monitoring support
988# 984#
989# CONFIG_HWMON is not set 985# CONFIG_HWMON is not set
986# CONFIG_HWMON_VID is not set
990 987
991# 988#
992# Misc devices 989# Misc devices
@@ -996,38 +993,36 @@ CONFIG_I2C_KEYWEST=m
996# Multimedia devices 993# Multimedia devices
997# 994#
998# CONFIG_VIDEO_DEV is not set 995# CONFIG_VIDEO_DEV is not set
996CONFIG_VIDEO_V4L2=y
999 997
1000# 998#
1001# Digital Video Broadcasting Devices 999# Digital Video Broadcasting Devices
1002# 1000#
1003# CONFIG_DVB is not set 1001# CONFIG_DVB is not set
1002# CONFIG_USB_DABUSB is not set
1004 1003
1005# 1004#
1006# Graphics support 1005# Graphics support
1007# 1006#
1007# CONFIG_FIRMWARE_EDID is not set
1008CONFIG_FB=y 1008CONFIG_FB=y
1009CONFIG_FB_CFB_FILLRECT=y 1009CONFIG_FB_CFB_FILLRECT=y
1010CONFIG_FB_CFB_COPYAREA=y 1010CONFIG_FB_CFB_COPYAREA=y
1011CONFIG_FB_CFB_IMAGEBLIT=y 1011CONFIG_FB_CFB_IMAGEBLIT=y
1012CONFIG_FB_SOFT_CURSOR=y 1012# CONFIG_FB_MACMODES is not set
1013CONFIG_FB_MACMODES=y 1013# CONFIG_FB_BACKLIGHT is not set
1014CONFIG_FB_MODE_HELPERS=y 1014CONFIG_FB_MODE_HELPERS=y
1015CONFIG_FB_TILEBLITTING=y 1015CONFIG_FB_TILEBLITTING=y
1016# CONFIG_FB_CIRRUS is not set 1016# CONFIG_FB_CIRRUS is not set
1017# CONFIG_FB_PM2 is not set 1017# CONFIG_FB_PM2 is not set
1018# CONFIG_FB_CYBER2000 is not set 1018# CONFIG_FB_CYBER2000 is not set
1019CONFIG_FB_OF=y 1019# CONFIG_FB_CT65550 is not set
1020CONFIG_FB_CONTROL=y
1021CONFIG_FB_PLATINUM=y
1022CONFIG_FB_VALKYRIE=y
1023CONFIG_FB_CT65550=y
1024# CONFIG_FB_ASILIANT is not set 1020# CONFIG_FB_ASILIANT is not set
1025CONFIG_FB_IMSTT=y 1021# CONFIG_FB_IMSTT is not set
1026# CONFIG_FB_VGA16 is not set 1022# CONFIG_FB_VGA16 is not set
1023# CONFIG_FB_S1D13XXX is not set
1027# CONFIG_FB_NVIDIA is not set 1024# CONFIG_FB_NVIDIA is not set
1028CONFIG_FB_RIVA=y 1025# CONFIG_FB_RIVA is not set
1029CONFIG_FB_RIVA_I2C=y
1030# CONFIG_FB_RIVA_DEBUG is not set
1031CONFIG_FB_MATROX=y 1026CONFIG_FB_MATROX=y
1032CONFIG_FB_MATROX_MILLENIUM=y 1027CONFIG_FB_MATROX_MILLENIUM=y
1033CONFIG_FB_MATROX_MYSTIQUE=y 1028CONFIG_FB_MATROX_MYSTIQUE=y
@@ -1035,34 +1030,27 @@ CONFIG_FB_MATROX_G=y
1035CONFIG_FB_MATROX_I2C=y 1030CONFIG_FB_MATROX_I2C=y
1036CONFIG_FB_MATROX_MAVEN=m 1031CONFIG_FB_MATROX_MAVEN=m
1037# CONFIG_FB_MATROX_MULTIHEAD is not set 1032# CONFIG_FB_MATROX_MULTIHEAD is not set
1038# CONFIG_FB_RADEON_OLD is not set 1033# CONFIG_FB_RADEON is not set
1039CONFIG_FB_RADEON=y 1034# CONFIG_FB_ATY128 is not set
1040CONFIG_FB_RADEON_I2C=y 1035# CONFIG_FB_ATY is not set
1041# CONFIG_FB_RADEON_DEBUG is not set
1042CONFIG_FB_ATY128=y
1043CONFIG_FB_ATY=y
1044CONFIG_FB_ATY_CT=y
1045CONFIG_FB_ATY_GENERIC_LCD=y
1046CONFIG_FB_ATY_XL_INIT=y
1047CONFIG_FB_ATY_GX=y
1048# CONFIG_FB_SAVAGE is not set 1036# CONFIG_FB_SAVAGE is not set
1049# CONFIG_FB_SIS is not set 1037# CONFIG_FB_SIS is not set
1050# CONFIG_FB_NEOMAGIC is not set 1038# CONFIG_FB_NEOMAGIC is not set
1051# CONFIG_FB_KYRO is not set 1039# CONFIG_FB_KYRO is not set
1052CONFIG_FB_3DFX=y 1040# CONFIG_FB_3DFX is not set
1053# CONFIG_FB_3DFX_ACCEL is not set
1054# CONFIG_FB_VOODOO1 is not set 1041# CONFIG_FB_VOODOO1 is not set
1055# CONFIG_FB_TRIDENT is not set 1042# CONFIG_FB_TRIDENT is not set
1056# CONFIG_FB_S1D13XXX is not set
1057# CONFIG_FB_VIRTUAL is not set 1043# CONFIG_FB_VIRTUAL is not set
1058 1044
1059# 1045#
1060# Console display driver support 1046# Console display driver support
1061# 1047#
1062CONFIG_VGA_CONSOLE=y 1048CONFIG_VGA_CONSOLE=y
1049# CONFIG_VGACON_SOFT_SCROLLBACK is not set
1063# CONFIG_MDA_CONSOLE is not set 1050# CONFIG_MDA_CONSOLE is not set
1064CONFIG_DUMMY_CONSOLE=y 1051CONFIG_DUMMY_CONSOLE=y
1065CONFIG_FRAMEBUFFER_CONSOLE=y 1052CONFIG_FRAMEBUFFER_CONSOLE=y
1053# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
1066# CONFIG_FONTS is not set 1054# CONFIG_FONTS is not set
1067CONFIG_FONT_8x8=y 1055CONFIG_FONT_8x8=y
1068CONFIG_FONT_8x16=y 1056CONFIG_FONT_8x16=y
@@ -1080,8 +1068,6 @@ CONFIG_LOGO_LINUX_CLUT224=y
1080# Sound 1068# Sound
1081# 1069#
1082CONFIG_SOUND=m 1070CONFIG_SOUND=m
1083CONFIG_DMASOUND_PMAC=m
1084CONFIG_DMASOUND=m
1085 1071
1086# 1072#
1087# Advanced Linux Sound Architecture 1073# Advanced Linux Sound Architecture
@@ -1096,10 +1082,13 @@ CONFIG_SND_SEQUENCER=m
1096CONFIG_SND_OSSEMUL=y 1082CONFIG_SND_OSSEMUL=y
1097CONFIG_SND_MIXER_OSS=m 1083CONFIG_SND_MIXER_OSS=m
1098CONFIG_SND_PCM_OSS=m 1084CONFIG_SND_PCM_OSS=m
1085CONFIG_SND_PCM_OSS_PLUGINS=y
1099CONFIG_SND_SEQUENCER_OSS=y 1086CONFIG_SND_SEQUENCER_OSS=y
1087# CONFIG_SND_DYNAMIC_MINORS is not set
1088CONFIG_SND_SUPPORT_OLD_API=y
1089CONFIG_SND_VERBOSE_PROCFS=y
1100# CONFIG_SND_VERBOSE_PRINTK is not set 1090# CONFIG_SND_VERBOSE_PRINTK is not set
1101# CONFIG_SND_DEBUG is not set 1091# CONFIG_SND_DEBUG is not set
1102CONFIG_SND_GENERIC_PM=y
1103 1092
1104# 1093#
1105# Generic devices 1094# Generic devices
@@ -1116,7 +1105,9 @@ CONFIG_SND_OPL3_LIB=m
1116# ISA devices 1105# ISA devices
1117# 1106#
1118CONFIG_SND_CS4231_LIB=m 1107CONFIG_SND_CS4231_LIB=m
1108# CONFIG_SND_ADLIB is not set
1119# CONFIG_SND_AD1848 is not set 1109# CONFIG_SND_AD1848 is not set
1110# CONFIG_SND_CMI8330 is not set
1120# CONFIG_SND_CS4231 is not set 1111# CONFIG_SND_CS4231 is not set
1121CONFIG_SND_CS4232=m 1112CONFIG_SND_CS4232=m
1122# CONFIG_SND_CS4236 is not set 1113# CONFIG_SND_CS4236 is not set
@@ -1125,23 +1116,24 @@ CONFIG_SND_CS4232=m
1125# CONFIG_SND_GUSCLASSIC is not set 1116# CONFIG_SND_GUSCLASSIC is not set
1126# CONFIG_SND_GUSEXTREME is not set 1117# CONFIG_SND_GUSEXTREME is not set
1127# CONFIG_SND_GUSMAX is not set 1118# CONFIG_SND_GUSMAX is not set
1128# CONFIG_SND_INTERWAVE is not set 1119# CONFIG_SND_OPL3SA2 is not set
1129# CONFIG_SND_INTERWAVE_STB is not set
1130# CONFIG_SND_OPTI92X_AD1848 is not set 1120# CONFIG_SND_OPTI92X_AD1848 is not set
1131# CONFIG_SND_OPTI92X_CS4231 is not set 1121# CONFIG_SND_OPTI92X_CS4231 is not set
1132# CONFIG_SND_OPTI93X is not set 1122# CONFIG_SND_OPTI93X is not set
1123# CONFIG_SND_MIRO is not set
1133# CONFIG_SND_SB8 is not set 1124# CONFIG_SND_SB8 is not set
1134# CONFIG_SND_SB16 is not set 1125# CONFIG_SND_SB16 is not set
1135# CONFIG_SND_SBAWE is not set 1126# CONFIG_SND_SBAWE is not set
1136# CONFIG_SND_WAVEFRONT is not set
1137# CONFIG_SND_CMI8330 is not set
1138# CONFIG_SND_OPL3SA2 is not set
1139# CONFIG_SND_SGALAXY is not set 1127# CONFIG_SND_SGALAXY is not set
1140# CONFIG_SND_SSCAPE is not set 1128# CONFIG_SND_SSCAPE is not set
1129# CONFIG_SND_WAVEFRONT is not set
1141 1130
1142# 1131#
1143# PCI devices 1132# PCI devices
1144# 1133#
1134# CONFIG_SND_AD1889 is not set
1135# CONFIG_SND_ALS300 is not set
1136# CONFIG_SND_ALS4000 is not set
1145# CONFIG_SND_ALI5451 is not set 1137# CONFIG_SND_ALI5451 is not set
1146# CONFIG_SND_ATIIXP is not set 1138# CONFIG_SND_ATIIXP is not set
1147# CONFIG_SND_ATIIXP_MODEM is not set 1139# CONFIG_SND_ATIIXP_MODEM is not set
@@ -1150,43 +1142,61 @@ CONFIG_SND_CS4232=m
1150# CONFIG_SND_AU8830 is not set 1142# CONFIG_SND_AU8830 is not set
1151# CONFIG_SND_AZT3328 is not set 1143# CONFIG_SND_AZT3328 is not set
1152# CONFIG_SND_BT87X is not set 1144# CONFIG_SND_BT87X is not set
1153# CONFIG_SND_CS46XX is not set 1145# CONFIG_SND_CA0106 is not set
1146# CONFIG_SND_CMIPCI is not set
1154# CONFIG_SND_CS4281 is not set 1147# CONFIG_SND_CS4281 is not set
1148# CONFIG_SND_CS46XX is not set
1149# CONFIG_SND_DARLA20 is not set
1150# CONFIG_SND_GINA20 is not set
1151# CONFIG_SND_LAYLA20 is not set
1152# CONFIG_SND_DARLA24 is not set
1153# CONFIG_SND_GINA24 is not set
1154# CONFIG_SND_LAYLA24 is not set
1155# CONFIG_SND_MONA is not set
1156# CONFIG_SND_MIA is not set
1157# CONFIG_SND_ECHO3G is not set
1158# CONFIG_SND_INDIGO is not set
1159# CONFIG_SND_INDIGOIO is not set
1160# CONFIG_SND_INDIGODJ is not set
1155# CONFIG_SND_EMU10K1 is not set 1161# CONFIG_SND_EMU10K1 is not set
1156# CONFIG_SND_EMU10K1X is not set 1162# CONFIG_SND_EMU10K1X is not set
1157# CONFIG_SND_CA0106 is not set
1158# CONFIG_SND_KORG1212 is not set
1159# CONFIG_SND_MIXART is not set
1160# CONFIG_SND_NM256 is not set
1161# CONFIG_SND_RME32 is not set
1162# CONFIG_SND_RME96 is not set
1163# CONFIG_SND_RME9652 is not set
1164# CONFIG_SND_HDSP is not set
1165# CONFIG_SND_HDSPM is not set
1166# CONFIG_SND_TRIDENT is not set
1167# CONFIG_SND_YMFPCI is not set
1168# CONFIG_SND_ALS4000 is not set
1169# CONFIG_SND_CMIPCI is not set
1170# CONFIG_SND_ENS1370 is not set 1163# CONFIG_SND_ENS1370 is not set
1171# CONFIG_SND_ENS1371 is not set 1164# CONFIG_SND_ENS1371 is not set
1172# CONFIG_SND_ES1938 is not set 1165# CONFIG_SND_ES1938 is not set
1173# CONFIG_SND_ES1968 is not set 1166# CONFIG_SND_ES1968 is not set
1174# CONFIG_SND_MAESTRO3 is not set
1175# CONFIG_SND_FM801 is not set 1167# CONFIG_SND_FM801 is not set
1168# CONFIG_SND_HDA_INTEL is not set
1169# CONFIG_SND_HDSP is not set
1170# CONFIG_SND_HDSPM is not set
1176# CONFIG_SND_ICE1712 is not set 1171# CONFIG_SND_ICE1712 is not set
1177# CONFIG_SND_ICE1724 is not set 1172# CONFIG_SND_ICE1724 is not set
1178# CONFIG_SND_INTEL8X0 is not set 1173# CONFIG_SND_INTEL8X0 is not set
1179# CONFIG_SND_INTEL8X0M is not set 1174# CONFIG_SND_INTEL8X0M is not set
1175# CONFIG_SND_KORG1212 is not set
1176# CONFIG_SND_MAESTRO3 is not set
1177# CONFIG_SND_MIXART is not set
1178# CONFIG_SND_NM256 is not set
1179# CONFIG_SND_PCXHR is not set
1180# CONFIG_SND_RIPTIDE is not set
1181# CONFIG_SND_RME32 is not set
1182# CONFIG_SND_RME96 is not set
1183# CONFIG_SND_RME9652 is not set
1180# CONFIG_SND_SONICVIBES is not set 1184# CONFIG_SND_SONICVIBES is not set
1185# CONFIG_SND_TRIDENT is not set
1181# CONFIG_SND_VIA82XX is not set 1186# CONFIG_SND_VIA82XX is not set
1182# CONFIG_SND_VIA82XX_MODEM is not set 1187# CONFIG_SND_VIA82XX_MODEM is not set
1183# CONFIG_SND_VX222 is not set 1188# CONFIG_SND_VX222 is not set
1184# CONFIG_SND_HDA_INTEL is not set 1189# CONFIG_SND_YMFPCI is not set
1185 1190
1186# 1191#
1187# ALSA PowerMac devices 1192# ALSA PowerMac devices
1188# 1193#
1189CONFIG_SND_POWERMAC=m 1194
1195#
1196# Apple Onboard Audio driver
1197#
1198# CONFIG_SND_AOA is not set
1199# CONFIG_SND_AOA_SOUNDBUS is not set
1190 1200
1191# 1201#
1192# USB devices 1202# USB devices
@@ -1204,6 +1214,7 @@ CONFIG_SND_USB_AUDIO=m
1204# 1214#
1205CONFIG_USB_ARCH_HAS_HCD=y 1215CONFIG_USB_ARCH_HAS_HCD=y
1206CONFIG_USB_ARCH_HAS_OHCI=y 1216CONFIG_USB_ARCH_HAS_OHCI=y
1217CONFIG_USB_ARCH_HAS_EHCI=y
1207CONFIG_USB=y 1218CONFIG_USB=y
1208# CONFIG_USB_DEBUG is not set 1219# CONFIG_USB_DEBUG is not set
1209 1220
@@ -1222,6 +1233,7 @@ CONFIG_USB_DEVICEFS=y
1222CONFIG_USB_EHCI_HCD=m 1233CONFIG_USB_EHCI_HCD=m
1223CONFIG_USB_EHCI_SPLIT_ISO=y 1234CONFIG_USB_EHCI_SPLIT_ISO=y
1224CONFIG_USB_EHCI_ROOT_HUB_TT=y 1235CONFIG_USB_EHCI_ROOT_HUB_TT=y
1236# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1225# CONFIG_USB_ISP116X_HCD is not set 1237# CONFIG_USB_ISP116X_HCD is not set
1226CONFIG_USB_OHCI_HCD=y 1238CONFIG_USB_OHCI_HCD=y
1227# CONFIG_USB_OHCI_BIG_ENDIAN is not set 1239# CONFIG_USB_OHCI_BIG_ENDIAN is not set
@@ -1232,14 +1244,15 @@ CONFIG_USB_UHCI_HCD=m
1232# 1244#
1233# USB Device Class drivers 1245# USB Device Class drivers
1234# 1246#
1235# CONFIG_USB_AUDIO is not set
1236# CONFIG_USB_BLUETOOTH_TTY is not set
1237# CONFIG_USB_MIDI is not set
1238CONFIG_USB_ACM=m 1247CONFIG_USB_ACM=m
1239CONFIG_USB_PRINTER=m 1248CONFIG_USB_PRINTER=m
1240 1249
1241# 1250#
1242# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information 1251# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1252#
1253
1254#
1255# may also be needed; see USB_STORAGE Help for more information
1243# 1256#
1244CONFIG_USB_STORAGE=m 1257CONFIG_USB_STORAGE=m
1245# CONFIG_USB_STORAGE_DEBUG is not set 1258# CONFIG_USB_STORAGE_DEBUG is not set
@@ -1251,12 +1264,15 @@ CONFIG_USB_STORAGE_USBAT=y
1251CONFIG_USB_STORAGE_SDDR09=y 1264CONFIG_USB_STORAGE_SDDR09=y
1252CONFIG_USB_STORAGE_SDDR55=y 1265CONFIG_USB_STORAGE_SDDR55=y
1253CONFIG_USB_STORAGE_JUMPSHOT=y 1266CONFIG_USB_STORAGE_JUMPSHOT=y
1267# CONFIG_USB_STORAGE_ALAUDA is not set
1268# CONFIG_USB_LIBUSUAL is not set
1254 1269
1255# 1270#
1256# USB Input Devices 1271# USB Input Devices
1257# 1272#
1258CONFIG_USB_HID=y 1273CONFIG_USB_HID=y
1259CONFIG_USB_HIDINPUT=y 1274CONFIG_USB_HIDINPUT=y
1275# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1260# CONFIG_HID_FF is not set 1276# CONFIG_HID_FF is not set
1261CONFIG_USB_HIDDEV=y 1277CONFIG_USB_HIDDEV=y
1262# CONFIG_USB_AIPTEK is not set 1278# CONFIG_USB_AIPTEK is not set
@@ -1264,12 +1280,13 @@ CONFIG_USB_HIDDEV=y
1264# CONFIG_USB_ACECAD is not set 1280# CONFIG_USB_ACECAD is not set
1265# CONFIG_USB_KBTAB is not set 1281# CONFIG_USB_KBTAB is not set
1266# CONFIG_USB_POWERMATE is not set 1282# CONFIG_USB_POWERMATE is not set
1267# CONFIG_USB_MTOUCH is not set 1283# CONFIG_USB_TOUCHSCREEN is not set
1268# CONFIG_USB_ITMTOUCH is not set 1284# CONFIG_USB_YEALINK is not set
1269# CONFIG_USB_EGALAX is not set
1270# CONFIG_USB_XPAD is not set 1285# CONFIG_USB_XPAD is not set
1271# CONFIG_USB_ATI_REMOTE is not set 1286# CONFIG_USB_ATI_REMOTE is not set
1287# CONFIG_USB_ATI_REMOTE2 is not set
1272# CONFIG_USB_KEYSPAN_REMOTE is not set 1288# CONFIG_USB_KEYSPAN_REMOTE is not set
1289# CONFIG_USB_APPLETOUCH is not set
1273 1290
1274# 1291#
1275# USB Imaging devices 1292# USB Imaging devices
@@ -1278,15 +1295,6 @@ CONFIG_USB_HIDDEV=y
1278# CONFIG_USB_MICROTEK is not set 1295# CONFIG_USB_MICROTEK is not set
1279 1296
1280# 1297#
1281# USB Multimedia devices
1282#
1283# CONFIG_USB_DABUSB is not set
1284
1285#
1286# Video4Linux support is needed for USB Multimedia device support
1287#
1288
1289#
1290# USB Network Adapters 1298# USB Network Adapters
1291# 1299#
1292# CONFIG_USB_CATC is not set 1300# CONFIG_USB_CATC is not set
@@ -1294,7 +1302,6 @@ CONFIG_USB_HIDDEV=y
1294CONFIG_USB_PEGASUS=m 1302CONFIG_USB_PEGASUS=m
1295# CONFIG_USB_RTL8150 is not set 1303# CONFIG_USB_RTL8150 is not set
1296# CONFIG_USB_USBNET is not set 1304# CONFIG_USB_USBNET is not set
1297# CONFIG_USB_ZD1201 is not set
1298# CONFIG_USB_MON is not set 1305# CONFIG_USB_MON is not set
1299 1306
1300# 1307#
@@ -1308,6 +1315,7 @@ CONFIG_USB_PEGASUS=m
1308CONFIG_USB_SERIAL=m 1315CONFIG_USB_SERIAL=m
1309# CONFIG_USB_SERIAL_GENERIC is not set 1316# CONFIG_USB_SERIAL_GENERIC is not set
1310# CONFIG_USB_SERIAL_AIRPRIME is not set 1317# CONFIG_USB_SERIAL_AIRPRIME is not set
1318# CONFIG_USB_SERIAL_ARK3116 is not set
1311# CONFIG_USB_SERIAL_BELKIN is not set 1319# CONFIG_USB_SERIAL_BELKIN is not set
1312# CONFIG_USB_SERIAL_WHITEHEAT is not set 1320# CONFIG_USB_SERIAL_WHITEHEAT is not set
1313# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set 1321# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
@@ -1315,6 +1323,7 @@ CONFIG_USB_SERIAL=m
1315# CONFIG_USB_SERIAL_CYPRESS_M8 is not set 1323# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
1316# CONFIG_USB_SERIAL_EMPEG is not set 1324# CONFIG_USB_SERIAL_EMPEG is not set
1317# CONFIG_USB_SERIAL_FTDI_SIO is not set 1325# CONFIG_USB_SERIAL_FTDI_SIO is not set
1326# CONFIG_USB_SERIAL_FUNSOFT is not set
1318CONFIG_USB_SERIAL_VISOR=m 1327CONFIG_USB_SERIAL_VISOR=m
1319# CONFIG_USB_SERIAL_IPAQ is not set 1328# CONFIG_USB_SERIAL_IPAQ is not set
1320# CONFIG_USB_SERIAL_IR is not set 1329# CONFIG_USB_SERIAL_IR is not set
@@ -1339,9 +1348,11 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
1339# CONFIG_USB_SERIAL_KLSI is not set 1348# CONFIG_USB_SERIAL_KLSI is not set
1340# CONFIG_USB_SERIAL_KOBIL_SCT is not set 1349# CONFIG_USB_SERIAL_KOBIL_SCT is not set
1341# CONFIG_USB_SERIAL_MCT_U232 is not set 1350# CONFIG_USB_SERIAL_MCT_U232 is not set
1351# CONFIG_USB_SERIAL_NAVMAN is not set
1342# CONFIG_USB_SERIAL_PL2303 is not set 1352# CONFIG_USB_SERIAL_PL2303 is not set
1343# CONFIG_USB_SERIAL_HP4X is not set 1353# CONFIG_USB_SERIAL_HP4X is not set
1344# CONFIG_USB_SERIAL_SAFE is not set 1354# CONFIG_USB_SERIAL_SAFE is not set
1355# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
1345# CONFIG_USB_SERIAL_TI is not set 1356# CONFIG_USB_SERIAL_TI is not set
1346# CONFIG_USB_SERIAL_CYBERJACK is not set 1357# CONFIG_USB_SERIAL_CYBERJACK is not set
1347# CONFIG_USB_SERIAL_XIRCOM is not set 1358# CONFIG_USB_SERIAL_XIRCOM is not set
@@ -1359,10 +1370,12 @@ CONFIG_USB_EZUSB=y
1359# CONFIG_USB_LEGOTOWER is not set 1370# CONFIG_USB_LEGOTOWER is not set
1360# CONFIG_USB_LCD is not set 1371# CONFIG_USB_LCD is not set
1361# CONFIG_USB_LED is not set 1372# CONFIG_USB_LED is not set
1373# CONFIG_USB_CYPRESS_CY7C63 is not set
1362# CONFIG_USB_CYTHERM is not set 1374# CONFIG_USB_CYTHERM is not set
1363# CONFIG_USB_PHIDGETKIT is not set 1375# CONFIG_USB_PHIDGETKIT is not set
1364# CONFIG_USB_PHIDGETSERVO is not set 1376# CONFIG_USB_PHIDGETSERVO is not set
1365# CONFIG_USB_IDMOUSE is not set 1377# CONFIG_USB_IDMOUSE is not set
1378# CONFIG_USB_APPLEDISPLAY is not set
1366# CONFIG_USB_SISUSBVGA is not set 1379# CONFIG_USB_SISUSBVGA is not set
1367# CONFIG_USB_LD is not set 1380# CONFIG_USB_LD is not set
1368# CONFIG_USB_TEST is not set 1381# CONFIG_USB_TEST is not set
@@ -1382,12 +1395,43 @@ CONFIG_USB_EZUSB=y
1382# CONFIG_MMC is not set 1395# CONFIG_MMC is not set
1383 1396
1384# 1397#
1398# LED devices
1399#
1400# CONFIG_NEW_LEDS is not set
1401
1402#
1403# LED drivers
1404#
1405
1406#
1407# LED Triggers
1408#
1409
1410#
1385# InfiniBand support 1411# InfiniBand support
1386# 1412#
1387# CONFIG_INFINIBAND is not set 1413# CONFIG_INFINIBAND is not set
1388 1414
1389# 1415#
1390# SN Devices 1416# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1417#
1418
1419#
1420# Real Time Clock
1421#
1422# CONFIG_RTC_CLASS is not set
1423
1424#
1425# DMA Engine support
1426#
1427# CONFIG_DMA_ENGINE is not set
1428
1429#
1430# DMA Clients
1431#
1432
1433#
1434# DMA Devices
1391# 1435#
1392 1436
1393# 1437#
@@ -1417,23 +1461,21 @@ CONFIG_JFS_SECURITY=y
1417# CONFIG_JFS_DEBUG is not set 1461# CONFIG_JFS_DEBUG is not set
1418# CONFIG_JFS_STATISTICS is not set 1462# CONFIG_JFS_STATISTICS is not set
1419CONFIG_FS_POSIX_ACL=y 1463CONFIG_FS_POSIX_ACL=y
1420
1421#
1422# XFS support
1423#
1424CONFIG_XFS_FS=m 1464CONFIG_XFS_FS=m
1425CONFIG_XFS_EXPORT=y
1426# CONFIG_XFS_RT is not set
1427# CONFIG_XFS_QUOTA is not set 1465# CONFIG_XFS_QUOTA is not set
1428CONFIG_XFS_SECURITY=y 1466CONFIG_XFS_SECURITY=y
1429CONFIG_XFS_POSIX_ACL=y 1467CONFIG_XFS_POSIX_ACL=y
1468# CONFIG_XFS_RT is not set
1469# CONFIG_OCFS2_FS is not set
1430# CONFIG_MINIX_FS is not set 1470# CONFIG_MINIX_FS is not set
1431# CONFIG_ROMFS_FS is not set 1471# CONFIG_ROMFS_FS is not set
1432CONFIG_INOTIFY=y 1472CONFIG_INOTIFY=y
1473CONFIG_INOTIFY_USER=y
1433# CONFIG_QUOTA is not set 1474# CONFIG_QUOTA is not set
1434CONFIG_DNOTIFY=y 1475CONFIG_DNOTIFY=y
1435# CONFIG_AUTOFS_FS is not set 1476# CONFIG_AUTOFS_FS is not set
1436CONFIG_AUTOFS4_FS=m 1477CONFIG_AUTOFS4_FS=m
1478# CONFIG_FUSE_FS is not set
1437 1479
1438# 1480#
1439# CD-ROM/DVD Filesystems 1481# CD-ROM/DVD Filesystems
@@ -1460,13 +1502,10 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1460CONFIG_PROC_FS=y 1502CONFIG_PROC_FS=y
1461CONFIG_PROC_KCORE=y 1503CONFIG_PROC_KCORE=y
1462CONFIG_SYSFS=y 1504CONFIG_SYSFS=y
1463CONFIG_DEVPTS_FS_XATTR=y
1464CONFIG_DEVPTS_FS_SECURITY=y
1465CONFIG_TMPFS=y 1505CONFIG_TMPFS=y
1466CONFIG_TMPFS_XATTR=y
1467CONFIG_TMPFS_SECURITY=y
1468# CONFIG_HUGETLB_PAGE is not set 1506# CONFIG_HUGETLB_PAGE is not set
1469CONFIG_RAMFS=y 1507CONFIG_RAMFS=y
1508# CONFIG_CONFIGFS_FS is not set
1470 1509
1471# 1510#
1472# Miscellaneous filesystems 1511# Miscellaneous filesystems
@@ -1485,6 +1524,7 @@ CONFIG_CRAMFS=m
1485# CONFIG_SYSV_FS is not set 1524# CONFIG_SYSV_FS is not set
1486CONFIG_UFS_FS=m 1525CONFIG_UFS_FS=m
1487# CONFIG_UFS_FS_WRITE is not set 1526# CONFIG_UFS_FS_WRITE is not set
1527# CONFIG_UFS_DEBUG is not set
1488 1528
1489# 1529#
1490# Network File Systems 1530# Network File Systems
@@ -1513,6 +1553,7 @@ CONFIG_SUNRPC=y
1513# CONFIG_NCP_FS is not set 1553# CONFIG_NCP_FS is not set
1514# CONFIG_CODA_FS is not set 1554# CONFIG_CODA_FS is not set
1515# CONFIG_AFS_FS is not set 1555# CONFIG_AFS_FS is not set
1556# CONFIG_9P_FS is not set
1516 1557
1517# 1558#
1518# Partition Types 1559# Partition Types
@@ -1532,6 +1573,7 @@ CONFIG_MSDOS_PARTITION=y
1532# CONFIG_SGI_PARTITION is not set 1573# CONFIG_SGI_PARTITION is not set
1533# CONFIG_ULTRIX_PARTITION is not set 1574# CONFIG_ULTRIX_PARTITION is not set
1534# CONFIG_SUN_PARTITION is not set 1575# CONFIG_SUN_PARTITION is not set
1576# CONFIG_KARMA_PARTITION is not set
1535# CONFIG_EFI_PARTITION is not set 1577# CONFIG_EFI_PARTITION is not set
1536 1578
1537# 1579#
@@ -1582,33 +1624,44 @@ CONFIG_NLS_UTF8=m
1582# Library routines 1624# Library routines
1583# 1625#
1584CONFIG_CRC_CCITT=y 1626CONFIG_CRC_CCITT=y
1627# CONFIG_CRC16 is not set
1585CONFIG_CRC32=y 1628CONFIG_CRC32=y
1586# CONFIG_LIBCRC32C is not set 1629# CONFIG_LIBCRC32C is not set
1587CONFIG_ZLIB_INFLATE=y 1630CONFIG_ZLIB_INFLATE=y
1588CONFIG_ZLIB_DEFLATE=y 1631CONFIG_ZLIB_DEFLATE=y
1589 1632CONFIG_TEXTSEARCH=y
1590# 1633CONFIG_TEXTSEARCH_KMP=m
1591# Profiling support 1634CONFIG_TEXTSEARCH_BM=m
1592# 1635CONFIG_TEXTSEARCH_FSM=m
1636CONFIG_PLIST=y
1593# CONFIG_PROFILING is not set 1637# CONFIG_PROFILING is not set
1594 1638
1595# 1639#
1596# Kernel hacking 1640# Kernel hacking
1597# 1641#
1598# CONFIG_PRINTK_TIME is not set 1642# CONFIG_PRINTK_TIME is not set
1599CONFIG_DEBUG_KERNEL=y
1600CONFIG_MAGIC_SYSRQ=y 1643CONFIG_MAGIC_SYSRQ=y
1644# CONFIG_UNUSED_SYMBOLS is not set
1645CONFIG_DEBUG_KERNEL=y
1601CONFIG_LOG_BUF_SHIFT=14 1646CONFIG_LOG_BUF_SHIFT=14
1647CONFIG_DETECT_SOFTLOCKUP=y
1602# CONFIG_SCHEDSTATS is not set 1648# CONFIG_SCHEDSTATS is not set
1603# CONFIG_DEBUG_SLAB is not set 1649# CONFIG_DEBUG_SLAB is not set
1650# CONFIG_DEBUG_RT_MUTEXES is not set
1651# CONFIG_RT_MUTEX_TESTER is not set
1604# CONFIG_DEBUG_SPINLOCK is not set 1652# CONFIG_DEBUG_SPINLOCK is not set
1653# CONFIG_DEBUG_MUTEXES is not set
1654# CONFIG_DEBUG_RWSEMS is not set
1605# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1655# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1656# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1606# CONFIG_DEBUG_KOBJECT is not set 1657# CONFIG_DEBUG_KOBJECT is not set
1607# CONFIG_DEBUG_INFO is not set 1658# CONFIG_DEBUG_INFO is not set
1608# CONFIG_DEBUG_FS is not set 1659# CONFIG_DEBUG_FS is not set
1660# CONFIG_DEBUG_VM is not set
1661CONFIG_FORCED_INLINING=y
1662# CONFIG_RCU_TORTURE_TEST is not set
1609# CONFIG_XMON is not set 1663# CONFIG_XMON is not set
1610# CONFIG_BDI_SWITCH is not set 1664# CONFIG_BDI_SWITCH is not set
1611CONFIG_BOOTX_TEXT=y
1612 1665
1613# 1666#
1614# Security options 1667# Security options
diff --git a/arch/ppc/kernel/smp-tbsync.c b/arch/ppc/kernel/smp-tbsync.c
index 1576758debaf..d0cf3f86931d 100644
--- a/arch/ppc/kernel/smp-tbsync.c
+++ b/arch/ppc/kernel/smp-tbsync.c
@@ -47,8 +47,9 @@ void __devinit
47smp_generic_take_timebase( void ) 47smp_generic_take_timebase( void )
48{ 48{
49 int cmd, tbl, tbu; 49 int cmd, tbl, tbu;
50 unsigned long flags;
50 51
51 local_irq_disable(); 52 local_irq_save(flags);
52 while( !running ) 53 while( !running )
53 ; 54 ;
54 rmb(); 55 rmb();
@@ -64,7 +65,7 @@ smp_generic_take_timebase( void )
64 tbu = tbsync->tbu; 65 tbu = tbsync->tbu;
65 tbsync->ack = 0; 66 tbsync->ack = 0;
66 if( cmd == kExit ) 67 if( cmd == kExit )
67 return; 68 break;
68 69
69 if( cmd == kSetAndTest ) { 70 if( cmd == kSetAndTest ) {
70 while( tbsync->handshake ) 71 while( tbsync->handshake )
@@ -77,7 +78,7 @@ smp_generic_take_timebase( void )
77 } 78 }
78 enter_contest( tbsync->mark, -1 ); 79 enter_contest( tbsync->mark, -1 );
79 } 80 }
80 local_irq_enable(); 81 local_irq_restore(flags);
81} 82}
82 83
83static int __devinit 84static int __devinit
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile
index 2497bbc07e76..dca23f2ef851 100644
--- a/arch/ppc/syslib/Makefile
+++ b/arch/ppc/syslib/Makefile
@@ -93,7 +93,7 @@ obj-$(CONFIG_PCI) += pci_auto.o
93endif 93endif
94obj-$(CONFIG_RAPIDIO) += ppc85xx_rio.o 94obj-$(CONFIG_RAPIDIO) += ppc85xx_rio.o
95obj-$(CONFIG_83xx) += ppc83xx_setup.o ppc_sys.o \ 95obj-$(CONFIG_83xx) += ppc83xx_setup.o ppc_sys.o \
96 mpc83xx_sys.o mpc83xx_devices.o 96 mpc83xx_sys.o mpc83xx_devices.o ipic.o
97ifeq ($(CONFIG_83xx),y) 97ifeq ($(CONFIG_83xx),y)
98obj-$(CONFIG_PCI) += pci_auto.o 98obj-$(CONFIG_PCI) += pci_auto.o
99endif 99endif
diff --git a/arch/ppc/syslib/ipic.c b/arch/ppc/syslib/ipic.c
new file mode 100644
index 000000000000..46801f5ec03f
--- /dev/null
+++ b/arch/ppc/syslib/ipic.c
@@ -0,0 +1,646 @@
1/*
2 * include/asm-ppc/ipic.c
3 *
4 * IPIC routines implementations.
5 *
6 * Copyright 2005 Freescale Semiconductor, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 */
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/errno.h>
16#include <linux/reboot.h>
17#include <linux/slab.h>
18#include <linux/stddef.h>
19#include <linux/sched.h>
20#include <linux/signal.h>
21#include <linux/sysdev.h>
22#include <asm/irq.h>
23#include <asm/io.h>
24#include <asm/ipic.h>
25#include <asm/mpc83xx.h>
26
27#include "ipic.h"
28
29static struct ipic p_ipic;
30static struct ipic * primary_ipic;
31
32static struct ipic_info ipic_info[] = {
33 [9] = {
34 .pend = IPIC_SIPNR_H,
35 .mask = IPIC_SIMSR_H,
36 .prio = IPIC_SIPRR_D,
37 .force = IPIC_SIFCR_H,
38 .bit = 24,
39 .prio_mask = 0,
40 },
41 [10] = {
42 .pend = IPIC_SIPNR_H,
43 .mask = IPIC_SIMSR_H,
44 .prio = IPIC_SIPRR_D,
45 .force = IPIC_SIFCR_H,
46 .bit = 25,
47 .prio_mask = 1,
48 },
49 [11] = {
50 .pend = IPIC_SIPNR_H,
51 .mask = IPIC_SIMSR_H,
52 .prio = IPIC_SIPRR_D,
53 .force = IPIC_SIFCR_H,
54 .bit = 26,
55 .prio_mask = 2,
56 },
57 [14] = {
58 .pend = IPIC_SIPNR_H,
59 .mask = IPIC_SIMSR_H,
60 .prio = IPIC_SIPRR_D,
61 .force = IPIC_SIFCR_H,
62 .bit = 29,
63 .prio_mask = 5,
64 },
65 [15] = {
66 .pend = IPIC_SIPNR_H,
67 .mask = IPIC_SIMSR_H,
68 .prio = IPIC_SIPRR_D,
69 .force = IPIC_SIFCR_H,
70 .bit = 30,
71 .prio_mask = 6,
72 },
73 [16] = {
74 .pend = IPIC_SIPNR_H,
75 .mask = IPIC_SIMSR_H,
76 .prio = IPIC_SIPRR_D,
77 .force = IPIC_SIFCR_H,
78 .bit = 31,
79 .prio_mask = 7,
80 },
81 [17] = {
82 .pend = IPIC_SEPNR,
83 .mask = IPIC_SEMSR,
84 .prio = IPIC_SMPRR_A,
85 .force = IPIC_SEFCR,
86 .bit = 1,
87 .prio_mask = 5,
88 },
89 [18] = {
90 .pend = IPIC_SEPNR,
91 .mask = IPIC_SEMSR,
92 .prio = IPIC_SMPRR_A,
93 .force = IPIC_SEFCR,
94 .bit = 2,
95 .prio_mask = 6,
96 },
97 [19] = {
98 .pend = IPIC_SEPNR,
99 .mask = IPIC_SEMSR,
100 .prio = IPIC_SMPRR_A,
101 .force = IPIC_SEFCR,
102 .bit = 3,
103 .prio_mask = 7,
104 },
105 [20] = {
106 .pend = IPIC_SEPNR,
107 .mask = IPIC_SEMSR,
108 .prio = IPIC_SMPRR_B,
109 .force = IPIC_SEFCR,
110 .bit = 4,
111 .prio_mask = 4,
112 },
113 [21] = {
114 .pend = IPIC_SEPNR,
115 .mask = IPIC_SEMSR,
116 .prio = IPIC_SMPRR_B,
117 .force = IPIC_SEFCR,
118 .bit = 5,
119 .prio_mask = 5,
120 },
121 [22] = {
122 .pend = IPIC_SEPNR,
123 .mask = IPIC_SEMSR,
124 .prio = IPIC_SMPRR_B,
125 .force = IPIC_SEFCR,
126 .bit = 6,
127 .prio_mask = 6,
128 },
129 [23] = {
130 .pend = IPIC_SEPNR,
131 .mask = IPIC_SEMSR,
132 .prio = IPIC_SMPRR_B,
133 .force = IPIC_SEFCR,
134 .bit = 7,
135 .prio_mask = 7,
136 },
137 [32] = {
138 .pend = IPIC_SIPNR_H,
139 .mask = IPIC_SIMSR_H,
140 .prio = IPIC_SIPRR_A,
141 .force = IPIC_SIFCR_H,
142 .bit = 0,
143 .prio_mask = 0,
144 },
145 [33] = {
146 .pend = IPIC_SIPNR_H,
147 .mask = IPIC_SIMSR_H,
148 .prio = IPIC_SIPRR_A,
149 .force = IPIC_SIFCR_H,
150 .bit = 1,
151 .prio_mask = 1,
152 },
153 [34] = {
154 .pend = IPIC_SIPNR_H,
155 .mask = IPIC_SIMSR_H,
156 .prio = IPIC_SIPRR_A,
157 .force = IPIC_SIFCR_H,
158 .bit = 2,
159 .prio_mask = 2,
160 },
161 [35] = {
162 .pend = IPIC_SIPNR_H,
163 .mask = IPIC_SIMSR_H,
164 .prio = IPIC_SIPRR_A,
165 .force = IPIC_SIFCR_H,
166 .bit = 3,
167 .prio_mask = 3,
168 },
169 [36] = {
170 .pend = IPIC_SIPNR_H,
171 .mask = IPIC_SIMSR_H,
172 .prio = IPIC_SIPRR_A,
173 .force = IPIC_SIFCR_H,
174 .bit = 4,
175 .prio_mask = 4,
176 },
177 [37] = {
178 .pend = IPIC_SIPNR_H,
179 .mask = IPIC_SIMSR_H,
180 .prio = IPIC_SIPRR_A,
181 .force = IPIC_SIFCR_H,
182 .bit = 5,
183 .prio_mask = 5,
184 },
185 [38] = {
186 .pend = IPIC_SIPNR_H,
187 .mask = IPIC_SIMSR_H,
188 .prio = IPIC_SIPRR_A,
189 .force = IPIC_SIFCR_H,
190 .bit = 6,
191 .prio_mask = 6,
192 },
193 [39] = {
194 .pend = IPIC_SIPNR_H,
195 .mask = IPIC_SIMSR_H,
196 .prio = IPIC_SIPRR_A,
197 .force = IPIC_SIFCR_H,
198 .bit = 7,
199 .prio_mask = 7,
200 },
201 [48] = {
202 .pend = IPIC_SEPNR,
203 .mask = IPIC_SEMSR,
204 .prio = IPIC_SMPRR_A,
205 .force = IPIC_SEFCR,
206 .bit = 0,
207 .prio_mask = 4,
208 },
209 [64] = {
210 .pend = IPIC_SIPNR_H,
211 .mask = IPIC_SIMSR_L,
212 .prio = IPIC_SMPRR_A,
213 .force = IPIC_SIFCR_L,
214 .bit = 0,
215 .prio_mask = 0,
216 },
217 [65] = {
218 .pend = IPIC_SIPNR_H,
219 .mask = IPIC_SIMSR_L,
220 .prio = IPIC_SMPRR_A,
221 .force = IPIC_SIFCR_L,
222 .bit = 1,
223 .prio_mask = 1,
224 },
225 [66] = {
226 .pend = IPIC_SIPNR_H,
227 .mask = IPIC_SIMSR_L,
228 .prio = IPIC_SMPRR_A,
229 .force = IPIC_SIFCR_L,
230 .bit = 2,
231 .prio_mask = 2,
232 },
233 [67] = {
234 .pend = IPIC_SIPNR_H,
235 .mask = IPIC_SIMSR_L,
236 .prio = IPIC_SMPRR_A,
237 .force = IPIC_SIFCR_L,
238 .bit = 3,
239 .prio_mask = 3,
240 },
241 [68] = {
242 .pend = IPIC_SIPNR_H,
243 .mask = IPIC_SIMSR_L,
244 .prio = IPIC_SMPRR_B,
245 .force = IPIC_SIFCR_L,
246 .bit = 4,
247 .prio_mask = 0,
248 },
249 [69] = {
250 .pend = IPIC_SIPNR_H,
251 .mask = IPIC_SIMSR_L,
252 .prio = IPIC_SMPRR_B,
253 .force = IPIC_SIFCR_L,
254 .bit = 5,
255 .prio_mask = 1,
256 },
257 [70] = {
258 .pend = IPIC_SIPNR_H,
259 .mask = IPIC_SIMSR_L,
260 .prio = IPIC_SMPRR_B,
261 .force = IPIC_SIFCR_L,
262 .bit = 6,
263 .prio_mask = 2,
264 },
265 [71] = {
266 .pend = IPIC_SIPNR_H,
267 .mask = IPIC_SIMSR_L,
268 .prio = IPIC_SMPRR_B,
269 .force = IPIC_SIFCR_L,
270 .bit = 7,
271 .prio_mask = 3,
272 },
273 [72] = {
274 .pend = IPIC_SIPNR_H,
275 .mask = IPIC_SIMSR_L,
276 .prio = 0,
277 .force = IPIC_SIFCR_L,
278 .bit = 8,
279 },
280 [73] = {
281 .pend = IPIC_SIPNR_H,
282 .mask = IPIC_SIMSR_L,
283 .prio = 0,
284 .force = IPIC_SIFCR_L,
285 .bit = 9,
286 },
287 [74] = {
288 .pend = IPIC_SIPNR_H,
289 .mask = IPIC_SIMSR_L,
290 .prio = 0,
291 .force = IPIC_SIFCR_L,
292 .bit = 10,
293 },
294 [75] = {
295 .pend = IPIC_SIPNR_H,
296 .mask = IPIC_SIMSR_L,
297 .prio = 0,
298 .force = IPIC_SIFCR_L,
299 .bit = 11,
300 },
301 [76] = {
302 .pend = IPIC_SIPNR_H,
303 .mask = IPIC_SIMSR_L,
304 .prio = 0,
305 .force = IPIC_SIFCR_L,
306 .bit = 12,
307 },
308 [77] = {
309 .pend = IPIC_SIPNR_H,
310 .mask = IPIC_SIMSR_L,
311 .prio = 0,
312 .force = IPIC_SIFCR_L,
313 .bit = 13,
314 },
315 [78] = {
316 .pend = IPIC_SIPNR_H,
317 .mask = IPIC_SIMSR_L,
318 .prio = 0,
319 .force = IPIC_SIFCR_L,
320 .bit = 14,
321 },
322 [79] = {
323 .pend = IPIC_SIPNR_H,
324 .mask = IPIC_SIMSR_L,
325 .prio = 0,
326 .force = IPIC_SIFCR_L,
327 .bit = 15,
328 },
329 [80] = {
330 .pend = IPIC_SIPNR_H,
331 .mask = IPIC_SIMSR_L,
332 .prio = 0,
333 .force = IPIC_SIFCR_L,
334 .bit = 16,
335 },
336 [84] = {
337 .pend = IPIC_SIPNR_H,
338 .mask = IPIC_SIMSR_L,
339 .prio = 0,
340 .force = IPIC_SIFCR_L,
341 .bit = 20,
342 },
343 [85] = {
344 .pend = IPIC_SIPNR_H,
345 .mask = IPIC_SIMSR_L,
346 .prio = 0,
347 .force = IPIC_SIFCR_L,
348 .bit = 21,
349 },
350 [90] = {
351 .pend = IPIC_SIPNR_H,
352 .mask = IPIC_SIMSR_L,
353 .prio = 0,
354 .force = IPIC_SIFCR_L,
355 .bit = 26,
356 },
357 [91] = {
358 .pend = IPIC_SIPNR_H,
359 .mask = IPIC_SIMSR_L,
360 .prio = 0,
361 .force = IPIC_SIFCR_L,
362 .bit = 27,
363 },
364};
365
366static inline u32 ipic_read(volatile u32 __iomem *base, unsigned int reg)
367{
368 return in_be32(base + (reg >> 2));
369}
370
371static inline void ipic_write(volatile u32 __iomem *base, unsigned int reg, u32 value)
372{
373 out_be32(base + (reg >> 2), value);
374}
375
376static inline struct ipic * ipic_from_irq(unsigned int irq)
377{
378 return primary_ipic;
379}
380
381static void ipic_enable_irq(unsigned int irq)
382{
383 struct ipic *ipic = ipic_from_irq(irq);
384 unsigned int src = irq - ipic->irq_offset;
385 u32 temp;
386
387 temp = ipic_read(ipic->regs, ipic_info[src].mask);
388 temp |= (1 << (31 - ipic_info[src].bit));
389 ipic_write(ipic->regs, ipic_info[src].mask, temp);
390}
391
392static void ipic_disable_irq(unsigned int irq)
393{
394 struct ipic *ipic = ipic_from_irq(irq);
395 unsigned int src = irq - ipic->irq_offset;
396 u32 temp;
397
398 temp = ipic_read(ipic->regs, ipic_info[src].mask);
399 temp &= ~(1 << (31 - ipic_info[src].bit));
400 ipic_write(ipic->regs, ipic_info[src].mask, temp);
401}
402
403static void ipic_disable_irq_and_ack(unsigned int irq)
404{
405 struct ipic *ipic = ipic_from_irq(irq);
406 unsigned int src = irq - ipic->irq_offset;
407 u32 temp;
408
409 ipic_disable_irq(irq);
410
411 temp = ipic_read(ipic->regs, ipic_info[src].pend);
412 temp |= (1 << (31 - ipic_info[src].bit));
413 ipic_write(ipic->regs, ipic_info[src].pend, temp);
414}
415
416static void ipic_end_irq(unsigned int irq)
417{
418 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
419 ipic_enable_irq(irq);
420}
421
422struct hw_interrupt_type ipic = {
423 .typename = " IPIC ",
424 .enable = ipic_enable_irq,
425 .disable = ipic_disable_irq,
426 .ack = ipic_disable_irq_and_ack,
427 .end = ipic_end_irq,
428};
429
430void __init ipic_init(phys_addr_t phys_addr,
431 unsigned int flags,
432 unsigned int irq_offset,
433 unsigned char *senses,
434 unsigned int senses_count)
435{
436 u32 i, temp = 0;
437
438 primary_ipic = &p_ipic;
439 primary_ipic->regs = ioremap(phys_addr, MPC83xx_IPIC_SIZE);
440
441 primary_ipic->irq_offset = irq_offset;
442
443 ipic_write(primary_ipic->regs, IPIC_SICNR, 0x0);
444
445 /* default priority scheme is grouped. If spread mode is required
446 * configure SICFR accordingly */
447 if (flags & IPIC_SPREADMODE_GRP_A)
448 temp |= SICFR_IPSA;
449 if (flags & IPIC_SPREADMODE_GRP_D)
450 temp |= SICFR_IPSD;
451 if (flags & IPIC_SPREADMODE_MIX_A)
452 temp |= SICFR_MPSA;
453 if (flags & IPIC_SPREADMODE_MIX_B)
454 temp |= SICFR_MPSB;
455
456 ipic_write(primary_ipic->regs, IPIC_SICNR, temp);
457
458 /* handle MCP route */
459 temp = 0;
460 if (flags & IPIC_DISABLE_MCP_OUT)
461 temp = SERCR_MCPR;
462 ipic_write(primary_ipic->regs, IPIC_SERCR, temp);
463
464 /* handle routing of IRQ0 to MCP */
465 temp = ipic_read(primary_ipic->regs, IPIC_SEMSR);
466
467 if (flags & IPIC_IRQ0_MCP)
468 temp |= SEMSR_SIRQ0;
469 else
470 temp &= ~SEMSR_SIRQ0;
471
472 ipic_write(primary_ipic->regs, IPIC_SEMSR, temp);
473
474 for (i = 0 ; i < NR_IPIC_INTS ; i++) {
475 irq_desc[i+irq_offset].chip = &ipic;
476 irq_desc[i+irq_offset].status = IRQ_LEVEL;
477 }
478
479 temp = 0;
480 for (i = 0 ; i < senses_count ; i++) {
481 if ((senses[i] & IRQ_SENSE_MASK) == IRQ_SENSE_EDGE) {
482 temp |= 1 << (15 - i);
483 if (i != 0)
484 irq_desc[i + irq_offset + MPC83xx_IRQ_EXT1 - 1].status = 0;
485 else
486 irq_desc[irq_offset + MPC83xx_IRQ_EXT0].status = 0;
487 }
488 }
489 ipic_write(primary_ipic->regs, IPIC_SECNR, temp);
490
491 printk ("IPIC (%d IRQ sources, %d External IRQs) at %p\n", NR_IPIC_INTS,
492 senses_count, primary_ipic->regs);
493}
494
495int ipic_set_priority(unsigned int irq, unsigned int priority)
496{
497 struct ipic *ipic = ipic_from_irq(irq);
498 unsigned int src = irq - ipic->irq_offset;
499 u32 temp;
500
501 if (priority > 7)
502 return -EINVAL;
503 if (src > 127)
504 return -EINVAL;
505 if (ipic_info[src].prio == 0)
506 return -EINVAL;
507
508 temp = ipic_read(ipic->regs, ipic_info[src].prio);
509
510 if (priority < 4) {
511 temp &= ~(0x7 << (20 + (3 - priority) * 3));
512 temp |= ipic_info[src].prio_mask << (20 + (3 - priority) * 3);
513 } else {
514 temp &= ~(0x7 << (4 + (7 - priority) * 3));
515 temp |= ipic_info[src].prio_mask << (4 + (7 - priority) * 3);
516 }
517
518 ipic_write(ipic->regs, ipic_info[src].prio, temp);
519
520 return 0;
521}
522
523void ipic_set_highest_priority(unsigned int irq)
524{
525 struct ipic *ipic = ipic_from_irq(irq);
526 unsigned int src = irq - ipic->irq_offset;
527 u32 temp;
528
529 temp = ipic_read(ipic->regs, IPIC_SICFR);
530
531 /* clear and set HPI */
532 temp &= 0x7f000000;
533 temp |= (src & 0x7f) << 24;
534
535 ipic_write(ipic->regs, IPIC_SICFR, temp);
536}
537
538void ipic_set_default_priority(void)
539{
540 ipic_set_priority(MPC83xx_IRQ_TSEC1_TX, 0);
541 ipic_set_priority(MPC83xx_IRQ_TSEC1_RX, 1);
542 ipic_set_priority(MPC83xx_IRQ_TSEC1_ERROR, 2);
543 ipic_set_priority(MPC83xx_IRQ_TSEC2_TX, 3);
544 ipic_set_priority(MPC83xx_IRQ_TSEC2_RX, 4);
545 ipic_set_priority(MPC83xx_IRQ_TSEC2_ERROR, 5);
546 ipic_set_priority(MPC83xx_IRQ_USB2_DR, 6);
547 ipic_set_priority(MPC83xx_IRQ_USB2_MPH, 7);
548
549 ipic_set_priority(MPC83xx_IRQ_UART1, 0);
550 ipic_set_priority(MPC83xx_IRQ_UART2, 1);
551 ipic_set_priority(MPC83xx_IRQ_SEC2, 2);
552 ipic_set_priority(MPC83xx_IRQ_IIC1, 5);
553 ipic_set_priority(MPC83xx_IRQ_IIC2, 6);
554 ipic_set_priority(MPC83xx_IRQ_SPI, 7);
555 ipic_set_priority(MPC83xx_IRQ_RTC_SEC, 0);
556 ipic_set_priority(MPC83xx_IRQ_PIT, 1);
557 ipic_set_priority(MPC83xx_IRQ_PCI1, 2);
558 ipic_set_priority(MPC83xx_IRQ_PCI2, 3);
559 ipic_set_priority(MPC83xx_IRQ_EXT0, 4);
560 ipic_set_priority(MPC83xx_IRQ_EXT1, 5);
561 ipic_set_priority(MPC83xx_IRQ_EXT2, 6);
562 ipic_set_priority(MPC83xx_IRQ_EXT3, 7);
563 ipic_set_priority(MPC83xx_IRQ_RTC_ALR, 0);
564 ipic_set_priority(MPC83xx_IRQ_MU, 1);
565 ipic_set_priority(MPC83xx_IRQ_SBA, 2);
566 ipic_set_priority(MPC83xx_IRQ_DMA, 3);
567 ipic_set_priority(MPC83xx_IRQ_EXT4, 4);
568 ipic_set_priority(MPC83xx_IRQ_EXT5, 5);
569 ipic_set_priority(MPC83xx_IRQ_EXT6, 6);
570 ipic_set_priority(MPC83xx_IRQ_EXT7, 7);
571}
572
573void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq)
574{
575 struct ipic *ipic = primary_ipic;
576 u32 temp;
577
578 temp = ipic_read(ipic->regs, IPIC_SERMR);
579 temp |= (1 << (31 - mcp_irq));
580 ipic_write(ipic->regs, IPIC_SERMR, temp);
581}
582
583void ipic_disable_mcp(enum ipic_mcp_irq mcp_irq)
584{
585 struct ipic *ipic = primary_ipic;
586 u32 temp;
587
588 temp = ipic_read(ipic->regs, IPIC_SERMR);
589 temp &= (1 << (31 - mcp_irq));
590 ipic_write(ipic->regs, IPIC_SERMR, temp);
591}
592
593u32 ipic_get_mcp_status(void)
594{
595 return ipic_read(primary_ipic->regs, IPIC_SERMR);
596}
597
598void ipic_clear_mcp_status(u32 mask)
599{
600 ipic_write(primary_ipic->regs, IPIC_SERMR, mask);
601}
602
603/* Return an interrupt vector or -1 if no interrupt is pending. */
604int ipic_get_irq(struct pt_regs *regs)
605{
606 int irq;
607
608 irq = ipic_read(primary_ipic->regs, IPIC_SIVCR) & 0x7f;
609
610 if (irq == 0) /* 0 --> no irq is pending */
611 irq = -1;
612
613 return irq;
614}
615
616static struct sysdev_class ipic_sysclass = {
617 set_kset_name("ipic"),
618};
619
620static struct sys_device device_ipic = {
621 .id = 0,
622 .cls = &ipic_sysclass,
623};
624
625static int __init init_ipic_sysfs(void)
626{
627 int rc;
628
629 if (!primary_ipic->regs)
630 return -ENODEV;
631 printk(KERN_DEBUG "Registering ipic with sysfs...\n");
632
633 rc = sysdev_class_register(&ipic_sysclass);
634 if (rc) {
635 printk(KERN_ERR "Failed registering ipic sys class\n");
636 return -ENODEV;
637 }
638 rc = sysdev_register(&device_ipic);
639 if (rc) {
640 printk(KERN_ERR "Failed registering ipic sys device\n");
641 return -ENODEV;
642 }
643 return 0;
644}
645
646subsys_initcall(init_ipic_sysfs);
diff --git a/arch/ppc/syslib/ipic.h b/arch/ppc/syslib/ipic.h
new file mode 100644
index 000000000000..a60c9d18bb7f
--- /dev/null
+++ b/arch/ppc/syslib/ipic.h
@@ -0,0 +1,47 @@
1/*
2 * IPIC private definitions and structure.
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2005 Freescale Semiconductor, Inc
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 */
13#ifndef __IPIC_H__
14#define __IPIC_H__
15
16#include <asm/ipic.h>
17
18#define MPC83xx_IPIC_SIZE (0x00100)
19
20/* System Global Interrupt Configuration Register */
21#define SICFR_IPSA 0x00010000
22#define SICFR_IPSD 0x00080000
23#define SICFR_MPSA 0x00200000
24#define SICFR_MPSB 0x00400000
25
26/* System External Interrupt Mask Register */
27#define SEMSR_SIRQ0 0x00008000
28
29/* System Error Control Register */
30#define SERCR_MCPR 0x00000001
31
32struct ipic {
33 volatile u32 __iomem *regs;
34 unsigned int irq_offset;
35};
36
37struct ipic_info {
38 u8 pend; /* pending register offset from base */
39 u8 mask; /* mask register offset from base */
40 u8 prio; /* priority register offset from base */
41 u8 force; /* force register offset from base */
42 u8 bit; /* register bit position (as per doc)
43 bit mask = 1 << (31 - bit) */
44 u8 prio_mask; /* priority mask value */
45};
46
47#endif /* __IPIC_H__ */
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index ae071a11ce71..2f4f70c4dbb2 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -118,6 +118,10 @@ config SYSVIPC_COMPAT
118 depends on COMPAT && SYSVIPC 118 depends on COMPAT && SYSVIPC
119 default y 119 default y
120 120
121config AUDIT_ARCH
122 bool
123 default y
124
121comment "Code generation options" 125comment "Code generation options"
122 126
123choice 127choice
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile
index 86601a945709..9a33ed6ca696 100644
--- a/arch/s390/kernel/Makefile
+++ b/arch/s390/kernel/Makefile
@@ -16,9 +16,11 @@ extra-y += head.o init_task.o vmlinux.lds
16obj-$(CONFIG_MODULES) += s390_ksyms.o module.o 16obj-$(CONFIG_MODULES) += s390_ksyms.o module.o
17obj-$(CONFIG_SMP) += smp.o 17obj-$(CONFIG_SMP) += smp.o
18 18
19obj-$(CONFIG_AUDIT) += audit.o
20compat-obj-$(CONFIG_AUDIT) += compat_audit.o
19obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o \ 21obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o \
20 compat_wrapper.o compat_exec_domain.o \ 22 compat_wrapper.o compat_exec_domain.o \
21 binfmt_elf32.o 23 binfmt_elf32.o $(compat-obj-y)
22 24
23obj-$(CONFIG_VIRT_TIMER) += vtime.o 25obj-$(CONFIG_VIRT_TIMER) += vtime.o
24obj-$(CONFIG_STACKTRACE) += stacktrace.o 26obj-$(CONFIG_STACKTRACE) += stacktrace.o
diff --git a/arch/s390/kernel/audit.c b/arch/s390/kernel/audit.c
new file mode 100644
index 000000000000..0741d9193390
--- /dev/null
+++ b/arch/s390/kernel/audit.c
@@ -0,0 +1,66 @@
1#include <linux/init.h>
2#include <linux/types.h>
3#include <linux/audit.h>
4#include <asm/unistd.h>
5
6static unsigned dir_class[] = {
7#include <asm-generic/audit_dir_write.h>
8~0U
9};
10
11static unsigned read_class[] = {
12#include <asm-generic/audit_read.h>
13~0U
14};
15
16static unsigned write_class[] = {
17#include <asm-generic/audit_write.h>
18~0U
19};
20
21static unsigned chattr_class[] = {
22#include <asm-generic/audit_change_attr.h>
23~0U
24};
25
26int audit_classify_syscall(int abi, unsigned syscall)
27{
28#ifdef CONFIG_COMPAT
29 extern int s390_classify_syscall(unsigned);
30 if (abi == AUDIT_ARCH_S390)
31 return s390_classify_syscall(syscall);
32#endif
33 switch(syscall) {
34 case __NR_open:
35 return 2;
36 case __NR_openat:
37 return 3;
38 case __NR_socketcall:
39 return 4;
40 case __NR_execve:
41 return 5;
42 default:
43 return 0;
44 }
45}
46
47static int __init audit_classes_init(void)
48{
49#ifdef CONFIG_COMPAT
50 extern __u32 s390_dir_class[];
51 extern __u32 s390_write_class[];
52 extern __u32 s390_read_class[];
53 extern __u32 s390_chattr_class[];
54 audit_register_class(AUDIT_CLASS_WRITE_32, s390_write_class);
55 audit_register_class(AUDIT_CLASS_READ_32, s390_read_class);
56 audit_register_class(AUDIT_CLASS_DIR_WRITE_32, s390_dir_class);
57 audit_register_class(AUDIT_CLASS_CHATTR_32, s390_chattr_class);
58#endif
59 audit_register_class(AUDIT_CLASS_WRITE, write_class);
60 audit_register_class(AUDIT_CLASS_READ, read_class);
61 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class);
62 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class);
63 return 0;
64}
65
66__initcall(audit_classes_init);
diff --git a/arch/s390/kernel/compat_audit.c b/arch/s390/kernel/compat_audit.c
new file mode 100644
index 000000000000..16d9436bfa91
--- /dev/null
+++ b/arch/s390/kernel/compat_audit.c
@@ -0,0 +1,38 @@
1#undef __s390x__
2#include <asm/unistd.h>
3
4unsigned s390_dir_class[] = {
5#include <asm-generic/audit_dir_write.h>
6~0U
7};
8
9unsigned s390_chattr_class[] = {
10#include <asm-generic/audit_change_attr.h>
11~0U
12};
13
14unsigned s390_write_class[] = {
15#include <asm-generic/audit_write.h>
16~0U
17};
18
19unsigned s390_read_class[] = {
20#include <asm-generic/audit_read.h>
21~0U
22};
23
24int s390_classify_syscall(unsigned syscall)
25{
26 switch(syscall) {
27 case __NR_open:
28 return 2;
29 case __NR_openat:
30 return 3;
31 case __NR_socketcall:
32 return 4;
33 case __NR_execve:
34 return 5;
35 default:
36 return 1;
37 }
38}
diff --git a/arch/s390/lib/uaccess.S b/arch/s390/lib/uaccess.S
index 5d59e2625048..837275284d9f 100644
--- a/arch/s390/lib/uaccess.S
+++ b/arch/s390/lib/uaccess.S
@@ -88,30 +88,31 @@ __copy_to_user_asm:
88 .globl __copy_in_user_asm 88 .globl __copy_in_user_asm
89 # %r2 = from, %r3 = n, %r4 = to 89 # %r2 = from, %r3 = n, %r4 = to
90__copy_in_user_asm: 90__copy_in_user_asm:
91 ahi %r3,-1
92 jo 6f
91 sacf 256 93 sacf 256
92 bras 1,1f 94 bras %r1,4f
93 mvc 0(1,%r4),0(%r2) 950: ahi %r3,257
940: mvc 0(256,%r4),0(%r2) 961: mvc 0(1,%r4),0(%r2)
95 la %r2,256(%r2)
96 la %r4,256(%r4)
971: ahi %r3,-256
98 jnm 0b
992: ex %r3,0(%r1)
100 sacf 0
101 slr %r2,%r2
102 br 14
1033: mvc 0(1,%r4),0(%r2)
104 la %r2,1(%r2) 97 la %r2,1(%r2)
105 la %r4,1(%r4) 98 la %r4,1(%r4)
106 ahi %r3,-1 99 ahi %r3,-1
100 jnz 1b
1012: lr %r2,%r3
102 br %r14
1033: mvc 0(256,%r4),0(%r2)
104 la %r2,256(%r2)
105 la %r4,256(%r4)
1064: ahi %r3,-256
107 jnm 3b 107 jnm 3b
1084: lr %r2,%r3 1085: ex %r3,4(%r1)
109 sacf 0 109 sacf 0
1106: slr %r2,%r2
110 br %r14 111 br %r14
111 .section __ex_table,"a" 112 .section __ex_table,"a"
112 .long 0b,3b 113 .long 1b,2b
113 .long 2b,3b 114 .long 3b,0b
114 .long 3b,4b 115 .long 5b,0b
115 .previous 116 .previous
116 117
117 .align 4 118 .align 4
diff --git a/arch/s390/lib/uaccess64.S b/arch/s390/lib/uaccess64.S
index 19b41a33c230..1f755be22f92 100644
--- a/arch/s390/lib/uaccess64.S
+++ b/arch/s390/lib/uaccess64.S
@@ -88,30 +88,31 @@ __copy_to_user_asm:
88 .globl __copy_in_user_asm 88 .globl __copy_in_user_asm
89 # %r2 = from, %r3 = n, %r4 = to 89 # %r2 = from, %r3 = n, %r4 = to
90__copy_in_user_asm: 90__copy_in_user_asm:
91 aghi %r3,-1
92 jo 6f
91 sacf 256 93 sacf 256
92 bras 1,1f 94 bras %r1,4f
93 mvc 0(1,%r4),0(%r2) 950: aghi %r3,257
940: mvc 0(256,%r4),0(%r2) 961: mvc 0(1,%r4),0(%r2)
95 la %r2,256(%r2)
96 la %r4,256(%r4)
971: aghi %r3,-256
98 jnm 0b
992: ex %r3,0(%r1)
100 sacf 0
101 slgr %r2,%r2
102 br 14
1033: mvc 0(1,%r4),0(%r2)
104 la %r2,1(%r2) 97 la %r2,1(%r2)
105 la %r4,1(%r4) 98 la %r4,1(%r4)
106 aghi %r3,-1 99 aghi %r3,-1
100 jnz 1b
1012: lgr %r2,%r3
102 br %r14
1033: mvc 0(256,%r4),0(%r2)
104 la %r2,256(%r2)
105 la %r4,256(%r4)
1064: aghi %r3,-256
107 jnm 3b 107 jnm 3b
1084: lgr %r2,%r3 1085: ex %r3,4(%r1)
109 sacf 0 109 sacf 0
110 br %r14 1106: slgr %r2,%r2
111 br 14
111 .section __ex_table,"a" 112 .section __ex_table,"a"
112 .quad 0b,3b 113 .quad 1b,2b
113 .quad 2b,3b 114 .quad 3b,0b
114 .quad 3b,4b 115 .quad 5b,0b
115 .previous 116 .previous
116 117
117 .align 4 118 .align 4
diff --git a/arch/sh64/Makefile b/arch/sh64/Makefile
index 8ca57ffa2b70..ebf20043991c 100644
--- a/arch/sh64/Makefile
+++ b/arch/sh64/Makefile
@@ -26,7 +26,6 @@ LDFLAGS += -EB -mshelf32_linux
26endif 26endif
27 27
28# No requirements for endianess support from AFLAGS, 'as' always run through gcc 28# No requirements for endianess support from AFLAGS, 'as' always run through gcc
29AFLAGS += -m5 -isa=sh64 -traditional
30CFLAGS += $(cpu-y) 29CFLAGS += $(cpu-y)
31 30
32LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \ 31LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \
diff --git a/arch/sh64/kernel/process.c b/arch/sh64/kernel/process.c
index dba8e14013b6..db475b7833fb 100644
--- a/arch/sh64/kernel/process.c
+++ b/arch/sh64/kernel/process.c
@@ -355,6 +355,9 @@ void machine_power_off(void)
355 enter_deep_standby(); 355 enter_deep_standby();
356} 356}
357 357
358void (*pm_power_off)(void) = machine_power_off;
359EXPORT_SYMBOL(pm_power_off);
360
358void show_regs(struct pt_regs * regs) 361void show_regs(struct pt_regs * regs)
359{ 362{
360 unsigned long long ah, al, bh, bl, ch, cl; 363 unsigned long long ah, al, bh, bl, ch, cl;
diff --git a/arch/sh64/mach-cayman/setup.c b/arch/sh64/mach-cayman/setup.c
index d84895dda3cd..3ed87cd059d0 100644
--- a/arch/sh64/mach-cayman/setup.c
+++ b/arch/sh64/mach-cayman/setup.c
@@ -112,8 +112,10 @@ struct resource io_resources[] = {
112}; 112};
113 113
114struct resource kram_resources[] = { 114struct resource kram_resources[] = {
115 { "Kernel code", 0, 0 }, /* These must be last in the array */ 115 /* These must be last in the array */
116 { "Kernel data", 0, 0 } /* These must be last in the array */ 116 { .name = "Kernel code", .start = 0, .end = 0 },
117 /* These must be last in the array */
118 { .name = "Kernel data", .start = 0, .end = 0 }
117}; 119};
118 120
119struct resource xram_resources[] = { 121struct resource xram_resources[] = {
diff --git a/arch/sh64/mm/ioremap.c b/arch/sh64/mm/ioremap.c
index fb1866fa2c9d..80c56754f513 100644
--- a/arch/sh64/mm/ioremap.c
+++ b/arch/sh64/mm/ioremap.c
@@ -449,7 +449,9 @@ ioremap_proc_info(char *buf, char **start, off_t fpos, int length, int *eof,
449 if (p + 32 >= e) /* Better than nothing */ 449 if (p + 32 >= e) /* Better than nothing */
450 break; 450 break;
451 if ((nm = r->name) == 0) nm = "???"; 451 if ((nm = r->name) == 0) nm = "???";
452 p += sprintf(p, "%08lx-%08lx: %s\n", r->start, r->end, nm); 452 p += sprintf(p, "%08lx-%08lx: %s\n",
453 (unsigned long)r->start,
454 (unsigned long)r->end, nm);
453 } 455 }
454 456
455 return p-buf; 457 return p-buf;
diff --git a/arch/sparc/kernel/sys_sparc.c b/arch/sparc/kernel/sys_sparc.c
index a41c8a5c2007..896863fb208a 100644
--- a/arch/sparc/kernel/sys_sparc.c
+++ b/arch/sparc/kernel/sys_sparc.c
@@ -219,6 +219,21 @@ out:
219 return err; 219 return err;
220} 220}
221 221
222int sparc_mmap_check(unsigned long addr, unsigned long len, unsigned long flags)
223{
224 if (ARCH_SUN4C_SUN4 &&
225 (len > 0x20000000 ||
226 ((flags & MAP_FIXED) &&
227 addr < 0xe0000000 && addr + len > 0x20000000)))
228 return -EINVAL;
229
230 /* See asm-sparc/uaccess.h */
231 if (len > TASK_SIZE - PAGE_SIZE || addr + len > TASK_SIZE - PAGE_SIZE)
232 return -EINVAL;
233
234 return 0;
235}
236
222/* Linux version of mmap */ 237/* Linux version of mmap */
223static unsigned long do_mmap2(unsigned long addr, unsigned long len, 238static unsigned long do_mmap2(unsigned long addr, unsigned long len,
224 unsigned long prot, unsigned long flags, unsigned long fd, 239 unsigned long prot, unsigned long flags, unsigned long fd,
@@ -233,25 +248,13 @@ static unsigned long do_mmap2(unsigned long addr, unsigned long len,
233 goto out; 248 goto out;
234 } 249 }
235 250
236 retval = -EINVAL;
237 len = PAGE_ALIGN(len); 251 len = PAGE_ALIGN(len);
238 if (ARCH_SUN4C_SUN4 &&
239 (len > 0x20000000 ||
240 ((flags & MAP_FIXED) &&
241 addr < 0xe0000000 && addr + len > 0x20000000)))
242 goto out_putf;
243
244 /* See asm-sparc/uaccess.h */
245 if (len > TASK_SIZE - PAGE_SIZE || addr + len > TASK_SIZE - PAGE_SIZE)
246 goto out_putf;
247
248 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); 252 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
249 253
250 down_write(&current->mm->mmap_sem); 254 down_write(&current->mm->mmap_sem);
251 retval = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); 255 retval = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
252 up_write(&current->mm->mmap_sem); 256 up_write(&current->mm->mmap_sem);
253 257
254out_putf:
255 if (file) 258 if (file)
256 fput(file); 259 fput(file);
257out: 260out:
@@ -467,19 +470,21 @@ asmlinkage int sys_getdomainname(char __user *name, int len)
467{ 470{
468 int nlen, err; 471 int nlen, err;
469 472
470 if (len < 0 || len > __NEW_UTS_LEN) 473 if (len < 0)
471 return -EINVAL; 474 return -EINVAL;
472 475
473 down_read(&uts_sem); 476 down_read(&uts_sem);
474 477
475 nlen = strlen(system_utsname.domainname) + 1; 478 nlen = strlen(system_utsname.domainname) + 1;
476 if (nlen < len) 479 err = -EINVAL;
477 len = nlen; 480 if (nlen > len)
481 goto out;
478 482
479 err = -EFAULT; 483 err = -EFAULT;
480 if (!copy_to_user(name, system_utsname.domainname, len)) 484 if (!copy_to_user(name, system_utsname.domainname, nlen))
481 err = 0; 485 err = 0;
482 486
487out:
483 up_read(&uts_sem); 488 up_read(&uts_sem);
484 return err; 489 return err;
485} 490}
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index 8a36ba8868db..8d8ca716f7a7 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -34,6 +34,10 @@ config ARCH_MAY_HAVE_PC_FDC
34 bool 34 bool
35 default y 35 default y
36 36
37config AUDIT_ARCH
38 bool
39 default y
40
37choice 41choice
38 prompt "Kernel page size" 42 prompt "Kernel page size"
39 default SPARC64_PAGE_SIZE_8KB 43 default SPARC64_PAGE_SIZE_8KB
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile
index 86c9fe3f3e4a..e1eabebaed39 100644
--- a/arch/sparc64/kernel/Makefile
+++ b/arch/sparc64/kernel/Makefile
@@ -25,6 +25,9 @@ obj-$(CONFIG_MODULES) += module.o
25obj-$(CONFIG_US3_FREQ) += us3_cpufreq.o 25obj-$(CONFIG_US3_FREQ) += us3_cpufreq.o
26obj-$(CONFIG_US2E_FREQ) += us2e_cpufreq.o 26obj-$(CONFIG_US2E_FREQ) += us2e_cpufreq.o
27obj-$(CONFIG_KPROBES) += kprobes.o 27obj-$(CONFIG_KPROBES) += kprobes.o
28obj-$(CONFIG_AUDIT) += audit.o
29obj-$(CONFIG_AUDIT)$(CONFIG_SPARC32_COMPAT) += compat_audit.o
30obj-y += $(obj-yy)
28 31
29ifdef CONFIG_SUNOS_EMUL 32ifdef CONFIG_SUNOS_EMUL
30 obj-y += sys_sunos32.o sunos_ioctl32.o 33 obj-y += sys_sunos32.o sunos_ioctl32.o
diff --git a/arch/sparc64/kernel/audit.c b/arch/sparc64/kernel/audit.c
new file mode 100644
index 000000000000..aef19cc27072
--- /dev/null
+++ b/arch/sparc64/kernel/audit.c
@@ -0,0 +1,66 @@
1#include <linux/init.h>
2#include <linux/types.h>
3#include <linux/audit.h>
4#include <asm/unistd.h>
5
6static unsigned dir_class[] = {
7#include <asm-generic/audit_dir_write.h>
8~0U
9};
10
11static unsigned read_class[] = {
12#include <asm-generic/audit_read.h>
13~0U
14};
15
16static unsigned write_class[] = {
17#include <asm-generic/audit_write.h>
18~0U
19};
20
21static unsigned chattr_class[] = {
22#include <asm-generic/audit_change_attr.h>
23~0U
24};
25
26int audit_classify_syscall(int abi, unsigned syscall)
27{
28#ifdef CONFIG_SPARC32_COMPAT
29 extern int sparc32_classify_syscall(unsigned);
30 if (abi == AUDIT_ARCH_SPARC)
31 return sparc32_classify_syscall(syscall);
32#endif
33 switch(syscall) {
34 case __NR_open:
35 return 2;
36 case __NR_openat:
37 return 3;
38 case __NR_socketcall:
39 return 4;
40 case __NR_execve:
41 return 5;
42 default:
43 return 0;
44 }
45}
46
47static int __init audit_classes_init(void)
48{
49#ifdef CONFIG_SPARC32_COMPAT
50 extern __u32 sparc32_dir_class[];
51 extern __u32 sparc32_write_class[];
52 extern __u32 sparc32_read_class[];
53 extern __u32 sparc32_chattr_class[];
54 audit_register_class(AUDIT_CLASS_WRITE_32, sparc32_write_class);
55 audit_register_class(AUDIT_CLASS_READ_32, sparc32_read_class);
56 audit_register_class(AUDIT_CLASS_DIR_WRITE_32, sparc32_dir_class);
57 audit_register_class(AUDIT_CLASS_CHATTR_32, sparc32_chattr_class);
58#endif
59 audit_register_class(AUDIT_CLASS_WRITE, write_class);
60 audit_register_class(AUDIT_CLASS_READ, read_class);
61 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class);
62 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class);
63 return 0;
64}
65
66__initcall(audit_classes_init);
diff --git a/arch/sparc64/kernel/compat_audit.c b/arch/sparc64/kernel/compat_audit.c
new file mode 100644
index 000000000000..cca96c91b780
--- /dev/null
+++ b/arch/sparc64/kernel/compat_audit.c
@@ -0,0 +1,37 @@
1#include <asm-sparc/unistd.h>
2
3unsigned sparc32_dir_class[] = {
4#include <asm-generic/audit_dir_write.h>
5~0U
6};
7
8unsigned sparc32_chattr_class[] = {
9#include <asm-generic/audit_change_attr.h>
10~0U
11};
12
13unsigned sparc32_write_class[] = {
14#include <asm-generic/audit_write.h>
15~0U
16};
17
18unsigned sparc32_read_class[] = {
19#include <asm-generic/audit_read.h>
20~0U
21};
22
23int sparc32_classify_syscall(unsigned syscall)
24{
25 switch(syscall) {
26 case __NR_open:
27 return 2;
28 case __NR_openat:
29 return 3;
30 case __NR_socketcall:
31 return 4;
32 case __NR_execve:
33 return 5;
34 default:
35 return 1;
36 }
37}
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c
index 054d0abdb7ee..c608c947e6c3 100644
--- a/arch/sparc64/kernel/sys_sparc.c
+++ b/arch/sparc64/kernel/sys_sparc.c
@@ -548,6 +548,26 @@ asmlinkage long sparc64_personality(unsigned long personality)
548 return ret; 548 return ret;
549} 549}
550 550
551int sparc64_mmap_check(unsigned long addr, unsigned long len,
552 unsigned long flags)
553{
554 if (test_thread_flag(TIF_32BIT)) {
555 if (len >= STACK_TOP32)
556 return -EINVAL;
557
558 if ((flags & MAP_FIXED) && addr > STACK_TOP32 - len)
559 return -EINVAL;
560 } else {
561 if (len >= VA_EXCLUDE_START)
562 return -EINVAL;
563
564 if ((flags & MAP_FIXED) && invalid_64bit_range(addr, len))
565 return -EINVAL;
566 }
567
568 return 0;
569}
570
551/* Linux version of mmap */ 571/* Linux version of mmap */
552asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len, 572asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len,
553 unsigned long prot, unsigned long flags, unsigned long fd, 573 unsigned long prot, unsigned long flags, unsigned long fd,
@@ -563,27 +583,11 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len,
563 } 583 }
564 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); 584 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
565 len = PAGE_ALIGN(len); 585 len = PAGE_ALIGN(len);
566 retval = -EINVAL;
567
568 if (test_thread_flag(TIF_32BIT)) {
569 if (len >= STACK_TOP32)
570 goto out_putf;
571
572 if ((flags & MAP_FIXED) && addr > STACK_TOP32 - len)
573 goto out_putf;
574 } else {
575 if (len >= VA_EXCLUDE_START)
576 goto out_putf;
577
578 if ((flags & MAP_FIXED) && invalid_64bit_range(addr, len))
579 goto out_putf;
580 }
581 586
582 down_write(&current->mm->mmap_sem); 587 down_write(&current->mm->mmap_sem);
583 retval = do_mmap(file, addr, len, prot, flags, off); 588 retval = do_mmap(file, addr, len, prot, flags, off);
584 up_write(&current->mm->mmap_sem); 589 up_write(&current->mm->mmap_sem);
585 590
586out_putf:
587 if (file) 591 if (file)
588 fput(file); 592 fput(file);
589out: 593out:
@@ -703,19 +707,21 @@ asmlinkage long sys_getdomainname(char __user *name, int len)
703{ 707{
704 int nlen, err; 708 int nlen, err;
705 709
706 if (len < 0 || len > __NEW_UTS_LEN) 710 if (len < 0)
707 return -EINVAL; 711 return -EINVAL;
708 712
709 down_read(&uts_sem); 713 down_read(&uts_sem);
710 714
711 nlen = strlen(system_utsname.domainname) + 1; 715 nlen = strlen(system_utsname.domainname) + 1;
712 if (nlen < len) 716 err = -EINVAL;
713 len = nlen; 717 if (nlen > len)
718 goto out;
714 719
715 err = -EFAULT; 720 err = -EFAULT;
716 if (!copy_to_user(name, system_utsname.domainname, len)) 721 if (!copy_to_user(name, system_utsname.domainname, nlen))
717 err = 0; 722 err = 0;
718 723
724out:
719 up_read(&uts_sem); 725 up_read(&uts_sem);
720 return err; 726 return err;
721} 727}
diff --git a/arch/sparc64/mm/generic.c b/arch/sparc64/mm/generic.c
index 8cb06205d265..af9d81db0b38 100644
--- a/arch/sparc64/mm/generic.c
+++ b/arch/sparc64/mm/generic.c
@@ -69,6 +69,8 @@ static inline void io_remap_pte_range(struct mm_struct *mm, pte_t * pte,
69 } else 69 } else
70 offset += PAGE_SIZE; 70 offset += PAGE_SIZE;
71 71
72 if (pte_write(entry))
73 entry = pte_mkdirty(entry);
72 do { 74 do {
73 BUG_ON(!pte_none(*pte)); 75 BUG_ON(!pte_none(*pte));
74 set_pte_at(mm, address, pte, entry); 76 set_pte_at(mm, address, pte, entry);
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
index 28df7d88ce2c..6cd4878625f1 100644
--- a/arch/x86_64/Kconfig
+++ b/arch/x86_64/Kconfig
@@ -85,6 +85,10 @@ config DMI
85 bool 85 bool
86 default y 86 default y
87 87
88config AUDIT_ARCH
89 bool
90 default y
91
88source "init/Kconfig" 92source "init/Kconfig"
89 93
90 94
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig
index 840d5d93d5cc..5fb970715941 100644
--- a/arch/x86_64/defconfig
+++ b/arch/x86_64/defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc2 3# Linux kernel version: 2.6.18-rc4
4# Tue Jul 18 17:13:20 2006 4# Thu Aug 24 21:05:55 2006
5# 5#
6CONFIG_X86_64=y 6CONFIG_X86_64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -201,7 +201,7 @@ CONFIG_ACPI_THERMAL=y
201CONFIG_ACPI_NUMA=y 201CONFIG_ACPI_NUMA=y
202# CONFIG_ACPI_ASUS is not set 202# CONFIG_ACPI_ASUS is not set
203# CONFIG_ACPI_IBM is not set 203# CONFIG_ACPI_IBM is not set
204CONFIG_ACPI_TOSHIBA=y 204# CONFIG_ACPI_TOSHIBA is not set
205CONFIG_ACPI_BLACKLIST_YEAR=0 205CONFIG_ACPI_BLACKLIST_YEAR=0
206# CONFIG_ACPI_DEBUG is not set 206# CONFIG_ACPI_DEBUG is not set
207CONFIG_ACPI_EC=y 207CONFIG_ACPI_EC=y
@@ -216,7 +216,7 @@ CONFIG_ACPI_CONTAINER=y
216# 216#
217CONFIG_CPU_FREQ=y 217CONFIG_CPU_FREQ=y
218CONFIG_CPU_FREQ_TABLE=y 218CONFIG_CPU_FREQ_TABLE=y
219# CONFIG_CPU_FREQ_DEBUG is not set 219CONFIG_CPU_FREQ_DEBUG=y
220CONFIG_CPU_FREQ_STAT=y 220CONFIG_CPU_FREQ_STAT=y
221# CONFIG_CPU_FREQ_STAT_DETAILS is not set 221# CONFIG_CPU_FREQ_STAT_DETAILS is not set
222CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 222CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
@@ -495,8 +495,9 @@ CONFIG_SCSI=y
495CONFIG_BLK_DEV_SD=y 495CONFIG_BLK_DEV_SD=y
496# CONFIG_CHR_DEV_ST is not set 496# CONFIG_CHR_DEV_ST is not set
497# CONFIG_CHR_DEV_OSST is not set 497# CONFIG_CHR_DEV_OSST is not set
498# CONFIG_BLK_DEV_SR is not set 498CONFIG_BLK_DEV_SR=y
499# CONFIG_CHR_DEV_SG is not set 499# CONFIG_BLK_DEV_SR_VENDOR is not set
500CONFIG_CHR_DEV_SG=y
500# CONFIG_CHR_DEV_SCH is not set 501# CONFIG_CHR_DEV_SCH is not set
501 502
502# 503#
@@ -512,7 +513,7 @@ CONFIG_SCSI_CONSTANTS=y
512CONFIG_SCSI_SPI_ATTRS=y 513CONFIG_SCSI_SPI_ATTRS=y
513CONFIG_SCSI_FC_ATTRS=y 514CONFIG_SCSI_FC_ATTRS=y
514# CONFIG_SCSI_ISCSI_ATTRS is not set 515# CONFIG_SCSI_ISCSI_ATTRS is not set
515# CONFIG_SCSI_SAS_ATTRS is not set 516CONFIG_SCSI_SAS_ATTRS=y
516 517
517# 518#
518# SCSI low-level drivers 519# SCSI low-level drivers
@@ -538,7 +539,7 @@ CONFIG_MEGARAID_MAILBOX=y
538CONFIG_MEGARAID_SAS=y 539CONFIG_MEGARAID_SAS=y
539CONFIG_SCSI_SATA=y 540CONFIG_SCSI_SATA=y
540CONFIG_SCSI_SATA_AHCI=y 541CONFIG_SCSI_SATA_AHCI=y
541# CONFIG_SCSI_SATA_SVW is not set 542CONFIG_SCSI_SATA_SVW=y
542CONFIG_SCSI_ATA_PIIX=y 543CONFIG_SCSI_ATA_PIIX=y
543# CONFIG_SCSI_SATA_MV is not set 544# CONFIG_SCSI_SATA_MV is not set
544CONFIG_SCSI_SATA_NV=y 545CONFIG_SCSI_SATA_NV=y
@@ -589,7 +590,7 @@ CONFIG_BLK_DEV_DM=y
589CONFIG_FUSION=y 590CONFIG_FUSION=y
590CONFIG_FUSION_SPI=y 591CONFIG_FUSION_SPI=y
591# CONFIG_FUSION_FC is not set 592# CONFIG_FUSION_FC is not set
592# CONFIG_FUSION_SAS is not set 593CONFIG_FUSION_SAS=y
593CONFIG_FUSION_MAX_SGE=128 594CONFIG_FUSION_MAX_SGE=128
594# CONFIG_FUSION_CTL is not set 595# CONFIG_FUSION_CTL is not set
595 596
@@ -675,7 +676,7 @@ CONFIG_NET_PCI=y
675# CONFIG_PCNET32 is not set 676# CONFIG_PCNET32 is not set
676# CONFIG_AMD8111_ETH is not set 677# CONFIG_AMD8111_ETH is not set
677# CONFIG_ADAPTEC_STARFIRE is not set 678# CONFIG_ADAPTEC_STARFIRE is not set
678# CONFIG_B44 is not set 679CONFIG_B44=y
679CONFIG_FORCEDETH=y 680CONFIG_FORCEDETH=y
680# CONFIG_DGRS is not set 681# CONFIG_DGRS is not set
681# CONFIG_EEPRO100 is not set 682# CONFIG_EEPRO100 is not set
@@ -712,7 +713,7 @@ CONFIG_E1000=y
712# CONFIG_SK98LIN is not set 713# CONFIG_SK98LIN is not set
713# CONFIG_VIA_VELOCITY is not set 714# CONFIG_VIA_VELOCITY is not set
714CONFIG_TIGON3=y 715CONFIG_TIGON3=y
715# CONFIG_BNX2 is not set 716CONFIG_BNX2=y
716 717
717# 718#
718# Ethernet (10000 Mbit) 719# Ethernet (10000 Mbit)
@@ -842,44 +843,7 @@ CONFIG_LEGACY_PTY_COUNT=256
842# 843#
843# Watchdog Cards 844# Watchdog Cards
844# 845#
845CONFIG_WATCHDOG=y 846# CONFIG_WATCHDOG is not set
846# CONFIG_WATCHDOG_NOWAYOUT is not set
847
848#
849# Watchdog Device Drivers
850#
851CONFIG_SOFT_WATCHDOG=y
852# CONFIG_ACQUIRE_WDT is not set
853# CONFIG_ADVANTECH_WDT is not set
854# CONFIG_ALIM1535_WDT is not set
855# CONFIG_ALIM7101_WDT is not set
856# CONFIG_SC520_WDT is not set
857# CONFIG_EUROTECH_WDT is not set
858# CONFIG_IB700_WDT is not set
859# CONFIG_IBMASR is not set
860# CONFIG_WAFER_WDT is not set
861# CONFIG_I6300ESB_WDT is not set
862# CONFIG_I8XX_TCO is not set
863# CONFIG_SC1200_WDT is not set
864# CONFIG_60XX_WDT is not set
865# CONFIG_SBC8360_WDT is not set
866# CONFIG_CPU5_WDT is not set
867# CONFIG_W83627HF_WDT is not set
868# CONFIG_W83877F_WDT is not set
869# CONFIG_W83977F_WDT is not set
870# CONFIG_MACHZ_WDT is not set
871# CONFIG_SBC_EPX_C3_WATCHDOG is not set
872
873#
874# PCI-based Watchdog Cards
875#
876# CONFIG_PCIPCWATCHDOG is not set
877# CONFIG_WDTPCI is not set
878
879#
880# USB-based Watchdog Cards
881#
882# CONFIG_USBPCWATCHDOG is not set
883CONFIG_HW_RANDOM=y 847CONFIG_HW_RANDOM=y
884CONFIG_HW_RANDOM_INTEL=y 848CONFIG_HW_RANDOM_INTEL=y
885CONFIG_HW_RANDOM_AMD=y 849CONFIG_HW_RANDOM_AMD=y
@@ -1056,6 +1020,7 @@ CONFIG_VGACON_SOFT_SCROLLBACK=y
1056CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256 1020CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256
1057CONFIG_VIDEO_SELECT=y 1021CONFIG_VIDEO_SELECT=y
1058CONFIG_DUMMY_CONSOLE=y 1022CONFIG_DUMMY_CONSOLE=y
1023# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1059 1024
1060# 1025#
1061# Sound 1026# Sound
@@ -1301,7 +1266,7 @@ CONFIG_INOTIFY=y
1301CONFIG_INOTIFY_USER=y 1266CONFIG_INOTIFY_USER=y
1302# CONFIG_QUOTA is not set 1267# CONFIG_QUOTA is not set
1303CONFIG_DNOTIFY=y 1268CONFIG_DNOTIFY=y
1304CONFIG_AUTOFS_FS=y 1269# CONFIG_AUTOFS_FS is not set
1305CONFIG_AUTOFS4_FS=y 1270CONFIG_AUTOFS4_FS=y
1306# CONFIG_FUSE_FS is not set 1271# CONFIG_FUSE_FS is not set
1307 1272
@@ -1494,4 +1459,5 @@ CONFIG_DEBUG_STACKOVERFLOW=y
1494# CONFIG_CRC16 is not set 1459# CONFIG_CRC16 is not set
1495CONFIG_CRC32=y 1460CONFIG_CRC32=y
1496# CONFIG_LIBCRC32C is not set 1461# CONFIG_LIBCRC32C is not set
1462CONFIG_ZLIB_INFLATE=y
1497CONFIG_PLIST=y 1463CONFIG_PLIST=y
diff --git a/arch/x86_64/ia32/audit.c b/arch/x86_64/ia32/audit.c
index ab94f2e58cdd..92d7d0c8d93f 100644
--- a/arch/x86_64/ia32/audit.c
+++ b/arch/x86_64/ia32/audit.c
@@ -9,3 +9,29 @@ unsigned ia32_chattr_class[] = {
9#include <asm-generic/audit_change_attr.h> 9#include <asm-generic/audit_change_attr.h>
10~0U 10~0U
11}; 11};
12
13unsigned ia32_write_class[] = {
14#include <asm-generic/audit_write.h>
15~0U
16};
17
18unsigned ia32_read_class[] = {
19#include <asm-generic/audit_read.h>
20~0U
21};
22
23int ia32_classify_syscall(unsigned syscall)
24{
25 switch(syscall) {
26 case __NR_open:
27 return 2;
28 case __NR_openat:
29 return 3;
30 case __NR_socketcall:
31 return 4;
32 case __NR_execve:
33 return 5;
34 default:
35 return 1;
36 }
37}
diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c
index a9dc0f3b5b51..2fd5a67fd435 100644
--- a/arch/x86_64/ia32/ia32_binfmt.c
+++ b/arch/x86_64/ia32/ia32_binfmt.c
@@ -73,39 +73,44 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
73 * Dumping its extra ELF program headers includes all the other information 73 * Dumping its extra ELF program headers includes all the other information
74 * a debugger needs to easily find how the vsyscall DSO was being used. 74 * a debugger needs to easily find how the vsyscall DSO was being used.
75 */ 75 */
76#define ELF_CORE_EXTRA_PHDRS (VSYSCALL32_EHDR->e_phnum) 76#define ELF_CORE_EXTRA_PHDRS (find_vma(current->mm, VSYSCALL32_BASE) ? \
77 (VSYSCALL32_EHDR->e_phnum) : 0)
77#define ELF_CORE_WRITE_EXTRA_PHDRS \ 78#define ELF_CORE_WRITE_EXTRA_PHDRS \
78do { \ 79do { \
79 const struct elf32_phdr *const vsyscall_phdrs = \ 80 if (find_vma(current->mm, VSYSCALL32_BASE)) { \
80 (const struct elf32_phdr *) (VSYSCALL32_BASE \ 81 const struct elf32_phdr *const vsyscall_phdrs = \
81 + VSYSCALL32_EHDR->e_phoff); \ 82 (const struct elf32_phdr *) (VSYSCALL32_BASE \
82 int i; \ 83 + VSYSCALL32_EHDR->e_phoff);\
83 Elf32_Off ofs = 0; \ 84 int i; \
84 for (i = 0; i < VSYSCALL32_EHDR->e_phnum; ++i) { \ 85 Elf32_Off ofs = 0; \
85 struct elf32_phdr phdr = vsyscall_phdrs[i]; \ 86 for (i = 0; i < VSYSCALL32_EHDR->e_phnum; ++i) { \
86 if (phdr.p_type == PT_LOAD) { \ 87 struct elf32_phdr phdr = vsyscall_phdrs[i]; \
87 BUG_ON(ofs != 0); \ 88 if (phdr.p_type == PT_LOAD) { \
88 ofs = phdr.p_offset = offset; \ 89 BUG_ON(ofs != 0); \
89 phdr.p_memsz = PAGE_ALIGN(phdr.p_memsz); \ 90 ofs = phdr.p_offset = offset; \
90 phdr.p_filesz = phdr.p_memsz; \ 91 phdr.p_memsz = PAGE_ALIGN(phdr.p_memsz); \
91 offset += phdr.p_filesz; \ 92 phdr.p_filesz = phdr.p_memsz; \
93 offset += phdr.p_filesz; \
94 } \
95 else \
96 phdr.p_offset += ofs; \
97 phdr.p_paddr = 0; /* match other core phdrs */ \
98 DUMP_WRITE(&phdr, sizeof(phdr)); \
92 } \ 99 } \
93 else \
94 phdr.p_offset += ofs; \
95 phdr.p_paddr = 0; /* match other core phdrs */ \
96 DUMP_WRITE(&phdr, sizeof(phdr)); \
97 } \ 100 } \
98} while (0) 101} while (0)
99#define ELF_CORE_WRITE_EXTRA_DATA \ 102#define ELF_CORE_WRITE_EXTRA_DATA \
100do { \ 103do { \
101 const struct elf32_phdr *const vsyscall_phdrs = \ 104 if (find_vma(current->mm, VSYSCALL32_BASE)) { \
102 (const struct elf32_phdr *) (VSYSCALL32_BASE \ 105 const struct elf32_phdr *const vsyscall_phdrs = \
103 + VSYSCALL32_EHDR->e_phoff); \ 106 (const struct elf32_phdr *) (VSYSCALL32_BASE \
104 int i; \ 107 + VSYSCALL32_EHDR->e_phoff); \
105 for (i = 0; i < VSYSCALL32_EHDR->e_phnum; ++i) { \ 108 int i; \
106 if (vsyscall_phdrs[i].p_type == PT_LOAD) \ 109 for (i = 0; i < VSYSCALL32_EHDR->e_phnum; ++i) { \
107 DUMP_WRITE((void *) (u64) vsyscall_phdrs[i].p_vaddr, \ 110 if (vsyscall_phdrs[i].p_type == PT_LOAD) \
108 PAGE_ALIGN(vsyscall_phdrs[i].p_memsz)); \ 111 DUMP_WRITE((void *) (u64) vsyscall_phdrs[i].p_vaddr,\
112 PAGE_ALIGN(vsyscall_phdrs[i].p_memsz)); \
113 } \
109 } \ 114 } \
110} while (0) 115} while (0)
111 116
diff --git a/arch/x86_64/kernel/audit.c b/arch/x86_64/kernel/audit.c
index a067aa468a85..21f33387bef3 100644
--- a/arch/x86_64/kernel/audit.c
+++ b/arch/x86_64/kernel/audit.c
@@ -8,19 +8,54 @@ static unsigned dir_class[] = {
8~0U 8~0U
9}; 9};
10 10
11static unsigned read_class[] = {
12#include <asm-generic/audit_read.h>
13~0U
14};
15
16static unsigned write_class[] = {
17#include <asm-generic/audit_write.h>
18~0U
19};
20
11static unsigned chattr_class[] = { 21static unsigned chattr_class[] = {
12#include <asm-generic/audit_change_attr.h> 22#include <asm-generic/audit_change_attr.h>
13~0U 23~0U
14}; 24};
15 25
26int audit_classify_syscall(int abi, unsigned syscall)
27{
28#ifdef CONFIG_IA32_EMULATION
29 extern int ia32_classify_syscall(unsigned);
30 if (abi == AUDIT_ARCH_I386)
31 return ia32_classify_syscall(syscall);
32#endif
33 switch(syscall) {
34 case __NR_open:
35 return 2;
36 case __NR_openat:
37 return 3;
38 case __NR_execve:
39 return 5;
40 default:
41 return 0;
42 }
43}
44
16static int __init audit_classes_init(void) 45static int __init audit_classes_init(void)
17{ 46{
18#ifdef CONFIG_IA32_EMULATION 47#ifdef CONFIG_IA32_EMULATION
19 extern __u32 ia32_dir_class[]; 48 extern __u32 ia32_dir_class[];
49 extern __u32 ia32_write_class[];
50 extern __u32 ia32_read_class[];
20 extern __u32 ia32_chattr_class[]; 51 extern __u32 ia32_chattr_class[];
52 audit_register_class(AUDIT_CLASS_WRITE_32, ia32_write_class);
53 audit_register_class(AUDIT_CLASS_READ_32, ia32_read_class);
21 audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); 54 audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class);
22 audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); 55 audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class);
23#endif 56#endif
57 audit_register_class(AUDIT_CLASS_WRITE, write_class);
58 audit_register_class(AUDIT_CLASS_READ, read_class);
24 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); 59 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class);
25 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); 60 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class);
26 return 0; 61 return 0;
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c
index e56c2adf57a4..764bf23c7103 100644
--- a/arch/x86_64/kernel/e820.c
+++ b/arch/x86_64/kernel/e820.c
@@ -71,7 +71,11 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size)
71#endif 71#endif
72 /* kernel code + 640k memory hole (later should not be needed, but 72 /* kernel code + 640k memory hole (later should not be needed, but
73 be paranoid for now) */ 73 be paranoid for now) */
74 if (last >= 640*1024 && addr < __pa_symbol(&_end)) { 74 if (last >= 640*1024 && addr < 1024*1024) {
75 *addrp = 1024*1024;
76 return 1;
77 }
78 if (last >= __pa_symbol(&_text) && last < __pa_symbol(&_end)) {
75 *addrp = __pa_symbol(&_end); 79 *addrp = __pa_symbol(&_end);
76 return 1; 80 return 1;
77 } 81 }
@@ -104,35 +108,6 @@ e820_any_mapped(unsigned long start, unsigned long end, unsigned type)
104 return 0; 108 return 0;
105} 109}
106 110
107/*
108 * This function checks if the entire range <start,end> is mapped with type.
109 *
110 * Note: this function only works correct if the e820 table is sorted and
111 * not-overlapping, which is the case
112 */
113int __init e820_all_mapped(unsigned long start, unsigned long end, unsigned type)
114{
115 int i;
116 for (i = 0; i < e820.nr_map; i++) {
117 struct e820entry *ei = &e820.map[i];
118 if (type && ei->type != type)
119 continue;
120 /* is the region (part) in overlap with the current region ?*/
121 if (ei->addr >= end || ei->addr + ei->size <= start)
122 continue;
123
124 /* if the region is at the beginning of <start,end> we move
125 * start to the end of the region since it's ok until there
126 */
127 if (ei->addr <= start)
128 start = ei->addr + ei->size;
129 /* if start is now at or beyond end, we're done, full coverage */
130 if (start >= end)
131 return 1; /* we're done */
132 }
133 return 0;
134}
135
136/* 111/*
137 * Find a free area in a specific range. 112 * Find a free area in a specific range.
138 */ 113 */
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S
index 6f810424df44..aa8d8939abc1 100644
--- a/arch/x86_64/kernel/entry.S
+++ b/arch/x86_64/kernel/entry.S
@@ -973,6 +973,8 @@ ENTRY(kernel_thread)
973ENDPROC(kernel_thread) 973ENDPROC(kernel_thread)
974 974
975child_rip: 975child_rip:
976 pushq $0 # fake return address
977 CFI_STARTPROC
976 /* 978 /*
977 * Here we are in the child and the registers are set as they were 979 * Here we are in the child and the registers are set as they were
978 * at kernel_thread() invocation in the parent. 980 * at kernel_thread() invocation in the parent.
@@ -983,6 +985,7 @@ child_rip:
983 # exit 985 # exit
984 xorl %edi, %edi 986 xorl %edi, %edi
985 call do_exit 987 call do_exit
988 CFI_ENDPROC
986ENDPROC(child_rip) 989ENDPROC(child_rip)
987 990
988/* 991/*
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S
index 6df05e6034fa..c9739ca81d06 100644
--- a/arch/x86_64/kernel/head.S
+++ b/arch/x86_64/kernel/head.S
@@ -191,6 +191,7 @@ startup_64:
191 * jump 191 * jump
192 */ 192 */
193 movq initial_code(%rip),%rax 193 movq initial_code(%rip),%rax
194 pushq $0 # fake return address
194 jmp *%rax 195 jmp *%rax
195 196
196 /* SMP bootup changes these two */ 197 /* SMP bootup changes these two */
diff --git a/arch/x86_64/kernel/init_task.c b/arch/x86_64/kernel/init_task.c
index ce31d904d601..3dc5854ba21e 100644
--- a/arch/x86_64/kernel/init_task.c
+++ b/arch/x86_64/kernel/init_task.c
@@ -46,4 +46,9 @@ EXPORT_SYMBOL(init_task);
46 */ 46 */
47DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_internodealigned_in_smp = INIT_TSS; 47DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_internodealigned_in_smp = INIT_TSS;
48 48
49/* Copies of the original ist values from the tss are only accessed during
50 * debugging, no special alignment required.
51 */
52DEFINE_PER_CPU(struct orig_ist, orig_ist);
53
49#define ALIGN_TO_4K __attribute__((section(".data.init_task"))) 54#define ALIGN_TO_4K __attribute__((section(".data.init_task")))
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index 8a099ff1f8bc..34afad704824 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -521,8 +521,6 @@ static void discover_ebda(void)
521 521
522void __init setup_arch(char **cmdline_p) 522void __init setup_arch(char **cmdline_p)
523{ 523{
524 unsigned long kernel_end;
525
526 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); 524 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
527 screen_info = SCREEN_INFO; 525 screen_info = SCREEN_INFO;
528 edid_info = EDID_INFO; 526 edid_info = EDID_INFO;
@@ -596,8 +594,8 @@ void __init setup_arch(char **cmdline_p)
596 (table_end - table_start) << PAGE_SHIFT); 594 (table_end - table_start) << PAGE_SHIFT);
597 595
598 /* reserve kernel */ 596 /* reserve kernel */
599 kernel_end = round_up(__pa_symbol(&_end),PAGE_SIZE); 597 reserve_bootmem_generic(__pa_symbol(&_text),
600 reserve_bootmem_generic(HIGH_MEMORY, kernel_end - HIGH_MEMORY); 598 __pa_symbol(&_end) - __pa_symbol(&_text));
601 599
602 /* 600 /*
603 * reserve physical page 0 - it's a special BIOS page on many boxes, 601 * reserve physical page 0 - it's a special BIOS page on many boxes,
diff --git a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c
index 6fe58a634b5f..417de564456e 100644
--- a/arch/x86_64/kernel/setup64.c
+++ b/arch/x86_64/kernel/setup64.c
@@ -189,6 +189,7 @@ void __cpuinit cpu_init (void)
189{ 189{
190 int cpu = stack_smp_processor_id(); 190 int cpu = stack_smp_processor_id();
191 struct tss_struct *t = &per_cpu(init_tss, cpu); 191 struct tss_struct *t = &per_cpu(init_tss, cpu);
192 struct orig_ist *orig_ist = &per_cpu(orig_ist, cpu);
192 unsigned long v; 193 unsigned long v;
193 char *estacks = NULL; 194 char *estacks = NULL;
194 struct task_struct *me; 195 struct task_struct *me;
@@ -256,7 +257,7 @@ void __cpuinit cpu_init (void)
256 estacks += EXCEPTION_STKSZ; 257 estacks += EXCEPTION_STKSZ;
257 break; 258 break;
258 } 259 }
259 t->ist[v] = (unsigned long)estacks; 260 orig_ist->ist[v] = t->ist[v] = (unsigned long)estacks;
260 } 261 }
261 262
262 t->io_bitmap_base = offsetof(struct tss_struct, io_bitmap); 263 t->io_bitmap_base = offsetof(struct tss_struct, io_bitmap);
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
index 14052f089814..b1249774d1e8 100644
--- a/arch/x86_64/kernel/traps.c
+++ b/arch/x86_64/kernel/traps.c
@@ -107,7 +107,11 @@ static inline void preempt_conditional_cli(struct pt_regs *regs)
107} 107}
108 108
109static int kstack_depth_to_print = 12; 109static int kstack_depth_to_print = 12;
110#ifdef CONFIG_STACK_UNWIND
110static int call_trace = 1; 111static int call_trace = 1;
112#else
113#define call_trace (-1)
114#endif
111 115
112#ifdef CONFIG_KALLSYMS 116#ifdef CONFIG_KALLSYMS
113# include <linux/kallsyms.h> 117# include <linux/kallsyms.h>
@@ -174,7 +178,7 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
174 break; 178 break;
175#endif 179#endif
176 default: 180 default:
177 end = per_cpu(init_tss, cpu).ist[k]; 181 end = per_cpu(orig_ist, cpu).ist[k];
178 break; 182 break;
179 } 183 }
180 /* 184 /*
@@ -274,21 +278,21 @@ void show_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * s
274 if (unwind_init_blocked(&info, tsk) == 0) 278 if (unwind_init_blocked(&info, tsk) == 0)
275 unw_ret = show_trace_unwind(&info, NULL); 279 unw_ret = show_trace_unwind(&info, NULL);
276 } 280 }
277 if (unw_ret > 0 && !arch_unw_user_mode(&info)) { 281 if (unw_ret > 0) {
278#ifdef CONFIG_STACK_UNWIND 282 if (call_trace == 1 && !arch_unw_user_mode(&info)) {
279 unsigned long rip = info.regs.rip; 283 print_symbol("DWARF2 unwinder stuck at %s\n",
280 print_symbol("DWARF2 unwinder stuck at %s\n", rip); 284 UNW_PC(&info));
281 if (call_trace == 1) { 285 if ((long)UNW_SP(&info) < 0) {
282 printk("Leftover inexact backtrace:\n"); 286 printk("Leftover inexact backtrace:\n");
283 stack = (unsigned long *)info.regs.rsp; 287 stack = (unsigned long *)UNW_SP(&info);
284 } else if (call_trace > 1) 288 } else
289 printk("Full inexact backtrace again:\n");
290 } else if (call_trace >= 1)
285 return; 291 return;
286 else 292 else
287 printk("Full inexact backtrace again:\n"); 293 printk("Full inexact backtrace again:\n");
288#else 294 } else
289 printk("Inexact backtrace:\n"); 295 printk("Inexact backtrace:\n");
290#endif
291 }
292 } 296 }
293 297
294 /* 298 /*
@@ -1120,6 +1124,7 @@ static int __init kstack_setup(char *s)
1120} 1124}
1121__setup("kstack=", kstack_setup); 1125__setup("kstack=", kstack_setup);
1122 1126
1127#ifdef CONFIG_STACK_UNWIND
1123static int __init call_trace_setup(char *s) 1128static int __init call_trace_setup(char *s)
1124{ 1129{
1125 if (strcmp(s, "old") == 0) 1130 if (strcmp(s, "old") == 0)
@@ -1133,3 +1138,4 @@ static int __init call_trace_setup(char *s)
1133 return 1; 1138 return 1;
1134} 1139}
1135__setup("call_trace=", call_trace_setup); 1140__setup("call_trace=", call_trace_setup);
1141#endif
diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c
index 3c55c76c6fd5..2d48a7941d48 100644
--- a/arch/x86_64/pci/mmconfig.c
+++ b/arch/x86_64/pci/mmconfig.c
@@ -9,6 +9,7 @@
9#include <linux/init.h> 9#include <linux/init.h>
10#include <linux/acpi.h> 10#include <linux/acpi.h>
11#include <linux/bitmap.h> 11#include <linux/bitmap.h>
12#include <linux/dmi.h>
12#include <asm/e820.h> 13#include <asm/e820.h>
13 14
14#include "pci.h" 15#include "pci.h"
@@ -164,11 +165,33 @@ static __init void unreachable_devices(void)
164 } 165 }
165} 166}
166 167
168static int disable_mcfg(struct dmi_system_id *d)
169{
170 printk("PCI: %s detected. Disabling MCFG.\n", d->ident);
171 pci_probe &= ~PCI_PROBE_MMCONF;
172 return 0;
173}
174
175static struct dmi_system_id __initdata dmi_bad_mcfg[] = {
176 /* Has broken MCFG table that makes the system hang when used */
177 {
178 .callback = disable_mcfg,
179 .ident = "Intel D3C5105 SDV",
180 .matches = {
181 DMI_MATCH(DMI_BIOS_VENDOR, "Intel"),
182 DMI_MATCH(DMI_BOARD_NAME, "D26928"),
183 },
184 },
185 {}
186};
187
167void __init pci_mmcfg_init(void) 188void __init pci_mmcfg_init(void)
168{ 189{
169 int i; 190 int i;
170 191
171 if ((pci_probe & PCI_PROBE_MMCONF) == 0) 192 dmi_check_system(dmi_bad_mcfg);
193
194 if ((pci_probe & (PCI_PROBE_MMCONF|PCI_PROBE_MMCONF_FORCE)) == 0)
172 return; 195 return;
173 196
174 acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg); 197 acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg);
@@ -177,15 +200,6 @@ void __init pci_mmcfg_init(void)
177 (pci_mmcfg_config[0].base_address == 0)) 200 (pci_mmcfg_config[0].base_address == 0))
178 return; 201 return;
179 202
180 if (!e820_all_mapped(pci_mmcfg_config[0].base_address,
181 pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN,
182 E820_RESERVED)) {
183 printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n",
184 pci_mmcfg_config[0].base_address);
185 printk(KERN_ERR "PCI: Not using MMCONFIG.\n");
186 return;
187 }
188
189 /* RED-PEN i386 doesn't do _nocache right now */ 203 /* RED-PEN i386 doesn't do _nocache right now */
190 pci_mmcfg_virt = kmalloc(sizeof(*pci_mmcfg_virt) * pci_mmcfg_config_num, GFP_KERNEL); 204 pci_mmcfg_virt = kmalloc(sizeof(*pci_mmcfg_virt) * pci_mmcfg_config_num, GFP_KERNEL);
191 if (pci_mmcfg_virt == NULL) { 205 if (pci_mmcfg_virt == NULL) {
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c
index 5064d9383963..9aea23cc0dc5 100644
--- a/arch/xtensa/kernel/ptrace.c
+++ b/arch/xtensa/kernel/ptrace.c
@@ -212,7 +212,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
212 */ 212 */
213 case PTRACE_KILL: 213 case PTRACE_KILL:
214 ret = 0; 214 ret = 0;
215 if (child->state == EXIT_ZOMBIE) /* already dead */ 215 if (child->exit_state == EXIT_ZOMBIE) /* already dead */
216 break; 216 break;
217 child->exit_code = SIGKILL; 217 child->exit_code = SIGKILL;
218 child->ptrace &= ~PT_SINGLESTEP; 218 child->ptrace &= ~PT_SINGLESTEP;
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index d369130f4235..dd96123a2b7f 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -2282,6 +2282,8 @@ __enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid)
2282 TPDRQ_MASK(he_readl(he_dev, TPDRQ_B_H))); 2282 TPDRQ_MASK(he_readl(he_dev, TPDRQ_B_H)));
2283 2283
2284 if (new_tail == he_dev->tpdrq_head) { 2284 if (new_tail == he_dev->tpdrq_head) {
2285 int slot;
2286
2285 hprintk("tpdrq full (cid 0x%x)\n", cid); 2287 hprintk("tpdrq full (cid 0x%x)\n", cid);
2286 /* 2288 /*
2287 * FIXME 2289 * FIXME
@@ -2289,6 +2291,13 @@ __enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid)
2289 * after service_tbrq, service the backlog 2291 * after service_tbrq, service the backlog
2290 * for now, we just drop the pdu 2292 * for now, we just drop the pdu
2291 */ 2293 */
2294 for (slot = 0; slot < TPD_MAXIOV; ++slot) {
2295 if (tpd->iovec[slot].addr)
2296 pci_unmap_single(he_dev->pci_dev,
2297 tpd->iovec[slot].addr,
2298 tpd->iovec[slot].len & TPD_LEN_MASK,
2299 PCI_DMA_TODEVICE);
2300 }
2292 if (tpd->skb) { 2301 if (tpd->skb) {
2293 if (tpd->vcc->pop) 2302 if (tpd->vcc->pop)
2294 tpd->vcc->pop(tpd->vcc, tpd->skb); 2303 tpd->vcc->pop(tpd->vcc, tpd->skb);
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 7b0eca703a67..2cd3391ff878 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -48,14 +48,14 @@
48#include <linux/completion.h> 48#include <linux/completion.h>
49 49
50#define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin)) 50#define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin))
51#define DRIVER_NAME "HP CISS Driver (v 2.6.10)" 51#define DRIVER_NAME "HP CISS Driver (v 3.6.10)"
52#define DRIVER_VERSION CCISS_DRIVER_VERSION(2,6,10) 52#define DRIVER_VERSION CCISS_DRIVER_VERSION(3,6,10)
53 53
54/* Embedded module documentation macros - see modules.h */ 54/* Embedded module documentation macros - see modules.h */
55MODULE_AUTHOR("Hewlett-Packard Company"); 55MODULE_AUTHOR("Hewlett-Packard Company");
56MODULE_DESCRIPTION("Driver for HP Controller SA5xxx SA6xxx version 2.6.10"); 56MODULE_DESCRIPTION("Driver for HP Controller SA5xxx SA6xxx version 3.6.10");
57MODULE_SUPPORTED_DEVICE("HP SA5i SA5i+ SA532 SA5300 SA5312 SA641 SA642 SA6400" 57MODULE_SUPPORTED_DEVICE("HP SA5i SA5i+ SA532 SA5300 SA5312 SA641 SA642 SA6400"
58 " SA6i P600 P800 P400 P400i E200 E200i"); 58 " SA6i P600 P800 P400 P400i E200 E200i E500");
59MODULE_LICENSE("GPL"); 59MODULE_LICENSE("GPL");
60 60
61#include "cciss_cmd.h" 61#include "cciss_cmd.h"
@@ -82,6 +82,7 @@ static const struct pci_device_id cciss_pci_device_id[] = {
82 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3213}, 82 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3213},
83 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3214}, 83 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3214},
84 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3215}, 84 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3215},
85 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x3233},
85 {0,} 86 {0,}
86}; 87};
87 88
@@ -110,6 +111,7 @@ static struct board_type products[] = {
110 {0x3213103C, "Smart Array E200i", &SA5_access}, 111 {0x3213103C, "Smart Array E200i", &SA5_access},
111 {0x3214103C, "Smart Array E200i", &SA5_access}, 112 {0x3214103C, "Smart Array E200i", &SA5_access},
112 {0x3215103C, "Smart Array E200i", &SA5_access}, 113 {0x3215103C, "Smart Array E200i", &SA5_access},
114 {0x3233103C, "Smart Array E500", &SA5_access},
113}; 115};
114 116
115/* How long to wait (in milliseconds) for board to go into simple mode */ 117/* How long to wait (in milliseconds) for board to go into simple mode */
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 5109fa37c662..ad1d7065a1b2 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4177,6 +4177,11 @@ static int __init floppy_init(void)
4177 int i, unit, drive; 4177 int i, unit, drive;
4178 int err, dr; 4178 int err, dr;
4179 4179
4180#if defined(CONFIG_PPC_MERGE)
4181 if (check_legacy_ioport(FDC1))
4182 return -ENODEV;
4183#endif
4184
4180 raw_cmd = NULL; 4185 raw_cmd = NULL;
4181 4186
4182 for (dr = 0; dr < N_DRIVE; dr++) { 4187 for (dr = 0; dr < N_DRIVE; dr++) {
@@ -4234,13 +4239,6 @@ static int __init floppy_init(void)
4234 } 4239 }
4235 4240
4236 use_virtual_dma = can_use_virtual_dma & 1; 4241 use_virtual_dma = can_use_virtual_dma & 1;
4237#if defined(CONFIG_PPC_MERGE)
4238 if (check_legacy_ioport(FDC1)) {
4239 del_timer(&fd_timeout);
4240 err = -ENODEV;
4241 goto out_unreg_region;
4242 }
4243#endif
4244 fdc_state[0].address = FDC1; 4242 fdc_state[0].address = FDC1;
4245 if (fdc_state[0].address == -1) { 4243 if (fdc_state[0].address == -1) {
4246 del_timer(&fd_timeout); 4244 del_timer(&fd_timeout);
diff --git a/drivers/char/drm/radeon_state.c b/drivers/char/drm/radeon_state.c
index 5bb2234a9094..39a7f685e3fd 100644
--- a/drivers/char/drm/radeon_state.c
+++ b/drivers/char/drm/radeon_state.c
@@ -175,6 +175,14 @@ static __inline__ int radeon_check_and_fixup_packets(drm_radeon_private_t *
175 } 175 }
176 break; 176 break;
177 177
178 case R200_EMIT_VAP_CTL:{
179 RING_LOCALS;
180 BEGIN_RING(2);
181 OUT_RING_REG(RADEON_SE_TCL_STATE_FLUSH, 0);
182 ADVANCE_RING();
183 }
184 break;
185
178 case RADEON_EMIT_RB3D_COLORPITCH: 186 case RADEON_EMIT_RB3D_COLORPITCH:
179 case RADEON_EMIT_RE_LINE_PATTERN: 187 case RADEON_EMIT_RE_LINE_PATTERN:
180 case RADEON_EMIT_SE_LINE_WIDTH: 188 case RADEON_EMIT_SE_LINE_WIDTH:
@@ -202,7 +210,6 @@ static __inline__ int radeon_check_and_fixup_packets(drm_radeon_private_t *
202 case R200_EMIT_TCL_LIGHT_MODEL_CTL_0: 210 case R200_EMIT_TCL_LIGHT_MODEL_CTL_0:
203 case R200_EMIT_TFACTOR_0: 211 case R200_EMIT_TFACTOR_0:
204 case R200_EMIT_VTX_FMT_0: 212 case R200_EMIT_VTX_FMT_0:
205 case R200_EMIT_VAP_CTL:
206 case R200_EMIT_MATRIX_SELECT_0: 213 case R200_EMIT_MATRIX_SELECT_0:
207 case R200_EMIT_TEX_PROC_CTL_2: 214 case R200_EMIT_TEX_PROC_CTL_2:
208 case R200_EMIT_TCL_UCP_VERT_BLEND_CTL: 215 case R200_EMIT_TCL_UCP_VERT_BLEND_CTL:
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index ca2f538e549e..613d67f1c7f0 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -668,6 +668,7 @@ int khvcd(void *unused)
668 do { 668 do {
669 poll_mask = 0; 669 poll_mask = 0;
670 hvc_kicked = 0; 670 hvc_kicked = 0;
671 try_to_freeze();
671 wmb(); 672 wmb();
672 if (cpus_empty(cpus_in_xmon)) { 673 if (cpus_empty(cpus_in_xmon)) {
673 spin_lock(&hvc_structs_lock); 674 spin_lock(&hvc_structs_lock);
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 0aa5d608fe6f..843d34c8627c 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -3428,6 +3428,7 @@ struct ipmi_recv_msg *ipmi_alloc_recv_msg(void)
3428 3428
3429 rv = kmalloc(sizeof(struct ipmi_recv_msg), GFP_ATOMIC); 3429 rv = kmalloc(sizeof(struct ipmi_recv_msg), GFP_ATOMIC);
3430 if (rv) { 3430 if (rv) {
3431 rv->user = NULL;
3431 rv->done = free_recv_msg; 3432 rv->done = free_recv_msg;
3432 atomic_inc(&recv_msg_inuse_count); 3433 atomic_inc(&recv_msg_inuse_count);
3433 } 3434 }
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index f57eba0bf253..abca98beac14 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -402,10 +402,10 @@ static void handle_flags(struct smi_info *smi_info)
402 smi_info->curr_msg->data, 402 smi_info->curr_msg->data,
403 smi_info->curr_msg->data_size); 403 smi_info->curr_msg->data_size);
404 smi_info->si_state = SI_GETTING_EVENTS; 404 smi_info->si_state = SI_GETTING_EVENTS;
405 } else if (smi_info->msg_flags & OEM_DATA_AVAIL) { 405 } else if (smi_info->msg_flags & OEM_DATA_AVAIL &&
406 if (smi_info->oem_data_avail_handler) 406 smi_info->oem_data_avail_handler) {
407 if (smi_info->oem_data_avail_handler(smi_info)) 407 if (smi_info->oem_data_avail_handler(smi_info))
408 goto retry; 408 goto retry;
409 } else { 409 } else {
410 smi_info->si_state = SI_NORMAL; 410 smi_info->si_state = SI_NORMAL;
411 } 411 }
@@ -2481,6 +2481,7 @@ static __devinit int init_ipmi_si(void)
2481#ifdef CONFIG_PCI 2481#ifdef CONFIG_PCI
2482 pci_unregister_driver(&ipmi_pci_driver); 2482 pci_unregister_driver(&ipmi_pci_driver);
2483#endif 2483#endif
2484 driver_unregister(&ipmi_driver);
2484 printk("ipmi_si: Unable to find any System Interface(s)\n"); 2485 printk("ipmi_si: Unable to find any System Interface(s)\n");
2485 return -ENODEV; 2486 return -ENODEV;
2486 } else { 2487 } else {
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
index b2dbbdb1bf81..2f07b085536b 100644
--- a/drivers/char/synclink_gt.c
+++ b/drivers/char/synclink_gt.c
@@ -391,8 +391,8 @@ static MGSL_PARAMS default_params = {
391#define DESC_LIST_SIZE 4096 391#define DESC_LIST_SIZE 4096
392 392
393#define MASK_PARITY BIT1 393#define MASK_PARITY BIT1
394#define MASK_FRAMING BIT2 394#define MASK_FRAMING BIT0
395#define MASK_BREAK BIT3 395#define MASK_BREAK BIT14
396#define MASK_OVERRUN BIT4 396#define MASK_OVERRUN BIT4
397 397
398#define GSR 0x00 /* global status */ 398#define GSR 0x00 /* global status */
@@ -1800,17 +1800,17 @@ static void rx_async(struct slgt_info *info)
1800 1800
1801 stat = 0; 1801 stat = 0;
1802 1802
1803 if ((status = *(p+1) & (BIT9 + BIT8))) { 1803 if ((status = *(p+1) & (BIT1 + BIT0))) {
1804 if (status & BIT9) 1804 if (status & BIT1)
1805 icount->parity++; 1805 icount->parity++;
1806 else if (status & BIT8) 1806 else if (status & BIT0)
1807 icount->frame++; 1807 icount->frame++;
1808 /* discard char if tty control flags say so */ 1808 /* discard char if tty control flags say so */
1809 if (status & info->ignore_status_mask) 1809 if (status & info->ignore_status_mask)
1810 continue; 1810 continue;
1811 if (status & BIT9) 1811 if (status & BIT1)
1812 stat = TTY_PARITY; 1812 stat = TTY_PARITY;
1813 else if (status & BIT8) 1813 else if (status & BIT0)
1814 stat = TTY_FRAME; 1814 stat = TTY_FRAME;
1815 } 1815 }
1816 if (tty) { 1816 if (tty) {
diff --git a/drivers/char/watchdog/sbc8360.c b/drivers/char/watchdog/sbc8360.c
index 1035be5b5019..41fc6f80c493 100644
--- a/drivers/char/watchdog/sbc8360.c
+++ b/drivers/char/watchdog/sbc8360.c
@@ -200,7 +200,7 @@ static int wd_margin = 0xB;
200static int wd_multiplier = 2; 200static int wd_multiplier = 2;
201static int nowayout = WATCHDOG_NOWAYOUT; 201static int nowayout = WATCHDOG_NOWAYOUT;
202 202
203module_param(timeout, int, 27); 203module_param(timeout, int, 0);
204MODULE_PARM_DESC(timeout, "Index into timeout table (0-63) (default=27 (60s))"); 204MODULE_PARM_DESC(timeout, "Index into timeout table (0-63) (default=27 (60s))");
205module_param(nowayout, int, 0); 205module_param(nowayout, int, 0);
206MODULE_PARM_DESC(nowayout, 206MODULE_PARM_DESC(nowayout,
@@ -407,7 +407,7 @@ module_exit(sbc8360_exit);
407MODULE_AUTHOR("Ian E. Morgan <imorgan@webcon.ca>"); 407MODULE_AUTHOR("Ian E. Morgan <imorgan@webcon.ca>");
408MODULE_DESCRIPTION("SBC8360 watchdog driver"); 408MODULE_DESCRIPTION("SBC8360 watchdog driver");
409MODULE_LICENSE("GPL"); 409MODULE_LICENSE("GPL");
410MODULE_VERSION("1.0"); 410MODULE_VERSION("1.01");
411MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); 411MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
412 412
413/* end of sbc8360.c */ 413/* end of sbc8360.c */
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index c12f1b71e934..41b74b13a00c 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -376,6 +376,8 @@ static int proc_ide_read_media
376 break; 376 break;
377 case ide_floppy:media = "floppy\n"; 377 case ide_floppy:media = "floppy\n";
378 break; 378 break;
379 case ide_optical:media = "optical\n";
380 break;
379 default: media = "UNKNOWN\n"; 381 default: media = "UNKNOWN\n";
380 break; 382 break;
381 } 383 }
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c
index a7c725f8bf64..f286079d233f 100644
--- a/drivers/ide/pci/aec62xx.c
+++ b/drivers/ide/pci/aec62xx.c
@@ -425,12 +425,12 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi
425 return d->init_setup(dev, d); 425 return d->init_setup(dev, d);
426} 426}
427 427
428static const struct pci_device_id aec62xx_pci_tbl[] = { 428static struct pci_device_id aec62xx_pci_tbl[] = {
429 { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF), 0 }, 429 { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
430 { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860), 1 }, 430 { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },
431 { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860R), 2 }, 431 { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860R, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 },
432 { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865), 3 }, 432 { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 },
433 { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R), 4 }, 433 { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
434 { 0, }, 434 { 0, },
435}; 435};
436MODULE_DEVICE_TABLE(pci, aec62xx_pci_tbl); 436MODULE_DEVICE_TABLE(pci, aec62xx_pci_tbl);
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c
index 351dab2fcacf..d419e4bb54f4 100644
--- a/drivers/ide/pci/alim15x3.c
+++ b/drivers/ide/pci/alim15x3.c
@@ -730,7 +730,7 @@ static unsigned int __devinit ata66_ali15x3 (ide_hwif_t *hwif)
730 730
731 if(m5229_revision <= 0x20) 731 if(m5229_revision <= 0x20)
732 tmpbyte = (tmpbyte & (~0x02)) | 0x01; 732 tmpbyte = (tmpbyte & (~0x02)) | 0x01;
733 else if (m5229_revision == 0xc7) 733 else if (m5229_revision == 0xc7 || m5229_revision == 0xc8)
734 tmpbyte |= 0x03; 734 tmpbyte |= 0x03;
735 else 735 else
736 tmpbyte |= 0x01; 736 tmpbyte |= 0x01;
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c
index 03677bff0d72..f063d954236c 100644
--- a/drivers/ide/pci/serverworks.c
+++ b/drivers/ide/pci/serverworks.c
@@ -649,11 +649,11 @@ static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device
649} 649}
650 650
651static struct pci_device_id svwks_pci_tbl[] = { 651static struct pci_device_id svwks_pci_tbl[] = {
652 { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0}, 652 { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
653 { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE), 1}, 653 { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
654 { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE), 2}, 654 { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
655 { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2), 3}, 655 { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
656 { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE), 4}, 656 { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
657 { 0, }, 657 { 0, },
658}; 658};
659MODULE_DEVICE_TABLE(pci, svwks_pci_tbl); 659MODULE_DEVICE_TABLE(pci, svwks_pci_tbl);
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c
index e125032bb403..d8a0d87df734 100644
--- a/drivers/ide/pci/sgiioc4.c
+++ b/drivers/ide/pci/sgiioc4.c
@@ -367,12 +367,13 @@ sgiioc4_INB(unsigned long port)
367static void __devinit 367static void __devinit
368ide_dma_sgiioc4(ide_hwif_t * hwif, unsigned long dma_base) 368ide_dma_sgiioc4(ide_hwif_t * hwif, unsigned long dma_base)
369{ 369{
370 void __iomem *virt_dma_base;
370 int num_ports = sizeof (ioc4_dma_regs_t); 371 int num_ports = sizeof (ioc4_dma_regs_t);
371 372
372 printk(KERN_INFO "%s: BM-DMA at 0x%04lx-0x%04lx\n", hwif->name, 373 printk(KERN_INFO "%s: BM-DMA at 0x%04lx-0x%04lx\n", hwif->name,
373 dma_base, dma_base + num_ports - 1); 374 dma_base, dma_base + num_ports - 1);
374 375
375 if (!request_region(dma_base, num_ports, hwif->name)) { 376 if (!request_mem_region(dma_base, num_ports, hwif->name)) {
376 printk(KERN_ERR 377 printk(KERN_ERR
377 "%s(%s) -- ERROR, Addresses 0x%p to 0x%p " 378 "%s(%s) -- ERROR, Addresses 0x%p to 0x%p "
378 "ALREADY in use\n", 379 "ALREADY in use\n",
@@ -381,13 +382,21 @@ ide_dma_sgiioc4(ide_hwif_t * hwif, unsigned long dma_base)
381 goto dma_alloc_failure; 382 goto dma_alloc_failure;
382 } 383 }
383 384
384 hwif->dma_base = dma_base; 385 virt_dma_base = ioremap(dma_base, num_ports);
386 if (virt_dma_base == NULL) {
387 printk(KERN_ERR
388 "%s(%s) -- ERROR, Unable to map addresses 0x%lx to 0x%lx\n",
389 __FUNCTION__, hwif->name, dma_base, dma_base + num_ports - 1);
390 goto dma_remap_failure;
391 }
392 hwif->dma_base = (unsigned long) virt_dma_base;
393
385 hwif->dmatable_cpu = pci_alloc_consistent(hwif->pci_dev, 394 hwif->dmatable_cpu = pci_alloc_consistent(hwif->pci_dev,
386 IOC4_PRD_ENTRIES * IOC4_PRD_BYTES, 395 IOC4_PRD_ENTRIES * IOC4_PRD_BYTES,
387 &hwif->dmatable_dma); 396 &hwif->dmatable_dma);
388 397
389 if (!hwif->dmatable_cpu) 398 if (!hwif->dmatable_cpu)
390 goto dma_alloc_failure; 399 goto dma_pci_alloc_failure;
391 400
392 hwif->sg_max_nents = IOC4_PRD_ENTRIES; 401 hwif->sg_max_nents = IOC4_PRD_ENTRIES;
393 402
@@ -411,6 +420,12 @@ dma_base2alloc_failure:
411 printk(KERN_INFO 420 printk(KERN_INFO
412 "Changing from DMA to PIO mode for Drive %s\n", hwif->name); 421 "Changing from DMA to PIO mode for Drive %s\n", hwif->name);
413 422
423dma_pci_alloc_failure:
424 iounmap(virt_dma_base);
425
426dma_remap_failure:
427 release_mem_region(dma_base, num_ports);
428
414dma_alloc_failure: 429dma_alloc_failure:
415 /* Disable DMA because we couldnot allocate any DMA maps */ 430 /* Disable DMA because we couldnot allocate any DMA maps */
416 hwif->autodma = 0; 431 hwif->autodma = 0;
@@ -607,18 +622,15 @@ ide_init_sgiioc4(ide_hwif_t * hwif)
607 hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq; 622 hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq;
608 hwif->ide_dma_timeout = &__ide_dma_timeout; 623 hwif->ide_dma_timeout = &__ide_dma_timeout;
609 624
610 /*
611 * The IOC4 uses MMIO rather than Port IO.
612 * It also needs special workarounds for INB.
613 */
614 default_hwif_mmiops(hwif);
615 hwif->INB = &sgiioc4_INB; 625 hwif->INB = &sgiioc4_INB;
616} 626}
617 627
618static int __devinit 628static int __devinit
619sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d) 629sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d)
620{ 630{
621 unsigned long base, ctl, dma_base, irqport; 631 unsigned long cmd_base, dma_base, irqport;
632 unsigned long bar0, cmd_phys_base, ctl;
633 void __iomem *virt_base;
622 ide_hwif_t *hwif; 634 ide_hwif_t *hwif;
623 int h; 635 int h;
624 636
@@ -636,23 +648,32 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d)
636 } 648 }
637 649
638 /* Get the CmdBlk and CtrlBlk Base Registers */ 650 /* Get the CmdBlk and CtrlBlk Base Registers */
639 base = pci_resource_start(dev, 0) + IOC4_CMD_OFFSET; 651 bar0 = pci_resource_start(dev, 0);
640 ctl = pci_resource_start(dev, 0) + IOC4_CTRL_OFFSET; 652 virt_base = ioremap(bar0, pci_resource_len(dev, 0));
641 irqport = pci_resource_start(dev, 0) + IOC4_INTR_OFFSET; 653 if (virt_base == NULL) {
654 printk(KERN_ERR "%s: Unable to remap BAR 0 address: 0x%lx\n",
655 d->name, bar0);
656 return -ENOMEM;
657 }
658 cmd_base = (unsigned long) virt_base + IOC4_CMD_OFFSET;
659 ctl = (unsigned long) virt_base + IOC4_CTRL_OFFSET;
660 irqport = (unsigned long) virt_base + IOC4_INTR_OFFSET;
642 dma_base = pci_resource_start(dev, 0) + IOC4_DMA_OFFSET; 661 dma_base = pci_resource_start(dev, 0) + IOC4_DMA_OFFSET;
643 662
644 if (!request_region(base, IOC4_CMD_CTL_BLK_SIZE, hwif->name)) { 663 cmd_phys_base = bar0 + IOC4_CMD_OFFSET;
664 if (!request_mem_region(cmd_phys_base, IOC4_CMD_CTL_BLK_SIZE,
665 hwif->name)) {
645 printk(KERN_ERR 666 printk(KERN_ERR
646 "%s : %s -- ERROR, Port Addresses " 667 "%s : %s -- ERROR, Addresses "
647 "0x%p to 0x%p ALREADY in use\n", 668 "0x%p to 0x%p ALREADY in use\n",
648 __FUNCTION__, hwif->name, (void *) base, 669 __FUNCTION__, hwif->name, (void *) cmd_phys_base,
649 (void *) base + IOC4_CMD_CTL_BLK_SIZE); 670 (void *) cmd_phys_base + IOC4_CMD_CTL_BLK_SIZE);
650 return -ENOMEM; 671 return -ENOMEM;
651 } 672 }
652 673
653 if (hwif->io_ports[IDE_DATA_OFFSET] != base) { 674 if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base) {
654 /* Initialize the IO registers */ 675 /* Initialize the IO registers */
655 sgiioc4_init_hwif_ports(&hwif->hw, base, ctl, irqport); 676 sgiioc4_init_hwif_ports(&hwif->hw, cmd_base, ctl, irqport);
656 memcpy(hwif->io_ports, hwif->hw.io_ports, 677 memcpy(hwif->io_ports, hwif->hw.io_ports,
657 sizeof (hwif->io_ports)); 678 sizeof (hwif->io_ports));
658 hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET]; 679 hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET];
@@ -665,6 +686,9 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d)
665 hwif->cds = (struct ide_pci_device_s *) d; 686 hwif->cds = (struct ide_pci_device_s *) d;
666 hwif->gendev.parent = &dev->dev;/* setup proper ancestral information */ 687 hwif->gendev.parent = &dev->dev;/* setup proper ancestral information */
667 688
689 /* The IOC4 uses MMIO rather than Port IO. */
690 default_hwif_mmiops(hwif);
691
668 /* Initializing chipset IRQ Registers */ 692 /* Initializing chipset IRQ Registers */
669 hwif->OUTL(0x03, irqport + IOC4_INTR_SET * 4); 693 hwif->OUTL(0x03, irqport + IOC4_INTR_SET * 4);
670 694
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
index 25ceb4a39ed2..20b392948f36 100644
--- a/drivers/ide/pci/siimage.c
+++ b/drivers/ide/pci/siimage.c
@@ -1082,10 +1082,10 @@ static int __devinit siimage_init_one(struct pci_dev *dev, const struct pci_devi
1082} 1082}
1083 1083
1084static struct pci_device_id siimage_pci_tbl[] = { 1084static struct pci_device_id siimage_pci_tbl[] = {
1085 { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_680), 0}, 1085 { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
1086#ifdef CONFIG_BLK_DEV_IDE_SATA 1086#ifdef CONFIG_BLK_DEV_IDE_SATA
1087 { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112), 1}, 1087 { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
1088 { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA), 2}, 1088 { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
1089#endif 1089#endif
1090 { 0, }, 1090 { 0, },
1091}; 1091};
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c
index 8a6c23ac8cc1..f03196c5db37 100644
--- a/drivers/ide/pci/sis5513.c
+++ b/drivers/ide/pci/sis5513.c
@@ -86,6 +86,8 @@ static const struct {
86 u8 chipset_family; 86 u8 chipset_family;
87 u8 flags; 87 u8 flags;
88} SiSHostChipInfo[] = { 88} SiSHostChipInfo[] = {
89 { "SiS968", PCI_DEVICE_ID_SI_968, ATA_133 },
90 { "SiS966", PCI_DEVICE_ID_SI_966, ATA_133 },
89 { "SiS965", PCI_DEVICE_ID_SI_965, ATA_133 }, 91 { "SiS965", PCI_DEVICE_ID_SI_965, ATA_133 },
90 { "SiS745", PCI_DEVICE_ID_SI_745, ATA_100 }, 92 { "SiS745", PCI_DEVICE_ID_SI_745, ATA_100 },
91 { "SiS735", PCI_DEVICE_ID_SI_735, ATA_100 }, 93 { "SiS735", PCI_DEVICE_ID_SI_735, ATA_100 },
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
index afdaee3c15c9..9b7589e8e93e 100644
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -6,7 +6,7 @@
6 * 6 *
7 * vt82c576, vt82c586, vt82c586a, vt82c586b, vt82c596a, vt82c596b, 7 * vt82c576, vt82c586, vt82c586a, vt82c586b, vt82c596a, vt82c596b,
8 * vt82c686, vt82c686a, vt82c686b, vt8231, vt8233, vt8233c, vt8233a, 8 * vt82c686, vt82c686a, vt82c686b, vt8231, vt8233, vt8233c, vt8233a,
9 * vt8235, vt8237 9 * vt8235, vt8237, vt8237a
10 * 10 *
11 * Copyright (c) 2000-2002 Vojtech Pavlik 11 * Copyright (c) 2000-2002 Vojtech Pavlik
12 * 12 *
@@ -81,6 +81,7 @@ static struct via_isa_bridge {
81 { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 81 { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
82 { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 82 { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
83 { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 83 { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
84 { "vt8237a", PCI_DEVICE_ID_VIA_8237A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
84 { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 85 { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
85 { "vt8233a", PCI_DEVICE_ID_VIA_8233A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 86 { "vt8233a", PCI_DEVICE_ID_VIA_8233A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
86 { "vt8233c", PCI_DEVICE_ID_VIA_8233C_0, 0x00, 0x2f, VIA_UDMA_100 }, 87 { "vt8233c", PCI_DEVICE_ID_VIA_8233C_0, 0x00, 0x2f, VIA_UDMA_100 },
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index d6f99d5720fc..5d625a81193f 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -49,7 +49,7 @@ MODULE_DESCRIPTION("Generic RDMA CM Agent");
49MODULE_LICENSE("Dual BSD/GPL"); 49MODULE_LICENSE("Dual BSD/GPL");
50 50
51#define CMA_CM_RESPONSE_TIMEOUT 20 51#define CMA_CM_RESPONSE_TIMEOUT 20
52#define CMA_MAX_CM_RETRIES 3 52#define CMA_MAX_CM_RETRIES 15
53 53
54static void cma_add_one(struct ib_device *device); 54static void cma_add_one(struct ib_device *device);
55static void cma_remove_one(struct ib_device *device); 55static void cma_remove_one(struct ib_device *device);
diff --git a/drivers/infiniband/hw/mthca/mthca_allocator.c b/drivers/infiniband/hw/mthca/mthca_allocator.c
index 25157f57a6d0..f930e55b58fc 100644
--- a/drivers/infiniband/hw/mthca/mthca_allocator.c
+++ b/drivers/infiniband/hw/mthca/mthca_allocator.c
@@ -41,9 +41,11 @@
41/* Trivial bitmap-based allocator */ 41/* Trivial bitmap-based allocator */
42u32 mthca_alloc(struct mthca_alloc *alloc) 42u32 mthca_alloc(struct mthca_alloc *alloc)
43{ 43{
44 unsigned long flags;
44 u32 obj; 45 u32 obj;
45 46
46 spin_lock(&alloc->lock); 47 spin_lock_irqsave(&alloc->lock, flags);
48
47 obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last); 49 obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last);
48 if (obj >= alloc->max) { 50 if (obj >= alloc->max) {
49 alloc->top = (alloc->top + alloc->max) & alloc->mask; 51 alloc->top = (alloc->top + alloc->max) & alloc->mask;
@@ -56,19 +58,24 @@ u32 mthca_alloc(struct mthca_alloc *alloc)
56 } else 58 } else
57 obj = -1; 59 obj = -1;
58 60
59 spin_unlock(&alloc->lock); 61 spin_unlock_irqrestore(&alloc->lock, flags);
60 62
61 return obj; 63 return obj;
62} 64}
63 65
64void mthca_free(struct mthca_alloc *alloc, u32 obj) 66void mthca_free(struct mthca_alloc *alloc, u32 obj)
65{ 67{
68 unsigned long flags;
69
66 obj &= alloc->max - 1; 70 obj &= alloc->max - 1;
67 spin_lock(&alloc->lock); 71
72 spin_lock_irqsave(&alloc->lock, flags);
73
68 clear_bit(obj, alloc->table); 74 clear_bit(obj, alloc->table);
69 alloc->last = min(alloc->last, obj); 75 alloc->last = min(alloc->last, obj);
70 alloc->top = (alloc->top + alloc->max) & alloc->mask; 76 alloc->top = (alloc->top + alloc->max) & alloc->mask;
71 spin_unlock(&alloc->lock); 77
78 spin_unlock_irqrestore(&alloc->lock, flags);
72} 79}
73 80
74int mthca_alloc_init(struct mthca_alloc *alloc, u32 num, u32 mask, 81int mthca_alloc_init(struct mthca_alloc *alloc, u32 num, u32 mask,
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index b5e6a7be603d..ec356ce7cdcd 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -326,6 +326,7 @@ ipoib_mcast_sendonly_join_complete(int status,
326 326
327 /* Clear the busy flag so we try again */ 327 /* Clear the busy flag so we try again */
328 clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags); 328 clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags);
329 mcast->query = NULL;
329 } 330 }
330 331
331 complete(&mcast->done); 332 complete(&mcast->done);
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 8257d5a2c8f8..fd8344cdc0db 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -799,13 +799,6 @@ static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp)
799 spin_unlock_irqrestore(target->scsi_host->host_lock, flags); 799 spin_unlock_irqrestore(target->scsi_host->host_lock, flags);
800} 800}
801 801
802static void srp_reconnect_work(void *target_ptr)
803{
804 struct srp_target_port *target = target_ptr;
805
806 srp_reconnect_target(target);
807}
808
809static void srp_handle_recv(struct srp_target_port *target, struct ib_wc *wc) 802static void srp_handle_recv(struct srp_target_port *target, struct ib_wc *wc)
810{ 803{
811 struct srp_iu *iu; 804 struct srp_iu *iu;
@@ -858,7 +851,6 @@ static void srp_completion(struct ib_cq *cq, void *target_ptr)
858{ 851{
859 struct srp_target_port *target = target_ptr; 852 struct srp_target_port *target = target_ptr;
860 struct ib_wc wc; 853 struct ib_wc wc;
861 unsigned long flags;
862 854
863 ib_req_notify_cq(cq, IB_CQ_NEXT_COMP); 855 ib_req_notify_cq(cq, IB_CQ_NEXT_COMP);
864 while (ib_poll_cq(cq, 1, &wc) > 0) { 856 while (ib_poll_cq(cq, 1, &wc) > 0) {
@@ -866,10 +858,6 @@ static void srp_completion(struct ib_cq *cq, void *target_ptr)
866 printk(KERN_ERR PFX "failed %s status %d\n", 858 printk(KERN_ERR PFX "failed %s status %d\n",
867 wc.wr_id & SRP_OP_RECV ? "receive" : "send", 859 wc.wr_id & SRP_OP_RECV ? "receive" : "send",
868 wc.status); 860 wc.status);
869 spin_lock_irqsave(target->scsi_host->host_lock, flags);
870 if (target->state == SRP_TARGET_LIVE)
871 schedule_work(&target->work);
872 spin_unlock_irqrestore(target->scsi_host->host_lock, flags);
873 break; 861 break;
874 } 862 }
875 863
@@ -1705,8 +1693,6 @@ static ssize_t srp_create_target(struct class_device *class_dev,
1705 target->scsi_host = target_host; 1693 target->scsi_host = target_host;
1706 target->srp_host = host; 1694 target->srp_host = host;
1707 1695
1708 INIT_WORK(&target->work, srp_reconnect_work, target);
1709
1710 INIT_LIST_HEAD(&target->free_reqs); 1696 INIT_LIST_HEAD(&target->free_reqs);
1711 INIT_LIST_HEAD(&target->req_queue); 1697 INIT_LIST_HEAD(&target->req_queue);
1712 for (i = 0; i < SRP_SQ_SIZE; ++i) { 1698 for (i = 0; i < SRP_SQ_SIZE; ++i) {
diff --git a/drivers/macintosh/via-pmu-backlight.c b/drivers/macintosh/via-pmu-backlight.c
index d3f8d75bcbb4..a82f313d9dc9 100644
--- a/drivers/macintosh/via-pmu-backlight.c
+++ b/drivers/macintosh/via-pmu-backlight.c
@@ -18,17 +18,48 @@
18static struct backlight_properties pmu_backlight_data; 18static struct backlight_properties pmu_backlight_data;
19static spinlock_t pmu_backlight_lock; 19static spinlock_t pmu_backlight_lock;
20static int sleeping; 20static int sleeping;
21static u8 bl_curve[FB_BACKLIGHT_LEVELS];
21 22
22static int pmu_backlight_get_level_brightness(struct fb_info *info, 23static void pmu_backlight_init_curve(u8 off, u8 min, u8 max)
23 int level) 24{
25 unsigned int i, flat, count, range = (max - min);
26
27 bl_curve[0] = off;
28
29 for (flat = 1; flat < (FB_BACKLIGHT_LEVELS / 16); ++flat)
30 bl_curve[flat] = min;
31
32 count = FB_BACKLIGHT_LEVELS * 15 / 16;
33 for (i = 0; i < count; ++i)
34 bl_curve[flat + i] = min + (range * (i + 1) / count);
35}
36
37static int pmu_backlight_curve_lookup(int value)
38{
39 int level = (FB_BACKLIGHT_LEVELS - 1);
40 int i, max = 0;
41
42 /* Look for biggest value */
43 for (i = 0; i < FB_BACKLIGHT_LEVELS; i++)
44 max = max((int)bl_curve[i], max);
45
46 /* Look for nearest value */
47 for (i = 0; i < FB_BACKLIGHT_LEVELS; i++) {
48 int diff = abs(bl_curve[i] - value);
49 if (diff < max) {
50 max = diff;
51 level = i;
52 }
53 }
54 return level;
55}
56
57static int pmu_backlight_get_level_brightness(int level)
24{ 58{
25 int pmulevel; 59 int pmulevel;
26 60
27 /* Get and convert the value */ 61 /* Get and convert the value */
28 mutex_lock(&info->bl_mutex); 62 pmulevel = bl_curve[level] * FB_BACKLIGHT_MAX / MAX_PMU_LEVEL;
29 pmulevel = info->bl_curve[level] * FB_BACKLIGHT_MAX / MAX_PMU_LEVEL;
30 mutex_unlock(&info->bl_mutex);
31
32 if (pmulevel < 0) 63 if (pmulevel < 0)
33 pmulevel = 0; 64 pmulevel = 0;
34 else if (pmulevel > MAX_PMU_LEVEL) 65 else if (pmulevel > MAX_PMU_LEVEL)
@@ -39,7 +70,6 @@ static int pmu_backlight_get_level_brightness(struct fb_info *info,
39 70
40static int pmu_backlight_update_status(struct backlight_device *bd) 71static int pmu_backlight_update_status(struct backlight_device *bd)
41{ 72{
42 struct fb_info *info = class_get_devdata(&bd->class_dev);
43 struct adb_request req; 73 struct adb_request req;
44 unsigned long flags; 74 unsigned long flags;
45 int level = bd->props->brightness; 75 int level = bd->props->brightness;
@@ -55,7 +85,7 @@ static int pmu_backlight_update_status(struct backlight_device *bd)
55 level = 0; 85 level = 0;
56 86
57 if (level > 0) { 87 if (level > 0) {
58 int pmulevel = pmu_backlight_get_level_brightness(info, level); 88 int pmulevel = pmu_backlight_get_level_brightness(level);
59 89
60 pmu_request(&req, NULL, 2, PMU_BACKLIGHT_BRIGHT, pmulevel); 90 pmu_request(&req, NULL, 2, PMU_BACKLIGHT_BRIGHT, pmulevel);
61 pmu_wait_complete(&req); 91 pmu_wait_complete(&req);
@@ -88,35 +118,19 @@ static struct backlight_properties pmu_backlight_data = {
88}; 118};
89 119
90#ifdef CONFIG_PM 120#ifdef CONFIG_PM
91static int pmu_backlight_sleep_call(struct pmu_sleep_notifier *self, int when) 121void pmu_backlight_set_sleep(int sleep)
92{ 122{
93 unsigned long flags; 123 unsigned long flags;
94 124
95 spin_lock_irqsave(&pmu_backlight_lock, flags); 125 spin_lock_irqsave(&pmu_backlight_lock, flags);
96 126 sleeping = sleep;
97 switch (when) {
98 case PBOOK_SLEEP_REQUEST:
99 sleeping = 1;
100 break;
101 case PBOOK_WAKE:
102 sleeping = 0;
103 break;
104 }
105
106 spin_unlock_irqrestore(&pmu_backlight_lock, flags); 127 spin_unlock_irqrestore(&pmu_backlight_lock, flags);
107
108 return PBOOK_SLEEP_OK;
109} 128}
110 129#endif /* CONFIG_PM */
111static struct pmu_sleep_notifier pmu_backlight_sleep_notif = {
112 .notifier_call = pmu_backlight_sleep_call,
113};
114#endif
115 130
116void __init pmu_backlight_init() 131void __init pmu_backlight_init()
117{ 132{
118 struct backlight_device *bd; 133 struct backlight_device *bd;
119 struct fb_info *info;
120 char name[10]; 134 char name[10];
121 int level, autosave; 135 int level, autosave;
122 136
@@ -131,27 +145,14 @@ void __init pmu_backlight_init()
131 !machine_is_compatible("PowerBook1,1")) 145 !machine_is_compatible("PowerBook1,1"))
132 return; 146 return;
133 147
134 /* Actually, this is a hack, but I don't know of a better way 148 snprintf(name, sizeof(name), "pmubl");
135 * to get the first framebuffer device.
136 */
137 info = registered_fb[0];
138 if (!info) {
139 printk("pmubl: No framebuffer found\n");
140 goto error;
141 }
142
143 snprintf(name, sizeof(name), "pmubl%d", info->node);
144 149
145 bd = backlight_device_register(name, info, &pmu_backlight_data); 150 bd = backlight_device_register(name, NULL, &pmu_backlight_data);
146 if (IS_ERR(bd)) { 151 if (IS_ERR(bd)) {
147 printk("pmubl: Backlight registration failed\n"); 152 printk("pmubl: Backlight registration failed\n");
148 goto error; 153 goto error;
149 } 154 }
150 155 pmu_backlight_init_curve(0x7F, 0x46, 0x0E);
151 mutex_lock(&info->bl_mutex);
152 info->bl_dev = bd;
153 fb_bl_default_curve(info, 0x7F, 0x46, 0x0E);
154 mutex_unlock(&info->bl_mutex);
155 156
156 level = pmu_backlight_data.max_brightness; 157 level = pmu_backlight_data.max_brightness;
157 158
@@ -161,28 +162,22 @@ void __init pmu_backlight_init()
161 pmu_request(&req, NULL, 2, 0xd9, 0); 162 pmu_request(&req, NULL, 2, 0xd9, 0);
162 pmu_wait_complete(&req); 163 pmu_wait_complete(&req);
163 164
164 mutex_lock(&info->bl_mutex); 165 level = pmu_backlight_curve_lookup(
165 level = pmac_backlight_curve_lookup(info,
166 (req.reply[0] >> 4) * 166 (req.reply[0] >> 4) *
167 pmu_backlight_data.max_brightness / 15); 167 pmu_backlight_data.max_brightness / 15);
168 mutex_unlock(&info->bl_mutex);
169 } 168 }
170 169
171 up(&bd->sem); 170 down(&bd->sem);
172 bd->props->brightness = level; 171 bd->props->brightness = level;
173 bd->props->power = FB_BLANK_UNBLANK; 172 bd->props->power = FB_BLANK_UNBLANK;
174 bd->props->update_status(bd); 173 bd->props->update_status(bd);
175 down(&bd->sem); 174 up(&bd->sem);
176 175
177 mutex_lock(&pmac_backlight_mutex); 176 mutex_lock(&pmac_backlight_mutex);
178 if (!pmac_backlight) 177 if (!pmac_backlight)
179 pmac_backlight = bd; 178 pmac_backlight = bd;
180 mutex_unlock(&pmac_backlight_mutex); 179 mutex_unlock(&pmac_backlight_mutex);
181 180
182#ifdef CONFIG_PM
183 pmu_register_sleep_notifier(&pmu_backlight_sleep_notif);
184#endif
185
186 printk("pmubl: Backlight initialized (%s)\n", name); 181 printk("pmubl: Backlight initialized (%s)\n", name);
187 182
188 return; 183 return;
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index ea386801e215..14610a63f580 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -1995,6 +1995,8 @@ restore_via_state(void)
1995 out_8(&via[IER], IER_SET | SR_INT | CB1_INT); 1995 out_8(&via[IER], IER_SET | SR_INT | CB1_INT);
1996} 1996}
1997 1997
1998extern void pmu_backlight_set_sleep(int sleep);
1999
1998static int 2000static int
1999pmac_suspend_devices(void) 2001pmac_suspend_devices(void)
2000{ 2002{
@@ -2032,6 +2034,11 @@ pmac_suspend_devices(void)
2032 return -EBUSY; 2034 return -EBUSY;
2033 } 2035 }
2034 2036
2037#ifdef CONFIG_PMAC_BACKLIGHT
2038 /* Tell backlight code not to muck around with the chip anymore */
2039 pmu_backlight_set_sleep(1);
2040#endif
2041
2035 /* Call platform functions marked "on sleep" */ 2042 /* Call platform functions marked "on sleep" */
2036 pmac_pfunc_i2c_suspend(); 2043 pmac_pfunc_i2c_suspend();
2037 pmac_pfunc_base_suspend(); 2044 pmac_pfunc_base_suspend();
@@ -2090,6 +2097,11 @@ pmac_wakeup_devices(void)
2090{ 2097{
2091 mdelay(100); 2098 mdelay(100);
2092 2099
2100#ifdef CONFIG_PMAC_BACKLIGHT
2101 /* Tell backlight code it can use the chip again */
2102 pmu_backlight_set_sleep(0);
2103#endif
2104
2093 /* Power back up system devices (including the PIC) */ 2105 /* Power back up system devices (including the PIC) */
2094 device_power_up(); 2106 device_power_up();
2095 2107
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 87bfe9e7d8ca..3b4d69c05623 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -930,10 +930,13 @@ static void status(struct seq_file *seq, mddev_t *mddev)
930 930
931 seq_printf(seq, " [%d/%d] [", conf->raid_disks, 931 seq_printf(seq, " [%d/%d] [", conf->raid_disks,
932 conf->working_disks); 932 conf->working_disks);
933 for (i = 0; i < conf->raid_disks; i++) 933 rcu_read_lock();
934 for (i = 0; i < conf->raid_disks; i++) {
935 mdk_rdev_t *rdev = rcu_dereference(conf->mirrors[i].rdev);
934 seq_printf(seq, "%s", 936 seq_printf(seq, "%s",
935 conf->mirrors[i].rdev && 937 rdev && test_bit(In_sync, &rdev->flags) ? "U" : "_");
936 test_bit(In_sync, &conf->mirrors[i].rdev->flags) ? "U" : "_"); 938 }
939 rcu_read_unlock();
937 seq_printf(seq, "]"); 940 seq_printf(seq, "]");
938} 941}
939 942
@@ -975,7 +978,6 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
975static void print_conf(conf_t *conf) 978static void print_conf(conf_t *conf)
976{ 979{
977 int i; 980 int i;
978 mirror_info_t *tmp;
979 981
980 printk("RAID1 conf printout:\n"); 982 printk("RAID1 conf printout:\n");
981 if (!conf) { 983 if (!conf) {
@@ -985,14 +987,17 @@ static void print_conf(conf_t *conf)
985 printk(" --- wd:%d rd:%d\n", conf->working_disks, 987 printk(" --- wd:%d rd:%d\n", conf->working_disks,
986 conf->raid_disks); 988 conf->raid_disks);
987 989
990 rcu_read_lock();
988 for (i = 0; i < conf->raid_disks; i++) { 991 for (i = 0; i < conf->raid_disks; i++) {
989 char b[BDEVNAME_SIZE]; 992 char b[BDEVNAME_SIZE];
990 tmp = conf->mirrors + i; 993 mdk_rdev_t *rdev = rcu_dereference(conf->mirrors[i].rdev);
991 if (tmp->rdev) 994 if (rdev)
992 printk(" disk %d, wo:%d, o:%d, dev:%s\n", 995 printk(" disk %d, wo:%d, o:%d, dev:%s\n",
993 i, !test_bit(In_sync, &tmp->rdev->flags), !test_bit(Faulty, &tmp->rdev->flags), 996 i, !test_bit(In_sync, &rdev->flags),
994 bdevname(tmp->rdev->bdev,b)); 997 !test_bit(Faulty, &rdev->flags),
998 bdevname(rdev->bdev,b));
995 } 999 }
1000 rcu_read_unlock();
996} 1001}
997 1002
998static void close_sync(conf_t *conf) 1003static void close_sync(conf_t *conf)
@@ -1008,20 +1013,20 @@ static int raid1_spare_active(mddev_t *mddev)
1008{ 1013{
1009 int i; 1014 int i;
1010 conf_t *conf = mddev->private; 1015 conf_t *conf = mddev->private;
1011 mirror_info_t *tmp;
1012 1016
1013 /* 1017 /*
1014 * Find all failed disks within the RAID1 configuration 1018 * Find all failed disks within the RAID1 configuration
1015 * and mark them readable 1019 * and mark them readable.
1020 * Called under mddev lock, so rcu protection not needed.
1016 */ 1021 */
1017 for (i = 0; i < conf->raid_disks; i++) { 1022 for (i = 0; i < conf->raid_disks; i++) {
1018 tmp = conf->mirrors + i; 1023 mdk_rdev_t *rdev = conf->mirrors[i].rdev;
1019 if (tmp->rdev 1024 if (rdev
1020 && !test_bit(Faulty, &tmp->rdev->flags) 1025 && !test_bit(Faulty, &rdev->flags)
1021 && !test_bit(In_sync, &tmp->rdev->flags)) { 1026 && !test_bit(In_sync, &rdev->flags)) {
1022 conf->working_disks++; 1027 conf->working_disks++;
1023 mddev->degraded--; 1028 mddev->degraded--;
1024 set_bit(In_sync, &tmp->rdev->flags); 1029 set_bit(In_sync, &rdev->flags);
1025 } 1030 }
1026 } 1031 }
1027 1032
@@ -1237,7 +1242,7 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio)
1237 /* ouch - failed to read all of that. 1242 /* ouch - failed to read all of that.
1238 * Try some synchronous reads of other devices to get 1243 * Try some synchronous reads of other devices to get
1239 * good data, much like with normal read errors. Only 1244 * good data, much like with normal read errors. Only
1240 * read into the pages we already have so they we don't 1245 * read into the pages we already have so we don't
1241 * need to re-issue the read request. 1246 * need to re-issue the read request.
1242 * We don't need to freeze the array, because being in an 1247 * We don't need to freeze the array, because being in an
1243 * active sync request, there is no normal IO, and 1248 * active sync request, there is no normal IO, and
@@ -1257,6 +1262,10 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio)
1257 s = PAGE_SIZE >> 9; 1262 s = PAGE_SIZE >> 9;
1258 do { 1263 do {
1259 if (r1_bio->bios[d]->bi_end_io == end_sync_read) { 1264 if (r1_bio->bios[d]->bi_end_io == end_sync_read) {
1265 /* No rcu protection needed here devices
1266 * can only be removed when no resync is
1267 * active, and resync is currently active
1268 */
1260 rdev = conf->mirrors[d].rdev; 1269 rdev = conf->mirrors[d].rdev;
1261 if (sync_page_io(rdev->bdev, 1270 if (sync_page_io(rdev->bdev,
1262 sect + rdev->data_offset, 1271 sect + rdev->data_offset,
@@ -1463,6 +1472,11 @@ static void raid1d(mddev_t *mddev)
1463 s = PAGE_SIZE >> 9; 1472 s = PAGE_SIZE >> 9;
1464 1473
1465 do { 1474 do {
1475 /* Note: no rcu protection needed here
1476 * as this is synchronous in the raid1d thread
1477 * which is the thread that might remove
1478 * a device. If raid1d ever becomes multi-threaded....
1479 */
1466 rdev = conf->mirrors[d].rdev; 1480 rdev = conf->mirrors[d].rdev;
1467 if (rdev && 1481 if (rdev &&
1468 test_bit(In_sync, &rdev->flags) && 1482 test_bit(In_sync, &rdev->flags) &&
@@ -1486,7 +1500,6 @@ static void raid1d(mddev_t *mddev)
1486 d = conf->raid_disks; 1500 d = conf->raid_disks;
1487 d--; 1501 d--;
1488 rdev = conf->mirrors[d].rdev; 1502 rdev = conf->mirrors[d].rdev;
1489 atomic_add(s, &rdev->corrected_errors);
1490 if (rdev && 1503 if (rdev &&
1491 test_bit(In_sync, &rdev->flags)) { 1504 test_bit(In_sync, &rdev->flags)) {
1492 if (sync_page_io(rdev->bdev, 1505 if (sync_page_io(rdev->bdev,
@@ -1509,9 +1522,11 @@ static void raid1d(mddev_t *mddev)
1509 s<<9, conf->tmppage, READ) == 0) 1522 s<<9, conf->tmppage, READ) == 0)
1510 /* Well, this device is dead */ 1523 /* Well, this device is dead */
1511 md_error(mddev, rdev); 1524 md_error(mddev, rdev);
1512 else 1525 else {
1526 atomic_add(s, &rdev->corrected_errors);
1513 printk(KERN_INFO "raid1:%s: read error corrected (%d sectors at %llu on %s)\n", 1527 printk(KERN_INFO "raid1:%s: read error corrected (%d sectors at %llu on %s)\n",
1514 mdname(mddev), s, (unsigned long long)(sect + rdev->data_offset), bdevname(rdev->bdev, b)); 1528 mdname(mddev), s, (unsigned long long)(sect + rdev->data_offset), bdevname(rdev->bdev, b));
1529 }
1515 } 1530 }
1516 } 1531 }
1517 } else { 1532 } else {
@@ -1787,19 +1802,17 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
1787 for (i=0; i<conf->raid_disks; i++) { 1802 for (i=0; i<conf->raid_disks; i++) {
1788 bio = r1_bio->bios[i]; 1803 bio = r1_bio->bios[i];
1789 if (bio->bi_end_io == end_sync_read) { 1804 if (bio->bi_end_io == end_sync_read) {
1790 md_sync_acct(conf->mirrors[i].rdev->bdev, nr_sectors); 1805 md_sync_acct(bio->bi_bdev, nr_sectors);
1791 generic_make_request(bio); 1806 generic_make_request(bio);
1792 } 1807 }
1793 } 1808 }
1794 } else { 1809 } else {
1795 atomic_set(&r1_bio->remaining, 1); 1810 atomic_set(&r1_bio->remaining, 1);
1796 bio = r1_bio->bios[r1_bio->read_disk]; 1811 bio = r1_bio->bios[r1_bio->read_disk];
1797 md_sync_acct(conf->mirrors[r1_bio->read_disk].rdev->bdev, 1812 md_sync_acct(bio->bi_bdev, nr_sectors);
1798 nr_sectors);
1799 generic_make_request(bio); 1813 generic_make_request(bio);
1800 1814
1801 } 1815 }
1802
1803 return nr_sectors; 1816 return nr_sectors;
1804} 1817}
1805 1818
diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index ef52e6da01ed..ed4aa4e7912c 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -53,7 +53,7 @@ config VIDEO_V4L1_COMPAT
53 If you are unsure as to whether this is required, answer Y. 53 If you are unsure as to whether this is required, answer Y.
54 54
55config VIDEO_V4L2 55config VIDEO_V4L2
56 tristate 56 bool
57 default y 57 default y
58 58
59source "drivers/media/video/Kconfig" 59source "drivers/media/video/Kconfig"
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c
index 8393d472d3b8..7e0cedc557df 100644
--- a/drivers/media/common/saa7146_video.c
+++ b/drivers/media/common/saa7146_video.c
@@ -1190,6 +1190,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
1190 } 1190 }
1191 return err; 1191 return err;
1192 } 1192 }
1193#ifdef CONFIG_VIDEO_V4L1_COMPAT
1193 case VIDIOCGMBUF: 1194 case VIDIOCGMBUF:
1194 { 1195 {
1195 struct video_mbuf *mbuf = arg; 1196 struct video_mbuf *mbuf = arg;
@@ -1218,6 +1219,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
1218 mutex_unlock(&q->lock); 1219 mutex_unlock(&q->lock);
1219 return 0; 1220 return 0;
1220 } 1221 }
1222#endif
1221 default: 1223 default:
1222 return v4l_compat_translate_ioctl(inode,file,cmd,arg, 1224 return v4l_compat_translate_ioctl(inode,file,cmd,arg,
1223 saa7146_video_do_ioctl); 1225 saa7146_video_do_ioctl);
diff --git a/drivers/media/dvb/b2c2/Kconfig b/drivers/media/dvb/b2c2/Kconfig
index d7f1fd5b7b02..49a06fc54c51 100644
--- a/drivers/media/dvb/b2c2/Kconfig
+++ b/drivers/media/dvb/b2c2/Kconfig
@@ -1,6 +1,7 @@
1config DVB_B2C2_FLEXCOP 1config DVB_B2C2_FLEXCOP
2 tristate "Technisat/B2C2 FlexCopII(b) and FlexCopIII adapters" 2 tristate "Technisat/B2C2 FlexCopII(b) and FlexCopIII adapters"
3 depends on DVB_CORE && I2C 3 depends on DVB_CORE && I2C
4 select DVB_PLL
4 select DVB_STV0299 5 select DVB_STV0299
5 select DVB_MT352 6 select DVB_MT352
6 select DVB_MT312 7 select DVB_MT312
diff --git a/drivers/media/dvb/bt8xx/Kconfig b/drivers/media/dvb/bt8xx/Kconfig
index f394002118f8..7d0ee1ab2903 100644
--- a/drivers/media/dvb/bt8xx/Kconfig
+++ b/drivers/media/dvb/bt8xx/Kconfig
@@ -1,6 +1,7 @@
1config DVB_BT8XX 1config DVB_BT8XX
2 tristate "BT8xx based PCI cards" 2 tristate "BT8xx based PCI cards"
3 depends on DVB_CORE && PCI && I2C && VIDEO_BT848 3 depends on DVB_CORE && PCI && I2C && VIDEO_BT848
4 select DVB_PLL
4 select DVB_MT352 5 select DVB_MT352
5 select DVB_SP887X 6 select DVB_SP887X
6 select DVB_NXT6000 7 select DVB_NXT6000
diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig
index 3bc6722a6443..75824b77198a 100644
--- a/drivers/media/dvb/dvb-usb/Kconfig
+++ b/drivers/media/dvb/dvb-usb/Kconfig
@@ -2,6 +2,7 @@ config DVB_USB
2 tristate "Support for various USB DVB devices" 2 tristate "Support for various USB DVB devices"
3 depends on DVB_CORE && USB && I2C 3 depends on DVB_CORE && USB && I2C
4 select FW_LOADER 4 select FW_LOADER
5 select DVB_PLL
5 help 6 help
6 By enabling this you will be able to choose the various supported 7 By enabling this you will be able to choose the various supported
7 USB1.1 and USB2.0 DVB devices. 8 USB1.1 and USB2.0 DVB devices.
diff --git a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig
index 0ef361f0309b..db978555b1eb 100644
--- a/drivers/media/dvb/frontends/Kconfig
+++ b/drivers/media/dvb/frontends/Kconfig
@@ -6,43 +6,43 @@ comment "DVB-S (satellite) frontends"
6 6
7config DVB_STV0299 7config DVB_STV0299
8 tristate "ST STV0299 based" 8 tristate "ST STV0299 based"
9 depends on DVB_CORE 9 depends on DVB_CORE && I2C
10 help 10 help
11 A DVB-S tuner module. Say Y when you want to support this frontend. 11 A DVB-S tuner module. Say Y when you want to support this frontend.
12 12
13config DVB_CX24110 13config DVB_CX24110
14 tristate "Conexant CX24110 based" 14 tristate "Conexant CX24110 based"
15 depends on DVB_CORE 15 depends on DVB_CORE && I2C
16 help 16 help
17 A DVB-S tuner module. Say Y when you want to support this frontend. 17 A DVB-S tuner module. Say Y when you want to support this frontend.
18 18
19config DVB_CX24123 19config DVB_CX24123
20 tristate "Conexant CX24123 based" 20 tristate "Conexant CX24123 based"
21 depends on DVB_CORE 21 depends on DVB_CORE && I2C
22 help 22 help
23 A DVB-S tuner module. Say Y when you want to support this frontend. 23 A DVB-S tuner module. Say Y when you want to support this frontend.
24 24
25config DVB_TDA8083 25config DVB_TDA8083
26 tristate "Philips TDA8083 based" 26 tristate "Philips TDA8083 based"
27 depends on DVB_CORE 27 depends on DVB_CORE && I2C
28 help 28 help
29 A DVB-S tuner module. Say Y when you want to support this frontend. 29 A DVB-S tuner module. Say Y when you want to support this frontend.
30 30
31config DVB_MT312 31config DVB_MT312
32 tristate "Zarlink VP310/MT312 based" 32 tristate "Zarlink VP310/MT312 based"
33 depends on DVB_CORE 33 depends on DVB_CORE && I2C
34 help 34 help
35 A DVB-S tuner module. Say Y when you want to support this frontend. 35 A DVB-S tuner module. Say Y when you want to support this frontend.
36 36
37config DVB_VES1X93 37config DVB_VES1X93
38 tristate "VLSI VES1893 or VES1993 based" 38 tristate "VLSI VES1893 or VES1993 based"
39 depends on DVB_CORE 39 depends on DVB_CORE && I2C
40 help 40 help
41 A DVB-S tuner module. Say Y when you want to support this frontend. 41 A DVB-S tuner module. Say Y when you want to support this frontend.
42 42
43config DVB_S5H1420 43config DVB_S5H1420
44 tristate "Samsung S5H1420 based" 44 tristate "Samsung S5H1420 based"
45 depends on DVB_CORE 45 depends on DVB_CORE && I2C
46 help 46 help
47 A DVB-S tuner module. Say Y when you want to support this frontend. 47 A DVB-S tuner module. Say Y when you want to support this frontend.
48 48
@@ -51,7 +51,7 @@ comment "DVB-T (terrestrial) frontends"
51 51
52config DVB_SP8870 52config DVB_SP8870
53 tristate "Spase sp8870 based" 53 tristate "Spase sp8870 based"
54 depends on DVB_CORE 54 depends on DVB_CORE && I2C
55 select FW_LOADER 55 select FW_LOADER
56 help 56 help
57 A DVB-T tuner module. Say Y when you want to support this frontend. 57 A DVB-T tuner module. Say Y when you want to support this frontend.
@@ -63,7 +63,7 @@ config DVB_SP8870
63 63
64config DVB_SP887X 64config DVB_SP887X
65 tristate "Spase sp887x based" 65 tristate "Spase sp887x based"
66 depends on DVB_CORE 66 depends on DVB_CORE && I2C
67 select FW_LOADER 67 select FW_LOADER
68 help 68 help
69 A DVB-T tuner module. Say Y when you want to support this frontend. 69 A DVB-T tuner module. Say Y when you want to support this frontend.
@@ -75,25 +75,25 @@ config DVB_SP887X
75 75
76config DVB_CX22700 76config DVB_CX22700
77 tristate "Conexant CX22700 based" 77 tristate "Conexant CX22700 based"
78 depends on DVB_CORE 78 depends on DVB_CORE && I2C
79 help 79 help
80 A DVB-T tuner module. Say Y when you want to support this frontend. 80 A DVB-T tuner module. Say Y when you want to support this frontend.
81 81
82config DVB_CX22702 82config DVB_CX22702
83 tristate "Conexant cx22702 demodulator (OFDM)" 83 tristate "Conexant cx22702 demodulator (OFDM)"
84 depends on DVB_CORE 84 depends on DVB_CORE && I2C
85 help 85 help
86 A DVB-T tuner module. Say Y when you want to support this frontend. 86 A DVB-T tuner module. Say Y when you want to support this frontend.
87 87
88config DVB_L64781 88config DVB_L64781
89 tristate "LSI L64781" 89 tristate "LSI L64781"
90 depends on DVB_CORE 90 depends on DVB_CORE && I2C
91 help 91 help
92 A DVB-T tuner module. Say Y when you want to support this frontend. 92 A DVB-T tuner module. Say Y when you want to support this frontend.
93 93
94config DVB_TDA1004X 94config DVB_TDA1004X
95 tristate "Philips TDA10045H/TDA10046H based" 95 tristate "Philips TDA10045H/TDA10046H based"
96 depends on DVB_CORE 96 depends on DVB_CORE && I2C
97 select FW_LOADER 97 select FW_LOADER
98 help 98 help
99 A DVB-T tuner module. Say Y when you want to support this frontend. 99 A DVB-T tuner module. Say Y when you want to support this frontend.
@@ -106,32 +106,32 @@ config DVB_TDA1004X
106 106
107config DVB_NXT6000 107config DVB_NXT6000
108 tristate "NxtWave Communications NXT6000 based" 108 tristate "NxtWave Communications NXT6000 based"
109 depends on DVB_CORE 109 depends on DVB_CORE && I2C
110 help 110 help
111 A DVB-T tuner module. Say Y when you want to support this frontend. 111 A DVB-T tuner module. Say Y when you want to support this frontend.
112 112
113config DVB_MT352 113config DVB_MT352
114 tristate "Zarlink MT352 based" 114 tristate "Zarlink MT352 based"
115 depends on DVB_CORE 115 depends on DVB_CORE && I2C
116 help 116 help
117 A DVB-T tuner module. Say Y when you want to support this frontend. 117 A DVB-T tuner module. Say Y when you want to support this frontend.
118 118
119config DVB_ZL10353 119config DVB_ZL10353
120 tristate "Zarlink ZL10353 based" 120 tristate "Zarlink ZL10353 based"
121 depends on DVB_CORE 121 depends on DVB_CORE && I2C
122 help 122 help
123 A DVB-T tuner module. Say Y when you want to support this frontend. 123 A DVB-T tuner module. Say Y when you want to support this frontend.
124 124
125config DVB_DIB3000MB 125config DVB_DIB3000MB
126 tristate "DiBcom 3000M-B" 126 tristate "DiBcom 3000M-B"
127 depends on DVB_CORE 127 depends on DVB_CORE && I2C
128 help 128 help
129 A DVB-T tuner module. Designed for mobile usage. Say Y when you want 129 A DVB-T tuner module. Designed for mobile usage. Say Y when you want
130 to support this frontend. 130 to support this frontend.
131 131
132config DVB_DIB3000MC 132config DVB_DIB3000MC
133 tristate "DiBcom 3000P/M-C" 133 tristate "DiBcom 3000P/M-C"
134 depends on DVB_CORE 134 depends on DVB_CORE && I2C
135 help 135 help
136 A DVB-T tuner module. Designed for mobile usage. Say Y when you want 136 A DVB-T tuner module. Designed for mobile usage. Say Y when you want
137 to support this frontend. 137 to support this frontend.
@@ -141,19 +141,19 @@ comment "DVB-C (cable) frontends"
141 141
142config DVB_VES1820 142config DVB_VES1820
143 tristate "VLSI VES1820 based" 143 tristate "VLSI VES1820 based"
144 depends on DVB_CORE 144 depends on DVB_CORE && I2C
145 help 145 help
146 A DVB-C tuner module. Say Y when you want to support this frontend. 146 A DVB-C tuner module. Say Y when you want to support this frontend.
147 147
148config DVB_TDA10021 148config DVB_TDA10021
149 tristate "Philips TDA10021 based" 149 tristate "Philips TDA10021 based"
150 depends on DVB_CORE 150 depends on DVB_CORE && I2C
151 help 151 help
152 A DVB-C tuner module. Say Y when you want to support this frontend. 152 A DVB-C tuner module. Say Y when you want to support this frontend.
153 153
154config DVB_STV0297 154config DVB_STV0297
155 tristate "ST STV0297 based" 155 tristate "ST STV0297 based"
156 depends on DVB_CORE 156 depends on DVB_CORE && I2C
157 help 157 help
158 A DVB-C tuner module. Say Y when you want to support this frontend. 158 A DVB-C tuner module. Say Y when you want to support this frontend.
159 159
@@ -162,7 +162,7 @@ comment "ATSC (North American/Korean Terrestrial/Cable DTV) frontends"
162 162
163config DVB_NXT200X 163config DVB_NXT200X
164 tristate "NxtWave Communications NXT2002/NXT2004 based" 164 tristate "NxtWave Communications NXT2002/NXT2004 based"
165 depends on DVB_CORE 165 depends on DVB_CORE && I2C
166 select FW_LOADER 166 select FW_LOADER
167 help 167 help
168 An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want 168 An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
@@ -176,7 +176,7 @@ config DVB_NXT200X
176 176
177config DVB_OR51211 177config DVB_OR51211
178 tristate "Oren OR51211 based" 178 tristate "Oren OR51211 based"
179 depends on DVB_CORE 179 depends on DVB_CORE && I2C
180 select FW_LOADER 180 select FW_LOADER
181 help 181 help
182 An ATSC 8VSB tuner module. Say Y when you want to support this frontend. 182 An ATSC 8VSB tuner module. Say Y when you want to support this frontend.
@@ -188,7 +188,7 @@ config DVB_OR51211
188 188
189config DVB_OR51132 189config DVB_OR51132
190 tristate "Oren OR51132 based" 190 tristate "Oren OR51132 based"
191 depends on DVB_CORE 191 depends on DVB_CORE && I2C
192 select FW_LOADER 192 select FW_LOADER
193 help 193 help
194 An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want 194 An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
@@ -203,7 +203,7 @@ config DVB_OR51132
203 203
204config DVB_BCM3510 204config DVB_BCM3510
205 tristate "Broadcom BCM3510" 205 tristate "Broadcom BCM3510"
206 depends on DVB_CORE 206 depends on DVB_CORE && I2C
207 select FW_LOADER 207 select FW_LOADER
208 help 208 help
209 An ATSC 8VSB/16VSB and QAM64/256 tuner module. Say Y when you want to 209 An ATSC 8VSB/16VSB and QAM64/256 tuner module. Say Y when you want to
@@ -211,7 +211,7 @@ config DVB_BCM3510
211 211
212config DVB_LGDT330X 212config DVB_LGDT330X
213 tristate "LG Electronics LGDT3302/LGDT3303 based" 213 tristate "LG Electronics LGDT3302/LGDT3303 based"
214 depends on DVB_CORE 214 depends on DVB_CORE && I2C
215 help 215 help
216 An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want 216 An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
217 to support this frontend. 217 to support this frontend.
@@ -220,15 +220,19 @@ config DVB_LGDT330X
220comment "Miscellaneous devices" 220comment "Miscellaneous devices"
221 depends on DVB_CORE 221 depends on DVB_CORE
222 222
223config DVB_PLL
224 tristate
225 depends on DVB_CORE && I2C
226
223config DVB_LNBP21 227config DVB_LNBP21
224 tristate "LNBP21 SEC controller" 228 tristate "LNBP21 SEC controller"
225 depends on DVB_CORE 229 depends on DVB_CORE && I2C
226 help 230 help
227 An SEC control chip. 231 An SEC control chip.
228 232
229config DVB_ISL6421 233config DVB_ISL6421
230 tristate "ISL6421 SEC controller" 234 tristate "ISL6421 SEC controller"
231 depends on DVB_CORE 235 depends on DVB_CORE && I2C
232 help 236 help
233 An SEC control chip. 237 An SEC control chip.
234 238
diff --git a/drivers/media/dvb/frontends/Makefile b/drivers/media/dvb/frontends/Makefile
index 5222245c7f59..0e4880b6db14 100644
--- a/drivers/media/dvb/frontends/Makefile
+++ b/drivers/media/dvb/frontends/Makefile
@@ -4,7 +4,7 @@
4 4
5EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ 5EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/
6 6
7obj-$(CONFIG_DVB_CORE) += dvb-pll.o 7obj-$(CONFIG_DVB_PLL) += dvb-pll.o
8obj-$(CONFIG_DVB_STV0299) += stv0299.o 8obj-$(CONFIG_DVB_STV0299) += stv0299.o
9obj-$(CONFIG_DVB_SP8870) += sp8870.o 9obj-$(CONFIG_DVB_SP8870) += sp8870.o
10obj-$(CONFIG_DVB_CX22700) += cx22700.o 10obj-$(CONFIG_DVB_CX22700) += cx22700.o
diff --git a/drivers/media/dvb/pluto2/Kconfig b/drivers/media/dvb/pluto2/Kconfig
index 7d8e6e87bdbb..9b84b1bdc313 100644
--- a/drivers/media/dvb/pluto2/Kconfig
+++ b/drivers/media/dvb/pluto2/Kconfig
@@ -2,6 +2,7 @@ config DVB_PLUTO2
2 tristate "Pluto2 cards" 2 tristate "Pluto2 cards"
3 depends on DVB_CORE && PCI && I2C 3 depends on DVB_CORE && PCI && I2C
4 select I2C_ALGOBIT 4 select I2C_ALGOBIT
5 select DVB_PLL
5 select DVB_TDA1004X 6 select DVB_TDA1004X
6 help 7 help
7 Support for PCI cards based on the Pluto2 FPGA like the Satelco 8 Support for PCI cards based on the Pluto2 FPGA like the Satelco
diff --git a/drivers/media/dvb/ttpci/Kconfig b/drivers/media/dvb/ttpci/Kconfig
index 987881fa988c..5fb097595cfb 100644
--- a/drivers/media/dvb/ttpci/Kconfig
+++ b/drivers/media/dvb/ttpci/Kconfig
@@ -3,6 +3,7 @@ config DVB_AV7110
3 depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 3 depends on DVB_CORE && PCI && I2C && VIDEO_V4L1
4 select FW_LOADER 4 select FW_LOADER
5 select VIDEO_SAA7146_VV 5 select VIDEO_SAA7146_VV
6 select DVB_PLL
6 select DVB_VES1820 7 select DVB_VES1820
7 select DVB_VES1X93 8 select DVB_VES1X93
8 select DVB_STV0299 9 select DVB_STV0299
@@ -61,6 +62,7 @@ config DVB_BUDGET
61 tristate "Budget cards" 62 tristate "Budget cards"
62 depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 63 depends on DVB_CORE && PCI && I2C && VIDEO_V4L1
63 select VIDEO_SAA7146 64 select VIDEO_SAA7146
65 select DVB_PLL
64 select DVB_STV0299 66 select DVB_STV0299
65 select DVB_VES1X93 67 select DVB_VES1X93
66 select DVB_VES1820 68 select DVB_VES1820
@@ -83,6 +85,7 @@ config DVB_BUDGET_CI
83 tristate "Budget cards with onboard CI connector" 85 tristate "Budget cards with onboard CI connector"
84 depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 86 depends on DVB_CORE && PCI && I2C && VIDEO_V4L1
85 select VIDEO_SAA7146 87 select VIDEO_SAA7146
88 select DVB_PLL
86 select DVB_STV0297 89 select DVB_STV0297
87 select DVB_STV0299 90 select DVB_STV0299
88 select DVB_TDA1004X 91 select DVB_TDA1004X
@@ -104,6 +107,7 @@ config DVB_BUDGET_AV
104 tristate "Budget cards with analog video inputs" 107 tristate "Budget cards with analog video inputs"
105 depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 108 depends on DVB_CORE && PCI && I2C && VIDEO_V4L1
106 select VIDEO_SAA7146_VV 109 select VIDEO_SAA7146_VV
110 select DVB_PLL
107 select DVB_STV0299 111 select DVB_STV0299
108 select DVB_TDA1004X 112 select DVB_TDA1004X
109 select DVB_TDA10021 113 select DVB_TDA10021
@@ -122,6 +126,7 @@ config DVB_BUDGET_PATCH
122 tristate "AV7110 cards with Budget Patch" 126 tristate "AV7110 cards with Budget Patch"
123 depends on DVB_CORE && DVB_BUDGET && VIDEO_V4L1 127 depends on DVB_CORE && DVB_BUDGET && VIDEO_V4L1
124 select DVB_AV7110 128 select DVB_AV7110
129 select DVB_PLL
125 select DVB_STV0299 130 select DVB_STV0299
126 select DVB_VES1X93 131 select DVB_VES1X93
127 select DVB_TDA8083 132 select DVB_TDA8083
diff --git a/drivers/media/dvb/ttusb-budget/Kconfig b/drivers/media/dvb/ttusb-budget/Kconfig
index 92c7cdcf8981..46a6a60d2ab9 100644
--- a/drivers/media/dvb/ttusb-budget/Kconfig
+++ b/drivers/media/dvb/ttusb-budget/Kconfig
@@ -1,6 +1,7 @@
1config DVB_TTUSB_BUDGET 1config DVB_TTUSB_BUDGET
2 tristate "Technotrend/Hauppauge Nova-USB devices" 2 tristate "Technotrend/Hauppauge Nova-USB devices"
3 depends on DVB_CORE && USB 3 depends on DVB_CORE && USB && I2C
4 select DVB_PLL
4 select DVB_CX22700 5 select DVB_CX22700
5 select DVB_TDA1004X 6 select DVB_TDA1004X
6 select DVB_VES1820 7 select DVB_VES1820
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index 732bf1e7c326..94d078b77bab 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -260,7 +260,7 @@ source "drivers/media/video/saa7134/Kconfig"
260 260
261config VIDEO_MXB 261config VIDEO_MXB
262 tristate "Siemens-Nixdorf 'Multimedia eXtension Board'" 262 tristate "Siemens-Nixdorf 'Multimedia eXtension Board'"
263 depends on PCI && VIDEO_V4L1 263 depends on PCI && VIDEO_V4L1 && I2C
264 select VIDEO_SAA7146_VV 264 select VIDEO_SAA7146_VV
265 select VIDEO_TUNER 265 select VIDEO_TUNER
266 ---help--- 266 ---help---
@@ -272,7 +272,7 @@ config VIDEO_MXB
272 272
273config VIDEO_DPC 273config VIDEO_DPC
274 tristate "Philips-Semiconductors 'dpc7146 demonstration board'" 274 tristate "Philips-Semiconductors 'dpc7146 demonstration board'"
275 depends on PCI && VIDEO_V4L1 275 depends on PCI && VIDEO_V4L1 && I2C
276 select VIDEO_SAA7146_VV 276 select VIDEO_SAA7146_VV
277 select VIDEO_V4L2 277 select VIDEO_V4L2
278 ---help--- 278 ---help---
@@ -287,7 +287,7 @@ config VIDEO_DPC
287 287
288config VIDEO_HEXIUM_ORION 288config VIDEO_HEXIUM_ORION
289 tristate "Hexium HV-PCI6 and Orion frame grabber" 289 tristate "Hexium HV-PCI6 and Orion frame grabber"
290 depends on PCI && VIDEO_V4L1 290 depends on PCI && VIDEO_V4L1 && I2C
291 select VIDEO_SAA7146_VV 291 select VIDEO_SAA7146_VV
292 select VIDEO_V4L2 292 select VIDEO_V4L2
293 ---help--- 293 ---help---
@@ -299,7 +299,7 @@ config VIDEO_HEXIUM_ORION
299 299
300config VIDEO_HEXIUM_GEMINI 300config VIDEO_HEXIUM_GEMINI
301 tristate "Hexium Gemini frame grabber" 301 tristate "Hexium Gemini frame grabber"
302 depends on PCI && VIDEO_V4L1 302 depends on PCI && VIDEO_V4L1 && I2C
303 select VIDEO_SAA7146_VV 303 select VIDEO_SAA7146_VV
304 select VIDEO_V4L2 304 select VIDEO_V4L2
305 ---help--- 305 ---help---
diff --git a/drivers/media/video/bt8xx/bttv-input.c b/drivers/media/video/bt8xx/bttv-input.c
index b41f81d2372c..933d6db09acb 100644
--- a/drivers/media/video/bt8xx/bttv-input.c
+++ b/drivers/media/video/bt8xx/bttv-input.c
@@ -303,6 +303,7 @@ int bttv_input_init(struct bttv *btv)
303 ir->mask_keyup = 0x010000; 303 ir->mask_keyup = 0x010000;
304 ir->polling = 50; // ms 304 ir->polling = 50; // ms
305 break; 305 break;
306 case BTTV_BOARD_PV_M4900:
306 case BTTV_BOARD_PV_BT878P_9B: 307 case BTTV_BOARD_PV_BT878P_9B:
307 case BTTV_BOARD_PV_BT878P_PLUS: 308 case BTTV_BOARD_PV_BT878P_PLUS:
308 ir_codes = ir_codes_pixelview; 309 ir_codes = ir_codes_pixelview;
diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig
index 80e23ee9801c..7a94e6a11927 100644
--- a/drivers/media/video/cx88/Kconfig
+++ b/drivers/media/video/cx88/Kconfig
@@ -51,6 +51,7 @@ config VIDEO_CX88_DVB
51 tristate "DVB/ATSC Support for cx2388x based TV cards" 51 tristate "DVB/ATSC Support for cx2388x based TV cards"
52 depends on VIDEO_CX88 && DVB_CORE 52 depends on VIDEO_CX88 && DVB_CORE
53 select VIDEO_BUF_DVB 53 select VIDEO_BUF_DVB
54 select DVB_PLL
54 ---help--- 55 ---help---
55 This adds support for DVB/ATSC cards based on the 56 This adds support for DVB/ATSC cards based on the
56 Conexant 2388x chip. 57 Conexant 2388x chip.
diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig
index e1c1805df1fb..f5543166d193 100644
--- a/drivers/media/video/saa7134/Kconfig
+++ b/drivers/media/video/saa7134/Kconfig
@@ -40,6 +40,7 @@ config VIDEO_SAA7134_DVB
40 depends on VIDEO_SAA7134 && DVB_CORE 40 depends on VIDEO_SAA7134 && DVB_CORE
41 select VIDEO_BUF_DVB 41 select VIDEO_BUF_DVB
42 select FW_LOADER 42 select FW_LOADER
43 select DVB_PLL
43 ---help--- 44 ---help---
44 This adds support for DVB cards based on the 45 This adds support for DVB cards based on the
45 Philips saa7134 chip. 46 Philips saa7134 chip.
diff --git a/drivers/media/video/tuner-types.c b/drivers/media/video/tuner-types.c
index d7eadc2c298d..8b542599ed47 100644
--- a/drivers/media/video/tuner-types.c
+++ b/drivers/media/video/tuner-types.c
@@ -926,11 +926,17 @@ static struct tuner_params tuner_lg_tdvs_h06xf_params[] = {
926 926
927/* ------------ TUNER_YMEC_TVF66T5_B_DFF - Philips PAL ------------ */ 927/* ------------ TUNER_YMEC_TVF66T5_B_DFF - Philips PAL ------------ */
928 928
929static struct tuner_range tuner_ymec_tvf66t5_b_dff_pal_ranges[] = {
930 { 16 * 160.25 /*MHz*/, 0x8e, 0x01, },
931 { 16 * 464.25 /*MHz*/, 0x8e, 0x02, },
932 { 16 * 999.99 , 0x8e, 0x08, },
933};
934
929static struct tuner_params tuner_ymec_tvf66t5_b_dff_params[] = { 935static struct tuner_params tuner_ymec_tvf66t5_b_dff_params[] = {
930 { 936 {
931 .type = TUNER_PARAM_TYPE_PAL, 937 .type = TUNER_PARAM_TYPE_PAL,
932 .ranges = tuner_tena_9533_di_pal_ranges, 938 .ranges = tuner_ymec_tvf66t5_b_dff_pal_ranges,
933 .count = ARRAY_SIZE(tuner_tena_9533_di_pal_ranges), 939 .count = ARRAY_SIZE(tuner_ymec_tvf66t5_b_dff_pal_ranges),
934 }, 940 },
935}; 941};
936 942
diff --git a/drivers/media/video/zoran.h b/drivers/media/video/zoran.h
index ffcda95ed9d4..8fb4a3414e0a 100644
--- a/drivers/media/video/zoran.h
+++ b/drivers/media/video/zoran.h
@@ -267,7 +267,7 @@ struct zoran_v4l_settings {
267}; 267};
268 268
269/* whoops, this one is undeclared if !v4l2 */ 269/* whoops, this one is undeclared if !v4l2 */
270#ifndef HAVE_V4L2 270#ifndef CONFIG_VIDEO_V4L2
271struct v4l2_jpegcompression { 271struct v4l2_jpegcompression {
272 int quality; 272 int quality;
273 int APPn; 273 int APPn;
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c
index d9a5876eb386..5f90db27892b 100644
--- a/drivers/media/video/zoran_driver.c
+++ b/drivers/media/video/zoran_driver.c
@@ -86,7 +86,7 @@
86#include "zoran_device.h" 86#include "zoran_device.h"
87#include "zoran_card.h" 87#include "zoran_card.h"
88 88
89#ifdef HAVE_V4L2 89#ifdef CONFIG_VIDEO_V4L2
90 /* we declare some card type definitions here, they mean 90 /* we declare some card type definitions here, they mean
91 * the same as the v4l1 ZORAN_VID_TYPE above, except it's v4l2 */ 91 * the same as the v4l1 ZORAN_VID_TYPE above, except it's v4l2 */
92#define ZORAN_V4L2_VID_FLAGS ( \ 92#define ZORAN_V4L2_VID_FLAGS ( \
@@ -103,7 +103,7 @@ const struct zoran_format zoran_formats[] = {
103 { 103 {
104 .name = "15-bit RGB", 104 .name = "15-bit RGB",
105 .palette = VIDEO_PALETTE_RGB555, 105 .palette = VIDEO_PALETTE_RGB555,
106#ifdef HAVE_V4L2 106#ifdef CONFIG_VIDEO_V4L2
107#ifdef __LITTLE_ENDIAN 107#ifdef __LITTLE_ENDIAN
108 .fourcc = V4L2_PIX_FMT_RGB555, 108 .fourcc = V4L2_PIX_FMT_RGB555,
109#else 109#else
@@ -117,7 +117,7 @@ const struct zoran_format zoran_formats[] = {
117 }, { 117 }, {
118 .name = "16-bit RGB", 118 .name = "16-bit RGB",
119 .palette = VIDEO_PALETTE_RGB565, 119 .palette = VIDEO_PALETTE_RGB565,
120#ifdef HAVE_V4L2 120#ifdef CONFIG_VIDEO_V4L2
121#ifdef __LITTLE_ENDIAN 121#ifdef __LITTLE_ENDIAN
122 .fourcc = V4L2_PIX_FMT_RGB565, 122 .fourcc = V4L2_PIX_FMT_RGB565,
123#else 123#else
@@ -131,7 +131,7 @@ const struct zoran_format zoran_formats[] = {
131 }, { 131 }, {
132 .name = "24-bit RGB", 132 .name = "24-bit RGB",
133 .palette = VIDEO_PALETTE_RGB24, 133 .palette = VIDEO_PALETTE_RGB24,
134#ifdef HAVE_V4L2 134#ifdef CONFIG_VIDEO_V4L2
135#ifdef __LITTLE_ENDIAN 135#ifdef __LITTLE_ENDIAN
136 .fourcc = V4L2_PIX_FMT_BGR24, 136 .fourcc = V4L2_PIX_FMT_BGR24,
137#else 137#else
@@ -145,7 +145,7 @@ const struct zoran_format zoran_formats[] = {
145 }, { 145 }, {
146 .name = "32-bit RGB", 146 .name = "32-bit RGB",
147 .palette = VIDEO_PALETTE_RGB32, 147 .palette = VIDEO_PALETTE_RGB32,
148#ifdef HAVE_V4L2 148#ifdef CONFIG_VIDEO_V4L2
149#ifdef __LITTLE_ENDIAN 149#ifdef __LITTLE_ENDIAN
150 .fourcc = V4L2_PIX_FMT_BGR32, 150 .fourcc = V4L2_PIX_FMT_BGR32,
151#else 151#else
@@ -159,7 +159,7 @@ const struct zoran_format zoran_formats[] = {
159 }, { 159 }, {
160 .name = "4:2:2, packed, YUYV", 160 .name = "4:2:2, packed, YUYV",
161 .palette = VIDEO_PALETTE_YUV422, 161 .palette = VIDEO_PALETTE_YUV422,
162#ifdef HAVE_V4L2 162#ifdef CONFIG_VIDEO_V4L2
163 .fourcc = V4L2_PIX_FMT_YUYV, 163 .fourcc = V4L2_PIX_FMT_YUYV,
164 .colorspace = V4L2_COLORSPACE_SMPTE170M, 164 .colorspace = V4L2_COLORSPACE_SMPTE170M,
165#endif 165#endif
@@ -169,7 +169,7 @@ const struct zoran_format zoran_formats[] = {
169 }, { 169 }, {
170 .name = "Hardware-encoded Motion-JPEG", 170 .name = "Hardware-encoded Motion-JPEG",
171 .palette = -1, 171 .palette = -1,
172#ifdef HAVE_V4L2 172#ifdef CONFIG_VIDEO_V4L2
173 .fourcc = V4L2_PIX_FMT_MJPEG, 173 .fourcc = V4L2_PIX_FMT_MJPEG,
174 .colorspace = V4L2_COLORSPACE_SMPTE170M, 174 .colorspace = V4L2_COLORSPACE_SMPTE170M,
175#endif 175#endif
@@ -210,7 +210,7 @@ static int lock_norm = 0; /* 1=Don't change TV standard (norm) */
210module_param(lock_norm, int, 0); 210module_param(lock_norm, int, 0);
211MODULE_PARM_DESC(lock_norm, "Users can't change norm"); 211MODULE_PARM_DESC(lock_norm, "Users can't change norm");
212 212
213#ifdef HAVE_V4L2 213#ifdef CONFIG_VIDEO_V4L2
214 /* small helper function for calculating buffersizes for v4l2 214 /* small helper function for calculating buffersizes for v4l2
215 * we calculate the nearest higher power-of-two, which 215 * we calculate the nearest higher power-of-two, which
216 * will be the recommended buffersize */ 216 * will be the recommended buffersize */
@@ -1761,7 +1761,7 @@ setup_overlay (struct file *file,
1761 return wait_grab_pending(zr); 1761 return wait_grab_pending(zr);
1762} 1762}
1763 1763
1764#ifdef HAVE_V4L2 1764#ifdef CONFIG_VIDEO_V4L2
1765 /* get the status of a buffer in the clients buffer queue */ 1765 /* get the status of a buffer in the clients buffer queue */
1766static int 1766static int
1767zoran_v4l2_buffer_status (struct file *file, 1767zoran_v4l2_buffer_status (struct file *file,
@@ -2676,7 +2676,7 @@ zoran_do_ioctl (struct inode *inode,
2676 } 2676 }
2677 break; 2677 break;
2678 2678
2679#ifdef HAVE_V4L2 2679#ifdef CONFIG_VIDEO_V4L2
2680 2680
2681 /* The new video4linux2 capture interface - much nicer than video4linux1, since 2681 /* The new video4linux2 capture interface - much nicer than video4linux1, since
2682 * it allows for integrating the JPEG capturing calls inside standard v4l2 2682 * it allows for integrating the JPEG capturing calls inside standard v4l2
@@ -4689,7 +4689,7 @@ static struct file_operations zoran_fops = {
4689struct video_device zoran_template __devinitdata = { 4689struct video_device zoran_template __devinitdata = {
4690 .name = ZORAN_NAME, 4690 .name = ZORAN_NAME,
4691 .type = ZORAN_VID_TYPE, 4691 .type = ZORAN_VID_TYPE,
4692#ifdef HAVE_V4L2 4692#ifdef CONFIG_VIDEO_V4L2
4693 .type2 = ZORAN_V4L2_VID_FLAGS, 4693 .type2 = ZORAN_V4L2_VID_FLAGS,
4694#endif 4694#endif
4695 .hardware = ZORAN_HARDWARE, 4695 .hardware = ZORAN_HARDWARE,
diff --git a/drivers/mmc/imxmmc.c b/drivers/mmc/imxmmc.c
index 7ca9e95bdf89..fb6565b98f32 100644
--- a/drivers/mmc/imxmmc.c
+++ b/drivers/mmc/imxmmc.c
@@ -91,6 +91,8 @@ struct imxmci_host {
91 int dma_allocated; 91 int dma_allocated;
92 92
93 unsigned char actual_bus_width; 93 unsigned char actual_bus_width;
94
95 int prev_cmd_code;
94}; 96};
95 97
96#define IMXMCI_PEND_IRQ_b 0 98#define IMXMCI_PEND_IRQ_b 0
@@ -248,16 +250,14 @@ static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data)
248 * partial FIFO fills and reads. The length has to be rounded up to burst size multiple. 250 * partial FIFO fills and reads. The length has to be rounded up to burst size multiple.
249 * This is required for SCR read at least. 251 * This is required for SCR read at least.
250 */ 252 */
251 if (datasz < 64) { 253 if (datasz < 512) {
252 host->dma_size = datasz; 254 host->dma_size = datasz;
253 if (data->flags & MMC_DATA_READ) { 255 if (data->flags & MMC_DATA_READ) {
254 host->dma_dir = DMA_FROM_DEVICE; 256 host->dma_dir = DMA_FROM_DEVICE;
255 257
256 /* Hack to enable read SCR */ 258 /* Hack to enable read SCR */
257 if(datasz < 16) { 259 MMC_NOB = 1;
258 MMC_NOB = 1; 260 MMC_BLK_LEN = 512;
259 MMC_BLK_LEN = 16;
260 }
261 } else { 261 } else {
262 host->dma_dir = DMA_TO_DEVICE; 262 host->dma_dir = DMA_TO_DEVICE;
263 } 263 }
@@ -409,6 +409,9 @@ static void imxmci_finish_request(struct imxmci_host *host, struct mmc_request *
409 409
410 spin_unlock_irqrestore(&host->lock, flags); 410 spin_unlock_irqrestore(&host->lock, flags);
411 411
412 if(req && req->cmd)
413 host->prev_cmd_code = req->cmd->opcode;
414
412 host->req = NULL; 415 host->req = NULL;
413 host->cmd = NULL; 416 host->cmd = NULL;
414 host->data = NULL; 417 host->data = NULL;
@@ -553,7 +556,6 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat)
553{ 556{
554 int i; 557 int i;
555 int burst_len; 558 int burst_len;
556 int flush_len;
557 int trans_done = 0; 559 int trans_done = 0;
558 unsigned int stat = *pstat; 560 unsigned int stat = *pstat;
559 561
@@ -566,44 +568,43 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat)
566 dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data running STATUS = 0x%x\n", 568 dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data running STATUS = 0x%x\n",
567 stat); 569 stat);
568 570
571 udelay(20); /* required for clocks < 8MHz*/
572
569 if(host->dma_dir == DMA_FROM_DEVICE) { 573 if(host->dma_dir == DMA_FROM_DEVICE) {
570 imxmci_busy_wait_for_status(host, &stat, 574 imxmci_busy_wait_for_status(host, &stat,
571 STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE, 575 STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE,
572 20, "imxmci_cpu_driven_data read"); 576 50, "imxmci_cpu_driven_data read");
573 577
574 while((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) && 578 while((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) &&
575 (host->data_cnt < host->dma_size)) { 579 (host->data_cnt < 512)) {
576 if(burst_len >= host->dma_size - host->data_cnt) { 580
577 flush_len = burst_len; 581 udelay(20); /* required for clocks < 8MHz*/
578 burst_len = host->dma_size - host->data_cnt;
579 flush_len -= burst_len;
580 host->data_cnt = host->dma_size;
581 trans_done = 1;
582 } else {
583 flush_len = 0;
584 host->data_cnt += burst_len;
585 }
586 582
587 for(i = burst_len; i>=2 ; i-=2) { 583 for(i = burst_len; i>=2 ; i-=2) {
588 *(host->data_ptr++) = MMC_BUFFER_ACCESS; 584 u16 data;
589 udelay(20); /* required for clocks < 8MHz*/ 585 data = MMC_BUFFER_ACCESS;
586 udelay(10); /* required for clocks < 8MHz*/
587 if(host->data_cnt+2 <= host->dma_size) {
588 *(host->data_ptr++) = data;
589 } else {
590 if(host->data_cnt < host->dma_size)
591 *(u8*)(host->data_ptr) = data;
592 }
593 host->data_cnt += 2;
590 } 594 }
591 595
592 if(i == 1)
593 *(u8*)(host->data_ptr) = MMC_BUFFER_ACCESS;
594
595 stat = MMC_STATUS; 596 stat = MMC_STATUS;
596 597
597 /* Flush extra bytes from FIFO */ 598 dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read %d burst %d STATUS = 0x%x\n",
598 while(flush_len && !(stat & STATUS_DATA_TRANS_DONE)){ 599 host->data_cnt, burst_len, stat);
599 i = MMC_BUFFER_ACCESS;
600 stat = MMC_STATUS;
601 stat &= ~STATUS_CRC_READ_ERR; /* Stupid but required there */
602 }
603
604 dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read burst %d STATUS = 0x%x\n",
605 burst_len, stat);
606 } 600 }
601
602 if((stat & STATUS_DATA_TRANS_DONE) && (host->data_cnt >= 512))
603 trans_done = 1;
604
605 if(host->dma_size & 0x1ff)
606 stat &= ~STATUS_CRC_READ_ERR;
607
607 } else { 608 } else {
608 imxmci_busy_wait_for_status(host, &stat, 609 imxmci_busy_wait_for_status(host, &stat,
609 STATUS_APPL_BUFF_FE, 610 STATUS_APPL_BUFF_FE,
@@ -692,8 +693,8 @@ static void imxmci_tasklet_fnc(unsigned long data)
692 what, stat, MMC_INT_MASK); 693 what, stat, MMC_INT_MASK);
693 dev_err(mmc_dev(host->mmc), "CMD_DAT_CONT = 0x%04x, MMC_BLK_LEN = 0x%04x, MMC_NOB = 0x%04x, DMA_CCR = 0x%08x\n", 694 dev_err(mmc_dev(host->mmc), "CMD_DAT_CONT = 0x%04x, MMC_BLK_LEN = 0x%04x, MMC_NOB = 0x%04x, DMA_CCR = 0x%08x\n",
694 MMC_CMD_DAT_CONT, MMC_BLK_LEN, MMC_NOB, CCR(host->dma)); 695 MMC_CMD_DAT_CONT, MMC_BLK_LEN, MMC_NOB, CCR(host->dma));
695 dev_err(mmc_dev(host->mmc), "CMD%d, bus %d-bit, dma_size = 0x%x\n", 696 dev_err(mmc_dev(host->mmc), "CMD%d, prevCMD%d, bus %d-bit, dma_size = 0x%x\n",
696 host->cmd?host->cmd->opcode:0, 1<<host->actual_bus_width, host->dma_size); 697 host->cmd?host->cmd->opcode:0, host->prev_cmd_code, 1<<host->actual_bus_width, host->dma_size);
697 } 698 }
698 699
699 if(!host->present || timeout) 700 if(!host->present || timeout)
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 33525bdf2ab6..74eaaee66de0 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -247,6 +247,55 @@ int mmc_wait_for_app_cmd(struct mmc_host *host, unsigned int rca,
247 247
248EXPORT_SYMBOL(mmc_wait_for_app_cmd); 248EXPORT_SYMBOL(mmc_wait_for_app_cmd);
249 249
250/**
251 * mmc_set_data_timeout - set the timeout for a data command
252 * @data: data phase for command
253 * @card: the MMC card associated with the data transfer
254 * @write: flag to differentiate reads from writes
255 */
256void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card,
257 int write)
258{
259 unsigned int mult;
260
261 /*
262 * SD cards use a 100 multiplier rather than 10
263 */
264 mult = mmc_card_sd(card) ? 100 : 10;
265
266 /*
267 * Scale up the multiplier (and therefore the timeout) by
268 * the r2w factor for writes.
269 */
270 if (write)
271 mult <<= card->csd.r2w_factor;
272
273 data->timeout_ns = card->csd.tacc_ns * mult;
274 data->timeout_clks = card->csd.tacc_clks * mult;
275
276 /*
277 * SD cards also have an upper limit on the timeout.
278 */
279 if (mmc_card_sd(card)) {
280 unsigned int timeout_us, limit_us;
281
282 timeout_us = data->timeout_ns / 1000;
283 timeout_us += data->timeout_clks * 1000 /
284 (card->host->ios.clock / 1000);
285
286 if (write)
287 limit_us = 250000;
288 else
289 limit_us = 100000;
290
291 if (timeout_us > limit_us) {
292 data->timeout_ns = limit_us * 1000;
293 data->timeout_clks = 0;
294 }
295 }
296}
297EXPORT_SYMBOL(mmc_set_data_timeout);
298
250static int mmc_select_card(struct mmc_host *host, struct mmc_card *card); 299static int mmc_select_card(struct mmc_host *host, struct mmc_card *card);
251 300
252/** 301/**
@@ -908,11 +957,9 @@ static void mmc_read_scrs(struct mmc_host *host)
908{ 957{
909 int err; 958 int err;
910 struct mmc_card *card; 959 struct mmc_card *card;
911
912 struct mmc_request mrq; 960 struct mmc_request mrq;
913 struct mmc_command cmd; 961 struct mmc_command cmd;
914 struct mmc_data data; 962 struct mmc_data data;
915
916 struct scatterlist sg; 963 struct scatterlist sg;
917 964
918 list_for_each_entry(card, &host->cards, node) { 965 list_for_each_entry(card, &host->cards, node) {
@@ -947,8 +994,8 @@ static void mmc_read_scrs(struct mmc_host *host)
947 994
948 memset(&data, 0, sizeof(struct mmc_data)); 995 memset(&data, 0, sizeof(struct mmc_data));
949 996
950 data.timeout_ns = card->csd.tacc_ns * 10; 997 mmc_set_data_timeout(&data, card, 0);
951 data.timeout_clks = card->csd.tacc_clks * 10; 998
952 data.blksz_bits = 3; 999 data.blksz_bits = 3;
953 data.blksz = 1 << 3; 1000 data.blksz = 1 << 3;
954 data.blocks = 1; 1001 data.blocks = 1;
diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c
index 115cc21094b9..a0e0dad1b419 100644
--- a/drivers/mmc/mmc_block.c
+++ b/drivers/mmc/mmc_block.c
@@ -30,6 +30,7 @@
30#include <linux/mutex.h> 30#include <linux/mutex.h>
31 31
32#include <linux/mmc/card.h> 32#include <linux/mmc/card.h>
33#include <linux/mmc/host.h>
33#include <linux/mmc/protocol.h> 34#include <linux/mmc/protocol.h>
34 35
35#include <asm/system.h> 36#include <asm/system.h>
@@ -171,8 +172,6 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
171 172
172 brq.cmd.arg = req->sector << 9; 173 brq.cmd.arg = req->sector << 9;
173 brq.cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; 174 brq.cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC;
174 brq.data.timeout_ns = card->csd.tacc_ns * 10;
175 brq.data.timeout_clks = card->csd.tacc_clks * 10;
176 brq.data.blksz_bits = md->block_bits; 175 brq.data.blksz_bits = md->block_bits;
177 brq.data.blksz = 1 << md->block_bits; 176 brq.data.blksz = 1 << md->block_bits;
178 brq.data.blocks = req->nr_sectors >> (md->block_bits - 9); 177 brq.data.blocks = req->nr_sectors >> (md->block_bits - 9);
@@ -180,6 +179,8 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
180 brq.stop.arg = 0; 179 brq.stop.arg = 0;
181 brq.stop.flags = MMC_RSP_R1B | MMC_CMD_AC; 180 brq.stop.flags = MMC_RSP_R1B | MMC_CMD_AC;
182 181
182 mmc_set_data_timeout(&brq.data, card, rq_data_dir(req) != READ);
183
183 if (rq_data_dir(req) == READ) { 184 if (rq_data_dir(req) == READ) {
184 brq.cmd.opcode = brq.data.blocks > 1 ? MMC_READ_MULTIPLE_BLOCK : MMC_READ_SINGLE_BLOCK; 185 brq.cmd.opcode = brq.data.blocks > 1 ? MMC_READ_MULTIPLE_BLOCK : MMC_READ_SINGLE_BLOCK;
185 brq.data.flags |= MMC_DATA_READ; 186 brq.data.flags |= MMC_DATA_READ;
@@ -187,12 +188,6 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
187 brq.cmd.opcode = MMC_WRITE_BLOCK; 188 brq.cmd.opcode = MMC_WRITE_BLOCK;
188 brq.data.flags |= MMC_DATA_WRITE; 189 brq.data.flags |= MMC_DATA_WRITE;
189 brq.data.blocks = 1; 190 brq.data.blocks = 1;
190
191 /*
192 * Scale up the timeout by the r2w factor
193 */
194 brq.data.timeout_ns <<= card->csd.r2w_factor;
195 brq.data.timeout_clks <<= card->csd.r2w_factor;
196 } 191 }
197 192
198 if (brq.data.blocks > 1) { 193 if (brq.data.blocks > 1) {
@@ -324,52 +319,11 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
324 md->read_only = mmc_blk_readonly(card); 319 md->read_only = mmc_blk_readonly(card);
325 320
326 /* 321 /*
327 * Figure out a workable block size. MMC cards have: 322 * Both SD and MMC specifications state (although a bit
328 * - two block sizes, one for read and one for write. 323 * unclearly in the MMC case) that a block size of 512
329 * - may support partial reads and/or writes 324 * bytes must always be supported by the card.
330 * (allows block sizes smaller than specified)
331 */
332 md->block_bits = card->csd.read_blkbits;
333 if (card->csd.write_blkbits != card->csd.read_blkbits) {
334 if (card->csd.write_blkbits < card->csd.read_blkbits &&
335 card->csd.read_partial) {
336 /*
337 * write block size is smaller than read block
338 * size, but we support partial reads, so choose
339 * the smaller write block size.
340 */
341 md->block_bits = card->csd.write_blkbits;
342 } else if (card->csd.write_blkbits > card->csd.read_blkbits &&
343 card->csd.write_partial) {
344 /*
345 * read block size is smaller than write block
346 * size, but we support partial writes. Use read
347 * block size.
348 */
349 } else {
350 /*
351 * We don't support this configuration for writes.
352 */
353 printk(KERN_ERR "%s: unable to select block size for "
354 "writing (rb%u wb%u rp%u wp%u)\n",
355 mmc_card_id(card),
356 1 << card->csd.read_blkbits,
357 1 << card->csd.write_blkbits,
358 card->csd.read_partial,
359 card->csd.write_partial);
360 md->read_only = 1;
361 }
362 }
363
364 /*
365 * Refuse to allow block sizes smaller than 512 bytes.
366 */ 325 */
367 if (md->block_bits < 9) { 326 md->block_bits = 9;
368 printk(KERN_ERR "%s: unable to support block size %u\n",
369 mmc_card_id(card), 1 << md->block_bits);
370 ret = -EINVAL;
371 goto err_kfree;
372 }
373 327
374 md->disk = alloc_disk(1 << MMC_SHIFT); 328 md->disk = alloc_disk(1 << MMC_SHIFT);
375 if (md->disk == NULL) { 329 if (md->disk == NULL) {
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 30b3671d833d..a2bd8119270e 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2393,7 +2393,7 @@ config MYRI10GE
2393 you will need a newer firmware image. 2393 you will need a newer firmware image.
2394 You may get this image or more information, at: 2394 You may get this image or more information, at:
2395 2395
2396 <http://www.myri.com/Myri-10G/> 2396 <http://www.myri.com/scs/download-Myri10GE.html>
2397 2397
2398 To compile this driver as a module, choose M here and read 2398 To compile this driver as a module, choose M here and read
2399 <file:Documentation/networking/net-modules.txt>. The module 2399 <file:Documentation/networking/net-modules.txt>. The module
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 3d76fa144c4f..a860ebbbf815 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -377,8 +377,8 @@ dm9000_release_board(struct platform_device *pdev, struct board_info *db)
377 kfree(db->data_req); 377 kfree(db->data_req);
378 } 378 }
379 379
380 if (db->addr_res != NULL) { 380 if (db->addr_req != NULL) {
381 release_resource(db->addr_res); 381 release_resource(db->addr_req);
382 kfree(db->addr_req); 382 kfree(db->addr_req);
383 } 383 }
384} 384}
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 91ef5f2fd768..ce850f1078b5 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -173,8 +173,11 @@ MODULE_LICENSE("GPL");
173MODULE_VERSION(DRV_VERSION); 173MODULE_VERSION(DRV_VERSION);
174 174
175static int debug = 3; 175static int debug = 3;
176static int eeprom_bad_csum_allow = 0;
176module_param(debug, int, 0); 177module_param(debug, int, 0);
178module_param(eeprom_bad_csum_allow, int, 0);
177MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)"); 179MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
180MODULE_PARM_DESC(eeprom_bad_csum_allow, "Allow bad eeprom checksums");
178#define DPRINTK(nlevel, klevel, fmt, args...) \ 181#define DPRINTK(nlevel, klevel, fmt, args...) \
179 (void)((NETIF_MSG_##nlevel & nic->msg_enable) && \ 182 (void)((NETIF_MSG_##nlevel & nic->msg_enable) && \
180 printk(KERN_##klevel PFX "%s: %s: " fmt, nic->netdev->name, \ 183 printk(KERN_##klevel PFX "%s: %s: " fmt, nic->netdev->name, \
@@ -756,7 +759,8 @@ static int e100_eeprom_load(struct nic *nic)
756 checksum = le16_to_cpu(0xBABA - checksum); 759 checksum = le16_to_cpu(0xBABA - checksum);
757 if(checksum != nic->eeprom[nic->eeprom_wc - 1]) { 760 if(checksum != nic->eeprom[nic->eeprom_wc - 1]) {
758 DPRINTK(PROBE, ERR, "EEPROM corrupted\n"); 761 DPRINTK(PROBE, ERR, "EEPROM corrupted\n");
759 return -EAGAIN; 762 if (!eeprom_bad_csum_allow)
763 return -EAGAIN;
760 } 764 }
761 765
762 return 0; 766 return 0;
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 726f43d55937..98ef9f85482f 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -1433,8 +1433,8 @@ e1000_configure_tx(struct e1000_adapter *adapter)
1433 E1000_WRITE_REG(hw, TDBAL, (tdba & 0x00000000ffffffffULL)); 1433 E1000_WRITE_REG(hw, TDBAL, (tdba & 0x00000000ffffffffULL));
1434 E1000_WRITE_REG(hw, TDT, 0); 1434 E1000_WRITE_REG(hw, TDT, 0);
1435 E1000_WRITE_REG(hw, TDH, 0); 1435 E1000_WRITE_REG(hw, TDH, 0);
1436 adapter->tx_ring[0].tdh = E1000_TDH; 1436 adapter->tx_ring[0].tdh = ((hw->mac_type >= e1000_82543) ? E1000_TDH : E1000_82542_TDH);
1437 adapter->tx_ring[0].tdt = E1000_TDT; 1437 adapter->tx_ring[0].tdt = ((hw->mac_type >= e1000_82543) ? E1000_TDT : E1000_82542_TDT);
1438 break; 1438 break;
1439 } 1439 }
1440 1440
@@ -1840,8 +1840,8 @@ e1000_configure_rx(struct e1000_adapter *adapter)
1840 E1000_WRITE_REG(hw, RDBAL, (rdba & 0x00000000ffffffffULL)); 1840 E1000_WRITE_REG(hw, RDBAL, (rdba & 0x00000000ffffffffULL));
1841 E1000_WRITE_REG(hw, RDT, 0); 1841 E1000_WRITE_REG(hw, RDT, 0);
1842 E1000_WRITE_REG(hw, RDH, 0); 1842 E1000_WRITE_REG(hw, RDH, 0);
1843 adapter->rx_ring[0].rdh = E1000_RDH; 1843 adapter->rx_ring[0].rdh = ((hw->mac_type >= e1000_82543) ? E1000_RDH : E1000_82542_RDH);
1844 adapter->rx_ring[0].rdt = E1000_RDT; 1844 adapter->rx_ring[0].rdt = ((hw->mac_type >= e1000_82543) ? E1000_RDT : E1000_82542_RDT);
1845 break; 1845 break;
1846 } 1846 }
1847 1847
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 760c61b98867..eeab1df5bef3 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -385,6 +385,8 @@ static int mv643xx_eth_receive_queue(struct net_device *dev, int budget)
385 struct pkt_info pkt_info; 385 struct pkt_info pkt_info;
386 386
387 while (budget-- > 0 && eth_port_receive(mp, &pkt_info) == ETH_OK) { 387 while (budget-- > 0 && eth_port_receive(mp, &pkt_info) == ETH_OK) {
388 dma_unmap_single(NULL, pkt_info.buf_ptr, RX_SKB_SIZE,
389 DMA_FROM_DEVICE);
388 mp->rx_desc_count--; 390 mp->rx_desc_count--;
389 received_packets++; 391 received_packets++;
390 392
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c
index 0e3fdf7c6dd3..ec0413609f36 100644
--- a/drivers/net/sunlance.c
+++ b/drivers/net/sunlance.c
@@ -1566,20 +1566,21 @@ static int __exit sunlance_sun4_remove(void)
1566static int __devinit sunlance_sbus_probe(struct of_device *dev, const struct of_device_id *match) 1566static int __devinit sunlance_sbus_probe(struct of_device *dev, const struct of_device_id *match)
1567{ 1567{
1568 struct sbus_dev *sdev = to_sbus_device(&dev->dev); 1568 struct sbus_dev *sdev = to_sbus_device(&dev->dev);
1569 struct device_node *dp = dev->node;
1570 int err; 1569 int err;
1571 1570
1572 if (!strcmp(dp->name, "le")) { 1571 if (sdev->parent) {
1573 err = sparc_lance_probe_one(sdev, NULL, NULL); 1572 struct of_device *parent = &sdev->parent->ofdev;
1574 } else if (!strcmp(dp->name, "ledma")) {
1575 struct sbus_dma *ledma = find_ledma(sdev);
1576 1573
1577 err = sparc_lance_probe_one(sdev->child, ledma, NULL); 1574 if (!strcmp(parent->node->name, "ledma")) {
1578 } else { 1575 struct sbus_dma *ledma = find_ledma(to_sbus_device(&parent->dev));
1579 BUG_ON(strcmp(dp->name, "lebuffer"));
1580 1576
1581 err = sparc_lance_probe_one(sdev->child, NULL, sdev); 1577 err = sparc_lance_probe_one(sdev, ledma, NULL);
1582 } 1578 } else if (!strcmp(parent->node->name, "lebuffer")) {
1579 err = sparc_lance_probe_one(sdev, NULL, to_sbus_device(&parent->dev));
1580 } else
1581 err = sparc_lance_probe_one(sdev, NULL, NULL);
1582 } else
1583 err = sparc_lance_probe_one(sdev, NULL, NULL);
1583 1584
1584 return err; 1585 return err;
1585} 1586}
@@ -1604,12 +1605,6 @@ static struct of_device_id sunlance_sbus_match[] = {
1604 { 1605 {
1605 .name = "le", 1606 .name = "le",
1606 }, 1607 },
1607 {
1608 .name = "ledma",
1609 },
1610 {
1611 .name = "lebuffer",
1612 },
1613 {}, 1608 {},
1614}; 1609};
1615 1610
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c
index fd31885c6844..ccaf28e8db0a 100644
--- a/drivers/net/wireless/strip.c
+++ b/drivers/net/wireless/strip.c
@@ -467,6 +467,7 @@ static int arp_query(unsigned char *haddr, u32 paddr,
467 struct net_device *dev) 467 struct net_device *dev)
468{ 468{
469 struct neighbour *neighbor_entry; 469 struct neighbour *neighbor_entry;
470 int ret = 0;
470 471
471 neighbor_entry = neigh_lookup(&arp_tbl, &paddr, dev); 472 neighbor_entry = neigh_lookup(&arp_tbl, &paddr, dev);
472 473
@@ -474,10 +475,11 @@ static int arp_query(unsigned char *haddr, u32 paddr,
474 neighbor_entry->used = jiffies; 475 neighbor_entry->used = jiffies;
475 if (neighbor_entry->nud_state & NUD_VALID) { 476 if (neighbor_entry->nud_state & NUD_VALID) {
476 memcpy(haddr, neighbor_entry->ha, dev->addr_len); 477 memcpy(haddr, neighbor_entry->ha, dev->addr_len);
477 return 1; 478 ret = 1;
478 } 479 }
480 neigh_release(neighbor_entry);
479 } 481 }
480 return 0; 482 return ret;
481} 483}
482 484
483static void DumpData(char *msg, struct strip *strip_info, __u8 * ptr, 485static void DumpData(char *msg, struct strip *strip_info, __u8 * ptr,
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c
index da9d06bdb818..aa792821854e 100644
--- a/drivers/net/wireless/zd1211rw/zd_chip.c
+++ b/drivers/net/wireless/zd1211rw/zd_chip.c
@@ -1430,9 +1430,43 @@ static int ofdm_qual_db(u8 status_quality, u8 rate, unsigned int size)
1430 break; 1430 break;
1431 } 1431 }
1432 1432
1433 switch (rate) {
1434 case ZD_OFDM_RATE_6M:
1435 case ZD_OFDM_RATE_9M:
1436 i += 3;
1437 break;
1438 case ZD_OFDM_RATE_12M:
1439 case ZD_OFDM_RATE_18M:
1440 i += 5;
1441 break;
1442 case ZD_OFDM_RATE_24M:
1443 case ZD_OFDM_RATE_36M:
1444 i += 9;
1445 break;
1446 case ZD_OFDM_RATE_48M:
1447 case ZD_OFDM_RATE_54M:
1448 i += 15;
1449 break;
1450 default:
1451 return -EINVAL;
1452 }
1453
1433 return i; 1454 return i;
1434} 1455}
1435 1456
1457static int ofdm_qual_percent(u8 status_quality, u8 rate, unsigned int size)
1458{
1459 int r;
1460
1461 r = ofdm_qual_db(status_quality, rate, size);
1462 ZD_ASSERT(r >= 0);
1463 if (r < 0)
1464 r = 0;
1465
1466 r = (r * 100)/29;
1467 return r <= 100 ? r : 100;
1468}
1469
1436static unsigned int log10times100(unsigned int x) 1470static unsigned int log10times100(unsigned int x)
1437{ 1471{
1438 static const u8 log10[] = { 1472 static const u8 log10[] = {
@@ -1476,31 +1510,28 @@ static int cck_snr_db(u8 status_quality)
1476 return r; 1510 return r;
1477} 1511}
1478 1512
1479static int rx_qual_db(const void *rx_frame, unsigned int size, 1513static int cck_qual_percent(u8 status_quality)
1480 const struct rx_status *status)
1481{ 1514{
1482 return (status->frame_status&ZD_RX_OFDM) ? 1515 int r;
1483 ofdm_qual_db(status->signal_quality_ofdm, 1516
1484 zd_ofdm_plcp_header_rate(rx_frame), 1517 r = cck_snr_db(status_quality);
1485 size) : 1518 r = (100*r)/17;
1486 cck_snr_db(status->signal_quality_cck); 1519 return r <= 100 ? r : 100;
1487} 1520}
1488 1521
1489u8 zd_rx_qual_percent(const void *rx_frame, unsigned int size, 1522u8 zd_rx_qual_percent(const void *rx_frame, unsigned int size,
1490 const struct rx_status *status) 1523 const struct rx_status *status)
1491{ 1524{
1492 int r = rx_qual_db(rx_frame, size, status); 1525 return (status->frame_status&ZD_RX_OFDM) ?
1493 if (r < 0) 1526 ofdm_qual_percent(status->signal_quality_ofdm,
1494 r = 0; 1527 zd_ofdm_plcp_header_rate(rx_frame),
1495 r = (r * 100) / 14; 1528 size) :
1496 if (r > 100) 1529 cck_qual_percent(status->signal_quality_cck);
1497 r = 100;
1498 return r;
1499} 1530}
1500 1531
1501u8 zd_rx_strength_percent(u8 rssi) 1532u8 zd_rx_strength_percent(u8 rssi)
1502{ 1533{
1503 int r = (rssi*100) / 30; 1534 int r = (rssi*100) / 41;
1504 if (r > 100) 1535 if (r > 100)
1505 r = 100; 1536 r = 100;
1506 return (u8) r; 1537 return (u8) r;
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index d6f3e02a0b54..a9bd80a08613 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -816,13 +816,25 @@ static int filter_rx(struct ieee80211_device *ieee,
816 return -EINVAL; 816 return -EINVAL;
817} 817}
818 818
819static void update_qual_rssi(struct zd_mac *mac, u8 qual_percent, u8 rssi) 819static void update_qual_rssi(struct zd_mac *mac,
820 const u8 *buffer, unsigned int length,
821 u8 qual_percent, u8 rssi_percent)
820{ 822{
821 unsigned long flags; 823 unsigned long flags;
824 struct ieee80211_hdr_3addr *hdr;
825 int i;
826
827 hdr = (struct ieee80211_hdr_3addr *)buffer;
828 if (length < offsetof(struct ieee80211_hdr_3addr, addr3))
829 return;
830 if (memcmp(hdr->addr2, zd_mac_to_ieee80211(mac)->bssid, ETH_ALEN) != 0)
831 return;
822 832
823 spin_lock_irqsave(&mac->lock, flags); 833 spin_lock_irqsave(&mac->lock, flags);
824 mac->qual_average = (7 * mac->qual_average + qual_percent) / 8; 834 i = mac->stats_count % ZD_MAC_STATS_BUFFER_SIZE;
825 mac->rssi_average = (7 * mac->rssi_average + rssi) / 8; 835 mac->qual_buffer[i] = qual_percent;
836 mac->rssi_buffer[i] = rssi_percent;
837 mac->stats_count++;
826 spin_unlock_irqrestore(&mac->lock, flags); 838 spin_unlock_irqrestore(&mac->lock, flags);
827} 839}
828 840
@@ -853,7 +865,6 @@ static int fill_rx_stats(struct ieee80211_rx_stats *stats,
853 if (stats->rate) 865 if (stats->rate)
854 stats->mask |= IEEE80211_STATMASK_RATE; 866 stats->mask |= IEEE80211_STATMASK_RATE;
855 867
856 update_qual_rssi(mac, stats->signal, stats->rssi);
857 return 0; 868 return 0;
858} 869}
859 870
@@ -877,6 +888,8 @@ int zd_mac_rx(struct zd_mac *mac, const u8 *buffer, unsigned int length)
877 sizeof(struct rx_status); 888 sizeof(struct rx_status);
878 buffer += ZD_PLCP_HEADER_SIZE; 889 buffer += ZD_PLCP_HEADER_SIZE;
879 890
891 update_qual_rssi(mac, buffer, length, stats.signal, stats.rssi);
892
880 r = filter_rx(ieee, buffer, length, &stats); 893 r = filter_rx(ieee, buffer, length, &stats);
881 if (r <= 0) 894 if (r <= 0)
882 return r; 895 return r;
@@ -981,17 +994,31 @@ struct iw_statistics *zd_mac_get_wireless_stats(struct net_device *ndev)
981{ 994{
982 struct zd_mac *mac = zd_netdev_mac(ndev); 995 struct zd_mac *mac = zd_netdev_mac(ndev);
983 struct iw_statistics *iw_stats = &mac->iw_stats; 996 struct iw_statistics *iw_stats = &mac->iw_stats;
997 unsigned int i, count, qual_total, rssi_total;
984 998
985 memset(iw_stats, 0, sizeof(struct iw_statistics)); 999 memset(iw_stats, 0, sizeof(struct iw_statistics));
986 /* We are not setting the status, because ieee->state is not updated 1000 /* We are not setting the status, because ieee->state is not updated
987 * at all and this driver doesn't track authentication state. 1001 * at all and this driver doesn't track authentication state.
988 */ 1002 */
989 spin_lock_irq(&mac->lock); 1003 spin_lock_irq(&mac->lock);
990 iw_stats->qual.qual = mac->qual_average; 1004 count = mac->stats_count < ZD_MAC_STATS_BUFFER_SIZE ?
991 iw_stats->qual.level = mac->rssi_average; 1005 mac->stats_count : ZD_MAC_STATS_BUFFER_SIZE;
992 iw_stats->qual.updated = IW_QUAL_QUAL_UPDATED|IW_QUAL_LEVEL_UPDATED| 1006 qual_total = rssi_total = 0;
993 IW_QUAL_NOISE_INVALID; 1007 for (i = 0; i < count; i++) {
1008 qual_total += mac->qual_buffer[i];
1009 rssi_total += mac->rssi_buffer[i];
1010 }
994 spin_unlock_irq(&mac->lock); 1011 spin_unlock_irq(&mac->lock);
1012 iw_stats->qual.updated = IW_QUAL_NOISE_INVALID;
1013 if (count > 0) {
1014 iw_stats->qual.qual = qual_total / count;
1015 iw_stats->qual.level = rssi_total / count;
1016 iw_stats->qual.updated |=
1017 IW_QUAL_QUAL_UPDATED|IW_QUAL_LEVEL_UPDATED;
1018 } else {
1019 iw_stats->qual.updated |=
1020 IW_QUAL_QUAL_INVALID|IW_QUAL_LEVEL_INVALID;
1021 }
995 /* TODO: update counter */ 1022 /* TODO: update counter */
996 return iw_stats; 1023 return iw_stats;
997} 1024}
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.h b/drivers/net/wireless/zd1211rw/zd_mac.h
index 71e382c589ee..b3ba49b84634 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.h
+++ b/drivers/net/wireless/zd1211rw/zd_mac.h
@@ -1,4 +1,4 @@
1/* zd_mac.c 1/* zd_mac.h
2 * 2 *
3 * This program is free software; you can redistribute it and/or modify 3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by 4 * it under the terms of the GNU General Public License as published by
@@ -87,9 +87,9 @@ struct rx_length_info {
87#define RX_LENGTH_INFO_TAG 0x697e 87#define RX_LENGTH_INFO_TAG 0x697e
88 88
89struct rx_status { 89struct rx_status {
90 u8 signal_quality_cck;
90 /* rssi */ 91 /* rssi */
91 u8 signal_strength; 92 u8 signal_strength;
92 u8 signal_quality_cck;
93 u8 signal_quality_ofdm; 93 u8 signal_quality_ofdm;
94 u8 decryption_type; 94 u8 decryption_type;
95 u8 frame_status; 95 u8 frame_status;
@@ -120,14 +120,17 @@ enum mac_flags {
120 MAC_FIXED_CHANNEL = 0x01, 120 MAC_FIXED_CHANNEL = 0x01,
121}; 121};
122 122
123#define ZD_MAC_STATS_BUFFER_SIZE 16
124
123struct zd_mac { 125struct zd_mac {
124 struct net_device *netdev; 126 struct net_device *netdev;
125 struct zd_chip chip; 127 struct zd_chip chip;
126 spinlock_t lock; 128 spinlock_t lock;
127 /* Unlocked reading possible */ 129 /* Unlocked reading possible */
128 struct iw_statistics iw_stats; 130 struct iw_statistics iw_stats;
129 u8 qual_average; 131 unsigned int stats_count;
130 u8 rssi_average; 132 u8 qual_buffer[ZD_MAC_STATS_BUFFER_SIZE];
133 u8 rssi_buffer[ZD_MAC_STATS_BUFFER_SIZE];
131 u8 regdomain; 134 u8 regdomain;
132 u8 default_regdomain; 135 u8 default_regdomain;
133 u8 requested_channel; 136 u8 requested_channel;
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 73177429fe74..17e709e7d72a 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -667,6 +667,7 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, quirk_vi
667DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, quirk_via_irq); 667DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, quirk_via_irq);
668DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irq); 668DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irq);
669DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_irq); 669DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_irq);
670DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235_USB_2, quirk_via_irq);
670DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_irq); 671DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_irq);
671DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_irq); 672DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_irq);
672DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irq); 673DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irq);
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index d8e9b95f0a1a..25c1ef6dfd44 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -52,7 +52,7 @@ static void dasd_setup_queue(struct dasd_device * device);
52static void dasd_free_queue(struct dasd_device * device); 52static void dasd_free_queue(struct dasd_device * device);
53static void dasd_flush_request_queue(struct dasd_device *); 53static void dasd_flush_request_queue(struct dasd_device *);
54static void dasd_int_handler(struct ccw_device *, unsigned long, struct irb *); 54static void dasd_int_handler(struct ccw_device *, unsigned long, struct irb *);
55static void dasd_flush_ccw_queue(struct dasd_device *, int); 55static int dasd_flush_ccw_queue(struct dasd_device *, int);
56static void dasd_tasklet(struct dasd_device *); 56static void dasd_tasklet(struct dasd_device *);
57static void do_kick_device(void *data); 57static void do_kick_device(void *data);
58 58
@@ -60,6 +60,7 @@ static void do_kick_device(void *data);
60 * SECTION: Operations on the device structure. 60 * SECTION: Operations on the device structure.
61 */ 61 */
62static wait_queue_head_t dasd_init_waitq; 62static wait_queue_head_t dasd_init_waitq;
63static wait_queue_head_t dasd_flush_wq;
63 64
64/* 65/*
65 * Allocate memory for a new device structure. 66 * Allocate memory for a new device structure.
@@ -121,7 +122,7 @@ dasd_free_device(struct dasd_device *device)
121/* 122/*
122 * Make a new device known to the system. 123 * Make a new device known to the system.
123 */ 124 */
124static inline int 125static int
125dasd_state_new_to_known(struct dasd_device *device) 126dasd_state_new_to_known(struct dasd_device *device)
126{ 127{
127 int rc; 128 int rc;
@@ -145,7 +146,7 @@ dasd_state_new_to_known(struct dasd_device *device)
145/* 146/*
146 * Let the system forget about a device. 147 * Let the system forget about a device.
147 */ 148 */
148static inline void 149static int
149dasd_state_known_to_new(struct dasd_device * device) 150dasd_state_known_to_new(struct dasd_device * device)
150{ 151{
151 /* Disable extended error reporting for this device. */ 152 /* Disable extended error reporting for this device. */
@@ -163,12 +164,13 @@ dasd_state_known_to_new(struct dasd_device * device)
163 164
164 /* Give up reference we took in dasd_state_new_to_known. */ 165 /* Give up reference we took in dasd_state_new_to_known. */
165 dasd_put_device(device); 166 dasd_put_device(device);
167 return 0;
166} 168}
167 169
168/* 170/*
169 * Request the irq line for the device. 171 * Request the irq line for the device.
170 */ 172 */
171static inline int 173static int
172dasd_state_known_to_basic(struct dasd_device * device) 174dasd_state_known_to_basic(struct dasd_device * device)
173{ 175{
174 int rc; 176 int rc;
@@ -192,17 +194,23 @@ dasd_state_known_to_basic(struct dasd_device * device)
192/* 194/*
193 * Release the irq line for the device. Terminate any running i/o. 195 * Release the irq line for the device. Terminate any running i/o.
194 */ 196 */
195static inline void 197static int
196dasd_state_basic_to_known(struct dasd_device * device) 198dasd_state_basic_to_known(struct dasd_device * device)
197{ 199{
200 int rc;
201
198 dasd_gendisk_free(device); 202 dasd_gendisk_free(device);
199 dasd_flush_ccw_queue(device, 1); 203 rc = dasd_flush_ccw_queue(device, 1);
204 if (rc)
205 return rc;
206
200 DBF_DEV_EVENT(DBF_EMERG, device, "%p debug area deleted", device); 207 DBF_DEV_EVENT(DBF_EMERG, device, "%p debug area deleted", device);
201 if (device->debug_area != NULL) { 208 if (device->debug_area != NULL) {
202 debug_unregister(device->debug_area); 209 debug_unregister(device->debug_area);
203 device->debug_area = NULL; 210 device->debug_area = NULL;
204 } 211 }
205 device->state = DASD_STATE_KNOWN; 212 device->state = DASD_STATE_KNOWN;
213 return 0;
206} 214}
207 215
208/* 216/*
@@ -219,7 +227,7 @@ dasd_state_basic_to_known(struct dasd_device * device)
219 * In case the analysis returns an error, the device setup is stopped 227 * In case the analysis returns an error, the device setup is stopped
220 * (a fake disk was already added to allow formatting). 228 * (a fake disk was already added to allow formatting).
221 */ 229 */
222static inline int 230static int
223dasd_state_basic_to_ready(struct dasd_device * device) 231dasd_state_basic_to_ready(struct dasd_device * device)
224{ 232{
225 int rc; 233 int rc;
@@ -247,25 +255,31 @@ dasd_state_basic_to_ready(struct dasd_device * device)
247 * Forget format information. Check if the target level is basic 255 * Forget format information. Check if the target level is basic
248 * and if it is create fake disk for formatting. 256 * and if it is create fake disk for formatting.
249 */ 257 */
250static inline void 258static int
251dasd_state_ready_to_basic(struct dasd_device * device) 259dasd_state_ready_to_basic(struct dasd_device * device)
252{ 260{
253 dasd_flush_ccw_queue(device, 0); 261 int rc;
262
263 rc = dasd_flush_ccw_queue(device, 0);
264 if (rc)
265 return rc;
254 dasd_destroy_partitions(device); 266 dasd_destroy_partitions(device);
255 dasd_flush_request_queue(device); 267 dasd_flush_request_queue(device);
256 device->blocks = 0; 268 device->blocks = 0;
257 device->bp_block = 0; 269 device->bp_block = 0;
258 device->s2b_shift = 0; 270 device->s2b_shift = 0;
259 device->state = DASD_STATE_BASIC; 271 device->state = DASD_STATE_BASIC;
272 return 0;
260} 273}
261 274
262/* 275/*
263 * Back to basic. 276 * Back to basic.
264 */ 277 */
265static inline void 278static int
266dasd_state_unfmt_to_basic(struct dasd_device * device) 279dasd_state_unfmt_to_basic(struct dasd_device * device)
267{ 280{
268 device->state = DASD_STATE_BASIC; 281 device->state = DASD_STATE_BASIC;
282 return 0;
269} 283}
270 284
271/* 285/*
@@ -273,7 +287,7 @@ dasd_state_unfmt_to_basic(struct dasd_device * device)
273 * the requeueing of requests from the linux request queue to the 287 * the requeueing of requests from the linux request queue to the
274 * ccw queue. 288 * ccw queue.
275 */ 289 */
276static inline int 290static int
277dasd_state_ready_to_online(struct dasd_device * device) 291dasd_state_ready_to_online(struct dasd_device * device)
278{ 292{
279 device->state = DASD_STATE_ONLINE; 293 device->state = DASD_STATE_ONLINE;
@@ -284,16 +298,17 @@ dasd_state_ready_to_online(struct dasd_device * device)
284/* 298/*
285 * Stop the requeueing of requests again. 299 * Stop the requeueing of requests again.
286 */ 300 */
287static inline void 301static int
288dasd_state_online_to_ready(struct dasd_device * device) 302dasd_state_online_to_ready(struct dasd_device * device)
289{ 303{
290 device->state = DASD_STATE_READY; 304 device->state = DASD_STATE_READY;
305 return 0;
291} 306}
292 307
293/* 308/*
294 * Device startup state changes. 309 * Device startup state changes.
295 */ 310 */
296static inline int 311static int
297dasd_increase_state(struct dasd_device *device) 312dasd_increase_state(struct dasd_device *device)
298{ 313{
299 int rc; 314 int rc;
@@ -329,30 +344,37 @@ dasd_increase_state(struct dasd_device *device)
329/* 344/*
330 * Device shutdown state changes. 345 * Device shutdown state changes.
331 */ 346 */
332static inline int 347static int
333dasd_decrease_state(struct dasd_device *device) 348dasd_decrease_state(struct dasd_device *device)
334{ 349{
350 int rc;
351
352 rc = 0;
335 if (device->state == DASD_STATE_ONLINE && 353 if (device->state == DASD_STATE_ONLINE &&
336 device->target <= DASD_STATE_READY) 354 device->target <= DASD_STATE_READY)
337 dasd_state_online_to_ready(device); 355 rc = dasd_state_online_to_ready(device);
338 356
339 if (device->state == DASD_STATE_READY && 357 if (!rc &&
358 device->state == DASD_STATE_READY &&
340 device->target <= DASD_STATE_BASIC) 359 device->target <= DASD_STATE_BASIC)
341 dasd_state_ready_to_basic(device); 360 rc = dasd_state_ready_to_basic(device);
342 361
343 if (device->state == DASD_STATE_UNFMT && 362 if (!rc &&
363 device->state == DASD_STATE_UNFMT &&
344 device->target <= DASD_STATE_BASIC) 364 device->target <= DASD_STATE_BASIC)
345 dasd_state_unfmt_to_basic(device); 365 rc = dasd_state_unfmt_to_basic(device);
346 366
347 if (device->state == DASD_STATE_BASIC && 367 if (!rc &&
368 device->state == DASD_STATE_BASIC &&
348 device->target <= DASD_STATE_KNOWN) 369 device->target <= DASD_STATE_KNOWN)
349 dasd_state_basic_to_known(device); 370 rc = dasd_state_basic_to_known(device);
350 371
351 if (device->state == DASD_STATE_KNOWN && 372 if (!rc &&
373 device->state == DASD_STATE_KNOWN &&
352 device->target <= DASD_STATE_NEW) 374 device->target <= DASD_STATE_NEW)
353 dasd_state_known_to_new(device); 375 rc = dasd_state_known_to_new(device);
354 376
355 return 0; 377 return rc;
356} 378}
357 379
358/* 380/*
@@ -701,6 +723,7 @@ dasd_term_IO(struct dasd_ccw_req * cqr)
701 cqr->retries--; 723 cqr->retries--;
702 cqr->status = DASD_CQR_CLEAR; 724 cqr->status = DASD_CQR_CLEAR;
703 cqr->stopclk = get_clock(); 725 cqr->stopclk = get_clock();
726 cqr->starttime = 0;
704 DBF_DEV_EVENT(DBF_DEBUG, device, 727 DBF_DEV_EVENT(DBF_DEBUG, device,
705 "terminate cqr %p successful", 728 "terminate cqr %p successful",
706 cqr); 729 cqr);
@@ -978,6 +1001,7 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
978 irb->scsw.fctl & SCSW_FCTL_CLEAR_FUNC) { 1001 irb->scsw.fctl & SCSW_FCTL_CLEAR_FUNC) {
979 cqr->status = DASD_CQR_QUEUED; 1002 cqr->status = DASD_CQR_QUEUED;
980 dasd_clear_timer(device); 1003 dasd_clear_timer(device);
1004 wake_up(&dasd_flush_wq);
981 dasd_schedule_bh(device); 1005 dasd_schedule_bh(device);
982 return; 1006 return;
983 } 1007 }
@@ -1241,6 +1265,10 @@ __dasd_check_expire(struct dasd_device * device)
1241 cqr = list_entry(device->ccw_queue.next, struct dasd_ccw_req, list); 1265 cqr = list_entry(device->ccw_queue.next, struct dasd_ccw_req, list);
1242 if (cqr->status == DASD_CQR_IN_IO && cqr->expires != 0) { 1266 if (cqr->status == DASD_CQR_IN_IO && cqr->expires != 0) {
1243 if (time_after_eq(jiffies, cqr->expires + cqr->starttime)) { 1267 if (time_after_eq(jiffies, cqr->expires + cqr->starttime)) {
1268 DEV_MESSAGE(KERN_ERR, device,
1269 "internal error - timeout (%is) expired "
1270 "for cqr %p (%i retries left)",
1271 (cqr->expires/HZ), cqr, cqr->retries);
1244 if (device->discipline->term_IO(cqr) != 0) 1272 if (device->discipline->term_IO(cqr) != 0)
1245 /* Hmpf, try again in 1/10 sec */ 1273 /* Hmpf, try again in 1/10 sec */
1246 dasd_set_timer(device, 10); 1274 dasd_set_timer(device, 10);
@@ -1285,46 +1313,100 @@ __dasd_start_head(struct dasd_device * device)
1285 dasd_set_timer(device, 50); 1313 dasd_set_timer(device, 50);
1286} 1314}
1287 1315
1316static inline int
1317_wait_for_clear(struct dasd_ccw_req *cqr)
1318{
1319 return (cqr->status == DASD_CQR_QUEUED);
1320}
1321
1288/* 1322/*
1289 * Remove requests from the ccw queue. 1323 * Remove all requests from the ccw queue (all = '1') or only block device
1324 * requests in case all = '0'.
1325 * Take care of the erp-chain (chained via cqr->refers) and remove either
1326 * the whole erp-chain or none of the erp-requests.
1327 * If a request is currently running, term_IO is called and the request
1328 * is re-queued. Prior to removing the terminated request we need to wait
1329 * for the clear-interrupt.
1330 * In case termination is not possible we stop processing and just finishing
1331 * the already moved requests.
1290 */ 1332 */
1291static void 1333static int
1292dasd_flush_ccw_queue(struct dasd_device * device, int all) 1334dasd_flush_ccw_queue(struct dasd_device * device, int all)
1293{ 1335{
1336 struct dasd_ccw_req *cqr, *orig, *n;
1337 int rc, i;
1338
1294 struct list_head flush_queue; 1339 struct list_head flush_queue;
1295 struct list_head *l, *n;
1296 struct dasd_ccw_req *cqr;
1297 1340
1298 INIT_LIST_HEAD(&flush_queue); 1341 INIT_LIST_HEAD(&flush_queue);
1299 spin_lock_irq(get_ccwdev_lock(device->cdev)); 1342 spin_lock_irq(get_ccwdev_lock(device->cdev));
1300 list_for_each_safe(l, n, &device->ccw_queue) { 1343 rc = 0;
1301 cqr = list_entry(l, struct dasd_ccw_req, list); 1344restart:
1345 list_for_each_entry_safe(cqr, n, &device->ccw_queue, list) {
1346 /* get original request of erp request-chain */
1347 for (orig = cqr; orig->refers != NULL; orig = orig->refers);
1348
1302 /* Flush all request or only block device requests? */ 1349 /* Flush all request or only block device requests? */
1303 if (all == 0 && cqr->callback == dasd_end_request_cb) 1350 if (all == 0 && cqr->callback != dasd_end_request_cb &&
1351 orig->callback != dasd_end_request_cb) {
1304 continue; 1352 continue;
1305 if (cqr->status == DASD_CQR_IN_IO) 1353 }
1306 device->discipline->term_IO(cqr); 1354 /* Check status and move request to flush_queue */
1307 if (cqr->status != DASD_CQR_DONE || 1355 switch (cqr->status) {
1308 cqr->status != DASD_CQR_FAILED) { 1356 case DASD_CQR_IN_IO:
1309 cqr->status = DASD_CQR_FAILED; 1357 rc = device->discipline->term_IO(cqr);
1358 if (rc) {
1359 /* unable to terminate requeust */
1360 DEV_MESSAGE(KERN_ERR, device,
1361 "dasd flush ccw_queue is unable "
1362 " to terminate request %p",
1363 cqr);
1364 /* stop flush processing */
1365 goto finished;
1366 }
1367 break;
1368 case DASD_CQR_QUEUED:
1369 case DASD_CQR_ERROR:
1370 /* set request to FAILED */
1310 cqr->stopclk = get_clock(); 1371 cqr->stopclk = get_clock();
1372 cqr->status = DASD_CQR_FAILED;
1373 break;
1374 default: /* do not touch the others */
1375 break;
1376 }
1377 /* Rechain request (including erp chain) */
1378 for (i = 0; cqr != NULL; cqr = cqr->refers, i++) {
1379 cqr->endclk = get_clock();
1380 list_move_tail(&cqr->list, &flush_queue);
1381 }
1382 if (i > 1)
1383 /* moved more than one request - need to restart */
1384 goto restart;
1385 }
1386
1387finished:
1388 spin_unlock_irq(get_ccwdev_lock(device->cdev));
1389 /* Now call the callback function of flushed requests */
1390restart_cb:
1391 list_for_each_entry_safe(cqr, n, &flush_queue, list) {
1392 if (cqr->status == DASD_CQR_CLEAR) {
1393 /* wait for clear interrupt! */
1394 wait_event(dasd_flush_wq, _wait_for_clear(cqr));
1395 cqr->status = DASD_CQR_FAILED;
1311 } 1396 }
1312 /* Process finished ERP request. */ 1397 /* Process finished ERP request. */
1313 if (cqr->refers) { 1398 if (cqr->refers) {
1314 __dasd_process_erp(device, cqr); 1399 __dasd_process_erp(device, cqr);
1315 continue; 1400 /* restart list_for_xx loop since dasd_process_erp
1401 * might remove multiple elements */
1402 goto restart_cb;
1316 } 1403 }
1317 /* Rechain request on device request queue */ 1404 /* call the callback function */
1318 cqr->endclk = get_clock(); 1405 cqr->endclk = get_clock();
1319 list_move_tail(&cqr->list, &flush_queue);
1320 }
1321 spin_unlock_irq(get_ccwdev_lock(device->cdev));
1322 /* Now call the callback function of flushed requests */
1323 list_for_each_safe(l, n, &flush_queue) {
1324 cqr = list_entry(l, struct dasd_ccw_req, list);
1325 if (cqr->callback != NULL) 1406 if (cqr->callback != NULL)
1326 (cqr->callback)(cqr, cqr->callback_data); 1407 (cqr->callback)(cqr, cqr->callback_data);
1327 } 1408 }
1409 return rc;
1328} 1410}
1329 1411
1330/* 1412/*
@@ -1510,10 +1592,8 @@ dasd_sleep_on_interruptible(struct dasd_ccw_req * cqr)
1510 if (device->discipline->term_IO) { 1592 if (device->discipline->term_IO) {
1511 cqr->retries = -1; 1593 cqr->retries = -1;
1512 device->discipline->term_IO(cqr); 1594 device->discipline->term_IO(cqr);
1513 /*nished = 1595 /* wait (non-interruptible) for final status
1514 * wait (non-interruptible) for final status 1596 * because signal ist still pending */
1515 * because signal ist still pending
1516 */
1517 spin_unlock_irq(get_ccwdev_lock(device->cdev)); 1597 spin_unlock_irq(get_ccwdev_lock(device->cdev));
1518 wait_event(wait_q, _wait_for_wakeup(cqr)); 1598 wait_event(wait_q, _wait_for_wakeup(cqr));
1519 spin_lock_irq(get_ccwdev_lock(device->cdev)); 1599 spin_lock_irq(get_ccwdev_lock(device->cdev));
@@ -1546,19 +1626,11 @@ static inline int
1546_dasd_term_running_cqr(struct dasd_device *device) 1626_dasd_term_running_cqr(struct dasd_device *device)
1547{ 1627{
1548 struct dasd_ccw_req *cqr; 1628 struct dasd_ccw_req *cqr;
1549 int rc;
1550 1629
1551 if (list_empty(&device->ccw_queue)) 1630 if (list_empty(&device->ccw_queue))
1552 return 0; 1631 return 0;
1553 cqr = list_entry(device->ccw_queue.next, struct dasd_ccw_req, list); 1632 cqr = list_entry(device->ccw_queue.next, struct dasd_ccw_req, list);
1554 rc = device->discipline->term_IO(cqr); 1633 return device->discipline->term_IO(cqr);
1555 if (rc == 0) {
1556 /* termination successful */
1557 cqr->status = DASD_CQR_QUEUED;
1558 cqr->startclk = cqr->stopclk = 0;
1559 cqr->starttime = 0;
1560 }
1561 return rc;
1562} 1634}
1563 1635
1564int 1636int
@@ -1726,10 +1798,7 @@ dasd_flush_request_queue(struct dasd_device * device)
1726 return; 1798 return;
1727 1799
1728 spin_lock_irq(&device->request_queue_lock); 1800 spin_lock_irq(&device->request_queue_lock);
1729 while (!list_empty(&device->request_queue->queue_head)) { 1801 while ((req = elv_next_request(device->request_queue))) {
1730 req = elv_next_request(device->request_queue);
1731 if (req == NULL)
1732 break;
1733 blkdev_dequeue_request(req); 1802 blkdev_dequeue_request(req);
1734 dasd_end_request(req, 0); 1803 dasd_end_request(req, 0);
1735 } 1804 }
@@ -2091,6 +2160,7 @@ dasd_init(void)
2091 int rc; 2160 int rc;
2092 2161
2093 init_waitqueue_head(&dasd_init_waitq); 2162 init_waitqueue_head(&dasd_init_waitq);
2163 init_waitqueue_head(&dasd_flush_wq);
2094 2164
2095 /* register 'common' DASD debug area, used for all DBF_XXX calls */ 2165 /* register 'common' DASD debug area, used for all DBF_XXX calls */
2096 dasd_debug_area = debug_register("dasd", 1, 2, 8 * sizeof (long)); 2166 dasd_debug_area = debug_register("dasd", 1, 2, 8 * sizeof (long));
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c
index 4c272b70f41a..d163632101d2 100644
--- a/drivers/s390/block/dasd_genhd.c
+++ b/drivers/s390/block/dasd_genhd.c
@@ -83,10 +83,12 @@ dasd_gendisk_alloc(struct dasd_device *device)
83void 83void
84dasd_gendisk_free(struct dasd_device *device) 84dasd_gendisk_free(struct dasd_device *device)
85{ 85{
86 del_gendisk(device->gdp); 86 if (device->gdp) {
87 device->gdp->queue = NULL; 87 del_gendisk(device->gdp);
88 put_disk(device->gdp); 88 device->gdp->queue = NULL;
89 device->gdp = NULL; 89 put_disk(device->gdp);
90 device->gdp = NULL;
91 }
90} 92}
91 93
92/* 94/*
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c
index 3cba6c9fab11..38954f5cd14c 100644
--- a/drivers/s390/cio/ccwgroup.c
+++ b/drivers/s390/cio/ccwgroup.c
@@ -183,11 +183,9 @@ ccwgroup_create(struct device *root,
183 183
184 gdev->creator_id = creator_id; 184 gdev->creator_id = creator_id;
185 gdev->count = argc; 185 gdev->count = argc;
186 gdev->dev = (struct device ) { 186 gdev->dev.bus = &ccwgroup_bus_type;
187 .bus = &ccwgroup_bus_type, 187 gdev->dev.parent = root;
188 .parent = root, 188 gdev->dev.release = ccwgroup_release;
189 .release = ccwgroup_release,
190 };
191 189
192 snprintf (gdev->dev.bus_id, BUS_ID_SIZE, "%s", 190 snprintf (gdev->dev.bus_id, BUS_ID_SIZE, "%s",
193 gdev->cdev[0]->dev.bus_id); 191 gdev->cdev[0]->dev.bus_id);
@@ -391,10 +389,8 @@ int
391ccwgroup_driver_register (struct ccwgroup_driver *cdriver) 389ccwgroup_driver_register (struct ccwgroup_driver *cdriver)
392{ 390{
393 /* register our new driver with the core */ 391 /* register our new driver with the core */
394 cdriver->driver = (struct device_driver) { 392 cdriver->driver.bus = &ccwgroup_bus_type;
395 .bus = &ccwgroup_bus_type, 393 cdriver->driver.name = cdriver->name;
396 .name = cdriver->name,
397 };
398 394
399 return driver_register(&cdriver->driver); 395 return driver_register(&cdriver->driver);
400} 396}
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c
index 61ce3f1d5228..c28444af0919 100644
--- a/drivers/s390/cio/chsc.c
+++ b/drivers/s390/cio/chsc.c
@@ -238,8 +238,6 @@ s390_subchannel_remove_chpid(struct device *dev, void *data)
238 /* Check for single path devices. */ 238 /* Check for single path devices. */
239 if (sch->schib.pmcw.pim == 0x80) 239 if (sch->schib.pmcw.pim == 0x80)
240 goto out_unreg; 240 goto out_unreg;
241 if (sch->vpm == mask)
242 goto out_unreg;
243 241
244 if ((sch->schib.scsw.actl & SCSW_ACTL_DEVACT) && 242 if ((sch->schib.scsw.actl & SCSW_ACTL_DEVACT) &&
245 (sch->schib.scsw.actl & SCSW_ACTL_SCHACT) && 243 (sch->schib.scsw.actl & SCSW_ACTL_SCHACT) &&
@@ -258,6 +256,8 @@ s390_subchannel_remove_chpid(struct device *dev, void *data)
258 /* trigger path verification. */ 256 /* trigger path verification. */
259 if (sch->driver && sch->driver->verify) 257 if (sch->driver && sch->driver->verify)
260 sch->driver->verify(&sch->dev); 258 sch->driver->verify(&sch->dev);
259 else if (sch->vpm == mask)
260 goto out_unreg;
261out_unlock: 261out_unlock:
262 spin_unlock_irq(&sch->lock); 262 spin_unlock_irq(&sch->lock);
263 return 0; 263 return 0;
@@ -1391,10 +1391,8 @@ new_channel_path(int chpid)
1391 /* fill in status, etc. */ 1391 /* fill in status, etc. */
1392 chp->id = chpid; 1392 chp->id = chpid;
1393 chp->state = 1; 1393 chp->state = 1;
1394 chp->dev = (struct device) { 1394 chp->dev.parent = &css[0]->device;
1395 .parent = &css[0]->device, 1395 chp->dev.release = chp_release;
1396 .release = chp_release,
1397 };
1398 snprintf(chp->dev.bus_id, BUS_ID_SIZE, "chp0.%x", chpid); 1396 snprintf(chp->dev.bus_id, BUS_ID_SIZE, "chp0.%x", chpid);
1399 1397
1400 /* Obtain channel path description and fill it in. */ 1398 /* Obtain channel path description and fill it in. */
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 585fa04233c3..646da5640401 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -556,12 +556,11 @@ get_disc_ccwdev_by_devno(unsigned int devno, unsigned int ssid,
556 struct ccw_device *sibling) 556 struct ccw_device *sibling)
557{ 557{
558 struct device *dev; 558 struct device *dev;
559 struct match_data data = { 559 struct match_data data;
560 .devno = devno,
561 .ssid = ssid,
562 .sibling = sibling,
563 };
564 560
561 data.devno = devno;
562 data.ssid = ssid;
563 data.sibling = sibling;
565 dev = bus_find_device(&ccw_bus_type, NULL, &data, match_devno); 564 dev = bus_find_device(&ccw_bus_type, NULL, &data, match_devno);
566 565
567 return dev ? to_ccwdev(dev) : NULL; 566 return dev ? to_ccwdev(dev) : NULL;
@@ -835,10 +834,8 @@ io_subchannel_probe (struct subchannel *sch)
835 return -ENOMEM; 834 return -ENOMEM;
836 } 835 }
837 atomic_set(&cdev->private->onoff, 0); 836 atomic_set(&cdev->private->onoff, 0);
838 cdev->dev = (struct device) { 837 cdev->dev.parent = &sch->dev;
839 .parent = &sch->dev, 838 cdev->dev.release = ccw_device_release;
840 .release = ccw_device_release,
841 };
842 INIT_LIST_HEAD(&cdev->private->kick_work.entry); 839 INIT_LIST_HEAD(&cdev->private->kick_work.entry);
843 /* Do first half of device_register. */ 840 /* Do first half of device_register. */
844 device_initialize(&cdev->dev); 841 device_initialize(&cdev->dev);
@@ -977,9 +974,7 @@ ccw_device_console_enable (struct ccw_device *cdev, struct subchannel *sch)
977 int rc; 974 int rc;
978 975
979 /* Initialize the ccw_device structure. */ 976 /* Initialize the ccw_device structure. */
980 cdev->dev = (struct device) { 977 cdev->dev.parent= &sch->dev;
981 .parent = &sch->dev,
982 };
983 rc = io_subchannel_recog(cdev, sch); 978 rc = io_subchannel_recog(cdev, sch);
984 if (rc) 979 if (rc)
985 return rc; 980 return rc;
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c
index 6d91c2eb205b..35e162ba6d54 100644
--- a/drivers/s390/cio/device_fsm.c
+++ b/drivers/s390/cio/device_fsm.c
@@ -267,12 +267,10 @@ ccw_device_recog_done(struct ccw_device *cdev, int state)
267 notify = 1; 267 notify = 1;
268 } 268 }
269 /* fill out sense information */ 269 /* fill out sense information */
270 cdev->id = (struct ccw_device_id) { 270 cdev->id.cu_type = cdev->private->senseid.cu_type;
271 .cu_type = cdev->private->senseid.cu_type, 271 cdev->id.cu_model = cdev->private->senseid.cu_model;
272 .cu_model = cdev->private->senseid.cu_model, 272 cdev->id.dev_type = cdev->private->senseid.dev_type;
273 .dev_type = cdev->private->senseid.dev_type, 273 cdev->id.dev_model = cdev->private->senseid.dev_model;
274 .dev_model = cdev->private->senseid.dev_model,
275 };
276 if (notify) { 274 if (notify) {
277 cdev->private->state = DEV_STATE_OFFLINE; 275 cdev->private->state = DEV_STATE_OFFLINE;
278 if (same_dev) { 276 if (same_dev) {
@@ -566,12 +564,10 @@ ccw_device_verify_done(struct ccw_device *cdev, int err)
566 /* Deliver fake irb to device driver, if needed. */ 564 /* Deliver fake irb to device driver, if needed. */
567 if (cdev->private->flags.fake_irb) { 565 if (cdev->private->flags.fake_irb) {
568 memset(&cdev->private->irb, 0, sizeof(struct irb)); 566 memset(&cdev->private->irb, 0, sizeof(struct irb));
569 cdev->private->irb.scsw = (struct scsw) { 567 cdev->private->irb.scsw.cc = 1;
570 .cc = 1, 568 cdev->private->irb.scsw.fctl = SCSW_FCTL_START_FUNC;
571 .fctl = SCSW_FCTL_START_FUNC, 569 cdev->private->irb.scsw.actl = SCSW_ACTL_START_PEND;
572 .actl = SCSW_ACTL_START_PEND, 570 cdev->private->irb.scsw.stctl = SCSW_STCTL_STATUS_PEND;
573 .stctl = SCSW_STCTL_STATUS_PEND,
574 };
575 cdev->private->flags.fake_irb = 0; 571 cdev->private->flags.fake_irb = 0;
576 if (cdev->handler) 572 if (cdev->handler)
577 cdev->handler(cdev, cdev->private->intparm, 573 cdev->handler(cdev, cdev->private->intparm,
diff --git a/drivers/s390/cio/device_pgid.c b/drivers/s390/cio/device_pgid.c
index 32610fd8868e..1693a102dcfe 100644
--- a/drivers/s390/cio/device_pgid.c
+++ b/drivers/s390/cio/device_pgid.c
@@ -24,6 +24,21 @@
24#include "ioasm.h" 24#include "ioasm.h"
25 25
26/* 26/*
27 * Helper function called from interrupt context to decide whether an
28 * operation should be tried again.
29 */
30static int __ccw_device_should_retry(struct scsw *scsw)
31{
32 /* CC is only valid if start function bit is set. */
33 if ((scsw->fctl & SCSW_FCTL_START_FUNC) && scsw->cc == 1)
34 return 1;
35 /* No more activity. For sense and set PGID we stubbornly try again. */
36 if (!scsw->actl)
37 return 1;
38 return 0;
39}
40
41/*
27 * Start Sense Path Group ID helper function. Used in ccw_device_recog 42 * Start Sense Path Group ID helper function. Used in ccw_device_recog
28 * and ccw_device_sense_pgid. 43 * and ccw_device_sense_pgid.
29 */ 44 */
@@ -155,10 +170,10 @@ ccw_device_sense_pgid_irq(struct ccw_device *cdev, enum dev_event dev_event)
155 int ret; 170 int ret;
156 171
157 irb = (struct irb *) __LC_IRB; 172 irb = (struct irb *) __LC_IRB;
158 /* Retry sense pgid for cc=1. */ 173
159 if (irb->scsw.stctl == 174 if (irb->scsw.stctl ==
160 (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { 175 (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) {
161 if (irb->scsw.cc == 1) { 176 if (__ccw_device_should_retry(&irb->scsw)) {
162 ret = __ccw_device_sense_pgid_start(cdev); 177 ret = __ccw_device_sense_pgid_start(cdev);
163 if (ret && ret != -EBUSY) 178 if (ret && ret != -EBUSY)
164 ccw_device_sense_pgid_done(cdev, ret); 179 ccw_device_sense_pgid_done(cdev, ret);
@@ -391,10 +406,10 @@ ccw_device_verify_irq(struct ccw_device *cdev, enum dev_event dev_event)
391 int ret; 406 int ret;
392 407
393 irb = (struct irb *) __LC_IRB; 408 irb = (struct irb *) __LC_IRB;
394 /* Retry set pgid for cc=1. */ 409
395 if (irb->scsw.stctl == 410 if (irb->scsw.stctl ==
396 (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { 411 (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) {
397 if (irb->scsw.cc == 1) 412 if (__ccw_device_should_retry(&irb->scsw))
398 __ccw_device_verify_start(cdev); 413 __ccw_device_verify_start(cdev);
399 return; 414 return;
400 } 415 }
@@ -494,10 +509,10 @@ ccw_device_disband_irq(struct ccw_device *cdev, enum dev_event dev_event)
494 int ret; 509 int ret;
495 510
496 irb = (struct irb *) __LC_IRB; 511 irb = (struct irb *) __LC_IRB;
497 /* Retry set pgid for cc=1. */ 512
498 if (irb->scsw.stctl == 513 if (irb->scsw.stctl ==
499 (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { 514 (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) {
500 if (irb->scsw.cc == 1) 515 if (__ccw_device_should_retry(&irb->scsw))
501 __ccw_device_disband_start(cdev); 516 __ccw_device_disband_start(cdev);
502 return; 517 return;
503 } 518 }
diff --git a/drivers/s390/net/Kconfig b/drivers/s390/net/Kconfig
index 548854754921..1a93fa684e9f 100644
--- a/drivers/s390/net/Kconfig
+++ b/drivers/s390/net/Kconfig
@@ -92,15 +92,6 @@ config QETH_VLAN
92 If CONFIG_QETH is switched on, this option will include IEEE 92 If CONFIG_QETH is switched on, this option will include IEEE
93 802.1q VLAN support in the qeth device driver. 93 802.1q VLAN support in the qeth device driver.
94 94
95config QETH_PERF_STATS
96 bool "Performance statistics in /proc"
97 depends on QETH
98 help
99 When switched on, this option will add a file in the proc-fs
100 (/proc/qeth_perf_stats) containing performance statistics. It
101 may slightly impact performance, so this is only recommended for
102 internal tuning of the device driver.
103
104config CCWGROUP 95config CCWGROUP
105 tristate 96 tristate
106 default (LCS || CTC || QETH) 97 default (LCS || CTC || QETH)
diff --git a/drivers/s390/net/Makefile b/drivers/s390/net/Makefile
index 6775a837d646..4777e36a922f 100644
--- a/drivers/s390/net/Makefile
+++ b/drivers/s390/net/Makefile
@@ -10,7 +10,6 @@ obj-$(CONFIG_SMSGIUCV) += smsgiucv.o
10obj-$(CONFIG_CTC) += ctc.o fsm.o cu3088.o 10obj-$(CONFIG_CTC) += ctc.o fsm.o cu3088.o
11obj-$(CONFIG_LCS) += lcs.o cu3088.o 11obj-$(CONFIG_LCS) += lcs.o cu3088.o
12obj-$(CONFIG_CLAW) += claw.o cu3088.o 12obj-$(CONFIG_CLAW) += claw.o cu3088.o
13obj-$(CONFIG_MPC) += ctcmpc.o fsm.o cu3088.o
14qeth-y := qeth_main.o qeth_mpc.o qeth_sys.o qeth_eddp.o 13qeth-y := qeth_main.o qeth_mpc.o qeth_sys.o qeth_eddp.o
15qeth-$(CONFIG_PROC_FS) += qeth_proc.o 14qeth-$(CONFIG_PROC_FS) += qeth_proc.o
16obj-$(CONFIG_QETH) += qeth.o 15obj-$(CONFIG_QETH) += qeth.o
diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c
index 8a4b58120146..3257c22dd79c 100644
--- a/drivers/s390/net/ctcmain.c
+++ b/drivers/s390/net/ctcmain.c
@@ -1714,6 +1714,9 @@ add_channel(struct ccw_device *cdev, enum channel_types type)
1714 kfree(ch); 1714 kfree(ch);
1715 return 0; 1715 return 0;
1716 } 1716 }
1717
1718 spin_lock_init(&ch->collect_lock);
1719
1717 fsm_settimer(ch->fsm, &ch->timer); 1720 fsm_settimer(ch->fsm, &ch->timer);
1718 skb_queue_head_init(&ch->io_queue); 1721 skb_queue_head_init(&ch->io_queue);
1719 skb_queue_head_init(&ch->collect_queue); 1722 skb_queue_head_init(&ch->collect_queue);
diff --git a/drivers/s390/net/iucv.c b/drivers/s390/net/iucv.c
index 0e863df4027a..821dde86e240 100644
--- a/drivers/s390/net/iucv.c
+++ b/drivers/s390/net/iucv.c
@@ -335,8 +335,8 @@ do { \
335 335
336#else 336#else
337 337
338#define iucv_debug(lvl, fmt, args...) 338#define iucv_debug(lvl, fmt, args...) do { } while (0)
339#define iucv_dumpit(title, buf, len) 339#define iucv_dumpit(title, buf, len) do { } while (0)
340 340
341#endif 341#endif
342 342
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
index 2eded55ae88d..16ac68c27a27 100644
--- a/drivers/s390/net/lcs.c
+++ b/drivers/s390/net/lcs.c
@@ -670,9 +670,8 @@ lcs_ready_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer)
670 int index, rc; 670 int index, rc;
671 671
672 LCS_DBF_TEXT(5, trace, "rdybuff"); 672 LCS_DBF_TEXT(5, trace, "rdybuff");
673 if (buffer->state != BUF_STATE_LOCKED && 673 BUG_ON(buffer->state != BUF_STATE_LOCKED &&
674 buffer->state != BUF_STATE_PROCESSED) 674 buffer->state != BUF_STATE_PROCESSED);
675 BUG();
676 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); 675 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);
677 buffer->state = BUF_STATE_READY; 676 buffer->state = BUF_STATE_READY;
678 index = buffer - channel->iob; 677 index = buffer - channel->iob;
@@ -696,8 +695,7 @@ __lcs_processed_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer)
696 int index, prev, next; 695 int index, prev, next;
697 696
698 LCS_DBF_TEXT(5, trace, "prcsbuff"); 697 LCS_DBF_TEXT(5, trace, "prcsbuff");
699 if (buffer->state != BUF_STATE_READY) 698 BUG_ON(buffer->state != BUF_STATE_READY);
700 BUG();
701 buffer->state = BUF_STATE_PROCESSED; 699 buffer->state = BUF_STATE_PROCESSED;
702 index = buffer - channel->iob; 700 index = buffer - channel->iob;
703 prev = (index - 1) & (LCS_NUM_BUFFS - 1); 701 prev = (index - 1) & (LCS_NUM_BUFFS - 1);
@@ -729,9 +727,8 @@ lcs_release_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer)
729 unsigned long flags; 727 unsigned long flags;
730 728
731 LCS_DBF_TEXT(5, trace, "relbuff"); 729 LCS_DBF_TEXT(5, trace, "relbuff");
732 if (buffer->state != BUF_STATE_LOCKED && 730 BUG_ON(buffer->state != BUF_STATE_LOCKED &&
733 buffer->state != BUF_STATE_PROCESSED) 731 buffer->state != BUF_STATE_PROCESSED);
734 BUG();
735 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); 732 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);
736 buffer->state = BUF_STATE_EMPTY; 733 buffer->state = BUF_STATE_EMPTY;
737 spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); 734 spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags);
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c
index 5d6e6cbfa360..d7d1cc0a5c8e 100644
--- a/drivers/s390/net/netiucv.c
+++ b/drivers/s390/net/netiucv.c
@@ -112,7 +112,12 @@ struct iucv_connection {
112/** 112/**
113 * Linked list of all connection structs. 113 * Linked list of all connection structs.
114 */ 114 */
115static struct iucv_connection *iucv_connections; 115struct iucv_connection_struct {
116 struct iucv_connection *iucv_connections;
117 rwlock_t iucv_rwlock;
118};
119
120static struct iucv_connection_struct iucv_conns;
116 121
117/** 122/**
118 * Representation of event-data for the 123 * Representation of event-data for the
@@ -1368,8 +1373,10 @@ user_write (struct device *dev, struct device_attribute *attr, const char *buf,
1368 struct net_device *ndev = priv->conn->netdev; 1373 struct net_device *ndev = priv->conn->netdev;
1369 char *p; 1374 char *p;
1370 char *tmp; 1375 char *tmp;
1371 char username[10]; 1376 char username[9];
1372 int i; 1377 int i;
1378 struct iucv_connection **clist = &iucv_conns.iucv_connections;
1379 unsigned long flags;
1373 1380
1374 IUCV_DBF_TEXT(trace, 3, __FUNCTION__); 1381 IUCV_DBF_TEXT(trace, 3, __FUNCTION__);
1375 if (count>9) { 1382 if (count>9) {
@@ -1382,7 +1389,7 @@ user_write (struct device *dev, struct device_attribute *attr, const char *buf,
1382 tmp = strsep((char **) &buf, "\n"); 1389 tmp = strsep((char **) &buf, "\n");
1383 for (i=0, p=tmp; i<8 && *p; i++, p++) { 1390 for (i=0, p=tmp; i<8 && *p; i++, p++) {
1384 if (isalnum(*p) || (*p == '$')) 1391 if (isalnum(*p) || (*p == '$'))
1385 username[i]= *p; 1392 username[i]= toupper(*p);
1386 else if (*p == '\n') { 1393 else if (*p == '\n') {
1387 /* trailing lf, grr */ 1394 /* trailing lf, grr */
1388 break; 1395 break;
@@ -1395,11 +1402,11 @@ user_write (struct device *dev, struct device_attribute *attr, const char *buf,
1395 return -EINVAL; 1402 return -EINVAL;
1396 } 1403 }
1397 } 1404 }
1398 while (i<9) 1405 while (i<8)
1399 username[i++] = ' '; 1406 username[i++] = ' ';
1400 username[9] = '\0'; 1407 username[8] = '\0';
1401 1408
1402 if (memcmp(username, priv->conn->userid, 8)) { 1409 if (memcmp(username, priv->conn->userid, 9)) {
1403 /* username changed */ 1410 /* username changed */
1404 if (ndev->flags & (IFF_UP | IFF_RUNNING)) { 1411 if (ndev->flags & (IFF_UP | IFF_RUNNING)) {
1405 PRINT_WARN( 1412 PRINT_WARN(
@@ -1410,6 +1417,19 @@ user_write (struct device *dev, struct device_attribute *attr, const char *buf,
1410 return -EBUSY; 1417 return -EBUSY;
1411 } 1418 }
1412 } 1419 }
1420 read_lock_irqsave(&iucv_conns.iucv_rwlock, flags);
1421 while (*clist) {
1422 if (!strncmp(username, (*clist)->userid, 9) ||
1423 ((*clist)->netdev != ndev))
1424 break;
1425 clist = &((*clist)->next);
1426 }
1427 read_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags);
1428 if (*clist) {
1429 PRINT_WARN("netiucv: Connection to %s already exists\n",
1430 username);
1431 return -EEXIST;
1432 }
1413 memcpy(priv->conn->userid, username, 9); 1433 memcpy(priv->conn->userid, username, 9);
1414 1434
1415 return count; 1435 return count;
@@ -1781,13 +1801,15 @@ netiucv_unregister_device(struct device *dev)
1781static struct iucv_connection * 1801static struct iucv_connection *
1782netiucv_new_connection(struct net_device *dev, char *username) 1802netiucv_new_connection(struct net_device *dev, char *username)
1783{ 1803{
1784 struct iucv_connection **clist = &iucv_connections; 1804 unsigned long flags;
1805 struct iucv_connection **clist = &iucv_conns.iucv_connections;
1785 struct iucv_connection *conn = 1806 struct iucv_connection *conn =
1786 kzalloc(sizeof(struct iucv_connection), GFP_KERNEL); 1807 kzalloc(sizeof(struct iucv_connection), GFP_KERNEL);
1787 1808
1788 if (conn) { 1809 if (conn) {
1789 skb_queue_head_init(&conn->collect_queue); 1810 skb_queue_head_init(&conn->collect_queue);
1790 skb_queue_head_init(&conn->commit_queue); 1811 skb_queue_head_init(&conn->commit_queue);
1812 spin_lock_init(&conn->collect_lock);
1791 conn->max_buffsize = NETIUCV_BUFSIZE_DEFAULT; 1813 conn->max_buffsize = NETIUCV_BUFSIZE_DEFAULT;
1792 conn->netdev = dev; 1814 conn->netdev = dev;
1793 1815
@@ -1822,8 +1844,10 @@ netiucv_new_connection(struct net_device *dev, char *username)
1822 fsm_newstate(conn->fsm, CONN_STATE_STOPPED); 1844 fsm_newstate(conn->fsm, CONN_STATE_STOPPED);
1823 } 1845 }
1824 1846
1847 write_lock_irqsave(&iucv_conns.iucv_rwlock, flags);
1825 conn->next = *clist; 1848 conn->next = *clist;
1826 *clist = conn; 1849 *clist = conn;
1850 write_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags);
1827 } 1851 }
1828 return conn; 1852 return conn;
1829} 1853}
@@ -1835,14 +1859,17 @@ netiucv_new_connection(struct net_device *dev, char *username)
1835static void 1859static void
1836netiucv_remove_connection(struct iucv_connection *conn) 1860netiucv_remove_connection(struct iucv_connection *conn)
1837{ 1861{
1838 struct iucv_connection **clist = &iucv_connections; 1862 struct iucv_connection **clist = &iucv_conns.iucv_connections;
1863 unsigned long flags;
1839 1864
1840 IUCV_DBF_TEXT(trace, 3, __FUNCTION__); 1865 IUCV_DBF_TEXT(trace, 3, __FUNCTION__);
1841 if (conn == NULL) 1866 if (conn == NULL)
1842 return; 1867 return;
1868 write_lock_irqsave(&iucv_conns.iucv_rwlock, flags);
1843 while (*clist) { 1869 while (*clist) {
1844 if (*clist == conn) { 1870 if (*clist == conn) {
1845 *clist = conn->next; 1871 *clist = conn->next;
1872 write_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags);
1846 if (conn->handle) { 1873 if (conn->handle) {
1847 iucv_unregister_program(conn->handle); 1874 iucv_unregister_program(conn->handle);
1848 conn->handle = NULL; 1875 conn->handle = NULL;
@@ -1855,6 +1882,7 @@ netiucv_remove_connection(struct iucv_connection *conn)
1855 } 1882 }
1856 clist = &((*clist)->next); 1883 clist = &((*clist)->next);
1857 } 1884 }
1885 write_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags);
1858} 1886}
1859 1887
1860/** 1888/**
@@ -1947,9 +1975,11 @@ static ssize_t
1947conn_write(struct device_driver *drv, const char *buf, size_t count) 1975conn_write(struct device_driver *drv, const char *buf, size_t count)
1948{ 1976{
1949 char *p; 1977 char *p;
1950 char username[10]; 1978 char username[9];
1951 int i, ret; 1979 int i, ret;
1952 struct net_device *dev; 1980 struct net_device *dev;
1981 struct iucv_connection **clist = &iucv_conns.iucv_connections;
1982 unsigned long flags;
1953 1983
1954 IUCV_DBF_TEXT(trace, 3, __FUNCTION__); 1984 IUCV_DBF_TEXT(trace, 3, __FUNCTION__);
1955 if (count>9) { 1985 if (count>9) {
@@ -1960,7 +1990,7 @@ conn_write(struct device_driver *drv, const char *buf, size_t count)
1960 1990
1961 for (i=0, p=(char *)buf; i<8 && *p; i++, p++) { 1991 for (i=0, p=(char *)buf; i<8 && *p; i++, p++) {
1962 if (isalnum(*p) || (*p == '$')) 1992 if (isalnum(*p) || (*p == '$'))
1963 username[i]= *p; 1993 username[i]= toupper(*p);
1964 else if (*p == '\n') { 1994 else if (*p == '\n') {
1965 /* trailing lf, grr */ 1995 /* trailing lf, grr */
1966 break; 1996 break;
@@ -1971,9 +2001,22 @@ conn_write(struct device_driver *drv, const char *buf, size_t count)
1971 return -EINVAL; 2001 return -EINVAL;
1972 } 2002 }
1973 } 2003 }
1974 while (i<9) 2004 while (i<8)
1975 username[i++] = ' '; 2005 username[i++] = ' ';
1976 username[9] = '\0'; 2006 username[8] = '\0';
2007
2008 read_lock_irqsave(&iucv_conns.iucv_rwlock, flags);
2009 while (*clist) {
2010 if (!strncmp(username, (*clist)->userid, 9))
2011 break;
2012 clist = &((*clist)->next);
2013 }
2014 read_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags);
2015 if (*clist) {
2016 PRINT_WARN("netiucv: Connection to %s already exists\n",
2017 username);
2018 return -EEXIST;
2019 }
1977 dev = netiucv_init_netdevice(username); 2020 dev = netiucv_init_netdevice(username);
1978 if (!dev) { 2021 if (!dev) {
1979 PRINT_WARN( 2022 PRINT_WARN(
@@ -2015,7 +2058,8 @@ DRIVER_ATTR(connection, 0200, NULL, conn_write);
2015static ssize_t 2058static ssize_t
2016remove_write (struct device_driver *drv, const char *buf, size_t count) 2059remove_write (struct device_driver *drv, const char *buf, size_t count)
2017{ 2060{
2018 struct iucv_connection **clist = &iucv_connections; 2061 struct iucv_connection **clist = &iucv_conns.iucv_connections;
2062 unsigned long flags;
2019 struct net_device *ndev; 2063 struct net_device *ndev;
2020 struct netiucv_priv *priv; 2064 struct netiucv_priv *priv;
2021 struct device *dev; 2065 struct device *dev;
@@ -2026,7 +2070,7 @@ remove_write (struct device_driver *drv, const char *buf, size_t count)
2026 IUCV_DBF_TEXT(trace, 3, __FUNCTION__); 2070 IUCV_DBF_TEXT(trace, 3, __FUNCTION__);
2027 2071
2028 if (count >= IFNAMSIZ) 2072 if (count >= IFNAMSIZ)
2029 count = IFNAMSIZ-1; 2073 count = IFNAMSIZ - 1;;
2030 2074
2031 for (i=0, p=(char *)buf; i<count && *p; i++, p++) { 2075 for (i=0, p=(char *)buf; i<count && *p; i++, p++) {
2032 if ((*p == '\n') || (*p == ' ')) { 2076 if ((*p == '\n') || (*p == ' ')) {
@@ -2038,6 +2082,7 @@ remove_write (struct device_driver *drv, const char *buf, size_t count)
2038 } 2082 }
2039 name[i] = '\0'; 2083 name[i] = '\0';
2040 2084
2085 read_lock_irqsave(&iucv_conns.iucv_rwlock, flags);
2041 while (*clist) { 2086 while (*clist) {
2042 ndev = (*clist)->netdev; 2087 ndev = (*clist)->netdev;
2043 priv = (struct netiucv_priv*)ndev->priv; 2088 priv = (struct netiucv_priv*)ndev->priv;
@@ -2047,6 +2092,7 @@ remove_write (struct device_driver *drv, const char *buf, size_t count)
2047 clist = &((*clist)->next); 2092 clist = &((*clist)->next);
2048 continue; 2093 continue;
2049 } 2094 }
2095 read_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags);
2050 if (ndev->flags & (IFF_UP | IFF_RUNNING)) { 2096 if (ndev->flags & (IFF_UP | IFF_RUNNING)) {
2051 PRINT_WARN( 2097 PRINT_WARN(
2052 "netiucv: net device %s active with peer %s\n", 2098 "netiucv: net device %s active with peer %s\n",
@@ -2060,6 +2106,7 @@ remove_write (struct device_driver *drv, const char *buf, size_t count)
2060 netiucv_unregister_device(dev); 2106 netiucv_unregister_device(dev);
2061 return count; 2107 return count;
2062 } 2108 }
2109 read_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags);
2063 PRINT_WARN("netiucv: net device %s unknown\n", name); 2110 PRINT_WARN("netiucv: net device %s unknown\n", name);
2064 IUCV_DBF_TEXT(data, 2, "remove_write: unknown device\n"); 2111 IUCV_DBF_TEXT(data, 2, "remove_write: unknown device\n");
2065 return -EINVAL; 2112 return -EINVAL;
@@ -2077,8 +2124,8 @@ static void __exit
2077netiucv_exit(void) 2124netiucv_exit(void)
2078{ 2125{
2079 IUCV_DBF_TEXT(trace, 3, __FUNCTION__); 2126 IUCV_DBF_TEXT(trace, 3, __FUNCTION__);
2080 while (iucv_connections) { 2127 while (iucv_conns.iucv_connections) {
2081 struct net_device *ndev = iucv_connections->netdev; 2128 struct net_device *ndev = iucv_conns.iucv_connections->netdev;
2082 struct netiucv_priv *priv = (struct netiucv_priv*)ndev->priv; 2129 struct netiucv_priv *priv = (struct netiucv_priv*)ndev->priv;
2083 struct device *dev = priv->dev; 2130 struct device *dev = priv->dev;
2084 2131
@@ -2120,6 +2167,7 @@ netiucv_init(void)
2120 if (!ret) { 2167 if (!ret) {
2121 ret = driver_create_file(&netiucv_driver, &driver_attr_remove); 2168 ret = driver_create_file(&netiucv_driver, &driver_attr_remove);
2122 netiucv_banner(); 2169 netiucv_banner();
2170 rwlock_init(&iucv_conns.iucv_rwlock);
2123 } else { 2171 } else {
2124 PRINT_ERR("NETIUCV: failed to add driver attribute.\n"); 2172 PRINT_ERR("NETIUCV: failed to add driver attribute.\n");
2125 IUCV_DBF_TEXT_(setup, 2, "ret %d from driver_create_file\n", ret); 2173 IUCV_DBF_TEXT_(setup, 2, "ret %d from driver_create_file\n", ret);
diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h
index 619f4a0c7160..821383d8cbe7 100644
--- a/drivers/s390/net/qeth.h
+++ b/drivers/s390/net/qeth.h
@@ -176,7 +176,6 @@ extern struct ccwgroup_driver qeth_ccwgroup_driver;
176/** 176/**
177 * card stuff 177 * card stuff
178 */ 178 */
179#ifdef CONFIG_QETH_PERF_STATS
180struct qeth_perf_stats { 179struct qeth_perf_stats {
181 unsigned int bufs_rec; 180 unsigned int bufs_rec;
182 unsigned int bufs_sent; 181 unsigned int bufs_sent;
@@ -211,8 +210,10 @@ struct qeth_perf_stats {
211 unsigned int large_send_cnt; 210 unsigned int large_send_cnt;
212 unsigned int sg_skbs_sent; 211 unsigned int sg_skbs_sent;
213 unsigned int sg_frags_sent; 212 unsigned int sg_frags_sent;
213 /* initial values when measuring starts */
214 unsigned long initial_rx_packets;
215 unsigned long initial_tx_packets;
214}; 216};
215#endif /* CONFIG_QETH_PERF_STATS */
216 217
217/* Routing stuff */ 218/* Routing stuff */
218struct qeth_routing_info { 219struct qeth_routing_info {
@@ -462,6 +463,7 @@ enum qeth_qdio_info_states {
462 QETH_QDIO_UNINITIALIZED, 463 QETH_QDIO_UNINITIALIZED,
463 QETH_QDIO_ALLOCATED, 464 QETH_QDIO_ALLOCATED,
464 QETH_QDIO_ESTABLISHED, 465 QETH_QDIO_ESTABLISHED,
466 QETH_QDIO_CLEANING
465}; 467};
466 468
467struct qeth_buffer_pool_entry { 469struct qeth_buffer_pool_entry {
@@ -536,7 +538,7 @@ struct qeth_qdio_out_q {
536} __attribute__ ((aligned(256))); 538} __attribute__ ((aligned(256)));
537 539
538struct qeth_qdio_info { 540struct qeth_qdio_info {
539 volatile enum qeth_qdio_info_states state; 541 atomic_t state;
540 /* input */ 542 /* input */
541 struct qeth_qdio_q *in_q; 543 struct qeth_qdio_q *in_q;
542 struct qeth_qdio_buffer_pool in_buf_pool; 544 struct qeth_qdio_buffer_pool in_buf_pool;
@@ -767,6 +769,7 @@ struct qeth_card_options {
767 int fake_ll; 769 int fake_ll;
768 int layer2; 770 int layer2;
769 enum qeth_large_send_types large_send; 771 enum qeth_large_send_types large_send;
772 int performance_stats;
770}; 773};
771 774
772/* 775/*
@@ -819,9 +822,7 @@ struct qeth_card {
819 struct list_head cmd_waiter_list; 822 struct list_head cmd_waiter_list;
820 /* QDIO buffer handling */ 823 /* QDIO buffer handling */
821 struct qeth_qdio_info qdio; 824 struct qeth_qdio_info qdio;
822#ifdef CONFIG_QETH_PERF_STATS
823 struct qeth_perf_stats perf_stats; 825 struct qeth_perf_stats perf_stats;
824#endif /* CONFIG_QETH_PERF_STATS */
825 int use_hard_stop; 826 int use_hard_stop;
826 int (*orig_hard_header)(struct sk_buff *,struct net_device *, 827 int (*orig_hard_header)(struct sk_buff *,struct net_device *,
827 unsigned short,void *,void *,unsigned); 828 unsigned short,void *,void *,unsigned);
@@ -859,23 +860,18 @@ qeth_get_ipa_adp_type(enum qeth_link_types link_type)
859 } 860 }
860} 861}
861 862
862static inline int 863static inline struct sk_buff *
863qeth_realloc_headroom(struct qeth_card *card, struct sk_buff **skb, int size) 864qeth_realloc_headroom(struct qeth_card *card, struct sk_buff *skb, int size)
864{ 865{
865 struct sk_buff *new_skb = NULL; 866 struct sk_buff *new_skb = skb;
866 867
867 if (skb_headroom(*skb) < size){ 868 if (skb_headroom(skb) >= size)
868 new_skb = skb_realloc_headroom(*skb, size); 869 return skb;
869 if (!new_skb) { 870 new_skb = skb_realloc_headroom(skb, size);
870 PRINT_ERR("qeth_prepare_skb: could " 871 if (!new_skb)
871 "not realloc headroom for qeth_hdr " 872 PRINT_ERR("Could not realloc headroom for qeth_hdr "
872 "on interface %s", QETH_CARD_IFNAME(card)); 873 "on interface %s", QETH_CARD_IFNAME(card));
873 return -ENOMEM; 874 return new_skb;
874 }
875 kfree_skb(*skb);
876 *skb = new_skb;
877 }
878 return 0;
879} 875}
880 876
881static inline struct sk_buff * 877static inline struct sk_buff *
@@ -885,16 +881,15 @@ qeth_pskb_unshare(struct sk_buff *skb, int pri)
885 if (!skb_cloned(skb)) 881 if (!skb_cloned(skb))
886 return skb; 882 return skb;
887 nskb = skb_copy(skb, pri); 883 nskb = skb_copy(skb, pri);
888 kfree_skb(skb); /* free our shared copy */
889 return nskb; 884 return nskb;
890} 885}
891 886
892static inline void * 887static inline void *
893qeth_push_skb(struct qeth_card *card, struct sk_buff **skb, int size) 888qeth_push_skb(struct qeth_card *card, struct sk_buff *skb, int size)
894{ 889{
895 void *hdr; 890 void *hdr;
896 891
897 hdr = (void *) skb_push(*skb, size); 892 hdr = (void *) skb_push(skb, size);
898 /* 893 /*
899 * sanity check, the Linux memory allocation scheme should 894 * sanity check, the Linux memory allocation scheme should
900 * never present us cases like this one (the qdio header size plus 895 * never present us cases like this one (the qdio header size plus
@@ -903,8 +898,7 @@ qeth_push_skb(struct qeth_card *card, struct sk_buff **skb, int size)
903 if ((((unsigned long) hdr) & (~(PAGE_SIZE - 1))) != 898 if ((((unsigned long) hdr) & (~(PAGE_SIZE - 1))) !=
904 (((unsigned long) hdr + size + 899 (((unsigned long) hdr + size +
905 QETH_IP_HEADER_SIZE) & (~(PAGE_SIZE - 1)))) { 900 QETH_IP_HEADER_SIZE) & (~(PAGE_SIZE - 1)))) {
906 PRINT_ERR("qeth_prepare_skb: misaligned " 901 PRINT_ERR("Misaligned packet on interface %s. Discarded.",
907 "packet on interface %s. Discarded.",
908 QETH_CARD_IFNAME(card)); 902 QETH_CARD_IFNAME(card));
909 return NULL; 903 return NULL;
910 } 904 }
@@ -1056,13 +1050,11 @@ qeth_get_arphdr_type(int cardtype, int linktype)
1056 } 1050 }
1057} 1051}
1058 1052
1059#ifdef CONFIG_QETH_PERF_STATS
1060static inline int 1053static inline int
1061qeth_get_micros(void) 1054qeth_get_micros(void)
1062{ 1055{
1063 return (int) (get_clock() >> 12); 1056 return (int) (get_clock() >> 12);
1064} 1057}
1065#endif
1066 1058
1067static inline int 1059static inline int
1068qeth_get_qdio_q_format(struct qeth_card *card) 1060qeth_get_qdio_q_format(struct qeth_card *card)
@@ -1096,10 +1088,11 @@ qeth_string_to_ipaddr4(const char *buf, __u8 *addr)
1096{ 1088{
1097 int count = 0, rc = 0; 1089 int count = 0, rc = 0;
1098 int in[4]; 1090 int in[4];
1091 char c;
1099 1092
1100 rc = sscanf(buf, "%d.%d.%d.%d%n", 1093 rc = sscanf(buf, "%u.%u.%u.%u%c",
1101 &in[0], &in[1], &in[2], &in[3], &count); 1094 &in[0], &in[1], &in[2], &in[3], &c);
1102 if (rc != 4 || count<=0) 1095 if (rc != 4 && (rc != 5 || c != '\n'))
1103 return -EINVAL; 1096 return -EINVAL;
1104 for (count = 0; count < 4; count++) { 1097 for (count = 0; count < 4; count++) {
1105 if (in[count] > 255) 1098 if (in[count] > 255)
@@ -1123,24 +1116,28 @@ qeth_ipaddr6_to_string(const __u8 *addr, char *buf)
1123static inline int 1116static inline int
1124qeth_string_to_ipaddr6(const char *buf, __u8 *addr) 1117qeth_string_to_ipaddr6(const char *buf, __u8 *addr)
1125{ 1118{
1126 char *end, *start; 1119 const char *end, *end_tmp, *start;
1127 __u16 *in; 1120 __u16 *in;
1128 char num[5]; 1121 char num[5];
1129 int num2, cnt, out, found, save_cnt; 1122 int num2, cnt, out, found, save_cnt;
1130 unsigned short in_tmp[8] = {0, }; 1123 unsigned short in_tmp[8] = {0, };
1131 1124
1132 cnt = out = found = save_cnt = num2 = 0; 1125 cnt = out = found = save_cnt = num2 = 0;
1133 end = start = (char *) buf; 1126 end = start = buf;
1134 in = (__u16 *) addr; 1127 in = (__u16 *) addr;
1135 memset(in, 0, 16); 1128 memset(in, 0, 16);
1136 while (end) { 1129 while (*end) {
1137 end = strchr(end,':'); 1130 end = strchr(start,':');
1138 if (end == NULL) { 1131 if (end == NULL) {
1139 end = (char *)buf + (strlen(buf)); 1132 end = buf + strlen(buf);
1140 out = 1; 1133 if ((end_tmp = strchr(start, '\n')) != NULL)
1134 end = end_tmp;
1135 out = 1;
1141 } 1136 }
1142 if ((end - start)) { 1137 if ((end - start)) {
1143 memset(num, 0, 5); 1138 memset(num, 0, 5);
1139 if ((end - start) > 4)
1140 return -EINVAL;
1144 memcpy(num, start, end - start); 1141 memcpy(num, start, end - start);
1145 if (!qeth_isxdigit(num)) 1142 if (!qeth_isxdigit(num))
1146 return -EINVAL; 1143 return -EINVAL;
@@ -1158,6 +1155,8 @@ qeth_string_to_ipaddr6(const char *buf, __u8 *addr)
1158 } 1155 }
1159 start = ++end; 1156 start = ++end;
1160 } 1157 }
1158 if (cnt + save_cnt > 8)
1159 return -EINVAL;
1161 cnt = 7; 1160 cnt = 7;
1162 while (save_cnt) 1161 while (save_cnt)
1163 in[cnt--] = in_tmp[--save_cnt]; 1162 in[cnt--] = in_tmp[--save_cnt];
diff --git a/drivers/s390/net/qeth_eddp.c b/drivers/s390/net/qeth_eddp.c
index 8491598f9149..a363721cf28d 100644
--- a/drivers/s390/net/qeth_eddp.c
+++ b/drivers/s390/net/qeth_eddp.c
@@ -179,9 +179,8 @@ out_check:
179 flush_cnt++; 179 flush_cnt++;
180 } 180 }
181 } else { 181 } else {
182#ifdef CONFIG_QETH_PERF_STATS 182 if (queue->card->options.performance_stats)
183 queue->card->perf_stats.skbs_sent_pack++; 183 queue->card->perf_stats.skbs_sent_pack++;
184#endif
185 QETH_DBF_TEXT(trace, 6, "fillbfpa"); 184 QETH_DBF_TEXT(trace, 6, "fillbfpa");
186 if (buf->next_element_to_fill >= 185 if (buf->next_element_to_fill >=
187 QETH_MAX_BUFFER_ELEMENTS(queue->card)) { 186 QETH_MAX_BUFFER_ELEMENTS(queue->card)) {
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index e1327b8fce00..5613b4564fa2 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -1073,6 +1073,7 @@ qeth_set_intial_options(struct qeth_card *card)
1073 card->options.layer2 = 1; 1073 card->options.layer2 = 1;
1074 else 1074 else
1075 card->options.layer2 = 0; 1075 card->options.layer2 = 0;
1076 card->options.performance_stats = 1;
1076} 1077}
1077 1078
1078/** 1079/**
@@ -1708,6 +1709,7 @@ qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob)
1708 "IP address reset.\n", 1709 "IP address reset.\n",
1709 QETH_CARD_IFNAME(card), 1710 QETH_CARD_IFNAME(card),
1710 card->info.chpid); 1711 card->info.chpid);
1712 netif_carrier_on(card->dev);
1711 qeth_schedule_recovery(card); 1713 qeth_schedule_recovery(card);
1712 return NULL; 1714 return NULL;
1713 case IPA_CMD_MODCCID: 1715 case IPA_CMD_MODCCID:
@@ -2464,24 +2466,6 @@ qeth_rebuild_skb_fake_ll(struct qeth_card *card, struct sk_buff *skb,
2464 qeth_rebuild_skb_fake_ll_eth(card, skb, hdr); 2466 qeth_rebuild_skb_fake_ll_eth(card, skb, hdr);
2465} 2467}
2466 2468
2467static inline void
2468qeth_rebuild_skb_vlan(struct qeth_card *card, struct sk_buff *skb,
2469 struct qeth_hdr *hdr)
2470{
2471#ifdef CONFIG_QETH_VLAN
2472 u16 *vlan_tag;
2473
2474 if (hdr->hdr.l3.ext_flags &
2475 (QETH_HDR_EXT_VLAN_FRAME | QETH_HDR_EXT_INCLUDE_VLAN_TAG)) {
2476 vlan_tag = (u16 *) skb_push(skb, VLAN_HLEN);
2477 *vlan_tag = (hdr->hdr.l3.ext_flags & QETH_HDR_EXT_VLAN_FRAME)?
2478 hdr->hdr.l3.vlan_id : *((u16 *)&hdr->hdr.l3.dest_addr[12]);
2479 *(vlan_tag + 1) = skb->protocol;
2480 skb->protocol = __constant_htons(ETH_P_8021Q);
2481 }
2482#endif /* CONFIG_QETH_VLAN */
2483}
2484
2485static inline __u16 2469static inline __u16
2486qeth_layer2_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, 2470qeth_layer2_rebuild_skb(struct qeth_card *card, struct sk_buff *skb,
2487 struct qeth_hdr *hdr) 2471 struct qeth_hdr *hdr)
@@ -2510,15 +2494,16 @@ qeth_layer2_rebuild_skb(struct qeth_card *card, struct sk_buff *skb,
2510 return vlan_id; 2494 return vlan_id;
2511} 2495}
2512 2496
2513static inline void 2497static inline __u16
2514qeth_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, 2498qeth_rebuild_skb(struct qeth_card *card, struct sk_buff *skb,
2515 struct qeth_hdr *hdr) 2499 struct qeth_hdr *hdr)
2516{ 2500{
2501 unsigned short vlan_id = 0;
2517#ifdef CONFIG_QETH_IPV6 2502#ifdef CONFIG_QETH_IPV6
2518 if (hdr->hdr.l3.flags & QETH_HDR_PASSTHRU) { 2503 if (hdr->hdr.l3.flags & QETH_HDR_PASSTHRU) {
2519 skb->pkt_type = PACKET_HOST; 2504 skb->pkt_type = PACKET_HOST;
2520 skb->protocol = qeth_type_trans(skb, card->dev); 2505 skb->protocol = qeth_type_trans(skb, card->dev);
2521 return; 2506 return 0;
2522 } 2507 }
2523#endif /* CONFIG_QETH_IPV6 */ 2508#endif /* CONFIG_QETH_IPV6 */
2524 skb->protocol = htons((hdr->hdr.l3.flags & QETH_HDR_IPV6)? ETH_P_IPV6 : 2509 skb->protocol = htons((hdr->hdr.l3.flags & QETH_HDR_IPV6)? ETH_P_IPV6 :
@@ -2540,7 +2525,13 @@ qeth_rebuild_skb(struct qeth_card *card, struct sk_buff *skb,
2540 default: 2525 default:
2541 skb->pkt_type = PACKET_HOST; 2526 skb->pkt_type = PACKET_HOST;
2542 } 2527 }
2543 qeth_rebuild_skb_vlan(card, skb, hdr); 2528
2529 if (hdr->hdr.l3.ext_flags &
2530 (QETH_HDR_EXT_VLAN_FRAME | QETH_HDR_EXT_INCLUDE_VLAN_TAG)) {
2531 vlan_id = (hdr->hdr.l3.ext_flags & QETH_HDR_EXT_VLAN_FRAME)?
2532 hdr->hdr.l3.vlan_id : *((u16 *)&hdr->hdr.l3.dest_addr[12]);
2533 }
2534
2544 if (card->options.fake_ll) 2535 if (card->options.fake_ll)
2545 qeth_rebuild_skb_fake_ll(card, skb, hdr); 2536 qeth_rebuild_skb_fake_ll(card, skb, hdr);
2546 else 2537 else
@@ -2556,6 +2547,7 @@ qeth_rebuild_skb(struct qeth_card *card, struct sk_buff *skb,
2556 else 2547 else
2557 skb->ip_summed = SW_CHECKSUMMING; 2548 skb->ip_summed = SW_CHECKSUMMING;
2558 } 2549 }
2550 return vlan_id;
2559} 2551}
2560 2552
2561static inline void 2553static inline void
@@ -2568,20 +2560,20 @@ qeth_process_inbound_buffer(struct qeth_card *card,
2568 int offset; 2560 int offset;
2569 int rxrc; 2561 int rxrc;
2570 __u16 vlan_tag = 0; 2562 __u16 vlan_tag = 0;
2563 __u16 *vlan_addr;
2571 2564
2572 /* get first element of current buffer */ 2565 /* get first element of current buffer */
2573 element = (struct qdio_buffer_element *)&buf->buffer->element[0]; 2566 element = (struct qdio_buffer_element *)&buf->buffer->element[0];
2574 offset = 0; 2567 offset = 0;
2575#ifdef CONFIG_QETH_PERF_STATS 2568 if (card->options.performance_stats)
2576 card->perf_stats.bufs_rec++; 2569 card->perf_stats.bufs_rec++;
2577#endif
2578 while((skb = qeth_get_next_skb(card, buf->buffer, &element, 2570 while((skb = qeth_get_next_skb(card, buf->buffer, &element,
2579 &offset, &hdr))) { 2571 &offset, &hdr))) {
2580 skb->dev = card->dev; 2572 skb->dev = card->dev;
2581 if (hdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) 2573 if (hdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2)
2582 vlan_tag = qeth_layer2_rebuild_skb(card, skb, hdr); 2574 vlan_tag = qeth_layer2_rebuild_skb(card, skb, hdr);
2583 else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3) 2575 else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3)
2584 qeth_rebuild_skb(card, skb, hdr); 2576 vlan_tag = qeth_rebuild_skb(card, skb, hdr);
2585 else { /*in case of OSN*/ 2577 else { /*in case of OSN*/
2586 skb_push(skb, sizeof(struct qeth_hdr)); 2578 skb_push(skb, sizeof(struct qeth_hdr));
2587 memcpy(skb->data, hdr, sizeof(struct qeth_hdr)); 2579 memcpy(skb->data, hdr, sizeof(struct qeth_hdr));
@@ -2591,14 +2583,19 @@ qeth_process_inbound_buffer(struct qeth_card *card,
2591 dev_kfree_skb_any(skb); 2583 dev_kfree_skb_any(skb);
2592 continue; 2584 continue;
2593 } 2585 }
2586 if (card->info.type == QETH_CARD_TYPE_OSN)
2587 rxrc = card->osn_info.data_cb(skb);
2588 else
2594#ifdef CONFIG_QETH_VLAN 2589#ifdef CONFIG_QETH_VLAN
2595 if (vlan_tag) 2590 if (vlan_tag)
2596 vlan_hwaccel_rx(skb, card->vlangrp, vlan_tag); 2591 if (card->vlangrp)
2592 vlan_hwaccel_rx(skb, card->vlangrp, vlan_tag);
2593 else {
2594 dev_kfree_skb_any(skb);
2595 continue;
2596 }
2597 else 2597 else
2598#endif 2598#endif
2599 if (card->info.type == QETH_CARD_TYPE_OSN)
2600 rxrc = card->osn_info.data_cb(skb);
2601 else
2602 rxrc = netif_rx(skb); 2599 rxrc = netif_rx(skb);
2603 card->dev->last_rx = jiffies; 2600 card->dev->last_rx = jiffies;
2604 card->stats.rx_packets++; 2601 card->stats.rx_packets++;
@@ -2626,7 +2623,7 @@ qeth_init_input_buffer(struct qeth_card *card, struct qeth_qdio_buffer *buf)
2626{ 2623{
2627 struct qeth_buffer_pool_entry *pool_entry; 2624 struct qeth_buffer_pool_entry *pool_entry;
2628 int i; 2625 int i;
2629 2626
2630 pool_entry = qeth_get_buffer_pool_entry(card); 2627 pool_entry = qeth_get_buffer_pool_entry(card);
2631 /* 2628 /*
2632 * since the buffer is accessed only from the input_tasklet 2629 * since the buffer is accessed only from the input_tasklet
@@ -2700,17 +2697,18 @@ qeth_queue_input_buffer(struct qeth_card *card, int index)
2700 * 'index') un-requeued -> this buffer is the first buffer that 2697 * 'index') un-requeued -> this buffer is the first buffer that
2701 * will be requeued the next time 2698 * will be requeued the next time
2702 */ 2699 */
2703#ifdef CONFIG_QETH_PERF_STATS 2700 if (card->options.performance_stats) {
2704 card->perf_stats.inbound_do_qdio_cnt++; 2701 card->perf_stats.inbound_do_qdio_cnt++;
2705 card->perf_stats.inbound_do_qdio_start_time = qeth_get_micros(); 2702 card->perf_stats.inbound_do_qdio_start_time =
2706#endif 2703 qeth_get_micros();
2704 }
2707 rc = do_QDIO(CARD_DDEV(card), 2705 rc = do_QDIO(CARD_DDEV(card),
2708 QDIO_FLAG_SYNC_INPUT | QDIO_FLAG_UNDER_INTERRUPT, 2706 QDIO_FLAG_SYNC_INPUT | QDIO_FLAG_UNDER_INTERRUPT,
2709 0, queue->next_buf_to_init, count, NULL); 2707 0, queue->next_buf_to_init, count, NULL);
2710#ifdef CONFIG_QETH_PERF_STATS 2708 if (card->options.performance_stats)
2711 card->perf_stats.inbound_do_qdio_time += qeth_get_micros() - 2709 card->perf_stats.inbound_do_qdio_time +=
2712 card->perf_stats.inbound_do_qdio_start_time; 2710 qeth_get_micros() -
2713#endif 2711 card->perf_stats.inbound_do_qdio_start_time;
2714 if (rc){ 2712 if (rc){
2715 PRINT_WARN("qeth_queue_input_buffer's do_QDIO " 2713 PRINT_WARN("qeth_queue_input_buffer's do_QDIO "
2716 "return %i (device %s).\n", 2714 "return %i (device %s).\n",
@@ -2746,10 +2744,10 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status,
2746 QETH_DBF_TEXT(trace, 6, "qdinput"); 2744 QETH_DBF_TEXT(trace, 6, "qdinput");
2747 card = (struct qeth_card *) card_ptr; 2745 card = (struct qeth_card *) card_ptr;
2748 net_dev = card->dev; 2746 net_dev = card->dev;
2749#ifdef CONFIG_QETH_PERF_STATS 2747 if (card->options.performance_stats) {
2750 card->perf_stats.inbound_cnt++; 2748 card->perf_stats.inbound_cnt++;
2751 card->perf_stats.inbound_start_time = qeth_get_micros(); 2749 card->perf_stats.inbound_start_time = qeth_get_micros();
2752#endif 2750 }
2753 if (status & QDIO_STATUS_LOOK_FOR_ERROR) { 2751 if (status & QDIO_STATUS_LOOK_FOR_ERROR) {
2754 if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION){ 2752 if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION){
2755 QETH_DBF_TEXT(trace, 1,"qdinchk"); 2753 QETH_DBF_TEXT(trace, 1,"qdinchk");
@@ -2771,10 +2769,9 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status,
2771 qeth_put_buffer_pool_entry(card, buffer->pool_entry); 2769 qeth_put_buffer_pool_entry(card, buffer->pool_entry);
2772 qeth_queue_input_buffer(card, index); 2770 qeth_queue_input_buffer(card, index);
2773 } 2771 }
2774#ifdef CONFIG_QETH_PERF_STATS 2772 if (card->options.performance_stats)
2775 card->perf_stats.inbound_time += qeth_get_micros() - 2773 card->perf_stats.inbound_time += qeth_get_micros() -
2776 card->perf_stats.inbound_start_time; 2774 card->perf_stats.inbound_start_time;
2777#endif
2778} 2775}
2779 2776
2780static inline int 2777static inline int
@@ -2864,10 +2861,11 @@ qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int,
2864 } 2861 }
2865 2862
2866 queue->card->dev->trans_start = jiffies; 2863 queue->card->dev->trans_start = jiffies;
2867#ifdef CONFIG_QETH_PERF_STATS 2864 if (queue->card->options.performance_stats) {
2868 queue->card->perf_stats.outbound_do_qdio_cnt++; 2865 queue->card->perf_stats.outbound_do_qdio_cnt++;
2869 queue->card->perf_stats.outbound_do_qdio_start_time = qeth_get_micros(); 2866 queue->card->perf_stats.outbound_do_qdio_start_time =
2870#endif 2867 qeth_get_micros();
2868 }
2871 if (under_int) 2869 if (under_int)
2872 rc = do_QDIO(CARD_DDEV(queue->card), 2870 rc = do_QDIO(CARD_DDEV(queue->card),
2873 QDIO_FLAG_SYNC_OUTPUT | QDIO_FLAG_UNDER_INTERRUPT, 2871 QDIO_FLAG_SYNC_OUTPUT | QDIO_FLAG_UNDER_INTERRUPT,
@@ -2875,10 +2873,10 @@ qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int,
2875 else 2873 else
2876 rc = do_QDIO(CARD_DDEV(queue->card), QDIO_FLAG_SYNC_OUTPUT, 2874 rc = do_QDIO(CARD_DDEV(queue->card), QDIO_FLAG_SYNC_OUTPUT,
2877 queue->queue_no, index, count, NULL); 2875 queue->queue_no, index, count, NULL);
2878#ifdef CONFIG_QETH_PERF_STATS 2876 if (queue->card->options.performance_stats)
2879 queue->card->perf_stats.outbound_do_qdio_time += qeth_get_micros() - 2877 queue->card->perf_stats.outbound_do_qdio_time +=
2880 queue->card->perf_stats.outbound_do_qdio_start_time; 2878 qeth_get_micros() -
2881#endif 2879 queue->card->perf_stats.outbound_do_qdio_start_time;
2882 if (rc){ 2880 if (rc){
2883 QETH_DBF_TEXT(trace, 2, "flushbuf"); 2881 QETH_DBF_TEXT(trace, 2, "flushbuf");
2884 QETH_DBF_TEXT_(trace, 2, " err%d", rc); 2882 QETH_DBF_TEXT_(trace, 2, " err%d", rc);
@@ -2890,9 +2888,8 @@ qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int,
2890 return; 2888 return;
2891 } 2889 }
2892 atomic_add(count, &queue->used_buffers); 2890 atomic_add(count, &queue->used_buffers);
2893#ifdef CONFIG_QETH_PERF_STATS 2891 if (queue->card->options.performance_stats)
2894 queue->card->perf_stats.bufs_sent += count; 2892 queue->card->perf_stats.bufs_sent += count;
2895#endif
2896} 2893}
2897 2894
2898/* 2895/*
@@ -2907,9 +2904,8 @@ qeth_switch_to_packing_if_needed(struct qeth_qdio_out_q *queue)
2907 >= QETH_HIGH_WATERMARK_PACK){ 2904 >= QETH_HIGH_WATERMARK_PACK){
2908 /* switch non-PACKING -> PACKING */ 2905 /* switch non-PACKING -> PACKING */
2909 QETH_DBF_TEXT(trace, 6, "np->pack"); 2906 QETH_DBF_TEXT(trace, 6, "np->pack");
2910#ifdef CONFIG_QETH_PERF_STATS 2907 if (queue->card->options.performance_stats)
2911 queue->card->perf_stats.sc_dp_p++; 2908 queue->card->perf_stats.sc_dp_p++;
2912#endif
2913 queue->do_pack = 1; 2909 queue->do_pack = 1;
2914 } 2910 }
2915 } 2911 }
@@ -2932,9 +2928,8 @@ qeth_switch_to_nonpacking_if_needed(struct qeth_qdio_out_q *queue)
2932 <= QETH_LOW_WATERMARK_PACK) { 2928 <= QETH_LOW_WATERMARK_PACK) {
2933 /* switch PACKING -> non-PACKING */ 2929 /* switch PACKING -> non-PACKING */
2934 QETH_DBF_TEXT(trace, 6, "pack->np"); 2930 QETH_DBF_TEXT(trace, 6, "pack->np");
2935#ifdef CONFIG_QETH_PERF_STATS 2931 if (queue->card->options.performance_stats)
2936 queue->card->perf_stats.sc_p_dp++; 2932 queue->card->perf_stats.sc_p_dp++;
2937#endif
2938 queue->do_pack = 0; 2933 queue->do_pack = 0;
2939 /* flush packing buffers */ 2934 /* flush packing buffers */
2940 buffer = &queue->bufs[queue->next_buf_to_fill]; 2935 buffer = &queue->bufs[queue->next_buf_to_fill];
@@ -2946,7 +2941,7 @@ qeth_switch_to_nonpacking_if_needed(struct qeth_qdio_out_q *queue)
2946 queue->next_buf_to_fill = 2941 queue->next_buf_to_fill =
2947 (queue->next_buf_to_fill + 1) % 2942 (queue->next_buf_to_fill + 1) %
2948 QDIO_MAX_BUFFERS_PER_Q; 2943 QDIO_MAX_BUFFERS_PER_Q;
2949 } 2944 }
2950 } 2945 }
2951 } 2946 }
2952 return flush_count; 2947 return flush_count;
@@ -3002,11 +2997,10 @@ qeth_check_outbound_queue(struct qeth_qdio_out_q *queue)
3002 !atomic_read(&queue->set_pci_flags_count)) 2997 !atomic_read(&queue->set_pci_flags_count))
3003 flush_cnt += 2998 flush_cnt +=
3004 qeth_flush_buffers_on_no_pci(queue); 2999 qeth_flush_buffers_on_no_pci(queue);
3005#ifdef CONFIG_QETH_PERF_STATS 3000 if (queue->card->options.performance_stats &&
3006 if (q_was_packing) 3001 q_was_packing)
3007 queue->card->perf_stats.bufs_sent_pack += 3002 queue->card->perf_stats.bufs_sent_pack +=
3008 flush_cnt; 3003 flush_cnt;
3009#endif
3010 if (flush_cnt) 3004 if (flush_cnt)
3011 qeth_flush_buffers(queue, 1, index, flush_cnt); 3005 qeth_flush_buffers(queue, 1, index, flush_cnt);
3012 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); 3006 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);
@@ -3036,10 +3030,11 @@ qeth_qdio_output_handler(struct ccw_device * ccwdev, unsigned int status,
3036 return; 3030 return;
3037 } 3031 }
3038 } 3032 }
3039#ifdef CONFIG_QETH_PERF_STATS 3033 if (card->options.performance_stats) {
3040 card->perf_stats.outbound_handler_cnt++; 3034 card->perf_stats.outbound_handler_cnt++;
3041 card->perf_stats.outbound_handler_start_time = qeth_get_micros(); 3035 card->perf_stats.outbound_handler_start_time =
3042#endif 3036 qeth_get_micros();
3037 }
3043 for(i = first_element; i < (first_element + count); ++i){ 3038 for(i = first_element; i < (first_element + count); ++i){
3044 buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q]; 3039 buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q];
3045 /*we only handle the KICK_IT error by doing a recovery */ 3040 /*we only handle the KICK_IT error by doing a recovery */
@@ -3058,10 +3053,9 @@ qeth_qdio_output_handler(struct ccw_device * ccwdev, unsigned int status,
3058 qeth_check_outbound_queue(queue); 3053 qeth_check_outbound_queue(queue);
3059 3054
3060 netif_wake_queue(queue->card->dev); 3055 netif_wake_queue(queue->card->dev);
3061#ifdef CONFIG_QETH_PERF_STATS 3056 if (card->options.performance_stats)
3062 card->perf_stats.outbound_handler_time += qeth_get_micros() - 3057 card->perf_stats.outbound_handler_time += qeth_get_micros() -
3063 card->perf_stats.outbound_handler_start_time; 3058 card->perf_stats.outbound_handler_start_time;
3064#endif
3065} 3059}
3066 3060
3067static void 3061static void
@@ -3185,13 +3179,14 @@ qeth_alloc_qdio_buffers(struct qeth_card *card)
3185 3179
3186 QETH_DBF_TEXT(setup, 2, "allcqdbf"); 3180 QETH_DBF_TEXT(setup, 2, "allcqdbf");
3187 3181
3188 if (card->qdio.state == QETH_QDIO_ALLOCATED) 3182 if (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_UNINITIALIZED,
3183 QETH_QDIO_ALLOCATED) != QETH_QDIO_UNINITIALIZED)
3189 return 0; 3184 return 0;
3190 3185
3191 card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q), 3186 card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q),
3192 GFP_KERNEL|GFP_DMA); 3187 GFP_KERNEL|GFP_DMA);
3193 if (!card->qdio.in_q) 3188 if (!card->qdio.in_q)
3194 return - ENOMEM; 3189 goto out_nomem;
3195 QETH_DBF_TEXT(setup, 2, "inq"); 3190 QETH_DBF_TEXT(setup, 2, "inq");
3196 QETH_DBF_HEX(setup, 2, &card->qdio.in_q, sizeof(void *)); 3191 QETH_DBF_HEX(setup, 2, &card->qdio.in_q, sizeof(void *));
3197 memset(card->qdio.in_q, 0, sizeof(struct qeth_qdio_q)); 3192 memset(card->qdio.in_q, 0, sizeof(struct qeth_qdio_q));
@@ -3200,27 +3195,19 @@ qeth_alloc_qdio_buffers(struct qeth_card *card)
3200 card->qdio.in_q->bufs[i].buffer = 3195 card->qdio.in_q->bufs[i].buffer =
3201 &card->qdio.in_q->qdio_bufs[i]; 3196 &card->qdio.in_q->qdio_bufs[i];
3202 /* inbound buffer pool */ 3197 /* inbound buffer pool */
3203 if (qeth_alloc_buffer_pool(card)){ 3198 if (qeth_alloc_buffer_pool(card))
3204 kfree(card->qdio.in_q); 3199 goto out_freeinq;
3205 return -ENOMEM;
3206 }
3207 /* outbound */ 3200 /* outbound */
3208 card->qdio.out_qs = 3201 card->qdio.out_qs =
3209 kmalloc(card->qdio.no_out_queues * 3202 kmalloc(card->qdio.no_out_queues *
3210 sizeof(struct qeth_qdio_out_q *), GFP_KERNEL); 3203 sizeof(struct qeth_qdio_out_q *), GFP_KERNEL);
3211 if (!card->qdio.out_qs){ 3204 if (!card->qdio.out_qs)
3212 qeth_free_buffer_pool(card); 3205 goto out_freepool;
3213 return -ENOMEM; 3206 for (i = 0; i < card->qdio.no_out_queues; ++i) {
3214 }
3215 for (i = 0; i < card->qdio.no_out_queues; ++i){
3216 card->qdio.out_qs[i] = kmalloc(sizeof(struct qeth_qdio_out_q), 3207 card->qdio.out_qs[i] = kmalloc(sizeof(struct qeth_qdio_out_q),
3217 GFP_KERNEL|GFP_DMA); 3208 GFP_KERNEL|GFP_DMA);
3218 if (!card->qdio.out_qs[i]){ 3209 if (!card->qdio.out_qs[i])
3219 while (i > 0) 3210 goto out_freeoutq;
3220 kfree(card->qdio.out_qs[--i]);
3221 kfree(card->qdio.out_qs);
3222 return -ENOMEM;
3223 }
3224 QETH_DBF_TEXT_(setup, 2, "outq %i", i); 3211 QETH_DBF_TEXT_(setup, 2, "outq %i", i);
3225 QETH_DBF_HEX(setup, 2, &card->qdio.out_qs[i], sizeof(void *)); 3212 QETH_DBF_HEX(setup, 2, &card->qdio.out_qs[i], sizeof(void *));
3226 memset(card->qdio.out_qs[i], 0, sizeof(struct qeth_qdio_out_q)); 3213 memset(card->qdio.out_qs[i], 0, sizeof(struct qeth_qdio_out_q));
@@ -3237,8 +3224,19 @@ qeth_alloc_qdio_buffers(struct qeth_card *card)
3237 INIT_LIST_HEAD(&card->qdio.out_qs[i]->bufs[j].ctx_list); 3224 INIT_LIST_HEAD(&card->qdio.out_qs[i]->bufs[j].ctx_list);
3238 } 3225 }
3239 } 3226 }
3240 card->qdio.state = QETH_QDIO_ALLOCATED;
3241 return 0; 3227 return 0;
3228
3229out_freeoutq:
3230 while (i > 0)
3231 kfree(card->qdio.out_qs[--i]);
3232 kfree(card->qdio.out_qs);
3233out_freepool:
3234 qeth_free_buffer_pool(card);
3235out_freeinq:
3236 kfree(card->qdio.in_q);
3237out_nomem:
3238 atomic_set(&card->qdio.state, QETH_QDIO_UNINITIALIZED);
3239 return -ENOMEM;
3242} 3240}
3243 3241
3244static void 3242static void
@@ -3247,7 +3245,8 @@ qeth_free_qdio_buffers(struct qeth_card *card)
3247 int i, j; 3245 int i, j;
3248 3246
3249 QETH_DBF_TEXT(trace, 2, "freeqdbf"); 3247 QETH_DBF_TEXT(trace, 2, "freeqdbf");
3250 if (card->qdio.state == QETH_QDIO_UNINITIALIZED) 3248 if (atomic_swap(&card->qdio.state, QETH_QDIO_UNINITIALIZED) ==
3249 QETH_QDIO_UNINITIALIZED)
3251 return; 3250 return;
3252 kfree(card->qdio.in_q); 3251 kfree(card->qdio.in_q);
3253 /* inbound buffer pool */ 3252 /* inbound buffer pool */
@@ -3260,7 +3259,6 @@ qeth_free_qdio_buffers(struct qeth_card *card)
3260 kfree(card->qdio.out_qs[i]); 3259 kfree(card->qdio.out_qs[i]);
3261 } 3260 }
3262 kfree(card->qdio.out_qs); 3261 kfree(card->qdio.out_qs);
3263 card->qdio.state = QETH_QDIO_UNINITIALIZED;
3264} 3262}
3265 3263
3266static void 3264static void
@@ -3282,7 +3280,7 @@ static void
3282qeth_init_qdio_info(struct qeth_card *card) 3280qeth_init_qdio_info(struct qeth_card *card)
3283{ 3281{
3284 QETH_DBF_TEXT(setup, 4, "intqdinf"); 3282 QETH_DBF_TEXT(setup, 4, "intqdinf");
3285 card->qdio.state = QETH_QDIO_UNINITIALIZED; 3283 atomic_set(&card->qdio.state, QETH_QDIO_UNINITIALIZED);
3286 /* inbound */ 3284 /* inbound */
3287 card->qdio.in_buf_size = QETH_IN_BUF_SIZE_DEFAULT; 3285 card->qdio.in_buf_size = QETH_IN_BUF_SIZE_DEFAULT;
3288 card->qdio.init_pool.buf_count = QETH_IN_BUF_COUNT_DEFAULT; 3286 card->qdio.init_pool.buf_count = QETH_IN_BUF_COUNT_DEFAULT;
@@ -3345,7 +3343,7 @@ qeth_qdio_establish(struct qeth_card *card)
3345 struct qdio_buffer **in_sbal_ptrs; 3343 struct qdio_buffer **in_sbal_ptrs;
3346 struct qdio_buffer **out_sbal_ptrs; 3344 struct qdio_buffer **out_sbal_ptrs;
3347 int i, j, k; 3345 int i, j, k;
3348 int rc; 3346 int rc = 0;
3349 3347
3350 QETH_DBF_TEXT(setup, 2, "qdioest"); 3348 QETH_DBF_TEXT(setup, 2, "qdioest");
3351 3349
@@ -3404,8 +3402,10 @@ qeth_qdio_establish(struct qeth_card *card)
3404 init_data.input_sbal_addr_array = (void **) in_sbal_ptrs; 3402 init_data.input_sbal_addr_array = (void **) in_sbal_ptrs;
3405 init_data.output_sbal_addr_array = (void **) out_sbal_ptrs; 3403 init_data.output_sbal_addr_array = (void **) out_sbal_ptrs;
3406 3404
3407 if (!(rc = qdio_initialize(&init_data))) 3405 if (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_ALLOCATED,
3408 card->qdio.state = QETH_QDIO_ESTABLISHED; 3406 QETH_QDIO_ESTABLISHED) == QETH_QDIO_ALLOCATED)
3407 if ((rc = qdio_initialize(&init_data)))
3408 atomic_set(&card->qdio.state, QETH_QDIO_ALLOCATED);
3409 3409
3410 kfree(out_sbal_ptrs); 3410 kfree(out_sbal_ptrs);
3411 kfree(in_sbal_ptrs); 3411 kfree(in_sbal_ptrs);
@@ -3521,13 +3521,20 @@ qeth_qdio_clear_card(struct qeth_card *card, int use_halt)
3521 int rc = 0; 3521 int rc = 0;
3522 3522
3523 QETH_DBF_TEXT(trace,3,"qdioclr"); 3523 QETH_DBF_TEXT(trace,3,"qdioclr");
3524 if (card->qdio.state == QETH_QDIO_ESTABLISHED){ 3524 switch (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_ESTABLISHED,
3525 QETH_QDIO_CLEANING)) {
3526 case QETH_QDIO_ESTABLISHED:
3525 if ((rc = qdio_cleanup(CARD_DDEV(card), 3527 if ((rc = qdio_cleanup(CARD_DDEV(card),
3526 (card->info.type == QETH_CARD_TYPE_IQD) ? 3528 (card->info.type == QETH_CARD_TYPE_IQD) ?
3527 QDIO_FLAG_CLEANUP_USING_HALT : 3529 QDIO_FLAG_CLEANUP_USING_HALT :
3528 QDIO_FLAG_CLEANUP_USING_CLEAR))) 3530 QDIO_FLAG_CLEANUP_USING_CLEAR)))
3529 QETH_DBF_TEXT_(trace, 3, "1err%d", rc); 3531 QETH_DBF_TEXT_(trace, 3, "1err%d", rc);
3530 card->qdio.state = QETH_QDIO_ALLOCATED; 3532 atomic_set(&card->qdio.state, QETH_QDIO_ALLOCATED);
3533 break;
3534 case QETH_QDIO_CLEANING:
3535 return rc;
3536 default:
3537 break;
3531 } 3538 }
3532 if ((rc = qeth_clear_halt_card(card, use_halt))) 3539 if ((rc = qeth_clear_halt_card(card, use_halt)))
3533 QETH_DBF_TEXT_(trace, 3, "2err%d", rc); 3540 QETH_DBF_TEXT_(trace, 3, "2err%d", rc);
@@ -3687,10 +3694,10 @@ qeth_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
3687 /* return OK; otherwise ksoftirqd goes to 100% */ 3694 /* return OK; otherwise ksoftirqd goes to 100% */
3688 return NETDEV_TX_OK; 3695 return NETDEV_TX_OK;
3689 } 3696 }
3690#ifdef CONFIG_QETH_PERF_STATS 3697 if (card->options.performance_stats) {
3691 card->perf_stats.outbound_cnt++; 3698 card->perf_stats.outbound_cnt++;
3692 card->perf_stats.outbound_start_time = qeth_get_micros(); 3699 card->perf_stats.outbound_start_time = qeth_get_micros();
3693#endif 3700 }
3694 netif_stop_queue(dev); 3701 netif_stop_queue(dev);
3695 if ((rc = qeth_send_packet(card, skb))) { 3702 if ((rc = qeth_send_packet(card, skb))) {
3696 if (rc == -EBUSY) { 3703 if (rc == -EBUSY) {
@@ -3704,10 +3711,9 @@ qeth_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
3704 } 3711 }
3705 } 3712 }
3706 netif_wake_queue(dev); 3713 netif_wake_queue(dev);
3707#ifdef CONFIG_QETH_PERF_STATS 3714 if (card->options.performance_stats)
3708 card->perf_stats.outbound_time += qeth_get_micros() - 3715 card->perf_stats.outbound_time += qeth_get_micros() -
3709 card->perf_stats.outbound_start_time; 3716 card->perf_stats.outbound_start_time;
3710#endif
3711 return rc; 3717 return rc;
3712} 3718}
3713 3719
@@ -3922,49 +3928,59 @@ qeth_get_ip_version(struct sk_buff *skb)
3922 } 3928 }
3923} 3929}
3924 3930
3925static inline int 3931static inline struct qeth_hdr *
3926qeth_prepare_skb(struct qeth_card *card, struct sk_buff **skb, 3932__qeth_prepare_skb(struct qeth_card *card, struct sk_buff *skb, int ipv)
3927 struct qeth_hdr **hdr, int ipv)
3928{ 3933{
3929 int rc = 0;
3930#ifdef CONFIG_QETH_VLAN 3934#ifdef CONFIG_QETH_VLAN
3931 u16 *tag; 3935 u16 *tag;
3932#endif 3936 if (card->vlangrp && vlan_tx_tag_present(skb) &&
3933
3934 QETH_DBF_TEXT(trace, 6, "prepskb");
3935 if (card->info.type == QETH_CARD_TYPE_OSN) {
3936 *hdr = (struct qeth_hdr *)(*skb)->data;
3937 return rc;
3938 }
3939 rc = qeth_realloc_headroom(card, skb, sizeof(struct qeth_hdr));
3940 if (rc)
3941 return rc;
3942#ifdef CONFIG_QETH_VLAN
3943 if (card->vlangrp && vlan_tx_tag_present(*skb) &&
3944 ((ipv == 6) || card->options.layer2) ) { 3937 ((ipv == 6) || card->options.layer2) ) {
3945 /* 3938 /*
3946 * Move the mac addresses (6 bytes src, 6 bytes dest) 3939 * Move the mac addresses (6 bytes src, 6 bytes dest)
3947 * to the beginning of the new header. We are using three 3940 * to the beginning of the new header. We are using three
3948 * memcpys instead of one memmove to save cycles. 3941 * memcpys instead of one memmove to save cycles.
3949 */ 3942 */
3950 skb_push(*skb, VLAN_HLEN); 3943 skb_push(skb, VLAN_HLEN);
3951 memcpy((*skb)->data, (*skb)->data + 4, 4); 3944 memcpy(skb->data, skb->data + 4, 4);
3952 memcpy((*skb)->data + 4, (*skb)->data + 8, 4); 3945 memcpy(skb->data + 4, skb->data + 8, 4);
3953 memcpy((*skb)->data + 8, (*skb)->data + 12, 4); 3946 memcpy(skb->data + 8, skb->data + 12, 4);
3954 tag = (u16 *)((*skb)->data + 12); 3947 tag = (u16 *)(skb->data + 12);
3955 /* 3948 /*
3956 * first two bytes = ETH_P_8021Q (0x8100) 3949 * first two bytes = ETH_P_8021Q (0x8100)
3957 * second two bytes = VLANID 3950 * second two bytes = VLANID
3958 */ 3951 */
3959 *tag = __constant_htons(ETH_P_8021Q); 3952 *tag = __constant_htons(ETH_P_8021Q);
3960 *(tag + 1) = htons(vlan_tx_tag_get(*skb)); 3953 *(tag + 1) = htons(vlan_tx_tag_get(skb));
3961 } 3954 }
3962#endif 3955#endif
3963 *hdr = (struct qeth_hdr *) 3956 return ((struct qeth_hdr *)
3964 qeth_push_skb(card, skb, sizeof(struct qeth_hdr)); 3957 qeth_push_skb(card, skb, sizeof(struct qeth_hdr)));
3965 if (*hdr == NULL) 3958}
3966 return -EINVAL; 3959
3967 return 0; 3960static inline void
3961__qeth_free_new_skb(struct sk_buff *orig_skb, struct sk_buff *new_skb)
3962{
3963 if (orig_skb != new_skb)
3964 dev_kfree_skb_any(new_skb);
3965}
3966
3967static inline struct sk_buff *
3968qeth_prepare_skb(struct qeth_card *card, struct sk_buff *skb,
3969 struct qeth_hdr **hdr, int ipv)
3970{
3971 struct sk_buff *new_skb;
3972
3973 QETH_DBF_TEXT(trace, 6, "prepskb");
3974
3975 new_skb = qeth_realloc_headroom(card, skb, sizeof(struct qeth_hdr));
3976 if (new_skb == NULL)
3977 return NULL;
3978 *hdr = __qeth_prepare_skb(card, new_skb, ipv);
3979 if (*hdr == NULL) {
3980 __qeth_free_new_skb(skb, new_skb);
3981 return NULL;
3982 }
3983 return new_skb;
3968} 3984}
3969 3985
3970static inline u8 3986static inline u8
@@ -4206,9 +4222,8 @@ qeth_fill_buffer(struct qeth_qdio_out_q *queue,
4206 flush_cnt = 1; 4222 flush_cnt = 1;
4207 } else { 4223 } else {
4208 QETH_DBF_TEXT(trace, 6, "fillbfpa"); 4224 QETH_DBF_TEXT(trace, 6, "fillbfpa");
4209#ifdef CONFIG_QETH_PERF_STATS 4225 if (queue->card->options.performance_stats)
4210 queue->card->perf_stats.skbs_sent_pack++; 4226 queue->card->perf_stats.skbs_sent_pack++;
4211#endif
4212 if (buf->next_element_to_fill >= 4227 if (buf->next_element_to_fill >=
4213 QETH_MAX_BUFFER_ELEMENTS(queue->card)) { 4228 QETH_MAX_BUFFER_ELEMENTS(queue->card)) {
4214 /* 4229 /*
@@ -4245,21 +4260,15 @@ qeth_do_send_packet_fast(struct qeth_card *card, struct qeth_qdio_out_q *queue,
4245 * check if buffer is empty to make sure that we do not 'overtake' 4260 * check if buffer is empty to make sure that we do not 'overtake'
4246 * ourselves and try to fill a buffer that is already primed 4261 * ourselves and try to fill a buffer that is already primed
4247 */ 4262 */
4248 if (atomic_read(&buffer->state) != QETH_QDIO_BUF_EMPTY) { 4263 if (atomic_read(&buffer->state) != QETH_QDIO_BUF_EMPTY)
4249 card->stats.tx_dropped++; 4264 goto out;
4250 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);
4251 return -EBUSY;
4252 }
4253 if (ctx == NULL) 4265 if (ctx == NULL)
4254 queue->next_buf_to_fill = (queue->next_buf_to_fill + 1) % 4266 queue->next_buf_to_fill = (queue->next_buf_to_fill + 1) %
4255 QDIO_MAX_BUFFERS_PER_Q; 4267 QDIO_MAX_BUFFERS_PER_Q;
4256 else { 4268 else {
4257 buffers_needed = qeth_eddp_check_buffers_for_context(queue,ctx); 4269 buffers_needed = qeth_eddp_check_buffers_for_context(queue,ctx);
4258 if (buffers_needed < 0) { 4270 if (buffers_needed < 0)
4259 card->stats.tx_dropped++; 4271 goto out;
4260 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);
4261 return -EBUSY;
4262 }
4263 queue->next_buf_to_fill = 4272 queue->next_buf_to_fill =
4264 (queue->next_buf_to_fill + buffers_needed) % 4273 (queue->next_buf_to_fill + buffers_needed) %
4265 QDIO_MAX_BUFFERS_PER_Q; 4274 QDIO_MAX_BUFFERS_PER_Q;
@@ -4274,6 +4283,9 @@ qeth_do_send_packet_fast(struct qeth_card *card, struct qeth_qdio_out_q *queue,
4274 qeth_flush_buffers(queue, 0, index, flush_cnt); 4283 qeth_flush_buffers(queue, 0, index, flush_cnt);
4275 } 4284 }
4276 return 0; 4285 return 0;
4286out:
4287 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);
4288 return -EBUSY;
4277} 4289}
4278 4290
4279static inline int 4291static inline int
@@ -4299,8 +4311,7 @@ qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,
4299 * check if buffer is empty to make sure that we do not 'overtake' 4311 * check if buffer is empty to make sure that we do not 'overtake'
4300 * ourselves and try to fill a buffer that is already primed 4312 * ourselves and try to fill a buffer that is already primed
4301 */ 4313 */
4302 if (atomic_read(&buffer->state) != QETH_QDIO_BUF_EMPTY){ 4314 if (atomic_read(&buffer->state) != QETH_QDIO_BUF_EMPTY) {
4303 card->stats.tx_dropped++;
4304 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); 4315 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);
4305 return -EBUSY; 4316 return -EBUSY;
4306 } 4317 }
@@ -4323,7 +4334,6 @@ qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,
4323 * again */ 4334 * again */
4324 if (atomic_read(&buffer->state) != 4335 if (atomic_read(&buffer->state) !=
4325 QETH_QDIO_BUF_EMPTY){ 4336 QETH_QDIO_BUF_EMPTY){
4326 card->stats.tx_dropped++;
4327 qeth_flush_buffers(queue, 0, start_index, flush_count); 4337 qeth_flush_buffers(queue, 0, start_index, flush_count);
4328 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); 4338 atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);
4329 return -EBUSY; 4339 return -EBUSY;
@@ -4334,7 +4344,6 @@ qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,
4334 * free buffers) to handle eddp context */ 4344 * free buffers) to handle eddp context */
4335 if (qeth_eddp_check_buffers_for_context(queue,ctx) < 0){ 4345 if (qeth_eddp_check_buffers_for_context(queue,ctx) < 0){
4336 printk("eddp tx_dropped 1\n"); 4346 printk("eddp tx_dropped 1\n");
4337 card->stats.tx_dropped++;
4338 rc = -EBUSY; 4347 rc = -EBUSY;
4339 goto out; 4348 goto out;
4340 } 4349 }
@@ -4346,7 +4355,6 @@ qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,
4346 tmp = qeth_eddp_fill_buffer(queue,ctx,queue->next_buf_to_fill); 4355 tmp = qeth_eddp_fill_buffer(queue,ctx,queue->next_buf_to_fill);
4347 if (tmp < 0) { 4356 if (tmp < 0) {
4348 printk("eddp tx_dropped 2\n"); 4357 printk("eddp tx_dropped 2\n");
4349 card->stats.tx_dropped++;
4350 rc = - EBUSY; 4358 rc = - EBUSY;
4351 goto out; 4359 goto out;
4352 } 4360 }
@@ -4380,10 +4388,8 @@ out:
4380 qeth_flush_buffers(queue, 0, start_index, flush_count); 4388 qeth_flush_buffers(queue, 0, start_index, flush_count);
4381 } 4389 }
4382 /* at this point the queue is UNLOCKED again */ 4390 /* at this point the queue is UNLOCKED again */
4383#ifdef CONFIG_QETH_PERF_STATS 4391 if (queue->card->options.performance_stats && do_pack)
4384 if (do_pack)
4385 queue->card->perf_stats.bufs_sent_pack += flush_count; 4392 queue->card->perf_stats.bufs_sent_pack += flush_count;
4386#endif /* CONFIG_QETH_PERF_STATS */
4387 4393
4388 return rc; 4394 return rc;
4389} 4395}
@@ -4394,21 +4400,21 @@ qeth_get_elements_no(struct qeth_card *card, void *hdr,
4394{ 4400{
4395 int elements_needed = 0; 4401 int elements_needed = 0;
4396 4402
4397 if (skb_shinfo(skb)->nr_frags > 0) { 4403 if (skb_shinfo(skb)->nr_frags > 0)
4398 elements_needed = (skb_shinfo(skb)->nr_frags + 1); 4404 elements_needed = (skb_shinfo(skb)->nr_frags + 1);
4399 } 4405 if (elements_needed == 0)
4400 if (elements_needed == 0 )
4401 elements_needed = 1 + (((((unsigned long) hdr) % PAGE_SIZE) 4406 elements_needed = 1 + (((((unsigned long) hdr) % PAGE_SIZE)
4402 + skb->len) >> PAGE_SHIFT); 4407 + skb->len) >> PAGE_SHIFT);
4403 if ((elements_needed + elems) > QETH_MAX_BUFFER_ELEMENTS(card)){ 4408 if ((elements_needed + elems) > QETH_MAX_BUFFER_ELEMENTS(card)){
4404 PRINT_ERR("qeth_do_send_packet: invalid size of " 4409 PRINT_ERR("Invalid size of IP packet "
4405 "IP packet (Number=%d / Length=%d). Discarded.\n", 4410 "(Number=%d / Length=%d). Discarded.\n",
4406 (elements_needed+elems), skb->len); 4411 (elements_needed+elems), skb->len);
4407 return 0; 4412 return 0;
4408 } 4413 }
4409 return elements_needed; 4414 return elements_needed;
4410} 4415}
4411 4416
4417
4412static inline int 4418static inline int
4413qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) 4419qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
4414{ 4420{
@@ -4420,112 +4426,112 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
4420 enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO; 4426 enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO;
4421 struct qeth_eddp_context *ctx = NULL; 4427 struct qeth_eddp_context *ctx = NULL;
4422 int tx_bytes = skb->len; 4428 int tx_bytes = skb->len;
4423#ifdef CONFIG_QETH_PERF_STATS
4424 unsigned short nr_frags = skb_shinfo(skb)->nr_frags; 4429 unsigned short nr_frags = skb_shinfo(skb)->nr_frags;
4425 unsigned short tso_size = skb_shinfo(skb)->gso_size; 4430 unsigned short tso_size = skb_shinfo(skb)->gso_size;
4426#endif 4431 struct sk_buff *new_skb, *new_skb2;
4427 int rc; 4432 int rc;
4428 4433
4429 QETH_DBF_TEXT(trace, 6, "sendpkt"); 4434 QETH_DBF_TEXT(trace, 6, "sendpkt");
4430 4435
4436 new_skb = skb;
4437 if ((card->info.type == QETH_CARD_TYPE_OSN) &&
4438 (skb->protocol == htons(ETH_P_IPV6)))
4439 return -EPERM;
4440 cast_type = qeth_get_cast_type(card, skb);
4441 if ((cast_type == RTN_BROADCAST) &&
4442 (card->info.broadcast_capable == 0))
4443 return -EPERM;
4444 queue = card->qdio.out_qs
4445 [qeth_get_priority_queue(card, skb, ipv, cast_type)];
4431 if (!card->options.layer2) { 4446 if (!card->options.layer2) {
4432 ipv = qeth_get_ip_version(skb); 4447 ipv = qeth_get_ip_version(skb);
4433 if ((card->dev->hard_header == qeth_fake_header) && ipv) { 4448 if ((card->dev->hard_header == qeth_fake_header) && ipv) {
4434 if ((skb = qeth_pskb_unshare(skb,GFP_ATOMIC)) == NULL) { 4449 new_skb = qeth_pskb_unshare(skb, GFP_ATOMIC);
4435 card->stats.tx_dropped++; 4450 if (!new_skb)
4436 dev_kfree_skb_irq(skb); 4451 return -ENOMEM;
4437 return 0;
4438 }
4439 if(card->dev->type == ARPHRD_IEEE802_TR){ 4452 if(card->dev->type == ARPHRD_IEEE802_TR){
4440 skb_pull(skb, QETH_FAKE_LL_LEN_TR); 4453 skb_pull(new_skb, QETH_FAKE_LL_LEN_TR);
4441 } else { 4454 } else {
4442 skb_pull(skb, QETH_FAKE_LL_LEN_ETH); 4455 skb_pull(new_skb, QETH_FAKE_LL_LEN_ETH);
4443 } 4456 }
4444 } 4457 }
4445 } 4458 }
4446 if ((card->info.type == QETH_CARD_TYPE_OSN) &&
4447 (skb->protocol == htons(ETH_P_IPV6))) {
4448 dev_kfree_skb_any(skb);
4449 return 0;
4450 }
4451 cast_type = qeth_get_cast_type(card, skb);
4452 if ((cast_type == RTN_BROADCAST) &&
4453 (card->info.broadcast_capable == 0)){
4454 card->stats.tx_dropped++;
4455 card->stats.tx_errors++;
4456 dev_kfree_skb_any(skb);
4457 return NETDEV_TX_OK;
4458 }
4459 queue = card->qdio.out_qs
4460 [qeth_get_priority_queue(card, skb, ipv, cast_type)];
4461
4462 if (skb_is_gso(skb)) 4459 if (skb_is_gso(skb))
4463 large_send = card->options.large_send; 4460 large_send = card->options.large_send;
4464 4461 /* check on OSN device*/
4465 /*are we able to do TSO ? If so ,prepare and send it from here */ 4462 if (card->info.type == QETH_CARD_TYPE_OSN)
4463 hdr = (struct qeth_hdr *)new_skb->data;
4464 /*are we able to do TSO ? */
4466 if ((large_send == QETH_LARGE_SEND_TSO) && 4465 if ((large_send == QETH_LARGE_SEND_TSO) &&
4467 (cast_type == RTN_UNSPEC)) { 4466 (cast_type == RTN_UNSPEC)) {
4468 rc = qeth_tso_prepare_packet(card, skb, ipv, cast_type); 4467 rc = qeth_tso_prepare_packet(card, new_skb, ipv, cast_type);
4469 if (rc) { 4468 if (rc) {
4470 card->stats.tx_dropped++; 4469 __qeth_free_new_skb(skb, new_skb);
4471 card->stats.tx_errors++; 4470 return rc;
4472 dev_kfree_skb_any(skb);
4473 return NETDEV_TX_OK;
4474 } 4471 }
4475 elements_needed++; 4472 elements_needed++;
4476 } else { 4473 } else if (card->info.type != QETH_CARD_TYPE_OSN) {
4477 if ((rc = qeth_prepare_skb(card, &skb, &hdr, ipv))) { 4474 new_skb2 = qeth_prepare_skb(card, new_skb, &hdr, ipv);
4478 QETH_DBF_TEXT_(trace, 4, "pskbe%d", rc); 4475 if (!new_skb2) {
4479 return rc; 4476 __qeth_free_new_skb(skb, new_skb);
4477 return -EINVAL;
4480 } 4478 }
4481 if (card->info.type != QETH_CARD_TYPE_OSN) 4479 if (new_skb != skb)
4482 qeth_fill_header(card, hdr, skb, ipv, cast_type); 4480 __qeth_free_new_skb(new_skb2, new_skb);
4481 new_skb = new_skb2;
4482 qeth_fill_header(card, hdr, new_skb, ipv, cast_type);
4483 } 4483 }
4484
4485 if (large_send == QETH_LARGE_SEND_EDDP) { 4484 if (large_send == QETH_LARGE_SEND_EDDP) {
4486 ctx = qeth_eddp_create_context(card, skb, hdr); 4485 ctx = qeth_eddp_create_context(card, new_skb, hdr);
4487 if (ctx == NULL) { 4486 if (ctx == NULL) {
4487 __qeth_free_new_skb(skb, new_skb);
4488 PRINT_WARN("could not create eddp context\n"); 4488 PRINT_WARN("could not create eddp context\n");
4489 return -EINVAL; 4489 return -EINVAL;
4490 } 4490 }
4491 } else { 4491 } else {
4492 int elems = qeth_get_elements_no(card,(void*) hdr, skb, 4492 int elems = qeth_get_elements_no(card,(void*) hdr, new_skb,
4493 elements_needed); 4493 elements_needed);
4494 if (!elems) 4494 if (!elems) {
4495 __qeth_free_new_skb(skb, new_skb);
4495 return -EINVAL; 4496 return -EINVAL;
4497 }
4496 elements_needed += elems; 4498 elements_needed += elems;
4497 } 4499 }
4498 4500
4499 if (card->info.type != QETH_CARD_TYPE_IQD) 4501 if (card->info.type != QETH_CARD_TYPE_IQD)
4500 rc = qeth_do_send_packet(card, queue, skb, hdr, 4502 rc = qeth_do_send_packet(card, queue, new_skb, hdr,
4501 elements_needed, ctx); 4503 elements_needed, ctx);
4502 else 4504 else
4503 rc = qeth_do_send_packet_fast(card, queue, skb, hdr, 4505 rc = qeth_do_send_packet_fast(card, queue, new_skb, hdr,
4504 elements_needed, ctx); 4506 elements_needed, ctx);
4505 if (!rc){ 4507 if (!rc) {
4506 card->stats.tx_packets++; 4508 card->stats.tx_packets++;
4507 card->stats.tx_bytes += tx_bytes; 4509 card->stats.tx_bytes += tx_bytes;
4508#ifdef CONFIG_QETH_PERF_STATS 4510 if (new_skb != skb)
4509 if (tso_size && 4511 dev_kfree_skb_any(skb);
4510 !(large_send == QETH_LARGE_SEND_NO)) { 4512 if (card->options.performance_stats) {
4511 card->perf_stats.large_send_bytes += tx_bytes; 4513 if (tso_size &&
4512 card->perf_stats.large_send_cnt++; 4514 !(large_send == QETH_LARGE_SEND_NO)) {
4513 } 4515 card->perf_stats.large_send_bytes += tx_bytes;
4514 if (nr_frags > 0){ 4516 card->perf_stats.large_send_cnt++;
4515 card->perf_stats.sg_skbs_sent++; 4517 }
4516 /* nr_frags + skb->data */ 4518 if (nr_frags > 0) {
4517 card->perf_stats.sg_frags_sent += 4519 card->perf_stats.sg_skbs_sent++;
4518 nr_frags + 1; 4520 /* nr_frags + skb->data */
4521 card->perf_stats.sg_frags_sent +=
4522 nr_frags + 1;
4523 }
4519 } 4524 }
4520#endif /* CONFIG_QETH_PERF_STATS */ 4525 } else {
4526 card->stats.tx_dropped++;
4527 __qeth_free_new_skb(skb, new_skb);
4521 } 4528 }
4522 if (ctx != NULL) { 4529 if (ctx != NULL) {
4523 /* drop creator's reference */ 4530 /* drop creator's reference */
4524 qeth_eddp_put_context(ctx); 4531 qeth_eddp_put_context(ctx);
4525 /* free skb; it's not referenced by a buffer */ 4532 /* free skb; it's not referenced by a buffer */
4526 if (rc == 0) 4533 if (!rc)
4527 dev_kfree_skb_any(skb); 4534 dev_kfree_skb_any(new_skb);
4528
4529 } 4535 }
4530 return rc; 4536 return rc;
4531} 4537}
@@ -7338,6 +7344,8 @@ qeth_setrouting_v6(struct qeth_card *card)
7338 QETH_DBF_TEXT(trace,3,"setrtg6"); 7344 QETH_DBF_TEXT(trace,3,"setrtg6");
7339#ifdef CONFIG_QETH_IPV6 7345#ifdef CONFIG_QETH_IPV6
7340 7346
7347 if (!qeth_is_supported(card, IPA_IPV6))
7348 return 0;
7341 qeth_correct_routing_type(card, &card->options.route6.type, 7349 qeth_correct_routing_type(card, &card->options.route6.type,
7342 QETH_PROT_IPV6); 7350 QETH_PROT_IPV6);
7343 7351
@@ -7876,12 +7884,12 @@ __qeth_set_online(struct ccwgroup_device *gdev, int recovery_mode)
7876 QETH_DBF_TEXT_(setup, 2, "5err%d", rc); 7884 QETH_DBF_TEXT_(setup, 2, "5err%d", rc);
7877 goto out_remove; 7885 goto out_remove;
7878 } 7886 }
7879 card->state = CARD_STATE_SOFTSETUP;
7880 7887
7881 if ((rc = qeth_init_qdio_queues(card))){ 7888 if ((rc = qeth_init_qdio_queues(card))){
7882 QETH_DBF_TEXT_(setup, 2, "6err%d", rc); 7889 QETH_DBF_TEXT_(setup, 2, "6err%d", rc);
7883 goto out_remove; 7890 goto out_remove;
7884 } 7891 }
7892 card->state = CARD_STATE_SOFTSETUP;
7885 netif_carrier_on(card->dev); 7893 netif_carrier_on(card->dev);
7886 7894
7887 qeth_set_allowed_threads(card, 0xffffffff, 0); 7895 qeth_set_allowed_threads(card, 0xffffffff, 0);
@@ -8538,34 +8546,44 @@ qeth_ipv6_uninit(void)
8538static void 8546static void
8539qeth_sysfs_unregister(void) 8547qeth_sysfs_unregister(void)
8540{ 8548{
8549 s390_root_dev_unregister(qeth_root_dev);
8541 qeth_remove_driver_attributes(); 8550 qeth_remove_driver_attributes();
8542 ccw_driver_unregister(&qeth_ccw_driver); 8551 ccw_driver_unregister(&qeth_ccw_driver);
8543 ccwgroup_driver_unregister(&qeth_ccwgroup_driver); 8552 ccwgroup_driver_unregister(&qeth_ccwgroup_driver);
8544 s390_root_dev_unregister(qeth_root_dev);
8545} 8553}
8554
8546/** 8555/**
8547 * register qeth at sysfs 8556 * register qeth at sysfs
8548 */ 8557 */
8549static int 8558static int
8550qeth_sysfs_register(void) 8559qeth_sysfs_register(void)
8551{ 8560{
8552 int rc=0; 8561 int rc;
8553 8562
8554 rc = ccwgroup_driver_register(&qeth_ccwgroup_driver); 8563 rc = ccwgroup_driver_register(&qeth_ccwgroup_driver);
8555 if (rc) 8564 if (rc)
8556 return rc; 8565 goto out;
8566
8557 rc = ccw_driver_register(&qeth_ccw_driver); 8567 rc = ccw_driver_register(&qeth_ccw_driver);
8558 if (rc) 8568 if (rc)
8559 return rc; 8569 goto out_ccw_driver;
8570
8560 rc = qeth_create_driver_attributes(); 8571 rc = qeth_create_driver_attributes();
8561 if (rc) 8572 if (rc)
8562 return rc; 8573 goto out_qeth_attr;
8574
8563 qeth_root_dev = s390_root_dev_register("qeth"); 8575 qeth_root_dev = s390_root_dev_register("qeth");
8564 if (IS_ERR(qeth_root_dev)) { 8576 rc = IS_ERR(qeth_root_dev) ? PTR_ERR(qeth_root_dev) : 0;
8565 rc = PTR_ERR(qeth_root_dev); 8577 if (!rc)
8566 return rc; 8578 goto out;
8567 } 8579
8568 return 0; 8580 qeth_remove_driver_attributes();
8581out_qeth_attr:
8582 ccw_driver_unregister(&qeth_ccw_driver);
8583out_ccw_driver:
8584 ccwgroup_driver_unregister(&qeth_ccwgroup_driver);
8585out:
8586 return rc;
8569} 8587}
8570 8588
8571/*** 8589/***
@@ -8574,7 +8592,7 @@ qeth_sysfs_register(void)
8574static int __init 8592static int __init
8575qeth_init(void) 8593qeth_init(void)
8576{ 8594{
8577 int rc=0; 8595 int rc;
8578 8596
8579 PRINT_INFO("loading %s\n", version); 8597 PRINT_INFO("loading %s\n", version);
8580 8598
@@ -8583,20 +8601,26 @@ qeth_init(void)
8583 spin_lock_init(&qeth_notify_lock); 8601 spin_lock_init(&qeth_notify_lock);
8584 rwlock_init(&qeth_card_list.rwlock); 8602 rwlock_init(&qeth_card_list.rwlock);
8585 8603
8586 if (qeth_register_dbf_views()) 8604 rc = qeth_register_dbf_views();
8605 if (rc)
8587 goto out_err; 8606 goto out_err;
8588 if (qeth_sysfs_register()) 8607
8589 goto out_sysfs; 8608 rc = qeth_sysfs_register();
8609 if (rc)
8610 goto out_dbf;
8590 8611
8591#ifdef CONFIG_QETH_IPV6 8612#ifdef CONFIG_QETH_IPV6
8592 if (qeth_ipv6_init()) { 8613 rc = qeth_ipv6_init();
8593 PRINT_ERR("Out of memory during ipv6 init.\n"); 8614 if (rc) {
8615 PRINT_ERR("Out of memory during ipv6 init code = %d\n", rc);
8594 goto out_sysfs; 8616 goto out_sysfs;
8595 } 8617 }
8596#endif /* QETH_IPV6 */ 8618#endif /* QETH_IPV6 */
8597 if (qeth_register_notifiers()) 8619 rc = qeth_register_notifiers();
8620 if (rc)
8598 goto out_ipv6; 8621 goto out_ipv6;
8599 if (qeth_create_procfs_entries()) 8622 rc = qeth_create_procfs_entries();
8623 if (rc)
8600 goto out_notifiers; 8624 goto out_notifiers;
8601 8625
8602 return rc; 8626 return rc;
@@ -8606,12 +8630,13 @@ out_notifiers:
8606out_ipv6: 8630out_ipv6:
8607#ifdef CONFIG_QETH_IPV6 8631#ifdef CONFIG_QETH_IPV6
8608 qeth_ipv6_uninit(); 8632 qeth_ipv6_uninit();
8609#endif /* QETH_IPV6 */
8610out_sysfs: 8633out_sysfs:
8634#endif /* QETH_IPV6 */
8611 qeth_sysfs_unregister(); 8635 qeth_sysfs_unregister();
8636out_dbf:
8612 qeth_unregister_dbf_views(); 8637 qeth_unregister_dbf_views();
8613out_err: 8638out_err:
8614 PRINT_ERR("Initialization failed"); 8639 PRINT_ERR("Initialization failed with code %d\n", rc);
8615 return rc; 8640 return rc;
8616} 8641}
8617 8642
diff --git a/drivers/s390/net/qeth_proc.c b/drivers/s390/net/qeth_proc.c
index 66f2da14e6e3..faa768e59257 100644
--- a/drivers/s390/net/qeth_proc.c
+++ b/drivers/s390/net/qeth_proc.c
@@ -173,7 +173,6 @@ static struct file_operations qeth_procfile_fops = {
173#define QETH_PERF_PROCFILE_NAME "qeth_perf" 173#define QETH_PERF_PROCFILE_NAME "qeth_perf"
174static struct proc_dir_entry *qeth_perf_procfile; 174static struct proc_dir_entry *qeth_perf_procfile;
175 175
176#ifdef CONFIG_QETH_PERF_STATS
177static int 176static int
178qeth_perf_procfile_seq_show(struct seq_file *s, void *it) 177qeth_perf_procfile_seq_show(struct seq_file *s, void *it)
179{ 178{
@@ -192,14 +191,21 @@ qeth_perf_procfile_seq_show(struct seq_file *s, void *it)
192 CARD_DDEV_ID(card), 191 CARD_DDEV_ID(card),
193 QETH_CARD_IFNAME(card) 192 QETH_CARD_IFNAME(card)
194 ); 193 );
194 if (!card->options.performance_stats)
195 seq_printf(s, "Performance statistics are deactivated.\n");
195 seq_printf(s, " Skb's/buffers received : %lu/%u\n" 196 seq_printf(s, " Skb's/buffers received : %lu/%u\n"
196 " Skb's/buffers sent : %lu/%u\n\n", 197 " Skb's/buffers sent : %lu/%u\n\n",
197 card->stats.rx_packets, card->perf_stats.bufs_rec, 198 card->stats.rx_packets -
198 card->stats.tx_packets, card->perf_stats.bufs_sent 199 card->perf_stats.initial_rx_packets,
200 card->perf_stats.bufs_rec,
201 card->stats.tx_packets -
202 card->perf_stats.initial_tx_packets,
203 card->perf_stats.bufs_sent
199 ); 204 );
200 seq_printf(s, " Skb's/buffers sent without packing : %lu/%u\n" 205 seq_printf(s, " Skb's/buffers sent without packing : %lu/%u\n"
201 " Skb's/buffers sent with packing : %u/%u\n\n", 206 " Skb's/buffers sent with packing : %u/%u\n\n",
202 card->stats.tx_packets - card->perf_stats.skbs_sent_pack, 207 card->stats.tx_packets - card->perf_stats.initial_tx_packets
208 - card->perf_stats.skbs_sent_pack,
203 card->perf_stats.bufs_sent - card->perf_stats.bufs_sent_pack, 209 card->perf_stats.bufs_sent - card->perf_stats.bufs_sent_pack,
204 card->perf_stats.skbs_sent_pack, 210 card->perf_stats.skbs_sent_pack,
205 card->perf_stats.bufs_sent_pack 211 card->perf_stats.bufs_sent_pack
@@ -275,11 +281,6 @@ static struct file_operations qeth_perf_procfile_fops = {
275 .release = seq_release, 281 .release = seq_release,
276}; 282};
277 283
278#define qeth_perf_procfile_created qeth_perf_procfile
279#else
280#define qeth_perf_procfile_created 1
281#endif /* CONFIG_QETH_PERF_STATS */
282
283int __init 284int __init
284qeth_create_procfs_entries(void) 285qeth_create_procfs_entries(void)
285{ 286{
@@ -288,15 +289,13 @@ qeth_create_procfs_entries(void)
288 if (qeth_procfile) 289 if (qeth_procfile)
289 qeth_procfile->proc_fops = &qeth_procfile_fops; 290 qeth_procfile->proc_fops = &qeth_procfile_fops;
290 291
291#ifdef CONFIG_QETH_PERF_STATS
292 qeth_perf_procfile = create_proc_entry(QETH_PERF_PROCFILE_NAME, 292 qeth_perf_procfile = create_proc_entry(QETH_PERF_PROCFILE_NAME,
293 S_IFREG | 0444, NULL); 293 S_IFREG | 0444, NULL);
294 if (qeth_perf_procfile) 294 if (qeth_perf_procfile)
295 qeth_perf_procfile->proc_fops = &qeth_perf_procfile_fops; 295 qeth_perf_procfile->proc_fops = &qeth_perf_procfile_fops;
296#endif /* CONFIG_QETH_PERF_STATS */
297 296
298 if (qeth_procfile && 297 if (qeth_procfile &&
299 qeth_perf_procfile_created) 298 qeth_perf_procfile)
300 return 0; 299 return 0;
301 else 300 else
302 return -ENOMEM; 301 return -ENOMEM;
diff --git a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c
index 001497bbea16..5836737ac58f 100644
--- a/drivers/s390/net/qeth_sys.c
+++ b/drivers/s390/net/qeth_sys.c
@@ -743,6 +743,47 @@ static DEVICE_ATTR(layer2, 0644, qeth_dev_layer2_show,
743 qeth_dev_layer2_store); 743 qeth_dev_layer2_store);
744 744
745static ssize_t 745static ssize_t
746qeth_dev_performance_stats_show(struct device *dev, struct device_attribute *attr, char *buf)
747{
748 struct qeth_card *card = dev->driver_data;
749
750 if (!card)
751 return -EINVAL;
752
753 return sprintf(buf, "%i\n", card->options.performance_stats ? 1:0);
754}
755
756static ssize_t
757qeth_dev_performance_stats_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
758{
759 struct qeth_card *card = dev->driver_data;
760 char *tmp;
761 int i;
762
763 if (!card)
764 return -EINVAL;
765
766 i = simple_strtoul(buf, &tmp, 16);
767 if ((i == 0) || (i == 1)) {
768 if (i == card->options.performance_stats)
769 return count;
770 card->options.performance_stats = i;
771 if (i == 0)
772 memset(&card->perf_stats, 0,
773 sizeof(struct qeth_perf_stats));
774 card->perf_stats.initial_rx_packets = card->stats.rx_packets;
775 card->perf_stats.initial_tx_packets = card->stats.tx_packets;
776 } else {
777 PRINT_WARN("performance_stats: write 0 or 1 to this file!\n");
778 return -EINVAL;
779 }
780 return count;
781}
782
783static DEVICE_ATTR(performance_stats, 0644, qeth_dev_performance_stats_show,
784 qeth_dev_performance_stats_store);
785
786static ssize_t
746qeth_dev_large_send_show(struct device *dev, struct device_attribute *attr, char *buf) 787qeth_dev_large_send_show(struct device *dev, struct device_attribute *attr, char *buf)
747{ 788{
748 struct qeth_card *card = dev->driver_data; 789 struct qeth_card *card = dev->driver_data;
@@ -928,6 +969,7 @@ static struct device_attribute * qeth_device_attrs[] = {
928 &dev_attr_canonical_macaddr, 969 &dev_attr_canonical_macaddr,
929 &dev_attr_layer2, 970 &dev_attr_layer2,
930 &dev_attr_large_send, 971 &dev_attr_large_send,
972 &dev_attr_performance_stats,
931 NULL, 973 NULL,
932}; 974};
933 975
@@ -1110,12 +1152,12 @@ qeth_parse_ipatoe(const char* buf, enum qeth_prot_versions proto,
1110{ 1152{
1111 const char *start, *end; 1153 const char *start, *end;
1112 char *tmp; 1154 char *tmp;
1113 char buffer[49] = {0, }; 1155 char buffer[40] = {0, };
1114 1156
1115 start = buf; 1157 start = buf;
1116 /* get address string */ 1158 /* get address string */
1117 end = strchr(start, '/'); 1159 end = strchr(start, '/');
1118 if (!end || (end-start >= 49)){ 1160 if (!end || (end - start >= 40)){
1119 PRINT_WARN("Invalid format for ipato_addx/delx. " 1161 PRINT_WARN("Invalid format for ipato_addx/delx. "
1120 "Use <ip addr>/<mask bits>\n"); 1162 "Use <ip addr>/<mask bits>\n");
1121 return -EINVAL; 1163 return -EINVAL;
@@ -1127,7 +1169,12 @@ qeth_parse_ipatoe(const char* buf, enum qeth_prot_versions proto,
1127 } 1169 }
1128 start = end + 1; 1170 start = end + 1;
1129 *mask_bits = simple_strtoul(start, &tmp, 10); 1171 *mask_bits = simple_strtoul(start, &tmp, 10);
1130 1172 if (!strlen(start) ||
1173 (tmp == start) ||
1174 (*mask_bits > ((proto == QETH_PROT_IPV4) ? 32 : 128))) {
1175 PRINT_WARN("Invalid mask bits for ipato_addx/delx !\n");
1176 return -EINVAL;
1177 }
1131 return 0; 1178 return 0;
1132} 1179}
1133 1180
@@ -1698,11 +1745,16 @@ qeth_create_device_attributes(struct device *dev)
1698 sysfs_remove_group(&dev->kobj, &qeth_device_attr_group); 1745 sysfs_remove_group(&dev->kobj, &qeth_device_attr_group);
1699 sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group); 1746 sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group);
1700 sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group); 1747 sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group);
1748 return ret;
1701 } 1749 }
1702 if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_blkt_group))) 1750 if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_blkt_group))){
1751 sysfs_remove_group(&dev->kobj, &qeth_device_attr_group);
1752 sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group);
1753 sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group);
1754 sysfs_remove_group(&dev->kobj, &qeth_device_rxip_group);
1703 return ret; 1755 return ret;
1704 1756 }
1705 return ret; 1757 return 0;
1706} 1758}
1707 1759
1708void 1760void
diff --git a/drivers/s390/net/qeth_tso.h b/drivers/s390/net/qeth_tso.h
index 593f298142c1..14504afb044e 100644
--- a/drivers/s390/net/qeth_tso.h
+++ b/drivers/s390/net/qeth_tso.h
@@ -24,7 +24,7 @@ static inline struct qeth_hdr_tso *
24qeth_tso_prepare_skb(struct qeth_card *card, struct sk_buff **skb) 24qeth_tso_prepare_skb(struct qeth_card *card, struct sk_buff **skb)
25{ 25{
26 QETH_DBF_TEXT(trace, 5, "tsoprsk"); 26 QETH_DBF_TEXT(trace, 5, "tsoprsk");
27 return qeth_push_skb(card, skb, sizeof(struct qeth_hdr_tso)); 27 return qeth_push_skb(card, *skb, sizeof(struct qeth_hdr_tso));
28} 28}
29 29
30/** 30/**
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c
index 293bb2fdb1d5..2f698763ba5d 100644
--- a/drivers/sbus/char/openprom.c
+++ b/drivers/sbus/char/openprom.c
@@ -145,8 +145,9 @@ static int opromgetprop(void __user *argp, struct device_node *dp, struct openpr
145 void *pval; 145 void *pval;
146 int len; 146 int len;
147 147
148 pval = of_get_property(dp, op->oprom_array, &len); 148 if (!dp ||
149 if (!pval || len <= 0 || len > bufsize) 149 !(pval = of_get_property(dp, op->oprom_array, &len)) ||
150 len <= 0 || len > bufsize)
150 return copyout(argp, op, sizeof(int)); 151 return copyout(argp, op, sizeof(int));
151 152
152 memcpy(op->oprom_array, pval, len); 153 memcpy(op->oprom_array, pval, len);
@@ -161,6 +162,8 @@ static int opromnxtprop(void __user *argp, struct device_node *dp, struct openpr
161 struct property *prop; 162 struct property *prop;
162 int len; 163 int len;
163 164
165 if (!dp)
166 return copyout(argp, op, sizeof(int));
164 if (op->oprom_array[0] == '\0') { 167 if (op->oprom_array[0] == '\0') {
165 prop = dp->properties; 168 prop = dp->properties;
166 if (!prop) 169 if (!prop)
@@ -266,9 +269,13 @@ static int oprompci2node(void __user *argp, struct device_node *dp, struct openp
266 269
267static int oprompath2node(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsize, DATA *data) 270static int oprompath2node(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsize, DATA *data)
268{ 271{
272 phandle ph = 0;
273
269 dp = of_find_node_by_path(op->oprom_array); 274 dp = of_find_node_by_path(op->oprom_array);
275 if (dp)
276 ph = dp->node;
270 data->current_node = dp; 277 data->current_node = dp;
271 *((int *)op->oprom_array) = dp->node; 278 *((int *)op->oprom_array) = ph;
272 op->oprom_size = sizeof(int); 279 op->oprom_size = sizeof(int);
273 280
274 return copyout(argp, op, bufsize + sizeof(int)); 281 return copyout(argp, op, bufsize + sizeof(int));
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
index 2d20caf377f5..a9bb3cb7e89b 100644
--- a/drivers/scsi/ata_piix.c
+++ b/drivers/scsi/ata_piix.c
@@ -123,7 +123,8 @@ enum {
123 ich6_sata = 4, 123 ich6_sata = 4,
124 ich6_sata_ahci = 5, 124 ich6_sata_ahci = 5,
125 ich6m_sata_ahci = 6, 125 ich6m_sata_ahci = 6,
126 ich8_sata_ahci = 7, 126 ich7m_sata_ahci = 7,
127 ich8_sata_ahci = 8,
127 128
128 /* constants for mapping table */ 129 /* constants for mapping table */
129 P0 = 0, /* port 0 */ 130 P0 = 0, /* port 0 */
@@ -188,7 +189,7 @@ static const struct pci_device_id piix_pci_tbl[] = {
188 /* 82801GB/GR/GH (ICH7, identical to ICH6) */ 189 /* 82801GB/GR/GH (ICH7, identical to ICH6) */
189 { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, 190 { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
190 /* 2801GBM/GHM (ICH7M, identical to ICH6M) */ 191 /* 2801GBM/GHM (ICH7M, identical to ICH6M) */
191 { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci }, 192 { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich7m_sata_ahci },
192 /* Enterprise Southbridge 2 (where's the datasheet?) */ 193 /* Enterprise Southbridge 2 (where's the datasheet?) */
193 { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, 194 { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
194 /* SATA Controller 1 IDE (ICH8, no datasheet yet) */ 195 /* SATA Controller 1 IDE (ICH8, no datasheet yet) */
@@ -336,6 +337,24 @@ static const struct piix_map_db ich6m_map_db = {
336 }, 337 },
337}; 338};
338 339
340static const struct piix_map_db ich7m_map_db = {
341 .mask = 0x3,
342 .port_enable = 0x5,
343 .present_shift = 4,
344
345 /* Map 01b isn't specified in the doc but some notebooks use
346 * it anyway. ATM, the only case spotted carries subsystem ID
347 * 1025:0107. This is the only difference from ich6m.
348 */
349 .map = {
350 /* PM PS SM SS MAP */
351 { P0, P2, RV, RV }, /* 00b */
352 { IDE, IDE, P1, P3 }, /* 01b */
353 { P0, P2, IDE, IDE }, /* 10b */
354 { RV, RV, RV, RV },
355 },
356};
357
339static const struct piix_map_db ich8_map_db = { 358static const struct piix_map_db ich8_map_db = {
340 .mask = 0x3, 359 .mask = 0x3,
341 .port_enable = 0x3, 360 .port_enable = 0x3,
@@ -355,6 +374,7 @@ static const struct piix_map_db *piix_map_db_table[] = {
355 [ich6_sata] = &ich6_map_db, 374 [ich6_sata] = &ich6_map_db,
356 [ich6_sata_ahci] = &ich6_map_db, 375 [ich6_sata_ahci] = &ich6_map_db,
357 [ich6m_sata_ahci] = &ich6m_map_db, 376 [ich6m_sata_ahci] = &ich6m_map_db,
377 [ich7m_sata_ahci] = &ich7m_map_db,
358 [ich8_sata_ahci] = &ich8_map_db, 378 [ich8_sata_ahci] = &ich8_map_db,
359}; 379};
360 380
@@ -444,6 +464,18 @@ static struct ata_port_info piix_port_info[] = {
444 .port_ops = &piix_sata_ops, 464 .port_ops = &piix_sata_ops,
445 }, 465 },
446 466
467 /* ich7m_sata_ahci */
468 {
469 .sht = &piix_sht,
470 .host_flags = ATA_FLAG_SATA |
471 PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR |
472 PIIX_FLAG_AHCI,
473 .pio_mask = 0x1f, /* pio0-4 */
474 .mwdma_mask = 0x07, /* mwdma0-2 */
475 .udma_mask = 0x7f, /* udma0-6 */
476 .port_ops = &piix_sata_ops,
477 },
478
447 /* ich8_sata_ahci */ 479 /* ich8_sata_ahci */
448 { 480 {
449 .sht = &piix_sht, 481 .sht = &piix_sht,
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 73dd6c8deede..427b73a3886a 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1256,10 +1256,15 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
1256 swap_buf_le16(id, ATA_ID_WORDS); 1256 swap_buf_le16(id, ATA_ID_WORDS);
1257 1257
1258 /* sanity check */ 1258 /* sanity check */
1259 if ((class == ATA_DEV_ATA) != (ata_id_is_ata(id) | ata_id_is_cfa(id))) { 1259 rc = -EINVAL;
1260 rc = -EINVAL; 1260 reason = "device reports illegal type";
1261 reason = "device reports illegal type"; 1261
1262 goto err_out; 1262 if (class == ATA_DEV_ATA) {
1263 if (!ata_id_is_ata(id) && !ata_id_is_cfa(id))
1264 goto err_out;
1265 } else {
1266 if (ata_id_is_ata(id))
1267 goto err_out;
1263 } 1268 }
1264 1269
1265 if (post_reset && class == ATA_DEV_ATA) { 1270 if (post_reset && class == ATA_DEV_ATA) {
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c
index 1053c7c76b7d..fa38a413d16b 100644
--- a/drivers/scsi/sata_mv.c
+++ b/drivers/scsi/sata_mv.c
@@ -1961,8 +1961,7 @@ comreset_retry:
1961 timeout = jiffies + msecs_to_jiffies(200); 1961 timeout = jiffies + msecs_to_jiffies(200);
1962 do { 1962 do {
1963 sata_scr_read(ap, SCR_STATUS, &sstatus); 1963 sata_scr_read(ap, SCR_STATUS, &sstatus);
1964 sstatus &= 0x3; 1964 if (((sstatus & 0x3) == 3) || ((sstatus & 0x3) == 0))
1965 if ((sstatus == 3) || (sstatus == 0))
1966 break; 1965 break;
1967 1966
1968 __msleep(1, can_sleep); 1967 __msleep(1, can_sleep);
diff --git a/drivers/scsi/sata_via.c b/drivers/scsi/sata_via.c
index 01d40369a8a5..a3727af8b9c1 100644
--- a/drivers/scsi/sata_via.c
+++ b/drivers/scsi/sata_via.c
@@ -77,6 +77,7 @@ static void svia_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
77static void vt6420_error_handler(struct ata_port *ap); 77static void vt6420_error_handler(struct ata_port *ap);
78 78
79static const struct pci_device_id svia_pci_tbl[] = { 79static const struct pci_device_id svia_pci_tbl[] = {
80 { 0x1106, 0x0591, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6420 },
80 { 0x1106, 0x3149, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6420 }, 81 { 0x1106, 0x3149, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6420 },
81 { 0x1106, 0x3249, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6421 }, 82 { 0x1106, 0x3249, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6421 },
82 83
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index a8ed5a22009d..3d355d054612 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -466,7 +466,7 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd,
466 struct scsi_device *sdev = scmd->device; 466 struct scsi_device *sdev = scmd->device;
467 struct Scsi_Host *shost = sdev->host; 467 struct Scsi_Host *shost = sdev->host;
468 int old_result = scmd->result; 468 int old_result = scmd->result;
469 DECLARE_COMPLETION(done); 469 DECLARE_COMPLETION_ONSTACK(done);
470 unsigned long timeleft; 470 unsigned long timeleft;
471 unsigned long flags; 471 unsigned long flags;
472 unsigned char old_cmnd[MAX_COMMAND_SIZE]; 472 unsigned char old_cmnd[MAX_COMMAND_SIZE];
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index cd1979daf2b8..851e4839d6d9 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -458,11 +458,11 @@ static int pci_siig_setup(struct serial_private *priv,
458 * growing *huge*, we use this function to collapse some 70 entries 458 * growing *huge*, we use this function to collapse some 70 entries
459 * in the PCI table into one, for sanity's and compactness's sake. 459 * in the PCI table into one, for sanity's and compactness's sake.
460 */ 460 */
461static unsigned short timedia_single_port[] = { 461static const unsigned short timedia_single_port[] = {
462 0x4025, 0x4027, 0x4028, 0x5025, 0x5027, 0 462 0x4025, 0x4027, 0x4028, 0x5025, 0x5027, 0
463}; 463};
464 464
465static unsigned short timedia_dual_port[] = { 465static const unsigned short timedia_dual_port[] = {
466 0x0002, 0x4036, 0x4037, 0x4038, 0x4078, 0x4079, 0x4085, 466 0x0002, 0x4036, 0x4037, 0x4038, 0x4078, 0x4079, 0x4085,
467 0x4088, 0x4089, 0x5037, 0x5078, 0x5079, 0x5085, 0x6079, 467 0x4088, 0x4089, 0x5037, 0x5078, 0x5079, 0x5085, 0x6079,
468 0x7079, 0x8079, 0x8137, 0x8138, 0x8237, 0x8238, 0x9079, 468 0x7079, 0x8079, 0x8137, 0x8138, 0x8237, 0x8238, 0x9079,
@@ -470,35 +470,34 @@ static unsigned short timedia_dual_port[] = {
470 0xD079, 0 470 0xD079, 0
471}; 471};
472 472
473static unsigned short timedia_quad_port[] = { 473static const unsigned short timedia_quad_port[] = {
474 0x4055, 0x4056, 0x4095, 0x4096, 0x5056, 0x8156, 0x8157, 474 0x4055, 0x4056, 0x4095, 0x4096, 0x5056, 0x8156, 0x8157,
475 0x8256, 0x8257, 0x9056, 0x9156, 0x9157, 0x9158, 0x9159, 475 0x8256, 0x8257, 0x9056, 0x9156, 0x9157, 0x9158, 0x9159,
476 0x9256, 0x9257, 0xA056, 0xA157, 0xA158, 0xA159, 0xB056, 476 0x9256, 0x9257, 0xA056, 0xA157, 0xA158, 0xA159, 0xB056,
477 0xB157, 0 477 0xB157, 0
478}; 478};
479 479
480static unsigned short timedia_eight_port[] = { 480static const unsigned short timedia_eight_port[] = {
481 0x4065, 0x4066, 0x5065, 0x5066, 0x8166, 0x9066, 0x9166, 481 0x4065, 0x4066, 0x5065, 0x5066, 0x8166, 0x9066, 0x9166,
482 0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0 482 0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0
483}; 483};
484 484
485static const struct timedia_struct { 485static const struct timedia_struct {
486 int num; 486 int num;
487 unsigned short *ids; 487 const unsigned short *ids;
488} timedia_data[] = { 488} timedia_data[] = {
489 { 1, timedia_single_port }, 489 { 1, timedia_single_port },
490 { 2, timedia_dual_port }, 490 { 2, timedia_dual_port },
491 { 4, timedia_quad_port }, 491 { 4, timedia_quad_port },
492 { 8, timedia_eight_port }, 492 { 8, timedia_eight_port }
493 { 0, NULL }
494}; 493};
495 494
496static int pci_timedia_init(struct pci_dev *dev) 495static int pci_timedia_init(struct pci_dev *dev)
497{ 496{
498 unsigned short *ids; 497 const unsigned short *ids;
499 int i, j; 498 int i, j;
500 499
501 for (i = 0; timedia_data[i].num; i++) { 500 for (i = 0; i < ARRAY_SIZE(timedia_data); i++) {
502 ids = timedia_data[i].ids; 501 ids = timedia_data[i].ids;
503 for (j = 0; ids[j]; j++) 502 for (j = 0; ids[j]; j++)
504 if (dev->subsystem_device == ids[j]) 503 if (dev->subsystem_device == ids[j])
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
index 392bffcf96e8..95738a19cde7 100644
--- a/drivers/serial/s3c2410.c
+++ b/drivers/serial/s3c2410.c
@@ -1621,7 +1621,7 @@ static struct s3c24xx_uart_info s3c2412_uart_inf = {
1621static int s3c2412_serial_probe(struct platform_device *dev) 1621static int s3c2412_serial_probe(struct platform_device *dev)
1622{ 1622{
1623 dbg("s3c2440_serial_probe: dev=%p\n", dev); 1623 dbg("s3c2440_serial_probe: dev=%p\n", dev);
1624 return s3c24xx_serial_probe(dev, &s3c2440_uart_inf); 1624 return s3c24xx_serial_probe(dev, &s3c2412_uart_inf);
1625} 1625}
1626 1626
1627static struct platform_driver s3c2412_serial_drv = { 1627static struct platform_driver s3c2412_serial_drv = {
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 80ef7d482756..372e47f7d596 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -2377,6 +2377,9 @@ int uart_match_port(struct uart_port *port1, struct uart_port *port2)
2377 return (port1->iobase == port2->iobase) && 2377 return (port1->iobase == port2->iobase) &&
2378 (port1->hub6 == port2->hub6); 2378 (port1->hub6 == port2->hub6);
2379 case UPIO_MEM: 2379 case UPIO_MEM:
2380 case UPIO_MEM32:
2381 case UPIO_AU:
2382 case UPIO_TSI:
2380 return (port1->mapbase == port2->mapbase); 2383 return (port1->mapbase == port2->mapbase);
2381 } 2384 }
2382 return 0; 2385 return 0;
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 301573373c30..cbede06cac27 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -1579,7 +1579,7 @@ static int __init serial_console_setup(struct console *co, char *options)
1579 h8300_sci_enable(port, sci_enable); 1579 h8300_sci_enable(port, sci_enable);
1580#endif 1580#endif
1581#elif defined(CONFIG_SUPERH64) 1581#elif defined(CONFIG_SUPERH64)
1582 port->uartclk = current_cpu_info.module_clock * 16; 1582 port->uartclk = current_cpu_data.module_clock * 16;
1583#else 1583#else
1584 { 1584 {
1585 struct clk *clk = clk_get("module_clk"); 1585 struct clk *clk = clk_get("module_clk");
@@ -1720,7 +1720,7 @@ static int __init sci_init(void)
1720#if defined(__H8300H__) || defined(__H8300S__) 1720#if defined(__H8300H__) || defined(__H8300S__)
1721 sciport->port.uartclk = CONFIG_CPU_CLOCK; 1721 sciport->port.uartclk = CONFIG_CPU_CLOCK;
1722#elif defined(CONFIG_SUPERH64) 1722#elif defined(CONFIG_SUPERH64)
1723 sciport->port.uartclk = current_cpu_info.module_clock * 16; 1723 sciport->port.uartclk = current_cpu_data.module_clock * 16;
1724#else 1724#else
1725 struct clk *clk = clk_get("module_clk"); 1725 struct clk *clk = clk_get("module_clk");
1726 sciport->port.uartclk = clk_get_rate(clk) * 16; 1726 sciport->port.uartclk = clk_get_rate(clk) * 16;
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 4fe1bec1c255..30299c620d97 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -117,6 +117,8 @@ struct eth_dev {
117 struct usb_ep *in_ep, *out_ep, *status_ep; 117 struct usb_ep *in_ep, *out_ep, *status_ep;
118 const struct usb_endpoint_descriptor 118 const struct usb_endpoint_descriptor
119 *in, *out, *status; 119 *in, *out, *status;
120
121 spinlock_t req_lock;
120 struct list_head tx_reqs, rx_reqs; 122 struct list_head tx_reqs, rx_reqs;
121 123
122 struct net_device *net; 124 struct net_device *net;
@@ -1066,21 +1068,31 @@ static void eth_reset_config (struct eth_dev *dev)
1066 */ 1068 */
1067 if (dev->in) { 1069 if (dev->in) {
1068 usb_ep_disable (dev->in_ep); 1070 usb_ep_disable (dev->in_ep);
1071 spin_lock(&dev->req_lock);
1069 while (likely (!list_empty (&dev->tx_reqs))) { 1072 while (likely (!list_empty (&dev->tx_reqs))) {
1070 req = container_of (dev->tx_reqs.next, 1073 req = container_of (dev->tx_reqs.next,
1071 struct usb_request, list); 1074 struct usb_request, list);
1072 list_del (&req->list); 1075 list_del (&req->list);
1076
1077 spin_unlock(&dev->req_lock);
1073 usb_ep_free_request (dev->in_ep, req); 1078 usb_ep_free_request (dev->in_ep, req);
1079 spin_lock(&dev->req_lock);
1074 } 1080 }
1081 spin_unlock(&dev->req_lock);
1075 } 1082 }
1076 if (dev->out) { 1083 if (dev->out) {
1077 usb_ep_disable (dev->out_ep); 1084 usb_ep_disable (dev->out_ep);
1085 spin_lock(&dev->req_lock);
1078 while (likely (!list_empty (&dev->rx_reqs))) { 1086 while (likely (!list_empty (&dev->rx_reqs))) {
1079 req = container_of (dev->rx_reqs.next, 1087 req = container_of (dev->rx_reqs.next,
1080 struct usb_request, list); 1088 struct usb_request, list);
1081 list_del (&req->list); 1089 list_del (&req->list);
1090
1091 spin_unlock(&dev->req_lock);
1082 usb_ep_free_request (dev->out_ep, req); 1092 usb_ep_free_request (dev->out_ep, req);
1093 spin_lock(&dev->req_lock);
1083 } 1094 }
1095 spin_unlock(&dev->req_lock);
1084 } 1096 }
1085 1097
1086 if (dev->status) { 1098 if (dev->status) {
@@ -1659,9 +1671,9 @@ enomem:
1659 if (retval) { 1671 if (retval) {
1660 DEBUG (dev, "rx submit --> %d\n", retval); 1672 DEBUG (dev, "rx submit --> %d\n", retval);
1661 dev_kfree_skb_any (skb); 1673 dev_kfree_skb_any (skb);
1662 spin_lock (&dev->lock); 1674 spin_lock(&dev->req_lock);
1663 list_add (&req->list, &dev->rx_reqs); 1675 list_add (&req->list, &dev->rx_reqs);
1664 spin_unlock (&dev->lock); 1676 spin_unlock(&dev->req_lock);
1665 } 1677 }
1666 return retval; 1678 return retval;
1667} 1679}
@@ -1730,8 +1742,9 @@ quiesce:
1730 dev_kfree_skb_any (skb); 1742 dev_kfree_skb_any (skb);
1731 if (!netif_running (dev->net)) { 1743 if (!netif_running (dev->net)) {
1732clean: 1744clean:
1733 /* nobody reading rx_reqs, so no dev->lock */ 1745 spin_lock(&dev->req_lock);
1734 list_add (&req->list, &dev->rx_reqs); 1746 list_add (&req->list, &dev->rx_reqs);
1747 spin_unlock(&dev->req_lock);
1735 req = NULL; 1748 req = NULL;
1736 } 1749 }
1737 if (req) 1750 if (req)
@@ -1782,15 +1795,18 @@ static int alloc_requests (struct eth_dev *dev, unsigned n, gfp_t gfp_flags)
1782{ 1795{
1783 int status; 1796 int status;
1784 1797
1798 spin_lock(&dev->req_lock);
1785 status = prealloc (&dev->tx_reqs, dev->in_ep, n, gfp_flags); 1799 status = prealloc (&dev->tx_reqs, dev->in_ep, n, gfp_flags);
1786 if (status < 0) 1800 if (status < 0)
1787 goto fail; 1801 goto fail;
1788 status = prealloc (&dev->rx_reqs, dev->out_ep, n, gfp_flags); 1802 status = prealloc (&dev->rx_reqs, dev->out_ep, n, gfp_flags);
1789 if (status < 0) 1803 if (status < 0)
1790 goto fail; 1804 goto fail;
1791 return 0; 1805 goto done;
1792fail: 1806fail:
1793 DEBUG (dev, "can't alloc requests\n"); 1807 DEBUG (dev, "can't alloc requests\n");
1808done:
1809 spin_unlock(&dev->req_lock);
1794 return status; 1810 return status;
1795} 1811}
1796 1812
@@ -1800,21 +1816,21 @@ static void rx_fill (struct eth_dev *dev, gfp_t gfp_flags)
1800 unsigned long flags; 1816 unsigned long flags;
1801 1817
1802 /* fill unused rxq slots with some skb */ 1818 /* fill unused rxq slots with some skb */
1803 spin_lock_irqsave (&dev->lock, flags); 1819 spin_lock_irqsave(&dev->req_lock, flags);
1804 while (!list_empty (&dev->rx_reqs)) { 1820 while (!list_empty (&dev->rx_reqs)) {
1805 req = container_of (dev->rx_reqs.next, 1821 req = container_of (dev->rx_reqs.next,
1806 struct usb_request, list); 1822 struct usb_request, list);
1807 list_del_init (&req->list); 1823 list_del_init (&req->list);
1808 spin_unlock_irqrestore (&dev->lock, flags); 1824 spin_unlock_irqrestore(&dev->req_lock, flags);
1809 1825
1810 if (rx_submit (dev, req, gfp_flags) < 0) { 1826 if (rx_submit (dev, req, gfp_flags) < 0) {
1811 defer_kevent (dev, WORK_RX_MEMORY); 1827 defer_kevent (dev, WORK_RX_MEMORY);
1812 return; 1828 return;
1813 } 1829 }
1814 1830
1815 spin_lock_irqsave (&dev->lock, flags); 1831 spin_lock_irqsave(&dev->req_lock, flags);
1816 } 1832 }
1817 spin_unlock_irqrestore (&dev->lock, flags); 1833 spin_unlock_irqrestore(&dev->req_lock, flags);
1818} 1834}
1819 1835
1820static void eth_work (void *_dev) 1836static void eth_work (void *_dev)
@@ -1848,9 +1864,9 @@ static void tx_complete (struct usb_ep *ep, struct usb_request *req)
1848 } 1864 }
1849 dev->stats.tx_packets++; 1865 dev->stats.tx_packets++;
1850 1866
1851 spin_lock (&dev->lock); 1867 spin_lock(&dev->req_lock);
1852 list_add (&req->list, &dev->tx_reqs); 1868 list_add (&req->list, &dev->tx_reqs);
1853 spin_unlock (&dev->lock); 1869 spin_unlock(&dev->req_lock);
1854 dev_kfree_skb_any (skb); 1870 dev_kfree_skb_any (skb);
1855 1871
1856 atomic_dec (&dev->tx_qlen); 1872 atomic_dec (&dev->tx_qlen);
@@ -1896,12 +1912,12 @@ static int eth_start_xmit (struct sk_buff *skb, struct net_device *net)
1896 /* ignores USB_CDC_PACKET_TYPE_DIRECTED */ 1912 /* ignores USB_CDC_PACKET_TYPE_DIRECTED */
1897 } 1913 }
1898 1914
1899 spin_lock_irqsave (&dev->lock, flags); 1915 spin_lock_irqsave(&dev->req_lock, flags);
1900 req = container_of (dev->tx_reqs.next, struct usb_request, list); 1916 req = container_of (dev->tx_reqs.next, struct usb_request, list);
1901 list_del (&req->list); 1917 list_del (&req->list);
1902 if (list_empty (&dev->tx_reqs)) 1918 if (list_empty (&dev->tx_reqs))
1903 netif_stop_queue (net); 1919 netif_stop_queue (net);
1904 spin_unlock_irqrestore (&dev->lock, flags); 1920 spin_unlock_irqrestore(&dev->req_lock, flags);
1905 1921
1906 /* no buffer copies needed, unless the network stack did it 1922 /* no buffer copies needed, unless the network stack did it
1907 * or the hardware can't use skb buffers. 1923 * or the hardware can't use skb buffers.
@@ -1955,11 +1971,11 @@ static int eth_start_xmit (struct sk_buff *skb, struct net_device *net)
1955drop: 1971drop:
1956 dev->stats.tx_dropped++; 1972 dev->stats.tx_dropped++;
1957 dev_kfree_skb_any (skb); 1973 dev_kfree_skb_any (skb);
1958 spin_lock_irqsave (&dev->lock, flags); 1974 spin_lock_irqsave(&dev->req_lock, flags);
1959 if (list_empty (&dev->tx_reqs)) 1975 if (list_empty (&dev->tx_reqs))
1960 netif_start_queue (net); 1976 netif_start_queue (net);
1961 list_add (&req->list, &dev->tx_reqs); 1977 list_add (&req->list, &dev->tx_reqs);
1962 spin_unlock_irqrestore (&dev->lock, flags); 1978 spin_unlock_irqrestore(&dev->req_lock, flags);
1963 } 1979 }
1964 return 0; 1980 return 0;
1965} 1981}
@@ -2378,6 +2394,7 @@ autoconf_fail:
2378 return status; 2394 return status;
2379 dev = netdev_priv(net); 2395 dev = netdev_priv(net);
2380 spin_lock_init (&dev->lock); 2396 spin_lock_init (&dev->lock);
2397 spin_lock_init (&dev->req_lock);
2381 INIT_WORK (&dev->work, eth_work, dev); 2398 INIT_WORK (&dev->work, eth_work, dev);
2382 INIT_LIST_HEAD (&dev->tx_reqs); 2399 INIT_LIST_HEAD (&dev->tx_reqs);
2383 INIT_LIST_HEAD (&dev->rx_reqs); 2400 INIT_LIST_HEAD (&dev->rx_reqs);
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c
index 66c3f61bc9d1..431e8f31f1a9 100644
--- a/drivers/usb/host/uhci-q.c
+++ b/drivers/usb/host/uhci-q.c
@@ -372,7 +372,7 @@ static void uhci_fixup_toggles(struct uhci_qh *qh, int skip_first)
372 * need to change any toggles in this URB */ 372 * need to change any toggles in this URB */
373 td = list_entry(urbp->td_list.next, struct uhci_td, list); 373 td = list_entry(urbp->td_list.next, struct uhci_td, list);
374 if (toggle > 1 || uhci_toggle(td_token(td)) == toggle) { 374 if (toggle > 1 || uhci_toggle(td_token(td)) == toggle) {
375 td = list_entry(urbp->td_list.next, struct uhci_td, 375 td = list_entry(urbp->td_list.prev, struct uhci_td,
376 list); 376 list);
377 toggle = uhci_toggle(td_token(td)) ^ 1; 377 toggle = uhci_toggle(td_token(td)) ^ 1;
378 378
@@ -1348,7 +1348,7 @@ static void uhci_scan_qh(struct uhci_hcd *uhci, struct uhci_qh *qh,
1348 } 1348 }
1349 1349
1350 uhci_giveback_urb(uhci, qh, urb, regs); 1350 uhci_giveback_urb(uhci, qh, urb, regs);
1351 if (status < 0) 1351 if (status < 0 && qh->type != USB_ENDPOINT_XFER_ISOC)
1352 break; 1352 break;
1353 } 1353 }
1354 1354
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
index 8ea9c915fbf9..a2c56b2de589 100644
--- a/drivers/usb/input/hid-core.c
+++ b/drivers/usb/input/hid-core.c
@@ -1411,17 +1411,54 @@ void hid_init_reports(struct hid_device *hid)
1411 warn("timeout initializing reports"); 1411 warn("timeout initializing reports");
1412} 1412}
1413 1413
1414#define USB_VENDOR_ID_GTCO 0x078c
1415#define USB_DEVICE_ID_GTCO_90 0x0090
1416#define USB_DEVICE_ID_GTCO_100 0x0100
1417#define USB_DEVICE_ID_GTCO_101 0x0101
1418#define USB_DEVICE_ID_GTCO_103 0x0103
1419#define USB_DEVICE_ID_GTCO_104 0x0104
1420#define USB_DEVICE_ID_GTCO_105 0x0105
1421#define USB_DEVICE_ID_GTCO_106 0x0106
1422#define USB_DEVICE_ID_GTCO_107 0x0107
1423#define USB_DEVICE_ID_GTCO_108 0x0108
1424#define USB_DEVICE_ID_GTCO_200 0x0200
1425#define USB_DEVICE_ID_GTCO_201 0x0201
1426#define USB_DEVICE_ID_GTCO_202 0x0202
1427#define USB_DEVICE_ID_GTCO_203 0x0203
1428#define USB_DEVICE_ID_GTCO_204 0x0204
1429#define USB_DEVICE_ID_GTCO_205 0x0205
1430#define USB_DEVICE_ID_GTCO_206 0x0206
1431#define USB_DEVICE_ID_GTCO_207 0x0207
1432#define USB_DEVICE_ID_GTCO_300 0x0300
1433#define USB_DEVICE_ID_GTCO_301 0x0301
1434#define USB_DEVICE_ID_GTCO_302 0x0302
1435#define USB_DEVICE_ID_GTCO_303 0x0303
1436#define USB_DEVICE_ID_GTCO_304 0x0304
1437#define USB_DEVICE_ID_GTCO_305 0x0305
1438#define USB_DEVICE_ID_GTCO_306 0x0306
1439#define USB_DEVICE_ID_GTCO_307 0x0307
1440#define USB_DEVICE_ID_GTCO_308 0x0308
1441#define USB_DEVICE_ID_GTCO_309 0x0309
1442#define USB_DEVICE_ID_GTCO_400 0x0400
1443#define USB_DEVICE_ID_GTCO_401 0x0401
1444#define USB_DEVICE_ID_GTCO_402 0x0402
1445#define USB_DEVICE_ID_GTCO_403 0x0403
1446#define USB_DEVICE_ID_GTCO_404 0x0404
1447#define USB_DEVICE_ID_GTCO_405 0x0405
1448#define USB_DEVICE_ID_GTCO_500 0x0500
1449#define USB_DEVICE_ID_GTCO_501 0x0501
1450#define USB_DEVICE_ID_GTCO_502 0x0502
1451#define USB_DEVICE_ID_GTCO_503 0x0503
1452#define USB_DEVICE_ID_GTCO_504 0x0504
1453#define USB_DEVICE_ID_GTCO_1000 0x1000
1454#define USB_DEVICE_ID_GTCO_1001 0x1001
1455#define USB_DEVICE_ID_GTCO_1002 0x1002
1456#define USB_DEVICE_ID_GTCO_1003 0x1003
1457#define USB_DEVICE_ID_GTCO_1004 0x1004
1458#define USB_DEVICE_ID_GTCO_1005 0x1005
1459#define USB_DEVICE_ID_GTCO_1006 0x1006
1460
1414#define USB_VENDOR_ID_WACOM 0x056a 1461#define USB_VENDOR_ID_WACOM 0x056a
1415#define USB_DEVICE_ID_WACOM_PENPARTNER 0x0000
1416#define USB_DEVICE_ID_WACOM_GRAPHIRE 0x0010
1417#define USB_DEVICE_ID_WACOM_INTUOS 0x0020
1418#define USB_DEVICE_ID_WACOM_PL 0x0030
1419#define USB_DEVICE_ID_WACOM_INTUOS2 0x0040
1420#define USB_DEVICE_ID_WACOM_VOLITO 0x0060
1421#define USB_DEVICE_ID_WACOM_PTU 0x0003
1422#define USB_DEVICE_ID_WACOM_INTUOS3 0x00B0
1423#define USB_DEVICE_ID_WACOM_CINTIQ 0x003F
1424#define USB_DEVICE_ID_WACOM_DTF 0x00C0
1425 1462
1426#define USB_VENDOR_ID_ACECAD 0x0460 1463#define USB_VENDOR_ID_ACECAD 0x0460
1427#define USB_DEVICE_ID_ACECAD_FLAIR 0x0004 1464#define USB_DEVICE_ID_ACECAD_FLAIR 0x0004
@@ -1588,6 +1625,51 @@ static const struct hid_blacklist {
1588 { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_8_IF_KIT, HID_QUIRK_IGNORE }, 1625 { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_8_IF_KIT, HID_QUIRK_IGNORE },
1589 { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE, HID_QUIRK_IGNORE }, 1626 { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE, HID_QUIRK_IGNORE },
1590 { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB, HID_QUIRK_IGNORE }, 1627 { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB, HID_QUIRK_IGNORE },
1628 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_90, HID_QUIRK_IGNORE },
1629 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_100, HID_QUIRK_IGNORE },
1630 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_101, HID_QUIRK_IGNORE },
1631 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_103, HID_QUIRK_IGNORE },
1632 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_104, HID_QUIRK_IGNORE },
1633 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_105, HID_QUIRK_IGNORE },
1634 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_106, HID_QUIRK_IGNORE },
1635 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_107, HID_QUIRK_IGNORE },
1636 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_108, HID_QUIRK_IGNORE },
1637 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_200, HID_QUIRK_IGNORE },
1638 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_201, HID_QUIRK_IGNORE },
1639 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_202, HID_QUIRK_IGNORE },
1640 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_203, HID_QUIRK_IGNORE },
1641 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_204, HID_QUIRK_IGNORE },
1642 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_205, HID_QUIRK_IGNORE },
1643 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_206, HID_QUIRK_IGNORE },
1644 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_207, HID_QUIRK_IGNORE },
1645 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_300, HID_QUIRK_IGNORE },
1646 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_301, HID_QUIRK_IGNORE },
1647 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_302, HID_QUIRK_IGNORE },
1648 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_303, HID_QUIRK_IGNORE },
1649 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_304, HID_QUIRK_IGNORE },
1650 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_305, HID_QUIRK_IGNORE },
1651 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_306, HID_QUIRK_IGNORE },
1652 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_307, HID_QUIRK_IGNORE },
1653 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_308, HID_QUIRK_IGNORE },
1654 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_309, HID_QUIRK_IGNORE },
1655 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_400, HID_QUIRK_IGNORE },
1656 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_401, HID_QUIRK_IGNORE },
1657 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_402, HID_QUIRK_IGNORE },
1658 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_403, HID_QUIRK_IGNORE },
1659 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_404, HID_QUIRK_IGNORE },
1660 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_405, HID_QUIRK_IGNORE },
1661 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_500, HID_QUIRK_IGNORE },
1662 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_501, HID_QUIRK_IGNORE },
1663 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_502, HID_QUIRK_IGNORE },
1664 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_503, HID_QUIRK_IGNORE },
1665 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_504, HID_QUIRK_IGNORE },
1666 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1000, HID_QUIRK_IGNORE },
1667 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1001, HID_QUIRK_IGNORE },
1668 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1002, HID_QUIRK_IGNORE },
1669 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1003, HID_QUIRK_IGNORE },
1670 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1004, HID_QUIRK_IGNORE },
1671 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1005, HID_QUIRK_IGNORE },
1672 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006, HID_QUIRK_IGNORE },
1591 { USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO, HID_QUIRK_IGNORE }, 1673 { USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO, HID_QUIRK_IGNORE },
1592 { USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY, HID_QUIRK_IGNORE }, 1674 { USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY, HID_QUIRK_IGNORE },
1593 { USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POCKETCASSY, HID_QUIRK_IGNORE }, 1675 { USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POCKETCASSY, HID_QUIRK_IGNORE },
@@ -1617,49 +1699,6 @@ static const struct hid_blacklist {
1617 { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_GOTEMP, HID_QUIRK_IGNORE }, 1699 { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_GOTEMP, HID_QUIRK_IGNORE },
1618 { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP, HID_QUIRK_IGNORE }, 1700 { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP, HID_QUIRK_IGNORE },
1619 { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_CYCLOPS, HID_QUIRK_IGNORE }, 1701 { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_CYCLOPS, HID_QUIRK_IGNORE },
1620 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PENPARTNER, HID_QUIRK_IGNORE },
1621 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE, HID_QUIRK_IGNORE },
1622 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 1, HID_QUIRK_IGNORE },
1623 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 2, HID_QUIRK_IGNORE },
1624 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 3, HID_QUIRK_IGNORE },
1625 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 4, HID_QUIRK_IGNORE },
1626 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS, HID_QUIRK_IGNORE },
1627 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 1, HID_QUIRK_IGNORE },
1628 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 2, HID_QUIRK_IGNORE },
1629 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 3, HID_QUIRK_IGNORE },
1630 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 4, HID_QUIRK_IGNORE },
1631 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL, HID_QUIRK_IGNORE },
1632 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 1, HID_QUIRK_IGNORE },
1633 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 2, HID_QUIRK_IGNORE },
1634 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 3, HID_QUIRK_IGNORE },
1635 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 4, HID_QUIRK_IGNORE },
1636 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 5, HID_QUIRK_IGNORE },
1637 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 7, HID_QUIRK_IGNORE },
1638 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 8, HID_QUIRK_IGNORE },
1639 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 9, HID_QUIRK_IGNORE },
1640 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 1, HID_QUIRK_IGNORE },
1641 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 2, HID_QUIRK_IGNORE },
1642 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 3, HID_QUIRK_IGNORE },
1643 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 4, HID_QUIRK_IGNORE },
1644 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 5, HID_QUIRK_IGNORE },
1645 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 7, HID_QUIRK_IGNORE },
1646 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO, HID_QUIRK_IGNORE },
1647 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO + 1, HID_QUIRK_IGNORE },
1648 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO + 2, HID_QUIRK_IGNORE },
1649 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO + 3, HID_QUIRK_IGNORE },
1650 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO + 4, HID_QUIRK_IGNORE },
1651 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 5, HID_QUIRK_IGNORE },
1652 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 6, HID_QUIRK_IGNORE },
1653 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PTU, HID_QUIRK_IGNORE },
1654 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3, HID_QUIRK_IGNORE },
1655 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 1, HID_QUIRK_IGNORE },
1656 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 2, HID_QUIRK_IGNORE },
1657 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 3, HID_QUIRK_IGNORE },
1658 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 4, HID_QUIRK_IGNORE },
1659 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 5, HID_QUIRK_IGNORE },
1660 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_CINTIQ, HID_QUIRK_IGNORE },
1661 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_DTF, HID_QUIRK_IGNORE },
1662 { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_DTF + 3, HID_QUIRK_IGNORE },
1663 { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_4_PHIDGETSERVO_20, HID_QUIRK_IGNORE }, 1702 { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_4_PHIDGETSERVO_20, HID_QUIRK_IGNORE },
1664 { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20, HID_QUIRK_IGNORE }, 1703 { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20, HID_QUIRK_IGNORE },
1665 { USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K, HID_QUIRK_IGNORE }, 1704 { USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K, HID_QUIRK_IGNORE },
@@ -1778,6 +1817,10 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
1778 char *rdesc; 1817 char *rdesc;
1779 int n, len, insize = 0; 1818 int n, len, insize = 0;
1780 1819
1820 /* Ignore all Wacom devices */
1821 if (dev->descriptor.idVendor == USB_VENDOR_ID_WACOM)
1822 return NULL;
1823
1781 for (n = 0; hid_blacklist[n].idVendor; n++) 1824 for (n = 0; hid_blacklist[n].idVendor; n++)
1782 if ((hid_blacklist[n].idVendor == le16_to_cpu(dev->descriptor.idVendor)) && 1825 if ((hid_blacklist[n].idVendor == le16_to_cpu(dev->descriptor.idVendor)) &&
1783 (hid_blacklist[n].idProduct == le16_to_cpu(dev->descriptor.idProduct))) 1826 (hid_blacklist[n].idProduct == le16_to_cpu(dev->descriptor.idProduct)))
diff --git a/drivers/usb/input/usbtouchscreen.c b/drivers/usb/input/usbtouchscreen.c
index 3b175aa482cd..a338bf4c2d78 100644
--- a/drivers/usb/input/usbtouchscreen.c
+++ b/drivers/usb/input/usbtouchscreen.c
@@ -286,7 +286,7 @@ static int mtouch_init(struct usbtouch_usb *usbtouch)
286static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press) 286static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press)
287{ 287{
288 *x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F); 288 *x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F);
289 *x = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F); 289 *y = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F);
290 *press = ((pkt[2] & 0x1F) << 7) | (pkt[5] & 0x7F); 290 *press = ((pkt[2] & 0x1F) << 7) | (pkt[5] & 0x7F);
291 *touch = ~pkt[7] & 0x20; 291 *touch = ~pkt[7] & 0x20;
292 292
diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c
index 575a4e672e96..7b45fd3de911 100644
--- a/drivers/usb/input/yealink.c
+++ b/drivers/usb/input/yealink.c
@@ -810,12 +810,9 @@ static int usb_cleanup(struct yealink_dev *yld, int err)
810 if (yld == NULL) 810 if (yld == NULL)
811 return err; 811 return err;
812 812
813 if (yld->urb_irq) { 813 usb_kill_urb(yld->urb_irq); /* parameter validation in core/urb */
814 usb_kill_urb(yld->urb_irq); 814 usb_kill_urb(yld->urb_ctl); /* parameter validation in core/urb */
815 usb_free_urb(yld->urb_irq); 815
816 }
817 if (yld->urb_ctl)
818 usb_free_urb(yld->urb_ctl);
819 if (yld->idev) { 816 if (yld->idev) {
820 if (err) 817 if (err)
821 input_free_device(yld->idev); 818 input_free_device(yld->idev);
@@ -831,6 +828,9 @@ static int usb_cleanup(struct yealink_dev *yld, int err)
831 if (yld->irq_data) 828 if (yld->irq_data)
832 usb_buffer_free(yld->udev, USB_PKT_LEN, 829 usb_buffer_free(yld->udev, USB_PKT_LEN,
833 yld->irq_data, yld->irq_dma); 830 yld->irq_data, yld->irq_dma);
831
832 usb_free_urb(yld->urb_irq); /* parameter validation in core/urb */
833 usb_free_urb(yld->urb_ctl); /* parameter validation in core/urb */
834 kfree(yld); 834 kfree(yld);
835 return err; 835 return err;
836} 836}
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c
index 738bd7c7451f..e16582f3733c 100644
--- a/drivers/usb/misc/sisusbvga/sisusb.c
+++ b/drivers/usb/misc/sisusbvga/sisusb.c
@@ -3435,6 +3435,8 @@ static void sisusb_disconnect(struct usb_interface *intf)
3435 3435
3436static struct usb_device_id sisusb_table [] = { 3436static struct usb_device_id sisusb_table [] = {
3437 { USB_DEVICE(0x0711, 0x0900) }, 3437 { USB_DEVICE(0x0711, 0x0900) },
3438 { USB_DEVICE(0x0711, 0x0901) },
3439 { USB_DEVICE(0x0711, 0x0902) },
3438 { USB_DEVICE(0x182d, 0x021c) }, 3440 { USB_DEVICE(0x182d, 0x021c) },
3439 { USB_DEVICE(0x182d, 0x0269) }, 3441 { USB_DEVICE(0x182d, 0x0269) },
3440 { } 3442 { }
diff --git a/drivers/usb/net/pegasus.h b/drivers/usb/net/pegasus.h
index a54752ce1493..006438069b66 100644
--- a/drivers/usb/net/pegasus.h
+++ b/drivers/usb/net/pegasus.h
@@ -131,6 +131,7 @@ struct usb_eth_dev {
131#define VENDOR_COREGA 0x07aa 131#define VENDOR_COREGA 0x07aa
132#define VENDOR_DLINK 0x2001 132#define VENDOR_DLINK 0x2001
133#define VENDOR_ELCON 0x0db7 133#define VENDOR_ELCON 0x0db7
134#define VENDOR_ELECOM 0x056e
134#define VENDOR_ELSA 0x05cc 135#define VENDOR_ELSA 0x05cc
135#define VENDOR_GIGABYTE 0x1044 136#define VENDOR_GIGABYTE 0x1044
136#define VENDOR_HAWKING 0x0e66 137#define VENDOR_HAWKING 0x0e66
@@ -233,6 +234,8 @@ PEGASUS_DEV( "D-Link DSB-650", VENDOR_DLINK, 0xabc1,
233 DEFAULT_GPIO_RESET ) 234 DEFAULT_GPIO_RESET )
234PEGASUS_DEV( "GOLDPFEIL USB Adapter", VENDOR_ELCON, 0x0002, 235PEGASUS_DEV( "GOLDPFEIL USB Adapter", VENDOR_ELCON, 0x0002,
235 DEFAULT_GPIO_RESET | PEGASUS_II | HAS_HOME_PNA ) 236 DEFAULT_GPIO_RESET | PEGASUS_II | HAS_HOME_PNA )
237PEGASUS_DEV( "ELECOM USB Ethernet LD-USB20", VENDOR_ELECOM, 0x4010,
238 DEFAULT_GPIO_RESET | PEGASUS_II )
236PEGASUS_DEV( "EasiDock Ethernet", VENDOR_MOBILITY, 0x0304, 239PEGASUS_DEV( "EasiDock Ethernet", VENDOR_MOBILITY, 0x0304,
237 DEFAULT_GPIO_RESET ) 240 DEFAULT_GPIO_RESET )
238PEGASUS_DEV( "Elsa Micolink USB2Ethernet", VENDOR_ELSA, 0x3000, 241PEGASUS_DEV( "Elsa Micolink USB2Ethernet", VENDOR_ELSA, 0x3000,
diff --git a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c
index bd09232ce13c..a72685b96061 100644
--- a/drivers/usb/net/rtl8150.c
+++ b/drivers/usb/net/rtl8150.c
@@ -972,6 +972,7 @@ static void rtl8150_disconnect(struct usb_interface *intf)
972 if (dev) { 972 if (dev) {
973 set_bit(RTL8150_UNPLUG, &dev->flags); 973 set_bit(RTL8150_UNPLUG, &dev->flags);
974 tasklet_disable(&dev->tl); 974 tasklet_disable(&dev->tl);
975 tasklet_kill(&dev->tl);
975 unregister_netdev(dev->netdev); 976 unregister_netdev(dev->netdev);
976 unlink_all_urbs(dev); 977 unlink_all_urbs(dev);
977 free_all_urbs(dev); 978 free_all_urbs(dev);
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 15945e806f03..c6115aa1b445 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -506,6 +506,7 @@ static struct usb_device_id id_table_combined [] = {
506 { USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) }, 506 { USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) },
507 { USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) }, 507 { USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) },
508 { USB_DEVICE(TESTO_VID, TESTO_USB_INTERFACE_PID) }, 508 { USB_DEVICE(TESTO_VID, TESTO_USB_INTERFACE_PID) },
509 { USB_DEVICE(FTDI_VID, FTDI_GAMMA_SCOUT_PID) },
509 { }, /* Optional parameter entry */ 510 { }, /* Optional parameter entry */
510 { } /* Terminating entry */ 511 { } /* Terminating entry */
511}; 512};
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
index 8888cd80a491..77299996f7ee 100644
--- a/drivers/usb/serial/ftdi_sio.h
+++ b/drivers/usb/serial/ftdi_sio.h
@@ -467,6 +467,11 @@
467#define TESTO_VID 0x128D 467#define TESTO_VID 0x128D
468#define TESTO_USB_INTERFACE_PID 0x0001 468#define TESTO_USB_INTERFACE_PID 0x0001
469 469
470/*
471 * Gamma Scout (http://gamma-scout.com/). Submitted by rsc@runtux.com.
472 */
473#define FTDI_GAMMA_SCOUT_PID 0xD678 /* Gamma Scout online */
474
470/* Commands */ 475/* Commands */
471#define FTDI_SIO_RESET 0 /* Reset the port */ 476#define FTDI_SIO_RESET 0 /* Reset the port */
472#define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ 477#define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 12c1694d322e..e06a41bd0f3b 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -464,8 +464,10 @@ static int serial_read_proc (char *page, char **start, off_t off, int count, int
464 length += sprintf (page+length, " path:%s", tmp); 464 length += sprintf (page+length, " path:%s", tmp);
465 465
466 length += sprintf (page+length, "\n"); 466 length += sprintf (page+length, "\n");
467 if ((length + begin) > (off + count)) 467 if ((length + begin) > (off + count)) {
468 usb_serial_put(serial);
468 goto done; 469 goto done;
470 }
469 if ((length + begin) < off) { 471 if ((length + begin) < off) {
470 begin += length; 472 begin += length;
471 length = 0; 473 length = 0;
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index 4a803d69fa36..b130e170b4a8 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -241,16 +241,6 @@ UNUSUAL_DEV( 0x0482, 0x0103, 0x0100, 0x0100,
241 "Finecam S5", 241 "Finecam S5",
242 US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY), 242 US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY),
243 243
244/* Patch for Kyocera Finecam L3
245 * Submitted by Michael Krauth <michael.krauth@web.de>
246 * and Alessandro Fracchetti <al.fracchetti@tin.it>
247 */
248UNUSUAL_DEV( 0x0482, 0x0105, 0x0100, 0x0100,
249 "Kyocera",
250 "Finecam L3",
251 US_SC_SCSI, US_PR_BULK, NULL,
252 US_FL_FIX_INQUIRY),
253
254/* Reported by Paul Stewart <stewart@wetlogic.net> 244/* Reported by Paul Stewart <stewart@wetlogic.net>
255 * This entry is needed because the device reports Sub=ff */ 245 * This entry is needed because the device reports Sub=ff */
256UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x0001, 246UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x0001,
@@ -599,6 +589,13 @@ UNUSUAL_DEV( 0x054c, 0x0099, 0x0000, 0x9999,
599 US_SC_DEVICE, US_PR_DEVICE, NULL, 589 US_SC_DEVICE, US_PR_DEVICE, NULL,
600 US_FL_FIX_INQUIRY ), 590 US_FL_FIX_INQUIRY ),
601 591
592/* floppy reports multiple luns */
593UNUSUAL_DEV( 0x055d, 0x2020, 0x0000, 0x0210,
594 "SAMSUNG",
595 "SFD-321U [FW 0C]",
596 US_SC_DEVICE, US_PR_DEVICE, NULL,
597 US_FL_SINGLE_LUN ),
598
602 599
603UNUSUAL_DEV( 0x057b, 0x0000, 0x0000, 0x0299, 600UNUSUAL_DEV( 0x057b, 0x0000, 0x0000, 0x0299,
604 "Y-E Data", 601 "Y-E Data",
@@ -1257,6 +1254,13 @@ UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000,
1257 US_SC_DEVICE, US_PR_DEVICE, NULL, 1254 US_SC_DEVICE, US_PR_DEVICE, NULL,
1258 US_FL_NO_WP_DETECT ), 1255 US_FL_NO_WP_DETECT ),
1259 1256
1257/* Reported by Emmanuel Vasilakis <evas@forthnet.gr> */
1258UNUSUAL_DEV( 0x0fce, 0xe031, 0x0000, 0x0000,
1259 "Sony Ericsson",
1260 "M600i",
1261 US_SC_DEVICE, US_PR_DEVICE, NULL,
1262 US_FL_FIX_CAPACITY ),
1263
1260/* Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu> 1264/* Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu>
1261 * Tested on hardware version 1.10. 1265 * Tested on hardware version 1.10.
1262 * Entry is needed only for the initializer function override. 1266 * Entry is needed only for the initializer function override.
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index 3e827e04a2aa..276a21530b95 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -1801,10 +1801,14 @@ static struct backlight_properties aty128_bl_data = {
1801static void aty128_bl_set_power(struct fb_info *info, int power) 1801static void aty128_bl_set_power(struct fb_info *info, int power)
1802{ 1802{
1803 mutex_lock(&info->bl_mutex); 1803 mutex_lock(&info->bl_mutex);
1804 up(&info->bl_dev->sem); 1804
1805 info->bl_dev->props->power = power; 1805 if (info->bl_dev) {
1806 __aty128_bl_update_status(info->bl_dev); 1806 down(&info->bl_dev->sem);
1807 down(&info->bl_dev->sem); 1807 info->bl_dev->props->power = power;
1808 __aty128_bl_update_status(info->bl_dev);
1809 up(&info->bl_dev->sem);
1810 }
1811
1808 mutex_unlock(&info->bl_mutex); 1812 mutex_unlock(&info->bl_mutex);
1809} 1813}
1810 1814
@@ -1828,7 +1832,7 @@ static void aty128_bl_init(struct aty128fb_par *par)
1828 bd = backlight_device_register(name, par, &aty128_bl_data); 1832 bd = backlight_device_register(name, par, &aty128_bl_data);
1829 if (IS_ERR(bd)) { 1833 if (IS_ERR(bd)) {
1830 info->bl_dev = NULL; 1834 info->bl_dev = NULL;
1831 printk("aty128: Backlight registration failed\n"); 1835 printk(KERN_WARNING "aty128: Backlight registration failed\n");
1832 goto error; 1836 goto error;
1833 } 1837 }
1834 1838
@@ -1839,11 +1843,11 @@ static void aty128_bl_init(struct aty128fb_par *par)
1839 219 * FB_BACKLIGHT_MAX / MAX_LEVEL); 1843 219 * FB_BACKLIGHT_MAX / MAX_LEVEL);
1840 mutex_unlock(&info->bl_mutex); 1844 mutex_unlock(&info->bl_mutex);
1841 1845
1842 up(&bd->sem); 1846 down(&bd->sem);
1843 bd->props->brightness = aty128_bl_data.max_brightness; 1847 bd->props->brightness = aty128_bl_data.max_brightness;
1844 bd->props->power = FB_BLANK_UNBLANK; 1848 bd->props->power = FB_BLANK_UNBLANK;
1845 bd->props->update_status(bd); 1849 bd->props->update_status(bd);
1846 down(&bd->sem); 1850 up(&bd->sem);
1847 1851
1848#ifdef CONFIG_PMAC_BACKLIGHT 1852#ifdef CONFIG_PMAC_BACKLIGHT
1849 mutex_lock(&pmac_backlight_mutex); 1853 mutex_lock(&pmac_backlight_mutex);
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index 053ff63365b7..19a71f045784 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -2200,10 +2200,14 @@ static struct backlight_properties aty_bl_data = {
2200static void aty_bl_set_power(struct fb_info *info, int power) 2200static void aty_bl_set_power(struct fb_info *info, int power)
2201{ 2201{
2202 mutex_lock(&info->bl_mutex); 2202 mutex_lock(&info->bl_mutex);
2203 up(&info->bl_dev->sem); 2203
2204 info->bl_dev->props->power = power; 2204 if (info->bl_dev) {
2205 __aty_bl_update_status(info->bl_dev); 2205 down(&info->bl_dev->sem);
2206 down(&info->bl_dev->sem); 2206 info->bl_dev->props->power = power;
2207 __aty_bl_update_status(info->bl_dev);
2208 up(&info->bl_dev->sem);
2209 }
2210
2207 mutex_unlock(&info->bl_mutex); 2211 mutex_unlock(&info->bl_mutex);
2208} 2212}
2209 2213
@@ -2223,7 +2227,7 @@ static void aty_bl_init(struct atyfb_par *par)
2223 bd = backlight_device_register(name, par, &aty_bl_data); 2227 bd = backlight_device_register(name, par, &aty_bl_data);
2224 if (IS_ERR(bd)) { 2228 if (IS_ERR(bd)) {
2225 info->bl_dev = NULL; 2229 info->bl_dev = NULL;
2226 printk("aty: Backlight registration failed\n"); 2230 printk(KERN_WARNING "aty: Backlight registration failed\n");
2227 goto error; 2231 goto error;
2228 } 2232 }
2229 2233
@@ -2234,11 +2238,11 @@ static void aty_bl_init(struct atyfb_par *par)
2234 0xFF * FB_BACKLIGHT_MAX / MAX_LEVEL); 2238 0xFF * FB_BACKLIGHT_MAX / MAX_LEVEL);
2235 mutex_unlock(&info->bl_mutex); 2239 mutex_unlock(&info->bl_mutex);
2236 2240
2237 up(&bd->sem); 2241 down(&bd->sem);
2238 bd->props->brightness = aty_bl_data.max_brightness; 2242 bd->props->brightness = aty_bl_data.max_brightness;
2239 bd->props->power = FB_BLANK_UNBLANK; 2243 bd->props->power = FB_BLANK_UNBLANK;
2240 bd->props->update_status(bd); 2244 bd->props->update_status(bd);
2241 down(&bd->sem); 2245 up(&bd->sem);
2242 2246
2243#ifdef CONFIG_PMAC_BACKLIGHT 2247#ifdef CONFIG_PMAC_BACKLIGHT
2244 mutex_lock(&pmac_backlight_mutex); 2248 mutex_lock(&pmac_backlight_mutex);
diff --git a/drivers/video/aty/radeon_backlight.c b/drivers/video/aty/radeon_backlight.c
index 1755dddf1899..585eb7b9e636 100644
--- a/drivers/video/aty/radeon_backlight.c
+++ b/drivers/video/aty/radeon_backlight.c
@@ -195,11 +195,11 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo)
195 217 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL); 195 217 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL);
196 mutex_unlock(&rinfo->info->bl_mutex); 196 mutex_unlock(&rinfo->info->bl_mutex);
197 197
198 up(&bd->sem); 198 down(&bd->sem);
199 bd->props->brightness = radeon_bl_data.max_brightness; 199 bd->props->brightness = radeon_bl_data.max_brightness;
200 bd->props->power = FB_BLANK_UNBLANK; 200 bd->props->power = FB_BLANK_UNBLANK;
201 bd->props->update_status(bd); 201 bd->props->update_status(bd);
202 down(&bd->sem); 202 up(&bd->sem);
203 203
204#ifdef CONFIG_PMAC_BACKLIGHT 204#ifdef CONFIG_PMAC_BACKLIGHT
205 mutex_lock(&pmac_backlight_mutex); 205 mutex_lock(&pmac_backlight_mutex);
diff --git a/drivers/video/nvidia/nv_backlight.c b/drivers/video/nvidia/nv_backlight.c
index b45f577094ac..5b75ae4e9457 100644
--- a/drivers/video/nvidia/nv_backlight.c
+++ b/drivers/video/nvidia/nv_backlight.c
@@ -113,10 +113,14 @@ static struct backlight_properties nvidia_bl_data = {
113void nvidia_bl_set_power(struct fb_info *info, int power) 113void nvidia_bl_set_power(struct fb_info *info, int power)
114{ 114{
115 mutex_lock(&info->bl_mutex); 115 mutex_lock(&info->bl_mutex);
116 up(&info->bl_dev->sem); 116
117 info->bl_dev->props->power = power; 117 if (info->bl_dev) {
118 __nvidia_bl_update_status(info->bl_dev); 118 down(&info->bl_dev->sem);
119 down(&info->bl_dev->sem); 119 info->bl_dev->props->power = power;
120 __nvidia_bl_update_status(info->bl_dev);
121 up(&info->bl_dev->sem);
122 }
123
120 mutex_unlock(&info->bl_mutex); 124 mutex_unlock(&info->bl_mutex);
121} 125}
122 126
@@ -140,7 +144,7 @@ void nvidia_bl_init(struct nvidia_par *par)
140 bd = backlight_device_register(name, par, &nvidia_bl_data); 144 bd = backlight_device_register(name, par, &nvidia_bl_data);
141 if (IS_ERR(bd)) { 145 if (IS_ERR(bd)) {
142 info->bl_dev = NULL; 146 info->bl_dev = NULL;
143 printk("nvidia: Backlight registration failed\n"); 147 printk(KERN_WARNING "nvidia: Backlight registration failed\n");
144 goto error; 148 goto error;
145 } 149 }
146 150
@@ -151,11 +155,11 @@ void nvidia_bl_init(struct nvidia_par *par)
151 0x534 * FB_BACKLIGHT_MAX / MAX_LEVEL); 155 0x534 * FB_BACKLIGHT_MAX / MAX_LEVEL);
152 mutex_unlock(&info->bl_mutex); 156 mutex_unlock(&info->bl_mutex);
153 157
154 up(&bd->sem); 158 down(&bd->sem);
155 bd->props->brightness = nvidia_bl_data.max_brightness; 159 bd->props->brightness = nvidia_bl_data.max_brightness;
156 bd->props->power = FB_BLANK_UNBLANK; 160 bd->props->power = FB_BLANK_UNBLANK;
157 bd->props->update_status(bd); 161 bd->props->update_status(bd);
158 down(&bd->sem); 162 up(&bd->sem);
159 163
160#ifdef CONFIG_PMAC_BACKLIGHT 164#ifdef CONFIG_PMAC_BACKLIGHT
161 mutex_lock(&pmac_backlight_mutex); 165 mutex_lock(&pmac_backlight_mutex);
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
index 76fc9d355eb7..8ddb47a56b07 100644
--- a/drivers/video/riva/fbdev.c
+++ b/drivers/video/riva/fbdev.c
@@ -355,10 +355,14 @@ static struct backlight_properties riva_bl_data = {
355static void riva_bl_set_power(struct fb_info *info, int power) 355static void riva_bl_set_power(struct fb_info *info, int power)
356{ 356{
357 mutex_lock(&info->bl_mutex); 357 mutex_lock(&info->bl_mutex);
358 up(&info->bl_dev->sem); 358
359 info->bl_dev->props->power = power; 359 if (info->bl_dev) {
360 __riva_bl_update_status(info->bl_dev); 360 down(&info->bl_dev->sem);
361 down(&info->bl_dev->sem); 361 info->bl_dev->props->power = power;
362 __riva_bl_update_status(info->bl_dev);
363 up(&info->bl_dev->sem);
364 }
365
362 mutex_unlock(&info->bl_mutex); 366 mutex_unlock(&info->bl_mutex);
363} 367}
364 368
@@ -382,7 +386,7 @@ static void riva_bl_init(struct riva_par *par)
382 bd = backlight_device_register(name, par, &riva_bl_data); 386 bd = backlight_device_register(name, par, &riva_bl_data);
383 if (IS_ERR(bd)) { 387 if (IS_ERR(bd)) {
384 info->bl_dev = NULL; 388 info->bl_dev = NULL;
385 printk("riva: Backlight registration failed\n"); 389 printk(KERN_WARNING "riva: Backlight registration failed\n");
386 goto error; 390 goto error;
387 } 391 }
388 392
@@ -393,11 +397,11 @@ static void riva_bl_init(struct riva_par *par)
393 0x534 * FB_BACKLIGHT_MAX / MAX_LEVEL); 397 0x534 * FB_BACKLIGHT_MAX / MAX_LEVEL);
394 mutex_unlock(&info->bl_mutex); 398 mutex_unlock(&info->bl_mutex);
395 399
396 up(&bd->sem); 400 down(&bd->sem);
397 bd->props->brightness = riva_bl_data.max_brightness; 401 bd->props->brightness = riva_bl_data.max_brightness;
398 bd->props->power = FB_BLANK_UNBLANK; 402 bd->props->power = FB_BLANK_UNBLANK;
399 bd->props->update_status(bd); 403 bd->props->update_status(bd);
400 down(&bd->sem); 404 up(&bd->sem);
401 405
402#ifdef CONFIG_PMAC_BACKLIGHT 406#ifdef CONFIG_PMAC_BACKLIGHT
403 mutex_lock(&pmac_backlight_mutex); 407 mutex_lock(&pmac_backlight_mutex);
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 105761e3ba0e..9aeb58a7d369 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -82,7 +82,6 @@ static int construct_dentry(struct qstr *qstring, struct file *file,
82 if(*ptmp_inode == NULL) 82 if(*ptmp_inode == NULL)
83 return rc; 83 return rc;
84 rc = 1; 84 rc = 1;
85 d_instantiate(tmp_dentry, *ptmp_inode);
86 } 85 }
87 } else { 86 } else {
88 tmp_dentry = d_alloc(file->f_dentry, qstring); 87 tmp_dentry = d_alloc(file->f_dentry, qstring);
@@ -99,9 +98,7 @@ static int construct_dentry(struct qstr *qstring, struct file *file,
99 tmp_dentry->d_op = &cifs_dentry_ops; 98 tmp_dentry->d_op = &cifs_dentry_ops;
100 if(*ptmp_inode == NULL) 99 if(*ptmp_inode == NULL)
101 return rc; 100 return rc;
102 rc = 1; 101 rc = 2;
103 d_instantiate(tmp_dentry, *ptmp_inode);
104 d_rehash(tmp_dentry);
105 } 102 }
106 103
107 tmp_dentry->d_time = jiffies; 104 tmp_dentry->d_time = jiffies;
@@ -870,6 +867,12 @@ static int cifs_filldir(char *pfindEntry, struct file *file,
870 pfindEntry, &obj_type, rc); 867 pfindEntry, &obj_type, rc);
871 else 868 else
872 fill_in_inode(tmp_inode, 1 /* NT */, pfindEntry, &obj_type, rc); 869 fill_in_inode(tmp_inode, 1 /* NT */, pfindEntry, &obj_type, rc);
870
871 if(rc) /* new inode - needs to be tied to dentry */ {
872 d_instantiate(tmp_dentry, tmp_inode);
873 if(rc == 2)
874 d_rehash(tmp_dentry);
875 }
873 876
874 877
875 rc = filldir(direntry,qstring.name,qstring.len,file->f_pos, 878 rc = filldir(direntry,qstring.name,qstring.len,file->f_pos,
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index d4870432ecfc..b1981d0e95ad 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -539,7 +539,6 @@ unsigned long ext2_count_free (struct buffer_head * map, unsigned int numchars)
539 539
540#endif /* EXT2FS_DEBUG */ 540#endif /* EXT2FS_DEBUG */
541 541
542/* Superblock must be locked */
543unsigned long ext2_count_free_blocks (struct super_block * sb) 542unsigned long ext2_count_free_blocks (struct super_block * sb)
544{ 543{
545 struct ext2_group_desc * desc; 544 struct ext2_group_desc * desc;
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
index de85c61c58c5..695f69ccf908 100644
--- a/fs/ext2/ialloc.c
+++ b/fs/ext2/ialloc.c
@@ -637,7 +637,6 @@ fail:
637 return ERR_PTR(err); 637 return ERR_PTR(err);
638} 638}
639 639
640/* Superblock must be locked */
641unsigned long ext2_count_free_inodes (struct super_block * sb) 640unsigned long ext2_count_free_inodes (struct super_block * sb)
642{ 641{
643 struct ext2_group_desc *desc; 642 struct ext2_group_desc *desc;
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 681dea8f9532..4286ff6330b6 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -251,6 +251,44 @@ static struct super_operations ext2_sops = {
251#endif 251#endif
252}; 252};
253 253
254static struct dentry *ext2_get_dentry(struct super_block *sb, void *vobjp)
255{
256 __u32 *objp = vobjp;
257 unsigned long ino = objp[0];
258 __u32 generation = objp[1];
259 struct inode *inode;
260 struct dentry *result;
261
262 if (ino < EXT2_FIRST_INO(sb) && ino != EXT2_ROOT_INO)
263 return ERR_PTR(-ESTALE);
264 if (ino > le32_to_cpu(EXT2_SB(sb)->s_es->s_inodes_count))
265 return ERR_PTR(-ESTALE);
266
267 /* iget isn't really right if the inode is currently unallocated!!
268 * ext2_read_inode currently does appropriate checks, but
269 * it might be "neater" to call ext2_get_inode first and check
270 * if the inode is valid.....
271 */
272 inode = iget(sb, ino);
273 if (inode == NULL)
274 return ERR_PTR(-ENOMEM);
275 if (is_bad_inode(inode) ||
276 (generation && inode->i_generation != generation)) {
277 /* we didn't find the right inode.. */
278 iput(inode);
279 return ERR_PTR(-ESTALE);
280 }
281 /* now to find a dentry.
282 * If possible, get a well-connected one
283 */
284 result = d_alloc_anon(inode);
285 if (!result) {
286 iput(inode);
287 return ERR_PTR(-ENOMEM);
288 }
289 return result;
290}
291
254/* Yes, most of these are left as NULL!! 292/* Yes, most of these are left as NULL!!
255 * A NULL value implies the default, which works with ext2-like file 293 * A NULL value implies the default, which works with ext2-like file
256 * systems, but can be improved upon. 294 * systems, but can be improved upon.
@@ -258,6 +296,7 @@ static struct super_operations ext2_sops = {
258 */ 296 */
259static struct export_operations ext2_export_ops = { 297static struct export_operations ext2_export_ops = {
260 .get_parent = ext2_get_parent, 298 .get_parent = ext2_get_parent,
299 .get_dentry = ext2_get_dentry,
261}; 300};
262 301
263static unsigned long get_sb_block(void **data) 302static unsigned long get_sb_block(void **data)
@@ -1044,7 +1083,6 @@ static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf)
1044 unsigned long overhead; 1083 unsigned long overhead;
1045 int i; 1084 int i;
1046 1085
1047 lock_super(sb);
1048 if (test_opt (sb, MINIX_DF)) 1086 if (test_opt (sb, MINIX_DF))
1049 overhead = 0; 1087 overhead = 0;
1050 else { 1088 else {
@@ -1085,7 +1123,6 @@ static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf)
1085 buf->f_files = le32_to_cpu(sbi->s_es->s_inodes_count); 1123 buf->f_files = le32_to_cpu(sbi->s_es->s_inodes_count);
1086 buf->f_ffree = ext2_count_free_inodes (sb); 1124 buf->f_ffree = ext2_count_free_inodes (sb);
1087 buf->f_namelen = EXT2_NAME_LEN; 1125 buf->f_namelen = EXT2_NAME_LEN;
1088 unlock_super(sb);
1089 return 0; 1126 return 0;
1090} 1127}
1091 1128
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index c5ee9f0691e3..84be02e93652 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -925,7 +925,7 @@ int ext3_get_blocks_handle(handle_t *handle, struct inode *inode,
925 set_buffer_new(bh_result); 925 set_buffer_new(bh_result);
926got_it: 926got_it:
927 map_bh(bh_result, inode->i_sb, le32_to_cpu(chain[depth-1].key)); 927 map_bh(bh_result, inode->i_sb, le32_to_cpu(chain[depth-1].key));
928 if (blocks_to_boundary == 0) 928 if (count > blocks_to_boundary)
929 set_buffer_boundary(bh_result); 929 set_buffer_boundary(bh_result);
930 err = count; 930 err = count;
931 /* Clean up and exit */ 931 /* Clean up and exit */
@@ -1009,11 +1009,14 @@ struct buffer_head *ext3_getblk(handle_t *handle, struct inode *inode,
1009 buffer_trace_init(&dummy.b_history); 1009 buffer_trace_init(&dummy.b_history);
1010 err = ext3_get_blocks_handle(handle, inode, block, 1, 1010 err = ext3_get_blocks_handle(handle, inode, block, 1,
1011 &dummy, create, 1); 1011 &dummy, create, 1);
1012 if (err == 1) { 1012 /*
1013 * ext3_get_blocks_handle() returns number of blocks
1014 * mapped. 0 in case of a HOLE.
1015 */
1016 if (err > 0) {
1017 if (err > 1)
1018 WARN_ON(1);
1013 err = 0; 1019 err = 0;
1014 } else if (err >= 0) {
1015 WARN_ON(1);
1016 err = -EIO;
1017 } 1020 }
1018 *errp = err; 1021 *errp = err;
1019 if (!err && buffer_mapped(&dummy)) { 1022 if (!err && buffer_mapped(&dummy)) {
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 813d589cc6c0..3559086eee5f 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -554,6 +554,47 @@ static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs)
554 return 0; 554 return 0;
555} 555}
556 556
557
558static struct dentry *ext3_get_dentry(struct super_block *sb, void *vobjp)
559{
560 __u32 *objp = vobjp;
561 unsigned long ino = objp[0];
562 __u32 generation = objp[1];
563 struct inode *inode;
564 struct dentry *result;
565
566 if (ino < EXT3_FIRST_INO(sb) && ino != EXT3_ROOT_INO)
567 return ERR_PTR(-ESTALE);
568 if (ino > le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count))
569 return ERR_PTR(-ESTALE);
570
571 /* iget isn't really right if the inode is currently unallocated!!
572 *
573 * ext3_read_inode will return a bad_inode if the inode had been
574 * deleted, so we should be safe.
575 *
576 * Currently we don't know the generation for parent directory, so
577 * a generation of 0 means "accept any"
578 */
579 inode = iget(sb, ino);
580 if (inode == NULL)
581 return ERR_PTR(-ENOMEM);
582 if (is_bad_inode(inode) ||
583 (generation && inode->i_generation != generation)) {
584 iput(inode);
585 return ERR_PTR(-ESTALE);
586 }
587 /* now to find a dentry.
588 * If possible, get a well-connected one
589 */
590 result = d_alloc_anon(inode);
591 if (!result) {
592 iput(inode);
593 return ERR_PTR(-ENOMEM);
594 }
595 return result;
596}
597
557#ifdef CONFIG_QUOTA 598#ifdef CONFIG_QUOTA
558#define QTYPE2NAME(t) ((t)==USRQUOTA?"user":"group") 599#define QTYPE2NAME(t) ((t)==USRQUOTA?"user":"group")
559#define QTYPE2MOPT(on, t) ((t)==USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA)) 600#define QTYPE2MOPT(on, t) ((t)==USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA))
@@ -622,6 +663,7 @@ static struct super_operations ext3_sops = {
622 663
623static struct export_operations ext3_export_ops = { 664static struct export_operations ext3_export_ops = {
624 .get_parent = ext3_get_parent, 665 .get_parent = ext3_get_parent,
666 .get_dentry = ext3_get_dentry,
625}; 667};
626 668
627enum { 669enum {
diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
index de2e4cbbf79a..f5169a96260e 100644
--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -727,7 +727,7 @@ done:
727 727
728out: 728out:
729 if (unlikely(frozen_buffer)) /* It's usually NULL */ 729 if (unlikely(frozen_buffer)) /* It's usually NULL */
730 kfree(frozen_buffer); 730 jbd_slab_free(frozen_buffer, bh->b_size);
731 731
732 JBUFFER_TRACE(jh, "exit"); 732 JBUFFER_TRACE(jh, "exit");
733 return error; 733 return error;
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index fecd3b095deb..76ca1cbc38f9 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -100,25 +100,6 @@ static inline int put_dreq(struct nfs_direct_req *dreq)
100 return atomic_dec_and_test(&dreq->io_count); 100 return atomic_dec_and_test(&dreq->io_count);
101} 101}
102 102
103/*
104 * "size" is never larger than rsize or wsize.
105 */
106static inline int nfs_direct_count_pages(unsigned long user_addr, size_t size)
107{
108 int page_count;
109
110 page_count = (user_addr + size + PAGE_SIZE - 1) >> PAGE_SHIFT;
111 page_count -= user_addr >> PAGE_SHIFT;
112 BUG_ON(page_count < 0);
113
114 return page_count;
115}
116
117static inline unsigned int nfs_max_pages(unsigned int size)
118{
119 return (size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
120}
121
122/** 103/**
123 * nfs_direct_IO - NFS address space operation for direct I/O 104 * nfs_direct_IO - NFS address space operation for direct I/O
124 * @rw: direction (read or write) 105 * @rw: direction (read or write)
@@ -276,28 +257,24 @@ static ssize_t nfs_direct_read_schedule(struct nfs_direct_req *dreq, unsigned lo
276 struct nfs_open_context *ctx = dreq->ctx; 257 struct nfs_open_context *ctx = dreq->ctx;
277 struct inode *inode = ctx->dentry->d_inode; 258 struct inode *inode = ctx->dentry->d_inode;
278 size_t rsize = NFS_SERVER(inode)->rsize; 259 size_t rsize = NFS_SERVER(inode)->rsize;
279 unsigned int rpages = nfs_max_pages(rsize);
280 unsigned int pgbase; 260 unsigned int pgbase;
281 int result; 261 int result;
282 ssize_t started = 0; 262 ssize_t started = 0;
283 263
284 get_dreq(dreq); 264 get_dreq(dreq);
285 265
286 pgbase = user_addr & ~PAGE_MASK;
287 do { 266 do {
288 struct nfs_read_data *data; 267 struct nfs_read_data *data;
289 size_t bytes; 268 size_t bytes;
290 269
270 pgbase = user_addr & ~PAGE_MASK;
271 bytes = min(rsize,count);
272
291 result = -ENOMEM; 273 result = -ENOMEM;
292 data = nfs_readdata_alloc(rpages); 274 data = nfs_readdata_alloc(pgbase + bytes);
293 if (unlikely(!data)) 275 if (unlikely(!data))
294 break; 276 break;
295 277
296 bytes = rsize;
297 if (count < rsize)
298 bytes = count;
299
300 data->npages = nfs_direct_count_pages(user_addr, bytes);
301 down_read(&current->mm->mmap_sem); 278 down_read(&current->mm->mmap_sem);
302 result = get_user_pages(current, current->mm, user_addr, 279 result = get_user_pages(current, current->mm, user_addr,
303 data->npages, 1, 0, data->pagevec, NULL); 280 data->npages, 1, 0, data->pagevec, NULL);
@@ -344,8 +321,10 @@ static ssize_t nfs_direct_read_schedule(struct nfs_direct_req *dreq, unsigned lo
344 started += bytes; 321 started += bytes;
345 user_addr += bytes; 322 user_addr += bytes;
346 pos += bytes; 323 pos += bytes;
324 /* FIXME: Remove this unnecessary math from final patch */
347 pgbase += bytes; 325 pgbase += bytes;
348 pgbase &= ~PAGE_MASK; 326 pgbase &= ~PAGE_MASK;
327 BUG_ON(pgbase != (user_addr & ~PAGE_MASK));
349 328
350 count -= bytes; 329 count -= bytes;
351 } while (count != 0); 330 } while (count != 0);
@@ -524,7 +503,7 @@ static void nfs_direct_write_complete(struct nfs_direct_req *dreq, struct inode
524 503
525static void nfs_alloc_commit_data(struct nfs_direct_req *dreq) 504static void nfs_alloc_commit_data(struct nfs_direct_req *dreq)
526{ 505{
527 dreq->commit_data = nfs_commit_alloc(0); 506 dreq->commit_data = nfs_commit_alloc();
528 if (dreq->commit_data != NULL) 507 if (dreq->commit_data != NULL)
529 dreq->commit_data->req = (struct nfs_page *) dreq; 508 dreq->commit_data->req = (struct nfs_page *) dreq;
530} 509}
@@ -605,28 +584,24 @@ static ssize_t nfs_direct_write_schedule(struct nfs_direct_req *dreq, unsigned l
605 struct nfs_open_context *ctx = dreq->ctx; 584 struct nfs_open_context *ctx = dreq->ctx;
606 struct inode *inode = ctx->dentry->d_inode; 585 struct inode *inode = ctx->dentry->d_inode;
607 size_t wsize = NFS_SERVER(inode)->wsize; 586 size_t wsize = NFS_SERVER(inode)->wsize;
608 unsigned int wpages = nfs_max_pages(wsize);
609 unsigned int pgbase; 587 unsigned int pgbase;
610 int result; 588 int result;
611 ssize_t started = 0; 589 ssize_t started = 0;
612 590
613 get_dreq(dreq); 591 get_dreq(dreq);
614 592
615 pgbase = user_addr & ~PAGE_MASK;
616 do { 593 do {
617 struct nfs_write_data *data; 594 struct nfs_write_data *data;
618 size_t bytes; 595 size_t bytes;
619 596
597 pgbase = user_addr & ~PAGE_MASK;
598 bytes = min(wsize,count);
599
620 result = -ENOMEM; 600 result = -ENOMEM;
621 data = nfs_writedata_alloc(wpages); 601 data = nfs_writedata_alloc(pgbase + bytes);
622 if (unlikely(!data)) 602 if (unlikely(!data))
623 break; 603 break;
624 604
625 bytes = wsize;
626 if (count < wsize)
627 bytes = count;
628
629 data->npages = nfs_direct_count_pages(user_addr, bytes);
630 down_read(&current->mm->mmap_sem); 605 down_read(&current->mm->mmap_sem);
631 result = get_user_pages(current, current->mm, user_addr, 606 result = get_user_pages(current, current->mm, user_addr,
632 data->npages, 0, 0, data->pagevec, NULL); 607 data->npages, 0, 0, data->pagevec, NULL);
@@ -676,8 +651,11 @@ static ssize_t nfs_direct_write_schedule(struct nfs_direct_req *dreq, unsigned l
676 started += bytes; 651 started += bytes;
677 user_addr += bytes; 652 user_addr += bytes;
678 pos += bytes; 653 pos += bytes;
654
655 /* FIXME: Remove this useless math from the final patch */
679 pgbase += bytes; 656 pgbase += bytes;
680 pgbase &= ~PAGE_MASK; 657 pgbase &= ~PAGE_MASK;
658 BUG_ON(pgbase != (user_addr & ~PAGE_MASK));
681 659
682 count -= bytes; 660 count -= bytes;
683 } while (count != 0); 661 } while (count != 0);
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index da9cf11c326f..7a9ee00e0c61 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -43,13 +43,15 @@ static mempool_t *nfs_rdata_mempool;
43 43
44#define MIN_POOL_READ (32) 44#define MIN_POOL_READ (32)
45 45
46struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount) 46struct nfs_read_data *nfs_readdata_alloc(size_t len)
47{ 47{
48 unsigned int pagecount = (len + PAGE_SIZE - 1) >> PAGE_SHIFT;
48 struct nfs_read_data *p = mempool_alloc(nfs_rdata_mempool, SLAB_NOFS); 49 struct nfs_read_data *p = mempool_alloc(nfs_rdata_mempool, SLAB_NOFS);
49 50
50 if (p) { 51 if (p) {
51 memset(p, 0, sizeof(*p)); 52 memset(p, 0, sizeof(*p));
52 INIT_LIST_HEAD(&p->pages); 53 INIT_LIST_HEAD(&p->pages);
54 p->npages = pagecount;
53 if (pagecount <= ARRAY_SIZE(p->page_array)) 55 if (pagecount <= ARRAY_SIZE(p->page_array))
54 p->pagevec = p->page_array; 56 p->pagevec = p->page_array;
55 else { 57 else {
@@ -140,7 +142,7 @@ static int nfs_readpage_sync(struct nfs_open_context *ctx, struct inode *inode,
140 int result; 142 int result;
141 struct nfs_read_data *rdata; 143 struct nfs_read_data *rdata;
142 144
143 rdata = nfs_readdata_alloc(1); 145 rdata = nfs_readdata_alloc(count);
144 if (!rdata) 146 if (!rdata)
145 return -ENOMEM; 147 return -ENOMEM;
146 148
@@ -336,25 +338,25 @@ static int nfs_pagein_multi(struct list_head *head, struct inode *inode)
336 struct nfs_page *req = nfs_list_entry(head->next); 338 struct nfs_page *req = nfs_list_entry(head->next);
337 struct page *page = req->wb_page; 339 struct page *page = req->wb_page;
338 struct nfs_read_data *data; 340 struct nfs_read_data *data;
339 unsigned int rsize = NFS_SERVER(inode)->rsize; 341 size_t rsize = NFS_SERVER(inode)->rsize, nbytes;
340 unsigned int nbytes, offset; 342 unsigned int offset;
341 int requests = 0; 343 int requests = 0;
342 LIST_HEAD(list); 344 LIST_HEAD(list);
343 345
344 nfs_list_remove_request(req); 346 nfs_list_remove_request(req);
345 347
346 nbytes = req->wb_bytes; 348 nbytes = req->wb_bytes;
347 for(;;) { 349 do {
348 data = nfs_readdata_alloc(1); 350 size_t len = min(nbytes,rsize);
351
352 data = nfs_readdata_alloc(len);
349 if (!data) 353 if (!data)
350 goto out_bad; 354 goto out_bad;
351 INIT_LIST_HEAD(&data->pages); 355 INIT_LIST_HEAD(&data->pages);
352 list_add(&data->pages, &list); 356 list_add(&data->pages, &list);
353 requests++; 357 requests++;
354 if (nbytes <= rsize) 358 nbytes -= len;
355 break; 359 } while(nbytes != 0);
356 nbytes -= rsize;
357 }
358 atomic_set(&req->wb_complete, requests); 360 atomic_set(&req->wb_complete, requests);
359 361
360 ClearPageError(page); 362 ClearPageError(page);
@@ -402,7 +404,7 @@ static int nfs_pagein_one(struct list_head *head, struct inode *inode)
402 if (NFS_SERVER(inode)->rsize < PAGE_CACHE_SIZE) 404 if (NFS_SERVER(inode)->rsize < PAGE_CACHE_SIZE)
403 return nfs_pagein_multi(head, inode); 405 return nfs_pagein_multi(head, inode);
404 406
405 data = nfs_readdata_alloc(NFS_SERVER(inode)->rpages); 407 data = nfs_readdata_alloc(NFS_SERVER(inode)->rsize);
406 if (!data) 408 if (!data)
407 goto out_bad; 409 goto out_bad;
408 410
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 50774991f8d5..8ab3cf10d792 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -90,22 +90,13 @@ static mempool_t *nfs_commit_mempool;
90 90
91static DECLARE_WAIT_QUEUE_HEAD(nfs_write_congestion); 91static DECLARE_WAIT_QUEUE_HEAD(nfs_write_congestion);
92 92
93struct nfs_write_data *nfs_commit_alloc(unsigned int pagecount) 93struct nfs_write_data *nfs_commit_alloc(void)
94{ 94{
95 struct nfs_write_data *p = mempool_alloc(nfs_commit_mempool, SLAB_NOFS); 95 struct nfs_write_data *p = mempool_alloc(nfs_commit_mempool, SLAB_NOFS);
96 96
97 if (p) { 97 if (p) {
98 memset(p, 0, sizeof(*p)); 98 memset(p, 0, sizeof(*p));
99 INIT_LIST_HEAD(&p->pages); 99 INIT_LIST_HEAD(&p->pages);
100 if (pagecount <= ARRAY_SIZE(p->page_array))
101 p->pagevec = p->page_array;
102 else {
103 p->pagevec = kcalloc(pagecount, sizeof(struct page *), GFP_NOFS);
104 if (!p->pagevec) {
105 mempool_free(p, nfs_commit_mempool);
106 p = NULL;
107 }
108 }
109 } 100 }
110 return p; 101 return p;
111} 102}
@@ -117,13 +108,15 @@ void nfs_commit_free(struct nfs_write_data *p)
117 mempool_free(p, nfs_commit_mempool); 108 mempool_free(p, nfs_commit_mempool);
118} 109}
119 110
120struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount) 111struct nfs_write_data *nfs_writedata_alloc(size_t len)
121{ 112{
113 unsigned int pagecount = (len + PAGE_SIZE - 1) >> PAGE_SHIFT;
122 struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, SLAB_NOFS); 114 struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, SLAB_NOFS);
123 115
124 if (p) { 116 if (p) {
125 memset(p, 0, sizeof(*p)); 117 memset(p, 0, sizeof(*p));
126 INIT_LIST_HEAD(&p->pages); 118 INIT_LIST_HEAD(&p->pages);
119 p->npages = pagecount;
127 if (pagecount <= ARRAY_SIZE(p->page_array)) 120 if (pagecount <= ARRAY_SIZE(p->page_array))
128 p->pagevec = p->page_array; 121 p->pagevec = p->page_array;
129 else { 122 else {
@@ -208,7 +201,7 @@ static int nfs_writepage_sync(struct nfs_open_context *ctx, struct inode *inode,
208 int result, written = 0; 201 int result, written = 0;
209 struct nfs_write_data *wdata; 202 struct nfs_write_data *wdata;
210 203
211 wdata = nfs_writedata_alloc(1); 204 wdata = nfs_writedata_alloc(wsize);
212 if (!wdata) 205 if (!wdata)
213 return -ENOMEM; 206 return -ENOMEM;
214 207
@@ -999,24 +992,24 @@ static int nfs_flush_multi(struct inode *inode, struct list_head *head, int how)
999 struct nfs_page *req = nfs_list_entry(head->next); 992 struct nfs_page *req = nfs_list_entry(head->next);
1000 struct page *page = req->wb_page; 993 struct page *page = req->wb_page;
1001 struct nfs_write_data *data; 994 struct nfs_write_data *data;
1002 unsigned int wsize = NFS_SERVER(inode)->wsize; 995 size_t wsize = NFS_SERVER(inode)->wsize, nbytes;
1003 unsigned int nbytes, offset; 996 unsigned int offset;
1004 int requests = 0; 997 int requests = 0;
1005 LIST_HEAD(list); 998 LIST_HEAD(list);
1006 999
1007 nfs_list_remove_request(req); 1000 nfs_list_remove_request(req);
1008 1001
1009 nbytes = req->wb_bytes; 1002 nbytes = req->wb_bytes;
1010 for (;;) { 1003 do {
1011 data = nfs_writedata_alloc(1); 1004 size_t len = min(nbytes, wsize);
1005
1006 data = nfs_writedata_alloc(len);
1012 if (!data) 1007 if (!data)
1013 goto out_bad; 1008 goto out_bad;
1014 list_add(&data->pages, &list); 1009 list_add(&data->pages, &list);
1015 requests++; 1010 requests++;
1016 if (nbytes <= wsize) 1011 nbytes -= len;
1017 break; 1012 } while (nbytes != 0);
1018 nbytes -= wsize;
1019 }
1020 atomic_set(&req->wb_complete, requests); 1013 atomic_set(&req->wb_complete, requests);
1021 1014
1022 ClearPageError(page); 1015 ClearPageError(page);
@@ -1070,7 +1063,7 @@ static int nfs_flush_one(struct inode *inode, struct list_head *head, int how)
1070 struct nfs_write_data *data; 1063 struct nfs_write_data *data;
1071 unsigned int count; 1064 unsigned int count;
1072 1065
1073 data = nfs_writedata_alloc(NFS_SERVER(inode)->wpages); 1066 data = nfs_writedata_alloc(NFS_SERVER(inode)->wsize);
1074 if (!data) 1067 if (!data)
1075 goto out_bad; 1068 goto out_bad;
1076 1069
@@ -1378,7 +1371,7 @@ nfs_commit_list(struct inode *inode, struct list_head *head, int how)
1378 struct nfs_write_data *data; 1371 struct nfs_write_data *data;
1379 struct nfs_page *req; 1372 struct nfs_page *req;
1380 1373
1381 data = nfs_commit_alloc(NFS_SERVER(inode)->wpages); 1374 data = nfs_commit_alloc();
1382 1375
1383 if (!data) 1376 if (!data)
1384 goto out_bad; 1377 goto out_bad;
diff --git a/fs/super.c b/fs/super.c
index 6d4e8174b6db..5c4c94d5495e 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -49,6 +49,7 @@ DEFINE_SPINLOCK(sb_lock);
49 49
50/** 50/**
51 * alloc_super - create new superblock 51 * alloc_super - create new superblock
52 * @type: filesystem type superblock should belong to
52 * 53 *
53 * Allocates and initializes a new &struct super_block. alloc_super() 54 * Allocates and initializes a new &struct super_block. alloc_super()
54 * returns a pointer new superblock or %NULL if allocation had failed. 55 * returns a pointer new superblock or %NULL if allocation had failed.
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index c40f81ba9b13..34dcb43a7837 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -1390,11 +1390,19 @@ xfs_vm_direct_IO(
1390 1390
1391 iocb->private = xfs_alloc_ioend(inode, IOMAP_UNWRITTEN); 1391 iocb->private = xfs_alloc_ioend(inode, IOMAP_UNWRITTEN);
1392 1392
1393 ret = blockdev_direct_IO_own_locking(rw, iocb, inode, 1393 if (rw == WRITE) {
1394 iomap.iomap_target->bt_bdev, 1394 ret = blockdev_direct_IO_own_locking(rw, iocb, inode,
1395 iov, offset, nr_segs, 1395 iomap.iomap_target->bt_bdev,
1396 xfs_get_blocks_direct, 1396 iov, offset, nr_segs,
1397 xfs_end_io_direct); 1397 xfs_get_blocks_direct,
1398 xfs_end_io_direct);
1399 } else {
1400 ret = blockdev_direct_IO_no_locking(rw, iocb, inode,
1401 iomap.iomap_target->bt_bdev,
1402 iov, offset, nr_segs,
1403 xfs_get_blocks_direct,
1404 xfs_end_io_direct);
1405 }
1398 1406
1399 if (unlikely(ret <= 0 && iocb->private)) 1407 if (unlikely(ret <= 0 && iocb->private))
1400 xfs_destroy_ioend(iocb->private); 1408 xfs_destroy_ioend(iocb->private);
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c
index 5d9cfd91ad08..ee788b1cb364 100644
--- a/fs/xfs/linux-2.6/xfs_lrw.c
+++ b/fs/xfs/linux-2.6/xfs_lrw.c
@@ -264,7 +264,9 @@ xfs_read(
264 dmflags, &locktype); 264 dmflags, &locktype);
265 if (ret) { 265 if (ret) {
266 xfs_iunlock(ip, XFS_IOLOCK_SHARED); 266 xfs_iunlock(ip, XFS_IOLOCK_SHARED);
267 goto unlock_mutex; 267 if (unlikely(ioflags & IO_ISDIRECT))
268 mutex_unlock(&inode->i_mutex);
269 return ret;
268 } 270 }
269 } 271 }
270 272
@@ -272,6 +274,9 @@ xfs_read(
272 bhv_vop_flushinval_pages(vp, ctooff(offtoct(*offset)), 274 bhv_vop_flushinval_pages(vp, ctooff(offtoct(*offset)),
273 -1, FI_REMAPF_LOCKED); 275 -1, FI_REMAPF_LOCKED);
274 276
277 if (unlikely(ioflags & IO_ISDIRECT))
278 mutex_unlock(&inode->i_mutex);
279
275 xfs_rw_enter_trace(XFS_READ_ENTER, &ip->i_iocore, 280 xfs_rw_enter_trace(XFS_READ_ENTER, &ip->i_iocore,
276 (void *)iovp, segs, *offset, ioflags); 281 (void *)iovp, segs, *offset, ioflags);
277 ret = __generic_file_aio_read(iocb, iovp, segs, offset); 282 ret = __generic_file_aio_read(iocb, iovp, segs, offset);
@@ -281,10 +286,6 @@ xfs_read(
281 XFS_STATS_ADD(xs_read_bytes, ret); 286 XFS_STATS_ADD(xs_read_bytes, ret);
282 287
283 xfs_iunlock(ip, XFS_IOLOCK_SHARED); 288 xfs_iunlock(ip, XFS_IOLOCK_SHARED);
284
285unlock_mutex:
286 if (unlikely(ioflags & IO_ISDIRECT))
287 mutex_unlock(&inode->i_mutex);
288 return ret; 289 return ret;
289} 290}
290 291
@@ -390,6 +391,8 @@ xfs_splice_write(
390 xfs_inode_t *ip = XFS_BHVTOI(bdp); 391 xfs_inode_t *ip = XFS_BHVTOI(bdp);
391 xfs_mount_t *mp = ip->i_mount; 392 xfs_mount_t *mp = ip->i_mount;
392 ssize_t ret; 393 ssize_t ret;
394 struct inode *inode = outfilp->f_mapping->host;
395 xfs_fsize_t isize;
393 396
394 XFS_STATS_INC(xs_write_calls); 397 XFS_STATS_INC(xs_write_calls);
395 if (XFS_FORCED_SHUTDOWN(ip->i_mount)) 398 if (XFS_FORCED_SHUTDOWN(ip->i_mount))
@@ -416,6 +419,20 @@ xfs_splice_write(
416 if (ret > 0) 419 if (ret > 0)
417 XFS_STATS_ADD(xs_write_bytes, ret); 420 XFS_STATS_ADD(xs_write_bytes, ret);
418 421
422 isize = i_size_read(inode);
423 if (unlikely(ret < 0 && ret != -EFAULT && *ppos > isize))
424 *ppos = isize;
425
426 if (*ppos > ip->i_d.di_size) {
427 xfs_ilock(ip, XFS_ILOCK_EXCL);
428 if (*ppos > ip->i_d.di_size) {
429 ip->i_d.di_size = *ppos;
430 i_size_write(inode, *ppos);
431 ip->i_update_core = 1;
432 ip->i_update_size = 1;
433 }
434 xfs_iunlock(ip, XFS_ILOCK_EXCL);
435 }
419 xfs_iunlock(ip, XFS_IOLOCK_EXCL); 436 xfs_iunlock(ip, XFS_IOLOCK_EXCL);
420 return ret; 437 return ret;
421} 438}
diff --git a/fs/xfs/quota/xfs_qm_bhv.c b/fs/xfs/quota/xfs_qm_bhv.c
index f137856c3261..db8872be8c87 100644
--- a/fs/xfs/quota/xfs_qm_bhv.c
+++ b/fs/xfs/quota/xfs_qm_bhv.c
@@ -203,7 +203,7 @@ xfs_qm_statvfs(
203 if (error || !vnode) 203 if (error || !vnode)
204 return error; 204 return error;
205 205
206 mp = XFS_BHVTOM(bhv); 206 mp = xfs_vfstom(bhvtovfs(bhv));
207 ip = xfs_vtoi(vnode); 207 ip = xfs_vtoi(vnode);
208 208
209 if (!(ip->i_d.di_flags & XFS_DIFLAG_PROJINHERIT)) 209 if (!(ip->i_d.di_flags & XFS_DIFLAG_PROJINHERIT))
diff --git a/fs/xfs/xfs_alloc.h b/fs/xfs/xfs_alloc.h
index 650591f999ae..5a4256120ccc 100644
--- a/fs/xfs/xfs_alloc.h
+++ b/fs/xfs/xfs_alloc.h
@@ -44,6 +44,26 @@ typedef enum xfs_alloctype
44#define XFS_ALLOC_FLAG_FREEING 0x00000002 /* indicate caller is freeing extents*/ 44#define XFS_ALLOC_FLAG_FREEING 0x00000002 /* indicate caller is freeing extents*/
45 45
46/* 46/*
47 * In order to avoid ENOSPC-related deadlock caused by
48 * out-of-order locking of AGF buffer (PV 947395), we place
49 * constraints on the relationship among actual allocations for
50 * data blocks, freelist blocks, and potential file data bmap
51 * btree blocks. However, these restrictions may result in no
52 * actual space allocated for a delayed extent, for example, a data
53 * block in a certain AG is allocated but there is no additional
54 * block for the additional bmap btree block due to a split of the
55 * bmap btree of the file. The result of this may lead to an
56 * infinite loop in xfssyncd when the file gets flushed to disk and
57 * all delayed extents need to be actually allocated. To get around
58 * this, we explicitly set aside a few blocks which will not be
59 * reserved in delayed allocation. Considering the minimum number of
60 * needed freelist blocks is 4 fsbs _per AG_, a potential split of file's bmap
61 * btree requires 1 fsb, so we set the number of set-aside blocks
62 * to 4 + 4*agcount.
63 */
64#define XFS_ALLOC_SET_ASIDE(mp) (4 + ((mp)->m_sb.sb_agcount * 4))
65
66/*
47 * Argument structure for xfs_alloc routines. 67 * Argument structure for xfs_alloc routines.
48 * This is turned into a structure to avoid having 20 arguments passed 68 * This is turned into a structure to avoid having 20 arguments passed
49 * down several levels of the stack. 69 * down several levels of the stack.
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index 3a6137539064..bf46fae303af 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -4993,7 +4993,7 @@ xfs_bmapi(
4993 bma.firstblock = *firstblock; 4993 bma.firstblock = *firstblock;
4994 bma.alen = alen; 4994 bma.alen = alen;
4995 bma.off = aoff; 4995 bma.off = aoff;
4996 bma.conv = (flags & XFS_BMAPI_CONVERT); 4996 bma.conv = !!(flags & XFS_BMAPI_CONVERT);
4997 bma.wasdel = wasdelay; 4997 bma.wasdel = wasdelay;
4998 bma.minlen = minlen; 4998 bma.minlen = minlen;
4999 bma.low = flist->xbf_low; 4999 bma.low = flist->xbf_low;
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index 077629bab532..c064e72ada9e 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -462,7 +462,7 @@ xfs_fs_counts(
462 462
463 xfs_icsb_sync_counters_lazy(mp); 463 xfs_icsb_sync_counters_lazy(mp);
464 s = XFS_SB_LOCK(mp); 464 s = XFS_SB_LOCK(mp);
465 cnt->freedata = mp->m_sb.sb_fdblocks; 465 cnt->freedata = mp->m_sb.sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp);
466 cnt->freertx = mp->m_sb.sb_frextents; 466 cnt->freertx = mp->m_sb.sb_frextents;
467 cnt->freeino = mp->m_sb.sb_ifree; 467 cnt->freeino = mp->m_sb.sb_ifree;
468 cnt->allocino = mp->m_sb.sb_icount; 468 cnt->allocino = mp->m_sb.sb_icount;
@@ -519,15 +519,19 @@ xfs_reserve_blocks(
519 } 519 }
520 mp->m_resblks = request; 520 mp->m_resblks = request;
521 } else { 521 } else {
522 __int64_t free;
523
524 free = mp->m_sb.sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp);
522 delta = request - mp->m_resblks; 525 delta = request - mp->m_resblks;
523 lcounter = mp->m_sb.sb_fdblocks - delta; 526 lcounter = free - delta;
524 if (lcounter < 0) { 527 if (lcounter < 0) {
525 /* We can't satisfy the request, just get what we can */ 528 /* We can't satisfy the request, just get what we can */
526 mp->m_resblks += mp->m_sb.sb_fdblocks; 529 mp->m_resblks += free;
527 mp->m_resblks_avail += mp->m_sb.sb_fdblocks; 530 mp->m_resblks_avail += free;
528 mp->m_sb.sb_fdblocks = 0; 531 mp->m_sb.sb_fdblocks = XFS_ALLOC_SET_ASIDE(mp);
529 } else { 532 } else {
530 mp->m_sb.sb_fdblocks = lcounter; 533 mp->m_sb.sb_fdblocks =
534 lcounter + XFS_ALLOC_SET_ASIDE(mp);
531 mp->m_resblks = request; 535 mp->m_resblks = request;
532 mp->m_resblks_avail += delta; 536 mp->m_resblks_avail += delta;
533 } 537 }
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 4be5c0b2d296..9dfae18d995f 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -1243,24 +1243,6 @@ xfs_mod_sb(xfs_trans_t *tp, __int64_t fields)
1243 xfs_trans_log_buf(tp, bp, first, last); 1243 xfs_trans_log_buf(tp, bp, first, last);
1244} 1244}
1245 1245
1246/*
1247 * In order to avoid ENOSPC-related deadlock caused by
1248 * out-of-order locking of AGF buffer (PV 947395), we place
1249 * constraints on the relationship among actual allocations for
1250 * data blocks, freelist blocks, and potential file data bmap
1251 * btree blocks. However, these restrictions may result in no
1252 * actual space allocated for a delayed extent, for example, a data
1253 * block in a certain AG is allocated but there is no additional
1254 * block for the additional bmap btree block due to a split of the
1255 * bmap btree of the file. The result of this may lead to an
1256 * infinite loop in xfssyncd when the file gets flushed to disk and
1257 * all delayed extents need to be actually allocated. To get around
1258 * this, we explicitly set aside a few blocks which will not be
1259 * reserved in delayed allocation. Considering the minimum number of
1260 * needed freelist blocks is 4 fsbs, a potential split of file's bmap
1261 * btree requires 1 fsb, so we set the number of set-aside blocks to 8.
1262*/
1263#define SET_ASIDE_BLOCKS 8
1264 1246
1265/* 1247/*
1266 * xfs_mod_incore_sb_unlocked() is a utility routine common used to apply 1248 * xfs_mod_incore_sb_unlocked() is a utility routine common used to apply
@@ -1306,7 +1288,8 @@ xfs_mod_incore_sb_unlocked(xfs_mount_t *mp, xfs_sb_field_t field,
1306 return 0; 1288 return 0;
1307 case XFS_SBS_FDBLOCKS: 1289 case XFS_SBS_FDBLOCKS:
1308 1290
1309 lcounter = (long long)mp->m_sb.sb_fdblocks - SET_ASIDE_BLOCKS; 1291 lcounter = (long long)
1292 mp->m_sb.sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp);
1310 res_used = (long long)(mp->m_resblks - mp->m_resblks_avail); 1293 res_used = (long long)(mp->m_resblks - mp->m_resblks_avail);
1311 1294
1312 if (delta > 0) { /* Putting blocks back */ 1295 if (delta > 0) { /* Putting blocks back */
@@ -1340,7 +1323,7 @@ xfs_mod_incore_sb_unlocked(xfs_mount_t *mp, xfs_sb_field_t field,
1340 } 1323 }
1341 } 1324 }
1342 1325
1343 mp->m_sb.sb_fdblocks = lcounter + SET_ASIDE_BLOCKS; 1326 mp->m_sb.sb_fdblocks = lcounter + XFS_ALLOC_SET_ASIDE(mp);
1344 return 0; 1327 return 0;
1345 case XFS_SBS_FREXTENTS: 1328 case XFS_SBS_FREXTENTS:
1346 lcounter = (long long)mp->m_sb.sb_frextents; 1329 lcounter = (long long)mp->m_sb.sb_frextents;
@@ -2021,7 +2004,8 @@ xfs_icsb_sync_counters_lazy(
2021 * when we get near ENOSPC. 2004 * when we get near ENOSPC.
2022 */ 2005 */
2023#define XFS_ICSB_INO_CNTR_REENABLE 64 2006#define XFS_ICSB_INO_CNTR_REENABLE 64
2024#define XFS_ICSB_FDBLK_CNTR_REENABLE 512 2007#define XFS_ICSB_FDBLK_CNTR_REENABLE(mp) \
2008 (512 + XFS_ALLOC_SET_ASIDE(mp))
2025STATIC void 2009STATIC void
2026xfs_icsb_balance_counter( 2010xfs_icsb_balance_counter(
2027 xfs_mount_t *mp, 2011 xfs_mount_t *mp,
@@ -2055,7 +2039,7 @@ xfs_icsb_balance_counter(
2055 case XFS_SBS_FDBLOCKS: 2039 case XFS_SBS_FDBLOCKS:
2056 count = mp->m_sb.sb_fdblocks; 2040 count = mp->m_sb.sb_fdblocks;
2057 resid = do_div(count, weight); 2041 resid = do_div(count, weight);
2058 if (count < XFS_ICSB_FDBLK_CNTR_REENABLE) 2042 if (count < XFS_ICSB_FDBLK_CNTR_REENABLE(mp))
2059 goto out; 2043 goto out;
2060 break; 2044 break;
2061 default: 2045 default:
@@ -2110,11 +2094,11 @@ again:
2110 case XFS_SBS_FDBLOCKS: 2094 case XFS_SBS_FDBLOCKS:
2111 BUG_ON((mp->m_resblks - mp->m_resblks_avail) != 0); 2095 BUG_ON((mp->m_resblks - mp->m_resblks_avail) != 0);
2112 2096
2113 lcounter = icsbp->icsb_fdblocks; 2097 lcounter = icsbp->icsb_fdblocks - XFS_ALLOC_SET_ASIDE(mp);
2114 lcounter += delta; 2098 lcounter += delta;
2115 if (unlikely(lcounter < 0)) 2099 if (unlikely(lcounter < 0))
2116 goto slow_path; 2100 goto slow_path;
2117 icsbp->icsb_fdblocks = lcounter; 2101 icsbp->icsb_fdblocks = lcounter + XFS_ALLOC_SET_ASIDE(mp);
2118 break; 2102 break;
2119 default: 2103 default:
2120 BUG(); 2104 BUG();
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index b427d220a169..a34796e57afb 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -811,7 +811,8 @@ xfs_statvfs(
811 statp->f_bsize = sbp->sb_blocksize; 811 statp->f_bsize = sbp->sb_blocksize;
812 lsize = sbp->sb_logstart ? sbp->sb_logblocks : 0; 812 lsize = sbp->sb_logstart ? sbp->sb_logblocks : 0;
813 statp->f_blocks = sbp->sb_dblocks - lsize; 813 statp->f_blocks = sbp->sb_dblocks - lsize;
814 statp->f_bfree = statp->f_bavail = sbp->sb_fdblocks; 814 statp->f_bfree = statp->f_bavail =
815 sbp->sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp);
815 fakeinos = statp->f_bfree << sbp->sb_inopblog; 816 fakeinos = statp->f_bfree << sbp->sb_inopblog;
816#if XFS_BIG_INUMS 817#if XFS_BIG_INUMS
817 fakeinos += mp->m_inoadd; 818 fakeinos += mp->m_inoadd;
diff --git a/include/asm-alpha/Kbuild b/include/asm-alpha/Kbuild
index e57fd57538b8..2b06b3bad5ff 100644
--- a/include/asm-alpha/Kbuild
+++ b/include/asm-alpha/Kbuild
@@ -1,5 +1,5 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2 2
3unifdef-y += console.h fpu.h sysinfo.h 3unifdef-y += console.h fpu.h sysinfo.h compiler.h
4 4
5header-y += gentrap.h regdef.h pal.h reg.h 5header-y += gentrap.h regdef.h pal.h reg.h
diff --git a/include/asm-alpha/compiler.h b/include/asm-alpha/compiler.h
index 00c6f57ad9a7..d2768cc3d7a4 100644
--- a/include/asm-alpha/compiler.h
+++ b/include/asm-alpha/compiler.h
@@ -90,6 +90,7 @@
90 __asm__("stw %1,%0" : "=m"(mem) : "r"(val)) 90 __asm__("stw %1,%0" : "=m"(mem) : "r"(val))
91#endif 91#endif
92 92
93#ifdef __KERNEL__
93/* Some idiots over in <linux/compiler.h> thought inline should imply 94/* Some idiots over in <linux/compiler.h> thought inline should imply
94 always_inline. This breaks stuff. We'll include this file whenever 95 always_inline. This breaks stuff. We'll include this file whenever
95 we run into such problems. */ 96 we run into such problems. */
@@ -101,4 +102,6 @@
101#undef __always_inline 102#undef __always_inline
102#define __always_inline inline __attribute__((always_inline)) 103#define __always_inline inline __attribute__((always_inline))
103 104
105#endif /* __KERNEL__ */
106
104#endif /* __ALPHA_COMPILER_H */ 107#endif /* __ALPHA_COMPILER_H */
diff --git a/include/asm-alpha/page.h b/include/asm-alpha/page.h
index 8c7cd50d4eae..d2bed3cb33ff 100644
--- a/include/asm-alpha/page.h
+++ b/include/asm-alpha/page.h
@@ -1,6 +1,8 @@
1#ifndef _ALPHA_PAGE_H 1#ifndef _ALPHA_PAGE_H
2#define _ALPHA_PAGE_H 2#define _ALPHA_PAGE_H
3 3
4#ifdef __KERNEL__
5
4#include <asm/pal.h> 6#include <asm/pal.h>
5 7
6/* PAGE_SHIFT determines the page size */ 8/* PAGE_SHIFT determines the page size */
@@ -8,8 +10,6 @@
8#define PAGE_SIZE (1UL << PAGE_SHIFT) 10#define PAGE_SIZE (1UL << PAGE_SHIFT)
9#define PAGE_MASK (~(PAGE_SIZE-1)) 11#define PAGE_MASK (~(PAGE_SIZE-1))
10 12
11#ifdef __KERNEL__
12
13#ifndef __ASSEMBLY__ 13#ifndef __ASSEMBLY__
14 14
15#define STRICT_MM_TYPECHECKS 15#define STRICT_MM_TYPECHECKS
@@ -92,9 +92,9 @@ typedef unsigned long pgprot_t;
92 92
93#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 93#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
94 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 94 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
95#endif /* __KERNEL__ */
96 95
97#include <asm-generic/memory_model.h> 96#include <asm-generic/memory_model.h>
98#include <asm-generic/page.h> 97#include <asm-generic/page.h>
99 98
99#endif /* __KERNEL__ */
100#endif /* _ALPHA_PAGE_H */ 100#endif /* _ALPHA_PAGE_H */
diff --git a/include/asm-arm/arch-s3c2410/anubis-cpld.h b/include/asm-arm/arch-s3c2410/anubis-cpld.h
index 5675b1796b55..40e8e270d337 100644
--- a/include/asm-arm/arch-s3c2410/anubis-cpld.h
+++ b/include/asm-arm/arch-s3c2410/anubis-cpld.h
@@ -9,9 +9,6 @@
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 *
13 * Changelog:
14 *
15*/ 12*/
16 13
17#ifndef __ASM_ARCH_ANUBISCPLD_H 14#ifndef __ASM_ARCH_ANUBISCPLD_H
diff --git a/include/asm-arm/arch-s3c2410/anubis-irq.h b/include/asm-arm/arch-s3c2410/anubis-irq.h
index 82f15dbd97e8..4b5f423779df 100644
--- a/include/asm-arm/arch-s3c2410/anubis-irq.h
+++ b/include/asm-arm/arch-s3c2410/anubis-irq.h
@@ -9,9 +9,7 @@
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 * 12*/
13 * Changelog:
14 */
15 13
16#ifndef __ASM_ARCH_ANUBISIRQ_H 14#ifndef __ASM_ARCH_ANUBISIRQ_H
17#define __ASM_ARCH_ANUBISIRQ_H 15#define __ASM_ARCH_ANUBISIRQ_H
diff --git a/include/asm-arm/arch-s3c2410/anubis-map.h b/include/asm-arm/arch-s3c2410/anubis-map.h
index d529ffda8599..058a2104b035 100644
--- a/include/asm-arm/arch-s3c2410/anubis-map.h
+++ b/include/asm-arm/arch-s3c2410/anubis-map.h
@@ -9,8 +9,6 @@
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 *
13 * Changelog:
14*/ 12*/
15 13
16/* needs arch/map.h including with this */ 14/* needs arch/map.h including with this */
diff --git a/include/asm-arm/arch-s3c2410/audio.h b/include/asm-arm/arch-s3c2410/audio.h
index 0d276e67f2fb..7e0222276c98 100644
--- a/include/asm-arm/arch-s3c2410/audio.h
+++ b/include/asm-arm/arch-s3c2410/audio.h
@@ -9,10 +9,6 @@
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 *
13 * Changelog:
14 * 20-Nov-2004 BJD Created file
15 * 07-Mar-2005 BJD Added suspend/resume calls
16*/ 12*/
17 13
18#ifndef __ASM_ARCH_AUDIO_H 14#ifndef __ASM_ARCH_AUDIO_H
diff --git a/include/asm-arm/arch-s3c2410/bast-cpld.h b/include/asm-arm/arch-s3c2410/bast-cpld.h
index e28ca51a4975..8969cffe83fa 100644
--- a/include/asm-arm/arch-s3c2410/bast-cpld.h
+++ b/include/asm-arm/arch-s3c2410/bast-cpld.h
@@ -8,11 +8,6 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 *
12 * Changelog:
13 * 25-May-2003 BJD Created file, added CTRL1 registers
14 * 30-Aug-2004 BJD Updated definitions from 2.4.26 port
15 * 30-Aug-2004 BJD Added CTRL3 and CTRL4 definitions
16*/ 11*/
17 12
18#ifndef __ASM_ARCH_BASTCPLD_H 13#ifndef __ASM_ARCH_BASTCPLD_H
diff --git a/include/asm-arm/arch-s3c2410/bast-irq.h b/include/asm-arm/arch-s3c2410/bast-irq.h
index b79b47f0d126..15ffa66f5011 100644
--- a/include/asm-arm/arch-s3c2410/bast-irq.h
+++ b/include/asm-arm/arch-s3c2410/bast-irq.h
@@ -8,11 +8,7 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 * 11*/
12 * Changelog:
13 * 14-Sep-2004 BJD Fixed IRQ_USBOC definition
14 * 06-Jan-2003 BJD Linux 2.6.0 version
15 */
16 12
17#ifndef __ASM_ARCH_BASTIRQ_H 13#ifndef __ASM_ARCH_BASTIRQ_H
18#define __ASM_ARCH_BASTIRQ_H 14#define __ASM_ARCH_BASTIRQ_H
diff --git a/include/asm-arm/arch-s3c2410/bast-map.h b/include/asm-arm/arch-s3c2410/bast-map.h
index 29c07e302b04..727cef84c70e 100644
--- a/include/asm-arm/arch-s3c2410/bast-map.h
+++ b/include/asm-arm/arch-s3c2410/bast-map.h
@@ -8,10 +8,6 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 *
12 * Changelog:
13 * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics from arch/map.h
14 * 12-Mar-2004 BJD Fixed header include protection
15*/ 11*/
16 12
17/* needs arch/map.h including with this */ 13/* needs arch/map.h including with this */
diff --git a/include/asm-arm/arch-s3c2410/bast-pmu.h b/include/asm-arm/arch-s3c2410/bast-pmu.h
index 758c5c59d4bf..82836027f00f 100644
--- a/include/asm-arm/arch-s3c2410/bast-pmu.h
+++ b/include/asm-arm/arch-s3c2410/bast-pmu.h
@@ -9,9 +9,6 @@
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 *
13 * Changelog:
14 * 08-Oct-2003 BJD Initial creation
15*/ 12*/
16 13
17#ifndef __ASM_ARCH_BASTPMU_H 14#ifndef __ASM_ARCH_BASTPMU_H
diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S
index b7d15d125458..93064860e0e5 100644
--- a/include/asm-arm/arch-s3c2410/debug-macro.S
+++ b/include/asm-arm/arch-s3c2410/debug-macro.S
@@ -10,9 +10,6 @@
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as 11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 *
14 * Modifications:
15 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
16*/ 13*/
17 14
18#include <asm/arch/map.h> 15#include <asm/arch/map.h>
diff --git a/include/asm-arm/arch-s3c2410/dma.h b/include/asm-arm/arch-s3c2410/dma.h
index 7463fd5252ce..3661e465b0a5 100644
--- a/include/asm-arm/arch-s3c2410/dma.h
+++ b/include/asm-arm/arch-s3c2410/dma.h
@@ -1,18 +1,13 @@
1/* linux/include/asm-arm/arch-bast/dma.h 1/* linux/include/asm-arm/arch-s3c2410/dma.h
2 * 2 *
3 * Copyright (C) 2003,2004 Simtec Electronics 3 * Copyright (C) 2003,2004,2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
5 * 5 *
6 * Samsung S3C2410X DMA support 6 * Samsung S3C241XX DMA support
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 *
12 * Changelog:
13 * ??-May-2003 BJD Created file
14 * ??-Jun-2003 BJD Added more dma functionality to go with arch
15 * 10-Nov-2004 BJD Added sys_device support
16*/ 11*/
17 12
18#ifndef __ASM_ARCH_DMA_H 13#ifndef __ASM_ARCH_DMA_H
@@ -21,28 +16,26 @@
21#include <linux/sysdev.h> 16#include <linux/sysdev.h>
22#include "hardware.h" 17#include "hardware.h"
23 18
24
25/* 19/*
26 * This is the maximum DMA address(physical address) that can be DMAd to. 20 * This is the maximum DMA address(physical address) that can be DMAd to.
27 * 21 *
28 */ 22 */
29#define MAX_DMA_ADDRESS 0x20000000 23#define MAX_DMA_ADDRESS 0x40000000
30#define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */ 24#define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */
31 25
32
33/* we have 4 dma channels */ 26/* we have 4 dma channels */
34#define S3C2410_DMA_CHANNELS (4) 27#define S3C2410_DMA_CHANNELS (4)
35 28
36/* types */ 29/* types */
37 30
38typedef enum { 31enum s3c2410_dma_state {
39 S3C2410_DMA_IDLE, 32 S3C2410_DMA_IDLE,
40 S3C2410_DMA_RUNNING, 33 S3C2410_DMA_RUNNING,
41 S3C2410_DMA_PAUSED 34 S3C2410_DMA_PAUSED
42} s3c2410_dma_state_t; 35};
43 36
44 37
45/* s3c2410_dma_loadst_t 38/* enum s3c2410_dma_loadst
46 * 39 *
47 * This represents the state of the DMA engine, wrt to the loaded / running 40 * This represents the state of the DMA engine, wrt to the loaded / running
48 * transfers. Since we don't have any way of knowing exactly the state of 41 * transfers. Since we don't have any way of knowing exactly the state of
@@ -70,45 +63,40 @@ typedef enum {
70 * currently running. 63 * currently running.
71*/ 64*/
72 65
73typedef enum { 66enum s3c2410_dma_loadst {
74 S3C2410_DMALOAD_NONE, 67 S3C2410_DMALOAD_NONE,
75 S3C2410_DMALOAD_1LOADED, 68 S3C2410_DMALOAD_1LOADED,
76 S3C2410_DMALOAD_1RUNNING, 69 S3C2410_DMALOAD_1RUNNING,
77 S3C2410_DMALOAD_1LOADED_1RUNNING, 70 S3C2410_DMALOAD_1LOADED_1RUNNING,
78} s3c2410_dma_loadst_t; 71};
79 72
80typedef enum { 73enum s3c2410_dma_buffresult {
81 S3C2410_RES_OK, 74 S3C2410_RES_OK,
82 S3C2410_RES_ERR, 75 S3C2410_RES_ERR,
83 S3C2410_RES_ABORT 76 S3C2410_RES_ABORT
84} s3c2410_dma_buffresult_t; 77};
85
86
87typedef enum s3c2410_dmasrc_e s3c2410_dmasrc_t;
88 78
89enum s3c2410_dmasrc_e { 79enum s3c2410_dmasrc {
90 S3C2410_DMASRC_HW, /* source is memory */ 80 S3C2410_DMASRC_HW, /* source is memory */
91 S3C2410_DMASRC_MEM /* source is hardware */ 81 S3C2410_DMASRC_MEM /* source is hardware */
92}; 82};
93 83
94/* enum s3c2410_chan_op_e 84/* enum s3c2410_chan_op
95 * 85 *
96 * operation codes passed to the DMA code by the user, and also used 86 * operation codes passed to the DMA code by the user, and also used
97 * to inform the current channel owner of any changes to the system state 87 * to inform the current channel owner of any changes to the system state
98*/ 88*/
99 89
100enum s3c2410_chan_op_e { 90enum s3c2410_chan_op {
101 S3C2410_DMAOP_START, 91 S3C2410_DMAOP_START,
102 S3C2410_DMAOP_STOP, 92 S3C2410_DMAOP_STOP,
103 S3C2410_DMAOP_PAUSE, 93 S3C2410_DMAOP_PAUSE,
104 S3C2410_DMAOP_RESUME, 94 S3C2410_DMAOP_RESUME,
105 S3C2410_DMAOP_FLUSH, 95 S3C2410_DMAOP_FLUSH,
106 S3C2410_DMAOP_TIMEOUT, /* internal signal to handler */ 96 S3C2410_DMAOP_TIMEOUT, /* internal signal to handler */
107 S3C2410_DMAOP_STARTED, /* indicate channel started */ 97 S3C2410_DMAOP_STARTED, /* indicate channel started */
108}; 98};
109 99
110typedef enum s3c2410_chan_op_e s3c2410_chan_op_t;
111
112/* flags */ 100/* flags */
113 101
114#define S3C2410_DMAF_SLOW (1<<0) /* slow, so don't worry about 102#define S3C2410_DMAF_SLOW (1<<0) /* slow, so don't worry about
@@ -117,104 +105,100 @@ typedef enum s3c2410_chan_op_e s3c2410_chan_op_t;
117 105
118/* dma buffer */ 106/* dma buffer */
119 107
120typedef struct s3c2410_dma_buf_s s3c2410_dma_buf_t;
121
122struct s3c2410_dma_client { 108struct s3c2410_dma_client {
123 char *name; 109 char *name;
124}; 110};
125 111
126typedef struct s3c2410_dma_client s3c2410_dma_client_t;
127
128/* s3c2410_dma_buf_s 112/* s3c2410_dma_buf_s
129 * 113 *
130 * internally used buffer structure to describe a queued or running 114 * internally used buffer structure to describe a queued or running
131 * buffer. 115 * buffer.
132*/ 116*/
133 117
134struct s3c2410_dma_buf_s { 118struct s3c2410_dma_buf;
135 s3c2410_dma_buf_t *next; 119struct s3c2410_dma_buf {
136 int magic; /* magic */ 120 struct s3c2410_dma_buf *next;
137 int size; /* buffer size in bytes */ 121 int magic; /* magic */
138 dma_addr_t data; /* start of DMA data */ 122 int size; /* buffer size in bytes */
139 dma_addr_t ptr; /* where the DMA got to [1] */ 123 dma_addr_t data; /* start of DMA data */
140 void *id; /* client's id */ 124 dma_addr_t ptr; /* where the DMA got to [1] */
125 void *id; /* client's id */
141}; 126};
142 127
143/* [1] is this updated for both recv/send modes? */ 128/* [1] is this updated for both recv/send modes? */
144 129
145typedef struct s3c2410_dma_chan_s s3c2410_dma_chan_t; 130struct s3c2410_dma_chan;
146 131
147/* s3c2410_dma_cbfn_t 132/* s3c2410_dma_cbfn_t
148 * 133 *
149 * buffer callback routine type 134 * buffer callback routine type
150*/ 135*/
151 136
152typedef void (*s3c2410_dma_cbfn_t)(s3c2410_dma_chan_t *, void *buf, int size, 137typedef void (*s3c2410_dma_cbfn_t)(struct s3c2410_dma_chan *,
153 s3c2410_dma_buffresult_t result); 138 void *buf, int size,
139 enum s3c2410_dma_buffresult result);
154 140
155typedef int (*s3c2410_dma_opfn_t)(s3c2410_dma_chan_t *, 141typedef int (*s3c2410_dma_opfn_t)(struct s3c2410_dma_chan *,
156 s3c2410_chan_op_t ); 142 enum s3c2410_chan_op );
157 143
158struct s3c2410_dma_stats_s { 144struct s3c2410_dma_stats {
159 unsigned long loads; 145 unsigned long loads;
160 unsigned long timeout_longest; 146 unsigned long timeout_longest;
161 unsigned long timeout_shortest; 147 unsigned long timeout_shortest;
162 unsigned long timeout_avg; 148 unsigned long timeout_avg;
163 unsigned long timeout_failed; 149 unsigned long timeout_failed;
164}; 150};
165 151
166typedef struct s3c2410_dma_stats_s s3c2410_dma_stats_t; 152/* struct s3c2410_dma_chan
167
168/* struct s3c2410_dma_chan_s
169 * 153 *
170 * full state information for each DMA channel 154 * full state information for each DMA channel
171*/ 155*/
172 156
173struct s3c2410_dma_chan_s { 157struct s3c2410_dma_chan {
174 /* channel state flags and information */ 158 /* channel state flags and information */
175 unsigned char number; /* number of this dma channel */ 159 unsigned char number; /* number of this dma channel */
176 unsigned char in_use; /* channel allocated */ 160 unsigned char in_use; /* channel allocated */
177 unsigned char irq_claimed; /* irq claimed for channel */ 161 unsigned char irq_claimed; /* irq claimed for channel */
178 unsigned char irq_enabled; /* irq enabled for channel */ 162 unsigned char irq_enabled; /* irq enabled for channel */
179 unsigned char xfer_unit; /* size of an transfer */ 163 unsigned char xfer_unit; /* size of an transfer */
180 164
181 /* channel state */ 165 /* channel state */
182 166
183 s3c2410_dma_state_t state; 167 enum s3c2410_dma_state state;
184 s3c2410_dma_loadst_t load_state; 168 enum s3c2410_dma_loadst load_state;
185 s3c2410_dma_client_t *client; 169 struct s3c2410_dma_client *client;
186 170
187 /* channel configuration */ 171 /* channel configuration */
188 s3c2410_dmasrc_t source; 172 enum s3c2410_dmasrc source;
189 unsigned long dev_addr; 173 unsigned long dev_addr;
190 unsigned long load_timeout; 174 unsigned long load_timeout;
191 unsigned int flags; /* channel flags */ 175 unsigned int flags; /* channel flags */
192 176
193 /* channel's hardware position and configuration */ 177 /* channel's hardware position and configuration */
194 void __iomem *regs; /* channels registers */ 178 void __iomem *regs; /* channels registers */
195 void __iomem *addr_reg; /* data address register */ 179 void __iomem *addr_reg; /* data address register */
196 unsigned int irq; /* channel irq */ 180 unsigned int irq; /* channel irq */
197 unsigned long dcon; /* default value of DCON */ 181 unsigned long dcon; /* default value of DCON */
198 182
199 /* driver handles */ 183 /* driver handles */
200 s3c2410_dma_cbfn_t callback_fn; /* buffer done callback */ 184 s3c2410_dma_cbfn_t callback_fn; /* buffer done callback */
201 s3c2410_dma_opfn_t op_fn; /* channel operation callback */ 185 s3c2410_dma_opfn_t op_fn; /* channel op callback */
202 186
203 /* stats gathering */ 187 /* stats gathering */
204 s3c2410_dma_stats_t *stats; 188 struct s3c2410_dma_stats *stats;
205 s3c2410_dma_stats_t stats_store; 189 struct s3c2410_dma_stats stats_store;
206 190
207 /* buffer list and information */ 191 /* buffer list and information */
208 s3c2410_dma_buf_t *curr; /* current dma buffer */ 192 struct s3c2410_dma_buf *curr; /* current dma buffer */
209 s3c2410_dma_buf_t *next; /* next buffer to load */ 193 struct s3c2410_dma_buf *next; /* next buffer to load */
210 s3c2410_dma_buf_t *end; /* end of queue */ 194 struct s3c2410_dma_buf *end; /* end of queue */
211 195
212 /* system device */ 196 /* system device */
213 struct sys_device dev; 197 struct sys_device dev;
214}; 198};
215 199
216/* the currently allocated channel information */ 200/* the currently allocated channel information */
217extern s3c2410_dma_chan_t s3c2410_chans[]; 201extern struct s3c2410_dma_chan s3c2410_chans[];
218 202
219/* note, we don't really use dma_device_t at the moment */ 203/* note, we don't really use dma_device_t at the moment */
220typedef unsigned long dma_device_t; 204typedef unsigned long dma_device_t;
@@ -227,7 +211,7 @@ typedef unsigned long dma_device_t;
227*/ 211*/
228 212
229extern int s3c2410_dma_request(dmach_t channel, 213extern int s3c2410_dma_request(dmach_t channel,
230 s3c2410_dma_client_t *, void *dev); 214 struct s3c2410_dma_client *, void *dev);
231 215
232 216
233/* s3c2410_dma_ctrl 217/* s3c2410_dma_ctrl
@@ -235,7 +219,7 @@ extern int s3c2410_dma_request(dmach_t channel,
235 * change the state of the dma channel 219 * change the state of the dma channel
236*/ 220*/
237 221
238extern int s3c2410_dma_ctrl(dmach_t channel, s3c2410_chan_op_t op); 222extern int s3c2410_dma_ctrl(dmach_t channel, enum s3c2410_chan_op op);
239 223
240/* s3c2410_dma_setflags 224/* s3c2410_dma_setflags
241 * 225 *
@@ -250,7 +234,7 @@ extern int s3c2410_dma_setflags(dmach_t channel,
250 * free the dma channel (will also abort any outstanding operations) 234 * free the dma channel (will also abort any outstanding operations)
251*/ 235*/
252 236
253extern int s3c2410_dma_free(dmach_t channel, s3c2410_dma_client_t *); 237extern int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *);
254 238
255/* s3c2410_dma_enqueue 239/* s3c2410_dma_enqueue
256 * 240 *
@@ -274,7 +258,7 @@ extern int s3c2410_dma_config(dmach_t channel, int xferunit, int dcon);
274 * configure the device we're talking to 258 * configure the device we're talking to
275*/ 259*/
276 260
277extern int s3c2410_dma_devconfig(int channel, s3c2410_dmasrc_t source, 261extern int s3c2410_dma_devconfig(int channel, enum s3c2410_dmasrc source,
278 int hwcfg, unsigned long devaddr); 262 int hwcfg, unsigned long devaddr);
279 263
280/* s3c2410_dma_getposition 264/* s3c2410_dma_getposition
diff --git a/include/asm-arm/arch-s3c2410/fb.h b/include/asm-arm/arch-s3c2410/fb.h
index 4790491ba9d0..71161797bc89 100644
--- a/include/asm-arm/arch-s3c2410/fb.h
+++ b/include/asm-arm/arch-s3c2410/fb.h
@@ -7,13 +7,6 @@
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as 8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 *
11 *
12 * Changelog:
13 * 07-Sep-2004 RTP Created file
14 * 03-Nov-2004 BJD Updated and minor cleanups
15 * 03-Aug-2005 RTP Renamed to fb.h
16 * 26-Oct-2005 BJD Changed name of platdata init
17*/ 10*/
18 11
19#ifndef __ASM_ARM_FB_H 12#ifndef __ASM_ARM_FB_H
diff --git a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h
index a2330bf83695..871f8af09b8b 100644
--- a/include/asm-arm/arch-s3c2410/hardware.h
+++ b/include/asm-arm/arch-s3c2410/hardware.h
@@ -8,16 +8,6 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 *
12 * Changelog:
13 * 21-May-2003 BJD Created file
14 * 06-Jun-2003 BJD Added CPU frequency settings
15 * 03-Sep-2003 BJD Linux v2.6 support
16 * 12-Mar-2004 BJD Fixed include protection, fixed type of clock vars
17 * 14-Sep-2004 BJD Added misccr and getpin to gpio
18 * 01-Oct-2004 BJD Added the new gpio functions
19 * 16-Oct-2004 BJD Removed the clock variables
20 * 15-Jan-2006 LCVR Added s3c2400_gpio_getirq()
21*/ 11*/
22 12
23#ifndef __ASM_ARCH_HARDWARE_H 13#ifndef __ASM_ARCH_HARDWARE_H
diff --git a/include/asm-arm/arch-s3c2410/idle.h b/include/asm-arm/arch-s3c2410/idle.h
index 749227c09576..eed450608f9c 100644
--- a/include/asm-arm/arch-s3c2410/idle.h
+++ b/include/asm-arm/arch-s3c2410/idle.h
@@ -8,10 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 * S3C2410 CPU Idle controls 10 * S3C2410 CPU Idle controls
11 *
12 * Changelog:
13 * 28-Oct-2004 BJD Initial version
14 *
15*/ 11*/
16 12
17#ifndef __ASM_ARCH_IDLE_H 13#ifndef __ASM_ARCH_IDLE_H
diff --git a/include/asm-arm/arch-s3c2410/iic.h b/include/asm-arm/arch-s3c2410/iic.h
index 518547f6d7a7..ed3d6c7bf6d7 100644
--- a/include/asm-arm/arch-s3c2410/iic.h
+++ b/include/asm-arm/arch-s3c2410/iic.h
@@ -8,10 +8,6 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 *
12 * Changelog:
13 * 05-Oct-2004 BJD Created file
14 * 19-Oct-2004 BJD Updated for s3c2440
15*/ 11*/
16 12
17#ifndef __ASM_ARCH_IIC_H 13#ifndef __ASM_ARCH_IIC_H
diff --git a/include/asm-arm/arch-s3c2410/io.h b/include/asm-arm/arch-s3c2410/io.h
index 16fbc8afffd9..6b35a4f2630e 100644
--- a/include/asm-arm/arch-s3c2410/io.h
+++ b/include/asm-arm/arch-s3c2410/io.h
@@ -4,13 +4,7 @@
4 * 4 *
5 * Copyright (C) 1997 Russell King 5 * Copyright (C) 1997 Russell King
6 * (C) 2003 Simtec Electronics 6 * (C) 2003 Simtec Electronics
7 * 7*/
8 * Modifications:
9 * 06-Dec-1997 RMK Created.
10 * 02-Sep-2003 BJD Modified for S3C2410
11 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
12 * 13-Oct-2005 BJD Fixed problems with LDRH/STRH offset range
13 */
14 8
15#ifndef __ASM_ARM_ARCH_IO_H 9#ifndef __ASM_ARM_ARCH_IO_H
16#define __ASM_ARM_ARCH_IO_H 10#define __ASM_ARM_ARCH_IO_H
diff --git a/include/asm-arm/arch-s3c2410/irqs.h b/include/asm-arm/arch-s3c2410/irqs.h
index d9773d697268..39a69829d163 100644
--- a/include/asm-arm/arch-s3c2410/irqs.h
+++ b/include/asm-arm/arch-s3c2410/irqs.h
@@ -6,14 +6,7 @@
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9*/
10 * Changelog:
11 * 12-May-2003 BJD Created file
12 * 08-Jan-2003 BJD Linux 2.6.0 version, moved BAST bits out
13 * 12-Mar-2004 BJD Fixed bug in header protection
14 * 10-Feb-2005 BJD Added camera IRQ from guillaume.gourat@nexvision.tv
15 * 28-Feb-2005 BJD Updated s3c2440 IRQs
16 */
17 10
18 11
19#ifndef __ASM_ARCH_IRQS_H 12#ifndef __ASM_ARCH_IRQS_H
diff --git a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h
index fae2766ff32b..27ba0ac3fdd5 100644
--- a/include/asm-arm/arch-s3c2410/map.h
+++ b/include/asm-arm/arch-s3c2410/map.h
@@ -8,13 +8,6 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 *
12 * Changelog:
13 * 12-May-2003 BJD Created file
14 * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics out
15 * 10-Feb-2005 BJD Added CAMIF definition from guillaume.gourat@nexvision.tv
16 * 10-Mar-2005 LCVR Added support to S3C2400, changed {VA,SZ} names
17 * 15-Jan-2006 LCVR Added S3C24XX_PA macros for common S3C24XX resources
18*/ 11*/
19 12
20#ifndef __ASM_ARCH_MAP_H 13#ifndef __ASM_ARCH_MAP_H
diff --git a/include/asm-arm/arch-s3c2410/memory.h b/include/asm-arm/arch-s3c2410/memory.h
index 6ab834a14c8e..4be6a74c4303 100644
--- a/include/asm-arm/arch-s3c2410/memory.h
+++ b/include/asm-arm/arch-s3c2410/memory.h
@@ -1,6 +1,4 @@
1/* 1/* linux/include/asm-arm/arch-s3c2410/memory.h
2 * linux/include/asm-arm/arch-s3c2410/memory.h
3 *
4 * from linux/include/asm-arm/arch-rpc/memory.h 2 * from linux/include/asm-arm/arch-rpc/memory.h
5 * 3 *
6 * Copyright (C) 1996,1997,1998 Russell King. 4 * Copyright (C) 1996,1997,1998 Russell King.
@@ -8,16 +6,6 @@
8 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
11 *
12 * Changelog:
13 * 20-Oct-1996 RMK Created
14 * 31-Dec-1997 RMK Fixed definitions to reduce warnings
15 * 11-Jan-1998 RMK Uninlined to reduce hits on cache
16 * 08-Feb-1998 RMK Added __virt_to_bus and __bus_to_virt
17 * 21-Mar-1999 RMK Renamed to memory.h
18 * RMK Added TASK_SIZE and PAGE_OFFSET
19 * 05-Apr-2004 BJD Copied and altered for arch-s3c2410
20 * 17-Mar-2005 LCVR Modified for S3C2400
21*/ 9*/
22 10
23#ifndef __ASM_ARCH_MEMORY_H 11#ifndef __ASM_ARCH_MEMORY_H
diff --git a/include/asm-arm/arch-s3c2410/nand.h b/include/asm-arm/arch-s3c2410/nand.h
index 9148ac045b0d..e350ae2acfc6 100644
--- a/include/asm-arm/arch-s3c2410/nand.h
+++ b/include/asm-arm/arch-s3c2410/nand.h
@@ -8,9 +8,6 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 *
12 * Changelog:
13 * 23-Sep-2004 BJD Created file
14*/ 11*/
15 12
16/* struct s3c2410_nand_set 13/* struct s3c2410_nand_set
diff --git a/include/asm-arm/arch-s3c2410/osiris-map.h b/include/asm-arm/arch-s3c2410/osiris-map.h
index 7c4b0cd2d14d..e2d406218ae5 100644
--- a/include/asm-arm/arch-s3c2410/osiris-map.h
+++ b/include/asm-arm/arch-s3c2410/osiris-map.h
@@ -9,8 +9,6 @@
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 *
13 * Changelog:
14*/ 12*/
15 13
16/* needs arch/map.h including with this */ 14/* needs arch/map.h including with this */
diff --git a/include/asm-arm/arch-s3c2410/regs-adc.h b/include/asm-arm/arch-s3c2410/regs-adc.h
index 15bfc2f5754e..c7b90b3ecc9e 100644
--- a/include/asm-arm/arch-s3c2410/regs-adc.h
+++ b/include/asm-arm/arch-s3c2410/regs-adc.h
@@ -7,9 +7,6 @@
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * S3C2410 ADC registers 9 * S3C2410 ADC registers
10 *
11 * Changelog:
12 * 27-09-2004 SAH Created file
13*/ 10*/
14 11
15#ifndef __ASM_ARCH_REGS_ADC_H 12#ifndef __ASM_ARCH_REGS_ADC_H
diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h
index a7c61feb8433..b2f4690c0791 100644
--- a/include/asm-arm/arch-s3c2410/regs-clock.h
+++ b/include/asm-arm/arch-s3c2410/regs-clock.h
@@ -8,18 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 * S3C2410 clock register definitions 10 * S3C2410 clock register definitions
11 *
12 * Changelog:
13 * 18-Aug-2004 Ben Dooks Added 2440 definitions
14 * 08-Aug-2004 Herbert Pötzl Added CLKCON definitions
15 * 19-06-2003 Ben Dooks Created file
16 * 12-03-2004 Ben Dooks Updated include protection
17 * 29-Sep-2004 Ben Dooks Fixed usage for assembly inclusion
18 * 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat)
19 * 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA
20 * 27-Aug-2005 Ben Dooks Add clock-slow info
21 * 20-Oct-2005 Ben Dooks Fixed overflow in PLL (Guillaume Gourat)
22 * 20-Oct-2005 Ben Dooks Add masks for DCLK (Guillaume Gourat)
23*/ 11*/
24 12
25#ifndef __ASM_ARM_REGS_CLOCK 13#ifndef __ASM_ARM_REGS_CLOCK
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h
index 6dd17f0f84e0..93c49432db95 100644
--- a/include/asm-arm/arch-s3c2410/regs-gpio.h
+++ b/include/asm-arm/arch-s3c2410/regs-gpio.h
@@ -8,21 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 * S3C2410 GPIO register definitions 10 * S3C2410 GPIO register definitions
11 *
12 * Changelog:
13 * 19-06-2003 BJD Created file
14 * 23-06-2003 BJD Updated GSTATUS registers
15 * 12-03-2004 BJD Updated include protection
16 * 20-07-2004 BJD Added GPIO pin numbers, added Port A definitions
17 * 04-10-2004 BJD Fixed number of bugs, added EXT IRQ filter defs
18 * 17-10-2004 BJD Added GSTATUS1 register definitions
19 * 18-11-2004 BJD Fixed definitions of GPE3, GPE4, GPE5 and GPE6
20 * 18-11-2004 BJD Added S3C2440 AC97 controls
21 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
22 * 28-Mar-2005 LCVR Fixed definition of GPB10
23 * 26-Oct-2005 BJD Added generic configuration types
24 * 27-Nov-2005 LCVR Added definitions to S3C2400 registers
25 * 15-Jan-2006 LCVR Written S3C24XX_GPIO_BASE() macro
26*/ 11*/
27 12
28 13
diff --git a/include/asm-arm/arch-s3c2410/regs-gpioj.h b/include/asm-arm/arch-s3c2410/regs-gpioj.h
index 18edae50d0b8..91cefa260497 100644
--- a/include/asm-arm/arch-s3c2410/regs-gpioj.h
+++ b/include/asm-arm/arch-s3c2410/regs-gpioj.h
@@ -8,10 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 * S3C2440 GPIO J register definitions 10 * S3C2440 GPIO J register definitions
11 *
12 * Changelog:
13 * 11-Aug-2004 BJD Created file
14 * 10-Feb-2005 BJD Fix GPJ12 definition (Guillaume Gourat)
15*/ 11*/
16 12
17 13
diff --git a/include/asm-arm/arch-s3c2410/regs-iic.h b/include/asm-arm/arch-s3c2410/regs-iic.h
index fed3288e2046..2ae29522f253 100644
--- a/include/asm-arm/arch-s3c2410/regs-iic.h
+++ b/include/asm-arm/arch-s3c2410/regs-iic.h
@@ -8,10 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 * S3C2410 I2C Controller 10 * S3C2410 I2C Controller
11 *
12 * Changelog:
13 * 03-Oct-2004 BJD Initial include for Linux
14 * 08-Nov-2004 BJD Added S3C2440 filter register
15*/ 11*/
16 12
17#ifndef __ASM_ARCH_REGS_IIC_H 13#ifndef __ASM_ARCH_REGS_IIC_H
diff --git a/include/asm-arm/arch-s3c2410/regs-iis.h b/include/asm-arm/arch-s3c2410/regs-iis.h
index 7fdde9b91cb4..72cd2509822e 100644
--- a/include/asm-arm/arch-s3c2410/regs-iis.h
+++ b/include/asm-arm/arch-s3c2410/regs-iis.h
@@ -8,17 +8,7 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 * S3C2410 IIS register definition 10 * S3C2410 IIS register definition
11 * 11*/
12 * Changelog:
13 * 19-06-2003 BJD Created file
14 * 26-06-2003 BJD Finished off definitions for register addresses
15 * 12-03-2004 BJD Updated include protection
16 * 07-03-2005 BJD Added FIFO size flags and S3C2440 MPLL
17 * 05-04-2005 LCVR Added IISFCON definitions for the S3C2400
18 * 18-07-2005 DA Change IISCON_MPLL to IISMOD_MPLL
19 * Correct IISMOD_256FS and IISMOD_384FS
20 * Add IISCON_PSCEN
21 */
22 12
23#ifndef __ASM_ARCH_REGS_IIS_H 13#ifndef __ASM_ARCH_REGS_IIS_H
24#define __ASM_ARCH_REGS_IIS_H 14#define __ASM_ARCH_REGS_IIS_H
diff --git a/include/asm-arm/arch-s3c2410/regs-irq.h b/include/asm-arm/arch-s3c2410/regs-irq.h
index 572fca5d9acf..29fb8ef670f0 100644
--- a/include/asm-arm/arch-s3c2410/regs-irq.h
+++ b/include/asm-arm/arch-s3c2410/regs-irq.h
@@ -6,14 +6,7 @@
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9*/
10 *
11 *
12 * Changelog:
13 * 19-06-2003 BJD Created file
14 * 12-03-2004 BJD Updated include protection
15 * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
16 */
17 10
18 11
19#ifndef ___ASM_ARCH_REGS_IRQ_H 12#ifndef ___ASM_ARCH_REGS_IRQ_H
diff --git a/include/asm-arm/arch-s3c2410/regs-lcd.h b/include/asm-arm/arch-s3c2410/regs-lcd.h
index b6b1b4e8bbeb..b306d6e3135d 100644
--- a/include/asm-arm/arch-s3c2410/regs-lcd.h
+++ b/include/asm-arm/arch-s3c2410/regs-lcd.h
@@ -6,14 +6,6 @@
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 *
10 *
11 *
12 * Changelog:
13 * 12-06-2003 BJD Created file
14 * 26-06-2003 BJD Updated LCDCON register definitions
15 * 12-03-2004 BJD Updated include protection
16 * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
17*/ 9*/
18 10
19 11
diff --git a/include/asm-arm/arch-s3c2410/regs-mem.h b/include/asm-arm/arch-s3c2410/regs-mem.h
index a2d7d0cec042..375dca50364e 100644
--- a/include/asm-arm/arch-s3c2410/regs-mem.h
+++ b/include/asm-arm/arch-s3c2410/regs-mem.h
@@ -8,12 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 * S3C2410 Memory Control register definitions 10 * S3C2410 Memory Control register definitions
11 *
12 * Changelog:
13 * 29-Sep-2004 BJD Initial include for Linux
14 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
15 * 04-Apr-2005 LCVR Added S3C2400 DRAM/BANKSIZE_MASK definitions
16 *
17*/ 11*/
18 12
19#ifndef __ASM_ARM_MEMREGS_H 13#ifndef __ASM_ARM_MEMREGS_H
diff --git a/include/asm-arm/arch-s3c2410/regs-nand.h b/include/asm-arm/arch-s3c2410/regs-nand.h
index c1470c695c33..b824d371ae0b 100644
--- a/include/asm-arm/arch-s3c2410/regs-nand.h
+++ b/include/asm-arm/arch-s3c2410/regs-nand.h
@@ -8,10 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 * S3C2410 NAND register definitions 10 * S3C2410 NAND register definitions
11 *
12 * Changelog:
13 * 18-Aug-2004 BJD Copied file from 2.4 and updated
14 * 01-May-2005 BJD Added definitions for s3c2440 controller
15*/ 11*/
16 12
17#ifndef __ASM_ARM_REGS_NAND 13#ifndef __ASM_ARM_REGS_NAND
diff --git a/include/asm-arm/arch-s3c2410/regs-power.h b/include/asm-arm/arch-s3c2410/regs-power.h
new file mode 100644
index 000000000000..6c319ea2afac
--- /dev/null
+++ b/include/asm-arm/arch-s3c2410/regs-power.h
@@ -0,0 +1,34 @@
1/* linux/include/asm/arch-s3c2410/regs-power.h
2 *
3 * Copyright (c) 2003,2004,2005,2006 Simtec Electronics <linux@simtec.co.uk>
4 * http://armlinux.simtec.co.uk/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C24XX power control register definitions
11*/
12
13#ifndef __ASM_ARM_REGS_PWR
14#define __ASM_ARM_REGS_PWR __FILE__
15
16#define S3C24XX_PWRREG(x) ((x) + S3C24XX_VA_CLKPWR)
17
18#define S3C2412_PWRMODECON S3C24XX_PWRREG(0x20)
19#define S3C2412_PWRCFG S3C24XX_PWRREG(0x24)
20
21#define S3C2412_PWRCFG_BATF_IGNORE (0<<0)
22#define S3C2412_PWRCFG_BATF_SLEEP (3<<0)
23#define S3C2412_PWRCFG_BATF_MASK (3<<0)
24
25#define S3C2412_PWRCFG_STANDBYWFI_IGNORE (0<<6)
26#define S3C2412_PWRCFG_STANDBYWFI_IDLE (1<<6)
27#define S3C2412_PWRCFG_STANDBYWFI_STOP (2<<6)
28#define S3C2412_PWRCFG_STANDBYWFI_SLEEP (3<<6)
29#define S3C2412_PWRCFG_STANDBYWFI_MASK (3<<6)
30
31#define S3C2412_PWRCFG_RTC_MASKIRQ (1<<8)
32#define S3C2412_PWRCFG_NAND_NORST (1<<9)
33
34#endif /* __ASM_ARM_REGS_PWR */
diff --git a/include/asm-arm/arch-s3c2410/regs-rtc.h b/include/asm-arm/arch-s3c2410/regs-rtc.h
index 0fbec07bb6b8..cd88fd634d12 100644
--- a/include/asm-arm/arch-s3c2410/regs-rtc.h
+++ b/include/asm-arm/arch-s3c2410/regs-rtc.h
@@ -8,11 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 * S3C2410 Internal RTC register definition 10 * S3C2410 Internal RTC register definition
11 *
12 * Changelog:
13 * 19-06-2003 BJD Created file
14 * 12-03-2004 BJD Updated include protection
15 * 15-01-2005 LCVR Changed S3C2410_VA to S3C24XX_VA (s3c2400 support)
16*/ 11*/
17 12
18#ifndef __ASM_ARCH_REGS_RTC_H 13#ifndef __ASM_ARCH_REGS_RTC_H
diff --git a/include/asm-arm/arch-s3c2410/regs-sdi.h b/include/asm-arm/arch-s3c2410/regs-sdi.h
index ca9a26fbecec..06e716e5b46d 100644
--- a/include/asm-arm/arch-s3c2410/regs-sdi.h
+++ b/include/asm-arm/arch-s3c2410/regs-sdi.h
@@ -8,11 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 * S3C2410 MMC/SDIO register definitions 10 * S3C2410 MMC/SDIO register definitions
11 *
12 * Changelog:
13 * 18-Aug-2004 Ben Dooks Created initial file
14 * 29-Nov-2004 Koen Martens Added some missing defines, fixed duplicates
15 * 29-Nov-2004 Ben Dooks Updated Koen's patch
16*/ 11*/
17 12
18#ifndef __ASM_ARM_REGS_SDI 13#ifndef __ASM_ARM_REGS_SDI
diff --git a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h
index 93f651ae2967..19c77da9c3fe 100644
--- a/include/asm-arm/arch-s3c2410/regs-serial.h
+++ b/include/asm-arm/arch-s3c2410/regs-serial.h
@@ -27,10 +27,7 @@
27 * You should have received a copy of the GNU General Public License 27 * You should have received a copy of the GNU General Public License
28 * along with this program; if not, write to the Free Software 28 * along with this program; if not, write to the Free Software
29 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 29 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30 * 30*/
31 * Modifications:
32 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA (s3c2400 support)
33 */
34 31
35#ifndef __ASM_ARM_REGS_SERIAL_H 32#ifndef __ASM_ARM_REGS_SERIAL_H
36#define __ASM_ARM_REGS_SERIAL_H 33#define __ASM_ARM_REGS_SERIAL_H
diff --git a/include/asm-arm/arch-s3c2410/regs-spi.h b/include/asm-arm/arch-s3c2410/regs-spi.h
index 338217858c73..3552280d1e8f 100644
--- a/include/asm-arm/arch-s3c2410/regs-spi.h
+++ b/include/asm-arm/arch-s3c2410/regs-spi.h
@@ -7,13 +7,7 @@
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * S3C2410 SPI register definition 9 * S3C2410 SPI register definition
10 * 10*/
11 * Changelog:
12 * 20-04-2004 KF Created file
13 * 04-10-2004 BJD Removed VA address (no longer mapped)
14 * tidied file for submission
15 * 03-04-2005 LCVR Added S3C2400_SPPIN_nCS definition
16 */
17 11
18#ifndef __ASM_ARCH_REGS_SPI_H 12#ifndef __ASM_ARCH_REGS_SPI_H
19#define __ASM_ARCH_REGS_SPI_H 13#define __ASM_ARCH_REGS_SPI_H
diff --git a/include/asm-arm/arch-s3c2410/regs-timer.h b/include/asm-arm/arch-s3c2410/regs-timer.h
index 169064e27520..731918e77831 100644
--- a/include/asm-arm/arch-s3c2410/regs-timer.h
+++ b/include/asm-arm/arch-s3c2410/regs-timer.h
@@ -8,13 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 * S3C2410 Timer configuration 10 * S3C2410 Timer configuration
11 *
12 * Changelog:
13 * 05-06-2003 BJD Created file
14 * 26-06-2003 BJD Added more timer definitions to mux / control
15 * 12-03-2004 BJD Updated include protection
16 * 10-02-2005 BJD Added S3C2410_TCFG1_MUX4_SHIFT (Guillaume Gourat)
17 * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
18*/ 11*/
19 12
20 13
diff --git a/include/asm-arm/arch-s3c2410/regs-udc.h b/include/asm-arm/arch-s3c2410/regs-udc.h
index bf315b763252..3aa31a27da1a 100644
--- a/include/asm-arm/arch-s3c2410/regs-udc.h
+++ b/include/asm-arm/arch-s3c2410/regs-udc.h
@@ -6,13 +6,7 @@
6 * modify it under the terms of the GNU General Public License as 6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of 7 * published by the Free Software Foundation; either version 2 of
8 * the License, or (at your option) any later version. 8 * the License, or (at your option) any later version.
9 * 9*/
10 * Changelog:
11 * 01-08-2004 Initial creation
12 * 12-09-2004 Cleanup for submission
13 * 24-10-2004 Fixed S3C2410_UDC_MAXP_REG definition
14 * 10-03-2005 Changed S3C2410_VA to S3C24XX_VA
15 */
16 10
17#ifndef __ASM_ARCH_REGS_UDC_H 11#ifndef __ASM_ARCH_REGS_UDC_H
18#define __ASM_ARCH_REGS_UDC_H 12#define __ASM_ARCH_REGS_UDC_H
diff --git a/include/asm-arm/arch-s3c2410/regs-watchdog.h b/include/asm-arm/arch-s3c2410/regs-watchdog.h
index d199ca6aff22..f4fff448c7bd 100644
--- a/include/asm-arm/arch-s3c2410/regs-watchdog.h
+++ b/include/asm-arm/arch-s3c2410/regs-watchdog.h
@@ -1,4 +1,4 @@
1/* linux/include/asm/arch-s3c2410/regs0watchdog.h 1/* linux/include/asm/arch-s3c2410/regs-watchdog.h
2 * 2 *
3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> 3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/ 4 * http://www.simtec.co.uk/products/SWLINUX/
@@ -8,11 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 * S3C2410 Watchdog timer control 10 * S3C2410 Watchdog timer control
11 *
12 * Changelog:
13 * 21-06-2003 BJD Created file
14 * 12-03-2004 BJD Updated include protection
15 * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
16*/ 11*/
17 12
18 13
diff --git a/include/asm-arm/arch-s3c2410/system.h b/include/asm-arm/arch-s3c2410/system.h
index 9b0d85024cb4..718246d85952 100644
--- a/include/asm-arm/arch-s3c2410/system.h
+++ b/include/asm-arm/arch-s3c2410/system.h
@@ -8,14 +8,7 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 * 11*/
12 * Changelog:
13 * 12-May-2003 BJD Created file
14 * 14-May-2003 BJD Removed idle to aid debugging
15 * 12-Jun-2003 BJD Added reset via watchdog
16 * 04-Sep-2003 BJD Moved to v2.6
17 * 28-Oct-2004 BJD Added over-ride for idle, and fixed reset panic()
18 */
19 12
20#include <asm/hardware.h> 13#include <asm/hardware.h>
21#include <asm/io.h> 14#include <asm/io.h>
diff --git a/include/asm-arm/arch-s3c2410/timex.h b/include/asm-arm/arch-s3c2410/timex.h
index 3558a3a750bf..703c337c5617 100644
--- a/include/asm-arm/arch-s3c2410/timex.h
+++ b/include/asm-arm/arch-s3c2410/timex.h
@@ -8,12 +8,6 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 *
12 * Changelog:
13 * 02-Sep-2003 BJD Created file
14 * 05-Jan-2004 BJD Updated for Linux 2.6.0
15 * 22-Nov-2004 BJD Fixed CLOCK_TICK_RATE
16 * 10-Jan-2004 BJD Removed s3c2410_clock_tick_rate
17*/ 11*/
18 12
19#ifndef __ASM_ARCH_TIMEX_H 13#ifndef __ASM_ARCH_TIMEX_H
diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h
index 8e152a05e533..81b3e91c56ab 100644
--- a/include/asm-arm/arch-s3c2410/uncompress.h
+++ b/include/asm-arm/arch-s3c2410/uncompress.h
@@ -8,15 +8,6 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 *
12 * Changelog:
13 * 22-May-2003 BJD Created
14 * 08-Sep-2003 BJD Moved to linux v2.6
15 * 12-Mar-2004 BJD Updated header protection
16 * 12-Oct-2004 BJD Take account of debug uart configuration
17 * 15-Nov-2004 BJD Fixed uart configuration
18 * 22-Feb-2005 BJD Added watchdog to uncompress
19 * 04-Apr-2005 LCVR Added support to S3C2400 (no cpuid at GSTATUS1)
20*/ 11*/
21 12
22#ifndef __ASM_ARCH_UNCOMPRESS_H 13#ifndef __ASM_ARCH_UNCOMPRESS_H
diff --git a/include/asm-arm/arch-s3c2410/usb-control.h b/include/asm-arm/arch-s3c2410/usb-control.h
index bd43b566db3e..35723569a17a 100644
--- a/include/asm-arm/arch-s3c2410/usb-control.h
+++ b/include/asm-arm/arch-s3c2410/usb-control.h
@@ -8,11 +8,6 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 *
12 * Changelog:
13 * 11-Sep-2004 BJD Created file
14 * 21-Sep-2004 BJD Updated port info
15 * 09-Aug-2005 BJD Renamed s3c2410_report_oc s3c2410_usb_report_oc
16*/ 11*/
17 12
18#ifndef __ASM_ARCH_USBCONTROL_H 13#ifndef __ASM_ARCH_USBCONTROL_H
diff --git a/include/asm-arm/arch-s3c2410/vmalloc.h b/include/asm-arm/arch-s3c2410/vmalloc.h
index 33963cd5461b..0ae3bdb7e03b 100644
--- a/include/asm-arm/arch-s3c2410/vmalloc.h
+++ b/include/asm-arm/arch-s3c2410/vmalloc.h
@@ -10,11 +10,7 @@
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 * 11 *
12 * S3C2410 vmalloc definition 12 * S3C2410 vmalloc definition
13 * 13*/
14 * Changelog:
15 * 12-Mar-2004 BJD Fixed header, added include protection
16 * 12=Mar-2004 BJD Fixed VMALLOC_END definitions
17 */
18 14
19#ifndef __ASM_ARCH_VMALLOC_H 15#ifndef __ASM_ARCH_VMALLOC_H
20#define __ASM_ARCH_VMALLOC_H 16#define __ASM_ARCH_VMALLOC_H
diff --git a/include/asm-arm/arch-s3c2410/vr1000-cpld.h b/include/asm-arm/arch-s3c2410/vr1000-cpld.h
index 0ee373ac60d4..a341b1e1bd98 100644
--- a/include/asm-arm/arch-s3c2410/vr1000-cpld.h
+++ b/include/asm-arm/arch-s3c2410/vr1000-cpld.h
@@ -8,10 +8,6 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 *
12 * Changelog:
13 * 25-May-2003 BJD Created file, added CTRL1 registers
14 * 19-Mar-2004 BJD Added VR1000 CPLD definitions
15*/ 11*/
16 12
17#ifndef __ASM_ARCH_VR1000CPLD_H 13#ifndef __ASM_ARCH_VR1000CPLD_H
diff --git a/include/asm-arm/arch-s3c2410/vr1000-irq.h b/include/asm-arm/arch-s3c2410/vr1000-irq.h
index 694f7715d2da..c39a0ffa670d 100644
--- a/include/asm-arm/arch-s3c2410/vr1000-irq.h
+++ b/include/asm-arm/arch-s3c2410/vr1000-irq.h
@@ -8,11 +8,7 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 * 11*/
12 * Changelog:
13 * 06-Jan-2003 BJD Linux 2.6.0 version
14 * 19-Mar-2004 BJD Updates for VR1000
15 */
16 12
17#ifndef __ASM_ARCH_VR1000IRQ_H 13#ifndef __ASM_ARCH_VR1000IRQ_H
18#define __ASM_ARCH_VR1000IRQ_H 14#define __ASM_ARCH_VR1000IRQ_H
diff --git a/include/asm-arm/arch-s3c2410/vr1000-map.h b/include/asm-arm/arch-s3c2410/vr1000-map.h
index 867c9355fd39..1fe4db36c834 100644
--- a/include/asm-arm/arch-s3c2410/vr1000-map.h
+++ b/include/asm-arm/arch-s3c2410/vr1000-map.h
@@ -8,12 +8,6 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 *
12 * Changelog:
13 * 06-Jan-2003 BJD Linux 2.6.0 version, split specifics from arch/map.h
14 * 12-Mar-2004 BJD Fixed header include protection
15 * 19-Mar-2004 BJD Copied to VR1000 machine headers.
16 * 19-Jan-2005 BJD Updated map definitions
17*/ 11*/
18 12
19/* needs arch/map.h including with this */ 13/* needs arch/map.h including with this */
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h
index fe0c744e0266..e4a2569c636c 100644
--- a/include/asm-arm/cacheflush.h
+++ b/include/asm-arm/cacheflush.h
@@ -247,14 +247,12 @@ extern void dmac_flush_range(unsigned long, unsigned long);
247 */ 247 */
248#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ 248#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
249 do { \ 249 do { \
250 flush_cache_page(vma, vaddr, page_to_pfn(page));\
251 memcpy(dst, src, len); \ 250 memcpy(dst, src, len); \
252 flush_dcache_page(page); \ 251 flush_ptrace_access(vma, page, vaddr, dst, len, 1);\
253 } while (0) 252 } while (0)
254 253
255#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ 254#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
256 do { \ 255 do { \
257 flush_cache_page(vma, vaddr, page_to_pfn(page));\
258 memcpy(dst, src, len); \ 256 memcpy(dst, src, len); \
259 } while (0) 257 } while (0)
260 258
@@ -285,10 +283,24 @@ flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned l
285 __cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags); 283 __cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags);
286 } 284 }
287} 285}
286
287static inline void
288flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
289 unsigned long uaddr, void *kaddr,
290 unsigned long len, int write)
291{
292 if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) {
293 unsigned long addr = (unsigned long)kaddr;
294 __cpuc_coherent_kern_range(addr, addr + len);
295 }
296}
288#else 297#else
289extern void flush_cache_mm(struct mm_struct *mm); 298extern void flush_cache_mm(struct mm_struct *mm);
290extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); 299extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end);
291extern void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn); 300extern void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn);
301extern void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
302 unsigned long uaddr, void *kaddr,
303 unsigned long len, int write);
292#endif 304#endif
293 305
294/* 306/*
diff --git a/include/asm-arm/elf.h b/include/asm-arm/elf.h
index 71061ca5c5d0..ae7baa6c73f7 100644
--- a/include/asm-arm/elf.h
+++ b/include/asm-arm/elf.h
@@ -8,7 +8,9 @@
8 8
9#include <asm/ptrace.h> 9#include <asm/ptrace.h>
10#include <asm/user.h> 10#include <asm/user.h>
11#ifdef __KERNEL
11#include <asm/procinfo.h> 12#include <asm/procinfo.h>
13#endif
12 14
13typedef unsigned long elf_greg_t; 15typedef unsigned long elf_greg_t;
14typedef unsigned long elf_freg_t[3]; 16typedef unsigned long elf_freg_t[3];
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h
index 63d12f0244c5..b721270b9986 100644
--- a/include/asm-arm/page.h
+++ b/include/asm-arm/page.h
@@ -193,8 +193,8 @@ extern pmd_t *top_pmd;
193#define ARCH_SLAB_MINALIGN 8 193#define ARCH_SLAB_MINALIGN 8
194#endif 194#endif
195 195
196#endif /* __KERNEL__ */
197
198#include <asm-generic/page.h> 196#include <asm-generic/page.h>
199 197
198#endif /* __KERNEL__ */
199
200#endif 200#endif
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h
index 406ca97a8ab2..01b7c26a3038 100644
--- a/include/asm-arm/spinlock.h
+++ b/include/asm-arm/spinlock.h
@@ -199,7 +199,21 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)
199 : "cc"); 199 : "cc");
200} 200}
201 201
202#define __raw_read_trylock(lock) generic__raw_read_trylock(lock) 202static inline int __raw_read_trylock(raw_rwlock_t *rw)
203{
204 unsigned long tmp, tmp2 = 1;
205
206 __asm__ __volatile__(
207"1: ldrex %0, [%2]\n"
208" adds %0, %0, #1\n"
209" strexpl %1, %0, [%2]\n"
210 : "=&r" (tmp), "+r" (tmp2)
211 : "r" (&rw->lock)
212 : "cc");
213
214 smp_mb();
215 return tmp2 == 0;
216}
203 217
204/* read_can_lock - would read_trylock() succeed? */ 218/* read_can_lock - would read_trylock() succeed? */
205#define __raw_read_can_lock(x) ((x)->lock < 0x80000000) 219#define __raw_read_can_lock(x) ((x)->lock < 0x80000000)
diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm
index 6b16dda18115..c00de6028fa8 100644
--- a/include/asm-generic/Kbuild.asm
+++ b/include/asm-generic/Kbuild.asm
@@ -2,7 +2,7 @@ unifdef-y += a.out.h auxvec.h byteorder.h errno.h fcntl.h ioctl.h \
2 ioctls.h ipcbuf.h mman.h msgbuf.h param.h poll.h \ 2 ioctls.h ipcbuf.h mman.h msgbuf.h param.h poll.h \
3 posix_types.h ptrace.h resource.h sembuf.h shmbuf.h shmparam.h \ 3 posix_types.h ptrace.h resource.h sembuf.h shmbuf.h shmparam.h \
4 sigcontext.h siginfo.h signal.h socket.h sockios.h stat.h \ 4 sigcontext.h siginfo.h signal.h socket.h sockios.h stat.h \
5 statfs.h termbits.h termios.h timex.h types.h unistd.h user.h 5 statfs.h termbits.h termios.h types.h unistd.h user.h
6 6
7# These probably shouldn't be exported 7# These probably shouldn't be exported
8unifdef-y += elf.h page.h 8unifdef-y += elf.h page.h
diff --git a/include/asm-generic/audit_read.h b/include/asm-generic/audit_read.h
new file mode 100644
index 000000000000..0e87464d9847
--- /dev/null
+++ b/include/asm-generic/audit_read.h
@@ -0,0 +1,8 @@
1__NR_readlink,
2__NR_quotactl,
3__NR_listxattr,
4__NR_llistxattr,
5__NR_flistxattr,
6__NR_getxattr,
7__NR_lgetxattr,
8__NR_fgetxattr,
diff --git a/include/asm-generic/audit_write.h b/include/asm-generic/audit_write.h
new file mode 100644
index 000000000000..f10d367fb2a5
--- /dev/null
+++ b/include/asm-generic/audit_write.h
@@ -0,0 +1,11 @@
1#include <asm-generic/audit_dir_write.h>
2__NR_acct,
3__NR_swapon,
4__NR_quotactl,
5__NR_truncate,
6#ifdef __NR_truncate64
7__NR_truncate64,
8#endif
9#ifdef __NR_bind
10__NR_bind, /* bind can affect fs object only in one way... */
11#endif
diff --git a/include/asm-i386/Kbuild b/include/asm-i386/Kbuild
index c064a8e9170f..2308190321da 100644
--- a/include/asm-i386/Kbuild
+++ b/include/asm-i386/Kbuild
@@ -1,5 +1,5 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2 2
3header-y += boot.h cpufeature.h debugreg.h ldt.h setup.h ucontext.h 3header-y += boot.h debugreg.h ldt.h ucontext.h
4 4
5unifdef-y += mtrr.h vm86.h 5unifdef-y += mtrr.h setup.h vm86.h
diff --git a/include/asm-i386/alternative.h b/include/asm-i386/alternative.h
index 96adbabec740..b01a7ec409ce 100644
--- a/include/asm-i386/alternative.h
+++ b/include/asm-i386/alternative.h
@@ -88,9 +88,6 @@ static inline void alternatives_smp_switch(int smp) {}
88/* 88/*
89 * Alternative inline assembly for SMP. 89 * Alternative inline assembly for SMP.
90 * 90 *
91 * alternative_smp() takes two versions (SMP first, UP second) and is
92 * for more complex stuff such as spinlocks.
93 *
94 * The LOCK_PREFIX macro defined here replaces the LOCK and 91 * The LOCK_PREFIX macro defined here replaces the LOCK and
95 * LOCK_PREFIX macros used everywhere in the source tree. 92 * LOCK_PREFIX macros used everywhere in the source tree.
96 * 93 *
@@ -110,21 +107,6 @@ static inline void alternatives_smp_switch(int smp) {}
110 */ 107 */
111 108
112#ifdef CONFIG_SMP 109#ifdef CONFIG_SMP
113#define alternative_smp(smpinstr, upinstr, args...) \
114 asm volatile ("661:\n\t" smpinstr "\n662:\n" \
115 ".section .smp_altinstructions,\"a\"\n" \
116 " .align 4\n" \
117 " .long 661b\n" /* label */ \
118 " .long 663f\n" /* new instruction */ \
119 " .byte 0x68\n" /* X86_FEATURE_UP */ \
120 " .byte 662b-661b\n" /* sourcelen */ \
121 " .byte 664f-663f\n" /* replacementlen */ \
122 ".previous\n" \
123 ".section .smp_altinstr_replacement,\"awx\"\n" \
124 "663:\n\t" upinstr "\n" /* replacement */ \
125 "664:\n\t.fill 662b-661b,1,0x42\n" /* space for original */ \
126 ".previous" : args)
127
128#define LOCK_PREFIX \ 110#define LOCK_PREFIX \
129 ".section .smp_locks,\"a\"\n" \ 111 ".section .smp_locks,\"a\"\n" \
130 " .align 4\n" \ 112 " .align 4\n" \
@@ -133,8 +115,6 @@ static inline void alternatives_smp_switch(int smp) {}
133 "661:\n\tlock; " 115 "661:\n\tlock; "
134 116
135#else /* ! CONFIG_SMP */ 117#else /* ! CONFIG_SMP */
136#define alternative_smp(smpinstr, upinstr, args...) \
137 asm volatile (upinstr : args)
138#define LOCK_PREFIX "" 118#define LOCK_PREFIX ""
139#endif 119#endif
140 120
diff --git a/include/asm-i386/elf.h b/include/asm-i386/elf.h
index 1eac92cb5b16..db4344d9f73f 100644
--- a/include/asm-i386/elf.h
+++ b/include/asm-i386/elf.h
@@ -7,10 +7,7 @@
7 7
8#include <asm/ptrace.h> 8#include <asm/ptrace.h>
9#include <asm/user.h> 9#include <asm/user.h>
10#include <asm/processor.h>
11#include <asm/system.h> /* for savesegment */
12#include <asm/auxvec.h> 10#include <asm/auxvec.h>
13#include <asm/desc.h>
14 11
15#include <linux/utsname.h> 12#include <linux/utsname.h>
16 13
@@ -48,6 +45,12 @@ typedef struct user_fxsr_struct elf_fpxregset_t;
48#define ELF_DATA ELFDATA2LSB 45#define ELF_DATA ELFDATA2LSB
49#define ELF_ARCH EM_386 46#define ELF_ARCH EM_386
50 47
48#ifdef __KERNEL__
49
50#include <asm/processor.h>
51#include <asm/system.h> /* for savesegment */
52#include <asm/desc.h>
53
51/* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx 54/* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx
52 contains a pointer to a function which might be registered using `atexit'. 55 contains a pointer to a function which might be registered using `atexit'.
53 This provides a mean for the dynamic linker to call DT_FINI functions for 56 This provides a mean for the dynamic linker to call DT_FINI functions for
@@ -111,7 +114,6 @@ typedef struct user_fxsr_struct elf_fpxregset_t;
111 114
112#define ELF_PLATFORM (system_utsname.machine) 115#define ELF_PLATFORM (system_utsname.machine)
113 116
114#ifdef __KERNEL__
115#define SET_PERSONALITY(ex, ibcs2) do { } while (0) 117#define SET_PERSONALITY(ex, ibcs2) do { } while (0)
116 118
117/* 119/*
diff --git a/include/asm-i386/mach-default/mach_mpspec.h b/include/asm-i386/mach-default/mach_mpspec.h
index 6b5dadcf1d0e..51c9a9775932 100644
--- a/include/asm-i386/mach-default/mach_mpspec.h
+++ b/include/asm-i386/mach-default/mach_mpspec.h
@@ -3,6 +3,10 @@
3 3
4#define MAX_IRQ_SOURCES 256 4#define MAX_IRQ_SOURCES 256
5 5
6#if CONFIG_BASE_SMALL == 0
7#define MAX_MP_BUSSES 256
8#else
6#define MAX_MP_BUSSES 32 9#define MAX_MP_BUSSES 32
10#endif
7 11
8#endif /* __ASM_MACH_MPSPEC_H */ 12#endif /* __ASM_MACH_MPSPEC_H */
diff --git a/include/asm-i386/rwlock.h b/include/asm-i386/rwlock.h
index 96b0bef2ea56..87c069ccba08 100644
--- a/include/asm-i386/rwlock.h
+++ b/include/asm-i386/rwlock.h
@@ -21,23 +21,21 @@
21#define RW_LOCK_BIAS_STR "0x01000000" 21#define RW_LOCK_BIAS_STR "0x01000000"
22 22
23#define __build_read_lock_ptr(rw, helper) \ 23#define __build_read_lock_ptr(rw, helper) \
24 alternative_smp("lock; subl $1,(%0)\n\t" \ 24 asm volatile(LOCK_PREFIX " subl $1,(%0)\n\t" \
25 "jns 1f\n" \ 25 "jns 1f\n" \
26 "call " helper "\n\t" \ 26 "call " helper "\n\t" \
27 "1:\n", \ 27 "1:\n" \
28 "subl $1,(%0)\n\t", \ 28 ::"a" (rw) : "memory")
29 :"a" (rw) : "memory")
30 29
31#define __build_read_lock_const(rw, helper) \ 30#define __build_read_lock_const(rw, helper) \
32 alternative_smp("lock; subl $1,%0\n\t" \ 31 asm volatile(LOCK_PREFIX " subl $1,%0\n\t" \
33 "jns 1f\n" \ 32 "jns 1f\n" \
34 "pushl %%eax\n\t" \ 33 "pushl %%eax\n\t" \
35 "leal %0,%%eax\n\t" \ 34 "leal %0,%%eax\n\t" \
36 "call " helper "\n\t" \ 35 "call " helper "\n\t" \
37 "popl %%eax\n\t" \ 36 "popl %%eax\n\t" \
38 "1:\n", \ 37 "1:\n" \
39 "subl $1,%0\n\t", \ 38 :"+m" (*(volatile int *)rw) : : "memory")
40 "+m" (*(volatile int *)rw) : : "memory")
41 39
42#define __build_read_lock(rw, helper) do { \ 40#define __build_read_lock(rw, helper) do { \
43 if (__builtin_constant_p(rw)) \ 41 if (__builtin_constant_p(rw)) \
@@ -47,23 +45,21 @@
47 } while (0) 45 } while (0)
48 46
49#define __build_write_lock_ptr(rw, helper) \ 47#define __build_write_lock_ptr(rw, helper) \
50 alternative_smp("lock; subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \ 48 asm volatile(LOCK_PREFIX " subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \
51 "jz 1f\n" \ 49 "jz 1f\n" \
52 "call " helper "\n\t" \ 50 "call " helper "\n\t" \
53 "1:\n", \ 51 "1:\n" \
54 "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t", \ 52 ::"a" (rw) : "memory")
55 :"a" (rw) : "memory")
56 53
57#define __build_write_lock_const(rw, helper) \ 54#define __build_write_lock_const(rw, helper) \
58 alternative_smp("lock; subl $" RW_LOCK_BIAS_STR ",%0\n\t" \ 55 asm volatile(LOCK_PREFIX " subl $" RW_LOCK_BIAS_STR ",%0\n\t" \
59 "jz 1f\n" \ 56 "jz 1f\n" \
60 "pushl %%eax\n\t" \ 57 "pushl %%eax\n\t" \
61 "leal %0,%%eax\n\t" \ 58 "leal %0,%%eax\n\t" \
62 "call " helper "\n\t" \ 59 "call " helper "\n\t" \
63 "popl %%eax\n\t" \ 60 "popl %%eax\n\t" \
64 "1:\n", \ 61 "1:\n" \
65 "subl $" RW_LOCK_BIAS_STR ",%0\n\t", \ 62 :"+m" (*(volatile int *)rw) : : "memory")
66 "+m" (*(volatile int *)rw) : : "memory")
67 63
68#define __build_write_lock(rw, helper) do { \ 64#define __build_write_lock(rw, helper) do { \
69 if (__builtin_constant_p(rw)) \ 65 if (__builtin_constant_p(rw)) \
diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h
index f737e423029e..2734909eff84 100644
--- a/include/asm-i386/setup.h
+++ b/include/asm-i386/setup.h
@@ -6,6 +6,7 @@
6#ifndef _i386_SETUP_H 6#ifndef _i386_SETUP_H
7#define _i386_SETUP_H 7#define _i386_SETUP_H
8 8
9#ifdef __KERNEL__
9#include <linux/pfn.h> 10#include <linux/pfn.h>
10 11
11/* 12/*
@@ -13,6 +14,7 @@
13 */ 14 */
14#define MAXMEM_PFN PFN_DOWN(MAXMEM) 15#define MAXMEM_PFN PFN_DOWN(MAXMEM)
15#define MAX_NONPAE_PFN (1 << 20) 16#define MAX_NONPAE_PFN (1 << 20)
17#endif
16 18
17#define PARAM_SIZE 4096 19#define PARAM_SIZE 4096
18#define COMMAND_LINE_SIZE 256 20#define COMMAND_LINE_SIZE 256
diff --git a/include/asm-i386/signal.h b/include/asm-i386/signal.h
index 3824a502351f..c3e8adec5918 100644
--- a/include/asm-i386/signal.h
+++ b/include/asm-i386/signal.h
@@ -2,7 +2,6 @@
2#define _ASMi386_SIGNAL_H 2#define _ASMi386_SIGNAL_H
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/linkage.h>
6#include <linux/time.h> 5#include <linux/time.h>
7#include <linux/compiler.h> 6#include <linux/compiler.h>
8 7
@@ -10,6 +9,9 @@
10struct siginfo; 9struct siginfo;
11 10
12#ifdef __KERNEL__ 11#ifdef __KERNEL__
12
13#include <linux/linkage.h>
14
13/* Most things should be clean enough to redefine this at will, if care 15/* Most things should be clean enough to redefine this at will, if care
14 is taken to make libc match. */ 16 is taken to make libc match. */
15 17
diff --git a/include/asm-i386/spinlock.h b/include/asm-i386/spinlock.h
index d816c62a7a1d..d1020363c41a 100644
--- a/include/asm-i386/spinlock.h
+++ b/include/asm-i386/spinlock.h
@@ -22,7 +22,7 @@
22 22
23#define __raw_spin_lock_string \ 23#define __raw_spin_lock_string \
24 "\n1:\t" \ 24 "\n1:\t" \
25 "lock ; decb %0\n\t" \ 25 LOCK_PREFIX " ; decb %0\n\t" \
26 "jns 3f\n" \ 26 "jns 3f\n" \
27 "2:\t" \ 27 "2:\t" \
28 "rep;nop\n\t" \ 28 "rep;nop\n\t" \
@@ -38,7 +38,7 @@
38 */ 38 */
39#define __raw_spin_lock_string_flags \ 39#define __raw_spin_lock_string_flags \
40 "\n1:\t" \ 40 "\n1:\t" \
41 "lock ; decb %0\n\t" \ 41 LOCK_PREFIX " ; decb %0\n\t" \
42 "jns 5f\n" \ 42 "jns 5f\n" \
43 "2:\t" \ 43 "2:\t" \
44 "testl $0x200, %1\n\t" \ 44 "testl $0x200, %1\n\t" \
@@ -57,15 +57,9 @@
57 "jmp 4b\n" \ 57 "jmp 4b\n" \
58 "5:\n\t" 58 "5:\n\t"
59 59
60#define __raw_spin_lock_string_up \
61 "\n\tdecb %0"
62
63static inline void __raw_spin_lock(raw_spinlock_t *lock) 60static inline void __raw_spin_lock(raw_spinlock_t *lock)
64{ 61{
65 alternative_smp( 62 asm(__raw_spin_lock_string : "+m" (lock->slock) : : "memory");
66 __raw_spin_lock_string,
67 __raw_spin_lock_string_up,
68 "+m" (lock->slock) : : "memory");
69} 63}
70 64
71/* 65/*
@@ -76,10 +70,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
76#ifndef CONFIG_PROVE_LOCKING 70#ifndef CONFIG_PROVE_LOCKING
77static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) 71static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags)
78{ 72{
79 alternative_smp( 73 asm(__raw_spin_lock_string_flags : "+m" (lock->slock) : "r" (flags) : "memory");
80 __raw_spin_lock_string_flags,
81 __raw_spin_lock_string_up,
82 "+m" (lock->slock) : "r" (flags) : "memory");
83} 74}
84#endif 75#endif
85 76
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h
index 49928eb33f8b..098bcee94e38 100644
--- a/include/asm-i386/system.h
+++ b/include/asm-i386/system.h
@@ -11,9 +11,14 @@
11struct task_struct; /* one of the stranger aspects of C forward declarations.. */ 11struct task_struct; /* one of the stranger aspects of C forward declarations.. */
12extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struct task_struct *next)); 12extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struct task_struct *next));
13 13
14/*
15 * Saving eflags is important. It switches not only IOPL between tasks,
16 * it also protects other tasks from NT leaking through sysenter etc.
17 */
14#define switch_to(prev,next,last) do { \ 18#define switch_to(prev,next,last) do { \
15 unsigned long esi,edi; \ 19 unsigned long esi,edi; \
16 asm volatile("pushl %%ebp\n\t" \ 20 asm volatile("pushfl\n\t" /* Save flags */ \
21 "pushl %%ebp\n\t" \
17 "movl %%esp,%0\n\t" /* save ESP */ \ 22 "movl %%esp,%0\n\t" /* save ESP */ \
18 "movl %5,%%esp\n\t" /* restore ESP */ \ 23 "movl %5,%%esp\n\t" /* restore ESP */ \
19 "movl $1f,%1\n\t" /* save EIP */ \ 24 "movl $1f,%1\n\t" /* save EIP */ \
@@ -21,6 +26,7 @@ extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struc
21 "jmp __switch_to\n" \ 26 "jmp __switch_to\n" \
22 "1:\t" \ 27 "1:\t" \
23 "popl %%ebp\n\t" \ 28 "popl %%ebp\n\t" \
29 "popfl" \
24 :"=m" (prev->thread.esp),"=m" (prev->thread.eip), \ 30 :"=m" (prev->thread.esp),"=m" (prev->thread.eip), \
25 "=a" (last),"=S" (esi),"=D" (edi) \ 31 "=a" (last),"=S" (esi),"=D" (edi) \
26 :"m" (next->thread.esp),"m" (next->thread.eip), \ 32 :"m" (next->thread.esp),"m" (next->thread.eip), \
diff --git a/include/asm-i386/unwind.h b/include/asm-i386/unwind.h
index 69f0f1df6722..4c1a0b968569 100644
--- a/include/asm-i386/unwind.h
+++ b/include/asm-i386/unwind.h
@@ -87,6 +87,7 @@ static inline int arch_unw_user_mode(const struct unwind_frame_info *info)
87#else 87#else
88 88
89#define UNW_PC(frame) ((void)(frame), 0) 89#define UNW_PC(frame) ((void)(frame), 0)
90#define UNW_SP(frame) ((void)(frame), 0)
90 91
91static inline int arch_unw_user_mode(const void *info) 92static inline int arch_unw_user_mode(const void *info)
92{ 93{
diff --git a/include/asm-ia64/Kbuild b/include/asm-ia64/Kbuild
index 85d6f8005eb4..f1cb00f39c22 100644
--- a/include/asm-ia64/Kbuild
+++ b/include/asm-ia64/Kbuild
@@ -4,4 +4,4 @@ header-y += break.h fpu.h fpswa.h gcc_intrin.h ia64regs.h \
4 intel_intrin.h intrinsics.h perfmon_default_smpl.h \ 4 intel_intrin.h intrinsics.h perfmon_default_smpl.h \
5 ptrace_offsets.h rse.h setup.h ucontext.h 5 ptrace_offsets.h rse.h setup.h ucontext.h
6 6
7unifdef-y += perfmon.h 7unifdef-y += perfmon.h ustack.h
diff --git a/include/asm-ia64/mman.h b/include/asm-ia64/mman.h
index 6ba179f12718..c73b87832a1e 100644
--- a/include/asm-ia64/mman.h
+++ b/include/asm-ia64/mman.h
@@ -22,4 +22,12 @@
22#define MCL_CURRENT 1 /* lock all current mappings */ 22#define MCL_CURRENT 1 /* lock all current mappings */
23#define MCL_FUTURE 2 /* lock all future mappings */ 23#define MCL_FUTURE 2 /* lock all future mappings */
24 24
25#ifdef __KERNEL__
26#ifndef __ASSEMBLY__
27#define arch_mmap_check ia64_mmap_check
28int ia64_mmap_check(unsigned long addr, unsigned long len,
29 unsigned long flags);
30#endif
31#endif
32
25#endif /* _ASM_IA64_MMAN_H */ 33#endif /* _ASM_IA64_MMAN_H */
diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h
index f5a949ec6e1e..947cb72b520e 100644
--- a/include/asm-ia64/page.h
+++ b/include/asm-ia64/page.h
@@ -7,6 +7,7 @@
7 * David Mosberger-Tang <davidm@hpl.hp.com> 7 * David Mosberger-Tang <davidm@hpl.hp.com>
8 */ 8 */
9 9
10# ifdef __KERNEL__
10 11
11#include <asm/intrinsics.h> 12#include <asm/intrinsics.h>
12#include <asm/types.h> 13#include <asm/types.h>
@@ -64,7 +65,6 @@
64# define __pa(x) ((x) - PAGE_OFFSET) 65# define __pa(x) ((x) - PAGE_OFFSET)
65# define __va(x) ((x) + PAGE_OFFSET) 66# define __va(x) ((x) + PAGE_OFFSET)
66#else /* !__ASSEMBLY */ 67#else /* !__ASSEMBLY */
67# ifdef __KERNEL__
68# define STRICT_MM_TYPECHECKS 68# define STRICT_MM_TYPECHECKS
69 69
70extern void clear_page (void *page); 70extern void clear_page (void *page);
@@ -174,7 +174,6 @@ get_order (unsigned long size)
174 return order; 174 return order;
175} 175}
176 176
177# endif /* __KERNEL__ */
178#endif /* !__ASSEMBLY__ */ 177#endif /* !__ASSEMBLY__ */
179 178
180#ifdef STRICT_MM_TYPECHECKS 179#ifdef STRICT_MM_TYPECHECKS
@@ -228,4 +227,5 @@ get_order (unsigned long size)
228 (((current->personality & READ_IMPLIES_EXEC) != 0) \ 227 (((current->personality & READ_IMPLIES_EXEC) != 0) \
229 ? VM_EXEC : 0)) 228 ? VM_EXEC : 0))
230 229
230# endif /* __KERNEL__ */
231#endif /* _ASM_IA64_PAGE_H */ 231#endif /* _ASM_IA64_PAGE_H */
diff --git a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h
index 415abb23b210..1414316efd40 100644
--- a/include/asm-ia64/ptrace.h
+++ b/include/asm-ia64/ptrace.h
@@ -56,6 +56,8 @@
56 56
57 57
58#include <asm/fpu.h> 58#include <asm/fpu.h>
59
60#ifdef __KERNEL__
59#ifndef ASM_OFFSETS_C 61#ifndef ASM_OFFSETS_C
60#include <asm/asm-offsets.h> 62#include <asm/asm-offsets.h>
61#endif 63#endif
@@ -79,10 +81,9 @@
79 81
80#define KERNEL_STACK_SIZE IA64_STK_OFFSET 82#define KERNEL_STACK_SIZE IA64_STK_OFFSET
81 83
82#ifndef __ASSEMBLY__ 84#endif /* __KERNEL__ */
83 85
84#include <asm/current.h> 86#ifndef __ASSEMBLY__
85#include <asm/page.h>
86 87
87/* 88/*
88 * This struct defines the way the registers are saved on system 89 * This struct defines the way the registers are saved on system
@@ -229,6 +230,9 @@ struct switch_stack {
229 230
230#ifdef __KERNEL__ 231#ifdef __KERNEL__
231 232
233#include <asm/current.h>
234#include <asm/page.h>
235
232#define __ARCH_SYS_PTRACE 1 236#define __ARCH_SYS_PTRACE 1
233 237
234/* 238/*
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h
index bd4452bda357..ba826b3f75bb 100644
--- a/include/asm-ia64/sn/sn_sal.h
+++ b/include/asm-ia64/sn/sn_sal.h
@@ -706,12 +706,9 @@ static inline int
706sn_change_memprotect(u64 paddr, u64 len, u64 perms, u64 *nasid_array) 706sn_change_memprotect(u64 paddr, u64 len, u64 perms, u64 *nasid_array)
707{ 707{
708 struct ia64_sal_retval ret_stuff; 708 struct ia64_sal_retval ret_stuff;
709 unsigned long irq_flags;
710 709
711 local_irq_save(irq_flags);
712 ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_MEMPROTECT, paddr, len, 710 ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_MEMPROTECT, paddr, len,
713 (u64)nasid_array, perms, 0, 0, 0); 711 (u64)nasid_array, perms, 0, 0, 0);
714 local_irq_restore(irq_flags);
715 return ret_stuff.status; 712 return ret_stuff.status;
716} 713}
717#define SN_MEMPROT_ACCESS_CLASS_0 0x14a080 714#define SN_MEMPROT_ACCESS_CLASS_0 0x14a080
@@ -1143,12 +1140,9 @@ static inline int
1143sn_inject_error(u64 paddr, u64 *data, u64 *ecc) 1140sn_inject_error(u64 paddr, u64 *data, u64 *ecc)
1144{ 1141{
1145 struct ia64_sal_retval ret_stuff; 1142 struct ia64_sal_retval ret_stuff;
1146 unsigned long irq_flags;
1147 1143
1148 local_irq_save(irq_flags);
1149 ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_INJECT_ERROR, paddr, (u64)data, 1144 ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_INJECT_ERROR, paddr, (u64)data,
1150 (u64)ecc, 0, 0, 0, 0); 1145 (u64)ecc, 0, 0, 0, 0);
1151 local_irq_restore(irq_flags);
1152 return ret_stuff.status; 1146 return ret_stuff.status;
1153} 1147}
1154 1148
diff --git a/include/asm-ia64/sn/xp.h b/include/asm-ia64/sn/xp.h
index 9bd2f9bf329b..6f807e0193b7 100644
--- a/include/asm-ia64/sn/xp.h
+++ b/include/asm-ia64/sn/xp.h
@@ -60,23 +60,37 @@
60 * the bte_copy() once in the hope that the failure was due to a temporary 60 * the bte_copy() once in the hope that the failure was due to a temporary
61 * aberration (i.e., the link going down temporarily). 61 * aberration (i.e., the link going down temporarily).
62 * 62 *
63 * See bte_copy for definition of the input parameters. 63 * src - physical address of the source of the transfer.
64 * vdst - virtual address of the destination of the transfer.
65 * len - number of bytes to transfer from source to destination.
66 * mode - see bte_copy() for definition.
67 * notification - see bte_copy() for definition.
64 * 68 *
65 * Note: xp_bte_copy() should never be called while holding a spinlock. 69 * Note: xp_bte_copy() should never be called while holding a spinlock.
66 */ 70 */
67static inline bte_result_t 71static inline bte_result_t
68xp_bte_copy(u64 src, u64 dest, u64 len, u64 mode, void *notification) 72xp_bte_copy(u64 src, u64 vdst, u64 len, u64 mode, void *notification)
69{ 73{
70 bte_result_t ret; 74 bte_result_t ret;
75 u64 pdst = ia64_tpa(vdst);
71 76
72 77
73 ret = bte_copy(src, dest, len, mode, notification); 78 /*
79 * Ensure that the physically mapped memory is contiguous.
80 *
81 * We do this by ensuring that the memory is from region 7 only.
82 * If the need should arise to use memory from one of the other
83 * regions, then modify the BUG_ON() statement to ensure that the
84 * memory from that region is always physically contiguous.
85 */
86 BUG_ON(REGION_NUMBER(vdst) != RGN_KERNEL);
74 87
88 ret = bte_copy(src, pdst, len, mode, notification);
75 if (ret != BTE_SUCCESS) { 89 if (ret != BTE_SUCCESS) {
76 if (!in_interrupt()) { 90 if (!in_interrupt()) {
77 cond_resched(); 91 cond_resched();
78 } 92 }
79 ret = bte_copy(src, dest, len, mode, notification); 93 ret = bte_copy(src, pdst, len, mode, notification);
80 } 94 }
81 95
82 return ret; 96 return ret;
diff --git a/include/asm-ia64/sn/xpc.h b/include/asm-ia64/sn/xpc.h
index b72af597878d..35e1386f37ab 100644
--- a/include/asm-ia64/sn/xpc.h
+++ b/include/asm-ia64/sn/xpc.h
@@ -683,7 +683,9 @@ extern struct xpc_vars *xpc_vars;
683extern struct xpc_rsvd_page *xpc_rsvd_page; 683extern struct xpc_rsvd_page *xpc_rsvd_page;
684extern struct xpc_vars_part *xpc_vars_part; 684extern struct xpc_vars_part *xpc_vars_part;
685extern struct xpc_partition xpc_partitions[XP_MAX_PARTITIONS + 1]; 685extern struct xpc_partition xpc_partitions[XP_MAX_PARTITIONS + 1];
686extern char xpc_remote_copy_buffer[]; 686extern char *xpc_remote_copy_buffer;
687extern void *xpc_remote_copy_buffer_base;
688extern void *xpc_kmalloc_cacheline_aligned(size_t, gfp_t, void **);
687extern struct xpc_rsvd_page *xpc_rsvd_page_init(void); 689extern struct xpc_rsvd_page *xpc_rsvd_page_init(void);
688extern void xpc_allow_IPI_ops(void); 690extern void xpc_allow_IPI_ops(void);
689extern void xpc_restrict_IPI_ops(void); 691extern void xpc_restrict_IPI_ops(void);
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h
index bb0eb727dcd0..f581662c5ab8 100644
--- a/include/asm-ia64/unistd.h
+++ b/include/asm-ia64/unistd.h
@@ -286,8 +286,7 @@
286/* 1294, 1295 reserved for pselect/ppoll */ 286/* 1294, 1295 reserved for pselect/ppoll */
287#define __NR_unshare 1296 287#define __NR_unshare 1296
288#define __NR_splice 1297 288#define __NR_splice 1297
289#define __NR_set_robust_list 1298 289/* 1298, 1299 reserved for set_robust_list/get_robust_list */
290#define __NR_get_robust_list 1299
291#define __NR_sync_file_range 1300 290#define __NR_sync_file_range 1300
292#define __NR_tee 1301 291#define __NR_tee 1301
293#define __NR_vmsplice 1302 292#define __NR_vmsplice 1302
diff --git a/include/asm-ia64/ustack.h b/include/asm-ia64/ustack.h
index da55c91246e3..a349467913ea 100644
--- a/include/asm-ia64/ustack.h
+++ b/include/asm-ia64/ustack.h
@@ -5,12 +5,15 @@
5 * Constants for the user stack size 5 * Constants for the user stack size
6 */ 6 */
7 7
8#ifdef __KERNEL__
8#include <asm/page.h> 9#include <asm/page.h>
9 10
10/* The absolute hard limit for stack size is 1/2 of the mappable space in the region */ 11/* The absolute hard limit for stack size is 1/2 of the mappable space in the region */
11#define MAX_USER_STACK_SIZE (RGN_MAP_LIMIT/2) 12#define MAX_USER_STACK_SIZE (RGN_MAP_LIMIT/2)
12/* Make a default stack size of 2GB */
13#define DEFAULT_USER_STACK_SIZE (1UL << 31)
14#define STACK_TOP (0x6000000000000000UL + RGN_MAP_LIMIT) 13#define STACK_TOP (0x6000000000000000UL + RGN_MAP_LIMIT)
14#endif
15
16/* Make a default stack size of 2GiB */
17#define DEFAULT_USER_STACK_SIZE (1UL << 31)
15 18
16#endif /* _ASM_IA64_USTACK_H */ 19#endif /* _ASM_IA64_USTACK_H */
diff --git a/include/asm-m68k/page.h b/include/asm-m68k/page.h
index db017f838c29..fcc165ddd09e 100644
--- a/include/asm-m68k/page.h
+++ b/include/asm-m68k/page.h
@@ -2,6 +2,8 @@
2#define _M68K_PAGE_H 2#define _M68K_PAGE_H
3 3
4 4
5#ifdef __KERNEL__
6
5/* PAGE_SHIFT determines the page size */ 7/* PAGE_SHIFT determines the page size */
6#ifndef CONFIG_SUN3 8#ifndef CONFIG_SUN3
7#define PAGE_SHIFT (12) 9#define PAGE_SHIFT (12)
@@ -15,8 +17,6 @@
15#endif 17#endif
16#define PAGE_MASK (~(PAGE_SIZE-1)) 18#define PAGE_MASK (~(PAGE_SIZE-1))
17 19
18#ifdef __KERNEL__
19
20#include <asm/setup.h> 20#include <asm/setup.h>
21 21
22#if PAGE_SHIFT < 13 22#if PAGE_SHIFT < 13
@@ -175,8 +175,8 @@ static inline void *__va(unsigned long x)
175#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 175#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
176 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 176 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
177 177
178#endif /* __KERNEL__ */
179
180#include <asm-generic/page.h> 178#include <asm-generic/page.h>
181 179
180#endif /* __KERNEL__ */
181
182#endif /* _M68K_PAGE_H */ 182#endif /* _M68K_PAGE_H */
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index 6ed1151a05a3..219d359861f3 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -14,8 +14,6 @@
14 14
15#include <spaces.h> 15#include <spaces.h>
16 16
17#endif
18
19/* 17/*
20 * PAGE_SHIFT determines the page size 18 * PAGE_SHIFT determines the page size
21 */ 19 */
@@ -34,8 +32,6 @@
34#define PAGE_SIZE (1UL << PAGE_SHIFT) 32#define PAGE_SIZE (1UL << PAGE_SHIFT)
35#define PAGE_MASK (~((1 << PAGE_SHIFT) - 1)) 33#define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))
36 34
37
38#ifdef __KERNEL__
39#ifndef __ASSEMBLY__ 35#ifndef __ASSEMBLY__
40 36
41extern void clear_page(void * page); 37extern void clear_page(void * page);
@@ -168,8 +164,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
168#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE) 164#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE)
169#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET) 165#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET)
170 166
171#endif /* defined (__KERNEL__) */
172
173#ifdef CONFIG_LIMITED_DMA 167#ifdef CONFIG_LIMITED_DMA
174#define WANT_PAGE_VIRTUAL 168#define WANT_PAGE_VIRTUAL
175#endif 169#endif
@@ -177,4 +171,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
177#include <asm-generic/memory_model.h> 171#include <asm-generic/memory_model.h>
178#include <asm-generic/page.h> 172#include <asm-generic/page.h>
179 173
174#endif /* defined (__KERNEL__) */
175
180#endif /* _ASM_PAGE_H */ 176#endif /* _ASM_PAGE_H */
diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h
index 0695bc958d56..57d6d82756dd 100644
--- a/include/asm-parisc/page.h
+++ b/include/asm-parisc/page.h
@@ -1,22 +1,14 @@
1#ifndef _PARISC_PAGE_H 1#ifndef _PARISC_PAGE_H
2#define _PARISC_PAGE_H 2#define _PARISC_PAGE_H
3 3
4#if !defined(__KERNEL__)
5/* this is for userspace applications (4k page size) */
6# define PAGE_SHIFT 12 /* 4k */
7# define PAGE_SIZE (1UL << PAGE_SHIFT)
8# define PAGE_MASK (~(PAGE_SIZE-1))
9#endif
10
11
12#ifdef __KERNEL__ 4#ifdef __KERNEL__
13 5
14#if defined(CONFIG_PARISC_PAGE_SIZE_4KB) 6#if defined(CONFIG_PARISC_PAGE_SIZE_4KB)
15# define PAGE_SHIFT 12 /* 4k */ 7# define PAGE_SHIFT 12
16#elif defined(CONFIG_PARISC_PAGE_SIZE_16KB) 8#elif defined(CONFIG_PARISC_PAGE_SIZE_16KB)
17# define PAGE_SHIFT 14 /* 16k */ 9# define PAGE_SHIFT 14
18#elif defined(CONFIG_PARISC_PAGE_SIZE_64KB) 10#elif defined(CONFIG_PARISC_PAGE_SIZE_64KB)
19# define PAGE_SHIFT 16 /* 64k */ 11# define PAGE_SHIFT 16
20#else 12#else
21# error "unknown default kernel page size" 13# error "unknown default kernel page size"
22#endif 14#endif
@@ -188,9 +180,9 @@ extern int npmem_ranges;
188#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 180#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
189 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 181 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
190 182
191#endif /* __KERNEL__ */
192
193#include <asm-generic/memory_model.h> 183#include <asm-generic/memory_model.h>
194#include <asm-generic/page.h> 184#include <asm-generic/page.h>
195 185
186#endif /* __KERNEL__ */
187
196#endif /* _PARISC_PAGE_H */ 188#endif /* _PARISC_PAGE_H */
diff --git a/include/asm-powerpc/eeh.h b/include/asm-powerpc/eeh.h
index 4df3e80118f4..6a784396660b 100644
--- a/include/asm-powerpc/eeh.h
+++ b/include/asm-powerpc/eeh.h
@@ -205,6 +205,7 @@ static inline void eeh_memset_io(volatile void __iomem *addr, int c,
205 lc |= lc << 8; 205 lc |= lc << 8;
206 lc |= lc << 16; 206 lc |= lc << 16;
207 207
208 __asm__ __volatile__ ("sync" : : : "memory");
208 while(n && !EEH_CHECK_ALIGN(p, 4)) { 209 while(n && !EEH_CHECK_ALIGN(p, 4)) {
209 *((volatile u8 *)p) = c; 210 *((volatile u8 *)p) = c;
210 p++; 211 p++;
@@ -229,6 +230,7 @@ static inline void eeh_memcpy_fromio(void *dest, const volatile void __iomem *sr
229 void *destsave = dest; 230 void *destsave = dest;
230 unsigned long nsave = n; 231 unsigned long nsave = n;
231 232
233 __asm__ __volatile__ ("sync" : : : "memory");
232 while(n && (!EEH_CHECK_ALIGN(vsrc, 4) || !EEH_CHECK_ALIGN(dest, 4))) { 234 while(n && (!EEH_CHECK_ALIGN(vsrc, 4) || !EEH_CHECK_ALIGN(dest, 4))) {
233 *((u8 *)dest) = *((volatile u8 *)vsrc); 235 *((u8 *)dest) = *((volatile u8 *)vsrc);
234 __asm__ __volatile__ ("eieio" : : : "memory"); 236 __asm__ __volatile__ ("eieio" : : : "memory");
@@ -266,6 +268,7 @@ static inline void eeh_memcpy_toio(volatile void __iomem *dest, const void *src,
266{ 268{
267 void *vdest = (void __force *) dest; 269 void *vdest = (void __force *) dest;
268 270
271 __asm__ __volatile__ ("sync" : : : "memory");
269 while(n && (!EEH_CHECK_ALIGN(vdest, 4) || !EEH_CHECK_ALIGN(src, 4))) { 272 while(n && (!EEH_CHECK_ALIGN(vdest, 4) || !EEH_CHECK_ALIGN(src, 4))) {
270 *((volatile u8 *)vdest) = *((u8 *)src); 273 *((volatile u8 *)vdest) = *((u8 *)src);
271 src++; 274 src++;
diff --git a/include/asm-powerpc/futex.h b/include/asm-powerpc/futex.h
index f1b3c00bc1ce..936422e54891 100644
--- a/include/asm-powerpc/futex.h
+++ b/include/asm-powerpc/futex.h
@@ -84,7 +84,33 @@ static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
84static inline int 84static inline int
85futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) 85futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
86{ 86{
87 return -ENOSYS; 87 int prev;
88
89 if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
90 return -EFAULT;
91
92 __asm__ __volatile__ (
93 LWSYNC_ON_SMP
94"1: lwarx %0,0,%2 # futex_atomic_cmpxchg_inatomic\n\
95 cmpw 0,%0,%3\n\
96 bne- 3f\n"
97 PPC405_ERR77(0,%2)
98"2: stwcx. %4,0,%2\n\
99 bne- 1b\n"
100 ISYNC_ON_SMP
101"3: .section .fixup,\"ax\"\n\
1024: li %0,%5\n\
103 b 3b\n\
104 .previous\n\
105 .section __ex_table,\"a\"\n\
106 .align 3\n\
107 " PPC_LONG "1b,4b,2b,4b\n\
108 .previous" \
109 : "=&r" (prev), "+m" (*uaddr)
110 : "r" (uaddr), "r" (oldval), "r" (newval), "i" (-EFAULT)
111 : "cc", "memory");
112
113 return prev;
88} 114}
89 115
90#endif /* __KERNEL__ */ 116#endif /* __KERNEL__ */
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h
index a9496f34b048..212428db0d8b 100644
--- a/include/asm-powerpc/io.h
+++ b/include/asm-powerpc/io.h
@@ -19,6 +19,7 @@ extern int check_legacy_ioport(unsigned long base_port);
19#include <linux/compiler.h> 19#include <linux/compiler.h>
20#include <asm/page.h> 20#include <asm/page.h>
21#include <asm/byteorder.h> 21#include <asm/byteorder.h>
22#include <asm/paca.h>
22#ifdef CONFIG_PPC_ISERIES 23#ifdef CONFIG_PPC_ISERIES
23#include <asm/iseries/iseries_io.h> 24#include <asm/iseries/iseries_io.h>
24#endif 25#endif
@@ -72,6 +73,9 @@ extern unsigned long pci_io_base;
72 * Neither do the standard versions now, these are just here 73 * Neither do the standard versions now, these are just here
73 * for older code. 74 * for older code.
74 */ 75 */
76#define insb(port, buf, ns) _insb((u8 __iomem *)((port)+pci_io_base), (buf), (ns))
77#define insw(port, buf, ns) _insw_ns((u8 __iomem *)((port)+pci_io_base), (buf), (ns))
78#define insl(port, buf, nl) _insl_ns((u8 __iomem *)((port)+pci_io_base), (buf), (nl))
75#define insw_ns(port, buf, ns) _insw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns)) 79#define insw_ns(port, buf, ns) _insw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns))
76#define insl_ns(port, buf, nl) _insl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl)) 80#define insl_ns(port, buf, nl) _insl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl))
77#else 81#else
@@ -137,12 +141,12 @@ static inline void __raw_writeq(unsigned long v, volatile void __iomem *addr)
137#define insw_ns(port, buf, ns) eeh_insw_ns((port), (buf), (ns)) 141#define insw_ns(port, buf, ns) eeh_insw_ns((port), (buf), (ns))
138#define insl_ns(port, buf, nl) eeh_insl_ns((port), (buf), (nl)) 142#define insl_ns(port, buf, nl) eeh_insl_ns((port), (buf), (nl))
139 143
144#endif
145
140#define outsb(port, buf, ns) _outsb((u8 __iomem *)((port)+pci_io_base), (buf), (ns)) 146#define outsb(port, buf, ns) _outsb((u8 __iomem *)((port)+pci_io_base), (buf), (ns))
141#define outsw(port, buf, ns) _outsw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns)) 147#define outsw(port, buf, ns) _outsw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns))
142#define outsl(port, buf, nl) _outsl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl)) 148#define outsl(port, buf, nl) _outsl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl))
143 149
144#endif
145
146#define readb_relaxed(addr) readb(addr) 150#define readb_relaxed(addr) readb(addr)
147#define readw_relaxed(addr) readw(addr) 151#define readw_relaxed(addr) readw(addr)
148#define readl_relaxed(addr) readl(addr) 152#define readl_relaxed(addr) readl(addr)
@@ -159,7 +163,11 @@ extern void _outsw_ns(volatile u16 __iomem *port, const void *buf, int ns);
159extern void _insl_ns(volatile u32 __iomem *port, void *buf, int nl); 163extern void _insl_ns(volatile u32 __iomem *port, void *buf, int nl);
160extern void _outsl_ns(volatile u32 __iomem *port, const void *buf, int nl); 164extern void _outsl_ns(volatile u32 __iomem *port, const void *buf, int nl);
161 165
162#define mmiowb() 166static inline void mmiowb(void)
167{
168 __asm__ __volatile__ ("sync" : : : "memory");
169 get_paca()->io_sync = 0;
170}
163 171
164/* 172/*
165 * output pause versions need a delay at least for the 173 * output pause versions need a delay at least for the
@@ -275,22 +283,23 @@ static inline int in_8(const volatile unsigned char __iomem *addr)
275{ 283{
276 int ret; 284 int ret;
277 285
278 __asm__ __volatile__("lbz%U1%X1 %0,%1; twi 0,%0,0; isync" 286 __asm__ __volatile__("sync; lbz%U1%X1 %0,%1; twi 0,%0,0; isync"
279 : "=r" (ret) : "m" (*addr)); 287 : "=r" (ret) : "m" (*addr));
280 return ret; 288 return ret;
281} 289}
282 290
283static inline void out_8(volatile unsigned char __iomem *addr, int val) 291static inline void out_8(volatile unsigned char __iomem *addr, int val)
284{ 292{
285 __asm__ __volatile__("stb%U0%X0 %1,%0; sync" 293 __asm__ __volatile__("sync; stb%U0%X0 %1,%0"
286 : "=m" (*addr) : "r" (val)); 294 : "=m" (*addr) : "r" (val));
295 get_paca()->io_sync = 1;
287} 296}
288 297
289static inline int in_le16(const volatile unsigned short __iomem *addr) 298static inline int in_le16(const volatile unsigned short __iomem *addr)
290{ 299{
291 int ret; 300 int ret;
292 301
293 __asm__ __volatile__("lhbrx %0,0,%1; twi 0,%0,0; isync" 302 __asm__ __volatile__("sync; lhbrx %0,0,%1; twi 0,%0,0; isync"
294 : "=r" (ret) : "r" (addr), "m" (*addr)); 303 : "=r" (ret) : "r" (addr), "m" (*addr));
295 return ret; 304 return ret;
296} 305}
@@ -299,28 +308,30 @@ static inline int in_be16(const volatile unsigned short __iomem *addr)
299{ 308{
300 int ret; 309 int ret;
301 310
302 __asm__ __volatile__("lhz%U1%X1 %0,%1; twi 0,%0,0; isync" 311 __asm__ __volatile__("sync; lhz%U1%X1 %0,%1; twi 0,%0,0; isync"
303 : "=r" (ret) : "m" (*addr)); 312 : "=r" (ret) : "m" (*addr));
304 return ret; 313 return ret;
305} 314}
306 315
307static inline void out_le16(volatile unsigned short __iomem *addr, int val) 316static inline void out_le16(volatile unsigned short __iomem *addr, int val)
308{ 317{
309 __asm__ __volatile__("sthbrx %1,0,%2; sync" 318 __asm__ __volatile__("sync; sthbrx %1,0,%2"
310 : "=m" (*addr) : "r" (val), "r" (addr)); 319 : "=m" (*addr) : "r" (val), "r" (addr));
320 get_paca()->io_sync = 1;
311} 321}
312 322
313static inline void out_be16(volatile unsigned short __iomem *addr, int val) 323static inline void out_be16(volatile unsigned short __iomem *addr, int val)
314{ 324{
315 __asm__ __volatile__("sth%U0%X0 %1,%0; sync" 325 __asm__ __volatile__("sync; sth%U0%X0 %1,%0"
316 : "=m" (*addr) : "r" (val)); 326 : "=m" (*addr) : "r" (val));
327 get_paca()->io_sync = 1;
317} 328}
318 329
319static inline unsigned in_le32(const volatile unsigned __iomem *addr) 330static inline unsigned in_le32(const volatile unsigned __iomem *addr)
320{ 331{
321 unsigned ret; 332 unsigned ret;
322 333
323 __asm__ __volatile__("lwbrx %0,0,%1; twi 0,%0,0; isync" 334 __asm__ __volatile__("sync; lwbrx %0,0,%1; twi 0,%0,0; isync"
324 : "=r" (ret) : "r" (addr), "m" (*addr)); 335 : "=r" (ret) : "r" (addr), "m" (*addr));
325 return ret; 336 return ret;
326} 337}
@@ -329,21 +340,23 @@ static inline unsigned in_be32(const volatile unsigned __iomem *addr)
329{ 340{
330 unsigned ret; 341 unsigned ret;
331 342
332 __asm__ __volatile__("lwz%U1%X1 %0,%1; twi 0,%0,0; isync" 343 __asm__ __volatile__("sync; lwz%U1%X1 %0,%1; twi 0,%0,0; isync"
333 : "=r" (ret) : "m" (*addr)); 344 : "=r" (ret) : "m" (*addr));
334 return ret; 345 return ret;
335} 346}
336 347
337static inline void out_le32(volatile unsigned __iomem *addr, int val) 348static inline void out_le32(volatile unsigned __iomem *addr, int val)
338{ 349{
339 __asm__ __volatile__("stwbrx %1,0,%2; sync" : "=m" (*addr) 350 __asm__ __volatile__("sync; stwbrx %1,0,%2" : "=m" (*addr)
340 : "r" (val), "r" (addr)); 351 : "r" (val), "r" (addr));
352 get_paca()->io_sync = 1;
341} 353}
342 354
343static inline void out_be32(volatile unsigned __iomem *addr, int val) 355static inline void out_be32(volatile unsigned __iomem *addr, int val)
344{ 356{
345 __asm__ __volatile__("stw%U0%X0 %1,%0; sync" 357 __asm__ __volatile__("sync; stw%U0%X0 %1,%0"
346 : "=m" (*addr) : "r" (val)); 358 : "=m" (*addr) : "r" (val));
359 get_paca()->io_sync = 1;
347} 360}
348 361
349static inline unsigned long in_le64(const volatile unsigned long __iomem *addr) 362static inline unsigned long in_le64(const volatile unsigned long __iomem *addr)
@@ -351,6 +364,7 @@ static inline unsigned long in_le64(const volatile unsigned long __iomem *addr)
351 unsigned long tmp, ret; 364 unsigned long tmp, ret;
352 365
353 __asm__ __volatile__( 366 __asm__ __volatile__(
367 "sync\n"
354 "ld %1,0(%2)\n" 368 "ld %1,0(%2)\n"
355 "twi 0,%1,0\n" 369 "twi 0,%1,0\n"
356 "isync\n" 370 "isync\n"
@@ -369,7 +383,7 @@ static inline unsigned long in_be64(const volatile unsigned long __iomem *addr)
369{ 383{
370 unsigned long ret; 384 unsigned long ret;
371 385
372 __asm__ __volatile__("ld%U1%X1 %0,%1; twi 0,%0,0; isync" 386 __asm__ __volatile__("sync; ld%U1%X1 %0,%1; twi 0,%0,0; isync"
373 : "=r" (ret) : "m" (*addr)); 387 : "=r" (ret) : "m" (*addr));
374 return ret; 388 return ret;
375} 389}
@@ -386,14 +400,16 @@ static inline void out_le64(volatile unsigned long __iomem *addr, unsigned long
386 "rldicl %1,%1,32,0\n" 400 "rldicl %1,%1,32,0\n"
387 "rlwimi %0,%1,8,8,31\n" 401 "rlwimi %0,%1,8,8,31\n"
388 "rlwimi %0,%1,24,16,23\n" 402 "rlwimi %0,%1,24,16,23\n"
389 "std %0,0(%3)\n" 403 "sync\n"
390 "sync" 404 "std %0,0(%3)"
391 : "=&r" (tmp) , "=&r" (val) : "1" (val) , "b" (addr) , "m" (*addr)); 405 : "=&r" (tmp) , "=&r" (val) : "1" (val) , "b" (addr) , "m" (*addr));
406 get_paca()->io_sync = 1;
392} 407}
393 408
394static inline void out_be64(volatile unsigned long __iomem *addr, unsigned long val) 409static inline void out_be64(volatile unsigned long __iomem *addr, unsigned long val)
395{ 410{
396 __asm__ __volatile__("std%U0%X0 %1,%0; sync" : "=m" (*addr) : "r" (val)); 411 __asm__ __volatile__("sync; std%U0%X0 %1,%0" : "=m" (*addr) : "r" (val));
412 get_paca()->io_sync = 1;
397} 413}
398 414
399#ifndef CONFIG_PPC_ISERIES 415#ifndef CONFIG_PPC_ISERIES
diff --git a/include/asm-powerpc/ipic.h b/include/asm-powerpc/ipic.h
index 0fe396a2b666..53079ec3a515 100644
--- a/include/asm-powerpc/ipic.h
+++ b/include/asm-powerpc/ipic.h
@@ -69,9 +69,6 @@ enum ipic_mcp_irq {
69 IPIC_MCP_MU = 7, 69 IPIC_MCP_MU = 7,
70}; 70};
71 71
72extern void ipic_init(phys_addr_t phys_addr, unsigned int flags,
73 unsigned int irq_offset,
74 unsigned char *senses, unsigned int senses_count);
75extern int ipic_set_priority(unsigned int irq, unsigned int priority); 72extern int ipic_set_priority(unsigned int irq, unsigned int priority);
76extern void ipic_set_highest_priority(unsigned int irq); 73extern void ipic_set_highest_priority(unsigned int irq);
77extern void ipic_set_default_priority(void); 74extern void ipic_set_default_priority(void);
@@ -79,7 +76,16 @@ extern void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq);
79extern void ipic_disable_mcp(enum ipic_mcp_irq mcp_irq); 76extern void ipic_disable_mcp(enum ipic_mcp_irq mcp_irq);
80extern u32 ipic_get_mcp_status(void); 77extern u32 ipic_get_mcp_status(void);
81extern void ipic_clear_mcp_status(u32 mask); 78extern void ipic_clear_mcp_status(u32 mask);
79
80#ifdef CONFIG_PPC_MERGE
81extern void ipic_init(struct device_node *node, unsigned int flags);
82extern unsigned int ipic_get_irq(struct pt_regs *regs);
83#else
84extern void ipic_init(phys_addr_t phys_addr, unsigned int flags,
85 unsigned int irq_offset,
86 unsigned char *senses, unsigned int senses_count);
82extern int ipic_get_irq(struct pt_regs *regs); 87extern int ipic_get_irq(struct pt_regs *regs);
88#endif
83 89
84#endif /* __ASM_IPIC_H__ */ 90#endif /* __ASM_IPIC_H__ */
85#endif /* __KERNEL__ */ 91#endif /* __KERNEL__ */
diff --git a/include/asm-powerpc/kdump.h b/include/asm-powerpc/kdump.h
index dc1574c945f8..10e8eb1e6f4f 100644
--- a/include/asm-powerpc/kdump.h
+++ b/include/asm-powerpc/kdump.h
@@ -7,7 +7,7 @@
7/* How many bytes to reserve at zero for kdump. The reserve limit should 7/* How many bytes to reserve at zero for kdump. The reserve limit should
8 * be greater or equal to the trampoline's end address. 8 * be greater or equal to the trampoline's end address.
9 * Reserve to the end of the FWNMI area, see head_64.S */ 9 * Reserve to the end of the FWNMI area, see head_64.S */
10#define KDUMP_RESERVE_LIMIT 0x8000 10#define KDUMP_RESERVE_LIMIT 0x10000 /* 64K */
11 11
12#ifdef CONFIG_CRASH_DUMP 12#ifdef CONFIG_CRASH_DUMP
13 13
diff --git a/include/asm-powerpc/mpc86xx.h b/include/asm-powerpc/mpc86xx.h
index f260382739fa..b85df45b1a84 100644
--- a/include/asm-powerpc/mpc86xx.h
+++ b/include/asm-powerpc/mpc86xx.h
@@ -23,8 +23,6 @@
23#define _ISA_MEM_BASE isa_mem_base 23#define _ISA_MEM_BASE isa_mem_base
24#ifdef CONFIG_PCI 24#ifdef CONFIG_PCI
25#define PCI_DRAM_OFFSET pci_dram_offset 25#define PCI_DRAM_OFFSET pci_dram_offset
26#else
27#define PCI_DRAM_OFFSET 0
28#endif 26#endif
29 27
30#define CPU0_BOOT_RELEASE 0x01000000 28#define CPU0_BOOT_RELEASE 0x01000000
@@ -33,7 +31,6 @@
33#define MCM_PORT_CONFIG_OFFSET 0x1010 31#define MCM_PORT_CONFIG_OFFSET 0x1010
34 32
35/* Offset from CCSRBAR */ 33/* Offset from CCSRBAR */
36#define MPC86xx_OPENPIC_OFFSET (0x40000)
37#define MPC86xx_MCM_OFFSET (0x00000) 34#define MPC86xx_MCM_OFFSET (0x00000)
38#define MPC86xx_MCM_SIZE (0x02000) 35#define MPC86xx_MCM_SIZE (0x02000)
39 36
diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h
index eb241c99c457..a9f9604b9eff 100644
--- a/include/asm-powerpc/mpic.h
+++ b/include/asm-powerpc/mpic.h
@@ -41,6 +41,7 @@
41#define MPIC_GREG_IPI_VECTOR_PRI_1 0x000b0 41#define MPIC_GREG_IPI_VECTOR_PRI_1 0x000b0
42#define MPIC_GREG_IPI_VECTOR_PRI_2 0x000c0 42#define MPIC_GREG_IPI_VECTOR_PRI_2 0x000c0
43#define MPIC_GREG_IPI_VECTOR_PRI_3 0x000d0 43#define MPIC_GREG_IPI_VECTOR_PRI_3 0x000d0
44#define MPIC_GREG_IPI_STRIDE 0x10
44#define MPIC_GREG_SPURIOUS 0x000e0 45#define MPIC_GREG_SPURIOUS 0x000e0
45#define MPIC_GREG_TIMER_FREQ 0x000f0 46#define MPIC_GREG_TIMER_FREQ 0x000f0
46 47
@@ -68,6 +69,7 @@
68#define MPIC_CPU_IPI_DISPATCH_1 0x00050 69#define MPIC_CPU_IPI_DISPATCH_1 0x00050
69#define MPIC_CPU_IPI_DISPATCH_2 0x00060 70#define MPIC_CPU_IPI_DISPATCH_2 0x00060
70#define MPIC_CPU_IPI_DISPATCH_3 0x00070 71#define MPIC_CPU_IPI_DISPATCH_3 0x00070
72#define MPIC_CPU_IPI_DISPATCH_STRIDE 0x00010
71#define MPIC_CPU_CURRENT_TASK_PRI 0x00080 73#define MPIC_CPU_CURRENT_TASK_PRI 0x00080
72#define MPIC_CPU_TASKPRI_MASK 0x0000000f 74#define MPIC_CPU_TASKPRI_MASK 0x0000000f
73#define MPIC_CPU_WHOAMI 0x00090 75#define MPIC_CPU_WHOAMI 0x00090
@@ -114,6 +116,103 @@
114#define MPIC_VEC_TIMER_1 248 116#define MPIC_VEC_TIMER_1 248
115#define MPIC_VEC_TIMER_0 247 117#define MPIC_VEC_TIMER_0 247
116 118
119/*
120 * Tsi108 implementation of MPIC has many differences from the original one
121 */
122
123/*
124 * Global registers
125 */
126
127#define TSI108_GREG_BASE 0x00000
128#define TSI108_GREG_FEATURE_0 0x00000
129#define TSI108_GREG_GLOBAL_CONF_0 0x00004
130#define TSI108_GREG_VENDOR_ID 0x0000c
131#define TSI108_GREG_IPI_VECTOR_PRI_0 0x00204 /* Doorbell 0 */
132#define TSI108_GREG_IPI_STRIDE 0x0c
133#define TSI108_GREG_SPURIOUS 0x00010
134#define TSI108_GREG_TIMER_FREQ 0x00014
135
136/*
137 * Timer registers
138 */
139#define TSI108_TIMER_BASE 0x0030
140#define TSI108_TIMER_STRIDE 0x10
141#define TSI108_TIMER_CURRENT_CNT 0x00000
142#define TSI108_TIMER_BASE_CNT 0x00004
143#define TSI108_TIMER_VECTOR_PRI 0x00008
144#define TSI108_TIMER_DESTINATION 0x0000c
145
146/*
147 * Per-Processor registers
148 */
149#define TSI108_CPU_BASE 0x00300
150#define TSI108_CPU_STRIDE 0x00040
151#define TSI108_CPU_IPI_DISPATCH_0 0x00200
152#define TSI108_CPU_IPI_DISPATCH_STRIDE 0x00000
153#define TSI108_CPU_CURRENT_TASK_PRI 0x00000
154#define TSI108_CPU_WHOAMI 0xffffffff
155#define TSI108_CPU_INTACK 0x00004
156#define TSI108_CPU_EOI 0x00008
157
158/*
159 * Per-source registers
160 */
161#define TSI108_IRQ_BASE 0x00100
162#define TSI108_IRQ_STRIDE 0x00008
163#define TSI108_IRQ_VECTOR_PRI 0x00000
164#define TSI108_VECPRI_VECTOR_MASK 0x000000ff
165#define TSI108_VECPRI_POLARITY_POSITIVE 0x01000000
166#define TSI108_VECPRI_POLARITY_NEGATIVE 0x00000000
167#define TSI108_VECPRI_SENSE_LEVEL 0x02000000
168#define TSI108_VECPRI_SENSE_EDGE 0x00000000
169#define TSI108_VECPRI_POLARITY_MASK 0x01000000
170#define TSI108_VECPRI_SENSE_MASK 0x02000000
171#define TSI108_IRQ_DESTINATION 0x00004
172
173/* weird mpic register indices and mask bits in the HW info array */
174enum {
175 MPIC_IDX_GREG_BASE = 0,
176 MPIC_IDX_GREG_FEATURE_0,
177 MPIC_IDX_GREG_GLOBAL_CONF_0,
178 MPIC_IDX_GREG_VENDOR_ID,
179 MPIC_IDX_GREG_IPI_VECTOR_PRI_0,
180 MPIC_IDX_GREG_IPI_STRIDE,
181 MPIC_IDX_GREG_SPURIOUS,
182 MPIC_IDX_GREG_TIMER_FREQ,
183
184 MPIC_IDX_TIMER_BASE,
185 MPIC_IDX_TIMER_STRIDE,
186 MPIC_IDX_TIMER_CURRENT_CNT,
187 MPIC_IDX_TIMER_BASE_CNT,
188 MPIC_IDX_TIMER_VECTOR_PRI,
189 MPIC_IDX_TIMER_DESTINATION,
190
191 MPIC_IDX_CPU_BASE,
192 MPIC_IDX_CPU_STRIDE,
193 MPIC_IDX_CPU_IPI_DISPATCH_0,
194 MPIC_IDX_CPU_IPI_DISPATCH_STRIDE,
195 MPIC_IDX_CPU_CURRENT_TASK_PRI,
196 MPIC_IDX_CPU_WHOAMI,
197 MPIC_IDX_CPU_INTACK,
198 MPIC_IDX_CPU_EOI,
199
200 MPIC_IDX_IRQ_BASE,
201 MPIC_IDX_IRQ_STRIDE,
202 MPIC_IDX_IRQ_VECTOR_PRI,
203
204 MPIC_IDX_VECPRI_VECTOR_MASK,
205 MPIC_IDX_VECPRI_POLARITY_POSITIVE,
206 MPIC_IDX_VECPRI_POLARITY_NEGATIVE,
207 MPIC_IDX_VECPRI_SENSE_LEVEL,
208 MPIC_IDX_VECPRI_SENSE_EDGE,
209 MPIC_IDX_VECPRI_POLARITY_MASK,
210 MPIC_IDX_VECPRI_SENSE_MASK,
211 MPIC_IDX_IRQ_DESTINATION,
212 MPIC_IDX_END
213};
214
215
117#ifdef CONFIG_MPIC_BROKEN_U3 216#ifdef CONFIG_MPIC_BROKEN_U3
118/* Fixup table entry */ 217/* Fixup table entry */
119struct mpic_irq_fixup 218struct mpic_irq_fixup
@@ -171,15 +270,29 @@ struct mpic
171 volatile u32 __iomem *cpuregs[MPIC_MAX_CPUS]; 270 volatile u32 __iomem *cpuregs[MPIC_MAX_CPUS];
172 volatile u32 __iomem *isus[MPIC_MAX_ISU]; 271 volatile u32 __iomem *isus[MPIC_MAX_ISU];
173 272
273#ifdef CONFIG_MPIC_WEIRD
274 /* Pointer to HW info array */
275 u32 *hw_set;
276#endif
277
174 /* link */ 278 /* link */
175 struct mpic *next; 279 struct mpic *next;
176}; 280};
177 281
282/*
283 * MPIC flags (passed to mpic_alloc)
284 *
285 * The top 4 bits contain an MPIC bhw id that is used to index the
286 * register offsets and some masks when CONFIG_MPIC_WEIRD is set.
287 * Note setting any ID (leaving those bits to 0) means standard MPIC
288 */
289
178/* This is the primary controller, only that one has IPIs and 290/* This is the primary controller, only that one has IPIs and
179 * has afinity control. A non-primary MPIC always uses CPU0 291 * has afinity control. A non-primary MPIC always uses CPU0
180 * registers only 292 * registers only
181 */ 293 */
182#define MPIC_PRIMARY 0x00000001 294#define MPIC_PRIMARY 0x00000001
295
183/* Set this for a big-endian MPIC */ 296/* Set this for a big-endian MPIC */
184#define MPIC_BIG_ENDIAN 0x00000002 297#define MPIC_BIG_ENDIAN 0x00000002
185/* Broken U3 MPIC */ 298/* Broken U3 MPIC */
@@ -188,6 +301,18 @@ struct mpic
188#define MPIC_BROKEN_IPI 0x00000008 301#define MPIC_BROKEN_IPI 0x00000008
189/* MPIC wants a reset */ 302/* MPIC wants a reset */
190#define MPIC_WANTS_RESET 0x00000010 303#define MPIC_WANTS_RESET 0x00000010
304/* Spurious vector requires EOI */
305#define MPIC_SPV_EOI 0x00000020
306/* No passthrough disable */
307#define MPIC_NO_PTHROU_DIS 0x00000040
308
309/* MPIC HW modification ID */
310#define MPIC_REGSET_MASK 0xf0000000
311#define MPIC_REGSET(val) (((val) & 0xf ) << 28)
312#define MPIC_GET_REGSET(flags) (((flags) >> 28) & 0xf)
313
314#define MPIC_REGSET_STANDARD MPIC_REGSET(0) /* Original MPIC */
315#define MPIC_REGSET_TSI108 MPIC_REGSET(1) /* Tsi108/109 PIC */
191 316
192/* Allocate the controller structure and setup the linux irq descs 317/* Allocate the controller structure and setup the linux irq descs
193 * for the range if interrupts passed in. No HW initialization is 318 * for the range if interrupts passed in. No HW initialization is
diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h
index 2d4585f06209..3d5d590bc4b0 100644
--- a/include/asm-powerpc/paca.h
+++ b/include/asm-powerpc/paca.h
@@ -93,6 +93,7 @@ struct paca_struct {
93 u64 saved_r1; /* r1 save for RTAS calls */ 93 u64 saved_r1; /* r1 save for RTAS calls */
94 u64 saved_msr; /* MSR saved here by enter_rtas */ 94 u64 saved_msr; /* MSR saved here by enter_rtas */
95 u8 proc_enabled; /* irq soft-enable flag */ 95 u8 proc_enabled; /* irq soft-enable flag */
96 u8 io_sync; /* writel() needs spin_unlock sync */
96 97
97 /* Stuff for accurate time accounting */ 98 /* Stuff for accurate time accounting */
98 u64 user_time; /* accumulated usermode TB ticks */ 99 u64 user_time; /* accumulated usermode TB ticks */
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h
index b095a285c84b..d0fa1b9aed35 100644
--- a/include/asm-powerpc/prom.h
+++ b/include/asm-powerpc/prom.h
@@ -276,6 +276,7 @@ extern void of_irq_map_init(unsigned int flags);
276 * of_irq_map_raw - Low level interrupt tree parsing 276 * of_irq_map_raw - Low level interrupt tree parsing
277 * @parent: the device interrupt parent 277 * @parent: the device interrupt parent
278 * @intspec: interrupt specifier ("interrupts" property of the device) 278 * @intspec: interrupt specifier ("interrupts" property of the device)
279 * @ointsize: size of the passed in interrupt specifier
279 * @addr: address specifier (start of "reg" property of the device) 280 * @addr: address specifier (start of "reg" property of the device)
280 * @out_irq: structure of_irq filled by this function 281 * @out_irq: structure of_irq filled by this function
281 * 282 *
@@ -288,7 +289,8 @@ extern void of_irq_map_init(unsigned int flags);
288 * 289 *
289 */ 290 */
290 291
291extern int of_irq_map_raw(struct device_node *parent, u32 *intspec, u32 *addr, 292extern int of_irq_map_raw(struct device_node *parent, u32 *intspec,
293 u32 ointsize, u32 *addr,
292 struct of_irq *out_irq); 294 struct of_irq *out_irq);
293 295
294 296
diff --git a/include/asm-powerpc/spinlock.h b/include/asm-powerpc/spinlock.h
index 895cb6d3a42a..c31e4382a775 100644
--- a/include/asm-powerpc/spinlock.h
+++ b/include/asm-powerpc/spinlock.h
@@ -36,6 +36,19 @@
36#define LOCK_TOKEN 1 36#define LOCK_TOKEN 1
37#endif 37#endif
38 38
39#if defined(CONFIG_PPC64) && defined(CONFIG_SMP)
40#define CLEAR_IO_SYNC (get_paca()->io_sync = 0)
41#define SYNC_IO do { \
42 if (unlikely(get_paca()->io_sync)) { \
43 mb(); \
44 get_paca()->io_sync = 0; \
45 } \
46 } while (0)
47#else
48#define CLEAR_IO_SYNC
49#define SYNC_IO
50#endif
51
39/* 52/*
40 * This returns the old value in the lock, so we succeeded 53 * This returns the old value in the lock, so we succeeded
41 * in getting the lock if the return value is 0. 54 * in getting the lock if the return value is 0.
@@ -61,6 +74,7 @@ static __inline__ unsigned long __spin_trylock(raw_spinlock_t *lock)
61 74
62static int __inline__ __raw_spin_trylock(raw_spinlock_t *lock) 75static int __inline__ __raw_spin_trylock(raw_spinlock_t *lock)
63{ 76{
77 CLEAR_IO_SYNC;
64 return __spin_trylock(lock) == 0; 78 return __spin_trylock(lock) == 0;
65} 79}
66 80
@@ -91,6 +105,7 @@ extern void __rw_yield(raw_rwlock_t *lock);
91 105
92static void __inline__ __raw_spin_lock(raw_spinlock_t *lock) 106static void __inline__ __raw_spin_lock(raw_spinlock_t *lock)
93{ 107{
108 CLEAR_IO_SYNC;
94 while (1) { 109 while (1) {
95 if (likely(__spin_trylock(lock) == 0)) 110 if (likely(__spin_trylock(lock) == 0))
96 break; 111 break;
@@ -107,6 +122,7 @@ static void __inline__ __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long
107{ 122{
108 unsigned long flags_dis; 123 unsigned long flags_dis;
109 124
125 CLEAR_IO_SYNC;
110 while (1) { 126 while (1) {
111 if (likely(__spin_trylock(lock) == 0)) 127 if (likely(__spin_trylock(lock) == 0))
112 break; 128 break;
@@ -124,6 +140,7 @@ static void __inline__ __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long
124 140
125static __inline__ void __raw_spin_unlock(raw_spinlock_t *lock) 141static __inline__ void __raw_spin_unlock(raw_spinlock_t *lock)
126{ 142{
143 SYNC_IO;
127 __asm__ __volatile__("# __raw_spin_unlock\n\t" 144 __asm__ __volatile__("# __raw_spin_unlock\n\t"
128 LWSYNC_ON_SMP: : :"memory"); 145 LWSYNC_ON_SMP: : :"memory");
129 lock->slock = 0; 146 lock->slock = 0;
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h
index dcde4410348d..5785ac4737b5 100644
--- a/include/asm-powerpc/time.h
+++ b/include/asm-powerpc/time.h
@@ -30,10 +30,6 @@ extern unsigned long tb_ticks_per_usec;
30extern unsigned long tb_ticks_per_sec; 30extern unsigned long tb_ticks_per_sec;
31extern u64 tb_to_xs; 31extern u64 tb_to_xs;
32extern unsigned tb_to_us; 32extern unsigned tb_to_us;
33extern unsigned long tb_last_stamp;
34extern u64 tb_last_jiffy;
35
36DECLARE_PER_CPU(unsigned long, last_jiffy);
37 33
38struct rtc_time; 34struct rtc_time;
39extern void to_tm(int tim, struct rtc_time * tm); 35extern void to_tm(int tim, struct rtc_time * tm);
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h
index 89c6f1bc3aab..680555be22ec 100644
--- a/include/asm-ppc/io.h
+++ b/include/asm-ppc/io.h
@@ -63,7 +63,7 @@ extern inline int in_8(const volatile unsigned char __iomem *addr)
63 int ret; 63 int ret;
64 64
65 __asm__ __volatile__( 65 __asm__ __volatile__(
66 "lbz%U1%X1 %0,%1;\n" 66 "sync; lbz%U1%X1 %0,%1;\n"
67 "twi 0,%0,0;\n" 67 "twi 0,%0,0;\n"
68 "isync" : "=r" (ret) : "m" (*addr)); 68 "isync" : "=r" (ret) : "m" (*addr));
69 return ret; 69 return ret;
@@ -78,7 +78,7 @@ extern inline int in_le16(const volatile unsigned short __iomem *addr)
78{ 78{
79 int ret; 79 int ret;
80 80
81 __asm__ __volatile__("lhbrx %0,0,%1;\n" 81 __asm__ __volatile__("sync; lhbrx %0,0,%1;\n"
82 "twi 0,%0,0;\n" 82 "twi 0,%0,0;\n"
83 "isync" : "=r" (ret) : 83 "isync" : "=r" (ret) :
84 "r" (addr), "m" (*addr)); 84 "r" (addr), "m" (*addr));
@@ -89,7 +89,7 @@ extern inline int in_be16(const volatile unsigned short __iomem *addr)
89{ 89{
90 int ret; 90 int ret;
91 91
92 __asm__ __volatile__("lhz%U1%X1 %0,%1;\n" 92 __asm__ __volatile__("sync; lhz%U1%X1 %0,%1;\n"
93 "twi 0,%0,0;\n" 93 "twi 0,%0,0;\n"
94 "isync" : "=r" (ret) : "m" (*addr)); 94 "isync" : "=r" (ret) : "m" (*addr));
95 return ret; 95 return ret;
@@ -97,20 +97,20 @@ extern inline int in_be16(const volatile unsigned short __iomem *addr)
97 97
98extern inline void out_le16(volatile unsigned short __iomem *addr, int val) 98extern inline void out_le16(volatile unsigned short __iomem *addr, int val)
99{ 99{
100 __asm__ __volatile__("sthbrx %1,0,%2; eieio" : "=m" (*addr) : 100 __asm__ __volatile__("sync; sthbrx %1,0,%2" : "=m" (*addr) :
101 "r" (val), "r" (addr)); 101 "r" (val), "r" (addr));
102} 102}
103 103
104extern inline void out_be16(volatile unsigned short __iomem *addr, int val) 104extern inline void out_be16(volatile unsigned short __iomem *addr, int val)
105{ 105{
106 __asm__ __volatile__("sth%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); 106 __asm__ __volatile__("sync; sth%U0%X0 %1,%0" : "=m" (*addr) : "r" (val));
107} 107}
108 108
109extern inline unsigned in_le32(const volatile unsigned __iomem *addr) 109extern inline unsigned in_le32(const volatile unsigned __iomem *addr)
110{ 110{
111 unsigned ret; 111 unsigned ret;
112 112
113 __asm__ __volatile__("lwbrx %0,0,%1;\n" 113 __asm__ __volatile__("sync; lwbrx %0,0,%1;\n"
114 "twi 0,%0,0;\n" 114 "twi 0,%0,0;\n"
115 "isync" : "=r" (ret) : 115 "isync" : "=r" (ret) :
116 "r" (addr), "m" (*addr)); 116 "r" (addr), "m" (*addr));
@@ -121,7 +121,7 @@ extern inline unsigned in_be32(const volatile unsigned __iomem *addr)
121{ 121{
122 unsigned ret; 122 unsigned ret;
123 123
124 __asm__ __volatile__("lwz%U1%X1 %0,%1;\n" 124 __asm__ __volatile__("sync; lwz%U1%X1 %0,%1;\n"
125 "twi 0,%0,0;\n" 125 "twi 0,%0,0;\n"
126 "isync" : "=r" (ret) : "m" (*addr)); 126 "isync" : "=r" (ret) : "m" (*addr));
127 return ret; 127 return ret;
@@ -129,13 +129,13 @@ extern inline unsigned in_be32(const volatile unsigned __iomem *addr)
129 129
130extern inline void out_le32(volatile unsigned __iomem *addr, int val) 130extern inline void out_le32(volatile unsigned __iomem *addr, int val)
131{ 131{
132 __asm__ __volatile__("stwbrx %1,0,%2; eieio" : "=m" (*addr) : 132 __asm__ __volatile__("sync; stwbrx %1,0,%2" : "=m" (*addr) :
133 "r" (val), "r" (addr)); 133 "r" (val), "r" (addr));
134} 134}
135 135
136extern inline void out_be32(volatile unsigned __iomem *addr, int val) 136extern inline void out_be32(volatile unsigned __iomem *addr, int val)
137{ 137{
138 __asm__ __volatile__("stw%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); 138 __asm__ __volatile__("sync; stw%U0%X0 %1,%0" : "=m" (*addr) : "r" (val));
139} 139}
140#if defined (CONFIG_8260_PCI9) 140#if defined (CONFIG_8260_PCI9)
141#define readb(addr) in_8((volatile u8 *)(addr)) 141#define readb(addr) in_8((volatile u8 *)(addr))
@@ -259,6 +259,7 @@ extern __inline__ unsigned int name(unsigned int port) \
259{ \ 259{ \
260 unsigned int x; \ 260 unsigned int x; \
261 __asm__ __volatile__( \ 261 __asm__ __volatile__( \
262 "sync\n" \
262 "0:" op " %0,0,%1\n" \ 263 "0:" op " %0,0,%1\n" \
263 "1: twi 0,%0,0\n" \ 264 "1: twi 0,%0,0\n" \
264 "2: isync\n" \ 265 "2: isync\n" \
@@ -284,6 +285,7 @@ extern __inline__ unsigned int name(unsigned int port) \
284extern __inline__ void name(unsigned int val, unsigned int port) \ 285extern __inline__ void name(unsigned int val, unsigned int port) \
285{ \ 286{ \
286 __asm__ __volatile__( \ 287 __asm__ __volatile__( \
288 "sync\n" \
287 "0:" op " %0,0,%1\n" \ 289 "0:" op " %0,0,%1\n" \
288 "1: sync\n" \ 290 "1: sync\n" \
289 "2:\n" \ 291 "2:\n" \
diff --git a/include/asm-s390/debug.h b/include/asm-s390/debug.h
index 7f1ef99fd1e1..c00dd2b3dc50 100644
--- a/include/asm-s390/debug.h
+++ b/include/asm-s390/debug.h
@@ -10,7 +10,6 @@
10#define DEBUG_H 10#define DEBUG_H
11 11
12#include <linux/fs.h> 12#include <linux/fs.h>
13#include <linux/string.h>
14 13
15/* Note: 14/* Note:
16 * struct __debug_entry must be defined outside of #ifdef __KERNEL__ 15 * struct __debug_entry must be defined outside of #ifdef __KERNEL__
@@ -35,6 +34,7 @@ struct __debug_entry{
35#define __DEBUG_FEATURE_VERSION 2 /* version of debug feature */ 34#define __DEBUG_FEATURE_VERSION 2 /* version of debug feature */
36 35
37#ifdef __KERNEL__ 36#ifdef __KERNEL__
37#include <linux/string.h>
38#include <linux/spinlock.h> 38#include <linux/spinlock.h>
39#include <linux/kernel.h> 39#include <linux/kernel.h>
40#include <linux/time.h> 40#include <linux/time.h>
diff --git a/include/asm-s390/elf.h b/include/asm-s390/elf.h
index 710646e64f7d..c0d629d61d3e 100644
--- a/include/asm-s390/elf.h
+++ b/include/asm-s390/elf.h
@@ -93,19 +93,6 @@
93#define R_390_NUM 61 93#define R_390_NUM 61
94 94
95/* 95/*
96 * ELF register definitions..
97 */
98
99#include <linux/sched.h> /* for task_struct */
100#include <asm/ptrace.h>
101#include <asm/user.h>
102#include <asm/system.h> /* for save_access_regs */
103
104
105typedef s390_fp_regs elf_fpregset_t;
106typedef s390_regs elf_gregset_t;
107
108/*
109 * These are used to set parameters in the core dumps. 96 * These are used to set parameters in the core dumps.
110 */ 97 */
111#ifndef __s390x__ 98#ifndef __s390x__
@@ -117,6 +104,20 @@ typedef s390_regs elf_gregset_t;
117#define ELF_ARCH EM_S390 104#define ELF_ARCH EM_S390
118 105
119/* 106/*
107 * ELF register definitions..
108 */
109
110#include <asm/ptrace.h>
111#include <asm/user.h>
112
113typedef s390_fp_regs elf_fpregset_t;
114typedef s390_regs elf_gregset_t;
115
116#ifdef __KERNEL__
117#include <linux/sched.h> /* for task_struct */
118#include <asm/system.h> /* for save_access_regs */
119
120/*
120 * This is used to ensure we don't load something for the wrong architecture. 121 * This is used to ensure we don't load something for the wrong architecture.
121 */ 122 */
122#define elf_check_arch(x) \ 123#define elf_check_arch(x) \
@@ -198,7 +199,6 @@ static inline int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpregs)
198 199
199#define ELF_PLATFORM (NULL) 200#define ELF_PLATFORM (NULL)
200 201
201#ifdef __KERNEL__
202#ifndef __s390x__ 202#ifndef __s390x__
203#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) 203#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
204#else /* __s390x__ */ 204#else /* __s390x__ */
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h
index a5559e38744e..5a057b00f19a 100644
--- a/include/asm-sh/page.h
+++ b/include/asm-sh/page.h
@@ -104,7 +104,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
104 104
105/* PFN start number, because of __MEMORY_START */ 105/* PFN start number, because of __MEMORY_START */
106#define PFN_START (__MEMORY_START >> PAGE_SHIFT) 106#define PFN_START (__MEMORY_START >> PAGE_SHIFT)
107#define ARCH_PFN_OFFSET (FPN_START) 107#define ARCH_PFN_OFFSET (PFN_START)
108#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) 108#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
109#define pfn_valid(pfn) (((pfn) - PFN_START) < max_mapnr) 109#define pfn_valid(pfn) (((pfn) - PFN_START) < max_mapnr)
110#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) 110#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
diff --git a/include/asm-sh64/bug.h b/include/asm-sh64/bug.h
index 81f722efeb63..f3a9c9248ef4 100644
--- a/include/asm-sh64/bug.h
+++ b/include/asm-sh64/bug.h
@@ -1,7 +1,7 @@
1#ifndef __ASM_SH64_BUG_H 1#ifndef __ASM_SH64_BUG_H
2#define __ASM_SH64_BUG_H 2#define __ASM_SH64_BUG_H
3 3
4 4#ifdef CONFIG_BUG
5/* 5/*
6 * Tell the user there is some problem, then force a segfault (in process 6 * Tell the user there is some problem, then force a segfault (in process
7 * context) or a panic (interrupt context). 7 * context) or a panic (interrupt context).
@@ -11,17 +11,9 @@
11 *(volatile int *)0 = 0; \ 11 *(volatile int *)0 = 0; \
12} while (0) 12} while (0)
13 13
14#define BUG_ON(condition) do { \ 14#define HAVE_ARCH_BUG
15 if (unlikely((condition)!=0)) \ 15#endif
16 BUG(); \
17} while(0)
18 16
19#define WARN_ON(condition) do { \ 17#include <asm-generic/bug.h>
20 if (unlikely((condition)!=0)) { \
21 printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \
22 dump_stack(); \
23 } \
24} while (0)
25 18
26#endif /* __ASM_SH64_BUG_H */ 19#endif /* __ASM_SH64_BUG_H */
27
diff --git a/include/asm-sh64/byteorder.h b/include/asm-sh64/byteorder.h
index f602ebe334eb..7419d78820ee 100644
--- a/include/asm-sh64/byteorder.h
+++ b/include/asm-sh64/byteorder.h
@@ -14,7 +14,7 @@
14 14
15#include <asm/types.h> 15#include <asm/types.h>
16 16
17static __inline__ __const__ __u32 ___arch__swab32(__u32 x) 17static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
18{ 18{
19 __asm__("byterev %0, %0\n\t" 19 __asm__("byterev %0, %0\n\t"
20 "shari %0, 32, %0" 20 "shari %0, 32, %0"
@@ -23,7 +23,7 @@ static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
23 return x; 23 return x;
24} 24}
25 25
26static __inline__ __const__ __u16 ___arch__swab16(__u16 x) 26static inline __attribute_const__ __u16 ___arch__swab16(__u16 x)
27{ 27{
28 __asm__("byterev %0, %0\n\t" 28 __asm__("byterev %0, %0\n\t"
29 "shari %0, 48, %0" 29 "shari %0, 48, %0"
diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h
index a74a49e47922..68e27a8fca31 100644
--- a/include/asm-sh64/dma-mapping.h
+++ b/include/asm-sh64/dma-mapping.h
@@ -126,22 +126,30 @@ static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg,
126static inline void dma_sync_single_for_cpu(struct device *dev, 126static inline void dma_sync_single_for_cpu(struct device *dev,
127 dma_addr_t dma_handle, size_t size, 127 dma_addr_t dma_handle, size_t size,
128 enum dma_data_direction dir) 128 enum dma_data_direction dir)
129 __attribute__ ((alias("dma_sync_single"))); 129{
130 dma_sync_single(dev, dma_handle, size, dir);
131}
130 132
131static inline void dma_sync_single_for_device(struct device *dev, 133static inline void dma_sync_single_for_device(struct device *dev,
132 dma_addr_t dma_handle, size_t size, 134 dma_addr_t dma_handle, size_t size,
133 enum dma_data_direction dir) 135 enum dma_data_direction dir)
134 __attribute__ ((alias("dma_sync_single"))); 136{
137 dma_sync_single(dev, dma_handle, size, dir);
138}
135 139
136static inline void dma_sync_sg_for_cpu(struct device *dev, 140static inline void dma_sync_sg_for_cpu(struct device *dev,
137 struct scatterlist *sg, int nelems, 141 struct scatterlist *sg, int nelems,
138 enum dma_data_direction dir) 142 enum dma_data_direction dir)
139 __attribute__ ((alias("dma_sync_sg"))); 143{
144 dma_sync_sg(dev, sg, nelems, dir);
145}
140 146
141static inline void dma_sync_sg_for_device(struct device *dev, 147static inline void dma_sync_sg_for_device(struct device *dev,
142 struct scatterlist *sg, int nelems, 148 struct scatterlist *sg, int nelems,
143 enum dma_data_direction dir) 149 enum dma_data_direction dir)
144 __attribute__ ((alias("dma_sync_sg"))); 150{
151 dma_sync_sg(dev, sg, nelems, dir);
152}
145 153
146static inline int dma_get_cache_alignment(void) 154static inline int dma_get_cache_alignment(void)
147{ 155{
diff --git a/include/asm-sh64/io.h b/include/asm-sh64/io.h
index dee4f77929a4..252fedbb6621 100644
--- a/include/asm-sh64/io.h
+++ b/include/asm-sh64/io.h
@@ -123,6 +123,13 @@ void insw(unsigned long port, void *addr, unsigned long count);
123void outsl(unsigned long port, const void *addr, unsigned long count); 123void outsl(unsigned long port, const void *addr, unsigned long count);
124void insl(unsigned long port, void *addr, unsigned long count); 124void insl(unsigned long port, void *addr, unsigned long count);
125 125
126#define __raw_readb readb
127#define __raw_readw readw
128#define __raw_readl readl
129#define __raw_writeb writeb
130#define __raw_writew writew
131#define __raw_writel writel
132
126void memcpy_toio(void __iomem *to, const void *from, long count); 133void memcpy_toio(void __iomem *to, const void *from, long count);
127void memcpy_fromio(void *to, void __iomem *from, long count); 134void memcpy_fromio(void *to, void __iomem *from, long count);
128 135
diff --git a/include/asm-sh64/ptrace.h b/include/asm-sh64/ptrace.h
index 56190f521587..a6d4da519db6 100644
--- a/include/asm-sh64/ptrace.h
+++ b/include/asm-sh64/ptrace.h
@@ -28,7 +28,7 @@ struct pt_regs {
28#ifdef __KERNEL__ 28#ifdef __KERNEL__
29#define user_mode(regs) (((regs)->sr & 0x40000000)==0) 29#define user_mode(regs) (((regs)->sr & 0x40000000)==0)
30#define instruction_pointer(regs) ((regs)->pc) 30#define instruction_pointer(regs) ((regs)->pc)
31#define profile_pc(regs) instruction_pointer(regs) 31#define profile_pc(regs) ((unsigned long)instruction_pointer(regs))
32extern void show_regs(struct pt_regs *); 32extern void show_regs(struct pt_regs *);
33#endif 33#endif
34 34
diff --git a/include/asm-sh64/system.h b/include/asm-sh64/system.h
index 87ef6f1ad5a4..b1598c26fcb0 100644
--- a/include/asm-sh64/system.h
+++ b/include/asm-sh64/system.h
@@ -64,7 +64,7 @@ extern void __xchg_called_with_bad_pointer(void);
64#define smp_read_barrier_depends() do { } while (0) 64#define smp_read_barrier_depends() do { } while (0)
65#endif /* CONFIG_SMP */ 65#endif /* CONFIG_SMP */
66 66
67#define set_rmb(var, value) do { xchg(&var, value); } while (0) 67#define set_rmb(var, value) do { (void)xchg(&var, value); } while (0)
68#define set_mb(var, value) set_rmb(var, value) 68#define set_mb(var, value) set_rmb(var, value)
69 69
70/* Interrupt Control */ 70/* Interrupt Control */
diff --git a/include/asm-sh64/uaccess.h b/include/asm-sh64/uaccess.h
index f4936d8fa617..644c67b65f94 100644
--- a/include/asm-sh64/uaccess.h
+++ b/include/asm-sh64/uaccess.h
@@ -128,25 +128,20 @@ do { \
128 128
129#define __get_user_nocheck(x,ptr,size) \ 129#define __get_user_nocheck(x,ptr,size) \
130({ \ 130({ \
131 long __gu_addr = (long)(ptr); \ 131 long __gu_err, __gu_val; \
132 long __gu_err; \ 132 __get_user_size((void *)&__gu_val, (long)(ptr), \
133 __typeof(*(ptr)) __gu_val; \ 133 (size), __gu_err); \
134 __asm__ ("":"=r" (__gu_val)); \ 134 (x) = (__typeof__(*(ptr)))__gu_val; \
135 __asm__ ("":"=r" (__gu_err)); \
136 __get_user_size((void *)&__gu_val, __gu_addr, (size), __gu_err); \
137 (x) = (__typeof__(*(ptr))) __gu_val; \
138 __gu_err; \ 135 __gu_err; \
139}) 136})
140 137
141#define __get_user_check(x,ptr,size) \ 138#define __get_user_check(x,ptr,size) \
142({ \ 139({ \
143 long __gu_addr = (long)(ptr); \ 140 long __gu_addr = (long)(ptr); \
144 long __gu_err = -EFAULT; \ 141 long __gu_err = -EFAULT, __gu_val; \
145 __typeof(*(ptr)) __gu_val; \
146 __asm__ ("":"=r" (__gu_val)); \
147 __asm__ ("":"=r" (__gu_err)); \
148 if (__access_ok(__gu_addr, (size))) \ 142 if (__access_ok(__gu_addr, (size))) \
149 __get_user_size((void *)&__gu_val, __gu_addr, (size), __gu_err); \ 143 __get_user_size((void *)&__gu_val, __gu_addr, \
144 (size), __gu_err); \
150 (x) = (__typeof__(*(ptr))) __gu_val; \ 145 (x) = (__typeof__(*(ptr))) __gu_val; \
151 __gu_err; \ 146 __gu_err; \
152}) 147})
diff --git a/include/asm-sparc/mman.h b/include/asm-sparc/mman.h
index 88d1886abf3b..b7dc40bc68f4 100644
--- a/include/asm-sparc/mman.h
+++ b/include/asm-sparc/mman.h
@@ -35,4 +35,12 @@
35 35
36#define MADV_FREE 0x5 /* (Solaris) contents can be freed */ 36#define MADV_FREE 0x5 /* (Solaris) contents can be freed */
37 37
38#ifdef __KERNEL__
39#ifndef __ASSEMBLY__
40#define arch_mmap_check sparc_mmap_check
41int sparc_mmap_check(unsigned long addr, unsigned long len,
42 unsigned long flags);
43#endif
44#endif
45
38#endif /* __SPARC_MMAN_H__ */ 46#endif /* __SPARC_MMAN_H__ */
diff --git a/include/asm-sparc64/mman.h b/include/asm-sparc64/mman.h
index 6fd878e61435..8cc1860be630 100644
--- a/include/asm-sparc64/mman.h
+++ b/include/asm-sparc64/mman.h
@@ -35,4 +35,12 @@
35 35
36#define MADV_FREE 0x5 /* (Solaris) contents can be freed */ 36#define MADV_FREE 0x5 /* (Solaris) contents can be freed */
37 37
38#ifdef __KERNEL__
39#ifndef __ASSEMBLY__
40#define arch_mmap_check sparc64_mmap_check
41int sparc64_mmap_check(unsigned long addr, unsigned long len,
42 unsigned long flags);
43#endif
44#endif
45
38#endif /* __SPARC64_MMAN_H__ */ 46#endif /* __SPARC64_MMAN_H__ */
diff --git a/include/asm-x86_64/alternative.h b/include/asm-x86_64/alternative.h
index aa67bfd1b3ce..a584826cc570 100644
--- a/include/asm-x86_64/alternative.h
+++ b/include/asm-x86_64/alternative.h
@@ -4,6 +4,7 @@
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
6#include <linux/types.h> 6#include <linux/types.h>
7#include <asm/cpufeature.h>
7 8
8struct alt_instr { 9struct alt_instr {
9 u8 *instr; /* original instruction */ 10 u8 *instr; /* original instruction */
@@ -102,9 +103,6 @@ static inline void alternatives_smp_switch(int smp) {}
102/* 103/*
103 * Alternative inline assembly for SMP. 104 * Alternative inline assembly for SMP.
104 * 105 *
105 * alternative_smp() takes two versions (SMP first, UP second) and is
106 * for more complex stuff such as spinlocks.
107 *
108 * The LOCK_PREFIX macro defined here replaces the LOCK and 106 * The LOCK_PREFIX macro defined here replaces the LOCK and
109 * LOCK_PREFIX macros used everywhere in the source tree. 107 * LOCK_PREFIX macros used everywhere in the source tree.
110 * 108 *
@@ -124,21 +122,6 @@ static inline void alternatives_smp_switch(int smp) {}
124 */ 122 */
125 123
126#ifdef CONFIG_SMP 124#ifdef CONFIG_SMP
127#define alternative_smp(smpinstr, upinstr, args...) \
128 asm volatile ("661:\n\t" smpinstr "\n662:\n" \
129 ".section .smp_altinstructions,\"a\"\n" \
130 " .align 8\n" \
131 " .quad 661b\n" /* label */ \
132 " .quad 663f\n" /* new instruction */ \
133 " .byte 0x66\n" /* X86_FEATURE_UP */ \
134 " .byte 662b-661b\n" /* sourcelen */ \
135 " .byte 664f-663f\n" /* replacementlen */ \
136 ".previous\n" \
137 ".section .smp_altinstr_replacement,\"awx\"\n" \
138 "663:\n\t" upinstr "\n" /* replacement */ \
139 "664:\n\t.fill 662b-661b,1,0x42\n" /* space for original */ \
140 ".previous" : args)
141
142#define LOCK_PREFIX \ 125#define LOCK_PREFIX \
143 ".section .smp_locks,\"a\"\n" \ 126 ".section .smp_locks,\"a\"\n" \
144 " .align 8\n" \ 127 " .align 8\n" \
@@ -147,8 +130,6 @@ static inline void alternatives_smp_switch(int smp) {}
147 "661:\n\tlock; " 130 "661:\n\tlock; "
148 131
149#else /* ! CONFIG_SMP */ 132#else /* ! CONFIG_SMP */
150#define alternative_smp(smpinstr, upinstr, args...) \
151 asm volatile (upinstr : args)
152#define LOCK_PREFIX "" 133#define LOCK_PREFIX ""
153#endif 134#endif
154 135
diff --git a/include/asm-x86_64/elf.h b/include/asm-x86_64/elf.h
index b4f8f4a41a6e..a406fcb1e924 100644
--- a/include/asm-x86_64/elf.h
+++ b/include/asm-x86_64/elf.h
@@ -7,8 +7,6 @@
7 7
8#include <asm/ptrace.h> 8#include <asm/ptrace.h>
9#include <asm/user.h> 9#include <asm/user.h>
10#include <asm/processor.h>
11#include <asm/compat.h>
12 10
13/* x86-64 relocation types */ 11/* x86-64 relocation types */
14#define R_X86_64_NONE 0 /* No reloc */ 12#define R_X86_64_NONE 0 /* No reloc */
@@ -39,18 +37,23 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
39typedef struct user_i387_struct elf_fpregset_t; 37typedef struct user_i387_struct elf_fpregset_t;
40 38
41/* 39/*
42 * This is used to ensure we don't load something for the wrong architecture.
43 */
44#define elf_check_arch(x) \
45 ((x)->e_machine == EM_X86_64)
46
47/*
48 * These are used to set parameters in the core dumps. 40 * These are used to set parameters in the core dumps.
49 */ 41 */
50#define ELF_CLASS ELFCLASS64 42#define ELF_CLASS ELFCLASS64
51#define ELF_DATA ELFDATA2LSB 43#define ELF_DATA ELFDATA2LSB
52#define ELF_ARCH EM_X86_64 44#define ELF_ARCH EM_X86_64
53 45
46#ifdef __KERNEL__
47#include <asm/processor.h>
48#include <asm/compat.h>
49
50/*
51 * This is used to ensure we don't load something for the wrong architecture.
52 */
53#define elf_check_arch(x) \
54 ((x)->e_machine == EM_X86_64)
55
56
54/* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx 57/* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx
55 contains a pointer to a function which might be registered using `atexit'. 58 contains a pointer to a function which might be registered using `atexit'.
56 This provides a mean for the dynamic linker to call DT_FINI functions for 59 This provides a mean for the dynamic linker to call DT_FINI functions for
@@ -141,7 +144,6 @@ typedef struct user_i387_struct elf_fpregset_t;
141/* I'm not sure if we can use '-' here */ 144/* I'm not sure if we can use '-' here */
142#define ELF_PLATFORM ("x86_64") 145#define ELF_PLATFORM ("x86_64")
143 146
144#ifdef __KERNEL__
145extern void set_personality_64bit(void); 147extern void set_personality_64bit(void);
146#define SET_PERSONALITY(ex, ibcs2) set_personality_64bit() 148#define SET_PERSONALITY(ex, ibcs2) set_personality_64bit()
147/* 149/*
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h
index 3b3c1217fe61..de9c3147ee4c 100644
--- a/include/asm-x86_64/processor.h
+++ b/include/asm-x86_64/processor.h
@@ -232,8 +232,14 @@ struct tss_struct {
232 unsigned long io_bitmap[IO_BITMAP_LONGS + 1]; 232 unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
233} __attribute__((packed)) ____cacheline_aligned; 233} __attribute__((packed)) ____cacheline_aligned;
234 234
235
235extern struct cpuinfo_x86 boot_cpu_data; 236extern struct cpuinfo_x86 boot_cpu_data;
236DECLARE_PER_CPU(struct tss_struct,init_tss); 237DECLARE_PER_CPU(struct tss_struct,init_tss);
238/* Save the original ist values for checking stack pointers during debugging */
239struct orig_ist {
240 unsigned long ist[7];
241};
242DECLARE_PER_CPU(struct orig_ist, orig_ist);
237 243
238#ifdef CONFIG_X86_VSMP 244#ifdef CONFIG_X86_VSMP
239#define ARCH_MIN_TASKALIGN (1 << INTERNODE_CACHE_SHIFT) 245#define ARCH_MIN_TASKALIGN (1 << INTERNODE_CACHE_SHIFT)
diff --git a/include/asm-x86_64/signal.h b/include/asm-x86_64/signal.h
index cef7a7d51b7e..3ede2a61973a 100644
--- a/include/asm-x86_64/signal.h
+++ b/include/asm-x86_64/signal.h
@@ -3,13 +3,13 @@
3 3
4#ifndef __ASSEMBLY__ 4#ifndef __ASSEMBLY__
5#include <linux/types.h> 5#include <linux/types.h>
6#include <linux/linkage.h>
7#include <linux/time.h> 6#include <linux/time.h>
8 7
9/* Avoid too many header ordering problems. */ 8/* Avoid too many header ordering problems. */
10struct siginfo; 9struct siginfo;
11 10
12#ifdef __KERNEL__ 11#ifdef __KERNEL__
12#include <linux/linkage.h>
13/* Most things should be clean enough to redefine this at will, if care 13/* Most things should be clean enough to redefine this at will, if care
14 is taken to make libc match. */ 14 is taken to make libc match. */
15 15
diff --git a/include/asm-x86_64/spinlock.h b/include/asm-x86_64/spinlock.h
index 8d3421996f94..248a79f0eaff 100644
--- a/include/asm-x86_64/spinlock.h
+++ b/include/asm-x86_64/spinlock.h
@@ -21,7 +21,7 @@
21 21
22#define __raw_spin_lock_string \ 22#define __raw_spin_lock_string \
23 "\n1:\t" \ 23 "\n1:\t" \
24 "lock ; decl %0\n\t" \ 24 LOCK_PREFIX " ; decl %0\n\t" \
25 "js 2f\n" \ 25 "js 2f\n" \
26 LOCK_SECTION_START("") \ 26 LOCK_SECTION_START("") \
27 "2:\t" \ 27 "2:\t" \
@@ -40,10 +40,7 @@
40 40
41static inline void __raw_spin_lock(raw_spinlock_t *lock) 41static inline void __raw_spin_lock(raw_spinlock_t *lock)
42{ 42{
43 alternative_smp( 43 asm volatile(__raw_spin_lock_string : "=m" (lock->slock) : : "memory");
44 __raw_spin_lock_string,
45 __raw_spin_lock_string_up,
46 "=m" (lock->slock) : : "memory");
47} 44}
48 45
49#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) 46#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock)
@@ -125,12 +122,12 @@ static inline int __raw_write_trylock(raw_rwlock_t *lock)
125 122
126static inline void __raw_read_unlock(raw_rwlock_t *rw) 123static inline void __raw_read_unlock(raw_rwlock_t *rw)
127{ 124{
128 asm volatile("lock ; incl %0" :"=m" (rw->lock) : : "memory"); 125 asm volatile(LOCK_PREFIX " ; incl %0" :"=m" (rw->lock) : : "memory");
129} 126}
130 127
131static inline void __raw_write_unlock(raw_rwlock_t *rw) 128static inline void __raw_write_unlock(raw_rwlock_t *rw)
132{ 129{
133 asm volatile("lock ; addl $" RW_LOCK_BIAS_STR ",%0" 130 asm volatile(LOCK_PREFIX " ; addl $" RW_LOCK_BIAS_STR ",%0"
134 : "=m" (rw->lock) : : "memory"); 131 : "=m" (rw->lock) : : "memory");
135} 132}
136 133
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h
index 94387c915e53..80fd48e84bbb 100644
--- a/include/asm-x86_64/unistd.h
+++ b/include/asm-x86_64/unistd.h
@@ -821,8 +821,6 @@ asmlinkage long sys_fork(struct pt_regs regs);
821asmlinkage long sys_vfork(struct pt_regs regs); 821asmlinkage long sys_vfork(struct pt_regs regs);
822asmlinkage long sys_pipe(int *fildes); 822asmlinkage long sys_pipe(int *fildes);
823 823
824#endif /* __KERNEL_SYSCALLS__ */
825
826#ifndef __ASSEMBLY__ 824#ifndef __ASSEMBLY__
827 825
828#include <linux/linkage.h> 826#include <linux/linkage.h>
@@ -838,9 +836,9 @@ asmlinkage long sys_rt_sigaction(int sig,
838 struct sigaction __user *oact, 836 struct sigaction __user *oact,
839 size_t sigsetsize); 837 size_t sigsetsize);
840 838
841#endif /* __ASSEMBLY__ */ 839#endif /* __ASSEMBLY__ */
842 840
843#endif /* __NO_STUBS */ 841#endif /* __KERNEL_SYSCALLS__ */
844 842
845/* 843/*
846 * "Conditional" syscalls 844 * "Conditional" syscalls
@@ -850,5 +848,8 @@ asmlinkage long sys_rt_sigaction(int sig,
850 */ 848 */
851#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 849#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
852 850
851#endif /* __NO_STUBS */
852
853#endif /* __KERNEL__ */ 853#endif /* __KERNEL__ */
854#endif 854
855#endif /* _ASM_X86_64_UNISTD_H_ */
diff --git a/include/asm-x86_64/unwind.h b/include/asm-x86_64/unwind.h
index f3e7124effe3..1f6e9bfb569e 100644
--- a/include/asm-x86_64/unwind.h
+++ b/include/asm-x86_64/unwind.h
@@ -95,6 +95,7 @@ static inline int arch_unw_user_mode(const struct unwind_frame_info *info)
95#else 95#else
96 96
97#define UNW_PC(frame) ((void)(frame), 0) 97#define UNW_PC(frame) ((void)(frame), 0)
98#define UNW_SP(frame) ((void)(frame), 0)
98 99
99static inline int arch_unw_user_mode(const void *info) 100static inline int arch_unw_user_mode(const void *info)
100{ 101{
diff --git a/include/asm-x86_64/vsyscall.h b/include/asm-x86_64/vsyscall.h
index a85e16f56d73..146b24402a5f 100644
--- a/include/asm-x86_64/vsyscall.h
+++ b/include/asm-x86_64/vsyscall.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_X86_64_VSYSCALL_H_ 1#ifndef _ASM_X86_64_VSYSCALL_H_
2#define _ASM_X86_64_VSYSCALL_H_ 2#define _ASM_X86_64_VSYSCALL_H_
3 3
4#include <linux/seqlock.h>
5
6enum vsyscall_num { 4enum vsyscall_num {
7 __NR_vgettimeofday, 5 __NR_vgettimeofday,
8 __NR_vtime, 6 __NR_vtime,
@@ -14,6 +12,7 @@ enum vsyscall_num {
14#define VSYSCALL_ADDR(vsyscall_nr) (VSYSCALL_START+VSYSCALL_SIZE*(vsyscall_nr)) 12#define VSYSCALL_ADDR(vsyscall_nr) (VSYSCALL_START+VSYSCALL_SIZE*(vsyscall_nr))
15 13
16#ifdef __KERNEL__ 14#ifdef __KERNEL__
15#include <linux/seqlock.h>
17 16
18#define __section_vxtime __attribute__ ((unused, __section__ (".vxtime"), aligned(16))) 17#define __section_vxtime __attribute__ ((unused, __section__ (".vxtime"), aligned(16)))
19#define __section_wall_jiffies __attribute__ ((unused, __section__ (".wall_jiffies"), aligned(16))) 18#define __section_wall_jiffies __attribute__ ((unused, __section__ (".wall_jiffies"), aligned(16)))
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h
index 41788a31c438..2096e5c72827 100644
--- a/include/linux/atmdev.h
+++ b/include/linux/atmdev.h
@@ -7,7 +7,6 @@
7#define LINUX_ATMDEV_H 7#define LINUX_ATMDEV_H
8 8
9 9
10#include <linux/device.h>
11#include <linux/atmapi.h> 10#include <linux/atmapi.h>
12#include <linux/atm.h> 11#include <linux/atm.h>
13#include <linux/atmioc.h> 12#include <linux/atmioc.h>
@@ -210,6 +209,7 @@ struct atm_cirange {
210 209
211#ifdef __KERNEL__ 210#ifdef __KERNEL__
212 211
212#include <linux/device.h>
213#include <linux/wait.h> /* wait_queue_head_t */ 213#include <linux/wait.h> /* wait_queue_head_t */
214#include <linux/time.h> /* struct timeval */ 214#include <linux/time.h> /* struct timeval */
215#include <linux/net.h> 215#include <linux/net.h>
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 64f9f9e56ac5..40a6c26294ae 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -132,6 +132,10 @@
132#define AUDIT_CLASS_DIR_WRITE_32 1 132#define AUDIT_CLASS_DIR_WRITE_32 1
133#define AUDIT_CLASS_CHATTR 2 133#define AUDIT_CLASS_CHATTR 2
134#define AUDIT_CLASS_CHATTR_32 3 134#define AUDIT_CLASS_CHATTR_32 3
135#define AUDIT_CLASS_READ 4
136#define AUDIT_CLASS_READ_32 5
137#define AUDIT_CLASS_WRITE 6
138#define AUDIT_CLASS_WRITE_32 7
135 139
136/* This bitmask is used to validate user input. It represents all bits that 140/* This bitmask is used to validate user input. It represents all bits that
137 * are currently used in an audit field constant understood by the kernel. 141 * are currently used in an audit field constant understood by the kernel.
@@ -177,6 +181,7 @@
177#define AUDIT_EXIT 103 181#define AUDIT_EXIT 103
178#define AUDIT_SUCCESS 104 /* exit >= 0; value ignored */ 182#define AUDIT_SUCCESS 104 /* exit >= 0; value ignored */
179#define AUDIT_WATCH 105 183#define AUDIT_WATCH 105
184#define AUDIT_PERM 106
180 185
181#define AUDIT_ARG0 200 186#define AUDIT_ARG0 200
182#define AUDIT_ARG1 (AUDIT_ARG0+1) 187#define AUDIT_ARG1 (AUDIT_ARG0+1)
@@ -252,6 +257,11 @@
252#define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE) 257#define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE)
253#define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) 258#define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
254 259
260#define AUDIT_PERM_EXEC 1
261#define AUDIT_PERM_WRITE 2
262#define AUDIT_PERM_READ 4
263#define AUDIT_PERM_ATTR 8
264
255struct audit_status { 265struct audit_status {
256 __u32 mask; /* Bit mask for valid entries */ 266 __u32 mask; /* Bit mask for valid entries */
257 __u32 enabled; /* 1 = enabled, 0 = disabled */ 267 __u32 enabled; /* 1 = enabled, 0 = disabled */
@@ -314,6 +324,7 @@ struct mqstat;
314#define AUDITSC_FAILURE 2 324#define AUDITSC_FAILURE 2
315#define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS ) 325#define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS )
316extern int __init audit_register_class(int class, unsigned *list); 326extern int __init audit_register_class(int class, unsigned *list);
327extern int audit_classify_syscall(int abi, unsigned syscall);
317#ifdef CONFIG_AUDITSYSCALL 328#ifdef CONFIG_AUDITSYSCALL
318/* These are defined in auditsc.c */ 329/* These are defined in auditsc.c */
319 /* Public API */ 330 /* Public API */
diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h
index 11487b6e7127..561e2a77805c 100644
--- a/include/linux/delayacct.h
+++ b/include/linux/delayacct.h
@@ -59,10 +59,14 @@ static inline void delayacct_tsk_init(struct task_struct *tsk)
59 __delayacct_tsk_init(tsk); 59 __delayacct_tsk_init(tsk);
60} 60}
61 61
62static inline void delayacct_tsk_exit(struct task_struct *tsk) 62/* Free tsk->delays. Called from bad fork and __put_task_struct
63 * where there's no risk of tsk->delays being accessed elsewhere
64 */
65static inline void delayacct_tsk_free(struct task_struct *tsk)
63{ 66{
64 if (tsk->delays) 67 if (tsk->delays)
65 __delayacct_tsk_exit(tsk); 68 kmem_cache_free(delayacct_cache, tsk->delays);
69 tsk->delays = NULL;
66} 70}
67 71
68static inline void delayacct_blkio_start(void) 72static inline void delayacct_blkio_start(void)
@@ -101,7 +105,7 @@ static inline void delayacct_init(void)
101{} 105{}
102static inline void delayacct_tsk_init(struct task_struct *tsk) 106static inline void delayacct_tsk_init(struct task_struct *tsk)
103{} 107{}
104static inline void delayacct_tsk_exit(struct task_struct *tsk) 108static inline void delayacct_tsk_free(struct task_struct *tsk)
105{} 109{}
106static inline void delayacct_blkio_start(void) 110static inline void delayacct_blkio_start(void)
107{} 111{}
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index e4bccbcc2750..4fc379de6c2f 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -80,6 +80,7 @@ struct hrtimer_sleeper {
80 * @get_softirq_time: function to retrieve the current time from the softirq 80 * @get_softirq_time: function to retrieve the current time from the softirq
81 * @curr_timer: the timer which is executing a callback right now 81 * @curr_timer: the timer which is executing a callback right now
82 * @softirq_time: the time when running the hrtimer queue in the softirq 82 * @softirq_time: the time when running the hrtimer queue in the softirq
83 * @lock_key: the lock_class_key for use with lockdep
83 */ 84 */
84struct hrtimer_base { 85struct hrtimer_base {
85 clockid_t index; 86 clockid_t index;
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index ed3396dcc4f7..84eeecd60a02 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -56,7 +56,8 @@ typedef union {
56#endif 56#endif
57} ktime_t; 57} ktime_t;
58 58
59#define KTIME_MAX (~((u64)1 << 63)) 59#define KTIME_MAX ((s64)~((u64)1 << 63))
60#define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC)
60 61
61/* 62/*
62 * ktime_t definitions when using the 64-bit scalar representation: 63 * ktime_t definitions when using the 64-bit scalar representation:
@@ -73,6 +74,10 @@ typedef union {
73 */ 74 */
74static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) 75static inline ktime_t ktime_set(const long secs, const unsigned long nsecs)
75{ 76{
77#if (BITS_PER_LONG == 64)
78 if (unlikely(secs >= KTIME_SEC_MAX))
79 return (ktime_t){ .tv64 = KTIME_MAX };
80#endif
76 return (ktime_t) { .tv64 = (s64)secs * NSEC_PER_SEC + (s64)nsecs }; 81 return (ktime_t) { .tv64 = (s64)secs * NSEC_PER_SEC + (s64)nsecs };
77} 82}
78 83
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index c1f021eddffa..ba095aebedff 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -77,7 +77,7 @@ struct mmc_host {
77 struct device *dev; 77 struct device *dev;
78 struct class_device class_dev; 78 struct class_device class_dev;
79 int index; 79 int index;
80 struct mmc_host_ops *ops; 80 const struct mmc_host_ops *ops;
81 unsigned int f_min; 81 unsigned int f_min;
82 unsigned int f_max; 82 unsigned int f_max;
83 u32 ocr_avail; 83 u32 ocr_avail;
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index 03a14a30c46a..627e2c08ce41 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -105,6 +105,8 @@ extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int);
105extern int mmc_wait_for_app_cmd(struct mmc_host *, unsigned int, 105extern int mmc_wait_for_app_cmd(struct mmc_host *, unsigned int,
106 struct mmc_command *, int); 106 struct mmc_command *, int);
107 107
108extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *, int);
109
108extern int __mmc_claim_host(struct mmc_host *host, struct mmc_card *card); 110extern int __mmc_claim_host(struct mmc_host *host, struct mmc_card *card);
109 111
110static inline void mmc_claim_host(struct mmc_host *host) 112static inline void mmc_claim_host(struct mmc_host *host)
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 656b588a9f96..f45163c528e8 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -77,6 +77,7 @@ struct per_cpu_pages {
77struct per_cpu_pageset { 77struct per_cpu_pageset {
78 struct per_cpu_pages pcp[2]; /* 0: hot. 1: cold */ 78 struct per_cpu_pages pcp[2]; /* 0: hot. 1: cold */
79#ifdef CONFIG_SMP 79#ifdef CONFIG_SMP
80 s8 stat_threshold;
80 s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS]; 81 s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS];
81#endif 82#endif
82} ____cacheline_aligned_in_smp; 83} ____cacheline_aligned_in_smp;
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild
index d06311acd448..1d3a14e2da6e 100644
--- a/include/linux/netfilter/Kbuild
+++ b/include/linux/netfilter/Kbuild
@@ -5,7 +5,7 @@ header-y := nf_conntrack_sctp.h nf_conntrack_tuple_common.h \
5 xt_helper.h xt_length.h xt_limit.h xt_mac.h xt_mark.h \ 5 xt_helper.h xt_length.h xt_limit.h xt_mac.h xt_mark.h \
6 xt_MARK.h xt_multiport.h xt_NFQUEUE.h xt_pkttype.h \ 6 xt_MARK.h xt_multiport.h xt_NFQUEUE.h xt_pkttype.h \
7 xt_policy.h xt_realm.h xt_sctp.h xt_state.h xt_string.h \ 7 xt_policy.h xt_realm.h xt_sctp.h xt_state.h xt_string.h \
8 xt_tcpmss.h xt_tcpudp.h 8 xt_tcpmss.h xt_tcpudp.h xt_SECMARK.h xt_CONNSECMARK.h
9 9
10unifdef-y := nf_conntrack_common.h nf_conntrack_ftp.h \ 10unifdef-y := nf_conntrack_common.h nf_conntrack_ftp.h \
11 nf_conntrack_tcp.h nfnetlink.h x_tables.h xt_physdev.h 11 nf_conntrack_tcp.h nfnetlink.h x_tables.h xt_physdev.h
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 247434553ae8..6c2066caeaab 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -9,27 +9,6 @@
9#ifndef _LINUX_NFS_FS_H 9#ifndef _LINUX_NFS_FS_H
10#define _LINUX_NFS_FS_H 10#define _LINUX_NFS_FS_H
11 11
12#include <linux/in.h>
13#include <linux/mm.h>
14#include <linux/pagemap.h>
15#include <linux/rwsem.h>
16#include <linux/wait.h>
17
18#include <linux/sunrpc/debug.h>
19#include <linux/sunrpc/auth.h>
20#include <linux/sunrpc/clnt.h>
21
22#include <linux/nfs.h>
23#include <linux/nfs2.h>
24#include <linux/nfs3.h>
25#include <linux/nfs4.h>
26#include <linux/nfs_xdr.h>
27
28#include <linux/nfs_fs_sb.h>
29
30#include <linux/rwsem.h>
31#include <linux/mempool.h>
32
33/* 12/*
34 * Enable debugging support for nfs client. 13 * Enable debugging support for nfs client.
35 * Requires RPC_DEBUG. 14 * Requires RPC_DEBUG.
@@ -48,11 +27,6 @@
48#define NFS_SUPER_MAGIC 0x6969 27#define NFS_SUPER_MAGIC 0x6969
49 28
50/* 29/*
51 * These are the default flags for swap requests
52 */
53#define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS)
54
55/*
56 * When flushing a cluster of dirty pages, there can be different 30 * When flushing a cluster of dirty pages, there can be different
57 * strategies: 31 * strategies:
58 */ 32 */
@@ -65,6 +39,32 @@
65 39
66#ifdef __KERNEL__ 40#ifdef __KERNEL__
67 41
42#include <linux/in.h>
43#include <linux/mm.h>
44#include <linux/pagemap.h>
45#include <linux/rwsem.h>
46#include <linux/wait.h>
47
48#include <linux/sunrpc/debug.h>
49#include <linux/sunrpc/auth.h>
50#include <linux/sunrpc/clnt.h>
51
52#include <linux/nfs.h>
53#include <linux/nfs2.h>
54#include <linux/nfs3.h>
55#include <linux/nfs4.h>
56#include <linux/nfs_xdr.h>
57
58#include <linux/nfs_fs_sb.h>
59
60#include <linux/rwsem.h>
61#include <linux/mempool.h>
62
63/*
64 * These are the default flags for swap requests
65 */
66#define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS)
67
68/* 68/*
69 * NFSv3/v4 Access mode cache entry 69 * NFSv3/v4 Access mode cache entry
70 */ 70 */
@@ -427,7 +427,7 @@ extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *);
427extern void nfs_writedata_release(void *); 427extern void nfs_writedata_release(void *);
428 428
429#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) 429#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
430struct nfs_write_data *nfs_commit_alloc(unsigned int pagecount); 430struct nfs_write_data *nfs_commit_alloc(void);
431void nfs_commit_free(struct nfs_write_data *p); 431void nfs_commit_free(struct nfs_write_data *p);
432#endif 432#endif
433 433
@@ -478,7 +478,7 @@ static inline int nfs_wb_page(struct inode *inode, struct page* page)
478/* 478/*
479 * Allocate nfs_write_data structures 479 * Allocate nfs_write_data structures
480 */ 480 */
481extern struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount); 481extern struct nfs_write_data *nfs_writedata_alloc(size_t len);
482 482
483/* 483/*
484 * linux/fs/nfs/read.c 484 * linux/fs/nfs/read.c
@@ -492,7 +492,7 @@ extern void nfs_readdata_release(void *data);
492/* 492/*
493 * Allocate nfs_read_data structures 493 * Allocate nfs_read_data structures
494 */ 494 */
495extern struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount); 495extern struct nfs_read_data *nfs_readdata_alloc(size_t len);
496 496
497/* 497/*
498 * linux/fs/nfs3proc.c 498 * linux/fs/nfs3proc.c
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index db9cbf68e12b..41e5a19199e9 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -729,7 +729,7 @@ struct nfs_read_data {
729 struct list_head pages; /* Coalesced read requests */ 729 struct list_head pages; /* Coalesced read requests */
730 struct nfs_page *req; /* multi ops per nfs_page */ 730 struct nfs_page *req; /* multi ops per nfs_page */
731 struct page **pagevec; 731 struct page **pagevec;
732 unsigned int npages; /* active pages in pagevec */ 732 unsigned int npages; /* Max length of pagevec */
733 struct nfs_readargs args; 733 struct nfs_readargs args;
734 struct nfs_readres res; 734 struct nfs_readres res;
735#ifdef CONFIG_NFS_V4 735#ifdef CONFIG_NFS_V4
@@ -748,7 +748,7 @@ struct nfs_write_data {
748 struct list_head pages; /* Coalesced requests we wish to flush */ 748 struct list_head pages; /* Coalesced requests we wish to flush */
749 struct nfs_page *req; /* multi ops per nfs_page */ 749 struct nfs_page *req; /* multi ops per nfs_page */
750 struct page **pagevec; 750 struct page **pagevec;
751 unsigned int npages; /* active pages in pagevec */ 751 unsigned int npages; /* Max length of pagevec */
752 struct nfs_writeargs args; /* argument struct */ 752 struct nfs_writeargs args; /* argument struct */
753 struct nfs_writeres res; /* result struct */ 753 struct nfs_writeres res; /* result struct */
754#ifdef CONFIG_NFS_V4 754#ifdef CONFIG_NFS_V4
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 4c2839eab7f4..7a249155ee4e 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -648,6 +648,8 @@
648#define PCI_DEVICE_ID_SI_962 0x0962 648#define PCI_DEVICE_ID_SI_962 0x0962
649#define PCI_DEVICE_ID_SI_963 0x0963 649#define PCI_DEVICE_ID_SI_963 0x0963
650#define PCI_DEVICE_ID_SI_965 0x0965 650#define PCI_DEVICE_ID_SI_965 0x0965
651#define PCI_DEVICE_ID_SI_966 0x0966
652#define PCI_DEVICE_ID_SI_968 0x0968
651#define PCI_DEVICE_ID_SI_5511 0x5511 653#define PCI_DEVICE_ID_SI_5511 0x5511
652#define PCI_DEVICE_ID_SI_5513 0x5513 654#define PCI_DEVICE_ID_SI_5513 0x5513
653#define PCI_DEVICE_ID_SI_5517 0x5517 655#define PCI_DEVICE_ID_SI_5517 0x5517
@@ -1292,6 +1294,7 @@
1292#define PCI_DEVICE_ID_VIA_8367_0 0x3099 1294#define PCI_DEVICE_ID_VIA_8367_0 0x3099
1293#define PCI_DEVICE_ID_VIA_8653_0 0x3101 1295#define PCI_DEVICE_ID_VIA_8653_0 0x3101
1294#define PCI_DEVICE_ID_VIA_8622 0x3102 1296#define PCI_DEVICE_ID_VIA_8622 0x3102
1297#define PCI_DEVICE_ID_VIA_8235_USB_2 0x3104
1295#define PCI_DEVICE_ID_VIA_8233C_0 0x3109 1298#define PCI_DEVICE_ID_VIA_8233C_0 0x3109
1296#define PCI_DEVICE_ID_VIA_8361 0x3112 1299#define PCI_DEVICE_ID_VIA_8361 0x3112
1297#define PCI_DEVICE_ID_VIA_XM266 0x3116 1300#define PCI_DEVICE_ID_VIA_XM266 0x3116
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 6674fc1e51bf..34ed0d99b1bd 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -994,7 +994,6 @@ struct task_struct {
994 */ 994 */
995 struct pipe_inode_info *splice_pipe; 995 struct pipe_inode_info *splice_pipe;
996#ifdef CONFIG_TASK_DELAY_ACCT 996#ifdef CONFIG_TASK_DELAY_ACCT
997 spinlock_t delays_lock;
998 struct task_delay_info *delays; 997 struct task_delay_info *delays;
999#endif 998#endif
1000}; 999};
diff --git a/include/linux/timex.h b/include/linux/timex.h
index 19bb6538b49e..d543d3871e38 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -57,7 +57,6 @@
57#include <linux/time.h> 57#include <linux/time.h>
58 58
59#include <asm/param.h> 59#include <asm/param.h>
60#include <asm/timex.h>
61 60
62/* 61/*
63 * SHIFT_KG and SHIFT_KF establish the damping of the PLL and are chosen 62 * SHIFT_KG and SHIFT_KF establish the damping of the PLL and are chosen
@@ -191,6 +190,8 @@ struct timex {
191#define TIME_BAD TIME_ERROR /* bw compat */ 190#define TIME_BAD TIME_ERROR /* bw compat */
192 191
193#ifdef __KERNEL__ 192#ifdef __KERNEL__
193#include <asm/timex.h>
194
194/* 195/*
195 * kernel variables 196 * kernel variables
196 * Note: maximum error = NTP synch distance = dispersion + delay / 2; 197 * Note: maximum error = NTP synch distance = dispersion + delay / 2;
diff --git a/include/linux/videodev.h b/include/linux/videodev.h
index 518c7a32175e..8dba97a291f6 100644
--- a/include/linux/videodev.h
+++ b/include/linux/videodev.h
@@ -14,8 +14,7 @@
14 14
15#include <linux/videodev2.h> 15#include <linux/videodev2.h>
16 16
17#ifdef CONFIG_VIDEO_V4L1_COMPAT 17#if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__)
18#define HAVE_V4L1 1
19 18
20struct video_capability 19struct video_capability
21{ 20{
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index b7146956a929..e3715d774197 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -22,8 +22,6 @@
22#endif 22#endif
23#include <linux/types.h> 23#include <linux/types.h>
24 24
25#define HAVE_V4L2 1
26
27/* 25/*
28 * Common stuff for both V4L1 and V4L2 26 * Common stuff for both V4L1 and V4L2
29 * Moved from videodev.h 27 * Moved from videodev.h
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index 600d61d7d2ab..810462f8a374 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -194,7 +194,7 @@ struct video_device
194 194
195 195
196 int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i); 196 int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i);
197#ifdef HAVE_V4L1 197#ifdef CONFIG_VIDEO_V4L1_COMPAT
198 /* buffer type is struct vidio_mbuf * */ 198 /* buffer type is struct vidio_mbuf * */
199 int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p); 199 int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p);
200#endif 200#endif
@@ -335,7 +335,7 @@ extern int video_usercopy(struct inode *inode, struct file *file,
335 unsigned int cmd, void *arg)); 335 unsigned int cmd, void *arg));
336 336
337 337
338#ifdef HAVE_V4L1 338#ifdef CONFIG_VIDEO_V4L1_COMPAT
339#include <linux/mm.h> 339#include <linux/mm.h>
340 340
341extern struct video_device* video_devdata(struct file*); 341extern struct video_device* video_devdata(struct file*);
@@ -357,6 +357,8 @@ video_device_remove_file(struct video_device *vfd,
357 class_device_remove_file(&vfd->class_dev, attr); 357 class_device_remove_file(&vfd->class_dev, attr);
358} 358}
359 359
360#endif /* CONFIG_VIDEO_V4L1_COMPAT */
361
360#ifdef OBSOLETE_OWNER /* to be removed soon */ 362#ifdef OBSOLETE_OWNER /* to be removed soon */
361/* helper functions to access driver private data. */ 363/* helper functions to access driver private data. */
362static inline void *video_get_drvdata(struct video_device *dev) 364static inline void *video_get_drvdata(struct video_device *dev)
@@ -372,6 +374,5 @@ static inline void video_set_drvdata(struct video_device *dev, void *data)
372 374
373extern int video_exclusive_open(struct inode *inode, struct file *file); 375extern int video_exclusive_open(struct inode *inode, struct file *file);
374extern int video_exclusive_release(struct inode *inode, struct file *file); 376extern int video_exclusive_release(struct inode *inode, struct file *file);
375#endif /* HAVE_V4L1 */
376 377
377#endif /* _V4L2_DEV_H */ 378#endif /* _V4L2_DEV_H */
diff --git a/init/Kconfig b/init/Kconfig
index a099fc6526d9..9a7656f0b5ec 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -182,23 +182,6 @@ config TASK_DELAY_ACCT
182 182
183 Say N if unsure. 183 Say N if unsure.
184 184
185config SYSCTL
186 bool "Sysctl support" if EMBEDDED
187 default y
188 ---help---
189 The sysctl interface provides a means of dynamically changing
190 certain kernel parameters and variables on the fly without requiring
191 a recompile of the kernel or reboot of the system. The primary
192 interface consists of a system call, but if you say Y to "/proc
193 file system support", a tree of modifiable sysctl entries will be
194 generated beneath the /proc/sys directory. They are explained in the
195 files in <file:Documentation/sysctl/>. Note that enabling this
196 option will enlarge the kernel by at least 8 KB.
197
198 As it is generally a good thing, you should say Y here unless
199 building a kernel for install/rescue disks or your system is very
200 limited in memory.
201
202config AUDIT 185config AUDIT
203 bool "Auditing support" 186 bool "Auditing support"
204 depends on NET 187 depends on NET
@@ -261,13 +244,6 @@ config RELAY
261 244
262source "usr/Kconfig" 245source "usr/Kconfig"
263 246
264config UID16
265 bool "Enable 16-bit UID system calls" if EMBEDDED
266 depends on ARM || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && SPARC32_COMPAT) || UML || (X86_64 && IA32_EMULATION)
267 default y
268 help
269 This enables the legacy 16-bit UID syscall wrappers.
270
271config CC_OPTIMIZE_FOR_SIZE 247config CC_OPTIMIZE_FOR_SIZE
272 bool "Optimize for size (Look out for broken compilers!)" 248 bool "Optimize for size (Look out for broken compilers!)"
273 default y 249 default y
@@ -289,6 +265,30 @@ menuconfig EMBEDDED
289 environments which can tolerate a "non-standard" kernel. 265 environments which can tolerate a "non-standard" kernel.
290 Only use this if you really know what you are doing. 266 Only use this if you really know what you are doing.
291 267
268config UID16
269 bool "Enable 16-bit UID system calls" if EMBEDDED
270 depends on ARM || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && SPARC32_COMPAT) || UML || (X86_64 && IA32_EMULATION)
271 default y
272 help
273 This enables the legacy 16-bit UID syscall wrappers.
274
275config SYSCTL
276 bool "Sysctl support" if EMBEDDED
277 default y
278 ---help---
279 The sysctl interface provides a means of dynamically changing
280 certain kernel parameters and variables on the fly without requiring
281 a recompile of the kernel or reboot of the system. The primary
282 interface consists of a system call, but if you say Y to "/proc
283 file system support", a tree of modifiable sysctl entries will be
284 generated beneath the /proc/sys directory. They are explained in the
285 files in <file:Documentation/sysctl/>. Note that enabling this
286 option will enlarge the kernel by at least 8 KB.
287
288 As it is generally a good thing, you should say Y here unless
289 building a kernel for install/rescue disks or your system is very
290 limited in memory.
291
292config KALLSYMS 292config KALLSYMS
293 bool "Load all symbols for debugging/kksymoops" if EMBEDDED 293 bool "Load all symbols for debugging/kksymoops" if EMBEDDED
294 default y 294 default y
@@ -363,10 +363,6 @@ config BASE_FULL
363 kernel data structures. This saves memory on small machines, 363 kernel data structures. This saves memory on small machines,
364 but may reduce performance. 364 but may reduce performance.
365 365
366config RT_MUTEXES
367 boolean
368 select PLIST
369
370config FUTEX 366config FUTEX
371 bool "Enable futex support" if EMBEDDED 367 bool "Enable futex support" if EMBEDDED
372 default y 368 default y
@@ -414,6 +410,10 @@ config VM_EVENT_COUNTERS
414 410
415endmenu # General setup 411endmenu # General setup
416 412
413config RT_MUTEXES
414 boolean
415 select PLIST
416
417config TINY_SHMEM 417config TINY_SHMEM
418 default !SHMEM 418 default !SHMEM
419 bool 419 bool
diff --git a/kernel/audit.c b/kernel/audit.c
index 0a36091ed712..963fd15c9621 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1028,6 +1028,9 @@ void audit_log_hex(struct audit_buffer *ab, const unsigned char *buf,
1028 struct sk_buff *skb; 1028 struct sk_buff *skb;
1029 static const unsigned char *hex = "0123456789ABCDEF"; 1029 static const unsigned char *hex = "0123456789ABCDEF";
1030 1030
1031 if (!ab)
1032 return;
1033
1031 BUG_ON(!ab->skb); 1034 BUG_ON(!ab->skb);
1032 skb = ab->skb; 1035 skb = ab->skb;
1033 avail = skb_tailroom(skb); 1036 avail = skb_tailroom(skb);
@@ -1060,6 +1063,9 @@ static void audit_log_n_string(struct audit_buffer *ab, size_t slen,
1060 unsigned char *ptr; 1063 unsigned char *ptr;
1061 struct sk_buff *skb; 1064 struct sk_buff *skb;
1062 1065
1066 if (!ab)
1067 return;
1068
1063 BUG_ON(!ab->skb); 1069 BUG_ON(!ab->skb);
1064 skb = ab->skb; 1070 skb = ab->skb;
1065 avail = skb_tailroom(skb); 1071 avail = skb_tailroom(skb);
diff --git a/kernel/audit.h b/kernel/audit.h
index 6aa33b848cf2..a3370232a390 100644
--- a/kernel/audit.h
+++ b/kernel/audit.h
@@ -104,6 +104,7 @@ static inline int audit_hash_ino(u32 ino)
104 return (ino & (AUDIT_INODE_BUCKETS-1)); 104 return (ino & (AUDIT_INODE_BUCKETS-1));
105} 105}
106 106
107extern int audit_match_class(int class, unsigned syscall);
107extern int audit_comparator(const u32 left, const u32 op, const u32 right); 108extern int audit_comparator(const u32 left, const u32 op, const u32 right);
108extern int audit_compare_dname_path(const char *dname, const char *path, 109extern int audit_compare_dname_path(const char *dname, const char *path,
109 int *dirlen); 110 int *dirlen);
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 6a9a5c5a4e7d..a44879b0c72f 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -302,6 +302,15 @@ int __init audit_register_class(int class, unsigned *list)
302 return 0; 302 return 0;
303} 303}
304 304
305int audit_match_class(int class, unsigned syscall)
306{
307 if (unlikely(syscall >= AUDIT_BITMASK_SIZE * sizeof(__u32)))
308 return 0;
309 if (unlikely(class >= AUDIT_SYSCALL_CLASSES || !classes[class]))
310 return 0;
311 return classes[class][AUDIT_WORD(syscall)] & AUDIT_BIT(syscall);
312}
313
305/* Common user-space to kernel rule translation. */ 314/* Common user-space to kernel rule translation. */
306static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule) 315static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule)
307{ 316{
@@ -404,6 +413,7 @@ static struct audit_entry *audit_rule_to_entry(struct audit_rule *rule)
404 case AUDIT_PERS: 413 case AUDIT_PERS:
405 case AUDIT_ARCH: 414 case AUDIT_ARCH:
406 case AUDIT_MSGTYPE: 415 case AUDIT_MSGTYPE:
416 case AUDIT_PPID:
407 case AUDIT_DEVMAJOR: 417 case AUDIT_DEVMAJOR:
408 case AUDIT_DEVMINOR: 418 case AUDIT_DEVMINOR:
409 case AUDIT_EXIT: 419 case AUDIT_EXIT:
@@ -413,6 +423,10 @@ static struct audit_entry *audit_rule_to_entry(struct audit_rule *rule)
413 case AUDIT_ARG2: 423 case AUDIT_ARG2:
414 case AUDIT_ARG3: 424 case AUDIT_ARG3:
415 break; 425 break;
426 case AUDIT_PERM:
427 if (f->val & ~15)
428 goto exit_free;
429 break;
416 case AUDIT_INODE: 430 case AUDIT_INODE:
417 err = audit_to_inode(&entry->rule, f); 431 err = audit_to_inode(&entry->rule, f);
418 if (err) 432 if (err)
@@ -567,6 +581,10 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data,
567 entry->rule.buflen += f->val; 581 entry->rule.buflen += f->val;
568 entry->rule.filterkey = str; 582 entry->rule.filterkey = str;
569 break; 583 break;
584 case AUDIT_PERM:
585 if (f->val & ~15)
586 goto exit_free;
587 break;
570 default: 588 default:
571 goto exit_free; 589 goto exit_free;
572 } 590 }
@@ -913,7 +931,7 @@ static void audit_update_watch(struct audit_parent *parent,
913 } 931 }
914 932
915 ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE); 933 ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE);
916 audit_log_format(ab, "audit updated rules specifying watch="); 934 audit_log_format(ab, "audit updated rules specifying path=");
917 audit_log_untrustedstring(ab, owatch->path); 935 audit_log_untrustedstring(ab, owatch->path);
918 audit_log_format(ab, " with dev=%u ino=%lu\n", dev, ino); 936 audit_log_format(ab, " with dev=%u ino=%lu\n", dev, ino);
919 audit_log_end(ab); 937 audit_log_end(ab);
@@ -936,19 +954,28 @@ static void audit_remove_parent_watches(struct audit_parent *parent)
936 struct audit_watch *w, *nextw; 954 struct audit_watch *w, *nextw;
937 struct audit_krule *r, *nextr; 955 struct audit_krule *r, *nextr;
938 struct audit_entry *e; 956 struct audit_entry *e;
957 struct audit_buffer *ab;
939 958
940 mutex_lock(&audit_filter_mutex); 959 mutex_lock(&audit_filter_mutex);
941 parent->flags |= AUDIT_PARENT_INVALID; 960 parent->flags |= AUDIT_PARENT_INVALID;
942 list_for_each_entry_safe(w, nextw, &parent->watches, wlist) { 961 list_for_each_entry_safe(w, nextw, &parent->watches, wlist) {
943 list_for_each_entry_safe(r, nextr, &w->rules, rlist) { 962 list_for_each_entry_safe(r, nextr, &w->rules, rlist) {
944 e = container_of(r, struct audit_entry, rule); 963 e = container_of(r, struct audit_entry, rule);
964
965 ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE);
966 audit_log_format(ab, "audit implicitly removed rule path=");
967 audit_log_untrustedstring(ab, w->path);
968 if (r->filterkey) {
969 audit_log_format(ab, " key=");
970 audit_log_untrustedstring(ab, r->filterkey);
971 } else
972 audit_log_format(ab, " key=(null)");
973 audit_log_format(ab, " list=%d", r->listnr);
974 audit_log_end(ab);
975
945 list_del(&r->rlist); 976 list_del(&r->rlist);
946 list_del_rcu(&e->list); 977 list_del_rcu(&e->list);
947 call_rcu(&e->rcu, audit_free_rule_rcu); 978 call_rcu(&e->rcu, audit_free_rule_rcu);
948
949 audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE,
950 "audit implicitly removed rule from list=%d\n",
951 AUDIT_FILTER_EXIT);
952 } 979 }
953 audit_remove_watch(w); 980 audit_remove_watch(w);
954 } 981 }
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index efc1b74bebf3..1bd8827a0102 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -209,6 +209,54 @@ struct audit_context {
209#endif 209#endif
210}; 210};
211 211
212#define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE])
213static inline int open_arg(int flags, int mask)
214{
215 int n = ACC_MODE(flags);
216 if (flags & (O_TRUNC | O_CREAT))
217 n |= AUDIT_PERM_WRITE;
218 return n & mask;
219}
220
221static int audit_match_perm(struct audit_context *ctx, int mask)
222{
223 unsigned n = ctx->major;
224 switch (audit_classify_syscall(ctx->arch, n)) {
225 case 0: /* native */
226 if ((mask & AUDIT_PERM_WRITE) &&
227 audit_match_class(AUDIT_CLASS_WRITE, n))
228 return 1;
229 if ((mask & AUDIT_PERM_READ) &&
230 audit_match_class(AUDIT_CLASS_READ, n))
231 return 1;
232 if ((mask & AUDIT_PERM_ATTR) &&
233 audit_match_class(AUDIT_CLASS_CHATTR, n))
234 return 1;
235 return 0;
236 case 1: /* 32bit on biarch */
237 if ((mask & AUDIT_PERM_WRITE) &&
238 audit_match_class(AUDIT_CLASS_WRITE_32, n))
239 return 1;
240 if ((mask & AUDIT_PERM_READ) &&
241 audit_match_class(AUDIT_CLASS_READ_32, n))
242 return 1;
243 if ((mask & AUDIT_PERM_ATTR) &&
244 audit_match_class(AUDIT_CLASS_CHATTR_32, n))
245 return 1;
246 return 0;
247 case 2: /* open */
248 return mask & ACC_MODE(ctx->argv[1]);
249 case 3: /* openat */
250 return mask & ACC_MODE(ctx->argv[2]);
251 case 4: /* socketcall */
252 return ((mask & AUDIT_PERM_WRITE) && ctx->argv[0] == SYS_BIND);
253 case 5: /* execve */
254 return mask & AUDIT_PERM_EXEC;
255 default:
256 return 0;
257 }
258}
259
212/* Determine if any context name data matches a rule's watch data */ 260/* Determine if any context name data matches a rule's watch data */
213/* Compare a task_struct with an audit_rule. Return 1 on match, 0 261/* Compare a task_struct with an audit_rule. Return 1 on match, 0
214 * otherwise. */ 262 * otherwise. */
@@ -397,6 +445,9 @@ static int audit_filter_rules(struct task_struct *tsk,
397 /* ignore this field for filtering */ 445 /* ignore this field for filtering */
398 result = 1; 446 result = 1;
399 break; 447 break;
448 case AUDIT_PERM:
449 result = audit_match_perm(ctx, f->val);
450 break;
400 } 451 }
401 452
402 if (!result) 453 if (!result)
diff --git a/kernel/delayacct.c b/kernel/delayacct.c
index 57ca3730205d..36752f124c6a 100644
--- a/kernel/delayacct.c
+++ b/kernel/delayacct.c
@@ -41,24 +41,11 @@ void delayacct_init(void)
41 41
42void __delayacct_tsk_init(struct task_struct *tsk) 42void __delayacct_tsk_init(struct task_struct *tsk)
43{ 43{
44 spin_lock_init(&tsk->delays_lock);
45 /* No need to acquire tsk->delays_lock for allocation here unless
46 __delayacct_tsk_init called after tsk is attached to tasklist
47 */
48 tsk->delays = kmem_cache_zalloc(delayacct_cache, SLAB_KERNEL); 44 tsk->delays = kmem_cache_zalloc(delayacct_cache, SLAB_KERNEL);
49 if (tsk->delays) 45 if (tsk->delays)
50 spin_lock_init(&tsk->delays->lock); 46 spin_lock_init(&tsk->delays->lock);
51} 47}
52 48
53void __delayacct_tsk_exit(struct task_struct *tsk)
54{
55 struct task_delay_info *delays = tsk->delays;
56 spin_lock(&tsk->delays_lock);
57 tsk->delays = NULL;
58 spin_unlock(&tsk->delays_lock);
59 kmem_cache_free(delayacct_cache, delays);
60}
61
62/* 49/*
63 * Start accounting for a delay statistic using 50 * Start accounting for a delay statistic using
64 * its starting timestamp (@start) 51 * its starting timestamp (@start)
@@ -118,8 +105,6 @@ int __delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk)
118 struct timespec ts; 105 struct timespec ts;
119 unsigned long t1,t2,t3; 106 unsigned long t1,t2,t3;
120 107
121 spin_lock(&tsk->delays_lock);
122
123 /* Though tsk->delays accessed later, early exit avoids 108 /* Though tsk->delays accessed later, early exit avoids
124 * unnecessary returning of other data 109 * unnecessary returning of other data
125 */ 110 */
@@ -161,7 +146,6 @@ int __delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk)
161 spin_unlock(&tsk->delays->lock); 146 spin_unlock(&tsk->delays->lock);
162 147
163done: 148done:
164 spin_unlock(&tsk->delays_lock);
165 return 0; 149 return 0;
166} 150}
167 151
diff --git a/kernel/exit.c b/kernel/exit.c
index dba194a8d416..d891883420f7 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -908,7 +908,6 @@ fastcall NORET_TYPE void do_exit(long code)
908 audit_free(tsk); 908 audit_free(tsk);
909 taskstats_exit_send(tsk, tidstats, group_dead, mycpu); 909 taskstats_exit_send(tsk, tidstats, group_dead, mycpu);
910 taskstats_exit_free(tidstats); 910 taskstats_exit_free(tidstats);
911 delayacct_tsk_exit(tsk);
912 911
913 exit_mm(tsk); 912 exit_mm(tsk);
914 913
@@ -1054,7 +1053,7 @@ static int eligible_child(pid_t pid, int options, struct task_struct *p)
1054 * Do not consider thread group leaders that are 1053 * Do not consider thread group leaders that are
1055 * in a non-empty thread group: 1054 * in a non-empty thread group:
1056 */ 1055 */
1057 if (current->tgid != p->tgid && delay_group_leader(p)) 1056 if (delay_group_leader(p))
1058 return 2; 1057 return 2;
1059 1058
1060 if (security_task_wait(p)) 1059 if (security_task_wait(p))
diff --git a/kernel/fork.c b/kernel/fork.c
index aa36c43783cc..f9b014e3e700 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -117,6 +117,7 @@ void __put_task_struct(struct task_struct *tsk)
117 security_task_free(tsk); 117 security_task_free(tsk);
118 free_uid(tsk->user); 118 free_uid(tsk->user);
119 put_group_info(tsk->group_info); 119 put_group_info(tsk->group_info);
120 delayacct_tsk_free(tsk);
120 121
121 if (!profile_handoff_task(tsk)) 122 if (!profile_handoff_task(tsk))
122 free_task(tsk); 123 free_task(tsk);
@@ -1011,7 +1012,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1011 retval = -EFAULT; 1012 retval = -EFAULT;
1012 if (clone_flags & CLONE_PARENT_SETTID) 1013 if (clone_flags & CLONE_PARENT_SETTID)
1013 if (put_user(p->pid, parent_tidptr)) 1014 if (put_user(p->pid, parent_tidptr))
1014 goto bad_fork_cleanup; 1015 goto bad_fork_cleanup_delays_binfmt;
1015 1016
1016 INIT_LIST_HEAD(&p->children); 1017 INIT_LIST_HEAD(&p->children);
1017 INIT_LIST_HEAD(&p->sibling); 1018 INIT_LIST_HEAD(&p->sibling);
@@ -1277,7 +1278,8 @@ bad_fork_cleanup_policy:
1277bad_fork_cleanup_cpuset: 1278bad_fork_cleanup_cpuset:
1278#endif 1279#endif
1279 cpuset_exit(p); 1280 cpuset_exit(p);
1280bad_fork_cleanup: 1281bad_fork_cleanup_delays_binfmt:
1282 delayacct_tsk_free(p);
1281 if (p->binfmt) 1283 if (p->binfmt)
1282 module_put(p->binfmt->module); 1284 module_put(p->binfmt->module);
1283bad_fork_cleanup_put_domain: 1285bad_fork_cleanup_put_domain:
diff --git a/kernel/futex.c b/kernel/futex.c
index b9b8aea5389e..9d260e838cff 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1120,9 +1120,10 @@ static int futex_wait(u32 __user *uaddr, u32 val, unsigned long time)
1120 * if there are waiters then it will block, it does PI, etc. (Due to 1120 * if there are waiters then it will block, it does PI, etc. (Due to
1121 * races the kernel might see a 0 value of the futex too.) 1121 * races the kernel might see a 0 value of the futex too.)
1122 */ 1122 */
1123static int do_futex_lock_pi(u32 __user *uaddr, int detect, int trylock, 1123static int futex_lock_pi(u32 __user *uaddr, int detect, unsigned long sec,
1124 struct hrtimer_sleeper *to) 1124 long nsec, int trylock)
1125{ 1125{
1126 struct hrtimer_sleeper timeout, *to = NULL;
1126 struct task_struct *curr = current; 1127 struct task_struct *curr = current;
1127 struct futex_hash_bucket *hb; 1128 struct futex_hash_bucket *hb;
1128 u32 uval, newval, curval; 1129 u32 uval, newval, curval;
@@ -1132,6 +1133,13 @@ static int do_futex_lock_pi(u32 __user *uaddr, int detect, int trylock,
1132 if (refill_pi_state_cache()) 1133 if (refill_pi_state_cache())
1133 return -ENOMEM; 1134 return -ENOMEM;
1134 1135
1136 if (sec != MAX_SCHEDULE_TIMEOUT) {
1137 to = &timeout;
1138 hrtimer_init(&to->timer, CLOCK_REALTIME, HRTIMER_ABS);
1139 hrtimer_init_sleeper(to, current);
1140 to->timer.expires = ktime_set(sec, nsec);
1141 }
1142
1135 q.pi_state = NULL; 1143 q.pi_state = NULL;
1136 retry: 1144 retry:
1137 down_read(&curr->mm->mmap_sem); 1145 down_read(&curr->mm->mmap_sem);
@@ -1307,7 +1315,7 @@ static int do_futex_lock_pi(u32 __user *uaddr, int detect, int trylock,
1307 if (!detect && ret == -EDEADLK && 0) 1315 if (!detect && ret == -EDEADLK && 0)
1308 force_sig(SIGKILL, current); 1316 force_sig(SIGKILL, current);
1309 1317
1310 return ret; 1318 return ret != -EINTR ? ret : -ERESTARTNOINTR;
1311 1319
1312 out_unlock_release_sem: 1320 out_unlock_release_sem:
1313 queue_unlock(&q, hb); 1321 queue_unlock(&q, hb);
@@ -1342,76 +1350,6 @@ static int do_futex_lock_pi(u32 __user *uaddr, int detect, int trylock,
1342} 1350}
1343 1351
1344/* 1352/*
1345 * Restart handler
1346 */
1347static long futex_lock_pi_restart(struct restart_block *restart)
1348{
1349 struct hrtimer_sleeper timeout, *to = NULL;
1350 int ret;
1351
1352 restart->fn = do_no_restart_syscall;
1353
1354 if (restart->arg2 || restart->arg3) {
1355 to = &timeout;
1356 hrtimer_init(&to->timer, CLOCK_REALTIME, HRTIMER_ABS);
1357 hrtimer_init_sleeper(to, current);
1358 to->timer.expires.tv64 = ((u64)restart->arg1 << 32) |
1359 (u64) restart->arg0;
1360 }
1361
1362 pr_debug("lock_pi restart: %p, %d (%d)\n",
1363 (u32 __user *)restart->arg0, current->pid);
1364
1365 ret = do_futex_lock_pi((u32 __user *)restart->arg0, restart->arg1,
1366 0, to);
1367
1368 if (ret != -EINTR)
1369 return ret;
1370
1371 restart->fn = futex_lock_pi_restart;
1372
1373 /* The other values are filled in */
1374 return -ERESTART_RESTARTBLOCK;
1375}
1376
1377/*
1378 * Called from the syscall entry below.
1379 */
1380static int futex_lock_pi(u32 __user *uaddr, int detect, unsigned long sec,
1381 long nsec, int trylock)
1382{
1383 struct hrtimer_sleeper timeout, *to = NULL;
1384 struct restart_block *restart;
1385 int ret;
1386
1387 if (sec != MAX_SCHEDULE_TIMEOUT) {
1388 to = &timeout;
1389 hrtimer_init(&to->timer, CLOCK_REALTIME, HRTIMER_ABS);
1390 hrtimer_init_sleeper(to, current);
1391 to->timer.expires = ktime_set(sec, nsec);
1392 }
1393
1394 ret = do_futex_lock_pi(uaddr, detect, trylock, to);
1395
1396 if (ret != -EINTR)
1397 return ret;
1398
1399 pr_debug("lock_pi interrupted: %p, %d (%d)\n", uaddr, current->pid);
1400
1401 restart = &current_thread_info()->restart_block;
1402 restart->fn = futex_lock_pi_restart;
1403 restart->arg0 = (unsigned long) uaddr;
1404 restart->arg1 = detect;
1405 if (to) {
1406 restart->arg2 = to->timer.expires.tv64 & 0xFFFFFFFF;
1407 restart->arg3 = to->timer.expires.tv64 >> 32;
1408 } else
1409 restart->arg2 = restart->arg3 = 0;
1410
1411 return -ERESTART_RESTARTBLOCK;
1412}
1413
1414/*
1415 * Userspace attempted a TID -> 0 atomic transition, and failed. 1353 * Userspace attempted a TID -> 0 atomic transition, and failed.
1416 * This is the in-kernel slowpath: we look up the PI state (if any), 1354 * This is the in-kernel slowpath: we look up the PI state (if any),
1417 * and do the rt-mutex unlock. 1355 * and do the rt-mutex unlock.
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 9336f2e89e40..ac1f850d4937 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -252,7 +252,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs)
252 mask_ack_irq(desc, irq); 252 mask_ack_irq(desc, irq);
253 253
254 if (unlikely(desc->status & IRQ_INPROGRESS)) 254 if (unlikely(desc->status & IRQ_INPROGRESS))
255 goto out; 255 goto out_unlock;
256 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); 256 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
257 kstat_cpu(cpu).irqs[irq]++; 257 kstat_cpu(cpu).irqs[irq]++;
258 258
@@ -263,7 +263,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs)
263 action = desc->action; 263 action = desc->action;
264 if (unlikely(!action || (desc->status & IRQ_DISABLED))) { 264 if (unlikely(!action || (desc->status & IRQ_DISABLED))) {
265 desc->status |= IRQ_PENDING; 265 desc->status |= IRQ_PENDING;
266 goto out; 266 goto out_unlock;
267 } 267 }
268 268
269 desc->status |= IRQ_INPROGRESS; 269 desc->status |= IRQ_INPROGRESS;
@@ -276,9 +276,9 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs)
276 276
277 spin_lock(&desc->lock); 277 spin_lock(&desc->lock);
278 desc->status &= ~IRQ_INPROGRESS; 278 desc->status &= ~IRQ_INPROGRESS;
279out:
280 if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask) 279 if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
281 desc->chip->unmask(irq); 280 desc->chip->unmask(irq);
281out_unlock:
282 spin_unlock(&desc->lock); 282 spin_unlock(&desc->lock);
283} 283}
284 284
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index fc4e906aedbd..48a53f68af96 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -20,6 +20,11 @@
20 20
21/** 21/**
22 * handle_bad_irq - handle spurious and unhandled irqs 22 * handle_bad_irq - handle spurious and unhandled irqs
23 * @irq: the interrupt number
24 * @desc: description of the interrupt
25 * @regs: pointer to a register structure
26 *
27 * Handles spurious and unhandled IRQ's. It also prints a debugmessage.
23 */ 28 */
24void fastcall 29void fastcall
25handle_bad_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs) 30handle_bad_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs)
diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c
index 872f91ba2ce8..35f10f7ff94a 100644
--- a/kernel/irq/resend.c
+++ b/kernel/irq/resend.c
@@ -63,8 +63,7 @@ void check_irq_resend(struct irq_desc *desc, unsigned int irq)
63 desc->chip->enable(irq); 63 desc->chip->enable(irq);
64 64
65 if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) { 65 if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
66 desc->status &= ~IRQ_PENDING; 66 desc->status = (status & ~IRQ_PENDING) | IRQ_REPLAY;
67 desc->status = status | IRQ_REPLAY;
68 67
69 if (!desc->chip || !desc->chip->retrigger || 68 if (!desc->chip || !desc->chip->retrigger ||
70 !desc->chip->retrigger(irq)) { 69 !desc->chip->retrigger(irq)) {
diff --git a/kernel/kmod.c b/kernel/kmod.c
index 1d32defa38ab..5c470c57fb57 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -197,11 +197,12 @@ static void __call_usermodehelper(void *data)
197{ 197{
198 struct subprocess_info *sub_info = data; 198 struct subprocess_info *sub_info = data;
199 pid_t pid; 199 pid_t pid;
200 int wait = sub_info->wait;
200 201
201 /* CLONE_VFORK: wait until the usermode helper has execve'd 202 /* CLONE_VFORK: wait until the usermode helper has execve'd
202 * successfully We need the data structures to stay around 203 * successfully We need the data structures to stay around
203 * until that is done. */ 204 * until that is done. */
204 if (sub_info->wait) 205 if (wait)
205 pid = kernel_thread(wait_for_helper, sub_info, 206 pid = kernel_thread(wait_for_helper, sub_info,
206 CLONE_FS | CLONE_FILES | SIGCHLD); 207 CLONE_FS | CLONE_FILES | SIGCHLD);
207 else 208 else
@@ -211,7 +212,7 @@ static void __call_usermodehelper(void *data)
211 if (pid < 0) { 212 if (pid < 0) {
212 sub_info->retval = pid; 213 sub_info->retval = pid;
213 complete(sub_info->complete); 214 complete(sub_info->complete);
214 } else if (!sub_info->wait) 215 } else if (!wait)
215 complete(sub_info->complete); 216 complete(sub_info->complete);
216} 217}
217 218
diff --git a/kernel/lockdep_internals.h b/kernel/lockdep_internals.h
index 0d355f24fe04..eab043c83bb2 100644
--- a/kernel/lockdep_internals.h
+++ b/kernel/lockdep_internals.h
@@ -27,7 +27,7 @@
27 * Stack-trace: tightly packed array of stack backtrace 27 * Stack-trace: tightly packed array of stack backtrace
28 * addresses. Protected by the hash_lock. 28 * addresses. Protected by the hash_lock.
29 */ 29 */
30#define MAX_STACK_TRACE_ENTRIES 131072UL 30#define MAX_STACK_TRACE_ENTRIES 262144UL
31 31
32extern struct list_head all_lock_classes; 32extern struct list_head all_lock_classes;
33 33
diff --git a/kernel/panic.c b/kernel/panic.c
index 9b8dcfd1ca93..8010b9b17aca 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -173,7 +173,7 @@ const char *print_tainted(void)
173 173
174void add_taint(unsigned flag) 174void add_taint(unsigned flag)
175{ 175{
176 debug_locks_off(); /* can't trust the integrity of the kernel anymore */ 176 debug_locks = 0; /* can't trust the integrity of the kernel anymore */
177 tainted |= flag; 177 tainted |= flag;
178} 178}
179EXPORT_SYMBOL(add_taint); 179EXPORT_SYMBOL(add_taint);
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index ae44a70aae8a..619ecabf7c58 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -56,7 +56,7 @@ config PM_TRACE
56 56
57config SOFTWARE_SUSPEND 57config SOFTWARE_SUSPEND
58 bool "Software Suspend" 58 bool "Software Suspend"
59 depends on PM && SWAP && (X86 && (!SMP || SUSPEND_SMP)) || ((FRV || PPC32) && !SMP) 59 depends on PM && SWAP && ((X86 && (!SMP || SUSPEND_SMP) && !X86_PAE) || ((FRV || PPC32) && !SMP))
60 ---help--- 60 ---help---
61 Enable the possibility of suspending the machine. 61 Enable the possibility of suspending the machine.
62 It doesn't need ACPI or APM. 62 It doesn't need ACPI or APM.
@@ -78,6 +78,10 @@ config SOFTWARE_SUSPEND
78 78
79 For more information take a look at <file:Documentation/power/swsusp.txt>. 79 For more information take a look at <file:Documentation/power/swsusp.txt>.
80 80
81 (For now, swsusp is incompatible with PAE aka HIGHMEM_64G on i386.
82 we need identity mapping for resume to work, and that is trivial
83 to get with 4MB pages, but less than trivial on PAE).
84
81config PM_STD_PARTITION 85config PM_STD_PARTITION
82 string "Default resume partition" 86 string "Default resume partition"
83 depends on SOFTWARE_SUSPEND 87 depends on SOFTWARE_SUSPEND
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
index 436ab35f6fa7..523e46483b99 100644
--- a/kernel/rcupdate.c
+++ b/kernel/rcupdate.c
@@ -241,12 +241,16 @@ static void rcu_do_batch(struct rcu_data *rdp)
241 next = rdp->donelist = list->next; 241 next = rdp->donelist = list->next;
242 list->func(list); 242 list->func(list);
243 list = next; 243 list = next;
244 rdp->qlen--;
245 if (++count >= rdp->blimit) 244 if (++count >= rdp->blimit)
246 break; 245 break;
247 } 246 }
247
248 local_irq_disable();
249 rdp->qlen -= count;
250 local_irq_enable();
248 if (rdp->blimit == INT_MAX && rdp->qlen <= qlowmark) 251 if (rdp->blimit == INT_MAX && rdp->qlen <= qlowmark)
249 rdp->blimit = blimit; 252 rdp->blimit = blimit;
253
250 if (!rdp->donelist) 254 if (!rdp->donelist)
251 rdp->donetail = &rdp->donelist; 255 rdp->donetail = &rdp->donelist;
252 else 256 else
diff --git a/kernel/spinlock.c b/kernel/spinlock.c
index bfd6ad9c0330..fb524b009eef 100644
--- a/kernel/spinlock.c
+++ b/kernel/spinlock.c
@@ -72,7 +72,7 @@ EXPORT_SYMBOL(_write_trylock);
72 * not re-enabled during lock-acquire (which the preempt-spin-ops do): 72 * not re-enabled during lock-acquire (which the preempt-spin-ops do):
73 */ 73 */
74#if !defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP) || \ 74#if !defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP) || \
75 defined(CONFIG_PROVE_LOCKING) 75 defined(CONFIG_DEBUG_LOCK_ALLOC)
76 76
77void __lockfunc _read_lock(rwlock_t *lock) 77void __lockfunc _read_lock(rwlock_t *lock)
78{ 78{
diff --git a/lib/Kconfig b/lib/Kconfig
index f6299342b882..734ce95a93d1 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -38,6 +38,11 @@ config LIBCRC32C
38 require M here. See Castagnoli93. 38 require M here. See Castagnoli93.
39 Module will be libcrc32c. 39 Module will be libcrc32c.
40 40
41config AUDIT_GENERIC
42 bool
43 depends on AUDIT && !AUDIT_ARCH
44 default y
45
41# 46#
42# compression support is select'ed if needed 47# compression support is select'ed if needed
43# 48#
diff --git a/lib/Makefile b/lib/Makefile
index be9719ae82d0..ef1d37afbbb6 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -49,6 +49,7 @@ obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o
49obj-$(CONFIG_TEXTSEARCH_BM) += ts_bm.o 49obj-$(CONFIG_TEXTSEARCH_BM) += ts_bm.o
50obj-$(CONFIG_TEXTSEARCH_FSM) += ts_fsm.o 50obj-$(CONFIG_TEXTSEARCH_FSM) += ts_fsm.o
51obj-$(CONFIG_SMP) += percpu_counter.o 51obj-$(CONFIG_SMP) += percpu_counter.o
52obj-$(CONFIG_AUDIT_GENERIC) += audit.o
52 53
53obj-$(CONFIG_SWIOTLB) += swiotlb.o 54obj-$(CONFIG_SWIOTLB) += swiotlb.o
54 55
diff --git a/lib/audit.c b/lib/audit.c
new file mode 100644
index 000000000000..8c21625ef938
--- /dev/null
+++ b/lib/audit.c
@@ -0,0 +1,53 @@
1#include <linux/init.h>
2#include <linux/types.h>
3#include <linux/audit.h>
4#include <asm/unistd.h>
5
6static unsigned dir_class[] = {
7#include <asm-generic/audit_dir_write.h>
8~0U
9};
10
11static unsigned read_class[] = {
12#include <asm-generic/audit_read.h>
13~0U
14};
15
16static unsigned write_class[] = {
17#include <asm-generic/audit_write.h>
18~0U
19};
20
21static unsigned chattr_class[] = {
22#include <asm-generic/audit_change_attr.h>
23~0U
24};
25
26int audit_classify_syscall(int abi, unsigned syscall)
27{
28 switch(syscall) {
29 case __NR_open:
30 return 2;
31 case __NR_openat:
32 return 3;
33#ifdef __NR_socketcall
34 case __NR_socketcall:
35 return 4;
36#endif
37 case __NR_execve:
38 return 5;
39 default:
40 return 0;
41 }
42}
43
44static int __init audit_classes_init(void)
45{
46 audit_register_class(AUDIT_CLASS_WRITE, write_class);
47 audit_register_class(AUDIT_CLASS_READ, read_class);
48 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class);
49 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class);
50 return 0;
51}
52
53__initcall(audit_classes_init);
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index e07e27e846a2..a9963ceddd65 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -1176,7 +1176,15 @@ static inline unsigned interleave_nid(struct mempolicy *pol,
1176 if (vma) { 1176 if (vma) {
1177 unsigned long off; 1177 unsigned long off;
1178 1178
1179 off = vma->vm_pgoff; 1179 /*
1180 * for small pages, there is no difference between
1181 * shift and PAGE_SHIFT, so the bit-shift is safe.
1182 * for huge pages, since vm_pgoff is in units of small
1183 * pages, we need to shift off the always 0 bits to get
1184 * a useful offset.
1185 */
1186 BUG_ON(shift < PAGE_SHIFT);
1187 off = vma->vm_pgoff >> (shift - PAGE_SHIFT);
1180 off += (addr - vma->vm_start) >> shift; 1188 off += (addr - vma->vm_start) >> shift;
1181 return offset_il_node(pol, vma, off); 1189 return offset_il_node(pol, vma, off);
1182 } else 1190 } else
diff --git a/mm/mempool.c b/mm/mempool.c
index fe6e05289cc5..ccd8cb8cd41f 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -238,8 +238,13 @@ repeat_alloc:
238 init_wait(&wait); 238 init_wait(&wait);
239 prepare_to_wait(&pool->wait, &wait, TASK_UNINTERRUPTIBLE); 239 prepare_to_wait(&pool->wait, &wait, TASK_UNINTERRUPTIBLE);
240 smp_mb(); 240 smp_mb();
241 if (!pool->curr_nr) 241 if (!pool->curr_nr) {
242 io_schedule(); 242 /*
243 * FIXME: this should be io_schedule(). The timeout is there
244 * as a workaround for some DM problems in 2.6.18.
245 */
246 io_schedule_timeout(5*HZ);
247 }
243 finish_wait(&pool->wait, &wait); 248 finish_wait(&pool->wait, &wait);
244 249
245 goto repeat_alloc; 250 goto repeat_alloc;
diff --git a/mm/mmap.c b/mm/mmap.c
index c1868ecdbc5f..e66a0b524aff 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -30,6 +30,10 @@
30#include <asm/cacheflush.h> 30#include <asm/cacheflush.h>
31#include <asm/tlb.h> 31#include <asm/tlb.h>
32 32
33#ifndef arch_mmap_check
34#define arch_mmap_check(addr, len, flags) (0)
35#endif
36
33static void unmap_region(struct mm_struct *mm, 37static void unmap_region(struct mm_struct *mm,
34 struct vm_area_struct *vma, struct vm_area_struct *prev, 38 struct vm_area_struct *vma, struct vm_area_struct *prev,
35 unsigned long start, unsigned long end); 39 unsigned long start, unsigned long end);
@@ -913,6 +917,10 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
913 if (!len) 917 if (!len)
914 return -EINVAL; 918 return -EINVAL;
915 919
920 error = arch_mmap_check(addr, len, flags);
921 if (error)
922 return error;
923
916 /* Careful about overflows.. */ 924 /* Careful about overflows.. */
917 len = PAGE_ALIGN(len); 925 len = PAGE_ALIGN(len);
918 if (!len || len > TASK_SIZE) 926 if (!len || len > TASK_SIZE)
@@ -1859,6 +1867,7 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
1859 unsigned long flags; 1867 unsigned long flags;
1860 struct rb_node ** rb_link, * rb_parent; 1868 struct rb_node ** rb_link, * rb_parent;
1861 pgoff_t pgoff = addr >> PAGE_SHIFT; 1869 pgoff_t pgoff = addr >> PAGE_SHIFT;
1870 int error;
1862 1871
1863 len = PAGE_ALIGN(len); 1872 len = PAGE_ALIGN(len);
1864 if (!len) 1873 if (!len)
@@ -1867,6 +1876,12 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
1867 if ((addr + len) > TASK_SIZE || (addr + len) < addr) 1876 if ((addr + len) > TASK_SIZE || (addr + len) < addr)
1868 return -EINVAL; 1877 return -EINVAL;
1869 1878
1879 flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
1880
1881 error = arch_mmap_check(addr, len, flags);
1882 if (error)
1883 return error;
1884
1870 /* 1885 /*
1871 * mlock MCL_FUTURE? 1886 * mlock MCL_FUTURE?
1872 */ 1887 */
@@ -1907,8 +1922,6 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
1907 if (security_vm_enough_memory(len >> PAGE_SHIFT)) 1922 if (security_vm_enough_memory(len >> PAGE_SHIFT))
1908 return -ENOMEM; 1923 return -ENOMEM;
1909 1924
1910 flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
1911
1912 /* Can we just expand an old private anonymous mapping? */ 1925 /* Can we just expand an old private anonymous mapping? */
1913 if (vma_merge(mm, prev, addr, addr + len, flags, 1926 if (vma_merge(mm, prev, addr, addr + len, flags,
1914 NULL, NULL, pgoff, NULL)) 1927 NULL, NULL, pgoff, NULL))
diff --git a/mm/truncate.c b/mm/truncate.c
index cf1b015df4a7..c6ab55ec6883 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -68,10 +68,10 @@ invalidate_complete_page(struct address_space *mapping, struct page *page)
68 return 0; 68 return 0;
69 69
70 write_lock_irq(&mapping->tree_lock); 70 write_lock_irq(&mapping->tree_lock);
71 if (PageDirty(page)) { 71 if (PageDirty(page))
72 write_unlock_irq(&mapping->tree_lock); 72 goto failed;
73 return 0; 73 if (page_count(page) != 2) /* caller's ref + pagecache ref */
74 } 74 goto failed;
75 75
76 BUG_ON(PagePrivate(page)); 76 BUG_ON(PagePrivate(page));
77 __remove_from_page_cache(page); 77 __remove_from_page_cache(page);
@@ -79,6 +79,9 @@ invalidate_complete_page(struct address_space *mapping, struct page *page)
79 ClearPageUptodate(page); 79 ClearPageUptodate(page);
80 page_cache_release(page); /* pagecache ref */ 80 page_cache_release(page); /* pagecache ref */
81 return 1; 81 return 1;
82failed:
83 write_unlock_irq(&mapping->tree_lock);
84 return 0;
82} 85}
83 86
84/** 87/**
diff --git a/mm/vmstat.c b/mm/vmstat.c
index dfdf24133901..c1b5f4106b38 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -12,6 +12,7 @@
12#include <linux/config.h> 12#include <linux/config.h>
13#include <linux/mm.h> 13#include <linux/mm.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/cpu.h>
15 16
16void __get_zone_counts(unsigned long *active, unsigned long *inactive, 17void __get_zone_counts(unsigned long *active, unsigned long *inactive,
17 unsigned long *free, struct pglist_data *pgdat) 18 unsigned long *free, struct pglist_data *pgdat)
@@ -114,17 +115,72 @@ EXPORT_SYMBOL(vm_stat);
114 115
115#ifdef CONFIG_SMP 116#ifdef CONFIG_SMP
116 117
117#define STAT_THRESHOLD 32 118static int calculate_threshold(struct zone *zone)
119{
120 int threshold;
121 int mem; /* memory in 128 MB units */
122
123 /*
124 * The threshold scales with the number of processors and the amount
125 * of memory per zone. More memory means that we can defer updates for
126 * longer, more processors could lead to more contention.
127 * fls() is used to have a cheap way of logarithmic scaling.
128 *
129 * Some sample thresholds:
130 *
131 * Threshold Processors (fls) Zonesize fls(mem+1)
132 * ------------------------------------------------------------------
133 * 8 1 1 0.9-1 GB 4
134 * 16 2 2 0.9-1 GB 4
135 * 20 2 2 1-2 GB 5
136 * 24 2 2 2-4 GB 6
137 * 28 2 2 4-8 GB 7
138 * 32 2 2 8-16 GB 8
139 * 4 2 2 <128M 1
140 * 30 4 3 2-4 GB 5
141 * 48 4 3 8-16 GB 8
142 * 32 8 4 1-2 GB 4
143 * 32 8 4 0.9-1GB 4
144 * 10 16 5 <128M 1
145 * 40 16 5 900M 4
146 * 70 64 7 2-4 GB 5
147 * 84 64 7 4-8 GB 6
148 * 108 512 9 4-8 GB 6
149 * 125 1024 10 8-16 GB 8
150 * 125 1024 10 16-32 GB 9
151 */
152
153 mem = zone->present_pages >> (27 - PAGE_SHIFT);
154
155 threshold = 2 * fls(num_online_cpus()) * (1 + fls(mem));
156
157 /*
158 * Maximum threshold is 125
159 */
160 threshold = min(125, threshold);
161
162 return threshold;
163}
118 164
119/* 165/*
120 * Determine pointer to currently valid differential byte given a zone and 166 * Refresh the thresholds for each zone.
121 * the item number.
122 *
123 * Preemption must be off
124 */ 167 */
125static inline s8 *diff_pointer(struct zone *zone, enum zone_stat_item item) 168static void refresh_zone_stat_thresholds(void)
126{ 169{
127 return &zone_pcp(zone, smp_processor_id())->vm_stat_diff[item]; 170 struct zone *zone;
171 int cpu;
172 int threshold;
173
174 for_each_zone(zone) {
175
176 if (!zone->present_pages)
177 continue;
178
179 threshold = calculate_threshold(zone);
180
181 for_each_online_cpu(cpu)
182 zone_pcp(zone, cpu)->stat_threshold = threshold;
183 }
128} 184}
129 185
130/* 186/*
@@ -133,17 +189,16 @@ static inline s8 *diff_pointer(struct zone *zone, enum zone_stat_item item)
133void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item, 189void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item,
134 int delta) 190 int delta)
135{ 191{
136 s8 *p; 192 struct per_cpu_pageset *pcp = zone_pcp(zone, smp_processor_id());
193 s8 *p = pcp->vm_stat_diff + item;
137 long x; 194 long x;
138 195
139 p = diff_pointer(zone, item);
140 x = delta + *p; 196 x = delta + *p;
141 197
142 if (unlikely(x > STAT_THRESHOLD || x < -STAT_THRESHOLD)) { 198 if (unlikely(x > pcp->stat_threshold || x < -pcp->stat_threshold)) {
143 zone_page_state_add(x, zone, item); 199 zone_page_state_add(x, zone, item);
144 x = 0; 200 x = 0;
145 } 201 }
146
147 *p = x; 202 *p = x;
148} 203}
149EXPORT_SYMBOL(__mod_zone_page_state); 204EXPORT_SYMBOL(__mod_zone_page_state);
@@ -172,10 +227,12 @@ EXPORT_SYMBOL(mod_zone_page_state);
172 * No overflow check is necessary and therefore the differential can be 227 * No overflow check is necessary and therefore the differential can be
173 * incremented or decremented in place which may allow the compilers to 228 * incremented or decremented in place which may allow the compilers to
174 * generate better code. 229 * generate better code.
175 *
176 * The increment or decrement is known and therefore one boundary check can 230 * The increment or decrement is known and therefore one boundary check can
177 * be omitted. 231 * be omitted.
178 * 232 *
233 * NOTE: These functions are very performance sensitive. Change only
234 * with care.
235 *
179 * Some processors have inc/dec instructions that are atomic vs an interrupt. 236 * Some processors have inc/dec instructions that are atomic vs an interrupt.
180 * However, the code must first determine the differential location in a zone 237 * However, the code must first determine the differential location in a zone
181 * based on the processor number and then inc/dec the counter. There is no 238 * based on the processor number and then inc/dec the counter. There is no
@@ -185,13 +242,16 @@ EXPORT_SYMBOL(mod_zone_page_state);
185 */ 242 */
186static void __inc_zone_state(struct zone *zone, enum zone_stat_item item) 243static void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
187{ 244{
188 s8 *p = diff_pointer(zone, item); 245 struct per_cpu_pageset *pcp = zone_pcp(zone, smp_processor_id());
246 s8 *p = pcp->vm_stat_diff + item;
189 247
190 (*p)++; 248 (*p)++;
191 249
192 if (unlikely(*p > STAT_THRESHOLD)) { 250 if (unlikely(*p > pcp->stat_threshold)) {
193 zone_page_state_add(*p, zone, item); 251 int overstep = pcp->stat_threshold / 2;
194 *p = 0; 252
253 zone_page_state_add(*p + overstep, zone, item);
254 *p = -overstep;
195 } 255 }
196} 256}
197 257
@@ -204,13 +264,16 @@ EXPORT_SYMBOL(__inc_zone_page_state);
204void __dec_zone_page_state(struct page *page, enum zone_stat_item item) 264void __dec_zone_page_state(struct page *page, enum zone_stat_item item)
205{ 265{
206 struct zone *zone = page_zone(page); 266 struct zone *zone = page_zone(page);
207 s8 *p = diff_pointer(zone, item); 267 struct per_cpu_pageset *pcp = zone_pcp(zone, smp_processor_id());
268 s8 *p = pcp->vm_stat_diff + item;
208 269
209 (*p)--; 270 (*p)--;
210 271
211 if (unlikely(*p < -STAT_THRESHOLD)) { 272 if (unlikely(*p < - pcp->stat_threshold)) {
212 zone_page_state_add(*p, zone, item); 273 int overstep = pcp->stat_threshold / 2;
213 *p = 0; 274
275 zone_page_state_add(*p - overstep, zone, item);
276 *p = overstep;
214 } 277 }
215} 278}
216EXPORT_SYMBOL(__dec_zone_page_state); 279EXPORT_SYMBOL(__dec_zone_page_state);
@@ -239,19 +302,9 @@ EXPORT_SYMBOL(inc_zone_page_state);
239void dec_zone_page_state(struct page *page, enum zone_stat_item item) 302void dec_zone_page_state(struct page *page, enum zone_stat_item item)
240{ 303{
241 unsigned long flags; 304 unsigned long flags;
242 struct zone *zone;
243 s8 *p;
244 305
245 zone = page_zone(page);
246 local_irq_save(flags); 306 local_irq_save(flags);
247 p = diff_pointer(zone, item); 307 __dec_zone_page_state(page, item);
248
249 (*p)--;
250
251 if (unlikely(*p < -STAT_THRESHOLD)) {
252 zone_page_state_add(*p, zone, item);
253 *p = 0;
254 }
255 local_irq_restore(flags); 308 local_irq_restore(flags);
256} 309}
257EXPORT_SYMBOL(dec_zone_page_state); 310EXPORT_SYMBOL(dec_zone_page_state);
@@ -525,6 +578,10 @@ static int zoneinfo_show(struct seq_file *m, void *arg)
525 pageset->pcp[j].high, 578 pageset->pcp[j].high,
526 pageset->pcp[j].batch); 579 pageset->pcp[j].batch);
527 } 580 }
581#ifdef CONFIG_SMP
582 seq_printf(m, "\n vm stats threshold: %d",
583 pageset->stat_threshold);
584#endif
528 } 585 }
529 seq_printf(m, 586 seq_printf(m,
530 "\n all_unreclaimable: %u" 587 "\n all_unreclaimable: %u"
@@ -613,3 +670,35 @@ struct seq_operations vmstat_op = {
613 670
614#endif /* CONFIG_PROC_FS */ 671#endif /* CONFIG_PROC_FS */
615 672
673#ifdef CONFIG_SMP
674/*
675 * Use the cpu notifier to insure that the thresholds are recalculated
676 * when necessary.
677 */
678static int __cpuinit vmstat_cpuup_callback(struct notifier_block *nfb,
679 unsigned long action,
680 void *hcpu)
681{
682 switch (action) {
683 case CPU_UP_PREPARE:
684 case CPU_UP_CANCELED:
685 case CPU_DEAD:
686 refresh_zone_stat_thresholds();
687 break;
688 default:
689 break;
690 }
691 return NOTIFY_OK;
692}
693
694static struct notifier_block __cpuinitdata vmstat_notifier =
695 { &vmstat_cpuup_callback, NULL, 0 };
696
697int __init setup_vmstat(void)
698{
699 refresh_zone_stat_thresholds();
700 register_cpu_notifier(&vmstat_notifier);
701 return 0;
702}
703module_init(setup_vmstat)
704#endif
diff --git a/net/Kconfig b/net/Kconfig
index c6cec5aa5486..4959a4e1e0fe 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -177,7 +177,7 @@ source "net/lapb/Kconfig"
177 177
178config NET_DIVERT 178config NET_DIVERT
179 bool "Frame Diverter (EXPERIMENTAL)" 179 bool "Frame Diverter (EXPERIMENTAL)"
180 depends on EXPERIMENTAL 180 depends on EXPERIMENTAL && BROKEN
181 ---help--- 181 ---help---
182 The Frame Diverter allows you to divert packets from the 182 The Frame Diverter allows you to divert packets from the
183 network, that are not aimed at the interface receiving it (in 183 network, that are not aimed at the interface receiving it (in
diff --git a/net/atm/clip.c b/net/atm/clip.c
index 7ce7bfe3fbad..7af2c411da82 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -500,9 +500,11 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout)
500 } else { 500 } else {
501 unsigned int len = skb->len; 501 unsigned int len = skb->len;
502 502
503 skb_get(skb);
503 clip_push(vcc, skb); 504 clip_push(vcc, skb);
504 PRIV(skb->dev)->stats.rx_packets--; 505 PRIV(skb->dev)->stats.rx_packets--;
505 PRIV(skb->dev)->stats.rx_bytes -= len; 506 PRIV(skb->dev)->stats.rx_bytes -= len;
507 kfree_skb(skb);
506 } 508 }
507 return 0; 509 return 0;
508} 510}
diff --git a/net/bridge/br_stp_bpdu.c b/net/bridge/br_stp_bpdu.c
index a7ba0cce0b46..068d8afbf0a7 100644
--- a/net/bridge/br_stp_bpdu.c
+++ b/net/bridge/br_stp_bpdu.c
@@ -121,7 +121,7 @@ void br_send_tcn_bpdu(struct net_bridge_port *p)
121 buf[1] = 0; 121 buf[1] = 0;
122 buf[2] = 0; 122 buf[2] = 0;
123 buf[3] = BPDU_TYPE_TCN; 123 buf[3] = BPDU_TYPE_TCN;
124 br_send_bpdu(p, buf, 7); 124 br_send_bpdu(p, buf, 4);
125} 125}
126 126
127/* 127/*
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 5130d2efdbbe..fe2113f54e2b 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1432,6 +1432,9 @@ int neigh_table_clear(struct neigh_table *tbl)
1432 kfree(tbl->phash_buckets); 1432 kfree(tbl->phash_buckets);
1433 tbl->phash_buckets = NULL; 1433 tbl->phash_buckets = NULL;
1434 1434
1435 free_percpu(tbl->stats);
1436 tbl->stats = NULL;
1437
1435 return 0; 1438 return 0;
1436} 1439}
1437 1440
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 4c20f5546893..a2ede167e045 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -440,6 +440,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*))
440 iph = skb->nh.iph; 440 iph = skb->nh.iph;
441 441
442 if (unlikely((iph->frag_off & htons(IP_DF)) && !skb->local_df)) { 442 if (unlikely((iph->frag_off & htons(IP_DF)) && !skb->local_df)) {
443 IP_INC_STATS(IPSTATS_MIB_FRAGFAILS);
443 icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, 444 icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
444 htonl(dst_mtu(&rt->u.dst))); 445 htonl(dst_mtu(&rt->u.dst)));
445 kfree_skb(skb); 446 kfree_skb(skb);
diff --git a/net/ipv4/ipvs/ip_vs_ftp.c b/net/ipv4/ipvs/ip_vs_ftp.c
index a19a33ceb811..37fafb1fbcff 100644
--- a/net/ipv4/ipvs/ip_vs_ftp.c
+++ b/net/ipv4/ipvs/ip_vs_ftp.c
@@ -46,14 +46,7 @@
46 */ 46 */
47static int ports[IP_VS_APP_MAX_PORTS] = {21, 0}; 47static int ports[IP_VS_APP_MAX_PORTS] = {21, 0};
48module_param_array(ports, int, NULL, 0); 48module_param_array(ports, int, NULL, 0);
49 49MODULE_PARM_DESC(ports, "Ports to monitor for FTP control commands");
50/*
51 * Debug level
52 */
53#ifdef CONFIG_IP_VS_DEBUG
54static int debug=0;
55module_param(debug, int, 0);
56#endif
57 50
58 51
59/* Dummy variable */ 52/* Dummy variable */
@@ -177,7 +170,7 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp,
177 &start, &end) != 1) 170 &start, &end) != 1)
178 return 1; 171 return 1;
179 172
180 IP_VS_DBG(1-debug, "PASV response (%u.%u.%u.%u:%d) -> " 173 IP_VS_DBG(7, "PASV response (%u.%u.%u.%u:%d) -> "
181 "%u.%u.%u.%u:%d detected\n", 174 "%u.%u.%u.%u:%d detected\n",
182 NIPQUAD(from), ntohs(port), NIPQUAD(cp->caddr), 0); 175 NIPQUAD(from), ntohs(port), NIPQUAD(cp->caddr), 0);
183 176
@@ -280,7 +273,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp,
280 while (data <= data_limit - 6) { 273 while (data <= data_limit - 6) {
281 if (strnicmp(data, "PASV\r\n", 6) == 0) { 274 if (strnicmp(data, "PASV\r\n", 6) == 0) {
282 /* Passive mode on */ 275 /* Passive mode on */
283 IP_VS_DBG(1-debug, "got PASV at %zd of %zd\n", 276 IP_VS_DBG(7, "got PASV at %zd of %zd\n",
284 data - data_start, 277 data - data_start,
285 data_limit - data_start); 278 data_limit - data_start);
286 cp->app_data = &ip_vs_ftp_pasv; 279 cp->app_data = &ip_vs_ftp_pasv;
@@ -302,7 +295,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp,
302 &start, &end) != 1) 295 &start, &end) != 1)
303 return 1; 296 return 1;
304 297
305 IP_VS_DBG(1-debug, "PORT %u.%u.%u.%u:%d detected\n", 298 IP_VS_DBG(7, "PORT %u.%u.%u.%u:%d detected\n",
306 NIPQUAD(to), ntohs(port)); 299 NIPQUAD(to), ntohs(port));
307 300
308 /* Passive mode off */ 301 /* Passive mode off */
@@ -311,7 +304,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp,
311 /* 304 /*
312 * Now update or create a connection entry for it 305 * Now update or create a connection entry for it
313 */ 306 */
314 IP_VS_DBG(1-debug, "protocol %s %u.%u.%u.%u:%d %u.%u.%u.%u:%d\n", 307 IP_VS_DBG(7, "protocol %s %u.%u.%u.%u:%d %u.%u.%u.%u:%d\n",
315 ip_vs_proto_name(iph->protocol), 308 ip_vs_proto_name(iph->protocol),
316 NIPQUAD(to), ntohs(port), NIPQUAD(cp->vaddr), 0); 309 NIPQUAD(to), ntohs(port), NIPQUAD(cp->vaddr), 0);
317 310
@@ -372,11 +365,17 @@ static int __init ip_vs_ftp_init(void)
372 for (i=0; i<IP_VS_APP_MAX_PORTS; i++) { 365 for (i=0; i<IP_VS_APP_MAX_PORTS; i++) {
373 if (!ports[i]) 366 if (!ports[i])
374 continue; 367 continue;
368 if (ports[i] < 0 || ports[i] > 0xffff) {
369 IP_VS_WARNING("ip_vs_ftp: Ignoring invalid "
370 "configuration port[%d] = %d\n",
371 i, ports[i]);
372 continue;
373 }
375 ret = register_ip_vs_app_inc(app, app->protocol, ports[i]); 374 ret = register_ip_vs_app_inc(app, app->protocol, ports[i]);
376 if (ret) 375 if (ret)
377 break; 376 break;
378 IP_VS_DBG(1-debug, "%s: loaded support on port[%d] = %d\n", 377 IP_VS_INFO("%s: loaded support on port[%d] = %d\n",
379 app->name, i, ports[i]); 378 app->name, i, ports[i]);
380 } 379 }
381 380
382 if (ret) 381 if (ret)
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index 5765f9d03174..7ff2e4273a7c 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -189,7 +189,7 @@ void tcp_slow_start(struct tcp_sock *tp)
189 return; 189 return;
190 190
191 /* We MAY increase by 2 if discovered delayed ack */ 191 /* We MAY increase by 2 if discovered delayed ack */
192 if (sysctl_tcp_abc > 1 && tp->bytes_acked > 2*tp->mss_cache) { 192 if (sysctl_tcp_abc > 1 && tp->bytes_acked >= 2*tp->mss_cache) {
193 if (tp->snd_cwnd < tp->snd_cwnd_clamp) 193 if (tp->snd_cwnd < tp->snd_cwnd_clamp)
194 tp->snd_cwnd++; 194 tp->snd_cwnd++;
195 } 195 }
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 104af5d5bcbc..159fa3f1ba67 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -89,7 +89,7 @@ int sysctl_tcp_frto;
89int sysctl_tcp_nometrics_save; 89int sysctl_tcp_nometrics_save;
90 90
91int sysctl_tcp_moderate_rcvbuf = 1; 91int sysctl_tcp_moderate_rcvbuf = 1;
92int sysctl_tcp_abc = 1; 92int sysctl_tcp_abc;
93 93
94#define FLAG_DATA 0x01 /* Incoming frame contained data. */ 94#define FLAG_DATA 0x01 /* Incoming frame contained data. */
95#define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window update. */ 95#define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window update. */
@@ -2505,8 +2505,13 @@ static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag)
2505 if (before(ack, prior_snd_una)) 2505 if (before(ack, prior_snd_una))
2506 goto old_ack; 2506 goto old_ack;
2507 2507
2508 if (sysctl_tcp_abc && icsk->icsk_ca_state < TCP_CA_CWR) 2508 if (sysctl_tcp_abc) {
2509 tp->bytes_acked += ack - prior_snd_una; 2509 if (icsk->icsk_ca_state < TCP_CA_CWR)
2510 tp->bytes_acked += ack - prior_snd_una;
2511 else if (icsk->icsk_ca_state == TCP_CA_Loss)
2512 /* we assume just one segment left network */
2513 tp->bytes_acked += min(ack - prior_snd_una, tp->mss_cache);
2514 }
2510 2515
2511 if (!(flag&FLAG_SLOWPATH) && after(ack, prior_snd_una)) { 2516 if (!(flag&FLAG_SLOWPATH) && after(ack, prior_snd_una)) {
2512 /* Window is constant, pure forward advance. 2517 /* Window is constant, pure forward advance.
diff --git a/net/ipv4/tcp_lp.c b/net/ipv4/tcp_lp.c
index 1f977b6ee9a1..48f28d617ce6 100644
--- a/net/ipv4/tcp_lp.c
+++ b/net/ipv4/tcp_lp.c
@@ -3,13 +3,8 @@
3 * 3 *
4 * TCP Low Priority is a distributed algorithm whose goal is to utilize only 4 * TCP Low Priority is a distributed algorithm whose goal is to utilize only
5 * the excess network bandwidth as compared to the ``fair share`` of 5 * the excess network bandwidth as compared to the ``fair share`` of
6 * bandwidth as targeted by TCP. Available from: 6 * bandwidth as targeted by TCP.
7 * http://www.ece.rice.edu/~akuzma/Doc/akuzma/TCP-LP.pdf
8 * 7 *
9 * Original Author:
10 * Aleksandar Kuzmanovic <akuzma@northwestern.edu>
11 *
12 * See http://www-ece.rice.edu/networks/TCP-LP/ for their implementation.
13 * As of 2.6.13, Linux supports pluggable congestion control algorithms. 8 * As of 2.6.13, Linux supports pluggable congestion control algorithms.
14 * Due to the limitation of the API, we take the following changes from 9 * Due to the limitation of the API, we take the following changes from
15 * the original TCP-LP implementation: 10 * the original TCP-LP implementation:
@@ -24,11 +19,20 @@
24 * o OWD is handled in relative format, where local time stamp will in 19 * o OWD is handled in relative format, where local time stamp will in
25 * tcp_time_stamp format. 20 * tcp_time_stamp format.
26 * 21 *
27 * Port from 2.4.19 to 2.6.16 as module by: 22 * Original Author:
28 * Wong Hoi Sing Edison <hswong3i@gmail.com> 23 * Aleksandar Kuzmanovic <akuzma@northwestern.edu>
29 * Hung Hing Lun <hlhung3i@gmail.com> 24 * Available from:
25 * http://www.ece.rice.edu/~akuzma/Doc/akuzma/TCP-LP.pdf
26 * Original implementation for 2.4.19:
27 * http://www-ece.rice.edu/networks/TCP-LP/
30 * 28 *
31 * Version: $Id: tcp_lp.c,v 1.22 2006-05-02 18:18:19 hswong3i Exp $ 29 * 2.6.x module Authors:
30 * Wong Hoi Sing, Edison <hswong3i@gmail.com>
31 * Hung Hing Lun, Mike <hlhung3i@gmail.com>
32 * SourceForge project page:
33 * http://tcp-lp-mod.sourceforge.net/
34 *
35 * Version: $Id: tcp_lp.c,v 1.24 2006/09/05 20:22:53 hswong3i Exp $
32 */ 36 */
33 37
34#include <linux/config.h> 38#include <linux/config.h>
@@ -153,16 +157,19 @@ static u32 tcp_lp_remote_hz_estimator(struct sock *sk)
153 if (m < 0) 157 if (m < 0)
154 m = -m; 158 m = -m;
155 159
156 if (rhz != 0) { 160 if (rhz > 0) {
157 m -= rhz >> 6; /* m is now error in remote HZ est */ 161 m -= rhz >> 6; /* m is now error in remote HZ est */
158 rhz += m; /* 63/64 old + 1/64 new */ 162 rhz += m; /* 63/64 old + 1/64 new */
159 } else 163 } else
160 rhz = m << 6; 164 rhz = m << 6;
161 165
166 out:
162 /* record time for successful remote HZ calc */ 167 /* record time for successful remote HZ calc */
163 lp->flag |= LP_VALID_RHZ; 168 if (rhz > 0)
169 lp->flag |= LP_VALID_RHZ;
170 else
171 lp->flag &= ~LP_VALID_RHZ;
164 172
165 out:
166 /* record reference time stamp */ 173 /* record reference time stamp */
167 lp->remote_ref_time = tp->rx_opt.rcv_tsval; 174 lp->remote_ref_time = tp->rx_opt.rcv_tsval;
168 lp->local_ref_time = tp->rx_opt.rcv_tsecr; 175 lp->local_ref_time = tp->rx_opt.rcv_tsecr;
@@ -333,6 +340,6 @@ static void __exit tcp_lp_unregister(void)
333module_init(tcp_lp_register); 340module_init(tcp_lp_register);
334module_exit(tcp_lp_unregister); 341module_exit(tcp_lp_unregister);
335 342
336MODULE_AUTHOR("Wong Hoi Sing Edison, Hung Hing Lun"); 343MODULE_AUTHOR("Wong Hoi Sing Edison, Hung Hing Lun Mike");
337MODULE_LICENSE("GPL"); 344MODULE_LICENSE("GPL");
338MODULE_DESCRIPTION("TCP Low Priority"); 345MODULE_DESCRIPTION("TCP Low Priority");
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 0c5042e7380d..c7852b38e03e 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -578,6 +578,8 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen,
578 ifa->flags = flags | IFA_F_TENTATIVE; 578 ifa->flags = flags | IFA_F_TENTATIVE;
579 ifa->cstamp = ifa->tstamp = jiffies; 579 ifa->cstamp = ifa->tstamp = jiffies;
580 580
581 ifa->rt = rt;
582
581 ifa->idev = idev; 583 ifa->idev = idev;
582 in6_dev_hold(idev); 584 in6_dev_hold(idev);
583 /* For caller */ 585 /* For caller */
@@ -603,8 +605,6 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen,
603 } 605 }
604#endif 606#endif
605 607
606 ifa->rt = rt;
607
608 in6_ifa_hold(ifa); 608 in6_ifa_hold(ifa);
609 write_unlock(&idev->lock); 609 write_unlock(&idev->lock);
610out2: 610out2:
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
index 99a6eb23378b..3b55b4c8e2d1 100644
--- a/net/ipv6/datagram.c
+++ b/net/ipv6/datagram.c
@@ -696,7 +696,7 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl,
696 } 696 }
697 697
698 tc = *(int *)CMSG_DATA(cmsg); 698 tc = *(int *)CMSG_DATA(cmsg);
699 if (tc < 0 || tc > 0xff) 699 if (tc < -1 || tc > 0xff)
700 goto exit_f; 700 goto exit_f;
701 701
702 err = 0; 702 err = 0;
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index 9d0ee7f0eeb5..86dac106873b 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -635,14 +635,17 @@ ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt,
635 struct ipv6_txoptions *opt2; 635 struct ipv6_txoptions *opt2;
636 int err; 636 int err;
637 637
638 if (newtype != IPV6_HOPOPTS && opt->hopopt) 638 if (opt) {
639 tot_len += CMSG_ALIGN(ipv6_optlen(opt->hopopt)); 639 if (newtype != IPV6_HOPOPTS && opt->hopopt)
640 if (newtype != IPV6_RTHDRDSTOPTS && opt->dst0opt) 640 tot_len += CMSG_ALIGN(ipv6_optlen(opt->hopopt));
641 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst0opt)); 641 if (newtype != IPV6_RTHDRDSTOPTS && opt->dst0opt)
642 if (newtype != IPV6_RTHDR && opt->srcrt) 642 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst0opt));
643 tot_len += CMSG_ALIGN(ipv6_optlen(opt->srcrt)); 643 if (newtype != IPV6_RTHDR && opt->srcrt)
644 if (newtype != IPV6_DSTOPTS && opt->dst1opt) 644 tot_len += CMSG_ALIGN(ipv6_optlen(opt->srcrt));
645 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst1opt)); 645 if (newtype != IPV6_DSTOPTS && opt->dst1opt)
646 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst1opt));
647 }
648
646 if (newopt && newoptlen) 649 if (newopt && newoptlen)
647 tot_len += CMSG_ALIGN(newoptlen); 650 tot_len += CMSG_ALIGN(newoptlen);
648 651
@@ -659,25 +662,25 @@ ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt,
659 opt2->tot_len = tot_len; 662 opt2->tot_len = tot_len;
660 p = (char *)(opt2 + 1); 663 p = (char *)(opt2 + 1);
661 664
662 err = ipv6_renew_option(opt->hopopt, newopt, newoptlen, 665 err = ipv6_renew_option(opt ? opt->hopopt : NULL, newopt, newoptlen,
663 newtype != IPV6_HOPOPTS, 666 newtype != IPV6_HOPOPTS,
664 &opt2->hopopt, &p); 667 &opt2->hopopt, &p);
665 if (err) 668 if (err)
666 goto out; 669 goto out;
667 670
668 err = ipv6_renew_option(opt->dst0opt, newopt, newoptlen, 671 err = ipv6_renew_option(opt ? opt->dst0opt : NULL, newopt, newoptlen,
669 newtype != IPV6_RTHDRDSTOPTS, 672 newtype != IPV6_RTHDRDSTOPTS,
670 &opt2->dst0opt, &p); 673 &opt2->dst0opt, &p);
671 if (err) 674 if (err)
672 goto out; 675 goto out;
673 676
674 err = ipv6_renew_option(opt->srcrt, newopt, newoptlen, 677 err = ipv6_renew_option(opt ? opt->srcrt : NULL, newopt, newoptlen,
675 newtype != IPV6_RTHDR, 678 newtype != IPV6_RTHDR,
676 (struct ipv6_opt_hdr **)opt2->srcrt, &p); 679 (struct ipv6_opt_hdr **)&opt2->srcrt, &p);
677 if (err) 680 if (err)
678 goto out; 681 goto out;
679 682
680 err = ipv6_renew_option(opt->dst1opt, newopt, newoptlen, 683 err = ipv6_renew_option(opt ? opt->dst1opt : NULL, newopt, newoptlen,
681 newtype != IPV6_DSTOPTS, 684 newtype != IPV6_DSTOPTS,
682 &opt2->dst1opt, &p); 685 &opt2->dst1opt, &p);
683 if (err) 686 if (err)
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 3d6e9a351150..356a8a7ef22a 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -401,7 +401,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
401 if (hlimit < 0) 401 if (hlimit < 0)
402 hlimit = ipv6_get_hoplimit(dst->dev); 402 hlimit = ipv6_get_hoplimit(dst->dev);
403 403
404 tclass = np->cork.tclass; 404 tclass = np->tclass;
405 if (tclass < 0) 405 if (tclass < 0)
406 tclass = 0; 406 tclass = 0;
407 407
@@ -497,7 +497,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
497 if (hlimit < 0) 497 if (hlimit < 0)
498 hlimit = ipv6_get_hoplimit(dst->dev); 498 hlimit = ipv6_get_hoplimit(dst->dev);
499 499
500 tclass = np->cork.tclass; 500 tclass = np->tclass;
501 if (tclass < 0) 501 if (tclass < 0)
502 tclass = 0; 502 tclass = 0;
503 503
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index 43327264e69c..a5eaaf693abf 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -362,7 +362,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
362 break; 362 break;
363 363
364 case IPV6_TCLASS: 364 case IPV6_TCLASS:
365 if (val < 0 || val > 0xff) 365 if (val < -1 || val > 0xff)
366 goto e_inval; 366 goto e_inval;
367 np->tclass = val; 367 np->tclass = val;
368 retv = 0; 368 retv = 0;
@@ -947,6 +947,8 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
947 947
948 case IPV6_TCLASS: 948 case IPV6_TCLASS:
949 val = np->tclass; 949 val = np->tclass;
950 if (val < 0)
951 val = 0;
950 break; 952 break;
951 953
952 case IPV6_RECVTCLASS: 954 case IPV6_RECVTCLASS:
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index d57e61ce4a7d..15b862d8acab 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -781,7 +781,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
781 } 781 }
782 782
783 if (tclass < 0) { 783 if (tclass < 0) {
784 tclass = np->cork.tclass; 784 tclass = np->tclass;
785 if (tclass < 0) 785 if (tclass < 0)
786 tclass = 0; 786 tclass = 0;
787 } 787 }
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 4b163711f3a8..d9baca062d24 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1532,6 +1532,10 @@ int ipv6_route_ioctl(unsigned int cmd, void __user *arg)
1532 1532
1533static int ip6_pkt_discard(struct sk_buff *skb) 1533static int ip6_pkt_discard(struct sk_buff *skb)
1534{ 1534{
1535 int type = ipv6_addr_type(&skb->nh.ipv6h->daddr);
1536 if (type == IPV6_ADDR_ANY || type == IPV6_ADDR_RESERVED)
1537 IP6_INC_STATS(IPSTATS_MIB_INADDRERRORS);
1538
1535 IP6_INC_STATS(IPSTATS_MIB_OUTNOROUTES); 1539 IP6_INC_STATS(IPSTATS_MIB_OUTNOROUTES);
1536 icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_NOROUTE, 0, skb->dev); 1540 icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_NOROUTE, 0, skb->dev);
1537 kfree_skb(skb); 1541 kfree_skb(skb);
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index b85c1f9f1288..8b85036ba8e3 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1273,8 +1273,7 @@ netlink_kernel_create(int unit, unsigned int groups,
1273 struct netlink_sock *nlk; 1273 struct netlink_sock *nlk;
1274 unsigned long *listeners = NULL; 1274 unsigned long *listeners = NULL;
1275 1275
1276 if (!nl_table) 1276 BUG_ON(!nl_table);
1277 return NULL;
1278 1277
1279 if (unit<0 || unit>=MAX_LINKS) 1278 if (unit<0 || unit>=MAX_LINKS)
1280 return NULL; 1279 return NULL;
@@ -1745,11 +1744,8 @@ static int __init netlink_proto_init(void)
1745 netlink_skb_parms_too_large(); 1744 netlink_skb_parms_too_large();
1746 1745
1747 nl_table = kcalloc(MAX_LINKS, sizeof(*nl_table), GFP_KERNEL); 1746 nl_table = kcalloc(MAX_LINKS, sizeof(*nl_table), GFP_KERNEL);
1748 if (!nl_table) { 1747 if (!nl_table)
1749enomem: 1748 goto panic;
1750 printk(KERN_CRIT "netlink_init: Cannot allocate nl_table\n");
1751 return -ENOMEM;
1752 }
1753 1749
1754 if (num_physpages >= (128 * 1024)) 1750 if (num_physpages >= (128 * 1024))
1755 max = num_physpages >> (21 - PAGE_SHIFT); 1751 max = num_physpages >> (21 - PAGE_SHIFT);
@@ -1769,7 +1765,7 @@ enomem:
1769 nl_pid_hash_free(nl_table[i].hash.table, 1765 nl_pid_hash_free(nl_table[i].hash.table,
1770 1 * sizeof(*hash->table)); 1766 1 * sizeof(*hash->table));
1771 kfree(nl_table); 1767 kfree(nl_table);
1772 goto enomem; 1768 goto panic;
1773 } 1769 }
1774 memset(hash->table, 0, 1 * sizeof(*hash->table)); 1770 memset(hash->table, 0, 1 * sizeof(*hash->table));
1775 hash->max_shift = order; 1771 hash->max_shift = order;
@@ -1786,6 +1782,8 @@ enomem:
1786 rtnetlink_init(); 1782 rtnetlink_init();
1787out: 1783out:
1788 return err; 1784 return err;
1785panic:
1786 panic("netlink_init: Cannot allocate nl_table\n");
1789} 1787}
1790 1788
1791core_initcall(netlink_proto_init); 1789core_initcall(netlink_proto_init);
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index f9cef3671593..4172a5235916 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -626,8 +626,6 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe
626 if ((int)snaplen < 0) 626 if ((int)snaplen < 0)
627 snaplen = 0; 627 snaplen = 0;
628 } 628 }
629 if (snaplen > skb->len-skb->data_len)
630 snaplen = skb->len-skb->data_len;
631 629
632 spin_lock(&sk->sk_receive_queue.lock); 630 spin_lock(&sk->sk_receive_queue.lock);
633 h = (struct tpacket_hdr *)packet_lookup_frame(po, po->head); 631 h = (struct tpacket_hdr *)packet_lookup_frame(po, po->head);
@@ -644,7 +642,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe
644 status &= ~TP_STATUS_LOSING; 642 status &= ~TP_STATUS_LOSING;
645 spin_unlock(&sk->sk_receive_queue.lock); 643 spin_unlock(&sk->sk_receive_queue.lock);
646 644
647 memcpy((u8*)h + macoff, skb->data, snaplen); 645 skb_copy_bits(skb, 0, (u8*)h + macoff, snaplen);
648 646
649 h->tp_len = skb->len; 647 h->tp_len = skb->len;
650 h->tp_snaplen = snaplen; 648 h->tp_snaplen = snaplen;
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 0834c2ee9174..6f9151899795 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -238,9 +238,7 @@ void __netdev_watchdog_up(struct net_device *dev)
238 238
239static void dev_watchdog_up(struct net_device *dev) 239static void dev_watchdog_up(struct net_device *dev)
240{ 240{
241 netif_tx_lock_bh(dev);
242 __netdev_watchdog_up(dev); 241 __netdev_watchdog_up(dev);
243 netif_tx_unlock_bh(dev);
244} 242}
245 243
246static void dev_watchdog_down(struct net_device *dev) 244static void dev_watchdog_down(struct net_device *dev)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index fde3f55bfd4b..dab15949958e 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1289,9 +1289,13 @@ SCTP_STATIC void sctp_close(struct sock *sk, long timeout)
1289 } 1289 }
1290 } 1290 }
1291 1291
1292 if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime) 1292 if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime) {
1293 sctp_primitive_ABORT(asoc, NULL); 1293 struct sctp_chunk *chunk;
1294 else 1294
1295 chunk = sctp_make_abort_user(asoc, NULL, 0);
1296 if (chunk)
1297 sctp_primitive_ABORT(asoc, chunk);
1298 } else
1295 sctp_primitive_SHUTDOWN(asoc, NULL); 1299 sctp_primitive_SHUTDOWN(asoc, NULL);
1296 } 1300 }
1297 1301
diff --git a/net/socket.c b/net/socket.c
index b4848ce0d6ac..6d261bf206fc 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -1178,7 +1178,8 @@ static int __sock_create(int family, int type, int protocol, struct socket **res
1178 */ 1178 */
1179 1179
1180 if (!(sock = sock_alloc())) { 1180 if (!(sock = sock_alloc())) {
1181 printk(KERN_WARNING "socket: no more sockets\n"); 1181 if (net_ratelimit())
1182 printk(KERN_WARNING "socket: no more sockets\n");
1182 err = -ENFILE; /* Not exactly a match, but its the 1183 err = -ENFILE; /* Not exactly a match, but its the
1183 closest posix thing */ 1184 closest posix thing */
1184 goto out; 1185 goto out;
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index aa9990a3ccd6..12e1daf875c8 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -93,14 +93,14 @@ STUBDEF=__ASM_STUB_`echo $@ | tr a-z. A-Z_`; \
93echo "\#ifndef $$STUBDEF" ; \ 93echo "\#ifndef $$STUBDEF" ; \
94echo "\#define $$STUBDEF" ; \ 94echo "\#define $$STUBDEF" ; \
95echo "\# if $(ARCHDEF)" ; \ 95echo "\# if $(ARCHDEF)" ; \
96if [ -r $(srctree)/include/$(archasm)/$@ ]; then \ 96if [ -r $(INSTALL_HDR_PATH)/include/$(archasm)/$@ ]; then \
97 echo "\# include <$(archasm)/$@>" ; \ 97 echo "\# include <$(archasm)/$@>" ; \
98else \ 98else \
99 echo "\# error $(archasm)/$@ does not exist in" \ 99 echo "\# error $(archasm)/$@ does not exist in" \
100 "the $(ARCH) architecture" ; \ 100 "the $(ARCH) architecture" ; \
101fi ; \ 101fi ; \
102echo "\# elif $(ALTARCHDEF)" ; \ 102echo "\# elif $(ALTARCHDEF)" ; \
103if [ -r $(srctree)/include/$(altarchasm)/$@ ]; then \ 103if [ -r $(INSTALL_HDR_PATH)/include/$(altarchasm)/$@ ]; then \
104 echo "\# include <$(altarchasm)/$@>" ; \ 104 echo "\# include <$(altarchasm)/$@>" ; \
105else \ 105else \
106 echo "\# error $(altarchasm)/$@ does not exist in" \ 106 echo "\# error $(altarchasm)/$@ does not exist in" \
@@ -149,7 +149,9 @@ endif
149hdrinst := -rR -f $(srctree)/scripts/Makefile.headersinst obj 149hdrinst := -rR -f $(srctree)/scripts/Makefile.headersinst obj
150 150
151.PHONY: altarch-dir 151.PHONY: altarch-dir
152altarch-dir: 152# All the files in the normal arch dir must be created first, since we test
153# for their existence.
154altarch-dir: $(subdir-y) $(header-y) $(unifdef-y) $(objhdr-y)
153 $(Q)$(MAKE) $(hdrinst)=include/asm-$(ALTARCH) dst=include/asm-$(ALTARCH) 155 $(Q)$(MAKE) $(hdrinst)=include/asm-$(ALTARCH) dst=include/asm-$(ALTARCH)
154 $(Q)$(MAKE) $(hdrinst)=include/asm dst=include/asm 156 $(Q)$(MAKE) $(hdrinst)=include/asm dst=include/asm
155 157
diff --git a/scripts/Makefile.host b/scripts/Makefile.host
index 18ecd4d5df7f..060f4c563a5c 100644
--- a/scripts/Makefile.host
+++ b/scripts/Makefile.host
@@ -30,7 +30,7 @@
30# libkconfig.so as the executable conf. 30# libkconfig.so as the executable conf.
31# Note: Shared libraries consisting of C++ files are not supported 31# Note: Shared libraries consisting of C++ files are not supported
32 32
33__hostprogs := $(sort $(hostprogs-y)$(hostprogs-m)) 33__hostprogs := $(sort $(hostprogs-y) $(hostprogs-m))
34 34
35# hostprogs-y := tools/build may have been specified. Retreive directory 35# hostprogs-y := tools/build may have been specified. Retreive directory
36host-objdirs := $(foreach f,$(__hostprogs), $(if $(dir $(f)),$(dir $(f)))) 36host-objdirs := $(foreach f,$(__hostprogs), $(if $(dir $(f)),$(dir $(f))))
diff --git a/scripts/hdrcheck.sh b/scripts/hdrcheck.sh
index b3bb683b56b6..b5ca35aa1741 100755
--- a/scripts/hdrcheck.sh
+++ b/scripts/hdrcheck.sh
@@ -1,8 +1,8 @@
1#!/bin/sh 1#!/bin/sh
2 2
3for FILE in `grep '^#include <' $2 | cut -f2 -d\< | cut -f1 -d\> | egrep ^linux\|^asm` ; do 3for FILE in `grep '^[ \t]*#[ \t]*include[ \t]*<' $2 | cut -f2 -d\< | cut -f1 -d\> | egrep ^linux\|^asm` ; do
4 if [ ! -r $1/$FILE ]; then 4 if [ ! -r $1/$FILE ]; then
5 echo $2 requires $FILE, which does not exist 5 echo $2 requires $FILE, which does not exist in exported headers
6 exit 1 6 exit 1
7 fi 7 fi
8done 8done
diff --git a/sound/oss/Kconfig b/sound/oss/Kconfig
index 1b7c3dfc2b41..97e38b665587 100644
--- a/sound/oss/Kconfig
+++ b/sound/oss/Kconfig
@@ -5,6 +5,20 @@
5# 5#
6# Prompt user for primary drivers. 6# Prompt user for primary drivers.
7 7
8config OSS_OBSOLETE_DRIVER
9 bool "Obsolete OSS drivers"
10 depends on SOUND_PRIME
11 help
12 This option enables support for obsolete OSS drivers that
13 are scheduled for removal in the near future since there
14 are ALSA drivers for the same hardware.
15
16 Please contact Adrian Bunk <bunk@stusta.de> if you had to
17 say Y here because your soundcard is not properly supported
18 by ALSA.
19
20 If unsure, say N.
21
8config SOUND_BT878 22config SOUND_BT878
9 tristate "BT878 audio dma" 23 tristate "BT878 audio dma"
10 depends on SOUND_PRIME && PCI 24 depends on SOUND_PRIME && PCI
@@ -23,7 +37,7 @@ config SOUND_BT878
23 37
24config SOUND_EMU10K1 38config SOUND_EMU10K1
25 tristate "Creative SBLive! (EMU10K1)" 39 tristate "Creative SBLive! (EMU10K1)"
26 depends on SOUND_PRIME && PCI 40 depends on SOUND_PRIME && PCI && OSS_OBSOLETE_DRIVER
27 ---help--- 41 ---help---
28 Say Y or M if you have a PCI sound card using the EMU10K1 chipset, 42 Say Y or M if you have a PCI sound card using the EMU10K1 chipset,
29 such as the Creative SBLive!, SB PCI512 or Emu-APS. 43 such as the Creative SBLive!, SB PCI512 or Emu-APS.
@@ -49,7 +63,7 @@ config MIDI_EMU10K1
49 63
50config SOUND_FUSION 64config SOUND_FUSION
51 tristate "Crystal SoundFusion (CS4280/461x)" 65 tristate "Crystal SoundFusion (CS4280/461x)"
52 depends on SOUND_PRIME && PCI 66 depends on SOUND_PRIME && PCI && OSS_OBSOLETE_DRIVER
53 help 67 help
54 This module drives the Crystal SoundFusion devices (CS4280/46xx 68 This module drives the Crystal SoundFusion devices (CS4280/46xx
55 series) when wired as native sound drivers with AC97 codecs. If 69 series) when wired as native sound drivers with AC97 codecs. If
@@ -440,7 +454,7 @@ config SOUND_DMAP
440 454
441config SOUND_AD1816 455config SOUND_AD1816
442 tristate "AD1816(A) based cards (EXPERIMENTAL)" 456 tristate "AD1816(A) based cards (EXPERIMENTAL)"
443 depends on EXPERIMENTAL && SOUND_OSS 457 depends on EXPERIMENTAL && SOUND_OSS && OSS_OBSOLETE_DRIVER
444 help 458 help
445 Say M here if you have a sound card based on the Analog Devices 459 Say M here if you have a sound card based on the Analog Devices
446 AD1816(A) chip. 460 AD1816(A) chip.
@@ -450,21 +464,21 @@ config SOUND_AD1816
450 464
451config SOUND_AD1889 465config SOUND_AD1889
452 tristate "AD1889 based cards (AD1819 codec) (EXPERIMENTAL)" 466 tristate "AD1889 based cards (AD1819 codec) (EXPERIMENTAL)"
453 depends on EXPERIMENTAL && SOUND_OSS && PCI 467 depends on EXPERIMENTAL && SOUND_OSS && PCI && OSS_OBSOLETE_DRIVER
454 help 468 help
455 Say M here if you have a sound card based on the Analog Devices 469 Say M here if you have a sound card based on the Analog Devices
456 AD1889 chip. 470 AD1889 chip.
457 471
458config SOUND_ADLIB 472config SOUND_ADLIB
459 tristate "Adlib Cards" 473 tristate "Adlib Cards"
460 depends on SOUND_OSS 474 depends on SOUND_OSS && OSS_OBSOLETE_DRIVER
461 help 475 help
462 Includes ASB 64 4D. Information on programming AdLib cards is 476 Includes ASB 64 4D. Information on programming AdLib cards is
463 available at <http://www.itsnet.com/home/ldragon/Specs/adlib.html>. 477 available at <http://www.itsnet.com/home/ldragon/Specs/adlib.html>.
464 478
465config SOUND_ACI_MIXER 479config SOUND_ACI_MIXER
466 tristate "ACI mixer (miroSOUND PCM1-pro/PCM12/PCM20)" 480 tristate "ACI mixer (miroSOUND PCM1-pro/PCM12/PCM20)"
467 depends on SOUND_OSS 481 depends on SOUND_OSS && OSS_OBSOLETE_DRIVER
468 ---help--- 482 ---help---
469 ACI (Audio Command Interface) is a protocol used to communicate with 483 ACI (Audio Command Interface) is a protocol used to communicate with
470 the microcontroller on some sound cards produced by miro and 484 the microcontroller on some sound cards produced by miro and
@@ -586,7 +600,7 @@ config SOUND_MPU401
586 600
587config SOUND_NM256 601config SOUND_NM256
588 tristate "NM256AV/NM256ZX audio support" 602 tristate "NM256AV/NM256ZX audio support"
589 depends on SOUND_OSS 603 depends on SOUND_OSS && OSS_OBSOLETE_DRIVER
590 help 604 help
591 Say M here to include audio support for the NeoMagic 256AV/256ZX 605 Say M here to include audio support for the NeoMagic 256AV/256ZX
592 chipsets. These are the audio chipsets found in the Sony 606 chipsets. These are the audio chipsets found in the Sony
@@ -706,7 +720,7 @@ config SOUND_YM3812
706 720
707config SOUND_OPL3SA2 721config SOUND_OPL3SA2
708 tristate "Yamaha OPL3-SA2 and SA3 based PnP cards" 722 tristate "Yamaha OPL3-SA2 and SA3 based PnP cards"
709 depends on SOUND_OSS 723 depends on SOUND_OSS && OSS_OBSOLETE_DRIVER
710 help 724 help
711 Say Y or M if you have a card based on one of these Yamaha sound 725 Say Y or M if you have a card based on one of these Yamaha sound
712 chipsets or the "SAx", which is actually a SA3. Read 726 chipsets or the "SAx", which is actually a SA3. Read
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 0abf2808d59f..51e83d7a839a 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -573,7 +573,7 @@ AC97_SINGLE("PC Speaker Playback Volume", AC97_PC_BEEP, 1, 15, 1)
573}; 573};
574 574
575static const struct snd_kcontrol_new snd_ac97_controls_mic_boost = 575static const struct snd_kcontrol_new snd_ac97_controls_mic_boost =
576 AC97_SINGLE("Mic Boost (+20dB) Switch", AC97_MIC, 6, 1, 0); 576 AC97_SINGLE("Mic Boost (+20dB)", AC97_MIC, 6, 1, 0);
577 577
578 578
579static const char* std_rec_sel[] = {"Mic", "CD", "Video", "Aux", "Line", "Mix", "Mix Mono", "Phone"}; 579static const char* std_rec_sel[] = {"Mic", "CD", "Video", "Aux", "Line", "Mix", "Mix Mono", "Phone"};
@@ -615,7 +615,7 @@ AC97_SINGLE("Simulated Stereo Enhancement", AC97_GENERAL_PURPOSE, 14, 1, 0),
615AC97_SINGLE("3D Control - Switch", AC97_GENERAL_PURPOSE, 13, 1, 0), 615AC97_SINGLE("3D Control - Switch", AC97_GENERAL_PURPOSE, 13, 1, 0),
616AC97_SINGLE("Loudness (bass boost)", AC97_GENERAL_PURPOSE, 12, 1, 0), 616AC97_SINGLE("Loudness (bass boost)", AC97_GENERAL_PURPOSE, 12, 1, 0),
617AC97_ENUM("Mono Output Select", std_enum[2]), 617AC97_ENUM("Mono Output Select", std_enum[2]),
618AC97_ENUM("Mic Select Capture Switch", std_enum[3]), 618AC97_ENUM("Mic Select", std_enum[3]),
619AC97_SINGLE("ADC/DAC Loopback", AC97_GENERAL_PURPOSE, 7, 1, 0) 619AC97_SINGLE("ADC/DAC Loopback", AC97_GENERAL_PURPOSE, 7, 1, 0)
620}; 620};
621 621