aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-12-05 10:48:41 -0500
committerAnton Altaparmakov <aia21@cantab.net>2005-12-05 10:48:41 -0500
commit292d4ed32e35df4755052b5002e533348d1648fd (patch)
tree8522e6bab962696bd25a6c02fb068c674a09b7ee
parent3c6af7fa787f21f8873a050568ed892312899eb5 (diff)
parente4f5c82a92c2a546a16af1614114eec19120e40a (diff)
Merge branch 'master' of /usr/src/ntfs-2.6/
-rw-r--r--Documentation/usb/error-codes.txt5
-rw-r--r--MAINTAINERS12
-rw-r--r--Makefile2
-rw-r--r--arch/arm/configs/corgi_defconfig83
-rw-r--r--arch/arm/configs/poodle_defconfig1015
-rw-r--r--arch/arm/configs/spitz_defconfig100
-rw-r--r--arch/arm/kernel/head.S11
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-setup.c2
-rw-r--r--arch/arm/mach-pxa/Kconfig6
-rw-r--r--arch/arm/mach-realview/core.c1
-rw-r--r--arch/arm/mm/consistent.c13
-rw-r--r--arch/arm/mm/flush.c7
-rw-r--r--arch/arm/tools/mach-types14
-rw-r--r--arch/frv/kernel/semaphore.c2
-rw-r--r--arch/frv/mb93090-mb00/pci-irq.c2
-rw-r--r--arch/frv/mm/init.c2
-rw-r--r--arch/frv/mm/pgalloc.c6
-rw-r--r--arch/i386/kernel/acpi/boot.c7
-rw-r--r--arch/i386/kernel/io_apic.c4
-rw-r--r--arch/i386/kernel/reboot.c8
-rw-r--r--arch/ia64/kernel/ia64_ksyms.c1
-rw-r--r--arch/ia64/kernel/kprobes.c2
-rw-r--r--arch/ia64/kernel/traps.c18
-rw-r--r--arch/m32r/kernel/io_mappi3.c54
-rw-r--r--arch/m32r/kernel/setup_mappi3.c20
-rw-r--r--arch/m32r/kernel/sys_m32r.c6
-rw-r--r--arch/mips/Kconfig4
-rw-r--r--arch/mips/au1000/db1x00/board_setup.c7
-rw-r--r--arch/mips/au1000/db1x00/init.c12
-rw-r--r--arch/mips/configs/atlas_defconfig142
-rw-r--r--arch/mips/configs/bigsur_defconfig149
-rw-r--r--arch/mips/configs/capcella_defconfig143
-rw-r--r--arch/mips/configs/cobalt_defconfig131
-rw-r--r--arch/mips/configs/db1000_defconfig144
-rw-r--r--arch/mips/configs/db1100_defconfig144
-rw-r--r--arch/mips/configs/db1200_defconfig147
-rw-r--r--arch/mips/configs/db1500_defconfig143
-rw-r--r--arch/mips/configs/db1550_defconfig143
-rw-r--r--arch/mips/configs/ddb5476_defconfig131
-rw-r--r--arch/mips/configs/ddb5477_defconfig131
-rw-r--r--arch/mips/configs/decstation_defconfig146
-rw-r--r--arch/mips/configs/e55_defconfig144
-rw-r--r--arch/mips/configs/ev64120_defconfig143
-rw-r--r--arch/mips/configs/ev96100_defconfig144
-rw-r--r--arch/mips/configs/ip22_defconfig145
-rw-r--r--arch/mips/configs/ip27_defconfig146
-rw-r--r--arch/mips/configs/ip32_defconfig131
-rw-r--r--arch/mips/configs/it8172_defconfig146
-rw-r--r--arch/mips/configs/ivr_defconfig145
-rw-r--r--arch/mips/configs/jaguar-atx_defconfig139
-rw-r--r--arch/mips/configs/jmr3927_defconfig131
-rw-r--r--arch/mips/configs/lasat200_defconfig143
-rw-r--r--arch/mips/configs/malta_defconfig142
-rw-r--r--arch/mips/configs/mipssim_defconfig145
-rw-r--r--arch/mips/configs/mpc30x_defconfig143
-rw-r--r--arch/mips/configs/ocelot_3_defconfig145
-rw-r--r--arch/mips/configs/ocelot_c_defconfig129
-rw-r--r--arch/mips/configs/ocelot_defconfig132
-rw-r--r--arch/mips/configs/ocelot_g_defconfig129
-rw-r--r--arch/mips/configs/pb1100_defconfig144
-rw-r--r--arch/mips/configs/pb1500_defconfig143
-rw-r--r--arch/mips/configs/pb1550_defconfig143
-rw-r--r--arch/mips/configs/pnx8550-jbs_defconfig145
-rw-r--r--arch/mips/configs/pnx8550-v2pci_defconfig143
-rw-r--r--arch/mips/configs/qemu_defconfig129
-rw-r--r--arch/mips/configs/rbhma4500_defconfig143
-rw-r--r--arch/mips/configs/rm200_defconfig148
-rw-r--r--arch/mips/configs/sb1250-swarm_defconfig145
-rw-r--r--arch/mips/configs/sead_defconfig125
-rw-r--r--arch/mips/configs/tb0226_defconfig143
-rw-r--r--arch/mips/configs/tb0229_defconfig143
-rw-r--r--arch/mips/configs/workpad_defconfig144
-rw-r--r--arch/mips/configs/yosemite_defconfig145
-rw-r--r--arch/mips/defconfig145
-rw-r--r--arch/mips/jmr3927/rbhma3100/irq.c28
-rw-r--r--arch/mips/jmr3927/rbhma3100/setup.c2
-rw-r--r--arch/mips/kernel/cpu-probe.c4
-rw-r--r--arch/mips/kernel/irixsig.c4
-rw-r--r--arch/mips/kernel/scall32-o32.S18
-rw-r--r--arch/mips/kernel/scall64-64.S18
-rw-r--r--arch/mips/kernel/scall64-n32.S4
-rw-r--r--arch/mips/kernel/scall64-o32.S4
-rw-r--r--arch/mips/kernel/signal.c2
-rw-r--r--arch/mips/kernel/signal32.c2
-rw-r--r--arch/mips/kernel/traps.c5
-rw-r--r--arch/mips/mm/init.c2
-rw-r--r--arch/mips/qemu/q-firmware.c13
-rw-r--r--arch/powerpc/Makefile16
-rw-r--r--arch/powerpc/kernel/ppc_ksyms.c6
-rw-r--r--arch/powerpc/kernel/process.c62
-rw-r--r--arch/powerpc/kernel/prom_init.c2
-rw-r--r--arch/powerpc/kernel/vdso.c6
-rw-r--r--arch/powerpc/mm/hugetlbpage.c2
-rw-r--r--arch/powerpc/platforms/iseries/iommu.c2
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c2
-rw-r--r--arch/powerpc/sysdev/dart.h2
-rw-r--r--arch/powerpc/sysdev/u3_iommu.c4
-rw-r--r--arch/ppc/boot/simple/Makefile4
-rw-r--r--arch/ppc/kernel/ppc_ksyms.c2
-rw-r--r--arch/ppc/kernel/process.c6
-rw-r--r--arch/ppc/syslib/m82xx_pci.c3
-rw-r--r--arch/sparc/mm/generic.c10
-rw-r--r--arch/sparc64/mm/generic.c16
-rw-r--r--drivers/Makefile3
-rw-r--r--drivers/acpi/Kconfig1
-rw-r--r--drivers/acpi/Makefile2
-rw-r--r--drivers/acpi/processor_core.c15
-rw-r--r--drivers/acpi/processor_idle.c51
-rw-r--r--drivers/acpi/processor_thermal.c38
-rw-r--r--drivers/acpi/scan.c2
-rw-r--r--drivers/acpi/thermal.c163
-rw-r--r--drivers/acpi/video.c2
-rw-r--r--drivers/atm/Kconfig7
-rw-r--r--drivers/atm/Makefile1
-rw-r--r--drivers/atm/adummy.c168
-rw-r--r--drivers/atm/atmdev_init.c54
-rw-r--r--drivers/atm/atmtcp.c20
-rw-r--r--drivers/atm/lanai.c102
-rw-r--r--drivers/char/drm/drm_context.c5
-rw-r--r--drivers/char/drm/drm_lock.c16
-rw-r--r--drivers/char/mem.c2
-rw-r--r--drivers/cpufreq/cpufreq.c12
-rw-r--r--drivers/hwmon/w83792d.c25
-rw-r--r--drivers/infiniband/core/mad.c4
-rw-r--r--drivers/infiniband/core/user_mad.c41
-rw-r--r--drivers/infiniband/core/uverbs.h11
-rw-r--r--drivers/infiniband/core/uverbs_cmd.c90
-rw-r--r--drivers/infiniband/core/uverbs_main.c21
-rw-r--r--drivers/infiniband/hw/mthca/mthca_qp.c34
-rw-r--r--drivers/infiniband/hw/mthca/mthca_wqe.h3
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_ib.c4
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c11
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c10
-rw-r--r--drivers/md/md.c4
-rw-r--r--drivers/md/raid1.c8
-rw-r--r--drivers/md/raid10.c6
-rw-r--r--drivers/md/raid5.c2
-rw-r--r--drivers/md/raid6main.c27
-rw-r--r--drivers/media/dvb/b2c2/flexcop-hw-filter.c2
-rw-r--r--drivers/media/dvb/dvb-core/dvb_ca_en50221.c69
-rw-r--r--drivers/media/dvb/dvb-core/dvb_net.c31
-rw-r--r--drivers/media/dvb/dvb-usb/a800.c2
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb-common.c18
-rw-r--r--drivers/media/dvb/dvb-usb/digitv.c2
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-init.c2
-rw-r--r--drivers/media/dvb/frontends/cx22702.c2
-rw-r--r--drivers/media/dvb/frontends/cx22702.h2
-rw-r--r--drivers/media/dvb/frontends/nxt200x.c2
-rw-r--r--drivers/media/dvb/frontends/ves1820.c14
-rw-r--r--drivers/media/dvb/ttpci/Kconfig1
-rw-r--r--drivers/media/dvb/ttpci/av7110_ca.c1
-rw-r--r--drivers/media/dvb/ttpci/budget-av.c2
-rw-r--r--drivers/media/dvb/ttpci/budget-ci.c2
-rw-r--r--drivers/media/dvb/ttpci/budget.c2
-rw-r--r--drivers/media/dvb/ttpci/ttpci-eeprom.c1
-rw-r--r--drivers/media/video/Kconfig5
-rw-r--r--drivers/media/video/bttv-cards.c6
-rw-r--r--drivers/media/video/bttv-driver.c67
-rw-r--r--drivers/media/video/cx25840/cx25840-core.c38
-rw-r--r--drivers/media/video/cx25840/cx25840.h9
-rw-r--r--drivers/media/video/cx88/Kconfig20
-rw-r--r--drivers/media/video/cx88/Makefile27
-rw-r--r--drivers/media/video/cx88/cx88-cards.c45
-rw-r--r--drivers/media/video/cx88/cx88-core.c35
-rw-r--r--drivers/media/video/cx88/cx88-tvaudio.c28
-rw-r--r--drivers/media/video/cx88/cx88.h4
-rw-r--r--drivers/media/video/em28xx/em28xx-core.c6
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c2
-rw-r--r--drivers/media/video/ir-kbd-i2c.c2
-rw-r--r--drivers/media/video/saa7115.c14
-rw-r--r--drivers/media/video/saa711x.c2
-rw-r--r--drivers/media/video/saa7127.c6
-rw-r--r--drivers/media/video/saa7134/Kconfig12
-rw-r--r--drivers/media/video/saa7134/Makefile19
-rw-r--r--drivers/media/video/saa7134/saa7134-alsa.c36
-rw-r--r--drivers/media/video/saa7134/saa7134-core.c25
-rw-r--r--drivers/media/video/saa7134/saa7134-oss.c81
-rw-r--r--drivers/media/video/saa7134/saa7134.h4
-rw-r--r--drivers/media/video/tveeprom.c64
-rw-r--r--drivers/media/video/video-buf.c9
-rw-r--r--drivers/media/video/videodev.c26
-rw-r--r--drivers/message/fusion/mptbase.c70
-rw-r--r--drivers/message/fusion/mptbase.h5
-rw-r--r--drivers/message/fusion/mptscsih.c10
-rw-r--r--drivers/message/i2o/pci.c2
-rw-r--r--drivers/mmc/mmc.c2
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0001.c10
-rw-r--r--drivers/mtd/chips/cfi_probe.c8
-rw-r--r--drivers/mtd/chips/sharp.c123
-rw-r--r--drivers/mtd/devices/block2mtd.c6
-rw-r--r--drivers/mtd/devices/ms02-nv.c6
-rw-r--r--drivers/mtd/ftl.c6
-rw-r--r--drivers/mtd/maps/Kconfig6
-rw-r--r--drivers/mtd/maps/Makefile1
-rw-r--r--drivers/mtd/maps/ixp4xx.c78
-rw-r--r--drivers/mtd/maps/nettel.c4
-rw-r--r--drivers/mtd/maps/pci.c4
-rw-r--r--drivers/mtd/maps/physmap.c3
-rw-r--r--drivers/mtd/maps/sc520cdp.c4
-rw-r--r--drivers/mtd/nand/nandsim.c2
-rw-r--r--drivers/mtd/rfd_ftl.c6
-rw-r--r--drivers/net/b44.c13
-rw-r--r--drivers/net/e1000/e1000_main.c14
-rw-r--r--drivers/net/ibm_emac/ibm_emac_core.c38
-rw-r--r--drivers/net/ibm_emac/ibm_emac_core.h2
-rw-r--r--drivers/net/jazzsonic.c4
-rw-r--r--drivers/net/mipsnet.h30
-rw-r--r--drivers/net/pcmcia/fmvj18x_cs.c32
-rw-r--r--drivers/net/sk98lin/Makefile5
-rw-r--r--drivers/net/sk98lin/h/skdrv2nd.h4
-rw-r--r--drivers/net/sk98lin/skcsum.c871
-rw-r--r--drivers/net/sk98lin/skethtool.c2
-rw-r--r--drivers/net/sk98lin/skge.c174
-rw-r--r--drivers/net/skge.c4
-rw-r--r--drivers/net/wireless/airo.c4
-rw-r--r--drivers/net/wireless/orinoco.c3
-rw-r--r--drivers/pcmcia/m32r_cfc.c3
-rw-r--r--drivers/s390/scsi/zfcp_aux.c14
-rw-r--r--drivers/s390/scsi/zfcp_dbf.c4
-rw-r--r--drivers/s390/scsi/zfcp_erp.c94
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c110
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c2
-rw-r--r--drivers/scsi/aacraid/linit.c2
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_osm.c2
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm.c2
-rw-r--r--drivers/scsi/dpt_i2o.c9
-rw-r--r--drivers/scsi/libata-scsi.c9
-rw-r--r--drivers/scsi/megaraid.c29
-rw-r--r--drivers/scsi/scsi_lib.c9
-rw-r--r--drivers/scsi/scsi_transport_spi.c28
-rw-r--r--drivers/scsi/sg.c6
-rw-r--r--drivers/scsi/st.c3
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.c5
-rw-r--r--drivers/serial/8250.c2
-rw-r--r--drivers/serial/8250_pci.c2
-rw-r--r--drivers/serial/serial_core.c2
-rw-r--r--drivers/serial/serial_cs.c6
-rw-r--r--drivers/usb/atm/cxacru.c3
-rw-r--r--drivers/usb/atm/usbatm.c4
-rw-r--r--drivers/usb/core/hcd-pci.c3
-rw-r--r--drivers/usb/core/hcd.c15
-rw-r--r--drivers/usb/core/hcd.h7
-rw-r--r--drivers/usb/host/ehci-pci.c46
-rw-r--r--drivers/usb/host/ehci-q.c24
-rw-r--r--drivers/usb/host/ehci-sched.c18
-rw-r--r--drivers/usb/host/ohci-hcd.c6
-rw-r--r--drivers/usb/host/ohci-hub.c24
-rw-r--r--drivers/usb/host/ohci-pci.c27
-rw-r--r--drivers/usb/host/uhci-hcd.c6
-rw-r--r--drivers/video/Kconfig13
-rw-r--r--drivers/video/cirrusfb.c15
-rw-r--r--drivers/video/console/fbcon_ccw.c2
-rw-r--r--drivers/video/console/fbcon_rotate.h13
-rw-r--r--drivers/video/fbmem.c6
-rw-r--r--fs/9p/vfs_inode.c2
-rw-r--r--fs/cifs/CHANGES8
-rw-r--r--fs/cifs/README30
-rw-r--r--fs/cifs/TODO4
-rw-r--r--fs/cifs/cifsfs.c23
-rw-r--r--fs/cifs/cifssmb.c25
-rw-r--r--fs/cifs/dir.c34
-rw-r--r--fs/cifs/inode.c50
-rw-r--r--fs/cifs/misc.c17
-rw-r--r--fs/cifs/netmisc.c4
-rw-r--r--fs/cifs/transport.c1
-rw-r--r--fs/dquot.c6
-rw-r--r--fs/exec.c12
-rw-r--r--fs/ext3/resize.c1
-rw-r--r--fs/fuse/dir.c37
-rw-r--r--fs/hfsplus/hfsplus_fs.h1
-rw-r--r--fs/hfsplus/hfsplus_raw.h12
-rw-r--r--fs/hfsplus/options.c6
-rw-r--r--fs/hfsplus/super.c20
-rw-r--r--fs/jffs2/fs.c2
-rw-r--r--fs/jffs2/super.c2
-rw-r--r--fs/nfs/dir.c3
-rw-r--r--fs/nfs/inode.c81
-rw-r--r--fs/nfs/nfs4proc.c17
-rw-r--r--fs/nfs/nfs4state.c20
-rw-r--r--fs/nfs/proc.c1
-rw-r--r--fs/nfs/write.c6
-rw-r--r--fs/proc/task_mmu.c7
-rw-r--r--fs/reiserfs/inode.c2
-rw-r--r--fs/reiserfs/journal.c9
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.c13
-rw-r--r--fs/xfs/xfs_attr_leaf.c11
-rw-r--r--fs/xfs/xfs_fsops.c2
-rw-r--r--fs/xfs/xfs_iomap.h2
-rw-r--r--fs/xfs/xfs_log_priv.h36
-rw-r--r--fs/xfs/xfs_vnodeops.c5
-rw-r--r--include/asm-arm/arch-iop3xx/timex.h2
-rw-r--r--include/asm-arm/arch-s3c2410/regs-gpio.h239
-rw-r--r--include/asm-arm/arch-sa1100/io.h2
-rw-r--r--include/asm-arm/semaphore.h5
-rw-r--r--include/asm-arm/spinlock.h26
-rw-r--r--include/asm-frv/hardirq.h1
-rw-r--r--include/asm-frv/ide.h8
-rw-r--r--include/asm-frv/page.h4
-rw-r--r--include/asm-frv/semaphore.h2
-rw-r--r--include/asm-frv/thread_info.h2
-rw-r--r--include/asm-ia64/page.h3
-rw-r--r--include/asm-m32r/atomic.h21
-rw-r--r--include/asm-m32r/ide.h13
-rw-r--r--include/asm-m32r/mappi3/mappi3_pld.h2
-rw-r--r--include/asm-m32r/system.h64
-rw-r--r--include/asm-mips/mach-qemu/timex.h16
-rw-r--r--include/asm-powerpc/iommu.h2
-rw-r--r--include/asm-powerpc/page_64.h17
-rw-r--r--include/asm-powerpc/tce.h2
-rw-r--r--include/asm-sparc64/pgtable.h10
-rw-r--r--include/linux/atmdev.h18
-rw-r--r--include/linux/cn_proc.h8
-rw-r--r--include/linux/cpu.h7
-rw-r--r--include/linux/i2c-id.h1
-rw-r--r--include/linux/memory.h1
-rw-r--r--include/linux/mm.h9
-rw-r--r--include/linux/mmc/protocol.h4
-rw-r--r--include/linux/mtd/cfi.h18
-rw-r--r--include/linux/rmap.h4
-rw-r--r--include/linux/sched.h1
-rw-r--r--include/linux/serial_core.h3
-rw-r--r--include/linux/swap.h6
-rw-r--r--include/media/tveeprom.h4
-rw-r--r--kernel/cpu.c83
-rw-r--r--kernel/fork.c5
-rw-r--r--kernel/posix-cpu-timers.c2
-rw-r--r--kernel/power/main.c21
-rw-r--r--kernel/ptrace.c3
-rw-r--r--kernel/workqueue.c12
-rw-r--r--lib/genalloc.c14
-rw-r--r--mm/fremap.c46
-rw-r--r--mm/madvise.c2
-rw-r--r--mm/memory.c341
-rw-r--r--mm/mempolicy.c12
-rw-r--r--mm/msync.c12
-rw-r--r--mm/nommu.c2
-rw-r--r--mm/page_alloc.c40
-rw-r--r--mm/rmap.c42
-rw-r--r--mm/thrash.c10
-rw-r--r--mm/vmscan.c29
-rw-r--r--net/atm/atm_misc.c11
-rw-r--r--net/atm/common.c66
-rw-r--r--net/atm/common.h2
-rw-r--r--net/atm/resources.c78
-rw-r--r--net/atm/resources.h3
-rw-r--r--net/ipv4/af_inet.c7
-rw-r--r--net/ipv4/fib_frontend.c8
-rw-r--r--net/ipv4/fib_hash.c2
-rw-r--r--net/ipv4/fib_semantics.c2
-rw-r--r--net/ipv4/icmp.c4
-rw-r--r--net/ipv4/igmp.c5
-rw-r--r--net/ipv4/ip_gre.c2
-rw-r--r--net/ipv4/ip_output.c2
-rw-r--r--net/ipv4/ipvs/ip_vs_conn.c2
-rw-r--r--net/ipv4/ipvs/ip_vs_ctl.c4
-rw-r--r--net/ipv4/ipvs/ip_vs_proto_tcp.c2
-rw-r--r--net/ipv4/netfilter/ip_conntrack_amanda.c2
-rw-r--r--net/ipv4/netfilter/ip_conntrack_core.c4
-rw-r--r--net/ipv4/netfilter/ip_conntrack_ftp.c2
-rw-r--r--net/ipv4/netfilter/ip_conntrack_irc.c2
-rw-r--r--net/ipv4/netfilter/ip_conntrack_proto_icmp.c4
-rw-r--r--net/ipv4/netfilter/ip_conntrack_proto_sctp.c4
-rw-r--r--net/ipv4/netfilter/ip_conntrack_proto_tcp.c35
-rw-r--r--net/ipv4/netfilter/ip_nat_core.c2
-rw-r--r--net/ipv4/netfilter/ip_tables.c2
-rw-r--r--net/ipv4/netfilter/ipt_LOG.c4
-rw-r--r--net/ipv4/netfilter/ipt_recent.c1
-rw-r--r--net/ipv4/proc.c10
-rw-r--r--net/ipv4/route.c5
-rw-r--r--net/ipv4/tcp.c8
-rw-r--r--net/ipv6/addrconf.c2
-rw-r--r--net/ipv6/af_inet6.c47
-rw-r--r--net/ipv6/icmp.c2
-rw-r--r--net/ipv6/ip6_output.c3
-rw-r--r--net/ipv6/ipv6_sockglue.c4
-rw-r--r--net/ipv6/mcast.c5
-rw-r--r--net/ipv6/netfilter/ip6_tables.c2
-rw-r--r--net/netfilter/nf_conntrack_proto_tcp.c29
-rw-r--r--net/sctp/socket.c10
-rw-r--r--net/sctp/transport.c3
-rw-r--r--net/sunrpc/rpc_pipe.c26
-rw-r--r--security/keys/keyring.c2
382 files changed, 6766 insertions, 7231 deletions
diff --git a/Documentation/usb/error-codes.txt b/Documentation/usb/error-codes.txt
index 1e36f1661cd0..867f4c38f356 100644
--- a/Documentation/usb/error-codes.txt
+++ b/Documentation/usb/error-codes.txt
@@ -46,8 +46,9 @@ USB-specific:
46 46
47-EMSGSIZE (a) endpoint maxpacket size is zero; it is not usable 47-EMSGSIZE (a) endpoint maxpacket size is zero; it is not usable
48 in the current interface altsetting. 48 in the current interface altsetting.
49 (b) ISO packet is biger than endpoint maxpacket 49 (b) ISO packet is larger than the endpoint maxpacket.
50 (c) requested data transfer size is invalid (negative) 50 (c) requested data transfer length is invalid: negative
51 or too large for the host controller.
51 52
52-ENOSPC This request would overcommit the usb bandwidth reserved 53-ENOSPC This request would overcommit the usb bandwidth reserved
53 for periodic transfers (interrupt, isochronous). 54 for periodic transfers (interrupt, isochronous).
diff --git a/MAINTAINERS b/MAINTAINERS
index a74a0c726134..77bb08606912 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -536,6 +536,7 @@ P: Mauro Carvalho Chehab
536M: mchehab@brturbo.com.br 536M: mchehab@brturbo.com.br
537L: video4linux-list@redhat.com 537L: video4linux-list@redhat.com
538W: http://linuxtv.org 538W: http://linuxtv.org
539T: quilt http://www.linuxtv.org/download/quilt/
539S: Maintained 540S: Maintained
540 541
541BUSLOGIC SCSI DRIVER 542BUSLOGIC SCSI DRIVER
@@ -833,6 +834,7 @@ P: LinuxTV.org Project
833M: linux-dvb-maintainer@linuxtv.org 834M: linux-dvb-maintainer@linuxtv.org
834L: linux-dvb@linuxtv.org (subscription required) 835L: linux-dvb@linuxtv.org (subscription required)
835W: http://linuxtv.org/ 836W: http://linuxtv.org/
837T: quilt http://www.linuxtv.org/download/quilt/
836S: Supported 838S: Supported
837 839
838EATA-DMA SCSI DRIVER 840EATA-DMA SCSI DRIVER
@@ -1634,6 +1636,15 @@ L: ldm-devel@lists.sourceforge.net
1634W: http://ldm.sourceforge.net 1636W: http://ldm.sourceforge.net
1635S: Maintained 1637S: Maintained
1636 1638
1639LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
1640P: Eric Moore
1641M: Eric.Moore@lsil.com
1642M: support@lsil.com
1643L: mpt_linux_developer@lsil.com
1644L: linux-scsi@vger.kernel.org
1645W: http://www.lsilogic.com/support
1646S: Supported
1647
1637LSILOGIC/SYMBIOS/NCR 53C8XX and 53C1010 PCI-SCSI drivers 1648LSILOGIC/SYMBIOS/NCR 53C8XX and 53C1010 PCI-SCSI drivers
1638P: Matthew Wilcox 1649P: Matthew Wilcox
1639M: matthew@wil.cx 1650M: matthew@wil.cx
@@ -2885,6 +2896,7 @@ P: Mauro Carvalho Chehab
2885M: mchehab@brturbo.com.br 2896M: mchehab@brturbo.com.br
2886L: video4linux-list@redhat.com 2897L: video4linux-list@redhat.com
2887W: http://linuxtv.org 2898W: http://linuxtv.org
2899T: quilt http://www.linuxtv.org/download/quilt/
2888S: Maintained 2900S: Maintained
2889 2901
2890W1 DALLAS'S 1-WIRE BUS 2902W1 DALLAS'S 1-WIRE BUS
diff --git a/Makefile b/Makefile
index e7a0443c867c..b1c458c2522d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 2 1VERSION = 2
2PATCHLEVEL = 6 2PATCHLEVEL = 6
3SUBLEVEL = 15 3SUBLEVEL = 15
4EXTRAVERSION =-rc2 4EXTRAVERSION =-rc5
5NAME=Affluent Albatross 5NAME=Affluent Albatross
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
diff --git a/arch/arm/configs/corgi_defconfig b/arch/arm/configs/corgi_defconfig
index 24987c89609a..06229026f78b 100644
--- a/arch/arm/configs/corgi_defconfig
+++ b/arch/arm/configs/corgi_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.14-rc3 3# Linux kernel version: 2.6.15-rc2
4# Sun Oct 9 15:46:42 2005 4# Mon Nov 28 10:30:09 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -64,6 +64,23 @@ CONFIG_OBSOLETE_MODPARM=y
64CONFIG_KMOD=y 64CONFIG_KMOD=y
65 65
66# 66#
67# Block layer
68#
69
70#
71# IO Schedulers
72#
73CONFIG_IOSCHED_NOOP=y
74CONFIG_IOSCHED_AS=y
75CONFIG_IOSCHED_DEADLINE=y
76CONFIG_IOSCHED_CFQ=y
77CONFIG_DEFAULT_AS=y
78# CONFIG_DEFAULT_DEADLINE is not set
79# CONFIG_DEFAULT_CFQ is not set
80# CONFIG_DEFAULT_NOOP is not set
81CONFIG_DEFAULT_IOSCHED="anticipatory"
82
83#
67# System Type 84# System Type
68# 85#
69# CONFIG_ARCH_CLPS7500 is not set 86# CONFIG_ARCH_CLPS7500 is not set
@@ -85,6 +102,7 @@ CONFIG_ARCH_PXA=y
85# CONFIG_ARCH_LH7A40X is not set 102# CONFIG_ARCH_LH7A40X is not set
86# CONFIG_ARCH_OMAP is not set 103# CONFIG_ARCH_OMAP is not set
87# CONFIG_ARCH_VERSATILE is not set 104# CONFIG_ARCH_VERSATILE is not set
105# CONFIG_ARCH_REALVIEW is not set
88# CONFIG_ARCH_IMX is not set 106# CONFIG_ARCH_IMX is not set
89# CONFIG_ARCH_H720X is not set 107# CONFIG_ARCH_H720X is not set
90# CONFIG_ARCH_AAEC2000 is not set 108# CONFIG_ARCH_AAEC2000 is not set
@@ -98,12 +116,14 @@ CONFIG_ARCH_PXA=y
98CONFIG_PXA_SHARPSL=y 116CONFIG_PXA_SHARPSL=y
99CONFIG_PXA_SHARPSL_25x=y 117CONFIG_PXA_SHARPSL_25x=y
100# CONFIG_PXA_SHARPSL_27x is not set 118# CONFIG_PXA_SHARPSL_27x is not set
101# CONFIG_MACH_POODLE is not set 119CONFIG_MACH_POODLE=y
102CONFIG_MACH_CORGI=y 120CONFIG_MACH_CORGI=y
103CONFIG_MACH_SHEPHERD=y 121CONFIG_MACH_SHEPHERD=y
104CONFIG_MACH_HUSKY=y 122CONFIG_MACH_HUSKY=y
123CONFIG_MACH_TOSA=y
105CONFIG_PXA25x=y 124CONFIG_PXA25x=y
106CONFIG_PXA_SHARP_C7xx=y 125CONFIG_PXA_SHARP_C7xx=y
126CONFIG_PXA_SSP=y
107 127
108# 128#
109# Processor Type 129# Processor Type
@@ -155,6 +175,7 @@ CONFIG_FLATMEM_MANUAL=y
155CONFIG_FLATMEM=y 175CONFIG_FLATMEM=y
156CONFIG_FLAT_NODE_MEM_MAP=y 176CONFIG_FLAT_NODE_MEM_MAP=y
157# CONFIG_SPARSEMEM_STATIC is not set 177# CONFIG_SPARSEMEM_STATIC is not set
178CONFIG_SPLIT_PTLOCK_CPUS=4096
158CONFIG_ALIGNMENT_TRAP=y 179CONFIG_ALIGNMENT_TRAP=y
159 180
160# 181#
@@ -235,6 +256,10 @@ CONFIG_INET6_TUNNEL=m
235CONFIG_IPV6_TUNNEL=m 256CONFIG_IPV6_TUNNEL=m
236CONFIG_NETFILTER=y 257CONFIG_NETFILTER=y
237# CONFIG_NETFILTER_DEBUG is not set 258# CONFIG_NETFILTER_DEBUG is not set
259
260#
261# Core Netfilter Configuration
262#
238# CONFIG_NETFILTER_NETLINK is not set 263# CONFIG_NETFILTER_NETLINK is not set
239 264
240# 265#
@@ -356,6 +381,10 @@ CONFIG_IP6_NF_RAW=m
356# CONFIG_NET_DIVERT is not set 381# CONFIG_NET_DIVERT is not set
357# CONFIG_ECONET is not set 382# CONFIG_ECONET is not set
358# CONFIG_WAN_ROUTER is not set 383# CONFIG_WAN_ROUTER is not set
384
385#
386# QoS and/or fair queueing
387#
359# CONFIG_NET_SCHED is not set 388# CONFIG_NET_SCHED is not set
360CONFIG_NET_CLS_ROUTE=y 389CONFIG_NET_CLS_ROUTE=y
361 390
@@ -413,6 +442,7 @@ CONFIG_IRCOMM=m
413# CONFIG_SMC_IRCC_FIR is not set 442# CONFIG_SMC_IRCC_FIR is not set
414# CONFIG_ALI_FIR is not set 443# CONFIG_ALI_FIR is not set
415# CONFIG_VIA_FIR is not set 444# CONFIG_VIA_FIR is not set
445CONFIG_PXA_FICP=m
416CONFIG_BT=m 446CONFIG_BT=m
417CONFIG_BT_L2CAP=m 447CONFIG_BT_L2CAP=m
418CONFIG_BT_SCO=m 448CONFIG_BT_SCO=m
@@ -431,7 +461,6 @@ CONFIG_BT_HCIUSB=m
431CONFIG_BT_HCIUART=m 461CONFIG_BT_HCIUART=m
432CONFIG_BT_HCIUART_H4=y 462CONFIG_BT_HCIUART_H4=y
433CONFIG_BT_HCIUART_BCSP=y 463CONFIG_BT_HCIUART_BCSP=y
434CONFIG_BT_HCIUART_BCSP_TXCRC=y
435CONFIG_BT_HCIBCM203X=m 464CONFIG_BT_HCIBCM203X=m
436CONFIG_BT_HCIBPA10X=m 465CONFIG_BT_HCIBPA10X=m
437CONFIG_BT_HCIBFUSB=m 466CONFIG_BT_HCIBFUSB=m
@@ -459,6 +488,11 @@ CONFIG_FW_LOADER=y
459# CONFIG_DEBUG_DRIVER is not set 488# CONFIG_DEBUG_DRIVER is not set
460 489
461# 490#
491# Connector - unified userspace <-> kernelspace linker
492#
493# CONFIG_CONNECTOR is not set
494
495#
462# Memory Technology Devices (MTD) 496# Memory Technology Devices (MTD)
463# 497#
464CONFIG_MTD=y 498CONFIG_MTD=y
@@ -477,6 +511,7 @@ CONFIG_MTD_BLOCK=y
477# CONFIG_FTL is not set 511# CONFIG_FTL is not set
478# CONFIG_NFTL is not set 512# CONFIG_NFTL is not set
479# CONFIG_INFTL is not set 513# CONFIG_INFTL is not set
514# CONFIG_RFD_FTL is not set
480 515
481# 516#
482# RAM/ROM/Flash chip drivers 517# RAM/ROM/Flash chip drivers
@@ -532,6 +567,11 @@ CONFIG_MTD_NAND_SHARPSL=y
532# CONFIG_MTD_NAND_NANDSIM is not set 567# CONFIG_MTD_NAND_NANDSIM is not set
533 568
534# 569#
570# OneNAND Flash Device Drivers
571#
572# CONFIG_MTD_ONENAND is not set
573
574#
535# Parallel port support 575# Parallel port support
536# 576#
537# CONFIG_PARPORT is not set 577# CONFIG_PARPORT is not set
@@ -551,14 +591,6 @@ CONFIG_BLK_DEV_LOOP=y
551# CONFIG_BLK_DEV_RAM is not set 591# CONFIG_BLK_DEV_RAM is not set
552CONFIG_BLK_DEV_RAM_COUNT=16 592CONFIG_BLK_DEV_RAM_COUNT=16
553# CONFIG_CDROM_PKTCDVD is not set 593# CONFIG_CDROM_PKTCDVD is not set
554
555#
556# IO Schedulers
557#
558CONFIG_IOSCHED_NOOP=y
559CONFIG_IOSCHED_AS=y
560CONFIG_IOSCHED_DEADLINE=y
561CONFIG_IOSCHED_CFQ=y
562# CONFIG_ATA_OVER_ETH is not set 594# CONFIG_ATA_OVER_ETH is not set
563 595
564# 596#
@@ -625,6 +657,7 @@ CONFIG_SCSI_MULTI_LUN=y
625# 657#
626# SCSI low-level drivers 658# SCSI low-level drivers
627# 659#
660# CONFIG_ISCSI_TCP is not set
628# CONFIG_SCSI_SATA is not set 661# CONFIG_SCSI_SATA is not set
629# CONFIG_SCSI_DEBUG is not set 662# CONFIG_SCSI_DEBUG is not set
630 663
@@ -748,6 +781,7 @@ CONFIG_PPP_ASYNC=m
748# CONFIG_PPP_SYNC_TTY is not set 781# CONFIG_PPP_SYNC_TTY is not set
749# CONFIG_PPP_DEFLATE is not set 782# CONFIG_PPP_DEFLATE is not set
750CONFIG_PPP_BSDCOMP=m 783CONFIG_PPP_BSDCOMP=m
784# CONFIG_PPP_MPPE is not set
751# CONFIG_PPPOE is not set 785# CONFIG_PPPOE is not set
752# CONFIG_SLIP is not set 786# CONFIG_SLIP is not set
753# CONFIG_SHAPER is not set 787# CONFIG_SHAPER is not set
@@ -850,11 +884,15 @@ CONFIG_UNIX98_PTYS=y
850# PCMCIA character devices 884# PCMCIA character devices
851# 885#
852# CONFIG_SYNCLINK_CS is not set 886# CONFIG_SYNCLINK_CS is not set
887# CONFIG_CARDMAN_4000 is not set
888# CONFIG_CARDMAN_4040 is not set
853# CONFIG_RAW_DRIVER is not set 889# CONFIG_RAW_DRIVER is not set
854 890
855# 891#
856# TPM devices 892# TPM devices
857# 893#
894# CONFIG_TCG_TPM is not set
895# CONFIG_TELCLOCK is not set
858 896
859# 897#
860# I2C support 898# I2C support
@@ -889,6 +927,7 @@ CONFIG_I2C_PXA=y
889# CONFIG_SENSORS_PCF8591 is not set 927# CONFIG_SENSORS_PCF8591 is not set
890# CONFIG_SENSORS_RTC8564 is not set 928# CONFIG_SENSORS_RTC8564 is not set
891# CONFIG_SENSORS_MAX6875 is not set 929# CONFIG_SENSORS_MAX6875 is not set
930# CONFIG_RTC_X1205_I2C is not set
892# CONFIG_I2C_DEBUG_CORE is not set 931# CONFIG_I2C_DEBUG_CORE is not set
893# CONFIG_I2C_DEBUG_ALGO is not set 932# CONFIG_I2C_DEBUG_ALGO is not set
894# CONFIG_I2C_DEBUG_BUS is not set 933# CONFIG_I2C_DEBUG_BUS is not set
@@ -957,7 +996,10 @@ CONFIG_VIDEO_DEV=m
957# CONFIG_VIDEO_SAA5246A is not set 996# CONFIG_VIDEO_SAA5246A is not set
958# CONFIG_VIDEO_SAA5249 is not set 997# CONFIG_VIDEO_SAA5249 is not set
959# CONFIG_TUNER_3036 is not set 998# CONFIG_TUNER_3036 is not set
999# CONFIG_VIDEO_EM28XX is not set
960# CONFIG_VIDEO_OVCAMCHIP is not set 1000# CONFIG_VIDEO_OVCAMCHIP is not set
1001# CONFIG_VIDEO_AUDIO_DECODER is not set
1002# CONFIG_VIDEO_DECODER is not set
961 1003
962# 1004#
963# Radio Adapters 1005# Radio Adapters
@@ -976,13 +1018,12 @@ CONFIG_FB=y
976CONFIG_FB_CFB_FILLRECT=y 1018CONFIG_FB_CFB_FILLRECT=y
977CONFIG_FB_CFB_COPYAREA=y 1019CONFIG_FB_CFB_COPYAREA=y
978CONFIG_FB_CFB_IMAGEBLIT=y 1020CONFIG_FB_CFB_IMAGEBLIT=y
979CONFIG_FB_SOFT_CURSOR=y
980# CONFIG_FB_MACMODES is not set 1021# CONFIG_FB_MACMODES is not set
981# CONFIG_FB_MODE_HELPERS is not set 1022# CONFIG_FB_MODE_HELPERS is not set
982# CONFIG_FB_TILEBLITTING is not set 1023# CONFIG_FB_TILEBLITTING is not set
1024# CONFIG_FB_S1D13XXX is not set
983# CONFIG_FB_PXA is not set 1025# CONFIG_FB_PXA is not set
984CONFIG_FB_W100=y 1026CONFIG_FB_W100=y
985# CONFIG_FB_S1D13XXX is not set
986# CONFIG_FB_VIRTUAL is not set 1027# CONFIG_FB_VIRTUAL is not set
987 1028
988# 1029#
@@ -991,6 +1032,7 @@ CONFIG_FB_W100=y
991# CONFIG_VGA_CONSOLE is not set 1032# CONFIG_VGA_CONSOLE is not set
992CONFIG_DUMMY_CONSOLE=y 1033CONFIG_DUMMY_CONSOLE=y
993CONFIG_FRAMEBUFFER_CONSOLE=y 1034CONFIG_FRAMEBUFFER_CONSOLE=y
1035# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
994CONFIG_FONTS=y 1036CONFIG_FONTS=y
995CONFIG_FONT_8x8=y 1037CONFIG_FONT_8x8=y
996CONFIG_FONT_8x16=y 1038CONFIG_FONT_8x16=y
@@ -1087,15 +1129,15 @@ CONFIG_USB_SL811_CS=m
1087# USB Device Class drivers 1129# USB Device Class drivers
1088# 1130#
1089# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set 1131# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
1132CONFIG_USB_ACM=m
1133CONFIG_USB_PRINTER=m
1090 1134
1091# 1135#
1092# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem 1136# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1093# 1137#
1094CONFIG_USB_ACM=m
1095CONFIG_USB_PRINTER=m
1096 1138
1097# 1139#
1098# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information 1140# may also be needed; see USB_STORAGE Help for more information
1099# 1141#
1100CONFIG_USB_STORAGE=m 1142CONFIG_USB_STORAGE=m
1101# CONFIG_USB_STORAGE_DEBUG is not set 1143# CONFIG_USB_STORAGE_DEBUG is not set
@@ -1107,7 +1149,6 @@ CONFIG_USB_STORAGE=m
1107# CONFIG_USB_STORAGE_SDDR09 is not set 1149# CONFIG_USB_STORAGE_SDDR09 is not set
1108# CONFIG_USB_STORAGE_SDDR55 is not set 1150# CONFIG_USB_STORAGE_SDDR55 is not set
1109# CONFIG_USB_STORAGE_JUMPSHOT is not set 1151# CONFIG_USB_STORAGE_JUMPSHOT is not set
1110# CONFIG_USB_STORAGE_ONETOUCH is not set
1111 1152
1112# 1153#
1113# USB Input Devices 1154# USB Input Devices
@@ -1185,6 +1226,7 @@ CONFIG_USB_MON=y
1185CONFIG_USB_SERIAL=m 1226CONFIG_USB_SERIAL=m
1186CONFIG_USB_SERIAL_GENERIC=y 1227CONFIG_USB_SERIAL_GENERIC=y
1187# CONFIG_USB_SERIAL_AIRPRIME is not set 1228# CONFIG_USB_SERIAL_AIRPRIME is not set
1229# CONFIG_USB_SERIAL_ANYDATA is not set
1188CONFIG_USB_SERIAL_BELKIN=m 1230CONFIG_USB_SERIAL_BELKIN=m
1189# CONFIG_USB_SERIAL_WHITEHEAT is not set 1231# CONFIG_USB_SERIAL_WHITEHEAT is not set
1190CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m 1232CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
@@ -1340,6 +1382,7 @@ CONFIG_RAMFS=y
1340CONFIG_JFFS2_FS=y 1382CONFIG_JFFS2_FS=y
1341CONFIG_JFFS2_FS_DEBUG=0 1383CONFIG_JFFS2_FS_DEBUG=0
1342CONFIG_JFFS2_FS_WRITEBUFFER=y 1384CONFIG_JFFS2_FS_WRITEBUFFER=y
1385CONFIG_JFFS2_SUMMARY=y
1343CONFIG_JFFS2_COMPRESSION_OPTIONS=y 1386CONFIG_JFFS2_COMPRESSION_OPTIONS=y
1344CONFIG_JFFS2_ZLIB=y 1387CONFIG_JFFS2_ZLIB=y
1345CONFIG_JFFS2_RTIME=y 1388CONFIG_JFFS2_RTIME=y
@@ -1466,7 +1509,9 @@ CONFIG_DETECT_SOFTLOCKUP=y
1466CONFIG_DEBUG_BUGVERBOSE=y 1509CONFIG_DEBUG_BUGVERBOSE=y
1467# CONFIG_DEBUG_INFO is not set 1510# CONFIG_DEBUG_INFO is not set
1468# CONFIG_DEBUG_FS is not set 1511# CONFIG_DEBUG_FS is not set
1512# CONFIG_DEBUG_VM is not set
1469CONFIG_FRAME_POINTER=y 1513CONFIG_FRAME_POINTER=y
1514# CONFIG_RCU_TORTURE_TEST is not set
1470# CONFIG_DEBUG_USER is not set 1515# CONFIG_DEBUG_USER is not set
1471# CONFIG_DEBUG_WAITQ is not set 1516# CONFIG_DEBUG_WAITQ is not set
1472CONFIG_DEBUG_ERRORS=y 1517CONFIG_DEBUG_ERRORS=y
diff --git a/arch/arm/configs/poodle_defconfig b/arch/arm/configs/poodle_defconfig
deleted file mode 100644
index 72822907759f..000000000000
--- a/arch/arm/configs/poodle_defconfig
+++ /dev/null
@@ -1,1015 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14-rc3
4# Sun Oct 9 17:04:29 2005
5#
6CONFIG_ARM=y
7CONFIG_MMU=y
8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y
11
12#
13# Code maturity level options
14#
15CONFIG_EXPERIMENTAL=y
16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN_ON_SMP=y
18CONFIG_LOCK_KERNEL=y
19CONFIG_INIT_ENV_ARG_LIMIT=32
20
21#
22# General setup
23#
24CONFIG_LOCALVERSION=""
25CONFIG_LOCALVERSION_AUTO=y
26CONFIG_SWAP=y
27CONFIG_SYSVIPC=y
28# CONFIG_POSIX_MQUEUE is not set
29CONFIG_BSD_PROCESS_ACCT=y
30# CONFIG_BSD_PROCESS_ACCT_V3 is not set
31CONFIG_SYSCTL=y
32# CONFIG_AUDIT is not set
33CONFIG_HOTPLUG=y
34CONFIG_KOBJECT_UEVENT=y
35# CONFIG_IKCONFIG is not set
36CONFIG_INITRAMFS_SOURCE=""
37CONFIG_EMBEDDED=y
38CONFIG_KALLSYMS=y
39# CONFIG_KALLSYMS_ALL is not set
40# CONFIG_KALLSYMS_EXTRA_PASS is not set
41CONFIG_PRINTK=y
42CONFIG_BUG=y
43CONFIG_BASE_FULL=y
44CONFIG_FUTEX=y
45CONFIG_EPOLL=y
46# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
47CONFIG_SHMEM=y
48CONFIG_CC_ALIGN_FUNCTIONS=0
49CONFIG_CC_ALIGN_LABELS=0
50CONFIG_CC_ALIGN_LOOPS=0
51CONFIG_CC_ALIGN_JUMPS=0
52# CONFIG_TINY_SHMEM is not set
53CONFIG_BASE_SMALL=0
54
55#
56# Loadable module support
57#
58CONFIG_MODULES=y
59CONFIG_MODULE_UNLOAD=y
60CONFIG_MODULE_FORCE_UNLOAD=y
61CONFIG_OBSOLETE_MODPARM=y
62CONFIG_MODVERSIONS=y
63# CONFIG_MODULE_SRCVERSION_ALL is not set
64CONFIG_KMOD=y
65
66#
67# System Type
68#
69# CONFIG_ARCH_CLPS7500 is not set
70# CONFIG_ARCH_CLPS711X is not set
71# CONFIG_ARCH_CO285 is not set
72# CONFIG_ARCH_EBSA110 is not set
73# CONFIG_ARCH_CAMELOT is not set
74# CONFIG_ARCH_FOOTBRIDGE is not set
75# CONFIG_ARCH_INTEGRATOR is not set
76# CONFIG_ARCH_IOP3XX is not set
77# CONFIG_ARCH_IXP4XX is not set
78# CONFIG_ARCH_IXP2000 is not set
79# CONFIG_ARCH_L7200 is not set
80CONFIG_ARCH_PXA=y
81# CONFIG_ARCH_RPC is not set
82# CONFIG_ARCH_SA1100 is not set
83# CONFIG_ARCH_S3C2410 is not set
84# CONFIG_ARCH_SHARK is not set
85# CONFIG_ARCH_LH7A40X is not set
86# CONFIG_ARCH_OMAP is not set
87# CONFIG_ARCH_VERSATILE is not set
88# CONFIG_ARCH_IMX is not set
89# CONFIG_ARCH_H720X is not set
90# CONFIG_ARCH_AAEC2000 is not set
91
92#
93# Intel PXA2xx Implementations
94#
95# CONFIG_ARCH_LUBBOCK is not set
96# CONFIG_MACH_MAINSTONE is not set
97# CONFIG_ARCH_PXA_IDP is not set
98CONFIG_PXA_SHARPSL=y
99CONFIG_PXA_SHARPSL_25x=y
100# CONFIG_PXA_SHARPSL_27x is not set
101CONFIG_MACH_POODLE=y
102# CONFIG_MACH_CORGI is not set
103# CONFIG_MACH_SHEPHERD is not set
104# CONFIG_MACH_HUSKY is not set
105CONFIG_PXA25x=y
106
107#
108# Processor Type
109#
110CONFIG_CPU_32=y
111CONFIG_CPU_XSCALE=y
112CONFIG_CPU_32v5=y
113CONFIG_CPU_ABRT_EV5T=y
114CONFIG_CPU_CACHE_VIVT=y
115CONFIG_CPU_TLB_V4WBI=y
116
117#
118# Processor Features
119#
120CONFIG_ARM_THUMB=y
121CONFIG_XSCALE_PMU=y
122CONFIG_SHARP_LOCOMO=y
123CONFIG_SHARP_PARAM=y
124CONFIG_SHARP_SCOOP=y
125
126#
127# Bus support
128#
129CONFIG_ISA_DMA_API=y
130
131#
132# PCCARD (PCMCIA/CardBus) support
133#
134CONFIG_PCCARD=y
135# CONFIG_PCMCIA_DEBUG is not set
136CONFIG_PCMCIA=y
137CONFIG_PCMCIA_LOAD_CIS=y
138CONFIG_PCMCIA_IOCTL=y
139
140#
141# PC-card bridges
142#
143CONFIG_PCMCIA_PXA2XX=y
144
145#
146# Kernel Features
147#
148CONFIG_PREEMPT=y
149# CONFIG_NO_IDLE_HZ is not set
150# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
151CONFIG_SELECT_MEMORY_MODEL=y
152CONFIG_FLATMEM_MANUAL=y
153# CONFIG_DISCONTIGMEM_MANUAL is not set
154# CONFIG_SPARSEMEM_MANUAL is not set
155CONFIG_FLATMEM=y
156CONFIG_FLAT_NODE_MEM_MAP=y
157# CONFIG_SPARSEMEM_STATIC is not set
158CONFIG_ALIGNMENT_TRAP=y
159
160#
161# Boot options
162#
163CONFIG_ZBOOT_ROM_TEXT=0x0
164CONFIG_ZBOOT_ROM_BSS=0x0
165CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 debug"
166# CONFIG_XIP_KERNEL is not set
167
168#
169# Floating point emulation
170#
171
172#
173# At least one emulation must be selected
174#
175CONFIG_FPE_NWFPE=y
176# CONFIG_FPE_NWFPE_XP is not set
177# CONFIG_FPE_FASTFPE is not set
178
179#
180# Userspace binary formats
181#
182CONFIG_BINFMT_ELF=y
183CONFIG_BINFMT_AOUT=m
184CONFIG_BINFMT_MISC=m
185# CONFIG_ARTHUR is not set
186
187#
188# Power management options
189#
190CONFIG_PM=y
191CONFIG_APM=y
192
193#
194# Networking
195#
196CONFIG_NET=y
197
198#
199# Networking options
200#
201CONFIG_PACKET=y
202CONFIG_PACKET_MMAP=y
203CONFIG_UNIX=y
204# CONFIG_NET_KEY is not set
205CONFIG_INET=y
206# CONFIG_IP_MULTICAST is not set
207# CONFIG_IP_ADVANCED_ROUTER is not set
208CONFIG_IP_FIB_HASH=y
209# CONFIG_IP_PNP is not set
210# CONFIG_NET_IPIP is not set
211# CONFIG_NET_IPGRE is not set
212# CONFIG_ARPD is not set
213CONFIG_SYN_COOKIES=y
214# CONFIG_INET_AH is not set
215# CONFIG_INET_ESP is not set
216# CONFIG_INET_IPCOMP is not set
217# CONFIG_INET_TUNNEL is not set
218CONFIG_INET_DIAG=y
219CONFIG_INET_TCP_DIAG=y
220# CONFIG_TCP_CONG_ADVANCED is not set
221CONFIG_TCP_CONG_BIC=y
222# CONFIG_IPV6 is not set
223# CONFIG_NETFILTER is not set
224
225#
226# DCCP Configuration (EXPERIMENTAL)
227#
228# CONFIG_IP_DCCP is not set
229
230#
231# SCTP Configuration (EXPERIMENTAL)
232#
233# CONFIG_IP_SCTP is not set
234# CONFIG_ATM is not set
235# CONFIG_BRIDGE is not set
236# CONFIG_VLAN_8021Q is not set
237# CONFIG_DECNET is not set
238# CONFIG_LLC2 is not set
239# CONFIG_IPX is not set
240# CONFIG_ATALK is not set
241# CONFIG_X25 is not set
242# CONFIG_LAPB is not set
243# CONFIG_NET_DIVERT is not set
244# CONFIG_ECONET is not set
245# CONFIG_WAN_ROUTER is not set
246# CONFIG_NET_SCHED is not set
247# CONFIG_NET_CLS_ROUTE is not set
248
249#
250# Network testing
251#
252# CONFIG_NET_PKTGEN is not set
253# CONFIG_HAMRADIO is not set
254# CONFIG_IRDA is not set
255# CONFIG_BT is not set
256# CONFIG_IEEE80211 is not set
257
258#
259# Device Drivers
260#
261
262#
263# Generic Driver Options
264#
265CONFIG_STANDALONE=y
266CONFIG_PREVENT_FIRMWARE_BUILD=y
267CONFIG_FW_LOADER=y
268# CONFIG_DEBUG_DRIVER is not set
269
270#
271# Memory Technology Devices (MTD)
272#
273CONFIG_MTD=y
274# CONFIG_MTD_DEBUG is not set
275# CONFIG_MTD_CONCAT is not set
276CONFIG_MTD_PARTITIONS=y
277# CONFIG_MTD_REDBOOT_PARTS is not set
278# CONFIG_MTD_CMDLINE_PARTS is not set
279# CONFIG_MTD_AFS_PARTS is not set
280
281#
282# User Modules And Translation Layers
283#
284CONFIG_MTD_CHAR=y
285CONFIG_MTD_BLOCK=y
286# CONFIG_FTL is not set
287# CONFIG_NFTL is not set
288# CONFIG_INFTL is not set
289
290#
291# RAM/ROM/Flash chip drivers
292#
293# CONFIG_MTD_CFI is not set
294# CONFIG_MTD_JEDECPROBE is not set
295CONFIG_MTD_MAP_BANK_WIDTH_1=y
296CONFIG_MTD_MAP_BANK_WIDTH_2=y
297CONFIG_MTD_MAP_BANK_WIDTH_4=y
298# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
299# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
300# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
301CONFIG_MTD_CFI_I1=y
302CONFIG_MTD_CFI_I2=y
303# CONFIG_MTD_CFI_I4 is not set
304# CONFIG_MTD_CFI_I8 is not set
305# CONFIG_MTD_RAM is not set
306# CONFIG_MTD_ROM is not set
307# CONFIG_MTD_ABSENT is not set
308
309#
310# Mapping drivers for chip access
311#
312CONFIG_MTD_COMPLEX_MAPPINGS=y
313CONFIG_MTD_SHARP_SL=y
314# CONFIG_MTD_PLATRAM is not set
315
316#
317# Self-contained MTD device drivers
318#
319# CONFIG_MTD_SLRAM is not set
320# CONFIG_MTD_PHRAM is not set
321# CONFIG_MTD_MTDRAM is not set
322# CONFIG_MTD_BLKMTD is not set
323# CONFIG_MTD_BLOCK2MTD is not set
324
325#
326# Disk-On-Chip Device Drivers
327#
328# CONFIG_MTD_DOC2000 is not set
329# CONFIG_MTD_DOC2001 is not set
330# CONFIG_MTD_DOC2001PLUS is not set
331
332#
333# NAND Flash Device Drivers
334#
335CONFIG_MTD_NAND=y
336CONFIG_MTD_NAND_VERIFY_WRITE=y
337# CONFIG_MTD_NAND_H1900 is not set
338CONFIG_MTD_NAND_IDS=y
339# CONFIG_MTD_NAND_DISKONCHIP is not set
340CONFIG_MTD_NAND_SHARPSL=y
341# CONFIG_MTD_NAND_NANDSIM is not set
342
343#
344# Parallel port support
345#
346# CONFIG_PARPORT is not set
347
348#
349# Plug and Play support
350#
351
352#
353# Block devices
354#
355# CONFIG_BLK_DEV_COW_COMMON is not set
356CONFIG_BLK_DEV_LOOP=y
357# CONFIG_BLK_DEV_CRYPTOLOOP is not set
358# CONFIG_BLK_DEV_NBD is not set
359# CONFIG_BLK_DEV_RAM is not set
360CONFIG_BLK_DEV_RAM_COUNT=16
361# CONFIG_CDROM_PKTCDVD is not set
362
363#
364# IO Schedulers
365#
366CONFIG_IOSCHED_NOOP=y
367CONFIG_IOSCHED_AS=y
368CONFIG_IOSCHED_DEADLINE=y
369CONFIG_IOSCHED_CFQ=y
370# CONFIG_ATA_OVER_ETH is not set
371
372#
373# ATA/ATAPI/MFM/RLL support
374#
375CONFIG_IDE=y
376CONFIG_BLK_DEV_IDE=y
377
378#
379# Please see Documentation/ide.txt for help/info on IDE drives
380#
381# CONFIG_BLK_DEV_IDE_SATA is not set
382CONFIG_BLK_DEV_IDEDISK=y
383# CONFIG_IDEDISK_MULTI_MODE is not set
384CONFIG_BLK_DEV_IDECS=y
385# CONFIG_BLK_DEV_IDECD is not set
386# CONFIG_BLK_DEV_IDETAPE is not set
387# CONFIG_BLK_DEV_IDEFLOPPY is not set
388# CONFIG_IDE_TASK_IOCTL is not set
389
390#
391# IDE chipset support/bugfixes
392#
393CONFIG_IDE_GENERIC=y
394# CONFIG_IDE_ARM is not set
395# CONFIG_BLK_DEV_IDEDMA is not set
396# CONFIG_IDEDMA_AUTO is not set
397# CONFIG_BLK_DEV_HD is not set
398
399#
400# SCSI device support
401#
402# CONFIG_RAID_ATTRS is not set
403# CONFIG_SCSI is not set
404
405#
406# Multi-device support (RAID and LVM)
407#
408# CONFIG_MD is not set
409
410#
411# Fusion MPT device support
412#
413# CONFIG_FUSION is not set
414
415#
416# IEEE 1394 (FireWire) support
417#
418
419#
420# I2O device support
421#
422
423#
424# Network device support
425#
426CONFIG_NETDEVICES=y
427# CONFIG_DUMMY is not set
428# CONFIG_BONDING is not set
429# CONFIG_EQUALIZER is not set
430# CONFIG_TUN is not set
431
432#
433# PHY device support
434#
435# CONFIG_PHYLIB is not set
436
437#
438# Ethernet (10 or 100Mbit)
439#
440CONFIG_NET_ETHERNET=y
441# CONFIG_MII is not set
442# CONFIG_SMC91X is not set
443# CONFIG_DM9000 is not set
444
445#
446# Ethernet (1000 Mbit)
447#
448
449#
450# Ethernet (10000 Mbit)
451#
452
453#
454# Token Ring devices
455#
456
457#
458# Wireless LAN (non-hamradio)
459#
460CONFIG_NET_RADIO=y
461
462#
463# Obsolete Wireless cards support (pre-802.11)
464#
465# CONFIG_STRIP is not set
466# CONFIG_PCMCIA_WAVELAN is not set
467# CONFIG_PCMCIA_NETWAVE is not set
468
469#
470# Wireless 802.11 Frequency Hopping cards support
471#
472# CONFIG_PCMCIA_RAYCS is not set
473
474#
475# Wireless 802.11b ISA/PCI cards support
476#
477# CONFIG_HERMES is not set
478# CONFIG_ATMEL is not set
479
480#
481# Wireless 802.11b Pcmcia/Cardbus cards support
482#
483# CONFIG_AIRO_CS is not set
484# CONFIG_PCMCIA_WL3501 is not set
485# CONFIG_HOSTAP is not set
486CONFIG_NET_WIRELESS=y
487
488#
489# PCMCIA network device support
490#
491CONFIG_NET_PCMCIA=y
492# CONFIG_PCMCIA_3C589 is not set
493# CONFIG_PCMCIA_3C574 is not set
494# CONFIG_PCMCIA_FMVJ18X is not set
495CONFIG_PCMCIA_PCNET=y
496# CONFIG_PCMCIA_NMCLAN is not set
497# CONFIG_PCMCIA_SMC91C92 is not set
498# CONFIG_PCMCIA_XIRC2PS is not set
499# CONFIG_PCMCIA_AXNET is not set
500
501#
502# Wan interfaces
503#
504# CONFIG_WAN is not set
505CONFIG_PPP=m
506# CONFIG_PPP_MULTILINK is not set
507# CONFIG_PPP_FILTER is not set
508CONFIG_PPP_ASYNC=m
509# CONFIG_PPP_SYNC_TTY is not set
510# CONFIG_PPP_DEFLATE is not set
511CONFIG_PPP_BSDCOMP=m
512# CONFIG_PPPOE is not set
513# CONFIG_SLIP is not set
514# CONFIG_SHAPER is not set
515# CONFIG_NETCONSOLE is not set
516# CONFIG_NETPOLL is not set
517# CONFIG_NET_POLL_CONTROLLER is not set
518
519#
520# ISDN subsystem
521#
522# CONFIG_ISDN is not set
523
524#
525# Input device support
526#
527CONFIG_INPUT=y
528
529#
530# Userland interfaces
531#
532# CONFIG_INPUT_MOUSEDEV is not set
533# CONFIG_INPUT_JOYDEV is not set
534CONFIG_INPUT_TSDEV=y
535CONFIG_INPUT_TSDEV_SCREEN_X=240
536CONFIG_INPUT_TSDEV_SCREEN_Y=320
537CONFIG_INPUT_EVDEV=y
538CONFIG_INPUT_EVBUG=y
539
540#
541# Input Device Drivers
542#
543CONFIG_INPUT_KEYBOARD=y
544# CONFIG_KEYBOARD_ATKBD is not set
545# CONFIG_KEYBOARD_SUNKBD is not set
546# CONFIG_KEYBOARD_LKKBD is not set
547CONFIG_KEYBOARD_LOCOMO=y
548# CONFIG_KEYBOARD_XTKBD is not set
549# CONFIG_KEYBOARD_NEWTON is not set
550# CONFIG_KEYBOARD_CORGI is not set
551CONFIG_KEYBOARD_SPITZ=y
552# CONFIG_INPUT_MOUSE is not set
553# CONFIG_INPUT_JOYSTICK is not set
554# CONFIG_INPUT_TOUCHSCREEN is not set
555# CONFIG_INPUT_MISC is not set
556
557#
558# Hardware I/O ports
559#
560# CONFIG_SERIO is not set
561# CONFIG_GAMEPORT is not set
562
563#
564# Character devices
565#
566CONFIG_VT=y
567CONFIG_VT_CONSOLE=y
568CONFIG_HW_CONSOLE=y
569# CONFIG_SERIAL_NONSTANDARD is not set
570
571#
572# Serial drivers
573#
574# CONFIG_SERIAL_8250 is not set
575
576#
577# Non-8250 serial port support
578#
579CONFIG_SERIAL_PXA=y
580CONFIG_SERIAL_PXA_CONSOLE=y
581CONFIG_SERIAL_CORE=y
582CONFIG_SERIAL_CORE_CONSOLE=y
583CONFIG_UNIX98_PTYS=y
584# CONFIG_LEGACY_PTYS is not set
585
586#
587# IPMI
588#
589# CONFIG_IPMI_HANDLER is not set
590
591#
592# Watchdog Cards
593#
594# CONFIG_WATCHDOG is not set
595# CONFIG_NVRAM is not set
596# CONFIG_RTC is not set
597# CONFIG_DTLK is not set
598# CONFIG_R3964 is not set
599
600#
601# Ftape, the floppy tape device driver
602#
603
604#
605# PCMCIA character devices
606#
607# CONFIG_SYNCLINK_CS is not set
608# CONFIG_RAW_DRIVER is not set
609
610#
611# TPM devices
612#
613
614#
615# I2C support
616#
617CONFIG_I2C=y
618# CONFIG_I2C_CHARDEV is not set
619
620#
621# I2C Algorithms
622#
623CONFIG_I2C_ALGOBIT=y
624# CONFIG_I2C_ALGOPCF is not set
625# CONFIG_I2C_ALGOPCA is not set
626
627#
628# I2C Hardware Bus support
629#
630# CONFIG_I2C_PXA is not set
631# CONFIG_I2C_PARPORT_LIGHT is not set
632# CONFIG_I2C_STUB is not set
633# CONFIG_I2C_PCA_ISA is not set
634
635#
636# Miscellaneous I2C Chip support
637#
638# CONFIG_SENSORS_DS1337 is not set
639# CONFIG_SENSORS_DS1374 is not set
640# CONFIG_SENSORS_EEPROM is not set
641# CONFIG_SENSORS_PCF8574 is not set
642# CONFIG_SENSORS_PCA9539 is not set
643# CONFIG_SENSORS_PCF8591 is not set
644# CONFIG_SENSORS_RTC8564 is not set
645# CONFIG_SENSORS_MAX6875 is not set
646CONFIG_I2C_DEBUG_CORE=y
647CONFIG_I2C_DEBUG_ALGO=y
648CONFIG_I2C_DEBUG_BUS=y
649# CONFIG_I2C_DEBUG_CHIP is not set
650
651#
652# Hardware Monitoring support
653#
654CONFIG_HWMON=y
655# CONFIG_HWMON_VID is not set
656# CONFIG_SENSORS_ADM1021 is not set
657# CONFIG_SENSORS_ADM1025 is not set
658# CONFIG_SENSORS_ADM1026 is not set
659# CONFIG_SENSORS_ADM1031 is not set
660# CONFIG_SENSORS_ADM9240 is not set
661# CONFIG_SENSORS_ASB100 is not set
662# CONFIG_SENSORS_ATXP1 is not set
663# CONFIG_SENSORS_DS1621 is not set
664# CONFIG_SENSORS_FSCHER is not set
665# CONFIG_SENSORS_FSCPOS is not set
666# CONFIG_SENSORS_GL518SM is not set
667# CONFIG_SENSORS_GL520SM is not set
668# CONFIG_SENSORS_IT87 is not set
669# CONFIG_SENSORS_LM63 is not set
670# CONFIG_SENSORS_LM75 is not set
671# CONFIG_SENSORS_LM77 is not set
672# CONFIG_SENSORS_LM78 is not set
673# CONFIG_SENSORS_LM80 is not set
674# CONFIG_SENSORS_LM83 is not set
675# CONFIG_SENSORS_LM85 is not set
676# CONFIG_SENSORS_LM87 is not set
677# CONFIG_SENSORS_LM90 is not set
678# CONFIG_SENSORS_LM92 is not set
679# CONFIG_SENSORS_MAX1619 is not set
680# CONFIG_SENSORS_PC87360 is not set
681# CONFIG_SENSORS_SMSC47M1 is not set
682# CONFIG_SENSORS_SMSC47B397 is not set
683# CONFIG_SENSORS_W83781D is not set
684# CONFIG_SENSORS_W83792D is not set
685# CONFIG_SENSORS_W83L785TS is not set
686# CONFIG_SENSORS_W83627HF is not set
687# CONFIG_SENSORS_W83627EHF is not set
688# CONFIG_HWMON_DEBUG_CHIP is not set
689
690#
691# Misc devices
692#
693
694#
695# Multimedia Capabilities Port drivers
696#
697
698#
699# Multimedia devices
700#
701CONFIG_VIDEO_DEV=m
702
703#
704# Video For Linux
705#
706
707#
708# Video Adapters
709#
710# CONFIG_VIDEO_CPIA is not set
711# CONFIG_VIDEO_SAA5246A is not set
712# CONFIG_VIDEO_SAA5249 is not set
713# CONFIG_TUNER_3036 is not set
714# CONFIG_VIDEO_OVCAMCHIP is not set
715
716#
717# Radio Adapters
718#
719# CONFIG_RADIO_MAESTRO is not set
720
721#
722# Digital Video Broadcasting Devices
723#
724# CONFIG_DVB is not set
725
726#
727# Graphics support
728#
729CONFIG_FB=y
730CONFIG_FB_CFB_FILLRECT=y
731CONFIG_FB_CFB_COPYAREA=y
732CONFIG_FB_CFB_IMAGEBLIT=y
733CONFIG_FB_SOFT_CURSOR=y
734# CONFIG_FB_MACMODES is not set
735CONFIG_FB_MODE_HELPERS=y
736# CONFIG_FB_TILEBLITTING is not set
737CONFIG_FB_PXA=y
738# CONFIG_FB_W100 is not set
739# CONFIG_FB_PXA_PARAMETERS is not set
740# CONFIG_FB_S1D13XXX is not set
741# CONFIG_FB_VIRTUAL is not set
742
743#
744# Console display driver support
745#
746# CONFIG_VGA_CONSOLE is not set
747CONFIG_DUMMY_CONSOLE=y
748CONFIG_FRAMEBUFFER_CONSOLE=y
749CONFIG_FONTS=y
750CONFIG_FONT_8x8=y
751# CONFIG_FONT_8x16 is not set
752# CONFIG_FONT_6x11 is not set
753# CONFIG_FONT_7x14 is not set
754# CONFIG_FONT_PEARL_8x8 is not set
755# CONFIG_FONT_ACORN_8x8 is not set
756# CONFIG_FONT_MINI_4x6 is not set
757# CONFIG_FONT_SUN8x16 is not set
758# CONFIG_FONT_SUN12x22 is not set
759# CONFIG_FONT_10x18 is not set
760
761#
762# Logo configuration
763#
764# CONFIG_LOGO is not set
765# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
766
767#
768# Sound
769#
770# CONFIG_SOUND is not set
771
772#
773# USB support
774#
775CONFIG_USB_ARCH_HAS_HCD=y
776# CONFIG_USB_ARCH_HAS_OHCI is not set
777# CONFIG_USB is not set
778
779#
780# USB Gadget Support
781#
782CONFIG_USB_GADGET=y
783# CONFIG_USB_GADGET_DEBUG_FILES is not set
784CONFIG_USB_GADGET_SELECTED=y
785# CONFIG_USB_GADGET_NET2280 is not set
786CONFIG_USB_GADGET_PXA2XX=y
787CONFIG_USB_PXA2XX=y
788# CONFIG_USB_PXA2XX_SMALL is not set
789# CONFIG_USB_GADGET_GOKU is not set
790# CONFIG_USB_GADGET_LH7A40X is not set
791# CONFIG_USB_GADGET_OMAP is not set
792# CONFIG_USB_GADGET_DUMMY_HCD is not set
793# CONFIG_USB_GADGET_DUALSPEED is not set
794# CONFIG_USB_ZERO is not set
795CONFIG_USB_ETH=y
796CONFIG_USB_ETH_RNDIS=y
797# CONFIG_USB_GADGETFS is not set
798# CONFIG_USB_FILE_STORAGE is not set
799# CONFIG_USB_G_SERIAL is not set
800
801#
802# MMC/SD Card support
803#
804CONFIG_MMC=y
805CONFIG_MMC_DEBUG=y
806CONFIG_MMC_BLOCK=y
807CONFIG_MMC_PXA=y
808# CONFIG_MMC_WBSD is not set
809
810#
811# File systems
812#
813CONFIG_EXT2_FS=y
814CONFIG_EXT2_FS_XATTR=y
815CONFIG_EXT2_FS_POSIX_ACL=y
816CONFIG_EXT2_FS_SECURITY=y
817# CONFIG_EXT2_FS_XIP is not set
818# CONFIG_EXT3_FS is not set
819# CONFIG_JBD is not set
820CONFIG_FS_MBCACHE=y
821# CONFIG_REISERFS_FS is not set
822# CONFIG_JFS_FS is not set
823CONFIG_FS_POSIX_ACL=y
824# CONFIG_XFS_FS is not set
825# CONFIG_MINIX_FS is not set
826# CONFIG_ROMFS_FS is not set
827CONFIG_INOTIFY=y
828# CONFIG_QUOTA is not set
829CONFIG_DNOTIFY=y
830# CONFIG_AUTOFS_FS is not set
831# CONFIG_AUTOFS4_FS is not set
832# CONFIG_FUSE_FS is not set
833
834#
835# CD-ROM/DVD Filesystems
836#
837# CONFIG_ISO9660_FS is not set
838# CONFIG_UDF_FS is not set
839
840#
841# DOS/FAT/NT Filesystems
842#
843CONFIG_FAT_FS=y
844CONFIG_MSDOS_FS=y
845CONFIG_VFAT_FS=y
846CONFIG_FAT_DEFAULT_CODEPAGE=437
847CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
848# CONFIG_NTFS_FS is not set
849
850#
851# Pseudo filesystems
852#
853CONFIG_PROC_FS=y
854CONFIG_SYSFS=y
855CONFIG_TMPFS=y
856# CONFIG_HUGETLB_PAGE is not set
857CONFIG_RAMFS=y
858# CONFIG_RELAYFS_FS is not set
859
860#
861# Miscellaneous filesystems
862#
863# CONFIG_ADFS_FS is not set
864# CONFIG_AFFS_FS is not set
865# CONFIG_HFS_FS is not set
866# CONFIG_HFSPLUS_FS is not set
867# CONFIG_BEFS_FS is not set
868# CONFIG_BFS_FS is not set
869# CONFIG_EFS_FS is not set
870# CONFIG_JFFS_FS is not set
871CONFIG_JFFS2_FS=y
872CONFIG_JFFS2_FS_DEBUG=0
873CONFIG_JFFS2_FS_WRITEBUFFER=y
874CONFIG_JFFS2_COMPRESSION_OPTIONS=y
875CONFIG_JFFS2_ZLIB=y
876CONFIG_JFFS2_RTIME=y
877CONFIG_JFFS2_RUBIN=y
878# CONFIG_JFFS2_CMODE_NONE is not set
879CONFIG_JFFS2_CMODE_PRIORITY=y
880# CONFIG_JFFS2_CMODE_SIZE is not set
881CONFIG_CRAMFS=m
882# CONFIG_VXFS_FS is not set
883# CONFIG_HPFS_FS is not set
884# CONFIG_QNX4FS_FS is not set
885# CONFIG_SYSV_FS is not set
886# CONFIG_UFS_FS is not set
887
888#
889# Network File Systems
890#
891# CONFIG_NFS_FS is not set
892# CONFIG_NFSD is not set
893# CONFIG_SMB_FS is not set
894# CONFIG_CIFS is not set
895# CONFIG_NCP_FS is not set
896# CONFIG_CODA_FS is not set
897# CONFIG_AFS_FS is not set
898# CONFIG_9P_FS is not set
899
900#
901# Partition Types
902#
903CONFIG_PARTITION_ADVANCED=y
904# CONFIG_ACORN_PARTITION is not set
905# CONFIG_OSF_PARTITION is not set
906# CONFIG_AMIGA_PARTITION is not set
907# CONFIG_ATARI_PARTITION is not set
908# CONFIG_MAC_PARTITION is not set
909CONFIG_MSDOS_PARTITION=y
910# CONFIG_BSD_DISKLABEL is not set
911# CONFIG_MINIX_SUBPARTITION is not set
912# CONFIG_SOLARIS_X86_PARTITION is not set
913# CONFIG_UNIXWARE_DISKLABEL is not set
914# CONFIG_LDM_PARTITION is not set
915# CONFIG_SGI_PARTITION is not set
916# CONFIG_ULTRIX_PARTITION is not set
917# CONFIG_SUN_PARTITION is not set
918# CONFIG_EFI_PARTITION is not set
919
920#
921# Native Language Support
922#
923CONFIG_NLS=y
924CONFIG_NLS_DEFAULT="cp437"
925CONFIG_NLS_CODEPAGE_437=y
926# CONFIG_NLS_CODEPAGE_737 is not set
927# CONFIG_NLS_CODEPAGE_775 is not set
928# CONFIG_NLS_CODEPAGE_850 is not set
929# CONFIG_NLS_CODEPAGE_852 is not set
930# CONFIG_NLS_CODEPAGE_855 is not set
931# CONFIG_NLS_CODEPAGE_857 is not set
932# CONFIG_NLS_CODEPAGE_860 is not set
933# CONFIG_NLS_CODEPAGE_861 is not set
934# CONFIG_NLS_CODEPAGE_862 is not set
935# CONFIG_NLS_CODEPAGE_863 is not set
936# CONFIG_NLS_CODEPAGE_864 is not set
937# CONFIG_NLS_CODEPAGE_865 is not set
938# CONFIG_NLS_CODEPAGE_866 is not set
939# CONFIG_NLS_CODEPAGE_869 is not set
940# CONFIG_NLS_CODEPAGE_936 is not set
941# CONFIG_NLS_CODEPAGE_950 is not set
942# CONFIG_NLS_CODEPAGE_932 is not set
943# CONFIG_NLS_CODEPAGE_949 is not set
944# CONFIG_NLS_CODEPAGE_874 is not set
945# CONFIG_NLS_ISO8859_8 is not set
946# CONFIG_NLS_CODEPAGE_1250 is not set
947# CONFIG_NLS_CODEPAGE_1251 is not set
948CONFIG_NLS_ASCII=y
949CONFIG_NLS_ISO8859_1=y
950# CONFIG_NLS_ISO8859_2 is not set
951# CONFIG_NLS_ISO8859_3 is not set
952# CONFIG_NLS_ISO8859_4 is not set
953# CONFIG_NLS_ISO8859_5 is not set
954# CONFIG_NLS_ISO8859_6 is not set
955# CONFIG_NLS_ISO8859_7 is not set
956# CONFIG_NLS_ISO8859_9 is not set
957# CONFIG_NLS_ISO8859_13 is not set
958# CONFIG_NLS_ISO8859_14 is not set
959# CONFIG_NLS_ISO8859_15 is not set
960# CONFIG_NLS_KOI8_R is not set
961# CONFIG_NLS_KOI8_U is not set
962CONFIG_NLS_UTF8=y
963
964#
965# Profiling support
966#
967# CONFIG_PROFILING is not set
968
969#
970# Kernel hacking
971#
972# CONFIG_PRINTK_TIME is not set
973CONFIG_DEBUG_KERNEL=y
974CONFIG_MAGIC_SYSRQ=y
975CONFIG_LOG_BUF_SHIFT=14
976CONFIG_DETECT_SOFTLOCKUP=y
977# CONFIG_SCHEDSTATS is not set
978# CONFIG_DEBUG_SLAB is not set
979CONFIG_DEBUG_PREEMPT=y
980# CONFIG_DEBUG_SPINLOCK is not set
981# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
982# CONFIG_DEBUG_KOBJECT is not set
983# CONFIG_DEBUG_BUGVERBOSE is not set
984# CONFIG_DEBUG_INFO is not set
985# CONFIG_DEBUG_FS is not set
986CONFIG_FRAME_POINTER=y
987# CONFIG_DEBUG_USER is not set
988# CONFIG_DEBUG_WAITQ is not set
989CONFIG_DEBUG_ERRORS=y
990# CONFIG_DEBUG_LL is not set
991
992#
993# Security options
994#
995# CONFIG_KEYS is not set
996# CONFIG_SECURITY is not set
997
998#
999# Cryptographic options
1000#
1001# CONFIG_CRYPTO is not set
1002
1003#
1004# Hardware crypto devices
1005#
1006
1007#
1008# Library routines
1009#
1010CONFIG_CRC_CCITT=y
1011# CONFIG_CRC16 is not set
1012CONFIG_CRC32=y
1013# CONFIG_LIBCRC32C is not set
1014CONFIG_ZLIB_INFLATE=y
1015CONFIG_ZLIB_DEFLATE=y
diff --git a/arch/arm/configs/spitz_defconfig b/arch/arm/configs/spitz_defconfig
index 900e04f8e38c..9895539533d6 100644
--- a/arch/arm/configs/spitz_defconfig
+++ b/arch/arm/configs/spitz_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.14-rc3 3# Linux kernel version: 2.6.15-rc2
4# Sun Oct 9 17:11:19 2005 4# Mon Nov 28 10:26:52 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -64,6 +64,23 @@ CONFIG_OBSOLETE_MODPARM=y
64CONFIG_KMOD=y 64CONFIG_KMOD=y
65 65
66# 66#
67# Block layer
68#
69
70#
71# IO Schedulers
72#
73CONFIG_IOSCHED_NOOP=y
74CONFIG_IOSCHED_AS=y
75CONFIG_IOSCHED_DEADLINE=y
76CONFIG_IOSCHED_CFQ=y
77CONFIG_DEFAULT_AS=y
78# CONFIG_DEFAULT_DEADLINE is not set
79# CONFIG_DEFAULT_CFQ is not set
80# CONFIG_DEFAULT_NOOP is not set
81CONFIG_DEFAULT_IOSCHED="anticipatory"
82
83#
67# System Type 84# System Type
68# 85#
69# CONFIG_ARCH_CLPS7500 is not set 86# CONFIG_ARCH_CLPS7500 is not set
@@ -85,6 +102,7 @@ CONFIG_ARCH_PXA=y
85# CONFIG_ARCH_LH7A40X is not set 102# CONFIG_ARCH_LH7A40X is not set
86# CONFIG_ARCH_OMAP is not set 103# CONFIG_ARCH_OMAP is not set
87# CONFIG_ARCH_VERSATILE is not set 104# CONFIG_ARCH_VERSATILE is not set
105# CONFIG_ARCH_REALVIEW is not set
88# CONFIG_ARCH_IMX is not set 106# CONFIG_ARCH_IMX is not set
89# CONFIG_ARCH_H720X is not set 107# CONFIG_ARCH_H720X is not set
90# CONFIG_ARCH_AAEC2000 is not set 108# CONFIG_ARCH_AAEC2000 is not set
@@ -98,10 +116,13 @@ CONFIG_ARCH_PXA=y
98CONFIG_PXA_SHARPSL=y 116CONFIG_PXA_SHARPSL=y
99# CONFIG_PXA_SHARPSL_25x is not set 117# CONFIG_PXA_SHARPSL_25x is not set
100CONFIG_PXA_SHARPSL_27x=y 118CONFIG_PXA_SHARPSL_27x=y
119CONFIG_MACH_AKITA=y
101CONFIG_MACH_SPITZ=y 120CONFIG_MACH_SPITZ=y
102CONFIG_MACH_BORZOI=y 121CONFIG_MACH_BORZOI=y
103CONFIG_PXA27x=y 122CONFIG_PXA27x=y
123CONFIG_IWMMXT=y
104CONFIG_PXA_SHARP_Cxx00=y 124CONFIG_PXA_SHARP_Cxx00=y
125CONFIG_PXA_SSP=y
105 126
106# 127#
107# Processor Type 128# Processor Type
@@ -153,6 +174,7 @@ CONFIG_FLATMEM_MANUAL=y
153CONFIG_FLATMEM=y 174CONFIG_FLATMEM=y
154CONFIG_FLAT_NODE_MEM_MAP=y 175CONFIG_FLAT_NODE_MEM_MAP=y
155# CONFIG_SPARSEMEM_STATIC is not set 176# CONFIG_SPARSEMEM_STATIC is not set
177CONFIG_SPLIT_PTLOCK_CPUS=4096
156CONFIG_ALIGNMENT_TRAP=y 178CONFIG_ALIGNMENT_TRAP=y
157 179
158# 180#
@@ -233,6 +255,10 @@ CONFIG_INET6_TUNNEL=m
233CONFIG_IPV6_TUNNEL=m 255CONFIG_IPV6_TUNNEL=m
234CONFIG_NETFILTER=y 256CONFIG_NETFILTER=y
235# CONFIG_NETFILTER_DEBUG is not set 257# CONFIG_NETFILTER_DEBUG is not set
258
259#
260# Core Netfilter Configuration
261#
236# CONFIG_NETFILTER_NETLINK is not set 262# CONFIG_NETFILTER_NETLINK is not set
237 263
238# 264#
@@ -354,6 +380,10 @@ CONFIG_IP6_NF_RAW=m
354# CONFIG_NET_DIVERT is not set 380# CONFIG_NET_DIVERT is not set
355# CONFIG_ECONET is not set 381# CONFIG_ECONET is not set
356# CONFIG_WAN_ROUTER is not set 382# CONFIG_WAN_ROUTER is not set
383
384#
385# QoS and/or fair queueing
386#
357# CONFIG_NET_SCHED is not set 387# CONFIG_NET_SCHED is not set
358CONFIG_NET_CLS_ROUTE=y 388CONFIG_NET_CLS_ROUTE=y
359 389
@@ -411,6 +441,7 @@ CONFIG_IRCOMM=m
411# CONFIG_SMC_IRCC_FIR is not set 441# CONFIG_SMC_IRCC_FIR is not set
412# CONFIG_ALI_FIR is not set 442# CONFIG_ALI_FIR is not set
413# CONFIG_VIA_FIR is not set 443# CONFIG_VIA_FIR is not set
444CONFIG_PXA_FICP=m
414CONFIG_BT=m 445CONFIG_BT=m
415CONFIG_BT_L2CAP=m 446CONFIG_BT_L2CAP=m
416CONFIG_BT_SCO=m 447CONFIG_BT_SCO=m
@@ -429,7 +460,6 @@ CONFIG_BT_HCIUSB=m
429CONFIG_BT_HCIUART=m 460CONFIG_BT_HCIUART=m
430CONFIG_BT_HCIUART_H4=y 461CONFIG_BT_HCIUART_H4=y
431CONFIG_BT_HCIUART_BCSP=y 462CONFIG_BT_HCIUART_BCSP=y
432CONFIG_BT_HCIUART_BCSP_TXCRC=y
433CONFIG_BT_HCIBCM203X=m 463CONFIG_BT_HCIBCM203X=m
434CONFIG_BT_HCIBPA10X=m 464CONFIG_BT_HCIBPA10X=m
435CONFIG_BT_HCIBFUSB=m 465CONFIG_BT_HCIBFUSB=m
@@ -457,6 +487,11 @@ CONFIG_FW_LOADER=y
457# CONFIG_DEBUG_DRIVER is not set 487# CONFIG_DEBUG_DRIVER is not set
458 488
459# 489#
490# Connector - unified userspace <-> kernelspace linker
491#
492# CONFIG_CONNECTOR is not set
493
494#
460# Memory Technology Devices (MTD) 495# Memory Technology Devices (MTD)
461# 496#
462CONFIG_MTD=y 497CONFIG_MTD=y
@@ -475,6 +510,7 @@ CONFIG_MTD_BLOCK=y
475# CONFIG_FTL is not set 510# CONFIG_FTL is not set
476# CONFIG_NFTL is not set 511# CONFIG_NFTL is not set
477# CONFIG_INFTL is not set 512# CONFIG_INFTL is not set
513# CONFIG_RFD_FTL is not set
478 514
479# 515#
480# RAM/ROM/Flash chip drivers 516# RAM/ROM/Flash chip drivers
@@ -530,6 +566,11 @@ CONFIG_MTD_NAND_SHARPSL=y
530# CONFIG_MTD_NAND_NANDSIM is not set 566# CONFIG_MTD_NAND_NANDSIM is not set
531 567
532# 568#
569# OneNAND Flash Device Drivers
570#
571# CONFIG_MTD_ONENAND is not set
572
573#
533# Parallel port support 574# Parallel port support
534# 575#
535# CONFIG_PARPORT is not set 576# CONFIG_PARPORT is not set
@@ -549,14 +590,6 @@ CONFIG_BLK_DEV_LOOP=y
549# CONFIG_BLK_DEV_RAM is not set 590# CONFIG_BLK_DEV_RAM is not set
550CONFIG_BLK_DEV_RAM_COUNT=16 591CONFIG_BLK_DEV_RAM_COUNT=16
551# CONFIG_CDROM_PKTCDVD is not set 592# CONFIG_CDROM_PKTCDVD is not set
552
553#
554# IO Schedulers
555#
556CONFIG_IOSCHED_NOOP=y
557CONFIG_IOSCHED_AS=y
558CONFIG_IOSCHED_DEADLINE=y
559CONFIG_IOSCHED_CFQ=y
560# CONFIG_ATA_OVER_ETH is not set 593# CONFIG_ATA_OVER_ETH is not set
561 594
562# 595#
@@ -623,6 +656,7 @@ CONFIG_SCSI_MULTI_LUN=y
623# 656#
624# SCSI low-level drivers 657# SCSI low-level drivers
625# 658#
659# CONFIG_ISCSI_TCP is not set
626# CONFIG_SCSI_SATA is not set 660# CONFIG_SCSI_SATA is not set
627# CONFIG_SCSI_DEBUG is not set 661# CONFIG_SCSI_DEBUG is not set
628 662
@@ -746,6 +780,7 @@ CONFIG_PPP_ASYNC=m
746# CONFIG_PPP_SYNC_TTY is not set 780# CONFIG_PPP_SYNC_TTY is not set
747# CONFIG_PPP_DEFLATE is not set 781# CONFIG_PPP_DEFLATE is not set
748CONFIG_PPP_BSDCOMP=m 782CONFIG_PPP_BSDCOMP=m
783# CONFIG_PPP_MPPE is not set
749# CONFIG_PPPOE is not set 784# CONFIG_PPPOE is not set
750# CONFIG_SLIP is not set 785# CONFIG_SLIP is not set
751# CONFIG_SHAPER is not set 786# CONFIG_SHAPER is not set
@@ -771,6 +806,7 @@ CONFIG_INPUT=y
771# CONFIG_INPUT_TSDEV is not set 806# CONFIG_INPUT_TSDEV is not set
772CONFIG_INPUT_EVDEV=y 807CONFIG_INPUT_EVDEV=y
773# CONFIG_INPUT_EVBUG is not set 808# CONFIG_INPUT_EVBUG is not set
809# CONFIG_INPUT_POWER is not set
774 810
775# 811#
776# Input Device Drivers 812# Input Device Drivers
@@ -848,16 +884,37 @@ CONFIG_UNIX98_PTYS=y
848# PCMCIA character devices 884# PCMCIA character devices
849# 885#
850# CONFIG_SYNCLINK_CS is not set 886# CONFIG_SYNCLINK_CS is not set
887# CONFIG_CARDMAN_4000 is not set
888# CONFIG_CARDMAN_4040 is not set
851# CONFIG_RAW_DRIVER is not set 889# CONFIG_RAW_DRIVER is not set
852 890
853# 891#
854# TPM devices 892# TPM devices
855# 893#
894# CONFIG_TCG_TPM is not set
895# CONFIG_TELCLOCK is not set
856 896
857# 897#
858# I2C support 898# I2C support
859# 899#
860# CONFIG_I2C is not set 900CONFIG_I2C=y
901# CONFIG_I2C_CHARDEV is not set
902
903#
904# I2C Algorithms
905#
906# CONFIG_I2C_ALGOBIT is not set
907# CONFIG_I2C_ALGOPCF is not set
908# CONFIG_I2C_ALGOPCA is not set
909
910#
911# I2C Hardware Bus support
912#
913CONFIG_I2C_PXA=y
914# CONFIG_I2C_PXA_SLAVE is not set
915# CONFIG_I2C_PARPORT_LIGHT is not set
916# CONFIG_I2C_STUB is not set
917# CONFIG_I2C_PCA_ISA is not set
861 918
862# 919#
863# Hardware Monitoring support 920# Hardware Monitoring support
@@ -891,14 +948,13 @@ CONFIG_FB=y
891CONFIG_FB_CFB_FILLRECT=y 948CONFIG_FB_CFB_FILLRECT=y
892CONFIG_FB_CFB_COPYAREA=y 949CONFIG_FB_CFB_COPYAREA=y
893CONFIG_FB_CFB_IMAGEBLIT=y 950CONFIG_FB_CFB_IMAGEBLIT=y
894CONFIG_FB_SOFT_CURSOR=y
895# CONFIG_FB_MACMODES is not set 951# CONFIG_FB_MACMODES is not set
896# CONFIG_FB_MODE_HELPERS is not set 952# CONFIG_FB_MODE_HELPERS is not set
897# CONFIG_FB_TILEBLITTING is not set 953# CONFIG_FB_TILEBLITTING is not set
954# CONFIG_FB_S1D13XXX is not set
898CONFIG_FB_PXA=y 955CONFIG_FB_PXA=y
899# CONFIG_FB_W100 is not set
900# CONFIG_FB_PXA_PARAMETERS is not set 956# CONFIG_FB_PXA_PARAMETERS is not set
901# CONFIG_FB_S1D13XXX is not set 957# CONFIG_FB_W100 is not set
902# CONFIG_FB_VIRTUAL is not set 958# CONFIG_FB_VIRTUAL is not set
903 959
904# 960#
@@ -907,6 +963,7 @@ CONFIG_FB_PXA=y
907# CONFIG_VGA_CONSOLE is not set 963# CONFIG_VGA_CONSOLE is not set
908CONFIG_DUMMY_CONSOLE=y 964CONFIG_DUMMY_CONSOLE=y
909CONFIG_FRAMEBUFFER_CONSOLE=y 965CONFIG_FRAMEBUFFER_CONSOLE=y
966CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
910CONFIG_FONTS=y 967CONFIG_FONTS=y
911CONFIG_FONT_8x8=y 968CONFIG_FONT_8x8=y
912CONFIG_FONT_8x16=y 969CONFIG_FONT_8x16=y
@@ -965,15 +1022,15 @@ CONFIG_USB_SL811_CS=m
965# 1022#
966# USB Device Class drivers 1023# USB Device Class drivers
967# 1024#
1025CONFIG_USB_ACM=m
1026CONFIG_USB_PRINTER=m
968 1027
969# 1028#
970# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem 1029# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
971# 1030#
972CONFIG_USB_ACM=m
973CONFIG_USB_PRINTER=m
974 1031
975# 1032#
976# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information 1033# may also be needed; see USB_STORAGE Help for more information
977# 1034#
978CONFIG_USB_STORAGE=m 1035CONFIG_USB_STORAGE=m
979# CONFIG_USB_STORAGE_DEBUG is not set 1036# CONFIG_USB_STORAGE_DEBUG is not set
@@ -985,7 +1042,6 @@ CONFIG_USB_STORAGE=m
985# CONFIG_USB_STORAGE_SDDR09 is not set 1042# CONFIG_USB_STORAGE_SDDR09 is not set
986# CONFIG_USB_STORAGE_SDDR55 is not set 1043# CONFIG_USB_STORAGE_SDDR55 is not set
987# CONFIG_USB_STORAGE_JUMPSHOT is not set 1044# CONFIG_USB_STORAGE_JUMPSHOT is not set
988# CONFIG_USB_STORAGE_ONETOUCH is not set
989 1045
990# 1046#
991# USB Input Devices 1047# USB Input Devices
@@ -1058,6 +1114,7 @@ CONFIG_USB_MON=y
1058CONFIG_USB_SERIAL=m 1114CONFIG_USB_SERIAL=m
1059CONFIG_USB_SERIAL_GENERIC=y 1115CONFIG_USB_SERIAL_GENERIC=y
1060# CONFIG_USB_SERIAL_AIRPRIME is not set 1116# CONFIG_USB_SERIAL_AIRPRIME is not set
1117# CONFIG_USB_SERIAL_ANYDATA is not set
1061CONFIG_USB_SERIAL_BELKIN=m 1118CONFIG_USB_SERIAL_BELKIN=m
1062# CONFIG_USB_SERIAL_WHITEHEAT is not set 1119# CONFIG_USB_SERIAL_WHITEHEAT is not set
1063CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m 1120CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
@@ -1218,6 +1275,7 @@ CONFIG_RAMFS=y
1218CONFIG_JFFS2_FS=y 1275CONFIG_JFFS2_FS=y
1219CONFIG_JFFS2_FS_DEBUG=0 1276CONFIG_JFFS2_FS_DEBUG=0
1220CONFIG_JFFS2_FS_WRITEBUFFER=y 1277CONFIG_JFFS2_FS_WRITEBUFFER=y
1278CONFIG_JFFS2_SUMMARY=y
1221CONFIG_JFFS2_COMPRESSION_OPTIONS=y 1279CONFIG_JFFS2_COMPRESSION_OPTIONS=y
1222CONFIG_JFFS2_ZLIB=y 1280CONFIG_JFFS2_ZLIB=y
1223CONFIG_JFFS2_RTIME=y 1281CONFIG_JFFS2_RTIME=y
@@ -1344,7 +1402,9 @@ CONFIG_DETECT_SOFTLOCKUP=y
1344CONFIG_DEBUG_BUGVERBOSE=y 1402CONFIG_DEBUG_BUGVERBOSE=y
1345# CONFIG_DEBUG_INFO is not set 1403# CONFIG_DEBUG_INFO is not set
1346# CONFIG_DEBUG_FS is not set 1404# CONFIG_DEBUG_FS is not set
1405# CONFIG_DEBUG_VM is not set
1347CONFIG_FRAME_POINTER=y 1406CONFIG_FRAME_POINTER=y
1407# CONFIG_RCU_TORTURE_TEST is not set
1348# CONFIG_DEBUG_USER is not set 1408# CONFIG_DEBUG_USER is not set
1349# CONFIG_DEBUG_WAITQ is not set 1409# CONFIG_DEBUG_WAITQ is not set
1350CONFIG_DEBUG_ERRORS=y 1410CONFIG_DEBUG_ERRORS=y
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 8d8748407cbe..d7d69fd7039f 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -17,7 +17,6 @@
17 17
18#include <asm/assembler.h> 18#include <asm/assembler.h>
19#include <asm/domain.h> 19#include <asm/domain.h>
20#include <asm/mach-types.h>
21#include <asm/procinfo.h> 20#include <asm/procinfo.h>
22#include <asm/ptrace.h> 21#include <asm/ptrace.h>
23#include <asm/asm-offsets.h> 22#include <asm/asm-offsets.h>
@@ -83,7 +82,7 @@ ENTRY(stext)
83 @ and irqs disabled 82 @ and irqs disabled
84 bl __lookup_processor_type @ r5=procinfo r9=cpuid 83 bl __lookup_processor_type @ r5=procinfo r9=cpuid
85 movs r10, r5 @ invalid processor (r5=0)? 84 movs r10, r5 @ invalid processor (r5=0)?
86 beq __error_p @ yes, error 'p' 85 beq __error_p @ yes, error 'p'
87 bl __lookup_machine_type @ r5=machinfo 86 bl __lookup_machine_type @ r5=machinfo
88 movs r8, r5 @ invalid machine (r5=0)? 87 movs r8, r5 @ invalid machine (r5=0)?
89 beq __error_a @ yes, error 'a' 88 beq __error_a @ yes, error 'a'
@@ -343,16 +342,12 @@ __create_page_tables:
343 bne 1b 342 bne 1b
344#if defined(CONFIG_ARCH_NETWINDER) || defined(CONFIG_ARCH_CATS) 343#if defined(CONFIG_ARCH_NETWINDER) || defined(CONFIG_ARCH_CATS)
345 /* 344 /*
346 * If we're using the NetWinder, we need to map in 345 * If we're using the NetWinder or CATS, we also need to map
347 * the 16550-type serial port for the debug messages 346 * in the 16550-type serial port for the debug messages
348 */ 347 */
349 teq r1, #MACH_TYPE_NETWINDER
350 teqne r1, #MACH_TYPE_CATS
351 bne 1f
352 add r0, r4, #0xff000000 >> 18 348 add r0, r4, #0xff000000 >> 18
353 orr r3, r7, #0x7c000000 349 orr r3, r7, #0x7c000000
354 str r3, [r0] 350 str r3, [r0]
3551:
356#endif 351#endif
357#ifdef CONFIG_ARCH_RPC 352#ifdef CONFIG_ARCH_RPC
358 /* 353 /*
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index 0a41080d2266..3a22d84e1047 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -85,7 +85,7 @@ static struct plat_serial8250_port ixdp425_uart_data[] = {
85 { 85 {
86 .mapbase = IXP4XX_UART2_BASE_PHYS, 86 .mapbase = IXP4XX_UART2_BASE_PHYS,
87 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET, 87 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
88 .irq = IRQ_IXP4XX_UART1, 88 .irq = IRQ_IXP4XX_UART2,
89 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, 89 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
90 .iotype = UPIO_MEM, 90 .iotype = UPIO_MEM,
91 .regshift = 2, 91 .regshift = 2,
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index cd506646801a..2a58499c0968 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -44,6 +44,7 @@ config PXA_SHARPSL_25x
44config PXA_SHARPSL_27x 44config PXA_SHARPSL_27x
45 bool "Sharp PXA270 models (SL-Cxx00)" 45 bool "Sharp PXA270 models (SL-Cxx00)"
46 select PXA27x 46 select PXA27x
47 select IWMMXT
47 48
48endchoice 49endchoice
49 50
@@ -60,7 +61,6 @@ config MACH_CORGI
60 bool "Enable Sharp SL-C700 (Corgi) Support" 61 bool "Enable Sharp SL-C700 (Corgi) Support"
61 depends PXA_SHARPSL_25x 62 depends PXA_SHARPSL_25x
62 select PXA_SHARP_C7xx 63 select PXA_SHARP_C7xx
63 select PXA_SSP
64 64
65config MACH_SHEPHERD 65config MACH_SHEPHERD
66 bool "Enable Sharp SL-C750 (Shepherd) Support" 66 bool "Enable Sharp SL-C750 (Shepherd) Support"
@@ -77,6 +77,8 @@ config MACH_AKITA
77 depends PXA_SHARPSL_27x 77 depends PXA_SHARPSL_27x
78 select PXA_SHARP_Cxx00 78 select PXA_SHARP_Cxx00
79 select MACH_SPITZ 79 select MACH_SPITZ
80 select I2C
81 select I2C_PXA
80 82
81config MACH_SPITZ 83config MACH_SPITZ
82 bool "Enable Sharp Zaurus SL-3000 (Spitz) Support" 84 bool "Enable Sharp Zaurus SL-3000 (Spitz) Support"
@@ -90,7 +92,7 @@ config MACH_BORZOI
90 92
91config MACH_TOSA 93config MACH_TOSA
92 bool "Enable Sharp SL-6000x (Tosa) Support" 94 bool "Enable Sharp SL-6000x (Tosa) Support"
93 depends PXA_SHARPSL 95 depends PXA_SHARPSL_25x
94 96
95config PXA25x 97config PXA25x
96 bool 98 bool
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index e2c6fa23d3cd..af6580f1ceb8 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -30,7 +30,6 @@
30#include <asm/io.h> 30#include <asm/io.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/leds.h> 32#include <asm/leds.h>
33#include <asm/mach-types.h>
34#include <asm/hardware/amba.h> 33#include <asm/hardware/amba.h>
35#include <asm/hardware/amba_clcd.h> 34#include <asm/hardware/amba_clcd.h>
36#include <asm/hardware/arm_timer.h> 35#include <asm/hardware/arm_timer.h>
diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c
index 47b0b767f080..dbfe9e891f01 100644
--- a/arch/arm/mm/consistent.c
+++ b/arch/arm/mm/consistent.c
@@ -66,6 +66,7 @@ struct vm_region {
66 unsigned long vm_start; 66 unsigned long vm_start;
67 unsigned long vm_end; 67 unsigned long vm_end;
68 struct page *vm_pages; 68 struct page *vm_pages;
69 int vm_active;
69}; 70};
70 71
71static struct vm_region consistent_head = { 72static struct vm_region consistent_head = {
@@ -104,6 +105,7 @@ vm_region_alloc(struct vm_region *head, size_t size, gfp_t gfp)
104 list_add_tail(&new->vm_list, &c->vm_list); 105 list_add_tail(&new->vm_list, &c->vm_list);
105 new->vm_start = addr; 106 new->vm_start = addr;
106 new->vm_end = addr + size; 107 new->vm_end = addr + size;
108 new->vm_active = 1;
107 109
108 spin_unlock_irqrestore(&consistent_lock, flags); 110 spin_unlock_irqrestore(&consistent_lock, flags);
109 return new; 111 return new;
@@ -120,7 +122,7 @@ static struct vm_region *vm_region_find(struct vm_region *head, unsigned long ad
120 struct vm_region *c; 122 struct vm_region *c;
121 123
122 list_for_each_entry(c, &head->vm_list, vm_list) { 124 list_for_each_entry(c, &head->vm_list, vm_list) {
123 if (c->vm_start == addr) 125 if (c->vm_active && c->vm_start == addr)
124 goto out; 126 goto out;
125 } 127 }
126 c = NULL; 128 c = NULL;
@@ -319,6 +321,7 @@ EXPORT_SYMBOL(dma_mmap_writecombine);
319 321
320/* 322/*
321 * free a page as defined by the above mapping. 323 * free a page as defined by the above mapping.
324 * Must not be called with IRQs disabled.
322 */ 325 */
323void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr_t handle) 326void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr_t handle)
324{ 327{
@@ -326,14 +329,18 @@ void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr
326 unsigned long flags, addr; 329 unsigned long flags, addr;
327 pte_t *ptep; 330 pte_t *ptep;
328 331
332 WARN_ON(irqs_disabled());
333
329 size = PAGE_ALIGN(size); 334 size = PAGE_ALIGN(size);
330 335
331 spin_lock_irqsave(&consistent_lock, flags); 336 spin_lock_irqsave(&consistent_lock, flags);
332
333 c = vm_region_find(&consistent_head, (unsigned long)cpu_addr); 337 c = vm_region_find(&consistent_head, (unsigned long)cpu_addr);
334 if (!c) 338 if (!c)
335 goto no_area; 339 goto no_area;
336 340
341 c->vm_active = 0;
342 spin_unlock_irqrestore(&consistent_lock, flags);
343
337 if ((c->vm_end - c->vm_start) != size) { 344 if ((c->vm_end - c->vm_start) != size) {
338 printk(KERN_ERR "%s: freeing wrong coherent size (%ld != %d)\n", 345 printk(KERN_ERR "%s: freeing wrong coherent size (%ld != %d)\n",
339 __func__, c->vm_end - c->vm_start, size); 346 __func__, c->vm_end - c->vm_start, size);
@@ -372,8 +379,8 @@ void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr
372 379
373 flush_tlb_kernel_range(c->vm_start, c->vm_end); 380 flush_tlb_kernel_range(c->vm_start, c->vm_end);
374 381
382 spin_lock_irqsave(&consistent_lock, flags);
375 list_del(&c->vm_list); 383 list_del(&c->vm_list);
376
377 spin_unlock_irqrestore(&consistent_lock, flags); 384 spin_unlock_irqrestore(&consistent_lock, flags);
378 385
379 kfree(c); 386 kfree(c);
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
index c9a03981b785..330695b6b19d 100644
--- a/arch/arm/mm/flush.c
+++ b/arch/arm/mm/flush.c
@@ -155,14 +155,19 @@ static void __flush_dcache_aliases(struct address_space *mapping, struct page *p
155 * space mappings, we can be lazy and remember that we may have dirty 155 * space mappings, we can be lazy and remember that we may have dirty
156 * kernel cache lines for later. Otherwise, we assume we have 156 * kernel cache lines for later. Otherwise, we assume we have
157 * aliasing mappings. 157 * aliasing mappings.
158 *
159 * Note that we disable the lazy flush for SMP.
158 */ 160 */
159void flush_dcache_page(struct page *page) 161void flush_dcache_page(struct page *page)
160{ 162{
161 struct address_space *mapping = page_mapping(page); 163 struct address_space *mapping = page_mapping(page);
162 164
165#ifndef CONFIG_SMP
163 if (mapping && !mapping_mapped(mapping)) 166 if (mapping && !mapping_mapped(mapping))
164 set_bit(PG_dcache_dirty, &page->flags); 167 set_bit(PG_dcache_dirty, &page->flags);
165 else { 168 else
169#endif
170 {
166 __flush_dcache_page(mapping, page); 171 __flush_dcache_page(mapping, page);
167 if (mapping && cache_is_vivt()) 172 if (mapping && cache_is_vivt())
168 __flush_dcache_aliases(mapping, page); 173 __flush_dcache_aliases(mapping, page);
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 048c9c19aa4f..465487470d0e 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -12,7 +12,7 @@
12# 12#
13# http://www.arm.linux.org.uk/developer/machines/?action=new 13# http://www.arm.linux.org.uk/developer/machines/?action=new
14# 14#
15# Last update: Fri Nov 11 21:55:04 2005 15# Last update: Fri Nov 25 14:43:04 2005
16# 16#
17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number 17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
18# 18#
@@ -857,12 +857,12 @@ osiris MACH_OSIRIS OSIRIS 842
857maestro MACH_MAESTRO MAESTRO 843 857maestro MACH_MAESTRO MAESTRO 843
858tunge2 MACH_TUNGE2 TUNGE2 844 858tunge2 MACH_TUNGE2 TUNGE2 844
859ixbbm MACH_IXBBM IXBBM 845 859ixbbm MACH_IXBBM IXBBM 845
860mx27 MACH_MX27 MX27 846 860mx27ads MACH_MX27 MX27 846
861ax8004 MACH_AX8004 AX8004 847 861ax8004 MACH_AX8004 AX8004 847
862at91sam9261ek MACH_AT91SAM9261EK AT91SAM9261EK 848 862at91sam9261ek MACH_AT91SAM9261EK AT91SAM9261EK 848
863loft MACH_LOFT LOFT 849 863loft MACH_LOFT LOFT 849
864magpie MACH_MAGPIE MAGPIE 850 864magpie MACH_MAGPIE MAGPIE 850
865mx21 MACH_MX21 MX21 851 865mx21ads MACH_MX21 MX21 851
866mb87m3400 MACH_MB87M3400 MB87M3400 852 866mb87m3400 MACH_MB87M3400 MB87M3400 852
867mguard_delta MACH_MGUARD_DELTA MGUARD_DELTA 853 867mguard_delta MACH_MGUARD_DELTA MGUARD_DELTA 853
868davinci_dvdp MACH_DAVINCI_DVDP DAVINCI_DVDP 854 868davinci_dvdp MACH_DAVINCI_DVDP DAVINCI_DVDP 854
@@ -897,10 +897,16 @@ omi_board MACH_OMI_BOARD OMI_BOARD 882
897mx21civ MACH_MX21CIV MX21CIV 883 897mx21civ MACH_MX21CIV MX21CIV 883
898mahi_cdac MACH_MAHI_CDAC MAHI_CDAC 884 898mahi_cdac MACH_MAHI_CDAC MAHI_CDAC 884
899xscale_palmtx MACH_XSCALE_PALMTX XSCALE_PALMTX 885 899xscale_palmtx MACH_XSCALE_PALMTX XSCALE_PALMTX 885
900arch_s3c2413 MACH_ARCH_S3C2413 ARCH_S3C2413 886
901s3c2413 MACH_S3C2413 S3C2413 887 900s3c2413 MACH_S3C2413 S3C2413 887
902samsys_ep0 MACH_SAMSYS_EP0 SAMSYS_EP0 888 901samsys_ep0 MACH_SAMSYS_EP0 SAMSYS_EP0 888
903wg302v1 MACH_WG302V1 WG302V1 889 902wg302v1 MACH_WG302V1 WG302V1 889
904wg302v2 MACH_WG302V2 WG302V2 890 903wg302v2 MACH_WG302V2 WG302V2 890
905eb42x MACH_EB42X EB42X 891 904eb42x MACH_EB42X EB42X 891
906iq331es MACH_IQ331ES IQ331ES 892 905iq331es MACH_IQ331ES IQ331ES 892
906cosydsp MACH_COSYDSP COSYDSP 893
907uplat7d MACH_UPLAT7D UPLAT7D 894
908ptdavinci MACH_PTDAVINCI PTDAVINCI 895
909mbus MACH_MBUS MBUS 896
910nadia2vb MACH_NADIA2VB NADIA2VB 897
911r1000 MACH_R1000 R1000 898
912hw90250 MACH_HW90250 HW90250 899
diff --git a/arch/frv/kernel/semaphore.c b/arch/frv/kernel/semaphore.c
index 5cba9c1f2b3d..7971d680ae29 100644
--- a/arch/frv/kernel/semaphore.c
+++ b/arch/frv/kernel/semaphore.c
@@ -20,7 +20,7 @@ struct sem_waiter {
20 struct task_struct *task; 20 struct task_struct *task;
21}; 21};
22 22
23#if SEM_DEBUG 23#if SEMAPHORE_DEBUG
24void semtrace(struct semaphore *sem, const char *str) 24void semtrace(struct semaphore *sem, const char *str)
25{ 25{
26 if (sem->debug) 26 if (sem->debug)
diff --git a/arch/frv/mb93090-mb00/pci-irq.c b/arch/frv/mb93090-mb00/pci-irq.c
index af981bda015c..24622d89b1ca 100644
--- a/arch/frv/mb93090-mb00/pci-irq.c
+++ b/arch/frv/mb93090-mb00/pci-irq.c
@@ -60,7 +60,7 @@ void __init pcibios_fixup_irqs(void)
60 } 60 }
61} 61}
62 62
63void __init pcibios_penalize_isa_irq(int irq, int active) 63void __init pcibios_penalize_isa_irq(int irq)
64{ 64{
65} 65}
66 66
diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c
index 79433159b5f0..765088ea8a50 100644
--- a/arch/frv/mm/init.c
+++ b/arch/frv/mm/init.c
@@ -108,7 +108,7 @@ void __init paging_init(void)
108 108
109 memset((void *) empty_zero_page, 0, PAGE_SIZE); 109 memset((void *) empty_zero_page, 0, PAGE_SIZE);
110 110
111#if CONFIG_HIGHMEM 111#ifdef CONFIG_HIGHMEM
112 if (num_physpages - num_mappedpages) { 112 if (num_physpages - num_mappedpages) {
113 pgd_t *pge; 113 pgd_t *pge;
114 pud_t *pue; 114 pud_t *pue;
diff --git a/arch/frv/mm/pgalloc.c b/arch/frv/mm/pgalloc.c
index 2c67dfe5a6b3..f76dd03ddd99 100644
--- a/arch/frv/mm/pgalloc.c
+++ b/arch/frv/mm/pgalloc.c
@@ -85,7 +85,7 @@ static inline void pgd_list_add(pgd_t *pgd)
85 struct page *page = virt_to_page(pgd); 85 struct page *page = virt_to_page(pgd);
86 page->index = (unsigned long) pgd_list; 86 page->index = (unsigned long) pgd_list;
87 if (pgd_list) 87 if (pgd_list)
88 pgd_list->private = (unsigned long) &page->index; 88 set_page_private(pgd_list, (unsigned long) &page->index);
89 pgd_list = page; 89 pgd_list = page;
90 set_page_private(page, (unsigned long)&pgd_list); 90 set_page_private(page, (unsigned long)&pgd_list);
91} 91}
@@ -94,10 +94,10 @@ static inline void pgd_list_del(pgd_t *pgd)
94{ 94{
95 struct page *next, **pprev, *page = virt_to_page(pgd); 95 struct page *next, **pprev, *page = virt_to_page(pgd);
96 next = (struct page *) page->index; 96 next = (struct page *) page->index;
97 pprev = (struct page **)page_private(page); 97 pprev = (struct page **) page_private(page);
98 *pprev = next; 98 *pprev = next;
99 if (next) 99 if (next)
100 next->private = (unsigned long) pprev; 100 set_page_private(next, (unsigned long) pprev);
101} 101}
102 102
103void pgd_ctor(void *pgd, kmem_cache_t *cache, unsigned long unused) 103void pgd_ctor(void *pgd, kmem_cache_t *cache, unsigned long unused)
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
index 76b1135d401a..447fa9e33ffb 100644
--- a/arch/i386/kernel/acpi/boot.c
+++ b/arch/i386/kernel/acpi/boot.c
@@ -638,6 +638,13 @@ static int __init acpi_parse_fadt(unsigned long phys, unsigned long size)
638 return 0; 638 return 0;
639 639
640 pmtmr_ioport = fadt->xpm_tmr_blk.address; 640 pmtmr_ioport = fadt->xpm_tmr_blk.address;
641 /*
642 * "X" fields are optional extensions to the original V1.0
643 * fields, so we must selectively expand V1.0 fields if the
644 * corresponding X field is zero.
645 */
646 if (!pmtmr_ioport)
647 pmtmr_ioport = fadt->V1_pm_tmr_blk;
641 } else { 648 } else {
642 /* FADT rev. 1 */ 649 /* FADT rev. 1 */
643 pmtmr_ioport = fadt->V1_pm_tmr_blk; 650 pmtmr_ioport = fadt->V1_pm_tmr_blk;
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index cc5d7ac5b2e7..22c8675c79f4 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -2009,7 +2009,7 @@ static void ack_edge_ioapic_vector(unsigned int vector)
2009{ 2009{
2010 int irq = vector_to_irq(vector); 2010 int irq = vector_to_irq(vector);
2011 2011
2012 move_irq(vector); 2012 move_native_irq(vector);
2013 ack_edge_ioapic_irq(irq); 2013 ack_edge_ioapic_irq(irq);
2014} 2014}
2015 2015
@@ -2024,7 +2024,7 @@ static void end_level_ioapic_vector (unsigned int vector)
2024{ 2024{
2025 int irq = vector_to_irq(vector); 2025 int irq = vector_to_irq(vector);
2026 2026
2027 move_irq(vector); 2027 move_native_irq(vector);
2028 end_level_ioapic_irq(irq); 2028 end_level_ioapic_irq(irq);
2029} 2029}
2030 2030
diff --git a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c
index 350ea6680f63..2afe0f8d555a 100644
--- a/arch/i386/kernel/reboot.c
+++ b/arch/i386/kernel/reboot.c
@@ -111,6 +111,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
111 DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"), 111 DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"),
112 }, 112 },
113 }, 113 },
114 { /* Handle problems with rebooting on HP nc6120 */
115 .callback = set_bios_reboot,
116 .ident = "HP Compaq nc6120",
117 .matches = {
118 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
119 DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq nc6120"),
120 },
121 },
114 { } 122 { }
115}; 123};
116 124
diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c
index 01572814abe4..5db9d3bcbbcb 100644
--- a/arch/ia64/kernel/ia64_ksyms.c
+++ b/arch/ia64/kernel/ia64_ksyms.c
@@ -42,6 +42,7 @@ EXPORT_SYMBOL(clear_page);
42 42
43#ifdef CONFIG_VIRTUAL_MEM_MAP 43#ifdef CONFIG_VIRTUAL_MEM_MAP
44#include <linux/bootmem.h> 44#include <linux/bootmem.h>
45EXPORT_SYMBOL(min_low_pfn); /* defined by bootmem.c, but not exported by generic code */
45EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic code */ 46EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic code */
46#endif 47#endif
47 48
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
index 801eeaeaf3de..2895d6e6062f 100644
--- a/arch/ia64/kernel/kprobes.c
+++ b/arch/ia64/kernel/kprobes.c
@@ -740,7 +740,7 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
740 switch(val) { 740 switch(val) {
741 case DIE_BREAK: 741 case DIE_BREAK:
742 /* err is break number from ia64_bad_break() */ 742 /* err is break number from ia64_bad_break() */
743 if (args->err == 0x80200 || args->err == 0x80300) 743 if (args->err == 0x80200 || args->err == 0x80300 || args->err == 0)
744 if (pre_kprobes_handler(args)) 744 if (pre_kprobes_handler(args))
745 ret = NOTIFY_STOP; 745 ret = NOTIFY_STOP;
746 break; 746 break;
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c
index fba5fdd1f968..d3e0ecb56d62 100644
--- a/arch/ia64/kernel/traps.c
+++ b/arch/ia64/kernel/traps.c
@@ -132,24 +132,6 @@ __kprobes ia64_bad_break (unsigned long break_num, struct pt_regs *regs)
132 siginfo_t siginfo; 132 siginfo_t siginfo;
133 int sig, code; 133 int sig, code;
134 134
135 /* break.b always sets cr.iim to 0, which causes problems for
136 * debuggers. Get the real break number from the original instruction,
137 * but only for kernel code. User space break.b is left alone, to
138 * preserve the existing behaviour. All break codings have the same
139 * format, so there is no need to check the slot type.
140 */
141 if (break_num == 0 && !user_mode(regs)) {
142 struct ia64_psr *ipsr = ia64_psr(regs);
143 unsigned long *bundle = (unsigned long *)regs->cr_iip;
144 unsigned long slot;
145 switch (ipsr->ri) {
146 case 0: slot = (bundle[0] >> 5); break;
147 case 1: slot = (bundle[0] >> 46) | (bundle[1] << 18); break;
148 default: slot = (bundle[1] >> 23); break;
149 }
150 break_num = ((slot >> 36 & 1) << 20) | (slot >> 6 & 0xfffff);
151 }
152
153 /* SIGILL, SIGFPE, SIGSEGV, and SIGBUS want these field initialized: */ 135 /* SIGILL, SIGFPE, SIGSEGV, and SIGBUS want these field initialized: */
154 siginfo.si_addr = (void __user *) (regs->cr_iip + ia64_psr(regs)->ri); 136 siginfo.si_addr = (void __user *) (regs->cr_iip + ia64_psr(regs)->ri);
155 siginfo.si_imm = break_num; 137 siginfo.si_imm = break_num;
diff --git a/arch/m32r/kernel/io_mappi3.c b/arch/m32r/kernel/io_mappi3.c
index 6716ffea769a..f80321a58764 100644
--- a/arch/m32r/kernel/io_mappi3.c
+++ b/arch/m32r/kernel/io_mappi3.c
@@ -36,12 +36,13 @@ static inline void *_port2addr(unsigned long port)
36 return (void *)(port + NONCACHE_OFFSET); 36 return (void *)(port + NONCACHE_OFFSET);
37} 37}
38 38
39#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) 39#if defined(CONFIG_IDE)
40static inline void *__port2addr_ata(unsigned long port) 40static inline void *__port2addr_ata(unsigned long port)
41{ 41{
42 static int dummy_reg; 42 static int dummy_reg;
43 43
44 switch (port) { 44 switch (port) {
45 /* IDE0 CF */
45 case 0x1f0: return (void *)0xb4002000; 46 case 0x1f0: return (void *)0xb4002000;
46 case 0x1f1: return (void *)0xb4012800; 47 case 0x1f1: return (void *)0xb4012800;
47 case 0x1f2: return (void *)0xb4012002; 48 case 0x1f2: return (void *)0xb4012002;
@@ -51,6 +52,17 @@ static inline void *__port2addr_ata(unsigned long port)
51 case 0x1f6: return (void *)0xb4012006; 52 case 0x1f6: return (void *)0xb4012006;
52 case 0x1f7: return (void *)0xb4012806; 53 case 0x1f7: return (void *)0xb4012806;
53 case 0x3f6: return (void *)0xb401200e; 54 case 0x3f6: return (void *)0xb401200e;
55 /* IDE1 IDE */
56 case 0x170: return (void *)0xb4810000; /* Data 16bit */
57 case 0x171: return (void *)0xb4810002; /* Features / Error */
58 case 0x172: return (void *)0xb4810004; /* Sector count */
59 case 0x173: return (void *)0xb4810006; /* Sector number */
60 case 0x174: return (void *)0xb4810008; /* Cylinder low */
61 case 0x175: return (void *)0xb481000a; /* Cylinder high */
62 case 0x176: return (void *)0xb481000c; /* Device head */
63 case 0x177: return (void *)0xb481000e; /* Command */
64 case 0x376: return (void *)0xb480800c; /* Device control / Alt status */
65
54 default: return (void *)&dummy_reg; 66 default: return (void *)&dummy_reg;
55 } 67 }
56} 68}
@@ -108,8 +120,9 @@ unsigned char _inb(unsigned long port)
108{ 120{
109 if (port >= LAN_IOSTART && port < LAN_IOEND) 121 if (port >= LAN_IOSTART && port < LAN_IOEND)
110 return _ne_inb(PORT2ADDR_NE(port)); 122 return _ne_inb(PORT2ADDR_NE(port));
111#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) 123#if defined(CONFIG_IDE)
112 else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { 124 else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
125 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
113 return *(volatile unsigned char *)__port2addr_ata(port); 126 return *(volatile unsigned char *)__port2addr_ata(port);
114 } 127 }
115#endif 128#endif
@@ -127,8 +140,9 @@ unsigned short _inw(unsigned long port)
127{ 140{
128 if (port >= LAN_IOSTART && port < LAN_IOEND) 141 if (port >= LAN_IOSTART && port < LAN_IOEND)
129 return _ne_inw(PORT2ADDR_NE(port)); 142 return _ne_inw(PORT2ADDR_NE(port));
130#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) 143#if defined(CONFIG_IDE)
131 else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { 144 else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
145 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
132 return *(volatile unsigned short *)__port2addr_ata(port); 146 return *(volatile unsigned short *)__port2addr_ata(port);
133 } 147 }
134#endif 148#endif
@@ -185,8 +199,9 @@ void _outb(unsigned char b, unsigned long port)
185 if (port >= LAN_IOSTART && port < LAN_IOEND) 199 if (port >= LAN_IOSTART && port < LAN_IOEND)
186 _ne_outb(b, PORT2ADDR_NE(port)); 200 _ne_outb(b, PORT2ADDR_NE(port));
187 else 201 else
188#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) 202#if defined(CONFIG_IDE)
189 if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { 203 if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
204 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
190 *(volatile unsigned char *)__port2addr_ata(port) = b; 205 *(volatile unsigned char *)__port2addr_ata(port) = b;
191 } else 206 } else
192#endif 207#endif
@@ -203,8 +218,9 @@ void _outw(unsigned short w, unsigned long port)
203 if (port >= LAN_IOSTART && port < LAN_IOEND) 218 if (port >= LAN_IOSTART && port < LAN_IOEND)
204 _ne_outw(w, PORT2ADDR_NE(port)); 219 _ne_outw(w, PORT2ADDR_NE(port));
205 else 220 else
206#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) 221#if defined(CONFIG_IDE)
207 if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { 222 if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
223 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
208 *(volatile unsigned short *)__port2addr_ata(port) = w; 224 *(volatile unsigned short *)__port2addr_ata(port) = w;
209 } else 225 } else
210#endif 226#endif
@@ -253,8 +269,9 @@ void _insb(unsigned int port, void * addr, unsigned long count)
253{ 269{
254 if (port >= LAN_IOSTART && port < LAN_IOEND) 270 if (port >= LAN_IOSTART && port < LAN_IOEND)
255 _ne_insb(PORT2ADDR_NE(port), addr, count); 271 _ne_insb(PORT2ADDR_NE(port), addr, count);
256#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) 272#if defined(CONFIG_IDE)
257 else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { 273 else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
274 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
258 unsigned char *buf = addr; 275 unsigned char *buf = addr;
259 unsigned char *portp = __port2addr_ata(port); 276 unsigned char *portp = __port2addr_ata(port);
260 while (count--) 277 while (count--)
@@ -289,8 +306,9 @@ void _insw(unsigned int port, void * addr, unsigned long count)
289 pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short), 306 pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short),
290 count, 1); 307 count, 1);
291#endif 308#endif
292#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) 309#if defined(CONFIG_IDE)
293 } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { 310 } else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
311 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
294 portp = __port2addr_ata(port); 312 portp = __port2addr_ata(port);
295 while (count--) 313 while (count--)
296 *buf++ = *(volatile unsigned short *)portp; 314 *buf++ = *(volatile unsigned short *)portp;
@@ -321,8 +339,9 @@ void _outsb(unsigned int port, const void * addr, unsigned long count)
321 portp = PORT2ADDR_NE(port); 339 portp = PORT2ADDR_NE(port);
322 while (count--) 340 while (count--)
323 _ne_outb(*buf++, portp); 341 _ne_outb(*buf++, portp);
324#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) 342#if defined(CONFIG_IDE)
325 } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { 343 } else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
344 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
326 portp = __port2addr_ata(port); 345 portp = __port2addr_ata(port);
327 while (count--) 346 while (count--)
328 *(volatile unsigned char *)portp = *buf++; 347 *(volatile unsigned char *)portp = *buf++;
@@ -348,8 +367,9 @@ void _outsw(unsigned int port, const void * addr, unsigned long count)
348 portp = PORT2ADDR_NE(port); 367 portp = PORT2ADDR_NE(port);
349 while (count--) 368 while (count--)
350 *(volatile unsigned short *)portp = *buf++; 369 *(volatile unsigned short *)portp = *buf++;
351#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) 370#if defined(CONFIG_IDE)
352 } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { 371 } else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
372 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
353 portp = __port2addr_ata(port); 373 portp = __port2addr_ata(port);
354 while (count--) 374 while (count--)
355 *(volatile unsigned short *)portp = *buf++; 375 *(volatile unsigned short *)portp = *buf++;
diff --git a/arch/m32r/kernel/setup_mappi3.c b/arch/m32r/kernel/setup_mappi3.c
index 9c79341a7b45..f6ecdf7f555c 100644
--- a/arch/m32r/kernel/setup_mappi3.c
+++ b/arch/m32r/kernel/setup_mappi3.c
@@ -151,7 +151,7 @@ void __init init_IRQ(void)
151 disable_mappi3_irq(M32R_IRQ_INT1); 151 disable_mappi3_irq(M32R_IRQ_INT1);
152#endif /* CONFIG_USB */ 152#endif /* CONFIG_USB */
153 153
154 /* ICUCR40: CFC IREQ */ 154 /* CFC IREQ */
155 irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; 155 irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED;
156 irq_desc[PLD_IRQ_CFIREQ].handler = &mappi3_irq_type; 156 irq_desc[PLD_IRQ_CFIREQ].handler = &mappi3_irq_type;
157 irq_desc[PLD_IRQ_CFIREQ].action = 0; 157 irq_desc[PLD_IRQ_CFIREQ].action = 0;
@@ -160,7 +160,7 @@ void __init init_IRQ(void)
160 disable_mappi3_irq(PLD_IRQ_CFIREQ); 160 disable_mappi3_irq(PLD_IRQ_CFIREQ);
161 161
162#if defined(CONFIG_M32R_CFC) 162#if defined(CONFIG_M32R_CFC)
163 /* ICUCR41: CFC Insert */ 163 /* ICUCR41: CFC Insert & eject */
164 irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; 164 irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED;
165 irq_desc[PLD_IRQ_CFC_INSERT].handler = &mappi3_irq_type; 165 irq_desc[PLD_IRQ_CFC_INSERT].handler = &mappi3_irq_type;
166 irq_desc[PLD_IRQ_CFC_INSERT].action = 0; 166 irq_desc[PLD_IRQ_CFC_INSERT].action = 0;
@@ -168,14 +168,16 @@ void __init init_IRQ(void)
168 icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; 168 icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00;
169 disable_mappi3_irq(PLD_IRQ_CFC_INSERT); 169 disable_mappi3_irq(PLD_IRQ_CFC_INSERT);
170 170
171 /* ICUCR42: CFC Eject */
172 irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED;
173 irq_desc[PLD_IRQ_CFC_EJECT].handler = &mappi3_irq_type;
174 irq_desc[PLD_IRQ_CFC_EJECT].action = 0;
175 irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */
176 icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
177 disable_mappi3_irq(PLD_IRQ_CFC_EJECT);
178#endif /* CONFIG_M32R_CFC */ 171#endif /* CONFIG_M32R_CFC */
172
173 /* IDE IREQ */
174 irq_desc[PLD_IRQ_IDEIREQ].status = IRQ_DISABLED;
175 irq_desc[PLD_IRQ_IDEIREQ].handler = &mappi3_irq_type;
176 irq_desc[PLD_IRQ_IDEIREQ].action = 0;
177 irq_desc[PLD_IRQ_IDEIREQ].depth = 1; /* disable nested irq */
178 icu_data[PLD_IRQ_IDEIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
179 disable_mappi3_irq(PLD_IRQ_IDEIREQ);
180
179} 181}
180 182
181#if defined(CONFIG_SMC91X) 183#if defined(CONFIG_SMC91X)
diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c
index e0500e12c5fb..fe55b28d3725 100644
--- a/arch/m32r/kernel/sys_m32r.c
+++ b/arch/m32r/kernel/sys_m32r.c
@@ -41,7 +41,8 @@ asmlinkage int sys_tas(int *addr)
41 return -EFAULT; 41 return -EFAULT;
42 local_irq_save(flags); 42 local_irq_save(flags);
43 oldval = *addr; 43 oldval = *addr;
44 *addr = 1; 44 if (!oldval)
45 *addr = 1;
45 local_irq_restore(flags); 46 local_irq_restore(flags);
46 return oldval; 47 return oldval;
47} 48}
@@ -59,7 +60,8 @@ asmlinkage int sys_tas(int *addr)
59 60
60 _raw_spin_lock(&tas_lock); 61 _raw_spin_lock(&tas_lock);
61 oldval = *addr; 62 oldval = *addr;
62 *addr = 1; 63 if (!oldval)
64 *addr = 1;
63 _raw_spin_unlock(&tas_lock); 65 _raw_spin_unlock(&tas_lock);
64 66
65 return oldval; 67 return oldval;
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index e380a8322a94..b50be449d3f5 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -6,8 +6,6 @@ config MIPS
6 6
7mainmenu "Linux/MIPS Kernel Configuration" 7mainmenu "Linux/MIPS Kernel Configuration"
8 8
9source "init/Kconfig"
10
11menu "Machine selection" 9menu "Machine selection"
12 10
13choice 11choice
@@ -1643,6 +1641,8 @@ config RWSEM_GENERIC_SPINLOCK
1643 bool 1641 bool
1644 default y 1642 default y
1645 1643
1644source "init/Kconfig"
1645
1646menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)" 1646menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)"
1647 1647
1648config HW_HAS_EISA 1648config HW_HAS_EISA
diff --git a/arch/mips/au1000/db1x00/board_setup.c b/arch/mips/au1000/db1x00/board_setup.c
index ac05ba0ff63f..f00ec3b175d8 100644
--- a/arch/mips/au1000/db1x00/board_setup.c
+++ b/arch/mips/au1000/db1x00/board_setup.c
@@ -45,13 +45,12 @@
45#include <asm/mach-au1x00/au1000.h> 45#include <asm/mach-au1x00/au1000.h>
46#include <asm/mach-db1x00/db1x00.h> 46#include <asm/mach-db1x00/db1x00.h>
47 47
48/* not correct for db1550 */ 48static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
49static BCSR * const bcsr = (BCSR *)0xAE000000;
50 49
51void board_reset (void) 50void board_reset (void)
52{ 51{
53 /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */ 52 /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
54 au_writel(0x00000000, 0xAE00001C); 53 bcsr->swreset = 0x0000;
55} 54}
56 55
57void __init board_setup(void) 56void __init board_setup(void)
@@ -75,7 +74,7 @@ void __init board_setup(void)
75 bcsr->resets |= BCSR_RESETS_IRDA_MODE_OFF; 74 bcsr->resets |= BCSR_RESETS_IRDA_MODE_OFF;
76 au_sync(); 75 au_sync();
77#endif 76#endif
78 au_writel(0, 0xAE000010); /* turn off pcmcia power */ 77 bcsr->pcmcia = 0x0000; /* turn off PCMCIA power */
79 78
80#ifdef CONFIG_MIPS_MIRAGE 79#ifdef CONFIG_MIPS_MIRAGE
81 /* enable GPIO[31:0] inputs */ 80 /* enable GPIO[31:0] inputs */
diff --git a/arch/mips/au1000/db1x00/init.c b/arch/mips/au1000/db1x00/init.c
index 4b9d5e46edbb..41e0522f3cf1 100644
--- a/arch/mips/au1000/db1x00/init.c
+++ b/arch/mips/au1000/db1x00/init.c
@@ -61,7 +61,17 @@ void __init prom_init(void)
61 prom_envp = (char **) fw_arg2; 61 prom_envp = (char **) fw_arg2;
62 62
63 mips_machgroup = MACH_GROUP_ALCHEMY; 63 mips_machgroup = MACH_GROUP_ALCHEMY;
64 mips_machtype = MACH_DB1000; /* set the platform # */ 64
65 /* Set the platform # */
66#if defined (CONFIG_MIPS_DB1550)
67 mips_machtype = MACH_DB1550;
68#elif defined (CONFIG_MIPS_DB1500)
69 mips_machtype = MACH_DB1500;
70#elif defined (CONFIG_MIPS_DB1100)
71 mips_machtype = MACH_DB1100;
72#else
73 mips_machtype = MACH_DB1000;
74#endif
65 75
66 prom_init_cmdline(); 76 prom_init_cmdline();
67 77
diff --git a/arch/mips/configs/atlas_defconfig b/arch/mips/configs/atlas_defconfig
index 74990758154b..89c21572a59c 100644
--- a/arch/mips/configs/atlas_defconfig
+++ b/arch/mips/configs/atlas_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Thu Nov 10 12:14:02 2005 4# Thu Nov 24 01:05:52 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -215,6 +146,75 @@ CONFIG_PREEMPT_NONE=y
215# CONFIG_PREEMPT is not set 146# CONFIG_PREEMPT is not set
216 147
217# 148#
149# Code maturity level options
150#
151CONFIG_EXPERIMENTAL=y
152CONFIG_CLEAN_COMPILE=y
153CONFIG_BROKEN_ON_SMP=y
154CONFIG_INIT_ENV_ARG_LIMIT=32
155
156#
157# General setup
158#
159CONFIG_LOCALVERSION=""
160CONFIG_LOCALVERSION_AUTO=y
161CONFIG_SWAP=y
162CONFIG_SYSVIPC=y
163# CONFIG_POSIX_MQUEUE is not set
164# CONFIG_BSD_PROCESS_ACCT is not set
165CONFIG_SYSCTL=y
166# CONFIG_AUDIT is not set
167CONFIG_HOTPLUG=y
168CONFIG_KOBJECT_UEVENT=y
169# CONFIG_IKCONFIG is not set
170CONFIG_INITRAMFS_SOURCE=""
171CONFIG_EMBEDDED=y
172CONFIG_KALLSYMS=y
173# CONFIG_KALLSYMS_EXTRA_PASS is not set
174CONFIG_PRINTK=y
175CONFIG_BUG=y
176CONFIG_BASE_FULL=y
177CONFIG_FUTEX=y
178CONFIG_EPOLL=y
179# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
180CONFIG_SHMEM=y
181CONFIG_CC_ALIGN_FUNCTIONS=0
182CONFIG_CC_ALIGN_LABELS=0
183CONFIG_CC_ALIGN_LOOPS=0
184CONFIG_CC_ALIGN_JUMPS=0
185# CONFIG_TINY_SHMEM is not set
186CONFIG_BASE_SMALL=0
187
188#
189# Loadable module support
190#
191CONFIG_MODULES=y
192CONFIG_MODULE_UNLOAD=y
193# CONFIG_MODULE_FORCE_UNLOAD is not set
194CONFIG_OBSOLETE_MODPARM=y
195CONFIG_MODVERSIONS=y
196CONFIG_MODULE_SRCVERSION_ALL=y
197CONFIG_KMOD=y
198
199#
200# Block layer
201#
202# CONFIG_LBD is not set
203
204#
205# IO Schedulers
206#
207CONFIG_IOSCHED_NOOP=y
208CONFIG_IOSCHED_AS=y
209CONFIG_IOSCHED_DEADLINE=y
210CONFIG_IOSCHED_CFQ=y
211CONFIG_DEFAULT_AS=y
212# CONFIG_DEFAULT_DEADLINE is not set
213# CONFIG_DEFAULT_CFQ is not set
214# CONFIG_DEFAULT_NOOP is not set
215CONFIG_DEFAULT_IOSCHED="anticipatory"
216
217#
218# Bus options (PCI, PCMCIA, EISA, ISA, TC) 218# Bus options (PCI, PCMCIA, EISA, ISA, TC)
219# 219#
220CONFIG_HW_HAS_PCI=y 220CONFIG_HW_HAS_PCI=y
diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig
index ea4b75604c23..069f9d14983e 100644
--- a/arch/mips/configs/bigsur_defconfig
+++ b/arch/mips/configs/bigsur_defconfig
@@ -1,83 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:04:36 2005 4# Thu Nov 24 01:05:54 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_LOCK_KERNEL=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27# CONFIG_HOTPLUG is not set
28CONFIG_KOBJECT_UEVENT=y
29CONFIG_IKCONFIG=y
30CONFIG_IKCONFIG_PROC=y
31# CONFIG_CPUSETS is not set
32CONFIG_INITRAMFS_SOURCE=""
33CONFIG_EMBEDDED=y
34CONFIG_KALLSYMS=y
35# CONFIG_KALLSYMS_ALL is not set
36# CONFIG_KALLSYMS_EXTRA_PASS is not set
37CONFIG_PRINTK=y
38CONFIG_BUG=y
39CONFIG_BASE_FULL=y
40CONFIG_FUTEX=y
41CONFIG_EPOLL=y
42# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
43CONFIG_SHMEM=y
44CONFIG_CC_ALIGN_FUNCTIONS=0
45CONFIG_CC_ALIGN_LABELS=0
46CONFIG_CC_ALIGN_LOOPS=0
47CONFIG_CC_ALIGN_JUMPS=0
48# CONFIG_TINY_SHMEM is not set
49CONFIG_BASE_SMALL=0
50
51#
52# Loadable module support
53#
54CONFIG_MODULES=y
55CONFIG_MODULE_UNLOAD=y
56# CONFIG_MODULE_FORCE_UNLOAD is not set
57CONFIG_OBSOLETE_MODPARM=y
58CONFIG_MODVERSIONS=y
59CONFIG_MODULE_SRCVERSION_ALL=y
60CONFIG_KMOD=y
61CONFIG_STOP_MACHINE=y
62
63#
64# Block layer
65#
66
67#
68# IO Schedulers
69#
70CONFIG_IOSCHED_NOOP=y
71CONFIG_IOSCHED_AS=y
72CONFIG_IOSCHED_DEADLINE=y
73CONFIG_IOSCHED_CFQ=y
74CONFIG_DEFAULT_AS=y
75# CONFIG_DEFAULT_DEADLINE is not set
76# CONFIG_DEFAULT_CFQ is not set
77# CONFIG_DEFAULT_NOOP is not set
78CONFIG_DEFAULT_IOSCHED="anticipatory"
79
80#
81# Machine selection 9# Machine selection
82# 10#
83# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -224,6 +152,78 @@ CONFIG_PREEMPT_NONE=y
224# CONFIG_PREEMPT_BKL is not set 152# CONFIG_PREEMPT_BKL is not set
225 153
226# 154#
155# Code maturity level options
156#
157CONFIG_EXPERIMENTAL=y
158CONFIG_CLEAN_COMPILE=y
159CONFIG_LOCK_KERNEL=y
160CONFIG_INIT_ENV_ARG_LIMIT=32
161
162#
163# General setup
164#
165CONFIG_LOCALVERSION=""
166CONFIG_LOCALVERSION_AUTO=y
167CONFIG_SWAP=y
168CONFIG_SYSVIPC=y
169# CONFIG_POSIX_MQUEUE is not set
170# CONFIG_BSD_PROCESS_ACCT is not set
171CONFIG_SYSCTL=y
172# CONFIG_AUDIT is not set
173# CONFIG_HOTPLUG is not set
174CONFIG_KOBJECT_UEVENT=y
175CONFIG_IKCONFIG=y
176CONFIG_IKCONFIG_PROC=y
177# CONFIG_CPUSETS is not set
178CONFIG_INITRAMFS_SOURCE=""
179CONFIG_EMBEDDED=y
180CONFIG_KALLSYMS=y
181# CONFIG_KALLSYMS_ALL is not set
182# CONFIG_KALLSYMS_EXTRA_PASS is not set
183CONFIG_PRINTK=y
184CONFIG_BUG=y
185CONFIG_BASE_FULL=y
186CONFIG_FUTEX=y
187CONFIG_EPOLL=y
188# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
189CONFIG_SHMEM=y
190CONFIG_CC_ALIGN_FUNCTIONS=0
191CONFIG_CC_ALIGN_LABELS=0
192CONFIG_CC_ALIGN_LOOPS=0
193CONFIG_CC_ALIGN_JUMPS=0
194# CONFIG_TINY_SHMEM is not set
195CONFIG_BASE_SMALL=0
196
197#
198# Loadable module support
199#
200CONFIG_MODULES=y
201CONFIG_MODULE_UNLOAD=y
202# CONFIG_MODULE_FORCE_UNLOAD is not set
203CONFIG_OBSOLETE_MODPARM=y
204CONFIG_MODVERSIONS=y
205CONFIG_MODULE_SRCVERSION_ALL=y
206CONFIG_KMOD=y
207CONFIG_STOP_MACHINE=y
208
209#
210# Block layer
211#
212
213#
214# IO Schedulers
215#
216CONFIG_IOSCHED_NOOP=y
217CONFIG_IOSCHED_AS=y
218CONFIG_IOSCHED_DEADLINE=y
219CONFIG_IOSCHED_CFQ=y
220CONFIG_DEFAULT_AS=y
221# CONFIG_DEFAULT_DEADLINE is not set
222# CONFIG_DEFAULT_CFQ is not set
223# CONFIG_DEFAULT_NOOP is not set
224CONFIG_DEFAULT_IOSCHED="anticipatory"
225
226#
227# Bus options (PCI, PCMCIA, EISA, ISA, TC) 227# Bus options (PCI, PCMCIA, EISA, ISA, TC)
228# 228#
229CONFIG_HW_HAS_PCI=y 229CONFIG_HW_HAS_PCI=y
@@ -318,7 +318,6 @@ CONFIG_TCP_CONG_BIC=y
318# QoS and/or fair queueing 318# QoS and/or fair queueing
319# 319#
320# CONFIG_NET_SCHED is not set 320# CONFIG_NET_SCHED is not set
321# CONFIG_NET_CLS_ROUTE is not set
322 321
323# 322#
324# Network testing 323# Network testing
diff --git a/arch/mips/configs/capcella_defconfig b/arch/mips/configs/capcella_defconfig
index a86cc9d9bdae..5261e29ccf37 100644
--- a/arch/mips/configs/capcella_defconfig
+++ b/arch/mips/configs/capcella_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:04:39 2005 4# Thu Nov 24 01:05:55 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -206,6 +137,75 @@ CONFIG_PREEMPT_NONE=y
206# CONFIG_PREEMPT is not set 137# CONFIG_PREEMPT is not set
207 138
208# 139#
140# Code maturity level options
141#
142CONFIG_EXPERIMENTAL=y
143CONFIG_CLEAN_COMPILE=y
144CONFIG_BROKEN_ON_SMP=y
145CONFIG_INIT_ENV_ARG_LIMIT=32
146
147#
148# General setup
149#
150CONFIG_LOCALVERSION=""
151CONFIG_LOCALVERSION_AUTO=y
152CONFIG_SWAP=y
153CONFIG_SYSVIPC=y
154# CONFIG_POSIX_MQUEUE is not set
155# CONFIG_BSD_PROCESS_ACCT is not set
156CONFIG_SYSCTL=y
157# CONFIG_AUDIT is not set
158CONFIG_HOTPLUG=y
159CONFIG_KOBJECT_UEVENT=y
160# CONFIG_IKCONFIG is not set
161CONFIG_INITRAMFS_SOURCE=""
162CONFIG_EMBEDDED=y
163CONFIG_KALLSYMS=y
164# CONFIG_KALLSYMS_EXTRA_PASS is not set
165CONFIG_PRINTK=y
166CONFIG_BUG=y
167CONFIG_BASE_FULL=y
168CONFIG_FUTEX=y
169CONFIG_EPOLL=y
170# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
171CONFIG_SHMEM=y
172CONFIG_CC_ALIGN_FUNCTIONS=0
173CONFIG_CC_ALIGN_LABELS=0
174CONFIG_CC_ALIGN_LOOPS=0
175CONFIG_CC_ALIGN_JUMPS=0
176# CONFIG_TINY_SHMEM is not set
177CONFIG_BASE_SMALL=0
178
179#
180# Loadable module support
181#
182CONFIG_MODULES=y
183CONFIG_MODULE_UNLOAD=y
184# CONFIG_MODULE_FORCE_UNLOAD is not set
185CONFIG_OBSOLETE_MODPARM=y
186CONFIG_MODVERSIONS=y
187CONFIG_MODULE_SRCVERSION_ALL=y
188CONFIG_KMOD=y
189
190#
191# Block layer
192#
193# CONFIG_LBD is not set
194
195#
196# IO Schedulers
197#
198CONFIG_IOSCHED_NOOP=y
199CONFIG_IOSCHED_AS=y
200CONFIG_IOSCHED_DEADLINE=y
201CONFIG_IOSCHED_CFQ=y
202CONFIG_DEFAULT_AS=y
203# CONFIG_DEFAULT_DEADLINE is not set
204# CONFIG_DEFAULT_CFQ is not set
205# CONFIG_DEFAULT_NOOP is not set
206CONFIG_DEFAULT_IOSCHED="anticipatory"
207
208#
209# Bus options (PCI, PCMCIA, EISA, ISA, TC) 209# Bus options (PCI, PCMCIA, EISA, ISA, TC)
210# 210#
211CONFIG_HW_HAS_PCI=y 211CONFIG_HW_HAS_PCI=y
@@ -294,7 +294,6 @@ CONFIG_TCP_CONG_BIC=y
294# QoS and/or fair queueing 294# QoS and/or fair queueing
295# 295#
296# CONFIG_NET_SCHED is not set 296# CONFIG_NET_SCHED is not set
297# CONFIG_NET_CLS_ROUTE is not set
298 297
299# 298#
300# Network testing 299# Network testing
diff --git a/arch/mips/configs/cobalt_defconfig b/arch/mips/configs/cobalt_defconfig
index 3558c79b0eb7..216f4023a81b 100644
--- a/arch/mips/configs/cobalt_defconfig
+++ b/arch/mips/configs/cobalt_defconfig
@@ -1,74 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:04:42 2005 4# Thu Nov 24 01:05:57 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51# CONFIG_MODULES is not set
52
53#
54# Block layer
55#
56# CONFIG_LBD is not set
57
58#
59# IO Schedulers
60#
61CONFIG_IOSCHED_NOOP=y
62CONFIG_IOSCHED_AS=y
63CONFIG_IOSCHED_DEADLINE=y
64CONFIG_IOSCHED_CFQ=y
65CONFIG_DEFAULT_AS=y
66# CONFIG_DEFAULT_DEADLINE is not set
67# CONFIG_DEFAULT_CFQ is not set
68# CONFIG_DEFAULT_NOOP is not set
69CONFIG_DEFAULT_IOSCHED="anticipatory"
70
71#
72# Machine selection 9# Machine selection
73# 10#
74# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -196,6 +133,69 @@ CONFIG_PREEMPT_NONE=y
196# CONFIG_PREEMPT is not set 133# CONFIG_PREEMPT is not set
197 134
198# 135#
136# Code maturity level options
137#
138CONFIG_EXPERIMENTAL=y
139CONFIG_CLEAN_COMPILE=y
140CONFIG_BROKEN_ON_SMP=y
141CONFIG_INIT_ENV_ARG_LIMIT=32
142
143#
144# General setup
145#
146CONFIG_LOCALVERSION=""
147CONFIG_LOCALVERSION_AUTO=y
148CONFIG_SWAP=y
149CONFIG_SYSVIPC=y
150# CONFIG_POSIX_MQUEUE is not set
151# CONFIG_BSD_PROCESS_ACCT is not set
152CONFIG_SYSCTL=y
153# CONFIG_AUDIT is not set
154CONFIG_HOTPLUG=y
155CONFIG_KOBJECT_UEVENT=y
156# CONFIG_IKCONFIG is not set
157CONFIG_INITRAMFS_SOURCE=""
158CONFIG_EMBEDDED=y
159CONFIG_KALLSYMS=y
160# CONFIG_KALLSYMS_EXTRA_PASS is not set
161CONFIG_PRINTK=y
162CONFIG_BUG=y
163CONFIG_BASE_FULL=y
164CONFIG_FUTEX=y
165CONFIG_EPOLL=y
166# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
167CONFIG_SHMEM=y
168CONFIG_CC_ALIGN_FUNCTIONS=0
169CONFIG_CC_ALIGN_LABELS=0
170CONFIG_CC_ALIGN_LOOPS=0
171CONFIG_CC_ALIGN_JUMPS=0
172# CONFIG_TINY_SHMEM is not set
173CONFIG_BASE_SMALL=0
174
175#
176# Loadable module support
177#
178# CONFIG_MODULES is not set
179
180#
181# Block layer
182#
183# CONFIG_LBD is not set
184
185#
186# IO Schedulers
187#
188CONFIG_IOSCHED_NOOP=y
189CONFIG_IOSCHED_AS=y
190CONFIG_IOSCHED_DEADLINE=y
191CONFIG_IOSCHED_CFQ=y
192CONFIG_DEFAULT_AS=y
193# CONFIG_DEFAULT_DEADLINE is not set
194# CONFIG_DEFAULT_CFQ is not set
195# CONFIG_DEFAULT_NOOP is not set
196CONFIG_DEFAULT_IOSCHED="anticipatory"
197
198#
199# Bus options (PCI, PCMCIA, EISA, ISA, TC) 199# Bus options (PCI, PCMCIA, EISA, ISA, TC)
200# 200#
201CONFIG_HW_HAS_PCI=y 201CONFIG_HW_HAS_PCI=y
@@ -280,7 +280,6 @@ CONFIG_TCP_CONG_BIC=y
280# QoS and/or fair queueing 280# QoS and/or fair queueing
281# 281#
282# CONFIG_NET_SCHED is not set 282# CONFIG_NET_SCHED is not set
283# CONFIG_NET_CLS_ROUTE is not set
284 283
285# 284#
286# Network testing 285# Network testing
diff --git a/arch/mips/configs/db1000_defconfig b/arch/mips/configs/db1000_defconfig
index 3b103fec7b86..18ac7926c058 100644
--- a/arch/mips/configs/db1000_defconfig
+++ b/arch/mips/configs/db1000_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc1 3# Linux kernel version: 2.6.15-rc2
4# Tue Nov 15 11:11:04 2005 4# Thu Nov 24 01:05:59 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -202,6 +133,75 @@ CONFIG_PREEMPT_NONE=y
202# CONFIG_PREEMPT is not set 133# CONFIG_PREEMPT is not set
203 134
204# 135#
136# Code maturity level options
137#
138CONFIG_EXPERIMENTAL=y
139CONFIG_CLEAN_COMPILE=y
140CONFIG_BROKEN_ON_SMP=y
141CONFIG_INIT_ENV_ARG_LIMIT=32
142
143#
144# General setup
145#
146CONFIG_LOCALVERSION=""
147CONFIG_LOCALVERSION_AUTO=y
148CONFIG_SWAP=y
149CONFIG_SYSVIPC=y
150# CONFIG_POSIX_MQUEUE is not set
151# CONFIG_BSD_PROCESS_ACCT is not set
152CONFIG_SYSCTL=y
153# CONFIG_AUDIT is not set
154CONFIG_HOTPLUG=y
155CONFIG_KOBJECT_UEVENT=y
156# CONFIG_IKCONFIG is not set
157CONFIG_INITRAMFS_SOURCE=""
158CONFIG_EMBEDDED=y
159CONFIG_KALLSYMS=y
160# CONFIG_KALLSYMS_EXTRA_PASS is not set
161CONFIG_PRINTK=y
162CONFIG_BUG=y
163CONFIG_BASE_FULL=y
164CONFIG_FUTEX=y
165CONFIG_EPOLL=y
166# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
167CONFIG_SHMEM=y
168CONFIG_CC_ALIGN_FUNCTIONS=0
169CONFIG_CC_ALIGN_LABELS=0
170CONFIG_CC_ALIGN_LOOPS=0
171CONFIG_CC_ALIGN_JUMPS=0
172# CONFIG_TINY_SHMEM is not set
173CONFIG_BASE_SMALL=0
174
175#
176# Loadable module support
177#
178CONFIG_MODULES=y
179CONFIG_MODULE_UNLOAD=y
180# CONFIG_MODULE_FORCE_UNLOAD is not set
181CONFIG_OBSOLETE_MODPARM=y
182CONFIG_MODVERSIONS=y
183CONFIG_MODULE_SRCVERSION_ALL=y
184CONFIG_KMOD=y
185
186#
187# Block layer
188#
189# CONFIG_LBD is not set
190
191#
192# IO Schedulers
193#
194CONFIG_IOSCHED_NOOP=y
195CONFIG_IOSCHED_AS=y
196CONFIG_IOSCHED_DEADLINE=y
197CONFIG_IOSCHED_CFQ=y
198CONFIG_DEFAULT_AS=y
199# CONFIG_DEFAULT_DEADLINE is not set
200# CONFIG_DEFAULT_CFQ is not set
201# CONFIG_DEFAULT_NOOP is not set
202CONFIG_DEFAULT_IOSCHED="anticipatory"
203
204#
205# Bus options (PCI, PCMCIA, EISA, ISA, TC) 205# Bus options (PCI, PCMCIA, EISA, ISA, TC)
206# 206#
207CONFIG_HW_HAS_PCI=y 207CONFIG_HW_HAS_PCI=y
@@ -320,7 +320,6 @@ CONFIG_NETFILTER_NETLINK_LOG=m
320# QoS and/or fair queueing 320# QoS and/or fair queueing
321# 321#
322# CONFIG_NET_SCHED is not set 322# CONFIG_NET_SCHED is not set
323# CONFIG_NET_CLS_ROUTE is not set
324 323
325# 324#
326# Network testing 325# Network testing
@@ -668,6 +667,7 @@ CONFIG_SYNCLINK_CS=m
668# 667#
669# TPM devices 668# TPM devices
670# 669#
670# CONFIG_TCG_TPM is not set
671# CONFIG_TELCLOCK is not set 671# CONFIG_TELCLOCK is not set
672 672
673# 673#
diff --git a/arch/mips/configs/db1100_defconfig b/arch/mips/configs/db1100_defconfig
index 79cdd940c6a8..4f55f7414c9c 100644
--- a/arch/mips/configs/db1100_defconfig
+++ b/arch/mips/configs/db1100_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc1 3# Linux kernel version: 2.6.15-rc2
4# Tue Nov 15 11:11:07 2005 4# Thu Nov 24 01:06:00 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -202,6 +133,75 @@ CONFIG_PREEMPT_NONE=y
202# CONFIG_PREEMPT is not set 133# CONFIG_PREEMPT is not set
203 134
204# 135#
136# Code maturity level options
137#
138CONFIG_EXPERIMENTAL=y
139CONFIG_CLEAN_COMPILE=y
140CONFIG_BROKEN_ON_SMP=y
141CONFIG_INIT_ENV_ARG_LIMIT=32
142
143#
144# General setup
145#
146CONFIG_LOCALVERSION=""
147CONFIG_LOCALVERSION_AUTO=y
148CONFIG_SWAP=y
149CONFIG_SYSVIPC=y
150# CONFIG_POSIX_MQUEUE is not set
151# CONFIG_BSD_PROCESS_ACCT is not set
152CONFIG_SYSCTL=y
153# CONFIG_AUDIT is not set
154CONFIG_HOTPLUG=y
155CONFIG_KOBJECT_UEVENT=y
156# CONFIG_IKCONFIG is not set
157CONFIG_INITRAMFS_SOURCE=""
158CONFIG_EMBEDDED=y
159CONFIG_KALLSYMS=y
160# CONFIG_KALLSYMS_EXTRA_PASS is not set
161CONFIG_PRINTK=y
162CONFIG_BUG=y
163CONFIG_BASE_FULL=y
164CONFIG_FUTEX=y
165CONFIG_EPOLL=y
166# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
167CONFIG_SHMEM=y
168CONFIG_CC_ALIGN_FUNCTIONS=0
169CONFIG_CC_ALIGN_LABELS=0
170CONFIG_CC_ALIGN_LOOPS=0
171CONFIG_CC_ALIGN_JUMPS=0
172# CONFIG_TINY_SHMEM is not set
173CONFIG_BASE_SMALL=0
174
175#
176# Loadable module support
177#
178CONFIG_MODULES=y
179CONFIG_MODULE_UNLOAD=y
180# CONFIG_MODULE_FORCE_UNLOAD is not set
181CONFIG_OBSOLETE_MODPARM=y
182CONFIG_MODVERSIONS=y
183CONFIG_MODULE_SRCVERSION_ALL=y
184CONFIG_KMOD=y
185
186#
187# Block layer
188#
189# CONFIG_LBD is not set
190
191#
192# IO Schedulers
193#
194CONFIG_IOSCHED_NOOP=y
195CONFIG_IOSCHED_AS=y
196CONFIG_IOSCHED_DEADLINE=y
197CONFIG_IOSCHED_CFQ=y
198CONFIG_DEFAULT_AS=y
199# CONFIG_DEFAULT_DEADLINE is not set
200# CONFIG_DEFAULT_CFQ is not set
201# CONFIG_DEFAULT_NOOP is not set
202CONFIG_DEFAULT_IOSCHED="anticipatory"
203
204#
205# Bus options (PCI, PCMCIA, EISA, ISA, TC) 205# Bus options (PCI, PCMCIA, EISA, ISA, TC)
206# 206#
207CONFIG_MMU=y 207CONFIG_MMU=y
@@ -309,7 +309,6 @@ CONFIG_NETFILTER_NETLINK_LOG=m
309# QoS and/or fair queueing 309# QoS and/or fair queueing
310# 310#
311# CONFIG_NET_SCHED is not set 311# CONFIG_NET_SCHED is not set
312# CONFIG_NET_CLS_ROUTE is not set
313 312
314# 313#
315# Network testing 314# Network testing
@@ -636,6 +635,7 @@ CONFIG_LEGACY_PTY_COUNT=256
636# 635#
637# TPM devices 636# TPM devices
638# 637#
638# CONFIG_TCG_TPM is not set
639# CONFIG_TELCLOCK is not set 639# CONFIG_TELCLOCK is not set
640 640
641# 641#
diff --git a/arch/mips/configs/db1200_defconfig b/arch/mips/configs/db1200_defconfig
index b6bad69398e1..0e5de7d05f23 100644
--- a/arch/mips/configs/db1200_defconfig
+++ b/arch/mips/configs/db1200_defconfig
@@ -1,81 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc1 3# Linux kernel version: 2.6.15-rc2
4# Tue Nov 15 11:11:10 2005 4# Thu Nov 24 01:06:03 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29CONFIG_IKCONFIG=y
30CONFIG_IKCONFIG_PROC=y
31CONFIG_INITRAMFS_SOURCE=""
32CONFIG_EMBEDDED=y
33CONFIG_KALLSYMS=y
34# CONFIG_KALLSYMS_EXTRA_PASS is not set
35CONFIG_PRINTK=y
36CONFIG_BUG=y
37CONFIG_BASE_FULL=y
38CONFIG_FUTEX=y
39CONFIG_EPOLL=y
40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
41CONFIG_SHMEM=y
42CONFIG_CC_ALIGN_FUNCTIONS=0
43CONFIG_CC_ALIGN_LABELS=0
44CONFIG_CC_ALIGN_LOOPS=0
45CONFIG_CC_ALIGN_JUMPS=0
46# CONFIG_TINY_SHMEM is not set
47CONFIG_BASE_SMALL=0
48
49#
50# Loadable module support
51#
52CONFIG_MODULES=y
53CONFIG_MODULE_UNLOAD=y
54# CONFIG_MODULE_FORCE_UNLOAD is not set
55CONFIG_OBSOLETE_MODPARM=y
56CONFIG_MODVERSIONS=y
57CONFIG_MODULE_SRCVERSION_ALL=y
58CONFIG_KMOD=y
59
60#
61# Block layer
62#
63# CONFIG_LBD is not set
64
65#
66# IO Schedulers
67#
68CONFIG_IOSCHED_NOOP=y
69CONFIG_IOSCHED_AS=y
70CONFIG_IOSCHED_DEADLINE=y
71CONFIG_IOSCHED_CFQ=y
72CONFIG_DEFAULT_AS=y
73# CONFIG_DEFAULT_DEADLINE is not set
74# CONFIG_DEFAULT_CFQ is not set
75# CONFIG_DEFAULT_NOOP is not set
76CONFIG_DEFAULT_IOSCHED="anticipatory"
77
78#
79# Machine selection 9# Machine selection
80# 10#
81# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -203,6 +133,76 @@ CONFIG_PREEMPT_NONE=y
203# CONFIG_PREEMPT is not set 133# CONFIG_PREEMPT is not set
204 134
205# 135#
136# Code maturity level options
137#
138CONFIG_EXPERIMENTAL=y
139CONFIG_CLEAN_COMPILE=y
140CONFIG_BROKEN_ON_SMP=y
141CONFIG_INIT_ENV_ARG_LIMIT=32
142
143#
144# General setup
145#
146CONFIG_LOCALVERSION=""
147CONFIG_LOCALVERSION_AUTO=y
148CONFIG_SWAP=y
149CONFIG_SYSVIPC=y
150# CONFIG_POSIX_MQUEUE is not set
151# CONFIG_BSD_PROCESS_ACCT is not set
152CONFIG_SYSCTL=y
153# CONFIG_AUDIT is not set
154CONFIG_HOTPLUG=y
155CONFIG_KOBJECT_UEVENT=y
156CONFIG_IKCONFIG=y
157CONFIG_IKCONFIG_PROC=y
158CONFIG_INITRAMFS_SOURCE=""
159CONFIG_EMBEDDED=y
160CONFIG_KALLSYMS=y
161# CONFIG_KALLSYMS_EXTRA_PASS is not set
162CONFIG_PRINTK=y
163CONFIG_BUG=y
164CONFIG_BASE_FULL=y
165CONFIG_FUTEX=y
166CONFIG_EPOLL=y
167# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
168CONFIG_SHMEM=y
169CONFIG_CC_ALIGN_FUNCTIONS=0
170CONFIG_CC_ALIGN_LABELS=0
171CONFIG_CC_ALIGN_LOOPS=0
172CONFIG_CC_ALIGN_JUMPS=0
173# CONFIG_TINY_SHMEM is not set
174CONFIG_BASE_SMALL=0
175
176#
177# Loadable module support
178#
179CONFIG_MODULES=y
180CONFIG_MODULE_UNLOAD=y
181# CONFIG_MODULE_FORCE_UNLOAD is not set
182CONFIG_OBSOLETE_MODPARM=y
183CONFIG_MODVERSIONS=y
184CONFIG_MODULE_SRCVERSION_ALL=y
185CONFIG_KMOD=y
186
187#
188# Block layer
189#
190# CONFIG_LBD is not set
191
192#
193# IO Schedulers
194#
195CONFIG_IOSCHED_NOOP=y
196CONFIG_IOSCHED_AS=y
197CONFIG_IOSCHED_DEADLINE=y
198CONFIG_IOSCHED_CFQ=y
199CONFIG_DEFAULT_AS=y
200# CONFIG_DEFAULT_DEADLINE is not set
201# CONFIG_DEFAULT_CFQ is not set
202# CONFIG_DEFAULT_NOOP is not set
203CONFIG_DEFAULT_IOSCHED="anticipatory"
204
205#
206# Bus options (PCI, PCMCIA, EISA, ISA, TC) 206# Bus options (PCI, PCMCIA, EISA, ISA, TC)
207# 207#
208CONFIG_MMU=y 208CONFIG_MMU=y
@@ -314,7 +314,6 @@ CONFIG_NETFILTER=y
314# QoS and/or fair queueing 314# QoS and/or fair queueing
315# 315#
316# CONFIG_NET_SCHED is not set 316# CONFIG_NET_SCHED is not set
317# CONFIG_NET_CLS_ROUTE is not set
318 317
319# 318#
320# Network testing 319# Network testing
@@ -475,7 +474,6 @@ CONFIG_IDE_GENERIC=y
475CONFIG_BLK_DEV_IDE_AU1XXX=y 474CONFIG_BLK_DEV_IDE_AU1XXX=y
476CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA=y 475CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA=y
477# CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA is not set 476# CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA is not set
478# CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON is not set
479CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ=128 477CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ=128
480# CONFIG_IDE_ARM is not set 478# CONFIG_IDE_ARM is not set
481# CONFIG_BLK_DEV_IDEDMA is not set 479# CONFIG_BLK_DEV_IDEDMA is not set
@@ -709,6 +707,7 @@ CONFIG_LEGACY_PTY_COUNT=256
709# 707#
710# TPM devices 708# TPM devices
711# 709#
710# CONFIG_TCG_TPM is not set
712# CONFIG_TELCLOCK is not set 711# CONFIG_TELCLOCK is not set
713 712
714# 713#
diff --git a/arch/mips/configs/db1500_defconfig b/arch/mips/configs/db1500_defconfig
index dbaf189fc9c0..86e7be8412f3 100644
--- a/arch/mips/configs/db1500_defconfig
+++ b/arch/mips/configs/db1500_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc1 3# Linux kernel version: 2.6.15-rc2
4# Tue Nov 15 11:11:15 2005 4# Thu Nov 24 01:06:05 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -204,6 +135,75 @@ CONFIG_PREEMPT_NONE=y
204# CONFIG_PREEMPT is not set 135# CONFIG_PREEMPT is not set
205 136
206# 137#
138# Code maturity level options
139#
140CONFIG_EXPERIMENTAL=y
141CONFIG_CLEAN_COMPILE=y
142CONFIG_BROKEN_ON_SMP=y
143CONFIG_INIT_ENV_ARG_LIMIT=32
144
145#
146# General setup
147#
148CONFIG_LOCALVERSION=""
149CONFIG_LOCALVERSION_AUTO=y
150CONFIG_SWAP=y
151CONFIG_SYSVIPC=y
152# CONFIG_POSIX_MQUEUE is not set
153# CONFIG_BSD_PROCESS_ACCT is not set
154CONFIG_SYSCTL=y
155# CONFIG_AUDIT is not set
156CONFIG_HOTPLUG=y
157CONFIG_KOBJECT_UEVENT=y
158# CONFIG_IKCONFIG is not set
159CONFIG_INITRAMFS_SOURCE=""
160CONFIG_EMBEDDED=y
161CONFIG_KALLSYMS=y
162# CONFIG_KALLSYMS_EXTRA_PASS is not set
163CONFIG_PRINTK=y
164CONFIG_BUG=y
165CONFIG_BASE_FULL=y
166CONFIG_FUTEX=y
167CONFIG_EPOLL=y
168# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
169CONFIG_SHMEM=y
170CONFIG_CC_ALIGN_FUNCTIONS=0
171CONFIG_CC_ALIGN_LABELS=0
172CONFIG_CC_ALIGN_LOOPS=0
173CONFIG_CC_ALIGN_JUMPS=0
174# CONFIG_TINY_SHMEM is not set
175CONFIG_BASE_SMALL=0
176
177#
178# Loadable module support
179#
180CONFIG_MODULES=y
181CONFIG_MODULE_UNLOAD=y
182# CONFIG_MODULE_FORCE_UNLOAD is not set
183CONFIG_OBSOLETE_MODPARM=y
184CONFIG_MODVERSIONS=y
185CONFIG_MODULE_SRCVERSION_ALL=y
186CONFIG_KMOD=y
187
188#
189# Block layer
190#
191# CONFIG_LBD is not set
192
193#
194# IO Schedulers
195#
196CONFIG_IOSCHED_NOOP=y
197CONFIG_IOSCHED_AS=y
198CONFIG_IOSCHED_DEADLINE=y
199CONFIG_IOSCHED_CFQ=y
200CONFIG_DEFAULT_AS=y
201# CONFIG_DEFAULT_DEADLINE is not set
202# CONFIG_DEFAULT_CFQ is not set
203# CONFIG_DEFAULT_NOOP is not set
204CONFIG_DEFAULT_IOSCHED="anticipatory"
205
206#
207# Bus options (PCI, PCMCIA, EISA, ISA, TC) 207# Bus options (PCI, PCMCIA, EISA, ISA, TC)
208# 208#
209CONFIG_HW_HAS_PCI=y 209CONFIG_HW_HAS_PCI=y
@@ -328,7 +328,6 @@ CONFIG_NETFILTER_NETLINK_LOG=m
328# QoS and/or fair queueing 328# QoS and/or fair queueing
329# 329#
330# CONFIG_NET_SCHED is not set 330# CONFIG_NET_SCHED is not set
331# CONFIG_NET_CLS_ROUTE is not set
332 331
333# 332#
334# Network testing 333# Network testing
diff --git a/arch/mips/configs/db1550_defconfig b/arch/mips/configs/db1550_defconfig
index 59c1ef214fc0..ea5ab0ca5774 100644
--- a/arch/mips/configs/db1550_defconfig
+++ b/arch/mips/configs/db1550_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc1 3# Linux kernel version: 2.6.15-rc2
4# Tue Nov 15 11:11:18 2005 4# Thu Nov 24 01:06:07 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -203,6 +134,75 @@ CONFIG_PREEMPT_NONE=y
203# CONFIG_PREEMPT is not set 134# CONFIG_PREEMPT is not set
204 135
205# 136#
137# Code maturity level options
138#
139CONFIG_EXPERIMENTAL=y
140CONFIG_CLEAN_COMPILE=y
141CONFIG_BROKEN_ON_SMP=y
142CONFIG_INIT_ENV_ARG_LIMIT=32
143
144#
145# General setup
146#
147CONFIG_LOCALVERSION=""
148CONFIG_LOCALVERSION_AUTO=y
149CONFIG_SWAP=y
150CONFIG_SYSVIPC=y
151# CONFIG_POSIX_MQUEUE is not set
152# CONFIG_BSD_PROCESS_ACCT is not set
153CONFIG_SYSCTL=y
154# CONFIG_AUDIT is not set
155CONFIG_HOTPLUG=y
156CONFIG_KOBJECT_UEVENT=y
157# CONFIG_IKCONFIG is not set
158CONFIG_INITRAMFS_SOURCE=""
159CONFIG_EMBEDDED=y
160CONFIG_KALLSYMS=y
161# CONFIG_KALLSYMS_EXTRA_PASS is not set
162CONFIG_PRINTK=y
163CONFIG_BUG=y
164CONFIG_BASE_FULL=y
165CONFIG_FUTEX=y
166CONFIG_EPOLL=y
167# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
168CONFIG_SHMEM=y
169CONFIG_CC_ALIGN_FUNCTIONS=0
170CONFIG_CC_ALIGN_LABELS=0
171CONFIG_CC_ALIGN_LOOPS=0
172CONFIG_CC_ALIGN_JUMPS=0
173# CONFIG_TINY_SHMEM is not set
174CONFIG_BASE_SMALL=0
175
176#
177# Loadable module support
178#
179CONFIG_MODULES=y
180CONFIG_MODULE_UNLOAD=y
181# CONFIG_MODULE_FORCE_UNLOAD is not set
182CONFIG_OBSOLETE_MODPARM=y
183CONFIG_MODVERSIONS=y
184CONFIG_MODULE_SRCVERSION_ALL=y
185CONFIG_KMOD=y
186
187#
188# Block layer
189#
190# CONFIG_LBD is not set
191
192#
193# IO Schedulers
194#
195CONFIG_IOSCHED_NOOP=y
196CONFIG_IOSCHED_AS=y
197CONFIG_IOSCHED_DEADLINE=y
198CONFIG_IOSCHED_CFQ=y
199CONFIG_DEFAULT_AS=y
200# CONFIG_DEFAULT_DEADLINE is not set
201# CONFIG_DEFAULT_CFQ is not set
202# CONFIG_DEFAULT_NOOP is not set
203CONFIG_DEFAULT_IOSCHED="anticipatory"
204
205#
206# Bus options (PCI, PCMCIA, EISA, ISA, TC) 206# Bus options (PCI, PCMCIA, EISA, ISA, TC)
207# 207#
208CONFIG_HW_HAS_PCI=y 208CONFIG_HW_HAS_PCI=y
@@ -327,7 +327,6 @@ CONFIG_NETFILTER_NETLINK_LOG=m
327# QoS and/or fair queueing 327# QoS and/or fair queueing
328# 328#
329# CONFIG_NET_SCHED is not set 329# CONFIG_NET_SCHED is not set
330# CONFIG_NET_CLS_ROUTE is not set
331 330
332# 331#
333# Network testing 332# Network testing
diff --git a/arch/mips/configs/ddb5476_defconfig b/arch/mips/configs/ddb5476_defconfig
index 4ba29e612bdf..bea00a9e9269 100644
--- a/arch/mips/configs/ddb5476_defconfig
+++ b/arch/mips/configs/ddb5476_defconfig
@@ -1,74 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:05:04 2005 4# Thu Nov 24 01:06:09 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51# CONFIG_MODULES is not set
52
53#
54# Block layer
55#
56# CONFIG_LBD is not set
57
58#
59# IO Schedulers
60#
61CONFIG_IOSCHED_NOOP=y
62CONFIG_IOSCHED_AS=y
63CONFIG_IOSCHED_DEADLINE=y
64CONFIG_IOSCHED_CFQ=y
65CONFIG_DEFAULT_AS=y
66# CONFIG_DEFAULT_DEADLINE is not set
67# CONFIG_DEFAULT_CFQ is not set
68# CONFIG_DEFAULT_NOOP is not set
69CONFIG_DEFAULT_IOSCHED="anticipatory"
70
71#
72# Machine selection 9# Machine selection
73# 10#
74# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -197,6 +134,69 @@ CONFIG_PREEMPT_NONE=y
197# CONFIG_PREEMPT is not set 134# CONFIG_PREEMPT is not set
198 135
199# 136#
137# Code maturity level options
138#
139CONFIG_EXPERIMENTAL=y
140CONFIG_CLEAN_COMPILE=y
141CONFIG_BROKEN_ON_SMP=y
142CONFIG_INIT_ENV_ARG_LIMIT=32
143
144#
145# General setup
146#
147CONFIG_LOCALVERSION=""
148CONFIG_LOCALVERSION_AUTO=y
149CONFIG_SWAP=y
150CONFIG_SYSVIPC=y
151# CONFIG_POSIX_MQUEUE is not set
152# CONFIG_BSD_PROCESS_ACCT is not set
153CONFIG_SYSCTL=y
154# CONFIG_AUDIT is not set
155CONFIG_HOTPLUG=y
156CONFIG_KOBJECT_UEVENT=y
157# CONFIG_IKCONFIG is not set
158CONFIG_INITRAMFS_SOURCE=""
159CONFIG_EMBEDDED=y
160CONFIG_KALLSYMS=y
161# CONFIG_KALLSYMS_EXTRA_PASS is not set
162CONFIG_PRINTK=y
163CONFIG_BUG=y
164CONFIG_BASE_FULL=y
165CONFIG_FUTEX=y
166CONFIG_EPOLL=y
167# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
168CONFIG_SHMEM=y
169CONFIG_CC_ALIGN_FUNCTIONS=0
170CONFIG_CC_ALIGN_LABELS=0
171CONFIG_CC_ALIGN_LOOPS=0
172CONFIG_CC_ALIGN_JUMPS=0
173# CONFIG_TINY_SHMEM is not set
174CONFIG_BASE_SMALL=0
175
176#
177# Loadable module support
178#
179# CONFIG_MODULES is not set
180
181#
182# Block layer
183#
184# CONFIG_LBD is not set
185
186#
187# IO Schedulers
188#
189CONFIG_IOSCHED_NOOP=y
190CONFIG_IOSCHED_AS=y
191CONFIG_IOSCHED_DEADLINE=y
192CONFIG_IOSCHED_CFQ=y
193CONFIG_DEFAULT_AS=y
194# CONFIG_DEFAULT_DEADLINE is not set
195# CONFIG_DEFAULT_CFQ is not set
196# CONFIG_DEFAULT_NOOP is not set
197CONFIG_DEFAULT_IOSCHED="anticipatory"
198
199#
200# Bus options (PCI, PCMCIA, EISA, ISA, TC) 200# Bus options (PCI, PCMCIA, EISA, ISA, TC)
201# 201#
202CONFIG_HW_HAS_PCI=y 202CONFIG_HW_HAS_PCI=y
@@ -285,7 +285,6 @@ CONFIG_TCP_CONG_BIC=y
285# QoS and/or fair queueing 285# QoS and/or fair queueing
286# 286#
287# CONFIG_NET_SCHED is not set 287# CONFIG_NET_SCHED is not set
288# CONFIG_NET_CLS_ROUTE is not set
289 288
290# 289#
291# Network testing 290# Network testing
diff --git a/arch/mips/configs/ddb5477_defconfig b/arch/mips/configs/ddb5477_defconfig
index ea4e9046bbee..61f7171ca7ed 100644
--- a/arch/mips/configs/ddb5477_defconfig
+++ b/arch/mips/configs/ddb5477_defconfig
@@ -1,74 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:05:08 2005 4# Thu Nov 24 01:06:11 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51# CONFIG_MODULES is not set
52
53#
54# Block layer
55#
56# CONFIG_LBD is not set
57
58#
59# IO Schedulers
60#
61CONFIG_IOSCHED_NOOP=y
62CONFIG_IOSCHED_AS=y
63CONFIG_IOSCHED_DEADLINE=y
64CONFIG_IOSCHED_CFQ=y
65CONFIG_DEFAULT_AS=y
66# CONFIG_DEFAULT_DEADLINE is not set
67# CONFIG_DEFAULT_CFQ is not set
68# CONFIG_DEFAULT_NOOP is not set
69CONFIG_DEFAULT_IOSCHED="anticipatory"
70
71#
72# Machine selection 9# Machine selection
73# 10#
74# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -197,6 +134,69 @@ CONFIG_PREEMPT_NONE=y
197# CONFIG_PREEMPT is not set 134# CONFIG_PREEMPT is not set
198 135
199# 136#
137# Code maturity level options
138#
139CONFIG_EXPERIMENTAL=y
140CONFIG_CLEAN_COMPILE=y
141CONFIG_BROKEN_ON_SMP=y
142CONFIG_INIT_ENV_ARG_LIMIT=32
143
144#
145# General setup
146#
147CONFIG_LOCALVERSION=""
148CONFIG_LOCALVERSION_AUTO=y
149CONFIG_SWAP=y
150CONFIG_SYSVIPC=y
151# CONFIG_POSIX_MQUEUE is not set
152# CONFIG_BSD_PROCESS_ACCT is not set
153CONFIG_SYSCTL=y
154# CONFIG_AUDIT is not set
155CONFIG_HOTPLUG=y
156CONFIG_KOBJECT_UEVENT=y
157# CONFIG_IKCONFIG is not set
158CONFIG_INITRAMFS_SOURCE=""
159CONFIG_EMBEDDED=y
160CONFIG_KALLSYMS=y
161# CONFIG_KALLSYMS_EXTRA_PASS is not set
162CONFIG_PRINTK=y
163CONFIG_BUG=y
164CONFIG_BASE_FULL=y
165CONFIG_FUTEX=y
166CONFIG_EPOLL=y
167# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
168CONFIG_SHMEM=y
169CONFIG_CC_ALIGN_FUNCTIONS=0
170CONFIG_CC_ALIGN_LABELS=0
171CONFIG_CC_ALIGN_LOOPS=0
172CONFIG_CC_ALIGN_JUMPS=0
173# CONFIG_TINY_SHMEM is not set
174CONFIG_BASE_SMALL=0
175
176#
177# Loadable module support
178#
179# CONFIG_MODULES is not set
180
181#
182# Block layer
183#
184# CONFIG_LBD is not set
185
186#
187# IO Schedulers
188#
189CONFIG_IOSCHED_NOOP=y
190CONFIG_IOSCHED_AS=y
191CONFIG_IOSCHED_DEADLINE=y
192CONFIG_IOSCHED_CFQ=y
193CONFIG_DEFAULT_AS=y
194# CONFIG_DEFAULT_DEADLINE is not set
195# CONFIG_DEFAULT_CFQ is not set
196# CONFIG_DEFAULT_NOOP is not set
197CONFIG_DEFAULT_IOSCHED="anticipatory"
198
199#
200# Bus options (PCI, PCMCIA, EISA, ISA, TC) 200# Bus options (PCI, PCMCIA, EISA, ISA, TC)
201# 201#
202CONFIG_HW_HAS_PCI=y 202CONFIG_HW_HAS_PCI=y
@@ -284,7 +284,6 @@ CONFIG_TCP_CONG_BIC=y
284# QoS and/or fair queueing 284# QoS and/or fair queueing
285# 285#
286# CONFIG_NET_SCHED is not set 286# CONFIG_NET_SCHED is not set
287# CONFIG_NET_CLS_ROUTE is not set
288 287
289# 288#
290# Network testing 289# Network testing
diff --git a/arch/mips/configs/decstation_defconfig b/arch/mips/configs/decstation_defconfig
index 1ac6c9b7ef96..08a4de6ec4a6 100644
--- a/arch/mips/configs/decstation_defconfig
+++ b/arch/mips/configs/decstation_defconfig
@@ -1,81 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Fri Nov 11 13:29:30 2005 4# Thu Nov 24 01:06:13 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27# CONFIG_HOTPLUG is not set
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_ALL is not set
34# CONFIG_KALLSYMS_EXTRA_PASS is not set
35CONFIG_PRINTK=y
36CONFIG_BUG=y
37CONFIG_BASE_FULL=y
38CONFIG_FUTEX=y
39CONFIG_EPOLL=y
40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
41CONFIG_SHMEM=y
42CONFIG_CC_ALIGN_FUNCTIONS=0
43CONFIG_CC_ALIGN_LABELS=0
44CONFIG_CC_ALIGN_LOOPS=0
45CONFIG_CC_ALIGN_JUMPS=0
46# CONFIG_TINY_SHMEM is not set
47CONFIG_BASE_SMALL=0
48
49#
50# Loadable module support
51#
52CONFIG_MODULES=y
53CONFIG_MODULE_UNLOAD=y
54# CONFIG_MODULE_FORCE_UNLOAD is not set
55CONFIG_OBSOLETE_MODPARM=y
56# CONFIG_MODVERSIONS is not set
57CONFIG_MODULE_SRCVERSION_ALL=y
58CONFIG_KMOD=y
59
60#
61# Block layer
62#
63# CONFIG_LBD is not set
64
65#
66# IO Schedulers
67#
68CONFIG_IOSCHED_NOOP=y
69CONFIG_IOSCHED_AS=y
70CONFIG_IOSCHED_DEADLINE=y
71CONFIG_IOSCHED_CFQ=y
72CONFIG_DEFAULT_AS=y
73# CONFIG_DEFAULT_DEADLINE is not set
74# CONFIG_DEFAULT_CFQ is not set
75# CONFIG_DEFAULT_NOOP is not set
76CONFIG_DEFAULT_IOSCHED="anticipatory"
77
78#
79# Machine selection 9# Machine selection
80# 10#
81# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -202,6 +132,76 @@ CONFIG_PREEMPT_NONE=y
202# CONFIG_PREEMPT is not set 132# CONFIG_PREEMPT is not set
203 133
204# 134#
135# Code maturity level options
136#
137CONFIG_EXPERIMENTAL=y
138CONFIG_CLEAN_COMPILE=y
139CONFIG_BROKEN_ON_SMP=y
140CONFIG_INIT_ENV_ARG_LIMIT=32
141
142#
143# General setup
144#
145CONFIG_LOCALVERSION=""
146CONFIG_LOCALVERSION_AUTO=y
147CONFIG_SWAP=y
148CONFIG_SYSVIPC=y
149# CONFIG_POSIX_MQUEUE is not set
150# CONFIG_BSD_PROCESS_ACCT is not set
151CONFIG_SYSCTL=y
152# CONFIG_AUDIT is not set
153# CONFIG_HOTPLUG is not set
154CONFIG_KOBJECT_UEVENT=y
155# CONFIG_IKCONFIG is not set
156CONFIG_INITRAMFS_SOURCE=""
157CONFIG_EMBEDDED=y
158CONFIG_KALLSYMS=y
159# CONFIG_KALLSYMS_ALL is not set
160# CONFIG_KALLSYMS_EXTRA_PASS is not set
161CONFIG_PRINTK=y
162CONFIG_BUG=y
163CONFIG_BASE_FULL=y
164CONFIG_FUTEX=y
165CONFIG_EPOLL=y
166# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
167CONFIG_SHMEM=y
168CONFIG_CC_ALIGN_FUNCTIONS=0
169CONFIG_CC_ALIGN_LABELS=0
170CONFIG_CC_ALIGN_LOOPS=0
171CONFIG_CC_ALIGN_JUMPS=0
172# CONFIG_TINY_SHMEM is not set
173CONFIG_BASE_SMALL=0
174
175#
176# Loadable module support
177#
178CONFIG_MODULES=y
179CONFIG_MODULE_UNLOAD=y
180# CONFIG_MODULE_FORCE_UNLOAD is not set
181CONFIG_OBSOLETE_MODPARM=y
182# CONFIG_MODVERSIONS is not set
183CONFIG_MODULE_SRCVERSION_ALL=y
184CONFIG_KMOD=y
185
186#
187# Block layer
188#
189# CONFIG_LBD is not set
190
191#
192# IO Schedulers
193#
194CONFIG_IOSCHED_NOOP=y
195CONFIG_IOSCHED_AS=y
196CONFIG_IOSCHED_DEADLINE=y
197CONFIG_IOSCHED_CFQ=y
198CONFIG_DEFAULT_AS=y
199# CONFIG_DEFAULT_DEADLINE is not set
200# CONFIG_DEFAULT_CFQ is not set
201# CONFIG_DEFAULT_NOOP is not set
202CONFIG_DEFAULT_IOSCHED="anticipatory"
203
204#
205# Bus options (PCI, PCMCIA, EISA, ISA, TC) 205# Bus options (PCI, PCMCIA, EISA, ISA, TC)
206# 206#
207CONFIG_TC=y 207CONFIG_TC=y
@@ -286,7 +286,6 @@ CONFIG_TCP_CONG_BIC=y
286# QoS and/or fair queueing 286# QoS and/or fair queueing
287# 287#
288# CONFIG_NET_SCHED is not set 288# CONFIG_NET_SCHED is not set
289# CONFIG_NET_CLS_ROUTE is not set
290 289
291# 290#
292# Network testing 291# Network testing
@@ -531,6 +530,7 @@ CONFIG_RTC=y
531# 530#
532# TPM devices 531# TPM devices
533# 532#
533# CONFIG_TCG_TPM is not set
534# CONFIG_TELCLOCK is not set 534# CONFIG_TELCLOCK is not set
535 535
536# 536#
diff --git a/arch/mips/configs/e55_defconfig b/arch/mips/configs/e55_defconfig
index a89d2f66cdfa..c9070cef08b1 100644
--- a/arch/mips/configs/e55_defconfig
+++ b/arch/mips/configs/e55_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:05:15 2005 4# Thu Nov 24 01:06:14 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27# CONFIG_HOTPLUG is not set
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -204,6 +135,75 @@ CONFIG_PREEMPT_NONE=y
204# CONFIG_PREEMPT is not set 135# CONFIG_PREEMPT is not set
205 136
206# 137#
138# Code maturity level options
139#
140CONFIG_EXPERIMENTAL=y
141CONFIG_CLEAN_COMPILE=y
142CONFIG_BROKEN_ON_SMP=y
143CONFIG_INIT_ENV_ARG_LIMIT=32
144
145#
146# General setup
147#
148CONFIG_LOCALVERSION=""
149CONFIG_LOCALVERSION_AUTO=y
150CONFIG_SWAP=y
151CONFIG_SYSVIPC=y
152# CONFIG_POSIX_MQUEUE is not set
153# CONFIG_BSD_PROCESS_ACCT is not set
154CONFIG_SYSCTL=y
155# CONFIG_AUDIT is not set
156# CONFIG_HOTPLUG is not set
157CONFIG_KOBJECT_UEVENT=y
158# CONFIG_IKCONFIG is not set
159CONFIG_INITRAMFS_SOURCE=""
160CONFIG_EMBEDDED=y
161CONFIG_KALLSYMS=y
162# CONFIG_KALLSYMS_EXTRA_PASS is not set
163CONFIG_PRINTK=y
164CONFIG_BUG=y
165CONFIG_BASE_FULL=y
166CONFIG_FUTEX=y
167CONFIG_EPOLL=y
168# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
169CONFIG_SHMEM=y
170CONFIG_CC_ALIGN_FUNCTIONS=0
171CONFIG_CC_ALIGN_LABELS=0
172CONFIG_CC_ALIGN_LOOPS=0
173CONFIG_CC_ALIGN_JUMPS=0
174# CONFIG_TINY_SHMEM is not set
175CONFIG_BASE_SMALL=0
176
177#
178# Loadable module support
179#
180CONFIG_MODULES=y
181CONFIG_MODULE_UNLOAD=y
182# CONFIG_MODULE_FORCE_UNLOAD is not set
183CONFIG_OBSOLETE_MODPARM=y
184CONFIG_MODVERSIONS=y
185CONFIG_MODULE_SRCVERSION_ALL=y
186CONFIG_KMOD=y
187
188#
189# Block layer
190#
191# CONFIG_LBD is not set
192
193#
194# IO Schedulers
195#
196CONFIG_IOSCHED_NOOP=y
197CONFIG_IOSCHED_AS=y
198CONFIG_IOSCHED_DEADLINE=y
199CONFIG_IOSCHED_CFQ=y
200CONFIG_DEFAULT_AS=y
201# CONFIG_DEFAULT_DEADLINE is not set
202# CONFIG_DEFAULT_CFQ is not set
203# CONFIG_DEFAULT_NOOP is not set
204CONFIG_DEFAULT_IOSCHED="anticipatory"
205
206#
207# Bus options (PCI, PCMCIA, EISA, ISA, TC) 207# Bus options (PCI, PCMCIA, EISA, ISA, TC)
208# 208#
209CONFIG_ISA=y 209CONFIG_ISA=y
@@ -286,7 +286,6 @@ CONFIG_TCP_CONG_BIC=y
286# QoS and/or fair queueing 286# QoS and/or fair queueing
287# 287#
288# CONFIG_NET_SCHED is not set 288# CONFIG_NET_SCHED is not set
289# CONFIG_NET_CLS_ROUTE is not set
290 289
291# 290#
292# Network testing 291# Network testing
@@ -577,6 +576,7 @@ CONFIG_GPIO_VR41XX=y
577# 576#
578# TPM devices 577# TPM devices
579# 578#
579# CONFIG_TCG_TPM is not set
580# CONFIG_TELCLOCK is not set 580# CONFIG_TELCLOCK is not set
581 581
582# 582#
diff --git a/arch/mips/configs/ev64120_defconfig b/arch/mips/configs/ev64120_defconfig
index e6c3c27f41fe..14e3815f11e6 100644
--- a/arch/mips/configs/ev64120_defconfig
+++ b/arch/mips/configs/ev64120_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Wed Nov 9 11:05:12 2005 4# Thu Nov 24 01:06:16 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57# CONFIG_KMOD is not set
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -205,6 +136,75 @@ CONFIG_PREEMPT_NONE=y
205# CONFIG_PREEMPT is not set 136# CONFIG_PREEMPT is not set
206 137
207# 138#
139# Code maturity level options
140#
141CONFIG_EXPERIMENTAL=y
142CONFIG_CLEAN_COMPILE=y
143CONFIG_BROKEN_ON_SMP=y
144CONFIG_INIT_ENV_ARG_LIMIT=32
145
146#
147# General setup
148#
149CONFIG_LOCALVERSION=""
150CONFIG_LOCALVERSION_AUTO=y
151CONFIG_SWAP=y
152CONFIG_SYSVIPC=y
153# CONFIG_POSIX_MQUEUE is not set
154# CONFIG_BSD_PROCESS_ACCT is not set
155CONFIG_SYSCTL=y
156# CONFIG_AUDIT is not set
157CONFIG_HOTPLUG=y
158CONFIG_KOBJECT_UEVENT=y
159# CONFIG_IKCONFIG is not set
160CONFIG_INITRAMFS_SOURCE=""
161CONFIG_EMBEDDED=y
162CONFIG_KALLSYMS=y
163# CONFIG_KALLSYMS_EXTRA_PASS is not set
164CONFIG_PRINTK=y
165CONFIG_BUG=y
166CONFIG_BASE_FULL=y
167CONFIG_FUTEX=y
168CONFIG_EPOLL=y
169# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
170CONFIG_SHMEM=y
171CONFIG_CC_ALIGN_FUNCTIONS=0
172CONFIG_CC_ALIGN_LABELS=0
173CONFIG_CC_ALIGN_LOOPS=0
174CONFIG_CC_ALIGN_JUMPS=0
175# CONFIG_TINY_SHMEM is not set
176CONFIG_BASE_SMALL=0
177
178#
179# Loadable module support
180#
181CONFIG_MODULES=y
182CONFIG_MODULE_UNLOAD=y
183# CONFIG_MODULE_FORCE_UNLOAD is not set
184CONFIG_OBSOLETE_MODPARM=y
185CONFIG_MODVERSIONS=y
186CONFIG_MODULE_SRCVERSION_ALL=y
187# CONFIG_KMOD is not set
188
189#
190# Block layer
191#
192# CONFIG_LBD is not set
193
194#
195# IO Schedulers
196#
197CONFIG_IOSCHED_NOOP=y
198CONFIG_IOSCHED_AS=y
199CONFIG_IOSCHED_DEADLINE=y
200CONFIG_IOSCHED_CFQ=y
201CONFIG_DEFAULT_AS=y
202# CONFIG_DEFAULT_DEADLINE is not set
203# CONFIG_DEFAULT_CFQ is not set
204# CONFIG_DEFAULT_NOOP is not set
205CONFIG_DEFAULT_IOSCHED="anticipatory"
206
207#
208# Bus options (PCI, PCMCIA, EISA, ISA, TC) 208# Bus options (PCI, PCMCIA, EISA, ISA, TC)
209# 209#
210CONFIG_HW_HAS_PCI=y 210CONFIG_HW_HAS_PCI=y
@@ -291,7 +291,6 @@ CONFIG_TCP_CONG_BIC=y
291# QoS and/or fair queueing 291# QoS and/or fair queueing
292# 292#
293# CONFIG_NET_SCHED is not set 293# CONFIG_NET_SCHED is not set
294# CONFIG_NET_CLS_ROUTE is not set
295 294
296# 295#
297# Network testing 296# Network testing
diff --git a/arch/mips/configs/ev96100_defconfig b/arch/mips/configs/ev96100_defconfig
index 52ca6bf5be66..510819581d8a 100644
--- a/arch/mips/configs/ev96100_defconfig
+++ b/arch/mips/configs/ev96100_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:05:22 2005 4# Thu Nov 24 01:06:18 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27# CONFIG_HOTPLUG is not set
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57# CONFIG_KMOD is not set
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -209,6 +140,75 @@ CONFIG_PREEMPT_NONE=y
209# CONFIG_PREEMPT is not set 140# CONFIG_PREEMPT is not set
210 141
211# 142#
143# Code maturity level options
144#
145CONFIG_EXPERIMENTAL=y
146CONFIG_CLEAN_COMPILE=y
147CONFIG_BROKEN_ON_SMP=y
148CONFIG_INIT_ENV_ARG_LIMIT=32
149
150#
151# General setup
152#
153CONFIG_LOCALVERSION=""
154CONFIG_LOCALVERSION_AUTO=y
155CONFIG_SWAP=y
156CONFIG_SYSVIPC=y
157# CONFIG_POSIX_MQUEUE is not set
158# CONFIG_BSD_PROCESS_ACCT is not set
159CONFIG_SYSCTL=y
160# CONFIG_AUDIT is not set
161# CONFIG_HOTPLUG is not set
162CONFIG_KOBJECT_UEVENT=y
163# CONFIG_IKCONFIG is not set
164CONFIG_INITRAMFS_SOURCE=""
165CONFIG_EMBEDDED=y
166CONFIG_KALLSYMS=y
167# CONFIG_KALLSYMS_EXTRA_PASS is not set
168CONFIG_PRINTK=y
169CONFIG_BUG=y
170CONFIG_BASE_FULL=y
171CONFIG_FUTEX=y
172CONFIG_EPOLL=y
173# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
174CONFIG_SHMEM=y
175CONFIG_CC_ALIGN_FUNCTIONS=0
176CONFIG_CC_ALIGN_LABELS=0
177CONFIG_CC_ALIGN_LOOPS=0
178CONFIG_CC_ALIGN_JUMPS=0
179# CONFIG_TINY_SHMEM is not set
180CONFIG_BASE_SMALL=0
181
182#
183# Loadable module support
184#
185CONFIG_MODULES=y
186CONFIG_MODULE_UNLOAD=y
187# CONFIG_MODULE_FORCE_UNLOAD is not set
188CONFIG_OBSOLETE_MODPARM=y
189CONFIG_MODVERSIONS=y
190CONFIG_MODULE_SRCVERSION_ALL=y
191# CONFIG_KMOD is not set
192
193#
194# Block layer
195#
196# CONFIG_LBD is not set
197
198#
199# IO Schedulers
200#
201CONFIG_IOSCHED_NOOP=y
202CONFIG_IOSCHED_AS=y
203CONFIG_IOSCHED_DEADLINE=y
204CONFIG_IOSCHED_CFQ=y
205CONFIG_DEFAULT_AS=y
206# CONFIG_DEFAULT_DEADLINE is not set
207# CONFIG_DEFAULT_CFQ is not set
208# CONFIG_DEFAULT_NOOP is not set
209CONFIG_DEFAULT_IOSCHED="anticipatory"
210
211#
212# Bus options (PCI, PCMCIA, EISA, ISA, TC) 212# Bus options (PCI, PCMCIA, EISA, ISA, TC)
213# 213#
214CONFIG_HW_HAS_PCI=y 214CONFIG_HW_HAS_PCI=y
@@ -293,7 +293,6 @@ CONFIG_TCP_CONG_BIC=y
293# QoS and/or fair queueing 293# QoS and/or fair queueing
294# 294#
295# CONFIG_NET_SCHED is not set 295# CONFIG_NET_SCHED is not set
296# CONFIG_NET_CLS_ROUTE is not set
297 296
298# 297#
299# Network testing 298# Network testing
@@ -531,6 +530,7 @@ CONFIG_LEGACY_PTY_COUNT=256
531# 530#
532# TPM devices 531# TPM devices
533# 532#
533# CONFIG_TCG_TPM is not set
534# CONFIG_TELCLOCK is not set 534# CONFIG_TELCLOCK is not set
535 535
536# 536#
diff --git a/arch/mips/configs/ip22_defconfig b/arch/mips/configs/ip22_defconfig
index 79e3fe7e2d54..67979e3e606e 100644
--- a/arch/mips/configs/ip22_defconfig
+++ b/arch/mips/configs/ip22_defconfig
@@ -1,81 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Thu Nov 10 13:38:41 2005 4# Thu Nov 24 01:06:20 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27# CONFIG_HOTPLUG is not set
28CONFIG_KOBJECT_UEVENT=y
29CONFIG_IKCONFIG=y
30CONFIG_IKCONFIG_PROC=y
31CONFIG_INITRAMFS_SOURCE=""
32CONFIG_EMBEDDED=y
33CONFIG_KALLSYMS=y
34# CONFIG_KALLSYMS_EXTRA_PASS is not set
35CONFIG_PRINTK=y
36CONFIG_BUG=y
37CONFIG_BASE_FULL=y
38CONFIG_FUTEX=y
39CONFIG_EPOLL=y
40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
41CONFIG_SHMEM=y
42CONFIG_CC_ALIGN_FUNCTIONS=0
43CONFIG_CC_ALIGN_LABELS=0
44CONFIG_CC_ALIGN_LOOPS=0
45CONFIG_CC_ALIGN_JUMPS=0
46# CONFIG_TINY_SHMEM is not set
47CONFIG_BASE_SMALL=0
48
49#
50# Loadable module support
51#
52CONFIG_MODULES=y
53CONFIG_MODULE_UNLOAD=y
54# CONFIG_MODULE_FORCE_UNLOAD is not set
55CONFIG_OBSOLETE_MODPARM=y
56CONFIG_MODVERSIONS=y
57CONFIG_MODULE_SRCVERSION_ALL=y
58CONFIG_KMOD=y
59
60#
61# Block layer
62#
63# CONFIG_LBD is not set
64
65#
66# IO Schedulers
67#
68CONFIG_IOSCHED_NOOP=y
69CONFIG_IOSCHED_AS=y
70CONFIG_IOSCHED_DEADLINE=y
71CONFIG_IOSCHED_CFQ=y
72CONFIG_DEFAULT_AS=y
73# CONFIG_DEFAULT_DEADLINE is not set
74# CONFIG_DEFAULT_CFQ is not set
75# CONFIG_DEFAULT_NOOP is not set
76CONFIG_DEFAULT_IOSCHED="anticipatory"
77
78#
79# Machine selection 9# Machine selection
80# 10#
81# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -211,6 +141,76 @@ CONFIG_PREEMPT_VOLUNTARY=y
211# CONFIG_PREEMPT is not set 141# CONFIG_PREEMPT is not set
212 142
213# 143#
144# Code maturity level options
145#
146CONFIG_EXPERIMENTAL=y
147CONFIG_CLEAN_COMPILE=y
148CONFIG_BROKEN_ON_SMP=y
149CONFIG_INIT_ENV_ARG_LIMIT=32
150
151#
152# General setup
153#
154CONFIG_LOCALVERSION=""
155CONFIG_LOCALVERSION_AUTO=y
156CONFIG_SWAP=y
157CONFIG_SYSVIPC=y
158# CONFIG_POSIX_MQUEUE is not set
159# CONFIG_BSD_PROCESS_ACCT is not set
160CONFIG_SYSCTL=y
161# CONFIG_AUDIT is not set
162# CONFIG_HOTPLUG is not set
163CONFIG_KOBJECT_UEVENT=y
164CONFIG_IKCONFIG=y
165CONFIG_IKCONFIG_PROC=y
166CONFIG_INITRAMFS_SOURCE=""
167CONFIG_EMBEDDED=y
168CONFIG_KALLSYMS=y
169# CONFIG_KALLSYMS_EXTRA_PASS is not set
170CONFIG_PRINTK=y
171CONFIG_BUG=y
172CONFIG_BASE_FULL=y
173CONFIG_FUTEX=y
174CONFIG_EPOLL=y
175# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
176CONFIG_SHMEM=y
177CONFIG_CC_ALIGN_FUNCTIONS=0
178CONFIG_CC_ALIGN_LABELS=0
179CONFIG_CC_ALIGN_LOOPS=0
180CONFIG_CC_ALIGN_JUMPS=0
181# CONFIG_TINY_SHMEM is not set
182CONFIG_BASE_SMALL=0
183
184#
185# Loadable module support
186#
187CONFIG_MODULES=y
188CONFIG_MODULE_UNLOAD=y
189# CONFIG_MODULE_FORCE_UNLOAD is not set
190CONFIG_OBSOLETE_MODPARM=y
191CONFIG_MODVERSIONS=y
192CONFIG_MODULE_SRCVERSION_ALL=y
193CONFIG_KMOD=y
194
195#
196# Block layer
197#
198# CONFIG_LBD is not set
199
200#
201# IO Schedulers
202#
203CONFIG_IOSCHED_NOOP=y
204CONFIG_IOSCHED_AS=y
205CONFIG_IOSCHED_DEADLINE=y
206CONFIG_IOSCHED_CFQ=y
207CONFIG_DEFAULT_AS=y
208# CONFIG_DEFAULT_DEADLINE is not set
209# CONFIG_DEFAULT_CFQ is not set
210# CONFIG_DEFAULT_NOOP is not set
211CONFIG_DEFAULT_IOSCHED="anticipatory"
212
213#
214# Bus options (PCI, PCMCIA, EISA, ISA, TC) 214# Bus options (PCI, PCMCIA, EISA, ISA, TC)
215# 215#
216CONFIG_HW_HAS_EISA=y 216CONFIG_HW_HAS_EISA=y
@@ -779,6 +779,7 @@ CONFIG_MAX_RAW_DEVS=256
779# 779#
780# TPM devices 780# TPM devices
781# 781#
782# CONFIG_TCG_TPM is not set
782# CONFIG_TELCLOCK is not set 783# CONFIG_TELCLOCK is not set
783 784
784# 785#
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig
index 72998ec35b0b..03af44d1d846 100644
--- a/arch/mips/configs/ip27_defconfig
+++ b/arch/mips/configs/ip27_defconfig
@@ -1,82 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc1 3# Linux kernel version: 2.6.15-rc2
4# Sun Nov 13 23:56:52 2005 4# Thu Nov 24 01:06:21 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_LOCK_KERNEL=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23CONFIG_POSIX_MQUEUE=y
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29CONFIG_IKCONFIG=y
30CONFIG_IKCONFIG_PROC=y
31CONFIG_CPUSETS=y
32CONFIG_INITRAMFS_SOURCE=""
33CONFIG_EMBEDDED=y
34CONFIG_KALLSYMS=y
35# CONFIG_KALLSYMS_EXTRA_PASS is not set
36CONFIG_PRINTK=y
37CONFIG_BUG=y
38CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y
40CONFIG_EPOLL=y
41# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
42CONFIG_SHMEM=y
43CONFIG_CC_ALIGN_FUNCTIONS=0
44CONFIG_CC_ALIGN_LABELS=0
45CONFIG_CC_ALIGN_LOOPS=0
46CONFIG_CC_ALIGN_JUMPS=0
47# CONFIG_TINY_SHMEM is not set
48CONFIG_BASE_SMALL=0
49
50#
51# Loadable module support
52#
53CONFIG_MODULES=y
54CONFIG_MODULE_UNLOAD=y
55# CONFIG_MODULE_FORCE_UNLOAD is not set
56CONFIG_OBSOLETE_MODPARM=y
57# CONFIG_MODVERSIONS is not set
58CONFIG_MODULE_SRCVERSION_ALL=y
59CONFIG_KMOD=y
60CONFIG_STOP_MACHINE=y
61
62#
63# Block layer
64#
65
66#
67# IO Schedulers
68#
69CONFIG_IOSCHED_NOOP=y
70CONFIG_IOSCHED_AS=y
71CONFIG_IOSCHED_DEADLINE=y
72CONFIG_IOSCHED_CFQ=y
73CONFIG_DEFAULT_AS=y
74# CONFIG_DEFAULT_DEADLINE is not set
75# CONFIG_DEFAULT_CFQ is not set
76# CONFIG_DEFAULT_NOOP is not set
77CONFIG_DEFAULT_IOSCHED="anticipatory"
78
79#
80# Machine selection 9# Machine selection
81# 10#
82# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -213,6 +142,77 @@ CONFIG_PREEMPT_BKL=y
213# CONFIG_MIPS_INSANE_LARGE is not set 142# CONFIG_MIPS_INSANE_LARGE is not set
214 143
215# 144#
145# Code maturity level options
146#
147CONFIG_EXPERIMENTAL=y
148CONFIG_CLEAN_COMPILE=y
149CONFIG_LOCK_KERNEL=y
150CONFIG_INIT_ENV_ARG_LIMIT=32
151
152#
153# General setup
154#
155CONFIG_LOCALVERSION=""
156CONFIG_LOCALVERSION_AUTO=y
157CONFIG_SWAP=y
158CONFIG_SYSVIPC=y
159CONFIG_POSIX_MQUEUE=y
160# CONFIG_BSD_PROCESS_ACCT is not set
161CONFIG_SYSCTL=y
162# CONFIG_AUDIT is not set
163CONFIG_HOTPLUG=y
164CONFIG_KOBJECT_UEVENT=y
165CONFIG_IKCONFIG=y
166CONFIG_IKCONFIG_PROC=y
167CONFIG_CPUSETS=y
168CONFIG_INITRAMFS_SOURCE=""
169CONFIG_EMBEDDED=y
170CONFIG_KALLSYMS=y
171# CONFIG_KALLSYMS_EXTRA_PASS is not set
172CONFIG_PRINTK=y
173CONFIG_BUG=y
174CONFIG_BASE_FULL=y
175CONFIG_FUTEX=y
176CONFIG_EPOLL=y
177# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
178CONFIG_SHMEM=y
179CONFIG_CC_ALIGN_FUNCTIONS=0
180CONFIG_CC_ALIGN_LABELS=0
181CONFIG_CC_ALIGN_LOOPS=0
182CONFIG_CC_ALIGN_JUMPS=0
183# CONFIG_TINY_SHMEM is not set
184CONFIG_BASE_SMALL=0
185
186#
187# Loadable module support
188#
189CONFIG_MODULES=y
190CONFIG_MODULE_UNLOAD=y
191# CONFIG_MODULE_FORCE_UNLOAD is not set
192CONFIG_OBSOLETE_MODPARM=y
193# CONFIG_MODVERSIONS is not set
194CONFIG_MODULE_SRCVERSION_ALL=y
195CONFIG_KMOD=y
196CONFIG_STOP_MACHINE=y
197
198#
199# Block layer
200#
201
202#
203# IO Schedulers
204#
205CONFIG_IOSCHED_NOOP=y
206CONFIG_IOSCHED_AS=y
207CONFIG_IOSCHED_DEADLINE=y
208CONFIG_IOSCHED_CFQ=y
209CONFIG_DEFAULT_AS=y
210# CONFIG_DEFAULT_DEADLINE is not set
211# CONFIG_DEFAULT_CFQ is not set
212# CONFIG_DEFAULT_NOOP is not set
213CONFIG_DEFAULT_IOSCHED="anticipatory"
214
215#
216# Bus options (PCI, PCMCIA, EISA, ISA, TC) 216# Bus options (PCI, PCMCIA, EISA, ISA, TC)
217# 217#
218CONFIG_HW_HAS_PCI=y 218CONFIG_HW_HAS_PCI=y
diff --git a/arch/mips/configs/ip32_defconfig b/arch/mips/configs/ip32_defconfig
index 955e30f1b1ad..cba2a49cceb1 100644
--- a/arch/mips/configs/ip32_defconfig
+++ b/arch/mips/configs/ip32_defconfig
@@ -1,74 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:05:32 2005 4# Thu Nov 24 01:06:24 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24CONFIG_BSD_PROCESS_ACCT=y
25# CONFIG_BSD_PROCESS_ACCT_V3 is not set
26CONFIG_SYSCTL=y
27# CONFIG_AUDIT is not set
28CONFIG_HOTPLUG=y
29CONFIG_KOBJECT_UEVENT=y
30# CONFIG_IKCONFIG is not set
31CONFIG_INITRAMFS_SOURCE=""
32CONFIG_EMBEDDED=y
33CONFIG_KALLSYMS=y
34# CONFIG_KALLSYMS_EXTRA_PASS is not set
35CONFIG_PRINTK=y
36CONFIG_BUG=y
37CONFIG_BASE_FULL=y
38CONFIG_FUTEX=y
39CONFIG_EPOLL=y
40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
41CONFIG_SHMEM=y
42CONFIG_CC_ALIGN_FUNCTIONS=0
43CONFIG_CC_ALIGN_LABELS=0
44CONFIG_CC_ALIGN_LOOPS=0
45CONFIG_CC_ALIGN_JUMPS=0
46# CONFIG_TINY_SHMEM is not set
47CONFIG_BASE_SMALL=0
48
49#
50# Loadable module support
51#
52# CONFIG_MODULES is not set
53
54#
55# Block layer
56#
57
58#
59# IO Schedulers
60#
61CONFIG_IOSCHED_NOOP=y
62CONFIG_IOSCHED_AS=y
63CONFIG_IOSCHED_DEADLINE=y
64CONFIG_IOSCHED_CFQ=y
65CONFIG_DEFAULT_AS=y
66# CONFIG_DEFAULT_DEADLINE is not set
67# CONFIG_DEFAULT_CFQ is not set
68# CONFIG_DEFAULT_NOOP is not set
69CONFIG_DEFAULT_IOSCHED="anticipatory"
70
71#
72# Machine selection 9# Machine selection
73# 10#
74# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -202,6 +139,69 @@ CONFIG_PREEMPT_VOLUNTARY=y
202# CONFIG_PREEMPT is not set 139# CONFIG_PREEMPT is not set
203 140
204# 141#
142# Code maturity level options
143#
144CONFIG_EXPERIMENTAL=y
145CONFIG_CLEAN_COMPILE=y
146CONFIG_BROKEN_ON_SMP=y
147CONFIG_INIT_ENV_ARG_LIMIT=32
148
149#
150# General setup
151#
152CONFIG_LOCALVERSION=""
153CONFIG_LOCALVERSION_AUTO=y
154CONFIG_SWAP=y
155CONFIG_SYSVIPC=y
156# CONFIG_POSIX_MQUEUE is not set
157CONFIG_BSD_PROCESS_ACCT=y
158# CONFIG_BSD_PROCESS_ACCT_V3 is not set
159CONFIG_SYSCTL=y
160# CONFIG_AUDIT is not set
161CONFIG_HOTPLUG=y
162CONFIG_KOBJECT_UEVENT=y
163# CONFIG_IKCONFIG is not set
164CONFIG_INITRAMFS_SOURCE=""
165CONFIG_EMBEDDED=y
166CONFIG_KALLSYMS=y
167# CONFIG_KALLSYMS_EXTRA_PASS is not set
168CONFIG_PRINTK=y
169CONFIG_BUG=y
170CONFIG_BASE_FULL=y
171CONFIG_FUTEX=y
172CONFIG_EPOLL=y
173# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
174CONFIG_SHMEM=y
175CONFIG_CC_ALIGN_FUNCTIONS=0
176CONFIG_CC_ALIGN_LABELS=0
177CONFIG_CC_ALIGN_LOOPS=0
178CONFIG_CC_ALIGN_JUMPS=0
179# CONFIG_TINY_SHMEM is not set
180CONFIG_BASE_SMALL=0
181
182#
183# Loadable module support
184#
185# CONFIG_MODULES is not set
186
187#
188# Block layer
189#
190
191#
192# IO Schedulers
193#
194CONFIG_IOSCHED_NOOP=y
195CONFIG_IOSCHED_AS=y
196CONFIG_IOSCHED_DEADLINE=y
197CONFIG_IOSCHED_CFQ=y
198CONFIG_DEFAULT_AS=y
199# CONFIG_DEFAULT_DEADLINE is not set
200# CONFIG_DEFAULT_CFQ is not set
201# CONFIG_DEFAULT_NOOP is not set
202CONFIG_DEFAULT_IOSCHED="anticipatory"
203
204#
205# Bus options (PCI, PCMCIA, EISA, ISA, TC) 205# Bus options (PCI, PCMCIA, EISA, ISA, TC)
206# 206#
207CONFIG_HW_HAS_PCI=y 207CONFIG_HW_HAS_PCI=y
@@ -294,7 +294,6 @@ CONFIG_TCP_CONG_BIC=y
294# QoS and/or fair queueing 294# QoS and/or fair queueing
295# 295#
296# CONFIG_NET_SCHED is not set 296# CONFIG_NET_SCHED is not set
297# CONFIG_NET_CLS_ROUTE is not set
298 297
299# 298#
300# Network testing 299# Network testing
diff --git a/arch/mips/configs/it8172_defconfig b/arch/mips/configs/it8172_defconfig
index f631385217db..e7ee1679af90 100644
--- a/arch/mips/configs/it8172_defconfig
+++ b/arch/mips/configs/it8172_defconfig
@@ -1,81 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Thu Nov 10 13:42:45 2005 4# Thu Nov 24 01:06:26 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24CONFIG_BSD_PROCESS_ACCT=y
25# CONFIG_BSD_PROCESS_ACCT_V3 is not set
26CONFIG_SYSCTL=y
27# CONFIG_AUDIT is not set
28# CONFIG_HOTPLUG is not set
29CONFIG_KOBJECT_UEVENT=y
30# CONFIG_IKCONFIG is not set
31CONFIG_INITRAMFS_SOURCE=""
32CONFIG_EMBEDDED=y
33CONFIG_KALLSYMS=y
34# CONFIG_KALLSYMS_EXTRA_PASS is not set
35CONFIG_PRINTK=y
36CONFIG_BUG=y
37CONFIG_BASE_FULL=y
38CONFIG_FUTEX=y
39CONFIG_EPOLL=y
40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
41CONFIG_SHMEM=y
42CONFIG_CC_ALIGN_FUNCTIONS=0
43CONFIG_CC_ALIGN_LABELS=0
44CONFIG_CC_ALIGN_LOOPS=0
45CONFIG_CC_ALIGN_JUMPS=0
46# CONFIG_TINY_SHMEM is not set
47CONFIG_BASE_SMALL=0
48
49#
50# Loadable module support
51#
52CONFIG_MODULES=y
53CONFIG_MODULE_UNLOAD=y
54# CONFIG_MODULE_FORCE_UNLOAD is not set
55CONFIG_OBSOLETE_MODPARM=y
56CONFIG_MODVERSIONS=y
57CONFIG_MODULE_SRCVERSION_ALL=y
58CONFIG_KMOD=y
59
60#
61# Block layer
62#
63# CONFIG_LBD is not set
64
65#
66# IO Schedulers
67#
68CONFIG_IOSCHED_NOOP=y
69CONFIG_IOSCHED_AS=y
70CONFIG_IOSCHED_DEADLINE=y
71CONFIG_IOSCHED_CFQ=y
72CONFIG_DEFAULT_AS=y
73# CONFIG_DEFAULT_DEADLINE is not set
74# CONFIG_DEFAULT_CFQ is not set
75# CONFIG_DEFAULT_NOOP is not set
76CONFIG_DEFAULT_IOSCHED="anticipatory"
77
78#
79# Machine selection 9# Machine selection
80# 10#
81# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -205,6 +135,76 @@ CONFIG_PREEMPT_NONE=y
205# CONFIG_PREEMPT is not set 135# CONFIG_PREEMPT is not set
206 136
207# 137#
138# Code maturity level options
139#
140CONFIG_EXPERIMENTAL=y
141CONFIG_CLEAN_COMPILE=y
142CONFIG_BROKEN_ON_SMP=y
143CONFIG_INIT_ENV_ARG_LIMIT=32
144
145#
146# General setup
147#
148CONFIG_LOCALVERSION=""
149CONFIG_LOCALVERSION_AUTO=y
150CONFIG_SWAP=y
151CONFIG_SYSVIPC=y
152# CONFIG_POSIX_MQUEUE is not set
153CONFIG_BSD_PROCESS_ACCT=y
154# CONFIG_BSD_PROCESS_ACCT_V3 is not set
155CONFIG_SYSCTL=y
156# CONFIG_AUDIT is not set
157# CONFIG_HOTPLUG is not set
158CONFIG_KOBJECT_UEVENT=y
159# CONFIG_IKCONFIG is not set
160CONFIG_INITRAMFS_SOURCE=""
161CONFIG_EMBEDDED=y
162CONFIG_KALLSYMS=y
163# CONFIG_KALLSYMS_EXTRA_PASS is not set
164CONFIG_PRINTK=y
165CONFIG_BUG=y
166CONFIG_BASE_FULL=y
167CONFIG_FUTEX=y
168CONFIG_EPOLL=y
169# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
170CONFIG_SHMEM=y
171CONFIG_CC_ALIGN_FUNCTIONS=0
172CONFIG_CC_ALIGN_LABELS=0
173CONFIG_CC_ALIGN_LOOPS=0
174CONFIG_CC_ALIGN_JUMPS=0
175# CONFIG_TINY_SHMEM is not set
176CONFIG_BASE_SMALL=0
177
178#
179# Loadable module support
180#
181CONFIG_MODULES=y
182CONFIG_MODULE_UNLOAD=y
183# CONFIG_MODULE_FORCE_UNLOAD is not set
184CONFIG_OBSOLETE_MODPARM=y
185CONFIG_MODVERSIONS=y
186CONFIG_MODULE_SRCVERSION_ALL=y
187CONFIG_KMOD=y
188
189#
190# Block layer
191#
192# CONFIG_LBD is not set
193
194#
195# IO Schedulers
196#
197CONFIG_IOSCHED_NOOP=y
198CONFIG_IOSCHED_AS=y
199CONFIG_IOSCHED_DEADLINE=y
200CONFIG_IOSCHED_CFQ=y
201CONFIG_DEFAULT_AS=y
202# CONFIG_DEFAULT_DEADLINE is not set
203# CONFIG_DEFAULT_CFQ is not set
204# CONFIG_DEFAULT_NOOP is not set
205CONFIG_DEFAULT_IOSCHED="anticipatory"
206
207#
208# Bus options (PCI, PCMCIA, EISA, ISA, TC) 208# Bus options (PCI, PCMCIA, EISA, ISA, TC)
209# 209#
210CONFIG_HW_HAS_PCI=y 210CONFIG_HW_HAS_PCI=y
@@ -290,7 +290,6 @@ CONFIG_TCP_CONG_BIC=y
290# QoS and/or fair queueing 290# QoS and/or fair queueing
291# 291#
292# CONFIG_NET_SCHED is not set 292# CONFIG_NET_SCHED is not set
293# CONFIG_NET_CLS_ROUTE is not set
294 293
295# 294#
296# Network testing 295# Network testing
@@ -628,6 +627,7 @@ CONFIG_LEGACY_PTY_COUNT=256
628# 627#
629# TPM devices 628# TPM devices
630# 629#
630# CONFIG_TCG_TPM is not set
631# CONFIG_TELCLOCK is not set 631# CONFIG_TELCLOCK is not set
632 632
633# 633#
diff --git a/arch/mips/configs/ivr_defconfig b/arch/mips/configs/ivr_defconfig
index 8d94ac753e78..138c8a60a4dc 100644
--- a/arch/mips/configs/ivr_defconfig
+++ b/arch/mips/configs/ivr_defconfig
@@ -1,81 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:05:38 2005 4# Thu Nov 24 01:06:27 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24CONFIG_BSD_PROCESS_ACCT=y
25# CONFIG_BSD_PROCESS_ACCT_V3 is not set
26CONFIG_SYSCTL=y
27# CONFIG_AUDIT is not set
28CONFIG_HOTPLUG=y
29CONFIG_KOBJECT_UEVENT=y
30# CONFIG_IKCONFIG is not set
31CONFIG_INITRAMFS_SOURCE=""
32CONFIG_EMBEDDED=y
33CONFIG_KALLSYMS=y
34# CONFIG_KALLSYMS_EXTRA_PASS is not set
35CONFIG_PRINTK=y
36CONFIG_BUG=y
37CONFIG_BASE_FULL=y
38CONFIG_FUTEX=y
39CONFIG_EPOLL=y
40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
41CONFIG_SHMEM=y
42CONFIG_CC_ALIGN_FUNCTIONS=0
43CONFIG_CC_ALIGN_LABELS=0
44CONFIG_CC_ALIGN_LOOPS=0
45CONFIG_CC_ALIGN_JUMPS=0
46# CONFIG_TINY_SHMEM is not set
47CONFIG_BASE_SMALL=0
48
49#
50# Loadable module support
51#
52CONFIG_MODULES=y
53CONFIG_MODULE_UNLOAD=y
54# CONFIG_MODULE_FORCE_UNLOAD is not set
55CONFIG_OBSOLETE_MODPARM=y
56CONFIG_MODVERSIONS=y
57CONFIG_MODULE_SRCVERSION_ALL=y
58CONFIG_KMOD=y
59
60#
61# Block layer
62#
63# CONFIG_LBD is not set
64
65#
66# IO Schedulers
67#
68CONFIG_IOSCHED_NOOP=y
69CONFIG_IOSCHED_AS=y
70CONFIG_IOSCHED_DEADLINE=y
71CONFIG_IOSCHED_CFQ=y
72CONFIG_DEFAULT_AS=y
73# CONFIG_DEFAULT_DEADLINE is not set
74# CONFIG_DEFAULT_CFQ is not set
75# CONFIG_DEFAULT_NOOP is not set
76CONFIG_DEFAULT_IOSCHED="anticipatory"
77
78#
79# Machine selection 9# Machine selection
80# 10#
81# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -202,6 +132,76 @@ CONFIG_PREEMPT_NONE=y
202# CONFIG_PREEMPT is not set 132# CONFIG_PREEMPT is not set
203 133
204# 134#
135# Code maturity level options
136#
137CONFIG_EXPERIMENTAL=y
138CONFIG_CLEAN_COMPILE=y
139CONFIG_BROKEN_ON_SMP=y
140CONFIG_INIT_ENV_ARG_LIMIT=32
141
142#
143# General setup
144#
145CONFIG_LOCALVERSION=""
146CONFIG_LOCALVERSION_AUTO=y
147CONFIG_SWAP=y
148CONFIG_SYSVIPC=y
149# CONFIG_POSIX_MQUEUE is not set
150CONFIG_BSD_PROCESS_ACCT=y
151# CONFIG_BSD_PROCESS_ACCT_V3 is not set
152CONFIG_SYSCTL=y
153# CONFIG_AUDIT is not set
154CONFIG_HOTPLUG=y
155CONFIG_KOBJECT_UEVENT=y
156# CONFIG_IKCONFIG is not set
157CONFIG_INITRAMFS_SOURCE=""
158CONFIG_EMBEDDED=y
159CONFIG_KALLSYMS=y
160# CONFIG_KALLSYMS_EXTRA_PASS is not set
161CONFIG_PRINTK=y
162CONFIG_BUG=y
163CONFIG_BASE_FULL=y
164CONFIG_FUTEX=y
165CONFIG_EPOLL=y
166# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
167CONFIG_SHMEM=y
168CONFIG_CC_ALIGN_FUNCTIONS=0
169CONFIG_CC_ALIGN_LABELS=0
170CONFIG_CC_ALIGN_LOOPS=0
171CONFIG_CC_ALIGN_JUMPS=0
172# CONFIG_TINY_SHMEM is not set
173CONFIG_BASE_SMALL=0
174
175#
176# Loadable module support
177#
178CONFIG_MODULES=y
179CONFIG_MODULE_UNLOAD=y
180# CONFIG_MODULE_FORCE_UNLOAD is not set
181CONFIG_OBSOLETE_MODPARM=y
182CONFIG_MODVERSIONS=y
183CONFIG_MODULE_SRCVERSION_ALL=y
184CONFIG_KMOD=y
185
186#
187# Block layer
188#
189# CONFIG_LBD is not set
190
191#
192# IO Schedulers
193#
194CONFIG_IOSCHED_NOOP=y
195CONFIG_IOSCHED_AS=y
196CONFIG_IOSCHED_DEADLINE=y
197CONFIG_IOSCHED_CFQ=y
198CONFIG_DEFAULT_AS=y
199# CONFIG_DEFAULT_DEADLINE is not set
200# CONFIG_DEFAULT_CFQ is not set
201# CONFIG_DEFAULT_NOOP is not set
202CONFIG_DEFAULT_IOSCHED="anticipatory"
203
204#
205# Bus options (PCI, PCMCIA, EISA, ISA, TC) 205# Bus options (PCI, PCMCIA, EISA, ISA, TC)
206# 206#
207CONFIG_HW_HAS_PCI=y 207CONFIG_HW_HAS_PCI=y
@@ -289,7 +289,6 @@ CONFIG_TCP_CONG_BIC=y
289# QoS and/or fair queueing 289# QoS and/or fair queueing
290# 290#
291# CONFIG_NET_SCHED is not set 291# CONFIG_NET_SCHED is not set
292# CONFIG_NET_CLS_ROUTE is not set
293 292
294# 293#
295# Network testing 294# Network testing
diff --git a/arch/mips/configs/jaguar-atx_defconfig b/arch/mips/configs/jaguar-atx_defconfig
index a8b4c9a9a63b..6238e0d6a430 100644
--- a/arch/mips/configs/jaguar-atx_defconfig
+++ b/arch/mips/configs/jaguar-atx_defconfig
@@ -1,78 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:05:41 2005 4# Thu Nov 24 01:06:29 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11# CONFIG_EXPERIMENTAL is not set
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_BSD_PROCESS_ACCT is not set
24CONFIG_SYSCTL=y
25# CONFIG_AUDIT is not set
26CONFIG_HOTPLUG=y
27CONFIG_KOBJECT_UEVENT=y
28CONFIG_IKCONFIG=y
29CONFIG_IKCONFIG_PROC=y
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53CONFIG_OBSOLETE_MODPARM=y
54CONFIG_MODULE_SRCVERSION_ALL=y
55CONFIG_KMOD=y
56
57#
58# Block layer
59#
60# CONFIG_LBD is not set
61
62#
63# IO Schedulers
64#
65CONFIG_IOSCHED_NOOP=y
66CONFIG_IOSCHED_AS=y
67CONFIG_IOSCHED_DEADLINE=y
68CONFIG_IOSCHED_CFQ=y
69CONFIG_DEFAULT_AS=y
70# CONFIG_DEFAULT_DEADLINE is not set
71# CONFIG_DEFAULT_CFQ is not set
72# CONFIG_DEFAULT_NOOP is not set
73CONFIG_DEFAULT_IOSCHED="anticipatory"
74
75#
76# Machine selection 9# Machine selection
77# 10#
78# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -209,6 +142,73 @@ CONFIG_PREEMPT_NONE=y
209# CONFIG_PREEMPT is not set 142# CONFIG_PREEMPT is not set
210 143
211# 144#
145# Code maturity level options
146#
147# CONFIG_EXPERIMENTAL is not set
148CONFIG_CLEAN_COMPILE=y
149CONFIG_BROKEN_ON_SMP=y
150CONFIG_INIT_ENV_ARG_LIMIT=32
151
152#
153# General setup
154#
155CONFIG_LOCALVERSION=""
156CONFIG_LOCALVERSION_AUTO=y
157CONFIG_SWAP=y
158CONFIG_SYSVIPC=y
159# CONFIG_BSD_PROCESS_ACCT is not set
160CONFIG_SYSCTL=y
161# CONFIG_AUDIT is not set
162CONFIG_HOTPLUG=y
163CONFIG_KOBJECT_UEVENT=y
164CONFIG_IKCONFIG=y
165CONFIG_IKCONFIG_PROC=y
166CONFIG_INITRAMFS_SOURCE=""
167CONFIG_EMBEDDED=y
168CONFIG_KALLSYMS=y
169# CONFIG_KALLSYMS_EXTRA_PASS is not set
170CONFIG_PRINTK=y
171CONFIG_BUG=y
172CONFIG_BASE_FULL=y
173CONFIG_FUTEX=y
174CONFIG_EPOLL=y
175# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
176CONFIG_SHMEM=y
177CONFIG_CC_ALIGN_FUNCTIONS=0
178CONFIG_CC_ALIGN_LABELS=0
179CONFIG_CC_ALIGN_LOOPS=0
180CONFIG_CC_ALIGN_JUMPS=0
181# CONFIG_TINY_SHMEM is not set
182CONFIG_BASE_SMALL=0
183
184#
185# Loadable module support
186#
187CONFIG_MODULES=y
188CONFIG_MODULE_UNLOAD=y
189CONFIG_OBSOLETE_MODPARM=y
190CONFIG_MODULE_SRCVERSION_ALL=y
191CONFIG_KMOD=y
192
193#
194# Block layer
195#
196# CONFIG_LBD is not set
197
198#
199# IO Schedulers
200#
201CONFIG_IOSCHED_NOOP=y
202CONFIG_IOSCHED_AS=y
203CONFIG_IOSCHED_DEADLINE=y
204CONFIG_IOSCHED_CFQ=y
205CONFIG_DEFAULT_AS=y
206# CONFIG_DEFAULT_DEADLINE is not set
207# CONFIG_DEFAULT_CFQ is not set
208# CONFIG_DEFAULT_NOOP is not set
209CONFIG_DEFAULT_IOSCHED="anticipatory"
210
211#
212# Bus options (PCI, PCMCIA, EISA, ISA, TC) 212# Bus options (PCI, PCMCIA, EISA, ISA, TC)
213# 213#
214CONFIG_HW_HAS_PCI=y 214CONFIG_HW_HAS_PCI=y
@@ -283,7 +283,6 @@ CONFIG_IPV6_TUNNEL=m
283# QoS and/or fair queueing 283# QoS and/or fair queueing
284# 284#
285# CONFIG_NET_SCHED is not set 285# CONFIG_NET_SCHED is not set
286# CONFIG_NET_CLS_ROUTE is not set
287 286
288# 287#
289# Network testing 288# Network testing
diff --git a/arch/mips/configs/jmr3927_defconfig b/arch/mips/configs/jmr3927_defconfig
index c0ac5c793ec7..a8ded3d74152 100644
--- a/arch/mips/configs/jmr3927_defconfig
+++ b/arch/mips/configs/jmr3927_defconfig
@@ -1,74 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:05:44 2005 4# Thu Nov 24 01:06:31 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51# CONFIG_MODULES is not set
52
53#
54# Block layer
55#
56# CONFIG_LBD is not set
57
58#
59# IO Schedulers
60#
61CONFIG_IOSCHED_NOOP=y
62CONFIG_IOSCHED_AS=y
63CONFIG_IOSCHED_DEADLINE=y
64CONFIG_IOSCHED_CFQ=y
65CONFIG_DEFAULT_AS=y
66# CONFIG_DEFAULT_DEADLINE is not set
67# CONFIG_DEFAULT_CFQ is not set
68# CONFIG_DEFAULT_NOOP is not set
69CONFIG_DEFAULT_IOSCHED="anticipatory"
70
71#
72# Machine selection 9# Machine selection
73# 10#
74# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -193,6 +130,69 @@ CONFIG_PREEMPT_NONE=y
193CONFIG_RTC_DS1742=y 130CONFIG_RTC_DS1742=y
194 131
195# 132#
133# Code maturity level options
134#
135CONFIG_EXPERIMENTAL=y
136CONFIG_CLEAN_COMPILE=y
137CONFIG_BROKEN_ON_SMP=y
138CONFIG_INIT_ENV_ARG_LIMIT=32
139
140#
141# General setup
142#
143CONFIG_LOCALVERSION=""
144CONFIG_LOCALVERSION_AUTO=y
145CONFIG_SWAP=y
146CONFIG_SYSVIPC=y
147# CONFIG_POSIX_MQUEUE is not set
148# CONFIG_BSD_PROCESS_ACCT is not set
149CONFIG_SYSCTL=y
150# CONFIG_AUDIT is not set
151CONFIG_HOTPLUG=y
152CONFIG_KOBJECT_UEVENT=y
153# CONFIG_IKCONFIG is not set
154CONFIG_INITRAMFS_SOURCE=""
155CONFIG_EMBEDDED=y
156CONFIG_KALLSYMS=y
157# CONFIG_KALLSYMS_EXTRA_PASS is not set
158CONFIG_PRINTK=y
159CONFIG_BUG=y
160CONFIG_BASE_FULL=y
161CONFIG_FUTEX=y
162CONFIG_EPOLL=y
163# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
164CONFIG_SHMEM=y
165CONFIG_CC_ALIGN_FUNCTIONS=0
166CONFIG_CC_ALIGN_LABELS=0
167CONFIG_CC_ALIGN_LOOPS=0
168CONFIG_CC_ALIGN_JUMPS=0
169# CONFIG_TINY_SHMEM is not set
170CONFIG_BASE_SMALL=0
171
172#
173# Loadable module support
174#
175# CONFIG_MODULES is not set
176
177#
178# Block layer
179#
180# CONFIG_LBD is not set
181
182#
183# IO Schedulers
184#
185CONFIG_IOSCHED_NOOP=y
186CONFIG_IOSCHED_AS=y
187CONFIG_IOSCHED_DEADLINE=y
188CONFIG_IOSCHED_CFQ=y
189CONFIG_DEFAULT_AS=y
190# CONFIG_DEFAULT_DEADLINE is not set
191# CONFIG_DEFAULT_CFQ is not set
192# CONFIG_DEFAULT_NOOP is not set
193CONFIG_DEFAULT_IOSCHED="anticipatory"
194
195#
196# Bus options (PCI, PCMCIA, EISA, ISA, TC) 196# Bus options (PCI, PCMCIA, EISA, ISA, TC)
197# 197#
198CONFIG_HW_HAS_PCI=y 198CONFIG_HW_HAS_PCI=y
@@ -280,7 +280,6 @@ CONFIG_TCP_CONG_BIC=y
280# QoS and/or fair queueing 280# QoS and/or fair queueing
281# 281#
282# CONFIG_NET_SCHED is not set 282# CONFIG_NET_SCHED is not set
283# CONFIG_NET_CLS_ROUTE is not set
284 283
285# 284#
286# Network testing 285# Network testing
diff --git a/arch/mips/configs/lasat200_defconfig b/arch/mips/configs/lasat200_defconfig
index f2bd620ff0fa..a7ad99b12fe5 100644
--- a/arch/mips/configs/lasat200_defconfig
+++ b/arch/mips/configs/lasat200_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:05:47 2005 4# Thu Nov 24 01:06:33 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -208,6 +139,75 @@ CONFIG_PREEMPT_NONE=y
208# CONFIG_PREEMPT is not set 139# CONFIG_PREEMPT is not set
209 140
210# 141#
142# Code maturity level options
143#
144CONFIG_EXPERIMENTAL=y
145CONFIG_CLEAN_COMPILE=y
146CONFIG_BROKEN_ON_SMP=y
147CONFIG_INIT_ENV_ARG_LIMIT=32
148
149#
150# General setup
151#
152CONFIG_LOCALVERSION=""
153CONFIG_LOCALVERSION_AUTO=y
154CONFIG_SWAP=y
155CONFIG_SYSVIPC=y
156# CONFIG_POSIX_MQUEUE is not set
157# CONFIG_BSD_PROCESS_ACCT is not set
158CONFIG_SYSCTL=y
159# CONFIG_AUDIT is not set
160CONFIG_HOTPLUG=y
161CONFIG_KOBJECT_UEVENT=y
162# CONFIG_IKCONFIG is not set
163CONFIG_INITRAMFS_SOURCE=""
164CONFIG_EMBEDDED=y
165CONFIG_KALLSYMS=y
166# CONFIG_KALLSYMS_EXTRA_PASS is not set
167CONFIG_PRINTK=y
168CONFIG_BUG=y
169CONFIG_BASE_FULL=y
170CONFIG_FUTEX=y
171CONFIG_EPOLL=y
172# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
173CONFIG_SHMEM=y
174CONFIG_CC_ALIGN_FUNCTIONS=0
175CONFIG_CC_ALIGN_LABELS=0
176CONFIG_CC_ALIGN_LOOPS=0
177CONFIG_CC_ALIGN_JUMPS=0
178# CONFIG_TINY_SHMEM is not set
179CONFIG_BASE_SMALL=0
180
181#
182# Loadable module support
183#
184CONFIG_MODULES=y
185CONFIG_MODULE_UNLOAD=y
186# CONFIG_MODULE_FORCE_UNLOAD is not set
187CONFIG_OBSOLETE_MODPARM=y
188CONFIG_MODVERSIONS=y
189CONFIG_MODULE_SRCVERSION_ALL=y
190CONFIG_KMOD=y
191
192#
193# Block layer
194#
195# CONFIG_LBD is not set
196
197#
198# IO Schedulers
199#
200CONFIG_IOSCHED_NOOP=y
201CONFIG_IOSCHED_AS=y
202CONFIG_IOSCHED_DEADLINE=y
203CONFIG_IOSCHED_CFQ=y
204CONFIG_DEFAULT_AS=y
205# CONFIG_DEFAULT_DEADLINE is not set
206# CONFIG_DEFAULT_CFQ is not set
207# CONFIG_DEFAULT_NOOP is not set
208CONFIG_DEFAULT_IOSCHED="anticipatory"
209
210#
211# Bus options (PCI, PCMCIA, EISA, ISA, TC) 211# Bus options (PCI, PCMCIA, EISA, ISA, TC)
212# 212#
213CONFIG_HW_HAS_PCI=y 213CONFIG_HW_HAS_PCI=y
@@ -291,7 +291,6 @@ CONFIG_TCP_CONG_BIC=y
291# QoS and/or fair queueing 291# QoS and/or fair queueing
292# 292#
293# CONFIG_NET_SCHED is not set 293# CONFIG_NET_SCHED is not set
294# CONFIG_NET_CLS_ROUTE is not set
295 294
296# 295#
297# Network testing 296# Network testing
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig
index e48e1de442b4..d1c44216f1c1 100644
--- a/arch/mips/configs/malta_defconfig
+++ b/arch/mips/configs/malta_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Thu Nov 10 13:42:55 2005 4# Thu Nov 24 01:06:35 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -221,6 +152,75 @@ CONFIG_PREEMPT_NONE=y
221# CONFIG_PREEMPT is not set 152# CONFIG_PREEMPT is not set
222 153
223# 154#
155# Code maturity level options
156#
157CONFIG_EXPERIMENTAL=y
158CONFIG_CLEAN_COMPILE=y
159CONFIG_BROKEN_ON_SMP=y
160CONFIG_INIT_ENV_ARG_LIMIT=32
161
162#
163# General setup
164#
165CONFIG_LOCALVERSION=""
166CONFIG_LOCALVERSION_AUTO=y
167CONFIG_SWAP=y
168CONFIG_SYSVIPC=y
169# CONFIG_POSIX_MQUEUE is not set
170# CONFIG_BSD_PROCESS_ACCT is not set
171CONFIG_SYSCTL=y
172# CONFIG_AUDIT is not set
173CONFIG_HOTPLUG=y
174CONFIG_KOBJECT_UEVENT=y
175# CONFIG_IKCONFIG is not set
176CONFIG_INITRAMFS_SOURCE=""
177CONFIG_EMBEDDED=y
178CONFIG_KALLSYMS=y
179# CONFIG_KALLSYMS_EXTRA_PASS is not set
180CONFIG_PRINTK=y
181CONFIG_BUG=y
182CONFIG_BASE_FULL=y
183CONFIG_FUTEX=y
184CONFIG_EPOLL=y
185# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
186CONFIG_SHMEM=y
187CONFIG_CC_ALIGN_FUNCTIONS=0
188CONFIG_CC_ALIGN_LABELS=0
189CONFIG_CC_ALIGN_LOOPS=0
190CONFIG_CC_ALIGN_JUMPS=0
191# CONFIG_TINY_SHMEM is not set
192CONFIG_BASE_SMALL=0
193
194#
195# Loadable module support
196#
197CONFIG_MODULES=y
198CONFIG_MODULE_UNLOAD=y
199# CONFIG_MODULE_FORCE_UNLOAD is not set
200CONFIG_OBSOLETE_MODPARM=y
201CONFIG_MODVERSIONS=y
202CONFIG_MODULE_SRCVERSION_ALL=y
203CONFIG_KMOD=y
204
205#
206# Block layer
207#
208# CONFIG_LBD is not set
209
210#
211# IO Schedulers
212#
213CONFIG_IOSCHED_NOOP=y
214CONFIG_IOSCHED_AS=y
215CONFIG_IOSCHED_DEADLINE=y
216CONFIG_IOSCHED_CFQ=y
217CONFIG_DEFAULT_AS=y
218# CONFIG_DEFAULT_DEADLINE is not set
219# CONFIG_DEFAULT_CFQ is not set
220# CONFIG_DEFAULT_NOOP is not set
221CONFIG_DEFAULT_IOSCHED="anticipatory"
222
223#
224# Bus options (PCI, PCMCIA, EISA, ISA, TC) 224# Bus options (PCI, PCMCIA, EISA, ISA, TC)
225# 225#
226CONFIG_HW_HAS_PCI=y 226CONFIG_HW_HAS_PCI=y
diff --git a/arch/mips/configs/mipssim_defconfig b/arch/mips/configs/mipssim_defconfig
index 04abd1b3202b..ac39ab7feeb7 100644
--- a/arch/mips/configs/mipssim_defconfig
+++ b/arch/mips/configs/mipssim_defconfig
@@ -1,81 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:05:55 2005 4# Thu Nov 24 01:06:37 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_ALL is not set
34# CONFIG_KALLSYMS_EXTRA_PASS is not set
35CONFIG_PRINTK=y
36CONFIG_BUG=y
37CONFIG_BASE_FULL=y
38CONFIG_FUTEX=y
39CONFIG_EPOLL=y
40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
41CONFIG_SHMEM=y
42CONFIG_CC_ALIGN_FUNCTIONS=0
43CONFIG_CC_ALIGN_LABELS=0
44CONFIG_CC_ALIGN_LOOPS=0
45CONFIG_CC_ALIGN_JUMPS=0
46# CONFIG_TINY_SHMEM is not set
47CONFIG_BASE_SMALL=0
48
49#
50# Loadable module support
51#
52CONFIG_MODULES=y
53CONFIG_MODULE_UNLOAD=y
54# CONFIG_MODULE_FORCE_UNLOAD is not set
55CONFIG_OBSOLETE_MODPARM=y
56CONFIG_MODVERSIONS=y
57CONFIG_MODULE_SRCVERSION_ALL=y
58CONFIG_KMOD=y
59
60#
61# Block layer
62#
63# CONFIG_LBD is not set
64
65#
66# IO Schedulers
67#
68CONFIG_IOSCHED_NOOP=y
69CONFIG_IOSCHED_AS=y
70CONFIG_IOSCHED_DEADLINE=y
71CONFIG_IOSCHED_CFQ=y
72CONFIG_DEFAULT_AS=y
73# CONFIG_DEFAULT_DEADLINE is not set
74# CONFIG_DEFAULT_CFQ is not set
75# CONFIG_DEFAULT_NOOP is not set
76CONFIG_DEFAULT_IOSCHED="anticipatory"
77
78#
79# Machine selection 9# Machine selection
80# 10#
81# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -208,6 +138,76 @@ CONFIG_PREEMPT_NONE=y
208# CONFIG_PREEMPT is not set 138# CONFIG_PREEMPT is not set
209 139
210# 140#
141# Code maturity level options
142#
143CONFIG_EXPERIMENTAL=y
144CONFIG_CLEAN_COMPILE=y
145CONFIG_BROKEN_ON_SMP=y
146CONFIG_INIT_ENV_ARG_LIMIT=32
147
148#
149# General setup
150#
151CONFIG_LOCALVERSION=""
152CONFIG_LOCALVERSION_AUTO=y
153CONFIG_SWAP=y
154CONFIG_SYSVIPC=y
155# CONFIG_POSIX_MQUEUE is not set
156# CONFIG_BSD_PROCESS_ACCT is not set
157CONFIG_SYSCTL=y
158# CONFIG_AUDIT is not set
159CONFIG_HOTPLUG=y
160CONFIG_KOBJECT_UEVENT=y
161# CONFIG_IKCONFIG is not set
162CONFIG_INITRAMFS_SOURCE=""
163CONFIG_EMBEDDED=y
164CONFIG_KALLSYMS=y
165# CONFIG_KALLSYMS_ALL is not set
166# CONFIG_KALLSYMS_EXTRA_PASS is not set
167CONFIG_PRINTK=y
168CONFIG_BUG=y
169CONFIG_BASE_FULL=y
170CONFIG_FUTEX=y
171CONFIG_EPOLL=y
172# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
173CONFIG_SHMEM=y
174CONFIG_CC_ALIGN_FUNCTIONS=0
175CONFIG_CC_ALIGN_LABELS=0
176CONFIG_CC_ALIGN_LOOPS=0
177CONFIG_CC_ALIGN_JUMPS=0
178# CONFIG_TINY_SHMEM is not set
179CONFIG_BASE_SMALL=0
180
181#
182# Loadable module support
183#
184CONFIG_MODULES=y
185CONFIG_MODULE_UNLOAD=y
186# CONFIG_MODULE_FORCE_UNLOAD is not set
187CONFIG_OBSOLETE_MODPARM=y
188CONFIG_MODVERSIONS=y
189CONFIG_MODULE_SRCVERSION_ALL=y
190CONFIG_KMOD=y
191
192#
193# Block layer
194#
195# CONFIG_LBD is not set
196
197#
198# IO Schedulers
199#
200CONFIG_IOSCHED_NOOP=y
201CONFIG_IOSCHED_AS=y
202CONFIG_IOSCHED_DEADLINE=y
203CONFIG_IOSCHED_CFQ=y
204CONFIG_DEFAULT_AS=y
205# CONFIG_DEFAULT_DEADLINE is not set
206# CONFIG_DEFAULT_CFQ is not set
207# CONFIG_DEFAULT_NOOP is not set
208CONFIG_DEFAULT_IOSCHED="anticipatory"
209
210#
211# Bus options (PCI, PCMCIA, EISA, ISA, TC) 211# Bus options (PCI, PCMCIA, EISA, ISA, TC)
212# 212#
213CONFIG_MMU=y 213CONFIG_MMU=y
@@ -558,6 +558,7 @@ CONFIG_LEGACY_PTY_COUNT=256
558# 558#
559# TPM devices 559# TPM devices
560# 560#
561# CONFIG_TCG_TPM is not set
561# CONFIG_TELCLOCK is not set 562# CONFIG_TELCLOCK is not set
562 563
563# 564#
diff --git a/arch/mips/configs/mpc30x_defconfig b/arch/mips/configs/mpc30x_defconfig
index 46814be0ac38..2b5ea37484e4 100644
--- a/arch/mips/configs/mpc30x_defconfig
+++ b/arch/mips/configs/mpc30x_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc1 3# Linux kernel version: 2.6.15-rc2
4# Tue Nov 15 11:12:01 2005 4# Thu Nov 24 01:06:39 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -206,6 +137,75 @@ CONFIG_PREEMPT_NONE=y
206# CONFIG_PREEMPT is not set 137# CONFIG_PREEMPT is not set
207 138
208# 139#
140# Code maturity level options
141#
142CONFIG_EXPERIMENTAL=y
143CONFIG_CLEAN_COMPILE=y
144CONFIG_BROKEN_ON_SMP=y
145CONFIG_INIT_ENV_ARG_LIMIT=32
146
147#
148# General setup
149#
150CONFIG_LOCALVERSION=""
151CONFIG_LOCALVERSION_AUTO=y
152CONFIG_SWAP=y
153CONFIG_SYSVIPC=y
154# CONFIG_POSIX_MQUEUE is not set
155# CONFIG_BSD_PROCESS_ACCT is not set
156CONFIG_SYSCTL=y
157# CONFIG_AUDIT is not set
158CONFIG_HOTPLUG=y
159CONFIG_KOBJECT_UEVENT=y
160# CONFIG_IKCONFIG is not set
161CONFIG_INITRAMFS_SOURCE=""
162CONFIG_EMBEDDED=y
163CONFIG_KALLSYMS=y
164# CONFIG_KALLSYMS_EXTRA_PASS is not set
165CONFIG_PRINTK=y
166CONFIG_BUG=y
167CONFIG_BASE_FULL=y
168CONFIG_FUTEX=y
169CONFIG_EPOLL=y
170# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
171CONFIG_SHMEM=y
172CONFIG_CC_ALIGN_FUNCTIONS=0
173CONFIG_CC_ALIGN_LABELS=0
174CONFIG_CC_ALIGN_LOOPS=0
175CONFIG_CC_ALIGN_JUMPS=0
176# CONFIG_TINY_SHMEM is not set
177CONFIG_BASE_SMALL=0
178
179#
180# Loadable module support
181#
182CONFIG_MODULES=y
183CONFIG_MODULE_UNLOAD=y
184# CONFIG_MODULE_FORCE_UNLOAD is not set
185CONFIG_OBSOLETE_MODPARM=y
186CONFIG_MODVERSIONS=y
187CONFIG_MODULE_SRCVERSION_ALL=y
188CONFIG_KMOD=y
189
190#
191# Block layer
192#
193# CONFIG_LBD is not set
194
195#
196# IO Schedulers
197#
198CONFIG_IOSCHED_NOOP=y
199CONFIG_IOSCHED_AS=y
200CONFIG_IOSCHED_DEADLINE=y
201CONFIG_IOSCHED_CFQ=y
202CONFIG_DEFAULT_AS=y
203# CONFIG_DEFAULT_DEADLINE is not set
204# CONFIG_DEFAULT_CFQ is not set
205# CONFIG_DEFAULT_NOOP is not set
206CONFIG_DEFAULT_IOSCHED="anticipatory"
207
208#
209# Bus options (PCI, PCMCIA, EISA, ISA, TC) 209# Bus options (PCI, PCMCIA, EISA, ISA, TC)
210# 210#
211CONFIG_HW_HAS_PCI=y 211CONFIG_HW_HAS_PCI=y
@@ -304,7 +304,6 @@ CONFIG_TCP_CONG_BIC=y
304# QoS and/or fair queueing 304# QoS and/or fair queueing
305# 305#
306# CONFIG_NET_SCHED is not set 306# CONFIG_NET_SCHED is not set
307# CONFIG_NET_CLS_ROUTE is not set
308 307
309# 308#
310# Network testing 309# Network testing
diff --git a/arch/mips/configs/ocelot_3_defconfig b/arch/mips/configs/ocelot_3_defconfig
index e12118c30db4..9081ea5a9dbd 100644
--- a/arch/mips/configs/ocelot_3_defconfig
+++ b/arch/mips/configs/ocelot_3_defconfig
@@ -1,81 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Thu Nov 10 14:01:36 2005 4# Thu Nov 24 01:06:41 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29CONFIG_IKCONFIG=y
30CONFIG_IKCONFIG_PROC=y
31CONFIG_INITRAMFS_SOURCE=""
32CONFIG_EMBEDDED=y
33CONFIG_KALLSYMS=y
34# CONFIG_KALLSYMS_EXTRA_PASS is not set
35CONFIG_PRINTK=y
36CONFIG_BUG=y
37CONFIG_BASE_FULL=y
38CONFIG_FUTEX=y
39CONFIG_EPOLL=y
40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
41CONFIG_SHMEM=y
42CONFIG_CC_ALIGN_FUNCTIONS=0
43CONFIG_CC_ALIGN_LABELS=0
44CONFIG_CC_ALIGN_LOOPS=0
45CONFIG_CC_ALIGN_JUMPS=0
46# CONFIG_TINY_SHMEM is not set
47CONFIG_BASE_SMALL=0
48
49#
50# Loadable module support
51#
52CONFIG_MODULES=y
53CONFIG_MODULE_UNLOAD=y
54# CONFIG_MODULE_FORCE_UNLOAD is not set
55CONFIG_OBSOLETE_MODPARM=y
56CONFIG_MODVERSIONS=y
57# CONFIG_MODULE_SRCVERSION_ALL is not set
58CONFIG_KMOD=y
59
60#
61# Block layer
62#
63# CONFIG_LBD is not set
64
65#
66# IO Schedulers
67#
68CONFIG_IOSCHED_NOOP=y
69CONFIG_IOSCHED_AS=y
70CONFIG_IOSCHED_DEADLINE=y
71CONFIG_IOSCHED_CFQ=y
72CONFIG_DEFAULT_AS=y
73# CONFIG_DEFAULT_DEADLINE is not set
74# CONFIG_DEFAULT_CFQ is not set
75# CONFIG_DEFAULT_NOOP is not set
76CONFIG_DEFAULT_IOSCHED="anticipatory"
77
78#
79# Machine selection 9# Machine selection
80# 10#
81# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -212,6 +142,76 @@ CONFIG_PREEMPT_NONE=y
212# CONFIG_PREEMPT is not set 142# CONFIG_PREEMPT is not set
213 143
214# 144#
145# Code maturity level options
146#
147CONFIG_EXPERIMENTAL=y
148CONFIG_CLEAN_COMPILE=y
149CONFIG_BROKEN_ON_SMP=y
150CONFIG_INIT_ENV_ARG_LIMIT=32
151
152#
153# General setup
154#
155CONFIG_LOCALVERSION=""
156CONFIG_LOCALVERSION_AUTO=y
157CONFIG_SWAP=y
158CONFIG_SYSVIPC=y
159# CONFIG_POSIX_MQUEUE is not set
160# CONFIG_BSD_PROCESS_ACCT is not set
161CONFIG_SYSCTL=y
162# CONFIG_AUDIT is not set
163CONFIG_HOTPLUG=y
164CONFIG_KOBJECT_UEVENT=y
165CONFIG_IKCONFIG=y
166CONFIG_IKCONFIG_PROC=y
167CONFIG_INITRAMFS_SOURCE=""
168CONFIG_EMBEDDED=y
169CONFIG_KALLSYMS=y
170# CONFIG_KALLSYMS_EXTRA_PASS is not set
171CONFIG_PRINTK=y
172CONFIG_BUG=y
173CONFIG_BASE_FULL=y
174CONFIG_FUTEX=y
175CONFIG_EPOLL=y
176# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
177CONFIG_SHMEM=y
178CONFIG_CC_ALIGN_FUNCTIONS=0
179CONFIG_CC_ALIGN_LABELS=0
180CONFIG_CC_ALIGN_LOOPS=0
181CONFIG_CC_ALIGN_JUMPS=0
182# CONFIG_TINY_SHMEM is not set
183CONFIG_BASE_SMALL=0
184
185#
186# Loadable module support
187#
188CONFIG_MODULES=y
189CONFIG_MODULE_UNLOAD=y
190# CONFIG_MODULE_FORCE_UNLOAD is not set
191CONFIG_OBSOLETE_MODPARM=y
192CONFIG_MODVERSIONS=y
193# CONFIG_MODULE_SRCVERSION_ALL is not set
194CONFIG_KMOD=y
195
196#
197# Block layer
198#
199# CONFIG_LBD is not set
200
201#
202# IO Schedulers
203#
204CONFIG_IOSCHED_NOOP=y
205CONFIG_IOSCHED_AS=y
206CONFIG_IOSCHED_DEADLINE=y
207CONFIG_IOSCHED_CFQ=y
208CONFIG_DEFAULT_AS=y
209# CONFIG_DEFAULT_DEADLINE is not set
210# CONFIG_DEFAULT_CFQ is not set
211# CONFIG_DEFAULT_NOOP is not set
212CONFIG_DEFAULT_IOSCHED="anticipatory"
213
214#
215# Bus options (PCI, PCMCIA, EISA, ISA, TC) 215# Bus options (PCI, PCMCIA, EISA, ISA, TC)
216# 216#
217CONFIG_HW_HAS_PCI=y 217CONFIG_HW_HAS_PCI=y
@@ -333,7 +333,6 @@ CONFIG_NETFILTER_NETLINK_LOG=m
333# QoS and/or fair queueing 333# QoS and/or fair queueing
334# 334#
335# CONFIG_NET_SCHED is not set 335# CONFIG_NET_SCHED is not set
336# CONFIG_NET_CLS_ROUTE is not set
337 336
338# 337#
339# Network testing 338# Network testing
diff --git a/arch/mips/configs/ocelot_c_defconfig b/arch/mips/configs/ocelot_c_defconfig
index 99f0c980aee7..570fc4d18166 100644
--- a/arch/mips/configs/ocelot_c_defconfig
+++ b/arch/mips/configs/ocelot_c_defconfig
@@ -1,73 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:06:05 2005 4# Thu Nov 24 01:06:43 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51# CONFIG_MODULES is not set
52
53#
54# Block layer
55#
56
57#
58# IO Schedulers
59#
60CONFIG_IOSCHED_NOOP=y
61CONFIG_IOSCHED_AS=y
62CONFIG_IOSCHED_DEADLINE=y
63CONFIG_IOSCHED_CFQ=y
64CONFIG_DEFAULT_AS=y
65# CONFIG_DEFAULT_DEADLINE is not set
66# CONFIG_DEFAULT_CFQ is not set
67# CONFIG_DEFAULT_NOOP is not set
68CONFIG_DEFAULT_IOSCHED="anticipatory"
69
70#
71# Machine selection 9# Machine selection
72# 10#
73# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -199,6 +137,68 @@ CONFIG_PREEMPT_NONE=y
199# CONFIG_PREEMPT is not set 137# CONFIG_PREEMPT is not set
200 138
201# 139#
140# Code maturity level options
141#
142CONFIG_EXPERIMENTAL=y
143CONFIG_CLEAN_COMPILE=y
144CONFIG_BROKEN_ON_SMP=y
145CONFIG_INIT_ENV_ARG_LIMIT=32
146
147#
148# General setup
149#
150CONFIG_LOCALVERSION=""
151CONFIG_LOCALVERSION_AUTO=y
152CONFIG_SWAP=y
153CONFIG_SYSVIPC=y
154# CONFIG_POSIX_MQUEUE is not set
155# CONFIG_BSD_PROCESS_ACCT is not set
156CONFIG_SYSCTL=y
157# CONFIG_AUDIT is not set
158CONFIG_HOTPLUG=y
159CONFIG_KOBJECT_UEVENT=y
160# CONFIG_IKCONFIG is not set
161CONFIG_INITRAMFS_SOURCE=""
162CONFIG_EMBEDDED=y
163CONFIG_KALLSYMS=y
164# CONFIG_KALLSYMS_EXTRA_PASS is not set
165CONFIG_PRINTK=y
166CONFIG_BUG=y
167CONFIG_BASE_FULL=y
168CONFIG_FUTEX=y
169CONFIG_EPOLL=y
170# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
171CONFIG_SHMEM=y
172CONFIG_CC_ALIGN_FUNCTIONS=0
173CONFIG_CC_ALIGN_LABELS=0
174CONFIG_CC_ALIGN_LOOPS=0
175CONFIG_CC_ALIGN_JUMPS=0
176# CONFIG_TINY_SHMEM is not set
177CONFIG_BASE_SMALL=0
178
179#
180# Loadable module support
181#
182# CONFIG_MODULES is not set
183
184#
185# Block layer
186#
187
188#
189# IO Schedulers
190#
191CONFIG_IOSCHED_NOOP=y
192CONFIG_IOSCHED_AS=y
193CONFIG_IOSCHED_DEADLINE=y
194CONFIG_IOSCHED_CFQ=y
195CONFIG_DEFAULT_AS=y
196# CONFIG_DEFAULT_DEADLINE is not set
197# CONFIG_DEFAULT_CFQ is not set
198# CONFIG_DEFAULT_NOOP is not set
199CONFIG_DEFAULT_IOSCHED="anticipatory"
200
201#
202# Bus options (PCI, PCMCIA, EISA, ISA, TC) 202# Bus options (PCI, PCMCIA, EISA, ISA, TC)
203# 203#
204CONFIG_HW_HAS_PCI=y 204CONFIG_HW_HAS_PCI=y
@@ -290,7 +290,6 @@ CONFIG_TCP_CONG_BIC=y
290# QoS and/or fair queueing 290# QoS and/or fair queueing
291# 291#
292# CONFIG_NET_SCHED is not set 292# CONFIG_NET_SCHED is not set
293# CONFIG_NET_CLS_ROUTE is not set
294 293
295# 294#
296# Network testing 295# Network testing
diff --git a/arch/mips/configs/ocelot_defconfig b/arch/mips/configs/ocelot_defconfig
index 11c7d74ee1e5..6634ab24715c 100644
--- a/arch/mips/configs/ocelot_defconfig
+++ b/arch/mips/configs/ocelot_defconfig
@@ -1,74 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:06:08 2005 4# Thu Nov 24 01:06:44 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27# CONFIG_HOTPLUG is not set
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51# CONFIG_MODULES is not set
52
53#
54# Block layer
55#
56# CONFIG_LBD is not set
57
58#
59# IO Schedulers
60#
61CONFIG_IOSCHED_NOOP=y
62CONFIG_IOSCHED_AS=y
63CONFIG_IOSCHED_DEADLINE=y
64CONFIG_IOSCHED_CFQ=y
65CONFIG_DEFAULT_AS=y
66# CONFIG_DEFAULT_DEADLINE is not set
67# CONFIG_DEFAULT_CFQ is not set
68# CONFIG_DEFAULT_NOOP is not set
69CONFIG_DEFAULT_IOSCHED="anticipatory"
70
71#
72# Machine selection 9# Machine selection
73# 10#
74# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -205,6 +142,69 @@ CONFIG_PREEMPT_NONE=y
205# CONFIG_PREEMPT is not set 142# CONFIG_PREEMPT is not set
206 143
207# 144#
145# Code maturity level options
146#
147CONFIG_EXPERIMENTAL=y
148CONFIG_CLEAN_COMPILE=y
149CONFIG_BROKEN_ON_SMP=y
150CONFIG_INIT_ENV_ARG_LIMIT=32
151
152#
153# General setup
154#
155CONFIG_LOCALVERSION=""
156CONFIG_LOCALVERSION_AUTO=y
157CONFIG_SWAP=y
158CONFIG_SYSVIPC=y
159# CONFIG_POSIX_MQUEUE is not set
160# CONFIG_BSD_PROCESS_ACCT is not set
161CONFIG_SYSCTL=y
162# CONFIG_AUDIT is not set
163# CONFIG_HOTPLUG is not set
164CONFIG_KOBJECT_UEVENT=y
165# CONFIG_IKCONFIG is not set
166CONFIG_INITRAMFS_SOURCE=""
167CONFIG_EMBEDDED=y
168CONFIG_KALLSYMS=y
169# CONFIG_KALLSYMS_EXTRA_PASS is not set
170CONFIG_PRINTK=y
171CONFIG_BUG=y
172CONFIG_BASE_FULL=y
173CONFIG_FUTEX=y
174CONFIG_EPOLL=y
175# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
176CONFIG_SHMEM=y
177CONFIG_CC_ALIGN_FUNCTIONS=0
178CONFIG_CC_ALIGN_LABELS=0
179CONFIG_CC_ALIGN_LOOPS=0
180CONFIG_CC_ALIGN_JUMPS=0
181# CONFIG_TINY_SHMEM is not set
182CONFIG_BASE_SMALL=0
183
184#
185# Loadable module support
186#
187# CONFIG_MODULES is not set
188
189#
190# Block layer
191#
192# CONFIG_LBD is not set
193
194#
195# IO Schedulers
196#
197CONFIG_IOSCHED_NOOP=y
198CONFIG_IOSCHED_AS=y
199CONFIG_IOSCHED_DEADLINE=y
200CONFIG_IOSCHED_CFQ=y
201CONFIG_DEFAULT_AS=y
202# CONFIG_DEFAULT_DEADLINE is not set
203# CONFIG_DEFAULT_CFQ is not set
204# CONFIG_DEFAULT_NOOP is not set
205CONFIG_DEFAULT_IOSCHED="anticipatory"
206
207#
208# Bus options (PCI, PCMCIA, EISA, ISA, TC) 208# Bus options (PCI, PCMCIA, EISA, ISA, TC)
209# 209#
210CONFIG_HW_HAS_PCI=y 210CONFIG_HW_HAS_PCI=y
@@ -289,7 +289,6 @@ CONFIG_TCP_CONG_BIC=y
289# QoS and/or fair queueing 289# QoS and/or fair queueing
290# 290#
291# CONFIG_NET_SCHED is not set 291# CONFIG_NET_SCHED is not set
292# CONFIG_NET_CLS_ROUTE is not set
293 292
294# 293#
295# Network testing 294# Network testing
@@ -527,6 +526,7 @@ CONFIG_LEGACY_PTY_COUNT=256
527# 526#
528# TPM devices 527# TPM devices
529# 528#
529# CONFIG_TCG_TPM is not set
530# CONFIG_TELCLOCK is not set 530# CONFIG_TELCLOCK is not set
531 531
532# 532#
diff --git a/arch/mips/configs/ocelot_g_defconfig b/arch/mips/configs/ocelot_g_defconfig
index 9ced1a9029d4..4c396e1e2f0a 100644
--- a/arch/mips/configs/ocelot_g_defconfig
+++ b/arch/mips/configs/ocelot_g_defconfig
@@ -1,73 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:06:11 2005 4# Thu Nov 24 01:06:46 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51# CONFIG_MODULES is not set
52
53#
54# Block layer
55#
56
57#
58# IO Schedulers
59#
60CONFIG_IOSCHED_NOOP=y
61CONFIG_IOSCHED_AS=y
62CONFIG_IOSCHED_DEADLINE=y
63CONFIG_IOSCHED_CFQ=y
64CONFIG_DEFAULT_AS=y
65# CONFIG_DEFAULT_DEADLINE is not set
66# CONFIG_DEFAULT_CFQ is not set
67# CONFIG_DEFAULT_NOOP is not set
68CONFIG_DEFAULT_IOSCHED="anticipatory"
69
70#
71# Machine selection 9# Machine selection
72# 10#
73# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -202,6 +140,68 @@ CONFIG_PREEMPT_NONE=y
202# CONFIG_PREEMPT is not set 140# CONFIG_PREEMPT is not set
203 141
204# 142#
143# Code maturity level options
144#
145CONFIG_EXPERIMENTAL=y
146CONFIG_CLEAN_COMPILE=y
147CONFIG_BROKEN_ON_SMP=y
148CONFIG_INIT_ENV_ARG_LIMIT=32
149
150#
151# General setup
152#
153CONFIG_LOCALVERSION=""
154CONFIG_LOCALVERSION_AUTO=y
155CONFIG_SWAP=y
156CONFIG_SYSVIPC=y
157# CONFIG_POSIX_MQUEUE is not set
158# CONFIG_BSD_PROCESS_ACCT is not set
159CONFIG_SYSCTL=y
160# CONFIG_AUDIT is not set
161CONFIG_HOTPLUG=y
162CONFIG_KOBJECT_UEVENT=y
163# CONFIG_IKCONFIG is not set
164CONFIG_INITRAMFS_SOURCE=""
165CONFIG_EMBEDDED=y
166CONFIG_KALLSYMS=y
167# CONFIG_KALLSYMS_EXTRA_PASS is not set
168CONFIG_PRINTK=y
169CONFIG_BUG=y
170CONFIG_BASE_FULL=y
171CONFIG_FUTEX=y
172CONFIG_EPOLL=y
173# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
174CONFIG_SHMEM=y
175CONFIG_CC_ALIGN_FUNCTIONS=0
176CONFIG_CC_ALIGN_LABELS=0
177CONFIG_CC_ALIGN_LOOPS=0
178CONFIG_CC_ALIGN_JUMPS=0
179# CONFIG_TINY_SHMEM is not set
180CONFIG_BASE_SMALL=0
181
182#
183# Loadable module support
184#
185# CONFIG_MODULES is not set
186
187#
188# Block layer
189#
190
191#
192# IO Schedulers
193#
194CONFIG_IOSCHED_NOOP=y
195CONFIG_IOSCHED_AS=y
196CONFIG_IOSCHED_DEADLINE=y
197CONFIG_IOSCHED_CFQ=y
198CONFIG_DEFAULT_AS=y
199# CONFIG_DEFAULT_DEADLINE is not set
200# CONFIG_DEFAULT_CFQ is not set
201# CONFIG_DEFAULT_NOOP is not set
202CONFIG_DEFAULT_IOSCHED="anticipatory"
203
204#
205# Bus options (PCI, PCMCIA, EISA, ISA, TC) 205# Bus options (PCI, PCMCIA, EISA, ISA, TC)
206# 206#
207CONFIG_HW_HAS_PCI=y 207CONFIG_HW_HAS_PCI=y
@@ -293,7 +293,6 @@ CONFIG_TCP_CONG_BIC=y
293# QoS and/or fair queueing 293# QoS and/or fair queueing
294# 294#
295# CONFIG_NET_SCHED is not set 295# CONFIG_NET_SCHED is not set
296# CONFIG_NET_CLS_ROUTE is not set
297 296
298# 297#
299# Network testing 298# Network testing
diff --git a/arch/mips/configs/pb1100_defconfig b/arch/mips/configs/pb1100_defconfig
index dbcaa77add7c..883626afc47d 100644
--- a/arch/mips/configs/pb1100_defconfig
+++ b/arch/mips/configs/pb1100_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc1 3# Linux kernel version: 2.6.15-rc2
4# Tue Nov 15 11:12:31 2005 4# Thu Nov 24 01:06:48 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -204,6 +135,75 @@ CONFIG_PREEMPT_NONE=y
204# CONFIG_PREEMPT is not set 135# CONFIG_PREEMPT is not set
205 136
206# 137#
138# Code maturity level options
139#
140CONFIG_EXPERIMENTAL=y
141CONFIG_CLEAN_COMPILE=y
142CONFIG_BROKEN_ON_SMP=y
143CONFIG_INIT_ENV_ARG_LIMIT=32
144
145#
146# General setup
147#
148CONFIG_LOCALVERSION=""
149CONFIG_LOCALVERSION_AUTO=y
150CONFIG_SWAP=y
151CONFIG_SYSVIPC=y
152# CONFIG_POSIX_MQUEUE is not set
153# CONFIG_BSD_PROCESS_ACCT is not set
154CONFIG_SYSCTL=y
155# CONFIG_AUDIT is not set
156CONFIG_HOTPLUG=y
157CONFIG_KOBJECT_UEVENT=y
158# CONFIG_IKCONFIG is not set
159CONFIG_INITRAMFS_SOURCE=""
160CONFIG_EMBEDDED=y
161CONFIG_KALLSYMS=y
162# CONFIG_KALLSYMS_EXTRA_PASS is not set
163CONFIG_PRINTK=y
164CONFIG_BUG=y
165CONFIG_BASE_FULL=y
166CONFIG_FUTEX=y
167CONFIG_EPOLL=y
168# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
169CONFIG_SHMEM=y
170CONFIG_CC_ALIGN_FUNCTIONS=0
171CONFIG_CC_ALIGN_LABELS=0
172CONFIG_CC_ALIGN_LOOPS=0
173CONFIG_CC_ALIGN_JUMPS=0
174# CONFIG_TINY_SHMEM is not set
175CONFIG_BASE_SMALL=0
176
177#
178# Loadable module support
179#
180CONFIG_MODULES=y
181CONFIG_MODULE_UNLOAD=y
182# CONFIG_MODULE_FORCE_UNLOAD is not set
183CONFIG_OBSOLETE_MODPARM=y
184CONFIG_MODVERSIONS=y
185CONFIG_MODULE_SRCVERSION_ALL=y
186CONFIG_KMOD=y
187
188#
189# Block layer
190#
191# CONFIG_LBD is not set
192
193#
194# IO Schedulers
195#
196CONFIG_IOSCHED_NOOP=y
197CONFIG_IOSCHED_AS=y
198CONFIG_IOSCHED_DEADLINE=y
199CONFIG_IOSCHED_CFQ=y
200CONFIG_DEFAULT_AS=y
201# CONFIG_DEFAULT_DEADLINE is not set
202# CONFIG_DEFAULT_CFQ is not set
203# CONFIG_DEFAULT_NOOP is not set
204CONFIG_DEFAULT_IOSCHED="anticipatory"
205
206#
207# Bus options (PCI, PCMCIA, EISA, ISA, TC) 207# Bus options (PCI, PCMCIA, EISA, ISA, TC)
208# 208#
209CONFIG_HW_HAS_PCI=y 209CONFIG_HW_HAS_PCI=y
@@ -322,7 +322,6 @@ CONFIG_NETFILTER_NETLINK_LOG=m
322# QoS and/or fair queueing 322# QoS and/or fair queueing
323# 323#
324# CONFIG_NET_SCHED is not set 324# CONFIG_NET_SCHED is not set
325# CONFIG_NET_CLS_ROUTE is not set
326 325
327# 326#
328# Network testing 327# Network testing
@@ -662,6 +661,7 @@ CONFIG_SYNCLINK_CS=m
662# 661#
663# TPM devices 662# TPM devices
664# 663#
664# CONFIG_TCG_TPM is not set
665# CONFIG_TELCLOCK is not set 665# CONFIG_TELCLOCK is not set
666 666
667# 667#
diff --git a/arch/mips/configs/pb1500_defconfig b/arch/mips/configs/pb1500_defconfig
index 5b685ceb6fde..f8fbc77f924e 100644
--- a/arch/mips/configs/pb1500_defconfig
+++ b/arch/mips/configs/pb1500_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc1 3# Linux kernel version: 2.6.15-rc2
4# Tue Nov 15 11:14:25 2005 4# Thu Nov 24 01:06:50 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -203,6 +134,75 @@ CONFIG_PREEMPT_NONE=y
203# CONFIG_PREEMPT is not set 134# CONFIG_PREEMPT is not set
204 135
205# 136#
137# Code maturity level options
138#
139CONFIG_EXPERIMENTAL=y
140CONFIG_CLEAN_COMPILE=y
141CONFIG_BROKEN_ON_SMP=y
142CONFIG_INIT_ENV_ARG_LIMIT=32
143
144#
145# General setup
146#
147CONFIG_LOCALVERSION=""
148CONFIG_LOCALVERSION_AUTO=y
149CONFIG_SWAP=y
150CONFIG_SYSVIPC=y
151# CONFIG_POSIX_MQUEUE is not set
152# CONFIG_BSD_PROCESS_ACCT is not set
153CONFIG_SYSCTL=y
154# CONFIG_AUDIT is not set
155CONFIG_HOTPLUG=y
156CONFIG_KOBJECT_UEVENT=y
157# CONFIG_IKCONFIG is not set
158CONFIG_INITRAMFS_SOURCE=""
159CONFIG_EMBEDDED=y
160CONFIG_KALLSYMS=y
161# CONFIG_KALLSYMS_EXTRA_PASS is not set
162CONFIG_PRINTK=y
163CONFIG_BUG=y
164CONFIG_BASE_FULL=y
165CONFIG_FUTEX=y
166CONFIG_EPOLL=y
167# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
168CONFIG_SHMEM=y
169CONFIG_CC_ALIGN_FUNCTIONS=0
170CONFIG_CC_ALIGN_LABELS=0
171CONFIG_CC_ALIGN_LOOPS=0
172CONFIG_CC_ALIGN_JUMPS=0
173# CONFIG_TINY_SHMEM is not set
174CONFIG_BASE_SMALL=0
175
176#
177# Loadable module support
178#
179CONFIG_MODULES=y
180CONFIG_MODULE_UNLOAD=y
181# CONFIG_MODULE_FORCE_UNLOAD is not set
182CONFIG_OBSOLETE_MODPARM=y
183CONFIG_MODVERSIONS=y
184CONFIG_MODULE_SRCVERSION_ALL=y
185CONFIG_KMOD=y
186
187#
188# Block layer
189#
190# CONFIG_LBD is not set
191
192#
193# IO Schedulers
194#
195CONFIG_IOSCHED_NOOP=y
196CONFIG_IOSCHED_AS=y
197CONFIG_IOSCHED_DEADLINE=y
198CONFIG_IOSCHED_CFQ=y
199CONFIG_DEFAULT_AS=y
200# CONFIG_DEFAULT_DEADLINE is not set
201# CONFIG_DEFAULT_CFQ is not set
202# CONFIG_DEFAULT_NOOP is not set
203CONFIG_DEFAULT_IOSCHED="anticipatory"
204
205#
206# Bus options (PCI, PCMCIA, EISA, ISA, TC) 206# Bus options (PCI, PCMCIA, EISA, ISA, TC)
207# 207#
208CONFIG_HW_HAS_PCI=y 208CONFIG_HW_HAS_PCI=y
@@ -328,7 +328,6 @@ CONFIG_NETFILTER_NETLINK_LOG=m
328# QoS and/or fair queueing 328# QoS and/or fair queueing
329# 329#
330# CONFIG_NET_SCHED is not set 330# CONFIG_NET_SCHED is not set
331# CONFIG_NET_CLS_ROUTE is not set
332 331
333# 332#
334# Network testing 333# Network testing
diff --git a/arch/mips/configs/pb1550_defconfig b/arch/mips/configs/pb1550_defconfig
index f8f32e99f72d..3d694cd68d38 100644
--- a/arch/mips/configs/pb1550_defconfig
+++ b/arch/mips/configs/pb1550_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc1 3# Linux kernel version: 2.6.15-rc2
4# Tue Nov 15 11:15:34 2005 4# Thu Nov 24 01:06:52 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -203,6 +134,75 @@ CONFIG_PREEMPT_NONE=y
203# CONFIG_PREEMPT is not set 134# CONFIG_PREEMPT is not set
204 135
205# 136#
137# Code maturity level options
138#
139CONFIG_EXPERIMENTAL=y
140CONFIG_CLEAN_COMPILE=y
141CONFIG_BROKEN_ON_SMP=y
142CONFIG_INIT_ENV_ARG_LIMIT=32
143
144#
145# General setup
146#
147CONFIG_LOCALVERSION=""
148CONFIG_LOCALVERSION_AUTO=y
149CONFIG_SWAP=y
150CONFIG_SYSVIPC=y
151# CONFIG_POSIX_MQUEUE is not set
152# CONFIG_BSD_PROCESS_ACCT is not set
153CONFIG_SYSCTL=y
154# CONFIG_AUDIT is not set
155CONFIG_HOTPLUG=y
156CONFIG_KOBJECT_UEVENT=y
157# CONFIG_IKCONFIG is not set
158CONFIG_INITRAMFS_SOURCE=""
159CONFIG_EMBEDDED=y
160CONFIG_KALLSYMS=y
161# CONFIG_KALLSYMS_EXTRA_PASS is not set
162CONFIG_PRINTK=y
163CONFIG_BUG=y
164CONFIG_BASE_FULL=y
165CONFIG_FUTEX=y
166CONFIG_EPOLL=y
167# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
168CONFIG_SHMEM=y
169CONFIG_CC_ALIGN_FUNCTIONS=0
170CONFIG_CC_ALIGN_LABELS=0
171CONFIG_CC_ALIGN_LOOPS=0
172CONFIG_CC_ALIGN_JUMPS=0
173# CONFIG_TINY_SHMEM is not set
174CONFIG_BASE_SMALL=0
175
176#
177# Loadable module support
178#
179CONFIG_MODULES=y
180CONFIG_MODULE_UNLOAD=y
181# CONFIG_MODULE_FORCE_UNLOAD is not set
182CONFIG_OBSOLETE_MODPARM=y
183CONFIG_MODVERSIONS=y
184CONFIG_MODULE_SRCVERSION_ALL=y
185CONFIG_KMOD=y
186
187#
188# Block layer
189#
190# CONFIG_LBD is not set
191
192#
193# IO Schedulers
194#
195CONFIG_IOSCHED_NOOP=y
196CONFIG_IOSCHED_AS=y
197CONFIG_IOSCHED_DEADLINE=y
198CONFIG_IOSCHED_CFQ=y
199CONFIG_DEFAULT_AS=y
200# CONFIG_DEFAULT_DEADLINE is not set
201# CONFIG_DEFAULT_CFQ is not set
202# CONFIG_DEFAULT_NOOP is not set
203CONFIG_DEFAULT_IOSCHED="anticipatory"
204
205#
206# Bus options (PCI, PCMCIA, EISA, ISA, TC) 206# Bus options (PCI, PCMCIA, EISA, ISA, TC)
207# 207#
208CONFIG_HW_HAS_PCI=y 208CONFIG_HW_HAS_PCI=y
@@ -328,7 +328,6 @@ CONFIG_NETFILTER_NETLINK_LOG=m
328# QoS and/or fair queueing 328# QoS and/or fair queueing
329# 329#
330# CONFIG_NET_SCHED is not set 330# CONFIG_NET_SCHED is not set
331# CONFIG_NET_CLS_ROUTE is not set
332 331
333# 332#
334# Network testing 333# Network testing
diff --git a/arch/mips/configs/pnx8550-jbs_defconfig b/arch/mips/configs/pnx8550-jbs_defconfig
index 5820e5f2295e..fba624a792a9 100644
--- a/arch/mips/configs/pnx8550-jbs_defconfig
+++ b/arch/mips/configs/pnx8550-jbs_defconfig
@@ -1,81 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:06:25 2005 4# Thu Nov 24 01:06:54 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27# CONFIG_HOTPLUG is not set
28CONFIG_KOBJECT_UEVENT=y
29CONFIG_IKCONFIG=y
30CONFIG_IKCONFIG_PROC=y
31CONFIG_INITRAMFS_SOURCE=""
32CONFIG_EMBEDDED=y
33CONFIG_KALLSYMS=y
34# CONFIG_KALLSYMS_ALL is not set
35# CONFIG_KALLSYMS_EXTRA_PASS is not set
36CONFIG_PRINTK=y
37CONFIG_BUG=y
38CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y
40CONFIG_EPOLL=y
41# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
42CONFIG_SHMEM=y
43CONFIG_CC_ALIGN_FUNCTIONS=0
44CONFIG_CC_ALIGN_LABELS=0
45CONFIG_CC_ALIGN_LOOPS=0
46CONFIG_CC_ALIGN_JUMPS=0
47# CONFIG_TINY_SHMEM is not set
48CONFIG_BASE_SMALL=0
49
50#
51# Loadable module support
52#
53CONFIG_MODULES=y
54# CONFIG_MODULE_UNLOAD is not set
55CONFIG_OBSOLETE_MODPARM=y
56# CONFIG_MODVERSIONS is not set
57# CONFIG_MODULE_SRCVERSION_ALL is not set
58CONFIG_KMOD=y
59
60#
61# Block layer
62#
63# CONFIG_LBD is not set
64
65#
66# IO Schedulers
67#
68CONFIG_IOSCHED_NOOP=y
69CONFIG_IOSCHED_AS=y
70CONFIG_IOSCHED_DEADLINE=y
71CONFIG_IOSCHED_CFQ=y
72CONFIG_DEFAULT_AS=y
73# CONFIG_DEFAULT_DEADLINE is not set
74# CONFIG_DEFAULT_CFQ is not set
75# CONFIG_DEFAULT_NOOP is not set
76CONFIG_DEFAULT_IOSCHED="anticipatory"
77
78#
79# Machine selection 9# Machine selection
80# 10#
81# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -203,6 +133,76 @@ CONFIG_PREEMPT_NONE=y
203# CONFIG_PREEMPT is not set 133# CONFIG_PREEMPT is not set
204 134
205# 135#
136# Code maturity level options
137#
138CONFIG_EXPERIMENTAL=y
139CONFIG_CLEAN_COMPILE=y
140CONFIG_BROKEN_ON_SMP=y
141CONFIG_INIT_ENV_ARG_LIMIT=32
142
143#
144# General setup
145#
146CONFIG_LOCALVERSION=""
147CONFIG_LOCALVERSION_AUTO=y
148CONFIG_SWAP=y
149CONFIG_SYSVIPC=y
150# CONFIG_POSIX_MQUEUE is not set
151# CONFIG_BSD_PROCESS_ACCT is not set
152CONFIG_SYSCTL=y
153# CONFIG_AUDIT is not set
154# CONFIG_HOTPLUG is not set
155CONFIG_KOBJECT_UEVENT=y
156CONFIG_IKCONFIG=y
157CONFIG_IKCONFIG_PROC=y
158CONFIG_INITRAMFS_SOURCE=""
159CONFIG_EMBEDDED=y
160CONFIG_KALLSYMS=y
161# CONFIG_KALLSYMS_ALL is not set
162# CONFIG_KALLSYMS_EXTRA_PASS is not set
163CONFIG_PRINTK=y
164CONFIG_BUG=y
165CONFIG_BASE_FULL=y
166CONFIG_FUTEX=y
167CONFIG_EPOLL=y
168# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
169CONFIG_SHMEM=y
170CONFIG_CC_ALIGN_FUNCTIONS=0
171CONFIG_CC_ALIGN_LABELS=0
172CONFIG_CC_ALIGN_LOOPS=0
173CONFIG_CC_ALIGN_JUMPS=0
174# CONFIG_TINY_SHMEM is not set
175CONFIG_BASE_SMALL=0
176
177#
178# Loadable module support
179#
180CONFIG_MODULES=y
181# CONFIG_MODULE_UNLOAD is not set
182CONFIG_OBSOLETE_MODPARM=y
183# CONFIG_MODVERSIONS is not set
184# CONFIG_MODULE_SRCVERSION_ALL is not set
185CONFIG_KMOD=y
186
187#
188# Block layer
189#
190# CONFIG_LBD is not set
191
192#
193# IO Schedulers
194#
195CONFIG_IOSCHED_NOOP=y
196CONFIG_IOSCHED_AS=y
197CONFIG_IOSCHED_DEADLINE=y
198CONFIG_IOSCHED_CFQ=y
199CONFIG_DEFAULT_AS=y
200# CONFIG_DEFAULT_DEADLINE is not set
201# CONFIG_DEFAULT_CFQ is not set
202# CONFIG_DEFAULT_NOOP is not set
203CONFIG_DEFAULT_IOSCHED="anticipatory"
204
205#
206# Bus options (PCI, PCMCIA, EISA, ISA, TC) 206# Bus options (PCI, PCMCIA, EISA, ISA, TC)
207# 207#
208CONFIG_HW_HAS_PCI=y 208CONFIG_HW_HAS_PCI=y
@@ -289,7 +289,6 @@ CONFIG_TCP_CONG_BIC=y
289# QoS and/or fair queueing 289# QoS and/or fair queueing
290# 290#
291# CONFIG_NET_SCHED is not set 291# CONFIG_NET_SCHED is not set
292# CONFIG_NET_CLS_ROUTE is not set
293 292
294# 293#
295# Network testing 294# Network testing
diff --git a/arch/mips/configs/pnx8550-v2pci_defconfig b/arch/mips/configs/pnx8550-v2pci_defconfig
index a4ebb538e15c..d9a0d2fdba4f 100644
--- a/arch/mips/configs/pnx8550-v2pci_defconfig
+++ b/arch/mips/configs/pnx8550-v2pci_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Thu Nov 10 14:02:38 2005 4# Thu Nov 24 01:06:58 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27# CONFIG_HOTPLUG is not set
28CONFIG_KOBJECT_UEVENT=y
29CONFIG_IKCONFIG=y
30CONFIG_IKCONFIG_PROC=y
31CONFIG_INITRAMFS_SOURCE=""
32CONFIG_EMBEDDED=y
33CONFIG_KALLSYMS=y
34# CONFIG_KALLSYMS_EXTRA_PASS is not set
35CONFIG_PRINTK=y
36CONFIG_BUG=y
37CONFIG_BASE_FULL=y
38CONFIG_FUTEX=y
39CONFIG_EPOLL=y
40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
41CONFIG_SHMEM=y
42CONFIG_CC_ALIGN_FUNCTIONS=0
43CONFIG_CC_ALIGN_LABELS=0
44CONFIG_CC_ALIGN_LOOPS=0
45CONFIG_CC_ALIGN_JUMPS=0
46# CONFIG_TINY_SHMEM is not set
47CONFIG_BASE_SMALL=0
48
49#
50# Loadable module support
51#
52CONFIG_MODULES=y
53# CONFIG_MODULE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55# CONFIG_MODVERSIONS is not set
56# CONFIG_MODULE_SRCVERSION_ALL is not set
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -204,6 +135,75 @@ CONFIG_PREEMPT_NONE=y
204# CONFIG_PREEMPT is not set 135# CONFIG_PREEMPT is not set
205 136
206# 137#
138# Code maturity level options
139#
140CONFIG_EXPERIMENTAL=y
141CONFIG_CLEAN_COMPILE=y
142CONFIG_BROKEN_ON_SMP=y
143CONFIG_INIT_ENV_ARG_LIMIT=32
144
145#
146# General setup
147#
148CONFIG_LOCALVERSION=""
149CONFIG_LOCALVERSION_AUTO=y
150CONFIG_SWAP=y
151CONFIG_SYSVIPC=y
152# CONFIG_POSIX_MQUEUE is not set
153# CONFIG_BSD_PROCESS_ACCT is not set
154CONFIG_SYSCTL=y
155# CONFIG_AUDIT is not set
156# CONFIG_HOTPLUG is not set
157CONFIG_KOBJECT_UEVENT=y
158CONFIG_IKCONFIG=y
159CONFIG_IKCONFIG_PROC=y
160CONFIG_INITRAMFS_SOURCE=""
161CONFIG_EMBEDDED=y
162CONFIG_KALLSYMS=y
163# CONFIG_KALLSYMS_EXTRA_PASS is not set
164CONFIG_PRINTK=y
165CONFIG_BUG=y
166CONFIG_BASE_FULL=y
167CONFIG_FUTEX=y
168CONFIG_EPOLL=y
169# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
170CONFIG_SHMEM=y
171CONFIG_CC_ALIGN_FUNCTIONS=0
172CONFIG_CC_ALIGN_LABELS=0
173CONFIG_CC_ALIGN_LOOPS=0
174CONFIG_CC_ALIGN_JUMPS=0
175# CONFIG_TINY_SHMEM is not set
176CONFIG_BASE_SMALL=0
177
178#
179# Loadable module support
180#
181CONFIG_MODULES=y
182# CONFIG_MODULE_UNLOAD is not set
183CONFIG_OBSOLETE_MODPARM=y
184# CONFIG_MODVERSIONS is not set
185# CONFIG_MODULE_SRCVERSION_ALL is not set
186CONFIG_KMOD=y
187
188#
189# Block layer
190#
191# CONFIG_LBD is not set
192
193#
194# IO Schedulers
195#
196CONFIG_IOSCHED_NOOP=y
197CONFIG_IOSCHED_AS=y
198CONFIG_IOSCHED_DEADLINE=y
199CONFIG_IOSCHED_CFQ=y
200CONFIG_DEFAULT_AS=y
201# CONFIG_DEFAULT_DEADLINE is not set
202# CONFIG_DEFAULT_CFQ is not set
203# CONFIG_DEFAULT_NOOP is not set
204CONFIG_DEFAULT_IOSCHED="anticipatory"
205
206#
207# Bus options (PCI, PCMCIA, EISA, ISA, TC) 207# Bus options (PCI, PCMCIA, EISA, ISA, TC)
208# 208#
209CONFIG_HW_HAS_PCI=y 209CONFIG_HW_HAS_PCI=y
@@ -321,7 +321,6 @@ CONFIG_NETFILTER=y
321# QoS and/or fair queueing 321# QoS and/or fair queueing
322# 322#
323# CONFIG_NET_SCHED is not set 323# CONFIG_NET_SCHED is not set
324# CONFIG_NET_CLS_ROUTE is not set
325 324
326# 325#
327# Network testing 326# Network testing
diff --git a/arch/mips/configs/qemu_defconfig b/arch/mips/configs/qemu_defconfig
index 5d39162077f4..dee44606164c 100644
--- a/arch/mips/configs/qemu_defconfig
+++ b/arch/mips/configs/qemu_defconfig
@@ -1,73 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:06:31 2005 4# Thu Nov 24 01:07:00 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11# CONFIG_EXPERIMENTAL is not set
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21# CONFIG_SWAP is not set
22# CONFIG_SYSVIPC is not set
23# CONFIG_BSD_PROCESS_ACCT is not set
24# CONFIG_SYSCTL is not set
25# CONFIG_AUDIT is not set
26# CONFIG_HOTPLUG is not set
27CONFIG_KOBJECT_UEVENT=y
28# CONFIG_IKCONFIG is not set
29CONFIG_INITRAMFS_SOURCE=""
30CONFIG_EMBEDDED=y
31CONFIG_KALLSYMS=y
32# CONFIG_KALLSYMS_EXTRA_PASS is not set
33CONFIG_PRINTK=y
34# CONFIG_BUG is not set
35# CONFIG_BASE_FULL is not set
36# CONFIG_FUTEX is not set
37# CONFIG_EPOLL is not set
38# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
39# CONFIG_SHMEM is not set
40CONFIG_CC_ALIGN_FUNCTIONS=0
41CONFIG_CC_ALIGN_LABELS=0
42CONFIG_CC_ALIGN_LOOPS=0
43CONFIG_CC_ALIGN_JUMPS=0
44CONFIG_TINY_SHMEM=y
45CONFIG_BASE_SMALL=1
46
47#
48# Loadable module support
49#
50# CONFIG_MODULES is not set
51
52#
53# Block layer
54#
55# CONFIG_LBD is not set
56
57#
58# IO Schedulers
59#
60CONFIG_IOSCHED_NOOP=y
61# CONFIG_IOSCHED_AS is not set
62# CONFIG_IOSCHED_DEADLINE is not set
63# CONFIG_IOSCHED_CFQ is not set
64# CONFIG_DEFAULT_AS is not set
65# CONFIG_DEFAULT_DEADLINE is not set
66# CONFIG_DEFAULT_CFQ is not set
67CONFIG_DEFAULT_NOOP=y
68CONFIG_DEFAULT_IOSCHED="noop"
69
70#
71# Machine selection 9# Machine selection
72# 10#
73# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -192,6 +130,68 @@ CONFIG_PREEMPT_NONE=y
192# CONFIG_PREEMPT is not set 130# CONFIG_PREEMPT is not set
193 131
194# 132#
133# Code maturity level options
134#
135# CONFIG_EXPERIMENTAL is not set
136CONFIG_CLEAN_COMPILE=y
137CONFIG_BROKEN_ON_SMP=y
138CONFIG_INIT_ENV_ARG_LIMIT=32
139
140#
141# General setup
142#
143CONFIG_LOCALVERSION=""
144CONFIG_LOCALVERSION_AUTO=y
145# CONFIG_SWAP is not set
146# CONFIG_SYSVIPC is not set
147# CONFIG_BSD_PROCESS_ACCT is not set
148# CONFIG_SYSCTL is not set
149# CONFIG_AUDIT is not set
150# CONFIG_HOTPLUG is not set
151CONFIG_KOBJECT_UEVENT=y
152# CONFIG_IKCONFIG is not set
153CONFIG_INITRAMFS_SOURCE=""
154CONFIG_EMBEDDED=y
155CONFIG_KALLSYMS=y
156# CONFIG_KALLSYMS_EXTRA_PASS is not set
157CONFIG_PRINTK=y
158# CONFIG_BUG is not set
159# CONFIG_BASE_FULL is not set
160# CONFIG_FUTEX is not set
161# CONFIG_EPOLL is not set
162# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
163# CONFIG_SHMEM is not set
164CONFIG_CC_ALIGN_FUNCTIONS=0
165CONFIG_CC_ALIGN_LABELS=0
166CONFIG_CC_ALIGN_LOOPS=0
167CONFIG_CC_ALIGN_JUMPS=0
168CONFIG_TINY_SHMEM=y
169CONFIG_BASE_SMALL=1
170
171#
172# Loadable module support
173#
174# CONFIG_MODULES is not set
175
176#
177# Block layer
178#
179# CONFIG_LBD is not set
180
181#
182# IO Schedulers
183#
184CONFIG_IOSCHED_NOOP=y
185# CONFIG_IOSCHED_AS is not set
186# CONFIG_IOSCHED_DEADLINE is not set
187# CONFIG_IOSCHED_CFQ is not set
188# CONFIG_DEFAULT_AS is not set
189# CONFIG_DEFAULT_DEADLINE is not set
190# CONFIG_DEFAULT_CFQ is not set
191CONFIG_DEFAULT_NOOP=y
192CONFIG_DEFAULT_IOSCHED="noop"
193
194#
195# Bus options (PCI, PCMCIA, EISA, ISA, TC) 195# Bus options (PCI, PCMCIA, EISA, ISA, TC)
196# 196#
197CONFIG_ISA=y 197CONFIG_ISA=y
@@ -258,7 +258,6 @@ CONFIG_TCP_CONG_BIC=y
258# QoS and/or fair queueing 258# QoS and/or fair queueing
259# 259#
260# CONFIG_NET_SCHED is not set 260# CONFIG_NET_SCHED is not set
261# CONFIG_NET_CLS_ROUTE is not set
262 261
263# 262#
264# Network testing 263# Network testing
diff --git a/arch/mips/configs/rbhma4500_defconfig b/arch/mips/configs/rbhma4500_defconfig
index 047e0b4236f8..1cc145023584 100644
--- a/arch/mips/configs/rbhma4500_defconfig
+++ b/arch/mips/configs/rbhma4500_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Thu Nov 10 14:02:45 2005 4# Thu Nov 24 01:07:03 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28# CONFIG_KOBJECT_UEVENT is not set
29CONFIG_IKCONFIG=y
30CONFIG_IKCONFIG_PROC=y
31CONFIG_INITRAMFS_SOURCE=""
32CONFIG_EMBEDDED=y
33CONFIG_KALLSYMS=y
34# CONFIG_KALLSYMS_EXTRA_PASS is not set
35CONFIG_PRINTK=y
36CONFIG_BUG=y
37CONFIG_BASE_FULL=y
38# CONFIG_FUTEX is not set
39# CONFIG_EPOLL is not set
40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
41CONFIG_SHMEM=y
42CONFIG_CC_ALIGN_FUNCTIONS=0
43CONFIG_CC_ALIGN_LABELS=0
44CONFIG_CC_ALIGN_LOOPS=0
45CONFIG_CC_ALIGN_JUMPS=0
46# CONFIG_TINY_SHMEM is not set
47CONFIG_BASE_SMALL=0
48
49#
50# Loadable module support
51#
52CONFIG_MODULES=y
53# CONFIG_MODULE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55# CONFIG_MODVERSIONS is not set
56# CONFIG_MODULE_SRCVERSION_ALL is not set
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -212,6 +143,75 @@ CONFIG_PREEMPT_NONE=y
212# CONFIG_PREEMPT is not set 143# CONFIG_PREEMPT is not set
213 144
214# 145#
146# Code maturity level options
147#
148CONFIG_EXPERIMENTAL=y
149CONFIG_CLEAN_COMPILE=y
150CONFIG_BROKEN_ON_SMP=y
151CONFIG_INIT_ENV_ARG_LIMIT=32
152
153#
154# General setup
155#
156CONFIG_LOCALVERSION=""
157CONFIG_LOCALVERSION_AUTO=y
158CONFIG_SWAP=y
159CONFIG_SYSVIPC=y
160# CONFIG_POSIX_MQUEUE is not set
161# CONFIG_BSD_PROCESS_ACCT is not set
162CONFIG_SYSCTL=y
163# CONFIG_AUDIT is not set
164CONFIG_HOTPLUG=y
165# CONFIG_KOBJECT_UEVENT is not set
166CONFIG_IKCONFIG=y
167CONFIG_IKCONFIG_PROC=y
168CONFIG_INITRAMFS_SOURCE=""
169CONFIG_EMBEDDED=y
170CONFIG_KALLSYMS=y
171# CONFIG_KALLSYMS_EXTRA_PASS is not set
172CONFIG_PRINTK=y
173CONFIG_BUG=y
174CONFIG_BASE_FULL=y
175# CONFIG_FUTEX is not set
176# CONFIG_EPOLL is not set
177# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
178CONFIG_SHMEM=y
179CONFIG_CC_ALIGN_FUNCTIONS=0
180CONFIG_CC_ALIGN_LABELS=0
181CONFIG_CC_ALIGN_LOOPS=0
182CONFIG_CC_ALIGN_JUMPS=0
183# CONFIG_TINY_SHMEM is not set
184CONFIG_BASE_SMALL=0
185
186#
187# Loadable module support
188#
189CONFIG_MODULES=y
190# CONFIG_MODULE_UNLOAD is not set
191CONFIG_OBSOLETE_MODPARM=y
192# CONFIG_MODVERSIONS is not set
193# CONFIG_MODULE_SRCVERSION_ALL is not set
194CONFIG_KMOD=y
195
196#
197# Block layer
198#
199# CONFIG_LBD is not set
200
201#
202# IO Schedulers
203#
204CONFIG_IOSCHED_NOOP=y
205CONFIG_IOSCHED_AS=y
206CONFIG_IOSCHED_DEADLINE=y
207CONFIG_IOSCHED_CFQ=y
208CONFIG_DEFAULT_AS=y
209# CONFIG_DEFAULT_DEADLINE is not set
210# CONFIG_DEFAULT_CFQ is not set
211# CONFIG_DEFAULT_NOOP is not set
212CONFIG_DEFAULT_IOSCHED="anticipatory"
213
214#
215# Bus options (PCI, PCMCIA, EISA, ISA, TC) 215# Bus options (PCI, PCMCIA, EISA, ISA, TC)
216# 216#
217CONFIG_HW_HAS_PCI=y 217CONFIG_HW_HAS_PCI=y
@@ -333,7 +333,6 @@ CONFIG_NETFILTER_NETLINK_LOG=m
333# QoS and/or fair queueing 333# QoS and/or fair queueing
334# 334#
335# CONFIG_NET_SCHED is not set 335# CONFIG_NET_SCHED is not set
336# CONFIG_NET_CLS_ROUTE is not set
337 336
338# 337#
339# Network testing 338# Network testing
diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig
index 55458062352e..30975b305ae5 100644
--- a/arch/mips/configs/rm200_defconfig
+++ b/arch/mips/configs/rm200_defconfig
@@ -1,82 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Thu Nov 10 14:02:50 2005 4# Thu Nov 24 01:07:06 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23CONFIG_POSIX_MQUEUE=y
24CONFIG_BSD_PROCESS_ACCT=y
25# CONFIG_BSD_PROCESS_ACCT_V3 is not set
26CONFIG_SYSCTL=y
27# CONFIG_AUDIT is not set
28CONFIG_HOTPLUG=y
29CONFIG_KOBJECT_UEVENT=y
30CONFIG_IKCONFIG=y
31CONFIG_IKCONFIG_PROC=y
32CONFIG_INITRAMFS_SOURCE=""
33CONFIG_EMBEDDED=y
34CONFIG_KALLSYMS=y
35# CONFIG_KALLSYMS_EXTRA_PASS is not set
36CONFIG_PRINTK=y
37CONFIG_BUG=y
38CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y
40CONFIG_EPOLL=y
41# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
42CONFIG_SHMEM=y
43CONFIG_CC_ALIGN_FUNCTIONS=0
44CONFIG_CC_ALIGN_LABELS=0
45CONFIG_CC_ALIGN_LOOPS=0
46CONFIG_CC_ALIGN_JUMPS=0
47# CONFIG_TINY_SHMEM is not set
48CONFIG_BASE_SMALL=0
49
50#
51# Loadable module support
52#
53CONFIG_MODULES=y
54CONFIG_MODULE_UNLOAD=y
55# CONFIG_MODULE_FORCE_UNLOAD is not set
56CONFIG_OBSOLETE_MODPARM=y
57CONFIG_MODVERSIONS=y
58# CONFIG_MODULE_SRCVERSION_ALL is not set
59CONFIG_KMOD=y
60
61#
62# Block layer
63#
64# CONFIG_LBD is not set
65
66#
67# IO Schedulers
68#
69CONFIG_IOSCHED_NOOP=y
70CONFIG_IOSCHED_AS=y
71CONFIG_IOSCHED_DEADLINE=y
72CONFIG_IOSCHED_CFQ=y
73CONFIG_DEFAULT_AS=y
74# CONFIG_DEFAULT_DEADLINE is not set
75# CONFIG_DEFAULT_CFQ is not set
76# CONFIG_DEFAULT_NOOP is not set
77CONFIG_DEFAULT_IOSCHED="anticipatory"
78
79#
80# Machine selection 9# Machine selection
81# 10#
82# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -214,6 +143,77 @@ CONFIG_PREEMPT_VOLUNTARY=y
214# CONFIG_PREEMPT is not set 143# CONFIG_PREEMPT is not set
215 144
216# 145#
146# Code maturity level options
147#
148CONFIG_EXPERIMENTAL=y
149CONFIG_CLEAN_COMPILE=y
150CONFIG_BROKEN_ON_SMP=y
151CONFIG_INIT_ENV_ARG_LIMIT=32
152
153#
154# General setup
155#
156CONFIG_LOCALVERSION=""
157CONFIG_LOCALVERSION_AUTO=y
158CONFIG_SWAP=y
159CONFIG_SYSVIPC=y
160CONFIG_POSIX_MQUEUE=y
161CONFIG_BSD_PROCESS_ACCT=y
162# CONFIG_BSD_PROCESS_ACCT_V3 is not set
163CONFIG_SYSCTL=y
164# CONFIG_AUDIT is not set
165CONFIG_HOTPLUG=y
166CONFIG_KOBJECT_UEVENT=y
167CONFIG_IKCONFIG=y
168CONFIG_IKCONFIG_PROC=y
169CONFIG_INITRAMFS_SOURCE=""
170CONFIG_EMBEDDED=y
171CONFIG_KALLSYMS=y
172# CONFIG_KALLSYMS_EXTRA_PASS is not set
173CONFIG_PRINTK=y
174CONFIG_BUG=y
175CONFIG_BASE_FULL=y
176CONFIG_FUTEX=y
177CONFIG_EPOLL=y
178# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
179CONFIG_SHMEM=y
180CONFIG_CC_ALIGN_FUNCTIONS=0
181CONFIG_CC_ALIGN_LABELS=0
182CONFIG_CC_ALIGN_LOOPS=0
183CONFIG_CC_ALIGN_JUMPS=0
184# CONFIG_TINY_SHMEM is not set
185CONFIG_BASE_SMALL=0
186
187#
188# Loadable module support
189#
190CONFIG_MODULES=y
191CONFIG_MODULE_UNLOAD=y
192# CONFIG_MODULE_FORCE_UNLOAD is not set
193CONFIG_OBSOLETE_MODPARM=y
194CONFIG_MODVERSIONS=y
195# CONFIG_MODULE_SRCVERSION_ALL is not set
196CONFIG_KMOD=y
197
198#
199# Block layer
200#
201# CONFIG_LBD is not set
202
203#
204# IO Schedulers
205#
206CONFIG_IOSCHED_NOOP=y
207CONFIG_IOSCHED_AS=y
208CONFIG_IOSCHED_DEADLINE=y
209CONFIG_IOSCHED_CFQ=y
210CONFIG_DEFAULT_AS=y
211# CONFIG_DEFAULT_DEADLINE is not set
212# CONFIG_DEFAULT_CFQ is not set
213# CONFIG_DEFAULT_NOOP is not set
214CONFIG_DEFAULT_IOSCHED="anticipatory"
215
216#
217# Bus options (PCI, PCMCIA, EISA, ISA, TC) 217# Bus options (PCI, PCMCIA, EISA, ISA, TC)
218# 218#
219CONFIG_HW_HAS_EISA=y 219CONFIG_HW_HAS_EISA=y
@@ -1199,6 +1199,7 @@ CONFIG_USB_USS720=m
1199CONFIG_USB_SERIAL=m 1199CONFIG_USB_SERIAL=m
1200CONFIG_USB_SERIAL_GENERIC=y 1200CONFIG_USB_SERIAL_GENERIC=y
1201CONFIG_USB_SERIAL_AIRPRIME=m 1201CONFIG_USB_SERIAL_AIRPRIME=m
1202CONFIG_USB_SERIAL_ANYDATA=m
1202CONFIG_USB_SERIAL_BELKIN=m 1203CONFIG_USB_SERIAL_BELKIN=m
1203CONFIG_USB_SERIAL_WHITEHEAT=m 1204CONFIG_USB_SERIAL_WHITEHEAT=m
1204CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m 1205CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
@@ -1230,7 +1231,6 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
1230CONFIG_USB_SERIAL_KLSI=m 1231CONFIG_USB_SERIAL_KLSI=m
1231CONFIG_USB_SERIAL_KOBIL_SCT=m 1232CONFIG_USB_SERIAL_KOBIL_SCT=m
1232CONFIG_USB_SERIAL_MCT_U232=m 1233CONFIG_USB_SERIAL_MCT_U232=m
1233# CONFIG_USB_SERIAL_NOKIA_DKU2 is not set
1234CONFIG_USB_SERIAL_PL2303=m 1234CONFIG_USB_SERIAL_PL2303=m
1235CONFIG_USB_SERIAL_HP4X=m 1235CONFIG_USB_SERIAL_HP4X=m
1236CONFIG_USB_SERIAL_SAFE=m 1236CONFIG_USB_SERIAL_SAFE=m
diff --git a/arch/mips/configs/sb1250-swarm_defconfig b/arch/mips/configs/sb1250-swarm_defconfig
index dc453a1e4806..63f1be18e9bf 100644
--- a/arch/mips/configs/sb1250-swarm_defconfig
+++ b/arch/mips/configs/sb1250-swarm_defconfig
@@ -1,81 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:06:43 2005 4# Thu Nov 24 01:07:09 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_LOCK_KERNEL=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_CPUSETS=y
31CONFIG_INITRAMFS_SOURCE=""
32CONFIG_EMBEDDED=y
33CONFIG_KALLSYMS=y
34# CONFIG_KALLSYMS_EXTRA_PASS is not set
35CONFIG_PRINTK=y
36CONFIG_BUG=y
37CONFIG_BASE_FULL=y
38CONFIG_FUTEX=y
39CONFIG_EPOLL=y
40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
41CONFIG_SHMEM=y
42CONFIG_CC_ALIGN_FUNCTIONS=0
43CONFIG_CC_ALIGN_LABELS=0
44CONFIG_CC_ALIGN_LOOPS=0
45CONFIG_CC_ALIGN_JUMPS=0
46# CONFIG_TINY_SHMEM is not set
47CONFIG_BASE_SMALL=0
48
49#
50# Loadable module support
51#
52CONFIG_MODULES=y
53CONFIG_MODULE_UNLOAD=y
54# CONFIG_MODULE_FORCE_UNLOAD is not set
55CONFIG_OBSOLETE_MODPARM=y
56CONFIG_MODVERSIONS=y
57CONFIG_MODULE_SRCVERSION_ALL=y
58CONFIG_KMOD=y
59CONFIG_STOP_MACHINE=y
60
61#
62# Block layer
63#
64
65#
66# IO Schedulers
67#
68CONFIG_IOSCHED_NOOP=y
69CONFIG_IOSCHED_AS=y
70CONFIG_IOSCHED_DEADLINE=y
71CONFIG_IOSCHED_CFQ=y
72CONFIG_DEFAULT_AS=y
73# CONFIG_DEFAULT_DEADLINE is not set
74# CONFIG_DEFAULT_CFQ is not set
75# CONFIG_DEFAULT_NOOP is not set
76CONFIG_DEFAULT_IOSCHED="anticipatory"
77
78#
79# Machine selection 9# Machine selection
80# 10#
81# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -226,6 +156,76 @@ CONFIG_PREEMPT_NONE=y
226CONFIG_PREEMPT_BKL=y 156CONFIG_PREEMPT_BKL=y
227 157
228# 158#
159# Code maturity level options
160#
161CONFIG_EXPERIMENTAL=y
162CONFIG_CLEAN_COMPILE=y
163CONFIG_LOCK_KERNEL=y
164CONFIG_INIT_ENV_ARG_LIMIT=32
165
166#
167# General setup
168#
169CONFIG_LOCALVERSION=""
170CONFIG_LOCALVERSION_AUTO=y
171CONFIG_SWAP=y
172CONFIG_SYSVIPC=y
173# CONFIG_POSIX_MQUEUE is not set
174# CONFIG_BSD_PROCESS_ACCT is not set
175CONFIG_SYSCTL=y
176# CONFIG_AUDIT is not set
177CONFIG_HOTPLUG=y
178CONFIG_KOBJECT_UEVENT=y
179# CONFIG_IKCONFIG is not set
180CONFIG_CPUSETS=y
181CONFIG_INITRAMFS_SOURCE=""
182CONFIG_EMBEDDED=y
183CONFIG_KALLSYMS=y
184# CONFIG_KALLSYMS_EXTRA_PASS is not set
185CONFIG_PRINTK=y
186CONFIG_BUG=y
187CONFIG_BASE_FULL=y
188CONFIG_FUTEX=y
189CONFIG_EPOLL=y
190# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
191CONFIG_SHMEM=y
192CONFIG_CC_ALIGN_FUNCTIONS=0
193CONFIG_CC_ALIGN_LABELS=0
194CONFIG_CC_ALIGN_LOOPS=0
195CONFIG_CC_ALIGN_JUMPS=0
196# CONFIG_TINY_SHMEM is not set
197CONFIG_BASE_SMALL=0
198
199#
200# Loadable module support
201#
202CONFIG_MODULES=y
203CONFIG_MODULE_UNLOAD=y
204# CONFIG_MODULE_FORCE_UNLOAD is not set
205CONFIG_OBSOLETE_MODPARM=y
206CONFIG_MODVERSIONS=y
207CONFIG_MODULE_SRCVERSION_ALL=y
208CONFIG_KMOD=y
209CONFIG_STOP_MACHINE=y
210
211#
212# Block layer
213#
214
215#
216# IO Schedulers
217#
218CONFIG_IOSCHED_NOOP=y
219CONFIG_IOSCHED_AS=y
220CONFIG_IOSCHED_DEADLINE=y
221CONFIG_IOSCHED_CFQ=y
222CONFIG_DEFAULT_AS=y
223# CONFIG_DEFAULT_DEADLINE is not set
224# CONFIG_DEFAULT_CFQ is not set
225# CONFIG_DEFAULT_NOOP is not set
226CONFIG_DEFAULT_IOSCHED="anticipatory"
227
228#
229# Bus options (PCI, PCMCIA, EISA, ISA, TC) 229# Bus options (PCI, PCMCIA, EISA, ISA, TC)
230# 230#
231CONFIG_HW_HAS_PCI=y 231CONFIG_HW_HAS_PCI=y
@@ -318,7 +318,6 @@ CONFIG_TCP_CONG_BIC=y
318# QoS and/or fair queueing 318# QoS and/or fair queueing
319# 319#
320# CONFIG_NET_SCHED is not set 320# CONFIG_NET_SCHED is not set
321# CONFIG_NET_CLS_ROUTE is not set
322 321
323# 322#
324# Network testing 323# Network testing
diff --git a/arch/mips/configs/sead_defconfig b/arch/mips/configs/sead_defconfig
index aa27d583162d..41dd70824976 100644
--- a/arch/mips/configs/sead_defconfig
+++ b/arch/mips/configs/sead_defconfig
@@ -1,71 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:06:45 2005 4# Thu Nov 24 01:07:10 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21# CONFIG_SWAP is not set
22CONFIG_SYSVIPC=y
23# CONFIG_BSD_PROCESS_ACCT is not set
24CONFIG_SYSCTL=y
25# CONFIG_HOTPLUG is not set
26# CONFIG_IKCONFIG is not set
27CONFIG_INITRAMFS_SOURCE=""
28CONFIG_EMBEDDED=y
29CONFIG_KALLSYMS=y
30# CONFIG_KALLSYMS_EXTRA_PASS is not set
31CONFIG_PRINTK=y
32CONFIG_BUG=y
33CONFIG_BASE_FULL=y
34CONFIG_FUTEX=y
35CONFIG_EPOLL=y
36# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
37CONFIG_SHMEM=y
38CONFIG_CC_ALIGN_FUNCTIONS=0
39CONFIG_CC_ALIGN_LABELS=0
40CONFIG_CC_ALIGN_LOOPS=0
41CONFIG_CC_ALIGN_JUMPS=0
42# CONFIG_TINY_SHMEM is not set
43CONFIG_BASE_SMALL=0
44
45#
46# Loadable module support
47#
48# CONFIG_MODULES is not set
49
50#
51# Block layer
52#
53# CONFIG_LBD is not set
54
55#
56# IO Schedulers
57#
58CONFIG_IOSCHED_NOOP=y
59CONFIG_IOSCHED_AS=y
60CONFIG_IOSCHED_DEADLINE=y
61CONFIG_IOSCHED_CFQ=y
62CONFIG_DEFAULT_AS=y
63# CONFIG_DEFAULT_DEADLINE is not set
64# CONFIG_DEFAULT_CFQ is not set
65# CONFIG_DEFAULT_NOOP is not set
66CONFIG_DEFAULT_IOSCHED="anticipatory"
67
68#
69# Machine selection 9# Machine selection
70# 10#
71# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -197,6 +137,66 @@ CONFIG_PREEMPT_NONE=y
197# CONFIG_PREEMPT is not set 137# CONFIG_PREEMPT is not set
198 138
199# 139#
140# Code maturity level options
141#
142CONFIG_EXPERIMENTAL=y
143CONFIG_CLEAN_COMPILE=y
144CONFIG_BROKEN_ON_SMP=y
145CONFIG_INIT_ENV_ARG_LIMIT=32
146
147#
148# General setup
149#
150CONFIG_LOCALVERSION=""
151CONFIG_LOCALVERSION_AUTO=y
152# CONFIG_SWAP is not set
153CONFIG_SYSVIPC=y
154# CONFIG_BSD_PROCESS_ACCT is not set
155CONFIG_SYSCTL=y
156# CONFIG_HOTPLUG is not set
157# CONFIG_IKCONFIG is not set
158CONFIG_INITRAMFS_SOURCE=""
159CONFIG_EMBEDDED=y
160CONFIG_KALLSYMS=y
161# CONFIG_KALLSYMS_EXTRA_PASS is not set
162CONFIG_PRINTK=y
163CONFIG_BUG=y
164CONFIG_BASE_FULL=y
165CONFIG_FUTEX=y
166CONFIG_EPOLL=y
167# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
168CONFIG_SHMEM=y
169CONFIG_CC_ALIGN_FUNCTIONS=0
170CONFIG_CC_ALIGN_LABELS=0
171CONFIG_CC_ALIGN_LOOPS=0
172CONFIG_CC_ALIGN_JUMPS=0
173# CONFIG_TINY_SHMEM is not set
174CONFIG_BASE_SMALL=0
175
176#
177# Loadable module support
178#
179# CONFIG_MODULES is not set
180
181#
182# Block layer
183#
184# CONFIG_LBD is not set
185
186#
187# IO Schedulers
188#
189CONFIG_IOSCHED_NOOP=y
190CONFIG_IOSCHED_AS=y
191CONFIG_IOSCHED_DEADLINE=y
192CONFIG_IOSCHED_CFQ=y
193CONFIG_DEFAULT_AS=y
194# CONFIG_DEFAULT_DEADLINE is not set
195# CONFIG_DEFAULT_CFQ is not set
196# CONFIG_DEFAULT_NOOP is not set
197CONFIG_DEFAULT_IOSCHED="anticipatory"
198
199#
200# Bus options (PCI, PCMCIA, EISA, ISA, TC) 200# Bus options (PCI, PCMCIA, EISA, ISA, TC)
201# 201#
202CONFIG_MMU=y 202CONFIG_MMU=y
@@ -363,6 +363,7 @@ CONFIG_LEGACY_PTY_COUNT=256
363# 363#
364# TPM devices 364# TPM devices
365# 365#
366# CONFIG_TCG_TPM is not set
366# CONFIG_TELCLOCK is not set 367# CONFIG_TELCLOCK is not set
367 368
368# 369#
diff --git a/arch/mips/configs/tb0226_defconfig b/arch/mips/configs/tb0226_defconfig
index ddc7e45996f2..83969466ecf6 100644
--- a/arch/mips/configs/tb0226_defconfig
+++ b/arch/mips/configs/tb0226_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:06:49 2005 4# Thu Nov 24 01:07:12 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27# CONFIG_HOTPLUG is not set
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -207,6 +138,75 @@ CONFIG_PREEMPT_NONE=y
207# CONFIG_PREEMPT is not set 138# CONFIG_PREEMPT is not set
208 139
209# 140#
141# Code maturity level options
142#
143CONFIG_EXPERIMENTAL=y
144CONFIG_CLEAN_COMPILE=y
145CONFIG_BROKEN_ON_SMP=y
146CONFIG_INIT_ENV_ARG_LIMIT=32
147
148#
149# General setup
150#
151CONFIG_LOCALVERSION=""
152CONFIG_LOCALVERSION_AUTO=y
153CONFIG_SWAP=y
154CONFIG_SYSVIPC=y
155# CONFIG_POSIX_MQUEUE is not set
156# CONFIG_BSD_PROCESS_ACCT is not set
157CONFIG_SYSCTL=y
158# CONFIG_AUDIT is not set
159# CONFIG_HOTPLUG is not set
160CONFIG_KOBJECT_UEVENT=y
161# CONFIG_IKCONFIG is not set
162CONFIG_INITRAMFS_SOURCE=""
163CONFIG_EMBEDDED=y
164CONFIG_KALLSYMS=y
165# CONFIG_KALLSYMS_EXTRA_PASS is not set
166CONFIG_PRINTK=y
167CONFIG_BUG=y
168CONFIG_BASE_FULL=y
169CONFIG_FUTEX=y
170CONFIG_EPOLL=y
171# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
172CONFIG_SHMEM=y
173CONFIG_CC_ALIGN_FUNCTIONS=0
174CONFIG_CC_ALIGN_LABELS=0
175CONFIG_CC_ALIGN_LOOPS=0
176CONFIG_CC_ALIGN_JUMPS=0
177# CONFIG_TINY_SHMEM is not set
178CONFIG_BASE_SMALL=0
179
180#
181# Loadable module support
182#
183CONFIG_MODULES=y
184CONFIG_MODULE_UNLOAD=y
185# CONFIG_MODULE_FORCE_UNLOAD is not set
186CONFIG_OBSOLETE_MODPARM=y
187CONFIG_MODVERSIONS=y
188CONFIG_MODULE_SRCVERSION_ALL=y
189CONFIG_KMOD=y
190
191#
192# Block layer
193#
194# CONFIG_LBD is not set
195
196#
197# IO Schedulers
198#
199CONFIG_IOSCHED_NOOP=y
200CONFIG_IOSCHED_AS=y
201CONFIG_IOSCHED_DEADLINE=y
202CONFIG_IOSCHED_CFQ=y
203CONFIG_DEFAULT_AS=y
204# CONFIG_DEFAULT_DEADLINE is not set
205# CONFIG_DEFAULT_CFQ is not set
206# CONFIG_DEFAULT_NOOP is not set
207CONFIG_DEFAULT_IOSCHED="anticipatory"
208
209#
210# Bus options (PCI, PCMCIA, EISA, ISA, TC) 210# Bus options (PCI, PCMCIA, EISA, ISA, TC)
211# 211#
212CONFIG_HW_HAS_PCI=y 212CONFIG_HW_HAS_PCI=y
@@ -301,7 +301,6 @@ CONFIG_TCP_CONG_BIC=y
301# QoS and/or fair queueing 301# QoS and/or fair queueing
302# 302#
303# CONFIG_NET_SCHED is not set 303# CONFIG_NET_SCHED is not set
304# CONFIG_NET_CLS_ROUTE is not set
305 304
306# 305#
307# Network testing 306# Network testing
diff --git a/arch/mips/configs/tb0229_defconfig b/arch/mips/configs/tb0229_defconfig
index e8c82f011e98..ce7b9ed44432 100644
--- a/arch/mips/configs/tb0229_defconfig
+++ b/arch/mips/configs/tb0229_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Wed Nov 9 11:11:47 2005 4# Thu Nov 24 01:07:15 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -207,6 +138,75 @@ CONFIG_PREEMPT_NONE=y
207# CONFIG_PREEMPT is not set 138# CONFIG_PREEMPT is not set
208 139
209# 140#
141# Code maturity level options
142#
143CONFIG_EXPERIMENTAL=y
144CONFIG_CLEAN_COMPILE=y
145CONFIG_BROKEN_ON_SMP=y
146CONFIG_INIT_ENV_ARG_LIMIT=32
147
148#
149# General setup
150#
151CONFIG_LOCALVERSION=""
152CONFIG_LOCALVERSION_AUTO=y
153CONFIG_SWAP=y
154CONFIG_SYSVIPC=y
155# CONFIG_POSIX_MQUEUE is not set
156# CONFIG_BSD_PROCESS_ACCT is not set
157CONFIG_SYSCTL=y
158# CONFIG_AUDIT is not set
159CONFIG_HOTPLUG=y
160CONFIG_KOBJECT_UEVENT=y
161# CONFIG_IKCONFIG is not set
162CONFIG_INITRAMFS_SOURCE=""
163CONFIG_EMBEDDED=y
164CONFIG_KALLSYMS=y
165# CONFIG_KALLSYMS_EXTRA_PASS is not set
166CONFIG_PRINTK=y
167CONFIG_BUG=y
168CONFIG_BASE_FULL=y
169CONFIG_FUTEX=y
170CONFIG_EPOLL=y
171# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
172CONFIG_SHMEM=y
173CONFIG_CC_ALIGN_FUNCTIONS=0
174CONFIG_CC_ALIGN_LABELS=0
175CONFIG_CC_ALIGN_LOOPS=0
176CONFIG_CC_ALIGN_JUMPS=0
177# CONFIG_TINY_SHMEM is not set
178CONFIG_BASE_SMALL=0
179
180#
181# Loadable module support
182#
183CONFIG_MODULES=y
184CONFIG_MODULE_UNLOAD=y
185# CONFIG_MODULE_FORCE_UNLOAD is not set
186CONFIG_OBSOLETE_MODPARM=y
187CONFIG_MODVERSIONS=y
188CONFIG_MODULE_SRCVERSION_ALL=y
189CONFIG_KMOD=y
190
191#
192# Block layer
193#
194# CONFIG_LBD is not set
195
196#
197# IO Schedulers
198#
199CONFIG_IOSCHED_NOOP=y
200CONFIG_IOSCHED_AS=y
201CONFIG_IOSCHED_DEADLINE=y
202CONFIG_IOSCHED_CFQ=y
203CONFIG_DEFAULT_AS=y
204# CONFIG_DEFAULT_DEADLINE is not set
205# CONFIG_DEFAULT_CFQ is not set
206# CONFIG_DEFAULT_NOOP is not set
207CONFIG_DEFAULT_IOSCHED="anticipatory"
208
209#
210# Bus options (PCI, PCMCIA, EISA, ISA, TC) 210# Bus options (PCI, PCMCIA, EISA, ISA, TC)
211# 211#
212CONFIG_HW_HAS_PCI=y 212CONFIG_HW_HAS_PCI=y
@@ -302,7 +302,6 @@ CONFIG_TCP_CONG_BIC=y
302# QoS and/or fair queueing 302# QoS and/or fair queueing
303# 303#
304# CONFIG_NET_SCHED is not set 304# CONFIG_NET_SCHED is not set
305# CONFIG_NET_CLS_ROUTE is not set
306 305
307# 306#
308# Network testing 307# Network testing
diff --git a/arch/mips/configs/workpad_defconfig b/arch/mips/configs/workpad_defconfig
index 125b2997abfe..02b2551023d4 100644
--- a/arch/mips/configs/workpad_defconfig
+++ b/arch/mips/configs/workpad_defconfig
@@ -1,80 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc1 3# Linux kernel version: 2.6.15-rc2
4# Tue Nov 15 11:17:02 2005 4# Thu Nov 24 01:07:17 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27CONFIG_HOTPLUG=y
28CONFIG_KOBJECT_UEVENT=y
29# CONFIG_IKCONFIG is not set
30CONFIG_INITRAMFS_SOURCE=""
31CONFIG_EMBEDDED=y
32CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55CONFIG_MODVERSIONS=y
56CONFIG_MODULE_SRCVERSION_ALL=y
57CONFIG_KMOD=y
58
59#
60# Block layer
61#
62# CONFIG_LBD is not set
63
64#
65# IO Schedulers
66#
67CONFIG_IOSCHED_NOOP=y
68CONFIG_IOSCHED_AS=y
69CONFIG_IOSCHED_DEADLINE=y
70CONFIG_IOSCHED_CFQ=y
71CONFIG_DEFAULT_AS=y
72# CONFIG_DEFAULT_DEADLINE is not set
73# CONFIG_DEFAULT_CFQ is not set
74# CONFIG_DEFAULT_NOOP is not set
75CONFIG_DEFAULT_IOSCHED="anticipatory"
76
77#
78# Machine selection 9# Machine selection
79# 10#
80# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -204,6 +135,75 @@ CONFIG_PREEMPT_NONE=y
204# CONFIG_PREEMPT is not set 135# CONFIG_PREEMPT is not set
205 136
206# 137#
138# Code maturity level options
139#
140CONFIG_EXPERIMENTAL=y
141CONFIG_CLEAN_COMPILE=y
142CONFIG_BROKEN_ON_SMP=y
143CONFIG_INIT_ENV_ARG_LIMIT=32
144
145#
146# General setup
147#
148CONFIG_LOCALVERSION=""
149CONFIG_LOCALVERSION_AUTO=y
150CONFIG_SWAP=y
151CONFIG_SYSVIPC=y
152# CONFIG_POSIX_MQUEUE is not set
153# CONFIG_BSD_PROCESS_ACCT is not set
154CONFIG_SYSCTL=y
155# CONFIG_AUDIT is not set
156CONFIG_HOTPLUG=y
157CONFIG_KOBJECT_UEVENT=y
158# CONFIG_IKCONFIG is not set
159CONFIG_INITRAMFS_SOURCE=""
160CONFIG_EMBEDDED=y
161CONFIG_KALLSYMS=y
162# CONFIG_KALLSYMS_EXTRA_PASS is not set
163CONFIG_PRINTK=y
164CONFIG_BUG=y
165CONFIG_BASE_FULL=y
166CONFIG_FUTEX=y
167CONFIG_EPOLL=y
168# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
169CONFIG_SHMEM=y
170CONFIG_CC_ALIGN_FUNCTIONS=0
171CONFIG_CC_ALIGN_LABELS=0
172CONFIG_CC_ALIGN_LOOPS=0
173CONFIG_CC_ALIGN_JUMPS=0
174# CONFIG_TINY_SHMEM is not set
175CONFIG_BASE_SMALL=0
176
177#
178# Loadable module support
179#
180CONFIG_MODULES=y
181CONFIG_MODULE_UNLOAD=y
182# CONFIG_MODULE_FORCE_UNLOAD is not set
183CONFIG_OBSOLETE_MODPARM=y
184CONFIG_MODVERSIONS=y
185CONFIG_MODULE_SRCVERSION_ALL=y
186CONFIG_KMOD=y
187
188#
189# Block layer
190#
191# CONFIG_LBD is not set
192
193#
194# IO Schedulers
195#
196CONFIG_IOSCHED_NOOP=y
197CONFIG_IOSCHED_AS=y
198CONFIG_IOSCHED_DEADLINE=y
199CONFIG_IOSCHED_CFQ=y
200CONFIG_DEFAULT_AS=y
201# CONFIG_DEFAULT_DEADLINE is not set
202# CONFIG_DEFAULT_CFQ is not set
203# CONFIG_DEFAULT_NOOP is not set
204CONFIG_DEFAULT_IOSCHED="anticipatory"
205
206#
207# Bus options (PCI, PCMCIA, EISA, ISA, TC) 207# Bus options (PCI, PCMCIA, EISA, ISA, TC)
208# 208#
209CONFIG_ISA=y 209CONFIG_ISA=y
@@ -297,7 +297,6 @@ CONFIG_TCP_CONG_BIC=y
297# QoS and/or fair queueing 297# QoS and/or fair queueing
298# 298#
299# CONFIG_NET_SCHED is not set 299# CONFIG_NET_SCHED is not set
300# CONFIG_NET_CLS_ROUTE is not set
301 300
302# 301#
303# Network testing 302# Network testing
@@ -609,6 +608,7 @@ CONFIG_WATCHDOG=y
609# 608#
610# TPM devices 609# TPM devices
611# 610#
611# CONFIG_TCG_TPM is not set
612# CONFIG_TELCLOCK is not set 612# CONFIG_TELCLOCK is not set
613 613
614# 614#
diff --git a/arch/mips/configs/yosemite_defconfig b/arch/mips/configs/yosemite_defconfig
index d90790b2ab30..d51d5d16297c 100644
--- a/arch/mips/configs/yosemite_defconfig
+++ b/arch/mips/configs/yosemite_defconfig
@@ -1,81 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Mon Nov 7 23:06:59 2005 4# Thu Nov 24 01:07:19 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11# CONFIG_EXPERIMENTAL is not set
12CONFIG_CLEAN_COMPILE=y
13CONFIG_LOCK_KERNEL=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_BSD_PROCESS_ACCT is not set
24CONFIG_SYSCTL=y
25# CONFIG_AUDIT is not set
26CONFIG_HOTPLUG=y
27CONFIG_KOBJECT_UEVENT=y
28CONFIG_IKCONFIG=y
29CONFIG_IKCONFIG_PROC=y
30# CONFIG_CPUSETS is not set
31CONFIG_INITRAMFS_SOURCE=""
32CONFIG_EMBEDDED=y
33CONFIG_KALLSYMS=y
34# CONFIG_KALLSYMS_ALL is not set
35# CONFIG_KALLSYMS_EXTRA_PASS is not set
36CONFIG_PRINTK=y
37CONFIG_BUG=y
38CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y
40CONFIG_EPOLL=y
41# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
42CONFIG_SHMEM=y
43CONFIG_CC_ALIGN_FUNCTIONS=0
44CONFIG_CC_ALIGN_LABELS=0
45CONFIG_CC_ALIGN_LOOPS=0
46CONFIG_CC_ALIGN_JUMPS=0
47# CONFIG_TINY_SHMEM is not set
48CONFIG_BASE_SMALL=0
49
50#
51# Loadable module support
52#
53CONFIG_MODULES=y
54CONFIG_MODULE_UNLOAD=y
55CONFIG_OBSOLETE_MODPARM=y
56# CONFIG_MODULE_SRCVERSION_ALL is not set
57CONFIG_KMOD=y
58CONFIG_STOP_MACHINE=y
59
60#
61# Block layer
62#
63# CONFIG_LBD is not set
64
65#
66# IO Schedulers
67#
68CONFIG_IOSCHED_NOOP=y
69CONFIG_IOSCHED_AS=y
70CONFIG_IOSCHED_DEADLINE=y
71CONFIG_IOSCHED_CFQ=y
72CONFIG_DEFAULT_AS=y
73# CONFIG_DEFAULT_DEADLINE is not set
74# CONFIG_DEFAULT_CFQ is not set
75# CONFIG_DEFAULT_NOOP is not set
76CONFIG_DEFAULT_IOSCHED="anticipatory"
77
78#
79# Machine selection 9# Machine selection
80# 10#
81# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -208,6 +138,76 @@ CONFIG_PREEMPT_NONE=y
208CONFIG_PREEMPT_BKL=y 138CONFIG_PREEMPT_BKL=y
209 139
210# 140#
141# Code maturity level options
142#
143# CONFIG_EXPERIMENTAL is not set
144CONFIG_CLEAN_COMPILE=y
145CONFIG_LOCK_KERNEL=y
146CONFIG_INIT_ENV_ARG_LIMIT=32
147
148#
149# General setup
150#
151CONFIG_LOCALVERSION=""
152CONFIG_LOCALVERSION_AUTO=y
153CONFIG_SWAP=y
154CONFIG_SYSVIPC=y
155# CONFIG_BSD_PROCESS_ACCT is not set
156CONFIG_SYSCTL=y
157# CONFIG_AUDIT is not set
158CONFIG_HOTPLUG=y
159CONFIG_KOBJECT_UEVENT=y
160CONFIG_IKCONFIG=y
161CONFIG_IKCONFIG_PROC=y
162# CONFIG_CPUSETS is not set
163CONFIG_INITRAMFS_SOURCE=""
164CONFIG_EMBEDDED=y
165CONFIG_KALLSYMS=y
166# CONFIG_KALLSYMS_ALL is not set
167# CONFIG_KALLSYMS_EXTRA_PASS is not set
168CONFIG_PRINTK=y
169CONFIG_BUG=y
170CONFIG_BASE_FULL=y
171CONFIG_FUTEX=y
172CONFIG_EPOLL=y
173# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
174CONFIG_SHMEM=y
175CONFIG_CC_ALIGN_FUNCTIONS=0
176CONFIG_CC_ALIGN_LABELS=0
177CONFIG_CC_ALIGN_LOOPS=0
178CONFIG_CC_ALIGN_JUMPS=0
179# CONFIG_TINY_SHMEM is not set
180CONFIG_BASE_SMALL=0
181
182#
183# Loadable module support
184#
185CONFIG_MODULES=y
186CONFIG_MODULE_UNLOAD=y
187CONFIG_OBSOLETE_MODPARM=y
188# CONFIG_MODULE_SRCVERSION_ALL is not set
189CONFIG_KMOD=y
190CONFIG_STOP_MACHINE=y
191
192#
193# Block layer
194#
195# CONFIG_LBD is not set
196
197#
198# IO Schedulers
199#
200CONFIG_IOSCHED_NOOP=y
201CONFIG_IOSCHED_AS=y
202CONFIG_IOSCHED_DEADLINE=y
203CONFIG_IOSCHED_CFQ=y
204CONFIG_DEFAULT_AS=y
205# CONFIG_DEFAULT_DEADLINE is not set
206# CONFIG_DEFAULT_CFQ is not set
207# CONFIG_DEFAULT_NOOP is not set
208CONFIG_DEFAULT_IOSCHED="anticipatory"
209
210#
211# Bus options (PCI, PCMCIA, EISA, ISA, TC) 211# Bus options (PCI, PCMCIA, EISA, ISA, TC)
212# 212#
213CONFIG_HW_HAS_PCI=y 213CONFIG_HW_HAS_PCI=y
@@ -284,7 +284,6 @@ CONFIG_IPV6_TUNNEL=m
284# QoS and/or fair queueing 284# QoS and/or fair queueing
285# 285#
286# CONFIG_NET_SCHED is not set 286# CONFIG_NET_SCHED is not set
287# CONFIG_NET_CLS_ROUTE is not set
288 287
289# 288#
290# Network testing 289# Network testing
diff --git a/arch/mips/defconfig b/arch/mips/defconfig
index e9086da02e48..2a1b844da43f 100644
--- a/arch/mips/defconfig
+++ b/arch/mips/defconfig
@@ -1,81 +1,11 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.15-rc2
4# Thu Nov 10 12:13:58 2005 4# Thu Nov 24 01:05:49 2005
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
8# 8#
9# Code maturity level options
10#
11CONFIG_EXPERIMENTAL=y
12CONFIG_CLEAN_COMPILE=y
13CONFIG_BROKEN_ON_SMP=y
14CONFIG_INIT_ENV_ARG_LIMIT=32
15
16#
17# General setup
18#
19CONFIG_LOCALVERSION=""
20CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y
22CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set
24# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set
27# CONFIG_HOTPLUG is not set
28CONFIG_KOBJECT_UEVENT=y
29CONFIG_IKCONFIG=y
30CONFIG_IKCONFIG_PROC=y
31CONFIG_INITRAMFS_SOURCE=""
32CONFIG_EMBEDDED=y
33CONFIG_KALLSYMS=y
34# CONFIG_KALLSYMS_EXTRA_PASS is not set
35CONFIG_PRINTK=y
36CONFIG_BUG=y
37CONFIG_BASE_FULL=y
38CONFIG_FUTEX=y
39CONFIG_EPOLL=y
40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
41CONFIG_SHMEM=y
42CONFIG_CC_ALIGN_FUNCTIONS=0
43CONFIG_CC_ALIGN_LABELS=0
44CONFIG_CC_ALIGN_LOOPS=0
45CONFIG_CC_ALIGN_JUMPS=0
46# CONFIG_TINY_SHMEM is not set
47CONFIG_BASE_SMALL=0
48
49#
50# Loadable module support
51#
52CONFIG_MODULES=y
53CONFIG_MODULE_UNLOAD=y
54# CONFIG_MODULE_FORCE_UNLOAD is not set
55CONFIG_OBSOLETE_MODPARM=y
56CONFIG_MODVERSIONS=y
57CONFIG_MODULE_SRCVERSION_ALL=y
58CONFIG_KMOD=y
59
60#
61# Block layer
62#
63# CONFIG_LBD is not set
64
65#
66# IO Schedulers
67#
68CONFIG_IOSCHED_NOOP=y
69CONFIG_IOSCHED_AS=y
70CONFIG_IOSCHED_DEADLINE=y
71CONFIG_IOSCHED_CFQ=y
72CONFIG_DEFAULT_AS=y
73# CONFIG_DEFAULT_DEADLINE is not set
74# CONFIG_DEFAULT_CFQ is not set
75# CONFIG_DEFAULT_NOOP is not set
76CONFIG_DEFAULT_IOSCHED="anticipatory"
77
78#
79# Machine selection 9# Machine selection
80# 10#
81# CONFIG_MIPS_MTX1 is not set 11# CONFIG_MIPS_MTX1 is not set
@@ -211,6 +141,76 @@ CONFIG_PREEMPT_VOLUNTARY=y
211# CONFIG_PREEMPT is not set 141# CONFIG_PREEMPT is not set
212 142
213# 143#
144# Code maturity level options
145#
146CONFIG_EXPERIMENTAL=y
147CONFIG_CLEAN_COMPILE=y
148CONFIG_BROKEN_ON_SMP=y
149CONFIG_INIT_ENV_ARG_LIMIT=32
150
151#
152# General setup
153#
154CONFIG_LOCALVERSION=""
155CONFIG_LOCALVERSION_AUTO=y
156CONFIG_SWAP=y
157CONFIG_SYSVIPC=y
158# CONFIG_POSIX_MQUEUE is not set
159# CONFIG_BSD_PROCESS_ACCT is not set
160CONFIG_SYSCTL=y
161# CONFIG_AUDIT is not set
162# CONFIG_HOTPLUG is not set
163CONFIG_KOBJECT_UEVENT=y
164CONFIG_IKCONFIG=y
165CONFIG_IKCONFIG_PROC=y
166CONFIG_INITRAMFS_SOURCE=""
167CONFIG_EMBEDDED=y
168CONFIG_KALLSYMS=y
169# CONFIG_KALLSYMS_EXTRA_PASS is not set
170CONFIG_PRINTK=y
171CONFIG_BUG=y
172CONFIG_BASE_FULL=y
173CONFIG_FUTEX=y
174CONFIG_EPOLL=y
175# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
176CONFIG_SHMEM=y
177CONFIG_CC_ALIGN_FUNCTIONS=0
178CONFIG_CC_ALIGN_LABELS=0
179CONFIG_CC_ALIGN_LOOPS=0
180CONFIG_CC_ALIGN_JUMPS=0
181# CONFIG_TINY_SHMEM is not set
182CONFIG_BASE_SMALL=0
183
184#
185# Loadable module support
186#
187CONFIG_MODULES=y
188CONFIG_MODULE_UNLOAD=y
189# CONFIG_MODULE_FORCE_UNLOAD is not set
190CONFIG_OBSOLETE_MODPARM=y
191CONFIG_MODVERSIONS=y
192CONFIG_MODULE_SRCVERSION_ALL=y
193CONFIG_KMOD=y
194
195#
196# Block layer
197#
198# CONFIG_LBD is not set
199
200#
201# IO Schedulers
202#
203CONFIG_IOSCHED_NOOP=y
204CONFIG_IOSCHED_AS=y
205CONFIG_IOSCHED_DEADLINE=y
206CONFIG_IOSCHED_CFQ=y
207CONFIG_DEFAULT_AS=y
208# CONFIG_DEFAULT_DEADLINE is not set
209# CONFIG_DEFAULT_CFQ is not set
210# CONFIG_DEFAULT_NOOP is not set
211CONFIG_DEFAULT_IOSCHED="anticipatory"
212
213#
214# Bus options (PCI, PCMCIA, EISA, ISA, TC) 214# Bus options (PCI, PCMCIA, EISA, ISA, TC)
215# 215#
216CONFIG_HW_HAS_EISA=y 216CONFIG_HW_HAS_EISA=y
@@ -779,6 +779,7 @@ CONFIG_MAX_RAW_DEVS=256
779# 779#
780# TPM devices 780# TPM devices
781# 781#
782# CONFIG_TCG_TPM is not set
782# CONFIG_TELCLOCK is not set 783# CONFIG_TELCLOCK is not set
783 784
784# 785#
diff --git a/arch/mips/jmr3927/rbhma3100/irq.c b/arch/mips/jmr3927/rbhma3100/irq.c
index 7cbe14483f13..2810727f1d4e 100644
--- a/arch/mips/jmr3927/rbhma3100/irq.c
+++ b/arch/mips/jmr3927/rbhma3100/irq.c
@@ -113,7 +113,8 @@ static void jmr3927_irq_ack(unsigned int irq)
113 113
114static void jmr3927_irq_end(unsigned int irq) 114static void jmr3927_irq_end(unsigned int irq)
115{ 115{
116 jmr3927_irq_enable(irq); 116 if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
117 jmr3927_irq_enable(irq);
117} 118}
118 119
119static void jmr3927_irq_disable(unsigned int irq_nr) 120static void jmr3927_irq_disable(unsigned int irq_nr)
@@ -121,7 +122,7 @@ static void jmr3927_irq_disable(unsigned int irq_nr)
121 struct tb_irq_space* sp; 122 struct tb_irq_space* sp;
122 unsigned long flags; 123 unsigned long flags;
123 124
124 spinlock_irqsave(&jmr3927_irq_lock, flags); 125 spin_lock_irqsave(&jmr3927_irq_lock, flags);
125 for (sp = tb_irq_spaces; sp; sp = sp->next) { 126 for (sp = tb_irq_spaces; sp; sp = sp->next) {
126 if (sp->start_irqno <= irq_nr && 127 if (sp->start_irqno <= irq_nr &&
127 irq_nr < sp->start_irqno + sp->nr_irqs) { 128 irq_nr < sp->start_irqno + sp->nr_irqs) {
@@ -131,7 +132,7 @@ static void jmr3927_irq_disable(unsigned int irq_nr)
131 break; 132 break;
132 } 133 }
133 } 134 }
134 spinlock_irqrestore(&jmr3927_irq_lock, flags); 135 spin_unlock_irqrestore(&jmr3927_irq_lock, flags);
135} 136}
136 137
137static void jmr3927_irq_enable(unsigned int irq_nr) 138static void jmr3927_irq_enable(unsigned int irq_nr)
@@ -139,7 +140,7 @@ static void jmr3927_irq_enable(unsigned int irq_nr)
139 struct tb_irq_space* sp; 140 struct tb_irq_space* sp;
140 unsigned long flags; 141 unsigned long flags;
141 142
142 spinlock_irqsave(&jmr3927_irq_lock, flags); 143 spin_lock_irqsave(&jmr3927_irq_lock, flags);
143 for (sp = tb_irq_spaces; sp; sp = sp->next) { 144 for (sp = tb_irq_spaces; sp; sp = sp->next) {
144 if (sp->start_irqno <= irq_nr && 145 if (sp->start_irqno <= irq_nr &&
145 irq_nr < sp->start_irqno + sp->nr_irqs) { 146 irq_nr < sp->start_irqno + sp->nr_irqs) {
@@ -149,7 +150,7 @@ static void jmr3927_irq_enable(unsigned int irq_nr)
149 break; 150 break;
150 } 151 }
151 } 152 }
152 spinlock_irqrestore(&jmr3927_irq_lock, flags); 153 spin_unlock_irqrestore(&jmr3927_irq_lock, flags);
153} 154}
154 155
155/* 156/*
@@ -205,7 +206,10 @@ static void mask_irq_irc(int irq_nr, int space_id)
205 /* update IRCSR */ 206 /* update IRCSR */
206 tx3927_ircptr->imr = 0; 207 tx3927_ircptr->imr = 0;
207 tx3927_ircptr->imr = irc_elevel; 208 tx3927_ircptr->imr = irc_elevel;
209 /* flush write buffer */
210 (void)tx3927_ircptr->ssr;
208} 211}
212
209static void unmask_irq_irc(int irq_nr, int space_id) 213static void unmask_irq_irc(int irq_nr, int space_id)
210{ 214{
211 volatile unsigned long *ilrp = &tx3927_ircptr->ilr[irq_nr / 2]; 215 volatile unsigned long *ilrp = &tx3927_ircptr->ilr[irq_nr / 2];
@@ -276,7 +280,7 @@ void jmr3927_irc_irqdispatch(struct pt_regs *regs)
276 do_IRQ(irq + JMR3927_IRQ_IRC, regs); 280 do_IRQ(irq + JMR3927_IRQ_IRC, regs);
277} 281}
278 282
279static void jmr3927_ioc_interrupt(int irq, void *dev_id, struct pt_regs *regs) 283static irqreturn_t jmr3927_ioc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
280{ 284{
281 unsigned char istat = jmr3927_ioc_reg_in(JMR3927_IOC_INTS2_ADDR); 285 unsigned char istat = jmr3927_ioc_reg_in(JMR3927_IOC_INTS2_ADDR);
282 int i; 286 int i;
@@ -287,13 +291,14 @@ static void jmr3927_ioc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
287 do_IRQ(irq, regs); 291 do_IRQ(irq, regs);
288 } 292 }
289 } 293 }
294 return IRQ_HANDLED;
290} 295}
291 296
292static struct irqaction ioc_action = { 297static struct irqaction ioc_action = {
293 jmr3927_ioc_interrupt, 0, CPU_MASK_NONE, "IOC", NULL, NULL, 298 jmr3927_ioc_interrupt, 0, CPU_MASK_NONE, "IOC", NULL, NULL,
294}; 299};
295 300
296static void jmr3927_isac_interrupt(int irq, void *dev_id, struct pt_regs *regs) 301static irqreturn_t jmr3927_isac_interrupt(int irq, void *dev_id, struct pt_regs *regs)
297{ 302{
298 unsigned char istat = jmr3927_isac_reg_in(JMR3927_ISAC_INTS2_ADDR); 303 unsigned char istat = jmr3927_isac_reg_in(JMR3927_ISAC_INTS2_ADDR);
299 int i; 304 int i;
@@ -304,6 +309,7 @@ static void jmr3927_isac_interrupt(int irq, void *dev_id, struct pt_regs *regs)
304 do_IRQ(irq, regs); 309 do_IRQ(irq, regs);
305 } 310 }
306 } 311 }
312 return IRQ_HANDLED;
307} 313}
308 314
309static struct irqaction isac_action = { 315static struct irqaction isac_action = {
@@ -311,19 +317,23 @@ static struct irqaction isac_action = {
311}; 317};
312 318
313 319
314static void jmr3927_isaerr_interrupt(int irq, void * dev_id, struct pt_regs * regs) 320static irqreturn_t jmr3927_isaerr_interrupt(int irq, void * dev_id, struct pt_regs * regs)
315{ 321{
316 printk(KERN_WARNING "ISA error interrupt (irq 0x%x).\n", irq); 322 printk(KERN_WARNING "ISA error interrupt (irq 0x%x).\n", irq);
323
324 return IRQ_HANDLED;
317} 325}
318static struct irqaction isaerr_action = { 326static struct irqaction isaerr_action = {
319 jmr3927_isaerr_interrupt, 0, CPU_MASK_NONE, "ISA error", NULL, NULL, 327 jmr3927_isaerr_interrupt, 0, CPU_MASK_NONE, "ISA error", NULL, NULL,
320}; 328};
321 329
322static void jmr3927_pcierr_interrupt(int irq, void * dev_id, struct pt_regs * regs) 330static irqreturn_t jmr3927_pcierr_interrupt(int irq, void * dev_id, struct pt_regs * regs)
323{ 331{
324 printk(KERN_WARNING "PCI error interrupt (irq 0x%x).\n", irq); 332 printk(KERN_WARNING "PCI error interrupt (irq 0x%x).\n", irq);
325 printk(KERN_WARNING "pcistat:%02x, lbstat:%04lx\n", 333 printk(KERN_WARNING "pcistat:%02x, lbstat:%04lx\n",
326 tx3927_pcicptr->pcistat, tx3927_pcicptr->lbstat); 334 tx3927_pcicptr->pcistat, tx3927_pcicptr->lbstat);
335
336 return IRQ_HANDLED;
327} 337}
328static struct irqaction pcierr_action = { 338static struct irqaction pcierr_action = {
329 jmr3927_pcierr_interrupt, 0, CPU_MASK_NONE, "PCI error", NULL, NULL, 339 jmr3927_pcierr_interrupt, 0, CPU_MASK_NONE, "PCI error", NULL, NULL,
diff --git a/arch/mips/jmr3927/rbhma3100/setup.c b/arch/mips/jmr3927/rbhma3100/setup.c
index 55ad0a578794..4763957df8fc 100644
--- a/arch/mips/jmr3927/rbhma3100/setup.c
+++ b/arch/mips/jmr3927/rbhma3100/setup.c
@@ -60,6 +60,8 @@
60#include <asm/mipsregs.h> 60#include <asm/mipsregs.h>
61#include <asm/traps.h> 61#include <asm/traps.h>
62 62
63extern void puts(unsigned char *cp);
64
63/* Tick Timer divider */ 65/* Tick Timer divider */
64#define JMR3927_TIMER_CCD 0 /* 1/2 */ 66#define JMR3927_TIMER_CCD 0 /* 1/2 */
65#define JMR3927_TIMER_CLK (JMR3927_IMCLK / (2 << JMR3927_TIMER_CCD)) 67#define JMR3927_TIMER_CLK (JMR3927_IMCLK / (2 << JMR3927_TIMER_CCD))
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index a263fb7a3971..5e1b08b00a33 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -417,7 +417,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
417 case PRID_IMP_R10000: 417 case PRID_IMP_R10000:
418 c->cputype = CPU_R10000; 418 c->cputype = CPU_R10000;
419 c->isa_level = MIPS_CPU_ISA_IV; 419 c->isa_level = MIPS_CPU_ISA_IV;
420 c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | 420 c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX |
421 MIPS_CPU_FPU | MIPS_CPU_32FPR | 421 MIPS_CPU_FPU | MIPS_CPU_32FPR |
422 MIPS_CPU_COUNTER | MIPS_CPU_WATCH | 422 MIPS_CPU_COUNTER | MIPS_CPU_WATCH |
423 MIPS_CPU_LLSC; 423 MIPS_CPU_LLSC;
@@ -426,7 +426,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
426 case PRID_IMP_R12000: 426 case PRID_IMP_R12000:
427 c->cputype = CPU_R12000; 427 c->cputype = CPU_R12000;
428 c->isa_level = MIPS_CPU_ISA_IV; 428 c->isa_level = MIPS_CPU_ISA_IV;
429 c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | 429 c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX |
430 MIPS_CPU_FPU | MIPS_CPU_32FPR | 430 MIPS_CPU_FPU | MIPS_CPU_32FPR |
431 MIPS_CPU_COUNTER | MIPS_CPU_WATCH | 431 MIPS_CPU_COUNTER | MIPS_CPU_WATCH |
432 MIPS_CPU_LLSC; 432 MIPS_CPU_LLSC;
diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c
index dd118c60bcd0..08273a2a501d 100644
--- a/arch/mips/kernel/irixsig.c
+++ b/arch/mips/kernel/irixsig.c
@@ -279,8 +279,6 @@ irix_sigreturn(struct pt_regs *regs)
279 /* 279 /*
280 * Don't let your children do this ... 280 * Don't let your children do this ...
281 */ 281 */
282 if (current_thread_info()->flags & TIF_SYSCALL_TRACE)
283 do_syscall_trace(regs, 1);
284 __asm__ __volatile__( 282 __asm__ __volatile__(
285 "move\t$29,%0\n\t" 283 "move\t$29,%0\n\t"
286 "j\tsyscall_exit" 284 "j\tsyscall_exit"
@@ -783,8 +781,6 @@ asmlinkage void irix_setcontext(struct pt_regs *regs)
783 /* 781 /*
784 * Don't let your children do this ... 782 * Don't let your children do this ...
785 */ 783 */
786 if (current_thread_info()->flags & TIF_SYSCALL_TRACE)
787 do_syscall_trace(regs, 1);
788 __asm__ __volatile__( 784 __asm__ __volatile__(
789 "move\t$29,%0\n\t" 785 "move\t$29,%0\n\t"
790 "j\tsyscall_exit" 786 "j\tsyscall_exit"
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index 4dd8e8b4fbc2..a42e0e8caa7b 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -94,11 +94,13 @@ syscall_trace_entry:
94 li a1, 0 94 li a1, 0
95 jal do_syscall_trace 95 jal do_syscall_trace
96 96
97 move t0, s0
98 RESTORE_STATIC
97 lw a0, PT_R4(sp) # Restore argument registers 99 lw a0, PT_R4(sp) # Restore argument registers
98 lw a1, PT_R5(sp) 100 lw a1, PT_R5(sp)
99 lw a2, PT_R6(sp) 101 lw a2, PT_R6(sp)
100 lw a3, PT_R7(sp) 102 lw a3, PT_R7(sp)
101 jalr s0 103 jalr t0
102 104
103 li t0, -EMAXERRNO - 1 # error? 105 li t0, -EMAXERRNO - 1 # error?
104 sltu t0, t0, v0 106 sltu t0, t0, v0
@@ -241,19 +243,7 @@ illegal_syscall:
241 sw zero, PT_R7(sp) # success 243 sw zero, PT_R7(sp) # success
242 sw v0, PT_R2(sp) # result 244 sw v0, PT_R2(sp) # result
243 245
244 /* Success, so skip usual error handling garbage. */ 246 j o32_syscall_exit # continue like a normal syscall
245 lw a2, TI_FLAGS($28) # syscall tracing enabled?
246 li t0, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT
247 and t0, a2, t0
248 bnez t0, 1f
249
250 j o32_syscall_exit
251
2521: SAVE_STATIC
253 move a0, sp
254 li a1, 1
255 jal do_syscall_trace
256 j syscall_exit
257 247
258no_mem: li v0, -ENOMEM 248no_mem: li v0, -ENOMEM
259 jr ra 249 jr ra
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
index 9085838d6ce3..47bfbd416709 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -93,13 +93,15 @@ syscall_trace_entry:
93 li a1, 0 93 li a1, 0
94 jal do_syscall_trace 94 jal do_syscall_trace
95 95
96 move t0, s0
97 RESTORE_STATIC
96 ld a0, PT_R4(sp) # Restore argument registers 98 ld a0, PT_R4(sp) # Restore argument registers
97 ld a1, PT_R5(sp) 99 ld a1, PT_R5(sp)
98 ld a2, PT_R6(sp) 100 ld a2, PT_R6(sp)
99 ld a3, PT_R7(sp) 101 ld a3, PT_R7(sp)
100 ld a4, PT_R8(sp) 102 ld a4, PT_R8(sp)
101 ld a5, PT_R9(sp) 103 ld a5, PT_R9(sp)
102 jalr s0 104 jalr t0
103 105
104 li t0, -EMAXERRNO - 1 # error? 106 li t0, -EMAXERRNO - 1 # error?
105 sltu t0, t0, v0 107 sltu t0, t0, v0
@@ -174,19 +176,7 @@ illegal_syscall:
174 sd zero, PT_R7(sp) # success 176 sd zero, PT_R7(sp) # success
175 sd v0, PT_R2(sp) # result 177 sd v0, PT_R2(sp) # result
176 178
177 /* Success, so skip usual error handling garbage. */ 179 j n64_syscall_exit # continue like a normal syscall
178 li t0, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT
179 LONG_L a2, TI_FLAGS($28) # syscall tracing enabled?
180 and t0, a2, t0
181 bnez t0, 1f
182
183 j n64_syscall_exit
184
1851: SAVE_STATIC
186 move a0, sp
187 li a1, 1
188 jal do_syscall_trace
189 j syscall_exit
190 180
191no_mem: li v0, -ENOMEM 181no_mem: li v0, -ENOMEM
192 jr ra 182 jr ra
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index 7e66eb823bf6..b465ced1758f 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -90,13 +90,15 @@ n32_syscall_trace_entry:
90 li a1, 0 90 li a1, 0
91 jal do_syscall_trace 91 jal do_syscall_trace
92 92
93 move t0, s0
94 RESTORE_STATIC
93 ld a0, PT_R4(sp) # Restore argument registers 95 ld a0, PT_R4(sp) # Restore argument registers
94 ld a1, PT_R5(sp) 96 ld a1, PT_R5(sp)
95 ld a2, PT_R6(sp) 97 ld a2, PT_R6(sp)
96 ld a3, PT_R7(sp) 98 ld a3, PT_R7(sp)
97 ld a4, PT_R8(sp) 99 ld a4, PT_R8(sp)
98 ld a5, PT_R9(sp) 100 ld a5, PT_R9(sp)
99 jalr s0 101 jalr t0
100 102
101 li t0, -EMAXERRNO - 1 # error? 103 li t0, -EMAXERRNO - 1 # error?
102 sltu t0, t0, v0 104 sltu t0, t0, v0
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 5a16401e443a..3d338ca7eeeb 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -124,6 +124,8 @@ trace_a_syscall:
124 li a1, 0 124 li a1, 0
125 jal do_syscall_trace 125 jal do_syscall_trace
126 126
127 move t0, s0
128 RESTORE_STATIC
127 ld a0, PT_R4(sp) # Restore argument registers 129 ld a0, PT_R4(sp) # Restore argument registers
128 ld a1, PT_R5(sp) 130 ld a1, PT_R5(sp)
129 ld a2, PT_R6(sp) 131 ld a2, PT_R6(sp)
@@ -132,7 +134,7 @@ trace_a_syscall:
132 ld a5, PT_R9(sp) 134 ld a5, PT_R9(sp)
133 ld a6, PT_R10(sp) 135 ld a6, PT_R10(sp)
134 ld a7, PT_R11(sp) # For indirect syscalls 136 ld a7, PT_R11(sp) # For indirect syscalls
135 jalr s0 137 jalr t0
136 138
137 li t0, -EMAXERRNO - 1 # error? 139 li t0, -EMAXERRNO - 1 # error?
138 sltu t0, t0, v0 140 sltu t0, t0, v0
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index 05e09eedabff..7d1800fe7038 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -220,8 +220,6 @@ _sys_sigreturn(nabi_no_regargs struct pt_regs regs)
220 /* 220 /*
221 * Don't let your children do this ... 221 * Don't let your children do this ...
222 */ 222 */
223 if (current_thread_info()->flags & TIF_SYSCALL_TRACE)
224 do_syscall_trace(&regs, 1);
225 __asm__ __volatile__( 223 __asm__ __volatile__(
226 "move\t$29, %0\n\t" 224 "move\t$29, %0\n\t"
227 "j\tsyscall_exit" 225 "j\tsyscall_exit"
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
index e315d3f6aa6e..c856dbc52abb 100644
--- a/arch/mips/kernel/signal32.c
+++ b/arch/mips/kernel/signal32.c
@@ -497,8 +497,6 @@ _sys32_sigreturn(nabi_no_regargs struct pt_regs regs)
497 /* 497 /*
498 * Don't let your children do this ... 498 * Don't let your children do this ...
499 */ 499 */
500 if (current_thread_info()->flags & TIF_SYSCALL_TRACE)
501 do_syscall_trace(&regs, 1);
502 __asm__ __volatile__( 500 __asm__ __volatile__(
503 "move\t$29, %0\n\t" 501 "move\t$29, %0\n\t"
504 "j\tsyscall_exit" 502 "j\tsyscall_exit"
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 6f3ff9690686..7058893d5ad2 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -534,13 +534,14 @@ static inline int simulate_rdhwr(struct pt_regs *regs)
534 switch (rd) { 534 switch (rd) {
535 case 29: 535 case 29:
536 regs->regs[rt] = ti->tp_value; 536 regs->regs[rt] = ti->tp_value;
537 break; 537 return 0;
538 default: 538 default:
539 return -EFAULT; 539 return -EFAULT;
540 } 540 }
541 } 541 }
542 542
543 return 0; 543 /* Not ours. */
544 return -EFAULT;
544} 545}
545 546
546asmlinkage void do_ov(struct pt_regs *regs) 547asmlinkage void do_ov(struct pt_regs *regs)
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index f75ab748e8cd..3a49036e0ae8 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -68,7 +68,7 @@ unsigned long setup_zero_pages(void)
68 page = virt_to_page(empty_zero_page); 68 page = virt_to_page(empty_zero_page);
69 while (page < virt_to_page(empty_zero_page + (PAGE_SIZE << order))) { 69 while (page < virt_to_page(empty_zero_page + (PAGE_SIZE << order))) {
70 set_bit(PG_reserved, &page->flags); 70 set_bit(PG_reserved, &page->flags);
71 set_page_count(page, 0); 71 reset_page_mapcount(page);
72 page++; 72 page++;
73 } 73 }
74 74
diff --git a/arch/mips/qemu/q-firmware.c b/arch/mips/qemu/q-firmware.c
index 5980f02b2df9..fb2a8673a6bf 100644
--- a/arch/mips/qemu/q-firmware.c
+++ b/arch/mips/qemu/q-firmware.c
@@ -1,7 +1,18 @@
1#include <linux/init.h> 1#include <linux/init.h>
2#include <linux/string.h>
3#include <asm/addrspace.h>
2#include <asm/bootinfo.h> 4#include <asm/bootinfo.h>
3 5
4void __init prom_init(void) 6void __init prom_init(void)
5{ 7{
6 add_memory_region(0x0<<20, 0x10<<20, BOOT_MEM_RAM); 8 int *cmdline;
9
10 cmdline = (int *) (CKSEG0 + (0x10 << 20) - 260);
11 if (*cmdline == 0x12345678) {
12 if (*(char *)(cmdline + 1))
13 strcpy (arcs_cmdline, (char *)(cmdline + 1));
14 add_memory_region(0x0<<20, cmdline[-1], BOOT_MEM_RAM);
15 } else {
16 add_memory_region(0x0<<20, 0x10<<20, BOOT_MEM_RAM);
17 }
7} 18}
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 98f67c78d1bd..a13eb575f834 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -61,15 +61,17 @@ endif
61LDFLAGS_vmlinux := -Bstatic 61LDFLAGS_vmlinux := -Bstatic
62 62
63# The -Iarch/$(ARCH)/include is temporary while we are merging 63# The -Iarch/$(ARCH)/include is temporary while we are merging
64CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include 64CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -Iarch/$(ARCH)/include
65AFLAGS += -Iarch/$(ARCH) 65AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
66CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe
67CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc 66CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc
68CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 -mmultiple 67CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple
69CFLAGS += $(CFLAGS-y) 68CPPFLAGS += $(CPPFLAGS-y)
69AFLAGS += $(AFLAGS-y)
70CFLAGS += -msoft-float -pipe $(CFLAGS-y)
70CPP = $(CC) -E $(CFLAGS) 71CPP = $(CC) -E $(CFLAGS)
71# Temporary hack until we have migrated to asm-powerpc 72# Temporary hack until we have migrated to asm-powerpc
72LINUXINCLUDE += -Iarch/$(ARCH)/include 73LINUXINCLUDE-$(CONFIG_PPC32) := -Iarch/$(ARCH)/include
74LINUXINCLUDE += $(LINUXINCLUDE-y)
73 75
74CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__ 76CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__
75 77
@@ -173,11 +175,13 @@ archclean:
173 175
174archprepare: checkbin 176archprepare: checkbin
175 177
178ifeq ($(CONFIG_PPC32),y)
176# Temporary hack until we have migrated to asm-powerpc 179# Temporary hack until we have migrated to asm-powerpc
177include/asm: arch/$(ARCH)/include/asm 180include/asm: arch/$(ARCH)/include/asm
178arch/$(ARCH)/include/asm: FORCE 181arch/$(ARCH)/include/asm: FORCE
179 $(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi 182 $(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi
180 $(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/include/asm 183 $(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/include/asm
184endif
181 185
182# Use the file '.tmp_gas_check' for binutils tests, as gas won't output 186# Use the file '.tmp_gas_check' for binutils tests, as gas won't output
183# to stdout and these checks are run even on install targets. 187# to stdout and these checks are run even on install targets.
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index af4d1bc9a2eb..94db25708456 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -163,15 +163,13 @@ EXPORT_SYMBOL(giveup_altivec);
163EXPORT_SYMBOL(giveup_spe); 163EXPORT_SYMBOL(giveup_spe);
164#endif /* CONFIG_SPE */ 164#endif /* CONFIG_SPE */
165 165
166#ifdef CONFIG_PPC64 166#ifndef CONFIG_PPC64
167EXPORT_SYMBOL(__flush_icache_range);
168#else
169EXPORT_SYMBOL(flush_instruction_cache); 167EXPORT_SYMBOL(flush_instruction_cache);
170EXPORT_SYMBOL(flush_icache_range);
171EXPORT_SYMBOL(flush_tlb_kernel_range); 168EXPORT_SYMBOL(flush_tlb_kernel_range);
172EXPORT_SYMBOL(flush_tlb_page); 169EXPORT_SYMBOL(flush_tlb_page);
173EXPORT_SYMBOL(_tlbie); 170EXPORT_SYMBOL(_tlbie);
174#endif 171#endif
172EXPORT_SYMBOL(__flush_icache_range);
175EXPORT_SYMBOL(flush_dcache_range); 173EXPORT_SYMBOL(flush_dcache_range);
176 174
177#ifdef CONFIG_SMP 175#ifdef CONFIG_SMP
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index a5a7542a8ff3..105d5609ff57 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -201,6 +201,28 @@ int dump_spe(struct pt_regs *regs, elf_vrregset_t *evrregs)
201} 201}
202#endif /* CONFIG_SPE */ 202#endif /* CONFIG_SPE */
203 203
204/*
205 * If we are doing lazy switching of CPU state (FP, altivec or SPE),
206 * and the current task has some state, discard it.
207 */
208static inline void discard_lazy_cpu_state(void)
209{
210#ifndef CONFIG_SMP
211 preempt_disable();
212 if (last_task_used_math == current)
213 last_task_used_math = NULL;
214#ifdef CONFIG_ALTIVEC
215 if (last_task_used_altivec == current)
216 last_task_used_altivec = NULL;
217#endif /* CONFIG_ALTIVEC */
218#ifdef CONFIG_SPE
219 if (last_task_used_spe == current)
220 last_task_used_spe = NULL;
221#endif
222 preempt_enable();
223#endif /* CONFIG_SMP */
224}
225
204int set_dabr(unsigned long dabr) 226int set_dabr(unsigned long dabr)
205{ 227{
206 if (ppc_md.set_dabr) 228 if (ppc_md.set_dabr)
@@ -434,19 +456,7 @@ void show_regs(struct pt_regs * regs)
434void exit_thread(void) 456void exit_thread(void)
435{ 457{
436 kprobe_flush_task(current); 458 kprobe_flush_task(current);
437 459 discard_lazy_cpu_state();
438#ifndef CONFIG_SMP
439 if (last_task_used_math == current)
440 last_task_used_math = NULL;
441#ifdef CONFIG_ALTIVEC
442 if (last_task_used_altivec == current)
443 last_task_used_altivec = NULL;
444#endif /* CONFIG_ALTIVEC */
445#ifdef CONFIG_SPE
446 if (last_task_used_spe == current)
447 last_task_used_spe = NULL;
448#endif
449#endif /* CONFIG_SMP */
450} 460}
451 461
452void flush_thread(void) 462void flush_thread(void)
@@ -458,18 +468,7 @@ void flush_thread(void)
458 t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT); 468 t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT);
459#endif 469#endif
460 470
461#ifndef CONFIG_SMP 471 discard_lazy_cpu_state();
462 if (last_task_used_math == current)
463 last_task_used_math = NULL;
464#ifdef CONFIG_ALTIVEC
465 if (last_task_used_altivec == current)
466 last_task_used_altivec = NULL;
467#endif /* CONFIG_ALTIVEC */
468#ifdef CONFIG_SPE
469 if (last_task_used_spe == current)
470 last_task_used_spe = NULL;
471#endif
472#endif /* CONFIG_SMP */
473 472
474#ifdef CONFIG_PPC64 /* for now */ 473#ifdef CONFIG_PPC64 /* for now */
475 if (current->thread.dabr) { 474 if (current->thread.dabr) {
@@ -635,18 +634,7 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
635 } 634 }
636#endif 635#endif
637 636
638#ifndef CONFIG_SMP 637 discard_lazy_cpu_state();
639 if (last_task_used_math == current)
640 last_task_used_math = NULL;
641#ifdef CONFIG_ALTIVEC
642 if (last_task_used_altivec == current)
643 last_task_used_altivec = NULL;
644#endif
645#ifdef CONFIG_SPE
646 if (last_task_used_spe == current)
647 last_task_used_spe = NULL;
648#endif
649#endif /* CONFIG_SMP */
650 memset(current->thread.fpr, 0, sizeof(current->thread.fpr)); 638 memset(current->thread.fpr, 0, sizeof(current->thread.fpr));
651 current->thread.fpscr.val = 0; 639 current->thread.fpscr.val = 0;
652#ifdef CONFIG_ALTIVEC 640#ifdef CONFIG_ALTIVEC
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 4ce0105c308e..bcdc209dca85 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -265,7 +265,7 @@ static int __init call_prom_ret(const char *service, int nargs, int nret,
265 va_end(list); 265 va_end(list);
266 266
267 for (i = 0; i < nret; i++) 267 for (i = 0; i < nret; i++)
268 rets[nargs+i] = 0; 268 args.args[nargs+i] = 0;
269 269
270 if (enter_prom(&args, RELOC(prom_entry)) < 0) 270 if (enter_prom(&args, RELOC(prom_entry)) < 0)
271 return PROM_ERROR; 271 return PROM_ERROR;
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index b44b36e0c293..f0c47dab0903 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -145,8 +145,7 @@ static void dump_vdso_pages(struct vm_area_struct * vma)
145 struct page *pg = virt_to_page(vdso32_kbase + 145 struct page *pg = virt_to_page(vdso32_kbase +
146 i*PAGE_SIZE); 146 i*PAGE_SIZE);
147 struct page *upg = (vma && vma->vm_mm) ? 147 struct page *upg = (vma && vma->vm_mm) ?
148 follow_page(vma->vm_mm, vma->vm_start + 148 follow_page(vma, vma->vm_start + i*PAGE_SIZE, 0)
149 i*PAGE_SIZE, 0)
150 : NULL; 149 : NULL;
151 dump_one_vdso_page(pg, upg); 150 dump_one_vdso_page(pg, upg);
152 } 151 }
@@ -157,8 +156,7 @@ static void dump_vdso_pages(struct vm_area_struct * vma)
157 struct page *pg = virt_to_page(vdso64_kbase + 156 struct page *pg = virt_to_page(vdso64_kbase +
158 i*PAGE_SIZE); 157 i*PAGE_SIZE);
159 struct page *upg = (vma && vma->vm_mm) ? 158 struct page *upg = (vma && vma->vm_mm) ?
160 follow_page(vma->vm_mm, vma->vm_start + 159 follow_page(vma, vma->vm_start + i*PAGE_SIZE, 0)
161 i*PAGE_SIZE, 0)
162 : NULL; 160 : NULL;
163 dump_one_vdso_page(pg, upg); 161 dump_one_vdso_page(pg, upg);
164 } 162 }
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index f867bba893ca..6bc9dbad7dea 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -295,7 +295,7 @@ int prepare_hugepage_range(unsigned long addr, unsigned long len)
295 if (addr < 0x100000000UL) 295 if (addr < 0x100000000UL)
296 err = open_low_hpage_areas(current->mm, 296 err = open_low_hpage_areas(current->mm,
297 LOW_ESID_MASK(addr, len)); 297 LOW_ESID_MASK(addr, len));
298 if ((addr + len) >= 0x100000000UL) 298 if ((addr + len) > 0x100000000UL)
299 err = open_high_hpage_areas(current->mm, 299 err = open_high_hpage_areas(current->mm,
300 HTLB_AREA_MASK(addr, len)); 300 HTLB_AREA_MASK(addr, len));
301 if (err) { 301 if (err) {
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c
index bf081b345820..2b54eeb2c899 100644
--- a/arch/powerpc/platforms/iseries/iommu.c
+++ b/arch/powerpc/platforms/iseries/iommu.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * Rewrite, cleanup: 4 * Rewrite, cleanup:
5 * 5 *
6 * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation 6 * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
7 * 7 *
8 * Dynamic DMA mapping support, iSeries-specific parts. 8 * Dynamic DMA mapping support, iSeries-specific parts.
9 * 9 *
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 97ba5214417f..c78f2b290a73 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -5,7 +5,7 @@
5 * 5 *
6 * Rewrite, cleanup: 6 * Rewrite, cleanup:
7 * 7 *
8 * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation 8 * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
9 * 9 *
10 * Dynamic DMA mapping support, pSeries-specific parts, both SMP and LPAR. 10 * Dynamic DMA mapping support, pSeries-specific parts, both SMP and LPAR.
11 * 11 *
diff --git a/arch/powerpc/sysdev/dart.h b/arch/powerpc/sysdev/dart.h
index ea8f0d9eed8a..33ed9ed7fc1e 100644
--- a/arch/powerpc/sysdev/dart.h
+++ b/arch/powerpc/sysdev/dart.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation 2 * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
diff --git a/arch/powerpc/sysdev/u3_iommu.c b/arch/powerpc/sysdev/u3_iommu.c
index f32baf7f4693..5c1a26a6d00c 100644
--- a/arch/powerpc/sysdev/u3_iommu.c
+++ b/arch/powerpc/sysdev/u3_iommu.c
@@ -1,11 +1,11 @@
1/* 1/*
2 * arch/powerpc/sysdev/u3_iommu.c 2 * arch/powerpc/sysdev/u3_iommu.c
3 * 3 *
4 * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation 4 * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
5 * 5 *
6 * Based on pSeries_iommu.c: 6 * Based on pSeries_iommu.c:
7 * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation 7 * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
8 * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation 8 * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
9 * 9 *
10 * Dynamic DMA mapping support, Apple U3 & IBM CPC925 "DART" iommu. 10 * Dynamic DMA mapping support, Apple U3 & IBM CPC925 "DART" iommu.
11 * 11 *
diff --git a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile
index 82df88b01bbe..f3e9c534aa82 100644
--- a/arch/ppc/boot/simple/Makefile
+++ b/arch/ppc/boot/simple/Makefile
@@ -262,11 +262,11 @@ $(images)/zImage.initrd-STRIPELF: $(obj)/zvmlinux.initrd
262 skip=64 bs=1k 262 skip=64 bs=1k
263 263
264$(images)/zImage-TREE: $(obj)/zvmlinux $(MKTREE) 264$(images)/zImage-TREE: $(obj)/zvmlinux $(MKTREE)
265 $(MKTREE) $(obj)/zvmlinux $(images)/zImage.$(end-y) $(ENTRYPOINT) 265 $(MKTREE) $(obj)/zvmlinux $(images)/zImage.$(end-y) $(entrypoint-y)
266 266
267$(images)/zImage.initrd-TREE: $(obj)/zvmlinux.initrd $(MKTREE) 267$(images)/zImage.initrd-TREE: $(obj)/zvmlinux.initrd $(MKTREE)
268 $(MKTREE) $(obj)/zvmlinux.initrd $(images)/zImage.initrd.$(end-y) \ 268 $(MKTREE) $(obj)/zvmlinux.initrd $(images)/zImage.initrd.$(end-y) \
269 $(ENTRYPOINT) 269 $(entrypoint-y)
270 270
271$(images)/zImage-PPLUS: $(obj)/zvmlinux $(MKPREP) $(MKBUGBOOT) 271$(images)/zImage-PPLUS: $(obj)/zvmlinux $(MKPREP) $(MKBUGBOOT)
272 $(MKPREP) -pbp $(obj)/zvmlinux $(images)/zImage.$(end-y) 272 $(MKPREP) -pbp $(obj)/zvmlinux $(images)/zImage.$(end-y)
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index 66073f775193..bb6a5c6a64be 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -184,7 +184,7 @@ EXPORT_SYMBOL(kernel_thread);
184 184
185EXPORT_SYMBOL(flush_instruction_cache); 185EXPORT_SYMBOL(flush_instruction_cache);
186EXPORT_SYMBOL(giveup_fpu); 186EXPORT_SYMBOL(giveup_fpu);
187EXPORT_SYMBOL(flush_icache_range); 187EXPORT_SYMBOL(__flush_icache_range);
188EXPORT_SYMBOL(flush_dcache_range); 188EXPORT_SYMBOL(flush_dcache_range);
189EXPORT_SYMBOL(flush_icache_user_range); 189EXPORT_SYMBOL(flush_icache_user_range);
190EXPORT_SYMBOL(flush_dcache_page); 190EXPORT_SYMBOL(flush_dcache_page);
diff --git a/arch/ppc/kernel/process.c b/arch/ppc/kernel/process.c
index cb1c7b92f8c6..25cbdc8d2941 100644
--- a/arch/ppc/kernel/process.c
+++ b/arch/ppc/kernel/process.c
@@ -417,6 +417,7 @@ void show_regs(struct pt_regs * regs)
417 417
418void exit_thread(void) 418void exit_thread(void)
419{ 419{
420 preempt_disable();
420 if (last_task_used_math == current) 421 if (last_task_used_math == current)
421 last_task_used_math = NULL; 422 last_task_used_math = NULL;
422 if (last_task_used_altivec == current) 423 if (last_task_used_altivec == current)
@@ -425,10 +426,12 @@ void exit_thread(void)
425 if (last_task_used_spe == current) 426 if (last_task_used_spe == current)
426 last_task_used_spe = NULL; 427 last_task_used_spe = NULL;
427#endif 428#endif
429 preempt_enable();
428} 430}
429 431
430void flush_thread(void) 432void flush_thread(void)
431{ 433{
434 preempt_disable();
432 if (last_task_used_math == current) 435 if (last_task_used_math == current)
433 last_task_used_math = NULL; 436 last_task_used_math = NULL;
434 if (last_task_used_altivec == current) 437 if (last_task_used_altivec == current)
@@ -437,6 +440,7 @@ void flush_thread(void)
437 if (last_task_used_spe == current) 440 if (last_task_used_spe == current)
438 last_task_used_spe = NULL; 441 last_task_used_spe = NULL;
439#endif 442#endif
443 preempt_enable();
440} 444}
441 445
442void 446void
@@ -535,6 +539,7 @@ void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp)
535 regs->nip = nip; 539 regs->nip = nip;
536 regs->gpr[1] = sp; 540 regs->gpr[1] = sp;
537 regs->msr = MSR_USER; 541 regs->msr = MSR_USER;
542 preempt_disable();
538 if (last_task_used_math == current) 543 if (last_task_used_math == current)
539 last_task_used_math = NULL; 544 last_task_used_math = NULL;
540 if (last_task_used_altivec == current) 545 if (last_task_used_altivec == current)
@@ -543,6 +548,7 @@ void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp)
543 if (last_task_used_spe == current) 548 if (last_task_used_spe == current)
544 last_task_used_spe = NULL; 549 last_task_used_spe = NULL;
545#endif 550#endif
551 preempt_enable();
546 memset(current->thread.fpr, 0, sizeof(current->thread.fpr)); 552 memset(current->thread.fpr, 0, sizeof(current->thread.fpr));
547 current->thread.fpscr.val = 0; 553 current->thread.fpscr.val = 0;
548#ifdef CONFIG_ALTIVEC 554#ifdef CONFIG_ALTIVEC
diff --git a/arch/ppc/syslib/m82xx_pci.c b/arch/ppc/syslib/m82xx_pci.c
index 1d1c3956c1ae..1941a8c7ca9a 100644
--- a/arch/ppc/syslib/m82xx_pci.c
+++ b/arch/ppc/syslib/m82xx_pci.c
@@ -248,7 +248,8 @@ pq2ads_setup_pci(struct pci_controller *hose)
248 pci_div = ( (sccr & SCCR_PCI_MODCK) ? 2 : 1) * 248 pci_div = ( (sccr & SCCR_PCI_MODCK) ? 2 : 1) *
249 ( ( (sccr & SCCR_PCIDF_MSK) >> SCCR_PCIDF_SHIFT) + 1); 249 ( ( (sccr & SCCR_PCIDF_MSK) >> SCCR_PCIDF_SHIFT) + 1);
250 freq = (uint)((2*binfo->bi_cpmfreq)/(pci_div)); 250 freq = (uint)((2*binfo->bi_cpmfreq)/(pci_div));
251 time = (int)666666/freq; 251 time = (int)66666666/freq;
252
252 /* due to PCI Local Bus spec, some devices needs to wait such a long 253 /* due to PCI Local Bus spec, some devices needs to wait such a long
253 time after RST deassertion. More specifically, 0.508s for 66MHz & twice more for 33 */ 254 time after RST deassertion. More specifically, 0.508s for 66MHz & twice more for 33 */
254 printk("%s: The PCI bus is %d Mhz.\nWaiting %s after deasserting RST...\n",__FILE__,freq, 255 printk("%s: The PCI bus is %d Mhz.\nWaiting %s after deasserting RST...\n",__FILE__,freq,
diff --git a/arch/sparc/mm/generic.c b/arch/sparc/mm/generic.c
index 0410bae681f8..2cb0728cee05 100644
--- a/arch/sparc/mm/generic.c
+++ b/arch/sparc/mm/generic.c
@@ -32,9 +32,7 @@ static inline void io_remap_pte_range(struct mm_struct *mm, pte_t * pte, unsigne
32 if (end > PMD_SIZE) 32 if (end > PMD_SIZE)
33 end = PMD_SIZE; 33 end = PMD_SIZE;
34 do { 34 do {
35 pte_t oldpage = *pte; 35 set_pte_at(mm, address, pte, mk_pte_io(offset, prot, space));
36 pte_clear(mm, address, pte);
37 set_pte(pte, mk_pte_io(offset, prot, space));
38 address += PAGE_SIZE; 36 address += PAGE_SIZE;
39 offset += PAGE_SIZE; 37 offset += PAGE_SIZE;
40 pte++; 38 pte++;
@@ -63,7 +61,7 @@ static inline int io_remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned
63} 61}
64 62
65int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, 63int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
66 unsigned long pfn, unsigned long size, pgprot_t prot) 64 unsigned long pfn, unsigned long size, pgprot_t prot)
67{ 65{
68 int error = 0; 66 int error = 0;
69 pgd_t * dir; 67 pgd_t * dir;
@@ -74,7 +72,9 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
74 unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT; 72 unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT;
75 73
76 /* See comment in mm/memory.c remap_pfn_range */ 74 /* See comment in mm/memory.c remap_pfn_range */
77 vma->vm_flags |= VM_IO | VM_RESERVED | VM_UNPAGED; 75 vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP;
76 vma->vm_pgoff = (offset >> PAGE_SHIFT) |
77 ((unsigned long)space << 28UL);
78 78
79 prot = __pgprot(pg_iobits); 79 prot = __pgprot(pg_iobits);
80 offset -= from; 80 offset -= from;
diff --git a/arch/sparc64/mm/generic.c b/arch/sparc64/mm/generic.c
index 8fd4cb1f050a..580b63da836b 100644
--- a/arch/sparc64/mm/generic.c
+++ b/arch/sparc64/mm/generic.c
@@ -15,6 +15,15 @@
15#include <asm/page.h> 15#include <asm/page.h>
16#include <asm/tlbflush.h> 16#include <asm/tlbflush.h>
17 17
18static inline pte_t mk_pte_io(unsigned long page, pgprot_t prot, int space)
19{
20 pte_t pte;
21 pte_val(pte) = (((page) | pgprot_val(prot) | _PAGE_E) &
22 ~(unsigned long)_PAGE_CACHE);
23 pte_val(pte) |= (((unsigned long)space) << 32);
24 return pte;
25}
26
18/* Remap IO memory, the same way as remap_pfn_range(), but use 27/* Remap IO memory, the same way as remap_pfn_range(), but use
19 * the obio memory space. 28 * the obio memory space.
20 * 29 *
@@ -68,6 +77,7 @@ static inline void io_remap_pte_range(struct mm_struct *mm, pte_t * pte,
68 BUG_ON(!pte_none(*pte)); 77 BUG_ON(!pte_none(*pte));
69 set_pte_at(mm, address, pte, entry); 78 set_pte_at(mm, address, pte, entry);
70 address += PAGE_SIZE; 79 address += PAGE_SIZE;
80 pte_val(entry) += PAGE_SIZE;
71 pte++; 81 pte++;
72 } while (address < curend); 82 } while (address < curend);
73 } while (address < end); 83 } while (address < end);
@@ -126,9 +136,13 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
126 struct mm_struct *mm = vma->vm_mm; 136 struct mm_struct *mm = vma->vm_mm;
127 int space = GET_IOSPACE(pfn); 137 int space = GET_IOSPACE(pfn);
128 unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT; 138 unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT;
139 unsigned long phys_base;
140
141 phys_base = offset | (((unsigned long) space) << 32UL);
129 142
130 /* See comment in mm/memory.c remap_pfn_range */ 143 /* See comment in mm/memory.c remap_pfn_range */
131 vma->vm_flags |= VM_IO | VM_RESERVED | VM_UNPAGED; 144 vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP;
145 vma->vm_pgoff = phys_base >> PAGE_SHIFT;
132 146
133 prot = __pgprot(pg_iobits); 147 prot = __pgprot(pg_iobits);
134 offset -= from; 148 offset -= from;
diff --git a/drivers/Makefile b/drivers/Makefile
index fac1e1603097..ea410b6b7644 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -5,7 +5,7 @@
5# Rewritten to use lists instead of if-statements. 5# Rewritten to use lists instead of if-statements.
6# 6#
7 7
8obj-$(CONFIG_PCI) += pci/ usb/ 8obj-$(CONFIG_PCI) += pci/
9obj-$(CONFIG_PARISC) += parisc/ 9obj-$(CONFIG_PARISC) += parisc/
10obj-$(CONFIG_RAPIDIO) += rapidio/ 10obj-$(CONFIG_RAPIDIO) += rapidio/
11obj-y += video/ 11obj-y += video/
@@ -49,6 +49,7 @@ obj-$(CONFIG_ATA_OVER_ETH) += block/aoe/
49obj-$(CONFIG_PARIDE) += block/paride/ 49obj-$(CONFIG_PARIDE) += block/paride/
50obj-$(CONFIG_TC) += tc/ 50obj-$(CONFIG_TC) += tc/
51obj-$(CONFIG_USB) += usb/ 51obj-$(CONFIG_USB) += usb/
52obj-$(CONFIG_PCI) += usb/
52obj-$(CONFIG_USB_GADGET) += usb/gadget/ 53obj-$(CONFIG_USB_GADGET) += usb/gadget/
53obj-$(CONFIG_GAMEPORT) += input/gameport/ 54obj-$(CONFIG_GAMEPORT) += input/gameport/
54obj-$(CONFIG_INPUT) += input/ 55obj-$(CONFIG_INPUT) += input/
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index fe1e8126fbae..fce21c257523 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -197,7 +197,6 @@ config ACPI_ASUS
197config ACPI_IBM 197config ACPI_IBM
198 tristate "IBM ThinkPad Laptop Extras" 198 tristate "IBM ThinkPad Laptop Extras"
199 depends on X86 199 depends on X86
200 default y
201 ---help--- 200 ---help---
202 This is a Linux ACPI driver for the IBM ThinkPad laptops. It adds 201 This is a Linux ACPI driver for the IBM ThinkPad laptops. It adds
203 support for Fn-Fx key combinations, Bluetooth control, video 202 support for Fn-Fx key combinations, Bluetooth control, video
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index a18243488c66..5984b4f6715a 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -16,7 +16,7 @@ EXTRA_CFLAGS += $(ACPI_CFLAGS)
16# ACPI Boot-Time Table Parsing 16# ACPI Boot-Time Table Parsing
17# 17#
18obj-y += tables.o 18obj-y += tables.o
19obj-y += blacklist.o 19obj-$(CONFIG_X86) += blacklist.o
20 20
21# 21#
22# ACPI Core Subsystem (Interpreter) 22# ACPI Core Subsystem (Interpreter)
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 421792562642..0c561c571f29 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -543,6 +543,8 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
543 return_VALUE(0); 543 return_VALUE(0);
544} 544}
545 545
546static void *processor_device_array[NR_CPUS];
547
546static int acpi_processor_start(struct acpi_device *device) 548static int acpi_processor_start(struct acpi_device *device)
547{ 549{
548 int result = 0; 550 int result = 0;
@@ -561,6 +563,19 @@ static int acpi_processor_start(struct acpi_device *device)
561 563
562 BUG_ON((pr->id >= NR_CPUS) || (pr->id < 0)); 564 BUG_ON((pr->id >= NR_CPUS) || (pr->id < 0));
563 565
566 /*
567 * Buggy BIOS check
568 * ACPI id of processors can be reported wrongly by the BIOS.
569 * Don't trust it blindly
570 */
571 if (processor_device_array[pr->id] != NULL &&
572 processor_device_array[pr->id] != (void *)device) {
573 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "BIOS reporting wrong ACPI id"
574 "for the processor\n"));
575 return_VALUE(-ENODEV);
576 }
577 processor_device_array[pr->id] = (void *)device;
578
564 processors[pr->id] = pr; 579 processors[pr->id] = pr;
565 580
566 result = acpi_processor_add_fs(device); 581 result = acpi_processor_add_fs(device);
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 70d8a6ec0920..5f51057518b0 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -169,15 +169,11 @@ acpi_processor_power_activate(struct acpi_processor *pr,
169 169
170static void acpi_safe_halt(void) 170static void acpi_safe_halt(void)
171{ 171{
172 int polling = test_thread_flag(TIF_POLLING_NRFLAG); 172 clear_thread_flag(TIF_POLLING_NRFLAG);
173 if (polling) { 173 smp_mb__after_clear_bit();
174 clear_thread_flag(TIF_POLLING_NRFLAG);
175 smp_mb__after_clear_bit();
176 }
177 if (!need_resched()) 174 if (!need_resched())
178 safe_halt(); 175 safe_halt();
179 if (polling) 176 set_thread_flag(TIF_POLLING_NRFLAG);
180 set_thread_flag(TIF_POLLING_NRFLAG);
181} 177}
182 178
183static atomic_t c3_cpu_count; 179static atomic_t c3_cpu_count;
@@ -280,11 +276,31 @@ static void acpi_processor_idle(void)
280 276
281 cx->usage++; 277 cx->usage++;
282 278
279#ifdef CONFIG_HOTPLUG_CPU
280 /*
281 * Check for P_LVL2_UP flag before entering C2 and above on
282 * an SMP system. We do it here instead of doing it at _CST/P_LVL
283 * detection phase, to work cleanly with logical CPU hotplug.
284 */
285 if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) &&
286 !pr->flags.has_cst && acpi_fadt.plvl2_up)
287 cx->type = ACPI_STATE_C1;
288#endif
283 /* 289 /*
284 * Sleep: 290 * Sleep:
285 * ------ 291 * ------
286 * Invoke the current Cx state to put the processor to sleep. 292 * Invoke the current Cx state to put the processor to sleep.
287 */ 293 */
294 if (cx->type == ACPI_STATE_C2 || cx->type == ACPI_STATE_C3) {
295 clear_thread_flag(TIF_POLLING_NRFLAG);
296 smp_mb__after_clear_bit();
297 if (need_resched()) {
298 set_thread_flag(TIF_POLLING_NRFLAG);
299 local_irq_enable();
300 return;
301 }
302 }
303
288 switch (cx->type) { 304 switch (cx->type) {
289 305
290 case ACPI_STATE_C1: 306 case ACPI_STATE_C1:
@@ -317,6 +333,7 @@ static void acpi_processor_idle(void)
317 t2 = inl(acpi_fadt.xpm_tmr_blk.address); 333 t2 = inl(acpi_fadt.xpm_tmr_blk.address);
318 /* Re-enable interrupts */ 334 /* Re-enable interrupts */
319 local_irq_enable(); 335 local_irq_enable();
336 set_thread_flag(TIF_POLLING_NRFLAG);
320 /* Compute time (ticks) that we were actually asleep */ 337 /* Compute time (ticks) that we were actually asleep */
321 sleep_ticks = 338 sleep_ticks =
322 ticks_elapsed(t1, t2) - cx->latency_ticks - C2_OVERHEAD; 339 ticks_elapsed(t1, t2) - cx->latency_ticks - C2_OVERHEAD;
@@ -356,6 +373,7 @@ static void acpi_processor_idle(void)
356 373
357 /* Re-enable interrupts */ 374 /* Re-enable interrupts */
358 local_irq_enable(); 375 local_irq_enable();
376 set_thread_flag(TIF_POLLING_NRFLAG);
359 /* Compute time (ticks) that we were actually asleep */ 377 /* Compute time (ticks) that we were actually asleep */
360 sleep_ticks = 378 sleep_ticks =
361 ticks_elapsed(t1, t2) - cx->latency_ticks - C3_OVERHEAD; 379 ticks_elapsed(t1, t2) - cx->latency_ticks - C3_OVERHEAD;
@@ -534,6 +552,15 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
534 pr->power.states[ACPI_STATE_C0].valid = 1; 552 pr->power.states[ACPI_STATE_C0].valid = 1;
535 pr->power.states[ACPI_STATE_C1].valid = 1; 553 pr->power.states[ACPI_STATE_C1].valid = 1;
536 554
555#ifndef CONFIG_HOTPLUG_CPU
556 /*
557 * Check for P_LVL2_UP flag before entering C2 and above on
558 * an SMP system.
559 */
560 if ((num_online_cpus() > 1) && acpi_fadt.plvl2_up)
561 return_VALUE(-ENODEV);
562#endif
563
537 /* determine C2 and C3 address from pblk */ 564 /* determine C2 and C3 address from pblk */
538 pr->power.states[ACPI_STATE_C2].address = pr->pblk + 4; 565 pr->power.states[ACPI_STATE_C2].address = pr->pblk + 4;
539 pr->power.states[ACPI_STATE_C3].address = pr->pblk + 5; 566 pr->power.states[ACPI_STATE_C3].address = pr->pblk + 5;
@@ -690,7 +717,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
690 717
691 /* Validate number of power states discovered */ 718 /* Validate number of power states discovered */
692 if (pr->power.count < 2) 719 if (pr->power.count < 2)
693 status = -ENODEV; 720 status = -EFAULT;
694 721
695 end: 722 end:
696 acpi_os_free(buffer.pointer); 723 acpi_os_free(buffer.pointer);
@@ -841,11 +868,11 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr)
841 * this function */ 868 * this function */
842 869
843 result = acpi_processor_get_power_info_cst(pr); 870 result = acpi_processor_get_power_info_cst(pr);
844 if ((result) || (acpi_processor_power_verify(pr) < 2)) { 871 if (result == -ENODEV)
845 result = acpi_processor_get_power_info_fadt(pr); 872 result = acpi_processor_get_power_info_fadt(pr);
846 if ((result) || (acpi_processor_power_verify(pr) < 2)) 873
847 result = acpi_processor_get_power_info_default_c1(pr); 874 if ((result) || (acpi_processor_power_verify(pr) < 2))
848 } 875 result = acpi_processor_get_power_info_default_c1(pr);
849 876
850 /* 877 /*
851 * Set Default Policy 878 * Set Default Policy
diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c
index 37528c3b64b0..f37584015324 100644
--- a/drivers/acpi/processor_thermal.c
+++ b/drivers/acpi/processor_thermal.c
@@ -101,9 +101,7 @@ static unsigned int acpi_thermal_cpufreq_is_init = 0;
101static int cpu_has_cpufreq(unsigned int cpu) 101static int cpu_has_cpufreq(unsigned int cpu)
102{ 102{
103 struct cpufreq_policy policy; 103 struct cpufreq_policy policy;
104 if (!acpi_thermal_cpufreq_is_init) 104 if (!acpi_thermal_cpufreq_is_init || cpufreq_get_policy(&policy, cpu))
105 return -ENODEV;
106 if (!cpufreq_get_policy(&policy, cpu))
107 return -ENODEV; 105 return -ENODEV;
108 return 0; 106 return 0;
109} 107}
@@ -127,13 +125,13 @@ static int acpi_thermal_cpufreq_decrease(unsigned int cpu)
127 if (!cpu_has_cpufreq(cpu)) 125 if (!cpu_has_cpufreq(cpu))
128 return -ENODEV; 126 return -ENODEV;
129 127
130 if (cpufreq_thermal_reduction_pctg[cpu] >= 20) { 128 if (cpufreq_thermal_reduction_pctg[cpu] > 20)
131 cpufreq_thermal_reduction_pctg[cpu] -= 20; 129 cpufreq_thermal_reduction_pctg[cpu] -= 20;
132 cpufreq_update_policy(cpu); 130 else
133 return 0; 131 cpufreq_thermal_reduction_pctg[cpu] = 0;
134 } 132 cpufreq_update_policy(cpu);
135 133 /* We reached max freq again and can leave passive mode */
136 return -ERANGE; 134 return !cpufreq_thermal_reduction_pctg[cpu];
137} 135}
138 136
139static int acpi_thermal_cpufreq_notifier(struct notifier_block *nb, 137static int acpi_thermal_cpufreq_notifier(struct notifier_block *nb,
@@ -200,7 +198,7 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type)
200 int result = 0; 198 int result = 0;
201 struct acpi_processor *pr = NULL; 199 struct acpi_processor *pr = NULL;
202 struct acpi_device *device = NULL; 200 struct acpi_device *device = NULL;
203 int tx = 0; 201 int tx = 0, max_tx_px = 0;
204 202
205 ACPI_FUNCTION_TRACE("acpi_processor_set_thermal_limit"); 203 ACPI_FUNCTION_TRACE("acpi_processor_set_thermal_limit");
206 204
@@ -259,19 +257,27 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type)
259 /* if going down: T-states first, P-states later */ 257 /* if going down: T-states first, P-states later */
260 258
261 if (pr->flags.throttling) { 259 if (pr->flags.throttling) {
262 if (tx == 0) 260 if (tx == 0) {
261 max_tx_px = 1;
263 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 262 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
264 "At minimum throttling state\n")); 263 "At minimum throttling state\n"));
265 else { 264 } else {
266 tx--; 265 tx--;
267 goto end; 266 goto end;
268 } 267 }
269 } 268 }
270 269
271 result = acpi_thermal_cpufreq_decrease(pr->id); 270 result = acpi_thermal_cpufreq_decrease(pr->id);
272 if (result == -ERANGE) 271 if (result) {
272 /*
273 * We only could get -ERANGE, 1 or 0.
274 * In the first two cases we reached max freq again.
275 */
273 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 276 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
274 "At minimum performance state\n")); 277 "At minimum performance state\n"));
278 max_tx_px = 1;
279 } else
280 max_tx_px = 0;
275 281
276 break; 282 break;
277 } 283 }
@@ -290,8 +296,10 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type)
290 pr->limit.thermal.px, pr->limit.thermal.tx)); 296 pr->limit.thermal.px, pr->limit.thermal.tx));
291 } else 297 } else
292 result = 0; 298 result = 0;
293 299 if (max_tx_px)
294 return_VALUE(result); 300 return_VALUE(1);
301 else
302 return_VALUE(result);
295} 303}
296 304
297int acpi_processor_get_limit_info(struct acpi_processor *pr) 305int acpi_processor_get_limit_info(struct acpi_processor *pr)
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 23e2c6968a11..31218e1d2a18 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1110,7 +1110,7 @@ acpi_add_single_object(struct acpi_device **child,
1110 * 1110 *
1111 * TBD: Assumes LDM provides driver hot-plug capability. 1111 * TBD: Assumes LDM provides driver hot-plug capability.
1112 */ 1112 */
1113 result = acpi_bus_find_driver(device); 1113 acpi_bus_find_driver(device);
1114 1114
1115 end: 1115 end:
1116 if (!result) 1116 if (!result)
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index a24847c08f7f..19f3ea48475e 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -72,7 +72,7 @@
72#define _COMPONENT ACPI_THERMAL_COMPONENT 72#define _COMPONENT ACPI_THERMAL_COMPONENT
73ACPI_MODULE_NAME("acpi_thermal") 73ACPI_MODULE_NAME("acpi_thermal")
74 74
75 MODULE_AUTHOR("Paul Diefenbaugh"); 75MODULE_AUTHOR("Paul Diefenbaugh");
76MODULE_DESCRIPTION(ACPI_THERMAL_DRIVER_NAME); 76MODULE_DESCRIPTION(ACPI_THERMAL_DRIVER_NAME);
77MODULE_LICENSE("GPL"); 77MODULE_LICENSE("GPL");
78 78
@@ -517,9 +517,9 @@ static int acpi_thermal_hot(struct acpi_thermal *tz)
517 return_VALUE(0); 517 return_VALUE(0);
518} 518}
519 519
520static int acpi_thermal_passive(struct acpi_thermal *tz) 520static void acpi_thermal_passive(struct acpi_thermal *tz)
521{ 521{
522 int result = 0; 522 int result = 1;
523 struct acpi_thermal_passive *passive = NULL; 523 struct acpi_thermal_passive *passive = NULL;
524 int trend = 0; 524 int trend = 0;
525 int i = 0; 525 int i = 0;
@@ -527,7 +527,7 @@ static int acpi_thermal_passive(struct acpi_thermal *tz)
527 ACPI_FUNCTION_TRACE("acpi_thermal_passive"); 527 ACPI_FUNCTION_TRACE("acpi_thermal_passive");
528 528
529 if (!tz || !tz->trips.passive.flags.valid) 529 if (!tz || !tz->trips.passive.flags.valid)
530 return_VALUE(-EINVAL); 530 return;
531 531
532 passive = &(tz->trips.passive); 532 passive = &(tz->trips.passive);
533 533
@@ -547,7 +547,7 @@ static int acpi_thermal_passive(struct acpi_thermal *tz)
547 trend, passive->tc1, tz->temperature, 547 trend, passive->tc1, tz->temperature,
548 tz->last_temperature, passive->tc2, 548 tz->last_temperature, passive->tc2,
549 tz->temperature, passive->temperature)); 549 tz->temperature, passive->temperature));
550 tz->trips.passive.flags.enabled = 1; 550 passive->flags.enabled = 1;
551 /* Heating up? */ 551 /* Heating up? */
552 if (trend > 0) 552 if (trend > 0)
553 for (i = 0; i < passive->devices.count; i++) 553 for (i = 0; i < passive->devices.count; i++)
@@ -556,12 +556,32 @@ static int acpi_thermal_passive(struct acpi_thermal *tz)
556 handles[i], 556 handles[i],
557 ACPI_PROCESSOR_LIMIT_INCREMENT); 557 ACPI_PROCESSOR_LIMIT_INCREMENT);
558 /* Cooling off? */ 558 /* Cooling off? */
559 else if (trend < 0) 559 else if (trend < 0) {
560 for (i = 0; i < passive->devices.count; i++) 560 for (i = 0; i < passive->devices.count; i++)
561 acpi_processor_set_thermal_limit(passive-> 561 /*
562 devices. 562 * assume that we are on highest
563 handles[i], 563 * freq/lowest thrott and can leave
564 ACPI_PROCESSOR_LIMIT_DECREMENT); 564 * passive mode, even in error case
565 */
566 if (!acpi_processor_set_thermal_limit
567 (passive->devices.handles[i],
568 ACPI_PROCESSOR_LIMIT_DECREMENT))
569 result = 0;
570 /*
571 * Leave cooling mode, even if the temp might
572 * higher than trip point This is because some
573 * machines might have long thermal polling
574 * frequencies (tsp) defined. We will fall back
575 * into passive mode in next cycle (probably quicker)
576 */
577 if (result) {
578 passive->flags.enabled = 0;
579 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
580 "Disabling passive cooling, still above threshold,"
581 " but we are cooling down\n"));
582 }
583 }
584 return;
565 } 585 }
566 586
567 /* 587 /*
@@ -571,23 +591,21 @@ static int acpi_thermal_passive(struct acpi_thermal *tz)
571 * and avoid thrashing around the passive trip point. Note that we 591 * and avoid thrashing around the passive trip point. Note that we
572 * assume symmetry. 592 * assume symmetry.
573 */ 593 */
574 else if (tz->trips.passive.flags.enabled) { 594 if (!passive->flags.enabled)
575 for (i = 0; i < passive->devices.count; i++) 595 return;
576 result = 596 for (i = 0; i < passive->devices.count; i++)
577 acpi_processor_set_thermal_limit(passive->devices. 597 if (!acpi_processor_set_thermal_limit
578 handles[i], 598 (passive->devices.handles[i],
579 ACPI_PROCESSOR_LIMIT_DECREMENT); 599 ACPI_PROCESSOR_LIMIT_DECREMENT))
580 if (result == 1) { 600 result = 0;
581 tz->trips.passive.flags.enabled = 0; 601 if (result) {
582 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 602 passive->flags.enabled = 0;
583 "Disabling passive cooling (zone is cool)\n")); 603 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
584 } 604 "Disabling passive cooling (zone is cool)\n"));
585 } 605 }
586
587 return_VALUE(0);
588} 606}
589 607
590static int acpi_thermal_active(struct acpi_thermal *tz) 608static void acpi_thermal_active(struct acpi_thermal *tz)
591{ 609{
592 int result = 0; 610 int result = 0;
593 struct acpi_thermal_active *active = NULL; 611 struct acpi_thermal_active *active = NULL;
@@ -598,74 +616,66 @@ static int acpi_thermal_active(struct acpi_thermal *tz)
598 ACPI_FUNCTION_TRACE("acpi_thermal_active"); 616 ACPI_FUNCTION_TRACE("acpi_thermal_active");
599 617
600 if (!tz) 618 if (!tz)
601 return_VALUE(-EINVAL); 619 return;
602 620
603 for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) { 621 for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) {
604
605 active = &(tz->trips.active[i]); 622 active = &(tz->trips.active[i]);
606 if (!active || !active->flags.valid) 623 if (!active || !active->flags.valid)
607 break; 624 break;
608
609 /*
610 * Above Threshold?
611 * ----------------
612 * If not already enabled, turn ON all cooling devices
613 * associated with this active threshold.
614 */
615 if (tz->temperature >= active->temperature) { 625 if (tz->temperature >= active->temperature) {
626 /*
627 * Above Threshold?
628 * ----------------
629 * If not already enabled, turn ON all cooling devices
630 * associated with this active threshold.
631 */
616 if (active->temperature > maxtemp) 632 if (active->temperature > maxtemp)
617 tz->state.active_index = i, maxtemp = 633 tz->state.active_index = i;
618 active->temperature; 634 maxtemp = active->temperature;
619 if (!active->flags.enabled) { 635 if (active->flags.enabled)
620 for (j = 0; j < active->devices.count; j++) { 636 continue;
621 result =
622 acpi_bus_set_power(active->devices.
623 handles[j],
624 ACPI_STATE_D0);
625 if (result) {
626 ACPI_DEBUG_PRINT((ACPI_DB_WARN,
627 "Unable to turn cooling device [%p] 'on'\n",
628 active->
629 devices.
630 handles[j]));
631 continue;
632 }
633 active->flags.enabled = 1;
634 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
635 "Cooling device [%p] now 'on'\n",
636 active->devices.
637 handles[j]));
638 }
639 }
640 }
641 /*
642 * Below Threshold?
643 * ----------------
644 * Turn OFF all cooling devices associated with this
645 * threshold.
646 */
647 else if (active->flags.enabled) {
648 for (j = 0; j < active->devices.count; j++) { 637 for (j = 0; j < active->devices.count; j++) {
649 result = 638 result =
650 acpi_bus_set_power(active->devices. 639 acpi_bus_set_power(active->devices.
651 handles[j], 640 handles[j],
652 ACPI_STATE_D3); 641 ACPI_STATE_D0);
653 if (result) { 642 if (result) {
654 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 643 ACPI_DEBUG_PRINT((ACPI_DB_WARN,
655 "Unable to turn cooling device [%p] 'off'\n", 644 "Unable to turn cooling device [%p] 'on'\n",
656 active->devices. 645 active->devices.
657 handles[j])); 646 handles[j]));
658 continue; 647 continue;
659 } 648 }
660 active->flags.enabled = 0; 649 active->flags.enabled = 1;
661 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 650 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
662 "Cooling device [%p] now 'off'\n", 651 "Cooling device [%p] now 'on'\n",
663 active->devices.handles[j])); 652 active->devices.handles[j]));
664 } 653 }
654 continue;
655 }
656 if (!active->flags.enabled)
657 continue;
658 /*
659 * Below Threshold?
660 * ----------------
661 * Turn OFF all cooling devices associated with this
662 * threshold.
663 */
664 for (j = 0; j < active->devices.count; j++) {
665 result = acpi_bus_set_power(active->devices.handles[j],
666 ACPI_STATE_D3);
667 if (result) {
668 ACPI_DEBUG_PRINT((ACPI_DB_WARN,
669 "Unable to turn cooling device [%p] 'off'\n",
670 active->devices.handles[j]));
671 continue;
672 }
673 active->flags.enabled = 0;
674 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
675 "Cooling device [%p] now 'off'\n",
676 active->devices.handles[j]));
665 } 677 }
666 } 678 }
667
668 return_VALUE(0);
669} 679}
670 680
671static void acpi_thermal_check(void *context); 681static void acpi_thermal_check(void *context);
@@ -744,15 +754,12 @@ static void acpi_thermal_check(void *data)
744 * Again, separated from the above two to allow independent policy 754 * Again, separated from the above two to allow independent policy
745 * decisions. 755 * decisions.
746 */ 756 */
747 if (tz->trips.critical.flags.enabled) 757 tz->state.critical = tz->trips.critical.flags.enabled;
748 tz->state.critical = 1; 758 tz->state.hot = tz->trips.hot.flags.enabled;
749 if (tz->trips.hot.flags.enabled) 759 tz->state.passive = tz->trips.passive.flags.enabled;
750 tz->state.hot = 1; 760 tz->state.active = 0;
751 if (tz->trips.passive.flags.enabled)
752 tz->state.passive = 1;
753 for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) 761 for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++)
754 if (tz->trips.active[i].flags.enabled) 762 tz->state.active |= tz->trips.active[i].flags.enabled;
755 tz->state.active = 1;
756 763
757 /* 764 /*
758 * Calculate Sleep Time 765 * Calculate Sleep Time
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index f051b151580d..d10668f14699 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -812,7 +812,7 @@ acpi_video_device_write_brightness(struct file *file,
812 812
813 ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness"); 813 ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness");
814 814
815 if (!dev || count + 1 > sizeof str) 815 if (!dev || !dev->brightness || count + 1 > sizeof str)
816 return_VALUE(-EINVAL); 816 return_VALUE(-EINVAL);
817 817
818 if (copy_from_user(str, buffer, count)) 818 if (copy_from_user(str, buffer, count))
diff --git a/drivers/atm/Kconfig b/drivers/atm/Kconfig
index 489de81ea609..01a9f1cb7743 100644
--- a/drivers/atm/Kconfig
+++ b/drivers/atm/Kconfig
@@ -5,6 +5,13 @@
5menu "ATM drivers" 5menu "ATM drivers"
6 depends on NETDEVICES && ATM 6 depends on NETDEVICES && ATM
7 7
8config ATM_DUMMY
9 tristate "Dummy ATM driver"
10 depends on ATM
11 help
12 Dummy ATM driver. Useful for proxy signalling, testing,
13 and development. If unsure, say N.
14
8config ATM_TCP 15config ATM_TCP
9 tristate "ATM over TCP" 16 tristate "ATM over TCP"
10 depends on INET && ATM 17 depends on INET && ATM
diff --git a/drivers/atm/Makefile b/drivers/atm/Makefile
index 5b77188527a9..b5077ce8cb40 100644
--- a/drivers/atm/Makefile
+++ b/drivers/atm/Makefile
@@ -31,6 +31,7 @@ ifeq ($(CONFIG_ATM_IDT77252_USE_SUNI),y)
31 obj-$(CONFIG_ATM_IDT77252) += suni.o 31 obj-$(CONFIG_ATM_IDT77252) += suni.o
32endif 32endif
33 33
34obj-$(CONFIG_ATM_DUMMY) += adummy.o
34obj-$(CONFIG_ATM_TCP) += atmtcp.o 35obj-$(CONFIG_ATM_TCP) += atmtcp.o
35obj-$(CONFIG_ATM_FIRESTREAM) += firestream.o 36obj-$(CONFIG_ATM_FIRESTREAM) += firestream.o
36obj-$(CONFIG_ATM_LANAI) += lanai.o 37obj-$(CONFIG_ATM_LANAI) += lanai.o
diff --git a/drivers/atm/adummy.c b/drivers/atm/adummy.c
new file mode 100644
index 000000000000..d15c194be44a
--- /dev/null
+++ b/drivers/atm/adummy.c
@@ -0,0 +1,168 @@
1/*
2 * adummy.c: a dummy ATM driver
3 */
4
5#include <linux/config.h>
6#include <linux/module.h>
7#include <linux/version.h>
8#include <linux/kernel.h>
9#include <linux/skbuff.h>
10#include <linux/pci.h>
11#include <linux/errno.h>
12#include <linux/types.h>
13#include <linux/string.h>
14#include <linux/delay.h>
15#include <linux/init.h>
16#include <linux/mm.h>
17#include <linux/sched.h>
18#include <linux/timer.h>
19#include <linux/interrupt.h>
20#include <asm/io.h>
21#include <asm/byteorder.h>
22#include <asm/uaccess.h>
23
24#include <linux/atmdev.h>
25#include <linux/atm.h>
26#include <linux/sonet.h>
27
28/* version definition */
29
30#define DRV_VERSION "1.0"
31
32#define DEV_LABEL "adummy"
33
34#define ADUMMY_DEV(dev) ((struct adummy_dev *) (dev)->dev_data)
35
36struct adummy_dev {
37 struct atm_dev *atm_dev;
38
39 struct list_head entry;
40};
41
42/* globals */
43
44static LIST_HEAD(adummy_devs);
45
46static int __init
47adummy_start(struct atm_dev *dev)
48{
49 dev->ci_range.vpi_bits = 4;
50 dev->ci_range.vci_bits = 12;
51
52 return 0;
53}
54
55static int
56adummy_open(struct atm_vcc *vcc)
57{
58 short vpi = vcc->vpi;
59 int vci = vcc->vci;
60
61 if (vci == ATM_VCI_UNSPEC || vpi == ATM_VPI_UNSPEC)
62 return 0;
63
64 set_bit(ATM_VF_ADDR, &vcc->flags);
65 set_bit(ATM_VF_READY, &vcc->flags);
66
67 return 0;
68}
69
70static void
71adummy_close(struct atm_vcc *vcc)
72{
73 clear_bit(ATM_VF_READY, &vcc->flags);
74 clear_bit(ATM_VF_ADDR, &vcc->flags);
75}
76
77static int
78adummy_send(struct atm_vcc *vcc, struct sk_buff *skb)
79{
80 if (vcc->pop)
81 vcc->pop(vcc, skb);
82 else
83 dev_kfree_skb_any(skb);
84 atomic_inc(&vcc->stats->tx);
85
86 return 0;
87}
88
89static int
90adummy_proc_read(struct atm_dev *dev, loff_t *pos, char *page)
91{
92 int left = *pos;
93
94 if (!left--)
95 return sprintf(page, "version %s\n", DRV_VERSION);
96
97 return 0;
98}
99
100static struct atmdev_ops adummy_ops =
101{
102 .open = adummy_open,
103 .close = adummy_close,
104 .send = adummy_send,
105 .proc_read = adummy_proc_read,
106 .owner = THIS_MODULE
107};
108
109static int __init adummy_init(void)
110{
111 struct atm_dev *atm_dev;
112 struct adummy_dev *adummy_dev;
113 int err = 0;
114
115 printk(KERN_ERR "adummy: version %s\n", DRV_VERSION);
116
117 adummy_dev = (struct adummy_dev *) kmalloc(sizeof(struct adummy_dev),
118 GFP_KERNEL);
119 if (!adummy_dev) {
120 printk(KERN_ERR DEV_LABEL ": kmalloc() failed\n");
121 err = -ENOMEM;
122 goto out;
123 }
124 memset(adummy_dev, 0, sizeof(struct adummy_dev));
125
126 atm_dev = atm_dev_register(DEV_LABEL, &adummy_ops, -1, 0);
127 if (!atm_dev) {
128 printk(KERN_ERR DEV_LABEL ": atm_dev_register() failed\n");
129 err = -ENODEV;
130 goto out_kfree;
131 }
132
133 adummy_dev->atm_dev = atm_dev;
134 atm_dev->dev_data = adummy_dev;
135
136 if (adummy_start(atm_dev)) {
137 printk(KERN_ERR DEV_LABEL ": adummy_start() failed\n");
138 err = -ENODEV;
139 goto out_unregister;
140 }
141
142 list_add(&adummy_dev->entry, &adummy_devs);
143out:
144 return err;
145
146out_unregister:
147 atm_dev_deregister(atm_dev);
148out_kfree:
149 kfree(adummy_dev);
150 goto out;
151}
152
153static void __exit adummy_cleanup(void)
154{
155 struct adummy_dev *adummy_dev, *next;
156
157 list_for_each_entry_safe(adummy_dev, next, &adummy_devs, entry) {
158 atm_dev_deregister(adummy_dev->atm_dev);
159 kfree(adummy_dev);
160 }
161}
162
163module_init(adummy_init);
164module_exit(adummy_cleanup);
165
166MODULE_AUTHOR("chas williams <chas@cmf.nrl.navy.mil>");
167MODULE_DESCRIPTION("dummy ATM driver");
168MODULE_LICENSE("GPL");
diff --git a/drivers/atm/atmdev_init.c b/drivers/atm/atmdev_init.c
deleted file mode 100644
index 0e09e5c28e3f..000000000000
--- a/drivers/atm/atmdev_init.c
+++ /dev/null
@@ -1,54 +0,0 @@
1/* drivers/atm/atmdev_init.c - ATM device driver initialization */
2
3/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
4
5
6#include <linux/config.h>
7#include <linux/init.h>
8
9
10#ifdef CONFIG_ATM_ZATM
11extern int zatm_detect(void);
12#endif
13#ifdef CONFIG_ATM_AMBASSADOR
14extern int amb_detect(void);
15#endif
16#ifdef CONFIG_ATM_HORIZON
17extern int hrz_detect(void);
18#endif
19#ifdef CONFIG_ATM_FORE200E
20extern int fore200e_detect(void);
21#endif
22#ifdef CONFIG_ATM_LANAI
23extern int lanai_detect(void);
24#endif
25
26
27/*
28 * For historical reasons, atmdev_init returns the number of devices found.
29 * Note that some detections may not go via atmdev_init (e.g. eni.c), so this
30 * number is meaningless.
31 */
32
33int __init atmdev_init(void)
34{
35 int devs;
36
37 devs = 0;
38#ifdef CONFIG_ATM_ZATM
39 devs += zatm_detect();
40#endif
41#ifdef CONFIG_ATM_AMBASSADOR
42 devs += amb_detect();
43#endif
44#ifdef CONFIG_ATM_HORIZON
45 devs += hrz_detect();
46#endif
47#ifdef CONFIG_ATM_FORE200E
48 devs += fore200e_detect();
49#endif
50#ifdef CONFIG_ATM_LANAI
51 devs += lanai_detect();
52#endif
53 return devs;
54}
diff --git a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c
index 57f1810fdccd..fc518d85543d 100644
--- a/drivers/atm/atmtcp.c
+++ b/drivers/atm/atmtcp.c
@@ -246,10 +246,6 @@ static void atmtcp_c_close(struct atm_vcc *vcc)
246{ 246{
247 struct atm_dev *atmtcp_dev; 247 struct atm_dev *atmtcp_dev;
248 struct atmtcp_dev_data *dev_data; 248 struct atmtcp_dev_data *dev_data;
249 struct sock *s;
250 struct hlist_node *node;
251 struct atm_vcc *walk;
252 int i;
253 249
254 atmtcp_dev = (struct atm_dev *) vcc->dev_data; 250 atmtcp_dev = (struct atm_dev *) vcc->dev_data;
255 dev_data = PRIV(atmtcp_dev); 251 dev_data = PRIV(atmtcp_dev);
@@ -257,20 +253,8 @@ static void atmtcp_c_close(struct atm_vcc *vcc)
257 if (dev_data->persist) return; 253 if (dev_data->persist) return;
258 atmtcp_dev->dev_data = NULL; 254 atmtcp_dev->dev_data = NULL;
259 kfree(dev_data); 255 kfree(dev_data);
260 shutdown_atm_dev(atmtcp_dev); 256 atm_dev_deregister(atmtcp_dev);
261 vcc->dev_data = NULL; 257 vcc->dev_data = NULL;
262 read_lock(&vcc_sklist_lock);
263 for(i = 0; i < VCC_HTABLE_SIZE; ++i) {
264 struct hlist_head *head = &vcc_hash[i];
265
266 sk_for_each(s, node, head) {
267 walk = atm_sk(s);
268 if (walk->dev != atmtcp_dev)
269 continue;
270 wake_up(s->sk_sleep);
271 }
272 }
273 read_unlock(&vcc_sklist_lock);
274 module_put(THIS_MODULE); 258 module_put(THIS_MODULE);
275} 259}
276 260
@@ -450,7 +434,7 @@ static int atmtcp_remove_persistent(int itf)
450 if (PRIV(dev)->vcc) return 0; 434 if (PRIV(dev)->vcc) return 0;
451 kfree(dev_data); 435 kfree(dev_data);
452 atm_dev_put(dev); 436 atm_dev_put(dev);
453 shutdown_atm_dev(dev); 437 atm_dev_deregister(dev);
454 return 0; 438 return 0;
455} 439}
456 440
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
index 51ec14787293..69f4c7ce9a63 100644
--- a/drivers/atm/lanai.c
+++ b/drivers/atm/lanai.c
@@ -39,7 +39,7 @@
39 * o lanai_change_qos() isn't written yet 39 * o lanai_change_qos() isn't written yet
40 * 40 *
41 * o There aren't any ioctl's yet -- I'd like to eventually support 41 * o There aren't any ioctl's yet -- I'd like to eventually support
42 * setting loopback and LED modes that way. (see lanai_ioctl) 42 * setting loopback and LED modes that way.
43 * 43 *
44 * o If the segmentation engine or DMA gets shut down we should restart 44 * o If the segmentation engine or DMA gets shut down we should restart
45 * card as per section 17.0i. (see lanai_reset) 45 * card as per section 17.0i. (see lanai_reset)
@@ -305,7 +305,7 @@ struct lanai_dev {
305 * vci with their bit set 305 * vci with their bit set
306 */ 306 */
307static void vci_bitfield_iterate(struct lanai_dev *lanai, 307static void vci_bitfield_iterate(struct lanai_dev *lanai,
308 /*const*/ unsigned long *lp, 308 const unsigned long *lp,
309 void (*func)(struct lanai_dev *,vci_t vci)) 309 void (*func)(struct lanai_dev *,vci_t vci))
310{ 310{
311 vci_t vci = find_first_bit(lp, NUM_VCI); 311 vci_t vci = find_first_bit(lp, NUM_VCI);
@@ -951,7 +951,7 @@ static int __devinit eeprom_read(struct lanai_dev *lanai)
951/* read a big-endian 4-byte value out of eeprom */ 951/* read a big-endian 4-byte value out of eeprom */
952static inline u32 eeprom_be4(const struct lanai_dev *lanai, int address) 952static inline u32 eeprom_be4(const struct lanai_dev *lanai, int address)
953{ 953{
954 return be32_to_cpup((u32 *) (&lanai->eeprom[address])); 954 return be32_to_cpup((const u32 *) &lanai->eeprom[address]);
955} 955}
956 956
957/* Checksum/validate EEPROM contents */ 957/* Checksum/validate EEPROM contents */
@@ -1160,7 +1160,7 @@ static inline int vcc_tx_space(const struct lanai_vcc *lvcc, int endptr)
1160} 1160}
1161 1161
1162/* test if VCC is currently backlogged */ 1162/* test if VCC is currently backlogged */
1163static inline int vcc_is_backlogged(/*const*/ struct lanai_vcc *lvcc) 1163static inline int vcc_is_backlogged(const struct lanai_vcc *lvcc)
1164{ 1164{
1165 return !skb_queue_empty(&lvcc->tx.backlog); 1165 return !skb_queue_empty(&lvcc->tx.backlog);
1166} 1166}
@@ -1395,7 +1395,8 @@ static void vcc_rx_aal5(struct lanai_vcc *lvcc, int endptr)
1395{ 1395{
1396 int size; 1396 int size;
1397 struct sk_buff *skb; 1397 struct sk_buff *skb;
1398 /*const*/ u32 *x, *end = &lvcc->rx.buf.start[endptr * 4]; 1398 const u32 *x;
1399 u32 *end = &lvcc->rx.buf.start[endptr * 4];
1399 int n = ((unsigned long) end) - ((unsigned long) lvcc->rx.buf.ptr); 1400 int n = ((unsigned long) end) - ((unsigned long) lvcc->rx.buf.ptr);
1400 if (n < 0) 1401 if (n < 0)
1401 n += lanai_buf_size(&lvcc->rx.buf); 1402 n += lanai_buf_size(&lvcc->rx.buf);
@@ -2111,7 +2112,7 @@ static int lanai_normalize_ci(struct lanai_dev *lanai,
2111 * shifted by that much as we compute 2112 * shifted by that much as we compute
2112 * 2113 *
2113 */ 2114 */
2114static int pcr_to_cbricg(/*const*/ struct atm_qos *qos) 2115static int pcr_to_cbricg(const struct atm_qos *qos)
2115{ 2116{
2116 int rounddown = 0; /* 1 = Round PCR down, i.e. round ICG _up_ */ 2117 int rounddown = 0; /* 1 = Round PCR down, i.e. round ICG _up_ */
2117 int x, icg, pcr = atm_pcr_goal(&qos->txtp); 2118 int x, icg, pcr = atm_pcr_goal(&qos->txtp);
@@ -2434,93 +2435,6 @@ static int lanai_open(struct atm_vcc *atmvcc)
2434 return result; 2435 return result;
2435} 2436}
2436 2437
2437#if 0
2438/* ioctl operations for card */
2439/* NOTE: these are all DEBUGGING ONLY currently */
2440static int lanai_ioctl(struct atm_dev *atmdev, unsigned int cmd, void __user *arg)
2441{
2442 int result = 0;
2443 struct lanai_dev *lanai = (struct lanai_dev *) atmdev->dev_data;
2444 switch(cmd) {
2445 case 2106275:
2446 shutdown_atm_dev(atmdev);
2447 return 0;
2448 case 2200000: {
2449 unsigned long flags;
2450 spin_lock_irqsave(&lanai->servicelock, flags);
2451 run_service(lanai);
2452 spin_unlock_irqrestore(&lanai->servicelock, flags);
2453 return 0; }
2454 case 2200002:
2455 get_statistics(lanai);
2456 return 0;
2457 case 2200003: {
2458 unsigned int i;
2459 for (i = 0; i <= 0x5C ; i += 4) {
2460 if (i==0x48) /* Write-only butt reg */
2461 continue;
2462 printk(KERN_CRIT DEV_LABEL " 0x%02X: "
2463 "0x%08X\n", i,
2464 (unsigned int) readl(lanai->base + i));
2465 barrier(); mb();
2466 pcistatus_check(lanai, 0);
2467 barrier(); mb();
2468 }
2469 return 0; }
2470 case 2200004: {
2471 u8 b;
2472 u16 w;
2473 u32 dw;
2474 struct pci_dev *pci = lanai->pci;
2475 (void) pci_read_config_word(pci, PCI_VENDOR_ID, &w);
2476 DPRINTK("vendor = 0x%X\n", (unsigned int) w);
2477 (void) pci_read_config_word(pci, PCI_DEVICE_ID, &w);
2478 DPRINTK("device = 0x%X\n", (unsigned int) w);
2479 (void) pci_read_config_word(pci, PCI_COMMAND, &w);
2480 DPRINTK("command = 0x%X\n", (unsigned int) w);
2481 (void) pci_read_config_word(pci, PCI_STATUS, &w);
2482 DPRINTK("status = 0x%X\n", (unsigned int) w);
2483 (void) pci_read_config_dword(pci,
2484 PCI_CLASS_REVISION, &dw);
2485 DPRINTK("class/revision = 0x%X\n", (unsigned int) dw);
2486 (void) pci_read_config_byte(pci,
2487 PCI_CACHE_LINE_SIZE, &b);
2488 DPRINTK("cache line size = 0x%X\n", (unsigned int) b);
2489 (void) pci_read_config_byte(pci, PCI_LATENCY_TIMER, &b);
2490 DPRINTK("latency = %d (0x%X)\n",
2491 (int) b, (unsigned int) b);
2492 (void) pci_read_config_byte(pci, PCI_HEADER_TYPE, &b);
2493 DPRINTK("header type = 0x%X\n", (unsigned int) b);
2494 (void) pci_read_config_byte(pci, PCI_BIST, &b);
2495 DPRINTK("bist = 0x%X\n", (unsigned int) b);
2496 /* skipping a few here */
2497 (void) pci_read_config_byte(pci,
2498 PCI_INTERRUPT_LINE, &b);
2499 DPRINTK("pci_int_line = 0x%X\n", (unsigned int) b);
2500 (void) pci_read_config_byte(pci,
2501 PCI_INTERRUPT_PIN, &b);
2502 DPRINTK("pci_int_pin = 0x%X\n", (unsigned int) b);
2503 (void) pci_read_config_byte(pci, PCI_MIN_GNT, &b);
2504 DPRINTK("min_gnt = 0x%X\n", (unsigned int) b);
2505 (void) pci_read_config_byte(pci, PCI_MAX_LAT, &b);
2506 DPRINTK("max_lat = 0x%X\n", (unsigned int) b); }
2507 return 0;
2508#ifdef USE_POWERDOWN
2509 case 2200005:
2510 DPRINTK("Coming out of powerdown\n");
2511 lanai->conf1 &= ~CONFIG1_POWERDOWN;
2512 conf1_write(lanai);
2513 return 0;
2514#endif
2515 default:
2516 result = -ENOIOCTLCMD;
2517 }
2518 return result;
2519}
2520#else /* !0 */
2521#define lanai_ioctl NULL
2522#endif /* 0 */
2523
2524static int lanai_send(struct atm_vcc *atmvcc, struct sk_buff *skb) 2438static int lanai_send(struct atm_vcc *atmvcc, struct sk_buff *skb)
2525{ 2439{
2526 struct lanai_vcc *lvcc = (struct lanai_vcc *) atmvcc->dev_data; 2440 struct lanai_vcc *lvcc = (struct lanai_vcc *) atmvcc->dev_data;
@@ -2678,7 +2592,6 @@ static const struct atmdev_ops ops = {
2678 .dev_close = lanai_dev_close, 2592 .dev_close = lanai_dev_close,
2679 .open = lanai_open, 2593 .open = lanai_open,
2680 .close = lanai_close, 2594 .close = lanai_close,
2681 .ioctl = lanai_ioctl,
2682 .getsockopt = NULL, 2595 .getsockopt = NULL,
2683 .setsockopt = NULL, 2596 .setsockopt = NULL,
2684 .send = lanai_send, 2597 .send = lanai_send,
@@ -2760,6 +2673,7 @@ static void __exit lanai_module_exit(void)
2760 * gone, so there isn't much to do 2673 * gone, so there isn't much to do
2761 */ 2674 */
2762 DPRINTK("cleanup_module()\n"); 2675 DPRINTK("cleanup_module()\n");
2676 pci_unregister_driver(&lanai_driver);
2763} 2677}
2764 2678
2765module_init(lanai_module_init); 2679module_init(lanai_module_init);
diff --git a/drivers/char/drm/drm_context.c b/drivers/char/drm/drm_context.c
index bdd168d88f49..bd958d69a2ac 100644
--- a/drivers/char/drm/drm_context.c
+++ b/drivers/char/drm/drm_context.c
@@ -432,7 +432,10 @@ int drm_addctx(struct inode *inode, struct file *filp,
432 432
433 if (ctx.handle != DRM_KERNEL_CONTEXT) { 433 if (ctx.handle != DRM_KERNEL_CONTEXT) {
434 if (dev->driver->context_ctor) 434 if (dev->driver->context_ctor)
435 dev->driver->context_ctor(dev, ctx.handle); 435 if (!dev->driver->context_ctor(dev, ctx.handle)) {
436 DRM_DEBUG( "Running out of ctxs or memory.\n");
437 return -ENOMEM;
438 }
436 } 439 }
437 440
438 ctx_entry = drm_alloc(sizeof(*ctx_entry), DRM_MEM_CTXLIST); 441 ctx_entry = drm_alloc(sizeof(*ctx_entry), DRM_MEM_CTXLIST);
diff --git a/drivers/char/drm/drm_lock.c b/drivers/char/drm/drm_lock.c
index b276ae8a6633..b48a595d54ec 100644
--- a/drivers/char/drm/drm_lock.c
+++ b/drivers/char/drm/drm_lock.c
@@ -104,6 +104,10 @@ int drm_lock(struct inode *inode, struct file *filp,
104 __set_current_state(TASK_RUNNING); 104 __set_current_state(TASK_RUNNING);
105 remove_wait_queue(&dev->lock.lock_queue, &entry); 105 remove_wait_queue(&dev->lock.lock_queue, &entry);
106 106
107 DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
108 if (ret)
109 return ret;
110
107 sigemptyset(&dev->sigmask); 111 sigemptyset(&dev->sigmask);
108 sigaddset(&dev->sigmask, SIGSTOP); 112 sigaddset(&dev->sigmask, SIGSTOP);
109 sigaddset(&dev->sigmask, SIGTSTP); 113 sigaddset(&dev->sigmask, SIGTSTP);
@@ -116,8 +120,12 @@ int drm_lock(struct inode *inode, struct file *filp,
116 if (dev->driver->dma_ready && (lock.flags & _DRM_LOCK_READY)) 120 if (dev->driver->dma_ready && (lock.flags & _DRM_LOCK_READY))
117 dev->driver->dma_ready(dev); 121 dev->driver->dma_ready(dev);
118 122
119 if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT)) 123 if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT)) {
120 return dev->driver->dma_quiescent(dev); 124 if (dev->driver->dma_quiescent(dev)) {
125 DRM_DEBUG("%d waiting for DMA quiescent\n", lock.context);
126 return DRM_ERR(EBUSY);
127 }
128 }
121 129
122 /* dev->driver->kernel_context_switch isn't used by any of the x86 130 /* dev->driver->kernel_context_switch isn't used by any of the x86
123 * drivers but is used by the Sparc driver. 131 * drivers but is used by the Sparc driver.
@@ -128,9 +136,7 @@ int drm_lock(struct inode *inode, struct file *filp,
128 dev->driver->kernel_context_switch(dev, dev->last_context, 136 dev->driver->kernel_context_switch(dev, dev->last_context,
129 lock.context); 137 lock.context);
130 } 138 }
131 DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock"); 139 return 0;
132
133 return ret;
134} 140}
135 141
136/** 142/**
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 29c3b631445a..91dd669273e0 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -591,7 +591,7 @@ static inline size_t read_zero_pagealigned(char __user * buf, size_t size)
591 591
592 if (vma->vm_start > addr || (vma->vm_flags & VM_WRITE) == 0) 592 if (vma->vm_start > addr || (vma->vm_flags & VM_WRITE) == 0)
593 goto out_up; 593 goto out_up;
594 if (vma->vm_flags & (VM_SHARED | VM_HUGETLB | VM_UNPAGED)) 594 if (vma->vm_flags & (VM_SHARED | VM_HUGETLB))
595 break; 595 break;
596 count = vma->vm_end - addr; 596 count = vma->vm_end - addr;
597 if (count > size) 597 if (count > size)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 1c0f62d0f938..815902c2c856 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1113,21 +1113,13 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
1113{ 1113{
1114 int retval = -EINVAL; 1114 int retval = -EINVAL;
1115 1115
1116 /* 1116 lock_cpu_hotplug();
1117 * If we are already in context of hotplug thread, we dont need to
1118 * acquire the hotplug lock. Otherwise acquire cpucontrol to prevent
1119 * hotplug from removing this cpu that we are working on.
1120 */
1121 if (!current_in_cpu_hotplug())
1122 lock_cpu_hotplug();
1123
1124 dprintk("target for CPU %u: %u kHz, relation %u\n", policy->cpu, 1117 dprintk("target for CPU %u: %u kHz, relation %u\n", policy->cpu,
1125 target_freq, relation); 1118 target_freq, relation);
1126 if (cpu_online(policy->cpu) && cpufreq_driver->target) 1119 if (cpu_online(policy->cpu) && cpufreq_driver->target)
1127 retval = cpufreq_driver->target(policy, target_freq, relation); 1120 retval = cpufreq_driver->target(policy, target_freq, relation);
1128 1121
1129 if (!current_in_cpu_hotplug()) 1122 unlock_cpu_hotplug();
1130 unlock_cpu_hotplug();
1131 1123
1132 return retval; 1124 return retval;
1133} 1125}
diff --git a/drivers/hwmon/w83792d.c b/drivers/hwmon/w83792d.c
index 4be59dbb78c4..1ba072630361 100644
--- a/drivers/hwmon/w83792d.c
+++ b/drivers/hwmon/w83792d.c
@@ -193,6 +193,7 @@ static const u8 W83792D_REG_LEVELS[3][4] = {
193 0xE2 } /* (bit3-0) SmartFanII: Fan3 Level 3 */ 193 0xE2 } /* (bit3-0) SmartFanII: Fan3 Level 3 */
194}; 194};
195 195
196#define W83792D_REG_GPIO_EN 0x1A
196#define W83792D_REG_CONFIG 0x40 197#define W83792D_REG_CONFIG 0x40
197#define W83792D_REG_VID_FANDIV 0x47 198#define W83792D_REG_VID_FANDIV 0x47
198#define W83792D_REG_CHIPID 0x49 199#define W83792D_REG_CHIPID 0x49
@@ -257,7 +258,7 @@ DIV_TO_REG(long val)
257{ 258{
258 int i; 259 int i;
259 val = SENSORS_LIMIT(val, 1, 128) >> 1; 260 val = SENSORS_LIMIT(val, 1, 128) >> 1;
260 for (i = 0; i < 6; i++) { 261 for (i = 0; i < 7; i++) {
261 if (val == 0) 262 if (val == 0)
262 break; 263 break;
263 val >>= 1; 264 val >>= 1;
@@ -1282,8 +1283,8 @@ w83792d_detect(struct i2c_adapter *adapter, int address, int kind)
1282 w83792d_init_client(new_client); 1283 w83792d_init_client(new_client);
1283 1284
1284 /* A few vars need to be filled upon startup */ 1285 /* A few vars need to be filled upon startup */
1285 for (i = 1; i <= 7; i++) { 1286 for (i = 0; i < 7; i++) {
1286 data->fan_min[i - 1] = w83792d_read_value(new_client, 1287 data->fan_min[i] = w83792d_read_value(new_client,
1287 W83792D_REG_FAN_MIN[i]); 1288 W83792D_REG_FAN_MIN[i]);
1288 } 1289 }
1289 1290
@@ -1306,10 +1307,20 @@ w83792d_detect(struct i2c_adapter *adapter, int address, int kind)
1306 device_create_file_fan(new_client, 1); 1307 device_create_file_fan(new_client, 1);
1307 device_create_file_fan(new_client, 2); 1308 device_create_file_fan(new_client, 2);
1308 device_create_file_fan(new_client, 3); 1309 device_create_file_fan(new_client, 3);
1309 device_create_file_fan(new_client, 4); 1310
1310 device_create_file_fan(new_client, 5); 1311 /* Read GPIO enable register to check if pins for fan 4,5 are used as
1311 device_create_file_fan(new_client, 6); 1312 GPIO */
1312 device_create_file_fan(new_client, 7); 1313 val1 = w83792d_read_value(new_client, W83792D_REG_GPIO_EN);
1314 if (!(val1 & 0x40))
1315 device_create_file_fan(new_client, 4);
1316 if (!(val1 & 0x20))
1317 device_create_file_fan(new_client, 5);
1318
1319 val1 = w83792d_read_value(new_client, W83792D_REG_PIN);
1320 if (val1 & 0x40)
1321 device_create_file_fan(new_client, 6);
1322 if (val1 & 0x04)
1323 device_create_file_fan(new_client, 7);
1313 1324
1314 device_create_file_temp1(new_client); /* Temp1 */ 1325 device_create_file_temp1(new_client); /* Temp1 */
1315 device_create_file_temp_add(new_client, 2); /* Temp2 */ 1326 device_create_file_temp_add(new_client, 2); /* Temp2 */
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 41d6b4017acb..d393b504bf26 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -355,9 +355,9 @@ error4:
355 spin_unlock_irqrestore(&port_priv->reg_lock, flags); 355 spin_unlock_irqrestore(&port_priv->reg_lock, flags);
356 kfree(reg_req); 356 kfree(reg_req);
357error3: 357error3:
358 kfree(mad_agent_priv);
359error2:
360 ib_dereg_mr(mad_agent_priv->agent.mr); 358 ib_dereg_mr(mad_agent_priv->agent.mr);
359error2:
360 kfree(mad_agent_priv);
361error1: 361error1:
362 return ret; 362 return ret;
363} 363}
diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c
index e73f81c22381..eb7f52537ccc 100644
--- a/drivers/infiniband/core/user_mad.c
+++ b/drivers/infiniband/core/user_mad.c
@@ -310,7 +310,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
310 u8 method; 310 u8 method;
311 __be64 *tid; 311 __be64 *tid;
312 int ret, length, hdr_len, copy_offset; 312 int ret, length, hdr_len, copy_offset;
313 int rmpp_active = 0; 313 int rmpp_active, has_rmpp_header;
314 314
315 if (count < sizeof (struct ib_user_mad) + IB_MGMT_RMPP_HDR) 315 if (count < sizeof (struct ib_user_mad) + IB_MGMT_RMPP_HDR)
316 return -EINVAL; 316 return -EINVAL;
@@ -360,28 +360,31 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
360 } 360 }
361 361
362 rmpp_mad = (struct ib_rmpp_mad *) packet->mad.data; 362 rmpp_mad = (struct ib_rmpp_mad *) packet->mad.data;
363 if (ib_get_rmpp_flags(&rmpp_mad->rmpp_hdr) & IB_MGMT_RMPP_FLAG_ACTIVE) { 363 if (rmpp_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_ADM) {
364 /* RMPP active */ 364 hdr_len = IB_MGMT_SA_HDR;
365 if (!agent->rmpp_version) {
366 ret = -EINVAL;
367 goto err_ah;
368 }
369
370 /* Validate that the management class can support RMPP */
371 if (rmpp_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_ADM) {
372 hdr_len = IB_MGMT_SA_HDR;
373 } else if ((rmpp_mad->mad_hdr.mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) &&
374 (rmpp_mad->mad_hdr.mgmt_class <= IB_MGMT_CLASS_VENDOR_RANGE2_END)) {
375 hdr_len = IB_MGMT_VENDOR_HDR;
376 } else {
377 ret = -EINVAL;
378 goto err_ah;
379 }
380 rmpp_active = 1;
381 copy_offset = IB_MGMT_RMPP_HDR; 365 copy_offset = IB_MGMT_RMPP_HDR;
366 has_rmpp_header = 1;
367 } else if (rmpp_mad->mad_hdr.mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START &&
368 rmpp_mad->mad_hdr.mgmt_class <= IB_MGMT_CLASS_VENDOR_RANGE2_END) {
369 hdr_len = IB_MGMT_VENDOR_HDR;
370 copy_offset = IB_MGMT_RMPP_HDR;
371 has_rmpp_header = 1;
382 } else { 372 } else {
383 hdr_len = IB_MGMT_MAD_HDR; 373 hdr_len = IB_MGMT_MAD_HDR;
384 copy_offset = IB_MGMT_MAD_HDR; 374 copy_offset = IB_MGMT_MAD_HDR;
375 has_rmpp_header = 0;
376 }
377
378 if (has_rmpp_header)
379 rmpp_active = ib_get_rmpp_flags(&rmpp_mad->rmpp_hdr) &
380 IB_MGMT_RMPP_FLAG_ACTIVE;
381 else
382 rmpp_active = 0;
383
384 /* Validate that the management class can support RMPP */
385 if (rmpp_active && !agent->rmpp_version) {
386 ret = -EINVAL;
387 goto err_ah;
385 } 388 }
386 389
387 packet->msg = ib_create_send_mad(agent, 390 packet->msg = ib_create_send_mad(agent,
diff --git a/drivers/infiniband/core/uverbs.h b/drivers/infiniband/core/uverbs.h
index ecb830127865..7114e3fbab00 100644
--- a/drivers/infiniband/core/uverbs.h
+++ b/drivers/infiniband/core/uverbs.h
@@ -105,12 +105,23 @@ struct ib_uverbs_event {
105 u32 *counter; 105 u32 *counter;
106}; 106};
107 107
108struct ib_uverbs_mcast_entry {
109 struct list_head list;
110 union ib_gid gid;
111 u16 lid;
112};
113
108struct ib_uevent_object { 114struct ib_uevent_object {
109 struct ib_uobject uobject; 115 struct ib_uobject uobject;
110 struct list_head event_list; 116 struct list_head event_list;
111 u32 events_reported; 117 u32 events_reported;
112}; 118};
113 119
120struct ib_uqp_object {
121 struct ib_uevent_object uevent;
122 struct list_head mcast_list;
123};
124
114struct ib_ucq_object { 125struct ib_ucq_object {
115 struct ib_uobject uobject; 126 struct ib_uobject uobject;
116 struct ib_uverbs_file *uverbs_file; 127 struct ib_uverbs_file *uverbs_file;
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index ed45da892b1c..a57d021d435a 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -815,7 +815,7 @@ ssize_t ib_uverbs_create_qp(struct ib_uverbs_file *file,
815 struct ib_uverbs_create_qp cmd; 815 struct ib_uverbs_create_qp cmd;
816 struct ib_uverbs_create_qp_resp resp; 816 struct ib_uverbs_create_qp_resp resp;
817 struct ib_udata udata; 817 struct ib_udata udata;
818 struct ib_uevent_object *uobj; 818 struct ib_uqp_object *uobj;
819 struct ib_pd *pd; 819 struct ib_pd *pd;
820 struct ib_cq *scq, *rcq; 820 struct ib_cq *scq, *rcq;
821 struct ib_srq *srq; 821 struct ib_srq *srq;
@@ -866,10 +866,11 @@ ssize_t ib_uverbs_create_qp(struct ib_uverbs_file *file,
866 attr.cap.max_recv_sge = cmd.max_recv_sge; 866 attr.cap.max_recv_sge = cmd.max_recv_sge;
867 attr.cap.max_inline_data = cmd.max_inline_data; 867 attr.cap.max_inline_data = cmd.max_inline_data;
868 868
869 uobj->uobject.user_handle = cmd.user_handle; 869 uobj->uevent.uobject.user_handle = cmd.user_handle;
870 uobj->uobject.context = file->ucontext; 870 uobj->uevent.uobject.context = file->ucontext;
871 uobj->events_reported = 0; 871 uobj->uevent.events_reported = 0;
872 INIT_LIST_HEAD(&uobj->event_list); 872 INIT_LIST_HEAD(&uobj->uevent.event_list);
873 INIT_LIST_HEAD(&uobj->mcast_list);
873 874
874 qp = pd->device->create_qp(pd, &attr, &udata); 875 qp = pd->device->create_qp(pd, &attr, &udata);
875 if (IS_ERR(qp)) { 876 if (IS_ERR(qp)) {
@@ -882,7 +883,7 @@ ssize_t ib_uverbs_create_qp(struct ib_uverbs_file *file,
882 qp->send_cq = attr.send_cq; 883 qp->send_cq = attr.send_cq;
883 qp->recv_cq = attr.recv_cq; 884 qp->recv_cq = attr.recv_cq;
884 qp->srq = attr.srq; 885 qp->srq = attr.srq;
885 qp->uobject = &uobj->uobject; 886 qp->uobject = &uobj->uevent.uobject;
886 qp->event_handler = attr.event_handler; 887 qp->event_handler = attr.event_handler;
887 qp->qp_context = attr.qp_context; 888 qp->qp_context = attr.qp_context;
888 qp->qp_type = attr.qp_type; 889 qp->qp_type = attr.qp_type;
@@ -901,14 +902,14 @@ retry:
901 goto err_destroy; 902 goto err_destroy;
902 } 903 }
903 904
904 ret = idr_get_new(&ib_uverbs_qp_idr, qp, &uobj->uobject.id); 905 ret = idr_get_new(&ib_uverbs_qp_idr, qp, &uobj->uevent.uobject.id);
905 906
906 if (ret == -EAGAIN) 907 if (ret == -EAGAIN)
907 goto retry; 908 goto retry;
908 if (ret) 909 if (ret)
909 goto err_destroy; 910 goto err_destroy;
910 911
911 resp.qp_handle = uobj->uobject.id; 912 resp.qp_handle = uobj->uevent.uobject.id;
912 resp.max_recv_sge = attr.cap.max_recv_sge; 913 resp.max_recv_sge = attr.cap.max_recv_sge;
913 resp.max_send_sge = attr.cap.max_send_sge; 914 resp.max_send_sge = attr.cap.max_send_sge;
914 resp.max_recv_wr = attr.cap.max_recv_wr; 915 resp.max_recv_wr = attr.cap.max_recv_wr;
@@ -922,7 +923,7 @@ retry:
922 } 923 }
923 924
924 down(&file->mutex); 925 down(&file->mutex);
925 list_add_tail(&uobj->uobject.list, &file->ucontext->qp_list); 926 list_add_tail(&uobj->uevent.uobject.list, &file->ucontext->qp_list);
926 up(&file->mutex); 927 up(&file->mutex);
927 928
928 up(&ib_uverbs_idr_mutex); 929 up(&ib_uverbs_idr_mutex);
@@ -930,7 +931,7 @@ retry:
930 return in_len; 931 return in_len;
931 932
932err_idr: 933err_idr:
933 idr_remove(&ib_uverbs_qp_idr, uobj->uobject.id); 934 idr_remove(&ib_uverbs_qp_idr, uobj->uevent.uobject.id);
934 935
935err_destroy: 936err_destroy:
936 ib_destroy_qp(qp); 937 ib_destroy_qp(qp);
@@ -1032,7 +1033,7 @@ ssize_t ib_uverbs_destroy_qp(struct ib_uverbs_file *file,
1032 struct ib_uverbs_destroy_qp cmd; 1033 struct ib_uverbs_destroy_qp cmd;
1033 struct ib_uverbs_destroy_qp_resp resp; 1034 struct ib_uverbs_destroy_qp_resp resp;
1034 struct ib_qp *qp; 1035 struct ib_qp *qp;
1035 struct ib_uevent_object *uobj; 1036 struct ib_uqp_object *uobj;
1036 int ret = -EINVAL; 1037 int ret = -EINVAL;
1037 1038
1038 if (copy_from_user(&cmd, buf, sizeof cmd)) 1039 if (copy_from_user(&cmd, buf, sizeof cmd))
@@ -1046,7 +1047,12 @@ ssize_t ib_uverbs_destroy_qp(struct ib_uverbs_file *file,
1046 if (!qp || qp->uobject->context != file->ucontext) 1047 if (!qp || qp->uobject->context != file->ucontext)
1047 goto out; 1048 goto out;
1048 1049
1049 uobj = container_of(qp->uobject, struct ib_uevent_object, uobject); 1050 uobj = container_of(qp->uobject, struct ib_uqp_object, uevent.uobject);
1051
1052 if (!list_empty(&uobj->mcast_list)) {
1053 ret = -EBUSY;
1054 goto out;
1055 }
1050 1056
1051 ret = ib_destroy_qp(qp); 1057 ret = ib_destroy_qp(qp);
1052 if (ret) 1058 if (ret)
@@ -1055,12 +1061,12 @@ ssize_t ib_uverbs_destroy_qp(struct ib_uverbs_file *file,
1055 idr_remove(&ib_uverbs_qp_idr, cmd.qp_handle); 1061 idr_remove(&ib_uverbs_qp_idr, cmd.qp_handle);
1056 1062
1057 down(&file->mutex); 1063 down(&file->mutex);
1058 list_del(&uobj->uobject.list); 1064 list_del(&uobj->uevent.uobject.list);
1059 up(&file->mutex); 1065 up(&file->mutex);
1060 1066
1061 ib_uverbs_release_uevent(file, uobj); 1067 ib_uverbs_release_uevent(file, &uobj->uevent);
1062 1068
1063 resp.events_reported = uobj->events_reported; 1069 resp.events_reported = uobj->uevent.events_reported;
1064 1070
1065 kfree(uobj); 1071 kfree(uobj);
1066 1072
@@ -1542,6 +1548,8 @@ ssize_t ib_uverbs_attach_mcast(struct ib_uverbs_file *file,
1542{ 1548{
1543 struct ib_uverbs_attach_mcast cmd; 1549 struct ib_uverbs_attach_mcast cmd;
1544 struct ib_qp *qp; 1550 struct ib_qp *qp;
1551 struct ib_uqp_object *uobj;
1552 struct ib_uverbs_mcast_entry *mcast;
1545 int ret = -EINVAL; 1553 int ret = -EINVAL;
1546 1554
1547 if (copy_from_user(&cmd, buf, sizeof cmd)) 1555 if (copy_from_user(&cmd, buf, sizeof cmd))
@@ -1550,9 +1558,36 @@ ssize_t ib_uverbs_attach_mcast(struct ib_uverbs_file *file,
1550 down(&ib_uverbs_idr_mutex); 1558 down(&ib_uverbs_idr_mutex);
1551 1559
1552 qp = idr_find(&ib_uverbs_qp_idr, cmd.qp_handle); 1560 qp = idr_find(&ib_uverbs_qp_idr, cmd.qp_handle);
1553 if (qp && qp->uobject->context == file->ucontext) 1561 if (!qp || qp->uobject->context != file->ucontext)
1554 ret = ib_attach_mcast(qp, (union ib_gid *) cmd.gid, cmd.mlid); 1562 goto out;
1563
1564 uobj = container_of(qp->uobject, struct ib_uqp_object, uevent.uobject);
1565
1566 list_for_each_entry(mcast, &uobj->mcast_list, list)
1567 if (cmd.mlid == mcast->lid &&
1568 !memcmp(cmd.gid, mcast->gid.raw, sizeof mcast->gid.raw)) {
1569 ret = 0;
1570 goto out;
1571 }
1555 1572
1573 mcast = kmalloc(sizeof *mcast, GFP_KERNEL);
1574 if (!mcast) {
1575 ret = -ENOMEM;
1576 goto out;
1577 }
1578
1579 mcast->lid = cmd.mlid;
1580 memcpy(mcast->gid.raw, cmd.gid, sizeof mcast->gid.raw);
1581
1582 ret = ib_attach_mcast(qp, &mcast->gid, cmd.mlid);
1583 if (!ret) {
1584 uobj = container_of(qp->uobject, struct ib_uqp_object,
1585 uevent.uobject);
1586 list_add_tail(&mcast->list, &uobj->mcast_list);
1587 } else
1588 kfree(mcast);
1589
1590out:
1556 up(&ib_uverbs_idr_mutex); 1591 up(&ib_uverbs_idr_mutex);
1557 1592
1558 return ret ? ret : in_len; 1593 return ret ? ret : in_len;
@@ -1563,7 +1598,9 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file *file,
1563 int out_len) 1598 int out_len)
1564{ 1599{
1565 struct ib_uverbs_detach_mcast cmd; 1600 struct ib_uverbs_detach_mcast cmd;
1601 struct ib_uqp_object *uobj;
1566 struct ib_qp *qp; 1602 struct ib_qp *qp;
1603 struct ib_uverbs_mcast_entry *mcast;
1567 int ret = -EINVAL; 1604 int ret = -EINVAL;
1568 1605
1569 if (copy_from_user(&cmd, buf, sizeof cmd)) 1606 if (copy_from_user(&cmd, buf, sizeof cmd))
@@ -1572,9 +1609,24 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file *file,
1572 down(&ib_uverbs_idr_mutex); 1609 down(&ib_uverbs_idr_mutex);
1573 1610
1574 qp = idr_find(&ib_uverbs_qp_idr, cmd.qp_handle); 1611 qp = idr_find(&ib_uverbs_qp_idr, cmd.qp_handle);
1575 if (qp && qp->uobject->context == file->ucontext) 1612 if (!qp || qp->uobject->context != file->ucontext)
1576 ret = ib_detach_mcast(qp, (union ib_gid *) cmd.gid, cmd.mlid); 1613 goto out;
1614
1615 ret = ib_detach_mcast(qp, (union ib_gid *) cmd.gid, cmd.mlid);
1616 if (ret)
1617 goto out;
1577 1618
1619 uobj = container_of(qp->uobject, struct ib_uqp_object, uevent.uobject);
1620
1621 list_for_each_entry(mcast, &uobj->mcast_list, list)
1622 if (cmd.mlid == mcast->lid &&
1623 !memcmp(cmd.gid, mcast->gid.raw, sizeof mcast->gid.raw)) {
1624 list_del(&mcast->list);
1625 kfree(mcast);
1626 break;
1627 }
1628
1629out:
1578 up(&ib_uverbs_idr_mutex); 1630 up(&ib_uverbs_idr_mutex);
1579 1631
1580 return ret ? ret : in_len; 1632 return ret ? ret : in_len;
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index de6581d7cb8d..81737bd6faea 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -160,6 +160,18 @@ void ib_uverbs_release_uevent(struct ib_uverbs_file *file,
160 spin_unlock_irq(&file->async_file->lock); 160 spin_unlock_irq(&file->async_file->lock);
161} 161}
162 162
163static void ib_uverbs_detach_umcast(struct ib_qp *qp,
164 struct ib_uqp_object *uobj)
165{
166 struct ib_uverbs_mcast_entry *mcast, *tmp;
167
168 list_for_each_entry_safe(mcast, tmp, &uobj->mcast_list, list) {
169 ib_detach_mcast(qp, &mcast->gid, mcast->lid);
170 list_del(&mcast->list);
171 kfree(mcast);
172 }
173}
174
163static int ib_uverbs_cleanup_ucontext(struct ib_uverbs_file *file, 175static int ib_uverbs_cleanup_ucontext(struct ib_uverbs_file *file,
164 struct ib_ucontext *context) 176 struct ib_ucontext *context)
165{ 177{
@@ -180,13 +192,14 @@ static int ib_uverbs_cleanup_ucontext(struct ib_uverbs_file *file,
180 192
181 list_for_each_entry_safe(uobj, tmp, &context->qp_list, list) { 193 list_for_each_entry_safe(uobj, tmp, &context->qp_list, list) {
182 struct ib_qp *qp = idr_find(&ib_uverbs_qp_idr, uobj->id); 194 struct ib_qp *qp = idr_find(&ib_uverbs_qp_idr, uobj->id);
183 struct ib_uevent_object *uevent = 195 struct ib_uqp_object *uqp =
184 container_of(uobj, struct ib_uevent_object, uobject); 196 container_of(uobj, struct ib_uqp_object, uevent.uobject);
185 idr_remove(&ib_uverbs_qp_idr, uobj->id); 197 idr_remove(&ib_uverbs_qp_idr, uobj->id);
198 ib_uverbs_detach_umcast(qp, uqp);
186 ib_destroy_qp(qp); 199 ib_destroy_qp(qp);
187 list_del(&uobj->list); 200 list_del(&uobj->list);
188 ib_uverbs_release_uevent(file, uevent); 201 ib_uverbs_release_uevent(file, &uqp->uevent);
189 kfree(uevent); 202 kfree(uqp);
190 } 203 }
191 204
192 list_for_each_entry_safe(uobj, tmp, &context->cq_list, list) { 205 list_for_each_entry_safe(uobj, tmp, &context->cq_list, list) {
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c
index dd4e13303e96..7450550db736 100644
--- a/drivers/infiniband/hw/mthca/mthca_qp.c
+++ b/drivers/infiniband/hw/mthca/mthca_qp.c
@@ -871,7 +871,10 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
871 qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL); 871 qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL);
872 872
873 mthca_wq_init(&qp->sq); 873 mthca_wq_init(&qp->sq);
874 qp->sq.last = get_send_wqe(qp, qp->sq.max - 1);
875
874 mthca_wq_init(&qp->rq); 876 mthca_wq_init(&qp->rq);
877 qp->rq.last = get_recv_wqe(qp, qp->rq.max - 1);
875 878
876 if (mthca_is_memfree(dev)) { 879 if (mthca_is_memfree(dev)) {
877 *qp->sq.db = 0; 880 *qp->sq.db = 0;
@@ -1819,6 +1822,7 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
1819{ 1822{
1820 struct mthca_dev *dev = to_mdev(ibqp->device); 1823 struct mthca_dev *dev = to_mdev(ibqp->device);
1821 struct mthca_qp *qp = to_mqp(ibqp); 1824 struct mthca_qp *qp = to_mqp(ibqp);
1825 __be32 doorbell[2];
1822 void *wqe; 1826 void *wqe;
1823 void *prev_wqe; 1827 void *prev_wqe;
1824 unsigned long flags; 1828 unsigned long flags;
@@ -1838,6 +1842,34 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
1838 ind = qp->sq.head & (qp->sq.max - 1); 1842 ind = qp->sq.head & (qp->sq.max - 1);
1839 1843
1840 for (nreq = 0; wr; ++nreq, wr = wr->next) { 1844 for (nreq = 0; wr; ++nreq, wr = wr->next) {
1845 if (unlikely(nreq == MTHCA_ARBEL_MAX_WQES_PER_SEND_DB)) {
1846 nreq = 0;
1847
1848 doorbell[0] = cpu_to_be32((MTHCA_ARBEL_MAX_WQES_PER_SEND_DB << 24) |
1849 ((qp->sq.head & 0xffff) << 8) |
1850 f0 | op0);
1851 doorbell[1] = cpu_to_be32((qp->qpn << 8) | size0);
1852
1853 qp->sq.head += MTHCA_ARBEL_MAX_WQES_PER_SEND_DB;
1854 size0 = 0;
1855
1856 /*
1857 * Make sure that descriptors are written before
1858 * doorbell record.
1859 */
1860 wmb();
1861 *qp->sq.db = cpu_to_be32(qp->sq.head & 0xffff);
1862
1863 /*
1864 * Make sure doorbell record is written before we
1865 * write MMIO send doorbell.
1866 */
1867 wmb();
1868 mthca_write64(doorbell,
1869 dev->kar + MTHCA_SEND_DOORBELL,
1870 MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));
1871 }
1872
1841 if (mthca_wq_overflow(&qp->sq, nreq, qp->ibqp.send_cq)) { 1873 if (mthca_wq_overflow(&qp->sq, nreq, qp->ibqp.send_cq)) {
1842 mthca_err(dev, "SQ %06x full (%u head, %u tail," 1874 mthca_err(dev, "SQ %06x full (%u head, %u tail,"
1843 " %d max, %d nreq)\n", qp->qpn, 1875 " %d max, %d nreq)\n", qp->qpn,
@@ -2014,8 +2046,6 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
2014 2046
2015out: 2047out:
2016 if (likely(nreq)) { 2048 if (likely(nreq)) {
2017 __be32 doorbell[2];
2018
2019 doorbell[0] = cpu_to_be32((nreq << 24) | 2049 doorbell[0] = cpu_to_be32((nreq << 24) |
2020 ((qp->sq.head & 0xffff) << 8) | 2050 ((qp->sq.head & 0xffff) << 8) |
2021 f0 | op0); 2051 f0 | op0);
diff --git a/drivers/infiniband/hw/mthca/mthca_wqe.h b/drivers/infiniband/hw/mthca/mthca_wqe.h
index 73f1c0b9021e..e7d2c1e86199 100644
--- a/drivers/infiniband/hw/mthca/mthca_wqe.h
+++ b/drivers/infiniband/hw/mthca/mthca_wqe.h
@@ -50,7 +50,8 @@ enum {
50 50
51enum { 51enum {
52 MTHCA_INVAL_LKEY = 0x100, 52 MTHCA_INVAL_LKEY = 0x100,
53 MTHCA_TAVOR_MAX_WQES_PER_RECV_DB = 256 53 MTHCA_TAVOR_MAX_WQES_PER_RECV_DB = 256,
54 MTHCA_ARBEL_MAX_WQES_PER_SEND_DB = 255
54}; 55};
55 56
56struct mthca_next_seg { 57struct mthca_next_seg {
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index 54ef2fea530f..23885801b6d2 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -608,9 +608,13 @@ void ipoib_ib_dev_flush(void *_dev)
608 if (test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags)) 608 if (test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags))
609 ipoib_ib_dev_up(dev); 609 ipoib_ib_dev_up(dev);
610 610
611 down(&priv->vlan_mutex);
612
611 /* Flush any child interfaces too */ 613 /* Flush any child interfaces too */
612 list_for_each_entry(cpriv, &priv->child_intfs, list) 614 list_for_each_entry(cpriv, &priv->child_intfs, list)
613 ipoib_ib_dev_flush(&cpriv->dev); 615 ipoib_ib_dev_flush(&cpriv->dev);
616
617 up(&priv->vlan_mutex);
614} 618}
615 619
616void ipoib_ib_dev_cleanup(struct net_device *dev) 620void ipoib_ib_dev_cleanup(struct net_device *dev)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 2fa30751f362..475d98fa9e26 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -94,8 +94,10 @@ int ipoib_open(struct net_device *dev)
94 if (ipoib_ib_dev_open(dev)) 94 if (ipoib_ib_dev_open(dev))
95 return -EINVAL; 95 return -EINVAL;
96 96
97 if (ipoib_ib_dev_up(dev)) 97 if (ipoib_ib_dev_up(dev)) {
98 ipoib_ib_dev_stop(dev);
98 return -EINVAL; 99 return -EINVAL;
100 }
99 101
100 if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags)) { 102 if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags)) {
101 struct ipoib_dev_priv *cpriv; 103 struct ipoib_dev_priv *cpriv;
@@ -398,9 +400,9 @@ static void path_rec_completion(int status,
398 while ((skb = __skb_dequeue(&neigh->queue))) 400 while ((skb = __skb_dequeue(&neigh->queue)))
399 __skb_queue_tail(&skqueue, skb); 401 __skb_queue_tail(&skqueue, skb);
400 } 402 }
401 } else 403 }
402 path->query = NULL;
403 404
405 path->query = NULL;
404 complete(&path->done); 406 complete(&path->done);
405 407
406 spin_unlock_irqrestore(&priv->lock, flags); 408 spin_unlock_irqrestore(&priv->lock, flags);
@@ -428,7 +430,6 @@ static struct ipoib_path *path_rec_create(struct net_device *dev,
428 skb_queue_head_init(&path->queue); 430 skb_queue_head_init(&path->queue);
429 431
430 INIT_LIST_HEAD(&path->neigh_list); 432 INIT_LIST_HEAD(&path->neigh_list);
431 init_completion(&path->done);
432 433
433 memcpy(path->pathrec.dgid.raw, gid->raw, sizeof (union ib_gid)); 434 memcpy(path->pathrec.dgid.raw, gid->raw, sizeof (union ib_gid));
434 path->pathrec.sgid = priv->local_gid; 435 path->pathrec.sgid = priv->local_gid;
@@ -446,6 +447,8 @@ static int path_rec_start(struct net_device *dev,
446 ipoib_dbg(priv, "Start path record lookup for " IPOIB_GID_FMT "\n", 447 ipoib_dbg(priv, "Start path record lookup for " IPOIB_GID_FMT "\n",
447 IPOIB_GID_ARG(path->pathrec.dgid)); 448 IPOIB_GID_ARG(path->pathrec.dgid));
448 449
450 init_completion(&path->done);
451
449 path->query_id = 452 path->query_id =
450 ib_sa_path_rec_get(priv->ca, priv->port, 453 ib_sa_path_rec_get(priv->ca, priv->port,
451 &path->pathrec, 454 &path->pathrec,
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index c33ed87f9dff..ef3ee035bbc8 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -135,20 +135,14 @@ static struct ipoib_mcast *ipoib_mcast_alloc(struct net_device *dev,
135 if (!mcast) 135 if (!mcast)
136 return NULL; 136 return NULL;
137 137
138 init_completion(&mcast->done);
139
140 mcast->dev = dev; 138 mcast->dev = dev;
141 mcast->created = jiffies; 139 mcast->created = jiffies;
142 mcast->backoff = 1; 140 mcast->backoff = 1;
143 mcast->logcount = 0;
144 141
145 INIT_LIST_HEAD(&mcast->list); 142 INIT_LIST_HEAD(&mcast->list);
146 INIT_LIST_HEAD(&mcast->neigh_list); 143 INIT_LIST_HEAD(&mcast->neigh_list);
147 skb_queue_head_init(&mcast->pkt_queue); 144 skb_queue_head_init(&mcast->pkt_queue);
148 145
149 mcast->ah = NULL;
150 mcast->query = NULL;
151
152 return mcast; 146 return mcast;
153} 147}
154 148
@@ -350,6 +344,8 @@ static int ipoib_mcast_sendonly_join(struct ipoib_mcast *mcast)
350 rec.port_gid = priv->local_gid; 344 rec.port_gid = priv->local_gid;
351 rec.pkey = cpu_to_be16(priv->pkey); 345 rec.pkey = cpu_to_be16(priv->pkey);
352 346
347 init_completion(&mcast->done);
348
353 ret = ib_sa_mcmember_rec_set(priv->ca, priv->port, &rec, 349 ret = ib_sa_mcmember_rec_set(priv->ca, priv->port, &rec,
354 IB_SA_MCMEMBER_REC_MGID | 350 IB_SA_MCMEMBER_REC_MGID |
355 IB_SA_MCMEMBER_REC_PORT_GID | 351 IB_SA_MCMEMBER_REC_PORT_GID |
@@ -469,6 +465,8 @@ static void ipoib_mcast_join(struct net_device *dev, struct ipoib_mcast *mcast,
469 rec.traffic_class = priv->broadcast->mcmember.traffic_class; 465 rec.traffic_class = priv->broadcast->mcmember.traffic_class;
470 } 466 }
471 467
468 init_completion(&mcast->done);
469
472 ret = ib_sa_mcmember_rec_set(priv->ca, priv->port, &rec, comp_mask, 470 ret = ib_sa_mcmember_rec_set(priv->ca, priv->port, &rec, comp_mask,
473 mcast->backoff * 1000, GFP_ATOMIC, 471 mcast->backoff * 1000, GFP_ATOMIC,
474 ipoib_mcast_join_complete, 472 ipoib_mcast_join_complete,
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 78c7418478d6..cd12fca73b0d 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1028,7 +1028,6 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev)
1028 mddev->size = le64_to_cpu(sb->size)/2; 1028 mddev->size = le64_to_cpu(sb->size)/2;
1029 mddev->events = le64_to_cpu(sb->events); 1029 mddev->events = le64_to_cpu(sb->events);
1030 mddev->bitmap_offset = 0; 1030 mddev->bitmap_offset = 0;
1031 mddev->default_bitmap_offset = 0;
1032 mddev->default_bitmap_offset = 1024; 1031 mddev->default_bitmap_offset = 1024;
1033 1032
1034 mddev->recovery_cp = le64_to_cpu(sb->resync_offset); 1033 mddev->recovery_cp = le64_to_cpu(sb->resync_offset);
@@ -2932,6 +2931,9 @@ static int set_array_info(mddev_t * mddev, mdu_array_info_t *info)
2932 2931
2933 mddev->sb_dirty = 1; 2932 mddev->sb_dirty = 1;
2934 2933
2934 mddev->default_bitmap_offset = MD_SB_BYTES >> 9;
2935 mddev->bitmap_offset = 0;
2936
2935 /* 2937 /*
2936 * Generate a 128 bit UUID 2938 * Generate a 128 bit UUID
2937 */ 2939 */
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 2da9d3ba902d..3066c587b539 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -953,9 +953,6 @@ static int raid1_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
953 int mirror = 0; 953 int mirror = 0;
954 mirror_info_t *p; 954 mirror_info_t *p;
955 955
956 if (rdev->saved_raid_disk >= 0 &&
957 conf->mirrors[rdev->saved_raid_disk].rdev == NULL)
958 mirror = rdev->saved_raid_disk;
959 for (mirror=0; mirror < mddev->raid_disks; mirror++) 956 for (mirror=0; mirror < mddev->raid_disks; mirror++)
960 if ( !(p=conf->mirrors+mirror)->rdev) { 957 if ( !(p=conf->mirrors+mirror)->rdev) {
961 958
@@ -972,7 +969,10 @@ static int raid1_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
972 p->head_position = 0; 969 p->head_position = 0;
973 rdev->raid_disk = mirror; 970 rdev->raid_disk = mirror;
974 found = 1; 971 found = 1;
975 if (rdev->saved_raid_disk != mirror) 972 /* As all devices are equivalent, we don't need a full recovery
973 * if this was recently any drive of the array
974 */
975 if (rdev->saved_raid_disk < 0)
976 conf->fullsync = 1; 976 conf->fullsync = 1;
977 rcu_assign_pointer(p->rdev, rdev); 977 rcu_assign_pointer(p->rdev, rdev);
978 break; 978 break;
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 867f06ae33d9..713dc9c2c730 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -552,7 +552,11 @@ static int read_balance(conf_t *conf, r10bio_t *r10_bio)
552 !test_bit(In_sync, &rdev->flags)) 552 !test_bit(In_sync, &rdev->flags))
553 continue; 553 continue;
554 554
555 if (!atomic_read(&rdev->nr_pending)) { 555 /* This optimisation is debatable, and completely destroys
556 * sequential read speed for 'far copies' arrays. So only
557 * keep it for 'near' arrays, and review those later.
558 */
559 if (conf->near_copies > 1 && !atomic_read(&rdev->nr_pending)) {
556 disk = ndisk; 560 disk = ndisk;
557 slot = nslot; 561 slot = nslot;
558 break; 562 break;
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index e2a40283e323..36d5f8ac8265 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1704,7 +1704,9 @@ static void raid5d (mddev_t *mddev)
1704 1704
1705 if (conf->seq_flush - conf->seq_write > 0) { 1705 if (conf->seq_flush - conf->seq_write > 0) {
1706 int seq = conf->seq_flush; 1706 int seq = conf->seq_flush;
1707 spin_unlock_irq(&conf->device_lock);
1707 bitmap_unplug(mddev->bitmap); 1708 bitmap_unplug(mddev->bitmap);
1709 spin_lock_irq(&conf->device_lock);
1708 conf->seq_write = seq; 1710 conf->seq_write = seq;
1709 activate_bit_delay(conf); 1711 activate_bit_delay(conf);
1710 } 1712 }
diff --git a/drivers/md/raid6main.c b/drivers/md/raid6main.c
index eae5a35629c5..0000d162d198 100644
--- a/drivers/md/raid6main.c
+++ b/drivers/md/raid6main.c
@@ -1702,6 +1702,8 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
1702 int data_disks = raid_disks - 2; 1702 int data_disks = raid_disks - 2;
1703 sector_t max_sector = mddev->size << 1; 1703 sector_t max_sector = mddev->size << 1;
1704 int sync_blocks; 1704 int sync_blocks;
1705 int still_degraded = 0;
1706 int i;
1705 1707
1706 if (sector_nr >= max_sector) { 1708 if (sector_nr >= max_sector) {
1707 /* just being told to finish up .. nothing much to do */ 1709 /* just being told to finish up .. nothing much to do */
@@ -1710,7 +1712,7 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
1710 if (mddev->curr_resync < max_sector) /* aborted */ 1712 if (mddev->curr_resync < max_sector) /* aborted */
1711 bitmap_end_sync(mddev->bitmap, mddev->curr_resync, 1713 bitmap_end_sync(mddev->bitmap, mddev->curr_resync,
1712 &sync_blocks, 1); 1714 &sync_blocks, 1);
1713 else /* compelted sync */ 1715 else /* completed sync */
1714 conf->fullsync = 0; 1716 conf->fullsync = 0;
1715 bitmap_close_sync(mddev->bitmap); 1717 bitmap_close_sync(mddev->bitmap);
1716 1718
@@ -1748,7 +1750,16 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
1748 */ 1750 */
1749 schedule_timeout_uninterruptible(1); 1751 schedule_timeout_uninterruptible(1);
1750 } 1752 }
1751 bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 0); 1753 /* Need to check if array will still be degraded after recovery/resync
1754 * We don't need to check the 'failed' flag as when that gets set,
1755 * recovery aborts.
1756 */
1757 for (i=0; i<mddev->raid_disks; i++)
1758 if (conf->disks[i].rdev == NULL)
1759 still_degraded = 1;
1760
1761 bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, still_degraded);
1762
1752 spin_lock(&sh->lock); 1763 spin_lock(&sh->lock);
1753 set_bit(STRIPE_SYNCING, &sh->state); 1764 set_bit(STRIPE_SYNCING, &sh->state);
1754 clear_bit(STRIPE_INSYNC, &sh->state); 1765 clear_bit(STRIPE_INSYNC, &sh->state);
@@ -1784,7 +1795,9 @@ static void raid6d (mddev_t *mddev)
1784 1795
1785 if (conf->seq_flush - conf->seq_write > 0) { 1796 if (conf->seq_flush - conf->seq_write > 0) {
1786 int seq = conf->seq_flush; 1797 int seq = conf->seq_flush;
1798 spin_unlock_irq(&conf->device_lock);
1787 bitmap_unplug(mddev->bitmap); 1799 bitmap_unplug(mddev->bitmap);
1800 spin_lock_irq(&conf->device_lock);
1788 conf->seq_write = seq; 1801 conf->seq_write = seq;
1789 activate_bit_delay(conf); 1802 activate_bit_delay(conf);
1790 } 1803 }
@@ -2145,9 +2158,15 @@ static int raid6_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
2145 /* no point adding a device */ 2158 /* no point adding a device */
2146 return 0; 2159 return 0;
2147 /* 2160 /*
2148 * find the disk ... 2161 * find the disk ... but prefer rdev->saved_raid_disk
2162 * if possible.
2149 */ 2163 */
2150 for (disk=0; disk < mddev->raid_disks; disk++) 2164 if (rdev->saved_raid_disk >= 0 &&
2165 conf->disks[rdev->saved_raid_disk].rdev == NULL)
2166 disk = rdev->saved_raid_disk;
2167 else
2168 disk = 0;
2169 for ( ; disk < mddev->raid_disks; disk++)
2151 if ((p=conf->disks + disk)->rdev == NULL) { 2170 if ((p=conf->disks + disk)->rdev == NULL) {
2152 clear_bit(In_sync, &rdev->flags); 2171 clear_bit(In_sync, &rdev->flags);
2153 rdev->raid_disk = disk; 2172 rdev->raid_disk = disk;
diff --git a/drivers/media/dvb/b2c2/flexcop-hw-filter.c b/drivers/media/dvb/b2c2/flexcop-hw-filter.c
index 75cf237196eb..b386cc66c6b3 100644
--- a/drivers/media/dvb/b2c2/flexcop-hw-filter.c
+++ b/drivers/media/dvb/b2c2/flexcop-hw-filter.c
@@ -19,7 +19,7 @@ void flexcop_smc_ctrl(struct flexcop_device *fc, int onoff)
19 flexcop_set_ibi_value(ctrl_208,SMC_Enable_sig,onoff); 19 flexcop_set_ibi_value(ctrl_208,SMC_Enable_sig,onoff);
20} 20}
21 21
22void flexcop_null_filter_ctrl(struct flexcop_device *fc, int onoff) 22static void flexcop_null_filter_ctrl(struct flexcop_device *fc, int onoff)
23{ 23{
24 flexcop_set_ibi_value(ctrl_208,Null_filter_sig,onoff); 24 flexcop_set_ibi_value(ctrl_208,Null_filter_sig,onoff);
25} 25}
diff --git a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
index 2aa767f9bd7d..cb2e7d6ba283 100644
--- a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
+++ b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
@@ -35,7 +35,7 @@
35#include <linux/moduleparam.h> 35#include <linux/moduleparam.h>
36#include <linux/vmalloc.h> 36#include <linux/vmalloc.h>
37#include <linux/delay.h> 37#include <linux/delay.h>
38#include <linux/rwsem.h> 38#include <linux/spinlock.h>
39#include <linux/sched.h> 39#include <linux/sched.h>
40 40
41#include "dvb_ca_en50221.h" 41#include "dvb_ca_en50221.h"
@@ -111,9 +111,6 @@ struct dvb_ca_slot {
111 /* size of the buffer to use when talking to the CAM */ 111 /* size of the buffer to use when talking to the CAM */
112 int link_buf_size; 112 int link_buf_size;
113 113
114 /* semaphore for syncing access to slot structure */
115 struct rw_semaphore sem;
116
117 /* buffer for incoming packets */ 114 /* buffer for incoming packets */
118 struct dvb_ringbuffer rx_buffer; 115 struct dvb_ringbuffer rx_buffer;
119 116
@@ -602,14 +599,11 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot, u8 * eb
602 if (ebuf == NULL) { 599 if (ebuf == NULL) {
603 int buf_free; 600 int buf_free;
604 601
605 down_read(&ca->slot_info[slot].sem);
606 if (ca->slot_info[slot].rx_buffer.data == NULL) { 602 if (ca->slot_info[slot].rx_buffer.data == NULL) {
607 up_read(&ca->slot_info[slot].sem);
608 status = -EIO; 603 status = -EIO;
609 goto exit; 604 goto exit;
610 } 605 }
611 buf_free = dvb_ringbuffer_free(&ca->slot_info[slot].rx_buffer); 606 buf_free = dvb_ringbuffer_free(&ca->slot_info[slot].rx_buffer);
612 up_read(&ca->slot_info[slot].sem);
613 607
614 if (buf_free < (ca->slot_info[slot].link_buf_size + DVB_RINGBUFFER_PKTHDRSIZE)) { 608 if (buf_free < (ca->slot_info[slot].link_buf_size + DVB_RINGBUFFER_PKTHDRSIZE)) {
615 status = -EAGAIN; 609 status = -EAGAIN;
@@ -680,14 +674,11 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot, u8 * eb
680 674
681 /* OK, add it to the receive buffer, or copy into external buffer if supplied */ 675 /* OK, add it to the receive buffer, or copy into external buffer if supplied */
682 if (ebuf == NULL) { 676 if (ebuf == NULL) {
683 down_read(&ca->slot_info[slot].sem);
684 if (ca->slot_info[slot].rx_buffer.data == NULL) { 677 if (ca->slot_info[slot].rx_buffer.data == NULL) {
685 up_read(&ca->slot_info[slot].sem);
686 status = -EIO; 678 status = -EIO;
687 goto exit; 679 goto exit;
688 } 680 }
689 dvb_ringbuffer_pkt_write(&ca->slot_info[slot].rx_buffer, buf, bytes_read); 681 dvb_ringbuffer_pkt_write(&ca->slot_info[slot].rx_buffer, buf, bytes_read);
690 up_read(&ca->slot_info[slot].sem);
691 } else { 682 } else {
692 memcpy(ebuf, buf, bytes_read); 683 memcpy(ebuf, buf, bytes_read);
693 } 684 }
@@ -802,12 +793,8 @@ static int dvb_ca_en50221_slot_shutdown(struct dvb_ca_private *ca, int slot)
802{ 793{
803 dprintk("%s\n", __FUNCTION__); 794 dprintk("%s\n", __FUNCTION__);
804 795
805 down_write(&ca->slot_info[slot].sem);
806 ca->pub->slot_shutdown(ca->pub, slot); 796 ca->pub->slot_shutdown(ca->pub, slot);
807 ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_NONE; 797 ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_NONE;
808 vfree(ca->slot_info[slot].rx_buffer.data);
809 ca->slot_info[slot].rx_buffer.data = NULL;
810 up_write(&ca->slot_info[slot].sem);
811 798
812 /* need to wake up all processes to check if they're now 799 /* need to wake up all processes to check if they're now
813 trying to write to a defunct CAM */ 800 trying to write to a defunct CAM */
@@ -893,7 +880,7 @@ void dvb_ca_en50221_frda_irq(struct dvb_ca_en50221 *pubca, int slot)
893 880
894 case DVB_CA_SLOTSTATE_RUNNING: 881 case DVB_CA_SLOTSTATE_RUNNING:
895 if (ca->open) 882 if (ca->open)
896 dvb_ca_en50221_read_data(ca, slot, NULL, 0); 883 dvb_ca_en50221_thread_wakeup(ca);
897 break; 884 break;
898 } 885 }
899} 886}
@@ -1127,16 +1114,16 @@ static int dvb_ca_en50221_thread(void *data)
1127 break; 1114 break;
1128 } 1115 }
1129 1116
1130 rxbuf = vmalloc(RX_BUFFER_SIZE); 1117 if (ca->slot_info[slot].rx_buffer.data == NULL) {
1131 if (rxbuf == NULL) { 1118 rxbuf = vmalloc(RX_BUFFER_SIZE);
1132 printk("dvb_ca adapter %d: Unable to allocate CAM rx buffer :(\n", ca->dvbdev->adapter->num); 1119 if (rxbuf == NULL) {
1133 ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_INVALID; 1120 printk("dvb_ca adapter %d: Unable to allocate CAM rx buffer :(\n", ca->dvbdev->adapter->num);
1134 dvb_ca_en50221_thread_update_delay(ca); 1121 ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_INVALID;
1135 break; 1122 dvb_ca_en50221_thread_update_delay(ca);
1123 break;
1124 }
1125 dvb_ringbuffer_init(&ca->slot_info[slot].rx_buffer, rxbuf, RX_BUFFER_SIZE);
1136 } 1126 }
1137 down_write(&ca->slot_info[slot].sem);
1138 dvb_ringbuffer_init(&ca->slot_info[slot].rx_buffer, rxbuf, RX_BUFFER_SIZE);
1139 up_write(&ca->slot_info[slot].sem);
1140 1127
1141 ca->pub->slot_ts_enable(ca->pub, slot); 1128 ca->pub->slot_ts_enable(ca->pub, slot);
1142 ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_RUNNING; 1129 ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_RUNNING;
@@ -1148,11 +1135,7 @@ static int dvb_ca_en50221_thread(void *data)
1148 if (!ca->open) 1135 if (!ca->open)
1149 continue; 1136 continue;
1150 1137
1151 // no need to poll if the CAM supports IRQs 1138 // poll slots for data
1152 if (ca->slot_info[slot].da_irq_supported)
1153 break;
1154
1155 // poll mode
1156 pktcount = 0; 1139 pktcount = 0;
1157 while ((status = dvb_ca_en50221_read_data(ca, slot, NULL, 0)) > 0) { 1140 while ((status = dvb_ca_en50221_read_data(ca, slot, NULL, 0)) > 0) {
1158 if (!ca->open) 1141 if (!ca->open)
@@ -1367,12 +1350,13 @@ exit:
1367/** 1350/**
1368 * Condition for waking up in dvb_ca_en50221_io_read_condition 1351 * Condition for waking up in dvb_ca_en50221_io_read_condition
1369 */ 1352 */
1370static int dvb_ca_en50221_io_read_condition(struct dvb_ca_private *ca, int *result, int *_slot) 1353static int dvb_ca_en50221_io_read_condition(struct dvb_ca_private *ca,
1354 int *result, int *_slot)
1371{ 1355{
1372 int slot; 1356 int slot;
1373 int slot_count = 0; 1357 int slot_count = 0;
1374 int idx; 1358 int idx;
1375 int fraglen; 1359 size_t fraglen;
1376 int connection_id = -1; 1360 int connection_id = -1;
1377 int found = 0; 1361 int found = 0;
1378 u8 hdr[2]; 1362 u8 hdr[2];
@@ -1382,10 +1366,7 @@ static int dvb_ca_en50221_io_read_condition(struct dvb_ca_private *ca, int *resu
1382 if (ca->slot_info[slot].slot_state != DVB_CA_SLOTSTATE_RUNNING) 1366 if (ca->slot_info[slot].slot_state != DVB_CA_SLOTSTATE_RUNNING)
1383 goto nextslot; 1367 goto nextslot;
1384 1368
1385 down_read(&ca->slot_info[slot].sem);
1386
1387 if (ca->slot_info[slot].rx_buffer.data == NULL) { 1369 if (ca->slot_info[slot].rx_buffer.data == NULL) {
1388 up_read(&ca->slot_info[slot].sem);
1389 return 0; 1370 return 0;
1390 } 1371 }
1391 1372
@@ -1403,10 +1384,7 @@ static int dvb_ca_en50221_io_read_condition(struct dvb_ca_private *ca, int *resu
1403 idx = dvb_ringbuffer_pkt_next(&ca->slot_info[slot].rx_buffer, idx, &fraglen); 1384 idx = dvb_ringbuffer_pkt_next(&ca->slot_info[slot].rx_buffer, idx, &fraglen);
1404 } 1385 }
1405 1386
1406 if (!found) 1387nextslot:
1407 up_read(&ca->slot_info[slot].sem);
1408
1409 nextslot:
1410 slot = (slot + 1) % ca->slot_count; 1388 slot = (slot + 1) % ca->slot_count;
1411 slot_count++; 1389 slot_count++;
1412 } 1390 }
@@ -1511,8 +1489,7 @@ static ssize_t dvb_ca_en50221_io_read(struct file *file, char __user * buf,
1511 goto exit; 1489 goto exit;
1512 status = pktlen; 1490 status = pktlen;
1513 1491
1514 exit: 1492exit:
1515 up_read(&ca->slot_info[slot].sem);
1516 return status; 1493 return status;
1517} 1494}
1518 1495
@@ -1544,11 +1521,11 @@ static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file)
1544 for (i = 0; i < ca->slot_count; i++) { 1521 for (i = 0; i < ca->slot_count; i++) {
1545 1522
1546 if (ca->slot_info[i].slot_state == DVB_CA_SLOTSTATE_RUNNING) { 1523 if (ca->slot_info[i].slot_state == DVB_CA_SLOTSTATE_RUNNING) {
1547 down_write(&ca->slot_info[i].sem);
1548 if (ca->slot_info[i].rx_buffer.data != NULL) { 1524 if (ca->slot_info[i].rx_buffer.data != NULL) {
1525 /* it is safe to call this here without locks because
1526 * ca->open == 0. Data is not read in this case */
1549 dvb_ringbuffer_flush(&ca->slot_info[i].rx_buffer); 1527 dvb_ringbuffer_flush(&ca->slot_info[i].rx_buffer);
1550 } 1528 }
1551 up_write(&ca->slot_info[i].sem);
1552 } 1529 }
1553 } 1530 }
1554 1531
@@ -1607,7 +1584,6 @@ static unsigned int dvb_ca_en50221_io_poll(struct file *file, poll_table * wait)
1607 dprintk("%s\n", __FUNCTION__); 1584 dprintk("%s\n", __FUNCTION__);
1608 1585
1609 if (dvb_ca_en50221_io_read_condition(ca, &result, &slot) == 1) { 1586 if (dvb_ca_en50221_io_read_condition(ca, &result, &slot) == 1) {
1610 up_read(&ca->slot_info[slot].sem);
1611 mask |= POLLIN; 1587 mask |= POLLIN;
1612 } 1588 }
1613 1589
@@ -1619,7 +1595,6 @@ static unsigned int dvb_ca_en50221_io_poll(struct file *file, poll_table * wait)
1619 poll_wait(file, &ca->wait_queue, wait); 1595 poll_wait(file, &ca->wait_queue, wait);
1620 1596
1621 if (dvb_ca_en50221_io_read_condition(ca, &result, &slot) == 1) { 1597 if (dvb_ca_en50221_io_read_condition(ca, &result, &slot) == 1) {
1622 up_read(&ca->slot_info[slot].sem);
1623 mask |= POLLIN; 1598 mask |= POLLIN;
1624 } 1599 }
1625 1600
@@ -1709,7 +1684,6 @@ int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter,
1709 ca->slot_info[i].slot_state = DVB_CA_SLOTSTATE_NONE; 1684 ca->slot_info[i].slot_state = DVB_CA_SLOTSTATE_NONE;
1710 atomic_set(&ca->slot_info[i].camchange_count, 0); 1685 atomic_set(&ca->slot_info[i].camchange_count, 0);
1711 ca->slot_info[i].camchange_type = DVB_CA_EN50221_CAMCHANGE_REMOVED; 1686 ca->slot_info[i].camchange_type = DVB_CA_EN50221_CAMCHANGE_REMOVED;
1712 init_rwsem(&ca->slot_info[i].sem);
1713 } 1687 }
1714 1688
1715 if (signal_pending(current)) { 1689 if (signal_pending(current)) {
@@ -1729,7 +1703,7 @@ int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter,
1729 ca->thread_pid = ret; 1703 ca->thread_pid = ret;
1730 return 0; 1704 return 0;
1731 1705
1732 error: 1706error:
1733 if (ca != NULL) { 1707 if (ca != NULL) {
1734 if (ca->dvbdev != NULL) 1708 if (ca->dvbdev != NULL)
1735 dvb_unregister_device(ca->dvbdev); 1709 dvb_unregister_device(ca->dvbdev);
@@ -1771,6 +1745,9 @@ void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca)
1771 1745
1772 for (i = 0; i < ca->slot_count; i++) { 1746 for (i = 0; i < ca->slot_count; i++) {
1773 dvb_ca_en50221_slot_shutdown(ca, i); 1747 dvb_ca_en50221_slot_shutdown(ca, i);
1748 if (ca->slot_info[i].rx_buffer.data != NULL) {
1749 vfree(ca->slot_info[i].rx_buffer.data);
1750 }
1774 } 1751 }
1775 kfree(ca->slot_info); 1752 kfree(ca->slot_info);
1776 dvb_unregister_device(ca->dvbdev); 1753 dvb_unregister_device(ca->dvbdev);
diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c
index 87935490bfb2..df536bd2e103 100644
--- a/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/drivers/media/dvb/dvb-core/dvb_net.c
@@ -151,6 +151,8 @@ struct dvb_net_priv {
151 unsigned char ule_bridged; /* Whether the ULE_BRIDGED extension header was found. */ 151 unsigned char ule_bridged; /* Whether the ULE_BRIDGED extension header was found. */
152 int ule_sndu_remain; /* Nr. of bytes still required for current ULE SNDU. */ 152 int ule_sndu_remain; /* Nr. of bytes still required for current ULE SNDU. */
153 unsigned long ts_count; /* Current ts cell counter. */ 153 unsigned long ts_count; /* Current ts cell counter. */
154
155 struct semaphore mutex;
154}; 156};
155 157
156 158
@@ -881,12 +883,13 @@ static int dvb_net_filter_sec_set(struct net_device *dev,
881 883
882static int dvb_net_feed_start(struct net_device *dev) 884static int dvb_net_feed_start(struct net_device *dev)
883{ 885{
884 int ret, i; 886 int ret = 0, i;
885 struct dvb_net_priv *priv = dev->priv; 887 struct dvb_net_priv *priv = dev->priv;
886 struct dmx_demux *demux = priv->demux; 888 struct dmx_demux *demux = priv->demux;
887 unsigned char *mac = (unsigned char *) dev->dev_addr; 889 unsigned char *mac = (unsigned char *) dev->dev_addr;
888 890
889 dprintk("%s: rx_mode %i\n", __FUNCTION__, priv->rx_mode); 891 dprintk("%s: rx_mode %i\n", __FUNCTION__, priv->rx_mode);
892 down(&priv->mutex);
890 if (priv->tsfeed || priv->secfeed || priv->secfilter || priv->multi_secfilter[0]) 893 if (priv->tsfeed || priv->secfeed || priv->secfilter || priv->multi_secfilter[0])
891 printk("%s: BUG %d\n", __FUNCTION__, __LINE__); 894 printk("%s: BUG %d\n", __FUNCTION__, __LINE__);
892 895
@@ -900,7 +903,7 @@ static int dvb_net_feed_start(struct net_device *dev)
900 dvb_net_sec_callback); 903 dvb_net_sec_callback);
901 if (ret<0) { 904 if (ret<0) {
902 printk("%s: could not allocate section feed\n", dev->name); 905 printk("%s: could not allocate section feed\n", dev->name);
903 return ret; 906 goto error;
904 } 907 }
905 908
906 ret = priv->secfeed->set(priv->secfeed, priv->pid, 32768, 1); 909 ret = priv->secfeed->set(priv->secfeed, priv->pid, 32768, 1);
@@ -909,7 +912,7 @@ static int dvb_net_feed_start(struct net_device *dev)
909 printk("%s: could not set section feed\n", dev->name); 912 printk("%s: could not set section feed\n", dev->name);
910 priv->demux->release_section_feed(priv->demux, priv->secfeed); 913 priv->demux->release_section_feed(priv->demux, priv->secfeed);
911 priv->secfeed=NULL; 914 priv->secfeed=NULL;
912 return ret; 915 goto error;
913 } 916 }
914 917
915 if (priv->rx_mode != RX_MODE_PROMISC) { 918 if (priv->rx_mode != RX_MODE_PROMISC) {
@@ -948,7 +951,7 @@ static int dvb_net_feed_start(struct net_device *dev)
948 ret = demux->allocate_ts_feed(demux, &priv->tsfeed, dvb_net_ts_callback); 951 ret = demux->allocate_ts_feed(demux, &priv->tsfeed, dvb_net_ts_callback);
949 if (ret < 0) { 952 if (ret < 0) {
950 printk("%s: could not allocate ts feed\n", dev->name); 953 printk("%s: could not allocate ts feed\n", dev->name);
951 return ret; 954 goto error;
952 } 955 }
953 956
954 /* Set netdevice pointer for ts decaps callback. */ 957 /* Set netdevice pointer for ts decaps callback. */
@@ -962,23 +965,26 @@ static int dvb_net_feed_start(struct net_device *dev)
962 printk("%s: could not set ts feed\n", dev->name); 965 printk("%s: could not set ts feed\n", dev->name);
963 priv->demux->release_ts_feed(priv->demux, priv->tsfeed); 966 priv->demux->release_ts_feed(priv->demux, priv->tsfeed);
964 priv->tsfeed = NULL; 967 priv->tsfeed = NULL;
965 return ret; 968 goto error;
966 } 969 }
967 970
968 dprintk("%s: start filtering\n", __FUNCTION__); 971 dprintk("%s: start filtering\n", __FUNCTION__);
969 priv->tsfeed->start_filtering(priv->tsfeed); 972 priv->tsfeed->start_filtering(priv->tsfeed);
970 } else 973 } else
971 return -EINVAL; 974 ret = -EINVAL;
972 975
973 return 0; 976error:
977 up(&priv->mutex);
978 return ret;
974} 979}
975 980
976static int dvb_net_feed_stop(struct net_device *dev) 981static int dvb_net_feed_stop(struct net_device *dev)
977{ 982{
978 struct dvb_net_priv *priv = dev->priv; 983 struct dvb_net_priv *priv = dev->priv;
979 int i; 984 int i, ret = 0;
980 985
981 dprintk("%s\n", __FUNCTION__); 986 dprintk("%s\n", __FUNCTION__);
987 down(&priv->mutex);
982 if (priv->feedtype == DVB_NET_FEEDTYPE_MPE) { 988 if (priv->feedtype == DVB_NET_FEEDTYPE_MPE) {
983 if (priv->secfeed) { 989 if (priv->secfeed) {
984 if (priv->secfeed->is_filtering) { 990 if (priv->secfeed->is_filtering) {
@@ -1019,8 +1025,9 @@ static int dvb_net_feed_stop(struct net_device *dev)
1019 else 1025 else
1020 printk("%s: no ts feed to stop\n", dev->name); 1026 printk("%s: no ts feed to stop\n", dev->name);
1021 } else 1027 } else
1022 return -EINVAL; 1028 ret = -EINVAL;
1023 return 0; 1029 up(&priv->mutex);
1030 return ret;
1024} 1031}
1025 1032
1026 1033
@@ -1044,8 +1051,8 @@ static void wq_set_multicast_list (void *data)
1044 struct dvb_net_priv *priv = dev->priv; 1051 struct dvb_net_priv *priv = dev->priv;
1045 1052
1046 dvb_net_feed_stop(dev); 1053 dvb_net_feed_stop(dev);
1047
1048 priv->rx_mode = RX_MODE_UNI; 1054 priv->rx_mode = RX_MODE_UNI;
1055 spin_lock_bh(&dev->xmit_lock);
1049 1056
1050 if (dev->flags & IFF_PROMISC) { 1057 if (dev->flags & IFF_PROMISC) {
1051 dprintk("%s: promiscuous mode\n", dev->name); 1058 dprintk("%s: promiscuous mode\n", dev->name);
@@ -1070,6 +1077,7 @@ static void wq_set_multicast_list (void *data)
1070 } 1077 }
1071 } 1078 }
1072 1079
1080 spin_unlock_bh(&dev->xmit_lock);
1073 dvb_net_feed_start(dev); 1081 dvb_net_feed_start(dev);
1074} 1082}
1075 1083
@@ -1200,6 +1208,7 @@ static int dvb_net_add_if(struct dvb_net *dvbnet, u16 pid, u8 feedtype)
1200 1208
1201 INIT_WORK(&priv->set_multicast_list_wq, wq_set_multicast_list, net); 1209 INIT_WORK(&priv->set_multicast_list_wq, wq_set_multicast_list, net);
1202 INIT_WORK(&priv->restart_net_feed_wq, wq_restart_net_feed, net); 1210 INIT_WORK(&priv->restart_net_feed_wq, wq_restart_net_feed, net);
1211 init_MUTEX(&priv->mutex);
1203 1212
1204 net->base_addr = pid; 1213 net->base_addr = pid;
1205 1214
diff --git a/drivers/media/dvb/dvb-usb/a800.c b/drivers/media/dvb/dvb-usb/a800.c
index 49f541d9a042..8c7beffb045f 100644
--- a/drivers/media/dvb/dvb-usb/a800.c
+++ b/drivers/media/dvb/dvb-usb/a800.c
@@ -65,7 +65,7 @@ static struct dvb_usb_rc_key a800_rc_keys[] = {
65 65
66}; 66};
67 67
68int a800_rc_query(struct dvb_usb_device *d, u32 *event, int *state) 68static int a800_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
69{ 69{
70 u8 key[5]; 70 u8 key[5];
71 if (usb_control_msg(d->udev,usb_rcvctrlpipe(d->udev,0), 71 if (usb_control_msg(d->udev,usb_rcvctrlpipe(d->udev,0),
diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c
index 00b946419b40..269d899da488 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-common.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-common.c
@@ -21,9 +21,9 @@ MODULE_LICENSE("GPL");
21int dibusb_streaming_ctrl(struct dvb_usb_device *d, int onoff) 21int dibusb_streaming_ctrl(struct dvb_usb_device *d, int onoff)
22{ 22{
23 if (d->priv != NULL) { 23 if (d->priv != NULL) {
24 struct dib_fe_xfer_ops *ops = d->priv; 24 struct dibusb_state *st = d->priv;
25 if (ops->fifo_ctrl != NULL) 25 if (st->ops.fifo_ctrl != NULL)
26 if (ops->fifo_ctrl(d->fe,onoff)) { 26 if (st->ops.fifo_ctrl(d->fe,onoff)) {
27 err("error while controlling the fifo of the demod."); 27 err("error while controlling the fifo of the demod.");
28 return -ENODEV; 28 return -ENODEV;
29 } 29 }
@@ -35,9 +35,9 @@ EXPORT_SYMBOL(dibusb_streaming_ctrl);
35int dibusb_pid_filter(struct dvb_usb_device *d, int index, u16 pid, int onoff) 35int dibusb_pid_filter(struct dvb_usb_device *d, int index, u16 pid, int onoff)
36{ 36{
37 if (d->priv != NULL) { 37 if (d->priv != NULL) {
38 struct dib_fe_xfer_ops *ops = d->priv; 38 struct dibusb_state *st = d->priv;
39 if (d->pid_filtering && ops->pid_ctrl != NULL) 39 if (st->ops.pid_ctrl != NULL)
40 ops->pid_ctrl(d->fe,index,pid,onoff); 40 st->ops.pid_ctrl(d->fe,index,pid,onoff);
41 } 41 }
42 return 0; 42 return 0;
43} 43}
@@ -46,9 +46,9 @@ EXPORT_SYMBOL(dibusb_pid_filter);
46int dibusb_pid_filter_ctrl(struct dvb_usb_device *d, int onoff) 46int dibusb_pid_filter_ctrl(struct dvb_usb_device *d, int onoff)
47{ 47{
48 if (d->priv != NULL) { 48 if (d->priv != NULL) {
49 struct dib_fe_xfer_ops *ops = d->priv; 49 struct dibusb_state *st = d->priv;
50 if (ops->pid_parse != NULL) 50 if (st->ops.pid_parse != NULL)
51 if (ops->pid_parse(d->fe,onoff) < 0) 51 if (st->ops.pid_parse(d->fe,onoff) < 0)
52 err("could not handle pid_parser"); 52 err("could not handle pid_parser");
53 } 53 }
54 return 0; 54 return 0;
diff --git a/drivers/media/dvb/dvb-usb/digitv.c b/drivers/media/dvb/dvb-usb/digitv.c
index 74545f82eff1..f98e306a5759 100644
--- a/drivers/media/dvb/dvb-usb/digitv.c
+++ b/drivers/media/dvb/dvb-usb/digitv.c
@@ -148,7 +148,7 @@ static struct dvb_usb_rc_key digitv_rc_keys[] = {
148}; 148};
149 149
150/* TODO is it really the NEC protocol ? */ 150/* TODO is it really the NEC protocol ? */
151int digitv_rc_query(struct dvb_usb_device *d, u32 *event, int *state) 151static int digitv_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
152{ 152{
153 u8 key[5]; 153 u8 key[5];
154 154
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-init.c b/drivers/media/dvb/dvb-usb/dvb-usb-init.c
index a902059812a2..dd8e0b94edba 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-init.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-init.c
@@ -23,7 +23,7 @@ module_param_named(disable_rc_polling, dvb_usb_disable_rc_polling, int, 0644);
23MODULE_PARM_DESC(disable_rc_polling, "disable remote control polling (default: 0)."); 23MODULE_PARM_DESC(disable_rc_polling, "disable remote control polling (default: 0).");
24 24
25/* general initialization functions */ 25/* general initialization functions */
26int dvb_usb_exit(struct dvb_usb_device *d) 26static int dvb_usb_exit(struct dvb_usb_device *d)
27{ 27{
28 deb_info("state before exiting everything: %x\n",d->state); 28 deb_info("state before exiting everything: %x\n",d->state);
29 dvb_usb_remote_exit(d); 29 dvb_usb_remote_exit(d);
diff --git a/drivers/media/dvb/frontends/cx22702.c b/drivers/media/dvb/frontends/cx22702.c
index 9f639297a9f2..d9a8ede14b45 100644
--- a/drivers/media/dvb/frontends/cx22702.c
+++ b/drivers/media/dvb/frontends/cx22702.c
@@ -7,7 +7,7 @@
7 Copyright (C) 2001-2002 Convergence Integrated Media GmbH 7 Copyright (C) 2001-2002 Convergence Integrated Media GmbH
8 Holger Waechtler <holger@convergence.de> 8 Holger Waechtler <holger@convergence.de>
9 9
10 Copyright (C) 2004 Steven Toth <steve@toth.demon.co.uk> 10 Copyright (C) 2004 Steven Toth <stoth@hauppauge.com>
11 11
12 This program is free software; you can redistribute it and/or modify 12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by 13 it under the terms of the GNU General Public License as published by
diff --git a/drivers/media/dvb/frontends/cx22702.h b/drivers/media/dvb/frontends/cx22702.h
index 11f86806756e..1f250885d2ce 100644
--- a/drivers/media/dvb/frontends/cx22702.h
+++ b/drivers/media/dvb/frontends/cx22702.h
@@ -7,7 +7,7 @@
7 Copyright (C) 2001-2002 Convergence Integrated Media GmbH 7 Copyright (C) 2001-2002 Convergence Integrated Media GmbH
8 Holger Waechtler <holger@convergence.de> 8 Holger Waechtler <holger@convergence.de>
9 9
10 Copyright (C) 2004 Steven Toth <steve@toth.demon.co.uk> 10 Copyright (C) 2004 Steven Toth <stoth@hauppauge.com>
11 11
12 This program is free software; you can redistribute it and/or modify 12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by 13 it under the terms of the GNU General Public License as published by
diff --git a/drivers/media/dvb/frontends/nxt200x.c b/drivers/media/dvb/frontends/nxt200x.c
index bad0933eb714..84b62881cea7 100644
--- a/drivers/media/dvb/frontends/nxt200x.c
+++ b/drivers/media/dvb/frontends/nxt200x.c
@@ -44,6 +44,8 @@
44#include <linux/init.h> 44#include <linux/init.h>
45#include <linux/module.h> 45#include <linux/module.h>
46#include <linux/moduleparam.h> 46#include <linux/moduleparam.h>
47#include <linux/slab.h>
48#include <linux/string.h>
47 49
48#include "dvb_frontend.h" 50#include "dvb_frontend.h"
49#include "dvb-pll.h" 51#include "dvb-pll.h"
diff --git a/drivers/media/dvb/frontends/ves1820.c b/drivers/media/dvb/frontends/ves1820.c
index c6d276618e86..ad8647a3c85e 100644
--- a/drivers/media/dvb/frontends/ves1820.c
+++ b/drivers/media/dvb/frontends/ves1820.c
@@ -140,25 +140,25 @@ static int ves1820_set_symbolrate(struct ves1820_state *state, u32 symbolrate)
140 /* yeuch! */ 140 /* yeuch! */
141 fpxin = state->config->xin * 10; 141 fpxin = state->config->xin * 10;
142 fptmp = fpxin; do_div(fptmp, 123); 142 fptmp = fpxin; do_div(fptmp, 123);
143 if (symbolrate < fptmp); 143 if (symbolrate < fptmp)
144 SFIL = 1; 144 SFIL = 1;
145 fptmp = fpxin; do_div(fptmp, 160); 145 fptmp = fpxin; do_div(fptmp, 160);
146 if (symbolrate < fptmp); 146 if (symbolrate < fptmp)
147 SFIL = 0; 147 SFIL = 0;
148 fptmp = fpxin; do_div(fptmp, 246); 148 fptmp = fpxin; do_div(fptmp, 246);
149 if (symbolrate < fptmp); 149 if (symbolrate < fptmp)
150 SFIL = 1; 150 SFIL = 1;
151 fptmp = fpxin; do_div(fptmp, 320); 151 fptmp = fpxin; do_div(fptmp, 320);
152 if (symbolrate < fptmp); 152 if (symbolrate < fptmp)
153 SFIL = 0; 153 SFIL = 0;
154 fptmp = fpxin; do_div(fptmp, 492); 154 fptmp = fpxin; do_div(fptmp, 492);
155 if (symbolrate < fptmp); 155 if (symbolrate < fptmp)
156 SFIL = 1; 156 SFIL = 1;
157 fptmp = fpxin; do_div(fptmp, 640); 157 fptmp = fpxin; do_div(fptmp, 640);
158 if (symbolrate < fptmp); 158 if (symbolrate < fptmp)
159 SFIL = 0; 159 SFIL = 0;
160 fptmp = fpxin; do_div(fptmp, 984); 160 fptmp = fpxin; do_div(fptmp, 984);
161 if (symbolrate < fptmp); 161 if (symbolrate < fptmp)
162 SFIL = 1; 162 SFIL = 1;
163 163
164 fin = state->config->xin >> 4; 164 fin = state->config->xin >> 4;
diff --git a/drivers/media/dvb/ttpci/Kconfig b/drivers/media/dvb/ttpci/Kconfig
index d8bf65877897..fa5034a9ecf5 100644
--- a/drivers/media/dvb/ttpci/Kconfig
+++ b/drivers/media/dvb/ttpci/Kconfig
@@ -81,6 +81,7 @@ config DVB_BUDGET_CI
81 tristate "Budget cards with onboard CI connector" 81 tristate "Budget cards with onboard CI connector"
82 depends on DVB_CORE && PCI 82 depends on DVB_CORE && PCI
83 select VIDEO_SAA7146 83 select VIDEO_SAA7146
84 select DVB_STV0297
84 select DVB_STV0299 85 select DVB_STV0299
85 select DVB_TDA1004X 86 select DVB_TDA1004X
86 help 87 help
diff --git a/drivers/media/dvb/ttpci/av7110_ca.c b/drivers/media/dvb/ttpci/av7110_ca.c
index c3801e328fe9..6079e8865d5b 100644
--- a/drivers/media/dvb/ttpci/av7110_ca.c
+++ b/drivers/media/dvb/ttpci/av7110_ca.c
@@ -40,6 +40,7 @@
40 40
41#include "av7110.h" 41#include "av7110.h"
42#include "av7110_hw.h" 42#include "av7110_hw.h"
43#include "av7110_ca.h"
43 44
44 45
45void CI_handle(struct av7110 *av7110, u8 *data, u16 len) 46void CI_handle(struct av7110 *av7110, u8 *data, u16 len)
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c
index aa75dc03a0b3..9f51bae7194c 100644
--- a/drivers/media/dvb/ttpci/budget-av.c
+++ b/drivers/media/dvb/ttpci/budget-av.c
@@ -1020,6 +1020,8 @@ MODULE_DEVICE_TABLE(pci, pci_tbl);
1020 1020
1021static struct saa7146_extension budget_extension = { 1021static struct saa7146_extension budget_extension = {
1022 .name = "budget_av", 1022 .name = "budget_av",
1023 .flags = SAA7146_I2C_SHORT_DELAY,
1024
1023 .pci_tbl = pci_tbl, 1025 .pci_tbl = pci_tbl,
1024 1026
1025 .module = THIS_MODULE, 1027 .module = THIS_MODULE,
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c
index 75fb92d60998..b9b3cd9c0369 100644
--- a/drivers/media/dvb/ttpci/budget-ci.c
+++ b/drivers/media/dvb/ttpci/budget-ci.c
@@ -1166,7 +1166,7 @@ MODULE_DEVICE_TABLE(pci, pci_tbl);
1166 1166
1167static struct saa7146_extension budget_extension = { 1167static struct saa7146_extension budget_extension = {
1168 .name = "budget_ci dvb\0", 1168 .name = "budget_ci dvb\0",
1169 .flags = 0, 1169 .flags = SAA7146_I2C_SHORT_DELAY,
1170 1170
1171 .module = THIS_MODULE, 1171 .module = THIS_MODULE,
1172 .pci_tbl = &pci_tbl[0], 1172 .pci_tbl = &pci_tbl[0],
diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c
index 4fd8bbc47037..bc4ce7559cbe 100644
--- a/drivers/media/dvb/ttpci/budget.c
+++ b/drivers/media/dvb/ttpci/budget.c
@@ -738,7 +738,7 @@ MODULE_DEVICE_TABLE(pci, pci_tbl);
738 738
739static struct saa7146_extension budget_extension = { 739static struct saa7146_extension budget_extension = {
740 .name = "budget dvb\0", 740 .name = "budget dvb\0",
741 .flags = 0, 741 .flags = SAA7146_I2C_SHORT_DELAY,
742 742
743 .module = THIS_MODULE, 743 .module = THIS_MODULE,
744 .pci_tbl = pci_tbl, 744 .pci_tbl = pci_tbl,
diff --git a/drivers/media/dvb/ttpci/ttpci-eeprom.c b/drivers/media/dvb/ttpci/ttpci-eeprom.c
index e9a8457b0727..ac79ef178c05 100644
--- a/drivers/media/dvb/ttpci/ttpci-eeprom.c
+++ b/drivers/media/dvb/ttpci/ttpci-eeprom.c
@@ -37,6 +37,7 @@
37#include <linux/string.h> 37#include <linux/string.h>
38#include <linux/i2c.h> 38#include <linux/i2c.h>
39 39
40#include "ttpci-eeprom.h"
40 41
41#if 1 42#if 1
42#define dprintk(x...) do { printk(x); } while (0) 43#define dprintk(x...) do { printk(x); } while (0)
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index 1a3b3c7e5e99..cc4a723e24db 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -26,15 +26,12 @@ config VIDEO_BT848
26 module will be called bttv. 26 module will be called bttv.
27 27
28config VIDEO_BT848_DVB 28config VIDEO_BT848_DVB
29 tristate "DVB/ATSC Support for bt878 based TV cards" 29 bool "DVB/ATSC Support for bt878 based TV cards"
30 depends on VIDEO_BT848 && DVB_CORE 30 depends on VIDEO_BT848 && DVB_CORE
31 select DVB_BT8XX 31 select DVB_BT8XX
32 ---help--- 32 ---help---
33 This adds support for DVB/ATSC cards based on the BT878 chip. 33 This adds support for DVB/ATSC cards based on the BT878 chip.
34 34
35 To compile this driver as a module, choose M here: the
36 module will be called dvb-bt8xx.
37
38config VIDEO_SAA6588 35config VIDEO_SAA6588
39 tristate "SAA6588 Radio Chip RDS decoder support on BT848 cards" 36 tristate "SAA6588 Radio Chip RDS decoder support on BT848 cards"
40 depends on VIDEO_DEV && I2C && VIDEO_BT848 37 depends on VIDEO_DEV && I2C && VIDEO_BT848
diff --git a/drivers/media/video/bttv-cards.c b/drivers/media/video/bttv-cards.c
index e31ebb11c468..012be639aa18 100644
--- a/drivers/media/video/bttv-cards.c
+++ b/drivers/media/video/bttv-cards.c
@@ -2904,7 +2904,7 @@ void __devinit bttv_idcard(struct bttv *btv)
2904 */ 2904 */
2905 2905
2906/* Some Modular Technology cards have an eeprom, but no subsystem ID */ 2906/* Some Modular Technology cards have an eeprom, but no subsystem ID */
2907void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256]) 2907static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
2908{ 2908{
2909 int type = -1; 2909 int type = -1;
2910 2910
@@ -3879,7 +3879,7 @@ static void __devinit init_PXC200(struct bttv *btv)
3879 * error. ERROR_CPLD_Check_Failed. 3879 * error. ERROR_CPLD_Check_Failed.
3880 */ 3880 */
3881/* ----------------------------------------------------------------------- */ 3881/* ----------------------------------------------------------------------- */
3882void 3882static void
3883init_RTV24 (struct bttv *btv) 3883init_RTV24 (struct bttv *btv)
3884{ 3884{
3885 uint32_t dataRead = 0; 3885 uint32_t dataRead = 0;
@@ -4103,7 +4103,7 @@ void tea5757_set_freq(struct bttv *btv, unsigned short freq)
4103/* ----------------------------------------------------------------------- */ 4103/* ----------------------------------------------------------------------- */
4104/* winview */ 4104/* winview */
4105 4105
4106void winview_audio(struct bttv *btv, struct video_audio *v, int set) 4106static void winview_audio(struct bttv *btv, struct video_audio *v, int set)
4107{ 4107{
4108 /* PT2254A programming Jon Tombs, jon@gte.esi.us.es */ 4108 /* PT2254A programming Jon Tombs, jon@gte.esi.us.es */
4109 int bits_out, loops, vol, data; 4109 int bits_out, loops, vol, data;
diff --git a/drivers/media/video/bttv-driver.c b/drivers/media/video/bttv-driver.c
index 709099f03bd2..3c58a2a68906 100644
--- a/drivers/media/video/bttv-driver.c
+++ b/drivers/media/video/bttv-driver.c
@@ -1720,7 +1720,7 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
1720 memset(i,0,sizeof(*i)); 1720 memset(i,0,sizeof(*i));
1721 i->index = n; 1721 i->index = n;
1722 i->type = V4L2_INPUT_TYPE_CAMERA; 1722 i->type = V4L2_INPUT_TYPE_CAMERA;
1723 i->audioset = 1; 1723 i->audioset = 0;
1724 if (i->index == bttv_tvcards[btv->c.type].tuner) { 1724 if (i->index == bttv_tvcards[btv->c.type].tuner) {
1725 sprintf(i->name, "Television"); 1725 sprintf(i->name, "Television");
1726 i->type = V4L2_INPUT_TYPE_TUNER; 1726 i->type = V4L2_INPUT_TYPE_TUNER;
@@ -1771,12 +1771,20 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
1771 memset(t,0,sizeof(*t)); 1771 memset(t,0,sizeof(*t));
1772 strcpy(t->name, "Television"); 1772 strcpy(t->name, "Television");
1773 t->type = V4L2_TUNER_ANALOG_TV; 1773 t->type = V4L2_TUNER_ANALOG_TV;
1774 t->rangehigh = 0xffffffffUL;
1775 t->capability = V4L2_TUNER_CAP_NORM; 1774 t->capability = V4L2_TUNER_CAP_NORM;
1776 t->rxsubchans = V4L2_TUNER_SUB_MONO; 1775 t->rxsubchans = V4L2_TUNER_SUB_MONO;
1777 if (btread(BT848_DSTATUS)&BT848_DSTATUS_HLOC) 1776 if (btread(BT848_DSTATUS)&BT848_DSTATUS_HLOC)
1778 t->signal = 0xffff; 1777 t->signal = 0xffff;
1779 { 1778 {
1779 struct video_tuner tuner;
1780
1781 memset(&tuner, 0, sizeof (tuner));
1782 tuner.rangehigh = 0xffffffffUL;
1783 bttv_call_i2c_clients(btv, VIDIOCGTUNER, &tuner);
1784 t->rangelow = tuner.rangelow;
1785 t->rangehigh = tuner.rangehigh;
1786 }
1787 {
1780 /* Hmmm ... */ 1788 /* Hmmm ... */
1781 struct video_audio va; 1789 struct video_audio va;
1782 memset(&va, 0, sizeof(struct video_audio)); 1790 memset(&va, 0, sizeof(struct video_audio));
@@ -1853,7 +1861,7 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
1853 } 1861 }
1854 case VIDIOC_LOG_STATUS: 1862 case VIDIOC_LOG_STATUS:
1855 { 1863 {
1856 bttv_call_i2c_clients(btv, VIDIOC_LOG_STATUS, 0); 1864 bttv_call_i2c_clients(btv, VIDIOC_LOG_STATUS, NULL);
1857 return 0; 1865 return 0;
1858 } 1866 }
1859 1867
@@ -2029,19 +2037,33 @@ static int bttv_switch_type(struct bttv_fh *fh, enum v4l2_buf_type type)
2029 return 0; 2037 return 0;
2030} 2038}
2031 2039
2040static void
2041pix_format_set_size (struct v4l2_pix_format * f,
2042 const struct bttv_format * fmt,
2043 unsigned int width,
2044 unsigned int height)
2045{
2046 f->width = width;
2047 f->height = height;
2048
2049 if (fmt->flags & FORMAT_FLAGS_PLANAR) {
2050 f->bytesperline = width; /* Y plane */
2051 f->sizeimage = (width * height * fmt->depth) >> 3;
2052 } else {
2053 f->bytesperline = (width * fmt->depth) >> 3;
2054 f->sizeimage = height * f->bytesperline;
2055 }
2056}
2057
2032static int bttv_g_fmt(struct bttv_fh *fh, struct v4l2_format *f) 2058static int bttv_g_fmt(struct bttv_fh *fh, struct v4l2_format *f)
2033{ 2059{
2034 switch (f->type) { 2060 switch (f->type) {
2035 case V4L2_BUF_TYPE_VIDEO_CAPTURE: 2061 case V4L2_BUF_TYPE_VIDEO_CAPTURE:
2036 memset(&f->fmt.pix,0,sizeof(struct v4l2_pix_format)); 2062 memset(&f->fmt.pix,0,sizeof(struct v4l2_pix_format));
2037 f->fmt.pix.width = fh->width; 2063 pix_format_set_size (&f->fmt.pix, fh->fmt,
2038 f->fmt.pix.height = fh->height; 2064 fh->width, fh->height);
2039 f->fmt.pix.field = fh->cap.field; 2065 f->fmt.pix.field = fh->cap.field;
2040 f->fmt.pix.pixelformat = fh->fmt->fourcc; 2066 f->fmt.pix.pixelformat = fh->fmt->fourcc;
2041 f->fmt.pix.bytesperline =
2042 (f->fmt.pix.width * fh->fmt->depth) >> 3;
2043 f->fmt.pix.sizeimage =
2044 f->fmt.pix.height * f->fmt.pix.bytesperline;
2045 return 0; 2067 return 0;
2046 case V4L2_BUF_TYPE_VIDEO_OVERLAY: 2068 case V4L2_BUF_TYPE_VIDEO_OVERLAY:
2047 memset(&f->fmt.win,0,sizeof(struct v4l2_window)); 2069 memset(&f->fmt.win,0,sizeof(struct v4l2_window));
@@ -2106,11 +2128,9 @@ static int bttv_try_fmt(struct bttv_fh *fh, struct bttv *btv,
2106 f->fmt.pix.width = maxw; 2128 f->fmt.pix.width = maxw;
2107 if (f->fmt.pix.height > maxh) 2129 if (f->fmt.pix.height > maxh)
2108 f->fmt.pix.height = maxh; 2130 f->fmt.pix.height = maxh;
2109 f->fmt.pix.width &= ~0x03; 2131 pix_format_set_size (&f->fmt.pix, fmt,
2110 f->fmt.pix.bytesperline = 2132 f->fmt.pix.width & ~3,
2111 (f->fmt.pix.width * fmt->depth) >> 3; 2133 f->fmt.pix.height);
2112 f->fmt.pix.sizeimage =
2113 f->fmt.pix.height * f->fmt.pix.bytesperline;
2114 2134
2115 return 0; 2135 return 0;
2116 } 2136 }
@@ -2278,6 +2298,15 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
2278 retval = -EINVAL; 2298 retval = -EINVAL;
2279 goto fh_unlock_and_return; 2299 goto fh_unlock_and_return;
2280 } 2300 }
2301 if (fmt->flags & FORMAT_FLAGS_RAW) {
2302 /* VIDIOCMCAPTURE uses gbufsize, not RAW_BPL *
2303 RAW_LINES * 2. F1 is stored at offset 0, F2
2304 at buffer size / 2. */
2305 fh->width = RAW_BPL;
2306 fh->height = gbufsize / RAW_BPL;
2307 btv->init.width = RAW_BPL;
2308 btv->init.height = gbufsize / RAW_BPL;
2309 }
2281 fh->ovfmt = fmt; 2310 fh->ovfmt = fmt;
2282 fh->fmt = fmt; 2311 fh->fmt = fmt;
2283 btv->init.ovfmt = fmt; 2312 btv->init.ovfmt = fmt;
@@ -2589,9 +2618,11 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
2589 2618
2590 if (0 == v4l2) 2619 if (0 == v4l2)
2591 return -EINVAL; 2620 return -EINVAL;
2592 strcpy(cap->driver,"bttv"); 2621 memset(cap, 0, sizeof (*cap));
2593 strlcpy(cap->card,btv->video_dev->name,sizeof(cap->card)); 2622 strlcpy(cap->driver, "bttv", sizeof (cap->driver));
2594 sprintf(cap->bus_info,"PCI:%s",pci_name(btv->c.pci)); 2623 strlcpy(cap->card, btv->video_dev->name, sizeof (cap->card));
2624 snprintf(cap->bus_info, sizeof (cap->bus_info),
2625 "PCI:%s", pci_name(btv->c.pci));
2595 cap->version = BTTV_VERSION_CODE; 2626 cap->version = BTTV_VERSION_CODE;
2596 cap->capabilities = 2627 cap->capabilities =
2597 V4L2_CAP_VIDEO_CAPTURE | 2628 V4L2_CAP_VIDEO_CAPTURE |
@@ -2952,6 +2983,8 @@ static unsigned int bttv_poll(struct file *file, poll_table *wait)
2952 fh->cap.read_buf->memory = V4L2_MEMORY_USERPTR; 2983 fh->cap.read_buf->memory = V4L2_MEMORY_USERPTR;
2953 field = videobuf_next_field(&fh->cap); 2984 field = videobuf_next_field(&fh->cap);
2954 if (0 != fh->cap.ops->buf_prepare(&fh->cap,fh->cap.read_buf,field)) { 2985 if (0 != fh->cap.ops->buf_prepare(&fh->cap,fh->cap.read_buf,field)) {
2986 kfree (fh->cap.read_buf);
2987 fh->cap.read_buf = NULL;
2955 up(&fh->cap.lock); 2988 up(&fh->cap.lock);
2956 return POLLERR; 2989 return POLLERR;
2957 } 2990 }
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c
index f6afeec499c5..aea3f038cff6 100644
--- a/drivers/media/video/cx25840/cx25840-core.c
+++ b/drivers/media/video/cx25840/cx25840-core.c
@@ -208,8 +208,11 @@ static void cx25840_initialize(struct i2c_client *client, int loadfw)
208 208
209static void input_change(struct i2c_client *client) 209static void input_change(struct i2c_client *client)
210{ 210{
211 struct cx25840_state *state = i2c_get_clientdata(client);
211 v4l2_std_id std = cx25840_get_v4lstd(client); 212 v4l2_std_id std = cx25840_get_v4lstd(client);
212 213
214 /* Note: perhaps V4L2_STD_PAL_M should be handled as V4L2_STD_NTSC
215 instead of V4L2_STD_PAL. Someone needs to test this. */
213 if (std & V4L2_STD_PAL) { 216 if (std & V4L2_STD_PAL) {
214 /* Follow tuner change procedure for PAL */ 217 /* Follow tuner change procedure for PAL */
215 cx25840_write(client, 0x808, 0xff); 218 cx25840_write(client, 0x808, 0xff);
@@ -220,7 +223,32 @@ static void input_change(struct i2c_client *client)
220 cx25840_write(client, 0x80b, 0x10); 223 cx25840_write(client, 0x80b, 0x10);
221 } else if (std & V4L2_STD_NTSC) { 224 } else if (std & V4L2_STD_NTSC) {
222 /* NTSC */ 225 /* NTSC */
223 cx25840_write(client, 0x808, 0xf6); 226 if (state->cardtype == CARDTYPE_PVR150_WORKAROUND) {
227 /* Certain Hauppauge PVR150 models have a hardware bug
228 that causes audio to drop out. For these models the
229 audio standard must be set explicitly.
230 To be precise: it affects cards with tuner models
231 85, 99 and 112 (model numbers from tveeprom). */
232 if (std == V4L2_STD_NTSC_M_JP) {
233 /* Japan uses EIAJ audio standard */
234 cx25840_write(client, 0x808, 0x2f);
235 } else {
236 /* Others use the BTSC audio standard */
237 cx25840_write(client, 0x808, 0x1f);
238 }
239 /* South Korea uses the A2-M (aka Zweiton M) audio
240 standard, and should set 0x808 to 0x3f, but I don't
241 know how to detect this. */
242 } else if (std == V4L2_STD_NTSC_M_JP) {
243 /* Japan uses EIAJ audio standard */
244 cx25840_write(client, 0x808, 0xf7);
245 } else {
246 /* Others use the BTSC audio standard */
247 cx25840_write(client, 0x808, 0xf6);
248 }
249 /* South Korea uses the A2-M (aka Zweiton M) audio standard,
250 and should set 0x808 to 0xf8, but I don't know how to
251 detect this. */
224 cx25840_write(client, 0x80b, 0x00); 252 cx25840_write(client, 0x80b, 0x00);
225 } 253 }
226 254
@@ -241,7 +269,8 @@ static int set_input(struct i2c_client *client, enum cx25840_input input)
241 case CX25840_TUNER: 269 case CX25840_TUNER:
242 cx25840_dbg("now setting Tuner input\n"); 270 cx25840_dbg("now setting Tuner input\n");
243 271
244 if (state->cardtype == CARDTYPE_PVR150) { 272 if (state->cardtype == CARDTYPE_PVR150 ||
273 state->cardtype == CARDTYPE_PVR150_WORKAROUND) {
245 /* CH_SEL_ADC2=1 */ 274 /* CH_SEL_ADC2=1 */
246 cx25840_and_or(client, 0x102, ~0x2, 0x02); 275 cx25840_and_or(client, 0x102, ~0x2, 0x02);
247 } 276 }
@@ -363,6 +392,7 @@ static int set_v4lctrl(struct i2c_client *client, struct v4l2_control *ctrl)
363 case CX25840_CID_CARDTYPE: 392 case CX25840_CID_CARDTYPE:
364 switch (ctrl->value) { 393 switch (ctrl->value) {
365 case CARDTYPE_PVR150: 394 case CARDTYPE_PVR150:
395 case CARDTYPE_PVR150_WORKAROUND:
366 case CARDTYPE_PG600: 396 case CARDTYPE_PG600:
367 state->cardtype = ctrl->value; 397 state->cardtype = ctrl->value;
368 break; 398 break;
@@ -714,7 +744,7 @@ static int cx25840_command(struct i2c_client *client, unsigned int cmd,
714 744
715/* ----------------------------------------------------------------------- */ 745/* ----------------------------------------------------------------------- */
716 746
717struct i2c_driver i2c_driver_cx25840; 747static struct i2c_driver i2c_driver_cx25840;
718 748
719static int cx25840_detect_client(struct i2c_adapter *adapter, int address, 749static int cx25840_detect_client(struct i2c_adapter *adapter, int address,
720 int kind) 750 int kind)
@@ -807,7 +837,7 @@ static int cx25840_detach_client(struct i2c_client *client)
807 837
808/* ----------------------------------------------------------------------- */ 838/* ----------------------------------------------------------------------- */
809 839
810struct i2c_driver i2c_driver_cx25840 = { 840static struct i2c_driver i2c_driver_cx25840 = {
811 .name = "cx25840", 841 .name = "cx25840",
812 842
813 .id = I2C_DRIVERID_CX25840, 843 .id = I2C_DRIVERID_CX25840,
diff --git a/drivers/media/video/cx25840/cx25840.h b/drivers/media/video/cx25840/cx25840.h
index 5c3f0639fb77..4932ed1c9b19 100644
--- a/drivers/media/video/cx25840/cx25840.h
+++ b/drivers/media/video/cx25840/cx25840.h
@@ -40,9 +40,16 @@ extern int cx25840_debug;
40 40
41#define CX25840_CID_CARDTYPE (V4L2_CID_PRIVATE_BASE+0) 41#define CX25840_CID_CARDTYPE (V4L2_CID_PRIVATE_BASE+0)
42 42
43/* The CARDTYPE_PVR150_WORKAROUND cardtype activates a workaround for a
44 hardware bug that is present in PVR150 (and possible PVR500) cards that
45 have certain NTSC tuners (tveeprom model numbers 85, 99 and 112). The
46 audio autodetect fails on some channels for these models and the workaround
47 is to select the audio standard explicitly. Many thanks to Hauppauge for
48 providing this information. */
43enum cx25840_cardtype { 49enum cx25840_cardtype {
44 CARDTYPE_PVR150, 50 CARDTYPE_PVR150,
45 CARDTYPE_PG600 51 CARDTYPE_PG600,
52 CARDTYPE_PVR150_WORKAROUND,
46}; 53};
47 54
48enum cx25840_input { 55enum cx25840_input {
diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig
index 41818b6205b3..85ba4106dc79 100644
--- a/drivers/media/video/cx88/Kconfig
+++ b/drivers/media/video/cx88/Kconfig
@@ -46,8 +46,8 @@ config VIDEO_CX88_DVB_ALL_FRONTENDS
46 If you are unsure, choose Y. 46 If you are unsure, choose Y.
47 47
48config VIDEO_CX88_DVB_MT352 48config VIDEO_CX88_DVB_MT352
49 tristate "Zarlink MT352 DVB-T Support" 49 bool "Zarlink MT352 DVB-T Support"
50 default m 50 default y
51 depends on VIDEO_CX88_DVB && !VIDEO_CX88_DVB_ALL_FRONTENDS 51 depends on VIDEO_CX88_DVB && !VIDEO_CX88_DVB_ALL_FRONTENDS
52 select DVB_MT352 52 select DVB_MT352
53 ---help--- 53 ---help---
@@ -55,8 +55,8 @@ config VIDEO_CX88_DVB_MT352
55 Connexant 2388x chip and the MT352 demodulator. 55 Connexant 2388x chip and the MT352 demodulator.
56 56
57config VIDEO_CX88_DVB_OR51132 57config VIDEO_CX88_DVB_OR51132
58 tristate "OR51132 ATSC Support" 58 bool "OR51132 ATSC Support"
59 default m 59 default y
60 depends on VIDEO_CX88_DVB && !VIDEO_CX88_DVB_ALL_FRONTENDS 60 depends on VIDEO_CX88_DVB && !VIDEO_CX88_DVB_ALL_FRONTENDS
61 select DVB_OR51132 61 select DVB_OR51132
62 ---help--- 62 ---help---
@@ -64,8 +64,8 @@ config VIDEO_CX88_DVB_OR51132
64 Connexant 2388x chip and the OR51132 demodulator. 64 Connexant 2388x chip and the OR51132 demodulator.
65 65
66config VIDEO_CX88_DVB_CX22702 66config VIDEO_CX88_DVB_CX22702
67 tristate "Conexant CX22702 DVB-T Support" 67 bool "Conexant CX22702 DVB-T Support"
68 default m 68 default y
69 depends on VIDEO_CX88_DVB && !VIDEO_CX88_DVB_ALL_FRONTENDS 69 depends on VIDEO_CX88_DVB && !VIDEO_CX88_DVB_ALL_FRONTENDS
70 select DVB_CX22702 70 select DVB_CX22702
71 ---help--- 71 ---help---
@@ -73,8 +73,8 @@ config VIDEO_CX88_DVB_CX22702
73 Connexant 2388x chip and the CX22702 demodulator. 73 Connexant 2388x chip and the CX22702 demodulator.
74 74
75config VIDEO_CX88_DVB_LGDT330X 75config VIDEO_CX88_DVB_LGDT330X
76 tristate "LG Electronics DT3302/DT3303 ATSC Support" 76 bool "LG Electronics DT3302/DT3303 ATSC Support"
77 default m 77 default y
78 depends on VIDEO_CX88_DVB && !VIDEO_CX88_DVB_ALL_FRONTENDS 78 depends on VIDEO_CX88_DVB && !VIDEO_CX88_DVB_ALL_FRONTENDS
79 select DVB_LGDT330X 79 select DVB_LGDT330X
80 ---help--- 80 ---help---
@@ -82,8 +82,8 @@ config VIDEO_CX88_DVB_LGDT330X
82 Connexant 2388x chip and the LGDT3302/LGDT3303 demodulator. 82 Connexant 2388x chip and the LGDT3302/LGDT3303 demodulator.
83 83
84config VIDEO_CX88_DVB_NXT200X 84config VIDEO_CX88_DVB_NXT200X
85 tristate "NXT2002/NXT2004 ATSC Support" 85 bool "NXT2002/NXT2004 ATSC Support"
86 default m 86 default y
87 depends on VIDEO_CX88_DVB && !VIDEO_CX88_DVB_ALL_FRONTENDS 87 depends on VIDEO_CX88_DVB && !VIDEO_CX88_DVB_ALL_FRONTENDS
88 select DVB_NXT200X 88 select DVB_NXT200X
89 ---help--- 89 ---help---
diff --git a/drivers/media/video/cx88/Makefile b/drivers/media/video/cx88/Makefile
index 0df40b773454..54401b02b7ce 100644
--- a/drivers/media/video/cx88/Makefile
+++ b/drivers/media/video/cx88/Makefile
@@ -9,21 +9,12 @@ obj-$(CONFIG_VIDEO_CX88_DVB) += cx88-dvb.o
9EXTRA_CFLAGS += -I$(src)/.. 9EXTRA_CFLAGS += -I$(src)/..
10EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core 10EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core
11EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/frontends 11EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/frontends
12ifneq ($(CONFIG_VIDEO_BUF_DVB),n) 12
13 EXTRA_CFLAGS += -DHAVE_VIDEO_BUF_DVB=1 13extra-cflags-$(CONFIG_VIDEO_BUF_DVB) += -DHAVE_VIDEO_BUF_DVB=1
14endif 14extra-cflags-$(CONFIG_DVB_CX22702) += -DHAVE_CX22702=1
15ifneq ($(CONFIG_DVB_CX22702),n) 15extra-cflags-$(CONFIG_DVB_OR51132) += -DHAVE_OR51132=1
16 EXTRA_CFLAGS += -DHAVE_CX22702=1 16extra-cflags-$(CONFIG_DVB_LGDT330X) += -DHAVE_LGDT330X=1
17endif 17extra-cflags-$(CONFIG_DVB_MT352) += -DHAVE_MT352=1
18ifneq ($(CONFIG_DVB_OR51132),n) 18extra-cflags-$(CONFIG_DVB_NXT200X) += -DHAVE_NXT200X=1
19 EXTRA_CFLAGS += -DHAVE_OR51132=1 19
20endif 20EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m)
21ifneq ($(CONFIG_DVB_LGDT330X),n)
22 EXTRA_CFLAGS += -DHAVE_LGDT330X=1
23endif
24ifneq ($(CONFIG_DVB_MT352),n)
25 EXTRA_CFLAGS += -DHAVE_MT352=1
26endif
27ifneq ($(CONFIG_DVB_NXT200X),n)
28 EXTRA_CFLAGS += -DHAVE_NXT200X=1
29endif
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index f2268631b7c0..951709aa88ba 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -567,6 +567,7 @@ struct cx88_board cx88_boards[] = {
567 .radio_type = UNSET, 567 .radio_type = UNSET,
568 .tuner_addr = ADDR_UNSET, 568 .tuner_addr = ADDR_UNSET,
569 .radio_addr = ADDR_UNSET, 569 .radio_addr = ADDR_UNSET,
570 .tda9887_conf = TDA9887_PRESENT,
570 .input = {{ 571 .input = {{
571 .type = CX88_VMUX_TELEVISION, 572 .type = CX88_VMUX_TELEVISION,
572 .vmux = 0, 573 .vmux = 0,
@@ -711,6 +712,7 @@ struct cx88_board cx88_boards[] = {
711 .radio_type = UNSET, 712 .radio_type = UNSET,
712 .tuner_addr = ADDR_UNSET, 713 .tuner_addr = ADDR_UNSET,
713 .radio_addr = ADDR_UNSET, 714 .radio_addr = ADDR_UNSET,
715 .tda9887_conf = TDA9887_PRESENT,
714 .input = {{ 716 .input = {{
715 .type = CX88_VMUX_TELEVISION, 717 .type = CX88_VMUX_TELEVISION,
716 .vmux = 0, 718 .vmux = 0,
@@ -1083,41 +1085,28 @@ static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
1083 tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data); 1085 tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
1084 core->tuner_type = tv.tuner_type; 1086 core->tuner_type = tv.tuner_type;
1085 core->has_radio = tv.has_radio; 1087 core->has_radio = tv.has_radio;
1086}
1087
1088static int hauppauge_eeprom_dvb(struct cx88_core *core, u8 *ee)
1089{
1090 int model;
1091 int tuner;
1092 1088
1093 /* Make sure we support the board model */ 1089 /* Make sure we support the board model */
1094 model = ee[0x1f] << 24 | ee[0x1e] << 16 | ee[0x1d] << 8 | ee[0x1c]; 1090 switch (tv.model)
1095 switch(model) { 1091 {
1096 case 90002: 1092 case 90002: /* Nova-T-PCI (9002) */
1097 case 90500: 1093 case 92001: /* Nova-S-Plus (Video and IR) */
1098 case 90501: 1094 case 92002: /* Nova-S-Plus (Video and IR) */
1095 case 90003: /* Nova-T-PCI (9002 No RF out) */
1096 case 90500: /* Nova-T-PCI (oem) */
1097 case 90501: /* Nova-T-PCI (oem/IR) */
1098 case 92000: /* Nova-SE2 (OEM, No Video or IR) */
1099
1099 /* known */ 1100 /* known */
1100 break; 1101 break;
1101 default: 1102 default:
1102 printk("%s: warning: unknown hauppauge model #%d\n", 1103 printk("%s: warning: unknown hauppauge model #%d\n",
1103 core->name, model); 1104 core->name, tv.model);
1104 break; 1105 break;
1105 } 1106 }
1106 1107
1107 /* Make sure we support the tuner */ 1108 printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n",
1108 tuner = ee[0x2d]; 1109 core->name, tv.model);
1109 switch(tuner) {
1110 case 0x4B: /* dtt 7595 */
1111 case 0x4C: /* dtt 7592 */
1112 break;
1113 default:
1114 printk("%s: error: unknown hauppauge tuner 0x%02x\n",
1115 core->name, tuner);
1116 return -ENODEV;
1117 }
1118 printk(KERN_INFO "%s: hauppauge eeprom: model=%d, tuner=%d\n",
1119 core->name, model, tuner);
1120 return 0;
1121} 1110}
1122 1111
1123/* ----------------------------------------------------------------------- */ 1112/* ----------------------------------------------------------------------- */
@@ -1201,7 +1190,7 @@ void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
1201 1190
1202void cx88_card_setup(struct cx88_core *core) 1191void cx88_card_setup(struct cx88_core *core)
1203{ 1192{
1204 static u8 eeprom[128]; 1193 static u8 eeprom[256];
1205 1194
1206 if (0 == core->i2c_rc) { 1195 if (0 == core->i2c_rc) {
1207 core->i2c_client.addr = 0xa0 >> 1; 1196 core->i2c_client.addr = 0xa0 >> 1;
@@ -1224,7 +1213,7 @@ void cx88_card_setup(struct cx88_core *core)
1224 break; 1213 break;
1225 case CX88_BOARD_HAUPPAUGE_DVB_T1: 1214 case CX88_BOARD_HAUPPAUGE_DVB_T1:
1226 if (0 == core->i2c_rc) 1215 if (0 == core->i2c_rc)
1227 hauppauge_eeprom_dvb(core,eeprom); 1216 hauppauge_eeprom(core,eeprom);
1228 break; 1217 break;
1229 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1: 1218 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
1230 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: 1219 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c
index eb806af17182..bb6eb54e19ce 100644
--- a/drivers/media/video/cx88/cx88-core.c
+++ b/drivers/media/video/cx88/cx88-core.c
@@ -837,6 +837,29 @@ static int set_pll(struct cx88_core *core, int prescale, u32 ofreq)
837 return -1; 837 return -1;
838} 838}
839 839
840int cx88_start_audio_dma(struct cx88_core *core)
841{
842 /* setup fifo + format */
843 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH25], 128, 0);
844 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH26], 128, 0);
845
846 cx_write(MO_AUDD_LNGTH, 128); /* fifo bpl size */
847 cx_write(MO_AUDR_LNGTH, 128); /* fifo bpl size */
848
849 /* start dma */
850 cx_write(MO_AUD_DMACNTRL, 0x0003); /* Up and Down fifo enable */
851
852 return 0;
853}
854
855int cx88_stop_audio_dma(struct cx88_core *core)
856{
857 /* stop dma */
858 cx_write(MO_AUD_DMACNTRL, 0x0000);
859
860 return 0;
861}
862
840static int set_tvaudio(struct cx88_core *core) 863static int set_tvaudio(struct cx88_core *core)
841{ 864{
842 struct cx88_tvnorm *norm = core->tvnorm; 865 struct cx88_tvnorm *norm = core->tvnorm;
@@ -877,12 +900,16 @@ static int set_tvaudio(struct cx88_core *core)
877 cx88_set_tvaudio(core); 900 cx88_set_tvaudio(core);
878 /* cx88_set_stereo(dev,V4L2_TUNER_MODE_STEREO); */ 901 /* cx88_set_stereo(dev,V4L2_TUNER_MODE_STEREO); */
879 902
880 cx_write(MO_AUDD_LNGTH, 128); /* fifo size */ 903/*
881 cx_write(MO_AUDR_LNGTH, 128); /* fifo size */ 904 This should be needed only on cx88-alsa. It seems that some cx88 chips have
882 cx_write(MO_AUD_DMACNTRL, 0x03); /* need audio fifo */ 905 bugs and does require DMA enabled for it to work.
906 */
907 cx88_start_audio_dma(core);
883 return 0; 908 return 0;
884} 909}
885 910
911
912
886int cx88_set_tvnorm(struct cx88_core *core, struct cx88_tvnorm *norm) 913int cx88_set_tvnorm(struct cx88_core *core, struct cx88_tvnorm *norm)
887{ 914{
888 u32 fsc8; 915 u32 fsc8;
@@ -1204,6 +1231,8 @@ EXPORT_SYMBOL(cx88_set_scale);
1204EXPORT_SYMBOL(cx88_vdev_init); 1231EXPORT_SYMBOL(cx88_vdev_init);
1205EXPORT_SYMBOL(cx88_core_get); 1232EXPORT_SYMBOL(cx88_core_get);
1206EXPORT_SYMBOL(cx88_core_put); 1233EXPORT_SYMBOL(cx88_core_put);
1234EXPORT_SYMBOL(cx88_start_audio_dma);
1235EXPORT_SYMBOL(cx88_stop_audio_dma);
1207 1236
1208/* 1237/*
1209 * Local variables: 1238 * Local variables:
diff --git a/drivers/media/video/cx88/cx88-tvaudio.c b/drivers/media/video/cx88/cx88-tvaudio.c
index 6d9bec1c583b..a1b120c8a9b5 100644
--- a/drivers/media/video/cx88/cx88-tvaudio.c
+++ b/drivers/media/video/cx88/cx88-tvaudio.c
@@ -119,13 +119,10 @@ static void set_audio_registers(struct cx88_core *core, const struct rlist *l)
119 119
120static void set_audio_start(struct cx88_core *core, u32 mode) 120static void set_audio_start(struct cx88_core *core, u32 mode)
121{ 121{
122 // mute 122 /* mute */
123 cx_write(AUD_VOL_CTL, (1 << 6)); 123 cx_write(AUD_VOL_CTL, (1 << 6));
124 124
125 // start programming 125 /* start programming */
126 cx_write(MO_AUD_DMACNTRL, 0x0000);
127 msleep(100);
128 //cx_write(AUD_CTL, 0x0000);
129 cx_write(AUD_INIT, mode); 126 cx_write(AUD_INIT, mode);
130 cx_write(AUD_INIT_LD, 0x0001); 127 cx_write(AUD_INIT_LD, 0x0001);
131 cx_write(AUD_SOFT_RESET, 0x0001); 128 cx_write(AUD_SOFT_RESET, 0x0001);
@@ -135,17 +132,21 @@ static void set_audio_finish(struct cx88_core *core, u32 ctl)
135{ 132{
136 u32 volume; 133 u32 volume;
137 134
135 /* restart dma; This avoids buzz in NICAM and is good in others */
136 cx88_stop_audio_dma(core);
137 cx_write(AUD_RATE_THRES_DMD, 0x000000C0);
138 cx88_start_audio_dma(core);
139
138 if (cx88_boards[core->board].blackbird) { 140 if (cx88_boards[core->board].blackbird) {
139 // sets sound input from external adc 141 /* sets sound input from external adc */
140 cx_set(AUD_CTL, EN_I2SIN_ENABLE); 142 cx_set(AUD_CTL, EN_I2SIN_ENABLE);
141 //cx_write(AUD_I2SINPUTCNTL, 0);
142 cx_write(AUD_I2SINPUTCNTL, 4); 143 cx_write(AUD_I2SINPUTCNTL, 4);
143 cx_write(AUD_BAUDRATE, 1); 144 cx_write(AUD_BAUDRATE, 1);
144 // 'pass-thru mode': this enables the i2s output to the mpeg encoder 145 /* 'pass-thru mode': this enables the i2s output to the mpeg encoder */
145 cx_set(AUD_CTL, EN_I2SOUT_ENABLE); 146 cx_set(AUD_CTL, EN_I2SOUT_ENABLE);
146 cx_write(AUD_I2SOUTPUTCNTL, 1); 147 cx_write(AUD_I2SOUTPUTCNTL, 1);
147 cx_write(AUD_I2SCNTL, 0); 148 cx_write(AUD_I2SCNTL, 0);
148 //cx_write(AUD_APB_IN_RATE_ADJ, 0); 149 /* cx_write(AUD_APB_IN_RATE_ADJ, 0); */
149 } else { 150 } else {
150 ctl |= EN_DAC_ENABLE; 151 ctl |= EN_DAC_ENABLE;
151 cx_write(AUD_CTL, ctl); 152 cx_write(AUD_CTL, ctl);
@@ -153,7 +154,6 @@ static void set_audio_finish(struct cx88_core *core, u32 ctl)
153 154
154 /* finish programming */ 155 /* finish programming */
155 cx_write(AUD_SOFT_RESET, 0x0000); 156 cx_write(AUD_SOFT_RESET, 0x0000);
156 cx_write(MO_AUD_DMACNTRL, 0x0003);
157 157
158 /* unmute */ 158 /* unmute */
159 volume = cx_sread(SHADOW_AUD_VOL_CTL); 159 volume = cx_sread(SHADOW_AUD_VOL_CTL);
@@ -313,7 +313,6 @@ static void set_audio_standard_NICAM(struct cx88_core *core, u32 mode)
313 {AUD_RATE_ADJ3, 0x00000100}, 313 {AUD_RATE_ADJ3, 0x00000100},
314 {AUD_RATE_ADJ4, 0x00000400}, 314 {AUD_RATE_ADJ4, 0x00000400},
315 {AUD_RATE_ADJ5, 0x00001000}, 315 {AUD_RATE_ADJ5, 0x00001000},
316 //{ AUD_DMD_RA_DDS, 0x00c0d5ce },
317 {AUD_ERRLOGPERIOD_R, 0x00000fff}, 316 {AUD_ERRLOGPERIOD_R, 0x00000fff},
318 {AUD_ERRINTRPTTHSHLD1_R, 0x000003ff}, 317 {AUD_ERRINTRPTTHSHLD1_R, 0x000003ff},
319 {AUD_ERRINTRPTTHSHLD2_R, 0x000000ff}, 318 {AUD_ERRINTRPTTHSHLD2_R, 0x000000ff},
@@ -351,12 +350,12 @@ static void set_audio_standard_NICAM(struct cx88_core *core, u32 mode)
351 set_audio_registers(core, nicam_l); 350 set_audio_registers(core, nicam_l);
352 break; 351 break;
353 case WW_I: 352 case WW_I:
354 dprintk("%s PAL-I NICAM (status: devel)\n", __FUNCTION__); 353 dprintk("%s PAL-I NICAM (status: known-good)\n", __FUNCTION__);
355 set_audio_registers(core, nicam_bgdki_common); 354 set_audio_registers(core, nicam_bgdki_common);
356 set_audio_registers(core, nicam_i); 355 set_audio_registers(core, nicam_i);
357 break; 356 break;
358 default: 357 default:
359 dprintk("%s PAL-BGDK NICAM (status: unknown)\n", __FUNCTION__); 358 dprintk("%s PAL-BGDK NICAM (status: known-good)\n", __FUNCTION__);
360 set_audio_registers(core, nicam_bgdki_common); 359 set_audio_registers(core, nicam_bgdki_common);
361 set_audio_registers(core, nicam_default); 360 set_audio_registers(core, nicam_default);
362 break; 361 break;
@@ -715,8 +714,7 @@ int cx88_detect_nicam(struct cx88_core *core)
715 /* if bit1=1 then nicam is detected */ 714 /* if bit1=1 then nicam is detected */
716 j += ((cx_read(AUD_NICAM_STATUS2) & 0x02) >> 1); 715 j += ((cx_read(AUD_NICAM_STATUS2) & 0x02) >> 1);
717 716
718 /* 3x detected: absolutly sure now */ 717 if (j == 1) {
719 if (j == 3) {
720 dprintk("nicam is detected.\n"); 718 dprintk("nicam is detected.\n");
721 return 1; 719 return 1;
722 } 720 }
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h
index b19d3a9e2298..27fb080fd7aa 100644
--- a/drivers/media/video/cx88/cx88.h
+++ b/drivers/media/video/cx88/cx88.h
@@ -491,6 +491,10 @@ extern struct cx88_core* cx88_core_get(struct pci_dev *pci);
491extern void cx88_core_put(struct cx88_core *core, 491extern void cx88_core_put(struct cx88_core *core,
492 struct pci_dev *pci); 492 struct pci_dev *pci);
493 493
494extern int cx88_start_audio_dma(struct cx88_core *core);
495extern int cx88_stop_audio_dma(struct cx88_core *core);
496
497
494/* ----------------------------------------------------------- */ 498/* ----------------------------------------------------------- */
495/* cx88-vbi.c */ 499/* cx88-vbi.c */
496 500
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c
index d54bc0127484..9f6e5e5355a1 100644
--- a/drivers/media/video/em28xx/em28xx-core.c
+++ b/drivers/media/video/em28xx/em28xx-core.c
@@ -32,7 +32,7 @@
32 32
33/* #define ENABLE_DEBUG_ISOC_FRAMES */ 33/* #define ENABLE_DEBUG_ISOC_FRAMES */
34 34
35unsigned int core_debug; 35static unsigned int core_debug;
36module_param(core_debug,int,0644); 36module_param(core_debug,int,0644);
37MODULE_PARM_DESC(core_debug,"enable debug messages [core]"); 37MODULE_PARM_DESC(core_debug,"enable debug messages [core]");
38 38
@@ -41,7 +41,7 @@ MODULE_PARM_DESC(core_debug,"enable debug messages [core]");
41 printk(KERN_INFO "%s %s :"fmt, \ 41 printk(KERN_INFO "%s %s :"fmt, \
42 dev->name, __FUNCTION__ , ##arg); } while (0) 42 dev->name, __FUNCTION__ , ##arg); } while (0)
43 43
44unsigned int reg_debug; 44static unsigned int reg_debug;
45module_param(reg_debug,int,0644); 45module_param(reg_debug,int,0644);
46MODULE_PARM_DESC(reg_debug,"enable debug messages [URB reg]"); 46MODULE_PARM_DESC(reg_debug,"enable debug messages [URB reg]");
47 47
@@ -50,7 +50,7 @@ MODULE_PARM_DESC(reg_debug,"enable debug messages [URB reg]");
50 printk(KERN_INFO "%s %s :"fmt, \ 50 printk(KERN_INFO "%s %s :"fmt, \
51 dev->name, __FUNCTION__ , ##arg); } while (0) 51 dev->name, __FUNCTION__ , ##arg); } while (0)
52 52
53unsigned int isoc_debug; 53static unsigned int isoc_debug;
54module_param(isoc_debug,int,0644); 54module_param(isoc_debug,int,0644);
55MODULE_PARM_DESC(isoc_debug,"enable debug messages [isoc transfers]"); 55MODULE_PARM_DESC(isoc_debug,"enable debug messages [isoc transfers]");
56 56
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 57c1826b928e..abec32c175aa 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -226,7 +226,7 @@ static int em28xx_config(struct em28xx *dev)
226 * em28xx_config_i2c() 226 * em28xx_config_i2c()
227 * configure i2c attached devices 227 * configure i2c attached devices
228 */ 228 */
229void em28xx_config_i2c(struct em28xx *dev) 229static void em28xx_config_i2c(struct em28xx *dev)
230{ 230{
231 struct v4l2_frequency f; 231 struct v4l2_frequency f;
232 struct video_decoder_init em28xx_vdi = {.data = NULL }; 232 struct video_decoder_init em28xx_vdi = {.data = NULL };
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index 801c736e9328..124c502ea1f3 100644
--- a/drivers/media/video/ir-kbd-i2c.c
+++ b/drivers/media/video/ir-kbd-i2c.c
@@ -278,7 +278,7 @@ static int ir_probe(struct i2c_adapter *adap);
278 278
279static struct i2c_driver driver = { 279static struct i2c_driver driver = {
280 .name = "ir remote kbd driver", 280 .name = "ir remote kbd driver",
281 .id = I2C_DRIVERID_EXP3, /* FIXME */ 281 .id = I2C_DRIVERID_I2C_IR,
282 .flags = I2C_DF_NOTIFY, 282 .flags = I2C_DF_NOTIFY,
283 .attach_adapter = ir_probe, 283 .attach_adapter = ir_probe,
284 .detach_client = ir_detach, 284 .detach_client = ir_detach,
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c
index 0235cef07b31..e717e30d8187 100644
--- a/drivers/media/video/saa7115.c
+++ b/drivers/media/video/saa7115.c
@@ -771,17 +771,19 @@ static v4l2_std_id saa7115_get_v4lstd(struct i2c_client *client)
771 771
772static void saa7115_log_status(struct i2c_client *client) 772static void saa7115_log_status(struct i2c_client *client)
773{ 773{
774 static const char * const audclk_freq_strs[] = {
775 "44.1 kHz",
776 "48 kHz",
777 "32 kHz"
778 };
779 struct saa7115_state *state = i2c_get_clientdata(client); 774 struct saa7115_state *state = i2c_get_clientdata(client);
775 char *audfreq = "undefined";
780 int reg1e, reg1f; 776 int reg1e, reg1f;
781 int signalOk; 777 int signalOk;
782 int vcr; 778 int vcr;
783 779
784 saa7115_info("Audio frequency: %s\n", audclk_freq_strs[state->audclk_freq]); 780 switch (state->audclk_freq) {
781 case V4L2_AUDCLK_32_KHZ: audfreq = "32 kHz"; break;
782 case V4L2_AUDCLK_441_KHZ: audfreq = "44.1 kHz"; break;
783 case V4L2_AUDCLK_48_KHZ: audfreq = "48 kHz"; break;
784 }
785
786 saa7115_info("Audio frequency: %s\n", audfreq);
785 if (client->name[6] == '4') { 787 if (client->name[6] == '4') {
786 /* status for the saa7114 */ 788 /* status for the saa7114 */
787 reg1f = saa7115_read(client, 0x1f); 789 reg1f = saa7115_read(client, 0x1f);
diff --git a/drivers/media/video/saa711x.c b/drivers/media/video/saa711x.c
index 25b30f352d84..59e13fdea780 100644
--- a/drivers/media/video/saa711x.c
+++ b/drivers/media/video/saa711x.c
@@ -323,7 +323,7 @@ saa711x_command (struct i2c_client *client,
323 323
324 case VIDEO_MODE_SECAM: 324 case VIDEO_MODE_SECAM:
325 saa711x_write(client, 0x08, 325 saa711x_write(client, 0x08,
326 (decoder->reg[0x0e] & 0x3f) | 0x00); 326 (decoder->reg[0x08] & 0x3f) | 0x00);
327 saa711x_write(client, 0x0e, 327 saa711x_write(client, 0x0e,
328 (decoder->reg[0x0e] & 0x8f) | 0x50); 328 (decoder->reg[0x0e] & 0x8f) | 0x50);
329 break; 329 break;
diff --git a/drivers/media/video/saa7127.c b/drivers/media/video/saa7127.c
index 843431f10e3b..3428e1ed0032 100644
--- a/drivers/media/video/saa7127.c
+++ b/drivers/media/video/saa7127.c
@@ -223,7 +223,7 @@ static const struct i2c_reg_value saa7127_init_config_60hz[] = {
223}; 223};
224 224
225#define SAA7127_50HZ_DAC_CONTROL 0x02 225#define SAA7127_50HZ_DAC_CONTROL 0x02
226struct i2c_reg_value saa7127_init_config_50hz[] = { 226static struct i2c_reg_value saa7127_init_config_50hz[] = {
227 { SAA7127_REG_BURST_START, 0x21 }, 227 { SAA7127_REG_BURST_START, 0x21 },
228 /* BURST_END is also used as a chip ID in saa7127_detect_client */ 228 /* BURST_END is also used as a chip ID in saa7127_detect_client */
229 { SAA7127_REG_BURST_END, 0x1d }, 229 { SAA7127_REG_BURST_END, 0x1d },
@@ -696,7 +696,7 @@ static int saa7127_command(struct i2c_client *client,
696 696
697/* ----------------------------------------------------------------------- */ 697/* ----------------------------------------------------------------------- */
698 698
699struct i2c_driver i2c_driver_saa7127; 699static struct i2c_driver i2c_driver_saa7127;
700 700
701/* ----------------------------------------------------------------------- */ 701/* ----------------------------------------------------------------------- */
702 702
@@ -818,7 +818,7 @@ static int saa7127_detach(struct i2c_client *client)
818 818
819/* ----------------------------------------------------------------------- */ 819/* ----------------------------------------------------------------------- */
820 820
821struct i2c_driver i2c_driver_saa7127 = { 821static struct i2c_driver i2c_driver_saa7127 = {
822 .name = "saa7127", 822 .name = "saa7127",
823 .id = I2C_DRIVERID_SAA7127, 823 .id = I2C_DRIVERID_SAA7127,
824 .flags = I2C_DF_NOTIFY, 824 .flags = I2C_DF_NOTIFY,
diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig
index 7bdeabe638ca..c512c4411b38 100644
--- a/drivers/media/video/saa7134/Kconfig
+++ b/drivers/media/video/saa7134/Kconfig
@@ -42,8 +42,8 @@ config VIDEO_SAA7134_DVB_ALL_FRONTENDS
42 If you are unsure, choose Y. 42 If you are unsure, choose Y.
43 43
44config VIDEO_SAA7134_DVB_MT352 44config VIDEO_SAA7134_DVB_MT352
45 tristate "Zarlink MT352 DVB-T Support" 45 bool "Zarlink MT352 DVB-T Support"
46 default m 46 default y
47 depends on VIDEO_SAA7134_DVB && !VIDEO_SAA7134_DVB_ALL_FRONTENDS 47 depends on VIDEO_SAA7134_DVB && !VIDEO_SAA7134_DVB_ALL_FRONTENDS
48 select DVB_MT352 48 select DVB_MT352
49 ---help--- 49 ---help---
@@ -51,8 +51,8 @@ config VIDEO_SAA7134_DVB_MT352
51 Philips saa7134 chip and the MT352 demodulator. 51 Philips saa7134 chip and the MT352 demodulator.
52 52
53config VIDEO_SAA7134_DVB_TDA1004X 53config VIDEO_SAA7134_DVB_TDA1004X
54 tristate "Phillips TDA10045H/TDA10046H DVB-T Support" 54 bool "Phillips TDA10045H/TDA10046H DVB-T Support"
55 default m 55 default y
56 depends on VIDEO_SAA7134_DVB && !VIDEO_SAA7134_DVB_ALL_FRONTENDS 56 depends on VIDEO_SAA7134_DVB && !VIDEO_SAA7134_DVB_ALL_FRONTENDS
57 select DVB_TDA1004X 57 select DVB_TDA1004X
58 ---help--- 58 ---help---
@@ -60,8 +60,8 @@ config VIDEO_SAA7134_DVB_TDA1004X
60 Philips saa7134 chip and the TDA10045H/TDA10046H demodulator. 60 Philips saa7134 chip and the TDA10045H/TDA10046H demodulator.
61 61
62config VIDEO_SAA7134_DVB_NXT200X 62config VIDEO_SAA7134_DVB_NXT200X
63 tristate "NXT2002/NXT2004 ATSC Support" 63 bool "NXT2002/NXT2004 ATSC Support"
64 default m 64 default y
65 depends on VIDEO_SAA7134_DVB && !VIDEO_SAA7134_DVB_ALL_FRONTENDS 65 depends on VIDEO_SAA7134_DVB && !VIDEO_SAA7134_DVB_ALL_FRONTENDS
66 select DVB_NXT200X 66 select DVB_NXT200X
67 ---help--- 67 ---help---
diff --git a/drivers/media/video/saa7134/Makefile b/drivers/media/video/saa7134/Makefile
index 4226b61cc613..134f83a96218 100644
--- a/drivers/media/video/saa7134/Makefile
+++ b/drivers/media/video/saa7134/Makefile
@@ -11,15 +11,10 @@ obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o
11EXTRA_CFLAGS += -I$(src)/.. 11EXTRA_CFLAGS += -I$(src)/..
12EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core 12EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core
13EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/frontends 13EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/frontends
14ifneq ($(CONFIG_VIDEO_BUF_DVB),n) 14
15 EXTRA_CFLAGS += -DHAVE_VIDEO_BUF_DVB=1 15extra-cflags-$(CONFIG_VIDEO_BUF_DVB) += -DHAVE_VIDEO_BUF_DVB=1
16endif 16extra-cflags-$(CONFIG_DVB_MT352) += -DHAVE_MT352=1
17ifneq ($(CONFIG_DVB_MT352),n) 17extra-cflags-$(CONFIG_DVB_TDA1004X) += -DHAVE_TDA1004X=1
18 EXTRA_CFLAGS += -DHAVE_MT352=1 18extra-cflags-$(CONFIG_DVB_NXT200X) += -DHAVE_NXT200X=1
19endif 19
20ifneq ($(CONFIG_DVB_TDA1004X),n) 20EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m)
21 EXTRA_CFLAGS += -DHAVE_TDA1004X=1
22endif
23ifneq ($(CONFIG_DVB_NXT200X),n)
24 EXTRA_CFLAGS += -DHAVE_NXT200X=1
25endif
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c
index 5707c666660b..263c6e2e3e8e 100644
--- a/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/drivers/media/video/saa7134/saa7134-alsa.c
@@ -58,8 +58,6 @@ static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 0};
58module_param_array(index, int, NULL, 0444); 58module_param_array(index, int, NULL, 0444);
59MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s)."); 59MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s).");
60 60
61int position;
62
63#define dprintk(fmt, arg...) if (debug) \ 61#define dprintk(fmt, arg...) if (debug) \
64 printk(KERN_DEBUG "%s/alsa: " fmt, dev->name , ## arg) 62 printk(KERN_DEBUG "%s/alsa: " fmt, dev->name , ## arg)
65 63
@@ -140,7 +138,8 @@ static void saa7134_dma_start(struct saa7134_dev *dev)
140 * 138 *
141 */ 139 */
142 140
143void saa7134_irq_alsa_done(struct saa7134_dev *dev, unsigned long status) 141static void saa7134_irq_alsa_done(struct saa7134_dev *dev,
142 unsigned long status)
144{ 143{
145 int next_blk, reg = 0; 144 int next_blk, reg = 0;
146 145
@@ -881,7 +880,7 @@ static void snd_saa7134_free(snd_card_t * card)
881 * 880 *
882 */ 881 */
883 882
884int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum) 883static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum)
885{ 884{
886 885
887 snd_card_t *card; 886 snd_card_t *card;
@@ -945,6 +944,8 @@ int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum)
945 sprintf(card->longname, "%s at 0x%lx irq %d", 944 sprintf(card->longname, "%s at 0x%lx irq %d",
946 chip->dev->name, chip->iobase, chip->irq); 945 chip->dev->name, chip->iobase, chip->irq);
947 946
947 printk(KERN_INFO "%s/alsa: %s registered as card %d\n",dev->name,card->longname,index[devnum]);
948
948 if ((err = snd_card_register(card)) == 0) { 949 if ((err = snd_card_register(card)) == 0) {
949 snd_saa7134_cards[devnum] = card; 950 snd_saa7134_cards[devnum] = card;
950 return 0; 951 return 0;
@@ -955,6 +956,22 @@ __nodev:
955 return err; 956 return err;
956} 957}
957 958
959
960static int alsa_device_init(struct saa7134_dev *dev)
961{
962 dev->dmasound.priv_data = dev;
963 alsa_card_saa7134_create(dev,dev->nr);
964 return 1;
965}
966
967static int alsa_device_exit(struct saa7134_dev *dev)
968{
969
970 snd_card_free(snd_saa7134_cards[dev->nr]);
971 snd_saa7134_cards[dev->nr] = NULL;
972 return 1;
973}
974
958/* 975/*
959 * Module initializer 976 * Module initializer
960 * 977 *
@@ -968,22 +985,21 @@ static int saa7134_alsa_init(void)
968 struct saa7134_dev *dev = NULL; 985 struct saa7134_dev *dev = NULL;
969 struct list_head *list; 986 struct list_head *list;
970 987
971 position = 0;
972
973 printk(KERN_INFO "saa7134 ALSA driver for DMA sound loaded\n"); 988 printk(KERN_INFO "saa7134 ALSA driver for DMA sound loaded\n");
974 989
975 list_for_each(list,&saa7134_devlist) { 990 list_for_each(list,&saa7134_devlist) {
976 dev = list_entry(list, struct saa7134_dev, devlist); 991 dev = list_entry(list, struct saa7134_dev, devlist);
977 if (dev->dmasound.priv_data == NULL) { 992 if (dev->dmasound.priv_data == NULL) {
978 dev->dmasound.priv_data = dev; 993 alsa_device_init(dev);
979 alsa_card_saa7134_create(dev,position);
980 position++;
981 } else { 994 } else {
982 printk(KERN_ERR "saa7134 ALSA: DMA sound is being handled by OSS. ignoring %s\n",dev->name); 995 printk(KERN_ERR "saa7134 ALSA: DMA sound is being handled by OSS. ignoring %s\n",dev->name);
983 return -EBUSY; 996 return -EBUSY;
984 } 997 }
985 } 998 }
986 999
1000 dmasound_init = alsa_device_init;
1001 dmasound_exit = alsa_device_exit;
1002
987 if (dev == NULL) 1003 if (dev == NULL)
988 printk(KERN_INFO "saa7134 ALSA: no saa7134 cards found\n"); 1004 printk(KERN_INFO "saa7134 ALSA: no saa7134 cards found\n");
989 1005
@@ -994,7 +1010,7 @@ static int saa7134_alsa_init(void)
994 * Module destructor 1010 * Module destructor
995 */ 1011 */
996 1012
997void saa7134_alsa_exit(void) 1013static void saa7134_alsa_exit(void)
998{ 1014{
999 int idx; 1015 int idx;
1000 1016
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c
index 4275d2ddb864..1a093bf176f3 100644
--- a/drivers/media/video/saa7134/saa7134-core.c
+++ b/drivers/media/video/saa7134/saa7134-core.c
@@ -88,6 +88,9 @@ LIST_HEAD(saa7134_devlist);
88static LIST_HEAD(mops_list); 88static LIST_HEAD(mops_list);
89static unsigned int saa7134_devcount; 89static unsigned int saa7134_devcount;
90 90
91int (*dmasound_init)(struct saa7134_dev *dev);
92int (*dmasound_exit)(struct saa7134_dev *dev);
93
91#define dprintk(fmt, arg...) if (core_debug) \ 94#define dprintk(fmt, arg...) if (core_debug) \
92 printk(KERN_DEBUG "%s/core: " fmt, dev->name , ## arg) 95 printk(KERN_DEBUG "%s/core: " fmt, dev->name , ## arg)
93 96
@@ -184,8 +187,7 @@ void saa7134_track_gpio(struct saa7134_dev *dev, char *msg)
184/* ----------------------------------------------------------- */ 187/* ----------------------------------------------------------- */
185/* delayed request_module */ 188/* delayed request_module */
186 189
187#ifdef CONFIG_MODULES 190#if defined(CONFIG_MODULES) && defined(MODULE)
188
189static int need_empress; 191static int need_empress;
190static int need_dvb; 192static int need_dvb;
191static int need_alsa; 193static int need_alsa;
@@ -234,9 +236,7 @@ static void request_module_depend(char *name, int *flag)
234} 236}
235 237
236#else 238#else
237
238#define request_module_depend(name,flag) 239#define request_module_depend(name,flag)
239
240#endif /* CONFIG_MODULES */ 240#endif /* CONFIG_MODULES */
241 241
242/* ------------------------------------------------------------------ */ 242/* ------------------------------------------------------------------ */
@@ -1017,6 +1017,10 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
1017 /* check for signal */ 1017 /* check for signal */
1018 saa7134_irq_video_intl(dev); 1018 saa7134_irq_video_intl(dev);
1019 1019
1020 if (dmasound_init && !dev->dmasound.priv_data) {
1021 dmasound_init(dev);
1022 }
1023
1020 return 0; 1024 return 0;
1021 1025
1022 fail4: 1026 fail4:
@@ -1040,6 +1044,11 @@ static void __devexit saa7134_finidev(struct pci_dev *pci_dev)
1040 struct list_head *item; 1044 struct list_head *item;
1041 struct saa7134_mpeg_ops *mops; 1045 struct saa7134_mpeg_ops *mops;
1042 1046
1047 /* Release DMA sound modules if present */
1048 if (dmasound_exit && dev->dmasound.priv_data) {
1049 dmasound_exit(dev);
1050 }
1051
1043 /* debugging ... */ 1052 /* debugging ... */
1044 if (irq_debug) { 1053 if (irq_debug) {
1045 u32 report = saa_readl(SAA7134_IRQ_REPORT); 1054 u32 report = saa_readl(SAA7134_IRQ_REPORT);
@@ -1071,6 +1080,7 @@ static void __devexit saa7134_finidev(struct pci_dev *pci_dev)
1071 saa7134_i2c_unregister(dev); 1080 saa7134_i2c_unregister(dev);
1072 saa7134_unregister_video(dev); 1081 saa7134_unregister_video(dev);
1073 1082
1083
1074 /* the DMA sound modules should be unloaded before reaching 1084 /* the DMA sound modules should be unloaded before reaching
1075 this, but just in case they are still present... */ 1085 this, but just in case they are still present... */
1076 if (dev->dmasound.priv_data != NULL) { 1086 if (dev->dmasound.priv_data != NULL) {
@@ -1078,6 +1088,7 @@ static void __devexit saa7134_finidev(struct pci_dev *pci_dev)
1078 dev->dmasound.priv_data = NULL; 1088 dev->dmasound.priv_data = NULL;
1079 } 1089 }
1080 1090
1091
1081 /* release resources */ 1092 /* release resources */
1082 free_irq(pci_dev->irq, dev); 1093 free_irq(pci_dev->irq, dev);
1083 iounmap(dev->lmmio); 1094 iounmap(dev->lmmio);
@@ -1149,10 +1160,10 @@ static int saa7134_init(void)
1149 1160
1150static void saa7134_fini(void) 1161static void saa7134_fini(void)
1151{ 1162{
1152#ifdef CONFIG_MODULES 1163#if defined(CONFIG_MODULES) && defined(MODULE)
1153 if (pending_registered) 1164 if (pending_registered)
1154 unregister_module_notifier(&pending_notifier); 1165 unregister_module_notifier(&pending_notifier);
1155#endif 1166#endif /* CONFIG_MODULES */
1156 pci_unregister_driver(&saa7134_pci_driver); 1167 pci_unregister_driver(&saa7134_pci_driver);
1157} 1168}
1158 1169
@@ -1168,6 +1179,8 @@ EXPORT_SYMBOL(saa7134_boards);
1168 1179
1169/* ----------------- for the DMA sound modules --------------- */ 1180/* ----------------- for the DMA sound modules --------------- */
1170 1181
1182EXPORT_SYMBOL(dmasound_init);
1183EXPORT_SYMBOL(dmasound_exit);
1171EXPORT_SYMBOL(saa7134_pgtable_free); 1184EXPORT_SYMBOL(saa7134_pgtable_free);
1172EXPORT_SYMBOL(saa7134_pgtable_build); 1185EXPORT_SYMBOL(saa7134_pgtable_build);
1173EXPORT_SYMBOL(saa7134_pgtable_alloc); 1186EXPORT_SYMBOL(saa7134_pgtable_alloc);
diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c
index fd9ed11ab1e2..5a579194e455 100644
--- a/drivers/media/video/saa7134/saa7134-oss.c
+++ b/drivers/media/video/saa7134/saa7134-oss.c
@@ -899,26 +899,26 @@ void saa7134_irq_oss_done(struct saa7134_dev *dev, unsigned long status)
899 spin_unlock(&dev->slock); 899 spin_unlock(&dev->slock);
900} 900}
901 901
902int saa7134_dsp_create(struct saa7134_dev *dev) 902static int saa7134_dsp_create(struct saa7134_dev *dev)
903{ 903{
904 int err; 904 int err;
905 905
906 err = dev->dmasound.minor_dsp = 906 err = dev->dmasound.minor_dsp =
907 register_sound_dsp(&saa7134_dsp_fops, 907 register_sound_dsp(&saa7134_dsp_fops,
908 dsp_nr[dev->nr]); 908 dsp_nr[dev->nr]);
909 if (err < 0) { 909 if (err < 0) {
910 goto fail; 910 goto fail;
911 } 911 }
912 printk(KERN_INFO "%s: registered device dsp%d\n", 912 printk(KERN_INFO "%s: registered device dsp%d\n",
913 dev->name,dev->dmasound.minor_dsp >> 4); 913 dev->name,dev->dmasound.minor_dsp >> 4);
914 914
915 err = dev->dmasound.minor_mixer = 915 err = dev->dmasound.minor_mixer =
916 register_sound_mixer(&saa7134_mixer_fops, 916 register_sound_mixer(&saa7134_mixer_fops,
917 mixer_nr[dev->nr]); 917 mixer_nr[dev->nr]);
918 if (err < 0) 918 if (err < 0)
919 goto fail; 919 goto fail;
920 printk(KERN_INFO "%s: registered device mixer%d\n", 920 printk(KERN_INFO "%s: registered device mixer%d\n",
921 dev->name,dev->dmasound.minor_mixer >> 4); 921 dev->name,dev->dmasound.minor_mixer >> 4);
922 922
923 return 0; 923 return 0;
924 924
@@ -929,6 +929,31 @@ fail:
929 929
930} 930}
931 931
932static int oss_device_init(struct saa7134_dev *dev)
933{
934 dev->dmasound.priv_data = dev;
935 saa7134_oss_init1(dev);
936 saa7134_dsp_create(dev);
937 return 1;
938}
939
940static int oss_device_exit(struct saa7134_dev *dev)
941{
942
943 unregister_sound_mixer(dev->dmasound.minor_mixer);
944 unregister_sound_dsp(dev->dmasound.minor_dsp);
945
946 saa7134_oss_fini(dev);
947
948 if (dev->pci->irq > 0) {
949 synchronize_irq(dev->pci->irq);
950 free_irq(dev->pci->irq,&dev->dmasound);
951 }
952
953 dev->dmasound.priv_data = NULL;
954 return 1;
955}
956
932static int saa7134_oss_init(void) 957static int saa7134_oss_init(void)
933{ 958{
934 struct saa7134_dev *dev = NULL; 959 struct saa7134_dev *dev = NULL;
@@ -939,9 +964,7 @@ static int saa7134_oss_init(void)
939 list_for_each(list,&saa7134_devlist) { 964 list_for_each(list,&saa7134_devlist) {
940 dev = list_entry(list, struct saa7134_dev, devlist); 965 dev = list_entry(list, struct saa7134_dev, devlist);
941 if (dev->dmasound.priv_data == NULL) { 966 if (dev->dmasound.priv_data == NULL) {
942 dev->dmasound.priv_data = dev; 967 oss_device_init(dev);
943 saa7134_oss_init1(dev);
944 saa7134_dsp_create(dev);
945 } else { 968 } else {
946 printk(KERN_ERR "saa7134 OSS: DMA sound is being handled by ALSA, ignoring %s\n",dev->name); 969 printk(KERN_ERR "saa7134 OSS: DMA sound is being handled by ALSA, ignoring %s\n",dev->name);
947 return -EBUSY; 970 return -EBUSY;
@@ -951,11 +974,14 @@ static int saa7134_oss_init(void)
951 if (dev == NULL) 974 if (dev == NULL)
952 printk(KERN_INFO "saa7134 OSS: no saa7134 cards found\n"); 975 printk(KERN_INFO "saa7134 OSS: no saa7134 cards found\n");
953 976
977 dmasound_init = oss_device_init;
978 dmasound_exit = oss_device_exit;
979
954 return 0; 980 return 0;
955 981
956} 982}
957 983
958void saa7134_oss_exit(void) 984static void saa7134_oss_exit(void)
959{ 985{
960 struct saa7134_dev *dev = NULL; 986 struct saa7134_dev *dev = NULL;
961 struct list_head *list; 987 struct list_head *list;
@@ -967,18 +993,7 @@ void saa7134_oss_exit(void)
967 if (!dev->dmasound.minor_dsp) 993 if (!dev->dmasound.minor_dsp)
968 continue; 994 continue;
969 995
970 unregister_sound_mixer(dev->dmasound.minor_mixer); 996 oss_device_exit(dev);
971 unregister_sound_dsp(dev->dmasound.minor_dsp);
972
973 saa7134_oss_fini(dev);
974
975 if (dev->pci->irq > 0) {
976 synchronize_irq(dev->pci->irq);
977 free_irq(dev->pci->irq,&dev->dmasound);
978 }
979
980 dev->dmasound.priv_data = NULL;
981
982 } 997 }
983 998
984 printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n"); 999 printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n");
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
index 244e1973081c..add49db1ad41 100644
--- a/drivers/media/video/saa7134/saa7134.h
+++ b/drivers/media/video/saa7134/saa7134.h
@@ -571,6 +571,10 @@ void saa7134_dma_free(struct saa7134_dev *dev,struct saa7134_buf *buf);
571 571
572int saa7134_set_dmabits(struct saa7134_dev *dev); 572int saa7134_set_dmabits(struct saa7134_dev *dev);
573 573
574extern int (*dmasound_init)(struct saa7134_dev *dev);
575extern int (*dmasound_exit)(struct saa7134_dev *dev);
576
577
574/* ----------------------------------------------------------- */ 578/* ----------------------------------------------------------- */
575/* saa7134-cards.c */ 579/* saa7134-cards.c */
576 580
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c
index 72e8741e8b59..d95aecebbda3 100644
--- a/drivers/media/video/tveeprom.c
+++ b/drivers/media/video/tveeprom.c
@@ -81,7 +81,7 @@ hauppauge_tuner_fmt[] =
81 { 0x00000010, " PAL(I)" }, 81 { 0x00000010, " PAL(I)" },
82 { 0x00400000, " SECAM(L/L')" }, 82 { 0x00400000, " SECAM(L/L')" },
83 { 0x00000e00, " PAL(D/K)" }, 83 { 0x00000e00, " PAL(D/K)" },
84 { 0x03000000, " ATSC Digital" }, 84 { 0x03000000, " ATSC/DVB Digital" },
85}; 85};
86 86
87/* This is the full list of possible tuners. Many thanks to Hauppauge for 87/* This is the full list of possible tuners. Many thanks to Hauppauge for
@@ -209,13 +209,27 @@ hauppauge_tuner[] =
209 { TUNER_ABSENT, "Philips FMD1216ME"}, 209 { TUNER_ABSENT, "Philips FMD1216ME"},
210 { TUNER_TEA5767, "Philips TEA5768HL FM Radio"}, 210 { TUNER_TEA5767, "Philips TEA5768HL FM Radio"},
211 { TUNER_ABSENT, "Panasonic ENV57H12D5"}, 211 { TUNER_ABSENT, "Panasonic ENV57H12D5"},
212 { TUNER_ABSENT, "TCL MFNM05-4"}, 212 { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05-4"},
213 { TUNER_ABSENT, "TCL MNM05-4"}, 213 { TUNER_ABSENT, "TCL MNM05-4"},
214 { TUNER_PHILIPS_FM1216ME_MK3, "TCL MPE05-2"}, 214 { TUNER_PHILIPS_FM1216ME_MK3, "TCL MPE05-2"},
215 { TUNER_ABSENT, "TCL MQNM05-4"}, 215 { TUNER_ABSENT, "TCL MQNM05-4"},
216 { TUNER_ABSENT, "LG TAPC-W701D"}, 216 { TUNER_ABSENT, "LG TAPC-W701D"},
217 { TUNER_ABSENT, "TCL 9886P-WM"}, 217 { TUNER_ABSENT, "TCL 9886P-WM"},
218 { TUNER_ABSENT, "TCL 1676NM-WM"}, 218 { TUNER_ABSENT, "TCL 1676NM-WM"},
219 /* 110-119 */
220 { TUNER_ABSENT, "Thompson DTT75105"},
221 { TUNER_ABSENT, "Conexant_CX24109"},
222 { TUNER_ABSENT, "TCL M2523_5N_E"},
223 { TUNER_ABSENT, "TCL M2523_3DB_E"},
224 { TUNER_ABSENT, "Philips 8275A"},
225 { TUNER_ABSENT, "Microtune MT2060"},
226 { TUNER_ABSENT, "Philips FM1236 MK5"},
227 { TUNER_ABSENT, "Philips FM1216ME MK5"},
228 { TUNER_ABSENT, "TCL M2523_3DI_E"},
229 { TUNER_ABSENT, "Samsung THPD5222FG30A"},
230 /* 120-129 */
231 { TUNER_ABSENT, "Xceive XC3028"},
232 { TUNER_ABSENT, "Philips FQ1216LME MK5"},
219}; 233};
220 234
221static struct HAUPPAUGE_AUDIOIC 235static struct HAUPPAUGE_AUDIOIC
@@ -325,6 +339,7 @@ static int hasRadioTuner(int tunerType)
325 case 78: //PNPEnv_TUNER_TDA8275C1_8290_FM: 339 case 78: //PNPEnv_TUNER_TDA8275C1_8290_FM:
326 case 89: //PNPEnv_TUNER_TCL_MFPE05_2: 340 case 89: //PNPEnv_TUNER_TCL_MFPE05_2:
327 case 92: //PNPEnv_TUNER_PHILIPS_FQ1236A_MK4: 341 case 92: //PNPEnv_TUNER_PHILIPS_FQ1236A_MK4:
342 case 105:
328 return 1; 343 return 1;
329 } 344 }
330 return 0; 345 return 0;
@@ -368,10 +383,15 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
368 memset(tvee, 0, sizeof(*tvee)); 383 memset(tvee, 0, sizeof(*tvee));
369 done = len = beenhere = 0; 384 done = len = beenhere = 0;
370 385
371 /* Hack for processing eeprom for em28xx */ 386 /* Hack for processing eeprom for em28xx and cx 2388x*/
372 if ((eeprom_data[0]==0x1a)&&(eeprom_data[1]==0xeb)&& 387 if ((eeprom_data[0] == 0x1a) && (eeprom_data[1] == 0xeb) &&
373 (eeprom_data[2]==0x67)&&(eeprom_data[3]==0x95)) 388 (eeprom_data[2] == 0x67) && (eeprom_data[3] == 0x95))
374 start=0xa0; 389 start=0xa0; /* Generic em28xx offset */
390 else if (((eeprom_data[0] & 0xf0) == 0x10) &&
391 (eeprom_data[1] == 0x00) &&
392 (eeprom_data[2] == 0x00) &&
393 (eeprom_data[8] == 0x84))
394 start=8; /* Generic cx2388x offset */
375 else 395 else
376 start=0; 396 start=0;
377 397
@@ -448,6 +468,17 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
448 eeprom_data[i+5] + 468 eeprom_data[i+5] +
449 (eeprom_data[i+6] << 8) + 469 (eeprom_data[i+6] << 8) +
450 (eeprom_data[i+7] << 16); 470 (eeprom_data[i+7] << 16);
471
472 if ( (eeprom_data[i + 8] && 0xf0) &&
473 (tvee->serial_number < 0xffffff) ) {
474 tvee->MAC_address[0] = 0x00;
475 tvee->MAC_address[1] = 0x0D;
476 tvee->MAC_address[2] = 0xFE;
477 tvee->MAC_address[3] = eeprom_data[i + 7];
478 tvee->MAC_address[4] = eeprom_data[i + 6];
479 tvee->MAC_address[5] = eeprom_data[i + 5];
480 tvee->has_MAC_address = 1;
481 }
451 break; 482 break;
452 483
453 case 0x05: 484 case 0x05:
@@ -466,11 +497,14 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
466 case 0x06: 497 case 0x06:
467 /* tag 'ModelRev' */ 498 /* tag 'ModelRev' */
468 tvee->model = 499 tvee->model =
469 eeprom_data[i+1] + 500 eeprom_data[i + 1] +
470 (eeprom_data[i+2] << 8); 501 (eeprom_data[i + 2] << 8) +
471 tvee->revision = eeprom_data[i+5] + 502 (eeprom_data[i + 3] << 16) +
472 (eeprom_data[i+6] << 8) + 503 (eeprom_data[i + 4] << 24);
473 (eeprom_data[i+7] << 16); 504 tvee->revision =
505 eeprom_data[i +5 ] +
506 (eeprom_data[i + 6] << 8) +
507 (eeprom_data[i + 7] << 16);
474 break; 508 break;
475 509
476 case 0x07: 510 case 0x07:
@@ -563,6 +597,8 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
563 t_name2 = "unknown"; 597 t_name2 = "unknown";
564 } 598 }
565 599
600 tvee->tuner_hauppauge_model = tuner1;
601 tvee->tuner2_hauppauge_model = tuner2;
566 tvee->tuner_formats = 0; 602 tvee->tuner_formats = 0;
567 tvee->tuner2_formats = 0; 603 tvee->tuner2_formats = 0;
568 for (i = j = 0; i < 8; i++) { 604 for (i = j = 0; i < 8; i++) {
@@ -578,6 +614,12 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
578 614
579 tveeprom_info("Hauppauge model %d, rev %s, serial# %d\n", 615 tveeprom_info("Hauppauge model %d, rev %s, serial# %d\n",
580 tvee->model, tvee->rev_str, tvee->serial_number); 616 tvee->model, tvee->rev_str, tvee->serial_number);
617 if (tvee->has_MAC_address == 1) {
618 tveeprom_info("MAC address is %02X-%02X-%02X-%02X-%02X-%02X\n",
619 tvee->MAC_address[0], tvee->MAC_address[1],
620 tvee->MAC_address[2], tvee->MAC_address[3],
621 tvee->MAC_address[4], tvee->MAC_address[5]);
622 }
581 tveeprom_info("tuner model is %s (idx %d, type %d)\n", 623 tveeprom_info("tuner model is %s (idx %d, type %d)\n",
582 t_name1, tuner1, tvee->tuner_type); 624 t_name1, tuner1, tvee->tuner_type);
583 tveeprom_info("TV standards%s%s%s%s%s%s%s%s (eeprom 0x%02x)\n", 625 tveeprom_info("TV standards%s%s%s%s%s%s%s%s (eeprom 0x%02x)\n",
diff --git a/drivers/media/video/video-buf.c b/drivers/media/video/video-buf.c
index acfd3a103f35..9a6bf287e26a 100644
--- a/drivers/media/video/video-buf.c
+++ b/drivers/media/video/video-buf.c
@@ -753,10 +753,9 @@ videobuf_read_zerocopy(struct videobuf_queue *q, char __user *data,
753 int retval; 753 int retval;
754 754
755 /* setup stuff */ 755 /* setup stuff */
756 retval = -ENOMEM;
757 q->read_buf = videobuf_alloc(q->msize); 756 q->read_buf = videobuf_alloc(q->msize);
758 if (NULL == q->read_buf) 757 if (NULL == q->read_buf)
759 goto done; 758 return -ENOMEM;
760 759
761 q->read_buf->memory = V4L2_MEMORY_USERPTR; 760 q->read_buf->memory = V4L2_MEMORY_USERPTR;
762 q->read_buf->baddr = (unsigned long)data; 761 q->read_buf->baddr = (unsigned long)data;
@@ -817,10 +816,14 @@ ssize_t videobuf_read_one(struct videobuf_queue *q,
817 if (NULL == q->read_buf) 816 if (NULL == q->read_buf)
818 goto done; 817 goto done;
819 q->read_buf->memory = V4L2_MEMORY_USERPTR; 818 q->read_buf->memory = V4L2_MEMORY_USERPTR;
819 q->read_buf->bsize = count; /* preferred size */
820 field = videobuf_next_field(q); 820 field = videobuf_next_field(q);
821 retval = q->ops->buf_prepare(q,q->read_buf,field); 821 retval = q->ops->buf_prepare(q,q->read_buf,field);
822 if (0 != retval) 822 if (0 != retval) {
823 kfree (q->read_buf);
824 q->read_buf = NULL;
823 goto done; 825 goto done;
826 }
824 spin_lock_irqsave(q->irqlock,flags); 827 spin_lock_irqsave(q->irqlock,flags);
825 q->ops->buf_queue(q,q->read_buf); 828 q->ops->buf_queue(q,q->read_buf);
826 spin_unlock_irqrestore(q->irqlock,flags); 829 spin_unlock_irqrestore(q->irqlock,flags);
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index 83c49f9610d0..6de5b0094b82 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -76,14 +76,14 @@ static void video_release(struct class_device *cd)
76} 76}
77 77
78static struct class video_class = { 78static struct class video_class = {
79 .name = VIDEO_NAME, 79 .name = VIDEO_NAME,
80 .release = video_release, 80 .release = video_release,
81}; 81};
82 82
83/* 83/*
84 * Active devices 84 * Active devices
85 */ 85 */
86 86
87static struct video_device *video_device[VIDEO_NUM_DEVICES]; 87static struct video_device *video_device[VIDEO_NUM_DEVICES];
88static DECLARE_MUTEX(videodev_lock); 88static DECLARE_MUTEX(videodev_lock);
89 89
@@ -101,7 +101,7 @@ static int video_open(struct inode *inode, struct file *file)
101 int err = 0; 101 int err = 0;
102 struct video_device *vfl; 102 struct video_device *vfl;
103 struct file_operations *old_fops; 103 struct file_operations *old_fops;
104 104
105 if(minor>=VIDEO_NUM_DEVICES) 105 if(minor>=VIDEO_NUM_DEVICES)
106 return -ENODEV; 106 return -ENODEV;
107 down(&videodev_lock); 107 down(&videodev_lock);
@@ -189,7 +189,7 @@ video_usercopy(struct inode *inode, struct file *file,
189 return -ENOMEM; 189 return -ENOMEM;
190 parg = mbuf; 190 parg = mbuf;
191 } 191 }
192 192
193 err = -EFAULT; 193 err = -EFAULT;
194 if (_IOC_DIR(cmd) & _IOC_WRITE) 194 if (_IOC_DIR(cmd) & _IOC_WRITE)
195 if (copy_from_user(parg, (void __user *)arg, _IOC_SIZE(cmd))) 195 if (copy_from_user(parg, (void __user *)arg, _IOC_SIZE(cmd)))
@@ -240,7 +240,7 @@ int video_exclusive_open(struct inode *inode, struct file *file)
240int video_exclusive_release(struct inode *inode, struct file *file) 240int video_exclusive_release(struct inode *inode, struct file *file)
241{ 241{
242 struct video_device *vfl = video_devdata(file); 242 struct video_device *vfl = video_devdata(file);
243 243
244 vfl->users--; 244 vfl->users--;
245 return 0; 245 return 0;
246} 246}
@@ -253,7 +253,7 @@ static struct file_operations video_fops;
253 * @type: type of device to register 253 * @type: type of device to register
254 * @nr: which device number (0 == /dev/video0, 1 == /dev/video1, ... 254 * @nr: which device number (0 == /dev/video0, 1 == /dev/video1, ...
255 * -1 == first free) 255 * -1 == first free)
256 * 256 *
257 * The registration code assigns minor numbers based on the type 257 * The registration code assigns minor numbers based on the type
258 * requested. -ENFILE is returned in all the device slots for this 258 * requested. -ENFILE is returned in all the device slots for this
259 * category are full. If not then the minor field is set and the 259 * category are full. If not then the minor field is set and the
@@ -269,7 +269,7 @@ static struct file_operations video_fops;
269 * 269 *
270 * %VFL_TYPE_VBI - Vertical blank data (undecoded) 270 * %VFL_TYPE_VBI - Vertical blank data (undecoded)
271 * 271 *
272 * %VFL_TYPE_RADIO - A radio card 272 * %VFL_TYPE_RADIO - A radio card
273 */ 273 */
274 274
275int video_register_device(struct video_device *vfd, int type, int nr) 275int video_register_device(struct video_device *vfd, int type, int nr)
@@ -278,7 +278,7 @@ int video_register_device(struct video_device *vfd, int type, int nr)
278 int base; 278 int base;
279 int end; 279 int end;
280 char *name_base; 280 char *name_base;
281 281
282 switch(type) 282 switch(type)
283 { 283 {
284 case VFL_TYPE_GRABBER: 284 case VFL_TYPE_GRABBER:
@@ -293,7 +293,7 @@ int video_register_device(struct video_device *vfd, int type, int nr)
293 break; 293 break;
294 case VFL_TYPE_VBI: 294 case VFL_TYPE_VBI:
295 base=224; 295 base=224;
296 end=240; 296 end=256;
297 name_base = "vbi"; 297 name_base = "vbi";
298 break; 298 break;
299 case VFL_TYPE_RADIO: 299 case VFL_TYPE_RADIO:
@@ -334,7 +334,7 @@ int video_register_device(struct video_device *vfd, int type, int nr)
334 init_MUTEX(&vfd->lock); 334 init_MUTEX(&vfd->lock);
335 335
336 /* sysfs class */ 336 /* sysfs class */
337 memset(&vfd->class_dev, 0x00, sizeof(vfd->class_dev)); 337 memset(&vfd->class_dev, 0x00, sizeof(vfd->class_dev));
338 if (vfd->dev) 338 if (vfd->dev)
339 vfd->class_dev.dev = vfd->dev; 339 vfd->class_dev.dev = vfd->dev;
340 vfd->class_dev.class = &video_class; 340 vfd->class_dev.class = &video_class;
@@ -360,7 +360,7 @@ int video_register_device(struct video_device *vfd, int type, int nr)
360 * This unregisters the passed device and deassigns the minor 360 * This unregisters the passed device and deassigns the minor
361 * number. Future open calls will be met with errors. 361 * number. Future open calls will be met with errors.
362 */ 362 */
363 363
364void video_unregister_device(struct video_device *vfd) 364void video_unregister_device(struct video_device *vfd)
365{ 365{
366 down(&videodev_lock); 366 down(&videodev_lock);
@@ -384,7 +384,7 @@ static struct file_operations video_fops=
384/* 384/*
385 * Initialise video for linux 385 * Initialise video for linux
386 */ 386 */
387 387
388static int __init videodev_init(void) 388static int __init videodev_init(void)
389{ 389{
390 int ret; 390 int ret;
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 74022316fc63..4262a22adc22 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -91,9 +91,9 @@ static int mfcounter = 0;
91 * Public data... 91 * Public data...
92 */ 92 */
93int mpt_lan_index = -1; 93int mpt_lan_index = -1;
94static int mpt_stm_index = -1; 94int mpt_stm_index = -1;
95 95
96static struct proc_dir_entry *mpt_proc_root_dir; 96struct proc_dir_entry *mpt_proc_root_dir;
97 97
98#define WHOINIT_UNKNOWN 0xAA 98#define WHOINIT_UNKNOWN 0xAA
99 99
@@ -1118,6 +1118,65 @@ mpt_verify_adapter(int iocid, MPT_ADAPTER **iocpp)
1118 return -1; 1118 return -1;
1119} 1119}
1120 1120
1121int
1122mpt_alt_ioc_wait(MPT_ADAPTER *ioc)
1123{
1124 int loop_count = 30 * 4; /* Wait 30 seconds */
1125 int status = -1; /* -1 means failed to get board READY */
1126
1127 do {
1128 spin_lock(&ioc->initializing_hba_lock);
1129 if (ioc->initializing_hba_lock_flag == 0) {
1130 ioc->initializing_hba_lock_flag=1;
1131 spin_unlock(&ioc->initializing_hba_lock);
1132 status = 0;
1133 break;
1134 }
1135 spin_unlock(&ioc->initializing_hba_lock);
1136 set_current_state(TASK_INTERRUPTIBLE);
1137 schedule_timeout(HZ/4);
1138 } while (--loop_count);
1139
1140 return status;
1141}
1142
1143/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
1144/*
1145 * mpt_bringup_adapter - This is a wrapper function for mpt_do_ioc_recovery
1146 * @ioc: Pointer to MPT adapter structure
1147 * @sleepFlag: Use schedule if CAN_SLEEP else use udelay.
1148 *
1149 * This routine performs all the steps necessary to bring the IOC
1150 * to a OPERATIONAL state.
1151 *
1152 * Special Note: This function was added with spin lock's so as to allow
1153 * the dv(domain validation) work thread to succeed on the other channel
1154 * that maybe occuring at the same time when this function is called.
1155 * Without this lock, the dv would fail when message frames were
1156 * requested during hba bringup on the alternate ioc.
1157 */
1158static int
1159mpt_bringup_adapter(MPT_ADAPTER *ioc, int sleepFlag)
1160{
1161 int r;
1162
1163 if(ioc->alt_ioc) {
1164 if((r=mpt_alt_ioc_wait(ioc->alt_ioc)!=0))
1165 return r;
1166 }
1167
1168 r = mpt_do_ioc_recovery(ioc, MPT_HOSTEVENT_IOC_BRINGUP,
1169 CAN_SLEEP);
1170
1171 if(ioc->alt_ioc) {
1172 spin_lock(&ioc->alt_ioc->initializing_hba_lock);
1173 ioc->alt_ioc->initializing_hba_lock_flag=0;
1174 spin_unlock(&ioc->alt_ioc->initializing_hba_lock);
1175 }
1176
1177return r;
1178}
1179
1121/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 1180/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
1122/* 1181/*
1123 * mpt_attach - Install a PCI intelligent MPT adapter. 1182 * mpt_attach - Install a PCI intelligent MPT adapter.
@@ -1186,6 +1245,7 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
1186 ioc->pcidev = pdev; 1245 ioc->pcidev = pdev;
1187 ioc->diagPending = 0; 1246 ioc->diagPending = 0;
1188 spin_lock_init(&ioc->diagLock); 1247 spin_lock_init(&ioc->diagLock);
1248 spin_lock_init(&ioc->initializing_hba_lock);
1189 1249
1190 /* Initialize the event logging. 1250 /* Initialize the event logging.
1191 */ 1251 */
@@ -1408,8 +1468,7 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
1408 */ 1468 */
1409 mpt_detect_bound_ports(ioc, pdev); 1469 mpt_detect_bound_ports(ioc, pdev);
1410 1470
1411 if ((r = mpt_do_ioc_recovery(ioc, 1471 if ((r = mpt_bringup_adapter(ioc, CAN_SLEEP)) != 0){
1412 MPT_HOSTEVENT_IOC_BRINGUP, CAN_SLEEP)) != 0) {
1413 printk(KERN_WARNING MYNAM 1472 printk(KERN_WARNING MYNAM
1414 ": WARNING - %s did not initialize properly! (%d)\n", 1473 ": WARNING - %s did not initialize properly! (%d)\n",
1415 ioc->name, r); 1474 ioc->name, r);
@@ -6271,6 +6330,7 @@ EXPORT_SYMBOL(mpt_resume);
6271EXPORT_SYMBOL(mpt_suspend); 6330EXPORT_SYMBOL(mpt_suspend);
6272#endif 6331#endif
6273EXPORT_SYMBOL(ioc_list); 6332EXPORT_SYMBOL(ioc_list);
6333EXPORT_SYMBOL(mpt_proc_root_dir);
6274EXPORT_SYMBOL(mpt_register); 6334EXPORT_SYMBOL(mpt_register);
6275EXPORT_SYMBOL(mpt_deregister); 6335EXPORT_SYMBOL(mpt_deregister);
6276EXPORT_SYMBOL(mpt_event_register); 6336EXPORT_SYMBOL(mpt_event_register);
@@ -6288,6 +6348,7 @@ EXPORT_SYMBOL(mpt_verify_adapter);
6288EXPORT_SYMBOL(mpt_GetIocState); 6348EXPORT_SYMBOL(mpt_GetIocState);
6289EXPORT_SYMBOL(mpt_print_ioc_summary); 6349EXPORT_SYMBOL(mpt_print_ioc_summary);
6290EXPORT_SYMBOL(mpt_lan_index); 6350EXPORT_SYMBOL(mpt_lan_index);
6351EXPORT_SYMBOL(mpt_stm_index);
6291EXPORT_SYMBOL(mpt_HardResetHandler); 6352EXPORT_SYMBOL(mpt_HardResetHandler);
6292EXPORT_SYMBOL(mpt_config); 6353EXPORT_SYMBOL(mpt_config);
6293EXPORT_SYMBOL(mpt_toolbox); 6354EXPORT_SYMBOL(mpt_toolbox);
@@ -6296,6 +6357,7 @@ EXPORT_SYMBOL(mpt_read_ioc_pg_3);
6296EXPORT_SYMBOL(mpt_alloc_fw_memory); 6357EXPORT_SYMBOL(mpt_alloc_fw_memory);
6297EXPORT_SYMBOL(mpt_free_fw_memory); 6358EXPORT_SYMBOL(mpt_free_fw_memory);
6298EXPORT_SYMBOL(mptbase_sas_persist_operation); 6359EXPORT_SYMBOL(mptbase_sas_persist_operation);
6360EXPORT_SYMBOL(mpt_alt_ioc_wait);
6299 6361
6300 6362
6301/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 6363/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h
index 8ad277a9afa1..bac8eb4186d2 100644
--- a/drivers/message/fusion/mptbase.h
+++ b/drivers/message/fusion/mptbase.h
@@ -611,6 +611,8 @@ typedef struct _MPT_ADAPTER
611 int DoneCtx; 611 int DoneCtx;
612 int TaskCtx; 612 int TaskCtx;
613 int InternalCtx; 613 int InternalCtx;
614 spinlock_t initializing_hba_lock;
615 int initializing_hba_lock_flag;
614 struct list_head list; 616 struct list_head list;
615 struct net_device *netdev; 617 struct net_device *netdev;
616 struct list_head sas_topology; 618 struct list_head sas_topology;
@@ -1001,13 +1003,16 @@ extern void mpt_free_fw_memory(MPT_ADAPTER *ioc);
1001extern int mpt_findImVolumes(MPT_ADAPTER *ioc); 1003extern int mpt_findImVolumes(MPT_ADAPTER *ioc);
1002extern int mpt_read_ioc_pg_3(MPT_ADAPTER *ioc); 1004extern int mpt_read_ioc_pg_3(MPT_ADAPTER *ioc);
1003extern int mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode); 1005extern int mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode);
1006extern int mpt_alt_ioc_wait(MPT_ADAPTER *ioc);
1004 1007
1005/* 1008/*
1006 * Public data decl's... 1009 * Public data decl's...
1007 */ 1010 */
1008extern struct list_head ioc_list; 1011extern struct list_head ioc_list;
1012extern struct proc_dir_entry *mpt_proc_root_dir;
1009 1013
1010extern int mpt_lan_index; /* needed by mptlan.c */ 1014extern int mpt_lan_index; /* needed by mptlan.c */
1015extern int mpt_stm_index; /* needed by mptstm.c */
1011 1016
1012/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 1017/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
1013#endif /* } __KERNEL__ */ 1018#endif /* } __KERNEL__ */
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 4330ed0cedaa..b7b9846ff3fd 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -4162,6 +4162,12 @@ mptscsih_domainValidation(void *arg)
4162 } 4162 }
4163 } 4163 }
4164 4164
4165 if(mpt_alt_ioc_wait(hd->ioc)!=0) {
4166 ddvprintk((MYIOC_s_WARN_FMT "alt_ioc busy!\n",
4167 hd->ioc->name));
4168 continue;
4169 }
4170
4165 if (mptscsih_doDv(hd, 0, id) == 1) { 4171 if (mptscsih_doDv(hd, 0, id) == 1) {
4166 /* Untagged device was busy, try again 4172 /* Untagged device was busy, try again
4167 */ 4173 */
@@ -4173,6 +4179,10 @@ mptscsih_domainValidation(void *arg)
4173 hd->ioc->spi_data.dvStatus[id] &= ~(MPT_SCSICFG_DV_NOT_DONE | MPT_SCSICFG_DV_PENDING); 4179 hd->ioc->spi_data.dvStatus[id] &= ~(MPT_SCSICFG_DV_NOT_DONE | MPT_SCSICFG_DV_PENDING);
4174 } 4180 }
4175 4181
4182 spin_lock(&hd->ioc->initializing_hba_lock);
4183 hd->ioc->initializing_hba_lock_flag=0;
4184 spin_unlock(&hd->ioc->initializing_hba_lock);
4185
4176 if (isPhysDisk) { 4186 if (isPhysDisk) {
4177 for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++) { 4187 for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++) {
4178 if (hd->ioc->raid_data.isRaid & (1 << ii)) { 4188 if (hd->ioc->raid_data.isRaid & (1 << ii)) {
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c
index 66c03e882570..81ef306cb124 100644
--- a/drivers/message/i2o/pci.c
+++ b/drivers/message/i2o/pci.c
@@ -421,8 +421,8 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
421 i2o_pci_free(c); 421 i2o_pci_free(c);
422 422
423 free_controller: 423 free_controller:
424 i2o_iop_free(c);
425 put_device(c->device.parent); 424 put_device(c->device.parent);
425 i2o_iop_free(c);
426 426
427 disable: 427 disable:
428 pci_disable_device(pdev); 428 pci_disable_device(pdev);
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index da528390acf8..d336a1d65dc7 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -816,7 +816,7 @@ static void mmc_discover_cards(struct mmc_host *host)
816 816
817 cmd.opcode = SD_SEND_RELATIVE_ADDR; 817 cmd.opcode = SD_SEND_RELATIVE_ADDR;
818 cmd.arg = 0; 818 cmd.arg = 0;
819 cmd.flags = MMC_RSP_R1; 819 cmd.flags = MMC_RSP_R6;
820 820
821 err = mmc_wait_for_cmd(host, &cmd, CMD_RETRIES); 821 err = mmc_wait_for_cmd(host, &cmd, CMD_RETRIES);
822 if (err != MMC_ERR_NONE) 822 if (err != MMC_ERR_NONE)
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 143f01a4c170..69c04945591f 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -4,7 +4,7 @@
4 * 4 *
5 * (C) 2000 Red Hat. GPL'd 5 * (C) 2000 Red Hat. GPL'd
6 * 6 *
7 * $Id: cfi_cmdset_0001.c,v 1.185 2005/11/07 11:14:22 gleixner Exp $ 7 * $Id: cfi_cmdset_0001.c,v 1.186 2005/11/23 22:07:52 nico Exp $
8 * 8 *
9 * 9 *
10 * 10/10/2000 Nicolas Pitre <nico@cam.org> 10 * 10/10/2000 Nicolas Pitre <nico@cam.org>
@@ -644,9 +644,8 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr
644 * 644 *
645 * - contension arbitration is handled in the owner's context. 645 * - contension arbitration is handled in the owner's context.
646 * 646 *
647 * The 'shared' struct can be read when its lock is taken. 647 * The 'shared' struct can be read and/or written only when
648 * However any writes to it can only be made when the current 648 * its lock is taken.
649 * owner's lock is also held.
650 */ 649 */
651 struct flchip_shared *shared = chip->priv; 650 struct flchip_shared *shared = chip->priv;
652 struct flchip *contender; 651 struct flchip *contender;
@@ -675,14 +674,13 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr
675 } 674 }
676 timeo = jiffies + HZ; 675 timeo = jiffies + HZ;
677 spin_lock(&shared->lock); 676 spin_lock(&shared->lock);
677 spin_unlock(contender->mutex);
678 } 678 }
679 679
680 /* We now own it */ 680 /* We now own it */
681 shared->writing = chip; 681 shared->writing = chip;
682 if (mode == FL_ERASING) 682 if (mode == FL_ERASING)
683 shared->erasing = chip; 683 shared->erasing = chip;
684 if (contender && contender != chip)
685 spin_unlock(contender->mutex);
686 spin_unlock(&shared->lock); 684 spin_unlock(&shared->lock);
687 } 685 }
688 686
diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c
index 90eb30e06b7c..e636aa86bc24 100644
--- a/drivers/mtd/chips/cfi_probe.c
+++ b/drivers/mtd/chips/cfi_probe.c
@@ -1,7 +1,7 @@
1/* 1/*
2 Common Flash Interface probe code. 2 Common Flash Interface probe code.
3 (C) 2000 Red Hat. GPL'd. 3 (C) 2000 Red Hat. GPL'd.
4 $Id: cfi_probe.c,v 1.84 2005/11/07 11:14:23 gleixner Exp $ 4 $Id: cfi_probe.c,v 1.86 2005/11/29 14:48:31 gleixner Exp $
5*/ 5*/
6 6
7#include <linux/config.h> 7#include <linux/config.h>
@@ -230,8 +230,8 @@ static int __xipram cfi_chip_setup(struct map_info *map,
230 cfi_send_gen_cmd(0xaa, 0x555, base, map, cfi, cfi->device_type, NULL); 230 cfi_send_gen_cmd(0xaa, 0x555, base, map, cfi, cfi->device_type, NULL);
231 cfi_send_gen_cmd(0x55, 0x2aa, base, map, cfi, cfi->device_type, NULL); 231 cfi_send_gen_cmd(0x55, 0x2aa, base, map, cfi, cfi->device_type, NULL);
232 cfi_send_gen_cmd(0x90, 0x555, base, map, cfi, cfi->device_type, NULL); 232 cfi_send_gen_cmd(0x90, 0x555, base, map, cfi, cfi->device_type, NULL);
233 cfi->mfr = cfi_read_query(map, base); 233 cfi->mfr = cfi_read_query16(map, base);
234 cfi->id = cfi_read_query(map, base + ofs_factor); 234 cfi->id = cfi_read_query16(map, base + ofs_factor);
235 235
236 /* Put it back into Read Mode */ 236 /* Put it back into Read Mode */
237 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); 237 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
@@ -426,7 +426,7 @@ static struct mtd_chip_driver cfi_chipdrv = {
426 .module = THIS_MODULE 426 .module = THIS_MODULE
427}; 427};
428 428
429int __init cfi_probe_init(void) 429static int __init cfi_probe_init(void)
430{ 430{
431 register_mtd_chip_driver(&cfi_chipdrv); 431 register_mtd_chip_driver(&cfi_chipdrv);
432 return 0; 432 return 0;
diff --git a/drivers/mtd/chips/sharp.c b/drivers/mtd/chips/sharp.c
index 2d26bdef82d5..36f61a6a766e 100644
--- a/drivers/mtd/chips/sharp.c
+++ b/drivers/mtd/chips/sharp.c
@@ -4,7 +4,7 @@
4 * Copyright 2000,2001 David A. Schleef <ds@schleef.org> 4 * Copyright 2000,2001 David A. Schleef <ds@schleef.org>
5 * 2000,2001 Lineo, Inc. 5 * 2000,2001 Lineo, Inc.
6 * 6 *
7 * $Id: sharp.c,v 1.16 2005/11/07 11:14:23 gleixner Exp $ 7 * $Id: sharp.c,v 1.17 2005/11/29 14:28:28 gleixner Exp $
8 * 8 *
9 * Devices supported: 9 * Devices supported:
10 * LH28F016SCT Symmetrical block flash memory, 2Mx8 10 * LH28F016SCT Symmetrical block flash memory, 2Mx8
@@ -160,22 +160,28 @@ struct mtd_info *sharp_probe(struct map_info *map)
160 return mtd; 160 return mtd;
161} 161}
162 162
163static inline void sharp_send_cmd(struct map_info *map, unsigned long cmd, unsigned long adr)
164{
165 map_word map_cmd;
166 map_cmd.x[0] = cmd;
167 map_write(map, map_cmd, adr);
168}
169
163static int sharp_probe_map(struct map_info *map,struct mtd_info *mtd) 170static int sharp_probe_map(struct map_info *map,struct mtd_info *mtd)
164{ 171{
165 unsigned long tmp; 172 map_word tmp, read0, read4;
166 unsigned long base = 0; 173 unsigned long base = 0;
167 u32 read0, read4;
168 int width = 4; 174 int width = 4;
169 175
170 tmp = map_read32(map, base+0); 176 tmp = map_read(map, base+0);
171 177
172 map_write32(map, CMD_READ_ID, base+0); 178 sharp_send_cmd(map, CMD_READ_ID, base+0);
173 179
174 read0=map_read32(map, base+0); 180 read0 = map_read(map, base+0);
175 read4=map_read32(map, base+4); 181 read4 = map_read(map, base+4);
176 if(read0 == 0x89898989){ 182 if(read0.x[0] == 0x89898989){
177 printk("Looks like sharp flash\n"); 183 printk("Looks like sharp flash\n");
178 switch(read4){ 184 switch(read4.x[0]){
179 case 0xaaaaaaaa: 185 case 0xaaaaaaaa:
180 case 0xa0a0a0a0: 186 case 0xa0a0a0a0:
181 /* aa - LH28F016SCT-L95 2Mx8, 32 64k blocks*/ 187 /* aa - LH28F016SCT-L95 2Mx8, 32 64k blocks*/
@@ -197,16 +203,16 @@ static int sharp_probe_map(struct map_info *map,struct mtd_info *mtd)
197 return width; 203 return width;
198#endif 204#endif
199 default: 205 default:
200 printk("Sort-of looks like sharp flash, 0x%08x 0x%08x\n", 206 printk("Sort-of looks like sharp flash, 0x%08lx 0x%08lx\n",
201 read0,read4); 207 read0.x[0], read4.x[0]);
202 } 208 }
203 }else if((map_read32(map, base+0) == CMD_READ_ID)){ 209 }else if((map_read(map, base+0).x[0] == CMD_READ_ID)){
204 /* RAM, probably */ 210 /* RAM, probably */
205 printk("Looks like RAM\n"); 211 printk("Looks like RAM\n");
206 map_write32(map, tmp, base+0); 212 map_write(map, tmp, base+0);
207 }else{ 213 }else{
208 printk("Doesn't look like sharp flash, 0x%08x 0x%08x\n", 214 printk("Doesn't look like sharp flash, 0x%08lx 0x%08lx\n",
209 read0,read4); 215 read0.x[0], read4.x[0]);
210 } 216 }
211 217
212 return 0; 218 return 0;
@@ -215,7 +221,8 @@ static int sharp_probe_map(struct map_info *map,struct mtd_info *mtd)
215/* This function returns with the chip->mutex lock held. */ 221/* This function returns with the chip->mutex lock held. */
216static int sharp_wait(struct map_info *map, struct flchip *chip) 222static int sharp_wait(struct map_info *map, struct flchip *chip)
217{ 223{
218 int status, i; 224 int i;
225 map_word status;
219 unsigned long timeo = jiffies + HZ; 226 unsigned long timeo = jiffies + HZ;
220 DECLARE_WAITQUEUE(wait, current); 227 DECLARE_WAITQUEUE(wait, current);
221 int adr = 0; 228 int adr = 0;
@@ -225,12 +232,12 @@ retry:
225 232
226 switch(chip->state){ 233 switch(chip->state){
227 case FL_READY: 234 case FL_READY:
228 map_write32(map,CMD_READ_STATUS,adr); 235 sharp_send_cmd(map, CMD_READ_STATUS, adr);
229 chip->state = FL_STATUS; 236 chip->state = FL_STATUS;
230 case FL_STATUS: 237 case FL_STATUS:
231 for(i=0;i<100;i++){ 238 for(i=0;i<100;i++){
232 status = map_read32(map,adr); 239 status = map_read(map, adr);
233 if((status & SR_READY)==SR_READY) 240 if((status.x[0] & SR_READY)==SR_READY)
234 break; 241 break;
235 udelay(1); 242 udelay(1);
236 } 243 }
@@ -254,7 +261,7 @@ retry:
254 goto retry; 261 goto retry;
255 } 262 }
256 263
257 map_write32(map,CMD_RESET, adr); 264 sharp_send_cmd(map, CMD_RESET, adr);
258 265
259 chip->state = FL_READY; 266 chip->state = FL_READY;
260 267
@@ -351,37 +358,39 @@ static int sharp_write_oneword(struct map_info *map, struct flchip *chip,
351 int timeo; 358 int timeo;
352 int try; 359 int try;
353 int i; 360 int i;
354 int status = 0; 361 map_word data, status;
355 362
363 status.x[0] = 0;
356 ret = sharp_wait(map,chip); 364 ret = sharp_wait(map,chip);
357 365
358 for(try=0;try<10;try++){ 366 for(try=0;try<10;try++){
359 map_write32(map,CMD_BYTE_WRITE,adr); 367 sharp_send_cmd(map, CMD_BYTE_WRITE, adr);
360 /* cpu_to_le32 -> hack to fix the writel be->le conversion */ 368 /* cpu_to_le32 -> hack to fix the writel be->le conversion */
361 map_write32(map,cpu_to_le32(datum),adr); 369 data.x[0] = cpu_to_le32(datum);
370 map_write(map, data, adr);
362 371
363 chip->state = FL_WRITING; 372 chip->state = FL_WRITING;
364 373
365 timeo = jiffies + (HZ/2); 374 timeo = jiffies + (HZ/2);
366 375
367 map_write32(map,CMD_READ_STATUS,adr); 376 sharp_send_cmd(map, CMD_READ_STATUS, adr);
368 for(i=0;i<100;i++){ 377 for(i=0;i<100;i++){
369 status = map_read32(map,adr); 378 status = map_read(map, adr);
370 if((status & SR_READY)==SR_READY) 379 if((status.x[0] & SR_READY) == SR_READY)
371 break; 380 break;
372 } 381 }
373 if(i==100){ 382 if(i==100){
374 printk("sharp: timed out writing\n"); 383 printk("sharp: timed out writing\n");
375 } 384 }
376 385
377 if(!(status&SR_ERRORS)) 386 if(!(status.x[0] & SR_ERRORS))
378 break; 387 break;
379 388
380 printk("sharp: error writing byte at addr=%08lx status=%08x\n",adr,status); 389 printk("sharp: error writing byte at addr=%08lx status=%08lx\n", adr, status.x[0]);
381 390
382 map_write32(map,CMD_CLEAR_STATUS,adr); 391 sharp_send_cmd(map, CMD_CLEAR_STATUS, adr);
383 } 392 }
384 map_write32(map,CMD_RESET,adr); 393 sharp_send_cmd(map, CMD_RESET, adr);
385 chip->state = FL_READY; 394 chip->state = FL_READY;
386 395
387 wake_up(&chip->wq); 396 wake_up(&chip->wq);
@@ -434,18 +443,18 @@ static int sharp_do_wait_for_ready(struct map_info *map, struct flchip *chip,
434{ 443{
435 int ret; 444 int ret;
436 unsigned long timeo; 445 unsigned long timeo;
437 int status; 446 map_word status;
438 DECLARE_WAITQUEUE(wait, current); 447 DECLARE_WAITQUEUE(wait, current);
439 448
440 map_write32(map,CMD_READ_STATUS,adr); 449 sharp_send_cmd(map, CMD_READ_STATUS, adr);
441 status = map_read32(map,adr); 450 status = map_read(map, adr);
442 451
443 timeo = jiffies + HZ; 452 timeo = jiffies + HZ;
444 453
445 while(time_before(jiffies, timeo)){ 454 while(time_before(jiffies, timeo)){
446 map_write32(map,CMD_READ_STATUS,adr); 455 sharp_send_cmd(map, CMD_READ_STATUS, adr);
447 status = map_read32(map,adr); 456 status = map_read(map, adr);
448 if((status & SR_READY)==SR_READY){ 457 if((status.x[0] & SR_READY)==SR_READY){
449 ret = 0; 458 ret = 0;
450 goto out; 459 goto out;
451 } 460 }
@@ -476,7 +485,7 @@ static int sharp_erase_oneblock(struct map_info *map, struct flchip *chip,
476{ 485{
477 int ret; 486 int ret;
478 //int timeo; 487 //int timeo;
479 int status; 488 map_word status;
480 //int i; 489 //int i;
481 490
482//printk("sharp_erase_oneblock()\n"); 491//printk("sharp_erase_oneblock()\n");
@@ -486,26 +495,26 @@ static int sharp_erase_oneblock(struct map_info *map, struct flchip *chip,
486 sharp_unlock_oneblock(map,chip,adr); 495 sharp_unlock_oneblock(map,chip,adr);
487#endif 496#endif
488 497
489 map_write32(map,CMD_BLOCK_ERASE_1,adr); 498 sharp_send_cmd(map, CMD_BLOCK_ERASE_1, adr);
490 map_write32(map,CMD_BLOCK_ERASE_2,adr); 499 sharp_send_cmd(map, CMD_BLOCK_ERASE_2, adr);
491 500
492 chip->state = FL_ERASING; 501 chip->state = FL_ERASING;
493 502
494 ret = sharp_do_wait_for_ready(map,chip,adr); 503 ret = sharp_do_wait_for_ready(map,chip,adr);
495 if(ret<0)return ret; 504 if(ret<0)return ret;
496 505
497 map_write32(map,CMD_READ_STATUS,adr); 506 sharp_send_cmd(map, CMD_READ_STATUS, adr);
498 status = map_read32(map,adr); 507 status = map_read(map, adr);
499 508
500 if(!(status&SR_ERRORS)){ 509 if(!(status.x[0] & SR_ERRORS)){
501 map_write32(map,CMD_RESET,adr); 510 sharp_send_cmd(map, CMD_RESET, adr);
502 chip->state = FL_READY; 511 chip->state = FL_READY;
503 //spin_unlock_bh(chip->mutex); 512 //spin_unlock_bh(chip->mutex);
504 return 0; 513 return 0;
505 } 514 }
506 515
507 printk("sharp: error erasing block at addr=%08lx status=%08x\n",adr,status); 516 printk("sharp: error erasing block at addr=%08lx status=%08lx\n", adr, status.x[0]);
508 map_write32(map,CMD_CLEAR_STATUS,adr); 517 sharp_send_cmd(map, CMD_CLEAR_STATUS, adr);
509 518
510 //spin_unlock_bh(chip->mutex); 519 //spin_unlock_bh(chip->mutex);
511 520
@@ -517,20 +526,20 @@ static void sharp_unlock_oneblock(struct map_info *map, struct flchip *chip,
517 unsigned long adr) 526 unsigned long adr)
518{ 527{
519 int i; 528 int i;
520 int status; 529 map_word status;
521 530
522 map_write32(map,CMD_CLEAR_BLOCK_LOCKS_1,adr); 531 sharp_send_cmd(map, CMD_CLEAR_BLOCK_LOCKS_1, adr);
523 map_write32(map,CMD_CLEAR_BLOCK_LOCKS_2,adr); 532 sharp_send_cmd(map, CMD_CLEAR_BLOCK_LOCKS_2, adr);
524 533
525 udelay(100); 534 udelay(100);
526 535
527 status = map_read32(map,adr); 536 status = map_read(map, adr);
528 printk("status=%08x\n",status); 537 printk("status=%08lx\n", status.x[0]);
529 538
530 for(i=0;i<1000;i++){ 539 for(i=0;i<1000;i++){
531 //map_write32(map,CMD_READ_STATUS,adr); 540 //sharp_send_cmd(map, CMD_READ_STATUS, adr);
532 status = map_read32(map,adr); 541 status = map_read(map, adr);
533 if((status & SR_READY)==SR_READY) 542 if((status.x[0] & SR_READY) == SR_READY)
534 break; 543 break;
535 udelay(100); 544 udelay(100);
536 } 545 }
@@ -538,14 +547,14 @@ static void sharp_unlock_oneblock(struct map_info *map, struct flchip *chip,
538 printk("sharp: timed out unlocking block\n"); 547 printk("sharp: timed out unlocking block\n");
539 } 548 }
540 549
541 if(!(status&SR_ERRORS)){ 550 if(!(status.x[0] & SR_ERRORS)){
542 map_write32(map,CMD_RESET,adr); 551 sharp_send_cmd(map, CMD_RESET, adr);
543 chip->state = FL_READY; 552 chip->state = FL_READY;
544 return; 553 return;
545 } 554 }
546 555
547 printk("sharp: error unlocking block at addr=%08lx status=%08x\n",adr,status); 556 printk("sharp: error unlocking block at addr=%08lx status=%08lx\n", adr, status.x[0]);
548 map_write32(map,CMD_CLEAR_STATUS,adr); 557 sharp_send_cmd(map, CMD_CLEAR_STATUS, adr);
549} 558}
550#endif 559#endif
551 560
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
index 0aaa0ced9aba..7ff403b2a0a0 100644
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * $Id: block2mtd.c,v 1.29 2005/11/07 11:14:24 gleixner Exp $ 2 * $Id: block2mtd.c,v 1.30 2005/11/29 14:48:32 gleixner Exp $
3 * 3 *
4 * block2mtd.c - create an mtd from a block device 4 * block2mtd.c - create an mtd from a block device
5 * 5 *
@@ -19,7 +19,7 @@
19#include <linux/mtd/mtd.h> 19#include <linux/mtd/mtd.h>
20#include <linux/buffer_head.h> 20#include <linux/buffer_head.h>
21 21
22#define VERSION "$Revision: 1.29 $" 22#define VERSION "$Revision: 1.30 $"
23 23
24 24
25#define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args) 25#define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args)
@@ -40,7 +40,7 @@ static LIST_HEAD(blkmtd_device_list);
40 40
41 41
42#define PAGE_READAHEAD 64 42#define PAGE_READAHEAD 64
43void cache_readahead(struct address_space *mapping, int index) 43static void cache_readahead(struct address_space *mapping, int index)
44{ 44{
45 filler_t *filler = (filler_t*)mapping->a_ops->readpage; 45 filler_t *filler = (filler_t*)mapping->a_ops->readpage;
46 int i, pagei; 46 int i, pagei;
diff --git a/drivers/mtd/devices/ms02-nv.c b/drivers/mtd/devices/ms02-nv.c
index f5026cee087f..0ff2e4378244 100644
--- a/drivers/mtd/devices/ms02-nv.c
+++ b/drivers/mtd/devices/ms02-nv.c
@@ -6,7 +6,7 @@
6 * as published by the Free Software Foundation; either version 6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version. 7 * 2 of the License, or (at your option) any later version.
8 * 8 *
9 * $Id: ms02-nv.c,v 1.10 2005/06/20 12:24:41 macro Exp $ 9 * $Id: ms02-nv.c,v 1.11 2005/11/14 13:41:47 macro Exp $
10 */ 10 */
11 11
12#include <linux/init.h> 12#include <linux/init.h>
@@ -293,13 +293,13 @@ static int __init ms02nv_init(void)
293 293
294 switch (mips_machtype) { 294 switch (mips_machtype) {
295 case MACH_DS5000_200: 295 case MACH_DS5000_200:
296 csr = (volatile u32 *)KN02_CSR_BASE; 296 csr = (volatile u32 *)CKSEG1ADDR(KN02_SLOT_BASE + KN02_CSR);
297 if (*csr & KN02_CSR_BNK32M) 297 if (*csr & KN02_CSR_BNK32M)
298 stride = 2; 298 stride = 2;
299 break; 299 break;
300 case MACH_DS5000_2X0: 300 case MACH_DS5000_2X0:
301 case MACH_DS5900: 301 case MACH_DS5900:
302 csr = (volatile u32 *)KN03_MCR_BASE; 302 csr = (volatile u32 *)CKSEG1ADDR(KN03_SLOT_BASE + IOASIC_MCR);
303 if (*csr & KN03_MCR_BNK32M) 303 if (*csr & KN03_MCR_BNK32M)
304 stride = 2; 304 stride = 2;
305 break; 305 break;
diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c
index de7e231d6d18..8a878b34eca0 100644
--- a/drivers/mtd/ftl.c
+++ b/drivers/mtd/ftl.c
@@ -1,5 +1,5 @@
1/* This version ported to the Linux-MTD system by dwmw2@infradead.org 1/* This version ported to the Linux-MTD system by dwmw2@infradead.org
2 * $Id: ftl.c,v 1.58 2005/11/07 11:14:19 gleixner Exp $ 2 * $Id: ftl.c,v 1.59 2005/11/29 14:48:31 gleixner Exp $
3 * 3 *
4 * Fixes: Arnaldo Carvalho de Melo <acme@conectiva.com.br> 4 * Fixes: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
5 * - fixes some leaks on failure in build_maps and ftl_notify_add, cleanups 5 * - fixes some leaks on failure in build_maps and ftl_notify_add, cleanups
@@ -1084,9 +1084,9 @@ struct mtd_blktrans_ops ftl_tr = {
1084 .owner = THIS_MODULE, 1084 .owner = THIS_MODULE,
1085}; 1085};
1086 1086
1087int init_ftl(void) 1087static int init_ftl(void)
1088{ 1088{
1089 DEBUG(0, "$Id: ftl.c,v 1.58 2005/11/07 11:14:19 gleixner Exp $\n"); 1089 DEBUG(0, "$Id: ftl.c,v 1.59 2005/11/29 14:48:31 gleixner Exp $\n");
1090 1090
1091 return register_mtd_blktrans(&ftl_tr); 1091 return register_mtd_blktrans(&ftl_tr);
1092} 1092}
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index 846a533323a8..452ccd5037c3 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -538,12 +538,6 @@ config MTD_MPC1211
538 This enables access to the flash chips on the Interface MPC-1211(CTP/PCI/MPC-SH02). 538 This enables access to the flash chips on the Interface MPC-1211(CTP/PCI/MPC-SH02).
539 If you have such a board, say 'Y'. 539 If you have such a board, say 'Y'.
540 540
541config MTD_PQ2FADS
542 tristate "JEDEC flash SIMM mapped on PQ2FADS and 8272ADS boards"
543 depends on (ADS8272 || PQ2FADS) && MTD_PARTITIONS && MTD_JEDECPROBE && MTD_PHYSMAP && MTD_CFI_GEOMETRY && MTD_CFI_INTELEXT
544 help
545 This enables access to flash SIMM on PQ2FADS-like boards
546
547config MTD_OMAP_NOR 541config MTD_OMAP_NOR
548 tristate "TI OMAP board mappings" 542 tristate "TI OMAP board mappings"
549 depends on MTD_CFI && ARCH_OMAP 543 depends on MTD_CFI && ARCH_OMAP
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
index 7d9e940a1dcd..2f7e254912f0 100644
--- a/drivers/mtd/maps/Makefile
+++ b/drivers/mtd/maps/Makefile
@@ -70,6 +70,5 @@ obj-$(CONFIG_MTD_DMV182) += dmv182.o
70obj-$(CONFIG_MTD_SHARP_SL) += sharpsl-flash.o 70obj-$(CONFIG_MTD_SHARP_SL) += sharpsl-flash.o
71obj-$(CONFIG_MTD_PLATRAM) += plat-ram.o 71obj-$(CONFIG_MTD_PLATRAM) += plat-ram.o
72obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o 72obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o
73obj-$(CONFIG_MTD_PQ2FADS) += pq2fads.o
74obj-$(CONFIG_MTD_MTX1) += mtx-1_flash.o 73obj-$(CONFIG_MTD_MTX1) += mtx-1_flash.o
75obj-$(CONFIG_MTD_TQM834x) += tqm834x.o 74obj-$(CONFIG_MTD_TQM834x) += tqm834x.o
diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c
index a59f8027903c..986c58628390 100644
--- a/drivers/mtd/maps/ixp4xx.c
+++ b/drivers/mtd/maps/ixp4xx.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * $Id: ixp4xx.c,v 1.12 2005/11/07 11:14:27 gleixner Exp $ 2 * $Id: ixp4xx.c,v 1.13 2005/11/16 16:23:21 dvrabel Exp $
3 * 3 *
4 * drivers/mtd/maps/ixp4xx.c 4 * drivers/mtd/maps/ixp4xx.c
5 * 5 *
@@ -34,10 +34,55 @@
34 34
35#include <linux/reboot.h> 35#include <linux/reboot.h>
36 36
37/*
38 * Read/write a 16 bit word from flash address 'addr'.
39 *
40 * When the cpu is in little-endian mode it swizzles the address lines
41 * ('address coherency') so we need to undo the swizzling to ensure commands
42 * and the like end up on the correct flash address.
43 *
44 * To further complicate matters, due to the way the expansion bus controller
45 * handles 32 bit reads, the byte stream ABCD is stored on the flash as:
46 * D15 D0
47 * +---+---+
48 * | A | B | 0
49 * +---+---+
50 * | C | D | 2
51 * +---+---+
52 * This means that on LE systems each 16 bit word must be swapped. Note that
53 * this requires CONFIG_MTD_CFI_BE_BYTE_SWAP to be enabled to 'unswap' the CFI
54 * data and other flash commands which are always in D7-D0.
55 */
37#ifndef __ARMEB__ 56#ifndef __ARMEB__
57#ifndef CONFIG_MTD_CFI_BE_BYTE_SWAP
58# error CONFIG_MTD_CFI_BE_BYTE_SWAP required
59#endif
60
61static inline u16 flash_read16(void __iomem *addr)
62{
63 return be16_to_cpu(__raw_readw((void __iomem *)((unsigned long)addr ^ 0x2)));
64}
65
66static inline void flash_write16(u16 d, void __iomem *addr)
67{
68 __raw_writew(cpu_to_be16(d), (void __iomem *)((unsigned long)addr ^ 0x2));
69}
70
38#define BYTE0(h) ((h) & 0xFF) 71#define BYTE0(h) ((h) & 0xFF)
39#define BYTE1(h) (((h) >> 8) & 0xFF) 72#define BYTE1(h) (((h) >> 8) & 0xFF)
73
40#else 74#else
75
76static inline u16 flash_read16(const void __iomem *addr)
77{
78 return __raw_readw(addr);
79}
80
81static inline void flash_write16(u16 d, void __iomem *addr)
82{
83 __raw_writew(d, addr);
84}
85
41#define BYTE0(h) (((h) >> 8) & 0xFF) 86#define BYTE0(h) (((h) >> 8) & 0xFF)
42#define BYTE1(h) ((h) & 0xFF) 87#define BYTE1(h) ((h) & 0xFF)
43#endif 88#endif
@@ -45,7 +90,7 @@
45static map_word ixp4xx_read16(struct map_info *map, unsigned long ofs) 90static map_word ixp4xx_read16(struct map_info *map, unsigned long ofs)
46{ 91{
47 map_word val; 92 map_word val;
48 val.x[0] = le16_to_cpu(readw(map->virt + ofs)); 93 val.x[0] = flash_read16(map->virt + ofs);
49 return val; 94 return val;
50} 95}
51 96
@@ -57,19 +102,28 @@ static map_word ixp4xx_read16(struct map_info *map, unsigned long ofs)
57static void ixp4xx_copy_from(struct map_info *map, void *to, 102static void ixp4xx_copy_from(struct map_info *map, void *to,
58 unsigned long from, ssize_t len) 103 unsigned long from, ssize_t len)
59{ 104{
60 int i;
61 u8 *dest = (u8 *) to; 105 u8 *dest = (u8 *) to;
62 void __iomem *src = map->virt + from; 106 void __iomem *src = map->virt + from;
63 u16 data;
64 107
65 for (i = 0; i < (len / 2); i++) { 108 if (len <= 0)
66 data = le16_to_cpu(readw(src + 2*i)); 109 return;
67 dest[i * 2] = BYTE0(data); 110
68 dest[i * 2 + 1] = BYTE1(data); 111 if (from & 1) {
112 *dest++ = BYTE1(flash_read16(src));
113 src++;
114 --len;
69 } 115 }
70 116
71 if (len & 1) 117 while (len >= 2) {
72 dest[len - 1] = BYTE0(le16_to_cpu(readw(src + 2*i))); 118 u16 data = flash_read16(src);
119 *dest++ = BYTE0(data);
120 *dest++ = BYTE1(data);
121 src += 2;
122 len -= 2;
123 }
124
125 if (len > 0)
126 *dest++ = BYTE0(flash_read16(src));
73} 127}
74 128
75/* 129/*
@@ -79,7 +133,7 @@ static void ixp4xx_copy_from(struct map_info *map, void *to,
79static void ixp4xx_probe_write16(struct map_info *map, map_word d, unsigned long adr) 133static void ixp4xx_probe_write16(struct map_info *map, map_word d, unsigned long adr)
80{ 134{
81 if (!(adr & 1)) 135 if (!(adr & 1))
82 writew(cpu_to_le16(d.x[0]), map->virt + adr); 136 flash_write16(d.x[0], map->virt + adr);
83} 137}
84 138
85/* 139/*
@@ -87,7 +141,7 @@ static void ixp4xx_probe_write16(struct map_info *map, map_word d, unsigned long
87 */ 141 */
88static void ixp4xx_write16(struct map_info *map, map_word d, unsigned long adr) 142static void ixp4xx_write16(struct map_info *map, map_word d, unsigned long adr)
89{ 143{
90 writew(cpu_to_le16(d.x[0]), map->virt + adr); 144 flash_write16(d.x[0], map->virt + adr);
91} 145}
92 146
93struct ixp4xx_flash_info { 147struct ixp4xx_flash_info {
diff --git a/drivers/mtd/maps/nettel.c b/drivers/mtd/maps/nettel.c
index f00ee7e54dba..632eb2aa968f 100644
--- a/drivers/mtd/maps/nettel.c
+++ b/drivers/mtd/maps/nettel.c
@@ -6,7 +6,7 @@
6 * (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com) 6 * (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com)
7 * (C) Copyright 2001-2002, SnapGear (www.snapgear.com) 7 * (C) Copyright 2001-2002, SnapGear (www.snapgear.com)
8 * 8 *
9 * $Id: nettel.c,v 1.11 2005/11/07 11:14:27 gleixner Exp $ 9 * $Id: nettel.c,v 1.12 2005/11/29 14:30:00 gleixner Exp $
10 */ 10 */
11 11
12/****************************************************************************/ 12/****************************************************************************/
@@ -479,7 +479,7 @@ void __exit nettel_cleanup(void)
479 } 479 }
480 if (nettel_intel_map.virt) { 480 if (nettel_intel_map.virt) {
481 iounmap(nettel_intel_map.virt); 481 iounmap(nettel_intel_map.virt);
482 nettel_intel_map.virt = 0; 482 nettel_intel_map.virt = NULL;
483 } 483 }
484#endif 484#endif
485} 485}
diff --git a/drivers/mtd/maps/pci.c b/drivers/mtd/maps/pci.c
index 8b3570b09095..21822c2edbe4 100644
--- a/drivers/mtd/maps/pci.c
+++ b/drivers/mtd/maps/pci.c
@@ -7,7 +7,7 @@
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 * $Id: pci.c,v 1.13 2005/11/07 11:14:27 gleixner Exp $ 10 * $Id: pci.c,v 1.14 2005/11/17 08:20:27 dwmw2 Exp $
11 * 11 *
12 * Generic PCI memory map driver. We support the following boards: 12 * Generic PCI memory map driver. We support the following boards:
13 * - Intel IQ80310 ATU. 13 * - Intel IQ80310 ATU.
@@ -102,7 +102,7 @@ static void mtd_pci_copyto(struct map_info *_map, unsigned long to, const void *
102 memcpy_toio(map->base + map->translate(map, to), from, len); 102 memcpy_toio(map->base + map->translate(map, to), from, len);
103} 103}
104 104
105static struct map_info mtd_pci_map = { 105static const struct map_info mtd_pci_map = {
106 .phys = NO_XIP, 106 .phys = NO_XIP,
107 .copy_from = mtd_pci_copyfrom, 107 .copy_from = mtd_pci_copyfrom,
108 .copy_to = mtd_pci_copyto, 108 .copy_to = mtd_pci_copyto,
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index 9ee760f97bc6..f49ebc3c4606 100644
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * $Id: physmap.c,v 1.38 2005/11/07 11:14:28 gleixner Exp $ 2 * $Id: physmap.c,v 1.39 2005/11/29 14:49:36 gleixner Exp $
3 * 3 *
4 * Normal mappings of chips in physical memory 4 * Normal mappings of chips in physical memory
5 * 5 *
@@ -19,6 +19,7 @@
19#include <linux/mtd/map.h> 19#include <linux/mtd/map.h>
20#include <linux/config.h> 20#include <linux/config.h>
21#include <linux/mtd/partitions.h> 21#include <linux/mtd/partitions.h>
22#include <linux/mtd/physmap.h>
22 23
23static struct mtd_info *mymtd; 24static struct mtd_info *mymtd;
24 25
diff --git a/drivers/mtd/maps/sc520cdp.c b/drivers/mtd/maps/sc520cdp.c
index 6fb9f3c57aab..ed92afadd8a9 100644
--- a/drivers/mtd/maps/sc520cdp.c
+++ b/drivers/mtd/maps/sc520cdp.c
@@ -16,7 +16,7 @@
16 * along with this program; if not, write to the Free Software 16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
18 * 18 *
19 * $Id: sc520cdp.c,v 1.22 2005/11/07 11:14:28 gleixner Exp $ 19 * $Id: sc520cdp.c,v 1.23 2005/11/17 08:20:27 dwmw2 Exp $
20 * 20 *
21 * 21 *
22 * The SC520CDP is an evaluation board for the Elan SC520 processor available 22 * The SC520CDP is an evaluation board for the Elan SC520 processor available
@@ -164,7 +164,7 @@ struct sc520_par_table
164 unsigned long default_address; 164 unsigned long default_address;
165}; 165};
166 166
167static struct sc520_par_table par_table[NUM_FLASH_BANKS] = 167static const struct sc520_par_table par_table[NUM_FLASH_BANKS] =
168{ 168{
169 { /* Flash Bank #0: selected by ROMCS0 */ 169 { /* Flash Bank #0: selected by ROMCS0 */
170 SC520_PAR_ROMCS0, 170 SC520_PAR_ROMCS0,
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index de4500395300..a0af92cc7efd 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -1486,7 +1486,7 @@ ns_nand_verify_buf(struct mtd_info *mtd, const u_char *buf, int len)
1486/* 1486/*
1487 * Module initialization function 1487 * Module initialization function
1488 */ 1488 */
1489int __init ns_init_module(void) 1489static int __init ns_init_module(void)
1490{ 1490{
1491 struct nand_chip *chip; 1491 struct nand_chip *chip;
1492 struct nandsim *nand; 1492 struct nandsim *nand;
diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c
index 0ab8d29caeea..20ce212638fc 100644
--- a/drivers/mtd/rfd_ftl.c
+++ b/drivers/mtd/rfd_ftl.c
@@ -30,11 +30,9 @@ MODULE_PARM_DESC(block_size, "Block size to use by RFD, defaults to erase unit s
30 30
31#define PREFIX "rfd_ftl: " 31#define PREFIX "rfd_ftl: "
32 32
33/* Major device # for FTL device */ 33/* This major has been assigned by device@lanana.org */
34
35/* A request for this major has been sent to device@lanana.org */
36#ifndef RFD_FTL_MAJOR 34#ifndef RFD_FTL_MAJOR
37#define RFD_FTL_MAJOR 95 35#define RFD_FTL_MAJOR 256
38#endif 36#endif
39 37
40/* Maximum number of partitions in an FTL region */ 38/* Maximum number of partitions in an FTL region */
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index c53848f787eb..7aa49b974dc5 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -28,8 +28,8 @@
28 28
29#define DRV_MODULE_NAME "b44" 29#define DRV_MODULE_NAME "b44"
30#define PFX DRV_MODULE_NAME ": " 30#define PFX DRV_MODULE_NAME ": "
31#define DRV_MODULE_VERSION "0.96" 31#define DRV_MODULE_VERSION "0.97"
32#define DRV_MODULE_RELDATE "Nov 8, 2005" 32#define DRV_MODULE_RELDATE "Nov 30, 2005"
33 33
34#define B44_DEF_MSG_ENABLE \ 34#define B44_DEF_MSG_ENABLE \
35 (NETIF_MSG_DRV | \ 35 (NETIF_MSG_DRV | \
@@ -1417,6 +1417,7 @@ static int b44_open(struct net_device *dev)
1417 add_timer(&bp->timer); 1417 add_timer(&bp->timer);
1418 1418
1419 b44_enable_ints(bp); 1419 b44_enable_ints(bp);
1420 netif_start_queue(dev);
1420out: 1421out:
1421 return err; 1422 return err;
1422} 1423}
@@ -1837,12 +1838,15 @@ static int b44_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
1837{ 1838{
1838 struct mii_ioctl_data *data = if_mii(ifr); 1839 struct mii_ioctl_data *data = if_mii(ifr);
1839 struct b44 *bp = netdev_priv(dev); 1840 struct b44 *bp = netdev_priv(dev);
1840 int err; 1841 int err = -EINVAL;
1842
1843 if (!netif_running(dev))
1844 goto out;
1841 1845
1842 spin_lock_irq(&bp->lock); 1846 spin_lock_irq(&bp->lock);
1843 err = generic_mii_ioctl(&bp->mii_if, data, cmd, NULL); 1847 err = generic_mii_ioctl(&bp->mii_if, data, cmd, NULL);
1844 spin_unlock_irq(&bp->lock); 1848 spin_unlock_irq(&bp->lock);
1845 1849out:
1846 return err; 1850 return err;
1847} 1851}
1848 1852
@@ -2113,6 +2117,7 @@ static int b44_resume(struct pci_dev *pdev)
2113 add_timer(&bp->timer); 2117 add_timer(&bp->timer);
2114 2118
2115 b44_enable_ints(bp); 2119 b44_enable_ints(bp);
2120 netif_wake_queue(dev);
2116 return 0; 2121 return 0;
2117} 2122}
2118 2123
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 8b207f0e139e..e0ae248b4313 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2621,19 +2621,7 @@ e1000_transfer_dhcp_info(struct e1000_adapter *adapter, struct sk_buff *skb)
2621 E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT)) ) 2621 E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT)) )
2622 return 0; 2622 return 0;
2623 } 2623 }
2624 if(htons(ETH_P_IP) == skb->protocol) { 2624 if ((skb->len > MINIMUM_DHCP_PACKET_SIZE) && (!skb->protocol)) {
2625 const struct iphdr *ip = skb->nh.iph;
2626 if(IPPROTO_UDP == ip->protocol) {
2627 struct udphdr *udp = (struct udphdr *)(skb->h.uh);
2628 if(ntohs(udp->dest) == 67) {
2629 offset = (uint8_t *)udp + 8 - skb->data;
2630 length = skb->len - offset;
2631
2632 return e1000_mng_write_dhcp_info(hw,
2633 (uint8_t *)udp + 8, length);
2634 }
2635 }
2636 } else if((skb->len > MINIMUM_DHCP_PACKET_SIZE) && (!skb->protocol)) {
2637 struct ethhdr *eth = (struct ethhdr *) skb->data; 2625 struct ethhdr *eth = (struct ethhdr *) skb->data;
2638 if((htons(ETH_P_IP) == eth->h_proto)) { 2626 if((htons(ETH_P_IP) == eth->h_proto)) {
2639 const struct iphdr *ip = 2627 const struct iphdr *ip =
diff --git a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c
index eb7d69478715..1da8a66f91e1 100644
--- a/drivers/net/ibm_emac/ibm_emac_core.c
+++ b/drivers/net/ibm_emac/ibm_emac_core.c
@@ -65,7 +65,7 @@
65 */ 65 */
66 66
67#define DRV_NAME "emac" 67#define DRV_NAME "emac"
68#define DRV_VERSION "3.53" 68#define DRV_VERSION "3.54"
69#define DRV_DESC "PPC 4xx OCP EMAC driver" 69#define DRV_DESC "PPC 4xx OCP EMAC driver"
70 70
71MODULE_DESCRIPTION(DRV_DESC); 71MODULE_DESCRIPTION(DRV_DESC);
@@ -158,6 +158,14 @@ static inline void emac_report_timeout_error(struct ocp_enet_private *dev,
158#define PHY_POLL_LINK_ON HZ 158#define PHY_POLL_LINK_ON HZ
159#define PHY_POLL_LINK_OFF (HZ / 5) 159#define PHY_POLL_LINK_OFF (HZ / 5)
160 160
161/* Graceful stop timeouts in us.
162 * We should allow up to 1 frame time (full-duplex, ignoring collisions)
163 */
164#define STOP_TIMEOUT_10 1230
165#define STOP_TIMEOUT_100 124
166#define STOP_TIMEOUT_1000 13
167#define STOP_TIMEOUT_1000_JUMBO 73
168
161/* Please, keep in sync with struct ibm_emac_stats/ibm_emac_error_stats */ 169/* Please, keep in sync with struct ibm_emac_stats/ibm_emac_error_stats */
162static const char emac_stats_keys[EMAC_ETHTOOL_STATS_COUNT][ETH_GSTRING_LEN] = { 170static const char emac_stats_keys[EMAC_ETHTOOL_STATS_COUNT][ETH_GSTRING_LEN] = {
163 "rx_packets", "rx_bytes", "tx_packets", "tx_bytes", "rx_packets_csum", 171 "rx_packets", "rx_bytes", "tx_packets", "tx_bytes", "rx_packets_csum",
@@ -222,10 +230,12 @@ static void emac_tx_disable(struct ocp_enet_private *dev)
222 230
223 r = in_be32(&p->mr0); 231 r = in_be32(&p->mr0);
224 if (r & EMAC_MR0_TXE) { 232 if (r & EMAC_MR0_TXE) {
225 int n = 300; 233 int n = dev->stop_timeout;
226 out_be32(&p->mr0, r & ~EMAC_MR0_TXE); 234 out_be32(&p->mr0, r & ~EMAC_MR0_TXE);
227 while (!(in_be32(&p->mr0) & EMAC_MR0_TXI) && n) 235 while (!(in_be32(&p->mr0) & EMAC_MR0_TXI) && n) {
236 udelay(1);
228 --n; 237 --n;
238 }
229 if (unlikely(!n)) 239 if (unlikely(!n))
230 emac_report_timeout_error(dev, "TX disable timeout"); 240 emac_report_timeout_error(dev, "TX disable timeout");
231 } 241 }
@@ -248,9 +258,11 @@ static void emac_rx_enable(struct ocp_enet_private *dev)
248 if (!(r & EMAC_MR0_RXE)) { 258 if (!(r & EMAC_MR0_RXE)) {
249 if (unlikely(!(r & EMAC_MR0_RXI))) { 259 if (unlikely(!(r & EMAC_MR0_RXI))) {
250 /* Wait if previous async disable is still in progress */ 260 /* Wait if previous async disable is still in progress */
251 int n = 100; 261 int n = dev->stop_timeout;
252 while (!(r = in_be32(&p->mr0) & EMAC_MR0_RXI) && n) 262 while (!(r = in_be32(&p->mr0) & EMAC_MR0_RXI) && n) {
263 udelay(1);
253 --n; 264 --n;
265 }
254 if (unlikely(!n)) 266 if (unlikely(!n))
255 emac_report_timeout_error(dev, 267 emac_report_timeout_error(dev,
256 "RX disable timeout"); 268 "RX disable timeout");
@@ -273,10 +285,12 @@ static void emac_rx_disable(struct ocp_enet_private *dev)
273 285
274 r = in_be32(&p->mr0); 286 r = in_be32(&p->mr0);
275 if (r & EMAC_MR0_RXE) { 287 if (r & EMAC_MR0_RXE) {
276 int n = 300; 288 int n = dev->stop_timeout;
277 out_be32(&p->mr0, r & ~EMAC_MR0_RXE); 289 out_be32(&p->mr0, r & ~EMAC_MR0_RXE);
278 while (!(in_be32(&p->mr0) & EMAC_MR0_RXI) && n) 290 while (!(in_be32(&p->mr0) & EMAC_MR0_RXI) && n) {
291 udelay(1);
279 --n; 292 --n;
293 }
280 if (unlikely(!n)) 294 if (unlikely(!n))
281 emac_report_timeout_error(dev, "RX disable timeout"); 295 emac_report_timeout_error(dev, "RX disable timeout");
282 } 296 }
@@ -395,6 +409,7 @@ static int emac_configure(struct ocp_enet_private *dev)
395 r = EMAC_MR1_BASE(emac_opb_mhz()) | EMAC_MR1_VLE | EMAC_MR1_IST; 409 r = EMAC_MR1_BASE(emac_opb_mhz()) | EMAC_MR1_VLE | EMAC_MR1_IST;
396 if (dev->phy.duplex == DUPLEX_FULL) 410 if (dev->phy.duplex == DUPLEX_FULL)
397 r |= EMAC_MR1_FDE; 411 r |= EMAC_MR1_FDE;
412 dev->stop_timeout = STOP_TIMEOUT_10;
398 switch (dev->phy.speed) { 413 switch (dev->phy.speed) {
399 case SPEED_1000: 414 case SPEED_1000:
400 if (emac_phy_gpcs(dev->phy.mode)) { 415 if (emac_phy_gpcs(dev->phy.mode)) {
@@ -409,12 +424,16 @@ static int emac_configure(struct ocp_enet_private *dev)
409 r |= EMAC_MR1_MF_1000; 424 r |= EMAC_MR1_MF_1000;
410 r |= EMAC_MR1_RFS_16K; 425 r |= EMAC_MR1_RFS_16K;
411 gige = 1; 426 gige = 1;
412 427
413 if (dev->ndev->mtu > ETH_DATA_LEN) 428 if (dev->ndev->mtu > ETH_DATA_LEN) {
414 r |= EMAC_MR1_JPSM; 429 r |= EMAC_MR1_JPSM;
430 dev->stop_timeout = STOP_TIMEOUT_1000_JUMBO;
431 } else
432 dev->stop_timeout = STOP_TIMEOUT_1000;
415 break; 433 break;
416 case SPEED_100: 434 case SPEED_100:
417 r |= EMAC_MR1_MF_100; 435 r |= EMAC_MR1_MF_100;
436 dev->stop_timeout = STOP_TIMEOUT_100;
418 /* Fall through */ 437 /* Fall through */
419 default: 438 default:
420 r |= EMAC_MR1_RFS_4K; 439 r |= EMAC_MR1_RFS_4K;
@@ -2048,6 +2067,7 @@ static int __init emac_probe(struct ocp_device *ocpdev)
2048 dev->phy.duplex = DUPLEX_FULL; 2067 dev->phy.duplex = DUPLEX_FULL;
2049 dev->phy.autoneg = AUTONEG_DISABLE; 2068 dev->phy.autoneg = AUTONEG_DISABLE;
2050 dev->phy.pause = dev->phy.asym_pause = 0; 2069 dev->phy.pause = dev->phy.asym_pause = 0;
2070 dev->stop_timeout = STOP_TIMEOUT_100;
2051 init_timer(&dev->link_timer); 2071 init_timer(&dev->link_timer);
2052 dev->link_timer.function = emac_link_timer; 2072 dev->link_timer.function = emac_link_timer;
2053 dev->link_timer.data = (unsigned long)dev; 2073 dev->link_timer.data = (unsigned long)dev;
diff --git a/drivers/net/ibm_emac/ibm_emac_core.h b/drivers/net/ibm_emac/ibm_emac_core.h
index e9b44d030ac3..911abbaf471b 100644
--- a/drivers/net/ibm_emac/ibm_emac_core.h
+++ b/drivers/net/ibm_emac/ibm_emac_core.h
@@ -189,6 +189,8 @@ struct ocp_enet_private {
189 struct timer_list link_timer; 189 struct timer_list link_timer;
190 int reset_failed; 190 int reset_failed;
191 191
192 int stop_timeout; /* in us */
193
192 struct ibm_emac_error_stats estats; 194 struct ibm_emac_error_stats estats;
193 struct net_device_stats nstats; 195 struct net_device_stats nstats;
194 196
diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c
index b039bd89ceb9..272d331d29cd 100644
--- a/drivers/net/jazzsonic.c
+++ b/drivers/net/jazzsonic.c
@@ -296,7 +296,7 @@ static int __init jazz_sonic_init_module(void)
296 } 296 }
297 297
298 jazz_sonic_device = platform_device_alloc(jazz_sonic_string, 0); 298 jazz_sonic_device = platform_device_alloc(jazz_sonic_string, 0);
299 if (!jazz_sonnic_device) 299 if (!jazz_sonic_device)
300 goto out_unregister; 300 goto out_unregister;
301 301
302 if (platform_device_add(jazz_sonic_device)) { 302 if (platform_device_add(jazz_sonic_device)) {
@@ -307,7 +307,7 @@ static int __init jazz_sonic_init_module(void)
307 return 0; 307 return 0;
308 308
309out_unregister: 309out_unregister:
310 driver_unregister(&jazz_sonic_driver); 310 platform_driver_unregister(&jazz_sonic_driver);
311 311
312 return -ENOMEM; 312 return -ENOMEM;
313} 313}
diff --git a/drivers/net/mipsnet.h b/drivers/net/mipsnet.h
index 878535953cb1..026c732024c9 100644
--- a/drivers/net/mipsnet.h
+++ b/drivers/net/mipsnet.h
@@ -1,28 +1,8 @@
1// 1/*
2// <COPYRIGHT CLASS="1B" YEAR="2005"> 2 * This file is subject to the terms and conditions of the GNU General Public
3// Unpublished work (c) MIPS Technologies, Inc. All rights reserved. 3 * License. See the file "COPYING" in the main directory of this archive
4// Unpublished rights reserved under the copyright laws of the U.S.A. and 4 * for more details.
5// other countries. 5 */
6//
7// PROPRIETARY / SECRET CONFIDENTIAL INFORMATION OF MIPS TECHNOLOGIES, INC.
8// FOR INTERNAL USE ONLY.
9//
10// Under no circumstances (contract or otherwise) may this information be
11// disclosed to, or copied, modified or used by anyone other than employees
12// or contractors of MIPS Technologies having a need to know.
13// </COPYRIGHT>
14//
15//++
16// File: MIPS_Net.h
17//
18// Description:
19// The definition of the emulated MIPSNET device's interface.
20//
21// Notes: This include file needs to work from a Linux device drivers.
22//
23//--
24//
25
26#ifndef __MIPSNET_H 6#ifndef __MIPSNET_H
27#define __MIPSNET_H 7#define __MIPSNET_H
28 8
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index 384a736a0d2f..356f50909222 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -131,10 +131,9 @@ typedef struct local_info_t {
131 u_short tx_queue_len; 131 u_short tx_queue_len;
132 cardtype_t cardtype; 132 cardtype_t cardtype;
133 u_short sent; 133 u_short sent;
134 u_char mc_filter[8];
135} local_info_t; 134} local_info_t;
136 135
137#define MC_FILTERBREAK 8 136#define MC_FILTERBREAK 64
138 137
139/*====================================================================*/ 138/*====================================================================*/
140/* 139/*
@@ -1005,15 +1004,8 @@ static void fjn_reset(struct net_device *dev)
1005 for (i = 0; i < 6; i++) 1004 for (i = 0; i < 6; i++)
1006 outb(dev->dev_addr[i], ioaddr + NODE_ID + i); 1005 outb(dev->dev_addr[i], ioaddr + NODE_ID + i);
1007 1006
1008 /* Switch to bank 1 */ 1007 /* (re)initialize the multicast table */
1009 if (lp->cardtype == MBH10302) 1008 set_rx_mode(dev);
1010 outb(BANK_1, ioaddr + CONFIG_1);
1011 else
1012 outb(BANK_1U, ioaddr + CONFIG_1);
1013
1014 /* set the multicast table to accept none. */
1015 for (i = 0; i < 8; i++)
1016 outb(0x00, ioaddr + MAR_ADR + i);
1017 1009
1018 /* Switch to bank 2 (runtime mode) */ 1010 /* Switch to bank 2 (runtime mode) */
1019 if (lp->cardtype == MBH10302) 1011 if (lp->cardtype == MBH10302)
@@ -1264,11 +1256,11 @@ static struct net_device_stats *fjn_get_stats(struct net_device *dev)
1264static void set_rx_mode(struct net_device *dev) 1256static void set_rx_mode(struct net_device *dev)
1265{ 1257{
1266 kio_addr_t ioaddr = dev->base_addr; 1258 kio_addr_t ioaddr = dev->base_addr;
1267 struct local_info_t *lp = netdev_priv(dev);
1268 u_char mc_filter[8]; /* Multicast hash filter */ 1259 u_char mc_filter[8]; /* Multicast hash filter */
1269 u_long flags; 1260 u_long flags;
1270 int i; 1261 int i;
1271 1262
1263 int saved_bank;
1272 int saved_config_0 = inb(ioaddr + CONFIG_0); 1264 int saved_config_0 = inb(ioaddr + CONFIG_0);
1273 1265
1274 local_irq_save(flags); 1266 local_irq_save(flags);
@@ -1306,15 +1298,13 @@ static void set_rx_mode(struct net_device *dev)
1306 outb(2, ioaddr + RX_MODE); /* Use normal mode. */ 1298 outb(2, ioaddr + RX_MODE); /* Use normal mode. */
1307 } 1299 }
1308 1300
1309 if (memcmp(mc_filter, lp->mc_filter, sizeof(mc_filter))) { 1301 /* Switch to bank 1 and set the multicast table. */
1310 int saved_bank = inb(ioaddr + CONFIG_1); 1302 saved_bank = inb(ioaddr + CONFIG_1);
1311 /* Switch to bank 1 and set the multicast table. */ 1303 outb(0xe4, ioaddr + CONFIG_1);
1312 outb(0xe4, ioaddr + CONFIG_1); 1304
1313 for (i = 0; i < 8; i++) 1305 for (i = 0; i < 8; i++)
1314 outb(mc_filter[i], ioaddr + MAR_ADR + i); 1306 outb(mc_filter[i], ioaddr + MAR_ADR + i);
1315 memcpy(lp->mc_filter, mc_filter, sizeof(mc_filter)); 1307 outb(saved_bank, ioaddr + CONFIG_1);
1316 outb(saved_bank, ioaddr + CONFIG_1);
1317 }
1318 1308
1319 outb(saved_config_0, ioaddr + CONFIG_0); 1309 outb(saved_config_0, ioaddr + CONFIG_0);
1320 1310
diff --git a/drivers/net/sk98lin/Makefile b/drivers/net/sk98lin/Makefile
index 6783039ffb75..7653d6e33aa2 100644
--- a/drivers/net/sk98lin/Makefile
+++ b/drivers/net/sk98lin/Makefile
@@ -27,8 +27,7 @@ sk98lin-objs := \
27 sktimer.o \ 27 sktimer.o \
28 skvpd.o \ 28 skvpd.o \
29 skxmac2.o \ 29 skxmac2.o \
30 skproc.o \ 30 skproc.o
31 skcsum.o
32 31
33# DBGDEF = \ 32# DBGDEF = \
34# -DDEBUG 33# -DDEBUG
@@ -77,7 +76,7 @@ endif
77# SK_DBGCAT_DRV_INT_SRC 0x04000000 interrupts sources 76# SK_DBGCAT_DRV_INT_SRC 0x04000000 interrupts sources
78# SK_DBGCAT_DRV_EVENT 0x08000000 driver events 77# SK_DBGCAT_DRV_EVENT 0x08000000 driver events
79 78
80EXTRA_CFLAGS += -Idrivers/net/sk98lin -DSK_DIAG_SUPPORT -DSK_USE_CSUM -DGENESIS -DYUKON $(DBGDEF) $(SKPARAM) 79EXTRA_CFLAGS += -Idrivers/net/sk98lin -DSK_DIAG_SUPPORT -DGENESIS -DYUKON $(DBGDEF) $(SKPARAM)
81 80
82clean: 81clean:
83 rm -f core *.o *.a *.s 82 rm -f core *.o *.a *.s
diff --git a/drivers/net/sk98lin/h/skdrv2nd.h b/drivers/net/sk98lin/h/skdrv2nd.h
index 542cec57f86a..2dc5728e3ef6 100644
--- a/drivers/net/sk98lin/h/skdrv2nd.h
+++ b/drivers/net/sk98lin/h/skdrv2nd.h
@@ -425,10 +425,6 @@ struct s_AC {
425 TX_PORT TxPort[SK_MAX_MACS][2]; 425 TX_PORT TxPort[SK_MAX_MACS][2];
426 RX_PORT RxPort[SK_MAX_MACS]; 426 RX_PORT RxPort[SK_MAX_MACS];
427 427
428 unsigned int CsOfs1; /* for checksum calculation */
429 unsigned int CsOfs2; /* for checksum calculation */
430 SK_U32 CsOfs; /* for checksum calculation */
431
432 SK_BOOL CheckQueue; /* check event queue soon */ 428 SK_BOOL CheckQueue; /* check event queue soon */
433 SK_TIMER DrvCleanupTimer;/* to check for pending descriptors */ 429 SK_TIMER DrvCleanupTimer;/* to check for pending descriptors */
434 DIM_INFO DynIrqModInfo; /* all data related to DIM */ 430 DIM_INFO DynIrqModInfo; /* all data related to DIM */
diff --git a/drivers/net/sk98lin/skcsum.c b/drivers/net/sk98lin/skcsum.c
deleted file mode 100644
index 38a6e7a631f3..000000000000
--- a/drivers/net/sk98lin/skcsum.c
+++ /dev/null
@@ -1,871 +0,0 @@
1/******************************************************************************
2 *
3 * Name: skcsum.c
4 * Project: GEnesis, PCI Gigabit Ethernet Adapter
5 * Version: $Revision: 1.12 $
6 * Date: $Date: 2003/08/20 13:55:53 $
7 * Purpose: Store/verify Internet checksum in send/receive packets.
8 *
9 ******************************************************************************/
10
11/******************************************************************************
12 *
13 * (C)Copyright 1998-2003 SysKonnect GmbH.
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 * The information in this file is provided "AS IS" without warranty.
21 *
22 ******************************************************************************/
23
24#ifdef SK_USE_CSUM /* Check if CSUM is to be used. */
25
26#ifndef lint
27static const char SysKonnectFileId[] =
28 "@(#) $Id: skcsum.c,v 1.12 2003/08/20 13:55:53 mschmid Exp $ (C) SysKonnect.";
29#endif /* !lint */
30
31/******************************************************************************
32 *
33 * Description:
34 *
35 * This is the "GEnesis" common module "CSUM".
36 *
37 * This module contains the code necessary to calculate, store, and verify the
38 * Internet Checksum of IP, TCP, and UDP frames.
39 *
40 * "GEnesis" is an abbreviation of "Gigabit Ethernet Network System in Silicon"
41 * and is the code name of this SysKonnect project.
42 *
43 * Compilation Options:
44 *
45 * SK_USE_CSUM - Define if CSUM is to be used. Otherwise, CSUM will be an
46 * empty module.
47 *
48 * SKCS_OVERWRITE_PROTO - Define to overwrite the default protocol id
49 * definitions. In this case, all SKCS_PROTO_xxx definitions must be made
50 * external.
51 *
52 * SKCS_OVERWRITE_STATUS - Define to overwrite the default return status
53 * definitions. In this case, all SKCS_STATUS_xxx definitions must be made
54 * external.
55 *
56 * Include File Hierarchy:
57 *
58 * "h/skdrv1st.h"
59 * "h/skcsum.h"
60 * "h/sktypes.h"
61 * "h/skqueue.h"
62 * "h/skdrv2nd.h"
63 *
64 ******************************************************************************/
65
66#include "h/skdrv1st.h"
67#include "h/skcsum.h"
68#include "h/skdrv2nd.h"
69
70/* defines ********************************************************************/
71
72/* The size of an Ethernet MAC header. */
73#define SKCS_ETHERNET_MAC_HEADER_SIZE (6+6+2)
74
75/* The size of the used topology's MAC header. */
76#define SKCS_MAC_HEADER_SIZE SKCS_ETHERNET_MAC_HEADER_SIZE
77
78/* The size of the IP header without any option fields. */
79#define SKCS_IP_HEADER_SIZE 20
80
81/*
82 * Field offsets within the IP header.
83 */
84
85/* "Internet Header Version" and "Length". */
86#define SKCS_OFS_IP_HEADER_VERSION_AND_LENGTH 0
87
88/* "Total Length". */
89#define SKCS_OFS_IP_TOTAL_LENGTH 2
90
91/* "Flags" "Fragment Offset". */
92#define SKCS_OFS_IP_FLAGS_AND_FRAGMENT_OFFSET 6
93
94/* "Next Level Protocol" identifier. */
95#define SKCS_OFS_IP_NEXT_LEVEL_PROTOCOL 9
96
97/* Source IP address. */
98#define SKCS_OFS_IP_SOURCE_ADDRESS 12
99
100/* Destination IP address. */
101#define SKCS_OFS_IP_DESTINATION_ADDRESS 16
102
103
104/*
105 * Field offsets within the UDP header.
106 */
107
108/* UDP checksum. */
109#define SKCS_OFS_UDP_CHECKSUM 6
110
111/* IP "Next Level Protocol" identifiers (see RFC 790). */
112#define SKCS_PROTO_ID_TCP 6 /* Transport Control Protocol */
113#define SKCS_PROTO_ID_UDP 17 /* User Datagram Protocol */
114
115/* IP "Don't Fragment" bit. */
116#define SKCS_IP_DONT_FRAGMENT SKCS_HTON16(0x4000)
117
118/* Add a byte offset to a pointer. */
119#define SKCS_IDX(pPtr, Ofs) ((void *) ((char *) (pPtr) + (Ofs)))
120
121/*
122 * Macros that convert host to network representation and vice versa, i.e.
123 * little/big endian conversion on little endian machines only.
124 */
125#ifdef SK_LITTLE_ENDIAN
126#define SKCS_HTON16(Val16) (((unsigned) (Val16) >> 8) | (((Val16) & 0xff) << 8))
127#endif /* SK_LITTLE_ENDIAN */
128#ifdef SK_BIG_ENDIAN
129#define SKCS_HTON16(Val16) (Val16)
130#endif /* SK_BIG_ENDIAN */
131#define SKCS_NTOH16(Val16) SKCS_HTON16(Val16)
132
133/* typedefs *******************************************************************/
134
135/* function prototypes ********************************************************/
136
137/******************************************************************************
138 *
139 * SkCsGetSendInfo - get checksum information for a send packet
140 *
141 * Description:
142 * Get all checksum information necessary to send a TCP or UDP packet. The
143 * function checks the IP header passed to it. If the high-level protocol
144 * is either TCP or UDP the pseudo header checksum is calculated and
145 * returned.
146 *
147 * The function returns the total length of the IP header (including any
148 * IP option fields), which is the same as the start offset of the IP data
149 * which in turn is the start offset of the TCP or UDP header.
150 *
151 * The function also returns the TCP or UDP pseudo header checksum, which
152 * should be used as the start value for the hardware checksum calculation.
153 * (Note that any actual pseudo header checksum can never calculate to
154 * zero.)
155 *
156 * Note:
157 * There is a bug in the GENESIS ASIC which may lead to wrong checksums.
158 *
159 * Arguments:
160 * pAc - A pointer to the adapter context struct.
161 *
162 * pIpHeader - Pointer to IP header. Must be at least the IP header *not*
163 * including any option fields, i.e. at least 20 bytes.
164 *
165 * Note: This pointer will be used to address 8-, 16-, and 32-bit
166 * variables with the respective alignment offsets relative to the pointer.
167 * Thus, the pointer should point to a 32-bit aligned address. If the
168 * target system cannot address 32-bit variables on non 32-bit aligned
169 * addresses, then the pointer *must* point to a 32-bit aligned address.
170 *
171 * pPacketInfo - A pointer to the packet information structure for this
172 * packet. Before calling this SkCsGetSendInfo(), the following field must
173 * be initialized:
174 *
175 * ProtocolFlags - Initialize with any combination of
176 * SKCS_PROTO_XXX bit flags. SkCsGetSendInfo() will only work on
177 * the protocols specified here. Any protocol(s) not specified
178 * here will be ignored.
179 *
180 * Note: Only one checksum can be calculated in hardware. Thus, if
181 * SKCS_PROTO_IP is specified in the 'ProtocolFlags',
182 * SkCsGetSendInfo() must calculate the IP header checksum in
183 * software. It might be a better idea to have the calling
184 * protocol stack calculate the IP header checksum.
185 *
186 * Returns: N/A
187 * On return, the following fields in 'pPacketInfo' may or may not have
188 * been filled with information, depending on the protocol(s) found in the
189 * packet:
190 *
191 * ProtocolFlags - Returns the SKCS_PROTO_XXX bit flags of the protocol(s)
192 * that were both requested by the caller and actually found in the packet.
193 * Protocol(s) not specified by the caller and/or not found in the packet
194 * will have their respective SKCS_PROTO_XXX bit flags reset.
195 *
196 * Note: For IP fragments, TCP and UDP packet information is ignored.
197 *
198 * IpHeaderLength - The total length in bytes of the complete IP header
199 * including any option fields is returned here. This is the start offset
200 * of the IP data, i.e. the TCP or UDP header if present.
201 *
202 * IpHeaderChecksum - If IP has been specified in the 'ProtocolFlags', the
203 * 16-bit Internet Checksum of the IP header is returned here. This value
204 * is to be stored into the packet's 'IP Header Checksum' field.
205 *
206 * PseudoHeaderChecksum - If this is a TCP or UDP packet and if TCP or UDP
207 * has been specified in the 'ProtocolFlags', the 16-bit Internet Checksum
208 * of the TCP or UDP pseudo header is returned here.
209 */
210void SkCsGetSendInfo(
211SK_AC *pAc, /* Adapter context struct. */
212void *pIpHeader, /* IP header. */
213SKCS_PACKET_INFO *pPacketInfo, /* Packet information struct. */
214int NetNumber) /* Net number */
215{
216 /* Internet Header Version found in IP header. */
217 unsigned InternetHeaderVersion;
218
219 /* Length of the IP header as found in IP header. */
220 unsigned IpHeaderLength;
221
222 /* Bit field specifiying the desired/found protocols. */
223 unsigned ProtocolFlags;
224
225 /* Next level protocol identifier found in IP header. */
226 unsigned NextLevelProtocol;
227
228 /* Length of IP data portion. */
229 unsigned IpDataLength;
230
231 /* TCP/UDP pseudo header checksum. */
232 unsigned long PseudoHeaderChecksum;
233
234 /* Pointer to next level protocol statistics structure. */
235 SKCS_PROTO_STATS *NextLevelProtoStats;
236
237 /* Temporary variable. */
238 unsigned Tmp;
239
240 Tmp = *(SK_U8 *)
241 SKCS_IDX(pIpHeader, SKCS_OFS_IP_HEADER_VERSION_AND_LENGTH);
242
243 /* Get the Internet Header Version (IHV). */
244 /* Note: The IHV is stored in the upper four bits. */
245
246 InternetHeaderVersion = Tmp >> 4;
247
248 /* Check the Internet Header Version. */
249 /* Note: We currently only support IP version 4. */
250
251 if (InternetHeaderVersion != 4) { /* IPv4? */
252 SK_DBG_MSG(pAc, SK_DBGMOD_CSUM, SK_DBGCAT_ERR | SK_DBGCAT_TX,
253 ("Tx: Unknown Internet Header Version %u.\n",
254 InternetHeaderVersion));
255 pPacketInfo->ProtocolFlags = 0;
256 pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].TxUnableCts++;
257 return;
258 }
259
260 /* Get the IP header length (IHL). */
261 /*
262 * Note: The IHL is stored in the lower four bits as the number of
263 * 4-byte words.
264 */
265
266 IpHeaderLength = (Tmp & 0xf) * 4;
267 pPacketInfo->IpHeaderLength = IpHeaderLength;
268
269 /* Check the IP header length. */
270
271 /* 04-Aug-1998 sw - Really check the IHL? Necessary? */
272
273 if (IpHeaderLength < 5*4) {
274 SK_DBG_MSG(pAc, SK_DBGMOD_CSUM, SK_DBGCAT_ERR | SK_DBGCAT_TX,
275 ("Tx: Invalid IP Header Length %u.\n", IpHeaderLength));
276 pPacketInfo->ProtocolFlags = 0;
277 pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].TxUnableCts++;
278 return;
279 }
280
281 /* This is an IPv4 frame with a header of valid length. */
282
283 pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].TxOkCts++;
284
285 /* Check if we should calculate the IP header checksum. */
286
287 ProtocolFlags = pPacketInfo->ProtocolFlags;
288
289 if (ProtocolFlags & SKCS_PROTO_IP) {
290 pPacketInfo->IpHeaderChecksum =
291 SkCsCalculateChecksum(pIpHeader, IpHeaderLength);
292 }
293
294 /* Get the next level protocol identifier. */
295
296 NextLevelProtocol =
297 *(SK_U8 *) SKCS_IDX(pIpHeader, SKCS_OFS_IP_NEXT_LEVEL_PROTOCOL);
298
299 /*
300 * Check if this is a TCP or UDP frame and if we should calculate the
301 * TCP/UDP pseudo header checksum.
302 *
303 * Also clear all protocol bit flags of protocols not present in the
304 * frame.
305 */
306
307 if ((ProtocolFlags & SKCS_PROTO_TCP) != 0 &&
308 NextLevelProtocol == SKCS_PROTO_ID_TCP) {
309 /* TCP/IP frame. */
310 ProtocolFlags &= SKCS_PROTO_TCP | SKCS_PROTO_IP;
311 NextLevelProtoStats =
312 &pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_TCP];
313 }
314 else if ((ProtocolFlags & SKCS_PROTO_UDP) != 0 &&
315 NextLevelProtocol == SKCS_PROTO_ID_UDP) {
316 /* UDP/IP frame. */
317 ProtocolFlags &= SKCS_PROTO_UDP | SKCS_PROTO_IP;
318 NextLevelProtoStats =
319 &pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_UDP];
320 }
321 else {
322 /*
323 * Either not a TCP or UDP frame and/or TCP/UDP processing not
324 * specified.
325 */
326 pPacketInfo->ProtocolFlags = ProtocolFlags & SKCS_PROTO_IP;
327 return;
328 }
329
330 /* Check if this is an IP fragment. */
331
332 /*
333 * Note: An IP fragment has a non-zero "Fragment Offset" field and/or
334 * the "More Fragments" bit set. Thus, if both the "Fragment Offset"
335 * and the "More Fragments" are zero, it is *not* a fragment. We can
336 * easily check both at the same time since they are in the same 16-bit
337 * word.
338 */
339
340 if ((*(SK_U16 *)
341 SKCS_IDX(pIpHeader, SKCS_OFS_IP_FLAGS_AND_FRAGMENT_OFFSET) &
342 ~SKCS_IP_DONT_FRAGMENT) != 0) {
343 /* IP fragment; ignore all other protocols. */
344 pPacketInfo->ProtocolFlags = ProtocolFlags & SKCS_PROTO_IP;
345 NextLevelProtoStats->TxUnableCts++;
346 return;
347 }
348
349 /*
350 * Calculate the TCP/UDP pseudo header checksum.
351 */
352
353 /* Get total length of IP header and data. */
354
355 IpDataLength =
356 *(SK_U16 *) SKCS_IDX(pIpHeader, SKCS_OFS_IP_TOTAL_LENGTH);
357
358 /* Get length of IP data portion. */
359
360 IpDataLength = SKCS_NTOH16(IpDataLength) - IpHeaderLength;
361
362 /* Calculate the sum of all pseudo header fields (16-bit). */
363
364 PseudoHeaderChecksum =
365 (unsigned long) *(SK_U16 *) SKCS_IDX(pIpHeader,
366 SKCS_OFS_IP_SOURCE_ADDRESS + 0) +
367 (unsigned long) *(SK_U16 *) SKCS_IDX(pIpHeader,
368 SKCS_OFS_IP_SOURCE_ADDRESS + 2) +
369 (unsigned long) *(SK_U16 *) SKCS_IDX(pIpHeader,
370 SKCS_OFS_IP_DESTINATION_ADDRESS + 0) +
371 (unsigned long) *(SK_U16 *) SKCS_IDX(pIpHeader,
372 SKCS_OFS_IP_DESTINATION_ADDRESS + 2) +
373 (unsigned long) SKCS_HTON16(NextLevelProtocol) +
374 (unsigned long) SKCS_HTON16(IpDataLength);
375
376 /* Add-in any carries. */
377
378 SKCS_OC_ADD(PseudoHeaderChecksum, PseudoHeaderChecksum, 0);
379
380 /* Add-in any new carry. */
381
382 SKCS_OC_ADD(pPacketInfo->PseudoHeaderChecksum, PseudoHeaderChecksum, 0);
383
384 pPacketInfo->ProtocolFlags = ProtocolFlags;
385 NextLevelProtoStats->TxOkCts++; /* Success. */
386} /* SkCsGetSendInfo */
387
388
389/******************************************************************************
390 *
391 * SkCsGetReceiveInfo - verify checksum information for a received packet
392 *
393 * Description:
394 * Verify a received frame's checksum. The function returns a status code
395 * reflecting the result of the verification.
396 *
397 * Note:
398 * Before calling this function you have to verify that the frame is
399 * not padded and Checksum1 and Checksum2 are bigger than 1.
400 *
401 * Arguments:
402 * pAc - Pointer to adapter context struct.
403 *
404 * pIpHeader - Pointer to IP header. Must be at least the length in bytes
405 * of the received IP header including any option fields. For UDP packets,
406 * 8 additional bytes are needed to access the UDP checksum.
407 *
408 * Note: The actual length of the IP header is stored in the lower four
409 * bits of the first octet of the IP header as the number of 4-byte words,
410 * so it must be multiplied by four to get the length in bytes. Thus, the
411 * maximum IP header length is 15 * 4 = 60 bytes.
412 *
413 * Checksum1 - The first 16-bit Internet Checksum calculated by the
414 * hardware starting at the offset returned by SkCsSetReceiveFlags().
415 *
416 * Checksum2 - The second 16-bit Internet Checksum calculated by the
417 * hardware starting at the offset returned by SkCsSetReceiveFlags().
418 *
419 * Returns:
420 * SKCS_STATUS_UNKNOWN_IP_VERSION - Not an IP v4 frame.
421 * SKCS_STATUS_IP_CSUM_ERROR - IP checksum error.
422 * SKCS_STATUS_IP_CSUM_ERROR_TCP - IP checksum error in TCP frame.
423 * SKCS_STATUS_IP_CSUM_ERROR_UDP - IP checksum error in UDP frame
424 * SKCS_STATUS_IP_FRAGMENT - IP fragment (IP checksum ok).
425 * SKCS_STATUS_IP_CSUM_OK - IP checksum ok (not a TCP or UDP frame).
426 * SKCS_STATUS_TCP_CSUM_ERROR - TCP checksum error (IP checksum ok).
427 * SKCS_STATUS_UDP_CSUM_ERROR - UDP checksum error (IP checksum ok).
428 * SKCS_STATUS_TCP_CSUM_OK - IP and TCP checksum ok.
429 * SKCS_STATUS_UDP_CSUM_OK - IP and UDP checksum ok.
430 * SKCS_STATUS_IP_CSUM_OK_NO_UDP - IP checksum OK and no UDP checksum.
431 *
432 * Note: If SKCS_OVERWRITE_STATUS is defined, the SKCS_STATUS_XXX values
433 * returned here can be defined in some header file by the module using CSUM.
434 * In this way, the calling module can assign return values for its own needs,
435 * e.g. by assigning bit flags to the individual protocols.
436 */
437SKCS_STATUS SkCsGetReceiveInfo(
438SK_AC *pAc, /* Adapter context struct. */
439void *pIpHeader, /* IP header. */
440unsigned Checksum1, /* Hardware checksum 1. */
441unsigned Checksum2, /* Hardware checksum 2. */
442int NetNumber) /* Net number */
443{
444 /* Internet Header Version found in IP header. */
445 unsigned InternetHeaderVersion;
446
447 /* Length of the IP header as found in IP header. */
448 unsigned IpHeaderLength;
449
450 /* Length of IP data portion. */
451 unsigned IpDataLength;
452
453 /* IP header checksum. */
454 unsigned IpHeaderChecksum;
455
456 /* IP header options checksum, if any. */
457 unsigned IpOptionsChecksum;
458
459 /* IP data checksum, i.e. TCP/UDP checksum. */
460 unsigned IpDataChecksum;
461
462 /* Next level protocol identifier found in IP header. */
463 unsigned NextLevelProtocol;
464
465 /* The checksum of the "next level protocol", i.e. TCP or UDP. */
466 unsigned long NextLevelProtocolChecksum;
467
468 /* Pointer to next level protocol statistics structure. */
469 SKCS_PROTO_STATS *NextLevelProtoStats;
470
471 /* Temporary variable. */
472 unsigned Tmp;
473
474 Tmp = *(SK_U8 *)
475 SKCS_IDX(pIpHeader, SKCS_OFS_IP_HEADER_VERSION_AND_LENGTH);
476
477 /* Get the Internet Header Version (IHV). */
478 /* Note: The IHV is stored in the upper four bits. */
479
480 InternetHeaderVersion = Tmp >> 4;
481
482 /* Check the Internet Header Version. */
483 /* Note: We currently only support IP version 4. */
484
485 if (InternetHeaderVersion != 4) { /* IPv4? */
486 SK_DBG_MSG(pAc, SK_DBGMOD_CSUM, SK_DBGCAT_ERR | SK_DBGCAT_RX,
487 ("Rx: Unknown Internet Header Version %u.\n",
488 InternetHeaderVersion));
489 pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].RxUnableCts++;
490 return (SKCS_STATUS_UNKNOWN_IP_VERSION);
491 }
492
493 /* Get the IP header length (IHL). */
494 /*
495 * Note: The IHL is stored in the lower four bits as the number of
496 * 4-byte words.
497 */
498
499 IpHeaderLength = (Tmp & 0xf) * 4;
500
501 /* Check the IP header length. */
502
503 /* 04-Aug-1998 sw - Really check the IHL? Necessary? */
504
505 if (IpHeaderLength < 5*4) {
506 SK_DBG_MSG(pAc, SK_DBGMOD_CSUM, SK_DBGCAT_ERR | SK_DBGCAT_RX,
507 ("Rx: Invalid IP Header Length %u.\n", IpHeaderLength));
508 pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].RxErrCts++;
509 return (SKCS_STATUS_IP_CSUM_ERROR);
510 }
511
512 /* This is an IPv4 frame with a header of valid length. */
513
514 /* Get the IP header and data checksum. */
515
516 IpDataChecksum = Checksum2;
517
518 /*
519 * The IP header checksum is calculated as follows:
520 *
521 * IpHeaderChecksum = Checksum1 - Checksum2
522 */
523
524 SKCS_OC_SUB(IpHeaderChecksum, Checksum1, Checksum2);
525
526 /* Check if any IP header options. */
527
528 if (IpHeaderLength > SKCS_IP_HEADER_SIZE) {
529
530 /* Get the IP options checksum. */
531
532 IpOptionsChecksum = SkCsCalculateChecksum(
533 SKCS_IDX(pIpHeader, SKCS_IP_HEADER_SIZE),
534 IpHeaderLength - SKCS_IP_HEADER_SIZE);
535
536 /* Adjust the IP header and IP data checksums. */
537
538 SKCS_OC_ADD(IpHeaderChecksum, IpHeaderChecksum, IpOptionsChecksum);
539
540 SKCS_OC_SUB(IpDataChecksum, IpDataChecksum, IpOptionsChecksum);
541 }
542
543 /*
544 * Check if the IP header checksum is ok.
545 *
546 * NOTE: We must check the IP header checksum even if the caller just wants
547 * us to check upper-layer checksums, because we cannot do any further
548 * processing of the packet without a valid IP checksum.
549 */
550
551 /* Get the next level protocol identifier. */
552
553 NextLevelProtocol = *(SK_U8 *)
554 SKCS_IDX(pIpHeader, SKCS_OFS_IP_NEXT_LEVEL_PROTOCOL);
555
556 if (IpHeaderChecksum != 0xffff) {
557 pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].RxErrCts++;
558 /* the NDIS tester wants to know the upper level protocol too */
559 if (NextLevelProtocol == SKCS_PROTO_ID_TCP) {
560 return(SKCS_STATUS_IP_CSUM_ERROR_TCP);
561 }
562 else if (NextLevelProtocol == SKCS_PROTO_ID_UDP) {
563 return(SKCS_STATUS_IP_CSUM_ERROR_UDP);
564 }
565 return (SKCS_STATUS_IP_CSUM_ERROR);
566 }
567
568 /*
569 * Check if this is a TCP or UDP frame and if we should calculate the
570 * TCP/UDP pseudo header checksum.
571 *
572 * Also clear all protocol bit flags of protocols not present in the
573 * frame.
574 */
575
576 if ((pAc->Csum.ReceiveFlags[NetNumber] & SKCS_PROTO_TCP) != 0 &&
577 NextLevelProtocol == SKCS_PROTO_ID_TCP) {
578 /* TCP/IP frame. */
579 NextLevelProtoStats =
580 &pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_TCP];
581 }
582 else if ((pAc->Csum.ReceiveFlags[NetNumber] & SKCS_PROTO_UDP) != 0 &&
583 NextLevelProtocol == SKCS_PROTO_ID_UDP) {
584 /* UDP/IP frame. */
585 NextLevelProtoStats =
586 &pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_UDP];
587 }
588 else {
589 /*
590 * Either not a TCP or UDP frame and/or TCP/UDP processing not
591 * specified.
592 */
593 return (SKCS_STATUS_IP_CSUM_OK);
594 }
595
596 /* Check if this is an IP fragment. */
597
598 /*
599 * Note: An IP fragment has a non-zero "Fragment Offset" field and/or
600 * the "More Fragments" bit set. Thus, if both the "Fragment Offset"
601 * and the "More Fragments" are zero, it is *not* a fragment. We can
602 * easily check both at the same time since they are in the same 16-bit
603 * word.
604 */
605
606 if ((*(SK_U16 *)
607 SKCS_IDX(pIpHeader, SKCS_OFS_IP_FLAGS_AND_FRAGMENT_OFFSET) &
608 ~SKCS_IP_DONT_FRAGMENT) != 0) {
609 /* IP fragment; ignore all other protocols. */
610 NextLevelProtoStats->RxUnableCts++;
611 return (SKCS_STATUS_IP_FRAGMENT);
612 }
613
614 /*
615 * 08-May-2000 ra
616 *
617 * From RFC 768 (UDP)
618 * If the computed checksum is zero, it is transmitted as all ones (the
619 * equivalent in one's complement arithmetic). An all zero transmitted
620 * checksum value means that the transmitter generated no checksum (for
621 * debugging or for higher level protocols that don't care).
622 */
623
624 if (NextLevelProtocol == SKCS_PROTO_ID_UDP &&
625 *(SK_U16*)SKCS_IDX(pIpHeader, IpHeaderLength + 6) == 0x0000) {
626
627 NextLevelProtoStats->RxOkCts++;
628
629 return (SKCS_STATUS_IP_CSUM_OK_NO_UDP);
630 }
631
632 /*
633 * Calculate the TCP/UDP checksum.
634 */
635
636 /* Get total length of IP header and data. */
637
638 IpDataLength =
639 *(SK_U16 *) SKCS_IDX(pIpHeader, SKCS_OFS_IP_TOTAL_LENGTH);
640
641 /* Get length of IP data portion. */
642
643 IpDataLength = SKCS_NTOH16(IpDataLength) - IpHeaderLength;
644
645 NextLevelProtocolChecksum =
646
647 /* Calculate the pseudo header checksum. */
648
649 (unsigned long) *(SK_U16 *) SKCS_IDX(pIpHeader,
650 SKCS_OFS_IP_SOURCE_ADDRESS + 0) +
651 (unsigned long) *(SK_U16 *) SKCS_IDX(pIpHeader,
652 SKCS_OFS_IP_SOURCE_ADDRESS + 2) +
653 (unsigned long) *(SK_U16 *) SKCS_IDX(pIpHeader,
654 SKCS_OFS_IP_DESTINATION_ADDRESS + 0) +
655 (unsigned long) *(SK_U16 *) SKCS_IDX(pIpHeader,
656 SKCS_OFS_IP_DESTINATION_ADDRESS + 2) +
657 (unsigned long) SKCS_HTON16(NextLevelProtocol) +
658 (unsigned long) SKCS_HTON16(IpDataLength) +
659
660 /* Add the TCP/UDP header checksum. */
661
662 (unsigned long) IpDataChecksum;
663
664 /* Add-in any carries. */
665
666 SKCS_OC_ADD(NextLevelProtocolChecksum, NextLevelProtocolChecksum, 0);
667
668 /* Add-in any new carry. */
669
670 SKCS_OC_ADD(NextLevelProtocolChecksum, NextLevelProtocolChecksum, 0);
671
672 /* Check if the TCP/UDP checksum is ok. */
673
674 if ((unsigned) NextLevelProtocolChecksum == 0xffff) {
675
676 /* TCP/UDP checksum ok. */
677
678 NextLevelProtoStats->RxOkCts++;
679
680 return (NextLevelProtocol == SKCS_PROTO_ID_TCP ?
681 SKCS_STATUS_TCP_CSUM_OK : SKCS_STATUS_UDP_CSUM_OK);
682 }
683
684 /* TCP/UDP checksum error. */
685
686 NextLevelProtoStats->RxErrCts++;
687
688 return (NextLevelProtocol == SKCS_PROTO_ID_TCP ?
689 SKCS_STATUS_TCP_CSUM_ERROR : SKCS_STATUS_UDP_CSUM_ERROR);
690} /* SkCsGetReceiveInfo */
691
692
693/******************************************************************************
694 *
695 * SkCsSetReceiveFlags - set checksum receive flags
696 *
697 * Description:
698 * Use this function to set the various receive flags. According to the
699 * protocol flags set by the caller, the start offsets within received
700 * packets of the two hardware checksums are returned. These offsets must
701 * be stored in all receive descriptors.
702 *
703 * Arguments:
704 * pAc - Pointer to adapter context struct.
705 *
706 * ReceiveFlags - Any combination of SK_PROTO_XXX flags of the protocols
707 * for which the caller wants checksum information on received frames.
708 *
709 * pChecksum1Offset - The start offset of the first receive descriptor
710 * hardware checksum to be calculated for received frames is returned
711 * here.
712 *
713 * pChecksum2Offset - The start offset of the second receive descriptor
714 * hardware checksum to be calculated for received frames is returned
715 * here.
716 *
717 * Returns: N/A
718 * Returns the two hardware checksum start offsets.
719 */
720void SkCsSetReceiveFlags(
721SK_AC *pAc, /* Adapter context struct. */
722unsigned ReceiveFlags, /* New receive flags. */
723unsigned *pChecksum1Offset, /* Offset for hardware checksum 1. */
724unsigned *pChecksum2Offset, /* Offset for hardware checksum 2. */
725int NetNumber)
726{
727 /* Save the receive flags. */
728
729 pAc->Csum.ReceiveFlags[NetNumber] = ReceiveFlags;
730
731 /* First checksum start offset is the IP header. */
732 *pChecksum1Offset = SKCS_MAC_HEADER_SIZE;
733
734 /*
735 * Second checksum start offset is the IP data. Note that this may vary
736 * if there are any IP header options in the actual packet.
737 */
738 *pChecksum2Offset = SKCS_MAC_HEADER_SIZE + SKCS_IP_HEADER_SIZE;
739} /* SkCsSetReceiveFlags */
740
741#ifndef SK_CS_CALCULATE_CHECKSUM
742
743/******************************************************************************
744 *
745 * SkCsCalculateChecksum - calculate checksum for specified data
746 *
747 * Description:
748 * Calculate and return the 16-bit Internet Checksum for the specified
749 * data.
750 *
751 * Arguments:
752 * pData - Pointer to data for which the checksum shall be calculated.
753 * Note: The pointer should be aligned on a 16-bit boundary.
754 *
755 * Length - Length in bytes of data to checksum.
756 *
757 * Returns:
758 * The 16-bit Internet Checksum for the specified data.
759 *
760 * Note: The checksum is calculated in the machine's natural byte order,
761 * i.e. little vs. big endian. Thus, the resulting checksum is different
762 * for the same input data on little and big endian machines.
763 *
764 * However, when written back to the network packet, the byte order is
765 * always in correct network order.
766 */
767unsigned SkCsCalculateChecksum(
768void *pData, /* Data to checksum. */
769unsigned Length) /* Length of data. */
770{
771 SK_U16 *pU16; /* Pointer to the data as 16-bit words. */
772 unsigned long Checksum; /* Checksum; must be at least 32 bits. */
773
774 /* Sum up all 16-bit words. */
775
776 pU16 = (SK_U16 *) pData;
777 for (Checksum = 0; Length > 1; Length -= 2) {
778 Checksum += *pU16++;
779 }
780
781 /* If this is an odd number of bytes, add-in the last byte. */
782
783 if (Length > 0) {
784#ifdef SK_BIG_ENDIAN
785 /* Add the last byte as the high byte. */
786 Checksum += ((unsigned) *(SK_U8 *) pU16) << 8;
787#else /* !SK_BIG_ENDIAN */
788 /* Add the last byte as the low byte. */
789 Checksum += *(SK_U8 *) pU16;
790#endif /* !SK_BIG_ENDIAN */
791 }
792
793 /* Add-in any carries. */
794
795 SKCS_OC_ADD(Checksum, Checksum, 0);
796
797 /* Add-in any new carry. */
798
799 SKCS_OC_ADD(Checksum, Checksum, 0);
800
801 /* Note: All bits beyond the 16-bit limit are now zero. */
802
803 return ((unsigned) Checksum);
804} /* SkCsCalculateChecksum */
805
806#endif /* SK_CS_CALCULATE_CHECKSUM */
807
808/******************************************************************************
809 *
810 * SkCsEvent - the CSUM event dispatcher
811 *
812 * Description:
813 * This is the event handler for the CSUM module.
814 *
815 * Arguments:
816 * pAc - Pointer to adapter context.
817 *
818 * Ioc - I/O context.
819 *
820 * Event - Event id.
821 *
822 * Param - Event dependent parameter.
823 *
824 * Returns:
825 * The 16-bit Internet Checksum for the specified data.
826 *
827 * Note: The checksum is calculated in the machine's natural byte order,
828 * i.e. little vs. big endian. Thus, the resulting checksum is different
829 * for the same input data on little and big endian machines.
830 *
831 * However, when written back to the network packet, the byte order is
832 * always in correct network order.
833 */
834int SkCsEvent(
835SK_AC *pAc, /* Pointer to adapter context. */
836SK_IOC Ioc, /* I/O context. */
837SK_U32 Event, /* Event id. */
838SK_EVPARA Param) /* Event dependent parameter. */
839{
840 int ProtoIndex;
841 int NetNumber;
842
843 switch (Event) {
844 /*
845 * Clear protocol statistics.
846 *
847 * Param - Protocol index, or -1 for all protocols.
848 * - Net number.
849 */
850 case SK_CSUM_EVENT_CLEAR_PROTO_STATS:
851
852 ProtoIndex = (int)Param.Para32[1];
853 NetNumber = (int)Param.Para32[0];
854 if (ProtoIndex < 0) { /* Clear for all protocols. */
855 if (NetNumber >= 0) {
856 SK_MEMSET(&pAc->Csum.ProtoStats[NetNumber][0], 0,
857 sizeof(pAc->Csum.ProtoStats[NetNumber]));
858 }
859 }
860 else { /* Clear for individual protocol. */
861 SK_MEMSET(&pAc->Csum.ProtoStats[NetNumber][ProtoIndex], 0,
862 sizeof(pAc->Csum.ProtoStats[NetNumber][ProtoIndex]));
863 }
864 break;
865 default:
866 break;
867 }
868 return (0); /* Success. */
869} /* SkCsEvent */
870
871#endif /* SK_USE_CSUM */
diff --git a/drivers/net/sk98lin/skethtool.c b/drivers/net/sk98lin/skethtool.c
index fb639959292b..b71769ae4603 100644
--- a/drivers/net/sk98lin/skethtool.c
+++ b/drivers/net/sk98lin/skethtool.c
@@ -549,4 +549,6 @@ struct ethtool_ops SkGeEthtoolOps = {
549 .phys_id = locateDevice, 549 .phys_id = locateDevice,
550 .get_pauseparam = getPauseParams, 550 .get_pauseparam = getPauseParams,
551 .set_pauseparam = setPauseParams, 551 .set_pauseparam = setPauseParams,
552 .get_link = ethtool_op_get_link,
553 .get_perm_addr = ethtool_op_get_perm_addr,
552}; 554};
diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c
index b18c92cb629e..00c5d7f04c68 100644
--- a/drivers/net/sk98lin/skge.c
+++ b/drivers/net/sk98lin/skge.c
@@ -101,7 +101,6 @@
101 * "h/skgeinit.h" 101 * "h/skgeinit.h"
102 * "h/skaddr.h" 102 * "h/skaddr.h"
103 * "h/skgesirq.h" 103 * "h/skgesirq.h"
104 * "h/skcsum.h"
105 * "h/skrlmt.h" 104 * "h/skrlmt.h"
106 * 105 *
107 ******************************************************************************/ 106 ******************************************************************************/
@@ -113,6 +112,7 @@
113#include <linux/init.h> 112#include <linux/init.h>
114#include <linux/proc_fs.h> 113#include <linux/proc_fs.h>
115#include <linux/dma-mapping.h> 114#include <linux/dma-mapping.h>
115#include <linux/ip.h>
116 116
117#include "h/skdrv1st.h" 117#include "h/skdrv1st.h"
118#include "h/skdrv2nd.h" 118#include "h/skdrv2nd.h"
@@ -601,11 +601,6 @@ SK_BOOL DualNet;
601 return(-EAGAIN); 601 return(-EAGAIN);
602 } 602 }
603 603
604 SkCsSetReceiveFlags(pAC,
605 SKCS_PROTO_IP | SKCS_PROTO_TCP | SKCS_PROTO_UDP,
606 &pAC->CsOfs1, &pAC->CsOfs2, 0);
607 pAC->CsOfs = (pAC->CsOfs2 << 16) | pAC->CsOfs1;
608
609 BoardInitMem(pAC); 604 BoardInitMem(pAC);
610 /* tschilling: New common function with minimum size check. */ 605 /* tschilling: New common function with minimum size check. */
611 DualNet = SK_FALSE; 606 DualNet = SK_FALSE;
@@ -823,7 +818,7 @@ uintptr_t VNextDescr; /* the virtual bus address of the next descriptor */
823 /* set the pointers right */ 818 /* set the pointers right */
824 pDescr->VNextRxd = VNextDescr & 0xffffffffULL; 819 pDescr->VNextRxd = VNextDescr & 0xffffffffULL;
825 pDescr->pNextRxd = pNextDescr; 820 pDescr->pNextRxd = pNextDescr;
826 pDescr->TcpSumStarts = pAC->CsOfs; 821 pDescr->TcpSumStarts = 0;
827 822
828 /* advance one step */ 823 /* advance one step */
829 pPrevDescr = pDescr; 824 pPrevDescr = pDescr;
@@ -1505,8 +1500,6 @@ struct sk_buff *pMessage) /* pointer to send-message */
1505 TXD *pOldTxd; 1500 TXD *pOldTxd;
1506 unsigned long Flags; 1501 unsigned long Flags;
1507 SK_U64 PhysAddr; 1502 SK_U64 PhysAddr;
1508 int Protocol;
1509 int IpHeaderLength;
1510 int BytesSend = pMessage->len; 1503 int BytesSend = pMessage->len;
1511 1504
1512 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_TX_PROGRESS, ("X")); 1505 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_TX_PROGRESS, ("X"));
@@ -1579,8 +1572,10 @@ struct sk_buff *pMessage) /* pointer to send-message */
1579 pTxd->pMBuf = pMessage; 1572 pTxd->pMBuf = pMessage;
1580 1573
1581 if (pMessage->ip_summed == CHECKSUM_HW) { 1574 if (pMessage->ip_summed == CHECKSUM_HW) {
1582 Protocol = ((SK_U8)pMessage->data[C_OFFSET_IPPROTO] & 0xff); 1575 u16 hdrlen = pMessage->h.raw - pMessage->data;
1583 if ((Protocol == C_PROTO_ID_UDP) && 1576 u16 offset = hdrlen + pMessage->csum;
1577
1578 if ((pMessage->h.ipiph->protocol == IPPROTO_UDP ) &&
1584 (pAC->GIni.GIChipRev == 0) && 1579 (pAC->GIni.GIChipRev == 0) &&
1585 (pAC->GIni.GIChipId == CHIP_ID_YUKON)) { 1580 (pAC->GIni.GIChipId == CHIP_ID_YUKON)) {
1586 pTxd->TBControl = BMU_TCP_CHECK; 1581 pTxd->TBControl = BMU_TCP_CHECK;
@@ -1588,14 +1583,9 @@ struct sk_buff *pMessage) /* pointer to send-message */
1588 pTxd->TBControl = BMU_UDP_CHECK; 1583 pTxd->TBControl = BMU_UDP_CHECK;
1589 } 1584 }
1590 1585
1591 IpHeaderLength = (SK_U8)pMessage->data[C_OFFSET_IPHEADER]; 1586 pTxd->TcpSumOfs = 0;
1592 IpHeaderLength = (IpHeaderLength & 0xf) * 4; 1587 pTxd->TcpSumSt = hdrlen;
1593 pTxd->TcpSumOfs = 0; /* PH-Checksum already calculated */ 1588 pTxd->TcpSumWr = offset;
1594 pTxd->TcpSumSt = C_LEN_ETHERMAC_HEADER + IpHeaderLength +
1595 (Protocol == C_PROTO_ID_UDP ?
1596 C_OFFSET_UDPHEADER_UDPCS :
1597 C_OFFSET_TCPHEADER_TCPCS);
1598 pTxd->TcpSumWr = C_LEN_ETHERMAC_HEADER + IpHeaderLength;
1599 1589
1600 pTxd->TBControl |= BMU_OWN | BMU_STF | 1590 pTxd->TBControl |= BMU_OWN | BMU_STF |
1601 BMU_SW | BMU_EOF | 1591 BMU_SW | BMU_EOF |
@@ -1658,11 +1648,10 @@ struct sk_buff *pMessage) /* pointer to send-message */
1658 TXD *pTxdLst; 1648 TXD *pTxdLst;
1659 int CurrFrag; 1649 int CurrFrag;
1660 int BytesSend; 1650 int BytesSend;
1661 int IpHeaderLength;
1662 int Protocol;
1663 skb_frag_t *sk_frag; 1651 skb_frag_t *sk_frag;
1664 SK_U64 PhysAddr; 1652 SK_U64 PhysAddr;
1665 unsigned long Flags; 1653 unsigned long Flags;
1654 SK_U32 Control;
1666 1655
1667 spin_lock_irqsave(&pTxPort->TxDesRingLock, Flags); 1656 spin_lock_irqsave(&pTxPort->TxDesRingLock, Flags);
1668#ifndef USE_TX_COMPLETE 1657#ifndef USE_TX_COMPLETE
@@ -1685,7 +1674,6 @@ struct sk_buff *pMessage) /* pointer to send-message */
1685 pTxdFst = pTxd; 1674 pTxdFst = pTxd;
1686 pTxdLst = pTxd; 1675 pTxdLst = pTxd;
1687 BytesSend = 0; 1676 BytesSend = 0;
1688 Protocol = 0;
1689 1677
1690 /* 1678 /*
1691 ** Map the first fragment (header) into the DMA-space 1679 ** Map the first fragment (header) into the DMA-space
@@ -1703,32 +1691,31 @@ struct sk_buff *pMessage) /* pointer to send-message */
1703 ** Does the HW need to evaluate checksum for TCP or UDP packets? 1691 ** Does the HW need to evaluate checksum for TCP or UDP packets?
1704 */ 1692 */
1705 if (pMessage->ip_summed == CHECKSUM_HW) { 1693 if (pMessage->ip_summed == CHECKSUM_HW) {
1706 pTxd->TBControl = BMU_STF | BMU_STFWD | skb_headlen(pMessage); 1694 u16 hdrlen = pMessage->h.raw - pMessage->data;
1695 u16 offset = hdrlen + pMessage->csum;
1696
1697 Control = BMU_STFWD;
1698
1707 /* 1699 /*
1708 ** We have to use the opcode for tcp here, because the 1700 ** We have to use the opcode for tcp here, because the
1709 ** opcode for udp is not working in the hardware yet 1701 ** opcode for udp is not working in the hardware yet
1710 ** (Revision 2.0) 1702 ** (Revision 2.0)
1711 */ 1703 */
1712 Protocol = ((SK_U8)pMessage->data[C_OFFSET_IPPROTO] & 0xff); 1704 if ((pMessage->h.ipiph->protocol == IPPROTO_UDP ) &&
1713 if ((Protocol == C_PROTO_ID_UDP) &&
1714 (pAC->GIni.GIChipRev == 0) && 1705 (pAC->GIni.GIChipRev == 0) &&
1715 (pAC->GIni.GIChipId == CHIP_ID_YUKON)) { 1706 (pAC->GIni.GIChipId == CHIP_ID_YUKON)) {
1716 pTxd->TBControl |= BMU_TCP_CHECK; 1707 Control |= BMU_TCP_CHECK;
1717 } else { 1708 } else {
1718 pTxd->TBControl |= BMU_UDP_CHECK; 1709 Control |= BMU_UDP_CHECK;
1719 } 1710 }
1720 1711
1721 IpHeaderLength = ((SK_U8)pMessage->data[C_OFFSET_IPHEADER] & 0xf)*4; 1712 pTxd->TcpSumOfs = 0;
1722 pTxd->TcpSumOfs = 0; /* PH-Checksum already claculated */ 1713 pTxd->TcpSumSt = hdrlen;
1723 pTxd->TcpSumSt = C_LEN_ETHERMAC_HEADER + IpHeaderLength + 1714 pTxd->TcpSumWr = offset;
1724 (Protocol == C_PROTO_ID_UDP ? 1715 } else
1725 C_OFFSET_UDPHEADER_UDPCS : 1716 Control = BMU_CHECK | BMU_SW;
1726 C_OFFSET_TCPHEADER_TCPCS); 1717
1727 pTxd->TcpSumWr = C_LEN_ETHERMAC_HEADER + IpHeaderLength; 1718 pTxd->TBControl = BMU_STF | Control | skb_headlen(pMessage);
1728 } else {
1729 pTxd->TBControl = BMU_CHECK | BMU_SW | BMU_STF |
1730 skb_headlen(pMessage);
1731 }
1732 1719
1733 pTxd = pTxd->pNextTxd; 1720 pTxd = pTxd->pNextTxd;
1734 pTxPort->TxdRingFree--; 1721 pTxPort->TxdRingFree--;
@@ -1752,40 +1739,18 @@ struct sk_buff *pMessage) /* pointer to send-message */
1752 pTxd->VDataHigh = (SK_U32) (PhysAddr >> 32); 1739 pTxd->VDataHigh = (SK_U32) (PhysAddr >> 32);
1753 pTxd->pMBuf = pMessage; 1740 pTxd->pMBuf = pMessage;
1754 1741
1755 /* 1742 pTxd->TBControl = Control | BMU_OWN | sk_frag->size;;
1756 ** Does the HW need to evaluate checksum for TCP or UDP packets?
1757 */
1758 if (pMessage->ip_summed == CHECKSUM_HW) {
1759 pTxd->TBControl = BMU_OWN | BMU_SW | BMU_STFWD;
1760 /*
1761 ** We have to use the opcode for tcp here because the
1762 ** opcode for udp is not working in the hardware yet
1763 ** (revision 2.0)
1764 */
1765 if ((Protocol == C_PROTO_ID_UDP) &&
1766 (pAC->GIni.GIChipRev == 0) &&
1767 (pAC->GIni.GIChipId == CHIP_ID_YUKON)) {
1768 pTxd->TBControl |= BMU_TCP_CHECK;
1769 } else {
1770 pTxd->TBControl |= BMU_UDP_CHECK;
1771 }
1772 } else {
1773 pTxd->TBControl = BMU_CHECK | BMU_SW | BMU_OWN;
1774 }
1775 1743
1776 /* 1744 /*
1777 ** Do we have the last fragment? 1745 ** Do we have the last fragment?
1778 */ 1746 */
1779 if( (CurrFrag+1) == skb_shinfo(pMessage)->nr_frags ) { 1747 if( (CurrFrag+1) == skb_shinfo(pMessage)->nr_frags ) {
1780#ifdef USE_TX_COMPLETE 1748#ifdef USE_TX_COMPLETE
1781 pTxd->TBControl |= BMU_EOF | BMU_IRQ_EOF | sk_frag->size; 1749 pTxd->TBControl |= BMU_EOF | BMU_IRQ_EOF;
1782#else 1750#else
1783 pTxd->TBControl |= BMU_EOF | sk_frag->size; 1751 pTxd->TBControl |= BMU_EOF;
1784#endif 1752#endif
1785 pTxdFst->TBControl |= BMU_OWN | BMU_SW; 1753 pTxdFst->TBControl |= BMU_OWN | BMU_SW;
1786
1787 } else {
1788 pTxd->TBControl |= sk_frag->size;
1789 } 1754 }
1790 pTxdLst = pTxd; 1755 pTxdLst = pTxd;
1791 pTxd = pTxd->pNextTxd; 1756 pTxd = pTxd->pNextTxd;
@@ -2032,7 +1997,6 @@ SK_U32 Control; /* control field of descriptor */
2032struct sk_buff *pMsg; /* pointer to message holding frame */ 1997struct sk_buff *pMsg; /* pointer to message holding frame */
2033struct sk_buff *pNewMsg; /* pointer to a new message for copying frame */ 1998struct sk_buff *pNewMsg; /* pointer to a new message for copying frame */
2034int FrameLength; /* total length of received frame */ 1999int FrameLength; /* total length of received frame */
2035int IpFrameLength;
2036SK_MBUF *pRlmtMbuf; /* ptr to a buffer for giving a frame to rlmt */ 2000SK_MBUF *pRlmtMbuf; /* ptr to a buffer for giving a frame to rlmt */
2037SK_EVPARA EvPara; /* an event parameter union */ 2001SK_EVPARA EvPara; /* an event parameter union */
2038unsigned long Flags; /* for spin lock */ 2002unsigned long Flags; /* for spin lock */
@@ -2045,10 +2009,6 @@ SK_BOOL IsMc;
2045SK_BOOL IsBadFrame; /* Bad frame */ 2009SK_BOOL IsBadFrame; /* Bad frame */
2046 2010
2047SK_U32 FrameStat; 2011SK_U32 FrameStat;
2048unsigned short Csum1;
2049unsigned short Csum2;
2050unsigned short Type;
2051int Result;
2052SK_U64 PhysAddr; 2012SK_U64 PhysAddr;
2053 2013
2054rx_start: 2014rx_start:
@@ -2177,8 +2137,8 @@ rx_start:
2177 (dma_addr_t) PhysAddr, 2137 (dma_addr_t) PhysAddr,
2178 FrameLength, 2138 FrameLength,
2179 PCI_DMA_FROMDEVICE); 2139 PCI_DMA_FROMDEVICE);
2180 eth_copy_and_sum(pNewMsg, pMsg->data, 2140 memcpy(pNewMsg->data, pMsg, FrameLength);
2181 FrameLength, 0); 2141
2182 pci_dma_sync_single_for_device(pAC->PciDev, 2142 pci_dma_sync_single_for_device(pAC->PciDev,
2183 (dma_addr_t) PhysAddr, 2143 (dma_addr_t) PhysAddr,
2184 FrameLength, 2144 FrameLength,
@@ -2206,69 +2166,16 @@ rx_start:
2206 2166
2207 /* set length in message */ 2167 /* set length in message */
2208 skb_put(pMsg, FrameLength); 2168 skb_put(pMsg, FrameLength);
2209 /* hardware checksum */ 2169 } /* frame > SK_COPY_TRESHOLD */
2210 Type = ntohs(*((short*)&pMsg->data[12]));
2211 2170
2212#ifdef USE_SK_RX_CHECKSUM 2171#ifdef USE_SK_RX_CHECKSUM
2213 if (Type == 0x800) { 2172 pMsg->csum = pRxd->TcpSums;
2214 Csum1=le16_to_cpu(pRxd->TcpSums & 0xffff); 2173 pMsg->ip_summed = CHECKSUM_HW;
2215 Csum2=le16_to_cpu((pRxd->TcpSums >> 16) & 0xffff);
2216 IpFrameLength = (int) ntohs((unsigned short)
2217 ((unsigned short *) pMsg->data)[8]);
2218
2219 /*
2220 * Test: If frame is padded, a check is not possible!
2221 * Frame not padded? Length difference must be 14 (0xe)!
2222 */
2223 if ((FrameLength - IpFrameLength) != 0xe) {
2224 /* Frame padded => TCP offload not possible! */
2225 pMsg->ip_summed = CHECKSUM_NONE;
2226 } else {
2227 /* Frame not padded => TCP offload! */
2228 if ((((Csum1 & 0xfffe) && (Csum2 & 0xfffe)) &&
2229 (pAC->GIni.GIChipId == CHIP_ID_GENESIS)) ||
2230 (pAC->ChipsetType)) {
2231 Result = SkCsGetReceiveInfo(pAC,
2232 &pMsg->data[14],
2233 Csum1, Csum2, pRxPort->PortIndex);
2234 if (Result ==
2235 SKCS_STATUS_IP_FRAGMENT ||
2236 Result ==
2237 SKCS_STATUS_IP_CSUM_OK ||
2238 Result ==
2239 SKCS_STATUS_TCP_CSUM_OK ||
2240 Result ==
2241 SKCS_STATUS_UDP_CSUM_OK) {
2242 pMsg->ip_summed =
2243 CHECKSUM_UNNECESSARY;
2244 }
2245 else if (Result ==
2246 SKCS_STATUS_TCP_CSUM_ERROR ||
2247 Result ==
2248 SKCS_STATUS_UDP_CSUM_ERROR ||
2249 Result ==
2250 SKCS_STATUS_IP_CSUM_ERROR_UDP ||
2251 Result ==
2252 SKCS_STATUS_IP_CSUM_ERROR_TCP ||
2253 Result ==
2254 SKCS_STATUS_IP_CSUM_ERROR ) {
2255 /* HW Checksum error */
2256 SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
2257 SK_DBGCAT_DRV_RX_PROGRESS,
2258 ("skge: CRC error. Frame dropped!\n"));
2259 goto rx_failed;
2260 } else {
2261 pMsg->ip_summed =
2262 CHECKSUM_NONE;
2263 }
2264 }/* checksumControl calculation valid */
2265 } /* Frame length check */
2266 } /* IP frame */
2267#else 2174#else
2268 pMsg->ip_summed = CHECKSUM_NONE; 2175 pMsg->ip_summed = CHECKSUM_NONE;
2269#endif 2176#endif
2270 } /* frame > SK_COPY_TRESHOLD */ 2177
2271 2178
2272 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("V")); 2179 SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("V"));
2273 ForRlmt = SK_RLMT_RX_PROTOCOL; 2180 ForRlmt = SK_RLMT_RX_PROTOCOL;
2274#if 0 2181#if 0
@@ -4946,7 +4853,7 @@ static int __devinit skge_probe_one(struct pci_dev *pdev,
4946 dev->irq = pdev->irq; 4853 dev->irq = pdev->irq;
4947 error = SkGeInitPCI(pAC); 4854 error = SkGeInitPCI(pAC);
4948 if (error) { 4855 if (error) {
4949 printk("SKGE: PCI setup failed: %i\n", error); 4856 printk(KERN_ERR "sk98lin: PCI setup failed: %i\n", error);
4950 goto out_free_netdev; 4857 goto out_free_netdev;
4951 } 4858 }
4952 4859
@@ -4982,7 +4889,7 @@ static int __devinit skge_probe_one(struct pci_dev *pdev,
4982 4889
4983 /* Register net device */ 4890 /* Register net device */
4984 if (register_netdev(dev)) { 4891 if (register_netdev(dev)) {
4985 printk(KERN_ERR "SKGE: Could not register device.\n"); 4892 printk(KERN_ERR "sk98lin: Could not register device.\n");
4986 goto out_free_resources; 4893 goto out_free_resources;
4987 } 4894 }
4988 4895
@@ -5001,8 +4908,8 @@ static int __devinit skge_probe_one(struct pci_dev *pdev,
5001 4908
5002 SkGeYellowLED(pAC, pAC->IoBase, 1); 4909 SkGeYellowLED(pAC, pAC->IoBase, 1);
5003 4910
5004
5005 memcpy(&dev->dev_addr, &pAC->Addr.Net[0].CurrentMacAddress, 6); 4911 memcpy(&dev->dev_addr, &pAC->Addr.Net[0].CurrentMacAddress, 6);
4912 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
5006 4913
5007 SkGeProcCreate(dev); 4914 SkGeProcCreate(dev);
5008 4915
@@ -5048,13 +4955,14 @@ static int __devinit skge_probe_one(struct pci_dev *pdev,
5048#endif 4955#endif
5049 4956
5050 if (register_netdev(dev)) { 4957 if (register_netdev(dev)) {
5051 printk(KERN_ERR "SKGE: Could not register device.\n"); 4958 printk(KERN_ERR "sk98lin: Could not register device for seconf port.\n");
5052 free_netdev(dev); 4959 free_netdev(dev);
5053 pAC->dev[1] = pAC->dev[0]; 4960 pAC->dev[1] = pAC->dev[0];
5054 } else { 4961 } else {
5055 SkGeProcCreate(dev); 4962 SkGeProcCreate(dev);
5056 memcpy(&dev->dev_addr, 4963 memcpy(&dev->dev_addr,
5057 &pAC->Addr.Net[1].CurrentMacAddress, 6); 4964 &pAC->Addr.Net[1].CurrentMacAddress, 6);
4965 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
5058 4966
5059 printk("%s: %s\n", dev->name, pAC->DeviceStr); 4967 printk("%s: %s\n", dev->name, pAC->DeviceStr);
5060 printk(" PrefPort:B RlmtMode:Dual Check Link State\n"); 4968 printk(" PrefPort:B RlmtMode:Dual Check Link State\n");
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 596c93b12daa..716467879b9c 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -2300,14 +2300,12 @@ static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev)
2300 td->dma_hi = map >> 32; 2300 td->dma_hi = map >> 32;
2301 2301
2302 if (skb->ip_summed == CHECKSUM_HW) { 2302 if (skb->ip_summed == CHECKSUM_HW) {
2303 const struct iphdr *ip
2304 = (const struct iphdr *) (skb->data + ETH_HLEN);
2305 int offset = skb->h.raw - skb->data; 2303 int offset = skb->h.raw - skb->data;
2306 2304
2307 /* This seems backwards, but it is what the sk98lin 2305 /* This seems backwards, but it is what the sk98lin
2308 * does. Looks like hardware is wrong? 2306 * does. Looks like hardware is wrong?
2309 */ 2307 */
2310 if (ip->protocol == IPPROTO_UDP 2308 if (skb->h.ipiph->protocol == IPPROTO_UDP
2311 && hw->chip_rev == 0 && hw->chip_id == CHIP_ID_YUKON) 2309 && hw->chip_rev == 0 && hw->chip_id == CHIP_ID_YUKON)
2312 control = BMU_TCP_CHECK; 2310 control = BMU_TCP_CHECK;
2313 else 2311 else
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 340ab4ee4b67..7a92b1cbd6aa 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -2755,8 +2755,8 @@ static struct net_device *_init_airo_card( unsigned short irq, int port,
2755 SET_NETDEV_DEV(dev, dmdev); 2755 SET_NETDEV_DEV(dev, dmdev);
2756 2756
2757 2757
2758 if (test_bit(FLAG_MPI,&ai->flags)) 2758 reset_card (dev, 1);
2759 reset_card (dev, 1); 2759 msleep(400);
2760 2760
2761 rc = request_irq( dev->irq, airo_interrupt, SA_SHIRQ, dev->name, dev ); 2761 rc = request_irq( dev->irq, airo_interrupt, SA_SHIRQ, dev->name, dev );
2762 if (rc) { 2762 if (rc) {
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index 488ab06fb79f..6fd0bf736830 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -3512,9 +3512,8 @@ static int orinoco_ioctl_setpower(struct net_device *dev,
3512 break; 3512 break;
3513 default: 3513 default:
3514 err = -EINVAL; 3514 err = -EINVAL;
3515 }
3516 if (err)
3517 goto out; 3515 goto out;
3516 }
3518 3517
3519 if (prq->flags & IW_POWER_TIMEOUT) { 3518 if (prq->flags & IW_POWER_TIMEOUT) {
3520 priv->pm_on = 1; 3519 priv->pm_on = 1;
diff --git a/drivers/pcmcia/m32r_cfc.c b/drivers/pcmcia/m32r_cfc.c
index 2c22b4b3619d..078579ae6359 100644
--- a/drivers/pcmcia/m32r_cfc.c
+++ b/drivers/pcmcia/m32r_cfc.c
@@ -355,9 +355,10 @@ static void add_pcc_socket(ulong base, int irq, ulong mapaddr, kio_addr_t ioaddr
355#ifndef CONFIG_PLAT_USRV 355#ifndef CONFIG_PLAT_USRV
356 /* insert interrupt */ 356 /* insert interrupt */
357 request_irq(irq, pcc_interrupt, 0, "m32r_cfc", pcc_interrupt); 357 request_irq(irq, pcc_interrupt, 0, "m32r_cfc", pcc_interrupt);
358#ifndef CONFIG_PLAT_MAPPI3
358 /* eject interrupt */ 359 /* eject interrupt */
359 request_irq(irq+1, pcc_interrupt, 0, "m32r_cfc", pcc_interrupt); 360 request_irq(irq+1, pcc_interrupt, 0, "m32r_cfc", pcc_interrupt);
360 361#endif
361 debug(3, "m32r_cfc: enable CFMSK, RDYSEL\n"); 362 debug(3, "m32r_cfc: enable CFMSK, RDYSEL\n");
362 pcc_set(pcc_sockets, (unsigned int)PLD_CFIMASK, 0x01); 363 pcc_set(pcc_sockets, (unsigned int)PLD_CFIMASK, 0x01);
363#endif /* CONFIG_PLAT_USRV */ 364#endif /* CONFIG_PLAT_USRV */
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index c218b5c944a6..5e84c5aa7779 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -996,6 +996,20 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device)
996 spin_lock_init(&adapter->fsf_req_list_lock); 996 spin_lock_init(&adapter->fsf_req_list_lock);
997 INIT_LIST_HEAD(&adapter->fsf_req_list_head); 997 INIT_LIST_HEAD(&adapter->fsf_req_list_head);
998 998
999 /* initialize debug locks */
1000
1001 spin_lock_init(&adapter->erp_dbf_lock);
1002 spin_lock_init(&adapter->hba_dbf_lock);
1003 spin_lock_init(&adapter->san_dbf_lock);
1004 spin_lock_init(&adapter->scsi_dbf_lock);
1005
1006 /* initialize error recovery stuff */
1007
1008 rwlock_init(&adapter->erp_lock);
1009 sema_init(&adapter->erp_ready_sem, 0);
1010 INIT_LIST_HEAD(&adapter->erp_ready_head);
1011 INIT_LIST_HEAD(&adapter->erp_running_head);
1012
999 /* initialize abort lock */ 1013 /* initialize abort lock */
1000 rwlock_init(&adapter->abort_lock); 1014 rwlock_init(&adapter->abort_lock);
1001 1015
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c
index 826fb3b00605..95599719f8ab 100644
--- a/drivers/s390/scsi/zfcp_dbf.c
+++ b/drivers/s390/scsi/zfcp_dbf.c
@@ -926,7 +926,6 @@ int zfcp_adapter_debug_register(struct zfcp_adapter *adapter)
926 char dbf_name[DEBUG_MAX_NAME_LEN]; 926 char dbf_name[DEBUG_MAX_NAME_LEN];
927 927
928 /* debug feature area which records recovery activity */ 928 /* debug feature area which records recovery activity */
929 spin_lock_init(&adapter->erp_dbf_lock);
930 sprintf(dbf_name, "zfcp_%s_erp", zfcp_get_busid_by_adapter(adapter)); 929 sprintf(dbf_name, "zfcp_%s_erp", zfcp_get_busid_by_adapter(adapter));
931 adapter->erp_dbf = debug_register(dbf_name, dbfsize, 2, 930 adapter->erp_dbf = debug_register(dbf_name, dbfsize, 2,
932 sizeof(struct zfcp_erp_dbf_record)); 931 sizeof(struct zfcp_erp_dbf_record));
@@ -936,7 +935,6 @@ int zfcp_adapter_debug_register(struct zfcp_adapter *adapter)
936 debug_set_level(adapter->erp_dbf, 3); 935 debug_set_level(adapter->erp_dbf, 3);
937 936
938 /* debug feature area which records HBA (FSF and QDIO) conditions */ 937 /* debug feature area which records HBA (FSF and QDIO) conditions */
939 spin_lock_init(&adapter->hba_dbf_lock);
940 sprintf(dbf_name, "zfcp_%s_hba", zfcp_get_busid_by_adapter(adapter)); 938 sprintf(dbf_name, "zfcp_%s_hba", zfcp_get_busid_by_adapter(adapter));
941 adapter->hba_dbf = debug_register(dbf_name, dbfsize, 1, 939 adapter->hba_dbf = debug_register(dbf_name, dbfsize, 1,
942 sizeof(struct zfcp_hba_dbf_record)); 940 sizeof(struct zfcp_hba_dbf_record));
@@ -947,7 +945,6 @@ int zfcp_adapter_debug_register(struct zfcp_adapter *adapter)
947 debug_set_level(adapter->hba_dbf, 3); 945 debug_set_level(adapter->hba_dbf, 3);
948 946
949 /* debug feature area which records SAN command failures and recovery */ 947 /* debug feature area which records SAN command failures and recovery */
950 spin_lock_init(&adapter->san_dbf_lock);
951 sprintf(dbf_name, "zfcp_%s_san", zfcp_get_busid_by_adapter(adapter)); 948 sprintf(dbf_name, "zfcp_%s_san", zfcp_get_busid_by_adapter(adapter));
952 adapter->san_dbf = debug_register(dbf_name, dbfsize, 1, 949 adapter->san_dbf = debug_register(dbf_name, dbfsize, 1,
953 sizeof(struct zfcp_san_dbf_record)); 950 sizeof(struct zfcp_san_dbf_record));
@@ -958,7 +955,6 @@ int zfcp_adapter_debug_register(struct zfcp_adapter *adapter)
958 debug_set_level(adapter->san_dbf, 6); 955 debug_set_level(adapter->san_dbf, 6);
959 956
960 /* debug feature area which records SCSI command failures and recovery */ 957 /* debug feature area which records SCSI command failures and recovery */
961 spin_lock_init(&adapter->scsi_dbf_lock);
962 sprintf(dbf_name, "zfcp_%s_scsi", zfcp_get_busid_by_adapter(adapter)); 958 sprintf(dbf_name, "zfcp_%s_scsi", zfcp_get_busid_by_adapter(adapter));
963 adapter->scsi_dbf = debug_register(dbf_name, dbfsize, 1, 959 adapter->scsi_dbf = debug_register(dbf_name, dbfsize, 1,
964 sizeof(struct zfcp_scsi_dbf_record)); 960 sizeof(struct zfcp_scsi_dbf_record));
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index 023f4e558ae4..ee7314d8c2da 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -1071,11 +1071,6 @@ zfcp_erp_thread_setup(struct zfcp_adapter *adapter)
1071 1071
1072 atomic_clear_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_UP, &adapter->status); 1072 atomic_clear_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_UP, &adapter->status);
1073 1073
1074 rwlock_init(&adapter->erp_lock);
1075 INIT_LIST_HEAD(&adapter->erp_ready_head);
1076 INIT_LIST_HEAD(&adapter->erp_running_head);
1077 sema_init(&adapter->erp_ready_sem, 0);
1078
1079 retval = kernel_thread(zfcp_erp_thread, adapter, SIGCHLD); 1074 retval = kernel_thread(zfcp_erp_thread, adapter, SIGCHLD);
1080 if (retval < 0) { 1075 if (retval < 0) {
1081 ZFCP_LOG_NORMAL("error: creation of erp thread failed for " 1076 ZFCP_LOG_NORMAL("error: creation of erp thread failed for "
@@ -2248,29 +2243,26 @@ zfcp_erp_adapter_strategy_close_qdio(struct zfcp_erp_action *erp_action)
2248 return retval; 2243 return retval;
2249} 2244}
2250 2245
2251/*
2252 * function: zfcp_fsf_init
2253 *
2254 * purpose: initializes FSF operation for the specified adapter
2255 *
2256 * returns: 0 - succesful initialization of FSF operation
2257 * !0 - failed to initialize FSF operation
2258 */
2259static int 2246static int
2260zfcp_erp_adapter_strategy_open_fsf(struct zfcp_erp_action *erp_action) 2247zfcp_erp_adapter_strategy_open_fsf(struct zfcp_erp_action *erp_action)
2261{ 2248{
2262 int xconfig, xport; 2249 int retval;
2263 2250
2264 if (atomic_test_mask(ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED, 2251 if ((atomic_test_mask(ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED,
2265 &erp_action->adapter->status)) { 2252 &erp_action->adapter->status)) &&
2253 (erp_action->adapter->adapter_features &
2254 FSF_FEATURE_HBAAPI_MANAGEMENT)) {
2266 zfcp_erp_adapter_strategy_open_fsf_xport(erp_action); 2255 zfcp_erp_adapter_strategy_open_fsf_xport(erp_action);
2267 atomic_set(&erp_action->adapter->erp_counter, 0); 2256 atomic_set(&erp_action->adapter->erp_counter, 0);
2268 return ZFCP_ERP_FAILED; 2257 return ZFCP_ERP_FAILED;
2269 } 2258 }
2270 2259
2271 xconfig = zfcp_erp_adapter_strategy_open_fsf_xconfig(erp_action); 2260 retval = zfcp_erp_adapter_strategy_open_fsf_xconfig(erp_action);
2272 xport = zfcp_erp_adapter_strategy_open_fsf_xport(erp_action); 2261 if (retval == ZFCP_ERP_FAILED)
2273 if ((xconfig == ZFCP_ERP_FAILED) || (xport == ZFCP_ERP_FAILED)) 2262 return ZFCP_ERP_FAILED;
2263
2264 retval = zfcp_erp_adapter_strategy_open_fsf_xport(erp_action);
2265 if (retval == ZFCP_ERP_FAILED)
2274 return ZFCP_ERP_FAILED; 2266 return ZFCP_ERP_FAILED;
2275 2267
2276 return zfcp_erp_adapter_strategy_open_fsf_statusread(erp_action); 2268 return zfcp_erp_adapter_strategy_open_fsf_statusread(erp_action);
@@ -2359,41 +2351,29 @@ zfcp_erp_adapter_strategy_open_fsf_xconfig(struct zfcp_erp_action *erp_action)
2359static int 2351static int
2360zfcp_erp_adapter_strategy_open_fsf_xport(struct zfcp_erp_action *erp_action) 2352zfcp_erp_adapter_strategy_open_fsf_xport(struct zfcp_erp_action *erp_action)
2361{ 2353{
2362 int retval = ZFCP_ERP_SUCCEEDED; 2354 int ret;
2363 int retries; 2355 int retries;
2364 int sleep; 2356 int sleep;
2365 struct zfcp_adapter *adapter = erp_action->adapter; 2357 struct zfcp_adapter *adapter = erp_action->adapter;
2366 2358
2367 atomic_clear_mask(ZFCP_STATUS_ADAPTER_XPORT_OK, &adapter->status); 2359 atomic_clear_mask(ZFCP_STATUS_ADAPTER_XPORT_OK, &adapter->status);
2368 2360
2369 for (retries = 0; ; retries++) { 2361 retries = 0;
2370 ZFCP_LOG_DEBUG("Doing exchange port data\n"); 2362 do {
2363 write_lock(&adapter->erp_lock);
2371 zfcp_erp_action_to_running(erp_action); 2364 zfcp_erp_action_to_running(erp_action);
2365 write_unlock(&adapter->erp_lock);
2372 zfcp_erp_timeout_init(erp_action); 2366 zfcp_erp_timeout_init(erp_action);
2373 if (zfcp_fsf_exchange_port_data(erp_action, adapter, NULL)) { 2367 ret = zfcp_fsf_exchange_port_data(erp_action, adapter, NULL);
2374 retval = ZFCP_ERP_FAILED; 2368 if (ret == -EOPNOTSUPP) {
2375 debug_text_event(adapter->erp_dbf, 5, "a_fstx_xf"); 2369 debug_text_event(adapter->erp_dbf, 3, "a_xport_notsupp");
2376 ZFCP_LOG_INFO("error: initiation of exchange of " 2370 return ZFCP_ERP_SUCCEEDED;
2377 "port data failed for adapter %s\n", 2371 } else if (ret) {
2378 zfcp_get_busid_by_adapter(adapter)); 2372 debug_text_event(adapter->erp_dbf, 3, "a_xport_failed");
2379 break; 2373 return ZFCP_ERP_FAILED;
2380 } 2374 }
2381 debug_text_event(adapter->erp_dbf, 6, "a_fstx_xok"); 2375 debug_text_event(adapter->erp_dbf, 6, "a_xport_ok");
2382 ZFCP_LOG_DEBUG("Xchange underway\n");
2383 2376
2384 /*
2385 * Why this works:
2386 * Both the normal completion handler as well as the timeout
2387 * handler will do an 'up' when the 'exchange port data'
2388 * request completes or times out. Thus, the signal to go on
2389 * won't be lost utilizing this semaphore.
2390 * Furthermore, this 'adapter_reopen' action is
2391 * guaranteed to be the only action being there (highest action
2392 * which prevents other actions from being created).
2393 * Resulting from that, the wake signal recognized here
2394 * _must_ be the one belonging to the 'exchange port
2395 * data' request.
2396 */
2397 down(&adapter->erp_ready_sem); 2377 down(&adapter->erp_ready_sem);
2398 if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) { 2378 if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) {
2399 ZFCP_LOG_INFO("error: exchange of port data " 2379 ZFCP_LOG_INFO("error: exchange of port data "
@@ -2401,29 +2381,19 @@ zfcp_erp_adapter_strategy_open_fsf_xport(struct zfcp_erp_action *erp_action)
2401 zfcp_get_busid_by_adapter(adapter)); 2381 zfcp_get_busid_by_adapter(adapter));
2402 break; 2382 break;
2403 } 2383 }
2404
2405 if (!atomic_test_mask(ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED, 2384 if (!atomic_test_mask(ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED,
2406 &adapter->status)) 2385 &adapter->status))
2407 break; 2386 break;
2408 2387
2409 ZFCP_LOG_DEBUG("host connection still initialising... " 2388 if (retries < ZFCP_EXCHANGE_PORT_DATA_SHORT_RETRIES) {
2410 "waiting and retrying...\n"); 2389 sleep = ZFCP_EXCHANGE_PORT_DATA_SHORT_SLEEP;
2411 /* sleep a little bit before retry */ 2390 retries++;
2412 sleep = retries < ZFCP_EXCHANGE_PORT_DATA_SHORT_RETRIES ? 2391 } else
2413 ZFCP_EXCHANGE_PORT_DATA_SHORT_SLEEP : 2392 sleep = ZFCP_EXCHANGE_PORT_DATA_LONG_SLEEP;
2414 ZFCP_EXCHANGE_PORT_DATA_LONG_SLEEP; 2393 schedule_timeout(sleep);
2415 msleep(jiffies_to_msecs(sleep)); 2394 } while (1);
2416 }
2417
2418 if (atomic_test_mask(ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED,
2419 &adapter->status)) {
2420 ZFCP_LOG_INFO("error: exchange of port data for "
2421 "adapter %s failed\n",
2422 zfcp_get_busid_by_adapter(adapter));
2423 retval = ZFCP_ERP_FAILED;
2424 }
2425 2395
2426 return retval; 2396 return ZFCP_ERP_SUCCEEDED;
2427} 2397}
2428 2398
2429/* 2399/*
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index 3b0fc1163f5f..59587951c847 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -554,6 +554,17 @@ static void
554zfcp_fsf_link_down_info_eval(struct zfcp_adapter *adapter, 554zfcp_fsf_link_down_info_eval(struct zfcp_adapter *adapter,
555 struct fsf_link_down_info *link_down) 555 struct fsf_link_down_info *link_down)
556{ 556{
557 if (atomic_test_mask(ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED,
558 &adapter->status))
559 return;
560
561 atomic_set_mask(ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED, &adapter->status);
562
563 if (link_down == NULL) {
564 zfcp_erp_adapter_reopen(adapter, 0);
565 return;
566 }
567
557 switch (link_down->error_code) { 568 switch (link_down->error_code) {
558 case FSF_PSQ_LINK_NO_LIGHT: 569 case FSF_PSQ_LINK_NO_LIGHT:
559 ZFCP_LOG_NORMAL("The local link to adapter %s is down " 570 ZFCP_LOG_NORMAL("The local link to adapter %s is down "
@@ -634,20 +645,15 @@ zfcp_fsf_link_down_info_eval(struct zfcp_adapter *adapter,
634 link_down->explanation_code, 645 link_down->explanation_code,
635 link_down->vendor_specific_code); 646 link_down->vendor_specific_code);
636 647
637 if (!atomic_test_mask(ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED, 648 switch (link_down->error_code) {
638 &adapter->status)) { 649 case FSF_PSQ_LINK_NO_LIGHT:
639 atomic_set_mask(ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED, 650 case FSF_PSQ_LINK_WRAP_PLUG:
640 &adapter->status); 651 case FSF_PSQ_LINK_NO_FCP:
641 switch (link_down->error_code) { 652 case FSF_PSQ_LINK_FIRMWARE_UPDATE:
642 case FSF_PSQ_LINK_NO_LIGHT: 653 zfcp_erp_adapter_reopen(adapter, 0);
643 case FSF_PSQ_LINK_WRAP_PLUG: 654 break;
644 case FSF_PSQ_LINK_NO_FCP: 655 default:
645 case FSF_PSQ_LINK_FIRMWARE_UPDATE: 656 zfcp_erp_adapter_failed(adapter);
646 zfcp_erp_adapter_reopen(adapter, 0);
647 break;
648 default:
649 zfcp_erp_adapter_failed(adapter);
650 }
651 } 657 }
652} 658}
653 659
@@ -919,30 +925,36 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
919 case FSF_STATUS_READ_SUB_NO_PHYSICAL_LINK: 925 case FSF_STATUS_READ_SUB_NO_PHYSICAL_LINK:
920 ZFCP_LOG_INFO("Physical link to adapter %s is down\n", 926 ZFCP_LOG_INFO("Physical link to adapter %s is down\n",
921 zfcp_get_busid_by_adapter(adapter)); 927 zfcp_get_busid_by_adapter(adapter));
928 zfcp_fsf_link_down_info_eval(adapter,
929 (struct fsf_link_down_info *)
930 &status_buffer->payload);
922 break; 931 break;
923 case FSF_STATUS_READ_SUB_FDISC_FAILED: 932 case FSF_STATUS_READ_SUB_FDISC_FAILED:
924 ZFCP_LOG_INFO("Local link to adapter %s is down " 933 ZFCP_LOG_INFO("Local link to adapter %s is down "
925 "due to failed FDISC login\n", 934 "due to failed FDISC login\n",
926 zfcp_get_busid_by_adapter(adapter)); 935 zfcp_get_busid_by_adapter(adapter));
936 zfcp_fsf_link_down_info_eval(adapter,
937 (struct fsf_link_down_info *)
938 &status_buffer->payload);
927 break; 939 break;
928 case FSF_STATUS_READ_SUB_FIRMWARE_UPDATE: 940 case FSF_STATUS_READ_SUB_FIRMWARE_UPDATE:
929 ZFCP_LOG_INFO("Local link to adapter %s is down " 941 ZFCP_LOG_INFO("Local link to adapter %s is down "
930 "due to firmware update on adapter\n", 942 "due to firmware update on adapter\n",
931 zfcp_get_busid_by_adapter(adapter)); 943 zfcp_get_busid_by_adapter(adapter));
944 zfcp_fsf_link_down_info_eval(adapter, NULL);
932 break; 945 break;
933 default: 946 default:
934 ZFCP_LOG_INFO("Local link to adapter %s is down " 947 ZFCP_LOG_INFO("Local link to adapter %s is down "
935 "due to unknown reason\n", 948 "due to unknown reason\n",
936 zfcp_get_busid_by_adapter(adapter)); 949 zfcp_get_busid_by_adapter(adapter));
950 zfcp_fsf_link_down_info_eval(adapter, NULL);
937 }; 951 };
938 zfcp_fsf_link_down_info_eval(adapter,
939 (struct fsf_link_down_info *) &status_buffer->payload);
940 break; 952 break;
941 953
942 case FSF_STATUS_READ_LINK_UP: 954 case FSF_STATUS_READ_LINK_UP:
943 ZFCP_LOG_NORMAL("Local link to adapter %s was replugged. " 955 ZFCP_LOG_NORMAL("Local link to adapter %s was replugged. "
944 "Restarting operations on this adapter\n", 956 "Restarting operations on this adapter\n",
945 zfcp_get_busid_by_adapter(adapter)); 957 zfcp_get_busid_by_adapter(adapter));
946 /* All ports should be marked as ready to run again */ 958 /* All ports should be marked as ready to run again */
947 zfcp_erp_modify_adapter_status(adapter, 959 zfcp_erp_modify_adapter_status(adapter,
948 ZFCP_STATUS_COMMON_RUNNING, 960 ZFCP_STATUS_COMMON_RUNNING,
@@ -2191,13 +2203,10 @@ zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action,
2191 return -EOPNOTSUPP; 2203 return -EOPNOTSUPP;
2192 } 2204 }
2193 2205
2194 timer = kmalloc(sizeof(struct timer_list), GFP_KERNEL);
2195 if (!timer)
2196 return -ENOMEM;
2197
2198 /* setup new FSF request */ 2206 /* setup new FSF request */
2199 retval = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA, 2207 retval = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA,
2200 0, 0, &lock_flags, &fsf_req); 2208 erp_action ? ZFCP_REQ_AUTO_CLEANUP : 0,
2209 0, &lock_flags, &fsf_req);
2201 if (retval < 0) { 2210 if (retval < 0) {
2202 ZFCP_LOG_INFO("error: Out of resources. Could not create an " 2211 ZFCP_LOG_INFO("error: Out of resources. Could not create an "
2203 "exchange port data request for" 2212 "exchange port data request for"
@@ -2205,25 +2214,33 @@ zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action,
2205 zfcp_get_busid_by_adapter(adapter)); 2214 zfcp_get_busid_by_adapter(adapter));
2206 write_unlock_irqrestore(&adapter->request_queue.queue_lock, 2215 write_unlock_irqrestore(&adapter->request_queue.queue_lock,
2207 lock_flags); 2216 lock_flags);
2208 goto out; 2217 return retval;
2209 }
2210
2211 if (erp_action) {
2212 erp_action->fsf_req = fsf_req;
2213 fsf_req->erp_action = erp_action;
2214 } 2218 }
2215 2219
2216 if (data) 2220 if (data)
2217 fsf_req->data = (unsigned long) data; 2221 fsf_req->data = (unsigned long) data;
2218 2222
2219 sbale = zfcp_qdio_sbale_req(fsf_req, fsf_req->sbal_curr, 0); 2223 sbale = zfcp_qdio_sbale_req(fsf_req, fsf_req->sbal_curr, 0);
2220 sbale[0].flags |= SBAL_FLAGS0_TYPE_READ; 2224 sbale[0].flags |= SBAL_FLAGS0_TYPE_READ;
2221 sbale[1].flags |= SBAL_FLAGS_LAST_ENTRY; 2225 sbale[1].flags |= SBAL_FLAGS_LAST_ENTRY;
2222 2226
2223 init_timer(timer); 2227 if (erp_action) {
2224 timer->function = zfcp_fsf_request_timeout_handler; 2228 erp_action->fsf_req = fsf_req;
2225 timer->data = (unsigned long) adapter; 2229 fsf_req->erp_action = erp_action;
2226 timer->expires = ZFCP_FSF_REQUEST_TIMEOUT; 2230 timer = &erp_action->timer;
2231 } else {
2232 timer = kmalloc(sizeof(struct timer_list), GFP_ATOMIC);
2233 if (!timer) {
2234 write_unlock_irqrestore(&adapter->request_queue.queue_lock,
2235 lock_flags);
2236 zfcp_fsf_req_free(fsf_req);
2237 return -ENOMEM;
2238 }
2239 init_timer(timer);
2240 timer->function = zfcp_fsf_request_timeout_handler;
2241 timer->data = (unsigned long) adapter;
2242 timer->expires = ZFCP_FSF_REQUEST_TIMEOUT;
2243 }
2227 2244
2228 retval = zfcp_fsf_req_send(fsf_req, timer); 2245 retval = zfcp_fsf_req_send(fsf_req, timer);
2229 if (retval) { 2246 if (retval) {
@@ -2233,23 +2250,22 @@ zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action,
2233 zfcp_fsf_req_free(fsf_req); 2250 zfcp_fsf_req_free(fsf_req);
2234 if (erp_action) 2251 if (erp_action)
2235 erp_action->fsf_req = NULL; 2252 erp_action->fsf_req = NULL;
2253 else
2254 kfree(timer);
2236 write_unlock_irqrestore(&adapter->request_queue.queue_lock, 2255 write_unlock_irqrestore(&adapter->request_queue.queue_lock,
2237 lock_flags); 2256 lock_flags);
2238 goto out; 2257 return retval;
2239 } 2258 }
2240 2259
2241 ZFCP_LOG_DEBUG("Exchange Port Data request initiated (adapter %s)\n", 2260 write_unlock_irqrestore(&adapter->request_queue.queue_lock, lock_flags);
2242 zfcp_get_busid_by_adapter(adapter));
2243
2244 write_unlock_irqrestore(&adapter->request_queue.queue_lock,
2245 lock_flags);
2246 2261
2247 wait_event(fsf_req->completion_wq, 2262 if (!erp_action) {
2248 fsf_req->status & ZFCP_STATUS_FSFREQ_COMPLETED); 2263 wait_event(fsf_req->completion_wq,
2249 del_timer_sync(timer); 2264 fsf_req->status & ZFCP_STATUS_FSFREQ_COMPLETED);
2250 zfcp_fsf_req_free(fsf_req); 2265 del_timer_sync(timer);
2251 out: 2266 zfcp_fsf_req_free(fsf_req);
2252 kfree(timer); 2267 kfree(timer);
2268 }
2253 return retval; 2269 return retval;
2254} 2270}
2255 2271
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index 3dcd1bfba3b4..66608d13a634 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -179,7 +179,7 @@ zfcp_scsi_slave_alloc(struct scsi_device *sdp)
179 struct zfcp_adapter *adapter; 179 struct zfcp_adapter *adapter;
180 struct zfcp_unit *unit; 180 struct zfcp_unit *unit;
181 unsigned long flags; 181 unsigned long flags;
182 int retval = -ENODEV; 182 int retval = -ENXIO;
183 183
184 adapter = (struct zfcp_adapter *) sdp->host->hostdata[0]; 184 adapter = (struct zfcp_adapter *) sdp->host->hostdata[0];
185 if (!adapter) 185 if (!adapter)
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index ab383d1f59e2..3cb68af90456 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -325,6 +325,8 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev,
325 * translations ( 64/32, 128/32, 255/63 ). 325 * translations ( 64/32, 128/32, 255/63 ).
326 */ 326 */
327 buf = scsi_bios_ptable(bdev); 327 buf = scsi_bios_ptable(bdev);
328 if (!buf)
329 return 0;
328 if(*(__le16 *)(buf + 0x40) == cpu_to_le16(0xaa55)) { 330 if(*(__le16 *)(buf + 0x40) == cpu_to_le16(0xaa55)) {
329 struct partition *first = (struct partition * )buf; 331 struct partition *first = (struct partition * )buf;
330 struct partition *entry = first; 332 struct partition *entry = first;
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
index 31e9f40e79a2..6aab9dacdeea 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -2105,7 +2105,7 @@ ahd_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag)
2105 scmd_id(cmd), 2105 scmd_id(cmd),
2106 scmd_channel(cmd) + 'A', 2106 scmd_channel(cmd) + 'A',
2107 CAM_LUN_WILDCARD, 2107 CAM_LUN_WILDCARD,
2108 SCB_LIST_NULL, ROLE_INITIATOR) == 0) 2108 SCB_LIST_NULL, ROLE_INITIATOR))
2109 break; 2109 break;
2110 } 2110 }
2111 } 2111 }
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index 7fc6454068e4..d866213f42b8 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -2169,7 +2169,7 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag)
2169 if (ahc_match_scb(ahc, pending_scb, scmd_id(cmd), 2169 if (ahc_match_scb(ahc, pending_scb, scmd_id(cmd),
2170 scmd_channel(cmd) + 'A', 2170 scmd_channel(cmd) + 'A',
2171 CAM_LUN_WILDCARD, 2171 CAM_LUN_WILDCARD,
2172 SCB_LIST_NULL, ROLE_INITIATOR) == 0) 2172 SCB_LIST_NULL, ROLE_INITIATOR))
2173 break; 2173 break;
2174 } 2174 }
2175 } 2175 }
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index c28e3aea1c3c..418fc7b896ac 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -816,7 +816,7 @@ static int adpt_hba_reset(adpt_hba* pHba)
816static void adpt_i2o_sys_shutdown(void) 816static void adpt_i2o_sys_shutdown(void)
817{ 817{
818 adpt_hba *pHba, *pNext; 818 adpt_hba *pHba, *pNext;
819 struct adpt_i2o_post_wait_data *p1, *p2; 819 struct adpt_i2o_post_wait_data *p1, *old;
820 820
821 printk(KERN_INFO"Shutting down Adaptec I2O controllers.\n"); 821 printk(KERN_INFO"Shutting down Adaptec I2O controllers.\n");
822 printk(KERN_INFO" This could take a few minutes if there are many devices attached\n"); 822 printk(KERN_INFO" This could take a few minutes if there are many devices attached\n");
@@ -830,13 +830,14 @@ static void adpt_i2o_sys_shutdown(void)
830 } 830 }
831 831
832 /* Remove any timedout entries from the wait queue. */ 832 /* Remove any timedout entries from the wait queue. */
833 p2 = NULL;
834// spin_lock_irqsave(&adpt_post_wait_lock, flags); 833// spin_lock_irqsave(&adpt_post_wait_lock, flags);
835 /* Nothing should be outstanding at this point so just 834 /* Nothing should be outstanding at this point so just
836 * free them 835 * free them
837 */ 836 */
838 for(p1 = adpt_post_wait_queue; p1; p2 = p1, p1 = p2->next) { 837 for(p1 = adpt_post_wait_queue; p1;) {
839 kfree(p1); 838 old = p1;
839 p1 = p1->next;
840 kfree(old);
840 } 841 }
841// spin_unlock_irqrestore(&adpt_post_wait_lock, flags); 842// spin_unlock_irqrestore(&adpt_post_wait_lock, flags);
842 adpt_post_wait_queue = NULL; 843 adpt_post_wait_queue = NULL;
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index 3b4ca55a3332..379e87089764 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -2239,7 +2239,7 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd)
2239 struct scsi_cmnd *cmd = qc->scsicmd; 2239 struct scsi_cmnd *cmd = qc->scsicmd;
2240 2240
2241 if ((tf->protocol = ata_scsi_map_proto(scsicmd[1])) == ATA_PROT_UNKNOWN) 2241 if ((tf->protocol = ata_scsi_map_proto(scsicmd[1])) == ATA_PROT_UNKNOWN)
2242 return 1; 2242 goto invalid_fld;
2243 2243
2244 /* 2244 /*
2245 * 12 and 16 byte CDBs use different offsets to 2245 * 12 and 16 byte CDBs use different offsets to
@@ -2301,7 +2301,7 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd)
2301 */ 2301 */
2302 if ((tf->command == ATA_CMD_SET_FEATURES) 2302 if ((tf->command == ATA_CMD_SET_FEATURES)
2303 && (tf->feature == SETFEATURES_XFER)) 2303 && (tf->feature == SETFEATURES_XFER))
2304 return 1; 2304 goto invalid_fld;
2305 2305
2306 /* 2306 /*
2307 * Set flags so that all registers will be written, 2307 * Set flags so that all registers will be written,
@@ -2322,6 +2322,11 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd)
2322 qc->nsect = cmd->bufflen / ATA_SECT_SIZE; 2322 qc->nsect = cmd->bufflen / ATA_SECT_SIZE;
2323 2323
2324 return 0; 2324 return 0;
2325
2326 invalid_fld:
2327 ata_scsi_set_sense(qc->scsicmd, ILLEGAL_REQUEST, 0x24, 0x00);
2328 /* "Invalid field in cdb" */
2329 return 1;
2325} 2330}
2326 2331
2327/** 2332/**
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index dfea346b00a5..f9792528e33f 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -380,23 +380,23 @@ megaraid_queue(Scsi_Cmnd *scmd, void (*done)(Scsi_Cmnd *))
380 380
381 spin_lock_irqsave(&adapter->lock, flags); 381 spin_lock_irqsave(&adapter->lock, flags);
382 scb = mega_build_cmd(adapter, scmd, &busy); 382 scb = mega_build_cmd(adapter, scmd, &busy);
383 if (!scb)
384 goto out;
383 385
384 if(scb) { 386 scb->state |= SCB_PENDQ;
385 scb->state |= SCB_PENDQ; 387 list_add_tail(&scb->list, &adapter->pending_list);
386 list_add_tail(&scb->list, &adapter->pending_list);
387 388
388 /* 389 /*
389 * Check if the HBA is in quiescent state, e.g., during a 390 * Check if the HBA is in quiescent state, e.g., during a
390 * delete logical drive opertion. If it is, don't run 391 * delete logical drive opertion. If it is, don't run
391 * the pending_list. 392 * the pending_list.
392 */ 393 */
393 if(atomic_read(&adapter->quiescent) == 0) { 394 if (atomic_read(&adapter->quiescent) == 0)
394 mega_runpendq(adapter); 395 mega_runpendq(adapter);
395 }
396 return 0;
397 }
398 spin_unlock_irqrestore(&adapter->lock, flags);
399 396
397 busy = 0;
398 out:
399 spin_unlock_irqrestore(&adapter->lock, flags);
400 return busy; 400 return busy;
401} 401}
402 402
@@ -4677,7 +4677,6 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
4677 4677
4678 adapter->flag = flag; 4678 adapter->flag = flag;
4679 spin_lock_init(&adapter->lock); 4679 spin_lock_init(&adapter->lock);
4680 scsi_assign_lock(host, &adapter->lock);
4681 4680
4682 host->cmd_per_lun = max_cmd_per_lun; 4681 host->cmd_per_lun = max_cmd_per_lun;
4683 host->max_sectors = max_sectors_per_io; 4682 host->max_sectors = max_sectors_per_io;
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index ce9d73a292e2..4afef5cdcb17 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -542,17 +542,10 @@ static void scsi_requeue_command(struct request_queue *q, struct scsi_cmnd *cmd)
542 542
543void scsi_next_command(struct scsi_cmnd *cmd) 543void scsi_next_command(struct scsi_cmnd *cmd)
544{ 544{
545 struct scsi_device *sdev = cmd->device; 545 struct request_queue *q = cmd->device->request_queue;
546 struct request_queue *q = sdev->request_queue;
547
548 /* need to hold a reference on the device before we let go of the cmd */
549 get_device(&sdev->sdev_gendev);
550 546
551 scsi_put_command(cmd); 547 scsi_put_command(cmd);
552 scsi_run_queue(q); 548 scsi_run_queue(q);
553
554 /* ok to remove device now */
555 put_device(&sdev->sdev_gendev);
556} 549}
557 550
558void scsi_run_host_queues(struct Scsi_Host *shost) 551void scsi_run_host_queues(struct Scsi_Host *shost)
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c
index 718a2bc4ed5e..38a53b5f9e9a 100644
--- a/drivers/scsi/scsi_transport_spi.c
+++ b/drivers/scsi/scsi_transport_spi.c
@@ -812,12 +812,10 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
812 if (!scsi_device_sync(sdev) && !scsi_device_dt(sdev)) 812 if (!scsi_device_sync(sdev) && !scsi_device_dt(sdev))
813 return; 813 return;
814 814
815 /* see if the device has an echo buffer. If it does we can 815 /* len == -1 is the signal that we need to ascertain the
816 * do the SPI pattern write tests */ 816 * presence of an echo buffer before trying to use it. len ==
817 817 * 0 means we don't have an echo buffer */
818 len = 0; 818 len = -1;
819 if (scsi_device_dt(sdev))
820 len = spi_dv_device_get_echo_buffer(sdev, buffer);
821 819
822 retry: 820 retry:
823 821
@@ -840,11 +838,23 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
840 if (spi_min_period(starget) == 8) 838 if (spi_min_period(starget) == 8)
841 DV_SET(pcomp_en, 1); 839 DV_SET(pcomp_en, 1);
842 } 840 }
841 /* Do the read only INQUIRY tests */
842 spi_dv_retrain(sdev, buffer, buffer + sdev->inquiry_len,
843 spi_dv_device_compare_inquiry);
844 /* See if we actually managed to negotiate and sustain DT */
845 if (i->f->get_dt)
846 i->f->get_dt(starget);
847
848 /* see if the device has an echo buffer. If it does we can do
849 * the SPI pattern write tests. Because of some broken
850 * devices, we *only* try this on a device that has actually
851 * negotiated DT */
852
853 if (len == -1 && spi_dt(starget))
854 len = spi_dv_device_get_echo_buffer(sdev, buffer);
843 855
844 if (len == 0) { 856 if (len <= 0) {
845 starget_printk(KERN_INFO, starget, "Domain Validation skipping write tests\n"); 857 starget_printk(KERN_INFO, starget, "Domain Validation skipping write tests\n");
846 spi_dv_retrain(sdev, buffer, buffer + len,
847 spi_dv_device_compare_inquiry);
848 return; 858 return;
849 } 859 }
850 860
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 72ec59456e69..b55c2a8a547c 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1860,9 +1860,11 @@ st_map_user_pages(struct scatterlist *sgl, const unsigned int max_pages,
1860 unlock_page(pages[j]); */ 1860 unlock_page(pages[j]); */
1861 res = 0; 1861 res = 0;
1862 out_unmap: 1862 out_unmap:
1863 if (res > 0) 1863 if (res > 0) {
1864 for (j=0; j < res; j++) 1864 for (j=0; j < res; j++)
1865 page_cache_release(pages[j]); 1865 page_cache_release(pages[j]);
1866 res = 0;
1867 }
1866 kfree(pages); 1868 kfree(pages);
1867 return res; 1869 return res;
1868} 1870}
@@ -1878,8 +1880,6 @@ st_unmap_user_pages(struct scatterlist *sgl, const unsigned int nr_pages,
1878 for (i=0; i < nr_pages; i++) { 1880 for (i=0; i < nr_pages; i++) {
1879 struct page *page = sgl[i].page; 1881 struct page *page = sgl[i].page;
1880 1882
1881 /* XXX: just for debug. Remove when PageReserved is removed */
1882 BUG_ON(PageReserved(page));
1883 if (dirtied) 1883 if (dirtied)
1884 SetPageDirty(page); 1884 SetPageDirty(page);
1885 /* unlock_page(page); */ 1885 /* unlock_page(page); */
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 770c4324f3d5..7ac6ea141fff 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -4509,6 +4509,7 @@ static int sgl_map_user_pages(struct scatterlist *sgl, const unsigned int max_pa
4509 if (res > 0) { 4509 if (res > 0) {
4510 for (j=0; j < res; j++) 4510 for (j=0; j < res; j++)
4511 page_cache_release(pages[j]); 4511 page_cache_release(pages[j]);
4512 res = 0;
4512 } 4513 }
4513 kfree(pages); 4514 kfree(pages);
4514 return res; 4515 return res;
@@ -4524,8 +4525,6 @@ static int sgl_unmap_user_pages(struct scatterlist *sgl, const unsigned int nr_p
4524 for (i=0; i < nr_pages; i++) { 4525 for (i=0; i < nr_pages; i++) {
4525 struct page *page = sgl[i].page; 4526 struct page *page = sgl[i].page;
4526 4527
4527 /* XXX: just for debug. Remove when PageReserved is removed */
4528 BUG_ON(PageReserved(page));
4529 if (dirtied) 4528 if (dirtied)
4530 SetPageDirty(page); 4529 SetPageDirty(page);
4531 /* FIXME: cache flush missing for rw==READ 4530 /* FIXME: cache flush missing for rw==READ
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index d76766c3ce16..7fc0b97173e1 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -2086,6 +2086,7 @@ static void sym2_set_dt(struct scsi_target *starget, int dt)
2086 tp->tgoal.check_nego = 1; 2086 tp->tgoal.check_nego = 1;
2087} 2087}
2088 2088
2089#if 0
2089static void sym2_set_iu(struct scsi_target *starget, int iu) 2090static void sym2_set_iu(struct scsi_target *starget, int iu)
2090{ 2091{
2091 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); 2092 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
@@ -2111,7 +2112,7 @@ static void sym2_set_qas(struct scsi_target *starget, int qas)
2111 tp->tgoal.qas = 0; 2112 tp->tgoal.qas = 0;
2112 tp->tgoal.check_nego = 1; 2113 tp->tgoal.check_nego = 1;
2113} 2114}
2114 2115#endif
2115 2116
2116static struct spi_function_template sym2_transport_functions = { 2117static struct spi_function_template sym2_transport_functions = {
2117 .set_offset = sym2_set_offset, 2118 .set_offset = sym2_set_offset,
@@ -2122,10 +2123,12 @@ static struct spi_function_template sym2_transport_functions = {
2122 .show_width = 1, 2123 .show_width = 1,
2123 .set_dt = sym2_set_dt, 2124 .set_dt = sym2_set_dt,
2124 .show_dt = 1, 2125 .show_dt = 1,
2126#if 0
2125 .set_iu = sym2_set_iu, 2127 .set_iu = sym2_set_iu,
2126 .show_iu = 1, 2128 .show_iu = 1,
2127 .set_qas = sym2_set_qas, 2129 .set_qas = sym2_set_qas,
2128 .show_qas = 1, 2130 .show_qas = 1,
2131#endif
2129 .get_signalling = sym2_get_signalling, 2132 .get_signalling = sym2_get_signalling,
2130}; 2133};
2131 2134
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index e08510d09ff6..d2bcd1f87cd6 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -102,7 +102,7 @@ static unsigned int share_irqs = SERIAL8250_SHARE_IRQS;
102#define SERIAL_PORT_DFNS 102#define SERIAL_PORT_DFNS
103#endif 103#endif
104 104
105static struct old_serial_port old_serial_port[] = { 105static const struct old_serial_port old_serial_port[] = {
106 SERIAL_PORT_DFNS /* defined in asm/serial.h */ 106 SERIAL_PORT_DFNS /* defined in asm/serial.h */
107}; 107};
108 108
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index 5c3c03932d6d..8d92adfbb8bd 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -468,7 +468,7 @@ static unsigned short timedia_eight_port[] = {
468 0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0 468 0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0
469}; 469};
470 470
471static struct timedia_struct { 471static const struct timedia_struct {
472 int num; 472 int num;
473 unsigned short *ids; 473 unsigned short *ids;
474} timedia_data[] = { 474} timedia_data[] = {
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 2331296e1e17..c17d680e3f04 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1779,7 +1779,7 @@ struct baud_rates {
1779 unsigned int cflag; 1779 unsigned int cflag;
1780}; 1780};
1781 1781
1782static struct baud_rates baud_rates[] = { 1782static const struct baud_rates baud_rates[] = {
1783 { 921600, B921600 }, 1783 { 921600, B921600 },
1784 { 460800, B460800 }, 1784 { 460800, B460800 },
1785 { 230400, B230400 }, 1785 { 230400, B230400 },
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index 2c7d3ef76e8e..7ce0c7e66d37 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -85,7 +85,7 @@ struct multi_id {
85 int multi; /* 1 = multifunction, > 1 = # ports */ 85 int multi; /* 1 = multifunction, > 1 = # ports */
86}; 86};
87 87
88static struct multi_id multi_id[] = { 88static const struct multi_id multi_id[] = {
89 { MANFID_OMEGA, PRODID_OMEGA_QSP_100, 4 }, 89 { MANFID_OMEGA, PRODID_OMEGA_QSP_100, 4 },
90 { MANFID_QUATECH, PRODID_QUATECH_DUAL_RS232, 2 }, 90 { MANFID_QUATECH, PRODID_QUATECH_DUAL_RS232, 2 },
91 { MANFID_QUATECH, PRODID_QUATECH_DUAL_RS232_D1, 2 }, 91 { MANFID_QUATECH, PRODID_QUATECH_DUAL_RS232_D1, 2 },
@@ -354,8 +354,8 @@ next_tuple(client_handle_t handle, tuple_t * tuple, cisparse_t * parse)
354 354
355static int simple_config(dev_link_t *link) 355static int simple_config(dev_link_t *link)
356{ 356{
357 static kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; 357 static const kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
358 static int size_table[2] = { 8, 16 }; 358 static const int size_table[2] = { 8, 16 };
359 client_handle_t handle = link->handle; 359 client_handle_t handle = link->handle;
360 struct serial_info *info = link->priv; 360 struct serial_info *info = link->priv;
361 struct serial_cfg_mem *cfg_mem; 361 struct serial_cfg_mem *cfg_mem;
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index 79861ee12a29..9d59dc62e6d2 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -787,6 +787,9 @@ static const struct usb_device_id cxacru_usb_ids[] = {
787 { /* V = Conexant P = ADSL modem (Hasbani project) */ 787 { /* V = Conexant P = ADSL modem (Hasbani project) */
788 USB_DEVICE(0x0572, 0xcb00), .driver_info = (unsigned long) &cxacru_cb00 788 USB_DEVICE(0x0572, 0xcb00), .driver_info = (unsigned long) &cxacru_cb00
789 }, 789 },
790 { /* V = Conexant P = ADSL modem (Well PTI-800 */
791 USB_DEVICE(0x0572, 0xcb02), .driver_info = (unsigned long) &cxacru_cb00
792 },
790 { /* V = Conexant P = ADSL modem */ 793 { /* V = Conexant P = ADSL modem */
791 USB_DEVICE(0x0572, 0xcb01), .driver_info = (unsigned long) &cxacru_cb00 794 USB_DEVICE(0x0572, 0xcb01), .driver_info = (unsigned long) &cxacru_cb00
792 }, 795 },
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
index c466739428b2..2e6593e6c1bd 100644
--- a/drivers/usb/atm/usbatm.c
+++ b/drivers/usb/atm/usbatm.c
@@ -879,7 +879,7 @@ static int usbatm_atm_init(struct usbatm_data *instance)
879 879
880 fail: 880 fail:
881 instance->atm_dev = NULL; 881 instance->atm_dev = NULL;
882 shutdown_atm_dev(atm_dev); /* usbatm_atm_dev_close will eventually be called */ 882 atm_dev_deregister(atm_dev); /* usbatm_atm_dev_close will eventually be called */
883 return ret; 883 return ret;
884} 884}
885 885
@@ -1164,7 +1164,7 @@ void usbatm_usb_disconnect(struct usb_interface *intf)
1164 1164
1165 /* ATM finalize */ 1165 /* ATM finalize */
1166 if (instance->atm_dev) 1166 if (instance->atm_dev)
1167 shutdown_atm_dev(instance->atm_dev); 1167 atm_dev_deregister(instance->atm_dev);
1168 1168
1169 usbatm_put_instance(instance); /* taken in usbatm_usb_probe */ 1169 usbatm_put_instance(instance); /* taken in usbatm_usb_probe */
1170} 1170}
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
index 5131d88e8c5b..29b5b2a6e183 100644
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -219,6 +219,7 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t message)
219 goto done; 219 goto done;
220 } 220 }
221 } 221 }
222 synchronize_irq(dev->irq);
222 223
223 /* FIXME until the generic PM interfaces change a lot more, this 224 /* FIXME until the generic PM interfaces change a lot more, this
224 * can't use PCI D1 and D2 states. For example, the confusion 225 * can't use PCI D1 and D2 states. For example, the confusion
@@ -392,7 +393,7 @@ int usb_hcd_pci_resume (struct pci_dev *dev)
392 393
393 dev->dev.power.power_state = PMSG_ON; 394 dev->dev.power.power_state = PMSG_ON;
394 395
395 hcd->saw_irq = 0; 396 clear_bit(HCD_FLAG_SAW_IRQ, &hcd->flags);
396 397
397 if (hcd->driver->resume) { 398 if (hcd->driver->resume) {
398 retval = hcd->driver->resume(hcd); 399 retval = hcd->driver->resume(hcd);
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 5e5f65a475ab..da24c31ee00d 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1315,11 +1315,12 @@ static int hcd_unlink_urb (struct urb *urb, int status)
1315 * finish unlinking the initial failed usb_set_address() 1315 * finish unlinking the initial failed usb_set_address()
1316 * or device descriptor fetch. 1316 * or device descriptor fetch.
1317 */ 1317 */
1318 if (!hcd->saw_irq && hcd->self.root_hub != urb->dev) { 1318 if (!test_bit(HCD_FLAG_SAW_IRQ, &hcd->flags)
1319 && hcd->self.root_hub != urb->dev) {
1319 dev_warn (hcd->self.controller, "Unlink after no-IRQ? " 1320 dev_warn (hcd->self.controller, "Unlink after no-IRQ? "
1320 "Controller is probably using the wrong IRQ." 1321 "Controller is probably using the wrong IRQ."
1321 "\n"); 1322 "\n");
1322 hcd->saw_irq = 1; 1323 set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags);
1323 } 1324 }
1324 1325
1325 urb->status = status; 1326 urb->status = status;
@@ -1649,13 +1650,15 @@ irqreturn_t usb_hcd_irq (int irq, void *__hcd, struct pt_regs * r)
1649 struct usb_hcd *hcd = __hcd; 1650 struct usb_hcd *hcd = __hcd;
1650 int start = hcd->state; 1651 int start = hcd->state;
1651 1652
1652 if (start == HC_STATE_HALT) 1653 if (unlikely(start == HC_STATE_HALT ||
1654 !test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)))
1653 return IRQ_NONE; 1655 return IRQ_NONE;
1654 if (hcd->driver->irq (hcd, r) == IRQ_NONE) 1656 if (hcd->driver->irq (hcd, r) == IRQ_NONE)
1655 return IRQ_NONE; 1657 return IRQ_NONE;
1656 1658
1657 hcd->saw_irq = 1; 1659 set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags);
1658 if (hcd->state == HC_STATE_HALT) 1660
1661 if (unlikely(hcd->state == HC_STATE_HALT))
1659 usb_hc_died (hcd); 1662 usb_hc_died (hcd);
1660 return IRQ_HANDLED; 1663 return IRQ_HANDLED;
1661} 1664}
@@ -1768,6 +1771,8 @@ int usb_add_hcd(struct usb_hcd *hcd,
1768 1771
1769 dev_info(hcd->self.controller, "%s\n", hcd->product_desc); 1772 dev_info(hcd->self.controller, "%s\n", hcd->product_desc);
1770 1773
1774 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
1775
1771 /* till now HC has been in an indeterminate state ... */ 1776 /* till now HC has been in an indeterminate state ... */
1772 if (hcd->driver->reset && (retval = hcd->driver->reset(hcd)) < 0) { 1777 if (hcd->driver->reset && (retval = hcd->driver->reset(hcd)) < 0) {
1773 dev_err(hcd->self.controller, "can't reset\n"); 1778 dev_err(hcd->self.controller, "can't reset\n");
diff --git a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h
index 24a62a2ff86d..c8a1b350e2cf 100644
--- a/drivers/usb/core/hcd.h
+++ b/drivers/usb/core/hcd.h
@@ -72,7 +72,12 @@ struct usb_hcd { /* usb_bus.hcpriv points to this */
72 * hardware info/state 72 * hardware info/state
73 */ 73 */
74 const struct hc_driver *driver; /* hw-specific hooks */ 74 const struct hc_driver *driver; /* hw-specific hooks */
75 unsigned saw_irq : 1; 75
76 /* Flags that need to be manipulated atomically */
77 unsigned long flags;
78#define HCD_FLAG_HW_ACCESSIBLE 0x00000001
79#define HCD_FLAG_SAW_IRQ 0x00000002
80
76 unsigned can_wakeup:1; /* hw supports wakeup? */ 81 unsigned can_wakeup:1; /* hw supports wakeup? */
77 unsigned remote_wakeup:1;/* sw should use wakeup? */ 82 unsigned remote_wakeup:1;/* sw should use wakeup? */
78 unsigned rh_registered:1;/* is root hub registered? */ 83 unsigned rh_registered:1;/* is root hub registered? */
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 441c26064b44..13f73a836e45 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -121,8 +121,8 @@ static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev)
121 return 0; 121 return 0;
122} 122}
123 123
124/* called by khubd or root hub (re)init threads; leaves HC in halt state */ 124/* called during probe() after chip reset completes */
125static int ehci_pci_reset(struct usb_hcd *hcd) 125static int ehci_pci_setup(struct usb_hcd *hcd)
126{ 126{
127 struct ehci_hcd *ehci = hcd_to_ehci(hcd); 127 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
128 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); 128 struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
@@ -141,6 +141,11 @@ static int ehci_pci_reset(struct usb_hcd *hcd)
141 if (retval) 141 if (retval)
142 return retval; 142 return retval;
143 143
144 /* data structure init */
145 retval = ehci_init(hcd);
146 if (retval)
147 return retval;
148
144 /* NOTE: only the parts below this line are PCI-specific */ 149 /* NOTE: only the parts below this line are PCI-specific */
145 150
146 switch (pdev->vendor) { 151 switch (pdev->vendor) {
@@ -154,7 +159,8 @@ static int ehci_pci_reset(struct usb_hcd *hcd)
154 /* AMD8111 EHCI doesn't work, according to AMD errata */ 159 /* AMD8111 EHCI doesn't work, according to AMD errata */
155 if (pdev->device == 0x7463) { 160 if (pdev->device == 0x7463) {
156 ehci_info(ehci, "ignoring AMD8111 (errata)\n"); 161 ehci_info(ehci, "ignoring AMD8111 (errata)\n");
157 return -EIO; 162 retval = -EIO;
163 goto done;
158 } 164 }
159 break; 165 break;
160 case PCI_VENDOR_ID_NVIDIA: 166 case PCI_VENDOR_ID_NVIDIA:
@@ -207,9 +213,8 @@ static int ehci_pci_reset(struct usb_hcd *hcd)
207 /* REVISIT: per-port wake capability (PCI 0x62) currently unused */ 213 /* REVISIT: per-port wake capability (PCI 0x62) currently unused */
208 214
209 retval = ehci_pci_reinit(ehci, pdev); 215 retval = ehci_pci_reinit(ehci, pdev);
210 216done:
211 /* finish init */ 217 return retval;
212 return ehci_init(hcd);
213} 218}
214 219
215/*-------------------------------------------------------------------------*/ 220/*-------------------------------------------------------------------------*/
@@ -228,14 +233,36 @@ static int ehci_pci_reset(struct usb_hcd *hcd)
228static int ehci_pci_suspend(struct usb_hcd *hcd, pm_message_t message) 233static int ehci_pci_suspend(struct usb_hcd *hcd, pm_message_t message)
229{ 234{
230 struct ehci_hcd *ehci = hcd_to_ehci(hcd); 235 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
236 unsigned long flags;
237 int rc = 0;
231 238
232 if (time_before(jiffies, ehci->next_statechange)) 239 if (time_before(jiffies, ehci->next_statechange))
233 msleep(10); 240 msleep(10);
234 241
242 /* Root hub was already suspended. Disable irq emission and
243 * mark HW unaccessible, bail out if RH has been resumed. Use
244 * the spinlock to properly synchronize with possible pending
245 * RH suspend or resume activity.
246 *
247 * This is still racy as hcd->state is manipulated outside of
248 * any locks =P But that will be a different fix.
249 */
250 spin_lock_irqsave (&ehci->lock, flags);
251 if (hcd->state != HC_STATE_SUSPENDED) {
252 rc = -EINVAL;
253 goto bail;
254 }
255 writel (0, &ehci->regs->intr_enable);
256 (void)readl(&ehci->regs->intr_enable);
257
258 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
259 bail:
260 spin_unlock_irqrestore (&ehci->lock, flags);
261
235 // could save FLADJ in case of Vaux power loss 262 // could save FLADJ in case of Vaux power loss
236 // ... we'd only use it to handle clock skew 263 // ... we'd only use it to handle clock skew
237 264
238 return 0; 265 return rc;
239} 266}
240 267
241static int ehci_pci_resume(struct usb_hcd *hcd) 268static int ehci_pci_resume(struct usb_hcd *hcd)
@@ -251,6 +278,9 @@ static int ehci_pci_resume(struct usb_hcd *hcd)
251 if (time_before(jiffies, ehci->next_statechange)) 278 if (time_before(jiffies, ehci->next_statechange))
252 msleep(100); 279 msleep(100);
253 280
281 /* Mark hardware accessible again as we are out of D3 state by now */
282 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
283
254 /* If CF is clear, we lost PCI Vaux power and need to restart. */ 284 /* If CF is clear, we lost PCI Vaux power and need to restart. */
255 if (readl(&ehci->regs->configured_flag) != FLAG_CF) 285 if (readl(&ehci->regs->configured_flag) != FLAG_CF)
256 goto restart; 286 goto restart;
@@ -319,7 +349,7 @@ static const struct hc_driver ehci_pci_hc_driver = {
319 /* 349 /*
320 * basic lifecycle operations 350 * basic lifecycle operations
321 */ 351 */
322 .reset = ehci_pci_reset, 352 .reset = ehci_pci_setup,
323 .start = ehci_run, 353 .start = ehci_run,
324#ifdef CONFIG_PM 354#ifdef CONFIG_PM
325 .suspend = ehci_pci_suspend, 355 .suspend = ehci_pci_suspend,
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index 5bb872c3496d..bf03ec0d8ee2 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -912,6 +912,7 @@ submit_async (
912 int epnum; 912 int epnum;
913 unsigned long flags; 913 unsigned long flags;
914 struct ehci_qh *qh = NULL; 914 struct ehci_qh *qh = NULL;
915 int rc = 0;
915 916
916 qtd = list_entry (qtd_list->next, struct ehci_qtd, qtd_list); 917 qtd = list_entry (qtd_list->next, struct ehci_qtd, qtd_list);
917 epnum = ep->desc.bEndpointAddress; 918 epnum = ep->desc.bEndpointAddress;
@@ -926,21 +927,28 @@ submit_async (
926#endif 927#endif
927 928
928 spin_lock_irqsave (&ehci->lock, flags); 929 spin_lock_irqsave (&ehci->lock, flags);
930 if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE,
931 &ehci_to_hcd(ehci)->flags))) {
932 rc = -ESHUTDOWN;
933 goto done;
934 }
935
929 qh = qh_append_tds (ehci, urb, qtd_list, epnum, &ep->hcpriv); 936 qh = qh_append_tds (ehci, urb, qtd_list, epnum, &ep->hcpriv);
937 if (unlikely(qh == NULL)) {
938 rc = -ENOMEM;
939 goto done;
940 }
930 941
931 /* Control/bulk operations through TTs don't need scheduling, 942 /* Control/bulk operations through TTs don't need scheduling,
932 * the HC and TT handle it when the TT has a buffer ready. 943 * the HC and TT handle it when the TT has a buffer ready.
933 */ 944 */
934 if (likely (qh != NULL)) { 945 if (likely (qh->qh_state == QH_STATE_IDLE))
935 if (likely (qh->qh_state == QH_STATE_IDLE)) 946 qh_link_async (ehci, qh_get (qh));
936 qh_link_async (ehci, qh_get (qh)); 947 done:
937 }
938 spin_unlock_irqrestore (&ehci->lock, flags); 948 spin_unlock_irqrestore (&ehci->lock, flags);
939 if (unlikely (qh == NULL)) { 949 if (unlikely (qh == NULL))
940 qtd_list_free (ehci, urb, qtd_list); 950 qtd_list_free (ehci, urb, qtd_list);
941 return -ENOMEM; 951 return rc;
942 }
943 return 0;
944} 952}
945 953
946/*-------------------------------------------------------------------------*/ 954/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index f0c8aa1ccd5d..57e77374d228 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -602,6 +602,12 @@ static int intr_submit (
602 602
603 spin_lock_irqsave (&ehci->lock, flags); 603 spin_lock_irqsave (&ehci->lock, flags);
604 604
605 if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE,
606 &ehci_to_hcd(ehci)->flags))) {
607 status = -ESHUTDOWN;
608 goto done;
609 }
610
605 /* get qh and force any scheduling errors */ 611 /* get qh and force any scheduling errors */
606 INIT_LIST_HEAD (&empty); 612 INIT_LIST_HEAD (&empty);
607 qh = qh_append_tds (ehci, urb, &empty, epnum, &ep->hcpriv); 613 qh = qh_append_tds (ehci, urb, &empty, epnum, &ep->hcpriv);
@@ -1456,7 +1462,11 @@ static int itd_submit (struct ehci_hcd *ehci, struct urb *urb,
1456 1462
1457 /* schedule ... need to lock */ 1463 /* schedule ... need to lock */
1458 spin_lock_irqsave (&ehci->lock, flags); 1464 spin_lock_irqsave (&ehci->lock, flags);
1459 status = iso_stream_schedule (ehci, urb, stream); 1465 if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE,
1466 &ehci_to_hcd(ehci)->flags)))
1467 status = -ESHUTDOWN;
1468 else
1469 status = iso_stream_schedule (ehci, urb, stream);
1460 if (likely (status == 0)) 1470 if (likely (status == 0))
1461 itd_link_urb (ehci, urb, ehci->periodic_size << 3, stream); 1471 itd_link_urb (ehci, urb, ehci->periodic_size << 3, stream);
1462 spin_unlock_irqrestore (&ehci->lock, flags); 1472 spin_unlock_irqrestore (&ehci->lock, flags);
@@ -1815,7 +1825,11 @@ static int sitd_submit (struct ehci_hcd *ehci, struct urb *urb,
1815 1825
1816 /* schedule ... need to lock */ 1826 /* schedule ... need to lock */
1817 spin_lock_irqsave (&ehci->lock, flags); 1827 spin_lock_irqsave (&ehci->lock, flags);
1818 status = iso_stream_schedule (ehci, urb, stream); 1828 if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE,
1829 &ehci_to_hcd(ehci)->flags)))
1830 status = -ESHUTDOWN;
1831 else
1832 status = iso_stream_schedule (ehci, urb, stream);
1819 if (status == 0) 1833 if (status == 0)
1820 sitd_link_urb (ehci, urb, ehci->periodic_size << 3, stream); 1834 sitd_link_urb (ehci, urb, ehci->periodic_size << 3, stream);
1821 spin_unlock_irqrestore (&ehci->lock, flags); 1835 spin_unlock_irqrestore (&ehci->lock, flags);
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 5c0c6c8a7a82..bf1d9abc07ac 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -115,7 +115,7 @@
115 115
116/*-------------------------------------------------------------------------*/ 116/*-------------------------------------------------------------------------*/
117 117
118// #define OHCI_VERBOSE_DEBUG /* not always helpful */ 118#undef OHCI_VERBOSE_DEBUG /* not always helpful */
119 119
120/* For initializing controller (mask in an HCFS mode too) */ 120/* For initializing controller (mask in an HCFS mode too) */
121#define OHCI_CONTROL_INIT OHCI_CTRL_CBSR 121#define OHCI_CONTROL_INIT OHCI_CTRL_CBSR
@@ -253,6 +253,10 @@ static int ohci_urb_enqueue (
253 spin_lock_irqsave (&ohci->lock, flags); 253 spin_lock_irqsave (&ohci->lock, flags);
254 254
255 /* don't submit to a dead HC */ 255 /* don't submit to a dead HC */
256 if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) {
257 retval = -ENODEV;
258 goto fail;
259 }
256 if (!HC_IS_RUNNING(hcd->state)) { 260 if (!HC_IS_RUNNING(hcd->state)) {
257 retval = -ENODEV; 261 retval = -ENODEV;
258 goto fail; 262 goto fail;
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index e01e77bc324b..72e3b12a1926 100644
--- a/drivers/usb/host/ohci-hub.c
+++ b/drivers/usb/host/ohci-hub.c
@@ -53,6 +53,11 @@ static int ohci_bus_suspend (struct usb_hcd *hcd)
53 53
54 spin_lock_irqsave (&ohci->lock, flags); 54 spin_lock_irqsave (&ohci->lock, flags);
55 55
56 if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))) {
57 spin_unlock_irqrestore (&ohci->lock, flags);
58 return -ESHUTDOWN;
59 }
60
56 ohci->hc_control = ohci_readl (ohci, &ohci->regs->control); 61 ohci->hc_control = ohci_readl (ohci, &ohci->regs->control);
57 switch (ohci->hc_control & OHCI_CTRL_HCFS) { 62 switch (ohci->hc_control & OHCI_CTRL_HCFS) {
58 case OHCI_USB_RESUME: 63 case OHCI_USB_RESUME:
@@ -140,11 +145,19 @@ static int ohci_bus_resume (struct usb_hcd *hcd)
140 struct ohci_hcd *ohci = hcd_to_ohci (hcd); 145 struct ohci_hcd *ohci = hcd_to_ohci (hcd);
141 u32 temp, enables; 146 u32 temp, enables;
142 int status = -EINPROGRESS; 147 int status = -EINPROGRESS;
148 unsigned long flags;
143 149
144 if (time_before (jiffies, ohci->next_statechange)) 150 if (time_before (jiffies, ohci->next_statechange))
145 msleep(5); 151 msleep(5);
146 152
147 spin_lock_irq (&ohci->lock); 153 spin_lock_irqsave (&ohci->lock, flags);
154
155 if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))) {
156 spin_unlock_irqrestore (&ohci->lock, flags);
157 return -ESHUTDOWN;
158 }
159
160
148 ohci->hc_control = ohci_readl (ohci, &ohci->regs->control); 161 ohci->hc_control = ohci_readl (ohci, &ohci->regs->control);
149 162
150 if (ohci->hc_control & (OHCI_CTRL_IR | OHCI_SCHED_ENABLES)) { 163 if (ohci->hc_control & (OHCI_CTRL_IR | OHCI_SCHED_ENABLES)) {
@@ -179,7 +192,7 @@ static int ohci_bus_resume (struct usb_hcd *hcd)
179 ohci_dbg (ohci, "lost power\n"); 192 ohci_dbg (ohci, "lost power\n");
180 status = -EBUSY; 193 status = -EBUSY;
181 } 194 }
182 spin_unlock_irq (&ohci->lock); 195 spin_unlock_irqrestore (&ohci->lock, flags);
183 if (status == -EBUSY) { 196 if (status == -EBUSY) {
184 (void) ohci_init (ohci); 197 (void) ohci_init (ohci);
185 return ohci_restart (ohci); 198 return ohci_restart (ohci);
@@ -297,8 +310,8 @@ ohci_hub_status_data (struct usb_hcd *hcd, char *buf)
297 /* handle autosuspended root: finish resuming before 310 /* handle autosuspended root: finish resuming before
298 * letting khubd or root hub timer see state changes. 311 * letting khubd or root hub timer see state changes.
299 */ 312 */
300 if ((ohci->hc_control & OHCI_CTRL_HCFS) != OHCI_USB_OPER 313 if (unlikely((ohci->hc_control & OHCI_CTRL_HCFS) != OHCI_USB_OPER
301 || !HC_IS_RUNNING(hcd->state)) { 314 || !HC_IS_RUNNING(hcd->state))) {
302 can_suspend = 0; 315 can_suspend = 0;
303 goto done; 316 goto done;
304 } 317 }
@@ -508,6 +521,9 @@ static int ohci_hub_control (
508 u32 temp; 521 u32 temp;
509 int retval = 0; 522 int retval = 0;
510 523
524 if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)))
525 return -ESHUTDOWN;
526
511 switch (typeReq) { 527 switch (typeReq) {
512 case ClearHubFeature: 528 case ClearHubFeature:
513 switch (wValue) { 529 switch (wValue) {
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c
index 5f22e6590cd1..1b09dde068e1 100644
--- a/drivers/usb/host/ohci-pci.c
+++ b/drivers/usb/host/ohci-pci.c
@@ -105,13 +105,36 @@ ohci_pci_start (struct usb_hcd *hcd)
105 105
106static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message) 106static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message)
107{ 107{
108 /* root hub was already suspended */ 108 struct ohci_hcd *ohci = hcd_to_ohci (hcd);
109 return 0; 109 unsigned long flags;
110 int rc = 0;
111
112 /* Root hub was already suspended. Disable irq emission and
113 * mark HW unaccessible, bail out if RH has been resumed. Use
114 * the spinlock to properly synchronize with possible pending
115 * RH suspend or resume activity.
116 *
117 * This is still racy as hcd->state is manipulated outside of
118 * any locks =P But that will be a different fix.
119 */
120 spin_lock_irqsave (&ohci->lock, flags);
121 if (hcd->state != HC_STATE_SUSPENDED) {
122 rc = -EINVAL;
123 goto bail;
124 }
125 ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
126 (void)ohci_readl(ohci, &ohci->regs->intrdisable);
127 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
128 bail:
129 spin_unlock_irqrestore (&ohci->lock, flags);
130
131 return rc;
110} 132}
111 133
112 134
113static int ohci_pci_resume (struct usb_hcd *hcd) 135static int ohci_pci_resume (struct usb_hcd *hcd)
114{ 136{
137 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
115 usb_hcd_resume_root_hub(hcd); 138 usb_hcd_resume_root_hub(hcd);
116 return 0; 139 return 0;
117} 140}
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index d33ce3982a5f..ed550132db0b 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -717,6 +717,7 @@ static int uhci_suspend(struct usb_hcd *hcd, pm_message_t message)
717 * at the source, so we must turn off PIRQ. 717 * at the source, so we must turn off PIRQ.
718 */ 718 */
719 pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, 0); 719 pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, 0);
720 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
720 uhci->hc_inaccessible = 1; 721 uhci->hc_inaccessible = 1;
721 hcd->poll_rh = 0; 722 hcd->poll_rh = 0;
722 723
@@ -733,6 +734,11 @@ static int uhci_resume(struct usb_hcd *hcd)
733 734
734 dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__); 735 dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__);
735 736
737 /* We aren't in D3 state anymore, we do that even if dead as I
738 * really don't want to keep a stale HCD_FLAG_HW_ACCESSIBLE=0
739 */
740 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
741
736 if (uhci->rh_state == UHCI_RH_RESET) /* Dead */ 742 if (uhci->rh_state == UHCI_RH_RESET) /* Dead */
737 return 0; 743 return 0;
738 spin_lock_irq(&uhci->lock); 744 spin_lock_irq(&uhci->lock);
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 25b6ca6ad081..3e470c8b4193 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -534,6 +534,12 @@ config FB_SUN3
534 bool "Sun3 framebuffer support" 534 bool "Sun3 framebuffer support"
535 depends on (FB = y) && (SUN3 || SUN3X) && BROKEN 535 depends on (FB = y) && (SUN3 || SUN3X) && BROKEN
536 536
537config FB_SBUS
538 bool "SBUS and UPA framebuffers"
539 depends on (FB = y) && (SPARC32 || SPARC64)
540 help
541 Say Y if you want support for SBUS or UPA based frame buffer device.
542
537config FB_BW2 543config FB_BW2
538 bool "BWtwo support" 544 bool "BWtwo support"
539 depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) 545 depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3)
@@ -546,6 +552,7 @@ config FB_BW2
546config FB_CG3 552config FB_CG3
547 bool "CGthree support" 553 bool "CGthree support"
548 depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) 554 depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3)
555 select FB_CFB_FILLRECT
549 select FB_CFB_COPYAREA 556 select FB_CFB_COPYAREA
550 select FB_CFB_IMAGEBLIT 557 select FB_CFB_IMAGEBLIT
551 help 558 help
@@ -1210,12 +1217,6 @@ config FB_AU1100
1210 1217
1211source "drivers/video/geode/Kconfig" 1218source "drivers/video/geode/Kconfig"
1212 1219
1213config FB_SBUS
1214 bool "SBUS and UPA framebuffers"
1215 depends on (FB = y) && (SPARC32 || SPARC64)
1216 help
1217 Say Y if you want support for SBUS or UPA based frame buffer device.
1218
1219config FB_FFB 1220config FB_FFB
1220 bool "Creator/Creator3D/Elite3D support" 1221 bool "Creator/Creator3D/Elite3D support"
1221 depends on FB_SBUS && SPARC64 1222 depends on FB_SBUS && SPARC64
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c
index 2858c5c8ba3c..e0dbdfc0c8b4 100644
--- a/drivers/video/cirrusfb.c
+++ b/drivers/video/cirrusfb.c
@@ -404,7 +404,7 @@ struct cirrusfb_info {
404 struct cirrusfb_regs currentmode; 404 struct cirrusfb_regs currentmode;
405 int blank_mode; 405 int blank_mode;
406 406
407 u32 pseudo_palette[17]; 407 u32 pseudo_palette[16];
408 struct { u8 red, green, blue, pad; } palette[256]; 408 struct { u8 red, green, blue, pad; } palette[256];
409 409
410#ifdef CONFIG_ZORRO 410#ifdef CONFIG_ZORRO
@@ -1603,14 +1603,14 @@ static int cirrusfb_setcolreg (unsigned regno, unsigned red, unsigned green,
1603 1603
1604 switch (info->var.bits_per_pixel) { 1604 switch (info->var.bits_per_pixel) {
1605 case 8: 1605 case 8:
1606 ((u8*)(info->pseudo_palette))[regno] = v; 1606 cinfo->pseudo_palette[regno] = v;
1607 break; 1607 break;
1608 case 16: 1608 case 16:
1609 ((u16*)(info->pseudo_palette))[regno] = v; 1609 cinfo->pseudo_palette[regno] = v;
1610 break; 1610 break;
1611 case 24: 1611 case 24:
1612 case 32: 1612 case 32:
1613 ((u32*)(info->pseudo_palette))[regno] = v; 1613 cinfo->pseudo_palette[regno] = v;
1614 break; 1614 break;
1615 } 1615 }
1616 return 0; 1616 return 0;
@@ -2020,18 +2020,21 @@ static void cirrusfb_prim_fillrect(struct cirrusfb_info *cinfo,
2020 const struct fb_fillrect *region) 2020 const struct fb_fillrect *region)
2021{ 2021{
2022 int m; /* bytes per pixel */ 2022 int m; /* bytes per pixel */
2023 u32 color = (cinfo->info->fix.visual == FB_VISUAL_TRUECOLOR) ?
2024 cinfo->pseudo_palette[region->color] : region->color;
2025
2023 if(cinfo->info->var.bits_per_pixel == 1) { 2026 if(cinfo->info->var.bits_per_pixel == 1) {
2024 cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel, 2027 cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel,
2025 region->dx / 8, region->dy, 2028 region->dx / 8, region->dy,
2026 region->width / 8, region->height, 2029 region->width / 8, region->height,
2027 region->color, 2030 color,
2028 cinfo->currentmode.line_length); 2031 cinfo->currentmode.line_length);
2029 } else { 2032 } else {
2030 m = ( cinfo->info->var.bits_per_pixel + 7 ) / 8; 2033 m = ( cinfo->info->var.bits_per_pixel + 7 ) / 8;
2031 cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel, 2034 cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel,
2032 region->dx * m, region->dy, 2035 region->dx * m, region->dy,
2033 region->width * m, region->height, 2036 region->width * m, region->height,
2034 region->color, 2037 color,
2035 cinfo->currentmode.line_length); 2038 cinfo->currentmode.line_length);
2036 } 2039 }
2037 return; 2040 return;
diff --git a/drivers/video/console/fbcon_ccw.c b/drivers/video/console/fbcon_ccw.c
index 3afd1eeb1ade..4952b66ae206 100644
--- a/drivers/video/console/fbcon_ccw.c
+++ b/drivers/video/console/fbcon_ccw.c
@@ -34,7 +34,7 @@ static inline void ccw_update_attr(u8 *dst, u8 *src, int attribute,
34 msk <<= (8 - mod); 34 msk <<= (8 - mod);
35 35
36 if (offset > mod) 36 if (offset > mod)
37 set_bit(FBCON_BIT(7), (void *)&msk1); 37 msk1 |= 0x01;
38 38
39 for (i = 0; i < vc->vc_font.width; i++) { 39 for (i = 0; i < vc->vc_font.width; i++) {
40 for (j = 0; j < width; j++) { 40 for (j = 0; j < width; j++) {
diff --git a/drivers/video/console/fbcon_rotate.h b/drivers/video/console/fbcon_rotate.h
index e504fbf5c604..1b8f92fdc6a8 100644
--- a/drivers/video/console/fbcon_rotate.h
+++ b/drivers/video/console/fbcon_rotate.h
@@ -21,21 +21,13 @@
21 (s == SCROLL_REDRAW || s == SCROLL_MOVE || !(i)->fix.xpanstep) ? \ 21 (s == SCROLL_REDRAW || s == SCROLL_MOVE || !(i)->fix.xpanstep) ? \
22 (i)->var.xres : (i)->var.xres_virtual; }) 22 (i)->var.xres : (i)->var.xres_virtual; })
23 23
24/*
25 * The bitmap is always big endian
26 */
27#if defined(__LITTLE_ENDIAN)
28#define FBCON_BIT(b) (7 - (b))
29#else
30#define FBCON_BIT(b) (b)
31#endif
32 24
33static inline int pattern_test_bit(u32 x, u32 y, u32 pitch, const char *pat) 25static inline int pattern_test_bit(u32 x, u32 y, u32 pitch, const char *pat)
34{ 26{
35 u32 tmp = (y * pitch) + x, index = tmp / 8, bit = tmp % 8; 27 u32 tmp = (y * pitch) + x, index = tmp / 8, bit = tmp % 8;
36 28
37 pat +=index; 29 pat +=index;
38 return (test_bit(FBCON_BIT(bit), (void *)pat)); 30 return (*pat) & (0x80 >> bit);
39} 31}
40 32
41static inline void pattern_set_bit(u32 x, u32 y, u32 pitch, char *pat) 33static inline void pattern_set_bit(u32 x, u32 y, u32 pitch, char *pat)
@@ -43,7 +35,8 @@ static inline void pattern_set_bit(u32 x, u32 y, u32 pitch, char *pat)
43 u32 tmp = (y * pitch) + x, index = tmp / 8, bit = tmp % 8; 35 u32 tmp = (y * pitch) + x, index = tmp / 8, bit = tmp % 8;
44 36
45 pat += index; 37 pat += index;
46 set_bit(FBCON_BIT(bit), (void *)pat); 38
39 (*pat) |= 0x80 >> bit;
47} 40}
48 41
49static inline void rotate_ud(const char *in, char *out, u32 width, u32 height) 42static inline void rotate_ud(const char *in, char *out, u32 width, u32 height)
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 9f180096c896..6240aedb4154 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -452,13 +452,17 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
452 452
453 /* Return if no suitable logo was found */ 453 /* Return if no suitable logo was found */
454 fb_logo.logo = fb_find_logo(depth); 454 fb_logo.logo = fb_find_logo(depth);
455
456 if (!fb_logo.logo) {
457 return 0;
458 }
455 459
456 if (rotate == FB_ROTATE_UR || rotate == FB_ROTATE_UD) 460 if (rotate == FB_ROTATE_UR || rotate == FB_ROTATE_UD)
457 yres = info->var.yres; 461 yres = info->var.yres;
458 else 462 else
459 yres = info->var.xres; 463 yres = info->var.xres;
460 464
461 if (fb_logo.logo && fb_logo.logo->height > yres) { 465 if (fb_logo.logo->height > yres) {
462 fb_logo.logo = NULL; 466 fb_logo.logo = NULL;
463 return 0; 467 return 0;
464 } 468 }
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index be7288184fa9..0ea965c3bb7d 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -427,6 +427,8 @@ v9fs_create(struct inode *dir,
427 427
428 v9fs_mistat2inode(fcall->params.rstat.stat, file_inode, sb); 428 v9fs_mistat2inode(fcall->params.rstat.stat, file_inode, sb);
429 kfree(fcall); 429 kfree(fcall);
430 fcall = NULL;
431 file_dentry->d_op = &v9fs_dentry_operations;
430 d_instantiate(file_dentry, file_inode); 432 d_instantiate(file_dentry, file_inode);
431 433
432 if (perm & V9FS_DMDIR) { 434 if (perm & V9FS_DMDIR) {
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES
index 6bded10c0d50..943ef9b82244 100644
--- a/fs/cifs/CHANGES
+++ b/fs/cifs/CHANGES
@@ -1,10 +1,12 @@
1Version 1.39 1Version 1.39
2------------ 2------------
3Defer close of a file handle slightly if pending writes depend on that file handle 3Defer close of a file handle slightly if pending writes depend on that handle
4(this reduces the EBADF bad file handle errors that can be logged under heavy 4(this reduces the EBADF bad file handle errors that can be logged under heavy
5stress on writes). Modify cifs Kconfig options to expose CONFIG_CIFS_STATS2 5stress on writes). Modify cifs Kconfig options to expose CONFIG_CIFS_STATS2
6Fix SFU style symlinks and mknod needed for servers which do not support the CIFS 6Fix SFU style symlinks and mknod needed for servers which do not support the
7Unix Extensions. Fix setfacl/getfacl on bigendian. 7CIFS Unix Extensions. Fix setfacl/getfacl on bigendian. Timeout negative
8dentries so files that the client sees as deleted but that later get created
9on the server will be recognized. Add client side permission check on setattr.
8 10
9Version 1.38 11Version 1.38
10------------ 12------------
diff --git a/fs/cifs/README b/fs/cifs/README
index bb90941826ad..e5d09a2fc7a5 100644
--- a/fs/cifs/README
+++ b/fs/cifs/README
@@ -278,7 +278,9 @@ A partial list of the supported mount options follows:
278 (such as Windows), permissions can also be checked at the 278 (such as Windows), permissions can also be checked at the
279 client, and a crude form of client side permission checking 279 client, and a crude form of client side permission checking
280 can be enabled by specifying file_mode and dir_mode on 280 can be enabled by specifying file_mode and dir_mode on
281 the client 281 the client. Note that the mount.cifs helper must be
282 at version 1.10 or higher to support specifying the uid
283 (or gid) in non-numberic form.
282 gid If CIFS Unix extensions are not supported by the server 284 gid If CIFS Unix extensions are not supported by the server
283 this overrides the default gid for inodes. 285 this overrides the default gid for inodes.
284 file_mode If CIFS Unix extensions are not supported by the server 286 file_mode If CIFS Unix extensions are not supported by the server
@@ -345,7 +347,10 @@ A partial list of the supported mount options follows:
345 client system. It is typically only needed when the server 347 client system. It is typically only needed when the server
346 supports the CIFS Unix Extensions but the UIDs/GIDs on the 348 supports the CIFS Unix Extensions but the UIDs/GIDs on the
347 client and server system do not match closely enough to allow 349 client and server system do not match closely enough to allow
348 access by the user doing the mount. 350 access by the user doing the mount, but it may be useful with
351 non CIFS Unix Extension mounts for cases in which the default
352 mode is specified on the mount but is not to be enforced on the
353 client (e.g. perhaps when MultiUserMount is enabled)
349 Note that this does not affect the normal ACL check on the 354 Note that this does not affect the normal ACL check on the
350 target machine done by the server software (of the server 355 target machine done by the server software (of the server
351 ACL against the user name provided at mount time). 356 ACL against the user name provided at mount time).
@@ -368,15 +373,21 @@ A partial list of the supported mount options follows:
368 setuids If the CIFS Unix extensions are negotiated with the server 373 setuids If the CIFS Unix extensions are negotiated with the server
369 the client will attempt to set the effective uid and gid of 374 the client will attempt to set the effective uid and gid of
370 the local process on newly created files, directories, and 375 the local process on newly created files, directories, and
371 devices (create, mkdir, mknod). 376 devices (create, mkdir, mknod). If the CIFS Unix Extensions
377 are not negotiated, for newly created files and directories
378 instead of using the default uid and gid specified on the
379 the mount, cache the new file's uid and gid locally which means
380 that the uid for the file can change when the inode is
381 reloaded (or the user remounts the share).
372 nosetuids The client will not attempt to set the uid and gid on 382 nosetuids The client will not attempt to set the uid and gid on
373 on newly created files, directories, and devices (create, 383 on newly created files, directories, and devices (create,
374 mkdir, mknod) which will result in the server setting the 384 mkdir, mknod) which will result in the server setting the
375 uid and gid to the default (usually the server uid of the 385 uid and gid to the default (usually the server uid of the
376 user who mounted the share). Letting the server (rather than 386 user who mounted the share). Letting the server (rather than
377 the client) set the uid and gid is the default. This 387 the client) set the uid and gid is the default. If the CIFS
378 parameter has no effect if the CIFS Unix Extensions are not 388 Unix Extensions are not negotiated then the uid and gid for
379 negotiated. 389 new files will appear to be the uid (gid) of the mounter or the
390 uid (gid) parameter specified on the mount.
380 netbiosname When mounting to servers via port 139, specifies the RFC1001 391 netbiosname When mounting to servers via port 139, specifies the RFC1001
381 source name to use to represent the client netbios machine 392 source name to use to represent the client netbios machine
382 name when doing the RFC1001 netbios session initialize. 393 name when doing the RFC1001 netbios session initialize.
@@ -418,6 +429,13 @@ A partial list of the supported mount options follows:
418 byte range locks). 429 byte range locks).
419 remount remount the share (often used to change from ro to rw mounts 430 remount remount the share (often used to change from ro to rw mounts
420 or vice versa) 431 or vice versa)
432 sfu When the CIFS Unix Extensions are not negotiated, attempt to
433 create device files and fifos in a format compatible with
434 Services for Unix (SFU). In addition retrieve bits 10-12
435 of the mode via the SETFILEBITS extended attribute (as
436 SFU does). In the future the bottom 9 bits of the mode
437 mode also will be emulated using queries of the security
438 descriptor (ACL).
421 439
422The mount.cifs mount helper also accepts a few mount options before -o 440The mount.cifs mount helper also accepts a few mount options before -o
423including: 441including:
diff --git a/fs/cifs/TODO b/fs/cifs/TODO
index c909298d11ed..fc34c74ec4be 100644
--- a/fs/cifs/TODO
+++ b/fs/cifs/TODO
@@ -1,4 +1,4 @@
1version 1.37 October 9, 2005 1Version 1.39 November 30, 2005
2 2
3A Partial List of Missing Features 3A Partial List of Missing Features
4================================== 4==================================
@@ -58,7 +58,7 @@ o) Improve performance of readpages by sending more than one read
58at a time when 8 pages or more are requested. In conjuntion 58at a time when 8 pages or more are requested. In conjuntion
59add support for async_cifs_readpages. 59add support for async_cifs_readpages.
60 60
61p) Add support for storing symlink and fifo info to Windows servers 61p) Add support for storing symlink info to Windows servers
62in the Extended Attribute format their SFU clients would recognize. 62in the Extended Attribute format their SFU clients would recognize.
63 63
64q) Finish fcntl D_NOTIFY support so kde and gnome file list windows 64q) Finish fcntl D_NOTIFY support so kde and gnome file list windows
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 51548ed2e9cc..2a13a2bac8f1 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -32,6 +32,7 @@
32#include <linux/seq_file.h> 32#include <linux/seq_file.h>
33#include <linux/vfs.h> 33#include <linux/vfs.h>
34#include <linux/mempool.h> 34#include <linux/mempool.h>
35#include <linux/delay.h>
35#include "cifsfs.h" 36#include "cifsfs.h"
36#include "cifspdu.h" 37#include "cifspdu.h"
37#define DECLARE_GLOBALS_HERE 38#define DECLARE_GLOBALS_HERE
@@ -429,6 +430,11 @@ static void cifs_umount_begin(struct super_block * sblock)
429 { 430 {
430 cFYI(1,("wake up tasks now - umount begin not complete")); 431 cFYI(1,("wake up tasks now - umount begin not complete"));
431 wake_up_all(&tcon->ses->server->request_q); 432 wake_up_all(&tcon->ses->server->request_q);
433 wake_up_all(&tcon->ses->server->response_q);
434 msleep(1); /* yield */
435 /* we have to kick the requests once more */
436 wake_up_all(&tcon->ses->server->response_q);
437 msleep(1);
432 } 438 }
433/* BB FIXME - finish add checks for tidStatus BB */ 439/* BB FIXME - finish add checks for tidStatus BB */
434 440
@@ -895,6 +901,9 @@ static int cifs_oplock_thread(void * dummyarg)
895 901
896static int cifs_dnotify_thread(void * dummyarg) 902static int cifs_dnotify_thread(void * dummyarg)
897{ 903{
904 struct list_head *tmp;
905 struct cifsSesInfo *ses;
906
898 daemonize("cifsdnotifyd"); 907 daemonize("cifsdnotifyd");
899 allow_signal(SIGTERM); 908 allow_signal(SIGTERM);
900 909
@@ -903,7 +912,19 @@ static int cifs_dnotify_thread(void * dummyarg)
903 if(try_to_freeze()) 912 if(try_to_freeze())
904 continue; 913 continue;
905 set_current_state(TASK_INTERRUPTIBLE); 914 set_current_state(TASK_INTERRUPTIBLE);
906 schedule_timeout(39*HZ); 915 schedule_timeout(15*HZ);
916 read_lock(&GlobalSMBSeslock);
917 /* check if any stuck requests that need
918 to be woken up and wakeq so the
919 thread can wake up and error out */
920 list_for_each(tmp, &GlobalSMBSessionList) {
921 ses = list_entry(tmp, struct cifsSesInfo,
922 cifsSessionList);
923 if(ses && ses->server &&
924 atomic_read(&ses->server->inFlight))
925 wake_up_all(&ses->server->response_q);
926 }
927 read_unlock(&GlobalSMBSeslock);
907 } while(!signal_pending(current)); 928 } while(!signal_pending(current));
908 complete_and_exit (&cifs_dnotify_exited, 0); 929 complete_and_exit (&cifs_dnotify_exited, 0);
909} 930}
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index d179b0c3eee4..6867e556d37e 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -90,6 +90,18 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
90 check for tcp and smb session status done differently 90 check for tcp and smb session status done differently
91 for those three - in the calling routine */ 91 for those three - in the calling routine */
92 if(tcon) { 92 if(tcon) {
93 if(tcon->tidStatus == CifsExiting) {
94 /* only tree disconnect, open, and write,
95 (and ulogoff which does not have tcon)
96 are allowed as we start force umount */
97 if((smb_command != SMB_COM_WRITE_ANDX) &&
98 (smb_command != SMB_COM_OPEN_ANDX) &&
99 (smb_command != SMB_COM_TREE_DISCONNECT)) {
100 cFYI(1,("can not send cmd %d while umounting",
101 smb_command));
102 return -ENODEV;
103 }
104 }
93 if((tcon->ses) && (tcon->ses->status != CifsExiting) && 105 if((tcon->ses) && (tcon->ses->status != CifsExiting) &&
94 (tcon->ses->server)){ 106 (tcon->ses->server)){
95 struct nls_table *nls_codepage; 107 struct nls_table *nls_codepage;
@@ -187,6 +199,19 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
187 check for tcp and smb session status done differently 199 check for tcp and smb session status done differently
188 for those three - in the calling routine */ 200 for those three - in the calling routine */
189 if(tcon) { 201 if(tcon) {
202 if(tcon->tidStatus == CifsExiting) {
203 /* only tree disconnect, open, and write,
204 (and ulogoff which does not have tcon)
205 are allowed as we start force umount */
206 if((smb_command != SMB_COM_WRITE_ANDX) &&
207 (smb_command != SMB_COM_OPEN_ANDX) &&
208 (smb_command != SMB_COM_TREE_DISCONNECT)) {
209 cFYI(1,("can not send cmd %d while umounting",
210 smb_command));
211 return -ENODEV;
212 }
213 }
214
190 if((tcon->ses) && (tcon->ses->status != CifsExiting) && 215 if((tcon->ses) && (tcon->ses->status != CifsExiting) &&
191 (tcon->ses->server)){ 216 (tcon->ses->server)){
192 struct nls_table *nls_codepage; 217 struct nls_table *nls_codepage;
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 16b21522e8fe..32cc96cafa3e 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -228,8 +228,15 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
228 else { 228 else {
229 rc = cifs_get_inode_info(&newinode, full_path, 229 rc = cifs_get_inode_info(&newinode, full_path,
230 buf, inode->i_sb,xid); 230 buf, inode->i_sb,xid);
231 if(newinode) 231 if(newinode) {
232 newinode->i_mode = mode; 232 newinode->i_mode = mode;
233 if((oplock & CIFS_CREATE_ACTION) &&
234 (cifs_sb->mnt_cifs_flags &
235 CIFS_MOUNT_SET_UID)) {
236 newinode->i_uid = current->fsuid;
237 newinode->i_gid = current->fsgid;
238 }
239 }
233 } 240 }
234 241
235 if (rc != 0) { 242 if (rc != 0) {
@@ -465,12 +472,20 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, struct name
465 direntry->d_op = &cifs_dentry_ops; 472 direntry->d_op = &cifs_dentry_ops;
466 d_add(direntry, newInode); 473 d_add(direntry, newInode);
467 474
468 /* since paths are not looked up by component - the parent directories are presumed to be good here */ 475 /* since paths are not looked up by component - the parent
476 directories are presumed to be good here */
469 renew_parental_timestamps(direntry); 477 renew_parental_timestamps(direntry);
470 478
471 } else if (rc == -ENOENT) { 479 } else if (rc == -ENOENT) {
472 rc = 0; 480 rc = 0;
481 direntry->d_time = jiffies;
482 if (pTcon->nocase)
483 direntry->d_op = &cifs_ci_dentry_ops;
484 else
485 direntry->d_op = &cifs_dentry_ops;
473 d_add(direntry, NULL); 486 d_add(direntry, NULL);
487 /* if it was once a directory (but how can we tell?) we could do
488 shrink_dcache_parent(direntry); */
474 } else { 489 } else {
475 cERROR(1,("Error 0x%x on cifs_get_inode_info in lookup of %s", 490 cERROR(1,("Error 0x%x on cifs_get_inode_info in lookup of %s",
476 rc,full_path)); 491 rc,full_path));
@@ -489,21 +504,20 @@ cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd)
489{ 504{
490 int isValid = 1; 505 int isValid = 1;
491 506
492/* lock_kernel(); *//* surely we do not want to lock the kernel for a whole network round trip which could take seconds */
493
494 if (direntry->d_inode) { 507 if (direntry->d_inode) {
495 if (cifs_revalidate(direntry)) { 508 if (cifs_revalidate(direntry)) {
496 /* unlock_kernel(); */
497 return 0; 509 return 0;
498 } 510 }
499 } else { 511 } else {
500 cFYI(1, 512 cFYI(1, ("neg dentry 0x%p name = %s",
501 ("In cifs_d_revalidate with no inode but name = %s and dentry 0x%p", 513 direntry, direntry->d_name.name));
502 direntry->d_name.name, direntry)); 514 if(time_after(jiffies, direntry->d_time + HZ) ||
515 !lookupCacheEnabled) {
516 d_drop(direntry);
517 isValid = 0;
518 }
503 } 519 }
504 520
505/* unlock_kernel(); */
506
507 return isValid; 521 return isValid;
508} 522}
509 523
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 05b525812adb..411c1f7f84da 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -710,7 +710,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
710 char *full_path = NULL; 710 char *full_path = NULL;
711 struct inode *newinode = NULL; 711 struct inode *newinode = NULL;
712 712
713 cFYI(1, ("In cifs_mkdir, mode = 0x%x inode = 0x%p ", mode, inode)); 713 cFYI(1, ("In cifs_mkdir, mode = 0x%x inode = 0x%p", mode, inode));
714 714
715 xid = GetXid(); 715 xid = GetXid();
716 716
@@ -768,6 +768,17 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
768 /* BB to be implemented via Windows secrty descriptors 768 /* BB to be implemented via Windows secrty descriptors
769 eg CIFSSMBWinSetPerms(xid, pTcon, full_path, mode, 769 eg CIFSSMBWinSetPerms(xid, pTcon, full_path, mode,
770 -1, -1, local_nls); */ 770 -1, -1, local_nls); */
771 if(direntry->d_inode) {
772 direntry->d_inode->i_mode = mode;
773 direntry->d_inode->i_mode |= S_IFDIR;
774 if(cifs_sb->mnt_cifs_flags &
775 CIFS_MOUNT_SET_UID) {
776 direntry->d_inode->i_uid =
777 current->fsuid;
778 direntry->d_inode->i_gid =
779 current->fsgid;
780 }
781 }
771 } 782 }
772 } 783 }
773 kfree(full_path); 784 kfree(full_path);
@@ -1039,14 +1050,20 @@ int cifs_revalidate(struct dentry *direntry)
1039 filemap_fdatawrite(direntry->d_inode->i_mapping); 1050 filemap_fdatawrite(direntry->d_inode->i_mapping);
1040 } 1051 }
1041 if (invalidate_inode) { 1052 if (invalidate_inode) {
1042 if (direntry->d_inode->i_mapping) 1053 /* shrink_dcache not necessary now that cifs dentry ops
1043 filemap_fdatawait(direntry->d_inode->i_mapping); 1054 are exported for negative dentries */
1044 /* may eventually have to do this for open files too */ 1055/* if(S_ISDIR(direntry->d_inode->i_mode))
1045 if (list_empty(&(cifsInode->openFileList))) { 1056 shrink_dcache_parent(direntry); */
1046 /* Has changed on server - flush read ahead pages */ 1057 if (S_ISREG(direntry->d_inode->i_mode)) {
1047 cFYI(1, ("Invalidating read ahead data on " 1058 if (direntry->d_inode->i_mapping)
1048 "closed file")); 1059 filemap_fdatawait(direntry->d_inode->i_mapping);
1049 invalidate_remote_inode(direntry->d_inode); 1060 /* may eventually have to do this for open files too */
1061 if (list_empty(&(cifsInode->openFileList))) {
1062 /* changed on server - flush read ahead pages */
1063 cFYI(1, ("Invalidating read ahead data on "
1064 "closed file"));
1065 invalidate_remote_inode(direntry->d_inode);
1066 }
1050 } 1067 }
1051 } 1068 }
1052/* up(&direntry->d_inode->i_sem); */ 1069/* up(&direntry->d_inode->i_sem); */
@@ -1105,9 +1122,20 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1105 1122
1106 cFYI(1, ("In cifs_setattr, name = %s attrs->iavalid 0x%x ", 1123 cFYI(1, ("In cifs_setattr, name = %s attrs->iavalid 0x%x ",
1107 direntry->d_name.name, attrs->ia_valid)); 1124 direntry->d_name.name, attrs->ia_valid));
1125
1108 cifs_sb = CIFS_SB(direntry->d_inode->i_sb); 1126 cifs_sb = CIFS_SB(direntry->d_inode->i_sb);
1109 pTcon = cifs_sb->tcon; 1127 pTcon = cifs_sb->tcon;
1110 1128
1129 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM) == 0) {
1130 /* check if we have permission to change attrs */
1131 rc = inode_change_ok(direntry->d_inode, attrs);
1132 if(rc < 0) {
1133 FreeXid(xid);
1134 return rc;
1135 } else
1136 rc = 0;
1137 }
1138
1111 down(&direntry->d_sb->s_vfs_rename_sem); 1139 down(&direntry->d_sb->s_vfs_rename_sem);
1112 full_path = build_path_from_dentry(direntry); 1140 full_path = build_path_from_dentry(direntry);
1113 up(&direntry->d_sb->s_vfs_rename_sem); 1141 up(&direntry->d_sb->s_vfs_rename_sem);
@@ -1147,7 +1175,9 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1147 1 /* 45 seconds */); 1175 1 /* 45 seconds */);
1148 cFYI(1,("Wrt seteof rc %d", rc)); 1176 cFYI(1,("Wrt seteof rc %d", rc));
1149 } 1177 }
1150 } 1178 } else
1179 rc = -EINVAL;
1180
1151 if (rc != 0) { 1181 if (rc != 0) {
1152 /* Set file size by pathname rather than by handle 1182 /* Set file size by pathname rather than by handle
1153 either because no valid, writeable file handle for 1183 either because no valid, writeable file handle for
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index ca27a82c54cd..94baf6c8ecbd 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -397,12 +397,12 @@ checkSMBhdr(struct smb_hdr *smb, __u16 mid)
397 if(smb->Command == SMB_COM_LOCKING_ANDX) 397 if(smb->Command == SMB_COM_LOCKING_ANDX)
398 return 0; 398 return 0;
399 else 399 else
400 cERROR(1, ("Rcvd Request not response ")); 400 cERROR(1, ("Rcvd Request not response"));
401 } 401 }
402 } else { /* bad signature or mid */ 402 } else { /* bad signature or mid */
403 if (*(__le32 *) smb->Protocol != cpu_to_le32(0x424d53ff)) 403 if (*(__le32 *) smb->Protocol != cpu_to_le32(0x424d53ff))
404 cERROR(1, 404 cERROR(1,
405 ("Bad protocol string signature header %x ", 405 ("Bad protocol string signature header %x",
406 *(unsigned int *) smb->Protocol)); 406 *(unsigned int *) smb->Protocol));
407 if (mid != smb->Mid) 407 if (mid != smb->Mid)
408 cERROR(1, ("Mids do not match")); 408 cERROR(1, ("Mids do not match"));
@@ -417,7 +417,7 @@ checkSMB(struct smb_hdr *smb, __u16 mid, int length)
417 __u32 len = smb->smb_buf_length; 417 __u32 len = smb->smb_buf_length;
418 __u32 clc_len; /* calculated length */ 418 __u32 clc_len; /* calculated length */
419 cFYI(0, 419 cFYI(0,
420 ("Entering checkSMB with Length: %x, smb_buf_length: %x ", 420 ("Entering checkSMB with Length: %x, smb_buf_length: %x",
421 length, len)); 421 length, len));
422 if (((unsigned int)length < 2 + sizeof (struct smb_hdr)) || 422 if (((unsigned int)length < 2 + sizeof (struct smb_hdr)) ||
423 (len > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4)) { 423 (len > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4)) {
@@ -451,9 +451,16 @@ checkSMB(struct smb_hdr *smb, __u16 mid, int length)
451 cERROR(1, ("bad smb size detected for Mid=%d", smb->Mid)); 451 cERROR(1, ("bad smb size detected for Mid=%d", smb->Mid));
452 /* Windows XP can return a few bytes too much, presumably 452 /* Windows XP can return a few bytes too much, presumably
453 an illegal pad, at the end of byte range lock responses 453 an illegal pad, at the end of byte range lock responses
454 so we allow for up to eight byte pad, as long as actual 454 so we allow for that three byte pad, as long as actual
455 received length is as long or longer than calculated length */ 455 received length is as long or longer than calculated length */
456 if((4+len > clc_len) && (len <= clc_len + 3)) 456 /* We have now had to extend this more, since there is a
457 case in which it needs to be bigger still to handle a
458 malformed response to transact2 findfirst from WinXP when
459 access denied is returned and thus bcc and wct are zero
460 but server says length is 0x21 bytes too long as if the server
461 forget to reset the smb rfc1001 length when it reset the
462 wct and bcc to minimum size and drop the t2 parms and data */
463 if((4+len > clc_len) && (len <= clc_len + 512))
457 return 0; 464 return 0;
458 else 465 else
459 return 1; 466 return 1;
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
index f7814689844b..5de74d216fdd 100644
--- a/fs/cifs/netmisc.c
+++ b/fs/cifs/netmisc.c
@@ -330,7 +330,7 @@ static const struct {
330 ERRHRD, ERRgeneral, NT_STATUS_ACCOUNT_RESTRICTION}, { 330 ERRHRD, ERRgeneral, NT_STATUS_ACCOUNT_RESTRICTION}, {
331 ERRSRV, 2241, NT_STATUS_INVALID_LOGON_HOURS}, { 331 ERRSRV, 2241, NT_STATUS_INVALID_LOGON_HOURS}, {
332 ERRSRV, 2240, NT_STATUS_INVALID_WORKSTATION}, { 332 ERRSRV, 2240, NT_STATUS_INVALID_WORKSTATION}, {
333 ERRSRV, 2242, NT_STATUS_PASSWORD_EXPIRED}, { 333 ERRSRV, ERRpasswordExpired, NT_STATUS_PASSWORD_EXPIRED}, {
334 ERRSRV, 2239, NT_STATUS_ACCOUNT_DISABLED}, { 334 ERRSRV, 2239, NT_STATUS_ACCOUNT_DISABLED}, {
335 ERRHRD, ERRgeneral, NT_STATUS_NONE_MAPPED}, { 335 ERRHRD, ERRgeneral, NT_STATUS_NONE_MAPPED}, {
336 ERRHRD, ERRgeneral, NT_STATUS_TOO_MANY_LUIDS_REQUESTED}, { 336 ERRHRD, ERRgeneral, NT_STATUS_TOO_MANY_LUIDS_REQUESTED}, {
@@ -676,7 +676,7 @@ static const struct {
676 ERRDOS, 193, NT_STATUS_IMAGE_CHECKSUM_MISMATCH}, { 676 ERRDOS, 193, NT_STATUS_IMAGE_CHECKSUM_MISMATCH}, {
677 ERRHRD, ERRgeneral, NT_STATUS_LOST_WRITEBEHIND_DATA}, { 677 ERRHRD, ERRgeneral, NT_STATUS_LOST_WRITEBEHIND_DATA}, {
678 ERRHRD, ERRgeneral, NT_STATUS_CLIENT_SERVER_PARAMETERS_INVALID}, { 678 ERRHRD, ERRgeneral, NT_STATUS_CLIENT_SERVER_PARAMETERS_INVALID}, {
679 ERRSRV, 2242, NT_STATUS_PASSWORD_MUST_CHANGE}, { 679 ERRSRV, ERRpasswordExpired, NT_STATUS_PASSWORD_MUST_CHANGE}, {
680 ERRHRD, ERRgeneral, NT_STATUS_NOT_FOUND}, { 680 ERRHRD, ERRgeneral, NT_STATUS_NOT_FOUND}, {
681 ERRHRD, ERRgeneral, NT_STATUS_NOT_TINY_STREAM}, { 681 ERRHRD, ERRgeneral, NT_STATUS_NOT_TINY_STREAM}, {
682 ERRHRD, ERRgeneral, NT_STATUS_RECOVERY_FAILURE}, { 682 ERRHRD, ERRgeneral, NT_STATUS_RECOVERY_FAILURE}, {
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 41a9659c16bc..f8871196098c 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -515,6 +515,7 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses,
515 *pbytes_returned = in_buf->smb_buf_length; 515 *pbytes_returned = in_buf->smb_buf_length;
516 516
517 /* BB special case reconnect tid and uid here? */ 517 /* BB special case reconnect tid and uid here? */
518 /* BB special case Errbadpassword and pwdexpired here */
518 rc = map_smb_to_linux_error(in_buf); 519 rc = map_smb_to_linux_error(in_buf);
519 520
520 /* convert ByteCount if necessary */ 521 /* convert ByteCount if necessary */
diff --git a/fs/dquot.c b/fs/dquot.c
index 05b60283c9c2..2a62b3dc20ec 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -1513,10 +1513,16 @@ int vfs_quota_on_mount(struct super_block *sb, char *qf_name,
1513 if (IS_ERR(dentry)) 1513 if (IS_ERR(dentry))
1514 return PTR_ERR(dentry); 1514 return PTR_ERR(dentry);
1515 1515
1516 if (!dentry->d_inode) {
1517 error = -ENOENT;
1518 goto out;
1519 }
1520
1516 error = security_quota_on(dentry); 1521 error = security_quota_on(dentry);
1517 if (!error) 1522 if (!error)
1518 error = vfs_quota_on_inode(dentry->d_inode, type, format_id); 1523 error = vfs_quota_on_inode(dentry->d_inode, type, format_id);
1519 1524
1525out:
1520 dput(dentry); 1526 dput(dentry);
1521 return error; 1527 return error;
1522} 1528}
diff --git a/fs/exec.c b/fs/exec.c
index 1f8a9fd2c9ed..22533cce0611 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -306,9 +306,6 @@ void install_arg_page(struct vm_area_struct *vma,
306 struct page *page, unsigned long address) 306 struct page *page, unsigned long address)
307{ 307{
308 struct mm_struct *mm = vma->vm_mm; 308 struct mm_struct *mm = vma->vm_mm;
309 pgd_t * pgd;
310 pud_t * pud;
311 pmd_t * pmd;
312 pte_t * pte; 309 pte_t * pte;
313 spinlock_t *ptl; 310 spinlock_t *ptl;
314 311
@@ -316,14 +313,7 @@ void install_arg_page(struct vm_area_struct *vma,
316 goto out; 313 goto out;
317 314
318 flush_dcache_page(page); 315 flush_dcache_page(page);
319 pgd = pgd_offset(mm, address); 316 pte = get_locked_pte(mm, address, &ptl);
320 pud = pud_alloc(mm, pgd, address);
321 if (!pud)
322 goto out;
323 pmd = pmd_alloc(mm, pud, address);
324 if (!pmd)
325 goto out;
326 pte = pte_alloc_map_lock(mm, pmd, address, &ptl);
327 if (!pte) 317 if (!pte)
328 goto out; 318 goto out;
329 if (!pte_none(*pte)) { 319 if (!pte_none(*pte)) {
diff --git a/fs/ext3/resize.c b/fs/ext3/resize.c
index 1be78b4b4de9..6104ad310507 100644
--- a/fs/ext3/resize.c
+++ b/fs/ext3/resize.c
@@ -767,6 +767,7 @@ int ext3_group_add(struct super_block *sb, struct ext3_new_group_data *input)
767 if (input->group != EXT3_SB(sb)->s_groups_count) { 767 if (input->group != EXT3_SB(sb)->s_groups_count) {
768 ext3_warning(sb, __FUNCTION__, 768 ext3_warning(sb, __FUNCTION__,
769 "multiple resizers run on filesystem!\n"); 769 "multiple resizers run on filesystem!\n");
770 err = -EBUSY;
770 goto exit_journal; 771 goto exit_journal;
771 } 772 }
772 773
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index c045cc70c749..51f5da652771 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -74,6 +74,24 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd)
74 return 1; 74 return 1;
75} 75}
76 76
77static int dir_alias(struct inode *inode)
78{
79 if (S_ISDIR(inode->i_mode)) {
80 /* Don't allow creating an alias to a directory */
81 struct dentry *alias = d_find_alias(inode);
82 if (alias) {
83 dput(alias);
84 return 1;
85 }
86 }
87 return 0;
88}
89
90static inline int invalid_nodeid(u64 nodeid)
91{
92 return !nodeid || nodeid == FUSE_ROOT_ID;
93}
94
77static struct dentry_operations fuse_dentry_operations = { 95static struct dentry_operations fuse_dentry_operations = {
78 .d_revalidate = fuse_dentry_revalidate, 96 .d_revalidate = fuse_dentry_revalidate,
79}; 97};
@@ -97,7 +115,7 @@ static int fuse_lookup_iget(struct inode *dir, struct dentry *entry,
97 fuse_lookup_init(req, dir, entry, &outarg); 115 fuse_lookup_init(req, dir, entry, &outarg);
98 request_send(fc, req); 116 request_send(fc, req);
99 err = req->out.h.error; 117 err = req->out.h.error;
100 if (!err && (!outarg.nodeid || outarg.nodeid == FUSE_ROOT_ID)) 118 if (!err && invalid_nodeid(outarg.nodeid))
101 err = -EIO; 119 err = -EIO;
102 if (!err) { 120 if (!err) {
103 inode = fuse_iget(dir->i_sb, outarg.nodeid, outarg.generation, 121 inode = fuse_iget(dir->i_sb, outarg.nodeid, outarg.generation,
@@ -193,7 +211,7 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry, int mode,
193 } 211 }
194 212
195 err = -EIO; 213 err = -EIO;
196 if (!S_ISREG(outentry.attr.mode)) 214 if (!S_ISREG(outentry.attr.mode) || invalid_nodeid(outentry.nodeid))
197 goto out_free_ff; 215 goto out_free_ff;
198 216
199 inode = fuse_iget(dir->i_sb, outentry.nodeid, outentry.generation, 217 inode = fuse_iget(dir->i_sb, outentry.nodeid, outentry.generation,
@@ -250,7 +268,7 @@ static int create_new_entry(struct fuse_conn *fc, struct fuse_req *req,
250 fuse_put_request(fc, req); 268 fuse_put_request(fc, req);
251 return err; 269 return err;
252 } 270 }
253 if (!outarg.nodeid || outarg.nodeid == FUSE_ROOT_ID) { 271 if (invalid_nodeid(outarg.nodeid)) {
254 fuse_put_request(fc, req); 272 fuse_put_request(fc, req);
255 return -EIO; 273 return -EIO;
256 } 274 }
@@ -263,7 +281,7 @@ static int create_new_entry(struct fuse_conn *fc, struct fuse_req *req,
263 fuse_put_request(fc, req); 281 fuse_put_request(fc, req);
264 282
265 /* Don't allow userspace to do really stupid things... */ 283 /* Don't allow userspace to do really stupid things... */
266 if ((inode->i_mode ^ mode) & S_IFMT) { 284 if (((inode->i_mode ^ mode) & S_IFMT) || dir_alias(inode)) {
267 iput(inode); 285 iput(inode);
268 return -EIO; 286 return -EIO;
269 } 287 }
@@ -874,14 +892,9 @@ static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry,
874 err = fuse_lookup_iget(dir, entry, &inode); 892 err = fuse_lookup_iget(dir, entry, &inode);
875 if (err) 893 if (err)
876 return ERR_PTR(err); 894 return ERR_PTR(err);
877 if (inode && S_ISDIR(inode->i_mode)) { 895 if (inode && dir_alias(inode)) {
878 /* Don't allow creating an alias to a directory */ 896 iput(inode);
879 struct dentry *alias = d_find_alias(inode); 897 return ERR_PTR(-EIO);
880 if (alias) {
881 dput(alias);
882 iput(inode);
883 return ERR_PTR(-EIO);
884 }
885 } 898 }
886 d_add(entry, inode); 899 d_add(entry, inode);
887 return NULL; 900 return NULL;
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h
index c60e5635498d..df16fcbff3fb 100644
--- a/fs/hfsplus/hfsplus_fs.h
+++ b/fs/hfsplus/hfsplus_fs.h
@@ -151,6 +151,7 @@ struct hfsplus_sb_info {
151 151
152#define HFSPLUS_SB_WRITEBACKUP 0x0001 152#define HFSPLUS_SB_WRITEBACKUP 0x0001
153#define HFSPLUS_SB_NODECOMPOSE 0x0002 153#define HFSPLUS_SB_NODECOMPOSE 0x0002
154#define HFSPLUS_SB_FORCE 0x0004
154 155
155 156
156struct hfsplus_inode_info { 157struct hfsplus_inode_info {
diff --git a/fs/hfsplus/hfsplus_raw.h b/fs/hfsplus/hfsplus_raw.h
index 5bad37cfdb29..b4fbed633219 100644
--- a/fs/hfsplus/hfsplus_raw.h
+++ b/fs/hfsplus/hfsplus_raw.h
@@ -123,11 +123,13 @@ struct hfsplus_vh {
123} __packed; 123} __packed;
124 124
125/* HFS+ volume attributes */ 125/* HFS+ volume attributes */
126#define HFSPLUS_VOL_UNMNT (1 << 8) 126#define HFSPLUS_VOL_UNMNT (1 << 8)
127#define HFSPLUS_VOL_SPARE_BLK (1 << 9) 127#define HFSPLUS_VOL_SPARE_BLK (1 << 9)
128#define HFSPLUS_VOL_NOCACHE (1 << 10) 128#define HFSPLUS_VOL_NOCACHE (1 << 10)
129#define HFSPLUS_VOL_INCNSTNT (1 << 11) 129#define HFSPLUS_VOL_INCNSTNT (1 << 11)
130#define HFSPLUS_VOL_SOFTLOCK (1 << 15) 130#define HFSPLUS_VOL_NODEID_REUSED (1 << 12)
131#define HFSPLUS_VOL_JOURNALED (1 << 13)
132#define HFSPLUS_VOL_SOFTLOCK (1 << 15)
131 133
132/* HFS+ BTree node descriptor */ 134/* HFS+ BTree node descriptor */
133struct hfs_bnode_desc { 135struct hfs_bnode_desc {
diff --git a/fs/hfsplus/options.c b/fs/hfsplus/options.c
index cca0818aa4ca..935dafba0078 100644
--- a/fs/hfsplus/options.c
+++ b/fs/hfsplus/options.c
@@ -22,7 +22,7 @@ enum {
22 opt_umask, opt_uid, opt_gid, 22 opt_umask, opt_uid, opt_gid,
23 opt_part, opt_session, opt_nls, 23 opt_part, opt_session, opt_nls,
24 opt_nodecompose, opt_decompose, 24 opt_nodecompose, opt_decompose,
25 opt_err 25 opt_force, opt_err
26}; 26};
27 27
28static match_table_t tokens = { 28static match_table_t tokens = {
@@ -36,6 +36,7 @@ static match_table_t tokens = {
36 { opt_nls, "nls=%s" }, 36 { opt_nls, "nls=%s" },
37 { opt_decompose, "decompose" }, 37 { opt_decompose, "decompose" },
38 { opt_nodecompose, "nodecompose" }, 38 { opt_nodecompose, "nodecompose" },
39 { opt_force, "force" },
39 { opt_err, NULL } 40 { opt_err, NULL }
40}; 41};
41 42
@@ -145,6 +146,9 @@ int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi)
145 case opt_nodecompose: 146 case opt_nodecompose:
146 sbi->flags |= HFSPLUS_SB_NODECOMPOSE; 147 sbi->flags |= HFSPLUS_SB_NODECOMPOSE;
147 break; 148 break;
149 case opt_force:
150 sbi->flags |= HFSPLUS_SB_FORCE;
151 break;
148 default: 152 default:
149 return 0; 153 return 0;
150 } 154 }
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index 0ce1c455ae55..8093351bd7c3 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -251,16 +251,28 @@ static int hfsplus_remount(struct super_block *sb, int *flags, char *data)
251 return 0; 251 return 0;
252 if (!(*flags & MS_RDONLY)) { 252 if (!(*flags & MS_RDONLY)) {
253 struct hfsplus_vh *vhdr = HFSPLUS_SB(sb).s_vhdr; 253 struct hfsplus_vh *vhdr = HFSPLUS_SB(sb).s_vhdr;
254 struct hfsplus_sb_info sbi;
255
256 memset(&sbi, 0, sizeof(struct hfsplus_sb_info));
257 sbi.nls = HFSPLUS_SB(sb).nls;
258 if (!hfsplus_parse_options(data, &sbi))
259 return -EINVAL;
254 260
255 if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) { 261 if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) {
256 printk("HFS+-fs warning: Filesystem was not cleanly unmounted, " 262 printk("HFS+-fs warning: Filesystem was not cleanly unmounted, "
257 "running fsck.hfsplus is recommended. leaving read-only.\n"); 263 "running fsck.hfsplus is recommended. leaving read-only.\n");
258 sb->s_flags |= MS_RDONLY; 264 sb->s_flags |= MS_RDONLY;
259 *flags |= MS_RDONLY; 265 *flags |= MS_RDONLY;
266 } else if (sbi.flags & HFSPLUS_SB_FORCE) {
267 /* nothing */
260 } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) { 268 } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) {
261 printk("HFS+-fs: Filesystem is marked locked, leaving read-only.\n"); 269 printk("HFS+-fs: Filesystem is marked locked, leaving read-only.\n");
262 sb->s_flags |= MS_RDONLY; 270 sb->s_flags |= MS_RDONLY;
263 *flags |= MS_RDONLY; 271 *flags |= MS_RDONLY;
272 } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) {
273 printk("HFS+-fs: Filesystem is marked journaled, leaving read-only.\n");
274 sb->s_flags |= MS_RDONLY;
275 *flags |= MS_RDONLY;
264 } 276 }
265 } 277 }
266 return 0; 278 return 0;
@@ -352,11 +364,19 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
352 printk("HFS+-fs warning: Filesystem was not cleanly unmounted, " 364 printk("HFS+-fs warning: Filesystem was not cleanly unmounted, "
353 "running fsck.hfsplus is recommended. mounting read-only.\n"); 365 "running fsck.hfsplus is recommended. mounting read-only.\n");
354 sb->s_flags |= MS_RDONLY; 366 sb->s_flags |= MS_RDONLY;
367 } else if (sbi->flags & HFSPLUS_SB_FORCE) {
368 /* nothing */
355 } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) { 369 } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) {
356 if (!silent) 370 if (!silent)
357 printk("HFS+-fs: Filesystem is marked locked, mounting read-only.\n"); 371 printk("HFS+-fs: Filesystem is marked locked, mounting read-only.\n");
358 sb->s_flags |= MS_RDONLY; 372 sb->s_flags |= MS_RDONLY;
373 } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) {
374 if (!silent)
375 printk("HFS+-fs: write access to a jounaled filesystem is not supported, "
376 "use the force option at your own risk, mounting read-only.\n");
377 sb->s_flags |= MS_RDONLY;
359 } 378 }
379 sbi->flags &= ~HFSPLUS_SB_FORCE;
360 380
361 /* Load metadata objects (B*Trees) */ 381 /* Load metadata objects (B*Trees) */
362 HFSPLUS_SB(sb).ext_tree = hfs_btree_open(sb, HFSPLUS_EXT_CNID); 382 HFSPLUS_SB(sb).ext_tree = hfs_btree_open(sb, HFSPLUS_EXT_CNID);
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
index 543420665c5b..d0fcc5f3497e 100644
--- a/fs/jffs2/fs.c
+++ b/fs/jffs2/fs.c
@@ -234,6 +234,7 @@ void jffs2_read_inode (struct inode *inode)
234 c = JFFS2_SB_INFO(inode->i_sb); 234 c = JFFS2_SB_INFO(inode->i_sb);
235 235
236 jffs2_init_inode_info(f); 236 jffs2_init_inode_info(f);
237 down(&f->sem);
237 238
238 ret = jffs2_do_read_inode(c, f, inode->i_ino, &latest_node); 239 ret = jffs2_do_read_inode(c, f, inode->i_ino, &latest_node);
239 240
@@ -400,6 +401,7 @@ struct inode *jffs2_new_inode (struct inode *dir_i, int mode, struct jffs2_raw_i
400 401
401 f = JFFS2_INODE_INFO(inode); 402 f = JFFS2_INODE_INFO(inode);
402 jffs2_init_inode_info(f); 403 jffs2_init_inode_info(f);
404 down(&f->sem);
403 405
404 memset(ri, 0, sizeof(*ri)); 406 memset(ri, 0, sizeof(*ri));
405 /* Set OS-specific defaults for new inodes */ 407 /* Set OS-specific defaults for new inodes */
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
index 9e0b5458d9c0..93883817cbd0 100644
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -51,7 +51,7 @@ static void jffs2_i_init_once(void * foo, kmem_cache_t * cachep, unsigned long f
51 51
52 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 52 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
53 SLAB_CTOR_CONSTRUCTOR) { 53 SLAB_CTOR_CONSTRUCTOR) {
54 init_MUTEX_LOCKED(&ei->sem); 54 init_MUTEX(&ei->sem);
55 inode_init_once(&ei->vfs_inode); 55 inode_init_once(&ei->vfs_inode);
56 } 56 }
57} 57}
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 7370583b61e5..c0d1a214572c 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1287,6 +1287,7 @@ dentry->d_parent->d_name.name, dentry->d_name.name);
1287 nfs_begin_data_update(dentry->d_inode); 1287 nfs_begin_data_update(dentry->d_inode);
1288 error = NFS_PROTO(dir)->rename(dir, &dentry->d_name, 1288 error = NFS_PROTO(dir)->rename(dir, &dentry->d_name,
1289 dir, &qsilly); 1289 dir, &qsilly);
1290 nfs_mark_for_revalidate(dentry->d_inode);
1290 nfs_end_data_update(dentry->d_inode); 1291 nfs_end_data_update(dentry->d_inode);
1291 } else 1292 } else
1292 error = NFS_PROTO(dir)->rename(dir, &dentry->d_name, 1293 error = NFS_PROTO(dir)->rename(dir, &dentry->d_name,
@@ -1334,6 +1335,7 @@ static int nfs_safe_remove(struct dentry *dentry)
1334 /* The VFS may want to delete this inode */ 1335 /* The VFS may want to delete this inode */
1335 if (error == 0) 1336 if (error == 0)
1336 inode->i_nlink--; 1337 inode->i_nlink--;
1338 nfs_mark_for_revalidate(inode);
1337 nfs_end_data_update(inode); 1339 nfs_end_data_update(inode);
1338 } else 1340 } else
1339 error = NFS_PROTO(dir)->remove(dir, &dentry->d_name); 1341 error = NFS_PROTO(dir)->remove(dir, &dentry->d_name);
@@ -1556,6 +1558,7 @@ go_ahead:
1556 nfs_begin_data_update(old_inode); 1558 nfs_begin_data_update(old_inode);
1557 error = NFS_PROTO(old_dir)->rename(old_dir, &old_dentry->d_name, 1559 error = NFS_PROTO(old_dir)->rename(old_dir, &old_dentry->d_name,
1558 new_dir, &new_dentry->d_name); 1560 new_dir, &new_dentry->d_name);
1561 nfs_mark_for_revalidate(old_inode);
1559 nfs_end_data_update(old_inode); 1562 nfs_end_data_update(old_inode);
1560 nfs_end_data_update(new_dir); 1563 nfs_end_data_update(new_dir);
1561 nfs_end_data_update(old_dir); 1564 nfs_end_data_update(old_dir);
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 6391d8964214..afd75d0463fd 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -54,7 +54,7 @@
54#define NFS_MAX_READAHEAD (RPC_DEF_SLOT_TABLE - 1) 54#define NFS_MAX_READAHEAD (RPC_DEF_SLOT_TABLE - 1)
55 55
56static void nfs_invalidate_inode(struct inode *); 56static void nfs_invalidate_inode(struct inode *);
57static int nfs_update_inode(struct inode *, struct nfs_fattr *, unsigned long); 57static int nfs_update_inode(struct inode *, struct nfs_fattr *);
58 58
59static struct inode *nfs_alloc_inode(struct super_block *sb); 59static struct inode *nfs_alloc_inode(struct super_block *sb);
60static void nfs_destroy_inode(struct inode *); 60static void nfs_destroy_inode(struct inode *);
@@ -643,14 +643,11 @@ static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt)
643/* 643/*
644 * Invalidate the local caches 644 * Invalidate the local caches
645 */ 645 */
646void 646static void nfs_zap_caches_locked(struct inode *inode)
647nfs_zap_caches(struct inode *inode)
648{ 647{
649 struct nfs_inode *nfsi = NFS_I(inode); 648 struct nfs_inode *nfsi = NFS_I(inode);
650 int mode = inode->i_mode; 649 int mode = inode->i_mode;
651 650
652 spin_lock(&inode->i_lock);
653
654 NFS_ATTRTIMEO(inode) = NFS_MINATTRTIMEO(inode); 651 NFS_ATTRTIMEO(inode) = NFS_MINATTRTIMEO(inode);
655 NFS_ATTRTIMEO_UPDATE(inode) = jiffies; 652 NFS_ATTRTIMEO_UPDATE(inode) = jiffies;
656 653
@@ -659,7 +656,12 @@ nfs_zap_caches(struct inode *inode)
659 nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE; 656 nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE;
660 else 657 else
661 nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE; 658 nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE;
659}
662 660
661void nfs_zap_caches(struct inode *inode)
662{
663 spin_lock(&inode->i_lock);
664 nfs_zap_caches_locked(inode);
663 spin_unlock(&inode->i_lock); 665 spin_unlock(&inode->i_lock);
664} 666}
665 667
@@ -676,16 +678,13 @@ static void nfs_zap_acl_cache(struct inode *inode)
676} 678}
677 679
678/* 680/*
679 * Invalidate, but do not unhash, the inode 681 * Invalidate, but do not unhash, the inode.
682 * NB: must be called with inode->i_lock held!
680 */ 683 */
681static void 684static void nfs_invalidate_inode(struct inode *inode)
682nfs_invalidate_inode(struct inode *inode)
683{ 685{
684 umode_t save_mode = inode->i_mode; 686 set_bit(NFS_INO_STALE, &NFS_FLAGS(inode));
685 687 nfs_zap_caches_locked(inode);
686 make_bad_inode(inode);
687 inode->i_mode = save_mode;
688 nfs_zap_caches(inode);
689} 688}
690 689
691struct nfs_find_desc { 690struct nfs_find_desc {
@@ -1081,8 +1080,6 @@ __nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)
1081 int status = -ESTALE; 1080 int status = -ESTALE;
1082 struct nfs_fattr fattr; 1081 struct nfs_fattr fattr;
1083 struct nfs_inode *nfsi = NFS_I(inode); 1082 struct nfs_inode *nfsi = NFS_I(inode);
1084 unsigned long verifier;
1085 unsigned long cache_validity;
1086 1083
1087 dfprintk(PAGECACHE, "NFS: revalidating (%s/%Ld)\n", 1084 dfprintk(PAGECACHE, "NFS: revalidating (%s/%Ld)\n",
1088 inode->i_sb->s_id, (long long)NFS_FILEID(inode)); 1085 inode->i_sb->s_id, (long long)NFS_FILEID(inode));
@@ -1107,8 +1104,6 @@ __nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)
1107 } 1104 }
1108 } 1105 }
1109 1106
1110 /* Protect against RPC races by saving the change attribute */
1111 verifier = nfs_save_change_attribute(inode);
1112 status = NFS_PROTO(inode)->getattr(server, NFS_FH(inode), &fattr); 1107 status = NFS_PROTO(inode)->getattr(server, NFS_FH(inode), &fattr);
1113 if (status != 0) { 1108 if (status != 0) {
1114 dfprintk(PAGECACHE, "nfs_revalidate_inode: (%s/%Ld) getattr failed, error=%d\n", 1109 dfprintk(PAGECACHE, "nfs_revalidate_inode: (%s/%Ld) getattr failed, error=%d\n",
@@ -1123,7 +1118,7 @@ __nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)
1123 } 1118 }
1124 1119
1125 spin_lock(&inode->i_lock); 1120 spin_lock(&inode->i_lock);
1126 status = nfs_update_inode(inode, &fattr, verifier); 1121 status = nfs_update_inode(inode, &fattr);
1127 if (status) { 1122 if (status) {
1128 spin_unlock(&inode->i_lock); 1123 spin_unlock(&inode->i_lock);
1129 dfprintk(PAGECACHE, "nfs_revalidate_inode: (%s/%Ld) refresh failed, error=%d\n", 1124 dfprintk(PAGECACHE, "nfs_revalidate_inode: (%s/%Ld) refresh failed, error=%d\n",
@@ -1131,20 +1126,11 @@ __nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)
1131 (long long)NFS_FILEID(inode), status); 1126 (long long)NFS_FILEID(inode), status);
1132 goto out; 1127 goto out;
1133 } 1128 }
1134 cache_validity = nfsi->cache_validity;
1135 nfsi->cache_validity &= ~NFS_INO_REVAL_PAGECACHE;
1136
1137 /*
1138 * We may need to keep the attributes marked as invalid if
1139 * we raced with nfs_end_attr_update().
1140 */
1141 if (time_after_eq(verifier, nfsi->cache_change_attribute))
1142 nfsi->cache_validity &= ~(NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ATIME);
1143 spin_unlock(&inode->i_lock); 1129 spin_unlock(&inode->i_lock);
1144 1130
1145 nfs_revalidate_mapping(inode, inode->i_mapping); 1131 nfs_revalidate_mapping(inode, inode->i_mapping);
1146 1132
1147 if (cache_validity & NFS_INO_INVALID_ACL) 1133 if (nfsi->cache_validity & NFS_INO_INVALID_ACL)
1148 nfs_zap_acl_cache(inode); 1134 nfs_zap_acl_cache(inode);
1149 1135
1150 dfprintk(PAGECACHE, "NFS: (%s/%Ld) revalidation complete\n", 1136 dfprintk(PAGECACHE, "NFS: (%s/%Ld) revalidation complete\n",
@@ -1347,10 +1333,8 @@ int nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr)
1347 return 0; 1333 return 0;
1348 spin_lock(&inode->i_lock); 1334 spin_lock(&inode->i_lock);
1349 nfsi->cache_validity &= ~NFS_INO_REVAL_PAGECACHE; 1335 nfsi->cache_validity &= ~NFS_INO_REVAL_PAGECACHE;
1350 if (nfs_verify_change_attribute(inode, fattr->time_start))
1351 nfsi->cache_validity &= ~(NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ATIME);
1352 if (time_after(fattr->time_start, nfsi->last_updated)) 1336 if (time_after(fattr->time_start, nfsi->last_updated))
1353 status = nfs_update_inode(inode, fattr, fattr->time_start); 1337 status = nfs_update_inode(inode, fattr);
1354 else 1338 else
1355 status = nfs_check_inode_attributes(inode, fattr); 1339 status = nfs_check_inode_attributes(inode, fattr);
1356 1340
@@ -1376,10 +1360,7 @@ int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1376 nfsi->cache_validity |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS; 1360 nfsi->cache_validity |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS;
1377 goto out; 1361 goto out;
1378 } 1362 }
1379 status = nfs_update_inode(inode, fattr, fattr->time_start); 1363 status = nfs_update_inode(inode, fattr);
1380 if (time_after_eq(fattr->time_start, nfsi->cache_change_attribute))
1381 nfsi->cache_validity &= ~(NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ATIME|NFS_INO_REVAL_PAGECACHE);
1382 nfsi->cache_change_attribute = jiffies;
1383out: 1364out:
1384 spin_unlock(&inode->i_lock); 1365 spin_unlock(&inode->i_lock);
1385 return status; 1366 return status;
@@ -1397,12 +1378,12 @@ out:
1397 * 1378 *
1398 * A very similar scenario holds for the dir cache. 1379 * A very similar scenario holds for the dir cache.
1399 */ 1380 */
1400static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr, unsigned long verifier) 1381static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1401{ 1382{
1402 struct nfs_inode *nfsi = NFS_I(inode); 1383 struct nfs_inode *nfsi = NFS_I(inode);
1403 loff_t cur_isize, new_isize; 1384 loff_t cur_isize, new_isize;
1404 unsigned int invalid = 0; 1385 unsigned int invalid = 0;
1405 int data_unstable; 1386 int data_stable;
1406 1387
1407 dfprintk(VFS, "NFS: %s(%s/%ld ct=%d info=0x%x)\n", 1388 dfprintk(VFS, "NFS: %s(%s/%ld ct=%d info=0x%x)\n",
1408 __FUNCTION__, inode->i_sb->s_id, inode->i_ino, 1389 __FUNCTION__, inode->i_sb->s_id, inode->i_ino,
@@ -1433,8 +1414,9 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr, unsign
1433 nfsi->last_updated = jiffies; 1414 nfsi->last_updated = jiffies;
1434 1415
1435 /* Are we racing with known updates of the metadata on the server? */ 1416 /* Are we racing with known updates of the metadata on the server? */
1436 data_unstable = ! (nfs_verify_change_attribute(inode, verifier) || 1417 data_stable = nfs_verify_change_attribute(inode, fattr->time_start);
1437 (nfsi->cache_validity & NFS_INO_REVAL_PAGECACHE)); 1418 if (data_stable)
1419 nfsi->cache_validity &= ~(NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ATIME);
1438 1420
1439 /* Check if our cached file size is stale */ 1421 /* Check if our cached file size is stale */
1440 new_isize = nfs_size_to_loff_t(fattr->size); 1422 new_isize = nfs_size_to_loff_t(fattr->size);
@@ -1443,7 +1425,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr, unsign
1443 /* Do we perhaps have any outstanding writes? */ 1425 /* Do we perhaps have any outstanding writes? */
1444 if (nfsi->npages == 0) { 1426 if (nfsi->npages == 0) {
1445 /* No, but did we race with nfs_end_data_update()? */ 1427 /* No, but did we race with nfs_end_data_update()? */
1446 if (time_after_eq(verifier, nfsi->cache_change_attribute)) { 1428 if (data_stable) {
1447 inode->i_size = new_isize; 1429 inode->i_size = new_isize;
1448 invalid |= NFS_INO_INVALID_DATA; 1430 invalid |= NFS_INO_INVALID_DATA;
1449 } 1431 }
@@ -1452,6 +1434,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr, unsign
1452 inode->i_size = new_isize; 1434 inode->i_size = new_isize;
1453 invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA; 1435 invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA;
1454 } 1436 }
1437 nfsi->cache_change_attribute = jiffies;
1455 dprintk("NFS: isize change on server for file %s/%ld\n", 1438 dprintk("NFS: isize change on server for file %s/%ld\n",
1456 inode->i_sb->s_id, inode->i_ino); 1439 inode->i_sb->s_id, inode->i_ino);
1457 } 1440 }
@@ -1461,8 +1444,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr, unsign
1461 memcpy(&inode->i_mtime, &fattr->mtime, sizeof(inode->i_mtime)); 1444 memcpy(&inode->i_mtime, &fattr->mtime, sizeof(inode->i_mtime));
1462 dprintk("NFS: mtime change on server for file %s/%ld\n", 1445 dprintk("NFS: mtime change on server for file %s/%ld\n",
1463 inode->i_sb->s_id, inode->i_ino); 1446 inode->i_sb->s_id, inode->i_ino);
1464 if (!data_unstable) 1447 invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA;
1465 invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA; 1448 nfsi->cache_change_attribute = jiffies;
1466 } 1449 }
1467 1450
1468 if ((fattr->valid & NFS_ATTR_FATTR_V4) 1451 if ((fattr->valid & NFS_ATTR_FATTR_V4)
@@ -1470,15 +1453,15 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr, unsign
1470 dprintk("NFS: change_attr change on server for file %s/%ld\n", 1453 dprintk("NFS: change_attr change on server for file %s/%ld\n",
1471 inode->i_sb->s_id, inode->i_ino); 1454 inode->i_sb->s_id, inode->i_ino);
1472 nfsi->change_attr = fattr->change_attr; 1455 nfsi->change_attr = fattr->change_attr;
1473 if (!data_unstable) 1456 invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL;
1474 invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; 1457 nfsi->cache_change_attribute = jiffies;
1475 } 1458 }
1476 1459
1477 /* If ctime has changed we should definitely clear access+acl caches */ 1460 /* If ctime has changed we should definitely clear access+acl caches */
1478 if (!timespec_equal(&inode->i_ctime, &fattr->ctime)) { 1461 if (!timespec_equal(&inode->i_ctime, &fattr->ctime)) {
1479 if (!data_unstable) 1462 invalid |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL;
1480 invalid |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL;
1481 memcpy(&inode->i_ctime, &fattr->ctime, sizeof(inode->i_ctime)); 1463 memcpy(&inode->i_ctime, &fattr->ctime, sizeof(inode->i_ctime));
1464 nfsi->cache_change_attribute = jiffies;
1482 } 1465 }
1483 memcpy(&inode->i_atime, &fattr->atime, sizeof(inode->i_atime)); 1466 memcpy(&inode->i_atime, &fattr->atime, sizeof(inode->i_atime));
1484 1467
@@ -1516,6 +1499,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr, unsign
1516 if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) 1499 if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)
1517 || S_ISLNK(inode->i_mode))) 1500 || S_ISLNK(inode->i_mode)))
1518 invalid &= ~NFS_INO_INVALID_DATA; 1501 invalid &= ~NFS_INO_INVALID_DATA;
1502 if (data_stable)
1503 invalid &= ~(NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ATIME|NFS_INO_REVAL_PAGECACHE);
1519 if (!nfs_have_delegation(inode, FMODE_READ)) 1504 if (!nfs_have_delegation(inode, FMODE_READ))
1520 nfsi->cache_validity |= invalid; 1505 nfsi->cache_validity |= invalid;
1521 1506
@@ -1528,14 +1513,13 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr, unsign
1528 printk(KERN_DEBUG "%s: inode %ld mode changed, %07o to %07o\n", 1513 printk(KERN_DEBUG "%s: inode %ld mode changed, %07o to %07o\n",
1529 __FUNCTION__, inode->i_ino, inode->i_mode, fattr->mode); 1514 __FUNCTION__, inode->i_ino, inode->i_mode, fattr->mode);
1530#endif 1515#endif
1516 out_err:
1531 /* 1517 /*
1532 * No need to worry about unhashing the dentry, as the 1518 * No need to worry about unhashing the dentry, as the
1533 * lookup validation will know that the inode is bad. 1519 * lookup validation will know that the inode is bad.
1534 * (But we fall through to invalidate the caches.) 1520 * (But we fall through to invalidate the caches.)
1535 */ 1521 */
1536 nfs_invalidate_inode(inode); 1522 nfs_invalidate_inode(inode);
1537 out_err:
1538 set_bit(NFS_INO_STALE, &NFS_FLAGS(inode));
1539 return -ESTALE; 1523 return -ESTALE;
1540} 1524}
1541 1525
@@ -2068,6 +2052,7 @@ static struct inode *nfs_alloc_inode(struct super_block *sb)
2068 return NULL; 2052 return NULL;
2069 nfsi->flags = 0UL; 2053 nfsi->flags = 0UL;
2070 nfsi->cache_validity = 0UL; 2054 nfsi->cache_validity = 0UL;
2055 nfsi->cache_change_attribute = jiffies;
2071#ifdef CONFIG_NFS_V3_ACL 2056#ifdef CONFIG_NFS_V3_ACL
2072 nfsi->acl_access = ERR_PTR(-EAGAIN); 2057 nfsi->acl_access = ERR_PTR(-EAGAIN);
2073 nfsi->acl_default = ERR_PTR(-EAGAIN); 2058 nfsi->acl_default = ERR_PTR(-EAGAIN);
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 21482b2518f6..f988a9417b13 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1506,10 +1506,15 @@ static int _nfs4_proc_write(struct nfs_write_data *wdata)
1506 dprintk("NFS call write %d @ %Ld\n", wdata->args.count, 1506 dprintk("NFS call write %d @ %Ld\n", wdata->args.count,
1507 (long long) wdata->args.offset); 1507 (long long) wdata->args.offset);
1508 1508
1509 wdata->args.bitmask = server->attr_bitmask;
1510 wdata->res.server = server;
1509 nfs_fattr_init(fattr); 1511 nfs_fattr_init(fattr);
1510 status = rpc_call_sync(server->client, &msg, rpcflags); 1512 status = rpc_call_sync(server->client, &msg, rpcflags);
1511 dprintk("NFS reply write: %d\n", status); 1513 dprintk("NFS reply write: %d\n", status);
1512 return status; 1514 if (status < 0)
1515 return status;
1516 nfs_post_op_update_inode(inode, fattr);
1517 return wdata->res.count;
1513} 1518}
1514 1519
1515static int nfs4_proc_write(struct nfs_write_data *wdata) 1520static int nfs4_proc_write(struct nfs_write_data *wdata)
@@ -1540,9 +1545,13 @@ static int _nfs4_proc_commit(struct nfs_write_data *cdata)
1540 dprintk("NFS call commit %d @ %Ld\n", cdata->args.count, 1545 dprintk("NFS call commit %d @ %Ld\n", cdata->args.count,
1541 (long long) cdata->args.offset); 1546 (long long) cdata->args.offset);
1542 1547
1548 cdata->args.bitmask = server->attr_bitmask;
1549 cdata->res.server = server;
1543 nfs_fattr_init(fattr); 1550 nfs_fattr_init(fattr);
1544 status = rpc_call_sync(server->client, &msg, 0); 1551 status = rpc_call_sync(server->client, &msg, 0);
1545 dprintk("NFS reply commit: %d\n", status); 1552 dprintk("NFS reply commit: %d\n", status);
1553 if (status >= 0)
1554 nfs_post_op_update_inode(inode, fattr);
1546 return status; 1555 return status;
1547} 1556}
1548 1557
@@ -3071,15 +3080,15 @@ static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock
3071 struct nfs4_client *clp = state->owner->so_client; 3080 struct nfs4_client *clp = state->owner->so_client;
3072 int status; 3081 int status;
3073 3082
3074 down_read(&clp->cl_sem);
3075 /* Is this a delegated open? */ 3083 /* Is this a delegated open? */
3076 if (test_bit(NFS_DELEGATED_STATE, &state->flags)) { 3084 if (NFS_I(state->inode)->delegation_state != 0) {
3077 /* Yes: cache locks! */ 3085 /* Yes: cache locks! */
3078 status = do_vfs_lock(request->fl_file, request); 3086 status = do_vfs_lock(request->fl_file, request);
3079 /* ...but avoid races with delegation recall... */ 3087 /* ...but avoid races with delegation recall... */
3080 if (status < 0 || test_bit(NFS_DELEGATED_STATE, &state->flags)) 3088 if (status < 0 || test_bit(NFS_DELEGATED_STATE, &state->flags))
3081 goto out; 3089 return status;
3082 } 3090 }
3091 down_read(&clp->cl_sem);
3083 status = nfs4_set_lock_state(state, request); 3092 status = nfs4_set_lock_state(state, request);
3084 if (status != 0) 3093 if (status != 0)
3085 goto out; 3094 goto out;
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 0675f3215e0a..5ef4c57618fe 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -644,12 +644,15 @@ void nfs4_copy_stateid(nfs4_stateid *dst, struct nfs4_state *state, fl_owner_t f
644 644
645struct nfs_seqid *nfs_alloc_seqid(struct nfs_seqid_counter *counter) 645struct nfs_seqid *nfs_alloc_seqid(struct nfs_seqid_counter *counter)
646{ 646{
647 struct rpc_sequence *sequence = counter->sequence;
647 struct nfs_seqid *new; 648 struct nfs_seqid *new;
648 649
649 new = kmalloc(sizeof(*new), GFP_KERNEL); 650 new = kmalloc(sizeof(*new), GFP_KERNEL);
650 if (new != NULL) { 651 if (new != NULL) {
651 new->sequence = counter; 652 new->sequence = counter;
652 INIT_LIST_HEAD(&new->list); 653 spin_lock(&sequence->lock);
654 list_add_tail(&new->list, &sequence->list);
655 spin_unlock(&sequence->lock);
653 } 656 }
654 return new; 657 return new;
655} 658}
@@ -658,12 +661,10 @@ void nfs_free_seqid(struct nfs_seqid *seqid)
658{ 661{
659 struct rpc_sequence *sequence = seqid->sequence->sequence; 662 struct rpc_sequence *sequence = seqid->sequence->sequence;
660 663
661 if (!list_empty(&seqid->list)) { 664 spin_lock(&sequence->lock);
662 spin_lock(&sequence->lock); 665 list_del(&seqid->list);
663 list_del(&seqid->list); 666 spin_unlock(&sequence->lock);
664 spin_unlock(&sequence->lock); 667 rpc_wake_up(&sequence->wait);
665 }
666 rpc_wake_up_next(&sequence->wait);
667 kfree(seqid); 668 kfree(seqid);
668} 669}
669 670
@@ -722,11 +723,10 @@ int nfs_wait_on_sequence(struct nfs_seqid *seqid, struct rpc_task *task)
722 if (sequence->list.next == &seqid->list) 723 if (sequence->list.next == &seqid->list)
723 goto out; 724 goto out;
724 spin_lock(&sequence->lock); 725 spin_lock(&sequence->lock);
725 if (!list_empty(&sequence->list)) { 726 if (sequence->list.next != &seqid->list) {
726 rpc_sleep_on(&sequence->wait, task, NULL, NULL); 727 rpc_sleep_on(&sequence->wait, task, NULL, NULL);
727 status = -EAGAIN; 728 status = -EAGAIN;
728 } else 729 }
729 list_add(&seqid->list, &sequence->list);
730 spin_unlock(&sequence->lock); 730 spin_unlock(&sequence->lock);
731out: 731out:
732 return status; 732 return status;
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c
index a48a003242c0..e1e3ca5d746b 100644
--- a/fs/nfs/proc.c
+++ b/fs/nfs/proc.c
@@ -375,6 +375,7 @@ nfs_proc_link(struct inode *inode, struct inode *dir, struct qstr *name)
375 375
376 dprintk("NFS call link %s\n", name->name); 376 dprintk("NFS call link %s\n", name->name);
377 status = rpc_call(NFS_CLIENT(inode), NFSPROC_LINK, &arg, NULL, 0); 377 status = rpc_call(NFS_CLIENT(inode), NFSPROC_LINK, &arg, NULL, 0);
378 nfs_mark_for_revalidate(inode);
378 nfs_mark_for_revalidate(dir); 379 nfs_mark_for_revalidate(dir);
379 dprintk("NFS reply link: %d\n", status); 380 dprintk("NFS reply link: %d\n", status);
380 return status; 381 return status;
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 8f71e766cc5d..3107908e5f3f 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -189,6 +189,7 @@ static int nfs_writepage_sync(struct nfs_open_context *ctx, struct inode *inode,
189 (long long)NFS_FILEID(inode), 189 (long long)NFS_FILEID(inode),
190 count, (long long)(page_offset(page) + offset)); 190 count, (long long)(page_offset(page) + offset));
191 191
192 set_page_writeback(page);
192 nfs_begin_data_update(inode); 193 nfs_begin_data_update(inode);
193 do { 194 do {
194 if (count < wsize) 195 if (count < wsize)
@@ -221,6 +222,7 @@ static int nfs_writepage_sync(struct nfs_open_context *ctx, struct inode *inode,
221 222
222io_error: 223io_error:
223 nfs_end_data_update(inode); 224 nfs_end_data_update(inode);
225 end_page_writeback(page);
224 nfs_writedata_free(wdata); 226 nfs_writedata_free(wdata);
225 return written ? written : result; 227 return written ? written : result;
226} 228}
@@ -929,7 +931,7 @@ static int nfs_flush_multi(struct list_head *head, struct inode *inode, int how)
929 atomic_set(&req->wb_complete, requests); 931 atomic_set(&req->wb_complete, requests);
930 932
931 ClearPageError(page); 933 ClearPageError(page);
932 SetPageWriteback(page); 934 set_page_writeback(page);
933 offset = 0; 935 offset = 0;
934 nbytes = req->wb_bytes; 936 nbytes = req->wb_bytes;
935 do { 937 do {
@@ -992,7 +994,7 @@ static int nfs_flush_one(struct list_head *head, struct inode *inode, int how)
992 nfs_list_remove_request(req); 994 nfs_list_remove_request(req);
993 nfs_list_add_request(req, &data->pages); 995 nfs_list_add_request(req, &data->pages);
994 ClearPageError(req->wb_page); 996 ClearPageError(req->wb_page);
995 SetPageWriteback(req->wb_page); 997 set_page_writeback(req->wb_page);
996 *pages++ = req->wb_page; 998 *pages++ = req->wb_page;
997 count += req->wb_bytes; 999 count += req->wb_bytes;
998 } 1000 }
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 9ab97cef0daa..50bd5a8f0446 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -402,12 +402,11 @@ struct numa_maps {
402/* 402/*
403 * Calculate numa node maps for a vma 403 * Calculate numa node maps for a vma
404 */ 404 */
405static struct numa_maps *get_numa_maps(const struct vm_area_struct *vma) 405static struct numa_maps *get_numa_maps(struct vm_area_struct *vma)
406{ 406{
407 int i;
407 struct page *page; 408 struct page *page;
408 unsigned long vaddr; 409 unsigned long vaddr;
409 struct mm_struct *mm = vma->vm_mm;
410 int i;
411 struct numa_maps *md = kmalloc(sizeof(struct numa_maps), GFP_KERNEL); 410 struct numa_maps *md = kmalloc(sizeof(struct numa_maps), GFP_KERNEL);
412 411
413 if (!md) 412 if (!md)
@@ -420,7 +419,7 @@ static struct numa_maps *get_numa_maps(const struct vm_area_struct *vma)
420 md->node[i] =0; 419 md->node[i] =0;
421 420
422 for (vaddr = vma->vm_start; vaddr < vma->vm_end; vaddr += PAGE_SIZE) { 421 for (vaddr = vma->vm_start; vaddr < vma->vm_end; vaddr += PAGE_SIZE) {
423 page = follow_page(mm, vaddr, 0); 422 page = follow_page(vma, vaddr, 0);
424 if (page) { 423 if (page) {
425 int count = page_mapcount(page); 424 int count = page_mapcount(page);
426 425
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index 5f82352b97e1..0a044ad98885 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -2194,7 +2194,7 @@ static int map_block_for_writepage(struct inode *inode,
2194 INITIALIZE_PATH(path); 2194 INITIALIZE_PATH(path);
2195 int pos_in_item; 2195 int pos_in_item;
2196 int jbegin_count = JOURNAL_PER_BALANCE_CNT; 2196 int jbegin_count = JOURNAL_PER_BALANCE_CNT;
2197 loff_t byte_offset = (block << inode->i_sb->s_blocksize_bits) + 1; 2197 loff_t byte_offset = ((loff_t)block << inode->i_sb->s_blocksize_bits)+1;
2198 int retval; 2198 int retval;
2199 int use_get_block = 0; 2199 int use_get_block = 0;
2200 int bytes_copied = 0; 2200 int bytes_copied = 0;
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index 4b15761434bc..68b7b78638ff 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -2757,6 +2757,15 @@ int journal_init(struct super_block *p_s_sb, const char *j_dev_name,
2757 journal->j_cnode_used = 0; 2757 journal->j_cnode_used = 0;
2758 journal->j_must_wait = 0; 2758 journal->j_must_wait = 0;
2759 2759
2760 if (journal->j_cnode_free == 0) {
2761 reiserfs_warning(p_s_sb, "journal-2004: Journal cnode memory "
2762 "allocation failed (%ld bytes). Journal is "
2763 "too large for available memory. Usually "
2764 "this is due to a journal that is too large.",
2765 sizeof (struct reiserfs_journal_cnode) * num_cnodes);
2766 goto free_and_return;
2767 }
2768
2760 init_journal_hash(p_s_sb); 2769 init_journal_hash(p_s_sb);
2761 jl = journal->j_current_jl; 2770 jl = journal->j_current_jl;
2762 jl->j_list_bitmap = get_list_bitmap(p_s_sb, jl); 2771 jl->j_list_bitmap = get_list_bitmap(p_s_sb, jl);
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index c6108971b4e6..94d3cdfbf9b8 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -941,13 +941,12 @@ __linvfs_get_block(
941 int retpbbm = 1; 941 int retpbbm = 1;
942 int error; 942 int error;
943 943
944 if (blocks) {
945 offset = blocks << inode->i_blkbits; /* 64 bit goodness */
946 size = (ssize_t) min_t(xfs_off_t, offset, LONG_MAX);
947 } else {
948 size = 1 << inode->i_blkbits;
949 }
950 offset = (xfs_off_t)iblock << inode->i_blkbits; 944 offset = (xfs_off_t)iblock << inode->i_blkbits;
945 if (blocks)
946 size = (ssize_t) min_t(xfs_off_t, LONG_MAX,
947 (xfs_off_t)blocks << inode->i_blkbits);
948 else
949 size = 1 << inode->i_blkbits;
951 950
952 VOP_BMAP(vp, offset, size, 951 VOP_BMAP(vp, offset, size,
953 create ? flags : BMAPI_READ, &iomap, &retpbbm, error); 952 create ? flags : BMAPI_READ, &iomap, &retpbbm, error);
@@ -1007,7 +1006,7 @@ __linvfs_get_block(
1007 ASSERT(iomap.iomap_bsize - iomap.iomap_delta > 0); 1006 ASSERT(iomap.iomap_bsize - iomap.iomap_delta > 0);
1008 offset = min_t(xfs_off_t, 1007 offset = min_t(xfs_off_t,
1009 iomap.iomap_bsize - iomap.iomap_delta, 1008 iomap.iomap_bsize - iomap.iomap_delta,
1010 blocks << inode->i_blkbits); 1009 (xfs_off_t)blocks << inode->i_blkbits);
1011 bh_result->b_size = (u32) min_t(xfs_off_t, UINT_MAX, offset); 1010 bh_result->b_size = (u32) min_t(xfs_off_t, UINT_MAX, offset);
1012 } 1011 }
1013 1012
diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c
index 35e557b00db2..1c7421840c18 100644
--- a/fs/xfs/xfs_attr_leaf.c
+++ b/fs/xfs/xfs_attr_leaf.c
@@ -310,7 +310,8 @@ xfs_attr_shortform_remove(xfs_da_args_t *args)
310 * Fix up the start offset of the attribute fork 310 * Fix up the start offset of the attribute fork
311 */ 311 */
312 totsize -= size; 312 totsize -= size;
313 if (totsize == sizeof(xfs_attr_sf_hdr_t) && !args->addname) { 313 if (totsize == sizeof(xfs_attr_sf_hdr_t) && !args->addname &&
314 !(mp->m_flags & XFS_MOUNT_COMPAT_ATTR)) {
314 /* 315 /*
315 * Last attribute now removed, revert to original 316 * Last attribute now removed, revert to original
316 * inode format making all literal area available 317 * inode format making all literal area available
@@ -328,7 +329,8 @@ xfs_attr_shortform_remove(xfs_da_args_t *args)
328 xfs_idata_realloc(dp, -size, XFS_ATTR_FORK); 329 xfs_idata_realloc(dp, -size, XFS_ATTR_FORK);
329 dp->i_d.di_forkoff = xfs_attr_shortform_bytesfit(dp, totsize); 330 dp->i_d.di_forkoff = xfs_attr_shortform_bytesfit(dp, totsize);
330 ASSERT(dp->i_d.di_forkoff); 331 ASSERT(dp->i_d.di_forkoff);
331 ASSERT(totsize > sizeof(xfs_attr_sf_hdr_t) || args->addname); 332 ASSERT(totsize > sizeof(xfs_attr_sf_hdr_t) || args->addname ||
333 (mp->m_flags & XFS_MOUNT_COMPAT_ATTR));
332 dp->i_afp->if_ext_max = 334 dp->i_afp->if_ext_max =
333 XFS_IFORK_ASIZE(dp) / (uint)sizeof(xfs_bmbt_rec_t); 335 XFS_IFORK_ASIZE(dp) / (uint)sizeof(xfs_bmbt_rec_t);
334 dp->i_df.if_ext_max = 336 dp->i_df.if_ext_max =
@@ -737,7 +739,8 @@ xfs_attr_shortform_allfit(xfs_dabuf_t *bp, xfs_inode_t *dp)
737 + name_loc->namelen 739 + name_loc->namelen
738 + INT_GET(name_loc->valuelen, ARCH_CONVERT); 740 + INT_GET(name_loc->valuelen, ARCH_CONVERT);
739 } 741 }
740 if (bytes == sizeof(struct xfs_attr_sf_hdr)) 742 if (!(dp->i_mount->m_flags & XFS_MOUNT_COMPAT_ATTR) &&
743 (bytes == sizeof(struct xfs_attr_sf_hdr)))
741 return(-1); 744 return(-1);
742 return(xfs_attr_shortform_bytesfit(dp, bytes)); 745 return(xfs_attr_shortform_bytesfit(dp, bytes));
743} 746}
@@ -775,6 +778,8 @@ xfs_attr_leaf_to_shortform(xfs_dabuf_t *bp, xfs_da_args_t *args, int forkoff)
775 goto out; 778 goto out;
776 779
777 if (forkoff == -1) { 780 if (forkoff == -1) {
781 ASSERT(!(dp->i_mount->m_flags & XFS_MOUNT_COMPAT_ATTR));
782
778 /* 783 /*
779 * Last attribute was removed, revert to original 784 * Last attribute was removed, revert to original
780 * inode format making all literal area available 785 * inode format making all literal area available
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index 7ceabd0e2d9d..d1236d6f4045 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -550,7 +550,7 @@ xfs_fs_goingdown(
550 struct vfs *vfsp = XFS_MTOVFS(mp); 550 struct vfs *vfsp = XFS_MTOVFS(mp);
551 struct super_block *sb = freeze_bdev(vfsp->vfs_super->s_bdev); 551 struct super_block *sb = freeze_bdev(vfsp->vfs_super->s_bdev);
552 552
553 if (sb) { 553 if (sb && !IS_ERR(sb)) {
554 xfs_force_shutdown(mp, XFS_FORCE_UMOUNT); 554 xfs_force_shutdown(mp, XFS_FORCE_UMOUNT);
555 thaw_bdev(sb->s_bdev, sb); 555 thaw_bdev(sb->s_bdev, sb);
556 } 556 }
diff --git a/fs/xfs/xfs_iomap.h b/fs/xfs/xfs_iomap.h
index fcd6d63bb68b..3ce204a524b0 100644
--- a/fs/xfs/xfs_iomap.h
+++ b/fs/xfs/xfs_iomap.h
@@ -69,7 +69,7 @@ typedef struct xfs_iomap {
69 xfs_buftarg_t *iomap_target; 69 xfs_buftarg_t *iomap_target;
70 xfs_off_t iomap_offset; /* offset of mapping, bytes */ 70 xfs_off_t iomap_offset; /* offset of mapping, bytes */
71 xfs_off_t iomap_bsize; /* size of mapping, bytes */ 71 xfs_off_t iomap_bsize; /* size of mapping, bytes */
72 size_t iomap_delta; /* offset into mapping, bytes */ 72 xfs_off_t iomap_delta; /* offset into mapping, bytes */
73 iomap_flags_t iomap_flags; 73 iomap_flags_t iomap_flags;
74} xfs_iomap_t; 74} xfs_iomap_t;
75 75
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
index 8f285149681f..4518b188ade6 100644
--- a/fs/xfs/xfs_log_priv.h
+++ b/fs/xfs/xfs_log_priv.h
@@ -494,10 +494,8 @@ typedef struct log {
494 494
495#define XLOG_FORCED_SHUTDOWN(log) ((log)->l_flags & XLOG_IO_ERROR) 495#define XLOG_FORCED_SHUTDOWN(log) ((log)->l_flags & XLOG_IO_ERROR)
496 496
497#define XLOG_GRANT_SUB_SPACE(log,bytes,type) \ 497#define XLOG_GRANT_SUB_SPACE(log,bytes,type) \
498 xlog_grant_sub_space(log,bytes,type) 498 { \
499static inline void xlog_grant_sub_space(struct log *log, int bytes, int type)
500{
501 if (type == 'w') { \ 499 if (type == 'w') { \
502 (log)->l_grant_write_bytes -= (bytes); \ 500 (log)->l_grant_write_bytes -= (bytes); \
503 if ((log)->l_grant_write_bytes < 0) { \ 501 if ((log)->l_grant_write_bytes < 0) { \
@@ -511,13 +509,9 @@ static inline void xlog_grant_sub_space(struct log *log, int bytes, int type)
511 (log)->l_grant_reserve_cycle--; \ 509 (log)->l_grant_reserve_cycle--; \
512 } \ 510 } \
513 } \ 511 } \
514} 512 }
515 513#define XLOG_GRANT_ADD_SPACE(log,bytes,type) \
516#define XLOG_GRANT_ADD_SPACE(log,bytes,type) \ 514 { \
517 xlog_grant_add_space(log,bytes,type)
518static inline void
519xlog_grant_add_space(struct log *log, int bytes, int type)
520{
521 if (type == 'w') { \ 515 if (type == 'w') { \
522 (log)->l_grant_write_bytes += (bytes); \ 516 (log)->l_grant_write_bytes += (bytes); \
523 if ((log)->l_grant_write_bytes > (log)->l_logsize) { \ 517 if ((log)->l_grant_write_bytes > (log)->l_logsize) { \
@@ -531,12 +525,9 @@ xlog_grant_add_space(struct log *log, int bytes, int type)
531 (log)->l_grant_reserve_cycle++; \ 525 (log)->l_grant_reserve_cycle++; \
532 } \ 526 } \
533 } \ 527 } \
534} 528 }
535 529#define XLOG_INS_TICKETQ(q, tic) \
536#define XLOG_INS_TICKETQ(q, tic) xlog_ins_ticketq(q, tic) 530 { \
537static inline void
538xlog_ins_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic)
539{ \
540 if (q) { \ 531 if (q) { \
541 (tic)->t_next = (q); \ 532 (tic)->t_next = (q); \
542 (tic)->t_prev = (q)->t_prev; \ 533 (tic)->t_prev = (q)->t_prev; \
@@ -547,12 +538,9 @@ xlog_ins_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic)
547 (q) = (tic); \ 538 (q) = (tic); \
548 } \ 539 } \
549 (tic)->t_flags |= XLOG_TIC_IN_Q; \ 540 (tic)->t_flags |= XLOG_TIC_IN_Q; \
550} 541 }
551 542#define XLOG_DEL_TICKETQ(q, tic) \
552#define XLOG_DEL_TICKETQ(q, tic) xlog_del_ticketq(q, tic) 543 { \
553static inline void
554xlog_del_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic)
555{ \
556 if ((tic) == (tic)->t_next) { \ 544 if ((tic) == (tic)->t_next) { \
557 (q) = NULL; \ 545 (q) = NULL; \
558 } else { \ 546 } else { \
@@ -562,7 +550,7 @@ xlog_del_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic)
562 } \ 550 } \
563 (tic)->t_next = (tic)->t_prev = NULL; \ 551 (tic)->t_next = (tic)->t_prev = NULL; \
564 (tic)->t_flags &= ~XLOG_TIC_IN_Q; \ 552 (tic)->t_flags &= ~XLOG_TIC_IN_Q; \
565} 553 }
566 554
567/* common routines */ 555/* common routines */
568extern xfs_lsn_t xlog_assign_tail_lsn(struct xfs_mount *mp); 556extern xfs_lsn_t xlog_assign_tail_lsn(struct xfs_mount *mp);
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 7c1f74531463..e03fa2a3d5ed 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -3958,8 +3958,9 @@ xfs_finish_reclaim_all(xfs_mount_t *mp, int noblock)
3958 } 3958 }
3959 } 3959 }
3960 XFS_MOUNT_IUNLOCK(mp); 3960 XFS_MOUNT_IUNLOCK(mp);
3961 xfs_finish_reclaim(ip, noblock, 3961 if (xfs_finish_reclaim(ip, noblock,
3962 XFS_IFLUSH_DELWRI_ELSE_ASYNC); 3962 XFS_IFLUSH_DELWRI_ELSE_ASYNC))
3963 delay(1);
3963 purged = 1; 3964 purged = 1;
3964 break; 3965 break;
3965 } 3966 }
diff --git a/include/asm-arm/arch-iop3xx/timex.h b/include/asm-arm/arch-iop3xx/timex.h
index d4187fe9a85a..472badb451c4 100644
--- a/include/asm-arm/arch-iop3xx/timex.h
+++ b/include/asm-arm/arch-iop3xx/timex.h
@@ -4,7 +4,7 @@
4 * IOP3xx architecture timex specifications 4 * IOP3xx architecture timex specifications
5 */ 5 */
6#include <linux/config.h> 6#include <linux/config.h>
7 7#include <asm/hardware.h>
8 8
9#if defined(CONFIG_ARCH_IQ80321) || defined(CONFIG_ARCH_IQ31244) 9#if defined(CONFIG_ARCH_IQ80321) || defined(CONFIG_ARCH_IQ31244)
10 10
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h
index cb33d57c146c..7f1be48ad67e 100644
--- a/include/asm-arm/arch-s3c2410/regs-gpio.h
+++ b/include/asm-arm/arch-s3c2410/regs-gpio.h
@@ -21,6 +21,7 @@
21 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA 21 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
22 * 28-Mar-2005 LCVR Fixed definition of GPB10 22 * 28-Mar-2005 LCVR Fixed definition of GPB10
23 * 26-Oct-2005 BJD Added generic configuration types 23 * 26-Oct-2005 BJD Added generic configuration types
24 * 27-Nov-2005 LCVR Added definitions to S3C2400 registers
24*/ 25*/
25 26
26 27
@@ -54,12 +55,16 @@
54 55
55#define S3C2410_GPIOREG(x) ((x) + S3C24XX_VA_GPIO) 56#define S3C2410_GPIOREG(x) ((x) + S3C24XX_VA_GPIO)
56 57
57/* port A - 22bits, zero in bit X makes pin X output 58/* port A - S3C2410: 22bits, zero in bit X makes pin X output
59 * S3C2400: 18bits, zero in bit X makes pin X output
58 * 1 makes port special function, this is default 60 * 1 makes port special function, this is default
59*/ 61*/
60#define S3C2410_GPACON S3C2410_GPIOREG(0x00) 62#define S3C2410_GPACON S3C2410_GPIOREG(0x00)
61#define S3C2410_GPADAT S3C2410_GPIOREG(0x04) 63#define S3C2410_GPADAT S3C2410_GPIOREG(0x04)
62 64
65#define S3C2400_GPACON S3C2410_GPIOREG(0x00)
66#define S3C2400_GPADAT S3C2410_GPIOREG(0x04)
67
63#define S3C2410_GPA0 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 0) 68#define S3C2410_GPA0 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 0)
64#define S3C2410_GPA0_OUT (0<<0) 69#define S3C2410_GPA0_OUT (0<<0)
65#define S3C2410_GPA0_ADDR0 (1<<0) 70#define S3C2410_GPA0_ADDR0 (1<<0)
@@ -103,34 +108,42 @@
103#define S3C2410_GPA10 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 10) 108#define S3C2410_GPA10 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 10)
104#define S3C2410_GPA10_OUT (0<<10) 109#define S3C2410_GPA10_OUT (0<<10)
105#define S3C2410_GPA10_ADDR25 (1<<10) 110#define S3C2410_GPA10_ADDR25 (1<<10)
111#define S3C2400_GPA10_SCKE (1<<10)
106 112
107#define S3C2410_GPA11 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 11) 113#define S3C2410_GPA11 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 11)
108#define S3C2410_GPA11_OUT (0<<11) 114#define S3C2410_GPA11_OUT (0<<11)
109#define S3C2410_GPA11_ADDR26 (1<<11) 115#define S3C2410_GPA11_ADDR26 (1<<11)
116#define S3C2400_GPA11_nCAS0 (1<<11)
110 117
111#define S3C2410_GPA12 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 12) 118#define S3C2410_GPA12 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 12)
112#define S3C2410_GPA12_OUT (0<<12) 119#define S3C2410_GPA12_OUT (0<<12)
113#define S3C2410_GPA12_nGCS1 (1<<12) 120#define S3C2410_GPA12_nGCS1 (1<<12)
121#define S3C2400_GPA12_nCAS1 (1<<12)
114 122
115#define S3C2410_GPA13 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 13) 123#define S3C2410_GPA13 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 13)
116#define S3C2410_GPA13_OUT (0<<13) 124#define S3C2410_GPA13_OUT (0<<13)
117#define S3C2410_GPA13_nGCS2 (1<<13) 125#define S3C2410_GPA13_nGCS2 (1<<13)
126#define S3C2400_GPA13_nGCS1 (1<<13)
118 127
119#define S3C2410_GPA14 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 14) 128#define S3C2410_GPA14 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 14)
120#define S3C2410_GPA14_OUT (0<<14) 129#define S3C2410_GPA14_OUT (0<<14)
121#define S3C2410_GPA14_nGCS3 (1<<14) 130#define S3C2410_GPA14_nGCS3 (1<<14)
131#define S3C2400_GPA14_nGCS2 (1<<14)
122 132
123#define S3C2410_GPA15 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 15) 133#define S3C2410_GPA15 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 15)
124#define S3C2410_GPA15_OUT (0<<15) 134#define S3C2410_GPA15_OUT (0<<15)
125#define S3C2410_GPA15_nGCS4 (1<<15) 135#define S3C2410_GPA15_nGCS4 (1<<15)
136#define S3C2400_GPA15_nGCS3 (1<<15)
126 137
127#define S3C2410_GPA16 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 16) 138#define S3C2410_GPA16 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 16)
128#define S3C2410_GPA16_OUT (0<<16) 139#define S3C2410_GPA16_OUT (0<<16)
129#define S3C2410_GPA16_nGCS5 (1<<16) 140#define S3C2410_GPA16_nGCS5 (1<<16)
141#define S3C2400_GPA16_nGCS4 (1<<16)
130 142
131#define S3C2410_GPA17 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 17) 143#define S3C2410_GPA17 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 17)
132#define S3C2410_GPA17_OUT (0<<17) 144#define S3C2410_GPA17_OUT (0<<17)
133#define S3C2410_GPA17_CLE (1<<17) 145#define S3C2410_GPA17_CLE (1<<17)
146#define S3C2400_GPA17_nGCS5 (1<<17)
134 147
135#define S3C2410_GPA18 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 18) 148#define S3C2410_GPA18 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 18)
136#define S3C2410_GPA18_OUT (0<<18) 149#define S3C2410_GPA18_OUT (0<<18)
@@ -152,10 +165,16 @@
152#define S3C2410_GPA22_OUT (0<<22) 165#define S3C2410_GPA22_OUT (0<<22)
153#define S3C2410_GPA22_nFCE (1<<22) 166#define S3C2410_GPA22_nFCE (1<<22)
154 167
155/* 0x08 and 0x0c are reserved */ 168/* 0x08 and 0x0c are reserved on S3C2410 */
156 169
157/* GPB is 10 IO pins, each configured by 2 bits each in GPBCON. 170/* S3C2410:
171 * GPB is 10 IO pins, each configured by 2 bits each in GPBCON.
158 * 00 = input, 01 = output, 10=special function, 11=reserved 172 * 00 = input, 01 = output, 10=special function, 11=reserved
173
174 * S3C2400:
175 * GPB is 16 IO pins, each configured by 2 bits each in GPBCON.
176 * 00 = input, 01 = output, 10=data, 11=special function
177
159 * bit 0,1 = pin 0, 2,3= pin 1... 178 * bit 0,1 = pin 0, 2,3= pin 1...
160 * 179 *
161 * CPBUP = pull up resistor control, 1=disabled, 0=enabled 180 * CPBUP = pull up resistor control, 1=disabled, 0=enabled
@@ -165,63 +184,113 @@
165#define S3C2410_GPBDAT S3C2410_GPIOREG(0x14) 184#define S3C2410_GPBDAT S3C2410_GPIOREG(0x14)
166#define S3C2410_GPBUP S3C2410_GPIOREG(0x18) 185#define S3C2410_GPBUP S3C2410_GPIOREG(0x18)
167 186
187#define S3C2400_GPBCON S3C2410_GPIOREG(0x08)
188#define S3C2400_GPBDAT S3C2410_GPIOREG(0x0C)
189#define S3C2400_GPBUP S3C2410_GPIOREG(0x10)
190
168/* no i/o pin in port b can have value 3! */ 191/* no i/o pin in port b can have value 3! */
169 192
170#define S3C2410_GPB0 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 0) 193#define S3C2410_GPB0 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 0)
171#define S3C2410_GPB0_INP (0x00 << 0) 194#define S3C2410_GPB0_INP (0x00 << 0)
172#define S3C2410_GPB0_OUTP (0x01 << 0) 195#define S3C2410_GPB0_OUTP (0x01 << 0)
173#define S3C2410_GPB0_TOUT0 (0x02 << 0) 196#define S3C2410_GPB0_TOUT0 (0x02 << 0)
197#define S3C2400_GPB0_DATA16 (0x02 << 0)
174 198
175#define S3C2410_GPB1 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 1) 199#define S3C2410_GPB1 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 1)
176#define S3C2410_GPB1_INP (0x00 << 2) 200#define S3C2410_GPB1_INP (0x00 << 2)
177#define S3C2410_GPB1_OUTP (0x01 << 2) 201#define S3C2410_GPB1_OUTP (0x01 << 2)
178#define S3C2410_GPB1_TOUT1 (0x02 << 2) 202#define S3C2410_GPB1_TOUT1 (0x02 << 2)
203#define S3C2400_GPB1_DATA17 (0x02 << 2)
179 204
180#define S3C2410_GPB2 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 2) 205#define S3C2410_GPB2 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 2)
181#define S3C2410_GPB2_INP (0x00 << 4) 206#define S3C2410_GPB2_INP (0x00 << 4)
182#define S3C2410_GPB2_OUTP (0x01 << 4) 207#define S3C2410_GPB2_OUTP (0x01 << 4)
183#define S3C2410_GPB2_TOUT2 (0x02 << 4) 208#define S3C2410_GPB2_TOUT2 (0x02 << 4)
209#define S3C2400_GPB2_DATA18 (0x02 << 4)
210#define S3C2400_GPB2_TCLK1 (0x03 << 4)
184 211
185#define S3C2410_GPB3 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 3) 212#define S3C2410_GPB3 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 3)
186#define S3C2410_GPB3_INP (0x00 << 6) 213#define S3C2410_GPB3_INP (0x00 << 6)
187#define S3C2410_GPB3_OUTP (0x01 << 6) 214#define S3C2410_GPB3_OUTP (0x01 << 6)
188#define S3C2410_GPB3_TOUT3 (0x02 << 6) 215#define S3C2410_GPB3_TOUT3 (0x02 << 6)
216#define S3C2400_GPB3_DATA19 (0x02 << 6)
217#define S3C2400_GPB3_TXD1 (0x03 << 6)
189 218
190#define S3C2410_GPB4 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 4) 219#define S3C2410_GPB4 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 4)
191#define S3C2410_GPB4_INP (0x00 << 8) 220#define S3C2410_GPB4_INP (0x00 << 8)
192#define S3C2410_GPB4_OUTP (0x01 << 8) 221#define S3C2410_GPB4_OUTP (0x01 << 8)
193#define S3C2410_GPB4_TCLK0 (0x02 << 8) 222#define S3C2410_GPB4_TCLK0 (0x02 << 8)
223#define S3C2400_GPB4_DATA20 (0x02 << 8)
194#define S3C2410_GPB4_MASK (0x03 << 8) 224#define S3C2410_GPB4_MASK (0x03 << 8)
225#define S3C2400_GPB4_RXD1 (0x03 << 8)
226#define S3C2400_GPB4_MASK (0x03 << 8)
195 227
196#define S3C2410_GPB5 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 5) 228#define S3C2410_GPB5 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 5)
197#define S3C2410_GPB5_INP (0x00 << 10) 229#define S3C2410_GPB5_INP (0x00 << 10)
198#define S3C2410_GPB5_OUTP (0x01 << 10) 230#define S3C2410_GPB5_OUTP (0x01 << 10)
199#define S3C2410_GPB5_nXBACK (0x02 << 10) 231#define S3C2410_GPB5_nXBACK (0x02 << 10)
232#define S3C2400_GPB5_DATA21 (0x02 << 10)
233#define S3C2400_GPB5_nCTS1 (0x03 << 10)
200 234
201#define S3C2410_GPB6 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 6) 235#define S3C2410_GPB6 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 6)
202#define S3C2410_GPB6_INP (0x00 << 12) 236#define S3C2410_GPB6_INP (0x00 << 12)
203#define S3C2410_GPB6_OUTP (0x01 << 12) 237#define S3C2410_GPB6_OUTP (0x01 << 12)
204#define S3C2410_GPB6_nXBREQ (0x02 << 12) 238#define S3C2410_GPB6_nXBREQ (0x02 << 12)
239#define S3C2400_GPB6_DATA22 (0x02 << 12)
240#define S3C2400_GPB6_nRTS1 (0x03 << 12)
205 241
206#define S3C2410_GPB7 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 7) 242#define S3C2410_GPB7 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 7)
207#define S3C2410_GPB7_INP (0x00 << 14) 243#define S3C2410_GPB7_INP (0x00 << 14)
208#define S3C2410_GPB7_OUTP (0x01 << 14) 244#define S3C2410_GPB7_OUTP (0x01 << 14)
209#define S3C2410_GPB7_nXDACK1 (0x02 << 14) 245#define S3C2410_GPB7_nXDACK1 (0x02 << 14)
246#define S3C2400_GPB7_DATA23 (0x02 << 14)
210 247
211#define S3C2410_GPB8 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 8) 248#define S3C2410_GPB8 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 8)
212#define S3C2410_GPB8_INP (0x00 << 16) 249#define S3C2410_GPB8_INP (0x00 << 16)
213#define S3C2410_GPB8_OUTP (0x01 << 16) 250#define S3C2410_GPB8_OUTP (0x01 << 16)
214#define S3C2410_GPB8_nXDREQ1 (0x02 << 16) 251#define S3C2410_GPB8_nXDREQ1 (0x02 << 16)
252#define S3C2400_GPB8_DATA24 (0x02 << 16)
215 253
216#define S3C2410_GPB9 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 9) 254#define S3C2410_GPB9 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 9)
217#define S3C2410_GPB9_INP (0x00 << 18) 255#define S3C2410_GPB9_INP (0x00 << 18)
218#define S3C2410_GPB9_OUTP (0x01 << 18) 256#define S3C2410_GPB9_OUTP (0x01 << 18)
219#define S3C2410_GPB9_nXDACK0 (0x02 << 18) 257#define S3C2410_GPB9_nXDACK0 (0x02 << 18)
258#define S3C2400_GPB9_DATA25 (0x02 << 18)
259#define S3C2400_GPB9_I2SSDI (0x03 << 18)
220 260
221#define S3C2410_GPB10 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 10) 261#define S3C2410_GPB10 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 10)
222#define S3C2410_GPB10_INP (0x00 << 20) 262#define S3C2410_GPB10_INP (0x00 << 20)
223#define S3C2410_GPB10_OUTP (0x01 << 20) 263#define S3C2410_GPB10_OUTP (0x01 << 20)
224#define S3C2410_GPB10_nXDRE0 (0x02 << 20) 264#define S3C2410_GPB10_nXDRE0 (0x02 << 20)
265#define S3C2400_GPB10_DATA26 (0x02 << 20)
266#define S3C2400_GPB10_nSS (0x03 << 20)
267
268#define S3C2400_GPB11 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 11)
269#define S3C2400_GPB11_INP (0x00 << 22)
270#define S3C2400_GPB11_OUTP (0x01 << 22)
271#define S3C2400_GPB11_DATA27 (0x02 << 22)
272
273#define S3C2400_GPB12 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 12)
274#define S3C2400_GPB12_INP (0x00 << 24)
275#define S3C2400_GPB12_OUTP (0x01 << 24)
276#define S3C2400_GPB12_DATA28 (0x02 << 24)
277
278#define S3C2400_GPB13 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 13)
279#define S3C2400_GPB13_INP (0x00 << 26)
280#define S3C2400_GPB13_OUTP (0x01 << 26)
281#define S3C2400_GPB13_DATA29 (0x02 << 26)
282
283#define S3C2400_GPB14 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 14)
284#define S3C2400_GPB14_INP (0x00 << 28)
285#define S3C2400_GPB14_OUTP (0x01 << 28)
286#define S3C2400_GPB14_DATA30 (0x02 << 28)
287
288#define S3C2400_GPB15 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 15)
289#define S3C2400_GPB15_INP (0x00 << 30)
290#define S3C2400_GPB15_OUTP (0x01 << 30)
291#define S3C2400_GPB15_DATA31 (0x02 << 30)
292
293#define S3C2410_GPB_PUPDIS(x) (1<<(x))
225 294
226/* Port C consits of 16 GPIO/Special function 295/* Port C consits of 16 GPIO/Special function
227 * 296 *
@@ -233,150 +302,193 @@
233#define S3C2410_GPCDAT S3C2410_GPIOREG(0x24) 302#define S3C2410_GPCDAT S3C2410_GPIOREG(0x24)
234#define S3C2410_GPCUP S3C2410_GPIOREG(0x28) 303#define S3C2410_GPCUP S3C2410_GPIOREG(0x28)
235 304
305#define S3C2400_GPCCON S3C2410_GPIOREG(0x14)
306#define S3C2400_GPCDAT S3C2410_GPIOREG(0x18)
307#define S3C2400_GPCUP S3C2410_GPIOREG(0x1C)
308
236#define S3C2410_GPC0 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 0) 309#define S3C2410_GPC0 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 0)
237#define S3C2410_GPC0_INP (0x00 << 0) 310#define S3C2410_GPC0_INP (0x00 << 0)
238#define S3C2410_GPC0_OUTP (0x01 << 0) 311#define S3C2410_GPC0_OUTP (0x01 << 0)
239#define S3C2410_GPC0_LEND (0x02 << 0) 312#define S3C2410_GPC0_LEND (0x02 << 0)
313#define S3C2400_GPC0_VD0 (0x02 << 0)
240 314
241#define S3C2410_GPC1 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 1) 315#define S3C2410_GPC1 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 1)
242#define S3C2410_GPC1_INP (0x00 << 2) 316#define S3C2410_GPC1_INP (0x00 << 2)
243#define S3C2410_GPC1_OUTP (0x01 << 2) 317#define S3C2410_GPC1_OUTP (0x01 << 2)
244#define S3C2410_GPC1_VCLK (0x02 << 2) 318#define S3C2410_GPC1_VCLK (0x02 << 2)
319#define S3C2400_GPC1_VD1 (0x02 << 2)
245 320
246#define S3C2410_GPC2 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 2) 321#define S3C2410_GPC2 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 2)
247#define S3C2410_GPC2_INP (0x00 << 4) 322#define S3C2410_GPC2_INP (0x00 << 4)
248#define S3C2410_GPC2_OUTP (0x01 << 4) 323#define S3C2410_GPC2_OUTP (0x01 << 4)
249#define S3C2410_GPC2_VLINE (0x02 << 4) 324#define S3C2410_GPC2_VLINE (0x02 << 4)
325#define S3C2400_GPC2_VD2 (0x02 << 4)
250 326
251#define S3C2410_GPC3 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 3) 327#define S3C2410_GPC3 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 3)
252#define S3C2410_GPC3_INP (0x00 << 6) 328#define S3C2410_GPC3_INP (0x00 << 6)
253#define S3C2410_GPC3_OUTP (0x01 << 6) 329#define S3C2410_GPC3_OUTP (0x01 << 6)
254#define S3C2410_GPC3_VFRAME (0x02 << 6) 330#define S3C2410_GPC3_VFRAME (0x02 << 6)
331#define S3C2400_GPC3_VD3 (0x02 << 6)
255 332
256#define S3C2410_GPC4 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 4) 333#define S3C2410_GPC4 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 4)
257#define S3C2410_GPC4_INP (0x00 << 8) 334#define S3C2410_GPC4_INP (0x00 << 8)
258#define S3C2410_GPC4_OUTP (0x01 << 8) 335#define S3C2410_GPC4_OUTP (0x01 << 8)
259#define S3C2410_GPC4_VM (0x02 << 8) 336#define S3C2410_GPC4_VM (0x02 << 8)
337#define S3C2400_GPC4_VD4 (0x02 << 8)
260 338
261#define S3C2410_GPC5 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 5) 339#define S3C2410_GPC5 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 5)
262#define S3C2410_GPC5_INP (0x00 << 10) 340#define S3C2410_GPC5_INP (0x00 << 10)
263#define S3C2410_GPC5_OUTP (0x01 << 10) 341#define S3C2410_GPC5_OUTP (0x01 << 10)
264#define S3C2410_GPC5_LCDVF0 (0x02 << 10) 342#define S3C2410_GPC5_LCDVF0 (0x02 << 10)
343#define S3C2400_GPC5_VD5 (0x02 << 10)
265 344
266#define S3C2410_GPC6 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 6) 345#define S3C2410_GPC6 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 6)
267#define S3C2410_GPC6_INP (0x00 << 12) 346#define S3C2410_GPC6_INP (0x00 << 12)
268#define S3C2410_GPC6_OUTP (0x01 << 12) 347#define S3C2410_GPC6_OUTP (0x01 << 12)
269#define S3C2410_GPC6_LCDVF1 (0x02 << 12) 348#define S3C2410_GPC6_LCDVF1 (0x02 << 12)
349#define S3C2400_GPC6_VD6 (0x02 << 12)
270 350
271#define S3C2410_GPC7 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 7) 351#define S3C2410_GPC7 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 7)
272#define S3C2410_GPC7_INP (0x00 << 14) 352#define S3C2410_GPC7_INP (0x00 << 14)
273#define S3C2410_GPC7_OUTP (0x01 << 14) 353#define S3C2410_GPC7_OUTP (0x01 << 14)
274#define S3C2410_GPC7_LCDVF2 (0x02 << 14) 354#define S3C2410_GPC7_LCDVF2 (0x02 << 14)
355#define S3C2400_GPC7_VD7 (0x02 << 14)
275 356
276#define S3C2410_GPC8 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 8) 357#define S3C2410_GPC8 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 8)
277#define S3C2410_GPC8_INP (0x00 << 16) 358#define S3C2410_GPC8_INP (0x00 << 16)
278#define S3C2410_GPC8_OUTP (0x01 << 16) 359#define S3C2410_GPC8_OUTP (0x01 << 16)
279#define S3C2410_GPC8_VD0 (0x02 << 16) 360#define S3C2410_GPC8_VD0 (0x02 << 16)
361#define S3C2400_GPC8_VD8 (0x02 << 16)
280 362
281#define S3C2410_GPC9 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 9) 363#define S3C2410_GPC9 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 9)
282#define S3C2410_GPC9_INP (0x00 << 18) 364#define S3C2410_GPC9_INP (0x00 << 18)
283#define S3C2410_GPC9_OUTP (0x01 << 18) 365#define S3C2410_GPC9_OUTP (0x01 << 18)
284#define S3C2410_GPC9_VD1 (0x02 << 18) 366#define S3C2410_GPC9_VD1 (0x02 << 18)
367#define S3C2400_GPC9_VD9 (0x02 << 18)
285 368
286#define S3C2410_GPC10 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 10) 369#define S3C2410_GPC10 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 10)
287#define S3C2410_GPC10_INP (0x00 << 20) 370#define S3C2410_GPC10_INP (0x00 << 20)
288#define S3C2410_GPC10_OUTP (0x01 << 20) 371#define S3C2410_GPC10_OUTP (0x01 << 20)
289#define S3C2410_GPC10_VD2 (0x02 << 20) 372#define S3C2410_GPC10_VD2 (0x02 << 20)
373#define S3C2400_GPC10_VD10 (0x02 << 20)
290 374
291#define S3C2410_GPC11 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 11) 375#define S3C2410_GPC11 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 11)
292#define S3C2410_GPC11_INP (0x00 << 22) 376#define S3C2410_GPC11_INP (0x00 << 22)
293#define S3C2410_GPC11_OUTP (0x01 << 22) 377#define S3C2410_GPC11_OUTP (0x01 << 22)
294#define S3C2410_GPC11_VD3 (0x02 << 22) 378#define S3C2410_GPC11_VD3 (0x02 << 22)
379#define S3C2400_GPC11_VD11 (0x02 << 22)
295 380
296#define S3C2410_GPC12 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 12) 381#define S3C2410_GPC12 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 12)
297#define S3C2410_GPC12_INP (0x00 << 24) 382#define S3C2410_GPC12_INP (0x00 << 24)
298#define S3C2410_GPC12_OUTP (0x01 << 24) 383#define S3C2410_GPC12_OUTP (0x01 << 24)
299#define S3C2410_GPC12_VD4 (0x02 << 24) 384#define S3C2410_GPC12_VD4 (0x02 << 24)
385#define S3C2400_GPC12_VD12 (0x02 << 24)
300 386
301#define S3C2410_GPC13 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 13) 387#define S3C2410_GPC13 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 13)
302#define S3C2410_GPC13_INP (0x00 << 26) 388#define S3C2410_GPC13_INP (0x00 << 26)
303#define S3C2410_GPC13_OUTP (0x01 << 26) 389#define S3C2410_GPC13_OUTP (0x01 << 26)
304#define S3C2410_GPC13_VD5 (0x02 << 26) 390#define S3C2410_GPC13_VD5 (0x02 << 26)
391#define S3C2400_GPC13_VD13 (0x02 << 26)
305 392
306#define S3C2410_GPC14 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 14) 393#define S3C2410_GPC14 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 14)
307#define S3C2410_GPC14_INP (0x00 << 28) 394#define S3C2410_GPC14_INP (0x00 << 28)
308#define S3C2410_GPC14_OUTP (0x01 << 28) 395#define S3C2410_GPC14_OUTP (0x01 << 28)
309#define S3C2410_GPC14_VD6 (0x02 << 28) 396#define S3C2410_GPC14_VD6 (0x02 << 28)
397#define S3C2400_GPC14_VD14 (0x02 << 28)
310 398
311#define S3C2410_GPC15 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 15) 399#define S3C2410_GPC15 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 15)
312#define S3C2410_GPC15_INP (0x00 << 30) 400#define S3C2410_GPC15_INP (0x00 << 30)
313#define S3C2410_GPC15_OUTP (0x01 << 30) 401#define S3C2410_GPC15_OUTP (0x01 << 30)
314#define S3C2410_GPC15_VD7 (0x02 << 30) 402#define S3C2410_GPC15_VD7 (0x02 << 30)
403#define S3C2400_GPC15_VD15 (0x02 << 30)
404
405#define S3C2410_GPC_PUPDIS(x) (1<<(x))
315 406
316/* Port D consists of 16 GPIO/Special function 407/*
408 * S3C2410: Port D consists of 16 GPIO/Special function
317 * 409 *
318 * almost identical setup to port b, but the special functions are mostly 410 * almost identical setup to port b, but the special functions are mostly
319 * to do with the video system's data. 411 * to do with the video system's data.
412 *
413 * S3C2400: Port D consists of 11 GPIO/Special function
414 *
415 * almost identical setup to port c
320*/ 416*/
321 417
322#define S3C2410_GPDCON S3C2410_GPIOREG(0x30) 418#define S3C2410_GPDCON S3C2410_GPIOREG(0x30)
323#define S3C2410_GPDDAT S3C2410_GPIOREG(0x34) 419#define S3C2410_GPDDAT S3C2410_GPIOREG(0x34)
324#define S3C2410_GPDUP S3C2410_GPIOREG(0x38) 420#define S3C2410_GPDUP S3C2410_GPIOREG(0x38)
325 421
422#define S3C2400_GPDCON S3C2410_GPIOREG(0x20)
423#define S3C2400_GPDDAT S3C2410_GPIOREG(0x24)
424#define S3C2400_GPDUP S3C2410_GPIOREG(0x28)
425
326#define S3C2410_GPD0 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 0) 426#define S3C2410_GPD0 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 0)
327#define S3C2410_GPD0_INP (0x00 << 0) 427#define S3C2410_GPD0_INP (0x00 << 0)
328#define S3C2410_GPD0_OUTP (0x01 << 0) 428#define S3C2410_GPD0_OUTP (0x01 << 0)
329#define S3C2410_GPD0_VD8 (0x02 << 0) 429#define S3C2410_GPD0_VD8 (0x02 << 0)
430#define S3C2400_GPD0_VFRAME (0x02 << 0)
330 431
331#define S3C2410_GPD1 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 1) 432#define S3C2410_GPD1 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 1)
332#define S3C2410_GPD1_INP (0x00 << 2) 433#define S3C2410_GPD1_INP (0x00 << 2)
333#define S3C2410_GPD1_OUTP (0x01 << 2) 434#define S3C2410_GPD1_OUTP (0x01 << 2)
334#define S3C2410_GPD1_VD9 (0x02 << 2) 435#define S3C2410_GPD1_VD9 (0x02 << 2)
436#define S3C2400_GPD1_VM (0x02 << 2)
335 437
336#define S3C2410_GPD2 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 2) 438#define S3C2410_GPD2 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 2)
337#define S3C2410_GPD2_INP (0x00 << 4) 439#define S3C2410_GPD2_INP (0x00 << 4)
338#define S3C2410_GPD2_OUTP (0x01 << 4) 440#define S3C2410_GPD2_OUTP (0x01 << 4)
339#define S3C2410_GPD2_VD10 (0x02 << 4) 441#define S3C2410_GPD2_VD10 (0x02 << 4)
442#define S3C2400_GPD2_VLINE (0x02 << 4)
340 443
341#define S3C2410_GPD3 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 3) 444#define S3C2410_GPD3 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 3)
342#define S3C2410_GPD3_INP (0x00 << 6) 445#define S3C2410_GPD3_INP (0x00 << 6)
343#define S3C2410_GPD3_OUTP (0x01 << 6) 446#define S3C2410_GPD3_OUTP (0x01 << 6)
344#define S3C2410_GPD3_VD11 (0x02 << 6) 447#define S3C2410_GPD3_VD11 (0x02 << 6)
448#define S3C2400_GPD3_VCLK (0x02 << 6)
345 449
346#define S3C2410_GPD4 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 4) 450#define S3C2410_GPD4 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 4)
347#define S3C2410_GPD4_INP (0x00 << 8) 451#define S3C2410_GPD4_INP (0x00 << 8)
348#define S3C2410_GPD4_OUTP (0x01 << 8) 452#define S3C2410_GPD4_OUTP (0x01 << 8)
349#define S3C2410_GPD4_VD12 (0x02 << 8) 453#define S3C2410_GPD4_VD12 (0x02 << 8)
454#define S3C2400_GPD4_LEND (0x02 << 8)
350 455
351#define S3C2410_GPD5 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 5) 456#define S3C2410_GPD5 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 5)
352#define S3C2410_GPD5_INP (0x00 << 10) 457#define S3C2410_GPD5_INP (0x00 << 10)
353#define S3C2410_GPD5_OUTP (0x01 << 10) 458#define S3C2410_GPD5_OUTP (0x01 << 10)
354#define S3C2410_GPD5_VD13 (0x02 << 10) 459#define S3C2410_GPD5_VD13 (0x02 << 10)
460#define S3C2400_GPD5_TOUT0 (0x02 << 10)
355 461
356#define S3C2410_GPD6 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 6) 462#define S3C2410_GPD6 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 6)
357#define S3C2410_GPD6_INP (0x00 << 12) 463#define S3C2410_GPD6_INP (0x00 << 12)
358#define S3C2410_GPD6_OUTP (0x01 << 12) 464#define S3C2410_GPD6_OUTP (0x01 << 12)
359#define S3C2410_GPD6_VD14 (0x02 << 12) 465#define S3C2410_GPD6_VD14 (0x02 << 12)
466#define S3C2400_GPD6_TOUT1 (0x02 << 12)
360 467
361#define S3C2410_GPD7 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 7) 468#define S3C2410_GPD7 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 7)
362#define S3C2410_GPD7_INP (0x00 << 14) 469#define S3C2410_GPD7_INP (0x00 << 14)
363#define S3C2410_GPD7_OUTP (0x01 << 14) 470#define S3C2410_GPD7_OUTP (0x01 << 14)
364#define S3C2410_GPD7_VD15 (0x02 << 14) 471#define S3C2410_GPD7_VD15 (0x02 << 14)
472#define S3C2400_GPD7_TOUT2 (0x02 << 14)
365 473
366#define S3C2410_GPD8 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 8) 474#define S3C2410_GPD8 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 8)
367#define S3C2410_GPD8_INP (0x00 << 16) 475#define S3C2410_GPD8_INP (0x00 << 16)
368#define S3C2410_GPD8_OUTP (0x01 << 16) 476#define S3C2410_GPD8_OUTP (0x01 << 16)
369#define S3C2410_GPD8_VD16 (0x02 << 16) 477#define S3C2410_GPD8_VD16 (0x02 << 16)
478#define S3C2400_GPD8_TOUT3 (0x02 << 16)
370 479
371#define S3C2410_GPD9 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 9) 480#define S3C2410_GPD9 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 9)
372#define S3C2410_GPD9_INP (0x00 << 18) 481#define S3C2410_GPD9_INP (0x00 << 18)
373#define S3C2410_GPD9_OUTP (0x01 << 18) 482#define S3C2410_GPD9_OUTP (0x01 << 18)
374#define S3C2410_GPD9_VD17 (0x02 << 18) 483#define S3C2410_GPD9_VD17 (0x02 << 18)
484#define S3C2400_GPD9_TCLK0 (0x02 << 18)
485#define S3C2410_GPD9_MASK (0x03 << 18)
375 486
376#define S3C2410_GPD10 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 10) 487#define S3C2410_GPD10 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 10)
377#define S3C2410_GPD10_INP (0x00 << 20) 488#define S3C2410_GPD10_INP (0x00 << 20)
378#define S3C2410_GPD10_OUTP (0x01 << 20) 489#define S3C2410_GPD10_OUTP (0x01 << 20)
379#define S3C2410_GPD10_VD18 (0x02 << 20) 490#define S3C2410_GPD10_VD18 (0x02 << 20)
491#define S3C2400_GPD10_nWAIT (0x02 << 20)
380 492
381#define S3C2410_GPD11 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 11) 493#define S3C2410_GPD11 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 11)
382#define S3C2410_GPD11_INP (0x00 << 22) 494#define S3C2410_GPD11_INP (0x00 << 22)
@@ -403,37 +515,56 @@
403#define S3C2410_GPD15_OUTP (0x01 << 30) 515#define S3C2410_GPD15_OUTP (0x01 << 30)
404#define S3C2410_GPD15_VD23 (0x02 << 30) 516#define S3C2410_GPD15_VD23 (0x02 << 30)
405 517
406/* Port E consists of 16 GPIO/Special function 518#define S3C2410_GPD_PUPDIS(x) (1<<(x))
519
520/* S3C2410:
521 * Port E consists of 16 GPIO/Special function
407 * 522 *
408 * again, the same as port B, but dealing with I2S, SDI, and 523 * again, the same as port B, but dealing with I2S, SDI, and
409 * more miscellaneous functions 524 * more miscellaneous functions
525 *
526 * S3C2400:
527 * Port E consists of 12 GPIO/Special function
528 *
529 * GPIO / interrupt inputs
410*/ 530*/
411 531
412#define S3C2410_GPECON S3C2410_GPIOREG(0x40) 532#define S3C2410_GPECON S3C2410_GPIOREG(0x40)
413#define S3C2410_GPEDAT S3C2410_GPIOREG(0x44) 533#define S3C2410_GPEDAT S3C2410_GPIOREG(0x44)
414#define S3C2410_GPEUP S3C2410_GPIOREG(0x48) 534#define S3C2410_GPEUP S3C2410_GPIOREG(0x48)
415 535
536#define S3C2400_GPECON S3C2410_GPIOREG(0x2C)
537#define S3C2400_GPEDAT S3C2410_GPIOREG(0x30)
538#define S3C2400_GPEUP S3C2410_GPIOREG(0x34)
539
416#define S3C2410_GPE0 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 0) 540#define S3C2410_GPE0 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 0)
417#define S3C2410_GPE0_INP (0x00 << 0) 541#define S3C2410_GPE0_INP (0x00 << 0)
418#define S3C2410_GPE0_OUTP (0x01 << 0) 542#define S3C2410_GPE0_OUTP (0x01 << 0)
419#define S3C2410_GPE0_I2SLRCK (0x02 << 0) 543#define S3C2410_GPE0_I2SLRCK (0x02 << 0)
544#define S3C2400_GPE0_EINT0 (0x02 << 0)
420#define S3C2410_GPE0_MASK (0x03 << 0) 545#define S3C2410_GPE0_MASK (0x03 << 0)
421 546
422#define S3C2410_GPE1 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 1) 547#define S3C2410_GPE1 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 1)
423#define S3C2410_GPE1_INP (0x00 << 2) 548#define S3C2410_GPE1_INP (0x00 << 2)
424#define S3C2410_GPE1_OUTP (0x01 << 2) 549#define S3C2410_GPE1_OUTP (0x01 << 2)
425#define S3C2410_GPE1_I2SSCLK (0x02 << 2) 550#define S3C2410_GPE1_I2SSCLK (0x02 << 2)
551#define S3C2400_GPE1_EINT1 (0x02 << 2)
552#define S3C2400_GPE1_nSS (0x03 << 2)
426#define S3C2410_GPE1_MASK (0x03 << 2) 553#define S3C2410_GPE1_MASK (0x03 << 2)
427 554
428#define S3C2410_GPE2 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 2) 555#define S3C2410_GPE2 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 2)
429#define S3C2410_GPE2_INP (0x00 << 4) 556#define S3C2410_GPE2_INP (0x00 << 4)
430#define S3C2410_GPE2_OUTP (0x01 << 4) 557#define S3C2410_GPE2_OUTP (0x01 << 4)
431#define S3C2410_GPE2_CDCLK (0x02 << 4) 558#define S3C2410_GPE2_CDCLK (0x02 << 4)
559#define S3C2400_GPE2_EINT2 (0x02 << 4)
560#define S3C2400_GPE2_I2SSDI (0x03 << 4)
432 561
433#define S3C2410_GPE3 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 3) 562#define S3C2410_GPE3 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 3)
434#define S3C2410_GPE3_INP (0x00 << 6) 563#define S3C2410_GPE3_INP (0x00 << 6)
435#define S3C2410_GPE3_OUTP (0x01 << 6) 564#define S3C2410_GPE3_OUTP (0x01 << 6)
436#define S3C2410_GPE3_I2SSDI (0x02 << 6) 565#define S3C2410_GPE3_I2SSDI (0x02 << 6)
566#define S3C2400_GPE3_EINT3 (0x02 << 6)
567#define S3C2400_GPE3_nCTS1 (0x03 << 6)
437#define S3C2410_GPE3_nSS0 (0x03 << 6) 568#define S3C2410_GPE3_nSS0 (0x03 << 6)
438#define S3C2410_GPE3_MASK (0x03 << 6) 569#define S3C2410_GPE3_MASK (0x03 << 6)
439 570
@@ -441,6 +572,8 @@
441#define S3C2410_GPE4_INP (0x00 << 8) 572#define S3C2410_GPE4_INP (0x00 << 8)
442#define S3C2410_GPE4_OUTP (0x01 << 8) 573#define S3C2410_GPE4_OUTP (0x01 << 8)
443#define S3C2410_GPE4_I2SSDO (0x02 << 8) 574#define S3C2410_GPE4_I2SSDO (0x02 << 8)
575#define S3C2400_GPE4_EINT4 (0x02 << 8)
576#define S3C2400_GPE4_nRTS1 (0x03 << 8)
444#define S3C2410_GPE4_I2SSDI (0x03 << 8) 577#define S3C2410_GPE4_I2SSDI (0x03 << 8)
445#define S3C2410_GPE4_MASK (0x03 << 8) 578#define S3C2410_GPE4_MASK (0x03 << 8)
446 579
@@ -448,36 +581,46 @@
448#define S3C2410_GPE5_INP (0x00 << 10) 581#define S3C2410_GPE5_INP (0x00 << 10)
449#define S3C2410_GPE5_OUTP (0x01 << 10) 582#define S3C2410_GPE5_OUTP (0x01 << 10)
450#define S3C2410_GPE5_SDCLK (0x02 << 10) 583#define S3C2410_GPE5_SDCLK (0x02 << 10)
584#define S3C2400_GPE5_EINT5 (0x02 << 10)
585#define S3C2400_GPE5_TCLK1 (0x03 << 10)
451 586
452#define S3C2410_GPE6 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 6) 587#define S3C2410_GPE6 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 6)
453#define S3C2410_GPE6_INP (0x00 << 12) 588#define S3C2410_GPE6_INP (0x00 << 12)
454#define S3C2410_GPE6_OUTP (0x01 << 12) 589#define S3C2410_GPE6_OUTP (0x01 << 12)
455#define S3C2410_GPE6_SDCMD (0x02 << 12) 590#define S3C2410_GPE6_SDCMD (0x02 << 12)
591#define S3C2400_GPE6_EINT6 (0x02 << 12)
456 592
457#define S3C2410_GPE7 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 7) 593#define S3C2410_GPE7 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 7)
458#define S3C2410_GPE7_INP (0x00 << 14) 594#define S3C2410_GPE7_INP (0x00 << 14)
459#define S3C2410_GPE7_OUTP (0x01 << 14) 595#define S3C2410_GPE7_OUTP (0x01 << 14)
460#define S3C2410_GPE7_SDDAT0 (0x02 << 14) 596#define S3C2410_GPE7_SDDAT0 (0x02 << 14)
597#define S3C2400_GPE7_EINT7 (0x02 << 14)
461 598
462#define S3C2410_GPE8 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 8) 599#define S3C2410_GPE8 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 8)
463#define S3C2410_GPE8_INP (0x00 << 16) 600#define S3C2410_GPE8_INP (0x00 << 16)
464#define S3C2410_GPE8_OUTP (0x01 << 16) 601#define S3C2410_GPE8_OUTP (0x01 << 16)
465#define S3C2410_GPE8_SDDAT1 (0x02 << 16) 602#define S3C2410_GPE8_SDDAT1 (0x02 << 16)
603#define S3C2400_GPE8_nXDACK0 (0x02 << 16)
466 604
467#define S3C2410_GPE9 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 9) 605#define S3C2410_GPE9 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 9)
468#define S3C2410_GPE9_INP (0x00 << 18) 606#define S3C2410_GPE9_INP (0x00 << 18)
469#define S3C2410_GPE9_OUTP (0x01 << 18) 607#define S3C2410_GPE9_OUTP (0x01 << 18)
470#define S3C2410_GPE9_SDDAT2 (0x02 << 18) 608#define S3C2410_GPE9_SDDAT2 (0x02 << 18)
609#define S3C2400_GPE9_nXDACK1 (0x02 << 18)
610#define S3C2400_GPE9_nXBACK (0x03 << 18)
471 611
472#define S3C2410_GPE10 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 10) 612#define S3C2410_GPE10 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 10)
473#define S3C2410_GPE10_INP (0x00 << 20) 613#define S3C2410_GPE10_INP (0x00 << 20)
474#define S3C2410_GPE10_OUTP (0x01 << 20) 614#define S3C2410_GPE10_OUTP (0x01 << 20)
475#define S3C2410_GPE10_SDDAT3 (0x02 << 20) 615#define S3C2410_GPE10_SDDAT3 (0x02 << 20)
616#define S3C2400_GPE10_nXDREQ0 (0x02 << 20)
476 617
477#define S3C2410_GPE11 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 11) 618#define S3C2410_GPE11 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 11)
478#define S3C2410_GPE11_INP (0x00 << 22) 619#define S3C2410_GPE11_INP (0x00 << 22)
479#define S3C2410_GPE11_OUTP (0x01 << 22) 620#define S3C2410_GPE11_OUTP (0x01 << 22)
480#define S3C2410_GPE11_SPIMISO0 (0x02 << 22) 621#define S3C2410_GPE11_SPIMISO0 (0x02 << 22)
622#define S3C2400_GPE11_nXDREQ1 (0x02 << 22)
623#define S3C2400_GPE11_nXBREQ (0x03 << 22)
481 624
482#define S3C2410_GPE12 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 12) 625#define S3C2410_GPE12 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 12)
483#define S3C2410_GPE12_INP (0x00 << 24) 626#define S3C2410_GPE12_INP (0x00 << 24)
@@ -509,7 +652,8 @@
509 652
510#define S3C2410_GPE_PUPDIS(x) (1<<(x)) 653#define S3C2410_GPE_PUPDIS(x) (1<<(x))
511 654
512/* Port F consists of 8 GPIO/Special function 655/* S3C2410:
656 * Port F consists of 8 GPIO/Special function
513 * 657 *
514 * GPIO / interrupt inputs 658 * GPIO / interrupt inputs
515 * 659 *
@@ -517,100 +661,141 @@
517 * 00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 undefined 661 * 00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 undefined
518 * 662 *
519 * pull up works like all other ports. 663 * pull up works like all other ports.
664 *
665 * S3C2400:
666 * Port F consists of 7 GPIO/Special function
667 *
668 * GPIO/serial/misc pins
520*/ 669*/
521 670
522#define S3C2410_GPFCON S3C2410_GPIOREG(0x50) 671#define S3C2410_GPFCON S3C2410_GPIOREG(0x50)
523#define S3C2410_GPFDAT S3C2410_GPIOREG(0x54) 672#define S3C2410_GPFDAT S3C2410_GPIOREG(0x54)
524#define S3C2410_GPFUP S3C2410_GPIOREG(0x58) 673#define S3C2410_GPFUP S3C2410_GPIOREG(0x58)
525 674
675#define S3C2400_GPFCON S3C2410_GPIOREG(0x38)
676#define S3C2400_GPFDAT S3C2410_GPIOREG(0x3C)
677#define S3C2400_GPFUP S3C2410_GPIOREG(0x40)
678
526#define S3C2410_GPF0 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 0) 679#define S3C2410_GPF0 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 0)
527#define S3C2410_GPF0_INP (0x00 << 0) 680#define S3C2410_GPF0_INP (0x00 << 0)
528#define S3C2410_GPF0_OUTP (0x01 << 0) 681#define S3C2410_GPF0_OUTP (0x01 << 0)
529#define S3C2410_GPF0_EINT0 (0x02 << 0) 682#define S3C2410_GPF0_EINT0 (0x02 << 0)
683#define S3C2400_GPF0_RXD0 (0x02 << 0)
530 684
531#define S3C2410_GPF1 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 1) 685#define S3C2410_GPF1 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 1)
532#define S3C2410_GPF1_INP (0x00 << 2) 686#define S3C2410_GPF1_INP (0x00 << 2)
533#define S3C2410_GPF1_OUTP (0x01 << 2) 687#define S3C2410_GPF1_OUTP (0x01 << 2)
534#define S3C2410_GPF1_EINT1 (0x02 << 2) 688#define S3C2410_GPF1_EINT1 (0x02 << 2)
689#define S3C2400_GPF1_RXD1 (0x02 << 2)
690#define S3C2400_GPF1_IICSDA (0x03 << 2)
535 691
536#define S3C2410_GPF2 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 2) 692#define S3C2410_GPF2 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 2)
537#define S3C2410_GPF2_INP (0x00 << 4) 693#define S3C2410_GPF2_INP (0x00 << 4)
538#define S3C2410_GPF2_OUTP (0x01 << 4) 694#define S3C2410_GPF2_OUTP (0x01 << 4)
539#define S3C2410_GPF2_EINT2 (0x02 << 4) 695#define S3C2410_GPF2_EINT2 (0x02 << 4)
696#define S3C2400_GPF2_TXD0 (0x02 << 4)
540 697
541#define S3C2410_GPF3 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 3) 698#define S3C2410_GPF3 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 3)
542#define S3C2410_GPF3_INP (0x00 << 6) 699#define S3C2410_GPF3_INP (0x00 << 6)
543#define S3C2410_GPF3_OUTP (0x01 << 6) 700#define S3C2410_GPF3_OUTP (0x01 << 6)
544#define S3C2410_GPF3_EINT3 (0x02 << 6) 701#define S3C2410_GPF3_EINT3 (0x02 << 6)
702#define S3C2400_GPF3_TXD1 (0x02 << 6)
703#define S3C2400_GPF3_IICSCL (0x03 << 6)
545 704
546#define S3C2410_GPF4 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 4) 705#define S3C2410_GPF4 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 4)
547#define S3C2410_GPF4_INP (0x00 << 8) 706#define S3C2410_GPF4_INP (0x00 << 8)
548#define S3C2410_GPF4_OUTP (0x01 << 8) 707#define S3C2410_GPF4_OUTP (0x01 << 8)
549#define S3C2410_GPF4_EINT4 (0x02 << 8) 708#define S3C2410_GPF4_EINT4 (0x02 << 8)
709#define S3C2400_GPF4_nRTS0 (0x02 << 8)
710#define S3C2400_GPF4_nXBACK (0x03 << 8)
550 711
551#define S3C2410_GPF5 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 5) 712#define S3C2410_GPF5 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 5)
552#define S3C2410_GPF5_INP (0x00 << 10) 713#define S3C2410_GPF5_INP (0x00 << 10)
553#define S3C2410_GPF5_OUTP (0x01 << 10) 714#define S3C2410_GPF5_OUTP (0x01 << 10)
554#define S3C2410_GPF5_EINT5 (0x02 << 10) 715#define S3C2410_GPF5_EINT5 (0x02 << 10)
716#define S3C2400_GPF5_nCTS0 (0x02 << 10)
717#define S3C2400_GPF5_nXBREQ (0x03 << 10)
555 718
556#define S3C2410_GPF6 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 6) 719#define S3C2410_GPF6 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 6)
557#define S3C2410_GPF6_INP (0x00 << 12) 720#define S3C2410_GPF6_INP (0x00 << 12)
558#define S3C2410_GPF6_OUTP (0x01 << 12) 721#define S3C2410_GPF6_OUTP (0x01 << 12)
559#define S3C2410_GPF6_EINT6 (0x02 << 12) 722#define S3C2410_GPF6_EINT6 (0x02 << 12)
723#define S3C2400_GPF6_CLKOUT (0x02 << 12)
560 724
561#define S3C2410_GPF7 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 7) 725#define S3C2410_GPF7 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 7)
562#define S3C2410_GPF7_INP (0x00 << 14) 726#define S3C2410_GPF7_INP (0x00 << 14)
563#define S3C2410_GPF7_OUTP (0x01 << 14) 727#define S3C2410_GPF7_OUTP (0x01 << 14)
564#define S3C2410_GPF7_EINT7 (0x02 << 14) 728#define S3C2410_GPF7_EINT7 (0x02 << 14)
565 729
566/* Port G consists of 8 GPIO/IRQ/Special function 730#define S3C2410_GPF_PUPDIS(x) (1<<(x))
731
732/* S3C2410:
733 * Port G consists of 8 GPIO/IRQ/Special function
567 * 734 *
568 * GPGCON has 2 bits for each of the input pins on port F 735 * GPGCON has 2 bits for each of the input pins on port F
569 * 00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 special func 736 * 00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 special func
570 * 737 *
571 * pull up works like all other ports. 738 * pull up works like all other ports.
739 *
740 * S3C2400:
741 * Port G consists of 10 GPIO/Special function
572*/ 742*/
573 743
574#define S3C2410_GPGCON S3C2410_GPIOREG(0x60) 744#define S3C2410_GPGCON S3C2410_GPIOREG(0x60)
575#define S3C2410_GPGDAT S3C2410_GPIOREG(0x64) 745#define S3C2410_GPGDAT S3C2410_GPIOREG(0x64)
576#define S3C2410_GPGUP S3C2410_GPIOREG(0x68) 746#define S3C2410_GPGUP S3C2410_GPIOREG(0x68)
577 747
748#define S3C2400_GPGCON S3C2410_GPIOREG(0x44)
749#define S3C2400_GPGDAT S3C2410_GPIOREG(0x48)
750#define S3C2400_GPGUP S3C2410_GPIOREG(0x4C)
751
578#define S3C2410_GPG0 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 0) 752#define S3C2410_GPG0 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 0)
579#define S3C2410_GPG0_INP (0x00 << 0) 753#define S3C2410_GPG0_INP (0x00 << 0)
580#define S3C2410_GPG0_OUTP (0x01 << 0) 754#define S3C2410_GPG0_OUTP (0x01 << 0)
581#define S3C2410_GPG0_EINT8 (0x02 << 0) 755#define S3C2410_GPG0_EINT8 (0x02 << 0)
756#define S3C2400_GPG0_I2SLRCK (0x02 << 0)
582 757
583#define S3C2410_GPG1 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 1) 758#define S3C2410_GPG1 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 1)
584#define S3C2410_GPG1_INP (0x00 << 2) 759#define S3C2410_GPG1_INP (0x00 << 2)
585#define S3C2410_GPG1_OUTP (0x01 << 2) 760#define S3C2410_GPG1_OUTP (0x01 << 2)
586#define S3C2410_GPG1_EINT9 (0x02 << 2) 761#define S3C2410_GPG1_EINT9 (0x02 << 2)
762#define S3C2400_GPG1_I2SSCLK (0x02 << 2)
587 763
588#define S3C2410_GPG2 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 2) 764#define S3C2410_GPG2 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 2)
589#define S3C2410_GPG2_INP (0x00 << 4) 765#define S3C2410_GPG2_INP (0x00 << 4)
590#define S3C2410_GPG2_OUTP (0x01 << 4) 766#define S3C2410_GPG2_OUTP (0x01 << 4)
591#define S3C2410_GPG2_EINT10 (0x02 << 4) 767#define S3C2410_GPG2_EINT10 (0x02 << 4)
768#define S3C2400_GPG2_CDCLK (0x02 << 4)
592 769
593#define S3C2410_GPG3 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 3) 770#define S3C2410_GPG3 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 3)
594#define S3C2410_GPG3_INP (0x00 << 6) 771#define S3C2410_GPG3_INP (0x00 << 6)
595#define S3C2410_GPG3_OUTP (0x01 << 6) 772#define S3C2410_GPG3_OUTP (0x01 << 6)
596#define S3C2410_GPG3_EINT11 (0x02 << 6) 773#define S3C2410_GPG3_EINT11 (0x02 << 6)
774#define S3C2400_GPG3_I2SSDO (0x02 << 6)
775#define S3C2400_GPG3_I2SSDI (0x03 << 6)
597 776
598#define S3C2410_GPG4 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 4) 777#define S3C2410_GPG4 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 4)
599#define S3C2410_GPG4_INP (0x00 << 8) 778#define S3C2410_GPG4_INP (0x00 << 8)
600#define S3C2410_GPG4_OUTP (0x01 << 8) 779#define S3C2410_GPG4_OUTP (0x01 << 8)
601#define S3C2410_GPG4_EINT12 (0x02 << 8) 780#define S3C2410_GPG4_EINT12 (0x02 << 8)
781#define S3C2400_GPG4_MMCCLK (0x02 << 8)
782#define S3C2400_GPG4_I2SSDI (0x03 << 8)
602#define S3C2410_GPG4_LCDPWREN (0x03 << 8) 783#define S3C2410_GPG4_LCDPWREN (0x03 << 8)
603 784
604#define S3C2410_GPG5 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 5) 785#define S3C2410_GPG5 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 5)
605#define S3C2410_GPG5_INP (0x00 << 10) 786#define S3C2410_GPG5_INP (0x00 << 10)
606#define S3C2410_GPG5_OUTP (0x01 << 10) 787#define S3C2410_GPG5_OUTP (0x01 << 10)
607#define S3C2410_GPG5_EINT13 (0x02 << 10) 788#define S3C2410_GPG5_EINT13 (0x02 << 10)
789#define S3C2400_GPG5_MMCCMD (0x02 << 10)
790#define S3C2400_GPG5_IICSDA (0x03 << 10)
608#define S3C2410_GPG5_SPIMISO1 (0x03 << 10) 791#define S3C2410_GPG5_SPIMISO1 (0x03 << 10)
609 792
610#define S3C2410_GPG6 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 6) 793#define S3C2410_GPG6 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 6)
611#define S3C2410_GPG6_INP (0x00 << 12) 794#define S3C2410_GPG6_INP (0x00 << 12)
612#define S3C2410_GPG6_OUTP (0x01 << 12) 795#define S3C2410_GPG6_OUTP (0x01 << 12)
613#define S3C2410_GPG6_EINT14 (0x02 << 12) 796#define S3C2410_GPG6_EINT14 (0x02 << 12)
797#define S3C2400_GPG6_MMCDAT (0x02 << 12)
798#define S3C2400_GPG6_IICSCL (0x03 << 12)
614#define S3C2410_GPG6_SPIMOSI1 (0x03 << 12) 799#define S3C2410_GPG6_SPIMOSI1 (0x03 << 12)
615 800
616#define S3C2410_GPG7 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 7) 801#define S3C2410_GPG7 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 7)
@@ -618,16 +803,22 @@
618#define S3C2410_GPG7_OUTP (0x01 << 14) 803#define S3C2410_GPG7_OUTP (0x01 << 14)
619#define S3C2410_GPG7_EINT15 (0x02 << 14) 804#define S3C2410_GPG7_EINT15 (0x02 << 14)
620#define S3C2410_GPG7_SPICLK1 (0x03 << 14) 805#define S3C2410_GPG7_SPICLK1 (0x03 << 14)
806#define S3C2400_GPG7_SPIMISO (0x02 << 14)
807#define S3C2400_GPG7_IICSDA (0x03 << 14)
621 808
622#define S3C2410_GPG8 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 8) 809#define S3C2410_GPG8 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 8)
623#define S3C2410_GPG8_INP (0x00 << 16) 810#define S3C2410_GPG8_INP (0x00 << 16)
624#define S3C2410_GPG8_OUTP (0x01 << 16) 811#define S3C2410_GPG8_OUTP (0x01 << 16)
625#define S3C2410_GPG8_EINT16 (0x02 << 16) 812#define S3C2410_GPG8_EINT16 (0x02 << 16)
813#define S3C2400_GPG8_SPIMOSI (0x02 << 16)
814#define S3C2400_GPG8_IICSCL (0x03 << 16)
626 815
627#define S3C2410_GPG9 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 9) 816#define S3C2410_GPG9 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 9)
628#define S3C2410_GPG9_INP (0x00 << 18) 817#define S3C2410_GPG9_INP (0x00 << 18)
629#define S3C2410_GPG9_OUTP (0x01 << 18) 818#define S3C2410_GPG9_OUTP (0x01 << 18)
630#define S3C2410_GPG9_EINT17 (0x02 << 18) 819#define S3C2410_GPG9_EINT17 (0x02 << 18)
820#define S3C2400_GPG9_SPICLK (0x02 << 18)
821#define S3C2400_GPG9_MMCCLK (0x03 << 18)
631 822
632#define S3C2410_GPG10 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 10) 823#define S3C2410_GPG10 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 10)
633#define S3C2410_GPG10_INP (0x00 << 20) 824#define S3C2410_GPG10_INP (0x00 << 20)
@@ -737,19 +928,27 @@
737#define S3C2410_GPH10_CLKOUT1 (0x02 << 20) 928#define S3C2410_GPH10_CLKOUT1 (0x02 << 20)
738 929
739/* miscellaneous control */ 930/* miscellaneous control */
740 931#define S3C2400_MISCCR S3C2410_GPIOREG(0x54)
741#define S3C2410_MISCCR S3C2410_GPIOREG(0x80) 932#define S3C2410_MISCCR S3C2410_GPIOREG(0x80)
742#define S3C2410_DCLKCON S3C2410_GPIOREG(0x84) 933#define S3C2410_DCLKCON S3C2410_GPIOREG(0x84)
743 934
744/* see clock.h for dclk definitions */ 935/* see clock.h for dclk definitions */
745 936
746/* pullup control on databus */ 937/* pullup control on databus */
747#define S3C2410_MISCCR_SPUCR_HEN (0) 938#define S3C2410_MISCCR_SPUCR_HEN (0<<0)
748#define S3C2410_MISCCR_SPUCR_HDIS (1<<0) 939#define S3C2410_MISCCR_SPUCR_HDIS (1<<0)
749#define S3C2410_MISCCR_SPUCR_LEN (0) 940#define S3C2410_MISCCR_SPUCR_LEN (0<<1)
750#define S3C2410_MISCCR_SPUCR_LDIS (1<<1) 941#define S3C2410_MISCCR_SPUCR_LDIS (1<<1)
751 942
752#define S3C2410_MISCCR_USBDEV (0) 943#define S3C2400_MISCCR_SPUCR_LEN (0<<0)
944#define S3C2400_MISCCR_SPUCR_LDIS (1<<0)
945#define S3C2400_MISCCR_SPUCR_HEN (0<<1)
946#define S3C2400_MISCCR_SPUCR_HDIS (1<<1)
947
948#define S3C2400_MISCCR_HZ_STOPEN (0<<2)
949#define S3C2400_MISCCR_HZ_STOPPREV (1<<2)
950
951#define S3C2410_MISCCR_USBDEV (0<<3)
753#define S3C2410_MISCCR_USBHOST (1<<3) 952#define S3C2410_MISCCR_USBHOST (1<<3)
754 953
755#define S3C2410_MISCCR_CLK0_MPLL (0<<4) 954#define S3C2410_MISCCR_CLK0_MPLL (0<<4)
@@ -785,7 +984,7 @@
785 * 984 *
786 * Samsung datasheet p9-25 985 * Samsung datasheet p9-25
787*/ 986*/
788 987#define S3C2400_EXTINT0 S3C2410_GPIOREG(0x58)
789#define S3C2410_EXTINT0 S3C2410_GPIOREG(0x88) 988#define S3C2410_EXTINT0 S3C2410_GPIOREG(0x88)
790#define S3C2410_EXTINT1 S3C2410_GPIOREG(0x8C) 989#define S3C2410_EXTINT1 S3C2410_GPIOREG(0x8C)
791#define S3C2410_EXTINT2 S3C2410_GPIOREG(0x90) 990#define S3C2410_EXTINT2 S3C2410_GPIOREG(0x90)
@@ -833,5 +1032,21 @@
833#define S3C2410_GSTATUS2_OFFRESET (1<<1) 1032#define S3C2410_GSTATUS2_OFFRESET (1<<1)
834#define S3C2410_GSTATUS2_PONRESET (1<<0) 1033#define S3C2410_GSTATUS2_PONRESET (1<<0)
835 1034
1035/* open drain control register */
1036#define S3C2400_OPENCR S3C2410_GPIOREG(0x50)
1037
1038#define S3C2400_OPENCR_OPC_RXD1DIS (0<<0)
1039#define S3C2400_OPENCR_OPC_RXD1EN (1<<0)
1040#define S3C2400_OPENCR_OPC_TXD1DIS (0<<1)
1041#define S3C2400_OPENCR_OPC_TXD1EN (1<<1)
1042#define S3C2400_OPENCR_OPC_CMDDIS (0<<2)
1043#define S3C2400_OPENCR_OPC_CMDEN (1<<2)
1044#define S3C2400_OPENCR_OPC_DATDIS (0<<3)
1045#define S3C2400_OPENCR_OPC_DATEN (1<<3)
1046#define S3C2400_OPENCR_OPC_MISODIS (0<<4)
1047#define S3C2400_OPENCR_OPC_MISOEN (1<<4)
1048#define S3C2400_OPENCR_OPC_MOSIDIS (0<<5)
1049#define S3C2400_OPENCR_OPC_MOSIEN (1<<5)
1050
836#endif /* __ASM_ARCH_REGS_GPIO_H */ 1051#endif /* __ASM_ARCH_REGS_GPIO_H */
837 1052
diff --git a/include/asm-arm/arch-sa1100/io.h b/include/asm-arm/arch-sa1100/io.h
index 9d4fe6cf205b..040ccde7a11e 100644
--- a/include/asm-arm/arch-sa1100/io.h
+++ b/include/asm-arm/arch-sa1100/io.h
@@ -10,8 +10,6 @@
10#ifndef __ASM_ARM_ARCH_IO_H 10#ifndef __ASM_ARM_ARCH_IO_H
11#define __ASM_ARM_ARCH_IO_H 11#define __ASM_ARM_ARCH_IO_H
12 12
13#include <asm/hardware.h>
14
15#define IO_SPACE_LIMIT 0xffffffff 13#define IO_SPACE_LIMIT 0xffffffff
16 14
17/* 15/*
diff --git a/include/asm-arm/semaphore.h b/include/asm-arm/semaphore.h
index 71ca7d412687..d5dc624f452a 100644
--- a/include/asm-arm/semaphore.h
+++ b/include/asm-arm/semaphore.h
@@ -47,11 +47,6 @@ static inline void init_MUTEX_LOCKED(struct semaphore *sem)
47 sema_init(sem, 0); 47 sema_init(sem, 0);
48} 48}
49 49
50static inline int sema_count(struct semaphore *sem)
51{
52 return atomic_read(&sem->count);
53}
54
55/* 50/*
56 * special register calling convention 51 * special register calling convention
57 */ 52 */
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h
index 6ed4f916b166..43ad4e55878c 100644
--- a/include/asm-arm/spinlock.h
+++ b/include/asm-arm/spinlock.h
@@ -30,6 +30,9 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
30 __asm__ __volatile__( 30 __asm__ __volatile__(
31"1: ldrex %0, [%1]\n" 31"1: ldrex %0, [%1]\n"
32" teq %0, #0\n" 32" teq %0, #0\n"
33#ifdef CONFIG_CPU_32v6K
34" wfene\n"
35#endif
33" strexeq %0, %2, [%1]\n" 36" strexeq %0, %2, [%1]\n"
34" teqeq %0, #0\n" 37" teqeq %0, #0\n"
35" bne 1b" 38" bne 1b"
@@ -65,7 +68,11 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
65 smp_mb(); 68 smp_mb();
66 69
67 __asm__ __volatile__( 70 __asm__ __volatile__(
68" str %1, [%0]" 71" str %1, [%0]\n"
72#ifdef CONFIG_CPU_32v6K
73" mcr p15, 0, %1, c7, c10, 4\n" /* DSB */
74" sev"
75#endif
69 : 76 :
70 : "r" (&lock->lock), "r" (0) 77 : "r" (&lock->lock), "r" (0)
71 : "cc"); 78 : "cc");
@@ -87,6 +94,9 @@ static inline void __raw_write_lock(raw_rwlock_t *rw)
87 __asm__ __volatile__( 94 __asm__ __volatile__(
88"1: ldrex %0, [%1]\n" 95"1: ldrex %0, [%1]\n"
89" teq %0, #0\n" 96" teq %0, #0\n"
97#ifdef CONFIG_CPU_32v6K
98" wfene\n"
99#endif
90" strexeq %0, %2, [%1]\n" 100" strexeq %0, %2, [%1]\n"
91" teq %0, #0\n" 101" teq %0, #0\n"
92" bne 1b" 102" bne 1b"
@@ -122,7 +132,11 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
122 smp_mb(); 132 smp_mb();
123 133
124 __asm__ __volatile__( 134 __asm__ __volatile__(
125 "str %1, [%0]" 135 "str %1, [%0]\n"
136#ifdef CONFIG_CPU_32v6K
137" mcr p15, 0, %1, c7, c10, 4\n" /* DSB */
138" sev\n"
139#endif
126 : 140 :
127 : "r" (&rw->lock), "r" (0) 141 : "r" (&rw->lock), "r" (0)
128 : "cc"); 142 : "cc");
@@ -148,6 +162,9 @@ static inline void __raw_read_lock(raw_rwlock_t *rw)
148"1: ldrex %0, [%2]\n" 162"1: ldrex %0, [%2]\n"
149" adds %0, %0, #1\n" 163" adds %0, %0, #1\n"
150" strexpl %1, %0, [%2]\n" 164" strexpl %1, %0, [%2]\n"
165#ifdef CONFIG_CPU_32v6K
166" wfemi\n"
167#endif
151" rsbpls %0, %1, #0\n" 168" rsbpls %0, %1, #0\n"
152" bmi 1b" 169" bmi 1b"
153 : "=&r" (tmp), "=&r" (tmp2) 170 : "=&r" (tmp), "=&r" (tmp2)
@@ -169,6 +186,11 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)
169" strex %1, %0, [%2]\n" 186" strex %1, %0, [%2]\n"
170" teq %1, #0\n" 187" teq %1, #0\n"
171" bne 1b" 188" bne 1b"
189#ifdef CONFIG_CPU_32v6K
190"\n cmp %0, #0\n"
191" mcreq p15, 0, %0, c7, c10, 4\n"
192" seveq"
193#endif
172 : "=&r" (tmp), "=&r" (tmp2) 194 : "=&r" (tmp), "=&r" (tmp2)
173 : "r" (&rw->lock) 195 : "r" (&rw->lock)
174 : "cc"); 196 : "cc");
diff --git a/include/asm-frv/hardirq.h b/include/asm-frv/hardirq.h
index 5248ca054909..685123981e8b 100644
--- a/include/asm-frv/hardirq.h
+++ b/include/asm-frv/hardirq.h
@@ -14,6 +14,7 @@
14 14
15#include <linux/config.h> 15#include <linux/config.h>
16#include <linux/threads.h> 16#include <linux/threads.h>
17#include <linux/irq.h>
17 18
18typedef struct { 19typedef struct {
19 unsigned int __softirq_pending; 20 unsigned int __softirq_pending;
diff --git a/include/asm-frv/ide.h b/include/asm-frv/ide.h
index f9caecf7e3c0..ae031eaa3dd2 100644
--- a/include/asm-frv/ide.h
+++ b/include/asm-frv/ide.h
@@ -33,10 +33,10 @@
33/* 33/*
34 * some bits needed for parts of the IDE subsystem to compile 34 * some bits needed for parts of the IDE subsystem to compile
35 */ 35 */
36#define __ide_mm_insw(port, addr, n) insw(port, addr, n) 36#define __ide_mm_insw(port, addr, n) insw((unsigned long) (port), addr, n)
37#define __ide_mm_insl(port, addr, n) insl(port, addr, n) 37#define __ide_mm_insl(port, addr, n) insl((unsigned long) (port), addr, n)
38#define __ide_mm_outsw(port, addr, n) outsw(port, addr, n) 38#define __ide_mm_outsw(port, addr, n) outsw((unsigned long) (port), addr, n)
39#define __ide_mm_outsl(port, addr, n) outsl(port, addr, n) 39#define __ide_mm_outsl(port, addr, n) outsl((unsigned long) (port), addr, n)
40 40
41 41
42#endif /* __KERNEL__ */ 42#endif /* __KERNEL__ */
diff --git a/include/asm-frv/page.h b/include/asm-frv/page.h
index 4feba567e7fd..b8221b611b5c 100644
--- a/include/asm-frv/page.h
+++ b/include/asm-frv/page.h
@@ -47,8 +47,8 @@ typedef struct { unsigned long pgprot; } pgprot_t;
47 47
48#define devmem_is_allowed(pfn) 1 48#define devmem_is_allowed(pfn) 1
49 49
50#define __pa(vaddr) virt_to_phys((void *) vaddr) 50#define __pa(vaddr) virt_to_phys((void *) (unsigned long) (vaddr))
51#define __va(paddr) phys_to_virt((unsigned long) paddr) 51#define __va(paddr) phys_to_virt((unsigned long) (paddr))
52 52
53#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) 53#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
54 54
diff --git a/include/asm-frv/semaphore.h b/include/asm-frv/semaphore.h
index b18396288df1..907c5c3643cc 100644
--- a/include/asm-frv/semaphore.h
+++ b/include/asm-frv/semaphore.h
@@ -20,7 +20,7 @@
20#include <linux/spinlock.h> 20#include <linux/spinlock.h>
21#include <linux/rwsem.h> 21#include <linux/rwsem.h>
22 22
23#define SEMAPHORE_DEBUG WAITQUEUE_DEBUG 23#define SEMAPHORE_DEBUG 0
24 24
25/* 25/*
26 * the semaphore definition 26 * the semaphore definition
diff --git a/include/asm-frv/thread_info.h b/include/asm-frv/thread_info.h
index c8cba7836f0d..60f6b2aee76d 100644
--- a/include/asm-frv/thread_info.h
+++ b/include/asm-frv/thread_info.h
@@ -58,7 +58,7 @@ struct thread_info {
58 58
59#endif 59#endif
60 60
61#define PREEMPT_ACTIVE 0x4000000 61#define PREEMPT_ACTIVE 0x10000000
62 62
63/* 63/*
64 * macros/functions for gaining access to the thread information structure 64 * macros/functions for gaining access to the thread information structure
diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h
index 9dd9da105278..5e6362a786b7 100644
--- a/include/asm-ia64/page.h
+++ b/include/asm-ia64/page.h
@@ -110,8 +110,9 @@ extern int ia64_pfn_valid (unsigned long pfn);
110# define pfn_to_page(pfn) (mem_map + (pfn)) 110# define pfn_to_page(pfn) (mem_map + (pfn))
111#elif defined(CONFIG_DISCONTIGMEM) 111#elif defined(CONFIG_DISCONTIGMEM)
112extern struct page *vmem_map; 112extern struct page *vmem_map;
113extern unsigned long min_low_pfn;
113extern unsigned long max_low_pfn; 114extern unsigned long max_low_pfn;
114# define pfn_valid(pfn) (((pfn) < max_low_pfn) && ia64_pfn_valid(pfn)) 115# define pfn_valid(pfn) (((pfn) >= min_low_pfn) && ((pfn) < max_low_pfn) && ia64_pfn_valid(pfn))
115# define page_to_pfn(page) ((unsigned long) (page - vmem_map)) 116# define page_to_pfn(page) ((unsigned long) (page - vmem_map))
116# define pfn_to_page(pfn) (vmem_map + (pfn)) 117# define pfn_to_page(pfn) (vmem_map + (pfn))
117#endif 118#endif
diff --git a/include/asm-m32r/atomic.h b/include/asm-m32r/atomic.h
index bfff69a49936..ef1fb8ea4726 100644
--- a/include/asm-m32r/atomic.h
+++ b/include/asm-m32r/atomic.h
@@ -242,6 +242,27 @@ static __inline__ int atomic_dec_return(atomic_t *v)
242 */ 242 */
243#define atomic_add_negative(i,v) (atomic_add_return((i), (v)) < 0) 243#define atomic_add_negative(i,v) (atomic_add_return((i), (v)) < 0)
244 244
245#define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
246
247/**
248 * atomic_add_unless - add unless the number is a given value
249 * @v: pointer of type atomic_t
250 * @a: the amount to add to v...
251 * @u: ...unless v is equal to u.
252 *
253 * Atomically adds @a to @v, so long as it was not @u.
254 * Returns non-zero if @v was not @u, and zero otherwise.
255 */
256#define atomic_add_unless(v, a, u) \
257({ \
258 int c, old; \
259 c = atomic_read(v); \
260 while (c != (u) && (old = atomic_cmpxchg((v), c, c + (a))) != c) \
261 c = old; \
262 c != (u); \
263})
264#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
265
245static __inline__ void atomic_clear_mask(unsigned long mask, atomic_t *addr) 266static __inline__ void atomic_clear_mask(unsigned long mask, atomic_t *addr)
246{ 267{
247 unsigned long flags; 268 unsigned long flags;
diff --git a/include/asm-m32r/ide.h b/include/asm-m32r/ide.h
index 194393bd8beb..f7aa96970d18 100644
--- a/include/asm-m32r/ide.h
+++ b/include/asm-m32r/ide.h
@@ -25,18 +25,21 @@
25# endif 25# endif
26#endif 26#endif
27 27
28#if defined(CONFIG_PLAT_M32700UT) 28#include <asm/m32r.h>
29#include <asm/irq.h> 29
30#include <asm/m32700ut/m32700ut_pld.h>
31#endif
32 30
33#define IDE_ARCH_OBSOLETE_DEFAULTS 31#define IDE_ARCH_OBSOLETE_DEFAULTS
34 32
35static __inline__ int ide_default_irq(unsigned long base) 33static __inline__ int ide_default_irq(unsigned long base)
36{ 34{
37 switch (base) { 35 switch (base) {
38#if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_MAPPI2) || defined(CONFIG_PLAT_MAPPI3) 36#if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_MAPPI2)
37 case 0x1f0: return PLD_IRQ_CFIREQ;
38 default:
39 return 0;
40#elif defined(CONFIG_PLAT_MAPPI3)
39 case 0x1f0: return PLD_IRQ_CFIREQ; 41 case 0x1f0: return PLD_IRQ_CFIREQ;
42 case 0x170: return PLD_IRQ_IDEIREQ;
40 default: 43 default:
41 return 0; 44 return 0;
42#else 45#else
diff --git a/include/asm-m32r/mappi3/mappi3_pld.h b/include/asm-m32r/mappi3/mappi3_pld.h
index 3f1551f7f01f..1d3c25d61bcb 100644
--- a/include/asm-m32r/mappi3/mappi3_pld.h
+++ b/include/asm-m32r/mappi3/mappi3_pld.h
@@ -59,7 +59,7 @@
59#define M32R_IRQ_I2C (28) /* I2C-BUS */ 59#define M32R_IRQ_I2C (28) /* I2C-BUS */
60#define PLD_IRQ_CFIREQ (6) /* INT5 CFC Card Interrupt */ 60#define PLD_IRQ_CFIREQ (6) /* INT5 CFC Card Interrupt */
61#define PLD_IRQ_CFC_INSERT (7) /* INT6 CFC Card Insert */ 61#define PLD_IRQ_CFC_INSERT (7) /* INT6 CFC Card Insert */
62#define PLD_IRQ_CFC_EJECT (8) /* INT7 CFC Card Eject */ 62#define PLD_IRQ_IDEIREQ (8) /* INT7 IDE Interrupt */
63#define PLD_IRQ_MMCCARD (43) /* MMC Card Insert */ 63#define PLD_IRQ_MMCCARD (43) /* MMC Card Insert */
64#define PLD_IRQ_MMCIRQ (44) /* MMC Transfer Done */ 64#define PLD_IRQ_MMCIRQ (44) /* MMC Transfer Done */
65 65
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h
index 73348c3f858b..5eee832b73a0 100644
--- a/include/asm-m32r/system.h
+++ b/include/asm-m32r/system.h
@@ -11,6 +11,7 @@
11 */ 11 */
12 12
13#include <linux/config.h> 13#include <linux/config.h>
14#include <asm/assembler.h>
14 15
15#ifdef __KERNEL__ 16#ifdef __KERNEL__
16 17
@@ -132,8 +133,6 @@ static inline void local_irq_disable(void)
132 !(flags & 0x40); \ 133 !(flags & 0x40); \
133 }) 134 })
134 135
135#endif /* __KERNEL__ */
136
137#define nop() __asm__ __volatile__ ("nop" : : ) 136#define nop() __asm__ __volatile__ ("nop" : : )
138 137
139#define xchg(ptr,x) \ 138#define xchg(ptr,x) \
@@ -213,6 +212,67 @@ static __inline__ unsigned long __xchg(unsigned long x, volatile void * ptr,
213 return (tmp); 212 return (tmp);
214} 213}
215 214
215#define __HAVE_ARCH_CMPXCHG 1
216
217static __inline__ unsigned long
218__cmpxchg_u32(volatile unsigned int *p, unsigned int old, unsigned int new)
219{
220 unsigned long flags;
221 unsigned int retval;
222
223 local_irq_save(flags);
224 __asm__ __volatile__ (
225 DCACHE_CLEAR("%0", "r4", "%1")
226 M32R_LOCK" %0, @%1; \n"
227 " bne %0, %2, 1f; \n"
228 M32R_UNLOCK" %3, @%1; \n"
229 " bra 2f; \n"
230 " .fillinsn \n"
231 "1:"
232 M32R_UNLOCK" %2, @%1; \n"
233 " .fillinsn \n"
234 "2:"
235 : "=&r" (retval)
236 : "r" (p), "r" (old), "r" (new)
237 : "cbit", "memory"
238#ifdef CONFIG_CHIP_M32700_TS1
239 , "r4"
240#endif /* CONFIG_CHIP_M32700_TS1 */
241 );
242 local_irq_restore(flags);
243
244 return retval;
245}
246
247/* This function doesn't exist, so you'll get a linker error
248 if something tries to do an invalid cmpxchg(). */
249extern void __cmpxchg_called_with_bad_pointer(void);
250
251static __inline__ unsigned long
252__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
253{
254 switch (size) {
255 case 4:
256 return __cmpxchg_u32(ptr, old, new);
257#if 0 /* we don't have __cmpxchg_u64 */
258 case 8:
259 return __cmpxchg_u64(ptr, old, new);
260#endif /* 0 */
261 }
262 __cmpxchg_called_with_bad_pointer();
263 return old;
264}
265
266#define cmpxchg(ptr,o,n) \
267 ({ \
268 __typeof__(*(ptr)) _o_ = (o); \
269 __typeof__(*(ptr)) _n_ = (n); \
270 (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
271 (unsigned long)_n_, sizeof(*(ptr))); \
272 })
273
274#endif /* __KERNEL__ */
275
216/* 276/*
217 * Memory barrier. 277 * Memory barrier.
218 * 278 *
diff --git a/include/asm-mips/mach-qemu/timex.h b/include/asm-mips/mach-qemu/timex.h
new file mode 100644
index 000000000000..cd543693fb0a
--- /dev/null
+++ b/include/asm-mips/mach-qemu/timex.h
@@ -0,0 +1,16 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2005 Daniel Jacobowitz
7 */
8#ifndef __ASM_MACH_QEMU_TIMEX_H
9#define __ASM_MACH_QEMU_TIMEX_H
10
11/*
12 * We use a simulated i8254 PIC...
13 */
14#define CLOCK_TICK_RATE 1193182
15
16#endif /* __ASM_MACH_QEMU_TIMEX_H */
diff --git a/include/asm-powerpc/iommu.h b/include/asm-powerpc/iommu.h
index 6a35e6570ccd..f89f06050893 100644
--- a/include/asm-powerpc/iommu.h
+++ b/include/asm-powerpc/iommu.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation 2 * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
3 * Rewrite, cleanup: 3 * Rewrite, cleanup:
4 * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation 4 * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
diff --git a/include/asm-powerpc/page_64.h b/include/asm-powerpc/page_64.h
index 58a3dd9a79ec..6642c0125001 100644
--- a/include/asm-powerpc/page_64.h
+++ b/include/asm-powerpc/page_64.h
@@ -103,8 +103,9 @@ extern unsigned int HPAGE_SHIFT;
103#define HTLB_AREA_SIZE (1UL << HTLB_AREA_SHIFT) 103#define HTLB_AREA_SIZE (1UL << HTLB_AREA_SHIFT)
104#define GET_HTLB_AREA(x) ((x) >> HTLB_AREA_SHIFT) 104#define GET_HTLB_AREA(x) ((x) >> HTLB_AREA_SHIFT)
105 105
106#define LOW_ESID_MASK(addr, len) (((1U << (GET_ESID(addr+len-1)+1)) \ 106#define LOW_ESID_MASK(addr, len) \
107 - (1U << GET_ESID(addr))) & 0xffff) 107 (((1U << (GET_ESID(min((addr)+(len)-1, 0x100000000UL))+1)) \
108 - (1U << GET_ESID(min((addr), 0x100000000UL)))) & 0xffff)
108#define HTLB_AREA_MASK(addr, len) (((1U << (GET_HTLB_AREA(addr+len-1)+1)) \ 109#define HTLB_AREA_MASK(addr, len) (((1U << (GET_HTLB_AREA(addr+len-1)+1)) \
109 - (1U << GET_HTLB_AREA(addr))) & 0xffff) 110 - (1U << GET_HTLB_AREA(addr))) & 0xffff)
110 111
@@ -113,17 +114,21 @@ extern unsigned int HPAGE_SHIFT;
113#define ARCH_HAS_SETCLEAR_HUGE_PTE 114#define ARCH_HAS_SETCLEAR_HUGE_PTE
114 115
115#define touches_hugepage_low_range(mm, addr, len) \ 116#define touches_hugepage_low_range(mm, addr, len) \
116 (LOW_ESID_MASK((addr), (len)) & (mm)->context.low_htlb_areas) 117 (((addr) < 0x100000000UL) \
118 && (LOW_ESID_MASK((addr), (len)) & (mm)->context.low_htlb_areas))
117#define touches_hugepage_high_range(mm, addr, len) \ 119#define touches_hugepage_high_range(mm, addr, len) \
118 (HTLB_AREA_MASK((addr), (len)) & (mm)->context.high_htlb_areas) 120 ((((addr) + (len)) > 0x100000000UL) \
121 && (HTLB_AREA_MASK((addr), (len)) & (mm)->context.high_htlb_areas))
119 122
120#define __within_hugepage_low_range(addr, len, segmask) \ 123#define __within_hugepage_low_range(addr, len, segmask) \
121 ((LOW_ESID_MASK((addr), (len)) | (segmask)) == (segmask)) 124 ( (((addr)+(len)) <= 0x100000000UL) \
125 && ((LOW_ESID_MASK((addr), (len)) | (segmask)) == (segmask)))
122#define within_hugepage_low_range(addr, len) \ 126#define within_hugepage_low_range(addr, len) \
123 __within_hugepage_low_range((addr), (len), \ 127 __within_hugepage_low_range((addr), (len), \
124 current->mm->context.low_htlb_areas) 128 current->mm->context.low_htlb_areas)
125#define __within_hugepage_high_range(addr, len, zonemask) \ 129#define __within_hugepage_high_range(addr, len, zonemask) \
126 ((HTLB_AREA_MASK((addr), (len)) | (zonemask)) == (zonemask)) 130 ( ((addr) >= 0x100000000UL) \
131 && ((HTLB_AREA_MASK((addr), (len)) | (zonemask)) == (zonemask)))
127#define within_hugepage_high_range(addr, len) \ 132#define within_hugepage_high_range(addr, len) \
128 __within_hugepage_high_range((addr), (len), \ 133 __within_hugepage_high_range((addr), (len), \
129 current->mm->context.high_htlb_areas) 134 current->mm->context.high_htlb_areas)
diff --git a/include/asm-powerpc/tce.h b/include/asm-powerpc/tce.h
index d099d5200f9b..980a094fd5a7 100644
--- a/include/asm-powerpc/tce.h
+++ b/include/asm-powerpc/tce.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation 2 * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
3 * Rewrite, cleanup: 3 * Rewrite, cleanup:
4 * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation 4 * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h
index 9a02879b235d..f0a9b44d3eb5 100644
--- a/include/asm-sparc64/pgtable.h
+++ b/include/asm-sparc64/pgtable.h
@@ -348,16 +348,6 @@ extern unsigned long find_ecache_flush_span(unsigned long size);
348struct vm_area_struct; 348struct vm_area_struct;
349extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); 349extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t);
350 350
351/* Make a non-present pseudo-TTE. */
352static inline pte_t mk_pte_io(unsigned long page, pgprot_t prot, int space)
353{
354 pte_t pte;
355 pte_val(pte) = (((page) | pgprot_val(prot) | _PAGE_E) &
356 ~(unsigned long)_PAGE_CACHE);
357 pte_val(pte) |= (((unsigned long)space) << 32);
358 return pte;
359}
360
361/* Encode and de-code a swap entry */ 351/* Encode and de-code a swap entry */
362#define __swp_type(entry) (((entry).val >> PAGE_SHIFT) & 0xffUL) 352#define __swp_type(entry) (((entry).val >> PAGE_SHIFT) & 0xffUL)
363#define __swp_offset(entry) ((entry).val >> (PAGE_SHIFT + 8UL)) 353#define __swp_offset(entry) ((entry).val >> (PAGE_SHIFT + 8UL))
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h
index e7d0593bb576..b203ea82a0a8 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/config.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/config.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>
@@ -274,7 +274,7 @@ enum {
274 274
275 275
276enum { 276enum {
277 ATM_DF_CLOSE, /* close device when last VCC is closed */ 277 ATM_DF_REMOVED, /* device was removed from atm_devs list */
278}; 278};
279 279
280 280
@@ -415,7 +415,6 @@ struct atm_dev *atm_dev_register(const char *type,const struct atmdev_ops *ops,
415 int number,unsigned long *flags); /* number == -1: pick first available */ 415 int number,unsigned long *flags); /* number == -1: pick first available */
416struct atm_dev *atm_dev_lookup(int number); 416struct atm_dev *atm_dev_lookup(int number);
417void atm_dev_deregister(struct atm_dev *dev); 417void atm_dev_deregister(struct atm_dev *dev);
418void shutdown_atm_dev(struct atm_dev *dev);
419void vcc_insert_socket(struct sock *sk); 418void vcc_insert_socket(struct sock *sk);
420 419
421 420
@@ -457,18 +456,19 @@ static inline void atm_dev_hold(struct atm_dev *dev)
457 456
458static inline void atm_dev_put(struct atm_dev *dev) 457static inline void atm_dev_put(struct atm_dev *dev)
459{ 458{
460 atomic_dec(&dev->refcnt); 459 if (atomic_dec_and_test(&dev->refcnt)) {
461 460 BUG_ON(!test_bit(ATM_DF_REMOVED, &dev->flags));
462 if ((atomic_read(&dev->refcnt) == 1) && 461 if (dev->ops->dev_close)
463 test_bit(ATM_DF_CLOSE,&dev->flags)) 462 dev->ops->dev_close(dev);
464 shutdown_atm_dev(dev); 463 kfree(dev);
464 }
465} 465}
466 466
467 467
468int atm_charge(struct atm_vcc *vcc,int truesize); 468int atm_charge(struct atm_vcc *vcc,int truesize);
469struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, 469struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
470 gfp_t gfp_flags); 470 gfp_t gfp_flags);
471int atm_pcr_goal(struct atm_trafprm *tp); 471int atm_pcr_goal(const struct atm_trafprm *tp);
472 472
473void vcc_release_async(struct atm_vcc *vcc, int reply); 473void vcc_release_async(struct atm_vcc *vcc, int reply);
474 474
diff --git a/include/linux/cn_proc.h b/include/linux/cn_proc.h
index 70ab56317380..c948f678e04e 100644
--- a/include/linux/cn_proc.h
+++ b/include/linux/cn_proc.h
@@ -86,12 +86,12 @@ struct proc_event {
86 pid_t process_pid; 86 pid_t process_pid;
87 pid_t process_tgid; 87 pid_t process_tgid;
88 union { 88 union {
89 uid_t ruid; /* current->uid */ 89 __u32 ruid; /* task uid */
90 gid_t rgid; /* current->gid */ 90 __u32 rgid; /* task gid */
91 } r; 91 } r;
92 union { 92 union {
93 uid_t euid; 93 __u32 euid;
94 gid_t egid; 94 __u32 egid;
95 } e; 95 } e;
96 } id; 96 } id;
97 97
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 43c44530ef9d..0ed1d4853c69 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -65,10 +65,9 @@ extern struct sysdev_class cpu_sysdev_class;
65 65
66#ifdef CONFIG_HOTPLUG_CPU 66#ifdef CONFIG_HOTPLUG_CPU
67/* Stop CPUs going up and down. */ 67/* Stop CPUs going up and down. */
68extern struct semaphore cpucontrol; 68extern void lock_cpu_hotplug(void);
69#define lock_cpu_hotplug() down(&cpucontrol) 69extern void unlock_cpu_hotplug(void);
70#define unlock_cpu_hotplug() up(&cpucontrol) 70extern int lock_cpu_hotplug_interruptible(void);
71#define lock_cpu_hotplug_interruptible() down_interruptible(&cpucontrol)
72#define hotcpu_notifier(fn, pri) { \ 71#define hotcpu_notifier(fn, pri) { \
73 static struct notifier_block fn##_nb = \ 72 static struct notifier_block fn##_nb = \
74 { .notifier_call = fn, .priority = pri }; \ 73 { .notifier_call = fn, .priority = pri }; \
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index 1543daaa9c5e..ef3b5632e63a 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -108,6 +108,7 @@
108#define I2C_DRIVERID_SAA7127 72 /* saa7124 video encoder */ 108#define I2C_DRIVERID_SAA7127 72 /* saa7124 video encoder */
109#define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */ 109#define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */
110#define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */ 110#define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */
111#define I2C_DRIVERID_I2C_IR 75 /* I2C InfraRed on Video boards */
111 112
112#define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */ 113#define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */
113#define I2C_DRIVERID_EXP1 0xF1 114#define I2C_DRIVERID_EXP1 0xF1
diff --git a/include/linux/memory.h b/include/linux/memory.h
index 9a424383e6c6..dc4081b6f161 100644
--- a/include/linux/memory.h
+++ b/include/linux/memory.h
@@ -85,7 +85,6 @@ struct notifier_block;
85extern int register_memory_notifier(struct notifier_block *nb); 85extern int register_memory_notifier(struct notifier_block *nb);
86extern void unregister_memory_notifier(struct notifier_block *nb); 86extern void unregister_memory_notifier(struct notifier_block *nb);
87 87
88extern struct sysdev_class memory_sysdev_class;
89#endif /* CONFIG_MEMORY_HOTPLUG */ 88#endif /* CONFIG_MEMORY_HOTPLUG */
90 89
91#define hotplug_memory_notifier(fn, pri) { \ 90#define hotplug_memory_notifier(fn, pri) { \
diff --git a/include/linux/mm.h b/include/linux/mm.h
index f0cdfd18db55..29f02d8513f6 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -145,7 +145,7 @@ extern unsigned int kobjsize(const void *objp);
145#define VM_GROWSDOWN 0x00000100 /* general info on the segment */ 145#define VM_GROWSDOWN 0x00000100 /* general info on the segment */
146#define VM_GROWSUP 0x00000200 146#define VM_GROWSUP 0x00000200
147#define VM_SHM 0x00000000 /* Means nothing: delete it later */ 147#define VM_SHM 0x00000000 /* Means nothing: delete it later */
148#define VM_UNPAGED 0x00000400 /* Pages managed without map count */ 148#define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */
149#define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ 149#define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */
150 150
151#define VM_EXECUTABLE 0x00001000 151#define VM_EXECUTABLE 0x00001000
@@ -163,6 +163,7 @@ extern unsigned int kobjsize(const void *objp);
163#define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ 163#define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */
164#define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ 164#define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */
165#define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */ 165#define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */
166#define VM_INCOMPLETE 0x02000000 /* Strange partial PFN mapping marker */
166 167
167#ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ 168#ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */
168#define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS 169#define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
@@ -664,6 +665,7 @@ struct zap_details {
664 unsigned long truncate_count; /* Compare vm_truncate_count */ 665 unsigned long truncate_count; /* Compare vm_truncate_count */
665}; 666};
666 667
668struct page *vm_normal_page(struct vm_area_struct *, unsigned long, pte_t);
667unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address, 669unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address,
668 unsigned long size, struct zap_details *); 670 unsigned long size, struct zap_details *);
669unsigned long unmap_vmas(struct mmu_gather **tlb, 671unsigned long unmap_vmas(struct mmu_gather **tlb,
@@ -740,6 +742,8 @@ struct shrinker;
740extern struct shrinker *set_shrinker(int, shrinker_t); 742extern struct shrinker *set_shrinker(int, shrinker_t);
741extern void remove_shrinker(struct shrinker *shrinker); 743extern void remove_shrinker(struct shrinker *shrinker);
742 744
745extern pte_t *FASTCALL(get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl));
746
743int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address); 747int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address);
744int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address); 748int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address);
745int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address); 749int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address);
@@ -952,8 +956,9 @@ struct page *vmalloc_to_page(void *addr);
952unsigned long vmalloc_to_pfn(void *addr); 956unsigned long vmalloc_to_pfn(void *addr);
953int remap_pfn_range(struct vm_area_struct *, unsigned long addr, 957int remap_pfn_range(struct vm_area_struct *, unsigned long addr,
954 unsigned long pfn, unsigned long size, pgprot_t); 958 unsigned long pfn, unsigned long size, pgprot_t);
959int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *);
955 960
956struct page *follow_page(struct mm_struct *, unsigned long address, 961struct page *follow_page(struct vm_area_struct *, unsigned long address,
957 unsigned int foll_flags); 962 unsigned int foll_flags);
958#define FOLL_WRITE 0x01 /* check pte is writable */ 963#define FOLL_WRITE 0x01 /* check pte is writable */
959#define FOLL_TOUCH 0x02 /* mark page accessed */ 964#define FOLL_TOUCH 0x02 /* mark page accessed */
diff --git a/include/linux/mmc/protocol.h b/include/linux/mmc/protocol.h
index f819cae92266..a14dc306545b 100644
--- a/include/linux/mmc/protocol.h
+++ b/include/linux/mmc/protocol.h
@@ -63,7 +63,7 @@
63 /* class 5 */ 63 /* class 5 */
64#define MMC_ERASE_GROUP_START 35 /* ac [31:0] data addr R1 */ 64#define MMC_ERASE_GROUP_START 35 /* ac [31:0] data addr R1 */
65#define MMC_ERASE_GROUP_END 36 /* ac [31:0] data addr R1 */ 65#define MMC_ERASE_GROUP_END 36 /* ac [31:0] data addr R1 */
66#define MMC_ERASE 37 /* ac R1b */ 66#define MMC_ERASE 38 /* ac R1b */
67 67
68 /* class 9 */ 68 /* class 9 */
69#define MMC_FAST_IO 39 /* ac <Complex> R4 */ 69#define MMC_FAST_IO 39 /* ac <Complex> R4 */
@@ -74,7 +74,7 @@
74 74
75 /* class 8 */ 75 /* class 8 */
76#define MMC_APP_CMD 55 /* ac [31:16] RCA R1 */ 76#define MMC_APP_CMD 55 /* ac [31:16] RCA R1 */
77#define MMC_GEN_CMD 56 /* adtc [0] RD/WR R1b */ 77#define MMC_GEN_CMD 56 /* adtc [0] RD/WR R1 */
78 78
79/* SD commands type argument response */ 79/* SD commands type argument response */
80 /* class 8 */ 80 /* class 8 */
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h
index 3c9ea4b7adda..23a568910341 100644
--- a/include/linux/mtd/cfi.h
+++ b/include/linux/mtd/cfi.h
@@ -1,7 +1,7 @@
1 1
2/* Common Flash Interface structures 2/* Common Flash Interface structures
3 * See http://support.intel.com/design/flash/technote/index.htm 3 * See http://support.intel.com/design/flash/technote/index.htm
4 * $Id: cfi.h,v 1.56 2005/11/07 11:14:54 gleixner Exp $ 4 * $Id: cfi.h,v 1.57 2005/11/15 23:28:17 tpoynor Exp $
5 */ 5 */
6 6
7#ifndef __MTD_CFI_H__ 7#ifndef __MTD_CFI_H__
@@ -426,6 +426,22 @@ static inline uint8_t cfi_read_query(struct map_info *map, uint32_t addr)
426 } 426 }
427} 427}
428 428
429static inline uint16_t cfi_read_query16(struct map_info *map, uint32_t addr)
430{
431 map_word val = map_read(map, addr);
432
433 if (map_bankwidth_is_1(map)) {
434 return val.x[0] & 0xff;
435 } else if (map_bankwidth_is_2(map)) {
436 return cfi16_to_cpu(val.x[0]);
437 } else {
438 /* No point in a 64-bit byteswap since that would just be
439 swapping the responses from different chips, and we are
440 only interested in one chip (a representative sample) */
441 return cfi32_to_cpu(val.x[0]);
442 }
443}
444
429static inline void cfi_udelay(int us) 445static inline void cfi_udelay(int us)
430{ 446{
431 if (us >= 1000) { 447 if (us >= 1000) {
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 35b30e6c8cf8..33261f1d2239 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -89,7 +89,7 @@ static inline void page_dup_rmap(struct page *page)
89/* 89/*
90 * Called from mm/vmscan.c to handle paging out 90 * Called from mm/vmscan.c to handle paging out
91 */ 91 */
92int page_referenced(struct page *, int is_locked, int ignore_token); 92int page_referenced(struct page *, int is_locked);
93int try_to_unmap(struct page *); 93int try_to_unmap(struct page *);
94 94
95/* 95/*
@@ -109,7 +109,7 @@ unsigned long page_address_in_vma(struct page *, struct vm_area_struct *);
109#define anon_vma_prepare(vma) (0) 109#define anon_vma_prepare(vma) (0)
110#define anon_vma_link(vma) do {} while (0) 110#define anon_vma_link(vma) do {} while (0)
111 111
112#define page_referenced(page,l,i) TestClearPageReferenced(page) 112#define page_referenced(page,l) TestClearPageReferenced(page)
113#define try_to_unmap(page) SWAP_FAIL 113#define try_to_unmap(page) SWAP_FAIL
114 114
115#endif /* CONFIG_MMU */ 115#endif /* CONFIG_MMU */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 2038bd27b041..b0ad6f30679e 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -908,7 +908,6 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0)
908#define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */ 908#define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */
909#define PF_BORROWED_MM 0x00400000 /* I am a kthread doing use_mm */ 909#define PF_BORROWED_MM 0x00400000 /* I am a kthread doing use_mm */
910#define PF_RANDOMIZE 0x00800000 /* randomize virtual address space */ 910#define PF_RANDOMIZE 0x00800000 /* randomize virtual address space */
911#define PF_HOTPLUG_CPU 0x01000000 /* Currently performing CPU hotplug */
912 911
913/* 912/*
914 * Only the _current_ task can read/write to tsk->flags, but other 913 * Only the _current_ task can read/write to tsk->flags, but other
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index a3ac92b19aca..e3710d7e260a 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -121,6 +121,9 @@
121 121
122#define PORT_IP3106 70 122#define PORT_IP3106 70
123 123
124/* Hilscher netx */
125#define PORT_NETX 71
126
124#ifdef __KERNEL__ 127#ifdef __KERNEL__
125 128
126#include <linux/config.h> 129#include <linux/config.h>
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 20c975642cab..508668f840b6 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -239,6 +239,11 @@ static inline void put_swap_token(struct mm_struct *mm)
239 __put_swap_token(mm); 239 __put_swap_token(mm);
240} 240}
241 241
242static inline void disable_swap_token(void)
243{
244 put_swap_token(swap_token_mm);
245}
246
242#else /* CONFIG_SWAP */ 247#else /* CONFIG_SWAP */
243 248
244#define total_swap_pages 0 249#define total_swap_pages 0
@@ -283,6 +288,7 @@ static inline swp_entry_t get_swap_page(void)
283#define put_swap_token(x) do { } while(0) 288#define put_swap_token(x) do { } while(0)
284#define grab_swap_token() do { } while(0) 289#define grab_swap_token() do { } while(0)
285#define has_swap_token(x) 0 290#define has_swap_token(x) 0
291#define disable_swap_token() do { } while(0)
286 292
287#endif /* CONFIG_SWAP */ 293#endif /* CONFIG_SWAP */
288#endif /* __KERNEL__*/ 294#endif /* __KERNEL__*/
diff --git a/include/media/tveeprom.h b/include/media/tveeprom.h
index e2035c7da094..e9fc1a785497 100644
--- a/include/media/tveeprom.h
+++ b/include/media/tveeprom.h
@@ -4,12 +4,15 @@
4struct tveeprom { 4struct tveeprom {
5 u32 has_radio; 5 u32 has_radio;
6 u32 has_ir; /* 0: no IR, 1: IR present, 2: unknown */ 6 u32 has_ir; /* 0: no IR, 1: IR present, 2: unknown */
7 u32 has_MAC_address; /* 0: no MAC, 1: MAC present, 2: unknown */
7 8
8 u32 tuner_type; 9 u32 tuner_type;
9 u32 tuner_formats; 10 u32 tuner_formats;
11 u32 tuner_hauppauge_model;
10 12
11 u32 tuner2_type; 13 u32 tuner2_type;
12 u32 tuner2_formats; 14 u32 tuner2_formats;
15 u32 tuner2_hauppauge_model;
13 16
14 u32 digitizer; 17 u32 digitizer;
15 u32 digitizer_formats; 18 u32 digitizer_formats;
@@ -21,6 +24,7 @@ struct tveeprom {
21 u32 revision; 24 u32 revision;
22 u32 serial_number; 25 u32 serial_number;
23 char rev_str[5]; 26 char rev_str[5];
27 u8 MAC_address[6];
24}; 28};
25 29
26void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, 30void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
diff --git a/kernel/cpu.c b/kernel/cpu.c
index d61ba88f34e5..e882c6babf41 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -16,47 +16,76 @@
16#include <asm/semaphore.h> 16#include <asm/semaphore.h>
17 17
18/* This protects CPUs going up and down... */ 18/* This protects CPUs going up and down... */
19DECLARE_MUTEX(cpucontrol); 19static DECLARE_MUTEX(cpucontrol);
20EXPORT_SYMBOL_GPL(cpucontrol);
21 20
22static struct notifier_block *cpu_chain; 21static struct notifier_block *cpu_chain;
23 22
24/* 23#ifdef CONFIG_HOTPLUG_CPU
25 * Used to check by callers if they need to acquire the cpucontrol 24static struct task_struct *lock_cpu_hotplug_owner;
26 * or not to protect a cpu from being removed. Its sometimes required to 25static int lock_cpu_hotplug_depth;
27 * call these functions both for normal operations, and in response to
28 * a cpu being added/removed. If the context of the call is in the same
29 * thread context as a CPU hotplug thread, we dont need to take the lock
30 * since its already protected
31 * check drivers/cpufreq/cpufreq.c for its usage - Ashok Raj
32 */
33 26
34int current_in_cpu_hotplug(void) 27static int __lock_cpu_hotplug(int interruptible)
35{ 28{
36 return (current->flags & PF_HOTPLUG_CPU); 29 int ret = 0;
30
31 if (lock_cpu_hotplug_owner != current) {
32 if (interruptible)
33 ret = down_interruptible(&cpucontrol);
34 else
35 down(&cpucontrol);
36 }
37
38 /*
39 * Set only if we succeed in locking
40 */
41 if (!ret) {
42 lock_cpu_hotplug_depth++;
43 lock_cpu_hotplug_owner = current;
44 }
45
46 return ret;
37} 47}
38 48
39EXPORT_SYMBOL_GPL(current_in_cpu_hotplug); 49void lock_cpu_hotplug(void)
50{
51 __lock_cpu_hotplug(0);
52}
53EXPORT_SYMBOL_GPL(lock_cpu_hotplug);
40 54
55void unlock_cpu_hotplug(void)
56{
57 if (--lock_cpu_hotplug_depth == 0) {
58 lock_cpu_hotplug_owner = NULL;
59 up(&cpucontrol);
60 }
61}
62EXPORT_SYMBOL_GPL(unlock_cpu_hotplug);
63
64int lock_cpu_hotplug_interruptible(void)
65{
66 return __lock_cpu_hotplug(1);
67}
68EXPORT_SYMBOL_GPL(lock_cpu_hotplug_interruptible);
69#endif /* CONFIG_HOTPLUG_CPU */
41 70
42/* Need to know about CPUs going up/down? */ 71/* Need to know about CPUs going up/down? */
43int register_cpu_notifier(struct notifier_block *nb) 72int register_cpu_notifier(struct notifier_block *nb)
44{ 73{
45 int ret; 74 int ret;
46 75
47 if ((ret = down_interruptible(&cpucontrol)) != 0) 76 if ((ret = lock_cpu_hotplug_interruptible()) != 0)
48 return ret; 77 return ret;
49 ret = notifier_chain_register(&cpu_chain, nb); 78 ret = notifier_chain_register(&cpu_chain, nb);
50 up(&cpucontrol); 79 unlock_cpu_hotplug();
51 return ret; 80 return ret;
52} 81}
53EXPORT_SYMBOL(register_cpu_notifier); 82EXPORT_SYMBOL(register_cpu_notifier);
54 83
55void unregister_cpu_notifier(struct notifier_block *nb) 84void unregister_cpu_notifier(struct notifier_block *nb)
56{ 85{
57 down(&cpucontrol); 86 lock_cpu_hotplug();
58 notifier_chain_unregister(&cpu_chain, nb); 87 notifier_chain_unregister(&cpu_chain, nb);
59 up(&cpucontrol); 88 unlock_cpu_hotplug();
60} 89}
61EXPORT_SYMBOL(unregister_cpu_notifier); 90EXPORT_SYMBOL(unregister_cpu_notifier);
62 91
@@ -112,13 +141,6 @@ int cpu_down(unsigned int cpu)
112 goto out; 141 goto out;
113 } 142 }
114 143
115 /*
116 * Leave a trace in current->flags indicating we are already in
117 * process of performing CPU hotplug. Callers can check if cpucontrol
118 * is already acquired by current thread, and if so not cause
119 * a dead lock by not acquiring the lock
120 */
121 current->flags |= PF_HOTPLUG_CPU;
122 err = notifier_call_chain(&cpu_chain, CPU_DOWN_PREPARE, 144 err = notifier_call_chain(&cpu_chain, CPU_DOWN_PREPARE,
123 (void *)(long)cpu); 145 (void *)(long)cpu);
124 if (err == NOTIFY_BAD) { 146 if (err == NOTIFY_BAD) {
@@ -171,7 +193,6 @@ out_thread:
171out_allowed: 193out_allowed:
172 set_cpus_allowed(current, old_allowed); 194 set_cpus_allowed(current, old_allowed);
173out: 195out:
174 current->flags &= ~PF_HOTPLUG_CPU;
175 unlock_cpu_hotplug(); 196 unlock_cpu_hotplug();
176 return err; 197 return err;
177} 198}
@@ -182,7 +203,7 @@ int __devinit cpu_up(unsigned int cpu)
182 int ret; 203 int ret;
183 void *hcpu = (void *)(long)cpu; 204 void *hcpu = (void *)(long)cpu;
184 205
185 if ((ret = down_interruptible(&cpucontrol)) != 0) 206 if ((ret = lock_cpu_hotplug_interruptible()) != 0)
186 return ret; 207 return ret;
187 208
188 if (cpu_online(cpu) || !cpu_present(cpu)) { 209 if (cpu_online(cpu) || !cpu_present(cpu)) {
@@ -190,11 +211,6 @@ int __devinit cpu_up(unsigned int cpu)
190 goto out; 211 goto out;
191 } 212 }
192 213
193 /*
194 * Leave a trace in current->flags indicating we are already in
195 * process of performing CPU hotplug.
196 */
197 current->flags |= PF_HOTPLUG_CPU;
198 ret = notifier_call_chain(&cpu_chain, CPU_UP_PREPARE, hcpu); 214 ret = notifier_call_chain(&cpu_chain, CPU_UP_PREPARE, hcpu);
199 if (ret == NOTIFY_BAD) { 215 if (ret == NOTIFY_BAD) {
200 printk("%s: attempt to bring up CPU %u failed\n", 216 printk("%s: attempt to bring up CPU %u failed\n",
@@ -217,7 +233,6 @@ out_notify:
217 if (ret != 0) 233 if (ret != 0)
218 notifier_call_chain(&cpu_chain, CPU_UP_CANCELED, hcpu); 234 notifier_call_chain(&cpu_chain, CPU_UP_CANCELED, hcpu);
219out: 235out:
220 current->flags &= ~PF_HOTPLUG_CPU; 236 unlock_cpu_hotplug();
221 up(&cpucontrol);
222 return ret; 237 return ret;
223} 238}
diff --git a/kernel/fork.c b/kernel/fork.c
index 1c1cf8dc396b..fb8572a42297 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1124,8 +1124,6 @@ static task_t *copy_process(unsigned long clone_flags,
1124 if (unlikely(p->ptrace & PT_PTRACED)) 1124 if (unlikely(p->ptrace & PT_PTRACED))
1125 __ptrace_link(p, current->parent); 1125 __ptrace_link(p, current->parent);
1126 1126
1127 cpuset_fork(p);
1128
1129 attach_pid(p, PIDTYPE_PID, p->pid); 1127 attach_pid(p, PIDTYPE_PID, p->pid);
1130 attach_pid(p, PIDTYPE_TGID, p->tgid); 1128 attach_pid(p, PIDTYPE_TGID, p->tgid);
1131 if (thread_group_leader(p)) { 1129 if (thread_group_leader(p)) {
@@ -1135,13 +1133,14 @@ static task_t *copy_process(unsigned long clone_flags,
1135 __get_cpu_var(process_counts)++; 1133 __get_cpu_var(process_counts)++;
1136 } 1134 }
1137 1135
1138 proc_fork_connector(p);
1139 if (!current->signal->tty && p->signal->tty) 1136 if (!current->signal->tty && p->signal->tty)
1140 p->signal->tty = NULL; 1137 p->signal->tty = NULL;
1141 1138
1142 nr_threads++; 1139 nr_threads++;
1143 total_forks++; 1140 total_forks++;
1144 write_unlock_irq(&tasklist_lock); 1141 write_unlock_irq(&tasklist_lock);
1142 proc_fork_connector(p);
1143 cpuset_fork(p);
1145 retval = 0; 1144 retval = 0;
1146 1145
1147fork_out: 1146fork_out:
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
index 84af54c39e1b..cae4f5728997 100644
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@ -36,7 +36,7 @@ timespec_to_sample(clockid_t which_clock, const struct timespec *tp)
36 union cpu_time_count ret; 36 union cpu_time_count ret;
37 ret.sched = 0; /* high half always zero when .cpu used */ 37 ret.sched = 0; /* high half always zero when .cpu used */
38 if (CPUCLOCK_WHICH(which_clock) == CPUCLOCK_SCHED) { 38 if (CPUCLOCK_WHICH(which_clock) == CPUCLOCK_SCHED) {
39 ret.sched = tp->tv_sec * NSEC_PER_SEC + tp->tv_nsec; 39 ret.sched = (unsigned long long)tp->tv_sec * NSEC_PER_SEC + tp->tv_nsec;
40 } else { 40 } else {
41 ret.cpu = timespec_to_cputime(tp); 41 ret.cpu = timespec_to_cputime(tp);
42 } 42 }
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 6ee2cad530e8..d253f3ae2fa5 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -24,7 +24,7 @@
24 24
25DECLARE_MUTEX(pm_sem); 25DECLARE_MUTEX(pm_sem);
26 26
27struct pm_ops * pm_ops = NULL; 27struct pm_ops *pm_ops;
28suspend_disk_method_t pm_disk_mode = PM_DISK_SHUTDOWN; 28suspend_disk_method_t pm_disk_mode = PM_DISK_SHUTDOWN;
29 29
30/** 30/**
@@ -151,6 +151,18 @@ static char *pm_states[PM_SUSPEND_MAX] = {
151#endif 151#endif
152}; 152};
153 153
154static inline int valid_state(suspend_state_t state)
155{
156 /* Suspend-to-disk does not really need low-level support.
157 * It can work with reboot if needed. */
158 if (state == PM_SUSPEND_DISK)
159 return 1;
160
161 if (pm_ops && pm_ops->valid && !pm_ops->valid(state))
162 return 0;
163 return 1;
164}
165
154 166
155/** 167/**
156 * enter_state - Do common work of entering low-power state. 168 * enter_state - Do common work of entering low-power state.
@@ -167,7 +179,7 @@ static int enter_state(suspend_state_t state)
167{ 179{
168 int error; 180 int error;
169 181
170 if (pm_ops && pm_ops->valid && !pm_ops->valid(state)) 182 if (!valid_state(state))
171 return -ENODEV; 183 return -ENODEV;
172 if (down_trylock(&pm_sem)) 184 if (down_trylock(&pm_sem))
173 return -EBUSY; 185 return -EBUSY;
@@ -238,9 +250,8 @@ static ssize_t state_show(struct subsystem * subsys, char * buf)
238 char * s = buf; 250 char * s = buf;
239 251
240 for (i = 0; i < PM_SUSPEND_MAX; i++) { 252 for (i = 0; i < PM_SUSPEND_MAX; i++) {
241 if (pm_states[i] && pm_ops && (!pm_ops->valid 253 if (pm_states[i] && valid_state(i))
242 ||(pm_ops->valid && pm_ops->valid(i)))) 254 s += sprintf(s,"%s ", pm_states[i]);
243 s += sprintf(s,"%s ",pm_states[i]);
244 } 255 }
245 s += sprintf(s,"\n"); 256 s += sprintf(s,"\n");
246 return (s - buf); 257 return (s - buf);
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 17ee7e5a3451..656476eedb1b 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -241,7 +241,8 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in
241 if (write) { 241 if (write) {
242 copy_to_user_page(vma, page, addr, 242 copy_to_user_page(vma, page, addr,
243 maddr + offset, buf, bytes); 243 maddr + offset, buf, bytes);
244 set_page_dirty_lock(page); 244 if (!PageCompound(page))
245 set_page_dirty_lock(page);
245 } else { 246 } else {
246 copy_from_user_page(vma, page, addr, 247 copy_from_user_page(vma, page, addr,
247 buf, maddr + offset, bytes); 248 buf, maddr + offset, bytes);
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 42df83d7fad2..2bd5aee1c736 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -102,7 +102,7 @@ int fastcall queue_work(struct workqueue_struct *wq, struct work_struct *work)
102 102
103 if (!test_and_set_bit(0, &work->pending)) { 103 if (!test_and_set_bit(0, &work->pending)) {
104 if (unlikely(is_single_threaded(wq))) 104 if (unlikely(is_single_threaded(wq)))
105 cpu = 0; 105 cpu = any_online_cpu(cpu_online_map);
106 BUG_ON(!list_empty(&work->entry)); 106 BUG_ON(!list_empty(&work->entry));
107 __queue_work(per_cpu_ptr(wq->cpu_wq, cpu), work); 107 __queue_work(per_cpu_ptr(wq->cpu_wq, cpu), work);
108 ret = 1; 108 ret = 1;
@@ -118,7 +118,7 @@ static void delayed_work_timer_fn(unsigned long __data)
118 int cpu = smp_processor_id(); 118 int cpu = smp_processor_id();
119 119
120 if (unlikely(is_single_threaded(wq))) 120 if (unlikely(is_single_threaded(wq)))
121 cpu = 0; 121 cpu = any_online_cpu(cpu_online_map);
122 122
123 __queue_work(per_cpu_ptr(wq->cpu_wq, cpu), work); 123 __queue_work(per_cpu_ptr(wq->cpu_wq, cpu), work);
124} 124}
@@ -266,8 +266,8 @@ void fastcall flush_workqueue(struct workqueue_struct *wq)
266 might_sleep(); 266 might_sleep();
267 267
268 if (is_single_threaded(wq)) { 268 if (is_single_threaded(wq)) {
269 /* Always use cpu 0's area. */ 269 /* Always use first cpu's area. */
270 flush_cpu_workqueue(per_cpu_ptr(wq->cpu_wq, 0)); 270 flush_cpu_workqueue(per_cpu_ptr(wq->cpu_wq, any_online_cpu(cpu_online_map)));
271 } else { 271 } else {
272 int cpu; 272 int cpu;
273 273
@@ -320,7 +320,7 @@ struct workqueue_struct *__create_workqueue(const char *name,
320 lock_cpu_hotplug(); 320 lock_cpu_hotplug();
321 if (singlethread) { 321 if (singlethread) {
322 INIT_LIST_HEAD(&wq->list); 322 INIT_LIST_HEAD(&wq->list);
323 p = create_workqueue_thread(wq, 0); 323 p = create_workqueue_thread(wq, any_online_cpu(cpu_online_map));
324 if (!p) 324 if (!p)
325 destroy = 1; 325 destroy = 1;
326 else 326 else
@@ -374,7 +374,7 @@ void destroy_workqueue(struct workqueue_struct *wq)
374 /* We don't need the distraction of CPUs appearing and vanishing. */ 374 /* We don't need the distraction of CPUs appearing and vanishing. */
375 lock_cpu_hotplug(); 375 lock_cpu_hotplug();
376 if (is_single_threaded(wq)) 376 if (is_single_threaded(wq))
377 cleanup_workqueue_thread(wq, 0); 377 cleanup_workqueue_thread(wq, any_online_cpu(cpu_online_map));
378 else { 378 else {
379 for_each_online_cpu(cpu) 379 for_each_online_cpu(cpu)
380 cleanup_workqueue_thread(wq, cpu); 380 cleanup_workqueue_thread(wq, cpu);
diff --git a/lib/genalloc.c b/lib/genalloc.c
index d6d30d2e7166..9ce0a6a3b85a 100644
--- a/lib/genalloc.c
+++ b/lib/genalloc.c
@@ -95,12 +95,10 @@ unsigned long gen_pool_alloc(struct gen_pool *poolp, int size)
95 if (size > max_chunk_size) 95 if (size > max_chunk_size)
96 return 0; 96 return 0;
97 97
98 i = 0;
99
100 size = max(size, 1 << ALLOC_MIN_SHIFT); 98 size = max(size, 1 << ALLOC_MIN_SHIFT);
101 s = roundup_pow_of_two(size); 99 i = fls(size - 1);
102 100 s = 1 << i;
103 j = i; 101 j = i -= ALLOC_MIN_SHIFT;
104 102
105 spin_lock_irqsave(&poolp->lock, flags); 103 spin_lock_irqsave(&poolp->lock, flags);
106 while (!h[j].next) { 104 while (!h[j].next) {
@@ -153,10 +151,10 @@ void gen_pool_free(struct gen_pool *poolp, unsigned long ptr, int size)
153 if (size > max_chunk_size) 151 if (size > max_chunk_size)
154 return; 152 return;
155 153
156 i = 0;
157
158 size = max(size, 1 << ALLOC_MIN_SHIFT); 154 size = max(size, 1 << ALLOC_MIN_SHIFT);
159 s = roundup_pow_of_two(size); 155 i = fls(size - 1);
156 s = 1 << i;
157 i -= ALLOC_MIN_SHIFT;
160 158
161 a = ptr; 159 a = ptr;
162 160
diff --git a/mm/fremap.c b/mm/fremap.c
index 007cbad9331e..9f381e58bf44 100644
--- a/mm/fremap.c
+++ b/mm/fremap.c
@@ -27,24 +27,20 @@ static int zap_pte(struct mm_struct *mm, struct vm_area_struct *vma,
27 struct page *page = NULL; 27 struct page *page = NULL;
28 28
29 if (pte_present(pte)) { 29 if (pte_present(pte)) {
30 unsigned long pfn = pte_pfn(pte); 30 flush_cache_page(vma, addr, pte_pfn(pte));
31 flush_cache_page(vma, addr, pfn);
32 pte = ptep_clear_flush(vma, addr, ptep); 31 pte = ptep_clear_flush(vma, addr, ptep);
33 if (unlikely(!pfn_valid(pfn))) { 32 page = vm_normal_page(vma, addr, pte);
34 print_bad_pte(vma, pte, addr); 33 if (page) {
35 goto out; 34 if (pte_dirty(pte))
35 set_page_dirty(page);
36 page_remove_rmap(page);
37 page_cache_release(page);
36 } 38 }
37 page = pfn_to_page(pfn);
38 if (pte_dirty(pte))
39 set_page_dirty(page);
40 page_remove_rmap(page);
41 page_cache_release(page);
42 } else { 39 } else {
43 if (!pte_file(pte)) 40 if (!pte_file(pte))
44 free_swap_and_cache(pte_to_swp_entry(pte)); 41 free_swap_and_cache(pte_to_swp_entry(pte));
45 pte_clear(mm, addr, ptep); 42 pte_clear(mm, addr, ptep);
46 } 43 }
47out:
48 return !!page; 44 return !!page;
49} 45}
50 46
@@ -59,22 +55,10 @@ int install_page(struct mm_struct *mm, struct vm_area_struct *vma,
59 pgoff_t size; 55 pgoff_t size;
60 int err = -ENOMEM; 56 int err = -ENOMEM;
61 pte_t *pte; 57 pte_t *pte;
62 pmd_t *pmd;
63 pud_t *pud;
64 pgd_t *pgd;
65 pte_t pte_val; 58 pte_t pte_val;
66 spinlock_t *ptl; 59 spinlock_t *ptl;
67 60
68 BUG_ON(vma->vm_flags & VM_UNPAGED); 61 pte = get_locked_pte(mm, addr, &ptl);
69
70 pgd = pgd_offset(mm, addr);
71 pud = pud_alloc(mm, pgd, addr);
72 if (!pud)
73 goto out;
74 pmd = pmd_alloc(mm, pud, addr);
75 if (!pmd)
76 goto out;
77 pte = pte_alloc_map_lock(mm, pmd, addr, &ptl);
78 if (!pte) 62 if (!pte)
79 goto out; 63 goto out;
80 64
@@ -116,22 +100,10 @@ int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma,
116{ 100{
117 int err = -ENOMEM; 101 int err = -ENOMEM;
118 pte_t *pte; 102 pte_t *pte;
119 pmd_t *pmd;
120 pud_t *pud;
121 pgd_t *pgd;
122 pte_t pte_val; 103 pte_t pte_val;
123 spinlock_t *ptl; 104 spinlock_t *ptl;
124 105
125 BUG_ON(vma->vm_flags & VM_UNPAGED); 106 pte = get_locked_pte(mm, addr, &ptl);
126
127 pgd = pgd_offset(mm, addr);
128 pud = pud_alloc(mm, pgd, addr);
129 if (!pud)
130 goto out;
131 pmd = pmd_alloc(mm, pud, addr);
132 if (!pmd)
133 goto out;
134 pte = pte_alloc_map_lock(mm, pmd, addr, &ptl);
135 if (!pte) 107 if (!pte)
136 goto out; 108 goto out;
137 109
diff --git a/mm/madvise.c b/mm/madvise.c
index 328a3bcce527..2b7cf0400a21 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -126,7 +126,7 @@ static long madvise_dontneed(struct vm_area_struct * vma,
126 unsigned long start, unsigned long end) 126 unsigned long start, unsigned long end)
127{ 127{
128 *prev = vma; 128 *prev = vma;
129 if (vma->vm_flags & (VM_LOCKED|VM_HUGETLB|VM_UNPAGED)) 129 if (vma->vm_flags & (VM_LOCKED|VM_HUGETLB|VM_PFNMAP))
130 return -EINVAL; 130 return -EINVAL;
131 131
132 if (unlikely(vma->vm_flags & VM_NONLINEAR)) { 132 if (unlikely(vma->vm_flags & VM_NONLINEAR)) {
diff --git a/mm/memory.c b/mm/memory.c
index d1f46f4e4c8a..aa8af0e20269 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -333,9 +333,9 @@ static inline void add_mm_rss(struct mm_struct *mm, int file_rss, int anon_rss)
333} 333}
334 334
335/* 335/*
336 * This function is called to print an error when a pte in a 336 * This function is called to print an error when a bad pte
337 * !VM_UNPAGED region is found pointing to an invalid pfn (which 337 * is found. For example, we might have a PFN-mapped pte in
338 * is an error. 338 * a region that doesn't allow it.
339 * 339 *
340 * The calling function must still handle the error. 340 * The calling function must still handle the error.
341 */ 341 */
@@ -350,19 +350,56 @@ void print_bad_pte(struct vm_area_struct *vma, pte_t pte, unsigned long vaddr)
350} 350}
351 351
352/* 352/*
353 * page_is_anon applies strict checks for an anonymous page belonging to 353 * This function gets the "struct page" associated with a pte.
354 * this vma at this address. It is used on VM_UNPAGED vmas, which are 354 *
355 * usually populated with shared originals (which must not be counted), 355 * NOTE! Some mappings do not have "struct pages". A raw PFN mapping
356 * but occasionally contain private COWed copies (when !VM_SHARED, or 356 * will have each page table entry just pointing to a raw page frame
357 * perhaps via ptrace when VM_SHARED). An mmap of /dev/mem might window 357 * number, and as far as the VM layer is concerned, those do not have
358 * free pages, pages from other processes, or from other parts of this: 358 * pages associated with them - even if the PFN might point to memory
359 * it's tricky, but try not to be deceived by foreign anonymous pages. 359 * that otherwise is perfectly fine and has a "struct page".
360 *
361 * The way we recognize those mappings is through the rules set up
362 * by "remap_pfn_range()": the vma will have the VM_PFNMAP bit set,
363 * and the vm_pgoff will point to the first PFN mapped: thus every
364 * page that is a raw mapping will always honor the rule
365 *
366 * pfn_of_page == vma->vm_pgoff + ((addr - vma->vm_start) >> PAGE_SHIFT)
367 *
368 * and if that isn't true, the page has been COW'ed (in which case it
369 * _does_ have a "struct page" associated with it even if it is in a
370 * VM_PFNMAP range).
360 */ 371 */
361static inline int page_is_anon(struct page *page, 372struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, pte_t pte)
362 struct vm_area_struct *vma, unsigned long addr)
363{ 373{
364 return page && PageAnon(page) && page_mapped(page) && 374 unsigned long pfn = pte_pfn(pte);
365 page_address_in_vma(page, vma) == addr; 375
376 if (vma->vm_flags & VM_PFNMAP) {
377 unsigned long off = (addr - vma->vm_start) >> PAGE_SHIFT;
378 if (pfn == vma->vm_pgoff + off)
379 return NULL;
380 }
381
382 /*
383 * Add some anal sanity checks for now. Eventually,
384 * we should just do "return pfn_to_page(pfn)", but
385 * in the meantime we check that we get a valid pfn,
386 * and that the resulting page looks ok.
387 *
388 * Remove this test eventually!
389 */
390 if (unlikely(!pfn_valid(pfn))) {
391 print_bad_pte(vma, pte, addr);
392 return NULL;
393 }
394
395 /*
396 * NOTE! We still have PageReserved() pages in the page
397 * tables.
398 *
399 * The PAGE_ZERO() pages and various VDSO mappings can
400 * cause them to exist.
401 */
402 return pfn_to_page(pfn);
366} 403}
367 404
368/* 405/*
@@ -379,7 +416,6 @@ copy_one_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm,
379 unsigned long vm_flags = vma->vm_flags; 416 unsigned long vm_flags = vma->vm_flags;
380 pte_t pte = *src_pte; 417 pte_t pte = *src_pte;
381 struct page *page; 418 struct page *page;
382 unsigned long pfn;
383 419
384 /* pte contains position in swap or file, so copy. */ 420 /* pte contains position in swap or file, so copy. */
385 if (unlikely(!pte_present(pte))) { 421 if (unlikely(!pte_present(pte))) {
@@ -397,22 +433,6 @@ copy_one_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm,
397 goto out_set_pte; 433 goto out_set_pte;
398 } 434 }
399 435
400 pfn = pte_pfn(pte);
401 page = pfn_valid(pfn)? pfn_to_page(pfn): NULL;
402
403 if (unlikely(vm_flags & VM_UNPAGED))
404 if (!page_is_anon(page, vma, addr))
405 goto out_set_pte;
406
407 /*
408 * If the pte points outside of valid memory but
409 * the region is not VM_UNPAGED, we have a problem.
410 */
411 if (unlikely(!page)) {
412 print_bad_pte(vma, pte, addr);
413 goto out_set_pte; /* try to do something sane */
414 }
415
416 /* 436 /*
417 * If it's a COW mapping, write protect it both 437 * If it's a COW mapping, write protect it both
418 * in the parent and the child 438 * in the parent and the child
@@ -429,9 +449,13 @@ copy_one_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm,
429 if (vm_flags & VM_SHARED) 449 if (vm_flags & VM_SHARED)
430 pte = pte_mkclean(pte); 450 pte = pte_mkclean(pte);
431 pte = pte_mkold(pte); 451 pte = pte_mkold(pte);
432 get_page(page); 452
433 page_dup_rmap(page); 453 page = vm_normal_page(vma, addr, pte);
434 rss[!!PageAnon(page)]++; 454 if (page) {
455 get_page(page);
456 page_dup_rmap(page);
457 rss[!!PageAnon(page)]++;
458 }
435 459
436out_set_pte: 460out_set_pte:
437 set_pte_at(dst_mm, addr, dst_pte, pte); 461 set_pte_at(dst_mm, addr, dst_pte, pte);
@@ -543,7 +567,7 @@ int copy_page_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
543 * readonly mappings. The tradeoff is that copy_page_range is more 567 * readonly mappings. The tradeoff is that copy_page_range is more
544 * efficient than faulting. 568 * efficient than faulting.
545 */ 569 */
546 if (!(vma->vm_flags & (VM_HUGETLB|VM_NONLINEAR|VM_UNPAGED))) { 570 if (!(vma->vm_flags & (VM_HUGETLB|VM_NONLINEAR|VM_PFNMAP))) {
547 if (!vma->anon_vma) 571 if (!vma->anon_vma)
548 return 0; 572 return 0;
549 } 573 }
@@ -584,19 +608,10 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,
584 } 608 }
585 if (pte_present(ptent)) { 609 if (pte_present(ptent)) {
586 struct page *page; 610 struct page *page;
587 unsigned long pfn;
588 611
589 (*zap_work) -= PAGE_SIZE; 612 (*zap_work) -= PAGE_SIZE;
590 613
591 pfn = pte_pfn(ptent); 614 page = vm_normal_page(vma, addr, ptent);
592 page = pfn_valid(pfn)? pfn_to_page(pfn): NULL;
593
594 if (unlikely(vma->vm_flags & VM_UNPAGED)) {
595 if (!page_is_anon(page, vma, addr))
596 page = NULL;
597 } else if (unlikely(!page))
598 print_bad_pte(vma, ptent, addr);
599
600 if (unlikely(details) && page) { 615 if (unlikely(details) && page) {
601 /* 616 /*
602 * unmap_shared_mapping_pages() wants to 617 * unmap_shared_mapping_pages() wants to
@@ -852,7 +867,7 @@ unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address,
852/* 867/*
853 * Do a quick page-table lookup for a single page. 868 * Do a quick page-table lookup for a single page.
854 */ 869 */
855struct page *follow_page(struct mm_struct *mm, unsigned long address, 870struct page *follow_page(struct vm_area_struct *vma, unsigned long address,
856 unsigned int flags) 871 unsigned int flags)
857{ 872{
858 pgd_t *pgd; 873 pgd_t *pgd;
@@ -860,8 +875,8 @@ struct page *follow_page(struct mm_struct *mm, unsigned long address,
860 pmd_t *pmd; 875 pmd_t *pmd;
861 pte_t *ptep, pte; 876 pte_t *ptep, pte;
862 spinlock_t *ptl; 877 spinlock_t *ptl;
863 unsigned long pfn;
864 struct page *page; 878 struct page *page;
879 struct mm_struct *mm = vma->vm_mm;
865 880
866 page = follow_huge_addr(mm, address, flags & FOLL_WRITE); 881 page = follow_huge_addr(mm, address, flags & FOLL_WRITE);
867 if (!IS_ERR(page)) { 882 if (!IS_ERR(page)) {
@@ -897,11 +912,10 @@ struct page *follow_page(struct mm_struct *mm, unsigned long address,
897 goto unlock; 912 goto unlock;
898 if ((flags & FOLL_WRITE) && !pte_write(pte)) 913 if ((flags & FOLL_WRITE) && !pte_write(pte))
899 goto unlock; 914 goto unlock;
900 pfn = pte_pfn(pte); 915 page = vm_normal_page(vma, address, pte);
901 if (!pfn_valid(pfn)) 916 if (unlikely(!page))
902 goto unlock; 917 goto unlock;
903 918
904 page = pfn_to_page(pfn);
905 if (flags & FOLL_GET) 919 if (flags & FOLL_GET)
906 get_page(page); 920 get_page(page);
907 if (flags & FOLL_TOUCH) { 921 if (flags & FOLL_TOUCH) {
@@ -974,8 +988,10 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
974 return i ? : -EFAULT; 988 return i ? : -EFAULT;
975 } 989 }
976 if (pages) { 990 if (pages) {
977 pages[i] = pte_page(*pte); 991 struct page *page = vm_normal_page(gate_vma, start, *pte);
978 get_page(pages[i]); 992 pages[i] = page;
993 if (page)
994 get_page(page);
979 } 995 }
980 pte_unmap(pte); 996 pte_unmap(pte);
981 if (vmas) 997 if (vmas)
@@ -1010,7 +1026,7 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
1010 foll_flags |= FOLL_WRITE; 1026 foll_flags |= FOLL_WRITE;
1011 1027
1012 cond_resched(); 1028 cond_resched();
1013 while (!(page = follow_page(mm, start, foll_flags))) { 1029 while (!(page = follow_page(vma, start, foll_flags))) {
1014 int ret; 1030 int ret;
1015 ret = __handle_mm_fault(mm, vma, start, 1031 ret = __handle_mm_fault(mm, vma, start,
1016 foll_flags & FOLL_WRITE); 1032 foll_flags & FOLL_WRITE);
@@ -1130,6 +1146,129 @@ int zeromap_page_range(struct vm_area_struct *vma,
1130 return err; 1146 return err;
1131} 1147}
1132 1148
1149pte_t * fastcall get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl)
1150{
1151 pgd_t * pgd = pgd_offset(mm, addr);
1152 pud_t * pud = pud_alloc(mm, pgd, addr);
1153 if (pud) {
1154 pmd_t * pmd = pmd_alloc(mm, pud, addr);
1155 if (pmd)
1156 return pte_alloc_map_lock(mm, pmd, addr, ptl);
1157 }
1158 return NULL;
1159}
1160
1161/*
1162 * This is the old fallback for page remapping.
1163 *
1164 * For historical reasons, it only allows reserved pages. Only
1165 * old drivers should use this, and they needed to mark their
1166 * pages reserved for the old functions anyway.
1167 */
1168static int insert_page(struct mm_struct *mm, unsigned long addr, struct page *page, pgprot_t prot)
1169{
1170 int retval;
1171 pte_t *pte;
1172 spinlock_t *ptl;
1173
1174 retval = -EINVAL;
1175 if (PageAnon(page))
1176 goto out;
1177 retval = -ENOMEM;
1178 flush_dcache_page(page);
1179 pte = get_locked_pte(mm, addr, &ptl);
1180 if (!pte)
1181 goto out;
1182 retval = -EBUSY;
1183 if (!pte_none(*pte))
1184 goto out_unlock;
1185
1186 /* Ok, finally just insert the thing.. */
1187 get_page(page);
1188 inc_mm_counter(mm, file_rss);
1189 page_add_file_rmap(page);
1190 set_pte_at(mm, addr, pte, mk_pte(page, prot));
1191
1192 retval = 0;
1193out_unlock:
1194 pte_unmap_unlock(pte, ptl);
1195out:
1196 return retval;
1197}
1198
1199/*
1200 * This allows drivers to insert individual pages they've allocated
1201 * into a user vma.
1202 *
1203 * The page has to be a nice clean _individual_ kernel allocation.
1204 * If you allocate a compound page, you need to have marked it as
1205 * such (__GFP_COMP), or manually just split the page up yourself
1206 * (which is mainly an issue of doing "set_page_count(page, 1)" for
1207 * each sub-page, and then freeing them one by one when you free
1208 * them rather than freeing it as a compound page).
1209 *
1210 * NOTE! Traditionally this was done with "remap_pfn_range()" which
1211 * took an arbitrary page protection parameter. This doesn't allow
1212 * that. Your vma protection will have to be set up correctly, which
1213 * means that if you want a shared writable mapping, you'd better
1214 * ask for a shared writable mapping!
1215 *
1216 * The page does not need to be reserved.
1217 */
1218int vm_insert_page(struct vm_area_struct *vma, unsigned long addr, struct page *page)
1219{
1220 if (addr < vma->vm_start || addr >= vma->vm_end)
1221 return -EFAULT;
1222 if (!page_count(page))
1223 return -EINVAL;
1224 return insert_page(vma->vm_mm, addr, page, vma->vm_page_prot);
1225}
1226EXPORT_SYMBOL(vm_insert_page);
1227
1228/*
1229 * Somebody does a pfn remapping that doesn't actually work as a vma.
1230 *
1231 * Do it as individual pages instead, and warn about it. It's bad form,
1232 * and very inefficient.
1233 */
1234static int incomplete_pfn_remap(struct vm_area_struct *vma,
1235 unsigned long start, unsigned long end,
1236 unsigned long pfn, pgprot_t prot)
1237{
1238 static int warn = 10;
1239 struct page *page;
1240 int retval;
1241
1242 if (!(vma->vm_flags & VM_INCOMPLETE)) {
1243 if (warn) {
1244 warn--;
1245 printk("%s does an incomplete pfn remapping", current->comm);
1246 dump_stack();
1247 }
1248 }
1249 vma->vm_flags |= VM_INCOMPLETE | VM_IO | VM_RESERVED;
1250
1251 if (start < vma->vm_start || end > vma->vm_end)
1252 return -EINVAL;
1253
1254 if (!pfn_valid(pfn))
1255 return -EINVAL;
1256
1257 page = pfn_to_page(pfn);
1258 if (!PageReserved(page))
1259 return -EINVAL;
1260
1261 retval = 0;
1262 while (start < end) {
1263 retval = insert_page(vma->vm_mm, start, page, prot);
1264 if (retval < 0)
1265 break;
1266 start += PAGE_SIZE;
1267 page++;
1268 }
1269 return retval;
1270}
1271
1133/* 1272/*
1134 * maps a range of physical memory into the requested pages. the old 1273 * maps a range of physical memory into the requested pages. the old
1135 * mappings are removed. any references to nonexistent pages results 1274 * mappings are removed. any references to nonexistent pages results
@@ -1204,6 +1343,9 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
1204 struct mm_struct *mm = vma->vm_mm; 1343 struct mm_struct *mm = vma->vm_mm;
1205 int err; 1344 int err;
1206 1345
1346 if (addr != vma->vm_start || end != vma->vm_end)
1347 return incomplete_pfn_remap(vma, addr, end, pfn, prot);
1348
1207 /* 1349 /*
1208 * Physically remapped pages are special. Tell the 1350 * Physically remapped pages are special. Tell the
1209 * rest of the world about it: 1351 * rest of the world about it:
@@ -1214,11 +1356,12 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
1214 * in 2.6 the LRU scan won't even find its pages, so this 1356 * in 2.6 the LRU scan won't even find its pages, so this
1215 * flag means no more than count its pages in reserved_vm, 1357 * flag means no more than count its pages in reserved_vm,
1216 * and omit it from core dump, even when VM_IO turned off. 1358 * and omit it from core dump, even when VM_IO turned off.
1217 * VM_UNPAGED tells the core MM not to "manage" these pages 1359 * VM_PFNMAP tells the core MM that the base pages are just
1218 * (e.g. refcount, mapcount, try to swap them out): in 1360 * raw PFN mappings, and do not have a "struct page" associated
1219 * particular, zap_pte_range does not try to free them. 1361 * with them.
1220 */ 1362 */
1221 vma->vm_flags |= VM_IO | VM_RESERVED | VM_UNPAGED; 1363 vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP;
1364 vma->vm_pgoff = pfn;
1222 1365
1223 BUG_ON(addr >= end); 1366 BUG_ON(addr >= end);
1224 pfn -= addr >> PAGE_SHIFT; 1367 pfn -= addr >> PAGE_SHIFT;
@@ -1273,6 +1416,33 @@ static inline pte_t maybe_mkwrite(pte_t pte, struct vm_area_struct *vma)
1273 return pte; 1416 return pte;
1274} 1417}
1275 1418
1419static inline void cow_user_page(struct page *dst, struct page *src, unsigned long va)
1420{
1421 /*
1422 * If the source page was a PFN mapping, we don't have
1423 * a "struct page" for it. We do a best-effort copy by
1424 * just copying from the original user address. If that
1425 * fails, we just zero-fill it. Live with it.
1426 */
1427 if (unlikely(!src)) {
1428 void *kaddr = kmap_atomic(dst, KM_USER0);
1429 void __user *uaddr = (void __user *)(va & PAGE_MASK);
1430
1431 /*
1432 * This really shouldn't fail, because the page is there
1433 * in the page tables. But it might just be unreadable,
1434 * in which case we just give up and fill the result with
1435 * zeroes.
1436 */
1437 if (__copy_from_user_inatomic(kaddr, uaddr, PAGE_SIZE))
1438 memset(kaddr, 0, PAGE_SIZE);
1439 kunmap_atomic(kaddr, KM_USER0);
1440 return;
1441
1442 }
1443 copy_user_highpage(dst, src, va);
1444}
1445
1276/* 1446/*
1277 * This routine handles present pages, when users try to write 1447 * This routine handles present pages, when users try to write
1278 * to a shared page. It is done by copying the page to a new address 1448 * to a shared page. It is done by copying the page to a new address
@@ -1295,35 +1465,19 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
1295 unsigned long address, pte_t *page_table, pmd_t *pmd, 1465 unsigned long address, pte_t *page_table, pmd_t *pmd,
1296 spinlock_t *ptl, pte_t orig_pte) 1466 spinlock_t *ptl, pte_t orig_pte)
1297{ 1467{
1298 struct page *old_page, *src_page, *new_page; 1468 struct page *old_page, *new_page;
1299 unsigned long pfn = pte_pfn(orig_pte);
1300 pte_t entry; 1469 pte_t entry;
1301 int ret = VM_FAULT_MINOR; 1470 int ret = VM_FAULT_MINOR;
1302 1471
1303 if (unlikely(!pfn_valid(pfn))) { 1472 old_page = vm_normal_page(vma, address, orig_pte);
1304 /* 1473 if (!old_page)
1305 * Page table corrupted: show pte and kill process. 1474 goto gotten;
1306 * Or it's an attempt to COW an out-of-map VM_UNPAGED
1307 * entry, which copy_user_highpage does not support.
1308 */
1309 print_bad_pte(vma, orig_pte, address);
1310 ret = VM_FAULT_OOM;
1311 goto unlock;
1312 }
1313 old_page = pfn_to_page(pfn);
1314 src_page = old_page;
1315
1316 if (unlikely(vma->vm_flags & VM_UNPAGED))
1317 if (!page_is_anon(old_page, vma, address)) {
1318 old_page = NULL;
1319 goto gotten;
1320 }
1321 1475
1322 if (PageAnon(old_page) && !TestSetPageLocked(old_page)) { 1476 if (PageAnon(old_page) && !TestSetPageLocked(old_page)) {
1323 int reuse = can_share_swap_page(old_page); 1477 int reuse = can_share_swap_page(old_page);
1324 unlock_page(old_page); 1478 unlock_page(old_page);
1325 if (reuse) { 1479 if (reuse) {
1326 flush_cache_page(vma, address, pfn); 1480 flush_cache_page(vma, address, pte_pfn(orig_pte));
1327 entry = pte_mkyoung(orig_pte); 1481 entry = pte_mkyoung(orig_pte);
1328 entry = maybe_mkwrite(pte_mkdirty(entry), vma); 1482 entry = maybe_mkwrite(pte_mkdirty(entry), vma);
1329 ptep_set_access_flags(vma, address, page_table, entry, 1); 1483 ptep_set_access_flags(vma, address, page_table, entry, 1);
@@ -1343,7 +1497,7 @@ gotten:
1343 1497
1344 if (unlikely(anon_vma_prepare(vma))) 1498 if (unlikely(anon_vma_prepare(vma)))
1345 goto oom; 1499 goto oom;
1346 if (src_page == ZERO_PAGE(address)) { 1500 if (old_page == ZERO_PAGE(address)) {
1347 new_page = alloc_zeroed_user_highpage(vma, address); 1501 new_page = alloc_zeroed_user_highpage(vma, address);
1348 if (!new_page) 1502 if (!new_page)
1349 goto oom; 1503 goto oom;
@@ -1351,7 +1505,7 @@ gotten:
1351 new_page = alloc_page_vma(GFP_HIGHUSER, vma, address); 1505 new_page = alloc_page_vma(GFP_HIGHUSER, vma, address);
1352 if (!new_page) 1506 if (!new_page)
1353 goto oom; 1507 goto oom;
1354 copy_user_highpage(new_page, src_page, address); 1508 cow_user_page(new_page, old_page, address);
1355 } 1509 }
1356 1510
1357 /* 1511 /*
@@ -1367,7 +1521,7 @@ gotten:
1367 } 1521 }
1368 } else 1522 } else
1369 inc_mm_counter(mm, anon_rss); 1523 inc_mm_counter(mm, anon_rss);
1370 flush_cache_page(vma, address, pfn); 1524 flush_cache_page(vma, address, pte_pfn(orig_pte));
1371 entry = mk_pte(new_page, vma->vm_page_prot); 1525 entry = mk_pte(new_page, vma->vm_page_prot);
1372 entry = maybe_mkwrite(pte_mkdirty(entry), vma); 1526 entry = maybe_mkwrite(pte_mkdirty(entry), vma);
1373 ptep_establish(vma, address, page_table, entry); 1527 ptep_establish(vma, address, page_table, entry);
@@ -1812,16 +1966,7 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
1812 spinlock_t *ptl; 1966 spinlock_t *ptl;
1813 pte_t entry; 1967 pte_t entry;
1814 1968
1815 /* 1969 if (write_access) {
1816 * A VM_UNPAGED vma will normally be filled with present ptes
1817 * by remap_pfn_range, and never arrive here; but it might have
1818 * holes, or if !VM_DONTEXPAND, mremap might have expanded it.
1819 * It's weird enough handling anon pages in unpaged vmas, we do
1820 * not want to worry about ZERO_PAGEs too (it may or may not
1821 * matter if their counts wrap): just give them anon pages.
1822 */
1823
1824 if (write_access || (vma->vm_flags & VM_UNPAGED)) {
1825 /* Allocate our own private page. */ 1970 /* Allocate our own private page. */
1826 pte_unmap(page_table); 1971 pte_unmap(page_table);
1827 1972
@@ -1896,7 +2041,7 @@ static int do_no_page(struct mm_struct *mm, struct vm_area_struct *vma,
1896 int anon = 0; 2041 int anon = 0;
1897 2042
1898 pte_unmap(page_table); 2043 pte_unmap(page_table);
1899 BUG_ON(vma->vm_flags & VM_UNPAGED); 2044 BUG_ON(vma->vm_flags & VM_PFNMAP);
1900 2045
1901 if (vma->vm_file) { 2046 if (vma->vm_file) {
1902 mapping = vma->vm_file->f_mapping; 2047 mapping = vma->vm_file->f_mapping;
@@ -2149,6 +2294,12 @@ int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
2149 spin_unlock(&mm->page_table_lock); 2294 spin_unlock(&mm->page_table_lock);
2150 return 0; 2295 return 0;
2151} 2296}
2297#else
2298/* Workaround for gcc 2.96 */
2299int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
2300{
2301 return 0;
2302}
2152#endif /* __PAGETABLE_PUD_FOLDED */ 2303#endif /* __PAGETABLE_PUD_FOLDED */
2153 2304
2154#ifndef __PAGETABLE_PMD_FOLDED 2305#ifndef __PAGETABLE_PMD_FOLDED
@@ -2177,6 +2328,12 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
2177 spin_unlock(&mm->page_table_lock); 2328 spin_unlock(&mm->page_table_lock);
2178 return 0; 2329 return 0;
2179} 2330}
2331#else
2332/* Workaround for gcc 2.96 */
2333int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
2334{
2335 return 0;
2336}
2180#endif /* __PAGETABLE_PMD_FOLDED */ 2337#endif /* __PAGETABLE_PMD_FOLDED */
2181 2338
2182int make_pages_present(unsigned long addr, unsigned long end) 2339int make_pages_present(unsigned long addr, unsigned long end)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 5609a31bdf22..bec88c81244e 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -189,17 +189,15 @@ static int check_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
189 189
190 orig_pte = pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl); 190 orig_pte = pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
191 do { 191 do {
192 unsigned long pfn; 192 struct page *page;
193 unsigned int nid; 193 unsigned int nid;
194 194
195 if (!pte_present(*pte)) 195 if (!pte_present(*pte))
196 continue; 196 continue;
197 pfn = pte_pfn(*pte); 197 page = vm_normal_page(vma, addr, *pte);
198 if (!pfn_valid(pfn)) { 198 if (!page)
199 print_bad_pte(vma, *pte, addr);
200 continue; 199 continue;
201 } 200 nid = page_to_nid(page);
202 nid = pfn_to_nid(pfn);
203 if (!node_isset(nid, *nodes)) 201 if (!node_isset(nid, *nodes))
204 break; 202 break;
205 } while (pte++, addr += PAGE_SIZE, addr != end); 203 } while (pte++, addr += PAGE_SIZE, addr != end);
@@ -269,8 +267,6 @@ check_range(struct mm_struct *mm, unsigned long start, unsigned long end,
269 first = find_vma(mm, start); 267 first = find_vma(mm, start);
270 if (!first) 268 if (!first)
271 return ERR_PTR(-EFAULT); 269 return ERR_PTR(-EFAULT);
272 if (first->vm_flags & VM_UNPAGED)
273 return ERR_PTR(-EACCES);
274 prev = NULL; 270 prev = NULL;
275 for (vma = first; vma && vma->vm_start < end; vma = vma->vm_next) { 271 for (vma = first; vma && vma->vm_start < end; vma = vma->vm_next) {
276 if (!vma->vm_next && vma->vm_end < end) 272 if (!vma->vm_next && vma->vm_end < end)
diff --git a/mm/msync.c b/mm/msync.c
index b3f4caf3010b..1b5b6f662dcf 100644
--- a/mm/msync.c
+++ b/mm/msync.c
@@ -27,7 +27,6 @@ static void msync_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
27again: 27again:
28 pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl); 28 pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
29 do { 29 do {
30 unsigned long pfn;
31 struct page *page; 30 struct page *page;
32 31
33 if (progress >= 64) { 32 if (progress >= 64) {
@@ -40,13 +39,9 @@ again:
40 continue; 39 continue;
41 if (!pte_maybe_dirty(*pte)) 40 if (!pte_maybe_dirty(*pte))
42 continue; 41 continue;
43 pfn = pte_pfn(*pte); 42 page = vm_normal_page(vma, addr, *pte);
44 if (unlikely(!pfn_valid(pfn))) { 43 if (!page)
45 print_bad_pte(vma, *pte, addr);
46 continue; 44 continue;
47 }
48 page = pfn_to_page(pfn);
49
50 if (ptep_clear_flush_dirty(vma, addr, pte) || 45 if (ptep_clear_flush_dirty(vma, addr, pte) ||
51 page_test_and_clear_dirty(page)) 46 page_test_and_clear_dirty(page))
52 set_page_dirty(page); 47 set_page_dirty(page);
@@ -97,9 +92,8 @@ static void msync_page_range(struct vm_area_struct *vma,
97 /* For hugepages we can't go walking the page table normally, 92 /* For hugepages we can't go walking the page table normally,
98 * but that's ok, hugetlbfs is memory based, so we don't need 93 * but that's ok, hugetlbfs is memory based, so we don't need
99 * to do anything more on an msync(). 94 * to do anything more on an msync().
100 * Can't do anything with VM_UNPAGED regions either.
101 */ 95 */
102 if (vma->vm_flags & (VM_HUGETLB|VM_UNPAGED)) 96 if (vma->vm_flags & VM_HUGETLB)
103 return; 97 return;
104 98
105 BUG_ON(addr >= end); 99 BUG_ON(addr >= end);
diff --git a/mm/nommu.c b/mm/nommu.c
index 6deb6ab3d6ad..c1196812876b 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -1045,7 +1045,7 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
1045 1045
1046EXPORT_SYMBOL(find_vma); 1046EXPORT_SYMBOL(find_vma);
1047 1047
1048struct page *follow_page(struct mm_struct *mm, unsigned long address, 1048struct page *follow_page(struct vm_area_struct *vma, unsigned long address,
1049 unsigned int foll_flags) 1049 unsigned int foll_flags)
1050{ 1050{
1051 return NULL; 1051 return NULL;
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 1731236dec35..3b21a13d841c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -773,9 +773,12 @@ again:
773} 773}
774 774
775#define ALLOC_NO_WATERMARKS 0x01 /* don't check watermarks at all */ 775#define ALLOC_NO_WATERMARKS 0x01 /* don't check watermarks at all */
776#define ALLOC_HARDER 0x02 /* try to alloc harder */ 776#define ALLOC_WMARK_MIN 0x02 /* use pages_min watermark */
777#define ALLOC_HIGH 0x04 /* __GFP_HIGH set */ 777#define ALLOC_WMARK_LOW 0x04 /* use pages_low watermark */
778#define ALLOC_CPUSET 0x08 /* check for correct cpuset */ 778#define ALLOC_WMARK_HIGH 0x08 /* use pages_high watermark */
779#define ALLOC_HARDER 0x10 /* try to alloc harder */
780#define ALLOC_HIGH 0x20 /* __GFP_HIGH set */
781#define ALLOC_CPUSET 0x40 /* check for correct cpuset */
779 782
780/* 783/*
781 * Return 1 if free pages are above 'mark'. This takes into account the order 784 * Return 1 if free pages are above 'mark'. This takes into account the order
@@ -830,7 +833,14 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order,
830 continue; 833 continue;
831 834
832 if (!(alloc_flags & ALLOC_NO_WATERMARKS)) { 835 if (!(alloc_flags & ALLOC_NO_WATERMARKS)) {
833 if (!zone_watermark_ok(*z, order, (*z)->pages_low, 836 unsigned long mark;
837 if (alloc_flags & ALLOC_WMARK_MIN)
838 mark = (*z)->pages_min;
839 else if (alloc_flags & ALLOC_WMARK_LOW)
840 mark = (*z)->pages_low;
841 else
842 mark = (*z)->pages_high;
843 if (!zone_watermark_ok(*z, order, mark,
834 classzone_idx, alloc_flags)) 844 classzone_idx, alloc_flags))
835 continue; 845 continue;
836 } 846 }
@@ -871,7 +881,7 @@ restart:
871 } 881 }
872 882
873 page = get_page_from_freelist(gfp_mask|__GFP_HARDWALL, order, 883 page = get_page_from_freelist(gfp_mask|__GFP_HARDWALL, order,
874 zonelist, ALLOC_CPUSET); 884 zonelist, ALLOC_WMARK_LOW|ALLOC_CPUSET);
875 if (page) 885 if (page)
876 goto got_pg; 886 goto got_pg;
877 887
@@ -888,7 +898,7 @@ restart:
888 * cannot run direct reclaim, or if the caller has realtime scheduling 898 * cannot run direct reclaim, or if the caller has realtime scheduling
889 * policy. 899 * policy.
890 */ 900 */
891 alloc_flags = 0; 901 alloc_flags = ALLOC_WMARK_MIN;
892 if ((unlikely(rt_task(p)) && !in_interrupt()) || !wait) 902 if ((unlikely(rt_task(p)) && !in_interrupt()) || !wait)
893 alloc_flags |= ALLOC_HARDER; 903 alloc_flags |= ALLOC_HARDER;
894 if (gfp_mask & __GFP_HIGH) 904 if (gfp_mask & __GFP_HIGH)
@@ -959,7 +969,7 @@ rebalance:
959 * under heavy pressure. 969 * under heavy pressure.
960 */ 970 */
961 page = get_page_from_freelist(gfp_mask|__GFP_HARDWALL, order, 971 page = get_page_from_freelist(gfp_mask|__GFP_HARDWALL, order,
962 zonelist, ALLOC_CPUSET); 972 zonelist, ALLOC_WMARK_HIGH|ALLOC_CPUSET);
963 if (page) 973 if (page)
964 goto got_pg; 974 goto got_pg;
965 975
@@ -1762,16 +1772,16 @@ static int __devinit zone_batchsize(struct zone *zone)
1762 batch = 1; 1772 batch = 1;
1763 1773
1764 /* 1774 /*
1765 * We will be trying to allcoate bigger chunks of contiguous 1775 * Clamp the batch to a 2^n - 1 value. Having a power
1766 * memory of the order of fls(batch). This should result in 1776 * of 2 value was found to be more likely to have
1767 * better cache coloring. 1777 * suboptimal cache aliasing properties in some cases.
1768 * 1778 *
1769 * A sanity check also to ensure that batch is still in limits. 1779 * For example if 2 tasks are alternately allocating
1780 * batches of pages, one task can end up with a lot
1781 * of pages of one half of the possible page colors
1782 * and the other with pages of the other colors.
1770 */ 1783 */
1771 batch = (1 << fls(batch + batch/2)); 1784 batch = (1 << (fls(batch + batch/2)-1)) - 1;
1772
1773 if (fls(batch) >= (PAGE_SHIFT + MAX_ORDER - 2))
1774 batch = PAGE_SHIFT + ((MAX_ORDER - 1 - PAGE_SHIFT)/2);
1775 1785
1776 return batch; 1786 return batch;
1777} 1787}
diff --git a/mm/rmap.c b/mm/rmap.c
index 2e034a0b89ab..f853c6def159 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -226,8 +226,6 @@ vma_address(struct page *page, struct vm_area_struct *vma)
226/* 226/*
227 * At what user virtual address is page expected in vma? checking that the 227 * At what user virtual address is page expected in vma? checking that the
228 * page matches the vma: currently only used on anon pages, by unuse_vma; 228 * page matches the vma: currently only used on anon pages, by unuse_vma;
229 * and by extraordinary checks on anon pages in VM_UNPAGED vmas, taking
230 * care that an mmap of /dev/mem might window free and foreign pages.
231 */ 229 */
232unsigned long page_address_in_vma(struct page *page, struct vm_area_struct *vma) 230unsigned long page_address_in_vma(struct page *page, struct vm_area_struct *vma)
233{ 231{
@@ -292,7 +290,7 @@ pte_t *page_check_address(struct page *page, struct mm_struct *mm,
292 * repeatedly from either page_referenced_anon or page_referenced_file. 290 * repeatedly from either page_referenced_anon or page_referenced_file.
293 */ 291 */
294static int page_referenced_one(struct page *page, 292static int page_referenced_one(struct page *page,
295 struct vm_area_struct *vma, unsigned int *mapcount, int ignore_token) 293 struct vm_area_struct *vma, unsigned int *mapcount)
296{ 294{
297 struct mm_struct *mm = vma->vm_mm; 295 struct mm_struct *mm = vma->vm_mm;
298 unsigned long address; 296 unsigned long address;
@@ -313,7 +311,7 @@ static int page_referenced_one(struct page *page,
313 311
314 /* Pretend the page is referenced if the task has the 312 /* Pretend the page is referenced if the task has the
315 swap token and is in the middle of a page fault. */ 313 swap token and is in the middle of a page fault. */
316 if (mm != current->mm && !ignore_token && has_swap_token(mm) && 314 if (mm != current->mm && has_swap_token(mm) &&
317 rwsem_is_locked(&mm->mmap_sem)) 315 rwsem_is_locked(&mm->mmap_sem))
318 referenced++; 316 referenced++;
319 317
@@ -323,7 +321,7 @@ out:
323 return referenced; 321 return referenced;
324} 322}
325 323
326static int page_referenced_anon(struct page *page, int ignore_token) 324static int page_referenced_anon(struct page *page)
327{ 325{
328 unsigned int mapcount; 326 unsigned int mapcount;
329 struct anon_vma *anon_vma; 327 struct anon_vma *anon_vma;
@@ -336,8 +334,7 @@ static int page_referenced_anon(struct page *page, int ignore_token)
336 334
337 mapcount = page_mapcount(page); 335 mapcount = page_mapcount(page);
338 list_for_each_entry(vma, &anon_vma->head, anon_vma_node) { 336 list_for_each_entry(vma, &anon_vma->head, anon_vma_node) {
339 referenced += page_referenced_one(page, vma, &mapcount, 337 referenced += page_referenced_one(page, vma, &mapcount);
340 ignore_token);
341 if (!mapcount) 338 if (!mapcount)
342 break; 339 break;
343 } 340 }
@@ -356,7 +353,7 @@ static int page_referenced_anon(struct page *page, int ignore_token)
356 * 353 *
357 * This function is only called from page_referenced for object-based pages. 354 * This function is only called from page_referenced for object-based pages.
358 */ 355 */
359static int page_referenced_file(struct page *page, int ignore_token) 356static int page_referenced_file(struct page *page)
360{ 357{
361 unsigned int mapcount; 358 unsigned int mapcount;
362 struct address_space *mapping = page->mapping; 359 struct address_space *mapping = page->mapping;
@@ -394,8 +391,7 @@ static int page_referenced_file(struct page *page, int ignore_token)
394 referenced++; 391 referenced++;
395 break; 392 break;
396 } 393 }
397 referenced += page_referenced_one(page, vma, &mapcount, 394 referenced += page_referenced_one(page, vma, &mapcount);
398 ignore_token);
399 if (!mapcount) 395 if (!mapcount)
400 break; 396 break;
401 } 397 }
@@ -412,13 +408,10 @@ static int page_referenced_file(struct page *page, int ignore_token)
412 * Quick test_and_clear_referenced for all mappings to a page, 408 * Quick test_and_clear_referenced for all mappings to a page,
413 * returns the number of ptes which referenced the page. 409 * returns the number of ptes which referenced the page.
414 */ 410 */
415int page_referenced(struct page *page, int is_locked, int ignore_token) 411int page_referenced(struct page *page, int is_locked)
416{ 412{
417 int referenced = 0; 413 int referenced = 0;
418 414
419 if (!swap_token_default_timeout)
420 ignore_token = 1;
421
422 if (page_test_and_clear_young(page)) 415 if (page_test_and_clear_young(page))
423 referenced++; 416 referenced++;
424 417
@@ -427,15 +420,14 @@ int page_referenced(struct page *page, int is_locked, int ignore_token)
427 420
428 if (page_mapped(page) && page->mapping) { 421 if (page_mapped(page) && page->mapping) {
429 if (PageAnon(page)) 422 if (PageAnon(page))
430 referenced += page_referenced_anon(page, ignore_token); 423 referenced += page_referenced_anon(page);
431 else if (is_locked) 424 else if (is_locked)
432 referenced += page_referenced_file(page, ignore_token); 425 referenced += page_referenced_file(page);
433 else if (TestSetPageLocked(page)) 426 else if (TestSetPageLocked(page))
434 referenced++; 427 referenced++;
435 else { 428 else {
436 if (page->mapping) 429 if (page->mapping)
437 referenced += page_referenced_file(page, 430 referenced += page_referenced_file(page);
438 ignore_token);
439 unlock_page(page); 431 unlock_page(page);
440 } 432 }
441 } 433 }
@@ -614,7 +606,6 @@ static void try_to_unmap_cluster(unsigned long cursor,
614 struct page *page; 606 struct page *page;
615 unsigned long address; 607 unsigned long address;
616 unsigned long end; 608 unsigned long end;
617 unsigned long pfn;
618 609
619 address = (vma->vm_start + cursor) & CLUSTER_MASK; 610 address = (vma->vm_start + cursor) & CLUSTER_MASK;
620 end = address + CLUSTER_SIZE; 611 end = address + CLUSTER_SIZE;
@@ -643,21 +634,14 @@ static void try_to_unmap_cluster(unsigned long cursor,
643 for (; address < end; pte++, address += PAGE_SIZE) { 634 for (; address < end; pte++, address += PAGE_SIZE) {
644 if (!pte_present(*pte)) 635 if (!pte_present(*pte))
645 continue; 636 continue;
646 637 page = vm_normal_page(vma, address, *pte);
647 pfn = pte_pfn(*pte); 638 BUG_ON(!page || PageAnon(page));
648 if (unlikely(!pfn_valid(pfn))) {
649 print_bad_pte(vma, *pte, address);
650 continue;
651 }
652
653 page = pfn_to_page(pfn);
654 BUG_ON(PageAnon(page));
655 639
656 if (ptep_clear_flush_young(vma, address, pte)) 640 if (ptep_clear_flush_young(vma, address, pte))
657 continue; 641 continue;
658 642
659 /* Nuke the page table entry. */ 643 /* Nuke the page table entry. */
660 flush_cache_page(vma, address, pfn); 644 flush_cache_page(vma, address, pte_pfn(*pte));
661 pteval = ptep_clear_flush(vma, address, pte); 645 pteval = ptep_clear_flush(vma, address, pte);
662 646
663 /* If nonlinear, store the file page offset in the pte. */ 647 /* If nonlinear, store the file page offset in the pte. */
diff --git a/mm/thrash.c b/mm/thrash.c
index eff3c18c33a1..f4c560b4a2b7 100644
--- a/mm/thrash.c
+++ b/mm/thrash.c
@@ -57,14 +57,17 @@ void grab_swap_token(void)
57 /* We have the token. Let others know we still need it. */ 57 /* We have the token. Let others know we still need it. */
58 if (has_swap_token(current->mm)) { 58 if (has_swap_token(current->mm)) {
59 current->mm->recent_pagein = 1; 59 current->mm->recent_pagein = 1;
60 if (unlikely(!swap_token_default_timeout))
61 disable_swap_token();
60 return; 62 return;
61 } 63 }
62 64
63 if (time_after(jiffies, swap_token_check)) { 65 if (time_after(jiffies, swap_token_check)) {
64 66
65 /* Can't get swapout protection if we exceed our RSS limit. */ 67 if (!swap_token_default_timeout) {
66 // if (current->mm->rss > current->mm->rlimit_rss) 68 swap_token_check = jiffies + SWAP_TOKEN_CHECK_INTERVAL;
67 // return; 69 return;
70 }
68 71
69 /* ... or if we recently held the token. */ 72 /* ... or if we recently held the token. */
70 if (time_before(jiffies, current->mm->swap_token_time)) 73 if (time_before(jiffies, current->mm->swap_token_time))
@@ -95,6 +98,7 @@ void __put_swap_token(struct mm_struct *mm)
95{ 98{
96 spin_lock(&swap_token_lock); 99 spin_lock(&swap_token_lock);
97 if (likely(mm == swap_token_mm)) { 100 if (likely(mm == swap_token_mm)) {
101 mm->swap_token_time = jiffies + SWAP_TOKEN_CHECK_INTERVAL;
98 swap_token_mm = &init_mm; 102 swap_token_mm = &init_mm;
99 swap_token_check = jiffies; 103 swap_token_check = jiffies;
100 } 104 }
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 28130541270f..b0cd81c32de6 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -201,13 +201,25 @@ static int shrink_slab(unsigned long scanned, gfp_t gfp_mask,
201 list_for_each_entry(shrinker, &shrinker_list, list) { 201 list_for_each_entry(shrinker, &shrinker_list, list) {
202 unsigned long long delta; 202 unsigned long long delta;
203 unsigned long total_scan; 203 unsigned long total_scan;
204 unsigned long max_pass = (*shrinker->shrinker)(0, gfp_mask);
204 205
205 delta = (4 * scanned) / shrinker->seeks; 206 delta = (4 * scanned) / shrinker->seeks;
206 delta *= (*shrinker->shrinker)(0, gfp_mask); 207 delta *= max_pass;
207 do_div(delta, lru_pages + 1); 208 do_div(delta, lru_pages + 1);
208 shrinker->nr += delta; 209 shrinker->nr += delta;
209 if (shrinker->nr < 0) 210 if (shrinker->nr < 0) {
210 shrinker->nr = LONG_MAX; /* It wrapped! */ 211 printk(KERN_ERR "%s: nr=%ld\n",
212 __FUNCTION__, shrinker->nr);
213 shrinker->nr = max_pass;
214 }
215
216 /*
217 * Avoid risking looping forever due to too large nr value:
218 * never try to free more than twice the estimate number of
219 * freeable entries.
220 */
221 if (shrinker->nr > max_pass * 2)
222 shrinker->nr = max_pass * 2;
211 223
212 total_scan = shrinker->nr; 224 total_scan = shrinker->nr;
213 shrinker->nr = 0; 225 shrinker->nr = 0;
@@ -407,7 +419,7 @@ static int shrink_list(struct list_head *page_list, struct scan_control *sc)
407 if (PageWriteback(page)) 419 if (PageWriteback(page))
408 goto keep_locked; 420 goto keep_locked;
409 421
410 referenced = page_referenced(page, 1, sc->priority <= 0); 422 referenced = page_referenced(page, 1);
411 /* In active use or really unfreeable? Activate it. */ 423 /* In active use or really unfreeable? Activate it. */
412 if (referenced && page_mapping_inuse(page)) 424 if (referenced && page_mapping_inuse(page))
413 goto activate_locked; 425 goto activate_locked;
@@ -756,7 +768,7 @@ refill_inactive_zone(struct zone *zone, struct scan_control *sc)
756 if (page_mapped(page)) { 768 if (page_mapped(page)) {
757 if (!reclaim_mapped || 769 if (!reclaim_mapped ||
758 (total_swap_pages == 0 && PageAnon(page)) || 770 (total_swap_pages == 0 && PageAnon(page)) ||
759 page_referenced(page, 0, sc->priority <= 0)) { 771 page_referenced(page, 0)) {
760 list_add(&page->lru, &l_active); 772 list_add(&page->lru, &l_active);
761 continue; 773 continue;
762 } 774 }
@@ -960,6 +972,8 @@ int try_to_free_pages(struct zone **zones, gfp_t gfp_mask)
960 sc.nr_reclaimed = 0; 972 sc.nr_reclaimed = 0;
961 sc.priority = priority; 973 sc.priority = priority;
962 sc.swap_cluster_max = SWAP_CLUSTER_MAX; 974 sc.swap_cluster_max = SWAP_CLUSTER_MAX;
975 if (!priority)
976 disable_swap_token();
963 shrink_caches(zones, &sc); 977 shrink_caches(zones, &sc);
964 shrink_slab(sc.nr_scanned, gfp_mask, lru_pages); 978 shrink_slab(sc.nr_scanned, gfp_mask, lru_pages);
965 if (reclaim_state) { 979 if (reclaim_state) {
@@ -1056,6 +1070,10 @@ loop_again:
1056 int end_zone = 0; /* Inclusive. 0 = ZONE_DMA */ 1070 int end_zone = 0; /* Inclusive. 0 = ZONE_DMA */
1057 unsigned long lru_pages = 0; 1071 unsigned long lru_pages = 0;
1058 1072
1073 /* The swap token gets in the way of swapout... */
1074 if (!priority)
1075 disable_swap_token();
1076
1059 all_zones_ok = 1; 1077 all_zones_ok = 1;
1060 1078
1061 if (nr_pages == 0) { 1079 if (nr_pages == 0) {
@@ -1360,6 +1378,7 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
1360 sc.nr_reclaimed = 0; 1378 sc.nr_reclaimed = 0;
1361 /* scan at the highest priority */ 1379 /* scan at the highest priority */
1362 sc.priority = 0; 1380 sc.priority = 0;
1381 disable_swap_token();
1363 1382
1364 if (nr_pages > SWAP_CLUSTER_MAX) 1383 if (nr_pages > SWAP_CLUSTER_MAX)
1365 sc.swap_cluster_max = nr_pages; 1384 sc.swap_cluster_max = nr_pages;
diff --git a/net/atm/atm_misc.c b/net/atm/atm_misc.c
index 223c7ad5bd0f..02cc7e71efea 100644
--- a/net/atm/atm_misc.c
+++ b/net/atm/atm_misc.c
@@ -74,11 +74,14 @@ struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
74 */ 74 */
75 75
76 76
77int atm_pcr_goal(struct atm_trafprm *tp) 77int atm_pcr_goal(const struct atm_trafprm *tp)
78{ 78{
79 if (tp->pcr && tp->pcr != ATM_MAX_PCR) return -tp->pcr; 79 if (tp->pcr && tp->pcr != ATM_MAX_PCR)
80 if (tp->min_pcr && !tp->pcr) return tp->min_pcr; 80 return -tp->pcr;
81 if (tp->max_pcr != ATM_MAX_PCR) return -tp->max_pcr; 81 if (tp->min_pcr && !tp->pcr)
82 return tp->min_pcr;
83 if (tp->max_pcr != ATM_MAX_PCR)
84 return -tp->max_pcr;
82 return 0; 85 return 0;
83} 86}
84 87
diff --git a/net/atm/common.c b/net/atm/common.c
index 63feea49fb13..6656b111cc05 100644
--- a/net/atm/common.c
+++ b/net/atm/common.c
@@ -221,6 +221,29 @@ void vcc_release_async(struct atm_vcc *vcc, int reply)
221EXPORT_SYMBOL(vcc_release_async); 221EXPORT_SYMBOL(vcc_release_async);
222 222
223 223
224void atm_dev_release_vccs(struct atm_dev *dev)
225{
226 int i;
227
228 write_lock_irq(&vcc_sklist_lock);
229 for (i = 0; i < VCC_HTABLE_SIZE; i++) {
230 struct hlist_head *head = &vcc_hash[i];
231 struct hlist_node *node, *tmp;
232 struct sock *s;
233 struct atm_vcc *vcc;
234
235 sk_for_each_safe(s, node, tmp, head) {
236 vcc = atm_sk(s);
237 if (vcc->dev == dev) {
238 vcc_release_async(vcc, -EPIPE);
239 sk_del_node_init(s);
240 }
241 }
242 }
243 write_unlock_irq(&vcc_sklist_lock);
244}
245
246
224static int adjust_tp(struct atm_trafprm *tp,unsigned char aal) 247static int adjust_tp(struct atm_trafprm *tp,unsigned char aal)
225{ 248{
226 int max_sdu; 249 int max_sdu;
@@ -332,12 +355,13 @@ static int __vcc_connect(struct atm_vcc *vcc, struct atm_dev *dev, short vpi,
332 return -EINVAL; 355 return -EINVAL;
333 if (vci > 0 && vci < ATM_NOT_RSV_VCI && !capable(CAP_NET_BIND_SERVICE)) 356 if (vci > 0 && vci < ATM_NOT_RSV_VCI && !capable(CAP_NET_BIND_SERVICE))
334 return -EPERM; 357 return -EPERM;
335 error = 0; 358 error = -ENODEV;
336 if (!try_module_get(dev->ops->owner)) 359 if (!try_module_get(dev->ops->owner))
337 return -ENODEV; 360 return error;
338 vcc->dev = dev; 361 vcc->dev = dev;
339 write_lock_irq(&vcc_sklist_lock); 362 write_lock_irq(&vcc_sklist_lock);
340 if ((error = find_ci(vcc, &vpi, &vci))) { 363 if (test_bit(ATM_DF_REMOVED, &dev->flags) ||
364 (error = find_ci(vcc, &vpi, &vci))) {
341 write_unlock_irq(&vcc_sklist_lock); 365 write_unlock_irq(&vcc_sklist_lock);
342 goto fail_module_put; 366 goto fail_module_put;
343 } 367 }
@@ -423,33 +447,23 @@ int vcc_connect(struct socket *sock, int itf, short vpi, int vci)
423 if (vcc->qos.txtp.traffic_class == ATM_ANYCLASS || 447 if (vcc->qos.txtp.traffic_class == ATM_ANYCLASS ||
424 vcc->qos.rxtp.traffic_class == ATM_ANYCLASS) 448 vcc->qos.rxtp.traffic_class == ATM_ANYCLASS)
425 return -EINVAL; 449 return -EINVAL;
426 if (itf != ATM_ITF_ANY) { 450 if (likely(itf != ATM_ITF_ANY)) {
427 dev = atm_dev_lookup(itf); 451 dev = try_then_request_module(atm_dev_lookup(itf), "atm-device-%d", itf);
428 if (!dev)
429 return -ENODEV;
430 error = __vcc_connect(vcc, dev, vpi, vci);
431 if (error) {
432 atm_dev_put(dev);
433 return error;
434 }
435 } else { 452 } else {
436 struct list_head *p, *next;
437
438 dev = NULL; 453 dev = NULL;
439 spin_lock(&atm_dev_lock); 454 down(&atm_dev_mutex);
440 list_for_each_safe(p, next, &atm_devs) { 455 if (!list_empty(&atm_devs)) {
441 dev = list_entry(p, struct atm_dev, dev_list); 456 dev = list_entry(atm_devs.next, struct atm_dev, dev_list);
442 atm_dev_hold(dev); 457 atm_dev_hold(dev);
443 spin_unlock(&atm_dev_lock);
444 if (!__vcc_connect(vcc, dev, vpi, vci))
445 break;
446 atm_dev_put(dev);
447 dev = NULL;
448 spin_lock(&atm_dev_lock);
449 } 458 }
450 spin_unlock(&atm_dev_lock); 459 up(&atm_dev_mutex);
451 if (!dev) 460 }
452 return -ENODEV; 461 if (!dev)
462 return -ENODEV;
463 error = __vcc_connect(vcc, dev, vpi, vci);
464 if (error) {
465 atm_dev_put(dev);
466 return error;
453 } 467 }
454 if (vpi == ATM_VPI_UNSPEC || vci == ATM_VCI_UNSPEC) 468 if (vpi == ATM_VPI_UNSPEC || vci == ATM_VCI_UNSPEC)
455 set_bit(ATM_VF_PARTIAL,&vcc->flags); 469 set_bit(ATM_VF_PARTIAL,&vcc->flags);
diff --git a/net/atm/common.h b/net/atm/common.h
index e49ed41c0e33..4887c317cefe 100644
--- a/net/atm/common.h
+++ b/net/atm/common.h
@@ -47,4 +47,6 @@ static inline void atm_proc_exit(void)
47/* SVC */ 47/* SVC */
48int svc_change_qos(struct atm_vcc *vcc,struct atm_qos *qos); 48int svc_change_qos(struct atm_vcc *vcc,struct atm_qos *qos);
49 49
50void atm_dev_release_vccs(struct atm_dev *dev);
51
50#endif 52#endif
diff --git a/net/atm/resources.c b/net/atm/resources.c
index 415d2615d475..c8c459fcb038 100644
--- a/net/atm/resources.c
+++ b/net/atm/resources.c
@@ -25,7 +25,7 @@
25 25
26 26
27LIST_HEAD(atm_devs); 27LIST_HEAD(atm_devs);
28DEFINE_SPINLOCK(atm_dev_lock); 28DECLARE_MUTEX(atm_dev_mutex);
29 29
30static struct atm_dev *__alloc_atm_dev(const char *type) 30static struct atm_dev *__alloc_atm_dev(const char *type)
31{ 31{
@@ -52,7 +52,7 @@ static struct atm_dev *__atm_dev_lookup(int number)
52 52
53 list_for_each(p, &atm_devs) { 53 list_for_each(p, &atm_devs) {
54 dev = list_entry(p, struct atm_dev, dev_list); 54 dev = list_entry(p, struct atm_dev, dev_list);
55 if ((dev->ops) && (dev->number == number)) { 55 if (dev->number == number) {
56 atm_dev_hold(dev); 56 atm_dev_hold(dev);
57 return dev; 57 return dev;
58 } 58 }
@@ -64,12 +64,13 @@ struct atm_dev *atm_dev_lookup(int number)
64{ 64{
65 struct atm_dev *dev; 65 struct atm_dev *dev;
66 66
67 spin_lock(&atm_dev_lock); 67 down(&atm_dev_mutex);
68 dev = __atm_dev_lookup(number); 68 dev = __atm_dev_lookup(number);
69 spin_unlock(&atm_dev_lock); 69 up(&atm_dev_mutex);
70 return dev; 70 return dev;
71} 71}
72 72
73
73struct atm_dev *atm_dev_register(const char *type, const struct atmdev_ops *ops, 74struct atm_dev *atm_dev_register(const char *type, const struct atmdev_ops *ops,
74 int number, unsigned long *flags) 75 int number, unsigned long *flags)
75{ 76{
@@ -81,11 +82,11 @@ struct atm_dev *atm_dev_register(const char *type, const struct atmdev_ops *ops,
81 type); 82 type);
82 return NULL; 83 return NULL;
83 } 84 }
84 spin_lock(&atm_dev_lock); 85 down(&atm_dev_mutex);
85 if (number != -1) { 86 if (number != -1) {
86 if ((inuse = __atm_dev_lookup(number))) { 87 if ((inuse = __atm_dev_lookup(number))) {
87 atm_dev_put(inuse); 88 atm_dev_put(inuse);
88 spin_unlock(&atm_dev_lock); 89 up(&atm_dev_mutex);
89 kfree(dev); 90 kfree(dev);
90 return NULL; 91 return NULL;
91 } 92 }
@@ -105,19 +106,17 @@ struct atm_dev *atm_dev_register(const char *type, const struct atmdev_ops *ops,
105 memset(&dev->flags, 0, sizeof(dev->flags)); 106 memset(&dev->flags, 0, sizeof(dev->flags));
106 memset(&dev->stats, 0, sizeof(dev->stats)); 107 memset(&dev->stats, 0, sizeof(dev->stats));
107 atomic_set(&dev->refcnt, 1); 108 atomic_set(&dev->refcnt, 1);
108 list_add_tail(&dev->dev_list, &atm_devs);
109 spin_unlock(&atm_dev_lock);
110 109
111 if (atm_proc_dev_register(dev) < 0) { 110 if (atm_proc_dev_register(dev) < 0) {
112 printk(KERN_ERR "atm_dev_register: " 111 printk(KERN_ERR "atm_dev_register: "
113 "atm_proc_dev_register failed for dev %s\n", 112 "atm_proc_dev_register failed for dev %s\n",
114 type); 113 type);
115 spin_lock(&atm_dev_lock); 114 up(&atm_dev_mutex);
116 list_del(&dev->dev_list);
117 spin_unlock(&atm_dev_lock);
118 kfree(dev); 115 kfree(dev);
119 return NULL; 116 return NULL;
120 } 117 }
118 list_add_tail(&dev->dev_list, &atm_devs);
119 up(&atm_dev_mutex);
121 120
122 return dev; 121 return dev;
123} 122}
@@ -125,37 +124,22 @@ struct atm_dev *atm_dev_register(const char *type, const struct atmdev_ops *ops,
125 124
126void atm_dev_deregister(struct atm_dev *dev) 125void atm_dev_deregister(struct atm_dev *dev)
127{ 126{
128 unsigned long warning_time; 127 BUG_ON(test_bit(ATM_DF_REMOVED, &dev->flags));
128 set_bit(ATM_DF_REMOVED, &dev->flags);
129
130 /*
131 * if we remove current device from atm_devs list, new device
132 * with same number can appear, such we need deregister proc,
133 * release async all vccs and remove them from vccs list too
134 */
135 down(&atm_dev_mutex);
136 list_del(&dev->dev_list);
137 up(&atm_dev_mutex);
129 138
139 atm_dev_release_vccs(dev);
130 atm_proc_dev_deregister(dev); 140 atm_proc_dev_deregister(dev);
131 141
132 spin_lock(&atm_dev_lock); 142 atm_dev_put(dev);
133 list_del(&dev->dev_list);
134 spin_unlock(&atm_dev_lock);
135
136 warning_time = jiffies;
137 while (atomic_read(&dev->refcnt) != 1) {
138 msleep(250);
139 if ((jiffies - warning_time) > 10 * HZ) {
140 printk(KERN_EMERG "atm_dev_deregister: waiting for "
141 "dev %d to become free. Usage count = %d\n",
142 dev->number, atomic_read(&dev->refcnt));
143 warning_time = jiffies;
144 }
145 }
146
147 kfree(dev);
148}
149
150void shutdown_atm_dev(struct atm_dev *dev)
151{
152 if (atomic_read(&dev->refcnt) > 1) {
153 set_bit(ATM_DF_CLOSE, &dev->flags);
154 return;
155 }
156 if (dev->ops->dev_close)
157 dev->ops->dev_close(dev);
158 atm_dev_deregister(dev);
159} 143}
160 144
161 145
@@ -211,16 +195,16 @@ int atm_dev_ioctl(unsigned int cmd, void __user *arg)
211 return -EFAULT; 195 return -EFAULT;
212 if (get_user(len, &iobuf->length)) 196 if (get_user(len, &iobuf->length))
213 return -EFAULT; 197 return -EFAULT;
214 spin_lock(&atm_dev_lock); 198 down(&atm_dev_mutex);
215 list_for_each(p, &atm_devs) 199 list_for_each(p, &atm_devs)
216 size += sizeof(int); 200 size += sizeof(int);
217 if (size > len) { 201 if (size > len) {
218 spin_unlock(&atm_dev_lock); 202 up(&atm_dev_mutex);
219 return -E2BIG; 203 return -E2BIG;
220 } 204 }
221 tmp_buf = kmalloc(size, GFP_ATOMIC); 205 tmp_buf = kmalloc(size, GFP_ATOMIC);
222 if (!tmp_buf) { 206 if (!tmp_buf) {
223 spin_unlock(&atm_dev_lock); 207 up(&atm_dev_mutex);
224 return -ENOMEM; 208 return -ENOMEM;
225 } 209 }
226 tmp_p = tmp_buf; 210 tmp_p = tmp_buf;
@@ -228,7 +212,7 @@ int atm_dev_ioctl(unsigned int cmd, void __user *arg)
228 dev = list_entry(p, struct atm_dev, dev_list); 212 dev = list_entry(p, struct atm_dev, dev_list);
229 *tmp_p++ = dev->number; 213 *tmp_p++ = dev->number;
230 } 214 }
231 spin_unlock(&atm_dev_lock); 215 up(&atm_dev_mutex);
232 error = ((copy_to_user(buf, tmp_buf, size)) || 216 error = ((copy_to_user(buf, tmp_buf, size)) ||
233 put_user(size, &iobuf->length)) 217 put_user(size, &iobuf->length))
234 ? -EFAULT : 0; 218 ? -EFAULT : 0;
@@ -245,7 +229,8 @@ int atm_dev_ioctl(unsigned int cmd, void __user *arg)
245 if (get_user(number, &sioc->number)) 229 if (get_user(number, &sioc->number))
246 return -EFAULT; 230 return -EFAULT;
247 231
248 if (!(dev = atm_dev_lookup(number))) 232 if (!(dev = try_then_request_module(atm_dev_lookup(number),
233 "atm-device-%d", number)))
249 return -ENODEV; 234 return -ENODEV;
250 235
251 switch (cmd) { 236 switch (cmd) {
@@ -414,13 +399,13 @@ static __inline__ void *dev_get_idx(loff_t left)
414 399
415void *atm_dev_seq_start(struct seq_file *seq, loff_t *pos) 400void *atm_dev_seq_start(struct seq_file *seq, loff_t *pos)
416{ 401{
417 spin_lock(&atm_dev_lock); 402 down(&atm_dev_mutex);
418 return *pos ? dev_get_idx(*pos) : (void *) 1; 403 return *pos ? dev_get_idx(*pos) : (void *) 1;
419} 404}
420 405
421void atm_dev_seq_stop(struct seq_file *seq, void *v) 406void atm_dev_seq_stop(struct seq_file *seq, void *v)
422{ 407{
423 spin_unlock(&atm_dev_lock); 408 up(&atm_dev_mutex);
424} 409}
425 410
426void *atm_dev_seq_next(struct seq_file *seq, void *v, loff_t *pos) 411void *atm_dev_seq_next(struct seq_file *seq, void *v, loff_t *pos)
@@ -434,4 +419,3 @@ void *atm_dev_seq_next(struct seq_file *seq, void *v, loff_t *pos)
434EXPORT_SYMBOL(atm_dev_register); 419EXPORT_SYMBOL(atm_dev_register);
435EXPORT_SYMBOL(atm_dev_deregister); 420EXPORT_SYMBOL(atm_dev_deregister);
436EXPORT_SYMBOL(atm_dev_lookup); 421EXPORT_SYMBOL(atm_dev_lookup);
437EXPORT_SYMBOL(shutdown_atm_dev);
diff --git a/net/atm/resources.h b/net/atm/resources.h
index 12910619dbb6..b7fb82a93b42 100644
--- a/net/atm/resources.h
+++ b/net/atm/resources.h
@@ -11,8 +11,7 @@
11 11
12 12
13extern struct list_head atm_devs; 13extern struct list_head atm_devs;
14extern spinlock_t atm_dev_lock; 14extern struct semaphore atm_dev_mutex;
15
16 15
17int atm_dev_ioctl(unsigned int cmd, void __user *arg); 16int atm_dev_ioctl(unsigned int cmd, void __user *arg);
18 17
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index eaa150c33b04..d368cf249000 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -228,13 +228,14 @@ static int inet_create(struct socket *sock, int protocol)
228 unsigned char answer_flags; 228 unsigned char answer_flags;
229 char answer_no_check; 229 char answer_no_check;
230 int try_loading_module = 0; 230 int try_loading_module = 0;
231 int err = -ESOCKTNOSUPPORT; 231 int err;
232 232
233 sock->state = SS_UNCONNECTED; 233 sock->state = SS_UNCONNECTED;
234 234
235 /* Look for the requested type/protocol pair. */ 235 /* Look for the requested type/protocol pair. */
236 answer = NULL; 236 answer = NULL;
237lookup_protocol: 237lookup_protocol:
238 err = -ESOCKTNOSUPPORT;
238 rcu_read_lock(); 239 rcu_read_lock();
239 list_for_each_rcu(p, &inetsw[sock->type]) { 240 list_for_each_rcu(p, &inetsw[sock->type]) {
240 answer = list_entry(p, struct inet_protosw, list); 241 answer = list_entry(p, struct inet_protosw, list);
@@ -252,6 +253,7 @@ lookup_protocol:
252 if (IPPROTO_IP == answer->protocol) 253 if (IPPROTO_IP == answer->protocol)
253 break; 254 break;
254 } 255 }
256 err = -EPROTONOSUPPORT;
255 answer = NULL; 257 answer = NULL;
256 } 258 }
257 259
@@ -280,9 +282,6 @@ lookup_protocol:
280 err = -EPERM; 282 err = -EPERM;
281 if (answer->capability > 0 && !capable(answer->capability)) 283 if (answer->capability > 0 && !capable(answer->capability))
282 goto out_rcu_unlock; 284 goto out_rcu_unlock;
283 err = -EPROTONOSUPPORT;
284 if (!protocol)
285 goto out_rcu_unlock;
286 285
287 sock->ops = answer->ops; 286 sock->ops = answer->ops;
288 answer_prot = answer->prot; 287 answer_prot = answer->prot;
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 882f88f6d13b..19b1b984d687 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -544,12 +544,16 @@ static void nl_fib_input(struct sock *sk, int len)
544 struct sk_buff *skb = NULL; 544 struct sk_buff *skb = NULL;
545 struct nlmsghdr *nlh = NULL; 545 struct nlmsghdr *nlh = NULL;
546 struct fib_result_nl *frn; 546 struct fib_result_nl *frn;
547 int err;
548 u32 pid; 547 u32 pid;
549 struct fib_table *tb; 548 struct fib_table *tb;
550 549
551 skb = skb_recv_datagram(sk, 0, 0, &err); 550 skb = skb_dequeue(&sk->sk_receive_queue);
552 nlh = (struct nlmsghdr *)skb->data; 551 nlh = (struct nlmsghdr *)skb->data;
552 if (skb->len < NLMSG_SPACE(0) || skb->len < nlh->nlmsg_len ||
553 nlh->nlmsg_len < NLMSG_LENGTH(sizeof(*frn))) {
554 kfree_skb(skb);
555 return;
556 }
553 557
554 frn = (struct fib_result_nl *) NLMSG_DATA(nlh); 558 frn = (struct fib_result_nl *) NLMSG_DATA(nlh);
555 tb = fib_get_table(frn->tb_id_in); 559 tb = fib_get_table(frn->tb_id_in);
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
index 2a8c9afc3695..7ea0209cb169 100644
--- a/net/ipv4/fib_hash.c
+++ b/net/ipv4/fib_hash.c
@@ -975,7 +975,7 @@ static void fib_seq_stop(struct seq_file *seq, void *v)
975 975
976static unsigned fib_flag_trans(int type, u32 mask, struct fib_info *fi) 976static unsigned fib_flag_trans(int type, u32 mask, struct fib_info *fi)
977{ 977{
978 static unsigned type2flags[RTN_MAX + 1] = { 978 static const unsigned type2flags[RTN_MAX + 1] = {
979 [7] = RTF_REJECT, [8] = RTF_REJECT, 979 [7] = RTF_REJECT, [8] = RTF_REJECT,
980 }; 980 };
981 unsigned flags = type2flags[type]; 981 unsigned flags = type2flags[type];
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 186f20c4a45e..6d2a6ac070e3 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -83,7 +83,7 @@ for (nhsel=0; nhsel < 1; nhsel++)
83#define endfor_nexthops(fi) } 83#define endfor_nexthops(fi) }
84 84
85 85
86static struct 86static const struct
87{ 87{
88 int error; 88 int error;
89 u8 scope; 89 u8 scope;
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index e3eceecd0496..92e23b2ad4d2 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -220,7 +220,7 @@ struct icmp_control {
220 short error; /* This ICMP is classed as an error message */ 220 short error; /* This ICMP is classed as an error message */
221}; 221};
222 222
223static struct icmp_control icmp_pointers[NR_ICMP_TYPES+1]; 223static const struct icmp_control icmp_pointers[NR_ICMP_TYPES+1];
224 224
225/* 225/*
226 * The ICMP socket(s). This is the most convenient way to flow control 226 * The ICMP socket(s). This is the most convenient way to flow control
@@ -994,7 +994,7 @@ error:
994/* 994/*
995 * This table is the definition of how we handle ICMP. 995 * This table is the definition of how we handle ICMP.
996 */ 996 */
997static struct icmp_control icmp_pointers[NR_ICMP_TYPES + 1] = { 997static const struct icmp_control icmp_pointers[NR_ICMP_TYPES + 1] = {
998 [ICMP_ECHOREPLY] = { 998 [ICMP_ECHOREPLY] = {
999 .output_entry = ICMP_MIB_OUTECHOREPS, 999 .output_entry = ICMP_MIB_OUTECHOREPS,
1000 .input_entry = ICMP_MIB_INECHOREPS, 1000 .input_entry = ICMP_MIB_INECHOREPS,
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index c04607b49212..4a195c724f01 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -897,7 +897,10 @@ int igmp_rcv(struct sk_buff *skb)
897 /* Is it our report looped back? */ 897 /* Is it our report looped back? */
898 if (((struct rtable*)skb->dst)->fl.iif == 0) 898 if (((struct rtable*)skb->dst)->fl.iif == 0)
899 break; 899 break;
900 igmp_heard_report(in_dev, ih->group); 900 /* don't rely on MC router hearing unicast reports */
901 if (skb->pkt_type == PACKET_MULTICAST ||
902 skb->pkt_type == PACKET_BROADCAST)
903 igmp_heard_report(in_dev, ih->group);
901 break; 904 break;
902 case IGMP_PIM: 905 case IGMP_PIM:
903#ifdef CONFIG_IP_PIMSM_V1 906#ifdef CONFIG_IP_PIMSM_V1
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 4e9c74b54b15..a4c347c3b8e3 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -1217,7 +1217,7 @@ static int ipgre_tunnel_init(struct net_device *dev)
1217 return 0; 1217 return 0;
1218} 1218}
1219 1219
1220int __init ipgre_fb_tunnel_init(struct net_device *dev) 1220static int __init ipgre_fb_tunnel_init(struct net_device *dev)
1221{ 1221{
1222 struct ip_tunnel *tunnel = (struct ip_tunnel*)dev->priv; 1222 struct ip_tunnel *tunnel = (struct ip_tunnel*)dev->priv;
1223 struct iphdr *iph = &tunnel->parms.iph; 1223 struct iphdr *iph = &tunnel->parms.iph;
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 11c2f68254f0..eba64e2bd397 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -690,7 +690,7 @@ csum_page(struct page *page, int offset, int copy)
690 return csum; 690 return csum;
691} 691}
692 692
693inline int ip_ufo_append_data(struct sock *sk, 693static inline int ip_ufo_append_data(struct sock *sk,
694 int getfrag(void *from, char *to, int offset, int len, 694 int getfrag(void *from, char *to, int offset, int len,
695 int odd, struct sk_buff *skb), 695 int odd, struct sk_buff *skb),
696 void *from, int length, int hh_len, int fragheaderlen, 696 void *from, int length, int hh_len, int fragheaderlen,
diff --git a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c
index f828fa2eb7de..2a3a8c59c655 100644
--- a/net/ipv4/ipvs/ip_vs_conn.c
+++ b/net/ipv4/ipvs/ip_vs_conn.c
@@ -771,7 +771,7 @@ static inline int todrop_entry(struct ip_vs_conn *cp)
771 * The drop rate array needs tuning for real environments. 771 * The drop rate array needs tuning for real environments.
772 * Called from timer bh only => no locking 772 * Called from timer bh only => no locking
773 */ 773 */
774 static char todrop_rate[9] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; 774 static const char todrop_rate[9] = {0, 1, 2, 3, 4, 5, 6, 7, 8};
775 static char todrop_counter[9] = {0}; 775 static char todrop_counter[9] = {0};
776 int i; 776 int i;
777 777
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c
index 2d66848e7aa0..9bdcf31b760e 100644
--- a/net/ipv4/ipvs/ip_vs_ctl.c
+++ b/net/ipv4/ipvs/ip_vs_ctl.c
@@ -1909,7 +1909,7 @@ static int ip_vs_set_timeout(struct ip_vs_timeout_user *u)
1909#define DAEMON_ARG_LEN (sizeof(struct ip_vs_daemon_user)) 1909#define DAEMON_ARG_LEN (sizeof(struct ip_vs_daemon_user))
1910#define MAX_ARG_LEN SVCDEST_ARG_LEN 1910#define MAX_ARG_LEN SVCDEST_ARG_LEN
1911 1911
1912static unsigned char set_arglen[SET_CMDID(IP_VS_SO_SET_MAX)+1] = { 1912static const unsigned char set_arglen[SET_CMDID(IP_VS_SO_SET_MAX)+1] = {
1913 [SET_CMDID(IP_VS_SO_SET_ADD)] = SERVICE_ARG_LEN, 1913 [SET_CMDID(IP_VS_SO_SET_ADD)] = SERVICE_ARG_LEN,
1914 [SET_CMDID(IP_VS_SO_SET_EDIT)] = SERVICE_ARG_LEN, 1914 [SET_CMDID(IP_VS_SO_SET_EDIT)] = SERVICE_ARG_LEN,
1915 [SET_CMDID(IP_VS_SO_SET_DEL)] = SERVICE_ARG_LEN, 1915 [SET_CMDID(IP_VS_SO_SET_DEL)] = SERVICE_ARG_LEN,
@@ -2180,7 +2180,7 @@ __ip_vs_get_timeouts(struct ip_vs_timeout_user *u)
2180#define GET_TIMEOUT_ARG_LEN (sizeof(struct ip_vs_timeout_user)) 2180#define GET_TIMEOUT_ARG_LEN (sizeof(struct ip_vs_timeout_user))
2181#define GET_DAEMON_ARG_LEN (sizeof(struct ip_vs_daemon_user) * 2) 2181#define GET_DAEMON_ARG_LEN (sizeof(struct ip_vs_daemon_user) * 2)
2182 2182
2183static unsigned char get_arglen[GET_CMDID(IP_VS_SO_GET_MAX)+1] = { 2183static const unsigned char get_arglen[GET_CMDID(IP_VS_SO_GET_MAX)+1] = {
2184 [GET_CMDID(IP_VS_SO_GET_VERSION)] = 64, 2184 [GET_CMDID(IP_VS_SO_GET_VERSION)] = 64,
2185 [GET_CMDID(IP_VS_SO_GET_INFO)] = GET_INFO_ARG_LEN, 2185 [GET_CMDID(IP_VS_SO_GET_INFO)] = GET_INFO_ARG_LEN,
2186 [GET_CMDID(IP_VS_SO_GET_SERVICES)] = GET_SERVICES_ARG_LEN, 2186 [GET_CMDID(IP_VS_SO_GET_SERVICES)] = GET_SERVICES_ARG_LEN,
diff --git a/net/ipv4/ipvs/ip_vs_proto_tcp.c b/net/ipv4/ipvs/ip_vs_proto_tcp.c
index c19408973c09..0e878fd6215c 100644
--- a/net/ipv4/ipvs/ip_vs_proto_tcp.c
+++ b/net/ipv4/ipvs/ip_vs_proto_tcp.c
@@ -251,7 +251,7 @@ tcp_csum_check(struct sk_buff *skb, struct ip_vs_protocol *pp)
251#define TCP_DIR_OUTPUT 4 251#define TCP_DIR_OUTPUT 4
252#define TCP_DIR_INPUT_ONLY 8 252#define TCP_DIR_INPUT_ONLY 8
253 253
254static int tcp_state_off[IP_VS_DIR_LAST] = { 254static const int tcp_state_off[IP_VS_DIR_LAST] = {
255 [IP_VS_DIR_INPUT] = TCP_DIR_INPUT, 255 [IP_VS_DIR_INPUT] = TCP_DIR_INPUT,
256 [IP_VS_DIR_OUTPUT] = TCP_DIR_OUTPUT, 256 [IP_VS_DIR_OUTPUT] = TCP_DIR_OUTPUT,
257 [IP_VS_DIR_INPUT_ONLY] = TCP_DIR_INPUT_ONLY, 257 [IP_VS_DIR_INPUT_ONLY] = TCP_DIR_INPUT_ONLY,
diff --git a/net/ipv4/netfilter/ip_conntrack_amanda.c b/net/ipv4/netfilter/ip_conntrack_amanda.c
index fa3f914117ec..e52847fa10f5 100644
--- a/net/ipv4/netfilter/ip_conntrack_amanda.c
+++ b/net/ipv4/netfilter/ip_conntrack_amanda.c
@@ -37,7 +37,7 @@ MODULE_LICENSE("GPL");
37module_param(master_timeout, int, 0600); 37module_param(master_timeout, int, 0600);
38MODULE_PARM_DESC(master_timeout, "timeout for the master connection"); 38MODULE_PARM_DESC(master_timeout, "timeout for the master connection");
39 39
40static char *conns[] = { "DATA ", "MESG ", "INDEX " }; 40static const char *conns[] = { "DATA ", "MESG ", "INDEX " };
41 41
42/* This is slow, but it's simple. --RR */ 42/* This is slow, but it's simple. --RR */
43static char *amanda_buffer; 43static char *amanda_buffer;
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
index 422ab68ee7fb..7a4ecddd597b 100644
--- a/net/ipv4/netfilter/ip_conntrack_core.c
+++ b/net/ipv4/netfilter/ip_conntrack_core.c
@@ -1354,7 +1354,7 @@ static void free_conntrack_hash(struct list_head *hash, int vmalloced,int size)
1354 get_order(sizeof(struct list_head) * size)); 1354 get_order(sizeof(struct list_head) * size));
1355} 1355}
1356 1356
1357void ip_conntrack_flush() 1357void ip_conntrack_flush(void)
1358{ 1358{
1359 /* This makes sure all current packets have passed through 1359 /* This makes sure all current packets have passed through
1360 netfilter framework. Roll on, two-stage module 1360 netfilter framework. Roll on, two-stage module
@@ -1408,7 +1408,7 @@ static struct list_head *alloc_hashtable(int size, int *vmalloced)
1408 return hash; 1408 return hash;
1409} 1409}
1410 1410
1411int set_hashsize(const char *val, struct kernel_param *kp) 1411static int set_hashsize(const char *val, struct kernel_param *kp)
1412{ 1412{
1413 int i, bucket, hashsize, vmalloced; 1413 int i, bucket, hashsize, vmalloced;
1414 int old_vmalloced, old_size; 1414 int old_vmalloced, old_size;
diff --git a/net/ipv4/netfilter/ip_conntrack_ftp.c b/net/ipv4/netfilter/ip_conntrack_ftp.c
index 59e12b02b22c..68b173bcda60 100644
--- a/net/ipv4/netfilter/ip_conntrack_ftp.c
+++ b/net/ipv4/netfilter/ip_conntrack_ftp.c
@@ -55,7 +55,7 @@ static int try_rfc959(const char *, size_t, u_int32_t [], char);
55static int try_eprt(const char *, size_t, u_int32_t [], char); 55static int try_eprt(const char *, size_t, u_int32_t [], char);
56static int try_epsv_response(const char *, size_t, u_int32_t [], char); 56static int try_epsv_response(const char *, size_t, u_int32_t [], char);
57 57
58static struct ftp_search { 58static const struct ftp_search {
59 enum ip_conntrack_dir dir; 59 enum ip_conntrack_dir dir;
60 const char *pattern; 60 const char *pattern;
61 size_t plen; 61 size_t plen;
diff --git a/net/ipv4/netfilter/ip_conntrack_irc.c b/net/ipv4/netfilter/ip_conntrack_irc.c
index 2dea1db14406..d7c40421d0d1 100644
--- a/net/ipv4/netfilter/ip_conntrack_irc.c
+++ b/net/ipv4/netfilter/ip_conntrack_irc.c
@@ -59,7 +59,7 @@ MODULE_PARM_DESC(max_dcc_channels, "max number of expected DCC channels per IRC
59module_param(dcc_timeout, int, 0400); 59module_param(dcc_timeout, int, 0400);
60MODULE_PARM_DESC(dcc_timeout, "timeout on for unestablished DCC channels"); 60MODULE_PARM_DESC(dcc_timeout, "timeout on for unestablished DCC channels");
61 61
62static char *dccprotos[] = { "SEND ", "CHAT ", "MOVE ", "TSEND ", "SCHAT " }; 62static const char *dccprotos[] = { "SEND ", "CHAT ", "MOVE ", "TSEND ", "SCHAT " };
63#define MINMATCHLEN 5 63#define MINMATCHLEN 5
64 64
65#if 0 65#if 0
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c
index e4d6b268e8c4..5f9925db608e 100644
--- a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c
+++ b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c
@@ -51,7 +51,7 @@ static int icmp_invert_tuple(struct ip_conntrack_tuple *tuple,
51 const struct ip_conntrack_tuple *orig) 51 const struct ip_conntrack_tuple *orig)
52{ 52{
53 /* Add 1; spaces filled with 0. */ 53 /* Add 1; spaces filled with 0. */
54 static u_int8_t invmap[] 54 static const u_int8_t invmap[]
55 = { [ICMP_ECHO] = ICMP_ECHOREPLY + 1, 55 = { [ICMP_ECHO] = ICMP_ECHOREPLY + 1,
56 [ICMP_ECHOREPLY] = ICMP_ECHO + 1, 56 [ICMP_ECHOREPLY] = ICMP_ECHO + 1,
57 [ICMP_TIMESTAMP] = ICMP_TIMESTAMPREPLY + 1, 57 [ICMP_TIMESTAMP] = ICMP_TIMESTAMPREPLY + 1,
@@ -110,7 +110,7 @@ static int icmp_packet(struct ip_conntrack *ct,
110 return NF_ACCEPT; 110 return NF_ACCEPT;
111} 111}
112 112
113static u_int8_t valid_new[] = { 113static const u_int8_t valid_new[] = {
114 [ICMP_ECHO] = 1, 114 [ICMP_ECHO] = 1,
115 [ICMP_TIMESTAMP] = 1, 115 [ICMP_TIMESTAMP] = 1,
116 [ICMP_INFO_REQUEST] = 1, 116 [ICMP_INFO_REQUEST] = 1,
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
index 59a4a0111dd3..977fb59d4563 100644
--- a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
+++ b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
@@ -65,7 +65,7 @@ static unsigned long ip_ct_sctp_timeout_shutdown_sent = 300 SECS / 1000;
65static unsigned long ip_ct_sctp_timeout_shutdown_recd = 300 SECS / 1000; 65static unsigned long ip_ct_sctp_timeout_shutdown_recd = 300 SECS / 1000;
66static unsigned long ip_ct_sctp_timeout_shutdown_ack_sent = 3 SECS; 66static unsigned long ip_ct_sctp_timeout_shutdown_ack_sent = 3 SECS;
67 67
68static unsigned long * sctp_timeouts[] 68static const unsigned long * sctp_timeouts[]
69= { NULL, /* SCTP_CONNTRACK_NONE */ 69= { NULL, /* SCTP_CONNTRACK_NONE */
70 &ip_ct_sctp_timeout_closed, /* SCTP_CONNTRACK_CLOSED */ 70 &ip_ct_sctp_timeout_closed, /* SCTP_CONNTRACK_CLOSED */
71 &ip_ct_sctp_timeout_cookie_wait, /* SCTP_CONNTRACK_COOKIE_WAIT */ 71 &ip_ct_sctp_timeout_cookie_wait, /* SCTP_CONNTRACK_COOKIE_WAIT */
@@ -118,7 +118,7 @@ cookie echoed to closed.
118*/ 118*/
119 119
120/* SCTP conntrack state transitions */ 120/* SCTP conntrack state transitions */
121static enum sctp_conntrack sctp_conntracks[2][9][SCTP_CONNTRACK_MAX] = { 121static const enum sctp_conntrack sctp_conntracks[2][9][SCTP_CONNTRACK_MAX] = {
122 { 122 {
123/* ORIGINAL */ 123/* ORIGINAL */
124/* sNO, sCL, sCW, sCE, sES, sSS, sSR, sSA */ 124/* sNO, sCL, sCW, sCE, sES, sSS, sSR, sSA */
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
index ee3b7d6c4d2e..aeb7353d4777 100644
--- a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
+++ b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
@@ -99,7 +99,7 @@ unsigned long ip_ct_tcp_timeout_close = 10 SECS;
99 to ~13-30min depending on RTO. */ 99 to ~13-30min depending on RTO. */
100unsigned long ip_ct_tcp_timeout_max_retrans = 5 MINS; 100unsigned long ip_ct_tcp_timeout_max_retrans = 5 MINS;
101 101
102static unsigned long * tcp_timeouts[] 102static const unsigned long * tcp_timeouts[]
103= { NULL, /* TCP_CONNTRACK_NONE */ 103= { NULL, /* TCP_CONNTRACK_NONE */
104 &ip_ct_tcp_timeout_syn_sent, /* TCP_CONNTRACK_SYN_SENT, */ 104 &ip_ct_tcp_timeout_syn_sent, /* TCP_CONNTRACK_SYN_SENT, */
105 &ip_ct_tcp_timeout_syn_recv, /* TCP_CONNTRACK_SYN_RECV, */ 105 &ip_ct_tcp_timeout_syn_recv, /* TCP_CONNTRACK_SYN_RECV, */
@@ -170,7 +170,7 @@ enum tcp_bit_set {
170 * if they are invalid 170 * if they are invalid
171 * or we do not support the request (simultaneous open) 171 * or we do not support the request (simultaneous open)
172 */ 172 */
173static enum tcp_conntrack tcp_conntracks[2][6][TCP_CONNTRACK_MAX] = { 173static const enum tcp_conntrack tcp_conntracks[2][6][TCP_CONNTRACK_MAX] = {
174 { 174 {
175/* ORIGINAL */ 175/* ORIGINAL */
176/* sNO, sSS, sSR, sES, sFW, sCW, sLA, sTW, sCL, sLI */ 176/* sNO, sSS, sSR, sES, sFW, sCW, sLA, sTW, sCL, sLI */
@@ -272,9 +272,9 @@ static enum tcp_conntrack tcp_conntracks[2][6][TCP_CONNTRACK_MAX] = {
272 * sCL -> sCL 272 * sCL -> sCL
273 */ 273 */
274/* sNO, sSS, sSR, sES, sFW, sCW, sLA, sTW, sCL, sLI */ 274/* sNO, sSS, sSR, sES, sFW, sCW, sLA, sTW, sCL, sLI */
275/*ack*/ { sIV, sIV, sSR, sES, sCW, sCW, sTW, sTW, sCL, sIV }, 275/*ack*/ { sIV, sIG, sSR, sES, sCW, sCW, sTW, sTW, sCL, sIV },
276/* 276/*
277 * sSS -> sIV Might be a half-open connection. 277 * sSS -> sIG Might be a half-open connection.
278 * sSR -> sSR Might answer late resent SYN. 278 * sSR -> sSR Might answer late resent SYN.
279 * sES -> sES :-) 279 * sES -> sES :-)
280 * sFW -> sCW Normal close request answered by ACK. 280 * sFW -> sCW Normal close request answered by ACK.
@@ -817,7 +817,7 @@ void ip_conntrack_tcp_update(struct sk_buff *skb,
817#define TH_CWR 0x80 817#define TH_CWR 0x80
818 818
819/* table of valid flag combinations - ECE and CWR are always valid */ 819/* table of valid flag combinations - ECE and CWR are always valid */
820static u8 tcp_valid_flags[(TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG) + 1] = 820static const u8 tcp_valid_flags[(TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG) + 1] =
821{ 821{
822 [TH_SYN] = 1, 822 [TH_SYN] = 1,
823 [TH_SYN|TH_ACK] = 1, 823 [TH_SYN|TH_ACK] = 1,
@@ -917,8 +917,12 @@ static int tcp_packet(struct ip_conntrack *conntrack,
917 917
918 switch (new_state) { 918 switch (new_state) {
919 case TCP_CONNTRACK_IGNORE: 919 case TCP_CONNTRACK_IGNORE:
920 /* Either SYN in ORIGINAL 920 /* Ignored packets:
921 * or SYN/ACK in REPLY. */ 921 *
922 * a) SYN in ORIGINAL
923 * b) SYN/ACK in REPLY
924 * c) ACK in reply direction after initial SYN in original.
925 */
922 if (index == TCP_SYNACK_SET 926 if (index == TCP_SYNACK_SET
923 && conntrack->proto.tcp.last_index == TCP_SYN_SET 927 && conntrack->proto.tcp.last_index == TCP_SYN_SET
924 && conntrack->proto.tcp.last_dir != dir 928 && conntrack->proto.tcp.last_dir != dir
@@ -985,13 +989,20 @@ static int tcp_packet(struct ip_conntrack *conntrack,
985 } 989 }
986 case TCP_CONNTRACK_CLOSE: 990 case TCP_CONNTRACK_CLOSE:
987 if (index == TCP_RST_SET 991 if (index == TCP_RST_SET
988 && test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status) 992 && ((test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status)
989 && conntrack->proto.tcp.last_index == TCP_SYN_SET 993 && conntrack->proto.tcp.last_index == TCP_SYN_SET)
994 || (!test_bit(IPS_ASSURED_BIT, &conntrack->status)
995 && conntrack->proto.tcp.last_index == TCP_ACK_SET))
990 && ntohl(th->ack_seq) == conntrack->proto.tcp.last_end) { 996 && ntohl(th->ack_seq) == conntrack->proto.tcp.last_end) {
991 /* RST sent to invalid SYN we had let trough 997 /* RST sent to invalid SYN or ACK we had let trough
992 * SYN was in window then, tear down connection. 998 * at a) and c) above:
999 *
1000 * a) SYN was in window then
1001 * c) we hold a half-open connection.
1002 *
1003 * Delete our connection entry.
993 * We skip window checking, because packet might ACK 1004 * We skip window checking, because packet might ACK
994 * segments we ignored in the SYN. */ 1005 * segments we ignored. */
995 goto in_window; 1006 goto in_window;
996 } 1007 }
997 /* Just fall trough */ 1008 /* Just fall trough */
diff --git a/net/ipv4/netfilter/ip_nat_core.c b/net/ipv4/netfilter/ip_nat_core.c
index 762f4d93936b..c1a61462507f 100644
--- a/net/ipv4/netfilter/ip_nat_core.c
+++ b/net/ipv4/netfilter/ip_nat_core.c
@@ -49,7 +49,7 @@ static unsigned int ip_nat_htable_size;
49static struct list_head *bysource; 49static struct list_head *bysource;
50 50
51#define MAX_IP_NAT_PROTO 256 51#define MAX_IP_NAT_PROTO 256
52struct ip_nat_protocol *ip_nat_protos[MAX_IP_NAT_PROTO]; 52static struct ip_nat_protocol *ip_nat_protos[MAX_IP_NAT_PROTO];
53 53
54static inline struct ip_nat_protocol * 54static inline struct ip_nat_protocol *
55__ip_nat_proto_find(u_int8_t protonum) 55__ip_nat_proto_find(u_int8_t protonum)
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 75c27e92f6ab..45886c8475e8 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -1892,7 +1892,7 @@ static int ipt_get_matches(char *buffer, char **start, off_t offset, int length)
1892 return pos; 1892 return pos;
1893} 1893}
1894 1894
1895static struct { char *name; get_info_t *get_info; } ipt_proc_entry[] = 1895static const struct { char *name; get_info_t *get_info; } ipt_proc_entry[] =
1896{ { "ip_tables_names", ipt_get_tables }, 1896{ { "ip_tables_names", ipt_get_tables },
1897 { "ip_tables_targets", ipt_get_targets }, 1897 { "ip_tables_targets", ipt_get_targets },
1898 { "ip_tables_matches", ipt_get_matches }, 1898 { "ip_tables_matches", ipt_get_matches },
diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c
index 92ed050fac69..30be0f1dae37 100644
--- a/net/ipv4/netfilter/ipt_LOG.c
+++ b/net/ipv4/netfilter/ipt_LOG.c
@@ -197,7 +197,7 @@ static void dump_packet(const struct nf_loginfo *info,
197 } 197 }
198 case IPPROTO_ICMP: { 198 case IPPROTO_ICMP: {
199 struct icmphdr _icmph, *ich; 199 struct icmphdr _icmph, *ich;
200 static size_t required_len[NR_ICMP_TYPES+1] 200 static const size_t required_len[NR_ICMP_TYPES+1]
201 = { [ICMP_ECHOREPLY] = 4, 201 = { [ICMP_ECHOREPLY] = 4,
202 [ICMP_DEST_UNREACH] 202 [ICMP_DEST_UNREACH]
203 = 8 + sizeof(struct iphdr), 203 = 8 + sizeof(struct iphdr),
@@ -351,7 +351,7 @@ static void dump_packet(const struct nf_loginfo *info,
351 /* maxlen = 230+ 91 + 230 + 252 = 803 */ 351 /* maxlen = 230+ 91 + 230 + 252 = 803 */
352} 352}
353 353
354struct nf_loginfo default_loginfo = { 354static struct nf_loginfo default_loginfo = {
355 .type = NF_LOG_TYPE_LOG, 355 .type = NF_LOG_TYPE_LOG,
356 .u = { 356 .u = {
357 .log = { 357 .log = {
diff --git a/net/ipv4/netfilter/ipt_recent.c b/net/ipv4/netfilter/ipt_recent.c
index 2d44b07688af..261cbb4d4c49 100644
--- a/net/ipv4/netfilter/ipt_recent.c
+++ b/net/ipv4/netfilter/ipt_recent.c
@@ -532,6 +532,7 @@ match(const struct sk_buff *skb,
532 } 532 }
533 if(info->seconds && info->hit_count) { 533 if(info->seconds && info->hit_count) {
534 for(pkt_count = 0, hits_found = 0; pkt_count < ip_pkt_list_tot; pkt_count++) { 534 for(pkt_count = 0, hits_found = 0; pkt_count < ip_pkt_list_tot; pkt_count++) {
535 if(r_list[location].last_pkts[pkt_count] == 0) break;
535 if(time_before_eq(now,r_list[location].last_pkts[pkt_count]+info->seconds*HZ)) hits_found++; 536 if(time_before_eq(now,r_list[location].last_pkts[pkt_count]+info->seconds*HZ)) hits_found++;
536 } 537 }
537 if(hits_found >= info->hit_count) ans = !info->invert; else ans = info->invert; 538 if(hits_found >= info->hit_count) ans = !info->invert; else ans = info->invert;
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c
index a65e508fbd40..0d7dc668db46 100644
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
@@ -98,7 +98,7 @@ fold_field(void *mib[], int offt)
98} 98}
99 99
100/* snmp items */ 100/* snmp items */
101static struct snmp_mib snmp4_ipstats_list[] = { 101static const struct snmp_mib snmp4_ipstats_list[] = {
102 SNMP_MIB_ITEM("InReceives", IPSTATS_MIB_INRECEIVES), 102 SNMP_MIB_ITEM("InReceives", IPSTATS_MIB_INRECEIVES),
103 SNMP_MIB_ITEM("InHdrErrors", IPSTATS_MIB_INHDRERRORS), 103 SNMP_MIB_ITEM("InHdrErrors", IPSTATS_MIB_INHDRERRORS),
104 SNMP_MIB_ITEM("InAddrErrors", IPSTATS_MIB_INADDRERRORS), 104 SNMP_MIB_ITEM("InAddrErrors", IPSTATS_MIB_INADDRERRORS),
@@ -119,7 +119,7 @@ static struct snmp_mib snmp4_ipstats_list[] = {
119 SNMP_MIB_SENTINEL 119 SNMP_MIB_SENTINEL
120}; 120};
121 121
122static struct snmp_mib snmp4_icmp_list[] = { 122static const struct snmp_mib snmp4_icmp_list[] = {
123 SNMP_MIB_ITEM("InMsgs", ICMP_MIB_INMSGS), 123 SNMP_MIB_ITEM("InMsgs", ICMP_MIB_INMSGS),
124 SNMP_MIB_ITEM("InErrors", ICMP_MIB_INERRORS), 124 SNMP_MIB_ITEM("InErrors", ICMP_MIB_INERRORS),
125 SNMP_MIB_ITEM("InDestUnreachs", ICMP_MIB_INDESTUNREACHS), 125 SNMP_MIB_ITEM("InDestUnreachs", ICMP_MIB_INDESTUNREACHS),
@@ -149,7 +149,7 @@ static struct snmp_mib snmp4_icmp_list[] = {
149 SNMP_MIB_SENTINEL 149 SNMP_MIB_SENTINEL
150}; 150};
151 151
152static struct snmp_mib snmp4_tcp_list[] = { 152static const struct snmp_mib snmp4_tcp_list[] = {
153 SNMP_MIB_ITEM("RtoAlgorithm", TCP_MIB_RTOALGORITHM), 153 SNMP_MIB_ITEM("RtoAlgorithm", TCP_MIB_RTOALGORITHM),
154 SNMP_MIB_ITEM("RtoMin", TCP_MIB_RTOMIN), 154 SNMP_MIB_ITEM("RtoMin", TCP_MIB_RTOMIN),
155 SNMP_MIB_ITEM("RtoMax", TCP_MIB_RTOMAX), 155 SNMP_MIB_ITEM("RtoMax", TCP_MIB_RTOMAX),
@@ -167,7 +167,7 @@ static struct snmp_mib snmp4_tcp_list[] = {
167 SNMP_MIB_SENTINEL 167 SNMP_MIB_SENTINEL
168}; 168};
169 169
170static struct snmp_mib snmp4_udp_list[] = { 170static const struct snmp_mib snmp4_udp_list[] = {
171 SNMP_MIB_ITEM("InDatagrams", UDP_MIB_INDATAGRAMS), 171 SNMP_MIB_ITEM("InDatagrams", UDP_MIB_INDATAGRAMS),
172 SNMP_MIB_ITEM("NoPorts", UDP_MIB_NOPORTS), 172 SNMP_MIB_ITEM("NoPorts", UDP_MIB_NOPORTS),
173 SNMP_MIB_ITEM("InErrors", UDP_MIB_INERRORS), 173 SNMP_MIB_ITEM("InErrors", UDP_MIB_INERRORS),
@@ -175,7 +175,7 @@ static struct snmp_mib snmp4_udp_list[] = {
175 SNMP_MIB_SENTINEL 175 SNMP_MIB_SENTINEL
176}; 176};
177 177
178static struct snmp_mib snmp4_net_list[] = { 178static const struct snmp_mib snmp4_net_list[] = {
179 SNMP_MIB_ITEM("SyncookiesSent", LINUX_MIB_SYNCOOKIESSENT), 179 SNMP_MIB_ITEM("SyncookiesSent", LINUX_MIB_SYNCOOKIESSENT),
180 SNMP_MIB_ITEM("SyncookiesRecv", LINUX_MIB_SYNCOOKIESRECV), 180 SNMP_MIB_ITEM("SyncookiesRecv", LINUX_MIB_SYNCOOKIESRECV),
181 SNMP_MIB_ITEM("SyncookiesFailed", LINUX_MIB_SYNCOOKIESFAILED), 181 SNMP_MIB_ITEM("SyncookiesFailed", LINUX_MIB_SYNCOOKIESFAILED),
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 381dd6a6aebb..f701a136a6ae 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1371,7 +1371,7 @@ out: kfree_skb(skb);
1371 * are needed for AMPRnet AX.25 paths. 1371 * are needed for AMPRnet AX.25 paths.
1372 */ 1372 */
1373 1373
1374static unsigned short mtu_plateau[] = 1374static const unsigned short mtu_plateau[] =
1375{32000, 17914, 8166, 4352, 2002, 1492, 576, 296, 216, 128 }; 1375{32000, 17914, 8166, 4352, 2002, 1492, 576, 296, 216, 128 };
1376 1376
1377static __inline__ unsigned short guess_mtu(unsigned short old_mtu) 1377static __inline__ unsigned short guess_mtu(unsigned short old_mtu)
@@ -3149,8 +3149,7 @@ int __init ip_rt_init(void)
3149 sizeof(struct rt_hash_bucket), 3149 sizeof(struct rt_hash_bucket),
3150 rhash_entries, 3150 rhash_entries,
3151 (num_physpages >= 128 * 1024) ? 3151 (num_physpages >= 128 * 1024) ?
3152 (27 - PAGE_SHIFT) : 3152 15 : 17,
3153 (29 - PAGE_SHIFT),
3154 HASH_HIGHMEM, 3153 HASH_HIGHMEM,
3155 &rt_hash_log, 3154 &rt_hash_log,
3156 &rt_hash_mask, 3155 &rt_hash_mask,
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 9ac7a4f46bd8..ef98b14ac56d 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1413,7 +1413,7 @@ recv_urg:
1413 * closed. 1413 * closed.
1414 */ 1414 */
1415 1415
1416static unsigned char new_state[16] = { 1416static const unsigned char new_state[16] = {
1417 /* current state: new state: action: */ 1417 /* current state: new state: action: */
1418 /* (Invalid) */ TCP_CLOSE, 1418 /* (Invalid) */ TCP_CLOSE,
1419 /* TCP_ESTABLISHED */ TCP_FIN_WAIT1 | TCP_ACTION_FIN, 1419 /* TCP_ESTABLISHED */ TCP_FIN_WAIT1 | TCP_ACTION_FIN,
@@ -2065,8 +2065,7 @@ void __init tcp_init(void)
2065 sizeof(struct inet_ehash_bucket), 2065 sizeof(struct inet_ehash_bucket),
2066 thash_entries, 2066 thash_entries,
2067 (num_physpages >= 128 * 1024) ? 2067 (num_physpages >= 128 * 1024) ?
2068 (25 - PAGE_SHIFT) : 2068 13 : 15,
2069 (27 - PAGE_SHIFT),
2070 HASH_HIGHMEM, 2069 HASH_HIGHMEM,
2071 &tcp_hashinfo.ehash_size, 2070 &tcp_hashinfo.ehash_size,
2072 NULL, 2071 NULL,
@@ -2082,8 +2081,7 @@ void __init tcp_init(void)
2082 sizeof(struct inet_bind_hashbucket), 2081 sizeof(struct inet_bind_hashbucket),
2083 tcp_hashinfo.ehash_size, 2082 tcp_hashinfo.ehash_size,
2084 (num_physpages >= 128 * 1024) ? 2083 (num_physpages >= 128 * 1024) ?
2085 (25 - PAGE_SHIFT) : 2084 13 : 15,
2086 (27 - PAGE_SHIFT),
2087 HASH_HIGHMEM, 2085 HASH_HIGHMEM,
2088 &tcp_hashinfo.bhash_size, 2086 &tcp_hashinfo.bhash_size,
2089 NULL, 2087 NULL,
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index a16064ba0caf..76ff9f4fe89d 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -985,6 +985,8 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev,
985 } 985 }
986 986
987 /* Rule 4: Prefer home address -- not implemented yet */ 987 /* Rule 4: Prefer home address -- not implemented yet */
988 if (hiscore.rule < 4)
989 hiscore.rule++;
988 990
989 /* Rule 5: Prefer outgoing interface */ 991 /* Rule 5: Prefer outgoing interface */
990 if (hiscore.rule < 5) { 992 if (hiscore.rule < 5) {
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index c63b8ce0e1b5..d9546380fa04 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -92,10 +92,13 @@ static int inet6_create(struct socket *sock, int protocol)
92 struct proto *answer_prot; 92 struct proto *answer_prot;
93 unsigned char answer_flags; 93 unsigned char answer_flags;
94 char answer_no_check; 94 char answer_no_check;
95 int rc; 95 int try_loading_module = 0;
96 int err;
96 97
97 /* Look for the requested type/protocol pair. */ 98 /* Look for the requested type/protocol pair. */
98 answer = NULL; 99 answer = NULL;
100lookup_protocol:
101 err = -ESOCKTNOSUPPORT;
99 rcu_read_lock(); 102 rcu_read_lock();
100 list_for_each_rcu(p, &inetsw6[sock->type]) { 103 list_for_each_rcu(p, &inetsw6[sock->type]) {
101 answer = list_entry(p, struct inet_protosw, list); 104 answer = list_entry(p, struct inet_protosw, list);
@@ -113,21 +116,37 @@ static int inet6_create(struct socket *sock, int protocol)
113 if (IPPROTO_IP == answer->protocol) 116 if (IPPROTO_IP == answer->protocol)
114 break; 117 break;
115 } 118 }
119 err = -EPROTONOSUPPORT;
116 answer = NULL; 120 answer = NULL;
117 } 121 }
118 122
119 rc = -ESOCKTNOSUPPORT; 123 if (!answer) {
120 if (!answer) 124 if (try_loading_module < 2) {
121 goto out_rcu_unlock; 125 rcu_read_unlock();
122 rc = -EPERM; 126 /*
127 * Be more specific, e.g. net-pf-10-proto-132-type-1
128 * (net-pf-PF_INET6-proto-IPPROTO_SCTP-type-SOCK_STREAM)
129 */
130 if (++try_loading_module == 1)
131 request_module("net-pf-%d-proto-%d-type-%d",
132 PF_INET6, protocol, sock->type);
133 /*
134 * Fall back to generic, e.g. net-pf-10-proto-132
135 * (net-pf-PF_INET6-proto-IPPROTO_SCTP)
136 */
137 else
138 request_module("net-pf-%d-proto-%d",
139 PF_INET6, protocol);
140 goto lookup_protocol;
141 } else
142 goto out_rcu_unlock;
143 }
144
145 err = -EPERM;
123 if (answer->capability > 0 && !capable(answer->capability)) 146 if (answer->capability > 0 && !capable(answer->capability))
124 goto out_rcu_unlock; 147 goto out_rcu_unlock;
125 rc = -EPROTONOSUPPORT;
126 if (!protocol)
127 goto out_rcu_unlock;
128 148
129 sock->ops = answer->ops; 149 sock->ops = answer->ops;
130
131 answer_prot = answer->prot; 150 answer_prot = answer->prot;
132 answer_no_check = answer->no_check; 151 answer_no_check = answer->no_check;
133 answer_flags = answer->flags; 152 answer_flags = answer->flags;
@@ -135,14 +154,14 @@ static int inet6_create(struct socket *sock, int protocol)
135 154
136 BUG_TRAP(answer_prot->slab != NULL); 155 BUG_TRAP(answer_prot->slab != NULL);
137 156
138 rc = -ENOBUFS; 157 err = -ENOBUFS;
139 sk = sk_alloc(PF_INET6, GFP_KERNEL, answer_prot, 1); 158 sk = sk_alloc(PF_INET6, GFP_KERNEL, answer_prot, 1);
140 if (sk == NULL) 159 if (sk == NULL)
141 goto out; 160 goto out;
142 161
143 sock_init_data(sock, sk); 162 sock_init_data(sock, sk);
144 163
145 rc = 0; 164 err = 0;
146 sk->sk_no_check = answer_no_check; 165 sk->sk_no_check = answer_no_check;
147 if (INET_PROTOSW_REUSE & answer_flags) 166 if (INET_PROTOSW_REUSE & answer_flags)
148 sk->sk_reuse = 1; 167 sk->sk_reuse = 1;
@@ -202,14 +221,14 @@ static int inet6_create(struct socket *sock, int protocol)
202 sk->sk_prot->hash(sk); 221 sk->sk_prot->hash(sk);
203 } 222 }
204 if (sk->sk_prot->init) { 223 if (sk->sk_prot->init) {
205 rc = sk->sk_prot->init(sk); 224 err = sk->sk_prot->init(sk);
206 if (rc) { 225 if (err) {
207 sk_common_release(sk); 226 sk_common_release(sk);
208 goto out; 227 goto out;
209 } 228 }
210 } 229 }
211out: 230out:
212 return rc; 231 return err;
213out_rcu_unlock: 232out_rcu_unlock:
214 rcu_read_unlock(); 233 rcu_read_unlock();
215 goto out; 234 goto out;
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 1bdf0fb8bf8a..34a332225c17 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -751,7 +751,7 @@ void icmpv6_cleanup(void)
751 inet6_del_protocol(&icmpv6_protocol, IPPROTO_ICMPV6); 751 inet6_del_protocol(&icmpv6_protocol, IPPROTO_ICMPV6);
752} 752}
753 753
754static struct icmp6_err { 754static const struct icmp6_err {
755 int err; 755 int err;
756 int fatal; 756 int fatal;
757} tab_unreach[] = { 757} tab_unreach[] = {
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index c1fa693511a1..8523c76ebf76 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -774,7 +774,8 @@ out_err_release:
774 *dst = NULL; 774 *dst = NULL;
775 return err; 775 return err;
776} 776}
777inline int ip6_ufo_append_data(struct sock *sk, 777
778static inline int ip6_ufo_append_data(struct sock *sk,
778 int getfrag(void *from, char *to, int offset, int len, 779 int getfrag(void *from, char *to, int offset, int len,
779 int odd, struct sk_buff *skb), 780 int odd, struct sk_buff *skb),
780 void *from, int length, int hh_len, int fragheaderlen, 781 void *from, int length, int hh_len, int fragheaderlen,
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index 25757ade989f..3620718defe6 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -628,8 +628,8 @@ e_inval:
628 return -EINVAL; 628 return -EINVAL;
629} 629}
630 630
631int ipv6_getsockopt_sticky(struct sock *sk, struct ipv6_opt_hdr *hdr, 631static int ipv6_getsockopt_sticky(struct sock *sk, struct ipv6_opt_hdr *hdr,
632 char __user *optval, int len) 632 char __user *optval, int len)
633{ 633{
634 if (!hdr) 634 if (!hdr)
635 return 0; 635 return 0;
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index f15e04ad026e..fd939da090c4 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -1231,6 +1231,11 @@ int igmp6_event_report(struct sk_buff *skb)
1231 if (skb->pkt_type == PACKET_LOOPBACK) 1231 if (skb->pkt_type == PACKET_LOOPBACK)
1232 return 0; 1232 return 0;
1233 1233
1234 /* send our report if the MC router may not have heard this report */
1235 if (skb->pkt_type != PACKET_MULTICAST &&
1236 skb->pkt_type != PACKET_BROADCAST)
1237 return 0;
1238
1234 if (!pskb_may_pull(skb, sizeof(struct in6_addr))) 1239 if (!pskb_may_pull(skb, sizeof(struct in6_addr)))
1235 return -EINVAL; 1240 return -EINVAL;
1236 1241
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index 7d492226c16e..95d469271c4d 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -1972,7 +1972,7 @@ static int ip6t_get_matches(char *buffer, char **start, off_t offset, int length
1972 return pos; 1972 return pos;
1973} 1973}
1974 1974
1975static struct { char *name; get_info_t *get_info; } ip6t_proc_entry[] = 1975static const struct { char *name; get_info_t *get_info; } ip6t_proc_entry[] =
1976{ { "ip6_tables_names", ip6t_get_tables }, 1976{ { "ip6_tables_names", ip6t_get_tables },
1977 { "ip6_tables_targets", ip6t_get_targets }, 1977 { "ip6_tables_targets", ip6t_get_targets },
1978 { "ip6_tables_matches", ip6t_get_matches }, 1978 { "ip6_tables_matches", ip6t_get_matches },
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index 5a6fcf349bdf..6035633d8225 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -280,9 +280,9 @@ static enum tcp_conntrack tcp_conntracks[2][6][TCP_CONNTRACK_MAX] = {
280 * sCL -> sCL 280 * sCL -> sCL
281 */ 281 */
282/* sNO, sSS, sSR, sES, sFW, sCW, sLA, sTW, sCL, sLI */ 282/* sNO, sSS, sSR, sES, sFW, sCW, sLA, sTW, sCL, sLI */
283/*ack*/ { sIV, sIV, sSR, sES, sCW, sCW, sTW, sTW, sCL, sIV }, 283/*ack*/ { sIV, sIG, sSR, sES, sCW, sCW, sTW, sTW, sCL, sIV },
284/* 284/*
285 * sSS -> sIV Might be a half-open connection. 285 * sSS -> sIG Might be a half-open connection.
286 * sSR -> sSR Might answer late resent SYN. 286 * sSR -> sSR Might answer late resent SYN.
287 * sES -> sES :-) 287 * sES -> sES :-)
288 * sFW -> sCW Normal close request answered by ACK. 288 * sFW -> sCW Normal close request answered by ACK.
@@ -912,8 +912,12 @@ static int tcp_packet(struct nf_conn *conntrack,
912 912
913 switch (new_state) { 913 switch (new_state) {
914 case TCP_CONNTRACK_IGNORE: 914 case TCP_CONNTRACK_IGNORE:
915 /* Either SYN in ORIGINAL 915 /* Ignored packets:
916 * or SYN/ACK in REPLY. */ 916 *
917 * a) SYN in ORIGINAL
918 * b) SYN/ACK in REPLY
919 * c) ACK in reply direction after initial SYN in original.
920 */
917 if (index == TCP_SYNACK_SET 921 if (index == TCP_SYNACK_SET
918 && conntrack->proto.tcp.last_index == TCP_SYN_SET 922 && conntrack->proto.tcp.last_index == TCP_SYN_SET
919 && conntrack->proto.tcp.last_dir != dir 923 && conntrack->proto.tcp.last_dir != dir
@@ -979,13 +983,20 @@ static int tcp_packet(struct nf_conn *conntrack,
979 } 983 }
980 case TCP_CONNTRACK_CLOSE: 984 case TCP_CONNTRACK_CLOSE:
981 if (index == TCP_RST_SET 985 if (index == TCP_RST_SET
982 && test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status) 986 && ((test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status)
983 && conntrack->proto.tcp.last_index == TCP_SYN_SET 987 && conntrack->proto.tcp.last_index == TCP_SYN_SET)
988 || (!test_bit(IPS_ASSURED_BIT, &conntrack->status)
989 && conntrack->proto.tcp.last_index == TCP_ACK_SET))
984 && ntohl(th->ack_seq) == conntrack->proto.tcp.last_end) { 990 && ntohl(th->ack_seq) == conntrack->proto.tcp.last_end) {
985 /* RST sent to invalid SYN we had let trough 991 /* RST sent to invalid SYN or ACK we had let trough
986 * SYN was in window then, tear down connection. 992 * at a) and c) above:
993 *
994 * a) SYN was in window then
995 * c) we hold a half-open connection.
996 *
997 * Delete our connection entry.
987 * We skip window checking, because packet might ACK 998 * We skip window checking, because packet might ACK
988 * segments we ignored in the SYN. */ 999 * segments we ignored. */
989 goto in_window; 1000 goto in_window;
990 } 1001 }
991 /* Just fall trough */ 1002 /* Just fall trough */
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index abab81f3818f..d890dfa8818f 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4743,11 +4743,6 @@ static struct sk_buff *sctp_skb_recv_datagram(struct sock *sk, int flags,
4743 struct sk_buff *skb; 4743 struct sk_buff *skb;
4744 long timeo; 4744 long timeo;
4745 4745
4746 /* Caller is allowed not to check sk->sk_err before calling. */
4747 error = sock_error(sk);
4748 if (error)
4749 goto no_packet;
4750
4751 timeo = sock_rcvtimeo(sk, noblock); 4746 timeo = sock_rcvtimeo(sk, noblock);
4752 4747
4753 SCTP_DEBUG_PRINTK("Timeout: timeo: %ld, MAX: %ld.\n", 4748 SCTP_DEBUG_PRINTK("Timeout: timeo: %ld, MAX: %ld.\n",
@@ -4774,6 +4769,11 @@ static struct sk_buff *sctp_skb_recv_datagram(struct sock *sk, int flags,
4774 if (skb) 4769 if (skb)
4775 return skb; 4770 return skb;
4776 4771
4772 /* Caller is allowed not to check sk->sk_err before calling. */
4773 error = sock_error(sk);
4774 if (error)
4775 goto no_packet;
4776
4777 if (sk->sk_shutdown & RCV_SHUTDOWN) 4777 if (sk->sk_shutdown & RCV_SHUTDOWN)
4778 break; 4778 break;
4779 4779
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index 6bc27200e6ca..268ddaf2dc0f 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -261,7 +261,8 @@ void sctp_transport_route(struct sctp_transport *transport,
261 * association's active path for getsockname(). 261 * association's active path for getsockname().
262 */ 262 */
263 if (asoc && (transport == asoc->peer.active_path)) 263 if (asoc && (transport == asoc->peer.active_path))
264 af->to_sk_saddr(&transport->saddr, asoc->base.sk); 264 opt->pf->af->to_sk_saddr(&transport->saddr,
265 asoc->base.sk);
265 } else 266 } else
266 transport->pmtu = SCTP_DEFAULT_MAXSEGMENT; 267 transport->pmtu = SCTP_DEFAULT_MAXSEGMENT;
267} 268}
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 81e00a6c19de..c76ea221798c 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -39,23 +39,26 @@ static kmem_cache_t *rpc_inode_cachep __read_mostly;
39#define RPC_UPCALL_TIMEOUT (30*HZ) 39#define RPC_UPCALL_TIMEOUT (30*HZ)
40 40
41static void 41static void
42__rpc_purge_upcall(struct inode *inode, int err) 42__rpc_purge_list(struct rpc_inode *rpci, struct list_head *head, int err)
43{ 43{
44 struct rpc_inode *rpci = RPC_I(inode);
45 struct rpc_pipe_msg *msg; 44 struct rpc_pipe_msg *msg;
45 void (*destroy_msg)(struct rpc_pipe_msg *);
46 46
47 while (!list_empty(&rpci->pipe)) { 47 destroy_msg = rpci->ops->destroy_msg;
48 msg = list_entry(rpci->pipe.next, struct rpc_pipe_msg, list); 48 while (!list_empty(head)) {
49 msg = list_entry(head->next, struct rpc_pipe_msg, list);
49 list_del_init(&msg->list); 50 list_del_init(&msg->list);
50 msg->errno = err; 51 msg->errno = err;
51 rpci->ops->destroy_msg(msg); 52 destroy_msg(msg);
52 }
53 while (!list_empty(&rpci->in_upcall)) {
54 msg = list_entry(rpci->pipe.next, struct rpc_pipe_msg, list);
55 list_del_init(&msg->list);
56 msg->errno = err;
57 rpci->ops->destroy_msg(msg);
58 } 53 }
54}
55
56static void
57__rpc_purge_upcall(struct inode *inode, int err)
58{
59 struct rpc_inode *rpci = RPC_I(inode);
60
61 __rpc_purge_list(rpci, &rpci->pipe, err);
59 rpci->pipelen = 0; 62 rpci->pipelen = 0;
60 wake_up(&rpci->waitq); 63 wake_up(&rpci->waitq);
61} 64}
@@ -115,6 +118,7 @@ rpc_close_pipes(struct inode *inode)
115 down(&inode->i_sem); 118 down(&inode->i_sem);
116 if (rpci->ops != NULL) { 119 if (rpci->ops != NULL) {
117 rpci->nreaders = 0; 120 rpci->nreaders = 0;
121 __rpc_purge_list(rpci, &rpci->in_upcall, -EPIPE);
118 __rpc_purge_upcall(inode, -EPIPE); 122 __rpc_purge_upcall(inode, -EPIPE);
119 rpci->nwriters = 0; 123 rpci->nwriters = 0;
120 if (rpci->ops->release_pipe) 124 if (rpci->ops->release_pipe)
diff --git a/security/keys/keyring.c b/security/keys/keyring.c
index c7a0ab1cfda3..4e9fa8be44b8 100644
--- a/security/keys/keyring.c
+++ b/security/keys/keyring.c
@@ -526,7 +526,7 @@ key_ref_t __keyring_search_one(key_ref_t keyring_ref,
526 (!key->type->match || 526 (!key->type->match ||
527 key->type->match(key, description)) && 527 key->type->match(key, description)) &&
528 key_permission(make_key_ref(key, possessed), 528 key_permission(make_key_ref(key, possessed),
529 perm) < 0 && 529 perm) == 0 &&
530 !test_bit(KEY_FLAG_REVOKED, &key->flags) 530 !test_bit(KEY_FLAG_REVOKED, &key->flags)
531 ) 531 )
532 goto found; 532 goto found;